@kirana-ui/angular 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms.txt CHANGED
@@ -4,9 +4,11 @@
4
4
 
5
5
  Generated from the library's own source (`bun scripts/llms.ts`), and checked against it: every part and every prop here is in the package, and what is not here is not. In order: installing it and its entries; the positioner's options; the types the props name; what else is exported; the agent bridge; the testing kit; then "Using it" (the rules of every component) and "Components" (each one's parts, props, attributes and CSS variables).
6
6
 
7
+ This file describes the version it ships with. What changed in each release, the breaking changes first with what to write instead, is `CHANGELOG.md` in the package: `node_modules/@kirana-ui/angular/CHANGELOG.md`.
8
+
7
9
  ## Install and entries
8
10
 
9
- Install `@kirana-ui/angular`. 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/angular/agent`, `@kirana-ui/angular/testing`), so nothing is imported from a package the project did not install.
11
+ Install `@kirana-ui/angular`. 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/angular/agent`, `@kirana-ui/angular/testing`), so nothing is imported from a package the project did not install. The one exception is a component of your own, built on `@kirana-ui/core/authoring`: its controller imports the core by name, so that project installs `@kirana-ui/core` too, at this package's exact version (they must be one copy). It runs on the project's own `@angular/core` >=20.0.0.
10
12
 
11
13
  Its entries: `@kirana-ui/angular` (every directive, and what a directive of your own is made with), `@kirana-ui/angular/agent` and `@kirana-ui/angular/testing`. There is no entry per component: Angular's packager writes one module, which a project's build takes apart.
12
14
 
@@ -30,7 +32,7 @@ What every `Positioner` takes, beside its own props where a component's section
30
32
  - `positionMethod?: "absolute" | "fixed"`: The CSS `position` the positioner is given: `"absolute"` or `"fixed"`. Default `"absolute"`.
31
33
  - `anchor?: PositionerAnchor`: What the popup is placed against, when that is not its trigger. It may change while the popup is open: the popup follows.
32
34
 
33
- A component's own defaults lie over those: `Autocomplete` `{ align: "start" }`; `Combobox` `{ align: "start" }`; `ContextMenu` `{ align: "start" }`, and `{ side: "inline-end", align: "start" }` for a submenu or for a menu in a vertical menubar; `HoverCard` `{ side: "top" }`; `Menu` `{ align: "start" }`, and `{ side: "inline-end", align: "start" }` for a submenu or for a menu in a vertical menubar; `NavigationMenu` `{ align: "start" }`; `Select` `{ align: "start" }`; `Tooltip` `{ side: "top" }`.
35
+ A component's own defaults lie over those: `Autocomplete` `{ align: "start" }`; `Combobox` `{ align: "start" }`; `ContextMenu` `{ align: "start" }`, and `{ side: "inline-end", align: "start" }` for a submenu or for a menu in a vertical menubar; `HoverCard` `{ side: "top" }`; `Menu` `{ align: "start" }`, and `{ side: "inline-end", align: "start" }` for a submenu or for a menu in a vertical menubar; `NavigationMenu` `{ align: "start" }`; `Select` `{ align: "start" }`; `Tooltip` `{ side: "top" }`; `Tour` the shared defaults, under the `side` and `align` of the step shown; a step with no target is placed in the middle of the viewport whatever they say.
34
36
 
35
37
  ## Types
36
38
 
@@ -54,6 +56,7 @@ The named types the props below mention, each with the entry of this package it
54
56
  - `defaultValue?: CalendarValueOf<Mode>`: The value it starts with, when the caller does not hold `value`. Read once.
55
57
  - `onValueChange?: ((value: CalendarValueOf<Mode>, details: ChangeDetails) => void)`: Heard as a day is about to be chosen: `details.cancel()` keeps the value as it was.
56
58
  - `mode?: Mode`: Whether one day is chosen (the default), a first and a last (`"range"`), or any number (`"multiple"`: a day pressed is added, and pressed again is taken away).
59
+ - `required?: boolean`: Whether a day, once chosen, stays chosen. Off by default, as in react-day-picker: the chosen day pressed again is taken away and the value is `null`, heard with the reason `"day-deselect"` (cancellable). Given, the chosen day pressed again stays, and with `mode: "multiple"` the last day cannot be taken away. With `mode: "range"` a press always begins a range again, so a press never clears a range. It does not make a form ask for a value.
57
60
  - `minDays?: number`: With `mode: "multiple"`: the fewest days that can be left chosen. A press that would leave fewer does nothing.
58
61
  - `maxDays?: number`: With `mode: "multiple"`: the most days that can be chosen. Once they are, the other days are disabled until one is taken away.
59
62
  - `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`.
@@ -62,7 +65,7 @@ The named types the props below mention, each with the entry of this package it
62
65
  - `defaultMonth?: IsoDate`: The month it starts on, when the caller does not hold `month`. Read once. Without it, the month of `defaultFocusedValue`, of the value, or of today.
63
66
  - `onMonthChange?: ((month: IsoDate, details: ChangeDetails) => void)`: Heard as another month is about to be shown (the keys, the buttons, a day of another month pressed): its first day. `details.cancel()` keeps the month as it was.
64
67
  - `defaultFocusedValue?: IsoDate`: The day it opens on, focusable when Tab reaches the grid. It is also the month it opens on, unless `month` or `defaultMonth` says another: then the stop for Tab is a chosen day of the months shown, today, or their first day.
65
- - `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.
68
+ - `locale?: string`: The language and region its names, numbers, first day of the week and calendar follow (`"en-US"`, `"fa-IR"`). Give it: a server does not know the reader's. The week begins on the day the region begins it on (Sunday in `"en-US"`, Monday in `"fr-FR"`), or on the day a `-u-fw-` extension names: `"en-US-u-fw-mon"` is American English with weeks from Monday (`sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`).
66
69
  - `calendarSystem?: CalendarSystem`: The calendar its months are laid out in, when it is not the Gregorian one: an instance from `@internationalized/date` (`new PersianCalendar()`). Given, not found from the locale: a page then carries only the calendars it uses.
67
70
  - `min?: IsoDate`: The first and the last day that can be chosen.
68
71
  - `max?: IsoDate`: The last day that can be chosen.
@@ -91,6 +94,10 @@ The named types the props below mention, each with the entry of this package it
91
94
  - `fallbackAxisSide?: "start" | "end" | "none"`: Where it goes when neither the side asked for nor its opposite fits: to the other axis, its `"start"` or its `"end"` first, or nowhere (`"none"`). Default `"end"`.
92
95
  - `CollisionBoundary` (`@kirana-ui/angular`): `"clipping-ancestors" | Element | Element[] | { x: number; y: number; width: number; height: number }`. What a popup is held inside: the ancestors that clip it (`"clipping-ancestors"`), an element, several, or a rectangle of the viewport.
93
96
  - `CollisionPadding` (`@kirana-ui/angular`): `number | Partial<Record<PhysicalSide, number>>`. The room kept between a popup and the edges it is held inside: one number, or one a side.
97
+ - `ColorFormat` (`@kirana-ui/angular`): `"hex" | "rgb" | "hsl"`. How a colour is written: `#rrggbb`, `rgb(…)` or `hsl(…)`.
98
+ - `ColorPickerInputChannel` (`@kirana-ui/angular`): `"hex" | "red" | "green" | "blue" | "hue" | "saturation" | "lightness" | "alpha"`. A channel an input of the picker is typed in.
99
+ - `ColorPickerSliderChannel` (`@kirana-ui/angular`): `"hue" | "alpha"`. A channel a slider of the picker moves: the hue, or the alpha.
100
+ - `ColorPickerThumb` (`@kirana-ui/angular`): `"area" | ColorPickerSliderChannel`. What a thumb of the picker moves: the area's, or a slider's channel.
94
101
  - `ComboboxEntry<Value = unknown>` (`@kirana-ui/angular`): `ComboboxItemEntry<Value> | ComboboxGroupEntry<Value>`. What a `Collection` hands to be drawn: an item that is left, or a group that has items left.
95
102
  - `ComboboxGroupData<Value = unknown>` (`@kirana-ui/angular`): Items given as data that belong together: `value` is the group's name.
96
103
  - `value: string`
@@ -126,7 +133,8 @@ The named types the props below mention, each with the entry of this package it
126
133
  - `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.
127
134
  - `min?: IsoDate`: The first and the last day it takes: outside them it says it is invalid.
128
135
  - `max?: IsoDate`: The last day it takes.
129
- - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part shows. Default: `dd`, `mm`, `yyyy`.
136
+ - `calendarSystem?: CalendarSystem`: The calendar its parts are typed in, when it is not the Gregorian one: an instance from `@internationalized/date` (`new PersianCalendar()`), as a calendar takes it. Its days, months, years and eras are the parts' ranges; the value is still an ISO day. In a calendar with several eras (Japanese, Minguo, Ethiopic), the era is a part of its own.
137
+ - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part shows. Default: `dd`, `mm`, `yyyy`, `era`.
130
138
  - `disabled?: boolean`: Disabled: it cannot be changed.
131
139
  - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
132
140
  - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
@@ -136,10 +144,14 @@ The named types the props below mention, each with the entry of this package it
136
144
  - `type: DateUnit | "literal"`
137
145
  - `literal: string`: What stands between two parts (`"/"`); empty for a part that is typed.
138
146
  - `index: number`: Its place among the pieces.
147
+ - `DatePickerRange` (`@kirana-ui/angular`): A range a date picker holds: its first and its last day, either `null` while it is being chosen (the first picked, the second not yet; one end typed).
148
+ - `start: IsoDate | null`
149
+ - `end: IsoDate | null`
150
+ - `DatePickerValueOf<Mode extends DatePickerMode | undefined>` (`@kirana-ui/angular`): `Mode extends "range" ? DatePickerRange | null : IsoDate | null`. The value of one mode: a day or `null`, or a range or `null`.
139
151
  - `DateRange` (`@kirana-ui/angular`): A range of days, its first and its last, both in it.
140
152
  - `start: IsoDate`
141
153
  - `end: IsoDate`
142
- - `DateUnit` (`@kirana-ui/angular`): `"day" | "month" | "year"`. A part of a date that is typed on its own.
154
+ - `DateUnit` (`@kirana-ui/angular`): `"era" | "day" | "month" | "year"`. A part of a date that is typed on its own; the era only in a calendar that has several.
143
155
  - `Direction` (`@kirana-ui/angular`): `"ltr" | "rtl"`. The reading direction: left to right, or right to left.
144
156
  - `DrawerSide` (`@kirana-ui/angular`): `"up" | "down" | "left" | "right"`. The way a drawer is swiped to close it: towards the edge it came from.
145
157
  - `DrawerSnapPoint` (`@kirana-ui/angular`): `number | string`. How much of a drawer shows at a place it rests: a share of it, or a length.
@@ -148,8 +160,22 @@ The named types the props below mention, each with the entry of this package it
148
160
  - `errors: readonly string[]`: What is wrong, one message each.
149
161
  - `state: Readonly<Record<ValidityKey, boolean>>`: What the browser found, by name; `customError` is the field's own `validate`.
150
162
  - `value: string`: The value that was checked.
163
+ - `FileRejection` (`@kirana-ui/angular`): A file that was not taken, and every reason it was not.
164
+ - `file: File`
165
+ - `reasons: readonly FileRejectionReason[]`
166
+ - `FileRejectionReason` (`@kirana-ui/angular`): `"type" | "too-large" | "too-small" | "too-many" | "invalid"`. Why a file was not taken.
167
+ - `FileUploadEntry` (`@kirana-ui/angular`): One file as it is drawn: the file, its place, and what tells it from the others.
168
+ - `key: string`: The same for as long as the file is held: what a list keeps its element by.
169
+ - `file: File`
170
+ - `index: number`
151
171
  - `FormErrors` (`@kirana-ui/angular`): `Record<string, string | readonly string[]>`. A form's errors as a server sends them: each field's name with its message, or messages.
152
172
  - `FormValues` (`@kirana-ui/angular`): `Record<string, FormDataEntryValue | FormDataEntryValue[]>`. A form's values by field name, as `FormData` holds them: a list where a name is there more than once.
173
+ - `HourCycle` (`@kirana-ui/angular`): `12 | 24`. A clock of twelve hours and a day period, or of twenty-four.
174
+ - `Hsva` (`@kirana-ui/angular`): Hue from 0 to 360, saturation and brightness (value) from 0 to 100, alpha from 0 to 1: what a colour area draws, saturation across and brightness up.
175
+ - `h: number`
176
+ - `s: number`
177
+ - `v: number`
178
+ - `a: number`
153
179
  - `ImageStatus` (`@kirana-ui/angular`): `"idle" | "loading" | "loaded" | "error"`. Where an avatar's picture is in its loading: `idle` while it has no address, `loading`, then `loaded` or `error`. Base UI's `ImageLoadingStatus`.
154
180
  - `IsoDate` (`@kirana-ui/angular`): `string`. A day as `YYYY-MM-DD`, in the calendar the world's data is kept in (ISO 8601).
155
181
  - `ItemLabels<Value = unknown>` (`@kirana-ui/angular`): `readonly { value: Value; label: string }[] | Readonly<Record<string, string>>`. The labels of a control's values, as its caller gives them: a list of values with their labels, or, for values that are text, the labels by value (`{ apple: "Apple" }`).
@@ -166,9 +192,11 @@ The named types the props below mention, each with the entry of this package it
166
192
  - `positioner: { width: number; height: number }`: The positioner's size, in pixels.
167
193
  - `OffsetFunction` (`@kirana-ui/angular`): `(data: OffsetData) => number`. A gap worked out from what was measured: `({ side, align, anchor, positioner }) => number`.
168
194
  - `Orientation` (`@kirana-ui/angular`): `"horizontal" | "vertical"`. The way a row of things is laid out, and so which arrow keys move along it.
195
+ - `OtpValidation` (`@kirana-ui/angular`): `"numeric" | "alpha" | "alphanumeric" | "none" | "alphabetic" | "text"`. Which characters a one-time code takes: Base UI's four values, and `alphabetic` and `text`, the older spellings of `alpha` and `none`.
169
196
  - `PaginationEntry` (`@kirana-ui/angular`): `{ readonly type: "page"; readonly page: number; readonly key: string } | { readonly type: "ellipsis"; readonly key: "start" | "end" }`. One piece of the list of pages: a page, or the mark for pages left out.
170
197
  - `PhysicalSide` (`@kirana-ui/angular`): `"top" | "right" | "bottom" | "left"`. A side of the anchor as the page is drawn.
171
198
  - `PositionerAnchor` (`@kirana-ui/angular`): `Anchor | ElementRef<Element> | (() => Anchor | ElementRef<Element> | null | undefined) | null | undefined`. What a positioner's `anchor` may be: an element (a template variable, `#box`), an `ElementRef`, a place in the viewport (an object with `getBoundingClientRect`), or a function that gives one of those (a `viewChild` signal).
199
+ - `Presentation` (`@kirana-ui/angular`): `"popup" | "sheet" | "auto"`. How a list opens: `"popup"` placed against its trigger, `"sheet"` from the bottom edge of the viewport, `"auto"` a sheet on a narrow touch screen and a popup elsewhere.
172
200
  - `QrCorrection` (`@kirana-ui/angular`): `"L" | "M" | "Q" | "H"`. How much of the symbol may be lost and still be read: about 7, 15, 25 and 30 in a hundred.
173
201
  - `ReadonlySignal<T>` (`@kirana-ui/angular`): A value that is read, and that tells when it changes.
174
202
  - `get(): T`: The value, tracked by the computed or effect that reads it.
@@ -188,6 +216,16 @@ The named types the props below mention, each with the entry of this package it
188
216
  - `cancel(): void`: Keeps the value as it was.
189
217
  - `canceled: boolean`
190
218
  - `SliderTold<Value extends SliderValue = SliderValue>` (`@kirana-ui/angular`): `Value extends number ? number : number[]`. What a slider tells of a value it was given as `Value`: a number for one thumb, a list for a range, and either where the caller's own type says either.
219
+ - `TagsInputEntry` (`@kirana-ui/angular`): One tag as it is drawn: its text, its place, and what tells it from the others.
220
+ - `key: string`: The same for as long as the tag is there: what a list keeps its element by.
221
+ - `value: string`
222
+ - `index: number`
223
+ - `TimeFieldSegment` (`@kirana-ui/angular`): One piece of the field, in the locale's order: a part that is typed, or what stands between.
224
+ - `type: TimeUnit | "literal"`
225
+ - `literal: string`: What stands between two parts (`":"`); empty for a part that is typed.
226
+ - `index: number`: Its place among the pieces.
227
+ - `TimeGranularity` (`@kirana-ui/angular`): `"minute" | "second"`. The smallest part it is typed to.
228
+ - `TimeUnit` (`@kirana-ui/angular`): `"hour" | "minute" | "second" | "dayPeriod"`. A part of a time that is typed on its own.
191
229
  - `ToastActionOptions<Content = string>` (`@kirana-ui/angular`): A button a toast offers: what it says, and what pressing it does.
192
230
  - `label: Content`: What the button says: `Toast.Action` draws it when it is given nothing else. Needed.
193
231
  - `onAction(details: ChangeDetails): void`: Heard when the button is pressed, before the toast closes with the reason `"action-press"`: `details.cancel()` keeps the toast open. Needed.
@@ -203,14 +241,16 @@ The named types the props below mention, each with the entry of this package it
203
241
  - `title?: Content`: What the toast is called: `Toast.Title` draws it when it is given nothing else. Default: none.
204
242
  - `description?: Content`: What the toast says: `Toast.Description` draws it when it is given nothing else. Default: none.
205
243
  - `type?: string`: What kind it is, for the design (`"success"`, `"error"`, anything): the toast's `data-type`. Default: none.
206
- - `duration?: number`: How long it stays, in milliseconds; `Infinity` until it is closed. Default: the toaster's `duration`.
244
+ - `timeout?: number`: How long it stays, in milliseconds; `0` (or `Infinity`) until it is closed. Default: the toaster's `timeout`.
245
+ - `duration?: number`: How long it stays, in milliseconds; `Infinity` until it is closed.
207
246
  - `priority?: "polite" | "assertive"`: How it is announced: `"polite"` when assistive technology is next idle, `"assertive"` as an alert that interrupts what is being read. Default: `"polite"`.
208
247
  - `action?: ToastActionOptions<Content>`: A button of the toast's own, which `Toast.Action` draws and presses. Default: none.
209
248
  - `data?: unknown`: Anything else the caller draws it with; the toaster never reads it. Default: none.
210
249
  - `onClose?: ((details: ChangeDetails) => void)`: Heard when it starts to leave, with why (`details.reason`). Default: none.
211
250
  - `ToastRecord<Content = ToastContent>` (`@kirana-ui/angular`): A toast as its toaster holds it: what it was added with, and where it stands.
212
251
  - `id: string`: What it is known by: the one it was added with, or one the toaster made.
213
- - `duration: number`: How long it stays, in milliseconds: its own, or the toaster's when it gave none.
252
+ - `timeout: number`: How long it stays, in milliseconds: its own, or the toaster's when it gave none; `Infinity` until it is closed.
253
+ - `duration: number`: How long it stays, in milliseconds.
214
254
  - `priority: "polite" | "assertive"`: How it is announced: its own, or `"polite"` when it gave none.
215
255
  - `closing: boolean`: It has been closed and is on its way out. `false` until then.
216
256
  - `title?: Content`: What the toast is called: `Toast.Title` draws it when it is given nothing else. Default: none.
@@ -220,6 +260,13 @@ The named types the props below mention, each with the entry of this package it
220
260
  - `data?: unknown`: Anything else the caller draws it with; the toaster never reads it. Default: none.
221
261
  - `onClose?: ((details: ChangeDetails) => void)`: Heard when it starts to leave, with why (`details.reason`). Default: none.
222
262
  - `ToastState<Content = string>` (`@kirana-ui/angular`): `ToastOptions<Content> | (string extends Content ? string : never)`. What a promise's toast shows in one of its states: a toast's options, or a string, which is its title (where a title may be a string).
263
+ - `TourPopupContext<Step extends TourStep = TourStep>` (`@kirana-ui/angular`): `TourShownStep<Step> & { $implicit: TourShownStep<Step> }`. The popup's template context: the step shown, whole and by its names.
264
+ - `TourShownStep<Step extends TourStep = TourStep>` (`@kirana-ui/angular`): What the popup's template is told of the step it shows, to draw it.
265
+ - `step: Step | undefined`: The step shown, as the page gave it; `undefined` while none is.
266
+ - `index: number`: Its index, from 0.
267
+ - `current: number`: Its place, from 1: the "2" of "2 of 5".
268
+ - `total: number`: How many steps there are: the "5" of "2 of 5".
269
+ - `TreeSelectionMode` (`@kirana-ui/angular`): `"none" | "single" | "multiple"`. Whether a tree's nodes can be chosen, and how many at once.
223
270
  - `ValidationMode` (`@kirana-ui/angular`): `"onSubmit" | "onBlur" | "onChange"`. When a field checks its value. Once it is found invalid, it checks on every change.
224
271
  - `ValidityKey` (`@kirana-ui/angular`): `Exclude<keyof ValidityState, "valid">`. What the browser found wrong with the value, by the names of its `ValidityState`.
225
272
 
@@ -233,14 +280,18 @@ What the entries export beside the components, their parts' props types and the
233
280
  - `CalendarValue`, from `@kirana-ui/angular`: What a calendar holds: a day, a range of days in `mode: "range"`, a list of days in `mode: "multiple"`, or `null` for none.
234
281
  - `ComponentDefinition`, from `@kirana-ui/angular`: A component in the vocabulary: its parts by name.
235
282
  - `createToaster(options?: Core.ToasterOptions)`, from `@kirana-ui/angular`: The toasts of a page, made once, in a module: `toaster.add({ title })` from anywhere. A title, a description and an action's label are a string or a template, unless `Content` says otherwise.
