@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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# KptAutocomplete (kpt-autocomplete)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A field with suggestions on CDK Overlay, Signal Forms. The value is the typed text.
|
|
4
|
+
Requires `import '@angular/cdk/overlay-prebuilt.css';`
|
|
5
5
|
Import: `import { KptAutocomplete } from '@konce-pt/angular';`
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Inputs
|
|
8
8
|
- `value`: model<string>; `options`: string[]; `placeholder`: string
|
|
9
9
|
- `disabled`/`invalid`/`touched`: boolean; `touch`: output
|
|
10
|
-
-
|
|
10
|
+
- Keyboard: ↑/↓ to navigate, Enter selects, Esc closes.
|
|
11
11
|
|
|
12
|
-
##
|
|
13
|
-
<kpt-autocomplete [formField]="f.city" [options]="cities" placeholder="
|
|
12
|
+
## Example
|
|
13
|
+
<kpt-autocomplete [formField]="f.city" [options]="cities" placeholder="City…" />
|
|
14
14
|
|
|
15
|
-
##
|
|
16
|
-
`--kpt-form-field-*`, panel `--kpt-color-surface-raised`.
|
|
15
|
+
## Tokens
|
|
16
|
+
`--kpt-form-field-*`, the panel `--kpt-color-surface-raised`.
|
package/src/lib/avatar/llms.txt
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# KptAvatar (kpt-avatar)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An avatar — an image, initials (from `name`) or an icon. Import: `import { KptAvatar } from '@konce-pt/angular';`
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
- `src`: string|null (
|
|
5
|
+
## Inputs
|
|
6
|
+
- `src`: string|null (an image); `name`: string (initials, up to 2 letters); `icon`: string|null
|
|
7
7
|
- `size`: 'sm'|'md'|'lg'|'xl'; `shape`: 'circle'|'square'
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
<kpt-avatar src="/u/anna.jpg" />
|
|
11
11
|
<kpt-avatar name="Anna Kowalska" size="lg" />
|
|
12
12
|
<kpt-avatar icon="user" shape="square" />
|
|
13
13
|
|
|
14
|
-
##
|
|
15
|
-
`name`
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
## Accessibility
|
|
15
|
+
`name` goes into the native `title` (a tooltip with the full name — initials on their own say nothing).
|
|
16
|
+
Without `src`: `role="img"` + `aria-label="name"`, and the initials are `aria-hidden`. With `src` the label
|
|
17
|
+
is carried by the image's `alt` — it is not duplicated in `aria-label`.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Tokens
|
|
20
20
|
`--kpt-color-muted`, `--kpt-color-on-muted`, `--kpt-radius-full`/`--kpt-radius-md`.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# KptAvatarGroup (kpt-avatar-group)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A group of overlapping avatars with a "+N" counter. Built on `kpt-avatar`.
|
|
4
4
|
Import: `import { KptAvatarGroup } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Inputs
|
|
7
7
|
- `avatars`: KptAvatarItem[] — { name?, src?, icon? }
|
|
8
|
-
- `max`: number (
|
|
8
|
+
- `max`: number (default 4) — how many to show before "+N"
|
|
9
9
|
- `size`: 'sm' | 'md' | 'lg' | 'xl'
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Every avatar in the group shows its `name` in a tooltip (the `title` from `kpt-avatar`), so
|
|
12
|
+
the initials stay readable even at `size="sm"`.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Example
|
|
15
15
|
<kpt-avatar-group [avatars]="team" [max]="4" />
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
|
|
17
|
+
## Tokens
|
|
18
|
+
The overlap uses a `--kpt-color-surface` ring; "+N" uses `--kpt-color-muted`.
|
package/src/lib/badge/llms.txt
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# KptBadge (kpt-badge)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A badge — a counter or a status dot; standalone or overlaid on content (`overlay`).
|
|
4
4
|
Import: `import { KptBadge } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Inputs
|
|
7
7
|
- `value`: string|number|null; `variant`: 'neutral'|'primary'|'success'|'danger'|'warning'|'info'
|
|
8
|
-
- `size`: 'sm'|'md'|'lg' (
|
|
9
|
-
|
|
10
|
-
`sm`
|
|
11
|
-
- `dot`: boolean (
|
|
8
|
+
- `size`: 'sm'|'md'|'lg' (default 'md') — height 1rem / 1.25rem / 1.5rem. The type size, the side inset
|
|
9
|
+
and the dot diameter are derived from the height, so the proportions hold at every size.
|
|
10
|
+
`sm` is meant for a badge sitting inside a line of text (a menu entry, a label, a table cell).
|
|
11
|
+
- `dot`: boolean (a dot with no number); `overlay`: boolean (the corner of the content); `max`: number (default 99 → '99+')
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Examples
|
|
14
14
|
<kpt-badge [value]="3" variant="danger" />
|
|
15
15
|
<kpt-badge [value]="4" size="sm" variant="success" />
|
|
16
16
|
<kpt-badge [value]="128" overlay><kpt-icon name="menu" /></kpt-badge>
|
|
17
17
|
<kpt-badge dot variant="success" overlay><kpt-avatar name="AK" /></kpt-badge>
|
|
18
18
|
|
|
19
|
-
##
|
|
20
|
-
`--kpt-color-{primary,muted,success,danger,warning,info}`,
|
|
19
|
+
## Tokens
|
|
20
|
+
`--kpt-color-{primary,muted,success,danger,warning,info}`, the overlay ring from `--kpt-color-surface`.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# KptBottomSheet (kpt-bottom-sheet)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A sheet that slides up from the bottom of the screen. Driven by the `open` signal, with a handle and a backdrop.
|
|
4
4
|
Import: `import { KptBottomSheet } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
- `open`: model<boolean> (
|
|
6
|
+
## Inputs / model
|
|
7
|
+
- `open`: model<boolean> (two-way)
|
|
8
8
|
- `header`: string; `closeOnBackdrop`: boolean
|
|
9
|
-
-
|
|
9
|
+
- Content through projection.
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
<kpt-button (click)="sheetOpen.set(true)">
|
|
13
|
-
<kpt-bottom-sheet [(open)]="sheetOpen" header="
|
|
11
|
+
## Example
|
|
12
|
+
<kpt-button (click)="sheetOpen.set(true)">Share</kpt-button>
|
|
13
|
+
<kpt-bottom-sheet [(open)]="sheetOpen" header="Share">…</kpt-bottom-sheet>
|
|
14
14
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
`display: none`,
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
## The closed state / a11y
|
|
16
|
+
The sheet is always in the DOM (no `@if`), hidden with `transform` **and** `visibility: hidden` — never
|
|
17
|
+
`display: none`, so that the slide-in and slide-out animations survive. `visibility` takes the closed sheet
|
|
18
|
+
out of the tab order and out of the accessibility tree without `inert`, and it does so on the very first frame,
|
|
19
|
+
without waiting for JavaScript. `prefers-reduced-motion: reduce` drops the transitions.
|
|
20
20
|
|
|
21
|
-
##
|
|
22
|
-
|
|
21
|
+
## Tokens
|
|
22
|
+
The panel `--kpt-color-surface-raised`, the top radius `--kpt-radius-lg`, `--kpt-elevation-4`.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# KptBreadcrumb (kpt-breadcrumb)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A navigation trail. Import: `import { KptBreadcrumb, KptBreadcrumbItem } from '@konce-pt/angular';`
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
- `items`: KptBreadcrumbItem[] `{ label: string; url?: string }` (
|
|
5
|
+
## Inputs
|
|
6
|
+
- `items`: KptBreadcrumbItem[] `{ label: string; url?: string }` (an item without `url`, or the last one, = the current page)
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
<kpt-breadcrumb [items]="[{label:'
|
|
8
|
+
## Example
|
|
9
|
+
<kpt-breadcrumb [items]="[{label:'Home',url:'/'},{label:'Settings',url:'/s'},{label:'Profile'}]" />
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
11
|
+
## Tokens
|
|
12
|
+
The separator is a `chevron-right` icon; links `--kpt-color-on-surface-muted` → hover `--kpt-color-primary`.
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
# KptBreakpointObserver
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A root service that turns media queries into signals. The only way in the library to ask
|
|
4
|
+
"how wide is the window" from TypeScript.
|
|
5
5
|
|
|
6
6
|
## API
|
|
7
7
|
|
|
8
8
|
inject(KptBreakpointObserver)
|
|
9
9
|
|
|
10
|
-
- `up(bp: KptBreakpoint): Signal<boolean>` — `(min-width: <
|
|
11
|
-
- `down(bp: KptBreakpoint): Signal<boolean>` — `(max-width: <
|
|
12
|
-
|
|
13
|
-
- `matches(query: string): Signal<boolean>` —
|
|
10
|
+
- `up(bp: KptBreakpoint): Signal<boolean>` — `(min-width: <threshold>px)`, mobile-first.
|
|
11
|
+
- `down(bp: KptBreakpoint): Signal<boolean>` — `(max-width: <threshold - 0.02>px)`; subtracting 0.02px
|
|
12
|
+
keeps the `up`/`down` bands from overlapping at fractional widths (zoom, DPI).
|
|
13
|
+
- `matches(query: string): Signal<boolean>` — any media query.
|
|
14
14
|
|
|
15
|
-
`KptBreakpoint` = `'sm' | 'md' | 'lg' | 'xl' | '2xl'`;
|
|
15
|
+
`KptBreakpoint` = `'sm' | 'md' | 'lg' | 'xl' | '2xl'`; the thresholds live in `KPT_BREAKPOINTS`
|
|
16
16
|
(640 / 768 / 1024 / 1280 / 1536 px).
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Where the values come from
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
From tokens: `packages/tokens/tokens/primitives/breakpoint.json` → `scripts/gen-tokens.mjs`
|
|
21
|
+
generates `breakpoint/breakpoints.generated.ts` (for JS) and `styles/_breakpoints.generated.scss`
|
|
22
|
+
(for `@media` in component SCSS). Both files are committed and **must not be edited by hand** —
|
|
23
|
+
a threshold change goes through the token plus `pnpm nx build angular`. With a single source, the library's
|
|
24
|
+
CSS and its JavaScript cannot drift apart silently.
|
|
25
25
|
|
|
26
26
|
## SSR
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
CSS (`@media`),
|
|
30
|
-
|
|
28
|
+
Outside the browser every signal is a constant `false`. Do not build page layout on it — that is what
|
|
29
|
+
CSS (`@media`) is for, otherwise you get flicker before hydration. The service is for behavior:
|
|
30
|
+
which way a button should act, whether to close a panel after navigation, what to defer.
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## Example
|
|
33
33
|
|
|
34
34
|
@Component({ /* … */ })
|
|
35
35
|
export class Header {
|
|
@@ -38,8 +38,8 @@ w którą stronę ma zadziałać przycisk, czy zamykać panel po nawigacji, co o
|
|
|
38
38
|
readonly isCompact = this.breakpoints.down('md');
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## Notes
|
|
42
42
|
|
|
43
|
-
-
|
|
44
|
-
`MediaQueryList`
|
|
45
|
-
-
|
|
43
|
+
- Queries are memoized per string — `up('lg')` across ten components is one
|
|
44
|
+
`MediaQueryList` and one listener; there is no need to cache it yourself.
|
|
45
|
+
- Cleanup goes through the root injector's `DestroyRef`, so there is nothing to unsubscribe.
|
package/src/lib/button/llms.txt
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
# KptButton (kpt-button)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Standalone, OnPush,
|
|
3
|
+
The Koncept UI button. It renders a native `<button>` (semantics + form submit).
|
|
4
|
+
Standalone, OnPush, signals. Import: `import { KptButton } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Selector
|
|
7
7
|
`kpt-button`
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
- `variant`: 'filled' | 'tonal' | 'outline' | 'text' | 'danger' (
|
|
11
|
-
- `size`: 'sm' | 'md' | 'lg' (
|
|
12
|
-
- `type`: 'button' | 'submit' | 'reset' (
|
|
9
|
+
## Inputs (input signals)
|
|
10
|
+
- `variant`: 'filled' | 'tonal' | 'outline' | 'text' | 'danger' (default 'filled')
|
|
11
|
+
- `size`: 'sm' | 'md' | 'lg' (default 'md')
|
|
12
|
+
- `type`: 'button' | 'submit' | 'reset' (default 'button')
|
|
13
13
|
- `disabled`: boolean (booleanAttribute)
|
|
14
|
-
- `loading`: boolean — spinner +
|
|
15
|
-
- `fullWidth`: boolean —
|
|
14
|
+
- `loading`: boolean — a spinner + blocked interaction, sets aria-busy
|
|
15
|
+
- `fullWidth`: boolean — the full width of the container
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
|
|
17
|
+
## Events
|
|
18
|
+
None of its own — the native `click` bubbles out of the inner `<button>`; bind `(click)` on `<kpt-button>`.
|
|
19
19
|
|
|
20
|
-
##
|
|
21
|
-
<kpt-button (click)="save()">
|
|
22
|
-
<kpt-button variant="outline" size="sm">
|
|
23
|
-
<kpt-button variant="danger" [loading]="deleting()">
|
|
24
|
-
<form (submit)="onSubmit()"><kpt-button type="submit">
|
|
20
|
+
## Examples
|
|
21
|
+
<kpt-button (click)="save()">Save</kpt-button>
|
|
22
|
+
<kpt-button variant="outline" size="sm">Cancel</kpt-button>
|
|
23
|
+
<kpt-button variant="danger" [loading]="deleting()">Delete</kpt-button>
|
|
24
|
+
<form (submit)="onSubmit()"><kpt-button type="submit">Send</kpt-button></form>
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## Tokens (styling)
|
|
27
27
|
`--kpt-button-radius`, `--kpt-button-font-weight`, `--kpt-button-gap`,
|
|
28
28
|
`--kpt-button-filled-{bg,fg,bg-hover,bg-active}`, `--kpt-button-tonal-{bg,fg,bg-hover}`,
|
|
29
29
|
`--kpt-button-outline-{border,fg,bg-hover}`, `--kpt-button-text-{fg,bg-hover}`.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
##
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
`--_border`)
|
|
36
|
-
|
|
37
|
-
(`filled`)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
##
|
|
44
|
-
-
|
|
45
|
-
- `loading`
|
|
46
|
-
-
|
|
30
|
+
The 'danger' variant uses `--kpt-color-danger` / `--kpt-color-on-danger`.
|
|
31
|
+
|
|
32
|
+
## The state layer (hover / active)
|
|
33
|
+
Hover and active feedback is carried by an `::after` pseudo-element (`opacity` 0 → 1),
|
|
34
|
+
not by animating the button's own `background-color`. The reason: the variant colors (`--_bg`,
|
|
35
|
+
`--_border`) arrive through `[attr.data-variant]`, which Angular only sets
|
|
36
|
+
during the update pass — an animated transition briefly showed the base variant
|
|
37
|
+
(`filled`) and then repainted it into the target one, which produced flicker at application start.
|
|
38
|
+
The layer starts at `opacity: 0`, so changing its color on the first render is
|
|
39
|
+
invisible. That is why the button carries `position: relative` and `isolation: isolate`
|
|
40
|
+
(a stacking context, so that the layer's `z-index: -1` lands above the background but below the content).
|
|
41
|
+
`kpt-icon-button`, `kpt-fab` and `kpt-split-button` follow the same pattern.
|
|
42
|
+
|
|
43
|
+
## Accessibility
|
|
44
|
+
- A native `<button>` — full keyboard and screen reader support.
|
|
45
|
+
- `loading` sets `aria-busy="true"` and disables the button (`disabled`).
|
|
46
|
+
- The focus ring comes from `@konce-pt/styles` (`--kpt-color-focus-ring`).
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# KptButtonGroup (kpt-button-group)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A segmented button group (toggle, single choice). Signal Forms.
|
|
4
4
|
Import: `import { KptButtonGroup, KptOption } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Inputs
|
|
7
7
|
- `options`: KptOption<T>[]; `value`: model<T>; `size`: 'sm'|'md'|'lg'; `disabled`/`invalid`/`touched`; `touch`
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
<kpt-button-group [(value)]="view" [options]="[{label:'
|
|
9
|
+
## Examples
|
|
10
|
+
<kpt-button-group [(value)]="view" [options]="[{label:'List',value:'list'},{label:'Grid',value:'grid'}]" />
|
|
11
11
|
<kpt-button-group [formField]="f.period" [options]="periods" />
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Tokens
|
|
14
14
|
`--kpt-color-primary`, `--kpt-color-border-strong`, `--kpt-color-muted`.
|
package/src/lib/card/llms.txt
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
# KptCard (kpt-card)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A card — a surface with elevation (elevated) or a border (outlined).
|
|
4
4
|
Import: `import { KptCard } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Selector
|
|
7
7
|
`kpt-card`
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
- `variant`: 'elevated' | 'outlined' (
|
|
11
|
-
- `header`: string —
|
|
12
|
-
- `flush`: boolean — body
|
|
13
|
-
|
|
14
|
-
##
|
|
15
|
-
-
|
|
16
|
-
- element
|
|
17
|
-
|
|
18
|
-
##
|
|
19
|
-
- `kpt-card__media` —
|
|
20
|
-
- `kpt-card__lead` —
|
|
21
|
-
- `kpt-card__title`, `kpt-card__subtitle` —
|
|
22
|
-
- `kpt-card__section` —
|
|
23
|
-
- `kpt-card__tags` —
|
|
24
|
-
- `kpt-card__avatar` —
|
|
25
|
-
- `kpt-card__actions` —
|
|
26
|
-
|
|
27
|
-
##
|
|
28
|
-
<kpt-card header="
|
|
29
|
-
<p>
|
|
30
|
-
<div kptCardFooter><kpt-button>
|
|
9
|
+
## Inputs
|
|
10
|
+
- `variant`: 'elevated' | 'outlined' (default 'elevated')
|
|
11
|
+
- `header`: string — optional header text
|
|
12
|
+
- `flush`: boolean — a body with no padding (for rich layouts that manage their own sections)
|
|
13
|
+
|
|
14
|
+
## Content projection
|
|
15
|
+
- the default content → the card body
|
|
16
|
+
- an element carrying the `kptCardFooter` attribute (a direct child of `kpt-card`) → the footer
|
|
17
|
+
|
|
18
|
+
## Reusable layout classes (media / profile)
|
|
19
|
+
- `kpt-card__media` — a full-width image (clipped to the radius; set `aspect-ratio`/`height` inline)
|
|
20
|
+
- `kpt-card__lead` — the header row (avatar + titles), with padding
|
|
21
|
+
- `kpt-card__title`, `kpt-card__subtitle` — title/subtitle typography
|
|
22
|
+
- `kpt-card__section` — a padded section (a column with gaps)
|
|
23
|
+
- `kpt-card__tags` — a row of chips; `kpt-card__meta` — an icon+text row (rating/location)
|
|
24
|
+
- `kpt-card__avatar` — an overlapping avatar with a ring (on the cover)
|
|
25
|
+
- `kpt-card__actions` — a row of buttons (equal widths)
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
<kpt-card header="Settings" variant="outlined">
|
|
29
|
+
<p>Content…</p>
|
|
30
|
+
<div kptCardFooter><kpt-button>Save</kpt-button></div>
|
|
31
31
|
</kpt-card>
|
|
32
32
|
|
|
33
33
|
<!-- media card -->
|
|
@@ -36,10 +36,10 @@ Import: `import { KptCard } from '@konce-pt/angular';`
|
|
|
36
36
|
<kpt-avatar src="/u.jpg" />
|
|
37
37
|
<div><div class="kpt-card__title">Shiba Inu</div><div class="kpt-card__subtitle">Dog Breed</div></div>
|
|
38
38
|
</div>
|
|
39
|
-
<img class="kpt-card__media" src="/
|
|
40
|
-
<div class="kpt-card__section">
|
|
39
|
+
<img class="kpt-card__media" src="/photo.jpg" alt="" style="aspect-ratio: 4/3" />
|
|
40
|
+
<div class="kpt-card__section">Description…</div>
|
|
41
41
|
<div kptCardFooter><kpt-button variant="text" size="sm">LIKE</kpt-button></div>
|
|
42
42
|
</kpt-card>
|
|
43
43
|
|
|
44
|
-
##
|
|
44
|
+
## Tokens
|
|
45
45
|
`--kpt-card-{bg,fg,border,radius,padding,shadow}`.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
# KptCarousel (kpt-carousel)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A slide carousel (generic). Import: `import { KptCarousel } from '@konce-pt/angular';`
|
|
4
|
+
Data through `items`, the slide template through projection: `<ng-template let-item>`.
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
- `items`: T[] —
|
|
8
|
-
- `activeIndex`: model<number> (
|
|
6
|
+
## Inputs / model
|
|
7
|
+
- `items`: T[] — the slide data
|
|
8
|
+
- `activeIndex`: model<number> (default 0) — the two-way index of the active slide
|
|
9
9
|
|
|
10
|
-
##
|
|
11
|
-
- `<ng-template let-item let-i="index">` —
|
|
10
|
+
## Content projection
|
|
11
|
+
- `<ng-template let-item let-i="index">` — the template for a single slide; context: `$implicit` = the item, `index`.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Methods
|
|
14
14
|
- `next()`, `prev()`, `goTo(index)`
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Example
|
|
17
17
|
<kpt-carousel [items]="photos">
|
|
18
18
|
<ng-template let-photo>
|
|
19
19
|
<img [src]="photo" style="width:100%" />
|
|
20
20
|
</ng-template>
|
|
21
21
|
</kpt-carousel>
|
|
22
22
|
|
|
23
|
-
##
|
|
24
|
-
|
|
23
|
+
## Tokens
|
|
24
|
+
Navigation and dots `--kpt-color-primary`; the arrow background `--kpt-color-surface-raised`.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# KptCheckbox (kpt-checkbox)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A checkbox on Signal Forms (`FormCheckboxControl`, the `checked` model).
|
|
4
4
|
Import: `import { KptCheckbox } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
<kpt-checkbox [formField]="f.terms" label="
|
|
6
|
+
## Usage
|
|
7
|
+
<kpt-checkbox [formField]="f.terms" label="I accept the terms" />
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
- `checked`: model<boolean> (
|
|
9
|
+
## Inputs
|
|
10
|
+
- `checked`: model<boolean> (the FormCheckboxControl contract)
|
|
11
11
|
- `label`: string
|
|
12
|
-
- `disabled` / `invalid` / `touched`: boolean (
|
|
12
|
+
- `disabled` / `invalid` / `touched`: boolean (bound by FormField); the `touch` output (blur)
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Tokens
|
|
15
15
|
`--kpt-color-primary`, `--kpt-color-on-primary`, `--kpt-form-field-border`, `--kpt-form-field-border-error`.
|
package/src/lib/chip/llms.txt
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# KptChip (kpt-chip)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A chip / tag — a label, optionally removable. Import: `import { KptChip } from '@konce-pt/angular';`
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Inputs / outputs
|
|
6
6
|
- `variant`: 'neutral'|'primary'|'success'|'danger'|'warning'|'info'
|
|
7
|
-
- `removable`: boolean (
|
|
7
|
+
- `removable`: boolean (a × button); `disabled`: boolean; `removed`: output<void>
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Examples
|
|
10
10
|
<kpt-chip>Angular</kpt-chip>
|
|
11
11
|
<kpt-chip variant="success" removable (removed)="onRemove()">UI</kpt-chip>
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
|
|
13
|
+
## Tokens
|
|
14
|
+
A color-mix background over the variant, `--kpt-color-muted` (neutral).
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# KptChipsInput (kpt-chips-input)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A tag field — add with Enter or a comma, remove with Backspace or the × button. Signal Forms.
|
|
4
|
+
The value is a string[]. Items are rendered through `kpt-chip`.
|
|
5
5
|
Import: `import { KptChipsInput } from '@konce-pt/angular';`
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
- `value`: model<string[]> (
|
|
7
|
+
## Inputs / model
|
|
8
|
+
- `value`: model<string[]> (or `formField`)
|
|
9
9
|
- `placeholder`: string
|
|
10
|
-
- `allowDuplicates`: boolean (
|
|
10
|
+
- `allowDuplicates`: boolean (default false)
|
|
11
11
|
- `disabled`/`invalid`/`touched`: boolean; `touch`: output
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
<kpt-chips-input [formField]="f.tags" placeholder="
|
|
13
|
+
## Example
|
|
14
|
+
<kpt-chips-input [formField]="f.tags" placeholder="Add a tag…" />
|
|
15
15
|
<kpt-chips-input [(value)]="tags" />
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
|
|
17
|
+
## Tokens
|
|
18
|
+
The field uses `--kpt-form-field-*`; the tags inherit from `kpt-chip`.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# KptColorPicker (kpt-color-picker)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Color selection (swatch + hex + presets) on Signal Forms. The value is a hex string, e.g. '#3b82f6'.
|
|
4
4
|
Import: `import { KptColorPicker } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
- `value`: model<string> (
|
|
8
|
-
- `presets`: string[] —
|
|
6
|
+
## Inputs / model
|
|
7
|
+
- `value`: model<string> (or `formField`) — the hex color
|
|
8
|
+
- `presets`: string[] — the quick-pick palette (8 colors by default)
|
|
9
9
|
- `disabled`/`invalid`/`touched`: boolean; `touch`: output
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Example
|
|
12
12
|
<kpt-color-picker [formField]="f.brand" />
|
|
13
13
|
<kpt-color-picker [(value)]="color" [presets]="['#ef4444','#3b82f6']" />
|
|
14
14
|
|
|
15
15
|
color = signal('#3b82f6');
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
|
|
17
|
+
## Tokens
|
|
18
|
+
The border `--kpt-form-field-border`; the active preset `--kpt-color-primary`.
|
package/src/lib/confirm/llms.txt
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# KptConfirm (KptConfirmService + kpt-confirm-container)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A confirmation service built on `kpt-dialog`. Same pattern as `KptToastService`.
|
|
4
4
|
Import: `import { KptConfirmService, KptConfirmContainer } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
1.
|
|
8
|
-
2.
|
|
6
|
+
## Usage
|
|
7
|
+
1. Place `<kpt-confirm-container />` once in the application (next to `<kpt-toast-container />`).
|
|
8
|
+
2. Inject `KptConfirmService` and call `confirm(options)` → Promise<boolean>.
|
|
9
9
|
|
|
10
10
|
## KptConfirmOptions
|
|
11
|
-
- `message`: string (
|
|
11
|
+
- `message`: string (required); `header?`: string
|
|
12
12
|
- `acceptLabel?`/`rejectLabel?`: string; `variant?`: 'filled' | 'danger'; `icon?`: string
|
|
13
13
|
|
|
14
14
|
## i18n
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
The default labels (the header, Confirm, Cancel) come from i18n (the `confirm` namespace); the option fields take priority.
|
|
16
|
+
English by default; configured through `provideKptI18n` — see `i18n/llms.txt`.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Example
|
|
19
19
|
const ok = await this.confirm.confirm({
|
|
20
|
-
message: '
|
|
20
|
+
message: 'Delete this record?', variant: 'danger', acceptLabel: 'Delete', icon: 'alert-triangle',
|
|
21
21
|
});
|
|
22
22
|
if (ok) { /* ... */ }
|
|
23
23
|
|
|
24
|
-
##
|
|
25
|
-
|
|
24
|
+
## Tokens
|
|
25
|
+
Inherited from `kpt-dialog`; the icon follows the variant (`--kpt-color-danger` / `--kpt-color-primary`).
|