Rewrite the showcase's Menus section without Tailwind
Plan step 38: text moves onto the md-* classes; the "Icons in their own colour" example's two roles outside the fixed md-ink-* set (tertiary, secondary) move to a data-md-showcase-icon-color hook in showcase.css targeting the item's [data-md-icon] child, since icon-class only reaches roles the fixed set already names. Swimming's info icon keeps icon-class, now icon-class="md-ink-info". Every id, aria-label and role selector the Chromium ActionsTest selectors read against /material/menus (#menus, the More/Sort/Share/ Assign to/Photo triggers, the submenu and sheet-at-compact behaviour) is unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
9aab3fbe67
commit
4d1481c832
@@ -130,19 +130,19 @@
|
||||
<x-button label="New plan" icon="add" variant="filled" />
|
||||
</x-slot:trigger>
|
||||
|
||||
<x-menu-item label="Running" icon="directions_run" icon-class="text-tertiary" />
|
||||
<x-menu-item label="Cycling" icon="directions_bike" icon-class="text-secondary" />
|
||||
<x-menu-item label="Swimming" icon="pool" icon-class="text-info" />
|
||||
<x-menu-item label="Rowing" icon="rowing" icon-class="text-tertiary" disabled />
|
||||
<x-menu-item label="Running" icon="directions_run" data-md-showcase-icon-color="tertiary" />
|
||||
<x-menu-item label="Cycling" icon="directions_bike" data-md-showcase-icon-color="secondary" />
|
||||
<x-menu-item label="Swimming" icon="pool" icon-class="md-ink-info" />
|
||||
<x-menu-item label="Rowing" icon="rowing" data-md-showcase-icon-color="tertiary" disabled />
|
||||
</x-menu>
|
||||
BLADE,
|
||||
];
|
||||
@endphp
|
||||
|
||||
<section id="menus" class="scroll-mt-24 space-y-6">
|
||||
<h2 class="type-headline-md">Menus</h2>
|
||||
<x-livewire-material::stack as="section" id="menus" gap="space300">
|
||||
<h2 class="md-type-headline-md">Menus</h2>
|
||||
|
||||
<p class="max-w-3xl type-body-md text-on-surface-variant">
|
||||
<p class="md-type-body-md md-ink-variant">
|
||||
<code><x-menu></code> with <code><x-menu-item></code>, <code><x-menu-group></code> and <code><x-menu-separator></code>.
|
||||
Open one with the keyboard too: arrows, Home, End, a letter, Escape. A <code>submenu</code> item opens a second list beside it
|
||||
— Right to enter it, Left to come back. A <code>sheet-at-compact</code> menu opens the same items in a bottom sheet
|
||||
@@ -152,4 +152,4 @@
|
||||
@foreach ($examples as $title => $code)
|
||||
<x-showcase::example :$title :$code />
|
||||
@endforeach
|
||||
</section>
|
||||
</x-livewire-material::stack>
|
||||
|
||||
Reference in New Issue
Block a user