@nanahoshi/mona-ui 0.1.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 +25 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +590 -0
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +168 -0
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +220 -0
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +225 -0
- package/fesm2022/nanahoshi-mona-ui-button.mjs +497 -0
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +1569 -0
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +339 -0
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +453 -0
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +200 -0
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +853 -0
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +923 -0
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +495 -0
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +686 -0
- package/fesm2022/nanahoshi-mona-ui-common.mjs +642 -0
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +485 -0
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +132 -0
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +460 -0
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +659 -0
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +828 -0
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +523 -0
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +615 -0
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +701 -0
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +1400 -0
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +245 -0
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +170 -0
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +680 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs +105 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs +42 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +130 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs +773 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +240 -0
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs +5374 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +87 -0
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +154 -0
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1356 -0
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2263 -0
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +379 -0
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +630 -0
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +527 -0
- package/fesm2022/nanahoshi-mona-ui-list.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +966 -0
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +641 -0
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +536 -0
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +597 -0
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +790 -0
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +83 -0
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +325 -0
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +1559 -0
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1321 -0
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +294 -0
- package/fesm2022/nanahoshi-mona-ui-query.mjs +175 -0
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +339 -0
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +565 -0
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1049 -0
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +636 -0
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +843 -0
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +537 -0
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +308 -0
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +664 -0
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +111 -0
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +369 -0
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +314 -0
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +450 -0
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +723 -0
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +716 -0
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +733 -0
- package/fesm2022/nanahoshi-mona-ui-window.mjs +1329 -0
- package/fesm2022/nanahoshi-mona-ui.mjs +9 -0
- package/package.json +289 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +223 -0
- package/types/nanahoshi-mona-ui-avatar.d.ts +642 -0
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +70 -0
- package/types/nanahoshi-mona-ui-button-group.d.ts +77 -0
- package/types/nanahoshi-mona-ui-button.d.ts +111 -0
- package/types/nanahoshi-mona-ui-calendar.d.ts +262 -0
- package/types/nanahoshi-mona-ui-check-box.d.ts +133 -0
- package/types/nanahoshi-mona-ui-chip.d.ts +130 -0
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +113 -0
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +201 -0
- package/types/nanahoshi-mona-ui-color-palette.d.ts +102 -0
- package/types/nanahoshi-mona-ui-color-picker.d.ts +156 -0
- package/types/nanahoshi-mona-ui-combo-box.d.ts +232 -0
- package/types/nanahoshi-mona-ui-common.d.ts +386 -0
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +129 -0
- package/types/nanahoshi-mona-ui-date-input.d.ts +60 -0
- package/types/nanahoshi-mona-ui-date-picker.d.ts +177 -0
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +199 -0
- package/types/nanahoshi-mona-ui-dialog.d.ts +261 -0
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +159 -0
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +219 -0
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +176 -0
- package/types/nanahoshi-mona-ui-editor.d.ts +113 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +87 -0
- package/types/nanahoshi-mona-ui-fieldset.d.ts +68 -0
- package/types/nanahoshi-mona-ui-filter.d.ts +115 -0
- package/types/nanahoshi-mona-ui-grid.d.ts +1114 -0
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +25 -0
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +28 -0
- package/types/nanahoshi-mona-ui-internal-list.d.ts +269 -0
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +391 -0
- package/types/nanahoshi-mona-ui-internal.d.ts +136 -0
- package/types/nanahoshi-mona-ui-list-box.d.ts +225 -0
- package/types/nanahoshi-mona-ui-list-view.d.ts +188 -0
- package/types/nanahoshi-mona-ui-list.d.ts +1 -0
- package/types/nanahoshi-mona-ui-menubar.d.ts +198 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +247 -0
- package/types/nanahoshi-mona-ui-notification.d.ts +106 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +161 -0
- package/types/nanahoshi-mona-ui-pager.d.ts +238 -0
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -0
- package/types/nanahoshi-mona-ui-popover.d.ts +130 -0
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +412 -0
- package/types/nanahoshi-mona-ui-popup.d.ts +485 -0
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +139 -0
- package/types/nanahoshi-mona-ui-query.d.ts +89 -0
- package/types/nanahoshi-mona-ui-radio-button.d.ts +128 -0
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +166 -0
- package/types/nanahoshi-mona-ui-slider.d.ts +305 -0
- package/types/nanahoshi-mona-ui-split-button.d.ts +182 -0
- package/types/nanahoshi-mona-ui-splitter.d.ts +70 -0
- package/types/nanahoshi-mona-ui-stepper.d.ts +173 -0
- package/types/nanahoshi-mona-ui-switch.d.ts +125 -0
- package/types/nanahoshi-mona-ui-tabs.d.ts +158 -0
- package/types/nanahoshi-mona-ui-text-area.d.ts +42 -0
- package/types/nanahoshi-mona-ui-text-box.d.ts +164 -0
- package/types/nanahoshi-mona-ui-theme.d.ts +23 -0
- package/types/nanahoshi-mona-ui-time-picker.d.ts +184 -0
- package/types/nanahoshi-mona-ui-time-selector.d.ts +143 -0
- package/types/nanahoshi-mona-ui-tooltip.d.ts +130 -0
- package/types/nanahoshi-mona-ui-tree-view.d.ts +274 -0
- package/types/nanahoshi-mona-ui-window.d.ts +295 -0
- package/types/nanahoshi-mona-ui.d.ts +2 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal, TemplateRef } from '@angular/core';
|
|
3
|
+
import { Position, PreventableEvent, SelectionMode } from '@nanahoshi/mona-ui/common';
|
|
4
|
+
import { SelectableOptions, ListKeySelector } from '@nanahoshi/mona-ui/internal/list';
|
|
5
|
+
import { ImmutableList, ImmutableSet } from '@mirei/ts-collections';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
|
+
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
9
|
+
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
10
|
+
import { VariantProps } from 'class-variance-authority';
|
|
11
|
+
|
|
12
|
+
interface ToolbarOptions {
|
|
13
|
+
actions: ToolbarAction[];
|
|
14
|
+
position: Position;
|
|
15
|
+
}
|
|
16
|
+
type ToolbarAction = "clear" | "moveDown" | "moveUp" | "remove" | "transferAllFrom" | "transferAllTo" | "transferFrom" | "transferTo";
|
|
17
|
+
|
|
18
|
+
declare class ListBoxMoveEvent<T = any> extends PreventableEvent {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(action: Extract<ToolbarAction, "moveDown" | "moveUp">, selectedItems: Iterable<T>, selectedIndices: Iterable<number>, oldIndex: number, newIndex: number, originalEvent?: Event);
|
|
21
|
+
get action(): Extract<ToolbarAction, "moveDown" | "moveUp">;
|
|
22
|
+
get newIndex(): number;
|
|
23
|
+
get oldIndex(): number;
|
|
24
|
+
get selectedIndices(): number[];
|
|
25
|
+
get selectedItems(): T[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare class ListBoxRemoveEvent<T = any> extends PreventableEvent {
|
|
29
|
+
#private;
|
|
30
|
+
constructor(selectedItems: Iterable<T>, originalEvent?: Event);
|
|
31
|
+
get action(): Extract<ToolbarAction, "remove">;
|
|
32
|
+
get selectedItems(): T[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type ActionType = Extract<ToolbarAction, "transferAllFrom" | "transferAllTo" | "transferFrom" | "transferTo">;
|
|
36
|
+
declare class ListBoxTransferEvent<T = any> extends PreventableEvent {
|
|
37
|
+
#private;
|
|
38
|
+
constructor(action: ActionType, selectedItems: Iterable<T>, originalEvent?: Event);
|
|
39
|
+
get action(): ActionType;
|
|
40
|
+
get selectedItems(): T[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class ListBoxClearEvent<T = any> extends PreventableEvent {
|
|
44
|
+
#private;
|
|
45
|
+
constructor(selectedItems: Iterable<T>, originalEvent?: Event);
|
|
46
|
+
get action(): Extract<ToolbarAction, "clear">;
|
|
47
|
+
get selectedItems(): T[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
type ListBoxActionEvent<T = any> = ListBoxClearEvent<T> | ListBoxMoveEvent<T> | ListBoxRemoveEvent<T> | ListBoxTransferEvent<T>;
|
|
51
|
+
|
|
52
|
+
interface ListBoxSelectionEvent<T = any> {
|
|
53
|
+
deselectedItems: T[];
|
|
54
|
+
selectedItems: T[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const listBoxBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
58
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
59
|
+
reversed?: boolean | null | undefined;
|
|
60
|
+
rounded?: "small" | "medium" | "large" | "none" | null | undefined;
|
|
61
|
+
size?: "small" | "medium" | "large" | null | undefined;
|
|
62
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
63
|
+
declare const listBoxToolbarThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
64
|
+
direction?: "horizontal" | "vertical" | null | undefined;
|
|
65
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
66
|
+
type ListBoxBaseVariantProps = VariantProps<ReturnType<typeof listBoxBaseThemeVariants>>;
|
|
67
|
+
type ListBoxBaseVariantInputs = Omit<VariantInputs<ListBoxBaseVariantProps>, "direction" | "reversed">;
|
|
68
|
+
type ListBoxToolbarVariantProps = VariantProps<ReturnType<typeof listBoxToolbarThemeVariants>>;
|
|
69
|
+
type ListBoxToolbarVariantInputs = Omit<VariantInputs<ListBoxToolbarVariantProps>, "direction">;
|
|
70
|
+
type ListBoxVariantInputs = ListBoxBaseVariantInputs & ListBoxToolbarVariantInputs;
|
|
71
|
+
|
|
72
|
+
declare class ListBoxComponent<T = unknown, K = unknown> implements ListBoxVariantInputs {
|
|
73
|
+
#private;
|
|
74
|
+
/**
|
|
75
|
+
* The list box (`this` or the connected list box) that currently holds the selection; falling back to `this`
|
|
76
|
+
* when neither side has a selection. Used by actions that make sense to run on `this` even with no selection
|
|
77
|
+
* (e.g., "transfer all"). For actions that require a real selection to proceed, use {@link getSelectedListBox} instead.
|
|
78
|
+
*/
|
|
79
|
+
protected readonly activeListBox: Signal<ListBoxComponent<T, K>>;
|
|
80
|
+
protected readonly baseClasses: Signal<string>;
|
|
81
|
+
protected readonly footerTemplate: Signal<TemplateRef<any> | undefined>;
|
|
82
|
+
protected readonly headerTemplate: Signal<TemplateRef<any> | undefined>;
|
|
83
|
+
protected readonly itemTemplate: Signal<TemplateRef<any> | undefined>;
|
|
84
|
+
protected readonly listHeight: Signal<string>;
|
|
85
|
+
protected readonly listWidth: Signal<string>;
|
|
86
|
+
protected readonly noDataTemplate: Signal<TemplateRef<any> | undefined>;
|
|
87
|
+
protected readonly selectableOptions: Signal<SelectableOptions>;
|
|
88
|
+
protected readonly toolbarClasses: Signal<string>;
|
|
89
|
+
protected readonly toolbarOptions: Signal<ToolbarOptions | null>;
|
|
90
|
+
/**
|
|
91
|
+
* @description Emitted when a toolbar action button is clicked, carrying the action's details.
|
|
92
|
+
*/
|
|
93
|
+
readonly actionClick: _angular_core.OutputEmitterRef<ListBoxActionEvent>;
|
|
94
|
+
/**
|
|
95
|
+
* @description Accessible name for the list box's `listbox` element. Describe what the list represents,
|
|
96
|
+
* which matters in particular when connecting two list boxes.
|
|
97
|
+
* @default ""
|
|
98
|
+
*/
|
|
99
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
100
|
+
/**
|
|
101
|
+
* @description The other list box to transfer items to and from using the toolbar actions.
|
|
102
|
+
* @default null
|
|
103
|
+
*/
|
|
104
|
+
readonly connectedList: _angular_core.InputSignal<ListBoxComponent<T, K> | null>;
|
|
105
|
+
/**
|
|
106
|
+
* @description Sets the height of the component.
|
|
107
|
+
* @default 100%
|
|
108
|
+
*/
|
|
109
|
+
readonly height: _angular_core.InputSignal<string | number>;
|
|
110
|
+
/**
|
|
111
|
+
* @description Collection of items to render.
|
|
112
|
+
* @default []
|
|
113
|
+
*/
|
|
114
|
+
readonly items: _angular_core.InputSignal<Iterable<T>>;
|
|
115
|
+
readonly listBoxItems: _angular_core.WritableSignal<ImmutableList<T>>;
|
|
116
|
+
/**
|
|
117
|
+
* @description Border-radius preset applied to the component.
|
|
118
|
+
* @default medium
|
|
119
|
+
*/
|
|
120
|
+
readonly rounded: _angular_core.InputSignal<"small" | "medium" | "large" | "none" | null | undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* @description Property name or accessor used to derive the key from a data item, used to identify selected items.
|
|
123
|
+
* @default ""
|
|
124
|
+
*/
|
|
125
|
+
readonly selectBy: _angular_core.InputSignal<ListKeySelector<T, K>>;
|
|
126
|
+
/**
|
|
127
|
+
* @description Keys of the currently selected items.
|
|
128
|
+
* @default []
|
|
129
|
+
*/
|
|
130
|
+
readonly selectedKeys: _angular_core.InputSignal<Iterable<K>>;
|
|
131
|
+
/**
|
|
132
|
+
* @description Emitted with the updated keys whenever the selection changes.
|
|
133
|
+
*/
|
|
134
|
+
readonly selectedKeysChange: _angular_core.OutputEmitterRef<K[]>;
|
|
135
|
+
/**
|
|
136
|
+
* @description Emitted with the selected and deselected items whenever the selection changes.
|
|
137
|
+
*/
|
|
138
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<ListBoxSelectionEvent<any>>;
|
|
139
|
+
readonly selectedItems: Signal<ImmutableSet<T>>;
|
|
140
|
+
readonly selectedItems$: Observable<ImmutableSet<T>>;
|
|
141
|
+
/**
|
|
142
|
+
* @description Allows multiple items to be selected simultaneously when set to `"multiple"`.
|
|
143
|
+
* @default single
|
|
144
|
+
*/
|
|
145
|
+
readonly selectionMode: _angular_core.InputSignal<SelectionMode>;
|
|
146
|
+
/**
|
|
147
|
+
* @description Allows an already-selected item to be deselected by clicking it again while `selectionMode`
|
|
148
|
+
* is `"single"`. Has no effect when `selectionMode` is `"multiple"`.
|
|
149
|
+
* @default true
|
|
150
|
+
*/
|
|
151
|
+
readonly singleSelectionToggleable: _angular_core.InputSignal<boolean>;
|
|
152
|
+
/**
|
|
153
|
+
* @description Size preset controlling the component's dimensions.
|
|
154
|
+
* @default medium
|
|
155
|
+
*/
|
|
156
|
+
readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
|
|
157
|
+
/**
|
|
158
|
+
* @description Property name or accessor used to derive the display text from a data item.
|
|
159
|
+
* @default ""
|
|
160
|
+
*/
|
|
161
|
+
readonly textField: _angular_core.InputSignal<ListKeySelector<T, string>>;
|
|
162
|
+
/**
|
|
163
|
+
* @description Shows the action toolbar. Pass `false` to hide it entirely, or an options object to customize
|
|
164
|
+
* which actions are shown and where the toolbar is positioned.
|
|
165
|
+
* @default true
|
|
166
|
+
*/
|
|
167
|
+
readonly toolbar: _angular_core.InputSignal<boolean | Partial<ToolbarOptions>>;
|
|
168
|
+
/**
|
|
169
|
+
* @description Sets the width of the component.
|
|
170
|
+
* @default 100%
|
|
171
|
+
*/
|
|
172
|
+
readonly width: _angular_core.InputSignal<string | number>;
|
|
173
|
+
constructor();
|
|
174
|
+
/**
|
|
175
|
+
* @description Clears the current selection without emitting `selectionChange`. Call {@link notifySelectionChange}
|
|
176
|
+
* afterward if the resulting selection change should be emitted.
|
|
177
|
+
*/
|
|
178
|
+
clearSelections(): void;
|
|
179
|
+
/**
|
|
180
|
+
* @description Emits `selectionChange` for any selection changes made since the last notification
|
|
181
|
+
* (e.g., after programmatically calling {@link clearSelections}).
|
|
182
|
+
*/
|
|
183
|
+
notifySelectionChange(): void;
|
|
184
|
+
protected onClearClick(event: MouseEvent): void;
|
|
185
|
+
protected onMoveClick(direction: Extract<ToolbarAction, "moveDown" | "moveUp">, event: MouseEvent): void;
|
|
186
|
+
protected onRemoveClick(event: MouseEvent): void;
|
|
187
|
+
protected onSelectedKeysChange(keys: K[]): void;
|
|
188
|
+
protected onTransferClick(action: Extract<ToolbarAction, "transferAllFrom" | "transferAllTo" | "transferFrom" | "transferTo">, event: MouseEvent): void;
|
|
189
|
+
private createSelectedChangeNotifier;
|
|
190
|
+
/**
|
|
191
|
+
* The list box (`this` or the connected list box, recursively) that currently has a real selection
|
|
192
|
+
* or `null` if neither side has one. Unlike {@link activeListBox}, this does not fall back to `this`,
|
|
193
|
+
* since move actions need to know an actual selected index to operate on.
|
|
194
|
+
*/
|
|
195
|
+
private getSelectedListBox;
|
|
196
|
+
private getDefaultToolbarOptions;
|
|
197
|
+
private scrollToSelectedItem;
|
|
198
|
+
private setSubscriptions;
|
|
199
|
+
private updateToolbarOptions;
|
|
200
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxComponent<any, any>, never>;
|
|
201
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListBoxComponent<any, any>, "mona-list-box", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "connectedList": { "alias": "connectedList"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selectBy": { "alias": "selectBy"; "required": false; "isSignal": true; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "singleSelectionToggleable": { "alias": "singleSelectionToggleable"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; "selectedKeysChange": "selectedKeysChange"; "selectionChange": "selectionChange"; }, ["footerTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
declare class ListBoxFooterTemplateDirective {
|
|
205
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxFooterTemplateDirective, never>;
|
|
206
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListBoxFooterTemplateDirective, "ng-template[monaListBoxFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
declare class ListBoxHeaderTemplateDirective {
|
|
210
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxHeaderTemplateDirective, never>;
|
|
211
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListBoxHeaderTemplateDirective, "ng-template[monaListBoxHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
declare class ListBoxItemTemplateDirective {
|
|
215
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxItemTemplateDirective, never>;
|
|
216
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListBoxItemTemplateDirective, "ng-template[monaListBoxItemTemplate]", never, {}, {}, never, never, true, never>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
declare class ListBoxNoDataTemplateDirective {
|
|
220
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxNoDataTemplateDirective, never>;
|
|
221
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListBoxNoDataTemplateDirective, "ng-template[monaListBoxNoDataTemplate]", never, {}, {}, never, never, true, never>;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export { ListBoxClearEvent, ListBoxComponent, ListBoxFooterTemplateDirective, ListBoxHeaderTemplateDirective, ListBoxItemTemplateDirective, ListBoxMoveEvent, ListBoxNoDataTemplateDirective, ListBoxRemoveEvent, ListBoxTransferEvent };
|
|
225
|
+
export type { ListBoxActionEvent, ListBoxSelectionEvent, ToolbarAction, ToolbarOptions };
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { ListService, ListKeySelector, GroupableOptions, NavigableOptions, PagerSettings, SelectableOptions } from '@nanahoshi/mona-ui/internal/list';
|
|
4
|
+
export { NavigableOptions } from '@nanahoshi/mona-ui/internal/list';
|
|
5
|
+
import { PageChangeEvent, PageSizeChangeEvent } from '@nanahoshi/mona-ui/pager';
|
|
6
|
+
import { ImmutableSet } from '@mirei/ts-collections';
|
|
7
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
|
+
import { VariantProps } from 'class-variance-authority';
|
|
9
|
+
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
10
|
+
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
11
|
+
import { VirtualScrollOptions } from '@nanahoshi/mona-ui/common';
|
|
12
|
+
|
|
13
|
+
declare const listViewBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
14
|
+
rounded?: "small" | "medium" | "large" | "none" | null | undefined;
|
|
15
|
+
size?: "small" | "medium" | "large" | null | undefined;
|
|
16
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
|
+
type ListViewBaseVariantProps = VariantProps<ReturnType<typeof listViewBaseThemeVariants>>;
|
|
18
|
+
type ListViewBaseVariantInputs = VariantInputs<ListViewBaseVariantProps>;
|
|
19
|
+
type ListViewVariantInputs = ListViewBaseVariantInputs;
|
|
20
|
+
|
|
21
|
+
declare class ListViewComponent<T = unknown> implements ListViewVariantInputs {
|
|
22
|
+
#private;
|
|
23
|
+
protected readonly baseClasses: _angular_core.Signal<string>;
|
|
24
|
+
protected readonly footerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
25
|
+
protected readonly groupHeaderTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
26
|
+
protected readonly headerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
27
|
+
protected readonly itemCount: _angular_core.Signal<number>;
|
|
28
|
+
protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
29
|
+
protected readonly listHeight: _angular_core.Signal<string>;
|
|
30
|
+
protected readonly listItems: _angular_core.Signal<ImmutableSet<T>>;
|
|
31
|
+
protected readonly listMaxHeight: _angular_core.Signal<string>;
|
|
32
|
+
protected readonly listMaxWidth: _angular_core.Signal<string>;
|
|
33
|
+
protected readonly listService: ListService<T>;
|
|
34
|
+
protected readonly listWidth: _angular_core.Signal<string>;
|
|
35
|
+
protected readonly noDataTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
36
|
+
protected readonly viewItems: _angular_core.Signal<ImmutableSet<T>>;
|
|
37
|
+
/**
|
|
38
|
+
* @description Accessible name for the list view's `listbox` element. Describe what the list represents.
|
|
39
|
+
* @default ""
|
|
40
|
+
*/
|
|
41
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
42
|
+
/**
|
|
43
|
+
* @description Sets the height of the list view.
|
|
44
|
+
* @default 100%
|
|
45
|
+
*/
|
|
46
|
+
readonly height: _angular_core.InputSignal<string | number>;
|
|
47
|
+
/**
|
|
48
|
+
* @description Sets the classes of the inner UL element.
|
|
49
|
+
* @default ""
|
|
50
|
+
*/
|
|
51
|
+
readonly listClass: _angular_core.InputSignal<string>;
|
|
52
|
+
/**
|
|
53
|
+
* @description Sets the classes of the list items.
|
|
54
|
+
* @default ""
|
|
55
|
+
*/
|
|
56
|
+
readonly listItemClass: _angular_core.InputSignal<string>;
|
|
57
|
+
/**
|
|
58
|
+
* @description Sets the style of the list items.
|
|
59
|
+
* @default {}
|
|
60
|
+
*/
|
|
61
|
+
readonly listItemStyle: _angular_core.InputSignal<Partial<CSSStyleDeclaration>>;
|
|
62
|
+
/**
|
|
63
|
+
* @description Sets the style of the list.
|
|
64
|
+
* @default {}
|
|
65
|
+
*/
|
|
66
|
+
readonly listStyle: _angular_core.InputSignal<Partial<CSSStyleDeclaration>>;
|
|
67
|
+
/**
|
|
68
|
+
* @description Collection of items to render.
|
|
69
|
+
* @default []
|
|
70
|
+
*/
|
|
71
|
+
readonly items: _angular_core.InputSignal<Iterable<T>>;
|
|
72
|
+
/**
|
|
73
|
+
* @description Sets the maximum height of the list.
|
|
74
|
+
* @default ""
|
|
75
|
+
*/
|
|
76
|
+
readonly maxHeight: _angular_core.InputSignal<string | number>;
|
|
77
|
+
/**
|
|
78
|
+
* @description Sets the maximum width of the list.
|
|
79
|
+
* @default ""
|
|
80
|
+
*/
|
|
81
|
+
readonly maxWidth: _angular_core.InputSignal<string | number>;
|
|
82
|
+
/**
|
|
83
|
+
* @description Border-radius preset applied to the component.
|
|
84
|
+
* @default medium
|
|
85
|
+
*/
|
|
86
|
+
readonly rounded: _angular_core.InputSignal<"small" | "medium" | "large" | "none" | null | undefined>;
|
|
87
|
+
/**
|
|
88
|
+
* @description Emitted when the list is scrolled to the bottom.
|
|
89
|
+
*/
|
|
90
|
+
readonly scrollBottom: _angular_core.OutputEmitterRef<Event>;
|
|
91
|
+
/**
|
|
92
|
+
* @description Size preset controlling the component's dimensions.
|
|
93
|
+
* @default medium
|
|
94
|
+
*/
|
|
95
|
+
readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
|
|
96
|
+
/**
|
|
97
|
+
* @description Property name or accessor used to derive the display text from a data item.
|
|
98
|
+
* @default ""
|
|
99
|
+
*/
|
|
100
|
+
readonly textField: _angular_core.InputSignal<ListKeySelector<T, string> | undefined>;
|
|
101
|
+
/**
|
|
102
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
103
|
+
* @default ""
|
|
104
|
+
*/
|
|
105
|
+
readonly userClass: _angular_core.InputSignal<string>;
|
|
106
|
+
/**
|
|
107
|
+
* @description Sets the width of the list view.
|
|
108
|
+
* @default 100%
|
|
109
|
+
*/
|
|
110
|
+
readonly width: _angular_core.InputSignal<string | number>;
|
|
111
|
+
constructor();
|
|
112
|
+
protected onPageChange(event: PageChangeEvent): void;
|
|
113
|
+
protected onPageSizeChange(event: PageSizeChangeEvent): void;
|
|
114
|
+
private setScrollBottomEvent;
|
|
115
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewComponent<any>, never>;
|
|
116
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListViewComponent<any>, "mona-list-view", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "listClass": { "alias": "listClass"; "required": false; "isSignal": true; }; "listItemClass": { "alias": "listItemClass"; "required": false; "isSignal": true; }; "listItemStyle": { "alias": "listItemStyle"; "required": false; "isSignal": true; }; "listStyle": { "alias": "listStyle"; "required": false; "isSignal": true; }; "items": { "alias": "items"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "scrollBottom": "scrollBottom"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate"], never, true, never>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare class ListViewFooterTemplateDirective {
|
|
120
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewFooterTemplateDirective, never>;
|
|
121
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewFooterTemplateDirective, "ng-template[monaListViewFooterTemplate]", never, {}, {}, never, never, true, never>;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare class ListViewGroupHeaderTemplateDirective {
|
|
125
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewGroupHeaderTemplateDirective, never>;
|
|
126
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewGroupHeaderTemplateDirective, "ng-template[monaListViewGroupHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
declare class ListViewGroupableDirective<T, K = T> {
|
|
130
|
+
#private;
|
|
131
|
+
groupBy: _angular_core.InputSignal<ListKeySelector<T, K> | undefined>;
|
|
132
|
+
options: _angular_core.InputSignal<"" | GroupableOptions<T, K>>;
|
|
133
|
+
constructor();
|
|
134
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewGroupableDirective<any, any>, never>;
|
|
135
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewGroupableDirective<any, any>, "mona-list-view[monaListViewGroupable]", never, { "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "options": { "alias": "monaListViewGroupable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare class ListViewHeaderTemplateDirective {
|
|
139
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewHeaderTemplateDirective, never>;
|
|
140
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewHeaderTemplateDirective, "ng-template[monaListViewHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare class ListViewItemTemplateDirective {
|
|
144
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewItemTemplateDirective, never>;
|
|
145
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewItemTemplateDirective, "ng-template[monaListViewItemTemplate]", never, {}, {}, never, never, true, never>;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare class ListViewNavigableDirective<T> {
|
|
149
|
+
#private;
|
|
150
|
+
options: _angular_core.InputSignal<"" | Partial<NavigableOptions>>;
|
|
151
|
+
constructor();
|
|
152
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewNavigableDirective<any>, never>;
|
|
153
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewNavigableDirective<any>, "mona-list-view[monaListViewNavigable]", never, { "options": { "alias": "monaListViewNavigable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare class ListViewNoDataTemplateDirective {
|
|
157
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewNoDataTemplateDirective, never>;
|
|
158
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewNoDataTemplateDirective, "ng-template[monaListViewNoDataTemplate]", never, {}, {}, never, never, true, never>;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
declare class ListViewPageableDirective {
|
|
162
|
+
#private;
|
|
163
|
+
options: _angular_core.InputSignal<"" | Partial<PagerSettings>>;
|
|
164
|
+
constructor();
|
|
165
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewPageableDirective, never>;
|
|
166
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewPageableDirective, "mona-list-view[monaListViewPageable]", never, { "options": { "alias": "monaListViewPageable"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare class ListViewSelectableDirective<T, K = unknown> {
|
|
170
|
+
#private;
|
|
171
|
+
readonly selectedKeysChange: _angular_core.OutputEmitterRef<K[]>;
|
|
172
|
+
options: _angular_core.InputSignal<"" | Partial<SelectableOptions>>;
|
|
173
|
+
selectBy: _angular_core.InputSignal<ListKeySelector<T, K> | undefined>;
|
|
174
|
+
selectedKeys: _angular_core.InputSignal<Iterable<K>>;
|
|
175
|
+
constructor();
|
|
176
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewSelectableDirective<any, any>, never>;
|
|
177
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewSelectableDirective<any, any>, "mona-list-view[monaListViewSelectable]", never, { "options": { "alias": "monaListViewSelectable"; "required": false; "isSignal": true; }; "selectBy": { "alias": "selectBy"; "required": false; "isSignal": true; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; "isSignal": true; }; }, { "selectedKeysChange": "selectedKeysChange"; }, never, never, true, never>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare class ListViewVirtualScrollDirective<T> {
|
|
181
|
+
#private;
|
|
182
|
+
options: _angular_core.InputSignal<VirtualScrollOptions>;
|
|
183
|
+
constructor();
|
|
184
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListViewVirtualScrollDirective<any>, never>;
|
|
185
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListViewVirtualScrollDirective<any>, "mona-list-view[monaListViewVirtualScroll]", never, { "options": { "alias": "monaListViewVirtualScroll"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export { ListViewComponent, ListViewFooterTemplateDirective, ListViewGroupHeaderTemplateDirective, ListViewGroupableDirective, ListViewHeaderTemplateDirective, ListViewItemTemplateDirective, ListViewNavigableDirective, ListViewNoDataTemplateDirective, ListViewPageableDirective, ListViewSelectableDirective, ListViewVirtualScrollDirective };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GroupableOptions, ListKeySelector, ListSizeInputType, SelectableOptions, SelectionChangeEvent } from '@nanahoshi/mona-ui/internal/list';
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import * as _nanahoshi_mona_ui_popup_menu from '@nanahoshi/mona-ui/popup-menu';
|
|
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 i0 from '@angular/core';
|
|
4
|
+
import { TemplateRef } from '@angular/core';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
|
+
import { VariantProps } from 'class-variance-authority';
|
|
8
|
+
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
9
|
+
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
10
|
+
|
|
11
|
+
type MenuItemClickEvent = PopupMenuItemClickEvent;
|
|
12
|
+
|
|
13
|
+
declare class MenuComponent {
|
|
14
|
+
private readonly menuItemComponents;
|
|
15
|
+
/**
|
|
16
|
+
* @description Sets the menu as disabled.
|
|
17
|
+
*/
|
|
18
|
+
readonly disabled: i0.InputSignal<boolean>;
|
|
19
|
+
readonly iconTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* @description Sets the items of the menu.
|
|
22
|
+
* If provided, it will override the menu items defined by the menu item components.
|
|
23
|
+
*/
|
|
24
|
+
readonly items: i0.InputSignal<Iterable<MenuItem>>;
|
|
25
|
+
readonly menuItems: i0.Signal<_nanahoshi_mona_ui_popup_menu.PopupMenuItem[]>;
|
|
26
|
+
readonly textTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
27
|
+
/**
|
|
28
|
+
* @description The text of the menu.
|
|
29
|
+
*/
|
|
30
|
+
readonly text: i0.InputSignal<string>;
|
|
31
|
+
readonly uid: string;
|
|
32
|
+
popupMenu: PopupMenuComponent | null;
|
|
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>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare class MenuCheckboxItemComponent extends PopupMenuCheckboxItemComponent {
|
|
38
|
+
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
39
|
+
constructor();
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuCheckboxItemComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuCheckboxItemComponent, "mona-menu-checkbox-item", never, {}, {}, never, never, true, never>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare class MenuGroupComponent extends PopupMenuGroupComponent {
|
|
45
|
+
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
46
|
+
constructor();
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuGroupComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuGroupComponent, "mona-menu-group", never, {}, {}, never, never, true, never>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare class MenuItemComponent extends PopupMenuItemComponent {
|
|
52
|
+
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
53
|
+
constructor();
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemComponent, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuItemComponent, "mona-menu-item", never, {}, {}, never, never, true, never>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare class MenuRadioGroupComponent extends PopupMenuRadioGroupComponent {
|
|
59
|
+
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
60
|
+
constructor();
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuRadioGroupComponent, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuRadioGroupComponent, "mona-menu-radio-group", never, {}, {}, never, never, true, never>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
declare class MenuRadioItemComponent extends PopupMenuRadioItemComponent {
|
|
66
|
+
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
67
|
+
constructor();
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuRadioItemComponent, never>;
|
|
69
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuRadioItemComponent, "mona-menu-radio-item", never, {}, {}, never, never, true, never>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare class MenuSeparatorComponent extends PopupMenuSeparatorComponent {
|
|
73
|
+
readonly origin = PopupMenuOrigin.MenubarMenu;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuSeparatorComponent, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuSeparatorComponent, "mona-menu-separator", never, {}, {}, never, never, true, never>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare const menubarBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
79
|
+
rounded?: "small" | "medium" | "large" | "none" | null | undefined;
|
|
80
|
+
size?: "small" | "medium" | "large" | null | undefined;
|
|
81
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
82
|
+
declare const menubarListItemThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
83
|
+
rounded?: "small" | "medium" | "large" | "none" | null | undefined;
|
|
84
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
85
|
+
declare const menubarListThemeVariants: (theme: ThemeStyle) => (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
86
|
+
type MenubarBaseVariantProps = VariantProps<ReturnType<typeof menubarBaseThemeVariants>>;
|
|
87
|
+
type MenubarListItemVariants = VariantProps<ReturnType<typeof menubarListItemThemeVariants>>;
|
|
88
|
+
type MenubarListVariants = VariantProps<ReturnType<typeof menubarListThemeVariants>>;
|
|
89
|
+
type MenubarVariantProps = MenubarBaseVariantProps & MenubarListItemVariants & MenubarListVariants;
|
|
90
|
+
type MenubarVariantInput = VariantInputs<MenubarVariantProps>;
|
|
91
|
+
|
|
92
|
+
declare class MenubarComponent implements MenubarVariantInput {
|
|
93
|
+
#private;
|
|
94
|
+
protected readonly activeIndex: i0.WritableSignal<number>;
|
|
95
|
+
protected readonly baseClasses: i0.Signal<string>;
|
|
96
|
+
protected readonly currentPopupElement: i0.WritableSignal<HTMLElement | null>;
|
|
97
|
+
protected readonly currentPopupMenu: i0.WritableSignal<PopupMenuComponent | null>;
|
|
98
|
+
protected readonly groupTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
99
|
+
protected readonly iconTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
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
|
+
protected readonly navigate$: Subject<PopupMenuNavigationEvent>;
|
|
107
|
+
protected readonly popupMenuComponents: i0.Signal<readonly PopupMenuComponent[]>;
|
|
108
|
+
protected readonly textTemplate: i0.Signal<TemplateRef<any> | undefined>;
|
|
109
|
+
/**
|
|
110
|
+
* @description ARIA label for the menubar.
|
|
111
|
+
*/
|
|
112
|
+
readonly ariaLabel: i0.InputSignal<string>;
|
|
113
|
+
/**
|
|
114
|
+
* @description ARIA labelledby for the menubar.
|
|
115
|
+
*/
|
|
116
|
+
readonly ariaLabelledby: i0.InputSignal<string>;
|
|
117
|
+
/**
|
|
118
|
+
* @description Sets the disabled state of menubar.
|
|
119
|
+
*/
|
|
120
|
+
readonly disabled: i0.InputSignal<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* @description Emits when a menu item is clicked.
|
|
123
|
+
*/
|
|
124
|
+
readonly menuItemClick: i0.OutputEmitterRef<_nanahoshi_mona_ui_popup_menu.PopupMenuItemClickEvent>;
|
|
125
|
+
/**
|
|
126
|
+
* @description Sets the size of the menubar.
|
|
127
|
+
*/
|
|
128
|
+
readonly size: i0.InputSignal<"small" | "medium" | "large" | null | undefined>;
|
|
129
|
+
/**
|
|
130
|
+
* @description Sets the rounded style of the menubar.
|
|
131
|
+
*/
|
|
132
|
+
readonly rounded: i0.InputSignal<"small" | "medium" | "large" | "none" | null | undefined>;
|
|
133
|
+
/**
|
|
134
|
+
* @description Additional CSS classes to apply to the menubar, merged with the computed theme classes.
|
|
135
|
+
*/
|
|
136
|
+
readonly userClasses: i0.InputSignal<string>;
|
|
137
|
+
constructor();
|
|
138
|
+
protected onMenuBlur(event: FocusEvent): void;
|
|
139
|
+
protected onMenuClick(event: MouseEvent, item: MenuComponent): void;
|
|
140
|
+
protected onMenuFocus(index: number): void;
|
|
141
|
+
protected onMenuItemClick(event: MenuItemClickEvent): void;
|
|
142
|
+
protected onMenuKeyDown(event: KeyboardEvent, item: MenuComponent, popupMenu: PopupMenuComponent): void;
|
|
143
|
+
protected onMenuPointerEnter(item: MenuComponent, element: HTMLLIElement, popupMenu: PopupMenuComponent): void;
|
|
144
|
+
protected onPopupMenuClose(): void;
|
|
145
|
+
protected onPopupMenuOpen(popupMenu: PopupMenuComponent, element: HTMLLIElement): void;
|
|
146
|
+
private closeCurrentMenu;
|
|
147
|
+
private findCurrentMenuIndex;
|
|
148
|
+
private findMenuElementByUid;
|
|
149
|
+
private findNextNonDisabledMenuIndex;
|
|
150
|
+
private findPreviousNonDisabledMenuIndex;
|
|
151
|
+
private focusMenuAt;
|
|
152
|
+
private moveToFirstMenu;
|
|
153
|
+
private moveToLastMenu;
|
|
154
|
+
private moveToNextMenu;
|
|
155
|
+
private moveToPreviousMenu;
|
|
156
|
+
private setNavigationSubscription;
|
|
157
|
+
private setSubscriptions;
|
|
158
|
+
private updateCurrentMenuData;
|
|
159
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenubarComponent, never>;
|
|
160
|
+
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; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "userClasses": { "alias": "class"; "required": false; "isSignal": true; }; }, { "menuItemClick": "menuItemClick"; }, ["groupTemplate", "iconTemplate", "menuItemIconTemplate", "menuItemShortcutTemplate", "menuItemTextTemplate", "menuList", "textTemplate"], never, true, never>;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare class MenuGroupTemplateDirective extends PopupMenuGroupTemplateDirective {
|
|
164
|
+
readonly origin = PopupMenuTemplateOrigin.MenubarMenu;
|
|
165
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuGroupTemplateDirective, never>;
|
|
166
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuGroupTemplateDirective, "ng-template[monaMenuGroupTemplate]", never, {}, {}, never, never, true, never>;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare class MenuIconTemplateDirective {
|
|
170
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuIconTemplateDirective, never>;
|
|
171
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuIconTemplateDirective, "ng-template[monaMenuIconTemplate]", never, {}, {}, never, never, true, never>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
declare class MenuItemIconTemplateDirective extends PopupMenuIconTemplateDirective {
|
|
175
|
+
readonly origin = PopupMenuTemplateOrigin.MenubarMenu;
|
|
176
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemIconTemplateDirective, never>;
|
|
177
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuItemIconTemplateDirective, "ng-template[monaMenuItemIconTemplate]", never, {}, {}, never, never, true, never>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare class MenuItemShortcutTemplateDirective extends PopupMenuShortcutTemplateDirective {
|
|
181
|
+
readonly origin = PopupMenuTemplateOrigin.MenubarMenu;
|
|
182
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemShortcutTemplateDirective, never>;
|
|
183
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuItemShortcutTemplateDirective, "ng-template[monaMenuItemShortcutTemplate]", never, {}, {}, never, never, true, never>;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
declare class MenuItemTextTemplateDirective extends PopupMenuTextTemplateDirective {
|
|
187
|
+
readonly origin = PopupMenuTemplateOrigin.MenubarMenu;
|
|
188
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuItemTextTemplateDirective, never>;
|
|
189
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuItemTextTemplateDirective, "ng-template[monaMenuItemTextTemplate]", never, {}, {}, never, never, true, never>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
declare class MenuTextTemplateDirective {
|
|
193
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuTextTemplateDirective, never>;
|
|
194
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MenuTextTemplateDirective, "ng-template[monaMenuTextTemplate]", never, {}, {}, never, never, true, never>;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export { MenuCheckboxItemComponent, MenuComponent, MenuGroupComponent, MenuGroupTemplateDirective, MenuIconTemplateDirective, MenuItemComponent, MenuItemIconTemplateDirective, MenuItemShortcutTemplateDirective, MenuItemTextTemplateDirective, MenuRadioGroupComponent, MenuRadioItemComponent, MenuSeparatorComponent, MenuTextTemplateDirective, MenubarComponent };
|
|
198
|
+
export type { MenuItemClickEvent };
|