@lifecorner/angular-ui-kit 3.11.3 → 3.11.5
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/fesm2022/lifecorner-angular-ui-kit-accordion.mjs +6 -3
- package/fesm2022/lifecorner-angular-ui-kit-accordion.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-avatar.mjs +12 -12
- package/fesm2022/lifecorner-angular-ui-kit-avatar.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-calendar.mjs +11 -6
- package/fesm2022/lifecorner-angular-ui-kit-calendar.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-file-upload.mjs +7 -2
- package/fesm2022/lifecorner-angular-ui-kit-file-upload.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-gallery.mjs +7 -2
- package/fesm2022/lifecorner-angular-ui-kit-gallery.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-header.mjs +13 -3
- package/fesm2022/lifecorner-angular-ui-kit-header.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-internal-a11y.mjs +20 -0
- package/fesm2022/lifecorner-angular-ui-kit-internal-a11y.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-menu.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-menu.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-pagination.mjs +5 -2
- package/fesm2022/lifecorner-angular-ui-kit-pagination.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-rich-text-editor.mjs +6 -2
- package/fesm2022/lifecorner-angular-ui-kit-rich-text-editor.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-stepper.mjs +11 -6
- package/fesm2022/lifecorner-angular-ui-kit-stepper.mjs.map +1 -1
- package/package.json +5 -1
- package/types/lifecorner-angular-ui-kit-accordion.d.ts +31 -9
- package/types/lifecorner-angular-ui-kit-avatar.d.ts +7 -0
- package/types/lifecorner-angular-ui-kit-calendar.d.ts +1 -0
- package/types/lifecorner-angular-ui-kit-file-upload.d.ts +18 -3
- package/types/lifecorner-angular-ui-kit-gallery.d.ts +17 -2
- package/types/lifecorner-angular-ui-kit-header.d.ts +34 -3
- package/types/lifecorner-angular-ui-kit-internal-a11y.d.ts +27 -0
- package/types/lifecorner-angular-ui-kit-pagination.d.ts +15 -2
- package/types/lifecorner-angular-ui-kit-rich-text-editor.d.ts +13 -1
- package/types/lifecorner-angular-ui-kit-stepper.d.ts +16 -5
|
@@ -40,13 +40,23 @@ export declare class FileUploadComponent {
|
|
|
40
40
|
*/
|
|
41
41
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
42
42
|
/**
|
|
43
|
-
* Hint text shown in the dropzone.
|
|
43
|
+
* Hint text shown in the dropzone. The drop zone's accessible name is
|
|
44
|
+
* `hint`, then the shown accepted and max lines, comma-separated (WCAG 2.5.3
|
|
45
|
+
* Label in Name).
|
|
44
46
|
* @default 'Drag & drop files here, or click to browse'
|
|
45
47
|
*/
|
|
46
48
|
hint: import("@angular/core").InputSignal<string>;
|
|
47
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Prefix of the accepted file types line (`accept`). The shown line is part
|
|
51
|
+
* of the drop zone's accessible name, after `hint`.
|
|
52
|
+
* @default 'Accepted:'
|
|
53
|
+
*/
|
|
48
54
|
acceptedLabel: import("@angular/core").InputSignal<string>;
|
|
49
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Prefix of the maximum file size line (`maxSizeBytes`). The shown line is
|
|
57
|
+
* part of the drop zone's accessible name, after `hint`.
|
|
58
|
+
* @default 'Max:'
|
|
59
|
+
*/
|
|
50
60
|
maxSizeLabel: import("@angular/core").InputSignal<string>;
|
|
51
61
|
/** Accessible name of a selected file's remove button. */
|
|
52
62
|
removeFileAriaLabel: import("@angular/core").InputSignal<string>;
|
|
@@ -65,6 +75,11 @@ export declare class FileUploadComponent {
|
|
|
65
75
|
protected selectedFiles: import("@angular/core").WritableSignal<FileUploadFile[]>;
|
|
66
76
|
protected readonly fileInputRef: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
67
77
|
protected dropzoneClasses: import("@angular/core").Signal<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Name of the drop zone (AS-33, WCAG 2.5.3 Label in Name): `hint`, then the
|
|
80
|
+
* accepted and max lines it shows, comma-separated.
|
|
81
|
+
*/
|
|
82
|
+
protected readonly dropzoneAriaLabel: import("@angular/core").Signal<string>;
|
|
68
83
|
protected onDragOver(event: DragEvent): void;
|
|
69
84
|
protected onDragLeave(event: DragEvent): void;
|
|
70
85
|
protected onDrop(event: DragEvent): void;
|
|
@@ -48,7 +48,12 @@ export declare class GalleryComponent implements OnDestroy {
|
|
|
48
48
|
readonly size: import("@angular/core").InputSignal<GallerySize>;
|
|
49
49
|
/** Custom column count (overrides size preset) */
|
|
50
50
|
readonly columns: import("@angular/core").InputSignal<number | null>;
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Whether to show captions below thumbnails. A shown caption is part of the
|
|
53
|
+
* item's accessible name: `alt` (or `imageFallbackLabel` and its number),
|
|
54
|
+
* then the caption (WCAG 2.5.3 Label in Name).
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
52
57
|
readonly showCaptions: import("@angular/core").InputSignal<boolean>;
|
|
53
58
|
/** Whether clicking a thumbnail opens the lightbox */
|
|
54
59
|
readonly enableLightbox: import("@angular/core").InputSignal<boolean>;
|
|
@@ -74,7 +79,11 @@ export declare class GalleryComponent implements OnDestroy {
|
|
|
74
79
|
readonly previousAriaLabel: import("@angular/core").InputSignal<string>;
|
|
75
80
|
/** Accessible name of the next-image button. */
|
|
76
81
|
readonly nextAriaLabel: import("@angular/core").InputSignal<string>;
|
|
77
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Accessible name of a thumbnail without `alt`, followed by its number. A
|
|
84
|
+
* shown caption follows (`Bild 3, Sonnenuntergang am See`).
|
|
85
|
+
* @default 'Image'
|
|
86
|
+
*/
|
|
78
87
|
readonly imageFallbackLabel: import("@angular/core").InputSignal<string>;
|
|
79
88
|
/** Emitted when lightbox opens with item index */
|
|
80
89
|
readonly lightboxOpen: import("@angular/core").OutputEmitterRef<number>;
|
|
@@ -134,6 +143,12 @@ export declare class GalleryComponent implements OnDestroy {
|
|
|
134
143
|
protected onImageLoad(index: number): void;
|
|
135
144
|
protected isLoaded(index: number): boolean;
|
|
136
145
|
protected getThumbnail(item: GalleryItem): string;
|
|
146
|
+
/**
|
|
147
|
+
* Name of a thumbnail (AS-33, WCAG 2.5.3 Label in Name): `alt` (or
|
|
148
|
+
* `imageFallbackLabel` and its number), then the shown caption unless one
|
|
149
|
+
* contains the other.
|
|
150
|
+
*/
|
|
151
|
+
protected itemAriaLabel(item: GalleryItem, index: number): string;
|
|
137
152
|
protected trackByIndex(index: number): number;
|
|
138
153
|
/**
|
|
139
154
|
* Keyboard handling while the lightbox is open. Bound on the lightbox itself
|
|
@@ -165,7 +165,9 @@ export declare class HeaderComponent {
|
|
|
165
165
|
readonly userName: import("@angular/core").InputSignal<string>;
|
|
166
166
|
/**
|
|
167
167
|
* What the account-menu button shows: `icon` (user icon and chevron) or
|
|
168
|
-
* `avatar` (the initials of `userName` in a 48 px round button
|
|
168
|
+
* `avatar` (the initials of `userName` in a 48 px round button; the button
|
|
169
|
+
* is named `userMenuAriaLabel`, a comma and the initials).
|
|
170
|
+
* @default 'icon'
|
|
169
171
|
*/
|
|
170
172
|
readonly userMenuTrigger: import("@angular/core").InputSignal<HeaderUserMenuTrigger>;
|
|
171
173
|
/** Photo for the account avatar (trigger and menu header); initials when empty or broken. */
|
|
@@ -213,7 +215,15 @@ export declare class HeaderComponent {
|
|
|
213
215
|
readonly homeAriaLabel: import("@angular/core").InputSignal<string>;
|
|
214
216
|
/** Accessible name of the hamburger button. */
|
|
215
217
|
readonly hamburgerAriaLabel: import("@angular/core").InputSignal<string>;
|
|
216
|
-
/**
|
|
218
|
+
/**
|
|
219
|
+
* Accessible name of the account menu trigger. With `userMenuTrigger="avatar"`
|
|
220
|
+
* the button is named this text, a comma and the initials it shows
|
|
221
|
+
* (`Menü für Johanna Müller, JM`), so a voice-control user can say what they
|
|
222
|
+
* see (WCAG 2.5.3). Nothing is added when `userName` gives no initials, or
|
|
223
|
+
* when the text already contains them as a word. The name is the same with a
|
|
224
|
+
* photo.
|
|
225
|
+
* @default 'Open user menu'
|
|
226
|
+
*/
|
|
217
227
|
readonly userMenuAriaLabel: import("@angular/core").InputSignal<string>;
|
|
218
228
|
/** Accessible name of the `<nav>` around `navItems`. */
|
|
219
229
|
readonly navAriaLabel: import("@angular/core").InputSignal<string>;
|
|
@@ -221,7 +231,12 @@ export declare class HeaderComponent {
|
|
|
221
231
|
readonly themeToDarkAriaLabel: import("@angular/core").InputSignal<string>;
|
|
222
232
|
/** Label of the theme button while the dark theme is active. */
|
|
223
233
|
readonly themeToLightAriaLabel: import("@angular/core").InputSignal<string>;
|
|
224
|
-
/**
|
|
234
|
+
/**
|
|
235
|
+
* Start of the context button's accessible name. The visible `contextLabel`
|
|
236
|
+
* and `contextName` follow it (WCAG 2.5.3 Label in Name), unless the label
|
|
237
|
+
* already contains them: `Context info, Tenant Acme Corp`.
|
|
238
|
+
* @default 'Context info'
|
|
239
|
+
*/
|
|
225
240
|
readonly contextAriaLabel: import("@angular/core").InputSignal<string>;
|
|
226
241
|
/** Label of the Profile entry in the account menu. */
|
|
227
242
|
readonly profileLabel: import("@angular/core").InputSignal<string>;
|
|
@@ -242,6 +257,22 @@ export declare class HeaderComponent {
|
|
|
242
257
|
protected get themeService(): ThemeService;
|
|
243
258
|
private readonly hamburger;
|
|
244
259
|
constructor();
|
|
260
|
+
/**
|
|
261
|
+
* Name of the avatar trigger (AS-33, WCAG 2.5.3 Label in Name):
|
|
262
|
+
* `userMenuAriaLabel`, a comma and the initials the avatar shows, so the
|
|
263
|
+
* visible text is a word of the name. Built from the same function as the
|
|
264
|
+
* avatar's initials and independent of the photo, so the prerendered name
|
|
265
|
+
* and the page's agree. Nothing is added for the `?` placeholder or when
|
|
266
|
+
* the label already holds the initials as a word (parentheticals dropped,
|
|
267
|
+
* as axe-core 4.14 does); an empty label becomes the initials alone.
|
|
268
|
+
*/
|
|
269
|
+
protected readonly avatarTriggerAriaLabel: import("@angular/core").Signal<string>;
|
|
270
|
+
/**
|
|
271
|
+
* Name of the context button (AS-33, WCAG 2.5.3 Label in Name):
|
|
272
|
+
* `contextAriaLabel`, a comma and the visible `contextLabel` and
|
|
273
|
+
* `contextName`, so a voice-control user can say what they see.
|
|
274
|
+
*/
|
|
275
|
+
protected readonly contextButtonAriaLabel: import("@angular/core").Signal<string>;
|
|
245
276
|
/**
|
|
246
277
|
* Get menu items for profile dropdown
|
|
247
278
|
*/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessible names that contain the visible text (WCAG 2.5.3 Label in Name,
|
|
3
|
+
* AS-33). The containment test follows axe-core 4.14's
|
|
4
|
+
* `label-content-name-mismatch`: both strings are compatibility-decomposed,
|
|
5
|
+
* parentheticals are dropped, the rest is lower-cased and split into words of
|
|
6
|
+
* letters and digits, and the visible text's words must occur as one
|
|
7
|
+
* contiguous run in the name's words.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The words of `s` as axe-core 4.14 compares them for Label in Name.
|
|
11
|
+
* `toLowerCase`, not `toLocaleLowerCase`: server and browser must agree.
|
|
12
|
+
*/
|
|
13
|
+
export declare function labelWords(s: string): string[];
|
|
14
|
+
/** Whether `needle` occurs in `haystack` as one contiguous run of words. */
|
|
15
|
+
export declare function containsWords(haystack: readonly string[], needle: readonly string[]): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Accessible name that contains the visible `text` (WCAG 2.5.3): `label`,
|
|
18
|
+
* then `, text`, unless one already contains the other.
|
|
19
|
+
*
|
|
20
|
+
* - Text without letters or digits, or one non-digit character (a symbol or
|
|
21
|
+
* an icon glyph, which axe reports as "incomplete"): `label`.
|
|
22
|
+
* - The label already contains the text: `label`, unchanged.
|
|
23
|
+
* - An empty label: `text`.
|
|
24
|
+
* - The text contains the label: `text`, so nothing is read twice.
|
|
25
|
+
* - Otherwise `label, text`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function nameWithText(label: string, text: string): string;
|
|
@@ -35,9 +35,18 @@ export declare class PaginationComponent {
|
|
|
35
35
|
readonly previousLabel: import("@angular/core").InputSignal<string>;
|
|
36
36
|
/** Visible text of the next button */
|
|
37
37
|
readonly nextLabel: import("@angular/core").InputSignal<string>;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Accessible name of the previous button (the visible text is hidden on
|
|
40
|
+
* small screens). `previousLabel` is appended when this doesn't contain it
|
|
41
|
+
* (WCAG 2.5.3 Label in Name), e.g. `Vorherige Seite, Zurück`.
|
|
42
|
+
* @default 'Previous page'
|
|
43
|
+
*/
|
|
39
44
|
readonly previousAriaLabel: import("@angular/core").InputSignal<string>;
|
|
40
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Accessible name of the next button. `nextLabel` is appended when this
|
|
47
|
+
* doesn't contain it (WCAG 2.5.3 Label in Name), e.g. `Nächste Seite, Weiter`.
|
|
48
|
+
* @default 'Next page'
|
|
49
|
+
*/
|
|
41
50
|
readonly nextAriaLabel: import("@angular/core").InputSignal<string>;
|
|
42
51
|
/** Accessible name of a page button; `{page}` is replaced with the page number */
|
|
43
52
|
readonly pageAriaLabel: import("@angular/core").InputSignal<string>;
|
|
@@ -47,6 +56,10 @@ export declare class PaginationComponent {
|
|
|
47
56
|
*/
|
|
48
57
|
readonly infoText: import("@angular/core").InputSignal<string>;
|
|
49
58
|
readonly pageChange: import("@angular/core").OutputEmitterRef<number>;
|
|
59
|
+
/** Name of the previous button: its label, then the visible text unless contained (AS-33). */
|
|
60
|
+
protected readonly previousButtonAriaLabel: import("@angular/core").Signal<string>;
|
|
61
|
+
/** Name of the next button: its label, then the visible text unless contained (AS-33). */
|
|
62
|
+
protected readonly nextButtonAriaLabel: import("@angular/core").Signal<string>;
|
|
50
63
|
totalPages: import("@angular/core").Signal<number>;
|
|
51
64
|
firstItemIndex: import("@angular/core").Signal<number>;
|
|
52
65
|
lastItemIndex: import("@angular/core").Signal<number>;
|
|
@@ -47,7 +47,13 @@ export declare class RichTextEditorComponent implements ControlValueAccessor {
|
|
|
47
47
|
toolbar: import("@angular/core").InputSignal<ToolbarConfig>;
|
|
48
48
|
/** Whether to show word count */
|
|
49
49
|
showWordCount: import("@angular/core").InputSignal<boolean>;
|
|
50
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Tooltips and accessible names of the toolbar actions, by action
|
|
52
|
+
* (`{ bold: 'Fett' }`); missing ones keep the English default. A visible
|
|
53
|
+
* button label with letters or digits that the title doesn't contain is
|
|
54
|
+
* appended (`Heading 1, H1`, WCAG 2.5.3 Label in Name).
|
|
55
|
+
* @default {}
|
|
56
|
+
*/
|
|
51
57
|
actionTitles: import("@angular/core").InputSignal<Partial<Record<ToolbarAction, string>>>;
|
|
52
58
|
/** Label of the rich-text mode button. */
|
|
53
59
|
richModeLabel: import("@angular/core").InputSignal<string>;
|
|
@@ -118,6 +124,12 @@ export declare class RichTextEditorComponent implements ControlValueAccessor {
|
|
|
118
124
|
private getSelection;
|
|
119
125
|
protected getActionLabel(action: ToolbarAction): string;
|
|
120
126
|
protected getActionTitle(action: ToolbarAction): string;
|
|
127
|
+
/**
|
|
128
|
+
* Tooltip and accessible name of a toolbar button (AS-33, WCAG 2.5.3 Label
|
|
129
|
+
* in Name): the title, then the visible label when it has letters or digits
|
|
130
|
+
* the title doesn't contain (`Heading 1, H1`). Symbol labels keep the title.
|
|
131
|
+
*/
|
|
132
|
+
protected getActionName(action: ToolbarAction): string;
|
|
121
133
|
/**
|
|
122
134
|
* Converts the editor's markdown subset to HTML. The source is HTML-escaped
|
|
123
135
|
* *first*, so nothing in it can open a tag or an attribute; the conversions
|
|
@@ -35,12 +35,18 @@ export declare class StepperComponent {
|
|
|
35
35
|
readonly linear: import("@angular/core").InputSignal<boolean>;
|
|
36
36
|
/** Orientation */
|
|
37
37
|
readonly orientation: import("@angular/core").InputSignal<"horizontal" | "vertical">;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Text shown under optional steps; it also ends the step's accessible name.
|
|
40
|
+
* @default 'Optional'
|
|
41
|
+
*/
|
|
39
42
|
readonly optionalLabel: import("@angular/core").InputSignal<string>;
|
|
40
43
|
/**
|
|
41
44
|
* Accessible name template for each step button. Placeholders: `{n}`
|
|
42
|
-
* (1-based step number), `{m}` (step count), `{label}`.
|
|
43
|
-
* `optionalLabel`
|
|
45
|
+
* (1-based step number), `{m}` (step count), `{label}`. The step's visible
|
|
46
|
+
* description and `optionalLabel` follow the filled template,
|
|
47
|
+
* comma-separated (`Step 2 of 3: Profile, Set up your profile`). Keep
|
|
48
|
+
* `{label}` last, so that the name contains the visible text (WCAG 2.5.3).
|
|
49
|
+
* @default 'Step {n} of {m}: {label}'
|
|
44
50
|
*/
|
|
45
51
|
readonly stepAriaLabel: import("@angular/core").InputSignal<string>;
|
|
46
52
|
/** Emitted when active step changes */
|
|
@@ -60,9 +66,14 @@ export declare class StepperComponent {
|
|
|
60
66
|
* only completed steps (and the active one) are reachable.
|
|
61
67
|
*/
|
|
62
68
|
isStepNavigable(index: number): boolean;
|
|
63
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Accessible name for the step button at `index` (AS-33, WCAG 2.5.3 Label
|
|
71
|
+
* in Name): the filled `stepAriaLabel`, then the visible description and
|
|
72
|
+
* `optionalLabel`, comma-separated, so the name contains the visible text.
|
|
73
|
+
* A template that doesn't end with `{label}` gets the label after it.
|
|
74
|
+
*/
|
|
64
75
|
getStepAriaLabel(index: number): string;
|
|
65
|
-
/** Id of the description element
|
|
76
|
+
/** Id of the description element (or null); the description is part of the step's name. */
|
|
66
77
|
getDescriptionId(index: number): string | null;
|
|
67
78
|
/** Navigate to a specific step (only if navigable, see `isStepNavigable`) */
|
|
68
79
|
goToStep(index: number): void;
|