@kirana-ui/solid 0.2.0 → 0.3.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 (71) hide show
  1. package/dom/avatar.js +36 -11
  2. package/dom/calendar.js +66 -11
  3. package/dom/checkbox-group-context.js +3 -0
  4. package/dom/checkbox-group.js +38 -0
  5. package/dom/checkbox.js +6 -2
  6. package/dom/combobox.js +53 -3
  7. package/dom/command.js +2 -1
  8. package/dom/date-picker.js +7 -1
  9. package/dom/dialog.js +8 -1
  10. package/dom/index.js +1 -0
  11. package/dom/number-field.js +36 -3
  12. package/dom/otp.js +2 -1
  13. package/dom/popover.js +18 -2
  14. package/dom/primitive.js +92 -0
  15. package/dom/radio-group.js +3 -2
  16. package/dom/select.js +1 -0
  17. package/dom/slider.js +1 -1
  18. package/llms.txt +312 -82
  19. package/package.json +18 -2
  20. package/server/avatar.js +36 -11
  21. package/server/calendar.js +66 -11
  22. package/server/checkbox-group-context.js +3 -0
  23. package/server/checkbox-group.js +38 -0
  24. package/server/checkbox.js +6 -2
  25. package/server/combobox.js +53 -3
  26. package/server/command.js +2 -1
  27. package/server/date-picker.js +7 -1
  28. package/server/dialog.js +8 -1
  29. package/server/index.js +1 -0
  30. package/server/number-field.js +36 -3
  31. package/server/otp.js +2 -1
  32. package/server/popover.js +18 -2
  33. package/server/primitive.js +92 -0
  34. package/server/radio-group.js +3 -2
  35. package/server/select.js +1 -0
  36. package/server/slider.js +1 -1
  37. package/skills/kirana-ui-primitives/SKILL.md +29 -8
  38. package/src/avatar.jsx +16 -9
  39. package/src/calendar.jsx +62 -10
  40. package/src/checkbox-group-context.js +3 -0
  41. package/src/checkbox-group.jsx +33 -0
  42. package/src/checkbox.jsx +5 -1
  43. package/src/combobox.jsx +50 -1
  44. package/src/command.jsx +2 -0
  45. package/src/date-picker.jsx +6 -0
  46. package/src/dialog.jsx +5 -1
  47. package/src/index.js +1 -0
  48. package/src/number-field.jsx +23 -3
  49. package/src/otp.jsx +2 -0
  50. package/src/popover.jsx +15 -1
  51. package/src/primitive.jsx +81 -0
  52. package/src/radio-group.jsx +2 -2
  53. package/src/select.jsx +1 -0
  54. package/src/slider.jsx +1 -0
  55. package/types/alert-dialog.d.ts +1 -1
  56. package/types/autocomplete.d.ts +1 -1
  57. package/types/avatar.d.ts +5 -4
  58. package/types/calendar.d.ts +15 -3
  59. package/types/checkbox-group-context.d.ts +3 -0
  60. package/types/checkbox-group.d.ts +13 -0
  61. package/types/checkbox.d.ts +1 -0
  62. package/types/combobox.d.ts +41 -2
  63. package/types/command.d.ts +2 -0
  64. package/types/date-picker.d.ts +2 -1
  65. package/types/dialog.d.ts +5 -0
  66. package/types/index.d.ts +5 -2
  67. package/types/number-field.d.ts +9 -1
  68. package/types/otp.d.ts +1 -0
  69. package/types/popover.d.ts +17 -3
  70. package/types/primitive.d.ts +50 -0
  71. package/types/radio-group.d.ts +3 -0
package/llms.txt CHANGED
@@ -8,7 +8,7 @@ Generated from the library's own source (`bun scripts/llms.ts`), and checked aga
8
8
 
9
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
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.
11
+ Its entries: an entry per component (`@kirana-ui/solid/tabs`, 49 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/primitive`, `@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
12
 
13
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
14
 
@@ -20,9 +20,14 @@ What every `Positioner` takes, beside its own props where a component's section
20
20
 
21
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
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`.
23
+ - `sideOffset?: number | OffsetFunction`: The gap between the anchor and the popup, measured without any arrow: a number of pixels, or a function of what was measured (`({ side, align, anchor, positioner }) => number`). Default `0`.
24
+ - `alignOffset?: number | OffsetFunction`: How far the popup is moved along the side from where `align` puts it: a number of pixels, or a function of what was measured (`({ side, align, anchor, positioner }) => number`). Default `0`.
25
+ - `collisionPadding?: CollisionPadding`: Kept between the popup and the edges it is held inside: one number, or one for each side (`{ top, right, bottom, left }`, a side left out is 0). Default `5`.
26
+ - `collisionBoundary?: CollisionBoundary`: What the popup is held inside: an element, several, or a rectangle of the viewport. Left out or `"clipping-ancestors"`: the ancestors that clip it, and the viewport.
27
+ - `collisionAvoidance?: CollisionAvoidance`: What the popup does when it does not fit: `side` and `align` each `"flip"`, `"shift"` or `"none"`, and `fallbackAxisSide`. Left out: it flips to the opposite side and is moved along its side.
28
+ - `sticky?: boolean`: Keeps the popup in view once its anchor has been scrolled out of it. Otherwise the popup leaves with its anchor. Default `false`.
29
+ - `arrowPadding?: number`: Kept between an arrow and the ends of the popup's edge, so the arrow does not stand on a rounded corner. Default `5`.
30
+ - `positionMethod?: "absolute" | "fixed"`: The CSS `position` the positioner is given: `"absolute"` or `"fixed"`. Default `"absolute"`.
26
31
  - `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
32
 
28
33
  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" }`.
@@ -33,11 +38,17 @@ The named types the props below mention, each with the entry of this package it
33
38
 
34
39
  - `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
40
  - `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.
41
+ - `CalendarDay` (`@kirana-ui/solid`): A day in the grid of a month shown.
37
42
  - `date: IsoDate`
38
43
  - `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.
44
+ - `outside: boolean`: Not of the month it is drawn in: the days that fill its first and last weeks.
45
+ - `CalendarMonth` (`@kirana-ui/solid`): One of the months shown, as `Calendar.Months` gives it.
46
+ - `index: number`: Its place among the months shown, from 0.
47
+ - `month: IsoDate`: Its first day.
48
+ - `title: string`: Its name as the locale writes it (`"March 2026"`).
49
+ - `weekdays: readonly CalendarWeekday[]`
50
+ - `weeks: readonly (readonly CalendarDay[])[]`
51
+ - `CalendarValueOf<Mode extends CalendarMode | undefined>` (`@kirana-ui/solid`): `Mode extends "range" ? DateRange | null : Mode extends "multiple" ? readonly IsoDate[] : IsoDate | null`. The value of one mode: a day or `null`, a range or `null`, or a list (empty for none). What `value` and `onValueChange` are typed by, from the `mode` a root is given.
41
52
  - `CalendarWeekday` (`@kirana-ui/solid`): A day of the week, as a column's heading names it.
42
53
  - `index: number`: Its place in the week as the locale orders it, from 0.
43
54
  - `narrow: string`: Its name as a column's heading (`"M"`, `"Mo"`), and in full (`"Monday"`).
@@ -50,6 +61,34 @@ The named types the props below mention, each with the entry of this package it
50
61
  - `cancel(): void`: Keeps the value as it was.
51
62
  - `canceled: boolean`
52
63
  - `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.
64
+ - `CollisionAvoidance` (`@kirana-ui/solid`): What a popup does when it does not fit where it was asked to be.
65
+ - `side?: "flip" | "shift" | "none"`: Across from the anchor: `"flip"` goes to the opposite side, `"shift"` keeps the side and moves over the anchor to stay in view, `"none"` lets it overflow. Default `"flip"`.
66
+ - `align?: "flip" | "shift" | "none"`: Along its side: `"flip"` swaps `start` and `end`, `"shift"` moves the popup along the side to stay in view, `"none"` lets it overflow. Default `"flip"`. With `side: "shift"` it is `"shift"` or `"none"`.
67
+ - `fallbackAxisSide?: "start" | "end" | "none"`: Where it goes when neither the side asked for nor its opposite fits: to the other axis, its `"start"` or its `"end"` first, or nowhere (`"none"`). Default `"end"`.
68
+ - `CollisionBoundary` (`@kirana-ui/solid`): `"clipping-ancestors" | Element | Element[] | { x: number; y: number; width: number; height: number }`. What a popup is held inside: the ancestors that clip it (`"clipping-ancestors"`), an element, several, or a rectangle of the viewport.
69
+ - `CollisionPadding` (`@kirana-ui/solid`): `number | Partial<Record<PhysicalSide, number>>`. The room kept between a popup and the edges it is held inside: one number, or one a side.
70
+ - `ComboboxEntry<Value = unknown>` (`@kirana-ui/solid`): `ComboboxItemEntry<Value> | ComboboxGroupEntry<Value>`. What a `Collection` hands to be drawn: an item that is left, or a group that has items left.
71
+ - `ComboboxGroupData<Value = unknown>` (`@kirana-ui/solid`): Items given as data that belong together: `value` is the group's name.
72
+ - `value: string`
73
+ - `items: readonly ComboboxItemData<Value>[]`
74
+ - `ComboboxGroupEntry<Value = unknown>` (`@kirana-ui/solid`): A group that has items left, with those items.
75
+ - `type: "group"`
76
+ - `key: string`: What it is known by from one drawing to the next.
77
+ - `value: string`: The group's name, as it was given.
78
+ - `label: string`: The same name: an entry of either kind has a `label`.
79
+ - `disabled: false`: Never: an entry of either kind says whether it is disabled.
80
+ - `items: readonly ComboboxItemEntry<Value>[]`: The items of the group that are left.
81
+ - `ComboboxItemData<Value = unknown>` (`@kirana-ui/solid`): One item given as data: its value, and what it is called.
82
+ - `value: Value`
83
+ - `label: string`
84
+ - `disabled?: boolean`: It cannot be chosen: its entry says so, for the item drawn for it.
85
+ - `ComboboxItemEntry<Value = unknown>` (`@kirana-ui/solid`): One item left of the `items` given as data, as a `Collection` hands it to be drawn.
86
+ - `type: "item"`
87
+ - `key: string`: What it is known by from one drawing to the next.
88
+ - `value: Value`
89
+ - `label: string`
90
+ - `disabled: boolean`
91
+ - `item: ComboboxItemData<Value>`: The item as it was given, with whatever else it carries.
53
92
  - `DateFieldSegment` (`@kirana-ui/solid`): One piece of the field, in the locale's order: a part that is typed, or what stands between.
54
93
  - `type: DateUnit | "literal"`
55
94
  - `literal: string`: What stands between two parts (`"/"`); empty for a part that is typed.
@@ -67,6 +106,7 @@ The named types the props below mention, each with the entry of this package it
67
106
  - `value: string`: The value that was checked.
68
107
  - `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
108
  - `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.
109
+ - `ImageStatus` (`@kirana-ui/solid`): `"idle" | "loading" | "loaded" | "error"`. Where an avatar's picture is in its loading: `idle` while it has no address, `loading`, then `loaded` or `error`. Base UI's `ImageLoadingStatus`.
70
110
  - `IsoDate` (`@kirana-ui/solid`): `string`. A day as `YYYY-MM-DD`, in the calendar the world's data is kept in (ISO 8601).
71
111
  - `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
112
  - `count: number`: How many rows there are, drawn or not.
@@ -74,6 +114,12 @@ The named types the props below mention, each with the entry of this package it
74
114
  - `disabled?(index: number): boolean`
75
115
  - `indexOf?(value: unknown): number`: The place of a value, or -1: where a list opens on what is chosen.
76
116
  - `scrollToIndex(index: number): void`: Brings a row into the page: the virtualizer's own scroll.
117
+ - `OffsetData` (`@kirana-ui/solid`): What an offset given as a function is told: where the popup is, and the two sizes.
118
+ - `side: Side`: The side of the anchor the popup is on, in the words it was asked for in.
119
+ - `align: Align`: Where along that side the popup is.
120
+ - `anchor: { width: number; height: number }`: The anchor's size, in pixels.
121
+ - `positioner: { width: number; height: number }`: The positioner's size, in pixels.
122
+ - `OffsetFunction` (`@kirana-ui/solid`): `(data: OffsetData) => number`. A gap worked out from what was measured: `({ side, align, anchor, positioner }) => number`.
77
123
  - `Orientation` (`@kirana-ui/solid`): `"horizontal" | "vertical"`. The way a row of things is laid out, and so which arrow keys move along it.
78
124
  - `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
125
  - `PhysicalSide` (`@kirana-ui/solid`): `"top" | "right" | "bottom" | "left"`. A side of the anchor as the page is drawn.
@@ -132,6 +178,9 @@ What the entries export beside the components, their parts' props types and the
132
178
 
133
179
  - `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
180
  - `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.
181
+ - `CalendarMode`, from `@kirana-ui/solid`: How many days it chooses: one, a first and a last, or any number.
182
+ - `CalendarValue`, from `@kirana-ui/solid`: What a calendar holds: a day, a range of days in `mode: "range"`, a list of days in `mode: "multiple"`, or `null` for none.
183
+ - `ComboboxShown`, from `@kirana-ui/solid`: What a combobox's value part shows: what is chosen, and how it is named.
135
184
  - `ComponentDefinition`, from `@kirana-ui/solid`: A component in the vocabulary: its parts by name.
136
185
  - `Direction`, from `@kirana-ui/solid`: The reading direction: left to right, or right to left.
137
186
  - `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" }`).
