@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.
- package/alert/package.json +4 -0
- package/badge/package.json +4 -0
- package/docs/alert.md +219 -0
- package/docs/api/alert.md +78 -0
- package/docs/api/avatar.md +25 -0
- package/docs/api/badge.md +24 -0
- package/docs/api/common.md +3 -3
- package/docs/api/i18n.md +71 -5
- package/docs/api/locales.md +14 -14
- package/docs/api/masked-text-box.md +137 -0
- package/docs/api/multi-select.md +3 -0
- package/docs/api/separator.md +23 -0
- package/docs/api/toolbar.md +81 -0
- package/docs/avatar.md +108 -6
- package/docs/badge.md +181 -0
- package/docs/masked-textbox.md +334 -0
- package/docs/multi-select.md +120 -0
- package/docs/separator.md +147 -0
- package/docs/sidebar-menus.md +1 -1
- package/docs/toolbar.md +327 -0
- package/fesm2022/nanahoshi-mona-ui-alert.mjs +422 -0
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +182 -3
- package/fesm2022/nanahoshi-mona-ui-badge.mjs +273 -0
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +20 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +54 -15
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-masked-text-box.mjs +1302 -0
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +112 -3
- package/fesm2022/nanahoshi-mona-ui-separator.mjs +165 -0
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-toolbar.mjs +536 -0
- package/i18n/catalogs/en-US.messages.json +19 -1
- package/llms.txt +13 -3
- package/locales/ar-sa/ar-sa.messages.json +19 -1
- package/locales/de-de/de-de.messages.json +19 -1
- package/locales/es-es/es-es.messages.json +19 -1
- package/locales/fr-fr/fr-fr.messages.json +19 -1
- package/locales/id-id/id-id.messages.json +19 -1
- package/locales/it-it/it-it.messages.json +19 -1
- package/locales/ja-jp/ja-jp.messages.json +19 -1
- package/locales/ko-kr/ko-kr.messages.json +19 -1
- package/locales/pl-pl/pl-pl.messages.json +19 -1
- package/locales/pt-br/pt-br.messages.json +19 -1
- package/locales/ru-ru/ru-ru.messages.json +19 -1
- package/locales/tr-tr/tr-tr.messages.json +19 -1
- package/locales/zh-cn/zh-cn.messages.json +19 -1
- package/locales/zh-tw/zh-tw.messages.json +19 -1
- package/masked-text-box/package.json +4 -0
- package/package.json +21 -1
- package/separator/package.json +4 -0
- package/toolbar/package.json +4 -0
- package/types/nanahoshi-mona-ui-alert.d.ts +144 -0
- package/types/nanahoshi-mona-ui-avatar.d.ts +66 -0
- package/types/nanahoshi-mona-ui-badge.d.ts +82 -0
- package/types/nanahoshi-mona-ui-i18n.d.ts +44 -0
- package/types/nanahoshi-mona-ui-internal-list.d.ts +12 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +18 -0
- package/types/nanahoshi-mona-ui-masked-text-box.d.ts +391 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +38 -0
- package/types/nanahoshi-mona-ui-separator.d.ts +66 -0
- package/types/nanahoshi-mona-ui-toolbar.d.ts +183 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanahoshi/mona-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "A very light Angular UI framework",
|
|
5
5
|
"author": "Nanahoshi",
|
|
6
6
|
"repository": {
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./types/nanahoshi-mona-ui.d.ts",
|
|
19
19
|
"default": "./fesm2022/nanahoshi-mona-ui.mjs"
|
|
20
20
|
},
|
|
21
|
+
"./alert": {
|
|
22
|
+
"types": "./types/nanahoshi-mona-ui-alert.d.ts",
|
|
23
|
+
"default": "./fesm2022/nanahoshi-mona-ui-alert.mjs"
|
|
24
|
+
},
|
|
21
25
|
"./auto-complete": {
|
|
22
26
|
"types": "./types/nanahoshi-mona-ui-auto-complete.d.ts",
|
|
23
27
|
"default": "./fesm2022/nanahoshi-mona-ui-auto-complete.mjs"
|
|
@@ -26,6 +30,10 @@
|
|
|
26
30
|
"types": "./types/nanahoshi-mona-ui-avatar.d.ts",
|
|
27
31
|
"default": "./fesm2022/nanahoshi-mona-ui-avatar.mjs"
|
|
28
32
|
},
|
|
33
|
+
"./badge": {
|
|
34
|
+
"types": "./types/nanahoshi-mona-ui-badge.d.ts",
|
|
35
|
+
"default": "./fesm2022/nanahoshi-mona-ui-badge.mjs"
|
|
36
|
+
},
|
|
29
37
|
"./breadcrumb": {
|
|
30
38
|
"types": "./types/nanahoshi-mona-ui-breadcrumb.d.ts",
|
|
31
39
|
"default": "./fesm2022/nanahoshi-mona-ui-breadcrumb.mjs"
|
|
@@ -266,6 +274,10 @@
|
|
|
266
274
|
"types": "./types/nanahoshi-mona-ui-locales-zh-tw.d.ts",
|
|
267
275
|
"default": "./fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs"
|
|
268
276
|
},
|
|
277
|
+
"./masked-text-box": {
|
|
278
|
+
"types": "./types/nanahoshi-mona-ui-masked-text-box.d.ts",
|
|
279
|
+
"default": "./fesm2022/nanahoshi-mona-ui-masked-text-box.mjs"
|
|
280
|
+
},
|
|
269
281
|
"./menubar": {
|
|
270
282
|
"types": "./types/nanahoshi-mona-ui-menubar.d.ts",
|
|
271
283
|
"default": "./fesm2022/nanahoshi-mona-ui-menubar.mjs"
|
|
@@ -334,6 +346,10 @@
|
|
|
334
346
|
"types": "./types/nanahoshi-mona-ui-segmented.d.ts",
|
|
335
347
|
"default": "./fesm2022/nanahoshi-mona-ui-segmented.mjs"
|
|
336
348
|
},
|
|
349
|
+
"./separator": {
|
|
350
|
+
"types": "./types/nanahoshi-mona-ui-separator.d.ts",
|
|
351
|
+
"default": "./fesm2022/nanahoshi-mona-ui-separator.mjs"
|
|
352
|
+
},
|
|
337
353
|
"./sheet": {
|
|
338
354
|
"types": "./types/nanahoshi-mona-ui-sheet.d.ts",
|
|
339
355
|
"default": "./fesm2022/nanahoshi-mona-ui-sheet.mjs"
|
|
@@ -394,6 +410,10 @@
|
|
|
394
410
|
"types": "./types/nanahoshi-mona-ui-time-selector.d.ts",
|
|
395
411
|
"default": "./fesm2022/nanahoshi-mona-ui-time-selector.mjs"
|
|
396
412
|
},
|
|
413
|
+
"./toolbar": {
|
|
414
|
+
"types": "./types/nanahoshi-mona-ui-toolbar.d.ts",
|
|
415
|
+
"default": "./fesm2022/nanahoshi-mona-ui-toolbar.mjs"
|
|
416
|
+
},
|
|
397
417
|
"./tooltip": {
|
|
398
418
|
"types": "./types/nanahoshi-mona-ui-tooltip.d.ts",
|
|
399
419
|
"default": "./fesm2022/nanahoshi-mona-ui-tooltip.mjs"
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { MonaAlertMessages } from "@nanahoshi/mona-ui/i18n";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ElementRef, TemplateRef } from "@angular/core";
|
|
4
|
+
import { ClassInputType } from "@nanahoshi/mona-ui/common";
|
|
5
|
+
import { VariantProps } from "class-variance-authority";
|
|
6
|
+
export declare const ALERT_DEFAULT_MESSAGES: MonaAlertMessages;
|
|
7
|
+
/** How an alert is read aloud when it's shown: not at all, after what's being read, or at once. */
|
|
8
|
+
type AlertAnnouncement = "assertive" | "off" | "polite";
|
|
9
|
+
/**
|
|
10
|
+
* A message that stays on the page, such as a failed payment above a form or a notice above a table, tinted by what it
|
|
11
|
+
* means and marked with an icon. It can have a title, actions and a dismiss button, and it can be announced when it's
|
|
12
|
+
* shown.
|
|
13
|
+
*/
|
|
14
|
+
export declare class AlertComponent {
|
|
15
|
+
#private;
|
|
16
|
+
protected readonly baseClass: import("@angular/core").Signal<string>;
|
|
17
|
+
protected readonly bodyClass = "flex min-w-0 flex-1 flex-col gap-1 leading-5";
|
|
18
|
+
protected readonly descriptionElement: import("@angular/core").Signal<ElementRef<HTMLElement>>;
|
|
19
|
+
protected readonly dismissClass = "-my-1.5 -me-2 shrink-0 text-current";
|
|
20
|
+
protected readonly iconClass = "flex h-5 shrink-0 items-center [&>svg]:size-4";
|
|
21
|
+
protected readonly iconTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
|
|
22
|
+
protected readonly messages: import("@angular/core").Signal<import("@nanahoshi/mona-ui/i18n").MonaAlertMessages>;
|
|
23
|
+
protected readonly titleClass = "font-semibold";
|
|
24
|
+
protected readonly titleElement: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* @description Reads the alert's title and text aloud once, when the alert is shown. Use it for an alert that appears
|
|
27
|
+
* because of something the user did, such as a failed save: `assertive` interrupts, for something that needs
|
|
28
|
+
* attention now, and `polite` waits for a pause. Leave it `off` for an alert that's part of the page when it loads.
|
|
29
|
+
* @default "off"
|
|
30
|
+
*/
|
|
31
|
+
readonly announce: import("@angular/core").InputSignal<AlertAnnouncement>;
|
|
32
|
+
/**
|
|
33
|
+
* @description Emitted when the dismiss button is activated, with the click event. The alert doesn't hide itself:
|
|
34
|
+
* remove it in your handler, and move focus to where the user can carry on, since the button goes with it.
|
|
35
|
+
*/
|
|
36
|
+
readonly dismiss: import("@angular/core").OutputEmitterRef<Event>;
|
|
37
|
+
/**
|
|
38
|
+
* @description Name of the dismiss button, in place of the localized "Dismiss", followed by the title when there is
|
|
39
|
+
* one.
|
|
40
|
+
* @default ""
|
|
41
|
+
*/
|
|
42
|
+
readonly dismissLabel: import("@angular/core").InputSignal<string>;
|
|
43
|
+
/**
|
|
44
|
+
* @description Shows a button in the alert's corner that emits `dismiss`.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
readonly dismissible: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* @description What the alert means, which sets its tint, border and icon. Say it in the text too, since color and
|
|
50
|
+
* shape alone don't reach everyone.
|
|
51
|
+
* @default "info"
|
|
52
|
+
*/
|
|
53
|
+
readonly look: import("@angular/core").InputSignal<"error" | "info" | "neutral" | "success" | "warning" | null | undefined>;
|
|
54
|
+
/**
|
|
55
|
+
* @description Shows the look's icon before the text. A `monaAlertIconTemplate` replaces the icon.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
readonly showIcon: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
59
|
+
/**
|
|
60
|
+
* @description A short heading above the text, in bold. It also names the dismiss button.
|
|
61
|
+
* @default ""
|
|
62
|
+
*/
|
|
63
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
64
|
+
/**
|
|
65
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
66
|
+
* @default ""
|
|
67
|
+
*/
|
|
68
|
+
readonly userClass: import("@angular/core").InputSignalWithTransform<string, ClassInputType>;
|
|
69
|
+
constructor();
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "mona-alert", never, {
|
|
72
|
+
"announce": {
|
|
73
|
+
"alias": "announce";
|
|
74
|
+
"required": false;
|
|
75
|
+
"isSignal": true;
|
|
76
|
+
};
|
|
77
|
+
"dismissLabel": {
|
|
78
|
+
"alias": "dismissLabel";
|
|
79
|
+
"required": false;
|
|
80
|
+
"isSignal": true;
|
|
81
|
+
};
|
|
82
|
+
"dismissible": {
|
|
83
|
+
"alias": "dismissible";
|
|
84
|
+
"required": false;
|
|
85
|
+
"isSignal": true;
|
|
86
|
+
};
|
|
87
|
+
"look": {
|
|
88
|
+
"alias": "look";
|
|
89
|
+
"required": false;
|
|
90
|
+
"isSignal": true;
|
|
91
|
+
};
|
|
92
|
+
"showIcon": {
|
|
93
|
+
"alias": "showIcon";
|
|
94
|
+
"required": false;
|
|
95
|
+
"isSignal": true;
|
|
96
|
+
};
|
|
97
|
+
"title": {
|
|
98
|
+
"alias": "title";
|
|
99
|
+
"required": false;
|
|
100
|
+
"isSignal": true;
|
|
101
|
+
};
|
|
102
|
+
"userClass": {
|
|
103
|
+
"alias": "class";
|
|
104
|
+
"required": false;
|
|
105
|
+
"isSignal": true;
|
|
106
|
+
};
|
|
107
|
+
}, {
|
|
108
|
+
"dismiss": "dismiss";
|
|
109
|
+
}, ["iconTemplate"], ["*", "[monaAlertActions]"], true, never>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @description Marks an element inside `<mona-alert>` as its row of actions, such as a Retry button. The alert places it
|
|
113
|
+
* below its text, and it lays out its buttons in a wrapping row.
|
|
114
|
+
*/
|
|
115
|
+
export declare class AlertActionsDirective {
|
|
116
|
+
protected readonly baseClass: import("@angular/core").Signal<string>;
|
|
117
|
+
/**
|
|
118
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
119
|
+
* @default ""
|
|
120
|
+
*/
|
|
121
|
+
readonly userClass: import("@angular/core").InputSignalWithTransform<string, ClassInputType>;
|
|
122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertActionsDirective, never>;
|
|
123
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AlertActionsDirective, "[monaAlertActions]", never, {
|
|
124
|
+
"userClass": {
|
|
125
|
+
"alias": "class";
|
|
126
|
+
"required": false;
|
|
127
|
+
"isSignal": true;
|
|
128
|
+
};
|
|
129
|
+
}, {}, never, never, true, never>;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @description Apply to an `<ng-template>` directly inside `<mona-alert>` to draw the alert's icon in place of the one
|
|
133
|
+
* its look shows. The template receives no context, and what it renders is hidden from assistive technology, like the
|
|
134
|
+
* default icon.
|
|
135
|
+
*/
|
|
136
|
+
export declare class AlertIconTemplateDirective {
|
|
137
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AlertIconTemplateDirective, never>;
|
|
138
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AlertIconTemplateDirective, "ng-template[monaAlertIconTemplate]", never, {}, {}, never, never, true, never>;
|
|
139
|
+
}
|
|
140
|
+
declare const alertThemeVariants: (props?: ({
|
|
141
|
+
look?: "error" | "info" | "neutral" | "success" | "warning" | null | undefined;
|
|
142
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
143
|
+
type AlertVariantProps = VariantProps<typeof alertThemeVariants>;
|
|
144
|
+
export type { AlertAnnouncement, AlertVariantProps };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { MonaAvatarMessages } from "@nanahoshi/mona-ui/i18n";
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
3
|
+
import { Signal } from "@angular/core";
|
|
4
|
+
import { ClassInputType } from "@nanahoshi/mona-ui/common";
|
|
5
|
+
export declare const AVATAR_DEFAULT_MESSAGES: MonaAvatarMessages;
|
|
2
6
|
export declare class AvatarComponent {
|
|
3
7
|
#private;
|
|
4
8
|
protected readonly avatarLabelStyles: import("@angular/core").Signal<{
|
|
@@ -719,4 +723,66 @@ export declare class AvatarComponent {
|
|
|
719
723
|
"isSignal": true;
|
|
720
724
|
};
|
|
721
725
|
}, {}, never, ["*"], true, never>;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Stacks `mona-avatar`s in an overlapping row, such as the members of a project. Past `max`, the rest collapse into one
|
|
729
|
+
* item that counts them, as in "+3".
|
|
730
|
+
*/
|
|
731
|
+
export declare class AvatarGroupComponent {
|
|
732
|
+
#private;
|
|
733
|
+
protected readonly avatars: Signal<readonly AvatarComponent[]>;
|
|
734
|
+
protected readonly baseClass: Signal<string>;
|
|
735
|
+
protected readonly collapsedCount: Signal<number>;
|
|
736
|
+
protected readonly messages: Signal<import("@nanahoshi/mona-ui/i18n").MonaAvatarMessages>;
|
|
737
|
+
protected readonly moreClass = "\n inline-flex items-center justify-center overflow-hidden\n border-solid border-border bg-secondary text-secondary-foreground\n font-semibold tabular-nums leading-none select-none\n";
|
|
738
|
+
/** The count looks like the avatars it stands for: their size, shape and border. */
|
|
739
|
+
protected readonly moreStyles: Signal<{
|
|
740
|
+
borderRadius: string;
|
|
741
|
+
borderWidth: string;
|
|
742
|
+
fontSize: string;
|
|
743
|
+
height: string;
|
|
744
|
+
width: string;
|
|
745
|
+
}>;
|
|
746
|
+
protected readonly moreText: Signal<string>;
|
|
747
|
+
protected readonly overlap: Signal<string>;
|
|
748
|
+
/**
|
|
749
|
+
* @description Accessible name of the group, such as "Project members". The group is read as one, with each avatar's
|
|
750
|
+
* name inside it.
|
|
751
|
+
* @default ""
|
|
752
|
+
*/
|
|
753
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
754
|
+
/**
|
|
755
|
+
* @description How many avatars to show. The rest collapse into one item that counts them, named such as "3 more".
|
|
756
|
+
* Without it, every avatar shows.
|
|
757
|
+
* @default null
|
|
758
|
+
*/
|
|
759
|
+
readonly max: import("@angular/core").InputSignalWithTransform<number | null, string | number | null | undefined>;
|
|
760
|
+
/**
|
|
761
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
762
|
+
* @default ""
|
|
763
|
+
*/
|
|
764
|
+
readonly userClass: import("@angular/core").InputSignalWithTransform<string, ClassInputType>;
|
|
765
|
+
/**
|
|
766
|
+
* Whether an avatar is past `max`, and so hidden.
|
|
767
|
+
* @hidden
|
|
768
|
+
*/
|
|
769
|
+
isCollapsed(avatar: unknown): Signal<boolean>;
|
|
770
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarGroupComponent, never>;
|
|
771
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarGroupComponent, "mona-avatar-group", never, {
|
|
772
|
+
"ariaLabel": {
|
|
773
|
+
"alias": "aria-label";
|
|
774
|
+
"required": false;
|
|
775
|
+
"isSignal": true;
|
|
776
|
+
};
|
|
777
|
+
"max": {
|
|
778
|
+
"alias": "max";
|
|
779
|
+
"required": false;
|
|
780
|
+
"isSignal": true;
|
|
781
|
+
};
|
|
782
|
+
"userClass": {
|
|
783
|
+
"alias": "class";
|
|
784
|
+
"required": false;
|
|
785
|
+
"isSignal": true;
|
|
786
|
+
};
|
|
787
|
+
}, {}, ["avatars"], ["*"], true, never>;
|
|
722
788
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ClassInputType } from "@nanahoshi/mona-ui/common";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { VariantInputs } from "@nanahoshi/mona-ui/internal";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* The shape every badge shares, the sidebar's included. The transparent border keeps the badge's edge in forced colors,
|
|
7
|
+
* where its fill doesn't paint.
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare const BADGE_BASE_CLASSES = "\n inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap\n border border-transparent font-medium tabular-nums\n forced-colors:border-[CanvasText]\n [&>svg]:pointer-events-none [&>svg]:shrink-0\n";
|
|
11
|
+
declare const badgeThemeVariants: (props?: ({
|
|
12
|
+
fill?: "outline" | "solid" | "subtle" | null | undefined;
|
|
13
|
+
look?: "error" | "info" | "primary" | "secondary" | "success" | "warning" | null | undefined;
|
|
14
|
+
rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
|
|
15
|
+
size?: "large" | "medium" | "small" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
type BadgeVariantProps = VariantProps<typeof badgeThemeVariants>;
|
|
18
|
+
type BadgeVariantInputs = VariantInputs<BadgeVariantProps>;
|
|
19
|
+
/**
|
|
20
|
+
* @description
|
|
21
|
+
* A short count or status, such as `12` or `Draft`, drawn as a small filled or outlined label. It adds no role, so its text
|
|
22
|
+
* reads as part of what's around it.
|
|
23
|
+
*/
|
|
24
|
+
export declare class BadgeDirective implements BadgeVariantInputs {
|
|
25
|
+
protected readonly baseClass: import("@angular/core").Signal<string>;
|
|
26
|
+
/**
|
|
27
|
+
* @description How the badge is drawn: `solid` fills it with the look's color, `subtle` with a light tint of it, and
|
|
28
|
+
* `outline` draws only its border.
|
|
29
|
+
* @default "solid"
|
|
30
|
+
*/
|
|
31
|
+
readonly fill: import("@angular/core").InputSignal<"outline" | "solid" | "subtle" | null | undefined>;
|
|
32
|
+
/**
|
|
33
|
+
* @description The badge's color role. Pick it for what the badge means, such as `error` for a failed state, and say
|
|
34
|
+
* that in its text too, since color alone doesn't reach everyone.
|
|
35
|
+
* @default "secondary"
|
|
36
|
+
*/
|
|
37
|
+
readonly look: import("@angular/core").InputSignal<"error" | "info" | "primary" | "secondary" | "success" | "warning" | null | undefined>;
|
|
38
|
+
/**
|
|
39
|
+
* @description Border-radius preset. `full` makes a pill, and a round dot for a single digit.
|
|
40
|
+
* @default "medium"
|
|
41
|
+
*/
|
|
42
|
+
readonly rounded: import("@angular/core").InputSignal<"full" | "large" | "medium" | "none" | "small" | null | undefined>;
|
|
43
|
+
/**
|
|
44
|
+
* @description Size preset controlling the badge's height, padding, text and icon size.
|
|
45
|
+
* @default "medium"
|
|
46
|
+
*/
|
|
47
|
+
readonly size: import("@angular/core").InputSignal<"large" | "medium" | "small" | null | undefined>;
|
|
48
|
+
/**
|
|
49
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
50
|
+
* @default ""
|
|
51
|
+
*/
|
|
52
|
+
readonly userClass: import("@angular/core").InputSignalWithTransform<string, ClassInputType>;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeDirective, never>;
|
|
54
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BadgeDirective, "[monaBadge]", never, {
|
|
55
|
+
"fill": {
|
|
56
|
+
"alias": "fill";
|
|
57
|
+
"required": false;
|
|
58
|
+
"isSignal": true;
|
|
59
|
+
};
|
|
60
|
+
"look": {
|
|
61
|
+
"alias": "look";
|
|
62
|
+
"required": false;
|
|
63
|
+
"isSignal": true;
|
|
64
|
+
};
|
|
65
|
+
"rounded": {
|
|
66
|
+
"alias": "rounded";
|
|
67
|
+
"required": false;
|
|
68
|
+
"isSignal": true;
|
|
69
|
+
};
|
|
70
|
+
"size": {
|
|
71
|
+
"alias": "size";
|
|
72
|
+
"required": false;
|
|
73
|
+
"isSignal": true;
|
|
74
|
+
};
|
|
75
|
+
"userClass": {
|
|
76
|
+
"alias": "class";
|
|
77
|
+
"required": false;
|
|
78
|
+
"isSignal": true;
|
|
79
|
+
};
|
|
80
|
+
}, {}, never, never, true, never>;
|
|
81
|
+
}
|
|
82
|
+
export type { BadgeVariantProps };
|
|
@@ -4,9 +4,23 @@ import { Directionality } from "@angular/cdk/bidi";
|
|
|
4
4
|
import { DateTime } from "luxon";
|
|
5
5
|
export type DeepPartial<T> = T extends ((...args: never[]) => unknown) ? T : T extends readonly (infer U)[] ? readonly DeepPartial<U>[] : T extends object ? { [K in keyof T]?: DeepPartial<T[K]>; } : T;
|
|
6
6
|
export type MonaTextDirection = "ltr" | "rtl";
|
|
7
|
+
/**
|
|
8
|
+
* The alert's dismiss button.
|
|
9
|
+
*/
|
|
10
|
+
export interface MonaAlertMessages {
|
|
11
|
+
/** Name of the button that dismisses the alert, with the alert's title when it has one. */
|
|
12
|
+
dismissLabel(title?: string): string;
|
|
13
|
+
}
|
|
7
14
|
export interface MonaAutoCompleteMessages {
|
|
8
15
|
readonly clear: string;
|
|
9
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* The avatar group's count of the avatars it doesn't show.
|
|
19
|
+
*/
|
|
20
|
+
export interface MonaAvatarMessages {
|
|
21
|
+
/** Name of the item that stands for the avatars past `max`, such as "3 more". It shows the count as "+3". */
|
|
22
|
+
moreLabel(count: number): string;
|
|
23
|
+
}
|
|
10
24
|
export interface MonaBreadcrumbMessages {
|
|
11
25
|
readonly breadcrumb: string;
|
|
12
26
|
readonly showFullPath: string;
|
|
@@ -688,10 +702,29 @@ export interface MonaListBoxMessages {
|
|
|
688
702
|
/** Label of Transfer To, naming the connected list box. */
|
|
689
703
|
transferToList(list: string): string;
|
|
690
704
|
}
|
|
705
|
+
/**
|
|
706
|
+
* The masked text box's clear button, and what it says when a typed character doesn't fit the slot at the caret.
|
|
707
|
+
*/
|
|
708
|
+
export interface MonaMaskedTextBoxMessages {
|
|
709
|
+
/** Read out when a character doesn't fit a slot that takes something else, such as one of a custom rule. */
|
|
710
|
+
readonly characterNotAllowed: string;
|
|
711
|
+
/** Name of the button that clears the value. */
|
|
712
|
+
readonly clear: string;
|
|
713
|
+
/** Read out when a character doesn't fit a slot that takes a digit. */
|
|
714
|
+
readonly digitOnly: string;
|
|
715
|
+
/** Read out when a character doesn't fit a slot that takes a digit, `+` or `-`. */
|
|
716
|
+
readonly digitOrSignOnly: string;
|
|
717
|
+
/** Read out when a character doesn't fit a slot that takes a letter. */
|
|
718
|
+
readonly letterOnly: string;
|
|
719
|
+
/** Read out when a character doesn't fit a slot that takes a letter or a digit. */
|
|
720
|
+
readonly letterOrDigitOnly: string;
|
|
721
|
+
}
|
|
691
722
|
export interface MonaMultiSelectMessages {
|
|
692
723
|
readonly clear: string;
|
|
693
724
|
readonly itemsCount: (count: number) => string;
|
|
694
725
|
readonly removeMoreItems: (count: number) => string;
|
|
726
|
+
/** The option at the top of the list that selects every item shown, or clears them when they're all selected. */
|
|
727
|
+
readonly selectAll: string;
|
|
695
728
|
}
|
|
696
729
|
export interface MonaNotificationMessages {
|
|
697
730
|
readonly close: string;
|
|
@@ -833,6 +866,13 @@ export interface MonaTimeSelectorMessages {
|
|
|
833
866
|
readonly timeSelector: string;
|
|
834
867
|
}
|
|
835
868
|
export type TimeSelectorMessages = MonaTimeSelectorMessages;
|
|
869
|
+
/**
|
|
870
|
+
* The toolbar's overflow menu.
|
|
871
|
+
*/
|
|
872
|
+
export interface MonaToolbarMessages {
|
|
873
|
+
/** Name of the button that opens the menu of the items that don't fit. */
|
|
874
|
+
readonly moreLabel: string;
|
|
875
|
+
}
|
|
836
876
|
export interface MonaTreeViewMessages {
|
|
837
877
|
/** Start of an expanded node's expander name, followed by the node's text ("Collapse Documents"). */
|
|
838
878
|
readonly collapse: string;
|
|
@@ -899,7 +939,9 @@ export interface MonaWindowMessages {
|
|
|
899
939
|
}
|
|
900
940
|
export type WindowMessages = MonaWindowMessages;
|
|
901
941
|
export interface MonaLocaleMessages {
|
|
942
|
+
alert: MonaAlertMessages;
|
|
902
943
|
autoComplete: MonaAutoCompleteMessages;
|
|
944
|
+
avatar: MonaAvatarMessages;
|
|
903
945
|
breadcrumb: MonaBreadcrumbMessages;
|
|
904
946
|
buttonGroup: MonaButtonGroupMessages;
|
|
905
947
|
calendar: MonaCalendarMessages;
|
|
@@ -925,6 +967,7 @@ export interface MonaLocaleMessages {
|
|
|
925
967
|
label: MonaLabelMessages;
|
|
926
968
|
list: MonaListMessages;
|
|
927
969
|
listBox: MonaListBoxMessages;
|
|
970
|
+
maskedTextBox: MonaMaskedTextBoxMessages;
|
|
928
971
|
multiSelect: MonaMultiSelectMessages;
|
|
929
972
|
notification: MonaNotificationMessages;
|
|
930
973
|
numericTextBox: MonaNumericTextBoxMessages;
|
|
@@ -945,6 +988,7 @@ export interface MonaLocaleMessages {
|
|
|
945
988
|
textBox: MonaTextBoxMessages;
|
|
946
989
|
timePicker: MonaTimePickerMessages;
|
|
947
990
|
timeSelector: MonaTimeSelectorMessages;
|
|
991
|
+
toolbar: MonaToolbarMessages;
|
|
948
992
|
treeView: MonaTreeViewMessages;
|
|
949
993
|
window: MonaWindowMessages;
|
|
950
994
|
}
|
|
@@ -163,6 +163,16 @@ export declare class ListService<TData> {
|
|
|
163
163
|
item: ListItem<TData>;
|
|
164
164
|
focus: boolean;
|
|
165
165
|
}>;
|
|
166
|
+
/** Whether a multiple-selection list starts with a "Select all" option. */
|
|
167
|
+
readonly selectAllEnabled: import("@angular/core").WritableSignal<boolean>;
|
|
168
|
+
/**
|
|
169
|
+
* The option that selects every enabled option the filter leaves, or clears them when they're all selected. It has
|
|
170
|
+
* no data item: its text is the select-all label, and it's selected while every option it covers is.
|
|
171
|
+
*/
|
|
172
|
+
readonly selectAllItem: ListItem<TData>;
|
|
173
|
+
readonly selectAllLabel: import("@angular/core").WritableSignal<string>;
|
|
174
|
+
/** How many of the options "Select all" covers are selected. */
|
|
175
|
+
readonly selectAllState: import("@angular/core").Signal<"some" | "all" | "none">;
|
|
166
176
|
readonly selectableOptions: import("@angular/core").WritableSignal<SelectableOptions>;
|
|
167
177
|
readonly selectedKeys: import("@angular/core").WritableSignal<ImmutableSet<unknown>>;
|
|
168
178
|
readonly selectedKeysChange$: Subject<unknown[]>;
|
|
@@ -247,6 +257,8 @@ export declare class ListService<TData> {
|
|
|
247
257
|
setTextField(textField: string | Selector<TData, string>): void;
|
|
248
258
|
setValueField(valueField: string | Selector<TData, unknown>): void;
|
|
249
259
|
setVirtualScrollOptions(options: VirtualScrollOptions): void;
|
|
260
|
+
/** Selects every option "Select all" covers, or deselects them when they're all selected already. */
|
|
261
|
+
toggleSelectAll(): void;
|
|
250
262
|
private filterItem;
|
|
251
263
|
/**
|
|
252
264
|
* Returns the item when it is one of the navigable items, otherwise `null`.
|
|
@@ -2,9 +2,15 @@ export declare const MONA_AR_SA_LOCALE: {
|
|
|
2
2
|
direction: "rtl";
|
|
3
3
|
id: string;
|
|
4
4
|
messages: {
|
|
5
|
+
alert: {
|
|
6
|
+
dismissLabel: (title?: string) => string;
|
|
7
|
+
};
|
|
5
8
|
autoComplete: {
|
|
6
9
|
clear: string;
|
|
7
10
|
};
|
|
11
|
+
avatar: {
|
|
12
|
+
moreLabel: (count: number) => string;
|
|
13
|
+
};
|
|
8
14
|
breadcrumb: {
|
|
9
15
|
breadcrumb: string;
|
|
10
16
|
showFullPath: string;
|
|
@@ -442,10 +448,19 @@ export declare const MONA_AR_SA_LOCALE: {
|
|
|
442
448
|
transferTo: string;
|
|
443
449
|
transferToList: (list: string) => string;
|
|
444
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
445
459
|
multiSelect: {
|
|
446
460
|
clear: string;
|
|
447
461
|
itemsCount: (count: number) => string;
|
|
448
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
449
464
|
};
|
|
450
465
|
notification: {
|
|
451
466
|
close: string;
|
|
@@ -563,6 +578,9 @@ export declare const MONA_AR_SA_LOCALE: {
|
|
|
563
578
|
set: string;
|
|
564
579
|
timeSelector: string;
|
|
565
580
|
};
|
|
581
|
+
toolbar: {
|
|
582
|
+
moreLabel: string;
|
|
583
|
+
};
|
|
566
584
|
treeView: {
|
|
567
585
|
collapse: string;
|
|
568
586
|
expand: string;
|
|
@@ -2,9 +2,15 @@ export declare const MONA_DE_DE_LOCALE: {
|
|
|
2
2
|
direction: "ltr";
|
|
3
3
|
id: string;
|
|
4
4
|
messages: {
|
|
5
|
+
alert: {
|
|
6
|
+
dismissLabel: (title?: string) => string;
|
|
7
|
+
};
|
|
5
8
|
autoComplete: {
|
|
6
9
|
clear: string;
|
|
7
10
|
};
|
|
11
|
+
avatar: {
|
|
12
|
+
moreLabel: (count: number) => string;
|
|
13
|
+
};
|
|
8
14
|
breadcrumb: {
|
|
9
15
|
breadcrumb: string;
|
|
10
16
|
showFullPath: string;
|
|
@@ -442,10 +448,19 @@ export declare const MONA_DE_DE_LOCALE: {
|
|
|
442
448
|
transferTo: string;
|
|
443
449
|
transferToList: (list: string) => string;
|
|
444
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
445
459
|
multiSelect: {
|
|
446
460
|
clear: string;
|
|
447
461
|
itemsCount: (count: number) => string;
|
|
448
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
449
464
|
};
|
|
450
465
|
notification: {
|
|
451
466
|
close: string;
|
|
@@ -563,6 +578,9 @@ export declare const MONA_DE_DE_LOCALE: {
|
|
|
563
578
|
set: string;
|
|
564
579
|
timeSelector: string;
|
|
565
580
|
};
|
|
581
|
+
toolbar: {
|
|
582
|
+
moreLabel: string;
|
|
583
|
+
};
|
|
566
584
|
treeView: {
|
|
567
585
|
collapse: string;
|
|
568
586
|
expand: string;
|
|
@@ -2,9 +2,15 @@ export declare const MONA_ES_ES_LOCALE: {
|
|
|
2
2
|
direction: "ltr";
|
|
3
3
|
id: string;
|
|
4
4
|
messages: {
|
|
5
|
+
alert: {
|
|
6
|
+
dismissLabel: (title?: string) => string;
|
|
7
|
+
};
|
|
5
8
|
autoComplete: {
|
|
6
9
|
clear: string;
|
|
7
10
|
};
|
|
11
|
+
avatar: {
|
|
12
|
+
moreLabel: (count: number) => string;
|
|
13
|
+
};
|
|
8
14
|
breadcrumb: {
|
|
9
15
|
breadcrumb: string;
|
|
10
16
|
showFullPath: string;
|
|
@@ -442,10 +448,19 @@ export declare const MONA_ES_ES_LOCALE: {
|
|
|
442
448
|
transferTo: string;
|
|
443
449
|
transferToList: (list: string) => string;
|
|
444
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
445
459
|
multiSelect: {
|
|
446
460
|
clear: string;
|
|
447
461
|
itemsCount: (count: number) => string;
|
|
448
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
449
464
|
};
|
|
450
465
|
notification: {
|
|
451
466
|
close: string;
|
|
@@ -563,6 +578,9 @@ export declare const MONA_ES_ES_LOCALE: {
|
|
|
563
578
|
set: string;
|
|
564
579
|
timeSelector: string;
|
|
565
580
|
};
|
|
581
|
+
toolbar: {
|
|
582
|
+
moreLabel: string;
|
|
583
|
+
};
|
|
566
584
|
treeView: {
|
|
567
585
|
collapse: string;
|
|
568
586
|
expand: string;
|
|
@@ -2,9 +2,15 @@ export declare const MONA_FR_FR_LOCALE: {
|
|
|
2
2
|
direction: "ltr";
|
|
3
3
|
id: string;
|
|
4
4
|
messages: {
|
|
5
|
+
alert: {
|
|
6
|
+
dismissLabel: (title?: string) => string;
|
|
7
|
+
};
|
|
5
8
|
autoComplete: {
|
|
6
9
|
clear: string;
|
|
7
10
|
};
|
|
11
|
+
avatar: {
|
|
12
|
+
moreLabel: (count: number) => string;
|
|
13
|
+
};
|
|
8
14
|
breadcrumb: {
|
|
9
15
|
breadcrumb: string;
|
|
10
16
|
showFullPath: string;
|
|
@@ -442,10 +448,19 @@ export declare const MONA_FR_FR_LOCALE: {
|
|
|
442
448
|
transferTo: string;
|
|
443
449
|
transferToList: (list: string) => string;
|
|
444
450
|
};
|
|
451
|
+
maskedTextBox: {
|
|
452
|
+
characterNotAllowed: string;
|
|
453
|
+
clear: string;
|
|
454
|
+
digitOnly: string;
|
|
455
|
+
digitOrSignOnly: string;
|
|
456
|
+
letterOnly: string;
|
|
457
|
+
letterOrDigitOnly: string;
|
|
458
|
+
};
|
|
445
459
|
multiSelect: {
|
|
446
460
|
clear: string;
|
|
447
461
|
itemsCount: (count: number) => string;
|
|
448
462
|
removeMoreItems: (count: number) => string;
|
|
463
|
+
selectAll: string;
|
|
449
464
|
};
|
|
450
465
|
notification: {
|
|
451
466
|
close: string;
|
|
@@ -563,6 +578,9 @@ export declare const MONA_FR_FR_LOCALE: {
|
|
|
563
578
|
set: string;
|
|
564
579
|
timeSelector: string;
|
|
565
580
|
};
|
|
581
|
+
toolbar: {
|
|
582
|
+
moreLabel: string;
|
|
583
|
+
};
|
|
566
584
|
treeView: {
|
|
567
585
|
collapse: string;
|
|
568
586
|
expand: string;
|