@kirana-ui/angular 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/kirana-ui-angular.mjs +4591 -2953
- package/fesm2022/kirana-ui-angular.mjs.map +1 -1
- package/llms.txt +1010 -767
- package/package.json +2 -2
- package/skills/kirana-ui-primitives/SKILL.md +29 -8
- package/types/kirana-ui-angular.d.ts +1565 -976
package/llms.txt
CHANGED
|
@@ -20,9 +20,14 @@ What every `Positioner` takes, beside its own props where a component's section
|
|
|
20
20
|
|
|
21
21
|
- `side?: Side`: The side of the anchor the popup is on. `inline-start` and `inline-end` follow the reading direction the popup is placed in, and `data-side` then says the side in the same words. Default `"bottom"`.
|
|
22
22
|
- `align?: Align`: Where along that side the popup is: at the anchor's start, its centre or its end. Default `"center"`.
|
|
23
|
-
- `sideOffset?: number`: The gap between the anchor and the popup, measured without any arrow. Default `0`.
|
|
24
|
-
- `alignOffset?: number`: How far the popup is moved along the side from where `align` puts it,
|
|
25
|
-
- `collisionPadding?:
|
|
23
|
+
- `sideOffset?: number | OffsetFunction`: The gap between the anchor and the popup, measured without any arrow: a number of pixels, or a function of what was measured (`({ side, align, anchor, positioner }) => number`). Default `0`.
|
|
24
|
+
- `alignOffset?: number | OffsetFunction`: How far the popup is moved along the side from where `align` puts it: a number of pixels, or a function of what was measured (`({ side, align, anchor, positioner }) => number`). Default `0`.
|
|
25
|
+
- `collisionPadding?: CollisionPadding`: Kept between the popup and the edges it is held inside: one number, or one for each side (`{ top, right, bottom, left }`, a side left out is 0). Default `5`.
|
|
26
|
+
- `collisionBoundary?: CollisionBoundary`: What the popup is held inside: an element, several, or a rectangle of the viewport. Left out or `"clipping-ancestors"`: the ancestors that clip it, and the viewport.
|
|
27
|
+
- `collisionAvoidance?: CollisionAvoidance`: What the popup does when it does not fit: `side` and `align` each `"flip"`, `"shift"` or `"none"`, and `fallbackAxisSide`. Left out: it flips to the opposite side and is moved along its side.
|
|
28
|
+
- `sticky?: boolean`: Keeps the popup in view once its anchor has been scrolled out of it. Otherwise the popup leaves with its anchor. Default `false`.
|
|
29
|
+
- `arrowPadding?: number`: Kept between an arrow and the ends of the popup's edge, so the arrow does not stand on a rounded corner. Default `5`.
|
|
30
|
+
- `positionMethod?: "absolute" | "fixed"`: The CSS `position` the positioner is given: `"absolute"` or `"fixed"`. Default `"absolute"`.
|
|
26
31
|
- `anchor?: PositionerAnchor`: What the popup is placed against, when that is not its trigger. It may change while the popup is open: the popup follows.
|
|
27
32
|
|
|
28
33
|
A component's own defaults lie over those: `Autocomplete` `{ align: "start" }`; `Combobox` `{ align: "start" }`; `ContextMenu` `{ align: "start" }`, and `{ side: "inline-end", align: "start" }` for a submenu or for a menu in a vertical menubar; `HoverCard` `{ side: "top" }`; `Menu` `{ align: "start" }`, and `{ side: "inline-end", align: "start" }` for a submenu or for a menu in a vertical menubar; `NavigationMenu` `{ align: "start" }`; `Select` `{ align: "start" }`; `Tooltip` `{ side: "top" }`.
|
|
@@ -33,18 +38,30 @@ The named types the props below mention, each with the entry of this package it
|
|
|
33
38
|
|
|
34
39
|
- `Align` (`@kirana-ui/angular`): `"start" | "center" | "end"`. Where along its side a popup is: at the anchor's start, its centre or its end.
|
|
35
40
|
- `Anchor` (`@kirana-ui/angular`): `Element | VirtualElement`. What a popup is placed against: an element, or a place in the viewport that is none.
|
|
36
|
-
- `CalendarDay` (`@kirana-ui/angular`): A day in the grid of
|
|
41
|
+
- `CalendarDay` (`@kirana-ui/angular`): A day in the grid of a month shown.
|
|
37
42
|
- `date: IsoDate`
|
|
38
43
|
- `label: string`: The day of the month as the locale writes it.
|
|
39
|
-
- `outside: boolean`: Not of the month
|
|
40
|
-
- `
|
|
44
|
+
- `outside: boolean`: Not of the month it is drawn in: the days that fill its first and last weeks.
|
|
45
|
+
- `CalendarMonth` (`@kirana-ui/angular`): One of the months shown, as `Calendar.Months` gives it.
|
|
46
|
+
- `index: number`: Its place among the months shown, from 0.
|
|
47
|
+
- `month: IsoDate`: Its first day.
|
|
48
|
+
- `title: string`: Its name as the locale writes it (`"March 2026"`).
|
|
49
|
+
- `weekdays: readonly CalendarWeekday[]`
|
|
50
|
+
- `weeks: readonly (readonly CalendarDay[])[]`
|
|
51
|
+
- `CalendarProps<Mode extends CalendarMode = CalendarMode>` (`@kirana-ui/angular`)
|
|
41
52
|
- `id: string`
|
|
42
|
-
- `value?:
|
|
43
|
-
- `defaultValue?:
|
|
44
|
-
- `onValueChange?: ((value:
|
|
45
|
-
- `mode?:
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
53
|
+
- `value?: CalendarValueOf<Mode>`: One day; with `mode: "range"` a first and a last day; with `mode: "multiple"` a list of days, in the order they were chosen. `null` (or an empty list) for none.
|
|
54
|
+
- `defaultValue?: CalendarValueOf<Mode>`: The value it starts with, when the caller does not hold `value`. Read once.
|
|
55
|
+
- `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
|
+
- `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).
|
|
57
|
+
- `minDays?: number`: With `mode: "multiple"`: the fewest days that can be left chosen. A press that would leave fewer does nothing.
|
|
58
|
+
- `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
|
+
- `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`.
|
|
60
|
+
- `pagedNavigation?: boolean`: With several `months`: whether Previous and Next turn them all (a page) rather than one month. Off by default, as in react-day-picker.
|
|
61
|
+
- `month?: IsoDate`: The month shown (the first of them, with several `months`), when the caller holds it: any day of it. A caption's month and year menus, or a "today" button, set it.
|
|
62
|
+
- `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
|
+
- `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
|
+
- `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.
|
|
48
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.
|
|
49
66
|
- `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.
|
|
50
67
|
- `min?: IsoDate`: The first and the last day that can be chosen.
|
|
@@ -53,7 +70,9 @@ The named types the props below mention, each with the entry of this package it
|
|
|
53
70
|
- `disabled?: boolean`: Disabled: no day can be chosen.
|
|
54
71
|
- `readOnly?: boolean`: Shown as it is: the days can be moved through, and none can be chosen.
|
|
55
72
|
- `fixedWeeks?: boolean`: Always six rows, so the calendar is one height in every month.
|
|
56
|
-
- `
|
|
73
|
+
- `name?: string`: The name its hidden input submits the value under: a day; the first and the last of a range, as two entries; each day of a list.
|
|
74
|
+
- `form?: string`: The id of the form it belongs to, when it is not inside it.
|
|
75
|
+
- `CalendarValueOf<Mode extends CalendarMode | undefined>` (`@kirana-ui/angular`): `Mode extends "range" ? DateRange | null : Mode extends "multiple" ? readonly IsoDate[] : IsoDate | null`. The value of one mode: a day or `null`, a range or `null`, or a list (empty for none). What `value` and `onValueChange` are typed by, from the `mode` a root is given.
|
|
57
76
|
- `CalendarWeekday` (`@kirana-ui/angular`): A day of the week, as a column's heading names it.
|
|
58
77
|
- `index: number`: Its place in the week as the locale orders it, from 0.
|
|
59
78
|
- `narrow: string`: Its name as a column's heading (`"M"`, `"Mo"`), and in full (`"Monday"`).
|
|
@@ -66,6 +85,39 @@ The named types the props below mention, each with the entry of this package it
|
|
|
66
85
|
- `cancel(): void`: Keeps the value as it was.
|
|
67
86
|
- `canceled: boolean`
|
|
68
87
|
- `ChangeSource` (`@kirana-ui/angular`): `"mouse" | "touch" | "pen" | "keyboard" | "virtual" | "programmatic" | "agent"`. What made a change: a kind of pointer, the keyboard, a press with no pointer (`virtual`), code with no event (`programmatic`), or an agent acting through the bridge.
|
|
88
|
+
- `CollisionAvoidance` (`@kirana-ui/angular`): What a popup does when it does not fit where it was asked to be.
|
|
89
|
+
- `side?: "flip" | "shift" | "none"`: Across from the anchor: `"flip"` goes to the opposite side, `"shift"` keeps the side and moves over the anchor to stay in view, `"none"` lets it overflow. Default `"flip"`.
|
|
90
|
+
- `align?: "flip" | "shift" | "none"`: Along its side: `"flip"` swaps `start` and `end`, `"shift"` moves the popup along the side to stay in view, `"none"` lets it overflow. Default `"flip"`. With `side: "shift"` it is `"shift"` or `"none"`.
|
|
91
|
+
- `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
|
+
- `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
|
+
- `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.
|
|
94
|
+
- `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
|
+
- `ComboboxGroupData<Value = unknown>` (`@kirana-ui/angular`): Items given as data that belong together: `value` is the group's name.
|
|
96
|
+
- `value: string`
|
|
97
|
+
- `items: readonly ComboboxItemData<Value>[]`
|
|
98
|
+
- `ComboboxGroupEntry<Value = unknown>` (`@kirana-ui/angular`): A group that has items left, with those items.
|
|
99
|
+
- `type: "group"`
|
|
100
|
+
- `key: string`: What it is known by from one drawing to the next.
|
|
101
|
+
- `value: string`: The group's name, as it was given.
|
|
102
|
+
- `label: string`: The same name: an entry of either kind has a `label`.
|
|
103
|
+
- `disabled: false`: Never: an entry of either kind says whether it is disabled.
|
|
104
|
+
- `items: readonly ComboboxItemEntry<Value>[]`: The items of the group that are left.
|
|
105
|
+
- `ComboboxItemData<Value = unknown>` (`@kirana-ui/angular`): One item given as data: its value, and what it is called.
|
|
106
|
+
- `value: Value`
|
|
107
|
+
- `label: string`
|
|
108
|
+
- `disabled?: boolean`: It cannot be chosen: its entry says so, for the item drawn for it.
|
|
109
|
+
- `ComboboxItemEntry<Value = unknown>` (`@kirana-ui/angular`): One item left of the `items` given as data, as a `Collection` hands it to be drawn.
|
|
110
|
+
- `type: "item"`
|
|
111
|
+
- `key: string`: What it is known by from one drawing to the next.
|
|
112
|
+
- `value: Value`
|
|
113
|
+
- `label: string`
|
|
114
|
+
- `disabled: boolean`
|
|
115
|
+
- `item: ComboboxItemData<Value>`: The item as it was given, with whatever else it carries.
|
|
116
|
+
- `ComboboxShown<Value = unknown>` (`@kirana-ui/angular`): What a combobox's value part shows: what is chosen, and how it is named.
|
|
117
|
+
- `value: Value | null`: The chosen value; `null` while nothing is chosen, and with `multiple`.
|
|
118
|
+
- `label: string | undefined`: The chosen value's label, or with `multiple` every chosen label with ", " between; `undefined` while nothing is chosen.
|
|
119
|
+
- `values: readonly Value[]`: Every chosen value, in the order they were chosen: one or none without `multiple`.
|
|
120
|
+
- `labels: readonly string[]`: The label of each of `values`.
|
|
69
121
|
- `DateFieldProps` (`@kirana-ui/angular`)
|
|
70
122
|
- `id: string`
|
|
71
123
|
- `value?: IsoDate | null`: The day typed, once all of it is; `null` until then.
|
|
@@ -98,6 +150,7 @@ The named types the props below mention, each with the entry of this package it
|
|
|
98
150
|
- `value: string`: The value that was checked.
|
|
99
151
|
- `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.
|
|
100
152
|
- `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.
|
|
153
|
+
- `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`.
|
|
101
154
|
- `IsoDate` (`@kirana-ui/angular`): `string`. A day as `YYYY-MM-DD`, in the calendar the world's data is kept in (ISO 8601).
|
|
102
155
|
- `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" }`).
|
|
103
156
|
- `ListCollection` (`@kirana-ui/angular`): Every row of a list of which only some are in the page: a virtualizer draws the ones in view. The keys then move by place, and ask for a row that is not drawn to be brought into the page.
|
|
@@ -106,6 +159,12 @@ The named types the props below mention, each with the entry of this package it
|
|
|
106
159
|
- `disabled?(index: number): boolean`
|
|
107
160
|
- `indexOf?(value: unknown): number`: The place of a value, or -1: where a list opens on what is chosen.
|
|
108
161
|
- `scrollToIndex(index: number): void`: Brings a row into the page: the virtualizer's own scroll.
|
|
162
|
+
- `OffsetData` (`@kirana-ui/angular`): What an offset given as a function is told: where the popup is, and the two sizes.
|
|
163
|
+
- `side: Side`: The side of the anchor the popup is on, in the words it was asked for in.
|
|
164
|
+
- `align: Align`: Where along that side the popup is.
|
|
165
|
+
- `anchor: { width: number; height: number }`: The anchor's size, in pixels.
|
|
166
|
+
- `positioner: { width: number; height: number }`: The positioner's size, in pixels.
|
|
167
|
+
- `OffsetFunction` (`@kirana-ui/angular`): `(data: OffsetData) => number`. A gap worked out from what was measured: `({ side, align, anchor, positioner }) => number`.
|
|
109
168
|
- `Orientation` (`@kirana-ui/angular`): `"horizontal" | "vertical"`. The way a row of things is laid out, and so which arrow keys move along it.
|
|
110
169
|
- `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.
|
|
111
170
|
- `PhysicalSide` (`@kirana-ui/angular`): `"top" | "right" | "bottom" | "left"`. A side of the anchor as the page is drawn.
|
|
@@ -170,16 +229,22 @@ What the entries export beside the components, their parts' props types and the
|
|
|
170
229
|
|
|
171
230
|
- `AnchorOption`, from `@kirana-ui/angular`: A positioner's own anchor: an element, a place in the viewport (`getBoundingClientRect`), or a function that gives one, asked each time the popup is placed. `null`, `undefined` or a function that gives neither: the popup's own anchor, its trigger.
|
|
172
231
|
- `Bindable`, from `@kirana-ui/angular`: A value that is the caller's while they give one and the part's own otherwise, as a signal that is asked to change.
|
|
232
|
+
- `CalendarMode`, from `@kirana-ui/angular`: How many days it chooses: one, a first and a last, or any number.
|
|
233
|
+
- `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.
|
|
173
234
|
- `ComponentDefinition`, from `@kirana-ui/angular`: A component in the vocabulary: its parts by name.
|
|
174
235
|
- `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.
|
|
237
|
+
- `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.
|
|
175
238
|
- `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.
|
|
176
|
-
- `injectDirection()`, from `@kirana-ui/angular`: The direction the nearest `
|
|
239
|
+
- `injectDirection()`, from `@kirana-ui/angular`: The direction the nearest `kpDirection` states; `ltr` outside one.
|
|
177
240
|
- `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`.
|
|
178
|
-
- `
|
|
179
|
-
- `
|
|
180
|
-
- `
|
|
181
|
-
- `
|
|
182
|
-
- `
|
|
241
|
+
- `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
|
+
- `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
|
+
- `InputsSignal`, from `@kirana-ui/angular`: What `inputsSignal` gives: the signal, and the two calls its directive makes.
|
|
244
|
+
- `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
|
+
- `KpIds`, from `@kirana-ui/angular`: Ids for parts whose caller gave none: one counter per application, so a server and its client agree.
|
|
246
|
+
- `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`.
|
|
247
|
+
- `KpPositioner` (a class a positioner's directive extends), from `@kirana-ui/angular`: A positioner: where its popup goes, as inputs. The one place they are named: each component's positioner extends this and says which controller it is a part of. Inputs: `side: Side`, `align: Align`, `sideOffset: number | OffsetFunction`, `alignOffset: number | OffsetFunction`, `collisionPadding: CollisionPadding`, `collisionBoundary: CollisionBoundary`, `collisionAvoidance: CollisionAvoidance`, `sticky: boolean`, `arrowPadding: number`, `positionMethod: "absolute" | "fixed"`, `anchor: PositionerAnchor`.
|
|
183
248
|
- `mounted()`, from `@kirana-ui/angular`: Runs a controller's own effects for the directive's life.
|
|
184
249
|
- `onServer()`, from `@kirana-ui/angular`: Whether this is a server's document: no layout, no observers, and nothing changes once written.
|
|
185
250
|
- `Part`, from `@kirana-ui/angular`: One part of a component as the core gives it: the props for its element, and the DOM work that starts once the element is in the page. Its props are the type `PartProps`, from the same entries.
|
|
@@ -188,7 +253,7 @@ What the entries export beside the components, their parts' props types and the
|
|
|
188
253
|
- `PartState`, from `@kirana-ui/angular`: A part's state as its caller reads it: `true` for a flag, its value for a state that has one.
|
|
189
254
|
- `PartStyle`, from `@kirana-ui/angular`: A part's `style`: property names as CSS writes them (`width`, `--thumb-offset`).
|
|
190
255
|
- `PositionOptions`, from `@kirana-ui/angular`: How a popup is placed against its anchor: what every positioner takes.
|
|
191
|
-
- `presentWhile(options: { portal?: boolean /** Drawn as children of this element instead, which is elsewhere in the page. */ into?: () => HTMLElement | undefined } = {})`, from `@kirana-ui/angular`: For a structural directive (`*
|
|
256
|
+
- `presentWhile(options: { portal?: boolean /** Drawn as children of this element instead, which is elsewhere in the page. */ into?: () => HTMLElement | undefined } = {})`, from `@kirana-ui/angular`: For a structural directive (`*kpCollapsiblePanel`): its template is in the page only while `show` holds, so a closed panel is really gone, its content with it. `part` goes on the template's element. With `portal`, the template is drawn in a container at the end of the page. Returns a function to call in `ngOnInit`.
|
|
192
257
|
- `Signal`, from `@kirana-ui/angular`: A value that is read and written, and that tells when it changes.
|
|
193
258
|
- `StateDefinition`, from `@kirana-ui/angular`: A state of a part in the vocabulary: the attribute that marks it, and what it means.
|
|
194
259
|
- `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.
|
|
@@ -227,6 +292,7 @@ A component in a snapshot (`AgentComponent`):
|
|
|
227
292
|
- `max?: number`
|
|
228
293
|
- `items?: readonly AgentItem[]`: Its choices, where they are in the page. `query({ within })` reads a closed list's.
|
|
229
294
|
- `disabled?: boolean`
|
|
295
|
+
- `readOnly?: boolean`: It can be read and not changed: it then has no action.
|
|
230
296
|
- `confirm?: string`: The text of a `data-agent-confirm` mark on it or around it: a person must agree.
|
|
231
297
|
- `actions: readonly string[]`: What it can be asked to do now.
|
|
232
298
|
|
|
@@ -319,24 +385,24 @@ Its other types:
|
|
|
319
385
|
|
|
320
386
|
## Using it
|
|
321
387
|
|
|
322
|
-
- Each part is a standalone directive on the caller's own element: `<button
|
|
388
|
+
- 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).
|
|
323
389
|
- The package has one entry for the components: every directive is imported from `@kirana-ui/angular`.
|
|
324
|
-
- Props are inputs. Bind them (`[defaultValue]="'a'"`): a static attribute stays on the element. An `id` is given as `[
|
|
390
|
+
- Props are inputs. Bind them (`[defaultValue]="'a'"`): a static attribute stays on the element. An `id` is given as `[kpId]`.
|
|
325
391
|
- 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.
|
|
326
|
-
- A part that draws a list is structural and gives each entry: `*
|
|
327
|
-
- A structural directive's own value is written after its name, and its other inputs after a semicolon: `*
|
|
328
|
-
- A select's value written structurally draws its own content with what is chosen: `<span *
|
|
392
|
+
- A part that draws a list is structural and gives each entry: `*kpDateFieldSegments="let segment"`.
|
|
393
|
+
- A structural directive's own value is written after its name, and its other inputs after a semicolon: `*kpTabsPanel="'account'; keepMounted: true"`.
|
|
394
|
+
- A select's value written structurally draws its own content with what is chosen: `<span *kpSelectValue="let shown">{{ shown.label }}</span>` (`shown.value`, `shown.label`; with `multiple`, `shown.values` and `shown.labels`, in the items' order).
|
|
329
395
|
- A positioner's `[anchor]` is an element (a template variable, `#box`), an `ElementRef`, an object with `getBoundingClientRect`, or a function that gives one of those (a `viewChild` signal).
|
|
330
396
|
- Angular 20 and later, with signals; it renders on a server and hydrates.
|
|
331
|
-
- What the other frameworks call `PortalProvider` and `DirectionProvider` are the directives `
|
|
397
|
+
- What the other frameworks call `PortalProvider` and `DirectionProvider` are the directives `kpPortalProvider` (`[container]`) and `kpDirection` here, and `useDirection` is `injectDirection()`.
|
|
332
398
|
- 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.
|
|
333
|
-
- 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: `*
|
|
334
|
-
- A root that draws nothing can sit on `<ng-container>`. A directive with an `exportAs` is reached from the template: `#tabs="
|
|
335
|
-
- 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.
|
|
336
|
-
- Every `Positioner` takes the same options (`side`, `align`, `sideOffset`, `alignOffset`, `collisionPadding`, `anchor`), listed once under "Positioner options" with their defaults. An anchor may change while the popup is open, and the popup follows.
|
|
337
|
-
- 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 `(
|
|
338
|
-
- 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: `[
|
|
339
|
-
- `readOnly` (shown, focusable, not changeable) is a prop of `Calendar`, `Checkbox`, `DateField`, `DatePicker`, `NumberField`, `RadioGroup` and `Switch` and of no other component.
|
|
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>`).
|
|
400
|
+
- 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.
|
|
402
|
+
- 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.
|
|
340
406
|
- 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.
|
|
341
407
|
- A boolean state is an attribute that is present or absent (`[data-open]`), never `="false"`.
|
|
342
408
|
- 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.
|
|
@@ -345,24 +411,33 @@ Its other types:
|
|
|
345
411
|
- `PortalProvider` (`container`) says where the popups inside it are drawn, in place of the end of `<body>`: a shadow root's host, a full-screen element.
|
|
346
412
|
- An agent can read and use a page built with these: `createAgent()` from `@kirana-ui/angular/agent` gives `snapshot()`, `act({ steps })`, `query()`, `history()`, `undo()` and `redo()`; what it changes reaches the same callbacks with `details.source === "agent"`. "Agent", above, has the whole of it.
|
|
347
413
|
|
|
414
|
+
### For a design system
|
|
415
|
+
|
|
416
|
+
- A design system's part is a directive of its own that hosts the primitive's: `@Directive({ selector: "[uiDialog]", hostDirectives: [{ directive: KpDialog, inputs: ["kpId", "open", "defaultOpen"], outputs: ["openChange", "openChanged"] }] })`. Angular binds a host directive's inputs and outputs only where the host exposes them (`inputs`, `outputs`, each `"name"` or `"name: alias"`): expose what its callers set, and give the rest yourself (below). Its own host bindings (`host: { class: "…", "[attr.data-size]": "size()" }`) join the element's: classes are joined, and both handlers of an event run. An element of the design system's own (a badge) is such a directive with no primitive: nothing of the library's is needed for it.
|
|
417
|
+
- 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
|
+
- 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
|
+
- 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.
|
|
421
|
+
- 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
|
+
|
|
348
423
|
## Components
|
|
349
424
|
|
|
350
425
|
### Accordion
|
|
351
426
|
|
|
352
427
|
```
|
|
353
|
-
import {
|
|
428
|
+
import { KpAccordion, KpAccordionItem, KpAccordionHeader, KpAccordionTrigger, KpAccordionPanel } from "@kirana-ui/angular"
|
|
354
429
|
```
|
|
355
430
|
|
|
356
|
-
Parts: `[
|
|
431
|
+
Parts: `[kpAccordion]`, `[kpAccordionItem]`, `[kpAccordionHeader]`, `[kpAccordionTrigger]`, `[kpAccordionPanel]`.
|
|
357
432
|
|
|
358
433
|
Anatomy:
|
|
359
434
|
|
|
360
435
|
```
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
*
|
|
436
|
+
kpAccordion
|
|
437
|
+
kpAccordionItem (repeated)
|
|
438
|
+
kpAccordionHeader
|
|
439
|
+
kpAccordionTrigger
|
|
440
|
+
*kpAccordionPanel
|
|
366
441
|
```
|
|
367
442
|
|
|
368
443
|
Props of its root:
|
|
@@ -377,14 +452,14 @@ Props of its root:
|
|
|
377
452
|
|
|
378
453
|
Each part, and its own props:
|
|
379
454
|
|
|
380
|
-
- `[
|
|
381
|
-
- `[
|
|
455
|
+
- `[kpAccordion]` is `KpAccordion`. `exportAs: "kpAccordion"`. Generic: `<Value = unknown>`. Its props are above.
|
|
456
|
+
- `[kpAccordionItem]` is `KpAccordionItem`. `value` tells this item from the others; an item that is given none makes its own.
|
|
382
457
|
- `value?: unknown`: What tells this item from the others: it is in the accordion's `value` while the item is open. An item that is given none makes its own.
|
|
383
458
|
- `disabled?: boolean`: Disables this item: it cannot be opened or closed.
|
|
384
|
-
- `[
|
|
385
|
-
- `[
|
|
386
|
-
- `[
|
|
387
|
-
- `*
|
|
459
|
+
- `[kpAccordionHeader]` is `KpAccordionHeader`.
|
|
460
|
+
- `[kpAccordionTrigger]` is `KpAccordionTrigger`.
|
|
461
|
+
- `[kpAccordionPanel]` is `KpAccordionPanel`. Structural: written `*kpAccordionPanel`. `<div *kpAccordionPanel>`: in the page while open; `{ keepMounted: true }` keeps it, hidden.
|
|
462
|
+
- `*kpAccordionPanel: { keepMounted?: boolean } | ""`: The directive's own value: `*kpAccordionPanel="…"`. Its options: `{ keepMounted: true }` keeps the panel in the page, hidden, while its item is closed.
|
|
388
463
|
|
|
389
464
|
Attributes and CSS variables, by part:
|
|
390
465
|
|
|
@@ -413,22 +488,23 @@ Attributes and CSS variables, by part:
|
|
|
413
488
|
### AlertDialog
|
|
414
489
|
|
|
415
490
|
```
|
|
416
|
-
import {
|
|
491
|
+
import { KpAlertDialog, KpDialogTrigger, KpDialogPortal, KpDialogBackdrop, KpDialogViewport, KpDialogPopup, KpDialogTitle, KpDialogDescription, KpDialogClose } from "@kirana-ui/angular"
|
|
417
492
|
```
|
|
418
493
|
|
|
419
|
-
Parts: `[
|
|
494
|
+
Parts: `[kpAlertDialog]`, `[kpDialogTrigger]`, `[kpDialogPortal]`, `[kpDialogBackdrop]`, `[kpDialogViewport]`, `[kpDialogPopup]`, `[kpDialogTitle]`, `[kpDialogDescription]`, `[kpDialogClose]`.
|
|
420
495
|
|
|
421
496
|
Anatomy:
|
|
422
497
|
|
|
423
498
|
```
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
*
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
499
|
+
kpAlertDialog
|
|
500
|
+
kpDialogTrigger
|
|
501
|
+
*kpDialogPortal
|
|
502
|
+
kpDialogBackdrop
|
|
503
|
+
kpDialogViewport (optional)
|
|
504
|
+
kpDialogPopup
|
|
505
|
+
kpDialogTitle
|
|
506
|
+
kpDialogDescription
|
|
507
|
+
kpDialogClose
|
|
432
508
|
```
|
|
433
509
|
|
|
434
510
|
Props of its root:
|
|
@@ -439,14 +515,15 @@ Props of its root:
|
|
|
439
515
|
|
|
440
516
|
Each part, and its own props:
|
|
441
517
|
|
|
442
|
-
- `[
|
|
443
|
-
- `[
|
|
444
|
-
- `[
|
|
445
|
-
- `[
|
|
446
|
-
- `[
|
|
447
|
-
- `[
|
|
448
|
-
- `[
|
|
449
|
-
- `[
|
|
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.
|
|
519
|
+
- `[kpDialogTrigger]` is `KpDialogTrigger`.
|
|
520
|
+
- `[kpDialogPortal]` is `KpDialogPortal`. Structural: written `*kpDialogPortal`. `<ng-template kpDialogPortal>` or `*kpDialogPortal`: its content at the end of the page while open.
|
|
521
|
+
- `[kpDialogBackdrop]` is `KpDialogBackdrop`.
|
|
522
|
+
- `[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
|
+
- `[kpDialogPopup]` is `KpDialogPopup`.
|
|
524
|
+
- `[kpDialogTitle]` is `KpDialogTitle`. The heading that names the dialog.
|
|
525
|
+
- `[kpDialogDescription]` is `KpDialogDescription`. The text that describes the dialog.
|
|
526
|
+
- `[kpDialogClose]` is `KpDialogClose`. A button that closes the dialog.
|
|
450
527
|
|
|
451
528
|
Attributes and CSS variables, by part:
|
|
452
529
|
|
|
@@ -457,6 +534,13 @@ Attributes and CSS variables, by part:
|
|
|
457
534
|
- `data-closed`: Present when it is closed.
|
|
458
535
|
- `data-starting-style`: Present for the first style of its entrance: what it animates in from.
|
|
459
536
|
- `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
|
|
537
|
+
- viewport: What a long dialog scrolls in: it lies over the page, between the backdrop and the popup. A press on it beside the popup is a press outside the dialog; a press on its scrollbar is not.
|
|
538
|
+
- `data-open`: Present when it is open.
|
|
539
|
+
- `data-closed`: Present when it is closed.
|
|
540
|
+
- `data-starting-style`: Present for the first style of its entrance: what it animates in from.
|
|
541
|
+
- `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
|
|
542
|
+
- `data-nested`: Present when the dialog opened over another dialog.
|
|
543
|
+
- `data-nested-dialog-open`: Present when another dialog is open above this one.
|
|
460
544
|
- popup: The dialog itself.
|
|
461
545
|
- `data-open`: Present when it is open.
|
|
462
546
|
- `data-closed`: Present when it is closed.
|
|
@@ -468,42 +552,50 @@ Attributes and CSS variables, by part:
|
|
|
468
552
|
### Autocomplete
|
|
469
553
|
|
|
470
554
|
```
|
|
471
|
-
import {
|
|
555
|
+
import { KpCombobox, KpComboboxInput, KpComboboxTrigger, KpComboboxClear, KpComboboxPortal, KpComboboxPositioner, KpComboboxPopup, KpComboboxList, KpComboboxCollection, KpComboboxGroup, KpComboboxGroupLabel, KpComboboxSeparator, KpComboboxItem, KpComboboxEmpty, KpComboboxStatus } from "@kirana-ui/angular"
|
|
472
556
|
```
|
|
473
557
|
|
|
474
|
-
Parts: `[
|
|
558
|
+
Parts: `[kpAutocomplete]`, `input[kpComboboxInput]`, `[kpComboboxTrigger]`, `[kpComboboxClear]`, `[kpComboboxPortal]`, `[kpComboboxPositioner]`, `[kpComboboxPopup]`, `[kpComboboxList]`, `[kpComboboxCollection]`, `[kpComboboxGroup]`, `[kpComboboxGroupLabel]`, `[kpComboboxSeparator]`, `[kpComboboxItem]`, `[kpComboboxEmpty]`, `[kpComboboxStatus]`.
|
|
475
559
|
|
|
476
560
|
Anatomy:
|
|
477
561
|
|
|
478
562
|
```
|
|
479
|
-
|
|
480
|
-
input[
|
|
481
|
-
|
|
482
|
-
*
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
563
|
+
kpAutocomplete
|
|
564
|
+
input[kpComboboxInput]
|
|
565
|
+
kpComboboxTrigger
|
|
566
|
+
*kpComboboxPortal
|
|
567
|
+
kpComboboxPositioner
|
|
568
|
+
kpComboboxPopup
|
|
569
|
+
kpComboboxList (optional)
|
|
570
|
+
*kpComboboxCollection (optional)
|
|
571
|
+
kpComboboxItem (repeated, as above)
|
|
572
|
+
kpComboboxGroup (optional, repeated, as above)
|
|
573
|
+
kpComboboxGroup (optional, repeated)
|
|
574
|
+
*kpComboboxCollection (optional, as above)
|
|
575
|
+
kpComboboxItem (repeated)
|
|
576
|
+
kpComboboxGroupLabel
|
|
577
|
+
kpComboboxSeparator (repeated)
|
|
578
|
+
*kpComboboxCollection (optional, as above)
|
|
579
|
+
*kpComboboxEmpty
|
|
580
|
+
kpComboboxStatus (optional)
|
|
581
|
+
kpComboboxPopup (as above)
|
|
582
|
+
kpComboboxStatus (optional, as above)
|
|
583
|
+
*kpComboboxClear
|
|
493
584
|
```
|
|
494
585
|
|
|
495
586
|
Props of its root:
|
|
496
587
|
|
|
497
588
|
- `[(value)]: Value | null`: What the input says: the text is the value.
|
|
498
589
|
- `defaultValue?: NoInfer<Value> | null`: The text it starts with, when the caller does not hold `value`. Read once.
|
|
499
|
-
- `[(inputValue)]: string`: What the input says, `[(inputValue)]`. With `
|
|
590
|
+
- `[(inputValue)]: string`: What the input says, `[(inputValue)]`. With `kpAutocomplete` the text is `[(value)]`.
|
|
500
591
|
- `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once.
|
|
501
592
|
- `[(open)]: boolean`: Whether the list is open, when the caller holds it.
|
|
502
593
|
- `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
|
|
503
594
|
- `disabled?: boolean`: Disabled: it cannot be changed.
|
|
595
|
+
- `readOnly?: boolean`: Its value can be read and not changed: the list still opens and can be gone through, but no press and no Enter chooses, nothing typed is taken, and its clear and chip buttons do nothing. Its value is still submitted.
|
|
504
596
|
- `name?: string`: The input's name in the form around it.
|
|
505
597
|
- `form?: string`: The id of the form the control belongs to, when it is not inside it.
|
|
506
|
-
- `items?:
|
|
598
|
+
- `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.
|
|
507
599
|
- `filter?: ((label: string, query: string) => boolean) | null`: Whether an item is shown for what was typed; `null` shows every item.
|
|
508
600
|
- `required?: boolean`: In a field, "none" is then wrong.
|
|
509
601
|
- `multiple?: boolean`: Several values, each shown as a chip: they are `values`, not `value`.
|
|
@@ -513,40 +605,45 @@ Props of its root:
|
|
|
513
605
|
- `inline?: boolean`: The list is always in the page, with no popup: a command palette.
|
|
514
606
|
- `virtualized?: ListCollection`: Every row, when only some are in the page: each item is then given its `index`.
|
|
515
607
|
- `autoHighlight?: boolean`: The first item shown for what was typed is highlighted as one types, so Enter chooses it. Off by default.
|
|
516
|
-
- `mode?: "list" | "none"`: With `
|
|
517
|
-
- `openOnInputClick?: boolean`: With `
|
|
608
|
+
- `mode?: "list" | "none"`: With `kpAutocomplete`: `"none"` shows the suggestions as the caller draws them.
|
|
609
|
+
- `openOnInputClick?: boolean`: With `kpAutocomplete`: a press on the input opens the list.
|
|
518
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.
|
|
519
611
|
- `(inputValueChanged): { value: string; details: ChangeDetails }`: Heard as the input's text is about to change; `details.cancel()` keeps it as it was.
|
|
520
612
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
|
|
521
613
|
|
|
522
614
|
Each part, and its own props:
|
|
523
615
|
|
|
524
|
-
- `[
|
|
525
|
-
- `input[
|
|
526
|
-
- `[
|
|
527
|
-
- `[
|
|
528
|
-
- `[
|
|
529
|
-
- `[
|
|
530
|
-
- `[
|
|
531
|
-
- `[
|
|
532
|
-
- `[
|
|
533
|
-
- `
|
|
534
|
-
- `[
|
|
535
|
-
- `[
|
|
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.
|
|
617
|
+
- `input[kpComboboxInput]` is `KpComboboxInput`. `<input kpComboboxInput>`: what is typed filters the list, which is placed against it.
|
|
618
|
+
- `[kpComboboxTrigger]` is `KpComboboxTrigger`.
|
|
619
|
+
- `[kpComboboxClear]` is `KpComboboxClear`. Structural: written `*kpComboboxClear`. `<button *kpComboboxClear>`: empties the input and the value; in the page while there is something to clear.
|
|
620
|
+
- `[kpComboboxPortal]` is `KpComboboxPortal`. Structural: written `*kpComboboxPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
621
|
+
- `[kpComboboxPositioner]` is `KpComboboxPositioner`. Takes the positioner options ("Positioner options", above).
|
|
622
|
+
- `[kpComboboxPopup]` is `KpComboboxPopup`.
|
|
623
|
+
- `[kpComboboxList]` is `KpComboboxList`. The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
|
|
624
|
+
- `[kpComboboxCollection]` is `KpComboboxCollection`. Structural: written `*kpComboboxCollection`. Its template is given the entry: `let entry` is a `ComboboxEntry`. `<ng-container *kpComboboxCollection="let entry">` draws the list from the root's `items`: once for each item left for what was typed, or for each group that has items left. With `of` (`*kpComboboxCollection="let item; of: group"`), for each of that group's items left. The root then filters, and no item hides itself.
|
|
625
|
+
- `of?: ComboboxEntry`: Written after the directive's value: `*kpComboboxCollection="…; of: …"`. A group the root's `items` gave: its items left are then what is drawn.
|
|
626
|
+
- `[kpComboboxGroup]` is `KpComboboxGroup`. Items that belong together, named by their `kpComboboxGroupLabel`. Hidden while none is shown.
|
|
627
|
+
- `[kpComboboxGroupLabel]` is `KpComboboxGroupLabel`. Names the group it is in. With no group around it, it is plain text.
|
|
628
|
+
- `[kpComboboxSeparator]` is `KpComboboxSeparator`. A line between groups.
|
|
629
|
+
- `[kpComboboxItem]` is `KpComboboxItem`.
|
|
536
630
|
- `value: unknown`: Required. What the combobox's value is while this item is chosen.
|
|
537
631
|
- `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
|
|
538
632
|
- `label?: string`: What is filtered and what the input shows; the item's text when left out.
|
|
539
633
|
- `index?: number`: Its place among all the rows, in a virtualized list.
|
|
540
|
-
- `[
|
|
634
|
+
- `[kpComboboxEmpty]` is `KpComboboxEmpty`. Structural: written `*kpComboboxEmpty`. `<div *kpComboboxEmpty>`: in the page while no item is shown for what was typed.
|
|
635
|
+
- `[kpComboboxStatus]` is `KpComboboxStatus`. Says how the list stands ("3 results", "Loading") to software that reads the page, as its text changes. Keep it in the page and change what it holds: inside the popup, or beside the input.
|
|
541
636
|
|
|
542
637
|
Attributes and CSS variables, by part:
|
|
543
638
|
|
|
544
639
|
- input: The text input: its text is the value, and what is typed asks for suggestions.
|
|
545
640
|
- `data-popup-open`: Present when the list is open.
|
|
546
641
|
- `data-disabled`: Present when it is disabled.
|
|
642
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
547
643
|
- 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.
|
|
548
644
|
- `data-popup-open`: Present when the list is open.
|
|
549
645
|
- `data-disabled`: Present when it is disabled.
|
|
646
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
550
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.
|
|
551
648
|
- `data-open`: Present when it is open.
|
|
552
649
|
- `data-closed`: Present when it is closed.
|
|
@@ -577,48 +674,61 @@ Attributes and CSS variables, by part:
|
|
|
577
674
|
### Autosize
|
|
578
675
|
|
|
579
676
|
```
|
|
580
|
-
import {
|
|
677
|
+
import { KpAutosizeTextarea } from "@kirana-ui/angular"
|
|
581
678
|
```
|
|
582
679
|
|
|
583
|
-
Parts: `textarea[
|
|
680
|
+
Parts: `textarea[kpAutosizeTextarea]`.
|
|
584
681
|
|
|
585
682
|
Anatomy:
|
|
586
683
|
|
|
587
684
|
```
|
|
588
|
-
textarea[
|
|
685
|
+
textarea[kpAutosizeTextarea]
|
|
589
686
|
```
|
|
590
687
|
|
|
591
688
|
Each part, and its own props:
|
|
592
689
|
|
|
593
|
-
- `textarea[
|
|
690
|
+
- `textarea[kpAutosizeTextarea]` is `KpAutosizeTextarea`. `exportAs: "kpAutosizeTextarea"`. `<textarea kpAutosizeTextarea>`: as tall as its text.
|
|
594
691
|
|
|
595
692
|
### Avatar
|
|
596
693
|
|
|
597
694
|
```
|
|
598
|
-
import {
|
|
695
|
+
import { KpAvatar, KpAvatarImage, KpAvatarFallback } from "@kirana-ui/angular"
|
|
599
696
|
```
|
|
600
697
|
|
|
601
|
-
Parts: `[
|
|
698
|
+
Parts: `[kpAvatar]`, `[kpAvatarImage]`, `[kpAvatarFallback]`.
|
|
602
699
|
|
|
603
700
|
Anatomy:
|
|
604
701
|
|
|
605
702
|
```
|
|
606
|
-
|
|
607
|
-
*
|
|
608
|
-
*
|
|
703
|
+
kpAvatar
|
|
704
|
+
*kpAvatarImage
|
|
705
|
+
*kpAvatarFallback
|
|
609
706
|
```
|
|
610
707
|
|
|
708
|
+
Props of its root:
|
|
709
|
+
|
|
710
|
+
- `(loadingStatusChanged): ImageStatus`: Each time the picture's loading status changes: `loading` once it has an address, then `loaded` or `error`; `idle` again when its address is taken away. Base UI's `onLoadingStatusChange`; the root says the same in `data-image-loading-status`.
|
|
711
|
+
|
|
611
712
|
Each part, and its own props:
|
|
612
713
|
|
|
613
|
-
- `[
|
|
614
|
-
- `[
|
|
615
|
-
- `*
|
|
616
|
-
- `[
|
|
714
|
+
- `[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.
|
|
716
|
+
- `*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
|
+
- `[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
|
+
- `*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.
|
|
719
|
+
|
|
720
|
+
Attributes and CSS variables, by part:
|
|
721
|
+
|
|
722
|
+
- root: The frame the image and its stand-in share.
|
|
723
|
+
- `data-image-loading-status="idle | loading | loaded | error"`: Where the picture is in its loading: `idle` while it has no address.
|
|
724
|
+
- image: The picture. In the page once it has loaded; with `keepMounted` (on Angular, the attribute form) in the page all along, `aria-hidden` until it has loaded.
|
|
725
|
+
- `data-loading`: Present while the picture loads, on an image kept in the page.
|
|
726
|
+
- `data-error`: Present when the picture cannot load, on an image kept in the page.
|
|
617
727
|
|
|
618
728
|
### Button
|
|
619
729
|
|
|
620
730
|
```
|
|
621
|
-
import {
|
|
731
|
+
import { KpButton } from "@kirana-ui/angular"
|
|
622
732
|
```
|
|
623
733
|
|
|
624
734
|
Props:
|
|
@@ -627,7 +737,7 @@ Props:
|
|
|
627
737
|
- `focusableWhenDisabled?: boolean`: Keeps a disabled button in the tab order, so what it would do can still be read.
|
|
628
738
|
- `nativeButton?: boolean`: `false` when the element is not a `<button>`: it is given a button's role and keyboard. Default `true`.
|
|
629
739
|
|
|
630
|
-
`[
|
|
740
|
+
`[kpButton]` is `KpButton`. `exportAs: "kpButton"`. On a `<button>`, or with `[nativeButton]="false"` on another element that acts as one.
|
|
631
741
|
|
|
632
742
|
Attributes and CSS variables, by part:
|
|
633
743
|
|
|
@@ -637,33 +747,41 @@ Attributes and CSS variables, by part:
|
|
|
637
747
|
### Calendar
|
|
638
748
|
|
|
639
749
|
```
|
|
640
|
-
import {
|
|
750
|
+
import { KpCalendar, KpCalendarHeading, KpCalendarPrevious, KpCalendarNext, KpCalendarMonths, KpCalendarGrid, KpCalendarWeekdays, KpCalendarHeadCell, KpCalendarWeeks, KpCalendarCell, KpCalendarDay, KpCalendarInput } from "@kirana-ui/angular"
|
|
641
751
|
```
|
|
642
752
|
|
|
643
|
-
Parts: `[
|
|
753
|
+
Parts: `[kpCalendar]`, `[kpCalendarHeading]`, `[kpCalendarPrevious]`, `[kpCalendarNext]`, `[kpCalendarMonths]`, `[kpCalendarGrid]`, `[kpCalendarWeekdays]`, `[kpCalendarHeadCell]`, `[kpCalendarWeeks]`, `[kpCalendarCell]`, `[kpCalendarDay]`, `input[kpCalendarInput]`.
|
|
644
754
|
|
|
645
755
|
Anatomy:
|
|
646
756
|
|
|
647
757
|
```
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
758
|
+
kpCalendar
|
|
759
|
+
*kpCalendarMonths (optional)
|
|
760
|
+
kpCalendarHeading
|
|
761
|
+
kpCalendarGrid
|
|
762
|
+
*kpCalendarWeekdays
|
|
763
|
+
kpCalendarHeadCell (repeated)
|
|
764
|
+
*kpCalendarWeeks
|
|
765
|
+
kpCalendarCell (repeated)
|
|
766
|
+
kpCalendarDay
|
|
767
|
+
kpCalendarPrevious
|
|
768
|
+
kpCalendarNext
|
|
769
|
+
input[kpCalendarInput]
|
|
658
770
|
```
|
|
659
771
|
|
|
660
772
|
Props of its root:
|
|
661
773
|
|
|
662
|
-
- `[(value)]:
|
|
663
|
-
- `defaultValue?:
|
|
664
|
-
- `mode?:
|
|
665
|
-
- `
|
|
666
|
-
- `
|
|
774
|
+
- `[(value)]: CalendarValueOf<Mode>`: One day; with `mode="range"` a first and a last; with `mode="multiple"` a list: `[(value)]`. Typed by `mode`.
|
|
775
|
+
- `defaultValue?: NoInfer<CalendarValueOf<Mode>>`: The value it starts with, when the caller does not hold `value`. Read once.
|
|
776
|
+
- `mode?: Mode`: One day (the default), a first and a last (`"range"`), or any number (`"multiple"`).
|
|
777
|
+
- `minDays?: number`: With `mode="multiple"`: the fewest days that can be left chosen.
|
|
778
|
+
- `maxDays?: number`: With `mode="multiple"`: the most days that can be chosen.
|
|
779
|
+
- `months?: number`: How many months are shown side by side, each drawn by `*kpCalendarMonths`. Default `1`.
|
|
780
|
+
- `pagedNavigation?: boolean`: With several `months`: Previous and Next turn them all rather than one month.
|
|
781
|
+
- `[(month)]: string`: The first day of the month shown (any day of it): `[(month)]`.
|
|
782
|
+
- `defaultMonth?: string`: The month it starts on, when the caller does not hold `month`. Read once.
|
|
783
|
+
- `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"`.
|
|
667
785
|
- `calendarSystem?: CalendarSystem`: The calendar its months are laid out in, when it is not the Gregorian one.
|
|
668
786
|
- `min?: string`: The first and the last day that can be chosen.
|
|
669
787
|
- `max?: string`: The last day that can be chosen.
|
|
@@ -671,24 +789,28 @@ Props of its root:
|
|
|
671
789
|
- `disabled?: boolean`: Disabled: no day can be chosen.
|
|
672
790
|
- `readOnly?: boolean`: Shown as it is: the days can be moved through, and none can be chosen.
|
|
673
791
|
- `fixedWeeks?: boolean`: Always six rows, so the calendar is one height in every month.
|
|
674
|
-
- `
|
|
675
|
-
- `
|
|
792
|
+
- `name?: string`: The name its hidden input (`kpCalendarInput`) submits the value under.
|
|
793
|
+
- `form?: string`: The id of the form it belongs to, when it is not inside it.
|
|
794
|
+
- `(valueChanged): { value: CalendarValueOf<Mode>; details: ChangeDetails }`: Heard as a day is about to be chosen: `details.cancel()` keeps the value as it was.
|
|
795
|
+
- `(monthChanged): { month: string; details: ChangeDetails }`: Another month is about to be shown: its first day, and `details.cancel()`.
|
|
676
796
|
|
|
677
797
|
Each part, and its own props:
|
|
678
798
|
|
|
679
|
-
- `[
|
|
680
|
-
- `[
|
|
681
|
-
- `[
|
|
682
|
-
- `[
|
|
683
|
-
- `[
|
|
684
|
-
- `[
|
|
685
|
-
- `[
|
|
799
|
+
- `[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.
|
|
801
|
+
- `[kpCalendarPrevious]` is `KpCalendarPrevious`.
|
|
802
|
+
- `[kpCalendarNext]` is `KpCalendarNext`.
|
|
803
|
+
- `[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.
|
|
804
|
+
- `[kpCalendarGrid]` is `KpCalendarGrid`. The table of a month's days: a grid the arrows move in, from one month shown into the next.
|
|
805
|
+
- `[kpCalendarWeekdays]` is `KpCalendarWeekdays`. Structural: written `*kpCalendarWeekdays`. Its template is given the entry: `let entry` is a `CalendarWeekday`. `<th *kpCalendarWeekdays="let weekday">`: once for each day of the week.
|
|
806
|
+
- `[kpCalendarHeadCell]` is `KpCalendarHeadCell`. A column's heading: a day of the week.
|
|
686
807
|
- `weekday: CalendarWeekday`: Required. The day of the week it heads: an entry `Calendar.Weekdays` gave.
|
|
687
|
-
- `[
|
|
688
|
-
- `[
|
|
808
|
+
- `[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
|
+
- `[kpCalendarCell]` is `KpCalendarCell`.
|
|
689
810
|
- `date: string`: Required. The day it holds, as `Calendar.Weeks` gave it: `day.date`.
|
|
690
|
-
- `[
|
|
811
|
+
- `[kpCalendarDay]` is `KpCalendarDay`.
|
|
691
812
|
- `date: string`: Required. The day it is the button of, as `Calendar.Weeks` gave it: `day.date`.
|
|
813
|
+
- `input[kpCalendarInput]` is `KpCalendarInput`. `<input kpCalendarInput>`: the hidden input the value is submitted by, with a `name`.
|
|
692
814
|
|
|
693
815
|
Attributes and CSS variables, by part:
|
|
694
816
|
|
|
@@ -700,7 +822,7 @@ Attributes and CSS variables, by part:
|
|
|
700
822
|
- next: Shows the month after.
|
|
701
823
|
- `data-disabled`: Present when it is disabled.
|
|
702
824
|
- cell: A day's cell.
|
|
703
|
-
- `data-selected`: Present on a chosen day,
|
|
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.
|
|
704
826
|
- `data-today`: Present on today.
|
|
705
827
|
- `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
|
|
706
828
|
- `data-disabled`: Present when it is disabled.
|
|
@@ -708,7 +830,7 @@ Attributes and CSS variables, by part:
|
|
|
708
830
|
- `data-range-start`: Present on the first day of a range.
|
|
709
831
|
- `data-range-end`: Present on the last day of a range.
|
|
710
832
|
- day: The button for a day.
|
|
711
|
-
- `data-selected`: Present on a chosen 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.
|
|
712
834
|
- `data-today`: Present on today.
|
|
713
835
|
- `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
|
|
714
836
|
- `data-disabled`: Present when it is disabled.
|
|
@@ -719,39 +841,39 @@ Attributes and CSS variables, by part:
|
|
|
719
841
|
### Carousel
|
|
720
842
|
|
|
721
843
|
```
|
|
722
|
-
import {
|
|
844
|
+
import { KpCarousel, KpCarouselViewport, KpCarouselItem, KpCarouselPrevious, KpCarouselNext, KpCarouselIndicator } from "@kirana-ui/angular"
|
|
723
845
|
```
|
|
724
846
|
|
|
725
|
-
Parts: `[
|
|
847
|
+
Parts: `[kpCarousel]`, `[kpCarouselViewport]`, `[kpCarouselItem]`, `[kpCarouselPrevious]`, `[kpCarouselNext]`, `[kpCarouselIndicator]`.
|
|
726
848
|
|
|
727
849
|
Anatomy:
|
|
728
850
|
|
|
729
851
|
```
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
852
|
+
kpCarousel
|
|
853
|
+
kpCarouselViewport
|
|
854
|
+
kpCarouselItem (repeated)
|
|
855
|
+
kpCarouselPrevious
|
|
856
|
+
kpCarouselNext
|
|
857
|
+
kpCarouselIndicator (repeated)
|
|
736
858
|
```
|
|
737
859
|
|
|
738
860
|
Props of its root:
|
|
739
861
|
|
|
740
862
|
- `[(index)]: number`: Which slide is at the start of the view: `[(index)]`.
|
|
741
|
-
- `defaultIndex?: number`: The slide it starts at, when the caller does not hold `index`. Read once.
|
|
863
|
+
- `defaultIndex?: number`: The slide it starts at, when the caller does not hold `index`. Read once. Default `0`.
|
|
742
864
|
- `orientation?: Orientation`: Whether the slides go across (the default) or down.
|
|
743
865
|
- `loop?: boolean`: Whether going on from the last slide comes round to the first.
|
|
744
866
|
- `(indexChanged): { index: number; details: ChangeDetails }`: Heard as another slide is about to be at the start of the view: `details.cancel()` keeps the index as it was.
|
|
745
867
|
|
|
746
868
|
Each part, and its own props:
|
|
747
869
|
|
|
748
|
-
- `[
|
|
749
|
-
- `[
|
|
750
|
-
- `[
|
|
870
|
+
- `[kpCarousel]` is `KpCarousel`. `exportAs: "kpCarousel"`. Its props are above.
|
|
871
|
+
- `[kpCarouselViewport]` is `KpCarouselViewport`.
|
|
872
|
+
- `[kpCarouselItem]` is `KpCarouselItem`.
|
|
751
873
|
- `index: number`: Required. Its place among the slides, from 0.
|
|
752
|
-
- `[
|
|
753
|
-
- `[
|
|
754
|
-
- `[
|
|
874
|
+
- `[kpCarouselPrevious]` is `KpCarouselPrevious`.
|
|
875
|
+
- `[kpCarouselNext]` is `KpCarouselNext`.
|
|
876
|
+
- `[kpCarouselIndicator]` is `KpCarouselIndicator`.
|
|
755
877
|
- `index: number`: Required. The slide it goes to, from 0.
|
|
756
878
|
|
|
757
879
|
Attributes and CSS variables, by part:
|
|
@@ -773,16 +895,16 @@ Attributes and CSS variables, by part:
|
|
|
773
895
|
### Checkbox
|
|
774
896
|
|
|
775
897
|
```
|
|
776
|
-
import {
|
|
898
|
+
import { KpCheckbox, KpCheckboxIndicator } from "@kirana-ui/angular"
|
|
777
899
|
```
|
|
778
900
|
|
|
779
|
-
Parts: `[
|
|
901
|
+
Parts: `[kpCheckbox]`, `[kpCheckboxIndicator]`.
|
|
780
902
|
|
|
781
903
|
Anatomy:
|
|
782
904
|
|
|
783
905
|
```
|
|
784
|
-
|
|
785
|
-
*
|
|
906
|
+
kpCheckbox
|
|
907
|
+
*kpCheckboxIndicator
|
|
786
908
|
```
|
|
787
909
|
|
|
788
910
|
Props of its root:
|
|
@@ -790,6 +912,7 @@ Props of its root:
|
|
|
790
912
|
- `[(checked)]: boolean`: Whether it is checked, when the caller holds it.
|
|
791
913
|
- `defaultChecked?: boolean`: Read once.
|
|
792
914
|
- `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.
|
|
793
916
|
- `disabled?: boolean`: Disabled: it cannot be changed.
|
|
794
917
|
- `readOnly?: boolean`: Shown as it is, focusable, not changeable.
|
|
795
918
|
- `required?: boolean`: Needed: in a `Field`, leaving it unchecked is then invalid.
|
|
@@ -800,8 +923,8 @@ Props of its root:
|
|
|
800
923
|
|
|
801
924
|
Each part, and its own props:
|
|
802
925
|
|
|
803
|
-
- `[
|
|
804
|
-
- `[
|
|
926
|
+
- `[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.
|
|
805
928
|
|
|
806
929
|
Attributes and CSS variables, by part:
|
|
807
930
|
|
|
@@ -812,6 +935,7 @@ Attributes and CSS variables, by part:
|
|
|
812
935
|
- `data-disabled`: Present when it is disabled.
|
|
813
936
|
- `data-readonly`: Present when it can be read but not changed.
|
|
814
937
|
- `data-required`: Present when the form needs it.
|
|
938
|
+
- `data-parent`: Present on the checkbox that stands for every box of its group.
|
|
815
939
|
- indicator: The mark. In the page while the box is checked or indeterminate.
|
|
816
940
|
- `data-checked`: Present when it is checked.
|
|
817
941
|
- `data-unchecked`: Present when it is not checked.
|
|
@@ -822,20 +946,41 @@ Attributes and CSS variables, by part:
|
|
|
822
946
|
- `data-starting-style`: Present for the first style of its entrance: what it animates in from.
|
|
823
947
|
- `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
|
|
824
948
|
|
|
949
|
+
### CheckboxGroup
|
|
950
|
+
|
|
951
|
+
```
|
|
952
|
+
import { KpCheckboxGroup } from "@kirana-ui/angular"
|
|
953
|
+
```
|
|
954
|
+
|
|
955
|
+
Props:
|
|
956
|
+
|
|
957
|
+
- `[(value)]: readonly string[]`: The values of the checked checkboxes, when the caller holds them.
|
|
958
|
+
- `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.
|
|
960
|
+
- `disabled?: boolean`: Disables every checkbox of the group.
|
|
961
|
+
- `(valueChanged): { value: string[]; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
|
|
962
|
+
|
|
963
|
+
`[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
|
+
|
|
965
|
+
Attributes and CSS variables, by part:
|
|
966
|
+
|
|
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`.
|
|
968
|
+
- `data-disabled`: Present when it is disabled.
|
|
969
|
+
|
|
825
970
|
### Collapsible
|
|
826
971
|
|
|
827
972
|
```
|
|
828
|
-
import {
|
|
973
|
+
import { KpCollapsible, KpCollapsibleTrigger, KpCollapsiblePanel } from "@kirana-ui/angular"
|
|
829
974
|
```
|
|
830
975
|
|
|
831
|
-
Parts: `[
|
|
976
|
+
Parts: `[kpCollapsible]`, `[kpCollapsibleTrigger]`, `[kpCollapsiblePanel]`.
|
|
832
977
|
|
|
833
978
|
Anatomy:
|
|
834
979
|
|
|
835
980
|
```
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
*
|
|
981
|
+
kpCollapsible
|
|
982
|
+
kpCollapsibleTrigger (repeated)
|
|
983
|
+
*kpCollapsiblePanel
|
|
839
984
|
```
|
|
840
985
|
|
|
841
986
|
Props of its root:
|
|
@@ -847,10 +992,10 @@ Props of its root:
|
|
|
847
992
|
|
|
848
993
|
Each part, and its own props:
|
|
849
994
|
|
|
850
|
-
- `[
|
|
851
|
-
- `[
|
|
852
|
-
- `[
|
|
853
|
-
- `*
|
|
995
|
+
- `[kpCollapsible]` is `KpCollapsible`. `exportAs: "kpCollapsible"`. Its props are above.
|
|
996
|
+
- `[kpCollapsibleTrigger]` is `KpCollapsibleTrigger`.
|
|
997
|
+
- `[kpCollapsiblePanel]` is `KpCollapsiblePanel`. Structural: written `*kpCollapsiblePanel`. `<div *kpCollapsiblePanel>`: in the page while open; `{ keepMounted: true }` keeps it, hidden.
|
|
998
|
+
- `*kpCollapsiblePanel: { keepMounted?: boolean } | ""`: The directive's own value: `*kpCollapsiblePanel="…"`. Its options: `{ keepMounted: true }` keeps the panel in the page, hidden, while it is closed.
|
|
854
999
|
|
|
855
1000
|
Attributes and CSS variables, by part:
|
|
856
1001
|
|
|
@@ -872,49 +1017,58 @@ Attributes and CSS variables, by part:
|
|
|
872
1017
|
### Combobox
|
|
873
1018
|
|
|
874
1019
|
```
|
|
875
|
-
import {
|
|
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"
|
|
876
1021
|
```
|
|
877
1022
|
|
|
878
|
-
Parts: `[
|
|
1023
|
+
Parts: `[kpCombobox]`, `input[kpComboboxInput]`, `[kpComboboxTrigger]`, `[kpComboboxValue]`, `[kpComboboxClear]`, `[kpComboboxChips]`, `[kpComboboxChip]`, `[kpComboboxChipRemove]`, `[kpComboboxPortal]`, `[kpComboboxPositioner]`, `[kpComboboxPopup]`, `[kpComboboxList]`, `[kpComboboxCollection]`, `[kpComboboxGroup]`, `[kpComboboxGroupLabel]`, `[kpComboboxSeparator]`, `[kpComboboxItem]`, `[kpComboboxItemIndicator]`, `[kpComboboxEmpty]`, `[kpComboboxStatus]`.
|
|
879
1024
|
|
|
880
1025
|
Anatomy:
|
|
881
1026
|
|
|
882
1027
|
```
|
|
883
|
-
|
|
884
|
-
input[
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
1028
|
+
kpCombobox
|
|
1029
|
+
input[kpComboboxInput]
|
|
1030
|
+
kpComboboxTrigger
|
|
1031
|
+
*kpComboboxValue (optional)
|
|
1032
|
+
*kpComboboxPortal
|
|
1033
|
+
kpComboboxPositioner
|
|
1034
|
+
kpComboboxPopup
|
|
1035
|
+
input[kpComboboxInput] (as above)
|
|
1036
|
+
kpComboboxList (optional)
|
|
1037
|
+
*kpComboboxCollection (optional)
|
|
1038
|
+
kpComboboxItem (repeated, as above)
|
|
1039
|
+
kpComboboxGroup (optional, repeated, as above)
|
|
1040
|
+
kpComboboxGroup (optional, repeated)
|
|
1041
|
+
*kpComboboxCollection (optional, as above)
|
|
1042
|
+
kpComboboxItem (repeated)
|
|
1043
|
+
*kpComboboxItemIndicator
|
|
1044
|
+
kpComboboxGroupLabel
|
|
1045
|
+
kpComboboxSeparator (repeated)
|
|
1046
|
+
*kpComboboxCollection (optional, as above)
|
|
1047
|
+
*kpComboboxEmpty
|
|
1048
|
+
kpComboboxStatus (optional)
|
|
1049
|
+
kpComboboxPopup (as above)
|
|
1050
|
+
kpComboboxStatus (optional, as above)
|
|
1051
|
+
*kpComboboxClear
|
|
1052
|
+
kpComboboxChips
|
|
1053
|
+
input[kpComboboxInput] (as above)
|
|
1054
|
+
kpComboboxChip (repeated)
|
|
1055
|
+
kpComboboxChipRemove
|
|
1056
|
+
input[kpComboboxHiddenInput] (Angular only)
|
|
904
1057
|
```
|
|
905
1058
|
|
|
906
1059
|
Props of its root:
|
|
907
1060
|
|
|
908
1061
|
- `[(value)]: Value | null`: The chosen value; `null` is "none".
|
|
909
1062
|
- `defaultValue?: NoInfer<Value> | null`: The value it starts with, when the caller does not hold `value`. Read once.
|
|
910
|
-
- `[(inputValue)]: string`: What the input says, `[(inputValue)]`. With `
|
|
1063
|
+
- `[(inputValue)]: string`: What the input says, `[(inputValue)]`. With `kpAutocomplete` the text is `[(value)]`.
|
|
911
1064
|
- `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once.
|
|
912
1065
|
- `[(open)]: boolean`: Whether the list is open, when the caller holds it.
|
|
913
1066
|
- `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
|
|
914
1067
|
- `disabled?: boolean`: Disabled: it cannot be changed.
|
|
1068
|
+
- `readOnly?: boolean`: Its value can be read and not changed: the list still opens and can be gone through, but no press and no Enter chooses, nothing typed is taken, and its clear and chip buttons do nothing. Its value is still submitted.
|
|
915
1069
|
- `name?: string`: With a name, the value is submitted with the form around it.
|
|
916
1070
|
- `form?: string`: The id of the form the control belongs to, when it is not inside it.
|
|
917
|
-
- `items?:
|
|
1071
|
+
- `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.
|
|
918
1072
|
- `filter?: ((label: string, query: string) => boolean) | null`: Whether an item is shown for what was typed; `null` shows every item.
|
|
919
1073
|
- `required?: boolean`: In a field, "none" is then wrong.
|
|
920
1074
|
- `multiple?: boolean`: Several values, each shown as a chip: they are `values`, not `value`.
|
|
@@ -924,46 +1078,53 @@ Props of its root:
|
|
|
924
1078
|
- `inline?: boolean`: The list is always in the page, with no popup: a command palette.
|
|
925
1079
|
- `virtualized?: ListCollection`: Every row, when only some are in the page: each item is then given its `index`.
|
|
926
1080
|
- `autoHighlight?: boolean`: The first item shown for what was typed is highlighted as one types, so Enter chooses it. Off by default.
|
|
927
|
-
- `mode?: "list" | "none"`: With `
|
|
928
|
-
- `openOnInputClick?: boolean`: With `
|
|
1081
|
+
- `mode?: "list" | "none"`: With `kpAutocomplete`: `"none"` shows the suggestions as the caller draws them.
|
|
1082
|
+
- `openOnInputClick?: boolean`: With `kpAutocomplete`: a press on the input opens the list.
|
|
929
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.
|
|
930
1084
|
- `(inputValueChanged): { value: string; details: ChangeDetails }`: Heard as the input's text is about to change; `details.cancel()` keeps it as it was.
|
|
931
1085
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as the list is about to open or close: `details.cancel()` keeps it as it was.
|
|
932
1086
|
|
|
933
1087
|
Each part, and its own props:
|
|
934
1088
|
|
|
935
|
-
- `[
|
|
936
|
-
- `input[
|
|
937
|
-
- `[
|
|
938
|
-
- `[
|
|
939
|
-
- `
|
|
940
|
-
- `[
|
|
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.
|
|
1090
|
+
- `input[kpComboboxInput]` is `KpComboboxInput`. `<input kpComboboxInput>`: what is typed filters the list, which is placed against it.
|
|
1091
|
+
- `[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.
|
|
1093
|
+
- `placeholder?: string`: Shown while nothing is chosen.
|
|
1094
|
+
- `[kpComboboxClear]` is `KpComboboxClear`. Structural: written `*kpComboboxClear`. `<button *kpComboboxClear>`: empties the input and the value; in the page while there is something to clear.
|
|
1095
|
+
- `[kpComboboxChips]` is `KpComboboxChips`. With `multiple`: what holds the chips and the input.
|
|
1096
|
+
- `[kpComboboxChip]` is `KpComboboxChip`. With `multiple`: one chosen value. Its `value` is what its remove button takes away.
|
|
941
1097
|
- `value: unknown`: Required. The chosen value this chip stands for.
|
|
942
|
-
- `[
|
|
943
|
-
- `[
|
|
944
|
-
- `[
|
|
945
|
-
- `[
|
|
946
|
-
- `[
|
|
947
|
-
- `[
|
|
948
|
-
- `
|
|
949
|
-
- `[
|
|
950
|
-
- `[
|
|
1098
|
+
- `[kpComboboxChipRemove]` is `KpComboboxChipRemove`.
|
|
1099
|
+
- `[kpComboboxPortal]` is `KpComboboxPortal`. Structural: written `*kpComboboxPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
1100
|
+
- `[kpComboboxPositioner]` is `KpComboboxPositioner`. Takes the positioner options ("Positioner options", above).
|
|
1101
|
+
- `[kpComboboxPopup]` is `KpComboboxPopup`.
|
|
1102
|
+
- `[kpComboboxList]` is `KpComboboxList`. The items' own box inside the popup, when the popup holds more than items (an input): it is then the listbox.
|
|
1103
|
+
- `[kpComboboxCollection]` is `KpComboboxCollection`. Structural: written `*kpComboboxCollection`. Its template is given the entry: `let entry` is a `ComboboxEntry`. `<ng-container *kpComboboxCollection="let entry">` draws the list from the root's `items`: once for each item left for what was typed, or for each group that has items left. With `of` (`*kpComboboxCollection="let item; of: group"`), for each of that group's items left. The root then filters, and no item hides itself.
|
|
1104
|
+
- `of?: ComboboxEntry`: Written after the directive's value: `*kpComboboxCollection="…; of: …"`. A group the root's `items` gave: its items left are then what is drawn.
|
|
1105
|
+
- `[kpComboboxGroup]` is `KpComboboxGroup`. Items that belong together, named by their `kpComboboxGroupLabel`. Hidden while none is shown.
|
|
1106
|
+
- `[kpComboboxGroupLabel]` is `KpComboboxGroupLabel`. Names the group it is in. With no group around it, it is plain text.
|
|
1107
|
+
- `[kpComboboxSeparator]` is `KpComboboxSeparator`. A line between groups.
|
|
1108
|
+
- `[kpComboboxItem]` is `KpComboboxItem`.
|
|
951
1109
|
- `value: unknown`: Required. What the combobox's value is while this item is chosen.
|
|
952
1110
|
- `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
|
|
953
1111
|
- `label?: string`: What is filtered and what the input shows; the item's text when left out.
|
|
954
1112
|
- `index?: number`: Its place among all the rows, in a virtualized list.
|
|
955
|
-
- `[
|
|
956
|
-
- `[
|
|
957
|
-
- `
|
|
1113
|
+
- `[kpComboboxItemIndicator]` is `KpComboboxItemIndicator`. Structural: written `*kpComboboxItemIndicator`. `<span *kpComboboxItemIndicator>`: in the page while its item is the chosen one.
|
|
1114
|
+
- `[kpComboboxEmpty]` is `KpComboboxEmpty`. Structural: written `*kpComboboxEmpty`. `<div *kpComboboxEmpty>`: in the page while no item is shown for what was typed.
|
|
1115
|
+
- `[kpComboboxStatus]` is `KpComboboxStatus`. Says how the list stands ("3 results", "Loading") to software that reads the page, as its text changes. Keep it in the page and change what it holds: inside the popup, or beside the input.
|
|
1116
|
+
- `input[kpComboboxHiddenInput]` is `KpComboboxHiddenInput`. `<input kpComboboxHiddenInput>`: submits the value with the form around it. Angular only.
|
|
958
1117
|
|
|
959
1118
|
Attributes and CSS variables, by part:
|
|
960
1119
|
|
|
961
1120
|
- 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.
|
|
962
1121
|
- `data-popup-open`: Present when the list is open.
|
|
963
1122
|
- `data-disabled`: Present when it is disabled.
|
|
1123
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
964
1124
|
- 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.
|
|
965
1125
|
- `data-popup-open`: Present when the list is open.
|
|
966
1126
|
- `data-disabled`: Present when it is disabled.
|
|
1127
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
967
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.
|
|
968
1129
|
- `data-open`: Present when it is open.
|
|
969
1130
|
- `data-closed`: Present when it is closed.
|
|
@@ -996,48 +1157,49 @@ Attributes and CSS variables, by part:
|
|
|
996
1157
|
### Command
|
|
997
1158
|
|
|
998
1159
|
```
|
|
999
|
-
import {
|
|
1160
|
+
import { KpCommand, KpCommandInput, KpCommandList, KpCommandEmpty, KpCommandGroup, KpCommandGroupHeading, KpCommandItem, KpCommandSeparator } from "@kirana-ui/angular"
|
|
1000
1161
|
```
|
|
1001
1162
|
|
|
1002
|
-
Parts: `[
|
|
1163
|
+
Parts: `[kpCommand]`, `[kpCommandInput]`, `[kpCommandList]`, `[kpCommandEmpty]`, `[kpCommandGroup]`, `[kpCommandGroupHeading]`, `[kpCommandItem]`, `[kpCommandSeparator]`.
|
|
1003
1164
|
|
|
1004
1165
|
Anatomy:
|
|
1005
1166
|
|
|
1006
1167
|
```
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
*
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1168
|
+
kpCommand
|
|
1169
|
+
kpCommandInput
|
|
1170
|
+
kpCommandList
|
|
1171
|
+
*kpCommandEmpty
|
|
1172
|
+
kpCommandGroup (optional, repeated)
|
|
1173
|
+
kpCommandGroupHeading
|
|
1174
|
+
kpCommandItem (repeated)
|
|
1175
|
+
kpCommandSeparator (repeated)
|
|
1015
1176
|
```
|
|
1016
1177
|
|
|
1017
1178
|
Props of its root:
|
|
1018
1179
|
|
|
1019
1180
|
- `[(inputValue)]: string`: What the input says.
|
|
1020
|
-
- `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once.
|
|
1181
|
+
- `defaultInputValue?: string`: The text the input starts with, when the caller does not hold `inputValue`. Read once. Default `""`.
|
|
1021
1182
|
- `filter?: ((label: string, query: string, keywords: readonly string[]) => boolean) | null`: Whether an item is shown for what was typed; `null` shows every item.
|
|
1022
1183
|
- `loop?: boolean`: Whether a step past an end of the list goes round to the other.
|
|
1184
|
+
- `autoHighlight?: boolean`: Whether the first item shown is highlighted from the start. Default: `true`.
|
|
1023
1185
|
- `disabled?: boolean`: Disabled: nothing can be typed or chosen.
|
|
1024
1186
|
- `(inputValueChanged): { value: string; details: ChangeDetails }`: Heard as the input's text is about to change: `details.cancel()` keeps it as it was.
|
|
1025
1187
|
- `(itemSelected): { value: string; details: ChangeDetails }`: An item was chosen.
|
|
1026
1188
|
|
|
1027
1189
|
Each part, and its own props:
|
|
1028
1190
|
|
|
1029
|
-
- `[
|
|
1030
|
-
- `[
|
|
1031
|
-
- `[
|
|
1032
|
-
- `[
|
|
1033
|
-
- `[
|
|
1034
|
-
- `[
|
|
1035
|
-
- `[
|
|
1191
|
+
- `[kpCommand]` is `KpCommand`. `exportAs: "kpCommand"`. Its props are above.
|
|
1192
|
+
- `[kpCommandInput]` is `KpCommandInput`.
|
|
1193
|
+
- `[kpCommandList]` is `KpCommandList`.
|
|
1194
|
+
- `[kpCommandEmpty]` is `KpCommandEmpty`. Structural: written `*kpCommandEmpty`. `<div *kpCommandEmpty>`: in the page while no item is shown for what was typed.
|
|
1195
|
+
- `[kpCommandGroup]` is `KpCommandGroup`. Items under a `kpCommandGroupHeading`. Hidden while none of them is shown.
|
|
1196
|
+
- `[kpCommandGroupHeading]` is `KpCommandGroupHeading`. A group's name.
|
|
1197
|
+
- `[kpCommandItem]` is `KpCommandItem`.
|
|
1036
1198
|
- `value: string`: Required. What `itemSelected` is told.
|
|
1037
1199
|
- `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
|
|
1038
1200
|
- `label?: string`: What is filtered; the item's text when left out.
|
|
1039
1201
|
- `keywords?: readonly string[]`: Other words the item answers to.
|
|
1040
|
-
- `[
|
|
1202
|
+
- `[kpCommandSeparator]` is `KpCommandSeparator`. A line between groups: gone while something is typed, unless `alwaysRender`.
|
|
1041
1203
|
- `alwaysRender?: boolean`: Stays while something is typed.
|
|
1042
1204
|
|
|
1043
1205
|
Attributes and CSS variables, by part:
|
|
@@ -1055,33 +1217,33 @@ Attributes and CSS variables, by part:
|
|
|
1055
1217
|
### ContextMenu
|
|
1056
1218
|
|
|
1057
1219
|
```
|
|
1058
|
-
import {
|
|
1220
|
+
import { KpMenu, KpContextMenuTrigger, KpMenuPortal, KpMenuPositioner, KpMenuPopup, KpMenuArrow, KpMenuItem, KpMenuLinkItem, KpMenuGroup, KpMenuGroupLabel, KpMenuSeparator, KpMenuCheckboxItem, KpMenuCheckboxItemIndicator, KpMenuRadioGroup, KpMenuRadioItem, KpMenuRadioItemIndicator, KpMenuSubmenuRoot, KpMenuSubmenuTrigger } from "@kirana-ui/angular"
|
|
1059
1221
|
```
|
|
1060
1222
|
|
|
1061
|
-
Parts: `[
|
|
1223
|
+
Parts: `[kpContextMenu]`, `[kpContextMenuTrigger]`, `[kpMenuPortal]`, `[kpMenuPositioner]`, `[kpMenuPopup]`, `[kpMenuArrow]`, `[kpMenuItem]`, `a[kpMenuLinkItem]`, `[kpMenuGroup]`, `[kpMenuGroupLabel]`, `[kpMenuSeparator]`, `[kpMenuCheckboxItem]`, `[kpMenuCheckboxItemIndicator]`, `[kpMenuRadioGroup]`, `[kpMenuRadioItem]`, `[kpMenuRadioItemIndicator]`, `[kpMenuSubmenuRoot]`, `[kpMenuSubmenuTrigger]`.
|
|
1062
1224
|
|
|
1063
1225
|
Anatomy:
|
|
1064
1226
|
|
|
1065
1227
|
```
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
*
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
a[
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
*
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
*
|
|
1081
|
-
|
|
1082
|
-
*
|
|
1083
|
-
|
|
1084
|
-
|
|
1228
|
+
kpContextMenu
|
|
1229
|
+
kpContextMenuTrigger
|
|
1230
|
+
*kpMenuPortal
|
|
1231
|
+
kpMenuPositioner
|
|
1232
|
+
kpMenuPopup
|
|
1233
|
+
kpMenuArrow
|
|
1234
|
+
kpMenuGroup (optional, repeated)
|
|
1235
|
+
kpMenuItem (repeated)
|
|
1236
|
+
a[kpMenuLinkItem] (repeated)
|
|
1237
|
+
kpMenuGroupLabel
|
|
1238
|
+
kpMenuCheckboxItem (repeated)
|
|
1239
|
+
*kpMenuCheckboxItemIndicator
|
|
1240
|
+
kpMenuRadioGroup (repeated)
|
|
1241
|
+
kpMenuRadioItem (repeated)
|
|
1242
|
+
*kpMenuRadioItemIndicator
|
|
1243
|
+
kpMenuSubmenuRoot (repeated)
|
|
1244
|
+
*kpMenuPortal (as above)
|
|
1245
|
+
kpMenuSubmenuTrigger
|
|
1246
|
+
kpMenuSeparator (repeated)
|
|
1085
1247
|
```
|
|
1086
1248
|
|
|
1087
1249
|
Props of its root:
|
|
@@ -1095,50 +1257,50 @@ Props of its root:
|
|
|
1095
1257
|
|
|
1096
1258
|
Each part, and its own props:
|
|
1097
1259
|
|
|
1098
|
-
- `[
|
|
1099
|
-
- `[
|
|
1100
|
-
- `[
|
|
1101
|
-
- `[
|
|
1102
|
-
- `[
|
|
1103
|
-
- `[
|
|
1104
|
-
- `[
|
|
1260
|
+
- `[kpContextMenu]` is `KpMenu`. `exportAs: "kpMenu"`. `kpContextMenu` in place of `kpMenu` is a menu for an area of the page, opened at the pointer: its trigger is `kpContextMenuTrigger`, its other parts the menu's. Its props are above.
|
|
1261
|
+
- `[kpContextMenuTrigger]` is `KpContextMenuTrigger`. The area a secondary press, or a long press on a touch screen, opens a `kpContextMenu` in.
|
|
1262
|
+
- `[kpMenuPortal]` is `KpMenuPortal`. Structural: written `*kpMenuPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
1263
|
+
- `[kpMenuPositioner]` is `KpMenuPositioner`. Takes the positioner options ("Positioner options", above).
|
|
1264
|
+
- `[kpMenuPopup]` is `KpMenuPopup`.
|
|
1265
|
+
- `[kpMenuArrow]` is `KpMenuArrow`.
|
|
1266
|
+
- `[kpMenuItem]` is `KpMenuItem`.
|
|
1105
1267
|
- `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
|
|
1106
1268
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1107
1269
|
- `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does.
|
|
1108
|
-
- `a[
|
|
1270
|
+
- `a[kpMenuLinkItem]` is `KpMenuLinkItem`. `<a kpMenuLinkItem href="…">`: an item that is a link.
|
|
1109
1271
|
- `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
|
|
1110
1272
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1111
1273
|
- `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does.
|
|
1112
|
-
- `[
|
|
1113
|
-
- `[
|
|
1114
|
-
- `[
|
|
1115
|
-
- `[
|
|
1274
|
+
- `[kpMenuGroup]` is `KpMenuGroup`. Items that belong together, named by their label.
|
|
1275
|
+
- `[kpMenuGroupLabel]` is `KpMenuGroupLabel`. Names the group it is in. With no group around it, it is plain text.
|
|
1276
|
+
- `[kpMenuSeparator]` is `KpMenuSeparator`. A line between items.
|
|
1277
|
+
- `[kpMenuCheckboxItem]` is `KpMenuCheckboxItem`. `exportAs: "kpMenuCheckboxItem"`.
|
|
1116
1278
|
- `[(checked)]: boolean`: Whether the item is checked, when the caller holds it.
|
|
1117
1279
|
- `defaultChecked?: boolean`: Whether the item starts checked, when the caller does not hold `checked`. Read once.
|
|
1118
1280
|
- `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
|
|
1119
1281
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1120
1282
|
- `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does not.
|
|
1121
1283
|
- `(checkedChanged): { checked: boolean; details: ChangeDetails }`: Heard as the item is about to be checked or unchecked: `details.cancel()` keeps it as it was.
|
|
1122
|
-
- `[
|
|
1123
|
-
- `[
|
|
1284
|
+
- `[kpMenuCheckboxItemIndicator]` is `KpMenuCheckboxItemIndicator`. Structural: written `*kpMenuCheckboxItemIndicator`. `<span *kpMenuCheckboxItemIndicator>`: in the page while its item is checked.
|
|
1285
|
+
- `[kpMenuRadioGroup]` is `KpMenuRadioGroup`. `exportAs: "kpMenuRadioGroup"`. Generic: `<Value = unknown>`.
|
|
1124
1286
|
- `[(value)]: Value | null`: The chosen value; `null` is "none".
|
|
1125
1287
|
- `defaultValue?: NoInfer<Value> | null`: The value it starts with, when the caller does not hold `value`. Read once.
|
|
1126
1288
|
- `disabled?: boolean`: Disables every item of the group.
|
|
1127
1289
|
- `(valueChanged): { value: Value; details: ChangeDetails }`: Told an item's own value, never `null`: a press chooses, and nothing takes the choice back.
|
|
1128
|
-
- `[
|
|
1290
|
+
- `[kpMenuRadioItem]` is `KpMenuRadioItem`.
|
|
1129
1291
|
- `value: unknown`: Required. What the radio group's value is while this item is the chosen one.
|
|
1130
1292
|
- `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
|
|
1131
1293
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1132
1294
|
- `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does not.
|
|
1133
|
-
- `[
|
|
1134
|
-
- `[
|
|
1295
|
+
- `[kpMenuRadioItemIndicator]` is `KpMenuRadioItemIndicator`. Structural: written `*kpMenuRadioItemIndicator`. `<span *kpMenuRadioItemIndicator>`: in the page while its item is the chosen one.
|
|
1296
|
+
- `[kpMenuSubmenuRoot]` is `KpMenuSubmenuRoot`. `exportAs: "kpMenuSubmenuRoot"`. A menu that one of this menu's items opens. Its trigger is `kpMenuSubmenuTrigger`.
|
|
1135
1297
|
- `[(open)]: boolean`: Whether it is open, when the caller holds it.
|
|
1136
1298
|
- `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
|
|
1137
1299
|
- `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
|
|
1138
1300
|
- `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
|
|
1139
1301
|
- `modal?: boolean`: Holds the page while the menu is open. Not for a submenu.
|
|
1140
1302
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
|
|
1141
|
-
- `[
|
|
1303
|
+
- `[kpMenuSubmenuTrigger]` is `KpMenuSubmenuTrigger`. On the item of a menu that opens the submenu around it (`kpMenuSubmenuRoot`).
|
|
1142
1304
|
|
|
1143
1305
|
Attributes and CSS variables, by part:
|
|
1144
1306
|
|
|
@@ -1197,25 +1359,25 @@ Attributes and CSS variables, by part:
|
|
|
1197
1359
|
### DateField
|
|
1198
1360
|
|
|
1199
1361
|
```
|
|
1200
|
-
import {
|
|
1362
|
+
import { KpDateField, KpDateFieldSegments, KpDateFieldSegment, KpDateFieldInput } from "@kirana-ui/angular"
|
|
1201
1363
|
```
|
|
1202
1364
|
|
|
1203
|
-
Parts: `[
|
|
1365
|
+
Parts: `[kpDateField]`, `[kpDateFieldSegments]`, `[kpDateFieldSegment]`, `input[kpDateFieldInput]`.
|
|
1204
1366
|
|
|
1205
1367
|
Anatomy:
|
|
1206
1368
|
|
|
1207
1369
|
```
|
|
1208
|
-
|
|
1209
|
-
*
|
|
1210
|
-
|
|
1211
|
-
input[
|
|
1370
|
+
kpDateField
|
|
1371
|
+
*kpDateFieldSegments
|
|
1372
|
+
kpDateFieldSegment (repeated)
|
|
1373
|
+
input[kpDateFieldInput]
|
|
1212
1374
|
```
|
|
1213
1375
|
|
|
1214
1376
|
Props of its root:
|
|
1215
1377
|
|
|
1216
1378
|
- `[(value)]: string | null`: The day typed, once all of it is: `[(value)]`.
|
|
1217
1379
|
- `defaultValue?: string | null`: The value it starts with, when the caller does not hold `value`. Read once.
|
|
1218
|
-
- `locale?: string`: The language and region that order the day, the month and the year.
|
|
1380
|
+
- `locale?: string`: The language and region that order the day, the month and the year. Default `"en-US"`.
|
|
1219
1381
|
- `min?: string`: The first and the last day it takes: outside them it says it is invalid.
|
|
1220
1382
|
- `max?: string`: The last day it takes.
|
|
1221
1383
|
- `placeholders?: Partial<Record<DateUnit, string>>`: What an empty part shows. Default: `dd`, `mm`, `yyyy`.
|
|
@@ -1228,11 +1390,11 @@ Props of its root:
|
|
|
1228
1390
|
|
|
1229
1391
|
Each part, and its own props:
|
|
1230
1392
|
|
|
1231
|
-
- `[
|
|
1232
|
-
- `[
|
|
1233
|
-
- `[
|
|
1393
|
+
- `[kpDateField]` is `KpDateField`. `exportAs: "kpDateField"`. Its props are above.
|
|
1394
|
+
- `[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.
|
|
1395
|
+
- `[kpDateFieldSegment]` is `KpDateFieldSegment`. One piece: a part that is typed, or what stands between two. It writes its own text.
|
|
1234
1396
|
- `segment: DateFieldSegment`: Required. The piece it is: an entry `DateField.Segments` gave.
|
|
1235
|
-
- `input[
|
|
1397
|
+
- `input[kpDateFieldInput]` is `KpDateFieldInput`. `<input kpDateFieldInput>`: the hidden input it is submitted by.
|
|
1236
1398
|
|
|
1237
1399
|
Attributes and CSS variables, by part:
|
|
1238
1400
|
|
|
@@ -1249,33 +1411,34 @@ Attributes and CSS variables, by part:
|
|
|
1249
1411
|
### DatePicker
|
|
1250
1412
|
|
|
1251
1413
|
```
|
|
1252
|
-
import {
|
|
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"
|
|
1253
1415
|
```
|
|
1254
1416
|
|
|
1255
|
-
Parts: `[
|
|
1417
|
+
Parts: `[kpDatePicker]`, `[kpDatePickerField]`, `[kpDateFieldSegments]`, `[kpDateFieldSegment]`, `input[kpDateFieldInput]`, `[kpPopoverTrigger]`, `[kpPopoverPortal]`, `[kpPopoverPositioner]`, `[kpPopoverPopup]`, `[kpDatePickerCalendar]`, `[kpCalendarHeading]`, `[kpCalendarPrevious]`, `[kpCalendarNext]`, `[kpCalendarMonths]`, `[kpCalendarGrid]`, `[kpCalendarWeekdays]`, `[kpCalendarHeadCell]`, `[kpCalendarWeeks]`, `[kpCalendarCell]`, `[kpCalendarDay]`.
|
|
1256
1418
|
|
|
1257
1419
|
Anatomy:
|
|
1258
1420
|
|
|
1259
1421
|
```
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
*
|
|
1263
|
-
|
|
1264
|
-
input[
|
|
1265
|
-
|
|
1266
|
-
*
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1422
|
+
kpDatePicker
|
|
1423
|
+
kpDatePickerField
|
|
1424
|
+
*kpDateFieldSegments
|
|
1425
|
+
kpDateFieldSegment (repeated)
|
|
1426
|
+
input[kpDateFieldInput]
|
|
1427
|
+
kpPopoverTrigger
|
|
1428
|
+
*kpPopoverPortal
|
|
1429
|
+
kpPopoverPositioner
|
|
1430
|
+
kpPopoverPopup
|
|
1431
|
+
kpDatePickerCalendar
|
|
1432
|
+
*kpCalendarMonths (optional)
|
|
1433
|
+
kpCalendarHeading
|
|
1434
|
+
kpCalendarGrid
|
|
1435
|
+
*kpCalendarWeekdays
|
|
1436
|
+
kpCalendarHeadCell (repeated)
|
|
1437
|
+
*kpCalendarWeeks
|
|
1438
|
+
kpCalendarCell (repeated)
|
|
1439
|
+
kpCalendarDay
|
|
1440
|
+
kpCalendarPrevious
|
|
1441
|
+
kpCalendarNext
|
|
1279
1442
|
```
|
|
1280
1443
|
|
|
1281
1444
|
Props of its root:
|
|
@@ -1290,6 +1453,10 @@ Props of its root:
|
|
|
1290
1453
|
- `isDateUnavailable?: CalendarProps["isDateUnavailable"]`: Days that cannot be picked in the calendar.
|
|
1291
1454
|
- `calendarSystem?: CalendarProps["calendarSystem"]`: The calendar its months are laid out in, when it is not the Gregorian one.
|
|
1292
1455
|
- `fixedWeeks?: boolean`: Always six rows of days.
|
|
1456
|
+
- `months?: number`: How many months the calendar shows side by side.
|
|
1457
|
+
- `pagedNavigation?: boolean`: With several `months`: Previous and Next turn them all rather than one month.
|
|
1458
|
+
- `[(month)]: string`: The first day of the month the calendar shows (any day of it): `[(month)]`.
|
|
1459
|
+
- `defaultMonth?: string`: The month the calendar starts on, when the caller does not hold `month`. Read once.
|
|
1293
1460
|
- `placeholders?: DateFieldProps["placeholders"]`: What an empty part of the field shows.
|
|
1294
1461
|
- `disabled?: boolean`: Disabled: it cannot be changed.
|
|
1295
1462
|
- `readOnly?: boolean`: Shown as it is, focusable, not changeable.
|
|
@@ -1298,31 +1465,36 @@ Props of its root:
|
|
|
1298
1465
|
- `form?: string`: The id of the form it belongs to, when it is not inside it.
|
|
1299
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.
|
|
1300
1467
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as the calendar is about to open or close: `details.cancel()` keeps it as it was.
|
|
1468
|
+
- `(monthChanged): { month: string; details: ChangeDetails }`: The calendar is about to show another month: its first day, and `details.cancel()`.
|
|
1301
1469
|
|
|
1302
1470
|
Each part, and its own props:
|
|
1303
1471
|
|
|
1304
|
-
- `[
|
|
1305
|
-
- `[
|
|
1306
|
-
- `[
|
|
1307
|
-
- `[
|
|
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.
|
|
1474
|
+
- `[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
|
+
- `[kpDateFieldSegment]` is `KpDateFieldSegment`. One piece: a part that is typed, or what stands between two. It writes its own text.
|
|
1308
1476
|
- `segment: DateFieldSegment`: Required. The piece it is: an entry `DateField.Segments` gave.
|
|
1309
|
-
- `input[
|
|
1310
|
-
- `[
|
|
1311
|
-
- `
|
|
1312
|
-
- `
|
|
1313
|
-
- `
|
|
1314
|
-
- `[
|
|
1315
|
-
- `[
|
|
1316
|
-
- `[
|
|
1317
|
-
- `[
|
|
1318
|
-
- `[
|
|
1319
|
-
- `[
|
|
1320
|
-
- `[
|
|
1477
|
+
- `input[kpDateFieldInput]` is `KpDateFieldInput`. `<input kpDateFieldInput>`: the hidden input it is submitted by.
|
|
1478
|
+
- `[kpPopoverTrigger]` is `KpPopoverTrigger`.
|
|
1479
|
+
- `openOnHover?: boolean`: Whether the pointer resting on the trigger opens the popover too. A press and the keyboard still open it, and a press on one the pointer opened keeps it open. Default `false`.
|
|
1480
|
+
- `delay?: number`: How long the pointer rests on the trigger before the popover opens, in milliseconds. Default 300.
|
|
1481
|
+
- `closeDelay?: number`: How long after the pointer leaves a popover it opened closes, in milliseconds. Default 0.
|
|
1482
|
+
- `[kpPopoverPortal]` is `KpPopoverPortal`. Structural: written `*kpPopoverPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
1483
|
+
- `[kpPopoverPositioner]` is `KpPopoverPositioner`. Takes the positioner options ("Positioner options", above).
|
|
1484
|
+
- `[kpPopoverPopup]` is `KpPopoverPopup`.
|
|
1485
|
+
- `[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.
|
|
1487
|
+
- `[kpCalendarPrevious]` is `KpCalendarPrevious`.
|
|
1488
|
+
- `[kpCalendarNext]` is `KpCalendarNext`.
|
|
1489
|
+
- `[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.
|
|
1490
|
+
- `[kpCalendarGrid]` is `KpCalendarGrid`. The table of a month's days: a grid the arrows move in, from one month shown into the next.
|
|
1491
|
+
- `[kpCalendarWeekdays]` is `KpCalendarWeekdays`. Structural: written `*kpCalendarWeekdays`. Its template is given the entry: `let entry` is a `CalendarWeekday`. `<th *kpCalendarWeekdays="let weekday">`: once for each day of the week.
|
|
1492
|
+
- `[kpCalendarHeadCell]` is `KpCalendarHeadCell`. A column's heading: a day of the week.
|
|
1321
1493
|
- `weekday: CalendarWeekday`: Required. The day of the week it heads: an entry `Calendar.Weekdays` gave.
|
|
1322
|
-
- `[
|
|
1323
|
-
- `[
|
|
1494
|
+
- `[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
|
+
- `[kpCalendarCell]` is `KpCalendarCell`.
|
|
1324
1496
|
- `date: string`: Required. The day it holds, as `Calendar.Weeks` gave it: `day.date`.
|
|
1325
|
-
- `[
|
|
1497
|
+
- `[kpCalendarDay]` is `KpCalendarDay`.
|
|
1326
1498
|
- `date: string`: Required. The day it is the button of, as `Calendar.Weeks` gave it: `day.date`.
|
|
1327
1499
|
|
|
1328
1500
|
Attributes and CSS variables, by part:
|
|
@@ -1363,7 +1535,7 @@ Attributes and CSS variables, by part:
|
|
|
1363
1535
|
- next: Shows the month after.
|
|
1364
1536
|
- `data-disabled`: Present when it is disabled.
|
|
1365
1537
|
- cell: A day's cell.
|
|
1366
|
-
- `data-selected`: Present on a chosen day,
|
|
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.
|
|
1367
1539
|
- `data-today`: Present on today.
|
|
1368
1540
|
- `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
|
|
1369
1541
|
- `data-disabled`: Present when it is disabled.
|
|
@@ -1371,7 +1543,7 @@ Attributes and CSS variables, by part:
|
|
|
1371
1543
|
- `data-range-start`: Present on the first day of a range.
|
|
1372
1544
|
- `data-range-end`: Present on the last day of a range.
|
|
1373
1545
|
- day: The button for a day.
|
|
1374
|
-
- `data-selected`: Present on a chosen 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.
|
|
1375
1547
|
- `data-today`: Present on today.
|
|
1376
1548
|
- `data-outside-month`: Present on the days of the month before and after that fill the first and last weeks.
|
|
1377
1549
|
- `data-disabled`: Present when it is disabled.
|
|
@@ -1382,22 +1554,23 @@ Attributes and CSS variables, by part:
|
|
|
1382
1554
|
### Dialog
|
|
1383
1555
|
|
|
1384
1556
|
```
|
|
1385
|
-
import {
|
|
1557
|
+
import { KpDialog, KpDialogTrigger, KpDialogPortal, KpDialogBackdrop, KpDialogViewport, KpDialogPopup, KpDialogTitle, KpDialogDescription, KpDialogClose } from "@kirana-ui/angular"
|
|
1386
1558
|
```
|
|
1387
1559
|
|
|
1388
|
-
Parts: `[
|
|
1560
|
+
Parts: `[kpDialog]`, `[kpDialogTrigger]`, `[kpDialogPortal]`, `[kpDialogBackdrop]`, `[kpDialogViewport]`, `[kpDialogPopup]`, `[kpDialogTitle]`, `[kpDialogDescription]`, `[kpDialogClose]`.
|
|
1389
1561
|
|
|
1390
1562
|
Anatomy:
|
|
1391
1563
|
|
|
1392
1564
|
```
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
*
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1565
|
+
kpDialog
|
|
1566
|
+
kpDialogTrigger
|
|
1567
|
+
*kpDialogPortal
|
|
1568
|
+
kpDialogBackdrop
|
|
1569
|
+
kpDialogViewport (optional)
|
|
1570
|
+
kpDialogPopup
|
|
1571
|
+
kpDialogTitle
|
|
1572
|
+
kpDialogDescription
|
|
1573
|
+
kpDialogClose
|
|
1401
1574
|
```
|
|
1402
1575
|
|
|
1403
1576
|
Props of its root:
|
|
@@ -1406,23 +1579,24 @@ Props of its root:
|
|
|
1406
1579
|
- `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
|
|
1407
1580
|
- `modal?: boolean`: Blocks the page behind it and traps focus. Default `true`.
|
|
1408
1581
|
- `dismissible?: boolean`: Whether a press outside closes it. Default `true`.
|
|
1409
|
-
- `swipeDirection?: DrawerSide`: With `
|
|
1410
|
-
- `snapPoints?: readonly DrawerSnapPoint[]`: With `
|
|
1411
|
-
- `[(snapPoint)]: DrawerSnapPoint`: With `
|
|
1412
|
-
- `defaultSnapPoint?: DrawerSnapPoint`: With `
|
|
1413
|
-
- `(snapPointChanged): { snapPoint: DrawerSnapPoint; details: ChangeDetails }`: With `
|
|
1582
|
+
- `swipeDirection?: DrawerSide`: With `kpDrawer`: the way it is dragged to close it. Default: `"down"`.
|
|
1583
|
+
- `snapPoints?: readonly DrawerSnapPoint[]`: With `kpDrawer`: places it rests at, each the share of itself that shows.
|
|
1584
|
+
- `[(snapPoint)]: DrawerSnapPoint`: With `kpDrawer`: which of them it rests at, `[(snapPoint)]`.
|
|
1585
|
+
- `defaultSnapPoint?: DrawerSnapPoint`: With `kpDrawer`: where it opens. Default: the smallest.
|
|
1586
|
+
- `(snapPointChanged): { snapPoint: DrawerSnapPoint; details: ChangeDetails }`: With `kpDrawer`: heard as it is about to rest at another snap point; `details.cancel()` keeps it where it was.
|
|
1414
1587
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
|
|
1415
1588
|
|
|
1416
1589
|
Each part, and its own props:
|
|
1417
1590
|
|
|
1418
|
-
- `[
|
|
1419
|
-
- `[
|
|
1420
|
-
- `[
|
|
1421
|
-
- `[
|
|
1422
|
-
- `[
|
|
1423
|
-
- `[
|
|
1424
|
-
- `[
|
|
1425
|
-
- `[
|
|
1591
|
+
- `[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
|
+
- `[kpDialogTrigger]` is `KpDialogTrigger`.
|
|
1593
|
+
- `[kpDialogPortal]` is `KpDialogPortal`. Structural: written `*kpDialogPortal`. `<ng-template kpDialogPortal>` or `*kpDialogPortal`: its content at the end of the page while open.
|
|
1594
|
+
- `[kpDialogBackdrop]` is `KpDialogBackdrop`.
|
|
1595
|
+
- `[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
|
+
- `[kpDialogPopup]` is `KpDialogPopup`.
|
|
1597
|
+
- `[kpDialogTitle]` is `KpDialogTitle`. The heading that names the dialog.
|
|
1598
|
+
- `[kpDialogDescription]` is `KpDialogDescription`. The text that describes the dialog.
|
|
1599
|
+
- `[kpDialogClose]` is `KpDialogClose`. A button that closes the dialog.
|
|
1426
1600
|
|
|
1427
1601
|
Attributes and CSS variables, by part:
|
|
1428
1602
|
|
|
@@ -1433,6 +1607,13 @@ Attributes and CSS variables, by part:
|
|
|
1433
1607
|
- `data-closed`: Present when it is closed.
|
|
1434
1608
|
- `data-starting-style`: Present for the first style of its entrance: what it animates in from.
|
|
1435
1609
|
- `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
|
|
1610
|
+
- viewport: What a long dialog scrolls in: it lies over the page, between the backdrop and the popup. A press on it beside the popup is a press outside the dialog; a press on its scrollbar is not.
|
|
1611
|
+
- `data-open`: Present when it is open.
|
|
1612
|
+
- `data-closed`: Present when it is closed.
|
|
1613
|
+
- `data-starting-style`: Present for the first style of its entrance: what it animates in from.
|
|
1614
|
+
- `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
|
|
1615
|
+
- `data-nested`: Present when the dialog opened over another dialog.
|
|
1616
|
+
- `data-nested-dialog-open`: Present when another dialog is open above this one.
|
|
1436
1617
|
- popup: The dialog itself.
|
|
1437
1618
|
- `data-open`: Present when it is open.
|
|
1438
1619
|
- `data-closed`: Present when it is closed.
|
|
@@ -1444,22 +1625,22 @@ Attributes and CSS variables, by part:
|
|
|
1444
1625
|
### Drawer
|
|
1445
1626
|
|
|
1446
1627
|
```
|
|
1447
|
-
import {
|
|
1628
|
+
import { KpDialog, KpDialogTrigger, KpDialogPortal, KpDialogBackdrop, KpDialogPopup, KpDialogTitle, KpDialogDescription, KpDialogClose } from "@kirana-ui/angular"
|
|
1448
1629
|
```
|
|
1449
1630
|
|
|
1450
|
-
Parts: `[
|
|
1631
|
+
Parts: `[kpDrawer]`, `[kpDialogTrigger]`, `[kpDialogPortal]`, `[kpDialogBackdrop]`, `[kpDialogPopup]`, `[kpDialogTitle]`, `[kpDialogDescription]`, `[kpDialogClose]`.
|
|
1451
1632
|
|
|
1452
1633
|
Anatomy:
|
|
1453
1634
|
|
|
1454
1635
|
```
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
*
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1636
|
+
kpDrawer
|
|
1637
|
+
kpDialogTrigger
|
|
1638
|
+
*kpDialogPortal
|
|
1639
|
+
kpDialogBackdrop
|
|
1640
|
+
kpDialogPopup
|
|
1641
|
+
kpDialogTitle
|
|
1642
|
+
kpDialogDescription
|
|
1643
|
+
kpDialogClose
|
|
1463
1644
|
```
|
|
1464
1645
|
|
|
1465
1646
|
Props of its root:
|
|
@@ -1468,23 +1649,23 @@ Props of its root:
|
|
|
1468
1649
|
- `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
|
|
1469
1650
|
- `modal?: boolean`: Blocks the page behind it and traps focus. Default `true`.
|
|
1470
1651
|
- `dismissible?: boolean`: Whether a press outside closes it. Default `true`.
|
|
1471
|
-
- `swipeDirection?: DrawerSide`: With `
|
|
1472
|
-
- `snapPoints?: readonly DrawerSnapPoint[]`: With `
|
|
1473
|
-
- `[(snapPoint)]: DrawerSnapPoint`: With `
|
|
1474
|
-
- `defaultSnapPoint?: DrawerSnapPoint`: With `
|
|
1475
|
-
- `(snapPointChanged): { snapPoint: DrawerSnapPoint; details: ChangeDetails }`: With `
|
|
1652
|
+
- `swipeDirection?: DrawerSide`: With `kpDrawer`: the way it is dragged to close it. Default: `"down"`.
|
|
1653
|
+
- `snapPoints?: readonly DrawerSnapPoint[]`: With `kpDrawer`: places it rests at, each the share of itself that shows.
|
|
1654
|
+
- `[(snapPoint)]: DrawerSnapPoint`: With `kpDrawer`: which of them it rests at, `[(snapPoint)]`.
|
|
1655
|
+
- `defaultSnapPoint?: DrawerSnapPoint`: With `kpDrawer`: where it opens. Default: the smallest.
|
|
1656
|
+
- `(snapPointChanged): { snapPoint: DrawerSnapPoint; details: ChangeDetails }`: With `kpDrawer`: heard as it is about to rest at another snap point; `details.cancel()` keeps it where it was.
|
|
1476
1657
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
|
|
1477
1658
|
|
|
1478
1659
|
Each part, and its own props:
|
|
1479
1660
|
|
|
1480
|
-
- `[
|
|
1481
|
-
- `[
|
|
1482
|
-
- `[
|
|
1483
|
-
- `[
|
|
1484
|
-
- `[
|
|
1485
|
-
- `[
|
|
1486
|
-
- `[
|
|
1487
|
-
- `[
|
|
1661
|
+
- `[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
|
+
- `[kpDialogTrigger]` is `KpDialogTrigger`.
|
|
1663
|
+
- `[kpDialogPortal]` is `KpDialogPortal`. Structural: written `*kpDialogPortal`. `<ng-template kpDialogPortal>` or `*kpDialogPortal`: its content at the end of the page while open.
|
|
1664
|
+
- `[kpDialogBackdrop]` is `KpDialogBackdrop`.
|
|
1665
|
+
- `[kpDialogPopup]` is `KpDialogPopup`.
|
|
1666
|
+
- `[kpDialogTitle]` is `KpDialogTitle`. The heading that names the dialog.
|
|
1667
|
+
- `[kpDialogDescription]` is `KpDialogDescription`. The text that describes the dialog.
|
|
1668
|
+
- `[kpDialogClose]` is `KpDialogClose`. A button that closes the dialog.
|
|
1488
1669
|
|
|
1489
1670
|
Attributes and CSS variables, by part:
|
|
1490
1671
|
|
|
@@ -1526,20 +1707,20 @@ Attributes and CSS variables, by part:
|
|
|
1526
1707
|
### Field
|
|
1527
1708
|
|
|
1528
1709
|
```
|
|
1529
|
-
import {
|
|
1710
|
+
import { KpField, KpFieldLabel, KpFieldControl, KpFieldDescription, KpFieldError, KpFieldValidity } from "@kirana-ui/angular"
|
|
1530
1711
|
```
|
|
1531
1712
|
|
|
1532
|
-
Parts: `[
|
|
1713
|
+
Parts: `[kpField]`, `[kpFieldLabel]`, `[kpFieldControl]`, `[kpFieldDescription]`, `[kpFieldError]`, `[kpFieldValidity]`.
|
|
1533
1714
|
|
|
1534
1715
|
Anatomy:
|
|
1535
1716
|
|
|
1536
1717
|
```
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
*
|
|
1542
|
-
*
|
|
1718
|
+
kpField
|
|
1719
|
+
kpFieldLabel
|
|
1720
|
+
kpFieldControl
|
|
1721
|
+
kpFieldDescription
|
|
1722
|
+
*kpFieldError
|
|
1723
|
+
*kpFieldValidity
|
|
1543
1724
|
```
|
|
1544
1725
|
|
|
1545
1726
|
Props of its root:
|
|
@@ -1549,17 +1730,17 @@ Props of its root:
|
|
|
1549
1730
|
- `invalid?: boolean`: Invalid whatever the value: an error known from elsewhere.
|
|
1550
1731
|
- `validate?: ( value: string ) => string | readonly string[] | null | Promise<string | readonly string[] | null>`: The field's own check, after the browser's: a message or several when the value is wrong, `null` when it is right. It may answer later, with a promise.
|
|
1551
1732
|
- `validationMode?: ValidationMode`: When the value is checked; the form's by default, else `"onSubmit"`.
|
|
1552
|
-
- `validationDebounceTime?: number`: With `"onChange"`, how long the value must rest before it is checked, in milliseconds.
|
|
1733
|
+
- `validationDebounceTime?: number`: With `"onChange"`, how long the value must rest before it is checked, in milliseconds. Default `0`.
|
|
1553
1734
|
|
|
1554
1735
|
Each part, and its own props:
|
|
1555
1736
|
|
|
1556
|
-
- `[
|
|
1557
|
-
- `[
|
|
1558
|
-
- `[
|
|
1559
|
-
- `[
|
|
1560
|
-
- `[
|
|
1561
|
-
- `*
|
|
1562
|
-
- `[
|
|
1737
|
+
- `[kpField]` is `KpField`. `exportAs: "kpField"`. Its props are above.
|
|
1738
|
+
- `[kpFieldLabel]` is `KpFieldLabel`.
|
|
1739
|
+
- `[kpFieldControl]` is `KpFieldControl`. On the control: an `<input>`, a `<textarea>` or a `<select>`.
|
|
1740
|
+
- `[kpFieldDescription]` is `KpFieldDescription`.
|
|
1741
|
+
- `[kpFieldError]` is `KpFieldError`. Structural: written `*kpFieldError`. `<div *kpFieldError>`: in the page while something is wrong, with the message as its text unless it has content of its own. `*kpFieldError="'valueMissing'"` shows for only that finding of the browser's, `*kpFieldError="true"` always.
|
|
1742
|
+
- `*kpFieldError: ValidityKey | boolean | ""`: The directive's own value: `*kpFieldError="…"`. One of the browser's findings (`"valueMissing"`) to show for only that; `true` to show always.
|
|
1743
|
+
- `[kpFieldValidity]` is `KpFieldValidity`. Structural: written `*kpFieldValidity`. Its template is given the entry: `let entry` is a `FieldValidity`. `<ng-container *kpFieldValidity="let validity">`: draws its template with the field's validity.
|
|
1563
1744
|
|
|
1564
1745
|
Attributes and CSS variables, by part:
|
|
1565
1746
|
|
|
@@ -1609,16 +1790,16 @@ Attributes and CSS variables, by part:
|
|
|
1609
1790
|
### Fieldset
|
|
1610
1791
|
|
|
1611
1792
|
```
|
|
1612
|
-
import {
|
|
1793
|
+
import { KpFieldset, KpFieldsetLegend } from "@kirana-ui/angular"
|
|
1613
1794
|
```
|
|
1614
1795
|
|
|
1615
|
-
Parts: `[
|
|
1796
|
+
Parts: `[kpFieldset]`, `[kpFieldsetLegend]`.
|
|
1616
1797
|
|
|
1617
1798
|
Anatomy:
|
|
1618
1799
|
|
|
1619
1800
|
```
|
|
1620
|
-
|
|
1621
|
-
|
|
1801
|
+
kpFieldset
|
|
1802
|
+
kpFieldsetLegend
|
|
1622
1803
|
```
|
|
1623
1804
|
|
|
1624
1805
|
Props of its root:
|
|
@@ -1627,8 +1808,8 @@ Props of its root:
|
|
|
1627
1808
|
|
|
1628
1809
|
Each part, and its own props:
|
|
1629
1810
|
|
|
1630
|
-
- `[
|
|
1631
|
-
- `[
|
|
1811
|
+
- `[kpFieldset]` is `KpFieldset`. `exportAs: "kpFieldset"`. Its props are above.
|
|
1812
|
+
- `[kpFieldsetLegend]` is `KpFieldsetLegend`.
|
|
1632
1813
|
|
|
1633
1814
|
Attributes and CSS variables, by part:
|
|
1634
1815
|
|
|
@@ -1640,7 +1821,7 @@ Attributes and CSS variables, by part:
|
|
|
1640
1821
|
### Form
|
|
1641
1822
|
|
|
1642
1823
|
```
|
|
1643
|
-
import {
|
|
1824
|
+
import { KpForm } from "@kirana-ui/angular"
|
|
1644
1825
|
```
|
|
1645
1826
|
|
|
1646
1827
|
Props:
|
|
@@ -1650,46 +1831,46 @@ Props:
|
|
|
1650
1831
|
- `(formSubmit): { values: FormValues; details: ChangeDetails }`: Every field is valid. Given this, the page is not left: the values come as an object. Without it, the form submits as a form does.
|
|
1651
1832
|
- `(clearErrors): FormErrors`: A field's value changed while it showed one of `errors`: what is left of them.
|
|
1652
1833
|
|
|
1653
|
-
`form[
|
|
1834
|
+
`form[kpForm]` is `KpForm`. `exportAs: "kpForm"`. On a `<form>`: its fields say what is wrong, and `(formSubmit)` gives the values once all are valid. As with Angular's own forms, the page is left only when the form has an `action`.
|
|
1654
1835
|
|
|
1655
1836
|
### HoverCard
|
|
1656
1837
|
|
|
1657
1838
|
```
|
|
1658
|
-
import {
|
|
1839
|
+
import { KpHoverCard, KpHoverCardTrigger, KpHoverCardPortal, KpHoverCardPositioner, KpHoverCardPopup, KpHoverCardArrow } from "@kirana-ui/angular"
|
|
1659
1840
|
```
|
|
1660
1841
|
|
|
1661
|
-
Parts: `[
|
|
1842
|
+
Parts: `[kpHoverCard]`, `[kpHoverCardTrigger]`, `[kpHoverCardPortal]`, `[kpHoverCardPositioner]`, `[kpHoverCardPopup]`, `[kpHoverCardArrow]`.
|
|
1662
1843
|
|
|
1663
1844
|
Anatomy:
|
|
1664
1845
|
|
|
1665
1846
|
```
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
*
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1847
|
+
kpHoverCard
|
|
1848
|
+
kpHoverCardTrigger
|
|
1849
|
+
*kpHoverCardPortal
|
|
1850
|
+
kpHoverCardPositioner
|
|
1851
|
+
kpHoverCardPopup
|
|
1852
|
+
kpHoverCardArrow
|
|
1672
1853
|
```
|
|
1673
1854
|
|
|
1674
1855
|
Props of its root:
|
|
1675
1856
|
|
|
1676
1857
|
- `[(open)]: boolean`: Whether it is open, when the caller holds it.
|
|
1677
1858
|
- `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
|
|
1678
|
-
- `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds.
|
|
1679
|
-
- `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds.
|
|
1859
|
+
- `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds. Default `600`.
|
|
1860
|
+
- `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds. Default `300`.
|
|
1680
1861
|
- `disabled?: boolean`: Disabled: the pointer and focus do not open it.
|
|
1681
1862
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
|
|
1682
1863
|
|
|
1683
1864
|
Each part, and its own props:
|
|
1684
1865
|
|
|
1685
|
-
- `[
|
|
1686
|
-
- `[
|
|
1866
|
+
- `[kpHoverCard]` is `KpHoverCard`. `exportAs: "kpHoverCard"`. On any element, or on `<ng-container>` to draw none. Its props are above.
|
|
1867
|
+
- `[kpHoverCardTrigger]` is `KpHoverCardTrigger`.
|
|
1687
1868
|
- `delay?: number`: Its own waits, which come before the root's.
|
|
1688
1869
|
- `closeDelay?: number`: How long after the pointer leaves this trigger's popup closes, in milliseconds.
|
|
1689
|
-
- `[
|
|
1690
|
-
- `[
|
|
1691
|
-
- `[
|
|
1692
|
-
- `[
|
|
1870
|
+
- `[kpHoverCardPortal]` is `KpHoverCardPortal`. Structural: written `*kpHoverCardPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
1871
|
+
- `[kpHoverCardPositioner]` is `KpHoverCardPositioner`. Takes the positioner options ("Positioner options", above).
|
|
1872
|
+
- `[kpHoverCardPopup]` is `KpHoverCardPopup`.
|
|
1873
|
+
- `[kpHoverCardArrow]` is `KpHoverCardArrow`.
|
|
1693
1874
|
|
|
1694
1875
|
Attributes and CSS variables, by part:
|
|
1695
1876
|
|
|
@@ -1721,7 +1902,7 @@ Attributes and CSS variables, by part:
|
|
|
1721
1902
|
### Input
|
|
1722
1903
|
|
|
1723
1904
|
```
|
|
1724
|
-
import {
|
|
1905
|
+
import { KpInput } from "@kirana-ui/angular"
|
|
1725
1906
|
```
|
|
1726
1907
|
|
|
1727
1908
|
Props:
|
|
@@ -1729,7 +1910,7 @@ Props:
|
|
|
1729
1910
|
- `disabled?: boolean`: Disabled: nothing can be typed in it.
|
|
1730
1911
|
- `(valueChanged): { value: string; details: ChangeDetails }`: What was typed, as text, each time it changes.
|
|
1731
1912
|
|
|
1732
|
-
`[
|
|
1913
|
+
`[kpInput]` is `KpInput`. `exportAs: "kpInput"`. `<input kpInput>` or `<textarea kpInput>`: it says its state, and inside a `kpField` it is the field's control. Its value is the element's own (`[value]`, `ngModel`).
|
|
1733
1914
|
|
|
1734
1915
|
Attributes and CSS variables, by part:
|
|
1735
1916
|
|
|
@@ -1745,10 +1926,10 @@ Attributes and CSS variables, by part:
|
|
|
1745
1926
|
### Label
|
|
1746
1927
|
|
|
1747
1928
|
```
|
|
1748
|
-
import {
|
|
1929
|
+
import { KpLabel } from "@kirana-ui/angular"
|
|
1749
1930
|
```
|
|
1750
1931
|
|
|
1751
|
-
`[
|
|
1932
|
+
`[kpLabel]` is `KpLabel`. `exportAs: "kpLabel"`. `<label kpLabel>`. Inside a `kpField` it is the field's label.
|
|
1752
1933
|
|
|
1753
1934
|
Attributes and CSS variables, by part:
|
|
1754
1935
|
|
|
@@ -1764,19 +1945,19 @@ Attributes and CSS variables, by part:
|
|
|
1764
1945
|
### Listbox
|
|
1765
1946
|
|
|
1766
1947
|
```
|
|
1767
|
-
import {
|
|
1948
|
+
import { KpListbox, KpListboxItem, KpListboxItemIndicator, KpListboxGroup, KpListboxGroupLabel } from "@kirana-ui/angular"
|
|
1768
1949
|
```
|
|
1769
1950
|
|
|
1770
|
-
Parts: `[
|
|
1951
|
+
Parts: `[kpListbox]`, `[kpListboxItem]`, `[kpListboxItemIndicator]`, `[kpListboxGroup]`, `[kpListboxGroupLabel]`.
|
|
1771
1952
|
|
|
1772
1953
|
Anatomy:
|
|
1773
1954
|
|
|
1774
1955
|
```
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
*
|
|
1779
|
-
|
|
1956
|
+
kpListbox
|
|
1957
|
+
kpListboxGroup (optional, repeated)
|
|
1958
|
+
kpListboxItem (repeated)
|
|
1959
|
+
*kpListboxItemIndicator
|
|
1960
|
+
kpListboxGroupLabel
|
|
1780
1961
|
```
|
|
1781
1962
|
|
|
1782
1963
|
Props of its root:
|
|
@@ -1793,15 +1974,15 @@ Props of its root:
|
|
|
1793
1974
|
|
|
1794
1975
|
Each part, and its own props:
|
|
1795
1976
|
|
|
1796
|
-
- `[
|
|
1797
|
-
- `[
|
|
1977
|
+
- `[kpListbox]` is `KpListbox`. `exportAs: "kpListbox"`. Generic: `<Value = unknown>`. Its props are above.
|
|
1978
|
+
- `[kpListboxItem]` is `KpListboxItem`.
|
|
1798
1979
|
- `value: unknown`: Required. What is in the listbox's value while this item is chosen.
|
|
1799
1980
|
- `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
|
|
1800
1981
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1801
1982
|
- `index?: number`: Its place among all the rows, in a virtualized list.
|
|
1802
|
-
- `[
|
|
1803
|
-
- `[
|
|
1804
|
-
- `[
|
|
1983
|
+
- `[kpListboxItemIndicator]` is `KpListboxItemIndicator`. Structural: written `*kpListboxItemIndicator`. `<span *kpListboxItemIndicator>`: in the page while its item is chosen.
|
|
1984
|
+
- `[kpListboxGroup]` is `KpListboxGroup`. Items that belong together, named by their label.
|
|
1985
|
+
- `[kpListboxGroupLabel]` is `KpListboxGroupLabel`. The name of a group.
|
|
1805
1986
|
|
|
1806
1987
|
Attributes and CSS variables, by part:
|
|
1807
1988
|
|
|
@@ -1817,33 +1998,33 @@ Attributes and CSS variables, by part:
|
|
|
1817
1998
|
### Menu
|
|
1818
1999
|
|
|
1819
2000
|
```
|
|
1820
|
-
import {
|
|
2001
|
+
import { KpMenu, KpMenuTrigger, KpMenuPortal, KpMenuPositioner, KpMenuPopup, KpMenuArrow, KpMenuItem, KpMenuLinkItem, KpMenuGroup, KpMenuGroupLabel, KpMenuSeparator, KpMenuCheckboxItem, KpMenuCheckboxItemIndicator, KpMenuRadioGroup, KpMenuRadioItem, KpMenuRadioItemIndicator, KpMenuSubmenuRoot, KpMenuSubmenuTrigger } from "@kirana-ui/angular"
|
|
1821
2002
|
```
|
|
1822
2003
|
|
|
1823
|
-
Parts: `[
|
|
2004
|
+
Parts: `[kpMenu]`, `[kpMenuTrigger]`, `[kpMenuPortal]`, `[kpMenuPositioner]`, `[kpMenuPopup]`, `[kpMenuArrow]`, `[kpMenuItem]`, `a[kpMenuLinkItem]`, `[kpMenuGroup]`, `[kpMenuGroupLabel]`, `[kpMenuSeparator]`, `[kpMenuCheckboxItem]`, `[kpMenuCheckboxItemIndicator]`, `[kpMenuRadioGroup]`, `[kpMenuRadioItem]`, `[kpMenuRadioItemIndicator]`, `[kpMenuSubmenuRoot]`, `[kpMenuSubmenuTrigger]`.
|
|
1824
2005
|
|
|
1825
2006
|
Anatomy:
|
|
1826
2007
|
|
|
1827
2008
|
```
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
*
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
a[
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
*
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
*
|
|
1843
|
-
|
|
1844
|
-
*
|
|
1845
|
-
|
|
1846
|
-
|
|
2009
|
+
kpMenu
|
|
2010
|
+
kpMenuTrigger
|
|
2011
|
+
*kpMenuPortal
|
|
2012
|
+
kpMenuPositioner
|
|
2013
|
+
kpMenuPopup
|
|
2014
|
+
kpMenuArrow
|
|
2015
|
+
kpMenuGroup (optional, repeated)
|
|
2016
|
+
kpMenuItem (repeated)
|
|
2017
|
+
a[kpMenuLinkItem] (repeated)
|
|
2018
|
+
kpMenuGroupLabel
|
|
2019
|
+
kpMenuCheckboxItem (repeated)
|
|
2020
|
+
*kpMenuCheckboxItemIndicator
|
|
2021
|
+
kpMenuRadioGroup (repeated)
|
|
2022
|
+
kpMenuRadioItem (repeated)
|
|
2023
|
+
*kpMenuRadioItemIndicator
|
|
2024
|
+
kpMenuSubmenuRoot (repeated)
|
|
2025
|
+
*kpMenuPortal (as above)
|
|
2026
|
+
kpMenuSubmenuTrigger
|
|
2027
|
+
kpMenuSeparator (repeated)
|
|
1847
2028
|
```
|
|
1848
2029
|
|
|
1849
2030
|
Props of its root:
|
|
@@ -1857,50 +2038,50 @@ Props of its root:
|
|
|
1857
2038
|
|
|
1858
2039
|
Each part, and its own props:
|
|
1859
2040
|
|
|
1860
|
-
- `[
|
|
1861
|
-
- `[
|
|
1862
|
-
- `[
|
|
1863
|
-
- `[
|
|
1864
|
-
- `[
|
|
1865
|
-
- `[
|
|
1866
|
-
- `[
|
|
2041
|
+
- `[kpMenu]` is `KpMenu`. `exportAs: "kpMenu"`. `kpContextMenu` in place of `kpMenu` is a menu for an area of the page, opened at the pointer: its trigger is `kpContextMenuTrigger`, its other parts the menu's. Its props are above.
|
|
2042
|
+
- `[kpMenuTrigger]` is `KpMenuTrigger`.
|
|
2043
|
+
- `[kpMenuPortal]` is `KpMenuPortal`. Structural: written `*kpMenuPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
2044
|
+
- `[kpMenuPositioner]` is `KpMenuPositioner`. Takes the positioner options ("Positioner options", above).
|
|
2045
|
+
- `[kpMenuPopup]` is `KpMenuPopup`.
|
|
2046
|
+
- `[kpMenuArrow]` is `KpMenuArrow`.
|
|
2047
|
+
- `[kpMenuItem]` is `KpMenuItem`.
|
|
1867
2048
|
- `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
|
|
1868
2049
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1869
2050
|
- `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does.
|
|
1870
|
-
- `a[
|
|
2051
|
+
- `a[kpMenuLinkItem]` is `KpMenuLinkItem`. `<a kpMenuLinkItem href="…">`: an item that is a link.
|
|
1871
2052
|
- `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
|
|
1872
2053
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1873
2054
|
- `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does.
|
|
1874
|
-
- `[
|
|
1875
|
-
- `[
|
|
1876
|
-
- `[
|
|
1877
|
-
- `[
|
|
2055
|
+
- `[kpMenuGroup]` is `KpMenuGroup`. Items that belong together, named by their label.
|
|
2056
|
+
- `[kpMenuGroupLabel]` is `KpMenuGroupLabel`. Names the group it is in. With no group around it, it is plain text.
|
|
2057
|
+
- `[kpMenuSeparator]` is `KpMenuSeparator`. A line between items.
|
|
2058
|
+
- `[kpMenuCheckboxItem]` is `KpMenuCheckboxItem`. `exportAs: "kpMenuCheckboxItem"`.
|
|
1878
2059
|
- `[(checked)]: boolean`: Whether the item is checked, when the caller holds it.
|
|
1879
2060
|
- `defaultChecked?: boolean`: Whether the item starts checked, when the caller does not hold `checked`. Read once.
|
|
1880
2061
|
- `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
|
|
1881
2062
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1882
2063
|
- `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does not.
|
|
1883
2064
|
- `(checkedChanged): { checked: boolean; details: ChangeDetails }`: Heard as the item is about to be checked or unchecked: `details.cancel()` keeps it as it was.
|
|
1884
|
-
- `[
|
|
1885
|
-
- `[
|
|
2065
|
+
- `[kpMenuCheckboxItemIndicator]` is `KpMenuCheckboxItemIndicator`. Structural: written `*kpMenuCheckboxItemIndicator`. `<span *kpMenuCheckboxItemIndicator>`: in the page while its item is checked.
|
|
2066
|
+
- `[kpMenuRadioGroup]` is `KpMenuRadioGroup`. `exportAs: "kpMenuRadioGroup"`. Generic: `<Value = unknown>`.
|
|
1886
2067
|
- `[(value)]: Value | null`: The chosen value; `null` is "none".
|
|
1887
2068
|
- `defaultValue?: NoInfer<Value> | null`: The value it starts with, when the caller does not hold `value`. Read once.
|
|
1888
2069
|
- `disabled?: boolean`: Disables every item of the group.
|
|
1889
2070
|
- `(valueChanged): { value: Value; details: ChangeDetails }`: Told an item's own value, never `null`: a press chooses, and nothing takes the choice back.
|
|
1890
|
-
- `[
|
|
2071
|
+
- `[kpMenuRadioItem]` is `KpMenuRadioItem`.
|
|
1891
2072
|
- `value: unknown`: Required. What the radio group's value is while this item is the chosen one.
|
|
1892
2073
|
- `disabled?: boolean`: Disables this item: it cannot be pressed, and the arrows pass over it.
|
|
1893
2074
|
- `label?: string`: What typing matches; the item's text when left out.
|
|
1894
2075
|
- `closeOnClick?: boolean`: Whether choosing the item closes the menu. Default: it does not.
|
|
1895
|
-
- `[
|
|
1896
|
-
- `[
|
|
2076
|
+
- `[kpMenuRadioItemIndicator]` is `KpMenuRadioItemIndicator`. Structural: written `*kpMenuRadioItemIndicator`. `<span *kpMenuRadioItemIndicator>`: in the page while its item is the chosen one.
|
|
2077
|
+
- `[kpMenuSubmenuRoot]` is `KpMenuSubmenuRoot`. `exportAs: "kpMenuSubmenuRoot"`. A menu that one of this menu's items opens. Its trigger is `kpMenuSubmenuTrigger`.
|
|
1897
2078
|
- `[(open)]: boolean`: Whether it is open, when the caller holds it.
|
|
1898
2079
|
- `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
|
|
1899
2080
|
- `disabled?: boolean`: The trigger cannot be pressed; a submenu's is passed over.
|
|
1900
2081
|
- `loop?: boolean`: Whether the arrows go round from the last item to the first. Default: they do.
|
|
1901
2082
|
- `modal?: boolean`: Holds the page while the menu is open. Not for a submenu.
|
|
1902
2083
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
|
|
1903
|
-
- `[
|
|
2084
|
+
- `[kpMenuSubmenuTrigger]` is `KpMenuSubmenuTrigger`. On the item of a menu that opens the submenu around it (`kpMenuSubmenuRoot`).
|
|
1904
2085
|
|
|
1905
2086
|
Attributes and CSS variables, by part:
|
|
1906
2087
|
|
|
@@ -1960,7 +2141,7 @@ Attributes and CSS variables, by part:
|
|
|
1960
2141
|
### Menubar
|
|
1961
2142
|
|
|
1962
2143
|
```
|
|
1963
|
-
import {
|
|
2144
|
+
import { KpMenubar } from "@kirana-ui/angular"
|
|
1964
2145
|
```
|
|
1965
2146
|
|
|
1966
2147
|
Props:
|
|
@@ -1969,7 +2150,7 @@ Props:
|
|
|
1969
2150
|
- `disabled?: boolean`: No menu of the bar opens.
|
|
1970
2151
|
- `orientation?: Orientation`: A row (the default) or a column of menus. In a column a menu opens beside its trigger.
|
|
1971
2152
|
|
|
1972
|
-
`[
|
|
2153
|
+
`[kpMenubar]` is `KpMenubar`. `exportAs: "kpMenubar"`. A row of menus that work as one. Each `kpMenu` inside it is one of its items.
|
|
1973
2154
|
|
|
1974
2155
|
Attributes and CSS variables, by part:
|
|
1975
2156
|
|
|
@@ -1980,18 +2161,18 @@ Attributes and CSS variables, by part:
|
|
|
1980
2161
|
### MessageScroller
|
|
1981
2162
|
|
|
1982
2163
|
```
|
|
1983
|
-
import {
|
|
2164
|
+
import { KpMessageScroller, KpMessageScrollerViewport, KpMessageScrollerContent, KpMessageScrollerButton } from "@kirana-ui/angular"
|
|
1984
2165
|
```
|
|
1985
2166
|
|
|
1986
|
-
Parts: `[
|
|
2167
|
+
Parts: `[kpMessageScroller]`, `[kpMessageScrollerViewport]`, `[kpMessageScrollerContent]`, `[kpMessageScrollerButton]`.
|
|
1987
2168
|
|
|
1988
2169
|
Anatomy:
|
|
1989
2170
|
|
|
1990
2171
|
```
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
2172
|
+
kpMessageScroller
|
|
2173
|
+
kpMessageScrollerViewport
|
|
2174
|
+
kpMessageScrollerContent
|
|
2175
|
+
kpMessageScrollerButton
|
|
1995
2176
|
```
|
|
1996
2177
|
|
|
1997
2178
|
Props of its root:
|
|
@@ -2002,10 +2183,10 @@ Props of its root:
|
|
|
2002
2183
|
|
|
2003
2184
|
Each part, and its own props:
|
|
2004
2185
|
|
|
2005
|
-
- `[
|
|
2006
|
-
- `[
|
|
2007
|
-
- `[
|
|
2008
|
-
- `[
|
|
2186
|
+
- `[kpMessageScroller]` is `KpMessageScroller`. `exportAs: "kpMessageScroller"`. Its props are above.
|
|
2187
|
+
- `[kpMessageScrollerViewport]` is `KpMessageScrollerViewport`.
|
|
2188
|
+
- `[kpMessageScrollerContent]` is `KpMessageScrollerContent`. The messages: what grows as one is written.
|
|
2189
|
+
- `[kpMessageScrollerButton]` is `KpMessageScrollerButton`.
|
|
2009
2190
|
|
|
2010
2191
|
Attributes and CSS variables, by part:
|
|
2011
2192
|
|
|
@@ -2019,19 +2200,19 @@ Attributes and CSS variables, by part:
|
|
|
2019
2200
|
### Meter
|
|
2020
2201
|
|
|
2021
2202
|
```
|
|
2022
|
-
import {
|
|
2203
|
+
import { KpMeter, KpMeterTrack, KpMeterIndicator, KpMeterValue, KpMeterLabel } from "@kirana-ui/angular"
|
|
2023
2204
|
```
|
|
2024
2205
|
|
|
2025
|
-
Parts: `[
|
|
2206
|
+
Parts: `[kpMeter]`, `[kpMeterTrack]`, `[kpMeterIndicator]`, `[kpMeterValue]`, `[kpMeterLabel]`.
|
|
2026
2207
|
|
|
2027
2208
|
Anatomy:
|
|
2028
2209
|
|
|
2029
2210
|
```
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2211
|
+
kpMeter
|
|
2212
|
+
kpMeterTrack
|
|
2213
|
+
kpMeterIndicator
|
|
2214
|
+
kpMeterValue
|
|
2215
|
+
kpMeterLabel
|
|
2035
2216
|
```
|
|
2036
2217
|
|
|
2037
2218
|
Props of its root:
|
|
@@ -2045,67 +2226,67 @@ Props of its root:
|
|
|
2045
2226
|
|
|
2046
2227
|
Each part, and its own props:
|
|
2047
2228
|
|
|
2048
|
-
- `[
|
|
2049
|
-
- `[
|
|
2050
|
-
- `[
|
|
2051
|
-
- `[
|
|
2052
|
-
- `[
|
|
2229
|
+
- `[kpMeter]` is `KpMeter`. `exportAs: "kpMeter"`. The meter: it says the value to assistive technology. Its props are above.
|
|
2230
|
+
- `[kpMeterTrack]` is `KpMeterTrack`. The whole range.
|
|
2231
|
+
- `[kpMeterIndicator]` is `KpMeterIndicator`. The filled part: its width is the value's share of the range.
|
|
2232
|
+
- `[kpMeterValue]` is `KpMeterValue`. Shows the written value.
|
|
2233
|
+
- `[kpMeterLabel]` is `KpMeterLabel`. The meter's name.
|
|
2053
2234
|
|
|
2054
2235
|
### NavigationMenu
|
|
2055
2236
|
|
|
2056
2237
|
```
|
|
2057
|
-
import {
|
|
2238
|
+
import { KpNavigationMenu, KpNavigationMenuList, KpNavigationMenuItem, KpNavigationMenuTrigger, KpNavigationMenuIcon, KpNavigationMenuContent, KpNavigationMenuLink, KpNavigationMenuPortal, KpNavigationMenuPositioner, KpNavigationMenuPopup, KpNavigationMenuViewport, KpNavigationMenuArrow, KpNavigationMenuBackdrop } from "@kirana-ui/angular"
|
|
2058
2239
|
```
|
|
2059
2240
|
|
|
2060
|
-
Parts: `[
|
|
2241
|
+
Parts: `[kpNavigationMenu]`, `[kpNavigationMenuList]`, `[kpNavigationMenuItem]`, `[kpNavigationMenuTrigger]`, `[kpNavigationMenuIcon]`, `[kpNavigationMenuContent]`, `[kpNavigationMenuLink]`, `[kpNavigationMenuPortal]`, `[kpNavigationMenuPositioner]`, `[kpNavigationMenuPopup]`, `[kpNavigationMenuViewport]`, `[kpNavigationMenuArrow]`, `[kpNavigationMenuBackdrop]`.
|
|
2061
2242
|
|
|
2062
2243
|
Anatomy:
|
|
2063
2244
|
|
|
2064
2245
|
```
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
*
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
*
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2246
|
+
kpNavigationMenu
|
|
2247
|
+
kpNavigationMenuList
|
|
2248
|
+
kpNavigationMenuItem (repeated)
|
|
2249
|
+
kpNavigationMenuTrigger
|
|
2250
|
+
kpNavigationMenuIcon
|
|
2251
|
+
*kpNavigationMenuContent
|
|
2252
|
+
kpNavigationMenuLink (repeated)
|
|
2253
|
+
kpNavigationMenuLink (repeated, as above)
|
|
2254
|
+
kpNavigationMenuLink (repeated, as above)
|
|
2255
|
+
*kpNavigationMenuPortal
|
|
2256
|
+
kpNavigationMenuPositioner
|
|
2257
|
+
kpNavigationMenuPopup
|
|
2258
|
+
kpNavigationMenuViewport
|
|
2259
|
+
kpNavigationMenuArrow
|
|
2260
|
+
kpNavigationMenuBackdrop
|
|
2080
2261
|
```
|
|
2081
2262
|
|
|
2082
2263
|
Props of its root:
|
|
2083
2264
|
|
|
2084
2265
|
- `[(value)]: Value | null`: The item whose content is shown; `null` is "none".
|
|
2085
2266
|
- `defaultValue?: NoInfer<Value> | null`: The item whose content it starts with, when the caller does not hold `value`. Read once.
|
|
2086
|
-
- `delay?: number`: How long the pointer rests on a trigger before its content shows, in milliseconds.
|
|
2087
|
-
- `closeDelay?: number`: How long after the pointer leaves the content goes, in milliseconds.
|
|
2267
|
+
- `delay?: number`: How long the pointer rests on a trigger before its content shows, in milliseconds. Default `50`.
|
|
2268
|
+
- `closeDelay?: number`: How long after the pointer leaves the content goes, in milliseconds. Default `50`.
|
|
2088
2269
|
- `orientation?: Orientation`: Whether the triggers are laid out across (the default) or down: the arrows that move between them follow.
|
|
2089
2270
|
- `(valueChanged): { value: Value | null; details: ChangeDetails }`: Heard as another item's content is about to show, or none: `details.cancel()` keeps the value as it was.
|
|
2090
2271
|
|
|
2091
2272
|
Each part, and its own props:
|
|
2092
2273
|
|
|
2093
|
-
- `[
|
|
2094
|
-
- `[
|
|
2095
|
-
- `[
|
|
2274
|
+
- `[kpNavigationMenu]` is `KpNavigationMenu`. `exportAs: "kpNavigationMenu"`. Generic: `<Value = unknown>`. Its props are above.
|
|
2275
|
+
- `[kpNavigationMenuList]` is `KpNavigationMenuList`.
|
|
2276
|
+
- `[kpNavigationMenuItem]` is `KpNavigationMenuItem`. On an item's `<li>`. `value` tells it from the others; an item that is given none makes its own.
|
|
2096
2277
|
- `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.
|
|
2097
|
-
- `[
|
|
2098
|
-
- `[
|
|
2099
|
-
- `[
|
|
2100
|
-
- `[
|
|
2278
|
+
- `[kpNavigationMenuTrigger]` is `KpNavigationMenuTrigger`.
|
|
2279
|
+
- `[kpNavigationMenuIcon]` is `KpNavigationMenuIcon`.
|
|
2280
|
+
- `[kpNavigationMenuContent]` is `KpNavigationMenuContent`. Structural: written `*kpNavigationMenuContent`. `<div *kpNavigationMenuContent>`: an item's content, drawn in `kpNavigationMenuViewport` while it is shown.
|
|
2281
|
+
- `[kpNavigationMenuLink]` is `KpNavigationMenuLink`.
|
|
2101
2282
|
- `active?: boolean`: The link is the page the reader is on.
|
|
2102
2283
|
- `closeOnClick?: boolean`: Whether following it closes the menu. Default: it does.
|
|
2103
|
-
- `[
|
|
2104
|
-
- `[
|
|
2105
|
-
- `[
|
|
2106
|
-
- `[
|
|
2107
|
-
- `[
|
|
2108
|
-
- `[
|
|
2284
|
+
- `[kpNavigationMenuPortal]` is `KpNavigationMenuPortal`. Structural: written `*kpNavigationMenuPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
2285
|
+
- `[kpNavigationMenuPositioner]` is `KpNavigationMenuPositioner`. Takes the positioner options ("Positioner options", above).
|
|
2286
|
+
- `[kpNavigationMenuPopup]` is `KpNavigationMenuPopup`.
|
|
2287
|
+
- `[kpNavigationMenuViewport]` is `KpNavigationMenuViewport`. Where the contents are drawn, inside the popup.
|
|
2288
|
+
- `[kpNavigationMenuArrow]` is `KpNavigationMenuArrow`.
|
|
2289
|
+
- `[kpNavigationMenuBackdrop]` is `KpNavigationMenuBackdrop`.
|
|
2109
2290
|
|
|
2110
2291
|
Attributes and CSS variables, by part:
|
|
2111
2292
|
|
|
@@ -2159,19 +2340,21 @@ Attributes and CSS variables, by part:
|
|
|
2159
2340
|
### NumberField
|
|
2160
2341
|
|
|
2161
2342
|
```
|
|
2162
|
-
import {
|
|
2343
|
+
import { KpNumberField, KpNumberFieldGroup, KpNumberFieldInput, KpNumberFieldIncrement, KpNumberFieldDecrement, KpNumberFieldScrubArea, KpNumberFieldScrubAreaCursor } from "@kirana-ui/angular"
|
|
2163
2344
|
```
|
|
2164
2345
|
|
|
2165
|
-
Parts: `[
|
|
2346
|
+
Parts: `[kpNumberField]`, `[kpNumberFieldGroup]`, `[kpNumberFieldInput]`, `[kpNumberFieldIncrement]`, `[kpNumberFieldDecrement]`, `[kpNumberFieldScrubArea]`, `[kpNumberFieldScrubAreaCursor]`.
|
|
2166
2347
|
|
|
2167
2348
|
Anatomy:
|
|
2168
2349
|
|
|
2169
2350
|
```
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2351
|
+
kpNumberField
|
|
2352
|
+
kpNumberFieldGroup
|
|
2353
|
+
kpNumberFieldInput
|
|
2354
|
+
kpNumberFieldIncrement
|
|
2355
|
+
kpNumberFieldDecrement
|
|
2356
|
+
kpNumberFieldScrubArea
|
|
2357
|
+
*kpNumberFieldScrubAreaCursor
|
|
2175
2358
|
```
|
|
2176
2359
|
|
|
2177
2360
|
Props of its root:
|
|
@@ -2197,11 +2380,16 @@ Props of its root:
|
|
|
2197
2380
|
|
|
2198
2381
|
Each part, and its own props:
|
|
2199
2382
|
|
|
2200
|
-
- `[
|
|
2201
|
-
- `[
|
|
2202
|
-
- `[
|
|
2203
|
-
- `[
|
|
2204
|
-
- `[
|
|
2383
|
+
- `[kpNumberField]` is `KpNumberField`. `exportAs: "kpNumberField"`. On the element that holds the field's parts. `[(value)]` is the number, `null` for none. With a name, it draws the hidden input a form reads. Its props are above.
|
|
2384
|
+
- `[kpNumberFieldGroup]` is `KpNumberFieldGroup`.
|
|
2385
|
+
- `[kpNumberFieldInput]` is `KpNumberFieldInput`.
|
|
2386
|
+
- `[kpNumberFieldIncrement]` is `KpNumberFieldIncrement`.
|
|
2387
|
+
- `[kpNumberFieldDecrement]` is `KpNumberFieldDecrement`.
|
|
2388
|
+
- `[kpNumberFieldScrubArea]` is `KpNumberFieldScrubArea`. On the element that is pressed and dragged to change the number: the field's label, as a rule.
|
|
2389
|
+
- `direction?: "horizontal" | "vertical"`: The way the pointer is dragged: `"horizontal"`, where right is more, or `"vertical"`, where up is more. Default `"horizontal"`.
|
|
2390
|
+
- `pixelSensitivity?: number`: How many pixels the pointer moves before the number changes. Default 2.
|
|
2391
|
+
- `teleportDistance?: number`: How far past the area's edges the drawn cursor goes before it comes back in at the other side. Default: the edges of the window.
|
|
2392
|
+
- `[kpNumberFieldScrubAreaCursor]` is `KpNumberFieldScrubAreaCursor`. Structural: written `*kpNumberFieldScrubAreaCursor`. `<span *kpNumberFieldScrubAreaCursor>`: drawn in place of the pointer while it is locked for a drag, at the end of the page.
|
|
2205
2393
|
|
|
2206
2394
|
Attributes and CSS variables, by part:
|
|
2207
2395
|
|
|
@@ -2213,6 +2401,7 @@ Attributes and CSS variables, by part:
|
|
|
2213
2401
|
- `data-dirty`: Present while the number is not the one it started with.
|
|
2214
2402
|
- `data-filled`: Present while there is a number.
|
|
2215
2403
|
- `data-focused`: Present while the input has focus.
|
|
2404
|
+
- `data-scrubbing`: Present while the number is dragged from its scrub area.
|
|
2216
2405
|
- `data-valid`: In a field: present once the number was checked and found right.
|
|
2217
2406
|
- `data-invalid`: In a field: present while the number is wrong.
|
|
2218
2407
|
- group: What holds the input and its buttons, as one control.
|
|
@@ -2223,6 +2412,7 @@ Attributes and CSS variables, by part:
|
|
|
2223
2412
|
- `data-dirty`: Present while the number is not the one it started with.
|
|
2224
2413
|
- `data-filled`: Present while there is a number.
|
|
2225
2414
|
- `data-focused`: Present while the input has focus.
|
|
2415
|
+
- `data-scrubbing`: Present while the number is dragged from its scrub area.
|
|
2226
2416
|
- `data-valid`: In a field: present once the number was checked and found right.
|
|
2227
2417
|
- `data-invalid`: In a field: present while the number is wrong.
|
|
2228
2418
|
- input: The text input: it takes what its locale writes a number with.
|
|
@@ -2233,6 +2423,7 @@ Attributes and CSS variables, by part:
|
|
|
2233
2423
|
- `data-dirty`: Present while the number is not the one it started with.
|
|
2234
2424
|
- `data-filled`: Present while there is a number.
|
|
2235
2425
|
- `data-focused`: Present while the input has focus.
|
|
2426
|
+
- `data-scrubbing`: Present while the number is dragged from its scrub area.
|
|
2236
2427
|
- `data-valid`: In a field: present once the number was checked and found right.
|
|
2237
2428
|
- `data-invalid`: In a field: present while the number is wrong.
|
|
2238
2429
|
- increment: A button that steps the number up. Held, it goes on.
|
|
@@ -2243,6 +2434,7 @@ Attributes and CSS variables, by part:
|
|
|
2243
2434
|
- `data-dirty`: Present while the number is not the one it started with.
|
|
2244
2435
|
- `data-filled`: Present while there is a number.
|
|
2245
2436
|
- `data-focused`: Present while the input has focus.
|
|
2437
|
+
- `data-scrubbing`: Present while the number is dragged from its scrub area.
|
|
2246
2438
|
- `data-valid`: In a field: present once the number was checked and found right.
|
|
2247
2439
|
- `data-invalid`: In a field: present while the number is wrong.
|
|
2248
2440
|
- decrement: A button that steps the number down. Held, it goes on.
|
|
@@ -2253,34 +2445,58 @@ Attributes and CSS variables, by part:
|
|
|
2253
2445
|
- `data-dirty`: Present while the number is not the one it started with.
|
|
2254
2446
|
- `data-filled`: Present while there is a number.
|
|
2255
2447
|
- `data-focused`: Present while the input has focus.
|
|
2448
|
+
- `data-scrubbing`: Present while the number is dragged from its scrub area.
|
|
2449
|
+
- `data-valid`: In a field: present once the number was checked and found right.
|
|
2450
|
+
- `data-invalid`: In a field: present while the number is wrong.
|
|
2451
|
+
- scrubArea: An area that is pressed and dragged to change the number: the field's label, as a rule. It takes `direction`, `pixelSensitivity` and `teleportDistance`. A mouse's pointer is locked for the drag where the browser has that (not in Safari); a finger drags as it is.
|
|
2452
|
+
- `data-disabled`: Present when it is disabled.
|
|
2453
|
+
- `data-readonly`: Present when the number cannot be changed.
|
|
2454
|
+
- `data-required`: Present when a number must be given.
|
|
2455
|
+
- `data-touched`: Present once focus has left the input.
|
|
2456
|
+
- `data-dirty`: Present while the number is not the one it started with.
|
|
2457
|
+
- `data-filled`: Present while there is a number.
|
|
2458
|
+
- `data-focused`: Present while the input has focus.
|
|
2459
|
+
- `data-scrubbing`: Present while the number is dragged from its scrub area.
|
|
2460
|
+
- `data-valid`: In a field: present once the number was checked and found right.
|
|
2461
|
+
- `data-invalid`: In a field: present while the number is wrong.
|
|
2462
|
+
- scrubAreaCursor: What is drawn in place of the pointer while it is locked for a drag: in the page only then, at the end of `<body>`, placed by the component.
|
|
2463
|
+
- `data-disabled`: Present when it is disabled.
|
|
2464
|
+
- `data-readonly`: Present when the number cannot be changed.
|
|
2465
|
+
- `data-required`: Present when a number must be given.
|
|
2466
|
+
- `data-touched`: Present once focus has left the input.
|
|
2467
|
+
- `data-dirty`: Present while the number is not the one it started with.
|
|
2468
|
+
- `data-filled`: Present while there is a number.
|
|
2469
|
+
- `data-focused`: Present while the input has focus.
|
|
2470
|
+
- `data-scrubbing`: Present while the number is dragged from its scrub area.
|
|
2256
2471
|
- `data-valid`: In a field: present once the number was checked and found right.
|
|
2257
2472
|
- `data-invalid`: In a field: present while the number is wrong.
|
|
2258
2473
|
|
|
2259
2474
|
### Otp
|
|
2260
2475
|
|
|
2261
2476
|
```
|
|
2262
|
-
import {
|
|
2477
|
+
import { KpOtp, KpOtpInput, KpOtpGroup, KpOtpSlot, KpOtpSeparator, KpOtpCaret } from "@kirana-ui/angular"
|
|
2263
2478
|
```
|
|
2264
2479
|
|
|
2265
|
-
Parts: `[
|
|
2480
|
+
Parts: `[kpOtp]`, `input[kpOtpInput]`, `[kpOtpGroup]`, `[kpOtpSlot]`, `[kpOtpSeparator]`, `[kpOtpCaret]`.
|
|
2266
2481
|
|
|
2267
2482
|
Anatomy:
|
|
2268
2483
|
|
|
2269
2484
|
```
|
|
2270
|
-
|
|
2271
|
-
input[
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
*
|
|
2275
|
-
|
|
2485
|
+
kpOtp
|
|
2486
|
+
input[kpOtpInput]
|
|
2487
|
+
kpOtpGroup (repeated)
|
|
2488
|
+
kpOtpSlot (repeated)
|
|
2489
|
+
*kpOtpCaret
|
|
2490
|
+
kpOtpSeparator (repeated)
|
|
2276
2491
|
```
|
|
2277
2492
|
|
|
2278
2493
|
Props of its root:
|
|
2279
2494
|
|
|
2280
2495
|
- `length?: number`: How many characters the code has. Default: 6.
|
|
2281
2496
|
- `[(value)]: string`: The characters typed so far, when the caller holds them.
|
|
2282
|
-
- `defaultValue?: string`: The characters it starts with, when the caller does not hold `value`. Read once.
|
|
2283
|
-
- `mode?: "numeric" | "alphanumeric" | "text"`: What a character may be. Default: `numeric
|
|
2497
|
+
- `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`.
|
|
2284
2500
|
- `disabled?: boolean`: Disabled: it cannot be changed.
|
|
2285
2501
|
- `name?: string`: With a name, the code is submitted with the form around it.
|
|
2286
2502
|
- `form?: string`: The id of the form the input belongs to, when it is not inside it.
|
|
@@ -2289,13 +2505,13 @@ Props of its root:
|
|
|
2289
2505
|
|
|
2290
2506
|
Each part, and its own props:
|
|
2291
2507
|
|
|
2292
|
-
- `[
|
|
2293
|
-
- `input[
|
|
2294
|
-
- `[
|
|
2295
|
-
- `[
|
|
2508
|
+
- `[kpOtp]` is `KpOtp`. `exportAs: "kpOtp"`. Its props are above.
|
|
2509
|
+
- `input[kpOtpInput]` is `KpOtpInput`. `<input kpOtpInput>`: the one input the code is typed in.
|
|
2510
|
+
- `[kpOtpGroup]` is `KpOtpGroup`. Cells that are drawn together.
|
|
2511
|
+
- `[kpOtpSlot]` is `KpOtpSlot`. One cell. It writes its character before whatever is inside it (a caret), and leaves that alone.
|
|
2296
2512
|
- `index: number`: Required. Which character of the code it shows, from 0.
|
|
2297
|
-
- `[
|
|
2298
|
-
- `[
|
|
2513
|
+
- `[kpOtpSeparator]` is `KpOtpSeparator`. A mark between groups of cells.
|
|
2514
|
+
- `[kpOtpCaret]` is `KpOtpCaret`. Structural: written `*kpOtpCaret`. `<div *kpOtpCaret>`: in its cell while the cell is the active one and empty.
|
|
2299
2515
|
|
|
2300
2516
|
Attributes and CSS variables, by part:
|
|
2301
2517
|
|
|
@@ -2314,26 +2530,26 @@ Attributes and CSS variables, by part:
|
|
|
2314
2530
|
### Pagination
|
|
2315
2531
|
|
|
2316
2532
|
```
|
|
2317
|
-
import {
|
|
2533
|
+
import { KpPagination, KpPaginationItems, KpPaginationItem, KpPaginationEllipsis, KpPaginationPrevious, KpPaginationNext } from "@kirana-ui/angular"
|
|
2318
2534
|
```
|
|
2319
2535
|
|
|
2320
|
-
Parts: `[
|
|
2536
|
+
Parts: `[kpPagination]`, `[kpPaginationItems]`, `[kpPaginationItem]`, `[kpPaginationEllipsis]`, `[kpPaginationPrevious]`, `[kpPaginationNext]`.
|
|
2321
2537
|
|
|
2322
2538
|
Anatomy:
|
|
2323
2539
|
|
|
2324
2540
|
```
|
|
2325
|
-
|
|
2326
|
-
*
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2541
|
+
kpPagination
|
|
2542
|
+
*kpPaginationItems
|
|
2543
|
+
kpPaginationItem (repeated)
|
|
2544
|
+
kpPaginationEllipsis (repeated)
|
|
2545
|
+
kpPaginationPrevious
|
|
2546
|
+
kpPaginationNext
|
|
2331
2547
|
```
|
|
2332
2548
|
|
|
2333
2549
|
Props of its root:
|
|
2334
2550
|
|
|
2335
2551
|
- `[(page)]: number`: The page shown, from 1.
|
|
2336
|
-
- `defaultPage?: number`: The page it starts at, when the caller does not hold `page`. Read once.
|
|
2552
|
+
- `defaultPage?: number`: The page it starts at, when the caller does not hold `page`. Read once. Default `1`.
|
|
2337
2553
|
- `count: number`: Required. How many items there are in all.
|
|
2338
2554
|
- `pageSize?: number`: How many items a page holds. Default 10.
|
|
2339
2555
|
- `siblingCount?: number`: How many pages are listed each side of the one shown. Default 1.
|
|
@@ -2343,13 +2559,13 @@ Props of its root:
|
|
|
2343
2559
|
|
|
2344
2560
|
Each part, and its own props:
|
|
2345
2561
|
|
|
2346
|
-
- `[
|
|
2347
|
-
- `[
|
|
2348
|
-
- `[
|
|
2562
|
+
- `[kpPagination]` is `KpPagination`. `exportAs: "kpPagination"`. On a `<nav>`. `[(page)]` is the page shown, from 1. Its props are above.
|
|
2563
|
+
- `[kpPaginationItems]` is `KpPaginationItems`. Structural: written `*kpPaginationItems`. Its template is given the entry: `let entry` is a `PaginationEntry`. `<ng-container *kpPaginationItems="let entry">`: once for each piece of the row, a page or the mark for pages left out.
|
|
2564
|
+
- `[kpPaginationItem]` is `KpPaginationItem`.
|
|
2349
2565
|
- `page: number`: Required. The page it goes to, from 1.
|
|
2350
|
-
- `[
|
|
2351
|
-
- `[
|
|
2352
|
-
- `[
|
|
2566
|
+
- `[kpPaginationEllipsis]` is `KpPaginationEllipsis`. The mark for pages left out of the row.
|
|
2567
|
+
- `[kpPaginationPrevious]` is `KpPaginationPrevious`.
|
|
2568
|
+
- `[kpPaginationNext]` is `KpPaginationNext`.
|
|
2353
2569
|
|
|
2354
2570
|
Attributes and CSS variables, by part:
|
|
2355
2571
|
|
|
@@ -2366,45 +2582,58 @@ Attributes and CSS variables, by part:
|
|
|
2366
2582
|
### Popover
|
|
2367
2583
|
|
|
2368
2584
|
```
|
|
2369
|
-
import {
|
|
2585
|
+
import { KpPopover, KpPopoverTrigger, KpPopoverPortal, KpPopoverBackdrop, KpPopoverPositioner, KpPopoverPopup, KpPopoverArrow, KpPopoverTitle, KpPopoverDescription, KpPopoverClose } from "@kirana-ui/angular"
|
|
2370
2586
|
```
|
|
2371
2587
|
|
|
2372
|
-
Parts: `[
|
|
2588
|
+
Parts: `[kpPopover]`, `[kpPopoverTrigger]`, `[kpPopoverPortal]`, `[kpPopoverBackdrop]`, `[kpPopoverPositioner]`, `[kpPopoverPopup]`, `[kpPopoverArrow]`, `[kpPopoverTitle]`, `[kpPopoverDescription]`, `[kpPopoverClose]`.
|
|
2373
2589
|
|
|
2374
2590
|
Anatomy:
|
|
2375
2591
|
|
|
2376
2592
|
```
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
*
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2593
|
+
kpPopover
|
|
2594
|
+
kpPopoverTrigger
|
|
2595
|
+
*kpPopoverPortal
|
|
2596
|
+
kpPopoverBackdrop
|
|
2597
|
+
kpPopoverPositioner
|
|
2598
|
+
kpPopoverPopup
|
|
2599
|
+
kpPopoverTitle
|
|
2600
|
+
kpPopoverDescription
|
|
2601
|
+
kpPopoverClose
|
|
2602
|
+
kpPopoverArrow
|
|
2385
2603
|
```
|
|
2386
2604
|
|
|
2387
2605
|
Props of its root:
|
|
2388
2606
|
|
|
2389
2607
|
- `[(open)]: boolean`: Whether it is open, when the caller holds it.
|
|
2390
2608
|
- `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
|
|
2609
|
+
- `modal?: boolean | "trap-focus"`: What the page behind it may do while it is open. `false` (the default): everything. `true`: nothing, the page is inert and does not scroll, and Tab stays inside the popover. `"trap-focus"`: Tab stays inside the popover, and the page can still be pressed and scrolled. A popover the pointer opened holds nothing until it is pressed. Read as it opens.
|
|
2391
2610
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: Heard as it is about to open or close: `details.cancel()` keeps it as it was.
|
|
2392
2611
|
|
|
2393
2612
|
Each part, and its own props:
|
|
2394
2613
|
|
|
2395
|
-
- `[
|
|
2396
|
-
- `[
|
|
2397
|
-
- `
|
|
2398
|
-
- `
|
|
2399
|
-
- `
|
|
2400
|
-
- `[
|
|
2401
|
-
- `[
|
|
2402
|
-
- `[
|
|
2614
|
+
- `[kpPopover]` is `KpPopover`. `exportAs: "kpPopover"`. Holds the popover: whether it is open. Its props are above.
|
|
2615
|
+
- `[kpPopoverTrigger]` is `KpPopoverTrigger`.
|
|
2616
|
+
- `openOnHover?: boolean`: Whether the pointer resting on the trigger opens the popover too. A press and the keyboard still open it, and a press on one the pointer opened keeps it open. Default `false`.
|
|
2617
|
+
- `delay?: number`: How long the pointer rests on the trigger before the popover opens, in milliseconds. Default 300.
|
|
2618
|
+
- `closeDelay?: number`: How long after the pointer leaves a popover it opened closes, in milliseconds. Default 0.
|
|
2619
|
+
- `[kpPopoverPortal]` is `KpPopoverPortal`. Structural: written `*kpPopoverPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
2620
|
+
- `[kpPopoverBackdrop]` is `KpPopoverBackdrop`.
|
|
2621
|
+
- `[kpPopoverPositioner]` is `KpPopoverPositioner`. Takes the positioner options ("Positioner options", above).
|
|
2622
|
+
- `[kpPopoverPopup]` is `KpPopoverPopup`.
|
|
2623
|
+
- `[kpPopoverArrow]` is `KpPopoverArrow`.
|
|
2624
|
+
- `[kpPopoverTitle]` is `KpPopoverTitle`. The heading that names the popover.
|
|
2625
|
+
- `[kpPopoverDescription]` is `KpPopoverDescription`. The text that describes the popover.
|
|
2626
|
+
- `[kpPopoverClose]` is `KpPopoverClose`. A button that closes the popover.
|
|
2403
2627
|
|
|
2404
2628
|
Attributes and CSS variables, by part:
|
|
2405
2629
|
|
|
2406
2630
|
- trigger: The button that opens the popover, and what it is placed against.
|
|
2407
2631
|
- `data-popup-open`: Present when the popover is open.
|
|
2632
|
+
- backdrop: A layer over the page behind the popover.
|
|
2633
|
+
- `data-open`: Present when it is open.
|
|
2634
|
+
- `data-closed`: Present when it is closed.
|
|
2635
|
+
- `data-starting-style`: Present for the first style of its entrance: what it animates in from.
|
|
2636
|
+
- `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
|
|
2408
2637
|
- positioner: Places the popup against the trigger. It carries the geometry.
|
|
2409
2638
|
- `data-open`: Present when it is open.
|
|
2410
2639
|
- `data-closed`: Present when it is closed.
|
|
@@ -2422,23 +2651,27 @@ Attributes and CSS variables, by part:
|
|
|
2422
2651
|
- `data-ending-style`: Present through its exit: what it animates out to. It leaves the page when the motion ends.
|
|
2423
2652
|
- `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.
|
|
2424
2653
|
- `data-align="start | center | end"`: How it is aligned with the anchor.
|
|
2654
|
+
- arrow: An element that points at the trigger, placed along the popup's edge.
|
|
2655
|
+
- `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
|
+
- `data-align="start | center | end"`: How it is aligned with the anchor.
|
|
2657
|
+
- `data-uncentered`: Present when the popup was pushed along its edge, so the arrow is not at the trigger's centre.
|
|
2425
2658
|
|
|
2426
2659
|
### Progress
|
|
2427
2660
|
|
|
2428
2661
|
```
|
|
2429
|
-
import {
|
|
2662
|
+
import { KpProgress, KpProgressTrack, KpProgressIndicator, KpProgressValue, KpProgressLabel } from "@kirana-ui/angular"
|
|
2430
2663
|
```
|
|
2431
2664
|
|
|
2432
|
-
Parts: `[
|
|
2665
|
+
Parts: `[kpProgress]`, `[kpProgressTrack]`, `[kpProgressIndicator]`, `[kpProgressValue]`, `[kpProgressLabel]`.
|
|
2433
2666
|
|
|
2434
2667
|
Anatomy:
|
|
2435
2668
|
|
|
2436
2669
|
```
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2670
|
+
kpProgress
|
|
2671
|
+
kpProgressTrack
|
|
2672
|
+
kpProgressIndicator
|
|
2673
|
+
kpProgressValue
|
|
2674
|
+
kpProgressLabel
|
|
2442
2675
|
```
|
|
2443
2676
|
|
|
2444
2677
|
Props of its root:
|
|
@@ -2452,11 +2685,11 @@ Props of its root:
|
|
|
2452
2685
|
|
|
2453
2686
|
Each part, and its own props:
|
|
2454
2687
|
|
|
2455
|
-
- `[
|
|
2456
|
-
- `[
|
|
2457
|
-
- `[
|
|
2458
|
-
- `[
|
|
2459
|
-
- `[
|
|
2688
|
+
- `[kpProgress]` is `KpProgress`. `exportAs: "kpProgress"`. Its props are above.
|
|
2689
|
+
- `[kpProgressTrack]` is `KpProgressTrack`.
|
|
2690
|
+
- `[kpProgressIndicator]` is `KpProgressIndicator`.
|
|
2691
|
+
- `[kpProgressValue]` is `KpProgressValue`. Shows the written value.
|
|
2692
|
+
- `[kpProgressLabel]` is `KpProgressLabel`.
|
|
2460
2693
|
|
|
2461
2694
|
Attributes and CSS variables, by part:
|
|
2462
2695
|
|
|
@@ -2484,17 +2717,17 @@ Attributes and CSS variables, by part:
|
|
|
2484
2717
|
### QrCode
|
|
2485
2718
|
|
|
2486
2719
|
```
|
|
2487
|
-
import {
|
|
2720
|
+
import { KpQrCode, KpQrCodeFrame, KpQrCodePattern } from "@kirana-ui/angular"
|
|
2488
2721
|
```
|
|
2489
2722
|
|
|
2490
|
-
Parts: `[
|
|
2723
|
+
Parts: `[kpQrCode]`, `[kpQrCodeFrame]`, `[kpQrCodePattern]`.
|
|
2491
2724
|
|
|
2492
2725
|
Anatomy:
|
|
2493
2726
|
|
|
2494
2727
|
```
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2728
|
+
kpQrCode
|
|
2729
|
+
kpQrCodeFrame
|
|
2730
|
+
kpQrCodePattern
|
|
2498
2731
|
```
|
|
2499
2732
|
|
|
2500
2733
|
Props of its root:
|
|
@@ -2504,9 +2737,9 @@ Props of its root:
|
|
|
2504
2737
|
|
|
2505
2738
|
Each part, and its own props:
|
|
2506
2739
|
|
|
2507
|
-
- `[
|
|
2508
|
-
- `[
|
|
2509
|
-
- `[
|
|
2740
|
+
- `[kpQrCode]` is `KpQrCode`. `exportAs: "kpQrCode"`. Its props are above.
|
|
2741
|
+
- `[kpQrCodeFrame]` is `KpQrCodeFrame`. `<svg kpQrCodeFrame>`: the drawing.
|
|
2742
|
+
- `[kpQrCodePattern]` is `KpQrCodePattern`. `<svg:path kpQrCodePattern>`: the dark modules.
|
|
2510
2743
|
|
|
2511
2744
|
Attributes and CSS variables, by part:
|
|
2512
2745
|
|
|
@@ -2516,17 +2749,17 @@ Attributes and CSS variables, by part:
|
|
|
2516
2749
|
### RadioGroup
|
|
2517
2750
|
|
|
2518
2751
|
```
|
|
2519
|
-
import {
|
|
2752
|
+
import { KpRadioGroup, KpRadioGroupItem, KpRadioGroupIndicator } from "@kirana-ui/angular"
|
|
2520
2753
|
```
|
|
2521
2754
|
|
|
2522
|
-
Parts: `[
|
|
2755
|
+
Parts: `[kpRadioGroup]`, `[kpRadioGroupItem]`, `[kpRadioGroupIndicator]`.
|
|
2523
2756
|
|
|
2524
2757
|
Anatomy:
|
|
2525
2758
|
|
|
2526
2759
|
```
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
*
|
|
2760
|
+
kpRadioGroup
|
|
2761
|
+
kpRadioGroupItem (repeated)
|
|
2762
|
+
*kpRadioGroupIndicator
|
|
2530
2763
|
```
|
|
2531
2764
|
|
|
2532
2765
|
Props of its root:
|
|
@@ -2542,11 +2775,11 @@ Props of its root:
|
|
|
2542
2775
|
|
|
2543
2776
|
Each part, and its own props:
|
|
2544
2777
|
|
|
2545
|
-
- `[
|
|
2546
|
-
- `[
|
|
2778
|
+
- `[kpRadioGroup]` is `KpRadioGroup`. `exportAs: "kpRadioGroup"`. Generic: `<Value = unknown>`. Its props are above.
|
|
2779
|
+
- `[kpRadioGroupItem]` is `KpRadioGroupItem`. On an item's element. It draws the hidden native radio inside it, which a form and a label reach.
|
|
2547
2780
|
- `value: unknown`: Required. What the group's value is while this item is the chosen one.
|
|
2548
2781
|
- `disabled?: boolean`: Disables this item: it cannot be chosen.
|
|
2549
|
-
- `[
|
|
2782
|
+
- `[kpRadioGroupIndicator]` is `KpRadioGroupIndicator`. Structural: written `*kpRadioGroupIndicator`. `<span *kpRadioGroupIndicator>`: in the page while its item is the chosen one.
|
|
2550
2783
|
|
|
2551
2784
|
Attributes and CSS variables, by part:
|
|
2552
2785
|
|
|
@@ -2554,7 +2787,7 @@ Attributes and CSS variables, by part:
|
|
|
2554
2787
|
- `data-disabled`: Present when it is disabled.
|
|
2555
2788
|
- `data-readonly`: Present when it can be read but not changed.
|
|
2556
2789
|
- `data-required`: Present when the form needs it.
|
|
2557
|
-
- item: One choice. It holds a hidden native radio, which a form and a label reach.
|
|
2790
|
+
- 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.
|
|
2558
2791
|
- `data-checked`: Present when it is checked.
|
|
2559
2792
|
- `data-unchecked`: Present when it is not checked.
|
|
2560
2793
|
- `data-disabled`: Present when it is disabled.
|
|
@@ -2572,17 +2805,17 @@ Attributes and CSS variables, by part:
|
|
|
2572
2805
|
### Resizable
|
|
2573
2806
|
|
|
2574
2807
|
```
|
|
2575
|
-
import {
|
|
2808
|
+
import { KpResizableGroup, KpResizablePanel, KpResizableHandle } from "@kirana-ui/angular"
|
|
2576
2809
|
```
|
|
2577
2810
|
|
|
2578
|
-
Parts: `[
|
|
2811
|
+
Parts: `[kpResizableGroup]`, `[kpResizablePanel]`, `[kpResizableHandle]`.
|
|
2579
2812
|
|
|
2580
2813
|
Anatomy:
|
|
2581
2814
|
|
|
2582
2815
|
```
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2816
|
+
kpResizableGroup
|
|
2817
|
+
kpResizablePanel (repeated)
|
|
2818
|
+
kpResizableHandle (repeated)
|
|
2586
2819
|
```
|
|
2587
2820
|
|
|
2588
2821
|
Props of its root:
|
|
@@ -2594,23 +2827,23 @@ Props of its root:
|
|
|
2594
2827
|
|
|
2595
2828
|
Each part, and its own props:
|
|
2596
2829
|
|
|
2597
|
-
- `[
|
|
2598
|
-
- `[
|
|
2830
|
+
- `[kpResizableGroup]` is `KpResizableGroup`. `exportAs: "kpResizableGroup"`. Its props are above.
|
|
2831
|
+
- `[kpResizablePanel]` is `KpResizablePanel`.
|
|
2599
2832
|
- `defaultSize?: number`: Its share to begin with, in hundredths of the group. Either every panel gives one or none does (they are then equal).
|
|
2600
2833
|
- `minSize?: number`: The least it can be made. Default: 0.
|
|
2601
2834
|
- `maxSize?: number`: The most it can be made. Default: 100.
|
|
2602
|
-
- `[
|
|
2835
|
+
- `[kpResizableHandle]` is `KpResizableHandle`.
|
|
2603
2836
|
- `disabled?: boolean`: Disables this handle: it cannot be dragged or moved with the keyboard.
|
|
2604
2837
|
|
|
2605
2838
|
Attributes and CSS variables, by part:
|
|
2606
2839
|
|
|
2607
|
-
- group: The panels and the bars between them. A design lays it out as a flex box.
|
|
2840
|
+
- group: The panels and the bars between them. A design lays it out as a flex box: `display: flex`, and `flex-direction: column` when it is vertical. A group in a panel that is a flex box itself takes `min-width: 0` and `min-height: 0`, or what it holds widens the panel.
|
|
2608
2841
|
- `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
|
|
2609
2842
|
- `data-disabled`: Present when it is disabled.
|
|
2610
|
-
- panel: One panel. It carries its share of the group.
|
|
2843
|
+
- panel: One panel. It carries its share of the group, written as its `flex` with `min-width: 0` and `min-height: 0`, so what it holds cannot keep it past its share. Its `overflow` is the design's.
|
|
2611
2844
|
- `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
|
|
2612
2845
|
- `--panel-size`: The panel's share, in hundredths of the group.
|
|
2613
|
-
- handle: The bar between two panels: dragged, or moved with the arrows.
|
|
2846
|
+
- handle: The bar between two panels: dragged, or moved with the arrows. A design gives it its thickness and `flex-shrink: 0`, so the panels do not squeeze it.
|
|
2614
2847
|
- `data-orientation="horizontal | vertical"`: Whether the panels are side by side or one over the other.
|
|
2615
2848
|
- `data-dragging`: Present while the bar is dragged.
|
|
2616
2849
|
- `data-disabled`: Present when it is disabled.
|
|
@@ -2618,32 +2851,33 @@ Attributes and CSS variables, by part:
|
|
|
2618
2851
|
### ScrollArea
|
|
2619
2852
|
|
|
2620
2853
|
```
|
|
2621
|
-
import {
|
|
2854
|
+
import { KpScrollArea, KpScrollAreaViewport, KpScrollAreaContent, KpScrollAreaScrollbar, KpScrollAreaThumb, KpScrollAreaCorner } from "@kirana-ui/angular"
|
|
2622
2855
|
```
|
|
2623
2856
|
|
|
2624
|
-
Parts: `[
|
|
2857
|
+
Parts: `[kpScrollArea]`, `[kpScrollAreaViewport]`, `[kpScrollAreaContent]`, `[kpScrollAreaScrollbar]`, `[kpScrollAreaThumb]`, `[kpScrollAreaCorner]`.
|
|
2625
2858
|
|
|
2626
2859
|
Anatomy:
|
|
2627
2860
|
|
|
2628
2861
|
```
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2862
|
+
kpScrollArea
|
|
2863
|
+
kpScrollAreaViewport
|
|
2864
|
+
kpScrollAreaContent (optional)
|
|
2865
|
+
*kpScrollAreaScrollbar (repeated, as above)
|
|
2866
|
+
*kpScrollAreaScrollbar (repeated)
|
|
2867
|
+
kpScrollAreaThumb
|
|
2868
|
+
*kpScrollAreaCorner
|
|
2635
2869
|
```
|
|
2636
2870
|
|
|
2637
2871
|
Each part, and its own props:
|
|
2638
2872
|
|
|
2639
|
-
- `[
|
|
2640
|
-
- `[
|
|
2641
|
-
- `[
|
|
2642
|
-
- `[
|
|
2643
|
-
- `*
|
|
2644
|
-
- `keepMounted?: boolean`: Written after the directive's value: `*
|
|
2645
|
-
- `[
|
|
2646
|
-
- `[
|
|
2873
|
+
- `[kpScrollArea]` is `KpScrollArea`. `exportAs: "kpScrollArea"`.
|
|
2874
|
+
- `[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).
|
|
2876
|
+
- `[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
|
+
- `*kpScrollAreaScrollbar: Orientation | ""`: The directive's own value: `*kpScrollAreaScrollbar="…"`. Which way it scrolls: `'horizontal'`, or `'vertical'` when none is given.
|
|
2878
|
+
- `keepMounted?: boolean`: Written after the directive's value: `*kpScrollAreaScrollbar="…; keepMounted: …"`. In the page even while there is nothing to scroll its way.
|
|
2879
|
+
- `[kpScrollAreaThumb]` is `KpScrollAreaThumb`.
|
|
2880
|
+
- `[kpScrollAreaCorner]` is `KpScrollAreaCorner`. Structural: written `*kpScrollAreaCorner`. `<div *kpScrollAreaCorner>`: in the page while both scrollbars are.
|
|
2647
2881
|
|
|
2648
2882
|
Attributes and CSS variables, by part:
|
|
2649
2883
|
|
|
@@ -2670,30 +2904,30 @@ Attributes and CSS variables, by part:
|
|
|
2670
2904
|
### Select
|
|
2671
2905
|
|
|
2672
2906
|
```
|
|
2673
|
-
import {
|
|
2907
|
+
import { KpSelect, KpSelectTrigger, KpSelectValue, KpSelectPortal, KpSelectPositioner, KpSelectPopup, KpSelectList, KpSelectScrollUpArrow, KpSelectScrollDownArrow, KpSelectGroup, KpSelectGroupLabel, KpSelectSeparator, KpSelectItem, KpSelectItemText, KpSelectItemIndicator, KpSelectInput } from "@kirana-ui/angular"
|
|
2674
2908
|
```
|
|
2675
2909
|
|
|
2676
|
-
Parts: `[
|
|
2910
|
+
Parts: `[kpSelect]`, `[kpSelectTrigger]`, `[kpSelectValue]`, `[kpSelectPortal]`, `[kpSelectPositioner]`, `[kpSelectPopup]`, `[kpSelectList]`, `[kpSelectScrollUpArrow]`, `[kpSelectScrollDownArrow]`, `[kpSelectGroup]`, `[kpSelectGroupLabel]`, `[kpSelectSeparator]`, `[kpSelectItem]`, `[kpSelectItemText]`, `[kpSelectItemIndicator]`.
|
|
2677
2911
|
|
|
2678
2912
|
Anatomy:
|
|
2679
2913
|
|
|
2680
2914
|
```
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
*
|
|
2684
|
-
*
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
*
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
*
|
|
2694
|
-
|
|
2695
|
-
*
|
|
2696
|
-
input[
|
|
2915
|
+
kpSelect
|
|
2916
|
+
kpSelectTrigger
|
|
2917
|
+
*kpSelectValue
|
|
2918
|
+
*kpSelectPortal
|
|
2919
|
+
kpSelectPositioner
|
|
2920
|
+
kpSelectPopup
|
|
2921
|
+
*kpSelectScrollUpArrow
|
|
2922
|
+
kpSelectList (optional)
|
|
2923
|
+
kpSelectGroup (optional, repeated)
|
|
2924
|
+
kpSelectGroupLabel
|
|
2925
|
+
kpSelectItem (repeated)
|
|
2926
|
+
kpSelectItemText
|
|
2927
|
+
*kpSelectItemIndicator
|
|
2928
|
+
kpSelectSeparator (repeated)
|
|
2929
|
+
*kpSelectScrollDownArrow
|
|
2930
|
+
input[kpSelectInput] (Angular only)
|
|
2697
2931
|
```
|
|
2698
2932
|
|
|
2699
2933
|
Props of its root:
|
|
@@ -2703,6 +2937,7 @@ Props of its root:
|
|
|
2703
2937
|
- `[(open)]: boolean`: Whether the list is open, when the caller holds it.
|
|
2704
2938
|
- `defaultOpen?: boolean`: Whether the list starts open, when the caller does not hold `open`. Read once.
|
|
2705
2939
|
- `disabled?: boolean`: Disabled: it cannot be changed.
|
|
2940
|
+
- `readOnly?: boolean`: Shown as it is, focusable, not changeable: the list still opens, and nothing is chosen.
|
|
2706
2941
|
- `required?: boolean`: In a field, "none" is then wrong.
|
|
2707
2942
|
- `name?: string`: With a name, the value is submitted with the form around it.
|
|
2708
2943
|
- `form?: string`: The id of the form the control belongs to, when it is not inside it.
|
|
@@ -2717,28 +2952,28 @@ Props of its root:
|
|
|
2717
2952
|
|
|
2718
2953
|
Each part, and its own props:
|
|
2719
2954
|
|
|
2720
|
-
- `[
|
|
2721
|
-
- `[
|
|
2722
|
-
- `[
|
|
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.
|
|
2723
2958
|
- `placeholder?: string`: Shown while nothing is chosen.
|
|
2724
|
-
- `[
|
|
2725
|
-
- `[
|
|
2959
|
+
- `[kpSelectPortal]` is `KpSelectPortal`. Structural: written `*kpSelectPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
2960
|
+
- `[kpSelectPositioner]` is `KpSelectPositioner`. Takes the positioner options ("Positioner options", above).
|
|
2726
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.
|
|
2727
|
-
- `[
|
|
2728
|
-
- `[
|
|
2729
|
-
- `[
|
|
2730
|
-
- `[
|
|
2731
|
-
- `[
|
|
2732
|
-
- `[
|
|
2733
|
-
- `[
|
|
2734
|
-
- `[
|
|
2962
|
+
- `[kpSelectPopup]` is `KpSelectPopup`.
|
|
2963
|
+
- `[kpSelectList]` is `KpSelectList`. The items' own box inside the popup, when the popup also holds scroll arrows.
|
|
2964
|
+
- `[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.
|
|
2965
|
+
- `[kpSelectScrollDownArrow]` is `KpSelectScrollDownArrow`. Structural: written `*kpSelectScrollDownArrow`. `<div *kpSelectScrollDownArrow>`: in the page while there is more of the list below.
|
|
2966
|
+
- `[kpSelectGroup]` is `KpSelectGroup`. Items that belong together, named by their `kpSelectGroupLabel`.
|
|
2967
|
+
- `[kpSelectGroupLabel]` is `KpSelectGroupLabel`. Names the group it is in. With no group around it, it is plain text.
|
|
2968
|
+
- `[kpSelectSeparator]` is `KpSelectSeparator`. A line between groups.
|
|
2969
|
+
- `[kpSelectItem]` is `KpSelectItem`.
|
|
2735
2970
|
- `value: unknown`: Required. What the select's value is while this item is chosen.
|
|
2736
2971
|
- `disabled?: boolean`: Disables this item: it cannot be chosen, and the arrows pass over it.
|
|
2737
2972
|
- `label?: string`: What typeahead matches and the trigger shows; the item's text when left out.
|
|
2738
2973
|
- `index?: number`: Its place among all the rows, in a virtualized list.
|
|
2739
|
-
- `[
|
|
2740
|
-
- `[
|
|
2741
|
-
- `input[
|
|
2974
|
+
- `[kpSelectItemText]` is `KpSelectItemText`. The item's name: what the trigger shows once it is chosen.
|
|
2975
|
+
- `[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.
|
|
2742
2977
|
|
|
2743
2978
|
Attributes and CSS variables, by part:
|
|
2744
2979
|
|
|
@@ -2746,6 +2981,7 @@ Attributes and CSS variables, by part:
|
|
|
2746
2981
|
- `data-popup-open`: Present when the list is open.
|
|
2747
2982
|
- `data-placeholder`: Present while nothing is chosen.
|
|
2748
2983
|
- `data-disabled`: Present when it is disabled.
|
|
2984
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
2749
2985
|
- value: The chosen value's label, or the placeholder. With several values, their labels with commas between.
|
|
2750
2986
|
- `data-placeholder`: Present while nothing is chosen.
|
|
2751
2987
|
- positioner: Places the list against the trigger. It carries the geometry.
|
|
@@ -2785,14 +3021,14 @@ Attributes and CSS variables, by part:
|
|
|
2785
3021
|
### Separator
|
|
2786
3022
|
|
|
2787
3023
|
```
|
|
2788
|
-
import {
|
|
3024
|
+
import { KpSeparator } from "@kirana-ui/angular"
|
|
2789
3025
|
```
|
|
2790
3026
|
|
|
2791
3027
|
Props:
|
|
2792
3028
|
|
|
2793
3029
|
- `orientation?: Orientation`: Whether the line lies across (the default) or stands upright: what a screen reader is told.
|
|
2794
3030
|
|
|
2795
|
-
`[
|
|
3031
|
+
`[kpSeparator]` is `KpSeparator`. `exportAs: "kpSeparator"`.
|
|
2796
3032
|
|
|
2797
3033
|
Attributes and CSS variables, by part:
|
|
2798
3034
|
|
|
@@ -2802,20 +3038,20 @@ Attributes and CSS variables, by part:
|
|
|
2802
3038
|
### Slider
|
|
2803
3039
|
|
|
2804
3040
|
```
|
|
2805
|
-
import {
|
|
3041
|
+
import { KpSlider, KpSliderValue, KpSliderControl, KpSliderTrack, KpSliderIndicator, KpSliderThumb } from "@kirana-ui/angular"
|
|
2806
3042
|
```
|
|
2807
3043
|
|
|
2808
|
-
Parts: `[
|
|
3044
|
+
Parts: `[kpSlider]`, `[kpSliderValue]`, `[kpSliderControl]`, `[kpSliderTrack]`, `[kpSliderIndicator]`, `[kpSliderThumb]`.
|
|
2809
3045
|
|
|
2810
3046
|
Anatomy:
|
|
2811
3047
|
|
|
2812
3048
|
```
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
3049
|
+
kpSlider
|
|
3050
|
+
kpSliderValue
|
|
3051
|
+
kpSliderControl
|
|
3052
|
+
kpSliderTrack
|
|
3053
|
+
kpSliderIndicator
|
|
3054
|
+
kpSliderThumb (repeated)
|
|
2819
3055
|
```
|
|
2820
3056
|
|
|
2821
3057
|
Props of its root:
|
|
@@ -2827,9 +3063,10 @@ Props of its root:
|
|
|
2827
3063
|
- `step?: number`: Default 1.
|
|
2828
3064
|
- `largeStep?: number`: What Page Up, Page Down and an arrow with Shift move by. Default 10.
|
|
2829
3065
|
- `minStepsBetweenValues?: number`: How many steps two thumbs of a range stay apart. Default 0.
|
|
2830
|
-
- `thumbAlignment?: "center" | "edge" | "edge-client-only"`: `"edge"` keeps a thumb inside the control at the ends of its range.
|
|
3066
|
+
- `thumbAlignment?: "center" | "edge" | "edge-client-only"`: `"edge"` keeps a thumb inside the control at the ends of its range. Default `"center"`.
|
|
2831
3067
|
- `orientation?: "horizontal" | "vertical"`: Whether the track lies across (the default) or stands upright: the arrows that move a thumb follow.
|
|
2832
3068
|
- `disabled?: boolean`: Disabled: it cannot be changed.
|
|
3069
|
+
- `readOnly?: boolean`: Shown as it is, focusable, not changeable; its value is still submitted.
|
|
2833
3070
|
- `name?: string`: With a name, each thumb's value is submitted with the form around the slider.
|
|
2834
3071
|
- `form?: string`: The id of the form the control belongs to, when it is not inside it.
|
|
2835
3072
|
- `format?: Intl.NumberFormatOptions`: How a value is written.
|
|
@@ -2840,12 +3077,12 @@ Props of its root:
|
|
|
2840
3077
|
|
|
2841
3078
|
Each part, and its own props:
|
|
2842
3079
|
|
|
2843
|
-
- `[
|
|
2844
|
-
- `[
|
|
2845
|
-
- `[
|
|
2846
|
-
- `[
|
|
2847
|
-
- `[
|
|
2848
|
-
- `[
|
|
3080
|
+
- `[kpSlider]` is `KpSlider`. `exportAs: "kpSlider"`. Generic: `<Value extends SliderValue = SliderValue>`. Its props are above.
|
|
3081
|
+
- `[kpSliderValue]` is `KpSliderValue`. Shows the written value.
|
|
3082
|
+
- `[kpSliderControl]` is `KpSliderControl`.
|
|
3083
|
+
- `[kpSliderTrack]` is `KpSliderTrack`.
|
|
3084
|
+
- `[kpSliderIndicator]` is `KpSliderIndicator`.
|
|
3085
|
+
- `[kpSliderThumb]` is `KpSliderThumb`. On a thumb's element. It draws the hidden input inside it, which a form reads.
|
|
2849
3086
|
- `index?: number`: Which value of a range the thumb is, from 0. A thumb that is given none takes its place among the slider's thumbs, in the order they are written.
|
|
2850
3087
|
|
|
2851
3088
|
Attributes and CSS variables, by part:
|
|
@@ -2853,28 +3090,34 @@ Attributes and CSS variables, by part:
|
|
|
2853
3090
|
- root: Groups the slider's parts.
|
|
2854
3091
|
- `data-orientation="horizontal | vertical"`: The way the track runs.
|
|
2855
3092
|
- `data-disabled`: Present when it is disabled.
|
|
3093
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
2856
3094
|
- `data-dragging`: Present while a pointer holds a thumb.
|
|
2857
3095
|
- value: The value, written.
|
|
2858
3096
|
- `data-orientation="horizontal | vertical"`: The way the track runs.
|
|
2859
3097
|
- `data-disabled`: Present when it is disabled.
|
|
3098
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
2860
3099
|
- `data-dragging`: Present while a pointer holds a thumb.
|
|
2861
3100
|
- control: What a pointer presses and drags on. It holds the track and the thumbs.
|
|
2862
3101
|
- `data-orientation="horizontal | vertical"`: The way the track runs.
|
|
2863
3102
|
- `data-disabled`: Present when it is disabled.
|
|
3103
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
2864
3104
|
- `data-dragging`: Present while a pointer holds a thumb.
|
|
2865
3105
|
- track: The whole range.
|
|
2866
3106
|
- `data-orientation="horizontal | vertical"`: The way the track runs.
|
|
2867
3107
|
- `data-disabled`: Present when it is disabled.
|
|
3108
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
2868
3109
|
- `data-dragging`: Present while a pointer holds a thumb.
|
|
2869
3110
|
- indicator: The filled part: up to the thumb, or from the first thumb to the last. Its place and length are written on it.
|
|
2870
3111
|
- `data-orientation="horizontal | vertical"`: The way the track runs.
|
|
2871
3112
|
- `data-disabled`: Present when it is disabled.
|
|
3113
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
2872
3114
|
- `data-dragging`: Present while a pointer holds a thumb.
|
|
2873
3115
|
- `--start-position`: With thumbs that stay inside the control: where the filled part starts, or with one thumb where it ends.
|
|
2874
3116
|
- `--relative-size`: With thumbs that stay inside the control and a range: the filled part's length.
|
|
2875
3117
|
- 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.
|
|
2876
3118
|
- `data-orientation="horizontal | vertical"`: The way the track runs.
|
|
2877
3119
|
- `data-disabled`: Present when it is disabled.
|
|
3120
|
+
- `data-readonly`: Present when it can be read but not changed.
|
|
2878
3121
|
- `data-dragging`: Present while a pointer holds a thumb.
|
|
2879
3122
|
- `data-index`: Which thumb it is, from 0.
|
|
2880
3123
|
- `--position`: With thumbs that stay inside the control: where the thumb's centre is.
|
|
@@ -2882,16 +3125,16 @@ Attributes and CSS variables, by part:
|
|
|
2882
3125
|
### Switch
|
|
2883
3126
|
|
|
2884
3127
|
```
|
|
2885
|
-
import {
|
|
3128
|
+
import { KpSwitch, KpSwitchThumb } from "@kirana-ui/angular"
|
|
2886
3129
|
```
|
|
2887
3130
|
|
|
2888
|
-
Parts: `[
|
|
3131
|
+
Parts: `[kpSwitch]`, `[kpSwitchThumb]`.
|
|
2889
3132
|
|
|
2890
3133
|
Anatomy:
|
|
2891
3134
|
|
|
2892
3135
|
```
|
|
2893
|
-
|
|
2894
|
-
|
|
3136
|
+
kpSwitch
|
|
3137
|
+
kpSwitchThumb
|
|
2895
3138
|
```
|
|
2896
3139
|
|
|
2897
3140
|
Props of its root:
|
|
@@ -2908,8 +3151,8 @@ Props of its root:
|
|
|
2908
3151
|
|
|
2909
3152
|
Each part, and its own props:
|
|
2910
3153
|
|
|
2911
|
-
- `[
|
|
2912
|
-
- `[
|
|
3154
|
+
- `[kpSwitch]` is `KpSwitch`. `exportAs: "kpSwitch"`. On the box's element. It draws the hidden native input inside it, which a form and a label reach. Its props are above.
|
|
3155
|
+
- `[kpSwitchThumb]` is `KpSwitchThumb`.
|
|
2913
3156
|
|
|
2914
3157
|
Attributes and CSS variables, by part:
|
|
2915
3158
|
|
|
@@ -2929,19 +3172,19 @@ Attributes and CSS variables, by part:
|
|
|
2929
3172
|
### Tabs
|
|
2930
3173
|
|
|
2931
3174
|
```
|
|
2932
|
-
import {
|
|
3175
|
+
import { KpTabs, KpTabsList, KpTabsTab, KpTabsIndicator, KpTabsPanel } from "@kirana-ui/angular"
|
|
2933
3176
|
```
|
|
2934
3177
|
|
|
2935
|
-
Parts: `[
|
|
3178
|
+
Parts: `[kpTabs]`, `[kpTabsList]`, `[kpTabsTab]`, `[kpTabsIndicator]`, `[kpTabsPanel]`.
|
|
2936
3179
|
|
|
2937
3180
|
Anatomy:
|
|
2938
3181
|
|
|
2939
3182
|
```
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
*
|
|
3183
|
+
kpTabs
|
|
3184
|
+
kpTabsList
|
|
3185
|
+
kpTabsTab (repeated)
|
|
3186
|
+
kpTabsIndicator
|
|
3187
|
+
*kpTabsPanel (repeated)
|
|
2945
3188
|
```
|
|
2946
3189
|
|
|
2947
3190
|
Props of its root:
|
|
@@ -2953,17 +3196,17 @@ Props of its root:
|
|
|
2953
3196
|
|
|
2954
3197
|
Each part, and its own props:
|
|
2955
3198
|
|
|
2956
|
-
- `[
|
|
2957
|
-
- `[
|
|
3199
|
+
- `[kpTabs]` is `KpTabs`. `exportAs: "kpTabs"`. Generic: `<Value = unknown>`. Its props are above.
|
|
3200
|
+
- `[kpTabsList]` is `KpTabsList`.
|
|
2958
3201
|
- `activateOnFocus?: boolean`: Whether moving focus onto a tab with the arrows activates it. Default `false`.
|
|
2959
3202
|
- `loop?: boolean`: Whether the arrows wrap from the last tab to the first. Default `true`.
|
|
2960
|
-
- `[
|
|
3203
|
+
- `[kpTabsTab]` is `KpTabsTab`.
|
|
2961
3204
|
- `value: unknown`: Required. What the tabs' value is while this tab is the active one.
|
|
2962
3205
|
- `disabled?: boolean`: Disables this tab: it cannot be chosen.
|
|
2963
|
-
- `[
|
|
2964
|
-
- `[
|
|
2965
|
-
- `*
|
|
2966
|
-
- `keepMounted?: boolean`: Written after the directive's value: `*
|
|
3206
|
+
- `[kpTabsIndicator]` is `KpTabsIndicator`.
|
|
3207
|
+
- `[kpTabsPanel]` is `KpTabsPanel`. Structural: written `*kpTabsPanel`. `<div *kpTabsPanel="'account'">`: in the page while its tab is the active one; `*kpTabsPanel="'account'; keepMounted: true"` keeps it, hidden.
|
|
3208
|
+
- `*kpTabsPanel: unknown`: The directive's own value: `*kpTabsPanel="…"`. Required. The value of the tab this is the panel of.
|
|
3209
|
+
- `keepMounted?: boolean`: Written after the directive's value: `*kpTabsPanel="…; keepMounted: …"`. Keeps the panel in the page, `hidden`, while its tab is not the active one.
|
|
2967
3210
|
|
|
2968
3211
|
Attributes and CSS variables, by part:
|
|
2969
3212
|
|
|
@@ -2996,42 +3239,42 @@ Attributes and CSS variables, by part:
|
|
|
2996
3239
|
### Toast
|
|
2997
3240
|
|
|
2998
3241
|
```
|
|
2999
|
-
import {
|
|
3242
|
+
import { KpToastViewport, KpToastList, KpToastRoot, KpToastContent, KpToastTitle, KpToastDescription, KpToastClose, KpToastAction } from "@kirana-ui/angular"
|
|
3000
3243
|
```
|
|
3001
3244
|
|
|
3002
|
-
Parts: `[
|
|
3245
|
+
Parts: `[kpToastViewport]`, `[kpToastList]`, `[kpToastRoot]`, `[kpToastContent]`, `[kpToastTitle]`, `[kpToastDescription]`, `[kpToastClose]`, `[kpToastAction]`.
|
|
3003
3246
|
|
|
3004
3247
|
Anatomy:
|
|
3005
3248
|
|
|
3006
3249
|
```
|
|
3007
|
-
|
|
3008
|
-
*
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3250
|
+
kpToastViewport
|
|
3251
|
+
*kpToastList
|
|
3252
|
+
kpToastRoot (repeated)
|
|
3253
|
+
kpToastContent (optional)
|
|
3254
|
+
kpToastTitle
|
|
3255
|
+
kpToastDescription
|
|
3256
|
+
kpToastClose
|
|
3257
|
+
kpToastAction
|
|
3015
3258
|
```
|
|
3016
3259
|
|
|
3017
3260
|
Props of its root:
|
|
3018
3261
|
|
|
3019
|
-
- `toast: ToastRecord`: Required. The toast it draws: the one `*
|
|
3262
|
+
- `toast: ToastRecord`: Required. The toast it draws: the one `*kpToastList` gave its template (`let toast`).
|
|
3020
3263
|
|
|
3021
3264
|
Each part, and its own props:
|
|
3022
3265
|
|
|
3023
|
-
- `[
|
|
3266
|
+
- `[kpToastViewport]` is `KpToastViewport`. `exportAs: "kpToastViewport"`. Where a toaster's toasts are drawn. Always in the page: put it once, near the root.
|
|
3024
3267
|
- `toaster: Toaster`: Required. The page's toaster: one is made with `createToaster()`, once, in a module.
|
|
3025
3268
|
- `label?: string`: What the region of toasts is called, for assistive technology.
|
|
3026
3269
|
- `hotkey?: string`: The key that takes focus to the toasts. Default: `"F6"`.
|
|
3027
3270
|
- `swipeDirection?: "left" | "right" | "up" | "down"`: The way a toast is dragged to close it. Default: `"right"`.
|
|
3028
|
-
- `[
|
|
3029
|
-
- `[
|
|
3030
|
-
- `[
|
|
3031
|
-
- `[
|
|
3032
|
-
- `[
|
|
3033
|
-
- `[
|
|
3034
|
-
- `[
|
|
3271
|
+
- `[kpToastList]` is `KpToastList`. Structural: written `*kpToastList`. Its template is given the entry: `let entry` is a `ToastRecord`. `<div *kpToastList="let toast">`: its template once for each toast, the newest first.
|
|
3272
|
+
- `[kpToastRoot]` is `KpToastRoot`. One toast, on the element `*kpToastList` draws for it. Its props are above.
|
|
3273
|
+
- `[kpToastContent]` is `KpToastContent`. What holds a toast's contents, when the design sizes the toast itself.
|
|
3274
|
+
- `[kpToastTitle]` is `KpToastTitle`. The toast's title, unless something is written in its element.
|
|
3275
|
+
- `[kpToastDescription]` is `KpToastDescription`. The toast's description, unless something is written in its element.
|
|
3276
|
+
- `[kpToastClose]` is `KpToastClose`. Closes the toast.
|
|
3277
|
+
- `[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()`.
|
|
3035
3278
|
|
|
3036
3279
|
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".
|
|
3037
3280
|
|
|
@@ -3060,7 +3303,7 @@ Attributes and CSS variables, by part:
|
|
|
3060
3303
|
### Toggle
|
|
3061
3304
|
|
|
3062
3305
|
```
|
|
3063
|
-
import {
|
|
3306
|
+
import { KpToggle } from "@kirana-ui/angular"
|
|
3064
3307
|
```
|
|
3065
3308
|
|
|
3066
3309
|
Props:
|
|
@@ -3071,7 +3314,7 @@ Props:
|
|
|
3071
3314
|
- `value?: unknown`: In a toggle group: what the group's value holds while this one is pressed.
|
|
3072
3315
|
- `(pressedChanged): { pressed: boolean; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
|
|
3073
3316
|
|
|
3074
|
-
`[
|
|
3317
|
+
`[kpToggle]` is `KpToggle`. `exportAs: "kpToggle"`. Inside a `kpToggleGroup`, `value` makes it one of the group's toggles.
|
|
3075
3318
|
|
|
3076
3319
|
Attributes and CSS variables, by part:
|
|
3077
3320
|
|
|
@@ -3082,7 +3325,7 @@ Attributes and CSS variables, by part:
|
|
|
3082
3325
|
### ToggleGroup
|
|
3083
3326
|
|
|
3084
3327
|
```
|
|
3085
|
-
import {
|
|
3328
|
+
import { KpToggleGroup } from "@kirana-ui/angular"
|
|
3086
3329
|
```
|
|
3087
3330
|
|
|
3088
3331
|
Props:
|
|
@@ -3095,7 +3338,7 @@ Props:
|
|
|
3095
3338
|
- `loop?: boolean`: Whether the arrows go round from the last toggle to the first. Default: they do.
|
|
3096
3339
|
- `(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.
|
|
3097
3340
|
|
|
3098
|
-
`[
|
|
3341
|
+
`[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.
|
|
3099
3342
|
|
|
3100
3343
|
Attributes and CSS variables, by part:
|
|
3101
3344
|
|
|
@@ -3107,20 +3350,20 @@ Attributes and CSS variables, by part:
|
|
|
3107
3350
|
### Toolbar
|
|
3108
3351
|
|
|
3109
3352
|
```
|
|
3110
|
-
import {
|
|
3353
|
+
import { KpToolbar, KpToolbarButton, KpToolbarLink, KpToolbarInput, KpToolbarGroup, KpToolbarSeparator } from "@kirana-ui/angular"
|
|
3111
3354
|
```
|
|
3112
3355
|
|
|
3113
|
-
Parts: `[
|
|
3356
|
+
Parts: `[kpToolbar]`, `[kpToolbarButton]`, `[kpToolbarLink]`, `[kpToolbarInput]`, `[kpToolbarGroup]`, `[kpToolbarSeparator]`.
|
|
3114
3357
|
|
|
3115
3358
|
Anatomy:
|
|
3116
3359
|
|
|
3117
3360
|
```
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3361
|
+
kpToolbar
|
|
3362
|
+
kpToolbarGroup (optional, repeated)
|
|
3363
|
+
kpToolbarButton (repeated)
|
|
3364
|
+
kpToolbarLink (repeated)
|
|
3365
|
+
kpToolbarInput (repeated)
|
|
3366
|
+
kpToolbarSeparator (repeated)
|
|
3124
3367
|
```
|
|
3125
3368
|
|
|
3126
3369
|
Props of its root:
|
|
@@ -3131,15 +3374,15 @@ Props of its root:
|
|
|
3131
3374
|
|
|
3132
3375
|
Each part, and its own props:
|
|
3133
3376
|
|
|
3134
|
-
- `[
|
|
3135
|
-
- `[
|
|
3377
|
+
- `[kpToolbar]` is `KpToolbar`. `exportAs: "kpToolbar"`. Its props are above.
|
|
3378
|
+
- `[kpToolbarButton]` is `KpToolbarButton`.
|
|
3136
3379
|
- `disabled?: boolean`: Disables this control.
|
|
3137
|
-
- `[
|
|
3138
|
-
- `[
|
|
3380
|
+
- `[kpToolbarLink]` is `KpToolbarLink`.
|
|
3381
|
+
- `[kpToolbarInput]` is `KpToolbarInput`. `<input kpToolbarInput>`: the arrows are its own until the caret is at an end.
|
|
3139
3382
|
- `disabled?: boolean`: Disables this control.
|
|
3140
|
-
- `[
|
|
3383
|
+
- `[kpToolbarGroup]` is `KpToolbarGroup`.
|
|
3141
3384
|
- `disabled?: boolean`: Disables this control.
|
|
3142
|
-
- `[
|
|
3385
|
+
- `[kpToolbarSeparator]` is `KpToolbarSeparator`.
|
|
3143
3386
|
|
|
3144
3387
|
Attributes and CSS variables, by part:
|
|
3145
3388
|
|
|
@@ -3164,41 +3407,41 @@ Attributes and CSS variables, by part:
|
|
|
3164
3407
|
### Tooltip
|
|
3165
3408
|
|
|
3166
3409
|
```
|
|
3167
|
-
import {
|
|
3410
|
+
import { KpTooltip, KpTooltipTrigger, KpTooltipPortal, KpTooltipPositioner, KpTooltipPopup, KpTooltipArrow } from "@kirana-ui/angular"
|
|
3168
3411
|
```
|
|
3169
3412
|
|
|
3170
|
-
Parts: `[
|
|
3413
|
+
Parts: `[kpTooltip]`, `[kpTooltipTrigger]`, `[kpTooltipPortal]`, `[kpTooltipPositioner]`, `[kpTooltipPopup]`, `[kpTooltipArrow]`.
|
|
3171
3414
|
|
|
3172
3415
|
Anatomy:
|
|
3173
3416
|
|
|
3174
3417
|
```
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
*
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3418
|
+
kpTooltip
|
|
3419
|
+
kpTooltipTrigger
|
|
3420
|
+
*kpTooltipPortal
|
|
3421
|
+
kpTooltipPositioner
|
|
3422
|
+
kpTooltipPopup
|
|
3423
|
+
kpTooltipArrow
|
|
3181
3424
|
```
|
|
3182
3425
|
|
|
3183
3426
|
Props of its root:
|
|
3184
3427
|
|
|
3185
3428
|
- `[(open)]: boolean`: Whether it is open, when the caller holds it.
|
|
3186
3429
|
- `defaultOpen?: boolean`: Whether it starts open, when the caller does not hold `open`. Read once.
|
|
3187
|
-
- `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds.
|
|
3188
|
-
- `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds.
|
|
3430
|
+
- `delay?: number`: How long the pointer rests on the trigger before the popup opens, in milliseconds. Default `600`.
|
|
3431
|
+
- `closeDelay?: number`: How long after the pointer leaves the popup closes, in milliseconds. Default `0`.
|
|
3189
3432
|
- `disabled?: boolean`: Disabled: the pointer and focus do not open it.
|
|
3190
3433
|
- `(openChanged): { open: boolean; details: ChangeDetails }`: The change with why it happened; `details.cancel()` keeps the value.
|
|
3191
3434
|
|
|
3192
3435
|
Each part, and its own props:
|
|
3193
3436
|
|
|
3194
|
-
- `[
|
|
3195
|
-
- `[
|
|
3437
|
+
- `[kpTooltip]` is `KpTooltip`. `exportAs: "kpTooltip"`. On any element, or on `<ng-container>` to draw none. Its props are above.
|
|
3438
|
+
- `[kpTooltipTrigger]` is `KpTooltipTrigger`.
|
|
3196
3439
|
- `delay?: number`: Its own waits, which come before the root's.
|
|
3197
3440
|
- `closeDelay?: number`: How long after the pointer leaves this trigger's popup closes, in milliseconds.
|
|
3198
|
-
- `[
|
|
3199
|
-
- `[
|
|
3200
|
-
- `[
|
|
3201
|
-
- `[
|
|
3441
|
+
- `[kpTooltipPortal]` is `KpTooltipPortal`. Structural: written `*kpTooltipPortal`. Draws what it holds at the end of `<body>`, or in the container a `PortalProvider` names.
|
|
3442
|
+
- `[kpTooltipPositioner]` is `KpTooltipPositioner`. Takes the positioner options ("Positioner options", above).
|
|
3443
|
+
- `[kpTooltipPopup]` is `KpTooltipPopup`.
|
|
3444
|
+
- `[kpTooltipArrow]` is `KpTooltipArrow`.
|
|
3202
3445
|
|
|
3203
3446
|
Attributes and CSS variables, by part:
|
|
3204
3447
|
|