@@ -152,6 +201,9 @@ What the entries export beside the components, their parts' props types and the
152
201
  - `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
202
  - `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
203
  - `PositionerOptions`, from `@kirana-ui/solid/popover`: A positioner's own props: where its popup goes, and what it is placed against.
204
+ - `TriggerOptions`, from `@kirana-ui/solid/popover`: What a trigger takes of its own: whether the pointer opens the popover too, and its waits.
205
+ - `Merged`, from `@kirana-ui/solid/primitive`: The props of several sets as one: each set's, the later's over the earlier's.
206
+ - `Primitive(props: PrimitiveProps<Tag, State>)`, from `@kirana-ui/solid/primitive`: A plain element of one's own (a badge, a breadcrumb's link) with the composition a part has: `as` for another tag (a `div` unless said), or `render` for the caller's own element, given the props to spread and the state. `state` is written as `data-*` attributes under the attributes given. Merge the component's own props with its caller's through `mergeProps`, as a part's are merged.
155
207
  - `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
208
  - `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
209
  - `ToasterOptions`, from `@kirana-ui/solid` or `@kirana-ui/solid/toast`: What a toaster is made with.
@@ -198,6 +250,7 @@ A component in a snapshot (`AgentComponent`):
198
250
  - `max?: number`
199
251
  - `items?: readonly AgentItem[]`: Its choices, where they are in the page. `query({ within })` reads a closed list's.
200
252
  - `disabled?: boolean`
253
+ - `readOnly?: boolean`: It can be read and not changed: it then has no action.
201
254
  - `confirm?: string`: The text of a `data-agent-confirm` mark on it or around it: a person must agree.
202
255
  - `actions: readonly string[]`: What it can be asked to do now.
203
256
 
@@ -292,7 +345,7 @@ Its other types:
292
345
 
293
346
  - Each component is a namespace of parts: `<Dialog.Root>`, `<Dialog.Trigger>`. A component with one part is the component: `<Button>`.
294
347
  - 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.
348
+ - 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()`. The element `render` draws needs nothing from the library: it spreads the props it is given.
296
349
  - `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
350
  - `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
351
  - Controlled: `value={value()}` with `onValueChange`. Uncontrolled: `defaultValue`.
@@ -301,12 +354,12 @@ Its other types:
301
354
  - 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
355
  - 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
356
  - 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.
357
+ - 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`, `Autocomplete.Collection`, `Calendar.Months`, `Calendar.Weekdays`, `Calendar.Weeks`, `Combobox.Root`, `Combobox.Value`, `Combobox.Collection`, `ContextMenu.Root`, `ContextMenu.SubmenuRoot`, `DateField.Segments`, `DatePicker.Root`, `DatePicker.Segments`, `DatePicker.Months`, `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.
358
+ - 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. A dialog and an alert dialog may put the `Popup` in a `Viewport`, the box a long one scrolls in.
359
+ - Every `Positioner` takes the same options (`side`, `align`, `sideOffset`, `alignOffset`, `collisionPadding`, `collisionBoundary`, `collisionAvoidance`, `sticky`, `arrowPadding`, `positionMethod`, `anchor`), listed once under "Positioner options" with their defaults. An anchor may change while the popup is open, and the popup follows.
360
+ - 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`, `onMonthChange`, `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 `onLoadingStatusChange`.
361
+ - 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`, `Avatar.Image`, `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`.
362
+ - `readOnly` (shown, focusable, not changeable) is a prop of `Autocomplete`, `Calendar`, `Checkbox`, `Combobox`, `DateField`, `DatePicker`, `NumberField`, `RadioGroup`, `Select`, `Slider` and `Switch` and of no other component.
310
363
  - 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
364
  - A boolean state is an attribute that is present or absent (`[data-open]`), never `="false"`.
312
365
  - 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.
@@ -315,6 +368,11 @@ Its other types:
315
368
  - `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
369
  - 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
370
 
371
+ ### For a design system
372
+
373
+ - For an element of your own that takes `as` and `render` as a part does (a badge, a breadcrumb's link): `import { Primitive, mergeProps } from "@kirana-ui/solid/primitive"`. `<Primitive as="span" {...mergeProps({ class: "badge" }, props)} state={{ active: active() }} />` draws that element (a `div` by default) with the attributes it is given; with `render={(props, state) => <a {...props()} />}` it draws the caller's own instead, given the props and the state as accessors, as a part's `render` is (`props().children` is what it holds). `state` is written on the element as `data-*` attributes, under the attributes given: `true` is present and empty, `false`, `null` and `undefined` are absent, anything else is its text, and `isActive` is `data-is-active`. `mergeProps(...props)` is for a component's own props and its caller's, by a part's rule: a later set wins an attribute (one it leaves `undefined` stays), classes are joined, styles merged, the handlers of an event run in order and `event.preventKiranaHandler()` stops those after it, and every `ref` gets the element. It reads its sets when a prop is read, so the props stay reactive. It is not solid-js's `mergeProps`, where a later class replaces an earlier one: import one under another name where both are used. Its props type is `PrimitiveProps<Tag, State>`.
374
+ - Tooltips need no provider: one is open at a time across the page, and while one shows the next opens without its wait, by themselves. A tooltip waits 600 ms before it opens (a hover card 600 ms, and 300 ms before it closes). A design system whose tooltips open at once passes `delay` on its own root: `<Tooltip.Root delay={0} {...props} />` in its own component (its caller's `delay` still wins).
375
+
318
376
  ## Components
319
377
 
320
378
  ### Accordion
@@ -386,7 +444,7 @@ Attributes and CSS variables, by part:
386
444
  import { AlertDialog } from "@kirana-ui/solid/alert-dialog"
387
445
  ```
388
446
 
389
- Parts: `<AlertDialog.Root>`, `<AlertDialog.Trigger>`, `<AlertDialog.Portal>`, `<AlertDialog.Backdrop>`, `<AlertDialog.Popup>`, `<AlertDialog.Title>`, `<AlertDialog.Description>`, `<AlertDialog.Close>`.
447
+ Parts: `<AlertDialog.Root>`, `<AlertDialog.Trigger>`, `<AlertDialog.Portal>`, `<AlertDialog.Backdrop>`, `<AlertDialog.Viewport>`, `<AlertDialog.Popup>`, `<AlertDialog.Title>`, `<AlertDialog.Description>`, `<AlertDialog.Close>`.
390
448
 
