@konce-pt/angular 0.11.2 → 0.14.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +792 -333
  2. package/README.md +111 -55
  3. package/charts/src/lib/llms.txt +23 -15
  4. package/chat/src/lib/llms.txt +68 -33
  5. package/fesm2022/konce-pt-angular-charts.mjs +149 -68
  6. package/fesm2022/konce-pt-angular-charts.mjs.map +1 -1
  7. package/fesm2022/konce-pt-angular-chat.mjs +296 -135
  8. package/fesm2022/konce-pt-angular-chat.mjs.map +1 -1
  9. package/fesm2022/konce-pt-angular-grid.mjs +16 -16
  10. package/fesm2022/konce-pt-angular-grid.mjs.map +1 -1
  11. package/fesm2022/konce-pt-angular-icons.mjs +5 -5
  12. package/fesm2022/konce-pt-angular-icons.mjs.map +1 -1
  13. package/fesm2022/konce-pt-angular-map.mjs +360 -293
  14. package/fesm2022/konce-pt-angular-map.mjs.map +1 -1
  15. package/fesm2022/konce-pt-angular-roadmap.mjs +120 -34
  16. package/fesm2022/konce-pt-angular-roadmap.mjs.map +1 -1
  17. package/fesm2022/konce-pt-angular.mjs +7117 -3373
  18. package/fesm2022/konce-pt-angular.mjs.map +1 -1
  19. package/grid/src/lib/llms.txt +18 -18
  20. package/map/src/lib/llms.txt +142 -140
  21. package/package.json +14 -12
  22. package/roadmap/src/lib/llms.txt +37 -27
  23. package/src/lib/accordion/llms.txt +18 -6
  24. package/src/lib/alert/llms.txt +5 -4
  25. package/src/lib/app-shell/llms.txt +25 -22
  26. package/src/lib/auth/llms.txt +26 -22
  27. package/src/lib/autocomplete/llms.txt +18 -4
  28. package/src/lib/avatar/llms.txt +3 -3
  29. package/src/lib/avatar-group/llms.txt +5 -5
  30. package/src/lib/backdrop/llms.txt +35 -35
  31. package/src/lib/badge/llms.txt +7 -7
  32. package/src/lib/bottom-sheet/llms.txt +6 -3
  33. package/src/lib/breadcrumb/llms.txt +9 -1
  34. package/src/lib/breakpoint/llms.txt +8 -8
  35. package/src/lib/button/llms.txt +26 -18
  36. package/src/lib/button-group/llms.txt +40 -31
  37. package/src/lib/card/llms.txt +19 -19
  38. package/src/lib/carousel/llms.txt +6 -6
  39. package/src/lib/checkbox/llms.txt +17 -2
  40. package/src/lib/chip/llms.txt +6 -6
  41. package/src/lib/chips-input/llms.txt +14 -4
  42. package/src/lib/color-picker/llms.txt +7 -4
  43. package/src/lib/confirm/llms.txt +9 -3
  44. package/src/lib/context-menu/llms.txt +7 -4
  45. package/src/lib/data-table/llms.txt +280 -227
  46. package/src/lib/data-view/llms.txt +25 -4
  47. package/src/lib/date-range/llms.txt +37 -18
  48. package/src/lib/datepicker/llms.txt +46 -29
  49. package/src/lib/dialog/llms.txt +29 -26
  50. package/src/lib/divider/llms.txt +2 -1
  51. package/src/lib/drawer/llms.txt +9 -6
  52. package/src/lib/empty/llms.txt +4 -4
  53. package/src/lib/fab/llms.txt +6 -2
  54. package/src/lib/fieldset/llms.txt +22 -4
  55. package/src/lib/file-upload/llms.txt +3 -0
  56. package/src/lib/form-field/llms.txt +33 -19
  57. package/src/lib/galleria/llms.txt +3 -3
  58. package/src/lib/i18n/llms.txt +15 -8
  59. package/src/lib/icon/llms.txt +9 -9
  60. package/src/lib/icon-button/llms.txt +8 -3
  61. package/src/lib/image/llms.txt +4 -4
  62. package/src/lib/input/llms.txt +21 -7
  63. package/src/lib/input-mask/llms.txt +5 -2
  64. package/src/lib/input-number/llms.txt +18 -15
  65. package/src/lib/input-otp/llms.txt +15 -4
  66. package/src/lib/knob/llms.txt +14 -7
  67. package/src/lib/listbox/llms.txt +8 -5
  68. package/src/lib/loader/llms.txt +72 -0
  69. package/src/lib/megamenu/llms.txt +16 -5
  70. package/src/lib/mention/llms.txt +15 -15
  71. package/src/lib/menu/llms.txt +12 -12
  72. package/src/lib/menubar/llms.txt +16 -5
  73. package/src/lib/meter-group/llms.txt +7 -7
  74. package/src/lib/order-list/llms.txt +20 -5
  75. package/src/lib/paginator/llms.txt +5 -5
  76. package/src/lib/panel/llms.txt +20 -8
  77. package/src/lib/password/llms.txt +17 -5
  78. package/src/lib/peek/llms.txt +11 -11
  79. package/src/lib/pick-list/llms.txt +28 -5
  80. package/src/lib/popover/llms.txt +9 -6
  81. package/src/lib/progress/llms.txt +16 -16
  82. package/src/lib/radio-group/llms.txt +13 -3
  83. package/src/lib/rating/llms.txt +13 -6
  84. package/src/lib/rich-text/llms.txt +42 -24
  85. package/src/lib/scroll-top/llms.txt +3 -3
  86. package/src/lib/select/llms.txt +23 -13
  87. package/src/lib/sidenav/llms.txt +8 -8
  88. package/src/lib/slider/llms.txt +23 -7
  89. package/src/lib/speech/llms.txt +108 -0
  90. package/src/lib/speed-dial/llms.txt +9 -3
  91. package/src/lib/spinner/llms.txt +2 -2
  92. package/src/lib/split-button/llms.txt +14 -8
  93. package/src/lib/splitter/llms.txt +8 -8
  94. package/src/lib/stepper/llms.txt +26 -7
  95. package/src/lib/switch/llms.txt +13 -3
  96. package/src/lib/switch-group/llms.txt +12 -9
  97. package/src/lib/tabs/llms.txt +7 -4
  98. package/src/lib/textarea/llms.txt +16 -5
  99. package/src/lib/timeline/llms.txt +1 -1
  100. package/src/lib/toast/llms.txt +36 -5
  101. package/src/lib/toolbar/llms.txt +3 -3
  102. package/src/lib/tooltip/llms.txt +13 -10
  103. package/src/lib/tree/llms.txt +19 -5
  104. package/src/lib/update/llms.txt +52 -0
  105. package/types/konce-pt-angular-charts.d.ts +11 -0
  106. package/types/konce-pt-angular-charts.d.ts.map +1 -1
  107. package/types/konce-pt-angular-chat.d.ts +98 -40
  108. package/types/konce-pt-angular-chat.d.ts.map +1 -1
  109. package/types/konce-pt-angular-grid.d.ts +14 -14
  110. package/types/konce-pt-angular-icons.d.ts +3 -3
  111. package/types/konce-pt-angular-map.d.ts +147 -119
  112. package/types/konce-pt-angular-map.d.ts.map +1 -1
  113. package/types/konce-pt-angular-roadmap.d.ts +34 -9
  114. package/types/konce-pt-angular-roadmap.d.ts.map +1 -1
  115. package/types/konce-pt-angular.d.ts +1774 -651
  116. package/types/konce-pt-angular.d.ts.map +1 -1
