@nanahoshi/mona-ui 0.34.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.
Files changed (87) hide show
  1. package/alert/package.json +4 -0
  2. package/badge/package.json +4 -0
  3. package/docs/alert.md +219 -0
  4. package/docs/api/alert.md +78 -0
  5. package/docs/api/avatar.md +25 -0
  6. package/docs/api/badge.md +24 -0
  7. package/docs/api/common.md +3 -3
  8. package/docs/api/i18n.md +71 -5
  9. package/docs/api/locales.md +14 -14
  10. package/docs/api/masked-text-box.md +137 -0
  11. package/docs/api/multi-select.md +3 -0
  12. package/docs/api/separator.md +23 -0
  13. package/docs/api/toolbar.md +81 -0
  14. package/docs/avatar.md +108 -6
  15. package/docs/badge.md +181 -0
  16. package/docs/masked-textbox.md +334 -0
  17. package/docs/multi-select.md +120 -0
  18. package/docs/separator.md +147 -0
  19. package/docs/sidebar-menus.md +1 -1
  20. package/docs/toolbar.md +327 -0
  21. package/fesm2022/nanahoshi-mona-ui-alert.mjs +422 -0
  22. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +182 -3
  23. package/fesm2022/nanahoshi-mona-ui-badge.mjs +273 -0
  24. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +20 -1
  25. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +54 -15
  26. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +13 -1
  27. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +13 -1
  28. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +13 -1
  29. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +13 -1
  30. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +13 -1
  31. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +13 -1
  32. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +13 -1
  33. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +13 -1
  34. package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +13 -1
  35. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +13 -1
  36. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +13 -1
  37. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +13 -1
  38. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +13 -1
  39. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +13 -1
  40. package/fesm2022/nanahoshi-mona-ui-masked-text-box.mjs +1302 -0
  41. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +112 -3
  42. package/fesm2022/nanahoshi-mona-ui-separator.mjs +165 -0
  43. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +3 -3
  44. package/fesm2022/nanahoshi-mona-ui-toolbar.mjs +536 -0
  45. package/i18n/catalogs/en-US.messages.json +19 -1
  46. package/llms.txt +13 -3
  47. package/locales/ar-sa/ar-sa.messages.json +19 -1
  48. package/locales/de-de/de-de.messages.json +19 -1
  49. package/locales/es-es/es-es.messages.json +19 -1
  50. package/locales/fr-fr/fr-fr.messages.json +19 -1
  51. package/locales/id-id/id-id.messages.json +19 -1
  52. package/locales/it-it/it-it.messages.json +19 -1
  53. package/locales/ja-jp/ja-jp.messages.json +19 -1
  54. package/locales/ko-kr/ko-kr.messages.json +19 -1
  55. package/locales/pl-pl/pl-pl.messages.json +19 -1
  56. package/locales/pt-br/pt-br.messages.json +19 -1
  57. package/locales/ru-ru/ru-ru.messages.json +19 -1
  58. package/locales/tr-tr/tr-tr.messages.json +19 -1
  59. package/locales/zh-cn/zh-cn.messages.json +19 -1
  60. package/locales/zh-tw/zh-tw.messages.json +19 -1
  61. package/masked-text-box/package.json +4 -0
  62. package/package.json +21 -1
  63. package/separator/package.json +4 -0
  64. package/toolbar/package.json +4 -0
  65. package/types/nanahoshi-mona-ui-alert.d.ts +144 -0
  66. package/types/nanahoshi-mona-ui-avatar.d.ts +66 -0
  67. package/types/nanahoshi-mona-ui-badge.d.ts +82 -0
  68. package/types/nanahoshi-mona-ui-i18n.d.ts +44 -0
  69. package/types/nanahoshi-mona-ui-internal-list.d.ts +12 -0
  70. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +18 -0
  71. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +18 -0
  72. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +18 -0
  73. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +18 -0
  74. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +18 -0
  75. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +18 -0
  76. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +18 -0
  77. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +18 -0
  78. package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +18 -0
  79. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +18 -0
  80. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +18 -0
  81. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +18 -0
  82. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +18 -0
  83. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +18 -0
  84. package/types/nanahoshi-mona-ui-masked-text-box.d.ts +391 -0
  85. package/types/nanahoshi-mona-ui-multi-select.d.ts +38 -0
  86. package/types/nanahoshi-mona-ui-separator.d.ts +66 -0
  87. package/types/nanahoshi-mona-ui-toolbar.d.ts +183 -0
@@ -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 };
@@ -65,6 +65,13 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
65
65
  protected readonly tagTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
66
66
  protected readonly valueTextMap: import("@angular/core").Signal<import("@mirei/ts-collections").ImmutableDictionary<ListItem<TData>, string>>;
67
67
  protected readonly visibleTagCount: import("@angular/core").Signal<number>;
68
+ /**
69
+ * @description Lets people add values that aren't in {@link data}: Enter in the popup's filter box, on text that
70
+ * matches no item, emits {@link valueAdd} with the text, and an item whose text it matches is selected instead.
71
+ * Needs `monaDropDownFilterable`, whose filter box is where the text is typed.
72
+ * @default false
73
+ */
74
+ readonly allowCustomValue: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
68
75
  /**
69
76
  * @description ID of an element that describes the multi select, such as help text or an error message.
70
77
  * @default ""
@@ -175,6 +182,12 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
175
182
  * @default false
176
183
  */
177
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>;
178
191
  /**
179
192
  * @description The size of the multi select component.
180
193
  * @default "medium"
@@ -211,6 +224,12 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
211
224
  * @default []
212
225
  */
213
226
  readonly value: import("@angular/core").ModelSignal<Iterable<TValue>>;
