Give the UI an indigo look with cards, status badges and empty states

- Dark indigo header and tinted page background; the mobile main menu gets
  its own row, in the same order as the keyboard reaches it.
- Page titles with an icon chip (x-page-title, x-page, x-page-header) and
  card sections (x-panel, the card utility); x-table styled as a card with
  an indigo header row in AppServiceProvider::styleTables().
- Job and task statuses, late work, unapproved hours and stock states as
  badges with icon and text (x-status-badge, x-jobs.status,
  x-jobs.task-status), never colour alone.
- Empty lists as x-empty-state; dashboard quick link tiles, week hour bars
  and trend arrows; Kanban columns and task cards edged by status; calendar
  today column and bar accents; quick sale, reports and machine console
  restyled; signed-out pages show the app name.
- Focus rings use the primary colour in both themes (white in the header).
- Document the components in CLAUDE.md; test the status badges.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-29 10:53:10 +02:00
co-authored by Claude Opus 5.5
parent ef400054b0
commit 51b40b24fe
99 changed files with 702 additions and 388 deletions
@@ -114,7 +114,7 @@ new class extends Component
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
<div class="flex flex-wrap items-center justify-between gap-4">
<h1 class="text-2xl font-semibold">{{ __('catalog.title') }}</h1>
<x-page-title icon="squares-plus">{{ __('catalog.title') }}</x-page-title>
<x-button :href="route('catalog.service-units.create')" wire:navigate icon="plus" :text="__('catalog.actions.add_service_unit')" />
</div>
@@ -139,7 +139,7 @@ new class extends Component
<section
wire:key="service-unit-{{ $unit->id }}"
aria-labelledby="service-unit-{{ $unit->id }}-heading"
class="space-y-4 rounded-lg border border-zinc-200 p-4 dark:border-zinc-700"
class="card space-y-4"
>
<div class="flex flex-wrap items-center justify-between gap-3">
<h2 id="service-unit-{{ $unit->id }}-heading" class="text-xl font-semibold break-words">
@@ -121,7 +121,7 @@ new class extends Component
?>
<div class="mx-auto max-w-5xl space-y-8 p-4 sm:p-6">
<h1 class="text-2xl font-semibold">{{ __('catalog.prices.title') }}</h1>
<x-page-title icon="tag">{{ __('catalog.prices.title') }}</x-page-title>
<section aria-labelledby="consumer-products-heading" class="space-y-4">
<div class="space-y-1">
@@ -130,7 +130,7 @@ new class extends Component
</div>
@if ($this->consumerProducts === [])
<p class="text-sm">{{ __('catalog.products.none') }}</p>
<x-empty-state icon="tag">{{ __('catalog.products.none') }}</x-empty-state>
@else
<x-table :headers="$this->consumerHeaders()" :rows="$this->consumerProducts">
@interact('column_name', $product)
@@ -191,7 +191,7 @@ new class extends Component
<h2 id="other-products-heading" class="text-xl font-semibold">{{ __('catalog.price_list.other_products') }}</h2>
@if ($this->otherProducts === [])
<p class="text-sm">{{ __('catalog.products.none') }}</p>
<x-empty-state icon="tag">{{ __('catalog.products.none') }}</x-empty-state>
@else
<x-table :headers="$this->otherHeaders()" :rows="$this->otherProducts">
@interact('column_name', $product)
@@ -217,7 +217,7 @@ new class extends Component
@endif
</section>
<section aria-labelledby="mileage-heading" class="space-y-2">
<section aria-labelledby="mileage-heading" class="card space-y-2">
<h2 id="mileage-heading" class="text-xl font-semibold">{{ __('catalog.mileage.title') }}</h2>
<p>
{{ $this->mileageRateCents === null
@@ -346,7 +346,7 @@ new class extends Component
<div class="mx-auto max-w-5xl space-y-8 p-4 sm:p-6">
<div class="space-y-2">
<h1 class="text-2xl font-semibold">{{ __('catalog.prices.title') }}</h1>
<x-page-title icon="tag">{{ __('catalog.prices.title') }}</x-page-title>
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.prices.intro') }}</p>
</div>
@@ -405,7 +405,7 @@ new class extends Component
wire:change="saveRate({{ $row->workTypeId }}, $event.target.value)"
aria-label="{{ __('catalog.prices.rate_label', ['name' => ($row->serviceName !== null ? $row->serviceName.': ' : '').$row->name, 'unit' => $group->serviceUnitName]) }}"
@error('rates.'.$row->workTypeId) aria-invalid="true" aria-describedby="rate-{{ $row->workTypeId }}-error" @enderror
class="w-24 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
class="w-24 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
/>
@error('rates.'.$row->workTypeId)
<p id="rate-{{ $row->workTypeId }}-error" class="mt-1 text-xs text-red-700 dark:text-red-400">{{ $message }}</p>
@@ -427,7 +427,7 @@ new class extends Component
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.products.help') }}</p>
@if ($this->products === [])
<p class="text-sm">{{ __('catalog.products.none') }}</p>
<x-empty-state icon="tag">{{ __('catalog.products.none') }}</x-empty-state>
@else
<x-table :headers="$this->productHeaders()" :rows="$this->products">
@interact('column_name', $product)
@@ -522,7 +522,7 @@ new class extends Component
</x-table>
</section>
<section aria-labelledby="mileage-heading" class="space-y-4">
<section aria-labelledby="mileage-heading" class="card space-y-4">
<h2 id="mileage-heading" class="text-xl font-semibold">{{ __('catalog.expense_markup.section') }}</h2>
<form wire:submit="saveMileageRate" class="flex max-w-md flex-wrap items-end gap-3" novalidate>
@@ -552,7 +552,7 @@ new class extends Component
</form>
</section>
<section aria-labelledby="internal-cost-heading" class="space-y-4">
<section aria-labelledby="internal-cost-heading" class="card space-y-4">
<h2 id="internal-cost-heading" class="text-xl font-semibold">{{ __('catalog.internal_cost.section') }}</h2>
<form wire:submit="saveInternalHourlyCost" class="flex max-w-md flex-wrap items-end gap-3" novalidate>
@@ -179,9 +179,9 @@ new class extends Component
?>
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
<x-page-title icon="cube">{{ $this->heading() }}</x-page-title>
<form wire:submit="save" class="space-y-6" novalidate>
<form wire:submit="save" class="card space-y-6" novalidate>
<x-input wire:model="form.name" :label="__('catalog.fields.name')" autocomplete="off" required />
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
@@ -87,13 +87,13 @@ new class extends Component
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
<div class="space-y-1">
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
<x-page-title icon="rectangle-stack">{{ $this->heading() }}</x-page-title>
@if ($unitName !== '')
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.fields.service_unit') }}: {{ $unitName }}</p>
@endif
</div>
<form wire:submit="save" class="space-y-6" novalidate>
<form wire:submit="save" class="card space-y-6" novalidate>
<x-input wire:model="form.name" :label="__('catalog.fields.name')" autocomplete="off" required />
<div class="flex flex-wrap gap-3">
@@ -89,11 +89,11 @@ new class extends Component
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
<div class="space-y-1">
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
<x-page-title icon="building-office">{{ $this->heading() }}</x-page-title>
</div>
<form wire:submit="save" class="space-y-6" novalidate>
<form wire:submit="save" class="card space-y-6" novalidate>
<x-input wire:model="form.name" :label="__('catalog.fields.name')" autocomplete="off" required />
@unless ($isShared)
@@ -103,13 +103,13 @@ new class extends Component
?>
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
<x-page-title icon="receipt-percent">{{ $this->heading() }}</x-page-title>
@if ($vatRateId !== null)
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.vat_rates.change_help') }}</p>
@endif
<form wire:submit="save" class="space-y-6" novalidate>
<form wire:submit="save" class="card space-y-6" novalidate>
<x-input wire:model="name" :label="__('catalog.fields.name')" :hint="__('catalog.vat_rates.name_help')" autocomplete="off" required />
<x-input
@@ -106,13 +106,13 @@ new class extends Component
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
<div class="space-y-1">
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
<x-page-title icon="wrench-screwdriver">{{ $this->heading() }}</x-page-title>
@if ($unitName !== '')
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.fields.service_unit') }}: {{ $unitName }}</p>
@endif
</div>
<form wire:submit="save" class="space-y-6" novalidate>
<form wire:submit="save" class="card space-y-6" novalidate>
<x-input wire:model="form.name" :label="__('catalog.fields.name')" autocomplete="off" required />
@if ($this->services !== [])
@@ -311,7 +311,7 @@ new class extends Component
?>
<div class="mx-auto max-w-3xl space-y-6 p-4 sm:p-6">
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
<x-page-title icon="queue-list">{{ $this->heading() }}</x-page-title>
<form wire:submit="save" class="space-y-6" novalidate>
<x-input wire:model="form.name" :label="__('catalog.fields.name')" :hint="__('catalog.workflows.name_help')" autocomplete="off" required />
@@ -334,7 +334,7 @@ new class extends Component
@endforeach
</x-select.native>
<section aria-labelledby="steps-heading" class="space-y-4">
<section aria-labelledby="steps-heading" class="card space-y-4">
<div class="space-y-1">
<h2 id="steps-heading" class="text-xl font-semibold">{{ __('catalog.workflows.steps') }}</h2>
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.workflows.steps_help') }}</p>
@@ -350,7 +350,7 @@ new class extends Component
@foreach ($form->steps as $index => $step)
{{-- The index is part of the key: a moved step is rendered anew, so its fields bind to their new position. --}}
<li wire:key="step-{{ $step['key'] }}-{{ $index }}">
<fieldset class="space-y-4 rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-700 dark:bg-black">
<fieldset class="space-y-4 rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-700 dark:bg-zinc-900">
<legend class="px-1 font-medium">{{ __('catalog.workflows.step_legend', ['number' => $index + 1]) }}</legend>
<x-input
@@ -82,7 +82,7 @@ new class extends Component
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
<div class="flex flex-wrap items-center justify-between gap-4">
<h1 class="text-2xl font-semibold">{{ __('catalog.workflows.title') }}</h1>
<x-page-title icon="queue-list">{{ __('catalog.workflows.title') }}</x-page-title>
<x-button :href="route('catalog.workflow-templates.create')" wire:navigate icon="plus" :text="__('catalog.workflows.add')" />
</div>
@@ -138,7 +138,7 @@ new class extends Component
wire:click="toggleActive({{ $template->id }})"
@checked($template->isActive)
aria-label="{{ __('catalog.actions.active_named', ['name' => $template->name]) }}"
class="size-4 rounded border-zinc-400 text-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-500 dark:bg-zinc-800"
class="size-4 rounded border-zinc-400 text-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-500 dark:bg-zinc-800"
/>
<span aria-hidden="true">{{ __('catalog.actions.active') }}</span>
</label>
@@ -147,6 +147,6 @@ new class extends Component
</x-table>
</section>
@empty
<p>{{ __('catalog.workflows.none') }}</p>
<x-empty-state icon="tag">{{ __('catalog.workflows.none') }}</x-empty-state>
@endforelse
</div>