@nanahoshi/mona-ui 0.24.11 → 0.25.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 +9 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -10
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +37 -20
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +239 -47
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +184 -31
- package/fesm2022/nanahoshi-mona-ui-button.mjs +47 -11
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +17 -13
- package/fesm2022/nanahoshi-mona-ui-card.mjs +54 -30
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +27 -22
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +131 -89
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +59 -19
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +118 -41
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +243 -212
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +155 -86
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +161 -131
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +12 -11
- package/fesm2022/nanahoshi-mona-ui-common.mjs +18 -1
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +25 -24
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +202 -33
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +31 -10
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs → nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs → nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs} +7 -7
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs} +27 -29
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +39 -4
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +5 -5
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +7 -7
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +183 -47
- package/fesm2022/nanahoshi-mona-ui-label.mjs +111 -15
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +33 -4
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +14 -13
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +13 -12
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +192 -56
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +3 -1
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +60 -29
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +334 -37
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +84 -30
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +274 -108
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +127 -37
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +595 -170
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +3 -2
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +323 -166
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +167 -82
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +273 -165
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +219 -132
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +84 -32
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +337 -116
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +10 -12
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +21 -8
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +444 -88
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +10 -9
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +15 -14
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +17 -3
- package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
- package/i18n/catalogs/en-US.messages.json +33 -4
- package/locales/ar-sa/ar-sa.messages.json +33 -4
- package/locales/de-de/de-de.messages.json +33 -4
- package/locales/es-es/es-es.messages.json +33 -4
- package/locales/fr-fr/fr-fr.messages.json +33 -4
- package/locales/id-id/id-id.messages.json +33 -4
- package/locales/it-it/it-it.messages.json +33 -4
- package/locales/ja-jp/ja-jp.messages.json +33 -4
- package/locales/ko-kr/ko-kr.messages.json +33 -4
- package/locales/pt-br/pt-br.messages.json +33 -4
- package/locales/ru-ru/ru-ru.messages.json +33 -4
- package/locales/tr-tr/tr-tr.messages.json +33 -4
- package/locales/zh-cn/zh-cn.messages.json +33 -4
- package/locales/zh-tw/zh-tw.messages.json +33 -4
- package/package.json +2 -1
- package/styles.css +156 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -0
- package/types/nanahoshi-mona-ui-avatar.d.ts +18 -11
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +62 -14
- package/types/nanahoshi-mona-ui-button-group.d.ts +86 -16
- package/types/nanahoshi-mona-ui-button.d.ts +26 -3
- package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
- package/types/nanahoshi-mona-ui-card.d.ts +22 -6
- package/types/nanahoshi-mona-ui-check-box.d.ts +54 -13
- package/types/nanahoshi-mona-ui-chip.d.ts +31 -18
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +21 -5
- package/types/nanahoshi-mona-ui-collapsible.d.ts +20 -11
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +62 -36
- package/types/nanahoshi-mona-ui-color-palette.d.ts +65 -27
- package/types/nanahoshi-mona-ui-color-picker.d.ts +64 -23
- package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -0
- package/types/nanahoshi-mona-ui-common.d.ts +28 -2
- package/types/nanahoshi-mona-ui-date-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +1 -0
- package/types/nanahoshi-mona-ui-editor.d.ts +1 -0
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +51 -7
- package/types/nanahoshi-mona-ui-fieldset.d.ts +18 -4
- package/types/nanahoshi-mona-ui-grid.d.ts +0 -1
- package/types/nanahoshi-mona-ui-i18n.d.ts +38 -3
- package/types/nanahoshi-mona-ui-internal.d.ts +95 -14
- package/types/nanahoshi-mona-ui-label.d.ts +17 -2
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +29 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +29 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +1 -0
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -0
- package/types/nanahoshi-mona-ui-otp-input.d.ts +49 -12
- package/types/nanahoshi-mona-ui-placeholder.d.ts +2 -1
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +21 -9
- package/types/nanahoshi-mona-ui-radio-button.d.ts +165 -20
- package/types/nanahoshi-mona-ui-rating.d.ts +21 -6
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +59 -27
- package/types/nanahoshi-mona-ui-segmented.d.ts +52 -24
- package/types/nanahoshi-mona-ui-sidebar.d.ts +104 -41
- package/types/nanahoshi-mona-ui-skeleton.d.ts +1 -1
- package/types/nanahoshi-mona-ui-slider.d.ts +99 -35
- package/types/nanahoshi-mona-ui-spinner.d.ts +9 -5
- package/types/nanahoshi-mona-ui-splitter.d.ts +31 -10
- package/types/nanahoshi-mona-ui-stepper.d.ts +58 -12
- package/types/nanahoshi-mona-ui-switch.d.ts +32 -10
- package/types/nanahoshi-mona-ui-tabs.d.ts +75 -20
- package/types/nanahoshi-mona-ui-text-area.d.ts +7 -7
- package/types/nanahoshi-mona-ui-text-box.d.ts +2 -0
- package/types/nanahoshi-mona-ui-theme.d.ts +392 -15
- package/types/nanahoshi-mona-ui-time-picker.d.ts +1 -0
- package/types/nanahoshi-mona-ui-time-selector.d.ts +1 -0
- package/types/nanahoshi-mona-ui-tooltip.d.ts +7 -1
|
@@ -651,7 +651,7 @@ class PagerComponent {
|
|
|
651
651
|
return element.disabled === true || element.getAttribute("aria-disabled") === "true";
|
|
652
652
|
}
|
|
653
653
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
654
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: PagerComponent, isStandalone: true, selector: "mona-pager", 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 }, firstLast: { classPropertyName: "firstLast", publicName: "firstLast", isSignal: true, isRequired: false, transformFunction: null }, navigable: { classPropertyName: "navigable", publicName: "navigable", isSignal: true, isRequired: false, transformFunction: null }, pageInput: { classPropertyName: "pageInput", publicName: "pageInput", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, previousNext: { classPropertyName: "previousNext", publicName: "previousNext", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showInfo: { classPropertyName: "showInfo", publicName: "showInfo", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "skip", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClasses: { classPropertyName: "userClasses", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageSize: "pageSizeChange", pageSizeSelect: "pageSizeSelect", skip: "skipChange" }, host: { attributes: { "role": "navigation" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.aria-label": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel", "attr.aria-labelledby": "ariaLabelledBy() || null", "class": "baseClasses()" } }, queries: [{ propertyName: "navigationButtonsTemplateList", predicate: PagerNavigationButtonsTemplateDirective, isSignal: true }, { propertyName: "numericButtonsTemplate", first: true, predicate: PagerNumericButtonsTemplateDirective, descendants: true, isSignal: true }, { propertyName: "pageSizeTemplate", first: true, predicate: PagerPageSizeTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "pagerInfoTemplate", first: true, predicate: PagerInfoTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "pageSizeDropdownList", first: true, predicate: ["pageSizeDropdownList"], descendants: true, isSignal: true }], ngImport: i0, template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class"], outputs: ["lookChange", "selectedChange"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["formatter", "maxValue", "minValue", "step", "value"], outputs: ["valueChange"] }, { kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "data", "disabled", "invalid", "itemDisabled", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "value", "valueField", "valuePrimitive"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: DropdownVirtualScrollDirective, selector: " mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll] ", inputs: ["monaDropDownVirtualScroll"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownListValueTemplateDirective, selector: "ng-template[monaDropDownListValueTemplate]" }, { kind: "directive", type: DropdownItemTemplateDirective, selector: " ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate] " }, { kind: "component", type: LucideEllipsis, selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]" }, { kind: "component", type: LucideChevronsLeft, selector: "svg[lucideChevronsLeft]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronsRight, selector: "svg[lucideChevronsRight]" }] }); }
|
|
654
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: PagerComponent, isStandalone: true, selector: "mona-pager", 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 }, firstLast: { classPropertyName: "firstLast", publicName: "firstLast", isSignal: true, isRequired: false, transformFunction: null }, navigable: { classPropertyName: "navigable", publicName: "navigable", isSignal: true, isRequired: false, transformFunction: null }, pageInput: { classPropertyName: "pageInput", publicName: "pageInput", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, previousNext: { classPropertyName: "previousNext", publicName: "previousNext", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showInfo: { classPropertyName: "showInfo", publicName: "showInfo", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "skip", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClasses: { classPropertyName: "userClasses", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageSize: "pageSizeChange", pageSizeSelect: "pageSizeSelect", skip: "skipChange" }, host: { attributes: { "role": "navigation" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.aria-label": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel", "attr.aria-labelledby": "ariaLabelledBy() || null", "class": "baseClasses()" } }, queries: [{ propertyName: "navigationButtonsTemplateList", predicate: PagerNavigationButtonsTemplateDirective, isSignal: true }, { propertyName: "numericButtonsTemplate", first: true, predicate: PagerNumericButtonsTemplateDirective, descendants: true, isSignal: true }, { propertyName: "pageSizeTemplate", first: true, predicate: PagerPageSizeTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "pagerInfoTemplate", first: true, predicate: PagerInfoTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "pageSizeDropdownList", first: true, predicate: ["pageSizeDropdownList"], descendants: true, isSignal: true }], ngImport: i0, template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\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: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["formatter", "maxValue", "minValue", "step", "value"], outputs: ["valueChange"] }, { kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "data", "disabled", "invalid", "itemDisabled", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "value", "valueField", "valuePrimitive"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: DropdownVirtualScrollDirective, selector: " mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll] ", inputs: ["monaDropDownVirtualScroll"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownListValueTemplateDirective, selector: "ng-template[monaDropDownListValueTemplate]" }, { kind: "directive", type: DropdownItemTemplateDirective, selector: " ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate] " }, { kind: "component", type: LucideEllipsis, selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]" }, { kind: "component", type: LucideChevronsLeft, selector: "svg[lucideChevronsLeft]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronsRight, selector: "svg[lucideChevronsRight]" }] }); }
|
|
655
655
|
}
|
|
656
656
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PagerComponent, decorators: [{
|
|
657
657
|
type: Component,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { computed, input, Component } from '@angular/core';
|
|
3
|
+
import { classInputToClass } from '@nanahoshi/mona-ui/common';
|
|
3
4
|
import { twMerge } from 'tailwind-merge';
|
|
4
5
|
import { cva } from 'class-variance-authority';
|
|
5
6
|
|
|
@@ -37,7 +38,8 @@ class PlaceholderComponent {
|
|
|
37
38
|
* Bind this input with the public `class` alias.
|
|
38
39
|
* @default ""
|
|
39
40
|
*/
|
|
40
|
-
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class"
|
|
41
|
+
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class",
|
|
42
|
+
transform: value => classInputToClass(value) });
|
|
41
43
|
}
|
|
42
44
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: PlaceholderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
45
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: PlaceholderComponent, isStandalone: true, selector: "mona-placeholder", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (text()) {\n <span [class]=\"textClass()\">{{ text() }}</span>\n} @else {\n <ng-content></ng-content>\n}\n" }); }
|
|
@@ -217,7 +217,7 @@ const popupMenuBaseThemeVariants = cva(`h-full w-full overflow-hidden`, {
|
|
|
217
217
|
const popupMenuContainerThemeVariants = cva(`
|
|
218
218
|
flex flex-col p-1
|
|
219
219
|
${themeOverlaySurfaceClasses} text-foreground
|
|
220
|
-
border border-border shadow-(--shadow-overlay) outline-none
|
|
220
|
+
border border-border shadow-(--shadow-overlay) outline-none focus-visible:outline-hidden
|
|
221
221
|
`, {
|
|
222
222
|
variants: {
|
|
223
223
|
rounded: {
|
|
@@ -240,7 +240,7 @@ const popupMenuGroupHeaderThemeVariants = cva(`inline-flex w-full select-none px
|
|
|
240
240
|
const popupMenuIconContainerThemeVariants = cva(`absolute start-2 flex items-center justify-center`);
|
|
241
241
|
const popupMenuItemThemeVariants = cva(`
|
|
242
242
|
relative flex cursor-pointer select-none items-center gap-2 py-1 pe-2 ps-8
|
|
243
|
-
text-foreground outline-none
|
|
243
|
+
text-foreground outline-none focus-visible:outline-hidden
|
|
244
244
|
hover:bg-[var(--mona-menu-item-hover-background,var(--color-hover))] hover:text-foreground
|
|
245
245
|
focus-within:bg-[var(--mona-menu-item-hover-background,var(--color-hover))]
|
|
246
246
|
focus-within:text-foreground focus-within:outline-none
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, TemplateRef, Directive, computed, contentChild, input, Component } from '@angular/core';
|
|
4
|
-
import { getPercentage } from '@nanahoshi/mona-ui/common';
|
|
3
|
+
import { inject, TemplateRef, Directive, computed, contentChild, input, isDevMode, effect, Component } from '@angular/core';
|
|
4
|
+
import { normalizeProgressRange, getPercentage } from '@nanahoshi/mona-ui/common';
|
|
5
5
|
import { injectComponentDirection, MonaI18nService, formatNumber } from '@nanahoshi/mona-ui/i18n';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
@@ -10,6 +10,9 @@ class ProgressBarLabelTemplateDirective {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
this.templateRef = inject(TemplateRef);
|
|
12
12
|
}
|
|
13
|
+
static ngTemplateContextGuard(_dir, _ctx) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
13
16
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ProgressBarLabelTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
14
17
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ProgressBarLabelTemplateDirective, isStandalone: true, selector: "ng-template[monaProgressBarLabelTemplate]", ngImport: i0 }); }
|
|
15
18
|
}
|
|
@@ -20,11 +23,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
20
23
|
}]
|
|
21
24
|
}] });
|
|
22
25
|
|
|
26
|
+
// Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
|
|
27
|
+
// Edit the JSON file and run `npm run generate:locale-catalogs`.
|
|
28
|
+
const PROGRESS_BAR_DEFAULT_MESSAGES = {
|
|
29
|
+
label: "Progress"
|
|
30
|
+
};
|
|
31
|
+
|
|
23
32
|
const progressBarBaseThemeVariants = cva(`
|
|
24
33
|
relative flex items-center justify-center
|
|
25
34
|
h-5.5 w-full
|
|
26
35
|
overflow-hidden select-none
|
|
27
36
|
bg-surface-muted
|
|
37
|
+
forced-colors:border forced-colors:border-[CanvasText]
|
|
28
38
|
data-[disabled='true']:pointer-events-none
|
|
29
39
|
data-[disabled='true']:cursor-not-allowed
|
|
30
40
|
data-[disabled='true']:bg-disabled-background
|
|
@@ -52,10 +62,14 @@ const progressBarLabelThemeVariants = cva(`
|
|
|
52
62
|
const progressBarTrackThemeVariants = cva(`
|
|
53
63
|
relative flex h-full w-full items-center justify-center
|
|
54
64
|
text-xs font-medium
|
|
55
|
-
bg-
|
|
65
|
+
bg-[var(--mona-indicator-color,var(--color-primary))]
|
|
66
|
+
text-[var(--mona-indicator-foreground,var(--color-primary-foreground))]
|
|
56
67
|
data-[prev='true']:transition-[background-color]
|
|
57
68
|
data-[prev='true']:duration-(--mona-motion-fast)
|
|
58
69
|
data-[prev='true']:ease-in
|
|
70
|
+
data-[prev='true']:forced-color-adjust-none
|
|
71
|
+
data-[prev='true']:forced-colors:bg-[Highlight]!
|
|
72
|
+
data-[prev='true']:forced-colors:text-[HighlightText]
|
|
59
73
|
data-[next='true']:absolute
|
|
60
74
|
data-[next='true']:bg-surface-muted
|
|
61
75
|
data-[next='true']:text-foreground
|
|
@@ -78,8 +92,14 @@ const progressBarTrackThemeVariants = cva(`
|
|
|
78
92
|
});
|
|
79
93
|
|
|
80
94
|
class ProgressBarComponent {
|
|
95
|
+
#color;
|
|
96
|
+
#direction;
|
|
97
|
+
#i18n;
|
|
81
98
|
constructor() {
|
|
82
99
|
this.#color = computed(() => {
|
|
100
|
+
if (this.disabled()) {
|
|
101
|
+
return "";
|
|
102
|
+
}
|
|
83
103
|
const color = this.color();
|
|
84
104
|
const progress = this.progress();
|
|
85
105
|
return typeof color === "string" ? color : color?.(progress);
|
|
@@ -87,16 +107,10 @@ class ProgressBarComponent {
|
|
|
87
107
|
...(ngDevMode ? [{ debugName: "#color" }] : /* istanbul ignore next */ []));
|
|
88
108
|
this.#direction = injectComponentDirection();
|
|
89
109
|
this.#i18n = inject(MonaI18nService);
|
|
90
|
-
this.
|
|
91
|
-
|
|
92
|
-
this.formattedProgress = computed(() => {
|
|
93
|
-
return formatNumber(this.progress(), this.#i18n.localeId(), {
|
|
94
|
-
minimumFractionDigits: 0,
|
|
95
|
-
maximumFractionDigits: 2,
|
|
96
|
-
useGrouping: false
|
|
97
|
-
});
|
|
110
|
+
this.ariaRange = computed(() => {
|
|
111
|
+
return this.indeterminate() ? null : normalizeProgressRange(this.value(), this.min(), this.max());
|
|
98
112
|
}, /* @ts-ignore */
|
|
99
|
-
...(ngDevMode ? [{ debugName: "
|
|
113
|
+
...(ngDevMode ? [{ debugName: "ariaRange" }] : /* istanbul ignore next */ []));
|
|
100
114
|
this.baseClasses = computed(() => {
|
|
101
115
|
const rounded = this.rounded();
|
|
102
116
|
const classes = progressBarBaseThemeVariants({ rounded });
|
|
@@ -104,16 +118,28 @@ class ProgressBarComponent {
|
|
|
104
118
|
return twMerge(classes, userClass);
|
|
105
119
|
}, /* @ts-ignore */
|
|
106
120
|
...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
|
|
121
|
+
this.formattedProgress = computed(() => {
|
|
122
|
+
return formatNumber(this.progress() / 100, this.#i18n.localeId(), {
|
|
123
|
+
maximumFractionDigits: 2,
|
|
124
|
+
minimumFractionDigits: 0,
|
|
125
|
+
style: "percent",
|
|
126
|
+
useGrouping: false
|
|
127
|
+
});
|
|
128
|
+
}, /* @ts-ignore */
|
|
129
|
+
...(ngDevMode ? [{ debugName: "formattedProgress" }] : /* istanbul ignore next */ []));
|
|
107
130
|
this.indeterminateClasses = computed(() => {
|
|
108
131
|
return progressBarIndeterminateThemeVariants();
|
|
109
132
|
}, /* @ts-ignore */
|
|
110
133
|
...(ngDevMode ? [{ debugName: "indeterminateClasses" }] : /* istanbul ignore next */ []));
|
|
134
|
+
this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
|
|
111
136
|
this.labelClasses = computed(() => {
|
|
112
137
|
return progressBarLabelThemeVariants();
|
|
113
138
|
}, /* @ts-ignore */
|
|
114
139
|
...(ngDevMode ? [{ debugName: "labelClasses" }] : /* istanbul ignore next */ []));
|
|
115
140
|
this.labelTemplate = contentChild(ProgressBarLabelTemplateDirective, /* @ts-ignore */
|
|
116
141
|
...(ngDevMode ? [{ debugName: "labelTemplate" }] : /* istanbul ignore next */ []));
|
|
142
|
+
this.messages = this.#i18n.componentMessages("progressBar", PROGRESS_BAR_DEFAULT_MESSAGES);
|
|
117
143
|
this.nextTrackClipPath = computed(() => {
|
|
118
144
|
const progress = this.progress();
|
|
119
145
|
const isRtl = this.isRtl();
|
|
@@ -156,7 +182,7 @@ class ProgressBarComponent {
|
|
|
156
182
|
/**
|
|
157
183
|
* @description Accessible label for the progress bar host element.
|
|
158
184
|
* Use to describe what is being measured (e.g., "Upload progress").
|
|
159
|
-
* When empty,
|
|
185
|
+
* When empty, falls back to the localized "Progress". An `aria-labelledby` on the host takes precedence over both.
|
|
160
186
|
* @default ""
|
|
161
187
|
*/
|
|
162
188
|
this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
|
|
@@ -177,14 +203,15 @@ class ProgressBarComponent {
|
|
|
177
203
|
this.color = input("", /* @ts-ignore */
|
|
178
204
|
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
179
205
|
/**
|
|
180
|
-
* @description Renders the bar with reduced visual emphasis and removes pointer interaction.
|
|
206
|
+
* @description Renders the bar with reduced visual emphasis and removes pointer interaction. `color` doesn't apply
|
|
207
|
+
* while disabled.
|
|
181
208
|
* @default false
|
|
182
209
|
*/
|
|
183
210
|
this.disabled = input(false, /* @ts-ignore */
|
|
184
211
|
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
185
212
|
/**
|
|
186
213
|
* @description Switches to indeterminate mode: plays a looping animation and hides the label.
|
|
187
|
-
* ARIA value attributes are removed
|
|
214
|
+
* ARIA value attributes are removed.
|
|
188
215
|
* @default false
|
|
189
216
|
*/
|
|
190
217
|
this.indeterminate = input(false, /* @ts-ignore */
|
|
@@ -210,7 +237,8 @@ class ProgressBarComponent {
|
|
|
210
237
|
this.labelVisible = input(true, /* @ts-ignore */
|
|
211
238
|
...(ngDevMode ? [{ debugName: "labelVisible" }] : /* istanbul ignore next */ []));
|
|
212
239
|
/**
|
|
213
|
-
* @description Upper bound of the value range. Must be greater than `min
|
|
240
|
+
* @description Upper bound of the value range. Must be greater than `min`; otherwise the bar reports no values and a
|
|
241
|
+
* warning is logged in development.
|
|
214
242
|
* @default 100
|
|
215
243
|
*/
|
|
216
244
|
this.max = input(100, /* @ts-ignore */
|
|
@@ -234,33 +262,36 @@ class ProgressBarComponent {
|
|
|
234
262
|
this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
|
|
235
263
|
/**
|
|
236
264
|
* @description Current progress value within `[min, max]`.
|
|
237
|
-
* Values outside the range are clamped
|
|
265
|
+
* Values outside the range are clamped, for the bar and for `aria-valuenow`; non-finite values count as `min`.
|
|
238
266
|
* @default 0
|
|
239
267
|
*/
|
|
240
268
|
this.value = input(0, /* @ts-ignore */
|
|
241
269
|
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
270
|
+
if (isDevMode()) {
|
|
271
|
+
effect(() => {
|
|
272
|
+
if (!this.indeterminate() && this.ariaRange() === null) {
|
|
273
|
+
console.warn(`mona-progress-bar: [${this.min()}, ${this.max()}] isn't a valid range.`);
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
242
277
|
}
|
|
243
|
-
#color;
|
|
244
|
-
#direction;
|
|
245
|
-
#i18n;
|
|
246
278
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
247
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ProgressBarComponent, isStandalone: true, selector: "mona-progress-bar", inputs: { animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaValueText: { classPropertyName: "ariaValueText", publicName: "aria-valuetext", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelStyles: { classPropertyName: "labelStyles", publicName: "labelStyles", isSignal: true, isRequired: false, transformFunction: null }, labelVisible: { classPropertyName: "labelVisible", publicName: "labelVisible", 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 }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "class": "baseClasses()", "attr.aria-
|
|
279
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ProgressBarComponent, isStandalone: true, selector: "mona-progress-bar", inputs: { animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaValueText: { classPropertyName: "ariaValueText", publicName: "aria-valuetext", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, labelStyles: { classPropertyName: "labelStyles", publicName: "labelStyles", isSignal: true, isRequired: false, transformFunction: null }, labelVisible: { classPropertyName: "labelVisible", publicName: "labelVisible", 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 }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "class": "baseClasses()", "attr.aria-label": "ariaLabel() || messages().label", "attr.aria-valuemin": "ariaRange()?.min", "attr.aria-valuemax": "ariaRange()?.max", "attr.aria-valuenow": "ariaRange()?.now", "attr.aria-valuetext": "ariaValueText() || null", "attr.aria-disabled": "disabled() || null", "attr.data-disabled": "disabled()" } }, queries: [{ propertyName: "labelTemplate", first: true, predicate: ProgressBarLabelTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class]=\"trackClasses()\"\n [style.background-color]=\"trackColor()\"\n [attr.data-prev]=\"true\"\n [attr.data-start]=\"labelPosition() === 'start'\"\n [attr.data-end]=\"labelPosition() === 'end'\"\n [attr.data-indeterminate]=\"indeterminate()\"\n [attr.data-value]=\"progress()\"\n [style.clip-path]=\"prevTrackClipPath()\">\n @if (indeterminate()) {\n <div [class]=\"indeterminateClasses()\" class=\"indeterminate\"></div>\n } @else if (labelVisible()) {\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\n </ng-container>\n } @else {\n <span [class]=\"labelClasses()\" [style]=\"labelStyles()\">{{ formattedProgress() }}</span>\n }\n }\n</div>\n\n@if (!indeterminate()) {\n <div\n [class]=\"trackClasses()\"\n [attr.data-next]=\"true\"\n [attr.data-start]=\"labelPosition() === 'start'\"\n [attr.data-end]=\"labelPosition() === 'end'\"\n [style.clip-path]=\"nextTrackClipPath()\">\n @if (labelVisible()) {\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\n </ng-container>\n } @else {\n <span [class]=\"labelClasses()\" [style]=\"labelStyles()\">{{ formattedProgress() }}</span>\n }\n }\n </div>\n}\n", styles: [".indeterminate{animation:indeterminate 16s linear infinite}@keyframes indeterminate{0%{background-position:0 0}to{background-position:100% 0}}@media(prefers-reduced-motion:reduce){.indeterminate{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
248
280
|
}
|
|
249
281
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
250
282
|
type: Component,
|
|
251
283
|
args: [{ selector: "mona-progress-bar", imports: [NgTemplateOutlet], host: {
|
|
252
284
|
"[class]": "baseClasses()",
|
|
253
|
-
"[attr.aria-
|
|
254
|
-
"[attr.aria-
|
|
255
|
-
"[attr.aria-
|
|
256
|
-
"[attr.aria-
|
|
257
|
-
"[attr.aria-valuenow]": "indeterminate() ? null : value()",
|
|
285
|
+
"[attr.aria-label]": "ariaLabel() || messages().label",
|
|
286
|
+
"[attr.aria-valuemin]": "ariaRange()?.min",
|
|
287
|
+
"[attr.aria-valuemax]": "ariaRange()?.max",
|
|
288
|
+
"[attr.aria-valuenow]": "ariaRange()?.now",
|
|
258
289
|
"[attr.aria-valuetext]": "ariaValueText() || null",
|
|
259
290
|
"[attr.aria-disabled]": "disabled() || null",
|
|
260
291
|
"[attr.data-disabled]": "disabled()",
|
|
261
292
|
role: "progressbar"
|
|
262
|
-
}, template: "<div\n [class]=\"trackClasses()\"\n [style.background-color]=\"trackColor()\"\n [attr.data-prev]=\"true\"\n [attr.data-start]=\"labelPosition() === 'start'\"\n [attr.data-end]=\"labelPosition() === 'end'\"\n [attr.data-indeterminate]=\"indeterminate()\"\n [attr.data-value]=\"progress()\"\n [style.clip-path]=\"prevTrackClipPath()\">\n @if (indeterminate()) {\n <div [class]=\"indeterminateClasses()\" class=\"indeterminate\"></div>\n } @else if (labelVisible()) {\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\n </ng-container>\n } @else {\n <span [class]=\"labelClasses()\" [style]=\"labelStyles()\">{{ formattedProgress() }}</span>\n }\n }\n</div>\n\n@if (!indeterminate()) {\n <div\n [class]=\"trackClasses()\"\n [attr.data-next]=\"true\"\n [attr.data-start]=\"labelPosition() === 'start'\"\n [attr.data-end]=\"labelPosition() === 'end'\"\n [style.clip-path]=\"nextTrackClipPath()\">\n @if (labelVisible()) {\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\n </ng-container>\n } @else {\n <span [class]=\"labelClasses()\" [style]=\"labelStyles()\">{{ formattedProgress() }}</span>\n }\n }\n </div>\n}\n", styles: [".indeterminate{animation:indeterminate 16s linear infinite}@keyframes indeterminate{0%{background-position:0 0}to{background-position:100% 0}}\n"] }]
|
|
263
|
-
}], propDecorators: { labelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ProgressBarLabelTemplateDirective), { isSignal: true }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaValueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-valuetext", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], labelStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelStyles", required: false }] }], labelVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVisible", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
293
|
+
}, template: "<div\n [class]=\"trackClasses()\"\n [style.background-color]=\"trackColor()\"\n [attr.data-prev]=\"true\"\n [attr.data-start]=\"labelPosition() === 'start'\"\n [attr.data-end]=\"labelPosition() === 'end'\"\n [attr.data-indeterminate]=\"indeterminate()\"\n [attr.data-value]=\"progress()\"\n [style.clip-path]=\"prevTrackClipPath()\">\n @if (indeterminate()) {\n <div [class]=\"indeterminateClasses()\" class=\"indeterminate\"></div>\n } @else if (labelVisible()) {\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\n </ng-container>\n } @else {\n <span [class]=\"labelClasses()\" [style]=\"labelStyles()\">{{ formattedProgress() }}</span>\n }\n }\n</div>\n\n@if (!indeterminate()) {\n <div\n [class]=\"trackClasses()\"\n [attr.data-next]=\"true\"\n [attr.data-start]=\"labelPosition() === 'start'\"\n [attr.data-end]=\"labelPosition() === 'end'\"\n [style.clip-path]=\"nextTrackClipPath()\">\n @if (labelVisible()) {\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: value(), min: min(), max: max(), percent: progress() }\">\n </ng-container>\n } @else {\n <span [class]=\"labelClasses()\" [style]=\"labelStyles()\">{{ formattedProgress() }}</span>\n }\n }\n </div>\n}\n", styles: [".indeterminate{animation:indeterminate 16s linear infinite}@keyframes indeterminate{0%{background-position:0 0}to{background-position:100% 0}}@media(prefers-reduced-motion:reduce){.indeterminate{animation:none}}\n"] }]
|
|
294
|
+
}], ctorParameters: () => [], propDecorators: { labelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ProgressBarLabelTemplateDirective), { isSignal: true }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaValueText: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-valuetext", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], labelStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelStyles", required: false }] }], labelVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelVisible", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
|
|
264
295
|
|
|
265
296
|
/*
|
|
266
297
|
* Public API Surface of @nanahoshi/mona-ui/progress-bar
|
|
@@ -270,5 +301,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
270
301
|
* Generated bundle index. Do not edit.
|
|
271
302
|
*/
|
|
272
303
|
|
|
273
|
-
export { ProgressBarComponent, ProgressBarLabelTemplateDirective };
|
|
304
|
+
export { PROGRESS_BAR_DEFAULT_MESSAGES, ProgressBarComponent, ProgressBarLabelTemplateDirective };
|
|
274
305
|
//# sourceMappingURL=nanahoshi-mona-ui-progress-bar.mjs.map
|