@lifecorner/angular-ui-kit 3.14.0 → 3.16.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/README.md +2 -1
- package/fesm2022/lifecorner-angular-ui-kit-app-shell.mjs +36 -2
- package/fesm2022/lifecorner-angular-ui-kit-app-shell.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-avatar-group.mjs +2 -1
- package/fesm2022/lifecorner-angular-ui-kit-avatar-group.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-avatar.mjs +23 -5
- package/fesm2022/lifecorner-angular-ui-kit-avatar.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-button.mjs +39 -6
- package/fesm2022/lifecorner-angular-ui-kit-button.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-choice-prompt.mjs +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-choice-prompt.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-confirm-dialog.mjs +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-confirm-dialog.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-copy-field.mjs +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-copy-field.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-empty-state.mjs +42 -5
- package/fesm2022/lifecorner-angular-ui-kit-empty-state.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-header.mjs +21 -3
- package/fesm2022/lifecorner-angular-ui-kit-header.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-icon.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-icon.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-icons.mjs +26 -2
- package/fesm2022/lifecorner-angular-ui-kit-icons.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-internal-icon-set.mjs +10 -1
- package/fesm2022/lifecorner-angular-ui-kit-internal-icon-set.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-list.mjs +30 -6
- package/fesm2022/lifecorner-angular-ui-kit-list.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-money.mjs +250 -0
- package/fesm2022/lifecorner-angular-ui-kit-money.mjs.map +1 -0
- package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs +22 -2
- package/fesm2022/lifecorner-angular-ui-kit-next-step-card.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-page-header.mjs +20 -3
- package/fesm2022/lifecorner-angular-ui-kit-page-header.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-sidenav-placeholder.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-sidenav-placeholder.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs +2 -2
- package/fesm2022/lifecorner-angular-ui-kit-sidenav.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-switch.mjs +21 -4
- package/fesm2022/lifecorner-angular-ui-kit-switch.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-table.mjs +72 -7
- package/fesm2022/lifecorner-angular-ui-kit-table.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit.mjs +1 -0
- package/package.json +5 -1
- package/src/styles/theme-contrast.spec.ts +74 -0
- package/types/lifecorner-angular-ui-kit-app-shell.d.ts +56 -0
- package/types/lifecorner-angular-ui-kit-avatar.d.ts +24 -0
- package/types/lifecorner-angular-ui-kit-button.d.ts +31 -0
- package/types/lifecorner-angular-ui-kit-empty-state.d.ts +38 -0
- package/types/lifecorner-angular-ui-kit-header.d.ts +15 -2
- package/types/lifecorner-angular-ui-kit-icon.d.ts +2 -1
- package/types/lifecorner-angular-ui-kit-icons.d.ts +5 -1
- package/types/lifecorner-angular-ui-kit-list.d.ts +38 -0
- package/types/lifecorner-angular-ui-kit-money.d.ts +150 -0
- package/types/lifecorner-angular-ui-kit-next-step-card.d.ts +26 -0
- package/types/lifecorner-angular-ui-kit-page-header.d.ts +20 -0
- package/types/lifecorner-angular-ui-kit-sidenav-placeholder.d.ts +4 -2
- package/types/lifecorner-angular-ui-kit-sidenav.d.ts +5 -2
- package/types/lifecorner-angular-ui-kit-switch.d.ts +19 -0
- package/types/lifecorner-angular-ui-kit-table.d.ts +42 -1
- package/types/lifecorner-angular-ui-kit.d.ts +1 -0
|
@@ -16,6 +16,13 @@ export type AvatarLoading = 'eager' | 'lazy';
|
|
|
16
16
|
* the name or initials beside the colour — colour is never the only cue.
|
|
17
17
|
*/
|
|
18
18
|
export type AvatarColor = 'default' | 'member-1' | 'member-2' | 'member-3' | 'member-4' | 'member-5' | 'member-6';
|
|
19
|
+
/**
|
|
20
|
+
* What `lc-avatar` shows with no image and no name (3.15).
|
|
21
|
+
* - `initials`: "?"
|
|
22
|
+
* - `person`: a person symbol on a neutral disc (`--color-neutral-300`, glyph
|
|
23
|
+
* `--color-neutral-700`; `color` is ignored while it shows)
|
|
24
|
+
*/
|
|
25
|
+
export type AvatarFallback = 'initials' | 'person';
|
|
19
26
|
/** The six member colours in their order (`AvatarColor` without `default`). */
|
|
20
27
|
export declare const AVATAR_MEMBER_COLORS: readonly AvatarColor[];
|
|
21
28
|
/**
|
|
@@ -37,6 +44,8 @@ export declare function ɵavatarInitials(name: string | undefined): string;
|
|
|
37
44
|
* - `ring`: a gap in the page colour around the avatar, for stacks and for
|
|
38
45
|
* avatars on images or tints
|
|
39
46
|
* - Accessible with alt text support
|
|
47
|
+
* - `fallback="person"`: a person symbol on a neutral disc instead of "?"
|
|
48
|
+
* when there is no name (3.15)
|
|
40
49
|
*
|
|
41
50
|
* @example
|
|
42
51
|
* ```html
|
|
@@ -86,10 +95,20 @@ export declare class AvatarComponent {
|
|
|
86
95
|
* button labelled "Menu for Tom Ek".
|
|
87
96
|
*/
|
|
88
97
|
decorative: import("@angular/core").InputSignal<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* What shows with no image and no name: `'initials'` shows "?"; `'person'`
|
|
100
|
+
* shows a person symbol on a neutral disc (`color` is ignored while it
|
|
101
|
+
* shows). With a `name`, both show the initials. The accessible name stays
|
|
102
|
+
* `alt`, then `name`, then "Avatar".
|
|
103
|
+
* @default 'initials'
|
|
104
|
+
*/
|
|
105
|
+
fallback: import("@angular/core").InputSignal<AvatarFallback>;
|
|
89
106
|
/**
|
|
90
107
|
* Computed initials from name
|
|
91
108
|
*/
|
|
92
109
|
initials: import("@angular/core").Signal<string>;
|
|
110
|
+
/** The person symbol: `fallback="person"`, no image (or a broken one) and no name. */
|
|
111
|
+
protected readonly showPerson: import("@angular/core").Signal<boolean>;
|
|
93
112
|
/**
|
|
94
113
|
* Computed CSS classes for the avatar
|
|
95
114
|
*/
|
|
@@ -160,5 +179,10 @@ export declare class AvatarComponent {
|
|
|
160
179
|
"required": false;
|
|
161
180
|
"isSignal": true;
|
|
162
181
|
};
|
|
182
|
+
"fallback": {
|
|
183
|
+
"alias": "fallback";
|
|
184
|
+
"required": false;
|
|
185
|
+
"isSignal": true;
|
|
186
|
+
};
|
|
163
187
|
}, {}, never, never, true, never>;
|
|
164
188
|
}
|
|
@@ -3,6 +3,11 @@ import { ElementRef } from "@angular/core";
|
|
|
3
3
|
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'danger' | 'warning' | 'info' | 'inverse';
|
|
4
4
|
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
5
|
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
6
|
+
/**
|
|
7
|
+
* Colour tone of `variant="outline"` (3.15). `primary`: text and border in the
|
|
8
|
+
* primary colour. Other variants ignore it.
|
|
9
|
+
*/
|
|
10
|
+
export type ButtonTone = 'neutral' | 'primary';
|
|
6
11
|
export declare class ButtonComponent {
|
|
7
12
|
/**
|
|
8
13
|
* Visual variant. `inverse` is a white pill with dark ink and a white focus
|
|
@@ -14,6 +19,14 @@ export declare class ButtonComponent {
|
|
|
14
19
|
* @default 'primary'
|
|
15
20
|
*/
|
|
16
21
|
readonly variant: import("@angular/core").InputSignal<ButtonVariant>;
|
|
22
|
+
/**
|
|
23
|
+
* Colour tone of `variant="outline"`: `'primary'` sets text and border to
|
|
24
|
+
* the primary colour (`--color-primary-700` / `-600`; hover
|
|
25
|
+
* `--color-surface-selected`, active `--color-primary-200`). Other variants
|
|
26
|
+
* ignore it.
|
|
27
|
+
* @default 'neutral'
|
|
28
|
+
*/
|
|
29
|
+
readonly tone: import("@angular/core").InputSignal<ButtonTone>;
|
|
17
30
|
readonly size: import("@angular/core").InputSignal<ButtonSize>;
|
|
18
31
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
19
32
|
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
@@ -71,6 +84,11 @@ export declare class ButtonComponent {
|
|
|
71
84
|
"required": false;
|
|
72
85
|
"isSignal": true;
|
|
73
86
|
};
|
|
87
|
+
"tone": {
|
|
88
|
+
"alias": "tone";
|
|
89
|
+
"required": false;
|
|
90
|
+
"isSignal": true;
|
|
91
|
+
};
|
|
74
92
|
"size": {
|
|
75
93
|
"alias": "size";
|
|
76
94
|
"required": false;
|
|
@@ -178,6 +196,14 @@ export declare class ButtonLinkComponent {
|
|
|
178
196
|
* @default 'primary'
|
|
179
197
|
*/
|
|
180
198
|
readonly variant: import("@angular/core").InputSignal<ButtonVariant>;
|
|
199
|
+
/**
|
|
200
|
+
* Colour tone of `variant="outline"`, as on `lc-button`: `'primary'` sets
|
|
201
|
+
* text and border to the primary colour (`--color-primary-700` / `-600`;
|
|
202
|
+
* hover `--color-surface-selected`, active `--color-primary-200`). Other
|
|
203
|
+
* variants ignore it.
|
|
204
|
+
* @default 'neutral'
|
|
205
|
+
*/
|
|
206
|
+
readonly tone: import("@angular/core").InputSignal<ButtonTone>;
|
|
181
207
|
/** Size, as on `lc-button`. `lg` (48.5 px high) meets the 44 px touch target. */
|
|
182
208
|
readonly size: import("@angular/core").InputSignal<ButtonSize>;
|
|
183
209
|
/** Stretch the link to the full width of its container. */
|
|
@@ -208,6 +234,11 @@ export declare class ButtonLinkComponent {
|
|
|
208
234
|
"required": false;
|
|
209
235
|
"isSignal": true;
|
|
210
236
|
};
|
|
237
|
+
"tone": {
|
|
238
|
+
"alias": "tone";
|
|
239
|
+
"required": false;
|
|
240
|
+
"isSignal": true;
|
|
241
|
+
};
|
|
211
242
|
"size": {
|
|
212
243
|
"alias": "size";
|
|
213
244
|
"required": false;
|
|
@@ -2,6 +2,20 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export type EmptyStateSize = 'sm' | 'md' | 'lg';
|
|
3
3
|
/** Heading level of `lc-empty-state`'s heading (3.3, G-9). */
|
|
4
4
|
export type EmptyStateHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
/**
|
|
6
|
+
* Look of `lc-empty-state`'s icon (3.15).
|
|
7
|
+
* - `neutral`: the bare 40 px icon in `--color-text-tertiary`
|
|
8
|
+
* - `primary`: a 24 px icon in `--color-primary-700` on a 48 px
|
|
9
|
+
* `--color-primary-100` circle
|
|
10
|
+
*/
|
|
11
|
+
export type EmptyStateIconTone = 'neutral' | 'primary';
|
|
12
|
+
/**
|
|
13
|
+
* Text scale of `lc-empty-state` (3.15), beside `size` (the padding).
|
|
14
|
+
* - `sm`: 14 px message
|
|
15
|
+
* - `md`: the state-page scale — 16/24 px message, 20 px heading, 16 px below
|
|
16
|
+
* the icon and 24 px before the projected action
|
|
17
|
+
*/
|
|
18
|
+
export type EmptyStateMessageSize = 'sm' | 'md';
|
|
5
19
|
/**
|
|
6
20
|
* Empty state component for "no data" placeholder displays.
|
|
7
21
|
*
|
|
@@ -49,6 +63,20 @@ export declare class EmptyStateComponent {
|
|
|
49
63
|
* Description text
|
|
50
64
|
*/
|
|
51
65
|
readonly message: import("@angular/core").InputSignal<string | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* `'neutral'`: the bare 40 px icon in `--color-text-tertiary`. `'primary'`:
|
|
68
|
+
* a 24 px icon in `--color-primary-700` on a 48 px `--color-primary-100`
|
|
69
|
+
* circle. Decorative in both tones.
|
|
70
|
+
* @default 'neutral'
|
|
71
|
+
*/
|
|
72
|
+
readonly iconTone: import("@angular/core").InputSignal<EmptyStateIconTone>;
|
|
73
|
+
/**
|
|
74
|
+
* `'sm'`: 14 px message. `'md'`, for a state page: 16/24 px message, 20 px
|
|
75
|
+
* heading, 16 px below the icon and 24 px before the projected action.
|
|
76
|
+
* Wrap several actions in one row element.
|
|
77
|
+
* @default 'sm'
|
|
78
|
+
*/
|
|
79
|
+
readonly messageSize: import("@angular/core").InputSignal<EmptyStateMessageSize>;
|
|
52
80
|
protected readonly hostClasses: import("@angular/core").Signal<string>;
|
|
53
81
|
static ɵfac: i0.ɵɵFactoryDeclaration<EmptyStateComponent, never>;
|
|
54
82
|
static ɵcmp: i0.ɵɵComponentDeclaration<EmptyStateComponent, "lc-empty-state", never, {
|
|
@@ -77,5 +105,15 @@ export declare class EmptyStateComponent {
|
|
|
77
105
|
"required": false;
|
|
78
106
|
"isSignal": true;
|
|
79
107
|
};
|
|
108
|
+
"iconTone": {
|
|
109
|
+
"alias": "iconTone";
|
|
110
|
+
"required": false;
|
|
111
|
+
"isSignal": true;
|
|
112
|
+
};
|
|
113
|
+
"messageSize": {
|
|
114
|
+
"alias": "messageSize";
|
|
115
|
+
"required": false;
|
|
116
|
+
"isSignal": true;
|
|
117
|
+
};
|
|
80
118
|
}, {}, never, ["*"], true, never>;
|
|
81
119
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AvatarColor } from "@lifecorner/angular-ui-kit/avatar";
|
|
1
|
+
import { AvatarColor, AvatarFallback } from "@lifecorner/angular-ui-kit/avatar";
|
|
2
2
|
import { MenuItem } from "@lifecorner/angular-ui-kit/menu";
|
|
3
3
|
import { ThemeService } from "@lifecorner/angular-ui-kit/theme";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -59,7 +59,8 @@ export type HeaderUserMenuTrigger = 'icon' | 'avatar';
|
|
|
59
59
|
* cannot stay over scrolling text).
|
|
60
60
|
* - `userMenuTrigger="avatar"`: the account button is the person's initials
|
|
61
61
|
* avatar (`userAvatarColor` for the member colour, `userAvatarSrc` for a
|
|
62
|
-
* photo
|
|
62
|
+
* photo, `userAvatarFallback="person"` for a person symbol while there is
|
|
63
|
+
* no name) in a 48 px round button; the icon trigger is 44 px high in every
|
|
63
64
|
* density.
|
|
64
65
|
* - The subtitle (e.g. a household name) stays on one line and ends with "…";
|
|
65
66
|
* the full text is its `title` and stays in the accessible text. It is shown
|
|
@@ -174,6 +175,13 @@ export declare class HeaderComponent {
|
|
|
174
175
|
readonly userAvatarSrc: import("@angular/core").InputSignal<string>;
|
|
175
176
|
/** Colour of the account avatar's initials: `default` or a member colour `member-1` … `member-6`. */
|
|
176
177
|
readonly userAvatarColor: import("@angular/core").InputSignal<AvatarColor>;
|
|
178
|
+
/**
|
|
179
|
+
* Passed to the trigger avatar and the menu avatar as `fallback` (3.15):
|
|
180
|
+
* `person` shows a person symbol on a neutral disc instead of "?" while
|
|
181
|
+
* `userName` is empty.
|
|
182
|
+
* @default 'initials'
|
|
183
|
+
*/
|
|
184
|
+
readonly userAvatarFallback: import("@angular/core").InputSignal<AvatarFallback>;
|
|
177
185
|
readonly showHamburger: import("@angular/core").InputSignal<boolean>;
|
|
178
186
|
/**
|
|
179
187
|
* Open state of the sidenav the hamburger controls. When bound, the toggle
|
|
@@ -411,6 +419,11 @@ export declare class HeaderComponent {
|
|
|
411
419
|
"required": false;
|
|
412
420
|
"isSignal": true;
|
|
413
421
|
};
|
|
422
|
+
"userAvatarFallback": {
|
|
423
|
+
"alias": "userAvatarFallback";
|
|
424
|
+
"required": false;
|
|
425
|
+
"isSignal": true;
|
|
426
|
+
};
|
|
414
427
|
"showHamburger": {
|
|
415
428
|
"alias": "showHamburger";
|
|
416
429
|
"required": false;
|
|
@@ -284,7 +284,8 @@ export type IconName = string;
|
|
|
284
284
|
* `provideLcIcons()` or loaded with the kit's set (3.6, AS-17). Covers the
|
|
285
285
|
* hand-picked inline set, the Tabler icons inlined at build time (mail,
|
|
286
286
|
* users, settings, logout, key, chevron-right, …) and aliases that resolve
|
|
287
|
-
* to either — the
|
|
287
|
+
* to either — the names of 3.5.1, plus `wallet`, `building-bank` and
|
|
288
|
+
* `shield-lock` since 3.16 (TD-3). Use it to lint an app or a static
|
|
288
289
|
* site against icons that would be fetched.
|
|
289
290
|
*
|
|
290
291
|
* @example
|
|
@@ -132,8 +132,12 @@ export declare const ICON_ALERT_CIRCLE: LcIconDefinition;
|
|
|
132
132
|
export declare const ICON_ALERT_CIRCLE_SOLID: LcIconDefinition;
|
|
133
133
|
export declare const ICON_CIRCLE_X: LcIconDefinition;
|
|
134
134
|
export declare const ICON_CIRCLE_X_SOLID: LcIconDefinition;
|
|
135
|
+
export declare const ICON_WALLET: LcIconDefinition;
|
|
136
|
+
export declare const ICON_BUILDING_BANK: LcIconDefinition;
|
|
137
|
+
export declare const ICON_SHIELD_LOCK: LcIconDefinition;
|
|
138
|
+
export declare const ICON_SHIELD_LOCK_SOLID: LcIconDefinition;
|
|
135
139
|
/**
|
|
136
|
-
* Every glyph above (
|
|
140
|
+
* Every glyph above (137): `provideLcIcons(BUNDLED_ICONS)` restores the
|
|
137
141
|
* synchronous rendering of 3.5.1 for every inline name, e.g. in tests or
|
|
138
142
|
* Storybook. An app that imports it bundles all of them.
|
|
139
143
|
*/
|
|
@@ -64,6 +64,15 @@ export interface ListItem {
|
|
|
64
64
|
* label must be part of it (WCAG 2.5.3).
|
|
65
65
|
*/
|
|
66
66
|
actionAriaLabel?: string;
|
|
67
|
+
/**
|
|
68
|
+
* URL of the row link (3.16, TD-4). The row renders as an `<a>` over its
|
|
69
|
+
* full area (at least 44 px high) with real link semantics (middle click,
|
|
70
|
+
* "open in new tab"). Not rendered with `href`: `action` (no control inside
|
|
71
|
+
* a link; a dev warning). Not emitted: `itemClick` (see `linkClick`). With
|
|
72
|
+
* `disabled` the row is the plain disabled row, no link. A custom
|
|
73
|
+
* `lcListItem` template must not hold controls in `href` rows.
|
|
74
|
+
*/
|
|
75
|
+
href?: string;
|
|
67
76
|
/** Item identifier */
|
|
68
77
|
id?: string;
|
|
69
78
|
/** Whether the item is disabled */
|
|
@@ -77,6 +86,15 @@ export interface ListItem {
|
|
|
77
86
|
* List item size
|
|
78
87
|
*/
|
|
79
88
|
export type ListSize = 'sm' | 'md' | 'lg';
|
|
89
|
+
/**
|
|
90
|
+
* A plain click (or Enter) on an `href` row (3.16, TD-4): `item` is the row,
|
|
91
|
+
* `event` the click. Call `event.preventDefault()` to navigate with your
|
|
92
|
+
* router instead of a full page load.
|
|
93
|
+
*/
|
|
94
|
+
export interface ListLinkClickEvent {
|
|
95
|
+
item: ListItem;
|
|
96
|
+
event: MouseEvent;
|
|
97
|
+
}
|
|
80
98
|
/**
|
|
81
99
|
* List component for displaying structured item collections.
|
|
82
100
|
*
|
|
@@ -87,6 +105,8 @@ export type ListSize = 'sm' | 'md' | 'lg';
|
|
|
87
105
|
* - Icon and avatar support per item
|
|
88
106
|
* - Action buttons with click events
|
|
89
107
|
* - Accessible with ARIA list role; `clickable` rows are keyboard-operable
|
|
108
|
+
* - `ListItem.href` rows are real links over the full row (3.16, TD-4);
|
|
109
|
+
* `linkClick` hands plain clicks to your router
|
|
90
110
|
*
|
|
91
111
|
* @example
|
|
92
112
|
* ```html
|
|
@@ -138,6 +158,18 @@ export declare class ListComponent {
|
|
|
138
158
|
readonly itemClick: import("@angular/core").OutputEmitterRef<ListItem>;
|
|
139
159
|
/** Event emitted when an action button is clicked */
|
|
140
160
|
readonly actionClick: import("@angular/core").OutputEmitterRef<ListItem>;
|
|
161
|
+
/**
|
|
162
|
+
* A plain click (or Enter) on an `href` row: primary button, no
|
|
163
|
+
* Ctrl/Cmd/Shift/Alt (3.16, TD-4). Emitted before the browser follows the
|
|
164
|
+
* link; call `event.preventDefault()` and navigate with your router for an
|
|
165
|
+
* in-app route (`router.navigateByUrl(item.href)`). The kit never prevents
|
|
166
|
+
* the default; modifier and middle clicks are never emitted, so "open in new
|
|
167
|
+
* tab" keeps working.
|
|
168
|
+
*/
|
|
169
|
+
readonly linkClick: import("@angular/core").OutputEmitterRef<ListLinkClickEvent>;
|
|
170
|
+
constructor();
|
|
171
|
+
/** Whether a row renders as a link: `href` set and not disabled. */
|
|
172
|
+
protected isLinkRow(item: ListItem): boolean;
|
|
141
173
|
/**
|
|
142
174
|
* Computed CSS classes for the list
|
|
143
175
|
*/
|
|
@@ -161,6 +193,11 @@ export declare class ListComponent {
|
|
|
161
193
|
* Handle action button click
|
|
162
194
|
*/
|
|
163
195
|
onActionClick(item: ListItem): void;
|
|
196
|
+
/**
|
|
197
|
+
* A click on a link row: only a plain primary click reaches `linkClick`.
|
|
198
|
+
* The default (following the link) is left to the browser and the consumer.
|
|
199
|
+
*/
|
|
200
|
+
protected onLinkClick(event: MouseEvent, item: ListItem): void;
|
|
164
201
|
static ɵfac: i0.ɵɵFactoryDeclaration<ListComponent, never>;
|
|
165
202
|
static ɵcmp: i0.ɵɵComponentDeclaration<ListComponent, "lc-list", never, {
|
|
166
203
|
"items": {
|
|
@@ -211,5 +248,6 @@ export declare class ListComponent {
|
|
|
211
248
|
}, {
|
|
212
249
|
"itemClick": "itemClick";
|
|
213
250
|
"actionClick": "actionClick";
|
|
251
|
+
"linkClick": "linkClick";
|
|
214
252
|
}, ["itemTemplate"], never, true, never>;
|
|
215
253
|
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* How the sign of an amount shows, as `Intl.NumberFormat`'s `signDisplay`:
|
|
4
|
+
* - `auto`: negative amounts only (−42,17 €)
|
|
5
|
+
* - `always`: plus and minus, also on zero (+0,00 €)
|
|
6
|
+
* - `exceptZero`: plus and minus, no sign on zero
|
|
7
|
+
* - `never`: no sign
|
|
8
|
+
*/
|
|
9
|
+
type MoneySignDisplay = 'auto' | 'always' | 'exceptZero' | 'never';
|
|
10
|
+
/** Options of {@link formatMoney}. */
|
|
11
|
+
interface MoneyFormatOptions {
|
|
12
|
+
/** BCP 47 locale. An invalid one falls back to `en-US`. @default 'en-US' */
|
|
13
|
+
locale?: string;
|
|
14
|
+
/** As `Intl.NumberFormat`'s `signDisplay`. @default 'auto' */
|
|
15
|
+
signDisplay?: MoneySignDisplay;
|
|
16
|
+
/** Spoken word for the minus sign. @default 'minus' */
|
|
17
|
+
minusLabel?: string;
|
|
18
|
+
/** Spoken word for the plus sign. @default 'plus' */
|
|
19
|
+
plusLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
/** A formatted amount: the visible text and the words a screen reader speaks. */
|
|
22
|
+
interface MoneyText {
|
|
23
|
+
/** Visible text, e.g. „−42,17 €“ (U+2212 minus, U+00A0 from `Intl`). */
|
|
24
|
+
text: string;
|
|
25
|
+
/** Spoken text, e.g. „minus 42,17 Euro“. */
|
|
26
|
+
spoken: string;
|
|
27
|
+
}
|
|
28
|
+
/** The ISO 4217 minor-unit exponent of `currency` (2 unless listed). */
|
|
29
|
+
declare function moneyMinorUnits(currency: string): number;
|
|
30
|
+
/** Text direction of an amount formatted for `locale`. */
|
|
31
|
+
declare function moneyDirection(locale: string): 'ltr' | 'rtl';
|
|
32
|
+
/**
|
|
33
|
+
* Formats an amount of money given in integer minor units (cents, yen, fils)
|
|
34
|
+
* exactly, never through a float: the decimal string goes into `Intl`.
|
|
35
|
+
* Returns `null` for an amount that is not a safe integer or a currency that
|
|
36
|
+
* is not a three-letter code. This is the formatter of `lc-money`, for table
|
|
37
|
+
* `formatter`s and texts.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* formatMoney(-4217, 'EUR', { locale: 'de-DE' });
|
|
42
|
+
* // { text: '−42,17 €', spoken: 'minus 42,17 Euro' }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function formatMoney(amountMinor: number, currency: string, options?: MoneyFormatOptions): MoneyText | null;
|
|
46
|
+
/**
|
|
47
|
+
* Displays an amount of money (3.16, BA-4): locale, currency, sign, tabular
|
|
48
|
+
* figures and a spoken text. Display only, no input parsing or conversion.
|
|
49
|
+
*
|
|
50
|
+
* - `amountMinor` is an integer in the currency's minor units (cents, yen,
|
|
51
|
+
* fils), formatted exactly through a decimal string, never a float. Minor
|
|
52
|
+
* units follow ISO 4217: 2, except 0 (BIF CLP DJF GNF ISK JPY KMF KRW PYG
|
|
53
|
+
* RWF UGX UYI VND VUV XAF XOF XPF), 3 (BHD IQD JOD KWD LYD OMR TND) and 4
|
|
54
|
+
* (CLF UYW).
|
|
55
|
+
* - The visible amount („−42,17 €“, U+2212 minus, a no-break space from
|
|
56
|
+
* `Intl`) is `aria-hidden`; a visually hidden span holds the words
|
|
57
|
+
* („minus 42,17 Euro“), so a screen reader reads the amount once.
|
|
58
|
+
* - Tabular figures, no wrapping inside the amount; the amount is a `dir`
|
|
59
|
+
* isolate (`ltr`, or `rtl` for an RTL locale), safe inside RTL text.
|
|
60
|
+
* - Font and colour come from the context; colour never carries the sign.
|
|
61
|
+
* - `locale` empty: the app's `LOCALE_ID` (Angular's default `en-US`), the
|
|
62
|
+
* same on the server and in the browser.
|
|
63
|
+
* - For table `formatter`s and texts use {@link formatMoney}.
|
|
64
|
+
*
|
|
65
|
+
* Separate a `lc-money` from adjacent text with a space in your template, so
|
|
66
|
+
* the spoken text does not run into the words around it.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```html
|
|
70
|
+
* <lc-money [amountMinor]="-4217" currency="EUR" locale="de-DE" />
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare class MoneyComponent {
|
|
74
|
+
private readonly appLocale;
|
|
75
|
+
/**
|
|
76
|
+
* Amount in minor units of `currency` (cents, yen, fils): a safe integer
|
|
77
|
+
* (±9,007,199,254,740,991), formatted exactly. Anything else renders
|
|
78
|
+
* nothing (a dev warning).
|
|
79
|
+
*/
|
|
80
|
+
readonly amountMinor: import("@angular/core").InputSignal<number>;
|
|
81
|
+
/**
|
|
82
|
+
* ISO 4217 currency code (`EUR`, `USD`, `JPY`, `KWD`). It sets the minor
|
|
83
|
+
* units and the symbol. Not a three-letter code: renders nothing (a dev
|
|
84
|
+
* warning).
|
|
85
|
+
*/
|
|
86
|
+
readonly currency: import("@angular/core").InputSignal<string>;
|
|
87
|
+
/**
|
|
88
|
+
* BCP 47 locale of the amount (`de-DE`, `en-GB`). Empty: the app's
|
|
89
|
+
* `LOCALE_ID` (Angular's default `en-US`). An invalid locale falls back to
|
|
90
|
+
* `en-US`.
|
|
91
|
+
* @default ''
|
|
92
|
+
*/
|
|
93
|
+
readonly locale: import("@angular/core").InputSignal<string>;
|
|
94
|
+
/**
|
|
95
|
+
* Which signs show, as `Intl.NumberFormat`: `auto` (negative only),
|
|
96
|
+
* `always`, `exceptZero`, `never`. The spoken text says the sign whenever
|
|
97
|
+
* it shows.
|
|
98
|
+
* @default 'auto'
|
|
99
|
+
*/
|
|
100
|
+
readonly signDisplay: import("@angular/core").InputSignal<MoneySignDisplay>;
|
|
101
|
+
/**
|
|
102
|
+
* Spoken word for the minus sign („minus 42,17 Euro“; the same in German).
|
|
103
|
+
* @default 'minus'
|
|
104
|
+
*/
|
|
105
|
+
readonly minusLabel: import("@angular/core").InputSignal<string>;
|
|
106
|
+
/**
|
|
107
|
+
* Spoken word for the plus sign („plus 42,17 Euro“; the same in German).
|
|
108
|
+
* @default 'plus'
|
|
109
|
+
*/
|
|
110
|
+
readonly plusLabel: import("@angular/core").InputSignal<string>;
|
|
111
|
+
/** The locale in use: the `locale` input or the app's `LOCALE_ID`. */
|
|
112
|
+
protected readonly effectiveLocale: import("@angular/core").Signal<string>;
|
|
113
|
+
protected readonly formatted: import("@angular/core").Signal<import("@lifecorner/angular-ui-kit/money").MoneyText | null>;
|
|
114
|
+
protected readonly dir: import("@angular/core").Signal<"ltr" | "rtl">;
|
|
115
|
+
constructor();
|
|
116
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MoneyComponent, never>;
|
|
117
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MoneyComponent, "lc-money", never, {
|
|
118
|
+
"amountMinor": {
|
|
119
|
+
"alias": "amountMinor";
|
|
120
|
+
"required": true;
|
|
121
|
+
"isSignal": true;
|
|
122
|
+
};
|
|
123
|
+
"currency": {
|
|
124
|
+
"alias": "currency";
|
|
125
|
+
"required": true;
|
|
126
|
+
"isSignal": true;
|
|
127
|
+
};
|
|
128
|
+
"locale": {
|
|
129
|
+
"alias": "locale";
|
|
130
|
+
"required": false;
|
|
131
|
+
"isSignal": true;
|
|
132
|
+
};
|
|
133
|
+
"signDisplay": {
|
|
134
|
+
"alias": "signDisplay";
|
|
135
|
+
"required": false;
|
|
136
|
+
"isSignal": true;
|
|
137
|
+
};
|
|
138
|
+
"minusLabel": {
|
|
139
|
+
"alias": "minusLabel";
|
|
140
|
+
"required": false;
|
|
141
|
+
"isSignal": true;
|
|
142
|
+
};
|
|
143
|
+
"plusLabel": {
|
|
144
|
+
"alias": "plusLabel";
|
|
145
|
+
"required": false;
|
|
146
|
+
"isSignal": true;
|
|
147
|
+
};
|
|
148
|
+
}, {}, never, never, true, never>;
|
|
149
|
+
}
|
|
150
|
+
export type { MoneyFormatOptions, MoneySignDisplay, MoneyText };
|
|
@@ -15,6 +15,15 @@ export type NextStepCardVariant = 'default' | 'soft';
|
|
|
15
15
|
* - `stacked`: always in their own row, one per line at equal width, 8 px apart
|
|
16
16
|
*/
|
|
17
17
|
export type NextStepCardActionsLayout = 'inline' | 'stacked';
|
|
18
|
+
/**
|
|
19
|
+
* Weight of the two built-in actions.
|
|
20
|
+
* - `default`: a filled primary and a ghost secondary with a chevron, the
|
|
21
|
+
* primary last
|
|
22
|
+
* - `equal`: two answers of the same weight (a question such as „Teilen?“):
|
|
23
|
+
* both `outline` in the primary tone at `actionSize`, the primary first,
|
|
24
|
+
* no chevron
|
|
25
|
+
*/
|
|
26
|
+
export type NextStepCardActionsStyle = 'default' | 'equal';
|
|
18
27
|
/** Element that renders the title (semantics only, the look stays the same). */
|
|
19
28
|
export type NextStepCardTitleTag = 'div' | 'h2' | 'h3';
|
|
20
29
|
/** Size of the built-in action buttons (`sm` 32 px, `md` 42 px, `lg` 48.5 px). */
|
|
@@ -44,6 +53,8 @@ export type NextStepCardActionSize = 'sm' | 'md' | 'lg';
|
|
|
44
53
|
* `fullWidth` button gets its own row at every width.
|
|
45
54
|
* - `variant="soft"`: the tinted card of the "Weite" look; `actionsLayout`
|
|
46
55
|
* `stacked` for several equal-width actions; `titleTag` for a heading
|
|
56
|
+
* - `actionsStyle="equal"` (3.16, BA-5): a question with two answers of the
|
|
57
|
+
* same weight, both outline buttons in the primary tone, primary first
|
|
47
58
|
*
|
|
48
59
|
* The host is a size container (`container-type: inline-size`) and takes the
|
|
49
60
|
* full inline size of its parent.
|
|
@@ -106,6 +117,16 @@ export declare class NextStepCardComponent implements AfterViewChecked {
|
|
|
106
117
|
* @default 'sm'
|
|
107
118
|
*/
|
|
108
119
|
actionSize: import("@angular/core").InputSignal<NextStepCardActionSize>;
|
|
120
|
+
/**
|
|
121
|
+
* Weight of the built-in actions. `default`: filled primary, ghost secondary
|
|
122
|
+
* with a chevron, primary last. `equal`: two answers of the same weight, both
|
|
123
|
+
* `outline` in the primary tone at `actionSize`, primary first, no chevron
|
|
124
|
+
* (`primaryClick`, `secondaryClick`, `primaryLoading`, `primaryDisabled` and
|
|
125
|
+
* `announce` work as before). Use `actionSize="lg"` (48.5 px, the 44 px
|
|
126
|
+
* target; a dev warning otherwise). No effect on `[slot='actions']`.
|
|
127
|
+
* @default 'default'
|
|
128
|
+
*/
|
|
129
|
+
actionsStyle: import("@angular/core").InputSignal<NextStepCardActionsStyle>;
|
|
109
130
|
/** Message below the title. For markup, use the default slot instead. */
|
|
110
131
|
message: import("@angular/core").InputSignal<string | undefined>;
|
|
111
132
|
/** Label of the primary action. Omit to render no primary button. */
|
|
@@ -200,6 +221,11 @@ export declare class NextStepCardComponent implements AfterViewChecked {
|
|
|
200
221
|
"required": false;
|
|
201
222
|
"isSignal": true;
|
|
202
223
|
};
|
|
224
|
+
"actionsStyle": {
|
|
225
|
+
"alias": "actionsStyle";
|
|
226
|
+
"required": false;
|
|
227
|
+
"isSignal": true;
|
|
228
|
+
};
|
|
203
229
|
"message": {
|
|
204
230
|
"alias": "message";
|
|
205
231
|
"required": false;
|
|
@@ -15,6 +15,13 @@ import * as i0 from "@angular/core";
|
|
|
15
15
|
* 1024 px (`--font-size-auth-title`)
|
|
16
16
|
*/
|
|
17
17
|
export type PageHeaderSize = 'compact' | 'secondary' | 'default' | 'comfortable' | 'title' | 'display' | 'auth';
|
|
18
|
+
/**
|
|
19
|
+
* Space above the page header's content (3.15).
|
|
20
|
+
* - `default` — the size's block padding (24 px; `comfortable` 40, `compact`
|
|
21
|
+
* and `secondary` 12)
|
|
22
|
+
* - `none` 0 · `sm` 8 px · `md` 16 px
|
|
23
|
+
*/
|
|
24
|
+
export type PageHeaderPaddingTop = 'default' | 'none' | 'sm' | 'md';
|
|
18
25
|
/**
|
|
19
26
|
* Page header — top-of-page title block with optional subtitle,
|
|
20
27
|
* breadcrumbs, badge, description and an actions area.
|
|
@@ -116,6 +123,14 @@ export declare class PageHeaderComponent {
|
|
|
116
123
|
* @default false
|
|
117
124
|
*/
|
|
118
125
|
noPaddingX: import("@angular/core").InputSignal<boolean>;
|
|
126
|
+
/**
|
|
127
|
+
* Space above the header content. `'default'`: the size's block padding
|
|
128
|
+
* (24, comfortable 40, compact/secondary 12). `'none'` 0, `'sm'` 8 px,
|
|
129
|
+
* `'md'` 16 px. The bottom padding is unchanged. Use `'none'` with
|
|
130
|
+
* `lc-app-page` `paddingTop="md"` to put the `h1` 16 px below `lc-header`.
|
|
131
|
+
* @default 'default'
|
|
132
|
+
*/
|
|
133
|
+
paddingTop: import("@angular/core").InputSignal<PageHeaderPaddingTop>;
|
|
119
134
|
/**
|
|
120
135
|
* Classes of the heading: the global type-scale class (`lc-title`,
|
|
121
136
|
* `lc-display`, `lc-auth-title`) joins the component class for the 3.3 sizes.
|
|
@@ -179,5 +194,10 @@ export declare class PageHeaderComponent {
|
|
|
179
194
|
"required": false;
|
|
180
195
|
"isSignal": true;
|
|
181
196
|
};
|
|
197
|
+
"paddingTop": {
|
|
198
|
+
"alias": "paddingTop";
|
|
199
|
+
"required": false;
|
|
200
|
+
"isSignal": true;
|
|
201
|
+
};
|
|
182
202
|
}, {}, never, ["[slot='breadcrumbs']", "[slot='title-suffix']", "[slot='actions']", "[slot='meta']", "*"], true, never>;
|
|
183
203
|
}
|
|
@@ -34,8 +34,10 @@ import * as i0 from "@angular/core";
|
|
|
34
34
|
* it when it is swapped. The navigation landmark, the current item
|
|
35
35
|
* (`aria-current`) and the tab order arrive with `lc-sidenav`. Static, no
|
|
36
36
|
* shimmer. The skeleton shapes are filled with
|
|
37
|
-
* `--lc-sidenav-placeholder-fill`; the `--lc-sidenav-*` hooks apply as
|
|
38
|
-
* `lc-sidenav
|
|
37
|
+
* `--lc-sidenav-placeholder-fill`; the `--lc-sidenav-*` colour hooks apply as
|
|
38
|
+
* on `lc-sidenav`: set them on the element or any ancestor (3.15), e.g. one
|
|
39
|
+
* rule on an ancestor of both. A value on the element wins over an
|
|
40
|
+
* ancestor's, and both win over `theme`.
|
|
39
41
|
*/
|
|
40
42
|
export declare class SidenavPlaceholderComponent {
|
|
41
43
|
private readonly router;
|
|
@@ -35,8 +35,11 @@ export type SidenavVariant = 'default' | 'transparent';
|
|
|
35
35
|
* - Optional backdrop overlay
|
|
36
36
|
* - Theme variants: auto, light, dark (with teal accent for dark mode). The
|
|
37
37
|
* theming hooks (`--lc-sidenav-bg`, `-fg`, `-fg-active`, `-border`,
|
|
38
|
-
* `-hover-bg`, `-section-fg`, `-active-bg`, `-active-fg`, `-active-icon
|
|
39
|
-
* set on `lc-sidenav`
|
|
38
|
+
* `-hover-bg`, `-section-fg`, `-active-bg`, `-active-fg`, `-active-icon`,
|
|
39
|
+
* `-badge-ring`) can be set on `lc-sidenav` or any ancestor (3.15); a value
|
|
40
|
+
* on the element wins over an ancestor's, and both win over `theme` (3.14).
|
|
41
|
+
* Set the same ones for `lc-sidenav-placeholder`, e.g. on a shared ancestor;
|
|
42
|
+
* `--lc-sidenav-active-indicator`
|
|
40
43
|
* (the current item's 2 px bar, default `--color-primary-500`; on a
|
|
41
44
|
* `theme="light"` rail #208497 on any page, like its focus rings),
|
|
42
45
|
* `--lc-sidenav-brand-tile-bg` (default `--color-primary-fill`) and
|
|
@@ -8,6 +8,10 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
* - Size options (sm, md, lg)
|
|
9
9
|
* - Loading state with spinner
|
|
10
10
|
* - Configurable label positioning (left/right)
|
|
11
|
+
* - Help text below the label, linked by `aria-describedby` (`helpText`, 3.16)
|
|
12
|
+
* - Rows with a label or help text are at least 44 px high
|
|
13
|
+
* (`--lc-switch-min-height`, default `var(--size-min-touch-height)`; `0`
|
|
14
|
+
* restores the 3.15 rows of 21/24/28 px)
|
|
11
15
|
* - Keyboard toggle support
|
|
12
16
|
* - Disabled and required states
|
|
13
17
|
* - ControlValueAccessor integration for reactive forms
|
|
@@ -54,12 +58,22 @@ export declare class SwitchComponent implements ControlValueAccessor {
|
|
|
54
58
|
* ARIA label for accessibility (overrides the visible label as accessible name)
|
|
55
59
|
*/
|
|
56
60
|
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
61
|
+
/**
|
|
62
|
+
* Description below the label, linked to the switch by `aria-describedby`
|
|
63
|
+
* (read after the name and state). Wraps; 14 px secondary text. A tap on it
|
|
64
|
+
* toggles the switch like the label. Empty renders no element and no
|
|
65
|
+
* `aria-describedby` (3.15).
|
|
66
|
+
* @default ''
|
|
67
|
+
*/
|
|
68
|
+
readonly helpText: import("@angular/core").InputSignal<string>;
|
|
57
69
|
/**
|
|
58
70
|
* Emitted when checked state changes
|
|
59
71
|
*/
|
|
60
72
|
readonly checkedChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
61
73
|
/** Per-instance id so the visible `<label for>` points at this switch. */
|
|
62
74
|
readonly switchId: string;
|
|
75
|
+
/** id of the rendered help text (only while `helpText` is set). */
|
|
76
|
+
readonly helpTextId: import("@angular/core").Signal<string | null>;
|
|
63
77
|
/**
|
|
64
78
|
* Effective checked state: follows the `checked` input, overridden by
|
|
65
79
|
* form writes (`writeValue`) and user toggles.
|
|
@@ -135,6 +149,11 @@ export declare class SwitchComponent implements ControlValueAccessor {
|
|
|
135
149
|
"required": false;
|
|
136
150
|
"isSignal": true;
|
|
137
151
|
};
|
|
152
|
+
"helpText": {
|
|
153
|
+
"alias": "helpText";
|
|
154
|
+
"required": false;
|
|
155
|
+
"isSignal": true;
|
|
156
|
+
};
|
|
138
157
|
}, {
|
|
139
158
|
"checkedChange": "checkedChange";
|
|
140
159
|
}, never, never, true, never>;
|