diff --git a/docs/plans/livewire-material.md b/docs/plans/livewire-material.md index e4e8e6fa..6ba7d19a 100644 --- a/docs/plans/livewire-material.md +++ b/docs/plans/livewire-material.md @@ -578,6 +578,24 @@ pages and the mail theme by an agent in its own worktree. What changed from the (drift test green); README (install, CSS/JS wiring, scheme, theme, prefix, showcase, guard, Docker ordering note); tag `1.0.0`. +**Phase 10 is done (2026-09-13).** What changed from the step above: + +- **The package's own views write ``** for the components they use. Blade + spells a configured prefix `` (not ``, as the config first claimed), and + an unqualified `` inside a package view would have broken under a prefix and been + shadowed by an application's own `components/button.blade.php`. A test scans every package view + (outside comments and the showcase's example heredocs) for unqualified tags, and the showcase + rewrites its examples to the configured prefix. The component path string stays + `__DIR__.'/../resources/views/components'`: Blade names the view namespace after its hash, and + compiled views keep that name. +- **A test checks that every component appears in the showcase.** +- **Verified in a fresh Laravel 13.31 application** (`composer create-project`, the package from a + path repository, the README's CSS, JS and layout, `material:scheme "#4f46e5"`, `npm run build`): + a Livewire page with an app bar, tabs, a card, a form with validation, a date picker, a dialog and + a toast works without console errors; `/material` and the 404 page render in its scheme. +- **Known gap:** `` has no clear button (`` does); a date can be + emptied through its text input. + ### Phase 11 — SealShare 2.0.0 Tracked in SealShare's `docs/plans/livewire-material.md`, after `1.0.0`. diff --git a/resources/views/showcase/index.blade.php b/resources/views/showcase/index.blade.php index 1e000f8b..c4bea848 100644 --- a/resources/views/showcase/index.blade.php +++ b/resources/views/showcase/index.blade.php @@ -3,7 +3,7 @@ @section('content')

- Every token and component, in this application's own scheme. Components appear here as they land. + Every token and component, in this application's own scheme.

@include('livewire-material::showcase.sections.colour') diff --git a/resources/views/showcase/sections/communication.blade.php b/resources/views/showcase/sections/communication.blade.php index 513b2828..7ca8c330 100644 --- a/resources/views/showcase/sections/communication.blade.php +++ b/resources/views/showcase/sections/communication.blade.php @@ -15,6 +15,13 @@ BLADE, + 'Plain tooltips' => <<<'BLADE' + + + + holiday-photos.zip + + BLADE, 'Rich tooltips' => <<<'BLADE' @@ -59,7 +66,7 @@

<x-badge>, <x-toast> (the snackbar host, fed by the Toasts concern or materialToast()), - <x-rich-tooltip>, <x-alert>, <x-stat> and <x-empty-state>. + <x-tooltip>, <x-rich-tooltip>, <x-alert>, <x-stat> and <x-empty-state>.

@foreach ($examples as $title => $code) diff --git a/tests/Feature/ShowcaseTest.php b/tests/Feature/ShowcaseTest.php index d01d2cc3..0dc44a73 100644 --- a/tests/Feature/ShowcaseTest.php +++ b/tests/Feature/ShowcaseTest.php @@ -1,5 +1,6 @@ assertSee('border-radius: 9999px', false) ->assertSee('Unsubscribe'); }); + +it('shows every component somewhere in the showcase', function () { + $showcase = collect(File::allFiles(__DIR__.'/../../resources/views/showcase')) + ->map(fn (SplFileInfo $file): string => $file->getContents()) + ->implode("\n"); + + $absent = collect(File::files(__DIR__.'/../../resources/views/components')) + ->map(fn (SplFileInfo $file): string => $file->getBasename('.blade.php')) + ->reject(fn (string $name): bool => preg_match('/]/', $showcase) === 1) + ->values() + ->all(); + + expect($absent)->toBe([]); +});