@kirana-ui/solid 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/dom/accordion.js +9 -6
  2. package/dom/agent.js +3 -0
  3. package/dom/autosize.js +1 -1
  4. package/dom/avatar.js +3 -3
  5. package/dom/button.js +1 -1
  6. package/dom/calendar.js +12 -8
  7. package/dom/carousel.js +6 -6
  8. package/dom/checkbox.js +3 -3
  9. package/dom/collapsible.js +3 -3
  10. package/dom/combobox.js +19 -11
  11. package/dom/command.js +8 -8
  12. package/dom/date-field.js +7 -3
  13. package/dom/date-picker.js +2 -2
  14. package/dom/dialog.js +5 -2
  15. package/dom/field.js +3 -3
  16. package/dom/fieldset.js +2 -2
  17. package/dom/form.js +1 -1
  18. package/dom/hover-popup.js +3 -3
  19. package/dom/input.js +1 -1
  20. package/dom/label.js +1 -1
  21. package/dom/listbox.js +5 -5
  22. package/dom/menu.js +11 -11
  23. package/dom/menubar.js +1 -1
  24. package/dom/message-scroller.js +4 -4
  25. package/dom/navigation-menu.js +18 -21
  26. package/dom/number-field.js +3 -3
  27. package/dom/otp.js +4 -4
  28. package/dom/pagination.js +3 -3
  29. package/dom/popover.js +20 -7
  30. package/dom/qr-code.js +3 -3
  31. package/dom/radio-group.js +4 -4
  32. package/dom/resizable.js +3 -3
  33. package/dom/runtime.js +23 -7
  34. package/dom/scroll-area.js +5 -5
  35. package/dom/select.js +25 -13
  36. package/dom/separator.js +1 -1
  37. package/dom/slider.js +10 -7
  38. package/dom/switch.js +3 -3
  39. package/dom/tabs.js +5 -5
  40. package/dom/testing.js +3 -0
  41. package/dom/toast.js +57 -20
  42. package/dom/toggle-group.js +1 -1
  43. package/dom/toggle.js +1 -1
  44. package/dom/toolbar.js +4 -4
  45. package/dom/value-bar.js +3 -3
  46. package/llms.txt +1588 -224
  47. package/package.json +18 -2
  48. package/server/accordion.js +9 -6
  49. package/server/agent.js +3 -0
  50. package/server/autosize.js +1 -1
  51. package/server/avatar.js +3 -3
  52. package/server/button.js +1 -1
  53. package/server/calendar.js +12 -8
  54. package/server/carousel.js +6 -6
  55. package/server/checkbox.js +3 -3
  56. package/server/collapsible.js +3 -3
  57. package/server/combobox.js +19 -11
  58. package/server/command.js +8 -8
  59. package/server/date-field.js +7 -3
  60. package/server/date-picker.js +2 -2
  61. package/server/dialog.js +5 -2
  62. package/server/field.js +3 -3
  63. package/server/fieldset.js +2 -2
  64. package/server/form.js +1 -1
  65. package/server/hover-popup.js +3 -3
  66. package/server/input.js +1 -1
  67. package/server/label.js +1 -1
  68. package/server/listbox.js +5 -5
  69. package/server/menu.js +11 -11
  70. package/server/menubar.js +1 -1
  71. package/server/message-scroller.js +4 -4
  72. package/server/navigation-menu.js +18 -15
  73. package/server/number-field.js +3 -3
  74. package/server/otp.js +4 -4
  75. package/server/pagination.js +3 -3
  76. package/server/popover.js +20 -7
  77. package/server/qr-code.js +3 -3
  78. package/server/radio-group.js +4 -4
  79. package/server/resizable.js +3 -3
  80. package/server/runtime.js +23 -7
  81. package/server/scroll-area.js +5 -5
  82. package/server/select.js +25 -13
  83. package/server/separator.js +1 -1
  84. package/server/slider.js +10 -7
  85. package/server/switch.js +3 -3
  86. package/server/tabs.js +5 -5
  87. package/server/testing.js +3 -0
  88. package/server/toast.js +57 -20
  89. package/server/toggle-group.js +1 -1
  90. package/server/toggle.js +1 -1
  91. package/server/toolbar.js +4 -4
  92. package/server/value-bar.js +3 -3
  93. package/skills/kirana-ui-primitives/SKILL.md +142 -0
  94. package/src/accordion.jsx +10 -7
  95. package/src/agent.js +3 -0
  96. package/src/autosize.jsx +1 -1
  97. package/src/avatar.jsx +3 -3
  98. package/src/button.jsx +1 -1
  99. package/src/calendar.jsx +12 -8
  100. package/src/carousel.jsx +6 -6
  101. package/src/checkbox.jsx +3 -3
  102. package/src/collapsible.jsx +3 -3
  103. package/src/combobox.jsx +20 -12
  104. package/src/command.jsx +8 -8
  105. package/src/date-field.jsx +7 -3
  106. package/src/date-picker.jsx +2 -2
  107. package/src/dialog.jsx +8 -2
  108. package/src/field.jsx +3 -3
  109. package/src/fieldset.jsx +2 -2
  110. package/src/form.jsx +1 -1
  111. package/src/hover-popup.jsx +3 -3
  112. package/src/input.jsx +1 -1
  113. package/src/label.jsx +1 -1
  114. package/src/listbox.jsx +6 -6
  115. package/src/menu.jsx +11 -11
  116. package/src/menubar.jsx +1 -1
  117. package/src/message-scroller.jsx +4 -4
  118. package/src/navigation-menu.jsx +14 -13
  119. package/src/number-field.jsx +3 -3
  120. package/src/otp.jsx +4 -4
  121. package/src/pagination.jsx +3 -3
  122. package/src/popover.jsx +20 -4
  123. package/src/qr-code.jsx +3 -3
  124. package/src/radio-group.jsx +5 -5
  125. package/src/resizable.jsx +3 -3
  126. package/src/runtime.jsx +21 -7
  127. package/src/scroll-area.jsx +5 -5
  128. package/src/select.jsx +28 -14
  129. package/src/separator.jsx +1 -1
  130. package/src/slider.jsx +11 -8
  131. package/src/switch.jsx +3 -3
  132. package/src/tabs.jsx +6 -6
  133. package/src/testing.js +3 -0
  134. package/src/toast.jsx +38 -10
  135. package/src/toggle-group.jsx +2 -2
  136. package/src/toggle.jsx +1 -1
  137. package/src/toolbar.jsx +4 -4
  138. package/src/value-bar.jsx +3 -3
  139. package/types/accordion.d.ts +21 -19
  140. package/types/agent.d.ts +1 -0
  141. package/types/alert-dialog.d.ts +1 -0
  142. package/types/autocomplete.d.ts +1 -0
  143. package/types/autosize.d.ts +4 -1
  144. package/types/avatar.d.ts +12 -5
  145. package/types/button.d.ts +4 -2
  146. package/types/calendar.d.ts +35 -18
  147. package/types/carousel.d.ts +18 -10
  148. package/types/checkbox.d.ts +9 -6
  149. package/types/collapsible.d.ts +11 -7
  150. package/types/combobox.d.ts +61 -62
  151. package/types/command.d.ts +27 -17
  152. package/types/context-menu.d.ts +1 -0
  153. package/types/date-field.d.ts +20 -9
  154. package/types/date-picker.d.ts +25 -34
  155. package/types/dialog.d.ts +42 -31
  156. package/types/direction.d.ts +1 -0
  157. package/types/drawer.d.ts +1 -0
  158. package/types/field.d.ts +19 -11
  159. package/types/fieldset.d.ts +8 -3
  160. package/types/form.d.ts +5 -2
  161. package/types/hover-card.d.ts +16 -10
  162. package/types/hover-popup.d.ts +23 -13
  163. package/types/index.d.ts +12 -1
  164. package/types/input.d.ts +4 -3
  165. package/types/label.d.ts +4 -1
  166. package/types/listbox.d.ts +18 -20
  167. package/types/menu.d.ts +56 -42
  168. package/types/menubar.d.ts +6 -4
  169. package/types/message-scroller.d.ts +12 -6
  170. package/types/meter.d.ts +16 -7
  171. package/types/navigation-menu.d.ts +35 -29
  172. package/types/number-field.d.ts +13 -6
  173. package/types/otp.d.ts +17 -10
  174. package/types/pagination.d.ts +18 -10
  175. package/types/popover.d.ts +37 -12
  176. package/types/progress.d.ts +16 -7
  177. package/types/qr-code.d.ts +10 -4
  178. package/types/radio-group.d.ts +15 -17
  179. package/types/resizable.d.ts +12 -7
  180. package/types/runtime.d.ts +36 -12
  181. package/types/scroll-area.d.ts +17 -9
  182. package/types/select.d.ts +55 -46
  183. package/types/separator.d.ts +5 -3
  184. package/types/slider.d.ts +25 -13
  185. package/types/switch.d.ts +7 -4
  186. package/types/tabs.d.ts +20 -16
  187. package/types/testing.d.ts +1 -0
  188. package/types/toast.d.ts +40 -16
  189. package/types/toggle-group.d.ts +6 -11
  190. package/types/toggle.d.ts +4 -3
  191. package/types/toolbar.d.ts +19 -14
  192. package/types/tooltip.d.ts +16 -10
  193. package/types/value-bar.d.ts +21 -10
package/llms.txt CHANGED
@@ -2,23 +2,318 @@
2
2
 
3
3
  > Kirana UI Primitives for Solid: headless, accessible components with no styles of their own. The same components, parts, attributes and behaviour as on the other four frameworks, from one core.
4
4
 
