@lifecorner/angular-ui-kit 3.32.0 → 3.33.1

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 (48) hide show
  1. package/fesm2022/lifecorner-angular-ui-kit-bottom-nav.mjs +2 -2
  2. package/fesm2022/lifecorner-angular-ui-kit-bottom-nav.mjs.map +1 -1
  3. package/fesm2022/lifecorner-angular-ui-kit-chat.mjs +21 -5
  4. package/fesm2022/lifecorner-angular-ui-kit-chat.mjs.map +1 -1
  5. package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs +65 -19
  6. package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs.map +1 -1
  7. package/fesm2022/lifecorner-angular-ui-kit-datepicker.mjs +7 -6
  8. package/fesm2022/lifecorner-angular-ui-kit-datepicker.mjs.map +1 -1
  9. package/fesm2022/lifecorner-angular-ui-kit-header.mjs +21 -4
  10. package/fesm2022/lifecorner-angular-ui-kit-header.mjs.map +1 -1
  11. package/fesm2022/lifecorner-angular-ui-kit-internal-a11y.mjs +21 -1
  12. package/fesm2022/lifecorner-angular-ui-kit-internal-a11y.mjs.map +1 -1
  13. package/fesm2022/lifecorner-angular-ui-kit-list.mjs +2 -2
  14. package/fesm2022/lifecorner-angular-ui-kit-list.mjs.map +1 -1
  15. package/fesm2022/lifecorner-angular-ui-kit-log-viewer.mjs +2 -2
  16. package/fesm2022/lifecorner-angular-ui-kit-log-viewer.mjs.map +1 -1
  17. package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs +21 -4
  18. package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs.map +1 -1
  19. package/fesm2022/lifecorner-angular-ui-kit-notification-center.mjs +2 -2
  20. package/fesm2022/lifecorner-angular-ui-kit-notification-center.mjs.map +1 -1
  21. package/fesm2022/lifecorner-angular-ui-kit-select.mjs +5 -4
  22. package/fesm2022/lifecorner-angular-ui-kit-select.mjs.map +1 -1
  23. package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs +4 -4
  24. package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs.map +1 -1
  25. package/fesm2022/lifecorner-angular-ui-kit-table.mjs +2 -2
  26. package/fesm2022/lifecorner-angular-ui-kit-table.mjs.map +1 -1
  27. package/fesm2022/lifecorner-angular-ui-kit-tag-input.mjs +2 -2
  28. package/fesm2022/lifecorner-angular-ui-kit-tag-input.mjs.map +1 -1
  29. package/fesm2022/lifecorner-angular-ui-kit-textarea.mjs +2 -2
  30. package/fesm2022/lifecorner-angular-ui-kit-textarea.mjs.map +1 -1
  31. package/fesm2022/lifecorner-angular-ui-kit-toast.mjs +9 -4
  32. package/fesm2022/lifecorner-angular-ui-kit-toast.mjs.map +1 -1
  33. package/fesm2022/lifecorner-angular-ui-kit-tooltip.mjs +7 -0
  34. package/fesm2022/lifecorner-angular-ui-kit-tooltip.mjs.map +1 -1
  35. package/package.json +1 -1
  36. package/src/styles/theme-contrast.spec.ts +14 -6
  37. package/types/lifecorner-angular-ui-kit-bottom-nav.d.ts +3 -2
  38. package/types/lifecorner-angular-ui-kit-chat.d.ts +14 -1
  39. package/types/lifecorner-angular-ui-kit-combobox.d.ts +18 -1
  40. package/types/lifecorner-angular-ui-kit-datepicker.d.ts +4 -1
  41. package/types/lifecorner-angular-ui-kit-header.d.ts +26 -0
  42. package/types/lifecorner-angular-ui-kit-internal-a11y.d.ts +12 -1
  43. package/types/lifecorner-angular-ui-kit-list.d.ts +6 -1
  44. package/types/lifecorner-angular-ui-kit-next-step-card.d.ts +15 -0
  45. package/types/lifecorner-angular-ui-kit-select.d.ts +7 -0
  46. package/types/lifecorner-angular-ui-kit-sidenav.d.ts +3 -1
  47. package/types/lifecorner-angular-ui-kit-toast.d.ts +17 -3
  48. package/types/lifecorner-angular-ui-kit-tooltip.d.ts +7 -2
