@kirana-ui/web 0.3.0 → 0.4.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 (104) hide show
  1. package/CHANGELOG.md +140 -0
  2. package/llms.txt +1378 -97
  3. package/package.json +44 -3
  4. package/skills/kirana-ui-primitives/SKILL.md +24 -4
  5. package/src/accordion.d.ts +1 -1
  6. package/src/accordion.js +2 -1
  7. package/src/accordion.js.map +1 -1
  8. package/src/alert-dialog.js +3 -2
  9. package/src/alert-dialog.js.map +1 -1
  10. package/src/around.d.ts +7 -0
  11. package/src/around.js +13 -2
  12. package/src/around.js.map +1 -1
  13. package/src/autocomplete.d.ts +1 -1
  14. package/src/avatar.js +2 -2
  15. package/src/avatar.js.map +1 -1
  16. package/src/button.d.ts +2 -1
  17. package/src/button.js +2 -1
  18. package/src/button.js.map +1 -1
  19. package/src/calendar.d.ts +1 -1
  20. package/src/calendar.js +2 -1
  21. package/src/calendar.js.map +1 -1
  22. package/src/carousel.d.ts +1 -1
  23. package/src/carousel.js +4 -2
  24. package/src/carousel.js.map +1 -1
  25. package/src/color-picker.d.ts +28 -0
  26. package/src/color-picker.js +81 -0
  27. package/src/color-picker.js.map +1 -0
  28. package/src/combobox.d.ts +11 -4
  29. package/src/combobox.js +37 -12
  30. package/src/combobox.js.map +1 -1
  31. package/src/command.d.ts +2 -2
  32. package/src/command.js +4 -4
  33. package/src/command.js.map +1 -1
  34. package/src/date-field.d.ts +2 -2
  35. package/src/date-field.js +3 -3
  36. package/src/date-field.js.map +1 -1
  37. package/src/date-picker.d.ts +7 -4
  38. package/src/date-picker.js +37 -7
  39. package/src/date-picker.js.map +1 -1
  40. package/src/dates.d.ts +6 -3
  41. package/src/dates.js +8 -5
  42. package/src/dates.js.map +1 -1
  43. package/src/dialog.d.ts +3 -2
  44. package/src/dialog.js +8 -4
  45. package/src/dialog.js.map +1 -1
  46. package/src/drawer.d.ts +2 -1
  47. package/src/drawer.js +7 -3
  48. package/src/drawer.js.map +1 -1
  49. package/src/editable.d.ts +21 -0
  50. package/src/editable.js +56 -0
  51. package/src/editable.js.map +1 -0
  52. package/src/file-upload.d.ts +23 -0
  53. package/src/file-upload.js +98 -0
  54. package/src/file-upload.js.map +1 -0
  55. package/src/index.d.ts +27 -9
  56. package/src/index.js +10 -0
  57. package/src/menu.d.ts +2 -2
  58. package/src/menu.js +19 -10
  59. package/src/menu.js.map +1 -1
  60. package/src/menubar.d.ts +2 -2
  61. package/src/menubar.js +5 -3
  62. package/src/menubar.js.map +1 -1
  63. package/src/navigation-menu.d.ts +2 -2
  64. package/src/navigation-menu.js +10 -6
  65. package/src/navigation-menu.js.map +1 -1
  66. package/src/otp.d.ts +4 -2
  67. package/src/otp.js +23 -4
  68. package/src/otp.js.map +1 -1
  69. package/src/password-input.d.ts +20 -0
  70. package/src/password-input.js +39 -0
  71. package/src/password-input.js.map +1 -0
  72. package/src/rating.d.ts +18 -0
  73. package/src/rating.js +54 -0
  74. package/src/rating.js.map +1 -0
  75. package/src/runtime.d.ts +2 -2
  76. package/src/runtime.js +1 -1
  77. package/src/runtime.js.map +1 -1
  78. package/src/select.d.ts +10 -3
  79. package/src/select.js +32 -10
  80. package/src/select.js.map +1 -1
  81. package/src/steps.d.ts +17 -0
  82. package/src/steps.js +47 -0
  83. package/src/steps.js.map +1 -0
  84. package/src/tags-input.d.ts +35 -0
  85. package/src/tags-input.js +96 -0
  86. package/src/tags-input.js.map +1 -0
  87. package/src/time-field.d.ts +18 -0
  88. package/src/time-field.js +54 -0
  89. package/src/time-field.js.map +1 -0
  90. package/src/toast.d.ts +4 -3
  91. package/src/toast.js +6 -4
  92. package/src/toast.js.map +1 -1
  93. package/src/toggle-group.d.ts +1 -1
  94. package/src/toggle-group.js +2 -1
  95. package/src/toggle-group.js.map +1 -1
  96. package/src/toolbar.d.ts +0 -6
  97. package/src/toolbar.js +14 -3
  98. package/src/toolbar.js.map +1 -1
  99. package/src/tour.d.ts +27 -0
  100. package/src/tour.js +62 -0
  101. package/src/tour.js.map +1 -0
  102. package/src/tree.d.ts +29 -0
  103. package/src/tree.js +99 -0
  104. package/src/tree.js.map +1 -0
package/llms.txt CHANGED
@@ -4,11 +4,13 @@
4
4
 
5
5
  Generated from the library's own source (`bun scripts/llms.ts`), and checked against it: every element, attribute, event and part here is in the package, and what is not here is not.
6
6
 
7
+ This file describes the version it ships with. What changed in each release, the breaking changes first with what to write instead, is `CHANGELOG.md` in the package: `node_modules/@kirana-ui/web/CHANGELOG.md`.
8
+
7
9
  ## Install and entries
8
10
 
9
11
  Install `@kirana-ui/web`. 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/web/agent`, `@kirana-ui/web/testing`).
10
12
 
11
- Its entries: an entry per element (`@kirana-ui/web/tabs`, 49 of them), the package root `@kirana-ui/web` (every element at once), `@kirana-ui/web/runtime` (`defineElement`, for an element of your own), `@kirana-ui/web/agent` and `@kirana-ui/web/testing` (the agent bridge and the testing kit: what they give is the same on every framework, and written out in each framework package's `llms.txt`).
13
+ Its entries: an entry per element (`@kirana-ui/web/tabs`, 59 of them), the package root `@kirana-ui/web` (every element at once), `@kirana-ui/web/runtime` (`defineElement`, for an element of your own), `@kirana-ui/web/agent` and `@kirana-ui/web/testing` (the agent bridge and the testing kit: what they give is the same on every framework, and written out in each framework package's `llms.txt`).
12
14
 
13
15
  The attributes and CSS variables below are also data and typed selectors, for a design system: install `@kirana-ui/vocabulary` for them. It is its own package, and not installed with this one.
14
16
 
@@ -16,10 +18,12 @@ The attributes and CSS variables below are also data and typed selectors, for a
16
18
 
17
19
  - Importing an entry defines its element: `import "@kirana-ui/web/dialog"`. `import "@kirana-ui/web"` defines them all.
18
20
  - The custom element (`<kui-dialog>`) holds the component and draws nothing: it takes no room (`display: contents`) and has no shadow root. Every part, the root among them, is an element of the page's own inside it, named by `kui-part`: `<button kui-part="trigger">`. So a trigger is a real button, and the page is the page the other adapters draw.
21
+ - A part on a `<button>` writes `type="button"`, so that it never submits a form by accident, unless the element has a `type` of its own (`<button kui-part="root" type="submit">`); a part on an element that is not a button (`<a kui-part="trigger" href="/x">`) writes none. A button on a link that navigates stays a link: `<kui-button native-button="false"><a kui-part="root" href="/x">` is given no `role`, no `tabindex` and none of the button's keys (its Enter is its own, and Space does not press it); a disabled one still has `tabindex="-1"` and `aria-disabled`.
19
22
  - A prop is an attribute in kebab case on the custom element (`default-open`), and a property in camel case (`element.defaultOpen`, `element.open = true`). A prop that is a function or an object is a property only, listed for its element.
20
23
  - A change is an event on the custom element, named for its callback (`open-change`, `value-change`): `event.detail` holds the value under its prop's name (`detail.open`) and `detail.details` (`reason`, `event`, `source`, `cancel()`). `event.preventDefault()` keeps the value as it was. The element then holds the value: it is controlled by writing the property back.
21
24
  - What a part needs of its own is a `kui-` attribute on the part's element: `kui-value`, `kui-disabled`, `kui-index`, `kui-label`, a positioner's `kui-side`, `kui-align`, `kui-side-offset`, `kui-align-offset`, `kui-collision-padding`, `kui-sticky`, `kui-arrow-padding`, `kui-position-method`, `kui-anchor` (the id of the element the popup is placed against, when that is not its trigger) and `kui-collision-boundary` (the id of the element it is held inside). What an attribute cannot say of a positioner (`sideOffset` as a function, `collisionBoundary` as an element or a rectangle, `collisionPadding` a side, `collisionAvoidance`) is the `positioning` property of its custom element, an object of the positioner's options read as the popup comes into the page (`popover.positioning = { sideOffset: ({ anchor }) => anchor.height }`); an attribute on the positioner comes before the same option there. An `id` for the component is `kui-id` on the custom element.
22
25
  - A part that is in the page only some of the time (a closed panel, a popup) is taken out of the page while it is not, and put back where it was; `kui-keep-mounted` on the part keeps it. A portal part (`kui-part="portal"`) is moved to the end of `<body>`.
26
+ - A part writes its role, ARIA and state attributes on its element over the element's own: `<button kui-part="trigger" aria-expanded="true">` says the part's `aria-expanded`. An attribute the part has no value for is the page's (`aria-controls="note"` while the panel is not in the page), and the page's own comes back when the part stops giving one. A part that writes its own text (a calendar's heading, a meter's value) writes it only while its element has no content of its own.
23
27
  - A list the component draws is written once, as a `<template kui-each="name">` where the list goes: it is stamped for each entry, `{field}` in its text and attributes filled from the entry, and an element with `kui-when` kept only for entries of that type.
24
28
  - A component inside another's custom element is that one's own: a `<kui-menu>` inside a `<kui-menu>` is its submenu, a control inside a `<kui-field>` is the field's control.
25
29
  - TypeScript knows each element by its tag (`document.querySelector("kui-dialog")`): its props as properties and its events with their `detail`.
@@ -44,7 +48,7 @@ The attributes and CSS variables below are also data and typed selectors, for a
44
48
  import "@kirana-ui/web/accordion"
45
49
  ```
46
50
 
47
- `<kui-accordion>`: `<kui-accordion>` around `kui-part="root"` and its `item`s, each with a `header`, a `trigger` button and a `panel` that is in the page while its item is open. An item's `kui-value` tells it from the others; an item that is given none makes its own. `value` and `default-value` (the open items, with commas between), `multiple`, `disabled`, `orientation`, `loop`; it tells `value-change`.
51
+ `<kui-accordion>`: `<kui-accordion>` around `kui-part="root"` and its `item`s, each with a `header`, a `trigger` button and a `panel` that is in the page while its item is open. An item's `kui-value` tells it from the others; an item that is given none makes its own. `value` and `default-value` (the open items, with commas between), `multiple`, `disabled`, `orientation`, `loop-focus` (`loop` is its older name); it tells `value-change`.
48
52
 
49
53
  Attributes of the element (each also a property, in camel case):
50
54
 
@@ -53,7 +57,8 @@ Attributes of the element (each also a property, in camel case):
53
57
  - `multiple` (boolean): Whether several items can be open at once. Default `false`: opening one closes the others.
54
58
  - `disabled` (boolean): Disables every item: none can be opened or closed.
55
59
  - `orientation` (string): The way the arrows move between triggers. Default `vertical`.
56
- - `loop` (boolean): Whether the arrows wrap from the last trigger to the first. Default `true`.
60
+ - `loop-focus` (boolean): Whether the arrows wrap from the last trigger to the first. Default `true`.
61
+ - `loop` (boolean): Whether the arrows wrap from the last item to the first.
57
62
 
58
63
  Events:
59
64
 
@@ -84,12 +89,15 @@ Attributes and CSS variables, by part:
84
89
  - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
85
90
  - `data-disabled`: Present when it is disabled.
86
91
  - item: One section: a header with its trigger, and a panel. Its `value` tells it from the others; an item that is given none makes its own.
92
+ - `data-index`: The item's place among the accordion's items, from 0.
87
93
  - `data-open`: Present when the item is open.
88
94
  - `data-disabled`: Present when it is disabled.
89
95
  - header: The heading that holds the trigger.
96
+ - `data-index`: The item's place among the accordion's items, from 0.
90
97
  - `data-open`: Present when the item is open.
91
98
  - `data-disabled`: Present when it is disabled.
92
99
  - trigger: The button that opens and closes the item's panel.
100
+ - `data-index`: The item's place among the accordion's items, from 0.
93
101
  - `data-panel-open`: Present when the item's panel is open.
94
102
  - `data-disabled`: Present when it is disabled.
95
103
  - panel: The item's content. In the page while open, and through its exit's motion.
@@ -99,6 +107,7 @@ Attributes and CSS variables, by part:
99
107
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
100
108
  - `data-disabled`: Present when it is disabled.
101
109
  - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
110
+ - `data-index`: The item's place among the accordion's items, from 0.
102
111
  - `--accordion-panel-height`: The panel's content height while it opens or closes, `auto` once it is open.
103
112
  - `--accordion-panel-width`: The panel's content width while it opens or closes, `auto` once it is open.
104
113
 
@@ -147,6 +156,7 @@ Attributes and CSS variables, by part:
147
156
 
148
157
  - trigger: The button that opens the dialog.
149
158
  - `data-popup-open`: Present when the dialog is open.
159
+ - `data-disabled`: Present when it is disabled.
150
160
  - backdrop: The layer over the page behind the dialog.
151
161
  - `data-open`: Present when it is open.
152
162
  - `data-closed`: Present when it is closed.
@@ -164,8 +174,11 @@ Attributes and CSS variables, by part:
164
174
  - `data-closed`: Present when it is closed.
165
175
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
166
176
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
177
+ - `data-nested`: Present when the dialog opened over another dialog.
167
178
  - `data-nested-dialog-open`: Present when another dialog is open above this one.
168
179
  - `--nested-dialogs`: How many dialogs are open above this one.
180
+ - close: A button that closes the dialog.
181
+ - `data-disabled`: Present when it is disabled.
169
182
 
170
183
  ### Autocomplete
171
184
 
@@ -181,7 +194,7 @@ Attributes of the element (each also a property, in camel case):
181
194
  - `default-value` (string): The text it starts with, when the caller does not hold `value`. Read once.
182
195
  - `open` (boolean): Whether the list is open, when the caller holds it.
183
196
  - `default-open` (boolean): Whether the list starts open, when the caller does not hold `open`. Read once.
184
- - `mode` (string): `"list"` (the default): the suggestions are filtered by what is typed. `"none"`: they are as the caller draws them.
197
+ - `mode` (string): `"list"` (the default): the suggestions are filtered by what is typed. `"both"`: they are filtered, and the rest of the first one that begins with what is typed is written after it in the input, selected, so typing on replaces it and Enter or Tab keeps it; the arrows write the suggestion they are on into the input. `"inline"`: written so, and not filtered. `"none"`: neither; the suggestions are as the caller draws them. A completion is not written into a word an input method is composing, nor after a deletion.
185
198
  - `open-on-input-click` (boolean): Whether a press on the input opens the list. Default: it opens when something is typed.
186
199
  - `auto-highlight` (boolean): The first suggestion for what was typed is highlighted as one types, so Enter takes it. Off by default: no suggestion is highlighted for having been typed at, and Enter is the form's, with the text as typed, until an arrow or the pointer has gone to one.
187
200
  - `disabled` (boolean): Disabled: it cannot be changed.
@@ -252,38 +265,73 @@ Attributes and CSS variables, by part:
252
265
 
253
266
  - input: The text input: its text is the value, and what is typed asks for suggestions.
254
267
  - `data-popup-open`: Present when the list is open.
268
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
269
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
270
+ - `data-list-empty`: Present when no item is shown for what was typed, once the list is in the page.
255
271
  - `data-disabled`: Present when it is disabled.
256
272
  - `data-readonly`: Present when it can be read but not changed.
273
+ - `data-required`: Present when the form needs it.
274
+ - `data-touched`: Inside a Field: present once focus has left the control.
275
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
276
+ - `data-filled`: Inside a Field: present while the control has a value.
277
+ - `data-focused`: Inside a Field: present while the control has focus.
278
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
279
+ - `data-invalid`: Inside a Field: present while the value is wrong.
257
280
  - 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.
258
281
  - `data-popup-open`: Present when the list is open.
282
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
283
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
284
+ - `data-list-empty`: Present when no item is shown for what was typed, once the list is in the page.
259
285
  - `data-disabled`: Present when it is disabled.
260
286
  - `data-readonly`: Present when it can be read but not changed.
261
- - 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.
287
+ - `data-required`: Present when the form needs it.
288
+ - `data-touched`: Inside a Field: present once focus has left the control.
289
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
290
+ - `data-filled`: Inside a Field: present while the control has a value.
291
+ - `data-focused`: Inside a Field: present while the control has focus.
292
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
293
+ - `data-invalid`: Inside a Field: present while the value is wrong.
294
+ - 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. As a sheet it is not placed, and carries none.
262
295
  - `data-open`: Present when it is open.
263
296
  - `data-closed`: Present when it is closed.
264
297
  - `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.
265
298
  - `data-align="start | center | end"`: How it is aligned with the anchor.
299
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
300
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
301
+ - `data-empty`: Present when no item is shown for what was typed.
266
302
  - `--anchor-width`: The anchor's width.
267
303
  - `--anchor-height`: The anchor's height.
268
304
  - `--available-width`: The width between the anchor and the edge of the viewport.
269
305
  - `--available-height`: The height between the anchor and the edge of the viewport.
270
306
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
271
- - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list.
307
+ - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list. As a sheet, a design moves it by what it says of the drag, and gives it `touch-action: none` where a finger drags it.
272
308
  - `data-open`: Present when it is open.
273
309
  - `data-closed`: Present when it is closed.
274
310
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
275
311
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
276
312
  - `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.
277
313
  - `data-align="start | center | end"`: How it is aligned with the anchor.
314
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
315
+ - `data-swiping`: Present while the sheet is dragged.
316
+ - `data-swipe-dismiss`: Present once a drag has closed it.
317
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
278
318
  - `data-empty`: Present when no item is shown for what was typed.
319
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
320
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
321
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
322
+ - `--drawer-swipe-strength`: As a sheet, once let go: 0.1 to 1, the share of the design's own time it should take to come to rest.
279
323
  - list: The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
280
324
  - `data-empty`: Present when no item is shown for what was typed.
281
325
  - item: One suggestion: chosen, its text is written into the input.
282
326
  - `data-selected`: Present on the chosen item.
283
327
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
284
328
  - `data-disabled`: Present when it is disabled.
285
- - clear: A button that empties the input and the value.
329
+ - clear: A button that empties the input and the value. It is in the page while there is something to clear (the text, for an autocomplete; else what is chosen), and through its exit; `keepMounted` keeps it there.
286
330
  - `data-disabled`: Present when it is disabled.
331
+ - `data-popup-open`: Present when the list is open.
332
+ - `data-visible`: Present while there is something to clear.
333
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
334
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
287
335
 
288
336
  ### Autosize
289
337
 
@@ -353,13 +401,13 @@ Attributes and CSS variables, by part:
353
401
  import "@kirana-ui/web/button"
354
402
  ```
355
403
 
356
- `<kui-button>`: `<kui-button>` around a `kui-part="root"` button, or with `native-button="false"` another element that acts as one. `disabled`, `focusable-when-disabled`, `native-button`.
404
+ `<kui-button>`: `<kui-button>` around a `kui-part="root"` button, or with `native-button="false"` another element that acts as one; on a link that navigates (`<a href>`), it stays a link. `disabled`, `focusable-when-disabled`, `native-button`.
357
405
 
358
406
  Attributes of the element (each also a property, in camel case):
359
407
 
360
408
  - `disabled` (boolean): Disabled: a press does nothing.
361
409
  - `focusable-when-disabled` (boolean): Keeps a disabled button in the tab order, so what it would do can still be read.
362
- - `native-button` (boolean): `false` when the element is not a `<button>`: it is given a button's role and keyboard.
410
+ - `native-button` (boolean): `false` when the element is not a `<button>`: it is given a button's role, a place in the tab order and its keys (Enter, Space). A link that navigates (an `<a>` or `<area>` with an `href`) stays a link: no role is written over its own, it keeps its own place in the tab order and its own Enter, and Space does not press it; disabled, it is still blocked.
363
411
 
364
412
  Parts (`kui-part`), each with the `kui-` attributes its element is read for:
365
413
 
@@ -383,13 +431,14 @@ Attributes and CSS variables, by part:
383
431
  import "@kirana-ui/web/calendar"
384
432
  ```
385
433
 
