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
61 lines
3.0 KiB
PHP
61 lines
3.0 KiB
PHP
@php
|
|
$examples = [
|
|
'Linear: determinate and indeterminate' => <<<'BLADE'
|
|
<x-progress value="40" label="Linear" />
|
|
<x-progress label="Linear, indeterminate" />
|
|
BLADE,
|
|
'Linear wavy' => <<<'BLADE'
|
|
<x-progress value="60" wavy label="Wavy" />
|
|
<x-progress wavy label="Wavy, indeterminate" />
|
|
BLADE,
|
|
'Thick' => <<<'BLADE'
|
|
<x-progress value="70" thick label="Thick" />
|
|
<x-progress value="55" wavy thick label="Thick wavy" />
|
|
<x-progress wavy thick label="Thick wavy, indeterminate" />
|
|
BLADE,
|
|
'Circular' => <<<'BLADE'
|
|
<x-progress value="65" circular label="Circular" />
|
|
<x-progress circular label="Circular, indeterminate" />
|
|
<x-progress value="65" circular wavy label="Circular wavy" />
|
|
<x-progress circular wavy label="Circular wavy, indeterminate" />
|
|
<x-progress value="65" circular thick label="Circular thick" />
|
|
<x-progress value="65" circular wavy thick label="Circular wavy thick" />
|
|
<x-progress circular wavy data-md-showcase-progress-lg label="Circular wavy, 96px" />
|
|
BLADE,
|
|
'Colours' => <<<'BLADE'
|
|
<x-progress value="35" color="secondary" label="Secondary" />
|
|
<x-progress value="50" wavy color="tertiary" label="Tertiary" />
|
|
<x-progress value="65" color="error" label="Error" />
|
|
<x-progress value="80" wavy color="success" label="Success" />
|
|
<x-progress value="45" color="warning" label="Warning" />
|
|
<x-progress value="55" wavy color="info" label="Info" />
|
|
BLADE,
|
|
'Following a value in the browser (bind)' => <<<'BLADE'
|
|
<x-livewire-material::stack gap="space300" x-data="{ progress: 30 }">
|
|
<x-button label="Set a random value" variant="tonal" x-on:click="progress = Math.round(Math.random() * 100)" />
|
|
<x-progress bind="progress" label="Bound" />
|
|
<x-progress bind="progress" wavy label="Bound wavy" />
|
|
<x-livewire-material::row gap="space300">
|
|
<x-progress bind="progress" circular label="Bound circular" />
|
|
<x-progress bind="progress" circular wavy label="Bound circular wavy" />
|
|
</x-livewire-material::row>
|
|
</x-livewire-material::stack>
|
|
BLADE,
|
|
];
|
|
|
|
// Every example stacks except Circular, which lays several indicators side by side in a row.
|
|
$rows = ['Circular'];
|
|
@endphp
|
|
|
|
<x-livewire-material::stack as="section" id="progress" gap="space300">
|
|
<h2 class="md-visually-hidden">Progress</h2>
|
|
|
|
<p class="md-type-body-md md-ink-variant">
|
|
<code><x-progress></code>: M3 Expressive's linear and circular progress indicators, flat or wavy, determinate or indeterminate.
|
|
</p>
|
|
|
|
@foreach ($examples as $title => $code)
|
|
<x-showcase::example :$title :$code :stack="! in_array($title, $rows, true)" />
|
|
@endforeach
|
|
</x-livewire-material::stack>
|