@maggioli-design-system/magma 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/agents/conventions.md +7 -0
- package/dist/cjs/{index-CWTZb9W2.js → index-Bg68W-da.js} +1 -1
- package/dist/cjs/{locale-Os4wg65H.js → locale-CaR39iYg.js} +12 -6
- package/dist/cjs/mds-banner_3.cjs.entry.js +1 -1
- package/dist/cjs/mds-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/mds-button-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/mds-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/mds-emoji.cjs.entry.js +1 -1
- package/dist/cjs/mds-file-preview.cjs.entry.js +1 -1
- package/dist/cjs/mds-file.cjs.entry.js +1 -1
- package/dist/cjs/mds-filter-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-filter.cjs.entry.js +1 -1
- package/dist/cjs/mds-header-bar.cjs.entry.js +1 -1
- package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/mds-img.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-date-range.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-date.cjs.entry.js +2 -2
- package/dist/cjs/mds-input-otp.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-range.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-select.cjs.entry.js +9 -5
- package/dist/cjs/mds-input-switch_2.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-tip_2.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-upload.cjs.entry.js +1 -1
- package/dist/cjs/mds-input.cjs.entry.js +154 -37
- package/dist/cjs/mds-keyboard-key.cjs.entry.js +1 -1
- package/dist/cjs/mds-keyboard.cjs.entry.js +7 -3
- package/dist/cjs/mds-label.cjs.entry.js +1 -1
- package/dist/cjs/mds-link.cjs.entry.js +1 -1
- package/dist/cjs/mds-mention.cjs.entry.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +1 -1
- package/dist/cjs/mds-note.cjs.entry.js +1 -1
- package/dist/cjs/mds-paginator.cjs.entry.js +1 -1
- package/dist/cjs/mds-policy-ai.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref-animation.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref-consumption.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref-contrast.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref-language-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref-language.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref-mode.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref-theme.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref.cjs.entry.js +1 -1
- package/dist/cjs/mds-push-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-push-notification.cjs.entry.js +1 -1
- package/dist/cjs/mds-radial-menu.cjs.entry.js +1 -1
- package/dist/cjs/mds-status-bar.cjs.entry.js +1 -1
- package/dist/cjs/mds-stepper-bar-item.cjs.entry.js +7 -5
- package/dist/cjs/mds-table-header.cjs.entry.js +1 -1
- package/dist/cjs/mds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/mds-table.cjs.entry.js +1 -1
- package/dist/cjs/mds-toast.cjs.entry.js +1 -1
- package/dist/cjs/mds-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-url-view.cjs.entry.js +1 -1
- package/dist/cjs/mds-usage.cjs.entry.js +1 -1
- package/dist/collection/common/locale.js +12 -6
- package/dist/collection/components/mds-accordion/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-item/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-timer/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-timer/documentation.json +1 -1
- package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-accordion-timer-item/documentation.json +1 -1
- package/dist/collection/components/mds-author/AGENTS.md +1 -1
- package/dist/collection/components/mds-author/documentation.json +1 -1
- package/dist/collection/components/mds-avatar/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar/documentation.json +1 -1
- package/dist/collection/components/mds-avatar-stack/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack/documentation.json +1 -1
- package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-avatar-stack-item/documentation.json +1 -1
- package/dist/collection/components/mds-badge/AGENTS.md +1 -1
- package/dist/collection/components/mds-badge/documentation.json +1 -1
- package/dist/collection/components/mds-banner/AGENTS.md +1 -1
- package/dist/collection/components/mds-banner/documentation.json +1 -1
- package/dist/collection/components/mds-benchmark-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-benchmark-bar/documentation.json +1 -1
- package/dist/collection/components/mds-bibliography/AGENTS.md +1 -1
- package/dist/collection/components/mds-bibliography/documentation.json +1 -1
- package/dist/collection/components/mds-breadcrumb/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb/documentation.json +1 -1
- package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-breadcrumb-item/documentation.json +1 -1
- package/dist/collection/components/mds-button/AGENTS.md +1 -1
- package/dist/collection/components/mds-button/documentation.json +1 -1
- package/dist/collection/components/mds-button-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-button-dropdown/documentation.json +1 -1
- package/dist/collection/components/mds-button-group/AGENTS.md +1 -1
- package/dist/collection/components/mds-button-group/documentation.json +1 -1
- package/dist/collection/components/mds-calendar/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar/documentation.json +1 -1
- package/dist/collection/components/mds-calendar-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-calendar-cell/documentation.json +1 -1
- package/dist/collection/components/mds-card/AGENTS.md +1 -1
- package/dist/collection/components/mds-card/documentation.json +1 -1
- package/dist/collection/components/mds-card-content/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-content/documentation.json +1 -1
- package/dist/collection/components/mds-card-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-footer/documentation.json +1 -1
- package/dist/collection/components/mds-card-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-header/documentation.json +1 -1
- package/dist/collection/components/mds-card-media/AGENTS.md +1 -1
- package/dist/collection/components/mds-card-media/documentation.json +1 -1
- package/dist/collection/components/mds-chip/AGENTS.md +1 -1
- package/dist/collection/components/mds-chip/documentation.json +1 -1
- package/dist/collection/components/mds-details/AGENTS.md +1 -1
- package/dist/collection/components/mds-details/documentation.json +1 -1
- package/dist/collection/components/mds-dropdown/AGENTS.md +1 -1
- package/dist/collection/components/mds-dropdown/documentation.json +1 -1
- package/dist/collection/components/mds-emoji/AGENTS.md +1 -1
- package/dist/collection/components/mds-emoji/documentation.json +1 -1
- package/dist/collection/components/mds-emoji/mds-emoji.css +0 -1
- package/dist/collection/components/mds-entity/AGENTS.md +1 -1
- package/dist/collection/components/mds-entity/documentation.json +1 -1
- package/dist/collection/components/mds-file/AGENTS.md +1 -1
- package/dist/collection/components/mds-file/documentation.json +1 -1
- package/dist/collection/components/mds-file-preview/AGENTS.md +1 -1
- package/dist/collection/components/mds-file-preview/documentation.json +1 -1
- package/dist/collection/components/mds-filter/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter/documentation.json +1 -1
- package/dist/collection/components/mds-filter-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-filter-item/documentation.json +1 -1
- package/dist/collection/components/mds-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-header/documentation.json +1 -1
- package/dist/collection/components/mds-header-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-header-bar/documentation.json +1 -1
- package/dist/collection/components/mds-help/AGENTS.md +1 -1
- package/dist/collection/components/mds-help/documentation.json +1 -1
- package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +1 -1
- package/dist/collection/components/mds-horizontal-scroll/documentation.json +1 -1
- package/dist/collection/components/mds-hr/AGENTS.md +1 -1
- package/dist/collection/components/mds-hr/documentation.json +1 -1
- package/dist/collection/components/mds-icon/AGENTS.md +1 -1
- package/dist/collection/components/mds-icon/documentation.json +1 -1
- package/dist/collection/components/mds-img/AGENTS.md +1 -1
- package/dist/collection/components/mds-img/documentation.json +1 -1
- package/dist/collection/components/mds-input/AGENTS.md +4 -2
- package/dist/collection/components/mds-input/documentation.json +2 -2
- package/dist/collection/components/mds-input/mds-input.js +12 -7
- package/dist/collection/components/mds-input/meta/input-type/InputValidationManager.js +3 -3
- package/dist/collection/components/mds-input/meta/validators.js +28 -13
- package/dist/collection/components/mds-input/meta/validity.js +8 -10
- package/dist/collection/components/mds-input-date/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date/documentation.json +1 -1
- package/dist/collection/components/mds-input-date-range/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range/documentation.json +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-date-range-preselection/documentation.json +1 -1
- package/dist/collection/components/mds-input-field/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-field/documentation.json +1 -1
- package/dist/collection/components/mds-input-otp/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-otp/documentation.json +1 -1
- package/dist/collection/components/mds-input-range/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-range/documentation.json +1 -1
- package/dist/collection/components/mds-input-range/mds-input-range.css +26 -19
- package/dist/collection/components/mds-input-select/AGENTS.md +2 -2
- package/dist/collection/components/mds-input-select/documentation.json +2 -2
- package/dist/collection/components/mds-input-select/mds-input-select.js +7 -3
- package/dist/collection/components/mds-input-switch/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-switch/documentation.json +1 -1
- package/dist/collection/components/mds-input-tip/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip/documentation.json +1 -1
- package/dist/collection/components/mds-input-tip-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-tip-item/documentation.json +1 -1
- package/dist/collection/components/mds-input-upload/AGENTS.md +1 -1
- package/dist/collection/components/mds-input-upload/documentation.json +1 -1
- package/dist/collection/components/mds-keyboard/AGENTS.md +2 -2
- package/dist/collection/components/mds-keyboard/documentation.json +2 -2
- package/dist/collection/components/mds-keyboard/mds-keyboard.js +6 -2
- package/dist/collection/components/mds-keyboard-key/AGENTS.md +1 -1
- package/dist/collection/components/mds-keyboard-key/documentation.json +1 -1
- package/dist/collection/components/mds-kpi/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi/documentation.json +1 -1
- package/dist/collection/components/mds-kpi-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-kpi-item/documentation.json +1 -1
- package/dist/collection/components/mds-label/AGENTS.md +1 -1
- package/dist/collection/components/mds-label/documentation.json +1 -1
- package/dist/collection/components/mds-link/AGENTS.md +1 -1
- package/dist/collection/components/mds-link/documentation.json +1 -1
- package/dist/collection/components/mds-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-list/documentation.json +1 -1
- package/dist/collection/components/mds-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-mention/AGENTS.md +1 -1
- package/dist/collection/components/mds-mention/documentation.json +1 -1
- package/dist/collection/components/mds-modal/AGENTS.md +1 -1
- package/dist/collection/components/mds-modal/documentation.json +1 -1
- package/dist/collection/components/mds-note/AGENTS.md +1 -1
- package/dist/collection/components/mds-note/documentation.json +1 -1
- package/dist/collection/components/mds-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-notification/documentation.json +1 -1
- package/dist/collection/components/mds-paginator/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator/documentation.json +1 -1
- package/dist/collection/components/mds-paginator-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-paginator-item/documentation.json +1 -1
- package/dist/collection/components/mds-policy-ai/AGENTS.md +1 -1
- package/dist/collection/components/mds-policy-ai/documentation.json +1 -1
- package/dist/collection/components/mds-pref/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref/documentation.json +1 -1
- package/dist/collection/components/mds-pref-animation/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-animation/documentation.json +1 -1
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-consumption/documentation.json +1 -1
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-contrast/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language/documentation.json +1 -1
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-language-item/documentation.json +1 -1
- package/dist/collection/components/mds-pref-mode/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-mode/documentation.json +1 -1
- package/dist/collection/components/mds-pref-theme/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-theme/documentation.json +1 -1
- package/dist/collection/components/mds-pref-theme-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-pref-theme-item/documentation.json +1 -1
- package/dist/collection/components/mds-price-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-cell/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-features-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-features-row/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list/documentation.json +1 -1
- package/dist/collection/components/mds-price-table-list-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-price-table-list-item/documentation.json +1 -1
- package/dist/collection/components/mds-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-progress/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification/documentation.json +1 -1
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-push-notification-item/documentation.json +1 -1
- package/dist/collection/components/mds-quote/AGENTS.md +1 -1
- package/dist/collection/components/mds-quote/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu/documentation.json +1 -1
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-menu-item/documentation.json +1 -1
- package/dist/collection/components/mds-radial-progress/AGENTS.md +1 -1
- package/dist/collection/components/mds-radial-progress/documentation.json +1 -1
- package/dist/collection/components/mds-separator/AGENTS.md +1 -1
- package/dist/collection/components/mds-separator/documentation.json +1 -1
- package/dist/collection/components/mds-spinner/AGENTS.md +1 -1
- package/dist/collection/components/mds-spinner/documentation.json +1 -1
- package/dist/collection/components/mds-status-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-status-bar/documentation.json +1 -1
- package/dist/collection/components/mds-status-bar/mds-status-bar.css +1 -0
- package/dist/collection/components/mds-stepper-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-stepper-bar-item/mds-stepper-bar-item.js +6 -4
- package/dist/collection/components/mds-tab/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar/documentation.json +1 -1
- package/dist/collection/components/mds-tab-bar-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-bar-item/documentation.json +1 -1
- package/dist/collection/components/mds-tab-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tab-item/documentation.json +1 -1
- package/dist/collection/components/mds-table/AGENTS.md +1 -1
- package/dist/collection/components/mds-table/documentation.json +1 -1
- package/dist/collection/components/mds-table-body/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-body/documentation.json +1 -1
- package/dist/collection/components/mds-table-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-footer/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-footer/documentation.json +1 -1
- package/dist/collection/components/mds-table-header/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header/documentation.json +1 -1
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-header-cell/documentation.json +1 -1
- package/dist/collection/components/mds-table-row/AGENTS.md +1 -1
- package/dist/collection/components/mds-table-row/documentation.json +1 -1
- package/dist/collection/components/mds-text/AGENTS.md +1 -1
- package/dist/collection/components/mds-text/documentation.json +1 -1
- package/dist/collection/components/mds-toast/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast/documentation.json +1 -1
- package/dist/collection/components/mds-toast-region/AGENTS.md +1 -1
- package/dist/collection/components/mds-toast-region/documentation.json +1 -1
- package/dist/collection/components/mds-tooltip/AGENTS.md +1 -1
- package/dist/collection/components/mds-tooltip/documentation.json +1 -1
- package/dist/collection/components/mds-tree/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree/documentation.json +1 -1
- package/dist/collection/components/mds-tree-item/AGENTS.md +1 -1
- package/dist/collection/components/mds-tree-item/documentation.json +1 -1
- package/dist/collection/components/mds-url-view/AGENTS.md +1 -1
- package/dist/collection/components/mds-url-view/documentation.json +1 -1
- package/dist/collection/components/mds-usage/AGENTS.md +1 -1
- package/dist/collection/components/mds-usage/documentation.json +1 -1
- package/dist/collection/components/mds-video-wall/AGENTS.md +1 -1
- package/dist/collection/components/mds-video-wall/documentation.json +1 -1
- package/dist/collection/components/mds-zero/AGENTS.md +1 -1
- package/dist/collection/components/mds-zero/documentation.json +1 -1
- package/dist/components/mds-avatar-stack-item.js +1 -1
- package/dist/components/mds-avatar-stack.js +1 -1
- package/dist/components/mds-avatar.js +1 -1
- package/dist/components/mds-banner.js +1 -1
- package/dist/components/mds-breadcrumb.js +1 -1
- package/dist/components/mds-button-dropdown.js +1 -1
- package/dist/components/mds-calendar.js +1 -1
- package/dist/components/mds-chip.js +1 -1
- package/dist/components/mds-emoji.js +1 -1
- package/dist/components/mds-entity.js +1 -1
- package/dist/components/mds-file-preview.js +1 -1
- package/dist/components/mds-file.js +1 -1
- package/dist/components/mds-filter-item.js +1 -1
- package/dist/components/mds-filter.js +1 -1
- package/dist/components/mds-header-bar.js +1 -1
- package/dist/components/mds-header.js +1 -1
- package/dist/components/mds-horizontal-scroll.js +1 -1
- package/dist/components/mds-img.js +1 -1
- package/dist/components/mds-input-date-range.js +1 -1
- package/dist/components/mds-input-date.js +1 -1
- package/dist/components/mds-input-otp.js +1 -1
- package/dist/components/mds-input-range.js +1 -1
- package/dist/components/mds-input-select.js +1 -1
- package/dist/components/mds-input-switch.js +1 -1
- package/dist/components/mds-input-tip-item.js +1 -1
- package/dist/components/mds-input-upload.js +1 -1
- package/dist/components/mds-input.js +1 -1
- package/dist/components/mds-keyboard-key.js +1 -1
- package/dist/components/mds-keyboard.js +1 -1
- package/dist/components/mds-label.js +1 -1
- package/dist/components/mds-link.js +1 -1
- package/dist/components/mds-mention.js +1 -1
- package/dist/components/mds-modal.js +1 -1
- package/dist/components/mds-note.js +1 -1
- package/dist/components/mds-paginator.js +1 -1
- package/dist/components/mds-policy-ai.js +1 -1
- package/dist/components/mds-pref-animation.js +1 -1
- package/dist/components/mds-pref-consumption.js +1 -1
- package/dist/components/mds-pref-contrast.js +1 -1
- package/dist/components/mds-pref-language-item.js +1 -1
- package/dist/components/mds-pref-language.js +1 -1
- package/dist/components/mds-pref-mode.js +1 -1
- package/dist/components/mds-pref-theme.js +1 -1
- package/dist/components/mds-pref.js +1 -1
- package/dist/components/mds-push-notification-item.js +1 -1
- package/dist/components/mds-push-notification.js +1 -1
- package/dist/components/mds-radial-menu.js +1 -1
- package/dist/components/mds-status-bar.js +1 -1
- package/dist/components/mds-stepper-bar-item.js +1 -1
- package/dist/components/mds-table-header.js +1 -1
- package/dist/components/mds-table-row.js +1 -1
- package/dist/components/mds-table.js +1 -1
- package/dist/components/mds-toast.js +1 -1
- package/dist/components/mds-tree-item.js +1 -1
- package/dist/components/mds-url-view.js +1 -1
- package/dist/components/mds-usage.js +1 -1
- package/dist/components/{p-DF3PrYBI.js → p-5lLueiFt.js} +1 -1
- package/dist/components/{p-CLe_N2_H.js → p-BO-jHv-F.js} +1 -1
- package/dist/components/{p-CNZ8_QvE.js → p-BbgQG1UL.js} +2 -2
- package/dist/components/{p-DCrdKrky.js → p-CJYY4da7.js} +1 -1
- package/dist/components/{p-C1CTahjH.js → p-CPvuXO7s.js} +1 -1
- package/dist/components/{p-B8x-d2fx.js → p-CZjwSwe5.js} +1 -1
- package/dist/components/{p-Cd8id3Br.js → p-CaROqeeK.js} +1 -1
- package/dist/components/{p-CfQETwAK.js → p-Cu5nEwMu.js} +1 -1
- package/dist/components/{p-nsbhb0lz.js → p-D0A8gS-P.js} +1 -1
- package/dist/components/{p-C99SMdU_.js → p-DFD4E9zJ.js} +1 -1
- package/dist/components/{p-DiUUZ7ZA.js → p-DTtmr_Y9.js} +1 -1
- package/dist/components/{p-D2d9eOLi.js → p-DkYDXDkD.js} +1 -1
- package/dist/components/{p-uqwixjju.js → p-DucY18_e.js} +1 -1
- package/dist/components/p-yNPPTJ7i.js +1 -0
- package/dist/documentation.json +4 -4
- package/dist/esm/{index-D2_gI0qp.js → index-BJVvHlvf.js} +1 -1
- package/dist/esm/{locale-BQmO6K_S.js → locale-B6cOkl4I.js} +12 -6
- package/dist/esm/mds-banner_3.entry.js +1 -1
- package/dist/esm/mds-breadcrumb.entry.js +1 -1
- package/dist/esm/mds-button-dropdown.entry.js +1 -1
- package/dist/esm/mds-calendar_2.entry.js +1 -1
- package/dist/esm/mds-emoji.entry.js +1 -1
- package/dist/esm/mds-file-preview.entry.js +1 -1
- package/dist/esm/mds-file.entry.js +1 -1
- package/dist/esm/mds-filter-item.entry.js +1 -1
- package/dist/esm/mds-filter.entry.js +1 -1
- package/dist/esm/mds-header-bar.entry.js +1 -1
- package/dist/esm/mds-horizontal-scroll.entry.js +1 -1
- package/dist/esm/mds-img.entry.js +1 -1
- package/dist/esm/mds-input-date-range.entry.js +1 -1
- package/dist/esm/mds-input-date.entry.js +2 -2
- package/dist/esm/mds-input-otp.entry.js +1 -1
- package/dist/esm/mds-input-range.entry.js +1 -1
- package/dist/esm/mds-input-select.entry.js +9 -5
- package/dist/esm/mds-input-switch_2.entry.js +1 -1
- package/dist/esm/mds-input-tip_2.entry.js +1 -1
- package/dist/esm/mds-input-upload.entry.js +1 -1
- package/dist/esm/mds-input.entry.js +154 -37
- package/dist/esm/mds-keyboard-key.entry.js +1 -1
- package/dist/esm/mds-keyboard.entry.js +7 -3
- package/dist/esm/mds-label.entry.js +1 -1
- package/dist/esm/mds-link.entry.js +1 -1
- package/dist/esm/mds-mention.entry.js +1 -1
- package/dist/esm/mds-modal.entry.js +1 -1
- package/dist/esm/mds-note.entry.js +1 -1
- package/dist/esm/mds-paginator.entry.js +1 -1
- package/dist/esm/mds-policy-ai.entry.js +1 -1
- package/dist/esm/mds-pref-animation.entry.js +1 -1
- package/dist/esm/mds-pref-consumption.entry.js +1 -1
- package/dist/esm/mds-pref-contrast.entry.js +1 -1
- package/dist/esm/mds-pref-language-item.entry.js +1 -1
- package/dist/esm/mds-pref-language.entry.js +1 -1
- package/dist/esm/mds-pref-mode.entry.js +1 -1
- package/dist/esm/mds-pref-theme.entry.js +1 -1
- package/dist/esm/mds-pref.entry.js +1 -1
- package/dist/esm/mds-push-notification-item.entry.js +1 -1
- package/dist/esm/mds-push-notification.entry.js +1 -1
- package/dist/esm/mds-radial-menu.entry.js +1 -1
- package/dist/esm/mds-status-bar.entry.js +1 -1
- package/dist/esm/mds-stepper-bar-item.entry.js +7 -5
- package/dist/esm/mds-table-header.entry.js +1 -1
- package/dist/esm/mds-table-row.entry.js +1 -1
- package/dist/esm/mds-table.entry.js +1 -1
- package/dist/esm/mds-toast.entry.js +1 -1
- package/dist/esm/mds-tree-item.entry.js +1 -1
- package/dist/esm/mds-url-view.entry.js +1 -1
- package/dist/esm/mds-usage.entry.js +1 -1
- package/dist/esm-es5/{index-D2_gI0qp.js → index-BJVvHlvf.js} +1 -1
- package/dist/esm-es5/{locale-BQmO6K_S.js → locale-B6cOkl4I.js} +22 -18
- package/dist/esm-es5/mds-banner_3.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb.entry.js +1 -1
- package/dist/esm-es5/mds-button-dropdown.entry.js +1 -1
- package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
- package/dist/esm-es5/mds-emoji.entry.js +1 -1
- package/dist/esm-es5/mds-file-preview.entry.js +5 -5
- package/dist/esm-es5/mds-file.entry.js +1 -1
- package/dist/esm-es5/mds-filter-item.entry.js +1 -1
- package/dist/esm-es5/mds-filter.entry.js +1 -1
- package/dist/esm-es5/mds-header-bar.entry.js +1 -1
- package/dist/esm-es5/mds-horizontal-scroll.entry.js +1 -1
- package/dist/esm-es5/mds-img.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range.entry.js +1 -1
- package/dist/esm-es5/mds-input-date.entry.js +1 -1
- package/dist/esm-es5/mds-input-otp.entry.js +1 -1
- package/dist/esm-es5/mds-input-range.entry.js +7 -7
- package/dist/esm-es5/mds-input-select.entry.js +5 -4
- package/dist/esm-es5/mds-input-switch_2.entry.js +1 -1
- package/dist/esm-es5/mds-input-tip_2.entry.js +1 -1
- package/dist/esm-es5/mds-input-upload.entry.js +1 -1
- package/dist/esm-es5/mds-input.entry.js +53 -50
- package/dist/esm-es5/mds-keyboard-key.entry.js +1 -1
- package/dist/esm-es5/mds-keyboard.entry.js +6 -3
- package/dist/esm-es5/mds-label.entry.js +1 -1
- package/dist/esm-es5/mds-link.entry.js +1 -1
- package/dist/esm-es5/mds-mention.entry.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-note.entry.js +1 -1
- package/dist/esm-es5/mds-paginator.entry.js +1 -1
- package/dist/esm-es5/mds-policy-ai.entry.js +1 -1
- package/dist/esm-es5/mds-pref-animation.entry.js +1 -1
- package/dist/esm-es5/mds-pref-consumption.entry.js +1 -1
- package/dist/esm-es5/mds-pref-contrast.entry.js +1 -1
- package/dist/esm-es5/mds-pref-language-item.entry.js +1 -1
- package/dist/esm-es5/mds-pref-language.entry.js +1 -1
- package/dist/esm-es5/mds-pref-mode.entry.js +1 -1
- package/dist/esm-es5/mds-pref-theme.entry.js +1 -1
- package/dist/esm-es5/mds-pref.entry.js +1 -1
- package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
- package/dist/esm-es5/mds-push-notification.entry.js +1 -1
- package/dist/esm-es5/mds-radial-menu.entry.js +1 -1
- package/dist/esm-es5/mds-status-bar.entry.js +1 -1
- package/dist/esm-es5/mds-stepper-bar-item.entry.js +6 -3
- package/dist/esm-es5/mds-table-header.entry.js +1 -1
- package/dist/esm-es5/mds-table-row.entry.js +1 -1
- package/dist/esm-es5/mds-table.entry.js +1 -1
- package/dist/esm-es5/mds-toast.entry.js +1 -1
- package/dist/esm-es5/mds-tree-item.entry.js +1 -1
- package/dist/esm-es5/mds-url-view.entry.js +1 -1
- package/dist/esm-es5/mds-usage.entry.js +1 -1
- package/dist/hydrate/index.js +190 -57
- package/dist/hydrate/index.mjs +190 -57
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/{p-2a964578.entry.js → p-0193734e.entry.js} +1 -1
- package/dist/magma-components/{p-ae3bf24c.system.entry.js → p-046697e4.system.entry.js} +1 -1
- package/dist/magma-components/{p-81e02997.system.entry.js → p-071f5c7b.system.entry.js} +2 -2
- package/dist/magma-components/{p-a9ba496d.entry.js → p-075acd04.entry.js} +1 -1
- package/dist/magma-components/{p-94289f3d.system.entry.js → p-07a3c63c.system.entry.js} +5 -5
- package/dist/magma-components/{p-57839384.system.entry.js → p-093b8fbc.system.entry.js} +9 -6
- package/dist/magma-components/{p-a8e1ce2f.entry.js → p-0e2cd21e.entry.js} +1 -1
- package/dist/magma-components/{p-0eb3558a.entry.js → p-11320427.entry.js} +1 -1
- package/dist/magma-components/p-14635a8f.entry.js +1 -0
- package/dist/magma-components/{p-23c057a9.entry.js → p-168d5fad.entry.js} +1 -1
- package/dist/magma-components/{p-254ee71d.entry.js → p-17ec24dc.entry.js} +1 -1
- package/dist/magma-components/{p-f670ed20.entry.js → p-198ea5d8.entry.js} +1 -1
- package/dist/magma-components/p-1c2c4670.entry.js +1 -0
- package/dist/magma-components/{p-42e50f25.system.entry.js → p-1ea582a9.system.entry.js} +3 -3
- package/dist/magma-components/{p-2d3b5eb5.entry.js → p-227f57e6.entry.js} +1 -1
- package/dist/magma-components/{p-5c4e41d3.system.entry.js → p-2752b45a.system.entry.js} +1 -1
- package/dist/magma-components/{p-068e30a5.entry.js → p-29971e1d.entry.js} +1 -1
- package/dist/magma-components/{p-8d6470fb.system.entry.js → p-2a4d22c9.system.entry.js} +1 -1
- package/dist/magma-components/{p-d0a93a14.system.entry.js → p-2c3f518c.system.entry.js} +6 -3
- package/dist/magma-components/{p-1908f808.entry.js → p-2d9c9ef9.entry.js} +1 -1
- package/dist/magma-components/p-35528bdd.system.entry.js +225 -0
- package/dist/magma-components/{p-74f515c3.system.entry.js → p-37487e8b.system.entry.js} +2 -2
- package/dist/magma-components/{p-47717251.system.entry.js → p-38b16983.system.entry.js} +3 -3
- package/dist/magma-components/{p-ca1969c5.entry.js → p-3c669cfb.entry.js} +1 -1
- package/dist/magma-components/{p-4bc47ff0.system.entry.js → p-3e18b181.system.entry.js} +1 -1
- package/dist/magma-components/{p-000c315c.entry.js → p-3f68ddca.entry.js} +1 -1
- package/dist/magma-components/{p-0d32e196.system.entry.js → p-44333d50.system.entry.js} +5 -4
- package/dist/magma-components/{p-2eb4efcd.system.entry.js → p-44998584.system.entry.js} +2 -2
- package/dist/magma-components/{p-84777b38.system.entry.js → p-50705d36.system.entry.js} +2 -2
- package/dist/magma-components/{p-0148cf0a.entry.js → p-521ba3a8.entry.js} +1 -1
- package/dist/magma-components/{p-577ae081.system.entry.js → p-5472f18d.system.entry.js} +1 -1
- package/dist/magma-components/{p-396d95a1.system.entry.js → p-55b10b70.system.entry.js} +2 -2
- package/dist/magma-components/{p-617370e7.system.entry.js → p-624a3909.system.entry.js} +6 -6
- package/dist/magma-components/{p-5533b60d.system.entry.js → p-62e94d78.system.entry.js} +1 -1
- package/dist/magma-components/{p-b738d3c1.entry.js → p-69badbba.entry.js} +1 -1
- package/dist/magma-components/{p-29ab84bf.system.entry.js → p-6af00399.system.entry.js} +4 -4
- package/dist/magma-components/{p-3dc81ab9.system.entry.js → p-6dff107d.system.entry.js} +2 -2
- package/dist/magma-components/{p-70d38284.entry.js → p-770b3c4b.entry.js} +1 -1
- package/dist/magma-components/p-77545238.entry.js +1 -0
- package/dist/magma-components/{p-05ed801b.system.entry.js → p-79f543fc.system.entry.js} +1 -1
- package/dist/magma-components/p-7ad68b2f.entry.js +1 -0
- package/dist/magma-components/{p-336f56a4.entry.js → p-7b300282.entry.js} +1 -1
- package/dist/magma-components/{p-e5950aee.entry.js → p-7be0d28b.entry.js} +1 -1
- package/dist/magma-components/{p-15ffdcf6.entry.js → p-7ca73c56.entry.js} +1 -1
- package/dist/magma-components/{p-358aa5e7.entry.js → p-7d0c8177.entry.js} +1 -1
- package/dist/magma-components/{p-80eea067.system.entry.js → p-803957de.system.entry.js} +1 -1
- package/dist/magma-components/{p-cbb80188.entry.js → p-85a31141.entry.js} +1 -1
- package/dist/magma-components/{p-dbd34e3b.entry.js → p-85fb1d08.entry.js} +1 -1
- package/dist/magma-components/{p-5da14e81.entry.js → p-87baf82a.entry.js} +1 -1
- package/dist/magma-components/{p-3fd8ff0e.system.entry.js → p-88460d31.system.entry.js} +1 -1
- package/dist/magma-components/{p-fc2d1134.entry.js → p-8b501f92.entry.js} +1 -1
- package/dist/magma-components/{p-d980c3d2.system.entry.js → p-8ca2e879.system.entry.js} +1 -1
- package/dist/magma-components/{p-8680f63e.entry.js → p-8d14f146.entry.js} +1 -1
- package/dist/magma-components/{p-244676d3.system.entry.js → p-8f47eb63.system.entry.js} +1 -1
- package/dist/magma-components/{p-8173ed07.entry.js → p-93d7485d.entry.js} +2 -2
- package/dist/magma-components/{p-1eee93c8.system.entry.js → p-94439d8b.system.entry.js} +1 -1
- package/dist/magma-components/{p-4c6da1db.system.entry.js → p-947fcf74.system.entry.js} +3 -3
- package/dist/magma-components/{p-458eb34c.system.entry.js → p-97eb734a.system.entry.js} +2 -2
- package/dist/magma-components/{p-835d79e5.system.entry.js → p-99bfa07e.system.entry.js} +1 -1
- package/dist/magma-components/{p-26b9f2b7.system.entry.js → p-9cf81575.system.entry.js} +1 -1
- package/dist/magma-components/{p-8645533a.entry.js → p-9f6c502b.entry.js} +1 -1
- package/dist/magma-components/p-B8zYiZQY.system.js +1 -1
- package/dist/magma-components/{p-OOCOFWC0.system.js → p-CuHZXISO.system.js} +7 -3
- package/dist/magma-components/{p-DXAjcaHM.system.js → p-CxTugGM9.system.js} +1 -1
- package/dist/magma-components/{p-U5iXN1wy.js → p-Dx_cCOTw.js} +1 -1
- package/dist/magma-components/{p-Raj-urIN.js → p-OafT80hV.js} +1 -1
- package/dist/magma-components/{p-2cbd532a.system.entry.js → p-a0612465.system.entry.js} +1 -1
- package/dist/magma-components/{p-26451eb6.entry.js → p-a8a0a9ba.entry.js} +1 -1
- package/dist/magma-components/{p-d37fe692.system.entry.js → p-a987086b.system.entry.js} +1 -1
- package/dist/magma-components/{p-2cdf450c.system.entry.js → p-ad05ef26.system.entry.js} +1 -1
- package/dist/magma-components/{p-29162c98.entry.js → p-b01118cc.entry.js} +1 -1
- package/dist/magma-components/{p-791a6a6f.entry.js → p-b373cc32.entry.js} +1 -1
- package/dist/magma-components/{p-8279056b.system.entry.js → p-b4633c9c.system.entry.js} +1 -1
- package/dist/magma-components/{p-55746791.entry.js → p-b467f737.entry.js} +1 -1
- package/dist/magma-components/{p-bf0cb77d.system.entry.js → p-b5cc09c7.system.entry.js} +1 -1
- package/dist/magma-components/{p-87ce9d6c.entry.js → p-b69c3126.entry.js} +1 -1
- package/dist/magma-components/{p-29450db3.entry.js → p-b8a59768.entry.js} +1 -1
- package/dist/magma-components/{p-ab00b7b9.entry.js → p-b9ca6c2e.entry.js} +1 -1
- package/dist/magma-components/{p-77939a25.system.entry.js → p-bb282bc1.system.entry.js} +1 -1
- package/dist/magma-components/{p-6f81c9ef.system.entry.js → p-be6e156a.system.entry.js} +2 -2
- package/dist/magma-components/{p-729c89f9.system.entry.js → p-c03fc4fe.system.entry.js} +1 -1
- package/dist/magma-components/{p-2aac4003.entry.js → p-c40ad03a.entry.js} +1 -1
- package/dist/magma-components/{p-471227f2.system.entry.js → p-cc954b22.system.entry.js} +2 -2
- package/dist/magma-components/{p-1faa4f71.entry.js → p-ced3ebb8.entry.js} +1 -1
- package/dist/magma-components/{p-41a28f2a.system.entry.js → p-d254de66.system.entry.js} +2 -2
- package/dist/magma-components/{p-a76a9f92.system.entry.js → p-d3491226.system.entry.js} +1 -1
- package/dist/magma-components/{p-919f9dce.entry.js → p-d608b79c.entry.js} +1 -1
- package/dist/magma-components/{p-f2f992c2.system.entry.js → p-da93a00b.system.entry.js} +2 -2
- package/dist/magma-components/{p-287601bb.entry.js → p-dbca23af.entry.js} +1 -1
- package/dist/magma-components/{p-9855b517.entry.js → p-de1ae02c.entry.js} +1 -1
- package/dist/magma-components/{p-f1aafe07.entry.js → p-dedbf8d6.entry.js} +1 -1
- package/dist/magma-components/{p-0b3e4a97.system.entry.js → p-e2fa6300.system.entry.js} +1 -1
- package/dist/magma-components/{p-860bce85.system.entry.js → p-eb92312f.system.entry.js} +3 -3
- package/dist/magma-components/{p-b5789a7c.entry.js → p-ec635255.entry.js} +1 -1
- package/dist/magma-components/{p-d561062f.system.entry.js → p-f0285a1e.system.entry.js} +1 -1
- package/dist/magma-components/{p-b476435f.entry.js → p-f09b08f9.entry.js} +1 -1
- package/dist/magma-components/{p-481897a7.entry.js → p-f306b5c1.entry.js} +1 -1
- package/dist/magma-components/{p-d0bfdb44.system.entry.js → p-f39416e9.system.entry.js} +1 -1
- package/dist/magma-components/{p-f889d413.system.entry.js → p-f5326224.system.entry.js} +1 -1
- package/dist/magma-components/{p-73833405.entry.js → p-f5a33058.entry.js} +1 -1
- package/dist/magma-components/{p-96bb36b9.entry.js → p-f616f467.entry.js} +1 -1
- package/dist/magma-components/{p-34c2daa9.system.entry.js → p-f75935ed.system.entry.js} +1 -1
- package/dist/magma-components/{p-71cbc840.entry.js → p-f901c844.entry.js} +1 -1
- package/dist/magma-components/{p-656b00df.system.entry.js → p-fc22f5e0.system.entry.js} +8 -8
- package/dist/magma-components/{p-357724ab.entry.js → p-ffbf7448.entry.js} +1 -1
- package/dist/stats.json +777 -771
- package/dist/types/common/locale.d.ts +5 -0
- package/dist/types/components/mds-input/meta/validators.d.ts +7 -2
- package/dist/types/components/mds-input/meta/validity.d.ts +3 -2
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +2 -1
- package/package.json +1 -1
- package/dist/components/p-BbTcXgbr.js +0 -1
- package/dist/magma-components/p-632ad925.system.entry.js +0 -222
- package/dist/magma-components/p-644e64a0.entry.js +0 -1
- package/dist/magma-components/p-7ec1ea2e.entry.js +0 -1
- package/dist/magma-components/p-da24a265.entry.js +0 -1
- package/dist/magma-components/p-f78c1699.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as a,H as t,d as r,h as e,c as i,t as s}from"./p-TZJN-ygm.js";import{s as n}from"./p-wI0alRSO.js";import{p as o}from"./p-CVRN4LDc.js";import{d}from"./p-CNF3u0Li.js";const m=a(class extends t{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.changeEvent=r(this,"mdsInputRangeChange",7),this.internals=this.attachInternals(),this.formDisabled=!1,this.max=100,this.min=0,this.step=1,this.onInput=()=>{this.value=Number(this.inputElement.value)},this.isDisabled=()=>!!this.disabled||this.formDisabled}allowedStep(){const a=Number(this.step);return a>0?a:1}calculateProgress(){let a=Number(this.inputElement.value);const t=this.allowedStep(),r=Math.pow(10,this.countDecimals(t));a>this.max?a=this.max:a<this.min&&(a=this.min),(a-this.min)*r%(t*r)!=0&&(a=(Math.round((a*r-this.min*r)/(t*r))*(t*r)+this.min*r)/r),this.value=a,n(this.internals,""+this.value),this.progress=(this.value-this.min)/(this.max-this.min)*100}countDecimals(a){return Math.floor(a)===a?0:(""+a).split(".")[1].length||0}disabledChanged(a){a&&n(this.internals,null)}valueChanged(a,t){a!==t&&(this.inputElement.value=""+this.value,this.calculateProgress(),this.changeEvent.emit(this.value))}minChanged(){this.calculateProgress()}maxChanged(){this.calculateProgress()}stepChanged(){this.calculateProgress()}formDisabledCallback(a){this.formDisabled=a}formResetCallback(){this.inputElement.value=void 0===this.loadValue?"":this.loadValue+"",this.onInput()}componentWillLoad(){var a;const t=Number(null!==(a=this.value)&&void 0!==a?a:NaN);this.loadValue=Number.isNaN(t)?void 0:t}componentDidLoad(){var a;this.onInput(),this.label=null!==(a=this.element.textContent)&&void 0!==a?a:"",this.calculateProgress()}render(){var a;return e(i,{key:"7588d9e5f1f0657ae63ba23cad5d3d8faee3ff17","pref-animation":o.state.animation,"pref-contrast":o.state.contrast,"pref-mode":o.state.mode,"pref-theme-scheme":o.state["theme-scheme"]},e("header",{key:"fbd890516bc521d3dc46c63ad98ee981a08cc459",class:"header",part:"header"},e("mds-text",{key:"361e2b3f13dfc017e873865853ef77ef47332434",class:"label",typography:"label"},e("slot",{key:"95335d7a71e2674d95e850fa9a45074e060daff4"})),e("mds-text",{key:"6897c798d09be9f92b1295eb67177ef1bd30f98c",class:"value",typography:"label"},this.formatValue?this.formatValue(this.value):this.value)),e("div",{key:"47550ba3617f33dafcf2547ad57ecedf11cffc6b",class:"range"},e("div",{key:"bf3c5e9a8f4b15a8c6e545670e628952fcd19393",class:"track",part:"track"},e("div",{key:"95626574ed8adb96f06a8a321a68a2e6bbe37401",class:"contrast-area"}),e("div",{key:"6e15a6d2c583415382af4eec1e142e22698c8079",class:"track-total"},e("div",{key:"ea257f325270545f8f76bb6b911dfe17a5f2efd7",class:"track-progress",style:{"--mds-input-range-progress":""+(null!==(a=this.progress)&&void 0!==a?a:0)}}))),e("input",{key:"7302c7d6348c7844c90804676c29236082204e87",ref:a=>this.inputElement=a,class:"field","aria-label":this.label,disabled:this.isDisabled(),max:this.max,min:this.min,onInput:this.onInput,step:this.step,type:"range",value:this.value,name:this.name})))}static get formAssociated(){return!0}get element(){return this}static get watchers(){return{disabled:[{disabledChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}}static get style(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-text:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-range-transition-duration:var(--duration-300,.3s);--private-input-range-transition-duration:var(--mds-input-range-transition-duration);--mds-input-range-thumb-background-disabled:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-thumb-background:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));--mds-input-range-thumb-cursor:col-resize;--mds-input-range-thumb-size:calc(var(--spacing,.0025rem)*400);--mds-input-range-track-background-disabled:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-track-background:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-track-progress-background-disabled:rgb(var(--magma-border-strong,var(--border-neutral-strong,140 140 140)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis-hover,var(--variant-primary-03,7 76 204)));--mds-input-range-track-size:calc(var(--spacing,.0025rem)*600);--private-border-width:calc(var(--mds-input-range-track-size)/2 - var(--mds-input-range-thumb-size)/2);--private-thumb-size:calc(var(--mds-input-range-thumb-size) + var(--private-border-width)*2);display:grid;gap:calc(var(--spacing,.0025rem)*200);transition-duration:var(--private-input-range-transition-duration);transition-property:color;transition-timing-function:var(--ease-out-sine,cubic-bezier(.39,.575,.565,1))}.header{display:flex;gap:calc(var(--spacing,.0025rem)*200)}.label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.value{margin-left:auto}.range{align-items:center;display:flex;height:var(--private-thumb-size);position:relative}.track{box-sizing:border-box;position:absolute;width:100%}.field{animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));appearance:none;background-color:#0000;border-radius:var(--magma-radius-full,var(--radius-full,1000px));flex-grow:1;height:calc(var(--spacing,.0025rem)*400);margin:0;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-timing-function:ease-in-out;z-index:20}.field:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.field::-webkit-slider-thumb{appearance:none;background-color:var(--mds-input-range-thumb-background);border-color:var(--mds-input-range-track-progress-background);border-radius:var(--mds-input-range-thumb-size);border-style:solid;border-width:var(--private-border-width);cursor:var(--mds-input-range-thumb-cursor);height:var(--private-thumb-size);line-height:0;transform:translateY(-50%);transition-property:background-color,border;width:var(--private-thumb-size)}.field::-webkit-slider-runnable-track{appearance:none;border:0;height:0;width:100%}.track-progress{background-color:var(--mds-input-range-track-progress-background);width:calc((100% - var(--mds-input-range-track-size))*(var(--mds-input-range-progress,0)*0.01) + var(--mds-input-range-track-size)/2)}.track-progress,.track-total{display:flex;height:var(--mds-input-range-track-size);transition-duration:var(--private-input-range-transition-duration);transition-property:background-color}.track-total{background-color:var(--mds-input-range-track-background);overflow:hidden;transition-timing-function:var(--ease-out-sine,cubic-bezier(.39,.575,.565,1));width:100%}.contrast-area,.track-total{border-radius:var(--mds-input-range-track-size)}.contrast-area{margin-left:calc(var(--spacing,.0025rem)*100);margin-right:calc(var(--spacing,.0025rem)*100)}:host(:disabled:not([disabled=false])),:host([disabled]:not([disabled=false])){--mds-input-range-thumb-background:var(--mds-input-range-thumb-background-disabled);--mds-input-range-track-background:var(--mds-input-range-track-background-disabled);--mds-input-range-track-progress-background:var(--mds-input-range-track-progress-background-disabled)}:host([disabled]:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}:host(:disabled:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([pref-contrast=more]){color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}"}},[321,"mds-input-range",{formatValue:[16],name:[513],max:[2],min:[2],step:[2],disabled:[1540],value:[1538],progress:[32],formDisabled:[32]},void 0,{disabled:[{disabledChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}]),c=m,u=function(){"undefined"!=typeof customElements&&["mds-input-range","mds-text"].forEach((a=>{switch(a){case"mds-input-range":customElements.get(s(a))||customElements.define(s(a),m);break;case"mds-text":customElements.get(s(a))||d()}}))};export{c as MdsInputRange,u as defineCustomElement}
|
|
1
|
+
import{p as a,H as t,d as e,h as r,c as i,t as s}from"./p-TZJN-ygm.js";import{s as n}from"./p-wI0alRSO.js";import{p as o}from"./p-CVRN4LDc.js";import{d}from"./p-CNF3u0Li.js";const m=a(class extends t{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.changeEvent=e(this,"mdsInputRangeChange",7),this.internals=this.attachInternals(),this.formDisabled=!1,this.max=100,this.min=0,this.step=1,this.onInput=()=>{this.value=Number(this.inputElement.value)},this.isDisabled=()=>!!this.disabled||this.formDisabled}allowedStep(){const a=Number(this.step);return a>0?a:1}calculateProgress(){let a=Number(this.inputElement.value);const t=this.allowedStep(),e=Math.pow(10,this.countDecimals(t));a>this.max?a=this.max:a<this.min&&(a=this.min),(a-this.min)*e%(t*e)!=0&&(a=(Math.round((a*e-this.min*e)/(t*e))*(t*e)+this.min*e)/e),this.value=a,n(this.internals,""+this.value),this.progress=(this.value-this.min)/(this.max-this.min)*100}countDecimals(a){return Math.floor(a)===a?0:(""+a).split(".")[1].length||0}disabledChanged(a){a&&n(this.internals,null)}valueChanged(a,t){a!==t&&(this.inputElement.value=""+this.value,this.calculateProgress(),this.changeEvent.emit(this.value))}minChanged(){this.calculateProgress()}maxChanged(){this.calculateProgress()}stepChanged(){this.calculateProgress()}formDisabledCallback(a){this.formDisabled=a}formResetCallback(){this.inputElement.value=void 0===this.loadValue?"":this.loadValue+"",this.onInput()}componentWillLoad(){var a;const t=Number(null!==(a=this.value)&&void 0!==a?a:NaN);this.loadValue=Number.isNaN(t)?void 0:t}componentDidLoad(){var a;this.onInput(),this.label=null!==(a=this.element.textContent)&&void 0!==a?a:"",this.calculateProgress()}render(){var a;return r(i,{key:"7588d9e5f1f0657ae63ba23cad5d3d8faee3ff17","pref-animation":o.state.animation,"pref-contrast":o.state.contrast,"pref-mode":o.state.mode,"pref-theme-scheme":o.state["theme-scheme"]},r("header",{key:"fbd890516bc521d3dc46c63ad98ee981a08cc459",class:"header",part:"header"},r("mds-text",{key:"361e2b3f13dfc017e873865853ef77ef47332434",class:"label",typography:"label"},r("slot",{key:"95335d7a71e2674d95e850fa9a45074e060daff4"})),r("mds-text",{key:"6897c798d09be9f92b1295eb67177ef1bd30f98c",class:"value",typography:"label"},this.formatValue?this.formatValue(this.value):this.value)),r("div",{key:"47550ba3617f33dafcf2547ad57ecedf11cffc6b",class:"range"},r("div",{key:"bf3c5e9a8f4b15a8c6e545670e628952fcd19393",class:"track",part:"track"},r("div",{key:"95626574ed8adb96f06a8a321a68a2e6bbe37401",class:"contrast-area"}),r("div",{key:"6e15a6d2c583415382af4eec1e142e22698c8079",class:"track-total"},r("div",{key:"ea257f325270545f8f76bb6b911dfe17a5f2efd7",class:"track-progress",style:{"--mds-input-range-progress":""+(null!==(a=this.progress)&&void 0!==a?a:0)}}))),r("input",{key:"7302c7d6348c7844c90804676c29236082204e87",ref:a=>this.inputElement=a,class:"field","aria-label":this.label,disabled:this.isDisabled(),max:this.max,min:this.min,onInput:this.onInput,step:this.step,type:"range",value:this.value,name:this.name})))}static get formAssociated(){return!0}get element(){return this}static get watchers(){return{disabled:[{disabledChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}}static get style(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-text:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-range-transition-duration:var(--duration-300,.3s);--private-input-range-transition-duration:var(--mds-input-range-transition-duration);--mds-input-range-thumb-background-disabled:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-thumb-background:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));--mds-input-range-thumb-cursor:col-resize;--mds-input-range-thumb-size:calc(var(--spacing,.0025rem)*400);--mds-input-range-track-background-disabled:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-track-background:rgb(var(--magma-wash-strong,var(--tone-neutral-08,208 208 208)));--mds-input-range-track-progress-background-disabled:rgb(var(--magma-border-strong,var(--border-neutral-strong,140 140 140)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis-hover,var(--variant-primary-03,7 76 204)));--mds-input-range-track-size:calc(var(--spacing,.0025rem)*600);--private-border-width:calc(var(--mds-input-range-track-size)/2 - var(--mds-input-range-thumb-size)/2);--private-thumb-size:calc(var(--mds-input-range-thumb-size) + var(--private-border-width)*2);display:grid;gap:calc(var(--spacing,.0025rem)*200);transition-duration:var(--private-input-range-transition-duration);transition-property:color;transition-timing-function:var(--ease-out-sine,cubic-bezier(.39,.575,.565,1))}.header{display:flex;gap:calc(var(--spacing,.0025rem)*200)}.label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.value{margin-left:auto}.range{align-items:center;display:flex;height:var(--private-thumb-size);position:relative}.track{box-sizing:border-box;position:absolute;width:100%}.field{animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));appearance:none;background-color:#0000;border-radius:var(--magma-radius-full,var(--radius-full,1000px));flex-grow:1;height:calc(var(--spacing,.0025rem)*400);margin:0;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-timing-function:ease-in-out;z-index:20}.field:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.field::-webkit-slider-thumb{appearance:none;background-color:var(--mds-input-range-thumb-background);border-color:var(--mds-input-range-track-progress-background);border-radius:var(--mds-input-range-thumb-size);border-style:solid;border-width:var(--private-border-width);cursor:var(--mds-input-range-thumb-cursor);height:var(--private-thumb-size);line-height:0;transform:translateY(-50%);transition-property:background-color,border;width:var(--private-thumb-size)}.field::-webkit-slider-runnable-track{appearance:none;border:0;height:0;width:100%}.track-progress{background-color:var(--mds-input-range-track-progress-background);width:calc((100% - var(--mds-input-range-track-size))*(var(--mds-input-range-progress,0)*0.01) + var(--mds-input-range-track-size)/2)}.track-progress,.track-total{display:flex;height:var(--mds-input-range-track-size);transition-duration:var(--private-input-range-transition-duration);transition-property:background-color}.track-total{background-color:var(--mds-input-range-track-background);overflow:hidden;transition-timing-function:var(--ease-out-sine,cubic-bezier(.39,.575,.565,1));width:100%}.contrast-area,.track-total{border-radius:var(--mds-input-range-track-size)}.contrast-area{margin-left:calc(var(--spacing,.0025rem)*100);margin-right:calc(var(--spacing,.0025rem)*100)}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([pref-contrast=more]){color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host(:disabled:not([disabled=false])),:host([disabled]:not([disabled=false])){--mds-input-range-thumb-background:var(--mds-input-range-thumb-background-disabled);--mds-input-range-track-background:var(--mds-input-range-track-background-disabled);--mds-input-range-track-progress-background:var(--mds-input-range-track-progress-background-disabled)}:host([disabled]:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}:host(:disabled:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}"}},[321,"mds-input-range",{formatValue:[16],name:[513],max:[2],min:[2],step:[2],disabled:[1540],value:[1538],progress:[32],formDisabled:[32]},void 0,{disabled:[{disabledChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}]),u=m,c=function(){"undefined"!=typeof customElements&&["mds-input-range","mds-text"].forEach((a=>{switch(a){case"mds-input-range":customElements.get(s(a))||customElements.define(s(a),m);break;case"mds-text":customElements.get(s(a))||d()}}))};export{u as MdsInputRange,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,d as r,h as i,c as a,t as s}from"./p-TZJN-ygm.js";import{p as o}from"./p-CVRN4LDc.js";import{m as n}from"./p-DiWN48aq.js";import{s as c}from"./p-wI0alRSO.js";import{u as l}from"./p-DiUUZ7ZA.js";import{d}from"./p-Cmn1DJAB.js";import{d as u}from"./p-BU3bsIX2.js";import{d as m}from"./p-D2d9eOLi.js";import{d as p}from"./p-CNF3u0Li.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.changeEvent=r(this,"mdsInputSelectChange",7),this.internals=this.attachInternals(),this.adoptingSelection=!1,this.hasFocus=!1,this.formDisabled=!1,this.disabled=!1,this.required=!1,this.multiple=!1,this.rows=0,this.size="lg",this.value="",this.isDisabled=()=>!!this.disabled||this.formDisabled,this.onInput=()=>{this.adoptSelection(),this.syncSelection()},this.onBlur=()=>{this.hasFocus=!1},this.onFocus=()=>{this.hasFocus=!0},this.hasPlaceholder=()=>{var t;return""!==(null!==(t=this.placeholder)&&void 0!==t?t:"")},this.placeholderOption=()=>{var t,e;return null!==(e=null===(t=this.selectEl)||void 0===t?void 0:t.querySelector(".placeholder-option"))&&void 0!==e?e:null},this.emptyOptions=()=>{var t;const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("select"),r=null==e?void 0:e.querySelectorAll("option");r&&r.forEach(((t,e)=>{this.hasPlaceholder()||t.remove(),this.hasPlaceholder()&&e>0&&t.remove()}))},this.onSlotChangeHandler=()=>{var t,e,r;const i=null===(e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelectorAll("slot")[0])||void 0===e?void 0:e.assignedNodes(),a=null===(r=this.selectEl)||void 0===r?void 0:r.querySelectorAll("option");null!=a&&(!this.hasPlaceholder()&&a.length>0&&this.emptyOptions(),this.hasPlaceholder()&&a.length>1&&this.emptyOptions(),null==i||i.forEach((t=>{var e;null===(e=this.selectEl)||void 0===e||e.appendChild(t.cloneNode(!0))})),this.applySelection(!0),this.syncSelection())}}async setValue(t){return this.value=t,Promise.resolve()}valueChanged(){this.adoptingSelection||(this.applySelection(!1),this.syncSelection())}requiredChanged(){this.updateFormValidity()}nameChanged(){this.updateFormValue(this.selectedValues())}selectedValues(){var t;return null==this.selectEl?""===(null!==(t=this.value)&&void 0!==t?t:"")?[]:[""+this.value]:Array.from(this.selectEl.selectedOptions).filter((t=>!t.classList.contains("placeholder-option"))).map((t=>t.value))}syncSelection(){var t;const e=this.selectedValues();this.updateFormValue(e),this.updateFormValidity();const r=null===(t=this.value)||void 0===t?void 0:""+t,i=JSON.stringify([r,e]);i!==this.emittedSelection&&(this.emittedSelection=i,this.changeEvent.emit({value:r,values:e}))}updateFormValue(t){var e,r,i;if(!this.multiple)return void c(this.internals,null!==(r=null===(e=this.value)||void 0===e?void 0:""+e)&&void 0!==r?r:null);const a=null!==(i=this.name)&&void 0!==i?i:"";if(""===a||0===t.length)return void c(this.internals,null);const s=new FormData;t.forEach((t=>s.append(a,t))),c(this.internals,s)}updateFormValidity(){var t;const e=this.required&&""===(null!==(t=this.value)&&void 0!==t?t:"");l(this.internals,e?{rule:"requiredSelect"}:void 0,this.selectEl)}disabledChanged(t){t&&c(this.internals,null)}placeholderChanged(t,e){if(null!=this.selectEl&&null!=t&&""!==t&&""===(null!=e?e:"")){let e=this.placeholderOption();e&&e.remove(),e=document.createElement("option"),e.className="placeholder-option",this.selectEl.insertBefore(e,this.selectEl.firstChild),e.value="",e.text=t,(null==this.defaultValue||""===this.defaultValue||0===this.defaultValue||Number.isNaN(this.defaultValue))&&(e.selected=!0,this.value=void 0),this.required&&(e.disabled=!0)}}formDisabledCallback(t){this.formDisabled=t}formResetCallback(){if(null==this.selectEl)return;const t=Array.from(this.selectEl.querySelectorAll("option"));t.forEach((t=>{t.selected=t.defaultSelected}));const e=this.placeholderOption();e&&this.hasPlaceholder()&&!t.some((t=>t.defaultSelected))&&(e.selected=!0),this.adoptingSelection=!0,this.value=this.loadValue,this.adoptingSelection=!1,this.applySelection(!0),this.syncSelection()}legacyRows(){const t=this.size;return"number"==typeof t?t:"string"==typeof t&&/^\d+$/.test(t)?Number(t):void 0}sizeChanged(){void 0!==this.legacyRows()&&console.warn("<mds-input-select>: a number in `size` is deprecated: use `rows` for the visible option rows. `size` sets the height of the field (sm, md, lg).")}componentWillLoad(){this.sizeChanged(),null==this.defaultValue||""===this.defaultValue||0===this.defaultValue||Number.isNaN(this.defaultValue)||(this.value=this.defaultValue),this.loadValue=this.value}componentDidRender(){this.updateFormValidity()}componentDidLoad(){this.multiple||null==this.value||""===this.value||0===this.value||Number.isNaN(this.value)||c(this.internals,""+this.value)}adoptSelection(){null!=this.selectEl&&(this.adoptingSelection=!0,this.value=this.selectEl.value,this.adoptingSelection=!1)}applySelection(t){if(null==this.selectEl)return;if(null!=this.value&&""!==this.value&&0!==this.value&&!Number.isNaN(this.value))return void this.selectEl.querySelectorAll("option").forEach((t=>{t.selected=t.value===this.value}));if(t)return void this.adoptSelection();this.selectEl.querySelectorAll("option").forEach((t=>{t.selected=!1}));const e=this.placeholderOption();e&&this.hasPlaceholder()&&(e.selected=!0),this.adoptSelection()}render(){var t;return i(a,{key:"e9c490938417141ab12a6e32eef35ac948f1cd9d","pref-animation":o.state.animation,"pref-contrast":o.state.contrast,"pref-mode":o.state.mode,"pref-theme-scheme":o.state["theme-scheme"]},i("select",{key:"37402baf4c6be92709b0db66e59154e4626a2904","aria-label":this.accessibleName,class:"input",onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,name:this.name,required:this.required,disabled:this.isDisabled(),multiple:this.multiple,size:this.rows||this.legacyRows()||0,part:"select",ref:t=>this.selectEl=t},i("option",{key:"60c39c92efc0e49b7cacf0331a2427077de91ded",class:"placeholder-option",value:"",disabled:!!this.required||void 0,selected:!(null!=this.defaultValue&&""!==this.defaultValue&&0!==this.defaultValue&&!Number.isNaN(this.defaultValue))||void 0},this.placeholder)),i("div",{key:"40a56e895ba8c244ca715d2e8e9d21c609a9c1bc",class:"icon-container"},i("mds-icon",{key:"f9c1985f0284cc3199a6c51e921d527262938341",class:"icon",name:n})),i("div",{key:"dc4db6fd01edb9597c56dc2f54b27aad5d220886",class:"option-container"},i("slot",{key:"021c3bd6739a68584d4bf1abd5ef9e60f0684303",onSlotchange:this.onSlotChangeHandler})),i("mds-input-tip",{key:"7a7d59b255283f5aebc4e1d66589316a0104cbfe",position:"top",active:this.hasFocus,part:"tip-top"},this.isDisabled()&&i("mds-input-tip-item",{key:"cd5649dc42823326511ba1e5c43a9e320571c136",expanded:!0,variant:"disabled"}),this.required&&i("mds-input-tip-item",{key:"86d880f856a1676a54c6a9393c48779509d49a2f",expanded:this.hasFocus,variant:""===(null!==(t=this.value)&&void 0!==t?t:"")?"required":"required-success"})))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{value:[{valueChanged:0}],required:[{requiredChanged:0}],name:[{nameChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}],size:[{sizeChanged:0}]}}static get style(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-input-tip,mds-input-tip-item):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-select-variant-color-rgb:var(--magma-text-default,var(--text-neutral-default,5 5 5));--mds-input-select-ring:0 0 0 1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1);--mds-input-select-shadow:0 1px calc(var(--spacing,.0025rem)*75) 0 rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1),0 1px calc(var(--spacing,.0025rem)*50) 0 rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-blur-background-color,#0000);--mds-input-select-arrow-icon-blur-background-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/0);--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.5);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-blur-color,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.5);--mds-input-select-arrow-icon-hover-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0));--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--magma-surface-inverse-muted,var(--tone-neutral-03,73 73 73)));--mds-input-select-transition-duration:var(--duration-300,.3s);--mds-input-select-icon-transition-duration:var(--duration-200,.2s);--private-input-select-transition-duration:var(--mds-input-select-transition-duration);--private-input-select-icon-transition-duration:var(--mds-input-select-icon-transition-duration);--private-input-select-height:calc(var(--spacing,.0025rem)*1200);--private-input-select-padding-inline:calc(var(--spacing,.0025rem)*400);--private-input-select-arrow-area:calc(var(--spacing,.0025rem)*1200);font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:min(var(--magma-radius-xl,var(--radius-squircle-xl,36px)),var(--magma-corner-cap,.5) * var(--private-input-select-height));color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));corner-shape:var(--magma-corner-shape,squircle);display:flex;position:relative;-webkit-user-select:none;user-select:none;--mds-input-select-variant-color-rgb:0 0 0;--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204)))}:host([required]:not([required=false]):focus-within) .icon{transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150))}:host(:focus-within),:host(:hover){--mds-input-select-variant-color-rgb:var(--magma-accent-fg,var(--variant-primary-03,7 76 204));--mds-input-select-shadow:0 calc(var(--spacing,.0025rem)*100) calc(var(--spacing,.0025rem)*150) -1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1),0 calc(var(--spacing,.0025rem)*50) calc(var(--spacing,.0025rem)*100) -1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-hover-background-color,#0000);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-hover-color,rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-select-variant-color-rgb:var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))}:host(:focus-within) .input,:host(:hover) .input{--mds-input-select-ring:0 0 0 calc(var(--spacing,.0025rem)*75) rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/1)}.input{font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;appearance:none;background-color:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));border-radius:inherit;box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-sizing:border-box;color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));corner-shape:inherit;border:0;cursor:pointer;margin:0;min-height:var(--private-input-select-height);overflow:hidden;padding-left:var(--private-input-select-padding-inline);padding-right:var(--private-input-select-arrow-area);text-overflow:ellipsis;transition-property:background-color,border-color,box-shadow,color,fill;width:100%}.input,.input:focus,.input:hover{transition-duration:var(--private-input-select-transition-duration);transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input:focus,.input:hover{--tw-outline-style:none;color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)));outline-style:none}:host([value]:not([value=""])) .input{color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}:host([required]:not([required=false])) .input{color:rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119)))}.input:disabled{background-color:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));opacity:1}:host([disabled]:not([disabled=false])),:host([disabled]:not([disabled=false])) .input{pointer-events:none}:host([disabled]:not([disabled=false])) .icon{fill:rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119)));transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200))}.icon-container{align-items:center;color:inherit;display:flex;height:var(--private-input-select-height);pointer-events:none;position:absolute;right:var(--private-input-select-padding-inline)}.icon{background-color:var(--mds-input-select-arrow-icon-background-color,#0000);border-radius:var(--magma-radius-full,var(--radius-full,1000px));display:flex;fill:var(--mds-input-select-arrow-icon-color,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));transition-duration:var(--private-input-select-icon-transition-duration);transition-property:background-color,fill}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.option-container{display:none}mds-input-tip{--mds-input-tip-horizontal-offset:inherit;--mds-input-tip-horizontal-offset-focused:inherit;--mds-input-tip-vertical-offset:inherit;--mds-input-tip-background:inherit}@container (max-width:210px){:host .tip__content,:host(:focus-within) .tip__content{grid-template-columns:0fr;opacity:0}:host .tip{padding-left:0;padding-right:0}}:host([size=md]){--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*800);--private-input-select-height:calc(var(--spacing,.0025rem)*900);--private-input-select-padding-inline:calc(var(--spacing,.0025rem)*300);--private-input-select-arrow-area:calc(var(--spacing,.0025rem)*1000)}:host([size=sm]){--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*600);--private-input-select-height:calc(var(--spacing,.0025rem)*700);--private-input-select-padding-inline:calc(var(--spacing,.0025rem)*200);--private-input-select-arrow-area:calc(var(--spacing,.0025rem)*800)}:host([size=sm]) .icon{height:calc(var(--spacing,.0025rem)*400);width:calc(var(--spacing,.0025rem)*400)}:host([variant=info]){--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=info]:focus-within),:host([variant=info]:hover){--mds-input-select-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=success]:focus-within),:host([variant=success]:hover){--mds-input-select-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within),:host([variant=warning]:hover){--mds-input-select-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=error]:focus-within),:host([variant=error]:hover){--mds-input-select-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .input{color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}:host([pref-contrast=more]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}:host([pref-contrast=more]) .input{color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host([pref-contrast=more][pref-mode=dark]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}@media (forced-colors:active){.input:focus,.input:hover{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .input{color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}:host([pref-contrast=more]:not([pref-mode])),:host([pref-contrast=more][pref-mode=system]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input{color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host([pref-contrast=system][pref-mode=dark]),:host([pref-mode=dark]:not([pref-contrast])){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}}@media (prefers-contrast:more) and (prefers-color-scheme:dark){:host(:not([pref-contrast]):not([pref-mode])),:host([pref-contrast=system]:not([pref-mode])),:host([pref-contrast=system][pref-mode=system]),:host([pref-mode=system]:not([pref-contrast])){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}}'}},[321,"mds-input-select",{accessibleName:[1,"aria-label"],autocomplete:[513],autoFocus:[516,"auto-focus"],placeholder:[513],name:[513],disabled:[516],required:[516],multiple:[516],rows:[514],size:[520],value:[520],defaultValue:[520,"default-value"],variant:[513],hasFocus:[32],formDisabled:[32],setValue:[64]},void 0,{value:[{valueChanged:0}],required:[{requiredChanged:0}],name:[{nameChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}],size:[{sizeChanged:0}]}]),v=h,g=function(){"undefined"!=typeof customElements&&["mds-input-select","mds-icon","mds-input-tip","mds-input-tip-item","mds-text"].forEach((t=>{switch(t){case"mds-input-select":customElements.get(s(t))||customElements.define(s(t),h);break;case"mds-icon":customElements.get(s(t))||d();break;case"mds-input-tip":customElements.get(s(t))||u();break;case"mds-input-tip-item":customElements.get(s(t))||m();break;case"mds-text":customElements.get(s(t))||p()}}))};export{v as MdsInputSelect,g as defineCustomElement}
|
|
1
|
+
import{p as t,H as e,d as r,h as i,c as a,t as s}from"./p-TZJN-ygm.js";import{p as o}from"./p-CVRN4LDc.js";import{m as n}from"./p-DiWN48aq.js";import{s as c}from"./p-wI0alRSO.js";import{u as l}from"./p-DTtmr_Y9.js";import{d}from"./p-Cmn1DJAB.js";import{d as u}from"./p-BU3bsIX2.js";import{d as m}from"./p-DkYDXDkD.js";import{d as p}from"./p-CNF3u0Li.js";const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.changeEvent=r(this,"mdsInputSelectChange",7),this.internals=this.attachInternals(),this.adoptingSelection=!1,this.hasFocus=!1,this.formDisabled=!1,this.disabled=!1,this.required=!1,this.multiple=!1,this.rows=0,this.size="lg",this.value="",this.isDisabled=()=>!!this.disabled||this.formDisabled,this.onInput=()=>{this.adoptSelection(),this.syncSelection()},this.onBlur=()=>{this.hasFocus=!1},this.onFocus=()=>{this.hasFocus=!0},this.hasPlaceholder=()=>{var t;return""!==(null!==(t=this.placeholder)&&void 0!==t?t:"")},this.placeholderOption=()=>{var t,e;return null!==(e=null===(t=this.selectEl)||void 0===t?void 0:t.querySelector(".placeholder-option"))&&void 0!==e?e:null},this.emptyOptions=()=>{var t;const e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("select"),r=null==e?void 0:e.querySelectorAll("option");r&&r.forEach(((t,e)=>{this.hasPlaceholder()||t.remove(),this.hasPlaceholder()&&e>0&&t.remove()}))},this.onSlotChangeHandler=()=>{var t,e,r;const i=null===(e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelectorAll("slot")[0])||void 0===e?void 0:e.assignedNodes(),a=null===(r=this.selectEl)||void 0===r?void 0:r.querySelectorAll("option");null!=a&&(!this.hasPlaceholder()&&a.length>0&&this.emptyOptions(),this.hasPlaceholder()&&a.length>1&&this.emptyOptions(),null==i||i.forEach((t=>{var e;null===(e=this.selectEl)||void 0===e||e.appendChild(t.cloneNode(!0))})),this.applySelection(!0),this.syncSelection())}}async setValue(t){return this.value=t,Promise.resolve()}valueChanged(){this.adoptingSelection||(this.applySelection(!1),this.syncSelection())}requiredChanged(){this.updateFormValidity()}nameChanged(){this.updateFormValue(this.selectedValues())}selectedValues(){var t;return null==this.selectEl?""===(null!==(t=this.value)&&void 0!==t?t:"")?[]:[""+this.value]:Array.from(this.selectEl.selectedOptions).filter((t=>!t.classList.contains("placeholder-option"))).map((t=>t.value))}syncSelection(){var t;const e=this.selectedValues();this.updateFormValue(e),this.updateFormValidity();const r=null===(t=this.value)||void 0===t?void 0:""+t,i=JSON.stringify([r,e]);if(i===this.emittedSelection)return;const a=void 0===this.emittedSelection;this.emittedSelection=i,a||this.changeEvent.emit({value:r,values:e})}updateFormValue(t){var e,r,i;if(!this.multiple)return void c(this.internals,null!==(r=null===(e=this.value)||void 0===e?void 0:""+e)&&void 0!==r?r:null);const a=null!==(i=this.name)&&void 0!==i?i:"";if(""===a||0===t.length)return void c(this.internals,null);const s=new FormData;t.forEach((t=>s.append(a,t))),c(this.internals,s)}updateFormValidity(){var t;const e=this.required&&""===(null!==(t=this.value)&&void 0!==t?t:"");l(this.internals,e?{rule:"requiredSelect"}:void 0,this.selectEl)}disabledChanged(t){t&&c(this.internals,null)}placeholderChanged(t,e){if(null!=this.selectEl&&null!=t&&""!==t&&""===(null!=e?e:"")){let e=this.placeholderOption();e&&e.remove(),e=document.createElement("option"),e.className="placeholder-option",this.selectEl.insertBefore(e,this.selectEl.firstChild),e.value="",e.text=t,(null==this.defaultValue||""===this.defaultValue||0===this.defaultValue||Number.isNaN(this.defaultValue))&&(e.selected=!0,this.value=void 0),this.required&&(e.disabled=!0)}}formDisabledCallback(t){this.formDisabled=t}formResetCallback(){if(null==this.selectEl)return;const t=Array.from(this.selectEl.querySelectorAll("option"));t.forEach((t=>{t.selected=t.defaultSelected}));const e=this.placeholderOption();e&&this.hasPlaceholder()&&!t.some((t=>t.defaultSelected))&&(e.selected=!0),this.adoptingSelection=!0,this.value=this.loadValue,this.adoptingSelection=!1,this.applySelection(!0),this.syncSelection()}legacyRows(){const t=this.size;return"number"==typeof t?t:"string"==typeof t&&/^\d+$/.test(t)?Number(t):void 0}sizeChanged(){void 0!==this.legacyRows()&&console.warn("<mds-input-select>: a number in `size` is deprecated: use `rows` for the visible option rows. `size` sets the height of the field (sm, md, lg).")}componentWillLoad(){this.sizeChanged(),null==this.defaultValue||""===this.defaultValue||0===this.defaultValue||Number.isNaN(this.defaultValue)||(this.value=this.defaultValue),this.loadValue=this.value}componentDidRender(){this.updateFormValidity()}componentDidLoad(){this.multiple||null==this.value||""===this.value||0===this.value||Number.isNaN(this.value)||c(this.internals,""+this.value)}adoptSelection(){null!=this.selectEl&&(this.adoptingSelection=!0,this.value=this.selectEl.value,this.adoptingSelection=!1)}applySelection(t){if(null==this.selectEl)return;if(null!=this.value&&""!==this.value&&0!==this.value&&!Number.isNaN(this.value))return void this.selectEl.querySelectorAll("option").forEach((t=>{t.selected=t.value===this.value}));if(t)return void this.adoptSelection();this.selectEl.querySelectorAll("option").forEach((t=>{t.selected=!1}));const e=this.placeholderOption();e&&this.hasPlaceholder()&&(e.selected=!0),this.adoptSelection()}render(){var t;return i(a,{key:"8f7131a5ac5e7e6c398d060d1cf17de1b65d0b95","pref-animation":o.state.animation,"pref-contrast":o.state.contrast,"pref-mode":o.state.mode,"pref-theme-scheme":o.state["theme-scheme"]},i("select",{key:"40850af3aea61f82c8cf95e5b7e8559524ec37cb","aria-label":this.accessibleName,class:"input",onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,name:this.name,required:this.required,disabled:this.isDisabled(),multiple:this.multiple,size:this.rows||this.legacyRows()||0,part:"select",ref:t=>this.selectEl=t},i("option",{key:"02dd4058f848557e9e44a0b13694df8ea29f5f09",class:"placeholder-option",value:"",disabled:!!this.required||void 0,selected:!(null!=this.defaultValue&&""!==this.defaultValue&&0!==this.defaultValue&&!Number.isNaN(this.defaultValue))||void 0},this.placeholder)),i("div",{key:"606ce4acbc43476392c3d65d9bdf73d45c5d7da2",class:"icon-container"},i("mds-icon",{key:"844fe12e9494c7baaf11306090a5475e5041aab9",class:"icon",name:n})),i("div",{key:"ccb1fc6353ea3e62b7baa65f05fee83ad19c2745",class:"option-container"},i("slot",{key:"466546a17018cf6658fa6035048990afee0a4097",onSlotchange:this.onSlotChangeHandler})),i("mds-input-tip",{key:"72f16cbf02d298614cb36fde62a9cba23b836071",position:"top",active:this.hasFocus,part:"tip-top"},this.isDisabled()&&i("mds-input-tip-item",{key:"4be88932616cae7f72f043006b36267c8b4e3fdc",expanded:!0,variant:"disabled"}),this.required&&i("mds-input-tip-item",{key:"5686e299d11f8622c2a5e7d12b497db5d3c097d2",expanded:this.hasFocus,variant:""===(null!==(t=this.value)&&void 0!==t?t:"")?"required":"required-success"})))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{value:[{valueChanged:0}],required:[{requiredChanged:0}],name:[{nameChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}],size:[{sizeChanged:0}]}}static get style(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-input-tip,mds-input-tip-item):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-select-variant-color-rgb:var(--magma-text-default,var(--text-neutral-default,5 5 5));--mds-input-select-ring:0 0 0 1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1);--mds-input-select-shadow:0 1px calc(var(--spacing,.0025rem)*75) 0 rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1),0 1px calc(var(--spacing,.0025rem)*50) 0 rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-blur-background-color,#0000);--mds-input-select-arrow-icon-blur-background-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/0);--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.5);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-blur-color,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.5);--mds-input-select-arrow-icon-hover-color:rgb(var(--mds-input-select-variant-color-rgb,0 0 0));--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--magma-surface-inverse-muted,var(--tone-neutral-03,73 73 73)));--mds-input-select-transition-duration:var(--duration-300,.3s);--mds-input-select-icon-transition-duration:var(--duration-200,.2s);--private-input-select-transition-duration:var(--mds-input-select-transition-duration);--private-input-select-icon-transition-duration:var(--mds-input-select-icon-transition-duration);--private-input-select-height:calc(var(--spacing,.0025rem)*1200);--private-input-select-padding-inline:calc(var(--spacing,.0025rem)*400);--private-input-select-arrow-area:calc(var(--spacing,.0025rem)*1200);font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:min(var(--magma-radius-xl,var(--radius-squircle-xl,36px)),var(--magma-corner-cap,.5) * var(--private-input-select-height));color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));corner-shape:var(--magma-corner-shape,squircle);display:flex;position:relative;-webkit-user-select:none;user-select:none;--mds-input-select-variant-color-rgb:0 0 0;--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204)))}:host([required]:not([required=false]):focus-within) .icon{transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150))}:host(:focus-within),:host(:hover){--mds-input-select-variant-color-rgb:var(--magma-accent-fg,var(--variant-primary-03,7 76 204));--mds-input-select-shadow:0 calc(var(--spacing,.0025rem)*100) calc(var(--spacing,.0025rem)*150) -1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.1),0 calc(var(--spacing,.0025rem)*50) calc(var(--spacing,.0025rem)*100) -1px rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-hover-background-color,#0000);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-hover-color,rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-select-variant-color-rgb:var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))}:host(:focus-within) .input,:host(:hover) .input{--mds-input-select-ring:0 0 0 calc(var(--spacing,.0025rem)*75) rgb(var(--mds-input-select-variant-color-rgb,0 0 0)/1)}.input{font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;appearance:none;background-color:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));border-radius:inherit;box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-sizing:border-box;color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));corner-shape:inherit;border:0;cursor:pointer;margin:0;min-height:var(--private-input-select-height);overflow:hidden;padding-left:var(--private-input-select-padding-inline);padding-right:var(--private-input-select-arrow-area);text-overflow:ellipsis;transition-property:background-color,border-color,box-shadow,color,fill;width:100%}.input,.input:focus,.input:hover{transition-duration:var(--private-input-select-transition-duration);transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input:focus,.input:hover{--tw-outline-style:none;color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)));outline-style:none}:host([value]:not([value=""])) .input{color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}:host([required]:not([required=false])) .input{color:rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119)))}.input:disabled{background-color:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));opacity:1}:host([disabled]:not([disabled=false])),:host([disabled]:not([disabled=false])) .input{pointer-events:none}:host([disabled]:not([disabled=false])) .icon{fill:rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119)));transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200))}.icon-container{align-items:center;color:inherit;display:flex;height:var(--private-input-select-height);pointer-events:none;position:absolute;right:var(--private-input-select-padding-inline)}.icon{background-color:var(--mds-input-select-arrow-icon-background-color,#0000);border-radius:var(--magma-radius-full,var(--radius-full,1000px));display:flex;fill:var(--mds-input-select-arrow-icon-color,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));transition-duration:var(--private-input-select-icon-transition-duration);transition-property:background-color,fill}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.option-container{display:none}mds-input-tip{--mds-input-tip-horizontal-offset:inherit;--mds-input-tip-horizontal-offset-focused:inherit;--mds-input-tip-vertical-offset:inherit;--mds-input-tip-background:inherit}@container (max-width:210px){:host .tip__content,:host(:focus-within) .tip__content{grid-template-columns:0fr;opacity:0}:host .tip{padding-left:0;padding-right:0}}:host([size=md]){--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*800);--private-input-select-height:calc(var(--spacing,.0025rem)*900);--private-input-select-padding-inline:calc(var(--spacing,.0025rem)*300);--private-input-select-arrow-area:calc(var(--spacing,.0025rem)*1000)}:host([size=sm]){--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*600);--private-input-select-height:calc(var(--spacing,.0025rem)*700);--private-input-select-padding-inline:calc(var(--spacing,.0025rem)*200);--private-input-select-arrow-area:calc(var(--spacing,.0025rem)*800)}:host([size=sm]) .icon{height:calc(var(--spacing,.0025rem)*400);width:calc(var(--spacing,.0025rem)*400)}:host([variant=info]){--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=info]:focus-within),:host([variant=info]:hover){--mds-input-select-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=success]:focus-within),:host([variant=success]:hover){--mds-input-select-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within),:host([variant=warning]:hover){--mds-input-select-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-arrow-icon-blur-background-color:#0000;--mds-input-select-arrow-icon-hover-background-color:#0000;--mds-input-select-arrow-icon-blur-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-arrow-icon-hover-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=error]:focus-within),:host([variant=error]:hover){--mds-input-select-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .input{color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}:host([pref-contrast=more]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}:host([pref-contrast=more]) .input{color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host([pref-contrast=more][pref-mode=dark]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}@media (forced-colors:active){.input:focus,.input:hover{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .input{color:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)))}:host([pref-contrast=more]:not([pref-mode])),:host([pref-contrast=more][pref-mode=system]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input{color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host([pref-contrast=system][pref-mode=dark]),:host([pref-mode=dark]:not([pref-contrast])){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}}@media (prefers-contrast:more) and (prefers-color-scheme:dark){:host(:not([pref-contrast]):not([pref-mode])),:host([pref-contrast=system]:not([pref-mode])),:host([pref-contrast=system][pref-mode=system]),:host([pref-mode=system]:not([pref-contrast])){--mds-input-select-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6))}}'}},[321,"mds-input-select",{accessibleName:[1,"aria-label"],autocomplete:[513],autoFocus:[516,"auto-focus"],placeholder:[513],name:[513],disabled:[516],required:[516],multiple:[516],rows:[514],size:[520],value:[520],defaultValue:[520,"default-value"],variant:[513],hasFocus:[32],formDisabled:[32],setValue:[64]},void 0,{value:[{valueChanged:0}],required:[{requiredChanged:0}],name:[{nameChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}],size:[{sizeChanged:0}]}]),v=h,g=function(){"undefined"!=typeof customElements&&["mds-input-select","mds-icon","mds-input-tip","mds-input-tip-item","mds-text"].forEach((t=>{switch(t){case"mds-input-select":customElements.get(s(t))||customElements.define(s(t),h);break;case"mds-icon":customElements.get(s(t))||d();break;case"mds-input-tip":customElements.get(s(t))||u();break;case"mds-input-tip-item":customElements.get(s(t))||m();break;case"mds-text":customElements.get(s(t))||p()}}))};export{v as MdsInputSelect,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as
|
|
1
|
+
import{M as s,d as o}from"./p-CPvuXO7s.js";const p=s,r=o;export{p as MdsInputSwitch,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{M as o,d as s}from"./p-
|
|
1
|
+
import{M as o,d as s}from"./p-DkYDXDkD.js";const D=o,p=s;export{D as MdsInputTipItem,p as defineCustomElement}
|