@@ -0,0 +1,72 @@
1
+ # KptLoader (kpt-loader)
2
+
3
+ A loader with character: a loop in one of six materials that, when the work ends, turns into a
4
+ result mark instead of disappearing. Import: `import { KptLoader } from '@konce-pt/angular';`
5
+
6
+ Use `kpt-spinner` for a small inline "wait" (in a button, next to a label). Use `kpt-loader` where
7
+ the waiting itself is the content - an empty panel, an upload, a save that ends in "Done".
8
+
9
+ ## Variants
10
+ - `bubbles` (default) - four drops orbit, merge and splash; the result: one drop grows into the mark.
11
+ - `bridge` - a drop flies through a row of dots, joined to each by a liquid bridge; the result: a
12
+ pill with the mark and `successLabel` / `errorLabel` written in it.
13
+ - `shapes` - one shape morphs into the next (cookie, clover, pill, sun...) with a springy turn; the
14
+ result: a circle (success) or a rounded square (error).
15
+ - `ring` - a ring with a wave; draws progress; takes content (an icon) in its centre.
16
+ - `wave` - a progress bar drawn as a wave; draws progress; the result bends the line into the mark.
17
+ - `bounce` - three bubbles jump with squash and shadow; the result: a joint jump and a landing.
18
+
19
+ ## Inputs
20
+ - `variant`: KptLoaderVariant (default 'bubbles')
21
+ - `status`: 'loading' | 'success' | 'error' (default 'loading') - `success` / `error` play the
22
+ result and the mark stays; going back to `loading` restarts the loop
23
+ - `value`: number | null (default null), `min` (0), `max` (100) - progress, read by `ring` and
24
+ `wave`; `null` = indeterminate
25
+ - `size`: string (default '5rem') - the CSS length of 100 drawing units; all variants share the
26
+ scale, so side by side their elements have the same size (`wave` is 12rem wide at the default)
27
+ - `colors`: KptLoaderColor[] | null - loop colours: theme roles ('primary', 'info', 'success',
28
+ 'warning', 'danger') or any CSS colour; repeated in order. Without it each variant has its palette
29
+ - `successColor`: KptLoaderColor (default 'success'), `errorColor`: KptLoaderColor (default 'danger')
30
+ - `speed`: number (default 1) - multiplies the loop tempo (the result keeps its own timing)
31
+ - `label`: string - the accessible name while loading; default `loader.label`
32
+ - `successLabel`, `errorLabel`: string - the result text (status region, the `bridge` pill);
33
+ default `loader.success` / `loader.error`. They follow the language live, also after the result
34
+ - `announce`: boolean (default true) - `false` drops the component's own status region (for a
35
+ wrapper that announces the state itself, like `kpt-update`)
36
+
37
+ ## Outputs
38
+ - `settled`: KptLoaderResult - the result choreography has finished (a good moment to hide the
39
+ loader). Not emitted when the loader starts already in a result.
40
+
41
+ ## Content
42
+ Only `ring` renders projected content: centred, 64% of the ring's diameter. With content the
43
+ ring shrinks it during the loop and releases it on success; without content the ring closes and
44
+ draws the mark itself.
45
+
46
+ ## Example
47
+ <kpt-loader />
48
+ <kpt-loader variant="bridge" [status]="saving() ? 'loading' : 'success'" (settled)="done()" />
49
+ <kpt-loader variant="wave" [value]="uploaded()" [max]="total()" />
50
+ <kpt-loader variant="ring" [status]="status()"><kpt-icon name="download" /></kpt-loader>
51
+ <kpt-loader variant="bounce" [colors]="['danger', 'oklch(0.6 0.2 300)']" speed="1.5" />
52
+
53
+ ## Tokens
54
+ Roles resolve to `--kpt-color-<role>`, the mark on a filled shape to `--kpt-color-<role>-contrast`
55
+ (a custom colour gets `--kpt-color-surface`), the `shapes` backdrop to `--kpt-color-<role>-subtle`.
56
+ Tracks use `--kpt-color-border`, the `bounce` shadows `--kpt-color-overlay-scrim`, the pill text
57
+ `--kpt-font-family-sans` and `--kpt-font-weight-semibold`. Colour transitions are multiplied by
58
+ `--kpt-motion-scale`.
59
+
60
+ ## Motion
61
+ The drawing is SVG built by `createLoader` from `@konce-pt/motion` (shared with the React port) and
62
+ played in one `requestAnimationFrame` loop that stops when the loader is off-screen or settled.
63
+ `provideKptMotion({ enabled: false })` and the system "reduce motion" setting give the quiet
64
+ version: the loop slows down instead of stopping (a frozen loader looks like a hung app) and the
65
+ result is the mark in a circle, without choreography. A result that nobody watches (off-screen,
66
+ hidden tab) jumps straight to its final state.
67
+
68
+ ## Accessibility
69
+ The drawing is `aria-hidden`. Next to it sits a visually hidden `.kpt-loader__label` with
70
+ `role="status"`; its text - `label`, then `successLabel` or `errorLabel` - is written a frame after
71
+ the loader appears, so screen readers announce it. While `ring` or `wave` draws progress, the stage
72
+ is a `role="progressbar"` with `aria-valuenow` (0-100) and the `label` as its name.
@@ -1,14 +1,14 @@
1
1
  # KptMegamenu (kpt-megamenu)
