@konce-pt/angular 0.11.2 → 0.12.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 +237 -0
- package/charts/src/lib/llms.txt +8 -0
- package/chat/src/lib/llms.txt +9 -0
- package/fesm2022/konce-pt-angular-charts.mjs +141 -60
- package/fesm2022/konce-pt-angular-charts.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-chat.mjs +70 -18
- package/fesm2022/konce-pt-angular-chat.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-icons.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-map.mjs +62 -23
- package/fesm2022/konce-pt-angular-map.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-roadmap.mjs +103 -17
- package/fesm2022/konce-pt-angular-roadmap.mjs.map +1 -1
- package/fesm2022/konce-pt-angular.mjs +3373 -1911
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/map/src/lib/llms.txt +1 -0
- package/package.json +11 -11
- package/roadmap/src/lib/llms.txt +11 -1
- package/src/lib/alert/llms.txt +1 -0
- package/src/lib/app-shell/llms.txt +3 -2
- package/src/lib/auth/llms.txt +6 -2
- package/src/lib/autocomplete/llms.txt +3 -0
- package/src/lib/bottom-sheet/llms.txt +3 -0
- package/src/lib/breadcrumb/llms.txt +8 -0
- package/src/lib/button-group/llms.txt +4 -1
- package/src/lib/checkbox/llms.txt +3 -0
- package/src/lib/chips-input/llms.txt +3 -0
- package/src/lib/color-picker/llms.txt +3 -0
- package/src/lib/confirm/llms.txt +6 -0
- package/src/lib/context-menu/llms.txt +3 -0
- package/src/lib/data-table/llms.txt +22 -10
- package/src/lib/date-range/llms.txt +20 -1
- package/src/lib/datepicker/llms.txt +21 -4
- package/src/lib/dialog/llms.txt +3 -0
- package/src/lib/divider/llms.txt +1 -0
- package/src/lib/drawer/llms.txt +3 -0
- package/src/lib/file-upload/llms.txt +3 -0
- package/src/lib/i18n/llms.txt +7 -0
- package/src/lib/icon/llms.txt +1 -1
- package/src/lib/input-mask/llms.txt +3 -0
- package/src/lib/input-number/llms.txt +5 -2
- package/src/lib/input-otp/llms.txt +11 -0
- package/src/lib/knob/llms.txt +4 -2
- package/src/lib/listbox/llms.txt +3 -0
- package/src/lib/megamenu/llms.txt +11 -0
- package/src/lib/menubar/llms.txt +11 -0
- package/src/lib/order-list/llms.txt +3 -0
- package/src/lib/password/llms.txt +5 -1
- package/src/lib/peek/llms.txt +1 -1
- package/src/lib/pick-list/llms.txt +3 -0
- package/src/lib/popover/llms.txt +3 -0
- package/src/lib/radio-group/llms.txt +3 -0
- package/src/lib/rich-text/llms.txt +13 -0
- package/src/lib/select/llms.txt +3 -0
- package/src/lib/slider/llms.txt +3 -0
- package/src/lib/stepper/llms.txt +3 -0
- package/src/lib/switch/llms.txt +3 -0
- package/src/lib/switch-group/llms.txt +3 -0
- package/src/lib/tabs/llms.txt +3 -0
- package/src/lib/toast/llms.txt +3 -0
- package/src/lib/tooltip/llms.txt +4 -1
- package/src/lib/tree/llms.txt +1 -0
- package/types/konce-pt-angular-charts.d.ts +11 -0
- package/types/konce-pt-angular-charts.d.ts.map +1 -1
- package/types/konce-pt-angular-chat.d.ts +16 -1
- package/types/konce-pt-angular-chat.d.ts.map +1 -1
- package/types/konce-pt-angular-map.d.ts +14 -2
- package/types/konce-pt-angular-map.d.ts.map +1 -1
- package/types/konce-pt-angular-roadmap.d.ts +26 -1
- package/types/konce-pt-angular-roadmap.d.ts.map +1 -1
- package/types/konce-pt-angular.d.ts +517 -152
- package/types/konce-pt-angular.d.ts.map +1 -1
package/map/src/lib/llms.txt
CHANGED
|
@@ -82,6 +82,7 @@ Leaflet is loaded with a dynamic `import()`, so it does not weigh down applicati
|
|
|
82
82
|
- `viewChange`: `{ center, zoom, bounds }` — after the map's movement ends
|
|
83
83
|
- `userPositionChange`: `KptMapUserPosition | null`
|
|
84
84
|
- `userLocationError`: `KptMapGeolocationError`
|
|
85
|
+
- `engineError`: `unknown` — the engine failed to start (no factory, no `leaflet` package, a rejected Google key); the error is also logged to the console, and destroying the component mid-`init()` waits for it to finish
|
|
85
86
|
|
|
86
87
|
## KptMapCategory
|
|
87
88
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konce-pt/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Open-source Angular 22 component library on Signals & Signal Forms — 70+ components, rich data table, zoneless, fully tokenized. Selektory kpt-*, klasy Kpt*.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "konce.pt",
|
|
@@ -46,16 +46,16 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"tslib": "^2.3.0",
|
|
49
|
-
"@konce-pt/backdrop": "0.
|
|
50
|
-
"@konce-pt/
|
|
51
|
-
"@konce-pt/
|
|
52
|
-
"@konce-pt/
|
|
53
|
-
"@konce-pt/
|
|
54
|
-
"@konce-pt/
|
|
55
|
-
"@konce-pt/
|
|
56
|
-
"@konce-pt/
|
|
57
|
-
"@konce-pt/
|
|
58
|
-
"@konce-pt/icons": "0.
|
|
49
|
+
"@konce-pt/backdrop": "0.12.0",
|
|
50
|
+
"@konce-pt/chart": "0.12.0",
|
|
51
|
+
"@konce-pt/i18n": "0.12.0",
|
|
52
|
+
"@konce-pt/mention": "0.12.0",
|
|
53
|
+
"@konce-pt/datetime": "0.12.0",
|
|
54
|
+
"@konce-pt/roadmap": "0.12.0",
|
|
55
|
+
"@konce-pt/map": "0.12.0",
|
|
56
|
+
"@konce-pt/table": "0.12.0",
|
|
57
|
+
"@konce-pt/chat": "0.12.0",
|
|
58
|
+
"@konce-pt/icons": "0.12.0"
|
|
59
59
|
},
|
|
60
60
|
"module": "fesm2022/konce-pt-angular.mjs",
|
|
61
61
|
"typings": "types/konce-pt-angular.d.ts",
|
package/roadmap/src/lib/llms.txt
CHANGED
|
@@ -91,13 +91,23 @@ Import: `import { KptRoadmap } from '@konce-pt/angular/roadmap';`
|
|
|
91
91
|
- Entries with an invalid date or a duplicate `id` are skipped, with a warning in development mode.
|
|
92
92
|
|
|
93
93
|
## i18n
|
|
94
|
-
The `roadmap.*` keys: `empty`, `week`, `today`, `milestone`, `expandGroup`, `collapseGroup
|
|
94
|
+
The `roadmap.*` keys: `empty`, `week`, `today`, `milestone`, `expandGroup`, `collapseGroup`, `progress` (`{percent}`).
|
|
95
95
|
Month and weekday names come from `Intl` per `config.locale` or the locale from `KptI18n`,
|
|
96
96
|
so they follow each language's orthography (lowercase in Polish, capitalized in English).
|
|
97
97
|
In the header the first character is capitalized through `::first-letter`, so that the axis looks the same
|
|
98
98
|
regardless of language; the text itself is untouched, so tooltips and screen reader output
|
|
99
99
|
get the original form.
|
|
100
100
|
|
|
101
|
+
## Accessibility
|
|
102
|
+
Bars and milestones are `role="button"` with an accessible name built from the label, sublabel, date range
|
|
103
|
+
and progress (`Design, 3–14 Mar 2026, 40% complete`) — the end is exclusive, so the last occupied day is
|
|
104
|
+
announced. The whole bar grid is one Tab stop (roving tabindex): Left/Right move within a row, Up/Down go to
|
|
105
|
+
the bar with the nearest start in the neighbouring row, Home/End jump to the row's edge, Ctrl+Home/End to the
|
|
106
|
+
first/last bar; Enter and Space act like a click. With `virtual` on, moving to a row outside the window
|
|
107
|
+
scrolls it in first. Disabled items get `aria-disabled`. A group toggle is named by the group label and
|
|
108
|
+
carries `aria-expanded`; "Expand/Collapse group" is only its tooltip. The background grid and the dependency
|
|
109
|
+
layer are `aria-hidden`.
|
|
110
|
+
|
|
101
111
|
## Tokens
|
|
102
112
|
Surfaces `--kpt-color-surface{,-variant,-sunken,-hover}`, outlines `--kpt-color-border{,-strong}`,
|
|
103
113
|
bars per variant `--kpt-color-{primary,success,danger,warning,info,muted}`.
|
package/src/lib/alert/llms.txt
CHANGED
|
@@ -24,3 +24,4 @@ The role follows the weight of the message: `info` and `success` are `role="stat
|
|
|
24
24
|
politely, without interrupting), `warning` and `danger` are `role="alert"` (read at once). The icon
|
|
25
25
|
is decorative; the × button is labelled from `common.close`. After closing, focus falls back to the
|
|
26
26
|
page — move it yourself in the close handler when the alert was reached with the keyboard.
|
|
27
|
+
A live region announces **changes**: an alert rendered together with the page (or revealed by toggling `hidden`) is not announced reliably. To have it read, add it after the action (`@if` / conditional render) — the inserted element is announced.
|
|
@@ -75,7 +75,8 @@ with `kptTooltip`, since only the glyph is visible.
|
|
|
75
75
|
- A closed panel drops out of the tab order through `visibility: hidden` (not `inert`) — it is correct
|
|
76
76
|
from the very first frame.
|
|
77
77
|
- An open overlay puts `inert` on the content (`<main>`), so Tab does not walk underneath the scrim.
|
|
78
|
-
- `Escape` closes the overlay; so does clicking the scrim.
|
|
78
|
+
- `Escape` closes the overlay; so does clicking the scrim. An Escape that something opened above the
|
|
79
|
+
shell already handled (a dialog, menu or popover — `preventDefault()` or focus inside it) is left alone.
|
|
79
80
|
- The slide direction follows `dir` (RTL slides in from the right).
|
|
80
81
|
- Height: `100dvh` with a `100vh` fallback.
|
|
81
82
|
- It does **not** close the menu after navigation — the shell does not know what counts as navigation
|
|
@@ -91,6 +92,6 @@ otherwise you end up with two layers of the same logic.
|
|
|
91
92
|
`--kpt-color-overlay-scrim`, `--kpt-elevation-3`, `--kpt-motion-duration-base`.
|
|
92
93
|
|
|
93
94
|
## Focus
|
|
94
|
-
Opening the overlay moves focus into the panel (its first focusable element, or the `<
|
|
95
|
+
Opening the overlay moves focus into the panel (its first focusable element, or the `<nav>`
|
|
95
96
|
itself); closing it returns focus to where it came from — usually the menu button — unless the user
|
|
96
97
|
has already moved it elsewhere. An overlay that is open when the page loads does not take focus.
|
package/src/lib/auth/llms.txt
CHANGED
|
@@ -14,7 +14,8 @@ Import: `import { KptAuth, KptAuthProviderDef } from '@konce-pt/angular';`
|
|
|
14
14
|
- `providers`: KptAuthProvider[] = [] — `{ id, label, icon?, iconUrl?, description? }`
|
|
15
15
|
- `providerLayout`: 'list' | 'grid' = 'list' — a full-width list / a grid of icons with captions
|
|
16
16
|
- `showName`, `requireTerms`, `showRemember`: boolean = true — whether the fields are present
|
|
17
|
-
- `busy`: boolean — the
|
|
17
|
+
- `busy`: boolean — the submit button goes into a loading state (submitting is blocked), the providers
|
|
18
|
+
are blocked; the fields stay editable
|
|
18
19
|
- `error` / `notice`: string | null — a server message (a `danger` / `success` kpt-alert)
|
|
19
20
|
- `promoTitle` / `promoText`: string | null — `null` = mode-dependent text from i18n,
|
|
20
21
|
`''` = hide it (making room for the `[kptAuthPromo]` slot)
|
|
@@ -31,7 +32,8 @@ Import: `import { KptAuth, KptAuthProviderDef } from '@konce-pt/angular';`
|
|
|
31
32
|
- `[kptAuthBrand]` — a logo/name above the heading
|
|
32
33
|
- `[kptAuthPromo]` — the promo panel's content (below the title/text, above the CTA)
|
|
33
34
|
- `[kptAuthSso]` — an enterprise sign-in button **above** the provider separator
|
|
34
|
-
- `[kptAuthFields]` — extra fields inside the `<form>` (sign in and sign up
|
|
35
|
+
- `[kptAuthFields]` — extra fields inside the `<form>` (sign in and sign up — one slot, shown in whichever
|
|
36
|
+
of the two forms is active)
|
|
35
37
|
- `[kptAuthFooter]` — the footer (terms, copyright)
|
|
36
38
|
- `ng-template[kptAuthProvider]="id"` (`KptAuthProviderDef`) — custom markup for a single provider;
|
|
37
39
|
context: `$implicit` = the provider, `select` = the function that reports the choice
|
|
@@ -45,6 +47,8 @@ and valid, password required (sign up: at least 8 characters), the password and
|
|
|
45
47
|
(`validateTree`), consent required when `requireTerms`. Messages are composed from the error's `kind`
|
|
46
48
|
at render time, so **changing the language at runtime repaints them** (the validators are created once).
|
|
47
49
|
An error appears only once the field has been touched; `submit()` marks the whole tree as touched itself.
|
|
50
|
+
That is why the submit button is **not** disabled while the form is invalid: pressing it shows what is
|
|
51
|
+
missing instead of a dead button (WCAG 3.3.1), and the outputs fire only for a valid form.
|
|
48
52
|
|
|
49
53
|
## Provider icons
|
|
50
54
|
The core carries no brand icons. Three ways around it:
|
|
@@ -27,3 +27,6 @@ error is added to `aria-describedby`, so `controlId` is not needed. Without a wr
|
|
|
27
27
|
|
|
28
28
|
## Tokens
|
|
29
29
|
`--kpt-form-field-*`, the panel `--kpt-color-surface-raised`.
|
|
30
|
+
|
|
31
|
+
## Read-only and required
|
|
32
|
+
`readonly` is the native read-only field with `aria-readonly`; the suggestions do not open and Escape does not clear the value.
|
|
@@ -27,3 +27,6 @@ is named by its `header` through `aria-labelledby`. The shared helper is `shared
|
|
|
27
27
|
## Tokens
|
|
28
28
|
The panel `--kpt-color-surface-raised`, the top radius `--kpt-radius-lg`, `--kpt-elevation-4`; the backdrop
|
|
29
29
|
`--kpt-color-overlay-scrim`.
|
|
30
|
+
|
|
31
|
+
## Name and scrolling
|
|
32
|
+
Without `header` give the sheet `ariaLabel` — a `role="dialog"` without a name is announced as a bare "dialog". An open sheet locks page scrolling underneath.
|
|
@@ -15,3 +15,11 @@ The separator is a `chevron-right` icon; links `--kpt-color-on-surface-muted`
|
|
|
15
15
|
A `<nav>` landmark labelled from `breadcrumb.label`, holding an ordered list (`<ol>`/`<li>`), so a
|
|
16
16
|
screen reader announces how many levels the trail has. The current page carries
|
|
17
17
|
`aria-current="page"`; separators are icons hidden from assistive technology.
|
|
18
|
+
|
|
19
|
+
## Router
|
|
20
|
+
Links are plain `<a href>`, so without a router a click reloads the page. `navigate` fires on a plain
|
|
21
|
+
click (left button, no Ctrl/⌘/Shift, no `target="_blank"`) with `{ item, url, event }`: call
|
|
22
|
+
`event.preventDefault()` and navigate with your router. Modified clicks stay native (a new tab, a new
|
|
23
|
+
window). The library depends on no router.
|
|
24
|
+
|
|
25
|
+
<kpt-breadcrumb [items]="items" (navigate)="$event.event.preventDefault(); router.navigateByUrl($event.url)" />
|
|
@@ -28,4 +28,7 @@ The icon takes its colour from `currentColor`, so the active item — filled wit
|
|
|
28
28
|
<kpt-button-group [formField]="f.period" [options]="periods" />
|
|
29
29
|
|
|
30
30
|
## Tokens
|
|
31
|
-
`--kpt-color-primary`, `--kpt-color-border-strong`, `--kpt-color-muted`, `--kpt-button-gap`.
|
|
31
|
+
`--kpt-color-primary`, `--kpt-color-border-strong`, `--kpt-color-muted`, `--kpt-button-gap`.
|
|
32
|
+
|
|
33
|
+
## Read-only and required
|
|
34
|
+
The group is `role="radiogroup"` with `role="radio"` items (`aria-checked`) instead of `aria-pressed` buttons — the choice is exclusive, so a screen reader announces "2 of 3". One Tab stop, arrows move the selection, `Home`/`End` jump to the ends. New: `id`, `ariaLabel`, `readonly`, `required`, and the error state (`invalid` + `touched`) visible on the group itself.
|
|
@@ -23,3 +23,6 @@ error is added to `aria-describedby`, so `controlId` is not needed. Without a wr
|
|
|
23
23
|
|
|
24
24
|
## Tokens
|
|
25
25
|
`--kpt-color-primary`, `--kpt-color-on-primary`, `--kpt-form-field-border`, `--kpt-form-field-border-error`.
|
|
26
|
+
|
|
27
|
+
## Read-only and required
|
|
28
|
+
`readonly` keeps the box focusable but blocks the click and Space (`aria-readonly`) — the native attribute does not work on checkboxes.
|
|
@@ -28,3 +28,6 @@ error is added to `aria-describedby`, so `controlId` is not needed. Without a wr
|
|
|
28
28
|
|
|
29
29
|
## Tokens
|
|
30
30
|
The field uses `--kpt-form-field-*`; the tags inherit from `kpt-chip`.
|
|
31
|
+
|
|
32
|
+
## Read-only and required
|
|
33
|
+
`readonly` shows the tags without the remove buttons and ignores Enter, comma and Backspace. Enter during IME composition (CJK) confirms the character, not a tag. A repeated message (a second rejected duplicate) is announced again.
|
|
@@ -30,3 +30,6 @@ error is added to `aria-describedby`, so `controlId` is not needed. Without a wr
|
|
|
30
30
|
|
|
31
31
|
## Tokens
|
|
32
32
|
The border `--kpt-form-field-border`; the active preset `--kpt-color-primary`.
|
|
33
|
+
|
|
34
|
+
## Read-only and required
|
|
35
|
+
`readonly` blocks the picker, the code field and the presets; `required` sets `aria-required` on the code field. Picking a preset or a colour counts as a touch. The code field takes `fff`, `#fff` and `#ffffff` and is not rewritten while typing, so the caret does not jump.
|
package/src/lib/confirm/llms.txt
CHANGED
|
@@ -7,6 +7,12 @@ Import: `import { KptConfirmService, KptConfirmContainer } from '@konce-pt/angul
|
|
|
7
7
|
1. Place `<kpt-confirm-container />` once in the application (next to `<kpt-toast-container />`).
|
|
8
8
|
2. Inject `KptConfirmService` and call `confirm(options)` → Promise<boolean>.
|
|
9
9
|
|
|
10
|
+
## The promise always settles
|
|
11
|
+
Escape and × resolve `false`. A second `confirm()` while one is open resolves the previous one with
|
|
12
|
+
`false` and shows the new one — one request at a time, and no `await` is left hanging. Without a
|
|
13
|
+
mounted `<kpt-confirm-container />` the dialog cannot appear, so in dev mode `confirm()` warns in the
|
|
14
|
+
console.
|
|
15
|
+
|
|
10
16
|
## KptConfirmOptions
|
|
11
17
|
- `message`: string (required); `header?`: string
|
|
12
18
|
- `acceptLabel?`/`rejectLabel?`: string; `variant?`: 'filled' | 'danger'; `icon?`: string
|
|
@@ -25,3 +25,6 @@ no right click, so still offer the same actions through a visible button with `k
|
|
|
25
25
|
|
|
26
26
|
## Tokens
|
|
27
27
|
The panel `--kpt-color-surface-raised`, `--kpt-elevation-3`.
|
|
28
|
+
|
|
29
|
+
## Positioning
|
|
30
|
+
The panel opens in the top layer (`popover="manual"`), so an ancestor with `transform`, `filter` or `backdrop-filter` (an animated card, a glass panel) no longer shifts it and `overflow: hidden` no longer clips it. Scrolling or resizing the window closes the menu.
|
|
@@ -9,7 +9,9 @@ Import: `import { KptDataTable, KptColumn, KptCellDef, KptCellEditDef, KptRowDet
|
|
|
9
9
|
|
|
10
10
|
## The column model (KptColumn)
|
|
11
11
|
`{ field: string; header: string; sortable?: boolean; align?: 'start'|'center'|'end'; width?: string; frozen?: boolean; filter?: KptColumnFilter; edit?: KptColumnEdit; summary?: KptColumnSummary }`
|
|
12
|
-
`frozen` columns (leading, adjacent) stick during horizontal scrolling
|
|
12
|
+
`frozen` columns (leading, adjacent) stick during horizontal scrolling. Their offsets come from `width`:
|
|
13
|
+
`px`/`rem`/`em` are computed up front, other units (`%`, `ch`) and a missing width are measured from
|
|
14
|
+
the rendered header after the first render.
|
|
13
15
|
|
|
14
16
|
### The column filter (KptColumnFilter)
|
|
15
17
|
`{ type: 'text'|'number'|'select'|'dateRange'|'numberRange'|'slider'; options?: KptOption[]; multiple?: boolean; placeholder?: string; min?: number; max?: number; step?: number }`
|
|
@@ -41,10 +43,14 @@ A column with `summary` is aggregated in the summary row — see the "Summary ro
|
|
|
41
43
|
- `pageSize`: number — 0 disables pagination
|
|
42
44
|
- `pageSizeOptions`: number[] (default [5,10,20,50])
|
|
43
45
|
- `selectable`: 'none' | 'single' | 'multiple'
|
|
44
|
-
- `loading`: boolean — a "Loading…" row
|
|
46
|
+
- `loading`: boolean — a "Loading…" row; the table gets `aria-busy="true"`
|
|
47
|
+
- `ariaLabel`: string | null — the table's accessible name when there is no visible `caption`
|
|
48
|
+
- `caption`: string | null — a visible `<caption>`, which is also the table's name
|
|
49
|
+
- `clickableRows`: boolean — rows become focusable (Tab) and Enter/Space emits `rowClick`; turn it on when
|
|
50
|
+
clicking a row does something and the row has no other link/button for the same action
|
|
45
51
|
- `emptyMessage`: string — with no value it uses i18n (`dataTable.empty`); the input takes priority
|
|
46
52
|
- `rowKey`: string | null — the field identifying a row (for selection); without it rows are compared by reference
|
|
47
|
-
- `reorderable`: boolean — drag-and-drop column reordering (native HTML5 DnD); `frozen` columns are excluded from moving (they stay leading) and no other column can be dropped in front of them
|
|
53
|
+
- `reorderable`: boolean — drag-and-drop column reordering (native HTML5 DnD); `frozen` columns are excluded from moving (they stay leading) and no other column can be dropped in front of them. The grip is a button: `←`/`→` on it move the column by one place and the new position is announced
|
|
48
54
|
- `exportable`: boolean — an "Export CSV" button in the toolbar
|
|
49
55
|
- `exportFilename`: string (default 'export.csv')
|
|
50
56
|
- `lazy`: boolean — server-side mode (no client-side filtering/sorting/pagination)
|
|
@@ -72,8 +78,8 @@ A column with `summary` is aggregated in the summary row — see the "Summary ro
|
|
|
72
78
|
hiding and showing a column. To place a compact (icon) version of such a button
|
|
73
79
|
next to the paginator there is the `[kptPaginatorActions]` projection slot — see the "The paginator
|
|
74
80
|
row" section below.
|
|
75
|
-
- `rowClick`: output<T>
|
|
76
|
-
- `lazyLoad`: output<KptTableLazyState> — { pageIndex, pageSize, sortField, sortDir, filter, columnFilters }; emitted in lazy mode on every state change
|
|
81
|
+
- `rowClick`: output<T> — mouse only unless `clickableRows` is on
|
|
82
|
+
- `lazyLoad`: output<KptTableLazyState> — { pageIndex, pageSize, sortField, sortDir, filter, columnFilters }; emitted in lazy mode on every state change, including once on start (the first page) and after the parent changes `pageSize`
|
|
77
83
|
- `cellEdit`: output<KptCellEditEvent<T>> — `{ row, field, value, updatedRow }`; emitted once a cell
|
|
78
84
|
edit is committed (see "Inline editing" below), and only when the value actually
|
|
79
85
|
changed. The table saves nothing itself (no HTTP, no loading/error state) — `updatedRow`
|
|
@@ -81,8 +87,8 @@ A column with `summary` is aggregated in the summary row — see the "Summary ro
|
|
|
81
87
|
by the consumer, exactly as with `lazyLoad`.
|
|
82
88
|
|
|
83
89
|
## Export / methods
|
|
84
|
-
- `exportCsv()`: a public method — exports the current (filtered+sorted) data to CSV (the `;` separator,
|
|
85
|
-
Excel). It exports only the currently **visible** columns (those in `hiddenFields` are left out).
|
|
90
|
+
- `exportCsv()`: a public method — exports the current (filtered+sorted) data to CSV (the `;` separator, `\r\n`
|
|
91
|
+
line endings as in RFC 4180, a BOM for Excel). It exports only the currently **visible** columns (those in `hiddenFields` are left out).
|
|
86
92
|
|
|
87
93
|
## Custom cell templates (the kptCell directive)
|
|
88
94
|
Context: `$implicit` = the row, `value` = the field's value.
|
|
@@ -184,14 +190,20 @@ to the bottom of the scrolling area (`position: sticky; bottom: 0`, like the sti
|
|
|
184
190
|
summaryLabel="Total" (cellEdit)="onCellEdit($event)" />
|
|
185
191
|
|
|
186
192
|
## Behavior
|
|
187
|
-
- Sorting:
|
|
188
|
-
|
|
193
|
+
- Sorting: the sortable header is a button (Tab, Enter/Space) and cycles asc → desc → none; `aria-sort` sits
|
|
194
|
+
on the `<th>`. Text is compared with `Intl.Collator` for the `KptI18n` language (natural numbers:
|
|
195
|
+
"Item 2" before "Item 10"), empty cells go last in both directions.
|
|
196
|
+
- Filtering: text matching across every column field, ignoring case and diacritics ("lodz" finds "Łódź");
|
|
197
|
+
the page resets to 0. The column text filter folds diacritics too.
|
|
198
|
+
- 'single' selection renders radios (one group per table); clicking the selected one clears it.
|
|
189
199
|
- 'multiple' selection: the header checkbox selects/deselects the current page.
|
|
200
|
+
- An editable cell keeps its value as its name; "Edit: {column}" is its description (`aria-describedby`).
|
|
190
201
|
- A sticky header, empty/loading states, per-column alignment and widths.
|
|
191
202
|
|
|
192
203
|
## i18n
|
|
193
204
|
The toolbar/state/aria labels (Search, Export CSV, Loading, No data, selection, the column filters:
|
|
194
|
-
Filter/Filter min/Filter max with `{column}`, All, min, max, Date range
|
|
205
|
+
Filter/Filter min/Filter max with `{column}`, All, min, max, Date range, Move column, the column-moved
|
|
206
|
+
announcement) come from i18n (the `dataTable` namespace).
|
|
195
207
|
English by default; configured through `provideKptI18n` — see `i18n/llms.txt`.
|
|
196
208
|
|
|
197
209
|
## The paginator row (the [kptPaginatorActions] slot)
|
|
@@ -16,7 +16,9 @@ Requires `import '@angular/cdk/overlay-prebuilt.css';`
|
|
|
16
16
|
- `hourFormat`: 12 | 24 (default 24) — an AM/PM or a 24h dial; the value is always 24h
|
|
17
17
|
- `minuteStep`: number (default 1) — minute snapping on the dial
|
|
18
18
|
- `placeholder`: string — with no value it uses i18n (`dateRange.placeholder`); the input takes priority
|
|
19
|
-
- `displayFormat`: 'pl' | 'iso' (default 'pl') — the display format for start/end
|
|
19
|
+
- `displayFormat`: 'pl' | 'iso' | 'locale' (default 'pl') — the display format for start/end
|
|
20
|
+
- `open`: model<boolean> — two-way `[(open)]`, as in `kpt-datepicker`
|
|
21
|
+
- `readonly`/`required`, `firstDayOfWeek` — see "Week start, display format and field state"
|
|
20
22
|
- `minDate`/`maxDate`: string|null — 'YYYY-MM-DD' bounds (inclusive); days outside are disabled
|
|
21
23
|
- `ariaLabel`: string|null — the accessible name when no `<label for>` describes the field
|
|
22
24
|
- `disabled`/`invalid`/`touched`: boolean; `touch`: output — fires when the panel closes and when
|
|
@@ -52,6 +54,23 @@ Day and month names come from `Intl` per locale; the labels ("From/To", navigati
|
|
|
52
54
|
(the `dateRange` namespace + `datepicker`/`common`), and so do the dialog name, the range roles of
|
|
53
55
|
the days and the live announcements. English by default — see `i18n/llms.txt`.
|
|
54
56
|
|
|
57
|
+
## Week start, display format and field state
|
|
58
|
+
- The week starts by the `KptI18n` language (`Intl.Locale#getWeekInfo`, with a fallback list of regions):
|
|
59
|
+
en / en-US on Sunday, pl, de, en-GB on Monday. `firstDayOfWeek` (1 = Monday … 7 = Sunday) overrides it;
|
|
60
|
+
the headers, the grid and `Home`/`End` follow it.
|
|
61
|
+
- `displayFormat`: `'pl'` (DD.MM.YYYY, default), `'iso'` (YYYY-MM-DD) or `'locale'` — order and separators
|
|
62
|
+
from `Intl` (en-US: MM/DD/YYYY). The placeholder follows the format and its letters follow the language
|
|
63
|
+
(EN `YYYY`, PL `RRRR`, the `datepicker.yearToken`/`monthToken`/`dayToken` keys). AM/PM come from `Intl`.
|
|
64
|
+
- The field is `role="combobox"` with `aria-haspopup="dialog"` (the APG select-only combobox), so it carries
|
|
65
|
+
`aria-required` (`required`), `aria-readonly` (`readonly` — the value shows, the panel does not open,
|
|
66
|
+
there is no clear button) and `aria-invalid`.
|
|
67
|
+
- Turning the page with ‹ › is announced (`aria-live="polite"`); the title buttons are named
|
|
68
|
+
"October, Choose month" — the visible text first (WCAG 2.5.3). Clearing the value counts as a touch.
|
|
69
|
+
- "Today" is computed on every open, so a panel opened after midnight marks the right day.
|
|
70
|
+
- The clock (`kpt-clock`): the hour and minute segments are `role="spinbutton"` — `↑`/`↓` by one (minutes by
|
|
71
|
+
`minuteStep`), `PageUp`/`PageDown` by five, `Home`/`End` to the bounds — so every minute is reachable from
|
|
72
|
+
the keyboard, not only the five-minute marks.
|
|
73
|
+
|
|
55
74
|
## Label and description
|
|
56
75
|
`id` goes to the focusable element — the host never carries it; without one it is generated. A `div`
|
|
57
76
|
with a role is not named by `label[for]`, so inside `kpt-form-field` it gets `aria-labelledby`
|
|
@@ -6,7 +6,7 @@ The panel is a stack of views — **decade → years → months → days**: clic
|
|
|
6
6
|
clicking the title goes one level up. The starting level is set by `startView` — for a date of birth use
|
|
7
7
|
`startView="decade"` (decade → year → month → day, four clicks instead of hundreds of arrow presses).
|
|
8
8
|
The time is picked on a clock dial (two stages: hours → minutes, click or drag), in 12/24h format.
|
|
9
|
-
Display follows `displayFormat` ('pl'/'iso'). The week starts
|
|
9
|
+
Display follows `displayFormat` ('pl'/'iso'/'locale'). The week starts by the language (see below), today is marked, min/max range supported.
|
|
10
10
|
Requires the CDK overlay styles: `import '@angular/cdk/overlay-prebuilt.css';`
|
|
11
11
|
Import: `import { KptDatepicker } from '@konce-pt/angular';`
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ Import: `import { KptDatepicker } from '@konce-pt/angular';`
|
|
|
30
30
|
- `hourFormat`: 12 | 24 (default 24) — an AM/PM dial (12) or one with a 13–00 ring (24); the value is always 24h.
|
|
31
31
|
- `minuteStep`: number (default 1) — minute snapping on the dial.
|
|
32
32
|
- `monthDisplay`: 'long' | 'number' (default 'long') — in 'month' mode and in month labels: as a word (January) or a number (01)
|
|
33
|
-
- `displayFormat`: 'pl' | 'iso' (default 'pl') — the display format and the default placeholder
|
|
33
|
+
- `displayFormat`: 'pl' | 'iso' | 'locale' (default 'pl') — the display format and the default placeholder
|
|
34
34
|
- `disabled`/`invalid`/`touched`: boolean; the `touch` output.
|
|
35
35
|
- `open`: model (two-way `[(open)]`, the `(openChange)` output) — the calendar state. It lets you open
|
|
36
36
|
it from outside and know when the user is done choosing — that is what inline editing
|
|
@@ -74,13 +74,30 @@ An arrow dims (`disabled`) when the whole neighboring page falls outside `minDat
|
|
|
74
74
|
Weekday and month names are derived from `Intl` per the active i18n locale (not from the dictionary).
|
|
75
75
|
The navigation/aria labels ("previous decades", "choose a year", the dialog name…) and "Done" come from i18n
|
|
76
76
|
(the `datepicker` + `common` namespaces). English by default;
|
|
77
|
-
configured through `provideKptI18n` — see `i18n/llms.txt`. Note: `displayFormat`
|
|
78
|
-
controls the date format only and is independent of the label language.
|
|
77
|
+
configured through `provideKptI18n` — see `i18n/llms.txt`. Note: `displayFormat` 'pl'/'iso'
|
|
78
|
+
controls the date format only and is independent of the label language; 'locale' follows it.
|
|
79
79
|
|
|
80
80
|
## Core
|
|
81
81
|
The grids, bounds, paging and formats come from `@konce-pt/datetime` — the same framework-free
|
|
82
82
|
package the React port uses, with its own tests. The component holds signals and markup only.
|
|
83
83
|
|
|
84
|
+
## Week start, display format and field state
|
|
85
|
+
- The week starts by the `KptI18n` language (`Intl.Locale#getWeekInfo`, with a fallback list of regions):
|
|
86
|
+
en / en-US on Sunday, pl, de, en-GB on Monday. `firstDayOfWeek` (1 = Monday … 7 = Sunday) overrides it;
|
|
87
|
+
the headers, the grid and `Home`/`End` follow it.
|
|
88
|
+
- `displayFormat`: `'pl'` (DD.MM.YYYY, default), `'iso'` (YYYY-MM-DD) or `'locale'` — order and separators
|
|
89
|
+
from `Intl` (en-US: MM/DD/YYYY). The placeholder follows the format and its letters follow the language
|
|
90
|
+
(EN `YYYY`, PL `RRRR`, the `datepicker.yearToken`/`monthToken`/`dayToken` keys). AM/PM come from `Intl`.
|
|
91
|
+
- The field is `role="combobox"` with `aria-haspopup="dialog"` (the APG select-only combobox), so it carries
|
|
92
|
+
`aria-required` (`required`), `aria-readonly` (`readonly` — the value shows, the panel does not open,
|
|
93
|
+
there is no clear button) and `aria-invalid`.
|
|
94
|
+
- Turning the page with ‹ › is announced (`aria-live="polite"`); the title buttons are named
|
|
95
|
+
"October, Choose month" — the visible text first (WCAG 2.5.3). Clearing the value counts as a touch.
|
|
96
|
+
- "Today" is computed on every open, so a panel opened after midnight marks the right day.
|
|
97
|
+
- The clock (`kpt-clock`): the hour and minute segments are `role="spinbutton"` — `↑`/`↓` by one (minutes by
|
|
98
|
+
`minuteStep`), `PageUp`/`PageDown` by five, `Home`/`End` to the bounds — so every minute is reachable from
|
|
99
|
+
the keyboard, not only the five-minute marks.
|
|
100
|
+
|
|
84
101
|
## Label and description
|
|
85
102
|
`id` goes to the focusable element — the host never carries it; without one it is generated. A `div`
|
|
86
103
|
with a role is not named by `label[for]`, so inside `kpt-form-field` it gets `aria-labelledby`
|
package/src/lib/dialog/llms.txt
CHANGED
|
@@ -94,3 +94,6 @@ box, so with `bottom: 0` a sliver of content would slide underneath the bar.
|
|
|
94
94
|
close. With `header` the dialog is named by its `<h2>` (`aria-labelledby`); without it pass
|
|
95
95
|
`ariaLabel`. `alert` + `ariaDescribedby` make it an alert dialog whose message is read out on
|
|
96
96
|
open — `kpt-confirm-container` uses exactly that.
|
|
97
|
+
|
|
98
|
+
## Scrolling and non-dismissible windows
|
|
99
|
+
An open window locks page scrolling underneath (a shared counter with drawers and bottom sheets, so nested windows do not release each other). With `dismissible` off the window gets `closedby="none"`, and if a browser still closes it on a gesture (Chromium lets the second Escape in a row through `cancel`), it is reopened — only code can close it.
|
package/src/lib/divider/llms.txt
CHANGED
|
@@ -9,6 +9,7 @@ Import: `import { KptDivider } from '@konce-pt/angular';`
|
|
|
9
9
|
## Inputs
|
|
10
10
|
- `orientation`: 'horizontal' | 'vertical' (default 'horizontal')
|
|
11
11
|
- `inset`: boolean — inset from the container edges
|
|
12
|
+
- `decorative`: boolean — a purely ornamental line (e.g. between cards that are regions anyway): no `role="separator"`, hidden from screen readers
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
<kpt-divider />
|
package/src/lib/drawer/llms.txt
CHANGED
|
@@ -30,3 +30,6 @@ is named by its `header` through `aria-labelledby`. The shared helper is `shared
|
|
|
30
30
|
|
|
31
31
|
## Tokens
|
|
32
32
|
The panel `--kpt-color-surface-raised`, `--kpt-elevation-4`; the backdrop `--kpt-color-overlay-scrim`.
|
|
33
|
+
|
|
34
|
+
## Name and scrolling
|
|
35
|
+
Without `header` give the panel `ariaLabel` — a `role="dialog"` without a name is announced as a bare "dialog". An open drawer locks page scrolling underneath.
|
|
@@ -32,3 +32,6 @@ The file list shows the name, the size and a remove button.
|
|
|
32
32
|
## Tokens
|
|
33
33
|
The zone `--kpt-color-border-strong` (dashed), hover / dragover `--kpt-color-primary`, error `--kpt-color-danger`,
|
|
34
34
|
focus ring `--kpt-color-focus-ring`.
|
|
35
|
+
|
|
36
|
+
## Read-only and required
|
|
37
|
+
`readonly` shows the list without the remove buttons and does not open the picker nor accept a drop. The zone takes `id` and `ariaLabel` and is linked to `kpt-form-field` (label and description); `button` accepts neither `aria-invalid` nor `aria-required`, so the error is the linked message. The hint is plain text: `fileUpload.hint` with `{action}` and `fileUpload.hintAction` (bold) — dictionaries no longer carry HTML. The remove button names the file.
|
package/src/lib/i18n/llms.txt
CHANGED
|
@@ -39,3 +39,10 @@ The contract (`KptMessages`), the base EN/PL dictionaries and the translation co
|
|
|
39
39
|
live in `@konce-pt/i18n` — a pure-TypeScript package with no framework dependency, shared with the React port
|
|
40
40
|
so both render identical labels. `@konce-pt/angular` re-exports all of it, so the imports above stay unchanged;
|
|
41
41
|
you never need to install `@konce-pt/i18n` yourself.
|
|
42
|
+
|
|
43
|
+
## Runtime dictionaries, keys and the page language
|
|
44
|
+
`registerMessages()` after start-up (a lazily loaded JSON) repaints the components at once, also for the
|
|
45
|
+
active language. `t()` accepts `KptMessageKey` (the base dictionary's dotted keys, with editor
|
|
46
|
+
completion) or any string; a key found in no dictionary returns the key itself and, in a dev build,
|
|
47
|
+
warns once in the console. The library does not set `<html lang>` — set it yourself together with the
|
|
48
|
+
language, so a screen reader reads the labels with the right pronunciation.
|
package/src/lib/icon/llms.txt
CHANGED
|
@@ -25,7 +25,7 @@ adjustments-horizontal, sun, moon, bell, settings, users, user-circle, logout, l
|
|
|
25
25
|
layout-dashboard, home, activity, cube, shopping-cart, currency-dollar, arrow-left
|
|
26
26
|
arrow-right, arrow-up-right, arrow-down-right, chart-bar, chart-line, filter, download
|
|
27
27
|
refresh, dots, brand-github, brand-google, layout-grid, grid-dots, checks, paperclip
|
|
28
|
-
send, message-circle, corner-up-left, mood-smile, device-floppy, arrow-back-up, printer
|
|
28
|
+
send, message-circle, corner-up-left, mood-smile, device-floppy, arrow-back-up, printer, selector
|
|
29
29
|
|
|
30
30
|
These cover both what the components themselves draw and the staples of an application shell
|
|
31
31
|
(theme, notifications, account, navigation, KPI). A typical admin panel needs nothing else.
|
|
@@ -29,3 +29,6 @@ error is added to `aria-describedby`, so `controlId` is not needed. Without a wr
|
|
|
29
29
|
|
|
30
30
|
## Tokens
|
|
31
31
|
The field uses `--kpt-form-field-*`.
|
|
32
|
+
|
|
33
|
+
## Read-only and required
|
|
34
|
+
`readonly` is the native read-only field. The caret stays where you typed: fixing a digit in the middle of a phone number no longer throws it to the end. The `a` and `*` tokens accept every letter (`ą`, `ł`, `ß`), not only ASCII.
|
|
@@ -13,7 +13,8 @@ Import: `import { KptInputNumber } from '@konce-pt/angular';`
|
|
|
13
13
|
- `suffix`: string (e.g. ' %'); `placeholder`: string
|
|
14
14
|
- `showButtons`: boolean (default `true`) — `false` hides the `−`/`+` arrows; the field content
|
|
15
15
|
then aligns left, as in `kpt-input` (the `.kpt-input-number--plain` modifier)
|
|
16
|
-
- `disabled`/`invalid`/`touched`: boolean; `touch`: output
|
|
16
|
+
- `disabled`/`readonly`/`invalid`/`touched`: boolean; `touch`: output. `readonly` (also from `readonly()` in
|
|
17
|
+
the schema) leaves the value selectable but blocks typing, the arrows and the buttons (`aria-readonly`)
|
|
17
18
|
|
|
18
19
|
## Example
|
|
19
20
|
<kpt-input-number [formField]="f.qty" [step]="1" />
|
|
@@ -65,7 +66,9 @@ gate the validators. The full submit flow: `## A form from scratch (Signal Forms
|
|
|
65
66
|
## Keyboard
|
|
66
67
|
The field is `role="spinbutton"` with `aria-valuemin`/`aria-valuemax`/`aria-valuenow` (and
|
|
67
68
|
`aria-valuetext` with the `suffix`, "5 pcs"). `↑`/`↓` change the value by `step`,
|
|
68
|
-
`PageUp`/`PageDown` by ten steps; stepping is rounded to the precision of `step
|
|
69
|
+
`PageUp`/`PageDown` by ten steps; stepping is rounded to the precision of `step` or of the current
|
|
70
|
+
value, whichever is finer (`1.25` + 1 gives `2.25`, not `2`). Only a plain decimal is accepted while
|
|
71
|
+
typing — `0x1A`, `1e3` and `Infinity` are ignored. A typed value is
|
|
69
72
|
**not** clamped while typing ("150" with `max` 99 stays "150", so the form's `max()` can report it) —
|
|
70
73
|
it is clamped on blur. The `−`/`+` buttons sit outside the Tab order and do not take focus from the
|
|
71
74
|
field, so focus never drops to `<body>` when a button goes disabled at a limit.
|
|
@@ -31,3 +31,14 @@ first cell (clicking the label starts at the beginning), and each cell is named
|
|
|
31
31
|
|
|
32
32
|
## Tokens
|
|
33
33
|
The boxes use `--kpt-form-field-*`.
|
|
34
|
+
|
|
35
|
+
## Read-only and required
|
|
36
|
+
`readonly` shows the code but blocks typing and paste; `required` sets `aria-required` on the cells (`group` does not accept it). The value holds the typed characters **without gaps**: clearing a middle cell gives `"13"`, not `"1 3"`, while the cell itself stays empty on screen.
|
|
37
|
+
|
|
38
|
+
## Groups
|
|
39
|
+
`groupSize` (default `0` = no groups) inserts a separator after every N boxes, counted from the
|
|
40
|
+
left; `groupSeparator` sets the character (default `–`). With `length` 9 and `groupSize` 3 you get
|
|
41
|
+
`[][][]–[][][]–[][][]`. The separator is purely visual (`aria-hidden`): the value is the bare characters
|
|
42
|
+
(`"123456789"`), each box keeps its name "Character 4 of 9", and arrows/Backspace jump over it.
|
|
43
|
+
|
|
44
|
+
<kpt-input-otp [formField]="f.code" [length]="9" groupSize="3" integerOnly />
|
package/src/lib/knob/llms.txt
CHANGED
|
@@ -10,7 +10,8 @@ Import: `import { KptKnob } from '@konce-pt/angular';`
|
|
|
10
10
|
(FORM_FIELD_UNSUPPORTED_BINDING); bind them directly only together with `[(value)]`.
|
|
11
11
|
- `size`: px (default 96); `stroke`: px (10); `suffix`: string
|
|
12
12
|
- `showValue`: boolean (default true)
|
|
13
|
-
- `disabled`/`invalid`/`touched`: boolean; `touch`: output
|
|
13
|
+
- `disabled`/`readonly`/`invalid`/`touched`: boolean; `touch`: output. `readonly` (also from `readonly()` in
|
|
14
|
+
the schema) keeps the knob focusable but ignores the pointer and the keys (`aria-readonly`)
|
|
14
15
|
|
|
15
16
|
## Motion
|
|
16
17
|
A jump in value — an arrow key, Home/End, a click on the arc, a change from outside — moves the arc
|
|
@@ -20,7 +21,8 @@ delay, so it never feels laggy. `prefers-reduced-motion: reduce` turns the anima
|
|
|
20
21
|
select the number or the arc.
|
|
21
22
|
|
|
22
23
|
## Accessibility
|
|
23
|
-
`role="slider"` + aria-valuemin/max/now; arrow keys, Home/End.
|
|
24
|
+
`role="slider"` + aria-valuemin/max/now; arrow keys, PageUp/PageDown (ten steps), Home/End. Values sit on
|
|
25
|
+
the grid `min + k·step` for both the pointer and the keys — with `min=1, step=2` that is 1, 3, 5…
|
|
24
26
|
|
|
25
27
|
## Example
|
|
26
28
|
<kpt-knob [formField]="f.level" [step]="5" /> <!-- bounds from min()/max() in form() -->
|
package/src/lib/listbox/llms.txt
CHANGED
|
@@ -30,3 +30,6 @@ label (unless `ariaLabel` is set) and the hint or error in `aria-describedby`. N
|
|
|
30
30
|
|
|
31
31
|
## Tokens
|
|
32
32
|
The frame `--kpt-form-field-*`; selection `--kpt-color-primary`.
|
|
33
|
+
|
|
34
|
+
## Read-only and required
|
|
35
|
+
`readonly` lets you move through the list and read the choice but not change it (`aria-readonly`). With `multiple`, `Shift+↑/↓` selects the option focus moves to and `Shift+click` adds the range from the last clicked option (APG). The empty message sits next to the list.
|
|
@@ -41,3 +41,14 @@ columns carry `aria-haspopup="menu"`, `aria-expanded` and `aria-controls`. The p
|
|
|
41
41
|
`role="menu"` named after the open item, each column is `role="group"` named by its title
|
|
42
42
|
(`aria-labelledby`), and links are `role="menuitem"`. A top item without columns acts as an action:
|
|
43
43
|
it emits `selected` instead of opening an empty panel, and has no caret.
|
|
44
|
+
|
|
45
|
+
## Router
|
|
46
|
+
Links are plain `<a href>`, so without a router a click reloads the page. `navigate` fires on a plain
|
|
47
|
+
click (left button, no Ctrl/⌘/Shift, no `target="_blank"`) with `{ item, url, event }`: call
|
|
48
|
+
`event.preventDefault()` and navigate with your router. Modified clicks stay native (a new tab, a new
|
|
49
|
+
window). The library depends on no router.
|
|
50
|
+
|
|
51
|
+
<kpt-megamenu [items]="items" (navigate)="$event.event.preventDefault(); router.navigateByUrl($event.url)" />
|
|
52
|
+
|
|
53
|
+
## When to use it
|
|
54
|
+
The `menubar`/`menu` roles switch a screen reader into application mode: page navigation by headings and links stops, and arrow keys are expected. That fits an application menu (File, Edit, View) or a large product menu. For plain site navigation (a few links in a header) the WAI-ARIA APG recommends the disclosure pattern instead — a `<nav>` with buttons carrying `aria-expanded` and ordinary link lists — which you can build from `kpt-button` and lists. The menu does not render a third level: nested `items` of a submenu item are ignored.
|
package/src/lib/menubar/llms.txt
CHANGED
|
@@ -40,3 +40,14 @@ The bar is `role="menubar"` with `aria-orientation="horizontal"`, named by `aria
|
|
|
40
40
|
with a submenu carry `aria-haspopup="menu"`, `aria-expanded` and (while open) `aria-controls`; each
|
|
41
41
|
submenu is `role="menu"` named after its top item. The bar is a plain `<div>`, not `<nav>` — wrap
|
|
42
42
|
it in your own `<nav aria-label="…">` when it is the site navigation.
|
|
43
|
+
|
|
44
|
+
## Router
|
|
45
|
+
Links are plain `<a href>`, so without a router a click reloads the page. `navigate` fires on a plain
|
|
46
|
+
click (left button, no Ctrl/⌘/Shift, no `target="_blank"`) with `{ item, url, event }`: call
|
|
47
|
+
`event.preventDefault()` and navigate with your router. Modified clicks stay native (a new tab, a new
|
|
48
|
+
window). The library depends on no router.
|
|
49
|
+
|
|
50
|
+
<kpt-menubar [items]="items" (navigate)="$event.event.preventDefault(); router.navigateByUrl($event.url)" />
|
|
51
|
+
|
|
52
|
+
## When to use it
|
|
53
|
+
The `menubar`/`menu` roles switch a screen reader into application mode: page navigation by headings and links stops, and arrow keys are expected. That fits an application menu (File, Edit, View) or a large product menu. For plain site navigation (a few links in a header) the WAI-ARIA APG recommends the disclosure pattern instead — a `<nav>` with buttons carrying `aria-expanded` and ordinary link lists — which you can build from `kpt-button` and lists. The menu does not render a third level: nested `items` of a submenu item are ignored.
|
|
@@ -35,3 +35,6 @@ The list is named after `header` (`aria-label`) and the selected item carries `a
|
|
|
35
35
|
Both buttons are labelled from the dictionary and go disabled while nothing is selected. Native
|
|
36
36
|
HTML5 drag and drop has no keyboard equivalent — `Alt`+arrows and the buttons cover it, and
|
|
37
37
|
`dragdrop` adds to them, it never replaces them.
|
|
38
|
+
|
|
39
|
+
## Announcements
|
|
40
|
+
Every reorder (buttons, Alt+↑/↓, drag and drop) is announced in a polite live region: `orderList.moved` with `{position}` and `{total}` — focus does not move, so a screen reader would not hear the new place otherwise.
|
|
@@ -13,7 +13,11 @@ Import: `import { KptPassword } from '@konce-pt/angular';`
|
|
|
13
13
|
- `disabled`/`invalid`/`touched`: boolean; `touch`: output
|
|
14
14
|
|
|
15
15
|
## Password strength
|
|
16
|
-
A 0–4 score
|
|
16
|
+
A 0–4 score. The score follows length first, not composition rules (NIST SP 800-63B advises against them): an
|
|
17
|
+
approximate entropy over the character classes actually used, cut for repeats (`aaaa`), sequences
|
|
18
|
+
(`abcd`, `1234`, `qwerty`) and the "Word + digits + symbol" shape. `Password1!` is weak, thirty
|
|
19
|
+
lowercase letters are strong, and `ą`/`ż` are letters, not special characters. There is no
|
|
20
|
+
dictionary — it is a hint, not a security control. Colors: danger→warning→info→success.
|
|
17
21
|
|
|
18
22
|
## Example
|
|
19
23
|
<kpt-password [formField]="f.password" feedback />
|
package/src/lib/peek/llms.txt
CHANGED
|
@@ -34,7 +34,7 @@ travel from the trigger to the card, so entering the card cancels the close. Foc
|
|
|
34
34
|
delay (a keyboard does not sweep across elements by accident). A click, Enter or a tap **pins** the
|
|
35
35
|
card: it stays after the pointer leaves and focus moves inside it. That is the only route to the
|
|
36
36
|
card's content where there is no hover at all, so interactive content stays reachable on touch and
|
|
37
|
-
from the keyboard. Escape closes it and hands focus back to the trigger; so does a click outside.
|
|
37
|
+
from the keyboard. Escape closes it and hands focus back to the trigger; so does a click outside. Escape on the trigger itself closes a card opened by hover or focus without moving focus (WCAG 1.4.13); with the card closed the key passes through to an enclosing dialog.
|
|
38
38
|
|
|
39
39
|
## Accessibility
|
|
40
40
|
The trigger keeps its own role (a link stays a link) and carries `aria-expanded` plus
|
|
@@ -41,3 +41,6 @@ Each list is named after its header (`aria-label`). The four move buttons are la
|
|
|
41
41
|
dictionary, so "move all right" is distinguishable from "move right" without seeing the double
|
|
42
42
|
chevron. Native HTML5 drag and drop has no keyboard equivalent — `Enter` and the buttons cover
|
|
43
43
|
everything it does, and `dragdrop` adds to them, it never replaces them.
|
|
44
|
+
|
|
45
|
+
## Announcements and buttons
|
|
46
|
+
A transfer between the lists is announced in a polite live region: `pickList.moved` with `{count}` and `{list}` (the target header). The move buttons carry `aria-disabled` when there is nothing to move (no selection, empty list) — they stay focusable, so focus does not drop to `<body>` when the selection clears after a move.
|
package/src/lib/popover/llms.txt
CHANGED
|
@@ -26,3 +26,6 @@ a modal.
|
|
|
26
26
|
|
|
27
27
|
## Tokens
|
|
28
28
|
`--kpt-color-surface-raised`, `--kpt-elevation-3`.
|
|
29
|
+
|
|
30
|
+
## Name and Escape
|
|
31
|
+
Give the panel `ariaLabel` — it is a `role="dialog"`. Escape closes only the top-most panel and does not reach an enclosing `<dialog>`, so a popover inside a dialog closes alone.
|