0.9.1-alpha.53
Alpha@xaui/native@0.9.1-alpha.53
Patch Changes
-
cb76b65:
List— rows on a ground.List.ItemandList.ItemButtonwithItemPrefix,ItemContent,ItemTitle,ItemDescriptionandItemSuffix, on the anatomy the reference implementation'sListGroupuses.It is the
Accordionwith rows that do not open, and it reads the same ladder, insets its separators the same way and lifts the same one variant. Two containers that look alike but are declared apart drift until a list on a card sits one shade off it; they will eventually share the container thatCard,Popover,AccordionandDialogare all waiting on, and until then they at least name the same tokens.The separators are the root's, drawn between the children rather than by them — a row that drew its own would draw one under the last one too, and every list would start by hiding it. The fill is the root's for the same reason: a row painting its own would stack two where the hairline sits, and the hairline would vanish into the seam. The inset stops where the text starts, and
ghost, having no edge to be inset from, runs its rows and its hairlines the full width.It does not select. No
selectionMode, noselectedKeys: picking one of several things is whatSelectandMenuare, and a list that owned a selection would be a second, quieter menu with none of the affordances. A row that toggles carries the control that toggles it — aSwitchin its suffix — which says out loud what it does and is reachable as the control it actually is.ItemSuffixdraws nothing of its own. The reference implementation's puts a chevron there by default; the trailing end of a settings row is a switch at least as often, and a slot that guesses makes you pass a child in order to render nothing.A plain row does nothing, and shows nothing. A list is not necessarily a list of buttons; most are a table of facts, and a row that lights up under a finger it never responds to is a promise the component does not keep. So
List.Itemis aView— no press state, no wash, no role — and a row you can press isList.ItemButton, used in its place. Structural rather than inferred: a single item that turned pressable when handed anonPresswould still be guessing, and the guess would be invisible in the JSX.