@@ -1,4 +1,5 @@
1
1
  import { ControlValueAccessor } from "@angular/forms";
2
+ import { ConnectedPosition } from "@angular/cdk/overlay";
2
3
  import { Observable } from "rxjs";
3
4
  import * as i0 from "@angular/core";
4
5
  export interface ComboboxOption {
@@ -42,6 +43,7 @@ export declare class ComboboxComponent implements ControlValueAccessor {
42
43
  protected readonly createOptionId: string;
43
44
  private readonly inputEl;
44
45
  private readonly dropdownEl;
46
+ private readonly inputWrapper;
45
47
  private readonly elRef;
46
48
  private readonly querySubject;
47
49
  /** Sync options */
@@ -120,9 +122,24 @@ export declare class ComboboxComponent implements ControlValueAccessor {
120
122
  /**
121
123
  * `lang` of the open dropdown (3.30.2, WCAG 3.1.2): the overlay renders under
122
124
  * `<body>`, so it takes the host's closest `[lang]`, else none. Read at every
123
- * opening; `null` while closed, so the server never reads the DOM.
125
+ * opening and, since 3.33, again when a `lang` changes while the list is
126
+ * open; `null` while closed, so the server never reads the DOM.
124
127
  */
125
128
  protected readonly panelLang: import("@angular/core").Signal<string | null>;
129
+ /**
130
+ * The field's width in px while the list is open (3.33, request 052,
131
+ * 049-n2), read at every opening: the list's floor (`min-width`), so it is
132
+ * at least as wide as the field and wider content still grows it. `null`
133
+ * while closed.
134
+ */
135
+ protected readonly fieldWidth: import("@angular/core").Signal<number | null>;
136
+ /**
137
+ * Below the field, else above it, start- then end-aligned (the CDK's
138
+ * defaults), 4 px from the field on either side (3.33, 047-n1: the gap was
139
+ * a margin inside the pane, so it was 0 above). The list is never pushed,
140
+ * so the offset can't move it off the field.
141
+ */
142
+ protected readonly positions: ConnectedPosition[];
126
143
  /** Selected values */
127
144
  protected selectedSingle: import("@angular/core").WritableSignal<ComboboxOption | null>;
128
145
  protected selectedMultiple: import("@angular/core").WritableSignal<ComboboxOption[]>;
@@ -191,10 +191,13 @@ export declare class DatepickerComponent implements ControlValueAccessor {
191
191
  readonly isDisabled: import("@angular/core").Signal<boolean>;
192
192
  /** Month granularity (3.29). */
193
193
  protected readonly isMonthMode: import("@angular/core").Signal<boolean>;
194
+ /** The host's closest `[lang]` while the panel is open, kept live (3.33, 049-n3). */
195
+ private readonly hostLang;
194
196
  /**
195
197
  * `lang` of the open panel (3.30.2, WCAG 3.1.2): the overlay renders under
196
198
  * `<body>`, so it takes the host's closest `[lang]`, else `locale`, else none.
197
- * Read at every opening; `null` while closed, so the server never reads the DOM.
199
+ * Read at every opening and, since 3.33, again when a `lang` changes while
200
+ * the panel is open; `null` while closed, so the server never reads the DOM.
198
201
  */
199
202
  protected readonly panelLang: import("@angular/core").Signal<string | null>;
200
203
  readonly formattedDate: import("@angular/core").Signal<string>;
@@ -25,6 +25,12 @@ export type HeaderVariant = 'default' | 'transparent';
25
25
  * `userAvatarColor`, in a 48 px round button).
26
26
  */
27
27
  export type HeaderUserMenuTrigger = 'icon' | 'avatar';
28
+ /**
29
+ * Where the context button sits up to 640 px (3.33): `inline` in the end
30
+ * group, hidden up to 640 px (as before), or `below`, a row of its own under
31
+ * the title. From 641 px both render it inline.
32
+ */
33
+ export type HeaderContextPlacement = 'inline' | 'below';
28
34
  /**
29
35
  * AppHeaderComponent - Global application header for the LifeCorner shell
30
36
  *
@@ -67,6 +73,9 @@ export type HeaderUserMenuTrigger = 'icon' | 'avatar';
67
73
  * as typed (no uppercase).
68
74
  * - The account menu is at most `min(18rem, 100vw − 2rem)` wide; the name and
69
75
  * email in its header wrap instead of being cut.
76
+ * - `contextPlacement="below"` (3.33): up to 640 px the context button
77
+ * (`contextName`) takes a full-width row of its own under the title instead
78
+ * of being hidden; from 641 px it sits in the end group as before.
70
79
  * - Every built-in label is an input (`homeAriaLabel`, `hamburgerAriaLabel`,
71
80
  * `userMenuAriaLabel`, `navAriaLabel`, `profileLabel`, `logoutLabel`,
72
81
  * `themeToDarkAriaLabel`, `themeToLightAriaLabel`, `contextAriaLabel`);
@@ -201,6 +210,16 @@ export declare class HeaderComponent {
201
210
  readonly autoToggleTheme: import("@angular/core").InputSignal<boolean>;
202
211
  readonly contextName: import("@angular/core").InputSignal<string>;
203
212
  readonly contextLabel: import("@angular/core").InputSignal<string>;
213
+ /**
214
+ * Where the context button sits up to 640 px (3.33, app-shell row 1).
215
+ * `'inline'`: in the end group, hidden up to 640 px (as before). `'below'`:
216
+ * up to 640 px a row of its own under the title, as wide as the header and
217
+ * at least 44 px high; title, `end` slot and account menu stay in the first
218
+ * row. From 641 px both render the button inline. No second row without
219
+ * `contextName`.
220
+ * @default 'inline'
221
+ */
222
+ readonly contextPlacement: import("@angular/core").InputSignal<HeaderContextPlacement>;
204
223
  readonly menuSize: import("@angular/core").InputSignal<"sm" | "md" | "lg">;
205
224
  readonly showProfileMenuItem: import("@angular/core").InputSignal<boolean>;
206
225
  /** Render the account menu (avatar trigger with Profile/Logout). */
@@ -281,6 +300,8 @@ export declare class HeaderComponent {
281
300
  * `contextName`, so a voice-control user can say what they see.
282
301
  */
283
302
  protected readonly contextButtonAriaLabel: import("@angular/core").Signal<string>;
303
+ /** `contextPlacement="below"` with a context button to place (3.33). */
304
+ protected readonly contextBelow: import("@angular/core").Signal<boolean>;
284
305
  /**
285
306
  * Get menu items for profile dropdown
286
307
  */
@@ -459,6 +480,11 @@ export declare class HeaderComponent {
459
480
  "required": false;
460
481
  "isSignal": true;
461
482
  };
483
+ "contextPlacement": {
484
+ "alias": "contextPlacement";
485
+ "required": false;
486
+ "isSignal": true;
487
+ };
462
488
  "menuSize": {
463
489
  "alias": "menuSize";
464
490
  "required": false;
@@ -1,3 +1,4 @@
1
+ import { Signal } from "@angular/core";
1
2
  /**
2
3
  * Accessible names that contain the visible text (WCAG 2.5.3 Label in Name,
3
4
  * AS-33). The containment test follows axe-core 4.14's
@@ -35,4 +36,14 @@ export declare function nameWithText(label: string, text: string): string;
35
36
  * The value is taken as is (`lang=""` is the unknown language, as DOM
36
37
  * inheritance gives it). `null` without a DOM `closest` (server DOM).
37
38
  */
38
- export declare function closestLang(el: Element | null | undefined): string | null;
39
+ export declare function closestLang(el: Element | null | undefined): string | null;
40
+ /**
41
+ * 3.33 (request 052, 049-n3): `closestLang` of the component's host while
42
+ * `open()` is true, `null` while it is false (so the server never reads the
43
+ * DOM). While open, one `MutationObserver` watches every `lang` attribute of
44
+ * the document, so a host language that changes with the panel open shows
45
+ * without reopening; it is disconnected when the panel closes or the
46
+ * component is destroyed. Call it in the component's injection context (it
47
+ * injects the host element and creates an effect).
48
+ */
49
+ export declare function openPanelLang(open: Signal<boolean>): Signal<string | null>;
@@ -77,7 +77,12 @@ export interface ListItem {
77
77
  id?: string;
78
78
  /** Whether the item is disabled */
79
79
  disabled?: boolean;
80
- /** Whether the item is selected / highlighted */
80
+ /**
81
+ * Whether the item is the current choice: a tinted row and, since 3.33,
82
+ * `aria-current="true"` on the row element (the button with `clickable`,
83
+ * the link with `href`, the row otherwise). Pair it with a visible mark such
84
+ * as a badge; the tint alone is colour.
85
+ */
81
86
  selected?: boolean;
82
87
  /** Any additional data */
83
88
  [key: string]: any;
@@ -55,6 +55,9 @@ export type NextStepCardActionSize = 'sm' | 'md' | 'lg';
55
55
  * `stacked` for several equal-width actions; `titleTag` for a heading
56
56
  * - `actionsStyle="equal"` (3.16, BA-5): a question with two answers of the
57
57
  * same weight, both outline buttons in the primary tone, primary first
58
+ * - `focusTitle()` (3.33): moves focus to the title (`tabindex="-1"`, out of
59
+ * the Tab order) after an action replaced the card's state, so focus
60
+ * doesn't fall back to the page (WCAG 2.4.3)
58
61
  *
59
62
  * The host is a size container (`container-type: inline-size`) and takes the
60
63
  * full inline size of its parent.
@@ -168,6 +171,18 @@ export declare class NextStepCardComponent implements AfterViewChecked {
168
171
  /** Emits when the secondary action is clicked. */
169
172
  secondaryClick: import("@angular/core").OutputEmitterRef<void>;
170
173
  private actionsSlot;
174
+ /** The title element of whichever `titleTag` branch is rendered. */
175
+ private titleEl;
176
+ /**
177
+ * Moves focus to the card's title (3.33), e.g. after an action replaced the
178
+ * card's state, so focus doesn't fall back to the page (WCAG 2.4.3). Gives
179
+ * the title `tabindex="-1"` first: it stays out of the Tab order. Call it
180
+ * after the new state has rendered, e.g.
181
+ * `afterNextRender(() => this.card().focusTitle(), { injector })` with
182
+ * `card = viewChild.required(NextStepCardComponent)`. Does nothing while no
183
+ * title is rendered.
184
+ */
185
+ focusTitle(): void;
171
186
  /**
172
187
  * Whether content was projected into `[slot='actions']` — projected actions
173
188
  * fully replace the built-in buttons.
@@ -124,6 +124,13 @@ export declare class SelectComponent implements ControlValueAccessor {
124
124
  * Read at every opening; `null` while closed, so the server never reads the DOM.
125
125
  */
126
126
  protected readonly panelLang: import("@angular/core").Signal<string | null>;
127
+ /**
128
+ * The trigger's width in px while the dropdown is open (3.33, request 052,
129
+ * 050-n4), read at every opening: the panel's floor next to its 200 px
130
+ * (`min-width`), so it is at least as wide as the field and wider content
131
+ * still grows it. `null` while closed.
132
+ */
133
+ protected readonly fieldWidth: import("@angular/core").Signal<number | null>;
127
134
  readonly filteredOptions: import("@angular/core").Signal<SelectOption[]>;
128
135
  /** Keyboard highlight; resets whenever the visible option list changes so it never points at a stale row. */
129
136
  readonly highlightedIndex: import("@angular/core").WritableSignal<number>;
@@ -209,7 +209,9 @@ export declare class SidenavComponent implements OnDestroy {
209
209
  * the collapsed rail, where labels are hidden, the label and this text name
210
210
  * the item. `{value}` is replaced with the badge value, e.g.
211
211
  * `'{value} offen'` → "Stammdaten 1 offen". The badge itself is hidden from
212
- * screen readers. Empty: the badge isn't read.
212
+ * screen readers. Empty: the badge isn't read. Since 3.33 a badged rail
213
+ * item has no `title` (it repeated the label as a description); its
214
+ * tooltip still shows on hover and focus.
213
215
  *
214
216
  * @default '{value}'
215
217
  */
@@ -192,9 +192,16 @@ type ToastLive = 'polite' | 'assertive';
192
192
  * hidden, the bottom offset is the safe-area inset. Without a shell, and in
193
193
  * prerendered HTML, both are `0px`, as before. Every stack is at most as high
194
194
  * as the space between the offsets and scrolls when its toasts need more
195
- * (200 % text), so each toast stays reachable. In the shell, prefer the
196
- * `bottom-*` positions: a top toast can still cover a page title placed
197
- * right under the header.
195
+ * (200 % text), so each toast stays reachable.
196
+ *
197
+ * Bottom stacks show the newest toast nearest the edge (3.33); top stacks the
198
+ * oldest at the top. The toasts of a stack are 8 px (`--spacing-2`) apart
199
+ * (3.33.1), within a live region and across the two; an empty region and the
200
+ * last toast add no space, and the stack keeps its 16 px padding. A `top-*`
201
+ * stack lies over the page on purpose (a toast stays visible wherever the
202
+ * page is scrolled), so in the shell it can cover a title right under the
203
+ * header (at 360 px a toast at y 72 over an h1 at y 80): prefer `bottom-*`
204
+ * there.
198
205
  *
199
206
  * CSS hooks (set them on `lc-toast-outlet` or any ancestor, e.g. `:root`;
200
207
  * each wins over the shell's value; write lengths, `0px` rather than `0`):
@@ -215,6 +222,13 @@ export declare class ToastOutletComponent {
215
222
  readonly closeAriaLabel: import("@angular/core").InputSignal<string>;
216
223
  /** Toasts keyed by `${position}:${politeness}` in the order they were shown. */
217
224
  private readonly groups;
225
+ /**
226
+ * 3.33 (request 052, 045-n2): per `bottom-*` stack, the live level of its
227
+ * newest toast. That region gets `lc-toast-outlet__region--latest` and is
228
+ * laid out at the edge, so the newest toast sits nearest the edge (and, in
229
+ * a scrolling stack, in view at rest). DOM and announcement order stay.
230
+ */
231
+ protected readonly latestLive: import("@angular/core").Signal<Map<ToastPosition, ToastLive>>;
218
232
  protected toastsFor(position: ToastPosition, live: ToastLive): readonly Toast[];
219
233
  protected onClosed(id: string): void;
220
234
  /** Errors and warnings interrupt (assertive), everything else waits its turn. */
@@ -19,7 +19,8 @@ export declare class TooltipContentComponent {
19
19
  *
20
20
  * Shows on hover and on keyboard focus of the host or of an element inside it
21
21
  * (3.32). On a wrapper such as `lc-button`, the tooltip describes and anchors
22
- * to the wrapped `<button>`.
22
+ * to the wrapped `<button>`. On a host with several controls, the one that
23
+ * has focus is described (3.33); on hover, the first.
23
24
  *
24
25
  * @example
25
26
  * ```html
@@ -105,7 +106,11 @@ export declare class TooltipDirective implements OnDestroy {
105
106
  /** Preferred position first, then the fallbacks the overlay may flip to. */
106
107
  private getPositions;
107
108
  private setPositionClass;
108
- /** The described element: the host if it is a control, else the first control inside it, else the host. */
109
+ /**
110
+ * The described element: the host if it is a control, else the control
111
+ * inside it that has focus (3.33, request 052, 051-n1: a host with several
112
+ * controls), else the first control inside it, else the host.
113
+ */
109
114
  private resolveControl;
110
115
  /** The overlay origin: the control when it is the host's only element child (a wrapper), else the host. */
111
116
  private resolveAnchor;