2
2
 
3
- A mega menu — a horizontal bar with a wide, multi-column panel.
4
- Structure: a top-level entry → `items` (the columns) → each column's `items` (the links).
3
+ A mega menu - a horizontal bar with a wide, multi-column panel.
4
+ Structure: a top-level entry -> `items` (the columns) -> each column's `items` (the links).
5
5
  The panel sits on CDK Overlay (attached to `body`, never clipped by `overflow: hidden`).
6
6
  Requires `import '@angular/cdk/overlay-prebuilt.css';`
7
7
  Import: `import { KptMegamenu } from '@konce-pt/angular';`
8
8
 
9
9
  ## Inputs / outputs
10
- - `items`: KptMenuItem<T>[] (3 levels: top → columns → links)
11
- - `ariaLabel`: string — the bar's name for screen readers, e.g. "Main menu"
10
+ - `items`: KptMenuItem<T>[] (3 levels: top -> columns -> links)
11
+ - `ariaLabel`: string - the bar's name for screen readers, e.g. "Main menu"
12
12
  - `selected`: KptMenuItem<T> (the clicked link, or a top item without columns)
13
13
 
14
14
  ## Example
@@ -22,7 +22,7 @@ Import: `import { KptMegamenu } from '@konce-pt/angular';`
22
22
 
23
23
  ## Links (`url`)
24
24
  An entry with `url` and no children (and not disabled) renders as a real `<a href>` with the same
25
- look, so the browser handles navigation — opening in a new tab, the status-bar preview. `selected`
25
+ look, so the browser handles navigation - opening in a new tab, the status-bar preview. `selected`
26
26
  still fires before the browser follows the link.
27
27
 
28
28
  ## Tokens
@@ -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/Cmd/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.
@@ -6,19 +6,19 @@ plus mentions.
6
6
  Requires `import '@angular/cdk/overlay-prebuilt.css';` (the card runs on `kpt-peek`)
7
7
  Import: `import { KptMention, KptMentions } from '@konce-pt/angular';`
8
8
 
9
- ## KptMention — inputs
10
- - `item`: `KptMentionItem` — the whole entry at once; the single inputs below win over it
11
- - `id`, `label`, `kind`: string — `kind` lands in `data-kind`, so it can be styled per type
12
- - `prefix`: string (default '@') — an empty string leaves the bare name
13
- - `href`: string | null — with it the mention is a link, without it a button opening the card
14
- - `placement`, `openDelay` — passed to `kpt-peek`
15
- - `disabled`: boolean — no card; the mention stays a plain highlighted word
9
+ ## KptMention - inputs
10
+ - `item`: `KptMentionItem` - the whole entry at once; the single inputs below win over it
11
+ - `id`, `label`, `kind`: string - `kind` lands in `data-kind`, so it can be styled per type
12
+ - `prefix`: string (default '@') - an empty string leaves the bare name
13
+ - `href`: string | null - with it the mention is a link, without it a button opening the card
14
+ - `placement`, `openDelay` - passed to `kpt-peek`
15
+ - `disabled`: boolean - no card; the mention stays a plain highlighted word
16
16
  - projected content = the card
17
17
 
18
- ## KptMentions — inputs
19
- - `text`: string — the content with `@id` or `@[Name with spaces](id)`
20
- - `items`: `readonly KptMentionItem[]` — entries the ids resolve against
21
- - `prefix`, `placement` — passed to every mention
18
+ ## KptMentions - inputs
19
+ - `text`: string - the content with `@id` or `@[Name with spaces](id)`
20
+ - `items`: `readonly KptMentionItem[]` - entries the ids resolve against
21
+ - `prefix`, `placement` - passed to every mention
22
22
  - an `<ng-template>` inside = the card; its context is the item as `$implicit` plus `id` and `label`
23
23
 
24
24
  ## Example
@@ -34,12 +34,12 @@ from `@konce-pt/mention` splits it into segments and the mention is an element t
34
34
  itself. An application does not have to push user-written content through a sanitizer to get
35
35
  mentions out of it.
36
36
 
37
- An id that is not on the list still renders — the label falls back to the id, because a note has to
37
+ An id that is not on the list still renders - the label falls back to the id, because a note has to
38
38
  stay readable after someone leaves the team. Without a card template the mention is a highlighted
39
39
  word, not a button: there is nothing to open, so it does not pretend otherwise.
40
40
 
41
41
  ## The id is what is stored
42
- `id` survives a rename, the label does not — that is why the text carries the id and the name comes
42
+ `id` survives a rename, the label does not - that is why the text carries the id and the name comes
43
43
  from `items`. `@[Anna Kowalska](anna.k)` is the only way to write a name with spaces, and even then
44
44
  the list wins over the label written into the text: data is usually fresher than a note from last
45
45
  month.
@@ -48,12 +48,12 @@ month.
48
48
  `kpt-rich-text` has `mentions`, `mentionLimit` and `(mentioned)`: typing `@` opens the suggestion
