@nanahoshi/mona-ui 0.35.0 → 0.36.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/docs/api/common.md +1 -1
- package/docs/api/i18n.md +26 -5
- package/docs/api/locales.md +14 -14
- package/docs/api/masked-text-box.md +137 -0
- package/docs/api/multi-select.md +1 -0
- package/docs/masked-textbox.md +334 -0
- package/docs/multi-select.md +66 -0
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +54 -15
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +10 -1
- package/fesm2022/nanahoshi-mona-ui-masked-text-box.mjs +1302 -0
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +29 -1
- package/i18n/catalogs/en-US.messages.json +10 -1
- package/llms.txt +3 -1
- package/locales/ar-sa/ar-sa.messages.json +10 -1
- package/locales/de-de/de-de.messages.json +10 -1
- package/locales/es-es/es-es.messages.json +10 -1
- package/locales/fr-fr/fr-fr.messages.json +10 -1
- package/locales/id-id/id-id.messages.json +10 -1
- package/locales/it-it/it-it.messages.json +10 -1
- package/locales/ja-jp/ja-jp.messages.json +10 -1
- package/locales/ko-kr/ko-kr.messages.json +10 -1
- package/locales/pl-pl/pl-pl.messages.json +10 -1
- package/locales/pt-br/pt-br.messages.json +10 -1
- package/locales/ru-ru/ru-ru.messages.json +10 -1
- package/locales/tr-tr/tr-tr.messages.json +10 -1
- package/locales/zh-cn/zh-cn.messages.json +10 -1
- package/locales/zh-tw/zh-tw.messages.json +10 -1
- package/masked-text-box/package.json +4 -0
- package/package.json +5 -1
- package/types/nanahoshi-mona-ui-i18n.d.ts +20 -0
- package/types/nanahoshi-mona-ui-internal-list.d.ts +12 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +9 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +9 -0
- package/types/nanahoshi-mona-ui-masked-text-box.d.ts +391 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +11 -0
|
@@ -448,10 +448,19 @@ export declare const MONA_JA_JP_LOCALE: {
|
|
|
448
448
|
transferTo: string;
|
|
449
449
|
transferToList: (list: string) => string;
|
|
450
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
451
459
|
multiSelect: {
|
|
452
460
|
clear: string;
|
|
453
461
|
itemsCount: (count: number) => string;
|
|
454
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
455
464
|
};
|
|
456
465
|
notification: {
|
|
457
466
|
close: string;
|
|
@@ -448,10 +448,19 @@ export declare const MONA_KO_KR_LOCALE: {
|
|
|
448
448
|
transferTo: string;
|
|
449
449
|
transferToList: (list: string) => string;
|
|
450
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
451
459
|
multiSelect: {
|
|
452
460
|
clear: string;
|
|
453
461
|
itemsCount: (count: number) => string;
|
|
454
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
455
464
|
};
|
|
456
465
|
notification: {
|
|
457
466
|
close: string;
|
|
@@ -448,10 +448,19 @@ export declare const MONA_PL_PL_LOCALE: {
|
|
|
448
448
|
transferTo: string;
|
|
449
449
|
transferToList: (list: string) => string;
|
|
450
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
451
459
|
multiSelect: {
|
|
452
460
|
clear: string;
|
|
453
461
|
itemsCount: (count: number) => string;
|
|
454
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
455
464
|
};
|
|
456
465
|
notification: {
|
|
457
466
|
close: string;
|
|
@@ -448,10 +448,19 @@ export declare const MONA_PT_BR_LOCALE: {
|
|
|
448
448
|
transferTo: string;
|
|
449
449
|
transferToList: (list: string) => string;
|
|
450
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
451
459
|
multiSelect: {
|
|
452
460
|
clear: string;
|
|
453
461
|
itemsCount: (count: number) => string;
|
|
454
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
455
464
|
};
|
|
456
465
|
notification: {
|
|
457
466
|
close: string;
|
|
@@ -448,10 +448,19 @@ export declare const MONA_RU_RU_LOCALE: {
|
|
|
448
448
|
transferTo: string;
|
|
449
449
|
transferToList: (list: string) => string;
|
|
450
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
451
459
|
multiSelect: {
|
|
452
460
|
clear: string;
|
|
453
461
|
itemsCount: (count: number) => string;
|
|
454
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
455
464
|
};
|
|
456
465
|
notification: {
|
|
457
466
|
close: string;
|
|
@@ -448,10 +448,19 @@ export declare const MONA_TR_TR_LOCALE: {
|
|
|
448
448
|
transferTo: string;
|
|
449
449
|
transferToList: (list: string) => string;
|
|
450
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
451
459
|
multiSelect: {
|
|
452
460
|
clear: string;
|
|
453
461
|
itemsCount: (count: number) => string;
|
|
454
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
455
464
|
};
|
|
456
465
|
notification: {
|
|
457
466
|
close: string;
|
|
@@ -448,10 +448,19 @@ export declare const MONA_ZH_CN_LOCALE: {
|
|
|
448
448
|
transferTo: string;
|
|
449
449
|
transferToList: (list: string) => string;
|
|
450
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
451
459
|
multiSelect: {
|
|
452
460
|
clear: string;
|
|
453
461
|
itemsCount: (count: number) => string;
|
|
454
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
455
464
|
};
|
|
456
465
|
notification: {
|
|
457
466
|
close: string;
|
|
@@ -448,10 +448,19 @@ export declare const MONA_ZH_TW_LOCALE: {
|
|
|
448
448
|
transferTo: string;
|
|
449
449
|
transferToList: (list: string) => string;
|
|
450
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
451
459
|
multiSelect: {
|
|
452
460
|
clear: string;
|
|
453
461
|
itemsCount: (count: number) => string;
|
|
454
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
455
464
|
};
|
|
456
465
|
notification: {
|
|
457
466
|
close: string;
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ElementRef, TemplateRef } from "@angular/core";
|
|
3
|
+
import { FormValueControl } from "@angular/forms/signals";
|
|
4
|
+
import { AttributeConfig, VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
5
|
+
import { VariantProps } from "class-variance-authority";
|
|
6
|
+
import { MonaMaskedTextBoxMessages } from "@nanahoshi/mona-ui/i18n";
|
|
7
|
+
/**
|
|
8
|
+
* Mask characters of your own, each mapped to a pattern that one character must match, such as `{ H: /[0-9a-f]/i }`
|
|
9
|
+
* for a hexadecimal digit. A slot made by a custom rule is required. A rule can replace a built-in one, such as `0`.
|
|
10
|
+
*/
|
|
11
|
+
type MaskRules = Readonly<Record<string, RegExp>>;
|
|
12
|
+
/**
|
|
13
|
+
* How a value is read against a mask, for {@link isMaskComplete} and {@link formatMaskedValue}. Pass what the masked
|
|
14
|
+
* text box is given.
|
|
15
|
+
*/
|
|
16
|
+
interface MaskOptions {
|
|
17
|
+
/** Whether the value includes the mask's literal characters, as the masked text box's `includeLiterals`. */
|
|
18
|
+
readonly includeLiterals?: boolean;
|
|
19
|
+
/** Custom mask characters, as the masked text box's `rules`. */
|
|
20
|
+
readonly rules?: MaskRules;
|
|
21
|
+
}
|
|
22
|
+
interface MaskDisplay {
|
|
23
|
+
/** The rest of the mask after the text: a prompt for each slot, and the literals between them. */
|
|
24
|
+
readonly ghost: string;
|
|
25
|
+
/** UTF-16 offset of each part in the text followed by the ghost, then the length of both. */
|
|
26
|
+
readonly offsets: readonly number[];
|
|
27
|
+
/** What the input holds: every part up to the last filled slot, with the literals after it. */
|
|
28
|
+
readonly text: string;
|
|
29
|
+
/** How many parts the text covers. */
|
|
30
|
+
readonly textParts: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Formats a value for display with its mask's literals, such as `"5551234567"` as `"(555) 123-4567"` for the mask
|
|
34
|
+
* `"(000) 000-0000"`. It reads the value as a masked text box with the same options would, and stops after the last
|
|
35
|
+
* character the value has. An empty slot before it shows as a space.
|
|
36
|
+
* @param value The value, as the masked text box emits it.
|
|
37
|
+
* @param mask The mask, as given to the masked text box.
|
|
38
|
+
* @param options The masked text box's `includeLiterals` and `rules`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function formatMaskedValue(value: string, mask: string, options?: MaskOptions): string;
|
|
41
|
+
/**
|
|
42
|
+
* Whether a value fills every required slot of a mask, for a validator. An empty value doesn't, so let an optional
|
|
43
|
+
* field's validator pass `""` first.
|
|
44
|
+
* @param value The value, as the masked text box emits it.
|
|
45
|
+
* @param mask The mask, as given to the masked text box.
|
|
46
|
+
* @param options The masked text box's `includeLiterals` and `rules`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isMaskComplete(value: string, mask: string, options?: MaskOptions): boolean;
|
|
49
|
+
declare const maskedTextBoxThemeVariants: (props?: ({
|
|
50
|
+
rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
|
|
51
|
+
size?: "large" | "medium" | "small" | null | undefined;
|
|
52
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
53
|
+
type MaskedTextBoxVariantProps = VariantProps<typeof maskedTextBoxThemeVariants>;
|
|
54
|
+
type MaskedTextBoxVariantInput = VariantInputs<MaskedTextBoxVariantProps>;
|
|
55
|
+
/**
|
|
56
|
+
* A text box that takes a value in a fixed format, such as a phone number or a postal code. Each character goes into
|
|
57
|
+
* a slot of the mask, and the mask's literals, such as the parentheses and dash of `(000) 000-0000`, are filled in as
|
|
58
|
+
* you type. The rest of the mask shows after what's typed, so the format is in view.
|
|
59
|
+
*/
|
|
60
|
+
export declare class MaskedTextBoxComponent implements MaskedTextBoxVariantInput, FormValueControl<string> {
|
|
61
|
+
#private;
|
|
62
|
+
protected readonly classes: import("@angular/core").Signal<string>;
|
|
63
|
+
protected readonly complete: import("@angular/core").Signal<boolean>;
|
|
64
|
+
protected readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
65
|
+
protected readonly display: import("@angular/core").Signal<MaskDisplay>;
|
|
66
|
+
protected readonly effectiveDisabled: import("@angular/core").Signal<boolean>;
|
|
67
|
+
protected readonly empty: import("@angular/core").Signal<boolean>;
|
|
68
|
+
protected readonly fieldClass = "relative flex h-full min-w-0 flex-1 items-center";
|
|
69
|
+
protected readonly focused: import("@angular/core").WritableSignal<boolean>;
|
|
70
|
+
protected readonly ghostClass = "\n pointer-events-none absolute inset-0 flex items-center overflow-hidden whitespace-pre px-2\n text-muted-foreground forced-colors:text-[GrayText]\n";
|
|
71
|
+
/** How far the input has scrolled its text, which the ghost follows. */
|
|
72
|
+
protected readonly ghostShift: import("@angular/core").WritableSignal<number>;
|
|
73
|
+
protected readonly ghostTransform: import("@angular/core").Signal<string | null>;
|
|
74
|
+
/** An empty box shows its placeholder instead of the mask until it has focus. */
|
|
75
|
+
protected readonly ghostVisible: import("@angular/core").Signal<boolean>;
|
|
76
|
+
protected readonly inputClasses: import("@angular/core").Signal<string>;
|
|
77
|
+
/** A mask of digits only brings up a number keyboard on touch devices. */
|
|
78
|
+
protected readonly inputMode: import("@angular/core").Signal<string | null>;
|
|
79
|
+
protected readonly inputRef: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
|
|
80
|
+
protected readonly invalidInput: import("@angular/core").Signal<boolean>;
|
|
81
|
+
protected readonly labelledBy: import("@angular/core").Signal<string | null>;
|
|
82
|
+
protected readonly messages: import("@angular/core").Signal<import("@nanahoshi/mona-ui/i18n").MonaMaskedTextBoxMessages>;
|
|
83
|
+
protected readonly prefixTemplateList: import("@angular/core").Signal<readonly TemplateRef<any>[]>;
|
|
84
|
+
protected readonly showClearButton: import("@angular/core").Signal<boolean>;
|
|
85
|
+
protected readonly shownPlaceholder: import("@angular/core").Signal<string | null>;
|
|
86
|
+
protected readonly suffixTemplateList: import("@angular/core").Signal<readonly TemplateRef<any>[]>;
|
|
87
|
+
/**
|
|
88
|
+
* @description Id of an element that describes the inner input, such as a hint that gives the format.
|
|
89
|
+
* @default ""
|
|
90
|
+
*/
|
|
91
|
+
readonly ariaDescribedBy: import("@angular/core").InputSignal<string>;
|
|
92
|
+
/**
|
|
93
|
+
* @description Accessible name of the inner input. Prefer a visible label, linked through {@link inputId} or
|
|
94
|
+
* `aria-labelledby`.
|
|
95
|
+
* @default ""
|
|
96
|
+
*/
|
|
97
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
98
|
+
/**
|
|
99
|
+
* @description Id of the element that labels the inner input.
|
|
100
|
+
* @default ""
|
|
101
|
+
*/
|
|
102
|
+
readonly ariaLabelledBy: import("@angular/core").InputSignal<string>;
|
|
103
|
+
/**
|
|
104
|
+
* @description Displays a clear button that empties the value. The button is hidden while the value is empty or the
|
|
105
|
+
* box is disabled or read-only.
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
readonly clearButton: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
109
|
+
/**
|
|
110
|
+
* @description Renders the component with reduced visual emphasis and removes pointer interaction.
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
114
|
+
/**
|
|
115
|
+
* @description Whether the value includes the mask's literals: `(555) 123-4567` instead of `5551234567`.
|
|
116
|
+
* @default false
|
|
117
|
+
*/
|
|
118
|
+
readonly includeLiterals: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
119
|
+
/**
|
|
120
|
+
* @description Additional HTML attributes applied directly to the inner `<input>` element, such as `autocomplete`.
|
|
121
|
+
* An `inputmode` here replaces the one the mask picks.
|
|
122
|
+
* @default {}
|
|
123
|
+
*/
|
|
124
|
+
readonly inputAttributes: import("@angular/core").InputSignal<AttributeConfig>;
|
|
125
|
+
/**
|
|
126
|
+
* @description Emitted when the inner input loses focus, including when focus moves to the clear button or to
|
|
127
|
+
* content in the prefix or suffix templates.
|
|
128
|
+
*/
|
|
129
|
+
readonly inputBlur: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
130
|
+
/**
|
|
131
|
+
* @description Additional CSS classes applied to the inner `<input>` element.
|
|
132
|
+
* @default ""
|
|
133
|
+
*/
|
|
134
|
+
readonly inputClass: import("@angular/core").InputSignal<string | string[]>;
|
|
135
|
+
/**
|
|
136
|
+
* @description Emitted when the inner input gains focus.
|
|
137
|
+
*/
|
|
138
|
+
readonly inputFocus: import("@angular/core").OutputEmitterRef<FocusEvent>;
|
|
139
|
+
/**
|
|
140
|
+
* @description Id of the inner `<input>` element. Point a `<label for>` or `<mona-label for>` at it to label the
|
|
141
|
+
* box. A unique id is generated when it isn't set.
|
|
142
|
+
* @default generated
|
|
143
|
+
*/
|
|
144
|
+
readonly inputId: import("@angular/core").InputSignal<string>;
|
|
145
|
+
/**
|
|
146
|
+
* @description Inline styles applied to the inner `<input>` element. Accepts a style string or a
|
|
147
|
+
* `CSSStyleDeclaration` partial.
|
|
148
|
+
* @default null
|
|
149
|
+
*/
|
|
150
|
+
readonly inputStyle: import("@angular/core").InputSignal<string | Partial<CSSStyleDeclaration> | null>;
|
|
151
|
+
/**
|
|
152
|
+
* @description Marks the box as invalid. When bound to a signal form field via `[formField]`, this is written by
|
|
153
|
+
* the `FormField` directive. Once touched, the box also shows as invalid while it's partly filled.
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
157
|
+
/**
|
|
158
|
+
* @description The format, one character per slot or literal. `0` is a digit, `9` an optional digit, `#` an
|
|
159
|
+
* optional digit, `+` or `-`, `L` a letter, `?` an optional letter, `A` a letter or digit, `a` an optional letter or
|
|
160
|
+
* digit, `&` any character but a space, and `C` an optional one. Anything else is a literal, and so is a character
|
|
161
|
+
* after a backslash, such as `\0`.
|
|
162
|
+
* @default ""
|
|
163
|
+
*/
|
|
164
|
+
readonly mask: import("@angular/core").InputSignal<string>;
|
|
165
|
+
/**
|
|
166
|
+
* @description Name of the inner input, used by browsers and password managers for autofill. When bound to a
|
|
167
|
+
* signal form field via `[formField]`, this is written by the `FormField` directive.
|
|
168
|
+
* @default ""
|
|
169
|
+
*/
|
|
170
|
+
readonly name: import("@angular/core").InputSignal<string>;
|
|
171
|
+
/**
|
|
172
|
+
* @description Text shown while the box is empty and doesn't have focus, in place of the mask.
|
|
173
|
+
* @default ""
|
|
174
|
+
*/
|
|
175
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
176
|
+
/**
|
|
177
|
+
* @description The character shown in an empty slot.
|
|
178
|
+
* @default "_"
|
|
179
|
+
*/
|
|
180
|
+
readonly prompt: import("@angular/core").InputSignal<string>;
|
|
181
|
+
/**
|
|
182
|
+
* @description Prevents value changes while preserving the component's visual state.
|
|
183
|
+
* @default false
|
|
184
|
+
*/
|
|
185
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
186
|
+
/**
|
|
187
|
+
* @description Marks the box as required. Triggers the invalid state when the value is empty and the field has
|
|
188
|
+
* been touched.
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
191
|
+
readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
192
|
+
/**
|
|
193
|
+
* @description Border-radius preset applied to the component.
|
|
194
|
+
* @default "medium"
|
|
195
|
+
*/
|
|
196
|
+
readonly rounded: import("@angular/core").InputSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
|
|
197
|
+
/**
|
|
198
|
+
* @description Mask characters of your own, each mapped to a pattern one character must match, such as
|
|
199
|
+
* `{ H: /[0-9a-f]/i }`. They can replace the built-in ones, and their slots are required.
|
|
200
|
+
* @default {}
|
|
201
|
+
*/
|
|
202
|
+
readonly rules: import("@angular/core").InputSignal<Readonly<Record<string, RegExp>>>;
|
|
203
|
+
/**
|
|
204
|
+
* @description Size preset controlling the component's dimensions.
|
|
205
|
+
* @default "medium"
|
|
206
|
+
*/
|
|
207
|
+
readonly size: import("@angular/core").InputSignal<"large" | "medium" | "small" | null | undefined>;
|
|
208
|
+
/**
|
|
209
|
+
* @description Emitted when focus leaves the box, including its clear button and prefix and suffix content. Form
|
|
210
|
+
* directives (`[formField]`, `ngModel`, `formControl`) listen to this to mark the field as touched.
|
|
211
|
+
*/
|
|
212
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
213
|
+
/**
|
|
214
|
+
* @description Sets the touched state of the box. When bound to a signal form field via `[formField]`, this is
|
|
215
|
+
* written by the `FormField` directive.
|
|
216
|
+
* @default false
|
|
217
|
+
*/
|
|
218
|
+
readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
219
|
+
/**
|
|
220
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
221
|
+
* @default ""
|
|
222
|
+
*/
|
|
223
|
+
readonly userClass: import("@angular/core").InputSignal<string>;
|
|
224
|
+
/**
|
|
225
|
+
* @description Two-way bindable value: the characters typed into the slots, up to the last one filled, with a space
|
|
226
|
+
* for an empty slot before it. {@link includeLiterals} adds the mask's literals. A value that doesn't line up with
|
|
227
|
+
* the mask, such as `555-123-4567` for `(000) 000-0000`, is fitted into it and written back as it reads.
|
|
228
|
+
* @default ""
|
|
229
|
+
*/
|
|
230
|
+
readonly value: import("@angular/core").ModelSignal<string>;
|
|
231
|
+
constructor();
|
|
232
|
+
/**
|
|
233
|
+
* Focuses the inner input and puts the caret at the first empty slot, where typing picks up.
|
|
234
|
+
* @param options Options passed to the native `focus()` call, such as `preventScroll`.
|
|
235
|
+
*/
|
|
236
|
+
focus(options?: FocusOptions): void;
|
|
237
|
+
protected onBeforeInput(event: InputEvent): void;
|
|
238
|
+
protected onBlur(event: FocusEvent): void;
|
|
239
|
+
protected onClearClick(): void;
|
|
240
|
+
protected onCompositionEnd(): void;
|
|
241
|
+
protected onCompositionStart(): void;
|
|
242
|
+
protected onCut(event: ClipboardEvent): void;
|
|
243
|
+
protected onFocus(event: FocusEvent): void;
|
|
244
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
245
|
+
protected onInput(event: Event): void;
|
|
246
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
247
|
+
protected onPaste(event: ClipboardEvent): void;
|
|
248
|
+
protected onPointerDown(): void;
|
|
249
|
+
protected onScroll(): void;
|
|
250
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MaskedTextBoxComponent, never>;
|
|
251
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MaskedTextBoxComponent, "mona-masked-text-box", never, {
|
|
252
|
+
"ariaDescribedBy": {
|
|
253
|
+
"alias": "aria-describedby";
|
|
254
|
+
"required": false;
|
|
255
|
+
"isSignal": true;
|
|
256
|
+
};
|
|
257
|
+
"ariaLabel": {
|
|
258
|
+
"alias": "aria-label";
|
|
259
|
+
"required": false;
|
|
260
|
+
"isSignal": true;
|
|
261
|
+
};
|
|
262
|
+
"ariaLabelledBy": {
|
|
263
|
+
"alias": "aria-labelledby";
|
|
264
|
+
"required": false;
|
|
265
|
+
"isSignal": true;
|
|
266
|
+
};
|
|
267
|
+
"clearButton": {
|
|
268
|
+
"alias": "clearButton";
|
|
269
|
+
"required": false;
|
|
270
|
+
"isSignal": true;
|
|
271
|
+
};
|
|
272
|
+
"disabled": {
|
|
273
|
+
"alias": "disabled";
|
|
274
|
+
"required": false;
|
|
275
|
+
"isSignal": true;
|
|
276
|
+
};
|
|
277
|
+
"includeLiterals": {
|
|
278
|
+
"alias": "includeLiterals";
|
|
279
|
+
"required": false;
|
|
280
|
+
"isSignal": true;
|
|
281
|
+
};
|
|
282
|
+
"inputAttributes": {
|
|
283
|
+
"alias": "inputAttributes";
|
|
284
|
+
"required": false;
|
|
285
|
+
"isSignal": true;
|
|
286
|
+
};
|
|
287
|
+
"inputClass": {
|
|
288
|
+
"alias": "inputClass";
|
|
289
|
+
"required": false;
|
|
290
|
+
"isSignal": true;
|
|
291
|
+
};
|
|
292
|
+
"inputId": {
|
|
293
|
+
"alias": "inputId";
|
|
294
|
+
"required": false;
|
|
295
|
+
"isSignal": true;
|
|
296
|
+
};
|
|
297
|
+
"inputStyle": {
|
|
298
|
+
"alias": "inputStyle";
|
|
299
|
+
"required": false;
|
|
300
|
+
"isSignal": true;
|
|
301
|
+
};
|
|
302
|
+
"invalid": {
|
|
303
|
+
"alias": "invalid";
|
|
304
|
+
"required": false;
|
|
305
|
+
"isSignal": true;
|
|
306
|
+
};
|
|
307
|
+
"mask": {
|
|
308
|
+
"alias": "mask";
|
|
309
|
+
"required": false;
|
|
310
|
+
"isSignal": true;
|
|
311
|
+
};
|
|
312
|
+
"name": {
|
|
313
|
+
"alias": "name";
|
|
314
|
+
"required": false;
|
|
315
|
+
"isSignal": true;
|
|
316
|
+
};
|
|
317
|
+
"placeholder": {
|
|
318
|
+
"alias": "placeholder";
|
|
319
|
+
"required": false;
|
|
320
|
+
"isSignal": true;
|
|
321
|
+
};
|
|
322
|
+
"prompt": {
|
|
323
|
+
"alias": "prompt";
|
|
324
|
+
"required": false;
|
|
325
|
+
"isSignal": true;
|
|
326
|
+
};
|
|
327
|
+
"readonly": {
|
|
328
|
+
"alias": "readonly";
|
|
329
|
+
"required": false;
|
|
330
|
+
"isSignal": true;
|
|
331
|
+
};
|
|
332
|
+
"required": {
|
|
333
|
+
"alias": "required";
|
|
334
|
+
"required": false;
|
|
335
|
+
"isSignal": true;
|
|
336
|
+
};
|
|
337
|
+
"rounded": {
|
|
338
|
+
"alias": "rounded";
|
|
339
|
+
"required": false;
|
|
340
|
+
"isSignal": true;
|
|
341
|
+
};
|
|
342
|
+
"rules": {
|
|
343
|
+
"alias": "rules";
|
|
344
|
+
"required": false;
|
|
345
|
+
"isSignal": true;
|
|
346
|
+
};
|
|
347
|
+
"size": {
|
|
348
|
+
"alias": "size";
|
|
349
|
+
"required": false;
|
|
350
|
+
"isSignal": true;
|
|
351
|
+
};
|
|
352
|
+
"touched": {
|
|
353
|
+
"alias": "touched";
|
|
354
|
+
"required": false;
|
|
355
|
+
"isSignal": true;
|
|
356
|
+
};
|
|
357
|
+
"userClass": {
|
|
358
|
+
"alias": "class";
|
|
359
|
+
"required": false;
|
|
360
|
+
"isSignal": true;
|
|
361
|
+
};
|
|
362
|
+
"value": {
|
|
363
|
+
"alias": "value";
|
|
364
|
+
"required": false;
|
|
365
|
+
"isSignal": true;
|
|
366
|
+
};
|
|
367
|
+
}, {
|
|
368
|
+
"inputBlur": "inputBlur";
|
|
369
|
+
"inputFocus": "inputFocus";
|
|
370
|
+
"touch": "touch";
|
|
371
|
+
"value": "valueChange";
|
|
372
|
+
}, ["prefixTemplateList", "suffixTemplateList"], never, true, never>;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Marks an `<ng-template>` as content before the masked text box's input, such as an icon or a country code. Several
|
|
376
|
+
* render in source order.
|
|
377
|
+
*/
|
|
378
|
+
export declare class MaskedTextBoxPrefixTemplateDirective {
|
|
379
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MaskedTextBoxPrefixTemplateDirective, never>;
|
|
380
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MaskedTextBoxPrefixTemplateDirective, "ng-template[monaMaskedTextBoxPrefixTemplate]", never, {}, {}, never, never, true, never>;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Marks an `<ng-template>` as content after the masked text box's input and its clear button, such as a unit or a
|
|
384
|
+
* button. Several render in source order.
|
|
385
|
+
*/
|
|
386
|
+
export declare class MaskedTextBoxSuffixTemplateDirective {
|
|
387
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MaskedTextBoxSuffixTemplateDirective, never>;
|
|
388
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MaskedTextBoxSuffixTemplateDirective, "ng-template[monaMaskedTextBoxSuffixTemplate]", never, {}, {}, never, never, true, never>;
|
|
389
|
+
}
|
|
390
|
+
export declare const MASKED_TEXT_BOX_DEFAULT_MESSAGES: MonaMaskedTextBoxMessages;
|
|
391
|
+
export type { MaskOptions, MaskRules, MaskedTextBoxVariantProps };
|
|
@@ -182,6 +182,12 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
|
|
|
182
182
|
* @default false
|
|
183
183
|
*/
|
|
184
184
|
readonly showClearButton: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
185
|
+
/**
|
|
186
|
+
* @description Starts the list with a "Select all" option, which selects every enabled item the filter leaves, or
|
|
187
|
+
* deselects them when they're all selected. Its checkbox shows when only some are.
|
|
188
|
+
* @default false
|
|
189
|
+
*/
|
|
190
|
+
readonly showSelectAll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
185
191
|
/**
|
|
186
192
|
* @description The size of the multi select component.
|
|
187
193
|
* @default "medium"
|
|
@@ -374,6 +380,11 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
|
|
|
374
380
|
"required": false;
|
|
375
381
|
"isSignal": true;
|
|
376
382
|
};
|
|
383
|
+
"showSelectAll": {
|
|
384
|
+
"alias": "showSelectAll";
|
|
385
|
+
"required": false;
|
|
386
|
+
"isSignal": true;
|
|
387
|
+
};
|
|
377
388
|
"size": {
|
|
378
389
|
"alias": "size";
|
|
379
390
|
"required": false;
|