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:
@@ -69,43 +69,37 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<flux:heading size="xl" level="1">
|
||||
<h1 class="text-2xl font-semibold">
|
||||
{{ __($customerId === null ? 'customers.create_title' : 'customers.edit_title') }}
|
||||
</flux:heading>
|
||||
</h1>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<flux:input
|
||||
<x-input
|
||||
wire:model="form.name"
|
||||
:label="__('customers.fields.name')"
|
||||
autocomplete="organization"
|
||||
required
|
||||
/>
|
||||
|
||||
<flux:radio.group wire:model.live="form.type" :label="__('customers.fields.type')">
|
||||
@foreach (CustomerType::cases() as $customerType)
|
||||
<flux:radio
|
||||
wire:key="type-{{ $customerType->value }}"
|
||||
:value="$customerType->value"
|
||||
:label="__('customers.types.'.$customerType->value)"
|
||||
/>
|
||||
@endforeach
|
||||
</flux:radio.group>
|
||||
<x-radio.group
|
||||
wire:model.live="form.type"
|
||||
:label="__('customers.fields.type')"
|
||||
:options="collect(CustomerType::cases())->map(fn (CustomerType $type) => ['label' => __('customers.types.'.$type->value), 'value' => $type->value])->all()"
|
||||
/>
|
||||
|
||||
@if ($form->type === CustomerType::Company->value)
|
||||
<flux:input
|
||||
{{-- No inputmode="numeric": the iOS number pad has no hyphen for 1234567-8. --}}
|
||||
<x-input
|
||||
wire:model="form.business_id"
|
||||
:label="__('customers.fields.business_id')"
|
||||
:description="__('customers.fields.business_id_description')"
|
||||
inputmode="numeric"
|
||||
:hint="__('customers.fields.business_id_description')"
|
||||
autocomplete="off"
|
||||
/>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-wrap gap-3">
|
||||
<flux:button type="submit" variant="primary">{{ __('customers.save') }}</flux:button>
|
||||
<flux:button :href="route('customers.index')" wire:navigate variant="ghost">
|
||||
{{ __('customers.cancel') }}
|
||||
</flux:button>
|
||||
<x-button submit :text="__('customers.save')" />
|
||||
<x-button :href="route('customers.index')" wire:navigate subtle color="black" :text="__('customers.cancel')" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user