@konce-pt/angular 0.7.11 → 0.8.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/CHANGELOG.md +72 -0
- package/charts/src/lib/llms.txt +31 -30
- package/fesm2022/konce-pt-angular-charts.mjs +7 -498
- package/fesm2022/konce-pt-angular-charts.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-icons.mjs +7 -5136
- package/fesm2022/konce-pt-angular-icons.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-map.mjs +14 -1298
- package/fesm2022/konce-pt-angular-map.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-roadmap.mjs +8 -1269
- package/fesm2022/konce-pt-angular-roadmap.mjs.map +1 -1
- package/fesm2022/konce-pt-angular.mjs +179 -1455
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/grid/src/lib/llms.txt +48 -48
- package/map/src/lib/llms.txt +447 -446
- package/package.json +9 -2
- package/roadmap/src/lib/llms.txt +75 -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 +52 -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 +28 -22
- package/src/lib/icon/llms.txt +20 -20
- package/src/lib/icon-button/llms.txt +9 -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 +10 -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/types/konce-pt-angular-charts.d.ts +10 -199
- package/types/konce-pt-angular-charts.d.ts.map +1 -1
- package/types/konce-pt-angular-icons.d.ts +2 -4
- package/types/konce-pt-angular-icons.d.ts.map +1 -1
- package/types/konce-pt-angular-map.d.ts +4 -609
- package/types/konce-pt-angular-map.d.ts.map +1 -1
- package/types/konce-pt-angular-roadmap.d.ts +6 -541
- package/types/konce-pt-angular-roadmap.d.ts.map +1 -1
- package/types/konce-pt-angular.d.ts +57 -529
- package/types/konce-pt-angular.d.ts.map +1 -1
package/src/lib/auth/llms.txt
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
# KptAuth (kpt-auth)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
An authentication screen: sign in, sign up and password recovery in one component,
|
|
4
|
+
with a promo panel and a list of external providers (OAuth/SSO). Signal Forms.
|
|
5
|
+
The component is **presentational** — it does not call an API and does not navigate; the app does that in the handlers.
|
|
6
6
|
Import: `import { KptAuth, KptAuthProviderDef } from '@konce-pt/angular';`
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Selector
|
|
9
9
|
`kpt-auth`
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
- `mode`: model<'signIn' | 'signUp' | 'forgot'> = 'signIn' —
|
|
13
|
-
- `layout`: 'slider' | 'split' = 'slider' — panel
|
|
11
|
+
## Inputs
|
|
12
|
+
- `mode`: model<'signIn' | 'signUp' | 'forgot'> = 'signIn' — two-way (the app can force a mode)
|
|
13
|
+
- `layout`: 'slider' | 'split' = 'slider' — the promo panel slides to the other side / stays put
|
|
14
14
|
- `providers`: KptAuthProvider[] = [] — `{ id, label, icon?, iconUrl?, description? }`
|
|
15
|
-
- `providerLayout`: 'list' | 'grid' = 'list' —
|
|
16
|
-
- `showName`, `requireTerms`, `showRemember`: boolean = true —
|
|
17
|
-
- `busy`: boolean —
|
|
18
|
-
- `error` / `notice`: string | null —
|
|
19
|
-
- `promoTitle` / `promoText`: string | null — `null` =
|
|
20
|
-
`''` =
|
|
15
|
+
- `providerLayout`: 'list' | 'grid' = 'list' — a full-width list / a grid of icons with captions
|
|
16
|
+
- `showName`, `requireTerms`, `showRemember`: boolean = true — whether the fields are present
|
|
17
|
+
- `busy`: boolean — the buttons go into a loading state, the providers are blocked
|
|
18
|
+
- `error` / `notice`: string | null — a server message (a `danger` / `success` kpt-alert)
|
|
19
|
+
- `promoTitle` / `promoText`: string | null — `null` = mode-dependent text from i18n,
|
|
20
|
+
`''` = hide it (making room for the `[kptAuthPromo]` slot)
|
|
21
21
|
- `animated`: boolean = true; `animationDuration`: number = 320 (ms)
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Outputs
|
|
24
24
|
- `signIn`: { email, password, remember }
|
|
25
25
|
- `signUp`: { name, email, password, terms }
|
|
26
26
|
- `resetPassword`: { email }
|
|
27
|
-
- `providerSelect`: KptAuthProvider —
|
|
28
|
-
- `modeChange` —
|
|
27
|
+
- `providerSelect`: KptAuthProvider — the chosen provider (the whole object, not just the `id`)
|
|
28
|
+
- `modeChange` — from the `mode` model
|
|
29
29
|
|
|
30
|
-
##
|
|
31
|
-
- `[kptAuthBrand]` — logo/
|
|
32
|
-
- `[kptAuthPromo]` —
|
|
33
|
-
- `[kptAuthSso]` —
|
|
34
|
-
- `[kptAuthFields]` —
|
|
35
|
-
- `[kptAuthFooter]` —
|
|
36
|
-
- `ng-template[kptAuthProvider]="id"` (`KptAuthProviderDef`) —
|
|
37
|
-
|
|
30
|
+
## Content projection
|
|
31
|
+
- `[kptAuthBrand]` — a logo/name above the heading
|
|
32
|
+
- `[kptAuthPromo]` — the promo panel's content (below the title/text, above the CTA)
|
|
33
|
+
- `[kptAuthSso]` — an enterprise sign-in button **above** the provider separator
|
|
34
|
+
- `[kptAuthFields]` — extra fields inside the `<form>` (sign in and sign up)
|
|
35
|
+
- `[kptAuthFooter]` — the footer (terms, copyright)
|
|
36
|
+
- `ng-template[kptAuthProvider]="id"` (`KptAuthProviderDef`) — custom markup for a single provider;
|
|
37
|
+
context: `$implicit` = the provider, `select` = the function that reports the choice
|
|
38
38
|
|
|
39
|
-
**
|
|
40
|
-
|
|
39
|
+
**Fields from the `[kptAuthFields]` slot do not enter the component's model.** The consumer binds them to
|
|
40
|
+
their own form and reads them in the `signIn`/`signUp` handler — they are not part of the emitted value.
|
|
41
41
|
|
|
42
|
-
##
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(`validateTree`),
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
## Validation
|
|
43
|
+
Three independent forms (one per mode), with unconditional validators: e-mail required
|
|
44
|
+
and valid, password required (sign up: at least 8 characters), the password and its confirmation matching
|
|
45
|
+
(`validateTree`), consent required when `requireTerms`. Messages are composed from the error's `kind`
|
|
46
|
+
at render time, so **changing the language at runtime repaints them** (the validators are created once).
|
|
47
|
+
An error appears only once the field has been touched; `submit()` marks the whole tree as touched itself.
|
|
48
48
|
|
|
49
|
-
##
|
|
50
|
-
|
|
51
|
-
1. `provideKptTablerIcons()`
|
|
49
|
+
## Provider icons
|
|
50
|
+
The core carries no brand icons. Three ways around it:
|
|
51
|
+
1. `provideKptTablerIcons()` from `@konce-pt/angular/icons` → `icon: 'brand-google'`,
|
|
52
52
|
`'brand-facebook'`, `'brand-linkedin'`, `'brand-windows'`, `'brand-apple'`, `'brand-github'`, `'key'`.
|
|
53
|
-
2. `KptIconRegistry.register({ google: '<path …/>' })` —
|
|
54
|
-
`fill`/`stroke`/`opacity
|
|
55
|
-
|
|
56
|
-
3. `iconUrl` (
|
|
53
|
+
2. `KptIconRegistry.register({ google: '<path …/>' })` — note: the sanitizer lets
|
|
54
|
+
`fill`/`stroke`/`opacity` through, but strips `defs`/gradients and `fill-rule`, and the `viewBox` is fixed
|
|
55
|
+
at `0 0 24 24`. A multi-color logo needs an explicit `fill` on every path.
|
|
56
|
+
3. `iconUrl` (a plain `<img alt="">`) or the `kptAuthProvider` template — for a logo with a gradient.
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
The icon is decorative (`kpt-icon` carries `aria-hidden`), so the button's accessible name always
|
|
59
|
+
comes from `label`.
|
|
60
60
|
|
|
61
|
-
##
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
-
|
|
61
|
+
## Accessibility
|
|
62
|
+
- Only the **active mode's form** lives in the DOM — there are no invisible but still
|
|
63
|
+
focusable elements.
|
|
64
|
+
- The panel heading carries `tabindex="-1"` and takes focus after a mode change (otherwise the change is not
|
|
65
|
+
announced, and focus stays on a button that has slid off screen).
|
|
66
|
+
- Labels through `kpt-form-field` + `controlId`; `autocomplete`: `email`, `current-password`,
|
|
67
67
|
`new-password`, `name`.
|
|
68
|
-
-
|
|
69
|
-
- `prefers-reduced-motion`
|
|
68
|
+
- The mode switches are `<button>` elements with text, not `<a href="#">`.
|
|
69
|
+
- `prefers-reduced-motion` disables the slide and the content's entrance.
|
|
70
70
|
|
|
71
|
-
##
|
|
72
|
-
|
|
73
|
-
`--kpt-auth-min-height` (100dvh), `--kpt-auth-promo-bg` (
|
|
71
|
+
## Styling
|
|
72
|
+
Public variables: `--kpt-auth-width` (64rem), `--kpt-auth-card-height` (34rem),
|
|
73
|
+
`--kpt-auth-min-height` (100dvh), `--kpt-auth-promo-bg` (your own brand gradient),
|
|
74
74
|
`--kpt-auth-padding`, `--kpt-auth-card-radius` / `--kpt-auth-card-border` / `--kpt-auth-card-shadow`.
|
|
75
|
-
|
|
75
|
+
The full-window variant (a borderless card, edge to edge):
|
|
76
76
|
|
|
77
77
|
kpt-auth {
|
|
78
78
|
--kpt-auth-padding: 0;
|
|
@@ -82,9 +82,9 @@ Wariant na całe okno (karta bez ramki, od krawędzi do krawędzi):
|
|
|
82
82
|
--kpt-auth-card-border: 0;
|
|
83
83
|
--kpt-auth-card-shadow: none;
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
Below the `md` breakpoint the layout drops to a single column (promo above the form, no sliding).
|
|
86
86
|
|
|
87
|
-
##
|
|
87
|
+
## Example
|
|
88
88
|
<kpt-auth
|
|
89
89
|
[providers]="[{ id: 'google', label: 'Google', icon: 'brand-google' }]"
|
|
90
90
|
[busy]="loading()"
|
|
@@ -99,6 +99,6 @@ Poniżej breakpointu `md` układ schodzi do jednej kolumny (promo nad formularze
|
|
|
99
99
|
</kpt-auth>
|
|
100
100
|
|
|
101
101
|
## i18n
|
|
102
|
-
|
|
103
|
-
`auth.continueWith` ({provider}), `auth.passwordHint` / `auth.errorMinLength` ({min}).
|
|
104
|
-
|
|
102
|
+
Every string comes from the `auth` namespace (EN/PL), including `auth.promo.*` and the
|
|
103
|
+
`auth.continueWith` ({provider}), `auth.passwordHint` / `auth.errorMinLength` ({min}) interpolations.
|
|
104
|
+
See `i18n/llms.txt`.
|
|
@@ -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}`.
|