49
49
  list, arrows and Enter (or Tab) insert the mention as
50
50
  `<span class="kpt-mention" data-mention="id" contenteditable="false">`. The id survives saving,
51
- and `contenteditable="false"` keeps the mention in one piece — without it the caret would walk into
51
+ and `contenteditable="false"` keeps the mention in one piece - without it the caret would walk into
52
52
  the middle of a surname.
53
53
 
54
54
  ## Tokens
55
55
  The mention is underlined with a **dotted** line: `--kpt-color-primary-border` at rest, darkening
56
- to `--kpt-color-primary` on hover and while the card is open. Dotted, not solid — a solid underline
56
+ to `--kpt-color-primary` on hover and while the card is open. Dotted, not solid - a solid underline
57
57
  would read as a link, and a mention usually leads nowhere, it opens a card. Text
58
58
  `--kpt-color-primary`; a mention without a card `--kpt-color-text` + `--kpt-font-weight-medium` and
59
59
  no line at all, since there is nothing to promise. Focus ring `--kpt-color-focus-ring`. The card
@@ -6,22 +6,22 @@ Import: `import { KptMenu, KptMenuItem } from '@konce-pt/angular';`
6
6
 
7
7
  ## Inputs / outputs
8
8
  - `items`: readonly KptMenuItem[]
9
- - `open`: model<boolean> (default false) — two-way; the panel's open state. Public so the
9
+ - `open`: model<boolean> (default false) - two-way; the panel's open state. Public so the
10
10
  application can own it: closing the menu after navigation, or opening it from a keyboard
11
11
  shortcut, cannot be expressed through `(selected)` alone.
12
- - `selected`: output<KptMenuItem> — emitted only for regular entries (not for headers)
12
+ - `selected`: output<KptMenuItem> - emitted only for regular entries (not for headers)
13
13
 
14
14
  ## KptMenuItem
15
15
  - `label?`, `value?`, `icon?`, `disabled?`, `danger?`, `separator?`
16
- - `description?: string` — a second line of text (an e-mail, a role, an action description)
17
- - `badge?: string | number` — a badge on the right side of the entry; `badgeVariant?: KptBadgeVariant`
16
+ - `description?: string` - a second line of text (an e-mail, a role, an action description)
17
+ - `badge?: string | number` - a badge on the right side of the entry; `badgeVariant?: KptBadgeVariant`
18
18
  (default `primary`). Rendered through `kpt-badge`, so numbers above 99 collapse to `99+`.
19
- - `avatar?: { src?, name?, icon? }` — an avatar on the left (`kpt-avatar`, size `sm`); `name` without `src`
19
+ - `avatar?: { src?, name?, icon? }` - an avatar on the left (`kpt-avatar`, size `sm`); `name` without `src`
20
20
  produces initials. Used in the header row.
21
- - `header?: boolean` — a header row: a non-clickable block of text instead of a menu entry. It holds the
21
+ - `header?: boolean` - a header row: a non-clickable block of text instead of a menu entry. It holds the
22
22
  signed-in user's details (`avatar` + `label` + `description`) or a description of what the menu does. Rendered
23
- as a `<div role="presentation">` — it does not take focus and is not a `menuitem`.
24
- - `items?`, `url?` — used by the menubar / megamenu; an entry with `url` (no children, not disabled) renders as `<a href>`
23
+ as a `<div role="presentation">` - it does not take focus and is not a `menuitem`.
24
+ - `items?`, `url?` - used by the menubar / megamenu; an entry with `url` (no children, not disabled) renders as `<a href>`
25
25
 
26
26
  The `header`, `description`, `badge` and `avatar` fields are honored by `kpt-context-menu` and `kpt-split-button` too.
27
27
 
