@lifecorner/angular-ui-kit 3.28.0 → 3.30.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/fesm2022/lifecorner-angular-ui-kit-card.mjs +23 -3
- package/fesm2022/lifecorner-angular-ui-kit-card.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs +73 -5
- package/fesm2022/lifecorner-angular-ui-kit-combobox.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-datepicker.mjs +281 -10
- package/fesm2022/lifecorner-angular-ui-kit-datepicker.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-money.mjs +90 -7
- package/fesm2022/lifecorner-angular-ui-kit-money.mjs.map +1 -1
- package/fesm2022/lifecorner-angular-ui-kit-number-input.mjs +93 -9
- package/fesm2022/lifecorner-angular-ui-kit-number-input.mjs.map +1 -1
- package/package.json +1 -1
- package/src/styles/theme-contrast.spec.ts +58 -0
- package/types/lifecorner-angular-ui-kit-card.d.ts +34 -0
- package/types/lifecorner-angular-ui-kit-combobox.d.ts +41 -1
- package/types/lifecorner-angular-ui-kit-datepicker.d.ts +162 -3
- package/types/lifecorner-angular-ui-kit-money.d.ts +81 -2
- package/types/lifecorner-angular-ui-kit-number-input.d.ts +61 -0
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import { ControlValueAccessor } from "@angular/forms";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export type DateValue = Date | string | null;
|
|
4
|
+
/** What `lc-datepicker` picks: a day (`'day'`) or a month (`'month'`). */
|
|
5
|
+
export type DatepickerGranularity = 'day' | 'month';
|
|
6
|
+
/** One cell of the month grid (`granularity="month"`). */
|
|
7
|
+
interface MonthCell {
|
|
8
|
+
/** 0–11. */
|
|
9
|
+
month: number;
|
|
10
|
+
/** Visible name („Juli“). */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Accessible name with the year („Juli 2026“). */
|
|
13
|
+
label: string;
|
|
14
|
+
selected: boolean;
|
|
15
|
+
current: boolean;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
}
|
|
4
18
|
/**
|
|
5
19
|
* Datepicker component for date selection with calendar overlay.
|
|
6
20
|
*
|
|
7
21
|
* Features:
|
|
8
22
|
* - Calendar popup with month and year navigation
|
|
23
|
+
* - Month granularity (3.29): `granularity="month"` picks a month in a
|
|
24
|
+
* 12-month grid with year navigation and emits its first day
|
|
9
25
|
* - Manual date entry in the configured format
|
|
10
26
|
* - Min/max date constraints
|
|
11
27
|
* - Disabled specific dates and weekends
|
|
@@ -18,6 +34,7 @@ export type DateValue = Date | string | null;
|
|
|
18
34
|
* @example
|
|
19
35
|
* ```html
|
|
20
36
|
* <lc-datepicker placeholder="Select date" [(ngModel)]="selectedDate" />
|
|
37
|
+
* <lc-datepicker granularity="month" format="YYYY-MM" placeholder="Select a month" [(ngModel)]="validFrom" />
|
|
21
38
|
* ```
|
|
22
39
|
*/
|
|
23
40
|
export declare class DatepickerComponent implements ControlValueAccessor {
|
|
@@ -63,9 +80,16 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
63
80
|
*/
|
|
64
81
|
readonly errorMessage: import("@angular/core").InputSignal<string>;
|
|
65
82
|
/**
|
|
66
|
-
* ARIA label for accessibility
|
|
83
|
+
* ARIA label for accessibility. Ignored while `label` is set.
|
|
67
84
|
*/
|
|
68
85
|
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
86
|
+
/**
|
|
87
|
+
* Visible label above the field (3.30, regeln row 7): a `<label for>` in
|
|
88
|
+
* day and month mode that names the field, so `ariaLabel` is not used
|
|
89
|
+
* while it is set. Empty: no label element, as before.
|
|
90
|
+
* @default ''
|
|
91
|
+
*/
|
|
92
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
69
93
|
/**
|
|
70
94
|
* Date format string (e.g., 'YYYY-MM-DD', 'MM/DD/YYYY')
|
|
71
95
|
*/
|
|
@@ -102,6 +126,42 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
102
126
|
readonly todayLabel: import("@angular/core").InputSignal<string>;
|
|
103
127
|
/** Appended to the selected day's accessible name (`…, selected`). */
|
|
104
128
|
readonly selectedAriaLabel: import("@angular/core").InputSignal<string>;
|
|
129
|
+
/**
|
|
130
|
+
* Pick a day (`'day'`) or a month (`'month'`, 3.29, regeln row 1). Month:
|
|
131
|
+
* a 12-month grid with year navigation; `dateChange` and the forms value
|
|
132
|
+
* are the 1st of the month (local midnight, as day mode); `format` should
|
|
133
|
+
* be a month format (`'YYYY-MM'`; a `DD` token shows `01`), and typing
|
|
134
|
+
* „2026-07“ commits like a day. `minDate`/`maxDate` keep a month
|
|
135
|
+
* selectable when any of its days is in range; a `disabledDates` entry
|
|
136
|
+
* disables its whole month; `disableWeekends` is ignored. Set
|
|
137
|
+
* `placeholder` (e.g. "Select a month"). Keys in the grid: arrows move by
|
|
138
|
+
* month and row, PageUp/PageDown by year, Home/End to the first/last month
|
|
139
|
+
* of the year, Enter/Space select, Escape closes.
|
|
140
|
+
* @default 'day'
|
|
141
|
+
*/
|
|
142
|
+
readonly granularity: import("@angular/core").InputSignal<DatepickerGranularity>;
|
|
143
|
+
/**
|
|
144
|
+
* Accessible name of the previous-year button (month mode).
|
|
145
|
+
* @default 'Previous year'
|
|
146
|
+
*/
|
|
147
|
+
readonly previousYearAriaLabel: import("@angular/core").InputSignal<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Accessible name of the next-year button (month mode).
|
|
150
|
+
* @default 'Next year'
|
|
151
|
+
*/
|
|
152
|
+
readonly nextYearAriaLabel: import("@angular/core").InputSignal<string>;
|
|
153
|
+
/**
|
|
154
|
+
* Accessible name of the month dialog (month mode; `dialogAriaLabel`
|
|
155
|
+
* stays the day dialog's).
|
|
156
|
+
* @default 'Choose month'
|
|
157
|
+
*/
|
|
158
|
+
readonly monthDialogAriaLabel: import("@angular/core").InputSignal<string>;
|
|
159
|
+
/**
|
|
160
|
+
* Label of the quick action that shows the current year (month mode; day
|
|
161
|
+
* mode keeps `todayLabel`).
|
|
162
|
+
* @default 'This month'
|
|
163
|
+
*/
|
|
164
|
+
readonly currentMonthLabel: import("@angular/core").InputSignal<string>;
|
|
105
165
|
/**
|
|
106
166
|
* Emitted when date selection changes
|
|
107
167
|
*/
|
|
@@ -122,6 +182,8 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
122
182
|
private readonly formDisabled;
|
|
123
183
|
/** Effective disabled state: the `disabled` input OR the form control's disabled state. */
|
|
124
184
|
readonly isDisabled: import("@angular/core").Signal<boolean>;
|
|
185
|
+
/** Month granularity (3.29). */
|
|
186
|
+
protected readonly isMonthMode: import("@angular/core").Signal<boolean>;
|
|
125
187
|
readonly formattedDate: import("@angular/core").Signal<string>;
|
|
126
188
|
/**
|
|
127
189
|
* Text currently shown in the input. Follows the selected date, but the user
|
|
@@ -134,6 +196,18 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
134
196
|
readonly currentMonthName: import("@angular/core").Signal<string>;
|
|
135
197
|
/** Weekday headers in grid order, starting at `firstDayOfWeek`. */
|
|
136
198
|
readonly weekdayLabels: import("@angular/core").Signal<string[]>;
|
|
199
|
+
/** Header title: „July 2026“ (day mode) or the year „2026“ (month mode). */
|
|
200
|
+
protected readonly headerTitle: import("@angular/core").Signal<string>;
|
|
201
|
+
/** The twelve months of the shown year (month mode). */
|
|
202
|
+
protected readonly monthCells: import("@angular/core").Signal<MonthCell[]>;
|
|
203
|
+
/** The month grid's four rows of three. */
|
|
204
|
+
protected readonly monthRows: import("@angular/core").Signal<MonthCell[][]>;
|
|
205
|
+
/**
|
|
206
|
+
* The month cell that is the grid's one tab stop (roving `tabindex`): the
|
|
207
|
+
* selected month in the shown year, else the current month, else the first
|
|
208
|
+
* enabled one; `-1` when the whole year is disabled. Keys move it.
|
|
209
|
+
*/
|
|
210
|
+
protected readonly monthTabStop: import("@angular/core").WritableSignal<number>;
|
|
137
211
|
/** `firstDayOfWeek` clamped to 0–6. */
|
|
138
212
|
private readonly gridStart;
|
|
139
213
|
/** id of the helper/error text the input is described by (aria-describedby) */
|
|
@@ -143,6 +217,7 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
143
217
|
*/
|
|
144
218
|
readonly datepickerClasses: import("@angular/core").Signal<string>;
|
|
145
219
|
private readonly document;
|
|
220
|
+
private readonly injector;
|
|
146
221
|
private onChange;
|
|
147
222
|
private onTouched;
|
|
148
223
|
/**
|
|
@@ -166,6 +241,11 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
166
241
|
* Clear selected date
|
|
167
242
|
*/
|
|
168
243
|
clear(): void;
|
|
244
|
+
/**
|
|
245
|
+
* The clear button (3.30, request 047): clears and moves focus to the
|
|
246
|
+
* field, since the button leaves the DOM (focus dropped to `<body>`).
|
|
247
|
+
*/
|
|
248
|
+
protected onClearClick(event: Event): void;
|
|
169
249
|
/**
|
|
170
250
|
* Check if a date is disabled
|
|
171
251
|
*/
|
|
@@ -196,6 +276,22 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
196
276
|
* Navigate to today
|
|
197
277
|
*/
|
|
198
278
|
goToToday(): void;
|
|
279
|
+
/** Month mode: show the previous year. */
|
|
280
|
+
protected previousYear(): void;
|
|
281
|
+
/** Month mode: show the next year. */
|
|
282
|
+
protected nextYear(): void;
|
|
283
|
+
/** Month mode's quick action: show the current year. */
|
|
284
|
+
protected showCurrentYear(): void;
|
|
285
|
+
/** Month mode: select `month` of the shown year (its 1st), emit, close and focus the field. */
|
|
286
|
+
protected selectMonth(month: number): void;
|
|
287
|
+
/**
|
|
288
|
+
* Keys on a month cell (APG date grid): arrows ±1 month and ±3 (a row),
|
|
289
|
+
* PageUp/PageDown ±1 year (the nearest enabled month of that year),
|
|
290
|
+
* Home/End the first/last enabled month of the year; disabled months are
|
|
291
|
+
* skipped, and with none left focus stays. Enter/Space select, Escape
|
|
292
|
+
* closes. Arrows only move focus.
|
|
293
|
+
*/
|
|
294
|
+
protected onMonthKeydown(event: KeyboardEvent, month: number): void;
|
|
199
295
|
/**
|
|
200
296
|
* Handle input change (manual date entry). Partial input is kept as text
|
|
201
297
|
* only; the model changes once the text is a complete, valid, selectable date.
|
|
@@ -221,6 +317,37 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
221
317
|
* Check if date is in current month
|
|
222
318
|
*/
|
|
223
319
|
isCurrentMonth(date: Date): boolean;
|
|
320
|
+
/** The selected month of the shown year, else the current month, else the first enabled one; `-1` if none. */
|
|
321
|
+
private defaultMonthTabStop;
|
|
322
|
+
/**
|
|
323
|
+
* Keys in the field while the month panel is open: ArrowDown moves focus
|
|
324
|
+
* into the grid, Escape closes, Enter closes when a month is selected and
|
|
325
|
+
* shows its text again over half-typed text (3.30, 046-n4, as day mode);
|
|
326
|
+
* the other keys stay with the text (caret, typing „2026-07“).
|
|
327
|
+
*/
|
|
328
|
+
private onMonthFieldKeyDown;
|
|
329
|
+
/**
|
|
330
|
+
* Month mode: a month is disabled when all its days are before `minDate`
|
|
331
|
+
* or after `maxDate` (compared by day), or when `disabledDates` holds one
|
|
332
|
+
* of its days. `disableWeekends` does not apply.
|
|
333
|
+
*/
|
|
334
|
+
private isMonthDisabled;
|
|
335
|
+
/** A typed date that cannot be committed: its day (day mode) or its month (month mode) is disabled. */
|
|
336
|
+
private isUnavailable;
|
|
337
|
+
/** Whether `date` is the current selection: the same day, or in month mode the same month. */
|
|
338
|
+
private isSameSelection;
|
|
339
|
+
/** Year and month (0–11) of a month index `year * 12 + month`. */
|
|
340
|
+
private monthAt;
|
|
341
|
+
/** The next enabled month from `index` in steps of `step` (up to ten years), or `null`. */
|
|
342
|
+
private nextEnabledMonth;
|
|
343
|
+
/** `month` of `year` if enabled, else the enabled month of that year nearest to it, or `null`. */
|
|
344
|
+
private nearestEnabledMonth;
|
|
345
|
+
/** The first (`dir` 1) or last (`dir` -1) enabled month of `year`, or `null`. */
|
|
346
|
+
private edgeEnabledMonth;
|
|
347
|
+
/** Moves the grid's tab stop and focus to the month `index`; the shown year follows. */
|
|
348
|
+
private moveMonthFocus;
|
|
349
|
+
/** Focuses the month cell `month` (0–11) of the open panel; the cells are kept across years. */
|
|
350
|
+
private focusMonthCell;
|
|
224
351
|
private commitDate;
|
|
225
352
|
private showMonthOf;
|
|
226
353
|
private restoreFocusFromPanel;
|
|
@@ -234,7 +361,8 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
234
361
|
* Strict parse: the text must match the format's length, carry digits at the
|
|
235
362
|
* YYYY/MM/DD positions and round-trip through formatDate (which rejects
|
|
236
363
|
* things like month 13 or Feb 31 that `new Date` would silently roll over).
|
|
237
|
-
* Returns null for partial or invalid input.
|
|
364
|
+
* Returns null for partial or invalid input. Month mode also takes a format
|
|
365
|
+
* without `DD` (`YYYY-MM`) and returns the 1st of the month.
|
|
238
366
|
*/
|
|
239
367
|
private parseDate;
|
|
240
368
|
protected getInputValue(event: Event): string;
|
|
@@ -290,6 +418,11 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
290
418
|
"required": false;
|
|
291
419
|
"isSignal": true;
|
|
292
420
|
};
|
|
421
|
+
"label": {
|
|
422
|
+
"alias": "label";
|
|
423
|
+
"required": false;
|
|
424
|
+
"isSignal": true;
|
|
425
|
+
};
|
|
293
426
|
"format": {
|
|
294
427
|
"alias": "format";
|
|
295
428
|
"required": false;
|
|
@@ -355,9 +488,35 @@ export declare class DatepickerComponent implements ControlValueAccessor {
|
|
|
355
488
|
"required": false;
|
|
356
489
|
"isSignal": true;
|
|
357
490
|
};
|
|
491
|
+
"granularity": {
|
|
492
|
+
"alias": "granularity";
|
|
493
|
+
"required": false;
|
|
494
|
+
"isSignal": true;
|
|
495
|
+
};
|
|
496
|
+
"previousYearAriaLabel": {
|
|
497
|
+
"alias": "previousYearAriaLabel";
|
|
498
|
+
"required": false;
|
|
499
|
+
"isSignal": true;
|
|
500
|
+
};
|
|
501
|
+
"nextYearAriaLabel": {
|
|
502
|
+
"alias": "nextYearAriaLabel";
|
|
503
|
+
"required": false;
|
|
504
|
+
"isSignal": true;
|
|
505
|
+
};
|
|
506
|
+
"monthDialogAriaLabel": {
|
|
507
|
+
"alias": "monthDialogAriaLabel";
|
|
508
|
+
"required": false;
|
|
509
|
+
"isSignal": true;
|
|
510
|
+
};
|
|
511
|
+
"currentMonthLabel": {
|
|
512
|
+
"alias": "currentMonthLabel";
|
|
513
|
+
"required": false;
|
|
514
|
+
"isSignal": true;
|
|
515
|
+
};
|
|
358
516
|
}, {
|
|
359
517
|
"dateChange": "dateChange";
|
|
360
518
|
"opened": "opened";
|
|
361
519
|
"closed": "closed";
|
|
362
520
|
}, never, never, true, never>;
|
|
363
|
-
}
|
|
521
|
+
}
|
|
522
|
+
export {};
|
|
@@ -27,6 +27,15 @@ interface MoneyFormatOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
showCurrency?: boolean;
|
|
29
29
|
}
|
|
30
|
+
/** Options of {@link formatMoneyRange}: those of {@link formatMoney}, for both amounts, and the joining word. */
|
|
31
|
+
interface MoneyRangeFormatOptions extends MoneyFormatOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Word between the two amounts, in `text` and in `spoken`. Empty: from
|
|
34
|
+
* `locale`, „bis“ for German (`de`), "to" for every other locale.
|
|
35
|
+
* @default ''
|
|
36
|
+
*/
|
|
37
|
+
separatorLabel?: string;
|
|
38
|
+
}
|
|
30
39
|
/** A formatted amount: the visible text and the words a screen reader speaks. */
|
|
31
40
|
interface MoneyText {
|
|
32
41
|
/**
|
|
@@ -58,6 +67,33 @@ declare function moneyDirection(locale: string): 'ltr' | 'rtl';
|
|
|
58
67
|
* ```
|
|
59
68
|
*/
|
|
60
69
|
export declare function formatMoney(amountMinor: number, currency: string, options?: MoneyFormatOptions): MoneyText | null;
|
|
70
|
+
/** U+00A0: glues the joining word of a range to the second amount. */
|
|
71
|
+
declare const MONEY_RANGE_GLUE: string;
|
|
72
|
+
/** The word between the amounts of a range: „bis“ for a German locale (`de`), "to" otherwise. */
|
|
73
|
+
declare function moneyRangeSeparator(locale: string): string;
|
|
74
|
+
/** Both amounts of a range and the joining word; `null` if either amount fails {@link formatMoney}. */
|
|
75
|
+
declare function moneyRangeParts(fromMinor: number, toMinor: number, currency: string, options?: MoneyRangeFormatOptions): {
|
|
76
|
+
from: MoneyText;
|
|
77
|
+
to: MoneyText;
|
|
78
|
+
word: string;
|
|
79
|
+
} | null;
|
|
80
|
+
/**
|
|
81
|
+
* Formats a range of two amounts in minor units with the same currency and
|
|
82
|
+
* options („9,99 € bis 12,99 €“), for table `formatter`s and texts. The
|
|
83
|
+
* joining word is glued to the second amount with a no-break space (U+00A0),
|
|
84
|
+
* so a line breaks only before it. The amounts are kept as given (no
|
|
85
|
+
* sorting; equal amounts give a range). Returns `null` if either amount fails
|
|
86
|
+
* {@link formatMoney}. `lc-money` shows the same with `rangeToMinor`.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* formatMoneyRange(999, 1299, 'EUR', { locale: 'de-DE' });
|
|
91
|
+
* // { text: '9,99 € bis 12,99 €', spoken: '9,99 Euro bis 12,99 Euro' }
|
|
92
|
+
* formatMoneyRange(999, 1299, 'EUR', { locale: 'en-US' });
|
|
93
|
+
* // { text: '€9.99 to €12.99', spoken: '9.99 euros to 12.99 euros' }
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare function formatMoneyRange(fromMinor: number, toMinor: number, currency: string, options?: MoneyRangeFormatOptions): MoneyText | null;
|
|
61
97
|
/**
|
|
62
98
|
* Displays an amount of money (3.16, BA-4): locale, currency, sign, tabular
|
|
63
99
|
* figures and a spoken text. Display only, no input parsing or conversion.
|
|
@@ -77,7 +113,11 @@ export declare function formatMoney(amountMinor: number, currency: string, optio
|
|
|
77
113
|
* „Kosten in €“); the spoken text keeps the currency.
|
|
78
114
|
* - `locale` empty: the app's `LOCALE_ID` (Angular's default `en-US`), the
|
|
79
115
|
* same on the server and in the browser.
|
|
80
|
-
* -
|
|
116
|
+
* - A range (3.29, CC-1): `rangeToMinor` adds an upper amount, „9,99 € bis
|
|
117
|
+
* 12,99 €“, read once („9,99 Euro bis 12,99 Euro“). It may wrap before the
|
|
118
|
+
* joining word, never inside an amount.
|
|
119
|
+
* - For table `formatter`s and texts use {@link formatMoney} and
|
|
120
|
+
* {@link formatMoneyRange}.
|
|
81
121
|
*
|
|
82
122
|
* Separate a `lc-money` from adjacent text with a space in your template, so
|
|
83
123
|
* the spoken text does not run into the words around it.
|
|
@@ -85,6 +125,7 @@ export declare function formatMoney(amountMinor: number, currency: string, optio
|
|
|
85
125
|
* @example
|
|
86
126
|
* ```html
|
|
87
127
|
* <lc-money [amountMinor]="-4217" currency="EUR" locale="de-DE" />
|
|
128
|
+
* <lc-money [amountMinor]="999" [rangeToMinor]="1299" currency="EUR" locale="de-DE" />
|
|
88
129
|
* ```
|
|
89
130
|
*/
|
|
90
131
|
export declare class MoneyComponent {
|
|
@@ -134,9 +175,37 @@ export declare class MoneyComponent {
|
|
|
134
175
|
* @default true
|
|
135
176
|
*/
|
|
136
177
|
readonly showCurrency: import("@angular/core").InputSignal<boolean>;
|
|
178
|
+
/**
|
|
179
|
+
* Upper amount of a range, in minor units of the same `currency` (3.29,
|
|
180
|
+
* CC-1). Shows „9,99 € bis 12,99 €“ (`de-DE`) or "€9.99 to €12.99"
|
|
181
|
+
* (`en-US`) with the same `locale`, `signDisplay` and `showCurrency`, read
|
|
182
|
+
* once („9,99 Euro bis 12,99 Euro“). Rendered as given: no sorting, equal
|
|
183
|
+
* amounts show a range. The range may wrap before the joining word, never
|
|
184
|
+
* inside an amount. Not a safe integer: the single amount (a dev warning).
|
|
185
|
+
* `null`/`undefined`: no range.
|
|
186
|
+
* @default undefined
|
|
187
|
+
*/
|
|
188
|
+
readonly rangeToMinor: import("@angular/core").InputSignal<number | null | undefined>;
|
|
189
|
+
/**
|
|
190
|
+
* Word between the amounts of a range, shown and spoken. Empty: from the
|
|
191
|
+
* locale, „bis“ for German (`de`), "to" for every other locale.
|
|
192
|
+
* @default ''
|
|
193
|
+
*/
|
|
194
|
+
readonly rangeSeparatorLabel: import("@angular/core").InputSignal<string>;
|
|
137
195
|
/** The locale in use: the `locale` input or the app's `LOCALE_ID`. */
|
|
138
196
|
protected readonly effectiveLocale: import("@angular/core").Signal<string>;
|
|
139
197
|
protected readonly formatted: import("@angular/core").Signal<import("@lifecorner/angular-ui-kit/money").MoneyText | null>;
|
|
198
|
+
/**
|
|
199
|
+
* The range's parts (3.29): both visible amounts, the joining text between
|
|
200
|
+
* them (the word glued to the second amount by U+00A0, so a line breaks
|
|
201
|
+
* only before it) and the one spoken text. `null`: no range.
|
|
202
|
+
*/
|
|
203
|
+
protected readonly range: import("@angular/core").Signal<{
|
|
204
|
+
from: import("@lifecorner/angular-ui-kit/money").MoneyText;
|
|
205
|
+
to: import("@lifecorner/angular-ui-kit/money").MoneyText;
|
|
206
|
+
joint: string;
|
|
207
|
+
spoken: string;
|
|
208
|
+
} | null>;
|
|
140
209
|
protected readonly dir: import("@angular/core").Signal<"ltr" | "rtl">;
|
|
141
210
|
constructor();
|
|
142
211
|
static ɵfac: i0.ɵɵFactoryDeclaration<MoneyComponent, never>;
|
|
@@ -176,6 +245,16 @@ export declare class MoneyComponent {
|
|
|
176
245
|
"required": false;
|
|
177
246
|
"isSignal": true;
|
|
178
247
|
};
|
|
248
|
+
"rangeToMinor": {
|
|
249
|
+
"alias": "rangeToMinor";
|
|
250
|
+
"required": false;
|
|
251
|
+
"isSignal": true;
|
|
252
|
+
};
|
|
253
|
+
"rangeSeparatorLabel": {
|
|
254
|
+
"alias": "rangeSeparatorLabel";
|
|
255
|
+
"required": false;
|
|
256
|
+
"isSignal": true;
|
|
257
|
+
};
|
|
179
258
|
}, {}, never, never, true, never>;
|
|
180
259
|
}
|
|
181
|
-
export type { MoneyFormatOptions, MoneySignDisplay, MoneyText };
|
|
260
|
+
export type { MoneyFormatOptions, MoneyRangeFormatOptions, MoneySignDisplay, MoneyText };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ControlValueAccessor } from "@angular/forms";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
/** Height of `lc-number-input`'s field and steppers: `xs` 24, `sm` 32, `md` 40 (the default), `lg` 44 px. */
|
|
4
|
+
export type NumberInputSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
3
5
|
export declare class NumberInputComponent implements ControlValueAccessor {
|
|
4
6
|
private static nextId;
|
|
5
7
|
/** Minimum value */
|
|
@@ -24,6 +26,36 @@ export declare class NumberInputComponent implements ControlValueAccessor {
|
|
|
24
26
|
decrementAriaLabel: import("@angular/core").InputSignal<string>;
|
|
25
27
|
/** Accessible name of the plus button. */
|
|
26
28
|
incrementAriaLabel: import("@angular/core").InputSignal<string>;
|
|
29
|
+
/**
|
|
30
|
+
* BCP 47 locale of the shown number (3.29, regeln row 3). Only the decimal
|
|
31
|
+
* separator follows it: `de-DE` shows „7,5“, `en-US` "7.5"; a locale whose
|
|
32
|
+
* separator is neither `,` nor `.` shows a point. No grouping. `''`: a
|
|
33
|
+
* point, as before. Typing accepts `,` and `.` in every locale and shows
|
|
34
|
+
* the locale's separator; the model stays a `number`; blur clamps to
|
|
35
|
+
* `min`/`max`.
|
|
36
|
+
* @default ''
|
|
37
|
+
*/
|
|
38
|
+
locale: import("@angular/core").InputSignal<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Unit shown after the value inside the field („7,5 %“, 3.29). Not typed
|
|
41
|
+
* and not part of the model; with a suffix the value aligns to the end.
|
|
42
|
+
* Screen readers read `suffixAriaLabel` (or the suffix) once after the value.
|
|
43
|
+
* @default ''
|
|
44
|
+
*/
|
|
45
|
+
suffix: import("@angular/core").InputSignal<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Spoken unit („Prozent“), read once after the value as the field's
|
|
48
|
+
* description (before the helper or error text). `''`: the `suffix`.
|
|
49
|
+
* @default ''
|
|
50
|
+
*/
|
|
51
|
+
suffixAriaLabel: import("@angular/core").InputSignal<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Height of the field and the steppers (3.29, regeln row 4): `xs` 24,
|
|
54
|
+
* `sm` 32, `md` 40 (as before), `lg` 44 px (touch: field and both
|
|
55
|
+
* steppers at least 44 × 44 px).
|
|
56
|
+
* @default 'md'
|
|
57
|
+
*/
|
|
58
|
+
size: import("@angular/core").InputSignal<NumberInputSize>;
|
|
27
59
|
/** Emits value on change */
|
|
28
60
|
valueChange: import("@angular/core").OutputEmitterRef<number>;
|
|
29
61
|
/** Per-instance id wiring the label, hint and error to the field. */
|
|
@@ -44,6 +76,12 @@ export declare class NumberInputComponent implements ControlValueAccessor {
|
|
|
44
76
|
private readonly stepPrecision;
|
|
45
77
|
/** Fractions need a decimal key on touch keyboards; integers do not. */
|
|
46
78
|
protected readonly inputMode: import("@angular/core").Signal<"decimal" | "numeric">;
|
|
79
|
+
/** The decimal separator shown in the field: the `locale`'s `,` or `.`. */
|
|
80
|
+
private readonly separator;
|
|
81
|
+
/** The spoken unit: `suffixAriaLabel`, else the `suffix`; `''` = none. */
|
|
82
|
+
protected readonly spokenSuffix: import("@angular/core").Signal<string>;
|
|
83
|
+
/** Icon size of the steppers: `xs` (16 px) for the `xs`/`sm` fields, `sm` (20 px) as before. */
|
|
84
|
+
protected readonly iconSize: import("@angular/core").Signal<"xs" | "sm">;
|
|
47
85
|
protected readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
48
86
|
protected containerClasses: import("@angular/core").Signal<string>;
|
|
49
87
|
protected canDecrement: import("@angular/core").Signal<boolean>;
|
|
@@ -56,7 +94,10 @@ export declare class NumberInputComponent implements ControlValueAccessor {
|
|
|
56
94
|
onKeydown(event: KeyboardEvent): void;
|
|
57
95
|
onInput(event: Event): void;
|
|
58
96
|
onBlur(): void;
|
|
97
|
+
/** The model as text: `String(val)` with the locale's decimal separator, no grouping. */
|
|
59
98
|
private format;
|
|
99
|
+
/** A press on the visible unit puts the caret in the field, as a click on the field would. */
|
|
100
|
+
protected focusField(event: MouseEvent): void;
|
|
60
101
|
private clamp;
|
|
61
102
|
private setValue;
|
|
62
103
|
writeValue(val: number | null): void;
|
|
@@ -120,6 +161,26 @@ export declare class NumberInputComponent implements ControlValueAccessor {
|
|
|
120
161
|
"required": false;
|
|
121
162
|
"isSignal": true;
|
|
122
163
|
};
|
|
164
|
+
"locale": {
|
|
165
|
+
"alias": "locale";
|
|
166
|
+
"required": false;
|
|
167
|
+
"isSignal": true;
|
|
168
|
+
};
|
|
169
|
+
"suffix": {
|
|
170
|
+
"alias": "suffix";
|
|
171
|
+
"required": false;
|
|
172
|
+
"isSignal": true;
|
|
173
|
+
};
|
|
174
|
+
"suffixAriaLabel": {
|
|
175
|
+
"alias": "suffixAriaLabel";
|
|
176
|
+
"required": false;
|
|
177
|
+
"isSignal": true;
|
|
178
|
+
};
|
|
179
|
+
"size": {
|
|
180
|
+
"alias": "size";
|
|
181
|
+
"required": false;
|
|
182
|
+
"isSignal": true;
|
|
183
|
+
};
|
|
123
184
|
}, {
|
|
124
185
|
"valueChange": "valueChange";
|
|
125
186
|
}, never, never, true, never>;
|