@nanahoshi/mona-ui 0.25.1 → 0.26.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/README.md +2 -0
- package/command/package.json +4 -0
- package/docs/auto-complete.md +733 -0
- package/docs/avatar.md +220 -0
- package/docs/breadcrumb.md +320 -0
- package/docs/button-group.md +392 -0
- package/docs/button.md +256 -0
- package/docs/calendar.md +515 -0
- package/docs/card.md +292 -0
- package/docs/chart.md +4058 -0
- package/docs/checkbox.md +374 -0
- package/docs/chip.md +339 -0
- package/docs/circular-progress-bar.md +287 -0
- package/docs/collapsible.md +308 -0
- package/docs/color-gradient.md +336 -0
- package/docs/color-palette.md +317 -0
- package/docs/color-picker.md +387 -0
- package/docs/combo-box.md +764 -0
- package/docs/command.md +582 -0
- package/docs/contextmenu.md +530 -0
- package/docs/date-picker.md +251 -0
- package/docs/datetime-picker.md +284 -0
- package/docs/decimal-textbox.md +260 -0
- package/docs/dialog.md +822 -0
- package/docs/dropdown-button.md +507 -0
- package/docs/dropdown-list.md +779 -0
- package/docs/editor.md +374 -0
- package/docs/expansion-panel.md +348 -0
- package/docs/fieldset.md +217 -0
- package/docs/forms.md +162 -0
- package/docs/grid.md +2053 -0
- package/docs/input.md +197 -0
- package/docs/installation.md +54 -0
- package/docs/introduction.md +46 -0
- package/docs/label.md +340 -0
- package/docs/list-box.md +637 -0
- package/docs/list-view.md +584 -0
- package/docs/menubar.md +559 -0
- package/docs/multi-select.md +765 -0
- package/docs/notification.md +460 -0
- package/docs/numeric-textbox.md +301 -0
- package/docs/otp-input.md +539 -0
- package/docs/pager.md +513 -0
- package/docs/placeholder.md +176 -0
- package/docs/popover.md +423 -0
- package/docs/popup-menu.md +658 -0
- package/docs/popup.md +617 -0
- package/docs/progress-bar.md +368 -0
- package/docs/radio-button.md +451 -0
- package/docs/range-slider.md +367 -0
- package/docs/rating.md +518 -0
- package/docs/scroll-view.md +375 -0
- package/docs/segmented.md +434 -0
- package/docs/sheet.md +348 -0
- package/docs/sidebar.md +1126 -0
- package/docs/skeleton.md +181 -0
- package/docs/slider.md +423 -0
- package/docs/spinner.md +370 -0
- package/docs/split-button.md +522 -0
- package/docs/splitter.md +342 -0
- package/docs/stepper.md +539 -0
- package/docs/switch.md +340 -0
- package/docs/tabs.md +542 -0
- package/docs/textarea.md +196 -0
- package/docs/textbox.md +332 -0
- package/docs/theming.md +403 -0
- package/docs/time-picker.md +254 -0
- package/docs/tooltip-directive.md +340 -0
- package/docs/tooltip.md +321 -0
- package/docs/tree-view.md +1018 -0
- package/docs/window.md +663 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +8 -0
- package/fesm2022/nanahoshi-mona-ui-button.mjs +12 -0
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +5 -2
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +86 -0
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +16 -2
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-command.mjs +924 -0
- package/fesm2022/nanahoshi-mona-ui-common.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +10 -6
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +9 -5
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +9 -5
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +55 -1
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -2
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +13 -0
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +5 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs → nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs → nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs} +18 -35
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs} +4653 -4529
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1 -0
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +168 -0
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +19 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +32 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +15 -8
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +8 -5
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +9 -0
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +5 -0
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +14 -6
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +48 -183
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +16 -0
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -0
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +7 -2
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +9 -6
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +18 -21
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +11 -8
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +9 -1
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +16 -5
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +13 -11
- package/fesm2022/nanahoshi-mona-ui-window.mjs +12 -5
- package/i18n/catalogs/en-US.messages.json +10 -0
- package/internal/popup-menu/package.json +4 -0
- package/llms.txt +123 -0
- package/locales/ar-sa/ar-sa.messages.json +10 -0
- package/locales/de-de/de-de.messages.json +10 -0
- package/locales/es-es/es-es.messages.json +10 -0
- package/locales/fr-fr/fr-fr.messages.json +10 -0
- package/locales/id-id/id-id.messages.json +10 -0
- package/locales/it-it/it-it.messages.json +10 -0
- package/locales/ja-jp/ja-jp.messages.json +10 -0
- package/locales/ko-kr/ko-kr.messages.json +10 -0
- package/locales/pt-br/pt-br.messages.json +10 -0
- package/locales/ru-ru/ru-ru.messages.json +10 -0
- package/locales/tr-tr/tr-tr.messages.json +10 -0
- package/locales/zh-cn/zh-cn.messages.json +10 -0
- package/locales/zh-tw/zh-tw.messages.json +10 -0
- package/package.json +9 -1
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -1
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +8 -0
- package/types/nanahoshi-mona-ui-button.d.ts +12 -0
- package/types/nanahoshi-mona-ui-calendar.d.ts +3 -0
- package/types/nanahoshi-mona-ui-chart.d.ts +200 -0
- package/types/nanahoshi-mona-ui-check-box.d.ts +4 -0
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +4 -0
- package/types/nanahoshi-mona-ui-collapsible.d.ts +10 -0
- package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -1
- package/types/nanahoshi-mona-ui-command.d.ts +253 -0
- package/types/nanahoshi-mona-ui-common.d.ts +17 -1
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +5 -2
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-dialog.d.ts +58 -1
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +7 -3
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +55 -1
- package/types/nanahoshi-mona-ui-editor.d.ts +31 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +13 -0
- package/types/nanahoshi-mona-ui-fieldset.d.ts +5 -0
- package/types/nanahoshi-mona-ui-grid.d.ts +162 -35
- package/types/nanahoshi-mona-ui-i18n.d.ts +144 -1
- package/types/nanahoshi-mona-ui-internal-list.d.ts +16 -1
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +165 -0
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +21 -2
- package/types/nanahoshi-mona-ui-internal.d.ts +4 -5
- package/types/nanahoshi-mona-ui-label.d.ts +1 -0
- package/types/nanahoshi-mona-ui-list-box.d.ts +27 -4
- package/types/nanahoshi-mona-ui-list-view.d.ts +34 -1
- package/types/nanahoshi-mona-ui-list.d.ts +1 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +10 -0
- package/types/nanahoshi-mona-ui-menubar.d.ts +10 -3
- package/types/nanahoshi-mona-ui-multi-select.d.ts +3 -3
- package/types/nanahoshi-mona-ui-notification.d.ts +9 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -1
- package/types/nanahoshi-mona-ui-otp-input.d.ts +1 -0
- package/types/nanahoshi-mona-ui-pager.d.ts +5 -1
- package/types/nanahoshi-mona-ui-popover.d.ts +9 -1
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +48 -161
- package/types/nanahoshi-mona-ui-popup.d.ts +16 -0
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +4 -0
- package/types/nanahoshi-mona-ui-rating.d.ts +2 -0
- package/types/nanahoshi-mona-ui-segmented.d.ts +1 -0
- package/types/nanahoshi-mona-ui-sheet.d.ts +1 -1
- package/types/nanahoshi-mona-ui-slider.d.ts +2 -0
- package/types/nanahoshi-mona-ui-spinner.d.ts +7 -0
- package/types/nanahoshi-mona-ui-split-button.d.ts +7 -4
- package/types/nanahoshi-mona-ui-stepper.d.ts +11 -2
- package/types/nanahoshi-mona-ui-tabs.d.ts +4 -1
- package/types/nanahoshi-mona-ui-text-box.d.ts +9 -1
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-tooltip.d.ts +10 -2
- package/types/nanahoshi-mona-ui-tree-view.d.ts +6 -5
- package/types/nanahoshi-mona-ui-window.d.ts +66 -1
|
@@ -75,7 +75,7 @@ declare class MultiSelectComponent<TData = unknown, TValue = TData> implements F
|
|
|
75
75
|
readonly ariaDescribedBy: _angular_core.InputSignal<string>;
|
|
76
76
|
/**
|
|
77
77
|
* @description Accessible name for the multi select. Describe what it represents.
|
|
78
|
-
* Falls back to {@link placeholder} when neither this nor
|
|
78
|
+
* Falls back to {@link placeholder} when neither this nor `aria-labelledby` is set.
|
|
79
79
|
* @default ""
|
|
80
80
|
*/
|
|
81
81
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
@@ -137,8 +137,8 @@ declare class MultiSelectComponent<TData = unknown, TValue = TData> implements F
|
|
|
137
137
|
*/
|
|
138
138
|
readonly opened: _angular_core.OutputEmitterRef<void>;
|
|
139
139
|
/**
|
|
140
|
-
* @description Text shown when nothing is selected. It also names the multi select when neither
|
|
141
|
-
* nor
|
|
140
|
+
* @description Text shown when nothing is selected. It also names the multi select when neither `aria-label`
|
|
141
|
+
* nor `aria-labelledby` is set.
|
|
142
142
|
* @default ""
|
|
143
143
|
*/
|
|
144
144
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
@@ -107,8 +107,17 @@ interface NotificationRef {
|
|
|
107
107
|
declare class NotificationService {
|
|
108
108
|
#private;
|
|
109
109
|
constructor();
|
|
110
|
+
/**
|
|
111
|
+
* Closes the notification with the given `id`, wherever its container is positioned. No-op if no notification with
|
|
112
|
+
* that `id` is currently shown.
|
|
113
|
+
*/
|
|
110
114
|
hide(id: string): void;
|
|
115
|
+
/** Closes every currently visible notification, across all positions. */
|
|
111
116
|
hideAll(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Creates a notification and returns a `NotificationRef`. If a notification with the same `id` already exists at
|
|
119
|
+
* the resolved `position`, returns a ref to that existing notification instead of creating a duplicate.
|
|
120
|
+
*/
|
|
112
121
|
show(options: NotificationOptions): NotificationRef;
|
|
113
122
|
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
|
|
114
123
|
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
|
|
@@ -55,7 +55,7 @@ declare abstract class NumericTextBoxBaseComponent<TValue extends number | strin
|
|
|
55
55
|
readonly ariaDescribedBy: _angular_core.InputSignal<string>;
|
|
56
56
|
/**
|
|
57
57
|
* @description Accessible name for the input. Prefer a visible label, linked through {@link inputId} or
|
|
58
|
-
*
|
|
58
|
+
* `aria-labelledby`.
|
|
59
59
|
*/
|
|
60
60
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
61
61
|
/**
|
|
@@ -213,6 +213,7 @@ declare class OtpInputComponent implements OtpInputVariantInput, FormValueContro
|
|
|
213
213
|
*/
|
|
214
214
|
readonly value: _angular_core.ModelSignal<string>;
|
|
215
215
|
constructor();
|
|
216
|
+
/** Removes focus from the input. */
|
|
216
217
|
blur(): void;
|
|
217
218
|
focus(options?: FocusOptions): void;
|
|
218
219
|
focus(index?: number): void;
|
|
@@ -34,6 +34,7 @@ interface PagerContext {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
interface InfoTemplateContext extends PagerContext {
|
|
37
|
+
/** The pager state, the same values the context spreads at its top level. */
|
|
37
38
|
readonly $implicit: PagerContext;
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -45,6 +46,7 @@ declare class PagerInfoTemplateDirective {
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
interface NavigationButtonsTemplateContext extends PagerContext {
|
|
49
|
+
/** The pager state, the same values the context spreads at its top level. */
|
|
48
50
|
readonly $implicit: PagerContext;
|
|
49
51
|
/** True when the button has nowhere to go (the first or last page is current, or there are no pages). */
|
|
50
52
|
readonly disabled: boolean;
|
|
@@ -56,6 +58,7 @@ interface NavigationButtonsTemplateContext extends PagerContext {
|
|
|
56
58
|
|
|
57
59
|
declare class PagerNavigationButtonsTemplateDirective {
|
|
58
60
|
readonly templateRef: TemplateRef<NavigationButtonsTemplateContext>;
|
|
61
|
+
/** @description Which navigation button the template replaces. */
|
|
59
62
|
readonly type: _angular_core.InputSignal<"first" | "last" | "next" | "previous">;
|
|
60
63
|
static ngTemplateContextGuard(_directive: PagerNavigationButtonsTemplateDirective, _context: unknown): _context is NavigationButtonsTemplateContext;
|
|
61
64
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PagerNavigationButtonsTemplateDirective, never>;
|
|
@@ -67,6 +70,7 @@ declare class PagerNavigationButtonsTemplateDirective {
|
|
|
67
70
|
* control in an `<li>`.
|
|
68
71
|
*/
|
|
69
72
|
interface NumericButtonsTemplateContext extends PagerContext {
|
|
73
|
+
/** The pager state, the same values the context spreads at its top level. */
|
|
70
74
|
readonly $implicit: PagerContext;
|
|
71
75
|
/** The page numbers the default buttons would show, in order (the first and last page included). */
|
|
72
76
|
readonly pages: readonly number[];
|
|
@@ -180,7 +184,7 @@ declare class PagerComponent implements PagerVariantInputs {
|
|
|
180
184
|
*/
|
|
181
185
|
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
182
186
|
/**
|
|
183
|
-
* @description Id of the element that names the pager. Takes precedence over
|
|
187
|
+
* @description Id of the element that names the pager. Takes precedence over `aria-label`.
|
|
184
188
|
*/
|
|
185
189
|
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
186
190
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _nanahoshi_mona_ui_internal from '@nanahoshi/mona-ui/internal';
|
|
2
2
|
import { VariantInputs, PhysicalOverlaySide, OverlaySide } from '@nanahoshi/mona-ui/internal';
|
|
3
|
+
export { OverlaySide } from '@nanahoshi/mona-ui/internal';
|
|
3
4
|
import * as _angular_core from '@angular/core';
|
|
4
5
|
import { TemplateRef, ElementRef } from '@angular/core';
|
|
5
6
|
import { PreventableEvent } from '@nanahoshi/mona-ui/common';
|
|
@@ -130,17 +131,24 @@ declare class PopoverComponent implements PopoverVariantInputs {
|
|
|
130
131
|
*/
|
|
131
132
|
readonly trigger: _angular_core.InputSignal<PopoverTrigger>;
|
|
132
133
|
constructor();
|
|
134
|
+
/**
|
|
135
|
+
* Closes the popover if one is currently open. Emits `hide` and respects `preventDefault()` — if canceled, the
|
|
136
|
+
* popup stays open and the component's internal state remains consistent with that.
|
|
137
|
+
*/
|
|
133
138
|
close(): void;
|
|
139
|
+
/** Opens the popover directly. No-op if it is already open. Does not emit `show`; emits `shown` once open. */
|
|
134
140
|
open(): void;
|
|
135
141
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverComponent, never>;
|
|
136
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopoverComponent, "mona-popover", ["monaPopover"], { "ariaLabel": { "alias": "
|
|
142
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopoverComponent, "mona-popover", ["monaPopover"], { "ariaLabel": { "alias": "aria-label"; "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>;
|
|
137
143
|
}
|
|
138
144
|
|
|
145
|
+
/** Marks an `ng-template` as the popover's custom footer content. */
|
|
139
146
|
declare class PopoverFooterTemplateDirective {
|
|
140
147
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverFooterTemplateDirective, never>;
|
|
141
148
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PopoverFooterTemplateDirective, "ng-template[monaPopoverFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
142
149
|
}
|
|
143
150
|
|
|
151
|
+
/** Marks an `ng-template` as the popover's custom title content. */
|
|
144
152
|
declare class PopoverTitleTemplateDirective {
|
|
145
153
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverTitleTemplateDirective, never>;
|
|
146
154
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PopoverTitleTemplateDirective, "ng-template[monaPopoverTitleTemplate]", never, {}, {}, never, never, true, never>;
|
|
@@ -1,79 +1,13 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { ElementRef, OnInit, TemplateRef } from '@angular/core';
|
|
3
|
+
import * as _nanahoshi_mona_ui_internal_popup_menu from '@nanahoshi/mona-ui/internal/popup-menu';
|
|
4
|
+
import { PopupMenuItem, MenuItem, PopupMenuItemClickEvent, PopupMenuConfig, PopupMenuOrigin, PopupMenuItemType, PopupTemplateConfig, PopupMenuTemplateOrigin, PopupMenuTemplateType } from '@nanahoshi/mona-ui/internal/popup-menu';
|
|
5
|
+
export { MenuItem, PopupMenuItem, PopupMenuItemClickEvent } from '@nanahoshi/mona-ui/internal/popup-menu';
|
|
4
6
|
import { PreventableEvent, ClassInputType } from '@nanahoshi/mona-ui/common';
|
|
5
7
|
import { PopupCloseEvent, ConnectionPoint, PopupOffset } from '@nanahoshi/mona-ui/popup';
|
|
6
8
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
9
|
import { VariantProps } from 'class-variance-authority';
|
|
8
10
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
9
|
-
import * as _nanahoshi_mona_ui_popup_menu from '@nanahoshi/mona-ui/popup-menu';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Emitted when a menu item is activated by a click, Enter or Space. Preventing it keeps the menu open and leaves a
|
|
13
|
-
* checkbox or radio item's state unchanged.
|
|
14
|
-
*/
|
|
15
|
-
declare class PopupMenuItemClickEvent extends PreventableEvent {
|
|
16
|
-
#private;
|
|
17
|
-
constructor(item: PopupMenuItem, originalEvent: MouseEvent);
|
|
18
|
-
/**
|
|
19
|
-
* For a checkbox or radio item, the state the item has once the click is applied (if it isn't prevented).
|
|
20
|
-
* `undefined` for other items.
|
|
21
|
-
*/
|
|
22
|
-
get checked(): boolean | undefined;
|
|
23
|
-
get item(): PopupMenuItem;
|
|
24
|
-
/**
|
|
25
|
-
* The item's label.
|
|
26
|
-
*/
|
|
27
|
-
get label(): string;
|
|
28
|
-
/**
|
|
29
|
-
* The item's `value`: the `value` input of the item component, or the `value` of a `MenuItem`.
|
|
30
|
-
*/
|
|
31
|
-
get value(): unknown;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
interface PopupMenuItem {
|
|
35
|
-
checkable?: boolean;
|
|
36
|
-
checked?: Signal<boolean>;
|
|
37
|
-
click$?: Subject<PopupMenuItemClickEvent>;
|
|
38
|
-
disabled: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* The group the item belongs to. Consecutive items with the same key form a group. A string key, or a symbol
|
|
41
|
-
* with a description, is the group's title.
|
|
42
|
-
*/
|
|
43
|
-
group: string | symbol;
|
|
44
|
-
groupTemplate: Signal<TemplateRef<unknown> | null> | null;
|
|
45
|
-
iconTemplate: Signal<TemplateRef<unknown> | null> | null;
|
|
46
|
-
items: PopupMenuItem[];
|
|
47
|
-
label: string;
|
|
48
|
-
radio?: boolean;
|
|
49
|
-
selected?: Signal<boolean>;
|
|
50
|
-
separator?: boolean;
|
|
51
|
-
shortcutTemplate: Signal<TemplateRef<unknown> | null> | null;
|
|
52
|
-
textTemplate: Signal<TemplateRef<unknown> | null> | null;
|
|
53
|
-
uid: string;
|
|
54
|
-
value?: Signal<unknown>;
|
|
55
|
-
}
|
|
56
|
-
interface MenuItem {
|
|
57
|
-
/**
|
|
58
|
-
* Whether the item is a checkbox item. Its `checked` state toggles when it's activated, unless `menuClick` is
|
|
59
|
-
* prevented. The state lives in the menu: read the new state from the event's `checked` and keep it in your
|
|
60
|
-
* items if they can be replaced.
|
|
61
|
-
*/
|
|
62
|
-
checkable?: boolean;
|
|
63
|
-
checked?: boolean;
|
|
64
|
-
disabled?: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* The title of the group the item belongs to. Consecutive items with the same group form one group.
|
|
67
|
-
*/
|
|
68
|
-
group?: string;
|
|
69
|
-
items?: MenuItem[];
|
|
70
|
-
label: string;
|
|
71
|
-
separator?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* A value that identifies the item in `menuClick` (the event's `value`).
|
|
74
|
-
*/
|
|
75
|
-
value?: unknown;
|
|
76
|
-
}
|
|
77
11
|
|
|
78
12
|
/** A run of consecutive menu items that share a group key. */
|
|
79
13
|
interface PopupMenuItemGroup {
|
|
@@ -122,6 +56,12 @@ interface PopupMenuNavigationEvent {
|
|
|
122
56
|
/** The item a menu opened from the keyboard highlights first. */
|
|
123
57
|
type PopupMenuInitialFocus = "first" | "last";
|
|
124
58
|
|
|
59
|
+
/**
|
|
60
|
+
* What opens a popup menu: a click on the target, a right-click on it, or `"none"` to open it only through
|
|
61
|
+
* `openMenu()`.
|
|
62
|
+
*/
|
|
63
|
+
type PopupMenuTrigger = "click" | "contextmenu" | "none";
|
|
64
|
+
|
|
125
65
|
declare class PopupMenuComponent implements PopupMenuVariantInput {
|
|
126
66
|
#private;
|
|
127
67
|
private readonly groupTemplateConfig;
|
|
@@ -131,21 +71,21 @@ declare class PopupMenuComponent implements PopupMenuVariantInput {
|
|
|
131
71
|
private readonly textTemplateConfig;
|
|
132
72
|
protected readonly menuItems: _angular_core.Signal<PopupMenuItemGroup[]>;
|
|
133
73
|
/**
|
|
134
|
-
* @description The
|
|
135
|
-
*
|
|
74
|
+
* @description The element to position the menu against, when it isn't the `target`.
|
|
75
|
+
* Ignored when `openAtPointer` is set.
|
|
136
76
|
*/
|
|
137
77
|
readonly anchor: _angular_core.InputSignal<Element | ElementRef<HTMLElement> | undefined>;
|
|
138
78
|
/**
|
|
139
|
-
* @description The
|
|
140
|
-
*
|
|
79
|
+
* @description The point on the anchor that the menu attaches to.
|
|
80
|
+
* Ignored when `openAtPointer` is set.
|
|
141
81
|
*/
|
|
142
82
|
readonly anchorConnectionPoint: _angular_core.InputSignal<ConnectionPoint | null | undefined>;
|
|
143
83
|
/**
|
|
144
|
-
* @description The accessible name of the root menu. Takes precedence over `
|
|
84
|
+
* @description The accessible name of the root menu. Takes precedence over `aria-labelledby`.
|
|
145
85
|
*/
|
|
146
86
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
147
87
|
/**
|
|
148
|
-
* @description The ids of the elements that name the root menu. When neither this nor `
|
|
88
|
+
* @description The ids of the elements that name the root menu. When neither this nor `aria-label` is set, the
|
|
149
89
|
* menu is named by the target element if it has an id.
|
|
150
90
|
*/
|
|
151
91
|
readonly ariaLabelledBy: _angular_core.InputSignal<string>;
|
|
@@ -172,12 +112,11 @@ declare class PopupMenuComponent implements PopupMenuVariantInput {
|
|
|
172
112
|
*/
|
|
173
113
|
readonly minWidth: _angular_core.InputSignal<string | number | undefined>;
|
|
174
114
|
/**
|
|
175
|
-
* @description
|
|
176
|
-
* This is used to handle keyboard navigation within the popup menu.
|
|
115
|
+
* @description Emitted when an arrow key moves through the menu, or tries to leave it.
|
|
177
116
|
*/
|
|
178
117
|
readonly navigate: _angular_core.OutputEmitterRef<PopupMenuNavigationEvent>;
|
|
179
118
|
/**
|
|
180
|
-
* @description The
|
|
119
|
+
* @description The distance between the menu and its anchor.
|
|
181
120
|
*/
|
|
182
121
|
readonly offset: _angular_core.InputSignal<PopupOffset | undefined>;
|
|
183
122
|
/**
|
|
@@ -185,16 +124,15 @@ declare class PopupMenuComponent implements PopupMenuVariantInput {
|
|
|
185
124
|
*/
|
|
186
125
|
readonly open: _angular_core.OutputEmitterRef<void>;
|
|
187
126
|
/**
|
|
188
|
-
* @description
|
|
189
|
-
*
|
|
127
|
+
* @description Opens the menu where the pointer is, instead of against the `anchor` or `target`. Opened from the
|
|
128
|
+
* keyboard, it opens at the center of the target.
|
|
190
129
|
*/
|
|
191
|
-
readonly
|
|
130
|
+
readonly openAtPointer: _angular_core.InputSignal<boolean>;
|
|
192
131
|
/**
|
|
193
|
-
* @description
|
|
194
|
-
*
|
|
195
|
-
* If false, it will be positioned at the target element. If an anchor is provided, it will be anchored to that element.
|
|
132
|
+
* @description The point on the menu that attaches to the anchor.
|
|
133
|
+
* Ignored when `openAtPointer` is set.
|
|
196
134
|
*/
|
|
197
|
-
readonly
|
|
135
|
+
readonly popupConnectionPoint: _angular_core.InputSignal<ConnectionPoint | null | undefined>;
|
|
198
136
|
/**
|
|
199
137
|
* @description Sets the border radius of the popup menu.
|
|
200
138
|
* This will be applied to the root menu and all submenus.
|
|
@@ -206,13 +144,17 @@ declare class PopupMenuComponent implements PopupMenuVariantInput {
|
|
|
206
144
|
*/
|
|
207
145
|
readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
|
|
208
146
|
/**
|
|
209
|
-
* @description The
|
|
147
|
+
* @description The element that opens the menu. The menu is positioned against it unless `anchor` is set.
|
|
210
148
|
*/
|
|
211
149
|
readonly target: _angular_core.InputSignal<Element | ElementRef<HTMLElement>>;
|
|
212
150
|
/**
|
|
213
|
-
* @description
|
|
151
|
+
* @description What opens the menu: a click on the target, a right-click on it, or `"none"` to open it only
|
|
152
|
+
* through `openMenu()`.
|
|
153
|
+
*/
|
|
154
|
+
readonly trigger: _angular_core.InputSignal<PopupMenuTrigger>;
|
|
155
|
+
/**
|
|
156
|
+
* @description Extra classes for the menu's popup.
|
|
214
157
|
*/
|
|
215
|
-
readonly trigger: _angular_core.InputSignal<string>;
|
|
216
158
|
readonly userClass: _angular_core.InputSignalWithTransform<string | undefined, ClassInputType>;
|
|
217
159
|
/**
|
|
218
160
|
* @description Sets the width of the popup menu.
|
|
@@ -230,7 +172,11 @@ declare class PopupMenuComponent implements PopupMenuVariantInput {
|
|
|
230
172
|
* has already moved elsewhere.
|
|
231
173
|
*/
|
|
232
174
|
closeMenu(): void;
|
|
233
|
-
|
|
175
|
+
/**
|
|
176
|
+
* @description Opens the menu, as if the target had been clicked.
|
|
177
|
+
* @param viaContextMenuKey Whether the menu opens from the ContextMenu key or Shift+F10.
|
|
178
|
+
*/
|
|
179
|
+
openMenu(viaContextMenuKey?: boolean): void;
|
|
234
180
|
/**
|
|
235
181
|
* @description Opens the menu as the keyboard does, with its first (or last) item highlighted.
|
|
236
182
|
* @param viaContextMenuKey Whether the menu opens from the ContextMenu key or Shift+F10.
|
|
@@ -250,58 +196,13 @@ declare class PopupMenuComponent implements PopupMenuVariantInput {
|
|
|
250
196
|
private setNavigationSubscription;
|
|
251
197
|
private setTriggerSubscription;
|
|
252
198
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopupMenuComponent, never>;
|
|
253
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopupMenuComponent, "mona-popup-menu", never, { "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; "anchorConnectionPoint": { "alias": "anchorConnectionPoint"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
declare const PopupMenuToken: InjectionToken<PopupMenuConfig>;
|
|
257
|
-
declare const PopupMenuRadioItemToken: InjectionToken<PopupMenuConfig>;
|
|
258
|
-
declare const PopupMenuGroupTemplateToken: InjectionToken<PopupTemplateConfig>;
|
|
259
|
-
declare const PopupMenuIconTemplateToken: InjectionToken<PopupTemplateConfig>;
|
|
260
|
-
declare const PopupMenuShortcutTemplateToken: InjectionToken<PopupTemplateConfig>;
|
|
261
|
-
declare const PopupMenuTextTemplateToken: InjectionToken<PopupTemplateConfig>;
|
|
262
|
-
interface PopupMenuConfig {
|
|
263
|
-
getPopupMenuItem: () => PopupMenuItem[];
|
|
264
|
-
readonly origin: PopupMenuOrigin;
|
|
265
|
-
readonly type: PopupMenuItemType;
|
|
266
|
-
}
|
|
267
|
-
interface PopupTemplateConfig {
|
|
268
|
-
readonly origin: PopupMenuTemplateOrigin;
|
|
269
|
-
readonly template: TemplateRef<unknown>;
|
|
270
|
-
readonly type: PopupMenuTemplateType;
|
|
271
|
-
}
|
|
272
|
-
declare enum PopupMenuOrigin {
|
|
273
|
-
Popup = 1,
|
|
274
|
-
ContextMenu = 2,
|
|
275
|
-
DropdownButton = 3,
|
|
276
|
-
SplitButton = 4,
|
|
277
|
-
MenubarMenu = 5
|
|
278
|
-
}
|
|
279
|
-
declare enum PopupMenuItemType {
|
|
280
|
-
CheckboxMenuItem = 1,
|
|
281
|
-
MenuItem = 2,
|
|
282
|
-
MenuGroup = 3,
|
|
283
|
-
RadioGroup = 4,
|
|
284
|
-
RadioItem = 5,
|
|
285
|
-
Separator = 6
|
|
286
|
-
}
|
|
287
|
-
declare enum PopupMenuTemplateOrigin {
|
|
288
|
-
Popup = 1,
|
|
289
|
-
ContextMenu = 2,
|
|
290
|
-
DropdownButton = 3,
|
|
291
|
-
SplitButton = 4,
|
|
292
|
-
MenubarMenu = 5
|
|
293
|
-
}
|
|
294
|
-
declare enum PopupMenuTemplateType {
|
|
295
|
-
Group = 1,
|
|
296
|
-
Icon = 2,
|
|
297
|
-
Shortcut = 3,
|
|
298
|
-
Text = 4
|
|
199
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopupMenuComponent, "mona-popup-menu", never, { "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; "anchorConnectionPoint": { "alias": "anchorConnectionPoint"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "menuId": { "alias": "id"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "openAtPointer": { "alias": "openAtPointer"; "required": false; "isSignal": true; }; "popupConnectionPoint": { "alias": "popupConnectionPoint"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": true; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "close": "close"; "menuClick": "menuClick"; "navigate": "navigate"; "open": "open"; }, ["groupTemplateConfig", "iconTemplateConfig", "nestedComponents", "shortcutTemplateConfig", "textTemplateConfig"], never, true, never>;
|
|
299
200
|
}
|
|
300
201
|
|
|
301
202
|
declare class PopupMenuCheckboxItemComponent implements PopupMenuConfig, OnInit {
|
|
302
203
|
#private;
|
|
303
|
-
protected readonly shortcutTemplateConfig: _angular_core.Signal<
|
|
304
|
-
protected readonly textTemplateConfig: _angular_core.Signal<
|
|
204
|
+
protected readonly shortcutTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
205
|
+
protected readonly textTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
305
206
|
/**
|
|
306
207
|
* @description The checked state of the menu item. Activating the item toggles it (unless its `menuClick` is
|
|
307
208
|
* prevented) and emits `checkedChange`, so it works with or without a two-way binding.
|
|
@@ -335,10 +236,10 @@ declare class PopupMenuCheckboxItemComponent implements PopupMenuConfig, OnInit
|
|
|
335
236
|
|
|
336
237
|
declare class PopupMenuItemComponent implements PopupMenuConfig, OnInit {
|
|
337
238
|
#private;
|
|
338
|
-
protected readonly iconTemplateConfig: _angular_core.Signal<
|
|
239
|
+
protected readonly iconTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
339
240
|
protected readonly items: _angular_core.Signal<readonly PopupMenuConfig[]>;
|
|
340
|
-
protected readonly shortcutTemplateConfig: _angular_core.Signal<
|
|
341
|
-
protected readonly textTemplateConfig: _angular_core.Signal<
|
|
241
|
+
protected readonly shortcutTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
242
|
+
protected readonly textTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
342
243
|
/**
|
|
343
244
|
* @description Sets the disabled state of the menu item.
|
|
344
245
|
*/
|
|
@@ -368,7 +269,7 @@ declare class PopupMenuItemComponent implements PopupMenuConfig, OnInit {
|
|
|
368
269
|
|
|
369
270
|
declare class PopupMenuGroupComponent implements PopupMenuConfig {
|
|
370
271
|
#private;
|
|
371
|
-
protected readonly groupTemplateConfig: _angular_core.Signal<
|
|
272
|
+
protected readonly groupTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
372
273
|
protected readonly items: _angular_core.Signal<readonly PopupMenuConfig[]>;
|
|
373
274
|
readonly origin: PopupMenuOrigin;
|
|
374
275
|
/**
|
|
@@ -383,7 +284,7 @@ declare class PopupMenuGroupComponent implements PopupMenuConfig {
|
|
|
383
284
|
|
|
384
285
|
declare class PopupMenuRadioGroupComponent implements PopupMenuConfig, OnInit {
|
|
385
286
|
#private;
|
|
386
|
-
protected readonly groupTemplateConfig: _angular_core.Signal<
|
|
287
|
+
protected readonly groupTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
387
288
|
protected readonly items: _angular_core.Signal<readonly PopupMenuConfig[]>;
|
|
388
289
|
readonly origin: PopupMenuOrigin;
|
|
389
290
|
/**
|
|
@@ -404,8 +305,8 @@ declare class PopupMenuRadioGroupComponent implements PopupMenuConfig, OnInit {
|
|
|
404
305
|
|
|
405
306
|
declare class PopupMenuRadioItemComponent implements PopupMenuConfig, OnInit {
|
|
406
307
|
#private;
|
|
407
|
-
protected readonly shortcutTemplateConfig: _angular_core.Signal<
|
|
408
|
-
protected readonly textTemplateConfig: _angular_core.Signal<
|
|
308
|
+
protected readonly shortcutTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
309
|
+
protected readonly textTemplateConfig: _angular_core.Signal<_nanahoshi_mona_ui_internal_popup_menu.PopupTemplateConfig | undefined>;
|
|
409
310
|
/**
|
|
410
311
|
* @description Sets the disabled state of the menu item.
|
|
411
312
|
*/
|
|
@@ -473,19 +374,5 @@ declare class PopupMenuTextTemplateDirective implements PopupTemplateConfig {
|
|
|
473
374
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PopupMenuTextTemplateDirective, "ng-template[monaPopupMenuTextTemplate]", never, {}, {}, never, never, true, never>;
|
|
474
375
|
}
|
|
475
376
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
componentTypeMap: Record<PopupMenuItemType, string>;
|
|
479
|
-
origin: PopupMenuOrigin;
|
|
480
|
-
prefix: string;
|
|
481
|
-
}) => void;
|
|
482
|
-
declare const ensurePopupTemplateTypes: (params: {
|
|
483
|
-
templates: Iterable<PopupTemplateConfig>;
|
|
484
|
-
templateTypeMap: Record<PopupMenuTemplateType, string>;
|
|
485
|
-
origin: PopupMenuTemplateOrigin;
|
|
486
|
-
prefix: string;
|
|
487
|
-
}) => void;
|
|
488
|
-
declare const preparePopupMenuItems: (items: Iterable<MenuItem>) => PopupMenuItem[];
|
|
489
|
-
|
|
490
|
-
export { PopupMenuCheckboxItemComponent, PopupMenuCloseEvent, PopupMenuComponent, PopupMenuGroupComponent, PopupMenuGroupTemplateDirective, PopupMenuGroupTemplateToken, PopupMenuIconTemplateDirective, PopupMenuIconTemplateToken, PopupMenuItemClickEvent, PopupMenuItemComponent, PopupMenuItemType, PopupMenuOrigin, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuRadioItemToken, PopupMenuSeparatorComponent, PopupMenuShortcutTemplateDirective, PopupMenuShortcutTemplateToken, PopupMenuTemplateOrigin, PopupMenuTemplateType, PopupMenuTextTemplateDirective, PopupMenuTextTemplateToken, PopupMenuToken, ensurePopupComponentTypes, ensurePopupTemplateTypes, preparePopupMenuItems };
|
|
491
|
-
export type { MenuItem, PopupMenuConfig, PopupMenuItem, PopupMenuNavigationEvent, PopupMenuVariantInput, PopupMenuVariantProps, PopupTemplateConfig };
|
|
377
|
+
export { PopupMenuCheckboxItemComponent, PopupMenuCloseEvent, PopupMenuComponent, PopupMenuGroupComponent, PopupMenuGroupTemplateDirective, PopupMenuIconTemplateDirective, PopupMenuItemComponent, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuSeparatorComponent, PopupMenuShortcutTemplateDirective, PopupMenuTextTemplateDirective };
|
|
378
|
+
export type { PopupMenuInitialFocus, PopupMenuNavigationEvent, PopupMenuTrigger, PopupMenuVariantInput, PopupMenuVariantProps };
|
|
@@ -8,7 +8,9 @@ import { Observable } from 'rxjs';
|
|
|
8
8
|
declare class PopupCloseEvent<R = unknown> extends PreventableEvent {
|
|
9
9
|
#private;
|
|
10
10
|
constructor(options?: Partial<PopupCloseEventOptions<R>>);
|
|
11
|
+
/** The result value passed to `close()`, if any. */
|
|
11
12
|
get result(): R | undefined;
|
|
13
|
+
/** The source of the close. */
|
|
12
14
|
get via(): PopupCloseSource | undefined;
|
|
13
15
|
}
|
|
14
16
|
interface PopupCloseEventOptions<R = unknown, E = unknown> {
|
|
@@ -21,12 +23,19 @@ interface PopupCloseEventOptions<R = unknown, E = unknown> {
|
|
|
21
23
|
declare enum PopupCloseSource {
|
|
22
24
|
/** A dialog action button, such as OK or Cancel. */
|
|
23
25
|
Action = "action",
|
|
26
|
+
/** A click on the backdrop, when `closeOnBackdropClick` allows it. */
|
|
24
27
|
BackdropClick = "backdropClick",
|
|
28
|
+
/** The close button of a dialog, window or sheet. */
|
|
25
29
|
CloseButton = "closeButton",
|
|
30
|
+
/** The Escape key. */
|
|
26
31
|
Escape = "escape",
|
|
32
|
+
/** The pointer leaving the anchor, when `closeOnMouseLeave` is set. */
|
|
27
33
|
MouseLeave = "mouseLeave",
|
|
34
|
+
/** A `close()` call from code, with no user interaction behind it. */
|
|
28
35
|
Programmatic = "programmatic",
|
|
36
|
+
/** A pointer press outside the popup and its anchor. */
|
|
29
37
|
OutsideClick = "outsideClick",
|
|
38
|
+
/** The anchor scrolling away, when `closeOnScroll` is set. */
|
|
30
39
|
Scroll = "scroll"
|
|
31
40
|
}
|
|
32
41
|
|
|
@@ -46,6 +55,7 @@ interface PopupRefParams {
|
|
|
46
55
|
get positionChanges$(): Observable<ConnectionPositionPair>;
|
|
47
56
|
}
|
|
48
57
|
|
|
58
|
+
/** Returned by `PopupService.create()` and emitted via `PopupComponent`'s `open` output. */
|
|
49
59
|
declare class PopupRef {
|
|
50
60
|
#private;
|
|
51
61
|
constructor(options: PopupRefParams);
|
|
@@ -457,6 +467,7 @@ declare class PopupComponent<T = unknown> implements OnDestroy {
|
|
|
457
467
|
*/
|
|
458
468
|
readonly withScrollTracking: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
459
469
|
constructor();
|
|
470
|
+
/** Closes the popup if one is currently open. */
|
|
460
471
|
closePopup(): void;
|
|
461
472
|
ngOnDestroy(): void;
|
|
462
473
|
private getPopupWidth;
|
|
@@ -467,6 +478,11 @@ declare class PopupComponent<T = unknown> implements OnDestroy {
|
|
|
467
478
|
|
|
468
479
|
declare class PopupService {
|
|
469
480
|
#private;
|
|
481
|
+
/**
|
|
482
|
+
* Opens a popup and returns its `PopupRef`. If `settings.anchor` is a CSS selector string, creates a
|
|
483
|
+
* hover-triggered popup for every matching element (see Multi-element popups); otherwise creates a single popup
|
|
484
|
+
* attached to the given element, `ElementRef`, or point.
|
|
485
|
+
*/
|
|
470
486
|
create(settings: PopupSettings): PopupRef;
|
|
471
487
|
private attachContent;
|
|
472
488
|
private buildPanelClass;
|
|
@@ -14,6 +14,10 @@ interface LabelTemplateContext {
|
|
|
14
14
|
percent: number;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Structural template directive that replaces the default percentage label. The template is hidden when `indeterminate`
|
|
19
|
+
* is `true`.
|
|
20
|
+
*/
|
|
17
21
|
declare class ProgressBarLabelTemplateDirective {
|
|
18
22
|
readonly templateRef: TemplateRef<LabelTemplateContext>;
|
|
19
23
|
static ngTemplateContextGuard(_dir: ProgressBarLabelTemplateDirective, _ctx: unknown): _ctx is LabelTemplateContext;
|
|
@@ -262,7 +262,9 @@ declare class RatingComponent implements RatingVariantInput, FormValueControl<nu
|
|
|
262
262
|
*/
|
|
263
263
|
readonly value: _angular_core.ModelSignal<number>;
|
|
264
264
|
constructor();
|
|
265
|
+
/** Blurs the inner slider control if focused. */
|
|
265
266
|
blur(): void;
|
|
267
|
+
/** Focuses the inner slider control. Does nothing while disabled. */
|
|
266
268
|
focus(options?: FocusOptions): void;
|
|
267
269
|
protected createItemContext(item: RatingItemDescriptor): RatingItemTemplateContext;
|
|
268
270
|
protected getItemFill(itemValue: number): number;
|
|
@@ -187,6 +187,7 @@ declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> impl
|
|
|
187
187
|
* text of each option. Bind the options, as `[monaSegmentedItemTemplate]="options"`, to type `let-option` from them.
|
|
188
188
|
*/
|
|
189
189
|
declare class SegmentedItemTemplateDirective<T extends SegmentedValue = SegmentedValue> {
|
|
190
|
+
/** @description The options, to type `let-option` from them. It changes nothing else. */
|
|
190
191
|
readonly options: _angular_core.InputSignal<"" | readonly SegmentedOption<T>[] | undefined>;
|
|
191
192
|
readonly templateRef: TemplateRef<SegmentedItemTemplateContext<T>>;
|
|
192
193
|
static ngTemplateContextGuard<T extends SegmentedValue>(_directive: SegmentedItemTemplateDirective<T>, _context: unknown): _context is SegmentedItemTemplateContext<T>;
|
|
@@ -70,7 +70,7 @@ declare class SheetComponent implements Omit<SheetVariantInput, "side"> {
|
|
|
70
70
|
constructor();
|
|
71
71
|
protected closeSheet(): void;
|
|
72
72
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SheetComponent, never>;
|
|
73
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SheetComponent, "mona-sheet", never, { "ariaLabel": { "alias": "
|
|
73
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SheetComponent, "mona-sheet", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; }, never, ["*"], true, never>;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
declare const SHEET_DEFAULT_MESSAGES: MonaSheetMessages;
|
|
@@ -295,6 +295,7 @@ declare class SliderComponent extends SliderBaseComponent implements FormValueCo
|
|
|
295
295
|
* @default 0
|
|
296
296
|
*/
|
|
297
297
|
readonly value: _angular_core.ModelSignal<number>;
|
|
298
|
+
/** Moves focus to the handle. Does nothing while disabled. */
|
|
298
299
|
focus(options?: FocusOptions): void;
|
|
299
300
|
protected getMaxOverride(): number | undefined;
|
|
300
301
|
protected getMinOverride(): number | undefined;
|
|
@@ -349,6 +350,7 @@ declare class RangeSliderComponent extends SliderBaseComponent implements FormVa
|
|
|
349
350
|
* @default [0, 10]
|
|
350
351
|
*/
|
|
351
352
|
readonly value: _angular_core.ModelSignal<[number, number]>;
|
|
353
|
+
/** Moves focus to the lower handle. Does nothing while disabled. */
|
|
352
354
|
focus(options?: FocusOptions): void;
|
|
353
355
|
protected handleHandleMove(event: PointerEvent, isSecondary?: boolean): void;
|
|
354
356
|
protected setSubscriptions(): void;
|
|
@@ -90,9 +90,16 @@ interface SpinnerUpdate {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
interface SpinnerRef {
|
|
93
|
+
/**
|
|
94
|
+
* Emits when the user cancels the loading request. Completes when the request ends, without emitting if it wasn't
|
|
95
|
+
* cancelled.
|
|
96
|
+
*/
|
|
93
97
|
readonly cancelled$: Observable<void>;
|
|
98
|
+
/** Idempotently closes the request and releases target leases. */
|
|
94
99
|
close(): void;
|
|
100
|
+
/** Unique request identifier. */
|
|
95
101
|
readonly id: string;
|
|
102
|
+
/** Dynamically updates `text`, `appearance`, or `size`. */
|
|
96
103
|
update(update: SpinnerUpdate): void;
|
|
97
104
|
}
|
|
98
105
|
|