diff --git a/CLAUDE.md b/CLAUDE.md index 431f5dc..4c9a16b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -79,6 +79,88 @@ The site is **public by default**. Authentication is optional and unlocks additi @endauth ``` +## Form Component Standards + +**Raw HTML form elements are forbidden in Blade templates.** Every form control must use the corresponding Blade component so visual changes can be made in one place. + +### Available components + +| Element | Component | Notes | +|---|---|---| +| `` | `` | Accepts all input attributes; `type` prop defaults to `'text'` | +| `` + label | `` | Wraps input in a label — pass text in the slot | +| `` + label | `` | Wraps input in a label — pass text in the slot | +| ` - - + Remember me Sign in diff --git a/resources/views/components/button.blade.php b/resources/views/components/button.blade.php index 0ca62cb..dcae923 100644 --- a/resources/views/components/button.blade.php +++ b/resources/views/components/button.blade.php @@ -1,26 +1,63 @@ {{-- - Themed button with multiple visual variants. + Themed button with multiple visual variants and sizes. Props: - variant — 'primary' | 'secondary' | 'danger' | 'success' | 'ghost' (default: 'primary') + variant — 'primary' | 'secondary' | 'danger' | 'success' | 'ghost' + | 'link' | 'muted-link' + (default: 'primary') + size — 'sm' | 'md' | 'lg' (default: 'md') + Ignored by 'link' and 'muted-link' — those variants are + shape-less and inherit font size from context. type — button type attribute (default: 'button') Passes all other attributes through to the + Log out diff --git a/resources/views/livewire/hydro/flood-alerts.blade.php b/resources/views/livewire/hydro/flood-alerts.blade.php index 52a7283..bde0265 100644 --- a/resources/views/livewire/hydro/flood-alerts.blade.php +++ b/resources/views/livewire/hydro/flood-alerts.blade.php @@ -30,18 +30,12 @@ {{-- State selector for the map panel --}}
- - +
@@ -60,13 +54,9 @@ class="w-full rounded-lg border border-border bg-surface px-3 py-2 text-sm text- {{-- Detail panel --}}
- +
@@ -167,23 +157,23 @@ class="mt-0.5 inline-block shrink-0 rounded-full px-2 py-0.5 text-xs font-semibo {{-- Pagination --}} @if ($totalPages > 1)
- + {{ $listPage }} / {{ $totalPages }} ({{ $totalAlerts }} alerts) - +
@else

{{ $totalAlerts }} alert{{ $totalAlerts !== 1 ? 's' : '' }} nationally

@@ -214,13 +204,13 @@ class="mt-0.5 inline-block shrink-0 rounded-full px-2 py-0.5 text-xs font-semibo {{ count($mapAlerts ?? []) }} alert{{ count($mapAlerts ?? []) !== 1 ? 's' : '' }} in {{ \App\Livewire\Hydro\FloodAlerts::US_STATES[$stateCd] ?? strtoupper($stateCd) }} - +
diff --git a/resources/views/livewire/hydro/stream-gauge.blade.php b/resources/views/livewire/hydro/stream-gauge.blade.php index 6466813..b663a8e 100644 --- a/resources/views/livewire/hydro/stream-gauge.blade.php +++ b/resources/views/livewire/hydro/stream-gauge.blade.php @@ -23,18 +23,12 @@
- - +
@@ -62,13 +56,13 @@ class="w-full rounded-lg border border-border bg-surface px-3 py-2 text-sm text- @if ($sites !== null)
{{ count($sites) }} active sites - +
@endif @@ -144,30 +138,18 @@ class="cursor-pointer border-b border-border/50 transition-colors hover:bg-surfa
@auth @if (in_array($selectedSiteCode, $savedSiteCodes, true)) - + @else - + @endif @endauth - +
diff --git a/resources/views/livewire/pages/volcano-watch.blade.php b/resources/views/livewire/pages/volcano-watch.blade.php index 1343b63..6260ff1 100644 --- a/resources/views/livewire/pages/volcano-watch.blade.php +++ b/resources/views/livewire/pages/volcano-watch.blade.php @@ -67,37 +67,25 @@ class="mx-auto max-w-xs" {{-- Region filter --}}
- - +
{{-- Alert level filter --}}
- - +
@@ -137,16 +125,16 @@ class="w-full rounded-lg border border-border bg-surface px-4 py-2.5 text-text f — filtered @endif

- +
{{-- No results --}}