@kirana-ui/web 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/llms.txt +3174 -0
  2. package/package.json +14 -2
  3. package/skills/kirana-ui-primitives/SKILL.md +163 -0
  4. package/src/accordion.d.ts +18 -3
  5. package/src/accordion.js +5 -4
  6. package/src/accordion.js.map +1 -1
  7. package/src/agent.d.ts +1 -0
  8. package/src/agent.js +1 -0
  9. package/src/alert-dialog.d.ts +14 -3
  10. package/src/alert-dialog.js +6 -2
  11. package/src/alert-dialog.js.map +1 -1
  12. package/src/around.d.ts +37 -4
  13. package/src/around.js +72 -8
  14. package/src/around.js.map +1 -1
  15. package/src/autocomplete.d.ts +17 -3
  16. package/src/autocomplete.js +9 -4
  17. package/src/autocomplete.js.map +1 -1
  18. package/src/autosize.d.ts +10 -1
  19. package/src/autosize.js.map +1 -1
  20. package/src/avatar.d.ts +21 -3
  21. package/src/avatar.js +39 -10
  22. package/src/avatar.js.map +1 -1
  23. package/src/button.d.ts +10 -1
  24. package/src/button.js.map +1 -1
  25. package/src/calendar.d.ts +19 -5
  26. package/src/calendar.js +21 -9
  27. package/src/calendar.js.map +1 -1
  28. package/src/carousel.d.ts +10 -1
  29. package/src/carousel.js.map +1 -1
  30. package/src/checkbox-group.d.ts +22 -0
  31. package/src/checkbox-group.js +36 -0
  32. package/src/checkbox-group.js.map +1 -0
  33. package/src/checkbox.d.ts +16 -3
  34. package/src/checkbox.js +10 -4
  35. package/src/checkbox.js.map +1 -1
  36. package/src/collapsible.d.ts +10 -1
  37. package/src/collapsible.js.map +1 -1
  38. package/src/combobox.d.ts +37 -7
  39. package/src/combobox.js +52 -16
  40. package/src/combobox.js.map +1 -1
  41. package/src/command.d.ts +12 -2
  42. package/src/command.js +2 -1
  43. package/src/command.js.map +1 -1
  44. package/src/context-menu.d.ts +13 -1
  45. package/src/context-menu.js.map +1 -1
  46. package/src/date-field.d.ts +10 -1
  47. package/src/date-field.js.map +1 -1
  48. package/src/date-picker.d.ts +19 -4
  49. package/src/date-picker.js +14 -11
  50. package/src/date-picker.js.map +1 -1
  51. package/src/dates.d.ts +5 -2
  52. package/src/dates.js +50 -15
  53. package/src/dates.js.map +1 -1
  54. package/src/dialog.d.ts +14 -3
  55. package/src/dialog.js +6 -2
  56. package/src/dialog.js.map +1 -1
  57. package/src/drawer.d.ts +17 -1
  58. package/src/drawer.js.map +1 -1
  59. package/src/field.d.ts +8 -1
  60. package/src/field.js.map +1 -1
  61. package/src/fieldset.d.ts +10 -1
  62. package/src/fieldset.js.map +1 -1
  63. package/src/form.d.ts +13 -1
  64. package/src/form.js.map +1 -1
  65. package/src/hover-card.d.ts +10 -1
  66. package/src/hover-card.js.map +1 -1
  67. package/src/hover-popup.d.ts +2 -1
  68. package/src/hover-popup.js +2 -8
  69. package/src/hover-popup.js.map +1 -1
  70. package/src/index.d.ts +60 -1
  71. package/src/index.js +1 -0
  72. package/src/input.d.ts +12 -1
  73. package/src/input.js.map +1 -1
  74. package/src/label.d.ts +9 -1
  75. package/src/label.js.map +1 -1
  76. package/src/listbox.d.ts +15 -1
  77. package/src/listbox.js.map +1 -1
  78. package/src/menu.d.ts +15 -4
  79. package/src/menu.js +2 -8
  80. package/src/menu.js.map +1 -1
  81. package/src/menubar.d.ts +10 -1
  82. package/src/menubar.js.map +1 -1
  83. package/src/message-scroller.d.ts +10 -1
  84. package/src/message-scroller.js.map +1 -1
  85. package/src/meter.d.ts +10 -1
  86. package/src/meter.js.map +1 -1
  87. package/src/navigation-menu.d.ts +15 -4
  88. package/src/navigation-menu.js +7 -13
  89. package/src/navigation-menu.js.map +1 -1
  90. package/src/number-field.d.ts +18 -3
  91. package/src/number-field.js +23 -3
  92. package/src/number-field.js.map +1 -1
  93. package/src/otp.d.ts +12 -2
  94. package/src/otp.js +2 -1
  95. package/src/otp.js.map +1 -1
  96. package/src/pagination.d.ts +10 -1
  97. package/src/pagination.js.map +1 -1
  98. package/src/popover.d.ts +16 -3
  99. package/src/popover.js +35 -12
  100. package/src/popover.js.map +1 -1
  101. package/src/progress.d.ts +10 -1
  102. package/src/progress.js.map +1 -1
  103. package/src/qr-code.d.ts +8 -1
  104. package/src/qr-code.js.map +1 -1
  105. package/src/radio-group.d.ts +12 -2
  106. package/src/radio-group.js +9 -2
  107. package/src/radio-group.js.map +1 -1
  108. package/src/resizable.d.ts +10 -1
  109. package/src/resizable.js.map +1 -1
  110. package/src/runtime.d.ts +42 -4
  111. package/src/runtime.js +35 -7
  112. package/src/runtime.js.map +1 -1
  113. package/src/scroll-area.d.ts +13 -2
  114. package/src/scroll-area.js +3 -1
  115. package/src/scroll-area.js.map +1 -1
  116. package/src/select.d.ts +26 -5
  117. package/src/select.js +36 -11
  118. package/src/select.js.map +1 -1
  119. package/src/separator.d.ts +10 -1
  120. package/src/separator.js.map +1 -1
  121. package/src/slider.d.ts +20 -5
  122. package/src/slider.js +9 -8
  123. package/src/slider.js.map +1 -1
  124. package/src/switch.d.ts +12 -1
  125. package/src/switch.js.map +1 -1
  126. package/src/tabs.d.ts +10 -1
  127. package/src/tabs.js.map +1 -1
  128. package/src/testing.d.ts +1 -0
  129. package/src/testing.js +1 -0
  130. package/src/toast.d.ts +20 -7
  131. package/src/toast.js +28 -7
  132. package/src/toast.js.map +1 -1
  133. package/src/toggle-group.d.ts +16 -1
  134. package/src/toggle-group.js.map +1 -1
  135. package/src/toggle.d.ts +12 -1
  136. package/src/toggle.js.map +1 -1
  137. package/src/toolbar.d.ts +10 -1
  138. package/src/toolbar.js.map +1 -1
  139. package/src/tooltip.d.ts +10 -1
  140. package/src/tooltip.js.map +1 -1