386
- `<kui-calendar>`: `<kui-calendar>` around `kui-part="root"`, with `previous` and `next` buttons, a `heading` (it says the month) and a `grid` table. The table's head row holds a `<template kui-each="weekdays">` with a `head-cell` (`{short}`, `{narrow}`, `{long}`); its body a `<template kui-each="weeks">` with a row, which holds a `<template kui-each="days">` with a `cell` and its `day` button (`{date}`, `{label}`). With several `months`, a `<template kui-each="months">` (`{index}`, `{month}`, `{title}`) holds each month's `heading` and `grid`. An `<input kui-part="input">` submits the value under `name`. `value` and `default-value` (a day as `2026-03-14`; a range's first and last, or a list's days, with commas between), `mode`, `min-days`, `max-days`, `months`, `paged-navigation`, `month`, `default-month`, `default-focused-value`, `locale`, `calendar-system`, `min`, `max`, `disabled`, `read-only`, `fixed-weeks`, `name`, `form`; `isDateUnavailable` as a property; it tells `value-change` and `month-change`.
434
+ `<kui-calendar>`: `<kui-calendar>` around `kui-part="root"`, with `previous` and `next` buttons, a `heading` (it says the month) and a `grid` table. The table's head row holds a `<template kui-each="weekdays">` with a `head-cell` (`{short}`, `{narrow}`, `{long}`); its body a `<template kui-each="weeks">` with a row, which holds a `<template kui-each="days">` with a `cell` and its `day` button (`{date}`, `{label}`). With several `months`, a `<template kui-each="months">` (`{index}`, `{month}`, `{title}`) holds each month's `heading` and `grid`. An `<input kui-part="input">` submits the value under `name`. `value` and `default-value` (a day as `2026-03-14`; a range's first and last, or a list's days, with commas between), `mode`, `required`, `min-days`, `max-days`, `months`, `paged-navigation`, `month`, `default-month`, `default-focused-value`, `locale`, `calendar-system`, `min`, `max`, `disabled`, `read-only`, `fixed-weeks`, `name`, `form`; `isDateUnavailable` as a property; it tells `value-change` and `month-change`.
387
435
 
388
436
  Attributes of the element (each also a property, in camel case):
389
437
 
390
438
  - `value` (string): 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.
391
439
  - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
392
440
  - `mode` (string): 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).
441
+ - `required` (boolean): Whether a day, once chosen, stays chosen. Off by default, as in react-day-picker: the chosen day pressed again is taken away and the value is `null`, heard with the reason `"day-deselect"` (cancellable). Given, the chosen day pressed again stays, and with `mode: "multiple"` the last day cannot be taken away. With `mode: "range"` a press always begins a range again, so a press never clears a range. It does not make a form ask for a value.
393
442
  - `min-days` (number): With `mode: "multiple"`: the fewest days that can be left chosen. A press that would leave fewer does nothing.
394
443
  - `max-days` (number): With `mode: "multiple"`: the most days that can be chosen. Once they are, the other days are disabled until one is taken away.
395
444
  - `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`.
@@ -397,7 +446,7 @@ Attributes of the element (each also a property, in camel case):
397
446
  - `month` (string): 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.
398
447
  - `default-month` (string): 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.
399
448
  - `default-focused-value` (string): 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.
400
- - `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.
449
+ - `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. The week begins on the day the region begins it on (Sunday in `"en-US"`, Monday in `"fr-FR"`), or on the day a `-u-fw-` extension names: `"en-US-u-fw-mon"` is American English with weeks from Monday (`sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`).
401
450
  - `calendar-system` (string): 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.
402
451
  - `min` (string): The first and the last day that can be chosen.
403
452
  - `max` (string): The last day that can be chosen.
@@ -459,21 +508,21 @@ Attributes and CSS variables, by part:
459
508
  - next: Shows the month after.
460
509
  - `data-disabled`: Present when it is disabled.
461
510
  - cell: A day's cell.
462
- - `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.
511
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Also on a copy of one (a day of the month before or after, shown in its own month too), which is drawn as the day is but has no aria-selected.
463
512
  - `data-today`: Present on today.
464
513
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
465
514
  - `data-disabled`: Present when it is disabled.
466
515
  - `data-unavailable`: Present on a day that cannot be chosen.
467
- - `data-range-start`: Present on the first day of a range.
468
- - `data-range-end`: Present on the last day of a range.
516
+ - `data-range-start`: Present on the first day of a range, and on a copy of it.
517
+ - `data-range-end`: Present on the last day of a range, and on a copy of it.
469
518
  - day: The button for a day.
470
- - `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.
519
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Also on a copy of one (a day of the month before or after, shown in its own month too), which is drawn as the day is but has no aria-selected.
471
520
  - `data-today`: Present on today.
472
521
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
473
522
  - `data-disabled`: Present when it is disabled.
474
523
  - `data-unavailable`: Present on a day that cannot be chosen.
475
- - `data-range-start`: Present on the first day of a range.
476
- - `data-range-end`: Present on the last day of a range.
524
+ - `data-range-start`: Present on the first day of a range, and on a copy of it.
525
+ - `data-range-end`: Present on the last day of a range, and on a copy of it.
477
526
 
478
527
  ### Carousel
479
528
 
@@ -481,7 +530,7 @@ Attributes and CSS variables, by part:
481
530
  import "@kirana-ui/web/carousel"
482
531
  ```
483
532
 
484
- `<kui-carousel>`: `<kui-carousel>` around `kui-part="root"`, a `viewport` with an `item` for each slide (`kui-index`, from 0), `previous` and `next` buttons, and an `indicator` button for a slide (`kui-index`). `index`, `default-index`, `orientation`, `loop`; it tells `index-change`.
533
+ `<kui-carousel>`: `<kui-carousel>` around `kui-part="root"`, a `viewport` with an `item` for each slide (`kui-index`, from 0, or its place in the page when it has none), `previous` and `next` buttons, and an `indicator` button for a slide (`kui-index`). `index`, `default-index`, `orientation`, `loop`; it tells `index-change`.
485
534
 
486
535
  Attributes of the element (each also a property, in camel case):
487
536
 
@@ -544,13 +593,14 @@ Attributes of the element (each also a property, in camel case):
544
593
  - `checked` (boolean): Whether it is checked, when the caller holds it.
545
594
  - `default-checked` (boolean): Read once.
546
595
  - `indeterminate` (boolean): Neither checked nor unchecked: a parent of boxes that disagree.
547
- - `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.
596
+ - `parent` (boolean): In a checkbox group with `allValues`: the box that stands for them all, written anywhere inside the group. It is checked when every one is, mixed when some are, and it is not submitted; its `aria-controls` names the boxes. A press from mixed checks them all, the next unchecks them all, and the next brings back the set they were left in (left all checked or none, a press goes between all and none); a disabled box keeps its state. Read once.
548
597
  - `disabled` (boolean): Disabled: it cannot be changed.
549
598
  - `read-only` (boolean): Shown as it is, focusable, not changeable.
550
599
  - `required` (boolean): Needed: in a `Field`, leaving it unchecked is then invalid.
551
600
  - `name` (string): With a name, the control is submitted with the form around it when it is checked.
552
601
  - `form` (string): The id of the form the control belongs to, when it is not inside it.
553
602
  - `value` (string): What is submitted. Default `"on"`, as a native checkbox's.
603
+ - `kui-id` (string): The id of the box's hidden native checkbox, not of the box: a `<label for>` names it. Inside a `Field`, that input takes the field's id instead.
554
604
 
555
605
  Events:
556
606
 
@@ -579,13 +629,25 @@ Attributes and CSS variables, by part:
579
629
  - `data-readonly`: Present when it can be read but not changed.
580
630
  - `data-required`: Present when the form needs it.
581
631
  - `data-parent`: Present on the checkbox that stands for every box of its group.
582
- - indicator: The mark. In the page while the box is checked or indeterminate.
632
+ - `data-touched`: Inside a Field: present once focus has left the control.
633
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
634
+ - `data-filled`: Inside a Field: present while the control has a value.
635
+ - `data-focused`: Inside a Field: present while the control has focus.
636
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
637
+ - `data-invalid`: Inside a Field: present while the value is wrong.
638
+ - indicator: The mark. In the page while the box is checked or indeterminate. `data-indeterminate` and `data-checked` say which mark to draw, a dash or a tick: in CSS (`[data-indeterminate]`), or from the part's state. Through its exit the box is already unchecked, and both are absent.
583
639
  - `data-checked`: Present when it is checked.
584
640
  - `data-unchecked`: Present when it is not checked.
585
641
  - `data-indeterminate`: Present when it is neither checked nor unchecked.
586
642
  - `data-disabled`: Present when it is disabled.
587
643
  - `data-readonly`: Present when it can be read but not changed.
588
644
  - `data-required`: Present when the form needs it.
645
+ - `data-touched`: Inside a Field: present once focus has left the control.
646
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
647
+ - `data-filled`: Inside a Field: present while the control has a value.
648
+ - `data-focused`: Inside a Field: present while the control has focus.
649
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
650
+ - `data-invalid`: Inside a Field: present while the value is wrong.
589
651
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
590
652
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
591
653
 
@@ -601,8 +663,9 @@ Attributes of the element (each also a property, in camel case):
601
663
 
602
664
  - `value` (string): The values of the checked checkboxes, when the caller holds them.
603
665
  - `default-value` (string): The values checked at the start, when the caller does not hold `value`. Read once.
