From 9aab3fbe67b3f7da6a57fb4c9d86598c9cfd78e8 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Tue, 15 Sep 2026 04:45:38 +0200 Subject: [PATCH] Rewrite the showcase's Buttons section without Tailwind Plan step 38: every example moves onto the layout components and the md-* text classes. Wrapper divs that existed only to give an Alpine scope to a button group or a connected ("A connected group that owns its selection", "Square groups", "A choice as a connected group") become / carrying the x-data directly, which also gives them M3's full-width stretch in place of w-full. The loading indicator's two sized, tertiary-coloured variants and the FAB menu's bounded demo box move to data-md-showcase-* hooks in showcase.css; hint-class="text-warning" becomes hint-class="md-ink-warning", the exact example the header itself documents. No demo content removed; every id, aria-label and input[name] the Chromium ActionsTest selectors read (#buttons, showcase-theme, showcase-days, the "Tonal" tooltip, the progressbar, collapse-on-scroll, data-md-selection) is unchanged. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- resources/css/showcase.css | 30 +++++++++++++++++++ .../views/showcase/sections/buttons.blade.php | 30 +++++++++---------- 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/resources/css/showcase.css b/resources/css/showcase.css index 64752847..7c8fbff9 100644 --- a/resources/css/showcase.css +++ b/resources/css/showcase.css @@ -22,6 +22,15 @@ * the role it shows, so that one declaration is the caller's inline `style`, never a class), a * type-scale row, a shape swatch, an elevation tile, a motion track and its moving dot, an icon * search result and the Layout page's breakpoint cards. + * + * Batch 3 (the component sections) adds each section's own demo geometry: a sized loading + * indicator, a bounded box for the FAB menu, a narrow chip row that forces its own scroll + * affordance, a scrolling table wrapper, the legend above a checkbox grid, a bordered demo card, + * a small circular avatar and a compact search bar, and the two ink colours a menu item's `icon-class` + * needs beyond the fixed `md-ink-*` set. A handful of call sites (``, ``, + * ``) forward only `class` and `style` to the element that needs sizing, never a data + * attribute, so those few rules below are `.md-showcase-*` classes rather than + * `data-md-showcase-*` hooks — the same "caller's class" mechanism any application would reach for. */ @layer material.reset, material.tokens, material.base, material.layout, material.components, material.text, material.visibility; @@ -319,4 +328,25 @@ color: var(--md-sys-color-on-primary-container); } } + + /* Buttons: the loading indicator sized and coloured beyond its 48px primary default, and the + bounded box a FAB menu opens into (M3 anchors it to a scaffold's own corner; this is only + room enough to show the menu open). */ + [data-md-showcase-loading='lg'] { + width: 96px; + height: 96px; + color: var(--md-sys-color-tertiary); + } + + [data-md-showcase-loading='sm'] { + width: 32px; + height: 32px; + } + + [data-md-showcase-fab-menu-demo] { + display: flex; + align-items: flex-end; + justify-content: flex-end; + height: 288px; + } } diff --git a/resources/views/showcase/sections/buttons.blade.php b/resources/views/showcase/sections/buttons.blade.php index 84f77be6..86873160 100644 --- a/resources/views/showcase/sections/buttons.blade.php +++ b/resources/views/showcase/sections/buttons.blade.php @@ -60,8 +60,8 @@ 'Loading indicator' => <<<'BLADE' - - + + BLADE, 'Button groups: standard (press a button) and connected' => <<<'BLADE' @@ -77,7 +77,7 @@ BLADE, 'A connected group that owns its selection' => <<<'BLADE' -
+ @@ -90,11 +90,11 @@ -

+

View: · marks: . The shape follows at once; the colours come from each button's own :selected, which a Livewire render brings back.

-
+ BLADE, 'Square groups (hold a button down)' => <<<'BLADE' @@ -109,29 +109,29 @@ -
+ -
+ BLADE, 'A choice as a connected group' => <<<'BLADE' -
+ - -
+ BLADE, 'Split buttons' => <<<'BLADE' @@ -161,7 +161,7 @@ BLADE, 'FAB menu' => <<<'BLADE' -
+
@@ -172,14 +172,14 @@ ]; @endphp -
-

Buttons

+ +

Buttons

-

+

<x-button>: label buttons, icon buttons and toggles in M3 Expressive's five sizes.

@foreach ($examples as $title => $code) @endforeach -
+