Let a segmented row answer, and inset a list's dividers
Plan step 19, containment.md C-08, C-21, C-22 and C-16. The segmented fill was declared unlayered, so it beat every state layer in @layer components and a segmented row lit up for nothing: it now sits in the layer, `:where()`d to weigh nothing, ahead of the state rules. Its tone is `surface`, which is ListTokens' ItemSegmentedContainerColor, and a keyboard-focused row morphs to the large corner like a pressed one. `<x-list dividers>` draws ListTokens' 16dp-inset rule instead of a full-bleed `divide-y`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Opus 5
parent
02d908c526
commit
dcd28707dd
@@ -1,9 +1,11 @@
|
||||
{{-- An M3 list: `<x-list-item>`s, one under another.
|
||||
|
||||
Plain by default — the items sit on the surface around them, with `dividers` between them if
|
||||
asked. `segmented` is M3 Expressive's list: each item its own surface-container tile, 2px
|
||||
apart, with small corners that open to large at the ends and while hovered, pressed or
|
||||
selected (ListTokens, androidx Compose Material 3, Apache-2.0).
|
||||
asked, inset 16px from both ends as ListTokens' `DividerLeadingSpace`/`DividerTrailingSpace`
|
||||
say (resources/css/components/list.css draws them). `segmented` is M3 Expressive's list: each
|
||||
item its own surface tile, 2px apart, with small corners that open to large at the ends and
|
||||
while hovered, pressed, focused or selected (ListTokens, androidx Compose Material 3,
|
||||
Apache-2.0).
|
||||
|
||||
A plain list is a `role="list"` of `listitem`s. `selectable` (or `selection="single"` /
|
||||
`selection="multi"`) makes it the list a person chooses from: M3 maps single- and
|
||||
@@ -38,11 +40,11 @@
|
||||
role="{{ $selection === null ? 'list' : 'listbox' }}"
|
||||
@if ($selection === 'multi') aria-multiselectable="true" @endif
|
||||
data-list="{{ $segmented ? 'segmented' : 'plain' }}"
|
||||
@if ($dividers && ! $segmented) data-dividers @endif
|
||||
@if ($label) aria-label="{{ $label }}" @endif
|
||||
{{ $attributes->class([
|
||||
'flex flex-col',
|
||||
'gap-0.5' => $segmented,
|
||||
'divide-y divide-outline-variant' => $dividers && ! $segmented,
|
||||
]) }}
|
||||
>
|
||||
{{ $slot }}
|
||||
|
||||
Reference in New Issue
Block a user