391
449
  Anatomy:
392
450
 
@@ -395,10 +453,11 @@ Anatomy:
395
453
  <AlertDialog.Trigger>
396
454
  <AlertDialog.Portal>
397
455
  <AlertDialog.Backdrop>
398
- <AlertDialog.Popup>
399
- <AlertDialog.Title>
400
- <AlertDialog.Description>
401
- <AlertDialog.Close>
456
+ <AlertDialog.Viewport> (optional)
457
+ <AlertDialog.Popup>
458
+ <AlertDialog.Title>
459
+ <AlertDialog.Description>
460
+ <AlertDialog.Close>
402
461
  ```
403
462
 
404
463
  Props of its root:
@@ -413,6 +472,7 @@ Each part, and its own props:
413
472
  - `<AlertDialog.Trigger>` draws a `<button>`.
414
473
  - `<AlertDialog.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
415
474
  - `<AlertDialog.Backdrop>` draws a `<div>`.
475
+ - `<AlertDialog.Viewport>` draws a `<div>`.
416
476
  - `<AlertDialog.Popup>` draws a `<div>`.
417
477
  - `<AlertDialog.Title>` draws a `<h2>`. The heading that names the dialog.
418
478
  - `<AlertDialog.Description>` draws a `<p>`. The text that describes the dialog.
@@ -427,6 +487,13 @@ Attributes and CSS variables, by part:
427
487
  - `data-closed`: Present when it is closed.
428
488
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
429
489
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
490
+ - viewport: What a long dialog scrolls in: it lies over the page, between the backdrop and the popup. A press on it beside the popup is a press outside the dialog; a press on its scrollbar is not.
491
+ - `data-open`: Present when it is open.
492
+ - `data-closed`: Present when it is closed.
493
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
494
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
495
+ - `data-nested`: Present when the dialog opened over another dialog.
496
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
430
497
  - popup: The dialog itself.
431
498
  - `data-open`: Present when it is open.
432
499
  - `data-closed`: Present when it is closed.
@@ -441,7 +508,7 @@ Attributes and CSS variables, by part:
441
508
  import { Autocomplete } from "@kirana-ui/solid/autocomplete"
442
509
  ```
443
510
 
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>`.
511
+ Parts: `<Autocomplete.Root>`, `<Autocomplete.Input>`, `<Autocomplete.Trigger>`, `<Autocomplete.Clear>`, `<Autocomplete.Portal>`, `<Autocomplete.Positioner>`, `<Autocomplete.Popup>`, `<Autocomplete.List>`, `<Autocomplete.Collection>`, `<Autocomplete.Group>`, `<Autocomplete.GroupLabel>`, `<Autocomplete.Separator>`, `<Autocomplete.Item>`, `<Autocomplete.Empty>`, `<Autocomplete.Status>`.
445
512
 
446
513
  Anatomy:
447
514
 
@@ -453,12 +520,19 @@ Anatomy:
453
520
  <Autocomplete.Positioner>
454
521
  <Autocomplete.Popup>
455
522
  <Autocomplete.List> (optional)
523
+ <Autocomplete.Collection> (optional)
524
+ <Autocomplete.Item> (repeated, as above)
525
+ <Autocomplete.Group> (optional, repeated, as above)
456
526
  <Autocomplete.Group> (optional, repeated)
527
+ <Autocomplete.Collection> (optional, as above)
457
528
  <Autocomplete.Item> (repeated)
458
529
  <Autocomplete.GroupLabel>
459
530
  <Autocomplete.Separator> (repeated)
531
+ <Autocomplete.Collection> (optional, as above)
460
532
  <Autocomplete.Empty>
533
+ <Autocomplete.Status> (optional)
461
534
  <Autocomplete.Popup> (as above)
535
+ <Autocomplete.Status> (optional, as above)
462
536
  <Autocomplete.Clear>
463
537
  ```
464
538
 
@@ -474,6 +548,8 @@ Props of its root:
474
548
  - `filter?: ((label: string, query: string) => boolean) | null`: Whether a suggestion is shown for what was typed; `null` shows every one.
475
549
  - `openOnInputClick?: boolean`: Whether a press on the input opens the list. Default: it opens when something is typed.
476
550
  - `disabled?: boolean`: Disabled: it cannot be changed.
551
+ - `readOnly?: boolean`: Its text can be read and not changed: nothing typed is taken, no suggestion pressed is written in, and its clear button does nothing. The list still opens (by its button, the arrows, or a press with `openOnInputClick`) and can be gone through. It keeps focus, and its text is still submitted.
552
+ - `items?: readonly ComboboxItemData<Value>[] | readonly ComboboxGroupData<Value>[] | Readonly<Record<string, string>>`: The suggestions as data, for a `Collection` to draw: a list of them with their labels, groups of them (`{ value, items }`, `value` the group's name), or the labels by value. The autocomplete filters them by what is typed (not with `mode: "none"`), and the `Collection` draws what is left.
477
553
  - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
478
554
  - `name?: string`: The input's name in the form around it.
479
555
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
@@ -491,6 +567,9 @@ Each part, and its own props:
491
567
  - `<Autocomplete.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
492
568
  - `<Autocomplete.Popup>` draws a `<div>`.
493
569
  - `<Autocomplete.List>` draws a `<div>`.
570
+ - `<Autocomplete.Collection>` draws no element. Generic: `<Value = unknown>`. Draws the suggestions from the root's `items`: its content once for each one left for what was typed, or for each group that has some left; given a group, for each of that group's. The root then filters.
571
+ - `of?: ComboboxEntry<Value>`: A group the root's `items` gave: its items left are then what is drawn.
572
+ - `children: (entry: ComboboxEntry<Value>) => JSX.Element`: Required. Drawn once for each item left, or for each group that has items left.
494
573
  - `<Autocomplete.Group>` draws a `<div>`. Items that belong together, named by their label. Hidden while none is shown.
495
574
  - `<Autocomplete.GroupLabel>` draws a `<div>`. The name of a group. Outside a group it is plain text, and names nothing.
496
575
  - `<Autocomplete.Separator>` draws a `<div>`. A line between groups.
@@ -500,15 +579,18 @@ Each part, and its own props:
500
579
  - `label?: string`: What is filtered and what the input shows; the item's text when left out.
501
580
  - `index?: number`: Its place among all the rows, in a virtualized list.
502
581
  - `<Autocomplete.Empty>` draws a `<div>`. What is shown when no item is.
582
+ - `<Autocomplete.Status>` draws a `<div>`. Says how the list stands ("3 results", "Loading") to software that reads the page, as its text changes. It stays in the page while its text changes: inside the popup, or beside the input.
503
583
 
504
584
  Attributes and CSS variables, by part:
505
585
 
506
586
  - input: The text input: its text is the value, and what is typed asks for suggestions.
507
587
  - `data-popup-open`: Present when the list is open.
508
588
  - `data-disabled`: Present when it is disabled.
589
+ - `data-readonly`: Present when it can be read but not changed.
509
590
  - 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
591
  - `data-popup-open`: Present when the list is open.
511
592
  - `data-disabled`: Present when it is disabled.
593
+ - `data-readonly`: Present when it can be read but not changed.
512
594
  - 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
595
  - `data-open`: Present when it is open.
514
596
  - `data-closed`: Present when it is closed.
@@ -572,10 +654,21 @@ Anatomy:
572
654
 
573
655
  Each part, and its own props:
574
656
 
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.
657
+ - `<Avatar.Root>` draws a `<span>`.
658
+ - `<Avatar.Image>` draws a `<img>`.
659
+ - `onLoadingStatusChange?: (status: ImageStatus) => void`: Called each time the picture's loading status changes: `loading` once it has an address, then `loaded` or `error`; `idle` again when its address is taken away. The same status is on the root, as `data-image-loading-status`.
660
+ - `keepMounted?: boolean`: Keeps the image's element in the page while the picture loads, as Base UI's: the element loads it itself (`loading="lazy"` works), its own `src` is the address, and until it has loaded it is `aria-hidden`, with `data-loading` or `data-error` for the design to hide or fade it by. Default: `false`, the element is drawn once the picture has loaded.
577
661
  - `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.
662
+ - `<Avatar.Fallback>` draws a `<span>`. What shows until the picture has loaded, or when it cannot; after its `delay`, when it has one.
663
+ - `delay?: number`: How long the fallback waits before it shows, in milliseconds, so a picture that loads sooner never lets it be seen. Read once, when the fallback is made. Default: `0`, at once (a server draws it then, and draws nothing while there is a wait).
664
+
665
+ Attributes and CSS variables, by part:
666
+
667
+ - root: The frame the image and its stand-in share.
668
+ - `data-image-loading-status="idle | loading | loaded | error"`: Where the picture is in its loading: `idle` while it has no address.
669
+ - image: The picture. In the page once it has loaded; with `keepMounted` (on Angular, the attribute form) in the page all along, `aria-hidden` until it has loaded.
670
+ - `data-loading`: Present while the picture loads, on an image kept in the page.
671
+ - `data-error`: Present when the picture cannot load, on an image kept in the page.
579
672
 
580
673
  ### Button
581
674
 
@@ -602,32 +695,40 @@ Attributes and CSS variables, by part:
602
695
  import { Calendar } from "@kirana-ui/solid/calendar"
603
696
  ```
604
697
 
