@nanahoshi/mona-ui 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -11
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +17 -17
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +26 -26
- package/fesm2022/nanahoshi-mona-ui-button.mjs +109 -107
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +53 -53
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +80 -80
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +98 -98
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +38 -38
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +25 -25
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +41 -37
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +17 -19
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +6 -6
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +11 -13
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +18 -20
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +40 -40
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +14 -16
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +52 -52
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +462 -81
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +26 -26
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +8 -8
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +14 -14
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B2ETh-uI.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-DZk18LJC.mjs} +2 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-C7WKhhig.mjs +128 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-BRiY0CDX.mjs} +13 -13
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-BrYpFMyF.mjs +240 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs} +120 -120
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +81 -81
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +35 -35
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +8 -8
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +7 -7
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +50 -50
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +12 -14
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +24 -24
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +69 -69
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +29 -29
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +9 -9
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +12 -12
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +26 -26
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +4 -4
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +55 -55
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +49 -49
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +96 -96
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +30 -30
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +24 -24
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +29 -29
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +42 -42
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +35 -39
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +22 -22
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +54 -54
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +11 -19
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +29 -29
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +51 -51
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-window.mjs +27 -28
- package/package.json +30 -5
- package/types/nanahoshi-mona-ui-button.d.ts +4 -3
- package/types/nanahoshi-mona-ui-color-picker.d.ts +0 -3
- package/types/nanahoshi-mona-ui-dialog.d.ts +2 -2
- package/types/nanahoshi-mona-ui-editor.d.ts +17 -17
- package/types/nanahoshi-mona-ui-fieldset.d.ts +1 -1
- package/types/nanahoshi-mona-ui-filter.d.ts +2 -2
- package/types/nanahoshi-mona-ui-grid.d.ts +3 -3
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +16 -16
- package/types/nanahoshi-mona-ui-menubar.d.ts +2 -2
- package/types/nanahoshi-mona-ui-stepper.d.ts +2 -2
- package/types/nanahoshi-mona-ui-tabs.d.ts +2 -2
- 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
|
@@ -105,8 +105,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
105
105
|
}]
|
|
106
106
|
}], propDecorators: { pane: [{ type: i0.Input, args: [{ isSignal: true, alias: "pane", required: true }] }], paneList: [{ type: i0.Input, args: [{ isSignal: true, alias: "paneList", required: true }] }] } });
|
|
107
107
|
|
|
108
|
-
const splitterBaseVariants = cva(`
|
|
109
|
-
flex w-full h-full overflow-hidden min-w-0 min-h-0
|
|
108
|
+
const splitterBaseVariants = cva(`
|
|
109
|
+
flex w-full h-full overflow-hidden min-w-0 min-h-0
|
|
110
110
|
`, {
|
|
111
111
|
variants: {
|
|
112
112
|
orientation: {
|
|
@@ -118,13 +118,13 @@ const splitterBaseVariants = cva(`
|
|
|
118
118
|
orientation: "horizontal"
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
-
const splitterResizerVariants = cva(`
|
|
122
|
-
flex items-center justify-center
|
|
123
|
-
relative bg-accent
|
|
124
|
-
hover:bg-accent-hover
|
|
125
|
-
active:bg-primary/40
|
|
126
|
-
shrink-0 outline-none
|
|
127
|
-
focus-visible:bg-primary
|
|
121
|
+
const splitterResizerVariants = cva(`
|
|
122
|
+
flex items-center justify-center
|
|
123
|
+
relative bg-accent
|
|
124
|
+
hover:bg-accent-hover
|
|
125
|
+
active:bg-primary/40
|
|
126
|
+
shrink-0 outline-none
|
|
127
|
+
focus-visible:bg-primary
|
|
128
128
|
`, {
|
|
129
129
|
variants: {
|
|
130
130
|
orientation: {
|
|
@@ -141,9 +141,9 @@ const splitterResizerVariants = cva(`
|
|
|
141
141
|
resizing: false
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
const splitterResizerHandleVariants = cva(`
|
|
145
|
-
flex items-center justify-center
|
|
146
|
-
[&_button]:p-0
|
|
144
|
+
const splitterResizerHandleVariants = cva(`
|
|
145
|
+
flex items-center justify-center
|
|
146
|
+
[&_button]:p-0
|
|
147
147
|
`, {
|
|
148
148
|
variants: {
|
|
149
149
|
orientation: {
|
|
@@ -218,20 +218,20 @@ class SplitterPaneComponent {
|
|
|
218
218
|
this.uid = v4();
|
|
219
219
|
}
|
|
220
220
|
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>
|
|
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>
|
|
225
225
|
`, isInline: true }); }
|
|
226
226
|
}
|
|
227
227
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterPaneComponent, decorators: [{
|
|
228
228
|
type: Component,
|
|
229
229
|
args: [{
|
|
230
230
|
selector: "mona-splitter-pane",
|
|
231
|
-
template: `
|
|
232
|
-
<ng-template>
|
|
233
|
-
<ng-content></ng-content>
|
|
234
|
-
</ng-template>
|
|
231
|
+
template: `
|
|
232
|
+
<ng-template>
|
|
233
|
+
<ng-content></ng-content>
|
|
234
|
+
</ng-template>
|
|
235
235
|
`
|
|
236
236
|
}]
|
|
237
237
|
}], 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 }] }] } });
|
|
@@ -262,13 +262,13 @@ class SplitterResizerHandleComponent {
|
|
|
262
262
|
event.stopPropagation();
|
|
263
263
|
}
|
|
264
264
|
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\") {\
|
|
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\") {\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
266
|
}
|
|
267
267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerHandleComponent, decorators: [{
|
|
268
268
|
type: Component,
|
|
269
269
|
args: [{ selector: "mona-splitter-resizer-handle", imports: [ButtonDirective, LucideChevronLeft, LucideChevronRight, LucideChevronUp, LucideChevronDown], host: {
|
|
270
270
|
"[class]": "baseClass()"
|
|
271
|
-
}, template: "@if (orientation() === \"horizontal\") {\
|
|
271
|
+
}, 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
272
|
}], 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
273
|
|
|
274
274
|
class SplitterResizerComponent {
|
|
@@ -779,7 +779,7 @@ class SplitterResizerComponent {
|
|
|
779
779
|
this.updatePaneSizes(`${previousPaneHeight}px`, `${nextPaneHeight}px`);
|
|
780
780
|
}
|
|
781
781
|
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\
|
|
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\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
783
|
}
|
|
784
784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitterResizerComponent, decorators: [{
|
|
785
785
|
type: Component,
|
|
@@ -793,7 +793,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
793
793
|
"[attr.aria-valuemin]": "ariaValueMin()",
|
|
794
794
|
"[attr.aria-valuenow]": "ariaValueNow()",
|
|
795
795
|
"[attr.tabindex]": "isInert() ? -1 : 0"
|
|
796
|
-
}, template: "<mona-splitter-resizer-handle\
|
|
796
|
+
}, 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
797
|
}], 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
798
|
|
|
799
799
|
class SplitterComponent {
|
|
@@ -3,8 +3,8 @@ import { Directive, inject, ElementRef, computed, input, afterRenderEffect, Dest
|
|
|
3
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { select } from '@mirei/ts-collections';
|
|
6
|
-
import { fromEvent } from 'rxjs';
|
|
7
6
|
import { ThemeService } from '@nanahoshi/mona-ui/theme';
|
|
7
|
+
import { fromEvent } from 'rxjs';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -53,8 +53,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
53
53
|
}]
|
|
54
54
|
}] });
|
|
55
55
|
|
|
56
|
-
const stepperBaseVariants = cva(`
|
|
57
|
-
relative grid outline-none
|
|
56
|
+
const stepperBaseVariants = cva(`
|
|
57
|
+
relative grid outline-none
|
|
58
58
|
`, {
|
|
59
59
|
variants: {
|
|
60
60
|
orientation: {
|
|
@@ -66,19 +66,19 @@ const stepperBaseVariants = cva(`
|
|
|
66
66
|
orientation: "horizontal"
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
const stepperStepListVariants = cva(`
|
|
70
|
-
absolute flex list-none col-span-full
|
|
71
|
-
font-medium z-1
|
|
69
|
+
const stepperStepListVariants = cva(`
|
|
70
|
+
absolute flex list-none col-span-full
|
|
71
|
+
font-medium z-1
|
|
72
72
|
`, {
|
|
73
73
|
variants: {
|
|
74
74
|
orientation: {
|
|
75
|
-
horizontal: `
|
|
76
|
-
flex-row w-full
|
|
77
|
-
-translate-y-3
|
|
75
|
+
horizontal: `
|
|
76
|
+
flex-row w-full
|
|
77
|
+
-translate-y-3
|
|
78
78
|
`,
|
|
79
|
-
vertical: `
|
|
80
|
-
flex-col h-full w-max
|
|
81
|
-
-translate-x-3
|
|
79
|
+
vertical: `
|
|
80
|
+
flex-col h-full w-max
|
|
81
|
+
-translate-x-3
|
|
82
82
|
`
|
|
83
83
|
}
|
|
84
84
|
},
|
|
@@ -86,10 +86,10 @@ const stepperStepListVariants = cva(`
|
|
|
86
86
|
orientation: "horizontal"
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
|
-
const stepperStepListItemVariants = cva(`
|
|
90
|
-
flex items-center
|
|
91
|
-
grow-1 shrink-0 basis-auto
|
|
92
|
-
z-1
|
|
89
|
+
const stepperStepListItemVariants = cva(`
|
|
90
|
+
flex items-center
|
|
91
|
+
grow-1 shrink-0 basis-auto
|
|
92
|
+
z-1
|
|
93
93
|
`, {
|
|
94
94
|
variants: {
|
|
95
95
|
orientation: {
|
|
@@ -101,12 +101,12 @@ const stepperStepListItemVariants = cva(`
|
|
|
101
101
|
orientation: "horizontal"
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
|
-
const stepperStepIndicatorVariants = cva(`
|
|
105
|
-
w-8 h-8
|
|
106
|
-
flex items-center justify-center
|
|
107
|
-
bg-background border border-border
|
|
108
|
-
text-foreground outline-none
|
|
109
|
-
transition-colors duration-400 ease-in-out
|
|
104
|
+
const stepperStepIndicatorVariants = cva(`
|
|
105
|
+
w-8 h-8
|
|
106
|
+
flex items-center justify-center
|
|
107
|
+
bg-background border border-border
|
|
108
|
+
text-foreground outline-none
|
|
109
|
+
transition-colors duration-400 ease-in-out
|
|
110
110
|
`, {
|
|
111
111
|
variants: {
|
|
112
112
|
active: {
|
|
@@ -126,9 +126,9 @@ const stepperStepIndicatorVariants = cva(`
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
});
|
|
129
|
-
const stepperTrackVariants = cva(`
|
|
130
|
-
relative grid
|
|
131
|
-
bg-background border border-border
|
|
129
|
+
const stepperTrackVariants = cva(`
|
|
130
|
+
relative grid
|
|
131
|
+
bg-background text-foreground border border-border
|
|
132
132
|
`, {
|
|
133
133
|
variants: {
|
|
134
134
|
orientation: {
|
|
@@ -140,8 +140,8 @@ const stepperTrackVariants = cva(`
|
|
|
140
140
|
orientation: "horizontal"
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
|
-
const stepperTrackLineVariants = cva(`
|
|
144
|
-
absolute bg-primary
|
|
143
|
+
const stepperTrackLineVariants = cva(`
|
|
144
|
+
absolute bg-primary
|
|
145
145
|
`, {
|
|
146
146
|
variants: {
|
|
147
147
|
orientation: {
|
|
@@ -509,7 +509,7 @@ class StepperComponent {
|
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
511
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
512
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: StepperComponent, isStandalone: true, selector: "mona-stepper", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, progressAriaLabel: { classPropertyName: "progressAriaLabel", publicName: "progressAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { step: "stepChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel()", "class": "baseClass()", "style": "hostStyles()" } }, queries: [{ propertyName: "indicatorTemplate", first: true, predicate: StepperIndicatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: StepperLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "stepTemplate", first: true, predicate: StepperStepTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<ol [class]=\"listClass()\">\
|
|
512
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: StepperComponent, isStandalone: true, selector: "mona-stepper", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, progressAriaLabel: { classPropertyName: "progressAriaLabel", publicName: "progressAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { step: "stepChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel()", "class": "baseClass()", "style": "hostStyles()" } }, queries: [{ propertyName: "indicatorTemplate", first: true, predicate: StepperIndicatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: StepperLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "stepTemplate", first: true, predicate: StepperStepTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ step.index + 1 }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel()\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: StepperIndicatorDirective, selector: "span[monaStepperIndicator]", inputs: ["active", "focused", "rounded"] }] }); }
|
|
513
513
|
}
|
|
514
514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperComponent, decorators: [{
|
|
515
515
|
type: Component,
|
|
@@ -518,7 +518,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
518
518
|
"[attr.aria-label]": "ariaLabel()",
|
|
519
519
|
"[class]": "baseClass()",
|
|
520
520
|
"[style]": "hostStyles()"
|
|
521
|
-
}, template: "<ol [class]=\"listClass()\">\
|
|
521
|
+
}, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ step.index + 1 }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel()\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n" }]
|
|
522
522
|
}], ctorParameters: () => [], propDecorators: { indicatorTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperIndicatorTemplateDirective), { ...{
|
|
523
523
|
read: TemplateRef
|
|
524
524
|
}, isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperLabelTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], stepTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperStepTemplateDirective), { ...{
|
|
@@ -40,26 +40,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
40
40
|
}]
|
|
41
41
|
}] });
|
|
42
42
|
|
|
43
|
-
const switchVariants = cva(`
|
|
44
|
-
relative flex items-center cursor-pointer select-none
|
|
45
|
-
transition-[background]
|
|
46
|
-
|
|
47
|
-
bg-input-background
|
|
48
|
-
border border-input-border
|
|
49
|
-
outline-none
|
|
50
|
-
|
|
51
|
-
focus-within:ring-2 focus-within:ring-primary/40
|
|
52
|
-
|
|
53
|
-
data-[disabled='true']:pointer-events-none
|
|
54
|
-
data-[disabled='true']:opacity-50
|
|
55
|
-
|
|
56
|
-
data-[active='true']:bg-primary
|
|
57
|
-
data-[active='true']:text-primary-foreground
|
|
58
|
-
|
|
59
|
-
[&.ng-touched.ng-invalid]:border-error
|
|
60
|
-
|
|
61
|
-
data-[invalid='true']:border-error
|
|
62
|
-
data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
|
|
43
|
+
const switchVariants = cva(`
|
|
44
|
+
relative flex items-center cursor-pointer select-none
|
|
45
|
+
transition-[background]
|
|
46
|
+
|
|
47
|
+
bg-input-background
|
|
48
|
+
border border-input-border
|
|
49
|
+
outline-none
|
|
50
|
+
|
|
51
|
+
focus-within:ring-2 focus-within:ring-primary/40
|
|
52
|
+
|
|
53
|
+
data-[disabled='true']:pointer-events-none
|
|
54
|
+
data-[disabled='true']:opacity-50
|
|
55
|
+
|
|
56
|
+
data-[active='true']:bg-primary
|
|
57
|
+
data-[active='true']:text-primary-foreground
|
|
58
|
+
|
|
59
|
+
[&.ng-touched.ng-invalid]:border-error
|
|
60
|
+
|
|
61
|
+
data-[invalid='true']:border-error
|
|
62
|
+
data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
|
|
63
63
|
`, {
|
|
64
64
|
variants: {
|
|
65
65
|
rounded: {
|
|
@@ -76,12 +76,12 @@ const switchVariants = cva(`
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
|
-
const switchHandleVariants = cva(`
|
|
80
|
-
absolute inline-flex
|
|
81
|
-
items-center justify-center
|
|
82
|
-
outline-none transition-[left,background] ease-in-out duration-300
|
|
83
|
-
border border-border bg-secondary
|
|
84
|
-
data-[active='true']:bg-background
|
|
79
|
+
const switchHandleVariants = cva(`
|
|
80
|
+
absolute inline-flex
|
|
81
|
+
items-center justify-center
|
|
82
|
+
outline-none transition-[left,background] ease-in-out duration-300
|
|
83
|
+
border border-border bg-secondary
|
|
84
|
+
data-[active='true']:bg-background text-foreground
|
|
85
85
|
`, {
|
|
86
86
|
variants: {
|
|
87
87
|
rounded: {
|
|
@@ -92,26 +92,26 @@ const switchHandleVariants = cva(`
|
|
|
92
92
|
small: "rounded-sm"
|
|
93
93
|
},
|
|
94
94
|
size: {
|
|
95
|
-
large: `
|
|
96
|
-
w-6 h-6
|
|
97
|
-
data-[active='true']:left-[calc(100%-26px)]
|
|
98
|
-
data-[active='false']:left-0.5
|
|
95
|
+
large: `
|
|
96
|
+
w-6 h-6
|
|
97
|
+
data-[active='true']:left-[calc(100%-26px)]
|
|
98
|
+
data-[active='false']:left-0.5
|
|
99
99
|
`,
|
|
100
|
-
medium: `
|
|
101
|
-
w-5 h-5
|
|
102
|
-
data-[active='true']:left-[calc(100%-22px)]
|
|
103
|
-
data-[active='false']:left-0.5
|
|
100
|
+
medium: `
|
|
101
|
+
w-5 h-5
|
|
102
|
+
data-[active='true']:left-[calc(100%-22px)]
|
|
103
|
+
data-[active='false']:left-0.5
|
|
104
104
|
`,
|
|
105
|
-
small: `
|
|
106
|
-
w-4 h-4
|
|
107
|
-
data-[active='true']:left-[calc(100%-18px)]
|
|
108
|
-
data-[active='false']:left-0.5
|
|
105
|
+
small: `
|
|
106
|
+
w-4 h-4
|
|
107
|
+
data-[active='true']:left-[calc(100%-18px)]
|
|
108
|
+
data-[active='false']:left-0.5
|
|
109
109
|
`
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
|
-
const switchLabelVariants = cva(`
|
|
114
|
-
h-full flex flex-1 items-center justify-center text-xs
|
|
113
|
+
const switchLabelVariants = cva(`
|
|
114
|
+
h-full flex flex-1 items-center justify-center text-xs
|
|
115
115
|
`);
|
|
116
116
|
|
|
117
117
|
const switchThemeVariants = (theme) => {
|
|
@@ -274,7 +274,7 @@ class SwitchComponent {
|
|
|
274
274
|
this.touch.emit();
|
|
275
275
|
}
|
|
276
276
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
277
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SwitchComponent, isStandalone: true, selector: "mona-switch", 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 }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, offLabel: { classPropertyName: "offLabel", publicName: "offLabel", isSignal: true, isRequired: false, transformFunction: null }, onLabel: { classPropertyName: "onLabel", publicName: "onLabel", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", 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 }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touch: "touch" }, host: { listeners: { "blur": "onBlur()" }, properties: { "attr.role": "'switch'", "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled() || undefined", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "attr.tabindex": "disabled() ? -1 : 0", "attr.data-active": "checked()", "attr.data-disabled": "disabled()", "attr.data-invalid": "invalidState() || null", "attr.aria-invalid": "invalidState() ? 'true' : null", "class": "classes()" } }, queries: [{ propertyName: "handleContentTemplate", first: true, predicate: SwitchHandleContentTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "offLabelTemplate", first: true, predicate: SwitchOffLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "onLabelTemplate", first: true, predicate: SwitchOnLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<span [class]=\"labelClasses()\">\
|
|
277
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SwitchComponent, isStandalone: true, selector: "mona-switch", 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 }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, offLabel: { classPropertyName: "offLabel", publicName: "offLabel", isSignal: true, isRequired: false, transformFunction: null }, onLabel: { classPropertyName: "onLabel", publicName: "onLabel", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", 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 }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", touch: "touch" }, host: { listeners: { "blur": "onBlur()" }, properties: { "attr.role": "'switch'", "attr.aria-checked": "checked()", "attr.aria-disabled": "disabled() || undefined", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "attr.tabindex": "disabled() ? -1 : 0", "attr.data-active": "checked()", "attr.data-disabled": "disabled()", "attr.data-invalid": "invalidState() || null", "attr.aria-invalid": "invalidState() ? 'true' : null", "class": "classes()" } }, queries: [{ propertyName: "handleContentTemplate", first: true, predicate: SwitchHandleContentTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "offLabelTemplate", first: true, predicate: SwitchOffLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "onLabelTemplate", first: true, predicate: SwitchOnLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<span [class]=\"labelClasses()\">\n @if (checked() && !onLabelTemplate()) {\n <span animate.enter=\"mona-switch-label-enter\" animate.leave=\"mona-switch-label-leave\">{{ onLabel() }}</span>\n }\n @if (checked() && onLabelTemplate()) {\n <span animate.enter=\"mona-switch-label-enter\" animate.leave=\"mona-switch-label-leave\">\n <ng-container [ngTemplateOutlet]=\"onLabelTemplate() ?? null\"></ng-container>\n </span>\n }\n</span>\n<span [class]=\"labelClasses()\">\n @if (!checked() && !offLabelTemplate()) {\n <span animate.enter=\"mona-switch-label-enter\" animate.leave=\"mona-switch-label-leave\">{{ offLabel() }}</span>\n }\n @if (!checked() && offLabelTemplate()) {\n <span animate.enter=\"mona-switch-label-enter\" animate.leave=\"mona-switch-label-leave\">\n <ng-container [ngTemplateOutlet]=\"offLabelTemplate() ?? null\"></ng-container>\n </span>\n }\n</span>\n<div [class]=\"handleClasses()\" [attr.data-active]=\"checked()\">\n @if (handleContentTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"handleContentTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: checked() }\"></ng-container>\n }\n</div>\n", styles: [".mona-switch-label-enter{animation:mona-switch-label-fade-in .3s ease-out}.mona-switch-label-leave{animation:mona-switch-label-fade-out .3s ease-out}@keyframes mona-switch-label-fade-in{0%{opacity:0}to{opacity:1}}@keyframes mona-switch-label-fade-out{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.mona-switch-label-enter,.mona-switch-label-leave{animation-duration:1ms}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
278
278
|
}
|
|
279
279
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
280
280
|
type: Component,
|
|
@@ -291,7 +291,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
291
291
|
"[attr.aria-invalid]": "invalidState() ? 'true' : null",
|
|
292
292
|
"[class]": "classes()",
|
|
293
293
|
"(blur)": "onBlur()"
|
|
294
|
-
}, template: "<span [class]=\"labelClasses()\">\
|
|
294
|
+
}, template: "<span [class]=\"labelClasses()\">\n @if (checked() && !onLabelTemplate()) {\n <span animate.enter=\"mona-switch-label-enter\" animate.leave=\"mona-switch-label-leave\">{{ onLabel() }}</span>\n }\n @if (checked() && onLabelTemplate()) {\n <span animate.enter=\"mona-switch-label-enter\" animate.leave=\"mona-switch-label-leave\">\n <ng-container [ngTemplateOutlet]=\"onLabelTemplate() ?? null\"></ng-container>\n </span>\n }\n</span>\n<span [class]=\"labelClasses()\">\n @if (!checked() && !offLabelTemplate()) {\n <span animate.enter=\"mona-switch-label-enter\" animate.leave=\"mona-switch-label-leave\">{{ offLabel() }}</span>\n }\n @if (!checked() && offLabelTemplate()) {\n <span animate.enter=\"mona-switch-label-enter\" animate.leave=\"mona-switch-label-leave\">\n <ng-container [ngTemplateOutlet]=\"offLabelTemplate() ?? null\"></ng-container>\n </span>\n }\n</span>\n<div [class]=\"handleClasses()\" [attr.data-active]=\"checked()\">\n @if (handleContentTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"handleContentTemplate() ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: checked() }\"></ng-container>\n }\n</div>\n", styles: [".mona-switch-label-enter{animation:mona-switch-label-fade-in .3s ease-out}.mona-switch-label-leave{animation:mona-switch-label-fade-out .3s ease-out}@keyframes mona-switch-label-fade-in{0%{opacity:0}to{opacity:1}}@keyframes mona-switch-label-fade-out{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.mona-switch-label-enter,.mona-switch-label-leave{animation-duration:1ms}}\n"] }]
|
|
295
295
|
}], ctorParameters: () => [], propDecorators: { handleContentTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SwitchHandleContentTemplateDirective), { ...{
|
|
296
296
|
read: TemplateRef
|
|
297
297
|
}, isSignal: true }] }], offLabelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SwitchOffLabelTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], onLabelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SwitchOnLabelTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], offLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offLabel", required: false }] }], onLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onLabel", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|