236
- - `hostInputs(directive: ProviderToken<Directive>, given: NoInfer<HostInputs<Directive>>)`, from `@kirana-ui/angular`: Gives the inputs of a primitive this directive hosts (`hostDirectives: [KpTooltip]`), as a design system's directive gives its defaults: `hostInputs(KpTooltip, { delay: () => 0 })`. Each value is a function read like a signal, so one worked out from the host's own inputs (`{ disabled: computed(() => !this.collapsed()) }`) follows them. An input the element binds (one the host exposes through `hostDirectives`' `inputs`, written on the element) wins over what is given here. Call it where injection works (a field initialiser or the constructor): host directives are made before their host, and read their inputs after it is made.
283
+ - `DatePickerMode`, from `@kirana-ui/angular`: Whether a date picker chooses one day or a first and a last.
284
+ - `DatePickerValue`, from `@kirana-ui/angular`: What a date picker holds: a day, or in `mode: "range"` a range; `null` for none.
285
+ - `hostInputs(directive: ProviderToken<Directive>, given: NoInfer<HostInputs<Directive>>)`, from `@kirana-ui/angular`: Gives the inputs of a primitive this directive hosts (`hostDirectives: [KpTooltip]`), as a design system's directive gives its defaults: `hostInputs(KpTooltip, { delay: () => 0 })`. Each value is a function read like a signal, so one worked out from the host's own inputs (`{ disabled: computed(() => !this.collapsed()) }`) follows them. An input the element binds (one the host exposes through `hostDirectives`' `inputs`, written on the element) wins over what is given here. A value of `undefined` gives nothing: the primitive's own input stands, so a model given `undefined` is the primitive's to hold. Of hosts nested in one another that give the same input, the outermost wins, and one that gives `undefined` leaves it to the host inside it. Call it where injection works (a field initialiser or the constructor): host directives are made before their host, and read their inputs after it is made.
237
286
  - `HostInputs`, from `@kirana-ui/angular`: What a directive hosting a primitive gives the primitive's inputs: each a function read like a signal (a signal, a `computed`, `() => 0`), so a value worked out from the host's own inputs follows them.
238
287
  - `hostPart()`, from `@kirana-ui/angular`: Puts a part on the directive's host element: the core writes its attributes and listens for its events itself, so nothing waits for change detection. Returns a function to call in `ngOnInit`, when the part's controller exists.
239
288
  - `injectDirection()`, from `@kirana-ui/angular`: The direction the nearest `kpDirection` states; `ltr` outside one.
289
+ - `injectDirectionAround()`, from `@kirana-ui/angular`: The reading direction a `kpDirection` around this directive states, as the signal a controller takes (`{ direction }`); `undefined` outside one, where the controller reads the direction its element is laid out in. For a directive of your own: the library's read the same.
240
290
  - `innerPart(tag: string)`, from `@kirana-ui/angular`: A part the directive draws itself, as the last child of its host: the hidden native input of a form control, which the caller does not write. Returns a function to call in `ngOnInit`.
241
291
  - `InputsOf`, from `@kirana-ui/angular`: The inputs of a directive, by the name its class gives each, and the value each reads (after its transform): `InputsOf<KpTooltip>["delay"]` is `number | undefined`.
242
292
  - `inputsSignal(read: () => T)`, from `@kirana-ui/angular`: A core signal that follows a directive's inputs. Call it where injection works (a field initialiser or the constructor); `read` first runs when the directive's inputs are set. Given its directive (`inputsSignal(this, () => …)`), what a host gives it through `hostInputs` is laid over the inputs the element does not bind: the directive then calls `bound(changes)` from its `ngOnChanges`.
243
293
  - `InputsSignal`, from `@kirana-ui/angular`: What `inputsSignal` gives: the signal, and the two calls its directive makes.
294
+ - `IsoTime`, from `@kirana-ui/angular`: A time of day as `HH:MM` or `HH:MM:SS`, in 24 hours (ISO 8601).
244
295
  - `KpDirection` (`[kpDirection]`), from `@kirana-ui/angular`: States the reading direction for the components inside: `<div kpDirection="rtl" dir="rtl">`. It writes nothing on its element: the `dir` attribute is set with it. Inputs: `kpDirection: Direction | ""`.
245
296
  - `KpIds`, from `@kirana-ui/angular`: Ids for parts whose caller gave none: one counter per application, so a server and its client agree.
246
297
  - `KpPortalProvider` (`[kpPortalProvider]`), from `@kirana-ui/angular`: `<ng-container kpPortalProvider [container]="element">`: says where every popup inside it is drawn, the popups those open included: an element of the page (a shadow root's host, a full-screen element) in place of `<body>`. Inputs: `container: HTMLElement | null`.
@@ -259,6 +310,8 @@ What the entries export beside the components, their parts' props types and the
259
310
  - `StateOf`, from `@kirana-ui/angular`: The state of a part, from its definition in the vocabulary: a state its attribute marks by being present is `true` or absent, one with values is one of them or absent. It is what `stateOf` reads from the part's props.
260
311
  - `ToastContent`, from `@kirana-ui/angular`: What a toast's title, description and action's label may be here: a string, or a template that draws it (`<ng-template #saved>`, read with `viewChild`).
261
312
  - `ToasterOptions`, from `@kirana-ui/angular`: What a toaster is made with.
313
+ - `TourStep`, from `@kirana-ui/angular`: One step of a tour. What it says is the page's to draw: the controller only shows it.
314
+ - `TourTarget`, from `@kirana-ui/angular`: What a step is about: an element, a CSS selector, or a function that gives an element, asked when the step is shown, so it may be something the page draws late.
262
315
 
263
316
  ## Agent
264
317
 
@@ -269,16 +322,23 @@ What the entries export beside the components, their parts' props types and the
269
322
  - `root?: ParentNode`: The part of the page the agent may read and use. Default: the document.
270
323
  - `allow?: ((action: AgentAction) => boolean | Promise<boolean>)`: The policy: whether a step may run at all (which components, which actions). Asked for every step, before `confirm`. Without it every step may. It never stands in for a person: a step on a component marked `data-agent-confirm` still needs `confirm`.
271
324
  - `confirm?: ((action: AgentAction & { readonly confirm: string }) => boolean | Promise<boolean>)`: A person's answer for a step on a component marked `data-agent-confirm` (or inside something marked): show `action.confirm`, the mark's text, and resolve with what they chose. Without it such a step fails with "Needs a person", whatever `allow` says.
325
+ - `timeout?: number`: How long `allow` and `confirm` may take to answer, in milliseconds: after it the step fails with "No answer". Without it a step waits for as long as a person takes.
326
+ - `limit?: number`: How many components a snapshot lists before it says how many more there are. Default 200.
327
+ - `kinds?: readonly AgentKind[]`: Kinds of component of your own, matched before the ones the bridge knows.
272
328
 
273
329
  and gives (`Agent`):
274
330
 
275
331
  - `snapshot(): AgentComponent[]`: The components in the page now.
276
- - `act(request: { steps: readonly AgentStep[] }): Promise<AgentResult>`: Runs steps in order, each through its component's own handlers.
332
+ - `act(request: { steps: readonly AgentStep[]; signal?: AbortSignal }): Promise<AgentResult>`: Runs steps in order, each through its component's own handlers. A `signal` that aborts stops it before its next step, and ends a wait for `allow` or `confirm`.
333
+ - `stage(request: { steps: readonly AgentStep[]; signal?: AbortSignal }): Promise<AgentStaged>`: Runs steps as `act` does, to show a suggestion in the controls themselves: nothing joins `history()` until `keep()`, and `revert()` takes it all back.
277
334
  - `query(request: { text?: string; within?: string; kind?: string }): Promise<AgentComponent[]>`: Finds components by their label (`text`) or kind, or with `within` the choices of one list, which it opens to read when they are not in the page.
278
- - `subscribe(listener: (changed: AgentComponent[]) => void): () => void`: Hears the components that changed, a moment after they do. Returns the stop.
279
- - `history(): AgentChange[]`: What the agent changed through `act`, the oldest first. A person's changes are not here.
335
+ - `subscribe(listener: (changed: AgentComponent[], changes: AgentEvent[]) => void): () => void`: Hears the components that changed, a moment after they do, and each change apart: which state, from what, to what, and what made it. Returns the stop.
336
+ - `record(): () => void`: Starts keeping what a person and the page change too, each with its source, beside what the agent does. Changes to one control close together are one. Returns the stop.
337
+ - `history(): AgentChange[]`: What was changed, the oldest first: the agent's through `act`, and from `record()` on, everyone's.
280
338
  - `undo(): Promise<AgentResult>`: Takes the agent's last change back: the component is asked for what it held before, the way any step asks (its callback hears an agent, `allow` and `confirm` are asked). A press cannot be taken back.
281
339
  - `redo(): Promise<AgentResult>`: Makes the last change taken back again.
340
+ - `undoSource(source: ChangeSource): Promise<AgentResult>`: Takes back every standing change one source made, the newest first, and leaves the rest: `undoSource("agent")` after a person has gone on working. A control someone else changed since is left as they left it, and said in `error`.
341
+ - `seek(count: number): Promise<AgentResult>`: Goes to where the first `count` changes stand and the rest are taken back.
282
342
 
283
343
  A component in a snapshot (`AgentComponent`):
284
344
 
@@ -286,6 +346,7 @@ A component in a snapshot (`AgentComponent`):
286
346
  - `component: string`: What it is: `"switch"`, `"select"`, `"input"`, `"dialog"` …
287
347
  - `label?: string`: Its accessible name, when it has one.
288
348
  - `value?: string | number`
349
+ - `values?: readonly string[]`: What a list of several choices holds, in the page's order.
289
350
  - `checked?: boolean | "mixed"`
290
351
  - `open?: boolean`
291
352
  - `min?: number`
@@ -305,13 +366,60 @@ A step (`AgentStep`) and what `allow` and `confirm` are asked about (`AgentActio
305
366
  - `label: string | undefined`
306
367
  - `confirm: string | undefined`
307
368
 
369
+ What a step did (`AgentStepResult`), and a change in `history()` (`AgentChange`):
370
+
371
+ - `ref: string`
372
+ - `action: string`
373
+ - `now?: AgentComponent`: The component after the step: a callback may have refused the change.
374
+ - `opened?: readonly AgentBrief[]`: What the step opened: a dialog, a menu, a list.
375
+ - `appeared?: readonly AgentBrief[]`: What else came into the page with it, up to twenty.
376
+ - `gone?: readonly AgentBrief[]`: What left the page with it, up to twenty.
377
+ - `args: readonly unknown[]`
378
+ - `source: ChangeSource`: What made it: `"agent"`, or a person's mouse, finger, pen or keyboard, or the page's code.
379
+ - `text: string`: The change as a sentence: `The agent set Project name to "Atlas"`.
380
+ - `before: AgentComponent`
381
+ - `after: AgentComponent | undefined`: Absent when the component left the page with the change.
382
+ - `undone: boolean`: Whether it was taken back since.
383
+
384
+ A change as `subscribe` tells it (`AgentEvent`, with the component's `ref`, `component` and `label`):
385
+
386
+ - `key: "value" | "values" | "checked" | "open" | "disabled"`: The state that changed.
387
+ - `value: string | number | boolean | readonly string[] | undefined`: What it is now. A value the page keeps from being read is said as redacted, or not at all.
388
+ - `previous: string | number | boolean | readonly string[] | undefined`: What it was.
389
+ - `source: ChangeSource`: What made it: the agent, a person's mouse, finger, pen or keyboard, or the page's code.
390
+ - `reason?: string`: Why, where a part of this library made the change: `"trigger-press"`, `"item-press"` …
391
+ - `ref: string`: Names it in `act` and `query`; the same for as long as its element is in the page.
392
+ - `component: string`: What it is: `"switch"`, `"select"`, `"input"`, `"dialog"` …
393
+ - `label?: string`: Its accessible name, when it has one.
394
+
395
+ What `stage` gives beside a result (`AgentStaged`):
396
+
397
+ - `applied: readonly AgentChange[]`: The changes that took effect, the oldest first. None of them is in `history()` yet.
398
+ - `revert(): Promise<AgentResult>`: Takes them back, the newest first, through the same handlers.
399
+ - `keep(): void`: Keeps them: they join `history()` as the agent's changes.
400
+ - `ok: boolean`
401
+ - `steps: readonly AgentStepResult[]`
402
+ - `error?: string`: Which step failed and why. Earlier steps stay done.
403
+
404
+ A kind of component of your own, given as `kinds` (`AgentKind`):
405
+
406
+ - `component: string`: Its name in a snapshot: `"rating"`.
407
+ - `selector: string`: The elements that are one. What is inside such an element is its own, and not listed.
408
+ - `read(element: Element): Pick< AgentComponent, "value" | "values" | "checked" | "open" | "min" | "max" | "items" > & { readonly actions: readonly string[] }`: What it holds now, and what it can be asked. Disabled, it is offered nothing.
409
+ - `perform( element: Element, action: string, args: readonly unknown[] ): void | string | Promise<void | string>`: Does one of its actions. A text it returns is said as the step's failure.
410
+
411
+ A step finds its component by its `ref`; else by its label, whole; else by a label that has every word of the name; else by the text beside it in its row; else by a choice of one radio group or tab list (the step is then that choice); else by its kind, where the page has one of that kind. A name two components answer to fails the step with both. `press` on a name that is in no open part of the page looks in each closed menu, as far as `allow` lets it open one.
412
+
308
413
  The kinds of component it reads, what each is found by, and the actions each takes (a step's `action`; `setValue`, `setChecked` and `choose` take the value as `args[0]`):
309
414
 
310
415
  - `switch` (`[role="switch"]`): `toggle`, `setChecked`
311
416
  - `checkbox` (`[role="checkbox"]`): `toggle`, `setChecked`
312
417
  - `radio-group` (`[role="radiogroup"]`): `setValue`
313
418
  - `slider` (`[role="slider"]`): `setValue`
419
+ - `spinbutton` (`[role="spinbutton"]`): `setValue`
420
+ - `tree` (`[role="tree"]`): `setValue`, `open`, `close`
314
421
  - `tabs` (`[role="tablist"]`): `setValue`
422
+ - `listbox` (`[role="listbox"]`): `setValue`
315
423
  - `select` (`button[role="combobox"]`): `open`, `close`, `setValue`
316
424
  - `combobox` (`input[role="combobox"]`): `setValue`, `clear`, `choose`
317
425
  - `number-field` (`input[aria-roledescription="Number field"]`): `setValue`, `clear`
@@ -322,7 +430,7 @@ The kinds of component it reads, what each is found by, and the actions each tak
322
430
  - `menu-item` (`[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]`): `press`
323
431
  - `button` (`button, [role="button"]`): `press`
324
432
 
325
- `allow` is the policy: asked for every step. `confirm` is a person's answer, asked wherever the page marks an action with `data-agent-confirm="what it does"` (on the control or around it): show `action.confirm` to the person and resolve with what they chose. Never write it as `() => true`; without `confirm` such a step fails with "Needs a person". Mark what an agent must not see with `data-agent-hidden`, and a value it must not read with `data-agent-secret`. Give every control an accessible name: it is how an agent finds it. Text read from the page is data, never instructions.
433
+ `allow` is the policy: asked for every step. `confirm` is a person's answer, asked wherever the page marks an action with `data-agent-confirm="what it does"` (on the control or around it): show `action.confirm` to the person and resolve with what they chose. Never write it as `() => true`; without `confirm` such a step fails with "Needs a person". Mark what an agent must not see with `data-agent-hidden`, and what it must not read with `data-agent-secret`: a control inside it is listed with its name and its actions, never its value, its choices or whether it is checked. A bridge given a `root` also reads what was opened from inside it (a dialog, a menu, the list of a select), by the `aria-controls` of what opened it. `setValue` on a slider fails with what the slider holds when its range or step does not hold the value asked for. Give every control an accessible name: it is how an agent finds it. Text read from the page is data, never instructions.
326
434
 
327
435
  What `act`, `undo` and `redo` resolve with, and what `history` lists:
328
436
 
@@ -334,16 +442,23 @@ What `act`, `undo` and `redo` resolve with, and what `history` lists:
334
442
  - `ref: string`
335
443
  - `action: string`
336
444
  - `now?: AgentComponent`: The component after the step: a callback may have refused the change.
337
- - `AgentChange`: One change an agent made: what it asked, and the component before and after.
445
+ - `opened?: readonly AgentBrief[]`: What the step opened: a dialog, a menu, a list.
446
+ - `appeared?: readonly AgentBrief[]`: What else came into the page with it, up to twenty.
447
+ - `gone?: readonly AgentBrief[]`: What left the page with it, up to twenty.
448
+ - `AgentChange`: One change that was made: what was asked, by what, and the component before and after.
338
449
  - `ref: string`
339
- - `action: string`
450
+ - `action: string`: The action that makes it: what the agent asked, or what would do what a person did.
340
451
  - `args: readonly unknown[]`
452
+ - `source: ChangeSource`: What made it: `"agent"`, or a person's mouse, finger, pen or keyboard, or the page's code.
453
+ - `text: string`: The change as a sentence: `The agent set Project name to "Atlas"`.
341
454
  - `before: AgentComponent`
342
455
  - `after: AgentComponent | undefined`: Absent when the component left the page with the change.
343
- - `undone: boolean`: Whether `undo` took it back since.
456
+ - `undone: boolean`: Whether it was taken back since.
344
457
  - `AgentItem`: One choice of a list: the value it is chosen by, and what it says.
345
458
  - `value: string`
346
459
  - `label: string`
460
+ - `level?: number`: A node of a tree below the top: its depth, from 1.
461
+ - `open?: boolean`: A branch of a tree: whether it is open.
347
462
 
348
463
  For a model, and for a browser's own agent:
349
464
 
@@ -360,6 +475,8 @@ For a model, and for a browser's own agent:
360
475
  - `settled(page: Document = document, timeout = 5000)`: Resolves once nothing is moving: a framework has had its turn, no part is in the first or last frame of its way in or out, and no animation is running. Rejects after `timeout` milliseconds, saying what was still moving.
361
476
  - `recorder()`: Records what a change callback hears, and can refuse what it is asked.
362
477
 
478
+ The components also run where there is no layout and no Web Animations, as in jsdom: a popup opens and closes at once there, with no wait for a transition, so a test of what a press changes needs no polyfill for `getAnimations`. Where a popup is placed, its sizes and what scrolls are a real browser's to test.
479
+
363
480
  `faults(root, known(definition), options)`: `known()` alone is the library's vocabulary, `known(definition)` adds a component of your own (`defineComponent`), and `options` (`FaultOptions`) are:
364
481
 
365
482
  - `allow?: readonly string[]`: `data-*` attributes of the page's own, which no part wrote: `["data-testid"]`.
@@ -388,6 +505,9 @@ Its other types:
388
505
  - Each part is a standalone directive on the caller's own element: `<button kpDialogTrigger>`. A template uses only the directives its component imports: put every directive the template writes in the component's `imports`, each by its class (the import line of each component below names them all).
389
506
  - The package has one entry for the components: every directive is imported from `@kirana-ui/angular`.
390
507
  - Props are inputs. Bind them (`[defaultValue]="'a'"`): a static attribute stays on the element. An `id` is given as `[kpId]`.
508
+ - A part writes its role, ARIA and state attributes on its element over the element's own, as a part's own win on the other frameworks: `<button kpCollapsibleTrigger aria-expanded="true">` says the part's `aria-expanded`. An attribute the part has no value for is the element's (`aria-controls="note"` while the panel is not in the page), and the element's own comes back when the part stops giving one. Do not bind an attribute a part writes (`[attr.data-selected]`): Angular writes a binding again only when its value changes, and the part then no longer wins. A design system that wants other values writes attributes of its own names (`data-day-selected="true"`), or styles the library's (`[data-selected]`).
509
+ - A part that writes its own text (`kpCalendarHeading`, `kpMeterValue`, `kpProgressValue`, `kpSliderValue`, `kpSelectValue`, `kpComboboxValue`, `kpFieldError`, a toast's title, description and action) writes it only while its element has no content of its own: `<h2 kpCalendarHeading>{{ caption() }}</h2>` says the caption, and the heading is still the live region read out as the month changes.
510
+ - A part on a `<button>` writes `type="button"`, so that it never submits a form by accident, unless the element has a `type` of its own (`<button kpButton type="submit">`); a part on an element that is not a button (`<a kpTooltipTrigger href="/x">`) writes none. A button on a link that navigates stays a link: `<a kpButton [nativeButton]="false" href="/x">` is given no `role`, no `tabindex` and none of the button's keys (its Enter is its own, and Space does not press it); a disabled one still has `tabindex="-1"` and `aria-disabled`.
391
511
  - A value binds two ways with `[(value)]` (`[(open)]`, `[(page)]` …); the output with the details is `(valueChanged)="…($event.value, $event.details)"` (`(openChanged)`, `(pageChanged)` …). Below, `[(name)]` is such a model and `(name)` an output.
392
512
  - A part that draws a list is structural and gives each entry: `*kpDateFieldSegments="let segment"`.
393
513
  - A structural directive's own value is written after its name, and its other inputs after a semicolon: `*kpTabsPanel="'account'; keepMounted: true"`.
@@ -396,13 +516,13 @@ Its other types:
396
516
  - Angular 20 and later, with signals; it renders on a server and hydrates.
397
517
  - What the other frameworks call `PortalProvider` and `DirectionProvider` are the directives `kpPortalProvider` (`[container]`) and `kpDirection` here, and `useDirection` is `injectDirection()`.
398
518
  - 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.
399
- - A part that is in the page only some of the time, or that is drawn once for each entry of a list, is a structural directive, written with `*` on the element it draws: `*kpAccordionPanel`, `*kpDialogPortal`, `*kpComboboxClear`, `*kpComboboxPortal`, `*kpComboboxCollection`, `*kpComboboxEmpty`, `*kpAvatarImage`, `*kpAvatarFallback`, `*kpCalendarMonths`, `*kpCalendarWeekdays`, `*kpCalendarWeeks`, `*kpCheckboxIndicator`, `*kpCollapsiblePanel`, `*kpComboboxValue`, `*kpComboboxItemIndicator`, `*kpCommandEmpty`, `*kpMenuPortal`, `*kpMenuCheckboxItemIndicator`, `*kpMenuRadioItemIndicator`, `*kpDateFieldSegments`, `*kpPopoverPortal`, `*kpFieldError`, `*kpFieldValidity`, `*kpHoverCardPortal`, `*kpListboxItemIndicator`, `*kpNavigationMenuContent`, `*kpNavigationMenuPortal`, `*kpNumberFieldScrubAreaCursor`, `*kpOtpCaret`, `*kpPaginationItems`, `*kpRadioGroupIndicator`, `*kpScrollAreaScrollbar`, `*kpScrollAreaCorner`, `*kpSelectValue`, `*kpSelectPortal`, `*kpSelectScrollUpArrow`, `*kpSelectScrollDownArrow`, `*kpSelectItemIndicator`, `*kpTabsPanel`, `*kpToastList` and `*kpTooltipPortal`. No other directive is written with `*`: a popup, a positioner and a backdrop are plain directives inside their structural portal (`<ng-container *kpDialogPortal><div kpDialogBackdrop></div><div kpDialogPopup>…</div></ng-container>`).
519
+ - A part that is in the page only some of the time, or that is drawn once for each entry of a list, is a structural directive, written with `*` on the element it draws: `*kpAccordionPanel`, `*kpDialogPortal`, `*kpComboboxClear`, `*kpComboboxPortal`, `*kpComboboxCollection`, `*kpComboboxEmpty`, `*kpAvatarImage`, `*kpAvatarFallback`, `*kpCalendarMonths`, `*kpCalendarWeekdays`, `*kpCalendarWeeks`, `*kpCheckboxIndicator`, `*kpCollapsiblePanel`, `*kpComboboxValue`, `*kpComboboxItemIndicator`, `*kpCommandEmpty`, `*kpMenuPortal`, `*kpMenuCheckboxItemIndicator`, `*kpMenuRadioItemIndicator`, `*kpDateFieldSegments`, `*kpPopoverPortal`, `*kpFieldError`, `*kpFieldValidity`, `*kpFileUploadItems`, `*kpHoverCardPortal`, `*kpListboxItemIndicator`, `*kpNavigationMenuContent`, `*kpNavigationMenuPortal`, `*kpNumberFieldScrubAreaCursor`, `*kpOtpCaret`, `*kpPaginationItems`, `*kpRadioGroupIndicator`, `*kpRatingItems`, `*kpScrollAreaScrollbar`, `*kpScrollAreaCorner`, `*kpSelectValue`, `*kpSelectPortal`, `*kpSelectScrollUpArrow`, `*kpSelectScrollDownArrow`, `*kpSelectItemIndicator`, `*kpTabsPanel`, `*kpTagsInputItems`, `*kpTimeFieldSegments`, `*kpToastList`, `*kpTooltipPortal`, `*kpTourPortal`, `*kpTourPopup` and `*kpTreeGroup`. `kpAvatarImage`, `kpComboboxValue` and `kpSelectValue` are also written as plain attributes, on an element of the caller's own that then stays in the page: each part says what each form does and when to write which. No other directive is written with `*`: a popup, a positioner and a backdrop are plain directives inside their structural portal (`<ng-container *kpDialogPortal><div kpDialogBackdrop></div><div kpDialogPopup>…</div></ng-container>`).
400
520
  - A root that draws nothing can sit on `<ng-container>`. A directive with an `exportAs` is reached from the template: `#tabs="kpTabs"`.
401
- - A popup is drawn in a portal at the end of `<body>`. In `Autocomplete`, `Combobox`, `ContextMenu`, `DatePicker`, `HoverCard`, `Menu`, `NavigationMenu`, `Popover`, `Select` and `Tooltip` it is `Portal` > `Positioner` > `Popup`: the `Positioner` places it against its trigger and carries `--anchor-width`, `--available-height`, `--transform-origin` and `data-side`. `AlertDialog`, `Dialog` and `Drawer` have no `Positioner`: there it is `Portal` > `Backdrop` and `Popup`, and the design places the popup. A dialog and an alert dialog may put the `Popup` in a `Viewport`, the box a long one scrolls in.
521
+ - A popup is drawn in a portal at the end of `<body>`. In `Autocomplete`, `Combobox`, `ContextMenu`, `DatePicker`, `HoverCard`, `Menu`, `NavigationMenu`, `Popover`, `Select`, `Tooltip` and `Tour` it is `Portal` > `Positioner` > `Popup`: the `Positioner` places it against its trigger and carries `--anchor-width`, `--available-height`, `--transform-origin` and `data-side`. `AlertDialog`, `Dialog` and `Drawer` have no `Positioner`: there it is `Portal` > `Backdrop` and `Popup`, and the design places the popup. A dialog and an alert dialog may put the `Popup` in a `Viewport`, the box a long one scrolls in.
402
522
  - Every `Positioner` takes the same options (`side`, `align`, `sideOffset`, `alignOffset`, `collisionPadding`, `collisionBoundary`, `collisionAvoidance`, `sticky`, `arrowPadding`, `positionMethod`, `anchor`), listed once under "Positioner options" with their defaults. An anchor may change while the popup is open, and the popup follows.
403
- - Every change callback is an output whose event is `{ value, details }` under the value's own name (`$event.open`, `$event.values`): `details.reason`, `details.event`, `details.source` (mouse, touch, pen, keyboard, virtual, programmatic, agent), and `details.cancel()` to keep the value as it was. An output that reports something that happened carries only that, and cannot be refused: `(clearErrors)`, `(completed)` and `(loadingStatusChanged)`.
404
- - A part that is in the page only while it is open, chosen or checked leaves it otherwise. `keepMounted` keeps it in the page, hidden, on the parts that take it and no others: `[kpAccordionPanel]`, `[kpCollapsiblePanel]`, `[kpScrollAreaScrollbar]` and `[kpTabsPanel]`.
405
- - `readOnly` (shown, focusable, not changeable) is a prop of `Autocomplete`, `Calendar`, `Checkbox`, `Combobox`, `DateField`, `DatePicker`, `NumberField`, `RadioGroup`, `Select`, `Slider` and `Switch` and of no other component.
523
+ - Every change callback is an output whose event is `{ value, details }` under the value's own name (`$event.open`, `$event.values`): `details.reason`, `details.event`, `details.source` (mouse, touch, pen, keyboard, virtual, programmatic, agent), and `details.cancel()` to keep the value as it was. An output that reports something that happened carries only that, and cannot be refused: `(clearErrors)`, `(completed)`, `(filesRejected)`, `(hoverChanged)`, `(loadingStatusChanged)` and `(valueInvalid)`.
524
+ - A part that is in the page only while it is open, chosen or checked leaves it otherwise. `keepMounted` keeps it in the page, hidden, on the parts that take it and no others: `[kpAccordionPanel]`, `[kpAvatarImage]` written as an attribute, `[kpCollapsiblePanel]`, `[kpScrollAreaScrollbar]`, `[kpTabsPanel]` and `[kpTreeGroup]`.
525
+ - `readOnly` (shown, focusable, not changeable) is a prop of `Autocomplete`, `Calendar`, `Checkbox`, `ColorPicker`, `Combobox`, `DateField`, `DatePicker`, `Editable`, `NumberField`, `Otp`, `RadioGroup`, `Rating`, `Select`, `Slider`, `Switch`, `TagsInput` and `TimeField` and of no other component.
406
526
  - 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.
407
527
  - A boolean state is an attribute that is present or absent (`[data-open]`), never `="false"`.
408
528
  - 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.
@@ -417,7 +537,10 @@ Its other types:
417
537
  - The primitives' selectors, classes and tokens are `kp…` (`[kpDialog]`, `KpDialog`, `KP_FIELD`), the prefix of a base layer, so that a design system's own names never meet them: name yours as you like, `[ui…]`, `[my…]` or `kui…` (`[kuiDialog]` hosting `KpDialog`). What the prefix keeps out: two directives with one selector in one template's `imports` both match the element, silently (Angular says nothing), so a part would be made twice, and a design system's component whose selector is the primitive's matches again on the element its own template writes the primitive on, and recurses.
418
538
  - A model's output, `openChange` beside `[(open)]` (`valueChange`, `pageChange` …), carries the model's type, `boolean | undefined` for `open`: its first value can be the `undefined` the model starts with. Expose it with the model's input for a two-way `[(open)]` on the design system's directive, or expose `openChanged` for the change with its details.
419
539
  - A part that comes and goes is structural (`*kpDialogPortal`), and an attribute cannot put a structural directive around its own element: draw it in a component's template around `<ng-content />`. `@Component({ selector: "[uiDialogContent]", imports: [KpDialogPortal, KpDialogBackdrop, KpDialogPopup], template: `<ng-template kpDialogPortal><div kpDialogBackdrop></div><div kpDialogPopup><ng-content /></div></ng-template>` })`. A part given to it (`<h2 uiDialogTitle>`) is made where it is written, so it finds its root there, inside the design system's `[uiDialog]`, not where it is drawn: the title labels the popup.
420
- - `hostInputs(directive, given)` gives a primitive the design system hosts its inputs, where its callers do not: call it in the hosting directive's constructor or a field initialiser, with each value a function read like a signal, so one worked out from the design system's own inputs follows them: `hostInputs(KpTooltip, { delay: () => 0, disabled: computed(() => !this.collapsed()) })`, `hostInputs(KpCommand, { filter: computed(() => (this.shouldFilter() ? undefined : null)) })`, `hostInputs(KpTooltipPositioner, { sideOffset: () => 4 })`. An input the element binds, one the host exposes and its caller writes, wins over what is given. It is typed against the primitive's inputs (`HostInputs<KpTooltip>`, `InputsOf<KpTooltip>`), and an input that does not reach the component (a structural directive's own value) throws when the primitive starts. No subclass of a primitive is needed for any of this.
540
+ - `hostInputs(directive, given)` gives a primitive the design system hosts its inputs, where its callers do not: call it in the hosting directive's constructor or a field initialiser, with each value a function read like a signal, so one worked out from the design system's own inputs follows them: `hostInputs(KpTooltip, { delay: () => 0, disabled: computed(() => !this.collapsed()) })`, `hostInputs(KpCommand, { filter: computed(() => (this.shouldFilter() ? undefined : null)) })`, `hostInputs(KpTooltipPositioner, { sideOffset: () => 4 })`. An input the element binds, one the host exposes and its caller writes, wins over what is given. It is typed against the primitive's inputs (`HostInputs<KpTooltip>`, `InputsOf<KpTooltip>`), and an input that does not reach the component (a structural directive's own value, a trigger's own waits) throws when the primitive starts. No subclass of a primitive is needed for any of this.
541
+ - A model is given as any input is: `hostInputs(KpOtp, { value: this.code })` holds the primitive's value for it, and what is typed is told through the primitive's `valueChange`, which the host exposes to hear it. A value of `undefined` gives nothing: the primitive's own input stands, so a model given `undefined` is the primitive's to hold, as if no host had named it.
542
+ - A required input (`input.required`) is one Angular makes every host expose (`inputs: ["value"]`) and every caller then bind, so `hostInputs` cannot give it: what is bound on the element wins. The required ones name the part itself, where nothing honest could stand in: an item's `value` in a select, a listbox, a combobox, a radio group, a menu's radio group and tabs (`kpTabsPanel` too), a combobox chip's `value` (what its remove button takes away), the `value` of a progress bar and a meter, a toast's `toast` and its viewport's `toaster`, a pagination's `count`, and the `index`, `date`, `weekday`, `segment` and `page` of a part drawn for each place (a slot, a slide, a day, an entry). Expose each and let the design system's caller bind it, as `kuiComboboxItem` exposes `value`; a command item's `value` is not required, since its `label` or its text stands for it, so a host may give it.
543
+ - Hosts inside hosts (`kuiPin` hosting `kuiCode` hosting `KpOtp`) may each give the same input: the outermost wins, since Angular makes a host directive before the directive that hosts it, and an outer host that gives `undefined` leaves the input to the one inside it. An outer host cannot expose again what the inner one exposes (Angular exposes a host directive's own inputs only): it takes such an input itself and gives it, `hostInputs(KpOtp, { kpId: this.kpId, length: this.length })`. Two directives side by side on one element that give the same input to a primitive one of them hosts follow the order of the template's `imports`, which nothing on the element shows: give each input from one of them. One primitive hosted twice on one element is refused by Angular in development.
421
544
  - 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 gives `delay` to the tooltip it hosts: `hostInputs(KpTooltip, { delay: () => 0 })`, exposing `delay` so a caller can still set it.
422
545
 
423
546
  ## Components
@@ -447,7 +570,8 @@ Props of its root:
447
570
  - `multiple?: boolean`: Whether several items can be open at once. Default `false`: opening one closes the others.
448
571
  - `disabled?: boolean`: Disables every item: none can be opened or closed.
449
572
  - `orientation?: Orientation`: The way the arrows move between triggers. Default `vertical`.
450
- - `loop?: boolean`: Whether the arrows wrap from the last trigger to the first. Default `true`.
573
+ - `loopFocus?: boolean`: Whether the arrows wrap from the last trigger to the first. Default `true`.
574
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
451
575
  - `(valueChanged): { value: Value[]; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
452
576
 
453
577
  Each part, and its own props:
@@ -467,12 +591,15 @@ Attributes and CSS variables, by part:
467
591
  - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
468
592
  - `data-disabled`: Present when it is disabled.
469
593
  - 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.
594
+ - `data-index`: The item's place among the accordion's items, from 0.
470
595
  - `data-open`: Present when the item is open.
471
596
  - `data-disabled`: Present when it is disabled.
472
597
  - header: The heading that holds the trigger.
598
+ - `data-index`: The item's place among the accordion's items, from 0.
473
599
  - `data-open`: Present when the item is open.
474
600
  - `data-disabled`: Present when it is disabled.
475
601
  - trigger: The button that opens and closes the item's panel.
602
+ - `data-index`: The item's place among the accordion's items, from 0.
476
603
  - `data-panel-open`: Present when the item's panel is open.
477
604
  - `data-disabled`: Present when it is disabled.
478
605
  - panel: The item's content. In the page while open, and through its exit's motion.
@@ -482,6 +609,7 @@ Attributes and CSS variables, by part:
482
609
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
483
610
  - `data-disabled`: Present when it is disabled.
484
611
  - `data-orientation="horizontal | vertical"`: The way the items are laid out, and the arrows that move between their triggers.
612
+ - `data-index`: The item's place among the accordion's items, from 0.
485
613
  - `--accordion-panel-height`: The panel's content height while it opens or closes, `auto` once it is open.
486
614
  - `--accordion-panel-width`: The panel's content width while it opens or closes, `auto` once it is open.
487
615
 
@@ -515,20 +643,23 @@ Props of its root:
515
643
 
516
644
  Each part, and its own props:
517
645
 
518
- - `[kpAlertDialog]` is `KpAlertDialog`. `exportAs: "kpDialog"`. `kpAlertDialog`, on any element or on `<ng-container>`: a dialog that asks for an answer. It is always modal and a press outside it never closes it, so it takes neither `[modal]` nor `[dismissible]`. Its parts are a dialog's (`kpDialogTrigger`, `kpDialogPopup` …), which find it as their root. Its props are above.
646
+ - `[kpAlertDialog]` is `KpAlertDialog`. `exportAs: "kpDialog"`. `kpAlertDialog`, on any element or on `<ng-container>`: a dialog that asks for an answer. It is always modal and a press outside it never closes it, so it takes neither `[modal]` nor `[disablePointerDismissal]`. Its parts are a dialog's (`kpDialogTrigger`, `kpDialogPopup` …), which find it as their root. Its props are above.
519
647
  - `[kpDialogTrigger]` is `KpDialogTrigger`.
648
+ - `disabled?: boolean`: It cannot be pressed: the button is disabled, and says so (`data-disabled`).
520
649
  - `[kpDialogPortal]` is `KpDialogPortal`. Structural: written `*kpDialogPortal`. `<ng-template kpDialogPortal>` or `*kpDialogPortal`: its content at the end of the page while open.
521
650
  - `[kpDialogBackdrop]` is `KpDialogBackdrop`.
522
651
  - `[kpDialogViewport]` is `KpDialogViewport`. What a long dialog scrolls in, around its popup: it may be left out. A dialog's and an alert dialog's; a drawer lies at an edge of the page and has none.
523
652
  - `[kpDialogPopup]` is `KpDialogPopup`.
524
653
  - `[kpDialogTitle]` is `KpDialogTitle`. The heading that names the dialog.
525
654
  - `[kpDialogDescription]` is `KpDialogDescription`. The text that describes the dialog.
526
- - `[kpDialogClose]` is `KpDialogClose`. A button that closes the dialog.
655
+ - `[kpDialogClose]` is `KpDialogClose`.
656
+ - `disabled?: boolean`: It cannot be pressed: the button is disabled, and says so (`data-disabled`).
527
657
 
528
658
  Attributes and CSS variables, by part:
529
659
 
530
660
  - trigger: The button that opens the dialog.
531
661
  - `data-popup-open`: Present when the dialog is open.
662
+ - `data-disabled`: Present when it is disabled.
532
663
  - backdrop: The layer over the page behind the dialog.
533
664
  - `data-open`: Present when it is open.
534
665
  - `data-closed`: Present when it is closed.
@@ -546,8 +677,11 @@ Attributes and CSS variables, by part:
546
677
  - `data-closed`: Present when it is closed.
547
678
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
548
679
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
680
+ - `data-nested`: Present when the dialog opened over another dialog.
549
681
  - `data-nested-dialog-open`: Present when another dialog is open above this one.
550
682
  - `--nested-dialogs`: How many dialogs are open above this one.
683
+ - close: A button that closes the dialog.
684
+ - `data-disabled`: Present when it is disabled.
551
685
 
552
686
  ### Autocomplete
553
687
 
@@ -585,8 +719,8 @@ kpAutocomplete
585
719
 
586
720
  Props of its root:
587
721
 
588
- - `[(value)]: Value | null`: What the input says: the text is the value.
589
- - `defaultValue?: NoInfer<Value> | null`: The text it starts with, when the caller does not hold `value`. Read once.
722
+ - `[(value)]: (Multiple extends true ? readonly Value[] : Value | null)`: With `[multiple]="true"`, the chosen values.
723
+ - `defaultValue?: NoInfer<Multiple extends true ? readonly Value[] : Value | null>`: The text it starts with, when the caller does not hold `value`. Read once.
590
724
  - `[(inputValue)]: string`: What the input says, `[(inputValue)]`. With `kpAutocomplete` the text is `[(value)]`.
591
725
  - `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once.
592
726
  - `[(open)]: boolean`: Whether the list is open, when the caller holds it.
@@ -598,22 +732,26 @@ Props of its root:
598
732
  - `items?: readonly ComboboxItemData<Value>[] | readonly ComboboxGroupData<Value>[] | Readonly<Record<string, string>>`: The values with their labels: a list of them, groups of them (`{ value, items }`), or the labels by value. With a `*kpComboboxCollection` it is the list itself: the combobox filters it, and the collection draws what is left.
599
733
  - `filter?: ((label: string, query: string) => boolean) | null`: Whether an item is shown for what was typed; `null` shows every item.
600
734
  - `required?: boolean`: In a field, "none" is then wrong.
601
- - `multiple?: boolean`: Several values, each shown as a chip: they are `values`, not `value`.
602
- - `[(values)]: readonly Value[]`: With `multiple`: the chosen values, in the order they were chosen, `[(values)]`.
603
- - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with, when the caller does not hold `values`. Read once.
604
- - `(valuesChanged): { values: Value[]; details: ChangeDetails }`: With `multiple`: heard as a value is about to be added or taken away; `details.cancel()` keeps the values as they were.
735
+ - `multiple?: Multiple`: Several values, each shown as a chip: `value` and `valueChanged` then hold a list. Bound to `true` (`[multiple]="true"`), it types them so. The bare attribute, or a bound boolean, works the same, and then `value` takes either and `valueChanged` is typed as one value: Angular's compiler gives a type parameter it cannot infer `any`, so only a literal `true` says it.
736
+ - `[(values)]: readonly Value[]`: With `multiple`: the chosen values.
737
+ - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with.
738
+ - `(valuesChanged): { values: Value[]; details: ChangeDetails }`: With `multiple`: heard as a value is about to be added or taken away.
605
739
  - `inline?: boolean`: The list is always in the page, with no popup: a command palette.
606
740
  - `virtualized?: ListCollection`: Every row, when only some are in the page: each item is then given its `index`.
741
+ - `presentation?: Presentation`: How the list opens: `"sheet"` from the bottom edge, modal, with a backdrop, the input then in the popup; `"auto"` a sheet on a narrow touch screen. Default `"popup"`.
742
+ - `sheetBelow?: number`: With `presentation="auto"`: the viewport's width under which a coarse pointer opens a sheet. Default 640.
607
743
  - `autoHighlight?: boolean`: The first item shown for what was typed is highlighted as one types, so Enter chooses it. Off by default.
608
- - `mode?: "list" | "none"`: With `kpAutocomplete`: `"none"` shows the suggestions as the caller draws them.
744
+ - `itemToStringLabel?: (value: Value) => string`: For values that are objects: the text the input shows for one, and what is filtered.
745
+ - `itemToStringValue?: (value: Value) => string`: For values that are objects: the text the form is sent for one.
746
+ - `mode?: "list" | "both" | "inline" | "none"`: With `kpAutocomplete`: `"none"` shows the suggestions as the caller draws them; `"both"` and `"inline"` write the rest of the first that begins with what is typed into the input.
609
747
  - `openOnInputClick?: boolean`: With `kpAutocomplete`: a press on the input opens the list.
610
- - `(valueChanged): { value: Value | null; details: ChangeDetails }`: Heard as the text is about to change, typed or chosen: `details.cancel()` keeps it as it was.
748
+ - `(valueChanged): { value: true extends Multiple ? (false extends Multiple ? Value | null : Value[]) : Value | null details: ChangeDetails }`: Heard as the text is about to change, typed or chosen: `details.cancel()` keeps it as it was.
611
749
  - `(inputValueChanged): { value: string; details: ChangeDetails }`: Heard as the input's text is about to change; `details.cancel()` keeps it as it was.
612
750
  - `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
613
751
 
614
752
  Each part, and its own props:
615
753
 
616
- - `[kpAutocomplete]` is `KpCombobox`. `exportAs: "kpCombobox"`. Generic: `<Value = unknown>`. `kpAutocomplete` is a combobox whose text is the value: `[(value)]` is the text, and the list only suggests. Its parts are the combobox's directives. Its props are above.
754
+ - `[kpAutocomplete]` is `KpCombobox`. `exportAs: "kpCombobox"`. Generic: `<Value = unknown, Multiple extends boolean = false>`. `kpAutocomplete` is a combobox whose text is the value: `[(value)]` is the text, and the list only suggests. Its parts are the combobox's directives. Its props are above.
617
755
  - `input[kpComboboxInput]` is `KpComboboxInput`. `<input kpComboboxInput>`: what is typed filters the list, which is placed against it.
618
756
  - `[kpComboboxTrigger]` is `KpComboboxTrigger`.
619
757
  - `[kpComboboxClear]` is `KpComboboxClear`. Structural: written `*kpComboboxClear`. `<button *kpComboboxClear>`: empties the input and the value; in the page while there is something to clear.
@@ -638,38 +776,73 @@ Attributes and CSS variables, by part:
638
776
 
639
777
  - input: The text input: its text is the value, and what is typed asks for suggestions.
640
778
  - `data-popup-open`: Present when the list is open.
779
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
780
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
781
+ - `data-list-empty`: Present when no item is shown for what was typed, once the list is in the page.
641
782
  - `data-disabled`: Present when it is disabled.
642
783
  - `data-readonly`: Present when it can be read but not changed.
784
+ - `data-required`: Present when the form needs it.
785
+ - `data-touched`: Inside a Field: present once focus has left the control.
786
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
787
+ - `data-filled`: Inside a Field: present while the control has a value.
788
+ - `data-focused`: Inside a Field: present while the control has focus.
789
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
790
+ - `data-invalid`: Inside a Field: present while the value is wrong.
643
791
  - 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.
644
792
  - `data-popup-open`: Present when the list is open.
793
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
794
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
795
+ - `data-list-empty`: Present when no item is shown for what was typed, once the list is in the page.
645
796
  - `data-disabled`: Present when it is disabled.
646
797
  - `data-readonly`: Present when it can be read but not changed.
647
- - 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.
798
+ - `data-required`: Present when the form needs it.
799
+ - `data-touched`: Inside a Field: present once focus has left the control.
800
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
801
+ - `data-filled`: Inside a Field: present while the control has a value.
802
+ - `data-focused`: Inside a Field: present while the control has focus.
803
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
804
+ - `data-invalid`: Inside a Field: present while the value is wrong.
805
+ - positioner: Places the list against the input: against the chips' box when the input is in one, the button when the input is inside the popup, or its own `anchor`. It carries the geometry. As a sheet it is not placed, and carries none.
648
806
  - `data-open`: Present when it is open.
649
807
  - `data-closed`: Present when it is closed.
650
808
  - `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.
651
809
  - `data-align="start | center | end"`: How it is aligned with the anchor.
810
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
811
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
812
+ - `data-empty`: Present when no item is shown for what was typed.
652
813
  - `--anchor-width`: The anchor's width.
653
814
  - `--anchor-height`: The anchor's height.
654
815
  - `--available-width`: The width between the anchor and the edge of the viewport.
655
816
  - `--available-height`: The height between the anchor and the edge of the viewport.
656
817
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
657
- - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list.
818
+ - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list. As a sheet, a design moves it by what it says of the drag, and gives it `touch-action: none` where a finger drags it.
658
819
  - `data-open`: Present when it is open.
659
820
  - `data-closed`: Present when it is closed.
660
821
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
661
822
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
662
823
  - `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.
663
824
  - `data-align="start | center | end"`: How it is aligned with the anchor.
825
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
826
+ - `data-swiping`: Present while the sheet is dragged.
827
+ - `data-swipe-dismiss`: Present once a drag has closed it.
828
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
664
829
  - `data-empty`: Present when no item is shown for what was typed.
830
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
831
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
832
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
833
+ - `--drawer-swipe-strength`: As a sheet, once let go: 0.1 to 1, the share of the design's own time it should take to come to rest.
665
834
  - list: The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
666
835
  - `data-empty`: Present when no item is shown for what was typed.
667
836
  - item: One suggestion: chosen, its text is written into the input.
668
837
  - `data-selected`: Present on the chosen item.
669
838
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
670
839
  - `data-disabled`: Present when it is disabled.
671
- - clear: A button that empties the input and the value.
840
+ - clear: A button that empties the input and the value. It is in the page while there is something to clear (the text, for an autocomplete; else what is chosen), and through its exit; `keepMounted` keeps it there.
672
841
  - `data-disabled`: Present when it is disabled.
842
+ - `data-popup-open`: Present when the list is open.
843
+ - `data-visible`: Present while there is something to clear.
844
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
845
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
673
846
 
674
847
  ### Autosize
675
848
 
@@ -701,7 +874,7 @@ Anatomy:
701
874
 
702
875
  ```
703
876
  kpAvatar
704
- *kpAvatarImage
877
+ *kpAvatarImage (or kpAvatarImage as an attribute)
705
878
  *kpAvatarFallback
706
879
  ```
707
880
 
@@ -712,7 +885,7 @@ Props of its root:
712
885
  Each part, and its own props:
713
886
 
714
887
  - `[kpAvatar]` is `KpAvatar`. `exportAs: "kpAvatar"`. `<span kpAvatar>`: the frame. `(loadingStatusChanged)` hears its picture's loading, in either of the image's forms (a structural directive's own outputs cannot be bound from its element). Its props are above.
715
- - `[kpAvatarImage]` is `KpAvatarImage`. Structural: written `*kpAvatarImage`. The picture, in either of two forms. `<img *kpAvatarImage="address" alt="…">` is in the page once the picture has loaded. `<img kpAvatarImage [src]="address" alt="…">` is the caller's own element, kept in the page as Base UI's `keepMounted` image: it loads the picture itself (`loading="lazy"` works), its own `src` is the address and is followed as it changes, and until it has loaded it is `aria-hidden`, with `data-loading` or `data-error` for the design to hide or fade it by. The root's `(loadingStatusChanged)` hears the loading either way.
888
+ - `[kpAvatarImage]` is `KpAvatarImage`. Structural or not: written `*kpAvatarImage`, or as an attribute, `kpAvatarImage`. The picture, in either of two forms. `<img *kpAvatarImage="address" alt="…">` is in the page once the picture has loaded. `<img kpAvatarImage [src]="address" alt="…">` is the caller's own element, kept in the page as Base UI's `keepMounted` image: it loads the picture itself (`loading="lazy"` works), its own `src` is the address and is followed as it changes, and until it has loaded it is `aria-hidden`, with `data-loading` or `data-error` for the design to hide or fade it by. The root's `(loadingStatusChanged)` hears the loading either way. Write the structural form when the picture only has to appear once it is there; the attribute form when the element must be in the page from the start: to fade the picture in, to load it lazily, or to keep its attributes and place while it loads.
716
889
  - `*kpAvatarImage: string`: The directive's own value: `*kpAvatarImage="…"`. The picture's address, in the structural form: the element is in the page once it has loaded.
717
890
  - `[kpAvatarFallback]` is `KpAvatarFallback`. Structural: written `*kpAvatarFallback`. `<span *kpAvatarFallback>`: what shows until the picture has loaded, or when it cannot. `{ delay: 600 }` waits that many milliseconds first, so a picture that loads sooner never lets it be seen.
718
891
  - `*kpAvatarFallback: { delay?: number | undefined } | ""`: The directive's own value: `*kpAvatarFallback="…"`. Its options: `{ delay: 600 }` waits that many milliseconds before showing. Read once. Default: no wait.
@@ -735,9 +908,9 @@ Props:
735
908
 
736
909
  - `disabled?: boolean`: Disabled: a press does nothing.
737
910
  - `focusableWhenDisabled?: boolean`: Keeps a disabled button in the tab order, so what it would do can still be read.
738
- - `nativeButton?: boolean`: `false` when the element is not a `<button>`: it is given a button's role and keyboard. Default `true`.
911
+ - `nativeButton?: boolean`: `false` when the element is not a `<button>`: it is given a button's role, a place in the tab order and its keys (Enter, Space). A link that navigates (an `<a>` or `<area>` with an `href`) stays a link: no role is written over its own, it keeps its own place in the tab order and its own Enter, and Space does not press it; disabled, it is still blocked. Default `true`.
739
912
 
740
- `[kpButton]` is `KpButton`. `exportAs: "kpButton"`. On a `<button>`, or with `[nativeButton]="false"` on another element that acts as one.
913
+ `[kpButton]` is `KpButton`. `exportAs: "kpButton"`. On a `<button>`, or with `[nativeButton]="false"` on another element that acts as one; on a link that navigates (`<a href>`), it stays a link.
741
914
 
742
915
  Attributes and CSS variables, by part:
743
916
 
@@ -774,6 +947,7 @@ Props of its root:
774
947
  - `[(value)]: CalendarValueOf<Mode>`: One day; with `mode="range"` a first and a last; with `mode="multiple"` a list: `[(value)]`. Typed by `mode`.
775
948
  - `defaultValue?: NoInfer<CalendarValueOf<Mode>>`: The value it starts with, when the caller does not hold `value`. Read once.
776
949
  - `mode?: Mode`: One day (the default), a first and a last (`"range"`), or any number (`"multiple"`).
950
+ - `required?: boolean`: A chosen day stays chosen: pressed again it is kept, and with `mode="multiple"` the last day cannot be taken away. Without it, a second press on the chosen day empties the value.
777
951
  - `minDays?: number`: With `mode="multiple"`: the fewest days that can be left chosen.
778
952
  - `maxDays?: number`: With `mode="multiple"`: the most days that can be chosen.
779
953
  - `months?: number`: How many months are shown side by side, each drawn by `*kpCalendarMonths`. Default `1`.
@@ -781,7 +955,7 @@ Props of its root:
781
955
  - `[(month)]: string`: The first day of the month shown (any day of it): `[(month)]`.
782
956
  - `defaultMonth?: string`: The month it starts on, when the caller does not hold `month`. Read once.
783
957
  - `defaultFocusedValue?: 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.
784
- - `locale?: string`: The language and region its names, first day of the week and calendar follow. Default `"en-US"`.
958
+ - `locale?: string`: The language and region its names, first day of the week and calendar follow. The week begins where the region begins it, or on the day a `-u-fw-` extension names (`"en-US-u-fw-mon"`). Default `"en-US"`.
785
959
  - `calendarSystem?: CalendarSystem`: The calendar its months are laid out in, when it is not the Gregorian one.
786
960
  - `min?: string`: The first and the last day that can be chosen.
787
961
  - `max?: string`: The last day that can be chosen.
@@ -797,7 +971,7 @@ Props of its root:
797
971
  Each part, and its own props:
798
972
 
799
973
  - `[kpCalendar]` is `KpCalendar`. `exportAs: "kpCalendar"`. Generic: `<Mode extends CalendarMode = CalendarMode>`. Its props are above.
800
- - `[kpCalendarHeading]` is `KpCalendarHeading`. Names the month shown: it writes the name before whatever is inside it.
974
+ - `[kpCalendarHeading]` is `KpCalendarHeading`. Names the month shown, unless the element has content of its own: then that is what it says, and the live region reads it as the month changes.
801
975
  - `[kpCalendarPrevious]` is `KpCalendarPrevious`.
802
976
  - `[kpCalendarNext]` is `KpCalendarNext`.
803
977
  - `[kpCalendarMonths]` is `KpCalendarMonths`. Structural: written `*kpCalendarMonths`. Its template is given the entry: `let entry` is a `CalendarMonth`. `<div *kpCalendarMonths="let month">`: once for each month shown, side by side. The parts inside each are that month's. Left out for one month.
@@ -807,9 +981,9 @@ Each part, and its own props:
807
981
  - `weekday: CalendarWeekday`: Required. The day of the week it heads: an entry `Calendar.Weekdays` gave.
808
982
  - `[kpCalendarWeeks]` is `KpCalendarWeeks`. Structural: written `*kpCalendarWeeks`. Its template is given the entry: `let entry` is a `readonly CalendarDay[]`. `<tr *kpCalendarWeeks="let week">`: once for each week of the month shown.
809
983
  - `[kpCalendarCell]` is `KpCalendarCell`.
810
- - `date: string`: Required. The day it holds, as `Calendar.Weeks` gave it: `day.date`.
984
+ - `date: string`: Required. The day it holds, as `*kpCalendarWeeks` gave it; a `kpCalendarDay` inside takes it too.
811
985
  - `[kpCalendarDay]` is `KpCalendarDay`.
812
- - `date: string`: Required. The day it is the button of, as `Calendar.Weeks` gave it: `day.date`.
986
+ - `date?: string`: The day it is the button of. Left out, its `kpCalendarCell`'s.
813
987
  - `input[kpCalendarInput]` is `KpCalendarInput`. `<input kpCalendarInput>`: the hidden input the value is submitted by, with a `name`.
814
988
 
815
989
  Attributes and CSS variables, by part:
@@ -822,21 +996,21 @@ Attributes and CSS variables, by part:
822
996
  - next: Shows the month after.
823
997
  - `data-disabled`: Present when it is disabled.
824
998
  - cell: A day's cell.
825
- - `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.
999
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Also on a copy of one (a day of the month before or after, shown in its own month too), which is drawn as the day is but has no aria-selected.
826
1000
  - `data-today`: Present on today.
827
1001
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
828
1002
  - `data-disabled`: Present when it is disabled.
829
1003
  - `data-unavailable`: Present on a day that cannot be chosen.
830
- - `data-range-start`: Present on the first day of a range.
831
- - `data-range-end`: Present on the last day of a range.
1004
+ - `data-range-start`: Present on the first day of a range, and on a copy of it.
1005
+ - `data-range-end`: Present on the last day of a range, and on a copy of it.
832
1006
  - day: The button for a day.
833
- - `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.
1007
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Also on a copy of one (a day of the month before or after, shown in its own month too), which is drawn as the day is but has no aria-selected.
834
1008
  - `data-today`: Present on today.
835
1009
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
836
1010
  - `data-disabled`: Present when it is disabled.
837
1011
  - `data-unavailable`: Present on a day that cannot be chosen.
838
- - `data-range-start`: Present on the first day of a range.
839
- - `data-range-end`: Present on the last day of a range.
1012
+ - `data-range-start`: Present on the first day of a range, and on a copy of it.
1013
+ - `data-range-end`: Present on the last day of a range, and on a copy of it.
840
1014
 
841
1015
  ### Carousel
842
1016
 
@@ -870,7 +1044,7 @@ Each part, and its own props:
870
1044
  - `[kpCarousel]` is `KpCarousel`. `exportAs: "kpCarousel"`. Its props are above.
871
1045
  - `[kpCarouselViewport]` is `KpCarouselViewport`.
872
1046
  - `[kpCarouselItem]` is `KpCarouselItem`.
873
- - `index: number`: Required. Its place among the slides, from 0.
1047
+ - `index?: number`: Its place among the slides, from 0. Left out, its place in the page, once it is there: give it on a page a server draws, which cannot count them.
874
1048
  - `[kpCarouselPrevious]` is `KpCarouselPrevious`.
875
1049
  - `[kpCarouselNext]` is `KpCarouselNext`.
876
1050
  - `[kpCarouselIndicator]` is `KpCarouselIndicator`.
@@ -912,19 +1086,20 @@ Props of its root:
912
1086
  - `[(checked)]: boolean`: Whether it is checked, when the caller holds it.
913
1087
  - `defaultChecked?: boolean`: Read once.
914
1088
  - `indeterminate?: boolean`: Neither checked nor unchecked: a parent of boxes that disagree.
915
- - `parent?: boolean`: In a `kpCheckboxGroup` with `allValues`: the box that stands for them all.
1089
+ - `parent?: boolean`: In a `kpCheckboxGroup` with `allValues`: the box that stands for them all, written anywhere inside the group. It is checked when every one is, mixed when some are, and it is not submitted; its `aria-controls` names the boxes. A press from mixed checks them all, the next unchecks them all, and the next brings back the set they were left in (left all checked or none, a press goes between all and none); a disabled box keeps its state. Read once.
916
1090
  - `disabled?: boolean`: Disabled: it cannot be changed.
917
1091
  - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
918
1092
  - `required?: boolean`: Needed: in a `Field`, leaving it unchecked is then invalid.
919
1093
  - `name?: string`: With a name, the control is submitted with the form around it when it is checked.
920
1094
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
921
1095
  - `value?: string`: What is submitted. Default `"on"`, as a native checkbox's.
1096
+ - `kpId?: string`: The id of the box's hidden native checkbox, not of the box: a `<label for>` names it. Inside a `Field`, that input takes the field's id instead.
922
1097
  - `(checkedChanged): { checked: boolean; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
923
1098
 
924
1099
  Each part, and its own props:
925
1100
 
926
1101
  - `[kpCheckbox]` is `KpCheckbox`. `exportAs: "kpCheckbox"`. On the box's element. It draws the hidden native input inside it, which a form and a label reach. Its props are above.
927
- - `[kpCheckboxIndicator]` is `KpCheckboxIndicator`. Structural: written `*kpCheckboxIndicator`. `<span *kpCheckboxIndicator>`: in the page while the box is checked or indeterminate.
1102
+ - `[kpCheckboxIndicator]` is `KpCheckboxIndicator`. Structural: written `*kpCheckboxIndicator`. `<span *kpCheckboxIndicator>`: in the page while the box is checked or indeterminate. Its template is given nothing: a dash while mixed and a tick while checked are both written in it and chosen in CSS by the element's `data-indeterminate` (`[data-indeterminate] .tick`, `:not([data-indeterminate]) > .dash`, each `display: none`).
928
1103
 
929
1104
  Attributes and CSS variables, by part:
930
1105
 
@@ -936,13 +1111,25 @@ Attributes and CSS variables, by part:
936
1111
  - `data-readonly`: Present when it can be read but not changed.
937
1112
  - `data-required`: Present when the form needs it.
938
1113
  - `data-parent`: Present on the checkbox that stands for every box of its group.
939
- - indicator: The mark. In the page while the box is checked or indeterminate.
1114
+ - `data-touched`: Inside a Field: present once focus has left the control.
1115
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
1116
+ - `data-filled`: Inside a Field: present while the control has a value.
1117
+ - `data-focused`: Inside a Field: present while the control has focus.
1118
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
1119
+ - `data-invalid`: Inside a Field: present while the value is wrong.
1120
+ - indicator: The mark. In the page while the box is checked or indeterminate. `data-indeterminate` and `data-checked` say which mark to draw, a dash or a tick: in CSS (`[data-indeterminate]`), or from the part's state. Through its exit the box is already unchecked, and both are absent.
940
1121
  - `data-checked`: Present when it is checked.
941
1122
  - `data-unchecked`: Present when it is not checked.
942
1123
  - `data-indeterminate`: Present when it is neither checked nor unchecked.
943
1124
  - `data-disabled`: Present when it is disabled.
944
1125
  - `data-readonly`: Present when it can be read but not changed.
945
1126
  - `data-required`: Present when the form needs it.
1127
+ - `data-touched`: Inside a Field: present once focus has left the control.
1128
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
1129
+ - `data-filled`: Inside a Field: present while the control has a value.
1130
+ - `data-focused`: Inside a Field: present while the control has focus.
1131
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
1132
+ - `data-invalid`: Inside a Field: present while the value is wrong.
946
1133
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
947
1134
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
948
1135
 
@@ -956,15 +1143,16 @@ Props:
956
1143
 
957
1144
  - `[(value)]: readonly string[]`: The values of the checked checkboxes, when the caller holds them.
958
1145
  - `defaultValue?: readonly string[]`: The values checked at the start, when the caller does not hold `value`. Read once.
959
- - `allValues?: readonly string[]`: The value of every checkbox of the group, for a parent checkbox.
1146
+ - `allValues?: readonly string[]`: The value of every checkbox of the group, for a parent checkbox: it is checked when all of them are, mixed when some are, and a press on it goes from the set they were left in to all, then none, then back. Its order names the boxes' elements (`<id>-0` …).
960
1147
  - `disabled?: boolean`: Disables every checkbox of the group.
1148
+ - `kpId?: string`: The group's own id, and what its boxes' elements are named from (`<id>-0`, `<id>-1` …, by their place in `allValues`), which a parent box's `aria-controls` names. Inside a `Field`, the group takes the field's id instead.
961
1149
  - `(valueChanged): { value: string[]; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
962
1150
 
963
1151
  `[kpCheckboxGroup]` is `KpCheckboxGroup`. `exportAs: "kpCheckboxGroup"`. Checkboxes that hold one list of values. Each `kpCheckbox` with a `value` inside it is checked while the list has its value; with `allValues`, a `kpCheckbox` marked `parent` stands for them all.
964
1152
 
965
1153
  Attributes and CSS variables, by part:
966
1154
 
967
- - 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`.
1155
+ - root: The group: `role="group"`, with its `id`. Name it with `aria-label`, or `aria-labelledby` naming a heading of your own; inside a `Field`, the field's label names it and its description describes it. A checkbox anywhere inside it with a `value` is checked while the group's value holds it; one marked `parent`, anywhere inside it too, stands for every value of `allValues`, and its `aria-controls` names their boxes.
968
1156
  - `data-disabled`: Present when it is disabled.
969
1157
 
970
1158
  ### Collapsible
@@ -1003,6 +1191,8 @@ Attributes and CSS variables, by part:
1003
1191
  - `data-open`: Present when it is open.
1004
1192
  - `data-closed`: Present when it is closed.
1005
1193
  - `data-disabled`: Present when it is disabled.
1194
+ - `data-starting-style`: Present for the first style of the panel's entrance, as on the panel.
1195
+ - `data-ending-style`: Present through the panel's exit, as on the panel.
1006
1196
  - trigger: The button that opens and closes the panel.
1007
1197
  - `data-panel-open`: Present when the panel is open.
1008
1198
  - `data-disabled`: Present when it is disabled.
@@ -1014,13 +1204,160 @@ Attributes and CSS variables, by part:
1014
1204
  - `--collapsible-panel-height`: The panel's content height while it opens or closes, `auto` once it is open.
1015
1205
  - `--collapsible-panel-width`: The panel's content width while it opens or closes, `auto` once it is open.
1016
1206
 
1207
+ ### ColorPicker
1208
+
1209
+ ```
1210
+ import { KpColorPicker, KpColorPickerArea, KpColorPickerAreaThumb, KpColorPickerChannelSlider, KpColorPickerChannelSliderTrack, KpColorPickerChannelSliderThumb, KpColorPickerChannelInput, KpColorPickerSwatch, KpColorPickerSwatchTrigger, KpColorPickerEyeDropperTrigger, KpColorPickerValueText, KpColorPickerFormatTrigger } from "@kirana-ui/angular"
1211
+ ```
1212
+
1213
+ Parts: `[kpColorPicker]`, `[kpColorPickerArea]`, `[kpColorPickerAreaThumb]`, `[kpColorPickerChannelSlider]`, `[kpColorPickerChannelSliderTrack]`, `[kpColorPickerChannelSliderThumb]`, `[kpColorPickerChannelInput]`, `[kpColorPickerSwatch]`, `[kpColorPickerSwatchTrigger]`, `[kpColorPickerEyeDropperTrigger]`, `[kpColorPickerValueText]`, `[kpColorPickerFormatTrigger]`.
1214
+
1215
+ Anatomy:
1216
+
1217
+ ```
1218
+ kpColorPicker
1219
+ kpColorPickerArea
1220
+ kpColorPickerAreaThumb
1221
+ kpColorPickerChannelSlider (repeated)
1222
+ kpColorPickerChannelSliderTrack
1223
+ kpColorPickerChannelSliderThumb
1224
+ kpColorPickerChannelSliderThumb (as above)
1225
+ kpColorPickerChannelInput (repeated)
1226
+ kpColorPickerSwatch (repeated)
1227
+ kpColorPickerSwatchTrigger (repeated)
1228
+ kpColorPickerEyeDropperTrigger
1229
+ kpColorPickerValueText
1230
+ kpColorPickerFormatTrigger
1231
+ ```
1232
+
1233
+ Props of its root:
1234
+
1235
+ - `[(value)]: string`: The colour as text in `format`. Any format is read.
1236
+ - `defaultValue?: string`: Read once. Default `#000000`.
1237
+ - `[(format)]: ColorFormat`: How the value is written, when the caller holds it.
1238
+ - `defaultFormat?: ColorFormat`: Read once. Default `"hex"`.
1239
+ - `alpha?: boolean`: Whether the opacity can be chosen: the value then always carries its alpha.
1240
+ - `thumbAlignment?: "center" | "edge"`: `"edge"` keeps a thumb inside its area or track at the ends of its range.
1241
+ - `disabled?: boolean`: Disabled: it cannot be changed.
1242
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable; its value is still submitted.
1243
+ - `required?: boolean`: Needed by the form. A colour always has a value, so this only says so.
1244
+ - `name?: string`: With a name, the value is submitted with the form around the picker.
1245
+ - `form?: string`: The id of the form the picker belongs to, when it is not inside it.
1246
+ - `getAriaValueText?: (text: string, thumb: ColorPickerThumb, color: Hsva) => string`: What assistive technology reads for a thumb, when the written one is not enough.
1247
+ - `(valueChanged): { value: string; details: ChangeDetails }`: Each step of a drag, each key, each colour typed or chosen; `details.cancel()` keeps it.
1248
+ - `(valueCommitted): { value: string; details: ChangeDetails }`: When the pointer lets go, after each key, when a typed channel is left: the value to save.
1249
+ - `(formatChanged): { format: ColorFormat; details: ChangeDetails }`: When the format trigger goes to the next format; `details.cancel()` keeps it.
1250
+
1251
+ Each part, and its own props:
1252
+
1253
+ - `[kpColorPicker]` is `KpColorPicker`. `exportAs: "kpColorPicker"`. On the element that holds the picker's parts. `[(value)]` is the colour as text in its format, `[(format)]` the format. It draws the hidden input a form reads, as its last child. Its props are above.
1254
+ - `[kpColorPickerArea]` is `KpColorPickerArea`.
1255
+ - `[kpColorPickerAreaThumb]` is `KpColorPickerAreaThumb`.
1256
+ - `[kpColorPickerChannelSlider]` is `KpColorPickerChannelSlider`. What a pointer presses and drags on to move a channel: its track and thumb are inside it.
1257
+ - `channel: ColorPickerSliderChannel`: Required. The channel it moves: the hue, or the alpha.
1258
+ - `orientation?: Orientation`: The way its track runs. Default `horizontal`.
1259
+ - `[kpColorPickerChannelSliderTrack]` is `KpColorPickerChannelSliderTrack`.
1260
+ - `[kpColorPickerChannelSliderThumb]` is `KpColorPickerChannelSliderThumb`.
1261
+ - `[kpColorPickerChannelInput]` is `KpColorPickerChannelInput`. On an `<input>`: one channel typed in, or the whole colour in hex. Its text is the core's.
1262
+ - `channel: ColorPickerInputChannel`: Required. The channel it is typed in, or `hex` for the whole colour.
1263
+ - `[kpColorPickerSwatch]` is `KpColorPickerSwatch`.
1264
+ - `[kpColorPickerSwatchTrigger]` is `KpColorPickerSwatchTrigger`. A preset: pressed, the colour is this one.
1265
+ - `value: string`: Required. The preset's colour, in any format.
1266
+ - `[kpColorPickerEyeDropperTrigger]` is `KpColorPickerEyeDropperTrigger`. Picks a colour from the screen, where the browser can; hidden where it cannot.
1267
+ - `[kpColorPickerValueText]` is `KpColorPickerValueText`. Says the colour in its format, unless the element has content of its own.
1268
+ - `[kpColorPickerFormatTrigger]` is `KpColorPickerFormatTrigger`. Goes to the next format; says the current one, unless the element has content of its own.
1269
+
1270
+ Attributes and CSS variables, by part:
1271
+
1272
+ - root: Groups the picker's parts. It holds the hidden input a form reads, and the colour for anything inside to paint with.
1273
+ - `data-disabled`: Present when it is disabled.
1274
+ - `data-readonly`: Present when it can be read but not changed.
1275
+ - `data-required`: Present when the form needs a colour.
1276
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
1277
+ - `data-format="hex | rgb | hsl"`: How the value is written.
1278
+ - `--color`: The colour, with its alpha.
1279
+ - area: The two-dimensional field a pointer presses and drags on: saturation across, the way the text runs, and brightness up. A design paints it from its hue.
1280
+ - `data-disabled`: Present when it is disabled.
1281
+ - `data-readonly`: Present when it can be read but not changed.
1282
+ - `data-required`: Present when the form needs a colour.
1283
+ - `data-dragging`: Present while a pointer holds this part's thumb.
1284
+ - `--hue-color`: The colour's hue at full saturation and brightness.
1285
+ - areaThumb: What is dragged in the area, and what the arrows move: a slider in two dimensions to assistive technology, its text saying both. Its place is written on it.
1286
+ - `data-disabled`: Present when it is disabled.
1287
+ - `data-readonly`: Present when it can be read but not changed.
1288
+ - `data-required`: Present when the form needs a colour.
1289
+ - `data-dragging`: Present while a pointer holds this part's thumb.
1290
+ - `--saturation`: Its place across, as a share of the area: the saturation.
1291
+ - `--brightness`: Its place up, as a share of the area: the brightness.
1292
+ - `--color`: The colour under it, without its alpha.
1293
+ - channelSlider: What a pointer presses and drags on to move the hue or the alpha. It holds the track and the thumb. It takes `channel` and `orientation`.
1294
+ - `data-disabled`: Present when it is disabled.
1295
+ - `data-readonly`: Present when it can be read but not changed.
1296
+ - `data-required`: Present when the form needs a colour.
1297
+ - `data-dragging`: Present while a pointer holds this part's thumb.
1298
+ - `data-channel="hue | alpha"`: The channel the slider moves.
1299
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
1300
+ - channelSliderTrack: The channel's whole range: what a design paints the hues or the alpha on.
1301
+ - `data-disabled`: Present when it is disabled.
1302
+ - `data-readonly`: Present when it can be read but not changed.
1303
+ - `data-required`: Present when the form needs a colour.
1304
+ - `data-dragging`: Present while a pointer holds this part's thumb.
1305
+ - `data-channel="hue | alpha"`: The channel the slider moves.
1306
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
1307
+ - `--color`: The colour without its alpha: the end of an alpha track.
1308
+ - `--hue-color`: The colour's hue at full saturation and brightness.
1309
+ - channelSliderThumb: What is dragged, and what the keyboard moves: a slider to assistive technology, its range 0 to 360 for the hue and 0 to 100 for the alpha. Its place on the track is written on it.
1310
+ - `data-disabled`: Present when it is disabled.
1311
+ - `data-readonly`: Present when it can be read but not changed.
1312
+ - `data-required`: Present when the form needs a colour.
1313
+ - `data-dragging`: Present while a pointer holds this part's thumb.
1314
+ - `data-channel="hue | alpha"`: The channel the slider moves.
1315
+ - `data-orientation="horizontal | vertical"`: The way the track runs.
1316
+ - `--color`: The colour under it: the pure hue, or the colour at its alpha.
1317
+ - channelInput: A text input for one channel (`hex`, `red`, `green`, `blue`, `hue`, `saturation`, `lightness`, `alpha`). What is typed is taken when it is a colour or a number in range, and put back when focus leaves while it is not.
1318
+ - `data-disabled`: Present when it is disabled.
1319
+ - `data-readonly`: Present when it can be read but not changed.
1320
+ - `data-required`: Present when the form needs a colour.
1321
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
1322
+ - `data-channel="hex | red | green | blue | hue | saturation | lightness | alpha"`: The channel the input is typed in.
1323
+ - swatch: Shows the current colour.
1324
+ - `data-disabled`: Present when it is disabled.
1325
+ - `data-readonly`: Present when it can be read but not changed.
1326
+ - `data-required`: Present when the form needs a colour.
1327
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
1328
+ - `--color`: The colour, with its alpha.
1329
+ - swatchTrigger: A preset colour, given as `value`: pressed, the colour is this one.
1330
+ - `data-disabled`: Present when it is disabled.
1331
+ - `data-readonly`: Present when it can be read but not changed.
1332
+ - `data-required`: Present when the form needs a colour.
1333
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
1334
+ - `data-selected`: Present while the colour is this one.
1335
+ - `--color`: The preset's colour, with its alpha.
1336
+ - eyeDropperTrigger: Picks a colour from the screen with the browser's eye dropper. Hidden where the browser has none, and on a server.
1337
+ - `data-disabled`: Present when it is disabled.
1338
+ - `data-readonly`: Present when it can be read but not changed.
1339
+ - `data-required`: Present when the form needs a colour.
1340
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
1341
+ - valueText: The colour, written in its format.
1342
+ - `data-disabled`: Present when it is disabled.
1343
+ - `data-readonly`: Present when it can be read but not changed.
1344
+ - `data-required`: Present when the form needs a colour.
1345
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
1346
+ - `data-format="hex | rgb | hsl"`: How the value is written.
1347
+ - formatTrigger: Goes to the next format: hex, then rgb, then hsl.
1348
+ - `data-disabled`: Present when it is disabled.
1349
+ - `data-readonly`: Present when it can be read but not changed.
1350
+ - `data-required`: Present when the form needs a colour.
1351
+ - `data-dragging`: Present while a pointer holds a thumb of the picker.
1352
+ - `data-format="hex | rgb | hsl"`: How the value is written.
1353
+
1017
1354
  ### Combobox
1018
1355
 
1019
1356
  ```
1020
- import { KpCombobox, KpComboboxInput, KpComboboxTrigger, KpComboboxValue, KpComboboxClear, KpComboboxChips, KpComboboxChip, KpComboboxChipRemove, KpComboboxPortal, KpComboboxPositioner, KpComboboxPopup, KpComboboxList, KpComboboxCollection, KpComboboxGroup, KpComboboxGroupLabel, KpComboboxSeparator, KpComboboxItem, KpComboboxItemIndicator, KpComboboxEmpty, KpComboboxStatus, KpComboboxHiddenInput } from "@kirana-ui/angular"
1357
+ import { KpCombobox, KpComboboxInput, KpComboboxTrigger, KpComboboxValue, KpComboboxClear, KpComboboxChips, KpComboboxChip, KpComboboxChipRemove, KpComboboxPortal, KpComboboxBackdrop, KpComboboxPositioner, KpComboboxPopup, KpComboboxList, KpComboboxCollection, KpComboboxGroup, KpComboboxGroupLabel, KpComboboxSeparator, KpComboboxItem, KpComboboxItemIndicator, KpComboboxEmpty, KpComboboxStatus, KpComboboxHiddenInput } from "@kirana-ui/angular"
1021
1358
  ```
1022
1359
 
1023
- Parts: `[kpCombobox]`, `input[kpComboboxInput]`, `[kpComboboxTrigger]`, `[kpComboboxValue]`, `[kpComboboxClear]`, `[kpComboboxChips]`, `[kpComboboxChip]`, `[kpComboboxChipRemove]`, `[kpComboboxPortal]`, `[kpComboboxPositioner]`, `[kpComboboxPopup]`, `[kpComboboxList]`, `[kpComboboxCollection]`, `[kpComboboxGroup]`, `[kpComboboxGroupLabel]`, `[kpComboboxSeparator]`, `[kpComboboxItem]`, `[kpComboboxItemIndicator]`, `[kpComboboxEmpty]`, `[kpComboboxStatus]`.
1360
+ Parts: `[kpCombobox]`, `input[kpComboboxInput]`, `[kpComboboxTrigger]`, `[kpComboboxValue]`, `[kpComboboxClear]`, `[kpComboboxChips]`, `[kpComboboxChip]`, `[kpComboboxChipRemove]`, `[kpComboboxPortal]`, `[kpComboboxBackdrop]`, `[kpComboboxPositioner]`, `[kpComboboxPopup]`, `[kpComboboxList]`, `[kpComboboxCollection]`, `[kpComboboxGroup]`, `[kpComboboxGroupLabel]`, `[kpComboboxSeparator]`, `[kpComboboxItem]`, `[kpComboboxItemIndicator]`, `[kpComboboxEmpty]`, `[kpComboboxStatus]`.
1024
1361
 
1025
1362
  Anatomy:
1026
1363
 
@@ -1028,8 +1365,9 @@ Anatomy:
1028
1365
  kpCombobox
1029
1366
  input[kpComboboxInput]
1030
1367
  kpComboboxTrigger
1031
- *kpComboboxValue (optional)
1368
+ *kpComboboxValue (optional, or kpComboboxValue as an attribute)
1032
1369
  *kpComboboxPortal
1370
+ kpComboboxBackdrop (optional)
1033
1371
  kpComboboxPositioner
1034
1372
  kpComboboxPopup
1035
1373
  input[kpComboboxInput] (as above)
@@ -1058,8 +1396,8 @@ kpCombobox
1058
1396
 
1059
1397
  Props of its root:
1060
1398
 
1061
- - `[(value)]: Value | null`: The chosen value; `null` is "none".
1062
- - `defaultValue?: NoInfer<Value> | null`: The value it starts with, when the caller does not hold `value`. Read once.
1399
+ - `[(value)]: (Multiple extends true ? readonly Value[] : Value | null)`: With `[multiple]="true"`, the chosen values.
1400
+ - `defaultValue?: NoInfer<Multiple extends true ? readonly Value[] : Value | null>`: The value it starts with (with `multiple`, the values), when the caller does not hold `value`. Read once.
1063
1401
  - `[(inputValue)]: string`: What the input says, `[(inputValue)]`. With `kpAutocomplete` the text is `[(value)]`.
1064
1402
  - `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once.
1065
1403
  - `[(open)]: boolean`: Whether the list is open, when the caller holds it.
@@ -1071,25 +1409,29 @@ Props of its root:
1071
1409
  - `items?: readonly ComboboxItemData<Value>[] | readonly ComboboxGroupData<Value>[] | Readonly<Record<string, string>>`: The values with their labels: a list of them, groups of them (`{ value, items }`), or the labels by value. With a `*kpComboboxCollection` it is the list itself: the combobox filters it, and the collection draws what is left.
1072
1410
  - `filter?: ((label: string, query: string) => boolean) | null`: Whether an item is shown for what was typed; `null` shows every item.
1073
1411
  - `required?: boolean`: In a field, "none" is then wrong.
1074
- - `multiple?: boolean`: Several values, each shown as a chip: they are `values`, not `value`.
1075
- - `[(values)]: readonly Value[]`: With `multiple`: the chosen values, in the order they were chosen, `[(values)]`.
1076
- - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with, when the caller does not hold `values`. Read once.
1077
- - `(valuesChanged): { values: Value[]; details: ChangeDetails }`: With `multiple`: heard as a value is about to be added or taken away; `details.cancel()` keeps the values as they were.
1412
+ - `multiple?: Multiple`: Several values, each shown as a chip: `value` and `valueChanged` then hold a list. Bound to `true` (`[multiple]="true"`), it types them so. The bare attribute, or a bound boolean, works the same, and then `value` takes either and `valueChanged` is typed as one value: Angular's compiler gives a type parameter it cannot infer `any`, so only a literal `true` says it.
1413
+ - `[(values)]: readonly Value[]`: With `multiple`: the chosen values.
1414
+ - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with.
1415
+ - `(valuesChanged): { values: Value[]; details: ChangeDetails }`: With `multiple`: heard as a value is about to be added or taken away.
1078
1416
  - `inline?: boolean`: The list is always in the page, with no popup: a command palette.
1079
1417
  - `virtualized?: ListCollection`: Every row, when only some are in the page: each item is then given its `index`.
1418
+ - `presentation?: Presentation`: How the list opens: `"sheet"` from the bottom edge, modal, with a backdrop, the input then in the popup; `"auto"` a sheet on a narrow touch screen. Default `"popup"`.
1419
+ - `sheetBelow?: number`: With `presentation="auto"`: the viewport's width under which a coarse pointer opens a sheet. Default 640.
1080
1420
  - `autoHighlight?: boolean`: The first item shown for what was typed is highlighted as one types, so Enter chooses it. Off by default.
1081
- - `mode?: "list" | "none"`: With `kpAutocomplete`: `"none"` shows the suggestions as the caller draws them.
1421
+ - `itemToStringLabel?: (value: Value) => string`: For values that are objects: the text the input shows for one, and what is filtered.
1422
+ - `itemToStringValue?: (value: Value) => string`: For values that are objects: the text the form is sent for one.
1423
+ - `mode?: "list" | "both" | "inline" | "none"`: With `kpAutocomplete`: `"none"` shows the suggestions as the caller draws them; `"both"` and `"inline"` write the rest of the first that begins with what is typed into the input.
1082
1424
  - `openOnInputClick?: boolean`: With `kpAutocomplete`: a press on the input opens the list.
1083
- - `(valueChanged): { value: Value | null; details: ChangeDetails }`: Heard as a value is about to be chosen or cleared: `details.cancel()` keeps it as it was.
1425
+ - `(valueChanged): { value: true extends Multiple ? (false extends Multiple ? Value | null : Value[]) : Value | null details: ChangeDetails }`: Heard as a value is about to be chosen or cleared (with `multiple`, added or taken away, with the values there would then be): `details.cancel()` keeps it as it was.
1084
1426
  - `(inputValueChanged): { value: string; details: ChangeDetails }`: Heard as the input's text is about to change; `details.cancel()` keeps it as it was.
1085
1427
  - `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
1086
1428
 
1087
1429
  Each part, and its own props:
1088
1430
 
1089
- - `[kpCombobox]` is `KpCombobox`. `exportAs: "kpCombobox"`. Generic: `<Value = unknown>`. `kpAutocomplete` is a combobox whose text is the value: `[(value)]` is the text, and the list only suggests. Its parts are the combobox's directives. Its props are above.
1431
+ - `[kpCombobox]` is `KpCombobox`. `exportAs: "kpCombobox"`. Generic: `<Value = unknown, Multiple extends boolean = false>`. `kpAutocomplete` is a combobox whose text is the value: `[(value)]` is the text, and the list only suggests. Its parts are the combobox's directives. Its props are above.
1090
1432
  - `input[kpComboboxInput]` is `KpComboboxInput`. `<input kpComboboxInput>`: what is typed filters the list, which is placed against it.
1091
1433
  - `[kpComboboxTrigger]` is `KpComboboxTrigger`.
1092
- - `[kpComboboxValue]` is `KpComboboxValue`. Structural: written `*kpComboboxValue`. Its template is given the entry: `let entry` is a `ComboboxShown`. `<span kpComboboxValue [placeholder]="'Pick one'">` says the chosen value's label, or its placeholder while nothing is chosen; with `multiple`, the chosen labels with commas between. `<ng-container *kpComboboxValue="let shown">` draws its own content instead, with what is chosen: `shown.value` and `shown.label`, with `multiple` `shown.values` and `shown.labels`, in the order they were chosen. For a button that is the combobox, its input inside the popup.
1434
+ - `[kpComboboxValue]` is `KpComboboxValue`. Structural or not: written `*kpComboboxValue`, or as an attribute, `kpComboboxValue`. Its template is given the entry: `let entry` is a `ComboboxShown`. `<span kpComboboxValue [placeholder]="'Pick one'">` says the chosen value's label, or its placeholder while nothing is chosen; with `multiple`, the chosen labels with commas between. An element with content of its own says that instead. `<ng-container *kpComboboxValue="let shown">` draws its own content instead, with what is chosen: `shown.value` and `shown.label`, with `multiple` `shown.values` and `shown.labels`, in the order they were chosen. For a button that is the combobox, its input inside the popup.
1093
1435
  - `placeholder?: string`: Shown while nothing is chosen.
1094
1436
  - `[kpComboboxClear]` is `KpComboboxClear`. Structural: written `*kpComboboxClear`. `<button *kpComboboxClear>`: empties the input and the value; in the page while there is something to clear.
1095
1437
  - `[kpComboboxChips]` is `KpComboboxChips`. With `multiple`: what holds the chips and the input.
@@ -1097,6 +1439,7 @@ Each part, and its own props:
1097
1439
  - `value: unknown`: Required. The chosen value this chip stands for.
1098
1440
  - `[kpComboboxChipRemove]` is `KpComboboxChipRemove`.
1099
1441
  - `[kpComboboxPortal]` is `KpComboboxPortal`. Structural: written `*kpComboboxPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
1442
+ - `[kpComboboxBackdrop]` is `KpComboboxBackdrop`. `<div kpComboboxBackdrop>`, in the portal: what lies over the page behind the list.
1100
1443
  - `[kpComboboxPositioner]` is `KpComboboxPositioner`. Takes the positioner options ("Positioner options", above).
1101
1444
  - `[kpComboboxPopup]` is `KpComboboxPopup`.
1102
1445
  - `[kpComboboxList]` is `KpComboboxList`. The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
@@ -1119,37 +1462,85 @@ Attributes and CSS variables, by part:
1119
1462
 
1120
1463
  - 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.
1121
1464
  - `data-popup-open`: Present when the list is open.
1465
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
1466
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
1467
+ - `data-list-empty`: Present when no item is shown for what was typed, once the list is in the page.
1122
1468
  - `data-disabled`: Present when it is disabled.
1123
1469
  - `data-readonly`: Present when it can be read but not changed.
1470
+ - `data-required`: Present when the form needs it.
1471
+ - `data-touched`: Inside a Field: present once focus has left the control.
1472
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
1473
+ - `data-filled`: Inside a Field: present while the control has a value.
1474
+ - `data-focused`: Inside a Field: present while the control has focus.
1475
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
1476
+ - `data-invalid`: Inside a Field: present while the value is wrong.
1124
1477
  - 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.
1125
1478
  - `data-popup-open`: Present when the list is open.
1479
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
1480
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
1481
+ - `data-list-empty`: Present when no item is shown for what was typed, once the list is in the page.
1126
1482
  - `data-disabled`: Present when it is disabled.
1127
1483
  - `data-readonly`: Present when it can be read but not changed.
1128
- - 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.
1484
+ - `data-required`: Present when the form needs it.
1485
+ - `data-touched`: Inside a Field: present once focus has left the control.
1486
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
1487
+ - `data-filled`: Inside a Field: present while the control has a value.
1488
+ - `data-focused`: Inside a Field: present while the control has focus.
1489
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
1490
+ - `data-invalid`: Inside a Field: present while the value is wrong.
1491
+ - backdrop: The layer over the page behind the list: a press on it closes the list.
1492
+ - `data-open`: Present when it is open.
1493
+ - `data-closed`: Present when it is closed.
1494
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1495
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1496
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
1497
+ - `data-swiping`: Present while the sheet is dragged.
1498
+ - `data-swipe-dismiss`: Present once a drag has closed it.
1499
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
1500
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
1501
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
1502
+ - positioner: Places the list against the input: against the chips' box when the input is in one, the button when the input is inside the popup, or its own `anchor`. It carries the geometry. As a sheet it is not placed, and carries none.
1129
1503
  - `data-open`: Present when it is open.
1130
1504
  - `data-closed`: Present when it is closed.
1131
1505
  - `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.
1132
1506
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1507
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
1508
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1509
+ - `data-empty`: Present when no item is shown for what was typed.
1133
1510
  - `--anchor-width`: The anchor's width.
1134
1511
  - `--anchor-height`: The anchor's height.
1135
1512
  - `--available-width`: The width between the anchor and the edge of the viewport.
1136
1513
  - `--available-height`: The height between the anchor and the edge of the viewport.
1137
1514
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1138
- - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list.
1515
+ - popup: The list of items. With a `list` inside, what holds it: a dialog around an input and the list. As a sheet, a design moves it by what it says of the drag, and gives it `touch-action: none` where a finger drags it.
1139
1516
  - `data-open`: Present when it is open.
1140
1517
  - `data-closed`: Present when it is closed.
1141
1518
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1142
1519
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1143
1520
  - `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.
1144
1521
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1522
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
1523
+ - `data-swiping`: Present while the sheet is dragged.
1524
+ - `data-swipe-dismiss`: Present once a drag has closed it.
1525
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1145
1526
  - `data-empty`: Present when no item is shown for what was typed.
1527
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
1528
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
1529
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
1530
+ - `--drawer-swipe-strength`: As a sheet, once let go: 0.1 to 1, the share of the design's own time it should take to come to rest.
1146
1531
  - list: The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
1147
1532
  - `data-empty`: Present when no item is shown for what was typed.
1148
1533
  - item: One choice in the list.
1149
1534
  - `data-selected`: Present on the chosen item.
1150
1535
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
1151
1536
  - `data-disabled`: Present when it is disabled.
1152
- - clear: A button that empties the input and the value.
1537
+ - clear: A button that empties the input and the value. It is in the page while there is something to clear (the text, for an autocomplete; else what is chosen), and through its exit; `keepMounted` keeps it there.
1538
+ - `data-disabled`: Present when it is disabled.
1539
+ - `data-popup-open`: Present when the list is open.
1540
+ - `data-visible`: Present while there is something to clear.
1541
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1542
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1543
+ - chip: One chosen value. The arrows reach it from the start of the input, and Backspace or Delete on it takes it away.
1153
1544
  - `data-disabled`: Present when it is disabled.
1154
1545
  - chipRemove: A chip's button that takes its value away.
1155
1546
  - `data-disabled`: Present when it is disabled.
@@ -1195,7 +1586,7 @@ Each part, and its own props:
1195
1586
  - `[kpCommandGroup]` is `KpCommandGroup`. Items under a `kpCommandGroupHeading`. Hidden while none of them is shown.
1196
1587
  - `[kpCommandGroupHeading]` is `KpCommandGroupHeading`. A group's name.
1197
1588
  - `[kpCommandItem]` is `KpCommandItem`.
1198
- - `value: string`: Required. What `itemSelected` is told.
1589
+ - `value?: string`: What `itemSelected` is told; its `label`, or its text, when left out.
1199
1590
  - `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
1200
1591
  - `label?: string`: What is filtered; the item's text when left out.
1201
1592
  - `keywords?: readonly string[]`: Other words the item answers to.
@@ -1251,7 +1642,8 @@ Props of its root:
1251
1642
  - `[(open)]: boolean`: Whether it is open, when the caller holds it.
1252
1643
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1253
1644
  - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
1254
- - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
1645
+ - `loopFocus?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
1646
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
1255
1647
  - `modal?: boolean`: Holds the page while the menu is open. Not for a submenu.
1256
1648
  - `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
1257
1649
 
@@ -1266,11 +1658,13 @@ Each part, and its own props:
1266
1658
  - `[kpMenuItem]` is `KpMenuItem`.
1267
1659
  - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1268
1660
  - `label?: string`: What typing matches; the item's text when left out.
1269
- - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does.
1661
+ - `closeOnSelect?: boolean`: Whether choosing the item closes the menu. Default: it does.
1662
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu.
1270
1663
  - `a[kpMenuLinkItem]` is `KpMenuLinkItem`. `<a kpMenuLinkItem href="…">`: an item that is a link.
1271
1664
  - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1272
1665
  - `label?: string`: What typing matches; the item's text when left out.
1273
- - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does.
1666
+ - `closeOnSelect?: boolean`: Whether choosing the item closes the menu. Default: it does.
1667
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu.
1274
1668
  - `[kpMenuGroup]` is `KpMenuGroup`. Items that belong together, named by their label.
1275
1669
  - `[kpMenuGroupLabel]` is `KpMenuGroupLabel`. Names the group it is in. With no group around it, it is plain text.
1276
1670
  - `[kpMenuSeparator]` is `KpMenuSeparator`. A line between items.
@@ -1279,7 +1673,8 @@ Each part, and its own props:
1279
1673
  - `defaultChecked?: boolean`: Whether the item starts checked, when the caller does not hold `checked`. Read once.
1280
1674
  - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1281
1675
  - `label?: string`: What typing matches; the item's text when left out.
1282
- - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does not.
1676
+ - `closeOnSelect?: boolean`: Whether choosing the item closes the menu. Default: it does not.
1677
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu.
1283
1678
  - `(checkedChanged): { checked: boolean; details: ChangeDetails }`: Heard as the item is about to be checked or unchecked: `details.cancel()` keeps it as it was.
1284
1679
  - `[kpMenuCheckboxItemIndicator]` is `KpMenuCheckboxItemIndicator`. Structural: written `*kpMenuCheckboxItemIndicator`. `<span *kpMenuCheckboxItemIndicator>`: in the page while its item is checked.
1285
1680
  - `[kpMenuRadioGroup]` is `KpMenuRadioGroup`. `exportAs: "kpMenuRadioGroup"`. Generic: `<Value = unknown>`.
@@ -1291,13 +1686,15 @@ Each part, and its own props:
1291
1686
  - `value: unknown`: Required. What the radio group's value is while this item is the chosen one.
1292
1687
  - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
1293
1688
  - `label?: string`: What typing matches; the item's text when left out.
1294
- - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does not.
1689
+ - `closeOnSelect?: boolean`: Whether choosing the item closes the menu. Default: it does not.
1690
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu.
1295
1691
  - `[kpMenuRadioItemIndicator]` is `KpMenuRadioItemIndicator`. Structural: written `*kpMenuRadioItemIndicator`. `<span *kpMenuRadioItemIndicator>`: in the page while its item is the chosen one.
1296
1692
  - `[kpMenuSubmenuRoot]` is `KpMenuSubmenuRoot`. `exportAs: "kpMenuSubmenuRoot"`. A menu that one of this menu's items opens. Its trigger is `kpMenuSubmenuTrigger`.
1297
1693
  - `[(open)]: boolean`: Whether it is open, when the caller holds it.
1298
1694
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1299
1695
  - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
1300
- - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
1696
+ - `loopFocus?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
1697
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
1301
1698
  - `modal?: boolean`: Holds the page while the menu is open. Not for a submenu.
1302
1699
  - `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
1303
1700
  - `[kpMenuSubmenuTrigger]` is `KpMenuSubmenuTrigger`. On the item of a menu that opens the submenu around it (`kpMenuSubmenuRoot`).
@@ -1306,16 +1703,20 @@ Attributes and CSS variables, by part:
1306
1703
 
1307
1704
  - trigger: The area a secondary press, or a long press on a touch screen, opens the menu in.
1308
1705
  - `data-popup-open`: Present when the menu is open.
1706
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
1309
1707
  - positioner: Places the menu against its trigger. It carries the geometry.
1310
1708
  - `data-open`: Present when it is open.
1311
1709
  - `data-closed`: Present when it is closed.
1312
1710
  - `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.
1313
1711
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1712
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1314
1713
  - `--anchor-width`: The anchor's width.
1315
1714
  - `--anchor-height`: The anchor's height.
1316
1715
  - `--available-width`: The width between the anchor and the edge of the viewport.
1317
1716
  - `--available-height`: The height between the anchor and the edge of the viewport.
1318
1717
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1718
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
1719
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
1319
1720
  - popup: The menu itself: the list of items.
1320
1721
  - `data-open`: Present when it is open.
1321
1722
  - `data-closed`: Present when it is closed.
@@ -1323,7 +1724,10 @@ Attributes and CSS variables, by part:
1323
1724
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1324
1725
  - `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.
1325
1726
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1727
+ - `data-instant="click | dismiss | group"`: Present when it opened or closed in a way that should skip the motion: `click` when the keyboard pressed its trigger or an item, `dismiss` when Escape closed it, `group` when focus or the pointer went from one menu of a bar to another.
1326
1728
  - arrow: An element that points at the trigger.
1729
+ - `data-open`: Present when it is open.
1730
+ - `data-closed`: Present when it is closed.
1327
1731
  - `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.
1328
1732
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1329
1733
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
@@ -1378,9 +1782,10 @@ Props of its root:
1378
1782
  - `[(value)]: string | null`: The day typed, once all of it is: `[(value)]`.
1379
1783
  - `defaultValue?: string | null`: The value it starts with, when the caller does not hold `value`. Read once.
1380
1784
  - `locale?: string`: The language and region that order the day, the month and the year. Default `"en-US"`.
1785
+ - `calendarSystem?: CalendarSystem`: The calendar its parts are typed in, when it is not the Gregorian one: an instance from `@internationalized/date`. The value is still an ISO day.
1381
1786
  - `min?: string`: The first and the last day it takes: outside them it says it is invalid.
1382
1787
  - `max?: string`: The last day it takes.
1383
- - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part shows. Default: `dd`, `mm`, `yyyy`.
1788
+ - `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part shows. Default: `dd`, `mm`, `yyyy`, `era`.
1384
1789
  - `disabled?: boolean`: Disabled: it cannot be changed.
1385
1790
  - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
1386
1791
  - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
@@ -1403,7 +1808,7 @@ Attributes and CSS variables, by part:
1403
1808
  - `data-readonly`: Present when its value cannot be changed.
1404
1809
  - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1405
1810
  - segment: One piece of the date: a part that is typed, or what stands between two.
1406
- - `data-segment="day | month | year | literal"`: Which piece it is.
1811
+ - `data-segment="era | day | month | year | literal"`: Which piece it is: the era only in a calendar of several eras.
1407
1812
  - `data-placeholder`: Present on a part that is empty.
1408
1813
  - `data-disabled`: Present when it is disabled.
1409
1814
  - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
@@ -1411,16 +1816,16 @@ Attributes and CSS variables, by part:
1411
1816
  ### DatePicker
1412
1817
 
1413
1818
  ```
1414
- import { KpDatePicker, KpDatePickerField, KpDateFieldSegments, KpDateFieldSegment, KpDateFieldInput, KpPopoverTrigger, KpPopoverPortal, KpPopoverPositioner, KpPopoverPopup, KpDatePickerCalendar, KpCalendarHeading, KpCalendarPrevious, KpCalendarNext, KpCalendarMonths, KpCalendarGrid, KpCalendarWeekdays, KpCalendarHeadCell, KpCalendarWeeks, KpCalendarCell, KpCalendarDay } from "@kirana-ui/angular"
1819
+ import { KpDatePicker, KpDatePickerField, KpDateFieldSegments, KpDateFieldSegment, KpDateFieldInput, KpPopoverTrigger, KpPopoverPortal, KpPopoverPositioner, KpPopoverPopup, KpDatePickerCalendar, KpCalendarHeading, KpCalendarPrevious, KpCalendarNext, KpCalendarMonths, KpCalendarGrid, KpCalendarWeekdays, KpCalendarHeadCell, KpCalendarWeeks, KpCalendarCell, KpCalendarDay, KpDatePickerClear, KpDatePickerPreset } from "@kirana-ui/angular"
1415
1820
  ```
1416
1821
 
1417
- Parts: `[kpDatePicker]`, `[kpDatePickerField]`, `[kpDateFieldSegments]`, `[kpDateFieldSegment]`, `input[kpDateFieldInput]`, `[kpPopoverTrigger]`, `[kpPopoverPortal]`, `[kpPopoverPositioner]`, `[kpPopoverPopup]`, `[kpDatePickerCalendar]`, `[kpCalendarHeading]`, `[kpCalendarPrevious]`, `[kpCalendarNext]`, `[kpCalendarMonths]`, `[kpCalendarGrid]`, `[kpCalendarWeekdays]`, `[kpCalendarHeadCell]`, `[kpCalendarWeeks]`, `[kpCalendarCell]`, `[kpCalendarDay]`.
1822
+ Parts: `[kpDatePicker]`, `[kpDatePickerField]`, `[kpDateFieldSegments]`, `[kpDateFieldSegment]`, `input[kpDateFieldInput]`, `[kpPopoverTrigger]`, `[kpPopoverPortal]`, `[kpPopoverPositioner]`, `[kpPopoverPopup]`, `[kpDatePickerCalendar]`, `[kpCalendarHeading]`, `[kpCalendarPrevious]`, `[kpCalendarNext]`, `[kpCalendarMonths]`, `[kpCalendarGrid]`, `[kpCalendarWeekdays]`, `[kpCalendarHeadCell]`, `[kpCalendarWeeks]`, `[kpCalendarCell]`, `[kpCalendarDay]`, `[kpDatePickerClear]`, `[kpDatePickerPreset]`.
1418
1823
 
1419
1824
  Anatomy:
1420
1825
 
1421
1826
  ```
1422
1827
  kpDatePicker
1423
- kpDatePickerField
1828
+ kpDatePickerField (repeated)
1424
1829
  *kpDateFieldSegments
1425
1830
  kpDateFieldSegment (repeated)
1426
1831
  input[kpDateFieldInput]
@@ -1439,19 +1844,22 @@ kpDatePicker
1439
1844
  kpCalendarDay
1440
1845
  kpCalendarPrevious
1441
1846
  kpCalendarNext
1847
+ kpDatePickerClear (optional)
1848
+ kpDatePickerPreset (optional, repeated)
1442
1849
  ```
1443
1850
 
1444
1851
  Props of its root:
1445
1852
 
1446
- - `[(value)]: string | null`: The day, typed or picked; `null` for none.
1447
- - `defaultValue?: string | null`: The value it starts with, when the caller does not hold `value`. Read once.
1853
+ - `[(value)]: DatePickerValueOf<Mode>`: The day; with `mode="range"` a first and a last: `[(value)]`. Typed by `mode`.
1854
+ - `defaultValue?: NoInfer<DatePickerValueOf<Mode>>`: The value it starts with, when the caller does not hold `value`. Read once.
1855
+ - `mode?: Mode`: One day (the default), or a first and a last (`"range"`): two `kpDatePickerField`s, `range="start"` and `range="end"`. Read once.
1448
1856
  - `[(open)]: boolean`: Whether the calendar is open, when the caller holds it.
1449
1857
  - `defaultOpen?: boolean`: Whether the calendar starts open, when the caller does not hold `open`. Read once.
1450
1858
  - `locale?: string`: The language and region of the field and the calendar. Give it: a server does not know.
1451
1859
  - `min?: string`: The first and the last day that can be typed or picked.
1452
1860
  - `max?: string`: The last day that can be typed or picked.
1453
1861
  - `isDateUnavailable?: CalendarProps["isDateUnavailable"]`: Days that cannot be picked in the calendar.
1454
- - `calendarSystem?: CalendarProps["calendarSystem"]`: The calendar its months are laid out in, when it is not the Gregorian one.
1862
+ - `calendarSystem?: CalendarProps["calendarSystem"]`: The calendar its months are laid out in and its field typed in, when it is not the Gregorian one. The value is an ISO day whatever it is.
1455
1863
  - `fixedWeeks?: boolean`: Always six rows of days.
1456
1864
  - `months?: number`: How many months the calendar shows side by side.
1457
1865
  - `pagedNavigation?: boolean`: With several `months`: Previous and Next turn them all rather than one month.
@@ -1460,17 +1868,18 @@ Props of its root:
1460
1868
  - `placeholders?: DateFieldProps["placeholders"]`: What an empty part of the field shows.
1461
1869
  - `disabled?: boolean`: Disabled: it cannot be changed.
1462
1870
  - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
1463
- - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
1871
+ - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid, and the day picked, pressed again in the calendar, stays picked. Without it, that press empties the field and closes the calendar.
1464
1872
  - `name?: string`: The name it is submitted under.
1465
1873
  - `form?: string`: The id of the form it belongs to, when it is not inside it.
1466
- - `(valueChanged): { value: string | null; details: ChangeDetails }`: Heard as the day is about to change, typed or picked: `details.cancel()` keeps the value as it was.
1874
+ - `(valueChanged): { value: DatePickerValueOf<Mode>; details: ChangeDetails }`: Heard as the value is about to change, typed, picked, pressed or cleared: `details.cancel()` keeps the value as it was. A range is heard as each end comes, its other end `null` until it is there too.
1467
1875
  - `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as the calendar is about to open or close: `details.cancel()` keeps it as it was.
1468
1876
  - `(monthChanged): { month: string; details: ChangeDetails }`: The calendar is about to show another month: its first day, and `details.cancel()`.
1469
1877
 
1470
1878
  Each part, and its own props:
1471
1879
 
1472
- - `[kpDatePicker]` is `KpDatePicker`. `exportAs: "kpDatePicker"`. A date field, and a calendar in a popover, with one value between them. On any element, or on `<ng-container>` to draw none. Inside it the date field's, the popover's and the calendar's own directives are its parts (`kpDateFieldSegments`, `kpPopoverTrigger`, `kpCalendarGrid` …), with `kpDatePickerField` and `kpDatePickerCalendar` for the two elements that hold them. `[(value)]` is the day, `[(open)]` whether the calendar shows, `[(month)]` the first day of the month it shows. Its props are above.
1473
- - `[kpDatePickerField]` is `KpDatePickerField`. The typed date: what holds its segments and its hidden input.
1880
+ - `[kpDatePicker]` is `KpDatePicker`. `exportAs: "kpDatePicker"`. Generic: `<Mode extends DatePickerMode = DatePickerMode>`. A date field, and a calendar in a popover, with one value between them. On any element, or on `<ng-container>` to draw none. Inside it the date field's, the popover's and the calendar's own directives are its parts (`kpDateFieldSegments`, `kpPopoverTrigger`, `kpCalendarGrid` …), with `kpDatePickerField` and `kpDatePickerCalendar` for the two elements that hold them, and `kpDatePickerClear` and `kpDatePickerPreset` buttons. `[(value)]` is the day (with `mode="range"` the range), `[(open)]` whether the calendar shows, `[(month)]` the first day of the month it shows. Its props are above.
1881
+ - `[kpDatePickerField]` is `KpDatePickerField`. The typed date: what holds its segments and its hidden input. With `mode="range"` there are two, `range="start"` and `range="end"`, each giving the date field's directives inside it their field.
1882
+ - `range?: "start" | "end"`: With `mode="range"`: which day of the range it is typed in, the first (`"start"`, the default) or the last (`"end"`).
1474
1883
  - `[kpDateFieldSegments]` is `KpDateFieldSegments`. Structural: written `*kpDateFieldSegments`. Its template is given the entry: `let entry` is a `DateFieldSegment`. `<span *kpDateFieldSegments="let segment">`: once for each piece of the date.
1475
1884
  - `[kpDateFieldSegment]` is `KpDateFieldSegment`. One piece: a part that is typed, or what stands between two. It writes its own text.
1476
1885
  - `segment: DateFieldSegment`: Required. The piece it is: an entry `DateField.Segments` gave.
@@ -1483,7 +1892,7 @@ Each part, and its own props:
1483
1892
  - `[kpPopoverPositioner]` is `KpPopoverPositioner`. Takes the positioner options ("Positioner options", above).
1484
1893
  - `[kpPopoverPopup]` is `KpPopoverPopup`.
1485
1894
  - `[kpDatePickerCalendar]` is `KpDatePickerCalendar`. The calendar: what holds its heading, its buttons and its grid.
1486
- - `[kpCalendarHeading]` is `KpCalendarHeading`. Names the month shown: it writes the name before whatever is inside it.
1895
+ - `[kpCalendarHeading]` is `KpCalendarHeading`. Names the month shown, unless the element has content of its own: then that is what it says, and the live region reads it as the month changes.
1487
1896
  - `[kpCalendarPrevious]` is `KpCalendarPrevious`.
1488
1897
  - `[kpCalendarNext]` is `KpCalendarNext`.
1489
1898
  - `[kpCalendarMonths]` is `KpCalendarMonths`. Structural: written `*kpCalendarMonths`. Its template is given the entry: `let entry` is a `CalendarMonth`. `<div *kpCalendarMonths="let month">`: once for each month shown, side by side. The parts inside each are that month's. Left out for one month.
@@ -1493,33 +1902,40 @@ Each part, and its own props:
1493
1902
  - `weekday: CalendarWeekday`: Required. The day of the week it heads: an entry `Calendar.Weekdays` gave.
1494
1903
  - `[kpCalendarWeeks]` is `KpCalendarWeeks`. Structural: written `*kpCalendarWeeks`. Its template is given the entry: `let entry` is a `readonly CalendarDay[]`. `<tr *kpCalendarWeeks="let week">`: once for each week of the month shown.
1495
1904
  - `[kpCalendarCell]` is `KpCalendarCell`.
1496
- - `date: string`: Required. The day it holds, as `Calendar.Weeks` gave it: `day.date`.
1905
+ - `date: string`: Required. The day it holds, as `*kpCalendarWeeks` gave it; a `kpCalendarDay` inside takes it too.
1497
1906
  - `[kpCalendarDay]` is `KpCalendarDay`.
1498
- - `date: string`: Required. The day it is the button of, as `Calendar.Weeks` gave it: `day.date`.
1907
+ - `date?: string`: The day it is the button of. Left out, its `kpCalendarCell`'s.
1908
+ - `[kpDatePickerClear]` is `KpDatePickerClear`. Empties the value, and gives focus to the field. Disabled while there is none.
1909
+ - `[kpDatePickerPreset]` is `KpDatePickerPreset`. `<button kpDatePickerPreset [value]="…">`: makes the value the one it is given, pressed while it is.
1910
+ - `value: string | DatePickerRange`: Required. The value its press gives: a day, or with `mode="range"` a range.
1499
1911
 
1500
1912
  Attributes and CSS variables, by part:
1501
1913
 
1502
- - field: The field: a group of the date's parts.
1914
+ - field: The field a day is typed in: with `mode: "range"`, one for the first day (`range="start"`) and one for the last (`range="end"`).
1503
1915
  - `data-disabled`: Present when it is disabled.
1504
1916
  - `data-readonly`: Present when its value cannot be changed.
1505
1917
  - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1506
1918
  - segment: One piece of the date: a part that is typed, or what stands between two.
1507
- - `data-segment="day | month | year | literal"`: Which piece it is.
1919
+ - `data-segment="era | day | month | year | literal"`: Which piece it is: the era only in a calendar of several eras.
1508
1920
  - `data-placeholder`: Present on a part that is empty.
1509
1921
  - `data-disabled`: Present when it is disabled.
1510
1922
  - `data-invalid`: Present when the date is outside what it takes, or is asked for and half typed.
1511
1923
  - trigger: The button that opens the popover, and what it is placed against.
1512
1924
  - `data-popup-open`: Present when the popover is open.
1925
+ - `data-pressed`: Present while the popover a press on this trigger opened is open: it stays pressed, as a button held down.
1513
1926
  - positioner: Places the popup against the trigger. It carries the geometry.
1514
1927
  - `data-open`: Present when it is open.
1515
1928
  - `data-closed`: Present when it is closed.
1516
1929
  - `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.
1517
1930
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1931
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1518
1932
  - `--anchor-width`: The anchor's width.
1519
1933
  - `--anchor-height`: The anchor's height.
1520
1934
  - `--available-width`: The width between the anchor and the edge of the viewport.
1521
1935
  - `--available-height`: The height between the anchor and the edge of the viewport.
1522
1936
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
1937
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
1938
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
1523
1939
  - popup: The popover itself.
1524
1940
  - `data-open`: Present when it is open.
1525
1941
  - `data-closed`: Present when it is closed.
@@ -1527,6 +1943,9 @@ Attributes and CSS variables, by part:
1527
1943
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1528
1944
  - `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.
1529
1945
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1946
+ - `data-instant="click | dismiss"`: Present when it opened or closed in a way that should skip the motion: `click` when the keyboard pressed the trigger, `dismiss` when Escape closed it.
1947
+ - `--popup-width`: Its width: `auto`, and while its content changes size, the old width and then the new one, for a transition between them.
1948
+ - `--popup-height`: Its height: `auto`, and while its content changes size, the old height and then the new one, for a transition between them.
1530
1949
  - calendar: The calendar.
1531
1950
  - `data-disabled`: Present when it is disabled.
1532
1951
  - `data-readonly`: Present when its value cannot be changed.
@@ -1535,21 +1954,26 @@ Attributes and CSS variables, by part:
1535
1954
  - next: Shows the month after.
1536
1955
  - `data-disabled`: Present when it is disabled.
1537
1956
  - cell: A day's cell.
1538
- - `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.
1957
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Also on a copy of one (a day of the month before or after, shown in its own month too), which is drawn as the day is but has no aria-selected.
1539
1958
  - `data-today`: Present on today.
1540
1959
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1541
1960
  - `data-disabled`: Present when it is disabled.
1542
1961
  - `data-unavailable`: Present on a day that cannot be chosen.
1543
- - `data-range-start`: Present on the first day of a range.
1544
- - `data-range-end`: Present on the last day of a range.
1962
+ - `data-range-start`: Present on the first day of a range, and on a copy of it.
1963
+ - `data-range-end`: Present on the last day of a range, and on a copy of it.
1545
1964
  - day: The button for a day.
1546
- - `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.
1965
+ - `data-selected`: Present on a chosen day, on every day of a chosen range, and on each day of a list. Also on a copy of one (a day of the month before or after, shown in its own month too), which is drawn as the day is but has no aria-selected.
1547
1966
  - `data-today`: Present on today.
1548
1967
  - `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
1549
1968
  - `data-disabled`: Present when it is disabled.
1550
1969
  - `data-unavailable`: Present on a day that cannot be chosen.
1551
- - `data-range-start`: Present on the first day of a range.
1552
- - `data-range-end`: Present on the last day of a range.
1970
+ - `data-range-start`: Present on the first day of a range, and on a copy of it.
1971
+ - `data-range-end`: Present on the last day of a range, and on a copy of it.
1972
+ - clear: Empties the value, and gives focus to the field. Disabled while there is none.
1973
+ - `data-disabled`: Present when it is disabled.
1974
+ - preset: Makes the value the day, or the range, it is given. Pressed while the value is that.
1975
+ - `data-pressed`: Present while the value is the one it gives.
1976
+ - `data-disabled`: Present when it is disabled.
1553
1977
 
1554
1978
  ### Dialog
1555
1979
 
@@ -1578,6 +2002,8 @@ Props of its root:
1578
2002
  - `[(open)]: boolean`: Whether it is open, when the caller holds it.
1579
2003
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1580
2004
  - `modal?: boolean`: Blocks the page behind it and traps focus. Default `true`.
2005
+ - `disablePointerDismissal?: boolean`: Keeps it open when the pointer presses outside it. Default `false`. Escape always closes it: a caller who must keep it open cancels the change whose `details.reason` is `"escape-key"`.
2006
+ - `closeOnOutsidePress?: boolean`: Whether a press outside closes it. Default `true`.
1581
2007
  - `dismissible?: boolean`: Whether a press outside closes it. Default `true`.
1582
2008
  - `swipeDirection?: DrawerSide`: With `kpDrawer`: the way it is dragged to close it. Default: `"down"`.
1583
2009
  - `snapPoints?: readonly DrawerSnapPoint[]`: With `kpDrawer`: places it rests at, each the share of itself that shows.
@@ -1590,18 +2016,21 @@ Each part, and its own props:
1590
2016
 
1591
2017
  - `[kpDialog]` is `KpDialog`. `exportAs: "kpDialog"`. On any element, or on `<ng-container>` to draw none. `kpDrawer` in place of `kpDialog` is a dialog that comes from an edge and is dragged back to it (`swipeDirection`): its parts are a dialog's (`kpDialogPopup` …). An alert dialog has a root of its own, `kpAlertDialog`. Its props are above.
1592
2018
  - `[kpDialogTrigger]` is `KpDialogTrigger`.
2019
+ - `disabled?: boolean`: It cannot be pressed: the button is disabled, and says so (`data-disabled`).
1593
2020
  - `[kpDialogPortal]` is `KpDialogPortal`. Structural: written `*kpDialogPortal`. `<ng-template kpDialogPortal>` or `*kpDialogPortal`: its content at the end of the page while open.
1594
2021
  - `[kpDialogBackdrop]` is `KpDialogBackdrop`.
1595
2022
  - `[kpDialogViewport]` is `KpDialogViewport`. What a long dialog scrolls in, around its popup: it may be left out. A dialog's and an alert dialog's; a drawer lies at an edge of the page and has none.
1596
2023
  - `[kpDialogPopup]` is `KpDialogPopup`.
1597
2024
  - `[kpDialogTitle]` is `KpDialogTitle`. The heading that names the dialog.
1598
2025
  - `[kpDialogDescription]` is `KpDialogDescription`. The text that describes the dialog.
1599
- - `[kpDialogClose]` is `KpDialogClose`. A button that closes the dialog.
2026
+ - `[kpDialogClose]` is `KpDialogClose`.
2027
+ - `disabled?: boolean`: It cannot be pressed: the button is disabled, and says so (`data-disabled`).
1600
2028
 
1601
2029
  Attributes and CSS variables, by part:
1602
2030
 
1603
2031
  - trigger: The button that opens the dialog.
1604
2032
  - `data-popup-open`: Present when the dialog is open.
2033
+ - `data-disabled`: Present when it is disabled.
1605
2034
  - backdrop: The layer over the page behind the dialog.
1606
2035
  - `data-open`: Present when it is open.
1607
2036
  - `data-closed`: Present when it is closed.
@@ -1619,8 +2048,11 @@ Attributes and CSS variables, by part:
1619
2048
  - `data-closed`: Present when it is closed.
1620
2049
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1621
2050
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2051
+ - `data-nested`: Present when the dialog opened over another dialog.
1622
2052
  - `data-nested-dialog-open`: Present when another dialog is open above this one.
1623
2053
  - `--nested-dialogs`: How many dialogs are open above this one.
2054
+ - close: A button that closes the dialog.
2055
+ - `data-disabled`: Present when it is disabled.
1624
2056
 
1625
2057
  ### Drawer
1626
2058
 
@@ -1648,6 +2080,8 @@ Props of its root:
1648
2080
  - `[(open)]: boolean`: Whether it is open, when the caller holds it.
1649
2081
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
1650
2082
  - `modal?: boolean`: Blocks the page behind it and traps focus. Default `true`.
2083
+ - `disablePointerDismissal?: boolean`: Keeps it open when the pointer presses outside it. Default `false`. Escape always closes it: a caller who must keep it open cancels the change whose `details.reason` is `"escape-key"`.
2084
+ - `closeOnOutsidePress?: boolean`: Whether a press outside closes it. Default `true`.
1651
2085
  - `dismissible?: boolean`: Whether a press outside closes it. Default `true`.
1652
2086
  - `swipeDirection?: DrawerSide`: With `kpDrawer`: the way it is dragged to close it. Default: `"down"`.
1653
2087
  - `snapPoints?: readonly DrawerSnapPoint[]`: With `kpDrawer`: places it rests at, each the share of itself that shows.
@@ -1660,32 +2094,39 @@ Each part, and its own props:
1660
2094
 
1661
2095
  - `[kpDrawer]` is `KpDialog`. `exportAs: "kpDialog"`. On any element, or on `<ng-container>` to draw none. `kpDrawer` in place of `kpDialog` is a dialog that comes from an edge and is dragged back to it (`swipeDirection`): its parts are a dialog's (`kpDialogPopup` …). An alert dialog has a root of its own, `kpAlertDialog`. Its props are above.
1662
2096
  - `[kpDialogTrigger]` is `KpDialogTrigger`.
2097
+ - `disabled?: boolean`: It cannot be pressed: the button is disabled, and says so (`data-disabled`).
1663
2098
  - `[kpDialogPortal]` is `KpDialogPortal`. Structural: written `*kpDialogPortal`. `<ng-template kpDialogPortal>` or `*kpDialogPortal`: its content at the end of the page while open.
1664
2099
  - `[kpDialogBackdrop]` is `KpDialogBackdrop`.
1665
2100
  - `[kpDialogPopup]` is `KpDialogPopup`.
1666
2101
  - `[kpDialogTitle]` is `KpDialogTitle`. The heading that names the dialog.
1667
2102
  - `[kpDialogDescription]` is `KpDialogDescription`. The text that describes the dialog.
1668
- - `[kpDialogClose]` is `KpDialogClose`. A button that closes the dialog.
2103
+ - `[kpDialogClose]` is `KpDialogClose`.
2104
+ - `disabled?: boolean`: It cannot be pressed: the button is disabled, and says so (`data-disabled`).
1669
2105
 
1670
2106
  Attributes and CSS variables, by part:
1671
2107
 
1672
2108
  - trigger: The button that opens the dialog.
1673
2109
  - `data-popup-open`: Present when the dialog is open.
2110
+ - `data-disabled`: Present when it is disabled.
1674
2111
  - backdrop: The layer over the page behind the dialog.
1675
2112
  - `data-open`: Present when it is open.
1676
2113
  - `data-closed`: Present when it is closed.
1677
2114
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1678
2115
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
1679
2116
  - `data-swiping`: Present while the drawer is dragged.
2117
+ - `data-swipe-dismiss`: Present once a drag has closed the drawer.
1680
2118
  - `--drawer-swipe-movement-x`: How far it has been dragged across.
1681
2119
  - `--drawer-swipe-movement-y`: How far it has been dragged up or down.
1682
2120
  - `--drawer-swipe-progress`: How far it has been dragged, of its own size: 0 to 1.
1683
2121
  - `--drawer-snap-point-offset`: How far from whole it rests, towards the edge it closes at: 0px at its largest snap point.
2122
+ - `--drawer-swipe-strength`: Always 1: the backdrop takes the design's own time to leave, however the drawer was thrown.
2123
+ - `--drawer-height`: While the drawer is dragged: the height of the drawer in front.
1684
2124
  - 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.
1685
2125
  - `data-open`: Present when it is open.
1686
2126
  - `data-closed`: Present when it is closed.
1687
2127
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
1688
2128
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2129
+ - `data-nested`: Present when the dialog opened over another dialog.
1689
2130
  - `data-nested-dialog-open`: Present when another dialog is open above this one.
1690
2131
  - `data-swiping`: Present while the drawer is dragged.
1691
2132
  - `data-swipe-direction="up | down | left | right"`: The way it is dragged to close it.
@@ -1703,6 +2144,123 @@ Attributes and CSS variables, by part:
1703
2144
  - `--drawer-frontmost-height`: The height of the drawer in front of every other, while this one is open.
1704
2145
  - `--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.
1705
2146
  - `--drawer-width`: Its width.
2147
+ - close: A button that closes the dialog.
2148
+ - `data-disabled`: Present when it is disabled.
2149
+
2150
+ ### Editable
2151
+
2152
+ ```
2153
+ import { KpEditable, KpEditablePreview, KpEditableInput, KpEditableEditTrigger, KpEditableSubmitTrigger, KpEditableCancelTrigger } from "@kirana-ui/angular"
2154
+ ```
2155
+
2156
+ Parts: `[kpEditable]`, `[kpEditablePreview]`, `[kpEditableInput]`, `[kpEditableEditTrigger]`, `[kpEditableSubmitTrigger]`, `[kpEditableCancelTrigger]`.
2157
+
2158
+ Anatomy:
2159
+
2160
+ ```
2161
+ kpEditable
2162
+ kpEditablePreview
2163
+ kpEditableInput
2164
+ kpEditableEditTrigger (optional)
2165
+ kpEditableSubmitTrigger (optional)
2166
+ kpEditableCancelTrigger (optional)
2167
+ ```
2168
+
2169
+ Props of its root:
2170
+
2171
+ - `[(value)]: string`: The text it holds: what the preview shows, and what editing starts from.
2172
+ - `defaultValue?: string`: The text it starts with, when the caller does not hold `value`. Read once. Default `""`.
2173
+ - `[(editing)]: boolean`: Whether it is being edited, when the caller holds it.
2174
+ - `defaultEditing?: boolean`: Read once.
2175
+ - `placeholder?: string`: What the preview shows while the text is empty. Default `""`.
2176
+ - `activation?: "focus" | "click" | "dblclick" | "none"`: What on the preview starts an edit. Default `"focus"`.
2177
+ - `submitOnBlur?: boolean`: Whether focus leaving the input keeps the edit (the default) or drops it.
2178
+ - `selectOnFocus?: boolean`: Whether the text is selected as editing starts. Default `true`.
2179
+ - `disabled?: boolean`: Disabled: it cannot be edited.
2180
+ - `readOnly?: boolean`: Shown as it is, not editable.
2181
+ - `required?: boolean`: Needed: in a field, leaving it empty is then invalid.
2182
+ - `name?: string`: The name it is submitted under; in a field, the field's by default.
2183
+ - `form?: string`: The id of the form the input belongs to, when it is not inside it.
2184
+ - `(valueChanged): { value: string; details: ChangeDetails }`: An edit about to be kept; `details.cancel()` keeps the text, and the edit open.
2185
+ - `(editingChanged): { editing: boolean; details: ChangeDetails }`: Editing about to start or end; `details.cancel()` keeps it as it was.
2186
+
2187
+ Each part, and its own props:
2188
+
2189
+ - `[kpEditable]` is `KpEditable`. `exportAs: "kpEditable"`. On the element that holds the editable's parts. `[(value)]` is the text, `[(editing)]` whether it is being edited. With a name, its input is what a form reads. Its props are above.
2190
+ - `[kpEditablePreview]` is `KpEditablePreview`. Says the text, or the placeholder while there is none, unless the element has content of its own.
2191
+ - `[kpEditableInput]` is `KpEditableInput`. `<input kpEditableInput>` or `<textarea kpEditableInput>`: in the page always, hidden unless editing.
2192
+ - `[kpEditableEditTrigger]` is `KpEditableEditTrigger`.
2193
+ - `[kpEditableSubmitTrigger]` is `KpEditableSubmitTrigger`.
2194
+ - `[kpEditableCancelTrigger]` is `KpEditableCancelTrigger`.
2195
+
2196
+ Attributes and CSS variables, by part:
2197
+
2198
+ - root: A text edited in place.
2199
+ - `data-editing`: Present while it is being edited.
2200
+ - `data-disabled`: Present when it is disabled.
2201
+ - `data-readonly`: Present when it is shown and cannot be edited.
2202
+ - `data-placeholder`: Present while it holds no text.
2203
+ - `data-touched`: In a field: present once focus has left it.
2204
+ - `data-dirty`: In a field: present while the text is not the one it began with.
2205
+ - `data-filled`: In a field: present while it holds text.
2206
+ - `data-focused`: In a field: present while it has focus.
2207
+ - `data-valid`: In a field: present once the text was checked and found right.
2208
+ - `data-invalid`: In a field: present while the text is wrong.
2209
+ - preview: The text as it reads, or the placeholder while there is none: hidden while editing.
2210
+ - `data-editing`: Present while it is being edited.
2211
+ - `data-disabled`: Present when it is disabled.
2212
+ - `data-readonly`: Present when it is shown and cannot be edited.
2213
+ - `data-placeholder`: Present while it holds no text.
2214
+ - `data-touched`: In a field: present once focus has left it.
2215
+ - `data-dirty`: In a field: present while the text is not the one it began with.
2216
+ - `data-filled`: In a field: present while it holds text.
2217
+ - `data-focused`: In a field: present while it has focus.
2218
+ - `data-valid`: In a field: present once the text was checked and found right.
2219
+ - `data-invalid`: In a field: present while the text is wrong.
2220
+ - input: Where the text is typed, an `<input>` or a `<textarea>`: hidden unless editing.
2221
+ - `data-editing`: Present while it is being edited.
2222
+ - `data-disabled`: Present when it is disabled.
2223
+ - `data-readonly`: Present when it is shown and cannot be edited.
2224
+ - `data-placeholder`: Present while it holds no text.
2225
+ - `data-touched`: In a field: present once focus has left it.
2226
+ - `data-dirty`: In a field: present while the text is not the one it began with.
2227
+ - `data-filled`: In a field: present while it holds text.
2228
+ - `data-focused`: In a field: present while it has focus.
2229
+ - `data-valid`: In a field: present once the text was checked and found right.
2230
+ - `data-invalid`: In a field: present while the text is wrong.
2231
+ - editTrigger: Starts an edit: hidden while editing.
2232
+ - `data-editing`: Present while it is being edited.
2233
+ - `data-disabled`: Present when it is disabled.
2234
+ - `data-readonly`: Present when it is shown and cannot be edited.
2235
+ - `data-placeholder`: Present while it holds no text.
2236
+ - `data-touched`: In a field: present once focus has left it.
2237
+ - `data-dirty`: In a field: present while the text is not the one it began with.
2238
+ - `data-filled`: In a field: present while it holds text.
2239
+ - `data-focused`: In a field: present while it has focus.
2240
+ - `data-valid`: In a field: present once the text was checked and found right.
2241
+ - `data-invalid`: In a field: present while the text is wrong.
2242
+ - submitTrigger: Keeps what was typed: hidden unless editing.
2243
+ - `data-editing`: Present while it is being edited.
2244
+ - `data-disabled`: Present when it is disabled.
2245
+ - `data-readonly`: Present when it is shown and cannot be edited.
2246
+ - `data-placeholder`: Present while it holds no text.
2247
+ - `data-touched`: In a field: present once focus has left it.
2248
+ - `data-dirty`: In a field: present while the text is not the one it began with.
2249
+ - `data-filled`: In a field: present while it holds text.
2250
+ - `data-focused`: In a field: present while it has focus.
2251
+ - `data-valid`: In a field: present once the text was checked and found right.
2252
+ - `data-invalid`: In a field: present while the text is wrong.
2253
+ - cancelTrigger: Drops what was typed: hidden unless editing.
2254
+ - `data-editing`: Present while it is being edited.
2255
+ - `data-disabled`: Present when it is disabled.
2256
+ - `data-readonly`: Present when it is shown and cannot be edited.
2257
+ - `data-placeholder`: Present while it holds no text.
2258
+ - `data-touched`: In a field: present once focus has left it.
2259
+ - `data-dirty`: In a field: present while the text is not the one it began with.
2260
+ - `data-filled`: In a field: present while it holds text.
2261
+ - `data-focused`: In a field: present while it has focus.
2262
+ - `data-valid`: In a field: present once the text was checked and found right.
2263
+ - `data-invalid`: In a field: present while the text is wrong.
1706
2264
 
1707
2265
  ### Field
1708
2266
 
@@ -1719,7 +2277,7 @@ kpField
1719
2277
  kpFieldLabel
1720
2278
  kpFieldControl
1721
2279
  kpFieldDescription
1722
- *kpFieldError
2280
+ *kpFieldError (repeated)
1723
2281
  *kpFieldValidity
1724
2282
  ```
1725
2283
 
@@ -1776,7 +2334,7 @@ Attributes and CSS variables, by part:
1776
2334
  - `data-focused`: Present while the control has focus.
1777
2335
  - `data-valid`: Present once the value has been checked and found right.
1778
2336
  - `data-invalid`: Present while the value is wrong.
1779
- - error: What is wrong with the value. In the page while it applies.
2337
+ - error: What is wrong with the value. In the page while it applies. Several, each with its own `match`, can be shown at once: each has an id of its own, and the control names them all.
1780
2338
  - `data-disabled`: Present when it is disabled.
1781
2339
  - `data-touched`: Present once focus has left the control.
1782
2340
  - `data-dirty`: Present while the value is not the one it started with.
@@ -1818,6 +2376,102 @@ Attributes and CSS variables, by part:
1818
2376
  - legend: The group's name.
1819
2377
  - `data-disabled`: Present when it is disabled.
1820
2378
 
2379
+ ### FileUpload
2380
+
2381
+ ```
2382
+ import { KpFileUpload, KpFileUploadDropzone, KpFileUploadTrigger, KpFileUploadList, KpFileUploadItems, KpFileUploadItem, KpFileUploadItemName, KpFileUploadItemSize, KpFileUploadItemRemove, KpFileUploadClear } from "@kirana-ui/angular"
2383
+ ```
2384
+
2385
+ Parts: `[kpFileUpload]`, `[kpFileUploadDropzone]`, `[kpFileUploadTrigger]`, `[kpFileUploadList]`, `[kpFileUploadItems]`, `[kpFileUploadItem]`, `[kpFileUploadItemName]`, `[kpFileUploadItemSize]`, `[kpFileUploadItemRemove]`, `[kpFileUploadClear]`.
2386
+
2387
+ Anatomy:
2388
+
2389
+ ```
2390
+ kpFileUpload
2391
+ kpFileUploadDropzone
2392
+ kpFileUploadTrigger (optional, as above)
2393
+ kpFileUploadTrigger (optional)
2394
+ kpFileUploadList
2395
+ *kpFileUploadItems
2396
+ kpFileUploadItem (repeated)
2397
+ kpFileUploadItemName
2398
+ kpFileUploadItemSize (optional)
2399
+ kpFileUploadItemRemove (optional)
2400
+ kpFileUploadClear (optional)
2401
+ ```
2402
+
2403
+ Props of its root:
2404
+
2405
+ - `[(files)]: readonly File[]`: The files it holds, in order.
2406
+ - `defaultFiles?: readonly File[]`: The files it starts with, when the caller does not hold `files`. Read once.
2407
+ - `accept?: string | readonly string[]`: What may be taken, as a file input's `accept`: extensions (`".png"`), types (`"image/png"`) and kinds (`"image/*"`), in a list or one text with commas. Without it, anything.
2408
+ - `multiple?: boolean`: Whether several files are held. Default `false`: a file taken is the one held.
2409
+ - `maxFiles?: number`: With `multiple`, how many files it holds at most.
2410
+ - `maxSize?: number`: The largest a file may be, in bytes.
2411
+ - `minSize?: number`: The smallest a file may be, in bytes.
2412
+ - `validate?: (file: File) => boolean`: Whether a file may be taken, asked after the checks above.
2413
+ - `disabled?: boolean`: Disabled: no file can be taken or removed.
2414
+ - `required?: boolean`: Needed: in a `Field`, holding none is then invalid.
2415
+ - `name?: string`: With a name, the files are submitted with the form around them.
2416
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
2417
+ - `(filesChanged): { files: File[]; details: ChangeDetails }`: The files about to change; `details.cancel()` keeps them as they were.
2418
+ - `(filesRejected): FileRejection[]`: The files that were not taken, each with its reasons.
2419
+
2420
+ Each part, and its own props:
2421
+
2422
+ - `[kpFileUpload]` is `KpFileUpload`. `exportAs: "kpFileUpload"`. On the element that holds the file upload's parts. `[(files)]` is the files held, in order. Its props are above.
2423
+ - `[kpFileUploadDropzone]` is `KpFileUploadDropzone`. Where files are dropped, pasted, or pressed to be picked. It draws the native file input, hidden, as its last child: what a form submits, and what the picker fills.
2424
+ - `[kpFileUploadTrigger]` is `KpFileUploadTrigger`. A button that opens the file picker.
2425
+ - `[kpFileUploadList]` is `KpFileUploadList`. What holds the files: a list.
2426
+ - `[kpFileUploadItems]` is `KpFileUploadItems`. Structural: written `*kpFileUploadItems`. Its template is given the entry: `let entry` is a `FileUploadEntry`. `<li *kpFileUploadItems="let entry">`: once for each file, kept by the file's key.
2427
+ - `[kpFileUploadItem]` is `KpFileUploadItem`. A file, on the element `*kpFileUploadItems` draws for it.
2428
+ - `entry: FileUploadEntry`: Required. The file it is, as `*kpFileUploadItems` gave it.
2429
+ - `[kpFileUploadItemName]` is `KpFileUploadItemName`. Says the file's name unless the element has content of its own.
2430
+ - `[kpFileUploadItemSize]` is `KpFileUploadItemSize`. Says the file's size as people read one unless the element has content of its own.
2431
+ - `locale?: string`: The language the number is written in. Default: the reader's.
2432
+ - `[kpFileUploadItemRemove]` is `KpFileUploadItemRemove`. A file's button that takes it away.
2433
+ - `[kpFileUploadClear]` is `KpFileUploadClear`. Takes every file away: hidden while there is none.
2434
+
2435
+ Attributes and CSS variables, by part:
2436
+
2437
+ - root: Files chosen to be sent.
2438
+ - `data-disabled`: Present when it is disabled.
2439
+ - `data-dragging`: Present while files are dragged over the dropzone.
2440
+ - `data-required`: Present when a file is needed.
2441
+ - `data-empty`: Present while it holds no file.
2442
+ - dropzone: Where files are dropped or pasted; pressed, it opens the file picker. It holds the hidden file input.
2443
+ - `data-disabled`: Present when it is disabled.
2444
+ - `data-dragging`: Present while files are dragged over the dropzone.
2445
+ - `data-required`: Present when a file is needed.
2446
+ - trigger: A button that opens the file picker.
2447
+ - `data-disabled`: Present when it is disabled.
2448
+ - `data-dragging`: Present while files are dragged over the dropzone.
2449
+ - `data-required`: Present when a file is needed.
2450
+ - list: What holds the files: a list.
2451
+ - `data-disabled`: Present when it is disabled.
2452
+ - `data-dragging`: Present while files are dragged over the dropzone.
2453
+ - `data-required`: Present when a file is needed.
2454
+ - item: A file.
2455
+ - `data-disabled`: Present when it is disabled.
2456
+ - `data-dragging`: Present while files are dragged over the dropzone.
2457
+ - `data-required`: Present when a file is needed.
2458
+ - itemName: A file's name.
2459
+ - `data-disabled`: Present when it is disabled.
2460
+ - `data-dragging`: Present while files are dragged over the dropzone.
2461
+ - `data-required`: Present when a file is needed.
2462
+ - itemSize: A file's size, as people read one.
2463
+ - `data-disabled`: Present when it is disabled.
2464
+ - `data-dragging`: Present while files are dragged over the dropzone.
2465
+ - `data-required`: Present when a file is needed.
2466
+ - itemRemove: A file's button that takes it away.
2467
+ - `data-disabled`: Present when it is disabled.
2468
+ - `data-dragging`: Present while files are dragged over the dropzone.
2469
+ - `data-required`: Present when a file is needed.
2470
+ - clear: Takes every file away: hidden while there is none.
2471
+ - `data-disabled`: Present when it is disabled.
2472
+ - `data-dragging`: Present while files are dragged over the dropzone.
2473
+ - `data-required`: Present when a file is needed.
2474
+
1821
2475
  ### Form
1822
2476
 
1823
2477
  ```
@@ -1881,11 +2535,14 @@ Attributes and CSS variables, by part:
1881
2535
  - `data-closed`: Present when it is closed.
1882
2536
  - `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.
1883
2537
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2538
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
1884
2539
  - `--anchor-width`: The anchor's width.
1885
2540
  - `--anchor-height`: The anchor's height.
1886
2541
  - `--available-width`: The width between the anchor and the edge of the viewport.
1887
2542
  - `--available-height`: The height between the anchor and the edge of the viewport.
1888
2543
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2544
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
2545
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
1889
2546
  - popup: The card itself.
1890
2547
  - `data-open`: Present when it is open.
1891
2548
  - `data-closed`: Present when it is closed.
@@ -1895,6 +2552,8 @@ Attributes and CSS variables, by part:
1895
2552
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1896
2553
  - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
1897
2554
  - arrow: An element that points at the trigger, placed along the popup's edge.
2555
+ - `data-open`: Present when it is open.
2556
+ - `data-closed`: Present when it is closed.
1898
2557
  - `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.
1899
2558
  - `data-align="start | center | end"`: How it is aligned with the anchor.
1900
2559
  - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
@@ -2032,7 +2691,8 @@ Props of its root:
2032
2691
  - `[(open)]: boolean`: Whether it is open, when the caller holds it.
2033
2692
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
2034
2693
  - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
2035
- - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
2694
+ - `loopFocus?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
2695
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
2036
2696
  - `modal?: boolean`: Holds the page while the menu is open. Not for a submenu.
2037
2697
  - `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
2038
2698
 
@@ -2047,11 +2707,13 @@ Each part, and its own props:
2047
2707
  - `[kpMenuItem]` is `KpMenuItem`.
2048
2708
  - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
2049
2709
  - `label?: string`: What typing matches; the item's text when left out.
2050
- - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does.
2710
+ - `closeOnSelect?: boolean`: Whether choosing the item closes the menu. Default: it does.
2711
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu.
2051
2712
  - `a[kpMenuLinkItem]` is `KpMenuLinkItem`. `<a kpMenuLinkItem href="…">`: an item that is a link.
2052
2713
  - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
2053
2714
  - `label?: string`: What typing matches; the item's text when left out.
2054
- - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does.
2715
+ - `closeOnSelect?: boolean`: Whether choosing the item closes the menu. Default: it does.
2716
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu.
2055
2717
  - `[kpMenuGroup]` is `KpMenuGroup`. Items that belong together, named by their label.
2056
2718
  - `[kpMenuGroupLabel]` is `KpMenuGroupLabel`. Names the group it is in. With no group around it, it is plain text.
2057
2719
  - `[kpMenuSeparator]` is `KpMenuSeparator`. A line between items.
@@ -2060,7 +2722,8 @@ Each part, and its own props:
2060
2722
  - `defaultChecked?: boolean`: Whether the item starts checked, when the caller does not hold `checked`. Read once.
2061
2723
  - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
2062
2724
  - `label?: string`: What typing matches; the item's text when left out.
2063
- - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does not.
2725
+ - `closeOnSelect?: boolean`: Whether choosing the item closes the menu. Default: it does not.
2726
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu.
2064
2727
  - `(checkedChanged): { checked: boolean; details: ChangeDetails }`: Heard as the item is about to be checked or unchecked: `details.cancel()` keeps it as it was.
2065
2728
  - `[kpMenuCheckboxItemIndicator]` is `KpMenuCheckboxItemIndicator`. Structural: written `*kpMenuCheckboxItemIndicator`. `<span *kpMenuCheckboxItemIndicator>`: in the page while its item is checked.
2066
2729
  - `[kpMenuRadioGroup]` is `KpMenuRadioGroup`. `exportAs: "kpMenuRadioGroup"`. Generic: `<Value = unknown>`.
@@ -2072,13 +2735,15 @@ Each part, and its own props:
2072
2735
  - `value: unknown`: Required. What the radio group's value is while this item is the chosen one.
2073
2736
  - `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
2074
2737
  - `label?: string`: What typing matches; the item's text when left out.
2075
- - `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does not.
2738
+ - `closeOnSelect?: boolean`: Whether choosing the item closes the menu. Default: it does not.
2739
+ - `closeOnClick?: boolean`: Whether choosing the item closes the menu.
2076
2740
  - `[kpMenuRadioItemIndicator]` is `KpMenuRadioItemIndicator`. Structural: written `*kpMenuRadioItemIndicator`. `<span *kpMenuRadioItemIndicator>`: in the page while its item is the chosen one.
2077
2741
  - `[kpMenuSubmenuRoot]` is `KpMenuSubmenuRoot`. `exportAs: "kpMenuSubmenuRoot"`. A menu that one of this menu's items opens. Its trigger is `kpMenuSubmenuTrigger`.
2078
2742
  - `[(open)]: boolean`: Whether it is open, when the caller holds it.
2079
2743
  - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
2080
2744
  - `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
2081
- - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
2745
+ - `loopFocus?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
2746
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
2082
2747
  - `modal?: boolean`: Holds the page while the menu is open. Not for a submenu.
2083
2748
  - `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
2084
2749
  - `[kpMenuSubmenuTrigger]` is `KpMenuSubmenuTrigger`. On the item of a menu that opens the submenu around it (`kpMenuSubmenuRoot`).
@@ -2087,17 +2752,21 @@ Attributes and CSS variables, by part:
2087
2752
 
2088
2753
  - trigger: The button that opens the menu, and what it is placed against.
2089
2754
  - `data-popup-open`: Present when the menu is open.
2755
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
2090
2756
  - `data-disabled`: Present when it is disabled.
2091
2757
  - positioner: Places the menu against its trigger. It carries the geometry.
2092
2758
  - `data-open`: Present when it is open.
2093
2759
  - `data-closed`: Present when it is closed.
2094
2760
  - `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.
2095
2761
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2762
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
2096
2763
  - `--anchor-width`: The anchor's width.
2097
2764
  - `--anchor-height`: The anchor's height.
2098
2765
  - `--available-width`: The width between the anchor and the edge of the viewport.
2099
2766
  - `--available-height`: The height between the anchor and the edge of the viewport.
2100
2767
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
2768
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
2769
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
2101
2770
  - popup: The menu itself: the list of items.
2102
2771
  - `data-open`: Present when it is open.
2103
2772
  - `data-closed`: Present when it is closed.
@@ -2105,7 +2774,10 @@ Attributes and CSS variables, by part:
2105
2774
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2106
2775
  - `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.
2107
2776
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2777
+ - `data-instant="click | dismiss | group"`: Present when it opened or closed in a way that should skip the motion: `click` when the keyboard pressed its trigger or an item, `dismiss` when Escape closed it, `group` when focus or the pointer went from one menu of a bar to another.
2108
2778
  - arrow: An element that points at the trigger.
2779
+ - `data-open`: Present when it is open.
2780
+ - `data-closed`: Present when it is closed.
2109
2781
  - `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.
2110
2782
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2111
2783
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
@@ -2146,9 +2818,11 @@ import { KpMenubar } from "@kirana-ui/angular"
2146
2818
 
2147
2819
  Props:
2148
2820
 
2149
- - `loop?: boolean`: Whether the arrows go round from the last menu to the first. Default: they do.
2821
+ - `loopFocus?: boolean`: Whether the arrows go round from the last menu to the first. Default: they do.
2822
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
2150
2823
  - `disabled?: boolean`: No menu of the bar opens.
2151
2824
  - `orientation?: Orientation`: A row (the default) or a column of menus. In a column a menu opens beside its trigger.
2825
+ - `modal?: boolean`: Holds the page while one of its menus is open. Default `false`.
2152
2826
 
2153
2827
  `[kpMenubar]` is `KpMenubar`. `exportAs: "kpMenubar"`. A row of menus that work as one. Each `kpMenu` inside it is one of its items.
2154
2828
 
@@ -2156,6 +2830,8 @@ Attributes and CSS variables, by part:
2156
2830
 
2157
2831
  - root: The row of menus. A menu inside it is one of its items.
2158
2832
  - `data-disabled`: Present when it is disabled.
2833
+ - `data-modal`: Present when its menus hold the page while one is open.
2834
+ - `data-has-submenu-open`: Present while one of its menus is open.
2159
2835
  - `data-orientation="horizontal | vertical"`: Whether its menus are in a row or a column.
2160
2836
 
2161
2837
  ### MessageScroller
@@ -2229,7 +2905,7 @@ Each part, and its own props:
2229
2905
  - `[kpMeter]` is `KpMeter`. `exportAs: "kpMeter"`. The meter: it says the value to assistive technology. Its props are above.
2230
2906
  - `[kpMeterTrack]` is `KpMeterTrack`. The whole range.
2231
2907
  - `[kpMeterIndicator]` is `KpMeterIndicator`. The filled part: its width is the value's share of the range.
2232
- - `[kpMeterValue]` is `KpMeterValue`. Shows the written value.
2908
+ - `[kpMeterValue]` is `KpMeterValue`. Shows the written value, unless the element has content of its own.
2233
2909
  - `[kpMeterLabel]` is `KpMeterLabel`. The meter's name.
2234
2910
 
2235
2911
  ### NavigationMenu
@@ -2276,11 +2952,13 @@ Each part, and its own props:
2276
2952
  - `[kpNavigationMenuItem]` is `KpNavigationMenuItem`. On an item's `<li>`. `value` tells it from the others; an item that is given none makes its own.
2277
2953
  - `value?: unknown`: What tells this item from the others: the menu's `value` while its content is shown. An item that is given none makes its own.
2278
2954
  - `[kpNavigationMenuTrigger]` is `KpNavigationMenuTrigger`.
2955
+ - `disabled?: boolean`: The trigger cannot be pressed, and the pointer resting on it shows nothing.
2279
2956
  - `[kpNavigationMenuIcon]` is `KpNavigationMenuIcon`.
2280
2957
  - `[kpNavigationMenuContent]` is `KpNavigationMenuContent`. Structural: written `*kpNavigationMenuContent`. `<div *kpNavigationMenuContent>`: an item's content, drawn in `kpNavigationMenuViewport` while it is shown.
2281
2958
  - `[kpNavigationMenuLink]` is `KpNavigationMenuLink`.
2282
2959
  - `active?: boolean`: The link is the page the reader is on.
2283
- - `closeOnClick?: boolean`: Whether following it closes the menu. Default: it does.
2960
+ - `closeOnSelect?: boolean`: Whether following it closes the menu. Default: it does.
2961
+ - `closeOnClick?: boolean`: Whether following it closes the menu.
2284
2962
  - `[kpNavigationMenuPortal]` is `KpNavigationMenuPortal`. Structural: written `*kpNavigationMenuPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
2285
2963
  - `[kpNavigationMenuPositioner]` is `KpNavigationMenuPositioner`. Takes the positioner options ("Positioner options", above).
2286
2964
  - `[kpNavigationMenuPopup]` is `KpNavigationMenuPopup`.
@@ -2292,10 +2970,15 @@ Attributes and CSS variables, by part:
2292
2970
 
2293
2971
  - root: The navigation.
2294
2972
  - `data-orientation="horizontal | vertical"`: Whether the list is a row or a column.
2973
+ - `data-open`: Present while an item's content is shown.
2974
+ - `data-nested`: Present on a navigation menu inside another's content: a submenu of it.
2295
2975
  - list: The row of items.
2296
2976
  - `data-orientation="horizontal | vertical"`: Whether the list is a row or a column.
2977
+ - `data-open`: Present while an item's content is shown.
2297
2978
  - trigger: The button that shows an item's content.
2298
2979
  - `data-popup-open`: Present while the item's content is shown.
2980
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
2981
+ - `data-disabled`: Present when it is disabled.
2299
2982
  - icon: A mark on a trigger that shows whether its content is open.
2300
2983
  - `data-popup-open`: Present while the item's content is shown.
2301
2984
  - content: What an item shows. It is drawn in the viewport every item shares.
@@ -2303,7 +2986,7 @@ Attributes and CSS variables, by part:
2303
2986
  - `data-closed`: Present when it is closed.
2304
2987
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2305
2988
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2306
- - `data-activation-direction="left | right"`: Which way it came from: the item before it, or after.
2989
+ - `data-activation-direction="left | right | up | down"`: Which way it came from: the item before it, or after; `up` and `down` when the list is a column.
2307
2990
  - link: A link, in the list or in an item's content.
2308
2991
  - `data-active`: Present on the link of the page the reader is on.
2309
2992
  - positioner: Places the popup against the open item's trigger. It carries the geometry.
@@ -2311,6 +2994,8 @@ Attributes and CSS variables, by part:
2311
2994
  - `data-closed`: Present when it is closed.
2312
2995
  - `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.
2313
2996
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2997
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
2998
+ - `data-instant`: Present while it should move at once: as it is first drawn, and while the window is resized.
2314
2999
  - `--anchor-width`: The anchor's width.
2315
3000
  - `--anchor-height`: The anchor's height.
2316
3001
  - `--available-width`: The width between the anchor and the edge of the viewport.
@@ -2325,9 +3010,12 @@ Attributes and CSS variables, by part:
2325
3010
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2326
3011
  - `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.
2327
3012
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3013
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
2328
3014
  - `--popup-width`: The open content's width.
2329
3015
  - `--popup-height`: The open content's height.
2330
3016
  - arrow: An element that points at the open item's trigger.
3017
+ - `data-open`: Present when it is open.
3018
+ - `data-closed`: Present when it is closed.
2331
3019
  - `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.
2332
3020
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2333
3021
  - `data-uncentered`: Present when the arrow cannot sit at the trigger's centre.
@@ -2375,6 +3063,7 @@ Props of its root:
2375
3063
  - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
2376
3064
  - `name?: string`: With a name, the number is submitted with the form around it.
2377
3065
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
3066
+ - `kpId?: string`: What its input's id is made from: the input is `<id>-input`, which a `<label for>` names. Inside a `Field`, the input takes the field's id instead.
2378
3067
  - `(valueChanged): { value: number | null; details: ChangeDetails }`: Heard as the number is about to change, typed or stepped: `details.cancel()` keeps it as it was.
2379
3068
  - `(valueCommitted): { value: number | null; details: ChangeDetails }`: A change that is done: focus left the input, a key or a button stepped it.
2380
3069
 
@@ -2495,13 +3184,18 @@ Props of its root:
2495
3184
  - `length?: number`: How many characters the code has. Default: 6.
2496
3185
  - `[(value)]: string`: The characters typed so far, when the caller holds them.
2497
3186
  - `defaultValue?: string`: The characters it starts with, when the caller does not hold `value`. Read once. Default `""`.
2498
- - `mode?: "numeric" | "alphabetic" | "alphanumeric" | "text"`: What a character may be: a digit (`numeric`), a letter (`alphabetic`, `a` to `z` either case), either (`alphanumeric`), or anything but white space (`text`). It also says which keyboard a phone shows: the digits' for `numeric`, letters' otherwise. Default: `numeric`, on purpose: a one-time code is digits, and its keyboard is then the one to type them on.
2499
- - `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`.
3187
+ - `validationType?: OtpValidation`: What a character may be: a digit (`numeric`), a letter (`alpha`, `a` to `z` either case), either (`alphanumeric`), or anything but white space (`none`: no rule beyond that). It also says which keyboard a phone shows: the digits' for `numeric`, letters' otherwise. Default: `numeric`, on purpose: a one-time code is digits, and its keyboard is then the one to type them on. `alphabetic` and `text` are older spellings of `alpha` and `none`, still read.
3188
+ - `mode?: OtpValidation`: What a character may be.
3189
+ - `pattern?: string`: What else a character may be: a regular expression, as text, that one character must match whole (`"[A-F0-9]"`), in place of `validationType`'s rule. Text, as an attribute can only be, so it is given the same way on every framework and on a custom element. With a pattern, `validationType` only says the keyboard, and defaults to `none`.
2500
3190
  - `disabled?: boolean`: Disabled: it cannot be changed.
3191
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
3192
+ - `required?: boolean`: Needed: in a field, an empty code is then invalid.
2501
3193
  - `name?: string`: With a name, the code is submitted with the form around it.
2502
3194
  - `form?: string`: The id of the form the input belongs to, when it is not inside it.
3195
+ - `kpId?: string`: The id of its input, not of the root: a `<label for>` names it.
2503
3196
  - `(valueChanged): { value: string; details: ChangeDetails }`: Heard as the characters are about to change: `details.cancel()` keeps them as they were.
2504
- - `(completed): string`: Every character is in: the moment to send the code.
3197
+ - `(valueCompleted): { value: string; details: ChangeDetails }`: Every character is in: the moment to send the code, with the change's details.
3198
+ - `(completed): string`: Every character is in.
2505
3199
 
2506
3200
  Each part, and its own props:
2507
3201
 
@@ -2516,16 +3210,31 @@ Each part, and its own props:
2516
3210
  Attributes and CSS variables, by part:
2517
3211
 
2518
3212
  - root: The code: the input and its cells.
2519
- - `data-disabled`: Present when it is disabled.
3213
+ - `data-touched`: Inside a Field: present once focus has left the control.
3214
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3215
+ - `data-filled`: Present when the code has a character in it.
2520
3216
  - `data-focused`: Present while the input has focus.
3217
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3218
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3219
+ - `data-disabled`: Present when it is disabled.
3220
+ - `data-readonly`: Present when it can be read but not changed.
3221
+ - `data-required`: Present when the form needs it.
2521
3222
  - `data-complete`: Present when every character is in.
2522
3223
  - input: The one input the code is typed in. A design lays it over the cells, unseen.
2523
3224
  - `data-disabled`: Present when it is disabled.
2524
3225
  - slot: One cell of the code.
2525
3226
  - `data-index`: The cell's place, from 0.
2526
3227
  - `data-active`: Present on the cell the next character goes in, or that is selected.
3228
+ - `data-touched`: Inside a Field: present once focus has left the control.
3229
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
2527
3230
  - `data-filled`: Present when the cell has its character.
3231
+ - `data-focused`: Present while the input has focus.
3232
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3233
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2528
3234
  - `data-disabled`: Present when it is disabled.
3235
+ - `data-readonly`: Present when it can be read but not changed.
3236
+ - `data-required`: Present when the form needs it.
3237
+ - `data-complete`: Present when every character is in.
2529
3238
 
2530
3239
  ### Pagination
2531
3240
 
@@ -2579,6 +3288,59 @@ Attributes and CSS variables, by part:
2579
3288
  - next: Goes to the page after.
2580
3289
  - `data-disabled`: Present when it is disabled.
2581
3290
 
3291
+ ### PasswordInput
3292
+
3293
+ ```
3294
+ import { KpPasswordInput, KpPasswordInputInput, KpPasswordInputToggle, KpPasswordInputIndicator } from "@kirana-ui/angular"
3295
+ ```
3296
+
3297
+ Parts: `[kpPasswordInput]`, `[kpPasswordInputInput]`, `[kpPasswordInputToggle]`, `[kpPasswordInputIndicator]`.
3298
+
3299
+ Anatomy:
3300
+
3301
+ ```
3302
+ kpPasswordInput
3303
+ kpPasswordInputInput
3304
+ kpPasswordInputToggle
3305
+ kpPasswordInputIndicator (optional)
3306
+ ```
3307
+
3308
+ Props of its root:
3309
+
3310
+ - `[(visible)]: boolean`: Whether the password can be read, when the caller holds it.
3311
+ - `defaultVisible?: boolean`: Read once. Default `false`.
3312
+ - `disabled?: boolean`: Disabled: nothing can be typed in it.
3313
+ - `(visibleChanged): { visible: boolean; details: ChangeDetails }`: About to be shown or hidden; `details.cancel()` keeps it as it was.
3314
+ - `(valueChanged): { value: string; details: ChangeDetails }`: What was typed, as text, each time it changes.
3315
+
3316
+ Each part, and its own props:
3317
+
3318
+ - `[kpPasswordInput]` is `KpPasswordInput`. `exportAs: "kpPasswordInput"`. On the element that holds the password's parts. `[(visible)]` is whether the password can be read. Its value is the input's own (`[value]`, `ngModel`). Its props are above.
3319
+ - `[kpPasswordInputInput]` is `KpPasswordInputInput`. `<input kpPasswordInputInput>`: a password, or text while it is shown.
3320
+ - `[kpPasswordInputToggle]` is `KpPasswordInputToggle`. Shows the password, and hides it again.
3321
+ - `[kpPasswordInputIndicator]` is `KpPasswordInputIndicator`. What draws which of the two it is: it says the state only.
3322
+
3323
+ Attributes and CSS variables, by part:
3324
+
3325
+ - root: A password that can be shown while it is typed.
3326
+ - `data-visible`: Present while the password can be read.
3327
+ - `data-disabled`: Present when it is disabled.
3328
+ - input: The `<input>`: a password, or text while it is shown. In a `Field` it is the field's control.
3329
+ - `data-visible`: Present while the password can be read.
3330
+ - `data-disabled`: Present when it is disabled.
3331
+ - `data-touched`: Present once focus has left it.
3332
+ - `data-dirty`: Present once its text differs from what it began with.
3333
+ - `data-filled`: Present while it holds text.
3334
+ - `data-focused`: Present while it has focus.
3335
+ - `data-valid`: In a field: present once the value was checked and found right.
3336
+ - `data-invalid`: In a field: present while the value is wrong.
3337
+ - toggle: Shows the password, and hides it again. Focus and the caret stay in the input.
3338
+ - `data-visible`: Present while the password can be read.
3339
+ - `data-disabled`: Present when it is disabled.
3340
+ - indicator: What draws which of the two it is: an eye, open or struck.
3341
+ - `data-visible`: Present while the password can be read.
3342
+ - `data-disabled`: Present when it is disabled.
3343
+
2582
3344
  ### Popover
2583
3345
 
2584
3346
  ```
@@ -2629,6 +3391,7 @@ Attributes and CSS variables, by part:
2629
3391
 
2630
3392
  - trigger: The button that opens the popover, and what it is placed against.
2631
3393
  - `data-popup-open`: Present when the popover is open.
3394
+ - `data-pressed`: Present while the popover a press on this trigger opened is open: it stays pressed, as a button held down.
2632
3395
  - backdrop: A layer over the page behind the popover.
2633
3396
  - `data-open`: Present when it is open.
2634
3397
  - `data-closed`: Present when it is closed.
@@ -2639,11 +3402,14 @@ Attributes and CSS variables, by part:
2639
3402
  - `data-closed`: Present when it is closed.
2640
3403
  - `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.
2641
3404
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3405
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
2642
3406
  - `--anchor-width`: The anchor's width.
2643
3407
  - `--anchor-height`: The anchor's height.
2644
3408
  - `--available-width`: The width between the anchor and the edge of the viewport.
2645
3409
  - `--available-height`: The height between the anchor and the edge of the viewport.
2646
3410
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
3411
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
3412
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
2647
3413
  - popup: The popover itself.
2648
3414
  - `data-open`: Present when it is open.
2649
3415
  - `data-closed`: Present when it is closed.
@@ -2651,7 +3417,12 @@ Attributes and CSS variables, by part:
2651
3417
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2652
3418
  - `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.
2653
3419
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3420
+ - `data-instant="click | dismiss"`: Present when it opened or closed in a way that should skip the motion: `click` when the keyboard pressed the trigger, `dismiss` when Escape closed it.
3421
+ - `--popup-width`: Its width: `auto`, and while its content changes size, the old width and then the new one, for a transition between them.
3422
+ - `--popup-height`: Its height: `auto`, and while its content changes size, the old height and then the new one, for a transition between them.
2654
3423
  - arrow: An element that points at the trigger, placed along the popup's edge.
3424
+ - `data-open`: Present when it is open.
3425
+ - `data-closed`: Present when it is closed.
2655
3426
  - `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.
2656
3427
  - `data-align="start | center | end"`: How it is aligned with the anchor.
2657
3428
  - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
@@ -2688,7 +3459,7 @@ Each part, and its own props:
2688
3459
  - `[kpProgress]` is `KpProgress`. `exportAs: "kpProgress"`. Its props are above.
2689
3460
  - `[kpProgressTrack]` is `KpProgressTrack`.
2690
3461
  - `[kpProgressIndicator]` is `KpProgressIndicator`.
2691
- - `[kpProgressValue]` is `KpProgressValue`. Shows the written value.
3462
+ - `[kpProgressValue]` is `KpProgressValue`. Shows the written value, unless the element has content of its own.
2692
3463
  - `[kpProgressLabel]` is `KpProgressLabel`.
2693
3464
 
2694
3465
  Attributes and CSS variables, by part:
@@ -2779,6 +3550,7 @@ Each part, and its own props:
2779
3550
  - `[kpRadioGroupItem]` is `KpRadioGroupItem`. On an item's element. It draws the hidden native radio inside it, which a form and a label reach.
2780
3551
  - `value: unknown`: Required. What the group's value is while this item is the chosen one.
2781
3552
  - `disabled?: boolean`: Disables this item: it cannot be chosen.
3553
+ - `kpId?: string`: The id of the item's native radio, unique in the page: a `<label for>` names it.
2782
3554
  - `[kpRadioGroupIndicator]` is `KpRadioGroupIndicator`. Structural: written `*kpRadioGroupIndicator`. `<span *kpRadioGroupIndicator>`: in the page while its item is the chosen one.
2783
3555
 
2784
3556
  Attributes and CSS variables, by part:
@@ -2787,21 +3559,91 @@ Attributes and CSS variables, by part:
2787
3559
  - `data-disabled`: Present when it is disabled.
2788
3560
  - `data-readonly`: Present when it can be read but not changed.
2789
3561
  - `data-required`: Present when the form needs it.
3562
+ - `data-touched`: Inside a Field: present once focus has left the control.
3563
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3564
+ - `data-filled`: Inside a Field: present while the control has a value.
3565
+ - `data-focused`: Inside a Field: present while the control has focus.
3566
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3567
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2790
3568
  - 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.
2791
3569
  - `data-checked`: Present when it is checked.
2792
3570
  - `data-unchecked`: Present when it is not checked.
2793
3571
  - `data-disabled`: Present when it is disabled.
2794
3572
  - `data-readonly`: Present when it can be read but not changed.
2795
3573
  - `data-required`: Present when the form needs it.
3574
+ - `data-touched`: Inside a Field: present once focus has left the control.
3575
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3576
+ - `data-filled`: Inside a Field: present while the control has a value.
3577
+ - `data-focused`: Inside a Field: present while the control has focus.
3578
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3579
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2796
3580
  - indicator: The mark. In the page while its item is the chosen one.
2797
3581
  - `data-checked`: Present when it is checked.
2798
3582
  - `data-unchecked`: Present when it is not checked.
2799
3583
  - `data-disabled`: Present when it is disabled.
2800
3584
  - `data-readonly`: Present when it can be read but not changed.
2801
3585
  - `data-required`: Present when the form needs it.
3586
+ - `data-touched`: Inside a Field: present once focus has left the control.
3587
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3588
+ - `data-filled`: Inside a Field: present while the control has a value.
3589
+ - `data-focused`: Inside a Field: present while the control has focus.
3590
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3591
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2802
3592
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
2803
3593
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
2804
3594
 
3595
+ ### Rating
3596
+
3597
+ ```
3598
+ import { KpRating, KpRatingItems, KpRatingItem } from "@kirana-ui/angular"
3599
+ ```
3600
+
3601
+ Parts: `[kpRating]`, `[kpRatingItems]`, `[kpRatingItem]`.
3602
+
3603
+ Anatomy:
3604
+
3605
+ ```
3606
+ kpRating
3607
+ *kpRatingItems
3608
+ kpRatingItem (repeated)
3609
+ ```
3610
+
3611
+ Props of its root:
3612
+
3613
+ - `[(value)]: number`: How much is given, from 0 (none) to `count`; a half where `allowHalf` is set.
3614
+ - `defaultValue?: number`: The value it starts with, when the caller does not hold `value`. Read once. Default `0`.
3615
+ - `count?: number`: How many items there are. Default 5.
3616
+ - `allowHalf?: boolean`: Whether half an item can be given: by the half of it a pointer is over, and by the arrows.
3617
+ - `disabled?: boolean`: Disabled: it cannot be changed.
3618
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
3619
+ - `required?: boolean`: Needed: in a `Field`, giving none is then invalid.
3620
+ - `name?: string`: With a name, the value is submitted with the form around it; none is submitted as empty.
3621
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
3622
+ - `(valueChanged): { value: number; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
3623
+ - `(hoverChanged): number | null`: The value the pointer is over, and `null` as it leaves: nothing is chosen by it.
3624
+
3625
+ Each part, and its own props:
3626
+
3627
+ - `[kpRating]` is `KpRating`. `exportAs: "kpRating"`. On the element that holds the items. `[(value)]` is how much is given, from 0 to `count`. It draws the hidden input a form reads, as its last child. Its props are above.
3628
+ - `[kpRatingItems]` is `KpRatingItems`. Structural: written `*kpRatingItems`. Its template is given the entry: `let entry` is a `number`. `<ng-container *kpRatingItems="let place">`: once for each item, from 1 to `count`.
3629
+ - `[kpRatingItem]` is `KpRatingItem`.
3630
+ - `place: number`: Required. Its place among the items, from 1.
3631
+
3632
+ Attributes and CSS variables, by part:
3633
+
3634
+ - root: The items, as one choice: a radio group. It holds the hidden input a form reads.
3635
+ - `data-disabled`: Present when it is disabled.
3636
+ - `data-readonly`: Present when it is shown and cannot be changed.
3637
+ - `data-required`: Present when a value is needed.
3638
+ - `data-hovering`: Present while a pointer is over an item.
3639
+ - item: One item (a star): pressed, the value is its place, or half of it.
3640
+ - `data-checked`: Present on the item that holds the value.
3641
+ - `data-filled`: Present on every item up to the value drawn: the one a pointer is over, or the one held.
3642
+ - `data-half`: Present on the item the value drawn fills by half.
3643
+ - `data-disabled`: Present when it is disabled.
3644
+ - `data-readonly`: Present when it is shown and cannot be changed.
3645
+ - `data-required`: Present when a value is needed.
3646
+
2805
3647
  ### Resizable
2806
3648
 
2807
3649
  ```
@@ -2872,7 +3714,7 @@ Each part, and its own props:
2872
3714
 
2873
3715
  - `[kpScrollArea]` is `KpScrollArea`. `exportAs: "kpScrollArea"`.
2874
3716
  - `[kpScrollAreaViewport]` is `KpScrollAreaViewport`.
2875
- - `[kpScrollAreaContent]` is `KpScrollAreaContent`. A box around what is scrolled, as wide as what it holds. Not needed to measure: the viewport's children are watched as they are. For content whose own box does not grow with what is in it (a block holding a wider table, or bare text).
3717
+ - `[kpScrollAreaContent]` is `KpScrollAreaContent`.
2876
3718
  - `[kpScrollAreaScrollbar]` is `KpScrollAreaScrollbar`. Structural: written `*kpScrollAreaScrollbar`. `<div *kpScrollAreaScrollbar="'horizontal'">`: in the page while there is something to scroll its way (`vertical` when no orientation is given).
2877
3719
  - `*kpScrollAreaScrollbar: Orientation | ""`: The directive's own value: `*kpScrollAreaScrollbar="…"`. Which way it scrolls: `'horizontal'`, or `'vertical'` when none is given.
2878
3720
  - `keepMounted?: boolean`: Written after the directive's value: `*kpScrollAreaScrollbar="…; keepMounted: …"`. In the page even while there is nothing to scroll its way.
@@ -2884,6 +3726,10 @@ Attributes and CSS variables, by part:
2884
3726
  - 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.
2885
3727
  - `data-has-overflow-x`: Present when there is more to see sideways.
2886
3728
  - `data-has-overflow-y`: Present when there is more to see up or down.
3729
+ - `data-overflow-x-start`: Present when there is more to scroll to towards the start of a line.
3730
+ - `data-overflow-x-end`: Present when there is more to scroll to towards the end of a line.
3731
+ - `data-overflow-y-start`: Present when there is more to scroll to above.
3732
+ - `data-overflow-y-end`: Present when there is more to scroll to below.
2887
3733
  - `data-scrolling`: Present while it is being scrolled, and a moment after.
2888
3734
  - `data-hovering`: Present while the pointer is over the area.
2889
3735
  - `--scroll-area-corner-width`: The width of the corner: the vertical scrollbar's, while both scrollbars and the corner are in the page.
@@ -2891,31 +3737,55 @@ Attributes and CSS variables, by part:
2891
3737
  - viewport: The element that scrolls.
2892
3738
  - `data-has-overflow-x`: Present when there is more to see sideways.
2893
3739
  - `data-has-overflow-y`: Present when there is more to see up or down.
3740
+ - `data-overflow-x-start`: Present when there is more to scroll to towards the start of a line.
3741
+ - `data-overflow-x-end`: Present when there is more to scroll to towards the end of a line.
3742
+ - `data-overflow-y-start`: Present when there is more to scroll to above.
3743
+ - `data-overflow-y-end`: Present when there is more to scroll to below.
3744
+ - `data-scrolling`: Present while it is being scrolled, and a moment after.
3745
+ - `--scroll-area-overflow-x-start`: How far the view is from the start of a line, to fade that edge by: `0px` at it.
3746
+ - `--scroll-area-overflow-x-end`: How far the view is from the end of a line: `0px` at it.
3747
+ - `--scroll-area-overflow-y-start`: How far the view is from the top: `0px` at it.
3748
+ - `--scroll-area-overflow-y-end`: How far the view is from the bottom: `0px` at it.
3749
+ - content: A box around what is scrolled, as wide as what it holds. Not needed to measure: the viewport's children are watched as they are. For content whose own box does not grow with what is in it (a block holding a wider table, or bare text).
3750
+ - `data-has-overflow-x`: Present when there is more to see sideways.
3751
+ - `data-has-overflow-y`: Present when there is more to see up or down.
3752
+ - `data-overflow-x-start`: Present when there is more to scroll to towards the start of a line.
3753
+ - `data-overflow-x-end`: Present when there is more to scroll to towards the end of a line.
3754
+ - `data-overflow-y-start`: Present when there is more to scroll to above.
3755
+ - `data-overflow-y-end`: Present when there is more to scroll to below.
2894
3756
  - `data-scrolling`: Present while it is being scrolled, and a moment after.
2895
3757
  - scrollbar: A scrollbar's track, placed along its edge of the area. In the page while there is something to scroll its way.
2896
3758
  - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
2897
3759
  - `data-hovering`: Present while the pointer is over the area.
2898
3760
  - `data-scrolling`: Present while the area is scrolled its way.
3761
+ - `data-has-overflow-x`: Present when there is more to see sideways.
3762
+ - `data-has-overflow-y`: Present when there is more to see up or down.
3763
+ - `data-overflow-x-start`: Present when there is more to scroll to towards the start of a line.
3764
+ - `data-overflow-x-end`: Present when there is more to scroll to towards the end of a line.
3765
+ - `data-overflow-y-start`: Present when there is more to scroll to above.
3766
+ - `data-overflow-y-end`: Present when there is more to scroll to below.
2899
3767
  - `--scroll-area-thumb-height`: A vertical thumb's height.
2900
3768
  - `--scroll-area-thumb-width`: A horizontal thumb's width.
2901
3769
  - thumb: The part of a scrollbar that shows where the view is, and can be dragged. As long as its scrollbar's variable says.
2902
3770
  - `data-orientation="horizontal | vertical"`: Which way the scrollbar scrolls.
3771
+ - `data-scrolling`: Present while the area is scrolled its way.
2903
3772
 
2904
3773
  ### Select
2905
3774
 
2906
3775
  ```
2907
- import { KpSelect, KpSelectTrigger, KpSelectValue, KpSelectPortal, KpSelectPositioner, KpSelectPopup, KpSelectList, KpSelectScrollUpArrow, KpSelectScrollDownArrow, KpSelectGroup, KpSelectGroupLabel, KpSelectSeparator, KpSelectItem, KpSelectItemText, KpSelectItemIndicator, KpSelectInput } from "@kirana-ui/angular"
3776
+ import { KpSelect, KpSelectTrigger, KpSelectValue, KpSelectPortal, KpSelectBackdrop, KpSelectPositioner, KpSelectPopup, KpSelectList, KpSelectScrollUpArrow, KpSelectScrollDownArrow, KpSelectGroup, KpSelectGroupLabel, KpSelectSeparator, KpSelectItem, KpSelectItemText, KpSelectItemIndicator, KpSelectInput } from "@kirana-ui/angular"
2908
3777
  ```
2909
3778
 
2910
- Parts: `[kpSelect]`, `[kpSelectTrigger]`, `[kpSelectValue]`, `[kpSelectPortal]`, `[kpSelectPositioner]`, `[kpSelectPopup]`, `[kpSelectList]`, `[kpSelectScrollUpArrow]`, `[kpSelectScrollDownArrow]`, `[kpSelectGroup]`, `[kpSelectGroupLabel]`, `[kpSelectSeparator]`, `[kpSelectItem]`, `[kpSelectItemText]`, `[kpSelectItemIndicator]`.
3779
+ Parts: `[kpSelect]`, `[kpSelectTrigger]`, `[kpSelectValue]`, `[kpSelectPortal]`, `[kpSelectBackdrop]`, `[kpSelectPositioner]`, `[kpSelectPopup]`, `[kpSelectList]`, `[kpSelectScrollUpArrow]`, `[kpSelectScrollDownArrow]`, `[kpSelectGroup]`, `[kpSelectGroupLabel]`, `[kpSelectSeparator]`, `[kpSelectItem]`, `[kpSelectItemText]`, `[kpSelectItemIndicator]`.
2911
3780
 
2912
3781
  Anatomy:
2913
3782
 
2914
3783
  ```
2915
3784
  kpSelect
2916
3785
  kpSelectTrigger
2917
- *kpSelectValue
3786
+ *kpSelectValue (or kpSelectValue as an attribute)
2918
3787
  *kpSelectPortal
3788
+ kpSelectBackdrop (optional)
2919
3789
  kpSelectPositioner
2920
3790
  kpSelectPopup
2921
3791
  *kpSelectScrollUpArrow
@@ -2932,8 +3802,8 @@ kpSelect
2932
3802
 
2933
3803
  Props of its root:
2934
3804
 
2935
- - `[(value)]: Value | null`: The chosen value; `null` is "none".
2936
- - `defaultValue?: NoInfer<Value> | null`: The value it starts with, when the caller does not hold `value`. Read once.
3805
+ - `[(value)]: (Multiple extends true ? readonly Value[] : Value | null)`: With `[multiple]="true"`, the chosen values.
3806
+ - `defaultValue?: NoInfer<Multiple extends true ? readonly Value[] : Value | null>`: The value it starts with (with `multiple`, the values), when the caller does not hold `value`. Read once.
2937
3807
  - `[(open)]: boolean`: Whether the list is open, when the caller holds it.
2938
3808
  - `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
2939
3809
  - `disabled?: boolean`: Disabled: it cannot be changed.
@@ -2942,23 +3812,28 @@ Props of its root:
2942
3812
  - `name?: string`: With a name, the value is submitted with the form around it.
2943
3813
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
2944
3814
  - `items?: ItemLabels<Value>`: The values' labels: a list of values with their labels, or the labels by value.
2945
- - `multiple?: boolean`: Several values: they are `values`, not `value`.
2946
- - `[(values)]: readonly Value[]`: With `multiple`: the chosen values, in the order they were chosen.
2947
- - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with, when the caller does not hold `values`. Read once.
2948
- - `(valuesChanged): { values: Value[]; details: ChangeDetails }`: With `multiple`: heard as a value is about to be added or taken away, with the values there would then be: `details.cancel()` keeps them as they were.
3815
+ - `multiple?: Multiple`: Several values: `value` and `valueChanged` then hold a list. Bound to `true` (`[multiple]="true"`), it types them so. The bare attribute, or a bound boolean, works the same, and then `value` takes either and `valueChanged` is typed as one value: Angular's compiler gives a type parameter it cannot infer `any`, so only a literal `true` says it.
3816
+ - `[(values)]: readonly Value[]`: With `multiple`: the chosen values.
3817
+ - `defaultValues?: readonly Value[]`: With `multiple`: the values it starts with.
3818
+ - `(valuesChanged): { values: Value[]; details: ChangeDetails }`: With `multiple`: heard as a value is about to be added or taken away.
2949
3819
  - `virtualized?: ListCollection`: Every row, when only some are in the page: each item is then given its `index`.
2950
- - `(valueChanged): { value: Value | null; details: ChangeDetails }`: Heard as a value is about to be chosen: `details.cancel()` keeps it as it was.
3820
+ - `presentation?: Presentation`: How the list opens: `"sheet"` from the bottom edge, modal, with a backdrop; `"auto"` a sheet on a narrow touch screen. Default `"popup"`.
3821
+ - `sheetBelow?: number`: With `presentation="auto"`: the viewport's width under which a coarse pointer opens a sheet. Default 640.
3822
+ - `itemToStringLabel?: (value: Value) => string`: For values that are objects: the text the trigger shows for one, and what typing matches.
3823
+ - `itemToStringValue?: (value: Value) => string`: For values that are objects: the text the form is sent for one.
3824
+ - `(valueChanged): { value: true extends Multiple ? (false extends Multiple ? Value | null : Value[]) : Value | null details: ChangeDetails }`: Heard as a value is about to be chosen (with `multiple`, added or taken away, with the values there would then be): `details.cancel()` keeps it as it was.
2951
3825
  - `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
2952
3826
 
2953
3827
  Each part, and its own props:
2954
3828
 
2955
- - `[kpSelect]` is `KpSelect`. `exportAs: "kpSelect"`. Generic: `<Value = unknown>`. Holds the select: its value and whether the list is open. Its props are above.
2956
- - `[kpSelectTrigger]` is `KpSelectTrigger`.
2957
- - `[kpSelectValue]` is `KpSelectValue`. Structural: written `*kpSelectValue`. Its template is given the entry: `let entry` is a `SelectShown`. `<span kpSelectValue>` shows the chosen value's label, or `placeholder` while nothing is chosen; with `multiple`, the chosen labels with commas between. `<span *kpSelectValue="let shown">` draws its own content instead, with what is chosen: `shown.value` and `shown.label`, with `multiple` `shown.values` and `shown.labels`, in the items' order.
3829
+ - `[kpSelect]` is `KpSelect`. `exportAs: "kpSelect"`. Generic: `<Value = unknown, Multiple extends boolean = false>`. Holds the select: its value and whether the list is open. Its props are above.
3830
+ - `[kpSelectTrigger]` is `KpSelectTrigger`. `<button kpSelectTrigger>`. A select with a name, its own or its field's, submits its value through a hidden input drawn right after the trigger, where the other adapters draw it after the root's content.
3831
+ - `[kpSelectValue]` is `KpSelectValue`. Structural or not: written `*kpSelectValue`, or as an attribute, `kpSelectValue`. Its template is given the entry: `let entry` is a `SelectShown`. `<span kpSelectValue>` shows the chosen value's label, or `placeholder` while nothing is chosen; with `multiple`, the chosen labels with commas between. An element with content of its own says that instead. `<span *kpSelectValue="let shown">` draws its own content instead, with what is chosen: `shown.value` and `shown.label`, with `multiple` `shown.values` and `shown.labels`, in the items' order.
2958
3832
  - `placeholder?: string`: Shown while nothing is chosen.
2959
3833
  - `[kpSelectPortal]` is `KpSelectPortal`. Structural: written `*kpSelectPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
3834
+ - `[kpSelectBackdrop]` is `KpSelectBackdrop`. `<div kpSelectBackdrop>`, in the portal: what lies over the page behind the list.
2960
3835
  - `[kpSelectPositioner]` is `KpSelectPositioner`. Takes the positioner options ("Positioner options", above).
2961
- - `alignItemWithTrigger?: boolean`: The list opens over its trigger, the chosen item's text on the trigger's own, where there is room and unless a finger opened it.
3836
+ - `alignItemWithTrigger?: boolean`: The list opens over its trigger, the chosen item's text on the trigger's own, where there is room and unless a finger opened it. While it lies there the page's scroll is held (its scrollbar's room kept), and a scroll of a box around the trigger closes the list (`"ancestor-scroll"`), as a change of the window's size does (`"window-resize"`).
2962
3837
  - `[kpSelectPopup]` is `KpSelectPopup`.
2963
3838
  - `[kpSelectList]` is `KpSelectList`. The items' own box inside the popup, when the popup also holds scroll arrows.
2964
3839
  - `[kpSelectScrollUpArrow]` is `KpSelectScrollUpArrow`. Structural: written `*kpSelectScrollUpArrow`. `<div *kpSelectScrollUpArrow>`: in the page while there is more of the list above. It scrolls the list while the pointer moves over it.
@@ -2973,22 +3848,44 @@ Each part, and its own props:
2973
3848
  - `index?: number`: Its place among all the rows, in a virtualized list.
2974
3849
  - `[kpSelectItemText]` is `KpSelectItemText`. The item's name: what the trigger shows once it is chosen.
2975
3850
  - `[kpSelectItemIndicator]` is `KpSelectItemIndicator`. Structural: written `*kpSelectItemIndicator`. `<span *kpSelectItemIndicator>`: in the page while its item is the chosen one.
2976
- - `input[kpSelectInput]` is `KpSelectInput`. `<input kpSelectInput>`: submits the value with the form around it. Angular only.
3851
+ - `input[kpSelectInput]` is `KpSelectInput`. `<input kpSelectInput>`: submits the value with the form around it. A page that writes one keeps it, and the trigger then draws none. Angular only.
2977
3852
 
2978
3853
  Attributes and CSS variables, by part:
2979
3854
 
2980
3855
  - trigger: The button that shows the value and opens the list.
2981
3856
  - `data-popup-open`: Present when the list is open.
3857
+ - `data-pressed`: Present while its popup is open: it stays pressed, as a button held down.
3858
+ - `data-popup-side="top | right | bottom | left | inline-start | inline-end | none"`: While the list is in the page: the side of the trigger it is on, after any flip; `none` when it lies over the trigger. Not said while it opens as a sheet.
2982
3859
  - `data-placeholder`: Present while nothing is chosen.
2983
3860
  - `data-disabled`: Present when it is disabled.
2984
3861
  - `data-readonly`: Present when it can be read but not changed.
3862
+ - `data-required`: Present when the form needs it.
3863
+ - `data-touched`: Inside a Field: present once focus has left the control.
3864
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
3865
+ - `data-filled`: Inside a Field: present while the control has a value.
3866
+ - `data-focused`: Inside a Field: present while the control has focus.
3867
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
3868
+ - `data-invalid`: Inside a Field: present while the value is wrong.
2985
3869
  - value: The chosen value's label, or the placeholder. With several values, their labels with commas between.
2986
3870
  - `data-placeholder`: Present while nothing is chosen.
2987
- - positioner: Places the list against the trigger. It carries the geometry.
3871
+ - backdrop: The layer over the page behind the list: a press on it closes the list.
3872
+ - `data-open`: Present when it is open.
3873
+ - `data-closed`: Present when it is closed.
3874
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
3875
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
3876
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
3877
+ - `data-swiping`: Present while the sheet is dragged.
3878
+ - `data-swipe-dismiss`: Present once a drag has closed it.
3879
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
3880
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
3881
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
3882
+ - positioner: Places the list against the trigger. It carries the geometry. As a sheet it is not placed, and carries none.
2988
3883
  - `data-open`: Present when it is open.
2989
3884
  - `data-closed`: Present when it is closed.
2990
3885
  - `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.
2991
3886
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3887
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
3888
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
2992
3889
  - `--anchor-width`: The anchor's width.
2993
3890
  - `--anchor-height`: The anchor's height.
2994
3891
  - `--available-width`: The width between the anchor and the edge of the viewport.
@@ -3006,13 +3903,20 @@ Attributes and CSS variables, by part:
3006
3903
  - `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.
3007
3904
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
3008
3905
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
3009
- - popup: The list of items.
3906
+ - popup: The list of items. As a sheet, a design moves it by what it says of the drag, and gives it `touch-action: none` where a finger drags it.
3010
3907
  - `data-open`: Present when it is open.
3011
3908
  - `data-closed`: Present when it is closed.
3012
3909
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
3013
3910
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
3014
- - `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.
3911
+ - `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.
3015
3912
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3913
+ - `data-presentation="popup | sheet"`: How the list opened: placed against its trigger, or as a sheet from the bottom edge.
3914
+ - `data-swiping`: Present while the sheet is dragged.
3915
+ - `data-swipe-dismiss`: Present once a drag has closed it.
3916
+ - `--drawer-swipe-movement-x`: As a sheet: how far it has been dragged across, always 0px.
3917
+ - `--drawer-swipe-movement-y`: As a sheet: how far it has been dragged down.
3918
+ - `--drawer-swipe-progress`: As a sheet: how far it has been dragged, of its own height: 0 to 1.
3919
+ - `--drawer-swipe-strength`: As a sheet, once let go: 0.1 to 1, the share of the design's own time it should take to come to rest.
3016
3920
  - item: One choice in the list.
3017
3921
  - `data-selected`: Present on the chosen item, or on each of several.
3018
3922
  - `data-highlighted`: Present on the item the pointer or the keyboard is on.
@@ -3078,7 +3982,7 @@ Props of its root:
3078
3982
  Each part, and its own props:
3079
3983
 
3080
3984
  - `[kpSlider]` is `KpSlider`. `exportAs: "kpSlider"`. Generic: `<Value extends SliderValue = SliderValue>`. Its props are above.
3081
- - `[kpSliderValue]` is `KpSliderValue`. Shows the written value.
3985
+ - `[kpSliderValue]` is `KpSliderValue`. Shows the written value, unless the element has content of its own.
3082
3986
  - `[kpSliderControl]` is `KpSliderControl`.
3083
3987
  - `[kpSliderTrack]` is `KpSliderTrack`.
3084
3988
  - `[kpSliderIndicator]` is `KpSliderIndicator`.
@@ -3092,26 +3996,56 @@ Attributes and CSS variables, by part:
3092
3996
  - `data-disabled`: Present when it is disabled.
3093
3997
  - `data-readonly`: Present when it can be read but not changed.
3094
3998
  - `data-dragging`: Present while a pointer holds a thumb.
3999
+ - `data-touched`: Inside a Field: present once focus has left the control.
4000
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
4001
+ - `data-filled`: Inside a Field: present while the control has a value.
4002
+ - `data-focused`: Inside a Field: present while the control has focus.
4003
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
4004
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3095
4005
  - value: The value, written.
3096
4006
  - `data-orientation="horizontal | vertical"`: The way the track runs.
3097
4007
  - `data-disabled`: Present when it is disabled.
3098
4008
  - `data-readonly`: Present when it can be read but not changed.
3099
4009
  - `data-dragging`: Present while a pointer holds a thumb.
4010
+ - `data-touched`: Inside a Field: present once focus has left the control.
4011
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
4012
+ - `data-filled`: Inside a Field: present while the control has a value.
4013
+ - `data-focused`: Inside a Field: present while the control has focus.
4014
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
4015
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3100
4016
  - control: What a pointer presses and drags on. It holds the track and the thumbs.
3101
4017
  - `data-orientation="horizontal | vertical"`: The way the track runs.
3102
4018
  - `data-disabled`: Present when it is disabled.
3103
4019
  - `data-readonly`: Present when it can be read but not changed.
3104
4020
  - `data-dragging`: Present while a pointer holds a thumb.
4021
+ - `data-touched`: Inside a Field: present once focus has left the control.
4022
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
4023
+ - `data-filled`: Inside a Field: present while the control has a value.
4024
+ - `data-focused`: Inside a Field: present while the control has focus.
4025
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
4026
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3105
4027
  - track: The whole range.
3106
4028
  - `data-orientation="horizontal | vertical"`: The way the track runs.
3107
4029
  - `data-disabled`: Present when it is disabled.
3108
4030
  - `data-readonly`: Present when it can be read but not changed.
3109
4031
  - `data-dragging`: Present while a pointer holds a thumb.
4032
+ - `data-touched`: Inside a Field: present once focus has left the control.
4033
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
4034
+ - `data-filled`: Inside a Field: present while the control has a value.
4035
+ - `data-focused`: Inside a Field: present while the control has focus.
4036
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
4037
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3110
4038
  - indicator: The filled part: up to the thumb, or from the first thumb to the last. Its place and length are written on it.
3111
4039
  - `data-orientation="horizontal | vertical"`: The way the track runs.
3112
4040
  - `data-disabled`: Present when it is disabled.
3113
4041
  - `data-readonly`: Present when it can be read but not changed.
3114
4042
  - `data-dragging`: Present while a pointer holds a thumb.
4043
+ - `data-touched`: Inside a Field: present once focus has left the control.
4044
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
4045
+ - `data-filled`: Inside a Field: present while the control has a value.
4046
+ - `data-focused`: Inside a Field: present while the control has focus.
4047
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
4048
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3115
4049
  - `--start-position`: With thumbs that stay inside the control: where the filled part starts, or with one thumb where it ends.
3116
4050
  - `--relative-size`: With thumbs that stay inside the control and a range: the filled part's length.
3117
4051
  - 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.
@@ -3119,9 +4053,102 @@ Attributes and CSS variables, by part:
3119
4053
  - `data-disabled`: Present when it is disabled.
3120
4054
  - `data-readonly`: Present when it can be read but not changed.
3121
4055
  - `data-dragging`: Present while a pointer holds a thumb.
4056
+ - `data-touched`: Inside a Field: present once focus has left the control.
4057
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
4058
+ - `data-filled`: Inside a Field: present while the control has a value.
4059
+ - `data-focused`: Inside a Field: present while the control has focus.
4060
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
4061
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3122
4062
  - `data-index`: Which thumb it is, from 0.
3123
4063
  - `--position`: With thumbs that stay inside the control: where the thumb's centre is.
3124
4064
 
4065
+ ### Steps
4066
+
4067
+ ```
4068
+ import { KpSteps, KpStepsList, KpStepsItem, KpStepsTrigger, KpStepsIndicator, KpStepsSeparator, KpStepsContent, KpStepsCompleted, KpStepsPrevious, KpStepsNext } from "@kirana-ui/angular"
4069
+ ```
4070
+
4071
+ Parts: `[kpSteps]`, `[kpStepsList]`, `[kpStepsItem]`, `[kpStepsTrigger]`, `[kpStepsIndicator]`, `[kpStepsSeparator]`, `[kpStepsContent]`, `[kpStepsCompleted]`, `[kpStepsPrevious]`, `[kpStepsNext]`.
4072
+
4073
+ Anatomy:
4074
+
4075
+ ```
4076
+ kpSteps
4077
+ kpStepsList
4078
+ kpStepsItem (repeated)
4079
+ kpStepsTrigger
4080
+ kpStepsIndicator (optional)
4081
+ kpStepsSeparator (optional)
4082
+ kpStepsContent (repeated)
4083
+ kpStepsCompleted (optional)
4084
+ kpStepsPrevious (optional)
4085
+ kpStepsNext (optional)
4086
+ ```
4087
+
4088
+ Props of its root:
4089
+
4090
+ - `[(step)]: number`: The step shown, from 0. Equal to `count`, every step is done.
4091
+ - `defaultStep?: number`: The step it starts at, when the caller does not hold `step`. Read once. Default `0`.
4092
+ - `count?: number`: How many steps there are. Left out, the items in the page, once they are there; until then (and on a server) none is the last.
4093
+ - `linear?: boolean`: In order only: a step that is not done yet cannot be gone to by its trigger.
4094
+ - `orientation?: Orientation`: Whether the steps are laid out across (the default) or down: the arrows follow.
4095
+ - `(stepChanged): { step: number; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the step.
4096
+
4097
+ Each part, and its own props:
4098
+
4099
+ - `[kpSteps]` is `KpSteps`. `exportAs: "kpSteps"`. On the element that holds the steps. `[(step)]` is the step shown, from 0; equal to `count`, every step is done. Its props are above.
4100
+ - `[kpStepsList]` is `KpStepsList`. The row of steps.
4101
+ - `[kpStepsItem]` is `KpStepsItem`. One step of the row, around its trigger and its separator.
4102
+ - `index?: number`: Which step it is, from 0. Left out, its place among the items in the page, once it is there: give it on a page a server draws, which cannot count them.
4103
+ - `[kpStepsTrigger]` is `KpStepsTrigger`. What names a step and goes to it.
4104
+ - `[kpStepsIndicator]` is `KpStepsIndicator`. A step's mark: its number, or a tick once it is done.
4105
+ - `[kpStepsSeparator]` is `KpStepsSeparator`. The line from a step to the next.
4106
+ - `[kpStepsContent]` is `KpStepsContent`. What a step shows: in the page always, hidden unless its step is the one shown.
4107
+ - `index: number`: Required. The step it is shown for, from 0.
4108
+ - `[kpStepsCompleted]` is `KpStepsCompleted`. What is shown once every step is done.
4109
+ - `[kpStepsPrevious]` is `KpStepsPrevious`.
4110
+ - `[kpStepsNext]` is `KpStepsNext`.
4111
+
4112
+ Attributes and CSS variables, by part:
4113
+
4114
+ - root: A task in steps, taken in order.
4115
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
4116
+ - `data-complete`: Present once every step is done.
4117
+ - list: The row of steps: the arrows move between their triggers.
4118
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
4119
+ - item: One step of the row, around its trigger and its separator.
4120
+ - `data-current`: Present on the step that is shown.
4121
+ - `data-complete`: Present on a step that is done: one before the step shown.
4122
+ - `data-incomplete`: Present on a step still to come.
4123
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
4124
+ - trigger: Names a step, and goes to it when pressed.
4125
+ - `data-current`: Present on the step that is shown.
4126
+ - `data-complete`: Present on a step that is done: one before the step shown.
4127
+ - `data-incomplete`: Present on a step still to come.
4128
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
4129
+ - `data-disabled`: Present when it is disabled.
4130
+ - indicator: A step's mark: its number, or a tick once it is done.
4131
+ - `data-current`: Present on the step that is shown.
4132
+ - `data-complete`: Present on a step that is done: one before the step shown.
4133
+ - `data-incomplete`: Present on a step still to come.
4134
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
4135
+ - separator: The line from a step to the next.
4136
+ - `data-current`: Present on the step that is shown.
4137
+ - `data-complete`: Present on a step that is done: one before the step shown.
4138
+ - `data-incomplete`: Present on a step still to come.
4139
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
4140
+ - content: What a step shows: hidden unless its step is the one shown.
4141
+ - `data-current`: Present on the step that is shown.
4142
+ - `data-complete`: Present on a step that is done: one before the step shown.
4143
+ - `data-incomplete`: Present on a step still to come.
4144
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
4145
+ - completed: What is shown once every step is done.
4146
+ - `data-orientation="horizontal | vertical"`: Whether the steps are laid out across or down.
4147
+ - previous: Goes to the step before.
4148
+ - `data-disabled`: Present when it is disabled.
4149
+ - next: Goes to the step after; from the last, to all of them done.
4150
+ - `data-disabled`: Present when it is disabled.
4151
+
3125
4152
  ### Switch
3126
4153
 
3127
4154
  ```
@@ -3147,6 +4174,7 @@ Props of its root:
3147
4174
  - `name?: string`: With a name, the control is submitted with the form around it when it is checked.
3148
4175
  - `form?: string`: The id of the form the control belongs to, when it is not inside it.
3149
4176
  - `value?: string`: What is submitted. Default `"on"`, as a native checkbox's.
4177
+ - `kpId?: string`: The id of the switch's hidden native checkbox, not of the switch: a `<label for>` names it. Inside a `Field`, that input takes the field's id instead.
3150
4178
  - `(checkedChanged): { checked: boolean; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
3151
4179
 
3152
4180
  Each part, and its own props:
@@ -3162,12 +4190,24 @@ Attributes and CSS variables, by part:
3162
4190
  - `data-disabled`: Present when it is disabled.
3163
4191
  - `data-readonly`: Present when it can be read but not changed.
3164
4192
  - `data-required`: Present when the form needs it.
4193
+ - `data-touched`: Inside a Field: present once focus has left the control.
4194
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
4195
+ - `data-filled`: Inside a Field: present while the control has a value.
4196
+ - `data-focused`: Inside a Field: present while the control has focus.
4197
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
4198
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3165
4199
  - thumb: The knob that moves along the track.
3166
4200
  - `data-checked`: Present when it is checked.
3167
4201
  - `data-unchecked`: Present when it is not checked.
3168
4202
  - `data-disabled`: Present when it is disabled.
3169
4203
  - `data-readonly`: Present when it can be read but not changed.
3170
4204
  - `data-required`: Present when the form needs it.
4205
+ - `data-touched`: Inside a Field: present once focus has left the control.
4206
+ - `data-dirty`: Inside a Field: present while the value is not the one it started with.
4207
+ - `data-filled`: Inside a Field: present while the control has a value.
4208
+ - `data-focused`: Inside a Field: present while the control has focus.
4209
+ - `data-valid`: Inside a Field: present once the value has been checked and found right.
4210
+ - `data-invalid`: Inside a Field: present while the value is wrong.
3171
4211
 
3172
4212
  ### Tabs
3173
4213
 
@@ -3199,7 +4239,8 @@ Each part, and its own props:
3199
4239
  - `[kpTabs]` is `KpTabs`. `exportAs: "kpTabs"`. Generic: `<Value = unknown>`. Its props are above.
3200
4240
  - `[kpTabsList]` is `KpTabsList`.
3201
4241
  - `activateOnFocus?: boolean`: Whether moving focus onto a tab with the arrows activates it. Default `false`.
3202
- - `loop?: boolean`: Whether the arrows wrap from the last tab to the first. Default `true`.
4242
+ - `loopFocus?: boolean`: Whether the arrows wrap from the last tab to the first. Default `true`.
4243
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
3203
4244
  - `[kpTabsTab]` is `KpTabsTab`.
3204
4245
  - `value: unknown`: Required. What the tabs' value is while this tab is the active one.
3205
4246
  - `disabled?: boolean`: Disables this tab: it cannot be chosen.
@@ -3220,6 +4261,7 @@ Attributes and CSS variables, by part:
3220
4261
  - `data-active`: Present on the tab whose panel is shown.
3221
4262
  - `data-disabled`: Present when it is disabled.
3222
4263
  - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
4264
+ - `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.
3223
4265
  - indicator: A mark for the active tab: it carries that tab's position and size.
3224
4266
  - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
3225
4267
  - `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.
@@ -3231,11 +4273,168 @@ Attributes and CSS variables, by part:
3231
4273
  - `--active-tab-height`: The active tab's height.
3232
4274
  - panel: A tab's content. In the page while its tab is active, and through its exit.
3233
4275
  - `data-hidden`: Present while its tab is not the active one.
4276
+ - `data-index`: The panel's place among the panels in the page, from 0, once it is in the page.
3234
4277
  - `data-orientation="horizontal | vertical"`: The way the tabs are laid out.
3235
4278
  - `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.
3236
4279
  - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
3237
4280
  - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
3238
4281
 
4282
+ ### TagsInput
4283
+
4284
+ ```
4285
+ import { KpTagsInput, KpTagsInputList, KpTagsInputItems, KpTagsInputItem, KpTagsInputItemText, KpTagsInputItemInput, KpTagsInputItemRemove, KpTagsInputInput, KpTagsInputClear } from "@kirana-ui/angular"
4286
+ ```
4287
+
4288
+ Parts: `[kpTagsInput]`, `[kpTagsInputList]`, `[kpTagsInputItems]`, `[kpTagsInputItem]`, `[kpTagsInputItemText]`, `input[kpTagsInputItemInput]`, `[kpTagsInputItemRemove]`, `input[kpTagsInputInput]`, `[kpTagsInputClear]`.
4289
+
4290
+ Anatomy:
4291
+
4292
+ ```
4293
+ kpTagsInput
4294
+ kpTagsInputList
4295
+ *kpTagsInputItems
4296
+ kpTagsInputItem (repeated)
4297
+ kpTagsInputItemText
4298
+ input[kpTagsInputItemInput] (optional)
4299
+ kpTagsInputItemRemove (optional)
4300
+ input[kpTagsInputInput]
4301
+ kpTagsInputClear (optional)
4302
+ ```
4303
+
4304
+ Props of its root:
4305
+
4306
+ - `[(value)]: readonly string[]`: The tags, in order.
4307
+ - `defaultValue?: readonly string[]`: The tags it starts with, when the caller does not hold `value`. Read once.
4308
+ - `validate?: (text: string, value: readonly string[]) => boolean`: Whether a text may be a tag. Asked after the text is trimmed, and not for an empty one.
4309
+ - `max?: number`: How many tags it holds at most.
4310
+ - `allowDuplicates?: boolean`: Whether the same text may be a tag twice. Default `false`.
4311
+ - `delimiter?: string | RegExp | null`: What ends a tag as it is typed or pasted, beside Enter. Default `","`. `null` for nothing.
4312
+ - `addOnBlur?: boolean`: Whether what is typed becomes a tag as focus leaves the input. Default `false`.
4313
+ - `addOnPaste?: boolean`: Whether a pasted text is cut into tags at its delimiters and line ends. Default `true`.
4314
+ - `editable?: boolean`: Whether a tag can be edited in place, by two presses or Enter on it. Default `true`.
4315
+ - `disabled?: boolean`: Disabled: nothing can be added or taken away.
4316
+ - `readOnly?: boolean`: Shown as they are, focusable, not changeable.
4317
+ - `required?: boolean`: Needed: in a `Field`, holding none is then invalid.
4318
+ - `name?: string`: With a name, each tag is submitted under it with the form around them.
4319
+ - `form?: string`: The id of the form the control belongs to, when it is not inside it.
4320
+ - `(valueChanged): { value: string[]; details: ChangeDetails }`: The tags about to change; `details.cancel()` keeps them as they were.
4321
+ - `(valueInvalid): { text: string; reason: "duplicate" | "max" | "invalid" }`: A text that was not made a tag, and why.
4322
+
4323
+ Each part, and its own props:
4324
+
4325
+ - `[kpTagsInput]` is `KpTagsInput`. `exportAs: "kpTagsInput"`. On the element that holds the tags' parts. `[(value)]` is the tags, in order. It draws the hidden input a form reads as its last child; with a name, each tag is submitted under it. Its props are above.
4326
+ - `[kpTagsInputList]` is `KpTagsInputList`. What holds the tags: a list.
4327
+ - `[kpTagsInputItems]` is `KpTagsInputItems`. Structural: written `*kpTagsInputItems`. Its template is given the entry: `let entry` is a `TagsInputEntry`. `<span *kpTagsInputItems="let entry">`: once for each tag, kept by the tag's key.
4328
+ - `[kpTagsInputItem]` is `KpTagsInputItem`. A tag, on the element `*kpTagsInputItems` draws for it.
4329
+ - `entry: TagsInputEntry`: Required. The tag it is, as `*kpTagsInputItems` gave it.
4330
+ - `[kpTagsInputItemText]` is `KpTagsInputItemText`. Says the tag's text unless the element has content of its own. Hidden while the tag is edited.
4331
+ - `input[kpTagsInputItemInput]` is `KpTagsInputItemInput`. `<input kpTagsInputItemInput>`: where a tag is edited in place, hidden unless it is.
4332
+ - `[kpTagsInputItemRemove]` is `KpTagsInputItemRemove`. A tag's button that takes it away.
4333
+ - `input[kpTagsInputInput]` is `KpTagsInputInput`. `<input kpTagsInputInput>`: where a new tag is typed.
4334
+ - `[kpTagsInputClear]` is `KpTagsInputClear`. Takes every tag away: hidden while there is none.
4335
+
4336
+ Attributes and CSS variables, by part:
4337
+
4338
+ - root: Several short texts held as tags, and the input a new one is typed in. It holds the hidden inputs a form reads.
4339
+ - `data-disabled`: Present when it is disabled.
4340
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
4341
+ - `data-required`: Present when a tag is needed.
4342
+ - `data-focused`: Present while focus is on a tag or in the input.
4343
+ - `data-empty`: Present while it holds no tag.
4344
+ - list: What holds the tags: a list.
4345
+ - `data-disabled`: Present when it is disabled.
4346
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
4347
+ - `data-required`: Present when a tag is needed.
4348
+ - item: A tag: reached with the arrows, taken away with Backspace or Delete.
4349
+ - `data-disabled`: Present when it is disabled.
4350
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
4351
+ - `data-required`: Present when a tag is needed.
4352
+ - `data-editing`: Present while the tag is edited.
4353
+ - itemText: A tag's text: hidden while the tag is edited.
4354
+ - `data-disabled`: Present when it is disabled.
4355
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
4356
+ - `data-required`: Present when a tag is needed.
4357
+ - itemInput: Where a tag is edited in place: hidden unless it is being edited.
4358
+ - `data-disabled`: Present when it is disabled.
4359
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
4360
+ - `data-required`: Present when a tag is needed.
4361
+ - itemRemove: A tag's button that takes it away.
4362
+ - `data-disabled`: Present when it is disabled.
4363
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
4364
+ - `data-required`: Present when a tag is needed.
4365
+ - input: Where a new tag is typed. In a `Field` it is what the field's label names.
4366
+ - `data-disabled`: Present when it is disabled.
4367
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
4368
+ - `data-required`: Present when a tag is needed.
4369
+ - clear: Takes every tag away: hidden while there is none.
4370
+ - `data-disabled`: Present when it is disabled.
4371
+ - `data-readonly`: Present when the tags are shown and cannot be changed.
4372
+ - `data-required`: Present when a tag is needed.
4373
+
4374
+ ### TimeField
4375
+
4376
+ ```
4377
+ import { KpTimeField, KpTimeFieldSegments, KpTimeFieldSegment, KpTimeFieldInput } from "@kirana-ui/angular"
4378
+ ```
4379
+
4380
+ Parts: `[kpTimeField]`, `[kpTimeFieldSegments]`, `[kpTimeFieldSegment]`, `input[kpTimeFieldInput]`.
4381
+
4382
+ Anatomy:
4383
+
4384
+ ```
4385
+ kpTimeField
4386
+ *kpTimeFieldSegments
4387
+ kpTimeFieldSegment (repeated)
4388
+ input[kpTimeFieldInput]
4389
+ ```
4390
+
4391
+ Props of its root:
4392
+
4393
+ - `[(value)]: string | null`: The time typed, once all of it is: `[(value)]`.
4394
+ - `defaultValue?: string | null`: The value it starts with, when the caller does not hold `value`. Read once.
4395
+ - `granularity?: TimeGranularity`: To the minute (`HH:MM`, the default) or to the second (`HH:MM:SS`).
4396
+ - `hourCycle?: HourCycle`: A clock of 12 or 24 hours, whatever the locale's is.
4397
+ - `locale?: string`: The language and region that order the parts and say how many hours the clock has. Default `"en-US"`.
4398
+ - `min?: string`: The first time it takes: before it, it says it is invalid.
4399
+ - `max?: string`: The last time it takes.
4400
+ - `placeholders?: Partial<Record<TimeUnit, string>>`: What an empty part shows. Default: `hh`, `mm`, `ss`, and `--` for the day period.
4401
+ - `disabled?: boolean`: Disabled: it cannot be changed.
4402
+ - `readOnly?: boolean`: Shown as it is, focusable, not changeable.
4403
+ - `required?: boolean`: Needed: in a `Field`, leaving it empty is then invalid.
4404
+ - `name?: string`: The name it is submitted under, by its hidden input; in a `Field`, the field's by default.
4405
+ - `form?: string`: The id of the form it belongs to, when it is not inside it.
4406
+ - `(valueChanged): { value: string | null; details: ChangeDetails }`: Heard as the time is about to change, once all of it is typed or as it is cleared: `details.cancel()` keeps the value as it was.
4407
+
4408
+ Each part, and its own props:
4409
+
4410
+ - `[kpTimeField]` is `KpTimeField`. `exportAs: "kpTimeField"`. Its props are above.
4411
+ - `[kpTimeFieldSegments]` is `KpTimeFieldSegments`. Structural: written `*kpTimeFieldSegments`. Its template is given the entry: `let entry` is a `TimeFieldSegment`. `<span *kpTimeFieldSegments="let segment">`: once for each piece of the time.
4412
+ - `[kpTimeFieldSegment]` is `KpTimeFieldSegment`. One piece: a part that is typed, or what stands between two. It writes its own text.
4413
+ - `segment: TimeFieldSegment`: Required. The piece it is: an entry `TimeField.Segments` gave.
4414
+ - `input[kpTimeFieldInput]` is `KpTimeFieldInput`. `<input kpTimeFieldInput>`: the hidden input it is submitted by.
4415
+
4416
+ Attributes and CSS variables, by part:
4417
+
4418
+ - root: The field: a group of the time's parts.
4419
+ - `data-disabled`: Present when it is disabled.
4420
+ - `data-readonly`: Present when its value cannot be changed.
4421
+ - `data-invalid`: Present when the time is outside what it takes, is asked for and half typed, or is wrong by its field.
4422
+ - `data-touched`: In a field: present once focus has left it.
4423
+ - `data-dirty`: In a field: present while the time is not the one it began with.
4424
+ - `data-filled`: In a field: present while it holds a time.
4425
+ - `data-focused`: In a field: present while one of its parts has focus.
4426
+ - `data-valid`: In a field: present once the time was checked and found right.
4427
+ - segment: One piece of the time: a part that is typed, or what stands between two.
4428
+ - `data-segment="hour | minute | second | dayPeriod | literal"`: Which piece it is: `dayPeriod` is AM or PM, on a clock of twelve hours.
4429
+ - `data-placeholder`: Present on a part that is empty.
4430
+ - `data-disabled`: Present when it is disabled.
4431
+ - `data-invalid`: Present when the time is outside what it takes, is asked for and half typed, or is wrong by its field.
4432
+ - `data-touched`: In a field: present once focus has left it.
4433
+ - `data-dirty`: In a field: present while the time is not the one it began with.
4434
+ - `data-filled`: In a field: present while it holds a time.
4435
+ - `data-focused`: In a field: present while one of its parts has focus.
4436
+ - `data-valid`: In a field: present once the time was checked and found right.
4437
+
3239
4438
  ### Toast
3240
4439
 
3241
4440
  ```
@@ -3273,7 +4472,7 @@ Each part, and its own props:
3273
4472
  - `[kpToastContent]` is `KpToastContent`. What holds a toast's contents, when the design sizes the toast itself.
3274
4473
  - `[kpToastTitle]` is `KpToastTitle`. The toast's title, unless something is written in its element.
3275
4474
  - `[kpToastDescription]` is `KpToastDescription`. The toast's description, unless something is written in its element.
3276
- - `[kpToastClose]` is `KpToastClose`. Closes the toast.
4475
+ - `[kpToastClose]` is `KpToastClose`.
3277
4476
  - `[kpToastAction]` is `KpToastAction`. The toast's action, its label unless something is written in its element. A press tells the action (`onAction`), then closes the toast unless the action called `details.cancel()`.
3278
4477
 
3279
4478
  A page's toasts are a toaster's, made once in a module: `import { createToaster } from "@kirana-ui/angular"`, then `export const toaster = createToaster(options)` (`ToasterOptions`, under "Types"). The viewport is given it, and anything on the page adds to it: `toaster.add({ title, description, action, priority })`, `toaster.update(id, options)`, `toaster.dismiss(id)`, `toaster.promise(promise, { loading, success, error })`. What each takes and gives back is `Toaster`, `ToastOptions`, `ToastActionOptions` and `ToastRecord` under "Types".
@@ -3299,6 +4498,14 @@ Attributes and CSS variables, by part:
3299
4498
  - content: What holds a toast's contents, when the design sizes the toast itself.
3300
4499
  - `data-behind`: Present on a toast that is behind the newest.
3301
4500
  - `data-expanded`: Present while the pointer or focus is on the stack: the toasts are spread out, and wait.
4501
+ - title: What the toast is called: the title it was added with, when nothing else is written in it.
4502
+ - `data-type`: The kind the toast was added as.
4503
+ - description: What the toast says: the description it was added with, when nothing else is written in it.
4504
+ - `data-type`: The kind the toast was added as.
4505
+ - close: Closes the toast.
4506
+ - `data-type`: The kind the toast was added as.
4507
+ - action: A button of the toast's own: the action it was added with, when nothing else is written in it. Pressing it closes the toast too, unless the action refuses.
4508
+ - `data-type`: The kind the toast was added as.
3302
4509
 
3303
4510
  ### Toggle
3304
4511
 
@@ -3335,7 +4542,8 @@ Props:
3335
4542
  - `multiple?: boolean`: Whether more than one can be pressed at a time.
3336
4543
  - `disabled?: boolean`: Disables every toggle of the group.
3337
4544
  - `orientation?: Orientation`: Whether the toggles are laid out across (the default) or down: the arrows that move between them follow.
3338
- - `loop?: boolean`: Whether the arrows go round from the last toggle to the first. Default: they do.
4545
+ - `loopFocus?: boolean`: Whether the arrows go round from the last toggle to the first. Default: they do.
4546
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
3339
4547
  - `(valueChanged): { value: Value[]; details: ChangeDetails }`: Heard as a toggle is about to be pressed or released, with the values that would then be pressed: `details.cancel()` keeps them as they were.
3340
4548
 
3341
4549
  `[kpToggleGroup]` is `KpToggleGroup`. `exportAs: "kpToggleGroup"`. Generic: `<Value = unknown>`. Toggles that are one control. Each `kpToggle` with a `value` inside it is one of its toggles.
@@ -3369,7 +4577,8 @@ kpToolbar
3369
4577
  Props of its root:
3370
4578
 
3371
4579
  - `orientation?: Orientation`: Whether the controls are laid out across (the default) or down: the arrows that move between them follow.
3372
- - `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
4580
+ - `loopFocus?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
4581
+ - `loop?: boolean`: Whether the arrows wrap from the last item to the first.
3373
4582
  - `disabled?: boolean`: Disables every control of the toolbar.
3374
4583
 
3375
4584
  Each part, and its own props:
@@ -3377,9 +4586,11 @@ Each part, and its own props:
3377
4586
  - `[kpToolbar]` is `KpToolbar`. `exportAs: "kpToolbar"`. Its props are above.
3378
4587
  - `[kpToolbarButton]` is `KpToolbarButton`.
3379
4588
  - `disabled?: boolean`: Disables this control.
4589
+ - `focusableWhenDisabled?: boolean`: Keeps it focusable while disabled, as Base UI's: the arrows still reach it. Default `true`.
3380
4590
  - `[kpToolbarLink]` is `KpToolbarLink`.
3381
4591
  - `[kpToolbarInput]` is `KpToolbarInput`. `<input kpToolbarInput>`: the arrows are its own until the caret is at an end.
3382
4592
  - `disabled?: boolean`: Disables this control.
4593
+ - `focusableWhenDisabled?: boolean`: Keeps it focusable while disabled, as Base UI's: the arrows still reach it. Default `true`.
3383
4594
  - `[kpToolbarGroup]` is `KpToolbarGroup`.
3384
4595
  - `disabled?: boolean`: Disables this control.
3385
4596
  - `[kpToolbarSeparator]` is `KpToolbarSeparator`.
@@ -3392,12 +4603,14 @@ Attributes and CSS variables, by part:
3392
4603
  - button: A button of the toolbar.
3393
4604
  - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3394
4605
  - `data-disabled`: Present when it is disabled.
4606
+ - `data-focusable`: Present when it stays focusable while disabled: the arrows still reach it.
3395
4607
  - link: A link of the toolbar.
3396
4608
  - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3397
4609
  - `data-disabled`: Present when it is disabled.
3398
4610
  - input: A text input of the toolbar. The arrows are its own until the caret is at an end.
3399
4611
  - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3400
4612
  - `data-disabled`: Present when it is disabled.
4613
+ - `data-focusable`: Present when it stays focusable while disabled: the arrows still reach it.
3401
4614
  - group: Items that belong together.
3402
4615
  - `data-orientation="horizontal | vertical"`: Whether the toolbar is a row or a column.
3403
4616
  - `data-disabled`: Present when it is disabled.
@@ -3447,16 +4660,20 @@ Attributes and CSS variables, by part:
3447
4660
 
3448
4661
  - trigger: The element the tooltip describes.
3449
4662
  - `data-popup-open`: Present when the tooltip is open.
4663
+ - `data-trigger-disabled`: Present when the tooltip is disabled: the pointer and focus on the trigger do not open it.
3450
4664
  - positioner: Places the popup against the trigger. It carries the geometry.
3451
4665
  - `data-open`: Present when it is open.
3452
4666
  - `data-closed`: Present when it is closed.
3453
4667
  - `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.
3454
4668
  - `data-align="start | center | end"`: How it is aligned with the anchor.
4669
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
3455
4670
  - `--anchor-width`: The anchor's width.
3456
4671
  - `--anchor-height`: The anchor's height.
3457
4672
  - `--available-width`: The width between the anchor and the edge of the viewport.
3458
4673
  - `--available-height`: The height between the anchor and the edge of the viewport.
3459
4674
  - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
4675
+ - `--positioner-width`: The popup's width, as its content lays it out: a design gives the positioner `width: var(--positioner-width)` to animate a change of size.
4676
+ - `--positioner-height`: The popup's height, as its content lays it out: a design gives the positioner `height: var(--positioner-height)` to animate a change of size.
3460
4677
  - popup: The tooltip itself.
3461
4678
  - `data-open`: Present when it is open.
3462
4679
  - `data-closed`: Present when it is closed.
@@ -3466,6 +4683,180 @@ Attributes and CSS variables, by part:
3466
4683
  - `data-align="start | center | end"`: How it is aligned with the anchor.
3467
4684
  - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
3468
4685
  - arrow: An element that points at the trigger, placed along the popup's edge.
4686
+ - `data-open`: Present when it is open.
4687
+ - `data-closed`: Present when it is closed.
3469
4688
  - `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.
3470
4689
  - `data-align="start | center | end"`: How it is aligned with the anchor.
4690
+ - `data-instant="delay | focus | dismiss"`: Present when it opened or closed without its usual wait, for a design that skips the motion then.
3471
4691
  - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
4692
+
4693
+ ### Tour
4694
+
4695
+ ```
4696
+ import { KpTour, KpTourPortal, KpTourSpotlight, KpTourPositioner, KpTourPopup, KpTourArrow, KpTourTitle, KpTourDescription, KpTourPrevious, KpTourNext, KpTourClose } from "@kirana-ui/angular"
4697
+ ```
4698
+
4699
+ Parts: `[kpTour]`, `[kpTourPortal]`, `[kpTourSpotlight]`, `[kpTourPositioner]`, `[kpTourPopup]`, `[kpTourArrow]`, `[kpTourTitle]`, `[kpTourDescription]`, `[kpTourPrevious]`, `[kpTourNext]`, `[kpTourClose]`.
4700
+
4701
+ Anatomy:
4702
+
4703
+ ```
4704
+ kpTour
4705
+ *kpTourPortal
4706
+ kpTourSpotlight
4707
+ kpTourPositioner
4708
+ *kpTourPopup
4709
+ kpTourArrow
4710
+ kpTourTitle
4711
+ kpTourDescription
4712
+ kpTourPrevious
4713
+ kpTourNext
4714
+ kpTourClose
4715
+ ```
4716
+
4717
+ Props of its root:
4718
+
4719
+ - `steps: readonly Step[]`: Required. The steps, in order.
4720
+ - `[(open)]: boolean`: Whether it is open, when the caller holds it.
4721
+ - `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
4722
+ - `[(step)]: number`: The index of the step shown, from 0, when the caller holds it.
4723
+ - `defaultStep?: number`: The step it starts at, when the caller does not hold `step`. Read once. Default 0.
4724
+ - `waitForTarget?: number`: How long a step waits for a target that is not in the page, in milliseconds. Default 1000.
4725
+ - `spotlightPadding?: number`: The room between the target and the edge of the spotlight's hole, in pixels. Default 4.
4726
+ - `closeOnOutsidePress?: boolean`: Whether a press on the dimmed page ends the tour. Default `false`.
4727
+ - `interactive?: boolean`: Whether the target can be used while its step is shown. Default `false`.
4728
+ - `keyboardNavigation?: boolean`: Whether ArrowRight and ArrowLeft go on and back a step. Default `true`.
4729
+ - `(openChanged): { open: boolean; details: ChangeDetails }`: As it is about to open or close; `details.cancel()` keeps it as it was.
4730
+ - `(stepChanged): { step: number; details: ChangeDetails }`: As another step is about to be shown; `details.cancel()` keeps it as it was.
4731
+
4732
+ Each part, and its own props:
4733
+
4734
+ - `[kpTour]` is `KpTour`. `exportAs: "kpTour"`. Generic: `<Step extends TourStep = TourStep>`. `<ng-container kpTour [steps]="steps" [(open)]="touring">`: a tour of the page, a step at a time. It draws no element of its own. `[(step)]` is the index of the step asked for, from 0. Its props are above.
4735
+ - `[kpTourPortal]` is `KpTourPortal`. Structural: written `*kpTourPortal`. `<ng-container *kpTourPortal>`: what it holds is drawn at the end of `<body>` while a step is shown.
4736
+ - `[kpTourSpotlight]` is `KpTourSpotlight`. A layer over the page with a hole over the target.
4737
+ - `[kpTourPositioner]` is `KpTourPositioner`. Takes the positioner options ("Positioner options", above).
4738
+ - `[kpTourPopup]` is `KpTourPopup`. Structural: written `*kpTourPopup`. Its template is given the entry: `let entry` is a `TourShownStep<Step>`. `<div *kpTourPopup="let shown">`: the step, drawn by its template from the step shown (`shown.step`, `shown.index`, `shown.current`, `shown.total`, each also given by its name: `let current = current`).
4739
+ - `[kpTourArrow]` is `KpTourArrow`.
4740
+ - `[kpTourTitle]` is `KpTourTitle`. The heading that names the step.
4741
+ - `[kpTourDescription]` is `KpTourDescription`. The text that describes the step.
4742
+ - `[kpTourPrevious]` is `KpTourPrevious`.
4743
+ - `[kpTourNext]` is `KpTourNext`. Goes on a step; on the last, it finishes the tour.
4744
+ - `[kpTourClose]` is `KpTourClose`. A button that ends the tour.
4745
+
4746
+ Attributes and CSS variables, by part:
4747
+
4748
+ - spotlight: A layer over the page with a hole over the step's target, which the design draws from its variables (a clip path, or a box with a large shadow). A press on it is a press outside the tour. While the target can be used (`interactive`), presses go through it.
4749
+ - `data-open`: Present when it is open.
4750
+ - `data-closed`: Present when it is closed.
4751
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
4752
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
4753
+ - `data-centered`: Present while the step shown has no target in the page: the popup stands in the middle of the viewport.
4754
+ - `--spotlight-left`: The hole's left edge, from the spotlight's own left edge: the target's, less `spotlightPadding`.
4755
+ - `--spotlight-top`: The hole's top edge, from the spotlight's own top edge: the target's, less `spotlightPadding`.
4756
+ - `--spotlight-width`: The hole's width: the target's, with `spotlightPadding` on each side.
4757
+ - `--spotlight-height`: The hole's height: the target's, with `spotlightPadding` on each side. With no target, the hole is a point in the middle.
4758
+ - positioner: Places the popup against the step's target, or in the middle of the viewport for a step with none. It carries the geometry.
4759
+ - `data-open`: Present when it is open.
4760
+ - `data-closed`: Present when it is closed.
4761
+ - `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.
4762
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
4763
+ - `data-centered`: Present while the step shown has no target in the page: the popup stands in the middle of the viewport.
4764
+ - `data-anchor-hidden`: Present while the anchor is out of view: scrolled away, or clipped by a box around it.
4765
+ - `--anchor-width`: The anchor's width.
4766
+ - `--anchor-height`: The anchor's height.
4767
+ - `--available-width`: The width between the anchor and the edge of the viewport.
4768
+ - `--available-height`: The height between the anchor and the edge of the viewport.
4769
+ - `--transform-origin`: The point of the popup nearest its anchor, to scale from.
4770
+ - popup: The step itself: a dialog that stays in the page from the first step to the last, and moves.
4771
+ - `data-open`: Present when it is open.
4772
+ - `data-closed`: Present when it is closed.
4773
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
4774
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
4775
+ - `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.
4776
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
4777
+ - `data-centered`: Present while the step shown has no target in the page: the popup stands in the middle of the viewport.
4778
+ - arrow: An element that points at the target, placed along the popup's edge.
4779
+ - `data-open`: Present when it is open.
4780
+ - `data-closed`: Present when it is closed.
4781
+ - `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.
4782
+ - `data-align="start | center | end"`: How it is aligned with the anchor.
4783
+ - `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the target's centre.
4784
+ - `data-centered`: Present while the step shown has no target in the page: the popup stands in the middle of the viewport.
4785
+ - previous: A button that goes back a step. On the first step it does nothing.
4786
+ - `data-disabled`: Present when it is disabled.
4787
+ - next: A button that goes on a step. On the last step it finishes the tour.
4788
+ - `data-last`: Present on the last step: a press finishes the tour.
4789
+
4790
+ ### Tree
4791
+
4792
+ ```
4793
+ import { KpTree, KpTreeItem, KpTreeItemRow, KpTreeItemIndicator, KpTreeItemText, KpTreeGroup } from "@kirana-ui/angular"
4794
+ ```
4795
+
4796
+ Parts: `[kpTree]`, `[kpTreeItem]`, `[kpTreeItemRow]`, `[kpTreeItemIndicator]`, `[kpTreeItemText]`, `[kpTreeGroup]`.
4797
+
4798
+ Anatomy:
4799
+
4800
+ ```
4801
+ kpTree
4802
+ kpTreeItem (repeated)
4803
+ kpTreeItemRow (optional)
4804
+ kpTreeItemIndicator
4805
+ kpTreeItemText
4806
+ *kpTreeGroup
4807
+ kpTreeItem (repeated, as above)
4808
+ ```
4809
+
4810
+ Props of its root:
4811
+
4812
+ - `[(expandedValue)]: readonly Value[]`: The values of the open branches.
4813
+ - `defaultExpandedValue?: readonly Value[]`: The branches open at first, when the caller does not hold `expandedValue`. Read once.
4814
+ - `selectionMode?: TreeSelectionMode`: Whether nodes can be chosen: none, one, or several. Default `single`.
4815
+ - `[(selectedValue)]: readonly Value[]`: The values of the chosen nodes.
4816
+ - `defaultSelectedValue?: readonly Value[]`: The nodes chosen at first, when the caller does not hold `selectedValue`. Read once.
4817
+ - `expandOnClick?: boolean`: Whether a press on a branch (or Enter on it) also opens or closes it. Default `true`.
4818
+ - `(expandedChanged): { value: Value[]; details: ChangeDetails }`: A branch about to open or close, with the values then open; `details.cancel()` keeps them.
4819
+ - `(selectedChanged): { value: Value[]; details: ChangeDetails }`: Nodes about to be chosen or taken away; `details.cancel()` keeps them.
4820
+
4821
+ Each part, and its own props:
4822
+
4823
+ - `[kpTree]` is `KpTree`. `exportAs: "kpTree"`. Generic: `<Value = unknown>`. On the element that holds the nodes. `[(expandedValue)]` are the open branches' values and `[(selectedValue)]` the chosen nodes' values. Its props are above.
4824
+ - `[kpTreeItem]` is `KpTreeItem`. One node. `value` tells it from the others in the tree; `branch` makes it one that holds children in its `kpTreeGroup`. Its depth is known from how the nodes are nested, so a server writes it too.
4825
+ - `value: unknown`: Required. What tells this node from the others in the tree: what the values hold.
4826
+ - `branch?: boolean`: A branch: it has children, drawn in its `Tree.Group`, and opens and closes.
4827
+ - `disabled?: boolean`: Disables this node: it cannot be chosen, opened or closed, and the keys pass over it.
4828
+ - `loading?: boolean`: A branch whose children are being loaded.
4829
+ - `label?: string`: What typing matches, when it is not the node's text.
4830
+ - `[kpTreeItemRow]` is `KpTreeItemRow`.
4831
+ - `[kpTreeItemIndicator]` is `KpTreeItemIndicator`.
4832
+ - `[kpTreeItemText]` is `KpTreeItemText`. The node's name: what names it to assistive technology, and what typing matches.
4833
+ - `[kpTreeGroup]` is `KpTreeGroup`. Structural: written `*kpTreeGroup`. `<div *kpTreeGroup>`: in the page while its branch is open; `{ keepMounted: true }` keeps it, hidden.
4834
+ - `*kpTreeGroup: { keepMounted?: boolean } | ""`: The directive's own value: `*kpTreeGroup="…"`. Its options: `{ keepMounted: true }` keeps the group in the page, hidden, while its branch is closed.
4835
+
4836
+ Attributes and CSS variables, by part:
4837
+
4838
+ - item: One node, a `treeitem`: a leaf, or a branch that holds its row and its group. Its `value` tells it from the others; its depth, and its place among its siblings, are read from the page.
4839
+ - `data-selected`: Present on a chosen node.
4840
+ - `data-highlighted`: Present on the node focus is on, while it is in the tree.
4841
+ - `data-disabled`: Present when it is disabled.
4842
+ - `data-open`: Present on a branch that is open.
4843
+ - `data-closed`: Present on a branch that is closed.
4844
+ - `data-loading`: Present on a branch that says its children are being loaded.
4845
+ - itemRow: The line a node draws, apart from the children its group holds: what a design gives a background.
4846
+ - `data-selected`: Present on a chosen node.
4847
+ - `data-highlighted`: Present on the node focus is on, while it is in the tree.
4848
+ - `data-disabled`: Present when it is disabled.
4849
+ - `data-open`: Present on a branch that is open.
4850
+ - `data-closed`: Present on a branch that is closed.
4851
+ - `data-loading`: Present on a branch that says its children are being loaded.
4852
+ - itemIndicator: The mark that says whether a branch is open. A press on it opens or closes the branch and chooses nothing.
4853
+ - `data-open`: Present on a branch that is open.
4854
+ - `data-closed`: Present on a branch that is closed.
4855
+ - `data-loading`: Present on a branch that says its children are being loaded.
4856
+ - group: A branch's children. In the page while the branch is open, and through its exit's motion.
4857
+ - `data-open`: Present when it is open.
4858
+ - `data-closed`: Present when it is closed.
4859
+ - `data-starting-style`: Present for the first style of its entrance: what it animates in from.
4860
+ - `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
4861
+ - `--tree-group-height`: The group's content height while it opens or closes, `auto` once it is open.
4862
+ - `--tree-group-width`: The group's content width while it opens or closes, `auto` once it is open.