605
- Parts: `<Calendar.Root>`, `<Calendar.Heading>`, `<Calendar.Previous>`, `<Calendar.Next>`, `<Calendar.Grid>`, `<Calendar.Weekdays>`, `<Calendar.HeadCell>`, `<Calendar.Weeks>`, `<Calendar.Cell>`, `<Calendar.Day>`.
698
+ Parts: `<Calendar.Root>`, `<Calendar.Heading>`, `<Calendar.Previous>`, `<Calendar.Next>`, `<Calendar.Months>`, `<Calendar.Grid>`, `<Calendar.Weekdays>`, `<Calendar.HeadCell>`, `<Calendar.Weeks>`, `<Calendar.Cell>`, `<Calendar.Day>`, `<Calendar.Input>`.
606
699
 
607
700
  Anatomy:
608
701
 
609
702
  ```
610
703
  <Calendar.Root>
611
- <Calendar.Heading>
704
+ <Calendar.Months> (optional)
705
+ <Calendar.Heading>
706
+ <Calendar.Grid>
707
+ <Calendar.Weekdays>
708
+ <Calendar.HeadCell> (repeated)
709
+ <Calendar.Weeks>
710
+ <Calendar.Cell> (repeated)
711
+ <Calendar.Day>
612
712
  <Calendar.Previous>
613
713
  <Calendar.Next>
614
- <Calendar.Grid>
615
- <Calendar.Weekdays>
616
- <Calendar.HeadCell> (repeated)
617
- <Calendar.Weeks>
618
- <Calendar.Cell> (repeated)
619
- <Calendar.Day>
714
+ <Calendar.Input>
620
715
  ```
621
716
 
622
717
  Props of its root:
623
718
 
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.
719
+ - `value?: CalendarValueOf<Mode>`: One day; with `mode: "range"` a first and a last day; with `mode: "multiple"` a list of days, in the order they were chosen. `null` (or an empty list) for none.
720
+ - `defaultValue?: CalendarValueOf<Mode>`: The value it starts with, when the caller does not hold `value`. Read once.
721
+ - `onValueChange?: (value: CalendarValueOf<Mode>, details: ChangeDetails) => void`: Heard as a day is about to be chosen: `details.cancel()` keeps the value as it was.
722
+ - `mode?: Mode`: Whether one day is chosen (the default), a first and a last (`"range"`), or any number (`"multiple"`: a day pressed is added, and pressed again is taken away).
723
+ - `minDays?: number`: With `mode: "multiple"`: the fewest days that can be left chosen. A press that would leave fewer does nothing.
724
+ - `maxDays?: number`: With `mode: "multiple"`: the most days that can be chosen. Once they are, the other days are disabled until one is taken away.
725
+ - `months?: number`: How many months are shown side by side (1 by default): one selection and one grid for the keys, which go from a month into the next. Each is drawn in `Calendar.Months`.
726
+ - `pagedNavigation?: boolean`: With several `months`: whether Previous and Next turn them all (a page) rather than one month. Off by default, as in react-day-picker.
727
+ - `month?: IsoDate`: The month shown (the first of them, with several `months`), when the caller holds it: any day of it. A caption's month and year menus, or a "today" button, set it.
728
+ - `defaultMonth?: IsoDate`: The month it starts on, when the caller does not hold `month`. Read once. Without it, the month of `defaultFocusedValue`, of the value, or of today.
729
+ - `onMonthChange?: (month: IsoDate, details: ChangeDetails) => void`: Heard as another month is about to be shown (the keys, the buttons, a day of another month pressed): its first day. `details.cancel()` keeps the month as it was.
730
+ - `defaultFocusedValue?: IsoDate`: The day it opens on, focusable when Tab reaches the grid. It is also the month it opens on, unless `month` or `defaultMonth` says another: then the stop for Tab is a chosen day of the months shown, today, or their first day.
731
+ - `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. Default `"en-US"`.
631
732
  - `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
733
  - `min?: IsoDate`: The first and the last day that can be chosen.
633
734
  - `max?: IsoDate`: The last day that can be chosen.
@@ -635,14 +736,18 @@ Props of its root:
635
736
  - `disabled?: boolean`: Disabled: no day can be chosen.
636
737
  - `readOnly?: boolean`: Shown as it is: the days can be moved through, and none can be chosen.
637
738
  - `fixedWeeks?: boolean`: Always six rows, so the calendar is one height in every month.
739
+ - `name?: string`: The name its hidden input submits the value under: a day; the first and the last of a range, as two entries; each day of a list.
740
+ - `form?: string`: The id of the form it belongs to, when it is not inside it.
638
741
 
639
742
  Each part, and its own props:
640
743
 
641
- - `<Calendar.Root>` draws a `<div>`. Its props are above.
744
+ - `<Calendar.Root>` draws a `<div>`. Generic: `<Mode extends CalendarMode = "single">`. `value` and `onValueChange` are typed by `mode`: a day, a range, or a list of days. Its props are above.
642
745
  - `<Calendar.Heading>` draws a `<div>`. Names the month shown. Read out when it changes.
643
746
  - `<Calendar.Previous>` draws a `<button>`.
644
747
  - `<Calendar.Next>` draws a `<button>`.
645
- - `<Calendar.Grid>` draws a `<table>`. The table of days: a grid the arrows move in.
748
+ - `<Calendar.Months>` draws no element. The months shown, with several: each is given to draw its heading and its grid. It draws no element, and is left out for one month.
749
+ - `children: (month: CalendarMonth) => JSX.Element`: Required. Draws one month, once for each shown: its heading and its grid.
750
+ - `<Calendar.Grid>` draws a `<table>`. The table of a month's days: a grid the arrows move in, from one month shown into the next.
646
751
  - `<Calendar.Weekdays>` draws no element. The days of the week: each is given to draw its head cell.
647
752
  - `children: (weekday: CalendarWeekday) => JSX.Element`: Required. Draws one day of the week, once for each: its heading cell.
648
753
  - `<Calendar.HeadCell>` draws a `<th>`. A column's heading: a day of the week.
@@ -653,6 +758,7 @@ Each part, and its own props:
653
758
  - `date: string`: Required. The day it holds, as `Calendar.Weeks` gave it: `day.date`.
654
759
  - `<Calendar.Day>` draws a `<button>`.
655
760
  - `date: string`: Required. The day it is the button of, as `Calendar.Weeks` gave it: `day.date`.
761
+ - `<Calendar.Input>` draws a `<input>`. The hidden input it is submitted by, when it has a name: one more is drawn after it for each other day.
656
762
 
657
763
  Attributes and CSS variables, by part:
658
764
 
@@ -664,7 +770,7 @@ Attributes and CSS variables, by part:
664
770
  - next: Shows the month after.
665
771
  - `data-disabled`: Present when it is disabled.
666
772
  - cell: A day's cell.
667
- - `data-selected`: Present on a chosen day, and on every day of a chosen range.
773
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Never on a copy: a day of the month before or after shown in its own month too.
668
774
  - `data-today`: Present on today.
669
775
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
670
776
  - `data-disabled`: Present when it is disabled.
@@ -672,7 +778,7 @@ Attributes and CSS variables, by part:
672
778
  - `data-range-start`: Present on the first day of a range.
673
779
  - `data-range-end`: Present on the last day of a range.
674
780
  - day: The button for a day.
675
- - `data-selected`: Present on a chosen day, and on every day of a chosen range.
781
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Never on a copy: a day of the month before or after shown in its own month too.
676
782
  - `data-today`: Present on today.
677
783
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
678
784
  - `data-disabled`: Present when it is disabled.
@@ -702,7 +808,7 @@ Anatomy:
702
808
  Props of its root:
703
809
 
704
810
  - `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.
811
+ - `defaultIndex?: number`: The slide it starts at, when the caller does not hold `index`. Read once. Default `0`.
706
812
  - `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
813
  - `orientation?: Orientation`: Whether the slides go across (the default) or down.
708
814
  - `loop?: boolean`: Whether going on from the last slide comes round to the first.
@@ -755,6 +861,7 @@ Props of its root:
755
861
  - `defaultChecked?: boolean`: Read once.
756
862
  - `onCheckedChange?: (checked: boolean, details: ChangeDetails) => void`: Heard as it is about to be checked or unchecked: `details.cancel()` keeps it as it was.
757
863
  - `indeterminate?: boolean`: Neither checked nor unchecked: a parent of boxes that disagree.
864
+ - `parent?: boolean`: In a checkbox group with `allValues`: the box that stands for them all. It is checked when every one is, mixed when some are, a press on it sets them all, and it is not submitted. Read once.
758
865
  - `disabled?: boolean`: Disabled: it cannot be changed.
759
866
  - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
760
867
  - `required?: boolean`: Needed: in a `Field`, leaving it unchecked is then invalid.
@@ -777,6 +884,7 @@ Attributes and CSS variables, by part:
777
884
  - `data-disabled`: Present when it is disabled.
778
885
  - `data-readonly`: Present when it can be read but not changed.
779
886
  - `data-required`: Present when the form needs it.
887
+ - `data-parent`: Present on the checkbox that stands for every box of its group.
780
888
  - indicator: The mark. In the page while the box is checked or indeterminate.
781
889
  - `data-checked`: Present when it is checked.
782
890
  - `data-unchecked`: Present when it is not checked.
@@ -787,6 +895,27 @@ Attributes and CSS variables, by part:
787
895
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
788
896
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
789
897
 
898
+ ### CheckboxGroup
899
+
900
+ ```
901
+ import { CheckboxGroup } from "@kirana-ui/solid/checkbox-group"
902
+ ```
903
+
904
+ Props:
905
+
906
+ - `value?: readonly string[]`: The values of the checked checkboxes, when the caller holds them.
907
+ - `defaultValue?: readonly string[]`: The values checked at the start, when the caller does not hold `value`. Read once.
908
+ - `onValueChange?: (value: string[], details: ChangeDetails) => void`: Heard as a checkbox of the group is about to be checked or unchecked, with the values that would then be checked: `details.cancel()` keeps them as they were.
909
+ - `allValues?: readonly string[]`: The value of every checkbox of the group, for a checkbox marked `parent`: it is checked when all of them are, mixed when some are, and a press on it sets them all.
910
+ - `disabled?: boolean`: Disables every checkbox of the group.
911
+
912
+ `<CheckboxGroup>` draws a `<div>`.
913
+
914
+ Attributes and CSS variables, by part:
915
+
916
+ - root: The group. A checkbox inside it with a `value` is checked while the group's value holds it; one marked `parent` stands for every value of `allValues`.
917
+ - `data-disabled`: Present when it is disabled.
918
+
790
919
  ### Collapsible
