@kirana-ui/solid 0.1.0 → 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 (213) hide show
  1. package/dom/accordion.js +9 -6
  2. package/dom/agent.js +3 -0
  3. package/dom/autocomplete.js +2 -0
  4. package/dom/autosize.js +19 -0
  5. package/dom/avatar.js +3 -3
  6. package/dom/button.js +1 -1
  7. package/dom/calendar.js +145 -0
  8. package/dom/carousel.js +83 -0
  9. package/dom/checkbox.js +5 -4
  10. package/dom/collapsible.js +3 -3
  11. package/dom/combobox.js +289 -0
  12. package/dom/command.js +129 -0
  13. package/dom/context-menu.js +2 -0
  14. package/dom/date-field.js +90 -0
  15. package/dom/date-picker.js +103 -0
  16. package/dom/dialog.js +32 -1
  17. package/dom/drawer.js +2 -0
  18. package/dom/field.js +3 -3
  19. package/dom/fieldset.js +2 -2
  20. package/dom/form.js +1 -1
  21. package/dom/hover-popup.js +19 -4
  22. package/dom/index.js +26 -1
  23. package/dom/input.js +26 -0
  24. package/dom/label.js +18 -0
  25. package/dom/listbox.js +114 -0
  26. package/dom/menu.js +261 -0
  27. package/dom/menubar-context.js +3 -0
  28. package/dom/menubar.js +33 -0
  29. package/dom/message-scroller.js +56 -0
  30. package/dom/navigation-menu.js +147 -0
  31. package/dom/number-field.js +82 -0
  32. package/dom/otp.js +95 -0
  33. package/dom/pagination.js +74 -0
  34. package/dom/popover.js +22 -7
  35. package/dom/qr-code.js +48 -0
  36. package/dom/radio-group.js +6 -5
  37. package/dom/resizable.js +65 -0
  38. package/dom/runtime.js +59 -9
  39. package/dom/scroll-area.js +99 -0
  40. package/dom/select.js +91 -15
  41. package/dom/separator.js +1 -1
  42. package/dom/slider.js +11 -8
  43. package/dom/switch.js +5 -4
  44. package/dom/tabs.js +5 -5
  45. package/dom/testing.js +3 -0
  46. package/dom/toast.js +150 -0
  47. package/dom/toggle-group.js +37 -0
  48. package/dom/toggle.js +12 -4
  49. package/dom/toolbar-context.js +5 -0
  50. package/dom/toolbar.js +71 -0
  51. package/dom/value-bar.js +3 -3
  52. package/llms.txt +3202 -0
  53. package/package.json +236 -2
  54. package/server/accordion.js +9 -6
  55. package/server/agent.js +3 -0
  56. package/server/autocomplete.js +2 -0
  57. package/server/autosize.js +19 -0
  58. package/server/avatar.js +3 -3
  59. package/server/button.js +1 -1
  60. package/server/calendar.js +144 -0
  61. package/server/carousel.js +83 -0
  62. package/server/checkbox.js +5 -4
  63. package/server/collapsible.js +3 -3
  64. package/server/combobox.js +289 -0
  65. package/server/command.js +129 -0
  66. package/server/context-menu.js +2 -0
  67. package/server/date-field.js +90 -0
  68. package/server/date-picker.js +103 -0
  69. package/server/dialog.js +32 -1
  70. package/server/drawer.js +2 -0
  71. package/server/field.js +3 -3
  72. package/server/fieldset.js +2 -2
  73. package/server/form.js +1 -1
  74. package/server/hover-popup.js +19 -4
  75. package/server/index.js +26 -1
  76. package/server/input.js +26 -0
  77. package/server/label.js +18 -0
  78. package/server/listbox.js +114 -0
  79. package/server/menu.js +261 -0
  80. package/server/menubar-context.js +3 -0
  81. package/server/menubar.js +33 -0
  82. package/server/message-scroller.js +56 -0
  83. package/server/navigation-menu.js +147 -0
  84. package/server/number-field.js +81 -0
  85. package/server/otp.js +94 -0
  86. package/server/pagination.js +74 -0
  87. package/server/popover.js +22 -7
  88. package/server/qr-code.js +48 -0
  89. package/server/radio-group.js +6 -5
  90. package/server/resizable.js +65 -0
  91. package/server/runtime.js +58 -8
  92. package/server/scroll-area.js +99 -0
  93. package/server/select.js +91 -15
  94. package/server/separator.js +1 -1
  95. package/server/slider.js +11 -8
  96. package/server/switch.js +5 -4
  97. package/server/tabs.js +5 -5
  98. package/server/testing.js +3 -0
  99. package/server/toast.js +150 -0
  100. package/server/toggle-group.js +37 -0
  101. package/server/toggle.js +12 -4
  102. package/server/toolbar-context.js +5 -0
  103. package/server/toolbar.js +71 -0
  104. package/server/value-bar.js +3 -3
  105. package/skills/kirana-ui-primitives/SKILL.md +142 -0
  106. package/src/accordion.jsx +10 -7
  107. package/src/agent.js +3 -0
  108. package/src/autocomplete.jsx +2 -0
  109. package/src/autosize.jsx +8 -0
  110. package/src/avatar.jsx +3 -3
  111. package/src/button.jsx +1 -1
  112. package/src/calendar.jsx +108 -0
  113. package/src/carousel.jsx +51 -0
  114. package/src/checkbox.jsx +5 -3
  115. package/src/collapsible.jsx +3 -3
  116. package/src/combobox.jsx +187 -0
  117. package/src/command.jsx +81 -0
  118. package/src/context-menu.js +2 -0
  119. package/src/date-field.jsx +71 -0
  120. package/src/date-picker.jsx +72 -0
  121. package/src/dialog.jsx +27 -1
  122. package/src/drawer.js +2 -0
  123. package/src/field.jsx +3 -3
  124. package/src/fieldset.jsx +2 -2
  125. package/src/form.jsx +1 -1
  126. package/src/hover-popup.jsx +12 -4
  127. package/src/index.js +26 -1
  128. package/src/input.jsx +17 -0
  129. package/src/label.jsx +9 -0
  130. package/src/listbox.jsx +81 -0
  131. package/src/menu.jsx +164 -0
  132. package/src/menubar-context.js +3 -0
  133. package/src/menubar.jsx +21 -0
  134. package/src/message-scroller.jsx +27 -0
  135. package/src/navigation-menu.jsx +96 -0
  136. package/src/number-field.jsx +75 -0
  137. package/src/otp.jsx +73 -0
  138. package/src/pagination.jsx +60 -0
  139. package/src/popover.jsx +22 -4
  140. package/src/qr-code.jsx +25 -0
  141. package/src/radio-group.jsx +7 -5
  142. package/src/resizable.jsx +46 -0
  143. package/src/runtime.jsx +54 -9
  144. package/src/scroll-area.jsx +53 -0
  145. package/src/select.jsx +72 -14
  146. package/src/separator.jsx +1 -1
  147. package/src/slider.jsx +13 -8
  148. package/src/switch.jsx +5 -3
  149. package/src/tabs.jsx +6 -6
  150. package/src/testing.js +3 -0
  151. package/src/toast.jsx +86 -0
  152. package/src/toggle-group.jsx +32 -0
  153. package/src/toggle.jsx +9 -3
  154. package/src/toolbar-context.js +5 -0
  155. package/src/toolbar.jsx +43 -0
  156. package/src/value-bar.jsx +3 -3
  157. package/types/accordion.d.ts +21 -19
  158. package/types/agent.d.ts +1 -0
  159. package/types/alert-dialog.d.ts +1 -0
  160. package/types/autocomplete.d.ts +2 -0
  161. package/types/autosize.d.ts +11 -0
  162. package/types/avatar.d.ts +12 -5
  163. package/types/button.d.ts +4 -2
  164. package/types/calendar.d.ts +57 -0
  165. package/types/carousel.d.ts +34 -0
  166. package/types/checkbox.d.ts +10 -6
  167. package/types/collapsible.d.ts +11 -7
  168. package/types/combobox.d.ts +105 -0
  169. package/types/command.d.ts +55 -0
  170. package/types/context-menu.d.ts +2 -0
  171. package/types/date-field.d.ts +34 -0
  172. package/types/date-picker.d.ts +40 -0
  173. package/types/dialog.d.ts +52 -20
  174. package/types/direction.d.ts +1 -0
  175. package/types/drawer.d.ts +2 -0
  176. package/types/field.d.ts +19 -11
  177. package/types/fieldset.d.ts +8 -3
  178. package/types/form.d.ts +5 -2
  179. package/types/hover-card.d.ts +16 -7
  180. package/types/hover-popup.d.ts +23 -10
  181. package/types/index.d.ts +39 -2
  182. package/types/input.d.ts +13 -0
  183. package/types/label.d.ts +7 -0
  184. package/types/listbox.d.ts +36 -0
  185. package/types/menu.d.ts +105 -0
  186. package/types/menubar-context.d.ts +3 -0
  187. package/types/menubar.d.ts +12 -0
  188. package/types/message-scroller.d.ts +22 -0
  189. package/types/meter.d.ts +16 -7
  190. package/types/navigation-menu.d.ts +50 -0
  191. package/types/number-field.d.ts +22 -0
  192. package/types/otp.d.ts +39 -0
  193. package/types/pagination.d.ts +31 -0
  194. package/types/popover.d.ts +41 -13
  195. package/types/progress.d.ts +16 -7
  196. package/types/qr-code.d.ts +20 -0
  197. package/types/radio-group.d.ts +15 -16
  198. package/types/resizable.d.ts +29 -0
  199. package/types/runtime.d.ts +53 -11
  200. package/types/scroll-area.d.ts +28 -0
  201. package/types/select.d.ts +66 -33
  202. package/types/separator.d.ts +5 -3
  203. package/types/slider.d.ts +25 -13
  204. package/types/switch.d.ts +8 -4
  205. package/types/tabs.d.ts +20 -16
  206. package/types/testing.d.ts +1 -0
  207. package/types/toast.d.ts +57 -0
  208. package/types/toggle-group.d.ts +9 -0
  209. package/types/toggle.d.ts +6 -3
  210. package/types/toolbar-context.d.ts +6 -0
  211. package/types/toolbar.d.ts +28 -0
  212. package/types/tooltip.d.ts +16 -7
  213. package/types/value-bar.d.ts +21 -10
