@nanahoshi/mona-ui 0.7.0 → 0.8.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/fesm2022/nanahoshi-mona-ui-button.mjs +10 -3
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +13 -13
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-C6M8hmzY.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-BbBPZj7t.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BwwDwf6_.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BkISJoqL.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-DTqG52dg.mjs → nanahoshi-mona-ui-grid-grid-list.component-DReEfWfG.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-CaTuM3-x.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-QDo6TweF.mjs} +3 -3
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BcTk4OPK.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BCIs_lmz.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CvCis4-I.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DWzYyGnb.mjs} +13 -13
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +159 -0
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +159 -97
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +4 -12
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
- package/package.json +5 -1
- package/segmented/package.json +4 -0
- package/types/nanahoshi-mona-ui-button.d.ts +7 -1
- package/types/nanahoshi-mona-ui-segmented.d.ts +90 -0
- package/types/nanahoshi-mona-ui-tabs.d.ts +16 -11
- package/types/nanahoshi-mona-ui-theme.d.ts +1 -1
|
@@ -630,7 +630,7 @@ class TimeSelectorComponent {
|
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
632
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimeSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
633
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TimeSelectorComponent, isStandalone: true, selector: "mona-time-selector", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, focusOnMount: { classPropertyName: "focusOnMount", publicName: "focusOnMount", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", 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 }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", 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 }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touch: "touch", value: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "blur": "onBlur()" }, properties: { "attr.aria-label": "ariaLabel()", "attr.aria-disabled": "disabled()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.aria-readonly": "readonly()", "attr.aria-required": "required()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.data-required": "required() || null", "class": "baseClass()" } }, viewQueries: [{ propertyName: "hourListRef", first: true, predicate: ["hourList"], descendants: true, isSignal: true }, { propertyName: "meridiemListRef", first: true, predicate: ["meridiemList"], descendants: true, isSignal: true }, { propertyName: "minuteListRef", first: true, predicate: ["minuteList"], descendants: true, isSignal: true }, { propertyName: "secondListRef", first: true, predicate: ["secondList"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"headerClass()\">\n <div>Hr</div>\n <div>Min</div>\n @if (showSeconds()) {\n <div>Sec</div>\n }\n</div>\n\n<div [class]=\"infoContainerClass()\">\n <span>{{ navigatedDateText() }}</span>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onNowClick($event)\"\n (keydown.enter)=\"onNowClick($event)\"\n (keydown.space)=\"onNowClick($event)\">\n Now\n </button>\n</div>\n\n<div [class]=\"listContainerClass()\">\n <ol\n #hourList\n monaTimeSelectorList\n aria-label=\"Hours\"\n [attr.aria-activedescendant]=\"`${hourListId}${navigatedDate().hour}`\"\n [active]=\"focusedList() === 'hours'\"\n [id]=\"hourListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (h of viewHours() | timeLimiter: \"h\" : navigatedDate() : minDate() : maxDate(); track h) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"h.viewValue === hour()\"\n [value]=\"h.value\"\n [id]=\"`${hourListId}${h.value}`\"\n (click)=\"onHourChange(h.value)\">\n {{ h.viewValue | number: \"2.0\" }}\n </li>\n }\n </ol>\n <ol\n #minuteList\n monaTimeSelectorList\n aria-label=\"Minutes\"\n [attr.aria-activedescendant]=\"`${minuteListId}${navigatedDate().minute}`\"\n [active]=\"focusedList() === 'minutes'\"\n [id]=\"minuteListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (m of minutes() | timeLimiter: \"m\" : navigatedDate() : minDate() : maxDate(); track m) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"m.value === minute()\"\n [value]=\"m.value\"\n [id]=\"`${minuteListId}${m.value}`\"\n (click)=\"onMinuteChange(m.value)\">\n {{ m.viewValue | number: \"2.0\" }}\n </li>\n }\n </ol>\n @if (showSeconds()) {\n <ol\n #secondList\n monaTimeSelectorList\n aria-label=\"Seconds\"\n [attr.aria-activedescendant]=\"`${secondListId}${navigatedDate().second}`\"\n [active]=\"focusedList() === 'seconds'\"\n [id]=\"secondListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (s of seconds() | timeLimiter: \"s\" : navigatedDate() : minDate() : maxDate(); track s) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"s.value === second()\"\n [value]=\"s.value\"\n [id]=\"`${secondListId}${s.value}`\"\n (click)=\"onSecondChange(s.value)\">\n {{ s.value | number: \"2.0\" }}\n </li>\n }\n </ol>\n }\n @if (hourFormat() === \"12\") {\n <ol\n #meridiemList\n monaTimeSelectorList\n aria-label=\"AM/PM\"\n [attr.aria-activedescendant]=\"`${meridiemListId}${meridiem()}`\"\n [active]=\"focusedList() === 'meridiem'\"\n [id]=\"meridiemListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @if (amMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'AM'\"\n [value]=\"'AM'\"\n (click)=\"onMeridiemClick('AM')\"\n [id]=\"`${meridiemListId}AM`\">\n AM\n </li>\n }\n @if (pmMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'PM'\"\n [value]=\"'PM'\"\n (click)=\"onMeridiemClick('PM')\"\n [id]=\"`${meridiemListId}PM`\">\n PM\n </li>\n }\n </ol>\n }\n</div>\n\n@if (footer()) {\n <div [class]=\"footerClass()\">\n <button monaButton look=\"primary\" [rounded]=\"rounded()\" [size]=\"size()\" (click)=\"onSetTimeClick()\">Set</button>\n </div>\n}\n", dependencies: [{ kind: "directive", type: TimeSelectorItemDirective, selector: "li[monaTimeSelectorItem]", inputs: ["selected", "size", "value"] }, { 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: TimeSelectorListDirective, selector: "ol[monaTimeSelectorList]", inputs: ["active", "popupHeight", "size"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: TimeLimiterPipe, name: "timeLimiter" }] }); }
|
|
633
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TimeSelectorComponent, isStandalone: true, selector: "mona-time-selector", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, focusOnMount: { classPropertyName: "focusOnMount", publicName: "focusOnMount", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", 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 }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", 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 }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", 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 }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touch: "touch", value: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "blur": "onBlur()" }, properties: { "attr.aria-label": "ariaLabel()", "attr.aria-disabled": "disabled()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.aria-readonly": "readonly()", "attr.aria-required": "required()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.data-required": "required() || null", "class": "baseClass()" } }, viewQueries: [{ propertyName: "hourListRef", first: true, predicate: ["hourList"], descendants: true, isSignal: true }, { propertyName: "meridiemListRef", first: true, predicate: ["meridiemList"], descendants: true, isSignal: true }, { propertyName: "minuteListRef", first: true, predicate: ["minuteList"], descendants: true, isSignal: true }, { propertyName: "secondListRef", first: true, predicate: ["secondList"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"headerClass()\">\n <div>Hr</div>\n <div>Min</div>\n @if (showSeconds()) {\n <div>Sec</div>\n }\n</div>\n\n<div [class]=\"infoContainerClass()\">\n <span>{{ navigatedDateText() }}</span>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onNowClick($event)\"\n (keydown.enter)=\"onNowClick($event)\"\n (keydown.space)=\"onNowClick($event)\">\n Now\n </button>\n</div>\n\n<div [class]=\"listContainerClass()\">\n <ol\n #hourList\n monaTimeSelectorList\n aria-label=\"Hours\"\n [attr.aria-activedescendant]=\"`${hourListId}${navigatedDate().hour}`\"\n [active]=\"focusedList() === 'hours'\"\n [id]=\"hourListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (h of viewHours() | timeLimiter: \"h\" : navigatedDate() : minDate() : maxDate(); track h) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"h.viewValue === hour()\"\n [value]=\"h.value\"\n [id]=\"`${hourListId}${h.value}`\"\n (click)=\"onHourChange(h.value)\">\n {{ h.viewValue | number: \"2.0\" }}\n </li>\n }\n </ol>\n <ol\n #minuteList\n monaTimeSelectorList\n aria-label=\"Minutes\"\n [attr.aria-activedescendant]=\"`${minuteListId}${navigatedDate().minute}`\"\n [active]=\"focusedList() === 'minutes'\"\n [id]=\"minuteListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (m of minutes() | timeLimiter: \"m\" : navigatedDate() : minDate() : maxDate(); track m) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"m.value === minute()\"\n [value]=\"m.value\"\n [id]=\"`${minuteListId}${m.value}`\"\n (click)=\"onMinuteChange(m.value)\">\n {{ m.viewValue | number: \"2.0\" }}\n </li>\n }\n </ol>\n @if (showSeconds()) {\n <ol\n #secondList\n monaTimeSelectorList\n aria-label=\"Seconds\"\n [attr.aria-activedescendant]=\"`${secondListId}${navigatedDate().second}`\"\n [active]=\"focusedList() === 'seconds'\"\n [id]=\"secondListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (s of seconds() | timeLimiter: \"s\" : navigatedDate() : minDate() : maxDate(); track s) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"s.value === second()\"\n [value]=\"s.value\"\n [id]=\"`${secondListId}${s.value}`\"\n (click)=\"onSecondChange(s.value)\">\n {{ s.value | number: \"2.0\" }}\n </li>\n }\n </ol>\n }\n @if (hourFormat() === \"12\") {\n <ol\n #meridiemList\n monaTimeSelectorList\n aria-label=\"AM/PM\"\n [attr.aria-activedescendant]=\"`${meridiemListId}${meridiem()}`\"\n [active]=\"focusedList() === 'meridiem'\"\n [id]=\"meridiemListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @if (amMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'AM'\"\n [value]=\"'AM'\"\n (click)=\"onMeridiemClick('AM')\"\n [id]=\"`${meridiemListId}AM`\">\n AM\n </li>\n }\n @if (pmMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'PM'\"\n [value]=\"'PM'\"\n (click)=\"onMeridiemClick('PM')\"\n [id]=\"`${meridiemListId}PM`\">\n PM\n </li>\n }\n </ol>\n }\n</div>\n\n@if (footer()) {\n <div [class]=\"footerClass()\">\n <button monaButton look=\"primary\" [rounded]=\"rounded()\" [size]=\"size()\" (click)=\"onSetTimeClick()\">Set</button>\n </div>\n}\n", dependencies: [{ kind: "directive", type: TimeSelectorItemDirective, selector: "li[monaTimeSelectorItem]", inputs: ["selected", "size", "value"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: TimeSelectorListDirective, selector: "ol[monaTimeSelectorList]", inputs: ["active", "popupHeight", "size"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: TimeLimiterPipe, name: "timeLimiter" }] }); }
|
|
634
634
|
}
|
|
635
635
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimeSelectorComponent, decorators: [{
|
|
636
636
|
type: Component,
|
|
@@ -709,7 +709,7 @@ class WindowContentComponent {
|
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: WindowContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
712
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: WindowContentComponent, isStandalone: true, selector: "mona-window-content", host: { attributes: { "role": "dialog" }, properties: { "class": "baseClass()", "attr.aria-labelledby": "headerId", "attr.aria-modal": "windowData.modal ?? false" } }, viewQueries: [{ propertyName: "componentAnchor", first: true, predicate: ["componentAnchor"], descendants: true, read: ViewContainerRef, isSignal: true }], hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0, template: "<div [class]=\"contentContainerClass()\">\n <div\n [class]=\"titleBarClass()\"\n monaWindowDragHandler\n (dblclick)=\"onMaximizeClick()\"\n [draggable]=\"windowData.draggable\"\n [windowRef]=\"windowData.windowReference\"\n [attr.tabindex]=\"windowData.draggable ? 0 : null\"\n [attr.aria-label]=\"windowData.draggable ? 'Move window. Use arrow keys to move.' : null\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (windowData.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"windowData.titleTemplate\"></ng-container>\n } @else {\n <span [class]=\"titleClass()\">{{ windowData.title ?? \"\" }}</span>\n }\n </div>\n <div [class]=\"titleBarActionClass()\">\n @if (windowData.actionTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"windowData.actionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowData.windowReference.windowRef }\">\n </ng-container>\n }\n @let maximizeTitle = maximized() || minimized() ? \"Restore\" : \"Maximize\";\n @if (windowData.minimizable && !minimized()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"'Minimize'\"\n aria-label=\"Minimize\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMinimizeClick()\">\n <svg lucideMinus [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.maximizable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"maximizeTitle\"\n [attr.aria-label]=\"maximizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMaximizeClick()\">\n <svg [lucideIcon]=\"maximizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.closable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n title=\"Close\"\n aria-label=\"Close window\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n </div>\n </div>\n @if (!minimized()) {\n <div [class]=\"contentClass()\">\n @switch (contentType()) {\n @case (\"template\") {\n <ng-container [ngTemplateOutlet]=\"contentTemplate()!\"></ng-container>\n }\n @case (\"component\") {\n <ng-container #componentAnchor></ng-container>\n }\n }\n </div>\n @if (windowData.footerTemplate) {\n <div>\n <ng-container [ngTemplateOutlet]=\"windowData.footerTemplate\"></ng-container>\n </div>\n }\n }\n @if (windowData.resizable && !maximized()) {\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"north\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top. Use arrow keys to resize.\"\n [class]=\"'north' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"south\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom. Use arrow keys to resize.\"\n [class]=\"'south' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"east\"\n tabindex=\"0\"\n aria-label=\"Resize window from the right. Use arrow keys to resize.\"\n [class]=\"'east' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"west\"\n tabindex=\"0\"\n aria-label=\"Resize window from the left. Use arrow keys to resize.\"\n [class]=\"'west' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northeast\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top-right corner. Use arrow keys to resize.\"\n [class]=\"'northeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northwest\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top-left corner. Use arrow keys to resize.\"\n [class]=\"'northwest' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southeast\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom-right corner. Use arrow keys to resize.\"\n [class]=\"'southeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southwest\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom-left corner. Use arrow keys to resize.\"\n [class]=\"'southwest' | monaResizePosition\"></div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: WindowDragHandlerDirective, selector: "div[monaWindowDragHandler]", inputs: ["draggable", "windowRef"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: WindowResizeHandlerDirective, selector: "div[monaWindowResizeHandler]", inputs: ["direction", "maxHeight", "maxWidth", "minHeight", "minWidth", "windowRef"] }, { kind: "component", type: LucideMinus, selector: "svg[lucideMinus]" }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "pipe", type: ResizePositionPipe, name: "monaResizePosition" }] }); }
|
|
712
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: WindowContentComponent, isStandalone: true, selector: "mona-window-content", host: { attributes: { "role": "dialog" }, properties: { "class": "baseClass()", "attr.aria-labelledby": "headerId", "attr.aria-modal": "windowData.modal ?? false" } }, viewQueries: [{ propertyName: "componentAnchor", first: true, predicate: ["componentAnchor"], descendants: true, read: ViewContainerRef, isSignal: true }], hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0, template: "<div [class]=\"contentContainerClass()\">\n <div\n [class]=\"titleBarClass()\"\n monaWindowDragHandler\n (dblclick)=\"onMaximizeClick()\"\n [draggable]=\"windowData.draggable\"\n [windowRef]=\"windowData.windowReference\"\n [attr.tabindex]=\"windowData.draggable ? 0 : null\"\n [attr.aria-label]=\"windowData.draggable ? 'Move window. Use arrow keys to move.' : null\">\n <div [id]=\"headerId\" [class]=\"titleContainerClass()\">\n @if (windowData.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"windowData.titleTemplate\"></ng-container>\n } @else {\n <span [class]=\"titleClass()\">{{ windowData.title ?? \"\" }}</span>\n }\n </div>\n <div [class]=\"titleBarActionClass()\">\n @if (windowData.actionTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"windowData.actionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: windowData.windowReference.windowRef }\">\n </ng-container>\n }\n @let maximizeTitle = maximized() || minimized() ? \"Restore\" : \"Maximize\";\n @if (windowData.minimizable && !minimized()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"'Minimize'\"\n aria-label=\"Minimize\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMinimizeClick()\">\n <svg lucideMinus [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.maximizable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n [title]=\"maximizeTitle\"\n [attr.aria-label]=\"maximizeTitle\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onMaximizeClick()\">\n <svg [lucideIcon]=\"maximizeIcon()\" [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n @if (windowData.closable) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n type=\"button\"\n [iconOnly]=\"true\"\n [rounded]=\"windowData.rounded\"\n title=\"Close\"\n aria-label=\"Close window\"\n (dblclick)=\"$event.stopPropagation()\"\n (click)=\"onCloseClick($event)\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n }\n </div>\n </div>\n @if (!minimized()) {\n <div [class]=\"contentClass()\">\n @switch (contentType()) {\n @case (\"template\") {\n <ng-container [ngTemplateOutlet]=\"contentTemplate()!\"></ng-container>\n }\n @case (\"component\") {\n <ng-container #componentAnchor></ng-container>\n }\n }\n </div>\n @if (windowData.footerTemplate) {\n <div>\n <ng-container [ngTemplateOutlet]=\"windowData.footerTemplate\"></ng-container>\n </div>\n }\n }\n @if (windowData.resizable && !maximized()) {\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"north\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top. Use arrow keys to resize.\"\n [class]=\"'north' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"south\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom. Use arrow keys to resize.\"\n [class]=\"'south' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"east\"\n tabindex=\"0\"\n aria-label=\"Resize window from the right. Use arrow keys to resize.\"\n [class]=\"'east' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"west\"\n tabindex=\"0\"\n aria-label=\"Resize window from the left. Use arrow keys to resize.\"\n [class]=\"'west' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northeast\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top-right corner. Use arrow keys to resize.\"\n [class]=\"'northeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"northwest\"\n tabindex=\"0\"\n aria-label=\"Resize window from the top-left corner. Use arrow keys to resize.\"\n [class]=\"'northwest' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southeast\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom-right corner. Use arrow keys to resize.\"\n [class]=\"'southeast' | monaResizePosition\"></div>\n <div\n monaWindowResizeHandler\n [minWidth]=\"windowData.minWidth\"\n [minHeight]=\"windowData.minHeight\"\n [maxWidth]=\"windowData.maxWidth\"\n [maxHeight]=\"windowData.maxHeight\"\n [windowRef]=\"windowData.windowReference\"\n direction=\"southwest\"\n tabindex=\"0\"\n aria-label=\"Resize window from the bottom-left corner. Use arrow keys to resize.\"\n [class]=\"'southwest' | monaResizePosition\"></div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: WindowDragHandlerDirective, selector: "div[monaWindowDragHandler]", inputs: ["draggable", "windowRef"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: WindowResizeHandlerDirective, selector: "div[monaWindowResizeHandler]", inputs: ["direction", "maxHeight", "maxWidth", "minHeight", "minWidth", "windowRef"] }, { kind: "component", type: LucideMinus, selector: "svg[lucideMinus]" }, { kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "pipe", type: ResizePositionPipe, name: "monaResizePosition" }] }); }
|
|
713
713
|
}
|
|
714
714
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: WindowContentComponent, decorators: [{
|
|
715
715
|
type: Component,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanahoshi/mona-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "A very light Angular UI framework",
|
|
5
5
|
"author": "Nanahoshi",
|
|
6
6
|
"repository": {
|
|
@@ -265,6 +265,10 @@
|
|
|
265
265
|
"types": "./types/nanahoshi-mona-ui-scroll-view.d.ts",
|
|
266
266
|
"default": "./fesm2022/nanahoshi-mona-ui-scroll-view.mjs"
|
|
267
267
|
},
|
|
268
|
+
"./segmented": {
|
|
269
|
+
"types": "./types/nanahoshi-mona-ui-segmented.d.ts",
|
|
270
|
+
"default": "./fesm2022/nanahoshi-mona-ui-segmented.mjs"
|
|
271
|
+
},
|
|
268
272
|
"./sheet": {
|
|
269
273
|
"types": "./types/nanahoshi-mona-ui-sheet.d.ts",
|
|
270
274
|
"default": "./fesm2022/nanahoshi-mona-ui-sheet.mjs"
|
|
@@ -80,6 +80,12 @@ declare class ButtonDirective implements ButtonVariantsInput {
|
|
|
80
80
|
* @default 0
|
|
81
81
|
*/
|
|
82
82
|
readonly tabindex: _angular_core.InputSignalWithTransform<number, string | number>;
|
|
83
|
+
/**
|
|
84
|
+
* @description Native `type` attribute of the button. Defaults to `"button"` to prevent accidental
|
|
85
|
+
* form submission; set to `"submit"` or `"reset"` explicitly when that behavior is intended.
|
|
86
|
+
* @default "button"
|
|
87
|
+
*/
|
|
88
|
+
readonly type: _angular_core.InputSignal<"button" | "reset" | "submit">;
|
|
83
89
|
/**
|
|
84
90
|
* @description Enables toggle behavior — each click flips the `selected` state and `aria-pressed` is managed.
|
|
85
91
|
* Must use `[toggleable]="true"` binding syntax, not bare attribute form.
|
|
@@ -93,7 +99,7 @@ declare class ButtonDirective implements ButtonVariantsInput {
|
|
|
93
99
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
94
100
|
constructor();
|
|
95
101
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonDirective, never>;
|
|
96
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonDirective, "button[monaButton]", never, { "ariaHasPopup": { "alias": "aria-haspopup"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "loading": "loadingChange"; "look": "lookChange"; "selected": "selectedChange"; }, never, never, true, never>;
|
|
102
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonDirective, "button[monaButton]", never, { "ariaHasPopup": { "alias": "aria-haspopup"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "loading": "loadingChange"; "look": "lookChange"; "selected": "selectedChange"; }, never, never, true, never>;
|
|
97
103
|
}
|
|
98
104
|
|
|
99
105
|
declare class ButtonService {
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { FormValueControl } from '@angular/forms/signals';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
6
|
+
|
|
7
|
+
type SegmentedValue = string | number;
|
|
8
|
+
|
|
9
|
+
interface SegmentedOption<T extends SegmentedValue = SegmentedValue> {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly value: T;
|
|
12
|
+
readonly disabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const segmentedContainerThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
16
|
+
declare const segmentedOptionThemeVariants: (props?: ({
|
|
17
|
+
size?: "small" | "medium" | "large" | null | undefined;
|
|
18
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
19
|
+
type SegmentedContainerVariantProps = VariantProps<typeof segmentedContainerThemeVariants>;
|
|
20
|
+
type SegmentedContainerVariantInput = VariantInputs<SegmentedContainerVariantProps>;
|
|
21
|
+
type SegmentedOptionVariantProps = VariantProps<typeof segmentedOptionThemeVariants>;
|
|
22
|
+
type SegmentedOptionVariantInput = VariantInputs<SegmentedOptionVariantProps>;
|
|
23
|
+
type SegmentedVariantProps = SegmentedContainerVariantProps & SegmentedOptionVariantProps;
|
|
24
|
+
type SegmentedVariantInput = SegmentedContainerVariantInput & SegmentedOptionVariantInput;
|
|
25
|
+
|
|
26
|
+
declare class SegmentedComponent<T extends SegmentedValue = SegmentedValue> implements SegmentedVariantInput, FormValueControl<T | null> {
|
|
27
|
+
protected readonly containerClasses: _angular_core.Signal<string>;
|
|
28
|
+
protected readonly groupName: string;
|
|
29
|
+
protected readonly inputClasses: _angular_core.Signal<string>;
|
|
30
|
+
protected readonly invalidState: _angular_core.Signal<boolean>;
|
|
31
|
+
protected readonly optionClasses: _angular_core.Signal<string>;
|
|
32
|
+
/**
|
|
33
|
+
* @description Accessible name for the radio group. Provide either `aria-label` or `aria-labelledby`.
|
|
34
|
+
* @default null
|
|
35
|
+
*/
|
|
36
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null>;
|
|
37
|
+
/**
|
|
38
|
+
* @description ID of an external element that provides the accessible name for the radio group.
|
|
39
|
+
* @default null
|
|
40
|
+
*/
|
|
41
|
+
readonly ariaLabelledBy: _angular_core.InputSignal<string | null>;
|
|
42
|
+
/**
|
|
43
|
+
* @description Disables every option in the group and prevents value changes.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* @description Marks the component as invalid. Error styling requires both `invalid` and `touched` to be `true`.
|
|
49
|
+
* When bound to a signal form field via `[formField]`, this is written by the signal forms `Field` directive.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* @description The list of selectable options. Exactly one option is selected at a time.
|
|
55
|
+
*/
|
|
56
|
+
readonly options: _angular_core.InputSignal<readonly SegmentedOption<T>[]>;
|
|
57
|
+
/**
|
|
58
|
+
* @description Size preset controlling the height, horizontal padding, text size, and spacing of each option.
|
|
59
|
+
* @default "medium"
|
|
60
|
+
*/
|
|
61
|
+
readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
|
|
62
|
+
/**
|
|
63
|
+
* @description Emitted when the selected value changes or focus leaves a radio input.
|
|
64
|
+
*/
|
|
65
|
+
readonly touch: _angular_core.OutputEmitterRef<void>;
|
|
66
|
+
/**
|
|
67
|
+
* @description Marks the component as touched. When bound to a signal form field via `[formField]`,
|
|
68
|
+
* this is written by the signal forms `Field` directive.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
readonly touched: _angular_core.InputSignal<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* @description Additional CSS classes merged onto the host element via `tailwind-merge`.
|
|
74
|
+
* @default ""
|
|
75
|
+
*/
|
|
76
|
+
readonly userClass: _angular_core.InputSignal<string>;
|
|
77
|
+
/**
|
|
78
|
+
* @description The currently selected value. When it matches no current option, no option is checked.
|
|
79
|
+
* A `null` value is allowed initially but cannot be restored through segmented interaction.
|
|
80
|
+
* @default null
|
|
81
|
+
*/
|
|
82
|
+
readonly value: _angular_core.ModelSignal<T | null>;
|
|
83
|
+
protected onOptionBlur(): void;
|
|
84
|
+
protected onOptionChange(option: SegmentedOption<T>): void;
|
|
85
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SegmentedComponent<any>, never>;
|
|
86
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SegmentedComponent<any>, "mona-segmented", never, { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "touch": "touch"; "value": "valueChange"; }, never, never, true, never>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { SegmentedComponent };
|
|
90
|
+
export type { SegmentedOption, SegmentedValue, SegmentedVariantProps };
|
|
@@ -19,6 +19,8 @@ declare class TabSelectEvent extends PreventableEvent {
|
|
|
19
19
|
get index(): number;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
type TabsPosition = "top" | "bottom" | "left" | "right";
|
|
23
|
+
|
|
22
24
|
declare class TabContentTemplateDirective {
|
|
23
25
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabContentTemplateDirective, never>;
|
|
24
26
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabContentTemplateDirective, "ng-template[monaTabContentTemplate]", never, {}, {}, never, never, true, never>;
|
|
@@ -41,21 +43,23 @@ interface TabItem {
|
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
declare const tabListBaseThemeVariants: (props?: ({
|
|
44
|
-
|
|
45
|
-
size?: "small" | "medium" | "large" | null | undefined;
|
|
46
|
+
position?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
46
47
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
47
48
|
declare const tabListListWrapperThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
48
|
-
declare const tabListListThemeVariants: (props?:
|
|
49
|
+
declare const tabListListThemeVariants: (props?: ({
|
|
50
|
+
position?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
51
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
49
52
|
declare const tabListListItemThemeVariants: (props?: ({
|
|
50
53
|
active?: boolean | null | undefined;
|
|
51
54
|
disabled?: boolean | null | undefined;
|
|
52
|
-
|
|
55
|
+
position?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
56
|
+
size?: "small" | "medium" | "large" | null | undefined;
|
|
53
57
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
54
58
|
declare const tabListScrollButtonThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
55
|
-
declare const tabContentThemeVariants: (props?:
|
|
56
|
-
|
|
59
|
+
declare const tabContentThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
60
|
+
declare const tabsBaseThemeVariants: (props?: ({
|
|
61
|
+
position?: "top" | "bottom" | "left" | "right" | null | undefined;
|
|
57
62
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
58
|
-
declare const tabsBaseThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
59
63
|
type TabListBaseVariantProps = VariantProps<typeof tabListBaseThemeVariants>;
|
|
60
64
|
type TabListBaseVariantInput = VariantInputs<TabListBaseVariantProps>;
|
|
61
65
|
type TabListListWrapperVariantProps = VariantProps<typeof tabListListWrapperThemeVariants>;
|
|
@@ -96,10 +100,10 @@ declare class TabsComponent implements TabsVariantInput {
|
|
|
96
100
|
*/
|
|
97
101
|
readonly keepTabContent: _angular_core.InputSignal<boolean>;
|
|
98
102
|
/**
|
|
99
|
-
* @description
|
|
100
|
-
* @default "
|
|
103
|
+
* @description Placement of the tab list relative to the tab content.
|
|
104
|
+
* @default "top"
|
|
101
105
|
*/
|
|
102
|
-
readonly
|
|
106
|
+
readonly position: _angular_core.InputSignal<"top" | "bottom" | "left" | "right" | null | undefined>;
|
|
103
107
|
/**
|
|
104
108
|
* @description Size preset controlling the tabs' dimensions.
|
|
105
109
|
* @default "medium"
|
|
@@ -120,7 +124,7 @@ declare class TabsComponent implements TabsVariantInput {
|
|
|
120
124
|
readonly userClass: _angular_core.InputSignal<string>;
|
|
121
125
|
protected handlePanelKeyDown(event: KeyboardEvent): void;
|
|
122
126
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabsComponent, never>;
|
|
123
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabsComponent, "mona-tabs", never, { "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "keepTabContent": { "alias": "keepTabContent"; "required": false; "isSignal": true; }; "
|
|
127
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabsComponent, "mona-tabs", never, { "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "keepTabContent": { "alias": "keepTabContent"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "tabClose": "tabClose"; "tabSelect": "tabSelect"; }, ["tabs"], never, true, never>;
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
declare class TabComponent {
|
|
@@ -154,3 +158,4 @@ declare class TabComponent {
|
|
|
154
158
|
}
|
|
155
159
|
|
|
156
160
|
export { TabCloseEvent, TabComponent, TabContentTemplateDirective, TabSelectEvent, TabTitleTemplateDirective, TabsComponent };
|
|
161
|
+
export type { TabsPosition };
|
|
@@ -23,7 +23,7 @@ type ThemeEffectVariable = `--mona-effect-${ThemeEffectLevel}-background-color`
|
|
|
23
23
|
type ThemeEffects = Readonly<Record<ThemeEffectVariable, string>>;
|
|
24
24
|
type ThemeShapeVariable = "--radius-sm" | "--radius-md" | "--radius-lg";
|
|
25
25
|
type ThemeShape = Readonly<Record<ThemeShapeVariable, string>>;
|
|
26
|
-
type ThemeComponentVariable = "--mona-calendar-background" | "--mona-calendar-shadow" | "--mona-list-background" | "--mona-list-disabled-background" | "--mona-list-group-background" | "--mona-list-group-border-width" | "--mona-list-group-font-weight" | "--mona-menubar-background" | "--mona-menubar-shadow" | "--mona-pager-background" | "--mona-slider-handle-border-color"
|
|
26
|
+
type ThemeComponentVariable = "--mona-calendar-background" | "--mona-calendar-shadow" | "--mona-list-background" | "--mona-list-disabled-background" | "--mona-list-group-background" | "--mona-list-group-border-width" | "--mona-list-group-font-weight" | "--mona-menubar-background" | "--mona-menubar-shadow" | "--mona-pager-background" | "--mona-slider-handle-border-color";
|
|
27
27
|
type ThemeComponents = Readonly<Record<ThemeComponentVariable, string>>;
|
|
28
28
|
interface ThemeProfile {
|
|
29
29
|
readonly colors: ThemeColors;
|