791
920
 
792
921
  ```
@@ -840,7 +969,7 @@ Attributes and CSS variables, by part:
840
969
  import { Combobox } from "@kirana-ui/solid/combobox"
841
970
  ```
842
971
 
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>`.
972
+ Parts: `<Combobox.Root>`, `<Combobox.Input>`, `<Combobox.Trigger>`, `<Combobox.Value>`, `<Combobox.Clear>`, `<Combobox.Chips>`, `<Combobox.Chip>`, `<Combobox.ChipRemove>`, `<Combobox.Portal>`, `<Combobox.Positioner>`, `<Combobox.Popup>`, `<Combobox.List>`, `<Combobox.Collection>`, `<Combobox.Group>`, `<Combobox.GroupLabel>`, `<Combobox.Separator>`, `<Combobox.Item>`, `<Combobox.ItemIndicator>`, `<Combobox.Empty>`, `<Combobox.Status>`.
844
973
 
845
974
  Anatomy:
846
975
 
@@ -848,18 +977,26 @@ Anatomy:
848
977
  <Combobox.Root>
849
978
  <Combobox.Input>
850
979
  <Combobox.Trigger>
980
+ <Combobox.Value> (optional)
851
981
  <Combobox.Portal>
852
982
  <Combobox.Positioner>
853
983
  <Combobox.Popup>
854
984
  <Combobox.Input> (as above)
855
985
  <Combobox.List> (optional)
986
+ <Combobox.Collection> (optional)
987
+ <Combobox.Item> (repeated, as above)
988
+ <Combobox.Group> (optional, repeated, as above)
856
989
  <Combobox.Group> (optional, repeated)
990
+ <Combobox.Collection> (optional, as above)
857
991
  <Combobox.Item> (repeated)
858
992
  <Combobox.ItemIndicator>
859
993
  <Combobox.GroupLabel>
860
994
  <Combobox.Separator> (repeated)
995
+ <Combobox.Collection> (optional, as above)
861
996
  <Combobox.Empty>
997
+ <Combobox.Status> (optional)
862
998
  <Combobox.Popup> (as above)
999
+ <Combobox.Status> (optional, as above)
863
1000
  <Combobox.Clear>
864
1001
  <Combobox.Chips>
865
1002
  <Combobox.Input> (as above)
@@ -879,10 +1016,11 @@ Props of its root:
879
1016
  - `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
880
1017
  - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
881
1018
  - `disabled?: boolean`: Disabled: it cannot be changed.
1019
+ - `readOnly?: boolean`: Its value can be read and not changed. The list still opens and can be gone through, by the pointer and the arrows, but no press and no Enter chooses; nothing typed is taken, and its clear and chip buttons do nothing. It keeps focus, and its value is still submitted.
882
1020
  - `name?: string`: With a name, the value is submitted with the form around it.
883
1021
  - `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.
1022
+ - `items?: readonly ComboboxItemData<Value>[] | readonly ComboboxGroupData<Value>[] | Readonly<Record<string, string>>`: The values with their labels: a list of them, groups of them (`{ value, items }`, `value` the group's name), or, for values that are text, the labels by value (`{ apple: "Apple" }`). The input shows a value by its label from here before the list has ever been opened. With the items written in the markup that is all it is for. With a `Collection` it is the list itself: the combobox filters it by what is typed, and the `Collection` draws what is left.
1023
+ - `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 (or gives the `items` it wants, when they are loaded for what was typed).
886
1024
  - `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
1025
  - `values?: readonly Value[]`: With `multiple`: the chosen values, in the order they were chosen.
888
1026
  - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with, when the caller does not hold `values`. Read once.
@@ -897,6 +1035,9 @@ Each part, and its own props:
897
1035
  - `<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
1036
  - `<Combobox.Input>` draws a `<input>`.
899
1037
  - `<Combobox.Trigger>` draws a `<button>`.
1038
+ - `<Combobox.Value>` draws no element. Generic: `<Chosen = unknown>`. The chosen value's label, or a placeholder while nothing is chosen, for a button that is the combobox (its input inside the popup). With several values, their labels with commas between.
1039
+ - `placeholder?: JSX.Element`: Shown while nothing is chosen.
1040
+ - `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, each to be called where it is read (`null` and `undefined` while nothing is chosen); with `multiple`, the values and their labels, in the order they were chosen.
900
1041
  - `<Combobox.Clear>` draws a `<button>`.
901
1042
  - `keepMounted?: boolean`: Keeps the button in the page while there is nothing to clear.
902
1043
  - `<Combobox.Chips>` draws a `<div>`. With several values: what holds the chips and the input, and what the list is placed against.
@@ -907,6 +1048,9 @@ Each part, and its own props:
907
1048
  - `<Combobox.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
908
1049
  - `<Combobox.Popup>` draws a `<div>`.
909
1050
  - `<Combobox.List>` draws a `<div>`.
1051
+ - `<Combobox.Collection>` draws no element. Generic: `<Value = unknown>`. Draws the list from the root's `items`: its content once for each item left for what was typed, or for each group that has items left; given a group, for each of that group's items left. The root then filters, and no item hides itself.
1052
+ - `of?: ComboboxEntry<Value>`: A group the root's `items` gave: its items left are then what is drawn.
1053
+ - `children: (entry: ComboboxEntry<Value>) => JSX.Element`: Required. Drawn once for each item left, or for each group that has items left.
910
1054
  - `<Combobox.Group>` draws a `<div>`. Items that belong together, named by their label. Hidden while none is shown.
911
1055
  - `<Combobox.GroupLabel>` draws a `<div>`. The name of a group. Outside a group it is plain text, and names nothing.
912
1056
  - `<Combobox.Separator>` draws a `<div>`. A line between groups.
@@ -918,15 +1062,18 @@ Each part, and its own props:
918
1062
  - `<Combobox.ItemIndicator>` draws a `<span>`. A mark an item shows while it is the chosen one.
919
1063
  - `keepMounted?: boolean`: Keeps the mark in the page while its item is not chosen.
920
1064
  - `<Combobox.Empty>` draws a `<div>`. What is shown when no item is.
1065
+ - `<Combobox.Status>` draws a `<div>`. Says how the list stands ("3 results", "Loading") to software that reads the page, as its text changes. It stays in the page while its text changes: inside the popup, or beside the input.
921
1066
 
922
1067
  Attributes and CSS variables, by part:
923
1068
 
924
1069
  - 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
1070
  - `data-popup-open`: Present when the list is open.
926
1071
  - `data-disabled`: Present when it is disabled.
1072
+ - `data-readonly`: Present when it can be read but not changed.
927
1073
  - 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
1074
  - `data-popup-open`: Present when the list is open.
929
1075
  - `data-disabled`: Present when it is disabled.
1076
+ - `data-readonly`: Present when it can be read but not changed.
930
1077
  - 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
1078
  - `data-open`: Present when it is open.
932
1079
  - `data-closed`: Present when it is closed.
@@ -980,11 +1127,12 @@ Anatomy:
980
1127
  Props of its root:
981
1128
 
982
1129
  - `inputValue?: string`: What the input says.
983
- - `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once.
1130
+ - `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once. Default `""`.
984
1131
  - `onInputValueChange?: (value: string, details: ChangeDetails) => void`: Heard as the input's text is about to change: `details.cancel()` keeps it as it was.
985
1132
  - `onSelect?: (value: string, details: ChangeDetails) => void`: An item was chosen. It takes the place of the element's own `select` event.
986
1133
  - `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
1134
  - `loop?: boolean`: Whether a step past an end of the list goes round to the other.
1135
+ - `autoHighlight?: boolean`: Whether the first item shown is highlighted from the start. Default: `true`.
988
1136
  - `disabled?: boolean`: Disabled: nothing can be typed or chosen.
989
1137
 
990
1138
  Each part, and its own props:
@@ -1181,7 +1329,7 @@ Props of its root:
1181
1329
  - `value?: IsoDate | null`: The day typed, once all of it is; `null` until then.
1182
1330
  - `defaultValue?: IsoDate | null`: The value it starts with, when the caller does not hold `value`. Read once.
1183
1331
  - `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.
1332
+ - `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. Default `"en-US"`.
1185
1333
  - `min?: IsoDate`: The first and the last day it takes: outside them it says it is invalid.
1186
1334
  - `max?: IsoDate`: The last day it takes.
1187
1335
  - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part shows. Default: `dd`, `mm`, `yyyy`.
@@ -1218,7 +1366,7 @@ Attributes and CSS variables, by part:
1218
1366
  import { DatePicker } from "@kirana-ui/solid/date-picker"
1219
1367
  ```
1220
1368
 
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>`.
1369
+ 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.Months>`, `<DatePicker.Grid>`, `<DatePicker.Weekdays>`, `<DatePicker.HeadCell>`, `<DatePicker.Weeks>`, `<DatePicker.Cell>`, `<DatePicker.Day>`.
1222
1370
 
1223
1371
  Anatomy:
1224
1372
 
@@ -1233,15 +1381,16 @@ Anatomy:
1233
1381
  <DatePicker.Positioner>
1234
1382
  <DatePicker.Popup>
1235
1383
  <DatePicker.Calendar>
