Plan step 38 review: the frame's structural rule that kept a section's own <h2> for screen readers (Tailwind's [&>section>h2]:sr-only before, a showcase.css rule during the rewrite) was removed as dead weight once every section had a real heading, so each page drew its title twice, the <h1> and an identical headline under it. The <h2>s are md-visually-hidden again, the frame's comment says why, and the section page test asserts it. The Layout section's description said "window size classes"; M3's term is breakpoints. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
45 lines
2.4 KiB
PHP
45 lines
2.4 KiB
PHP
@php
|
|
$examples = [
|
|
'12 and 24 hours, outlined and filled' => <<<'BLADE'
|
|
<x-livewire-material::grid :columns="['compact' => 1, 'medium' => 2]" gap="space300">
|
|
<x-livewire-material::stack gap="space200">
|
|
<x-timepicker label="Meeting starts" value="09:30" hint="The locale's clock" />
|
|
<x-timepicker label="Pick-up" value="17:15" format="12" icon="local_shipping" clearable />
|
|
<x-timepicker label="Disabled" value="12:00" disabled />
|
|
</x-livewire-material::stack>
|
|
|
|
<x-livewire-material::stack gap="space200">
|
|
<x-timepicker variant="filled" label="Alarm" value="06:45" format="24" icon="alarm" />
|
|
<x-timepicker variant="filled" label="Reminder" format="24" hint="Opens at the current time" />
|
|
<x-timepicker variant="filled" label="Required" format="24" required />
|
|
</x-livewire-material::stack>
|
|
</x-livewire-material::grid>
|
|
BLADE,
|
|
'Steps and limits' => <<<'BLADE'
|
|
<x-livewire-material::grid :columns="['compact' => 1, 'medium' => 2]" gap="space300">
|
|
<x-livewire-material::stack gap="space200">
|
|
<x-timepicker label="Appointment" value="10:00" format="24" step="15" min="08:00" max="17:30" hint="Quarter hours from 08:00 to 17:30" />
|
|
<x-timepicker label="Night shift starts" value="23:00" format="24" min="22:00" max="06:00" hint="From 22:00, across midnight, to 06:00" />
|
|
</x-livewire-material::stack>
|
|
|
|
<x-livewire-material::stack gap="space200" x-data="{ time: '14:05' }">
|
|
<x-timepicker label="Bound with x-model" x-model="time" format="12" step="5" />
|
|
<p class="md-type-body-md md-ink-variant">Stored as <code x-text="time ?? 'null'"></code></p>
|
|
</x-livewire-material::stack>
|
|
</x-livewire-material::grid>
|
|
BLADE,
|
|
];
|
|
@endphp
|
|
|
|
<x-livewire-material::stack as="section" id="timepickers" gap="space300">
|
|
<h2 class="md-visually-hidden">Time pickers</h2>
|
|
|
|
<p class="md-type-body-md md-ink-variant">
|
|
<code><x-timepicker></code> — M3's dial and input time picker in a modal dialog, opened from a text field.
|
|
</p>
|
|
|
|
@foreach ($examples as $title => $code)
|
|
<x-showcase::example :$title :$code />
|
|
@endforeach
|
|
</x-livewire-material::stack>
|