@@ -44,11 +44,11 @@ The panel `--kpt-color-surface-raised`, `--kpt-elevation-3`; a danger entry `--k
44
44
  descriptions and icons `--kpt-color-on-surface-muted`, `--kpt-font-size-xs`.
45
45
 
46
46
  ## Keyboard
47
- - `↓` / `↑` on the trigger open the menu with focus on the first / last item; a click, `Enter`
47
+ - `ArrowDown` / `ArrowUp` on the trigger open the menu with focus on the first / last item; a click, `Enter`
48
48
  or `Space` opens it on the first.
49
- - Inside: `↓` / `↑` move between items and wrap around, `Home` / `End` jump to the ends;
49
+ - Inside: `ArrowDown` / `ArrowUp` move between items and wrap around, `Home` / `End` jump to the ends;
50
50
  disabled items, separators and headers are skipped.
51
- - `Escape` and `Tab` close the menu, and so does picking an item — focus returns to the trigger.
51
+ - `Escape` and `Tab` close the menu, and so does picking an item - focus returns to the trigger.
52
52
  - Items carry `tabindex="-1"` (roving focus), so an open menu is one Tab stop, not one per item.
53
53
 
54
54
  The logic lives in `menu-keys.ts`, shared with `kpt-split-button`; the other port has a twin file.
@@ -60,5 +60,5 @@ name ("Notifications 4").
60
60
  The trigger gets `aria-haspopup="menu"`, a live `aria-expanded` and, while open, `aria-controls`
61
61
  pointing at the panel. They are placed on the
62
62
  interactive control INSIDE the slot (the projected `<button>`/`<a>`), never on the
63
- `.kpt-menu__trigger` wrapper — giving that wrapper a role would create a nested control and a second
63
+ `.kpt-menu__trigger` wrapper - giving that wrapper a role would create a nested control and a second
64
64
  tab stop, and state attributes on a roleless element violate `aria-allowed-attr`.
@@ -6,8 +6,8 @@ Requires `import '@angular/cdk/overlay-prebuilt.css';`
6
6
  Import: `import { KptMenubar } from '@konce-pt/angular';`
7
7
 
8
8
  ## Inputs / outputs
9
- - `items`: KptMenuItem<T>[] — the top-level entries; submenus live in each entry's `items?`
10
- - `ariaLabel`: string — the bar's name for screen readers, e.g. "Editor menu"
9
+ - `items`: KptMenuItem<T>[] - the top-level entries; submenus live in each entry's `items?`
10
+ - `ariaLabel`: string - the bar's name for screen readers, e.g. "Editor menu"
11
11
  - `selected`: KptMenuItem<T>
12
12
 
13
13
  ## Example
@@ -20,7 +20,7 @@ Import: `import { KptMenubar } from '@konce-pt/angular';`
20
20
 
21
21
  ## Links (`url`)
22
22
  An entry with `url` and no children (and not disabled) renders as a real `<a href>` with the same
23
- look, so the browser handles navigation — opening in a new tab, the status-bar preview. `selected`
23
+ look, so the browser handles navigation - opening in a new tab, the status-bar preview. `selected`
24
24
  still fires before the browser follows the link.
25
25
 
26
26
  ## Tokens
@@ -38,5 +38,16 @@ The bar follows the WAI-ARIA menubar pattern and is a single `Tab` stop (roving
38
38
  ## ARIA
39
39
  The bar is `role="menubar"` with `aria-orientation="horizontal"`, named by `ariaLabel`. Top items
40
40
  with a submenu carry `aria-haspopup="menu"`, `aria-expanded` and (while open) `aria-controls`; each
41
- submenu is `role="menu"` named after its top item. The bar is a plain `<div>`, not `<nav>` — wrap
42
- it in your own `<nav aria-label="…">` when it is the site navigation.
41
+ submenu is `role="menu"` named after its top item. The bar is a plain `<div>`, not `<nav>` - wrap
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/Cmd/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.
@@ -4,12 +4,12 @@ A multi-segment meter group with an optional legend.
4
4
  Import: `import { KptMeterGroup } from '@konce-pt/angular';`
5
5
 
6
6
  ## Inputs
7
- - `values`: KptMeterItem[] — { label, value, color? }
8
- - `max`: number | undefined — the reference total (by default the sum of the values = 100%)
7
+ - `values`: KptMeterItem[] - { label, value, color? }
8
+ - `max`: number | undefined - the reference total (by default the sum of the values = 100%)
9
9
  - `showLegend`: boolean (default true)
10
- - `label`: string — the meter's name; empty = `meterGroup.label`
11
- - `legendValue`: 'percent' | 'value' (default 'percent') — what the legend shows next to each label
12
- - `unit`: string — appended to the values in the legend and in `aria-valuetext` (e.g. 'GB')
10
+ - `label`: string - the meter's name; empty = `meterGroup.label`
11
+ - `legendValue`: 'percent' | 'value' (default 'percent') - what the legend shows next to each label
12
+ - `unit`: string - appended to the values in the legend and in `aria-valuetext` (e.g. 'GB')
13
13
 
14
14
  ## Example
15
15
  <kpt-meter-group [values]="[{label:'Used', value:70}, {label:'Free', value:30}]" />
@@ -19,7 +19,7 @@ Segments: the `--kpt-color-{primary,info,success,warning,danger}` palette or a c
19
19
 
20
20
  ## Accessibility
21
21
  The track is `role="meter"` named by `label` (or `meterGroup.label`), with `aria-valuemin="0"`,
22
- `aria-valuenow` set to the sum and `aria-valuemax` set to the real total — `max`, or the sum without
23
- it. `aria-valuetext` spells out the split (“Photos 42 GB, Videos 28 GB, …”), so the segments reach
22
+ `aria-valuenow` set to the sum and `aria-valuemax` set to the real total - `max`, or the sum without
23
+ it. `aria-valuetext` spells out the split ("Photos 42 GB, Videos 28 GB, ..."), so the segments reach
24
24
  the screen reader even with the legend hidden. Keep the legend visible anyway: it is the text
25
25
  alternative to the colours.
@@ -6,9 +6,10 @@ The item template comes through projection: `<ng-template let-item>`.
6
6
  Import: `import { KptOrderList } from '@konce-pt/angular';`
7
7
 
8
8
  ## Inputs / model
9
- - `items`: model<T[]> (two-way — returns the new order)
9
+ - `items`: model<T[]> (two-way - returns the new order)
10
10
  - `header`: string
11
- - `dragdrop`: boolean, default false — enables dragging (opt-in, nothing changes without it)
11
+ - `dragdrop`: boolean, default false - enables dragging (opt-in, nothing changes without it)
12
+ - `layoutMotion`: `'spring' | 'arc' | 'morph' | 'none'` (default from `provideKptMotion`, else `spring`) - see below
12
13
 
13
14
  ## Example
14
15
  <kpt-order-list [(items)]="tasks" header="Order" dragdrop>
@@ -20,18 +21,32 @@ Dropping onto a row puts the dragged item at that row's position and everything
20
21
  the buttons keep swapping with the neighbour. Dropping on the empty part of the list appends at the
21
22
  end. Either way the selection follows the item, so the next button press moves the same entry.
22
23
 
24
+ ## Reorder motion
25
+ `layoutMotion` animates a reorder made by the user (buttons, `Alt`+ArrowUp/ArrowDown, dragging):
26
+ - `spring` - the moved item glides to its new place on a spring;
27
+ - `arc` - the moved item lifts (shadow) and lands, above its neighbours;
28
+ - `morph` - the browser's own morph (View Transitions); without support the change is instant;
29
+ - `none` - no motion.
30
+
31
+ Neighbours always make room with a calm spring, and the list scrolls to keep the moved item in
32
+ view. With no value it takes `layout` from `provideKptMotion` (default `spring`); `enabled: false` and the
33
+ system "reduce motion" setting always win. A list replaced from outside (`[items]`) switches instantly.
34
+
23
35
  ## Tokens
24
36
  Selection `--kpt-color-primary`; buttons `--kpt-color-surface-raised`.
25
37
 
26
38
  ## Keyboard
27
39
  The list is a `listbox` with a single Tab stop (roving tabindex), and the selection follows focus:
28
- - `↓` / `↑` select the next / previous item (wrapping), `Home` / `End` the first / last;
29
- - `Alt`+`↑` / `Alt`+`↓` move the selected item one place up / down — focus travels with it, so
40
+ - `ArrowDown` / `ArrowUp` select the next / previous item (wrapping), `Home` / `End` the first / last;
41
+ - `Alt`+`ArrowUp` / `Alt`+`ArrowDown` move the selected item one place up / down - focus travels with it, so
30
42
  repeated presses keep moving the same entry.
31
43
  The up / down buttons stay and act on the same selection.
32
44
 
33
45
  ## Accessibility
34
46
  The list is named after `header` (`aria-label`) and the selected item carries `aria-selected`.
35
47
  Both buttons are labelled from the dictionary and go disabled while nothing is selected. Native
36
- HTML5 drag and drop has no keyboard equivalent — `Alt`+arrows and the buttons cover it, and
48
+ HTML5 drag and drop has no keyboard equivalent - `Alt`+arrows and the buttons cover it, and
37
49
  `dragdrop` adds to them, it never replaces them.
50
+
51
+ ## Announcements
52
+ Every reorder (buttons, Alt+ArrowUp/ArrowDown, 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.
@@ -6,9 +6,9 @@ A paginator driven by signals. Import: `import { KptPaginator } from '@konce-pt/
6
6
  `kpt-paginator`
