Files
livewire-material/resources/views/components/stat.blade.php
T
Andreas ReinholdandClaude Opus 5 429be9b64f Fill the FAB and icon-button glyphs, and cut small ones at 20
M3 asks a FAB's icon and a default (non-toggle) icon button's icon to be filled,
never outlined; the toggle half of that rule was already right, so only the
`$selected === null` case changed. Every glyph these components draw at 20px now
passes `optical="20"` for the cut M3 draws at that size — button xs/sm, group,
menu item, the alert, snackbar and FAB-menu close buttons, the stat's icon.
Plan step 18, actions.md ACT-14, ACT-15.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
2026-09-14 06:01:55 +02:00

35 lines
1.3 KiB
PHP

{{-- A figure and what it counts: "1,204 · Shares", "3.2 GB · Stored".
Not an M3 component; drawn in M3's terms — a panel in surface-container that separates from
the page by tone, a label-large `title`, the `value` as the card's hero in an emphasized
headline with tabular figures, and a body-small `description`. The value counts up once on
first appearance and again when it changes (`x-figure`), and rests under reduced motion.
`icon` sits beside the title. The slot, if any, goes under the description a progress bar
for a quota. --}}
@props([
'title' => null,
'value' => null,
'description' => null,
'icon' => null,
])
<div {{ $attributes->class('flex flex-col gap-1 rounded-corner-lg bg-surface-container p-4') }}>
<div class="flex items-center gap-2 type-label-lg text-on-surface-variant">
@if ($icon)
<x-livewire-material::icon :name="$icon" optical="20" class="size-5" />
@endif
<span>{{ $title }}</span>
</div>
<p class="type-emphasized-headline-md tabular-nums" x-data x-figure>{{ $value }}</p>
@if ($description)
<p class="type-body-sm text-on-surface-variant">{{ $description }}</p>
@endif
@if ($slot->isNotEmpty())
<div class="pt-2">{{ $slot }}</div>
@endif
</div>