604
- - `all-values` (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.
666
+ - `all-values` (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 goes from the set they were left in to all, then none, then back. Its order names the boxes' elements (`<id>-0` …).
605
667
  - `disabled` (boolean): Disables every checkbox of the group.
668
+ - `kui-id` (string): The group's own id, and what its boxes' elements are named from (`<id>-0`, `<id>-1` …, by their place in `allValues`), which a parent box's `aria-controls` names. Inside a `Field`, the group takes the field's id instead.
606
669
 
607
670
  Events:
608
671
 
@@ -621,7 +684,7 @@ Anatomy:
621
684
 
622
685
  Attributes and CSS variables, by part:
623
686
 
624
- - 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`.
687
+ - root: The group: `role="group"`, with its `id`. Name it with `aria-label`, or `aria-labelledby` naming a heading of your own; inside a `Field`, the field's label names it and its description describes it. A checkbox anywhere inside it with a `value` is checked while the group's value holds it; one marked `parent`, anywhere inside it too, stands for every value of `allValues`, and its `aria-controls` names their boxes.
625
688
  - `data-disabled`: Present when it is disabled.
626
689
 
627
690
  ### Collapsible
@@ -663,6 +726,8 @@ Attributes and CSS variables, by part:
663
726
  - `data-open`: Present when it is open.
664
727
  - `data-closed`: Present when it is closed.
665
728
  - `data-disabled`: Present when it is disabled.
729
+ - `data-starting-style`: Present for the first style of the panel's entrance, as on the panel.
730
+ - `data-ending-style`: Present through the panel's exit, as on the panel.
666
731
  - trigger: The button that opens and closes the panel.
667
732
  - `data-panel-open`: Present when the panel is open.
668
733
  - `data-disabled`: Present when it is disabled.
@@ -674,18 +739,168 @@ Attributes and CSS variables, by part:
674
739
  - `--collapsible-panel-height`: The panel's content height while it opens or closes, `auto` once it is open.
675
740
  - `--collapsible-panel-width`: The panel's content width while it opens or closes, `auto` once it is open.
676
741
 
742
+ ### ColorPicker
743
+
744
+ ```
745
+ import "@kirana-ui/web/color-picker"
746
+ ```
747
+
748
+ `<kui-color-picker>`: `<kui-color-picker>` around `kui-part="root"`, which holds an `area` with its `area-thumb`, a `channel-slider` for each channel it moves (`kui-channel`: `hue` or `alpha`, and `kui-orientation`) holding its `channel-slider-track` and `channel-slider-thumb`, a `channel-input` for each channel typed in (`kui-channel`: `hex`, `red`, `green`, `blue`, `hue`, `saturation`, `lightness`, `alpha`), `swatch`es, `swatch-trigger` buttons for presets (`kui-value`), an `eye-dropper-trigger`, a `value-text` that says the colour and a `format-trigger` that says its format, each unless the page wrote something. The root draws the hidden input a form reads, as its last child. `value`, `default-value`, `format`, `default-format`, `alpha`, `thumb-alignment`, `disabled`, `read-only`, `required`, `name`, `form`; `getAriaValueText` as a property. It tells `value-change`, `value-committed` and `format-change`.
749
+
750
+ Attributes of the element (each also a property, in camel case):
751
+
752
+ - `value` (string): The colour as text in `format`, when the caller holds it. Any format is read.
753
+ - `default-value` (string): Read once. Default `#000000`.
754
+ - `format` (string): How the value is written, when the caller holds it.
755
+ - `default-format` (string): Read once. Default `"hex"`.
756
+ - `alpha` (boolean): Whether the opacity can be chosen. With it, the value always carries its alpha (`#rrggbbaa`, `rgba()`, `hsla()`); without it, never. Default false.
757
+ - `thumb-alignment` (string): Where a thumb is at the ends of its range. `"center"` (the default): its centre on the edge, so half of it lies outside. `"edge"`: its edge on the edge, so it stays inside.
758
+ - `disabled` (boolean): Disabled: it cannot be changed.
759
+ - `read-only` (boolean): Shown as it is, focusable, not changeable; still submitted with the form.
760
+ - `required` (boolean): Needed by the form. A colour always has a value, so this only says so.
761
+ - `name` (string): With a name, the value is submitted with the form around the picker.
762
+ - `form` (string): The id of the form the picker belongs to, when it is not inside it.
763
+
764
+ Properties only:
765
+
766
+ - `getAriaValueText`: What assistive technology reads for a thumb, when the written one is not enough.
767
+
768
+ Events:
769
+
770
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
771
+ - `value-committed`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
772
+ - `format-change`: `event.detail.format`, with `event.detail.details`. `preventDefault()` keeps `format` as it was.
773
+
774
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
775
+
776
+ - `root`
777
+ - `area`
778
+ - `area-thumb`
779
+ - `channel-slider`: `kui-channel`, `kui-orientation`
780
+ - `channel-slider-track`: `kui-channel`, `kui-orientation`
781
+ - `channel-slider-thumb`: `kui-channel`, `kui-orientation`
782
+ - `channel-input`: `kui-channel`
783
+ - `swatch`
784
+ - `swatch-trigger`: `kui-value`
785
+ - `eye-dropper-trigger`
786
+ - `value-text`
787
+ - `format-trigger`
788
+
789
+ Anatomy:
790
+
791
+ ```
792
+ <kui-color-picker>
793
+ root
794
+ area
795
+ area-thumb
796
+ channel-slider (repeated)
797
+ channel-slider-track
798
+ channel-slider-thumb
799
+ channel-slider-thumb (as above)
800
+ channel-input (repeated)
801
+ swatch (repeated)
802
+ swatch-trigger (repeated)
803
+ eye-dropper-trigger
804
+ value-text
805
+ format-trigger
806
+ ```
807
+
808
+ Attributes and CSS variables, by part:
809
+
810
+ - root: Groups the picker's parts. It holds the hidden input a form reads, and the colour for anything inside to paint with.
811
+ - `data-disabled`: Present when it is disabled.
812
+ - `data-readonly`: Present when it can be read but not changed.
813
+ - `data-required`: Present when the form needs a colour.
814
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
815
+ - `data-format="hex | rgb | hsl"`: How the value is written.
816
+ - `--color`: The colour, with its alpha.
817
+ - area: The two-dimensional field a pointer presses and drags on: saturation across, the way the text runs, and brightness up. A design paints it from its hue.
818
+ - `data-disabled`: Present when it is disabled.
819
+ - `data-readonly`: Present when it can be read but not changed.
820
+ - `data-required`: Present when the form needs a colour.
821
+ - `data-dragging`: Present while a pointer holds this part's thumb.
822
+ - `--hue-color`: The colour's hue at full saturation and brightness.
823
+ - areaThumb: What is dragged in the area, and what the arrows move: a slider in two dimensions to assistive technology, its text saying both. Its place is written on it.
824
+ - `data-disabled`: Present when it is disabled.
825
+ - `data-readonly`: Present when it can be read but not changed.
826
+ - `data-required`: Present when the form needs a colour.
827
+ - `data-dragging`: Present while a pointer holds this part's thumb.
828
+ - `--saturation`: Its place across, as a share of the area: the saturation.
829
+ - `--brightness`: Its place up, as a share of the area: the brightness.
830
+ - `--color`: The colour under it, without its alpha.
831
+ - channelSlider: What a pointer presses and drags on to move the hue or the alpha. It holds the track and the thumb. It takes `channel` and `orientation`.
832
+ - `data-disabled`: Present when it is disabled.
833
+ - `data-readonly`: Present when it can be read but not changed.
834
+ - `data-required`: Present when the form needs a colour.
835
+ - `data-dragging`: Present while a pointer holds this part's thumb.
836
+ - `data-channel="hue | alpha"`: The channel the slider moves.
837
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
838
+ - channelSliderTrack: The channel's whole range: what a design paints the hues or the alpha on.
839
+ - `data-disabled`: Present when it is disabled.
840
+ - `data-readonly`: Present when it can be read but not changed.
841
+ - `data-required`: Present when the form needs a colour.
842
+ - `data-dragging`: Present while a pointer holds this part's thumb.
843
+ - `data-channel="hue | alpha"`: The channel the slider moves.
844
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
845
+ - `--color`: The colour without its alpha: the end of an alpha track.
846
+ - `--hue-color`: The colour's hue at full saturation and brightness.
847
+ - channelSliderThumb: What is dragged, and what the keyboard moves: a slider to assistive technology, its range 0 to 360 for the hue and 0 to 100 for the alpha. Its place on the track is written on it.
848
+ - `data-disabled`: Present when it is disabled.
849
+ - `data-readonly`: Present when it can be read but not changed.
850
+ - `data-required`: Present when the form needs a colour.
851
+ - `data-dragging`: Present while a pointer holds this part's thumb.
852
+ - `data-channel="hue | alpha"`: The channel the slider moves.
853
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
854
+ - `--color`: The colour under it: the pure hue, or the colour at its alpha.
855
+ - channelInput: A text input for one channel (`hex`, `red`, `green`, `blue`, `hue`, `saturation`, `lightness`, `alpha`). What is typed is taken when it is a colour or a number in range, and put back when focus leaves while it is not.
856
+ - `data-disabled`: Present when it is disabled.
857
+ - `data-readonly`: Present when it can be read but not changed.
858
+ - `data-required`: Present when the form needs a colour.
859
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
860
+ - `data-channel="hex | red | green | blue | hue | saturation | lightness | alpha"`: The channel the input is typed in.
861
+ - swatch: Shows the current colour.
862
+ - `data-disabled`: Present when it is disabled.
863
+ - `data-readonly`: Present when it can be read but not changed.
864
+ - `data-required`: Present when the form needs a colour.
865
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
866
+ - `--color`: The colour, with its alpha.
867
+ - swatchTrigger: A preset colour, given as `value`: pressed, the colour is this one.
868
+ - `data-disabled`: Present when it is disabled.
869
+ - `data-readonly`: Present when it can be read but not changed.
870
+ - `data-required`: Present when the form needs a colour.
871
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
872
+ - `data-selected`: Present while the colour is this one.
873
+ - `--color`: The preset's colour, with its alpha.
874
+ - eyeDropperTrigger: Picks a colour from the screen with the browser's eye dropper. Hidden where the browser has none, and on a server.
875
+ - `data-disabled`: Present when it is disabled.
876
+ - `data-readonly`: Present when it can be read but not changed.
877
+ - `data-required`: Present when the form needs a colour.
878
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
879
+ - valueText: The colour, written in its format.
880
+ - `data-disabled`: Present when it is disabled.
881
+ - `data-readonly`: Present when it can be read but not changed.
882
+ - `data-required`: Present when the form needs a colour.
883
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
884
+ - `data-format="hex | rgb | hsl"`: How the value is written.
885
+ - formatTrigger: Goes to the next format: hex, then rgb, then hsl.
886
+ - `data-disabled`: Present when it is disabled.
887
+ - `data-readonly`: Present when it can be read but not changed.
888
+ - `data-required`: Present when the form needs a colour.
889
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
890
+ - `data-format="hex | rgb | hsl"`: How the value is written.
891
+
677
892
  ### Combobox
678
893
 
679
894
  ```
680
895
  import "@kirana-ui/web/combobox"
681
896
  ```
682
897
 
683
- `<kui-combobox>`: `<kui-combobox>` around an `input`, with a `trigger` and a `clear` button if it has them, and a `portal` with a `positioner` (`kui-side` … and `kui-anchor`, an element's id) around the `popup`, which holds an `item` for each `kui-value` (`kui-disabled`, `kui-label`, `kui-id`) with an `item-indicator`, in `group`s with a `group-label` and `separator`s if it has them, and an `empty` part drawn while nothing matches. The `input` may be inside the `popup`, the items then in a `list` part: the popup is placed against the `trigger`, and the input has focus while it is open. With `multiple`, the input is in a `chips` part with a `<template kui-each="chips">` holding a `chip` (`{value}`) and its `chip-remove` button. With the input in the popup, the `trigger` may hold a `value` part: it says the chosen value's label, or its `kui-placeholder`. A `status` part says how the list stands to software that reads the page, as the page changes its text. With `items` given as data, the list is a `<template kui-each="collection">` holding an `item` (`kui-value="{value}"`, `{label}`; `kui-when="item"` where groups are given too) or a `group` (`kui-when="group"`, `{value}` its name) with a `<template kui-each="collection">` of its own for its items: the element filters, and draws what is left. With a name it draws the hidden input a form reads. `value`, `default-value`, `input-value`, `default-input-value`, `open`, `default-open`, `disabled`, `read-only`, `required`, `inline`, `auto-highlight`, `multiple`, `values` and `default-values` (with commas between), `name`, `form`; `items` and `filter` as properties; it tells `value-change`, `values-change`, `input-value-change` and `open-change`.
898
+ `<kui-combobox>`: `<kui-combobox>` around an `input`, with a `trigger` and a `clear` button if it has them, and a `portal` with a `positioner` (`kui-side` … and `kui-anchor`, an element's id) around the `popup`, which holds an `item` for each `kui-value` (`kui-disabled`, `kui-label`, `kui-id`) with an `item-indicator`, in `group`s with a `group-label` and `separator`s if it has them, and an `empty` part drawn while nothing matches. The `input` may be inside the `popup`, the items then in a `list` part: the popup is placed against the `trigger`, and the input has focus while it is open. With `multiple`, the input is in a `chips` part with a `<template kui-each="chips">` holding a `chip` (`{value}`) and its `chip-remove` button. With the input in the popup, the `trigger` may hold a `value` part: it says the chosen value's label, or its `kui-placeholder`. A `status` part says how the list stands to software that reads the page, as the page changes its text. With `items` given as data, the list is a `<template kui-each="collection">` holding an `item` (`kui-value="{value}"`, `{label}`; `kui-when="item"` where groups are given too) or a `group` (`kui-when="group"`, `{value}` its name) with a `<template kui-each="collection">` of its own for its items: the element filters, and draws what is left. With a name it draws the hidden input a form reads. `value`, `default-value`, `input-value`, `default-input-value`, `open`, `default-open`, `disabled`, `read-only`, `required`, `inline`, `auto-highlight`, `multiple` (with it, `value` and `default-value` hold the chosen values with commas between; `values` and `default-values`, the older names, are still read), `name`, `form`, `presentation` (`sheet` opens the list from the bottom edge, modal, over a `backdrop` part in the portal; `auto` on a narrow touch screen) and `sheet-below`; `items`, `filter`, `itemToStringLabel` and `itemToStringValue` as properties; it tells `value-change`, `values-change`, `input-value-change` and `open-change`.
684
899
 
685
900
  Attributes of the element (each also a property, in camel case):
686
901
 
687
- - `value` (string): The chosen value; `null` is "none".
688
- - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
902
+ - `value` (string): The chosen value; `null` is "none". With `multiple`, the chosen values, in the order they were chosen.
903
+ - `default-value` (string): The value it starts with (with `multiple`, the values), when the caller does not hold `value`. Read once.
689
904
  - `input-value` (string): What the input says.
690
905
  - `default-input-value` (string): The text the input starts with, when the caller does not hold `inputValue`. Read once.
691
906
  - `open` (boolean): Whether the list is open, when the caller holds it.
@@ -695,16 +910,20 @@ Attributes of the element (each also a property, in camel case):
695
910
  - `required` (boolean): In a field, "none" is then wrong.
696
911
  - `inline` (boolean): The list is always in the page, under the input, with no popup: a command palette. An item chosen is told to the caller, and the input keeps what was typed.
697
912
  - `auto-highlight` (boolean): The first item shown for what was typed is highlighted as one types, so Enter chooses it. Off by default: typing then highlights nothing, and Enter chooses once an arrow or the pointer has gone to an item. Either way a list opened with nothing typed is on its chosen item, if it has one.
698
- - `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`.
699
- - `values` (string): With `multiple`: the chosen values, in the order they were chosen.
700
- - `default-values` (string): With `multiple`: the values it starts with, when the caller does not hold `values`. Read once.
913
+ - `multiple` (boolean): Several values: `value`, `defaultValue` and `onValueChange` then hold a list. Read once.
914
+ - `values` (string): With `multiple`: the chosen values.
915
+ - `default-values` (string): With `multiple`: the values it starts with.
701
916
  - `name` (string): With a name, the value is submitted with the form around it.
702
917
  - `form` (string): The id of the form the control belongs to, when it is not inside it.
918
+ - `presentation` (string): How the list opens. `"sheet"`: from the bottom edge, not placed against the input, modal with a backdrop, swiped down or pressed outside to close; the input then goes in the popup, at its head. `"auto"`: decided each time it opens, a sheet when the pointer is coarse and the viewport narrower than `sheetBelow`. Default `"popup"`. Not with `inline`.
919
+ - `sheet-below` (number): With `presentation: "auto"`: the viewport's width, in CSS pixels, under which a coarse pointer opens a sheet. Default 640.
703
920
 
704
921
  Properties only:
705
922
 
706
923
  - `items`: 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.
707
924
  - `filter`: 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).
925
+ - `itemToStringLabel`: For values that are objects: the text the input shows for one, and what an item drawn with no text of its own is filtered by. Without it, an object's own `label` names it, then the label `items` gives it, then the item's text in the markup.
926
+ - `itemToStringValue`: For values that are objects: the text the form is sent for one. Without it, the `value` of an object shaped `{ value, label }` is sent, and any other object as JSON.
708
927
 
709
928
  Events:
710
929
 
@@ -732,6 +951,7 @@ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
732
951
  - `chip`
733
952
  - `chip-remove`
734
953
  - `item-indicator`: `kui-value`
954
+ - `backdrop`
735
955
 
736
956
  Lists (`<template kui-each="…">`): `chips`, `collection`.
737
957
 
@@ -743,6 +963,7 @@ Anatomy:
743
963
  trigger
744
964
  value (optional)
745
965
  portal
966
+ backdrop (optional)
746
967
  positioner
747
968
  popup
748
969
  input (as above)
@@ -772,37 +993,85 @@ Attributes and CSS variables, by part:
772
993
 
773
994
  - 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.
774
995
  - `data-popup-open`: Present when the list is open.
996
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
997
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
998
+ - `data-list-empty`: Present when no item is shown for what was typed, once the list is in the page.
775
999
  - `data-disabled`: Present when it is disabled.
776
1000
  - `data-readonly`: Present when it can be read but not changed.
1001
+ - `data-required`: Present when the form needs it.
1002
+ - `data-touched`: Inside a Field: present once focus has left the control.
1003
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
1004
+ - `data-filled`: Inside a Field: present while the control has a value.
1005
+ - `data-focused`: Inside a Field: present while the control has focus.
1006
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
1007
+ - `data-invalid`: Inside a Field: present while the value is wrong.
777
1008
  - 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.
778
1009
  - `data-popup-open`: Present when the list is open.
1010
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
1011
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
1012
+ - `data-list-empty`: Present when no item is shown for what was typed, once the list is in the page.
779
1013
  - `data-disabled`: Present when it is disabled.
780
1014
  - `data-readonly`: Present when it can be read but not changed.
781
- - 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.
1015
+ - `data-required`: Present when the form needs it.
1016
+ - `data-touched`: Inside a Field: present once focus has left the control.
1017
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
1018
+ - `data-filled`: Inside a Field: present while the control has a value.
1019
+ - `data-focused`: Inside a Field: present while the control has focus.
1020
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
1021
+ - `data-invalid`: Inside a Field: present while the value is wrong.
1022
+ - backdrop: The layer over the page behind the list: a press on it closes the list.
1023
+ - `data-open`: Present when it is open.
1024
+ - `data-closed`: Present when it is closed.
1025
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1026
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1027
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
1028
+ - `data-swiping`: Present while the sheet is dragged.
1029
+ - `data-swipe-dismiss`: Present once a drag has closed it.
1030
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
1031
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
1032
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
1033
+ - 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. As a sheet it is not placed, and carries none.
782
1034
  - `data-open`: Present when it is open.
783
1035
  - `data-closed`: Present when it is closed.
784
1036
  - `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.
785
1037
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1038
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
1039
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1040
+ - `data-empty`: Present when no item is shown for what was typed.
786
1041
  - `--anchor-width`: The anchor's width.
787
1042
  - `--anchor-height`: The anchor's height.
788
1043
  - `--available-width`: The width between the anchor and the edge of the viewport.
789
1044
  - `--available-height`: The height between the anchor and the edge of the viewport.
790
1045
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
791
- - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list.
1046
+ - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list. As a sheet, a design moves it by what it says of the drag, and gives it `touch-action: none` where a finger drags it.
792
1047
  - `data-open`: Present when it is open.
793
1048
  - `data-closed`: Present when it is closed.
794
1049
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
795
1050
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
796
1051
  - `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.
797
1052
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1053
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
1054
+ - `data-swiping`: Present while the sheet is dragged.
1055
+ - `data-swipe-dismiss`: Present once a drag has closed it.
1056
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
798
1057
  - `data-empty`: Present when no item is shown for what was typed.
1058
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
1059
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
1060
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
1061
+ - `--drawer-swipe-strength`: As a sheet, once let go: 0.1 to 1, the share of the design's own time it should take to come to rest.
799
1062
  - list: The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
800
1063
  - `data-empty`: Present when no item is shown for what was typed.
801
1064
  - item: One choice in the list.
802
1065
  - `data-selected`: Present on the chosen item.
803
1066
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
804
1067
  - `data-disabled`: Present when it is disabled.
805
- - clear: A button that empties the input and the value.
1068
+ - clear: A button that empties the input and the value. It is in the page while there is something to clear (the text, for an autocomplete; else what is chosen), and through its exit; `keepMounted` keeps it there.
1069
+ - `data-disabled`: Present when it is disabled.
1070
+ - `data-popup-open`: Present when the list is open.
1071
+ - `data-visible`: Present while there is something to clear.
1072
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1073
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1074
+ - chip: One chosen value. The arrows reach it from the start of the input, and Backspace or Delete on it takes it away.
806
1075
  - `data-disabled`: Present when it is disabled.
807
1076
  - chipRemove: A chip's button that takes its value away.
808
1077
  - `data-disabled`: Present when it is disabled.
@@ -813,7 +1082,7 @@ Attributes and CSS variables, by part:
813
1082
  import "@kirana-ui/web/command"
814
1083
  ```
815
1084
 
816
- `<kui-command>`: `<kui-command>` around `kui-part="root"`, an `input` and a `list` of `item`s (`kui-value`, `kui-disabled`, `kui-label`, `kui-keywords` with commas between, `kui-id`), in `group`s with a `group-heading` and `separator`s (`kui-always-render`) if it has them, and an `empty` part drawn while nothing matches. What is typed filters the list; Enter or a press runs an item. `input-value`, `default-input-value`, `loop`, `auto-highlight` (on unless `="false"`), `disabled`; `filter` as a property; it tells `input-value-change` and `select`.
1085
+ `<kui-command>`: `<kui-command>` around `kui-part="root"`, an `input` and a `list` of `item`s (`kui-value`, its `kui-label` or its text when left out, `kui-disabled`, `kui-label`, `kui-keywords` with commas between, `kui-id`), in `group`s with a `group-heading` and `separator`s (`kui-always-render`) if it has them, and an `empty` part drawn while nothing matches. What is typed filters the list; Enter or a press runs an item. `input-value`, `default-input-value`, `loop`, `auto-highlight` (on unless `="false"`), `disabled`; `filter` as a property; it tells `input-value-change` and `select`.
817
1086
 
818
1087
  Attributes of the element (each also a property, in camel case):
819
1088
 
@@ -887,13 +1156,13 @@ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
887
1156
  - `popup`
888
1157
  - `arrow`
889
1158
  - `separator`
890
- - `item`: `kui-close-on-click`, `kui-disabled`, `kui-label`
1159
+ - `item`: `kui-close-on-click`, `kui-close-on-select`, `kui-disabled`, `kui-label`
891
1160
  - `group`: `kui-id`
892
1161
  - `group-label`
893
1162
  - `checkbox-item`
894
1163
  - `checkbox-item-indicator`
895
1164
  - `radio-group`
896
- - `radio-item`: `kui-close-on-click`, `kui-disabled`, `kui-label`, `kui-value`
1165
+ - `radio-item`: `kui-close-on-click`, `kui-close-on-select`, `kui-disabled`, `kui-label`, `kui-value`
897
1166
  - `radio-item-indicator`: `kui-value`
898
1167
  - `trigger`
899
1168
 
@@ -924,16 +1193,20 @@ Attributes and CSS variables, by part:
924
1193
 
925
1194
  - trigger: The area a secondary press, or a long press on a touch screen, opens the menu in.
926
1195
  - `data-popup-open`: Present when the menu is open.
1196
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
927
1197
  - positioner: Places the menu against its trigger. It carries the geometry.
928
1198
  - `data-open`: Present when it is open.
929
1199
  - `data-closed`: Present when it is closed.
930
1200
  - `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.
931
1201
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1202
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
932
1203
  - `--anchor-width`: The anchor's width.
933
1204
  - `--anchor-height`: The anchor's height.
934
1205
  - `--available-width`: The width between the anchor and the edge of the viewport.
935
1206
  - `--available-height`: The height between the anchor and the edge of the viewport.
936
1207
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1208
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
1209
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
937
1210
  - popup: The menu itself: the list of items.
938
1211
  - `data-open`: Present when it is open.
939
1212
  - `data-closed`: Present when it is closed.
@@ -941,7 +1214,10 @@ Attributes and CSS variables, by part:
941
1214
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
942
1215
  - `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.
943
1216
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1217
+ - `data-instant="click | dismiss | group"`: Present when it opened or closed in a way that should skip the motion: `click` when the keyboard pressed its trigger or an item, `dismiss` when Escape closed it, `group` when focus or the pointer went from one menu of a bar to another.
944
1218
  - arrow: An element that points at the trigger.
1219
+ - `data-open`: Present when it is open.
1220
+ - `data-closed`: Present when it is closed.
945
1221
  - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
946
1222
  - `data-align="start | center | end"`: How it is aligned with the anchor.
947
1223
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
@@ -980,7 +1256,7 @@ Attributes and CSS variables, by part:
980
1256
  import "@kirana-ui/web/date-field"
981
1257
  ```
982
1258
 
983
- `<kui-date-field>`: `<kui-date-field>` around `kui-part="root"`, which holds a `<template kui-each="segments">` with the `segment` each part of the date is typed in (`{type}` and `{index}` say which), and the hidden `input` a form reads. `value`, `default-value`, `locale`, `min`, `max`, `disabled`, `read-only`, `required`, `name`, `form`; `placeholders` as a property; it tells `value-change`.
1259
+ `<kui-date-field>`: `<kui-date-field>` around `kui-part="root"`, which holds a `<template kui-each="segments">` with the `segment` each part of the date is typed in (`{type}` and `{index}` say which), and the hidden `input` a form reads. `value`, `default-value`, `locale`, `min`, `max`, `disabled`, `read-only`, `required`, `name`, `form`; `placeholders` and `calendarSystem` (an instance from `@internationalized/date`) as properties; it tells `value-change`.
984
1260
 
985
1261
  Attributes of the element (each also a property, in camel case):
986
1262
 
@@ -997,7 +1273,8 @@ Attributes of the element (each also a property, in camel case):
997
1273
 
998
1274
  Properties only:
999
1275
 
1000
- - `placeholders`: What an empty part shows. Default: `dd`, `mm`, `yyyy`.
1276
+ - `placeholders`: What an empty part shows. Default: `dd`, `mm`, `yyyy`, `era`.
1277
+ - `calendarSystem`: The calendar its parts are typed in, when it is not the Gregorian one: an instance from `@internationalized/date` (`new PersianCalendar()`), as a calendar takes it. Its days, months, years and eras are the parts' ranges; the value is still an ISO day. In a calendar with several eras (Japanese, Minguo, Ethiopic), the era is a part of its own.
1001
1278
 
1002
1279
  Events:
1003
1280
 
@@ -1028,7 +1305,7 @@ Attributes and CSS variables, by part:
1028
1305
  - `data-readonly`: Present when its value cannot be changed.
1029
1306
  - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1030
1307
  - segment: One piece of the date: a part that is typed, or what stands between two.
1031
- - `data-segment="day | month | year | literal"`: Which piece it is.
1308
+ - `data-segment="era | day | month | year | literal"`: Which piece it is: the era only in a calendar of several eras.
1032
1309
  - `data-placeholder`: Present on a part that is empty.
1033
1310
  - `data-disabled`: Present when it is disabled.
1034
1311
  - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
@@ -1039,18 +1316,19 @@ Attributes and CSS variables, by part:
1039
1316
  import "@kirana-ui/web/date-picker"
1040
1317
  ```
1041
1318
 
1042
- `<kui-date-picker>`: `<kui-date-picker>`: a date field and a calendar in a popover that are one value. A `kui-part="field"` with a date field's `segments` template and `input`; a `trigger` button; and a `portal` with a `positioner` around the `popup`, which holds the `calendar` with a calendar's parts and templates. `value`, `default-value`, `open`, `default-open`, `locale`, `min`, `max`, `calendar-system`, `fixed-weeks`, `months` (each drawn in a `<template kui-each="months">`), `paged-navigation`, `month`, `default-month`, `disabled`, `read-only`, `required`, `name`, `form`; `isDateUnavailable` and `placeholders` as properties; it tells `value-change`, `open-change` and `month-change`.
1319
+ `<kui-date-picker>`: `<kui-date-picker>`: a date field and a calendar in a popover that are one value. A `kui-part="field"` with a date field's `segments` template and `input` (with `mode="range"`, two: `kui-range="start"` and `kui-range="end"`); a `trigger` button; a `clear` button and `preset` buttons (`kui-value`: a day, or a range's first and last with a comma between); and a `portal` with a `positioner` around the `popup`, which holds the `calendar` with a calendar's parts and templates. `value` (a range as a preset's), `default-value`, `mode`, `open`, `default-open`, `locale`, `min`, `max`, `calendar-system`, `fixed-weeks`, `months` (each drawn in a `<template kui-each="months">`), `paged-navigation`, `month`, `default-month`, `disabled`, `read-only`, `required`, `name`, `form`; `isDateUnavailable` and `placeholders` as properties; it tells `value-change`, `open-change` and `month-change`.
1043
1320
 
1044
1321
  Attributes of the element (each also a property, in camel case):
1045
1322
 
1046
- - `value` (string): The day, typed or picked; `null` for none.
1323
+ - `value` (string): The day, typed or picked; with `mode: "range"` a first and a last day, each typed in its own field or both picked in the one calendar. `null` for none.
1047
1324
  - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
1325
+ - `mode` (string): One day (the default), or a first and a last (`"range"`): two fields, `DatePicker.Field` with `range="start"` and `range="end"`, and the calendar in range mode, which stays open until the range is whole. Read once.
1048
1326
  - `open` (boolean): Whether the calendar is open, when the caller holds it.
1049
1327
  - `default-open` (boolean): Whether the calendar starts open, when the caller does not hold `open`. Read once.
1050
1328
  - `locale` (string): The language and region of the field and the calendar. Give it: a server does not know.
1051
1329
  - `min` (string): The first and the last day that can be typed or picked.
1052
1330
  - `max` (string): The last day that can be typed or picked.
1053
- - `calendar-system` (string): The calendar its months are laid out in, when it is not the Gregorian one.
1331
+ - `calendar-system` (string): The calendar its months are laid out in and its field typed in, when it is not the Gregorian one. The value is an ISO day whatever it is.
1054
1332
  - `fixed-weeks` (boolean): Always six rows of days.
1055
1333
  - `months` (number): How many months the calendar shows side by side (1 by default).
1056
1334
  - `paged-navigation` (boolean): With several `months`: whether Previous and Next turn them all rather than one month.
@@ -1058,7 +1336,7 @@ Attributes of the element (each also a property, in camel case):
1058
1336
  - `default-month` (string): The month the calendar starts on, when the caller does not hold `month`. Read once.
1059
1337
  - `disabled` (boolean): Disabled: it cannot be changed.
1060
1338
  - `read-only` (boolean): Shown as it is, focusable, not changeable.
1061
- - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid.
1339
+ - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid, and the day picked, pressed again in the calendar, stays picked. Without it, that press empties the field and closes the calendar.
1062
1340
  - `name` (string): The name it is submitted under.
1063
1341
  - `form` (string): The id of the form it belongs to, when it is not inside it.
1064
1342
 
@@ -1075,7 +1353,7 @@ Events:
1075
1353
 
1076
1354
  Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1077
1355
 
1078
- - `field`
1356
+ - `field`: `kui-range`
1079
1357
  - `segment`
1080
1358
  - `input`
1081
1359
  - `trigger`
@@ -1089,6 +1367,8 @@ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1089
1367
  - `head-cell`
1090
1368
  - `cell`
1091
1369
  - `day`
1370
+ - `clear`
1371
+ - `preset`: `kui-value`
1092
1372
 
1093
1373
  Lists (`<template kui-each="…">`): `segments`, `weekdays`, `months`, `weeks`, `days`.
1094
1374
 
@@ -1096,7 +1376,7 @@ Anatomy:
1096
1376
 
1097
1377
  ```
1098
1378
  <kui-date-picker>
1099
- field
1379
+ field (repeated)
1100
1380
  <template kui-each="segments">
1101
1381
  segment (repeated)
1102
1382
  input
@@ -1116,31 +1396,37 @@ Anatomy:
1116
1396
  day
1117
1397
  previous
1118
1398
  next
1399
+ clear (optional)
1400
+ preset (optional, repeated)
1119
1401
  ```
1120
1402
 
1121
1403
  Attributes and CSS variables, by part:
1122
1404
 
1123
- - field: The field: a group of the date's parts.
1405
+ - field: The field a day is typed in: with `mode: "range"`, one for the first day (`range="start"`) and one for the last (`range="end"`).
1124
1406
  - `data-disabled`: Present when it is disabled.
1125
1407
  - `data-readonly`: Present when its value cannot be changed.
1126
1408
  - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1127
1409
  - segment: One piece of the date: a part that is typed, or what stands between two.
1128
- - `data-segment="day | month | year | literal"`: Which piece it is.
1410
+ - `data-segment="era | day | month | year | literal"`: Which piece it is: the era only in a calendar of several eras.
1129
1411
  - `data-placeholder`: Present on a part that is empty.
1130
1412
  - `data-disabled`: Present when it is disabled.
1131
1413
  - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1132
1414
  - trigger: The button that opens the popover, and what it is placed against.
1133
1415
  - `data-popup-open`: Present when the popover is open.
1416
+ - `data-pressed`: Present while the popover a press on this trigger opened is open: it stays pressed, as a button held down.
1134
1417
  - positioner: Places the popup against the trigger. It carries the geometry.
1135
1418
  - `data-open`: Present when it is open.
1136
1419
  - `data-closed`: Present when it is closed.
1137
1420
  - `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.
1138
1421
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1422
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1139
1423
  - `--anchor-width`: The anchor's width.
1140
1424
  - `--anchor-height`: The anchor's height.
1141
1425
  - `--available-width`: The width between the anchor and the edge of the viewport.
1142
1426
  - `--available-height`: The height between the anchor and the edge of the viewport.
1143
1427
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1428
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
1429
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
1144
1430
  - popup: The popover itself.
1145
1431
  - `data-open`: Present when it is open.
1146
1432
  - `data-closed`: Present when it is closed.
@@ -1148,6 +1434,9 @@ Attributes and CSS variables, by part:
1148
1434
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1149
1435
  - `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.
1150
1436
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1437
+ - `data-instant="click | dismiss"`: Present when it opened or closed in a way that should skip the motion: `click` when the keyboard pressed the trigger, `dismiss` when Escape closed it.
1438
+ - `--popup-width`: Its width: `auto`, and while its content changes size, the old width and then the new one, for a transition between them.
1439
+ - `--popup-height`: Its height: `auto`, and while its content changes size, the old height and then the new one, for a transition between them.
1151
1440
  - calendar: The calendar.
1152
1441
  - `data-disabled`: Present when it is disabled.
1153
1442
  - `data-readonly`: Present when its value cannot be changed.
@@ -1156,21 +1445,26 @@ Attributes and CSS variables, by part:
1156
1445
  - next: Shows the month after.
1157
1446
  - `data-disabled`: Present when it is disabled.
1158
1447
  - cell: A day's cell.
1159
- - `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.
1448
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Also on a copy of one (a day of the month before or after, shown in its own month too), which is drawn as the day is but has no aria-selected.
1160
1449
  - `data-today`: Present on today.
1161
1450
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1162
1451
  - `data-disabled`: Present when it is disabled.
1163
1452
  - `data-unavailable`: Present on a day that cannot be chosen.
1164
- - `data-range-start`: Present on the first day of a range.
1165
- - `data-range-end`: Present on the last day of a range.
1453
+ - `data-range-start`: Present on the first day of a range, and on a copy of it.
1454
+ - `data-range-end`: Present on the last day of a range, and on a copy of it.
1166
1455
  - day: The button for a day.
1167
- - `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.
1456
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Also on a copy of one (a day of the month before or after, shown in its own month too), which is drawn as the day is but has no aria-selected.
1168
1457
  - `data-today`: Present on today.
1169
1458
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1170
1459
  - `data-disabled`: Present when it is disabled.
1171
1460
  - `data-unavailable`: Present on a day that cannot be chosen.
1172
- - `data-range-start`: Present on the first day of a range.
1173
- - `data-range-end`: Present on the last day of a range.
1461
+ - `data-range-start`: Present on the first day of a range, and on a copy of it.
1462
+ - `data-range-end`: Present on the last day of a range, and on a copy of it.
1463
+ - clear: Empties the value, and gives focus to the field. Disabled while there is none.
1464
+ - `data-disabled`: Present when it is disabled.
1465
+ - preset: Makes the value the day, or the range, it is given. Pressed while the value is that.
1466
+ - `data-pressed`: Present while the value is the one it gives.
1467
+ - `data-disabled`: Present when it is disabled.
1174
1468
 
1175
1469
  ### Dialog
1176
1470
 
@@ -1178,13 +1472,15 @@ Attributes and CSS variables, by part:
1178
1472
  import "@kirana-ui/web/dialog"
1179
1473
  ```
1180
1474
 
1181
- `<kui-dialog>`: `<kui-dialog>` around a `kui-part="trigger"` button and a `portal`, which is drawn at the end of the page while the dialog is open and holds its `backdrop` and its `popup`, with a `title`, a `description` and a `close` button. A long dialog's popup is in a `viewport`, which scrolls. `open`, `default-open`, `modal`, `dismissible`; it tells `open-change`.
1475
+ `<kui-dialog>`: `<kui-dialog>` around a `kui-part="trigger"` button and a `portal`, which is drawn at the end of the page while the dialog is open and holds its `backdrop` and its `popup`, with a `title`, a `description` and a `close` button. The trigger and the close take `kui-disabled`. A long dialog's popup is in a `viewport`, which scrolls. `open`, `default-open`, `modal`, `disable-pointer-dismissal` (`close-on-outside-press` and `dismissible`, the other way round, its old names, still read); it tells `open-change`.
1182
1476
 
1183
1477
  Attributes of the element (each also a property, in camel case):
1184
1478
 
1185
1479
  - `open` (boolean): Whether it is open, when the caller holds it.
1186
1480
  - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
1187
1481
  - `modal` (boolean): Blocks the page behind it and traps focus. Default `true`.
1482
+ - `disable-pointer-dismissal` (boolean): Keeps it open when the pointer presses outside it. Default `false`. Escape always closes it: a caller who must keep it open cancels the change whose `details.reason` is `"escape-key"`.
1483
+ - `close-on-outside-press` (boolean): Whether a press outside closes it. Default `true`.
1188
1484
  - `dismissible` (boolean): Whether a press outside closes it. Default `true`.
1189
1485
 
1190
1486
  Events:
@@ -1219,6 +1515,7 @@ Attributes and CSS variables, by part:
1219
1515
 
1220
1516
  - trigger: The button that opens the dialog.
1221
1517
  - `data-popup-open`: Present when the dialog is open.
1518
+ - `data-disabled`: Present when it is disabled.
1222
1519
  - backdrop: The layer over the page behind the dialog.
1223
1520
  - `data-open`: Present when it is open.
1224
1521
  - `data-closed`: Present when it is closed.
@@ -1236,8 +1533,11 @@ Attributes and CSS variables, by part:
1236
1533
  - `data-closed`: Present when it is closed.
1237
1534
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1238
1535
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1536
+ - `data-nested`: Present when the dialog opened over another dialog.
1239
1537
  - `data-nested-dialog-open`: Present when another dialog is open above this one.
1240
1538
  - `--nested-dialogs`: How many dialogs are open above this one.
1539
+ - close: A button that closes the dialog.
1540
+ - `data-disabled`: Present when it is disabled.
1241
1541
 
1242
1542
  ### Drawer
1243
1543
 
@@ -1245,13 +1545,15 @@ Attributes and CSS variables, by part:
1245
1545
  import "@kirana-ui/web/drawer"
1246
1546
  ```
1247
1547
 
1248
- `<kui-drawer>`: `<kui-drawer>`: a dialog that comes from an edge and is dragged back to it, with the dialog's parts. `open`, `default-open`, `modal`, `dismissible`, `swipe-direction`, `snap-points` (with commas between: `0.4,1` or `200px,1`), `snap-point`, `default-snap-point`; it tells `open-change` and `snap-point-change`.
1548
+ `<kui-drawer>`: `<kui-drawer>`: a dialog that comes from an edge and is dragged back to it, with the dialog's parts. `open`, `default-open`, `modal`, `disable-pointer-dismissal` (`close-on-outside-press` and `dismissible`, the other way round, its old names, still read), `swipe-direction`, `snap-points` (with commas between: `0.4,1` or `200px,1`), `snap-point`, `default-snap-point`; it tells `open-change` and `snap-point-change`.
1249
1549
 
1250
1550
  Attributes of the element (each also a property, in camel case):
1251
1551
 
1252
1552
  - `open` (boolean): Whether it is open, when the caller holds it.
1253
1553
  - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
1254
1554
  - `modal` (boolean): Blocks the page behind it and traps focus. Default `true`.
1555
+ - `disable-pointer-dismissal` (boolean): Keeps it open when the pointer presses outside it. Default `false`. Escape always closes it: a caller who must keep it open cancels the change whose `details.reason` is `"escape-key"`.
1556
+ - `close-on-outside-press` (boolean): Whether a press outside closes it. Default `true`.
1255
1557
  - `dismissible` (boolean): Whether a press outside closes it. Default `true`.
1256
1558
  - `swipe-direction` (string): The way it is dragged to close it: the edge it came from. Default: `"down"`.
1257
1559
  - `snap-points` (string): Places it rests at, each how much of itself shows: a share (`0.4`, or `"40%"`) or a length (`"148px"`, `"20rem"`). `[0.4, 1]` is a drawer that opens two fifths shown and is dragged up to the whole. Without any, it is whole.
@@ -1289,21 +1591,26 @@ Attributes and CSS variables, by part:
1289
1591
 
1290
1592
  - trigger: The button that opens the dialog.
1291
1593
  - `data-popup-open`: Present when the dialog is open.
1594
+ - `data-disabled`: Present when it is disabled.
1292
1595
  - backdrop: The layer over the page behind the dialog.
1293
1596
  - `data-open`: Present when it is open.
1294
1597
  - `data-closed`: Present when it is closed.
1295
1598
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1296
1599
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1297
1600
  - `data-swiping`: Present while the drawer is dragged.
1601
+ - `data-swipe-dismiss`: Present once a drag has closed the drawer.
1298
1602
  - `--drawer-swipe-movement-x`: How far it has been dragged across.
1299
1603
  - `--drawer-swipe-movement-y`: How far it has been dragged up or down.
1300
1604
  - `--drawer-swipe-progress`: How far it has been dragged, of its own size: 0 to 1.
1301
1605
  - `--drawer-snap-point-offset`: How far from whole it rests, towards the edge it closes at: 0px at its largest snap point.
1606
+ - `--drawer-swipe-strength`: Always 1: the backdrop takes the design's own time to leave, however the drawer was thrown.
1607
+ - `--drawer-height`: While the drawer is dragged: the height of the drawer in front.
1302
1608
  - popup: The drawer. A design moves it by what it says of the drag, and gives it `touch-action: none` where a finger drags it.
1303
1609
  - `data-open`: Present when it is open.
1304
1610
  - `data-closed`: Present when it is closed.
1305
1611
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1306
1612
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1613
+ - `data-nested`: Present when the dialog opened over another dialog.
1307
1614
  - `data-nested-dialog-open`: Present when another dialog is open above this one.
1308
1615
  - `data-swiping`: Present while the drawer is dragged.
1309
1616
  - `data-swipe-direction="up | down | left | right"`: The way it is dragged to close it.
@@ -1321,6 +1628,127 @@ Attributes and CSS variables, by part:
1321
1628
  - `--drawer-frontmost-height`: The height of the drawer in front of every other, while this one is open.
1322
1629
  - `--drawer-swipe-strength`: Once let go: 0.1 to 1, the share of the design's own time it should take to come to rest. A drawer thrown hard arrives sooner.
1323
1630
  - `--drawer-width`: Its width.
1631
+ - close: A button that closes the dialog.
1632
+ - `data-disabled`: Present when it is disabled.
1633
+
1634
+ ### Editable
1635
+
1636
+ ```
1637
+ import "@kirana-ui/web/editable"
1638
+ ```
1639
+
1640
+ `<kui-editable>`: `<kui-editable>` around `kui-part="root"`, a `preview`, which says the text (or the placeholder while there is none) unless the page gave it something to say, an `input` or a textarea, and `edit-trigger`, `submit-trigger` and `cancel-trigger` buttons. The input's id is the element's `kui-id`. `value`, `default-value`, `editing`, `default-editing`, `placeholder`, `activation`, `submit-on-blur`, `select-on-focus`, `disabled`, `read-only`, `required`, `name`, `form`; it tells `value-change` and `editing-change`. Inside a `<kui-field>` its input is the field's control.
1641
+
1642
+ Attributes of the element (each also a property, in camel case):
1643
+
1644
+ - `value` (string): The text it holds: what the preview shows, and what editing starts from.
1645
+ - `default-value` (string): The text it starts with, when the caller does not hold `value`. Read once.
1646
+ - `editing` (boolean): Whether it is being edited, when the caller holds it.
1647
+ - `default-editing` (boolean): Read once.
1648
+ - `placeholder` (string): What the preview shows while the text is empty.
1649
+ - `activation` (string): What on the preview starts an edit: focus reaching it (the default), a press, two presses, or nothing, where only the edit trigger does.
1650
+ - `submit-on-blur` (boolean): Whether focus leaving the input keeps the edit (the default) or drops it.
1651
+ - `select-on-focus` (boolean): Whether the text is selected as editing starts. Default `true`.
1652
+ - `disabled` (boolean): Disabled: it cannot be edited.
1653
+ - `read-only` (boolean): Shown as it is, not editable.
1654
+ - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid.
1655
+ - `name` (string): With a name, the text is submitted with the form around it; in a `Field`, the field's by default.
1656
+ - `form` (string): The id of the form the input belongs to, when it is not inside it.
1657
+
1658
+ Events:
1659
+
1660
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
1661
+ - `editing-change`: `event.detail.editing`, with `event.detail.details`. `preventDefault()` keeps `editing` as it was.
1662
+
1663
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1664
+
1665
+ - `root`
1666
+ - `preview`
1667
+ - `input`
1668
+ - `edit-trigger`
1669
+ - `submit-trigger`
1670
+ - `cancel-trigger`
1671
+
1672
+ Anatomy:
1673
+
1674
+ ```
1675
+ <kui-editable>
1676
+ root
1677
+ preview
1678
+ input
1679
+ edit-trigger (optional)
1680
+ submit-trigger (optional)
1681
+ cancel-trigger (optional)
1682
+ ```
1683
+
1684
+ Attributes and CSS variables, by part:
1685
+
1686
+ - root: A text edited in place.
1687
+ - `data-editing`: Present while it is being edited.
1688
+ - `data-disabled`: Present when it is disabled.
1689
+ - `data-readonly`: Present when it is shown and cannot be edited.
1690
+ - `data-placeholder`: Present while it holds no text.
1691
+ - `data-touched`: In a field: present once focus has left it.
1692
+ - `data-dirty`: In a field: present while the text is not the one it began with.
1693
+ - `data-filled`: In a field: present while it holds text.
1694
+ - `data-focused`: In a field: present while it has focus.
1695
+ - `data-valid`: In a field: present once the text was checked and found right.
1696
+ - `data-invalid`: In a field: present while the text is wrong.
1697
+ - preview: The text as it reads, or the placeholder while there is none: hidden while editing.
1698
+ - `data-editing`: Present while it is being edited.
1699
+ - `data-disabled`: Present when it is disabled.
1700
+ - `data-readonly`: Present when it is shown and cannot be edited.
1701
+ - `data-placeholder`: Present while it holds no text.
1702
+ - `data-touched`: In a field: present once focus has left it.
1703
+ - `data-dirty`: In a field: present while the text is not the one it began with.
1704
+ - `data-filled`: In a field: present while it holds text.
1705
+ - `data-focused`: In a field: present while it has focus.
1706
+ - `data-valid`: In a field: present once the text was checked and found right.
1707
+ - `data-invalid`: In a field: present while the text is wrong.
1708
+ - input: Where the text is typed, an `<input>` or a `<textarea>`: hidden unless editing.
1709
+ - `data-editing`: Present while it is being edited.
1710
+ - `data-disabled`: Present when it is disabled.
1711
+ - `data-readonly`: Present when it is shown and cannot be edited.
1712
+ - `data-placeholder`: Present while it holds no text.
1713
+ - `data-touched`: In a field: present once focus has left it.
1714
+ - `data-dirty`: In a field: present while the text is not the one it began with.
1715
+ - `data-filled`: In a field: present while it holds text.
1716
+ - `data-focused`: In a field: present while it has focus.
1717
+ - `data-valid`: In a field: present once the text was checked and found right.
1718
+ - `data-invalid`: In a field: present while the text is wrong.
1719
+ - editTrigger: Starts an edit: hidden while editing.
1720
+ - `data-editing`: Present while it is being edited.
1721
+ - `data-disabled`: Present when it is disabled.
1722
+ - `data-readonly`: Present when it is shown and cannot be edited.
1723
+ - `data-placeholder`: Present while it holds no text.
1724
+ - `data-touched`: In a field: present once focus has left it.
1725
+ - `data-dirty`: In a field: present while the text is not the one it began with.
1726
+ - `data-filled`: In a field: present while it holds text.
1727
+ - `data-focused`: In a field: present while it has focus.
1728
+ - `data-valid`: In a field: present once the text was checked and found right.
1729
+ - `data-invalid`: In a field: present while the text is wrong.
1730
+ - submitTrigger: Keeps what was typed: hidden unless editing.
1731
+ - `data-editing`: Present while it is being edited.
1732
+ - `data-disabled`: Present when it is disabled.
1733
+ - `data-readonly`: Present when it is shown and cannot be edited.
1734
+ - `data-placeholder`: Present while it holds no text.
1735
+ - `data-touched`: In a field: present once focus has left it.
1736
+ - `data-dirty`: In a field: present while the text is not the one it began with.
1737
+ - `data-filled`: In a field: present while it holds text.
1738
+ - `data-focused`: In a field: present while it has focus.
1739
+ - `data-valid`: In a field: present once the text was checked and found right.
1740
+ - `data-invalid`: In a field: present while the text is wrong.
1741
+ - cancelTrigger: Drops what was typed: hidden unless editing.
1742
+ - `data-editing`: Present while it is being edited.
1743
+ - `data-disabled`: Present when it is disabled.
1744
+ - `data-readonly`: Present when it is shown and cannot be edited.
1745
+ - `data-placeholder`: Present while it holds no text.
1746
+ - `data-touched`: In a field: present once focus has left it.
1747
+ - `data-dirty`: In a field: present while the text is not the one it began with.
1748
+ - `data-filled`: In a field: present while it holds text.
1749
+ - `data-focused`: In a field: present while it has focus.
1750
+ - `data-valid`: In a field: present once the text was checked and found right.
1751
+ - `data-invalid`: In a field: present while the text is wrong.
1324
1752
 
1325
1753
  ### Field
1326
1754
 
@@ -1358,7 +1786,7 @@ Anatomy:
1358
1786
  label
1359
1787
  control
1360
1788
  description
1361
- error
1789
+ error (repeated)
1362
1790
  ```
1363
1791
 
1364
1792
  Attributes and CSS variables, by part:
@@ -1395,7 +1823,7 @@ Attributes and CSS variables, by part:
1395
1823
  - `data-focused`: Present while the control has focus.
1396
1824
  - `data-valid`: Present once the value has been checked and found right.
1397
1825
  - `data-invalid`: Present while the value is wrong.
1398
- - error: What is wrong with the value. In the page while it applies.
1826
+ - error: What is wrong with the value. In the page while it applies. Several, each with its own `match`, can be shown at once: each has an id of its own, and the control names them all.
1399
1827
  - `data-disabled`: Present when it is disabled.
1400
1828
  - `data-touched`: Present once focus has left the control.
1401
1829
  - `data-dirty`: Present while the value is not the one it started with.
@@ -1438,6 +1866,108 @@ Attributes and CSS variables, by part:
1438
1866
  - legend: The group's name.
1439
1867
  - `data-disabled`: Present when it is disabled.
1440
1868
 
1869
+ ### FileUpload
1870
+
1871
+ ```
1872
+ import "@kirana-ui/web/file-upload"
1873
+ ```
1874
+
1875
+ `<kui-file-upload>`: `<kui-file-upload>` around `kui-part="root"`, which holds a `dropzone` (with a `trigger` button inside, if the page wants one), a `list` with a `<template kui-each="items">` for a file (`{name}`, `{size}` in bytes, `{type}` and `{index}` are its own), and a `clear` button. An `item` holds its `item-name` and `item-size`, which say the file's name and its size as people read one (in the language of its `kui-locale`) unless the page wrote something, and an `item-remove` button. The dropzone draws the native file input, hidden, as its last child. `accept`, `multiple`, `max-files`, `max-size`, `min-size`, `disabled`, `required`, `name`, `form`; `files`, `default-files` and `validate` as properties. It tells `files-change` and `files-reject` (`detail.rejections`).
1876
+
1877
+ Attributes of the element (each also a property, in camel case):
1878
+
1879
+ - `accept` (string): What may be taken, as a file input's `accept`: extensions (`".png"`), types (`"image/png"`) and kinds (`"image/*"`), in a list or one text with commas. Without it, anything.
1880
+ - `multiple` (boolean): Whether several files are held. Default `false`: a file taken is the one held.
1881
+ - `max-files` (number): With `multiple`, how many files it holds at most.
1882
+ - `max-size` (number): The largest a file may be, in bytes.
1883
+ - `min-size` (number): The smallest a file may be, in bytes.
1884
+ - `disabled` (boolean): Disabled: no file can be taken or removed.
1885
+ - `required` (boolean): Needed: in a `Field`, holding none is then invalid.
1886
+ - `name` (string): With a name, the files are submitted with the form around them.
1887
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
1888
+
1889
+ Properties only:
1890
+
1891
+ - `files`: The files it holds, in order.
1892
+ - `defaultFiles`: The files it starts with, when the caller does not hold `files`. Read once.
1893
+ - `validate`: Whether a file may be taken, asked after the checks above.
1894
+
1895
+ Events:
1896
+
1897
+ - `files-change`: `event.detail.files`, with `event.detail.details`. `preventDefault()` keeps `files` as it was.
1898
+ - `files-reject`: `event.detail.rejections`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
1899
+
1900
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1901
+
1902
+ - `root`
1903
+ - `dropzone`
1904
+ - `trigger`
1905
+ - `list`
1906
+ - `item`
1907
+ - `item-name`
1908
+ - `item-size`: `kui-locale`
1909
+ - `item-remove`
1910
+ - `clear`
1911
+
1912
+ Lists (`<template kui-each="…">`): `items`.
1913
+
1914
+ Anatomy:
1915
+
1916
+ ```
1917
+ <kui-file-upload>
1918
+ root
1919
+ dropzone
1920
+ trigger (optional, as above)
1921
+ trigger (optional)
1922
+ list
1923
+ <template kui-each="items">
1924
+ item (repeated)
1925
+ item-name
1926
+ item-size (optional)
1927
+ item-remove (optional)
1928
+ clear (optional)
1929
+ ```
1930
+
1931
+ Attributes and CSS variables, by part:
1932
+
1933
+ - root: Files chosen to be sent.
1934
+ - `data-disabled`: Present when it is disabled.
1935
+ - `data-dragging`: Present while files are dragged over the dropzone.
1936
+ - `data-required`: Present when a file is needed.
1937
+ - `data-empty`: Present while it holds no file.
1938
+ - dropzone: Where files are dropped or pasted; pressed, it opens the file picker. It holds the hidden file input.
1939
+ - `data-disabled`: Present when it is disabled.
1940
+ - `data-dragging`: Present while files are dragged over the dropzone.
1941
+ - `data-required`: Present when a file is needed.
1942
+ - trigger: A button that opens the file picker.
1943
+ - `data-disabled`: Present when it is disabled.
1944
+ - `data-dragging`: Present while files are dragged over the dropzone.
1945
+ - `data-required`: Present when a file is needed.
1946
+ - list: What holds the files: a list.
1947
+ - `data-disabled`: Present when it is disabled.
1948
+ - `data-dragging`: Present while files are dragged over the dropzone.
1949
+ - `data-required`: Present when a file is needed.
1950
+ - item: A file.
1951
+ - `data-disabled`: Present when it is disabled.
1952
+ - `data-dragging`: Present while files are dragged over the dropzone.
1953
+ - `data-required`: Present when a file is needed.
1954
+ - itemName: A file's name.
1955
+ - `data-disabled`: Present when it is disabled.
1956
+ - `data-dragging`: Present while files are dragged over the dropzone.
1957
+ - `data-required`: Present when a file is needed.
1958
+ - itemSize: A file's size, as people read one.
1959
+ - `data-disabled`: Present when it is disabled.
1960
+ - `data-dragging`: Present while files are dragged over the dropzone.
1961
+ - `data-required`: Present when a file is needed.
1962
+ - itemRemove: A file's button that takes it away.
1963
+ - `data-disabled`: Present when it is disabled.
1964
+ - `data-dragging`: Present while files are dragged over the dropzone.
1965
+ - `data-required`: Present when a file is needed.
1966
+ - clear: Takes every file away: hidden while there is none.
1967
+ - `data-disabled`: Present when it is disabled.
1968
+ - `data-dragging`: Present while files are dragged over the dropzone.
1969
+ - `data-required`: Present when a file is needed.
1970
+
1441
1971
  ### Form
1442
1972
 
1443
1973
  ```
@@ -1517,11 +2047,14 @@ Attributes and CSS variables, by part:
1517
2047
  - `data-closed`: Present when it is closed.
1518
2048
  - `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.
1519
2049
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2050
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1520
2051
  - `--anchor-width`: The anchor's width.
1521
2052
  - `--anchor-height`: The anchor's height.
1522
2053
  - `--available-width`: The width between the anchor and the edge of the viewport.
1523
2054
  - `--available-height`: The height between the anchor and the edge of the viewport.
1524
2055
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2056
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
2057
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
1525
2058
  - popup: The card itself.
1526
2059
  - `data-open`: Present when it is open.
1527
2060
  - `data-closed`: Present when it is closed.
@@ -1531,6 +2064,8 @@ Attributes and CSS variables, by part:
1531
2064
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1532
2065
  - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
1533
2066
  - arrow: An element that points at the trigger, placed along the popup's edge.
2067
+ - `data-open`: Present when it is open.
2068
+ - `data-closed`: Present when it is closed.
1534
2069
  - `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.
1535
2070
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1536
2071
  - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
@@ -1661,7 +2196,7 @@ Attributes and CSS variables, by part:
1661
2196
  import "@kirana-ui/web/menu"
1662
2197
  ```
1663
2198
 
1664
- `<kui-menu>`: `<kui-menu>` around a `kui-part="trigger"` and a `portal` with a `positioner` (its `kui-side` and the like) around the `popup`, which holds its `item`s (`kui-disabled`, `kui-label`, `kui-close-on-click="false"`), `separator`s, `group`s with a `group-label`, `checkbox-item`s (`kui-checked`, `kui-default-checked`; it tells `checked-change`) with a `checkbox-item-indicator`, and a `radio-group` (`kui-value`, `kui-default-value`; it tells `value-change`) of `radio-item`s (`kui-value`) with a `radio-item-indicator`. A `<kui-menu>` inside a menu is its submenu, its trigger an item of the menu; inside a `<kui-menubar>`, one of the bar's. `open`, `default-open`, `disabled`, `loop`, `modal`; it tells `open-change`.
2199
+ `<kui-menu>`: `<kui-menu>` around a `kui-part="trigger"` and a `portal` with a `positioner` (its `kui-side` and the like) around the `popup`, which holds its `item`s (`kui-disabled`, `kui-label`, `kui-close-on-select="false"`), `separator`s, `group`s with a `group-label`, `checkbox-item`s (`kui-checked`, `kui-default-checked`; it tells `checked-change`) with a `checkbox-item-indicator`, and a `radio-group` (`kui-value`, `kui-default-value`; it tells `value-change`) of `radio-item`s (`kui-value`) with a `radio-item-indicator`. A `<kui-menu>` inside a menu is its submenu, its trigger an item of the menu; inside a `<kui-menubar>`, one of the bar's. `open`, `default-open`, `disabled`, `loop-focus` (`loop` is its older name), `modal`; it tells `open-change`.
1665
2200
 
1666
2201
  Events:
1667
2202
 
@@ -1673,13 +2208,13 @@ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1673
2208
  - `popup`
1674
2209
  - `arrow`
1675
2210
  - `separator`
1676
- - `item`: `kui-close-on-click`, `kui-disabled`, `kui-label`
2211
+ - `item`: `kui-close-on-click`, `kui-close-on-select`, `kui-disabled`, `kui-label`
1677
2212
  - `group`: `kui-id`
1678
2213
  - `group-label`
1679
2214
  - `checkbox-item`
1680
2215
  - `checkbox-item-indicator`
1681
2216
  - `radio-group`
1682
- - `radio-item`: `kui-close-on-click`, `kui-disabled`, `kui-label`, `kui-value`
2217
+ - `radio-item`: `kui-close-on-click`, `kui-close-on-select`, `kui-disabled`, `kui-label`, `kui-value`
1683
2218
  - `radio-item-indicator`: `kui-value`
1684
2219
  - `trigger`
1685
2220
 
@@ -1710,17 +2245,21 @@ Attributes and CSS variables, by part:
1710
2245
 
1711
2246
  - trigger: The button that opens the menu, and what it is placed against.
1712
2247
  - `data-popup-open`: Present when the menu is open.
2248
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
1713
2249
  - `data-disabled`: Present when it is disabled.
1714
2250
  - positioner: Places the menu against its trigger. It carries the geometry.
1715
2251
  - `data-open`: Present when it is open.
1716
2252
  - `data-closed`: Present when it is closed.
1717
2253
  - `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.
1718
2254
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2255
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1719
2256
  - `--anchor-width`: The anchor's width.
1720
2257
  - `--anchor-height`: The anchor's height.
1721
2258
  - `--available-width`: The width between the anchor and the edge of the viewport.
1722
2259
  - `--available-height`: The height between the anchor and the edge of the viewport.
1723
2260
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2261
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
2262
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
1724
2263
  - popup: The menu itself: the list of items.
1725
2264
  - `data-open`: Present when it is open.
1726
2265
  - `data-closed`: Present when it is closed.
@@ -1728,7 +2267,10 @@ Attributes and CSS variables, by part:
1728
2267
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1729
2268
  - `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.
1730
2269
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2270
+ - `data-instant="click | dismiss | group"`: Present when it opened or closed in a way that should skip the motion: `click` when the keyboard pressed its trigger or an item, `dismiss` when Escape closed it, `group` when focus or the pointer went from one menu of a bar to another.
1731
2271
  - arrow: An element that points at the trigger.
2272
+ - `data-open`: Present when it is open.
2273
+ - `data-closed`: Present when it is closed.
1732
2274
  - `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.
1733
2275
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1734
2276
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
@@ -1767,13 +2309,15 @@ Attributes and CSS variables, by part:
1767
2309
  import "@kirana-ui/web/menubar"
1768
2310
  ```
1769
2311
 
1770
- `<kui-menubar>`: `<kui-menubar>` around `kui-part="root"` and its `<kui-menu>`s, which work as one: the arrows move between them, and with one open the pointer opens the next. `loop`, `disabled`, `orientation`.
2312
+ `<kui-menubar>`: `<kui-menubar>` around `kui-part="root"` and its `<kui-menu>`s, which work as one: the arrows move between them, and with one open the pointer opens the next. `loop-focus` (`loop` is its older name), `disabled`, `orientation`, `modal`.
1771
2313
 
1772
2314
  Attributes of the element (each also a property, in camel case):
1773
2315
 
1774
- - `loop` (boolean): Whether the arrows go round from the last menu to the first. Default: they do.
2316
+ - `loop-focus` (boolean): Whether the arrows go round from the last menu to the first. Default: they do.
2317
+ - `loop` (boolean): Whether the arrows wrap from the last item to the first.
1775
2318
  - `disabled` (boolean): No menu of the bar opens.
1776
2319
  - `orientation` (string): A row (the default) or a column of menus. In a column a menu opens beside its trigger.
2320
+ - `modal` (boolean): Holds the page while one of its menus is open, as a menu's own `modal` does: its scroll is locked, and a press outside closes the menu and reaches nothing. Default: it does not. Read as a menu opens.
1777
2321
 
1778
2322
  Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1779
2323
 
@@ -1790,6 +2334,8 @@ Attributes and CSS variables, by part:
1790
2334
 
1791
2335
  - root: The row of menus. A menu inside it is one of its items.
1792
2336
  - `data-disabled`: Present when it is disabled.
2337
+ - `data-modal`: Present when its menus hold the page while one is open.
2338
+ - `data-has-submenu-open`: Present while one of its menus is open.
1793
2339
  - `data-orientation="horizontal | vertical"`: Whether its menus are in a row or a column.
1794
2340
 
1795
2341
  ### MessageScroller
@@ -1880,7 +2426,7 @@ Anatomy:
1880
2426
  import "@kirana-ui/web/navigation-menu"
1881
2427
  ```
1882
2428
 
1883
- `<kui-navigation-menu>`: `<kui-navigation-menu>` around a `kui-part="root"` nav with its `list`. An `item` has a `trigger` (with an `icon` if it has one) and a `content`, which is drawn in the menu's one `viewport` while its item is open; its `kui-value` tells it from the others, and an item that is given none makes its own. A `link` is a link (`kui-active`, `kui-close-on-click="false"`). The viewport is in a `portal` with a `positioner` around the `popup`, with an `arrow` and a `backdrop` if it has them. `value`, `default-value`, `delay`, `close-delay`, `orientation`; it tells `value-change`.
2429
+ `<kui-navigation-menu>`: `<kui-navigation-menu>` around a `kui-part="root"` nav with its `list`. An `item` has a `trigger` (with an `icon` if it has one; `kui-disabled`) and a `content`, which is drawn in the menu's one `viewport` while its item is open; its `kui-value` tells it from the others, and an item that is given none makes its own. A `link` is a link (`kui-active`, `kui-close-on-select="false"`). The viewport is in a `portal` with a `positioner` around the `popup`, with an `arrow` and a `backdrop` if it has them. `value`, `default-value`, `delay`, `close-delay`, `orientation`; it tells `value-change`.
1884
2430
 
1885
2431
  Attributes of the element (each also a property, in camel case):
1886
2432
 
@@ -1902,7 +2448,7 @@ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1902
2448
  - `trigger`: `kui-value`
1903
2449
  - `icon`: `kui-value`
1904
2450
  - `content`: `kui-value`
1905
- - `link`: `kui-active`, `kui-close-on-click`
2451
+ - `link`: `kui-active`, `kui-close-on-click`, `kui-close-on-select`
1906
2452
  - `positioner`: `kui-align`, `kui-align-offset`, `kui-anchor`, `kui-arrow-padding`, `kui-collision-boundary`, `kui-collision-padding`, `kui-position-method`, `kui-side`, `kui-side-offset`, `kui-sticky`
1907
2453
  - `popup`
1908
2454
  - `viewport`
@@ -1934,10 +2480,15 @@ Attributes and CSS variables, by part:
1934
2480
 
1935
2481
  - root: The navigation.
1936
2482
  - `data-orientation="horizontal | vertical"`: Whether the list is a row or a column.
2483
+ - `data-open`: Present while an item's content is shown.
2484
+ - `data-nested`: Present on a navigation menu inside another's content: a submenu of it.
1937
2485
  - list: The row of items.
1938
2486
  - `data-orientation="horizontal | vertical"`: Whether the list is a row or a column.
2487
+ - `data-open`: Present while an item's content is shown.
1939
2488
  - trigger: The button that shows an item's content.
1940
2489
  - `data-popup-open`: Present while the item's content is shown.
2490
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
2491
+ - `data-disabled`: Present when it is disabled.
1941
2492
  - icon: A mark on a trigger that shows whether its content is open.
1942
2493
  - `data-popup-open`: Present while the item's content is shown.
1943
2494
  - content: What an item shows. It is drawn in the viewport every item shares.
@@ -1945,7 +2496,7 @@ Attributes and CSS variables, by part:
1945
2496
  - `data-closed`: Present when it is closed.
1946
2497
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1947
2498
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1948
- - `data-activation-direction="left | right"`: Which way it came from: the item before it, or after.
2499
+ - `data-activation-direction="left | right | up | down"`: Which way it came from: the item before it, or after; `up` and `down` when the list is a column.
1949
2500
  - link: A link, in the list or in an item's content.
1950
2501
  - `data-active`: Present on the link of the page the reader is on.
1951
2502
  - positioner: Places the popup against the open item's trigger. It carries the geometry.
@@ -1953,6 +2504,8 @@ Attributes and CSS variables, by part:
1953
2504
  - `data-closed`: Present when it is closed.
1954
2505
  - `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.
1955
2506
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2507
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
2508
+ - `data-instant`: Present while it should move at once: as it is first drawn, and while the window is resized.
1956
2509
  - `--anchor-width`: The anchor's width.
1957
2510
  - `--anchor-height`: The anchor's height.
1958
2511
  - `--available-width`: The width between the anchor and the edge of the viewport.
@@ -1967,9 +2520,12 @@ Attributes and CSS variables, by part:
1967
2520
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1968
2521
  - `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.
1969
2522
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2523
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1970
2524
  - `--popup-width`: The open content's width.
1971
2525
  - `--popup-height`: The open content's height.
1972
2526
  - arrow: An element that points at the open item's trigger.
2527
+ - `data-open`: Present when it is open.
2528
+ - `data-closed`: Present when it is closed.
1973
2529
  - `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.
1974
2530
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1975
2531
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
@@ -2004,6 +2560,7 @@ Attributes of the element (each also a property, in camel case):
2004
2560
  - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid.
2005
2561
  - `name` (string): With a name, the number is submitted with the form around it.
2006
2562
  - `form` (string): The id of the form the control belongs to, when it is not inside it.
2563
+ - `kui-id` (string): What its input's id is made from: the input is `<id>-input`, which a `<label for>` names. Inside a `Field`, the input takes the field's id instead.
2007
2564
 
2008
2565
  Properties only:
2009
2566
 
@@ -2123,22 +2680,27 @@ Attributes and CSS variables, by part:
2123
2680
  import "@kirana-ui/web/otp"
2124
2681
  ```
2125
2682
 
2126
- `<kui-otp>`: `<kui-otp>` around `kui-part="root"`, the one `input` that is typed in, and a `slot` for each character (`kui-index`, from 0), which says its character and may hold a `caret`, in the page while the next character goes there. Slots may be in `group`s with a `separator` between. `length`, `value`, `default-value`, `mode`, `pattern`, `disabled`, `name`, `form`; it tells `value-change` and `complete`.
2683
+ `<kui-otp>`: `<kui-otp>` around `kui-part="root"`, the one `input` that is typed in, and a `slot` for each character (`kui-index`, from 0), which says its character and may hold a `caret`, in the page while the next character goes there. Slots may be in `group`s with a `separator` between. `length`, `value`, `default-value`, `validation-type` (`mode`, its old name), `pattern`, `disabled`, `read-only`, `required`, `name`, `form`; it tells `value-change` and `value-complete` (and `complete`, its old name).
2127
2684
 
2128
2685
  Attributes of the element (each also a property, in camel case):
2129
2686
 
2130
2687
  - `length` (number): How many characters the code has. Default: 6.
2131
2688
  - `value` (string): The characters typed so far, when the caller holds them.
2132
2689
  - `default-value` (string): The characters it starts with, when the caller does not hold `value`. Read once.
2133
- - `mode` (string): 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.
2134
- - `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`.
2690
+ - `validation-type` (string): What a character may be: a digit (`numeric`), a letter (`alpha`, `a` to `z` either case), either (`alphanumeric`), or anything but white space (`none`: no rule beyond that). 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. `alphabetic` and `text` are older spellings of `alpha` and `none`, still read.
2691
+ - `mode` (string): What a character may be.
2692
+ - `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 `validationType`'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, `validationType` only says the keyboard, and defaults to `none`.
2135
2693
  - `disabled` (boolean): Disabled: it cannot be changed.
2694
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
2695
+ - `required` (boolean): Needed: in a `Field`, an empty code is then invalid.
2136
2696
  - `name` (string): With a name, the code is submitted with the form around it.
2137
2697
  - `form` (string): The id of the form the input belongs to, when it is not inside it.
2698
+ - `kui-id` (string): The id of its input, not of the root: a `<label for>` names it.
2138
2699
 
2139
2700
  Events:
2140
2701
 
2141
2702
  - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
2703
+ - `value-complete`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
2142
2704
  - `complete`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
2143
2705
 
2144
2706
  Parts (`kui-part`), each with the `kui-` attributes its element is read for:
@@ -2165,16 +2727,31 @@ Anatomy:
2165
2727
  Attributes and CSS variables, by part:
2166
2728
 
2167
2729
  - root: The code: the input and its cells.
2168
- - `data-disabled`: Present when it is disabled.
2730
+ - `data-touched`: Inside a Field: present once focus has left the control.
2731
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
2732
+ - `data-filled`: Present when the code has a character in it.
2169
2733
  - `data-focused`: Present while the input has focus.
2734
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
2735
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2736
+ - `data-disabled`: Present when it is disabled.
2737
+ - `data-readonly`: Present when it can be read but not changed.
2738
+ - `data-required`: Present when the form needs it.
2170
2739
  - `data-complete`: Present when every character is in.
2171
2740
  - input: The one input the code is typed in. A design lays it over the cells, unseen.
2172
2741
  - `data-disabled`: Present when it is disabled.
2173
2742
  - slot: One cell of the code.
2174
2743
  - `data-index`: The cell's place, from 0.
2175
2744
  - `data-active`: Present on the cell the next character goes in, or that is selected.
2745
+ - `data-touched`: Inside a Field: present once focus has left the control.
2746
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
2176
2747
  - `data-filled`: Present when the cell has its character.
2748
+ - `data-focused`: Present while the input has focus.
2749
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
2750
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2177
2751
  - `data-disabled`: Present when it is disabled.
2752
+ - `data-readonly`: Present when it can be read but not changed.
2753
+ - `data-required`: Present when the form needs it.
2754
+ - `data-complete`: Present when every character is in.
2178
2755
 
2179
2756
  ### Pagination
2180
2757
 
@@ -2232,6 +2809,63 @@ Attributes and CSS variables, by part:
2232
2809
  - next: Goes to the page after.
2233
2810
  - `data-disabled`: Present when it is disabled.
2234
2811
 
2812
+ ### PasswordInput
2813
+
2814
+ ```
2815
+ import "@kirana-ui/web/password-input"
2816
+ ```
2817
+
2818
+ `<kui-password-input>`: `<kui-password-input>` around `kui-part="root"`, an `input`, and a `toggle` button that shows the password and hides it again, with an `indicator` inside that says which it is. Inside a `<kui-field>` the input is the field's control. `visible`, `default-visible`, `disabled`; it tells `visible-change` and `value-change`.
2819
+
2820
+ Attributes of the element (each also a property, in camel case):
2821
+
2822
+ - `visible` (boolean): Whether the password can be read, when the caller holds it.
2823
+ - `default-visible` (boolean): Read once. Default `false`.
2824
+ - `disabled` (boolean): Disabled: nothing can be typed in it.
2825
+
2826
+ Events:
2827
+
2828
+ - `visible-change`: `event.detail.visible`, with `event.detail.details`. `preventDefault()` keeps `visible` as it was.
2829
+ - `value-change`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
2830
+
2831
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2832
+
2833
+ - `root`
2834
+ - `input`
2835
+ - `toggle`
2836
+ - `indicator`
2837
+
2838
+ Anatomy:
2839
+
2840
+ ```
2841
+ <kui-password-input>
2842
+ root
2843
+ input
2844
+ toggle
2845
+ indicator (optional)
2846
+ ```
2847
+
2848
+ Attributes and CSS variables, by part:
2849
+
2850
+ - root: A password that can be shown while it is typed.
2851
+ - `data-visible`: Present while the password can be read.
2852
+ - `data-disabled`: Present when it is disabled.
2853
+ - input: The `<input>`: a password, or text while it is shown. In a `Field` it is the field's control.
2854
+ - `data-visible`: Present while the password can be read.
2855
+ - `data-disabled`: Present when it is disabled.
2856
+ - `data-touched`: Present once focus has left it.
2857
+ - `data-dirty`: Present once its text differs from what it began with.
2858
+ - `data-filled`: Present while it holds text.
2859
+ - `data-focused`: Present while it has focus.
2860
+ - `data-valid`: In a field: present once the value was checked and found right.
2861
+ - `data-invalid`: In a field: present while the value is wrong.
2862
+ - toggle: Shows the password, and hides it again. Focus and the caret stay in the input.
2863
+ - `data-visible`: Present while the password can be read.
2864
+ - `data-disabled`: Present when it is disabled.
2865
+ - indicator: What draws which of the two it is: an eye, open or struck.
2866
+ - `data-visible`: Present while the password can be read.
2867
+ - `data-disabled`: Present when it is disabled.
2868
+
2235
2869
  ### Popover
2236
2870
 
2237
2871
  ```
@@ -2280,6 +2914,7 @@ Attributes and CSS variables, by part:
2280
2914
 
2281
2915
  - trigger: The button that opens the popover, and what it is placed against.
2282
2916
  - `data-popup-open`: Present when the popover is open.
2917
+ - `data-pressed`: Present while the popover a press on this trigger opened is open: it stays pressed, as a button held down.
2283
2918
  - backdrop: A layer over the page behind the popover.
2284
2919
  - `data-open`: Present when it is open.
2285
2920
  - `data-closed`: Present when it is closed.
@@ -2290,11 +2925,14 @@ Attributes and CSS variables, by part:
2290
2925
  - `data-closed`: Present when it is closed.
2291
2926
  - `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.
2292
2927
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2928
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
2293
2929
  - `--anchor-width`: The anchor's width.
2294
2930
  - `--anchor-height`: The anchor's height.
2295
2931
  - `--available-width`: The width between the anchor and the edge of the viewport.
2296
2932
  - `--available-height`: The height between the anchor and the edge of the viewport.
2297
2933
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2934
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
2935
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
2298
2936
  - popup: The popover itself.
2299
2937
  - `data-open`: Present when it is open.
2300
2938
  - `data-closed`: Present when it is closed.
@@ -2302,7 +2940,12 @@ Attributes and CSS variables, by part:
2302
2940
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2303
2941
  - `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.
2304
2942
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2943
+ - `data-instant="click | dismiss"`: Present when it opened or closed in a way that should skip the motion: `click` when the keyboard pressed the trigger, `dismiss` when Escape closed it.
2944
+ - `--popup-width`: Its width: `auto`, and while its content changes size, the old width and then the new one, for a transition between them.
2945
+ - `--popup-height`: Its height: `auto`, and while its content changes size, the old height and then the new one, for a transition between them.
2305
2946
  - arrow: An element that points at the trigger, placed along the popup's edge.
2947
+ - `data-open`: Present when it is open.
2948
+ - `data-closed`: Present when it is closed.
2306
2949
  - `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.
2307
2950
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2308
2951
  - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
@@ -2445,52 +3088,126 @@ Attributes and CSS variables, by part:
2445
3088
  - `data-disabled`: Present when it is disabled.
2446
3089
  - `data-readonly`: Present when it can be read but not changed.
2447
3090
  - `data-required`: Present when the form needs it.
3091
+ - `data-touched`: Inside a Field: present once focus has left the control.
3092
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3093
+ - `data-filled`: Inside a Field: present while the control has a value.
3094
+ - `data-focused`: Inside a Field: present while the control has focus.
3095
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3096
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2448
3097
  - 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.
2449
3098
  - `data-checked`: Present when it is checked.
2450
3099
  - `data-unchecked`: Present when it is not checked.
2451
3100
  - `data-disabled`: Present when it is disabled.
2452
3101
  - `data-readonly`: Present when it can be read but not changed.
2453
3102
  - `data-required`: Present when the form needs it.
3103
+ - `data-touched`: Inside a Field: present once focus has left the control.
3104
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3105
+ - `data-filled`: Inside a Field: present while the control has a value.
3106
+ - `data-focused`: Inside a Field: present while the control has focus.
3107
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3108
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2454
3109
  - indicator: The mark. In the page while its item is the chosen one.
2455
3110
  - `data-checked`: Present when it is checked.
2456
3111
  - `data-unchecked`: Present when it is not checked.
2457
3112
  - `data-disabled`: Present when it is disabled.
2458
3113
  - `data-readonly`: Present when it can be read but not changed.
2459
3114
  - `data-required`: Present when the form needs it.
3115
+ - `data-touched`: Inside a Field: present once focus has left the control.
3116
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3117
+ - `data-filled`: Inside a Field: present while the control has a value.
3118
+ - `data-focused`: Inside a Field: present while the control has focus.
3119
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3120
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2460
3121
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2461
3122
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2462
3123
 
2463
- ### Resizable
3124
+ ### Rating
2464
3125
 
2465
3126
  ```
2466
- import "@kirana-ui/web/resizable"
3127
+ import "@kirana-ui/web/rating"
2467
3128
  ```
2468
3129
 
2469
- `<kui-resizable>`: `<kui-resizable>` around `kui-part="group"`, its `panel`s (`kui-default-size`, `kui-min-size`, `kui-max-size`, in shares of a hundred) and a `handle` between two (`kui-disabled`). `orientation`, `keyboard-step`, `disabled`; it tells `sizes-change`.
3130
+ `<kui-rating>`: `<kui-rating>` around a `kui-part="root"` element holding a `<template kui-each="items">` with an `item` for a place (`{place}` is its number, from 1). The root draws the hidden input a form reads, as its last child. `value`, `default-value`, `count`, `allow-half`, `disabled`, `read-only`, `required`, `name`, `form`; it tells `value-change` and `hover-change`.
2470
3131
 
2471
3132
  Attributes of the element (each also a property, in camel case):
2472
3133
 
2473
- - `orientation` (string): Whether the panels are side by side (the default) or one over the other.
2474
- - `keyboard-step` (number): How far an arrow key moves a handle, in hundredths of the group. Default: 10.
2475
- - `disabled` (boolean): Disabled: the handles cannot be dragged or moved with the keyboard.
3134
+ - `value` (number): How much is given, from 0 (none) to `count`; a half where `allowHalf` is set.
3135
+ - `default-value` (number): The value it starts with, when the caller does not hold `value`. Read once.
3136
+ - `count` (number): How many items there are. Default 5.
3137
+ - `allow-half` (boolean): Whether half an item can be given: by the half of it a pointer is over, and by the arrows.
3138
+ - `disabled` (boolean): Disabled: it cannot be changed.
3139
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
3140
+ - `required` (boolean): Needed: in a `Field`, giving none is then invalid.
3141
+ - `name` (string): With a name, the value is submitted with the form around it; none is submitted as empty.
3142
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
2476
3143
 
2477
3144
  Events:
2478
3145
 
2479
- - `sizes-change`: `event.detail.sizes`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
3146
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
3147
+ - `hover-change`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
2480
3148
 
2481
3149
  Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2482
3150
 
2483
- - `group`
2484
- - `panel`
2485
- - `handle`: `kui-disabled`
3151
+ - `root`
3152
+ - `item`
3153
+
3154
+ Lists (`<template kui-each="…">`): `items`.
2486
3155
 
2487
3156
  Anatomy:
2488
3157
 
2489
3158
  ```
2490
- <kui-resizable>
2491
- group
2492
- panel (repeated)
2493
- handle (repeated)
3159
+ <kui-rating>
3160
+ root
3161
+ <template kui-each="items">
3162
+ item (repeated)
3163
+ ```
3164
+
3165
+ Attributes and CSS variables, by part:
3166
+
3167
+ - root: The items, as one choice: a radio group. It holds the hidden input a form reads.
3168
+ - `data-disabled`: Present when it is disabled.
3169
+ - `data-readonly`: Present when it is shown and cannot be changed.
3170
+ - `data-required`: Present when a value is needed.
3171
+ - `data-hovering`: Present while a pointer is over an item.
3172
+ - item: One item (a star): pressed, the value is its place, or half of it.
3173
+ - `data-checked`: Present on the item that holds the value.
3174
+ - `data-filled`: Present on every item up to the value drawn: the one a pointer is over, or the one held.
3175
+ - `data-half`: Present on the item the value drawn fills by half.
3176
+ - `data-disabled`: Present when it is disabled.
3177
+ - `data-readonly`: Present when it is shown and cannot be changed.
3178
+ - `data-required`: Present when a value is needed.
3179
+
3180
+ ### Resizable
3181
+
3182
+ ```
3183
+ import "@kirana-ui/web/resizable"
3184
+ ```
3185
+
3186
+ `<kui-resizable>`: `<kui-resizable>` around `kui-part="group"`, its `panel`s (`kui-default-size`, `kui-min-size`, `kui-max-size`, in shares of a hundred) and a `handle` between two (`kui-disabled`). `orientation`, `keyboard-step`, `disabled`; it tells `sizes-change`.
3187
+
3188
+ Attributes of the element (each also a property, in camel case):
3189
+
3190
+ - `orientation` (string): Whether the panels are side by side (the default) or one over the other.
3191
+ - `keyboard-step` (number): How far an arrow key moves a handle, in hundredths of the group. Default: 10.
3192
+ - `disabled` (boolean): Disabled: the handles cannot be dragged or moved with the keyboard.
3193
+
3194
+ Events:
3195
+
3196
+ - `sizes-change`: `event.detail.sizes`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
3197
+
3198
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3199
+
3200
+ - `group`
3201
+ - `panel`
3202
+ - `handle`: `kui-disabled`
3203
+
3204
+ Anatomy:
3205
+
3206
+ ```
3207
+ <kui-resizable>
3208
+ group
3209
+ panel (repeated)
3210
+ handle (repeated)
2494
3211
  ```
2495
3212
 
2496
3213
  Attributes and CSS variables, by part:
@@ -2541,6 +3258,10 @@ Attributes and CSS variables, by part:
2541
3258
  - root: The area. It holds the viewport and the scrollbars, which the library places against it: a design gives a scrollbar its thickness and draws it, and places nothing.
2542
3259
  - `data-has-overflow-x`: Present when there is more to see sideways.
2543
3260
  - `data-has-overflow-y`: Present when there is more to see up or down.
3261
+ - `data-overflow-x-start`: Present when there is more to scroll to towards the start of a line.
3262
+ - `data-overflow-x-end`: Present when there is more to scroll to towards the end of a line.
3263
+ - `data-overflow-y-start`: Present when there is more to scroll to above.
3264
+ - `data-overflow-y-end`: Present when there is more to scroll to below.
2544
3265
  - `data-scrolling`: Present while it is being scrolled, and a moment after.
2545
3266
  - `data-hovering`: Present while the pointer is over the area.
2546
3267
  - `--scroll-area-corner-width`: The width of the corner: the vertical scrollbar's, while both scrollbars and the corner are in the page.
@@ -2548,15 +3269,38 @@ Attributes and CSS variables, by part:
2548
3269
  - viewport: The element that scrolls.
2549
3270
  - `data-has-overflow-x`: Present when there is more to see sideways.
2550
3271
  - `data-has-overflow-y`: Present when there is more to see up or down.
3272
+ - `data-overflow-x-start`: Present when there is more to scroll to towards the start of a line.
3273
+ - `data-overflow-x-end`: Present when there is more to scroll to towards the end of a line.
3274
+ - `data-overflow-y-start`: Present when there is more to scroll to above.
3275
+ - `data-overflow-y-end`: Present when there is more to scroll to below.
3276
+ - `data-scrolling`: Present while it is being scrolled, and a moment after.
3277
+ - `--scroll-area-overflow-x-start`: How far the view is from the start of a line, to fade that edge by: `0px` at it.
3278
+ - `--scroll-area-overflow-x-end`: How far the view is from the end of a line: `0px` at it.
3279
+ - `--scroll-area-overflow-y-start`: How far the view is from the top: `0px` at it.
3280
+ - `--scroll-area-overflow-y-end`: How far the view is from the bottom: `0px` at it.
3281
+ - content: 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).
3282
+ - `data-has-overflow-x`: Present when there is more to see sideways.
3283
+ - `data-has-overflow-y`: Present when there is more to see up or down.
3284
+ - `data-overflow-x-start`: Present when there is more to scroll to towards the start of a line.
3285
+ - `data-overflow-x-end`: Present when there is more to scroll to towards the end of a line.
3286
+ - `data-overflow-y-start`: Present when there is more to scroll to above.
3287
+ - `data-overflow-y-end`: Present when there is more to scroll to below.
2551
3288
  - `data-scrolling`: Present while it is being scrolled, and a moment after.
2552
3289
  - scrollbar: A scrollbar's track, placed along its edge of the area. In the page while there is something to scroll its way.
2553
3290
  - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
2554
3291
  - `data-hovering`: Present while the pointer is over the area.
2555
3292
  - `data-scrolling`: Present while the area is scrolled its way.
3293
+ - `data-has-overflow-x`: Present when there is more to see sideways.
3294
+ - `data-has-overflow-y`: Present when there is more to see up or down.
3295
+ - `data-overflow-x-start`: Present when there is more to scroll to towards the start of a line.
3296
+ - `data-overflow-x-end`: Present when there is more to scroll to towards the end of a line.
3297
+ - `data-overflow-y-start`: Present when there is more to scroll to above.
3298
+ - `data-overflow-y-end`: Present when there is more to scroll to below.
2556
3299
  - `--scroll-area-thumb-height`: A vertical thumb's height.
2557
3300
  - `--scroll-area-thumb-width`: A horizontal thumb's width.
2558
3301
  - thumb: The part of a scrollbar that shows where the view is, and can be dragged. As long as its scrollbar's variable says.
2559
3302
  - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
3303
+ - `data-scrolling`: Present while the area is scrolled its way.
2560
3304
 
2561
3305
  ### Select
2562
3306
 
@@ -2564,26 +3308,30 @@ Attributes and CSS variables, by part:
2564
3308
  import "@kirana-ui/web/select"
2565
3309
  ```
2566
3310
 
2567
- `<kui-select>`: `<kui-select>` around a `kui-part="trigger"` button holding a `value` (it says the chosen item's text, or its `kui-placeholder`; with `multiple`, the chosen items' texts with commas between), and a `portal` with a `positioner` (its `kui-side` and the like, and `kui-align-item-with-trigger`) around the `popup`. The popup holds an `item` for each `kui-value` (`kui-disabled`, `kui-label`), each with an `item-text` and an `item-indicator`; items may be in a `group` with a `group-label`, with `separator`s between, and in a `list` between a `scroll-up-arrow` and a `scroll-down-arrow`. With a name it draws the hidden input a form reads. A `value` part that holds something says what the page wrote there: a `<template kui-each="values">` in it is drawn for each chosen value (`{value}`, `{label}`), in the items' order. `value`, `default-value`, `open`, `default-open`, `disabled`, `read-only`, `required`, `multiple`, `values` and `default-values` (with commas between), `name`, `form`; `items` as a property; it tells `value-change`, `values-change` and `open-change`.
3311
+ `<kui-select>`: `<kui-select>` around a `kui-part="trigger"` button holding a `value` (it says the chosen item's text, or its `kui-placeholder`; with `multiple`, the chosen items' texts with commas between), and a `portal` with a `positioner` (its `kui-side` and the like, and `kui-align-item-with-trigger`) around the `popup`. The popup holds an `item` for each `kui-value` (`kui-disabled`, `kui-label`), each with an `item-text` and an `item-indicator`; items may be in a `group` with a `group-label`, with `separator`s between, and in a `list` between a `scroll-up-arrow` and a `scroll-down-arrow`. With a name it draws the hidden input a form reads. A `value` part that holds something says what the page wrote there: a `<template kui-each="values">` in it is drawn for each chosen value (`{value}`, `{label}`), in the items' order. `value`, `default-value`, `open`, `default-open`, `disabled`, `read-only`, `required`, `multiple` (with it, `value` and `default-value` hold the chosen values with commas between; `values` and `default-values`, the older names, are still read), `name`, `form`, `presentation` (`sheet` opens the list from the bottom edge, modal, over a `backdrop` part in the portal; `auto` on a narrow touch screen) and `sheet-below`; `items`, `itemToStringLabel` and `itemToStringValue` as properties; it tells `value-change`, `values-change` and `open-change`.
2568
3312
 
2569
3313
  Attributes of the element (each also a property, in camel case):
2570
3314
 
2571
- - `value` (string): The chosen value; `null` is "none".
2572
- - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
3315
+ - `value` (string): The chosen value; `null` is "none". With `multiple`, the chosen values, in the order they were chosen.
3316
+ - `default-value` (string): The value it starts with (with `multiple`, the values), when the caller does not hold `value`. Read once.
2573
3317
  - `open` (boolean): Whether the list is open, when the caller holds it.
2574
3318
  - `default-open` (boolean): Whether the list starts open, when the caller does not hold `open`. Read once.
2575
3319
  - `disabled` (boolean): Disabled: it cannot be changed.
2576
3320
  - `read-only` (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.
2577
3321
  - `required` (boolean): In a field, "none" is then wrong.
2578
- - `multiple` (boolean): Several values: an item chosen is added, chosen again taken away, and the list stays open. The values are `values`, not `value`.
2579
- - `values` (string): With `multiple`: the chosen values, in the order they were chosen.
2580
- - `default-values` (string): With `multiple`: the values it starts with, when the caller does not hold `values`. Read once.
3322
+ - `multiple` (boolean): Several values: `value`, `defaultValue` and `onValueChange` then hold a list. Read once.
3323
+ - `values` (string): With `multiple`: the chosen values.
3324
+ - `default-values` (string): With `multiple`: the values it starts with.
2581
3325
  - `name` (string): With a name, the value is submitted with the form around it.
2582
3326
  - `form` (string): The id of the form the control belongs to, when it is not inside it.
3327
+ - `presentation` (string): How the list opens. `"sheet"`: from the bottom edge, not placed against the trigger, modal with a backdrop, swiped down or pressed outside to close. `"auto"`: decided each time it opens, a sheet when the pointer is coarse and the viewport narrower than `sheetBelow`. Default `"popup"`.
3328
+ - `sheet-below` (number): With `presentation: "auto"`: the viewport's width, in CSS pixels, under which a coarse pointer opens a sheet. Default 640.
2583
3329
 
2584
3330
  Properties only:
2585
3331
 
2586
3332
  - `items`: The labels of the values, for the trigger to show before the list has ever been opened: a list of values with their labels, or, for values that are text, the labels by value (`{ apple: "Apple" }`). Not needed for the list itself: its items are read from the markup.
3333
+ - `itemToStringLabel`: For values that are objects: the text the trigger shows for one, and what typing matches an item by when it gives no `label`. Without it, an object's own `label` names it, then the label `items` gives it, then the item's text in the markup.
3334
+ - `itemToStringValue`: For values that are objects: the text the form is sent for one. Without it, the `value` of an object shaped `{ value, label }` is sent, and any other object as JSON.
2587
3335
 
2588
3336
  Events:
2589
3337
 
@@ -2597,6 +3345,7 @@ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2597
3345
  - `value`: `kui-placeholder`
2598
3346
  - `positioner`: `kui-align`, `kui-align-item-with-trigger`, `kui-align-offset`, `kui-anchor`, `kui-arrow-padding`, `kui-collision-boundary`, `kui-collision-padding`, `kui-position-method`, `kui-side`, `kui-side-offset`, `kui-sticky`
2599
3347
  - `popup`
3348
+ - `backdrop`
2600
3349
  - `list`
2601
3350
  - `scroll-up-arrow`
2602
3351
  - `scroll-down-arrow`
@@ -2617,6 +3366,7 @@ Anatomy:
2617
3366
  value
2618
3367
  <template kui-each="values"> (optional)
2619
3368
  portal
3369
+ backdrop (optional)
2620
3370
  positioner
2621
3371
  popup
2622
3372
  scroll-up-arrow
@@ -2634,16 +3384,38 @@ Attributes and CSS variables, by part:
2634
3384
 
2635
3385
  - trigger: The button that shows the value and opens the list.
2636
3386
  - `data-popup-open`: Present when the list is open.
3387
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
3388
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
2637
3389
  - `data-placeholder`: Present while nothing is chosen.
2638
3390
  - `data-disabled`: Present when it is disabled.
2639
3391
  - `data-readonly`: Present when it can be read but not changed.
3392
+ - `data-required`: Present when the form needs it.
3393
+ - `data-touched`: Inside a Field: present once focus has left the control.
3394
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3395
+ - `data-filled`: Inside a Field: present while the control has a value.
3396
+ - `data-focused`: Inside a Field: present while the control has focus.
3397
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3398
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2640
3399
  - value: The chosen value's label, or the placeholder. With several values, their labels with commas between.
2641
3400
  - `data-placeholder`: Present while nothing is chosen.
2642
- - positioner: Places the list against the trigger. It carries the geometry.
3401
+ - backdrop: The layer over the page behind the list: a press on it closes the list.
3402
+ - `data-open`: Present when it is open.
3403
+ - `data-closed`: Present when it is closed.
3404
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
3405
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
3406
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
3407
+ - `data-swiping`: Present while the sheet is dragged.
3408
+ - `data-swipe-dismiss`: Present once a drag has closed it.
3409
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
3410
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
3411
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
3412
+ - positioner: Places the list against the trigger. It carries the geometry. As a sheet it is not placed, and carries none.
2643
3413
  - `data-open`: Present when it is open.
2644
3414
  - `data-closed`: Present when it is closed.
2645
3415
  - `data-side="top | right | bottom | left | inline-start | inline-end | none"`: The side of the trigger it is on, after any flip; `none` when it lies over the trigger.
2646
3416
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3417
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
3418
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
2647
3419
  - `--anchor-width`: The anchor's width.
2648
3420
  - `--anchor-height`: The anchor's height.
2649
3421
  - `--available-width`: The width between the anchor and the edge of the viewport.
@@ -2661,13 +3433,20 @@ Attributes and CSS variables, by part:
2661
3433
  - `data-side="top | right | bottom | left | inline-start | inline-end | none"`: The side of the trigger the list is on; `none` when it lies over the trigger.
2662
3434
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2663
3435
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2664
- - popup: The list of items.
3436
+ - popup: The list of items. As a sheet, a design moves it by what it says of the drag, and gives it `touch-action: none` where a finger drags it.
2665
3437
  - `data-open`: Present when it is open.
2666
3438
  - `data-closed`: Present when it is closed.
2667
3439
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2668
3440
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2669
- - `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.
3441
+ - `data-side="top | right | bottom | left | inline-start | inline-end | none"`: The side of the trigger it is on, after any flip; `none` when it lies over the trigger.
2670
3442
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3443
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
3444
+ - `data-swiping`: Present while the sheet is dragged.
3445
+ - `data-swipe-dismiss`: Present once a drag has closed it.
3446
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
3447
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
3448
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
3449
+ - `--drawer-swipe-strength`: As a sheet, once let go: 0.1 to 1, the share of the design's own time it should take to come to rest.
2671
3450
  - item: One choice in the list.
2672
3451
  - `data-selected`: Present on the chosen item, or on each of several.
2673
3452
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
@@ -2764,26 +3543,56 @@ Attributes and CSS variables, by part:
2764
3543
  - `data-disabled`: Present when it is disabled.
2765
3544
  - `data-readonly`: Present when it can be read but not changed.
2766
3545
  - `data-dragging`: Present while a pointer holds a thumb.
3546
+ - `data-touched`: Inside a Field: present once focus has left the control.
3547
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3548
+ - `data-filled`: Inside a Field: present while the control has a value.
3549
+ - `data-focused`: Inside a Field: present while the control has focus.
3550
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3551
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2767
3552
  - value: The value, written.
2768
3553
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2769
3554
  - `data-disabled`: Present when it is disabled.
2770
3555
  - `data-readonly`: Present when it can be read but not changed.
2771
3556
  - `data-dragging`: Present while a pointer holds a thumb.
3557
+ - `data-touched`: Inside a Field: present once focus has left the control.
3558
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3559
+ - `data-filled`: Inside a Field: present while the control has a value.
3560
+ - `data-focused`: Inside a Field: present while the control has focus.
3561
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3562
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2772
3563
  - control: What a pointer presses and drags on. It holds the track and the thumbs.
2773
3564
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2774
3565
  - `data-disabled`: Present when it is disabled.
2775
3566
  - `data-readonly`: Present when it can be read but not changed.
2776
3567
  - `data-dragging`: Present while a pointer holds a thumb.
3568
+ - `data-touched`: Inside a Field: present once focus has left the control.
3569
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3570
+ - `data-filled`: Inside a Field: present while the control has a value.
3571
+ - `data-focused`: Inside a Field: present while the control has focus.
3572
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3573
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2777
3574
  - track: The whole range.
2778
3575
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2779
3576
  - `data-disabled`: Present when it is disabled.
2780
3577
  - `data-readonly`: Present when it can be read but not changed.
2781
3578
  - `data-dragging`: Present while a pointer holds a thumb.
3579
+ - `data-touched`: Inside a Field: present once focus has left the control.
3580
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3581
+ - `data-filled`: Inside a Field: present while the control has a value.
3582
+ - `data-focused`: Inside a Field: present while the control has focus.
3583
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3584
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2782
3585
  - indicator: The filled part: up to the thumb, or from the first thumb to the last. Its place and length are written on it.
2783
3586
  - `data-orientation="horizontal | vertical"`: The way the track runs.
2784
3587
  - `data-disabled`: Present when it is disabled.
2785
3588
  - `data-readonly`: Present when it can be read but not changed.
2786
3589
  - `data-dragging`: Present while a pointer holds a thumb.
3590
+ - `data-touched`: Inside a Field: present once focus has left the control.
3591
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3592
+ - `data-filled`: Inside a Field: present while the control has a value.
3593
+ - `data-focused`: Inside a Field: present while the control has focus.
3594
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3595
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2787
3596
  - `--start-position`: With thumbs that stay inside the control: where the filled part starts, or with one thumb where it ends.
2788
3597
  - `--relative-size`: With thumbs that stay inside the control and a range: the filled part's length.
2789
3598
  - 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.
@@ -2791,9 +3600,104 @@ Attributes and CSS variables, by part:
2791
3600
  - `data-disabled`: Present when it is disabled.
2792
3601
  - `data-readonly`: Present when it can be read but not changed.
2793
3602
  - `data-dragging`: Present while a pointer holds a thumb.
3603
+ - `data-touched`: Inside a Field: present once focus has left the control.
3604
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3605
+ - `data-filled`: Inside a Field: present while the control has a value.
3606
+ - `data-focused`: Inside a Field: present while the control has focus.
3607
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3608
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2794
3609
  - `data-index`: Which thumb it is, from 0.
2795
3610
  - `--position`: With thumbs that stay inside the control: where the thumb's centre is.
2796
3611
 
3612
+ ### Steps
3613
+
3614
+ ```
3615
+ import "@kirana-ui/web/steps"
3616
+ ```
3617
+
3618
+ `<kui-steps>`: `<kui-steps>` around `kui-part="root"`, a `list` with an `item` for each step (`kui-index`, from 0, or its place in the page when it has none) holding its `trigger` (with an `indicator` inside) and a `separator`, a `content` for each step (`kui-index`), a `completed`, and `previous` and `next` buttons. `step`, `default-step`, `count` (the items in the page when it is left out), `linear`, `orientation`; it tells `step-change`.
3619
+
3620
+ Attributes of the element (each also a property, in camel case):
3621
+
3622
+ - `step` (number): The step shown, from 0. Equal to `count`, every step is done.
3623
+ - `default-step` (number): The step it starts at, when the caller does not hold `step`. Read once.
3624
+ - `count` (number): How many steps there are. Left out, the items in the page, counted once they are there: until then (and on a server) no step is the last, so none is all done. Give it where only some of the steps are drawn.
3625
+ - `linear` (boolean): In order only: a step that is not done yet cannot be gone to by its trigger.
3626
+ - `orientation` (string): Whether the steps are laid out across (the default) or down: the arrows follow.
3627
+
3628
+ Events:
3629
+
3630
+ - `step-change`: `event.detail.step`, with `event.detail.details`. `preventDefault()` keeps `step` as it was.
3631
+
3632
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3633
+
3634
+ - `root`
3635
+ - `list`
3636
+ - `item`: `kui-index`
3637
+ - `trigger`: `kui-index`
3638
+ - `indicator`: `kui-index`
3639
+ - `separator`: `kui-index`
3640
+ - `content`: `kui-index`
3641
+ - `completed`
3642
+ - `previous`
3643
+ - `next`
3644
+
3645
+ Anatomy:
3646
+
3647
+ ```
3648
+ <kui-steps>
3649
+ root
3650
+ list
3651
+ item (repeated)
3652
+ trigger
3653
+ indicator (optional)
3654
+ separator (optional)
3655
+ content (repeated)
3656
+ completed (optional)
3657
+ previous (optional)
3658
+ next (optional)
3659
+ ```
3660
+
3661
+ Attributes and CSS variables, by part:
3662
+
3663
+ - root: A task in steps, taken in order.
3664
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
3665
+ - `data-complete`: Present once every step is done.
3666
+ - list: The row of steps: the arrows move between their triggers.
3667
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
3668
+ - item: One step of the row, around its trigger and its separator.
3669
+ - `data-current`: Present on the step that is shown.
3670
+ - `data-complete`: Present on a step that is done: one before the step shown.
3671
+ - `data-incomplete`: Present on a step still to come.
3672
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
3673
+ - trigger: Names a step, and goes to it when pressed.
3674
+ - `data-current`: Present on the step that is shown.
3675
+ - `data-complete`: Present on a step that is done: one before the step shown.
3676
+ - `data-incomplete`: Present on a step still to come.
3677
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
3678
+ - `data-disabled`: Present when it is disabled.
3679
+ - indicator: A step's mark: its number, or a tick once it is done.
3680
+ - `data-current`: Present on the step that is shown.
3681
+ - `data-complete`: Present on a step that is done: one before the step shown.
3682
+ - `data-incomplete`: Present on a step still to come.
3683
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
3684
+ - separator: The line from a step to the next.
3685
+ - `data-current`: Present on the step that is shown.
3686
+ - `data-complete`: Present on a step that is done: one before the step shown.
3687
+ - `data-incomplete`: Present on a step still to come.
3688
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
3689
+ - content: What a step shows: hidden unless its step is the one shown.
3690
+ - `data-current`: Present on the step that is shown.
3691
+ - `data-complete`: Present on a step that is done: one before the step shown.
3692
+ - `data-incomplete`: Present on a step still to come.
3693
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
3694
+ - completed: What is shown once every step is done.
3695
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
3696
+ - previous: Goes to the step before.
3697
+ - `data-disabled`: Present when it is disabled.
3698
+ - next: Goes to the step after; from the last, to all of them done.
3699
+ - `data-disabled`: Present when it is disabled.
3700
+
2797
3701
  ### Switch
2798
3702
 
2799
3703
  ```
@@ -2812,6 +3716,7 @@ Attributes of the element (each also a property, in camel case):
2812
3716
  - `name` (string): With a name, the control is submitted with the form around it when it is checked.
2813
3717
  - `form` (string): The id of the form the control belongs to, when it is not inside it.
2814
3718
  - `value` (string): What is submitted. Default `"on"`, as a native checkbox's.
3719
+ - `kui-id` (string): The id of the switch's hidden native checkbox, not of the switch: a `<label for>` names it. Inside a `Field`, that input takes the field's id instead.
2815
3720
 
2816
3721
  Events:
2817
3722
 
@@ -2838,12 +3743,24 @@ Attributes and CSS variables, by part:
2838
3743
  - `data-disabled`: Present when it is disabled.
2839
3744
  - `data-readonly`: Present when it can be read but not changed.
2840
3745
  - `data-required`: Present when the form needs it.
3746
+ - `data-touched`: Inside a Field: present once focus has left the control.
3747
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3748
+ - `data-filled`: Inside a Field: present while the control has a value.
3749
+ - `data-focused`: Inside a Field: present while the control has focus.
3750
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3751
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2841
3752
  - thumb: The knob that moves along the track.
2842
3753
  - `data-checked`: Present when it is checked.
2843
3754
  - `data-unchecked`: Present when it is not checked.
2844
3755
  - `data-disabled`: Present when it is disabled.
2845
3756
  - `data-readonly`: Present when it can be read but not changed.
2846
3757
  - `data-required`: Present when the form needs it.
3758
+ - `data-touched`: Inside a Field: present once focus has left the control.
3759
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3760
+ - `data-filled`: Inside a Field: present while the control has a value.
3761
+ - `data-focused`: Inside a Field: present while the control has focus.
3762
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3763
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2847
3764
 
2848
3765
  ### Tabs
2849
3766
 
@@ -2894,6 +3811,7 @@ Attributes and CSS variables, by part:
2894
3811
  - `data-active`: Present on the tab whose panel is shown.
2895
3812
  - `data-disabled`: Present when it is disabled.
2896
3813
  - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
3814
+ - `data-activation-direction="left | right | up | down | none"`: Where the newly active tab is from the one before, for a panel or a mark that slides.
2897
3815
  - indicator: A mark for the active tab: it carries that tab's position and size.
2898
3816
  - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2899
3817
  - `data-activation-direction="left | right | up | down | none"`: Where the newly active tab is from the one before, for a panel or a mark that slides.
@@ -2905,24 +3823,195 @@ Attributes and CSS variables, by part:
2905
3823
  - `--active-tab-height`: The active tab's height.
2906
3824
  - panel: A tab's content. In the page while its tab is active, and through its exit.
2907
3825
  - `data-hidden`: Present while its tab is not the active one.
3826
+ - `data-index`: The panel's place among the panels in the page, from 0, once it is in the page.
2908
3827
  - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2909
3828
  - `data-activation-direction="left | right | up | down | none"`: Where the newly active tab is from the one before, for a panel or a mark that slides.
2910
3829
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2911
3830
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2912
3831
 
3832
+ ### TagsInput
3833
+
3834
+ ```
3835
+ import "@kirana-ui/web/tags-input"
3836
+ ```
3837
+
3838
+ `<kui-tags-input>`: `<kui-tags-input>` around `kui-part="root"`, which holds a `list` with a `<template kui-each="items">` for a tag (`{value}` is its text, `{index}` its place): an `item` holding its `item-text`, which says the tag unless the page wrote something, and optionally an `item-input` to edit it in place and an `item-remove` button. Beside the list, the `input` a new tag is typed in and a `clear` button. The root draws the hidden inputs a form reads, as its last children. `value` and `default-value` (with commas between), `max`, `allow-duplicates`, `delimiter`, `add-on-blur`, `add-on-paste`, `editable`, `disabled`, `read-only`, `required`, `name`, `form`; `validate`, and `delimiter` when it is a pattern, as properties. It tells `value-change`, and `value-invalid` (`detail.text`, `detail.reason`) for a text that was not made a tag.
3839
+
3840
+ Attributes of the element (each also a property, in camel case):
3841
+
3842
+ - `value` (string): The tags, in order.
3843
+ - `default-value` (string): The tags it starts with, when the caller does not hold `value`. Read once.
3844
+ - `max` (number): How many tags it holds at most.
3845
+ - `allow-duplicates` (boolean): Whether the same text may be a tag twice. Default `false`.
3846
+ - `delimiter` (string): What ends a tag as it is typed or pasted, beside Enter. Default `","`. `null` for nothing.
3847
+ - `add-on-blur` (boolean): Whether what is typed becomes a tag as focus leaves the input. Default `false`.
3848
+ - `add-on-paste` (boolean): Whether a pasted text is cut into tags at its delimiters and line ends. Default `true`.
3849
+ - `editable` (boolean): Whether a tag can be edited in place, by two presses or Enter on it. Default `true`.
3850
+ - `disabled` (boolean): Disabled: nothing can be added or taken away.
3851
+ - `read-only` (boolean): Shown as they are, focusable, not changeable.
3852
+ - `required` (boolean): Needed: in a `Field`, holding none is then invalid.
3853
+ - `name` (string): With a name, each tag is submitted under it with the form around them.
3854
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
3855
+
3856
+ Properties only:
3857
+
3858
+ - `validate`: Whether a text may be a tag. Asked after the text is trimmed, and not for an empty one.
3859
+
3860
+ Events:
3861
+
3862
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
3863
+
3864
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3865
+
3866
+ - `root`
3867
+ - `list`
3868
+ - `item`
3869
+ - `item-text`
3870
+ - `item-input`
3871
+ - `item-remove`
3872
+ - `input`
3873
+ - `clear`
3874
+
3875
+ Lists (`<template kui-each="…">`): `items`.
3876
+
3877
+ Anatomy:
3878
+
3879
+ ```
3880
+ <kui-tags-input>
3881
+ root
3882
+ list
3883
+ <template kui-each="items">
3884
+ item (repeated)
3885
+ item-text
3886
+ item-input (optional)
3887
+ item-remove (optional)
3888
+ input
3889
+ clear (optional)
3890
+ ```
3891
+
3892
+ Attributes and CSS variables, by part:
3893
+
3894
+ - root: Several short texts held as tags, and the input a new one is typed in. It holds the hidden inputs a form reads.
3895
+ - `data-disabled`: Present when it is disabled.
3896
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
3897
+ - `data-required`: Present when a tag is needed.
3898
+ - `data-focused`: Present while focus is on a tag or in the input.
3899
+ - `data-empty`: Present while it holds no tag.
3900
+ - list: What holds the tags: a list.
3901
+ - `data-disabled`: Present when it is disabled.
3902
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
3903
+ - `data-required`: Present when a tag is needed.
3904
+ - item: A tag: reached with the arrows, taken away with Backspace or Delete.
3905
+ - `data-disabled`: Present when it is disabled.
3906
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
3907
+ - `data-required`: Present when a tag is needed.
3908
+ - `data-editing`: Present while the tag is edited.
3909
+ - itemText: A tag's text: hidden while the tag is edited.
3910
+ - `data-disabled`: Present when it is disabled.
3911
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
3912
+ - `data-required`: Present when a tag is needed.
3913
+ - itemInput: Where a tag is edited in place: hidden unless it is being edited.
3914
+ - `data-disabled`: Present when it is disabled.
3915
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
3916
+ - `data-required`: Present when a tag is needed.
3917
+ - itemRemove: A tag's button that takes it away.
3918
+ - `data-disabled`: Present when it is disabled.
3919
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
3920
+ - `data-required`: Present when a tag is needed.
3921
+ - input: Where a new tag is typed. In a `Field` it is what the field's label names.
3922
+ - `data-disabled`: Present when it is disabled.
3923
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
3924
+ - `data-required`: Present when a tag is needed.
3925
+ - clear: Takes every tag away: hidden while there is none.
3926
+ - `data-disabled`: Present when it is disabled.
3927
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
3928
+ - `data-required`: Present when a tag is needed.
3929
+
3930
+ ### TimeField
3931
+
3932
+ ```
3933
+ import "@kirana-ui/web/time-field"
3934
+ ```
3935
+
3936
+ `<kui-time-field>`: `<kui-time-field>` around `kui-part="root"`, which holds a `<template kui-each="segments">` with the `segment` each part of the time is typed in (`{type}` and `{index}` say which), and the hidden `input` a form reads. `value`, `default-value`, `granularity`, `hour-cycle`, `locale`, `min`, `max`, `disabled`, `read-only`, `required`, `name`, `form`; `placeholders` as a property; it tells `value-change`. Inside a `<kui-field>` it is the field's control.
3937
+
3938
+ Attributes of the element (each also a property, in camel case):
3939
+
3940
+ - `value` (string): The time typed, once all of it is; `null` until then.
3941
+ - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
3942
+ - `granularity` (string): To the minute (`HH:MM`, the default) or to the second (`HH:MM:SS`).
3943
+ - `hour-cycle` (number): A clock of 12 or 24 hours, whatever the locale's is.
3944
+ - `locale` (string): The language and region that order the parts, put what stands between them and say whether the clock has twelve hours or twenty-four (`"en-US"`: 12, with AM and PM). Give it: a server does not know the reader's.
3945
+ - `min` (string): The first time it takes: before it, it says it is invalid.
3946
+ - `max` (string): The last time it takes.
3947
+ - `disabled` (boolean): Disabled: it cannot be changed.
3948
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
3949
+ - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid.
3950
+ - `name` (string): The name it is submitted under, by its hidden input; in a `Field`, the field's by default.
3951
+ - `form` (string): The id of the form it belongs to, when it is not inside it.
3952
+
3953
+ Properties only:
3954
+
3955
+ - `placeholders`: What an empty part shows. Default: `hh`, `mm`, `ss`, and `--` for the day period.
3956
+
3957
+ Events:
3958
+
3959
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
3960
+
3961
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3962
+
3963
+ - `root`
3964
+ - `segment`
3965
+ - `input`
3966
+
3967
+ Lists (`<template kui-each="…">`): `segments`.
3968
+
3969
+ Anatomy:
3970
+
3971
+ ```
3972
+ <kui-time-field>
3973
+ root
3974
+ <template kui-each="segments">
3975
+ segment (repeated)
3976
+ input
3977
+ ```
3978
+
3979
+ Attributes and CSS variables, by part:
3980
+
3981
+ - root: The field: a group of the time's parts.
3982
+ - `data-disabled`: Present when it is disabled.
3983
+ - `data-readonly`: Present when its value cannot be changed.
3984
+ - `data-invalid`: Present when the time is outside what it takes, is asked for and half typed, or is wrong by its field.
3985
+ - `data-touched`: In a field: present once focus has left it.
3986
+ - `data-dirty`: In a field: present while the time is not the one it began with.
3987
+ - `data-filled`: In a field: present while it holds a time.
3988
+ - `data-focused`: In a field: present while one of its parts has focus.
3989
+ - `data-valid`: In a field: present once the time was checked and found right.
3990
+ - segment: One piece of the time: a part that is typed, or what stands between two.
3991
+ - `data-segment="hour | minute | second | dayPeriod | literal"`: Which piece it is: `dayPeriod` is AM or PM, on a clock of twelve hours.
3992
+ - `data-placeholder`: Present on a part that is empty.
3993
+ - `data-disabled`: Present when it is disabled.
3994
+ - `data-invalid`: Present when the time is outside what it takes, is asked for and half typed, or is wrong by its field.
3995
+ - `data-touched`: In a field: present once focus has left it.
3996
+ - `data-dirty`: In a field: present while the time is not the one it began with.
3997
+ - `data-filled`: In a field: present while it holds a time.
3998
+ - `data-focused`: In a field: present while one of its parts has focus.
3999
+ - `data-valid`: In a field: present once the time was checked and found right.
4000
+
2913
4001
  ### Toast
2914
4002
 
2915
4003
  ```
2916
4004
  import "@kirana-ui/web/toast"
2917
4005
  ```
2918
4006
 
2919
- `<kui-toast>`: `<kui-toast>` around a `kui-part="viewport"`, which holds a `<template kui-each="toasts">` with a `toast` for each message (`{id}`, `{type}`), its `content` with a `title` and a `description`, and a `close` and an `action` button. A `title`, a `description` and an `action` written empty say what the toast was added with, and are in the page only for a toast that has one; one written with something in it (`{title}`) is always there. `label`, `hotkey`, `swipe-direction`; `duration` and `limit` for the toaster it makes, or `toaster` as a property for one of the page's own. A title, a description and an action's label are strings.
4007
+ `<kui-toast>`: `<kui-toast>` around a `kui-part="viewport"`, which holds a `<template kui-each="toasts">` with a `toast` for each message (`{id}`, `{type}`), its `content` with a `title` and a `description`, and a `close` and an `action` button. A `title`, a `description` and an `action` written empty say what the toast was added with, and are in the page only for a toast that has one; one written with something in it (`{title}`) is always there. `label`, `hotkey`, `swipe-direction`; `timeout` (`duration`, its old name) and `limit` for the toaster it makes, or `toaster` as a property for one of the page's own. A title, a description and an action's label are strings.
2920
4008
 
2921
4009
  Attributes of the element (each also a property, in camel case):
2922
4010
 
2923
4011
  - `label` (string)
2924
4012
  - `hotkey` (string)
2925
4013
  - `swipe-direction` (string)
4014
+ - `timeout` (number)
2926
4015
  - `duration` (number)
2927
4016
  - `limit` (number)
2928
4017
 
@@ -2977,6 +4066,14 @@ Attributes and CSS variables, by part:
2977
4066
  - content: What holds a toast's contents, when the design sizes the toast itself.
2978
4067
  - `data-behind`: Present on a toast that is behind the newest.
2979
4068
  - `data-expanded`: Present while the pointer or focus is on the stack: the toasts are spread out, and wait.
4069
+ - title: What the toast is called: the title it was added with, when nothing else is written in it.
4070
+ - `data-type`: The kind the toast was added as.
4071
+ - description: What the toast says: the description it was added with, when nothing else is written in it.
4072
+ - `data-type`: The kind the toast was added as.
4073
+ - close: Closes the toast.
4074
+ - `data-type`: The kind the toast was added as.
4075
+ - action: A button of the toast's own: the action it was added with, when nothing else is written in it. Pressing it closes the toast too, unless the action refuses.
4076
+ - `data-type`: The kind the toast was added as.
2980
4077
 
2981
4078
  ### Toggle
2982
4079
 
@@ -3020,7 +4117,7 @@ Attributes and CSS variables, by part:
3020
4117
  import "@kirana-ui/web/toggle-group"
3021
4118
  ```
3022
4119
 
3023
- `<kui-toggle-group>`: `<kui-toggle-group>` around `kui-part="root"` and its `<kui-toggle>`s, each with a `value`. `value` and `default-value` (the pressed ones, with commas between), `multiple`, `disabled`, `orientation`, `loop`; it tells `value-change`.
4120
+ `<kui-toggle-group>`: `<kui-toggle-group>` around `kui-part="root"` and its `<kui-toggle>`s, each with a `value`. `value` and `default-value` (the pressed ones, with commas between), `multiple`, `disabled`, `orientation`, `loop-focus` (`loop` is its older name); it tells `value-change`.
3024
4121
 
3025
4122
  Attributes of the element (each also a property, in camel case):
3026
4123
 
@@ -3029,7 +4126,8 @@ Attributes of the element (each also a property, in camel case):
3029
4126
  - `multiple` (boolean): Whether more than one can be pressed at a time.
3030
4127
  - `disabled` (boolean): Disables every toggle of the group.
3031
4128
  - `orientation` (string): Whether the toggles are laid out across (the default) or down: the arrows that move between them follow.
3032
- - `loop` (boolean): Whether the arrows go round from the last toggle to the first. Default: they do.
4129
+ - `loop-focus` (boolean): Whether the arrows go round from the last toggle to the first. Default: they do.
4130
+ - `loop` (boolean): Whether the arrows wrap from the last item to the first.
3033
4131
 
3034
4132
  Events:
3035
4133
 
@@ -3059,19 +4157,20 @@ Attributes and CSS variables, by part:
3059
4157
  import "@kirana-ui/web/toolbar"
3060
4158
  ```
3061
4159
 
3062
- `<kui-toolbar>`: `<kui-toolbar>` around `kui-part="root"` and its items: a `button`, a `link`, an `input`, a `group`, a `separator` (`kui-disabled` on one that is off), and `<kui-toggle>`s and `<kui-toggle-group>`s, which are the toolbar's items too. One stop for Tab; the arrows move between them. `orientation`, `loop`, `disabled`.
4160
+ `<kui-toolbar>`
3063
4161
 
3064
4162
  Attributes of the element (each also a property, in camel case):
3065
4163
 
3066
4164
  - `orientation` (string): Whether the controls are laid out across (the default) or down: the arrows that move between them follow.
3067
- - `loop` (boolean): Whether the arrows go round from the last item to the first. Default: they do.
4165
+ - `loop-focus` (boolean): Whether the arrows go round from the last item to the first. Default: they do.
4166
+ - `loop` (boolean): Whether the arrows wrap from the last item to the first.
3068
4167
  - `disabled` (boolean): Disables every control of the toolbar.
3069
4168
 
3070
4169
  Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3071
4170
 
3072
4171
  - `root`
3073
- - `button`: `kui-disabled`, `kui-label`
3074
- - `input`: `kui-disabled`, `kui-label`
4172
+ - `button`: `kui-disabled`, `kui-focusable-when-disabled`, `kui-label`
4173
+ - `input`: `kui-disabled`, `kui-focusable-when-disabled`, `kui-label`
3075
4174
  - `group`: `kui-disabled`, `kui-label`
3076
4175
  - `link`
3077
4176
  - `separator`
@@ -3096,12 +4195,14 @@ Attributes and CSS variables, by part:
3096
4195
  - button: A button of the toolbar.
3097
4196
  - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3098
4197
  - `data-disabled`: Present when it is disabled.
4198
+ - `data-focusable`: Present when it stays focusable while disabled: the arrows still reach it.
3099
4199
  - link: A link of the toolbar.
3100
4200
  - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3101
4201
  - `data-disabled`: Present when it is disabled.
3102
4202
  - input: A text input of the toolbar. The arrows are its own until the caret is at an end.
3103
4203
  - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3104
4204
  - `data-disabled`: Present when it is disabled.
4205
+ - `data-focusable`: Present when it stays focusable while disabled: the arrows still reach it.
3105
4206
  - group: Items that belong together.
3106
4207
  - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3107
4208
  - `data-disabled`: Present when it is disabled.
@@ -3150,16 +4251,20 @@ Attributes and CSS variables, by part:
3150
4251
 
3151
4252
  - trigger: The element the tooltip describes.
3152
4253
  - `data-popup-open`: Present when the tooltip is open.
4254
+ - `data-trigger-disabled`: Present when the tooltip is disabled: the pointer and focus on the trigger do not open it.
3153
4255
  - positioner: Places the popup against the trigger. It carries the geometry.
3154
4256
  - `data-open`: Present when it is open.
3155
4257
  - `data-closed`: Present when it is closed.
3156
4258
  - `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.
3157
4259
  - `data-align="start | center | end"`: How it is aligned with the anchor.
4260
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
3158
4261
  - `--anchor-width`: The anchor's width.
3159
4262
  - `--anchor-height`: The anchor's height.
3160
4263
  - `--available-width`: The width between the anchor and the edge of the viewport.
3161
4264
  - `--available-height`: The height between the anchor and the edge of the viewport.
3162
4265
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
4266
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
4267
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
3163
4268
  - popup: The tooltip itself.
3164
4269
  - `data-open`: Present when it is open.
3165
4270
  - `data-closed`: Present when it is closed.
@@ -3169,6 +4274,182 @@ Attributes and CSS variables, by part:
3169
4274
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3170
4275
  - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
3171
4276
  - arrow: An element that points at the trigger, placed along the popup's edge.
4277
+ - `data-open`: Present when it is open.
4278
+ - `data-closed`: Present when it is closed.
3172
4279
  - `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.
3173
4280
  - `data-align="start | center | end"`: How it is aligned with the anchor.
4281
+ - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
3174
4282
  - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
4283
+
4284
+ ### Tour
4285
+
4286
+ ```
4287
+ import "@kirana-ui/web/tour"
4288
+ ```
4289
+
4290
+ `<kui-tour>`: `<kui-tour>` around a `kui-part="portal"`, drawn at the end of the page while a step is shown, which holds a `spotlight` and a `positioner` (`kui-side`, `kui-align`, `kui-side-offset` and the like) around the `popup`, with an `arrow`, a `title`, a `description`, and `previous`, `next` and `close` buttons. What a step says is the page's to write: its `controller` has the step shown (`shown`), its place (`current`) and how many there are (`total`). `steps` as a property; `open`, `default-open`, `step`, `default-step`, `wait-for-target`, `spotlight-padding`, `close-on-outside-press`, `interactive`, `keyboard-navigation`; it tells `open-change` and `step-change`.
4291
+
4292
+ Attributes of the element (each also a property, in camel case):
4293
+
4294
+ - `open` (boolean): Whether it is open, when the caller holds it.
4295
+ - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
4296
+ - `step` (number): The index of the step shown, from 0, when the caller holds it.
4297
+ - `default-step` (number): The step it starts at, when the caller does not hold `step`. Read once. Default 0.
4298
+ - `wait-for-target` (number): How long a step whose target is not in the page waits for it, in milliseconds, before it is shown in the middle of the viewport. Default 1000.
4299
+ - `spotlight-padding` (number): The room between the target and the edge of the spotlight's hole, in pixels. Default 4.
4300
+ - `close-on-outside-press` (boolean): Whether a press on the dimmed page ends the tour. Default `false`.
4301
+ - `interactive` (boolean): Whether the target can be used while its step is shown: pressed, focused, typed in. Default `false`: the target is seen, not used, and the rest of the page is inert either way.
4302
+ - `keyboard-navigation` (boolean): Whether ArrowRight and ArrowLeft go on and back a step. Default `true`.
4303
+
4304
+ Properties only:
4305
+
4306
+ - `steps`: The steps, in order.
4307
+
4308
+ Events:
4309
+
4310
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
4311
+ - `step-change`: `event.detail.step`, with `event.detail.details`. `preventDefault()` keeps `step` as it was.
4312
+
4313
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
4314
+
4315
+ - `spotlight`
4316
+ - `positioner`: `kui-align`, `kui-align-offset`, `kui-anchor`, `kui-arrow-padding`, `kui-collision-boundary`, `kui-collision-padding`, `kui-position-method`, `kui-side`, `kui-side-offset`, `kui-sticky`
4317
+ - `popup`
4318
+ - `arrow`
4319
+ - `title`
4320
+ - `description`
4321
+ - `previous`
4322
+ - `next`
4323
+ - `close`
4324
+
4325
+ Anatomy:
4326
+
4327
+ ```
4328
+ <kui-tour>
4329
+ portal
4330
+ spotlight
4331
+ positioner
4332
+ popup
4333
+ arrow
4334
+ title
4335
+ description
4336
+ previous
4337
+ next
4338
+ close
4339
+ ```
4340
+
4341
+ Attributes and CSS variables, by part:
4342
+
4343
+ - spotlight: A layer over the page with a hole over the step's target, which the design draws from its variables (a clip path, or a box with a large shadow). A press on it is a press outside the tour. While the target can be used (`interactive`), presses go through it.
4344
+ - `data-open`: Present when it is open.
4345
+ - `data-closed`: Present when it is closed.
4346
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
4347
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
4348
+ - `data-centered`: Present while the step shown has no target in the page: the popup stands in the middle of the viewport.
4349
+ - `--spotlight-left`: The hole's left edge, from the spotlight's own left edge: the target's, less `spotlightPadding`.
4350
+ - `--spotlight-top`: The hole's top edge, from the spotlight's own top edge: the target's, less `spotlightPadding`.
4351
+ - `--spotlight-width`: The hole's width: the target's, with `spotlightPadding` on each side.
4352
+ - `--spotlight-height`: The hole's height: the target's, with `spotlightPadding` on each side. With no target, the hole is a point in the middle.
4353
+ - positioner: Places the popup against the step's target, or in the middle of the viewport for a step with none. It carries the geometry.
4354
+ - `data-open`: Present when it is open.
4355
+ - `data-closed`: Present when it is closed.
4356
+ - `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.
4357
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
4358
+ - `data-centered`: Present while the step shown has no target in the page: the popup stands in the middle of the viewport.
4359
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
4360
+ - `--anchor-width`: The anchor's width.
4361
+ - `--anchor-height`: The anchor's height.
4362
+ - `--available-width`: The width between the anchor and the edge of the viewport.
4363
+ - `--available-height`: The height between the anchor and the edge of the viewport.
4364
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
4365
+ - popup: The step itself: a dialog that stays in the page from the first step to the last, and moves.
4366
+ - `data-open`: Present when it is open.
4367
+ - `data-closed`: Present when it is closed.
4368
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
4369
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
4370
+ - `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.
4371
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
4372
+ - `data-centered`: Present while the step shown has no target in the page: the popup stands in the middle of the viewport.
4373
+ - arrow: An element that points at the target, placed along the popup's edge.
4374
+ - `data-open`: Present when it is open.
4375
+ - `data-closed`: Present when it is closed.
4376
+ - `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.
4377
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
4378
+ - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the target's centre.
4379
+ - `data-centered`: Present while the step shown has no target in the page: the popup stands in the middle of the viewport.
4380
+ - previous: A button that goes back a step. On the first step it does nothing.
4381
+ - `data-disabled`: Present when it is disabled.
4382
+ - next: A button that goes on a step. On the last step it finishes the tour.
4383
+ - `data-last`: Present on the last step: a press finishes the tour.
4384
+
4385
+ ### Tree
4386
+
4387
+ ```
4388
+ import "@kirana-ui/web/tree"
4389
+ ```
4390
+
4391
+ `<kui-tree>`: `<kui-tree>` around `kui-part="root"` and its nodes: each an `item` (`kui-value`, and `kui-branch`, `kui-disabled`, `kui-loading`, `kui-label` as it needs), nested as the page nests them, holding an `item-row` with an `item-indicator` and an `item-text`, and, for a branch, a `group` of its children, in the page while the branch is open (`kui-keep-mounted` keeps it). A node's depth is read from the nodes around it. `expanded-value`, `default-expanded-value`, `selected-value` and `default-selected-value` (with commas between), `selection-mode`, `expand-on-click`; it tells `expanded-change` and `selected-change`.
4392
+
4393
+ Attributes of the element (each also a property, in camel case):
4394
+
4395
+ - `expanded-value` (string): The values of the open branches.
4396
+ - `default-expanded-value` (string): The branches open at first, when the caller does not hold `expandedValue`. Read once.
4397
+ - `selected-value` (string): The values of the chosen nodes.
4398
+ - `default-selected-value` (string): The nodes chosen at first, when the caller does not hold `selectedValue`. Read once.
4399
+ - `selection-mode` (string): Whether nodes can be chosen: none, one, or several. Default `single`.
4400
+ - `expand-on-click` (boolean): Whether a press on a branch (or Enter on it) also opens or closes it. Default `true`.
4401
+
4402
+ Events:
4403
+
4404
+ - `expanded-change`: `event.detail.expandedValue`, with `event.detail.details`. `preventDefault()` keeps `expandedValue` as it was.
4405
+ - `selected-change`: `event.detail.selectedValue`, with `event.detail.details`. `preventDefault()` keeps `selectedValue` as it was.
4406
+
4407
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
4408
+
4409
+ - `root`
4410
+ - `item`: `kui-branch`, `kui-disabled`, `kui-label`, `kui-loading`, `kui-part`, `kui-value`
4411
+ - `item-row`: `kui-branch`, `kui-disabled`, `kui-label`, `kui-loading`, `kui-part`, `kui-value`
4412
+ - `item-indicator`: `kui-branch`, `kui-disabled`, `kui-label`, `kui-loading`, `kui-part`, `kui-value`
4413
+ - `item-text`: `kui-branch`, `kui-disabled`, `kui-label`, `kui-loading`, `kui-part`, `kui-value`
4414
+ - `group`: `kui-branch`, `kui-disabled`, `kui-label`, `kui-loading`, `kui-part`, `kui-value`
4415
+
4416
+ Anatomy:
4417
+
4418
+ ```
4419
+ <kui-tree>
4420
+ root
4421
+ item (repeated)
4422
+ item-row (optional)
4423
+ item-indicator
4424
+ item-text
4425
+ group
4426
+ item (repeated, as above)
4427
+ ```
4428
+
4429
+ Attributes and CSS variables, by part:
4430
+
4431
+ - item: One node, a `treeitem`: a leaf, or a branch that holds its row and its group. Its `value` tells it from the others; its depth, and its place among its siblings, are read from the page.
4432
+ - `data-selected`: Present on a chosen node.
4433
+ - `data-highlighted`: Present on the node focus is on, while it is in the tree.
4434
+ - `data-disabled`: Present when it is disabled.
4435
+ - `data-open`: Present on a branch that is open.
4436
+ - `data-closed`: Present on a branch that is closed.
4437
+ - `data-loading`: Present on a branch that says its children are being loaded.
4438
+ - itemRow: The line a node draws, apart from the children its group holds: what a design gives a background.
4439
+ - `data-selected`: Present on a chosen node.
4440
+ - `data-highlighted`: Present on the node focus is on, while it is in the tree.
4441
+ - `data-disabled`: Present when it is disabled.
4442
+ - `data-open`: Present on a branch that is open.
4443
+ - `data-closed`: Present on a branch that is closed.
4444
+ - `data-loading`: Present on a branch that says its children are being loaded.
4445
+ - itemIndicator: The mark that says whether a branch is open. A press on it opens or closes the branch and chooses nothing.
4446
+ - `data-open`: Present on a branch that is open.
4447
+ - `data-closed`: Present on a branch that is closed.
4448
+ - `data-loading`: Present on a branch that says its children are being loaded.
4449
+ - group: A branch's children. In the page while the branch is open, and through its exit's motion.
4450
+ - `data-open`: Present when it is open.
4451
+ - `data-closed`: Present when it is closed.
4452
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
4453
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
4454
+ - `--tree-group-height`: The group's content height while it opens or closes, `auto` once it is open.
4455
+ - `--tree-group-width`: The group's content width while it opens or closes, `auto` once it is open.