1236
- <DatePicker.Heading>
1384
+ <DatePicker.Months> (optional)
1385
+ <DatePicker.Heading>
1386
+ <DatePicker.Grid>
1387
+ <DatePicker.Weekdays>
1388
+ <DatePicker.HeadCell> (repeated)
1389
+ <DatePicker.Weeks>
1390
+ <DatePicker.Cell> (repeated)
1391
+ <DatePicker.Day>
1237
1392
  <DatePicker.Previous>
1238
1393
  <DatePicker.Next>
1239
- <DatePicker.Grid>
1240
- <DatePicker.Weekdays>
1241
- <DatePicker.HeadCell> (repeated)
1242
- <DatePicker.Weeks>
1243
- <DatePicker.Cell> (repeated)
1244
- <DatePicker.Day>
1245
1394
  ```
1246
1395
 
1247
1396
  Props of its root:
@@ -1258,6 +1407,11 @@ Props of its root:
1258
1407
  - `isDateUnavailable?: (date: IsoDate) => boolean`: Days that cannot be picked in the calendar.
1259
1408
  - `calendarSystem?: CalendarSystem`: The calendar its months are laid out in, when it is not the Gregorian one.
1260
1409
  - `fixedWeeks?: boolean`: Always six rows of days.
1410
+ - `months?: number`: How many months the calendar shows side by side (1 by default).
1411
+ - `pagedNavigation?: boolean`: With several `months`: whether Previous and Next turn them all rather than one month.
1412
+ - `month?: IsoDate`: The month the calendar shows (the first, with several), when the caller holds it.
1413
+ - `defaultMonth?: IsoDate`: The month the calendar starts on, when the caller does not hold `month`. Read once.
1414
+ - `onMonthChange?: (month: IsoDate, details: ChangeDetails) => void`: Heard as the calendar is about to show another month, a day typed or picked included: its first day. `details.cancel()` keeps the month as it was.
1261
1415
  - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part of the field shows.
1262
1416
  - `disabled?: boolean`: Disabled: it cannot be changed.
1263
1417
  - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
@@ -1275,6 +1429,9 @@ Each part, and its own props:
1275
1429
  - `segment: DateFieldSegment`: Required. The piece it is: an entry `DateField.Segments` gave.
1276
1430
  - `<DatePicker.Input>` draws a `<input>`. The hidden input it is submitted by.
1277
1431
  - `<DatePicker.Trigger>` draws a `<button>`.
1432
+ - `openOnHover?: boolean`: Whether the pointer resting on the trigger opens the popover too. A press and the keyboard still open it, and a press on one the pointer opened keeps it open. Default `false`.
1433
+ - `delay?: number`: How long the pointer rests on the trigger before the popover opens, in milliseconds. Default 300.
1434
+ - `closeDelay?: number`: How long after the pointer leaves a popover it opened closes, in milliseconds. Default 0.
1278
1435
  - `<DatePicker.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1279
1436
  - `<DatePicker.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
1280
1437
  - `<DatePicker.Popup>` draws a `<div>`.
@@ -1282,7 +1439,9 @@ Each part, and its own props:
1282
1439
  - `<DatePicker.Heading>` draws a `<div>`. Names the month shown. Read out when it changes.
1283
1440
  - `<DatePicker.Previous>` draws a `<button>`.
1284
1441
  - `<DatePicker.Next>` draws a `<button>`.
1285
- - `<DatePicker.Grid>` draws a `<table>`. The table of days: a grid the arrows move in.
1442
+ - `<DatePicker.Months>` draws no element. The months shown, with several: each is given to draw its heading and its grid. It draws no element, and is left out for one month.
1443
+ - `children: (month: CalendarMonth) => JSX.Element`: Required. Draws one month, once for each shown: its heading and its grid.
1444
+ - `<DatePicker.Grid>` draws a `<table>`. The table of a month's days: a grid the arrows move in, from one month shown into the next.
1286
1445
  - `<DatePicker.Weekdays>` draws no element. The days of the week: each is given to draw its head cell.
1287
1446
  - `children: (weekday: CalendarWeekday) => JSX.Element`: Required. Draws one day of the week, once for each: its heading cell.
1288
1447
  - `<DatePicker.HeadCell>` draws a `<th>`. A column's heading: a day of the week.
@@ -1332,7 +1491,7 @@ Attributes and CSS variables, by part:
1332
1491
  - next: Shows the month after.
1333
1492
  - `data-disabled`: Present when it is disabled.
1334
1493
  - cell: A day's cell.
1335
- - `data-selected`: Present on a chosen day, and on every day of a chosen range.
1494
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Never on a copy: a day of the month before or after shown in its own month too.
1336
1495
  - `data-today`: Present on today.
1337
1496
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1338
1497
  - `data-disabled`: Present when it is disabled.
@@ -1340,7 +1499,7 @@ Attributes and CSS variables, by part:
1340
1499
  - `data-range-start`: Present on the first day of a range.
1341
1500
  - `data-range-end`: Present on the last day of a range.
1342
1501
  - day: The button for a day.
1343
- - `data-selected`: Present on a chosen day, and on every day of a chosen range.
1502
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Never on a copy: a day of the month before or after shown in its own month too.
1344
1503
  - `data-today`: Present on today.
1345
1504
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1346
1505
  - `data-disabled`: Present when it is disabled.
@@ -1354,7 +1513,7 @@ Attributes and CSS variables, by part:
1354
1513
  import { Dialog } from "@kirana-ui/solid/dialog"
1355
1514
  ```
1356
1515
 
1357
- Parts: `<Dialog.Root>`, `<Dialog.Trigger>`, `<Dialog.Portal>`, `<Dialog.Backdrop>`, `<Dialog.Popup>`, `<Dialog.Title>`, `<Dialog.Description>`, `<Dialog.Close>`.
1516
+ Parts: `<Dialog.Root>`, `<Dialog.Trigger>`, `<Dialog.Portal>`, `<Dialog.Backdrop>`, `<Dialog.Viewport>`, `<Dialog.Popup>`, `<Dialog.Title>`, `<Dialog.Description>`, `<Dialog.Close>`.
1358
1517
 
1359
1518
  Anatomy:
1360
1519
 
@@ -1363,10 +1522,11 @@ Anatomy:
1363
1522
  <Dialog.Trigger>
1364
1523
  <Dialog.Portal>
1365
1524
  <Dialog.Backdrop>
1366
- <Dialog.Popup>
1367
- <Dialog.Title>
1368
- <Dialog.Description>
1369
- <Dialog.Close>
1525
+ <Dialog.Viewport> (optional)
1526
+ <Dialog.Popup>
1527
+ <Dialog.Title>
1528
+ <Dialog.Description>
1529
+ <Dialog.Close>
1370
1530
  ```
1371
1531
 
1372
1532
  Props of its root:
@@ -1383,6 +1543,7 @@ Each part, and its own props:
1383
1543
  - `<Dialog.Trigger>` draws a `<button>`.
1384
1544
  - `<Dialog.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1385
1545
  - `<Dialog.Backdrop>` draws a `<div>`.
1546
+ - `<Dialog.Viewport>` draws a `<div>`.
1386
1547
  - `<Dialog.Popup>` draws a `<div>`.
1387
1548
  - `<Dialog.Title>` draws a `<h2>`. The heading that names the dialog.
1388
1549
  - `<Dialog.Description>` draws a `<p>`. The text that describes the dialog.
@@ -1397,6 +1558,13 @@ Attributes and CSS variables, by part:
1397
1558
  - `data-closed`: Present when it is closed.
1398
1559
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1399
1560
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1561
+ - viewport: What a long dialog scrolls in: it lies over the page, between the backdrop and the popup. A press on it beside the popup is a press outside the dialog; a press on its scrollbar is not.
1562
+ - `data-open`: Present when it is open.
1563
+ - `data-closed`: Present when it is closed.
1564
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1565
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1566
+ - `data-nested`: Present when the dialog opened over another dialog.
1567
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
1400
1568
  - popup: The dialog itself.
1401
1569
  - `data-open`: Present when it is open.
1402
1570
  - `data-closed`: Present when it is closed.
@@ -1513,7 +1681,7 @@ Props of its root:
1513
1681
  - `invalid?: boolean`: Invalid whatever the value: an error known from elsewhere.
1514
1682
  - `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
1683
  - `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.
1684
+ - `validationDebounceTime?: number`: With `"onChange"`, how long the value must rest before it is checked, in milliseconds. Default `0`.
1517
1685
 
1518
1686
  Each part, and its own props:
1519
1687
 
@@ -1641,8 +1809,8 @@ Props of its root:
1641
1809
  - `open?: boolean`: Whether it is open, when the caller holds it.
1642
1810
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1643
1811
  - `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.
1812
+ - `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds. Default `600`.
1813
+ - `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds. Default `300`.
1646
1814
  - `disabled?: boolean`: Disabled: the pointer and focus do not open it.
1647
1815
 
1648
1816
  Each part, and its own props:
@@ -2053,8 +2221,8 @@ Props of its root:
2053
2221
  - `value?: Value | null`: The item whose content is shown; `null` is "none".
2054
2222
  - `defaultValue?: Value | null`: The item whose content it starts with, when the caller does not hold `value`. Read once.
2055
2223
  - `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.
2224
+ - `delay?: number`: How long the pointer rests on a trigger before its content shows, in milliseconds. Default `50`.
2225
+ - `closeDelay?: number`: How long after the pointer leaves the content goes, in milliseconds. Default `50`.
2058
2226
  - `orientation?: Orientation`: Whether the triggers are laid out across (the default) or down: the arrows that move between them follow.
2059
2227
 
2060
2228
  Each part, and its own props:
@@ -2131,7 +2299,7 @@ Attributes and CSS variables, by part:
2131
2299
  import { NumberField } from "@kirana-ui/solid/number-field"