5
- Generated from the library's own definitions (`bun scripts/llms.ts`): what is here is what the components do.
5
+ Generated from the library's own source (`bun scripts/llms.ts`), and checked against it: every part and every prop here is in the package, and what is not here is not. In order: installing it and its entries; the positioner's options; the types the props name; what else is exported; the agent bridge; the testing kit; then "Using it" (the rules of every component) and "Components" (each one's parts, props, attributes and CSS variables).
6
+
7
+ ## Install and entries
8
+
9
+ Install `@kirana-ui/solid`. It is enough: the core it is built on comes with it, and what the core gives an application is also an entry of this package (`@kirana-ui/solid/agent`, `@kirana-ui/solid/testing`), so nothing is imported from a package the project did not install.
10
+
11
+ Its entries: an entry per component (`@kirana-ui/solid/tabs`, 48 of them, each named under its component below), the package root `@kirana-ui/solid` (every component at once, for a bundler that shakes trees), and `@kirana-ui/solid/runtime`, `@kirana-ui/solid/agent`, `@kirana-ui/solid/testing` and `@kirana-ui/solid/direction`. No other path is an entry: `DirectionProvider` and `useDirection` are in `@kirana-ui/solid/direction`, `PortalProvider` in the package root.
12
+
13
+ The attributes and CSS variables below are also data and typed selectors, for a design system: install `@kirana-ui/vocabulary` for them (`import { vocabulary } from "@kirana-ui/vocabulary"`, `import { Dialog } from "@kirana-ui/vocabulary/keys"`: `Dialog.Popup.open` is `"[data-open]"`). It is its own package, and not installed with this one.
14
+
15
+ An agent's skill is in the package: `node_modules/@kirana-ui/solid/skills/kirana-ui-primitives/SKILL.md`.
16
+
17
+ ## Positioner options
18
+
19
+ What every `Positioner` takes, beside its own props where a component's section lists any:
20
+
21
+ - `side?: Side`: The side of the anchor the popup is on. `inline-start` and `inline-end` follow the reading direction the popup is placed in, and `data-side` then says the side in the same words. Default `"bottom"`.
22
+ - `align?: Align`: Where along that side the popup is: at the anchor's start, its centre or its end. Default `"center"`.
23
+ - `sideOffset?: number`: The gap between the anchor and the popup, measured without any arrow. Default `0`.
24
+ - `alignOffset?: number`: How far the popup is moved along the side from where `align` puts it, in pixels. Default `0`.
25
+ - `collisionPadding?: number`: Kept between the popup and the viewport's edges. Default `5`.
26
+ - `anchor?: Anchor | (() => Anchor | null | undefined) | null`: What the popup is placed against, when that is not its trigger: an element, a place in the viewport (an object with `getBoundingClientRect`), or a function that gives one (a signal's accessor, or `() => element` for a variable a `ref` fills). It may change while the popup is open: the popup follows.
27
+
28
+ A component's own defaults lie over those: `Autocomplete` `{ align: "start" }`; `Combobox` `{ align: "start" }`; `ContextMenu` `{ align: "start" }`, and `{ side: "inline-end", align: "start" }` for a submenu or for a menu in a vertical menubar; `HoverCard` `{ side: "top" }`; `Menu` `{ align: "start" }`, and `{ side: "inline-end", align: "start" }` for a submenu or for a menu in a vertical menubar; `NavigationMenu` `{ align: "start" }`; `Select` `{ align: "start" }`; `Tooltip` `{ side: "top" }`.
29
+
30
+ ## Types
31
+
32
+ The named types the props below mention, each with the entry of this package it is imported from: `import type { ChangeDetails, Side } from "@kirana-ui/solid"`. The core's own types are re-exported there, as types only, so nothing is imported from `@kirana-ui/core`, which a strict installer keeps out of a project's reach. A capital alone (`Value`) in a part's props is that part's own type parameter, said on the part's line.
33
+
34
+ - `Align` (`@kirana-ui/solid`): `"start" | "center" | "end"`. Where along its side a popup is: at the anchor's start, its centre or its end.
35
+ - `Anchor` (`@kirana-ui/solid`): `Element | VirtualElement`. What a popup is placed against: an element, or a place in the viewport that is none.
36
+ - `CalendarDay` (`@kirana-ui/solid`): A day in the grid of the month shown.
37
+ - `date: IsoDate`
38
+ - `label: string`: The day of the month as the locale writes it.
39
+ - `outside: boolean`: Not of the month shown: the days that fill its first and last weeks.
40
+ - `CalendarValue` (`@kirana-ui/solid`): `IsoDate | DateRange | null`. What a calendar holds: a day, a range of days in `mode: "range"`, or `null` for none.
41
+ - `CalendarWeekday` (`@kirana-ui/solid`): A day of the week, as a column's heading names it.
42
+ - `index: number`: Its place in the week as the locale orders it, from 0.
43
+ - `narrow: string`: Its name as a column's heading (`"M"`, `"Mo"`), and in full (`"Monday"`).
44
+ - `short: string`
45
+ - `long: string`
46
+ - `ChangeDetails` (`@kirana-ui/solid`): What a change callback is given beside the value: why it changed, what made it, and a way to refuse it.
47
+ - `reason: string`: Why the value changed: `"trigger-press"`, `"outside-press"`, `"escape-key"`, `"item-press"` …
48
+ - `event: Event | undefined`: The DOM event behind it, when there is one.
49
+ - `source: ChangeSource`: What made it: a mouse, a finger, a pen, the keyboard, something that presses without a pointer (a screen reader, `element.click()`), code with no event at all, or an agent acting through the bridge (`@kirana-ui/core/agent`).
50
+ - `cancel(): void`: Keeps the value as it was.
51
+ - `canceled: boolean`
52
+ - `ChangeSource` (`@kirana-ui/solid`): `"mouse" | "touch" | "pen" | "keyboard" | "virtual" | "programmatic" | "agent"`. What made a change: a kind of pointer, the keyboard, a press with no pointer (`virtual`), code with no event (`programmatic`), or an agent acting through the bridge.
53
+ - `DateFieldSegment` (`@kirana-ui/solid`): One piece of the field, in the locale's order: a part that is typed, or what stands between.
54
+ - `type: DateUnit | "literal"`
55
+ - `literal: string`: What stands between two parts (`"/"`); empty for a part that is typed.
56
+ - `index: number`: Its place among the pieces.
57
+ - `DateRange` (`@kirana-ui/solid`): A range of days, its first and its last, both in it.
58
+ - `start: IsoDate`
59
+ - `end: IsoDate`
60
+ - `DateUnit` (`@kirana-ui/solid`): `"day" | "month" | "year"`. A part of a date that is typed on its own.
61
+ - `DrawerSide` (`@kirana-ui/solid`): `"up" | "down" | "left" | "right"`. The way a drawer is swiped to close it: towards the edge it came from.
62
+ - `DrawerSnapPoint` (`@kirana-ui/solid`): `number | string`. How much of a drawer shows at a place it rests: a share of it, or a length.
63
+ - `FieldValidity` (`@kirana-ui/solid`): What a field knows of its control's value once it has been checked.
64
+ - `valid: boolean | null`: `null` until the value has been checked.
65
+ - `errors: readonly string[]`: What is wrong, one message each.
66
+ - `state: Readonly<Record<ValidityKey, boolean>>`: What the browser found, by name; `customError` is the field's own `validate`.
67
+ - `value: string`: The value that was checked.
68
+ - `FormErrors` (`@kirana-ui/solid`): `Record<string, string | readonly string[]>`. A form's errors as a server sends them: each field's name with its message, or messages.
69
+ - `FormValues` (`@kirana-ui/solid`): `Record<string, FormDataEntryValue | FormDataEntryValue[]>`. A form's values by field name, as `FormData` holds them: a list where a name is there more than once.
70
+ - `IsoDate` (`@kirana-ui/solid`): `string`. A day as `YYYY-MM-DD`, in the calendar the world's data is kept in (ISO 8601).
71
+ - `ListCollection` (`@kirana-ui/solid`): Every row of a list of which only some are in the page: a virtualizer draws the ones in view. The keys then move by place, and ask for a row that is not drawn to be brought into the page.
72
+ - `count: number`: How many rows there are, drawn or not.
73
+ - `label?(index: number): string`: A row's name by its place: what typing matches. Without it, typing finds nothing.
74
+ - `disabled?(index: number): boolean`
75
+ - `indexOf?(value: unknown): number`: The place of a value, or -1: where a list opens on what is chosen.
76
+ - `scrollToIndex(index: number): void`: Brings a row into the page: the virtualizer's own scroll.
77
+ - `Orientation` (`@kirana-ui/solid`): `"horizontal" | "vertical"`. The way a row of things is laid out, and so which arrow keys move along it.
78
+ - `PaginationEntry` (`@kirana-ui/solid`): `{ readonly type: "page"; readonly page: number; readonly key: string } | { readonly type: "ellipsis"; readonly key: "start" | "end" }`. One piece of the list of pages: a page, or the mark for pages left out.
79
+ - `PhysicalSide` (`@kirana-ui/solid`): `"top" | "right" | "bottom" | "left"`. A side of the anchor as the page is drawn.
80
+ - `QrCorrection` (`@kirana-ui/solid`): `"L" | "M" | "Q" | "H"`. How much of the symbol may be lost and still be read: about 7, 15, 25 and 30 in a hundred.
81
+ - `ReadonlySignal<T>` (`@kirana-ui/solid`): A value that is read, and that tells when it changes.
82
+ - `get(): T`: The value, tracked by the computed or effect that reads it.
83
+ - `peek(): T`: The value, untracked.
84
+ - `subscribe(listener: () => void): () => void`: Calls `listener` after each change (not at once). Returns the unsubscribe.
85
+ - `Side` (`@kirana-ui/solid`): `PhysicalSide | "inline-start" | "inline-end"`. The side of its anchor a popup is on. `inline-start` and `inline-end` turn with the reading direction: `inline-end` is the right in English and the left in Arabic.
86
+ - `SliderChangeDetails` (`@kirana-ui/solid`): A slider's change details: the details of any change, and which thumb moved.
87
+ - `index: number`: The thumb that moved.
88
+ - `reason: string`: Why the value changed: `"trigger-press"`, `"outside-press"`, `"escape-key"`, `"item-press"` …
89
+ - `event: Event | undefined`: The DOM event behind it, when there is one.
90
+ - `source: ChangeSource`: What made it: a mouse, a finger, a pen, the keyboard, something that presses without a pointer (a screen reader, `element.click()`), code with no event at all, or an agent acting through the bridge (`@kirana-ui/core/agent`).
91
+ - `cancel(): void`: Keeps the value as it was.
92
+ - `canceled: boolean`
93
+ - `SliderTold<Value extends SliderValue = SliderValue>` (`@kirana-ui/solid`): `Value extends number ? number : number[]`. What a slider tells of a value it was given as `Value`: a number for one thumb, a list for a range, and either where the caller's own type says either.
94
+ - `ToastActionOptions<Content = string>` (`@kirana-ui/solid`): A button a toast offers: what it says, and what pressing it does.
95
+ - `label: Content`: What the button says: `Toast.Action` draws it when it is given nothing else. Needed.
96
+ - `onAction(details: ChangeDetails): void`: Heard when the button is pressed, before the toast closes with the reason `"action-press"`: `details.cancel()` keeps the toast open. Needed.
97
+ - `Toaster<Content = JSX.Element>` (`@kirana-ui/solid`): The toasts of a page and what changes them: what `createToaster()` gives.
98
+ - `toasts: ReadonlySignal<readonly ToastRecord<Content>[]>`: Every toast that is in the page, the newest first. Empty to begin with.
99
+ - `limit: number`: How many are shown at once; the rest wait behind. Default: `3`.
100
+ - `add(options: ToastOptions<Content> & { id?: string }): string`: Shows a toast, and gives the id it is known by: `id` when one is given (the same id again is the same toast, changed), `toast-1`, `toast-2` … otherwise.
101
+ - `update(id: string, options: ToastOptions<Content>): void`: Changes one that is showing: what is given replaces what it had, the rest stays, and its time starts again.
102
+ - `dismiss(id?: string, details?: ChangeDetails): void`: Closes one, or every one when no id is given: it leaves once its motion has ended. `details` is what `onClose` hears. Default: the reason `"dismiss"`.
103
+ - `remove(id: string): void`: Takes one out at once, with no exit: what draws the toasts calls it when the motion has ended.
104
+ - `promise<Value>( promise: Promise<Value>, states: { loading: ToastState<Content> success: ToastState<Content> | ((value: Value) => ToastState<Content>) error: ToastState<Content> | ((error: unknown) => ToastState<Content>) } ): Promise<Value>`: One toast for something that takes time: `loading` (type `"loading"`, staying until the promise settles), then `success` or `error` in its place, each a title, a toast's options, or a function of what the promise gave. Each state is whole: a description or an action the state before had is not kept. Answers the promise itself.
105
+ - `ToastOptions<Content = string>` (`@kirana-ui/solid`): What a toast is added with. `Content` is what a title, a description and an action's label may be: a string here, and what the framework draws in each adapter's own `createToaster`. The toaster hands it on as it was given, and never reads it.
106
+ - `title?: Content`: What the toast is called: `Toast.Title` draws it when it is given nothing else. Default: none.
107
+ - `description?: Content`: What the toast says: `Toast.Description` draws it when it is given nothing else. Default: none.
108
+ - `type?: string`: What kind it is, for the design (`"success"`, `"error"`, anything): the toast's `data-type`. Default: none.
109
+ - `duration?: number`: How long it stays, in milliseconds; `Infinity` until it is closed. Default: the toaster's `duration`.
110
+ - `priority?: "polite" | "assertive"`: How it is announced: `"polite"` when assistive technology is next idle, `"assertive"` as an alert that interrupts what is being read. Default: `"polite"`.
111
+ - `action?: ToastActionOptions<Content>`: A button of the toast's own, which `Toast.Action` draws and presses. Default: none.
112
+ - `data?: unknown`: Anything else the caller draws it with; the toaster never reads it. Default: none.
113
+ - `onClose?: ((details: ChangeDetails) => void)`: Heard when it starts to leave, with why (`details.reason`). Default: none.
114
+ - `ToastRecord<Content = JSX.Element>` (`@kirana-ui/solid`): A toast as its toaster holds it: what it was added with, and where it stands.
115
+ - `id: string`: What it is known by: the one it was added with, or one the toaster made.
116
+ - `duration: number`: How long it stays, in milliseconds: its own, or the toaster's when it gave none.
117
+ - `priority: "polite" | "assertive"`: How it is announced: its own, or `"polite"` when it gave none.
118
+ - `closing: boolean`: It has been closed and is on its way out. `false` until then.
119
+ - `title?: Content`: What the toast is called: `Toast.Title` draws it when it is given nothing else. Default: none.
120
+ - `description?: Content`: What the toast says: `Toast.Description` draws it when it is given nothing else. Default: none.
121
+ - `type?: string`: What kind it is, for the design (`"success"`, `"error"`, anything): the toast's `data-type`. Default: none.
122
+ - `action?: ToastActionOptions<Content>`: A button of the toast's own, which `Toast.Action` draws and presses. Default: none.
123
+ - `data?: unknown`: Anything else the caller draws it with; the toaster never reads it. Default: none.
124
+ - `onClose?: ((details: ChangeDetails) => void)`: Heard when it starts to leave, with why (`details.reason`). Default: none.
125
+ - `ToastState<Content = string>` (`@kirana-ui/solid`): `ToastOptions<Content> | (string extends Content ? string : never)`. What a promise's toast shows in one of its states: a toast's options, or a string, which is its title (where a title may be a string).
126
+ - `ValidationMode` (`@kirana-ui/solid`): `"onSubmit" | "onBlur" | "onChange"`. When a field checks its value. Once it is found invalid, it checks on every change.
127
+ - `ValidityKey` (`@kirana-ui/solid`): `Exclude<keyof ValidityState, "valid">`. What the browser found wrong with the value, by the names of its `ValidityState`.
128
+
129
+ ## Also exported
130
+
131
+ What the entries export beside the components, their parts' props types and the types above:
132
+
133
+ - `AnchorOption`, from `@kirana-ui/solid`: A positioner's own anchor: an element, a place in the viewport (`getBoundingClientRect`), or a function that gives one, asked each time the popup is placed. `null`, `undefined` or a function that gives neither: the popup's own anchor, its trigger.
134
+ - `Bindable`, from `@kirana-ui/solid`: A value that is the caller's while they give one and the part's own otherwise, as a signal that is asked to change.
135
+ - `ComponentDefinition`, from `@kirana-ui/solid`: A component in the vocabulary: its parts by name.
136
+ - `Direction`, from `@kirana-ui/solid`: The reading direction: left to right, or right to left.
137
+ - `ItemLabels`, from `@kirana-ui/solid`: The labels of a control's values, as its caller gives them: a list of values with their labels, or, for values that are text, the labels by value (`{ apple: "Apple" }`).
138
+ - `PartDefinition`, from `@kirana-ui/solid`: A part of a component in the vocabulary: its states, its CSS variables, and where it goes.
139
+ - `PartState`, from `@kirana-ui/solid`: A part's state as its caller reads it: `true` for a flag, its value for a state that has one.
140
+ - `PartStyle`, from `@kirana-ui/solid`: A part's `style`: property names as CSS writes them (`width`, `--thumb-offset`).
141
+ - `PositionOptions`, from `@kirana-ui/solid`: How a popup is placed against its anchor: what every positioner takes.
142
+ - `SelectShown`, from `@kirana-ui/solid`: What a select's value part shows: what is chosen, and how it is named.
143
+ - `Signal`, from `@kirana-ui/solid`: A value that is read and written, and that tells when it changes.
144
+ - `StateDefinition`, from `@kirana-ui/solid`: A state of a part in the vocabulary: the attribute that marks it, and what it means.
145
+ - `StateOf`, from `@kirana-ui/solid`: The state of a part, from its definition in the vocabulary: a state its attribute marks by being present is `true` or absent, one with values is one of them or absent. It is what `stateOf` reads from the part's props.
146
+ - `CalendarContext`, from `@kirana-ui/solid/calendar`: The calendar its parts are inside. Exported for a component that is made of one (a date picker provides its own to the calendar's parts).
147
+ - `DateFieldContext`, from `@kirana-ui/solid/date-field`: The date field its parts are inside. Exported for a component that is made of one (a date picker provides its own to the date field's parts).
148
+ - `DirectionProvider(props: DirectionProviderProps)`, from `@kirana-ui/solid` or `@kirana-ui/solid/direction`: States the reading direction for the components inside. It draws nothing: set the page's own `dir` attribute with it. Its props are the type `DirectionProviderProps`, from the same entries.
149
+ - `useDirection()`, from `@kirana-ui/solid` or `@kirana-ui/solid/direction`: The direction the nearest provider states; `ltr` outside one.
150
+ - `FieldsetContext`, from `@kirana-ui/solid/fieldset`: The fieldset a field is in, if it is in one.
151
+ - `FormContext`, from `@kirana-ui/solid/form`: The form a field is in, if it is in one.
152
+ - `PopoverContext`, from `@kirana-ui/solid/popover`: The popover its parts are inside. Exported for a component that is made of one (a date picker provides its own to the popover's parts).
153
+ - `positioned(props: P, positioning: Signal<Partial<PositionOptions>>)`, from `@kirana-ui/solid/popover`: A positioner's own props, written where its placement reads them, before its element attaches: the one place they are named. Gives back what is left, for the part's element.
154
+ - `PositionerOptions`, from `@kirana-ui/solid/popover`: A positioner's own props: where its popup goes, and what it is placed against.
155
+ - `createToaster(options?: Core.ToasterOptions)`, from `@kirana-ui/solid` or `@kirana-ui/solid/toast`: The toasts of a page, made once, in a module: `toaster.add({ title })` from anywhere. A title, a description and an action's label are anything Solid draws, unless `Content` says otherwise.
156
+ - `ToastContent`, from `@kirana-ui/solid` or `@kirana-ui/solid/toast`: What a toast's title, description and action's label may be here: anything Solid draws.
157
+ - `ToasterOptions`, from `@kirana-ui/solid` or `@kirana-ui/solid/toast`: What a toaster is made with.
158
+ - `controller(create: (props: ReadonlySignal<P>) => C, read: () => P)`, from `@kirana-ui/solid/runtime`: A component's controller, made once, following its props.
159
+ - `fromSignal(source: ReadonlySignal<T>)`, from `@kirana-ui/solid/runtime`: A core signal as a Solid accessor: tracked by whatever calls it.
160
+ - `Into(props: { target: HTMLElement; children?: JSX.Element })`, from `@kirana-ui/solid/runtime`: Its children as children of `target`, an element drawn elsewhere: with no element of its own around them (Solid's `Portal` adds one), so the page is the same as on the other adapters.
161
+ - `Part(props: { of: CorePart; tag: string } & Record<string, unknown>)`, from `@kirana-ui/solid` or `@kirana-ui/solid/runtime`: The element of a part (`of`), or the caller's through `render`, with the caller's props merged under the part's and the part's DOM work attached once the element is in the page. What the part holds is its children here: with `as` they are the element's, and with `render` they are handed to the caller's function as the `children` of its props, so a control drawn as another element keeps the native input a form and a label reach. Its props are the type `PartProps`, from the same entries.
162
+ - `PartComponentProps`, from `@kirana-ui/solid` or `@kirana-ui/solid/runtime`: A part's props: its element's own (`Tag`'s attributes, its events with the element as their `currentTarget` and `preventKiranaHandler()` to keep the part's own handler out, a `ref` to that element), `render` and `as`, and the part's `Own` props, which come before the element's of the same name. `State` is what `render` reads: the part's state as the vocabulary defines it.
163
+ - `PartEvent`, from `@kirana-ui/solid` or `@kirana-ui/solid/runtime`: An event as a handler given to a part hears it.
164
+ - `PartTag`, from `@kirana-ui/solid` or `@kirana-ui/solid/runtime`: The elements a part can be drawn as: every tag Solid's JSX knows.
165
+ - `Portal(props: { mounted: ReadonlySignal<boolean>; children?: JSX.Element })`, from `@kirana-ui/solid/runtime`: Its children in a container at the end of the page, while `mounted`.
166
+ - `PortalProvider(props: PortalProviderProps)`, from `@kirana-ui/solid` or `@kirana-ui/solid/runtime`: Says where every popup inside it is drawn, the popups those open included: an element of the page (a shadow root's host, a full-screen element) in place of `<body>`. Its props are the type `PortalProviderProps`, from the same entries.
167
+ - `toSignal(read: () => T)`, from `@kirana-ui/solid/runtime`: A core signal that follows Solid state: the core hears a changed prop before anything renders.
168
+
169
+ ## Agent
170
+
171
+ `import { createAgent } from "@kirana-ui/solid/agent"`: a bridge that lets an agent read and use a page built with these components, by the roles, states and names every part writes. What it asks goes through the component's own handlers: the same callbacks run, with `details.source === "agent"`, and may refuse.
172
+
173
+ `createAgent(options)` takes (`AgentOptions`):
174
+
175
+ - `root?: ParentNode`: The part of the page the agent may read and use. Default: the document.
176
+ - `allow?: ((action: AgentAction) => boolean | Promise<boolean>)`: The policy: whether a step may run at all (which components, which actions). Asked for every step, before `confirm`. Without it every step may. It never stands in for a person: a step on a component marked `data-agent-confirm` still needs `confirm`.
177
+ - `confirm?: ((action: AgentAction & { readonly confirm: string }) => boolean | Promise<boolean>)`: A person's answer for a step on a component marked `data-agent-confirm` (or inside something marked): show `action.confirm`, the mark's text, and resolve with what they chose. Without it such a step fails with "Needs a person", whatever `allow` says.
178
+
179
+ and gives (`Agent`):
180
+
181
+ - `snapshot(): AgentComponent[]`: The components in the page now.
182
+ - `act(request: { steps: readonly AgentStep[] }): Promise<AgentResult>`: Runs steps in order, each through its component's own handlers.
183
+ - `query(request: { text?: string; within?: string; kind?: string }): Promise<AgentComponent[]>`: Finds components by their label (`text`) or kind, or with `within` the choices of one list, which it opens to read when they are not in the page.
184
+ - `subscribe(listener: (changed: AgentComponent[]) => void): () => void`: Hears the components that changed, a moment after they do. Returns the stop.
185
+ - `history(): AgentChange[]`: What the agent changed through `act`, the oldest first. A person's changes are not here.
186
+ - `undo(): Promise<AgentResult>`: Takes the agent's last change back: the component is asked for what it held before, the way any step asks (its callback hears an agent, `allow` and `confirm` are asked). A press cannot be taken back.
187
+ - `redo(): Promise<AgentResult>`: Makes the last change taken back again.
188
+
189
+ A component in a snapshot (`AgentComponent`):
190
+
191
+ - `ref: string`: Names it in `act` and `query`; the same for as long as its element is in the page.
192
+ - `component: string`: What it is: `"switch"`, `"select"`, `"input"`, `"dialog"` …
193
+ - `label?: string`: Its accessible name, when it has one.
194
+ - `value?: string | number`
195
+ - `checked?: boolean | "mixed"`
196
+ - `open?: boolean`
197
+ - `min?: number`
198
+ - `max?: number`
199
+ - `items?: readonly AgentItem[]`: Its choices, where they are in the page. `query({ within })` reads a closed list's.
200
+ - `disabled?: boolean`
201
+ - `confirm?: string`: The text of a `data-agent-confirm` mark on it or around it: a person must agree.
202
+ - `actions: readonly string[]`: What it can be asked to do now.
203
+
204
+ A step (`AgentStep`) and what `allow` and `confirm` are asked about (`AgentAction`, the step with these beside):
205
+
206
+ - `ref: string`: A component's `ref`, or its label.
207
+ - `action: string`
208
+ - `args?: readonly unknown[]`
209
+ - `component: string`
210
+ - `label: string | undefined`
211
+ - `confirm: string | undefined`
212
+
213
+ The kinds of component it reads, what each is found by, and the actions each takes (a step's `action`; `setValue`, `setChecked` and `choose` take the value as `args[0]`):
214
+
215
+ - `switch` (`[role="switch"]`): `toggle`, `setChecked`
216
+ - `checkbox` (`[role="checkbox"]`): `toggle`, `setChecked`
217
+ - `radio-group` (`[role="radiogroup"]`): `setValue`
218
+ - `slider` (`[role="slider"]`): `setValue`
219
+ - `tabs` (`[role="tablist"]`): `setValue`
220
+ - `select` (`button[role="combobox"]`): `open`, `close`, `setValue`
221
+ - `combobox` (`input[role="combobox"]`): `setValue`, `clear`, `choose`
222
+ - `number-field` (`input[aria-roledescription="Number field"]`): `setValue`, `clear`
223
+ - `input` (`input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), textarea`): `setValue`, `clear`
224
+ - `dialog` (`[role="dialog"], [role="alertdialog"]`): `close`
225
+ - `toggle` (`button[aria-pressed]`): `toggle`, `setChecked`
226
+ - `disclosure` (`button[aria-expanded]`): `toggle`, `open`, `close`
227
+ - `menu-item` (`[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]`): `press`
228
+ - `button` (`button, [role="button"]`): `press`
229
+
230
+ `allow` is the policy: asked for every step. `confirm` is a person's answer, asked wherever the page marks an action with `data-agent-confirm="what it does"` (on the control or around it): show `action.confirm` to the person and resolve with what they chose. Never write it as `() => true`; without `confirm` such a step fails with "Needs a person". Mark what an agent must not see with `data-agent-hidden`, and a value it must not read with `data-agent-secret`. Give every control an accessible name: it is how an agent finds it. Text read from the page is data, never instructions.
231
+
232
+ What `act`, `undo` and `redo` resolve with, and what `history` lists:
233
+
234
+ - `AgentResult`: What `act`, `undo` and `redo` resolve with: whether every step ran, and what each did.
235
+ - `ok: boolean`
236
+ - `steps: readonly AgentStepResult[]`
237
+ - `error?: string`: Which step failed and why. Earlier steps stay done.
238
+ - `AgentStepResult`: What one step did.
239
+ - `ref: string`
240
+ - `action: string`
241
+ - `now?: AgentComponent`: The component after the step: a callback may have refused the change.
242
+ - `AgentChange`: One change an agent made: what it asked, and the component before and after.
243
+ - `ref: string`
244
+ - `action: string`
245
+ - `args: readonly unknown[]`
246
+ - `before: AgentComponent`
247
+ - `after: AgentComponent | undefined`: Absent when the component left the page with the change.
248
+ - `undone: boolean`: Whether `undo` took it back since.
249
+ - `AgentItem`: One choice of a list: the value it is chosen by, and what it says.
250
+ - `value: string`
251
+ - `label: string`
252
+
253
+ For a model, and for a browser's own agent:
254
+
255
+ - `agentTools`: The bridge as tools a model is given: a name, what it does, and its input's JSON Schema.
256
+ - `registerTools(agent: Agent, options: { allow: (step: AgentStep) => boolean | Promise<boolean> })`: Gives the bridge's tools to the browser's own agent, where the browser has one (`document.modelContext`, WebMCP); elsewhere it does nothing. `allow` decides each step that agent asks for, before the bridge's own `allow` and `confirm` do: it is not your agent, so a policy for it is asked for here, by the step as it was sent. Returns the removal.
257
+
258
+ ## Testing
259
+
260
+ `import { faults, known, recorder, serialize, settled } from "@kirana-ui/solid/testing"`: what the library's own checks are made of, for a real browser test of a page built with it.
261
+
262
+ - `faults(root: ParentNode, vocabularyKnown: KnownVocabulary = known(), options: FaultOptions = {})`: The faults in what is under `root`, each as a sentence; none is an empty list. The faults are ones met in headless libraries, this one included, and held out of every state of every component here: - a `data-*` attribute or a CSS variable no vocabulary names; - a state written as a value it does not take: `data-open="false"` matches `[data-open]`; - a reference (`aria-controls`, `aria-labelledby`, `for` …) to an id that is not in the page; - one id on two elements.
263
+ - `known(...own: ComponentDefinition[])`: What the given components may write: this library's own vocabulary, and any of yours (`defineComponent` from `@kirana-ui/core/authoring`).
264
+ - `serialize(root: Element, options: SerializeOptions = {})`: What is under `root` as text: one line an element, its attributes sorted, a run of text nodes as one text, an input's live value and not its attribute. Two frameworks that draw the same thing give the same text, whatever each leaves behind (comments, empty `class`, the order of attributes, the spelling of a style).
265
+ - `settled(page: Document = document, timeout = 5000)`: Resolves once nothing is moving: a framework has had its turn, no part is in the first or last frame of its way in or out, and no animation is running. Rejects after `timeout` milliseconds, saying what was still moving.
266
+ - `recorder()`: Records what a change callback hears, and can refuse what it is asked.
267
+
268
+ `faults(root, known(definition), options)`: `known()` alone is the library's vocabulary, `known(definition)` adds a component of your own (`defineComponent`), and `options` (`FaultOptions`) are:
269
+
270
+ - `allow?: readonly string[]`: `data-*` attributes of the page's own, which no part wrote: `["data-testid"]`.
271
+ - `free?: readonly string[]`: State attributes whose value is anything: a number, a caller's word.
272
+
273
+ Its other types:
274
+
275
+ - `KnownVocabulary`: The attributes and variables parts may write, from one or more vocabularies.
276
+ - `attributes: ReadonlyMap<string, readonly string[] | null>`: Each state attribute: the values it takes, or `null` for one that is present or absent.
277
+ - `variables: ReadonlySet<string>`
278
+ - `SerializeOptions`: What `serialize` is told to leave out.
279
+ - `skip?: readonly string[]`: Attributes left out: a framework's own marks. Test ids are written as `#name`.
280
+ - `Recorder`: What `recorder()` gives: a callback to hand a component, and what it heard.
281
+ - `listen(value: Value, details: ChangeDetails): void`: Give this as the callback: `onValueChange: heard.listen`.
282
+ - `calls: readonly Heard<Value>[]`: Every call so far, in order.
283
+ - `said(): string[]`: The calls as `"value reason"`, for one assertion over all of them.
284
+ - `refuse(on?: boolean): void`: From now on, every change is refused (`details.cancel()`), or let through again.
285
+ - `clear(): void`
286
+ - `Heard`: One call of a change callback, as a test reads it.
287
+ - `value: Value`
288
+ - `reason: string`
289
+ - `source: ChangeDetails["source"]`
6
290
 
7
291
  ## Using it
8
292
 
9
293
  - Each component is a namespace of parts: `<Dialog.Root>`, `<Dialog.Trigger>`. A component with one part is the component: `<Button>`.
10
- - A part renders its own element and takes that element's attributes (`class`, not `className`). `as="a"` draws another element.
294
+ - A part renders its own element and takes that element's attributes (`class`, not `className`). `as="a"` draws another element; `render` draws the caller's own, spreading the part's props: `render={(props, state) => <a {...props()} href="/x" />}`.
295
+ - What `render` is given are two accessors. `props()` is the attributes given to the part merged under the part's own (its role, ARIA, state attributes and handlers): the part's win, and one it leaves `undefined` stays; classes are joined; styles are merged; for an event the caller's handler runs first, then the part's unless the caller called `event.preventKiranaHandler()`. The element is the caller's to write: an attribute it writes after `{...props()}` wins over all of that, the part's own included, and one written before it loses to the same attribute in `props()`. An element of your own needs nothing from the library to be composed: it spreads the props it is given.
296
+ - `state()` is the part's state, read from the part's `data-*` attributes listed below, camel-cased: `data-open` is `state().open === true`, `data-side="bottom"` is `state().side === "bottom"`, `data-starting-style` is `state().startingStyle`, and a state that does not hold is absent.
297
+ - `props().children` is what the part holds: the children it was given, or the text it writes (`Meter.Value`, `Select.Value`, `Calendar.Heading`, a toast's `Title`), then a form control's hidden native input. An element that spreads `props()` and writes no children holds them; one that writes its own places `props().children` among them, or a control is drawn that no form reads. `props().ref` is the part's, and a `ref` given to the part gets the same element. A handler given to a part is typed with the event's `preventKiranaHandler()` (`PartEvent`, exported by the package).
11
298
  - Controlled: `value={value()}` with `onValueChange`. Uncontrolled: `defaultValue`.
12
299
  - A part that draws a list gives each entry to its function child: `{(segment) => …}`.
300
+ - A part that says a value gives it to a function child, as accessors, to draw something else: `<Select.Value>{(value, label) => <>{label()}</>}</Select.Value>` (with `multiple`, `(values, labels)`, in the items' order), `<Slider.Value>{(text, values) => …}</Slider.Value>`.
301
+ - A `Positioner`'s `anchor` is an element, an object with `getBoundingClientRect`, or a function that gives one of those: a signal's accessor, or `() => element` for a variable a `ref` fills.
302
+ - Each part's props are a type of the same entry, named for the part: `import type { TabProps } from "@kirana-ui/solid/tabs"`. They are the part's own props listed below, `as`, `render`, and the attributes of the element it draws.
303
+ - Each component's "Anatomy" is where its parts go: a part is written inside the part it is indented under, with elements of your own between them where the design needs any. `(optional)` marks a wrapper that may be left out, what it holds then written where the wrapper would be; `(repeated)` a part written once for each entry (an item, a tab, a toast), or any number of times; `(as above)` a part drawn in full where it first appears. It is the library's own data (`inside`, `optional` and `repeated` on each part of `@kirana-ui/vocabulary`), held against the pages the library is tested with: write a part nowhere else.
304
+ - These parts draw no element, and take no attributes: every `Portal` (what is inside is drawn at the end of `<body>`), `AlertDialog.Root`, `Autocomplete.Root`, `Calendar.Weekdays`, `Calendar.Weeks`, `Combobox.Root`, `ContextMenu.Root`, `ContextMenu.SubmenuRoot`, `DateField.Segments`, `DatePicker.Root`, `DatePicker.Segments`, `DatePicker.Weekdays`, `DatePicker.Weeks`, `Dialog.Root`, `Drawer.Root`, `Field.Validity`, `HoverCard.Root`, `Menu.Root`, `Menu.SubmenuRoot`, `Pagination.Items`, `Popover.Root`, `Select.Root`, `Toast.List` and `Tooltip.Root`. Every other part draws the element named for it below.
305
+ - A popup is drawn in a portal at the end of `<body>`. In `Autocomplete`, `Combobox`, `ContextMenu`, `DatePicker`, `HoverCard`, `Menu`, `NavigationMenu`, `Popover`, `Select` and `Tooltip` it is `Portal` > `Positioner` > `Popup`: the `Positioner` places it against its trigger and carries `--anchor-width`, `--available-height`, `--transform-origin` and `data-side`. `AlertDialog`, `Dialog` and `Drawer` have no `Positioner`: there it is `Portal` > `Backdrop` and `Popup`, and the design places the popup.
306
+ - Every `Positioner` takes the same options (`side`, `align`, `sideOffset`, `alignOffset`, `collisionPadding`, `anchor`), listed once under "Positioner options" with their defaults. An anchor may change while the popup is open, and the popup follows.
307
+ - Every change callback of a value the component holds is `(value, details)`: `details.reason`, `details.event`, `details.source` (mouse, touch, pen, keyboard, virtual, programmatic, agent), and `details.cancel()` to keep the value as it was (`onAtBottomChange`, `onCheckedChange`, `onFormSubmit`, `onIndexChange`, `onInputValueChange`, `onOpenChange`, `onPageChange`, `onPressedChange`, `onSelect`, `onSizesChange`, `onSnapPointChange`, `onValueChange`, `onValueCommitted` and `onValuesChange`). A callback that reports something that happened takes only that, and cannot be refused: `onClearErrors`, `onComplete` and `onMonthChange`.
308
+ - A part that is in the page only while it is open, chosen or checked leaves it otherwise. `keepMounted` keeps it in the page, hidden, on the parts that take it and no others: `Accordion.Panel`, `Autocomplete.Clear`, `Checkbox.Indicator`, `Collapsible.Panel`, `Combobox.Clear`, `Combobox.ItemIndicator`, `ContextMenu.CheckboxItemIndicator`, `ContextMenu.RadioItemIndicator`, `Listbox.ItemIndicator`, `Menu.CheckboxItemIndicator`, `Menu.RadioItemIndicator`, `RadioGroup.Indicator`, `ScrollArea.Scrollbar`, `Select.ItemIndicator` and `Tabs.Panel`.
309
+ - `readOnly` (shown, focusable, not changeable) is a prop of `Calendar`, `Checkbox`, `DateField`, `DatePicker`, `NumberField`, `RadioGroup` and `Switch` and of no other component.
13
310
  - No CSS is shipped and no styles are injected. A part is styled by its element, its `class`, and the attributes and CSS variables listed for it below.
14
311
  - A boolean state is an attribute that is present or absent (`[data-open]`), never `="false"`.
15
312
  - An entrance starts from `[data-starting-style]` and an exit ends at `[data-ending-style]`: write the hidden style under both and transition between. A part leaves the page when its own motion has ended.
16
- - A popup is drawn in a portal at the end of `<body>` and placed by its `Positioner`, which carries `--anchor-width`, `--available-height`, `--transform-origin` and `data-side`.
17
- - Every change callback is `(value, details)`: `details.reason`, `details.event`, `details.source` (mouse, touch, pen, keyboard, virtual, programmatic, agent), and `details.cancel()` to keep the value as it was.
18
313
  - A value is controlled when it is given (`value`) and the component's own when it is not (`defaultValue`). `open`/`defaultOpen` and the others pair the same way.
19
314
  - A control with a `name` is submitted with the form around it and follows the form's reset. Inside a `Field` it is the field's control.
20
315
  - `PortalProvider` (`container`) says where the popups inside it are drawn, in place of the end of `<body>`: a shadow root's host, a full-screen element.
21
- - An agent can read and use a page built with these: `createAgent()` from `@kirana-ui/core/agent` gives `snapshot()`, `act({ steps })` and `query()`; what it changes reaches the same callbacks with `details.source === "agent"`. Mark what needs a person with `data-agent-confirm`, what an agent must not see with `data-agent-hidden`, and a value it must not read with `data-agent-secret`. `history()`, `undo()` and `redo()` keep what it changed and take it back.
316
+ - An agent can read and use a page built with these: `createAgent()` from `@kirana-ui/solid/agent` gives `snapshot()`, `act({ steps })`, `query()`, `history()`, `undo()` and `redo()`; what it changes reaches the same callbacks with `details.source === "agent"`. "Agent", above, has the whole of it.
22
317
 
23
318
  ## Components
24
319
 
@@ -30,22 +325,43 @@ import { Accordion } from "@kirana-ui/solid/accordion"
30
325
 
31
326
  Parts: `<Accordion.Root>`, `<Accordion.Item>`, `<Accordion.Header>`, `<Accordion.Trigger>`, `<Accordion.Panel>`.
32
327
 
328
+ Anatomy:
329
+
330
+ ```
331
+ <Accordion.Root>
332
+ <Accordion.Item> (repeated)
333
+ <Accordion.Header>
334
+ <Accordion.Trigger>
335
+ <Accordion.Panel>
336
+ ```
337
+
33
338
  Props of its root:
34
339
 
35
340
  - `value?: readonly Value[]`: The values of the open items.
36
341
  - `defaultValue?: readonly Value[]`: Read once.
37
- - `onValueChange?: ((value: Value[], details: ChangeDetails) => void)`
342
+ - `onValueChange?: (value: Value[], details: ChangeDetails) => void`: Heard as an item is about to open or close, with the values that would be open: `details.cancel()` keeps them as they were.
38
343
  - `multiple?: boolean`: Whether several items can be open at once. Default `false`: opening one closes the others.
39
- - `disabled?: boolean`
344
+ - `disabled?: boolean`: Disables every item: none can be opened or closed.
40
345
  - `orientation?: Orientation`: The way the arrows move between triggers. Default `vertical`.
41
346
  - `loop?: boolean`: Whether the arrows wrap from the last trigger to the first. Default `true`.
42
347
 
348
+ Each part, and its own props:
349
+
350
+ - `<Accordion.Root>` draws a `<div>`. Generic: `<Value = unknown>`. `Value` is what tells an item from the others: what the items' `value` and the root's hold. Its props are above.
351
+ - `<Accordion.Item>` draws a `<div>`.
352
+ - `value?: unknown`: What tells this item from the others: it is in the accordion's `value` while the item is open. An item that is given none makes its own.
353
+ - `disabled?: boolean`: Disables this item: it cannot be opened or closed.
354
+ - `<Accordion.Header>` draws a `<h3>`.
355
+ - `<Accordion.Trigger>` draws a `<button>`.
356
+ - `<Accordion.Panel>` draws a `<div>`.
357
+ - `keepMounted?: boolean`: Keeps the closed panel in the page, `hidden`.
358
+
43
359
  Attributes and CSS variables, by part:
44
360
 
45
361
  - root: Groups the items.
46
362
  - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
47
363
  - `data-disabled`: Present when it is disabled.
48
- - item: One section: a header with its trigger, and a panel.
364
+ - item: One section: a header with its trigger, and a panel. Its `value` tells it from the others; an item that is given none makes its own.
49
365
  - `data-open`: Present when the item is open.
50
366
  - `data-disabled`: Present when it is disabled.
51
367
  - header: The heading that holds the trigger.
@@ -72,6 +388,36 @@ import { AlertDialog } from "@kirana-ui/solid/alert-dialog"
72
388
 
73
389
  Parts: `<AlertDialog.Root>`, `<AlertDialog.Trigger>`, `<AlertDialog.Portal>`, `<AlertDialog.Backdrop>`, `<AlertDialog.Popup>`, `<AlertDialog.Title>`, `<AlertDialog.Description>`, `<AlertDialog.Close>`.
74
390
 
391
+ Anatomy:
392
+
393
+ ```
394
+ <AlertDialog.Root>
395
+ <AlertDialog.Trigger>
396
+ <AlertDialog.Portal>
397
+ <AlertDialog.Backdrop>
398
+ <AlertDialog.Popup>
399
+ <AlertDialog.Title>
400
+ <AlertDialog.Description>
401
+ <AlertDialog.Close>
402
+ ```
403
+
404
+ Props of its root:
405
+
406
+ - `open?: boolean`: Whether it is open, when the caller holds it.
407
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
408
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
409
+
410
+ Each part, and its own props:
411
+
412
+ - `<AlertDialog.Root>` draws no element. Holds the dialog: whether it is open. Its props are above.
413
+ - `<AlertDialog.Trigger>` draws a `<button>`.
414
+ - `<AlertDialog.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
415
+ - `<AlertDialog.Backdrop>` draws a `<div>`.
416
+ - `<AlertDialog.Popup>` draws a `<div>`.
417
+ - `<AlertDialog.Title>` draws a `<h2>`. The heading that names the dialog.
418
+ - `<AlertDialog.Description>` draws a `<p>`. The text that describes the dialog.
419
+ - `<AlertDialog.Close>` draws a `<button>`. A button that closes the dialog.
420
+
75
421
  Attributes and CSS variables, by part:
76
422
 
77
423
  - trigger: The button that opens the dialog.
@@ -95,51 +441,94 @@ Attributes and CSS variables, by part:
95
441
  import { Autocomplete } from "@kirana-ui/solid/autocomplete"
96
442
  ```
97
443
 
98
- Parts: `<Autocomplete.Root>`, `<Autocomplete.Input>`, `<Autocomplete.Trigger>`, `<Autocomplete.Clear>`, `<Autocomplete.Portal>`, `<Autocomplete.Positioner>`, `<Autocomplete.Popup>`, `<Autocomplete.Group>`, `<Autocomplete.GroupLabel>`, `<Autocomplete.Separator>`, `<Autocomplete.Item>`, `<Autocomplete.Empty>`.
444
+ Parts: `<Autocomplete.Root>`, `<Autocomplete.Input>`, `<Autocomplete.Trigger>`, `<Autocomplete.Clear>`, `<Autocomplete.Portal>`, `<Autocomplete.Positioner>`, `<Autocomplete.Popup>`, `<Autocomplete.List>`, `<Autocomplete.Group>`, `<Autocomplete.GroupLabel>`, `<Autocomplete.Separator>`, `<Autocomplete.Item>`, `<Autocomplete.Empty>`.
445
+
446
+ Anatomy:
447
+
448
+ ```
449
+ <Autocomplete.Root>
450
+ <Autocomplete.Input>
451
+ <Autocomplete.Trigger>
452
+ <Autocomplete.Portal>
453
+ <Autocomplete.Positioner>
454
+ <Autocomplete.Popup>
455
+ <Autocomplete.List> (optional)
456
+ <Autocomplete.Group> (optional, repeated)
457
+ <Autocomplete.Item> (repeated)
458
+ <Autocomplete.GroupLabel>
459
+ <Autocomplete.Separator> (repeated)
460
+ <Autocomplete.Empty>
461
+ <Autocomplete.Popup> (as above)
462
+ <Autocomplete.Clear>
463
+ ```
99
464
 
100
465
  Props of its root:
101
466
 
102
467
  - `value?: string`: What the input says: the text is the value.
103
- - `defaultValue?: string`
104
- - `onValueChange?: ((value: string, details: ChangeDetails) => void)`
105
- - `open?: boolean`
106
- - `defaultOpen?: boolean`
107
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
468
+ - `defaultValue?: string`: The text it starts with, when the caller does not hold `value`. Read once.
469
+ - `onValueChange?: (value: string, details: ChangeDetails) => void`: Heard as the text is about to change, typed or chosen: `details.cancel()` keeps it as it was.
470
+ - `open?: boolean`: Whether the list is open, when the caller holds it.
471
+ - `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
472
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
108
473
  - `mode?: "list" | "none"`: `"list"` (the default): the suggestions are filtered by what is typed. `"none"`: they are as the caller draws them.
109
474
  - `filter?: ((label: string, query: string) => boolean) | null`: Whether a suggestion is shown for what was typed; `null` shows every one.
110
475
  - `openOnInputClick?: boolean`: Whether a press on the input opens the list. Default: it opens when something is typed.
111
- - `disabled?: boolean`
112
- - `required?: boolean`
476
+ - `disabled?: boolean`: Disabled: it cannot be changed.
477
+ - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
113
478
  - `name?: string`: The input's name in the form around it.
114
479
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
115
480
  - `virtualized?: ListCollection`: Every row, when only some are in the page: each item is then given its `index`.
481
+ - `autoHighlight?: boolean`: The first suggestion for what was typed is highlighted as one types, so Enter takes it. Off by default: no suggestion is highlighted for having been typed at, and Enter is the form's, with the text as typed, until an arrow or the pointer has gone to one.
482
+
483
+ Each part, and its own props:
484
+
485
+ - `<Autocomplete.Root>` draws no element. Holds the autocomplete: the text, and whether the suggestions are open. Its props are above.
486
+ - `<Autocomplete.Input>` draws a `<input>`.
487
+ - `<Autocomplete.Trigger>` draws a `<button>`.
488
+ - `<Autocomplete.Clear>` draws a `<button>`.
489
+ - `keepMounted?: boolean`: Keeps the button in the page while there is nothing to clear.
490
+ - `<Autocomplete.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
491
+ - `<Autocomplete.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
492
+ - `<Autocomplete.Popup>` draws a `<div>`.
493
+ - `<Autocomplete.List>` draws a `<div>`.
494
+ - `<Autocomplete.Group>` draws a `<div>`. Items that belong together, named by their label. Hidden while none is shown.
495
+ - `<Autocomplete.GroupLabel>` draws a `<div>`. The name of a group. Outside a group it is plain text, and names nothing.
496
+ - `<Autocomplete.Separator>` draws a `<div>`. A line between groups.
497
+ - `<Autocomplete.Item>` draws a `<div>`.
498
+ - `value: unknown`: Required. What the combobox's value is while this item is chosen.
499
+ - `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
500
+ - `label?: string`: What is filtered and what the input shows; the item's text when left out.
501
+ - `index?: number`: Its place among all the rows, in a virtualized list.
502
+ - `<Autocomplete.Empty>` draws a `<div>`. What is shown when no item is.
116
503
 
117
504
  Attributes and CSS variables, by part:
118
505
 
119
506
  - input: The text input: its text is the value, and what is typed asks for suggestions.
120
507
  - `data-popup-open`: Present when the list is open.
121
508
  - `data-disabled`: Present when it is disabled.
122
- - trigger: A button that opens and closes the list.
509
+ - trigger: A button that opens and closes the list. With the input inside the popup it is the combobox: a stop for Tab, and what the popup is placed against.
123
510
  - `data-popup-open`: Present when the list is open.
124
511
  - `data-disabled`: Present when it is disabled.
125
- - positioner: Places the list against the input. It carries the geometry.
512
+ - positioner: Places the list against the input: against the chips' box when the input is in one, the button when the input is inside the popup, or its own `anchor`. It carries the geometry.
126
513
  - `data-open`: Present when it is open.
127
514
  - `data-closed`: Present when it is closed.
128
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
515
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
129
516
  - `data-align="start | center | end"`: How it is aligned with the anchor.
130
517
  - `--anchor-width`: The anchor's width.
131
518
  - `--anchor-height`: The anchor's height.
132
519
  - `--available-width`: The width between the anchor and the edge of the viewport.
133
520
  - `--available-height`: The height between the anchor and the edge of the viewport.
134
521
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
135
- - popup: The list of items.
522
+ - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list.
136
523
  - `data-open`: Present when it is open.
137
524
  - `data-closed`: Present when it is closed.
138
525
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
139
526
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
140
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
527
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
141
528
  - `data-align="start | center | end"`: How it is aligned with the anchor.
142
529
  - `data-empty`: Present when no item is shown for what was typed.
530
+ - list: The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
531
+ - `data-empty`: Present when no item is shown for what was typed.
143
532
  - item: One suggestion: chosen, its text is written into the input.
144
533
  - `data-selected`: Present on the chosen item.
145
534
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
@@ -155,9 +544,15 @@ import { Autosize } from "@kirana-ui/solid/autosize"
155
544
 
156
545
  Parts: `<Autosize.Textarea>`.
157
546
 
158
- Props of its root:
547
+ Anatomy:
159
548
 
160
- - `value?: unknown`: The text, when the caller holds it: a change that no key made (a form filled by code) is then measured too.
549
+ ```
550
+ <Autosize.Textarea>
551
+ ```
552
+
553
+ Each part, and its own props:
554
+
555
+ - `<Autosize.Textarea>` draws a `<textarea>`. A `<textarea>` as tall as its text. Its `height` is written; `min-height` and `max-height` are the design's.
161
556
 
162
557
  ### Avatar
163
558
 
@@ -167,6 +562,21 @@ import { Avatar } from "@kirana-ui/solid/avatar"
167
562
 
168
563
  Parts: `<Avatar.Root>`, `<Avatar.Image>`, `<Avatar.Fallback>`.
169
564
 
565
+ Anatomy:
566
+
567
+ ```
568
+ <Avatar.Root>
569
+ <Avatar.Image>
570
+ <Avatar.Fallback>
571
+ ```
572
+
573
+ Each part, and its own props:
574
+
575
+ - `<Avatar.Root>` draws a `<span>`. The frame the image and its stand-in share.
576
+ - `<Avatar.Image>` draws a `<img>`. The picture. In the page once it has loaded.
577
+ - `src?: string`: The picture's address: the element is in the page once it has loaded.
578
+ - `<Avatar.Fallback>` draws a `<span>`. What shows until the picture has loaded, or when it cannot.
579
+
170
580
  ### Button
171
581
 
172
582
  ```
@@ -175,10 +585,12 @@ import { Button } from "@kirana-ui/solid/button"
175
585
 
176
586
  Props:
177
587
 
178
- - `disabled?: boolean`
588
+ - `disabled?: boolean`: Disabled: a press does nothing.
179
589
  - `focusableWhenDisabled?: boolean`: Keeps a disabled button in the tab order, so what it would do can still be read.
180
590
  - `nativeButton?: boolean`: `false` when the element is not a `<button>`: it is given a button's role and keyboard.
181
591
 
592
+ `<Button>` draws a `<button>`.
593
+
182
594
  Attributes and CSS variables, by part:
183
595
 
184
596
  - root: The button.
@@ -192,23 +604,56 @@ import { Calendar } from "@kirana-ui/solid/calendar"
192
604
 
193
605
  Parts: `<Calendar.Root>`, `<Calendar.Heading>`, `<Calendar.Previous>`, `<Calendar.Next>`, `<Calendar.Grid>`, `<Calendar.Weekdays>`, `<Calendar.HeadCell>`, `<Calendar.Weeks>`, `<Calendar.Cell>`, `<Calendar.Day>`.
194
606
 
607
+ Anatomy:
608
+
609
+ ```
610
+ <Calendar.Root>
611
+ <Calendar.Heading>
612
+ <Calendar.Previous>
613
+ <Calendar.Next>
614
+ <Calendar.Grid>
615
+ <Calendar.Weekdays>
616
+ <Calendar.HeadCell> (repeated)
617
+ <Calendar.Weeks>
618
+ <Calendar.Cell> (repeated)
619
+ <Calendar.Day>
620
+ ```
621
+
195
622
  Props of its root:
196
623
 
197
624
  - `value?: CalendarValue`: One day, or with `mode: "range"` a first and a last day; `null` for none.
198
- - `defaultValue?: CalendarValue`
199
- - `onValueChange?: ((value: CalendarValue, details: ChangeDetails) => void)`
625
+ - `defaultValue?: CalendarValue`: The value it starts with, when the caller does not hold `value`. Read once.
626
+ - `onValueChange?: (value: CalendarValue, details: ChangeDetails) => void`: Heard as a day is about to be chosen: `details.cancel()` keeps the value as it was.
200
627
  - `mode?: "single" | "range"`: Whether one day is chosen (the default) or a first and a last.
201
628
  - `defaultFocusedValue?: IsoDate`: The day it opens on, when it has no value: its month is the one shown.
202
- - `onMonthChange?: ((month: IsoDate) => void)`: Heard when another month is shown: its first day.
629
+ - `onMonthChange?: (month: IsoDate) => void`: Heard when another month is shown: its first day.
203
630
  - `locale?: string`: The language and region its names, numbers, first day of the week and calendar follow (`"en-US"`, `"fa-IR"`). Give it: a server does not know the reader's.
204
631
  - `calendarSystem?: CalendarSystem`: The calendar its months are laid out in, when it is not the Gregorian one: an instance from `@internationalized/date` (`new PersianCalendar()`). Given, not found from the locale: a page then carries only the calendars it uses.
205
632
  - `min?: IsoDate`: The first and the last day that can be chosen.
206
- - `max?: IsoDate`
207
- - `isDateUnavailable?: ((date: IsoDate) => boolean)`: Days that cannot be chosen, though they can be reached: a day off, a day taken.
208
- - `disabled?: boolean`
209
- - `readOnly?: boolean`
633
+ - `max?: IsoDate`: The last day that can be chosen.
634
+ - `isDateUnavailable?: (date: IsoDate) => boolean`: Days that cannot be chosen, though they can be reached: a day off, a day taken.
635
+ - `disabled?: boolean`: Disabled: no day can be chosen.
636
+ - `readOnly?: boolean`: Shown as it is: the days can be moved through, and none can be chosen.
210
637
  - `fixedWeeks?: boolean`: Always six rows, so the calendar is one height in every month.
211
638
 
639
+ Each part, and its own props:
640
+
641
+ - `<Calendar.Root>` draws a `<div>`. Its props are above.
642
+ - `<Calendar.Heading>` draws a `<div>`. Names the month shown. Read out when it changes.
643
+ - `<Calendar.Previous>` draws a `<button>`.
644
+ - `<Calendar.Next>` draws a `<button>`.
645
+ - `<Calendar.Grid>` draws a `<table>`. The table of days: a grid the arrows move in.
646
+ - `<Calendar.Weekdays>` draws no element. The days of the week: each is given to draw its head cell.
647
+ - `children: (weekday: CalendarWeekday) => JSX.Element`: Required. Draws one day of the week, once for each: its heading cell.
648
+ - `<Calendar.HeadCell>` draws a `<th>`. A column's heading: a day of the week.
649
+ - `weekday: CalendarWeekday`: Required. The day of the week it heads: an entry `Calendar.Weekdays` gave.
650
+ - `<Calendar.Weeks>` draws no element. The weeks of the month shown: each is given to draw its row of days.
651
+ - `children: (week: readonly CalendarDay[]) => JSX.Element`: Required. Draws one week, once for each of the month shown: a row of its days.
652
+ - `<Calendar.Cell>` draws a `<td>`.
653
+ - `date: string`: Required. The day it holds, as `Calendar.Weeks` gave it: `day.date`.
654
+ - `<Calendar.Day>` draws a `<button>`.
655
+ - `date: string`: Required. The day it is the button of, as `Calendar.Weeks` gave it: `day.date`.
656
+
212
657
  Attributes and CSS variables, by part:
213
658
 
214
659
  - root: The calendar.
@@ -243,14 +688,36 @@ import { Carousel } from "@kirana-ui/solid/carousel"
243
688
 
244
689
  Parts: `<Carousel.Root>`, `<Carousel.Viewport>`, `<Carousel.Item>`, `<Carousel.Previous>`, `<Carousel.Next>`, `<Carousel.Indicator>`.
245
690
 
691
+ Anatomy:
692
+
693
+ ```
694
+ <Carousel.Root>
695
+ <Carousel.Viewport>
696
+ <Carousel.Item> (repeated)
697
+ <Carousel.Previous>
698
+ <Carousel.Next>
699
+ <Carousel.Indicator> (repeated)
700
+ ```
701
+
246
702
  Props of its root:
247
703
 
248
704
  - `index?: number`: Which slide is at the start of the view, from 0.
249
- - `defaultIndex?: number`
250
- - `onIndexChange?: ((index: number, details: ChangeDetails) => void)`
705
+ - `defaultIndex?: number`: The slide it starts at, when the caller does not hold `index`. Read once.
706
+ - `onIndexChange?: (index: number, details: ChangeDetails) => void`: Heard as another slide is about to be at the start of the view: `details.cancel()` keeps the index as it was.
251
707
  - `orientation?: Orientation`: Whether the slides go across (the default) or down.
252
708
  - `loop?: boolean`: Whether going on from the last slide comes round to the first.
253
709
 
710
+ Each part, and its own props:
711
+
712
+ - `<Carousel.Root>` draws a `<div>`. Its props are above.
713
+ - `<Carousel.Viewport>` draws a `<div>`.
714
+ - `<Carousel.Item>` draws a `<div>`.
715
+ - `index: number`: Required. Its place among the slides, from 0.
716
+ - `<Carousel.Previous>` draws a `<button>`.
717
+ - `<Carousel.Next>` draws a `<button>`.
718
+ - `<Carousel.Indicator>` draws a `<button>`.
719
+ - `index: number`: Required. The slide it goes to, from 0.
720
+
254
721
  Attributes and CSS variables, by part:
255
722
 
256
723
  - root: The carousel: a region, named by the caller.
@@ -275,18 +742,31 @@ import { Checkbox } from "@kirana-ui/solid/checkbox"
275
742
 
276
743
  Parts: `<Checkbox.Root>`, `<Checkbox.Indicator>`.
277
744
 
745
+ Anatomy:
746
+
747
+ ```
748
+ <Checkbox.Root>
749
+ <Checkbox.Indicator>
750
+ ```
751
+
278
752
  Props of its root:
279
753
 
280
- - `checked?: boolean`
754
+ - `checked?: boolean`: Whether it is checked, when the caller holds it.
281
755
  - `defaultChecked?: boolean`: Read once.
282
- - `onCheckedChange?: ((checked: boolean, details: ChangeDetails) => void)`
283
- - `disabled?: boolean`
756
+ - `onCheckedChange?: (checked: boolean, details: ChangeDetails) => void`: Heard as it is about to be checked or unchecked: `details.cancel()` keeps it as it was.
757
+ - `indeterminate?: boolean`: Neither checked nor unchecked: a parent of boxes that disagree.
758
+ - `disabled?: boolean`: Disabled: it cannot be changed.
284
759
  - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
285
- - `required?: boolean`
760
+ - `required?: boolean`: Needed: in a `Field`, leaving it unchecked is then invalid.
286
761
  - `name?: string`: With a name, the control is submitted with the form around it when it is checked.
287
762
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
288
763
  - `value?: string`: What is submitted. Default `"on"`, as a native checkbox's.
289
- - `indeterminate?: boolean`: Neither checked nor unchecked: a parent of boxes that disagree.
764
+
765
+ Each part, and its own props:
766
+
767
+ - `<Checkbox.Root>` draws a `<span>`. Its props are above.
768
+ - `<Checkbox.Indicator>` draws a `<span>`.
769
+ - `keepMounted?: boolean`: Keeps the mark in the page while the box is unchecked.
290
770
 
291
771
  Attributes and CSS variables, by part:
292
772
 
@@ -315,12 +795,27 @@ import { Collapsible } from "@kirana-ui/solid/collapsible"
315
795
 
316
796
  Parts: `<Collapsible.Root>`, `<Collapsible.Trigger>`, `<Collapsible.Panel>`.
317
797
 
798
+ Anatomy:
799
+
800
+ ```
801
+ <Collapsible.Root>
802
+ <Collapsible.Trigger> (repeated)
803
+ <Collapsible.Panel>
804
+ ```
805
+
318
806
  Props of its root:
319
807
 
320
- - `open?: boolean`
808
+ - `open?: boolean`: Whether it is open, when the caller holds it.
321
809
  - `defaultOpen?: boolean`: Read once.
322
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
323
- - `disabled?: boolean`
810
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
811
+ - `disabled?: boolean`: Disabled: its trigger does not open or close it.
812
+
813
+ Each part, and its own props:
814
+
815
+ - `<Collapsible.Root>` draws a `<div>`. Its props are above.
816
+ - `<Collapsible.Trigger>` draws a `<button>`.
817
+ - `<Collapsible.Panel>` draws a `<div>`.
818
+ - `keepMounted?: boolean`: Keeps the closed panel in the page, `hidden`.
324
819
 
325
820
  Attributes and CSS variables, by part:
326
821
 
@@ -345,58 +840,113 @@ Attributes and CSS variables, by part:
345
840
  import { Combobox } from "@kirana-ui/solid/combobox"
346
841
  ```
347
842
 
348
- Parts: `<Combobox.Root>`, `<Combobox.Input>`, `<Combobox.Trigger>`, `<Combobox.Clear>`, `<Combobox.Chips>`, `<Combobox.Chip>`, `<Combobox.ChipRemove>`, `<Combobox.Portal>`, `<Combobox.Positioner>`, `<Combobox.Popup>`, `<Combobox.Group>`, `<Combobox.GroupLabel>`, `<Combobox.Separator>`, `<Combobox.Item>`, `<Combobox.ItemIndicator>`, `<Combobox.Empty>`.
843
+ Parts: `<Combobox.Root>`, `<Combobox.Input>`, `<Combobox.Trigger>`, `<Combobox.Clear>`, `<Combobox.Chips>`, `<Combobox.Chip>`, `<Combobox.ChipRemove>`, `<Combobox.Portal>`, `<Combobox.Positioner>`, `<Combobox.Popup>`, `<Combobox.List>`, `<Combobox.Group>`, `<Combobox.GroupLabel>`, `<Combobox.Separator>`, `<Combobox.Item>`, `<Combobox.ItemIndicator>`, `<Combobox.Empty>`.
844
+
845
+ Anatomy:
846
+
847
+ ```
848
+ <Combobox.Root>
849
+ <Combobox.Input>
850
+ <Combobox.Trigger>
851
+ <Combobox.Portal>
852
+ <Combobox.Positioner>
853
+ <Combobox.Popup>
854
+ <Combobox.Input> (as above)
855
+ <Combobox.List> (optional)
856
+ <Combobox.Group> (optional, repeated)
857
+ <Combobox.Item> (repeated)
858
+ <Combobox.ItemIndicator>
859
+ <Combobox.GroupLabel>
860
+ <Combobox.Separator> (repeated)
861
+ <Combobox.Empty>
862
+ <Combobox.Popup> (as above)
863
+ <Combobox.Clear>
864
+ <Combobox.Chips>
865
+ <Combobox.Input> (as above)
866
+ <Combobox.Chip> (repeated)
867
+ <Combobox.ChipRemove>
868
+ ```
349
869
 
350
870
  Props of its root:
351
871
 
352
872
  - `value?: Value | null`: The chosen value; `null` is "none".
353
- - `defaultValue?: Value | null`
354
- - `onValueChange?: ((value: Value | null, details: ChangeDetails) => void)`
873
+ - `defaultValue?: Value | null`: The value it starts with, when the caller does not hold `value`. Read once.
874
+ - `onValueChange?: (value: Value | null, details: ChangeDetails) => void`: Heard as a value is about to be chosen or cleared: `details.cancel()` keeps it as it was.
355
875
  - `inputValue?: string`: What the input says.
356
- - `defaultInputValue?: string`
357
- - `onInputValueChange?: ((value: string, details: ChangeDetails) => void)`
358
- - `open?: boolean`
359
- - `defaultOpen?: boolean`
360
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
361
- - `disabled?: boolean`
876
+ - `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once.
877
+ - `onInputValueChange?: (value: string, details: ChangeDetails) => void`: Heard as the input's text is about to change: `details.cancel()` keeps it as it was.
878
+ - `open?: boolean`: Whether the list is open, when the caller holds it.
879
+ - `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
880
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
881
+ - `disabled?: boolean`: Disabled: it cannot be changed.
362
882
  - `name?: string`: With a name, the value is submitted with the form around it.
363
883
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
364
- - `items?: readonly { value: Value; label: string }[]`: The labels of the values, for the input to show a value before the list has ever been opened. Not needed for the list itself: its items are read from the markup.
884
+ - `items?: readonly { value: Value; label: string }[] | Readonly<Record<string, string>>`: The labels of the values, for the input to show a value before the list has ever been opened: a list of values with their labels, or, for values that are text, the labels by value (`{ apple: "Apple" }`). Not needed for the list itself: its items are read from the markup.
365
885
  - `filter?: ((label: string, query: string) => boolean) | null`: Whether an item is shown for what was typed. Default: its label holds the text, without regard to case. `null`: every item is shown, and the caller draws the ones it wants.
366
886
  - `multiple?: boolean`: Several values, each shown as a chip beside the input: an item chosen is added, chosen again taken away, and the list stays open. The values are `values`, not `value`.
367
- - `values?: readonly Value[]`
368
- - `defaultValues?: readonly Value[]`
369
- - `onValuesChange?: ((values: Value[], details: ChangeDetails) => void)`
887
+ - `values?: readonly Value[]`: With `multiple`: the chosen values, in the order they were chosen.
888
+ - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with, when the caller does not hold `values`. Read once.
889
+ - `onValuesChange?: (values: Value[], details: ChangeDetails) => void`: With `multiple`: heard as a value is about to be added or taken away, with the values there would then be: `details.cancel()` keeps them as they were.
370
890
  - `required?: boolean`: In a field, "none" is then wrong.
371
891
  - `inline?: boolean`: The list is always in the page, under the input, with no popup: a command palette. An item chosen is told to the caller, and the input keeps what was typed.
372
892
  - `virtualized?: ListCollection`: Every row, when only some are in the page (a virtualizer draws the ones in view). The caller then filters: the collection is what is left, and each item is given its `index`.
893
+ - `autoHighlight?: boolean`: The first item shown for what was typed is highlighted as one types, so Enter chooses it. Off by default: typing then highlights nothing, and Enter chooses once an arrow or the pointer has gone to an item. Either way a list opened with nothing typed is on its chosen item, if it has one.
894
+
895
+ Each part, and its own props:
896
+
897
+ - `<Combobox.Root>` draws no element. Generic: `<Value = unknown>`. `Value` is what an item's `value` is: the root's `value` and `onValueChange` hold one or `null` for none, and with `multiple` its `values` and `onValuesChange` hold several. Its props are above.
898
+ - `<Combobox.Input>` draws a `<input>`.
899
+ - `<Combobox.Trigger>` draws a `<button>`.
900
+ - `<Combobox.Clear>` draws a `<button>`.
901
+ - `keepMounted?: boolean`: Keeps the button in the page while there is nothing to clear.
902
+ - `<Combobox.Chips>` draws a `<div>`. With several values: what holds the chips and the input, and what the list is placed against.
903
+ - `<Combobox.Chip>` draws a `<span>`. One chosen value.
904
+ - `value: unknown`: Required. The chosen value this chip stands for.
905
+ - `<Combobox.ChipRemove>` draws a `<button>`.
906
+ - `<Combobox.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
907
+ - `<Combobox.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
908
+ - `<Combobox.Popup>` draws a `<div>`.
909
+ - `<Combobox.List>` draws a `<div>`.
910
+ - `<Combobox.Group>` draws a `<div>`. Items that belong together, named by their label. Hidden while none is shown.
911
+ - `<Combobox.GroupLabel>` draws a `<div>`. The name of a group. Outside a group it is plain text, and names nothing.
912
+ - `<Combobox.Separator>` draws a `<div>`. A line between groups.
913
+ - `<Combobox.Item>` draws a `<div>`.
914
+ - `value: unknown`: Required. What the combobox's value is while this item is chosen.
915
+ - `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
916
+ - `label?: string`: What is filtered and what the input shows; the item's text when left out.
917
+ - `index?: number`: Its place among all the rows, in a virtualized list.
918
+ - `<Combobox.ItemIndicator>` draws a `<span>`. A mark an item shows while it is the chosen one.
919
+ - `keepMounted?: boolean`: Keeps the mark in the page while its item is not chosen.
920
+ - `<Combobox.Empty>` draws a `<div>`. What is shown when no item is.
373
921
 
374
922
  Attributes and CSS variables, by part:
375
923
 
376
- - input: The text input. What is typed filters the list, which is placed against it.
924
+ - input: The text input. What is typed filters the list, which is placed against it, or against the chips' box when it is in one. Inside the popup, it takes focus while the popup is open.
377
925
  - `data-popup-open`: Present when the list is open.
378
926
  - `data-disabled`: Present when it is disabled.
379
- - trigger: A button that opens and closes the list.
927
+ - trigger: A button that opens and closes the list. With the input inside the popup it is the combobox: a stop for Tab, and what the popup is placed against.
380
928
  - `data-popup-open`: Present when the list is open.
381
929
  - `data-disabled`: Present when it is disabled.
382
- - positioner: Places the list against the input. It carries the geometry.
930
+ - positioner: Places the list against the input: against the chips' box when the input is in one, the button when the input is inside the popup, or its own `anchor`. It carries the geometry.
383
931
  - `data-open`: Present when it is open.
384
932
  - `data-closed`: Present when it is closed.
385
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
933
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
386
934
  - `data-align="start | center | end"`: How it is aligned with the anchor.
387
935
  - `--anchor-width`: The anchor's width.
388
936
  - `--anchor-height`: The anchor's height.
389
937
  - `--available-width`: The width between the anchor and the edge of the viewport.
390
938
  - `--available-height`: The height between the anchor and the edge of the viewport.
391
939
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
392
- - popup: The list of items.
940
+ - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list.
393
941
  - `data-open`: Present when it is open.
394
942
  - `data-closed`: Present when it is closed.
395
943
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
396
944
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
397
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
945
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
398
946
  - `data-align="start | center | end"`: How it is aligned with the anchor.
399
947
  - `data-empty`: Present when no item is shown for what was typed.
948
+ - list: The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
949
+ - `data-empty`: Present when no item is shown for what was typed.
400
950
  - item: One choice in the list.
401
951
  - `data-selected`: Present on the chosen item.
402
952
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
@@ -414,15 +964,44 @@ import { Command } from "@kirana-ui/solid/command"
414
964
 
415
965
  Parts: `<Command.Root>`, `<Command.Input>`, `<Command.List>`, `<Command.Empty>`, `<Command.Group>`, `<Command.GroupHeading>`, `<Command.Item>`, `<Command.Separator>`.
416
966
 
967
+ Anatomy:
968
+
969
+ ```
970
+ <Command.Root>
971
+ <Command.Input>
972
+ <Command.List>
973
+ <Command.Empty>
974
+ <Command.Group> (optional, repeated)
975
+ <Command.GroupHeading>
976
+ <Command.Item> (repeated)
977
+ <Command.Separator> (repeated)
978
+ ```
979
+
417
980
  Props of its root:
418
981
 
419
982
  - `inputValue?: string`: What the input says.
420
- - `defaultInputValue?: string`
421
- - `onInputValueChange?: ((value: string, details: ChangeDetails) => void)`
422
- - `onSelect?: ((value: string, details: ChangeDetails) => void)`: An item was chosen: pressed, or Enter while it was highlighted.
983
+ - `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once.
984
+ - `onInputValueChange?: (value: string, details: ChangeDetails) => void`: Heard as the input's text is about to change: `details.cancel()` keeps it as it was.
985
+ - `onSelect?: (value: string, details: ChangeDetails) => void`: An item was chosen. It takes the place of the element's own `select` event.
423
986
  - `filter?: ((label: string, query: string, keywords: readonly string[]) => boolean) | null`: Whether an item is shown for what was typed. Default: its label or one of its keywords holds the text, without regard to case. `null`: every item is shown, and the caller draws the ones it wants.
424
987
  - `loop?: boolean`: Whether a step past an end of the list goes round to the other.
425
- - `disabled?: boolean`
988
+ - `disabled?: boolean`: Disabled: nothing can be typed or chosen.
989
+
990
+ Each part, and its own props:
991
+
992
+ - `<Command.Root>` draws a `<div>`. Its props are above.
993
+ - `<Command.Input>` draws a `<input>`.
994
+ - `<Command.List>` draws a `<div>`.
995
+ - `<Command.Empty>` draws a `<div>`. What is shown when no item is.
996
+ - `<Command.Group>` draws a `<div>`. Items under a heading. Hidden while none of them is shown.
997
+ - `<Command.GroupHeading>` draws a `<div>`. A group's name.
998
+ - `<Command.Item>` draws a `<div>`.
999
+ - `value: string`: Required. What `onSelect` is told.
1000
+ - `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
1001
+ - `label?: string`: What is filtered; the item's text when left out.
1002
+ - `keywords?: readonly string[]`: Other words the item answers to.
1003
+ - `<Command.Separator>` draws a `<div>`. A line between groups. Hidden while something is typed.
1004
+ - `alwaysRender?: boolean`: Stays while something is typed.
426
1005
 
427
1006
  Attributes and CSS variables, by part:
428
1007
 
@@ -444,15 +1023,88 @@ import { ContextMenu } from "@kirana-ui/solid/context-menu"
444
1023
 
445
1024
  Parts: `<ContextMenu.Root>`, `<ContextMenu.Trigger>`, `<ContextMenu.Portal>`, `<ContextMenu.Positioner>`, `<ContextMenu.Popup>`, `<ContextMenu.Arrow>`, `<ContextMenu.Item>`, `<ContextMenu.LinkItem>`, `<ContextMenu.Group>`, `<ContextMenu.GroupLabel>`, `<ContextMenu.Separator>`, `<ContextMenu.CheckboxItem>`, `<ContextMenu.CheckboxItemIndicator>`, `<ContextMenu.RadioGroup>`, `<ContextMenu.RadioItem>`, `<ContextMenu.RadioItemIndicator>`, `<ContextMenu.SubmenuRoot>`, `<ContextMenu.SubmenuTrigger>`.
446
1025
 
1026
+ Anatomy:
1027
+
1028
+ ```
1029
+ <ContextMenu.Root>
1030
+ <ContextMenu.Trigger>
1031
+ <ContextMenu.Portal>
1032
+ <ContextMenu.Positioner>
1033
+ <ContextMenu.Popup>
1034
+ <ContextMenu.Arrow>
1035
+ <ContextMenu.Group> (optional, repeated)
1036
+ <ContextMenu.Item> (repeated)
1037
+ <ContextMenu.LinkItem> (repeated)
1038
+ <ContextMenu.GroupLabel>
1039
+ <ContextMenu.CheckboxItem> (repeated)
1040
+ <ContextMenu.CheckboxItemIndicator>
1041
+ <ContextMenu.RadioGroup> (repeated)
1042
+ <ContextMenu.RadioItem> (repeated)
1043
+ <ContextMenu.RadioItemIndicator>
1044
+ <ContextMenu.SubmenuRoot> (repeated)
1045
+ <ContextMenu.Portal> (as above)
1046
+ <ContextMenu.SubmenuTrigger>
1047
+ <ContextMenu.Separator> (repeated)
1048
+ ```
1049
+
447
1050
  Props of its root:
448
1051
 
449
- - `open?: boolean`
450
- - `defaultOpen?: boolean`
451
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
1052
+ - `open?: boolean`: Whether it is open, when the caller holds it.
1053
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1054
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
452
1055
  - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
453
1056
  - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
454
1057
  - `modal?: boolean`: Holds the page while the menu is open: its scroll is locked, and a press outside closes the menu and reaches nothing. Default: it does not. Not for a submenu.
455
1058
 
1059
+ Each part, and its own props:
1060
+
1061
+ - `<ContextMenu.Root>` draws no element. Holds the menu: whether it is open. Its props are above.
1062
+ - `<ContextMenu.Trigger>` draws a `<div>`.
1063
+ - `<ContextMenu.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1064
+ - `<ContextMenu.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
1065
+ - `<ContextMenu.Popup>` draws a `<div>`.
1066
+ - `<ContextMenu.Arrow>` draws a `<div>`.
1067
+ - `<ContextMenu.Item>` draws a `<div>`.
1068
+ - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1069
+ - `label?: string`: What typing matches; the item's text when left out.
1070
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does for an item, and does not for a checkbox or a radio item.
1071
+ - `<ContextMenu.LinkItem>` draws a `<a>`.
1072
+ - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1073
+ - `label?: string`: What typing matches; the item's text when left out.
1074
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does for an item, and does not for a checkbox or a radio item.
1075
+ - `<ContextMenu.Group>` draws a `<div>`. Items that belong together, named by their label.
1076
+ - `<ContextMenu.GroupLabel>` draws a `<div>`. The name of a group. Outside a group it is plain text, and names nothing.
1077
+ - `<ContextMenu.Separator>` draws a `<div>`. A line between items.
1078
+ - `<ContextMenu.CheckboxItem>` draws a `<div>`.
1079
+ - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1080
+ - `label?: string`: What typing matches; the item's text when left out.
1081
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does for an item, and does not for a checkbox or a radio item.
1082
+ - `checked?: boolean`: Whether the item is checked, when the caller holds it.
1083
+ - `defaultChecked?: boolean`: Whether the item starts checked, when the caller does not hold `checked`. Read once.
1084
+ - `onCheckedChange?: (checked: boolean, details: ChangeDetails) => void`: Heard as the item is about to be checked or unchecked: `details.cancel()` keeps it as it was.
1085
+ - `<ContextMenu.CheckboxItemIndicator>` draws a `<span>`.
1086
+ - `keepMounted?: boolean`: Keeps the mark in the page while its item is not checked.
1087
+ - `<ContextMenu.RadioGroup>` draws a `<div>`. Generic: `<Value = unknown>`. `Value` is what a radio item's `value` is: the group's `value` holds the chosen one.
1088
+ - `value?: Value | null`: The chosen value; `null` is "none".
1089
+ - `defaultValue?: Value | null`: The value it starts with, when the caller does not hold `value`. Read once.
1090
+ - `onValueChange?: (value: Value, details: ChangeDetails) => void`: Told an item's own value, never `null`: a press chooses, and nothing takes the choice back.
1091
+ - `disabled?: boolean`: Disables every item of the group.
1092
+ - `<ContextMenu.RadioItem>` draws a `<div>`.
1093
+ - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1094
+ - `label?: string`: What typing matches; the item's text when left out.
1095
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does for an item, and does not for a checkbox or a radio item.
1096
+ - `value: unknown`: Required. What the radio group's value is while this item is the chosen one.
1097
+ - `<ContextMenu.RadioItemIndicator>` draws a `<span>`.
1098
+ - `keepMounted?: boolean`: Keeps the mark in the page while its item is not checked.
1099
+ - `<ContextMenu.SubmenuRoot>` draws no element. A submenu: it holds the item that opens it and a portal, positioner and popup of its own.
1100
+ - `open?: boolean`: Whether it is open, when the caller holds it.
1101
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1102
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
1103
+ - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
1104
+ - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
1105
+ - `modal?: boolean`: Holds the page while the menu is open: its scroll is locked, and a press outside closes the menu and reaches nothing. Default: it does not. Not for a submenu.
1106
+ - `<ContextMenu.SubmenuTrigger>` draws a `<div>`.
1107
+
456
1108
  Attributes and CSS variables, by part:
457
1109
 
458
1110
  - trigger: The area a secondary press, or a long press on a touch screen, opens the menu in.
@@ -460,7 +1112,7 @@ Attributes and CSS variables, by part:
460
1112
  - positioner: Places the menu against its trigger. It carries the geometry.
461
1113
  - `data-open`: Present when it is open.
462
1114
  - `data-closed`: Present when it is closed.
463
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1115
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
464
1116
  - `data-align="start | center | end"`: How it is aligned with the anchor.
465
1117
  - `--anchor-width`: The anchor's width.
466
1118
  - `--anchor-height`: The anchor's height.
@@ -472,10 +1124,10 @@ Attributes and CSS variables, by part:
472
1124
  - `data-closed`: Present when it is closed.
473
1125
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
474
1126
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
475
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1127
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
476
1128
  - `data-align="start | center | end"`: How it is aligned with the anchor.
477
1129
  - arrow: An element that points at the trigger.
478
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1130
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
479
1131
  - `data-align="start | center | end"`: How it is aligned with the anchor.
480
1132
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
481
1133
  - item: An action. Choosing it closes the menu.
@@ -515,21 +1167,39 @@ import { DateField } from "@kirana-ui/solid/date-field"
515
1167
 
516
1168
  Parts: `<DateField.Root>`, `<DateField.Segments>`, `<DateField.Segment>`, `<DateField.Input>`.
517
1169
 
1170
+ Anatomy:
1171
+
1172
+ ```
1173
+ <DateField.Root>
1174
+ <DateField.Segments>
1175
+ <DateField.Segment> (repeated)
1176
+ <DateField.Input>
1177
+ ```
1178
+
518
1179
  Props of its root:
519
1180
 
520
1181
  - `value?: IsoDate | null`: The day typed, once all of it is; `null` until then.
521
- - `defaultValue?: IsoDate | null`
522
- - `onValueChange?: ((value: IsoDate | null, details: ChangeDetails) => void)`
1182
+ - `defaultValue?: IsoDate | null`: The value it starts with, when the caller does not hold `value`. Read once.
1183
+ - `onValueChange?: (value: IsoDate | null, details: ChangeDetails) => void`: Heard as the day is about to change, once all of it is typed or as it is cleared: `details.cancel()` keeps the value as it was.
523
1184
  - `locale?: string`: The language and region that order the day, the month and the year and put what stands between them (`"en-US"`: month/day/year). Give it: a server does not know the reader's.
524
1185
  - `min?: IsoDate`: The first and the last day it takes: outside them it says it is invalid.
525
- - `max?: IsoDate`
1186
+ - `max?: IsoDate`: The last day it takes.
526
1187
  - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part shows. Default: `dd`, `mm`, `yyyy`.
527
- - `disabled?: boolean`
528
- - `readOnly?: boolean`
529
- - `required?: boolean`
1188
+ - `disabled?: boolean`: Disabled: it cannot be changed.
1189
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
1190
+ - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
530
1191
  - `name?: string`: The name it is submitted under, by its hidden input.
531
1192
  - `form?: string`: The id of the form it belongs to, when it is not inside it.
532
1193
 
1194
+ Each part, and its own props:
1195
+
1196
+ - `<DateField.Root>` draws a `<div>`. Its props are above.
1197
+ - `<DateField.Segments>` draws no element. The date's segments, in the locale's order: each is given to draw.
1198
+ - `children: (segment: DateFieldSegment) => JSX.Element`: Required. Draws one piece of the date, once for each: a part that is typed, or what stands between two.
1199
+ - `<DateField.Segment>` draws a `<span>`.
1200
+ - `segment: DateFieldSegment`: Required. The piece it is: an entry `DateField.Segments` gave.
1201
+ - `<DateField.Input>` draws a `<input>`. The hidden input it is submitted by.
1202
+
533
1203
  Attributes and CSS variables, by part:
534
1204
 
535
1205
  - root: The field: a group of the date's parts.
@@ -550,27 +1220,80 @@ import { DatePicker } from "@kirana-ui/solid/date-picker"
550
1220
 
551
1221
  Parts: `<DatePicker.Root>`, `<DatePicker.Field>`, `<DatePicker.Segments>`, `<DatePicker.Segment>`, `<DatePicker.Input>`, `<DatePicker.Trigger>`, `<DatePicker.Portal>`, `<DatePicker.Positioner>`, `<DatePicker.Popup>`, `<DatePicker.Calendar>`, `<DatePicker.Heading>`, `<DatePicker.Previous>`, `<DatePicker.Next>`, `<DatePicker.Grid>`, `<DatePicker.Weekdays>`, `<DatePicker.HeadCell>`, `<DatePicker.Weeks>`, `<DatePicker.Cell>`, `<DatePicker.Day>`.
552
1222
 
1223
+ Anatomy:
1224
+
1225
+ ```
1226
+ <DatePicker.Root>
1227
+ <DatePicker.Field>
1228
+ <DatePicker.Segments>
1229
+ <DatePicker.Segment> (repeated)
1230
+ <DatePicker.Input>
1231
+ <DatePicker.Trigger>
1232
+ <DatePicker.Portal>
1233
+ <DatePicker.Positioner>
1234
+ <DatePicker.Popup>
1235
+ <DatePicker.Calendar>
1236
+ <DatePicker.Heading>
1237
+ <DatePicker.Previous>
1238
+ <DatePicker.Next>
1239
+ <DatePicker.Grid>
1240
+ <DatePicker.Weekdays>
1241
+ <DatePicker.HeadCell> (repeated)
1242
+ <DatePicker.Weeks>
1243
+ <DatePicker.Cell> (repeated)
1244
+ <DatePicker.Day>
1245
+ ```
1246
+
553
1247
  Props of its root:
554
1248
 
555
1249
  - `value?: IsoDate | null`: The day, typed or picked; `null` for none.
556
- - `defaultValue?: IsoDate | null`
557
- - `onValueChange?: ((value: IsoDate | null, details: ChangeDetails) => void)`
558
- - `open?: boolean`
559
- - `defaultOpen?: boolean`
560
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
1250
+ - `defaultValue?: IsoDate | null`: The value it starts with, when the caller does not hold `value`. Read once.
1251
+ - `onValueChange?: (value: IsoDate | null, details: ChangeDetails) => void`: Heard as the day is about to change, typed or picked: `details.cancel()` keeps the value as it was.
1252
+ - `open?: boolean`: Whether the calendar is open, when the caller holds it.
1253
+ - `defaultOpen?: boolean`: Whether the calendar starts open, when the caller does not hold `open`. Read once.
1254
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as the calendar is about to open or close: `details.cancel()` keeps it as it was.
561
1255
  - `locale?: string`: The language and region of the field and the calendar. Give it: a server does not know.
562
1256
  - `min?: IsoDate`: The first and the last day that can be typed or picked.
563
- - `max?: IsoDate`
564
- - `isDateUnavailable?: CalendarProps["isDateUnavailable"]`: Days that cannot be picked in the calendar.
565
- - `calendarSystem?: CalendarProps["calendarSystem"]`: The calendar its months are laid out in, when it is not the Gregorian one.
1257
+ - `max?: IsoDate`: The last day that can be typed or picked.
1258
+ - `isDateUnavailable?: (date: IsoDate) => boolean`: Days that cannot be picked in the calendar.
1259
+ - `calendarSystem?: CalendarSystem`: The calendar its months are laid out in, when it is not the Gregorian one.
566
1260
  - `fixedWeeks?: boolean`: Always six rows of days.
567
- - `placeholders?: DateFieldProps["placeholders"]`: What an empty part of the field shows.
568
- - `disabled?: boolean`
569
- - `readOnly?: boolean`
570
- - `required?: boolean`
1261
+ - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part of the field shows.
1262
+ - `disabled?: boolean`: Disabled: it cannot be changed.
1263
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
1264
+ - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
571
1265
  - `name?: string`: The name it is submitted under.
572
1266
  - `form?: string`: The id of the form it belongs to, when it is not inside it.
573
1267
 
1268
+ Each part, and its own props:
1269
+
1270
+ - `<DatePicker.Root>` draws no element. Holds the date picker: its value, the month shown and whether the calendar is open. Its props are above.
1271
+ - `<DatePicker.Field>` draws a `<div>`.
1272
+ - `<DatePicker.Segments>` draws no element. The date's segments, in the locale's order: each is given to draw.
1273
+ - `children: (segment: DateFieldSegment) => JSX.Element`: Required. Draws one piece of the date, once for each: a part that is typed, or what stands between two.
1274
+ - `<DatePicker.Segment>` draws a `<span>`.
1275
+ - `segment: DateFieldSegment`: Required. The piece it is: an entry `DateField.Segments` gave.
1276
+ - `<DatePicker.Input>` draws a `<input>`. The hidden input it is submitted by.
1277
+ - `<DatePicker.Trigger>` draws a `<button>`.
1278
+ - `<DatePicker.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1279
+ - `<DatePicker.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
1280
+ - `<DatePicker.Popup>` draws a `<div>`.
1281
+ - `<DatePicker.Calendar>` draws a `<div>`.
1282
+ - `<DatePicker.Heading>` draws a `<div>`. Names the month shown. Read out when it changes.
1283
+ - `<DatePicker.Previous>` draws a `<button>`.
1284
+ - `<DatePicker.Next>` draws a `<button>`.
1285
+ - `<DatePicker.Grid>` draws a `<table>`. The table of days: a grid the arrows move in.
1286
+ - `<DatePicker.Weekdays>` draws no element. The days of the week: each is given to draw its head cell.
1287
+ - `children: (weekday: CalendarWeekday) => JSX.Element`: Required. Draws one day of the week, once for each: its heading cell.
1288
+ - `<DatePicker.HeadCell>` draws a `<th>`. A column's heading: a day of the week.
1289
+ - `weekday: CalendarWeekday`: Required. The day of the week it heads: an entry `Calendar.Weekdays` gave.
1290
+ - `<DatePicker.Weeks>` draws no element. The weeks of the month shown: each is given to draw its row of days.
1291
+ - `children: (week: readonly CalendarDay[]) => JSX.Element`: Required. Draws one week, once for each of the month shown: a row of its days.
1292
+ - `<DatePicker.Cell>` draws a `<td>`.
1293
+ - `date: string`: Required. The day it holds, as `Calendar.Weeks` gave it: `day.date`.
1294
+ - `<DatePicker.Day>` draws a `<button>`.
1295
+ - `date: string`: Required. The day it is the button of, as `Calendar.Weeks` gave it: `day.date`.
1296
+
574
1297
  Attributes and CSS variables, by part:
575
1298
 
576
1299
  - field: The field: a group of the date's parts.
@@ -587,7 +1310,7 @@ Attributes and CSS variables, by part:
587
1310
  - positioner: Places the popup against the trigger. It carries the geometry.
588
1311
  - `data-open`: Present when it is open.
589
1312
  - `data-closed`: Present when it is closed.
590
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1313
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
591
1314
  - `data-align="start | center | end"`: How it is aligned with the anchor.
592
1315
  - `--anchor-width`: The anchor's width.
593
1316
  - `--anchor-height`: The anchor's height.
@@ -599,7 +1322,7 @@ Attributes and CSS variables, by part:
599
1322
  - `data-closed`: Present when it is closed.
600
1323
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
601
1324
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
602
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1325
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
603
1326
  - `data-align="start | center | end"`: How it is aligned with the anchor.
604
1327
  - calendar: The calendar.
605
1328
  - `data-disabled`: Present when it is disabled.
@@ -633,14 +1356,38 @@ import { Dialog } from "@kirana-ui/solid/dialog"
633
1356
 
634
1357
  Parts: `<Dialog.Root>`, `<Dialog.Trigger>`, `<Dialog.Portal>`, `<Dialog.Backdrop>`, `<Dialog.Popup>`, `<Dialog.Title>`, `<Dialog.Description>`, `<Dialog.Close>`.
635
1358
 
1359
+ Anatomy:
1360
+
1361
+ ```
1362
+ <Dialog.Root>
1363
+ <Dialog.Trigger>
1364
+ <Dialog.Portal>
1365
+ <Dialog.Backdrop>
1366
+ <Dialog.Popup>
1367
+ <Dialog.Title>
1368
+ <Dialog.Description>
1369
+ <Dialog.Close>
1370
+ ```
1371
+
636
1372
  Props of its root:
637
1373
 
638
- - `open?: boolean`
639
- - `defaultOpen?: boolean`
640
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
1374
+ - `open?: boolean`: Whether it is open, when the caller holds it.
1375
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1376
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
641
1377
  - `modal?: boolean`: Blocks the page behind it and traps focus. Default `true`.
642
1378
  - `dismissible?: boolean`: Whether a press outside closes it. Default `true`.
643
1379
 
1380
+ Each part, and its own props:
1381
+
1382
+ - `<Dialog.Root>` draws no element. Holds the dialog: whether it is open. Its props are above.
1383
+ - `<Dialog.Trigger>` draws a `<button>`.
1384
+ - `<Dialog.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1385
+ - `<Dialog.Backdrop>` draws a `<div>`.
1386
+ - `<Dialog.Popup>` draws a `<div>`.
1387
+ - `<Dialog.Title>` draws a `<h2>`. The heading that names the dialog.
1388
+ - `<Dialog.Description>` draws a `<p>`. The text that describes the dialog.
1389
+ - `<Dialog.Close>` draws a `<button>`. A button that closes the dialog.
1390
+
644
1391
  Attributes and CSS variables, by part:
645
1392
 
646
1393
  - trigger: The button that opens the dialog.
@@ -658,12 +1405,6 @@ Attributes and CSS variables, by part:
658
1405
  - `data-nested-dialog-open`: Present when another dialog is open above this one.
659
1406
  - `--nested-dialogs`: How many dialogs are open above this one.
660
1407
 
661
- ### DirectionProvider
662
-
663
- ```
664
- import { DirectionProvider } from "@kirana-ui/solid/direction-provider"
665
- ```
666
-
667
1408
  ### Drawer
668
1409
 
669
1410
  ```
@@ -672,18 +1413,42 @@ import { Drawer } from "@kirana-ui/solid/drawer"
672
1413
 
673
1414
  Parts: `<Drawer.Root>`, `<Drawer.Trigger>`, `<Drawer.Portal>`, `<Drawer.Backdrop>`, `<Drawer.Popup>`, `<Drawer.Title>`, `<Drawer.Description>`, `<Drawer.Close>`.
674
1415
 
1416
+ Anatomy:
1417
+
1418
+ ```
1419
+ <Drawer.Root>
1420
+ <Drawer.Trigger>
1421
+ <Drawer.Portal>
1422
+ <Drawer.Backdrop>
1423
+ <Drawer.Popup>
1424
+ <Drawer.Title>
1425
+ <Drawer.Description>
1426
+ <Drawer.Close>
1427
+ ```
1428
+
675
1429
  Props of its root:
676
1430
 
677
- - `open?: boolean`
678
- - `defaultOpen?: boolean`
679
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
1431
+ - `open?: boolean`: Whether it is open, when the caller holds it.
1432
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1433
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
680
1434
  - `modal?: boolean`: Blocks the page behind it and traps focus. Default `true`.
681
1435
  - `dismissible?: boolean`: Whether a press outside closes it. Default `true`.
682
1436
  - `swipeDirection?: DrawerSide`: The way it is dragged to close it: the edge it came from. Default: `"down"`.
683
1437
  - `snapPoints?: readonly DrawerSnapPoint[]`: Places it rests at, each how much of itself shows: a share (`0.4`, or `"40%"`) or a length (`"148px"`, `"20rem"`). `[0.4, 1]` is a drawer that opens two fifths shown and is dragged up to the whole. Without any, it is whole.
684
1438
  - `snapPoint?: DrawerSnapPoint`: Which of them it rests at, as it was given.
685
1439
  - `defaultSnapPoint?: DrawerSnapPoint`: Where it opens. Default: the smallest.
686
- - `onSnapPointChange?: ((snapPoint: DrawerSnapPoint, details: ChangeDetails) => void)`
1440
+ - `onSnapPointChange?: (snapPoint: DrawerSnapPoint, details: ChangeDetails) => void`: Heard as it is about to rest at another snap point: `details.cancel()` keeps it where it was.
1441
+
1442
+ Each part, and its own props:
1443
+
1444
+ - `<Drawer.Root>` draws no element. Holds the dialog: whether it is open. Its props are above.
1445
+ - `<Drawer.Trigger>` draws a `<button>`.
1446
+ - `<Drawer.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1447
+ - `<Drawer.Backdrop>` draws a `<div>`. A drawer's backdrop and popup say more than a dialog's: how they are being dragged.
1448
+ - `<Drawer.Popup>` draws a `<div>`.
1449
+ - `<Drawer.Title>` draws a `<h2>`. The heading that names the dialog.
1450
+ - `<Drawer.Description>` draws a `<p>`. The text that describes the dialog.
1451
+ - `<Drawer.Close>` draws a `<button>`. A button that closes the dialog.
687
1452
 
688
1453
  Attributes and CSS variables, by part:
689
1454
 
@@ -730,15 +1495,37 @@ import { Field } from "@kirana-ui/solid/field"
730
1495
 
731
1496
  Parts: `<Field.Root>`, `<Field.Label>`, `<Field.Control>`, `<Field.Description>`, `<Field.Error>`, `<Field.Validity>`.
732
1497
 
1498
+ Anatomy:
1499
+
1500
+ ```
1501
+ <Field.Root>
1502
+ <Field.Label>
1503
+ <Field.Control>
1504
+ <Field.Description>
1505
+ <Field.Error>
1506
+ <Field.Validity>
1507
+ ```
1508
+
733
1509
  Props of its root:
734
1510
 
735
1511
  - `name?: string`: The control's name in the form.
736
- - `disabled?: boolean`
1512
+ - `disabled?: boolean`: Disables the field: its control cannot be changed, and its parts say so (`data-disabled`).
737
1513
  - `invalid?: boolean`: Invalid whatever the value: an error known from elsewhere.
738
- - `validate?: | (( value: string ) => string | readonly string[] | null | Promise<string | readonly string[] | null>)`: The field's own check, after the browser's: a message or several when the value is wrong, `null` when it is right. It may answer later, with a promise.
1514
+ - `validate?: ( value: string ) => string | readonly string[] | null | Promise<string | readonly string[] | null>`: The field's own check, after the browser's: a message or several when the value is wrong, `null` when it is right. It may answer later, with a promise.
739
1515
  - `validationMode?: ValidationMode`: When the value is checked; the form's by default, else `"onSubmit"`.
740
1516
  - `validationDebounceTime?: number`: With `"onChange"`, how long the value must rest before it is checked, in milliseconds.
741
1517
 
1518
+ Each part, and its own props:
1519
+
1520
+ - `<Field.Root>` draws a `<div>`. Its props are above.
1521
+ - `<Field.Label>` draws a `<label>`.
1522
+ - `<Field.Control>` draws a `<input>`.
1523
+ - `<Field.Description>` draws a `<p>`.
1524
+ - `<Field.Error>` draws a `<div>`.
1525
+ - `match?: ValidityKey | boolean`: One of the browser's findings (`"valueMissing"`) to show for only that; `true` to show always.
1526
+ - `<Field.Validity>` draws no element. Gives the control's validity to what it holds, to draw from.
1527
+ - `children: (validity: () => FieldValidity) => JSX.Element`: Required. Draws from the field's validity: whether it is valid, what was found wrong, the messages.
1528
+
742
1529
  Attributes and CSS variables, by part:
743
1530
 
744
1531
  - root: A control with its label, its description and its errors.
@@ -792,10 +1579,22 @@ import { Fieldset } from "@kirana-ui/solid/fieldset"
792
1579
 
793
1580
  Parts: `<Fieldset.Root>`, `<Fieldset.Legend>`.
794
1581
 
1582
+ Anatomy:
1583
+
1584
+ ```
1585
+ <Fieldset.Root>
1586
+ <Fieldset.Legend>
1587
+ ```
1588
+
795
1589
  Props of its root:
796
1590
 
797
1591
  - `disabled?: boolean`: Disables every field inside.
798
1592
 
1593
+ Each part, and its own props:
1594
+
1595
+ - `<Fieldset.Root>` draws a `<fieldset>`. Its props are above.
1596
+ - `<Fieldset.Legend>` draws a `<div>`.
1597
+
799
1598
  Attributes and CSS variables, by part:
800
1599
 
801
1600
  - root: The group of fields.
@@ -812,10 +1611,12 @@ import { Form } from "@kirana-ui/solid/form"
812
1611
  Props:
813
1612
 
814
1613
  - `errors?: FormErrors`: Errors from outside the page (a server's), by field name. A field shows its own until its value changes.
815
- - `onClearErrors?: ((errors: FormErrors) => void)`: A field's value changed while it showed an error from `errors`: what is left of them.
816
- - `onFormSubmit?: ((values: FormValues, details: ChangeDetails) => void)`: Every field is valid. Given this, the page is not left: the values come as an object. Without it, the form submits as a form does.
1614
+ - `onClearErrors?: (errors: FormErrors) => void`: A field's value changed while it showed an error from `errors`: what is left of them.
1615
+ - `onFormSubmit?: (values: FormValues, details: ChangeDetails) => void`: Every field is valid. Given this, the page is not left: the values come as an object. Without it, the form submits as a form does.
817
1616
  - `validationMode?: ValidationMode`: When the form's fields check their values, unless a field says otherwise. Default `"onSubmit"`.
818
1617
 
1618
+ `<Form>` draws a `<form>`. The form. A submit checks every field in it and stops, with focus on the first that is invalid.
1619
+
819
1620
  ### HoverCard
820
1621
 
821
1622
  ```
@@ -824,14 +1625,36 @@ import { HoverCard } from "@kirana-ui/solid/hover-card"
824
1625
 
825
1626
  Parts: `<HoverCard.Root>`, `<HoverCard.Trigger>`, `<HoverCard.Portal>`, `<HoverCard.Positioner>`, `<HoverCard.Popup>`, `<HoverCard.Arrow>`.
826
1627
 
1628
+ Anatomy:
1629
+
1630
+ ```
1631
+ <HoverCard.Root>
1632
+ <HoverCard.Trigger>
1633
+ <HoverCard.Portal>
1634
+ <HoverCard.Positioner>
1635
+ <HoverCard.Popup>
1636
+ <HoverCard.Arrow>
1637
+ ```
1638
+
827
1639
  Props of its root:
828
1640
 
829
- - `open?: boolean`
830
- - `defaultOpen?: boolean`
831
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
1641
+ - `open?: boolean`: Whether it is open, when the caller holds it.
1642
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1643
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
832
1644
  - `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds.
833
1645
  - `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds.
834
- - `disabled?: boolean`
1646
+ - `disabled?: boolean`: Disabled: the pointer and focus do not open it.
1647
+
1648
+ Each part, and its own props:
1649
+
1650
+ - `<HoverCard.Root>` draws no element. Holds the card: whether it is open. Its props are above.
1651
+ - `<HoverCard.Trigger>` draws a `<a>`.
1652
+ - `delay?: number`: How long the pointer rests on this trigger before the popup opens, in milliseconds.
1653
+ - `closeDelay?: number`: How long after the pointer leaves this trigger's popup closes, in milliseconds.
1654
+ - `<HoverCard.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1655
+ - `<HoverCard.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
1656
+ - `<HoverCard.Popup>` draws a `<div>`.
1657
+ - `<HoverCard.Arrow>` draws a `<div>`.
835
1658
 
836
1659
  Attributes and CSS variables, by part:
837
1660
 
@@ -840,7 +1663,7 @@ Attributes and CSS variables, by part:
840
1663
  - positioner: Places the popup against the trigger. It carries the geometry.
841
1664
  - `data-open`: Present when it is open.
842
1665
  - `data-closed`: Present when it is closed.
843
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1666
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
844
1667
  - `data-align="start | center | end"`: How it is aligned with the anchor.
845
1668
  - `--anchor-width`: The anchor's width.
846
1669
  - `--anchor-height`: The anchor's height.
@@ -852,11 +1675,11 @@ Attributes and CSS variables, by part:
852
1675
  - `data-closed`: Present when it is closed.
853
1676
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
854
1677
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
855
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1678
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
856
1679
  - `data-align="start | center | end"`: How it is aligned with the anchor.
857
1680
  - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
858
1681
  - arrow: An element that points at the trigger, placed along the popup's edge.
859
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1682
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
860
1683
  - `data-align="start | center | end"`: How it is aligned with the anchor.
861
1684
  - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
862
1685
 
@@ -868,8 +1691,10 @@ import { Input } from "@kirana-ui/solid/input"
868
1691
 
869
1692
  Props:
870
1693
 
871
- - `disabled?: boolean`
872
- - `onValueChange?: ((value: string, details: ChangeDetails) => void)`: What was typed, as text, each time it changes.
1694
+ - `disabled?: boolean`: Disabled: nothing can be typed in it.
1695
+ - `onValueChange?: (value: string, details: ChangeDetails) => void`: What was typed, as text, each time it changes.
1696
+
1697
+ `<Input>` draws a `<input>`.
873
1698
 
874
1699
  Attributes and CSS variables, by part:
875
1700
 
@@ -888,6 +1713,8 @@ Attributes and CSS variables, by part:
888
1713
  import { Label } from "@kirana-ui/solid/label"
889
1714
  ```
890
1715
 
1716
+ `<Label>` draws a `<label>`.
1717
+
891
1718
  Attributes and CSS variables, by part:
892
1719
 
893
1720
  - label: A control's name. Inside a field it is the field's label, with its states.
@@ -907,18 +1734,41 @@ import { Listbox } from "@kirana-ui/solid/listbox"
907
1734
 
908
1735
  Parts: `<Listbox.Root>`, `<Listbox.Item>`, `<Listbox.ItemIndicator>`, `<Listbox.Group>`, `<Listbox.GroupLabel>`.
909
1736
 
1737
+ Anatomy:
1738
+
1739
+ ```
1740
+ <Listbox.Root>
1741
+ <Listbox.Group> (optional, repeated)
1742
+ <Listbox.Item> (repeated)
1743
+ <Listbox.ItemIndicator>
1744
+ <Listbox.GroupLabel>
1745
+ ```
1746
+
910
1747
  Props of its root:
911
1748
 
912
1749
  - `value?: readonly Value[]`: The chosen values: none, one, or with `multiple` several.
913
- - `defaultValue?: readonly Value[]`
914
- - `onValueChange?: ((value: Value[], details: ChangeDetails) => void)`
1750
+ - `defaultValue?: readonly Value[]`: The values it starts with, when the caller does not hold `value`. Read once.
1751
+ - `onValueChange?: (value: Value[], details: ChangeDetails) => void`: Heard as an item is about to be chosen or taken away, with the values there would then be: `details.cancel()` keeps them as they were.
915
1752
  - `multiple?: boolean`: Whether more than one can be chosen: a press then adds or takes away.
916
- - `disabled?: boolean`
1753
+ - `disabled?: boolean`: Disabled: no item can be chosen.
917
1754
  - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do not.
918
1755
  - `name?: string`: With a name, the chosen values are submitted with the form around the list.
919
1756
  - `form?: string`: The id of the form the list belongs to, when it is not inside it.
920
1757
  - `virtualized?: ListCollection`: Every row, when only some are in the page (a virtualizer draws the ones in view): how many there are, their names, and how to bring one into the page. Each item is then given its `index`.
921
1758
 
1759
+ Each part, and its own props:
1760
+
1761
+ - `<Listbox.Root>` draws a `<div>`. Generic: `<Value = unknown>`. `Value` is what an item's `value` is: the root's `value` holds the chosen ones. Its props are above.
1762
+ - `<Listbox.Item>` draws a `<div>`.
1763
+ - `value: unknown`: Required. What is in the listbox's value while this item is chosen.
1764
+ - `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
1765
+ - `label?: string`: What typing matches; the item's text when left out.
1766
+ - `index?: number`: Its place among all the rows, in a virtualized list.
1767
+ - `<Listbox.ItemIndicator>` draws a `<span>`.
1768
+ - `keepMounted?: boolean`: Keeps the mark in the page while its item is not chosen.
1769
+ - `<Listbox.Group>` draws a `<div>`. Items that belong together, named by their label.
1770
+ - `<Listbox.GroupLabel>` draws a `<div>`. The name of a group.
1771
+
922
1772
  Attributes and CSS variables, by part:
923
1773
 
924
1774
  - root: The list. It is one stop for Tab.
@@ -938,15 +1788,88 @@ import { Menu } from "@kirana-ui/solid/menu"
938
1788
 
939
1789
  Parts: `<Menu.Root>`, `<Menu.Trigger>`, `<Menu.Portal>`, `<Menu.Positioner>`, `<Menu.Popup>`, `<Menu.Arrow>`, `<Menu.Item>`, `<Menu.LinkItem>`, `<Menu.Group>`, `<Menu.GroupLabel>`, `<Menu.Separator>`, `<Menu.CheckboxItem>`, `<Menu.CheckboxItemIndicator>`, `<Menu.RadioGroup>`, `<Menu.RadioItem>`, `<Menu.RadioItemIndicator>`, `<Menu.SubmenuRoot>`, `<Menu.SubmenuTrigger>`.
940
1790
 
1791
+ Anatomy:
1792
+
1793
+ ```
1794
+ <Menu.Root>
1795
+ <Menu.Trigger>
1796
+ <Menu.Portal>
1797
+ <Menu.Positioner>
1798
+ <Menu.Popup>
1799
+ <Menu.Arrow>
1800
+ <Menu.Group> (optional, repeated)
1801
+ <Menu.Item> (repeated)
1802
+ <Menu.LinkItem> (repeated)
1803
+ <Menu.GroupLabel>
1804
+ <Menu.CheckboxItem> (repeated)
1805
+ <Menu.CheckboxItemIndicator>
1806
+ <Menu.RadioGroup> (repeated)
1807
+ <Menu.RadioItem> (repeated)
1808
+ <Menu.RadioItemIndicator>
1809
+ <Menu.SubmenuRoot> (repeated)
1810
+ <Menu.Portal> (as above)
1811
+ <Menu.SubmenuTrigger>
1812
+ <Menu.Separator> (repeated)
1813
+ ```
1814
+
941
1815
  Props of its root:
942
1816
 
943
- - `open?: boolean`
944
- - `defaultOpen?: boolean`
945
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
1817
+ - `open?: boolean`: Whether it is open, when the caller holds it.
1818
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1819
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
946
1820
  - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
947
1821
  - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
948
1822
  - `modal?: boolean`: Holds the page while the menu is open: its scroll is locked, and a press outside closes the menu and reaches nothing. Default: it does not. Not for a submenu.
949
1823
 
1824
+ Each part, and its own props:
1825
+
1826
+ - `<Menu.Root>` draws no element. Holds the menu: whether it is open. Its props are above.
1827
+ - `<Menu.Trigger>` draws a `<button>`.
1828
+ - `<Menu.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1829
+ - `<Menu.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
1830
+ - `<Menu.Popup>` draws a `<div>`.
1831
+ - `<Menu.Arrow>` draws a `<div>`.
1832
+ - `<Menu.Item>` draws a `<div>`.
1833
+ - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1834
+ - `label?: string`: What typing matches; the item's text when left out.
1835
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does for an item, and does not for a checkbox or a radio item.
1836
+ - `<Menu.LinkItem>` draws a `<a>`.
1837
+ - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1838
+ - `label?: string`: What typing matches; the item's text when left out.
1839
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does for an item, and does not for a checkbox or a radio item.
1840
+ - `<Menu.Group>` draws a `<div>`. Items that belong together, named by their label.
1841
+ - `<Menu.GroupLabel>` draws a `<div>`. The name of a group. Outside a group it is plain text, and names nothing.
1842
+ - `<Menu.Separator>` draws a `<div>`. A line between items.
1843
+ - `<Menu.CheckboxItem>` draws a `<div>`.
1844
+ - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1845
+ - `label?: string`: What typing matches; the item's text when left out.
1846
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does for an item, and does not for a checkbox or a radio item.
1847
+ - `checked?: boolean`: Whether the item is checked, when the caller holds it.
1848
+ - `defaultChecked?: boolean`: Whether the item starts checked, when the caller does not hold `checked`. Read once.
1849
+ - `onCheckedChange?: (checked: boolean, details: ChangeDetails) => void`: Heard as the item is about to be checked or unchecked: `details.cancel()` keeps it as it was.
1850
+ - `<Menu.CheckboxItemIndicator>` draws a `<span>`.
1851
+ - `keepMounted?: boolean`: Keeps the mark in the page while its item is not checked.
1852
+ - `<Menu.RadioGroup>` draws a `<div>`. Generic: `<Value = unknown>`. `Value` is what a radio item's `value` is: the group's `value` holds the chosen one.
1853
+ - `value?: Value | null`: The chosen value; `null` is "none".
1854
+ - `defaultValue?: Value | null`: The value it starts with, when the caller does not hold `value`. Read once.
1855
+ - `onValueChange?: (value: Value, details: ChangeDetails) => void`: Told an item's own value, never `null`: a press chooses, and nothing takes the choice back.
1856
+ - `disabled?: boolean`: Disables every item of the group.
1857
+ - `<Menu.RadioItem>` draws a `<div>`.
1858
+ - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1859
+ - `label?: string`: What typing matches; the item's text when left out.
1860
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does for an item, and does not for a checkbox or a radio item.
1861
+ - `value: unknown`: Required. What the radio group's value is while this item is the chosen one.
1862
+ - `<Menu.RadioItemIndicator>` draws a `<span>`.
1863
+ - `keepMounted?: boolean`: Keeps the mark in the page while its item is not checked.
1864
+ - `<Menu.SubmenuRoot>` draws no element. A submenu: it holds the item that opens it and a portal, positioner and popup of its own.
1865
+ - `open?: boolean`: Whether it is open, when the caller holds it.
1866
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1867
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
1868
+ - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
1869
+ - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
1870
+ - `modal?: boolean`: Holds the page while the menu is open: its scroll is locked, and a press outside closes the menu and reaches nothing. Default: it does not. Not for a submenu.
1871
+ - `<Menu.SubmenuTrigger>` draws a `<div>`.
1872
+
950
1873
  Attributes and CSS variables, by part:
951
1874
 
952
1875
  - trigger: The button that opens the menu, and what it is placed against.
@@ -955,7 +1878,7 @@ Attributes and CSS variables, by part:
955
1878
  - positioner: Places the menu against its trigger. It carries the geometry.
956
1879
  - `data-open`: Present when it is open.
957
1880
  - `data-closed`: Present when it is closed.
958
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1881
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
959
1882
  - `data-align="start | center | end"`: How it is aligned with the anchor.
960
1883
  - `--anchor-width`: The anchor's width.
961
1884
  - `--anchor-height`: The anchor's height.
@@ -967,10 +1890,10 @@ Attributes and CSS variables, by part:
967
1890
  - `data-closed`: Present when it is closed.
968
1891
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
969
1892
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
970
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1893
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
971
1894
  - `data-align="start | center | end"`: How it is aligned with the anchor.
972
1895
  - arrow: An element that points at the trigger.
973
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
1896
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
974
1897
  - `data-align="start | center | end"`: How it is aligned with the anchor.
975
1898
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
976
1899
  - item: An action. Choosing it closes the menu.
@@ -1014,6 +1937,8 @@ Props:
1014
1937
  - `disabled?: boolean`: No menu of the bar opens.
1015
1938
  - `orientation?: Orientation`: A row (the default) or a column of menus. In a column a menu opens beside its trigger.
1016
1939
 
1940
+ `<Menubar>` draws a `<div>`.
1941
+
1017
1942
  Attributes and CSS variables, by part:
1018
1943
 
1019
1944
  - root: The row of menus. A menu inside it is one of its items.
@@ -1028,11 +1953,27 @@ import { MessageScroller } from "@kirana-ui/solid/message-scroller"
1028
1953
 
1029
1954
  Parts: `<MessageScroller.Root>`, `<MessageScroller.Viewport>`, `<MessageScroller.Content>`, `<MessageScroller.Button>`.
1030
1955
 
1956
+ Anatomy:
1957
+
1958
+ ```
1959
+ <MessageScroller.Root>
1960
+ <MessageScroller.Viewport>
1961
+ <MessageScroller.Content>
1962
+ <MessageScroller.Button>
1963
+ ```
1964
+
1031
1965
  Props of its root:
1032
1966
 
1033
1967
  - `initial?: "bottom" | "top"`: Where it begins: at the newest message (the default), or at the first.
1034
1968
  - `threshold?: number`: How near the end counts as at it, in pixels. Default: 24.
1035
- - `onAtBottomChange?: ((atBottom: boolean, details: ChangeDetails) => void)`: Heard when it comes to the end or leaves it.
1969
+ - `onAtBottomChange?: (atBottom: boolean, details: ChangeDetails) => void`: Heard when it comes to the end or leaves it.
1970
+
1971
+ Each part, and its own props:
1972
+
1973
+ - `<MessageScroller.Root>` draws a `<div>`. Its props are above.
1974
+ - `<MessageScroller.Viewport>` draws a `<div>`.
1975
+ - `<MessageScroller.Content>` draws a `<div>`. The messages: what grows as one is written.
1976
+ - `<MessageScroller.Button>` draws a `<button>`.
1036
1977
 
1037
1978
  Attributes and CSS variables, by part:
1038
1979
 
@@ -1051,6 +1992,34 @@ import { Meter } from "@kirana-ui/solid/meter"
1051
1992
 
1052
1993
  Parts: `<Meter.Root>`, `<Meter.Track>`, `<Meter.Indicator>`, `<Meter.Value>`, `<Meter.Label>`.
1053
1994
 
1995
+ Anatomy:
1996
+
1997
+ ```
1998
+ <Meter.Root>
1999
+ <Meter.Track>
2000
+ <Meter.Indicator>
2001
+ <Meter.Value>
2002
+ <Meter.Label>
2003
+ ```
2004
+
2005
+ Props of its root:
2006
+
2007
+ - `value: number | null`: Required. The value. For a progress bar, `null` is "under way, how far is not known".
2008
+ - `min?: number`: Default 0.
2009
+ - `max?: number`: Default 100.
2010
+ - `format?: Intl.NumberFormatOptions`: How the value is written; a percentage of the range by default.
2011
+ - `locale?: string`: The language the value is written in; the page's by default.
2012
+ - `getAriaValueText?: (text: string | undefined, value: number | null) => string`: What assistive technology reads for the value, when the written value is not enough.
2013
+
2014
+ Each part, and its own props:
2015
+
2016
+ - `<Meter.Root>` draws a `<div>`. The meter: it says the value to assistive technology. Its props are above.
2017
+ - `<Meter.Track>` draws a `<div>`. The whole range.
2018
+ - `<Meter.Indicator>` draws a `<div>`. The filled part: its width is the value's share of the range.
2019
+ - `<Meter.Value>` draws a `<span>`. The value, written.
2020
+ - `children?: (text: () => string | undefined) => JSX.Element`: Draws something else than the written value: it is given the text, `undefined` while there is none.
2021
+ - `<Meter.Label>` draws a `<span>`. The meter's name.
2022
+
1054
2023
  ### NavigationMenu
1055
2024
 
1056
2025
  ```
@@ -1059,14 +2028,53 @@ import { NavigationMenu } from "@kirana-ui/solid/navigation-menu"
1059
2028
 
1060
2029
  Parts: `<NavigationMenu.Root>`, `<NavigationMenu.List>`, `<NavigationMenu.Item>`, `<NavigationMenu.Trigger>`, `<NavigationMenu.Icon>`, `<NavigationMenu.Content>`, `<NavigationMenu.Link>`, `<NavigationMenu.Portal>`, `<NavigationMenu.Positioner>`, `<NavigationMenu.Popup>`, `<NavigationMenu.Viewport>`, `<NavigationMenu.Arrow>`, `<NavigationMenu.Backdrop>`.
1061
2030
 
2031
+ Anatomy:
2032
+
2033
+ ```
2034
+ <NavigationMenu.Root>
2035
+ <NavigationMenu.List>
2036
+ <NavigationMenu.Item> (repeated)
2037
+ <NavigationMenu.Trigger>
2038
+ <NavigationMenu.Icon>
2039
+ <NavigationMenu.Content>
2040
+ <NavigationMenu.Link> (repeated)
2041
+ <NavigationMenu.Link> (repeated, as above)
2042
+ <NavigationMenu.Link> (repeated, as above)
2043
+ <NavigationMenu.Portal>
2044
+ <NavigationMenu.Positioner>
2045
+ <NavigationMenu.Popup>
2046
+ <NavigationMenu.Viewport>
2047
+ <NavigationMenu.Arrow>
2048
+ <NavigationMenu.Backdrop>
2049
+ ```
2050
+
1062
2051
  Props of its root:
1063
2052
 
1064
2053
  - `value?: Value | null`: The item whose content is shown; `null` is "none".
1065
- - `defaultValue?: Value | null`
1066
- - `onValueChange?: ((value: Value | null, details: ChangeDetails) => void)`
2054
+ - `defaultValue?: Value | null`: The item whose content it starts with, when the caller does not hold `value`. Read once.
2055
+ - `onValueChange?: (value: Value | null, details: ChangeDetails) => void`: Heard as another item's content is about to show, or none: `details.cancel()` keeps the value as it was.
1067
2056
  - `delay?: number`: How long the pointer rests on a trigger before its content shows, in milliseconds.
1068
2057
  - `closeDelay?: number`: How long after the pointer leaves the content goes, in milliseconds.
1069
- - `orientation?: Orientation`
2058
+ - `orientation?: Orientation`: Whether the triggers are laid out across (the default) or down: the arrows that move between them follow.
2059
+
2060
+ Each part, and its own props:
2061
+
2062
+ - `<NavigationMenu.Root>` draws a `<nav>`. Generic: `<Value = unknown>`. `Value` is what tells an item from the others: the root's `value` holds the open one's. Its props are above.
2063
+ - `<NavigationMenu.List>` draws a `<ul>`.
2064
+ - `<NavigationMenu.Item>` draws a `<li>`. One item of the list: a link, or a trigger with its content. Its `value` tells it from the others; an item that is given none makes its own.
2065
+ - `value?: unknown`: What tells this item from the others: the menu's `value` while its content is shown. An item that is given none makes its own.
2066
+ - `<NavigationMenu.Trigger>` draws a `<button>`.
2067
+ - `<NavigationMenu.Icon>` draws a `<span>`.
2068
+ - `<NavigationMenu.Content>` draws a `<div>`.
2069
+ - `<NavigationMenu.Link>` draws a `<a>`.
2070
+ - `active?: boolean`: The link is the page the reader is on.
2071
+ - `closeOnClick?: boolean`: Whether following it closes the menu. Default: it does.
2072
+ - `<NavigationMenu.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
2073
+ - `<NavigationMenu.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
2074
+ - `<NavigationMenu.Popup>` draws a `<div>`.
2075
+ - `<NavigationMenu.Viewport>` draws a `<div>`. Where the contents are drawn, inside the popup.
2076
+ - `<NavigationMenu.Arrow>` draws a `<div>`.
2077
+ - `<NavigationMenu.Backdrop>` draws a `<div>`.
1070
2078
 
1071
2079
  Attributes and CSS variables, by part:
1072
2080
 
@@ -1089,7 +2097,7 @@ Attributes and CSS variables, by part:
1089
2097
  - positioner: Places the popup against the open item's trigger. It carries the geometry.
1090
2098
  - `data-open`: Present when it is open.
1091
2099
  - `data-closed`: Present when it is closed.
1092
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
2100
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1093
2101
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1094
2102
  - `--anchor-width`: The anchor's width.
1095
2103
  - `--anchor-height`: The anchor's height.
@@ -1103,12 +2111,12 @@ Attributes and CSS variables, by part:
1103
2111
  - `data-closed`: Present when it is closed.
1104
2112
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1105
2113
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1106
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
2114
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1107
2115
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1108
2116
  - `--popup-width`: The open content's width.
1109
2117
  - `--popup-height`: The open content's height.
1110
2118
  - arrow: An element that points at the open item's trigger.
1111
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
2119
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1112
2120
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1113
2121
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
1114
2122
  - backdrop: An element behind the popup, for a design that dims the page.
@@ -1125,14 +2133,24 @@ import { NumberField } from "@kirana-ui/solid/number-field"
1125
2133
 
1126
2134
  Parts: `<NumberField.Root>`, `<NumberField.Group>`, `<NumberField.Input>`, `<NumberField.Increment>`, `<NumberField.Decrement>`.
1127
2135
 
2136
+ Anatomy:
2137
+
2138
+ ```
2139
+ <NumberField.Root>
2140
+ <NumberField.Group>
2141
+ <NumberField.Input>
2142
+ <NumberField.Increment>
2143
+ <NumberField.Decrement>
2144
+ ```
2145
+
1128
2146
  Props of its root:
1129
2147
 
1130
2148
  - `value?: number | null`: The number; `null` is "none".
1131
- - `defaultValue?: number | null`
1132
- - `onValueChange?: ((value: number | null, details: ChangeDetails) => void)`
1133
- - `onValueCommitted?: ((value: number | null, details: ChangeDetails) => void)`: Heard once a change is done: focus left the input, a key or a button stepped it.
1134
- - `min?: number`
1135
- - `max?: number`
2149
+ - `defaultValue?: number | null`: The value it starts with, when the caller does not hold `value`. Read once.
2150
+ - `onValueChange?: (value: number | null, details: ChangeDetails) => void`: Heard as the number is about to change, typed or stepped: `details.cancel()` keeps it as it was.
2151
+ - `onValueCommitted?: (value: number | null, details: ChangeDetails) => void`: Heard once a change is done: focus left the input, a key or a button stepped it.
2152
+ - `min?: number`: The least the number may be.
2153
+ - `max?: number`: The most the number may be.
1136
2154
  - `step?: number`: What the buttons and the arrows move by. Default 1.
1137
2155
  - `smallStep?: number`: With Alt held. Default 0.1.
1138
2156
  - `largeStep?: number`: With Shift held. Default 10.
@@ -1140,12 +2158,20 @@ Props of its root:
1140
2158
  - `allowWheelScrub?: boolean`: The wheel steps it while the pointer is over the input and focus is in it.
1141
2159
  - `format?: Intl.NumberFormatOptions`: How the number is written.
1142
2160
  - `locale?: string`: The language it is written in; the page's by default.
1143
- - `disabled?: boolean`
1144
- - `readOnly?: boolean`
1145
- - `required?: boolean`
2161
+ - `disabled?: boolean`: Disabled: it cannot be changed.
2162
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
2163
+ - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
1146
2164
  - `name?: string`: With a name, the number is submitted with the form around it.
1147
2165
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
1148
2166
 
2167
+ Each part, and its own props:
2168
+
2169
+ - `<NumberField.Root>` draws a `<div>`. Its props are above.
2170
+ - `<NumberField.Group>` draws a `<div>`.
2171
+ - `<NumberField.Input>` draws a `<input>`.
2172
+ - `<NumberField.Increment>` draws a `<button>`.
2173
+ - `<NumberField.Decrement>` draws a `<button>`.
2174
+
1149
2175
  Attributes and CSS variables, by part:
1150
2176
 
1151
2177
  - root: Groups the number field's parts.
@@ -1207,18 +2233,39 @@ import { Otp } from "@kirana-ui/solid/otp"
1207
2233
 
1208
2234
  Parts: `<Otp.Root>`, `<Otp.Input>`, `<Otp.Group>`, `<Otp.Slot>`, `<Otp.Separator>`, `<Otp.Caret>`.
1209
2235
 
2236
+ Anatomy:
2237
+
2238
+ ```
2239
+ <Otp.Root>
2240
+ <Otp.Input>
2241
+ <Otp.Group> (repeated)
2242
+ <Otp.Slot> (repeated)
2243
+ <Otp.Caret>
2244
+ <Otp.Separator> (repeated)
2245
+ ```
2246
+
1210
2247
  Props of its root:
1211
2248
 
1212
2249
  - `length?: number`: How many characters the code has. Default: 6.
1213
- - `value?: string`
1214
- - `defaultValue?: string`
1215
- - `onValueChange?: ((value: string, details: ChangeDetails) => void)`
1216
- - `onComplete?: ((value: string) => void)`: Every character is in: the moment to send the code.
2250
+ - `value?: string`: The characters typed so far, when the caller holds them.
2251
+ - `defaultValue?: string`: The characters it starts with, when the caller does not hold `value`. Read once.
2252
+ - `onValueChange?: (value: string, details: ChangeDetails) => void`: Heard as the characters are about to change: `details.cancel()` keeps them as they were.
2253
+ - `onComplete?: (value: string) => void`: Every character is in: the moment to send the code.
1217
2254
  - `mode?: "numeric" | "alphanumeric" | "text"`: What a character may be. Default: `numeric`.
1218
- - `disabled?: boolean`
2255
+ - `disabled?: boolean`: Disabled: it cannot be changed.
1219
2256
  - `name?: string`: With a name, the code is submitted with the form around it.
1220
2257
  - `form?: string`: The id of the form the input belongs to, when it is not inside it.
1221
2258
 
2259
+ Each part, and its own props:
2260
+
2261
+ - `<Otp.Root>` draws a `<div>`. Its props are above.
2262
+ - `<Otp.Input>` draws a `<input>`.
2263
+ - `<Otp.Group>` draws a `<div>`. Cells that are drawn together.
2264
+ - `<Otp.Slot>` draws a `<div>`.
2265
+ - `index: number`: Required. Which character of the code it shows, from 0.
2266
+ - `<Otp.Separator>` draws a `<div>`. A mark between groups of cells.
2267
+ - `<Otp.Caret>` draws a `<div>`. A caret drawn in the active cell while it is empty.
2268
+
1222
2269
  Attributes and CSS variables, by part:
1223
2270
 
1224
2271
  - root: The code: the input and its cells.
@@ -1241,16 +2288,38 @@ import { Pagination } from "@kirana-ui/solid/pagination"
1241
2288
 
1242
2289
  Parts: `<Pagination.Root>`, `<Pagination.Items>`, `<Pagination.Item>`, `<Pagination.Ellipsis>`, `<Pagination.Previous>`, `<Pagination.Next>`.
1243
2290
 
2291
+ Anatomy:
2292
+
2293
+ ```
2294
+ <Pagination.Root>
2295
+ <Pagination.Items>
2296
+ <Pagination.Item> (repeated)
2297
+ <Pagination.Ellipsis> (repeated)
2298
+ <Pagination.Previous>
2299
+ <Pagination.Next>
2300
+ ```
2301
+
1244
2302
  Props of its root:
1245
2303
 
1246
2304
  - `page?: number`: The page shown, from 1.
1247
- - `defaultPage?: number`
1248
- - `onPageChange?: ((page: number, details: ChangeDetails) => void)`
1249
- - `count: number`: How many items there are in all.
2305
+ - `defaultPage?: number`: The page it starts at, when the caller does not hold `page`. Read once.
2306
+ - `onPageChange?: (page: number, details: ChangeDetails) => void`: Heard as another page is about to be shown: `details.cancel()` keeps the page as it was.
2307
+ - `count: number`: Required. How many items there are in all.
1250
2308
  - `pageSize?: number`: How many items a page holds. Default 10.
1251
2309
  - `siblingCount?: number`: How many pages are listed each side of the one shown. Default 1.
1252
2310
  - `boundaryCount?: number`: How many pages are always listed at each end. Default 1.
1253
- - `disabled?: boolean`
2311
+ - `disabled?: boolean`: Disabled: no page can be gone to.
2312
+
2313
+ Each part, and its own props:
2314
+
2315
+ - `<Pagination.Root>` draws a `<nav>`. Its props are above.
2316
+ - `<Pagination.Items>` draws no element. The row's entries, pages and the gaps between them: each is given to draw.
2317
+ - `children: (entry: PaginationEntry) => JSX.Element`: Required. Draws one entry, once for each: a page, or the mark for pages left out.
2318
+ - `<Pagination.Item>` draws a `<button>`.
2319
+ - `page: number`: Required. The page it goes to, from 1.
2320
+ - `<Pagination.Ellipsis>` draws a `<span>`. The mark for pages that are left out of the row.
2321
+ - `<Pagination.Previous>` draws a `<button>`.
2322
+ - `<Pagination.Next>` draws a `<button>`.
1254
2323
 
1255
2324
  Attributes and CSS variables, by part:
1256
2325
 
@@ -1272,11 +2341,35 @@ import { Popover } from "@kirana-ui/solid/popover"
1272
2341
 
1273
2342
  Parts: `<Popover.Root>`, `<Popover.Trigger>`, `<Popover.Portal>`, `<Popover.Positioner>`, `<Popover.Popup>`, `<Popover.Title>`, `<Popover.Description>`, `<Popover.Close>`.
1274
2343
 
2344
+ Anatomy:
2345
+
2346
+ ```
2347
+ <Popover.Root>
2348
+ <Popover.Trigger>
2349
+ <Popover.Portal>
2350
+ <Popover.Positioner>
2351
+ <Popover.Popup>
2352
+ <Popover.Title>
2353
+ <Popover.Description>
2354
+ <Popover.Close>
2355
+ ```
2356
+
1275
2357
  Props of its root:
1276
2358
 
1277
- - `open?: boolean`
1278
- - `defaultOpen?: boolean`
1279
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
2359
+ - `open?: boolean`: Whether it is open, when the caller holds it.
2360
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
2361
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
2362
+
2363
+ Each part, and its own props:
2364
+
2365
+ - `<Popover.Root>` draws no element. Holds the popover: whether it is open. Its props are above.
2366
+ - `<Popover.Trigger>` draws a `<button>`.
2367
+ - `<Popover.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
2368
+ - `<Popover.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
2369
+ - `<Popover.Popup>` draws a `<div>`.
2370
+ - `<Popover.Title>` draws a `<h2>`. The heading that names the popover.
2371
+ - `<Popover.Description>` draws a `<p>`. The text that describes the popover.
2372
+ - `<Popover.Close>` draws a `<button>`. A button that closes the popover.
1280
2373
 
1281
2374
  Attributes and CSS variables, by part:
1282
2375
 
@@ -1285,7 +2378,7 @@ Attributes and CSS variables, by part:
1285
2378
  - positioner: Places the popup against the trigger. It carries the geometry.
1286
2379
  - `data-open`: Present when it is open.
1287
2380
  - `data-closed`: Present when it is closed.
1288
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
2381
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1289
2382
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1290
2383
  - `--anchor-width`: The anchor's width.
1291
2384
  - `--anchor-height`: The anchor's height.
@@ -1297,15 +2390,9 @@ Attributes and CSS variables, by part:
1297
2390
  - `data-closed`: Present when it is closed.
1298
2391
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1299
2392
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1300
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
2393
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1301
2394
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1302
2395
 
1303
- ### PortalProvider
1304
-
1305
- ```
1306
- import { PortalProvider } from "@kirana-ui/solid/portal-provider"
1307
- ```
1308
-
1309
2396
  ### Progress
1310
2397
 
1311
2398
  ```
@@ -1314,14 +2401,33 @@ import { Progress } from "@kirana-ui/solid/progress"
1314
2401
 
1315
2402
  Parts: `<Progress.Root>`, `<Progress.Track>`, `<Progress.Indicator>`, `<Progress.Value>`, `<Progress.Label>`.
1316
2403
 
2404
+ Anatomy:
2405
+
2406
+ ```
2407
+ <Progress.Root>
2408
+ <Progress.Track>
2409
+ <Progress.Indicator>
2410
+ <Progress.Value>
2411
+ <Progress.Label>
2412
+ ```
2413
+
1317
2414
  Props of its root:
1318
2415
 
1319
- - `value: number | null`: The value. For a progress bar, `null` is "under way, how far is not known".
2416
+ - `value: number | null`: Required. The value. For a progress bar, `null` is "under way, how far is not known".
1320
2417
  - `min?: number`: Default 0.
1321
2418
  - `max?: number`: Default 100.
1322
2419
  - `format?: Intl.NumberFormatOptions`: How the value is written; a percentage of the range by default.
1323
2420
  - `locale?: string`: The language the value is written in; the page's by default.
1324
- - `getAriaValueText?: ((text: string | undefined, value: number | null) => string)`: What assistive technology reads for the value, when the written value is not enough.
2421
+ - `getAriaValueText?: (text: string | undefined, value: number | null) => string`: What assistive technology reads for the value, when the written value is not enough.
2422
+
2423
+ Each part, and its own props:
2424
+
2425
+ - `<Progress.Root>` draws a `<div>`. Its props are above.
2426
+ - `<Progress.Track>` draws a `<div>`.
2427
+ - `<Progress.Indicator>` draws a `<div>`.
2428
+ - `<Progress.Value>` draws a `<span>`.
2429
+ - `children?: (text: () => string | undefined) => JSX.Element`: Draws something else than the written value: it is given the text, `undefined` while there is none.
2430
+ - `<Progress.Label>` draws a `<span>`.
1325
2431
 
1326
2432
  Attributes and CSS variables, by part:
1327
2433
 
@@ -1354,11 +2460,25 @@ import { QrCode } from "@kirana-ui/solid/qr-code"
1354
2460
 
1355
2461
  Parts: `<QrCode.Root>`, `<QrCode.Frame>`, `<QrCode.Pattern>`.
1356
2462
 
2463
+ Anatomy:
2464
+
2465
+ ```
2466
+ <QrCode.Root>
2467
+ <QrCode.Frame>
2468
+ <QrCode.Pattern>
2469
+ ```
2470
+
1357
2471
  Props of its root:
1358
2472
 
1359
- - `value: string`: What the code says: a link, a text. Written as UTF-8.
2473
+ - `value: string`: Required. What the code says: a link, a text. Written as UTF-8.
1360
2474
  - `correction?: QrCorrection`: How much of it may be lost and still be read. Default: `"M"`.
1361
2475
 
2476
+ Each part, and its own props:
2477
+
2478
+ - `<QrCode.Root>` draws a `<div>`. Its props are above.
2479
+ - `<QrCode.Frame>` draws a `<svg>`. The drawing: an `<svg>` a module to the unit.
2480
+ - `<QrCode.Pattern>` draws a `<path>`. The dark modules: one `<path>`, filled by the design.
2481
+
1362
2482
  Attributes and CSS variables, by part:
1363
2483
 
1364
2484
  - root: What holds the code.
@@ -1372,17 +2492,34 @@ import { RadioGroup } from "@kirana-ui/solid/radio-group"
1372
2492
 
1373
2493
  Parts: `<RadioGroup.Root>`, `<RadioGroup.Item>`, `<RadioGroup.Indicator>`.
1374
2494
 
2495
+ Anatomy:
2496
+
2497
+ ```
2498
+ <RadioGroup.Root>
2499
+ <RadioGroup.Item> (repeated)
2500
+ <RadioGroup.Indicator>
2501
+ ```
2502
+
1375
2503
  Props of its root:
1376
2504
 
1377
2505
  - `value?: Value | null`: The chosen value; `null` is "none".
1378
- - `defaultValue?: Value | null`
1379
- - `onValueChange?: ((value: Value | null, details: ChangeDetails) => void)`: `null` only when a form's reset takes the group back to "none".
1380
- - `disabled?: boolean`
1381
- - `readOnly?: boolean`
1382
- - `required?: boolean`
2506
+ - `defaultValue?: Value | null`: The value it starts with, when the caller does not hold `value`. Read once.
2507
+ - `onValueChange?: (value: Value | null, details: ChangeDetails) => void`: `null` only when a form's reset takes the group back to "none".
2508
+ - `disabled?: boolean`: Disables every item of the group.
2509
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
2510
+ - `required?: boolean`: Needed: in a `Field`, choosing none is then invalid.
1383
2511
  - `name?: string`: With a name, the chosen value is submitted with the form around the group.
1384
2512
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
1385
2513
 
2514
+ Each part, and its own props:
2515
+
2516
+ - `<RadioGroup.Root>` draws a `<div>`. Generic: `<Value = unknown>`. `Value` is what an item's `value` is: the root's `value` holds the chosen one, or `null`. Its props are above.
2517
+ - `<RadioGroup.Item>` draws a `<span>`.
2518
+ - `value: unknown`: Required. What the group's value is while this item is the chosen one.
2519
+ - `disabled?: boolean`: Disables this item: it cannot be chosen.
2520
+ - `<RadioGroup.Indicator>` draws a `<span>`.
2521
+ - `keepMounted?: boolean`: Keeps the mark in the page while its item is not the chosen one.
2522
+
1386
2523
  Attributes and CSS variables, by part:
1387
2524
 
1388
2525
  - root: Groups the items: one of them is chosen at most.
@@ -1412,12 +2549,30 @@ import { Resizable } from "@kirana-ui/solid/resizable"
1412
2549
 
1413
2550
  Parts: `<Resizable.Group>`, `<Resizable.Panel>`, `<Resizable.Handle>`.
1414
2551
 
2552
+ Anatomy:
2553
+
2554
+ ```
2555
+ <Resizable.Group>
2556
+ <Resizable.Panel> (repeated)
2557
+ <Resizable.Handle> (repeated)
2558
+ ```
2559
+
1415
2560
  Props of its root:
1416
2561
 
1417
2562
  - `orientation?: Orientation`: Whether the panels are side by side (the default) or one over the other.
1418
- - `onSizesChange?: ((sizes: number[], details: ChangeDetails) => void)`: Heard as the panels are resized: each panel's share, in the page's order, summing to 100.
2563
+ - `onSizesChange?: (sizes: number[], details: ChangeDetails) => void`: Heard as the panels are resized: each panel's share, in the page's order, summing to 100.
1419
2564
  - `keyboardStep?: number`: How far an arrow key moves a handle, in hundredths of the group. Default: 10.
1420
- - `disabled?: boolean`
2565
+ - `disabled?: boolean`: Disabled: the handles cannot be dragged or moved with the keyboard.
2566
+
2567
+ Each part, and its own props:
2568
+
2569
+ - `<Resizable.Group>` draws a `<div>`. Its props are above.
2570
+ - `<Resizable.Panel>` draws a `<div>`.
2571
+ - `defaultSize?: number`: Its share to begin with, in hundredths of the group. Either every panel gives one or none does (they are then equal).
2572
+ - `minSize?: number`: The least it can be made. Default: 0.
2573
+ - `maxSize?: number`: The most it can be made. Default: 100.
2574
+ - `<Resizable.Handle>` draws a `<div>`.
2575
+ - `disabled?: boolean`: Disables this handle: it cannot be dragged or moved with the keyboard.
1421
2576
 
1422
2577
  Attributes and CSS variables, by part:
1423
2578
 
@@ -1440,27 +2595,49 @@ import { ScrollArea } from "@kirana-ui/solid/scroll-area"
1440
2595
 
1441
2596
  Parts: `<ScrollArea.Root>`, `<ScrollArea.Viewport>`, `<ScrollArea.Content>`, `<ScrollArea.Scrollbar>`, `<ScrollArea.Thumb>`, `<ScrollArea.Corner>`.
1442
2597
 
2598
+ Anatomy:
2599
+
2600
+ ```
2601
+ <ScrollArea.Root>
2602
+ <ScrollArea.Viewport>
2603
+ <ScrollArea.Content>
2604
+ <ScrollArea.Scrollbar> (repeated)
2605
+ <ScrollArea.Thumb>
2606
+ <ScrollArea.Corner>
2607
+ ```
2608
+
2609
+ Each part, and its own props:
2610
+
2611
+ - `<ScrollArea.Root>` draws a `<div>`.
2612
+ - `<ScrollArea.Viewport>` draws a `<div>`.
2613
+ - `<ScrollArea.Content>` draws a `<div>`. What is scrolled.
2614
+ - `<ScrollArea.Scrollbar>` draws a `<div>`.
2615
+ - `orientation?: Orientation`: Which way it scrolls. Default: `vertical`.
2616
+ - `keepMounted?: boolean`: In the page even while there is nothing to scroll its way.
2617
+ - `<ScrollArea.Thumb>` draws a `<div>`.
2618
+ - `<ScrollArea.Corner>` draws a `<div>`. The square where the two scrollbars meet, placed there.
2619
+
1443
2620
  Attributes and CSS variables, by part:
1444
2621
 
1445
- - root: The area. It holds the viewport and the scrollbars.
2622
+ - root: The area. It holds the viewport and the scrollbars, which the library places against it: a design gives a scrollbar its thickness and draws it, and places nothing.
1446
2623
  - `data-has-overflow-x`: Present when there is more to see sideways.
1447
2624
  - `data-has-overflow-y`: Present when there is more to see up or down.
1448
2625
  - `data-scrolling`: Present while it is being scrolled, and a moment after.
1449
2626
  - `data-hovering`: Present while the pointer is over the area.
1450
- - `--scroll-area-corner-width`: The width of the corner: the vertical scrollbar's.
1451
- - `--scroll-area-corner-height`: The height of the corner: the horizontal scrollbar's.
2627
+ - `--scroll-area-corner-width`: The width of the corner: the vertical scrollbar's, while both scrollbars and the corner are in the page.
2628
+ - `--scroll-area-corner-height`: The height of the corner: the horizontal scrollbar's, while both scrollbars and the corner are in the page.
1452
2629
  - viewport: The element that scrolls.
1453
2630
  - `data-has-overflow-x`: Present when there is more to see sideways.
1454
2631
  - `data-has-overflow-y`: Present when there is more to see up or down.
1455
2632
  - `data-scrolling`: Present while it is being scrolled, and a moment after.
1456
- - scrollbar: A scrollbar's track. In the page while there is something to scroll its way.
2633
+ - scrollbar: A scrollbar's track, placed along its edge of the area. In the page while there is something to scroll its way.
1457
2634
  - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
1458
2635
  - `data-hovering`: Present while the pointer is over the area.
1459
2636
  - `data-scrolling`: Present while the area is scrolled its way.
1460
- - thumb: The part of a scrollbar that shows where the view is, and can be dragged.
1461
- - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
1462
2637
  - `--scroll-area-thumb-height`: A vertical thumb's height.
1463
2638
  - `--scroll-area-thumb-width`: A horizontal thumb's width.
2639
+ - thumb: The part of a scrollbar that shows where the view is, and can be dragged. As long as its scrollbar's variable says.
2640
+ - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
1464
2641
 
1465
2642
  ### Select
1466
2643
 
@@ -1470,33 +2647,83 @@ import { Select } from "@kirana-ui/solid/select"
1470
2647
 
1471
2648
  Parts: `<Select.Root>`, `<Select.Trigger>`, `<Select.Value>`, `<Select.Portal>`, `<Select.Positioner>`, `<Select.Popup>`, `<Select.List>`, `<Select.ScrollUpArrow>`, `<Select.ScrollDownArrow>`, `<Select.Group>`, `<Select.GroupLabel>`, `<Select.Separator>`, `<Select.Item>`, `<Select.ItemText>`, `<Select.ItemIndicator>`.
1472
2649
 
2650
+ Anatomy:
2651
+
2652
+ ```
2653
+ <Select.Root>
2654
+ <Select.Trigger>
2655
+ <Select.Value>
2656
+ <Select.Portal>
2657
+ <Select.Positioner>
2658
+ <Select.Popup>
2659
+ <Select.ScrollUpArrow>
2660
+ <Select.List> (optional)
2661
+ <Select.Group> (optional, repeated)
2662
+ <Select.GroupLabel>
2663
+ <Select.Item> (repeated)
2664
+ <Select.ItemText>
2665
+ <Select.ItemIndicator>
2666
+ <Select.Separator> (repeated)
2667
+ <Select.ScrollDownArrow>
2668
+ ```
2669
+
1473
2670
  Props of its root:
1474
2671
 
1475
2672
  - `value?: Value | null`: The chosen value; `null` is "none".
1476
- - `defaultValue?: Value | null`
1477
- - `onValueChange?: ((value: Value | null, details: ChangeDetails) => void)`
1478
- - `open?: boolean`
1479
- - `defaultOpen?: boolean`
1480
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
1481
- - `disabled?: boolean`
2673
+ - `defaultValue?: Value | null`: The value it starts with, when the caller does not hold `value`. Read once.
2674
+ - `onValueChange?: (value: Value | null, details: ChangeDetails) => void`: Heard as a value is about to be chosen: `details.cancel()` keeps it as it was.
2675
+ - `open?: boolean`: Whether the list is open, when the caller holds it.
2676
+ - `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
2677
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
2678
+ - `disabled?: boolean`: Disabled: it cannot be changed.
1482
2679
  - `required?: boolean`: In a field, "none" is then wrong.
1483
2680
  - `name?: string`: With a name, the value is submitted with the form around it.
1484
2681
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
1485
- - `items?: readonly { value: Value; label: string }[]`: The labels of the values, for the trigger to show before the list has ever been opened. Not needed for the list itself: its items are read from the markup.
2682
+ - `items?: readonly { value: Value; label: string }[] | Readonly<Record<string, string>>`: The labels of the values, for the trigger to show before the list has ever been opened: a list of values with their labels, or, for values that are text, the labels by value (`{ apple: "Apple" }`). Not needed for the list itself: its items are read from the markup.
2683
+ - `multiple?: boolean`: Several values: an item chosen is added, chosen again taken away, and the list stays open. The values are `values`, not `value`.
2684
+ - `values?: readonly Value[]`: With `multiple`: the chosen values, in the order they were chosen.
2685
+ - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with, when the caller does not hold `values`. Read once.
2686
+ - `onValuesChange?: (values: Value[], details: ChangeDetails) => void`: With `multiple`: heard as a value is about to be added or taken away, with the values there would then be: `details.cancel()` keeps them as they were.
1486
2687
  - `virtualized?: ListCollection`: Every row, when only some are in the page (a virtualizer draws the ones in view). Each item is then given its `index`.
1487
2688
 
2689
+ Each part, and its own props:
2690
+
2691
+ - `<Select.Root>` draws no element. Generic: `<Value = unknown>`. `Value` is what an item's `value` is: the root's `value` and `onValueChange` hold one or `null` for none, and with `multiple` its `values` and `onValuesChange` hold several. Its props are above.
2692
+ - `<Select.Trigger>` draws a `<button>`.
2693
+ - `<Select.Value>` draws a `<span>`. Generic: `<Chosen = unknown>`. Shows the chosen value's label, or `placeholder` while nothing is chosen; with `multiple`, the chosen labels with commas between. A function child draws something else: it is given the value and its label, or with `multiple` the values and their labels in the items' order, each as an accessor. Its first parameter's type says which: `(values: Accessor<string[]>, labels) => …`.
2694
+ - `placeholder?: string`: Shown while nothing is chosen.
2695
+ - `children?: JSX.Element | (( value: Accessor<Chosen>, label: Accessor< Chosen extends readonly unknown[] ? readonly string[] : string | undefined > ) => JSX.Element)`: What to show in place of the label. A function is given the value and its label (`null` and `undefined` while nothing is chosen); with `multiple`, the values and their labels, in the items' order. Its first parameter's type says which: `(values: string[], labels) => …`.
2696
+ - `<Select.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
2697
+ - `<Select.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
2698
+ - `alignItemWithTrigger?: boolean`: The list opens over its trigger, the chosen item's text on the trigger's own, where there is room and unless a finger opened it.
2699
+ - `<Select.Popup>` draws a `<div>`.
2700
+ - `<Select.List>` draws a `<div>`. The items' own box inside the popup, when the popup holds more than its items: the listbox, and what scrolls.
2701
+ - `<Select.ScrollUpArrow>` draws a `<div>`.
2702
+ - `<Select.ScrollDownArrow>` draws a `<div>`.
2703
+ - `<Select.Group>` draws a `<div>`. Items that belong together, named by their label.
2704
+ - `<Select.GroupLabel>` draws a `<div>`. The name of a group. Outside a group it is plain text, and names nothing.
2705
+ - `<Select.Separator>` draws a `<div>`. A line between groups.
2706
+ - `<Select.Item>` draws a `<div>`.
2707
+ - `value: unknown`: Required. What the select's value is while this item is chosen.
2708
+ - `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
2709
+ - `label?: string`: What typeahead matches and the trigger shows; the item's text when left out.
2710
+ - `index?: number`: Its place among all the rows, in a virtualized list.
2711
+ - `<Select.ItemText>` draws a `<span>`. The item's name: what the trigger shows once it is chosen.
2712
+ - `<Select.ItemIndicator>` draws a `<span>`. A mark an item shows while it is chosen.
2713
+ - `keepMounted?: boolean`: Keeps the mark in the page while its item is not chosen.
2714
+
1488
2715
  Attributes and CSS variables, by part:
1489
2716
 
1490
2717
  - trigger: The button that shows the value and opens the list.
1491
2718
  - `data-popup-open`: Present when the list is open.
1492
2719
  - `data-placeholder`: Present while nothing is chosen.
1493
2720
  - `data-disabled`: Present when it is disabled.
1494
- - value: The chosen value's label, or the placeholder.
2721
+ - value: The chosen value's label, or the placeholder. With several values, their labels with commas between.
1495
2722
  - `data-placeholder`: Present while nothing is chosen.
1496
2723
  - positioner: Places the list against the trigger. It carries the geometry.
1497
2724
  - `data-open`: Present when it is open.
1498
2725
  - `data-closed`: Present when it is closed.
1499
- - `data-side="top | right | bottom | left | none"`: The side of the trigger it is on, after any flip; `none` when it lies over the trigger.
2726
+ - `data-side="top | right | bottom | left | inline-start | inline-end | none"`: The side of the trigger it is on, after any flip; `none` when it lies over the trigger.
1500
2727
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1501
2728
  - `--anchor-width`: The anchor's width.
1502
2729
  - `--anchor-height`: The anchor's height.
@@ -1506,13 +2733,13 @@ Attributes and CSS variables, by part:
1506
2733
  - scrollUpArrow: In the page while there is more of the list above: it scrolls the list while the pointer moves over it.
1507
2734
  - `data-direction="up | down"`: The way it scrolls the list.
1508
2735
  - `data-visible`: Present while there is more of the list its way.
1509
- - `data-side="top | right | bottom | left | none"`: The side of the trigger the list is on; `none` when it lies over the trigger.
2736
+ - `data-side="top | right | bottom | left | inline-start | inline-end | none"`: The side of the trigger the list is on; `none` when it lies over the trigger.
1510
2737
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1511
2738
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1512
2739
  - scrollDownArrow: In the page while there is more of the list below: it scrolls the list while the pointer moves over it.
1513
2740
  - `data-direction="up | down"`: The way it scrolls the list.
1514
2741
  - `data-visible`: Present while there is more of the list its way.
1515
- - `data-side="top | right | bottom | left | none"`: The side of the trigger the list is on; `none` when it lies over the trigger.
2742
+ - `data-side="top | right | bottom | left | inline-start | inline-end | none"`: The side of the trigger the list is on; `none` when it lies over the trigger.
1516
2743
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1517
2744
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1518
2745
  - popup: The list of items.
@@ -1520,10 +2747,10 @@ Attributes and CSS variables, by part:
1520
2747
  - `data-closed`: Present when it is closed.
1521
2748
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1522
2749
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1523
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
2750
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1524
2751
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1525
2752
  - item: One choice in the list.
1526
- - `data-selected`: Present on the chosen item.
2753
+ - `data-selected`: Present on the chosen item, or on each of several.
1527
2754
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1528
2755
  - `data-disabled`: Present when it is disabled.
1529
2756
 
@@ -1535,7 +2762,9 @@ import { Separator } from "@kirana-ui/solid/separator"
1535
2762
 
1536
2763
  Props:
1537
2764
 
1538
- - `orientation?: Orientation`
2765
+ - `orientation?: Orientation`: Whether the line lies across (the default) or stands upright: what a screen reader is told.
2766
+
2767
+ `<Separator>` draws a `<div>`.
1539
2768
 
1540
2769
  Attributes and CSS variables, by part:
1541
2770
 
@@ -1550,25 +2779,47 @@ import { Slider } from "@kirana-ui/solid/slider"
1550
2779
 
1551
2780
  Parts: `<Slider.Root>`, `<Slider.Value>`, `<Slider.Control>`, `<Slider.Track>`, `<Slider.Indicator>`, `<Slider.Thumb>`.
1552
2781
 
2782
+ Anatomy:
2783
+
2784
+ ```
2785
+ <Slider.Root>
2786
+ <Slider.Value>
2787
+ <Slider.Control>
2788
+ <Slider.Track>
2789
+ <Slider.Indicator>
2790
+ <Slider.Thumb> (repeated)
2791
+ ```
2792
+
1553
2793
  Props of its root:
1554
2794
 
1555
- - `value?: SliderValue`
1556
- - `defaultValue?: SliderValue`: Read once. Default `min`.
1557
- - `onValueChange?: ((value: number | number[], details: SliderChangeDetails) => void)`: Each step of a drag and each key.
1558
- - `onValueCommitted?: ((value: number | number[], details: SliderChangeDetails) => void)`: When the pointer lets go, and after each key: the value to save.
2795
+ - `value?: Value`: The value, when the caller holds it: a number, or a list of numbers for a range.
2796
+ - `defaultValue?: Value`: Read once. Default `min`.
2797
+ - `onValueChange?: (value: SliderTold<Value>, details: SliderChangeDetails) => void`: Each step of a drag and each key.
2798
+ - `onValueCommitted?: (value: SliderTold<Value>, details: SliderChangeDetails) => void`: When the pointer lets go, and after each key: the value to save.
1559
2799
  - `min?: number`: Default 0.
1560
2800
  - `max?: number`: Default 100.
1561
2801
  - `step?: number`: Default 1.
1562
2802
  - `largeStep?: number`: What Page Up, Page Down and an arrow with Shift move by. Default 10.
1563
2803
  - `minStepsBetweenValues?: number`: How many steps two thumbs of a range stay apart. Default 0.
1564
- - `orientation?: Orientation`
2804
+ - `orientation?: Orientation`: Whether the track lies across (the default) or stands upright: the arrows that move a thumb follow.
1565
2805
  - `thumbAlignment?: "center" | "edge" | "edge-client-only"`: Where a thumb is at the ends of its range. `"center"` (the default): its centre on the control's edge, so half of it lies outside. `"edge"`: its edge on the control's edge, so it stays inside. `"edge-client-only"` is the same here: nothing waits for the browser.
1566
- - `disabled?: boolean`
2806
+ - `disabled?: boolean`: Disabled: it cannot be changed.
1567
2807
  - `name?: string`: With a name, each thumb's value is submitted with the form around the slider.
1568
2808
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
1569
2809
  - `format?: Intl.NumberFormatOptions`: How a value is written.
1570
2810
  - `locale?: string`: The language a value is written in; the page's by default.
1571
- - `getAriaValueText?: ((text: string, value: number, index: number) => string)`: What assistive technology reads for a thumb, when the written value is not enough.
2811
+ - `getAriaValueText?: (text: string, value: number, index: number) => string`: What assistive technology reads for a thumb, when the written value is not enough.
2812
+
2813
+ Each part, and its own props:
2814
+
2815
+ - `<Slider.Root>` draws a `<div>`. Generic: `<Value extends SliderValue = SliderValue>`. `Value` is what the slider is given, `value` or `defaultValue`: a number for one thumb, a list for a range. What `onValueChange` and `onValueCommitted` are told is the same kind. Its props are above.
2816
+ - `<Slider.Value>` draws a `<output>`.
2817
+ - `children?: (text: () => string, values: () => readonly number[]) => JSX.Element`: Draws something else than the written value: it is given the text, and each thumb's value.
2818
+ - `<Slider.Control>` draws a `<div>`.
2819
+ - `<Slider.Track>` draws a `<div>`.
2820
+ - `<Slider.Indicator>` draws a `<div>`.
2821
+ - `<Slider.Thumb>` draws a `<div>`.
2822
+ - `index?: number`: Which value of a range the thumb is, from 0. A thumb that is given none takes its place among the slider's thumbs, in the order they are written.
1572
2823
 
1573
2824
  Attributes and CSS variables, by part:
1574
2825
 
@@ -1594,7 +2845,7 @@ Attributes and CSS variables, by part:
1594
2845
  - `data-dragging`: Present while a pointer holds a thumb.
1595
2846
  - `--start-position`: With thumbs that stay inside the control: where the filled part starts, or with one thumb where it ends.
1596
2847
  - `--relative-size`: With thumbs that stay inside the control and a range: the filled part's length.
1597
- - thumb: What is dragged, and what the keyboard moves: a slider to assistive technology. Its place on the track is written on it. It holds a hidden input, which a form reads.
2848
+ - thumb: What is dragged, and what the keyboard moves: a slider to assistive technology. Its place on the track is written on it. It holds a hidden input, which a form reads. A thumb that is given no `index` is the value at its place among the slider's thumbs, in the order they are written.
1598
2849
  - `data-orientation="horizontal | vertical"`: The way the track runs.
1599
2850
  - `data-disabled`: Present when it is disabled.
1600
2851
  - `data-dragging`: Present while a pointer holds a thumb.
@@ -1609,18 +2860,30 @@ import { Switch } from "@kirana-ui/solid/switch"
1609
2860
 
1610
2861
  Parts: `<Switch.Root>`, `<Switch.Thumb>`.
1611
2862
 
2863
+ Anatomy:
2864
+
2865
+ ```
2866
+ <Switch.Root>
2867
+ <Switch.Thumb>
2868
+ ```
2869
+
1612
2870
  Props of its root:
1613
2871
 
1614
- - `checked?: boolean`
2872
+ - `checked?: boolean`: Whether it is checked, when the caller holds it.
1615
2873
  - `defaultChecked?: boolean`: Read once.
1616
- - `onCheckedChange?: ((checked: boolean, details: ChangeDetails) => void)`
1617
- - `disabled?: boolean`
2874
+ - `onCheckedChange?: (checked: boolean, details: ChangeDetails) => void`: Heard as it is about to be checked or unchecked: `details.cancel()` keeps it as it was.
2875
+ - `disabled?: boolean`: Disabled: it cannot be changed.
1618
2876
  - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
1619
- - `required?: boolean`
2877
+ - `required?: boolean`: Needed: in a `Field`, leaving it unchecked is then invalid.
1620
2878
  - `name?: string`: With a name, the control is submitted with the form around it when it is checked.
1621
2879
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
1622
2880
  - `value?: string`: What is submitted. Default `"on"`, as a native checkbox's.
1623
2881
 
2882
+ Each part, and its own props:
2883
+
2884
+ - `<Switch.Root>` draws a `<span>`. Its props are above.
2885
+ - `<Switch.Thumb>` draws a `<span>`.
2886
+
1624
2887
  Attributes and CSS variables, by part:
1625
2888
 
1626
2889
  - root: The track. It holds a hidden native checkbox, which a form and a label reach.
@@ -1644,12 +2907,36 @@ import { Tabs } from "@kirana-ui/solid/tabs"
1644
2907
 
1645
2908
  Parts: `<Tabs.Root>`, `<Tabs.List>`, `<Tabs.Tab>`, `<Tabs.Indicator>`, `<Tabs.Panel>`.
1646
2909
 
2910
+ Anatomy:
2911
+
2912
+ ```
2913
+ <Tabs.Root>
2914
+ <Tabs.List>
2915
+ <Tabs.Tab> (repeated)
2916
+ <Tabs.Indicator>
2917
+ <Tabs.Panel> (repeated)
2918
+ ```
2919
+
1647
2920
  Props of its root:
1648
2921
 
1649
2922
  - `value?: Value | null`: The active tab's value; `null` is "none".
1650
2923
  - `defaultValue?: Value | null`: Read once. Without one, the first tab that can be chosen is, once the page is there.
1651
- - `onValueChange?: ((value: Value, details: ChangeDetails) => void)`
1652
- - `orientation?: Orientation`
2924
+ - `onValueChange?: (value: Value, details: ChangeDetails) => void`: Told a tab's own value, never `null`: tabs do not go back to none.
2925
+ - `orientation?: Orientation`: Whether the tabs are laid out across (the default) or down: the arrows that move between them follow.
2926
+
2927
+ Each part, and its own props:
2928
+
2929
+ - `<Tabs.Root>` draws a `<div>`. Generic: `<Value = unknown>`. `Value` is what a tab's `value` is: the root's `value` holds the active one's. Its props are above.
2930
+ - `<Tabs.List>` draws a `<div>`.
2931
+ - `activateOnFocus?: boolean`: Whether moving focus onto a tab with the arrows activates it. Default `false`.
2932
+ - `loop?: boolean`: Whether the arrows wrap from the last tab to the first. Default `true`.
2933
+ - `<Tabs.Tab>` draws a `<button>`.
2934
+ - `value: unknown`: Required. What the tabs' value is while this tab is the active one.
2935
+ - `disabled?: boolean`: Disables this tab: it cannot be chosen.
2936
+ - `<Tabs.Indicator>` draws a `<span>`.
2937
+ - `<Tabs.Panel>` draws a `<div>`.
2938
+ - `value: unknown`: Required. The value of the tab this is the panel of.
2939
+ - `keepMounted?: boolean`: Keeps the panel in the page, `hidden`, while its tab is not the active one.
1653
2940
 
1654
2941
  Attributes and CSS variables, by part:
1655
2942
 
@@ -1687,12 +2974,40 @@ import { Toast } from "@kirana-ui/solid/toast"
1687
2974
 
1688
2975
  Parts: `<Toast.Viewport>`, `<Toast.List>`, `<Toast.Root>`, `<Toast.Content>`, `<Toast.Title>`, `<Toast.Description>`, `<Toast.Close>`, `<Toast.Action>`.
1689
2976
 
2977
+ Anatomy:
2978
+
2979
+ ```
2980
+ <Toast.Viewport>
2981
+ <Toast.List>
2982
+ <Toast.Root> (repeated)
2983
+ <Toast.Content> (optional)
2984
+ <Toast.Title>
2985
+ <Toast.Description>
2986
+ <Toast.Close>
2987
+ <Toast.Action>
2988
+ ```
2989
+
1690
2990
  Props of its root:
1691
2991
 
1692
- - `toaster: Toaster`
1693
- - `label?: string`: What the region of toasts is called, for assistive technology.
1694
- - `hotkey?: string`: The key that takes focus to the toasts. Default: `"F6"`.
1695
- - `swipeDirection?: "left" | "right" | "up" | "down"`: The way a toast is dragged to close it. Default: `"right"`.
2992
+ - `toast: ToastRecord`: Required. The toast it draws: the one `Toast.List` gave its child.
2993
+
2994
+ Each part, and its own props:
2995
+
2996
+ - `<Toast.Viewport>` draws a `<div>`.
2997
+ - `toaster: Toaster`: Required. The toaster whose toasts are drawn: one made with `createToaster()`. Needed.
2998
+ - `label?: string`: What the region of toasts is called, for assistive technology. Default: `"Notifications"`.
2999
+ - `hotkey?: string`: The key that takes focus to the toasts. Default: `"F6"`.
3000
+ - `swipeDirection?: "left" | "right" | "up" | "down"`: The way a toast is dragged to close it. Default: `"right"`.
3001
+ - `<Toast.List>` draws no element. The toasts in the page: each is given to draw its root.
3002
+ - `children: (toast: Accessor<ToastRecord>) => JSX.Element`: Required. Draws one toast, once for each, the newest first: a `Toast.Root` given it as `toast`.
3003
+ - `<Toast.Root>` draws a `<div>`. Its props are above.
3004
+ - `<Toast.Content>` draws a `<div>`.
3005
+ - `<Toast.Title>` draws a `<div>`. What the toast is called: the title it was added with, when nothing else is written in it.
3006
+ - `<Toast.Description>` draws a `<div>`. What the toast says: the description it was added with, when nothing else is written in it.
3007
+ - `<Toast.Close>` draws a `<button>`. Closes the toast.
3008
+ - `<Toast.Action>` draws a `<button>`. A button of the toast's own: the action it was added with, when nothing else is written in it. Pressing it closes the toast too, unless the action refuses.
3009
+
3010
+ A page's toasts are a toaster's, made once in a module: `import { createToaster } from "@kirana-ui/solid"`, then `export const toaster = createToaster(options)` (`ToasterOptions`, under "Types"). The viewport is given it, and anything on the page adds to it: `toaster.add({ title, description, action, priority })`, `toaster.update(id, options)`, `toaster.dismiss(id)`, `toaster.promise(promise, { loading, success, error })`. What each takes and gives back is `Toaster`, `ToastOptions`, `ToastActionOptions` and `ToastRecord` under "Types".
1696
3011
 
1697
3012
  Attributes and CSS variables, by part:
1698
3013
 
@@ -1724,12 +3039,14 @@ import { Toggle } from "@kirana-ui/solid/toggle"
1724
3039
 
1725
3040
  Props:
1726
3041
 
1727
- - `pressed?: boolean`
3042
+ - `pressed?: boolean`: Whether it is pressed, when the caller holds it.
1728
3043
  - `defaultPressed?: boolean`: Read once.
1729
- - `onPressedChange?: ((pressed: boolean, details: ChangeDetails) => void)`
1730
- - `disabled?: boolean`
3044
+ - `onPressedChange?: (pressed: boolean, details: ChangeDetails) => void`: Heard as it is about to be pressed or released: `details.cancel()` keeps it as it was.
3045
+ - `disabled?: boolean`: Disabled: a press does nothing.
1731
3046
  - `value?: unknown`: In a toggle group: what the group's value holds while this one is pressed.
1732
3047
 
3048
+ `<Toggle>` draws a `<button>`.
3049
+
1733
3050
  Attributes and CSS variables, by part:
1734
3051
 
1735
3052
  - root: The button. It stays pressed until it is pressed again.
@@ -1745,13 +3062,15 @@ import { ToggleGroup } from "@kirana-ui/solid/toggle-group"
1745
3062
  Props:
1746
3063
 
1747
3064
  - `value?: readonly Value[]`: The values of the pressed toggles: none, one, or with `multiple` several.
1748
- - `defaultValue?: readonly Value[]`
1749
- - `onValueChange?: ((value: Value[], details: ChangeDetails) => void)`
3065
+ - `defaultValue?: readonly Value[]`: The values pressed at the start, when the caller does not hold `value`. Read once.
3066
+ - `onValueChange?: (value: Value[], details: ChangeDetails) => void`: Heard as a toggle is about to be pressed or released, with the values that would then be pressed: `details.cancel()` keeps them as they were.
1750
3067
  - `multiple?: boolean`: Whether more than one can be pressed at a time.
1751
- - `disabled?: boolean`
1752
- - `orientation?: Orientation`
3068
+ - `disabled?: boolean`: Disables every toggle of the group.
3069
+ - `orientation?: Orientation`: Whether the toggles are laid out across (the default) or down: the arrows that move between them follow.
1753
3070
  - `loop?: boolean`: Whether the arrows go round from the last toggle to the first. Default: they do.
1754
3071
 
3072
+ `<ToggleGroup>` draws a `<div>`. Generic: `<Value = unknown>`. `Value` is what a toggle's `value` is: the group's `value` holds the pressed ones.
3073
+
1755
3074
  Attributes and CSS variables, by part:
1756
3075
 
1757
3076
  - root: The group. A toggle inside it with a `value` is one of its toggles.
@@ -1767,11 +3086,34 @@ import { Toolbar } from "@kirana-ui/solid/toolbar"
1767
3086
 
1768
3087
  Parts: `<Toolbar.Root>`, `<Toolbar.Button>`, `<Toolbar.Link>`, `<Toolbar.Input>`, `<Toolbar.Group>`, `<Toolbar.Separator>`.
1769
3088
 
3089
+ Anatomy:
3090
+
3091
+ ```
3092
+ <Toolbar.Root>
3093
+ <Toolbar.Group> (optional, repeated)
3094
+ <Toolbar.Button> (repeated)
3095
+ <Toolbar.Link> (repeated)
3096
+ <Toolbar.Input> (repeated)
3097
+ <Toolbar.Separator> (repeated)
3098
+ ```
3099
+
1770
3100
  Props of its root:
1771
3101
 
1772
- - `orientation?: Orientation`
3102
+ - `orientation?: Orientation`: Whether the controls are laid out across (the default) or down: the arrows that move between them follow.
1773
3103
  - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
1774
- - `disabled?: boolean`
3104
+ - `disabled?: boolean`: Disables every control of the toolbar.
3105
+
3106
+ Each part, and its own props:
3107
+
3108
+ - `<Toolbar.Root>` draws a `<div>`. Its props are above.
3109
+ - `<Toolbar.Button>` draws a `<button>`.
3110
+ - `disabled?: boolean`: Disables this control.
3111
+ - `<Toolbar.Link>` draws a `<a>`.
3112
+ - `<Toolbar.Input>` draws a `<input>`.
3113
+ - `disabled?: boolean`: Disables this control.
3114
+ - `<Toolbar.Group>` draws a `<div>`.
3115
+ - `disabled?: boolean`: Disables this control.
3116
+ - `<Toolbar.Separator>` draws a `<div>`.
1775
3117
 
1776
3118
  Attributes and CSS variables, by part:
1777
3119
 
@@ -1801,14 +3143,36 @@ import { Tooltip } from "@kirana-ui/solid/tooltip"
1801
3143
 
1802
3144
  Parts: `<Tooltip.Root>`, `<Tooltip.Trigger>`, `<Tooltip.Portal>`, `<Tooltip.Positioner>`, `<Tooltip.Popup>`, `<Tooltip.Arrow>`.
1803
3145
 
3146
+ Anatomy:
3147
+
3148
+ ```
3149
+ <Tooltip.Root>
3150
+ <Tooltip.Trigger>
3151
+ <Tooltip.Portal>
3152
+ <Tooltip.Positioner>
3153
+ <Tooltip.Popup>
3154
+ <Tooltip.Arrow>
3155
+ ```
3156
+
1804
3157
  Props of its root:
1805
3158
 
1806
- - `open?: boolean`
1807
- - `defaultOpen?: boolean`
1808
- - `onOpenChange?: ((open: boolean, details: ChangeDetails) => void)`
3159
+ - `open?: boolean`: Whether it is open, when the caller holds it.
3160
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
3161
+ - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
1809
3162
  - `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds.
1810
3163
  - `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds.
1811
- - `disabled?: boolean`
3164
+ - `disabled?: boolean`: Disabled: the pointer and focus do not open it.
3165
+
3166
+ Each part, and its own props:
3167
+
3168
+ - `<Tooltip.Root>` draws no element. Holds the tooltip: whether it is open. Its props are above.
3169
+ - `<Tooltip.Trigger>` draws a `<button>`.
3170
+ - `delay?: number`: How long the pointer rests on this trigger before the popup opens, in milliseconds.
3171
+ - `closeDelay?: number`: How long after the pointer leaves this trigger's popup closes, in milliseconds.
3172
+ - `<Tooltip.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
3173
+ - `<Tooltip.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
3174
+ - `<Tooltip.Popup>` draws a `<div>`.
3175
+ - `<Tooltip.Arrow>` draws a `<div>`.
1812
3176
 
1813
3177
  Attributes and CSS variables, by part:
1814
3178
 
@@ -1817,7 +3181,7 @@ Attributes and CSS variables, by part:
1817
3181
  - positioner: Places the popup against the trigger. It carries the geometry.
1818
3182
  - `data-open`: Present when it is open.
1819
3183
  - `data-closed`: Present when it is closed.
1820
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
3184
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1821
3185
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1822
3186
  - `--anchor-width`: The anchor's width.
1823
3187
  - `--anchor-height`: The anchor's height.
@@ -1829,10 +3193,10 @@ Attributes and CSS variables, by part:
1829
3193
  - `data-closed`: Present when it is closed.
1830
3194
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1831
3195
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1832
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
3196
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1833
3197
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1834
3198
  - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
1835
3199
  - arrow: An element that points at the trigger, placed along the popup's edge.
1836
- - `data-side="top | right | bottom | left"`: The side of the anchor it is on, after any flip.
3200
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
1837
3201
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1838
3202
  - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.