@konce-pt/angular 0.7.11 → 0.7.12
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/CHANGELOG.md +17 -0
- package/charts/src/lib/llms.txt +30 -30
- package/grid/src/lib/llms.txt +48 -48
- package/map/src/lib/llms.txt +446 -446
- package/package.json +1 -1
- package/roadmap/src/lib/llms.txt +74 -74
- package/src/lib/accordion/llms.txt +9 -9
- package/src/lib/alert/llms.txt +10 -10
- package/src/lib/app-shell/llms.txt +59 -59
- package/src/lib/auth/llms.txt +58 -58
- package/src/lib/autocomplete/llms.txt +8 -8
- package/src/lib/avatar/llms.txt +9 -9
- package/src/lib/avatar-group/llms.txt +8 -8
- package/src/lib/badge/llms.txt +9 -9
- package/src/lib/bottom-sheet/llms.txt +14 -14
- package/src/lib/breadcrumb/llms.txt +7 -7
- package/src/lib/breakpoint/llms.txt +21 -21
- package/src/lib/button/llms.txt +34 -34
- package/src/lib/button-group/llms.txt +5 -5
- package/src/lib/card/llms.txt +27 -27
- package/src/lib/carousel/llms.txt +11 -11
- package/src/lib/checkbox/llms.txt +7 -7
- package/src/lib/chip/llms.txt +6 -6
- package/src/lib/chips-input/llms.txt +9 -9
- package/src/lib/color-picker/llms.txt +7 -7
- package/src/lib/confirm/llms.txt +11 -11
- package/src/lib/context-menu/llms.txt +10 -10
- package/src/lib/data-table/llms.txt +170 -170
- package/src/lib/data-view/llms.txt +8 -8
- package/src/lib/date-range/llms.txt +25 -25
- package/src/lib/datepicker/llms.txt +48 -48
- package/src/lib/dialog/llms.txt +62 -62
- package/src/lib/divider/llms.txt +9 -9
- package/src/lib/drawer/llms.txt +18 -18
- package/src/lib/empty/llms.txt +9 -9
- package/src/lib/fab/llms.txt +12 -12
- package/src/lib/fieldset/llms.txt +9 -9
- package/src/lib/file-upload/llms.txt +10 -10
- package/src/lib/form-field/llms.txt +45 -45
- package/src/lib/galleria/llms.txt +7 -7
- package/src/lib/i18n/llms.txt +21 -21
- package/src/lib/icon/llms.txt +20 -20
- package/src/lib/icon-button/llms.txt +8 -8
- package/src/lib/image/llms.txt +9 -9
- package/src/lib/input/llms.txt +27 -27
- package/src/lib/input-mask/llms.txt +10 -10
- package/src/lib/input-number/llms.txt +34 -34
- package/src/lib/input-otp/llms.txt +11 -11
- package/src/lib/knob/llms.txt +14 -14
- package/src/lib/listbox/llms.txt +8 -8
- package/src/lib/megamenu/llms.txt +13 -13
- package/src/lib/menu/llms.txt +26 -26
- package/src/lib/menubar/llms.txt +10 -10
- package/src/lib/meter-group/llms.txt +8 -8
- package/src/lib/order-list/llms.txt +8 -8
- package/src/lib/paginator/llms.txt +12 -12
- package/src/lib/panel/llms.txt +12 -12
- package/src/lib/password/llms.txt +12 -12
- package/src/lib/pick-list/llms.txt +8 -8
- package/src/lib/popover/llms.txt +8 -8
- package/src/lib/progress/llms.txt +6 -6
- package/src/lib/radio-group/llms.txt +5 -5
- package/src/lib/rating/llms.txt +6 -6
- package/src/lib/rich-text/llms.txt +50 -50
- package/src/lib/scroll-top/llms.txt +7 -7
- package/src/lib/select/llms.txt +26 -26
- package/src/lib/sidenav/llms.txt +24 -24
- package/src/lib/skeleton/llms.txt +6 -6
- package/src/lib/slider/llms.txt +17 -17
- package/src/lib/speed-dial/llms.txt +7 -7
- package/src/lib/spinner/llms.txt +5 -5
- package/src/lib/split-button/llms.txt +15 -15
- package/src/lib/splitter/llms.txt +11 -11
- package/src/lib/stepper/llms.txt +10 -10
- package/src/lib/switch/llms.txt +10 -10
- package/src/lib/switch-group/llms.txt +16 -16
- package/src/lib/tabs/llms.txt +10 -10
- package/src/lib/textarea/llms.txt +5 -5
- package/src/lib/timeline/llms.txt +10 -10
- package/src/lib/toast/llms.txt +10 -10
- package/src/lib/toolbar/llms.txt +31 -31
- package/src/lib/tooltip/llms.txt +21 -21
- package/src/lib/tree/llms.txt +6 -6
package/src/lib/select/llms.txt
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
# KptSelect (kpt-select)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A selection list on a custom panel (CDK Overlay), Signal Forms. Variants: single,
|
|
4
|
+
with a search field (`filter`) and multiple (`multiple`, chips; the value is `T[]`).
|
|
5
5
|
Import: `import { KptSelect, KptOption } from '@konce-pt/angular';`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Requires the CDK overlay styles in the application: `import '@angular/cdk/overlay-prebuilt.css';`
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Usage
|
|
10
10
|
roles: KptOption<string>[] = [{label:'Admin',value:'admin'}, ...];
|
|
11
|
-
<kpt-select [formField]="f.role" [options]="roles" placeholder="
|
|
12
|
-
<kpt-select [formField]="f.city" [options]="cities" filter placeholder="
|
|
11
|
+
<kpt-select [formField]="f.role" [options]="roles" placeholder="Choose…" />
|
|
12
|
+
<kpt-select [formField]="f.city" [options]="cities" filter placeholder="Search…" />
|
|
13
13
|
<kpt-select [formField]="f.tags" [options]="tags" multiple filter /> <!-- value: string[] -->
|
|
14
14
|
|
|
15
|
-
##
|
|
16
|
-
- `value`: model (T
|
|
17
|
-
- `filter`: boolean —
|
|
18
|
-
- `disabled`/`invalid`/`touched`: boolean;
|
|
19
|
-
- `open`: model (
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
## Float
|
|
27
|
-
|
|
28
|
-
select
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<kpt-form-field label="
|
|
15
|
+
## Inputs
|
|
16
|
+
- `value`: model (T, or T[] with multiple); `options`: KptOption<T>[]; `placeholder`: string
|
|
17
|
+
- `filter`: boolean — a search field; `multiple`: boolean — multi-select (chips)
|
|
18
|
+
- `disabled`/`invalid`/`touched`: boolean; the `touch` output.
|
|
19
|
+
- `open`: model (two-way `[(open)]`, the `(openChange)` output) — the panel state. It lets you open
|
|
20
|
+
the list from outside and know when the user is done choosing. For the latter **do not use `touch`**:
|
|
21
|
+
it also fires on the trigger's blur, that is, the moment the mouse goes down on an option in the panel (the panel
|
|
22
|
+
lives in a CDK Overlay container next to `<body>`, outside the control's DOM). That is what inline editing
|
|
23
|
+
in `kpt-data-table` does — see `data-table/llms.txt`.
|
|
24
|
+
- Keyboard: Enter/↓ opens, ↑/↓ navigate, Enter selects, Esc closes.
|
|
25
|
+
|
|
26
|
+
## Float label
|
|
27
|
+
In a `kpt-form-field` with `labelType` `over`/`in`/`on` the label also floats once an option is chosen —
|
|
28
|
+
the select provides the `KPT_FORM_FIELD_CONTROL` token with a `filled` signal (a value in an overlay cannot
|
|
29
|
+
be read from the DOM). Nothing needs configuring:
|
|
30
|
+
|
|
31
|
+
<kpt-form-field label="Country" labelType="on">
|
|
32
32
|
<kpt-select [formField]="f.country" [options]="countries" />
|
|
33
33
|
</kpt-form-field>
|
|
34
34
|
|
|
35
35
|
## i18n
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
The "Search…" and "No results" labels and the chip-removal aria text come from i18n (the `select` namespace).
|
|
37
|
+
English by default; configured through `provideKptI18n` — see `i18n/llms.txt`.
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Tokens
|
|
40
40
|
`--kpt-form-field-{bg,text,border,border-hover,border-focus,border-error,radius}`.
|
package/src/lib/sidenav/llms.txt
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
# KptSidenav (kpt-sidenav)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A side panel — a styled navigation container, usually in the `kptShellSidenav` slot
|
|
4
|
+
of `kpt-app-shell`. Import: `import { KptSidenav } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Selector
|
|
7
7
|
`kpt-sidenav`
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
## Content
|
|
10
|
+
Anything (ng-content) — it lands in the scrollable area. `<a>` elements come with built-in
|
|
11
|
+
navigation-entry styling (hover with `--kpt-color-muted`).
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
## The footer — `kptSidenavFooter`
|
|
14
|
+
An element carrying this attribute lands outside the scrollable area and stays stuck to the bottom of the
|
|
15
|
+
panel, no matter how long the navigation is. It gets a top rule (`--kpt-sidenav-border`) across the panel's
|
|
16
|
+
full width and the same padding as the navigation. Typical uses: the signed-in user block,
|
|
17
|
+
a theme toggle, the application version. It is a plain attribute, not a directive — there is nothing
|
|
18
|
+
to import.
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Example
|
|
21
21
|
<kpt-sidenav kptShellSidenav>
|
|
22
|
-
<a href="#">
|
|
23
|
-
<a href="#">
|
|
22
|
+
<a href="#">Dashboard</a>
|
|
23
|
+
<a href="#">Settings</a>
|
|
24
24
|
|
|
25
25
|
<div kptSidenavFooter>
|
|
26
26
|
<kpt-avatar name="Anna Kowalska" size="sm" />
|
|
@@ -28,16 +28,16 @@ trzeba importować.
|
|
|
28
28
|
</div>
|
|
29
29
|
</kpt-sidenav>
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
In the icon rail, mark the footer text with the `kptNavLabel` attribute — the collapsed panel then leaves just the avatar.
|
|
32
32
|
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
a
|
|
36
|
-
|
|
33
|
+
## The icon rail (kpt-app-shell)
|
|
34
|
+
If the shell has `sidenavRailBreakpoint` enabled, mark an entry's text with the `kptNavLabel` attribute
|
|
35
|
+
and a group heading with `kptNavSection` — in the collapsed rail only the icon remains, and the label is
|
|
36
|
+
hidden technically (visually hidden), so a screen reader still knows the entry's name:
|
|
37
37
|
|
|
38
|
-
<a href="#"><kpt-icon name="list" /> <span kptNavLabel>
|
|
38
|
+
<a href="#"><kpt-icon name="list" /> <span kptNavLabel>Dashboard</span></a>
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
These are plain attributes, not directives — there is nothing to import. Without an icon the rail will be empty.
|
|
41
41
|
|
|
42
|
-
##
|
|
43
|
-
`--kpt-sidenav-{bg,fg,border,width,rail-width}` (
|
|
42
|
+
## Tokens
|
|
43
|
+
`--kpt-sidenav-{bg,fg,border,width,rail-width}` (the width is set by `kpt-app-shell`).
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# KptSkeleton (kpt-skeleton)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A loading placeholder (shimmer). Import: `import { KptSkeleton } from '@konce-pt/angular';`
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
- `variant`: 'text'|'circle'|'rect'; `width`: string; `height`: string; `lines`: number (
|
|
5
|
+
## Inputs
|
|
6
|
+
- `variant`: 'text'|'circle'|'rect'; `width`: string; `height`: string; `lines`: number (for text)
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Examples
|
|
9
9
|
<kpt-skeleton variant="text" [lines]="3" />
|
|
10
10
|
<kpt-skeleton variant="circle" width="3rem" height="3rem" />
|
|
11
11
|
<kpt-skeleton variant="rect" width="100%" height="8rem" />
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
|
|
13
|
+
## Tokens
|
|
14
|
+
A gradient over `--kpt-color-surface-variant`.
|
package/src/lib/slider/llms.txt
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# KptSlider (kpt-slider)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A value slider on Signal Forms. Import: `import { KptSlider } from '@konce-pt/angular';`
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
- `value`: model<number | [number, number]> —
|
|
7
|
-
- `range`: boolean —
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
(FORM_FIELD_UNSUPPORTED_BINDING).
|
|
11
|
-
|
|
5
|
+
## Inputs
|
|
6
|
+
- `value`: model<number | [number, number]> — in `range` mode a `[min, max]` pair, otherwise a single number
|
|
7
|
+
- `range`: boolean — two handles (a range); `min`/`max`: number (per FormValueControl); `step`: number
|
|
8
|
+
- Under `[formField]` do NOT bind the bounds — they are declared by `min()`/`max()` in `form()`, and `FormField`
|
|
9
|
+
injects them into the `min`/`max` inputs itself; `[min]`/`[max]` next to `[formField]` is a compilation error
|
|
10
|
+
(FORM_FIELD_UNSUPPORTED_BINDING). The `range` mode (a `[number, number]` value) has no counterpart
|
|
11
|
+
among the validators (`min()`/`max()` only accept numeric fields), so it is paired with `[(value)]`.
|
|
12
12
|
- `showValue`: boolean; `disabled`/`invalid`/`touched`; `touch`
|
|
13
13
|
|
|
14
|
-
##
|
|
15
|
-
<kpt-slider [formField]="f.volume" [step]="5" showValue /> <!--
|
|
14
|
+
## Example
|
|
15
|
+
<kpt-slider [formField]="f.volume" [step]="5" showValue /> <!-- bounds from min()/max() in form() -->
|
|
16
16
|
<kpt-slider [(value)]="volume" [min]="0" [max]="100" [step]="5" showValue />
|
|
17
|
-
<!--
|
|
18
|
-
<kpt-slider range [(value)]="
|
|
17
|
+
<!-- range: the value is a [min, max] array -->
|
|
18
|
+
<kpt-slider range [(value)]="span" [min]="0" [max]="100" showValue />
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
-
|
|
22
|
-
-
|
|
20
|
+
## Notes
|
|
21
|
+
- The `range` mode uses two stacked `input[type=range]` elements; `pointer-events` are active only on the handles (the track does not intercept them).
|
|
22
|
+
- The handles cannot cross — the lower one is clamped to the upper one and vice versa.
|
|
23
23
|
|
|
24
|
-
##
|
|
25
|
-
|
|
24
|
+
## Tokens
|
|
25
|
+
The track is filled with `--kpt-color-primary`, the background is `--kpt-color-surface-variant`.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# KptSpeedDial (kpt-speed-dial)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A speed dial — a FAB that fans out a set of actions. Built on `kpt-fab`.
|
|
4
4
|
Import: `import { KptSpeedDial } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
- `items`: KptMenuItem<T>[] —
|
|
6
|
+
## Inputs / outputs
|
|
7
|
+
- `items`: KptMenuItem<T>[] — the actions (label, icon)
|
|
8
8
|
- `direction`: 'up' | 'down' | 'left' | 'right' (KptSpeedDialDirection)
|
|
9
|
-
- `icon`: string (
|
|
9
|
+
- `icon`: string (default 'plus', rotates 45° when open); `ariaLabel`: string
|
|
10
10
|
- `selected`: KptMenuItem<T>
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Example
|
|
13
13
|
<kpt-speed-dial [items]="actions" direction="up" (selected)="onAction($event)" />
|
|
14
14
|
|
|
15
|
-
##
|
|
16
|
-
FAB
|
|
15
|
+
## Tokens
|
|
16
|
+
The main FAB comes from `kpt-fab`; the actions use `--kpt-color-surface-raised`, `--kpt-elevation-2`.
|
package/src/lib/spinner/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# KptSpinner (kpt-spinner)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Loading indicator. Color from `currentColor`. Import: `import { KptSpinner } from '@konce-pt/angular';`
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
- `size`: string (
|
|
5
|
+
## Inputs
|
|
6
|
+
- `size`: string (e.g. '2rem', default '1.5rem'); `label`: string (aria)
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Example
|
|
9
9
|
<kpt-spinner />
|
|
10
|
-
<kpt-spinner size="2rem" label="
|
|
10
|
+
<kpt-spinner size="2rem" label="Loading…" />
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# KptSplitButton (kpt-split-button)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A split button — a primary action + a drop-down menu of secondary actions (CDK Overlay).
|
|
4
4
|
Import: `import { KptSplitButton } from '@konce-pt/angular';`
|
|
5
|
-
|
|
5
|
+
Requires `import '@angular/cdk/overlay-prebuilt.css';`
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
- `variant`: KptButtonVariant (
|
|
7
|
+
## Inputs
|
|
8
|
+
- `variant`: KptButtonVariant (default 'filled')
|
|
9
9
|
- `items`: KptMenuItem<T>[] — { label, value?, icon?, danger?, disabled?, separator? }
|
|
10
|
-
|
|
11
|
-
(
|
|
10
|
+
It also honors `header` (a non-clickable row with `avatar`/`label`/`description`), `description`
|
|
11
|
+
(a second line) and `badge` + `badgeVariant` (a badge on the right) — described in full in menu/llms.txt.
|
|
12
12
|
- `disabled`: boolean
|
|
13
13
|
|
|
14
|
-
##
|
|
15
|
-
- `primaryClick`: void —
|
|
16
|
-
- `selected`: KptMenuItem<T> —
|
|
14
|
+
## Outputs
|
|
15
|
+
- `primaryClick`: void — a click on the primary button
|
|
16
|
+
- `selected`: KptMenuItem<T> — an entry picked from the menu
|
|
17
17
|
|
|
18
|
-
##
|
|
19
|
-
<kpt-split-button [items]="items" (primaryClick)="save()" (selected)="onItem($event)">
|
|
18
|
+
## Example
|
|
19
|
+
<kpt-split-button [items]="items" (primaryClick)="save()" (selected)="onItem($event)">Save</kpt-split-button>
|
|
20
20
|
|
|
21
21
|
items: KptMenuItem[] = [
|
|
22
|
-
{ label: '
|
|
22
|
+
{ label: 'Save as draft', value: 'draft' },
|
|
23
23
|
{ separator: true },
|
|
24
|
-
{ label: '
|
|
24
|
+
{ label: 'Discard', value: 'discard', danger: true },
|
|
25
25
|
];
|
|
26
26
|
|
|
27
|
-
##
|
|
28
|
-
|
|
27
|
+
## Tokens
|
|
28
|
+
Colors inherited from the button; the panel `--kpt-color-surface-raised`, `--kpt-elevation-3`.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# KptSplitter (kpt-splitter)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Two panes with a draggable handle. The panes go into the `[kptSplitStart]` and `[kptSplitEnd]` slots.
|
|
4
4
|
Import: `import { KptSplitter } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Inputs / model
|
|
7
7
|
- `orientation`: 'horizontal' | 'vertical' (KptSplitterOrientation)
|
|
8
|
-
- `startSize`: model<number> —
|
|
9
|
-
- `minSize`: number (%) —
|
|
8
|
+
- `startSize`: model<number> — the size of the first pane in % (two-way)
|
|
9
|
+
- `minSize`: number (%) — the minimum pane size
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
11
|
+
## Accessibility
|
|
12
|
+
The handle is a `role="separator"`, arrow keys resize it; dragging works with the mouse.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Example
|
|
15
15
|
<kpt-splitter orientation="horizontal" [(startSize)]="size">
|
|
16
|
-
<div kptSplitStart>
|
|
17
|
-
<div kptSplitEnd>
|
|
16
|
+
<div kptSplitStart>Left</div>
|
|
17
|
+
<div kptSplitEnd>Right</div>
|
|
18
18
|
</kpt-splitter>
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
|
|
20
|
+
## Tokens
|
|
21
|
+
The handle `--kpt-color-border` → `--kpt-color-primary` (hover/focus).
|
package/src/lib/stepper/llms.txt
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# KptStepper (kpt-stepper) + KptStep (kpt-step)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A step wizard. A header with numbered steps + the active content (lazy).
|
|
4
4
|
Import: `import { KptStepper, KptStep } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
6
|
## KptStepper
|
|
7
|
-
- `activeIndex`: model<number>;
|
|
8
|
-
- `animated`: boolean (
|
|
9
|
-
- `animationDuration`: number (
|
|
7
|
+
- `activeIndex`: model<number>; public methods: `next()`, `prev()`, `goTo(i)`
|
|
8
|
+
- `animated`: boolean (default true) — the transition animation (fade+slide, pure CSS)
|
|
9
|
+
- `animationDuration`: number (default 500) — animation time in ms
|
|
10
10
|
|
|
11
11
|
## KptStep
|
|
12
|
-
- `label`: string (
|
|
12
|
+
- `label`: string (required)
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Example
|
|
15
15
|
<kpt-stepper #s [(activeIndex)]="step">
|
|
16
|
-
<kpt-step label="
|
|
17
|
-
<kpt-step label="
|
|
16
|
+
<kpt-step label="Account">…<kpt-button (click)="s.next()">Next</kpt-button></kpt-step>
|
|
17
|
+
<kpt-step label="Profile">…</kpt-step>
|
|
18
18
|
</kpt-stepper>
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
|
|
20
|
+
## Tokens
|
|
21
|
+
The active/completed step: `--kpt-color-primary` (marker, connector).
|
package/src/lib/switch/llms.txt
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# KptSwitch (kpt-switch)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A toggle switch on Signal Forms (`FormCheckboxControl`, the `checked` model). `role="switch"`.
|
|
4
4
|
Import: `import { KptSwitch } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
<kpt-switch [formField]="f.notifications" label="
|
|
8
|
-
<!--
|
|
9
|
-
<kpt-switch [(checked)]="on" onLabel="
|
|
6
|
+
## Usage
|
|
7
|
+
<kpt-switch [formField]="f.notifications" label="Notifications" />
|
|
8
|
+
<!-- the state text changes as it is toggled -->
|
|
9
|
+
<kpt-switch [(checked)]="on" onLabel="On" offLabel="Off" />
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
- `checked`: model<boolean>; `label`: string (
|
|
13
|
-
- `labelPosition`: 'start' | 'end' (
|
|
14
|
-
- `onLabel`/`offLabel`: string —
|
|
11
|
+
## Inputs
|
|
12
|
+
- `checked`: model<boolean>; `label`: string (static); `disabled`/`invalid`/`touched`: boolean; the `touch` output.
|
|
13
|
+
- `labelPosition`: 'start' | 'end' (default 'end') — the `label` to the left or to the right of the switch.
|
|
14
|
+
- `onLabel`/`offLabel`: string — the state text; shown according to `checked` (the on state highlighted with `--kpt-color-primary`). Can be combined with a static `label`.
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Tokens
|
|
17
17
|
`--kpt-color-primary`, `--kpt-color-border-strong`, `--kpt-color-surface`, `--kpt-elevation-1`.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# KptSwitchGroup (kpt-switch-group)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
A group of switches. Single choice by default (mutually exclusive) — turning one on turns the others off.
|
|
4
|
+
With `multiple` it switches to multi-select mode (the value is an array of the selected options).
|
|
5
|
+
Built on Signal Forms (`FormValueControl<T | T[] | null>`, the `value` model). Import: `import { KptSwitchGroup } from '@konce-pt/angular';`
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Usage
|
|
8
8
|
<kpt-switch-group [(value)]="plan" [options]="plans" />
|
|
9
|
-
<!--
|
|
9
|
+
<!-- multi-select: value = T[] -->
|
|
10
10
|
<kpt-switch-group multiple [(value)]="tags" [options]="tagOptions" />
|
|
11
11
|
<!-- plans: KptOption<T>[] = [{ label, value, disabled? }, …] -->
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
- `value`: model<T | T[] | null> —
|
|
15
|
-
- `options`: KptOption<T>[] —
|
|
16
|
-
- `multiple`: boolean (
|
|
17
|
-
- `orientation`: 'vertical' (
|
|
18
|
-
- `allowDeselect`: boolean (
|
|
19
|
-
- `disabled`/`invalid`/`touched`: boolean;
|
|
13
|
+
## Inputs
|
|
14
|
+
- `value`: model<T | T[] | null> — single: the option's value or `null`; multiple: an array of the selected options' values.
|
|
15
|
+
- `options`: KptOption<T>[] — the list of options.
|
|
16
|
+
- `multiple`: boolean (default false) — multi-select mode; the value becomes a `T[]` array.
|
|
17
|
+
- `orientation`: 'vertical' (default) | 'horizontal'.
|
|
18
|
+
- `allowDeselect`: boolean (default true) — whether clicking the active option deselects it (single mode only; in multiple mode deselection is always allowed).
|
|
19
|
+
- `disabled`/`invalid`/`touched`: boolean; the `touch` output.
|
|
20
20
|
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
## How it works
|
|
22
|
+
Every entry is a `kpt-switch` with a one-way `[checked]`. In single mode turning one on sets `value` to that
|
|
23
|
+
option, which switches the others off automatically. In `multiple` mode the value is normalized to an array — turning
|
|
24
|
+
one on adds the option's value, turning it off removes it. It renders `kpt-switch`, so it inherits its look and tokens.
|
package/src/lib/tabs/llms.txt
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# KptTabs (kpt-tabs) + KptTab (kpt-tab)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Tabs. Tab content is rendered lazily (only the active one).
|
|
4
4
|
Import: `import { KptTabs, KptTab } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
6
|
## KptTabs
|
|
7
|
-
- `activeIndex`: model<number> (
|
|
8
|
-
- `animated`: boolean (
|
|
9
|
-
- `animationDuration`: number (
|
|
7
|
+
- `activeIndex`: model<number> (two-way)
|
|
8
|
+
- `animated`: boolean (default true) — the transition animation (fade+slide, pure CSS)
|
|
9
|
+
- `animationDuration`: number (default 500) — animation time in ms
|
|
10
10
|
|
|
11
11
|
## KptTab
|
|
12
|
-
- `label`: string (
|
|
12
|
+
- `label`: string (required); `disabled`: boolean
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Example
|
|
15
15
|
<kpt-tabs [(activeIndex)]="tab">
|
|
16
|
-
<kpt-tab label="
|
|
17
|
-
<kpt-tab label="
|
|
16
|
+
<kpt-tab label="General">…</kpt-tab>
|
|
17
|
+
<kpt-tab label="Advanced">…</kpt-tab>
|
|
18
18
|
</kpt-tabs>
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
|
|
20
|
+
## Tokens
|
|
21
|
+
The active tab: `--kpt-color-primary` (text + bottom edge).
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# KptTextarea (kpt-textarea)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A multi-line field on Signal Forms, with optional auto-resize.
|
|
4
4
|
Import: `import { KptTextarea } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Inputs
|
|
7
7
|
- `value`: model<string>; `placeholder`: string; `rows`: number; `autoResize`: boolean
|
|
8
8
|
- `disabled`/`readonly`/`invalid`/`touched`: boolean; `touch`: output
|
|
9
9
|
|
|
10
|
-
##
|
|
11
|
-
<kpt-textarea [formField]="f.notes" placeholder="
|
|
10
|
+
## Example
|
|
11
|
+
<kpt-textarea [formField]="f.notes" placeholder="Notes…" autoResize />
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Tokens
|
|
14
14
|
`--kpt-form-field-*`.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# KptTimeline (kpt-timeline)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A timeline — a vertical list of events with markers. Import: `import { KptTimeline } from '@konce-pt/angular';`
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Inputs
|
|
6
6
|
- `items`: KptTimelineItem[]
|
|
7
7
|
|
|
8
8
|
### KptTimelineItem
|
|
9
|
-
- `title`: string (
|
|
10
|
-
- `description?`: string; `time?`: string; `icon?`: string (
|
|
11
|
-
- `variant?`: 'neutral' | 'primary' | 'success' | 'danger' | 'warning' | 'info' (
|
|
9
|
+
- `title`: string (required)
|
|
10
|
+
- `description?`: string; `time?`: string; `icon?`: string (a KptIconName)
|
|
11
|
+
- `variant?`: 'neutral' | 'primary' | 'success' | 'danger' | 'warning' | 'info' (default 'primary')
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Example
|
|
14
14
|
<kpt-timeline [items]="events" />
|
|
15
15
|
|
|
16
16
|
events: KptTimelineItem[] = [
|
|
17
|
-
{ title: '
|
|
18
|
-
{ title: '
|
|
17
|
+
{ title: 'Created', time: '10:00', variant: 'success', icon: 'check' },
|
|
18
|
+
{ title: 'Sent', time: '12:30', variant: 'info' },
|
|
19
19
|
];
|
|
20
20
|
|
|
21
|
-
##
|
|
22
|
-
|
|
21
|
+
## Tokens
|
|
22
|
+
The marker follows the variant (`--kpt-color-{variant}`); the line `--kpt-color-border`.
|
package/src/lib/toast/llms.txt
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# KptToast (kpt-toast-container + KptToastService)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Notifications (toasts) driven by a service. The container renders them fixed in a corner.
|
|
4
4
|
Import: `import { KptToastService, KptToastContainer } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
|
|
6
|
+
## Setup
|
|
7
|
+
Place the container once in the application: `<kpt-toast-container />`.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## The service (KptToastService, providedIn: root)
|
|
10
10
|
private toast = inject(KptToastService);
|
|
11
|
-
toast.success('
|
|
12
|
-
toast.error('
|
|
11
|
+
toast.success('Saved', { title: 'OK' });
|
|
12
|
+
toast.error('Connection failed');
|
|
13
13
|
toast.info(msg, opts); toast.warning(msg, opts);
|
|
14
|
-
toast.show(msg, { variant, title, duration }); // duration ms, 0 =
|
|
14
|
+
toast.show(msg, { variant, title, duration }); // duration in ms, 0 = no auto-dismiss
|
|
15
15
|
toast.dismiss(id); toast.clear();
|
|
16
16
|
|
|
17
17
|
## KptToast
|
|
18
18
|
`{ id, message, title?, variant: 'info'|'success'|'warning'|'danger', duration }`
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
`--kpt-color-surface-raised`, `--kpt-elevation-3`,
|
|
22
|
-
|
|
20
|
+
## Tokens
|
|
21
|
+
`--kpt-color-surface-raised`, `--kpt-elevation-3`, the accent `--kpt-color-{info,success,warning,danger}`,
|
|
22
|
+
stacking `--kpt-z-toast`.
|