227
+ /**
228
+ * @description Emitted with the trimmed text when Enter is pressed in the filter box on text that matches no item.
229
+ * Only emitted when {@link allowCustomValue} is true. Add an item for it to {@link data} and to {@link value}; the
230
+ * filter box is cleared for the next one.
231
+ */
232
+ readonly valueAdd: import("@angular/core").OutputEmitterRef<string>;
214
233
  /**
215
234
  * @description Sets the value field of the multi select component.
216
235
  * It is used for stable item identity, matching externally supplied values, and primitive
@@ -243,8 +262,15 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
243
262
  protected onSelectedItemGroupRemove(event: Event): void;
244
263
  protected onSelectedItemRemove(event: Event, listItem: ListItem<TData>): void;
245
264
  protected onValueClear(event: Event): void;
265
+ private addCustomValue;
246
266
  private getSelectedControlValues;
247
267
  private handleEnterKey;
268
+ /**
269
+ * Enter in the filter box. With custom values, it adds the typed text: the item it names is selected, or `valueAdd`
270
+ * offers it. An item reached with the arrow keys is left to the list, which toggles it. With nothing highlighted,
271
+ * the list would toggle the first selected item, so Enter does nothing then.
272
+ */
273
+ private handlePopupKeydown;
248
274
  private handlePopupPositionUpdate;
249
275
  private initialize;
250
276
  private setBackspaceKeySubscription;
@@ -256,8 +282,14 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
256
282
  private synchronizeSelection;
257
283
  private toggleHighlightedItem;
258
284
  private updateValue;
285
+ private warnIfCustomValueHasNoFilter;
259
286
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent<any, any>, never>;
260
287
  static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent<any, any>, "mona-multi-select", never, {
288
+ "allowCustomValue": {
289
+ "alias": "allowCustomValue";
290
+ "required": false;
291
+ "isSignal": true;
292
+ };
261
293
  "ariaDescribedBy": {
262
294
  "alias": "aria-describedby";
263
295
  "required": false;
@@ -348,6 +380,11 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
348
380
  "required": false;
349
381
  "isSignal": true;
350
382
  };
383
+ "showSelectAll": {
384
+ "alias": "showSelectAll";
385
+ "required": false;
386
+ "isSignal": true;
387
+ };
351
388
  "size": {
352
389
  "alias": "size";
353
390
  "required": false;
@@ -390,6 +427,7 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
390
427
  "opened": "opened";
391
428
  "touch": "touch";
392
429
  "value": "valueChange";
430
+ "valueAdd": "valueAdd";
393
431
  }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate", "tagTemplate"], never, true, [{
394
432
  directive: typeof i1.DropdownDataHandlerDirective;
395
433
  inputs: {};
@@ -0,0 +1,66 @@
1
+ import { ClassInputType } from "@nanahoshi/mona-ui/common";
2
+ import * as i0 from "@angular/core";
3
+ import { VariantProps } from "class-variance-authority";
4
+ /**
5
+ * A thin line between groups of content, across a column or down a row, with an optional label in its middle. Like an
6
+ * `<hr>`, it's a separator for assistive technology unless it's marked decorative.
7
+ */
8
+ export declare class SeparatorComponent {
9
+ protected readonly baseClass: import("@angular/core").Signal<string>;
10
+ protected readonly labelled: import("@angular/core").Signal<boolean>;
11
+ protected readonly lineClass = "h-px flex-1 bg-border forced-colors:bg-[CanvasText]";
12
+ /** A label is read as text, which a separator's role would hide, so a labelled line has none. */
13
+ protected readonly role: import("@angular/core").Signal<"separator" | null>;
14
+ /**
15
+ * @description Marks the line as only visual, so assistive technology skips it. Use it where the line repeats a
16
+ * boundary the content already makes, such as between cards.
17
+ * @default false
18
+ */
19
+ readonly decorative: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
20
+ /**
21
+ * @description Text in the middle of a horizontal line, such as "or" between two ways to sign in. It's read as text,
22
+ * and the line stays out of the way, as if it were decorative.
23
+ * @default ""
24
+ */
25
+ readonly label: import("@angular/core").InputSignal<string>;
26
+ /**
27
+ * @description Whether the line runs across (`horizontal`, between stacked content) or down (`vertical`, between
28
+ * items in a row). A vertical line stretches to the row's height. A labelled line is always horizontal.
29
+ * @default "horizontal"
30
+ */
31
+ readonly orientation: import("@angular/core").InputSignal<NonNullable<"horizontal" | "vertical" | null | undefined>>;
32
+ /**
33
+ * @description Additional CSS classes merged onto the host element via `tailwind-merge`, such as a margin.
34
+ * @default ""
35
+ */
36
+ readonly userClass: import("@angular/core").InputSignalWithTransform<string, ClassInputType>;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<SeparatorComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<SeparatorComponent, "mona-separator", never, {
39
+ "decorative": {
40
+ "alias": "decorative";
41
+ "required": false;
42
+ "isSignal": true;
43
+ };
44
+ "label": {
45
+ "alias": "label";
46
+ "required": false;
47
+ "isSignal": true;
48
+ };
49
+ "orientation": {
50
+ "alias": "orientation";
51
+ "required": false;
52
+ "isSignal": true;
53
+ };
54
+ "userClass": {
55
+ "alias": "class";
56
+ "required": false;
57
+ "isSignal": true;
58
+ };
59
+ }, {}, never, never, true, never>;
60
+ }
61
+ declare const separatorThemeVariants: (props?: ({
62
+ labelled?: boolean | null | undefined;
63
+ orientation?: "horizontal" | "vertical" | null | undefined;
64
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
65
+ type SeparatorVariantProps = VariantProps<typeof separatorThemeVariants>;
66
+ export type { SeparatorVariantProps };