@nanahoshi/mona-ui 0.24.8 → 0.24.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -9
- package/fesm2022/nanahoshi-mona-ui-button.mjs +8 -2
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +4 -3
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +101 -47
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +339 -101
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +119 -69
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DdyHnUIr.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-B6gq7Hu3.mjs → nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-DdUY3I7P.mjs → nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs} +2 -3
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DG8Bu4Dy.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CVqpbMcb.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs} +9 -9
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +438 -22
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +127 -133
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +473 -240
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +202 -90
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +609 -256
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +45 -10
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +102 -58
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +286 -443
- package/fesm2022/nanahoshi-mona-ui-window.mjs +591 -310
- package/i18n/catalogs/en-US.messages.json +4 -0
- package/locales/ar-sa/ar-sa.messages.json +4 -0
- package/locales/de-de/de-de.messages.json +4 -0
- package/locales/es-es/es-es.messages.json +4 -0
- package/locales/fr-fr/fr-fr.messages.json +4 -0
- package/locales/id-id/id-id.messages.json +4 -0
- package/locales/it-it/it-it.messages.json +4 -0
- package/locales/ja-jp/ja-jp.messages.json +4 -0
- package/locales/ko-kr/ko-kr.messages.json +4 -0
- package/locales/pt-br/pt-br.messages.json +4 -0
- package/locales/ru-ru/ru-ru.messages.json +4 -0
- package/locales/tr-tr/tr-tr.messages.json +4 -0
- package/locales/zh-cn/zh-cn.messages.json +4 -0
- package/locales/zh-tw/zh-tw.messages.json +4 -0
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-button-group.d.ts +13 -3
- package/types/nanahoshi-mona-ui-button.d.ts +20 -3
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +5 -6
- package/types/nanahoshi-mona-ui-dialog.d.ts +131 -20
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +75 -56
- package/types/nanahoshi-mona-ui-i18n.d.ts +19 -0
- package/types/nanahoshi-mona-ui-internal.d.ts +119 -15
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +4 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +4 -0
- package/types/nanahoshi-mona-ui-menubar.d.ts +65 -62
- package/types/nanahoshi-mona-ui-notification.d.ts +76 -16
- package/types/nanahoshi-mona-ui-popover.d.ts +44 -17
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +110 -32
- package/types/nanahoshi-mona-ui-popup.d.ts +2 -0
- package/types/nanahoshi-mona-ui-sheet.d.ts +16 -5
- package/types/nanahoshi-mona-ui-split-button.d.ts +29 -7
- package/types/nanahoshi-mona-ui-tooltip.d.ts +43 -20
- package/types/nanahoshi-mona-ui-window.d.ts +103 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _nanahoshi_mona_ui_popup_menu from '@nanahoshi/mona-ui/popup-menu';
|
|
2
2
|
import { PopupMenuItemClickEvent, MenuItem, PopupMenuComponent, PopupMenuCheckboxItemComponent, PopupMenuOrigin, PopupMenuGroupComponent, PopupMenuItemComponent, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuSeparatorComponent, PopupMenuNavigationEvent, PopupMenuGroupTemplateDirective, PopupMenuTemplateOrigin, PopupMenuIconTemplateDirective, PopupMenuShortcutTemplateDirective, PopupMenuTextTemplateDirective } from '@nanahoshi/mona-ui/popup-menu';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
4
|
import { TemplateRef } from '@angular/core';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
6
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -14,64 +14,65 @@ declare class MenuComponent {
|
|
|
14
14
|
/**
|
|
15
15
|
* @description Sets the menu as disabled.
|
|
16
16
|
*/
|
|
17
|
-
readonly disabled:
|
|
18
|
-
readonly iconTemplate:
|
|
17
|
+
readonly disabled: i0.InputSignal<boolean>;
|
|
18
|
+
readonly iconTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
19
19
|
/**
|
|
20
20
|
* @description Sets the items of the menu.
|
|
21
21
|
* If provided, it will override the menu items defined by the menu item components.
|
|
22
22
|
*/
|
|
23
|
-
readonly items:
|
|
24
|
-
readonly menuItems:
|
|
23
|
+
readonly items: i0.InputSignal<Iterable<MenuItem>>;
|
|
24
|
+
readonly menuItems: i0.Signal<_nanahoshi_mona_ui_popup_menu.PopupMenuItem[]>;
|
|
25
25
|
/**
|
|
26
26
|
* @description The text of the menu.
|
|
27
27
|
*/
|
|
28
|
-
readonly text:
|
|
29
|
-
readonly textTemplate:
|
|
28
|
+
readonly text: i0.InputSignal<string>;
|
|
29
|
+
readonly textTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
30
30
|
readonly uid: string;
|
|
31
31
|
popupMenu: PopupMenuComponent | null;
|
|
32
|
-
|
|
33
|
-
static
|
|
32
|
+
constructor();
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuComponent, "mona-menu", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; }, {}, ["menuItemComponents", "iconTemplate", "textTemplate"], never, true, never>;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
declare class MenuCheckboxItemComponent extends PopupMenuCheckboxItemComponent {
|
|
37
38
|
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
38
39
|
constructor();
|
|
39
|
-
static ɵfac:
|
|
40
|
-
static ɵcmp:
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuCheckboxItemComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuCheckboxItemComponent, "mona-menu-checkbox-item", never, {}, {}, never, never, true, never>;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
declare class MenuGroupComponent extends PopupMenuGroupComponent {
|
|
44
45
|
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
45
46
|
constructor();
|
|
46
|
-
static ɵfac:
|
|
47
|
-
static ɵcmp:
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuGroupComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuGroupComponent, "mona-menu-group", never, {}, {}, never, never, true, never>;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
declare class MenuItemComponent extends PopupMenuItemComponent {
|
|
51
52
|
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
52
53
|
constructor();
|
|
53
|
-
static ɵfac:
|
|
54
|
-
static ɵcmp:
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemComponent, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemComponent, "mona-menu-item", never, {}, {}, never, never, true, never>;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
declare class MenuRadioGroupComponent extends PopupMenuRadioGroupComponent {
|
|
58
59
|
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
59
60
|
constructor();
|
|
60
|
-
static ɵfac:
|
|
61
|
-
static ɵcmp:
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuRadioGroupComponent, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuRadioGroupComponent, "mona-menu-radio-group", never, {}, {}, never, never, true, never>;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
declare class MenuRadioItemComponent extends PopupMenuRadioItemComponent {
|
|
65
66
|
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
66
67
|
constructor();
|
|
67
|
-
static ɵfac:
|
|
68
|
-
static ɵcmp:
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuRadioItemComponent, never>;
|
|
69
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuRadioItemComponent, "mona-menu-radio-item", never, {}, {}, never, never, true, never>;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
declare class MenuSeparatorComponent extends PopupMenuSeparatorComponent {
|
|
72
73
|
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
73
|
-
static ɵfac:
|
|
74
|
-
static ɵcmp:
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuSeparatorComponent, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuSeparatorComponent, "mona-menu-separator", never, {}, {}, never, never, true, never>;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
declare const menubarBaseThemeVariants: (props?: ({
|
|
@@ -90,108 +91,110 @@ type MenubarVariantInput = VariantInputs<MenubarVariantProps>;
|
|
|
90
91
|
|
|
91
92
|
declare class MenubarComponent implements MenubarVariantInput {
|
|
92
93
|
#private;
|
|
93
|
-
protected readonly
|
|
94
|
-
protected readonly
|
|
95
|
-
protected readonly
|
|
96
|
-
protected readonly
|
|
97
|
-
protected readonly
|
|
98
|
-
protected readonly
|
|
99
|
-
protected readonly
|
|
100
|
-
protected readonly
|
|
101
|
-
protected readonly
|
|
102
|
-
protected readonly
|
|
103
|
-
protected readonly
|
|
104
|
-
protected readonly
|
|
105
|
-
protected readonly menuList: _angular_core.Signal<readonly MenuComponent[]>;
|
|
94
|
+
protected readonly activeIndex: i0.WritableSignal<number>;
|
|
95
|
+
protected readonly baseClasses: i0.Signal<string>;
|
|
96
|
+
protected readonly currentPopupMenu: i0.WritableSignal<PopupMenuComponent | null>;
|
|
97
|
+
protected readonly groupTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
98
|
+
protected readonly iconTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
99
|
+
protected readonly isRtl: i0.Signal<boolean>;
|
|
100
|
+
protected readonly listClasses: i0.Signal<string>;
|
|
101
|
+
protected readonly listItemClasses: i0.Signal<string>;
|
|
102
|
+
protected readonly menuItemIconTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
103
|
+
protected readonly menuItemShortcutTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
104
|
+
protected readonly menuItemTextTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
105
|
+
protected readonly menuList: i0.Signal<readonly MenuComponent[]>;
|
|
106
106
|
protected readonly navigate$: Subject<PopupMenuNavigationEvent>;
|
|
107
|
-
protected readonly popupMenuComponents:
|
|
108
|
-
protected readonly textTemplate:
|
|
107
|
+
protected readonly popupMenuComponents: i0.Signal<readonly PopupMenuComponent[]>;
|
|
108
|
+
protected readonly textTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
109
109
|
/**
|
|
110
110
|
* @description ARIA label for the menubar.
|
|
111
111
|
*/
|
|
112
|
-
readonly ariaLabel:
|
|
112
|
+
readonly ariaLabel: i0.InputSignal<string>;
|
|
113
113
|
/**
|
|
114
114
|
* @description ARIA labelledby for the menubar.
|
|
115
115
|
*/
|
|
116
|
-
readonly ariaLabelledby:
|
|
116
|
+
readonly ariaLabelledby: i0.InputSignal<string>;
|
|
117
117
|
/**
|
|
118
118
|
* @description Sets the disabled state of menubar.
|
|
119
119
|
*/
|
|
120
|
-
readonly disabled:
|
|
120
|
+
readonly disabled: i0.InputSignal<boolean>;
|
|
121
121
|
/**
|
|
122
122
|
* @description Emits when a menu item is clicked.
|
|
123
123
|
*/
|
|
124
|
-
readonly menuItemClick:
|
|
124
|
+
readonly menuItemClick: i0.OutputEmitterRef<_nanahoshi_mona_ui_popup_menu.PopupMenuItemClickEvent>;
|
|
125
125
|
/**
|
|
126
126
|
* @description Sets the rounded style of the menubar.
|
|
127
127
|
*/
|
|
128
|
-
readonly rounded:
|
|
128
|
+
readonly rounded: i0.InputSignal<"small" | "medium" | "large" | "none" | null | undefined>;
|
|
129
129
|
/**
|
|
130
130
|
* @description Sets the size of the menubar.
|
|
131
131
|
*/
|
|
132
|
-
readonly size:
|
|
132
|
+
readonly size: i0.InputSignal<"small" | "medium" | "large" | null | undefined>;
|
|
133
133
|
/**
|
|
134
134
|
* @description Additional CSS classes to apply to the menubar, merged with the computed theme classes.
|
|
135
135
|
*/
|
|
136
|
-
readonly userClasses:
|
|
136
|
+
readonly userClasses: i0.InputSignal<string>;
|
|
137
137
|
constructor();
|
|
138
|
-
protected onMenuBlur(event: FocusEvent): void;
|
|
139
138
|
protected onMenuClick(event: MouseEvent, item: MenuComponent): void;
|
|
140
139
|
protected onMenuFocus(index: number): void;
|
|
141
140
|
protected onMenuItemClick(event: MenuItemClickEvent): void;
|
|
142
141
|
protected onMenuKeyDown(event: KeyboardEvent, item: MenuComponent, popupMenu: PopupMenuComponent): void;
|
|
143
|
-
protected onMenuPointerEnter(item: MenuComponent,
|
|
142
|
+
protected onMenuPointerEnter(item: MenuComponent, popupMenu: PopupMenuComponent): void;
|
|
144
143
|
protected onPopupMenuClose(): void;
|
|
145
|
-
protected onPopupMenuOpen(popupMenu: PopupMenuComponent
|
|
144
|
+
protected onPopupMenuOpen(popupMenu: PopupMenuComponent): void;
|
|
146
145
|
private closeCurrentMenu;
|
|
147
146
|
private findCurrentMenuIndex;
|
|
148
147
|
private findMenuElementByUid;
|
|
149
|
-
private
|
|
150
|
-
private
|
|
148
|
+
private findNextMenuIndex;
|
|
149
|
+
private findPreviousMenuIndex;
|
|
151
150
|
private focusMenuAt;
|
|
152
151
|
private moveToFirstMenu;
|
|
153
152
|
private moveToLastMenu;
|
|
153
|
+
/**
|
|
154
|
+
* Typeahead on the menubar: moves to the next menu whose text starts with the character, after the current one.
|
|
155
|
+
*/
|
|
156
|
+
private moveToMenuStartingWith;
|
|
154
157
|
private moveToNextMenu;
|
|
155
158
|
private moveToPreviousMenu;
|
|
156
159
|
private setNavigationSubscription;
|
|
157
160
|
private setSubscriptions;
|
|
158
161
|
private updateCurrentMenuData;
|
|
159
|
-
static ɵfac:
|
|
160
|
-
static ɵcmp:
|
|
162
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenubarComponent, never>;
|
|
163
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenubarComponent, "mona-menubar", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClasses": { "alias": "class"; "required": false; "isSignal": true; }; }, { "menuItemClick": "menuItemClick"; }, ["groupTemplate", "iconTemplate", "menuItemIconTemplate", "menuItemShortcutTemplate", "menuItemTextTemplate", "menuList", "textTemplate"], never, true, never>;
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
declare class MenuGroupTemplateDirective extends PopupMenuGroupTemplateDirective {
|
|
164
167
|
readonly origin = PopupMenuTemplateOrigin.MenubarMenu;
|
|
165
|
-
static ɵfac:
|
|
166
|
-
static ɵdir:
|
|
168
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuGroupTemplateDirective, never>;
|
|
169
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuGroupTemplateDirective, "ng-template[monaMenuGroupTemplate]", never, {}, {}, never, never, true, never>;
|
|
167
170
|
}
|
|
168
171
|
|
|
169
172
|
declare class MenuIconTemplateDirective {
|
|
170
|
-
static ɵfac:
|
|
171
|
-
static ɵdir:
|
|
173
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuIconTemplateDirective, never>;
|
|
174
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuIconTemplateDirective, "ng-template[monaMenuIconTemplate]", never, {}, {}, never, never, true, never>;
|
|
172
175
|
}
|
|
173
176
|
|
|
174
177
|
declare class MenuItemIconTemplateDirective extends PopupMenuIconTemplateDirective {
|
|
175
178
|
readonly origin = PopupMenuTemplateOrigin.MenubarMenu;
|
|
176
|
-
static ɵfac:
|
|
177
|
-
static ɵdir:
|
|
179
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemIconTemplateDirective, never>;
|
|
180
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuItemIconTemplateDirective, "ng-template[monaMenuItemIconTemplate]", never, {}, {}, never, never, true, never>;
|
|
178
181
|
}
|
|
179
182
|
|
|
180
183
|
declare class MenuItemShortcutTemplateDirective extends PopupMenuShortcutTemplateDirective {
|
|
181
184
|
readonly origin = PopupMenuTemplateOrigin.MenubarMenu;
|
|
182
|
-
static ɵfac:
|
|
183
|
-
static ɵdir:
|
|
185
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemShortcutTemplateDirective, never>;
|
|
186
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuItemShortcutTemplateDirective, "ng-template[monaMenuItemShortcutTemplate]", never, {}, {}, never, never, true, never>;
|
|
184
187
|
}
|
|
185
188
|
|
|
186
189
|
declare class MenuItemTextTemplateDirective extends PopupMenuTextTemplateDirective {
|
|
187
190
|
readonly origin = PopupMenuTemplateOrigin.MenubarMenu;
|
|
188
|
-
static ɵfac:
|
|
189
|
-
static ɵdir:
|
|
191
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemTextTemplateDirective, never>;
|
|
192
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuItemTextTemplateDirective, "ng-template[monaMenuItemTextTemplate]", never, {}, {}, never, never, true, never>;
|
|
190
193
|
}
|
|
191
194
|
|
|
192
195
|
declare class MenuTextTemplateDirective {
|
|
193
|
-
static ɵfac:
|
|
194
|
-
static ɵdir:
|
|
196
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuTextTemplateDirective, never>;
|
|
197
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuTextTemplateDirective, "ng-template[monaMenuTextTemplate]", never, {}, {}, never, never, true, never>;
|
|
195
198
|
}
|
|
196
199
|
|
|
197
200
|
export { MenuCheckboxItemComponent, MenuComponent, MenuGroupComponent, MenuGroupTemplateDirective, MenuIconTemplateDirective, MenuItemComponent, MenuItemIconTemplateDirective, MenuItemShortcutTemplateDirective, MenuItemTextTemplateDirective, MenuRadioGroupComponent, MenuRadioItemComponent, MenuSeparatorComponent, MenuTextTemplateDirective, MenubarComponent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ViewContainerRef, TemplateRef, Type, ComponentRef } from '@angular/core';
|
|
2
|
+
import { ViewContainerRef, TemplateRef, Type, ComponentRef, EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -18,8 +18,9 @@ interface NotificationOptions {
|
|
|
18
18
|
*/
|
|
19
19
|
appendTo?: ViewContainerRef;
|
|
20
20
|
/**
|
|
21
|
-
* @description Whether a close button is rendered on the notification.
|
|
22
|
-
*
|
|
21
|
+
* @description Whether a close button is rendered on the notification. Timed notifications have one too, so
|
|
22
|
+
* they can be dismissed before their time is up.
|
|
23
|
+
* @default true
|
|
23
24
|
*/
|
|
24
25
|
closable?: boolean;
|
|
25
26
|
/**
|
|
@@ -28,10 +29,18 @@ interface NotificationOptions {
|
|
|
28
29
|
closeTitle?: string;
|
|
29
30
|
/**
|
|
30
31
|
* @description The notification's content. Accepts plain text, a `TemplateRef`, or a component `Type` to render.
|
|
32
|
+
* A template gets the `NotificationRef` as `$implicit` and `data` as `data`; a component can inject
|
|
33
|
+
* `NOTIFICATION_REF` and `NOTIFICATION_DATA`.
|
|
31
34
|
*/
|
|
32
35
|
content: string | TemplateRef<unknown> | Type<unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* @description Data for a content component or template, available through `NOTIFICATION_DATA` or the
|
|
38
|
+
* template's `data` context property.
|
|
39
|
+
*/
|
|
40
|
+
data?: unknown;
|
|
33
41
|
/**
|
|
34
42
|
* @description The time, in milliseconds, before the notification automatically closes. Omit to keep the notification open until manually closed.
|
|
43
|
+
* The countdown pauses while the notification is hovered or has focus, and while the window is in the background.
|
|
35
44
|
*/
|
|
36
45
|
duration?: number;
|
|
37
46
|
/**
|
|
@@ -40,7 +49,7 @@ interface NotificationOptions {
|
|
|
40
49
|
height?: number | string;
|
|
41
50
|
/**
|
|
42
51
|
* @description A unique identifier for the notification. Reusing an `id` for the same `position` returns the existing notification instead of creating a new one.
|
|
43
|
-
* @default a generated
|
|
52
|
+
* @default a generated id
|
|
44
53
|
*/
|
|
45
54
|
id?: string;
|
|
46
55
|
/**
|
|
@@ -67,9 +76,13 @@ interface NotificationOptions {
|
|
|
67
76
|
width?: number | string;
|
|
68
77
|
}
|
|
69
78
|
|
|
79
|
+
/**
|
|
80
|
+
* @description The options `NotificationRef.update()` can change on a notification that is already shown.
|
|
81
|
+
*/
|
|
82
|
+
type NotificationUpdate = Partial<Pick<NotificationOptions, "closable" | "content" | "title" | "type">>;
|
|
70
83
|
interface NotificationRef {
|
|
71
84
|
/**
|
|
72
|
-
* @description Emits once the notification has finished closing and been removed.
|
|
85
|
+
* @description Emits once the notification has finished closing, after its leave animation, and been removed.
|
|
73
86
|
*/
|
|
74
87
|
readonly afterHide: Observable<void>;
|
|
75
88
|
/**
|
|
@@ -80,34 +93,81 @@ interface NotificationRef {
|
|
|
80
93
|
* @description Closes the notification.
|
|
81
94
|
*/
|
|
82
95
|
hide(): void;
|
|
96
|
+
/**
|
|
97
|
+
* @description The notification's id: the one given in its options, or a generated one.
|
|
98
|
+
*/
|
|
99
|
+
readonly id: string;
|
|
100
|
+
/**
|
|
101
|
+
* @description Changes the content, title, type or close button of the notification. The new message is
|
|
102
|
+
* announced to assistive technology.
|
|
103
|
+
*/
|
|
104
|
+
update(changes: NotificationUpdate): void;
|
|
83
105
|
}
|
|
84
106
|
|
|
85
107
|
declare class NotificationService {
|
|
86
108
|
#private;
|
|
87
|
-
private notificationContainerMap;
|
|
88
|
-
private notificationContainerSubscriptions;
|
|
89
109
|
constructor();
|
|
90
110
|
hide(id: string): void;
|
|
91
111
|
hideAll(): void;
|
|
92
112
|
show(options: NotificationOptions): NotificationRef;
|
|
93
|
-
private createContainerComponent;
|
|
94
|
-
private createNotification;
|
|
95
|
-
private createNotificationContainer;
|
|
96
|
-
private getNotificationDataById;
|
|
97
|
-
private initialize;
|
|
98
|
-
private removeNotificationData;
|
|
99
|
-
private scheduleTimeout;
|
|
100
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
|
|
101
114
|
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
|
|
102
115
|
}
|
|
103
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @description Application-wide settings for notifications, given with `provideNotificationDefaults()`.
|
|
119
|
+
*/
|
|
120
|
+
interface NotificationDefaults {
|
|
121
|
+
/**
|
|
122
|
+
* @description Whether notifications with a `duration` close on their own. Turn it off to leave every
|
|
123
|
+
* notification open until the user closes it (WCAG 2.2.1).
|
|
124
|
+
* @default true
|
|
125
|
+
*/
|
|
126
|
+
readonly autoHide: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* @description A factor applied to every `duration`, for example `2` to keep notifications twice as long.
|
|
129
|
+
* @default 1
|
|
130
|
+
*/
|
|
131
|
+
readonly durationScale: number;
|
|
132
|
+
/**
|
|
133
|
+
* @description The most notifications shown at once at each position. The oldest closes to make room for a new
|
|
134
|
+
* one. Without it, there is no limit.
|
|
135
|
+
*/
|
|
136
|
+
readonly maxVisible?: number;
|
|
137
|
+
/**
|
|
138
|
+
* @description Whether the countdown pauses while the browser window doesn't have focus.
|
|
139
|
+
* @default true
|
|
140
|
+
*/
|
|
141
|
+
readonly pauseOnWindowBlur: boolean;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Sets application-wide notification behavior: whether timed notifications close on their own, how much longer they
|
|
146
|
+
* stay, how many show at once, and whether the countdown pauses while the window is in the background.
|
|
147
|
+
*/
|
|
148
|
+
declare function provideNotificationDefaults(defaults: Partial<NotificationDefaults>): EnvironmentProviders;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @description Application-wide notification settings. Provide them with `provideNotificationDefaults()`.
|
|
152
|
+
*/
|
|
153
|
+
declare const NOTIFICATION_DEFAULTS: InjectionToken<NotificationDefaults>;
|
|
154
|
+
/**
|
|
155
|
+
* @description The `data` given in the notification's options, for a content component or template to inject.
|
|
156
|
+
*/
|
|
157
|
+
declare const NOTIFICATION_DATA: InjectionToken<unknown>;
|
|
158
|
+
/**
|
|
159
|
+
* @description The reference of the notification a content component or template is shown in.
|
|
160
|
+
*/
|
|
161
|
+
declare const NOTIFICATION_REF: InjectionToken<NotificationRef>;
|
|
162
|
+
|
|
104
163
|
declare const NOTIFICATION_DEFAULT_MESSAGES: {
|
|
105
164
|
close: string;
|
|
106
165
|
error: string;
|
|
107
166
|
info: string;
|
|
167
|
+
region: string;
|
|
108
168
|
success: string;
|
|
109
169
|
warning: string;
|
|
110
170
|
};
|
|
111
171
|
|
|
112
|
-
export { NOTIFICATION_DEFAULT_MESSAGES, NotificationService };
|
|
113
|
-
export type { NotificationOptions, NotificationPosition, NotificationRef, NotificationType };
|
|
172
|
+
export { NOTIFICATION_DATA, NOTIFICATION_DEFAULTS, NOTIFICATION_DEFAULT_MESSAGES, NOTIFICATION_REF, NotificationService, provideNotificationDefaults };
|
|
173
|
+
export type { NotificationDefaults, NotificationOptions, NotificationPosition, NotificationRef, NotificationType, NotificationUpdate };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as _nanahoshi_mona_ui_internal from '@nanahoshi/mona-ui/internal';
|
|
2
|
+
import { VariantInputs, PhysicalOverlaySide, OverlaySide } from '@nanahoshi/mona-ui/internal';
|
|
1
3
|
import * as _angular_core from '@angular/core';
|
|
2
4
|
import { TemplateRef, ElementRef } from '@angular/core';
|
|
3
|
-
import { PreventableEvent
|
|
5
|
+
import { PreventableEvent } from '@nanahoshi/mona-ui/common';
|
|
4
6
|
import { PopupRef } from '@nanahoshi/mona-ui/popup';
|
|
5
7
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
|
-
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
7
8
|
import { VariantProps } from 'class-variance-authority';
|
|
8
9
|
|
|
9
10
|
declare class PopoverHideEvent extends PreventableEvent {
|
|
@@ -55,31 +56,51 @@ declare class PopoverComponent implements PopoverVariantInputs {
|
|
|
55
56
|
protected readonly arrowClasses: _angular_core.Signal<string>;
|
|
56
57
|
protected readonly baseClasses: _angular_core.Signal<string>;
|
|
57
58
|
protected readonly contentClasses: _angular_core.Signal<string>;
|
|
58
|
-
protected readonly currentArrowPosition: _angular_core.
|
|
59
|
+
protected readonly currentArrowPosition: _angular_core.WritableSignal<PhysicalOverlaySide>;
|
|
59
60
|
protected readonly footerTemplateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
61
|
+
protected readonly hasTitle: _angular_core.Signal<boolean>;
|
|
60
62
|
protected readonly headerClasses: _angular_core.Signal<string>;
|
|
61
63
|
protected readonly headerId: _angular_core.Signal<string | null>;
|
|
62
|
-
protected readonly titleTemplateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
63
64
|
protected readonly templateRef: _angular_core.Signal<TemplateRef<any>>;
|
|
65
|
+
protected readonly titleTemplateRef: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
64
66
|
protected readonly uid: string;
|
|
65
|
-
|
|
67
|
+
/**
|
|
68
|
+
* @description Accessible name for the popover when it has no `title` or title template.
|
|
69
|
+
*/
|
|
70
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* @description Whether focus moves into the popover when it opens: to its first focusable element, or to the
|
|
73
|
+
* popover itself. Defaults to `true`, except for the `hover` trigger.
|
|
74
|
+
*/
|
|
75
|
+
readonly autoFocus: _angular_core.InputSignal<boolean | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* @description Whether pressing Escape closes the popover.
|
|
78
|
+
* @default true
|
|
79
|
+
*/
|
|
80
|
+
readonly closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
81
|
+
/**
|
|
82
|
+
* @description Whether a click outside the popover and its target closes it.
|
|
83
|
+
* @default true
|
|
84
|
+
*/
|
|
85
|
+
readonly closeOnOutsideClick: _angular_core.InputSignal<boolean>;
|
|
66
86
|
/**
|
|
67
87
|
* @description Display the arrow of the popover.
|
|
68
88
|
*/
|
|
69
89
|
readonly displayArrow: _angular_core.InputSignal<boolean>;
|
|
90
|
+
/**
|
|
91
|
+
* @description Emits when the popover is hidden.
|
|
92
|
+
*/
|
|
93
|
+
readonly hidden: _angular_core.OutputEmitterRef<void>;
|
|
70
94
|
/**
|
|
71
95
|
* @description Emits when the popover is about to be closed.
|
|
72
96
|
* This event is preventable.
|
|
73
97
|
*/
|
|
74
98
|
readonly hide: _angular_core.OutputEmitterRef<PopoverHideEvent>;
|
|
75
99
|
/**
|
|
76
|
-
* @description
|
|
77
|
-
|
|
78
|
-
readonly hidden: _angular_core.OutputEmitterRef<void>;
|
|
79
|
-
/**
|
|
80
|
-
* @description The position of the popover relative to the target element.
|
|
100
|
+
* @description The side of the target the popover opens on. `left` and `right` are physical; `start` and `end`
|
|
101
|
+
* follow the text direction. It flips to the opposite side when there isn't room.
|
|
81
102
|
*/
|
|
82
|
-
readonly position: _angular_core.InputSignal<
|
|
103
|
+
readonly position: _angular_core.InputSignal<_nanahoshi_mona_ui_internal.OverlaySide>;
|
|
83
104
|
/**
|
|
84
105
|
* @description The border radius of the popover.
|
|
85
106
|
*/
|
|
@@ -90,7 +111,7 @@ declare class PopoverComponent implements PopoverVariantInputs {
|
|
|
90
111
|
*/
|
|
91
112
|
readonly show: _angular_core.OutputEmitterRef<PopoverShowEvent>;
|
|
92
113
|
/**
|
|
93
|
-
* @description Emits
|
|
114
|
+
* @description Emits once the popover has opened.
|
|
94
115
|
*/
|
|
95
116
|
readonly shown: _angular_core.OutputEmitterRef<PopoverShownEvent>;
|
|
96
117
|
/**
|
|
@@ -103,16 +124,16 @@ declare class PopoverComponent implements PopoverVariantInputs {
|
|
|
103
124
|
readonly title: _angular_core.InputSignal<string>;
|
|
104
125
|
/**
|
|
105
126
|
* @description The trigger that opens/closes the popover.
|
|
106
|
-
* "click" toggles on click, "hover" opens
|
|
107
|
-
*
|
|
108
|
-
*
|
|
127
|
+
* "click" toggles on click, "hover" opens while the pointer is on the target or the popover, or focus is on the
|
|
128
|
+
* target, "none" disables automatic triggering (use `open()`/`close()` instead). Any other DOM event name is
|
|
129
|
+
* also accepted and used as-is.
|
|
109
130
|
*/
|
|
110
131
|
readonly trigger: _angular_core.InputSignal<PopoverTrigger>;
|
|
111
132
|
constructor();
|
|
112
133
|
close(): void;
|
|
113
134
|
open(): void;
|
|
114
135
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverComponent, never>;
|
|
115
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopoverComponent, "mona-popover", ["monaPopover"], { "displayArrow": { "alias": "displayArrow"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; }, { "
|
|
136
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopoverComponent, "mona-popover", ["monaPopover"], { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; "displayArrow": { "alias": "displayArrow"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; }, { "hidden": "hidden"; "hide": "hide"; "show": "show"; "shown": "shown"; }, ["footerTemplateRef", "titleTemplateRef"], ["*"], true, never>;
|
|
116
137
|
}
|
|
117
138
|
|
|
118
139
|
declare class PopoverFooterTemplateDirective {
|
|
@@ -125,5 +146,11 @@ declare class PopoverTitleTemplateDirective {
|
|
|
125
146
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PopoverTitleTemplateDirective, "ng-template[monaPopoverTitleTemplate]", never, {}, {}, never, never, true, never>;
|
|
126
147
|
}
|
|
127
148
|
|
|
149
|
+
/**
|
|
150
|
+
* The side of its target a popover opens on. `left` and `right` are physical in every direction; `start` and `end`
|
|
151
|
+
* follow the text direction.
|
|
152
|
+
*/
|
|
153
|
+
type PopoverPosition = OverlaySide;
|
|
154
|
+
|
|
128
155
|
export { PopoverComponent, PopoverFooterTemplateDirective, PopoverHideEvent, PopoverShowEvent, PopoverShownEvent, PopoverTitleTemplateDirective };
|
|
129
|
-
export type { PopoverTrigger };
|
|
156
|
+
export type { PopoverPosition, PopoverTrigger };
|