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
+30 -20
View File
@@ -1,20 +1,37 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<html
lang="{{ str_replace('_', '-', app()->getLocale()) }}"
x-data="tallstackui_darkTheme({ default: 'system' })"
x-bind:class="{ 'dark': darkTheme }"
>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ $title ?? config('app.name') }}</title>
{{--
Apply the stored theme before the first paint. TallStackUI's
tallstackui_darkTheme() keeps it in localStorage ("dark-theme"),
but only runs once Alpine starts, which would flash the light theme.
--}}
<script>
(() => {
const stored = localStorage.getItem('dark-theme');
const dark = stored === 'dark' || stored === 'true'
|| ((stored === null || stored === 'system') && window.matchMedia('(prefers-color-scheme: dark)').matches);
document.documentElement.classList.toggle('dark', dark);
})();
</script>
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=inter:400,500,600&display=swap" rel="stylesheet" />
@vite(['resources/css/app.css', 'resources/js/app.js'])
@include('partials.tallstackui-script')
@livewireStyles
@fluxAppearance
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="min-h-screen bg-white antialiased dark:bg-zinc-800">
<body class="min-h-screen bg-white text-zinc-900 antialiased dark:bg-zinc-800 dark:text-zinc-100">
<a
href="#main-content"
class="sr-only focus:not-sr-only focus:fixed focus:start-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-white focus:px-4 focus:py-2 focus:text-zinc-900 focus:shadow-lg focus:outline-2 focus:outline-offset-2 focus:outline-blue-700"
@@ -25,32 +42,26 @@
@auth
<header class="border-b border-zinc-200 dark:border-zinc-700">
<div class="mx-auto flex max-w-5xl flex-wrap items-center gap-x-6 gap-y-2 px-4 py-3 sm:px-6">
<flux:link :href="route('home')" wire:navigate variant="subtle" class="font-semibold">
<a href="{{ route('home') }}" wire:navigate class="rounded font-semibold text-zinc-700 hover:text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:text-zinc-200 dark:hover:text-white">
{{ config('app.name') }}
</flux:link>
</a>
<flux:navbar :aria-label="__('layout.main_menu')" class="flex-1 py-0">
<flux:navbar.item :href="route('customers.index')" :current="request()->routeIs('customers.*')" wire:navigate>
{{ __('layout.customers') }}
</flux:navbar.item>
<nav aria-label="{{ __('layout.main_menu') }}" class="flex flex-1 flex-wrap items-center gap-1">
@include('partials.nav-item', ['route' => 'customers.index', 'pattern' => 'customers.*', 'label' => __('layout.customers')])
@can('users.manage')
<flux:navbar.item :href="route('users.index')" :current="request()->routeIs('users.*')" wire:navigate>
{{ __('layout.users') }}
</flux:navbar.item>
@include('partials.nav-item', ['route' => 'users.index', 'pattern' => 'users.*', 'label' => __('layout.users')])
@endcan
</flux:navbar>
</nav>
<div class="flex flex-wrap items-center gap-3">
<flux:text size="sm">{{ __('layout.signed_in_as', ['name' => auth()->user()->name]) }}</flux:text>
<span class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('layout.signed_in_as', ['name' => auth()->user()->name]) }}</span>
@include('partials.theme-toggle')
<form method="POST" action="{{ route('logout') }}">
@csrf
<flux:button type="submit" variant="ghost" size="sm" icon="arrow-right-start-on-rectangle">
{{ __('layout.logout') }}
</flux:button>
<x-button submit subtle color="black" sm icon="arrow-right-start-on-rectangle" :text="__('layout.logout')" />
</form>
</div>
</div>
@@ -66,6 +77,5 @@
</main>
@livewireScripts
@fluxScripts
</body>
</html>