package/llms.txt ADDED
@@ -0,0 +1,3174 @@
1
+ # @kirana-ui/web
2
+
3
+ > Kirana UI Primitives as custom elements, for a page with no framework: headless, accessible components with no styles of their own. The same components, parts, attributes and behaviour as on React, Vue, Svelte, Solid and Angular, from one core.
4
+
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
+
7
+ ## Install and entries
8
+
9
+ 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
+
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`).
12
+
13
+ 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
+
15
+ ## Using it
16
+
17
+ - Importing an entry defines its element: `import "@kirana-ui/web/dialog"`. `import "@kirana-ui/web"` defines them all.
18
+ - 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.
19
+ - 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
+ - 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
+ - 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
+ - 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>`.
23
+ - 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
+ - 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
+ - TypeScript knows each element by its tag (`document.querySelector("kui-dialog")`): its props as properties and its events with their `detail`.
26
+ - The types an event's `detail` and a property name (`ChangeDetails`, `Side`, `IsoDate` …) are exported by the package root, as types only: `import type { ChangeDetails } from "@kirana-ui/web"`. Nothing is imported from `@kirana-ui/core`, which a strict installer keeps out of a project's reach.
27
+ - Each component's "Anatomy" is where its parts go: a part is written inside the part it is indented under, with elements of your own between them where the design needs any. `(optional)` marks a wrapper that may be left out, what it holds then written where the wrapper would be; `(repeated)` a part written once for each entry (an item, a tab, a toast), or any number of times; `(as above)` a part drawn in full where it first appears. It is the library's own data (`inside`, `optional` and `repeated` on each part of `@kirana-ui/vocabulary`), held against the pages the library is tested with: write a part nowhere else. There the first line is the custom element, which holds a root that draws nothing; a `<template kui-each>` is a list; a `<kui-menu>` inside a menu's popup is its submenu.
28
+ - No CSS is shipped and no styles are injected. A part is styled by its element, its `class`, and the attributes and CSS variables listed for it below.
29
+ - A boolean state is an attribute that is present or absent (`[data-open]`), never `="false"`.
30
+ - An entrance starts from `[data-starting-style]` and an exit ends at `[data-ending-style]`: write the hidden style under both and transition between. A part leaves the page when its own motion has ended.
31
+ - A value is controlled when it is given (`value`) and the component's own when it is not (`defaultValue`). `open`/`defaultOpen` and the others pair the same way.
32
+ - A control with a `name` is submitted with the form around it and follows the form's reset. Inside a `Field` it is the field's control.
33
+
34
+ ### For a design system
35
+
36
+ - A design system's own element (a badge, a breadcrumb's link) is the page's own element, with its own classes and attributes: nothing of the library's is needed for it, and none is given, since a custom element's parts are the page's own elements too and are composed by writing them.
37
+ - Tooltips need no provider: one is open at a time across the page, and while one shows the next opens without its wait, by themselves. A tooltip waits 600 ms before it opens (a hover card 600 ms, and 300 ms before it closes). A design system whose tooltips open at once writes `delay="0"` on each `<kui-tooltip>`.
38
+
39
+ ## Elements
40
+
41
+ ### Accordion
42
+
43
+ ```
44
+ import "@kirana-ui/web/accordion"
45
+ ```
46
+
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`.
48
+
49
+ Attributes of the element (each also a property, in camel case):
50
+
51
+ - `value` (string): The values of the open items.
52
+ - `default-value` (string): Read once.
53
+ - `multiple` (boolean): Whether several items can be open at once. Default `false`: opening one closes the others.
54
+ - `disabled` (boolean): Disables every item: none can be opened or closed.
55
+ - `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`.
57
+
58
+ Events:
59
+
60
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
61
+
62
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
63
+
64
+ - `root`
65
+ - `item`: `kui-disabled`, `kui-value`
66
+ - `header`: `kui-disabled`, `kui-value`
67
+ - `trigger`: `kui-disabled`, `kui-value`
68
+ - `panel`: `kui-disabled`, `kui-value`
69
+
70
+ Anatomy:
71
+
72
+ ```
73
+ <kui-accordion>
74
+ root
75
+ item (repeated)
76
+ header
77
+ trigger
78
+ panel
79
+ ```
80
+
81
+ Attributes and CSS variables, by part:
82
+
83
+ - root: Groups the items.
84
+ - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
85
+ - `data-disabled`: Present when it is disabled.
86
+ - 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.
87
+ - `data-open`: Present when the item is open.
88
+ - `data-disabled`: Present when it is disabled.
89
+ - header: The heading that holds the trigger.
90
+ - `data-open`: Present when the item is open.
91
+ - `data-disabled`: Present when it is disabled.
92
+ - trigger: The button that opens and closes the item's panel.
93
+ - `data-panel-open`: Present when the item's panel is open.
94
+ - `data-disabled`: Present when it is disabled.
95
+ - panel: The item's content. In the page while open, and through its exit's motion.
96
+ - `data-open`: Present when it is open.
97
+ - `data-closed`: Present when it is closed.
98
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
99
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
100
+ - `data-disabled`: Present when it is disabled.
101
+ - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
102
+ - `--accordion-panel-height`: The panel's content height while it opens or closes, `auto` once it is open.
103
+ - `--accordion-panel-width`: The panel's content width while it opens or closes, `auto` once it is open.
104
+
105
+ ### AlertDialog
106
+
107
+ ```
108
+ import "@kirana-ui/web/alert-dialog"
109
+ ```
110
+
111
+ `<kui-alert-dialog>`: `<kui-alert-dialog>`: a dialog that asks, with the dialog's parts, its `viewport` too. A press outside does not close it. `open`, `default-open`; it tells `open-change`.
112
+
113
+ Attributes of the element (each also a property, in camel case):
114
+
115
+ - `open` (boolean): Whether it is open, when the caller holds it.
116
+ - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
117
+
118
+ Events:
119
+
120
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
121
+
122
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
123
+
124
+ - `trigger`
125
+ - `backdrop`
126
+ - `viewport`
127
+ - `popup`
128
+ - `title`
129
+ - `description`
130
+ - `close`
131
+
132
+ Anatomy:
133
+
134
+ ```
135
+ <kui-alert-dialog>
136
+ trigger
137
+ portal
138
+ backdrop
139
+ viewport (optional)
140
+ popup
141
+ title
142
+ description
143
+ close
144
+ ```
145
+
146
+ Attributes and CSS variables, by part:
147
+
148
+ - trigger: The button that opens the dialog.
149
+ - `data-popup-open`: Present when the dialog is open.
150
+ - backdrop: The layer over the page behind the dialog.
151
+ - `data-open`: Present when it is open.
152
+ - `data-closed`: Present when it is closed.
153
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
154
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
155
+ - viewport: What a long dialog scrolls in: it lies over the page, between the backdrop and the popup. A press on it beside the popup is a press outside the dialog; a press on its scrollbar is not.
156
+ - `data-open`: Present when it is open.
157
+ - `data-closed`: Present when it is closed.
158
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
159
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
160
+ - `data-nested`: Present when the dialog opened over another dialog.
161
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
162
+ - popup: The dialog itself.
163
+ - `data-open`: Present when it is open.
164
+ - `data-closed`: Present when it is closed.
165
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
166
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
167
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
168
+ - `--nested-dialogs`: How many dialogs are open above this one.
169
+
170
+ ### Autocomplete
171
+
172
+ ```
173
+ import "@kirana-ui/web/autocomplete"
174
+ ```
175
+
176
+ `<kui-autocomplete>`: `<kui-autocomplete>`: a combobox whose text is the value, with a combobox's parts: the list only suggests. `value`, `default-value`, `open`, `default-open`, `mode`, `open-on-input-click`, `auto-highlight`, `disabled`, `read-only`, `required`, `name`, `form`; `filter` and `items` as properties (with `items`, the suggestions are a `<template kui-each="collection">`, as a combobox's); it tells `value-change` and `open-change`.
177
+
178
+ Attributes of the element (each also a property, in camel case):
179
+
180
+ - `value` (string): What the input says: the text is the value.
181
+ - `default-value` (string): The text it starts with, when the caller does not hold `value`. Read once.
182
+ - `open` (boolean): Whether the list is open, when the caller holds it.
183
+ - `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.
185
+ - `open-on-input-click` (boolean): Whether a press on the input opens the list. Default: it opens when something is typed.
186
+ - `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
+ - `disabled` (boolean): Disabled: it cannot be changed.
188
+ - `read-only` (boolean): Its text can be read and not changed: nothing typed is taken, no suggestion pressed is written in, and its clear button does nothing. The list still opens (by its button, the arrows, or a press with `openOnInputClick`) and can be gone through. It keeps focus, and its text is still submitted.
189
+ - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid.
190
+ - `name` (string): The input's name in the form around it.
191
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
192
+
193
+ Properties only:
194
+
195
+ - `filter`: Whether a suggestion is shown for what was typed; `null` shows every one.
196
+ - `items`: The suggestions as data, for a `Collection` to draw: a list of them with their labels, groups of them (`{ value, items }`, `value` the group's name), or the labels by value. The autocomplete filters them by what is typed (not with `mode: "none"`), and the `Collection` draws what is left.
197
+
198
+ Events:
199
+
200
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
201
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
202
+
203
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
204
+
205
+ - `input`
206
+ - `trigger`
207
+ - `value`: `kui-placeholder`
208
+ - `status`
209
+ - `clear`
210
+ - `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`
211
+ - `popup`
212
+ - `list`
213
+ - `empty`
214
+ - `group`: `kui-id`
215
+ - `group-label`
216
+ - `separator`
217
+ - `item`: `kui-disabled`, `kui-id`, `kui-label`, `kui-value`
218
+ - `chips`
219
+ - `chip`
220
+ - `chip-remove`
221
+ - `item-indicator`: `kui-value`
222
+
223
+ Lists (`<template kui-each="…">`): `collection`.
224
+
225
+ Anatomy:
226
+
227
+ ```
228
+ <kui-autocomplete>
229
+ input
230
+ trigger
231
+ portal
232
+ positioner
233
+ popup
234
+ list (optional)
235
+ <template kui-each="collection"> (optional)
236
+ item (repeated, as above)
237
+ group (optional, repeated, as above)
238
+ group (optional, repeated)
239
+ <template kui-each="collection"> (optional, as above)
240
+ item (repeated)
241
+ group-label
242
+ separator (repeated)
243
+ <template kui-each="collection"> (optional, as above)
244
+ empty
245
+ status (optional)
246
+ popup (as above)
247
+ status (optional, as above)
248
+ clear
249
+ ```
250
+
251
+ Attributes and CSS variables, by part:
252
+
253
+ - input: The text input: its text is the value, and what is typed asks for suggestions.
254
+ - `data-popup-open`: Present when the list is open.
255
+ - `data-disabled`: Present when it is disabled.
256
+ - `data-readonly`: Present when it can be read but not changed.
257
+ - 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
+ - `data-popup-open`: Present when the list is open.
259
+ - `data-disabled`: Present when it is disabled.
260
+ - `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.
262
+ - `data-open`: Present when it is open.
263
+ - `data-closed`: Present when it is closed.
264
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
266
+ - `--anchor-width`: The anchor's width.
267
+ - `--anchor-height`: The anchor's height.
268
+ - `--available-width`: The width between the anchor and the edge of the viewport.
269
+ - `--available-height`: The height between the anchor and the edge of the viewport.
270
+ - `--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.
272
+ - `data-open`: Present when it is open.
273
+ - `data-closed`: Present when it is closed.
274
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
275
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
276
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
278
+ - `data-empty`: Present when no item is shown for what was typed.
279
+ - list: The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
280
+ - `data-empty`: Present when no item is shown for what was typed.
281
+ - item: One suggestion: chosen, its text is written into the input.
282
+ - `data-selected`: Present on the chosen item.
283
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
284
+ - `data-disabled`: Present when it is disabled.
285
+ - clear: A button that empties the input and the value.
286
+ - `data-disabled`: Present when it is disabled.
287
+
288
+ ### Autosize
289
+
290
+ ```
291
+ import "@kirana-ui/web/autosize"
292
+ ```
293
+
294
+ `<kui-autosize>`: `<kui-autosize>` around a `kui-part="root"` textarea, which is as tall as what is written in it. `value` as a property, for a caller that holds the text: set, it is measured again.
295
+
296
+ Properties only:
297
+
298
+ - `value`
299
+
300
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
301
+
302
+ - `root`
303
+
304
+ Anatomy:
305
+
306
+ ```
307
+ <kui-autosize>
308
+ root
309
+ ```
310
+
311
+ ### Avatar
312
+
313
+ ```
314
+ import "@kirana-ui/web/avatar"
315
+ ```
316
+
317
+ `<kui-avatar>`: `<kui-avatar>` around `kui-part="root"`, an `image` (an `<img>`, in the page once the picture has loaded) and a `fallback`, in the page until then; `kui-delay="600"` on the fallback waits that many milliseconds first. `src`: the picture's address, on the component, since the image is not in the page to be given one. With `kui-keep-mounted` the image stays in the page, as Base UI's `keepMounted` image: its own `src` is the address, it loads the picture itself, and it is `aria-hidden` until it has (`data-loading`, `data-error`). It tells `loading-status-change` (`detail.status`) as the picture loads.
318
+
319
+ Attributes of the element (each also a property, in camel case):
320
+
321
+ - `src` (string)
322
+
323
+ Events:
324
+
325
+ - `loading-status-change`: `event.detail.status`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
326
+
327
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
328
+
329
+ - `root`
330
+ - `image`: `kui-keep-mounted`
331
+ - `fallback`: `kui-delay`
332
+
333
+ Anatomy:
334
+
335
+ ```
336
+ <kui-avatar>
337
+ root
338
+ image
339
+ fallback
340
+ ```
341
+
342
+ Attributes and CSS variables, by part:
343
+
344
+ - root: The frame the image and its stand-in share.
345
+ - `data-image-loading-status="idle | loading | loaded | error"`: Where the picture is in its loading: `idle` while it has no address.
346
+ - image: The picture. In the page once it has loaded; with `keepMounted` (on Angular, the attribute form) in the page all along, `aria-hidden` until it has loaded.
347
+ - `data-loading`: Present while the picture loads, on an image kept in the page.
348
+ - `data-error`: Present when the picture cannot load, on an image kept in the page.
349
+
350
+ ### Button
351
+
352
+ ```
353
+ import "@kirana-ui/web/button"
354
+ ```
355
+
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`.
357
+
358
+ Attributes of the element (each also a property, in camel case):
359
+
360
+ - `disabled` (boolean): Disabled: a press does nothing.
361
+ - `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.
363
+
364
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
365
+
366
+ - `root`
367
+
368
+ Anatomy:
369
+
370
+ ```
371
+ <kui-button>
372
+ root
373
+ ```
374
+
375
+ Attributes and CSS variables, by part:
376
+
377
+ - root: The button.
378
+ - `data-disabled`: Present when it is disabled.
379
+
380
+ ### Calendar
381
+
382
+ ```
383
+ import "@kirana-ui/web/calendar"
384
+ ```
385
+
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`.
387
+
388
+ Attributes of the element (each also a property, in camel case):
389
+
390
+ - `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
+ - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
392
+ - `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).
393
+ - `min-days` (number): With `mode: "multiple"`: the fewest days that can be left chosen. A press that would leave fewer does nothing.
394
+ - `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
+ - `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`.
396
+ - `paged-navigation` (boolean): With several `months`: whether Previous and Next turn them all (a page) rather than one month. Off by default, as in react-day-picker.
397
+ - `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
+ - `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
+ - `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.
401
+ - `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
+ - `min` (string): The first and the last day that can be chosen.
403
+ - `max` (string): The last day that can be chosen.
404
+ - `disabled` (boolean): Disabled: no day can be chosen.
405
+ - `read-only` (boolean): Shown as it is: the days can be moved through, and none can be chosen.
406
+ - `fixed-weeks` (boolean): Always six rows, so the calendar is one height in every month.
407
+ - `name` (string): The name its hidden input submits the value under: a day; the first and the last of a range, as two entries; each day of a list.
408
+ - `form` (string): The id of the form it belongs to, when it is not inside it.
409
+
410
+ Properties only:
411
+
412
+ - `isDateUnavailable`: Days that cannot be chosen, though they can be reached: a day off, a day taken.
413
+
414
+ Events:
415
+
416
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
417
+ - `month-change`: `event.detail.month`, with `event.detail.details`. `preventDefault()` keeps `month` as it was.
418
+
419
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
420
+
421
+ - `root`
422
+ - `input`
423
+ - `heading`
424
+ - `previous`
425
+ - `next`
426
+ - `grid`
427
+ - `head-cell`
428
+ - `cell`
429
+ - `day`
430
+
431
+ Lists (`<template kui-each="…">`): `weekdays`, `months`, `weeks`, `days`.
432
+
433
+ Anatomy:
434
+
435
+ ```
436
+ <kui-calendar>
437
+ root
438
+ <template kui-each="months"> (optional)
439
+ heading
440
+ grid
441
+ <template kui-each="weekdays">
442
+ head-cell (repeated)
443
+ <template kui-each="weeks">
444
+ <template kui-each="days">
445
+ cell (repeated)
446
+ day
447
+ previous
448
+ next
449
+ input
450
+ ```
451
+
452
+ Attributes and CSS variables, by part:
453
+
454
+ - root: The calendar.
455
+ - `data-disabled`: Present when it is disabled.
456
+ - `data-readonly`: Present when its value cannot be changed.
457
+ - previous: Shows the month before.
458
+ - `data-disabled`: Present when it is disabled.
459
+ - next: Shows the month after.
460
+ - `data-disabled`: Present when it is disabled.
461
+ - 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.
463
+ - `data-today`: Present on today.
464
+ - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
465
+ - `data-disabled`: Present when it is disabled.
466
+ - `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.
469
+ - 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.
471
+ - `data-today`: Present on today.
472
+ - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
473
+ - `data-disabled`: Present when it is disabled.
474
+ - `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.
477
+
478
+ ### Carousel
479
+
480
+ ```
481
+ import "@kirana-ui/web/carousel"
482
+ ```
483
+
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`.
485
+
486
+ Attributes of the element (each also a property, in camel case):
487
+
488
+ - `index` (number): Which slide is at the start of the view, from 0.
489
+ - `default-index` (number): The slide it starts at, when the caller does not hold `index`. Read once.
490
+ - `orientation` (string): Whether the slides go across (the default) or down.
491
+ - `loop` (boolean): Whether going on from the last slide comes round to the first.
492
+
493
+ Events:
494
+
495
+ - `index-change`: `event.detail.index`, with `event.detail.details`. `preventDefault()` keeps `index` as it was.
496
+
497
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
498
+
499
+ - `root`
500
+ - `viewport`
501
+ - `item`: `kui-index`
502
+ - `previous`
503
+ - `next`
504
+ - `indicator`: `kui-index`
505
+
506
+ Anatomy:
507
+
508
+ ```
509
+ <kui-carousel>
510
+ root
511
+ viewport
512
+ item (repeated)
513
+ previous
514
+ next
515
+ indicator (repeated)
516
+ ```
517
+
518
+ Attributes and CSS variables, by part:
519
+
520
+ - root: The carousel: a region, named by the caller.
521
+ - `data-orientation="horizontal | vertical"`: Whether the slides go across or down.
522
+ - viewport: What scrolls. The slides are its children; the design snaps them (`scroll-snap-type`) and says whether a step glides (`scroll-behavior`).
523
+ - `data-orientation="horizontal | vertical"`: Whether the slides go across or down.
524
+ - item: One slide.
525
+ - `data-orientation="horizontal | vertical"`: Whether the slides go across or down.
526
+ - `data-current`: Present on the slide the view is at, and on its button.
527
+ - previous: Goes back a slide.
528
+ - `data-disabled`: Present when it is disabled.
529
+ - next: Goes on a slide.
530
+ - `data-disabled`: Present when it is disabled.
531
+ - indicator: A button for one slide.
532
+ - `data-current`: Present on the slide the view is at, and on its button.
533
+
534
+ ### Checkbox
535
+
536
+ ```
537
+ import "@kirana-ui/web/checkbox"
538
+ ```
539
+
540
+ `<kui-checkbox>`: `<kui-checkbox>` around a `kui-part="root"` button with an `indicator` inside, which is in the page while the box is checked or indeterminate. The root draws the hidden native input a form and a label reach. Inside a `<kui-checkbox-group>` it is one of the group's boxes, by its `value`, or with `parent` the one that stands for them all. `checked`, `default-checked`, `indeterminate`, `parent`, `disabled`, `read-only`, `required`, `name`, `form`, `value`; it tells `checked-change`.
541
+
542
+ Attributes of the element (each also a property, in camel case):
543
+
544
+ - `checked` (boolean): Whether it is checked, when the caller holds it.
545
+ - `default-checked` (boolean): Read once.
546
+ - `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.
548
+ - `disabled` (boolean): Disabled: it cannot be changed.
549
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
550
+ - `required` (boolean): Needed: in a `Field`, leaving it unchecked is then invalid.
551
+ - `name` (string): With a name, the control is submitted with the form around it when it is checked.
552
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
553
+ - `value` (string): What is submitted. Default `"on"`, as a native checkbox's.
554
+
555
+ Events:
556
+
557
+ - `checked-change`: `event.detail.checked`, with `event.detail.details`. `preventDefault()` keeps `checked` as it was.
558
+
559
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
560
+
561
+ - `root`
562
+ - `indicator`
563
+
564
+ Anatomy:
565
+
566
+ ```
567
+ <kui-checkbox>
568
+ root
569
+ indicator
570
+ ```
571
+
572
+ Attributes and CSS variables, by part:
573
+
574
+ - root: The box. It holds a hidden native checkbox, which a form and a label reach.
575
+ - `data-checked`: Present when it is checked.
576
+ - `data-unchecked`: Present when it is not checked.
577
+ - `data-indeterminate`: Present when it is neither checked nor unchecked.
578
+ - `data-disabled`: Present when it is disabled.
579
+ - `data-readonly`: Present when it can be read but not changed.
580
+ - `data-required`: Present when the form needs it.
581
+ - `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.
583
+ - `data-checked`: Present when it is checked.
584
+ - `data-unchecked`: Present when it is not checked.
585
+ - `data-indeterminate`: Present when it is neither checked nor unchecked.
586
+ - `data-disabled`: Present when it is disabled.
587
+ - `data-readonly`: Present when it can be read but not changed.
588
+ - `data-required`: Present when the form needs it.
589
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
590
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
591
+
592
+ ### CheckboxGroup
593
+
594
+ ```
595
+ import "@kirana-ui/web/checkbox-group"
596
+ ```
597
+
598
+ `<kui-checkbox-group>`: `<kui-checkbox-group>` around `kui-part="root"` and its `<kui-checkbox>`es, each with a `value`; one marked `parent` stands for every value of `all-values`. `value`, `default-value` and `all-values` (with commas between), `disabled`; it tells `value-change`.
599
+
600
+ Attributes of the element (each also a property, in camel case):
601
+
602
+ - `value` (string): The values of the checked checkboxes, when the caller holds them.
603
+ - `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.
605
+ - `disabled` (boolean): Disables every checkbox of the group.
606
+
607
+ Events:
608
+
609
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
610
+
611
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
612
+
613
+ - `root`
614
+
615
+ Anatomy:
616
+
617
+ ```
618
+ <kui-checkbox-group>
619
+ root
620
+ ```
621
+
622
+ Attributes and CSS variables, by part:
623
+
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`.
625
+ - `data-disabled`: Present when it is disabled.
626
+
627
+ ### Collapsible
628
+
629
+ ```
630
+ import "@kirana-ui/web/collapsible"
631
+ ```
632
+
633
+ `<kui-collapsible>`: `<kui-collapsible>` around `kui-part="root"`, a `trigger` button and a `panel`, which is in the page while it is open (`kui-keep-mounted` keeps it). `open`, `default-open`, `disabled`; it tells `open-change`.
634
+
635
+ Attributes of the element (each also a property, in camel case):
636
+
637
+ - `open` (boolean): Whether it is open, when the caller holds it.
638
+ - `default-open` (boolean): Read once.
639
+ - `disabled` (boolean): Disabled: its trigger does not open or close it.
640
+
641
+ Events:
642
+
643
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
644
+
645
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
646
+
647
+ - `root`
648
+ - `trigger`
649
+ - `panel`
650
+
651
+ Anatomy:
652
+
653
+ ```
654
+ <kui-collapsible>
655
+ root
656
+ trigger (repeated)
657
+ panel
658
+ ```
659
+
660
+ Attributes and CSS variables, by part:
661
+
662
+ - root: Groups the trigger and the panel.
663
+ - `data-open`: Present when it is open.
664
+ - `data-closed`: Present when it is closed.
665
+ - `data-disabled`: Present when it is disabled.
666
+ - trigger: The button that opens and closes the panel.
667
+ - `data-panel-open`: Present when the panel is open.
668
+ - `data-disabled`: Present when it is disabled.
669
+ - panel: The content. In the page while open, and through its exit's motion.
670
+ - `data-open`: Present when it is open.
671
+ - `data-closed`: Present when it is closed.
672
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
673
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
674
+ - `--collapsible-panel-height`: The panel's content height while it opens or closes, `auto` once it is open.
675
+ - `--collapsible-panel-width`: The panel's content width while it opens or closes, `auto` once it is open.
676
+
677
+ ### Combobox
678
+
679
+ ```
680
+ import "@kirana-ui/web/combobox"
681
+ ```
682
+
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`.
684
+
685
+ Attributes of the element (each also a property, in camel case):
686
+
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.
689
+ - `input-value` (string): What the input says.
690
+ - `default-input-value` (string): The text the input starts with, when the caller does not hold `inputValue`. Read once.
691
+ - `open` (boolean): Whether the list is open, when the caller holds it.
692
+ - `default-open` (boolean): Whether the list starts open, when the caller does not hold `open`. Read once.
693
+ - `disabled` (boolean): Disabled: it cannot be changed.
694
+ - `read-only` (boolean): Its value can be read and not changed. The list still opens and can be gone through, by the pointer and the arrows, but no press and no Enter chooses; nothing typed is taken, and its clear and chip buttons do nothing. It keeps focus, and its value is still submitted.
695
+ - `required` (boolean): In a field, "none" is then wrong.
696
+ - `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
+ - `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.
701
+ - `name` (string): With a name, the value is submitted with the form around it.
702
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
703
+
704
+ Properties only:
705
+
706
+ - `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
+ - `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).
708
+
709
+ Events:
710
+
711
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
712
+ - `values-change`: `event.detail.values`, with `event.detail.details`. `preventDefault()` keeps `values` as it was.
713
+ - `input-value-change`: `event.detail.inputValue`, with `event.detail.details`. `preventDefault()` keeps `inputValue` as it was.
714
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
715
+
716
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
717
+
718
+ - `input`
719
+ - `trigger`
720
+ - `value`: `kui-placeholder`
721
+ - `status`
722
+ - `clear`
723
+ - `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`
724
+ - `popup`
725
+ - `list`
726
+ - `empty`
727
+ - `group`: `kui-id`
728
+ - `group-label`
729
+ - `separator`
730
+ - `item`: `kui-disabled`, `kui-id`, `kui-label`, `kui-value`
731
+ - `chips`
732
+ - `chip`
733
+ - `chip-remove`
734
+ - `item-indicator`: `kui-value`
735
+
736
+ Lists (`<template kui-each="…">`): `chips`, `collection`.
737
+
738
+ Anatomy:
739
+
740
+ ```
741
+ <kui-combobox>
742
+ input
743
+ trigger
744
+ value (optional)
745
+ portal
746
+ positioner
747
+ popup
748
+ input (as above)
749
+ list (optional)
750
+ <template kui-each="collection"> (optional)
751
+ item (repeated, as above)
752
+ group (optional, repeated, as above)
753
+ group (optional, repeated)
754
+ <template kui-each="collection"> (optional, as above)
755
+ item (repeated)
756
+ item-indicator
757
+ group-label
758
+ separator (repeated)
759
+ <template kui-each="collection"> (optional, as above)
760
+ empty
761
+ status (optional)
762
+ popup (as above)
763
+ status (optional, as above)
764
+ clear
765
+ chips
766
+ input (as above)
767
+ chip (repeated)
768
+ chip-remove
769
+ ```
770
+
771
+ Attributes and CSS variables, by part:
772
+
773
+ - 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
+ - `data-popup-open`: Present when the list is open.
775
+ - `data-disabled`: Present when it is disabled.
776
+ - `data-readonly`: Present when it can be read but not changed.
777
+ - 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
+ - `data-popup-open`: Present when the list is open.
779
+ - `data-disabled`: Present when it is disabled.
780
+ - `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.
782
+ - `data-open`: Present when it is open.
783
+ - `data-closed`: Present when it is closed.
784
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
786
+ - `--anchor-width`: The anchor's width.
787
+ - `--anchor-height`: The anchor's height.
788
+ - `--available-width`: The width between the anchor and the edge of the viewport.
789
+ - `--available-height`: The height between the anchor and the edge of the viewport.
790
+ - `--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.
792
+ - `data-open`: Present when it is open.
793
+ - `data-closed`: Present when it is closed.
794
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
795
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
796
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
798
+ - `data-empty`: Present when no item is shown for what was typed.
799
+ - list: The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
800
+ - `data-empty`: Present when no item is shown for what was typed.
801
+ - item: One choice in the list.
802
+ - `data-selected`: Present on the chosen item.
803
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
804
+ - `data-disabled`: Present when it is disabled.
805
+ - clear: A button that empties the input and the value.
806
+ - `data-disabled`: Present when it is disabled.
807
+ - chipRemove: A chip's button that takes its value away.
808
+ - `data-disabled`: Present when it is disabled.
809
+
810
+ ### Command
811
+
812
+ ```
813
+ import "@kirana-ui/web/command"
814
+ ```
815
+
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`.
817
+
818
+ Attributes of the element (each also a property, in camel case):
819
+
820
+ - `input-value` (string): What the input says.
821
+ - `default-input-value` (string): The text the input starts with, when the caller does not hold `inputValue`. Read once.
822
+ - `loop` (boolean): Whether a step past an end of the list goes round to the other.
823
+ - `auto-highlight` (boolean): Whether the first item shown is highlighted from the start and again whenever the text changes, so Enter does it with no arrow key first, as a command palette is used. Default: `true`. With `false`, nothing is highlighted until the input has focus or an arrow or the pointer moves to an item.
824
+ - `disabled` (boolean): Disabled: nothing can be typed or chosen.
825
+
826
+ Properties only:
827
+
828
+ - `filter`: Whether an item is shown for what was typed. Default: its label or one of its keywords holds the text, without regard to case. `null`: every item is shown, and the caller draws the ones it wants.
829
+
830
+ Events:
831
+
832
+ - `input-value-change`: `event.detail.inputValue`, with `event.detail.details`. `preventDefault()` keeps `inputValue` as it was.
833
+ - `select`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
834
+
835
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
836
+
837
+ - `root`
838
+ - `input`
839
+ - `list`
840
+ - `empty`
841
+ - `group`: `kui-id`
842
+ - `group-heading`
843
+ - `item`: `kui-disabled`, `kui-id`, `kui-keywords`, `kui-label`, `kui-value`
844
+ - `separator`: `kui-always-render`
845
+
846
+ Anatomy:
847
+
848
+ ```
849
+ <kui-command>
850
+ root
851
+ input
852
+ list
853
+ empty
854
+ group (optional, repeated)
855
+ group-heading
856
+ item (repeated)
857
+ separator (repeated)
858
+ ```
859
+
860
+ Attributes and CSS variables, by part:
861
+
862
+ - root: A list of commands with the input that filters it.
863
+ - `data-disabled`: Present when it is disabled.
864
+ - input: The text input. What is typed filters the list; focus stays in it.
865
+ - `data-disabled`: Present when it is disabled.
866
+ - list: The commands.
867
+ - `data-empty`: Present when no item is shown for what was typed.
868
+ - item: One command.
869
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
870
+ - `data-disabled`: Present when it is disabled.
871
+
872
+ ### ContextMenu
873
+
874
+ ```
875
+ import "@kirana-ui/web/context-menu"
876
+ ```
877
+
878
+ `<kui-context-menu>`: `<kui-context-menu>`: a menu for an area of the page, opened at the pointer by a secondary press, or a long one on a touch screen. Its `kui-part="trigger"` is the area; the rest are a menu's parts.
879
+
880
+ Events:
881
+
882
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
883
+
884
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
885
+
886
+ - `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`
887
+ - `popup`
888
+ - `arrow`
889
+ - `separator`
890
+ - `item`: `kui-close-on-click`, `kui-disabled`, `kui-label`
891
+ - `group`: `kui-id`
892
+ - `group-label`
893
+ - `checkbox-item`
894
+ - `checkbox-item-indicator`
895
+ - `radio-group`
896
+ - `radio-item`: `kui-close-on-click`, `kui-disabled`, `kui-label`, `kui-value`
897
+ - `radio-item-indicator`: `kui-value`
898
+ - `trigger`
899
+
900
+ Anatomy:
901
+
902
+ ```
903
+ <kui-context-menu>
904
+ trigger
905
+ portal
906
+ positioner
907
+ popup
908
+ arrow
909
+ group (optional, repeated)
910
+ item (repeated)
911
+ group-label
912
+ checkbox-item (repeated)
913
+ checkbox-item-indicator
914
+ radio-group (repeated)
915
+ radio-item (repeated)
916
+ radio-item-indicator
917
+ <kui-context-menu> (repeated)
918
+ portal (as above)
919
+ trigger
920
+ separator (repeated)
921
+ ```
922
+
923
+ Attributes and CSS variables, by part:
924
+
925
+ - trigger: The area a secondary press, or a long press on a touch screen, opens the menu in.
926
+ - `data-popup-open`: Present when the menu is open.
927
+ - positioner: Places the menu against its trigger. It carries the geometry.
928
+ - `data-open`: Present when it is open.
929
+ - `data-closed`: Present when it is closed.
930
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
932
+ - `--anchor-width`: The anchor's width.
933
+ - `--anchor-height`: The anchor's height.
934
+ - `--available-width`: The width between the anchor and the edge of the viewport.
935
+ - `--available-height`: The height between the anchor and the edge of the viewport.
936
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
937
+ - popup: The menu itself: the list of items.
938
+ - `data-open`: Present when it is open.
939
+ - `data-closed`: Present when it is closed.
940
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
941
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
942
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
944
+ - arrow: An element that points at the trigger.
945
+ - `data-side="top | right | bottom | left | inline-start | inline-end"`: The side of the anchor it is on, after any flip. Asked for as `inline-start` or `inline-end`, it says one of those two when it is beside its anchor.
946
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
947
+ - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
948
+ - item: An action. Choosing it closes the menu.
949
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
950
+ - `data-disabled`: Present when it is disabled.
951
+ - linkItem: An item that is a link. Choosing it follows the link and closes the menu.
952
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
953
+ - `data-disabled`: Present when it is disabled.
954
+ - checkboxItem: An item that is checked or not. Choosing it leaves the menu open.
955
+ - `data-checked`: Present when it is checked.
956
+ - `data-unchecked`: Present when it is not checked.
957
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
958
+ - `data-disabled`: Present when it is disabled.
959
+ - checkboxItemIndicator: A mark a checkbox item shows while it is checked.
960
+ - `data-checked`: Present when it is checked.
961
+ - `data-unchecked`: Present when it is not checked.
962
+ - radioGroup: Radio items of which one is chosen.
963
+ - `data-disabled`: Present when it is disabled.
964
+ - radioItem: One choice of a radio group. Choosing it leaves the menu open.
965
+ - `data-checked`: Present when it is checked.
966
+ - `data-unchecked`: Present when it is not checked.
967
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
968
+ - `data-disabled`: Present when it is disabled.
969
+ - radioItemIndicator: A mark a radio item shows while it is the chosen one.
970
+ - `data-checked`: Present when it is checked.
971
+ - `data-unchecked`: Present when it is not checked.
972
+ - submenuTrigger: An item that opens a menu beside it.
973
+ - `data-popup-open`: Present when its menu is open.
974
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
975
+ - `data-disabled`: Present when it is disabled.
976
+
977
+ ### DateField
978
+
979
+ ```
980
+ import "@kirana-ui/web/date-field"
981
+ ```
982
+
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`.
984
+
985
+ Attributes of the element (each also a property, in camel case):
986
+
987
+ - `value` (string): The day typed, once all of it is; `null` until then.
988
+ - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
989
+ - `locale` (string): The language and region that order the day, the month and the year and put what stands between them (`"en-US"`: month/day/year). Give it: a server does not know the reader's.
990
+ - `min` (string): The first and the last day it takes: outside them it says it is invalid.
991
+ - `max` (string): The last day it takes.
992
+ - `disabled` (boolean): Disabled: it cannot be changed.
993
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
994
+ - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid.
995
+ - `name` (string): The name it is submitted under, by its hidden input.
996
+ - `form` (string): The id of the form it belongs to, when it is not inside it.
997
+
998
+ Properties only:
999
+
1000
+ - `placeholders`: What an empty part shows. Default: `dd`, `mm`, `yyyy`.
1001
+
1002
+ Events:
1003
+
1004
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
1005
+
1006
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1007
+
1008
+ - `root`
1009
+ - `segment`
1010
+ - `input`
1011
+
1012
+ Lists (`<template kui-each="…">`): `segments`.
1013
+
1014
+ Anatomy:
1015
+
1016
+ ```
1017
+ <kui-date-field>
1018
+ root
1019
+ <template kui-each="segments">
1020
+ segment (repeated)
1021
+ input
1022
+ ```
1023
+
1024
+ Attributes and CSS variables, by part:
1025
+
1026
+ - root: The field: a group of the date's parts.
1027
+ - `data-disabled`: Present when it is disabled.
1028
+ - `data-readonly`: Present when its value cannot be changed.
1029
+ - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1030
+ - 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.
1032
+ - `data-placeholder`: Present on a part that is empty.
1033
+ - `data-disabled`: Present when it is disabled.
1034
+ - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1035
+
1036
+ ### DatePicker
1037
+
1038
+ ```
1039
+ import "@kirana-ui/web/date-picker"
1040
+ ```
1041
+
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`.
1043
+
1044
+ Attributes of the element (each also a property, in camel case):
1045
+
1046
+ - `value` (string): The day, typed or picked; `null` for none.
1047
+ - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
1048
+ - `open` (boolean): Whether the calendar is open, when the caller holds it.
1049
+ - `default-open` (boolean): Whether the calendar starts open, when the caller does not hold `open`. Read once.
1050
+ - `locale` (string): The language and region of the field and the calendar. Give it: a server does not know.
1051
+ - `min` (string): The first and the last day that can be typed or picked.
1052
+ - `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.
1054
+ - `fixed-weeks` (boolean): Always six rows of days.
1055
+ - `months` (number): How many months the calendar shows side by side (1 by default).
1056
+ - `paged-navigation` (boolean): With several `months`: whether Previous and Next turn them all rather than one month.
1057
+ - `month` (string): The month the calendar shows (the first, with several), when the caller holds it.
1058
+ - `default-month` (string): The month the calendar starts on, when the caller does not hold `month`. Read once.
1059
+ - `disabled` (boolean): Disabled: it cannot be changed.
1060
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
1061
+ - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid.
1062
+ - `name` (string): The name it is submitted under.
1063
+ - `form` (string): The id of the form it belongs to, when it is not inside it.
1064
+
1065
+ Properties only:
1066
+
1067
+ - `isDateUnavailable`: Days that cannot be picked in the calendar.
1068
+ - `placeholders`: What an empty part of the field shows.
1069
+
1070
+ Events:
1071
+
1072
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
1073
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
1074
+ - `month-change`: `event.detail.month`, with `event.detail.details`. `preventDefault()` keeps `month` as it was.
1075
+
1076
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1077
+
1078
+ - `field`
1079
+ - `segment`
1080
+ - `input`
1081
+ - `trigger`
1082
+ - `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`
1083
+ - `popup`
1084
+ - `calendar`
1085
+ - `heading`
1086
+ - `previous`
1087
+ - `next`
1088
+ - `grid`
1089
+ - `head-cell`
1090
+ - `cell`
1091
+ - `day`
1092
+
1093
+ Lists (`<template kui-each="…">`): `segments`, `weekdays`, `months`, `weeks`, `days`.
1094
+
1095
+ Anatomy:
1096
+
1097
+ ```
1098
+ <kui-date-picker>
1099
+ field
1100
+ <template kui-each="segments">
1101
+ segment (repeated)
1102
+ input
1103
+ trigger
1104
+ portal
1105
+ positioner
1106
+ popup
1107
+ calendar
1108
+ <template kui-each="months"> (optional)
1109
+ heading
1110
+ grid
1111
+ <template kui-each="weekdays">
1112
+ head-cell (repeated)
1113
+ <template kui-each="weeks">
1114
+ <template kui-each="days">
1115
+ cell (repeated)
1116
+ day
1117
+ previous
1118
+ next
1119
+ ```
1120
+
1121
+ Attributes and CSS variables, by part:
1122
+
1123
+ - field: The field: a group of the date's parts.
1124
+ - `data-disabled`: Present when it is disabled.
1125
+ - `data-readonly`: Present when its value cannot be changed.
1126
+ - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1127
+ - 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.
1129
+ - `data-placeholder`: Present on a part that is empty.
1130
+ - `data-disabled`: Present when it is disabled.
1131
+ - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1132
+ - trigger: The button that opens the popover, and what it is placed against.
1133
+ - `data-popup-open`: Present when the popover is open.
1134
+ - positioner: Places the popup against the trigger. It carries the geometry.
1135
+ - `data-open`: Present when it is open.
1136
+ - `data-closed`: Present when it is closed.
1137
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1139
+ - `--anchor-width`: The anchor's width.
1140
+ - `--anchor-height`: The anchor's height.
1141
+ - `--available-width`: The width between the anchor and the edge of the viewport.
1142
+ - `--available-height`: The height between the anchor and the edge of the viewport.
1143
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1144
+ - popup: The popover itself.
1145
+ - `data-open`: Present when it is open.
1146
+ - `data-closed`: Present when it is closed.
1147
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1148
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1149
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1151
+ - calendar: The calendar.
1152
+ - `data-disabled`: Present when it is disabled.
1153
+ - `data-readonly`: Present when its value cannot be changed.
1154
+ - previous: Shows the month before.
1155
+ - `data-disabled`: Present when it is disabled.
1156
+ - next: Shows the month after.
1157
+ - `data-disabled`: Present when it is disabled.
1158
+ - 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.
1160
+ - `data-today`: Present on today.
1161
+ - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1162
+ - `data-disabled`: Present when it is disabled.
1163
+ - `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.
1166
+ - 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.
1168
+ - `data-today`: Present on today.
1169
+ - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1170
+ - `data-disabled`: Present when it is disabled.
1171
+ - `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.
1174
+
1175
+ ### Dialog
1176
+
1177
+ ```
1178
+ import "@kirana-ui/web/dialog"
1179
+ ```
1180
+
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`.
1182
+
1183
+ Attributes of the element (each also a property, in camel case):
1184
+
1185
+ - `open` (boolean): Whether it is open, when the caller holds it.
1186
+ - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
1187
+ - `modal` (boolean): Blocks the page behind it and traps focus. Default `true`.
1188
+ - `dismissible` (boolean): Whether a press outside closes it. Default `true`.
1189
+
1190
+ Events:
1191
+
1192
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
1193
+
1194
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1195
+
1196
+ - `trigger`
1197
+ - `backdrop`
1198
+ - `viewport`
1199
+ - `popup`
1200
+ - `title`
1201
+ - `description`
1202
+ - `close`
1203
+
1204
+ Anatomy:
1205
+
1206
+ ```
1207
+ <kui-dialog>
1208
+ trigger
1209
+ portal
1210
+ backdrop
1211
+ viewport (optional)
1212
+ popup
1213
+ title
1214
+ description
1215
+ close
1216
+ ```
1217
+
1218
+ Attributes and CSS variables, by part:
1219
+
1220
+ - trigger: The button that opens the dialog.
1221
+ - `data-popup-open`: Present when the dialog is open.
1222
+ - backdrop: The layer over the page behind the dialog.
1223
+ - `data-open`: Present when it is open.
1224
+ - `data-closed`: Present when it is closed.
1225
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1226
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1227
+ - viewport: What a long dialog scrolls in: it lies over the page, between the backdrop and the popup. A press on it beside the popup is a press outside the dialog; a press on its scrollbar is not.
1228
+ - `data-open`: Present when it is open.
1229
+ - `data-closed`: Present when it is closed.
1230
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1231
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1232
+ - `data-nested`: Present when the dialog opened over another dialog.
1233
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
1234
+ - popup: The dialog itself.
1235
+ - `data-open`: Present when it is open.
1236
+ - `data-closed`: Present when it is closed.
1237
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1238
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1239
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
1240
+ - `--nested-dialogs`: How many dialogs are open above this one.
1241
+
1242
+ ### Drawer
1243
+
1244
+ ```
1245
+ import "@kirana-ui/web/drawer"
1246
+ ```
1247
+
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`.
1249
+
1250
+ Attributes of the element (each also a property, in camel case):
1251
+
1252
+ - `open` (boolean): Whether it is open, when the caller holds it.
1253
+ - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
1254
+ - `modal` (boolean): Blocks the page behind it and traps focus. Default `true`.
1255
+ - `dismissible` (boolean): Whether a press outside closes it. Default `true`.
1256
+ - `swipe-direction` (string): The way it is dragged to close it: the edge it came from. Default: `"down"`.
1257
+ - `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.
1258
+ - `snap-point` (string): Which of them it rests at, as it was given.
1259
+ - `default-snap-point` (string): Where it opens. Default: the smallest.
1260
+
1261
+ Events:
1262
+
1263
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
1264
+ - `snap-point-change`: `event.detail.snapPoint`, with `event.detail.details`. `preventDefault()` keeps `snapPoint` as it was.
1265
+
1266
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1267
+
1268
+ - `trigger`
1269
+ - `backdrop`
1270
+ - `popup`
1271
+ - `title`
1272
+ - `description`
1273
+ - `close`
1274
+
1275
+ Anatomy:
1276
+
1277
+ ```
1278
+ <kui-drawer>
1279
+ trigger
1280
+ portal
1281
+ backdrop
1282
+ popup
1283
+ title
1284
+ description
1285
+ close
1286
+ ```
1287
+
1288
+ Attributes and CSS variables, by part:
1289
+
1290
+ - trigger: The button that opens the dialog.
1291
+ - `data-popup-open`: Present when the dialog is open.
1292
+ - backdrop: The layer over the page behind the dialog.
1293
+ - `data-open`: Present when it is open.
1294
+ - `data-closed`: Present when it is closed.
1295
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1296
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1297
+ - `data-swiping`: Present while the drawer is dragged.
1298
+ - `--drawer-swipe-movement-x`: How far it has been dragged across.
1299
+ - `--drawer-swipe-movement-y`: How far it has been dragged up or down.
1300
+ - `--drawer-swipe-progress`: How far it has been dragged, of its own size: 0 to 1.
1301
+ - `--drawer-snap-point-offset`: How far from whole it rests, towards the edge it closes at: 0px at its largest snap point.
1302
+ - 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
+ - `data-open`: Present when it is open.
1304
+ - `data-closed`: Present when it is closed.
1305
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1306
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1307
+ - `data-nested-dialog-open`: Present when another dialog is open above this one.
1308
+ - `data-swiping`: Present while the drawer is dragged.
1309
+ - `data-swipe-direction="up | down | left | right"`: The way it is dragged to close it.
1310
+ - `data-swipe-dismiss`: Present once a drag has closed it.
1311
+ - `data-expanded`: Present while it rests whole, of several snap points.
1312
+ - `data-nested-drawer-open`: Present while another drawer is open over it.
1313
+ - `data-nested-drawer-swiping`: Present while a drawer over it is dragged.
1314
+ - `--nested-dialogs`: How many dialogs are open above this one.
1315
+ - `--drawer-swipe-movement-x`: How far it has been dragged across.
1316
+ - `--drawer-swipe-movement-y`: How far it has been dragged up or down.
1317
+ - `--drawer-swipe-progress`: How far it has been dragged, of its own size: 0 to 1.
1318
+ - `--drawer-snap-point-offset`: How far from whole it rests, towards the edge it closes at: 0px at its largest snap point.
1319
+ - `--drawer-height`: Its height.
1320
+ - `--nested-drawers`: How many drawers are open over it.
1321
+ - `--drawer-frontmost-height`: The height of the drawer in front of every other, while this one is open.
1322
+ - `--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
+ - `--drawer-width`: Its width.
1324
+
1325
+ ### Field
1326
+
1327
+ ```
1328
+ import "@kirana-ui/web/field"
1329
+ ```
1330
+
1331
+ `<kui-field>`: `<kui-field>` around `kui-part="root"`, a `label`, a `control` (an input, a textarea or a select), a `description` and an `error`, which is in the page while something is wrong and says what, unless the page gave it something to say (`kui-match="valueMissing"` for one finding of the browser's, `kui-match` alone for always). `name`, `disabled`, `invalid`, `validation-mode`, `validation-debounce-time`; `validate` as a property.
1332
+
1333
+ Attributes of the element (each also a property, in camel case):
1334
+
1335
+ - `name` (string): The control's name in the form.
1336
+ - `disabled` (boolean): Disables the field: its control cannot be changed, and its parts say so (`data-disabled`).
1337
+ - `invalid` (boolean): Invalid whatever the value: an error known from elsewhere.
1338
+ - `validation-mode` (string): When the value is checked; the form's by default, else `"onSubmit"`.
1339
+ - `validation-debounce-time` (number): With `"onChange"`, how long the value must rest before it is checked, in milliseconds.
1340
+
1341
+ Properties only:
1342
+
1343
+ - `validate`: The field's own check, after the browser's: a message or several when the value is wrong, `null` when it is right. It may answer later, with a promise.
1344
+
1345
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1346
+
1347
+ - `root`
1348
+ - `label`
1349
+ - `control`
1350
+ - `description`
1351
+ - `error`: `kui-match`
1352
+
1353
+ Anatomy:
1354
+
1355
+ ```
1356
+ <kui-field>
1357
+ root
1358
+ label
1359
+ control
1360
+ description
1361
+ error
1362
+ ```
1363
+
1364
+ Attributes and CSS variables, by part:
1365
+
1366
+ - root: A control with its label, its description and its errors.
1367
+ - `data-disabled`: Present when it is disabled.
1368
+ - `data-touched`: Present once focus has left the control.
1369
+ - `data-dirty`: Present while the value is not the one it started with.
1370
+ - `data-filled`: Present while the control has a value.
1371
+ - `data-focused`: Present while the control has focus.
1372
+ - `data-valid`: Present once the value has been checked and found right.
1373
+ - `data-invalid`: Present while the value is wrong.
1374
+ - label: The control's name: a press on it reaches the control.
1375
+ - `data-disabled`: Present when it is disabled.
1376
+ - `data-touched`: Present once focus has left the control.
1377
+ - `data-dirty`: Present while the value is not the one it started with.
1378
+ - `data-filled`: Present while the control has a value.
1379
+ - `data-focused`: Present while the control has focus.
1380
+ - `data-valid`: Present once the value has been checked and found right.
1381
+ - `data-invalid`: Present while the value is wrong.
1382
+ - control: The control: an input, a textarea or a select.
1383
+ - `data-disabled`: Present when it is disabled.
1384
+ - `data-touched`: Present once focus has left the control.
1385
+ - `data-dirty`: Present while the value is not the one it started with.
1386
+ - `data-filled`: Present while the control has a value.
1387
+ - `data-focused`: Present while the control has focus.
1388
+ - `data-valid`: Present once the value has been checked and found right.
1389
+ - `data-invalid`: Present while the value is wrong.
1390
+ - description: More about the control, said after its name.
1391
+ - `data-disabled`: Present when it is disabled.
1392
+ - `data-touched`: Present once focus has left the control.
1393
+ - `data-dirty`: Present while the value is not the one it started with.
1394
+ - `data-filled`: Present while the control has a value.
1395
+ - `data-focused`: Present while the control has focus.
1396
+ - `data-valid`: Present once the value has been checked and found right.
1397
+ - `data-invalid`: Present while the value is wrong.
1398
+ - error: What is wrong with the value. In the page while it applies.
1399
+ - `data-disabled`: Present when it is disabled.
1400
+ - `data-touched`: Present once focus has left the control.
1401
+ - `data-dirty`: Present while the value is not the one it started with.
1402
+ - `data-filled`: Present while the control has a value.
1403
+ - `data-focused`: Present while the control has focus.
1404
+ - `data-valid`: Present once the value has been checked and found right.
1405
+ - `data-invalid`: Present while the value is wrong.
1406
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1407
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1408
+
1409
+ ### Fieldset
1410
+
1411
+ ```
1412
+ import "@kirana-ui/web/fieldset"
1413
+ ```
1414
+
1415
+ `<kui-fieldset>`: `<kui-fieldset>` around a `kui-part="root"` fieldset and its `legend`. `disabled`.
1416
+
1417
+ Attributes of the element (each also a property, in camel case):
1418
+
1419
+ - `disabled` (boolean): Disables every field inside.
1420
+
1421
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1422
+
1423
+ - `root`
1424
+ - `legend`
1425
+
1426
+ Anatomy:
1427
+
1428
+ ```
1429
+ <kui-fieldset>
1430
+ root
1431
+ legend
1432
+ ```
1433
+
1434
+ Attributes and CSS variables, by part:
1435
+
1436
+ - root: The group of fields.
1437
+ - `data-disabled`: Present when it is disabled.
1438
+ - legend: The group's name.
1439
+ - `data-disabled`: Present when it is disabled.
1440
+
1441
+ ### Form
1442
+
1443
+ ```
1444
+ import "@kirana-ui/web/form"
1445
+ ```
1446
+
1447
+ `<kui-form>`: `<kui-form>` around a `kui-part="root"` form. Its fields are checked when it is submitted; valid, it tells `form-submit` with their values and the page is not left. `validation-mode`; `errors` (from outside the page, by field name) as a property; it tells `clear-errors`.
1448
+
1449
+ Attributes of the element (each also a property, in camel case):
1450
+
1451
+ - `validation-mode` (string): When the form's fields check their values, unless a field says otherwise. Default `"onSubmit"`.
1452
+
1453
+ Properties only:
1454
+
1455
+ - `errors`: Errors from outside the page (a server's), by field name. A field shows its own until its value changes.
1456
+
1457
+ Events:
1458
+
1459
+ - `form-submit`: `event.detail.values`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
1460
+ - `clear-errors`: `event.detail.errors`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
1461
+
1462
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1463
+
1464
+ - `root`
1465
+
1466
+ Anatomy:
1467
+
1468
+ ```
1469
+ <kui-form>
1470
+ root
1471
+ ```
1472
+
1473
+ ### HoverCard
1474
+
1475
+ ```
1476
+ import "@kirana-ui/web/hover-card"
1477
+ ```
1478
+
1479
+ `<kui-hover-card>`: `<kui-hover-card>` around a `kui-part="trigger"` link and a `portal` with a `positioner` around the `popup`, which the pointer may enter. `open`, `default-open`, `delay`, `close-delay`, `disabled`; it tells `open-change`.
1480
+
1481
+ Attributes of the element (each also a property, in camel case):
1482
+
1483
+ - `open` (boolean): Whether it is open, when the caller holds it.
1484
+ - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
1485
+ - `delay` (number): How long the pointer rests on the trigger before the popup opens, in milliseconds.
1486
+ - `close-delay` (number): How long after the pointer leaves the popup closes, in milliseconds.
1487
+ - `disabled` (boolean): Disabled: the pointer and focus do not open it.
1488
+
1489
+ Events:
1490
+
1491
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
1492
+
1493
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1494
+
1495
+ - `trigger`: `kui-close-delay`, `kui-delay`
1496
+ - `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`
1497
+ - `popup`
1498
+ - `arrow`
1499
+
1500
+ Anatomy:
1501
+
1502
+ ```
1503
+ <kui-hover-card>
1504
+ trigger
1505
+ portal
1506
+ positioner
1507
+ popup
1508
+ arrow
1509
+ ```
1510
+
1511
+ Attributes and CSS variables, by part:
1512
+
1513
+ - trigger: The link the card previews.
1514
+ - `data-popup-open`: Present when the card is open.
1515
+ - positioner: Places the popup against the trigger. It carries the geometry.
1516
+ - `data-open`: Present when it is open.
1517
+ - `data-closed`: Present when it is closed.
1518
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1520
+ - `--anchor-width`: The anchor's width.
1521
+ - `--anchor-height`: The anchor's height.
1522
+ - `--available-width`: The width between the anchor and the edge of the viewport.
1523
+ - `--available-height`: The height between the anchor and the edge of the viewport.
1524
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1525
+ - popup: The card itself.
1526
+ - `data-open`: Present when it is open.
1527
+ - `data-closed`: Present when it is closed.
1528
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1529
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1530
+ - `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.
1531
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1532
+ - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
1533
+ - arrow: An element that points at the trigger, placed along the popup's edge.
1534
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1536
+ - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
1537
+
1538
+ ### Input
1539
+
1540
+ ```
1541
+ import "@kirana-ui/web/input"
1542
+ ```
1543
+
1544
+ `<kui-input>`: `<kui-input>` around a `kui-part="root"` input or textarea: it says its state, and inside a `<kui-field>` it is the field's control. `disabled`; it tells `value-change`.
1545
+
1546
+ Attributes of the element (each also a property, in camel case):
1547
+
1548
+ - `disabled` (boolean): Disabled: nothing can be typed in it.
1549
+
1550
+ Events:
1551
+
1552
+ - `value-change`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
1553
+
1554
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1555
+
1556
+ - `root`
1557
+
1558
+ Anatomy:
1559
+
1560
+ ```
1561
+ <kui-input>
1562
+ root
1563
+ ```
1564
+
1565
+ Attributes and CSS variables, by part:
1566
+
1567
+ - input: A text input. Inside a field it is the field's control.
1568
+ - `data-disabled`: Present when it is disabled.
1569
+ - `data-touched`: Present once focus has left the input.
1570
+ - `data-dirty`: Present while the value is not the one it started with.
1571
+ - `data-filled`: Present while the input has a value.
1572
+ - `data-focused`: Present while the input has focus.
1573
+ - `data-valid`: In a field: present once the value was checked and found right.
1574
+ - `data-invalid`: In a field: present while the value is wrong.
1575
+
1576
+ ### Label
1577
+
1578
+ ```
1579
+ import "@kirana-ui/web/label"
1580
+ ```
1581
+
1582
+ `<kui-label>`: `<kui-label>` around a `kui-part="root"` label. Inside a `<kui-field>` it is the field's.
1583
+
1584
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1585
+
1586
+ - `root`
1587
+
1588
+ Anatomy:
1589
+
1590
+ ```
1591
+ <kui-label>
1592
+ root
1593
+ ```
1594
+
1595
+ Attributes and CSS variables, by part:
1596
+
1597
+ - label: A control's name. Inside a field it is the field's label, with its states.
1598
+ - `data-disabled`: Present when it is disabled.
1599
+ - `data-touched`: Present once focus has left the control.
1600
+ - `data-dirty`: Present while the value is not the one it started with.
1601
+ - `data-filled`: Present while the control has a value.
1602
+ - `data-focused`: Present while the control has focus.
1603
+ - `data-valid`: Present once the value has been checked and found right.
1604
+ - `data-invalid`: Present while the value is wrong.
1605
+
1606
+ ### Listbox
1607
+
1608
+ ```
1609
+ import "@kirana-ui/web/listbox"
1610
+ ```
1611
+
1612
+ `<kui-listbox>`: `<kui-listbox>` around `kui-part="root"` and an `item` for each `kui-value` (`kui-disabled`, `kui-label`), which may hold an `indicator`, in the page while the item is chosen. Items may be in a `group` with its `group-label`. `value` and `default-value` (with commas between), `multiple`, `disabled`, `loop`, `name`, `form`; it tells `value-change`.
1613
+
1614
+ Attributes of the element (each also a property, in camel case):
1615
+
1616
+ - `value` (string): The chosen values: none, one, or with `multiple` several.
1617
+ - `default-value` (string): The values it starts with, when the caller does not hold `value`. Read once.
1618
+ - `multiple` (boolean): Whether more than one can be chosen: a press then adds or takes away.
1619
+ - `disabled` (boolean): Disabled: no item can be chosen.
1620
+ - `loop` (boolean): Whether the arrows go round from the last item to the first. Default: they do not.
1621
+ - `name` (string): With a name, the chosen values are submitted with the form around the list.
1622
+ - `form` (string): The id of the form the list belongs to, when it is not inside it.
1623
+
1624
+ Events:
1625
+
1626
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
1627
+
1628
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1629
+
1630
+ - `root`
1631
+ - `item`: `kui-disabled`, `kui-label`, `kui-value`
1632
+ - `indicator`: `kui-value`
1633
+ - `group`: `kui-id`
1634
+ - `group-label`: `kui-id`
1635
+
1636
+ Anatomy:
1637
+
1638
+ ```
1639
+ <kui-listbox>
1640
+ root
1641
+ group (optional, repeated)
1642
+ item (repeated)
1643
+ indicator
1644
+ group-label
1645
+ ```
1646
+
1647
+ Attributes and CSS variables, by part:
1648
+
1649
+ - root: The list. It is one stop for Tab.
1650
+ - `data-disabled`: Present when it is disabled.
1651
+ - item: One choice in the list.
1652
+ - `data-selected`: Present on a chosen item.
1653
+ - `data-highlighted`: Present on the item the keyboard is on.
1654
+ - `data-disabled`: Present when it is disabled.
1655
+ - itemIndicator: A mark an item shows while it is chosen.
1656
+ - `data-selected`: Present on a chosen item.
1657
+
1658
+ ### Menu
1659
+
1660
+ ```
1661
+ import "@kirana-ui/web/menu"
1662
+ ```
1663
+
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`.
1665
+
1666
+ Events:
1667
+
1668
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
1669
+
1670
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1671
+
1672
+ - `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`
1673
+ - `popup`
1674
+ - `arrow`
1675
+ - `separator`
1676
+ - `item`: `kui-close-on-click`, `kui-disabled`, `kui-label`
1677
+ - `group`: `kui-id`
1678
+ - `group-label`
1679
+ - `checkbox-item`
1680
+ - `checkbox-item-indicator`
1681
+ - `radio-group`
1682
+ - `radio-item`: `kui-close-on-click`, `kui-disabled`, `kui-label`, `kui-value`
1683
+ - `radio-item-indicator`: `kui-value`
1684
+ - `trigger`
1685
+
1686
+ Anatomy:
1687
+
1688
+ ```
1689
+ <kui-menu>
1690
+ trigger
1691
+ portal
1692
+ positioner
1693
+ popup
1694
+ arrow
1695
+ group (optional, repeated)
1696
+ item (repeated)
1697
+ group-label
1698
+ checkbox-item (repeated)
1699
+ checkbox-item-indicator
1700
+ radio-group (repeated)
1701
+ radio-item (repeated)
1702
+ radio-item-indicator
1703
+ <kui-menu> (repeated)
1704
+ portal (as above)
1705
+ trigger
1706
+ separator (repeated)
1707
+ ```
1708
+
1709
+ Attributes and CSS variables, by part:
1710
+
1711
+ - trigger: The button that opens the menu, and what it is placed against.
1712
+ - `data-popup-open`: Present when the menu is open.
1713
+ - `data-disabled`: Present when it is disabled.
1714
+ - positioner: Places the menu against its trigger. It carries the geometry.
1715
+ - `data-open`: Present when it is open.
1716
+ - `data-closed`: Present when it is closed.
1717
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1719
+ - `--anchor-width`: The anchor's width.
1720
+ - `--anchor-height`: The anchor's height.
1721
+ - `--available-width`: The width between the anchor and the edge of the viewport.
1722
+ - `--available-height`: The height between the anchor and the edge of the viewport.
1723
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1724
+ - popup: The menu itself: the list of items.
1725
+ - `data-open`: Present when it is open.
1726
+ - `data-closed`: Present when it is closed.
1727
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1728
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1729
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1731
+ - arrow: An element that points at the trigger.
1732
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1734
+ - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
1735
+ - item: An action. Choosing it closes the menu.
1736
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1737
+ - `data-disabled`: Present when it is disabled.
1738
+ - linkItem: An item that is a link. Choosing it follows the link and closes the menu.
1739
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1740
+ - `data-disabled`: Present when it is disabled.
1741
+ - checkboxItem: An item that is checked or not. Choosing it leaves the menu open.
1742
+ - `data-checked`: Present when it is checked.
1743
+ - `data-unchecked`: Present when it is not checked.
1744
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1745
+ - `data-disabled`: Present when it is disabled.
1746
+ - checkboxItemIndicator: A mark a checkbox item shows while it is checked.
1747
+ - `data-checked`: Present when it is checked.
1748
+ - `data-unchecked`: Present when it is not checked.
1749
+ - radioGroup: Radio items of which one is chosen.
1750
+ - `data-disabled`: Present when it is disabled.
1751
+ - radioItem: One choice of a radio group. Choosing it leaves the menu open.
1752
+ - `data-checked`: Present when it is checked.
1753
+ - `data-unchecked`: Present when it is not checked.
1754
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1755
+ - `data-disabled`: Present when it is disabled.
1756
+ - radioItemIndicator: A mark a radio item shows while it is the chosen one.
1757
+ - `data-checked`: Present when it is checked.
1758
+ - `data-unchecked`: Present when it is not checked.
1759
+ - submenuTrigger: An item that opens a menu beside it.
1760
+ - `data-popup-open`: Present when its menu is open.
1761
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1762
+ - `data-disabled`: Present when it is disabled.
1763
+
1764
+ ### Menubar
1765
+
1766
+ ```
1767
+ import "@kirana-ui/web/menubar"
1768
+ ```
1769
+
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`.
1771
+
1772
+ Attributes of the element (each also a property, in camel case):
1773
+
1774
+ - `loop` (boolean): Whether the arrows go round from the last menu to the first. Default: they do.
1775
+ - `disabled` (boolean): No menu of the bar opens.
1776
+ - `orientation` (string): A row (the default) or a column of menus. In a column a menu opens beside its trigger.
1777
+
1778
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1779
+
1780
+ - `root`
1781
+
1782
+ Anatomy:
1783
+
1784
+ ```
1785
+ <kui-menubar>
1786
+ root
1787
+ ```
1788
+
1789
+ Attributes and CSS variables, by part:
1790
+
1791
+ - root: The row of menus. A menu inside it is one of its items.
1792
+ - `data-disabled`: Present when it is disabled.
1793
+ - `data-orientation="horizontal | vertical"`: Whether its menus are in a row or a column.
1794
+
1795
+ ### MessageScroller
1796
+
1797
+ ```
1798
+ import "@kirana-ui/web/message-scroller"
1799
+ ```
1800
+
1801
+ `<kui-message-scroller>`: `<kui-message-scroller>` around `kui-part="root"`, a `viewport` with its `content`, and a `button` that goes back to the newest. It stays at the bottom as content comes, unless the reader has scrolled away. `initial`, `threshold`; it tells `at-bottom-change`.
1802
+
1803
+ Attributes of the element (each also a property, in camel case):
1804
+
1805
+ - `initial` (string): Where it begins: at the newest message (the default), or at the first.
1806
+ - `threshold` (number): How near the end counts as at it, in pixels. Default: 24.
1807
+
1808
+ Events:
1809
+
1810
+ - `at-bottom-change`: `event.detail.atBottom`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
1811
+
1812
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1813
+
1814
+ - `root`
1815
+ - `viewport`
1816
+ - `content`
1817
+ - `button`
1818
+
1819
+ Anatomy:
1820
+
1821
+ ```
1822
+ <kui-message-scroller>
1823
+ root
1824
+ viewport
1825
+ content
1826
+ button
1827
+ ```
1828
+
1829
+ Attributes and CSS variables, by part:
1830
+
1831
+ - root: What holds the conversation and its button.
1832
+ - `data-at-bottom`: Present while the newest message is in view.
1833
+ - viewport: What scrolls: a log, reached by the keyboard.
1834
+ - `data-at-bottom`: Present while the newest message is in view.
1835
+ - button: Goes to the newest message. Inert while that is in view.
1836
+ - `data-at-bottom`: Present while the newest message is in view.
1837
+
1838
+ ### Meter
1839
+
1840
+ ```
1841
+ import "@kirana-ui/web/meter"
1842
+ ```
1843
+
1844
+ `<kui-meter>`: `<kui-meter>` around `kui-part="root"`, a `label`, a `track` with its `indicator`, and a `value`, which says the value as it is written unless the page gave it something to say. `value`, `min`, `max`, `locale`; `format` and `getAriaValueText` as properties.
1845
+
1846
+ Attributes of the element (each also a property, in camel case):
1847
+
1848
+ - `value` (number): The measure, between `min` and `max`. A meter always has one.
1849
+ - `min` (number): Default 0.
1850
+ - `max` (number): Default 100.
1851
+ - `locale` (string): The language the value is written in; the page's by default.
1852
+
1853
+ Properties only:
1854
+
1855
+ - `format`: How the value is written; a percentage of the range by default.
1856
+ - `getAriaValueText`: What assistive technology reads for the value, when the written value is not enough.
1857
+
1858
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1859
+
1860
+ - `root`
1861
+ - `label`
1862
+ - `track`
1863
+ - `indicator`
1864
+ - `value`
1865
+
1866
+ Anatomy:
1867
+
1868
+ ```
1869
+ <kui-meter>
1870
+ root
1871
+ track
1872
+ indicator
1873
+ value
1874
+ label
1875
+ ```
1876
+
1877
+ ### NavigationMenu
1878
+
1879
+ ```
1880
+ import "@kirana-ui/web/navigation-menu"
1881
+ ```
1882
+
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`.
1884
+
1885
+ Attributes of the element (each also a property, in camel case):
1886
+
1887
+ - `value` (string): The item whose content is shown; `null` is "none".
1888
+ - `default-value` (string): The item whose content it starts with, when the caller does not hold `value`. Read once.
1889
+ - `delay` (number): How long the pointer rests on a trigger before its content shows, in milliseconds.
1890
+ - `close-delay` (number): How long after the pointer leaves the content goes, in milliseconds.
1891
+ - `orientation` (string): Whether the triggers are laid out across (the default) or down: the arrows that move between them follow.
1892
+
1893
+ Events:
1894
+
1895
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
1896
+
1897
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
1898
+
1899
+ - `root`
1900
+ - `list`
1901
+ - `item`: `kui-value`
1902
+ - `trigger`: `kui-value`
1903
+ - `icon`: `kui-value`
1904
+ - `content`: `kui-value`
1905
+ - `link`: `kui-active`, `kui-close-on-click`
1906
+ - `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
+ - `popup`
1908
+ - `viewport`
1909
+ - `arrow`
1910
+ - `backdrop`
1911
+
1912
+ Anatomy:
1913
+
1914
+ ```
1915
+ <kui-navigation-menu>
1916
+ root
1917
+ list
1918
+ item (repeated)
1919
+ trigger
1920
+ icon
1921
+ content
1922
+ link (repeated)
1923
+ link (repeated, as above)
1924
+ link (repeated, as above)
1925
+ portal
1926
+ positioner
1927
+ popup
1928
+ viewport
1929
+ arrow
1930
+ backdrop
1931
+ ```
1932
+
1933
+ Attributes and CSS variables, by part:
1934
+
1935
+ - root: The navigation.
1936
+ - `data-orientation="horizontal | vertical"`: Whether the list is a row or a column.
1937
+ - list: The row of items.
1938
+ - `data-orientation="horizontal | vertical"`: Whether the list is a row or a column.
1939
+ - trigger: The button that shows an item's content.
1940
+ - `data-popup-open`: Present while the item's content is shown.
1941
+ - icon: A mark on a trigger that shows whether its content is open.
1942
+ - `data-popup-open`: Present while the item's content is shown.
1943
+ - content: What an item shows. It is drawn in the viewport every item shares.
1944
+ - `data-open`: Present when it is open.
1945
+ - `data-closed`: Present when it is closed.
1946
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1947
+ - `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.
1949
+ - link: A link, in the list or in an item's content.
1950
+ - `data-active`: Present on the link of the page the reader is on.
1951
+ - positioner: Places the popup against the open item's trigger. It carries the geometry.
1952
+ - `data-open`: Present when it is open.
1953
+ - `data-closed`: Present when it is closed.
1954
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1956
+ - `--anchor-width`: The anchor's width.
1957
+ - `--anchor-height`: The anchor's height.
1958
+ - `--available-width`: The width between the anchor and the edge of the viewport.
1959
+ - `--available-height`: The height between the anchor and the edge of the viewport.
1960
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1961
+ - `--positioner-width`: The open content's width.
1962
+ - `--positioner-height`: The open content's height.
1963
+ - popup: The panel every item's content is shown in.
1964
+ - `data-open`: Present when it is open.
1965
+ - `data-closed`: Present when it is closed.
1966
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1967
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1968
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1970
+ - `--popup-width`: The open content's width.
1971
+ - `--popup-height`: The open content's height.
1972
+ - arrow: An element that points at the open item's trigger.
1973
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
1975
+ - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
1976
+ - backdrop: An element behind the popup, for a design that dims the page.
1977
+ - `data-open`: Present when it is open.
1978
+ - `data-closed`: Present when it is closed.
1979
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1980
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1981
+
1982
+ ### NumberField
1983
+
1984
+ ```
1985
+ import "@kirana-ui/web/number-field"
1986
+ ```
1987
+
1988
+ `<kui-number-field>`: `<kui-number-field>` around `kui-part="root"`, a `group`, an `input`, and `increment` and `decrement` buttons. With a name, the root draws the hidden input a form reads. A `scrub-area` (a label, as a rule) is pressed and dragged to change the number, with `kui-direction="vertical"`, `kui-pixel-sensitivity` and `kui-teleport-distance` on it; a `scrub-area-cursor` inside it is drawn at the end of the page while the pointer is locked. `value`, `default-value`, `min`, `max`, `step`, `small-step`, `large-step`, `snap-on-step`, `allow-wheel-scrub`, `locale`, `disabled`, `read-only`, `required`, `name`, `form`; `format` as a property; it tells `value-change` and `value-committed`.
1989
+
1990
+ Attributes of the element (each also a property, in camel case):
1991
+
1992
+ - `value` (number): The number; `null` is "none".
1993
+ - `default-value` (number): The value it starts with, when the caller does not hold `value`. Read once.
1994
+ - `min` (number): The least the number may be.
1995
+ - `max` (number): The most the number may be.
1996
+ - `step` (number): What the buttons and the arrows move by. Default 1.
1997
+ - `small-step` (number): With Alt held. Default 0.1.
1998
+ - `large-step` (number): With Shift held. Default 10.
1999
+ - `snap-on-step` (boolean): A step lands on a multiple of the step, counted from `min`.
2000
+ - `allow-wheel-scrub` (boolean): The wheel steps it while the pointer is over the input and focus is in it.
2001
+ - `locale` (string): The language it is written in; the page's by default.
2002
+ - `disabled` (boolean): Disabled: it cannot be changed.
2003
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
2004
+ - `required` (boolean): Needed: in a `Field`, leaving it empty is then invalid.
2005
+ - `name` (string): With a name, the number is submitted with the form around it.
2006
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
2007
+
2008
+ Properties only:
2009
+
2010
+ - `format`: How the number is written.
2011
+
2012
+ Events:
2013
+
2014
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
2015
+ - `value-committed`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
2016
+
2017
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2018
+
2019
+ - `root`
2020
+ - `group`
2021
+ - `input`
2022
+ - `increment`
2023
+ - `decrement`
2024
+ - `scrub-area`: `kui-direction`, `kui-pixel-sensitivity`, `kui-teleport-distance`
2025
+ - `scrub-area-cursor`
2026
+
2027
+ Anatomy:
2028
+
2029
+ ```
2030
+ <kui-number-field>
2031
+ root
2032
+ group
2033
+ input
2034
+ increment
2035
+ decrement
2036
+ scrub-area
2037
+ scrub-area-cursor
2038
+ ```
2039
+
2040
+ Attributes and CSS variables, by part:
2041
+
2042
+ - root: Groups the number field's parts.
2043
+ - `data-disabled`: Present when it is disabled.
2044
+ - `data-readonly`: Present when the number cannot be changed.
2045
+ - `data-required`: Present when a number must be given.
2046
+ - `data-touched`: Present once focus has left the input.
2047
+ - `data-dirty`: Present while the number is not the one it started with.
2048
+ - `data-filled`: Present while there is a number.
2049
+ - `data-focused`: Present while the input has focus.
2050
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2051
+ - `data-valid`: In a field: present once the number was checked and found right.
2052
+ - `data-invalid`: In a field: present while the number is wrong.
2053
+ - group: What holds the input and its buttons, as one control.
2054
+ - `data-disabled`: Present when it is disabled.
2055
+ - `data-readonly`: Present when the number cannot be changed.
2056
+ - `data-required`: Present when a number must be given.
2057
+ - `data-touched`: Present once focus has left the input.
2058
+ - `data-dirty`: Present while the number is not the one it started with.
2059
+ - `data-filled`: Present while there is a number.
2060
+ - `data-focused`: Present while the input has focus.
2061
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2062
+ - `data-valid`: In a field: present once the number was checked and found right.
2063
+ - `data-invalid`: In a field: present while the number is wrong.
2064
+ - input: The text input: it takes what its locale writes a number with.
2065
+ - `data-disabled`: Present when it is disabled.
2066
+ - `data-readonly`: Present when the number cannot be changed.
2067
+ - `data-required`: Present when a number must be given.
2068
+ - `data-touched`: Present once focus has left the input.
2069
+ - `data-dirty`: Present while the number is not the one it started with.
2070
+ - `data-filled`: Present while there is a number.
2071
+ - `data-focused`: Present while the input has focus.
2072
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2073
+ - `data-valid`: In a field: present once the number was checked and found right.
2074
+ - `data-invalid`: In a field: present while the number is wrong.
2075
+ - increment: A button that steps the number up. Held, it goes on.
2076
+ - `data-disabled`: Present when it is disabled.
2077
+ - `data-readonly`: Present when the number cannot be changed.
2078
+ - `data-required`: Present when a number must be given.
2079
+ - `data-touched`: Present once focus has left the input.
2080
+ - `data-dirty`: Present while the number is not the one it started with.
2081
+ - `data-filled`: Present while there is a number.
2082
+ - `data-focused`: Present while the input has focus.
2083
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2084
+ - `data-valid`: In a field: present once the number was checked and found right.
2085
+ - `data-invalid`: In a field: present while the number is wrong.
2086
+ - decrement: A button that steps the number down. Held, it goes on.
2087
+ - `data-disabled`: Present when it is disabled.
2088
+ - `data-readonly`: Present when the number cannot be changed.
2089
+ - `data-required`: Present when a number must be given.
2090
+ - `data-touched`: Present once focus has left the input.
2091
+ - `data-dirty`: Present while the number is not the one it started with.
2092
+ - `data-filled`: Present while there is a number.
2093
+ - `data-focused`: Present while the input has focus.
2094
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2095
+ - `data-valid`: In a field: present once the number was checked and found right.
2096
+ - `data-invalid`: In a field: present while the number is wrong.
2097
+ - scrubArea: An area that is pressed and dragged to change the number: the field's label, as a rule. It takes `direction`, `pixelSensitivity` and `teleportDistance`. A mouse's pointer is locked for the drag where the browser has that (not in Safari); a finger drags as it is.
2098
+ - `data-disabled`: Present when it is disabled.
2099
+ - `data-readonly`: Present when the number cannot be changed.
2100
+ - `data-required`: Present when a number must be given.
2101
+ - `data-touched`: Present once focus has left the input.
2102
+ - `data-dirty`: Present while the number is not the one it started with.
2103
+ - `data-filled`: Present while there is a number.
2104
+ - `data-focused`: Present while the input has focus.
2105
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2106
+ - `data-valid`: In a field: present once the number was checked and found right.
2107
+ - `data-invalid`: In a field: present while the number is wrong.
2108
+ - scrubAreaCursor: What is drawn in place of the pointer while it is locked for a drag: in the page only then, at the end of `<body>`, placed by the component.
2109
+ - `data-disabled`: Present when it is disabled.
2110
+ - `data-readonly`: Present when the number cannot be changed.
2111
+ - `data-required`: Present when a number must be given.
2112
+ - `data-touched`: Present once focus has left the input.
2113
+ - `data-dirty`: Present while the number is not the one it started with.
2114
+ - `data-filled`: Present while there is a number.
2115
+ - `data-focused`: Present while the input has focus.
2116
+ - `data-scrubbing`: Present while the number is dragged from its scrub area.
2117
+ - `data-valid`: In a field: present once the number was checked and found right.
2118
+ - `data-invalid`: In a field: present while the number is wrong.
2119
+
2120
+ ### Otp
2121
+
2122
+ ```
2123
+ import "@kirana-ui/web/otp"
2124
+ ```
2125
+
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`.
2127
+
2128
+ Attributes of the element (each also a property, in camel case):
2129
+
2130
+ - `length` (number): How many characters the code has. Default: 6.
2131
+ - `value` (string): The characters typed so far, when the caller holds them.
2132
+ - `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`.
2135
+ - `disabled` (boolean): Disabled: it cannot be changed.
2136
+ - `name` (string): With a name, the code is submitted with the form around it.
2137
+ - `form` (string): The id of the form the input belongs to, when it is not inside it.
2138
+
2139
+ Events:
2140
+
2141
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
2142
+ - `complete`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
2143
+
2144
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2145
+
2146
+ - `root`
2147
+ - `input`
2148
+ - `group`
2149
+ - `separator`
2150
+ - `slot`: `kui-index`
2151
+ - `caret`: `kui-index`
2152
+
2153
+ Anatomy:
2154
+
2155
+ ```
2156
+ <kui-otp>
2157
+ root
2158
+ input
2159
+ group (repeated)
2160
+ slot (repeated)
2161
+ caret
2162
+ separator (repeated)
2163
+ ```
2164
+
2165
+ Attributes and CSS variables, by part:
2166
+
2167
+ - root: The code: the input and its cells.
2168
+ - `data-disabled`: Present when it is disabled.
2169
+ - `data-focused`: Present while the input has focus.
2170
+ - `data-complete`: Present when every character is in.
2171
+ - input: The one input the code is typed in. A design lays it over the cells, unseen.
2172
+ - `data-disabled`: Present when it is disabled.
2173
+ - slot: One cell of the code.
2174
+ - `data-index`: The cell's place, from 0.
2175
+ - `data-active`: Present on the cell the next character goes in, or that is selected.
2176
+ - `data-filled`: Present when the cell has its character.
2177
+ - `data-disabled`: Present when it is disabled.
2178
+
2179
+ ### Pagination
2180
+
2181
+ ```
2182
+ import "@kirana-ui/web/pagination"
2183
+ ```
2184
+
2185
+ `<kui-pagination>`: `<kui-pagination>` around a `kui-part="root"` nav with `previous` and `next` buttons and, between them, a `<template kui-each="items">` holding an `item` button for a page (`kui-when="page"`; `{page}` is its number) and an `ellipsis` for a gap (`kui-when="ellipsis"`; `{key}` is `start` or `end`). `page`, `default-page`, `count`, `page-size`, `sibling-count`, `boundary-count`, `disabled`; it tells `page-change`.
2186
+
2187
+ Attributes of the element (each also a property, in camel case):
2188
+
2189
+ - `page` (number): The page shown, from 1.
2190
+ - `default-page` (number): The page it starts at, when the caller does not hold `page`. Read once.
2191
+ - `count` (number): How many items there are in all.
2192
+ - `page-size` (number): How many items a page holds. Default 10.
2193
+ - `sibling-count` (number): How many pages are listed each side of the one shown. Default 1.
2194
+ - `boundary-count` (number): How many pages are always listed at each end. Default 1.
2195
+ - `disabled` (boolean): Disabled: no page can be gone to.
2196
+
2197
+ Events:
2198
+
2199
+ - `page-change`: `event.detail.page`, with `event.detail.details`. `preventDefault()` keeps `page` as it was.
2200
+
2201
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2202
+
2203
+ - `root`
2204
+ - `previous`
2205
+ - `next`
2206
+ - `ellipsis`
2207
+ - `item`
2208
+
2209
+ Lists (`<template kui-each="…">`): `items`.
2210
+
2211
+ Anatomy:
2212
+
2213
+ ```
2214
+ <kui-pagination>
2215
+ root
2216
+ <template kui-each="items">
2217
+ item (repeated)
2218
+ ellipsis (repeated)
2219
+ previous
2220
+ next
2221
+ ```
2222
+
2223
+ Attributes and CSS variables, by part:
2224
+
2225
+ - root: The pages of a list, as a navigation.
2226
+ - `data-disabled`: Present when it is disabled.
2227
+ - item: A page: pressed, it is the one shown.
2228
+ - `data-selected`: Present on the page that is shown.
2229
+ - `data-disabled`: Present when it is disabled.
2230
+ - previous: Goes to the page before.
2231
+ - `data-disabled`: Present when it is disabled.
2232
+ - next: Goes to the page after.
2233
+ - `data-disabled`: Present when it is disabled.
2234
+
2235
+ ### Popover
2236
+
2237
+ ```
2238
+ import "@kirana-ui/web/popover"
2239
+ ```
2240
+
2241
+ `<kui-popover>`: `<kui-popover>` around a `kui-part="trigger"` button and a `portal`, drawn at the end of the page while it is open, with a `positioner` (`kui-side`, `kui-align`, `kui-side-offset`, `kui-align-offset`, `kui-collision-padding`, and `kui-anchor`: the id of the element it is placed against, when that is not the trigger) around the `popup`, which may hold an `arrow`, a `title`, a `description` and a `close` button; the portal may hold a `backdrop` too. The trigger takes `kui-open-on-hover`, with `kui-delay` and `kui-close-delay`. `open`, `default-open`, `modal` (there, or `"trap-focus"`); it tells `open-change`.
2242
+
2243
+ Attributes of the element (each also a property, in camel case):
2244
+
2245
+ - `open` (boolean): Whether it is open, when the caller holds it.
2246
+ - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
2247
+ - `modal` (string): What the page behind it may do while it is open. `false` (the default): everything. `true`: nothing, the page is inert and does not scroll, and Tab stays inside the popover. `"trap-focus"`: Tab stays inside the popover, and the page can still be pressed and scrolled. A popover the pointer opened holds nothing until it is pressed. Read as it opens.
2248
+
2249
+ Events:
2250
+
2251
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
2252
+
2253
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2254
+
2255
+ - `trigger`: `kui-close-delay`, `kui-delay`, `kui-open-on-hover`
2256
+ - `backdrop`
2257
+ - `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`
2258
+ - `popup`
2259
+ - `arrow`
2260
+ - `title`
2261
+ - `description`
2262
+ - `close`
2263
+
2264
+ Anatomy:
2265
+
2266
+ ```
2267
+ <kui-popover>
2268
+ trigger
2269
+ portal
2270
+ backdrop
2271
+ positioner
2272
+ popup
2273
+ title
2274
+ description
2275
+ close
2276
+ arrow
2277
+ ```
2278
+
2279
+ Attributes and CSS variables, by part:
2280
+
2281
+ - trigger: The button that opens the popover, and what it is placed against.
2282
+ - `data-popup-open`: Present when the popover is open.
2283
+ - backdrop: A layer over the page behind the popover.
2284
+ - `data-open`: Present when it is open.
2285
+ - `data-closed`: Present when it is closed.
2286
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2287
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2288
+ - positioner: Places the popup against the trigger. It carries the geometry.
2289
+ - `data-open`: Present when it is open.
2290
+ - `data-closed`: Present when it is closed.
2291
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2293
+ - `--anchor-width`: The anchor's width.
2294
+ - `--anchor-height`: The anchor's height.
2295
+ - `--available-width`: The width between the anchor and the edge of the viewport.
2296
+ - `--available-height`: The height between the anchor and the edge of the viewport.
2297
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2298
+ - popup: The popover itself.
2299
+ - `data-open`: Present when it is open.
2300
+ - `data-closed`: Present when it is closed.
2301
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2302
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2303
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2305
+ - arrow: An element that points at the trigger, placed along the popup's edge.
2306
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2308
+ - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
2309
+
2310
+ ### Progress
2311
+
2312
+ ```
2313
+ import "@kirana-ui/web/progress"
2314
+ ```
2315
+
2316
+ `<kui-progress>`: `<kui-progress>` around `kui-part="root"`, a `label`, a `track` with its `indicator`, and a `value`, which says the value as it is written unless the page gave it something to say. `value` (left out: not known yet), `min`, `max`, `locale`; `format` and `getAriaValueText` as properties.
2317
+
2318
+ Attributes of the element (each also a property, in camel case):
2319
+
2320
+ - `value` (number): The value. For a progress bar, `null` is "under way, how far is not known".
2321
+ - `min` (number): Default 0.
2322
+ - `max` (number): Default 100.
2323
+ - `locale` (string): The language the value is written in; the page's by default.
2324
+
2325
+ Properties only:
2326
+
2327
+ - `format`: How the value is written; a percentage of the range by default.
2328
+ - `getAriaValueText`: What assistive technology reads for the value, when the written value is not enough.
2329
+
2330
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2331
+
2332
+ - `root`
2333
+ - `label`
2334
+ - `track`
2335
+ - `indicator`
2336
+ - `value`
2337
+
2338
+ Anatomy:
2339
+
2340
+ ```
2341
+ <kui-progress>
2342
+ root
2343
+ track
2344
+ indicator
2345
+ value
2346
+ label
2347
+ ```
2348
+
2349
+ Attributes and CSS variables, by part:
2350
+
2351
+ - root: The progress bar: it says the value to assistive technology.
2352
+ - `data-progressing`: Present while the task is under way.
2353
+ - `data-complete`: Present once the value has reached the end of the range.
2354
+ - `data-indeterminate`: Present while how far the task has come is not known.
2355
+ - track: The whole range.
2356
+ - `data-progressing`: Present while the task is under way.
2357
+ - `data-complete`: Present once the value has reached the end of the range.
2358
+ - `data-indeterminate`: Present while how far the task has come is not known.
2359
+ - indicator: The filled part: its width is the value's share of the range.
2360
+ - `data-progressing`: Present while the task is under way.
2361
+ - `data-complete`: Present once the value has reached the end of the range.
2362
+ - `data-indeterminate`: Present while how far the task has come is not known.
2363
+ - value: The value, written.
2364
+ - `data-progressing`: Present while the task is under way.
2365
+ - `data-complete`: Present once the value has reached the end of the range.
2366
+ - `data-indeterminate`: Present while how far the task has come is not known.
2367
+ - label: The bar's name.
2368
+ - `data-progressing`: Present while the task is under way.
2369
+ - `data-complete`: Present once the value has reached the end of the range.
2370
+ - `data-indeterminate`: Present while how far the task has come is not known.
2371
+
2372
+ ### QrCode
2373
+
2374
+ ```
2375
+ import "@kirana-ui/web/qr-code"
2376
+ ```
2377
+
2378
+ `<kui-qr-code>`: `<kui-qr-code>` around `kui-part="root"`, a `frame` (an `<svg>`) and its `pattern` (a `<path>`). `value`, `correction`.
2379
+
2380
+ Attributes of the element (each also a property, in camel case):
2381
+
2382
+ - `value` (string): What the code says: a link, a text. Written as UTF-8.
2383
+ - `correction` (string): How much of it may be lost and still be read. Default: `"M"`.
2384
+
2385
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2386
+
2387
+ - `root`
2388
+ - `frame`
2389
+ - `pattern`
2390
+
2391
+ Anatomy:
2392
+
2393
+ ```
2394
+ <kui-qr-code>
2395
+ root
2396
+ frame
2397
+ pattern
2398
+ ```
2399
+
2400
+ Attributes and CSS variables, by part:
2401
+
2402
+ - root: What holds the code.
2403
+ - `data-invalid`: Present when the value is longer than a code holds.
2404
+
2405
+ ### RadioGroup
2406
+
2407
+ ```
2408
+ import "@kirana-ui/web/radio-group"
2409
+ ```
2410
+
2411
+ `<kui-radio-group>`: `<kui-radio-group>` around `kui-part="root"` and an `item` button for each `value`, with an `indicator` inside that is in the page while its item is the chosen one. An item draws the hidden native radio a form and a label reach; an item's `kui-id` is that radio's id, which a `<label for>` names. `value`, `default-value`, `disabled`, `read-only`, `required`, `name`, `form`; it tells `value-change`.
2412
+
2413
+ Attributes of the element (each also a property, in camel case):
2414
+
2415
+ - `value` (string): The chosen value; `null` is "none".
2416
+ - `default-value` (string): The value it starts with, when the caller does not hold `value`. Read once.
2417
+ - `disabled` (boolean): Disables every item of the group.
2418
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
2419
+ - `required` (boolean): Needed: in a `Field`, choosing none is then invalid.
2420
+ - `name` (string): With a name, the chosen value is submitted with the form around the group.
2421
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
2422
+
2423
+ Events:
2424
+
2425
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
2426
+
2427
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2428
+
2429
+ - `root`
2430
+ - `item`: `kui-disabled`, `kui-id`, `kui-value`
2431
+ - `indicator`: `kui-value`
2432
+
2433
+ Anatomy:
2434
+
2435
+ ```
2436
+ <kui-radio-group>
2437
+ root
2438
+ item (repeated)
2439
+ indicator
2440
+ ```
2441
+
2442
+ Attributes and CSS variables, by part:
2443
+
2444
+ - root: Groups the items: one of them is chosen at most.
2445
+ - `data-disabled`: Present when it is disabled.
2446
+ - `data-readonly`: Present when it can be read but not changed.
2447
+ - `data-required`: Present when the form needs it.
2448
+ - 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
+ - `data-checked`: Present when it is checked.
2450
+ - `data-unchecked`: Present when it is not checked.
2451
+ - `data-disabled`: Present when it is disabled.
2452
+ - `data-readonly`: Present when it can be read but not changed.
2453
+ - `data-required`: Present when the form needs it.
2454
+ - indicator: The mark. In the page while its item is the chosen one.
2455
+ - `data-checked`: Present when it is checked.
2456
+ - `data-unchecked`: Present when it is not checked.
2457
+ - `data-disabled`: Present when it is disabled.
2458
+ - `data-readonly`: Present when it can be read but not changed.
2459
+ - `data-required`: Present when the form needs it.
2460
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2461
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2462
+
2463
+ ### Resizable
2464
+
2465
+ ```
2466
+ import "@kirana-ui/web/resizable"
2467
+ ```
2468
+
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`.
2470
+
2471
+ Attributes of the element (each also a property, in camel case):
2472
+
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.
2476
+
2477
+ Events:
2478
+
2479
+ - `sizes-change`: `event.detail.sizes`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
2480
+
2481
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2482
+
2483
+ - `group`
2484
+ - `panel`
2485
+ - `handle`: `kui-disabled`
2486
+
2487
+ Anatomy:
2488
+
2489
+ ```
2490
+ <kui-resizable>
2491
+ group
2492
+ panel (repeated)
2493
+ handle (repeated)
2494
+ ```
2495
+
2496
+ Attributes and CSS variables, by part:
2497
+
2498
+ - group: The panels and the bars between them. A design lays it out as a flex box: `display: flex`, and `flex-direction: column` when it is vertical. A group in a panel that is a flex box itself takes `min-width: 0` and `min-height: 0`, or what it holds widens the panel.
2499
+ - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2500
+ - `data-disabled`: Present when it is disabled.
2501
+ - panel: One panel. It carries its share of the group, written as its `flex` with `min-width: 0` and `min-height: 0`, so what it holds cannot keep it past its share. Its `overflow` is the design's.
2502
+ - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2503
+ - `--panel-size`: The panel's share, in hundredths of the group.
2504
+ - handle: The bar between two panels: dragged, or moved with the arrows. A design gives it its thickness and `flex-shrink: 0`, so the panels do not squeeze it.
2505
+ - `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
2506
+ - `data-dragging`: Present while the bar is dragged.
2507
+ - `data-disabled`: Present when it is disabled.
2508
+
2509
+ ### ScrollArea
2510
+
2511
+ ```
2512
+ import "@kirana-ui/web/scroll-area"
2513
+ ```
2514
+
2515
+ `<kui-scroll-area>`: `<kui-scroll-area>` around `kui-part="root"`, a `viewport` with its `content`, a `scrollbar` for each way (`kui-orientation="horizontal"` for the one across) with its `thumb`, and a `corner`. A scrollbar is in the page while there is something to scroll its way. The library places the scrollbars and the corner against the root; the page gives a scrollbar its thickness and draws it.
2516
+
2517
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2518
+
2519
+ - `root`
2520
+ - `viewport`
2521
+ - `content`
2522
+ - `scrollbar`: `kui-orientation`
2523
+ - `thumb`: `kui-orientation`
2524
+ - `corner`
2525
+
2526
+ Anatomy:
2527
+
2528
+ ```
2529
+ <kui-scroll-area>
2530
+ root
2531
+ viewport
2532
+ content (optional)
2533
+ scrollbar (repeated, as above)
2534
+ scrollbar (repeated)
2535
+ thumb
2536
+ corner
2537
+ ```
2538
+
2539
+ Attributes and CSS variables, by part:
2540
+
2541
+ - 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
+ - `data-has-overflow-x`: Present when there is more to see sideways.
2543
+ - `data-has-overflow-y`: Present when there is more to see up or down.
2544
+ - `data-scrolling`: Present while it is being scrolled, and a moment after.
2545
+ - `data-hovering`: Present while the pointer is over the area.
2546
+ - `--scroll-area-corner-width`: The width of the corner: the vertical scrollbar's, while both scrollbars and the corner are in the page.
2547
+ - `--scroll-area-corner-height`: The height of the corner: the horizontal scrollbar's, while both scrollbars and the corner are in the page.
2548
+ - viewport: The element that scrolls.
2549
+ - `data-has-overflow-x`: Present when there is more to see sideways.
2550
+ - `data-has-overflow-y`: Present when there is more to see up or down.
2551
+ - `data-scrolling`: Present while it is being scrolled, and a moment after.
2552
+ - scrollbar: A scrollbar's track, placed along its edge of the area. In the page while there is something to scroll its way.
2553
+ - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
2554
+ - `data-hovering`: Present while the pointer is over the area.
2555
+ - `data-scrolling`: Present while the area is scrolled its way.
2556
+ - `--scroll-area-thumb-height`: A vertical thumb's height.
2557
+ - `--scroll-area-thumb-width`: A horizontal thumb's width.
2558
+ - 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
+ - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
2560
+
2561
+ ### Select
2562
+
2563
+ ```
2564
+ import "@kirana-ui/web/select"
2565
+ ```
2566
+
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`.
2568
+
2569
+ Attributes of the element (each also a property, in camel case):
2570
+
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.
2573
+ - `open` (boolean): Whether the list is open, when the caller holds it.
2574
+ - `default-open` (boolean): Whether the list starts open, when the caller does not hold `open`. Read once.
2575
+ - `disabled` (boolean): Disabled: it cannot be changed.
2576
+ - `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
+ - `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.
2581
+ - `name` (string): With a name, the value is submitted with the form around it.
2582
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
2583
+
2584
+ Properties only:
2585
+
2586
+ - `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.
2587
+
2588
+ Events:
2589
+
2590
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
2591
+ - `values-change`: `event.detail.values`, with `event.detail.details`. `preventDefault()` keeps `values` as it was.
2592
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
2593
+
2594
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2595
+
2596
+ - `trigger`
2597
+ - `value`: `kui-placeholder`
2598
+ - `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
+ - `popup`
2600
+ - `list`
2601
+ - `scroll-up-arrow`
2602
+ - `scroll-down-arrow`
2603
+ - `group`: `kui-id`
2604
+ - `group-label`
2605
+ - `separator`
2606
+ - `item`: `kui-disabled`, `kui-label`, `kui-value`
2607
+ - `item-text`: `kui-value`
2608
+ - `item-indicator`: `kui-value`
2609
+
2610
+ Lists (`<template kui-each="…">`): `values`.
2611
+
2612
+ Anatomy:
2613
+
2614
+ ```
2615
+ <kui-select>
2616
+ trigger
2617
+ value
2618
+ <template kui-each="values"> (optional)
2619
+ portal
2620
+ positioner
2621
+ popup
2622
+ scroll-up-arrow
2623
+ list (optional)
2624
+ group (optional, repeated)
2625
+ group-label
2626
+ item (repeated)
2627
+ item-text
2628
+ item-indicator
2629
+ separator (repeated)
2630
+ scroll-down-arrow
2631
+ ```
2632
+
2633
+ Attributes and CSS variables, by part:
2634
+
2635
+ - trigger: The button that shows the value and opens the list.
2636
+ - `data-popup-open`: Present when the list is open.
2637
+ - `data-placeholder`: Present while nothing is chosen.
2638
+ - `data-disabled`: Present when it is disabled.
2639
+ - `data-readonly`: Present when it can be read but not changed.
2640
+ - value: The chosen value's label, or the placeholder. With several values, their labels with commas between.
2641
+ - `data-placeholder`: Present while nothing is chosen.
2642
+ - positioner: Places the list against the trigger. It carries the geometry.
2643
+ - `data-open`: Present when it is open.
2644
+ - `data-closed`: Present when it is closed.
2645
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2647
+ - `--anchor-width`: The anchor's width.
2648
+ - `--anchor-height`: The anchor's height.
2649
+ - `--available-width`: The width between the anchor and the edge of the viewport.
2650
+ - `--available-height`: The height between the anchor and the edge of the viewport.
2651
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2652
+ - scrollUpArrow: In the page while there is more of the list above: it scrolls the list while the pointer moves over it.
2653
+ - `data-direction="up | down"`: The way it scrolls the list.
2654
+ - `data-visible`: Present while there is more of the list its way.
2655
+ - `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.
2656
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2657
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2658
+ - scrollDownArrow: In the page while there is more of the list below: it scrolls the list while the pointer moves over it.
2659
+ - `data-direction="up | down"`: The way it scrolls the list.
2660
+ - `data-visible`: Present while there is more of the list its way.
2661
+ - `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
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2663
+ - `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.
2665
+ - `data-open`: Present when it is open.
2666
+ - `data-closed`: Present when it is closed.
2667
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2668
+ - `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.
2670
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
2671
+ - item: One choice in the list.
2672
+ - `data-selected`: Present on the chosen item, or on each of several.
2673
+ - `data-highlighted`: Present on the item the pointer or the keyboard is on.
2674
+ - `data-disabled`: Present when it is disabled.
2675
+
2676
+ ### Separator
2677
+
2678
+ ```
2679
+ import "@kirana-ui/web/separator"
2680
+ ```
2681
+
2682
+ `<kui-separator>`: `<kui-separator>` around `kui-part="root"`. `orientation`.
2683
+
2684
+ Attributes of the element (each also a property, in camel case):
2685
+
2686
+ - `orientation` (string): Whether the line lies across (the default) or stands upright: what a screen reader is told.
2687
+
2688
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2689
+
2690
+ - `root`
2691
+
2692
+ Anatomy:
2693
+
2694
+ ```
2695
+ <kui-separator>
2696
+ root
2697
+ ```
2698
+
2699
+ Attributes and CSS variables, by part:
2700
+
2701
+ - root: The line.
2702
+ - `data-orientation="horizontal | vertical"`: The way the line runs.
2703
+
2704
+ ### Slider
2705
+
2706
+ ```
2707
+ import "@kirana-ui/web/slider"
2708
+ ```
2709
+
2710
+ `<kui-slider>`: `<kui-slider>` around `kui-part="root"`, a `value` (which says the value as it is written), a `control` with its `track`, `indicator` and a `thumb` for each value, in the values' order (or each with its `kui-index`). A thumb draws the hidden input a form reads. `value` and `default-value` (a range with a comma), `min`, `max`, `step`, `large-step`, `min-steps-between-values`, `thumb-alignment`, `orientation`, `disabled`, `read-only`, `name`, `form`, `locale`; it tells `value-change` and `value-committed`.
2711
+
2712
+ Attributes of the element (each also a property, in camel case):
2713
+
2714
+ - `value` (string): The value, when the caller holds it: a number, or a list of numbers for a range.
2715
+ - `default-value` (string): Read once. Default `min`.
2716
+ - `min` (number): Default 0.
2717
+ - `max` (number): Default 100.
2718
+ - `step` (number): Default 1.
2719
+ - `large-step` (number): What Page Up, Page Down and an arrow with Shift move by. Default 10.
2720
+ - `min-steps-between-values` (number): How many steps two thumbs of a range stay apart. Default 0.
2721
+ - `thumb-alignment` (string): Where a thumb is at the ends of its range. `"center"` (the default): its centre on the control's edge, so half of it lies outside. `"edge"`: its edge on the control's edge, so it stays inside. `"edge-client-only"` is the same here: nothing waits for the browser.
2722
+ - `orientation` (string): Whether the track lies across (the default) or stands upright: the arrows that move a thumb follow.
2723
+ - `disabled` (boolean): Disabled: it cannot be changed.
2724
+ - `read-only` (boolean): Shown as it is, focusable, not changeable: no key and no pointer moves a thumb, and its value is still submitted with the form.
2725
+ - `name` (string): With a name, each thumb's value is submitted with the form around the slider.
2726
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
2727
+ - `locale` (string): The language a value is written in; the page's by default.
2728
+
2729
+ Properties only:
2730
+
2731
+ - `format`: How a value is written.
2732
+ - `getAriaValueText`: What assistive technology reads for a thumb, when the written value is not enough.
2733
+
2734
+ Events:
2735
+
2736
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
2737
+ - `value-committed`: `event.detail.value`, with `event.detail.details`. It reports something that happened: there is nothing to keep.
2738
+
2739
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2740
+
2741
+ - `root`
2742
+ - `value`
2743
+ - `control`
2744
+ - `track`
2745
+ - `indicator`
2746
+ - `thumb`: `kui-index`
2747
+
2748
+ Anatomy:
2749
+
2750
+ ```
2751
+ <kui-slider>
2752
+ root
2753
+ value
2754
+ control
2755
+ track
2756
+ indicator
2757
+ thumb (repeated)
2758
+ ```
2759
+
2760
+ Attributes and CSS variables, by part:
2761
+
2762
+ - root: Groups the slider's parts.
2763
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2764
+ - `data-disabled`: Present when it is disabled.
2765
+ - `data-readonly`: Present when it can be read but not changed.
2766
+ - `data-dragging`: Present while a pointer holds a thumb.
2767
+ - value: The value, written.
2768
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2769
+ - `data-disabled`: Present when it is disabled.
2770
+ - `data-readonly`: Present when it can be read but not changed.
2771
+ - `data-dragging`: Present while a pointer holds a thumb.
2772
+ - control: What a pointer presses and drags on. It holds the track and the thumbs.
2773
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2774
+ - `data-disabled`: Present when it is disabled.
2775
+ - `data-readonly`: Present when it can be read but not changed.
2776
+ - `data-dragging`: Present while a pointer holds a thumb.
2777
+ - track: The whole range.
2778
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2779
+ - `data-disabled`: Present when it is disabled.
2780
+ - `data-readonly`: Present when it can be read but not changed.
2781
+ - `data-dragging`: Present while a pointer holds a thumb.
2782
+ - 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
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2784
+ - `data-disabled`: Present when it is disabled.
2785
+ - `data-readonly`: Present when it can be read but not changed.
2786
+ - `data-dragging`: Present while a pointer holds a thumb.
2787
+ - `--start-position`: With thumbs that stay inside the control: where the filled part starts, or with one thumb where it ends.
2788
+ - `--relative-size`: With thumbs that stay inside the control and a range: the filled part's length.
2789
+ - 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.
2790
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
2791
+ - `data-disabled`: Present when it is disabled.
2792
+ - `data-readonly`: Present when it can be read but not changed.
2793
+ - `data-dragging`: Present while a pointer holds a thumb.
2794
+ - `data-index`: Which thumb it is, from 0.
2795
+ - `--position`: With thumbs that stay inside the control: where the thumb's centre is.
2796
+
2797
+ ### Switch
2798
+
2799
+ ```
2800
+ import "@kirana-ui/web/switch"
2801
+ ```
2802
+
2803
+ `<kui-switch>`: `<kui-switch>` around a `kui-part="root"` button with a `thumb` inside. The root draws the hidden native input a form and a label reach. `checked`, `default-checked`, `disabled`, `read-only`, `required`, `name`, `form`, `value`; it tells `checked-change`.
2804
+
2805
+ Attributes of the element (each also a property, in camel case):
2806
+
2807
+ - `checked` (boolean): Whether it is checked, when the caller holds it.
2808
+ - `default-checked` (boolean): Read once.
2809
+ - `disabled` (boolean): Disabled: it cannot be changed.
2810
+ - `read-only` (boolean): Shown as it is, focusable, not changeable.
2811
+ - `required` (boolean): Needed: in a `Field`, leaving it unchecked is then invalid.
2812
+ - `name` (string): With a name, the control is submitted with the form around it when it is checked.
2813
+ - `form` (string): The id of the form the control belongs to, when it is not inside it.
2814
+ - `value` (string): What is submitted. Default `"on"`, as a native checkbox's.
2815
+
2816
+ Events:
2817
+
2818
+ - `checked-change`: `event.detail.checked`, with `event.detail.details`. `preventDefault()` keeps `checked` as it was.
2819
+
2820
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2821
+
2822
+ - `root`
2823
+ - `thumb`
2824
+
2825
+ Anatomy:
2826
+
2827
+ ```
2828
+ <kui-switch>
2829
+ root
2830
+ thumb
2831
+ ```
2832
+
2833
+ Attributes and CSS variables, by part:
2834
+
2835
+ - root: The track. It holds a hidden native checkbox, which a form and a label reach.
2836
+ - `data-checked`: Present when it is checked.
2837
+ - `data-unchecked`: Present when it is not checked.
2838
+ - `data-disabled`: Present when it is disabled.
2839
+ - `data-readonly`: Present when it can be read but not changed.
2840
+ - `data-required`: Present when the form needs it.
2841
+ - thumb: The knob that moves along the track.
2842
+ - `data-checked`: Present when it is checked.
2843
+ - `data-unchecked`: Present when it is not checked.
2844
+ - `data-disabled`: Present when it is disabled.
2845
+ - `data-readonly`: Present when it can be read but not changed.
2846
+ - `data-required`: Present when the form needs it.
2847
+
2848
+ ### Tabs
2849
+
2850
+ ```
2851
+ import "@kirana-ui/web/tabs"
2852
+ ```
2853
+
2854
+ `<kui-tabs>`: `<kui-tabs>` around `kui-part="root"`, a `list` with a `tab` for each `value` and an `indicator`, and a `panel` for each `value`, in the page while its tab is the active one. `value`, `default-value`, `orientation`; it tells `value-change`.
2855
+
2856
+ Attributes of the element (each also a property, in camel case):
2857
+
2858
+ - `value` (string): The active tab's value; `null` is "none".
2859
+ - `default-value` (string): Read once. Without one, the first tab that can be chosen is, once the page is there.
2860
+ - `orientation` (string): Whether the tabs are laid out across (the default) or down: the arrows that move between them follow.
2861
+
2862
+ Events:
2863
+
2864
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
2865
+
2866
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2867
+
2868
+ - `root`
2869
+ - `list`
2870
+ - `indicator`
2871
+ - `tab`: `kui-disabled`, `kui-value`
2872
+ - `panel`: `kui-value`
2873
+
2874
+ Anatomy:
2875
+
2876
+ ```
2877
+ <kui-tabs>
2878
+ root
2879
+ list
2880
+ tab (repeated)
2881
+ indicator
2882
+ panel (repeated)
2883
+ ```
2884
+
2885
+ Attributes and CSS variables, by part:
2886
+
2887
+ - root: Groups the tabs and their panels.
2888
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2889
+ - `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.
2890
+ - list: The row of tabs. The arrows move between them.
2891
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2892
+ - `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.
2893
+ - tab: A button that shows its panel.
2894
+ - `data-active`: Present on the tab whose panel is shown.
2895
+ - `data-disabled`: Present when it is disabled.
2896
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2897
+ - indicator: A mark for the active tab: it carries that tab's position and size.
2898
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2899
+ - `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.
2900
+ - `--active-tab-left`: The active tab's distance from the list's left edge.
2901
+ - `--active-tab-right`: The active tab's distance from the list's right edge.
2902
+ - `--active-tab-top`: The active tab's distance from the list's top edge.
2903
+ - `--active-tab-bottom`: The active tab's distance from the list's bottom edge.
2904
+ - `--active-tab-width`: The active tab's width.
2905
+ - `--active-tab-height`: The active tab's height.
2906
+ - panel: A tab's content. In the page while its tab is active, and through its exit.
2907
+ - `data-hidden`: Present while its tab is not the active one.
2908
+ - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
2909
+ - `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
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2911
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2912
+
2913
+ ### Toast
2914
+
2915
+ ```
2916
+ import "@kirana-ui/web/toast"
2917
+ ```
2918
+
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.
2920
+
2921
+ Attributes of the element (each also a property, in camel case):
2922
+
2923
+ - `label` (string)
2924
+ - `hotkey` (string)
2925
+ - `swipe-direction` (string)
2926
+ - `duration` (number)
2927
+ - `limit` (number)
2928
+
2929
+ Properties only:
2930
+
2931
+ - `toaster`
2932
+
2933
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
2934
+
2935
+ - `viewport`
2936
+ - `toast`
2937
+ - `content`
2938
+ - `title`
2939
+ - `description`
2940
+ - `close`
2941
+ - `action`
2942
+
2943
+ Lists (`<template kui-each="…">`): `toasts`.
2944
+
2945
+ Anatomy:
2946
+
2947
+ ```
2948
+ <kui-toast>
2949
+ viewport
2950
+ <template kui-each="toasts">
2951
+ toast (repeated)
2952
+ content (optional)
2953
+ title
2954
+ description
2955
+ close
2956
+ action
2957
+ ```
2958
+
2959
+ Attributes and CSS variables, by part:
2960
+
2961
+ - viewport: Where the toasts are drawn: a region that is always in the page.
2962
+ - `data-expanded`: Present while the pointer or focus is on the stack: the toasts are spread out, and wait.
2963
+ - `--toast-frontmost-height`: The height of the newest toast.
2964
+ - root: One toast.
2965
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2966
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2967
+ - `data-expanded`: Present while the pointer or focus is on the stack: the toasts are spread out, and wait.
2968
+ - `data-type`: The kind the toast was added as.
2969
+ - `data-limited`: Present on a toast behind as many as are shown at once.
2970
+ - `data-swiping`: Present while the toast is dragged.
2971
+ - `data-swipe-direction="left | right | up | down"`: The way the toast was dragged out, once it has been.
2972
+ - `--toast-index`: Its place in the stack: 0 for the newest.
2973
+ - `--toast-height`: Its height.
2974
+ - `--toast-offset-y`: The height of the toasts in front of it.
2975
+ - `--toast-swipe-movement-x`: How far it has been dragged across.
2976
+ - `--toast-swipe-movement-y`: How far it has been dragged up or down.
2977
+ - content: What holds a toast's contents, when the design sizes the toast itself.
2978
+ - `data-behind`: Present on a toast that is behind the newest.
2979
+ - `data-expanded`: Present while the pointer or focus is on the stack: the toasts are spread out, and wait.
2980
+
2981
+ ### Toggle
2982
+
2983
+ ```
2984
+ import "@kirana-ui/web/toggle"
2985
+ ```
2986
+
2987
+ `<kui-toggle>`: `<kui-toggle>` around a `kui-part="root"` button. Inside a `<kui-toggle-group>` it is one of the group's, by its `value`; inside a `<kui-toolbar>`, one of its items. `pressed`, `default-pressed`, `disabled`, `value`; it tells `pressed-change`.
2988
+
2989
+ Attributes of the element (each also a property, in camel case):
2990
+
2991
+ - `pressed` (boolean): Whether it is pressed, when the caller holds it.
2992
+ - `default-pressed` (boolean): Read once.
2993
+ - `disabled` (boolean): Disabled: a press does nothing.
2994
+ - `value` (string): In a toggle group: what the group's value holds while this one is pressed.
2995
+
2996
+ Events:
2997
+
2998
+ - `pressed-change`: `event.detail.pressed`, with `event.detail.details`. `preventDefault()` keeps `pressed` as it was.
2999
+
3000
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3001
+
3002
+ - `root`
3003
+
3004
+ Anatomy:
3005
+
3006
+ ```
3007
+ <kui-toggle>
3008
+ root
3009
+ ```
3010
+
3011
+ Attributes and CSS variables, by part:
3012
+
3013
+ - root: The button. It stays pressed until it is pressed again.
3014
+ - `data-pressed`: Present while it is pressed.
3015
+ - `data-disabled`: Present when it is disabled.
3016
+
3017
+ ### ToggleGroup
3018
+
3019
+ ```
3020
+ import "@kirana-ui/web/toggle-group"
3021
+ ```
3022
+
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`.
3024
+
3025
+ Attributes of the element (each also a property, in camel case):
3026
+
3027
+ - `value` (string): The values of the pressed toggles: none, one, or with `multiple` several.
3028
+ - `default-value` (string): The values pressed at the start, when the caller does not hold `value`. Read once.
3029
+ - `multiple` (boolean): Whether more than one can be pressed at a time.
3030
+ - `disabled` (boolean): Disables every toggle of the group.
3031
+ - `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.
3033
+
3034
+ Events:
3035
+
3036
+ - `value-change`: `event.detail.value`, with `event.detail.details`. `preventDefault()` keeps `value` as it was.
3037
+
3038
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3039
+
3040
+ - `root`
3041
+
3042
+ Anatomy:
3043
+
3044
+ ```
3045
+ <kui-toggle-group>
3046
+ root
3047
+ ```
3048
+
3049
+ Attributes and CSS variables, by part:
3050
+
3051
+ - root: The group. A toggle inside it with a `value` is one of its toggles.
3052
+ - `data-orientation="horizontal | vertical"`: Whether its toggles are in a row or a column.
3053
+ - `data-multiple`: Present when several can be pressed at a time.
3054
+ - `data-disabled`: Present when it is disabled.
3055
+
3056
+ ### Toolbar
3057
+
3058
+ ```
3059
+ import "@kirana-ui/web/toolbar"
3060
+ ```
3061
+
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`.
3063
+
3064
+ Attributes of the element (each also a property, in camel case):
3065
+
3066
+ - `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.
3068
+ - `disabled` (boolean): Disables every control of the toolbar.
3069
+
3070
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3071
+
3072
+ - `root`
3073
+ - `button`: `kui-disabled`, `kui-label`
3074
+ - `input`: `kui-disabled`, `kui-label`
3075
+ - `group`: `kui-disabled`, `kui-label`
3076
+ - `link`
3077
+ - `separator`
3078
+
3079
+ Anatomy:
3080
+
3081
+ ```
3082
+ <kui-toolbar>
3083
+ root
3084
+ group (optional, repeated)
3085
+ button (repeated)
3086
+ link (repeated)
3087
+ input (repeated)
3088
+ separator (repeated)
3089
+ ```
3090
+
3091
+ Attributes and CSS variables, by part:
3092
+
3093
+ - root: The toolbar. It is one stop for Tab.
3094
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3095
+ - `data-disabled`: Present when it is disabled.
3096
+ - button: A button of the toolbar.
3097
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3098
+ - `data-disabled`: Present when it is disabled.
3099
+ - link: A link of the toolbar.
3100
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3101
+ - `data-disabled`: Present when it is disabled.
3102
+ - input: A text input of the toolbar. The arrows are its own until the caret is at an end.
3103
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3104
+ - `data-disabled`: Present when it is disabled.
3105
+ - group: Items that belong together.
3106
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3107
+ - `data-disabled`: Present when it is disabled.
3108
+ - separator: A line between items, across the toolbar.
3109
+ - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3110
+
3111
+ ### Tooltip
3112
+
3113
+ ```
3114
+ import "@kirana-ui/web/tooltip"
3115
+ ```
3116
+
3117
+ `<kui-tooltip>`: `<kui-tooltip>` around a `kui-part="trigger"` and a `portal` with a `positioner` (its `kui-side` and the like) around the `popup`, which may hold an `arrow`. `open`, `default-open`, `delay`, `close-delay`, `disabled`; it tells `open-change`.
3118
+
3119
+ Attributes of the element (each also a property, in camel case):
3120
+
3121
+ - `open` (boolean): Whether it is open, when the caller holds it.
3122
+ - `default-open` (boolean): Whether it starts open, when the caller does not hold `open`. Read once.
3123
+ - `delay` (number): How long the pointer rests on the trigger before the popup opens, in milliseconds.
3124
+ - `close-delay` (number): How long after the pointer leaves the popup closes, in milliseconds.
3125
+ - `disabled` (boolean): Disabled: the pointer and focus do not open it.
3126
+
3127
+ Events:
3128
+
3129
+ - `open-change`: `event.detail.open`, with `event.detail.details`. `preventDefault()` keeps `open` as it was.
3130
+
3131
+ Parts (`kui-part`), each with the `kui-` attributes its element is read for:
3132
+
3133
+ - `trigger`: `kui-close-delay`, `kui-delay`
3134
+ - `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`
3135
+ - `popup`
3136
+ - `arrow`
3137
+
3138
+ Anatomy:
3139
+
3140
+ ```
3141
+ <kui-tooltip>
3142
+ trigger
3143
+ portal
3144
+ positioner
3145
+ popup
3146
+ arrow
3147
+ ```
3148
+
3149
+ Attributes and CSS variables, by part:
3150
+
3151
+ - trigger: The element the tooltip describes.
3152
+ - `data-popup-open`: Present when the tooltip is open.
3153
+ - positioner: Places the popup against the trigger. It carries the geometry.
3154
+ - `data-open`: Present when it is open.
3155
+ - `data-closed`: Present when it is closed.
3156
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
3158
+ - `--anchor-width`: The anchor's width.
3159
+ - `--anchor-height`: The anchor's height.
3160
+ - `--available-width`: The width between the anchor and the edge of the viewport.
3161
+ - `--available-height`: The height between the anchor and the edge of the viewport.
3162
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
3163
+ - popup: The tooltip itself.
3164
+ - `data-open`: Present when it is open.
3165
+ - `data-closed`: Present when it is closed.
3166
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
3167
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
3168
+ - `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.
3169
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
3170
+ - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
3171
+ - arrow: An element that points at the trigger, placed along the popup's edge.
3172
+ - `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
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
3174
+ - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.