package/llms.txt ADDED
@@ -0,0 +1,3202 @@
1
+ # @kirana-ui/solid
2
+
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
+
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"]`
290
+
291
+ ## Using it
292
+
293
+ - Each component is a namespace of parts: `<Dialog.Root>`, `<Dialog.Trigger>`. A component with one part is the component: `<Button>`.
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).
298
+ - Controlled: `value={value()}` with `onValueChange`. Uncontrolled: `defaultValue`.
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.
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.
311
+ - A boolean state is an attribute that is present or absent (`[data-open]`), never `="false"`.
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.
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.
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.
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.
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.
317
+
318
+ ## Components
319
+
320
+ ### Accordion
321
+
322
+ ```
323
+ import { Accordion } from "@kirana-ui/solid/accordion"
324
+ ```
325
+
326
+ Parts: `<Accordion.Root>`, `<Accordion.Item>`, `<Accordion.Header>`, `<Accordion.Trigger>`, `<Accordion.Panel>`.
327
+
328
+ Anatomy:
329
+
330
+ ```
331
+ <Accordion.Root>
332
+ <Accordion.Item> (repeated)
333
+ <Accordion.Header>
334
+ <Accordion.Trigger>
335
+ <Accordion.Panel>
336
+ ```
337
+
338
+ Props of its root:
339
+
340
+ - `value?: readonly Value[]`: The values of the open items.
341
+ - `defaultValue?: readonly Value[]`: Read once.
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.
343
+ - `multiple?: boolean`: Whether several items can be open at once. Default `false`: opening one closes the others.
344
+ - `disabled?: boolean`: Disables every item: none can be opened or closed.
345
+ - `orientation?: Orientation`: The way the arrows move between triggers. Default `vertical`.
346
+ - `loop?: boolean`: Whether the arrows wrap from the last trigger to the first. Default `true`.
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
+
359
+ Attributes and CSS variables, by part:
360
+
361
+ - root: Groups the items.
362
+ - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
363
+ - `data-disabled`: Present when it is disabled.
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.
365
+ - `data-open`: Present when the item is open.
366
+ - `data-disabled`: Present when it is disabled.
367
+ - header: The heading that holds the trigger.
368
+ - `data-open`: Present when the item is open.
369
+ - `data-disabled`: Present when it is disabled.
370
+ - trigger: The button that opens and closes the item's panel.
371
+ - `data-panel-open`: Present when the item's panel is open.
372
+ - `data-disabled`: Present when it is disabled.
373
+ - panel: The item's content. In the page while open, and through its exit's motion.
374
+ - `data-open`: Present when it is open.
375
+ - `data-closed`: Present when it is closed.
376
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
377
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
378
+ - `data-disabled`: Present when it is disabled.
379
+ - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
380
+ - `--accordion-panel-height`: The panel's content height while it opens or closes, `auto` once it is open.
381
+ - `--accordion-panel-width`: The panel's content width while it opens or closes, `auto` once it is open.
382
+
383
+ ### AlertDialog
384
+
385
+ ```
386
+ import { AlertDialog } from "@kirana-ui/solid/alert-dialog"
387
+ ```
388
+
389
+ Parts: `<AlertDialog.Root>`, `<AlertDialog.Trigger>`, `<AlertDialog.Portal>`, `<AlertDialog.Backdrop>`, `<AlertDialog.Popup>`, `<AlertDialog.Title>`, `<AlertDialog.Description>`, `<AlertDialog.Close>`.
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
+
421
+ Attributes and CSS variables, by part:
422
+
423
+ - trigger: The button that opens the dialog.
424
+ - `data-popup-open`: Present when the dialog is open.
425
+ - backdrop: The layer over the page behind the dialog.
426
+ - `data-open`: Present when it is open.
427
+ - `data-closed`: Present when it is closed.
428
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
429
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
430
+ - popup: The dialog itself.
431
+ - `data-open`: Present when it is open.
432
+ - `data-closed`: Present when it is closed.
433
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
434
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
435
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
436
+ - `--nested-dialogs`: How many dialogs are open above this one.
437
+
438
+ ### Autocomplete
439
+
440
+ ```
441
+ import { Autocomplete } from "@kirana-ui/solid/autocomplete"
442
+ ```
443
+
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
+ ```
464
+
465
+ Props of its root:
466
+
467
+ - `value?: string`: What the input says: the text is the value.
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.
473
+ - `mode?: "list" | "none"`: `"list"` (the default): the suggestions are filtered by what is typed. `"none"`: they are as the caller draws them.
474
+ - `filter?: ((label: string, query: string) => boolean) | null`: Whether a suggestion is shown for what was typed; `null` shows every one.
475
+ - `openOnInputClick?: boolean`: Whether a press on the input opens the list. Default: it opens when something is typed.
476
+ - `disabled?: boolean`: Disabled: it cannot be changed.
477
+ - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
478
+ - `name?: string`: The input's name in the form around it.
479
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
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.
503
+
504
+ Attributes and CSS variables, by part:
505
+
506
+ - input: The text input: its text is the value, and what is typed asks for suggestions.
507
+ - `data-popup-open`: Present when the list is open.
508
+ - `data-disabled`: Present when it is disabled.
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.
510
+ - `data-popup-open`: Present when the list is open.
511
+ - `data-disabled`: Present when it is disabled.
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.
513
+ - `data-open`: Present when it is open.
514
+ - `data-closed`: Present when it is closed.
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.
516
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
517
+ - `--anchor-width`: The anchor's width.
518
+ - `--anchor-height`: The anchor's height.
519
+ - `--available-width`: The width between the anchor and the edge of the viewport.
520
+ - `--available-height`: The height between the anchor and the edge of the viewport.
521
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
522
+ - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list.
523
+ - `data-open`: Present when it is open.
524
+ - `data-closed`: Present when it is closed.
525
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
526
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
528
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
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.
532
+ - item: One suggestion: chosen, its text is written into the input.
533
+ - `data-selected`: Present on the chosen item.
534
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
535
+ - `data-disabled`: Present when it is disabled.
536
+ - clear: A button that empties the input and the value.
537
+ - `data-disabled`: Present when it is disabled.
538
+
539
+ ### Autosize
540
+
541
+ ```
542
+ import { Autosize } from "@kirana-ui/solid/autosize"
543
+ ```
544
+
545
+ Parts: `<Autosize.Textarea>`.
546
+
547
+ Anatomy:
548
+
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.
556
+
557
+ ### Avatar
558
+
559
+ ```
560
+ import { Avatar } from "@kirana-ui/solid/avatar"
561
+ ```
562
+
563
+ Parts: `<Avatar.Root>`, `<Avatar.Image>`, `<Avatar.Fallback>`.
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
+
580
+ ### Button
581
+
582
+ ```
583
+ import { Button } from "@kirana-ui/solid/button"
584
+ ```
585
+
586
+ Props:
587
+
588
+ - `disabled?: boolean`: Disabled: a press does nothing.
589
+ - `focusableWhenDisabled?: boolean`: Keeps a disabled button in the tab order, so what it would do can still be read.
590
+ - `nativeButton?: boolean`: `false` when the element is not a `<button>`: it is given a button's role and keyboard.
591
+
592
+ `<Button>` draws a `<button>`.
593
+
594
+ Attributes and CSS variables, by part:
595
+
596
+ - root: The button.
597
+ - `data-disabled`: Present when it is disabled.
598
+
599
+ ### Calendar
600
+
601
+ ```
602
+ import { Calendar } from "@kirana-ui/solid/calendar"
603
+ ```
604
+
605
+ Parts: `<Calendar.Root>`, `<Calendar.Heading>`, `<Calendar.Previous>`, `<Calendar.Next>`, `<Calendar.Grid>`, `<Calendar.Weekdays>`, `<Calendar.HeadCell>`, `<Calendar.Weeks>`, `<Calendar.Cell>`, `<Calendar.Day>`.
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
+
622
+ Props of its root:
623
+
624
+ - `value?: CalendarValue`: One day, or with `mode: "range"` a first and a last day; `null` for none.
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.
627
+ - `mode?: "single" | "range"`: Whether one day is chosen (the default) or a first and a last.
628
+ - `defaultFocusedValue?: IsoDate`: The day it opens on, when it has no value: its month is the one shown.
629
+ - `onMonthChange?: (month: IsoDate) => void`: Heard when another month is shown: its first day.
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.
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.
632
+ - `min?: IsoDate`: The first and the last day that can be chosen.
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.
637
+ - `fixedWeeks?: boolean`: Always six rows, so the calendar is one height in every month.
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
+
657
+ Attributes and CSS variables, by part:
658
+
659
+ - root: The calendar.
660
+ - `data-disabled`: Present when it is disabled.
661
+ - `data-readonly`: Present when its value cannot be changed.
662
+ - previous: Shows the month before.
663
+ - `data-disabled`: Present when it is disabled.
664
+ - next: Shows the month after.
665
+ - `data-disabled`: Present when it is disabled.
666
+ - cell: A day's cell.
667
+ - `data-selected`: Present on a chosen day, and on every day of a chosen range.
668
+ - `data-today`: Present on today.
669
+ - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
670
+ - `data-disabled`: Present when it is disabled.
671
+ - `data-unavailable`: Present on a day that cannot be chosen.
672
+ - `data-range-start`: Present on the first day of a range.
673
+ - `data-range-end`: Present on the last day of a range.
674
+ - day: The button for a day.
675
+ - `data-selected`: Present on a chosen day, and on every day of a chosen range.
676
+ - `data-today`: Present on today.
677
+ - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
678
+ - `data-disabled`: Present when it is disabled.
679
+ - `data-unavailable`: Present on a day that cannot be chosen.
680
+ - `data-range-start`: Present on the first day of a range.
681
+ - `data-range-end`: Present on the last day of a range.
682
+
683
+ ### Carousel
684
+
685
+ ```
686
+ import { Carousel } from "@kirana-ui/solid/carousel"
687
+ ```
688
+
689
+ Parts: `<Carousel.Root>`, `<Carousel.Viewport>`, `<Carousel.Item>`, `<Carousel.Previous>`, `<Carousel.Next>`, `<Carousel.Indicator>`.
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
+
702
+ Props of its root:
703
+
704
+ - `index?: number`: Which slide is at the start of the view, from 0.
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.
707
+ - `orientation?: Orientation`: Whether the slides go across (the default) or down.
708
+ - `loop?: boolean`: Whether going on from the last slide comes round to the first.
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
+
721
+ Attributes and CSS variables, by part:
722
+
723
+ - root: The carousel: a region, named by the caller.
724
+ - `data-orientation="horizontal | vertical"`: Whether the slides go across or down.
725
+ - viewport: What scrolls. The slides are its children; the design snaps them (`scroll-snap-type`) and says whether a step glides (`scroll-behavior`).
726
+ - `data-orientation="horizontal | vertical"`: Whether the slides go across or down.
727
+ - item: One slide.
728
+ - `data-orientation="horizontal | vertical"`: Whether the slides go across or down.
729
+ - `data-current`: Present on the slide the view is at, and on its button.
730
+ - previous: Goes back a slide.
731
+ - `data-disabled`: Present when it is disabled.
732
+ - next: Goes on a slide.
733
+ - `data-disabled`: Present when it is disabled.
734
+ - indicator: A button for one slide.
735
+ - `data-current`: Present on the slide the view is at, and on its button.
736
+
737
+ ### Checkbox
738
+
739
+ ```
740
+ import { Checkbox } from "@kirana-ui/solid/checkbox"
741
+ ```
742
+
743
+ Parts: `<Checkbox.Root>`, `<Checkbox.Indicator>`.
744
+
745
+ Anatomy:
746
+
747
+ ```
748
+ <Checkbox.Root>
749
+ <Checkbox.Indicator>
750
+ ```
751
+
752
+ Props of its root:
753
+
754
+ - `checked?: boolean`: Whether it is checked, when the caller holds it.
755
+ - `defaultChecked?: boolean`: Read once.
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.
759
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
760
+ - `required?: boolean`: Needed: in a `Field`, leaving it unchecked is then invalid.
761
+ - `name?: string`: With a name, the control is submitted with the form around it when it is checked.
762
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
763
+ - `value?: string`: What is submitted. Default `"on"`, as a native checkbox's.
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.
770
+
771
+ Attributes and CSS variables, by part:
772
+
773
+ - root: The box. It holds a hidden native checkbox, which a form and a label reach.
774
+ - `data-checked`: Present when it is checked.
775
+ - `data-unchecked`: Present when it is not checked.
776
+ - `data-indeterminate`: Present when it is neither checked nor unchecked.
777
+ - `data-disabled`: Present when it is disabled.
778
+ - `data-readonly`: Present when it can be read but not changed.
779
+ - `data-required`: Present when the form needs it.
780
+ - indicator: The mark. In the page while the box is checked or indeterminate.
781
+ - `data-checked`: Present when it is checked.
782
+ - `data-unchecked`: Present when it is not checked.
783
+ - `data-indeterminate`: Present when it is neither checked nor unchecked.
784
+ - `data-disabled`: Present when it is disabled.
785
+ - `data-readonly`: Present when it can be read but not changed.
786
+ - `data-required`: Present when the form needs it.
787
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
788
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
789
+
790
+ ### Collapsible
791
+
792
+ ```
793
+ import { Collapsible } from "@kirana-ui/solid/collapsible"
794
+ ```
795
+
796
+ Parts: `<Collapsible.Root>`, `<Collapsible.Trigger>`, `<Collapsible.Panel>`.
797
+
798
+ Anatomy:
799
+
800
+ ```
801
+ <Collapsible.Root>
802
+ <Collapsible.Trigger> (repeated)
803
+ <Collapsible.Panel>
804
+ ```
805
+
806
+ Props of its root:
807
+
808
+ - `open?: boolean`: Whether it is open, when the caller holds it.
809
+ - `defaultOpen?: boolean`: Read once.
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`.
819
+
820
+ Attributes and CSS variables, by part:
821
+
822
+ - root: Groups the trigger and the panel.
823
+ - `data-open`: Present when it is open.
824
+ - `data-closed`: Present when it is closed.
825
+ - `data-disabled`: Present when it is disabled.
826
+ - trigger: The button that opens and closes the panel.
827
+ - `data-panel-open`: Present when the panel is open.
828
+ - `data-disabled`: Present when it is disabled.
829
+ - panel: The content. In the page while open, and through its exit's motion.
830
+ - `data-open`: Present when it is open.
831
+ - `data-closed`: Present when it is closed.
832
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
833
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
834
+ - `--collapsible-panel-height`: The panel's content height while it opens or closes, `auto` once it is open.
835
+ - `--collapsible-panel-width`: The panel's content width while it opens or closes, `auto` once it is open.
836
+
837
+ ### Combobox
838
+
839
+ ```
840
+ import { Combobox } from "@kirana-ui/solid/combobox"
841
+ ```
842
+
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
+ ```
869
+
870
+ Props of its root:
871
+
872
+ - `value?: Value | null`: The chosen value; `null` is "none".
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.
875
+ - `inputValue?: string`: What the input says.
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.
882
+ - `name?: string`: With a name, the value is submitted with the form around it.
883
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
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.
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.
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`.
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.
890
+ - `required?: boolean`: In a field, "none" is then wrong.
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.
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.
921
+
922
+ Attributes and CSS variables, by part:
923
+
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.
925
+ - `data-popup-open`: Present when the list is open.
926
+ - `data-disabled`: Present when it is disabled.
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.
928
+ - `data-popup-open`: Present when the list is open.
929
+ - `data-disabled`: Present when it is disabled.
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.
931
+ - `data-open`: Present when it is open.
932
+ - `data-closed`: Present when it is closed.
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.
934
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
935
+ - `--anchor-width`: The anchor's width.
936
+ - `--anchor-height`: The anchor's height.
937
+ - `--available-width`: The width between the anchor and the edge of the viewport.
938
+ - `--available-height`: The height between the anchor and the edge of the viewport.
939
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
940
+ - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list.
941
+ - `data-open`: Present when it is open.
942
+ - `data-closed`: Present when it is closed.
943
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
944
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
946
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
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.
950
+ - item: One choice in the list.
951
+ - `data-selected`: Present on the chosen item.
952
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
953
+ - `data-disabled`: Present when it is disabled.
954
+ - clear: A button that empties the input and the value.
955
+ - `data-disabled`: Present when it is disabled.
956
+ - chipRemove: A chip's button that takes its value away.
957
+ - `data-disabled`: Present when it is disabled.
958
+
959
+ ### Command
960
+
961
+ ```
962
+ import { Command } from "@kirana-ui/solid/command"
963
+ ```
964
+
965
+ Parts: `<Command.Root>`, `<Command.Input>`, `<Command.List>`, `<Command.Empty>`, `<Command.Group>`, `<Command.GroupHeading>`, `<Command.Item>`, `<Command.Separator>`.
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
+
980
+ Props of its root:
981
+
982
+ - `inputValue?: string`: What the input says.
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.
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.
987
+ - `loop?: boolean`: Whether a step past an end of the list goes round to the other.
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.
1005
+
1006
+ Attributes and CSS variables, by part:
1007
+
1008
+ - root: A list of commands with the input that filters it.
1009
+ - `data-disabled`: Present when it is disabled.
1010
+ - input: The text input. What is typed filters the list; focus stays in it.
1011
+ - `data-disabled`: Present when it is disabled.
1012
+ - list: The commands.
1013
+ - `data-empty`: Present when no item is shown for what was typed.
1014
+ - item: One command.
1015
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1016
+ - `data-disabled`: Present when it is disabled.
1017
+
1018
+ ### ContextMenu
1019
+
1020
+ ```
1021
+ import { ContextMenu } from "@kirana-ui/solid/context-menu"
1022
+ ```
1023
+
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>`.
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
+
1050
+ Props of its root:
1051
+
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.
1055
+ - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
1056
+ - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
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.
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
+
1108
+ Attributes and CSS variables, by part:
1109
+
1110
+ - trigger: The area a secondary press, or a long press on a touch screen, opens the menu in.
1111
+ - `data-popup-open`: Present when the menu is open.
1112
+ - positioner: Places the menu against its trigger. It carries the geometry.
1113
+ - `data-open`: Present when it is open.
1114
+ - `data-closed`: Present when it is closed.
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.
1116
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1117
+ - `--anchor-width`: The anchor's width.
1118
+ - `--anchor-height`: The anchor's height.
1119
+ - `--available-width`: The width between the anchor and the edge of the viewport.
1120
+ - `--available-height`: The height between the anchor and the edge of the viewport.
1121
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1122
+ - popup: The menu itself: the list of items.
1123
+ - `data-open`: Present when it is open.
1124
+ - `data-closed`: Present when it is closed.
1125
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1126
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
1128
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1129
+ - arrow: An element that points at the trigger.
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.
1131
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1132
+ - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
1133
+ - item: An action. Choosing it closes the menu.
1134
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1135
+ - `data-disabled`: Present when it is disabled.
1136
+ - linkItem: An item that is a link. Choosing it follows the link and closes the menu.
1137
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1138
+ - `data-disabled`: Present when it is disabled.
1139
+ - checkboxItem: An item that is checked or not. Choosing it leaves the menu open.
1140
+ - `data-checked`: Present when it is checked.
1141
+ - `data-unchecked`: Present when it is not checked.
1142
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1143
+ - `data-disabled`: Present when it is disabled.
1144
+ - checkboxItemIndicator: A mark a checkbox item shows while it is checked.
1145
+ - `data-checked`: Present when it is checked.
1146
+ - `data-unchecked`: Present when it is not checked.
1147
+ - radioGroup: Radio items of which one is chosen.
1148
+ - `data-disabled`: Present when it is disabled.
1149
+ - radioItem: One choice of a radio group. Choosing it leaves the menu open.
1150
+ - `data-checked`: Present when it is checked.
1151
+ - `data-unchecked`: Present when it is not checked.
1152
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1153
+ - `data-disabled`: Present when it is disabled.
1154
+ - radioItemIndicator: A mark a radio item shows while it is the chosen one.
1155
+ - `data-checked`: Present when it is checked.
1156
+ - `data-unchecked`: Present when it is not checked.
1157
+ - submenuTrigger: An item that opens a menu beside it.
1158
+ - `data-popup-open`: Present when its menu is open.
1159
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1160
+ - `data-disabled`: Present when it is disabled.
1161
+
1162
+ ### DateField
1163
+
1164
+ ```
1165
+ import { DateField } from "@kirana-ui/solid/date-field"
1166
+ ```
1167
+
1168
+ Parts: `<DateField.Root>`, `<DateField.Segments>`, `<DateField.Segment>`, `<DateField.Input>`.
1169
+
1170
+ Anatomy:
1171
+
1172
+ ```
1173
+ <DateField.Root>
1174
+ <DateField.Segments>
1175
+ <DateField.Segment> (repeated)
1176
+ <DateField.Input>
1177
+ ```
1178
+
1179
+ Props of its root:
1180
+
1181
+ - `value?: IsoDate | null`: The day typed, once all of it is; `null` until then.
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.
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.
1185
+ - `min?: IsoDate`: The first and the last day it takes: outside them it says it is invalid.
1186
+ - `max?: IsoDate`: The last day it takes.
1187
+ - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part shows. Default: `dd`, `mm`, `yyyy`.
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.
1191
+ - `name?: string`: The name it is submitted under, by its hidden input.
1192
+ - `form?: string`: The id of the form it belongs to, when it is not inside it.
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
+
1203
+ Attributes and CSS variables, by part:
1204
+
1205
+ - root: The field: a group of the date's parts.
1206
+ - `data-disabled`: Present when it is disabled.
1207
+ - `data-readonly`: Present when its value cannot be changed.
1208
+ - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1209
+ - segment: One piece of the date: a part that is typed, or what stands between two.
1210
+ - `data-segment="day | month | year | literal"`: Which piece it is.
1211
+ - `data-placeholder`: Present on a part that is empty.
1212
+ - `data-disabled`: Present when it is disabled.
1213
+ - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1214
+
1215
+ ### DatePicker
1216
+
1217
+ ```
1218
+ import { DatePicker } from "@kirana-ui/solid/date-picker"
1219
+ ```
1220
+
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>`.
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
+
1247
+ Props of its root:
1248
+
1249
+ - `value?: IsoDate | null`: The day, typed or picked; `null` for none.
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.
1255
+ - `locale?: string`: The language and region of the field and the calendar. Give it: a server does not know.
1256
+ - `min?: IsoDate`: The first and the last day that can be typed or picked.
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.
1260
+ - `fixedWeeks?: boolean`: Always six rows of days.
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.
1265
+ - `name?: string`: The name it is submitted under.
1266
+ - `form?: string`: The id of the form it belongs to, when it is not inside it.
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
+
1297
+ Attributes and CSS variables, by part:
1298
+
1299
+ - field: The field: a group of the date's parts.
1300
+ - `data-disabled`: Present when it is disabled.
1301
+ - `data-readonly`: Present when its value cannot be changed.
1302
+ - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1303
+ - segment: One piece of the date: a part that is typed, or what stands between two.
1304
+ - `data-segment="day | month | year | literal"`: Which piece it is.
1305
+ - `data-placeholder`: Present on a part that is empty.
1306
+ - `data-disabled`: Present when it is disabled.
1307
+ - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1308
+ - trigger: The button that opens the popover, and what it is placed against.
1309
+ - `data-popup-open`: Present when the popover is open.
1310
+ - positioner: Places the popup against the trigger. It carries the geometry.
1311
+ - `data-open`: Present when it is open.
1312
+ - `data-closed`: Present when it is closed.
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.
1314
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1315
+ - `--anchor-width`: The anchor's width.
1316
+ - `--anchor-height`: The anchor's height.
1317
+ - `--available-width`: The width between the anchor and the edge of the viewport.
1318
+ - `--available-height`: The height between the anchor and the edge of the viewport.
1319
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1320
+ - popup: The popover itself.
1321
+ - `data-open`: Present when it is open.
1322
+ - `data-closed`: Present when it is closed.
1323
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1324
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
1326
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1327
+ - calendar: The calendar.
1328
+ - `data-disabled`: Present when it is disabled.
1329
+ - `data-readonly`: Present when its value cannot be changed.
1330
+ - previous: Shows the month before.
1331
+ - `data-disabled`: Present when it is disabled.
1332
+ - next: Shows the month after.
1333
+ - `data-disabled`: Present when it is disabled.
1334
+ - cell: A day's cell.
1335
+ - `data-selected`: Present on a chosen day, and on every day of a chosen range.
1336
+ - `data-today`: Present on today.
1337
+ - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1338
+ - `data-disabled`: Present when it is disabled.
1339
+ - `data-unavailable`: Present on a day that cannot be chosen.
1340
+ - `data-range-start`: Present on the first day of a range.
1341
+ - `data-range-end`: Present on the last day of a range.
1342
+ - day: The button for a day.
1343
+ - `data-selected`: Present on a chosen day, and on every day of a chosen range.
1344
+ - `data-today`: Present on today.
1345
+ - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1346
+ - `data-disabled`: Present when it is disabled.
1347
+ - `data-unavailable`: Present on a day that cannot be chosen.
1348
+ - `data-range-start`: Present on the first day of a range.
1349
+ - `data-range-end`: Present on the last day of a range.
1350
+
1351
+ ### Dialog
1352
+
1353
+ ```
1354
+ import { Dialog } from "@kirana-ui/solid/dialog"
1355
+ ```
1356
+
1357
+ Parts: `<Dialog.Root>`, `<Dialog.Trigger>`, `<Dialog.Portal>`, `<Dialog.Backdrop>`, `<Dialog.Popup>`, `<Dialog.Title>`, `<Dialog.Description>`, `<Dialog.Close>`.
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
+
1372
+ Props of its root:
1373
+
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.
1377
+ - `modal?: boolean`: Blocks the page behind it and traps focus. Default `true`.
1378
+ - `dismissible?: boolean`: Whether a press outside closes it. Default `true`.
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
+
1391
+ Attributes and CSS variables, by part:
1392
+
1393
+ - trigger: The button that opens the dialog.
1394
+ - `data-popup-open`: Present when the dialog is open.
1395
+ - backdrop: The layer over the page behind the dialog.
1396
+ - `data-open`: Present when it is open.
1397
+ - `data-closed`: Present when it is closed.
1398
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1399
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1400
+ - popup: The dialog itself.
1401
+ - `data-open`: Present when it is open.
1402
+ - `data-closed`: Present when it is closed.
1403
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1404
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1405
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
1406
+ - `--nested-dialogs`: How many dialogs are open above this one.
1407
+
1408
+ ### Drawer
1409
+
1410
+ ```
1411
+ import { Drawer } from "@kirana-ui/solid/drawer"
1412
+ ```
1413
+
1414
+ Parts: `<Drawer.Root>`, `<Drawer.Trigger>`, `<Drawer.Portal>`, `<Drawer.Backdrop>`, `<Drawer.Popup>`, `<Drawer.Title>`, `<Drawer.Description>`, `<Drawer.Close>`.
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
+
1429
+ Props of its root:
1430
+
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.
1434
+ - `modal?: boolean`: Blocks the page behind it and traps focus. Default `true`.
1435
+ - `dismissible?: boolean`: Whether a press outside closes it. Default `true`.
1436
+ - `swipeDirection?: DrawerSide`: The way it is dragged to close it: the edge it came from. Default: `"down"`.
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.
1438
+ - `snapPoint?: DrawerSnapPoint`: Which of them it rests at, as it was given.
1439
+ - `defaultSnapPoint?: DrawerSnapPoint`: Where it opens. Default: the smallest.
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.
1452
+
1453
+ Attributes and CSS variables, by part:
1454
+
1455
+ - trigger: The button that opens the dialog.
1456
+ - `data-popup-open`: Present when the dialog is open.
1457
+ - backdrop: The layer over the page behind the dialog.
1458
+ - `data-open`: Present when it is open.
1459
+ - `data-closed`: Present when it is closed.
1460
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1461
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1462
+ - `data-swiping`: Present while the drawer is dragged.
1463
+ - `--drawer-swipe-movement-x`: How far it has been dragged across.
1464
+ - `--drawer-swipe-movement-y`: How far it has been dragged up or down.
1465
+ - `--drawer-swipe-progress`: How far it has been dragged, of its own size: 0 to 1.
1466
+ - `--drawer-snap-point-offset`: How far from whole it rests, towards the edge it closes at: 0px at its largest snap point.
1467
+ - popup: The drawer. A design moves it by what it says of the drag, and gives it `touch-action: none` where a finger drags it.
1468
+ - `data-open`: Present when it is open.
1469
+ - `data-closed`: Present when it is closed.
1470
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1471
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1472
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
1473
+ - `data-swiping`: Present while the drawer is dragged.
1474
+ - `data-swipe-direction="up | down | left | right"`: The way it is dragged to close it.
1475
+ - `data-swipe-dismiss`: Present once a drag has closed it.
1476
+ - `data-expanded`: Present while it rests whole, of several snap points.
1477
+ - `data-nested-drawer-open`: Present while another drawer is open over it.
1478
+ - `data-nested-drawer-swiping`: Present while a drawer over it is dragged.
1479
+ - `--nested-dialogs`: How many dialogs are open above this one.
1480
+ - `--drawer-swipe-movement-x`: How far it has been dragged across.
1481
+ - `--drawer-swipe-movement-y`: How far it has been dragged up or down.
1482
+ - `--drawer-swipe-progress`: How far it has been dragged, of its own size: 0 to 1.
1483
+ - `--drawer-snap-point-offset`: How far from whole it rests, towards the edge it closes at: 0px at its largest snap point.
1484
+ - `--drawer-height`: Its height.
1485
+ - `--nested-drawers`: How many drawers are open over it.
1486
+ - `--drawer-frontmost-height`: The height of the drawer in front of every other, while this one is open.
1487
+ - `--drawer-swipe-strength`: Once let go: 0.1 to 1, the share of the design's own time it should take to come to rest. A drawer thrown hard arrives sooner.
1488
+ - `--drawer-width`: Its width.
1489
+
1490
+ ### Field
1491
+
1492
+ ```
1493
+ import { Field } from "@kirana-ui/solid/field"
1494
+ ```
1495
+
1496
+ Parts: `<Field.Root>`, `<Field.Label>`, `<Field.Control>`, `<Field.Description>`, `<Field.Error>`, `<Field.Validity>`.
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
+
1509
+ Props of its root:
1510
+
1511
+ - `name?: string`: The control's name in the form.
1512
+ - `disabled?: boolean`: Disables the field: its control cannot be changed, and its parts say so (`data-disabled`).
1513
+ - `invalid?: boolean`: Invalid whatever the value: an error known from elsewhere.
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.
1515
+ - `validationMode?: ValidationMode`: When the value is checked; the form's by default, else `"onSubmit"`.
1516
+ - `validationDebounceTime?: number`: With `"onChange"`, how long the value must rest before it is checked, in milliseconds.
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
+
1529
+ Attributes and CSS variables, by part:
1530
+
1531
+ - root: A control with its label, its description and its errors.
1532
+ - `data-disabled`: Present when it is disabled.
1533
+ - `data-touched`: Present once focus has left the control.
1534
+ - `data-dirty`: Present while the value is not the one it started with.
1535
+ - `data-filled`: Present while the control has a value.
1536
+ - `data-focused`: Present while the control has focus.
1537
+ - `data-valid`: Present once the value has been checked and found right.
1538
+ - `data-invalid`: Present while the value is wrong.
1539
+ - label: The control's name: a press on it reaches the control.
1540
+ - `data-disabled`: Present when it is disabled.
1541
+ - `data-touched`: Present once focus has left the control.
1542
+ - `data-dirty`: Present while the value is not the one it started with.
1543
+ - `data-filled`: Present while the control has a value.
1544
+ - `data-focused`: Present while the control has focus.
1545
+ - `data-valid`: Present once the value has been checked and found right.
1546
+ - `data-invalid`: Present while the value is wrong.
1547
+ - control: The control: an input, a textarea or a select.
1548
+ - `data-disabled`: Present when it is disabled.
1549
+ - `data-touched`: Present once focus has left the control.
1550
+ - `data-dirty`: Present while the value is not the one it started with.
1551
+ - `data-filled`: Present while the control has a value.
1552
+ - `data-focused`: Present while the control has focus.
1553
+ - `data-valid`: Present once the value has been checked and found right.
1554
+ - `data-invalid`: Present while the value is wrong.
1555
+ - description: More about the control, said after its name.
1556
+ - `data-disabled`: Present when it is disabled.
1557
+ - `data-touched`: Present once focus has left the control.
1558
+ - `data-dirty`: Present while the value is not the one it started with.
1559
+ - `data-filled`: Present while the control has a value.
1560
+ - `data-focused`: Present while the control has focus.
1561
+ - `data-valid`: Present once the value has been checked and found right.
1562
+ - `data-invalid`: Present while the value is wrong.
1563
+ - error: What is wrong with the value. In the page while it applies.
1564
+ - `data-disabled`: Present when it is disabled.
1565
+ - `data-touched`: Present once focus has left the control.
1566
+ - `data-dirty`: Present while the value is not the one it started with.
1567
+ - `data-filled`: Present while the control has a value.
1568
+ - `data-focused`: Present while the control has focus.
1569
+ - `data-valid`: Present once the value has been checked and found right.
1570
+ - `data-invalid`: Present while the value is wrong.
1571
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1572
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1573
+
1574
+ ### Fieldset
1575
+
1576
+ ```
1577
+ import { Fieldset } from "@kirana-ui/solid/fieldset"
1578
+ ```
1579
+
1580
+ Parts: `<Fieldset.Root>`, `<Fieldset.Legend>`.
1581
+
1582
+ Anatomy:
1583
+
1584
+ ```
1585
+ <Fieldset.Root>
1586
+ <Fieldset.Legend>
1587
+ ```
1588
+
1589
+ Props of its root:
1590
+
1591
+ - `disabled?: boolean`: Disables every field inside.
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
+
1598
+ Attributes and CSS variables, by part:
1599
+
1600
+ - root: The group of fields.
1601
+ - `data-disabled`: Present when it is disabled.
1602
+ - legend: The group's name.
1603
+ - `data-disabled`: Present when it is disabled.
1604
+
1605
+ ### Form
1606
+
1607
+ ```
1608
+ import { Form } from "@kirana-ui/solid/form"
1609
+ ```
1610
+
1611
+ Props:
1612
+
1613
+ - `errors?: FormErrors`: Errors from outside the page (a server's), by field name. A field shows its own until its value changes.
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.
1616
+ - `validationMode?: ValidationMode`: When the form's fields check their values, unless a field says otherwise. Default `"onSubmit"`.
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
+
1620
+ ### HoverCard
1621
+
1622
+ ```
1623
+ import { HoverCard } from "@kirana-ui/solid/hover-card"
1624
+ ```
1625
+
1626
+ Parts: `<HoverCard.Root>`, `<HoverCard.Trigger>`, `<HoverCard.Portal>`, `<HoverCard.Positioner>`, `<HoverCard.Popup>`, `<HoverCard.Arrow>`.
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
+
1639
+ Props of its root:
1640
+
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.
1644
+ - `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds.
1645
+ - `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds.
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>`.
1658
+
1659
+ Attributes and CSS variables, by part:
1660
+
1661
+ - trigger: The link the card previews.
1662
+ - `data-popup-open`: Present when the card is open.
1663
+ - positioner: Places the popup against the trigger. It carries the geometry.
1664
+ - `data-open`: Present when it is open.
1665
+ - `data-closed`: Present when it is closed.
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.
1667
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1668
+ - `--anchor-width`: The anchor's width.
1669
+ - `--anchor-height`: The anchor's height.
1670
+ - `--available-width`: The width between the anchor and the edge of the viewport.
1671
+ - `--available-height`: The height between the anchor and the edge of the viewport.
1672
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1673
+ - popup: The card itself.
1674
+ - `data-open`: Present when it is open.
1675
+ - `data-closed`: Present when it is closed.
1676
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1677
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
1679
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1680
+ - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
1681
+ - arrow: An element that points at the trigger, placed along the popup's edge.
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.
1683
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1684
+ - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
1685
+
1686
+ ### Input
1687
+
1688
+ ```
1689
+ import { Input } from "@kirana-ui/solid/input"
1690
+ ```
1691
+
1692
+ Props:
1693
+
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>`.
1698
+
1699
+ Attributes and CSS variables, by part:
1700
+
1701
+ - input: A text input. Inside a field it is the field's control.
1702
+ - `data-disabled`: Present when it is disabled.
1703
+ - `data-touched`: Present once focus has left the input.
1704
+ - `data-dirty`: Present while the value is not the one it started with.
1705
+ - `data-filled`: Present while the input has a value.
1706
+ - `data-focused`: Present while the input has focus.
1707
+ - `data-valid`: In a field: present once the value was checked and found right.
1708
+ - `data-invalid`: In a field: present while the value is wrong.
1709
+
1710
+ ### Label
1711
+
1712
+ ```
1713
+ import { Label } from "@kirana-ui/solid/label"
1714
+ ```
1715
+
1716
+ `<Label>` draws a `<label>`.
1717
+
1718
+ Attributes and CSS variables, by part:
1719
+
1720
+ - label: A control's name. Inside a field it is the field's label, with its states.
1721
+ - `data-disabled`: Present when it is disabled.
1722
+ - `data-touched`: Present once focus has left the control.
1723
+ - `data-dirty`: Present while the value is not the one it started with.
1724
+ - `data-filled`: Present while the control has a value.
1725
+ - `data-focused`: Present while the control has focus.
1726
+ - `data-valid`: Present once the value has been checked and found right.
1727
+ - `data-invalid`: Present while the value is wrong.
1728
+
1729
+ ### Listbox
1730
+
1731
+ ```
1732
+ import { Listbox } from "@kirana-ui/solid/listbox"
1733
+ ```
1734
+
1735
+ Parts: `<Listbox.Root>`, `<Listbox.Item>`, `<Listbox.ItemIndicator>`, `<Listbox.Group>`, `<Listbox.GroupLabel>`.
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
+
1747
+ Props of its root:
1748
+
1749
+ - `value?: readonly Value[]`: The chosen values: none, one, or with `multiple` several.
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.
1752
+ - `multiple?: boolean`: Whether more than one can be chosen: a press then adds or takes away.
1753
+ - `disabled?: boolean`: Disabled: no item can be chosen.
1754
+ - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do not.
1755
+ - `name?: string`: With a name, the chosen values are submitted with the form around the list.
1756
+ - `form?: string`: The id of the form the list belongs to, when it is not inside it.
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`.
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
+
1772
+ Attributes and CSS variables, by part:
1773
+
1774
+ - root: The list. It is one stop for Tab.
1775
+ - `data-disabled`: Present when it is disabled.
1776
+ - item: One choice in the list.
1777
+ - `data-selected`: Present on a chosen item.
1778
+ - `data-highlighted`: Present on the item the keyboard is on.
1779
+ - `data-disabled`: Present when it is disabled.
1780
+ - itemIndicator: A mark an item shows while it is chosen.
1781
+ - `data-selected`: Present on a chosen item.
1782
+
1783
+ ### Menu
1784
+
1785
+ ```
1786
+ import { Menu } from "@kirana-ui/solid/menu"
1787
+ ```
1788
+
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>`.
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
+
1815
+ Props of its root:
1816
+
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.
1820
+ - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
1821
+ - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
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.
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
+
1873
+ Attributes and CSS variables, by part:
1874
+
1875
+ - trigger: The button that opens the menu, and what it is placed against.
1876
+ - `data-popup-open`: Present when the menu is open.
1877
+ - `data-disabled`: Present when it is disabled.
1878
+ - positioner: Places the menu against its trigger. It carries the geometry.
1879
+ - `data-open`: Present when it is open.
1880
+ - `data-closed`: Present when it is closed.
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.
1882
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1883
+ - `--anchor-width`: The anchor's width.
1884
+ - `--anchor-height`: The anchor's height.
1885
+ - `--available-width`: The width between the anchor and the edge of the viewport.
1886
+ - `--available-height`: The height between the anchor and the edge of the viewport.
1887
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1888
+ - popup: The menu itself: the list of items.
1889
+ - `data-open`: Present when it is open.
1890
+ - `data-closed`: Present when it is closed.
1891
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1892
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
1894
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1895
+ - arrow: An element that points at the trigger.
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.
1897
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1898
+ - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
1899
+ - item: An action. Choosing it closes the menu.
1900
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1901
+ - `data-disabled`: Present when it is disabled.
1902
+ - linkItem: An item that is a link. Choosing it follows the link and closes the menu.
1903
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1904
+ - `data-disabled`: Present when it is disabled.
1905
+ - checkboxItem: An item that is checked or not. Choosing it leaves the menu open.
1906
+ - `data-checked`: Present when it is checked.
1907
+ - `data-unchecked`: Present when it is not checked.
1908
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1909
+ - `data-disabled`: Present when it is disabled.
1910
+ - checkboxItemIndicator: A mark a checkbox item shows while it is checked.
1911
+ - `data-checked`: Present when it is checked.
1912
+ - `data-unchecked`: Present when it is not checked.
1913
+ - radioGroup: Radio items of which one is chosen.
1914
+ - `data-disabled`: Present when it is disabled.
1915
+ - radioItem: One choice of a radio group. Choosing it leaves the menu open.
1916
+ - `data-checked`: Present when it is checked.
1917
+ - `data-unchecked`: Present when it is not checked.
1918
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1919
+ - `data-disabled`: Present when it is disabled.
1920
+ - radioItemIndicator: A mark a radio item shows while it is the chosen one.
1921
+ - `data-checked`: Present when it is checked.
1922
+ - `data-unchecked`: Present when it is not checked.
1923
+ - submenuTrigger: An item that opens a menu beside it.
1924
+ - `data-popup-open`: Present when its menu is open.
1925
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1926
+ - `data-disabled`: Present when it is disabled.
1927
+
1928
+ ### Menubar
1929
+
1930
+ ```
1931
+ import { Menubar } from "@kirana-ui/solid/menubar"
1932
+ ```
1933
+
1934
+ Props:
1935
+
1936
+ - `loop?: boolean`: Whether the arrows go round from the last menu to the first. Default: they do.
1937
+ - `disabled?: boolean`: No menu of the bar opens.
1938
+ - `orientation?: Orientation`: A row (the default) or a column of menus. In a column a menu opens beside its trigger.
1939
+
1940
+ `<Menubar>` draws a `<div>`.
1941
+
1942
+ Attributes and CSS variables, by part:
1943
+
1944
+ - root: The row of menus. A menu inside it is one of its items.
1945
+ - `data-disabled`: Present when it is disabled.
1946
+ - `data-orientation="horizontal | vertical"`: Whether its menus are in a row or a column.
1947
+
1948
+ ### MessageScroller
1949
+
1950
+ ```
1951
+ import { MessageScroller } from "@kirana-ui/solid/message-scroller"
1952
+ ```
1953
+
1954
+ Parts: `<MessageScroller.Root>`, `<MessageScroller.Viewport>`, `<MessageScroller.Content>`, `<MessageScroller.Button>`.
1955
+
1956
+ Anatomy:
1957
+
1958
+ ```
1959
+ <MessageScroller.Root>
1960
+ <MessageScroller.Viewport>
1961
+ <MessageScroller.Content>
1962
+ <MessageScroller.Button>
1963
+ ```
1964
+
1965
+ Props of its root:
1966
+
1967
+ - `initial?: "bottom" | "top"`: Where it begins: at the newest message (the default), or at the first.
1968
+ - `threshold?: number`: How near the end counts as at it, in pixels. Default: 24.
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>`.
1977
+
1978
+ Attributes and CSS variables, by part:
1979
+
1980
+ - root: What holds the conversation and its button.
1981
+ - `data-at-bottom`: Present while the newest message is in view.
1982
+ - viewport: What scrolls: a log, reached by the keyboard.
1983
+ - `data-at-bottom`: Present while the newest message is in view.
1984
+ - button: Goes to the newest message. Inert while that is in view.
1985
+ - `data-at-bottom`: Present while the newest message is in view.
1986
+
1987
+ ### Meter
1988
+
1989
+ ```
1990
+ import { Meter } from "@kirana-ui/solid/meter"
1991
+ ```
1992
+
1993
+ Parts: `<Meter.Root>`, `<Meter.Track>`, `<Meter.Indicator>`, `<Meter.Value>`, `<Meter.Label>`.
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
+
2023
+ ### NavigationMenu
2024
+
2025
+ ```
2026
+ import { NavigationMenu } from "@kirana-ui/solid/navigation-menu"
2027
+ ```
2028
+
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>`.
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
+
2051
+ Props of its root:
2052
+
2053
+ - `value?: Value | null`: The item whose content is shown; `null` is "none".
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.
2056
+ - `delay?: number`: How long the pointer rests on a trigger before its content shows, in milliseconds.
2057
+ - `closeDelay?: number`: How long after the pointer leaves the content goes, in milliseconds.
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>`.
2078
+
2079
+ Attributes and CSS variables, by part:
2080
+
2081
+ - root: The navigation.
2082
+ - `data-orientation="horizontal | vertical"`: Whether the list is a row or a column.
2083
+ - list: The row of items.
2084
+ - `data-orientation="horizontal | vertical"`: Whether the list is a row or a column.
2085
+ - trigger: The button that shows an item's content.
2086
+ - `data-popup-open`: Present while the item's content is shown.
2087
+ - icon: A mark on a trigger that shows whether its content is open.
2088
+ - `data-popup-open`: Present while the item's content is shown.
2089
+ - content: What an item shows. It is drawn in the viewport every item shares.
2090
+ - `data-open`: Present when it is open.
2091
+ - `data-closed`: Present when it is closed.
2092
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2093
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2094
+ - `data-activation-direction="left | right"`: Which way it came from: the item before it, or after.
2095
+ - link: A link, in the list or in an item's content.
2096
+ - `data-active`: Present on the link of the page the reader is on.
2097
+ - positioner: Places the popup against the open item's trigger. It carries the geometry.
2098
+ - `data-open`: Present when it is open.
2099
+ - `data-closed`: Present when it is closed.
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.
2101
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2102
+ - `--anchor-width`: The anchor's width.
2103
+ - `--anchor-height`: The anchor's height.
2104
+ - `--available-width`: The width between the anchor and the edge of the viewport.
2105
+ - `--available-height`: The height between the anchor and the edge of the viewport.
2106
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2107
+ - `--positioner-width`: The open content's width.
2108
+ - `--positioner-height`: The open content's height.
2109
+ - popup: The panel every item's content is shown in.
2110
+ - `data-open`: Present when it is open.
2111
+ - `data-closed`: Present when it is closed.
2112
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2113
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
2115
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2116
+ - `--popup-width`: The open content's width.
2117
+ - `--popup-height`: The open content's height.
2118
+ - arrow: An element that points at the open item's trigger.
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.
2120
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2121
+ - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
2122
+ - backdrop: An element behind the popup, for a design that dims the page.
2123
+ - `data-open`: Present when it is open.
2124
+ - `data-closed`: Present when it is closed.
2125
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2126
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2127
+
2128
+ ### NumberField
2129
+
2130
+ ```
2131
+ import { NumberField } from "@kirana-ui/solid/number-field"
2132
+ ```
2133
+
2134
+ Parts: `<NumberField.Root>`, `<NumberField.Group>`, `<NumberField.Input>`, `<NumberField.Increment>`, `<NumberField.Decrement>`.
2135
+
2136
+ Anatomy:
2137
+
2138
+ ```
2139
+ <NumberField.Root>
2140
+ <NumberField.Group>
2141
+ <NumberField.Input>
2142
+ <NumberField.Increment>
2143
+ <NumberField.Decrement>
2144
+ ```
2145
+
2146
+ Props of its root:
2147
+
2148
+ - `value?: number | null`: The number; `null` is "none".
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.
2154
+ - `step?: number`: What the buttons and the arrows move by. Default 1.
2155
+ - `smallStep?: number`: With Alt held. Default 0.1.
2156
+ - `largeStep?: number`: With Shift held. Default 10.
2157
+ - `snapOnStep?: boolean`: A step lands on a multiple of the step, counted from `min`.
2158
+ - `allowWheelScrub?: boolean`: The wheel steps it while the pointer is over the input and focus is in it.
2159
+ - `format?: Intl.NumberFormatOptions`: How the number is written.
2160
+ - `locale?: string`: The language it is written in; the page's by default.
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.
2164
+ - `name?: string`: With a name, the number is submitted with the form around it.
2165
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
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
+
2175
+ Attributes and CSS variables, by part:
2176
+
2177
+ - root: Groups the number field's parts.
2178
+ - `data-disabled`: Present when it is disabled.
2179
+ - `data-readonly`: Present when the number cannot be changed.
2180
+ - `data-required`: Present when a number must be given.
2181
+ - `data-touched`: Present once focus has left the input.
2182
+ - `data-dirty`: Present while the number is not the one it started with.
2183
+ - `data-filled`: Present while there is a number.
2184
+ - `data-focused`: Present while the input has focus.
2185
+ - `data-valid`: In a field: present once the number was checked and found right.
2186
+ - `data-invalid`: In a field: present while the number is wrong.
2187
+ - group: What holds the input and its buttons, as one control.
2188
+ - `data-disabled`: Present when it is disabled.
2189
+ - `data-readonly`: Present when the number cannot be changed.
2190
+ - `data-required`: Present when a number must be given.
2191
+ - `data-touched`: Present once focus has left the input.
2192
+ - `data-dirty`: Present while the number is not the one it started with.
2193
+ - `data-filled`: Present while there is a number.
2194
+ - `data-focused`: Present while the input has focus.
2195
+ - `data-valid`: In a field: present once the number was checked and found right.
2196
+ - `data-invalid`: In a field: present while the number is wrong.
2197
+ - input: The text input: it takes what its locale writes a number with.
2198
+ - `data-disabled`: Present when it is disabled.
2199
+ - `data-readonly`: Present when the number cannot be changed.
2200
+ - `data-required`: Present when a number must be given.
2201
+ - `data-touched`: Present once focus has left the input.
2202
+ - `data-dirty`: Present while the number is not the one it started with.
2203
+ - `data-filled`: Present while there is a number.
2204
+ - `data-focused`: Present while the input has focus.
2205
+ - `data-valid`: In a field: present once the number was checked and found right.
2206
+ - `data-invalid`: In a field: present while the number is wrong.
2207
+ - increment: A button that steps the number up. Held, it goes on.
2208
+ - `data-disabled`: Present when it is disabled.
2209
+ - `data-readonly`: Present when the number cannot be changed.
2210
+ - `data-required`: Present when a number must be given.
2211
+ - `data-touched`: Present once focus has left the input.
2212
+ - `data-dirty`: Present while the number is not the one it started with.
2213
+ - `data-filled`: Present while there is a number.
2214
+ - `data-focused`: Present while the input has focus.
2215
+ - `data-valid`: In a field: present once the number was checked and found right.
2216
+ - `data-invalid`: In a field: present while the number is wrong.
2217
+ - decrement: A button that steps the number down. Held, it goes on.
2218
+ - `data-disabled`: Present when it is disabled.
2219
+ - `data-readonly`: Present when the number cannot be changed.
2220
+ - `data-required`: Present when a number must be given.
2221
+ - `data-touched`: Present once focus has left the input.
2222
+ - `data-dirty`: Present while the number is not the one it started with.
2223
+ - `data-filled`: Present while there is a number.
2224
+ - `data-focused`: Present while the input has focus.
2225
+ - `data-valid`: In a field: present once the number was checked and found right.
2226
+ - `data-invalid`: In a field: present while the number is wrong.
2227
+
2228
+ ### Otp
2229
+
2230
+ ```
2231
+ import { Otp } from "@kirana-ui/solid/otp"
2232
+ ```
2233
+
2234
+ Parts: `<Otp.Root>`, `<Otp.Input>`, `<Otp.Group>`, `<Otp.Slot>`, `<Otp.Separator>`, `<Otp.Caret>`.
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
+
2247
+ Props of its root:
2248
+
2249
+ - `length?: number`: How many characters the code has. Default: 6.
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.
2254
+ - `mode?: "numeric" | "alphanumeric" | "text"`: What a character may be. Default: `numeric`.
2255
+ - `disabled?: boolean`: Disabled: it cannot be changed.
2256
+ - `name?: string`: With a name, the code is submitted with the form around it.
2257
+ - `form?: string`: The id of the form the input belongs to, when it is not inside it.
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
+
2269
+ Attributes and CSS variables, by part:
2270
+
2271
+ - root: The code: the input and its cells.
2272
+ - `data-disabled`: Present when it is disabled.
2273
+ - `data-focused`: Present while the input has focus.
2274
+ - `data-complete`: Present when every character is in.
2275
+ - input: The one input the code is typed in. A design lays it over the cells, unseen.
2276
+ - `data-disabled`: Present when it is disabled.
2277
+ - slot: One cell of the code.
2278
+ - `data-index`: The cell's place, from 0.
2279
+ - `data-active`: Present on the cell the next character goes in, or that is selected.
2280
+ - `data-filled`: Present when the cell has its character.
2281
+ - `data-disabled`: Present when it is disabled.
2282
+
2283
+ ### Pagination
2284
+
2285
+ ```
2286
+ import { Pagination } from "@kirana-ui/solid/pagination"
2287
+ ```
2288
+
2289
+ Parts: `<Pagination.Root>`, `<Pagination.Items>`, `<Pagination.Item>`, `<Pagination.Ellipsis>`, `<Pagination.Previous>`, `<Pagination.Next>`.
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
+
2302
+ Props of its root:
2303
+
2304
+ - `page?: number`: The page shown, from 1.
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.
2308
+ - `pageSize?: number`: How many items a page holds. Default 10.
2309
+ - `siblingCount?: number`: How many pages are listed each side of the one shown. Default 1.
2310
+ - `boundaryCount?: number`: How many pages are always listed at each end. Default 1.
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>`.
2323
+
2324
+ Attributes and CSS variables, by part:
2325
+
2326
+ - root: The pages of a list, as a navigation.
2327
+ - `data-disabled`: Present when it is disabled.
2328
+ - item: A page: pressed, it is the one shown.
2329
+ - `data-selected`: Present on the page that is shown.
2330
+ - `data-disabled`: Present when it is disabled.
2331
+ - previous: Goes to the page before.
2332
+ - `data-disabled`: Present when it is disabled.
2333
+ - next: Goes to the page after.
2334
+ - `data-disabled`: Present when it is disabled.
2335
+
2336
+ ### Popover
2337
+
2338
+ ```
2339
+ import { Popover } from "@kirana-ui/solid/popover"
2340
+ ```
2341
+
2342
+ Parts: `<Popover.Root>`, `<Popover.Trigger>`, `<Popover.Portal>`, `<Popover.Positioner>`, `<Popover.Popup>`, `<Popover.Title>`, `<Popover.Description>`, `<Popover.Close>`.
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
+
2357
+ Props of its root:
2358
+
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.
2373
+
2374
+ Attributes and CSS variables, by part:
2375
+
2376
+ - trigger: The button that opens the popover, and what it is placed against.
2377
+ - `data-popup-open`: Present when the popover is open.
2378
+ - positioner: Places the popup against the trigger. It carries the geometry.
2379
+ - `data-open`: Present when it is open.
2380
+ - `data-closed`: Present when it is closed.
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.
2382
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2383
+ - `--anchor-width`: The anchor's width.
2384
+ - `--anchor-height`: The anchor's height.
2385
+ - `--available-width`: The width between the anchor and the edge of the viewport.
2386
+ - `--available-height`: The height between the anchor and the edge of the viewport.
2387
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2388
+ - popup: The popover itself.
2389
+ - `data-open`: Present when it is open.
2390
+ - `data-closed`: Present when it is closed.
2391
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2392
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
2394
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2395
+
2396
+ ### Progress
2397
+
2398
+ ```
2399
+ import { Progress } from "@kirana-ui/solid/progress"
2400
+ ```
2401
+
2402
+ Parts: `<Progress.Root>`, `<Progress.Track>`, `<Progress.Indicator>`, `<Progress.Value>`, `<Progress.Label>`.
2403
+
2404
+ Anatomy:
2405
+
2406
+ ```
2407
+ <Progress.Root>
2408
+ <Progress.Track>
2409
+ <Progress.Indicator>
2410
+ <Progress.Value>
2411
+ <Progress.Label>
2412
+ ```
2413
+
2414
+ Props of its root:
2415
+
2416
+ - `value: number | null`: Required. The value. For a progress bar, `null` is "under way, how far is not known".
2417
+ - `min?: number`: Default 0.
2418
+ - `max?: number`: Default 100.
2419
+ - `format?: Intl.NumberFormatOptions`: How the value is written; a percentage of the range by default.
2420
+ - `locale?: string`: The language the value is written in; the page's by default.
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>`.
2431
+
2432
+ Attributes and CSS variables, by part:
2433
+
2434
+ - root: The progress bar: it says the value to assistive technology.
2435
+ - `data-progressing`: Present while the task is under way.
2436
+ - `data-complete`: Present once the value has reached the end of the range.
2437
+ - `data-indeterminate`: Present while how far the task has come is not known.
2438
+ - track: The whole range.
2439
+ - `data-progressing`: Present while the task is under way.
2440
+ - `data-complete`: Present once the value has reached the end of the range.
2441
+ - `data-indeterminate`: Present while how far the task has come is not known.
2442
+ - indicator: The filled part: its width is the value's share of the range.
2443
+ - `data-progressing`: Present while the task is under way.
2444
+ - `data-complete`: Present once the value has reached the end of the range.
2445
+ - `data-indeterminate`: Present while how far the task has come is not known.
2446
+ - value: The value, written.
2447
+ - `data-progressing`: Present while the task is under way.
2448
+ - `data-complete`: Present once the value has reached the end of the range.
2449
+ - `data-indeterminate`: Present while how far the task has come is not known.
2450
+ - label: The bar's name.
2451
+ - `data-progressing`: Present while the task is under way.
2452
+ - `data-complete`: Present once the value has reached the end of the range.
2453
+ - `data-indeterminate`: Present while how far the task has come is not known.
2454
+
2455
+ ### QrCode
2456
+
2457
+ ```
2458
+ import { QrCode } from "@kirana-ui/solid/qr-code"
2459
+ ```
2460
+
2461
+ Parts: `<QrCode.Root>`, `<QrCode.Frame>`, `<QrCode.Pattern>`.
2462
+
2463
+ Anatomy:
2464
+
2465
+ ```
2466
+ <QrCode.Root>
2467
+ <QrCode.Frame>
2468
+ <QrCode.Pattern>
2469
+ ```
2470
+
2471
+ Props of its root:
2472
+
2473
+ - `value: string`: Required. What the code says: a link, a text. Written as UTF-8.
2474
+ - `correction?: QrCorrection`: How much of it may be lost and still be read. Default: `"M"`.
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
+
2482
+ Attributes and CSS variables, by part:
2483
+
2484
+ - root: What holds the code.
2485
+ - `data-invalid`: Present when the value is longer than a code holds.
2486
+
2487
+ ### RadioGroup
2488
+
2489
+ ```
2490
+ import { RadioGroup } from "@kirana-ui/solid/radio-group"
2491
+ ```
2492
+
2493
+ Parts: `<RadioGroup.Root>`, `<RadioGroup.Item>`, `<RadioGroup.Indicator>`.
2494
+
2495
+ Anatomy:
2496
+
2497
+ ```
2498
+ <RadioGroup.Root>
2499
+ <RadioGroup.Item> (repeated)
2500
+ <RadioGroup.Indicator>
2501
+ ```
2502
+
2503
+ Props of its root:
2504
+
2505
+ - `value?: Value | null`: The chosen value; `null` is "none".
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.
2511
+ - `name?: string`: With a name, the chosen value is submitted with the form around the group.
2512
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
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
+
2523
+ Attributes and CSS variables, by part:
2524
+
2525
+ - root: Groups the items: one of them is chosen at most.
2526
+ - `data-disabled`: Present when it is disabled.
2527
+ - `data-readonly`: Present when it can be read but not changed.
2528
+ - `data-required`: Present when the form needs it.
2529
+ - item: One choice. It holds a hidden native radio, which a form and a label reach.
2530
+ - `data-checked`: Present when it is checked.
2531
+ - `data-unchecked`: Present when it is not checked.
2532
+ - `data-disabled`: Present when it is disabled.
2533
+ - `data-readonly`: Present when it can be read but not changed.
2534
+ - `data-required`: Present when the form needs it.
2535
+ - indicator: The mark. In the page while its item is the chosen one.
2536
+ - `data-checked`: Present when it is checked.
2537
+ - `data-unchecked`: Present when it is not checked.
2538
+ - `data-disabled`: Present when it is disabled.
2539
+ - `data-readonly`: Present when it can be read but not changed.
2540
+ - `data-required`: Present when the form needs it.
2541
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2542
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2543
+
2544
+ ### Resizable
2545
+
2546
+ ```
2547
+ import { Resizable } from "@kirana-ui/solid/resizable"
2548
+ ```
2549
+
2550
+ Parts: `<Resizable.Group>`, `<Resizable.Panel>`, `<Resizable.Handle>`.
2551
+
2552
+ Anatomy:
2553
+
2554
+ ```
2555
+ <Resizable.Group>
2556
+ <Resizable.Panel> (repeated)
2557
+ <Resizable.Handle> (repeated)
2558
+ ```
2559
+
2560
+ Props of its root:
2561
+
2562
+ - `orientation?: Orientation`: Whether the panels are side by side (the default) or one over the other.
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.
2564
+ - `keyboardStep?: number`: How far an arrow key moves a handle, in hundredths of the group. Default: 10.
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.
2576
+
2577
+ Attributes and CSS variables, by part:
2578
+
2579
+ - group: The panels and the bars between them. A design lays it out as a flex box.
2580
+ - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2581
+ - `data-disabled`: Present when it is disabled.
2582
+ - panel: One panel. It carries its share of the group.
2583
+ - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2584
+ - `--panel-size`: The panel's share, in hundredths of the group.
2585
+ - handle: The bar between two panels: dragged, or moved with the arrows.
2586
+ - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2587
+ - `data-dragging`: Present while the bar is dragged.
2588
+ - `data-disabled`: Present when it is disabled.
2589
+
2590
+ ### ScrollArea
2591
+
2592
+ ```
2593
+ import { ScrollArea } from "@kirana-ui/solid/scroll-area"
2594
+ ```
2595
+
2596
+ Parts: `<ScrollArea.Root>`, `<ScrollArea.Viewport>`, `<ScrollArea.Content>`, `<ScrollArea.Scrollbar>`, `<ScrollArea.Thumb>`, `<ScrollArea.Corner>`.
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
+
2620
+ Attributes and CSS variables, by part:
2621
+
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.
2623
+ - `data-has-overflow-x`: Present when there is more to see sideways.
2624
+ - `data-has-overflow-y`: Present when there is more to see up or down.
2625
+ - `data-scrolling`: Present while it is being scrolled, and a moment after.
2626
+ - `data-hovering`: Present while the pointer is over the area.
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.
2629
+ - viewport: The element that scrolls.
2630
+ - `data-has-overflow-x`: Present when there is more to see sideways.
2631
+ - `data-has-overflow-y`: Present when there is more to see up or down.
2632
+ - `data-scrolling`: Present while it is being scrolled, and a moment after.
2633
+ - scrollbar: A scrollbar's track, placed along its edge of the area. In the page while there is something to scroll its way.
2634
+ - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
2635
+ - `data-hovering`: Present while the pointer is over the area.
2636
+ - `data-scrolling`: Present while the area is scrolled its way.
2637
+ - `--scroll-area-thumb-height`: A vertical thumb's height.
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.
2641
+
2642
+ ### Select
2643
+
2644
+ ```
2645
+ import { Select } from "@kirana-ui/solid/select"
2646
+ ```
2647
+
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>`.
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
+
2670
+ Props of its root:
2671
+
2672
+ - `value?: Value | null`: The chosen value; `null` is "none".
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.
2679
+ - `required?: boolean`: In a field, "none" is then wrong.
2680
+ - `name?: string`: With a name, the value is submitted with the form around it.
2681
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
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.
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`.
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
+
2715
+ Attributes and CSS variables, by part:
2716
+
2717
+ - trigger: The button that shows the value and opens the list.
2718
+ - `data-popup-open`: Present when the list is open.
2719
+ - `data-placeholder`: Present while nothing is chosen.
2720
+ - `data-disabled`: Present when it is disabled.
2721
+ - value: The chosen value's label, or the placeholder. With several values, their labels with commas between.
2722
+ - `data-placeholder`: Present while nothing is chosen.
2723
+ - positioner: Places the list against the trigger. It carries the geometry.
2724
+ - `data-open`: Present when it is open.
2725
+ - `data-closed`: Present when it is closed.
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.
2727
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2728
+ - `--anchor-width`: The anchor's width.
2729
+ - `--anchor-height`: The anchor's height.
2730
+ - `--available-width`: The width between the anchor and the edge of the viewport.
2731
+ - `--available-height`: The height between the anchor and the edge of the viewport.
2732
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2733
+ - scrollUpArrow: In the page while there is more of the list above: it scrolls the list while the pointer moves over it.
2734
+ - `data-direction="up | down"`: The way it scrolls the list.
2735
+ - `data-visible`: Present while there is more of the list its way.
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.
2737
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2738
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2739
+ - scrollDownArrow: In the page while there is more of the list below: it scrolls the list while the pointer moves over it.
2740
+ - `data-direction="up | down"`: The way it scrolls the list.
2741
+ - `data-visible`: Present while there is more of the list its way.
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.
2743
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2744
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2745
+ - popup: The list of items.
2746
+ - `data-open`: Present when it is open.
2747
+ - `data-closed`: Present when it is closed.
2748
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2749
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
2751
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2752
+ - item: One choice in the list.
2753
+ - `data-selected`: Present on the chosen item, or on each of several.
2754
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
2755
+ - `data-disabled`: Present when it is disabled.
2756
+
2757
+ ### Separator
2758
+
2759
+ ```
2760
+ import { Separator } from "@kirana-ui/solid/separator"
2761
+ ```
2762
+
2763
+ Props:
2764
+
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>`.
2768
+
2769
+ Attributes and CSS variables, by part:
2770
+
2771
+ - root: The line.
2772
+ - `data-orientation="horizontal | vertical"`: The way the line runs.
2773
+
2774
+ ### Slider
2775
+
2776
+ ```
2777
+ import { Slider } from "@kirana-ui/solid/slider"
2778
+ ```
2779
+
2780
+ Parts: `<Slider.Root>`, `<Slider.Value>`, `<Slider.Control>`, `<Slider.Track>`, `<Slider.Indicator>`, `<Slider.Thumb>`.
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
+
2793
+ Props of its root:
2794
+
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.
2799
+ - `min?: number`: Default 0.
2800
+ - `max?: number`: Default 100.
2801
+ - `step?: number`: Default 1.
2802
+ - `largeStep?: number`: What Page Up, Page Down and an arrow with Shift move by. Default 10.
2803
+ - `minStepsBetweenValues?: number`: How many steps two thumbs of a range stay apart. Default 0.
2804
+ - `orientation?: Orientation`: Whether the track lies across (the default) or stands upright: the arrows that move a thumb follow.
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.
2806
+ - `disabled?: boolean`: Disabled: it cannot be changed.
2807
+ - `name?: string`: With a name, each thumb's value is submitted with the form around the slider.
2808
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
2809
+ - `format?: Intl.NumberFormatOptions`: How a value is written.
2810
+ - `locale?: string`: The language a value is written in; the page's by default.
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.
2823
+
2824
+ Attributes and CSS variables, by part:
2825
+
2826
+ - root: Groups the slider's parts.
2827
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2828
+ - `data-disabled`: Present when it is disabled.
2829
+ - `data-dragging`: Present while a pointer holds a thumb.
2830
+ - value: The value, written.
2831
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2832
+ - `data-disabled`: Present when it is disabled.
2833
+ - `data-dragging`: Present while a pointer holds a thumb.
2834
+ - control: What a pointer presses and drags on. It holds the track and the thumbs.
2835
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2836
+ - `data-disabled`: Present when it is disabled.
2837
+ - `data-dragging`: Present while a pointer holds a thumb.
2838
+ - track: The whole range.
2839
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2840
+ - `data-disabled`: Present when it is disabled.
2841
+ - `data-dragging`: Present while a pointer holds a thumb.
2842
+ - indicator: The filled part: up to the thumb, or from the first thumb to the last. Its place and length are written on it.
2843
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2844
+ - `data-disabled`: Present when it is disabled.
2845
+ - `data-dragging`: Present while a pointer holds a thumb.
2846
+ - `--start-position`: With thumbs that stay inside the control: where the filled part starts, or with one thumb where it ends.
2847
+ - `--relative-size`: With thumbs that stay inside the control and a range: the filled part's length.
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.
2849
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2850
+ - `data-disabled`: Present when it is disabled.
2851
+ - `data-dragging`: Present while a pointer holds a thumb.
2852
+ - `data-index`: Which thumb it is, from 0.
2853
+ - `--position`: With thumbs that stay inside the control: where the thumb's centre is.
2854
+
2855
+ ### Switch
2856
+
2857
+ ```
2858
+ import { Switch } from "@kirana-ui/solid/switch"
2859
+ ```
2860
+
2861
+ Parts: `<Switch.Root>`, `<Switch.Thumb>`.
2862
+
2863
+ Anatomy:
2864
+
2865
+ ```
2866
+ <Switch.Root>
2867
+ <Switch.Thumb>
2868
+ ```
2869
+
2870
+ Props of its root:
2871
+
2872
+ - `checked?: boolean`: Whether it is checked, when the caller holds it.
2873
+ - `defaultChecked?: boolean`: Read once.
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.
2876
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
2877
+ - `required?: boolean`: Needed: in a `Field`, leaving it unchecked is then invalid.
2878
+ - `name?: string`: With a name, the control is submitted with the form around it when it is checked.
2879
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
2880
+ - `value?: string`: What is submitted. Default `"on"`, as a native checkbox's.
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
+
2887
+ Attributes and CSS variables, by part:
2888
+
2889
+ - root: The track. It holds a hidden native checkbox, which a form and a label reach.
2890
+ - `data-checked`: Present when it is checked.
2891
+ - `data-unchecked`: Present when it is not checked.
2892
+ - `data-disabled`: Present when it is disabled.
2893
+ - `data-readonly`: Present when it can be read but not changed.
2894
+ - `data-required`: Present when the form needs it.
2895
+ - thumb: The knob that moves along the track.
2896
+ - `data-checked`: Present when it is checked.
2897
+ - `data-unchecked`: Present when it is not checked.
2898
+ - `data-disabled`: Present when it is disabled.
2899
+ - `data-readonly`: Present when it can be read but not changed.
2900
+ - `data-required`: Present when the form needs it.
2901
+
2902
+ ### Tabs
2903
+
2904
+ ```
2905
+ import { Tabs } from "@kirana-ui/solid/tabs"
2906
+ ```
2907
+
2908
+ Parts: `<Tabs.Root>`, `<Tabs.List>`, `<Tabs.Tab>`, `<Tabs.Indicator>`, `<Tabs.Panel>`.
2909
+
2910
+ Anatomy:
2911
+
2912
+ ```
2913
+ <Tabs.Root>
2914
+ <Tabs.List>
2915
+ <Tabs.Tab> (repeated)
2916
+ <Tabs.Indicator>
2917
+ <Tabs.Panel> (repeated)
2918
+ ```
2919
+
2920
+ Props of its root:
2921
+
2922
+ - `value?: Value | null`: The active tab's value; `null` is "none".
2923
+ - `defaultValue?: Value | null`: Read once. Without one, the first tab that can be chosen is, once the page is there.
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.
2940
+
2941
+ Attributes and CSS variables, by part:
2942
+
2943
+ - root: Groups the tabs and their panels.
2944
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2945
+ - `data-activation-direction="left | right | up | down | none"`: Where the newly active tab is from the one before, for a panel or a mark that slides.
2946
+ - list: The row of tabs. The arrows move between them.
2947
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2948
+ - `data-activation-direction="left | right | up | down | none"`: Where the newly active tab is from the one before, for a panel or a mark that slides.
2949
+ - tab: A button that shows its panel.
2950
+ - `data-active`: Present on the tab whose panel is shown.
2951
+ - `data-disabled`: Present when it is disabled.
2952
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2953
+ - indicator: A mark for the active tab: it carries that tab's position and size.
2954
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2955
+ - `data-activation-direction="left | right | up | down | none"`: Where the newly active tab is from the one before, for a panel or a mark that slides.
2956
+ - `--active-tab-left`: The active tab's distance from the list's left edge.
2957
+ - `--active-tab-right`: The active tab's distance from the list's right edge.
2958
+ - `--active-tab-top`: The active tab's distance from the list's top edge.
2959
+ - `--active-tab-bottom`: The active tab's distance from the list's bottom edge.
2960
+ - `--active-tab-width`: The active tab's width.
2961
+ - `--active-tab-height`: The active tab's height.
2962
+ - panel: A tab's content. In the page while its tab is active, and through its exit.
2963
+ - `data-hidden`: Present while its tab is not the active one.
2964
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2965
+ - `data-activation-direction="left | right | up | down | none"`: Where the newly active tab is from the one before, for a panel or a mark that slides.
2966
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2967
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2968
+
2969
+ ### Toast
2970
+
2971
+ ```
2972
+ import { Toast } from "@kirana-ui/solid/toast"
2973
+ ```
2974
+
2975
+ Parts: `<Toast.Viewport>`, `<Toast.List>`, `<Toast.Root>`, `<Toast.Content>`, `<Toast.Title>`, `<Toast.Description>`, `<Toast.Close>`, `<Toast.Action>`.
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
+
2990
+ Props of its root:
2991
+
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".
3011
+
3012
+ Attributes and CSS variables, by part:
3013
+
3014
+ - viewport: Where the toasts are drawn: a region that is always in the page.
3015
+ - `data-expanded`: Present while the pointer or focus is on the stack: the toasts are spread out, and wait.
3016
+ - `--toast-frontmost-height`: The height of the newest toast.
3017
+ - root: One toast.
3018
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
3019
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
3020
+ - `data-expanded`: Present while the pointer or focus is on the stack: the toasts are spread out, and wait.
3021
+ - `data-type`: The kind the toast was added as.
3022
+ - `data-limited`: Present on a toast behind as many as are shown at once.
3023
+ - `data-swiping`: Present while the toast is dragged.
3024
+ - `data-swipe-direction="left | right | up | down"`: The way the toast was dragged out, once it has been.
3025
+ - `--toast-index`: Its place in the stack: 0 for the newest.
3026
+ - `--toast-height`: Its height.
3027
+ - `--toast-offset-y`: The height of the toasts in front of it.
3028
+ - `--toast-swipe-movement-x`: How far it has been dragged across.
3029
+ - `--toast-swipe-movement-y`: How far it has been dragged up or down.
3030
+ - content: What holds a toast's contents, when the design sizes the toast itself.
3031
+ - `data-behind`: Present on a toast that is behind the newest.
3032
+ - `data-expanded`: Present while the pointer or focus is on the stack: the toasts are spread out, and wait.
3033
+
3034
+ ### Toggle
3035
+
3036
+ ```
3037
+ import { Toggle } from "@kirana-ui/solid/toggle"
3038
+ ```
3039
+
3040
+ Props:
3041
+
3042
+ - `pressed?: boolean`: Whether it is pressed, when the caller holds it.
3043
+ - `defaultPressed?: boolean`: Read once.
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.
3046
+ - `value?: unknown`: In a toggle group: what the group's value holds while this one is pressed.
3047
+
3048
+ `<Toggle>` draws a `<button>`.
3049
+
3050
+ Attributes and CSS variables, by part:
3051
+
3052
+ - root: The button. It stays pressed until it is pressed again.
3053
+ - `data-pressed`: Present while it is pressed.
3054
+ - `data-disabled`: Present when it is disabled.
3055
+
3056
+ ### ToggleGroup
3057
+
3058
+ ```
3059
+ import { ToggleGroup } from "@kirana-ui/solid/toggle-group"
3060
+ ```
3061
+
3062
+ Props:
3063
+
3064
+ - `value?: readonly Value[]`: The values of the pressed toggles: none, one, or with `multiple` several.
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.
3067
+ - `multiple?: boolean`: Whether more than one can be pressed at a time.
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.
3070
+ - `loop?: boolean`: Whether the arrows go round from the last toggle to the first. Default: they do.
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
+
3074
+ Attributes and CSS variables, by part:
3075
+
3076
+ - root: The group. A toggle inside it with a `value` is one of its toggles.
3077
+ - `data-orientation="horizontal | vertical"`: Whether its toggles are in a row or a column.
3078
+ - `data-multiple`: Present when several can be pressed at a time.
3079
+ - `data-disabled`: Present when it is disabled.
3080
+
3081
+ ### Toolbar
3082
+
3083
+ ```
3084
+ import { Toolbar } from "@kirana-ui/solid/toolbar"
3085
+ ```
3086
+
3087
+ Parts: `<Toolbar.Root>`, `<Toolbar.Button>`, `<Toolbar.Link>`, `<Toolbar.Input>`, `<Toolbar.Group>`, `<Toolbar.Separator>`.
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
+
3100
+ Props of its root:
3101
+
3102
+ - `orientation?: Orientation`: Whether the controls are laid out across (the default) or down: the arrows that move between them follow.
3103
+ - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
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>`.
3117
+
3118
+ Attributes and CSS variables, by part:
3119
+
3120
+ - root: The toolbar. It is one stop for Tab.
3121
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3122
+ - `data-disabled`: Present when it is disabled.
3123
+ - button: A button of the toolbar.
3124
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3125
+ - `data-disabled`: Present when it is disabled.
3126
+ - link: A link of the toolbar.
3127
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3128
+ - `data-disabled`: Present when it is disabled.
3129
+ - input: A text input of the toolbar. The arrows are its own until the caret is at an end.
3130
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3131
+ - `data-disabled`: Present when it is disabled.
3132
+ - group: Items that belong together.
3133
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3134
+ - `data-disabled`: Present when it is disabled.
3135
+ - separator: A line between items, across the toolbar.
3136
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3137
+
3138
+ ### Tooltip
3139
+
3140
+ ```
3141
+ import { Tooltip } from "@kirana-ui/solid/tooltip"
3142
+ ```
3143
+
3144
+ Parts: `<Tooltip.Root>`, `<Tooltip.Trigger>`, `<Tooltip.Portal>`, `<Tooltip.Positioner>`, `<Tooltip.Popup>`, `<Tooltip.Arrow>`.
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
+
3157
+ Props of its root:
3158
+
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.
3162
+ - `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds.
3163
+ - `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds.
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>`.
3176
+
3177
+ Attributes and CSS variables, by part:
3178
+
3179
+ - trigger: The element the tooltip describes.
3180
+ - `data-popup-open`: Present when the tooltip is open.
3181
+ - positioner: Places the popup against the trigger. It carries the geometry.
3182
+ - `data-open`: Present when it is open.
3183
+ - `data-closed`: Present when it is closed.
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.
3185
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
3186
+ - `--anchor-width`: The anchor's width.
3187
+ - `--anchor-height`: The anchor's height.
3188
+ - `--available-width`: The width between the anchor and the edge of the viewport.
3189
+ - `--available-height`: The height between the anchor and the edge of the viewport.
3190
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
3191
+ - popup: The tooltip itself.
3192
+ - `data-open`: Present when it is open.
3193
+ - `data-closed`: Present when it is closed.
3194
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
3195
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
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.
3197
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
3198
+ - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
3199
+ - arrow: An element that points at the trigger, placed along the popup's edge.
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.
3201
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
3202
+ - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.