2132
2300
  ```
2133
2301
 
2134
- Parts: `<NumberField.Root>`, `<NumberField.Group>`, `<NumberField.Input>`, `<NumberField.Increment>`, `<NumberField.Decrement>`.
2302
+ Parts: `<NumberField.Root>`, `<NumberField.Group>`, `<NumberField.Input>`, `<NumberField.Increment>`, `<NumberField.Decrement>`, `<NumberField.ScrubArea>`, `<NumberField.ScrubAreaCursor>`.
2135
2303
 
2136
2304
  Anatomy:
2137
2305
 
@@ -2141,6 +2309,8 @@ Anatomy:
2141
2309
  <NumberField.Input>
2142
2310
  <NumberField.Increment>
2143
2311
  <NumberField.Decrement>
2312
+ <NumberField.ScrubArea>
2313
+ <NumberField.ScrubAreaCursor>
2144
2314
  ```
2145
2315
 
2146
2316
  Props of its root:
@@ -2171,6 +2341,11 @@ Each part, and its own props:
2171
2341
  - `<NumberField.Input>` draws a `<input>`.
2172
2342
  - `<NumberField.Increment>` draws a `<button>`.
2173
2343
  - `<NumberField.Decrement>` draws a `<button>`.
2344
+ - `<NumberField.ScrubArea>` draws a `<span>`.
2345
+ - `direction?: "horizontal" | "vertical"`: The way the pointer is dragged to change the number: `"horizontal"`, where right is more, or `"vertical"`, where up is more. Default `"horizontal"`.
2346
+ - `pixelSensitivity?: number`: How many pixels the pointer moves before the number changes: more is slower. Default 2.
2347
+ - `teleportDistance?: number`: How far past the scrub area's edges the drawn cursor goes before it comes back in at the other side, in pixels, half of it at each edge. Default: the edges of the window.
2348
+ - `<NumberField.ScrubAreaCursor>` draws a `<span>`.
2174
2349
 
2175
2350
  Attributes and CSS variables, by part:
2176
2351
 
@@ -2182,6 +2357,7 @@ Attributes and CSS variables, by part:
2182
2357
  - `data-dirty`: Present while the number is not the one it started with.
2183
2358
  - `data-filled`: Present while there is a number.
2184
2359
  - `data-focused`: Present while the input has focus.
2360
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2185
2361
  - `data-valid`: In a field: present once the number was checked and found right.
2186
2362
  - `data-invalid`: In a field: present while the number is wrong.
2187
2363
  - group: What holds the input and its buttons, as one control.
@@ -2192,6 +2368,7 @@ Attributes and CSS variables, by part:
2192
2368
  - `data-dirty`: Present while the number is not the one it started with.
2193
2369
  - `data-filled`: Present while there is a number.
2194
2370
  - `data-focused`: Present while the input has focus.
2371
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2195
2372
  - `data-valid`: In a field: present once the number was checked and found right.
2196
2373
  - `data-invalid`: In a field: present while the number is wrong.
2197
2374
  - input: The text input: it takes what its locale writes a number with.
@@ -2202,6 +2379,7 @@ Attributes and CSS variables, by part:
2202
2379
  - `data-dirty`: Present while the number is not the one it started with.
2203
2380
  - `data-filled`: Present while there is a number.
2204
2381
  - `data-focused`: Present while the input has focus.
2382
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2205
2383
  - `data-valid`: In a field: present once the number was checked and found right.
2206
2384
  - `data-invalid`: In a field: present while the number is wrong.
2207
2385
  - increment: A button that steps the number up. Held, it goes on.
@@ -2212,6 +2390,7 @@ Attributes and CSS variables, by part:
2212
2390
  - `data-dirty`: Present while the number is not the one it started with.
2213
2391
  - `data-filled`: Present while there is a number.
2214
2392
  - `data-focused`: Present while the input has focus.
2393
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2215
2394
  - `data-valid`: In a field: present once the number was checked and found right.
2216
2395
  - `data-invalid`: In a field: present while the number is wrong.
2217
2396
  - decrement: A button that steps the number down. Held, it goes on.
@@ -2222,6 +2401,29 @@ Attributes and CSS variables, by part:
2222
2401
  - `data-dirty`: Present while the number is not the one it started with.
2223
2402
  - `data-filled`: Present while there is a number.
2224
2403
  - `data-focused`: Present while the input has focus.
2404
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2405
+ - `data-valid`: In a field: present once the number was checked and found right.
2406
+ - `data-invalid`: In a field: present while the number is wrong.
2407
+ - scrubArea: An area that is pressed and dragged to change the number: the field's label, as a rule. It takes `direction`, `pixelSensitivity` and `teleportDistance`. A mouse's pointer is locked for the drag where the browser has that (not in Safari); a finger drags as it is.
2408
+ - `data-disabled`: Present when it is disabled.
2409
+ - `data-readonly`: Present when the number cannot be changed.
2410
+ - `data-required`: Present when a number must be given.
2411
+ - `data-touched`: Present once focus has left the input.
2412
+ - `data-dirty`: Present while the number is not the one it started with.
2413
+ - `data-filled`: Present while there is a number.
2414
+ - `data-focused`: Present while the input has focus.
2415
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2416
+ - `data-valid`: In a field: present once the number was checked and found right.
2417
+ - `data-invalid`: In a field: present while the number is wrong.
2418
+ - scrubAreaCursor: What is drawn in place of the pointer while it is locked for a drag: in the page only then, at the end of `<body>`, placed by the component.
2419
+ - `data-disabled`: Present when it is disabled.
2420
+ - `data-readonly`: Present when the number cannot be changed.
2421
+ - `data-required`: Present when a number must be given.
2422
+ - `data-touched`: Present once focus has left the input.
2423
+ - `data-dirty`: Present while the number is not the one it started with.
2424
+ - `data-filled`: Present while there is a number.
2425
+ - `data-focused`: Present while the input has focus.
2426
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2225
2427
  - `data-valid`: In a field: present once the number was checked and found right.
2226
2428
  - `data-invalid`: In a field: present while the number is wrong.
2227
2429
 
@@ -2248,10 +2450,11 @@ Props of its root:
2248
2450
 
2249
2451
  - `length?: number`: How many characters the code has. Default: 6.
2250
2452
  - `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.
2453
+ - `defaultValue?: string`: The characters it starts with, when the caller does not hold `value`. Read once. Default `""`.
2252
2454
  - `onValueChange?: (value: string, details: ChangeDetails) => void`: Heard as the characters are about to change: `details.cancel()` keeps them as they were.
2253
2455
  - `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`.
2456
+ - `mode?: "numeric" | "alphabetic" | "alphanumeric" | "text"`: What a character may be: a digit (`numeric`), a letter (`alphabetic`, `a` to `z` either case), either (`alphanumeric`), or anything but white space (`text`). It also says which keyboard a phone shows: the digits' for `numeric`, letters' otherwise. Default: `numeric`, on purpose: a one-time code is digits, and its keyboard is then the one to type them on.
2457
+ - `pattern?: string`: What else a character may be: a regular expression, as text, that one character must match whole (`"[A-F0-9]"`), in place of `mode`'s rule. Text, as an attribute can only be, so it is given the same way on every framework and on a custom element. With a pattern, `mode` only says the keyboard, and defaults to `text`.
2255
2458
  - `disabled?: boolean`: Disabled: it cannot be changed.
2256
2459
  - `name?: string`: With a name, the code is submitted with the form around it.
2257
2460
  - `form?: string`: The id of the form the input belongs to, when it is not inside it.
@@ -2302,7 +2505,7 @@ Anatomy:
2302
2505
  Props of its root:
2303
2506
 
2304
2507
  - `page?: number`: The page shown, from 1.
2305
- - `defaultPage?: number`: The page it starts at, when the caller does not hold `page`. Read once.
2508
+ - `defaultPage?: number`: The page it starts at, when the caller does not hold `page`. Read once. Default `1`.
2306
2509
  - `onPageChange?: (page: number, details: ChangeDetails) => void`: Heard as another page is about to be shown: `details.cancel()` keeps the page as it was.
2307
2510
  - `count: number`: Required. How many items there are in all.
2308
2511
  - `pageSize?: number`: How many items a page holds. Default 10.
@@ -2339,7 +2542,7 @@ Attributes and CSS variables, by part:
2339
2542
  import { Popover } from "@kirana-ui/solid/popover"
2340
2543
  ```
2341
2544
 
2342
- Parts: `<Popover.Root>`, `<Popover.Trigger>`, `<Popover.Portal>`, `<Popover.Positioner>`, `<Popover.Popup>`, `<Popover.Title>`, `<Popover.Description>`, `<Popover.Close>`.
2545
+ Parts: `<Popover.Root>`, `<Popover.Trigger>`, `<Popover.Portal>`, `<Popover.Backdrop>`, `<Popover.Positioner>`, `<Popover.Popup>`, `<Popover.Arrow>`, `<Popover.Title>`, `<Popover.Description>`, `<Popover.Close>`.
2343
2546
 
2344
2547
  Anatomy:
2345
2548
 
@@ -2347,11 +2550,13 @@ Anatomy:
2347
2550
  <Popover.Root>
2348
2551
  <Popover.Trigger>
2349
2552
  <Popover.Portal>
2553
+ <Popover.Backdrop>
2350
2554
  <Popover.Positioner>
2351
2555
  <Popover.Popup>
2352
2556
  <Popover.Title>
2353
2557
  <Popover.Description>
2354
2558
  <Popover.Close>