7
7
 
8
8
  ## Inputs / models
9
- - `length`: number (required) — the total number of items
10
- - `pageSize`: model<number> (default 10) — two-way
11
- - `pageIndex`: model<number> from 0 (default 0) — two-way
9
+ - `length`: number (required) - the total number of items
10
+ - `pageSize`: model<number> (default 10) - two-way
11
+ - `pageIndex`: model<number> from 0 (default 0) - two-way
12
12
  - `pageSizeOptions`: readonly number[] (default [5,10,20,50])
13
13
 
14
14
  The select always offers the current `pageSize` even when it is absent from this list: without
@@ -18,9 +18,9 @@ A paginator driven by signals. Import: `import { KptPaginator } from '@konce-pt/
18
18
  ## Example
19
19
  <kpt-paginator [length]="total()" [(pageIndex)]="page" [(pageSize)]="size" />
20
20
 
21
- It shows "X–Y of Z", the page size selector and previous/next buttons.
21
+ It shows "X-Y of Z", the page size selector and previous/next buttons.
22
22
  When the length or the size changes it corrects `pageIndex` on its own (an effect).
23
23
 
24
24
  ## i18n
25
25
  The labels ("Rows:", the range separator, the page aria labels) come from i18n (the `paginator` namespace).
26
- English by default; switch or override it through `provideKptI18n` — see `i18n/llms.txt`.
26
+ English by default; switch or override it through `provideKptI18n` - see `i18n/llms.txt`.
@@ -4,24 +4,36 @@ A panel with a header and optional collapsing. Import: `import { KptPanel } from
4
4
 
5
5
  ## Inputs / model
6
6
  - `header`: string
7
- - `toggleable`: boolean — shows the collapse button
7
+ - `toggleable`: boolean - shows the collapse button
8
8
  - `collapsed`: model<boolean> (two-way)
9
- - `animated`: boolean (default true) — the collapse animation (CSS grid, pure CSS)
10
- - `animationDuration`: number (default 500) — animation time in ms
9
+ - `animated`: boolean (default true) - the collapse animation (CSS grid, pure CSS)
10
+ - `animationDuration`: number (default 500) - animation time in ms
11
+ - `collapseMotion`: `'spring' | 'fade' | 'none'` (default from `provideKptMotion`, else `spring`) - see "Collapse motion"
11
12
  - Header actions: the `[kptPanelActions]` projection. Content: `<ng-content>`.
12
13
 
13
14
  ## Example
14
15
  <kpt-panel header="Settings" toggleable>
15
- <button kptPanelActions>…</button>
16
- Content…
16
+ <button kptPanelActions>...</button>
17
+ Content...
17
18
  </kpt-panel>
18
19
 
20
+ ## Collapse motion
21
+ - `spring` - the height opens on a soft spring, the content slides in from above and sharpens out
22
+ of a blur; when collapsing, the content fades first and only then the section closes. The chevron
23
+ turns on a spring.
24
+ - `fade` - the height on the standard curve, the content cross-fades.
25
+ - `none` - the state changes without motion.
26
+
27
+ With no value it takes `collapse` from `provideKptMotion` (default `spring`). `animated: false`, `enabled: false`
28
+ in the config and the system "reduce motion" setting always turn it off. `animationDuration` sets
29
+ the time of every kind. Pure CSS: the kind sits in `data-motion` on the component root.
30
+
19
31
  ## Tokens
20
32
  The header `--kpt-color-surface-variant`; the border `--kpt-color-border`.
21
33
 
22
34
  ## Accessibility
23
35
  The toggle is a native button with `aria-expanded` and `aria-controls` pointing at the body. Its
24
- name says which panel it collapses — `panel.toggleNamed` (“Collapse / expand Settings”) when there
25
- is a `header`, `panel.toggle` otherwise — so several panels on one page are told apart. A collapsed
26
- body is `inert` and `aria-hidden`. The header title is not a heading — add your own when the panel
36
+ name says which panel it collapses - `panel.toggleNamed` ("Collapse / expand Settings") when there
37
+ is a `header`, `panel.toggle` otherwise - so several panels on one page are told apart. A collapsed
38
+ body is `inert` and `aria-hidden`. The header title is not a heading - add your own when the panel
27
39
  should appear in the document outline.
@@ -5,27 +5,39 @@ Import: `import { KptPassword } from '@konce-pt/angular';`
5
5
 
6
6
  ## Inputs / model
7
7
  - `value`: model<string> (or `formField`)
