{{-- An M3 card: content and actions about one subject. `variant` is M3's three (FilledCardTokens, ElevatedCardTokens, OutlinedCardTokens, androidx Compose Material 3, Apache-2.0): `filled` (surface-container-highest, the default), `elevated` (surface-container-low at elevation 1) and `outlined` (surface, an outline-variant edge); all with a medium corner. maryUI's props keep their meaning: `title`, `subtitle`, `separator` (a divider under the header), and the `menu` (top-end, beside the title), `figure` (full-bleed media on top) and `actions` (end-aligned, under the content) slots. A card that opens something is a row: give it `data-list-row` and one `data-list-open` control inside (the title link or a button), and a press anywhere on it reaches that control while its other buttons keep their own (resources/js/list-rows.js). It answers with a state layer and its corner opening a step. Never a stretched link, and never a whole-card `` around buttons. Do not pass a `bg-*` class to change its fill — it races the card's own in Tailwind's emit order; use `variant`, or colour a wrapper inside. --}} @props([ 'title' => null, 'subtitle' => null, 'variant' => 'filled', 'separator' => false, ]) @php $variant = in_array($variant, ['filled', 'elevated', 'outlined'], true) ? $variant : 'filled'; @endphp
class([ 'relative flex flex-col overflow-hidden rounded-corner-md text-on-surface', 'bg-surface-container-highest' => $variant === 'filled', 'bg-surface-container-low shadow-elevation-1' => $variant === 'elevated', 'border border-outline-variant bg-surface' => $variant === 'outlined', ]) }} > @isset($figure)
{{ $figure }}
@endisset
@if ($title || $subtitle || isset($menu))
@if ($title)

{{ $title }}

@endif @if ($subtitle)

{{ $subtitle }}

@endif
@isset($menu)
{{ $menu }}
@endisset
@if ($separator) @endif
@endif @if ($slot->isNotEmpty())
{{ $slot }}
@endif @isset($actions)
{{ $actions }}
@endisset