2559
+ <Popover.Arrow>
2355
2560
  ```
2356
2561
 
2357
2562
  Props of its root:
@@ -2359,14 +2564,20 @@ Props of its root:
2359
2564
  - `open?: boolean`: Whether it is open, when the caller holds it.
2360
2565
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
2361
2566
  - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
2567
+ - `modal?: boolean | "trap-focus"`: What the page behind it may do while it is open. `false` (the default): everything. `true`: nothing, the page is inert and does not scroll, and Tab stays inside the popover. `"trap-focus"`: Tab stays inside the popover, and the page can still be pressed and scrolled. A popover the pointer opened holds nothing until it is pressed. Read as it opens.
2362
2568
 
2363
2569
  Each part, and its own props:
2364
2570
 
2365
2571
  - `<Popover.Root>` draws no element. Holds the popover: whether it is open. Its props are above.
2366
2572
  - `<Popover.Trigger>` draws a `<button>`.
2573
+ - `openOnHover?: boolean`: Whether the pointer resting on the trigger opens the popover too. A press and the keyboard still open it, and a press on one the pointer opened keeps it open. Default `false`.
2574
+ - `delay?: number`: How long the pointer rests on the trigger before the popover opens, in milliseconds. Default 300.
2575
+ - `closeDelay?: number`: How long after the pointer leaves a popover it opened closes, in milliseconds. Default 0.
2367
2576
  - `<Popover.Portal>` draws no element. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
2577
+ - `<Popover.Backdrop>` draws a `<div>`.
2368
2578
  - `<Popover.Positioner>` draws a `<div>`. Takes the positioner options ("Positioner options", above).
2369
2579
  - `<Popover.Popup>` draws a `<div>`.
2580
+ - `<Popover.Arrow>` draws a `<div>`.
2370
2581
  - `<Popover.Title>` draws a `<h2>`. The heading that names the popover.
2371
2582
  - `<Popover.Description>` draws a `<p>`. The text that describes the popover.
2372
2583
  - `<Popover.Close>` draws a `<button>`. A button that closes the popover.
@@ -2375,6 +2586,11 @@ Attributes and CSS variables, by part:
2375
2586
 
2376
2587
  - trigger: The button that opens the popover, and what it is placed against.
2377
2588
  - `data-popup-open`: Present when the popover is open.
2589
+ - backdrop: A layer over the page behind the popover.
2590
+ - `data-open`: Present when it is open.
2591
+ - `data-closed`: Present when it is closed.
2592
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2593
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2378
2594
  - positioner: Places the popup against the trigger. It carries the geometry.
2379
2595
  - `data-open`: Present when it is open.
2380
2596
  - `data-closed`: Present when it is closed.
@@ -2392,6 +2608,10 @@ Attributes and CSS variables, by part:
2392
2608
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2393
2609
  - `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
2610
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2611
+ - arrow: An element that points at the trigger, placed along the popup's edge.
2612
+ - `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.
2613
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2614
+ - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
2395
2615
 
2396
2616
  ### Progress
2397
2617
 
@@ -2526,7 +2746,7 @@ Attributes and CSS variables, by part:
2526
2746
  - `data-disabled`: Present when it is disabled.
2527
2747
  - `data-readonly`: Present when it can be read but not changed.
2528
2748
  - `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.
2749
+ - item: One choice. It holds a hidden native radio, which a form and a label reach: the item's `id` (`kpId` on Angular, `kui-id` on a custom element) is the radio's, which a `<label for>` names.
2530
2750
  - `data-checked`: Present when it is checked.
2531
2751
  - `data-unchecked`: Present when it is not checked.
2532
2752
  - `data-disabled`: Present when it is disabled.
@@ -2576,13 +2796,13 @@ Each part, and its own props:
2576
2796
 
2577
2797
  Attributes and CSS variables, by part:
2578
2798
 
2579
- - group: The panels and the bars between them. A design lays it out as a flex box.
2799
+ - group: The panels and the bars between them. A design lays it out as a flex box: `display: flex`, and `flex-direction: column` when it is vertical. A group in a panel that is a flex box itself takes `min-width: 0` and `min-height: 0`, or what it holds widens the panel.
2580
2800
  - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2581
2801
  - `data-disabled`: Present when it is disabled.
2582
- - panel: One panel. It carries its share of the group.
2802
+ - panel: One panel. It carries its share of the group, written as its `flex` with `min-width: 0` and `min-height: 0`, so what it holds cannot keep it past its share. Its `overflow` is the design's.
2583
2803
  - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2584
2804
  - `--panel-size`: The panel's share, in hundredths of the group.
2585
- - handle: The bar between two panels: dragged, or moved with the arrows.
2805
+ - handle: The bar between two panels: dragged, or moved with the arrows. A design gives it its thickness and `flex-shrink: 0`, so the panels do not squeeze it.
2586
2806
  - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2587
2807
  - `data-dragging`: Present while the bar is dragged.
2588
2808
  - `data-disabled`: Present when it is disabled.
@@ -2600,7 +2820,8 @@ Anatomy:
2600
2820
  ```
2601
2821
  <ScrollArea.Root>
2602
2822
  <ScrollArea.Viewport>
2603
- <ScrollArea.Content>
2823
+ <ScrollArea.Content> (optional)
2824
+ <ScrollArea.Scrollbar> (repeated, as above)
2604
2825
  <ScrollArea.Scrollbar> (repeated)
2605
2826
  <ScrollArea.Thumb>
2606
2827
  <ScrollArea.Corner>
@@ -2610,7 +2831,7 @@ Each part, and its own props:
2610
2831
 
2611
2832
  - `<ScrollArea.Root>` draws a `<div>`.
2612
2833
  - `<ScrollArea.Viewport>` draws a `<div>`.
2613
- - `<ScrollArea.Content>` draws a `<div>`. What is scrolled.
2834
+ - `<ScrollArea.Content>` draws a `<div>`. A box around what is scrolled, as wide as what it holds. Not needed to measure: the viewport's children are watched as they are. For content whose own box does not grow with what is in it (a block holding a wider table, or bare text).
2614
2835
  - `<ScrollArea.Scrollbar>` draws a `<div>`.
2615
2836
  - `orientation?: Orientation`: Which way it scrolls. Default: `vertical`.
2616
2837
  - `keepMounted?: boolean`: In the page even while there is nothing to scroll its way.
@@ -2676,6 +2897,7 @@ Props of its root:
2676
2897
  - `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
2677
2898
  - `onOpenChange?: (open: boolean, details: ChangeDetails) => void`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
2678
2899
  - `disabled?: boolean`: Disabled: it cannot be changed.
2900
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable: the list still opens to be read, and no item can be chosen. Its value is still submitted with the form.
2679
2901
  - `required?: boolean`: In a field, "none" is then wrong.
2680
2902
  - `name?: string`: With a name, the value is submitted with the form around it.
2681
2903
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
@@ -2718,6 +2940,7 @@ Attributes and CSS variables, by part:
2718
2940
  - `data-popup-open`: Present when the list is open.
2719
2941
  - `data-placeholder`: Present while nothing is chosen.
2720
2942
  - `data-disabled`: Present when it is disabled.
2943
+ - `data-readonly`: Present when it can be read but not changed.
2721
2944
  - value: The chosen value's label, or the placeholder. With several values, their labels with commas between.
2722
2945
  - `data-placeholder`: Present while nothing is chosen.
2723
2946
  - positioner: Places the list against the trigger. It carries the geometry.
@@ -2804,6 +3027,7 @@ Props of its root:
2804
3027
  - `orientation?: Orientation`: Whether the track lies across (the default) or stands upright: the arrows that move a thumb follow.
2805
3028
  - `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
3029
  - `disabled?: boolean`: Disabled: it cannot be changed.
3030
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable: no key and no pointer moves a thumb, and its value is still submitted with the form.
2807
3031
  - `name?: string`: With a name, each thumb's value is submitted with the form around the slider.
2808
3032
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
2809
3033
  - `format?: Intl.NumberFormatOptions`: How a value is written.
@@ -2826,28 +3050,34 @@ Attributes and CSS variables, by part:
2826
3050
  - root: Groups the slider's parts.
2827
3051
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2828
3052
  - `data-disabled`: Present when it is disabled.
3053
+ - `data-readonly`: Present when it can be read but not changed.
2829
3054
  - `data-dragging`: Present while a pointer holds a thumb.
2830
3055
  - value: The value, written.
2831
3056
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2832
3057
  - `data-disabled`: Present when it is disabled.
3058
+ - `data-readonly`: Present when it can be read but not changed.
2833
3059
  - `data-dragging`: Present while a pointer holds a thumb.
2834
3060
  - control: What a pointer presses and drags on. It holds the track and the thumbs.
2835
3061
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2836
3062
  - `data-disabled`: Present when it is disabled.
3063
+ - `data-readonly`: Present when it can be read but not changed.
2837
3064
  - `data-dragging`: Present while a pointer holds a thumb.
2838
3065
  - track: The whole range.
2839
3066
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2840
3067
  - `data-disabled`: Present when it is disabled.
3068
+ - `data-readonly`: Present when it can be read but not changed.
2841
3069
  - `data-dragging`: Present while a pointer holds a thumb.
2842
3070
  - 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
3071
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2844
3072
  - `data-disabled`: Present when it is disabled.
3073
+ - `data-readonly`: Present when it can be read but not changed.
2845
3074
  - `data-dragging`: Present while a pointer holds a thumb.
2846
3075
  - `--start-position`: With thumbs that stay inside the control: where the filled part starts, or with one thumb where it ends.
2847
3076
  - `--relative-size`: With thumbs that stay inside the control and a range: the filled part's length.
2848
3077
  - 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
3078
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2850
3079
  - `data-disabled`: Present when it is disabled.
3080
+ - `data-readonly`: Present when it can be read but not changed.
2851
3081
  - `data-dragging`: Present while a pointer holds a thumb.
2852
3082
  - `data-index`: Which thumb it is, from 0.
2853
3083
  - `--position`: With thumbs that stay inside the control: where the thumb's centre is.
@@ -3159,8 +3389,8 @@ Props of its root:
3159
3389
  - `open?: boolean`: Whether it is open, when the caller holds it.
3160
3390
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
3161
3391
  - `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.
3392
+ - `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds. Default `600`.
3393
+ - `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds. Default `0`.
3164
3394
  - `disabled?: boolean`: Disabled: the pointer and focus do not open it.
3165
3395
 
3166
3396
  Each part, and its own props: