@konce-pt/angular 0.12.0 → 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.
- package/CHANGELOG.md +591 -369
- package/README.md +111 -55
- package/charts/src/lib/llms.txt +17 -17
- package/chat/src/lib/llms.txt +61 -35
- package/fesm2022/konce-pt-angular-charts.mjs +11 -11
- package/fesm2022/konce-pt-angular-charts.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-chat.mjs +236 -127
- package/fesm2022/konce-pt-angular-chat.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-grid.mjs +16 -16
- package/fesm2022/konce-pt-angular-grid.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-icons.mjs +5 -5
- package/fesm2022/konce-pt-angular-icons.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-map.mjs +308 -280
- package/fesm2022/konce-pt-angular-map.mjs.map +1 -1
- package/fesm2022/konce-pt-angular-roadmap.mjs +23 -23
- package/fesm2022/konce-pt-angular-roadmap.mjs.map +1 -1
- package/fesm2022/konce-pt-angular.mjs +4410 -2128
- package/fesm2022/konce-pt-angular.mjs.map +1 -1
- package/grid/src/lib/llms.txt +18 -18
- package/map/src/lib/llms.txt +142 -141
- package/package.json +14 -12
- package/roadmap/src/lib/llms.txt +27 -27
- package/src/lib/accordion/llms.txt +18 -6
- package/src/lib/alert/llms.txt +5 -5
- package/src/lib/app-shell/llms.txt +23 -21
- package/src/lib/auth/llms.txt +22 -22
- package/src/lib/autocomplete/llms.txt +15 -4
- package/src/lib/avatar/llms.txt +3 -3
- package/src/lib/avatar-group/llms.txt +5 -5
- package/src/lib/backdrop/llms.txt +35 -35
- package/src/lib/badge/llms.txt +7 -7
- package/src/lib/bottom-sheet/llms.txt +4 -4
- package/src/lib/breadcrumb/llms.txt +2 -2
- package/src/lib/breakpoint/llms.txt +8 -8
- package/src/lib/button/llms.txt +26 -18
- package/src/lib/button-group/llms.txt +37 -31
- package/src/lib/card/llms.txt +19 -19
- package/src/lib/carousel/llms.txt +6 -6
- package/src/lib/checkbox/llms.txt +15 -3
- package/src/lib/chip/llms.txt +6 -6
- package/src/lib/chips-input/llms.txt +11 -4
- package/src/lib/color-picker/llms.txt +4 -4
- package/src/lib/confirm/llms.txt +5 -5
- package/src/lib/context-menu/llms.txt +4 -4
- package/src/lib/data-table/llms.txt +280 -239
- package/src/lib/data-view/llms.txt +25 -4
- package/src/lib/date-range/llms.txt +27 -27
- package/src/lib/datepicker/llms.txt +34 -34
- package/src/lib/dialog/llms.txt +27 -27
- package/src/lib/divider/llms.txt +2 -2
- package/src/lib/drawer/llms.txt +7 -7
- package/src/lib/empty/llms.txt +4 -4
- package/src/lib/fab/llms.txt +6 -2
- package/src/lib/fieldset/llms.txt +22 -4
- package/src/lib/file-upload/llms.txt +1 -1
- package/src/lib/form-field/llms.txt +33 -19
- package/src/lib/galleria/llms.txt +3 -3
- package/src/lib/i18n/llms.txt +9 -9
- package/src/lib/icon/llms.txt +8 -8
- package/src/lib/icon-button/llms.txt +8 -3
- package/src/lib/image/llms.txt +4 -4
- package/src/lib/input/llms.txt +21 -7
- package/src/lib/input-mask/llms.txt +2 -2
- package/src/lib/input-number/llms.txt +14 -14
- package/src/lib/input-otp/llms.txt +6 -6
- package/src/lib/knob/llms.txt +11 -6
- package/src/lib/listbox/llms.txt +6 -6
- package/src/lib/loader/llms.txt +72 -0
- package/src/lib/megamenu/llms.txt +7 -7
- package/src/lib/mention/llms.txt +15 -15
- package/src/lib/menu/llms.txt +12 -12
- package/src/lib/menubar/llms.txt +7 -7
- package/src/lib/meter-group/llms.txt +7 -7
- package/src/lib/order-list/llms.txt +18 -6
- package/src/lib/paginator/llms.txt +5 -5
- package/src/lib/panel/llms.txt +20 -8
- package/src/lib/password/llms.txt +14 -6
- package/src/lib/peek/llms.txt +10 -10
- package/src/lib/pick-list/llms.txt +26 -6
- package/src/lib/popover/llms.txt +7 -7
- package/src/lib/progress/llms.txt +16 -16
- package/src/lib/radio-group/llms.txt +10 -3
- package/src/lib/rating/llms.txt +13 -6
- package/src/lib/rich-text/llms.txt +34 -29
- package/src/lib/scroll-top/llms.txt +3 -3
- package/src/lib/select/llms.txt +20 -13
- package/src/lib/sidenav/llms.txt +8 -8
- package/src/lib/slider/llms.txt +21 -8
- package/src/lib/speech/llms.txt +108 -0
- package/src/lib/speed-dial/llms.txt +9 -3
- package/src/lib/spinner/llms.txt +2 -2
- package/src/lib/split-button/llms.txt +14 -8
- package/src/lib/splitter/llms.txt +8 -8
- package/src/lib/stepper/llms.txt +24 -8
- package/src/lib/switch/llms.txt +10 -3
- package/src/lib/switch-group/llms.txt +10 -10
- package/src/lib/tabs/llms.txt +5 -5
- package/src/lib/textarea/llms.txt +16 -5
- package/src/lib/timeline/llms.txt +1 -1
- package/src/lib/toast/llms.txt +33 -5
- package/src/lib/toolbar/llms.txt +3 -3
- package/src/lib/tooltip/llms.txt +10 -10
- package/src/lib/tree/llms.txt +19 -6
- package/src/lib/update/llms.txt +52 -0
- package/types/konce-pt-angular-charts.d.ts +2 -2
- package/types/konce-pt-angular-chat.d.ts +87 -44
- package/types/konce-pt-angular-chat.d.ts.map +1 -1
- package/types/konce-pt-angular-grid.d.ts +14 -14
- package/types/konce-pt-angular-icons.d.ts +3 -3
- package/types/konce-pt-angular-map.d.ts +137 -121
- package/types/konce-pt-angular-map.d.ts.map +1 -1
- package/types/konce-pt-angular-roadmap.d.ts +13 -13
- package/types/konce-pt-angular.d.ts +1383 -625
- package/types/konce-pt-angular.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konce-pt/angular",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Open-source Angular 22 component library on Signals & Signal Forms
|
|
3
|
+
"version": "0.14.0",
|
|
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",
|
|
7
7
|
"homepage": "https://ui.konce.pt/",
|
|
@@ -46,16 +46,18 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"tslib": "^2.3.0",
|
|
49
|
-
"@konce-pt/
|
|
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/map": "0.14.0",
|
|
50
|
+
"@konce-pt/datetime": "0.14.0",
|
|
51
|
+
"@konce-pt/motion": "0.14.0",
|
|
52
|
+
"@konce-pt/chart": "0.14.0",
|
|
53
|
+
"@konce-pt/backdrop": "0.14.0",
|
|
54
|
+
"@konce-pt/mention": "0.14.0",
|
|
55
|
+
"@konce-pt/table": "0.14.0",
|
|
56
|
+
"@konce-pt/chat": "0.14.0",
|
|
57
|
+
"@konce-pt/i18n": "0.14.0",
|
|
58
|
+
"@konce-pt/icons": "0.14.0",
|
|
59
|
+
"@konce-pt/speech": "0.14.0",
|
|
60
|
+
"@konce-pt/roadmap": "0.14.0"
|
|
59
61
|
},
|
|
60
62
|
"module": "fesm2022/konce-pt-angular.mjs",
|
|
61
63
|
"typings": "types/konce-pt-angular.d.ts",
|
package/roadmap/src/lib/llms.txt
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
# KptRoadmap (kpt-roadmap)
|
|
2
2
|
|
|
3
|
-
A roadmap
|
|
3
|
+
A roadmap - rows of tasks on a horizontal timeline (a Gantt-style view). The label column and the axis header
|
|
4
4
|
stay stuck while scrolling, the bars are positioned as percentages, and dependencies are drawn by an SVG layer.
|
|
5
|
-
The computation core lives in `@konce-pt/roadmap`
|
|
5
|
+
The computation core lives in `@konce-pt/roadmap` - plain TypeScript, tested, shared with the React port.
|
|
6
6
|
Import: `import { KptRoadmap } from '@konce-pt/angular/roadmap';`
|
|
7
7
|
|
|
8
8
|
## Selector
|
|
9
|
-
`kpt-roadmap`
|
|
9
|
+
`kpt-roadmap` - standalone, OnPush, zoneless. The generic `KptRoadmap<TItem, TGroup>` types the `meta` field.
|
|
10
10
|
|
|
11
11
|
## Inputs
|
|
12
|
-
- `config`: KptRoadmapConfig (required)
|
|
13
|
-
- `scrollHeight`: string | null
|
|
14
|
-
- `labelWidth`: string
|
|
15
|
-
- `cellWidthPx`: number | null
|
|
16
|
-
- `showToday`: boolean
|
|
17
|
-
- `virtual`: boolean
|
|
12
|
+
- `config`: KptRoadmapConfig (required) - the data and every option
|
|
13
|
+
- `scrollHeight`: string | null - a fixed height, e.g. '420px'; enables the sticky header
|
|
14
|
+
- `labelWidth`: string - the width of the label column (default '14rem')
|
|
15
|
+
- `cellWidthPx`: number | null - the width of an axis column; without it the value depends on the zoom
|
|
16
|
+
- `showToday`: boolean - the "today" marker (default true)
|
|
17
|
+
- `virtual`: boolean - renders only the visible rows; worth it from roughly 100 rows up
|
|
18
18
|
|
|
19
19
|
## Model / events
|
|
20
|
-
- `collapsedGroups`: model<string[]>
|
|
20
|
+
- `collapsedGroups`: model<string[]> - the two-way ids of collapsed groups
|
|
21
21
|
- `itemClick`: output<KptRoadmapItem>
|
|
22
|
-
- `rangeChange`: output<KptTimeRange>
|
|
22
|
+
- `rangeChange`: output<KptTimeRange> - the computed axis range
|
|
23
23
|
|
|
24
24
|
## KptRoadmapConfig
|
|
25
25
|
- `items`: KptRoadmapItem[] (required)
|
|
26
26
|
- `groups?`: KptRoadmapGroup[]
|
|
27
|
-
- `links?`: KptRoadmapLink[]
|
|
27
|
+
- `links?`: KptRoadmapLink[] - dependencies given as a graph
|
|
28
28
|
- `zoom?`: 'year' | 'quarter' | 'month' | 'week' | 'day' | 'hour' (default 'week')
|
|
29
|
-
- `range?`: { start?: number; end?: number }
|
|
29
|
+
- `range?`: { start?: number; end?: number } - a missing end is computed from the data
|
|
30
30
|
- `locale?`: string; `today?`: Date | number | string
|
|
31
|
-
- `timeline?`, `rows?`, `dependencies?`, `interaction?`
|
|
31
|
+
- `timeline?`, `rows?`, `dependencies?`, `interaction?` - the detailed options
|
|
32
32
|
|
|
33
33
|
### KptRoadmapItem
|
|
34
34
|
- `id`: string, `label`: string (required)
|
|
35
|
-
- `start`: Date | number | string; `end?`: the same
|
|
35
|
+
- `start`: Date | number | string; `end?`: the same - no `end` means a milestone
|
|
36
36
|
- `sublabel?`, `icon?`, `disabled?`
|
|
37
37
|
- `variant?`: 'neutral' | 'primary' | 'success' | 'danger' | 'warning' | 'info'
|
|
38
|
-
- `color?`: string
|
|
39
|
-
- `progress?`: number 0..1
|
|
40
|
-
- `groupId?`: string; `dependsOn?`: (string | KptRoadmapLink)[]
|
|
41
|
-
- `milestone?`: boolean
|
|
38
|
+
- `color?`: string - any CSS color, overriding `variant`
|
|
39
|
+
- `progress?`: number 0..1 - the fill inside the bar
|
|
40
|
+
- `groupId?`: string; `dependsOn?`: (string | KptRoadmapLink)[] - a bare string means an 'FS' dependency
|
|
41
|
+
- `milestone?`: boolean - forces a diamond
|
|
42
42
|
- `meta?`: TItem
|
|
43
43
|
- The `draggable`, `resizable`, `locked` and `constraints` fields are reserved for editing and are ignored today.
|
|
44
44
|
|
|
45
45
|
### KptRoadmapGroup
|
|
46
46
|
- `id`, `label` (required); `sublabel?`, `parentId?`, `collapsed?`, `variant?`, `color?`
|
|
47
|
-
- `summary?`: 'auto' | 'none'
|
|
47
|
+
- `summary?`: 'auto' | 'none' - 'auto' draws a rolled-up bar from min(start) to max(end) of the children
|
|
48
48
|
|
|
49
49
|
### KptTimelineOptions (`config.timeline`)
|
|
50
50
|
- `weekendDays?`: number[] (default [0, 6]); `weekPrefix?`: string (from i18n by default)
|
|
51
|
-
- `workHours?`: { from, to, mode?: 'skip' | 'dim', skipWeekends? }
|
|
51
|
+
- `workHours?`: { from, to, mode?: 'skip' | 'dim', skipWeekends? } - only with `zoom: 'hour'`;
|
|
52
52
|
'skip' cuts the nights out of the axis, 'dim' leaves the columns greyed out
|
|
53
53
|
- `positionMode?`: 'uniform' (default) | 'linear'
|
|
54
54
|
- `bandUnit?`: the unit of the header's top level; `maxCells?`: number (default 4000)
|
|
55
55
|
|
|
56
56
|
### KptRoadmapRowOptions (`config.rows`)
|
|
57
|
-
- `mode?`: 'row-per-item' (default) | 'pack'
|
|
57
|
+
- `mode?`: 'row-per-item' (default) | 'pack' - 'pack' lays non-overlapping tasks out in a single row
|
|
58
58
|
- `itemHeight?`, `groupHeight?`, `laneHeight?`, `packMinGapMs?`
|
|
59
59
|
- `showUngroupedHeader?`, `ungroupedLabel?`
|
|
60
60
|
|
|
@@ -84,9 +84,9 @@ Import: `import { KptRoadmap } from '@konce-pt/angular/roadmap';`
|
|
|
84
84
|
styled with tokens and works with keyboard focus too.
|
|
85
85
|
- The rule: a tooltip shows what cannot be seen. Bars, row labels and header bands carry it
|
|
86
86
|
with `kptTooltipOnlyWhenTruncated`, so a tooltip only pops up for text cut off with
|
|
87
|
-
an ellipsis
|
|
87
|
+
an ellipsis - checked on hover, so it reacts to changes in width and zoom.
|
|
88
88
|
Milestones and header cells carry a tooltip unconditionally: a diamond shows no text at all,
|
|
89
|
-
and a cell fills in the year that "W35 / 24.08
|
|
89
|
+
and a cell fills in the year that "W35 / 24.08-30.08" does not show.
|
|
90
90
|
- Dependencies: 'FS' (the default), 'SS', 'FF', 'SF'; violated ones are drawn as a dashed line in the danger color.
|
|
91
91
|
- Entries with an invalid date or a duplicate `id` are skipped, with a warning in development mode.
|
|
92
92
|
|
|
@@ -100,7 +100,7 @@ get the original form.
|
|
|
100
100
|
|
|
101
101
|
## Accessibility
|
|
102
102
|
Bars and milestones are `role="button"` with an accessible name built from the label, sublabel, date range
|
|
103
|
-
and progress (`Design, 3
|
|
103
|
+
and progress (`Design, 3-14 Mar 2026, 40% complete`) - the end is exclusive, so the last occupied day is
|
|
104
104
|
announced. The whole bar grid is one Tab stop (roving tabindex): Left/Right move within a row, Up/Down go to
|
|
105
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
106
|
first/last bar; Enter and Space act like a click. With `virtual` on, moving to a row outside the window
|
|
@@ -113,11 +113,11 @@ Surfaces `--kpt-color-surface{,-variant,-sunken,-hover}`, outlines `--kpt-color-
|
|
|
113
113
|
bars per variant `--kpt-color-{primary,success,danger,warning,info,muted}`.
|
|
114
114
|
A bar's label is white, but the `neutral` variant has a light background, so its text uses
|
|
115
115
|
`--kpt-color-on-muted`. A group's rolled-up bar in the `neutral` variant is drawn in
|
|
116
|
-
`--kpt-color-on-surface-muted`
|
|
116
|
+
`--kpt-color-on-surface-muted` - `--kpt-color-muted` would be indistinguishable from the row background.
|
|
117
117
|
Further:
|
|
118
118
|
the year marker is inverted, `--kpt-color-on-surface` / `--kpt-color-surface`.
|
|
119
119
|
Sizes: `--kpt-roadmap-label-w`, `--kpt-roadmap-cell-w` (both can be overridden from outside).
|
|
120
120
|
|
|
121
121
|
## To do (roadmap)
|
|
122
|
-
Dragging and resizing bars, drawing dependencies with the mouse, adding rows
|
|
122
|
+
Dragging and resizing bars, drawing dependencies with the mouse, adding rows -
|
|
123
123
|
the types (`KptRoadmapChange`, `constraints`, `interaction`) are already part of the API.
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
# KptAccordion (kpt-accordion) + KptAccordionPanel (kpt-accordion-panel)
|
|
2
2
|
|
|
3
|
-
An accordion
|
|
3
|
+
An accordion - a group of expandable panels.
|
|
4
4
|
Import: `import { KptAccordion, KptAccordionPanel } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
6
|
## KptAccordion
|
|
7
|
-
- `multi`: boolean
|
|
8
|
-
- `animated`: boolean (default true)
|
|
9
|
-
- `animationDuration`: number (default 500)
|
|
7
|
+
- `multi`: boolean - allows several panels open at once (default: only one)
|
|
8
|
+
- `animated`: boolean (default true) - the panel expand animation (CSS grid, pure CSS)
|
|
9
|
+
- `animationDuration`: number (default 500) - animation time in ms (inherited by the panels)
|
|
10
|
+
- `collapseMotion`: `'spring' | 'fade' | 'none'` (default from `provideKptMotion`, else `spring`) - see "Collapse motion"
|
|
10
11
|
|
|
11
12
|
## KptAccordionPanel
|
|
12
13
|
- `title`: string (required); `disabled`: boolean; `expanded`: model<boolean>
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
<kpt-accordion>
|
|
16
|
-
<kpt-accordion-panel title="Section 1" [expanded]="true"
|
|
17
|
-
<kpt-accordion-panel title="Section 2"
|
|
17
|
+
<kpt-accordion-panel title="Section 1" [expanded]="true">...</kpt-accordion-panel>
|
|
18
|
+
<kpt-accordion-panel title="Section 2">...</kpt-accordion-panel>
|
|
18
19
|
</kpt-accordion>
|
|
19
20
|
|
|
20
21
|
Single/multi coordination: a panel calls its parent through inject(KptAccordion).
|
|
21
22
|
|
|
23
|
+
## Collapse motion
|
|
24
|
+
- `spring` - the height opens on a soft spring, the content slides in from above and sharpens out
|
|
25
|
+
of a blur; when collapsing, the content fades first and only then the section closes. The chevron
|
|
26
|
+
turns on a spring.
|
|
27
|
+
- `fade` - the height on the standard curve, the content cross-fades.
|
|
28
|
+
- `none` - the state changes without motion.
|
|
29
|
+
|
|
30
|
+
With no value it takes `collapse` from `provideKptMotion` (default `spring`). `animated: false` on the accordion, `enabled: false`
|
|
31
|
+
in the config and the system "reduce motion" setting always turn it off. `animationDuration` sets
|
|
32
|
+
the time of every kind. Pure CSS: the kind sits in `data-motion` on the component root.
|
|
33
|
+
|
|
22
34
|
## Accessibility
|
|
23
35
|
Each header is a native button with `aria-expanded` and `aria-controls`; the body is a
|
|
24
36
|
`role="region"` named by its header (`aria-labelledby`), so a screen reader announces both the state
|
package/src/lib/alert/llms.txt
CHANGED
|
@@ -8,8 +8,8 @@ Import: `import { KptAlert } from '@konce-pt/angular';`
|
|
|
8
8
|
|
|
9
9
|
## Inputs / outputs
|
|
10
10
|
- `variant`: 'info'|'success'|'warning'|'danger' (default 'info')
|
|
11
|
-
- `title`: string; `dismissible`: boolean (a
|
|
12
|
-
- `visible`: model<boolean> (default true)
|
|
11
|
+
- `title`: string; `dismissible`: boolean (a x button)
|
|
12
|
+
- `visible`: model<boolean> (default true) - shown or closed, two-way; x sets `false`
|
|
13
13
|
- `closed`: output<void>
|
|
14
14
|
|
|
15
15
|
## Example
|
|
@@ -22,6 +22,6 @@ The accent comes from `--kpt-color-{info,success,warning,danger}`; the backgroun
|
|
|
22
22
|
## Accessibility
|
|
23
23
|
The role follows the weight of the message: `info` and `success` are `role="status"` (read
|
|
24
24
|
politely, without interrupting), `warning` and `danger` are `role="alert"` (read at once). The icon
|
|
25
|
-
is decorative; the
|
|
26
|
-
page
|
|
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)
|
|
25
|
+
is decorative; the x button is labelled from `common.close`. After closing, focus falls back to the
|
|
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.
|
|
@@ -7,23 +7,23 @@ Import: `import { KptAppShell, KptShellNavToggle } from '@konce-pt/angular';`
|
|
|
7
7
|
`kpt-app-shell`
|
|
8
8
|
|
|
9
9
|
## Inputs / outputs
|
|
10
|
-
- `sidenavOpen`: model<boolean> (default `true`)
|
|
10
|
+
- `sidenavOpen`: model<boolean> (default `true`) - the state of the DOCKED panel
|
|
11
11
|
(and of the forced `over` mode); two-way `[(sidenavOpen)]`
|
|
12
|
-
- `sidenavCompactOpen`: model<boolean> (default `false`)
|
|
12
|
+
- `sidenavCompactOpen`: model<boolean> (default `false`) - the state of the OVERLAY in `auto` mode
|
|
13
13
|
- `sidenavMode`: `'auto' | 'side' | 'over'` (default **`'auto'`**)
|
|
14
|
-
- `sidenavBreakpoint`: `'sm'|'md'|'lg'|'xl'|'2xl'` (default `'lg'`)
|
|
14
|
+
- `sidenavBreakpoint`: `'sm'|'md'|'lg'|'xl'|'2xl'` (default `'lg'`) - from this threshold upward
|
|
15
15
|
`auto` docks the panel, below it turns it into an overlay
|
|
16
|
-
- `sidenavRailBreakpoint`: the same set or `null` (default `null`)
|
|
16
|
+
- `sidenavRailBreakpoint`: the same set or `null` (default `null`) - enables the icon rail
|
|
17
17
|
in the band from `sidenavBreakpoint` up to this threshold; the value must be HIGHER than `sidenavBreakpoint`
|
|
18
|
-
- `sidenavLabel`: string
|
|
19
|
-
- `sidenavId`: readonly string
|
|
20
|
-
- `isOverlay()`, `isSidenavOpen()`: Signal<boolean>
|
|
21
|
-
- `toggleSidenav()`, `openSidenav()`, `closeSidenav()`
|
|
18
|
+
- `sidenavLabel`: string - the panel's a11y label; empty = `appShell.navigation` from the dictionary
|
|
19
|
+
- `sidenavId`: readonly string - the panel's identifier (`aria-controls`)
|
|
20
|
+
- `isOverlay()`, `isSidenavOpen()`: Signal<boolean> - the effective state for the current layout
|
|
21
|
+
- `toggleSidenav()`, `openSidenav()`, `closeSidenav()` - they hit the state that belongs to the layout
|
|
22
22
|
|
|
23
23
|
## Projection slots
|
|
24
|
-
- `[kptShellToolbar]`
|
|
25
|
-
- `[kptShellSidenav]`
|
|
26
|
-
- the default content
|
|
24
|
+
- `[kptShellToolbar]` -> the top bar
|
|
25
|
+
- `[kptShellSidenav]` -> the side panel
|
|
26
|
+
- the default content -> the main area
|
|
27
27
|
|
|
28
28
|
## Example
|
|
29
29
|
<kpt-app-shell [(sidenavOpen)]="navOpen">
|
|
@@ -51,40 +51,42 @@ on a phone it has to be hidden by default. If both layouts shared one model, mov
|
|
|
51
51
|
screen would have to overwrite the application's state, and coming back to a wide one would have nothing to restore.
|
|
52
52
|
Keeping them apart means the desktop intent survives narrowing and widening the window for free.
|
|
53
53
|
|
|
54
|
-
The `kptShellNavToggle` button hits the right state on its own
|
|
54
|
+
The `kptShellNavToggle` button hits the right state on its own - do not write `navOpen.set(...)` by hand,
|
|
55
55
|
because on a narrow screen you would be setting the wrong model.
|
|
56
56
|
|
|
57
57
|
It also supplies `aria-expanded`, `aria-controls` and `aria-label`, and it puts them where a screen
|
|
58
58
|
reader can use them. On a native `<button>`/`<a>` host that is the host itself. On a wrapping
|
|
59
|
-
component such as `kpt-icon-button` the attributes go down to the inner `<button>` instead
|
|
59
|
+
component such as `kpt-icon-button` the attributes go down to the inner `<button>` instead - placing
|
|
60
60
|
state attributes on a roleless wrapper would violate `aria-allowed-attr`. In that case the label
|
|
61
61
|
stays with the component (`ariaLabel`), which the directive does not overwrite.
|
|
62
62
|
|
|
63
63
|
## The menu content convention (needed only for the rail)
|
|
64
|
-
- `[kptNavLabel]`
|
|
64
|
+
- `[kptNavLabel]` - the entry's text; in the rail it is hidden with the "visually hidden" technique, so the entry
|
|
65
65
|
keeps an accessible name for a screen reader.
|
|
66
|
-
- `[kptNavSection]`
|
|
66
|
+
- `[kptNavSection]` - a group heading; hidden the same way.
|
|
67
67
|
|
|
68
|
-
These are plain attributes (like `kptShellToolbar` or `kptToolbarSpacer`), not directives
|
|
68
|
+
These are plain attributes (like `kptShellToolbar` or `kptToolbarSpacer`), not directives - there is nothing
|
|
69
69
|
to import. Without them the rail shows clipped text instead of an icon. In the rail it is worth marking entries
|
|
70
70
|
with `kptTooltip`, since only the glyph is visible.
|
|
71
71
|
|
|
72
72
|
## Behavior
|
|
73
73
|
- The layout is decided by CSS alone (`@media`), so nothing flickers before hydration and the whole thing
|
|
74
74
|
works under SSR. JavaScript is only responsible for which state the button toggles.
|
|
75
|
-
- A closed panel drops out of the tab order through `visibility: hidden` (not `inert`)
|
|
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
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
|
|
79
|
+
shell already handled (a dialog, menu or popover - `preventDefault()` or focus inside it) is left alone.
|
|
80
80
|
- The slide direction follows `dir` (RTL slides in from the right).
|
|
81
81
|
- Height: `100dvh` with a `100vh` fallback.
|
|
82
|
-
-
|
|
82
|
+
- `<main>` scrolls on its own and is registered as `cdkScrollable`, so overlay panels (select,
|
|
83
|
+
autocomplete, menu, datepicker) follow it while the content scrolls.
|
|
84
|
+
- It does **not** close the menu after navigation - the shell does not know what counts as navigation
|
|
83
85
|
in a given application. Do it yourself: `if (shell.isOverlay()) shell.closeSidenav();`.
|
|
84
86
|
|
|
85
87
|
## Forced modes (backward compatibility)
|
|
86
88
|
`sidenavMode="side"` and `"over"` ignore the window width and read `sidenavOpen`, exactly as
|
|
87
|
-
before `auto` was introduced. Set `"side"` if the application manages responsiveness itself
|
|
89
|
+
before `auto` was introduced. Set `"side"` if the application manages responsiveness itself -
|
|
88
90
|
otherwise you end up with two layers of the same logic.
|
|
89
91
|
|
|
90
92
|
## Tokens
|
|
@@ -93,5 +95,5 @@ otherwise you end up with two layers of the same logic.
|
|
|
93
95
|
|
|
94
96
|
## Focus
|
|
95
97
|
Opening the overlay moves focus into the panel (its first focusable element, or the `<nav>`
|
|
96
|
-
itself); closing it returns focus to where it came from
|
|
98
|
+
itself); closing it returns focus to where it came from - usually the menu button - unless the user
|
|
97
99
|
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
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
An authentication screen: sign in, sign up and password recovery in one component,
|
|
4
4
|
with a promo panel and a list of external providers (OAuth/SSO). Signal Forms.
|
|
5
|
-
The component is **presentational**
|
|
5
|
+
The component is **presentational** - it does not call an API and does not navigate; the app does that in the handlers.
|
|
6
6
|
Import: `import { KptAuth, KptAuthProviderDef } from '@konce-pt/angular';`
|
|
7
7
|
|
|
8
8
|
## Selector
|
|
9
9
|
`kpt-auth`
|
|
10
10
|
|
|
11
11
|
## Inputs
|
|
12
|
-
- `mode`: model<'signIn' | 'signUp' | 'forgot'> = 'signIn'
|
|
13
|
-
- `layout`: 'slider' | 'split' = 'slider'
|
|
14
|
-
- `providers`: KptAuthProvider[] = []
|
|
15
|
-
- `providerLayout`: 'list' | 'grid' = 'list'
|
|
16
|
-
- `showName`, `requireTerms`, `showRemember`: boolean = true
|
|
17
|
-
- `busy`: boolean
|
|
12
|
+
- `mode`: model<'signIn' | 'signUp' | 'forgot'> = 'signIn' - two-way (the app can force a mode)
|
|
13
|
+
- `layout`: 'slider' | 'split' = 'slider' - the promo panel slides to the other side / stays put
|
|
14
|
+
- `providers`: KptAuthProvider[] = [] - `{ id, label, icon?, iconUrl?, description? }`
|
|
15
|
+
- `providerLayout`: 'list' | 'grid' = 'list' - a full-width list / a grid of icons with captions
|
|
16
|
+
- `showName`, `requireTerms`, `showRemember`: boolean = true - whether the fields are present
|
|
17
|
+
- `busy`: boolean - the submit button goes into a loading state (submitting is blocked), the providers
|
|
18
18
|
are blocked; the fields stay editable
|
|
19
|
-
- `error` / `notice`: string | null
|
|
20
|
-
- `promoTitle` / `promoText`: string | null
|
|
19
|
+
- `error` / `notice`: string | null - a server message (a `danger` / `success` kpt-alert)
|
|
20
|
+
- `promoTitle` / `promoText`: string | null - `null` = mode-dependent text from i18n,
|
|
21
21
|
`''` = hide it (making room for the `[kptAuthPromo]` slot)
|
|
22
22
|
- `animated`: boolean = true; `animationDuration`: number = 320 (ms)
|
|
23
23
|
|
|
@@ -25,21 +25,21 @@ Import: `import { KptAuth, KptAuthProviderDef } from '@konce-pt/angular';`
|
|
|
25
25
|
- `signIn`: { email, password, remember }
|
|
26
26
|
- `signUp`: { name, email, password, terms }
|
|
27
27
|
- `resetPassword`: { email }
|
|
28
|
-
- `providerSelect`: KptAuthProvider
|
|
29
|
-
- `modeChange`
|
|
28
|
+
- `providerSelect`: KptAuthProvider - the chosen provider (the whole object, not just the `id`)
|
|
29
|
+
- `modeChange` - from the `mode` model
|
|
30
30
|
|
|
31
31
|
## Content projection
|
|
32
|
-
- `[kptAuthBrand]`
|
|
33
|
-
- `[kptAuthPromo]`
|
|
34
|
-
- `[kptAuthSso]`
|
|
35
|
-
- `[kptAuthFields]`
|
|
32
|
+
- `[kptAuthBrand]` - a logo/name above the heading
|
|
33
|
+
- `[kptAuthPromo]` - the promo panel's content (below the title/text, above the CTA)
|
|
34
|
+
- `[kptAuthSso]` - an enterprise sign-in button **above** the provider separator
|
|
35
|
+
- `[kptAuthFields]` - extra fields inside the `<form>` (sign in and sign up - one slot, shown in whichever
|
|
36
36
|
of the two forms is active)
|
|
37
|
-
- `[kptAuthFooter]`
|
|
38
|
-
- `ng-template[kptAuthProvider]="id"` (`KptAuthProviderDef`)
|
|
37
|
+
- `[kptAuthFooter]` - the footer (terms, copyright)
|
|
38
|
+
- `ng-template[kptAuthProvider]="id"` (`KptAuthProviderDef`) - custom markup for a single provider;
|
|
39
39
|
context: `$implicit` = the provider, `select` = the function that reports the choice
|
|
40
40
|
|
|
41
41
|
**Fields from the `[kptAuthFields]` slot do not enter the component's model.** The consumer binds them to
|
|
42
|
-
their own form and reads them in the `signIn`/`signUp` handler
|
|
42
|
+
their own form and reads them in the `signIn`/`signUp` handler - they are not part of the emitted value.
|
|
43
43
|
|
|
44
44
|
## Validation
|
|
45
45
|
Three independent forms (one per mode), with unconditional validators: e-mail required
|
|
@@ -52,18 +52,18 @@ missing instead of a dead button (WCAG 3.3.1), and the outputs fire only for a v
|
|
|
52
52
|
|
|
53
53
|
## Provider icons
|
|
54
54
|
The core carries no brand icons. Three ways around it:
|
|
55
|
-
1. `provideKptTablerIcons()` from `@konce-pt/angular/icons`
|
|
55
|
+
1. `provideKptTablerIcons()` from `@konce-pt/angular/icons` -> `icon: 'brand-google'`,
|
|
56
56
|
`'brand-facebook'`, `'brand-linkedin'`, `'brand-windows'`, `'brand-apple'`, `'brand-github'`, `'key'`.
|
|
57
|
-
2. `KptIconRegistry.register({ google: '<path
|
|
57
|
+
2. `KptIconRegistry.register({ google: '<path .../>' })` - note: the sanitizer lets
|
|
58
58
|
`fill`/`stroke`/`opacity` through, but strips `defs`/gradients and `fill-rule`, and the `viewBox` is fixed
|
|
59
59
|
at `0 0 24 24`. A multi-color logo needs an explicit `fill` on every path.
|
|
60
|
-
3. `iconUrl` (a plain `<img alt="">`) or the `kptAuthProvider` template
|
|
60
|
+
3. `iconUrl` (a plain `<img alt="">`) or the `kptAuthProvider` template - for a logo with a gradient.
|
|
61
61
|
|
|
62
62
|
The icon is decorative (`kpt-icon` carries `aria-hidden`), so the button's accessible name always
|
|
63
63
|
comes from `label`.
|
|
64
64
|
|
|
65
65
|
## Accessibility
|
|
66
|
-
- Only the **active mode's form** lives in the DOM
|
|
66
|
+
- Only the **active mode's form** lives in the DOM - there are no invisible but still
|
|
67
67
|
focusable elements.
|
|
68
68
|
- The panel heading carries `tabindex="-1"` and takes focus after a mode change (otherwise the change is not
|
|
69
69
|
announced, and focus stays on a button that has slid off screen).
|
|
@@ -7,20 +7,20 @@ Import: `import { KptAutocomplete } from '@konce-pt/angular';`
|
|
|
7
7
|
## Inputs
|
|
8
8
|
- `value`: model<string>; `options`: string[]; `placeholder`: string
|
|
9
9
|
- `disabled`/`invalid`/`touched`: boolean; `touch`: output
|
|
10
|
-
- Keyboard:
|
|
10
|
+
- Keyboard: ArrowUp/ArrowDown to navigate, Enter selects, Esc closes.
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
|
-
<kpt-autocomplete [formField]="f.city" [options]="cities" placeholder="City
|
|
13
|
+
<kpt-autocomplete [formField]="f.city" [options]="cities" placeholder="City..." />
|
|
14
14
|
|
|
15
15
|
## Screen reader and keyboard
|
|
16
16
|
The WAI-ARIA combobox-with-list pattern: focus stays in the field, `aria-autocomplete="list"`,
|
|
17
17
|
`aria-controls` and `aria-activedescendant` point at the active suggestion, and a polite live region
|
|
18
18
|
says how many suggestions there are (`autocomplete.results`) or that there are none
|
|
19
|
-
(`autocomplete.noResults`). Matching ignores case and diacritics ("lodz" finds "Łódź").
|
|
19
|
+
(`autocomplete.noResults`). Matching ignores case and diacritics ("lodz" finds "Łódź"). `ArrowUp` from the
|
|
20
20
|
field goes to the last suggestion; the first `Escape` closes the list, the second clears the field.
|
|
21
21
|
|
|
22
22
|
## Label and description
|
|
23
|
-
`id` goes to the native field
|
|
23
|
+
`id` goes to the native field - the host never carries it; without one it is generated. Inside
|
|
24
24
|
`kpt-form-field` the control links itself: the wrapper's `label[for]` points at it and the hint or
|
|
25
25
|
error is added to `aria-describedby`, so `controlId` is not needed. Without a wrapper, name it with
|
|
26
26
|
`ariaLabel`.
|
|
@@ -30,3 +30,14 @@ error is added to `aria-describedby`, so `controlId` is not needed. Without a wr
|
|
|
30
30
|
|
|
31
31
|
## Read-only and required
|
|
32
32
|
`readonly` is the native read-only field with `aria-readonly`; the suggestions do not open and Escape does not clear the value.
|
|
33
|
+
|
|
34
|
+
## Dictation
|
|
35
|
+
- `speech`: boolean = false - a microphone at the end of the field (`kpt-speech-button`). Hidden
|
|
36
|
+
without browser support.
|
|
37
|
+
- `speechLang`: string | null - BCP 47 tag; without it from `KptI18n.locale`.
|
|
38
|
+
- `speechColor`: `'primary' | 'danger' | 'success' | 'warning' | 'info'` = `'primary'` - colour of "stop" and the wave while listening.
|
|
39
|
+
- `speechMode`: `'insert' | 'append' | 'replace'` = `'replace'` - the field picks one value, so a click
|
|
40
|
+
clears it and one utterance replaces it; the suggestion list opens for the spoken text like for typed
|
|
41
|
+
text. Interim words are visible but do not filter the list - only final text reaches the model.
|
|
42
|
+
|
|
43
|
+
<kpt-autocomplete [formField]="f.city" [options]="cities" speech />
|
package/src/lib/avatar/llms.txt
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# KptAvatar (kpt-avatar)
|
|
2
2
|
|
|
3
|
-
An avatar
|
|
3
|
+
An avatar - an image, initials (from `name`) or an icon. Import: `import { KptAvatar } from '@konce-pt/angular';`
|
|
4
4
|
|
|
5
5
|
## Inputs
|
|
6
6
|
- `src`: string|null (an image); `name`: string (initials, up to 2 letters); `icon`: string|null
|
|
7
7
|
- `size`: 'sm'|'md'|'lg'|'xl'; `shape`: 'circle'|'square'
|
|
8
|
-
- `decorative`: boolean
|
|
8
|
+
- `decorative`: boolean - hides the avatar from screen readers (the name is written next to it)
|
|
9
9
|
|
|
10
10
|
## Examples
|
|
11
11
|
<kpt-avatar src="/u/anna.jpg" />
|
|
@@ -16,7 +16,7 @@ An avatar — an image, initials (from `name`) or an icon. Import: `import { Kpt
|
|
|
16
16
|
`name` goes into the native `title` (initials alone say nothing). With a photo the name is the
|
|
17
17
|
image's `alt`; without one the avatar is `role="img"` with `aria-label`, and the initials are
|
|
18
18
|
`aria-hidden`. A photo that fails to load falls back to the initials (or the icon); a new `src` is
|
|
19
|
-
tried again. `decorative` removes the avatar from the accessibility tree
|
|
19
|
+
tried again. `decorative` removes the avatar from the accessibility tree - use it when the name is
|
|
20
20
|
already written next to it.
|
|
21
21
|
|
|
22
22
|
## Tokens
|
|
@@ -4,10 +4,10 @@ A group of overlapping avatars with a "+N" counter. Built on `kpt-avatar`.
|
|
|
4
4
|
Import: `import { KptAvatarGroup } from '@konce-pt/angular';`
|
|
5
5
|
|
|
6
6
|
## Inputs
|
|
7
|
-
- `avatars`: KptAvatarItem[]
|
|
8
|
-
- `max`: number (default 4)
|
|
7
|
+
- `avatars`: KptAvatarItem[] - { name?, src?, icon? }
|
|
8
|
+
- `max`: number (default 4) - how many to show before "+N"
|
|
9
9
|
- `size`: 'sm' | 'md' | 'lg' | 'xl'
|
|
10
|
-
- `label`: string
|
|
10
|
+
- `label`: string - the group's name; with it the row is `role="group"`
|
|
11
11
|
|
|
12
12
|
Every avatar in the group shows its `name` in a tooltip (the `title` from `kpt-avatar`), so
|
|
13
13
|
the initials stay readable even at `size="sm"`.
|
|
@@ -19,6 +19,6 @@ the initials stay readable even at `size="sm"`.
|
|
|
19
19
|
The overlap uses a `--kpt-color-surface` ring; "+N" uses `--kpt-color-muted`.
|
|
20
20
|
|
|
21
21
|
## Accessibility
|
|
22
|
-
Every avatar keeps its own name. With `label` the row is `role="group"` with that name. The
|
|
23
|
-
counter is `role="img"` named from `avatarGroup.more` (`{count}`
|
|
22
|
+
Every avatar keeps its own name. With `label` the row is `role="group"` with that name. The "+N"
|
|
23
|
+
counter is `role="img"` named from `avatarGroup.more` (`{count}` - "2 more"), with the hidden names
|
|
24
24
|
in its `title`. The overlap uses `margin-inline-start`, so it mirrors in RTL.
|