8
- - `feedback`: boolean — shows the strength meter (4 bars + a label)
8
+ - `feedback`: boolean - shows the strength meter (4 bars + a label)
9
9
  - `placeholder`: string
10
- - `id`: string|null — the id of the native field (the host never carries it); generated when absent
11
- - `autocomplete`: string | null = 'current-password' — in sign-up and reset flows set it to
10
+ - `id`: string|null - the id of the native field (the host never carries it); generated when absent
11
+ - `autocomplete`: string | null = 'current-password' - in sign-up and reset flows set it to
12
12
  `new-password`, otherwise the password manager fills in the old password instead of proposing a new one
13
13
  - `disabled`/`invalid`/`touched`: boolean; `touch`: output
14
14
 
15
15
  ## Password strength
16
- A 0–4 score: length ≥8, lower+upper case, a digit, a special character. Colors: danger→warning→info→success.
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 />
20
24
  <kpt-password [(value)]="pass" />
21
25
 
22
26
  ## Label and description
23
- `id` goes to the native field — the host never carries it; without one it is generated. Inside
27
+ `id` goes to the native field - the host never carries it; without one it is generated. Inside
24
28
  `kpt-form-field` the control links itself: the wrapper's `label[for]` points at it and the hint or
25
29
  error is added to `aria-describedby`, so `controlId` is not needed. Without a wrapper, name it with
26
30
  `ariaLabel`. The host no longer carries the `id` (it used to, so `label[for]` pointed at
27
31
  `kpt-password` and the same id existed twice). New: `ariaLabel`, `required`, `readonly`/`readOnly`,
28
32
  `aria-invalid` after touch; with `feedback` the strength label is added to `aria-describedby`.
29
33
 
34
+ ## Motion
35
+ The strength meter fades in when the first character appears; lit segments fill from the start in
36
+ a wave and empty from the end when the score drops, in the colour of the current score; the score label
37
+ enters anew on every change. Turning invalid (after touch) flashes an error ring and shakes the field -
38
+ inside an invalid `kpt-form-field` only the ring, because the wrapper shakes. Follows `enter` from `provideKptMotion`
39
+ (`spring` / `fade` / `none`); nothing moves on first render; `enabled: false` and the system
40
+ "reduce motion" setting always win.
41
+
30
42
  ## Tokens
31
43
  The field `--kpt-form-field-*`; the meter bars `--kpt-color-{danger,warning,info,success}`.
@@ -1,6 +1,6 @@
1
1
  # KptPeek (kpt-peek)
2
2
 
3
- A peek card — content tied to what you are looking at, shown without leaving the text. Hover opens
3
+ A peek card - content tied to what you are looking at, shown without leaving the text. Hover opens
4
4
  it, the card itself is interactive (links, buttons), and a click pins it.
5
5
  Requires `import '@angular/cdk/overlay-prebuilt.css';`
6
6
  Import: `import { KptPeek, KptPeekTrigger } from '@konce-pt/angular';`
@@ -9,17 +9,17 @@ Import: `import { KptPeek, KptPeekTrigger } from '@konce-pt/angular';`
9
9
  - the element carrying the `kptPeekTrigger` attribute = the trigger; everything else = the card
10
10
 
11
11
  ## Inputs / outputs
12
- - `placement`: 'top' | 'bottom' (default 'bottom') — CDK flips it when there is no room
13
- - `openDelay`: number (default 300) — the wait before hover opens the card
14
- - `closeDelay`: number (default 200) — the wait before leaving the trigger closes it
15
- - `disabled`: boolean — the card never opens; the trigger stays a plain link or button
16
- - `label`: string — the card's accessible name; without it the trigger's text is used
17
- - `(opened)`, `(closed)` → `void` — the moment to fetch the card's data
12
+ - `placement`: 'top' | 'bottom' (default 'bottom') - CDK flips it when there is no room
13
+ - `openDelay`: number (default 300) - the wait before hover opens the card
14
+ - `closeDelay`: number (default 200) - the wait before leaving the trigger closes it
15
+ - `disabled`: boolean - the card never opens; the trigger stays a plain link or button
16
+ - `label`: string - the card's accessible name; without it the trigger's text is used
17
+ - `(opened)`, `(closed)` -> `void` - the moment to fetch the card's data
18
18
 
19
19
  ## Example
20
20
  <kpt-peek>
21
21
  <a kptPeekTrigger href="/people/anna">@Anna Kowalska</a>
22
- <kpt-card>Profile, projects, contact…</kpt-card>
22
+ <kpt-card>Profile, projects, contact...</kpt-card>
23
23
  </kpt-peek>
24
24
 
25
25
  ## Which of the three
@@ -29,17 +29,17 @@ modal. `kpt-peek` sits between them: it opens on hover, the card is interactive,
29
29
  covered.
30
30
 
31
31
  ## Hover is not the only way in
32
- Hover opens after `openDelay` and leaving closes after `closeDelay` — the pointer needs time to
32
+ Hover opens after `openDelay` and leaving closes after `closeDelay` - the pointer needs time to
33
33
  travel from the trigger to the card, so entering the card cancels the close. Focus opens it with no
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
41
  `aria-controls` while the card is open. The card is `role="dialog"` with a name from `label` or
42
- the trigger's text. It is not a focus trap — the card is not modal and the page stays usable.
42
+ the trigger's text. It is not a focus trap - the card is not modal and the page stays usable.
43
43
 
44
44
  ## Tokens
45
45
  `--kpt-color-surface-raised`, `--kpt-color-border`, `--kpt-elevation-3`, `--kpt-color-focus-ring`.
@@ -8,7 +8,8 @@ Import: `import { KptPickList } from '@konce-pt/angular';`
8
8
  ## Inputs / model
9
9
  - `source`: model<T[]>; `target`: model<T[]> (both two-way)
10
10
  - `sourceHeader`/`targetHeader`: string
