@nanahoshi/mona-ui 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/command/package.json +4 -0
- package/docs/auto-complete.md +733 -0
- package/docs/avatar.md +220 -0
- package/docs/breadcrumb.md +320 -0
- package/docs/button-group.md +392 -0
- package/docs/button.md +256 -0
- package/docs/calendar.md +515 -0
- package/docs/card.md +292 -0
- package/docs/chart.md +4058 -0
- package/docs/checkbox.md +374 -0
- package/docs/chip.md +339 -0
- package/docs/circular-progress-bar.md +287 -0
- package/docs/collapsible.md +308 -0
- package/docs/color-gradient.md +336 -0
- package/docs/color-palette.md +317 -0
- package/docs/color-picker.md +387 -0
- package/docs/combo-box.md +764 -0
- package/docs/command.md +582 -0
- package/docs/contextmenu.md +530 -0
- package/docs/date-picker.md +251 -0
- package/docs/datetime-picker.md +284 -0
- package/docs/decimal-textbox.md +260 -0
- package/docs/dialog.md +822 -0
- package/docs/dropdown-button.md +507 -0
- package/docs/dropdown-list.md +779 -0
- package/docs/editor.md +374 -0
- package/docs/expansion-panel.md +348 -0
- package/docs/fieldset.md +217 -0
- package/docs/forms.md +162 -0
- package/docs/grid.md +2053 -0
- package/docs/input.md +197 -0
- package/docs/installation.md +54 -0
- package/docs/introduction.md +46 -0
- package/docs/label.md +340 -0
- package/docs/list-box.md +637 -0
- package/docs/list-view.md +584 -0
- package/docs/menubar.md +559 -0
- package/docs/multi-select.md +765 -0
- package/docs/notification.md +460 -0
- package/docs/numeric-textbox.md +301 -0
- package/docs/otp-input.md +539 -0
- package/docs/pager.md +513 -0
- package/docs/placeholder.md +176 -0
- package/docs/popover.md +423 -0
- package/docs/popup-menu.md +658 -0
- package/docs/popup.md +617 -0
- package/docs/progress-bar.md +368 -0
- package/docs/radio-button.md +451 -0
- package/docs/range-slider.md +367 -0
- package/docs/rating.md +518 -0
- package/docs/scroll-view.md +375 -0
- package/docs/segmented.md +434 -0
- package/docs/sheet.md +348 -0
- package/docs/sidebar.md +1126 -0
- package/docs/skeleton.md +181 -0
- package/docs/slider.md +423 -0
- package/docs/spinner.md +370 -0
- package/docs/split-button.md +522 -0
- package/docs/splitter.md +342 -0
- package/docs/stepper.md +539 -0
- package/docs/switch.md +340 -0
- package/docs/tabs.md +542 -0
- package/docs/textarea.md +196 -0
- package/docs/textbox.md +332 -0
- package/docs/theming.md +403 -0
- package/docs/time-picker.md +254 -0
- package/docs/tooltip-directive.md +340 -0
- package/docs/tooltip.md +321 -0
- package/docs/tree-view.md +1018 -0
- package/docs/window.md +663 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +8 -0
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-button.mjs +14 -2
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +5 -2
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +108 -22
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +16 -2
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-command.mjs +924 -0
- package/fesm2022/nanahoshi-mona-ui-common.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +10 -6
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +9 -5
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +9 -5
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +55 -1
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -2
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +13 -0
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +5 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs → nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs → nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs} +18 -35
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs} +4653 -4529
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +1 -0
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +168 -0
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +19 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +32 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +10 -0
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +15 -8
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +8 -5
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +9 -0
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +5 -0
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +14 -6
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +48 -183
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +16 -0
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +4 -0
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +7 -3
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +8 -3
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +10 -7
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +18 -21
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +11 -8
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +9 -1
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +53 -21
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +2 -1
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +16 -5
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +13 -11
- package/fesm2022/nanahoshi-mona-ui-window.mjs +12 -5
- package/i18n/catalogs/en-US.messages.json +10 -0
- package/internal/popup-menu/package.json +4 -0
- package/llms.txt +123 -0
- package/locales/ar-sa/ar-sa.messages.json +10 -0
- package/locales/de-de/de-de.messages.json +10 -0
- package/locales/es-es/es-es.messages.json +10 -0
- package/locales/fr-fr/fr-fr.messages.json +10 -0
- package/locales/id-id/id-id.messages.json +10 -0
- package/locales/it-it/it-it.messages.json +10 -0
- package/locales/ja-jp/ja-jp.messages.json +10 -0
- package/locales/ko-kr/ko-kr.messages.json +10 -0
- package/locales/pt-br/pt-br.messages.json +10 -0
- package/locales/ru-ru/ru-ru.messages.json +10 -0
- package/locales/tr-tr/tr-tr.messages.json +10 -0
- package/locales/zh-cn/zh-cn.messages.json +10 -0
- package/locales/zh-tw/zh-tw.messages.json +10 -0
- package/package.json +9 -1
- package/styles.css +12 -2
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -1
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +8 -0
- package/types/nanahoshi-mona-ui-button.d.ts +12 -0
- package/types/nanahoshi-mona-ui-calendar.d.ts +3 -0
- package/types/nanahoshi-mona-ui-chart.d.ts +200 -0
- package/types/nanahoshi-mona-ui-check-box.d.ts +4 -0
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +4 -0
- package/types/nanahoshi-mona-ui-collapsible.d.ts +10 -0
- package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -1
- package/types/nanahoshi-mona-ui-command.d.ts +253 -0
- package/types/nanahoshi-mona-ui-common.d.ts +17 -1
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +5 -2
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-dialog.d.ts +58 -1
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +7 -3
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +55 -1
- package/types/nanahoshi-mona-ui-editor.d.ts +31 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +13 -0
- package/types/nanahoshi-mona-ui-fieldset.d.ts +5 -0
- package/types/nanahoshi-mona-ui-grid.d.ts +162 -35
- package/types/nanahoshi-mona-ui-i18n.d.ts +144 -1
- package/types/nanahoshi-mona-ui-internal-list.d.ts +16 -1
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +165 -0
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +21 -2
- package/types/nanahoshi-mona-ui-internal.d.ts +4 -5
- package/types/nanahoshi-mona-ui-label.d.ts +1 -0
- package/types/nanahoshi-mona-ui-list-box.d.ts +27 -4
- package/types/nanahoshi-mona-ui-list-view.d.ts +34 -1
- package/types/nanahoshi-mona-ui-list.d.ts +1 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +10 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +10 -0
- package/types/nanahoshi-mona-ui-menubar.d.ts +10 -3
- package/types/nanahoshi-mona-ui-multi-select.d.ts +3 -3
- package/types/nanahoshi-mona-ui-notification.d.ts +9 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -1
- package/types/nanahoshi-mona-ui-otp-input.d.ts +1 -0
- package/types/nanahoshi-mona-ui-pager.d.ts +5 -1
- package/types/nanahoshi-mona-ui-popover.d.ts +9 -1
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +48 -161
- package/types/nanahoshi-mona-ui-popup.d.ts +16 -0
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +4 -0
- package/types/nanahoshi-mona-ui-rating.d.ts +2 -0
- package/types/nanahoshi-mona-ui-segmented.d.ts +1 -0
- package/types/nanahoshi-mona-ui-sheet.d.ts +1 -1
- package/types/nanahoshi-mona-ui-slider.d.ts +2 -0
- package/types/nanahoshi-mona-ui-spinner.d.ts +7 -0
- package/types/nanahoshi-mona-ui-split-button.d.ts +7 -4
- package/types/nanahoshi-mona-ui-stepper.d.ts +11 -2
- package/types/nanahoshi-mona-ui-tabs.d.ts +4 -1
- package/types/nanahoshi-mona-ui-text-box.d.ts +9 -1
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -1
- package/types/nanahoshi-mona-ui-tooltip.d.ts +10 -2
- package/types/nanahoshi-mona-ui-tree-view.d.ts +6 -5
- package/types/nanahoshi-mona-ui-window.d.ts +66 -1
|
@@ -189,7 +189,7 @@ const sliderTrackThemeVariants = cva(`
|
|
|
189
189
|
relative z-2 cursor-pointer
|
|
190
190
|
overflow-hidden
|
|
191
191
|
bg-surface-muted text-foreground
|
|
192
|
-
border border-input-border
|
|
192
|
+
contrast-more:border contrast-more:border-input-border
|
|
193
193
|
|
|
194
194
|
data-[orientation="horizontal"]:w-full
|
|
195
195
|
data-[orientation="horizontal"]:h-1.5
|
|
@@ -842,6 +842,7 @@ class SliderComponent extends SliderBaseComponent {
|
|
|
842
842
|
this.value = model(0, /* @ts-ignore */
|
|
843
843
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
844
844
|
}
|
|
845
|
+
/** Moves focus to the handle. Does nothing while disabled. */
|
|
845
846
|
focus(options) {
|
|
846
847
|
if (!this.effectiveDisabled()) {
|
|
847
848
|
this.sliderHandle().nativeElement.focus(options);
|
|
@@ -1020,6 +1021,7 @@ class RangeSliderComponent extends SliderBaseComponent {
|
|
|
1020
1021
|
this.value = model([0, 10], /* @ts-ignore */
|
|
1021
1022
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
1022
1023
|
}
|
|
1024
|
+
/** Moves focus to the lower handle. Does nothing while disabled. */
|
|
1023
1025
|
focus(options) {
|
|
1024
1026
|
if (!this.effectiveDisabled()) {
|
|
1025
1027
|
this.sliderHandle().nativeElement.focus(options);
|
|
@@ -1177,13 +1179,16 @@ class RangeSliderComponent extends SliderBaseComponent {
|
|
|
1177
1179
|
this.zone.run(() => this.value.set([newMinValue, newMaxValue]));
|
|
1178
1180
|
}
|
|
1179
1181
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RangeSliderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1180
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: RangeSliderComponent, isStandalone: true, selector: "mona-range-slider", inputs: { ariaLabelEnd: { classPropertyName: "ariaLabelEnd", publicName: "aria-label-end", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelStart: { classPropertyName: "ariaLabelStart", publicName: "aria-label-start", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.aria-describedby": "null", "class": "baseClasses()", "class.mona-slider": "true", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-orientation": "orientation()", "attr.data-readonly": "readonly() || null", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "labelledBy()", "attr.role": "'group'" } }, viewQueries: [{ propertyName: "secondarySliderHandle", first: true, predicate: ["secondarySliderHandle"], descendants: true, isSignal: true }, { propertyName: "sliderHandle", first: true, predicate: ["sliderHandle"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n [class]=\"trackClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style.height]=\"orientation() === 'horizontal' ? sliderTrackSize() : undefined\"\n [style.width]=\"orientation() === 'vertical' ? sliderTrackSize() : undefined\"\n [style]=\"trackBackgroundStyle()\">\n <div\n [class]=\"selectionClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [style.left.%]=\"horizontalSelectionLeft()\"\n [style.right.%]=\"horizontalSelectionRight()\"\n [style.bottom.%]=\"orientation() === 'vertical' ? selectionLeft() : undefined\"\n [style.top.%]=\"orientation() === 'vertical' ? 100 - selectionRight() : undefined\"\n [style]=\"selectionBackgroundStyle()\"></div>\n</div>\n@if (showTicks()) {\n <div [class]=\"tickListClasses()\" [attr.data-orientation]=\"orientation()\">\n @for (tick of renderTicks(); track tick.index) {\n <span\n [class]=\"tickClasses()\"\n [style]=\"tick | tickStyle: tickStyleArgs()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-value]=\"tick.value\"\n data-slider-tick>\n </span>\n }\n </div>\n}\n@if (showTicks() && showLabels()) {\n <div\n [class]=\"tickLabelListClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-label-position]=\"labelPosition()\">\n @for (tick of labelTicks(); track tick.index) {\n <span\n [class]=\"tickLabelClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style]=\"tick | labelStyle: labelStyleArgs()\">\n @if (!tickValueTemplate()) {\n <span>{{ tick.label }}</span>\n } @else {\n <span>\n <ng-container\n *ngTemplateOutlet=\"\n tickValueTemplate() ?? null;\n context: { $implicit: tick.value }\n \"></ng-container>\n </span>\n }\n </span>\n }\n </div>\n}\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-rtl]=\"isRtl() || null\"\n [attr.data-focused]=\"primaryHandleFocused()\"\n [style]=\"primaryHandleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' && !isRtl() ? primaryHandlePosition() : undefined\"\n [style.right.%]=\"orientation() === 'horizontal' && isRtl() ? primaryHandlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? primaryHandlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"effectiveMin()\"\n [attr.aria-valuemax]=\"normalizedValue()[1]\"\n [attr.aria-valuenow]=\"normalizedValue()[0]\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()[0]) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalidState() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.data-invalid]=\"invalidState() || null\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-label]=\"computedAriaLabelStart()\"\n [attr.aria-labelledby]=\"startLabelledBy()\"\n [attr.id]=\"startHandleId\"\n #sliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue()[0] }\"></ng-container>\n }\n</div>\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-rtl]=\"isRtl() || null\"\n [attr.data-focused]=\"secondaryHandleFocused()\"\n [style]=\"secondaryHandleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' && !isRtl() ? secondaryHandlePosition() : undefined\"\n [style.right.%]=\"orientation() === 'horizontal' && isRtl() ? secondaryHandlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? secondaryHandlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"normalizedValue()[0]\"\n [attr.aria-valuemax]=\"effectiveMax()\"\n [attr.aria-valuenow]=\"normalizedValue()[1]\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()[1]) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalidState() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.data-invalid]=\"invalidState() || null\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-label]=\"computedAriaLabelEnd()\"\n [attr.aria-labelledby]=\"endLabelledBy()\"\n [attr.id]=\"endHandleId\"\n #secondarySliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue()[1] }\"></ng-container>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: LabelStylePipe, name: "labelStyle" }, { kind: "pipe", type: TickStylePipe, name: "tickStyle" }] }); }
|
|
1182
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: RangeSliderComponent, isStandalone: true, selector: "mona-range-slider", inputs: { ariaLabelEnd: { classPropertyName: "ariaLabelEnd", publicName: "aria-label-end", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelStart: { classPropertyName: "ariaLabelStart", publicName: "aria-label-start", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.aria-describedby": "null", "attr.aria-label-end": "null", "attr.aria-label-start": "null", "class": "baseClasses()", "class.mona-slider": "true", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-orientation": "orientation()", "attr.data-readonly": "readonly() || null", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "labelledBy()", "attr.role": "'group'" } }, viewQueries: [{ propertyName: "secondarySliderHandle", first: true, predicate: ["secondarySliderHandle"], descendants: true, isSignal: true }, { propertyName: "sliderHandle", first: true, predicate: ["sliderHandle"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n [class]=\"trackClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style.height]=\"orientation() === 'horizontal' ? sliderTrackSize() : undefined\"\n [style.width]=\"orientation() === 'vertical' ? sliderTrackSize() : undefined\"\n [style]=\"trackBackgroundStyle()\">\n <div\n [class]=\"selectionClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [style.left.%]=\"horizontalSelectionLeft()\"\n [style.right.%]=\"horizontalSelectionRight()\"\n [style.bottom.%]=\"orientation() === 'vertical' ? selectionLeft() : undefined\"\n [style.top.%]=\"orientation() === 'vertical' ? 100 - selectionRight() : undefined\"\n [style]=\"selectionBackgroundStyle()\"></div>\n</div>\n@if (showTicks()) {\n <div [class]=\"tickListClasses()\" [attr.data-orientation]=\"orientation()\">\n @for (tick of renderTicks(); track tick.index) {\n <span\n [class]=\"tickClasses()\"\n [style]=\"tick | tickStyle: tickStyleArgs()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-value]=\"tick.value\"\n data-slider-tick>\n </span>\n }\n </div>\n}\n@if (showTicks() && showLabels()) {\n <div\n [class]=\"tickLabelListClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-label-position]=\"labelPosition()\">\n @for (tick of labelTicks(); track tick.index) {\n <span\n [class]=\"tickLabelClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [style]=\"tick | labelStyle: labelStyleArgs()\">\n @if (!tickValueTemplate()) {\n <span>{{ tick.label }}</span>\n } @else {\n <span>\n <ng-container\n *ngTemplateOutlet=\"\n tickValueTemplate() ?? null;\n context: { $implicit: tick.value }\n \"></ng-container>\n </span>\n }\n </span>\n }\n </div>\n}\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-rtl]=\"isRtl() || null\"\n [attr.data-focused]=\"primaryHandleFocused()\"\n [style]=\"primaryHandleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' && !isRtl() ? primaryHandlePosition() : undefined\"\n [style.right.%]=\"orientation() === 'horizontal' && isRtl() ? primaryHandlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? primaryHandlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"effectiveMin()\"\n [attr.aria-valuemax]=\"normalizedValue()[1]\"\n [attr.aria-valuenow]=\"normalizedValue()[0]\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()[0]) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalidState() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.data-invalid]=\"invalidState() || null\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-label]=\"computedAriaLabelStart()\"\n [attr.aria-labelledby]=\"startLabelledBy()\"\n [attr.id]=\"startHandleId\"\n #sliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue()[0] }\"></ng-container>\n }\n</div>\n<div\n [class]=\"sliderHandleClasses()\"\n [attr.data-orientation]=\"orientation()\"\n [attr.data-dragging]=\"dragging()\"\n [attr.data-rtl]=\"isRtl() || null\"\n [attr.data-focused]=\"secondaryHandleFocused()\"\n [style]=\"secondaryHandleStyle()\"\n [style.left.%]=\"orientation() === 'horizontal' && !isRtl() ? secondaryHandlePosition() : undefined\"\n [style.right.%]=\"orientation() === 'horizontal' && isRtl() ? secondaryHandlePosition() : undefined\"\n [style.bottom.%]=\"orientation() === 'vertical' ? secondaryHandlePosition() : undefined\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : 0\"\n [attr.role]=\"'slider'\"\n [attr.aria-valuemin]=\"normalizedValue()[0]\"\n [attr.aria-valuemax]=\"effectiveMax()\"\n [attr.aria-valuenow]=\"normalizedValue()[1]\"\n [attr.aria-valuetext]=\"ariaValueText() ? ariaValueText()!(normalizedValue()[1]) : null\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-disabled]=\"effectiveDisabled() || null\"\n [attr.aria-invalid]=\"invalidState() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.data-invalid]=\"invalidState() || null\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-label]=\"computedAriaLabelEnd()\"\n [attr.aria-labelledby]=\"endLabelledBy()\"\n [attr.id]=\"endHandleId\"\n #secondarySliderHandle>\n @if (handleTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"handleTemplate() ?? null; context: { $implicit: normalizedValue()[1] }\"></ng-container>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: LabelStylePipe, name: "labelStyle" }, { kind: "pipe", type: TickStylePipe, name: "tickStyle" }] }); }
|
|
1181
1183
|
}
|
|
1182
1184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: RangeSliderComponent, decorators: [{
|
|
1183
1185
|
type: Component,
|
|
1184
1186
|
args: [{ selector: "mona-range-slider", imports: [NgTemplateOutlet, LabelStylePipe, TickStylePipe], host: {
|
|
1185
|
-
// The description
|
|
1187
|
+
// The description and the handles' names are applied to the handles, so the host must not keep the static
|
|
1188
|
+
// attributes. aria-label-start and aria-label-end aren't ARIA attributes at all.
|
|
1186
1189
|
"[attr.aria-describedby]": "null",
|
|
1190
|
+
"[attr.aria-label-end]": "null",
|
|
1191
|
+
"[attr.aria-label-start]": "null",
|
|
1187
1192
|
"[class]": "baseClasses()",
|
|
1188
1193
|
"[class.mona-slider]": "true",
|
|
1189
1194
|
"[attr.data-disabled]": "effectiveDisabled() || null",
|
|
@@ -4,7 +4,8 @@ import { Directive, forwardRef, inject, DestroyRef, contentChildren, computed, c
|
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { LucideChevronDown } from '@lucide/angular';
|
|
6
6
|
import { ButtonDirective, BUTTON_GROUP_MEMBER } from '@nanahoshi/mona-ui/button';
|
|
7
|
-
import { PopupMenuGroupTemplateDirective,
|
|
7
|
+
import { PopupMenuGroupTemplateDirective, PopupMenuIconTemplateDirective, PopupMenuShortcutTemplateDirective, PopupMenuTextTemplateDirective, PopupMenuComponent, PopupMenuCheckboxItemComponent, PopupMenuGroupComponent, PopupMenuItemComponent, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuSeparatorComponent } from '@nanahoshi/mona-ui/popup-menu';
|
|
8
|
+
import { PopupMenuTemplateOrigin, PopupMenuGroupTemplateToken, PopupMenuIconTemplateToken, PopupMenuShortcutTemplateToken, PopupMenuTextTemplateToken, PopupMenuItemType, PopupMenuTemplateType, ensurePopupComponentTypes, PopupMenuOrigin, ensurePopupTemplateTypes, PopupMenuToken, PopupMenuRadioItemToken } from '@nanahoshi/mona-ui/internal/popup-menu';
|
|
8
9
|
import { createElementControlId } from '@nanahoshi/mona-ui/internal';
|
|
9
10
|
import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
|
|
10
11
|
import { fromEvent } from 'rxjs';
|
|
@@ -156,7 +157,7 @@ const splitButtonThemeVariants = cva(`
|
|
|
156
157
|
error: "",
|
|
157
158
|
ghost: "border-transparent",
|
|
158
159
|
info: "",
|
|
159
|
-
outline: "[&>button:not(:last-child)]:border-e [&>button:not(:last-child)]:border-border",
|
|
160
|
+
outline: "[&>button:not(:last-child)]:border-e [&>button:not(:last-child)]:border-input-border",
|
|
160
161
|
primary: "",
|
|
161
162
|
secondary: "",
|
|
162
163
|
success: "",
|
|
@@ -273,6 +274,8 @@ class SplitButtonComponent {
|
|
|
273
274
|
descendants: false });
|
|
274
275
|
this.mainButtonId = createElementControlId();
|
|
275
276
|
this.mainButtonTextTemplate = contentChild(SplitButtonTextTemplateDirective, { ...(ngDevMode ? { debugName: "mainButtonTextTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
277
|
+
/** The menu is named by the element it opens from, through this id. */
|
|
278
|
+
this.menuButtonId = createElementControlId();
|
|
276
279
|
this.menuButtonRef = viewChild("menuButton", /* @ts-ignore */
|
|
277
280
|
...(ngDevMode ? [{ debugName: "menuButtonRef" }] : /* istanbul ignore next */ []));
|
|
278
281
|
this.menuButtonTemplate = contentChild(SplitButtonMenuButtonTemplateDirective, { ...(ngDevMode ? { debugName: "menuButtonTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
@@ -306,10 +309,10 @@ class SplitButtonComponent {
|
|
|
306
309
|
this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
307
310
|
/**
|
|
308
311
|
* @description ID of an external element that provides the accessible name for the main action button.
|
|
309
|
-
* Takes precedence over `
|
|
312
|
+
* Takes precedence over `aria-label` when both are set.
|
|
310
313
|
* @default ""
|
|
311
314
|
*/
|
|
312
|
-
this.
|
|
315
|
+
this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
|
|
313
316
|
/**
|
|
314
317
|
* @description Emitted when the main action button is clicked.
|
|
315
318
|
*/
|
|
@@ -460,7 +463,7 @@ class SplitButtonComponent {
|
|
|
460
463
|
});
|
|
461
464
|
}
|
|
462
465
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
463
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitButtonComponent, isStandalone: true, selector: "mona-split-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null },
|
|
466
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: SplitButtonComponent, isStandalone: true, selector: "mona-split-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, menuButtonAriaLabel: { classPropertyName: "menuButtonAriaLabel", publicName: "menuButtonAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick", menuItemClick: "menuItemClick" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-busy": "loading() || null", "attr.aria-label": "null", "attr.aria-labelledby": "mainButtonId", "class": "classes()" } }, providers: [{ provide: BUTTON_GROUP_MEMBER, useExisting: SplitButtonComponent }], queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: SplitButtonMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: SplitButtonMenuItemIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "mainButtonTextTemplate", first: true, predicate: SplitButtonTextTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "menuButtonTemplate", first: true, predicate: SplitButtonMenuButtonTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "shortcutTemplate", first: true, predicate: SplitButtonMenuItemShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: SplitButtonMenuItemTextTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "menuButtonRef", first: true, predicate: ["menuButton"], descendants: true, isSignal: true }, { propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }, { propertyName: "groupButtons", predicate: ButtonDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<button\n monaButton\n (click)=\"onMainButtonClick($event)\"\n (keydown)=\"onMainButtonKeydown($event)\"\n [disabled]=\"disabled()\"\n [iconOnly]=\"iconOnly()\"\n [loading]=\"loading()\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [toggleable]=\"false\"\n class=\"rounded-e-none\"\n [id]=\"mainButtonId\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n #mainButton>\n @if (mainButtonTextTemplate()) {\n <ng-container [ngTemplateOutlet]=\"mainButtonTextTemplate()\"></ng-container>\n } @else {\n <span>{{ text() }}</span>\n }\n</button>\n<button\n monaButton\n [disabled]=\"disabled()\"\n [iconOnly]=\"true\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [toggleable]=\"false\"\n class=\"rounded-s-none border-s-0\"\n aria-haspopup=\"menu\"\n [id]=\"menuButtonId\"\n [attr.aria-expanded]=\"menuOpen()\"\n [attr.aria-controls]=\"menuOpen() ? menuId : null\"\n [attr.aria-label]=\"effectiveMenuButtonAriaLabel()\"\n #menuButton>\n @if (menuButtonTemplate()) {\n <ng-container [ngTemplateOutlet]=\"menuButtonTemplate()\"></ng-container>\n } @else {\n <svg lucideChevronDown [size]=\"16\"></svg>\n }\n</button>\n\n<mona-popup-menu\n [anchorConnectionPoint]=\"'bottomleft'\"\n [anchor]=\"mainButton\"\n [items]=\"menuItems()\"\n (menuClick)=\"onMenuItemClick($event)\"\n (open)=\"onMenuOpen()\"\n (close)=\"onMenuClose()\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n [popupConnectionPoint]=\"'topleft'\"\n [rounded]=\"popupMenuRounded()\"\n [size]=\"size()\"\n [target]=\"menuButton\"\n [trigger]=\"loading() ? 'none' : 'click'\"\n [id]=\"menuId\"\n [minWidth]=\"popupWidth() || undefined\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (iconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (shortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (textTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "aria-label", "aria-labelledby", "items", "id", "minWidth", "offset", "openAtPointer", "popupConnectionPoint", "rounded", "size", "target", "trigger", "class", "width"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "directive", type: PopupMenuGroupTemplateDirective, selector: "ng-template[monaPopupMenuGroupTemplate]" }, { kind: "directive", type: PopupMenuIconTemplateDirective, selector: "ng-template[monaPopupMenuIconTemplate]" }, { kind: "directive", type: PopupMenuShortcutTemplateDirective, selector: "ng-template[monaPopupMenuShortcutTemplate]" }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }] }); }
|
|
464
467
|
}
|
|
465
468
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: SplitButtonComponent, decorators: [{
|
|
466
469
|
type: Component,
|
|
@@ -479,7 +482,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
479
482
|
"[attr.aria-labelledby]": "mainButtonId",
|
|
480
483
|
"[class]": "classes()",
|
|
481
484
|
role: "group"
|
|
482
|
-
}, template: "<button\n monaButton\n (click)=\"onMainButtonClick($event)\"\n (keydown)=\"onMainButtonKeydown($event)\"\n [disabled]=\"disabled()\"\n [iconOnly]=\"iconOnly()\"\n [loading]=\"loading()\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [toggleable]=\"false\"\n class=\"rounded-e-none\"\n [id]=\"mainButtonId\"\n [attr.aria-label]=\"
|
|
485
|
+
}, template: "<button\n monaButton\n (click)=\"onMainButtonClick($event)\"\n (keydown)=\"onMainButtonKeydown($event)\"\n [disabled]=\"disabled()\"\n [iconOnly]=\"iconOnly()\"\n [loading]=\"loading()\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [toggleable]=\"false\"\n class=\"rounded-e-none\"\n [id]=\"mainButtonId\"\n [attr.aria-label]=\"ariaLabelledBy() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n #mainButton>\n @if (mainButtonTextTemplate()) {\n <ng-container [ngTemplateOutlet]=\"mainButtonTextTemplate()\"></ng-container>\n } @else {\n <span>{{ text() }}</span>\n }\n</button>\n<button\n monaButton\n [disabled]=\"disabled()\"\n [iconOnly]=\"true\"\n [look]=\"look()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [toggleable]=\"false\"\n class=\"rounded-s-none border-s-0\"\n aria-haspopup=\"menu\"\n [id]=\"menuButtonId\"\n [attr.aria-expanded]=\"menuOpen()\"\n [attr.aria-controls]=\"menuOpen() ? menuId : null\"\n [attr.aria-label]=\"effectiveMenuButtonAriaLabel()\"\n #menuButton>\n @if (menuButtonTemplate()) {\n <ng-container [ngTemplateOutlet]=\"menuButtonTemplate()\"></ng-container>\n } @else {\n <svg lucideChevronDown [size]=\"16\"></svg>\n }\n</button>\n\n<mona-popup-menu\n [anchorConnectionPoint]=\"'bottomleft'\"\n [anchor]=\"mainButton\"\n [items]=\"menuItems()\"\n (menuClick)=\"onMenuItemClick($event)\"\n (open)=\"onMenuOpen()\"\n (close)=\"onMenuClose()\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n [popupConnectionPoint]=\"'topleft'\"\n [rounded]=\"popupMenuRounded()\"\n [size]=\"size()\"\n [target]=\"menuButton\"\n [trigger]=\"loading() ? 'none' : 'click'\"\n [id]=\"menuId\"\n [minWidth]=\"popupWidth() || undefined\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (iconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (shortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (textTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n" }]
|
|
483
486
|
}], ctorParameters: () => [], propDecorators: { menuItemComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PopupMenuToken), { ...{ descendants: false }, isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SplitButtonMenuGroupTemplateDirective), { ...{
|
|
484
487
|
read: TemplateRef,
|
|
485
488
|
descendants: false
|
|
@@ -492,7 +495,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
492
495
|
}, isSignal: true }] }], textTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SplitButtonMenuItemTextTemplateDirective), { ...{
|
|
493
496
|
read: TemplateRef,
|
|
494
497
|
descendants: false
|
|
495
|
-
}, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }],
|
|
498
|
+
}, 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 }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], groupButtons: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => ButtonDirective), { isSignal: true }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }], menuButtonAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuButtonAriaLabel", required: false }] }], menuItemClick: [{ type: i0.Output, args: ["menuItemClick"] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
496
499
|
|
|
497
500
|
class SplitButtonCheckboxItemComponent extends PopupMenuCheckboxItemComponent {
|
|
498
501
|
constructor() {
|
|
@@ -82,32 +82,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
82
82
|
}] });
|
|
83
83
|
|
|
84
84
|
const stepperBaseThemeVariants = cva(`
|
|
85
|
-
relative
|
|
85
|
+
relative
|
|
86
86
|
`, {
|
|
87
87
|
variants: {
|
|
88
88
|
orientation: {
|
|
89
|
-
horizontal: "h-auto w-full",
|
|
90
|
-
|
|
89
|
+
horizontal: "grid h-auto w-full",
|
|
90
|
+
// A flex row stretches the step list to the stepper's height.
|
|
91
|
+
vertical: "flex h-full w-auto"
|
|
91
92
|
}
|
|
92
93
|
},
|
|
93
94
|
defaultVariants: {
|
|
94
95
|
orientation: "horizontal"
|
|
95
96
|
}
|
|
96
97
|
});
|
|
98
|
+
/** The list is in the flow, so the stepper's box holds the indicators and labels. The track is drawn behind it. */
|
|
97
99
|
const stepperStepListThemeVariants = cva(`
|
|
98
|
-
|
|
100
|
+
relative z-1 col-span-full flex list-none
|
|
99
101
|
font-medium
|
|
100
102
|
`, {
|
|
101
103
|
variants: {
|
|
102
104
|
orientation: {
|
|
103
|
-
horizontal:
|
|
104
|
-
|
|
105
|
-
-translate-y-3
|
|
106
|
-
`,
|
|
107
|
-
vertical: `
|
|
108
|
-
h-full w-max flex-col
|
|
109
|
-
-translate-x-3 rtl:translate-x-3
|
|
110
|
-
`
|
|
105
|
+
horizontal: "w-full flex-row",
|
|
106
|
+
vertical: "w-max flex-col"
|
|
111
107
|
}
|
|
112
108
|
},
|
|
113
109
|
defaultVariants: {
|
|
@@ -177,15 +173,16 @@ const stepperStepLabelThemeVariants = cva("", {
|
|
|
177
173
|
}
|
|
178
174
|
}
|
|
179
175
|
});
|
|
176
|
+
/** Placed by the component, from the first indicator's centre to the last one's. */
|
|
180
177
|
const stepperTrackThemeVariants = cva(`
|
|
181
|
-
|
|
178
|
+
absolute
|
|
182
179
|
bg-surface-muted text-foreground
|
|
183
180
|
border border-border-subtle
|
|
184
181
|
`, {
|
|
185
182
|
variants: {
|
|
186
183
|
orientation: {
|
|
187
|
-
horizontal: "h-2
|
|
188
|
-
vertical: "
|
|
184
|
+
horizontal: "h-2",
|
|
185
|
+
vertical: "w-2"
|
|
189
186
|
}
|
|
190
187
|
},
|
|
191
188
|
defaultVariants: {
|
|
@@ -372,12 +369,12 @@ class StepperComponent {
|
|
|
372
369
|
}, /* @ts-ignore */
|
|
373
370
|
...(ngDevMode ? [{ debugName: "trackLineClass" }] : /* istanbul ignore next */ []));
|
|
374
371
|
this.trackStyles = computed(() => {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
372
|
+
// Each step takes an equal share, with its indicator centred in it along the track. Across it, the 2rem
|
|
373
|
+
// indicator's centre is 1rem in, and the 0.5rem track is centred on that.
|
|
374
|
+
const edge = `${this.#trackItemSize() / 2}%`;
|
|
375
|
+
return this.orientation() === "horizontal"
|
|
376
|
+
? { insetInlineEnd: edge, insetInlineStart: edge, top: "0.75rem" }
|
|
377
|
+
: { bottom: edge, insetInlineStart: "0.75rem", top: edge };
|
|
381
378
|
}, /* @ts-ignore */
|
|
382
379
|
...(ngDevMode ? [{ debugName: "trackStyles" }] : /* istanbul ignore next */ []));
|
|
383
380
|
this.viewSteps = computed(() => {
|
|
@@ -20,9 +20,11 @@ class TabCloseEvent extends PreventableEvent {
|
|
|
20
20
|
this.#index = index;
|
|
21
21
|
this.#selected = selected;
|
|
22
22
|
}
|
|
23
|
+
/** Index of the tab a close was requested for. */
|
|
23
24
|
get index() {
|
|
24
25
|
return this.#index;
|
|
25
26
|
}
|
|
27
|
+
/** Whether the tab a close was requested for was the selected tab. */
|
|
26
28
|
get selected() {
|
|
27
29
|
return this.#selected;
|
|
28
30
|
}
|
|
@@ -34,6 +36,7 @@ class TabSelectEvent extends PreventableEvent {
|
|
|
34
36
|
super("tabSelect", originalEvent);
|
|
35
37
|
this.#index = index;
|
|
36
38
|
}
|
|
39
|
+
/** Index of the tab being selected. */
|
|
37
40
|
get index() {
|
|
38
41
|
return this.#index;
|
|
39
42
|
}
|
|
@@ -288,10 +291,8 @@ class TabListComponent {
|
|
|
288
291
|
...(ngDevMode ? [{ debugName: "tabElements" }] : /* istanbul ignore next */ []));
|
|
289
292
|
this.tabListElement = viewChild.required("tabListElement", /* @ts-ignore */
|
|
290
293
|
...(ngDevMode ? [{ debugName: "tabListElement" }] : /* istanbul ignore next */ []));
|
|
291
|
-
this.ariaLabel = input("", /*
|
|
292
|
-
...(ngDevMode ?
|
|
293
|
-
this.ariaLabelledBy = input("", /* @ts-ignore */
|
|
294
|
-
...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
294
|
+
this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
295
|
+
this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
|
|
295
296
|
this.closable = input(false, /* @ts-ignore */
|
|
296
297
|
...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
|
|
297
298
|
this.disabled = input(false, /* @ts-ignore */
|
|
@@ -593,7 +594,7 @@ class TabListComponent {
|
|
|
593
594
|
});
|
|
594
595
|
}
|
|
595
596
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
596
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TabListComponent, isStandalone: true, selector: "mona-tab-list", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "
|
|
597
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TabListComponent, isStandalone: true, selector: "mona-tab-list", 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 }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, selectedTabId: { classPropertyName: "selectedTabId", publicName: "selectedTabId", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, transformFunction: null }, tabList: { classPropertyName: "tabList", publicName: "tabList", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedTabId: "selectedTabIdChange", tabClose: "tabClose", tabSelect: "tabSelect" }, host: { listeners: { "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)", "keydown": "onKeydown($event)" }, properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "class": "baseClass()" } }, viewQueries: [{ propertyName: "tabElements", predicate: ["tabElement"], descendants: true, isSignal: true }, { propertyName: "tabListElement", first: true, predicate: ["tabListElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (overflowControlsVisible()) {\n <button\n monaButton\n type=\"button\"\n look=\"link\"\n size=\"small\"\n [class]=\"scrollButtonClass()\"\n [attr.aria-label]=\"messages().scrollPrevious\"\n (click)=\"startScrolling(tabListElement, 'previous', 'single')\"\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'previous')\"\n (pointerup)=\"stopScrolling()\"\n (pointercancel)=\"stopScrolling()\"\n [attr.aria-hidden]=\"true\"\n tabindex=\"-1\">\n @if (orientation() === 'vertical') {\n <svg lucideChevronUp [size]=\"16\"></svg>\n } @else {\n <svg lucideChevronLeft [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n </button>\n}\n<div [class]=\"listWrapperClass()\">\n <ul\n [class]=\"listClass()\"\n #tabListElement\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-orientation]=\"orientation()\">\n @for (tab of tabList(); track tab.id) {\n @let selected = tab.id === selectedTabId();\n @let itemDisabled = tab.disabled || disabled();\n @let tabClosable = tab.closable || closable();\n <li\n monaTabListItem\n [active]=\"selected\"\n [disabled]=\"itemDisabled\"\n [position]=\"position()\"\n [size]=\"size()\"\n role=\"presentation\"\n [attr.data-selected]=\"selected\"\n [attr.data-tab-id]=\"tab.id\">\n <div\n #tabElement\n [class]=\"tabClass()\"\n [id]=\"tab.id + '-tab'\"\n role=\"tab\"\n [tabindex]=\"selected ? 0 : -1\"\n [attr.aria-selected]=\"selected\"\n [attr.aria-disabled]=\"itemDisabled\"\n [attr.aria-controls]=\"tab.id + '-panel'\"\n [attr.aria-keyshortcuts]=\"tabClosable && !itemDisabled ? 'Delete Backspace' : null\"\n (click)=\"onTabClick(tab, $event)\">\n <div>\n @if (tab.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"tab.titleTemplate\"></ng-container>\n } @else {\n <span>{{ tab.title }}</span>\n }\n </div>\n </div>\n @if (tabClosable) {\n <!-- For the pointer. A button assistive technology can see isn't allowed inside a tablist. -->\n <button\n monaButton\n type=\"button\"\n look=\"link\"\n data-tab-close\n [disabled]=\"itemDisabled\"\n [attr.aria-hidden]=\"true\"\n [attr.aria-label]=\"messages().closeTab\"\n (click)=\"onTabClose(tab, $event)\"\n [class]=\"closeButtonClass()\"\n tabindex=\"-1\">\n <svg lucideX [size]=\"16\"></svg>\n </button>\n }\n </li>\n }\n </ul>\n</div>\n@if (hasClosableTabs()) {\n <!-- The same action for assistive technology, outside the tablist. The keyboard's route is Delete. -->\n <div class=\"sr-only\">\n @for (tab of tabList(); track tab.id) {\n @if (tab.closable || closable()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n [id]=\"tab.id + '-close'\"\n [disabled]=\"tab.disabled || disabled()\"\n [attr.aria-label]=\"messages().closeTab\"\n [attr.aria-labelledby]=\"tab.id + '-close ' + tab.id + '-tab'\"\n [attr.data-tab-id]=\"tab.id\"\n (click)=\"onTabClose(tab, $event)\"></button>\n }\n }\n </div>\n}\n@if (overflowControlsVisible()) {\n <button\n monaButton\n type=\"button\"\n look=\"link\"\n size=\"small\"\n [class]=\"scrollButtonClass()\"\n [attr.aria-label]=\"messages().scrollNext\"\n (click)=\"startScrolling(tabListElement, 'next', 'single')\"\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'next')\"\n (pointerup)=\"stopScrolling()\"\n (pointercancel)=\"stopScrolling()\"\n [attr.aria-hidden]=\"true\"\n tabindex=\"-1\">\n @if (orientation() === 'vertical') {\n <svg lucideChevronDown [size]=\"16\"></svg>\n } @else {\n <svg lucideChevronRight [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n </button>\n}\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TabListItemDirective, selector: "li[monaTabListItem]", inputs: ["active", "disabled", "position", "size"] }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronUp, selector: "svg[lucideChevronUp]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }] }); }
|
|
597
598
|
}
|
|
598
599
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabListComponent, decorators: [{
|
|
599
600
|
type: Component,
|
|
@@ -607,12 +608,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
607
608
|
LucideChevronUp,
|
|
608
609
|
LucideX
|
|
609
610
|
], host: {
|
|
611
|
+
"[attr.aria-label]": "null",
|
|
612
|
+
"[attr.aria-labelledby]": "null",
|
|
610
613
|
"[class]": "baseClass()",
|
|
611
614
|
"(focusin)": "onFocusIn($event)",
|
|
612
615
|
"(focusout)": "onFocusOut($event)",
|
|
613
616
|
"(keydown)": "onKeydown($event)"
|
|
614
617
|
}, template: "@if (overflowControlsVisible()) {\n <button\n monaButton\n type=\"button\"\n look=\"link\"\n size=\"small\"\n [class]=\"scrollButtonClass()\"\n [attr.aria-label]=\"messages().scrollPrevious\"\n (click)=\"startScrolling(tabListElement, 'previous', 'single')\"\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'previous')\"\n (pointerup)=\"stopScrolling()\"\n (pointercancel)=\"stopScrolling()\"\n [attr.aria-hidden]=\"true\"\n tabindex=\"-1\">\n @if (orientation() === 'vertical') {\n <svg lucideChevronUp [size]=\"16\"></svg>\n } @else {\n <svg lucideChevronLeft [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n </button>\n}\n<div [class]=\"listWrapperClass()\">\n <ul\n [class]=\"listClass()\"\n #tabListElement\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-orientation]=\"orientation()\">\n @for (tab of tabList(); track tab.id) {\n @let selected = tab.id === selectedTabId();\n @let itemDisabled = tab.disabled || disabled();\n @let tabClosable = tab.closable || closable();\n <li\n monaTabListItem\n [active]=\"selected\"\n [disabled]=\"itemDisabled\"\n [position]=\"position()\"\n [size]=\"size()\"\n role=\"presentation\"\n [attr.data-selected]=\"selected\"\n [attr.data-tab-id]=\"tab.id\">\n <div\n #tabElement\n [class]=\"tabClass()\"\n [id]=\"tab.id + '-tab'\"\n role=\"tab\"\n [tabindex]=\"selected ? 0 : -1\"\n [attr.aria-selected]=\"selected\"\n [attr.aria-disabled]=\"itemDisabled\"\n [attr.aria-controls]=\"tab.id + '-panel'\"\n [attr.aria-keyshortcuts]=\"tabClosable && !itemDisabled ? 'Delete Backspace' : null\"\n (click)=\"onTabClick(tab, $event)\">\n <div>\n @if (tab.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"tab.titleTemplate\"></ng-container>\n } @else {\n <span>{{ tab.title }}</span>\n }\n </div>\n </div>\n @if (tabClosable) {\n <!-- For the pointer. A button assistive technology can see isn't allowed inside a tablist. -->\n <button\n monaButton\n type=\"button\"\n look=\"link\"\n data-tab-close\n [disabled]=\"itemDisabled\"\n [attr.aria-hidden]=\"true\"\n [attr.aria-label]=\"messages().closeTab\"\n (click)=\"onTabClose(tab, $event)\"\n [class]=\"closeButtonClass()\"\n tabindex=\"-1\">\n <svg lucideX [size]=\"16\"></svg>\n </button>\n }\n </li>\n }\n </ul>\n</div>\n@if (hasClosableTabs()) {\n <!-- The same action for assistive technology, outside the tablist. The keyboard's route is Delete. -->\n <div class=\"sr-only\">\n @for (tab of tabList(); track tab.id) {\n @if (tab.closable || closable()) {\n <button\n type=\"button\"\n tabindex=\"-1\"\n [id]=\"tab.id + '-close'\"\n [disabled]=\"tab.disabled || disabled()\"\n [attr.aria-label]=\"messages().closeTab\"\n [attr.aria-labelledby]=\"tab.id + '-close ' + tab.id + '-tab'\"\n [attr.data-tab-id]=\"tab.id\"\n (click)=\"onTabClose(tab, $event)\"></button>\n }\n }\n </div>\n}\n@if (overflowControlsVisible()) {\n <button\n monaButton\n type=\"button\"\n look=\"link\"\n size=\"small\"\n [class]=\"scrollButtonClass()\"\n [attr.aria-label]=\"messages().scrollNext\"\n (click)=\"startScrolling(tabListElement, 'next', 'single')\"\n (pointerdown)=\"startContinuousScroll($event, tabListElement, 'next')\"\n (pointerup)=\"stopScrolling()\"\n (pointercancel)=\"stopScrolling()\"\n [attr.aria-hidden]=\"true\"\n tabindex=\"-1\">\n @if (orientation() === 'vertical') {\n <svg lucideChevronDown [size]=\"16\"></svg>\n } @else {\n <svg lucideChevronRight [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n </button>\n}\n" }]
|
|
615
|
-
}], ctorParameters: () => [], propDecorators: { tabElements: [{ type: i0.ViewChildren, args: ["tabElement", { isSignal: true }] }], tabListElement: [{ type: i0.ViewChild, args: ["tabListElement", { isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "
|
|
618
|
+
}], ctorParameters: () => [], propDecorators: { tabElements: [{ type: i0.ViewChildren, args: ["tabElement", { isSignal: true }] }], tabListElement: [{ type: i0.ViewChild, args: ["tabListElement", { 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 }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: true }] }], selectedTabId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTabId", required: false }] }, { type: i0.Output, args: ["selectedTabIdChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: true }] }], tabClose: [{ type: i0.Output, args: ["tabClose"] }], tabList: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabList", required: true }] }], tabSelect: [{ type: i0.Output, args: ["tabSelect"] }] } });
|
|
616
619
|
|
|
617
620
|
class TabComponent {
|
|
618
621
|
constructor() {
|
|
@@ -867,7 +870,7 @@ class TabsComponent {
|
|
|
867
870
|
this.reportIndex(items, nextId);
|
|
868
871
|
}
|
|
869
872
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
870
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TabsComponent, isStandalone: true, selector: "mona-tabs", 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 }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, keepTabContent: { classPropertyName: "keepTabContent", publicName: "keepTabContent", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIndex: "selectedIndexChange", tabClose: "tabClose", tabSelect: "tabSelect" }, host: { properties: { "class": "baseClass()", "attr.aria-label": "null", "attr.aria-labelledby": "null" } }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], viewQueries: [{ propertyName: "tabListComponent", first: true, predicate: TabListComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<mona-tab-list\n [
|
|
873
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TabsComponent, isStandalone: true, selector: "mona-tabs", 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 }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, keepTabContent: { classPropertyName: "keepTabContent", publicName: "keepTabContent", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIndex: "selectedIndexChange", tabClose: "tabClose", tabSelect: "tabSelect" }, host: { properties: { "class": "baseClass()", "attr.aria-label": "null", "attr.aria-labelledby": "null" } }, queries: [{ propertyName: "tabs", predicate: TabComponent, isSignal: true }], viewQueries: [{ propertyName: "tabListComponent", first: true, predicate: TabListComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<mona-tab-list\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [closable]=\"closable()\"\n [disabled]=\"disabled()\"\n [position]=\"position()\"\n [size]=\"size()\"\n [tabList]=\"tabList()\"\n [selectedTabId]=\"selectedTabId()\"\n (selectedTabIdChange)=\"selectedTabId.set($event)\"\n (tabClose)=\"tabClose.emit($event)\"\n (tabSelect)=\"tabSelect.emit($event)\"></mona-tab-list>\n<div [class]=\"contentClass()\">\n @for (tab of tabList(); track tab.id) {\n @let selected = tab.id === selectedTabId();\n @let tabLoaded = keepTabContent() || selected;\n @let tabHidden = keepTabContent() && !selected;\n @if (tabLoaded) {\n <div\n class=\"w-full h-full rounded-sm focus-visible:outline-2 focus-visible:outline-focus-indicator focus-visible:-outline-offset-2\"\n [class.hidden]=\"tabHidden\"\n role=\"tabpanel\"\n [id]=\"tab.id + '-panel'\"\n tabindex=\"0\"\n (keydown)=\"handlePanelKeyDown($event)\"\n [attr.aria-hidden]=\"tabHidden\"\n [attr.aria-labelledby]=\"tab.id + '-tab'\">\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplate\"></ng-container>\n </div>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TabListComponent, selector: "mona-tab-list", inputs: ["aria-label", "aria-labelledby", "closable", "disabled", "position", "selectedTabId", "size", "tabList"], outputs: ["selectedTabIdChange", "tabClose", "tabSelect"] }] }); }
|
|
871
874
|
}
|
|
872
875
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TabsComponent, decorators: [{
|
|
873
876
|
type: Component,
|
|
@@ -876,7 +879,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
876
879
|
// The name belongs to the tab list. Left on a host with no role, it would name nothing.
|
|
877
880
|
"[attr.aria-label]": "null",
|
|
878
881
|
"[attr.aria-labelledby]": "null"
|
|
879
|
-
}, template: "<mona-tab-list\n [
|
|
882
|
+
}, template: "<mona-tab-list\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [closable]=\"closable()\"\n [disabled]=\"disabled()\"\n [position]=\"position()\"\n [size]=\"size()\"\n [tabList]=\"tabList()\"\n [selectedTabId]=\"selectedTabId()\"\n (selectedTabIdChange)=\"selectedTabId.set($event)\"\n (tabClose)=\"tabClose.emit($event)\"\n (tabSelect)=\"tabSelect.emit($event)\"></mona-tab-list>\n<div [class]=\"contentClass()\">\n @for (tab of tabList(); track tab.id) {\n @let selected = tab.id === selectedTabId();\n @let tabLoaded = keepTabContent() || selected;\n @let tabHidden = keepTabContent() && !selected;\n @if (tabLoaded) {\n <div\n class=\"w-full h-full rounded-sm focus-visible:outline-2 focus-visible:outline-focus-indicator focus-visible:-outline-offset-2\"\n [class.hidden]=\"tabHidden\"\n role=\"tabpanel\"\n [id]=\"tab.id + '-panel'\"\n tabindex=\"0\"\n (keydown)=\"handlePanelKeyDown($event)\"\n [attr.aria-hidden]=\"tabHidden\"\n [attr.aria-labelledby]=\"tab.id + '-tab'\">\n <ng-container [ngTemplateOutlet]=\"tab.contentTemplate\"></ng-container>\n </div>\n }\n }\n</div>\n" }]
|
|
880
883
|
}], ctorParameters: () => [], propDecorators: { tabListComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TabListComponent), { isSignal: true }] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabComponent), { 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 }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], keepTabContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepTabContent", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], selectedIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }, { type: i0.Output, args: ["selectedIndexChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], tabClose: [{ type: i0.Output, args: ["tabClose"] }], tabSelect: [{ type: i0.Output, args: ["tabSelect"] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
881
884
|
|
|
882
885
|
/*
|
|
@@ -8,6 +8,10 @@ import { themeControlSurfaceClasses, injectLabelAssociation, injectEffectiveDisa
|
|
|
8
8
|
import { twMerge } from 'tailwind-merge';
|
|
9
9
|
import { cva } from 'class-variance-authority';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Marks an `<ng-template>` as a prefix slot. The template is rendered inside the container's left side. Multiple prefix
|
|
13
|
+
* templates are supported and render in source order.
|
|
14
|
+
*/
|
|
11
15
|
class TextBoxPrefixTemplateDirective {
|
|
12
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxPrefixTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
13
17
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: TextBoxPrefixTemplateDirective, isStandalone: true, selector: "ng-template[monaTextBoxPrefixTemplate]", ngImport: i0 }); }
|
|
@@ -19,6 +23,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
19
23
|
}]
|
|
20
24
|
}] });
|
|
21
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Marks an `<ng-template>` as a suffix slot. The template is rendered inside the container's right side, after the
|
|
28
|
+
* optional clear button. Multiple suffix templates are supported and render in source order.
|
|
29
|
+
*/
|
|
22
30
|
class TextBoxSuffixTemplateDirective {
|
|
23
31
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxSuffixTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
24
32
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: TextBoxSuffixTemplateDirective, isStandalone: true, selector: "ng-template[monaTextBoxSuffixTemplate]", ngImport: i0 }); }
|
|
@@ -160,7 +168,7 @@ class TextBoxComponent {
|
|
|
160
168
|
this.ariaDescribedBy = input("", { ...(ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {}), alias: "aria-describedby" });
|
|
161
169
|
/**
|
|
162
170
|
* @description Accessible name of the inner input. Prefer a visible label, linked through {@link inputId} or
|
|
163
|
-
*
|
|
171
|
+
* `aria-labelledby`; the placeholder is not a label.
|
|
164
172
|
* @default ""
|
|
165
173
|
*/
|
|
166
174
|
this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|