@nanahoshi/mona-ui 0.1.0 → 0.2.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/auto-complete/package.json +4 -0
- package/avatar/package.json +4 -0
- package/breadcrumb/package.json +4 -0
- package/button/package.json +4 -0
- package/button-group/package.json +4 -0
- package/calendar/package.json +4 -0
- package/check-box/package.json +4 -0
- package/chip/package.json +4 -0
- package/circular-progress-bar/package.json +4 -0
- package/color-gradient/package.json +4 -0
- package/color-palette/package.json +4 -0
- package/color-picker/package.json +4 -0
- package/combo-box/package.json +4 -0
- package/common/package.json +4 -0
- package/contextmenu/package.json +4 -0
- package/date-input/package.json +4 -0
- package/date-picker/package.json +4 -0
- package/datetime-picker/package.json +4 -0
- package/dialog/package.json +4 -0
- package/dropdown-button/package.json +4 -0
- package/dropdown-list/package.json +4 -0
- package/dropdowns/package.json +4 -0
- package/editor/package.json +4 -0
- package/expansion-panel/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +40 -55
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +24 -58
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -48
- package/fesm2022/nanahoshi-mona-ui-button.mjs +130 -129
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +69 -165
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +81 -128
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +102 -112
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +11 -25
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +41 -92
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +27 -49
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +64 -65
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +39 -61
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +12 -15
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +44 -33
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +58 -60
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +52 -165
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +36 -59
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +56 -61
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +302 -81
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +33 -84
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +12 -45
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +18 -48
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +14 -14
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs +121 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +26 -55
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs +231 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +167 -451
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +57 -87
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -139
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +10 -32
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +8 -21
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +50 -156
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +40 -69
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +32 -116
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +81 -107
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +33 -85
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +12 -34
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +31 -52
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +38 -110
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +21 -62
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +66 -111
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +60 -151
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +117 -173
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +32 -45
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +29 -64
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +38 -101
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +58 -79
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +42 -118
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +29 -37
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +60 -81
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +45 -39
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +45 -109
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +54 -82
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-window.mjs +35 -115
- package/fieldset/package.json +4 -0
- package/filter/package.json +4 -0
- package/grid/package.json +4 -0
- package/internal/filter-input/package.json +4 -0
- package/internal/indicator-icon/package.json +4 -0
- package/internal/list/package.json +4 -0
- package/internal/package.json +4 -0
- package/internal/tree/package.json +4 -0
- package/list/package.json +4 -0
- package/list-box/package.json +4 -0
- package/list-view/package.json +4 -0
- package/menubar/package.json +4 -0
- package/multi-select/package.json +4 -0
- package/notification/package.json +4 -0
- package/numeric-text-box/package.json +4 -0
- package/package.json +31 -5
- package/pager/package.json +4 -0
- package/placeholder/package.json +4 -0
- package/popover/package.json +4 -0
- package/popup/package.json +4 -0
- package/popup-menu/package.json +4 -0
- package/progress-bar/package.json +4 -0
- package/query/package.json +4 -0
- package/radio-button/package.json +4 -0
- package/scroll-view/package.json +4 -0
- package/slider/package.json +4 -0
- package/split-button/package.json +4 -0
- package/splitter/package.json +4 -0
- package/stepper/package.json +4 -0
- package/switch/package.json +4 -0
- package/tabs/package.json +4 -0
- package/text-area/package.json +4 -0
- package/text-box/package.json +4 -0
- package/theme/package.json +4 -0
- package/time-picker/package.json +4 -0
- package/time-selector/package.json +4 -0
- package/tooltip/package.json +4 -0
- package/tree-view/package.json +4 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
- package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
- package/types/nanahoshi-mona-ui-button.d.ts +6 -6
- package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
- package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
- package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
- package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
- package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -8
- package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
- package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-dialog.d.ts +7 -8
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
- package/types/nanahoshi-mona-ui-editor.d.ts +17 -17
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
- package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
- package/types/nanahoshi-mona-ui-filter.d.ts +3 -4
- package/types/nanahoshi-mona-ui-grid.d.ts +16 -17
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +16 -16
- package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
- package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
- package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
- package/types/nanahoshi-mona-ui-menubar.d.ts +7 -8
- package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
- package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
- package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
- package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
- package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
- package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
- package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
- package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
- package/types/nanahoshi-mona-ui-stepper.d.ts +13 -14
- package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
- package/types/nanahoshi-mona-ui-tabs.d.ts +15 -17
- package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
- package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
- package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
- package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
- package/types/nanahoshi-mona-ui-window.d.ts +16 -17
- package/window/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +0 -130
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +0 -240
|
@@ -5,7 +5,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
5
5
|
import { LucideChevronDown } from '@lucide/angular';
|
|
6
6
|
import { ButtonDirective } from '@nanahoshi/mona-ui/button';
|
|
7
7
|
import { PopupMenuGroupTemplateDirective, PopupMenuTemplateOrigin, PopupMenuGroupTemplateToken, PopupMenuIconTemplateDirective, PopupMenuIconTemplateToken, PopupMenuShortcutTemplateDirective, PopupMenuShortcutTemplateToken, PopupMenuTextTemplateDirective, PopupMenuTextTemplateToken, PopupMenuToken, PopupMenuComponent, PopupMenuItemType, PopupMenuTemplateType, ensurePopupComponentTypes, PopupMenuOrigin, ensurePopupTemplateTypes, PopupMenuCheckboxItemComponent, PopupMenuGroupComponent, PopupMenuItemComponent, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuRadioItemToken, PopupMenuSeparatorComponent } from '@nanahoshi/mona-ui/popup-menu';
|
|
8
|
-
import { ThemeService } from '@nanahoshi/mona-ui/theme';
|
|
9
8
|
import { createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
10
9
|
import { fromEvent } from 'rxjs';
|
|
11
10
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -137,10 +136,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
137
136
|
}]
|
|
138
137
|
}] });
|
|
139
138
|
|
|
140
|
-
const
|
|
141
|
-
inline-flex flex-nowrap items-center
|
|
142
|
-
[&>button]:focus-visible:z-10
|
|
143
|
-
[&_svg]:
|
|
139
|
+
const splitButtonThemeVariants = cva(`
|
|
140
|
+
inline-flex flex-nowrap items-center
|
|
141
|
+
[&>button]:focus-visible:z-10
|
|
142
|
+
[&_svg]:h-5 [&_svg]:w-5
|
|
144
143
|
`, {
|
|
145
144
|
variants: {
|
|
146
145
|
look: {
|
|
@@ -148,46 +147,46 @@ const splitButtonVariants = cva(`
|
|
|
148
147
|
error: "",
|
|
149
148
|
ghost: "border-transparent",
|
|
150
149
|
info: "",
|
|
151
|
-
outline: "[&>button:not(:last-child)]:border-r",
|
|
150
|
+
outline: "[&>button:not(:last-child)]:border-r [&>button:not(:last-child)]:border-input-border",
|
|
152
151
|
primary: "",
|
|
153
152
|
secondary: "",
|
|
154
153
|
success: "",
|
|
155
154
|
warning: ""
|
|
156
155
|
},
|
|
157
156
|
rounded: {
|
|
158
|
-
full: `
|
|
159
|
-
rounded-full
|
|
160
|
-
[&>button]:first:rounded-tl-full [&>button]:first:rounded-bl-full
|
|
161
|
-
[&>button]:last:rounded-tr-full [&>button]:last:rounded-br-full
|
|
157
|
+
full: `
|
|
158
|
+
rounded-full
|
|
159
|
+
[&>button]:first:rounded-tl-full [&>button]:first:rounded-bl-full
|
|
160
|
+
[&>button]:last:rounded-tr-full [&>button]:last:rounded-br-full
|
|
162
161
|
`,
|
|
163
|
-
large: `
|
|
164
|
-
rounded-lg
|
|
165
|
-
[&>button]:first:rounded-tl-lg [&>button]:first:rounded-bl-lg
|
|
166
|
-
[&>button]:last:rounded-tr-lg [&>button]:last:rounded-br-lg
|
|
162
|
+
large: `
|
|
163
|
+
rounded-lg
|
|
164
|
+
[&>button]:first:rounded-tl-lg [&>button]:first:rounded-bl-lg
|
|
165
|
+
[&>button]:last:rounded-tr-lg [&>button]:last:rounded-br-lg
|
|
167
166
|
`,
|
|
168
|
-
medium: `
|
|
169
|
-
rounded-md
|
|
170
|
-
[&>button]:first:rounded-tl-md [&>button]:first:rounded-bl-md
|
|
171
|
-
[&>button]:last:rounded-tr-md [&>button]:last:rounded-br-md
|
|
167
|
+
medium: `
|
|
168
|
+
rounded-md
|
|
169
|
+
[&>button]:first:rounded-tl-md [&>button]:first:rounded-bl-md
|
|
170
|
+
[&>button]:last:rounded-tr-md [&>button]:last:rounded-br-md
|
|
172
171
|
`,
|
|
173
|
-
none: `
|
|
174
|
-
rounded-none
|
|
172
|
+
none: `
|
|
173
|
+
rounded-none
|
|
175
174
|
`,
|
|
176
|
-
small: `
|
|
177
|
-
rounded-sm
|
|
178
|
-
[&>button]:first:rounded-tl-sm [&>button]:first:rounded-bl-sm
|
|
179
|
-
[&>button]:last:rounded-tr-sm [&>button]:last:rounded-br-sm
|
|
175
|
+
small: `
|
|
176
|
+
rounded-sm
|
|
177
|
+
[&>button]:first:rounded-tl-sm [&>button]:first:rounded-bl-sm
|
|
178
|
+
[&>button]:last:rounded-tr-sm [&>button]:last:rounded-br-sm
|
|
180
179
|
`
|
|
181
180
|
},
|
|
182
181
|
size: {
|
|
183
|
-
large: `
|
|
184
|
-
[&_svg]:
|
|
182
|
+
large: `
|
|
183
|
+
[&_svg]:h-5 [&_svg]:w-5
|
|
185
184
|
`,
|
|
186
|
-
medium: `
|
|
187
|
-
[&_svg]:
|
|
185
|
+
medium: `
|
|
186
|
+
[&_svg]:h-5 [&_svg]:w-5
|
|
188
187
|
`,
|
|
189
|
-
small: `
|
|
190
|
-
[&_svg]:
|
|
188
|
+
small: `
|
|
189
|
+
[&_svg]:h-4 [&_svg]:w-4
|
|
191
190
|
`
|
|
192
191
|
}
|
|
193
192
|
},
|
|
@@ -198,32 +197,20 @@ const splitButtonVariants = cva(`
|
|
|
198
197
|
}
|
|
199
198
|
});
|
|
200
199
|
|
|
201
|
-
const splitButtonThemeVariants = (theme) => {
|
|
202
|
-
switch (theme) {
|
|
203
|
-
case "mona":
|
|
204
|
-
return splitButtonVariants;
|
|
205
|
-
default:
|
|
206
|
-
return splitButtonVariants; // Default to Mona styles
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
|
|
210
200
|
class SplitButtonComponent {
|
|
211
201
|
#destroyRef;
|
|
212
|
-
#themeService;
|
|
213
202
|
constructor() {
|
|
214
203
|
this.#destroyRef = inject(DestroyRef);
|
|
215
|
-
this.#themeService = inject(ThemeService);
|
|
216
204
|
this.menuItemComponents = contentChildren(PopupMenuToken, { ...(ngDevMode ? { debugName: "menuItemComponents" } : /* istanbul ignore next */ {}), descendants: false });
|
|
217
205
|
this.menuButtonRef = viewChild("menuButton", /* @ts-ignore */
|
|
218
206
|
...(ngDevMode ? [{ debugName: "menuButtonRef" }] : /* istanbul ignore next */ []));
|
|
219
207
|
this.popupMenuRef = viewChild("popupMenu", /* @ts-ignore */
|
|
220
208
|
...(ngDevMode ? [{ debugName: "popupMenuRef" }] : /* istanbul ignore next */ []));
|
|
221
209
|
this.classes = computed(() => {
|
|
222
|
-
const theme = this.#themeService.theme();
|
|
223
210
|
const look = this.look();
|
|
224
211
|
const rounded = this.rounded();
|
|
225
212
|
const size = this.size();
|
|
226
|
-
const classes = splitButtonThemeVariants(
|
|
213
|
+
const classes = splitButtonThemeVariants({
|
|
227
214
|
look,
|
|
228
215
|
rounded,
|
|
229
216
|
size
|
|
@@ -384,7 +371,7 @@ class SplitButtonComponent {
|
|
|
384
371
|
});
|
|
385
372
|
}
|
|
386
373
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
387
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitButtonComponent, isStandalone: true, selector: "mona-split-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, menuButtonAriaLabel: { classPropertyName: "menuButtonAriaLabel", publicName: "menuButtonAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick", menuItemClick: "menuItemClick" }, host: { properties: { "class": "classes()" } }, queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: SplitButtonMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: SplitButtonMenuItemIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "mainButtonTextTemplate", first: true, predicate: SplitButtonTextTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "menuButtonTemplate", first: true, predicate: SplitButtonMenuButtonTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "shortcutTemplate", first: true, predicate: SplitButtonMenuItemShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: SplitButtonMenuItemTextTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "menuButtonRef", first: true, predicate: ["menuButton"], descendants: true, isSignal: true }, { propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\
|
|
374
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitButtonComponent, isStandalone: true, selector: "mona-split-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, menuButtonAriaLabel: { classPropertyName: "menuButtonAriaLabel", publicName: "menuButtonAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick", menuItemClick: "menuItemClick" }, host: { properties: { "class": "classes()" } }, queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: SplitButtonMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: SplitButtonMenuItemIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "mainButtonTextTemplate", first: true, predicate: SplitButtonTextTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "menuButtonTemplate", first: true, predicate: SplitButtonMenuButtonTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "shortcutTemplate", first: true, predicate: SplitButtonMenuItemShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: SplitButtonMenuItemTextTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "menuButtonRef", first: true, predicate: ["menuButton"], descendants: true, isSignal: true }, { propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n monaButton\n (click)=\"buttonClick.emit($event)\"\n [disabled]=\"disabled()\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n class=\"rounded-tr-none rounded-br-none\"\n [attr.aria-label]=\"splitButtonAriaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n [tabindex]=\"disabled() ? -1 : 0\"\n #mainButton>\n @if (mainButtonTextTemplate()) {\n <ng-container [ngTemplateOutlet]=\"mainButtonTextTemplate()\"></ng-container>\n } @else {\n <span>{{ text() }}</span>\n }\n</button>\n<button\n monaButton\n [disabled]=\"disabled()\"\n [iconOnly]=\"true\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n class=\"rounded-tl-none rounded-bl-none border-l-0\"\n [attr.aria-haspopup]=\"'menu'\"\n [attr.aria-expanded]=\"menuOpen()\"\n [attr.aria-controls]=\"menuId\"\n [attr.aria-label]=\"menuButtonAriaLabel()\"\n [tabindex]=\"disabled() ? -1 : 0\"\n #menuButton>\n @if (menuButtonTemplate()) {\n <ng-container [ngTemplateOutlet]=\"menuButtonTemplate()\"></ng-container>\n } @else {\n <svg lucideChevronDown [size]=\"16\"></svg>\n }\n</button>\n\n<mona-popup-menu\n [anchorConnectionPoint]=\"'bottomleft'\"\n [anchor]=\"mainButton\"\n [items]=\"menuItems()\"\n (menuClick)=\"onMenuItemClick($event)\"\n (open)=\"onMenuOpen()\"\n (close)=\"onMenuClose()\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n [popupConnectionPoint]=\"'topleft'\"\n [rounded]=\"popupMenuRounded()\"\n [size]=\"size()\"\n [target]=\"menuButton\"\n [trigger]=\"'click'\"\n [id]=\"menuId\"\n [minWidth]=\"popupWidth() || undefined\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (iconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (shortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (textTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "directive", type: PopupMenuGroupTemplateDirective, selector: "ng-template[monaPopupMenuGroupTemplate]" }, { kind: "directive", type: PopupMenuIconTemplateDirective, selector: "ng-template[monaPopupMenuIconTemplate]" }, { kind: "directive", type: PopupMenuShortcutTemplateDirective, selector: "ng-template[monaPopupMenuShortcutTemplate]" }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }] }); }
|
|
388
375
|
}
|
|
389
376
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
390
377
|
type: Component,
|
|
@@ -399,7 +386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
399
386
|
LucideChevronDown
|
|
400
387
|
], host: {
|
|
401
388
|
"[class]": "classes()"
|
|
402
|
-
}, template: "<button\
|
|
389
|
+
}, template: "<button\n monaButton\n (click)=\"buttonClick.emit($event)\"\n [disabled]=\"disabled()\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n class=\"rounded-tr-none rounded-br-none\"\n [attr.aria-label]=\"splitButtonAriaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n [tabindex]=\"disabled() ? -1 : 0\"\n #mainButton>\n @if (mainButtonTextTemplate()) {\n <ng-container [ngTemplateOutlet]=\"mainButtonTextTemplate()\"></ng-container>\n } @else {\n <span>{{ text() }}</span>\n }\n</button>\n<button\n monaButton\n [disabled]=\"disabled()\"\n [iconOnly]=\"true\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n class=\"rounded-tl-none rounded-bl-none border-l-0\"\n [attr.aria-haspopup]=\"'menu'\"\n [attr.aria-expanded]=\"menuOpen()\"\n [attr.aria-controls]=\"menuId\"\n [attr.aria-label]=\"menuButtonAriaLabel()\"\n [tabindex]=\"disabled() ? -1 : 0\"\n #menuButton>\n @if (menuButtonTemplate()) {\n <ng-container [ngTemplateOutlet]=\"menuButtonTemplate()\"></ng-container>\n } @else {\n <svg lucideChevronDown [size]=\"16\"></svg>\n }\n</button>\n\n<mona-popup-menu\n [anchorConnectionPoint]=\"'bottomleft'\"\n [anchor]=\"mainButton\"\n [items]=\"menuItems()\"\n (menuClick)=\"onMenuItemClick($event)\"\n (open)=\"onMenuOpen()\"\n (close)=\"onMenuClose()\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n [popupConnectionPoint]=\"'topleft'\"\n [rounded]=\"popupMenuRounded()\"\n [size]=\"size()\"\n [target]=\"menuButton\"\n [trigger]=\"'click'\"\n [id]=\"menuId\"\n [minWidth]=\"popupWidth() || undefined\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (iconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (shortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (textTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n" }]
|
|
403
390
|
}], ctorParameters: () => [], propDecorators: { menuItemComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PopupMenuToken), { ...{ descendants: false }, isSignal: true }] }], menuButtonRef: [{ type: i0.ViewChild, args: ["menuButton", { isSignal: true }] }], popupMenuRef: [{ type: i0.ViewChild, args: ["popupMenu", { isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SplitButtonMenuGroupTemplateDirective), { ...{
|
|
404
391
|
read: TemplateRef,
|
|
405
392
|
descendants: false
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { computed, input, Directive, model, viewChild, TemplateRef, Component,
|
|
3
|
+
import { computed, input, Directive, model, viewChild, TemplateRef, Component, output, inject, DestroyRef, ElementRef, signal, afterNextRender, afterRenderEffect, contentChildren } from '@angular/core';
|
|
4
4
|
import { where, compact, from } from '@mirei/ts-collections';
|
|
5
|
-
import { ThemeService } from '@nanahoshi/mona-ui/theme';
|
|
6
5
|
import { cva } from 'class-variance-authority';
|
|
7
6
|
import { v4 } from 'uuid';
|
|
8
7
|
import { Directionality } from '@angular/cdk/bidi';
|
|
@@ -105,8 +104,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
105
104
|
}]
|
|
106
105
|
}], propDecorators: { pane: [{ type: i0.Input, args: [{ isSignal: true, alias: "pane", required: true }] }], paneList: [{ type: i0.Input, args: [{ isSignal: true, alias: "paneList", required: true }] }] } });
|
|
107
106
|
|
|
108
|
-
const
|
|
109
|
-
flex
|
|
107
|
+
const splitterBaseThemeVariants = cva(`
|
|
108
|
+
flex h-full w-full min-h-0 min-w-0 overflow-hidden
|
|
110
109
|
`, {
|
|
111
110
|
variants: {
|
|
112
111
|
orientation: {
|
|
@@ -118,13 +117,13 @@ const splitterBaseVariants = cva(`
|
|
|
118
117
|
orientation: "horizontal"
|
|
119
118
|
}
|
|
120
119
|
});
|
|
121
|
-
const
|
|
122
|
-
flex items-center justify-center
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
active:bg-
|
|
126
|
-
|
|
127
|
-
focus-visible:
|
|
120
|
+
const splitterResizerThemeVariants = cva(`
|
|
121
|
+
relative flex shrink-0 items-center justify-center
|
|
122
|
+
bg-border-subtle outline-none
|
|
123
|
+
transition-colors
|
|
124
|
+
hover:bg-border-control active:bg-border-control-hover
|
|
125
|
+
focus-visible:bg-border-control
|
|
126
|
+
focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-indicator/35
|
|
128
127
|
`, {
|
|
129
128
|
variants: {
|
|
130
129
|
orientation: {
|
|
@@ -132,7 +131,7 @@ const splitterResizerVariants = cva(`
|
|
|
132
131
|
vertical: "h-0.5 flex-row"
|
|
133
132
|
},
|
|
134
133
|
resizing: {
|
|
135
|
-
true: "",
|
|
134
|
+
true: "bg-border-control-hover",
|
|
136
135
|
false: ""
|
|
137
136
|
}
|
|
138
137
|
},
|
|
@@ -141,9 +140,9 @@ const splitterResizerVariants = cva(`
|
|
|
141
140
|
resizing: false
|
|
142
141
|
}
|
|
143
142
|
});
|
|
144
|
-
const
|
|
145
|
-
flex items-center justify-center
|
|
146
|
-
[&_button]:p-0
|
|
143
|
+
const splitterResizerHandleThemeVariants = cva(`
|
|
144
|
+
flex items-center justify-center
|
|
145
|
+
[&_button]:p-0
|
|
147
146
|
`, {
|
|
148
147
|
variants: {
|
|
149
148
|
orientation: {
|
|
@@ -156,31 +155,6 @@ const splitterResizerHandleVariants = cva(`
|
|
|
156
155
|
}
|
|
157
156
|
});
|
|
158
157
|
|
|
159
|
-
const splitterBaseThemeVariants = (theme) => {
|
|
160
|
-
switch (theme) {
|
|
161
|
-
case "mona":
|
|
162
|
-
return splitterBaseVariants;
|
|
163
|
-
default:
|
|
164
|
-
return splitterBaseVariants;
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
const splitterResizerThemeVariants = (theme) => {
|
|
168
|
-
switch (theme) {
|
|
169
|
-
case "mona":
|
|
170
|
-
return splitterResizerVariants;
|
|
171
|
-
default:
|
|
172
|
-
return splitterResizerVariants;
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
const splitterResizerHandleThemeVariants = (theme) => {
|
|
176
|
-
switch (theme) {
|
|
177
|
-
case "mona":
|
|
178
|
-
return splitterResizerHandleVariants;
|
|
179
|
-
default:
|
|
180
|
-
return splitterResizerHandleVariants;
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
|
|
184
158
|
class SplitterPaneComponent {
|
|
185
159
|
constructor() {
|
|
186
160
|
/**
|
|
@@ -218,31 +192,29 @@ class SplitterPaneComponent {
|
|
|
218
192
|
this.uid = v4();
|
|
219
193
|
}
|
|
220
194
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
221
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: SplitterPaneComponent, isStandalone: true, selector: "mona-splitter-pane", inputs: { collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", size: "sizeChange" }, viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
222
|
-
<ng-template>
|
|
223
|
-
<ng-content></ng-content>
|
|
224
|
-
</ng-template>
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: SplitterPaneComponent, isStandalone: true, selector: "mona-splitter-pane", inputs: { collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", size: "sizeChange" }, viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
196
|
+
<ng-template>
|
|
197
|
+
<ng-content></ng-content>
|
|
198
|
+
</ng-template>
|
|
225
199
|
`, isInline: true }); }
|
|
226
200
|
}
|
|
227
201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterPaneComponent, decorators: [{
|
|
228
202
|
type: Component,
|
|
229
203
|
args: [{
|
|
230
204
|
selector: "mona-splitter-pane",
|
|
231
|
-
template: `
|
|
232
|
-
<ng-template>
|
|
233
|
-
<ng-content></ng-content>
|
|
234
|
-
</ng-template>
|
|
205
|
+
template: `
|
|
206
|
+
<ng-template>
|
|
207
|
+
<ng-content></ng-content>
|
|
208
|
+
</ng-template>
|
|
235
209
|
`
|
|
236
210
|
}]
|
|
237
211
|
}], propDecorators: { collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }, { type: i0.Output, args: ["sizeChange"] }], template: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
238
212
|
|
|
239
213
|
class SplitterResizerHandleComponent {
|
|
240
214
|
constructor() {
|
|
241
|
-
this.#themeService = inject(ThemeService);
|
|
242
215
|
this.baseClass = computed(() => {
|
|
243
|
-
const theme = this.#themeService.theme();
|
|
244
216
|
const orientation = this.orientation();
|
|
245
|
-
return splitterResizerHandleThemeVariants(
|
|
217
|
+
return splitterResizerHandleThemeVariants({ orientation });
|
|
246
218
|
}, /* @ts-ignore */
|
|
247
219
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
248
220
|
this.collapseNext = output();
|
|
@@ -256,19 +228,18 @@ class SplitterResizerHandleComponent {
|
|
|
256
228
|
this.resizable = input.required(/* @ts-ignore */
|
|
257
229
|
...(ngDevMode ? [{ debugName: "resizable" }] : /* istanbul ignore next */ []));
|
|
258
230
|
}
|
|
259
|
-
#themeService;
|
|
260
231
|
onPointerDown(event) {
|
|
261
232
|
event.preventDefault();
|
|
262
233
|
event.stopPropagation();
|
|
263
234
|
}
|
|
264
235
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerHandleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
265
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitterResizerHandleComponent, isStandalone: true, selector: "mona-splitter-resizer-handle", inputs: { nextControlsVisible: { classPropertyName: "nextControlsVisible", publicName: "nextControlsVisible", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, previousControlsVisible: { classPropertyName: "previousControlsVisible", publicName: "previousControlsVisible", isSignal: true, isRequired: true, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { collapseNext: "collapseNext", collapsePrevious: "collapsePrevious" }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (orientation() === \"horizontal\") {\
|
|
236
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitterResizerHandleComponent, isStandalone: true, selector: "mona-splitter-resizer-handle", inputs: { nextControlsVisible: { classPropertyName: "nextControlsVisible", publicName: "nextControlsVisible", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, previousControlsVisible: { classPropertyName: "previousControlsVisible", publicName: "previousControlsVisible", isSignal: true, isRequired: true, transformFunction: null }, resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { collapseNext: "collapseNext", collapsePrevious: "collapsePrevious" }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (orientation() === \"horizontal\") {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse previous pane\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronLeft [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-6 w-0.5 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse next pane\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronRight [size]=\"12\"></svg>\n </button>\n }\n} @else {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse pane above\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronUp [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-0.5 w-6 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse pane below\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronDown [size]=\"12\"></svg>\n </button>\n }\n}\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronUp, selector: "svg[lucideChevronUp]" }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }] }); }
|
|
266
237
|
}
|
|
267
238
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerHandleComponent, decorators: [{
|
|
268
239
|
type: Component,
|
|
269
240
|
args: [{ selector: "mona-splitter-resizer-handle", imports: [ButtonDirective, LucideChevronLeft, LucideChevronRight, LucideChevronUp, LucideChevronDown], host: {
|
|
270
241
|
"[class]": "baseClass()"
|
|
271
|
-
}, template: "@if (orientation() === \"horizontal\") {\
|
|
242
|
+
}, template: "@if (orientation() === \"horizontal\") {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse previous pane\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronLeft [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-6 w-0.5 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse next pane\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronRight [size]=\"12\"></svg>\n </button>\n }\n} @else {\n @if (previousControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse pane above\"\n (click)=\"collapsePrevious.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronUp [size]=\"12\"></svg>\n </button>\n }\n @if (resizable()) {\n <div class=\"flex h-0.5 w-6 bg-primary/40\"></div>\n }\n @if (nextControlsVisible()) {\n <button\n monaButton\n look=\"secondary\"\n [rounded]=\"'none'\"\n aria-label=\"Collapse pane below\"\n (click)=\"collapseNext.emit($event)\"\n (pointerdown)=\"onPointerDown($event)\">\n <svg lucideChevronDown [size]=\"12\"></svg>\n </button>\n }\n}\n" }]
|
|
272
243
|
}], propDecorators: { collapseNext: [{ type: i0.Output, args: ["collapseNext"] }], collapsePrevious: [{ type: i0.Output, args: ["collapsePrevious"] }], nextControlsVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextControlsVisible", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: true }] }], previousControlsVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousControlsVisible", required: true }] }], resizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizable", required: true }] }] } });
|
|
273
244
|
|
|
274
245
|
class SplitterResizerComponent {
|
|
@@ -277,14 +248,12 @@ class SplitterResizerComponent {
|
|
|
277
248
|
#hostElementRef;
|
|
278
249
|
#paneSizeMemory;
|
|
279
250
|
#splitter;
|
|
280
|
-
#themeService;
|
|
281
251
|
constructor() {
|
|
282
252
|
this.#destroyRef = inject(DestroyRef);
|
|
283
253
|
this.#directionality = inject(Directionality);
|
|
284
254
|
this.#hostElementRef = inject(ElementRef);
|
|
285
255
|
this.#paneSizeMemory = new WeakMap();
|
|
286
256
|
this.#splitter = inject(SplitterComponent);
|
|
287
|
-
this.#themeService = inject(ThemeService);
|
|
288
257
|
this.ariaValueMax = signal(0, /* @ts-ignore */
|
|
289
258
|
...(ngDevMode ? [{ debugName: "ariaValueMax" }] : /* istanbul ignore next */ []));
|
|
290
259
|
this.ariaValueMin = signal(0, /* @ts-ignore */
|
|
@@ -292,10 +261,9 @@ class SplitterResizerComponent {
|
|
|
292
261
|
this.ariaValueNow = signal(0, /* @ts-ignore */
|
|
293
262
|
...(ngDevMode ? [{ debugName: "ariaValueNow" }] : /* istanbul ignore next */ []));
|
|
294
263
|
this.baseClass = computed(() => {
|
|
295
|
-
const theme = this.#themeService.theme();
|
|
296
264
|
const orientation = this.orientation();
|
|
297
265
|
const resizing = this.resizing();
|
|
298
|
-
return splitterResizerThemeVariants(
|
|
266
|
+
return splitterResizerThemeVariants({ orientation, resizing });
|
|
299
267
|
}, /* @ts-ignore */
|
|
300
268
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
301
269
|
this.hovered = signal(false, /* @ts-ignore */
|
|
@@ -779,7 +747,7 @@ class SplitterResizerComponent {
|
|
|
779
747
|
this.updatePaneSizes(`${previousPaneHeight}px`, `${nextPaneHeight}px`);
|
|
780
748
|
}
|
|
781
749
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
782
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: SplitterResizerComponent, isStandalone: true, selector: "mona-splitter-resizer", inputs: { nextPane: { classPropertyName: "nextPane", publicName: "nextPane", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, previousPane: { classPropertyName: "previousPane", publicName: "previousPane", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "separator" }, listeners: { "dblclick": "toggleCollapse()" }, properties: { "class": "baseClass()", "style.cursor": "resizable() ? (orientation()==='horizontal' ? 'ew-resize' : 'ns-resize') : 'auto'", "attr.aria-orientation": "orientation()", "attr.aria-valuemax": "ariaValueMax()", "attr.aria-valuemin": "ariaValueMin()", "attr.aria-valuenow": "ariaValueNow()", "attr.tabindex": "isInert() ? -1 : 0" } }, ngImport: i0, template: "<mona-splitter-resizer-handle\
|
|
750
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: SplitterResizerComponent, isStandalone: true, selector: "mona-splitter-resizer", inputs: { nextPane: { classPropertyName: "nextPane", publicName: "nextPane", isSignal: true, isRequired: true, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: true, transformFunction: null }, previousPane: { classPropertyName: "previousPane", publicName: "previousPane", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "separator" }, listeners: { "dblclick": "toggleCollapse()" }, properties: { "class": "baseClass()", "style.cursor": "resizable() ? (orientation()==='horizontal' ? 'ew-resize' : 'ns-resize') : 'auto'", "attr.aria-orientation": "orientation()", "attr.aria-valuemax": "ariaValueMax()", "attr.aria-valuemin": "ariaValueMin()", "attr.aria-valuenow": "ariaValueNow()", "attr.tabindex": "isInert() ? -1 : 0" } }, ngImport: i0, template: "<mona-splitter-resizer-handle\n (collapseNext)=\"collapseNext($event)\"\n (collapsePrevious)=\"collapsePrevious($event)\"\n [nextControlsVisible]=\"nextCollapseControlsVisible()\"\n [orientation]=\"orientation()\"\n [previousControlsVisible]=\"previousCollapseControlsVisible()\"\n [resizable]=\"resizable()\">\n</mona-splitter-resizer-handle>\n", dependencies: [{ kind: "component", type: SplitterResizerHandleComponent, selector: "mona-splitter-resizer-handle", inputs: ["nextControlsVisible", "orientation", "previousControlsVisible", "resizable"], outputs: ["collapseNext", "collapsePrevious"] }] }); }
|
|
783
751
|
}
|
|
784
752
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerComponent, decorators: [{
|
|
785
753
|
type: Component,
|
|
@@ -793,16 +761,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
793
761
|
"[attr.aria-valuemin]": "ariaValueMin()",
|
|
794
762
|
"[attr.aria-valuenow]": "ariaValueNow()",
|
|
795
763
|
"[attr.tabindex]": "isInert() ? -1 : 0"
|
|
796
|
-
}, template: "<mona-splitter-resizer-handle\
|
|
764
|
+
}, template: "<mona-splitter-resizer-handle\n (collapseNext)=\"collapseNext($event)\"\n (collapsePrevious)=\"collapsePrevious($event)\"\n [nextControlsVisible]=\"nextCollapseControlsVisible()\"\n [orientation]=\"orientation()\"\n [previousControlsVisible]=\"previousCollapseControlsVisible()\"\n [resizable]=\"resizable()\">\n</mona-splitter-resizer-handle>\n" }]
|
|
797
765
|
}], ctorParameters: () => [], propDecorators: { nextPane: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextPane", required: true }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: true }] }], previousPane: [{ type: i0.Input, args: [{ isSignal: true, alias: "previousPane", required: true }] }] } });
|
|
798
766
|
|
|
799
767
|
class SplitterComponent {
|
|
800
768
|
constructor() {
|
|
801
|
-
this.#themeService = inject(ThemeService);
|
|
802
769
|
this.baseClass = computed(() => {
|
|
803
|
-
const theme = this.#themeService.theme();
|
|
804
770
|
const orientation = this.orientation();
|
|
805
|
-
return splitterBaseThemeVariants(
|
|
771
|
+
return splitterBaseThemeVariants({ orientation });
|
|
806
772
|
}, /* @ts-ignore */
|
|
807
773
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
808
774
|
this.paneList = contentChildren(SplitterPaneComponent, /* @ts-ignore */
|
|
@@ -814,7 +780,6 @@ class SplitterComponent {
|
|
|
814
780
|
this.orientation = input("horizontal", /* @ts-ignore */
|
|
815
781
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
816
782
|
}
|
|
817
|
-
#themeService;
|
|
818
783
|
/**
|
|
819
784
|
* @internal Used by SplitterResizerComponent to resolve sibling panes by id.
|
|
820
785
|
*/
|