11
- - `dragdrop`: boolean, default false — enables dragging (opt-in, nothing changes without it)
11
+ - `dragdrop`: boolean, default false - enables dragging (opt-in, nothing changes without it)
12
+ - `layoutMotion`: `'spring' | 'arc' | 'morph' | 'none'` (default from `provideKptMotion`, else `spring`) - see below
12
13
 
13
14
  ## Example
14
15
  <kpt-pick-list [(source)]="available" [(target)]="selected" sourceHeader="Available" targetHeader="Selected" dragdrop>
@@ -17,7 +18,7 @@ Import: `import { KptPickList } from '@konce-pt/angular';`
17
18
 
18
19
  ## A double-click moves one item
19
20
  It sends exactly the row you clicked to the other panel and appends it at the end, whatever else is
20
- selected. It does not need `dragdrop` — the two clicks underneath cancel each other out, so the rest
21
+ selected. It does not need `dragdrop` - the two clicks underneath cancel each other out, so the rest
21
22
  of the selection is left alone.
22
23
 
23
24
  ## Where a dragged item lands
@@ -25,19 +26,41 @@ Dropping onto a row puts the dragged item at that row's position: inside one pan
25
26
  across panels it transfers. Dropping on the empty part of a panel appends at the end. An item that
26
27
  leaves a panel also leaves that panel's selection.
27
28
 
29
+ ## Move motion
30
+ `layoutMotion` animates moves and reorders made by the user (buttons, double-click, `Enter`,
31
+ dragging):
32
+ - `spring` - the row glides to its new place on a spring;
33
+ - `arc` - the row lifts (shadow) and flies along an arc, tilted toward the move;
34
+ - `morph` - the browser's own morph (View Transitions); without browser support the move is
35
+ instant, and the transition blocks clicks on the page for ~0.5 s;
36
+ - `none` - no motion.
37
+
38
+ A row crossing to the other list flies as a ghost - a copy above both panels, because the panel's
39
+ `overflow` would clip the real row; the real row waits invisible where it lands. Neighbours close
40
+ the gap or make room with a calm spring. The receiving list scrolls to the last moved row, so the
41
+ landing is visible; rows scrolled out of view do not fly. A click in the middle of a flight starts
42
+ the next one from where the rows are on screen.
43
+
44
+ With no value it takes `layout` from `provideKptMotion` (default `spring`); `enabled: false` there and
45
+ the system "reduce motion" setting always win. Lists replaced from outside (`[source]`, `[target]`) switch
46
+ instantly - the old state has to be measured before the DOM changes.
47
+
28
48
  ## Tokens
29
49
  Selection `--kpt-color-primary`; headers `--kpt-color-surface-variant`.
30
50
 
31
51
  ## Keyboard
32
52
  Each list is a `listbox` with `aria-multiselectable` and a single Tab stop (roving tabindex):
33
- - `↓` / `↑` move between items (wrapping), `Home` / `End` jump to the ends;
53
+ - `ArrowDown` / `ArrowUp` move between items (wrapping), `Home` / `End` jump to the ends;
34
54
  - `Space` toggles the focused item's selection (`aria-selected`), the same as a click;
35
- - `Enter` moves the focused item to the other list, the same as a double-click — focus stays at
55
+ - `Enter` moves the focused item to the other list, the same as a double-click - focus stays at
36
56
  that position in the list, on the next item.
37
57
  The move buttons act on the same selection, so the whole control works without a mouse.
38
58
 
39
59
  ## Accessibility
40
60
  Each list is named after its header (`aria-label`). The four move buttons are labelled from the
41
61
  dictionary, so "move all right" is distinguishable from "move right" without seeing the double
42
- chevron. Native HTML5 drag and drop has no keyboard equivalent — `Enter` and the buttons cover
62
+ chevron. Native HTML5 drag and drop has no keyboard equivalent - `Enter` and the buttons cover
43
63
  everything it does, and `dragdrop` adds to them, it never replaces them.
64
+
65
+ ## Announcements and buttons
66
+ 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.
@@ -1,12 +1,12 @@
1
1
  # KptPopover (kpt-popover)
2
2
 
3
- A popover — arbitrary content in a bubble on CDK Overlay (richer than a tooltip).
3
+ A popover - arbitrary content in a bubble on CDK Overlay (richer than a tooltip).
4
4
  Requires `import '@angular/cdk/overlay-prebuilt.css';`
5
5
  Import: `import { KptPopover } from '@konce-pt/angular';`
6
6
 
7
7
  ## Inputs / model
8
- - `placement`: 'bottom' | 'top' (default 'bottom') — the preferred side; CDK flips it when there is no room
9
- - `open`: model<boolean> (default false) — two-way, so the application can close the bubble from code
8
+ - `placement`: 'bottom' | 'top' (default 'bottom') - the preferred side; CDK flips it when there is no room
9
+ - `open`: model<boolean> (default false) - two-way, so the application can close the bubble from code
10
10
 
11
11
  ## Slots
12
12
  - the element carrying the `kptPopoverTrigger` attribute = the trigger; everything else = the panel
@@ -14,15 +14,18 @@ Import: `import { KptPopover } from '@konce-pt/angular';`
14
14
  ## Example
15
15
  <kpt-popover>
16
16
  <kpt-button kptPopoverTrigger variant="outline">Details</kpt-button>
17
- <div>Rich popover content…</div>
17
+ <div>Rich popover content...</div>
18
18
  </kpt-popover>
19
19
 
20
20
  ## Focus and keyboard
21
21
  The control inside the trigger slot gets `aria-haspopup="dialog"`, a live `aria-expanded` and, while
22
- open, `aria-controls` — on the real `<button>`, not on the wrapper. Opening moves focus to the first
22
+ open, `aria-controls` - on the real `<button>`, not on the wrapper. Opening moves focus to the first
23
23
  interactive element of the bubble; `Escape` or a click outside closes it, and focus returns to the
24
- trigger when it was inside the bubble. Focus is not trapped — the popover is supporting content, not
24
+ trigger when it was inside the bubble. Focus is not trapped - the popover is supporting content, not
25
25
  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.