Replace Flux UI with TallStackUI 4

Rewrite the layout and all Customers and Users pages with TallStackUI
components and remove livewire/flux and its Boost skill.

Fix the TallStackUI accessibility gaps found by the axe tests:
- password reveal and theme switch have no accessible name: add
  <x-password-field> and keep the own theme toggle button
- select.native label is not tied to the control: add aria-label
- contrast: darker primary palette, soft-customized error colours and
  published alert/link colour classes; neutral buttons use subtle black
- follow the system theme by default (localStorage key dark-theme)

Load TallStackUI assets from the app URL so they work in the XAMPP
subfolder, add Finnish TallStackUI strings, and drop inputmode=numeric
from the business ID field so iOS keyboards show the hyphen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-22 12:22:03 +02:00
co-authored by Claude Opus 5.5
parent 7b6a909677
commit 90d6f5bd66
35 changed files with 1054 additions and 448 deletions
@@ -0,0 +1,15 @@
{{-- Main menu link. The current page is marked with aria-current and an underline, not colour alone. --}}
@php($current = request()->routeIs($pattern))
<a
href="{{ route($route) }}"
wire:navigate
@if ($current) aria-current="page" @endif
@class([
'rounded-md px-3 py-2 text-sm font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700',
'text-zinc-900 underline decoration-2 underline-offset-8 dark:text-white' => $current,
'text-zinc-600 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-700 dark:hover:text-white' => ! $current,
])
>
{{ $label }}
</a>
@@ -0,0 +1,11 @@
{{--
TallStackUI's <tallstackui:script /> writes root-relative URLs
("/tallstackui/script/..."), which 404 when the app runs in a subfolder,
as it does locally under XAMPP (/toiminnanohjaus/public). Prefix them with
the app's own URL so the assets load in both setups.
--}}
{!! str_replace(
['"/tallstackui/script/', '"/tallstackui/style/'],
['"'.url('tallstackui/script').'/', '"'.url('tallstackui/style').'/'],
\TallStackUi\Facades\TallStackUi::directives()->script(),
) !!}
+14 -12
View File
@@ -1,19 +1,21 @@
{{--
Light/dark theme toggle. Flux stores the choice in localStorage
("flux.appearance") and @fluxAppearance applies it before the page paints.
Light/dark theme toggle. It drives the tallstackui_darkTheme() state on
<html>, which stores the choice in localStorage ("dark-theme"); the
inline script in the layout applies it before the first paint.
Not <x-theme-switch />: its role="switch" button has no accessible name.
The name stays "Tumma teema"; aria-pressed tells whether it is on.
--}}
<flux:button
x-data
x-on:click="$flux.dark = ! $flux.dark"
x-bind:aria-pressed="$flux.dark ? 'true' : 'false'"
<x-button.circle
x-on:click="mode = darkTheme ? 'light' : 'dark'"
x-bind:aria-pressed="darkTheme ? 'true' : 'false'"
aria-label="{{ __('layout.theme_toggle') }}"
:tooltip="__('layout.theme_toggle')"
variant="ghost"
size="sm"
square
color="black"
subtle
sm
data-theme-toggle
>
<flux:icon.moon variant="mini" class="dark:hidden" aria-hidden="true" />
<flux:icon.sun variant="mini" class="hidden dark:block" aria-hidden="true" />
</flux:button>
<x-icon name="moon" class="size-5 dark:hidden" aria-hidden="true" />
<x-icon name="sun" class="hidden size-5 dark:block" aria-hidden="true" />
</x-button.circle>