@maggioli-design-system/magma 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +71 -0
- package/agents/anti-patterns.md +39 -0
- package/agents/assets.md +203 -0
- package/agents/color.md +193 -0
- package/agents/components.md +129 -0
- package/agents/conventions.md +188 -0
- package/agents/install.md +152 -0
- package/agents/theming.md +140 -0
- package/agents/typography.md +32 -0
- package/agents/variants.md +112 -0
- package/dist/cjs/floating-controller-uOCBLTk2.js +369 -0
- package/dist/cjs/form-Bk2OHlHM.js +46 -0
- package/dist/cjs/index-MyEb-PfD.js +198 -0
- package/dist/cjs/index-UmmmCMIG.js +5184 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/locale-CnorkBwF.js +816 -0
- package/dist/cjs/magma-components.cjs.js +2 -2
- package/dist/cjs/mds-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-accordion-timer.cjs.entry.js +1 -1
- package/dist/cjs/mds-accordion.cjs.entry.js +2 -2
- package/dist/cjs/mds-author.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar-stack-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar-stack.cjs.entry.js +1 -1
- package/dist/cjs/mds-avatar.cjs.entry.js +2 -2
- package/dist/cjs/mds-badge.cjs.entry.js +2 -2
- package/dist/cjs/mds-banner_3.cjs.entry.js +3 -3
- package/dist/cjs/mds-benchmark-bar.cjs.entry.js +1 -1
- package/dist/cjs/mds-bibliography.cjs.entry.js +1 -1
- package/dist/cjs/mds-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/mds-button-dropdown.cjs.entry.js +38 -4
- package/dist/cjs/mds-button-group.cjs.entry.js +1 -1
- package/dist/cjs/mds-button_3.cjs.entry.js +7 -6
- package/dist/cjs/mds-calendar_2.cjs.entry.js +2 -2
- package/dist/cjs/mds-card-content.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-header.cjs.entry.js +1 -1
- package/dist/cjs/mds-card-media.cjs.entry.js +1 -1
- package/dist/cjs/mds-card.cjs.entry.js +2 -2
- package/dist/cjs/mds-details.cjs.entry.js +2 -2
- package/dist/cjs/mds-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/mds-emoji.cjs.entry.js +2 -2
- package/dist/cjs/mds-entity.cjs.entry.js +2 -2
- package/dist/cjs/mds-file-preview.cjs.entry.js +3 -3
- package/dist/cjs/mds-file.cjs.entry.js +3 -3
- package/dist/cjs/mds-filter-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-filter.cjs.entry.js +2 -2
- package/dist/cjs/mds-header-bar.cjs.entry.js +2 -2
- package/dist/cjs/mds-header.cjs.entry.js +2 -2
- package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +1 -1
- package/dist/cjs/mds-hr.cjs.entry.js +2 -2
- package/dist/cjs/mds-img.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-date-range-preselection.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-date-range.cjs.entry.js +89 -9
- package/dist/cjs/mds-input-date.cjs.entry.js +124 -27
- package/dist/cjs/mds-input-field.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-otp.cjs.entry.js +65 -19
- package/dist/cjs/mds-input-range.cjs.entry.js +32 -16
- package/dist/cjs/mds-input-select.cjs.entry.js +159 -30
- package/dist/cjs/mds-input-switch_2.cjs.entry.js +63 -21
- package/dist/cjs/mds-input-tip_2.cjs.entry.js +3 -3
- package/dist/cjs/mds-input-upload.cjs.entry.js +136 -67
- package/dist/cjs/mds-input.cjs.entry.js +320 -36
- package/dist/cjs/mds-keyboard-key.cjs.entry.js +3 -3
- package/dist/cjs/mds-keyboard.cjs.entry.js +3 -3
- package/dist/cjs/mds-kpi-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-kpi.cjs.entry.js +1 -1
- package/dist/cjs/mds-label.cjs.entry.js +3 -3
- package/dist/cjs/mds-list-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-list.cjs.entry.js +1 -1
- package/dist/cjs/mds-mention.cjs.entry.js +3 -3
- package/dist/cjs/mds-modal.cjs.entry.js +2 -2
- package/dist/cjs/mds-note.cjs.entry.js +3 -3
- package/dist/cjs/mds-notification.cjs.entry.js +2 -2
- package/dist/cjs/mds-paginator-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-paginator.cjs.entry.js +2 -2
- package/dist/cjs/mds-policy-ai.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-animation.cjs.entry.js +29 -5
- package/dist/cjs/mds-pref-consumption.cjs.entry.js +29 -5
- package/dist/cjs/mds-pref-contrast.cjs.entry.js +27 -6
- package/dist/cjs/mds-pref-language-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-language.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref-mode.cjs.entry.js +30 -7
- package/dist/cjs/mds-pref-theme-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-pref-theme.cjs.entry.js +3 -3
- package/dist/cjs/mds-pref.cjs.entry.js +10 -5
- package/dist/cjs/mds-price-table-features-cell.cjs.entry.js +2 -2
- package/dist/cjs/mds-price-table-features-row.cjs.entry.js +2 -2
- package/dist/cjs/mds-price-table-features.cjs.entry.js +2 -2
- package/dist/cjs/mds-price-table-header.cjs.entry.js +1 -1
- package/dist/cjs/mds-price-table-list-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-price-table-list.cjs.entry.js +2 -2
- package/dist/cjs/mds-price-table.cjs.entry.js +1 -1
- package/dist/cjs/mds-progress_2.cjs.entry.js +2 -2
- package/dist/cjs/mds-push-notification-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-push-notification.cjs.entry.js +2 -2
- package/dist/cjs/mds-quote.cjs.entry.js +2 -2
- package/dist/cjs/mds-radial-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/mds-radial-menu.cjs.entry.js +2 -2
- package/dist/cjs/mds-separator.cjs.entry.js +2 -2
- package/dist/cjs/mds-status-bar.cjs.entry.js +2 -2
- package/dist/cjs/mds-stepper-bar-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-stepper-bar.cjs.entry.js +1 -1
- package/dist/cjs/mds-tab-bar-item.cjs.entry.js +2 -2
- package/dist/cjs/mds-tab-bar.cjs.entry.js +2 -2
- package/dist/cjs/mds-tab_2.cjs.entry.js +2 -2
- package/dist/cjs/mds-table-body.cjs.entry.js +2 -2
- package/dist/cjs/mds-table-footer.cjs.entry.js +2 -2
- package/dist/cjs/mds-table-header-cell.cjs.entry.js +2 -2
- package/dist/cjs/mds-table-header.cjs.entry.js +3 -3
- package/dist/cjs/mds-table-row.cjs.entry.js +3 -3
- package/dist/cjs/mds-table.cjs.entry.js +3 -3
- package/dist/cjs/mds-text.cjs.entry.js +2 -2
- package/dist/cjs/mds-toast.cjs.entry.js +2 -2
- package/dist/cjs/mds-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/mds-tree-item.cjs.entry.js +3 -3
- package/dist/cjs/mds-tree.cjs.entry.js +1 -1
- package/dist/cjs/mds-url-view.cjs.entry.js +3 -3
- package/dist/cjs/mds-usage.cjs.entry.js +3 -3
- package/dist/cjs/mds-video-wall.cjs.entry.js +1 -1
- package/dist/cjs/mds-zero.cjs.entry.js +2 -2
- package/dist/cjs/preference-DRkzNp5a.js +389 -0
- package/dist/collection/common/form.js +24 -1
- package/dist/collection/common/validity/index.js +42 -0
- package/dist/collection/components/mds-accordion/AGENTS.md +65 -0
- package/dist/collection/components/mds-accordion/antipattern.md +123 -0
- package/dist/collection/components/mds-accordion/documentation.json +172 -0
- package/dist/collection/components/mds-accordion/pattern.md +150 -0
- package/dist/collection/components/mds-accordion-item/AGENTS.md +76 -0
- package/dist/collection/components/mds-accordion-item/antipattern.md +137 -0
- package/dist/collection/components/mds-accordion-item/documentation.json +288 -0
- package/dist/collection/components/mds-accordion-item/pattern.md +156 -0
- package/dist/collection/components/mds-accordion-timer/AGENTS.md +65 -0
- package/dist/collection/components/mds-accordion-timer/antipattern.md +133 -0
- package/dist/collection/components/mds-accordion-timer/documentation.json +168 -0
- package/dist/collection/components/mds-accordion-timer/pattern.md +137 -0
- package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +82 -0
- package/dist/collection/components/mds-accordion-timer-item/antipattern.md +143 -0
- package/dist/collection/components/mds-accordion-timer-item/documentation.json +400 -0
- package/dist/collection/components/mds-accordion-timer-item/pattern.md +136 -0
- package/dist/collection/components/mds-author/AGENTS.md +40 -0
- package/dist/collection/components/mds-author/antipattern.md +106 -0
- package/dist/collection/components/mds-author/documentation.json +51 -0
- package/dist/collection/components/mds-author/pattern.md +101 -0
- package/dist/collection/components/mds-avatar/AGENTS.md +70 -0
- package/dist/collection/components/mds-avatar/antipattern.md +96 -0
- package/dist/collection/components/mds-avatar/documentation.json +362 -0
- package/dist/collection/components/mds-avatar/pattern.md +108 -0
- package/dist/collection/components/mds-avatar-stack/AGENTS.md +65 -0
- package/dist/collection/components/mds-avatar-stack/antipattern.md +122 -0
- package/dist/collection/components/mds-avatar-stack/documentation.json +196 -0
- package/dist/collection/components/mds-avatar-stack/pattern.md +125 -0
- package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +60 -0
- package/dist/collection/components/mds-avatar-stack-item/antipattern.md +113 -0
- package/dist/collection/components/mds-avatar-stack-item/documentation.json +315 -0
- package/dist/collection/components/mds-avatar-stack-item/pattern.md +105 -0
- package/dist/collection/components/mds-badge/AGENTS.md +63 -0
- package/dist/collection/components/mds-badge/antipattern.md +104 -0
- package/dist/collection/components/mds-badge/documentation.json +316 -0
- package/dist/collection/components/mds-badge/pattern.md +130 -0
- package/dist/collection/components/mds-banner/AGENTS.md +87 -0
- package/dist/collection/components/mds-banner/antipattern.md +141 -0
- package/dist/collection/components/mds-banner/documentation.json +378 -0
- package/dist/collection/components/mds-banner/pattern.md +176 -0
- package/dist/collection/components/mds-benchmark-bar/AGENTS.md +59 -0
- package/dist/collection/components/mds-benchmark-bar/antipattern.md +77 -0
- package/dist/collection/components/mds-benchmark-bar/documentation.json +313 -0
- package/dist/collection/components/mds-benchmark-bar/pattern.md +102 -0
- package/dist/collection/components/mds-bibliography/AGENTS.md +61 -0
- package/dist/collection/components/mds-bibliography/antipattern.md +130 -0
- package/dist/collection/components/mds-bibliography/documentation.json +407 -0
- package/dist/collection/components/mds-bibliography/pattern.md +142 -0
- package/dist/collection/components/mds-breadcrumb/AGENTS.md +68 -0
- package/dist/collection/components/mds-breadcrumb/antipattern.md +112 -0
- package/dist/collection/components/mds-breadcrumb/documentation.json +156 -0
- package/dist/collection/components/mds-breadcrumb/pattern.md +103 -0
- package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +67 -0
- package/dist/collection/components/mds-breadcrumb-item/antipattern.md +109 -0
- package/dist/collection/components/mds-breadcrumb-item/documentation.json +160 -0
- package/dist/collection/components/mds-breadcrumb-item/pattern.md +85 -0
- package/dist/collection/components/mds-button/AGENTS.md +102 -0
- package/dist/collection/components/mds-button/antipattern.md +126 -0
- package/dist/collection/components/mds-button/documentation.json +922 -0
- package/dist/collection/components/mds-button/mds-button.css +4 -1
- package/dist/collection/components/mds-button/mds-button.js +42 -3
- package/dist/collection/components/mds-button/pattern.md +172 -0
- package/dist/collection/components/mds-button-dropdown/AGENTS.md +88 -0
- package/dist/collection/components/mds-button-dropdown/antipattern.md +158 -0
- package/dist/collection/components/mds-button-dropdown/documentation.json +614 -0
- package/dist/collection/components/mds-button-dropdown/mds-button-dropdown.js +94 -6
- package/dist/collection/components/mds-button-dropdown/pattern.md +164 -0
- package/dist/collection/components/mds-button-group/AGENTS.md +33 -0
- package/dist/collection/components/mds-button-group/antipattern.md +105 -0
- package/dist/collection/components/mds-button-group/documentation.json +43 -0
- package/dist/collection/components/mds-button-group/pattern.md +89 -0
- package/dist/collection/components/mds-calendar/AGENTS.md +96 -0
- package/dist/collection/components/mds-calendar/antipattern.md +113 -0
- package/dist/collection/components/mds-calendar/documentation.json +626 -0
- package/dist/collection/components/mds-calendar/pattern.md +128 -0
- package/dist/collection/components/mds-calendar-cell/AGENTS.md +94 -0
- package/dist/collection/components/mds-calendar-cell/antipattern.md +58 -0
- package/dist/collection/components/mds-calendar-cell/documentation.json +539 -0
- package/dist/collection/components/mds-calendar-cell/pattern.md +82 -0
- package/dist/collection/components/mds-card/AGENTS.md +60 -0
- package/dist/collection/components/mds-card/antipattern.md +133 -0
- package/dist/collection/components/mds-card/documentation.json +117 -0
- package/dist/collection/components/mds-card/pattern.md +160 -0
- package/dist/collection/components/mds-card-content/AGENTS.md +34 -0
- package/dist/collection/components/mds-card-content/antipattern.md +110 -0
- package/dist/collection/components/mds-card-content/documentation.json +43 -0
- package/dist/collection/components/mds-card-content/pattern.md +91 -0
- package/dist/collection/components/mds-card-footer/AGENTS.md +34 -0
- package/dist/collection/components/mds-card-footer/antipattern.md +112 -0
- package/dist/collection/components/mds-card-footer/documentation.json +43 -0
- package/dist/collection/components/mds-card-footer/pattern.md +95 -0
- package/dist/collection/components/mds-card-header/AGENTS.md +38 -0
- package/dist/collection/components/mds-card-header/antipattern.md +114 -0
- package/dist/collection/components/mds-card-header/documentation.json +51 -0
- package/dist/collection/components/mds-card-header/pattern.md +143 -0
- package/dist/collection/components/mds-card-media/AGENTS.md +46 -0
- package/dist/collection/components/mds-card-media/antipattern.md +128 -0
- package/dist/collection/components/mds-card-media/documentation.json +56 -0
- package/dist/collection/components/mds-card-media/pattern.md +93 -0
- package/dist/collection/components/mds-chip/AGENTS.md +84 -0
- package/dist/collection/components/mds-chip/antipattern.md +119 -0
- package/dist/collection/components/mds-chip/documentation.json +535 -0
- package/dist/collection/components/mds-chip/pattern.md +166 -0
- package/dist/collection/components/mds-details/AGENTS.md +72 -0
- package/dist/collection/components/mds-details/antipattern.md +128 -0
- package/dist/collection/components/mds-details/documentation.json +153 -0
- package/dist/collection/components/mds-details/pattern.md +138 -0
- package/dist/collection/components/mds-dropdown/AGENTS.md +95 -0
- package/dist/collection/components/mds-dropdown/antipattern.md +137 -0
- package/dist/collection/components/mds-dropdown/documentation.json +701 -0
- package/dist/collection/components/mds-dropdown/pattern.md +201 -0
- package/dist/collection/components/mds-emoji/AGENTS.md +88 -0
- package/dist/collection/components/mds-emoji/antipattern.md +134 -0
- package/dist/collection/components/mds-emoji/documentation.json +506 -0
- package/dist/collection/components/mds-emoji/pattern.md +219 -0
- package/dist/collection/components/mds-entity/AGENTS.md +76 -0
- package/dist/collection/components/mds-entity/antipattern.md +112 -0
- package/dist/collection/components/mds-entity/documentation.json +365 -0
- package/dist/collection/components/mds-entity/pattern.md +125 -0
- package/dist/collection/components/mds-file/AGENTS.md +63 -0
- package/dist/collection/components/mds-file/antipattern.md +92 -0
- package/dist/collection/components/mds-file/documentation.json +484 -0
- package/dist/collection/components/mds-file/pattern.md +109 -0
- package/dist/collection/components/mds-file-preview/AGENTS.md +88 -0
- package/dist/collection/components/mds-file-preview/antipattern.md +129 -0
- package/dist/collection/components/mds-file-preview/documentation.json +780 -0
- package/dist/collection/components/mds-file-preview/pattern.md +164 -0
- package/dist/collection/components/mds-filter/AGENTS.md +72 -0
- package/dist/collection/components/mds-filter/antipattern.md +140 -0
- package/dist/collection/components/mds-filter/documentation.json +239 -0
- package/dist/collection/components/mds-filter/pattern.md +129 -0
- package/dist/collection/components/mds-filter-item/AGENTS.md +64 -0
- package/dist/collection/components/mds-filter-item/antipattern.md +127 -0
- package/dist/collection/components/mds-filter-item/documentation.json +240 -0
- package/dist/collection/components/mds-filter-item/pattern.md +125 -0
- package/dist/collection/components/mds-header/AGENTS.md +95 -0
- package/dist/collection/components/mds-header/antipattern.md +120 -0
- package/dist/collection/components/mds-header/documentation.json +491 -0
- package/dist/collection/components/mds-header/pattern.md +182 -0
- package/dist/collection/components/mds-header-bar/AGENTS.md +80 -0
- package/dist/collection/components/mds-header-bar/antipattern.md +119 -0
- package/dist/collection/components/mds-header-bar/documentation.json +251 -0
- package/dist/collection/components/mds-header-bar/pattern.md +134 -0
- package/dist/collection/components/mds-help/AGENTS.md +65 -0
- package/dist/collection/components/mds-help/antipattern.md +73 -0
- package/dist/collection/components/mds-help/documentation.json +228 -0
- package/dist/collection/components/mds-help/pattern.md +106 -0
- package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +72 -0
- package/dist/collection/components/mds-horizontal-scroll/antipattern.md +120 -0
- package/dist/collection/components/mds-horizontal-scroll/documentation.json +279 -0
- package/dist/collection/components/mds-horizontal-scroll/pattern.md +154 -0
- package/dist/collection/components/mds-hr/AGENTS.md +27 -0
- package/dist/collection/components/mds-hr/antipattern.md +84 -0
- package/dist/collection/components/mds-hr/documentation.json +33 -0
- package/dist/collection/components/mds-hr/pattern.md +88 -0
- package/dist/collection/components/mds-icon/AGENTS.md +52 -0
- package/dist/collection/components/mds-icon/antipattern.md +118 -0
- package/dist/collection/components/mds-icon/documentation.json +205 -0
- package/dist/collection/components/mds-icon/pattern.md +135 -0
- package/dist/collection/components/mds-img/AGENTS.md +78 -0
- package/dist/collection/components/mds-img/antipattern.md +106 -0
- package/dist/collection/components/mds-img/documentation.json +470 -0
- package/dist/collection/components/mds-img/pattern.md +128 -0
- package/dist/collection/components/mds-input/AGENTS.md +138 -0
- package/dist/collection/components/mds-input/antipattern.md +128 -0
- package/dist/collection/components/mds-input/documentation.json +1574 -0
- package/dist/collection/components/mds-input/mds-input.js +185 -30
- package/dist/collection/components/mds-input/meta/input-type/InputValidationManager.js +8 -1
- package/dist/collection/components/mds-input/meta/validators.js +100 -2
- package/dist/collection/components/mds-input/meta/validity.js +35 -0
- package/dist/collection/components/mds-input/pattern.md +252 -0
- package/dist/collection/components/mds-input-date/AGENTS.md +98 -0
- package/dist/collection/components/mds-input-date/antipattern.md +107 -0
- package/dist/collection/components/mds-input-date/documentation.json +638 -0
- package/dist/collection/components/mds-input-date/mds-input-date.js +130 -24
- package/dist/collection/components/mds-input-date/pattern.md +158 -0
- package/dist/collection/components/mds-input-date-range/AGENTS.md +90 -0
- package/dist/collection/components/mds-input-date-range/antipattern.md +168 -0
- package/dist/collection/components/mds-input-date-range/documentation.json +502 -0
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.css +13 -0
- package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +106 -5
- package/dist/collection/components/mds-input-date-range/pattern.md +122 -0
- package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +62 -0
- package/dist/collection/components/mds-input-date-range-preselection/antipattern.md +147 -0
- package/dist/collection/components/mds-input-date-range-preselection/documentation.json +176 -0
- package/dist/collection/components/mds-input-date-range-preselection/pattern.md +101 -0
- package/dist/collection/components/mds-input-field/AGENTS.md +60 -0
- package/dist/collection/components/mds-input-field/antipattern.md +115 -0
- package/dist/collection/components/mds-input-field/documentation.json +178 -0
- package/dist/collection/components/mds-input-field/pattern.md +95 -0
- package/dist/collection/components/mds-input-otp/AGENTS.md +48 -0
- package/dist/collection/components/mds-input-otp/antipattern.md +105 -0
- package/dist/collection/components/mds-input-otp/documentation.json +203 -0
- package/dist/collection/components/mds-input-otp/mds-input-otp.css +4 -1
- package/dist/collection/components/mds-input-otp/mds-input-otp.js +88 -15
- package/dist/collection/components/mds-input-otp/pattern.md +107 -0
- package/dist/collection/components/mds-input-range/AGENTS.md +84 -0
- package/dist/collection/components/mds-input-range/antipattern.md +127 -0
- package/dist/collection/components/mds-input-range/documentation.json +315 -0
- package/dist/collection/components/mds-input-range/mds-input-range.css +6 -2
- package/dist/collection/components/mds-input-range/mds-input-range.js +30 -13
- package/dist/collection/components/mds-input-range/pattern.md +110 -0
- package/dist/collection/components/mds-input-select/AGENTS.md +99 -0
- package/dist/collection/components/mds-input-select/antipattern.md +126 -0
- package/dist/collection/components/mds-input-select/documentation.json +552 -0
- package/dist/collection/components/mds-input-select/mds-input-select.js +164 -35
- package/dist/collection/components/mds-input-select/meta/event-detail.js +1 -0
- package/dist/collection/components/mds-input-select/pattern.md +168 -0
- package/dist/collection/components/mds-input-switch/AGENTS.md +106 -0
- package/dist/collection/components/mds-input-switch/antipattern.md +117 -0
- package/dist/collection/components/mds-input-switch/documentation.json +638 -0
- package/dist/collection/components/mds-input-switch/mds-input-switch.css +4 -1
- package/dist/collection/components/mds-input-switch/mds-input-switch.js +59 -16
- package/dist/collection/components/mds-input-switch/pattern.md +133 -0
- package/dist/collection/components/mds-input-tip/AGENTS.md +56 -0
- package/dist/collection/components/mds-input-tip/antipattern.md +108 -0
- package/dist/collection/components/mds-input-tip/documentation.json +160 -0
- package/dist/collection/components/mds-input-tip/pattern.md +125 -0
- package/dist/collection/components/mds-input-tip-item/AGENTS.md +58 -0
- package/dist/collection/components/mds-input-tip-item/antipattern.md +98 -0
- package/dist/collection/components/mds-input-tip-item/documentation.json +181 -0
- package/dist/collection/components/mds-input-tip-item/pattern.md +107 -0
- package/dist/collection/components/mds-input-upload/AGENTS.md +78 -0
- package/dist/collection/components/mds-input-upload/antipattern.md +144 -0
- package/dist/collection/components/mds-input-upload/documentation.json +425 -0
- package/dist/collection/components/mds-input-upload/mds-input-upload.css +15 -0
- package/dist/collection/components/mds-input-upload/mds-input-upload.js +176 -66
- package/dist/collection/components/mds-input-upload/pattern.md +165 -0
- package/dist/collection/components/mds-keyboard/AGENTS.md +76 -0
- package/dist/collection/components/mds-keyboard/antipattern.md +111 -0
- package/dist/collection/components/mds-keyboard/documentation.json +227 -0
- package/dist/collection/components/mds-keyboard/pattern.md +129 -0
- package/dist/collection/components/mds-keyboard-key/AGENTS.md +55 -0
- package/dist/collection/components/mds-keyboard-key/antipattern.md +117 -0
- package/dist/collection/components/mds-keyboard-key/documentation.json +450 -0
- package/dist/collection/components/mds-keyboard-key/pattern.md +98 -0
- package/dist/collection/components/mds-kpi/AGENTS.md +44 -0
- package/dist/collection/components/mds-kpi/antipattern.md +93 -0
- package/dist/collection/components/mds-kpi/documentation.json +54 -0
- package/dist/collection/components/mds-kpi/pattern.md +109 -0
- package/dist/collection/components/mds-kpi-item/AGENTS.md +62 -0
- package/dist/collection/components/mds-kpi-item/antipattern.md +119 -0
- package/dist/collection/components/mds-kpi-item/documentation.json +199 -0
- package/dist/collection/components/mds-kpi-item/pattern.md +115 -0
- package/dist/collection/components/mds-label/AGENTS.md +71 -0
- package/dist/collection/components/mds-label/antipattern.md +92 -0
- package/dist/collection/components/mds-label/documentation.json +388 -0
- package/dist/collection/components/mds-label/pattern.md +111 -0
- package/dist/collection/components/mds-list/AGENTS.md +33 -0
- package/dist/collection/components/mds-list/antipattern.md +117 -0
- package/dist/collection/components/mds-list/documentation.json +43 -0
- package/dist/collection/components/mds-list/pattern.md +104 -0
- package/dist/collection/components/mds-list-item/AGENTS.md +60 -0
- package/dist/collection/components/mds-list-item/antipattern.md +118 -0
- package/dist/collection/components/mds-list-item/documentation.json +200 -0
- package/dist/collection/components/mds-list-item/pattern.md +101 -0
- package/dist/collection/components/mds-mention/AGENTS.md +55 -0
- package/dist/collection/components/mds-mention/antipattern.md +86 -0
- package/dist/collection/components/mds-mention/documentation.json +203 -0
- package/dist/collection/components/mds-mention/pattern.md +91 -0
- package/dist/collection/components/mds-modal/AGENTS.md +107 -0
- package/dist/collection/components/mds-modal/antipattern.md +96 -0
- package/dist/collection/components/mds-modal/documentation.json +552 -0
- package/dist/collection/components/mds-modal/pattern.md +228 -0
- package/dist/collection/components/mds-note/AGENTS.md +68 -0
- package/dist/collection/components/mds-note/antipattern.md +99 -0
- package/dist/collection/components/mds-note/documentation.json +220 -0
- package/dist/collection/components/mds-note/pattern.md +108 -0
- package/dist/collection/components/mds-notification/AGENTS.md +67 -0
- package/dist/collection/components/mds-notification/antipattern.md +86 -0
- package/dist/collection/components/mds-notification/documentation.json +253 -0
- package/dist/collection/components/mds-notification/pattern.md +98 -0
- package/dist/collection/components/mds-paginator/AGENTS.md +57 -0
- package/dist/collection/components/mds-paginator/antipattern.md +95 -0
- package/dist/collection/components/mds-paginator/documentation.json +135 -0
- package/dist/collection/components/mds-paginator/pattern.md +92 -0
- package/dist/collection/components/mds-paginator-item/AGENTS.md +74 -0
- package/dist/collection/components/mds-paginator-item/antipattern.md +95 -0
- package/dist/collection/components/mds-paginator-item/documentation.json +206 -0
- package/dist/collection/components/mds-paginator-item/pattern.md +75 -0
- package/dist/collection/components/mds-policy-ai/AGENTS.md +58 -0
- package/dist/collection/components/mds-policy-ai/antipattern.md +97 -0
- package/dist/collection/components/mds-policy-ai/documentation.json +244 -0
- package/dist/collection/components/mds-policy-ai/pattern.md +102 -0
- package/dist/collection/components/mds-pref/AGENTS.md +50 -0
- package/dist/collection/components/mds-pref/antipattern.md +85 -0
- package/dist/collection/components/mds-pref/documentation.json +138 -0
- package/dist/collection/components/mds-pref/mds-pref.js +7 -2
- package/dist/collection/components/mds-pref/pattern.md +93 -0
- package/dist/collection/components/mds-pref-animation/AGENTS.md +48 -0
- package/dist/collection/components/mds-pref-animation/antipattern.md +67 -0
- package/dist/collection/components/mds-pref-animation/documentation.json +154 -0
- package/dist/collection/components/mds-pref-animation/mds-pref-animation.js +26 -2
- package/dist/collection/components/mds-pref-animation/pattern.md +86 -0
- package/dist/collection/components/mds-pref-consumption/AGENTS.md +47 -0
- package/dist/collection/components/mds-pref-consumption/antipattern.md +84 -0
- package/dist/collection/components/mds-pref-consumption/documentation.json +154 -0
- package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.js +26 -2
- package/dist/collection/components/mds-pref-consumption/pattern.md +70 -0
- package/dist/collection/components/mds-pref-contrast/AGENTS.md +50 -0
- package/dist/collection/components/mds-pref-contrast/antipattern.md +71 -0
- package/dist/collection/components/mds-pref-contrast/documentation.json +154 -0
- package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.js +24 -3
- package/dist/collection/components/mds-pref-contrast/pattern.md +82 -0
- package/dist/collection/components/mds-pref-language/AGENTS.md +56 -0
- package/dist/collection/components/mds-pref-language/antipattern.md +130 -0
- package/dist/collection/components/mds-pref-language/documentation.json +174 -0
- package/dist/collection/components/mds-pref-language/pattern.md +104 -0
- package/dist/collection/components/mds-pref-language-item/AGENTS.md +48 -0
- package/dist/collection/components/mds-pref-language-item/antipattern.md +99 -0
- package/dist/collection/components/mds-pref-language-item/documentation.json +122 -0
- package/dist/collection/components/mds-pref-language-item/pattern.md +85 -0
- package/dist/collection/components/mds-pref-mode/AGENTS.md +53 -0
- package/dist/collection/components/mds-pref-mode/antipattern.md +104 -0
- package/dist/collection/components/mds-pref-mode/documentation.json +241 -0
- package/dist/collection/components/mds-pref-mode/mds-pref-mode.js +27 -4
- package/dist/collection/components/mds-pref-mode/pattern.md +94 -0
- package/dist/collection/components/mds-pref-theme/AGENTS.md +60 -0
- package/dist/collection/components/mds-pref-theme/antipattern.md +104 -0
- package/dist/collection/components/mds-pref-theme/documentation.json +277 -0
- package/dist/collection/components/mds-pref-theme/pattern.md +97 -0
- package/dist/collection/components/mds-pref-theme-item/AGENTS.md +60 -0
- package/dist/collection/components/mds-pref-theme-item/antipattern.md +98 -0
- package/dist/collection/components/mds-pref-theme-item/documentation.json +228 -0
- package/dist/collection/components/mds-pref-theme-item/pattern.md +98 -0
- package/dist/collection/components/mds-price-table/AGENTS.md +34 -0
- package/dist/collection/components/mds-price-table/antipattern.md +131 -0
- package/dist/collection/components/mds-price-table/documentation.json +43 -0
- package/dist/collection/components/mds-price-table/pattern.md +182 -0
- package/dist/collection/components/mds-price-table-features/AGENTS.md +61 -0
- package/dist/collection/components/mds-price-table-features/antipattern.md +152 -0
- package/dist/collection/components/mds-price-table-features/documentation.json +96 -0
- package/dist/collection/components/mds-price-table-features/pattern.md +157 -0
- package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +69 -0
- package/dist/collection/components/mds-price-table-features-cell/antipattern.md +105 -0
- package/dist/collection/components/mds-price-table-features-cell/documentation.json +154 -0
- package/dist/collection/components/mds-price-table-features-cell/pattern.md +128 -0
- package/dist/collection/components/mds-price-table-features-row/AGENTS.md +43 -0
- package/dist/collection/components/mds-price-table-features-row/antipattern.md +135 -0
- package/dist/collection/components/mds-price-table-features-row/documentation.json +64 -0
- package/dist/collection/components/mds-price-table-features-row/pattern.md +125 -0
- package/dist/collection/components/mds-price-table-header/AGENTS.md +34 -0
- package/dist/collection/components/mds-price-table-header/antipattern.md +133 -0
- package/dist/collection/components/mds-price-table-header/documentation.json +43 -0
- package/dist/collection/components/mds-price-table-header/pattern.md +176 -0
- package/dist/collection/components/mds-price-table-list/AGENTS.md +63 -0
- package/dist/collection/components/mds-price-table-list/antipattern.md +133 -0
- package/dist/collection/components/mds-price-table-list/documentation.json +104 -0
- package/dist/collection/components/mds-price-table-list/pattern.md +134 -0
- package/dist/collection/components/mds-price-table-list-item/AGENTS.md +61 -0
- package/dist/collection/components/mds-price-table-list-item/antipattern.md +90 -0
- package/dist/collection/components/mds-price-table-list-item/documentation.json +145 -0
- package/dist/collection/components/mds-price-table-list-item/pattern.md +105 -0
- package/dist/collection/components/mds-progress/AGENTS.md +68 -0
- package/dist/collection/components/mds-progress/antipattern.md +94 -0
- package/dist/collection/components/mds-progress/documentation.json +375 -0
- package/dist/collection/components/mds-progress/pattern.md +139 -0
- package/dist/collection/components/mds-push-notification/AGENTS.md +88 -0
- package/dist/collection/components/mds-push-notification/antipattern.md +154 -0
- package/dist/collection/components/mds-push-notification/documentation.json +306 -0
- package/dist/collection/components/mds-push-notification/pattern.md +203 -0
- package/dist/collection/components/mds-push-notification-item/AGENTS.md +91 -0
- package/dist/collection/components/mds-push-notification-item/antipattern.md +129 -0
- package/dist/collection/components/mds-push-notification-item/documentation.json +586 -0
- package/dist/collection/components/mds-push-notification-item/pattern.md +201 -0
- package/dist/collection/components/mds-quote/AGENTS.md +51 -0
- package/dist/collection/components/mds-quote/antipattern.md +122 -0
- package/dist/collection/components/mds-quote/documentation.json +176 -0
- package/dist/collection/components/mds-quote/pattern.md +108 -0
- package/dist/collection/components/mds-radial-menu/AGENTS.md +87 -0
- package/dist/collection/components/mds-radial-menu/antipattern.md +104 -0
- package/dist/collection/components/mds-radial-menu/documentation.json +581 -0
- package/dist/collection/components/mds-radial-menu/pattern.md +150 -0
- package/dist/collection/components/mds-radial-menu-item/AGENTS.md +51 -0
- package/dist/collection/components/mds-radial-menu-item/antipattern.md +106 -0
- package/dist/collection/components/mds-radial-menu-item/documentation.json +294 -0
- package/dist/collection/components/mds-radial-menu-item/pattern.md +98 -0
- package/dist/collection/components/mds-radial-progress/AGENTS.md +58 -0
- package/dist/collection/components/mds-radial-progress/antipattern.md +99 -0
- package/dist/collection/components/mds-radial-progress/documentation.json +232 -0
- package/dist/collection/components/mds-radial-progress/pattern.md +132 -0
- package/dist/collection/components/mds-separator/AGENTS.md +39 -0
- package/dist/collection/components/mds-separator/antipattern.md +98 -0
- package/dist/collection/components/mds-separator/documentation.json +45 -0
- package/dist/collection/components/mds-separator/pattern.md +82 -0
- package/dist/collection/components/mds-spinner/AGENTS.md +49 -0
- package/dist/collection/components/mds-spinner/antipattern.md +93 -0
- package/dist/collection/components/mds-spinner/documentation.json +86 -0
- package/dist/collection/components/mds-spinner/pattern.md +102 -0
- package/dist/collection/components/mds-status-bar/AGENTS.md +75 -0
- package/dist/collection/components/mds-status-bar/antipattern.md +128 -0
- package/dist/collection/components/mds-status-bar/documentation.json +262 -0
- package/dist/collection/components/mds-status-bar/pattern.md +123 -0
- package/dist/collection/components/mds-stepper-bar/AGENTS.md +74 -0
- package/dist/collection/components/mds-stepper-bar/antipattern.md +123 -0
- package/dist/collection/components/mds-stepper-bar/documentation.json +208 -0
- package/dist/collection/components/mds-stepper-bar/pattern.md +182 -0
- package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +84 -0
- package/dist/collection/components/mds-stepper-bar-item/antipattern.md +115 -0
- package/dist/collection/components/mds-stepper-bar-item/documentation.json +453 -0
- package/dist/collection/components/mds-stepper-bar-item/pattern.md +203 -0
- package/dist/collection/components/mds-tab/AGENTS.md +109 -0
- package/dist/collection/components/mds-tab/antipattern.md +164 -0
- package/dist/collection/components/mds-tab/documentation.json +495 -0
- package/dist/collection/components/mds-tab/pattern.md +201 -0
- package/dist/collection/components/mds-tab-bar/AGENTS.md +46 -0
- package/dist/collection/components/mds-tab-bar/antipattern.md +105 -0
- package/dist/collection/components/mds-tab-bar/documentation.json +71 -0
- package/dist/collection/components/mds-tab-bar/pattern.md +87 -0
- package/dist/collection/components/mds-tab-bar-item/AGENTS.md +67 -0
- package/dist/collection/components/mds-tab-bar-item/antipattern.md +116 -0
- package/dist/collection/components/mds-tab-bar-item/documentation.json +210 -0
- package/dist/collection/components/mds-tab-bar-item/pattern.md +110 -0
- package/dist/collection/components/mds-tab-item/AGENTS.md +82 -0
- package/dist/collection/components/mds-tab-item/antipattern.md +138 -0
- package/dist/collection/components/mds-tab-item/documentation.json +577 -0
- package/dist/collection/components/mds-tab-item/pattern.md +155 -0
- package/dist/collection/components/mds-table/AGENTS.md +90 -0
- package/dist/collection/components/mds-table/antipattern.md +169 -0
- package/dist/collection/components/mds-table/documentation.json +304 -0
- package/dist/collection/components/mds-table/pattern.md +288 -0
- package/dist/collection/components/mds-table-body/AGENTS.md +55 -0
- package/dist/collection/components/mds-table-body/antipattern.md +118 -0
- package/dist/collection/components/mds-table-body/documentation.json +122 -0
- package/dist/collection/components/mds-table-body/pattern.md +154 -0
- package/dist/collection/components/mds-table-cell/AGENTS.md +56 -0
- package/dist/collection/components/mds-table-cell/antipattern.md +100 -0
- package/dist/collection/components/mds-table-cell/documentation.json +104 -0
- package/dist/collection/components/mds-table-cell/pattern.md +168 -0
- package/dist/collection/components/mds-table-footer/AGENTS.md +33 -0
- package/dist/collection/components/mds-table-footer/antipattern.md +114 -0
- package/dist/collection/components/mds-table-footer/documentation.json +43 -0
- package/dist/collection/components/mds-table-footer/pattern.md +116 -0
- package/dist/collection/components/mds-table-header/AGENTS.md +61 -0
- package/dist/collection/components/mds-table-header/antipattern.md +157 -0
- package/dist/collection/components/mds-table-header/documentation.json +156 -0
- package/dist/collection/components/mds-table-header/pattern.md +158 -0
- package/dist/collection/components/mds-table-header-cell/AGENTS.md +51 -0
- package/dist/collection/components/mds-table-header-cell/antipattern.md +108 -0
- package/dist/collection/components/mds-table-header-cell/documentation.json +158 -0
- package/dist/collection/components/mds-table-header-cell/pattern.md +145 -0
- package/dist/collection/components/mds-table-row/AGENTS.md +68 -0
- package/dist/collection/components/mds-table-row/antipattern.md +142 -0
- package/dist/collection/components/mds-table-row/documentation.json +252 -0
- package/dist/collection/components/mds-table-row/pattern.md +157 -0
- package/dist/collection/components/mds-text/AGENTS.md +64 -0
- package/dist/collection/components/mds-text/antipattern.md +113 -0
- package/dist/collection/components/mds-text/documentation.json +746 -0
- package/dist/collection/components/mds-text/pattern.md +139 -0
- package/dist/collection/components/mds-toast/AGENTS.md +78 -0
- package/dist/collection/components/mds-toast/antipattern.md +131 -0
- package/dist/collection/components/mds-toast/documentation.json +339 -0
- package/dist/collection/components/mds-toast/pattern.md +161 -0
- package/dist/collection/components/mds-tooltip/AGENTS.md +80 -0
- package/dist/collection/components/mds-tooltip/antipattern.md +108 -0
- package/dist/collection/components/mds-tooltip/documentation.json +483 -0
- package/dist/collection/components/mds-tooltip/pattern.md +128 -0
- package/dist/collection/components/mds-tree/AGENTS.md +88 -0
- package/dist/collection/components/mds-tree/antipattern.md +153 -0
- package/dist/collection/components/mds-tree/documentation.json +472 -0
- package/dist/collection/components/mds-tree/pattern.md +198 -0
- package/dist/collection/components/mds-tree-item/AGENTS.md +119 -0
- package/dist/collection/components/mds-tree-item/antipattern.md +152 -0
- package/dist/collection/components/mds-tree-item/documentation.json +646 -0
- package/dist/collection/components/mds-tree-item/pattern.md +201 -0
- package/dist/collection/components/mds-url-view/AGENTS.md +63 -0
- package/dist/collection/components/mds-url-view/antipattern.md +107 -0
- package/dist/collection/components/mds-url-view/documentation.json +209 -0
- package/dist/collection/components/mds-url-view/pattern.md +106 -0
- package/dist/collection/components/mds-usage/AGENTS.md +70 -0
- package/dist/collection/components/mds-usage/antipattern.md +87 -0
- package/dist/collection/components/mds-usage/documentation.json +156 -0
- package/dist/collection/components/mds-usage/pattern.md +117 -0
- package/dist/collection/components/mds-video-wall/AGENTS.md +65 -0
- package/dist/collection/components/mds-video-wall/antipattern.md +97 -0
- package/dist/collection/components/mds-video-wall/documentation.json +316 -0
- package/dist/collection/components/mds-video-wall/pattern.md +101 -0
- package/dist/collection/components/mds-zero/AGENTS.md +55 -0
- package/dist/collection/components/mds-zero/antipattern.md +106 -0
- package/dist/collection/components/mds-zero/documentation.json +82 -0
- package/dist/collection/components/mds-zero/pattern.md +118 -0
- package/dist/components/index.js +1 -1
- package/dist/components/mds-accordion-item.js +1 -1
- package/dist/components/mds-accordion-timer-item.js +1 -1
- package/dist/components/mds-accordion-timer.js +1 -1
- package/dist/components/mds-accordion.js +1 -1
- package/dist/components/mds-author.js +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-badge.js +1 -1
- package/dist/components/mds-banner.js +1 -1
- package/dist/components/mds-benchmark-bar.js +1 -1
- package/dist/components/mds-bibliography.js +1 -1
- package/dist/components/mds-breadcrumb-item.js +1 -1
- package/dist/components/mds-breadcrumb.js +1 -1
- package/dist/components/mds-button-dropdown.js +1 -1
- package/dist/components/mds-button-group.js +1 -1
- package/dist/components/mds-button.js +1 -1
- package/dist/components/mds-calendar-cell.js +1 -1
- package/dist/components/mds-calendar.js +1 -1
- package/dist/components/mds-card-content.js +1 -1
- package/dist/components/mds-card-footer.js +1 -1
- package/dist/components/mds-card-header.js +1 -1
- package/dist/components/mds-card-media.js +1 -1
- package/dist/components/mds-card.js +1 -1
- package/dist/components/mds-chip.js +1 -1
- package/dist/components/mds-details.js +1 -1
- package/dist/components/mds-dropdown.js +1 -1
- package/dist/components/mds-emoji.js +3 -3
- package/dist/components/mds-entity.js +1 -1
- package/dist/components/mds-file-preview.js +1 -1
- package/dist/components/mds-file.js +3 -3
- 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-help.js +1 -1
- package/dist/components/mds-horizontal-scroll.js +1 -1
- package/dist/components/mds-hr.js +1 -1
- package/dist/components/mds-icon.js +1 -1
- package/dist/components/mds-img.js +1 -1
- package/dist/components/mds-input-date-range-preselection.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-field.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-tip.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-kpi-item.js +1 -1
- package/dist/components/mds-kpi.js +1 -1
- package/dist/components/mds-label.js +1 -1
- package/dist/components/mds-list-item.js +1 -1
- package/dist/components/mds-list.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-notification.js +1 -1
- package/dist/components/mds-paginator-item.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-item.js +1 -1
- package/dist/components/mds-pref-theme.js +1 -1
- package/dist/components/mds-pref.js +1 -1
- package/dist/components/mds-price-table-features-cell.js +1 -1
- package/dist/components/mds-price-table-features-row.js +1 -1
- package/dist/components/mds-price-table-features.js +1 -1
- package/dist/components/mds-price-table-header.js +1 -1
- package/dist/components/mds-price-table-list-item.js +1 -1
- package/dist/components/mds-price-table-list.js +1 -1
- package/dist/components/mds-price-table.js +1 -1
- package/dist/components/mds-progress.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-quote.js +1 -1
- package/dist/components/mds-radial-menu-item.js +1 -1
- package/dist/components/mds-radial-menu.js +1 -1
- package/dist/components/mds-radial-progress.js +1 -1
- package/dist/components/mds-separator.js +1 -1
- package/dist/components/mds-spinner.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-stepper-bar.js +1 -1
- package/dist/components/mds-tab-bar-item.js +1 -1
- package/dist/components/mds-tab-bar.js +1 -1
- package/dist/components/mds-tab-item.js +1 -1
- package/dist/components/mds-tab.js +1 -1
- package/dist/components/mds-table-body.js +1 -1
- package/dist/components/mds-table-cell.js +1 -1
- package/dist/components/mds-table-footer.js +1 -1
- package/dist/components/mds-table-header-cell.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-text.js +1 -1
- package/dist/components/mds-toast.js +1 -1
- package/dist/components/mds-tooltip.js +1 -1
- package/dist/components/mds-tree-item.js +1 -1
- package/dist/components/mds-tree.js +1 -1
- package/dist/components/mds-url-view.js +1 -1
- package/dist/components/mds-usage.js +1 -1
- package/dist/components/mds-video-wall.js +1 -1
- package/dist/components/mds-zero.js +1 -1
- package/dist/components/p--miH951G.js +5 -0
- package/dist/components/p-1aH7xiMs.js +1 -0
- package/dist/components/p-B05zwjTY.js +1 -0
- package/dist/components/p-BOu_NOgd.js +1 -0
- package/dist/components/p-BTpjOy0A.js +1 -0
- package/dist/components/p-BVw5aqzn.js +1 -0
- package/dist/components/p-BW24ByN-.js +1 -0
- package/dist/components/p-BWpSxp3h.js +1 -0
- package/dist/components/p-BXPIlPIF.js +1 -0
- package/dist/components/p-BzvYQBdf.js +1 -0
- package/dist/components/p-C3Sn8bRc.js +1 -0
- package/dist/components/p-CGkSDkOY.js +1 -0
- package/dist/components/p-CIcshx6K.js +1 -0
- package/dist/components/p-CKS4r32k.js +1 -0
- package/dist/components/p-COkF_8bh.js +1 -0
- package/dist/components/p-CmHMhHMt.js +1 -0
- package/dist/components/p-Cnt6G6GK.js +1 -0
- package/dist/components/p-CsL9U6eU.js +1 -0
- package/dist/components/p-Cyj1BFxx.js +1 -0
- package/dist/components/p-DQqUzCGR.js +1 -0
- package/dist/components/p-DR46G4-6.js +1 -0
- package/dist/components/p-DcW0iRnZ.js +1 -0
- package/dist/components/p-DebgFlHq.js +1 -0
- package/dist/components/p-DmPLOktp.js +1 -0
- package/dist/components/p-Dpf8NWF9.js +1 -0
- package/dist/components/p-DwA-5c8G.js +1 -0
- package/dist/components/p-Dws02cT2.js +8 -0
- package/dist/components/p-K3QNYRhf.js +1 -0
- package/dist/components/p-PQ_EO5-U.js +1 -0
- package/dist/components/p-akEzGmDD.js +1 -0
- package/dist/components/p-bDVBqkn0.js +1 -0
- package/dist/components/p-faViX-qz.js +1 -0
- package/dist/components/p-pBvN1uAc.js +3 -0
- package/dist/components/p-wI0alRSO.js +1 -0
- package/dist/components/p-x_c_51aL.js +1 -0
- package/dist/components/p-zHpei4x6.js +1 -0
- package/dist/documentation.json +618 -360
- package/dist/esm/floating-controller-BTYkH_Ih.js +366 -0
- package/dist/esm/form-wI0alRSO.js +42 -0
- package/dist/esm/index-BhCZiGfL.js +196 -0
- package/dist/esm/index-BxPbQB28.js +5149 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/locale-CVJm6KFD.js +814 -0
- package/dist/esm/magma-components.js +3 -3
- package/dist/esm/mds-accordion-item.entry.js +2 -2
- package/dist/esm/mds-accordion-timer-item.entry.js +2 -2
- package/dist/esm/mds-accordion-timer.entry.js +1 -1
- package/dist/esm/mds-accordion.entry.js +2 -2
- package/dist/esm/mds-author.entry.js +1 -1
- package/dist/esm/mds-avatar-stack-item.entry.js +1 -1
- package/dist/esm/mds-avatar-stack.entry.js +1 -1
- package/dist/esm/mds-avatar.entry.js +2 -2
- package/dist/esm/mds-badge.entry.js +2 -2
- package/dist/esm/mds-banner_3.entry.js +3 -3
- package/dist/esm/mds-benchmark-bar.entry.js +1 -1
- package/dist/esm/mds-bibliography.entry.js +1 -1
- package/dist/esm/mds-breadcrumb-item.entry.js +1 -1
- package/dist/esm/mds-breadcrumb.entry.js +3 -3
- package/dist/esm/mds-button-dropdown.entry.js +38 -4
- package/dist/esm/mds-button-group.entry.js +1 -1
- package/dist/esm/mds-button_3.entry.js +7 -6
- package/dist/esm/mds-calendar_2.entry.js +2 -2
- package/dist/esm/mds-card-content.entry.js +1 -1
- package/dist/esm/mds-card-footer.entry.js +1 -1
- package/dist/esm/mds-card-header.entry.js +1 -1
- package/dist/esm/mds-card-media.entry.js +1 -1
- package/dist/esm/mds-card.entry.js +2 -2
- package/dist/esm/mds-details.entry.js +2 -2
- package/dist/esm/mds-dropdown.entry.js +3 -3
- package/dist/esm/mds-emoji.entry.js +2 -2
- package/dist/esm/mds-entity.entry.js +2 -2
- package/dist/esm/mds-file-preview.entry.js +3 -3
- package/dist/esm/mds-file.entry.js +3 -3
- package/dist/esm/mds-filter-item.entry.js +2 -2
- package/dist/esm/mds-filter.entry.js +2 -2
- package/dist/esm/mds-header-bar.entry.js +2 -2
- package/dist/esm/mds-header.entry.js +2 -2
- package/dist/esm/mds-horizontal-scroll.entry.js +1 -1
- package/dist/esm/mds-hr.entry.js +2 -2
- package/dist/esm/mds-img.entry.js +3 -3
- package/dist/esm/mds-input-date-range-preselection.entry.js +1 -1
- package/dist/esm/mds-input-date-range.entry.js +89 -9
- package/dist/esm/mds-input-date.entry.js +124 -27
- package/dist/esm/mds-input-field.entry.js +1 -1
- package/dist/esm/mds-input-otp.entry.js +65 -19
- package/dist/esm/mds-input-range.entry.js +32 -16
- package/dist/esm/mds-input-select.entry.js +159 -30
- package/dist/esm/mds-input-switch_2.entry.js +63 -21
- package/dist/esm/mds-input-tip_2.entry.js +3 -3
- package/dist/esm/mds-input-upload.entry.js +136 -67
- package/dist/esm/mds-input.entry.js +320 -36
- package/dist/esm/mds-keyboard-key.entry.js +3 -3
- package/dist/esm/mds-keyboard.entry.js +3 -3
- package/dist/esm/mds-kpi-item.entry.js +2 -2
- package/dist/esm/mds-kpi.entry.js +1 -1
- package/dist/esm/mds-label.entry.js +3 -3
- package/dist/esm/mds-list-item.entry.js +2 -2
- package/dist/esm/mds-list.entry.js +1 -1
- package/dist/esm/mds-mention.entry.js +3 -3
- package/dist/esm/mds-modal.entry.js +2 -2
- package/dist/esm/mds-note.entry.js +3 -3
- package/dist/esm/mds-notification.entry.js +2 -2
- package/dist/esm/mds-paginator-item.entry.js +2 -2
- package/dist/esm/mds-paginator.entry.js +2 -2
- package/dist/esm/mds-policy-ai.entry.js +3 -3
- package/dist/esm/mds-pref-animation.entry.js +29 -5
- package/dist/esm/mds-pref-consumption.entry.js +29 -5
- package/dist/esm/mds-pref-contrast.entry.js +27 -6
- package/dist/esm/mds-pref-language-item.entry.js +3 -3
- package/dist/esm/mds-pref-language.entry.js +3 -3
- package/dist/esm/mds-pref-mode.entry.js +30 -7
- package/dist/esm/mds-pref-theme-item.entry.js +1 -1
- package/dist/esm/mds-pref-theme.entry.js +3 -3
- package/dist/esm/mds-pref.entry.js +10 -5
- package/dist/esm/mds-price-table-features-cell.entry.js +2 -2
- package/dist/esm/mds-price-table-features-row.entry.js +2 -2
- package/dist/esm/mds-price-table-features.entry.js +2 -2
- package/dist/esm/mds-price-table-header.entry.js +1 -1
- package/dist/esm/mds-price-table-list-item.entry.js +1 -1
- package/dist/esm/mds-price-table-list.entry.js +2 -2
- package/dist/esm/mds-price-table.entry.js +1 -1
- package/dist/esm/mds-progress_2.entry.js +2 -2
- package/dist/esm/mds-push-notification-item.entry.js +3 -3
- package/dist/esm/mds-push-notification.entry.js +2 -2
- package/dist/esm/mds-quote.entry.js +2 -2
- package/dist/esm/mds-radial-menu-item.entry.js +1 -1
- package/dist/esm/mds-radial-menu.entry.js +2 -2
- package/dist/esm/mds-separator.entry.js +2 -2
- package/dist/esm/mds-status-bar.entry.js +2 -2
- package/dist/esm/mds-stepper-bar-item.entry.js +3 -3
- package/dist/esm/mds-stepper-bar.entry.js +1 -1
- package/dist/esm/mds-tab-bar-item.entry.js +2 -2
- package/dist/esm/mds-tab-bar.entry.js +2 -2
- package/dist/esm/mds-tab_2.entry.js +2 -2
- package/dist/esm/mds-table-body.entry.js +2 -2
- package/dist/esm/mds-table-footer.entry.js +2 -2
- package/dist/esm/mds-table-header-cell.entry.js +2 -2
- package/dist/esm/mds-table-header.entry.js +3 -3
- package/dist/esm/mds-table-row.entry.js +3 -3
- package/dist/esm/mds-table.entry.js +3 -3
- package/dist/esm/mds-text.entry.js +2 -2
- package/dist/esm/mds-toast.entry.js +2 -2
- package/dist/esm/mds-tooltip.entry.js +3 -3
- package/dist/esm/mds-tree-item.entry.js +3 -3
- package/dist/esm/mds-tree.entry.js +1 -1
- package/dist/esm/mds-url-view.entry.js +3 -3
- package/dist/esm/mds-usage.entry.js +3 -3
- package/dist/esm/mds-video-wall.entry.js +1 -1
- package/dist/esm/mds-zero.entry.js +2 -2
- package/dist/esm/preference-DNNqH7BU.js +385 -0
- package/dist/esm-es5/floating-controller-BTYkH_Ih.js +66 -0
- package/dist/esm-es5/form-wI0alRSO.js +16 -0
- package/dist/esm-es5/index-BhCZiGfL.js +10 -0
- package/dist/esm-es5/index-BxPbQB28.js +371 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/locale-CVJm6KFD.js +230 -0
- package/dist/esm-es5/magma-components.js +2 -2
- package/dist/esm-es5/mds-accordion-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
- package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
- package/dist/esm-es5/mds-accordion.entry.js +1 -1
- package/dist/esm-es5/mds-author.entry.js +1 -1
- package/dist/esm-es5/mds-avatar-stack-item.entry.js +1 -1
- package/dist/esm-es5/mds-avatar-stack.entry.js +1 -1
- package/dist/esm-es5/mds-avatar.entry.js +2 -2
- package/dist/esm-es5/mds-badge.entry.js +1 -1
- package/dist/esm-es5/mds-banner_3.entry.js +1 -1
- package/dist/esm-es5/mds-benchmark-bar.entry.js +1 -1
- package/dist/esm-es5/mds-bibliography.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb-item.entry.js +1 -1
- package/dist/esm-es5/mds-breadcrumb.entry.js +2 -2
- package/dist/esm-es5/mds-button-dropdown.entry.js +10 -4
- package/dist/esm-es5/mds-button-group.entry.js +1 -1
- package/dist/esm-es5/mds-button_3.entry.js +3 -3
- package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
- package/dist/esm-es5/mds-card-content.entry.js +1 -1
- package/dist/esm-es5/mds-card-footer.entry.js +1 -1
- package/dist/esm-es5/mds-card-header.entry.js +1 -1
- package/dist/esm-es5/mds-card-media.entry.js +1 -1
- package/dist/esm-es5/mds-card.entry.js +1 -1
- package/dist/esm-es5/mds-details.entry.js +1 -1
- package/dist/esm-es5/mds-dropdown.entry.js +1 -1
- package/dist/esm-es5/mds-emoji.entry.js +1 -1
- package/dist/esm-es5/mds-entity.entry.js +1 -1
- package/dist/esm-es5/mds-file-preview.entry.js +11 -11
- package/dist/esm-es5/mds-file.entry.js +11 -11
- 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-header.entry.js +1 -1
- package/dist/esm-es5/mds-horizontal-scroll.entry.js +1 -1
- package/dist/esm-es5/mds-hr.entry.js +1 -1
- package/dist/esm-es5/mds-img.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range-preselection.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range.entry.js +33 -6
- package/dist/esm-es5/mds-input-date.entry.js +47 -7
- package/dist/esm-es5/mds-input-field.entry.js +1 -1
- package/dist/esm-es5/mds-input-otp.entry.js +21 -4
- package/dist/esm-es5/mds-input-range.entry.js +15 -7
- package/dist/esm-es5/mds-input-select.entry.js +37 -6
- package/dist/esm-es5/mds-input-switch_2.entry.js +24 -4
- package/dist/esm-es5/mds-input-tip_2.entry.js +1 -1
- package/dist/esm-es5/mds-input-upload.entry.js +42 -18
- package/dist/esm-es5/mds-input.entry.js +105 -22
- package/dist/esm-es5/mds-keyboard-key.entry.js +1 -1
- package/dist/esm-es5/mds-keyboard.entry.js +1 -1
- package/dist/esm-es5/mds-kpi-item.entry.js +1 -1
- package/dist/esm-es5/mds-kpi.entry.js +1 -1
- package/dist/esm-es5/mds-label.entry.js +1 -1
- package/dist/esm-es5/mds-list-item.entry.js +1 -1
- package/dist/esm-es5/mds-list.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-notification.entry.js +1 -1
- package/dist/esm-es5/mds-paginator-item.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 +7 -1
- package/dist/esm-es5/mds-pref-consumption.entry.js +7 -1
- package/dist/esm-es5/mds-pref-contrast.entry.js +8 -2
- 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 +10 -2
- package/dist/esm-es5/mds-pref-theme-item.entry.js +1 -1
- package/dist/esm-es5/mds-pref-theme.entry.js +1 -1
- package/dist/esm-es5/mds-pref.entry.js +6 -3
- package/dist/esm-es5/mds-price-table-features-cell.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-features-row.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-features.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-header.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-list-item.entry.js +1 -1
- package/dist/esm-es5/mds-price-table-list.entry.js +1 -1
- package/dist/esm-es5/mds-price-table.entry.js +1 -1
- package/dist/esm-es5/mds-progress_2.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-quote.entry.js +1 -1
- package/dist/esm-es5/mds-radial-menu-item.entry.js +1 -1
- package/dist/esm-es5/mds-radial-menu.entry.js +1 -1
- package/dist/esm-es5/mds-separator.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 +1 -1
- package/dist/esm-es5/mds-stepper-bar.entry.js +1 -1
- package/dist/esm-es5/mds-tab-bar-item.entry.js +1 -1
- package/dist/esm-es5/mds-tab-bar.entry.js +1 -1
- package/dist/esm-es5/mds-tab_2.entry.js +1 -1
- package/dist/esm-es5/mds-table-body.entry.js +1 -1
- package/dist/esm-es5/mds-table-footer.entry.js +1 -1
- package/dist/esm-es5/mds-table-header-cell.entry.js +1 -1
- 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-text.entry.js +1 -1
- package/dist/esm-es5/mds-toast.entry.js +1 -1
- package/dist/esm-es5/mds-tooltip.entry.js +1 -1
- package/dist/esm-es5/mds-tree-item.entry.js +1 -1
- package/dist/esm-es5/mds-tree.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/esm-es5/mds-video-wall.entry.js +1 -1
- package/dist/esm-es5/mds-zero.entry.js +1 -1
- package/dist/esm-es5/preference-DNNqH7BU.js +58 -0
- package/dist/hydrate/index.js +1431 -309
- package/dist/hydrate/index.mjs +1431 -309
- package/dist/magma-components/index.esm.js +1 -1
- package/dist/magma-components/magma-components.esm.js +1 -1
- package/dist/magma-components/magma-components.js +1 -1
- package/dist/magma-components/p-00e47e49.system.entry.js +14 -0
- package/dist/magma-components/p-0141c597.system.entry.js +15 -0
- package/dist/magma-components/p-021f96f8.entry.js +1 -0
- package/dist/magma-components/p-0255924b.system.entry.js +22 -0
- package/dist/magma-components/p-03c2060d.entry.js +1 -0
- package/dist/magma-components/p-05014374.entry.js +1 -0
- package/dist/magma-components/p-05f73994.entry.js +1 -0
- package/dist/magma-components/p-0646392d.entry.js +1 -0
- package/dist/magma-components/p-0a38e4ce.system.entry.js +1 -0
- package/dist/magma-components/p-0a551e86.entry.js +1 -0
- package/dist/magma-components/p-0a904a12.entry.js +1 -0
- package/dist/magma-components/p-0a9fb138.system.entry.js +1 -0
- package/dist/magma-components/p-106f39c6.entry.js +1 -0
- package/dist/magma-components/p-10ad73e3.system.entry.js +19 -0
- package/dist/magma-components/p-1150ffb8.system.entry.js +10 -0
- package/dist/magma-components/p-12c5ae26.entry.js +1 -0
- package/dist/magma-components/p-13a1d35f.entry.js +1 -0
- package/dist/magma-components/p-15d4846d.entry.js +1 -0
- package/dist/magma-components/p-1673225e.system.entry.js +8 -0
- package/dist/magma-components/p-188f4b1d.system.entry.js +7 -0
- package/dist/magma-components/p-18c8628c.entry.js +1 -0
- package/dist/magma-components/p-1be45c75.entry.js +1 -0
- package/dist/magma-components/p-1cb495d3.entry.js +1 -0
- package/dist/magma-components/p-1e3d89cd.system.entry.js +1 -0
- package/dist/magma-components/p-1e700f0a.entry.js +1 -0
- package/dist/magma-components/p-20e4f7dd.system.entry.js +15 -0
- package/dist/magma-components/p-21865dd2.entry.js +1 -0
- package/dist/magma-components/p-218d8254.system.entry.js +1 -0
- package/dist/magma-components/p-21c46e74.system.entry.js +4 -0
- package/dist/magma-components/p-231b604f.system.entry.js +1 -0
- package/dist/magma-components/p-2507f5cf.entry.js +1 -0
- package/dist/magma-components/p-2723caa7.system.entry.js +13 -0
- package/dist/magma-components/p-277444bc.entry.js +1 -0
- package/dist/magma-components/p-283b0548.system.entry.js +102 -0
- package/dist/magma-components/p-2c44c961.system.entry.js +10 -0
- package/dist/magma-components/p-2ec0db8e.entry.js +1 -0
- package/dist/magma-components/p-2f520704.entry.js +1 -0
- package/dist/magma-components/p-30c3872d.entry.js +1 -0
- package/dist/magma-components/p-314abfba.entry.js +1 -0
- package/dist/magma-components/p-322a5452.entry.js +1 -0
- package/dist/magma-components/p-3231a6a3.entry.js +1 -0
- package/dist/magma-components/p-34401d35.entry.js +1 -0
- package/dist/magma-components/p-35aa29c5.entry.js +1 -0
- package/dist/magma-components/p-35ee2d77.entry.js +1 -0
- package/dist/magma-components/p-36a67b51.entry.js +1 -0
- package/dist/magma-components/p-3a1339bb.system.entry.js +4 -0
- package/dist/magma-components/p-3d56e3f4.entry.js +1 -0
- package/dist/magma-components/p-3e0eed90.system.entry.js +12 -0
- package/dist/magma-components/p-3ecade3c.system.entry.js +11 -0
- package/dist/magma-components/p-3eefca33.system.entry.js +16 -0
- package/dist/magma-components/p-4211ce6c.system.entry.js +1 -0
- package/dist/magma-components/p-436f9b27.system.entry.js +38 -0
- package/dist/magma-components/p-439c9ce3.system.entry.js +10 -0
- package/dist/magma-components/p-44e2a945.system.entry.js +1 -0
- package/dist/magma-components/p-4658154f.entry.js +1 -0
- package/dist/magma-components/p-474047fa.system.entry.js +10 -0
- package/dist/magma-components/p-474c5d53.system.entry.js +11 -0
- package/dist/magma-components/p-493fb2f4.system.entry.js +7 -0
- package/dist/magma-components/p-4ac94b84.system.entry.js +32 -0
- package/dist/magma-components/p-4c73f14b.system.entry.js +14 -0
- package/dist/magma-components/p-4cb88b06.system.entry.js +1 -0
- package/dist/magma-components/p-4dd6a39b.entry.js +1 -0
- package/dist/magma-components/p-4e7f21ac.entry.js +1 -0
- package/dist/magma-components/p-4f14a166.entry.js +1 -0
- package/dist/magma-components/p-50ea11c9.system.entry.js +32 -0
- package/dist/magma-components/p-514d0fcb.entry.js +1 -0
- package/dist/magma-components/p-52793bdb.system.entry.js +1 -0
- package/dist/magma-components/p-5299f709.system.entry.js +26 -0
- package/dist/magma-components/p-57762bae.entry.js +1 -0
- package/dist/magma-components/p-577db922.entry.js +1 -0
- package/dist/magma-components/p-58b82b40.system.entry.js +10 -0
- package/dist/magma-components/p-5a7267e8.system.entry.js +4 -0
- package/dist/magma-components/p-5a911e7b.system.entry.js +13 -0
- package/dist/magma-components/p-5ac9e2f4.entry.js +1 -0
- package/dist/magma-components/p-5c94e0c2.system.entry.js +7 -0
- package/dist/magma-components/p-5ccf493c.system.entry.js +7 -0
- package/dist/magma-components/p-5d119459.entry.js +1 -0
- package/dist/magma-components/p-5f1132b8.entry.js +1 -0
- package/dist/magma-components/p-5fd04ce1.entry.js +1 -0
- package/dist/magma-components/p-60f67c37.entry.js +1 -0
- package/dist/magma-components/p-61bedbe7.system.entry.js +68 -0
- package/dist/magma-components/p-632bc44c.entry.js +1 -0
- package/dist/magma-components/p-64f78149.system.entry.js +1 -0
- package/dist/magma-components/p-69c21eae.entry.js +1 -0
- package/dist/magma-components/p-6a6326c6.entry.js +1 -0
- package/dist/magma-components/p-6c18c40e.system.entry.js +89 -0
- package/dist/magma-components/p-6c800411.entry.js +1 -0
- package/dist/magma-components/p-6e03b83a.entry.js +1 -0
- package/dist/magma-components/p-6ed05d99.entry.js +1 -0
- package/dist/magma-components/p-6f74cdf5.system.entry.js +12 -0
- package/dist/magma-components/p-6fdb3fe7.system.entry.js +27 -0
- package/dist/magma-components/p-6ff8be3e.system.entry.js +30 -0
- package/dist/magma-components/p-7-TP6wnI.js +1 -0
- package/dist/magma-components/p-73fde271.system.entry.js +72 -0
- package/dist/magma-components/p-74b51db8.entry.js +1 -0
- package/dist/magma-components/p-76ecad2f.entry.js +18 -0
- package/dist/magma-components/p-774ce1d2.entry.js +1 -0
- package/dist/magma-components/p-77615947.system.entry.js +1 -0
- package/dist/magma-components/p-7770b989.system.entry.js +1 -0
- package/dist/magma-components/p-7787ebaf.system.entry.js +1 -0
- package/dist/magma-components/p-789c1b93.system.entry.js +1 -0
- package/dist/magma-components/p-7927010f.system.entry.js +25 -0
- package/dist/magma-components/p-79421ee1.system.entry.js +11 -0
- package/dist/magma-components/p-7ab15184.entry.js +1 -0
- package/dist/magma-components/p-7afec7ee.entry.js +1 -0
- package/dist/magma-components/p-7e085c82.entry.js +1 -0
- package/dist/magma-components/p-7e7cf986.system.entry.js +7 -0
- package/dist/magma-components/p-7ffda4f5.entry.js +1 -0
- package/dist/magma-components/p-809adece.system.entry.js +17 -0
- package/dist/magma-components/p-8183b7ed.entry.js +1 -0
- package/dist/magma-components/p-832883c4.entry.js +1 -0
- package/dist/magma-components/p-83394280.system.entry.js +32 -0
- package/dist/magma-components/p-835fc007.entry.js +1 -0
- package/dist/magma-components/p-837fbbf7.system.entry.js +1 -0
- package/dist/magma-components/p-84645c60.system.entry.js +1 -0
- package/dist/magma-components/p-86f4b6eb.system.entry.js +20 -0
- package/dist/magma-components/p-87026d34.entry.js +1 -0
- package/dist/magma-components/p-87faaa8e.system.entry.js +16 -0
- package/dist/magma-components/p-88287207.system.entry.js +13 -0
- package/dist/magma-components/p-883c223a.system.entry.js +4 -0
- package/dist/magma-components/p-88f99a4f.system.entry.js +81 -0
- package/dist/magma-components/p-8a3d2259.system.entry.js +17 -0
- package/dist/magma-components/p-8aafbfdf.system.entry.js +49 -0
- package/dist/magma-components/p-8afc9bc4.system.entry.js +2838 -0
- package/dist/magma-components/p-8ca1d30d.system.entry.js +1 -0
- package/dist/magma-components/p-8ccd187a.entry.js +1 -0
- package/dist/magma-components/p-8d53bd61.system.entry.js +4 -0
- package/dist/magma-components/p-8yWTOQiz.js +1 -0
- package/dist/magma-components/p-90993b0b.system.entry.js +68 -0
- package/dist/magma-components/p-915c5f06.system.entry.js +47 -0
- package/dist/magma-components/p-91c4015f.system.entry.js +4 -0
- package/dist/magma-components/p-91ff1560.system.entry.js +7 -0
- package/dist/magma-components/p-92d9b537.entry.js +1 -0
- package/dist/magma-components/p-932620b6.entry.js +1 -0
- package/dist/magma-components/p-9344a234.entry.js +1 -0
- package/dist/magma-components/p-93d39066.entry.js +1 -0
- package/dist/magma-components/p-97f6166e.system.entry.js +28 -0
- package/dist/magma-components/p-9d1cdb42.system.entry.js +15 -0
- package/dist/magma-components/p-9dcfc247.entry.js +1 -0
- package/dist/magma-components/p-9eb1e154.system.entry.js +14 -0
- package/dist/magma-components/p-9fe14430.system.entry.js +7 -0
- package/dist/magma-components/p-BPNsbMrg.system.js +67 -0
- package/dist/magma-components/p-BS7eEvwu.system.js +17 -0
- package/dist/magma-components/p-BTF_aRDG.system.js +231 -0
- package/dist/magma-components/p-BpVYIPkx.js +1 -0
- package/dist/magma-components/p-BxPbQB28.js +3 -0
- package/dist/magma-components/p-CdsZyFQ-.system.js +10 -0
- package/dist/magma-components/p-D7BrzK-C.system.js +90 -0
- package/dist/magma-components/p-DaONbL_w.system.js +162 -0
- package/dist/magma-components/p-Kv1yahtR.js +5 -0
- package/dist/magma-components/p-ZDRIVCAt.system.js +5 -0
- package/dist/magma-components/p-a41e52f7.entry.js +1 -0
- package/dist/magma-components/p-a462aadd.entry.js +1 -0
- package/dist/magma-components/p-a4a83a63.entry.js +1 -0
- package/dist/magma-components/p-a64bbb36.system.entry.js +40 -0
- package/dist/magma-components/p-a6af4083.system.entry.js +32 -0
- package/dist/magma-components/p-a7e7f2c0.entry.js +1 -0
- package/dist/magma-components/p-aba96089.entry.js +1 -0
- package/dist/magma-components/p-ac81f63a.system.entry.js +913 -0
- package/dist/magma-components/p-aed8b119.entry.js +1 -0
- package/dist/magma-components/p-b24b5179.entry.js +1 -0
- package/dist/magma-components/p-b295e4ab.system.entry.js +1 -0
- package/dist/magma-components/p-b2c62b6e.system.entry.js +7 -0
- package/dist/magma-components/p-b431ca8a.entry.js +1 -0
- package/dist/magma-components/p-b5559b28.system.entry.js +1 -0
- package/dist/magma-components/p-b626c69f.system.entry.js +1 -0
- package/dist/magma-components/p-b897c97d.entry.js +1 -0
- package/dist/magma-components/p-bab4c75e.system.entry.js +45 -0
- package/dist/magma-components/p-bba04b08.system.entry.js +14 -0
- package/dist/magma-components/p-bc53c19e.entry.js +8 -0
- package/dist/magma-components/p-bf2fe278.system.entry.js +16 -0
- package/dist/magma-components/p-c0136138.entry.js +1 -0
- package/dist/magma-components/p-c166ec50.system.entry.js +47 -0
- package/dist/magma-components/p-c22887f7.system.entry.js +90 -0
- package/dist/magma-components/p-c28fce23.entry.js +1 -0
- package/dist/magma-components/p-c34d9e61.system.entry.js +1 -0
- package/dist/magma-components/p-c48bad95.entry.js +1 -0
- package/dist/magma-components/p-cb2c5f1b.entry.js +1 -0
- package/dist/magma-components/p-cc0c6ae7.entry.js +1 -0
- package/dist/magma-components/p-cc2a09f2.system.entry.js +16 -0
- package/dist/magma-components/p-cc9d9458.entry.js +1 -0
- package/dist/magma-components/p-ccb14076.system.entry.js +217 -0
- package/dist/magma-components/p-ccb6898a.system.entry.js +4 -0
- package/dist/magma-components/p-d04ac65d.entry.js +1 -0
- package/dist/magma-components/p-d07d227b.system.entry.js +8 -0
- package/dist/magma-components/p-d1faf129.entry.js +1 -0
- package/dist/magma-components/p-d282a929.entry.js +1 -0
- package/dist/magma-components/p-d2f134ac.entry.js +1 -0
- package/dist/magma-components/p-d47df503.system.entry.js +37 -0
- package/dist/magma-components/p-d5bd6bef.entry.js +1 -0
- package/dist/magma-components/p-d9804d2f.entry.js +1 -0
- package/dist/magma-components/p-dc06b29e.entry.js +1 -0
- package/dist/magma-components/p-dc59b764.entry.js +1 -0
- package/dist/magma-components/p-dc7bada4.entry.js +1 -0
- package/dist/magma-components/p-dcc3be64.system.entry.js +7 -0
- package/dist/magma-components/p-dd58f9ee.entry.js +18 -0
- package/dist/magma-components/p-de091be7.system.entry.js +7 -0
- package/dist/magma-components/p-dfe8552c.system.entry.js +11 -0
- package/dist/magma-components/p-e1e69217.system.entry.js +1 -0
- package/dist/magma-components/p-e213640b.entry.js +1 -0
- package/dist/magma-components/p-e2ef1d6f.entry.js +1 -0
- package/dist/magma-components/p-e2ef5996.entry.js +1 -0
- package/dist/magma-components/p-e7751639.entry.js +1 -0
- package/dist/magma-components/p-e887a14c.entry.js +1 -0
- package/dist/magma-components/p-e8cd2b93.system.entry.js +4 -0
- package/dist/magma-components/p-e8ed096b.entry.js +1 -0
- package/dist/magma-components/p-eaff7300.entry.js +1 -0
- package/dist/magma-components/p-eb681207.system.entry.js +1 -0
- package/dist/magma-components/p-ec9cc7b9.entry.js +1 -0
- package/dist/magma-components/p-eca99a0a.system.entry.js +1 -0
- package/dist/magma-components/p-ecd3c27f.entry.js +1 -0
- package/dist/magma-components/p-ed897f9f.entry.js +1 -0
- package/dist/magma-components/p-ee1e7f07.system.entry.js +3 -0
- package/dist/magma-components/p-ef3424e3.entry.js +1 -0
- package/dist/magma-components/p-f29a059d.system.entry.js +15 -0
- package/dist/magma-components/p-f5bb8c0c.entry.js +1 -0
- package/dist/magma-components/p-f654eafe.entry.js +1 -0
- package/dist/magma-components/p-f733ae92.system.entry.js +16 -0
- package/dist/magma-components/p-f8eb19b3.entry.js +1 -0
- package/dist/magma-components/p-f8feee93.system.entry.js +4 -0
- package/dist/magma-components/p-faa1f22c.entry.js +1 -0
- package/dist/magma-components/p-ffa1a0b4.system.entry.js +1 -0
- package/dist/magma-components/p-hVpoPUxI.system.js +58 -0
- package/dist/magma-components/p-wI0alRSO.js +1 -0
- package/dist/stats.json +3191 -2538
- package/dist/types/common/form.d.ts +8 -1
- package/dist/types/common/preference.d.ts +1 -1
- package/dist/types/common/validity/index.d.ts +22 -0
- package/dist/types/components/mds-button/mds-button.d.ts +9 -0
- package/dist/types/components/mds-button-dropdown/mds-button-dropdown.d.ts +23 -1
- package/dist/types/components/mds-input/mds-input.d.ts +41 -2
- package/dist/types/components/mds-input/meta/validators.d.ts +22 -0
- package/dist/types/components/mds-input/meta/validity.d.ts +14 -0
- package/dist/types/components/mds-input-date/mds-input-date.d.ts +38 -0
- package/dist/types/components/mds-input-date-range/mds-input-date-range.d.ts +26 -0
- package/dist/types/components/mds-input-otp/mds-input-otp.d.ts +21 -2
- package/dist/types/components/mds-input-range/mds-input-range.d.ts +8 -1
- package/dist/types/components/mds-input-select/mds-input-select.d.ts +41 -4
- package/dist/types/components/mds-input-select/meta/event-detail.d.ts +8 -0
- package/dist/types/components/mds-input-switch/mds-input-switch.d.ts +17 -0
- package/dist/types/components/mds-input-upload/mds-input-upload.d.ts +27 -5
- package/dist/types/components/mds-keyboard-key/meta/icons.d.ts +1 -1
- package/dist/types/components/mds-pref-animation/mds-pref-animation.d.ts +10 -1
- package/dist/types/components/mds-pref-consumption/mds-pref-consumption.d.ts +10 -1
- package/dist/types/components/mds-pref-contrast/mds-pref-contrast.d.ts +10 -1
- package/dist/types/components/mds-pref-mode/mds-pref-mode.d.ts +10 -1
- package/dist/types/components.d.ts +102 -19
- package/package.json +25 -12
- package/dist/cjs/floating-controller-Cd_vNLLD.js +0 -369
- package/dist/cjs/form-DTCBh5WK.js +0 -22
- package/dist/cjs/index--6wz7eWi.js +0 -5183
- package/dist/cjs/locale-CB5_Z7PE.js +0 -816
- package/dist/cjs/preference-eJcbLLAn.js +0 -389
- package/dist/components/p-6K9sFzLr.js +0 -1
- package/dist/components/p-A9TZf0Ii.js +0 -1
- package/dist/components/p-BBhbQT2f.js +0 -1
- package/dist/components/p-BFpRu7yD.js +0 -1
- package/dist/components/p-BL63WAAq.js +0 -8
- package/dist/components/p-BNHXZ-JR.js +0 -1
- package/dist/components/p-BShLEry5.js +0 -1
- package/dist/components/p-BSxuG1vZ.js +0 -1
- package/dist/components/p-BTHR4xXu.js +0 -1
- package/dist/components/p-BYxxgEE_.js +0 -1
- package/dist/components/p-BZFyAX-6.js +0 -1
- package/dist/components/p-BhFTcUD0.js +0 -3
- package/dist/components/p-Bss3F51Q.js +0 -5
- package/dist/components/p-BtMdmkID.js +0 -1
- package/dist/components/p-ByaUOMp0.js +0 -1
- package/dist/components/p-C1xZO_fq.js +0 -1
- package/dist/components/p-C58NKMEE.js +0 -1
- package/dist/components/p-C6Q4zFh6.js +0 -1
- package/dist/components/p-CUQ7WIXh.js +0 -1
- package/dist/components/p-CVpjH8Un.js +0 -1
- package/dist/components/p-Cd_8zD_I.js +0 -1
- package/dist/components/p-CnAeawmf.js +0 -1
- package/dist/components/p-CvIFS8oA.js +0 -1
- package/dist/components/p-DCrjf0F0.js +0 -1
- package/dist/components/p-DlHJvYE7.js +0 -1
- package/dist/components/p-DlaJNPdd.js +0 -1
- package/dist/components/p-DnrQaRnh.js +0 -1
- package/dist/components/p-OPg_Naue.js +0 -1
- package/dist/components/p-RS4yyl41.js +0 -1
- package/dist/components/p-gv3eu44S.js +0 -1
- package/dist/components/p-kff6xSdW.js +0 -1
- package/dist/components/p-pys1EQ60.js +0 -1
- package/dist/components/p-qketFgr0.js +0 -1
- package/dist/components/p-wq6nWuWE.js +0 -1
- package/dist/components/p-zml3K7nx.js +0 -1
- package/dist/esm/floating-controller-DVldZ5mh.js +0 -366
- package/dist/esm/form-A9TZf0Ii.js +0 -19
- package/dist/esm/index-DIiEV39g.js +0 -5149
- package/dist/esm/locale-CbJbTW_c.js +0 -814
- package/dist/esm/preference-CKerJx2M.js +0 -385
- package/dist/esm-es5/floating-controller-DVldZ5mh.js +0 -66
- package/dist/esm-es5/form-A9TZf0Ii.js +0 -8
- package/dist/esm-es5/index-DIiEV39g.js +0 -371
- package/dist/esm-es5/locale-CbJbTW_c.js +0 -230
- package/dist/esm-es5/preference-CKerJx2M.js +0 -58
- package/dist/magma-components/p-005172ba.entry.js +0 -1
- package/dist/magma-components/p-05fa40aa.system.entry.js +0 -10
- package/dist/magma-components/p-071f18c6.system.entry.js +0 -27
- package/dist/magma-components/p-0798b0bf.system.entry.js +0 -24
- package/dist/magma-components/p-0827a5bd.entry.js +0 -1
- package/dist/magma-components/p-086fb3aa.entry.js +0 -1
- package/dist/magma-components/p-0a088e7d.system.entry.js +0 -10
- package/dist/magma-components/p-0a691082.entry.js +0 -1
- package/dist/magma-components/p-0ec21574.system.entry.js +0 -10
- package/dist/magma-components/p-0f6bb54d.system.entry.js +0 -22
- package/dist/magma-components/p-102d3bd3.system.entry.js +0 -1
- package/dist/magma-components/p-10704ede.system.entry.js +0 -4
- package/dist/magma-components/p-15c77a98.system.entry.js +0 -19
- package/dist/magma-components/p-15f63bf3.entry.js +0 -1
- package/dist/magma-components/p-16e9fb14.system.entry.js +0 -7
- package/dist/magma-components/p-181dfb04.entry.js +0 -1
- package/dist/magma-components/p-184720be.system.entry.js +0 -1
- package/dist/magma-components/p-18473d2f.entry.js +0 -1
- package/dist/magma-components/p-18667ae7.system.entry.js +0 -13
- package/dist/magma-components/p-18f7b970.system.entry.js +0 -4
- package/dist/magma-components/p-19adde9d.entry.js +0 -1
- package/dist/magma-components/p-1afc0452.entry.js +0 -1
- package/dist/magma-components/p-1cce738a.system.entry.js +0 -32
- package/dist/magma-components/p-1df6ac96.system.entry.js +0 -7
- package/dist/magma-components/p-209063b6.system.entry.js +0 -50
- package/dist/magma-components/p-216f95cc.system.entry.js +0 -1
- package/dist/magma-components/p-21891a24.entry.js +0 -1
- package/dist/magma-components/p-21d6687a.system.entry.js +0 -7
- package/dist/magma-components/p-2217a7be.entry.js +0 -1
- package/dist/magma-components/p-231505e8.entry.js +0 -1
- package/dist/magma-components/p-2386f0d6.system.entry.js +0 -37
- package/dist/magma-components/p-23e61db9.system.entry.js +0 -4
- package/dist/magma-components/p-25935d33.system.entry.js +0 -1
- package/dist/magma-components/p-284c40cd.system.entry.js +0 -4
- package/dist/magma-components/p-29684655.system.entry.js +0 -16
- package/dist/magma-components/p-2b56fc14.entry.js +0 -1
- package/dist/magma-components/p-2b73fee6.entry.js +0 -1
- package/dist/magma-components/p-2d5aadba.system.entry.js +0 -7
- package/dist/magma-components/p-2de17848.entry.js +0 -1
- package/dist/magma-components/p-34482514.entry.js +0 -1
- package/dist/magma-components/p-34c0890e.entry.js +0 -1
- package/dist/magma-components/p-3635eca6.system.entry.js +0 -1
- package/dist/magma-components/p-3b0c1202.entry.js +0 -1
- package/dist/magma-components/p-3db23b5f.system.entry.js +0 -16
- package/dist/magma-components/p-3ec7d3ea.entry.js +0 -1
- package/dist/magma-components/p-3f747a63.system.entry.js +0 -1
- package/dist/magma-components/p-3ff30842.system.entry.js +0 -16
- package/dist/magma-components/p-40563e33.entry.js +0 -1
- package/dist/magma-components/p-41bf6f25.system.entry.js +0 -81
- package/dist/magma-components/p-421a630e.entry.js +0 -1
- package/dist/magma-components/p-4299b76b.system.entry.js +0 -4
- package/dist/magma-components/p-4543501c.entry.js +0 -1
- package/dist/magma-components/p-4616bc07.entry.js +0 -1
- package/dist/magma-components/p-46786d71.system.entry.js +0 -14
- package/dist/magma-components/p-470e5ac8.system.entry.js +0 -1
- package/dist/magma-components/p-48d37230.entry.js +0 -1
- package/dist/magma-components/p-49b120cb.system.entry.js +0 -13
- package/dist/magma-components/p-4af76eb3.entry.js +0 -1
- package/dist/magma-components/p-4b3a8132.system.entry.js +0 -13
- package/dist/magma-components/p-4ba6cb3f.entry.js +0 -1
- package/dist/magma-components/p-4c8316a8.entry.js +0 -1
- package/dist/magma-components/p-4c95442e.entry.js +0 -1
- package/dist/magma-components/p-4cadbd49.entry.js +0 -1
- package/dist/magma-components/p-4e4bdbf8.entry.js +0 -1
- package/dist/magma-components/p-4e5ab0e4.system.entry.js +0 -16
- package/dist/magma-components/p-4f107cb2.system.entry.js +0 -2838
- package/dist/magma-components/p-518b55f3.entry.js +0 -1
- package/dist/magma-components/p-56ad5bf2.entry.js +0 -1
- package/dist/magma-components/p-5eec629c.system.entry.js +0 -17
- package/dist/magma-components/p-5f545f85.system.entry.js +0 -1
- package/dist/magma-components/p-61a5ac3d.system.entry.js +0 -17
- package/dist/magma-components/p-636cc471.entry.js +0 -1
- package/dist/magma-components/p-646034cb.system.entry.js +0 -27
- package/dist/magma-components/p-677ab154.system.entry.js +0 -3
- package/dist/magma-components/p-67d80d37.system.entry.js +0 -1
- package/dist/magma-components/p-6937f340.entry.js +0 -1
- package/dist/magma-components/p-6b7e449f.entry.js +0 -1
- package/dist/magma-components/p-6c417ea1.system.entry.js +0 -913
- package/dist/magma-components/p-6ce60d59.entry.js +0 -1
- package/dist/magma-components/p-6cf760ea.system.entry.js +0 -45
- package/dist/magma-components/p-6dc27543.entry.js +0 -1
- package/dist/magma-components/p-6de37588.entry.js +0 -1
- package/dist/magma-components/p-6f6b5eb5.entry.js +0 -1
- package/dist/magma-components/p-7090184f.entry.js +0 -1
- package/dist/magma-components/p-716ad14c.entry.js +0 -1
- package/dist/magma-components/p-71804224.entry.js +0 -1
- package/dist/magma-components/p-735dc594.system.entry.js +0 -1
- package/dist/magma-components/p-739fdf76.system.entry.js +0 -1
- package/dist/magma-components/p-74b0902a.entry.js +0 -1
- package/dist/magma-components/p-7530a2f2.entry.js +0 -1
- package/dist/magma-components/p-759133b3.entry.js +0 -1
- package/dist/magma-components/p-75dd012a.system.entry.js +0 -11
- package/dist/magma-components/p-76ae22d6.entry.js +0 -1
- package/dist/magma-components/p-78248693.entry.js +0 -1
- package/dist/magma-components/p-7912f877.entry.js +0 -1
- package/dist/magma-components/p-7c0d202c.entry.js +0 -1
- package/dist/magma-components/p-7d304fd4.system.entry.js +0 -65
- package/dist/magma-components/p-7f6d708c.system.entry.js +0 -41
- package/dist/magma-components/p-81b72b6e.entry.js +0 -1
- package/dist/magma-components/p-859ab5a2.entry.js +0 -18
- package/dist/magma-components/p-88564e9b.system.entry.js +0 -14
- package/dist/magma-components/p-896ae0ee.entry.js +0 -1
- package/dist/magma-components/p-89a3bc7a.system.entry.js +0 -16
- package/dist/magma-components/p-8b1abf81.system.entry.js +0 -32
- package/dist/magma-components/p-8bbee38d.entry.js +0 -1
- package/dist/magma-components/p-8bf680d6.system.entry.js +0 -15
- package/dist/magma-components/p-8cb3a071.system.entry.js +0 -15
- package/dist/magma-components/p-8dff6606.system.entry.js +0 -11
- package/dist/magma-components/p-8e40eda3.system.entry.js +0 -9
- package/dist/magma-components/p-8f229eaf.entry.js +0 -1
- package/dist/magma-components/p-91b9d4e7.system.entry.js +0 -4
- package/dist/magma-components/p-92e1001f.entry.js +0 -1
- package/dist/magma-components/p-9378b373.system.entry.js +0 -49
- package/dist/magma-components/p-94fa3396.system.entry.js +0 -47
- package/dist/magma-components/p-9741d95e.system.entry.js +0 -7
- package/dist/magma-components/p-97ea9e6e.system.entry.js +0 -68
- package/dist/magma-components/p-9846fe89.system.entry.js +0 -1
- package/dist/magma-components/p-998721b9.system.entry.js +0 -1
- package/dist/magma-components/p-9a5296c0.system.entry.js +0 -7
- package/dist/magma-components/p-9bbd4193.system.entry.js +0 -102
- package/dist/magma-components/p-9be4a736.entry.js +0 -1
- package/dist/magma-components/p-9caffe14.entry.js +0 -1
- package/dist/magma-components/p-9d86477d.system.entry.js +0 -1
- package/dist/magma-components/p-9de1ac7f.entry.js +0 -1
- package/dist/magma-components/p-9e3bc553.system.entry.js +0 -26
- package/dist/magma-components/p-9e58467e.system.entry.js +0 -10
- package/dist/magma-components/p-9e9a1ebd.system.entry.js +0 -15
- package/dist/magma-components/p-A9TZf0Ii.js +0 -1
- package/dist/magma-components/p-BFnx_0hM.js +0 -5
- package/dist/magma-components/p-BbMKuVem.js +0 -1
- package/dist/magma-components/p-C2FHijr2.system.js +0 -231
- package/dist/magma-components/p-CDTiTqY0.system.js +0 -58
- package/dist/magma-components/p-CI85vVs8.system.js +0 -9
- package/dist/magma-components/p-CnXBPjmc.system.js +0 -5
- package/dist/magma-components/p-DB8Rm54c.js +0 -1
- package/dist/magma-components/p-DIiEV39g.js +0 -3
- package/dist/magma-components/p-DVd2EM-q.system.js +0 -90
- package/dist/magma-components/p-DmC-b-ZK.system.js +0 -67
- package/dist/magma-components/p-MGv0i39Y.system.js +0 -162
- package/dist/magma-components/p-a15da479.system.entry.js +0 -8
- package/dist/magma-components/p-a3b0f586.entry.js +0 -1
- package/dist/magma-components/p-a93b2a39.entry.js +0 -1
- package/dist/magma-components/p-aa267e7b.entry.js +0 -1
- package/dist/magma-components/p-ab9095ae.system.entry.js +0 -4
- package/dist/magma-components/p-ab997243.system.entry.js +0 -4
- package/dist/magma-components/p-ace198e9.entry.js +0 -1
- package/dist/magma-components/p-ad3983b2.entry.js +0 -1
- package/dist/magma-components/p-aea6081f.entry.js +0 -1
- package/dist/magma-components/p-af41c8b8.system.entry.js +0 -1
- package/dist/magma-components/p-af45f0a5.system.entry.js +0 -20
- package/dist/magma-components/p-b0539d61.system.entry.js +0 -32
- package/dist/magma-components/p-b35c26f8.entry.js +0 -18
- package/dist/magma-components/p-b3a3578c.entry.js +0 -1
- package/dist/magma-components/p-b49e0321.system.entry.js +0 -1
- package/dist/magma-components/p-b71e0d51.entry.js +0 -1
- package/dist/magma-components/p-b8d4a14e.entry.js +0 -1
- package/dist/magma-components/p-ba035f90.entry.js +0 -1
- package/dist/magma-components/p-bc51d310.system.entry.js +0 -1
- package/dist/magma-components/p-bd490a8e.entry.js +0 -1
- package/dist/magma-components/p-be198039.system.entry.js +0 -4
- package/dist/magma-components/p-bf7168b4.entry.js +0 -1
- package/dist/magma-components/p-bf84d9fa.entry.js +0 -1
- package/dist/magma-components/p-c4e58240.entry.js +0 -1
- package/dist/magma-components/p-c573de10.entry.js +0 -1
- package/dist/magma-components/p-c6be3db7.system.entry.js +0 -1
- package/dist/magma-components/p-c7517884.system.entry.js +0 -38
- package/dist/magma-components/p-c9be79bd.entry.js +0 -1
- package/dist/magma-components/p-c9e12c2b.system.entry.js +0 -7
- package/dist/magma-components/p-cb6a1908.entry.js +0 -1
- package/dist/magma-components/p-cbd5aef4.system.entry.js +0 -14
- package/dist/magma-components/p-cc033985.system.entry.js +0 -14
- package/dist/magma-components/p-cd21137b.system.entry.js +0 -1
- package/dist/magma-components/p-cd84a264.system.entry.js +0 -41
- package/dist/magma-components/p-d0457835.entry.js +0 -1
- package/dist/magma-components/p-d3116844.entry.js +0 -1
- package/dist/magma-components/p-d38165ed.system.entry.js +0 -1
- package/dist/magma-components/p-d3933a22.entry.js +0 -1
- package/dist/magma-components/p-d44c49d6.system.entry.js +0 -8
- package/dist/magma-components/p-d4a529ce.entry.js +0 -1
- package/dist/magma-components/p-d64311e2.entry.js +0 -1
- package/dist/magma-components/p-d6d4aa1a.entry.js +0 -1
- package/dist/magma-components/p-d81e7100.system.entry.js +0 -15
- package/dist/magma-components/p-d8c27f4b.entry.js +0 -1
- package/dist/magma-components/p-d921d876.entry.js +0 -1
- package/dist/magma-components/p-da1ac3e1.entry.js +0 -1
- package/dist/magma-components/p-da4dc390.system.entry.js +0 -4
- package/dist/magma-components/p-dda7a33b.entry.js +0 -1
- package/dist/magma-components/p-de6bc3c8.entry.js +0 -1
- package/dist/magma-components/p-df2b7607.system.entry.js +0 -4
- package/dist/magma-components/p-e0b2ef8f.system.entry.js +0 -1
- package/dist/magma-components/p-e0c50a2d.entry.js +0 -1
- package/dist/magma-components/p-e1277efe.system.entry.js +0 -1
- package/dist/magma-components/p-e1e6dd97.entry.js +0 -1
- package/dist/magma-components/p-e2f7a9bd.system.entry.js +0 -1
- package/dist/magma-components/p-e375c8b1.entry.js +0 -1
- package/dist/magma-components/p-e3fce8ca.entry.js +0 -1
- package/dist/magma-components/p-e5c6f9a9.system.entry.js +0 -7
- package/dist/magma-components/p-e5da7036.entry.js +0 -1
- package/dist/magma-components/p-e6dccab5.system.entry.js +0 -1
- package/dist/magma-components/p-e9a16f22.system.entry.js +0 -134
- package/dist/magma-components/p-ea0091b6.entry.js +0 -1
- package/dist/magma-components/p-ec00defc.system.entry.js +0 -13
- package/dist/magma-components/p-ec59ec9a.entry.js +0 -1
- package/dist/magma-components/p-eddcef53.system.entry.js +0 -1
- package/dist/magma-components/p-edfb0d7a.entry.js +0 -1
- package/dist/magma-components/p-eed00e7f.system.entry.js +0 -1
- package/dist/magma-components/p-ef8cb401.entry.js +0 -1
- package/dist/magma-components/p-f070a5b5.system.entry.js +0 -11
- package/dist/magma-components/p-f23d4974.entry.js +0 -1
- package/dist/magma-components/p-f542246f.system.entry.js +0 -1
- package/dist/magma-components/p-f5c680dd.entry.js +0 -1
- package/dist/magma-components/p-f60c6e8e.system.entry.js +0 -40
- package/dist/magma-components/p-f8369939.entry.js +0 -1
- package/dist/magma-components/p-f97ede3e.system.entry.js +0 -19
- package/dist/magma-components/p-f97ff5b2.entry.js +0 -1
- package/dist/magma-components/p-f9d9cf7c.system.entry.js +0 -11
- package/dist/magma-components/p-fa163e86.entry.js +0 -1
- package/dist/magma-components/p-fe1662e8.system.entry.js +0 -28
- package/dist/magma-components/p-fe19080a.entry.js +0 -8
- package/dist/magma-components/p-ff133cbd.entry.js +0 -1
- package/dist/magma-components/p-ff49fb35.entry.js +0 -1
- package/dist/magma-components/p-fff44704.entry.js +0 -1
package/dist/hydrate/index.mjs
CHANGED
|
@@ -8951,22 +8951,22 @@ let Locale$1 = class Locale {
|
|
|
8951
8951
|
};
|
|
8952
8952
|
|
|
8953
8953
|
const cancel$7 = "Ακύρωση";
|
|
8954
|
-
var localeEl$
|
|
8954
|
+
var localeEl$x = {
|
|
8955
8955
|
cancel: cancel$7
|
|
8956
8956
|
};
|
|
8957
8957
|
|
|
8958
8958
|
const cancel$6 = "Cancel";
|
|
8959
|
-
var localeEn$
|
|
8959
|
+
var localeEn$x = {
|
|
8960
8960
|
cancel: cancel$6
|
|
8961
8961
|
};
|
|
8962
8962
|
|
|
8963
8963
|
const cancel$5 = "Cancelar";
|
|
8964
|
-
var localeEs$
|
|
8964
|
+
var localeEs$x = {
|
|
8965
8965
|
cancel: cancel$5
|
|
8966
8966
|
};
|
|
8967
8967
|
|
|
8968
8968
|
const cancel$4 = "Annulla";
|
|
8969
|
-
var localeIt$
|
|
8969
|
+
var localeIt$y = {
|
|
8970
8970
|
cancel: cancel$4
|
|
8971
8971
|
};
|
|
8972
8972
|
|
|
@@ -8983,10 +8983,10 @@ class MdsBanner {
|
|
|
8983
8983
|
this.closeEvent = createEvent(this, "mdsBannerClose", 7);
|
|
8984
8984
|
this.km = new KeyboardManager();
|
|
8985
8985
|
this.t = new Locale$1({
|
|
8986
|
-
el: localeEl$
|
|
8987
|
-
en: localeEn$
|
|
8988
|
-
es: localeEs$
|
|
8989
|
-
it: localeIt$
|
|
8986
|
+
el: localeEl$x,
|
|
8987
|
+
en: localeEn$x,
|
|
8988
|
+
es: localeEs$x,
|
|
8989
|
+
it: localeIt$y,
|
|
8990
8990
|
});
|
|
8991
8991
|
/**
|
|
8992
8992
|
* Sets the theme variant colors
|
|
@@ -9315,22 +9315,22 @@ class MdsBibliography {
|
|
|
9315
9315
|
var miBaselineArrowBack = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20v-2z"/></svg>`;
|
|
9316
9316
|
|
|
9317
9317
|
const back$3 = "Πήγαινε πίσω";
|
|
9318
|
-
var localeEl$
|
|
9318
|
+
var localeEl$w = {
|
|
9319
9319
|
back: back$3
|
|
9320
9320
|
};
|
|
9321
9321
|
|
|
9322
9322
|
const back$2 = "Go back";
|
|
9323
|
-
var localeEn$
|
|
9323
|
+
var localeEn$w = {
|
|
9324
9324
|
back: back$2
|
|
9325
9325
|
};
|
|
9326
9326
|
|
|
9327
9327
|
const back$1 = "Volver atrás";
|
|
9328
|
-
var localeEs$
|
|
9328
|
+
var localeEs$w = {
|
|
9329
9329
|
back: back$1
|
|
9330
9330
|
};
|
|
9331
9331
|
|
|
9332
9332
|
const back = "Indietro";
|
|
9333
|
-
var localeIt$
|
|
9333
|
+
var localeIt$x = {
|
|
9334
9334
|
back: back
|
|
9335
9335
|
};
|
|
9336
9336
|
|
|
@@ -9345,10 +9345,10 @@ class MdsBreadcrumb {
|
|
|
9345
9345
|
this.changedEvent = createEvent(this, "mdsBreadcrumbChange", 7);
|
|
9346
9346
|
this.kb = new KeyboardManager();
|
|
9347
9347
|
this.t = new Locale$1({
|
|
9348
|
-
el: localeEl$
|
|
9349
|
-
en: localeEn$
|
|
9350
|
-
es: localeEs$
|
|
9351
|
-
it: localeIt$
|
|
9348
|
+
el: localeEl$w,
|
|
9349
|
+
en: localeEn$w,
|
|
9350
|
+
es: localeEs$w,
|
|
9351
|
+
it: localeIt$x,
|
|
9352
9352
|
});
|
|
9353
9353
|
/**
|
|
9354
9354
|
* Hides the back arrow button
|
|
@@ -9541,12 +9541,53 @@ const isIconFormatIsSVG = (icon) => {
|
|
|
9541
9541
|
return icon.startsWith(MARKUP_SVG_ICON);
|
|
9542
9542
|
};
|
|
9543
9543
|
|
|
9544
|
+
/**
|
|
9545
|
+
* Safe wrappers around ElementInternals methods. In Stencil's hydrate/SSR
|
|
9546
|
+
* runtime (and in mock-doc spec tests) `@AttachInternals()` returns an inert
|
|
9547
|
+
* proxy whose members are all `undefined`, so direct calls like
|
|
9548
|
+
* `internals.setFormValue(...)` throw. Property reads (`internals.form`) are
|
|
9549
|
+
* safe and don't need these wrappers.
|
|
9550
|
+
*/
|
|
9551
|
+
const setFormValue = (internals, value) => {
|
|
9552
|
+
if (typeof (internals === null || internals === void 0 ? void 0 : internals.setFormValue) === 'function') {
|
|
9553
|
+
internals.setFormValue(value);
|
|
9554
|
+
}
|
|
9555
|
+
};
|
|
9556
|
+
const setValidity = (internals, flags, message, anchor) => {
|
|
9557
|
+
if (typeof (internals === null || internals === void 0 ? void 0 : internals.setValidity) === 'function') {
|
|
9558
|
+
internals.setValidity(flags, message, anchor);
|
|
9559
|
+
}
|
|
9560
|
+
};
|
|
9561
|
+
/**
|
|
9562
|
+
* Submits `form` as a native submit button with this `name` and `value` would. A custom
|
|
9563
|
+
* element cannot be the submitter of `requestSubmit()`, so a hidden native button stands in
|
|
9564
|
+
* for it for the length of the call: the receiver gets `name=value`, `event.submitter`
|
|
9565
|
+
* carries them, and `new FormData(form)` leaves them out unless it is given the submitter.
|
|
9566
|
+
*/
|
|
9567
|
+
const requestSubmitAs = (form, name, value) => {
|
|
9568
|
+
const submitter = form.ownerDocument.createElement('button');
|
|
9569
|
+
submitter.type = 'submit';
|
|
9570
|
+
submitter.hidden = true;
|
|
9571
|
+
// Angular and Vue bind null for a missing value, which a native button would send as "null"
|
|
9572
|
+
if (name != null)
|
|
9573
|
+
submitter.name = name;
|
|
9574
|
+
if (value != null)
|
|
9575
|
+
submitter.value = value;
|
|
9576
|
+
form.append(submitter);
|
|
9577
|
+
try {
|
|
9578
|
+
form.requestSubmit(submitter);
|
|
9579
|
+
}
|
|
9580
|
+
finally {
|
|
9581
|
+
submitter.remove();
|
|
9582
|
+
}
|
|
9583
|
+
};
|
|
9584
|
+
|
|
9544
9585
|
var mdiApple = `<svg xmlns="http://www.w3.org/2000/svg" id="mdi-apple" viewBox="0 0 24 24"><path d="M18.71,19.5C17.88,20.74 17,21.95 15.66,21.97C14.32,22 13.89,21.18 12.37,21.18C10.84,21.18 10.37,21.95 9.1,22C7.79,22.05 6.8,20.68 5.96,19.47C4.25,17 2.94,12.45 4.7,9.39C5.57,7.87 7.13,6.91 8.82,6.88C10.1,6.86 11.32,7.75 12.11,7.75C12.89,7.75 14.37,6.68 15.92,6.84C16.57,6.87 18.39,7.1 19.56,8.82C19.47,8.88 17.39,10.1 17.41,12.63C17.44,15.65 20.06,16.66 20.09,16.67C20.06,16.74 19.67,18.11 18.71,19.5M13,3.5C13.73,2.67 14.94,2.04 15.94,2C16.07,3.17 15.6,4.35 14.9,5.19C14.21,6.04 13.07,6.7 11.95,6.61C11.8,5.46 12.36,4.26 13,3.5Z" /></svg>`;
|
|
9545
9586
|
|
|
9546
9587
|
var logoGoogle = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" xmlnsXlink="http://www.w3.org/1999/xlink"><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"></path><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"></path><path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"></path><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"></path><path fill="none" d="M0 0h48v48H0z"></path></svg>
|
|
9547
9588
|
`;
|
|
9548
9589
|
|
|
9549
|
-
const mdsButtonCss = () => `@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}@keyframes focus-bounce{0%,75%,to{outline-offset:var(--magma-outline-focus-offset,2px)}50%{outline-offset:var(--magma-outline-blur-offset,6px)}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,mds-spinner,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-button-await-duration:.725s;--mds-button-transition-duration:var(--duration-300,.3s);--private-button-transition-duration:var(--mds-button-transition-duration);--mds-button-background:rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163)));--mds-button-border-hover-opacity:.75;--mds-button-border-high-contrast-hover-width:3px;--mds-button-border-high-contrast-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-tone-outline-hover-width:3px;--mds-button-border-tone-outline-opacity:.3;--mds-button-border-tone-strong-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-tone-weak-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-default-opacity:0;--mds-button-border-opacity:0;--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-gap:calc(var(--spacing,.0025rem)*200);--mds-button-line-clamp:1;--mds-button-radius:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));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));background-color:var(--mds-button-background,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));border-radius:var(--mds-button-radius,var(--magma-radius-2xl,var(--radius-squircle-2xl,40px)));-webkit-box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-sizing:border-box;color:var(--mds-button-color,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));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;corner-shape:var(--mds-button-corner-shape,var(--magma-corner-shape,squircle));align-items:center;align-self:flex-start;cursor:pointer;display:inline-flex;fill:currentColor;gap:var(--mds-button-gap,calc(var(--spacing,.0025rem)*200));justify-content:center;justify-self:flex-start;min-height:calc(var(--spacing,.0025rem)*900);min-width:calc(var(--spacing,.0025rem)*900);padding:0 calc(var(--spacing,.0025rem)*400);position:relative;-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,border-color,box-shadow,color,outline,outline-offset,transform;-webkit-transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));-webkit-user-select:none;user-select:none}:host:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}:host(:focus-visible){--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running;z-index:10}.text{--mds-text-line-clamp:var(--mds-button-line-clamp,1)}.text:first-letter{text-transform:uppercase}.icon{align-items:center;display:inline-flex;fill:inherit;flex-shrink:0;justify-content:center;pointer-events:none;transition-property:fill;-webkit-transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955))}.await,.icon{-webkit-transition-duration:var(--private-button-transition-duration);transition-duration:var(--private-button-transition-duration)}.await{display:none;margin-right:calc(calc(-1 * var(--mds-button-gap,calc(var(--spacing,.0025rem) * 200))) - calc(var(--spacing,.0025rem) * 600));transform:scale(0);transition-behavior:allow-discrete;transition-property:display,margin-right,opacity,transform,width;-webkit-transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955))}.await,.spinner{height:calc(var(--spacing,.0025rem)*600);width:calc(var(--spacing,.0025rem)*600)}.spinner{--mds-spinner-duration:var(--mds-button-await-duration,.725s);color:currentColor}:is(:host(:not([await])),:host([await=false])) .spinner{-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);-webkit-transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94))}:host([await]:not([await=false])) .await{display:flex;margin-right:0;opacity:1;transform:scale(1)}@starting-style{:host([await]:not([await=false])) .await{margin-right:calc(calc(-1 * var(--mds-button-gap,calc(var(--spacing,.0025rem) * 200))) - calc(var(--spacing,.0025rem) * 600));opacity:0;transform:scale(0)}}:host([await]:not([await=false])){pointer-events:none}:host([icon]:not([label])[await]:not([await=false])) .icon{display:none}:host([disabled]:not([disabled=false])){opacity:.5;pointer-events:none}:host([size=sm]){--mds-button-radius:var(--magma-radius-md,var(--radius-squircle-md,20px));min-height:calc(var(--spacing,.0025rem)*700);min-width:calc(var(--spacing,.0025rem)*700);padding:0 calc(var(--spacing,.0025rem)*300)}:host([size=sm]) .icon{height:calc(var(--spacing,.0025rem)*400);width:calc(var(--spacing,.0025rem)*400)}:host([size=sm]) .text{--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}:host([size=sm]):host([await]:not([await=false])) .await{transform:scale(.75)}:host([size=md]){min-height:calc(var(--spacing,.0025rem)*900);min-width:calc(var(--spacing,.0025rem)*900);padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*400)}:host([size=md]):host([icon][icon-position=left]){padding-left:calc(var(--spacing,.0025rem)*300)}:host([size=md]):host([icon][icon-position=right]){padding-right:calc(var(--spacing,.0025rem)*300)}:host([size=lg]){min-height:calc(var(--spacing,.0025rem)*1200);min-width:calc(var(--spacing,.0025rem)*1200);padding-left:calc(var(--spacing,.0025rem)*500);padding-right:calc(var(--spacing,.0025rem)*500)}:host([size=lg]):host([icon][icon-position=left]){padding-left:calc(var(--spacing,.0025rem)*400)}:host([size=lg]):host([icon][icon-position=right]){padding-right:calc(var(--spacing,.0025rem)*400)}:host([size=xl]){min-height:calc(var(--spacing,.0025rem)*1300);min-width:calc(var(--spacing,.0025rem)*1300);padding-left:calc(var(--spacing,.0025rem)*600);padding-right:calc(var(--spacing,.0025rem)*600)}:host([size=xl]) .icon{height:calc(var(--spacing,.0025rem)*800);width:calc(var(--spacing,.0025rem)*800)}:host([size][icon][icon-position]:not([label])){aspect-ratio:1;padding:0}:host(:not([label])) .text,:host([label=""]) .text{display:none}:host([variant=primary]){--mds-button-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=primary]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204)))}:host([variant=primary]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-button-border-color-rgb:var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));fill:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=primary]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226))));--mds-button-border-color-rgb:var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226)))}:host([variant=primary]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=primary]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=primary]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=primary]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:host([variant=primary]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]){--mds-button-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=secondary]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204)))}:host([variant=secondary]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-button-border-color-rgb:var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));fill:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=secondary]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226))));--mds-button-border-color-rgb:var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226)))}:host([variant=secondary]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=secondary]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:host([variant=secondary]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=ai]){--mds-button-background:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=ai]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))));--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242)))}:host([variant=ai]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-ai-surface,var(--magma-tint-accent-ai-surface,var(--variant-ai-09,229 218 253))));--mds-button-border-color-rgb:var(--magma-accent-ai-surface,var(--magma-tint-accent-ai-surface,var(--variant-ai-09,229 218 253)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))));fill:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))))}:host([variant=ai]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-ai-surface-hover,var(--magma-tint-accent-ai-surface-hover,var(--variant-ai-08,219 205 252))));--mds-button-border-color-rgb:var(--magma-accent-ai-surface-hover,var(--magma-tint-accent-ai-surface-hover,var(--variant-ai-08,219 205 252)))}:host([variant=ai]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))))}:host([variant=ai]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=ai]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=ai]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-button-background:rgb(var(--magma-accent-ai-surface-subtle,var(--magma-tint-accent-ai-surface-subtle,var(--variant-ai-10,240 234 254))))}:host([variant=ai]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=info]){--mds-button-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=info]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-info-emphasis-hover,var(--status-info-03,0 94 137)));--mds-button-border-color-rgb:var(--magma-info-emphasis-hover,var(--status-info-03,0 94 137))}:host([variant=info]):host([tone=weak]){--mds-button-background:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-button-border-color-rgb:var(--magma-info-wash-base,var(--status-info-09,193 230 246));--mds-button-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)));fill:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=info]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-info-wash-strong,var(--status-info-08,168 219 242)));--mds-button-border-color-rgb:var(--magma-info-wash-strong,var(--status-info-08,168 219 242));--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=info]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=info]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)))}:host([variant=info]):host([tone=text]){--mds-button-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)))}:host([variant=info]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)));--mds-button-background:rgb(var(--magma-info-wash-soft,var(--status-info-10,220 240 250)))}:host([variant=info]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=success]){--mds-button-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=success]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-success-emphasis-hover,var(--status-success-03,0 102 32)));--mds-button-border-color-rgb:var(--magma-success-emphasis-hover,var(--status-success-03,0 102 32))}:host([variant=success]):host([tone=weak]){--mds-button-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-button-border-color-rgb:var(--magma-success-wash-base,var(--status-success-09,191 233 205));--mds-button-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)));fill:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=success]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-success-wash-strong,var(--status-success-08,165 225 186)));--mds-button-border-color-rgb:var(--magma-success-wash-strong,var(--status-success-08,165 225 186));--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=success]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=success]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)))}:host([variant=success]):host([tone=text]){--mds-button-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)))}:host([variant=success]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)));--mds-button-background:rgb(var(--magma-success-wash-soft,var(--status-success-10,220 243 227)))}:host([variant=success]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=warning]){--mds-button-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=warning]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-warning-emphasis-hover,var(--status-warning-03,113 85 0)));--mds-button-border-color-rgb:var(--magma-warning-emphasis-hover,var(--status-warning-03,113 85 0))}:host([variant=warning]):host([tone=weak]){--mds-button-background:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-button-border-color-rgb:var(--magma-warning-wash-base,var(--status-warning-09,255 220 117));--mds-button-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)));fill:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=warning]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-warning-wash-strong,var(--status-warning-08,255 205 57)));--mds-button-border-color-rgb:var(--magma-warning-wash-strong,var(--status-warning-08,255 205 57));--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=warning]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=warning]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)))}:host([variant=warning]):host([tone=text]){--mds-button-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)))}:host([variant=warning]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)));--mds-button-background:rgb(var(--magma-warning-wash-soft,var(--status-warning-10,255 237 181)))}:host([variant=warning]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=error]){--mds-button-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=error]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-danger-emphasis-hover,var(--status-error-03,165 33 40)));--mds-button-border-color-rgb:var(--magma-danger-emphasis-hover,var(--status-error-03,165 33 40))}:host([variant=error]):host([tone=weak]){--mds-button-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-button-border-color-rgb:var(--magma-danger-wash-base,var(--status-error-09,255 214 211));--mds-button-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)));fill:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=error]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-danger-wash-strong,var(--status-error-08,254 198 194)));--mds-button-border-color-rgb:var(--magma-danger-wash-strong,var(--status-error-08,254 198 194));--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=error]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=error]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)))}:host([variant=error]):host([tone=text]){--mds-button-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)))}:host([variant=error]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)));--mds-button-background:rgb(var(--magma-danger-wash-soft,var(--status-error-10,255 232 230)))}:host([variant=error]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=light]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=light]):host([tone=strong]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255)}:host([variant=light]):host([tone=weak]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));fill:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=light]):host([tone=weak]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=light]):host([tone=outline]),:host([variant=light]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=light]):host([tone=text]){--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=light]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))))}:host([variant=light]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=dark]){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=dark]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))));--mds-button-border-color-rgb:var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73)))}:host([variant=dark]):host([tone=weak]){--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-button-border-color-rgb:var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));fill:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-button-border-color-rgb:var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=dark]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=text]){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-button-background:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))))}:host([variant=dark]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=google]),:host([variant=google][tone]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-hover-opacity:.5;--mds-button-border-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.2;--mds-button-border-width:calc(var(--spacing,.0025rem)*25);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-button-border-color-rgb:var(--magma-shadow-ink,var(--magma-tint-scale-01,var(--tone-neutral-01,5 5 5)));-webkit-box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0))}:host([variant=google]:hover),:host([variant=google][tone]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-width:var(--mds-button-border-hover-width);--mds-button-border-opacity:var(--mds-button-border-hover-opacity,.75)}:host([variant=apple]) .icon{transform:translateY(-5%)}:host([variant=apple]),:host([variant=apple][tone]){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-border-width:0;--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)))}:host([variant=apple]:hover),:host([variant=apple][tone]:hover){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-border-opacity:1}:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google]),:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google][tone]){--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.3}:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google]:hover),:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google][tone]:hover){--mds-button-border-opacity:.5}:host([tone=outline]),:host([tone=text]){--mds-button-background:#0000}:host([tone=box]),:host([tone=strong]),:host([tone=weak]){--mds-button-border-default-opacity:1;--mds-button-border-width:0;--mds-button-border-opacity:var(--mds-button-border-default-opacity,0)}:host([tone=strong]:hover),:host([tone=strong][active]){--mds-button-border-width:var(--mds-button-border-tone-strong-hover-width,calc(var(--spacing,.0025rem)*50))}:host([tone=weak]:hover),:host([tone=weak][active]){--mds-button-border-width:var(--mds-button-border-tone-weak-hover-width,calc(var(--spacing,.0025rem)*50))}:host([tone=outline]){--mds-button-border-opacity:var(--mds-button-border-tone-outline-opacity)}:host([tone=outline]:hover),:host([tone=outline][active]){--mds-button-background:#0000;--mds-button-border-width:var(--mds-button-border-tone-outline-hover-width,3px);--mds-button-border-opacity:var(--mds-button-border-hover-opacity,.75)}:host([tone=box]){-webkit-box-shadow:var(--shadow-box-solid-strong,#0006 0 2px 4px,#0000004d 0 7px 13px -3px,#00000059 0 -3px 0 inset,#ffffff1a 0 -8px 10px inset,#ffffff26 0 -4px 0 inset);box-shadow:var(--shadow-box-solid-strong,#0006 0 2px 4px,#0000004d 0 7px 13px -3px,#00000059 0 -3px 0 inset,#ffffff1a 0 -8px 10px inset,#ffffff26 0 -4px 0 inset);transition-property:background-color,border-color,box-shadow,color,outline,filter,outline-offset,transform}:host([tone=box]):host(:hover){filter:brightness(1.1)}: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-button-transition-duration:0s}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-color-scheme:dark){:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google]),:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google][tone]){--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.3}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google]:hover),:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google][tone]:hover){--mds-button-border-opacity:.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-button-transition-duration:0s}}`;
|
|
9590
|
+
const mdsButtonCss = () => `@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}@keyframes focus-bounce{0%,75%,to{outline-offset:var(--magma-outline-focus-offset,2px)}50%{outline-offset:var(--magma-outline-blur-offset,6px)}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,mds-spinner,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-button-await-duration:.725s;--mds-button-transition-duration:var(--duration-300,.3s);--private-button-transition-duration:var(--mds-button-transition-duration);--mds-button-background:rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163)));--mds-button-border-hover-opacity:.75;--mds-button-border-high-contrast-hover-width:3px;--mds-button-border-high-contrast-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-tone-outline-hover-width:3px;--mds-button-border-tone-outline-opacity:.3;--mds-button-border-tone-strong-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-tone-weak-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-default-opacity:0;--mds-button-border-opacity:0;--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-gap:calc(var(--spacing,.0025rem)*200);--mds-button-line-clamp:1;--mds-button-radius:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));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));background-color:var(--mds-button-background,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));border-radius:var(--mds-button-radius,var(--magma-radius-2xl,var(--radius-squircle-2xl,40px)));-webkit-box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-sizing:border-box;color:var(--mds-button-color,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));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;corner-shape:var(--mds-button-corner-shape,var(--magma-corner-shape,squircle));align-items:center;align-self:flex-start;cursor:pointer;display:inline-flex;fill:currentColor;gap:var(--mds-button-gap,calc(var(--spacing,.0025rem)*200));justify-content:center;justify-self:flex-start;min-height:calc(var(--spacing,.0025rem)*900);min-width:calc(var(--spacing,.0025rem)*900);padding:0 calc(var(--spacing,.0025rem)*400);position:relative;-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,border-color,box-shadow,color,outline,outline-offset,transform;-webkit-transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));-webkit-user-select:none;user-select:none}:host:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}:host(:focus-visible){--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running;z-index:10}.text{--mds-text-line-clamp:var(--mds-button-line-clamp,1)}.text:first-letter{text-transform:uppercase}.icon{align-items:center;display:inline-flex;fill:inherit;flex-shrink:0;justify-content:center;pointer-events:none;transition-property:fill;-webkit-transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955))}.await,.icon{-webkit-transition-duration:var(--private-button-transition-duration);transition-duration:var(--private-button-transition-duration)}.await{display:none;margin-right:calc(calc(-1 * var(--mds-button-gap,calc(var(--spacing,.0025rem) * 200))) - calc(var(--spacing,.0025rem) * 600));transform:scale(0);transition-behavior:allow-discrete;transition-property:display,margin-right,opacity,transform,width;-webkit-transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955))}.await,.spinner{height:calc(var(--spacing,.0025rem)*600);width:calc(var(--spacing,.0025rem)*600)}.spinner{--mds-spinner-duration:var(--mds-button-await-duration,.725s);color:currentColor}:is(:host(:not([await])),:host([await=false])) .spinner{-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);-webkit-transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94))}:host([await]:not([await=false])) .await{display:flex;margin-right:0;opacity:1;transform:scale(1)}@starting-style{:host([await]:not([await=false])) .await{margin-right:calc(calc(-1 * var(--mds-button-gap,calc(var(--spacing,.0025rem) * 200))) - calc(var(--spacing,.0025rem) * 600));opacity:0;transform:scale(0)}}:host([await]:not([await=false])){pointer-events:none}:host([icon]:not([label])[await]:not([await=false])) .icon{display:none}:host(:disabled:not([disabled=false])),:host([disabled]:not([disabled=false])){opacity:.5;pointer-events:none}:host([size=sm]){--mds-button-radius:var(--magma-radius-md,var(--radius-squircle-md,20px));min-height:calc(var(--spacing,.0025rem)*700);min-width:calc(var(--spacing,.0025rem)*700);padding:0 calc(var(--spacing,.0025rem)*300)}:host([size=sm]) .icon{height:calc(var(--spacing,.0025rem)*400);width:calc(var(--spacing,.0025rem)*400)}:host([size=sm]) .text{--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}:host([size=sm]):host([await]:not([await=false])) .await{transform:scale(.75)}:host([size=md]){min-height:calc(var(--spacing,.0025rem)*900);min-width:calc(var(--spacing,.0025rem)*900);padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*400)}:host([size=md]):host([icon][icon-position=left]){padding-left:calc(var(--spacing,.0025rem)*300)}:host([size=md]):host([icon][icon-position=right]){padding-right:calc(var(--spacing,.0025rem)*300)}:host([size=lg]){min-height:calc(var(--spacing,.0025rem)*1200);min-width:calc(var(--spacing,.0025rem)*1200);padding-left:calc(var(--spacing,.0025rem)*500);padding-right:calc(var(--spacing,.0025rem)*500)}:host([size=lg]):host([icon][icon-position=left]){padding-left:calc(var(--spacing,.0025rem)*400)}:host([size=lg]):host([icon][icon-position=right]){padding-right:calc(var(--spacing,.0025rem)*400)}:host([size=xl]){min-height:calc(var(--spacing,.0025rem)*1300);min-width:calc(var(--spacing,.0025rem)*1300);padding-left:calc(var(--spacing,.0025rem)*600);padding-right:calc(var(--spacing,.0025rem)*600)}:host([size=xl]) .icon{height:calc(var(--spacing,.0025rem)*800);width:calc(var(--spacing,.0025rem)*800)}:host([size][icon][icon-position]:not([label])){aspect-ratio:1;padding:0}:host(:not([label])) .text,:host([label=""]) .text{display:none}:host([variant=primary]){--mds-button-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=primary]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204)))}:host([variant=primary]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-button-border-color-rgb:var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));fill:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=primary]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226))));--mds-button-border-color-rgb:var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226)))}:host([variant=primary]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=primary]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=primary]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=primary]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:host([variant=primary]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]){--mds-button-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=secondary]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204)))}:host([variant=secondary]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-button-border-color-rgb:var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));fill:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=secondary]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226))));--mds-button-border-color-rgb:var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226)))}:host([variant=secondary]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=secondary]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:host([variant=secondary]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=ai]){--mds-button-background:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=ai]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))));--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242)))}:host([variant=ai]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-ai-surface,var(--magma-tint-accent-ai-surface,var(--variant-ai-09,229 218 253))));--mds-button-border-color-rgb:var(--magma-accent-ai-surface,var(--magma-tint-accent-ai-surface,var(--variant-ai-09,229 218 253)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))));fill:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))))}:host([variant=ai]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-ai-surface-hover,var(--magma-tint-accent-ai-surface-hover,var(--variant-ai-08,219 205 252))));--mds-button-border-color-rgb:var(--magma-accent-ai-surface-hover,var(--magma-tint-accent-ai-surface-hover,var(--variant-ai-08,219 205 252)))}:host([variant=ai]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))))}:host([variant=ai]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=ai]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=ai]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-button-background:rgb(var(--magma-accent-ai-surface-subtle,var(--magma-tint-accent-ai-surface-subtle,var(--variant-ai-10,240 234 254))))}:host([variant=ai]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=info]){--mds-button-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=info]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-info-emphasis-hover,var(--status-info-03,0 94 137)));--mds-button-border-color-rgb:var(--magma-info-emphasis-hover,var(--status-info-03,0 94 137))}:host([variant=info]):host([tone=weak]){--mds-button-background:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-button-border-color-rgb:var(--magma-info-wash-base,var(--status-info-09,193 230 246));--mds-button-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)));fill:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=info]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-info-wash-strong,var(--status-info-08,168 219 242)));--mds-button-border-color-rgb:var(--magma-info-wash-strong,var(--status-info-08,168 219 242));--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=info]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=info]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)))}:host([variant=info]):host([tone=text]){--mds-button-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)))}:host([variant=info]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)));--mds-button-background:rgb(var(--magma-info-wash-soft,var(--status-info-10,220 240 250)))}:host([variant=info]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=success]){--mds-button-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=success]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-success-emphasis-hover,var(--status-success-03,0 102 32)));--mds-button-border-color-rgb:var(--magma-success-emphasis-hover,var(--status-success-03,0 102 32))}:host([variant=success]):host([tone=weak]){--mds-button-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-button-border-color-rgb:var(--magma-success-wash-base,var(--status-success-09,191 233 205));--mds-button-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)));fill:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=success]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-success-wash-strong,var(--status-success-08,165 225 186)));--mds-button-border-color-rgb:var(--magma-success-wash-strong,var(--status-success-08,165 225 186));--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=success]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=success]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)))}:host([variant=success]):host([tone=text]){--mds-button-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)))}:host([variant=success]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)));--mds-button-background:rgb(var(--magma-success-wash-soft,var(--status-success-10,220 243 227)))}:host([variant=success]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=warning]){--mds-button-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=warning]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-warning-emphasis-hover,var(--status-warning-03,113 85 0)));--mds-button-border-color-rgb:var(--magma-warning-emphasis-hover,var(--status-warning-03,113 85 0))}:host([variant=warning]):host([tone=weak]){--mds-button-background:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-button-border-color-rgb:var(--magma-warning-wash-base,var(--status-warning-09,255 220 117));--mds-button-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)));fill:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=warning]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-warning-wash-strong,var(--status-warning-08,255 205 57)));--mds-button-border-color-rgb:var(--magma-warning-wash-strong,var(--status-warning-08,255 205 57));--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=warning]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=warning]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)))}:host([variant=warning]):host([tone=text]){--mds-button-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)))}:host([variant=warning]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)));--mds-button-background:rgb(var(--magma-warning-wash-soft,var(--status-warning-10,255 237 181)))}:host([variant=warning]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=error]){--mds-button-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=error]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-danger-emphasis-hover,var(--status-error-03,165 33 40)));--mds-button-border-color-rgb:var(--magma-danger-emphasis-hover,var(--status-error-03,165 33 40))}:host([variant=error]):host([tone=weak]){--mds-button-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-button-border-color-rgb:var(--magma-danger-wash-base,var(--status-error-09,255 214 211));--mds-button-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)));fill:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=error]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-danger-wash-strong,var(--status-error-08,254 198 194)));--mds-button-border-color-rgb:var(--magma-danger-wash-strong,var(--status-error-08,254 198 194));--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=error]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=error]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)))}:host([variant=error]):host([tone=text]){--mds-button-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)))}:host([variant=error]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)));--mds-button-background:rgb(var(--magma-danger-wash-soft,var(--status-error-10,255 232 230)))}:host([variant=error]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=light]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=light]):host([tone=strong]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255)}:host([variant=light]):host([tone=weak]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));fill:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=light]):host([tone=weak]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=light]):host([tone=outline]),:host([variant=light]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=light]):host([tone=text]){--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=light]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))))}:host([variant=light]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=dark]){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=dark]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))));--mds-button-border-color-rgb:var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73)))}:host([variant=dark]):host([tone=weak]){--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-button-border-color-rgb:var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));fill:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-button-border-color-rgb:var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=dark]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=text]){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-button-background:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))))}:host([variant=dark]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=google]),:host([variant=google][tone]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-hover-opacity:.5;--mds-button-border-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.2;--mds-button-border-width:calc(var(--spacing,.0025rem)*25);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-button-border-color-rgb:var(--magma-shadow-ink,var(--magma-tint-scale-01,var(--tone-neutral-01,5 5 5)));-webkit-box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0))}:host([variant=google]:hover),:host([variant=google][tone]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-width:var(--mds-button-border-hover-width);--mds-button-border-opacity:var(--mds-button-border-hover-opacity,.75)}:host([variant=apple]) .icon{transform:translateY(-5%)}:host([variant=apple]),:host([variant=apple][tone]){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-border-width:0;--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)))}:host([variant=apple]:hover),:host([variant=apple][tone]:hover){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-border-opacity:1}:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google]),:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google][tone]){--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.3}:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google]:hover),:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google][tone]:hover){--mds-button-border-opacity:.5}:host([tone=outline]),:host([tone=text]){--mds-button-background:#0000}:host([tone=box]),:host([tone=strong]),:host([tone=weak]){--mds-button-border-default-opacity:1;--mds-button-border-width:0;--mds-button-border-opacity:var(--mds-button-border-default-opacity,0)}:host([tone=strong]:hover),:host([tone=strong][active]){--mds-button-border-width:var(--mds-button-border-tone-strong-hover-width,calc(var(--spacing,.0025rem)*50))}:host([tone=weak]:hover),:host([tone=weak][active]){--mds-button-border-width:var(--mds-button-border-tone-weak-hover-width,calc(var(--spacing,.0025rem)*50))}:host([tone=outline]){--mds-button-border-opacity:var(--mds-button-border-tone-outline-opacity)}:host([tone=outline]:hover),:host([tone=outline][active]){--mds-button-background:#0000;--mds-button-border-width:var(--mds-button-border-tone-outline-hover-width,3px);--mds-button-border-opacity:var(--mds-button-border-hover-opacity,.75)}:host([tone=box]){-webkit-box-shadow:var(--shadow-box-solid-strong,#0006 0 2px 4px,#0000004d 0 7px 13px -3px,#00000059 0 -3px 0 inset,#ffffff1a 0 -8px 10px inset,#ffffff26 0 -4px 0 inset);box-shadow:var(--shadow-box-solid-strong,#0006 0 2px 4px,#0000004d 0 7px 13px -3px,#00000059 0 -3px 0 inset,#ffffff1a 0 -8px 10px inset,#ffffff26 0 -4px 0 inset);transition-property:background-color,border-color,box-shadow,color,outline,filter,outline-offset,transform}:host([tone=box]):host(:hover){filter:brightness(1.1)}: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-button-transition-duration:0s}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-color-scheme:dark){:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google]),:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google][tone]){--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.3}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google]:hover),:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google][tone]:hover){--mds-button-border-opacity:.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-button-transition-duration:0s}}`;
|
|
9550
9591
|
|
|
9551
9592
|
/**
|
|
9552
9593
|
* @slot - Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here.
|
|
@@ -9597,9 +9638,9 @@ class MdsButton {
|
|
|
9597
9638
|
*/
|
|
9598
9639
|
this.truncate = 'word';
|
|
9599
9640
|
this.handleRequestSubmitForm = (e) => {
|
|
9600
|
-
var _a;
|
|
9601
9641
|
e.preventDefault();
|
|
9602
|
-
(
|
|
9642
|
+
if (this.internals.form)
|
|
9643
|
+
requestSubmitAs(this.internals.form, this.name, this.value);
|
|
9603
9644
|
};
|
|
9604
9645
|
this.handleReset = (e) => {
|
|
9605
9646
|
var _a;
|
|
@@ -9751,7 +9792,7 @@ class MdsButton {
|
|
|
9751
9792
|
render() {
|
|
9752
9793
|
var _a;
|
|
9753
9794
|
this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
|
|
9754
|
-
return (hAsync(Host, { key: '
|
|
9795
|
+
return (hAsync(Host, { key: 'c27de85281e3ace66ba8a53167b67d4f1ec8725d', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preferenceStore.state.animation, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: 'e4642dba90a570dcf2c3d3dba5d4a3694eee8028', class: "await" }, hAsync("mds-spinner", { key: 'aa4c2d008c48f9ca33834e608b99cbdc8b56b380', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (hAsync("mds-icon", { key: '92d622bf8018c97d73ee6c2b95b1e3276100d158', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), hAsync("mds-text", { key: '5520e63cd5a770afa1af19f3dc0e50e7dd0bfaeb', class: "text", part: "label", tag: "span", typography: this.typography, truncate: this.truncate, animation: this.animation, text: this.label }, this.label || hAsync("slot", { key: '50195d714a1e773a0d81f386b2a897b3c3df1d57', onSlotchange: this.onSlotChangeHandler })), hAsync("slot", { key: '1610d40e7923b9256a78055c3fe39afc4ff930fe', name: "notification" }), this.icon && this.iconPosition === 'right' && (hAsync("mds-icon", { key: 'b9154cbef4d9b5c50379e2b620bedef32e60ec0c', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }))));
|
|
9755
9796
|
}
|
|
9756
9797
|
static get formAssociated() { return true; }
|
|
9757
9798
|
get host() { return getElement(this); }
|
|
@@ -9785,6 +9826,8 @@ class MdsButton {
|
|
|
9785
9826
|
"icon": [1537],
|
|
9786
9827
|
"iconPosition": [513, "icon-position"],
|
|
9787
9828
|
"type": [513],
|
|
9829
|
+
"name": [513],
|
|
9830
|
+
"value": [513],
|
|
9788
9831
|
"variant": [513],
|
|
9789
9832
|
"tone": [513],
|
|
9790
9833
|
"size": [513],
|
|
@@ -9797,7 +9840,7 @@ class MdsButton {
|
|
|
9797
9840
|
},
|
|
9798
9841
|
"$listeners$": undefined,
|
|
9799
9842
|
"$lazyBundleId$": "-",
|
|
9800
|
-
"$attrsToReflect$": [["label", "label"], ["animation", "animation"], ["icon", "icon"], ["iconPosition", "icon-position"], ["type", "type"], ["variant", "variant"], ["tone", "tone"], ["size", "size"], ["active", "active"], ["disabled", "disabled"], ["await", "await"], ["href", "href"], ["truncate", "truncate"]]
|
|
9843
|
+
"$attrsToReflect$": [["label", "label"], ["animation", "animation"], ["icon", "icon"], ["iconPosition", "icon-position"], ["type", "type"], ["name", "name"], ["value", "value"], ["variant", "variant"], ["tone", "tone"], ["size", "size"], ["active", "active"], ["disabled", "disabled"], ["await", "await"], ["href", "href"], ["truncate", "truncate"]]
|
|
9801
9844
|
}; }
|
|
9802
9845
|
}
|
|
9803
9846
|
|
|
@@ -9811,10 +9854,22 @@ const mdsButtonDropdownCss = () => `@layer reset,vendor,theme,base,components,ut
|
|
|
9811
9854
|
class MdsButtonDropdown {
|
|
9812
9855
|
constructor(hostRef) {
|
|
9813
9856
|
registerInstance(this, hostRef);
|
|
9857
|
+
this.clickEvent = createEvent(this, "mdsButtonDropdownClick", 7);
|
|
9858
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
9859
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
9860
|
+
}
|
|
9861
|
+
else {
|
|
9862
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
9863
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
9864
|
+
}
|
|
9865
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
9866
|
+
// around it, which disables the host but not the buttons in its shadow root
|
|
9867
|
+
this.formDisabled = false;
|
|
9814
9868
|
/**
|
|
9815
|
-
* The type of the
|
|
9869
|
+
* The type of the primary action: with `'submit'` or `'reset'` it submits or resets the form
|
|
9870
|
+
* the component is in, the chevron never does. Unlike `mds-button` it defaults to `'button'`
|
|
9816
9871
|
*/
|
|
9817
|
-
this.type = '
|
|
9872
|
+
this.type = 'button';
|
|
9818
9873
|
/**
|
|
9819
9874
|
* Specifies the color variant for the button
|
|
9820
9875
|
*/
|
|
@@ -9835,19 +9890,42 @@ class MdsButtonDropdown {
|
|
|
9835
9890
|
* Specifies if the text shoud be truncated or should behave as a normal text
|
|
9836
9891
|
*/
|
|
9837
9892
|
this.truncate = 'word';
|
|
9893
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
9894
|
+
this.primaryActionClick = () => {
|
|
9895
|
+
var _a;
|
|
9896
|
+
if (this.isDisabled() || this.await)
|
|
9897
|
+
return;
|
|
9898
|
+
this.clickEvent.emit();
|
|
9899
|
+
const { form } = this.internals;
|
|
9900
|
+
// a link navigates instead, from the button itself
|
|
9901
|
+
if (!form || ((_a = this.href) !== null && _a !== void 0 ? _a : '') !== '')
|
|
9902
|
+
return;
|
|
9903
|
+
if (this.type === 'submit') {
|
|
9904
|
+
requestSubmitAs(form, this.name, this.value);
|
|
9905
|
+
}
|
|
9906
|
+
else if (this.type === 'reset') {
|
|
9907
|
+
form.reset();
|
|
9908
|
+
}
|
|
9909
|
+
};
|
|
9910
|
+
}
|
|
9911
|
+
formDisabledCallback(disabled) {
|
|
9912
|
+
this.formDisabled = disabled;
|
|
9838
9913
|
}
|
|
9839
9914
|
render() {
|
|
9840
|
-
return (hAsync(Host, { key: '
|
|
9915
|
+
return (hAsync(Host, { key: 'f82475fbdff387ee0f3fd5ea6c491020402d82a4' }, hAsync("mds-button", { key: '654f45dd78a89904ceca9112b010027912e0af0b', active: this.active, autoFocus: this.autoFocus, class: "dropdown-primary-action", await: this.await, disabled: this.isDisabled(), href: this.href, icon: this.icon, onClick: this.primaryActionClick, size: this.size, target: this.target, tone: this.tone, variant: this.variant, label: this.label }), hAsync("mds-button", { key: 'db9a5a8d8052ea29d09c2f6ced702b6606a9e208', active: this.active, autoFocus: this.autoFocus, await: this.await, class: "dropdown-action", disabled: this.isDisabled(), href: this.href, icon: miBaselineKeyboardArrowDown, size: this.size, target: this.target, tone: this.tone, variant: this.variant }), hAsync("mds-dropdown", { key: '0a37f731ee4322c3470de48de010e78a2a14dde3', target: ".dropdown-action", part: "dropdown" }, hAsync("slot", { key: '10a9170285f0d4bc50e44766842277c1db64d96e' }))));
|
|
9841
9916
|
}
|
|
9917
|
+
static get formAssociated() { return true; }
|
|
9842
9918
|
static get style() { return mdsButtonDropdownCss(); }
|
|
9843
9919
|
static get cmpMeta() { return {
|
|
9844
|
-
"$flags$":
|
|
9920
|
+
"$flags$": 329,
|
|
9845
9921
|
"$tagName$": "mds-button-dropdown",
|
|
9846
9922
|
"$members$": {
|
|
9847
9923
|
"label": [1],
|
|
9848
9924
|
"autoFocus": [4, "auto-focus"],
|
|
9849
9925
|
"icon": [1537],
|
|
9850
9926
|
"type": [513],
|
|
9927
|
+
"name": [513],
|
|
9928
|
+
"value": [513],
|
|
9851
9929
|
"variant": [513],
|
|
9852
9930
|
"tone": [513],
|
|
9853
9931
|
"size": [513],
|
|
@@ -9856,11 +9934,12 @@ class MdsButtonDropdown {
|
|
|
9856
9934
|
"await": [1540],
|
|
9857
9935
|
"href": [513],
|
|
9858
9936
|
"target": [1],
|
|
9859
|
-
"truncate": [513]
|
|
9937
|
+
"truncate": [513],
|
|
9938
|
+
"formDisabled": [32]
|
|
9860
9939
|
},
|
|
9861
9940
|
"$listeners$": undefined,
|
|
9862
9941
|
"$lazyBundleId$": "-",
|
|
9863
|
-
"$attrsToReflect$": [["icon", "icon"], ["type", "type"], ["variant", "variant"], ["tone", "tone"], ["size", "size"], ["active", "active"], ["disabled", "disabled"], ["await", "await"], ["href", "href"], ["truncate", "truncate"]]
|
|
9942
|
+
"$attrsToReflect$": [["icon", "icon"], ["type", "type"], ["name", "name"], ["value", "value"], ["variant", "variant"], ["tone", "tone"], ["size", "size"], ["active", "active"], ["disabled", "disabled"], ["await", "await"], ["href", "href"], ["truncate", "truncate"]]
|
|
9864
9943
|
}; }
|
|
9865
9944
|
}
|
|
9866
9945
|
|
|
@@ -18843,22 +18922,22 @@ class MdsCardMedia {
|
|
|
18843
18922
|
var miBaselineCancel = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10s10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17L12 13.41L8.41 17L7 15.59L10.59 12L7 8.41L8.41 7L12 10.59L15.59 7L17 8.41L13.41 12L17 15.59z"/></svg>`;
|
|
18844
18923
|
|
|
18845
18924
|
const deleteLabel$7 = "Αφαίρεση";
|
|
18846
|
-
var localeEl$
|
|
18925
|
+
var localeEl$v = {
|
|
18847
18926
|
deleteLabel: deleteLabel$7
|
|
18848
18927
|
};
|
|
18849
18928
|
|
|
18850
18929
|
const deleteLabel$6 = "Remove";
|
|
18851
|
-
var localeEn$
|
|
18930
|
+
var localeEn$v = {
|
|
18852
18931
|
deleteLabel: deleteLabel$6
|
|
18853
18932
|
};
|
|
18854
18933
|
|
|
18855
18934
|
const deleteLabel$5 = "Eliminar";
|
|
18856
|
-
var localeEs$
|
|
18935
|
+
var localeEs$v = {
|
|
18857
18936
|
deleteLabel: deleteLabel$5
|
|
18858
18937
|
};
|
|
18859
18938
|
|
|
18860
18939
|
const deleteLabel$4 = "Rimuovi";
|
|
18861
|
-
var localeIt$
|
|
18940
|
+
var localeIt$w = {
|
|
18862
18941
|
deleteLabel: deleteLabel$4
|
|
18863
18942
|
};
|
|
18864
18943
|
|
|
@@ -18872,10 +18951,10 @@ class MdsChip {
|
|
|
18872
18951
|
this.selectEvent = createEvent(this, "mdsChipSelect", 7);
|
|
18873
18952
|
this.km = new KeyboardManager();
|
|
18874
18953
|
this.t = new Locale$1({
|
|
18875
|
-
el: localeEl$
|
|
18876
|
-
en: localeEn$
|
|
18877
|
-
es: localeEs$
|
|
18878
|
-
it: localeIt$
|
|
18954
|
+
el: localeEl$v,
|
|
18955
|
+
en: localeEn$v,
|
|
18956
|
+
es: localeEs$v,
|
|
18957
|
+
it: localeIt$w,
|
|
18879
18958
|
});
|
|
18880
18959
|
/**
|
|
18881
18960
|
* Sets the component disabled status
|
|
@@ -19132,8 +19211,8 @@ var arrowSvg$1 = `<svg width="30" height="16" viewBox="0 0 30 16" xmlns="http://
|
|
|
19132
19211
|
const sides = ['top', 'right', 'bottom', 'left'];
|
|
19133
19212
|
const alignments = ['start', 'end'];
|
|
19134
19213
|
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
19135
|
-
const min = Math.min;
|
|
19136
|
-
const max = Math.max;
|
|
19214
|
+
const min$4 = Math.min;
|
|
19215
|
+
const max$4 = Math.max;
|
|
19137
19216
|
const round = Math.round;
|
|
19138
19217
|
const floor = Math.floor;
|
|
19139
19218
|
const createCoords = v => ({
|
|
@@ -19147,7 +19226,7 @@ const oppositeSideMap = {
|
|
|
19147
19226
|
top: 'bottom'
|
|
19148
19227
|
};
|
|
19149
19228
|
function clamp$1(start, value, end) {
|
|
19150
|
-
return max(start, min(value, end));
|
|
19229
|
+
return max$4(start, min$4(value, end));
|
|
19151
19230
|
}
|
|
19152
19231
|
function evaluate(value, param) {
|
|
19153
19232
|
return typeof value === 'function' ? value(param) : value;
|
|
@@ -19523,8 +19602,8 @@ const arrow$1 = options => ({
|
|
|
19523
19602
|
// If the padding is large enough that it causes the arrow to no longer be
|
|
19524
19603
|
// centered, modify the padding so that it is centered.
|
|
19525
19604
|
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
19526
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
19527
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
19605
|
+
const minPadding = min$4(paddingObject[minProp], largestPossiblePadding);
|
|
19606
|
+
const maxPadding = min$4(paddingObject[maxProp], largestPossiblePadding);
|
|
19528
19607
|
|
|
19529
19608
|
// Make sure the arrow doesn't overflow the floating element if the center
|
|
19530
19609
|
// point is outside the floating element's bounds.
|
|
@@ -20311,12 +20390,12 @@ function getDocumentRect(element) {
|
|
|
20311
20390
|
const html = getDocumentElement(element);
|
|
20312
20391
|
const scroll = getNodeScroll(element);
|
|
20313
20392
|
const body = element.ownerDocument.body;
|
|
20314
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
20315
|
-
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
20393
|
+
const width = max$4(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
20394
|
+
const height = max$4(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
20316
20395
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
20317
20396
|
const y = -scroll.scrollTop;
|
|
20318
20397
|
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
20319
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
20398
|
+
x += max$4(html.clientWidth, body.clientWidth) - width;
|
|
20320
20399
|
}
|
|
20321
20400
|
return {
|
|
20322
20401
|
width,
|
|
@@ -20443,10 +20522,10 @@ function getClippingRect(_ref) {
|
|
|
20443
20522
|
const firstClippingAncestor = clippingAncestors[0];
|
|
20444
20523
|
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
20445
20524
|
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
20446
|
-
accRect.top = max(rect.top, accRect.top);
|
|
20447
|
-
accRect.right = min(rect.right, accRect.right);
|
|
20448
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
20449
|
-
accRect.left = max(rect.left, accRect.left);
|
|
20525
|
+
accRect.top = max$4(rect.top, accRect.top);
|
|
20526
|
+
accRect.right = min$4(rect.right, accRect.right);
|
|
20527
|
+
accRect.bottom = min$4(rect.bottom, accRect.bottom);
|
|
20528
|
+
accRect.left = max$4(rect.left, accRect.left);
|
|
20450
20529
|
return accRect;
|
|
20451
20530
|
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
20452
20531
|
return {
|
|
@@ -20623,7 +20702,7 @@ function observeMove(element, onMove) {
|
|
|
20623
20702
|
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
20624
20703
|
const options = {
|
|
20625
20704
|
rootMargin,
|
|
20626
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
20705
|
+
threshold: max$4(0, min$4(1, threshold)) || 1
|
|
20627
20706
|
};
|
|
20628
20707
|
let isFirstUpdate = true;
|
|
20629
20708
|
function handleObserve(entries) {
|
|
@@ -36477,22 +36556,22 @@ var miBaselineFileDownloadDone = `<svg xmlns="http://www.w3.org/2000/svg" width=
|
|
|
36477
36556
|
var miOutlineFileDownload = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59L7 11l5 5l5-5z"/></svg>`;
|
|
36478
36557
|
|
|
36479
36558
|
const alreadyDownloaded$3 = "Έχετε ήδη κατεβάσει αυτό το αρχείο";
|
|
36480
|
-
var localeEl$
|
|
36559
|
+
var localeEl$u = {
|
|
36481
36560
|
alreadyDownloaded: alreadyDownloaded$3
|
|
36482
36561
|
};
|
|
36483
36562
|
|
|
36484
36563
|
const alreadyDownloaded$2 = "You have already downloaded this file";
|
|
36485
|
-
var localeEn$
|
|
36564
|
+
var localeEn$u = {
|
|
36486
36565
|
alreadyDownloaded: alreadyDownloaded$2
|
|
36487
36566
|
};
|
|
36488
36567
|
|
|
36489
36568
|
const alreadyDownloaded$1 = "Ya has descargado este archivo";
|
|
36490
|
-
var localeEs$
|
|
36569
|
+
var localeEs$u = {
|
|
36491
36570
|
alreadyDownloaded: alreadyDownloaded$1
|
|
36492
36571
|
};
|
|
36493
36572
|
|
|
36494
36573
|
const alreadyDownloaded = "Hai già scaricato questo file";
|
|
36495
|
-
var localeIt$
|
|
36574
|
+
var localeIt$v = {
|
|
36496
36575
|
alreadyDownloaded: alreadyDownloaded
|
|
36497
36576
|
};
|
|
36498
36577
|
|
|
@@ -36510,7 +36589,7 @@ const documentMS$3 = "Έγγραφο Microsoft Word";
|
|
|
36510
36589
|
const documentRTF$3 = "Έγγραφο μορφής εμπλουτισμένου κειμένου";
|
|
36511
36590
|
const documentTXT$3 = "Απλό έγγραφο κειμένου";
|
|
36512
36591
|
const documentWeb$3 = "Ιστοσελίδα";
|
|
36513
|
-
const email$
|
|
36592
|
+
const email$7 = "Ηλεκτρονικό ταχυδρομείο";
|
|
36514
36593
|
const extensibleMarkupLanguage$3 = "Γλώσσα σήμανσης για δεδομένα";
|
|
36515
36594
|
const fileAI$3 = "Διανυσματικό αρχείο Adobe Illustrator";
|
|
36516
36595
|
const fileDB$3 = "Αρχείο βάσης δεδομένων";
|
|
@@ -36553,7 +36632,7 @@ var fileDescriptionLocaleEl = {
|
|
|
36553
36632
|
documentRTF: documentRTF$3,
|
|
36554
36633
|
documentTXT: documentTXT$3,
|
|
36555
36634
|
documentWeb: documentWeb$3,
|
|
36556
|
-
email: email$
|
|
36635
|
+
email: email$7,
|
|
36557
36636
|
extensibleMarkupLanguage: extensibleMarkupLanguage$3,
|
|
36558
36637
|
fileAI: fileAI$3,
|
|
36559
36638
|
fileDB: fileDB$3,
|
|
@@ -36597,7 +36676,7 @@ const documentMS$2 = "Microsoft Word Document";
|
|
|
36597
36676
|
const documentRTF$2 = "Rich Text Format Document";
|
|
36598
36677
|
const documentTXT$2 = "Plain Text Document";
|
|
36599
36678
|
const documentWeb$2 = "Web Page";
|
|
36600
|
-
const email$
|
|
36679
|
+
const email$6 = "E-mail";
|
|
36601
36680
|
const extensibleMarkupLanguage$2 = "Markup language for data";
|
|
36602
36681
|
const fileAI$2 = "Adobe Illustrator Vector File";
|
|
36603
36682
|
const fileDB$2 = "Database File";
|
|
@@ -36640,7 +36719,7 @@ var fileDescriptionLocaleEn = {
|
|
|
36640
36719
|
documentRTF: documentRTF$2,
|
|
36641
36720
|
documentTXT: documentTXT$2,
|
|
36642
36721
|
documentWeb: documentWeb$2,
|
|
36643
|
-
email: email$
|
|
36722
|
+
email: email$6,
|
|
36644
36723
|
extensibleMarkupLanguage: extensibleMarkupLanguage$2,
|
|
36645
36724
|
fileAI: fileAI$2,
|
|
36646
36725
|
fileDB: fileDB$2,
|
|
@@ -36684,7 +36763,7 @@ const documentMS$1 = "Documento de Microsoft Word";
|
|
|
36684
36763
|
const documentRTF$1 = "Documento de formato de texto enriquecido";
|
|
36685
36764
|
const documentTXT$1 = "Documento de texto sin formato";
|
|
36686
36765
|
const documentWeb$1 = "Página web";
|
|
36687
|
-
const email$
|
|
36766
|
+
const email$5 = "Correo electrónico";
|
|
36688
36767
|
const extensibleMarkupLanguage$1 = "Lenguaje de marcado para datos";
|
|
36689
36768
|
const fileAI$1 = "Archivo vectorial de Adobe Illustrator";
|
|
36690
36769
|
const fileDB$1 = "Archivo de base de datos";
|
|
@@ -36727,7 +36806,7 @@ var fileDescriptionLocaleEs = {
|
|
|
36727
36806
|
documentRTF: documentRTF$1,
|
|
36728
36807
|
documentTXT: documentTXT$1,
|
|
36729
36808
|
documentWeb: documentWeb$1,
|
|
36730
|
-
email: email$
|
|
36809
|
+
email: email$5,
|
|
36731
36810
|
extensibleMarkupLanguage: extensibleMarkupLanguage$1,
|
|
36732
36811
|
fileAI: fileAI$1,
|
|
36733
36812
|
fileDB: fileDB$1,
|
|
@@ -36771,7 +36850,7 @@ const documentMS = "Documento di testo Microsoft Word";
|
|
|
36771
36850
|
const documentRTF = "Documento di testo Rich Text Format";
|
|
36772
36851
|
const documentTXT = "Documento di testo senza formattazione";
|
|
36773
36852
|
const documentWeb = "Pagina web";
|
|
36774
|
-
const email = "E-mail";
|
|
36853
|
+
const email$4 = "E-mail";
|
|
36775
36854
|
const extensibleMarkupLanguage = "Linguaggio markup per dati";
|
|
36776
36855
|
const fileAI = "File vettoriale Adobe Illustrator";
|
|
36777
36856
|
const fileDB = "File di database";
|
|
@@ -36814,7 +36893,7 @@ var fileDescriptionLocaleIt = {
|
|
|
36814
36893
|
documentRTF: documentRTF,
|
|
36815
36894
|
documentTXT: documentTXT,
|
|
36816
36895
|
documentWeb: documentWeb,
|
|
36817
|
-
email: email,
|
|
36896
|
+
email: email$4,
|
|
36818
36897
|
extensibleMarkupLanguage: extensibleMarkupLanguage,
|
|
36819
36898
|
fileAI: fileAI,
|
|
36820
36899
|
fileDB: fileDB,
|
|
@@ -36852,10 +36931,10 @@ class MdsFile {
|
|
|
36852
36931
|
registerInstance(this, hostRef);
|
|
36853
36932
|
this.downloadedEvent = createEvent(this, "mdsFileDownload", 7);
|
|
36854
36933
|
this.t = new Locale$1({
|
|
36855
|
-
el: Object.assign(Object.assign({}, localeEl$
|
|
36856
|
-
en: Object.assign(Object.assign({}, localeEn$
|
|
36857
|
-
es: Object.assign(Object.assign({}, localeEs$
|
|
36858
|
-
it: Object.assign(Object.assign({}, localeIt$
|
|
36934
|
+
el: Object.assign(Object.assign({}, localeEl$u), fileDescriptionLocaleEl),
|
|
36935
|
+
en: Object.assign(Object.assign({}, localeEn$u), fileDescriptionLocaleEn),
|
|
36936
|
+
es: Object.assign(Object.assign({}, localeEs$u), fileDescriptionLocaleEs),
|
|
36937
|
+
it: Object.assign(Object.assign({}, localeIt$v), fileDescriptionLocaleIt),
|
|
36859
36938
|
});
|
|
36860
36939
|
this.wasDownloaded = false;
|
|
36861
36940
|
/**
|
|
@@ -37114,22 +37193,22 @@ const STRINGS = {
|
|
|
37114
37193
|
}
|
|
37115
37194
|
|
|
37116
37195
|
const remove$a = "Αφαιρέστε το αρχείο από την ουρά μεταφόρτωσης";
|
|
37117
|
-
var localeEl$
|
|
37196
|
+
var localeEl$t = {
|
|
37118
37197
|
remove: remove$a
|
|
37119
37198
|
};
|
|
37120
37199
|
|
|
37121
37200
|
const remove$9 = "Remove file from upload queue";
|
|
37122
|
-
var localeEn$
|
|
37201
|
+
var localeEn$t = {
|
|
37123
37202
|
remove: remove$9
|
|
37124
37203
|
};
|
|
37125
37204
|
|
|
37126
37205
|
const remove$8 = "Eliminar archivo de la cola de carga";
|
|
37127
|
-
var localeEs$
|
|
37206
|
+
var localeEs$t = {
|
|
37128
37207
|
remove: remove$8
|
|
37129
37208
|
};
|
|
37130
37209
|
|
|
37131
37210
|
const remove$7 = "Rimuovi file dalla coda di upload";
|
|
37132
|
-
var localeIt$
|
|
37211
|
+
var localeIt$u = {
|
|
37133
37212
|
remove: remove$7
|
|
37134
37213
|
};
|
|
37135
37214
|
|
|
@@ -37141,10 +37220,10 @@ class MdsFilePreview {
|
|
|
37141
37220
|
this.downloadedEvent = createEvent(this, "mdsFileDownload", 7);
|
|
37142
37221
|
this.deletedEvent = createEvent(this, "mdsFileDelete", 7);
|
|
37143
37222
|
this.t = new Locale$1({
|
|
37144
|
-
el: Object.assign(Object.assign({}, localeEl$
|
|
37145
|
-
en: Object.assign(Object.assign({}, localeEn$
|
|
37146
|
-
es: Object.assign(Object.assign({}, localeEs$
|
|
37147
|
-
it: Object.assign(Object.assign({}, localeIt$
|
|
37223
|
+
el: Object.assign(Object.assign({}, localeEl$t), fileDescriptionLocaleEl),
|
|
37224
|
+
en: Object.assign(Object.assign({}, localeEn$t), fileDescriptionLocaleEn),
|
|
37225
|
+
es: Object.assign(Object.assign({}, localeEs$t), fileDescriptionLocaleEs),
|
|
37226
|
+
it: Object.assign(Object.assign({}, localeIt$u), fileDescriptionLocaleIt),
|
|
37148
37227
|
});
|
|
37149
37228
|
/**
|
|
37150
37229
|
* Truncates the filename shown
|
|
@@ -38391,22 +38470,22 @@ class MdsIcon {
|
|
|
38391
38470
|
var miBaselineBrokenImage = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M21 5v6.59l-3-3.01l-4 4.01l-4-4l-4 4l-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42l3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99l4-4l4 4l4-3.99z"/></svg>`;
|
|
38392
38471
|
|
|
38393
38472
|
const clickToLoad$3 = "Φόρτωση εικόνας";
|
|
38394
|
-
var localeEl$
|
|
38473
|
+
var localeEl$s = {
|
|
38395
38474
|
clickToLoad: clickToLoad$3
|
|
38396
38475
|
};
|
|
38397
38476
|
|
|
38398
38477
|
const clickToLoad$2 = "Load image";
|
|
38399
|
-
var localeEn$
|
|
38478
|
+
var localeEn$s = {
|
|
38400
38479
|
clickToLoad: clickToLoad$2
|
|
38401
38480
|
};
|
|
38402
38481
|
|
|
38403
38482
|
const clickToLoad$1 = "Cargar imagen";
|
|
38404
|
-
var localeEs$
|
|
38483
|
+
var localeEs$s = {
|
|
38405
38484
|
clickToLoad: clickToLoad$1
|
|
38406
38485
|
};
|
|
38407
38486
|
|
|
38408
38487
|
const clickToLoad = "Carica immagine";
|
|
38409
|
-
var localeIt$
|
|
38488
|
+
var localeIt$t = {
|
|
38410
38489
|
clickToLoad: clickToLoad
|
|
38411
38490
|
};
|
|
38412
38491
|
|
|
@@ -38421,10 +38500,10 @@ class MdsImg {
|
|
|
38421
38500
|
this.imageError = false;
|
|
38422
38501
|
this.consumptionMode = 'high';
|
|
38423
38502
|
this.t = new Locale$1({
|
|
38424
|
-
el: localeEl$
|
|
38425
|
-
en: localeEn$
|
|
38426
|
-
es: localeEs$
|
|
38427
|
-
it: localeIt$
|
|
38503
|
+
el: localeEl$s,
|
|
38504
|
+
en: localeEn$s,
|
|
38505
|
+
es: localeEs$s,
|
|
38506
|
+
it: localeIt$t,
|
|
38428
38507
|
});
|
|
38429
38508
|
/**
|
|
38430
38509
|
* Specifies an alternate text for an image
|
|
@@ -38576,22 +38655,196 @@ var miOutlineMicOff = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height
|
|
|
38576
38655
|
|
|
38577
38656
|
var miBaselineDone = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19L21 7l-1.4-1.4L9 16.2z"/></svg>`;
|
|
38578
38657
|
|
|
38658
|
+
const cardNumber$3 = "Εισαγάγετε έναν έγκυρο αριθμό κάρτας.";
|
|
38659
|
+
const email$3 = "Εισαγάγετε μια διεύθυνση email.";
|
|
38660
|
+
const invalid$3 = "Εισαγάγετε μια έγκυρη τιμή.";
|
|
38661
|
+
const invalidDate$3 = "Εισαγάγετε μια έγκυρη ημερομηνία.";
|
|
38662
|
+
const max$3 = "Η τιμή πρέπει να είναι το πολύ {{max}}.";
|
|
38663
|
+
const maxDate$3 = "Η ημερομηνία δεν μπορεί να είναι μετά τις {{max}}.";
|
|
38664
|
+
const maxlength$3 = [
|
|
38665
|
+
"Χρησιμοποιήστε το πολύ {{maxlength}} χαρακτήρα.",
|
|
38666
|
+
"Χρησιμοποιήστε το πολύ {{maxlength}} χαρακτήρες."
|
|
38667
|
+
];
|
|
38668
|
+
const min$3 = "Η τιμή πρέπει να είναι τουλάχιστον {{min}}.";
|
|
38669
|
+
const minDate$3 = "Η ημερομηνία δεν μπορεί να είναι πριν από τις {{min}}.";
|
|
38670
|
+
const minlength$3 = [
|
|
38671
|
+
"Χρησιμοποιήστε τουλάχιστον {{minlength}} χαρακτήρα.",
|
|
38672
|
+
"Χρησιμοποιήστε τουλάχιστον {{minlength}} χαρακτήρες."
|
|
38673
|
+
];
|
|
38674
|
+
const pattern$3 = "Χρησιμοποιήστε τη μορφή που ζητείται.";
|
|
38675
|
+
const required$7 = "Συμπληρώστε αυτό το πεδίο.";
|
|
38676
|
+
const requiredSelect$3 = "Επιλέξτε ένα στοιχείο από τη λίστα.";
|
|
38677
|
+
const url$3 = "Εισαγάγετε μια διεύθυνση URL.";
|
|
38678
|
+
const vatNumber$3 = "Εισαγάγετε έναν έγκυρο αριθμό ΦΠΑ.";
|
|
38679
|
+
var localeEl$r = {
|
|
38680
|
+
cardNumber: cardNumber$3,
|
|
38681
|
+
email: email$3,
|
|
38682
|
+
invalid: invalid$3,
|
|
38683
|
+
invalidDate: invalidDate$3,
|
|
38684
|
+
max: max$3,
|
|
38685
|
+
maxDate: maxDate$3,
|
|
38686
|
+
maxlength: maxlength$3,
|
|
38687
|
+
min: min$3,
|
|
38688
|
+
minDate: minDate$3,
|
|
38689
|
+
minlength: minlength$3,
|
|
38690
|
+
pattern: pattern$3,
|
|
38691
|
+
required: required$7,
|
|
38692
|
+
requiredSelect: requiredSelect$3,
|
|
38693
|
+
url: url$3,
|
|
38694
|
+
vatNumber: vatNumber$3
|
|
38695
|
+
};
|
|
38696
|
+
|
|
38697
|
+
const cardNumber$2 = "Enter a valid card number.";
|
|
38698
|
+
const email$2 = "Enter an email address.";
|
|
38699
|
+
const invalid$2 = "Enter a valid value.";
|
|
38700
|
+
const invalidDate$2 = "Enter a valid date.";
|
|
38701
|
+
const max$2 = "The value must be {{max}} or less.";
|
|
38702
|
+
const maxDate$2 = "The date must be {{max}} or earlier.";
|
|
38703
|
+
const maxlength$2 = [
|
|
38704
|
+
"Use at most {{maxlength}} character.",
|
|
38705
|
+
"Use at most {{maxlength}} characters."
|
|
38706
|
+
];
|
|
38707
|
+
const min$2 = "The value must be {{min}} or more.";
|
|
38708
|
+
const minDate$2 = "The date must be {{min}} or later.";
|
|
38709
|
+
const minlength$2 = [
|
|
38710
|
+
"Use at least {{minlength}} character.",
|
|
38711
|
+
"Use at least {{minlength}} characters."
|
|
38712
|
+
];
|
|
38713
|
+
const pattern$2 = "Match the requested format.";
|
|
38714
|
+
const required$6 = "Fill in this field.";
|
|
38715
|
+
const requiredSelect$2 = "Select an item in the list.";
|
|
38716
|
+
const url$2 = "Enter a URL.";
|
|
38717
|
+
const vatNumber$2 = "Enter a valid VAT number.";
|
|
38718
|
+
var localeEn$r = {
|
|
38719
|
+
cardNumber: cardNumber$2,
|
|
38720
|
+
email: email$2,
|
|
38721
|
+
invalid: invalid$2,
|
|
38722
|
+
invalidDate: invalidDate$2,
|
|
38723
|
+
max: max$2,
|
|
38724
|
+
maxDate: maxDate$2,
|
|
38725
|
+
maxlength: maxlength$2,
|
|
38726
|
+
min: min$2,
|
|
38727
|
+
minDate: minDate$2,
|
|
38728
|
+
minlength: minlength$2,
|
|
38729
|
+
pattern: pattern$2,
|
|
38730
|
+
required: required$6,
|
|
38731
|
+
requiredSelect: requiredSelect$2,
|
|
38732
|
+
url: url$2,
|
|
38733
|
+
vatNumber: vatNumber$2
|
|
38734
|
+
};
|
|
38735
|
+
|
|
38736
|
+
const cardNumber$1 = "Introduce un número de tarjeta válido.";
|
|
38737
|
+
const email$1 = "Introduce una dirección de correo electrónico.";
|
|
38738
|
+
const invalid$1 = "Introduce un valor válido.";
|
|
38739
|
+
const invalidDate$1 = "Introduce una fecha válida.";
|
|
38740
|
+
const max$1 = "El valor debe ser como máximo {{max}}.";
|
|
38741
|
+
const maxDate$1 = "La fecha no puede ser posterior al {{max}}.";
|
|
38742
|
+
const maxlength$1 = [
|
|
38743
|
+
"Usa como máximo {{maxlength}} carácter.",
|
|
38744
|
+
"Usa como máximo {{maxlength}} caracteres."
|
|
38745
|
+
];
|
|
38746
|
+
const min$1 = "El valor debe ser como mínimo {{min}}.";
|
|
38747
|
+
const minDate$1 = "La fecha no puede ser anterior al {{min}}.";
|
|
38748
|
+
const minlength$1 = [
|
|
38749
|
+
"Usa al menos {{minlength}} carácter.",
|
|
38750
|
+
"Usa al menos {{minlength}} caracteres."
|
|
38751
|
+
];
|
|
38752
|
+
const pattern$1 = "Usa el formato solicitado.";
|
|
38753
|
+
const required$5 = "Completa este campo.";
|
|
38754
|
+
const requiredSelect$1 = "Selecciona un elemento de la lista.";
|
|
38755
|
+
const url$1 = "Introduce una URL.";
|
|
38756
|
+
const vatNumber$1 = "Introduce un número de IVA válido.";
|
|
38757
|
+
var localeEs$r = {
|
|
38758
|
+
cardNumber: cardNumber$1,
|
|
38759
|
+
email: email$1,
|
|
38760
|
+
invalid: invalid$1,
|
|
38761
|
+
invalidDate: invalidDate$1,
|
|
38762
|
+
max: max$1,
|
|
38763
|
+
maxDate: maxDate$1,
|
|
38764
|
+
maxlength: maxlength$1,
|
|
38765
|
+
min: min$1,
|
|
38766
|
+
minDate: minDate$1,
|
|
38767
|
+
minlength: minlength$1,
|
|
38768
|
+
pattern: pattern$1,
|
|
38769
|
+
required: required$5,
|
|
38770
|
+
requiredSelect: requiredSelect$1,
|
|
38771
|
+
url: url$1,
|
|
38772
|
+
vatNumber: vatNumber$1
|
|
38773
|
+
};
|
|
38774
|
+
|
|
38775
|
+
const cardNumber = "Inserisci un numero di carta valido.";
|
|
38776
|
+
const email = "Inserisci un indirizzo email.";
|
|
38777
|
+
const invalid = "Inserisci un valore valido.";
|
|
38778
|
+
const invalidDate = "Inserisci una data valida.";
|
|
38779
|
+
const max = "Il valore deve essere al massimo {{max}}.";
|
|
38780
|
+
const maxDate = "La data non può essere successiva al {{max}}.";
|
|
38781
|
+
const maxlength = [
|
|
38782
|
+
"Usa al massimo {{maxlength}} carattere.",
|
|
38783
|
+
"Usa al massimo {{maxlength}} caratteri."
|
|
38784
|
+
];
|
|
38785
|
+
const min = "Il valore deve essere almeno {{min}}.";
|
|
38786
|
+
const minDate = "La data non può essere precedente al {{min}}.";
|
|
38787
|
+
const minlength = [
|
|
38788
|
+
"Usa almeno {{minlength}} carattere.",
|
|
38789
|
+
"Usa almeno {{minlength}} caratteri."
|
|
38790
|
+
];
|
|
38791
|
+
const pattern = "Rispetta il formato richiesto.";
|
|
38792
|
+
const required$4 = "Compila questo campo.";
|
|
38793
|
+
const requiredSelect = "Seleziona un elemento dell'elenco.";
|
|
38794
|
+
const url = "Inserisci un URL.";
|
|
38795
|
+
const vatNumber = "Inserisci una partita IVA valida.";
|
|
38796
|
+
var localeIt$s = {
|
|
38797
|
+
cardNumber: cardNumber,
|
|
38798
|
+
email: email,
|
|
38799
|
+
invalid: invalid,
|
|
38800
|
+
invalidDate: invalidDate,
|
|
38801
|
+
max: max,
|
|
38802
|
+
maxDate: maxDate,
|
|
38803
|
+
maxlength: maxlength,
|
|
38804
|
+
min: min,
|
|
38805
|
+
minDate: minDate,
|
|
38806
|
+
minlength: minlength,
|
|
38807
|
+
pattern: pattern,
|
|
38808
|
+
required: required$4,
|
|
38809
|
+
requiredSelect: requiredSelect,
|
|
38810
|
+
url: url,
|
|
38811
|
+
vatNumber: vatNumber
|
|
38812
|
+
};
|
|
38813
|
+
|
|
38814
|
+
const flags = {
|
|
38815
|
+
cardNumber: 'typeMismatch',
|
|
38816
|
+
email: 'typeMismatch',
|
|
38817
|
+
invalid: 'customError',
|
|
38818
|
+
invalidDate: 'badInput',
|
|
38819
|
+
max: 'rangeOverflow',
|
|
38820
|
+
maxDate: 'rangeOverflow',
|
|
38821
|
+
maxlength: 'tooLong',
|
|
38822
|
+
min: 'rangeUnderflow',
|
|
38823
|
+
minDate: 'rangeUnderflow',
|
|
38824
|
+
minlength: 'tooShort',
|
|
38825
|
+
pattern: 'patternMismatch',
|
|
38826
|
+
required: 'valueMissing',
|
|
38827
|
+
requiredSelect: 'valueMissing',
|
|
38828
|
+
url: 'typeMismatch',
|
|
38829
|
+
vatNumber: 'typeMismatch',
|
|
38830
|
+
};
|
|
38831
|
+
const messages = new Locale$1({ el: localeEl$r, en: localeEn$r, es: localeEs$r, it: localeIt$s });
|
|
38832
|
+
/** The message of a problem, in the language of the page. */
|
|
38833
|
+
const validityMessage = ({ rule, context, message }) => message || messages.get(rule, context);
|
|
38579
38834
|
/**
|
|
38580
|
-
*
|
|
38581
|
-
*
|
|
38582
|
-
*
|
|
38583
|
-
*
|
|
38584
|
-
*
|
|
38835
|
+
* Reports to the form the problem of a form-associated component, or clears it when there is
|
|
38836
|
+
* none: like a native control, an invalid component matches `:invalid` and stops the submit of
|
|
38837
|
+
* its form, which shows the message next to the anchor and focuses it.
|
|
38838
|
+
* @param internals the ElementInternals of the component
|
|
38839
|
+
* @param problem the rule the value breaks, `undefined` when the value is valid
|
|
38840
|
+
* @param anchor the control of the shadow tree the browser points the message at
|
|
38585
38841
|
*/
|
|
38586
|
-
const
|
|
38587
|
-
if (
|
|
38588
|
-
internals
|
|
38589
|
-
|
|
38590
|
-
};
|
|
38591
|
-
const setValidity = (internals, flags, message, anchor) => {
|
|
38592
|
-
if (typeof (internals === null || internals === void 0 ? void 0 : internals.setValidity) === 'function') {
|
|
38593
|
-
internals.setValidity(flags, message, anchor);
|
|
38842
|
+
const updateValidity = (internals, problem, anchor) => {
|
|
38843
|
+
if (problem === undefined) {
|
|
38844
|
+
setValidity(internals, {});
|
|
38845
|
+
return;
|
|
38594
38846
|
}
|
|
38847
|
+
setValidity(internals, { [flags[problem.rule]]: true }, validityMessage(problem), anchor);
|
|
38595
38848
|
};
|
|
38596
38849
|
|
|
38597
38850
|
const decrease$3 = "Μείωση";
|
|
@@ -38708,6 +38961,97 @@ const minLenghtValidator = (length) => {
|
|
|
38708
38961
|
: null;
|
|
38709
38962
|
};
|
|
38710
38963
|
};
|
|
38964
|
+
// the flag the browsers compile the pattern attribute with: v in the current HTML spec, u before it
|
|
38965
|
+
const patternFlags = (() => {
|
|
38966
|
+
try {
|
|
38967
|
+
return RegExp('', 'v').flags;
|
|
38968
|
+
}
|
|
38969
|
+
catch (_a) {
|
|
38970
|
+
return 'u';
|
|
38971
|
+
}
|
|
38972
|
+
})();
|
|
38973
|
+
/**
|
|
38974
|
+
* The rule of the `pattern` attribute of a native input: the whole value matches the expression.
|
|
38975
|
+
* An expression that does not compile sets no rule, as in the browser: `null` then.
|
|
38976
|
+
*/
|
|
38977
|
+
const patternValidator = (pattern) => {
|
|
38978
|
+
let expression;
|
|
38979
|
+
try {
|
|
38980
|
+
expression = new RegExp(`^(?:${pattern})$`, patternFlags);
|
|
38981
|
+
}
|
|
38982
|
+
catch (_a) {
|
|
38983
|
+
return null;
|
|
38984
|
+
}
|
|
38985
|
+
return (input) => {
|
|
38986
|
+
if (input === '')
|
|
38987
|
+
return null; // don't validate empty values to allow optional controls
|
|
38988
|
+
return expression.test(input) ? null : { pattern: 'formato non valido' };
|
|
38989
|
+
};
|
|
38990
|
+
};
|
|
38991
|
+
// the valid email address of the HTML spec, the one a native type="email" checks
|
|
38992
|
+
const emailExpression = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
38993
|
+
const emailValidatorFn = (input) => {
|
|
38994
|
+
if (input === '')
|
|
38995
|
+
return null; // don't validate empty values to allow optional controls
|
|
38996
|
+
return emailExpression.test(input) ? null : { email: 'indirizzo email non valido' };
|
|
38997
|
+
};
|
|
38998
|
+
// a native type="url" accepts an absolute URL, the one the URL parser reads without a base
|
|
38999
|
+
const urlValidatorFn = (input) => {
|
|
39000
|
+
if (input === '')
|
|
39001
|
+
return null; // don't validate empty values to allow optional controls
|
|
39002
|
+
try {
|
|
39003
|
+
new URL(input);
|
|
39004
|
+
return null;
|
|
39005
|
+
}
|
|
39006
|
+
catch (_a) {
|
|
39007
|
+
return { url: 'url non valido' };
|
|
39008
|
+
}
|
|
39009
|
+
};
|
|
39010
|
+
/**
|
|
39011
|
+
* An Italian partita IVA: 11 digits, the last one the check digit of the first ten (the digits in
|
|
39012
|
+
* odd position summed as they are, the ones in even position doubled, minus 9 above 9).
|
|
39013
|
+
*/
|
|
39014
|
+
const pivaValidatorFn = (input) => {
|
|
39015
|
+
if (input === '')
|
|
39016
|
+
return null; // don't validate empty values to allow optional controls
|
|
39017
|
+
const error = { piva: 'partita iva non valida' };
|
|
39018
|
+
if (!/^\d{11}$/.test(input))
|
|
39019
|
+
return error;
|
|
39020
|
+
const digits = input.split('').map(Number);
|
|
39021
|
+
const sum = digits.slice(0, 10).reduce((total, digit, index) => {
|
|
39022
|
+
if (index % 2 === 0)
|
|
39023
|
+
return total + digit;
|
|
39024
|
+
const doubled = digit * 2;
|
|
39025
|
+
return total + (doubled > 9 ? doubled - 9 : doubled);
|
|
39026
|
+
}, 0);
|
|
39027
|
+
return (10 - (sum % 10)) % 10 === digits[10] ? null : error;
|
|
39028
|
+
};
|
|
39029
|
+
/**
|
|
39030
|
+
* A payment card number: 13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn
|
|
39031
|
+
* check.
|
|
39032
|
+
*/
|
|
39033
|
+
const ccValidatorFn = (input) => {
|
|
39034
|
+
if (input === '')
|
|
39035
|
+
return null; // don't validate empty values to allow optional controls
|
|
39036
|
+
const error = { cc: 'numero di carta non valido' };
|
|
39037
|
+
if (!/^\d+(?:[ -]\d+)*$/.test(input))
|
|
39038
|
+
return error;
|
|
39039
|
+
const digits = input.replace(/[ -]/g, '');
|
|
39040
|
+
if (digits.length < 13 || digits.length > 19)
|
|
39041
|
+
return error;
|
|
39042
|
+
// from the right, every second digit doubled, minus 9 above 9
|
|
39043
|
+
const sum = digits
|
|
39044
|
+
.split('')
|
|
39045
|
+
.reverse()
|
|
39046
|
+
.map(Number)
|
|
39047
|
+
.reduce((total, digit, index) => {
|
|
39048
|
+
if (index % 2 === 0)
|
|
39049
|
+
return total + digit;
|
|
39050
|
+
const doubled = digit * 2;
|
|
39051
|
+
return total + (doubled > 9 ? doubled - 9 : doubled);
|
|
39052
|
+
}, 0);
|
|
39053
|
+
return sum % 10 === 0 ? null : error;
|
|
39054
|
+
};
|
|
38711
39055
|
const isbnValidatorFn = (input) => {
|
|
38712
39056
|
if (input === '')
|
|
38713
39057
|
return null; // don't validate empty values to allow optional controls
|
|
@@ -38757,11 +39101,18 @@ class Validator {
|
|
|
38757
39101
|
removeValidator(validator) {
|
|
38758
39102
|
this._validators = this._validators.filter((v) => !this._hasValidator(validator, v));
|
|
38759
39103
|
}
|
|
38760
|
-
|
|
39104
|
+
/**
|
|
39105
|
+
* Returns the errors of a value without storing them: `errors` and `isValid` keep the ones of
|
|
39106
|
+
* the last `validate`.
|
|
39107
|
+
*/
|
|
39108
|
+
check(value) {
|
|
38761
39109
|
const res = this._validators
|
|
38762
39110
|
.map((v) => v(value))
|
|
38763
39111
|
.reduce((prev, curr) => (Object.assign(Object.assign({}, prev), curr)), NullValidator);
|
|
38764
|
-
|
|
39112
|
+
return Object.keys(res).length === 0 ? null : res;
|
|
39113
|
+
}
|
|
39114
|
+
validate(value) {
|
|
39115
|
+
this._errors = this.check(value);
|
|
38765
39116
|
this.isValid = !this._errors;
|
|
38766
39117
|
}
|
|
38767
39118
|
get errors() {
|
|
@@ -38811,11 +39162,17 @@ function createInputValidationManager(type) {
|
|
|
38811
39162
|
case 'tel':
|
|
38812
39163
|
inputManager = new InputValidationManager('');
|
|
38813
39164
|
break;
|
|
39165
|
+
case 'email':
|
|
39166
|
+
inputManager = new InputValidationManager('');
|
|
39167
|
+
inputManager.validator.addValidator(emailValidatorFn);
|
|
39168
|
+
break;
|
|
38814
39169
|
case 'url':
|
|
38815
39170
|
inputManager = new InputValidationManager('');
|
|
39171
|
+
inputManager.validator.addValidator(urlValidatorFn);
|
|
38816
39172
|
break;
|
|
38817
39173
|
case 'cc':
|
|
38818
39174
|
inputManager = new InputValidationManager(InputMaskPattern.CC_MASK);
|
|
39175
|
+
inputManager.validator.addValidator(ccValidatorFn);
|
|
38819
39176
|
break;
|
|
38820
39177
|
case 'cf':
|
|
38821
39178
|
inputManager = new InputValidationManager(InputMaskPattern.CF_MASK);
|
|
@@ -38840,6 +39197,7 @@ function createInputValidationManager(type) {
|
|
|
38840
39197
|
break;
|
|
38841
39198
|
case 'piva':
|
|
38842
39199
|
inputManager = new InputValidationManager('');
|
|
39200
|
+
inputManager.validator.addValidator(pivaValidatorFn);
|
|
38843
39201
|
break;
|
|
38844
39202
|
default:
|
|
38845
39203
|
inputManager = new InputValidationManager('');
|
|
@@ -38847,6 +39205,42 @@ function createInputValidationManager(type) {
|
|
|
38847
39205
|
return inputManager;
|
|
38848
39206
|
}
|
|
38849
39207
|
|
|
39208
|
+
// the validators of the type carry an Italian message: the form gets the localized one instead
|
|
39209
|
+
const typeErrors = ['cf-length', 'cf-regex', 'isbn-error'];
|
|
39210
|
+
/**
|
|
39211
|
+
* The problem reported to the form for the errors of a value. The first validator that fails
|
|
39212
|
+
* decides it: the ones of the type come first, then required, max, min, maxlength, minlength,
|
|
39213
|
+
* pattern and the custom ones last, which keep their own message.
|
|
39214
|
+
*/
|
|
39215
|
+
const validityProblem = (errors, value, constraints) => {
|
|
39216
|
+
const [key] = Object.keys(errors);
|
|
39217
|
+
switch (key) {
|
|
39218
|
+
case 'required':
|
|
39219
|
+
return { rule: 'required' };
|
|
39220
|
+
case 'max':
|
|
39221
|
+
return { rule: 'max', context: { max: constraints.max } };
|
|
39222
|
+
case 'min':
|
|
39223
|
+
return { rule: 'min', context: { min: constraints.min } };
|
|
39224
|
+
// the maxlength and minlength validators share this key
|
|
39225
|
+
case 'minLenght':
|
|
39226
|
+
return constraints.maxlength !== undefined && value.length > constraints.maxlength
|
|
39227
|
+
? { rule: 'maxlength', context: { maxlength: constraints.maxlength } }
|
|
39228
|
+
: { rule: 'minlength', context: { minlength: constraints.minlength } };
|
|
39229
|
+
case 'pattern':
|
|
39230
|
+
return { rule: 'pattern' };
|
|
39231
|
+
case 'email':
|
|
39232
|
+
return { rule: 'email' };
|
|
39233
|
+
case 'url':
|
|
39234
|
+
return { rule: 'url' };
|
|
39235
|
+
case 'piva':
|
|
39236
|
+
return { rule: 'vatNumber' };
|
|
39237
|
+
case 'cc':
|
|
39238
|
+
return { rule: 'cardNumber' };
|
|
39239
|
+
default:
|
|
39240
|
+
return { rule: 'invalid', message: typeErrors.includes(key) ? undefined : errors[key] };
|
|
39241
|
+
}
|
|
39242
|
+
};
|
|
39243
|
+
|
|
38850
39244
|
const mdsInputCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-icon,mds-input-tip,mds-input-tip-item,mds-spinner):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-background:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-placeholder-default-color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-placeholder-focus-color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-placeholder-hover-color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));--mds-input-ring:0 0 0 1px rgb(var(--mds-input-variant-color-rgb,0 0 0)/.1);--mds-input-shadow:0 1px 3px 0 rgb(var(--mds-input-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-variant-color-rgb,0 0 0)/.06);--mds-input-textarea-field-sizing:content;--mds-input-textarea-resize:none;--mds-input-textarea-max-height:calc(var(--spacing,.0025rem)*6400);--mds-input-textarea-min-height:calc(var(--spacing,.0025rem)*2400);--mds-input-tip-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))));--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-variant-color-rgb:var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204)));--mds-input-border-radius:var(--magma-radius-xl,var(--radius-squircle-xl,36px));--mds-input-transition-duration:var(--duration-300,.3s);--mds-input-controls-border:2px solid rgb(var(--magma-border-muted,var(--magma-tint-border-muted,var(--border-neutral-muted,219 219 219))));--mds-input-controls-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--private-input-transition-duration:var(--mds-input-transition-duration);border-radius:var(--mds-input-border-radius);corner-shape:var(--magma-corner-shape,squircle);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));gap:calc(var(--spacing,.0025rem)*200);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;container-type:inline-size;display:flex;position:relative;--mds-input-icon-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-variant-color-rgb:0 0 0}:host([typography=detail]) .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}:host([typography=snippet]) .input{font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.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;background-color:var(--mds-input-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border-radius:inherit;-webkit-box-shadow:var(--mds-input-ring),var(--mds-input-shadow);box-shadow:var(--mds-input-ring),var(--mds-input-shadow);box-sizing:border-box;color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));corner-shape:inherit;border:0;margin:0;max-width:100%;min-height:3rem;overflow:hidden;padding:calc(var(--spacing,.0025rem)*300) calc(var(--spacing,.0025rem)*400);text-overflow:ellipsis;-webkit-transition-duration:var(--private-input-transition-duration);transition-duration:var(--private-input-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,margin,opacity,padding,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));width:100%}.input::-webkit-input-placeholder{color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input:-ms-placeholder-shown{color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));transition-duration:var(--duration-300,.3s);transition-property:color;transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input::-moz-placeholder{color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));transition-duration:var(--duration-300,.3s);transition-property:color;transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input::placeholder{color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input:hover::placeholder{color:var(--mds-input-placeholder-hover-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.input:hover:-ms-placeholder-shown{color:var(--mds-input-placeholder-hover-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.input:focus::placeholder{color:var(--mds-input-placeholder-focus-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.input:focus:-ms-placeholder-shown{color:var(--mds-input-placeholder-focus-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.input::-webkit-inner-spin-button,.input::-webkit-outer-spin-button{appearance:none;display:none;margin:0}:host textarea.input,:host([typography]) textarea.input{border-radius:var(--mds-input-border-radius);field-sizing:var(--mds-input-textarea-field-sizing,content);max-height:var(--mds-input-textarea-max-height,calc(var(--spacing,.0025rem)*6400));min-height:var(--mds-input-textarea-min-height,calc(var(--spacing,.0025rem)*2400));overflow:auto;resize:var(--mds-input-textarea-resize,none)}@container style(--mds-input-textarea-resize:none){:host textarea.input,:host([typography]) textarea.input{border-bottom-right-radius:0}}.input:focus{--tw-outline-style:none;outline-style:none;--mds-input-ring:0 0 0 3px rgb(var(--mds-input-variant-color-rgb,0 0 0)/1);--mds-input-shadow:0 4px 6px 3px rgb(var(--mds-input-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-variant-color-rgb,0 0 0)/.06)}.input:disabled{background-color:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))))}.input:disabled::placeholder{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input:disabled:-ms-placeholder-shown{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input:disabled::-moz-placeholder{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input.has-icon{padding-left:calc(var(--spacing,.0025rem)*1100)}.input.has-right-icon{padding-right:calc(var(--spacing,.0025rem)*1100)}.await,.icon{fill:var(--mds-input-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));left:calc(var(--spacing,.0025rem)*300);position:absolute;top:calc(var(--spacing,.0025rem)*300)}.await{color:var(--mds-input-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));height:24px;width:24px}.counter{border-left:var(--mds-input-controls-border);display:flex;flex-direction:column;gap:0;position:absolute;right:0}.counter-button{aspect-ratio:unset;border:0;border-radius:var(--mds-input-border-radius);fill:var(--mds-input-controls-color);height:calc(var(--spacing,.0025rem)*600);min-height:0;width:calc(var(--spacing,.0025rem)*700)}.counter .counter-button:first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mds-input-border-radius)}.counter .counter-button:last-child{border-bottom-left-radius:0;border-bottom-right-radius:var(--mds-input-border-radius);border-top-left-radius:0;border-top-right-radius:0}.counter-button--horizontal{bottom:0;height:calc(var(--spacing,.0025rem)*1200);position:absolute;top:0;width:calc(var(--spacing,.0025rem)*1200)}.counter-button--decrease{border-bottom-right-radius:0;border-right:var(--mds-input-controls-border);border-top-right-radius:0;left:0}.counter-button--increase{border-bottom-left-radius:0;border-left:var(--mds-input-controls-border);border-top-left-radius:0;right:0}.mic-toggle-button,.password-toggle-button{fill:var(--mds-input-controls-color);position:absolute;right:calc(var(--spacing,.0025rem)*150);top:calc(var(--spacing,.0025rem)*150)}.toggle-button--error{cursor:help;fill:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.mic-toggle-button--recording{animation:var(--animate-pulse,pulse 2s cubic-bezier(.4,0,.6,1) infinite)}:host([type=number]) .input{-moz-appearance:textfield;padding-right:calc(var(--spacing,.0025rem)*800)}:host([type=number][controls-layout=horizontal]) .input{padding-left:calc(var(--spacing,.0025rem)*1400);padding-right:calc(var(--spacing,.0025rem)*1400);text-align:center}:host([type=number][controls-layout=horizontal][icon]) .input{padding-left:calc(var(--spacing,.0025rem)*2400);text-align:left}:host([type=number][controls-layout=horizontal]) .icon{left:calc(var(--spacing,.0025rem)*1500)}:host([type=password]) .input{padding-right:calc(var(--spacing,.0025rem)*1000)}:host([type=password]) .input[type=text]:not(:-moz-placeholder-shown){font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([type=password]) .input[type=text]:not(:-ms-placeholder-shown){font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([type=password]) .input[type=text]:not(:placeholder-shown){font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([type=cf]) .input{font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:uppercase}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}:host(:focus){--mds-input-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-variant-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([variant=ai]){--mds-input-icon-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-input-tip-background:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-variant-color-rgb:0 0 0}:host([variant=ai]:focus){--mds-input-icon-color:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-variant-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)))}:host([variant=info]){--mds-input-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-variant-color-rgb:0 0 0}:host([variant=info]:focus){--mds-input-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-variant-color-rgb:0 0 0}:host([variant=success]:focus){--mds-input-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-variant-color-rgb:0 0 0}:host([variant=warning]:focus){--mds-input-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-variant-color-rgb:0 0 0}:host([variant=error]:focus){--mds-input-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-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-transition-duration:0s}:host([pref-contrast=more]){--mds-input-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:host([pref-contrast=more]) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([pref-contrast=more]) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-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])) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}.password-mask{background-color:var(--mds-input-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border-bottom-left-radius:inherit;border-bottom-right-radius:0;border-top-left-radius:inherit;corner-shape:inherit;align-items:center;border-top-right-radius:0;bottom:0;display:flex;gap:calc(var(--spacing,.0025rem)*50);height:100%;justify-content:start;left:0;overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*500);pointer-events:none;position:absolute;right:calc(var(--spacing,.0025rem)*1200);top:0}.password-mask:before{background-image:-webkit-gradient(linear,left top,right top,from(#0000),to(var(--mds-input-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))))));background-image:linear-gradient(to right,#0000,var(--mds-input-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))))));bottom:0;content:"";display:inline-flex;position:absolute;right:0;top:0;width:calc(var(--spacing,.0025rem)*600)}.password-mask-items{background-color:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))/0);display:inline-flex;gap:calc(var(--spacing,.0025rem)*100);padding:calc(var(--spacing,.0025rem)*100)}.password-mask-item,.password-mask-items{border-radius:var(--radius-full,1000px);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:background-color;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.password-mask-item{background-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));height:calc(var(--spacing,.0025rem)*200);width:calc(var(--spacing,.0025rem)*200)}:host(:focus-within) .password-mask-items{background-color:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}@keyframes pulse{50%{opacity:.5}}@media (forced-colors:active){.input:focus{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-transition-duration:0s}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::-webkit-input-placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-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]))) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}}`;
|
|
38851
39245
|
|
|
38852
39246
|
class MdsInput {
|
|
@@ -38865,19 +39259,29 @@ class MdsInput {
|
|
|
38865
39259
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
38866
39260
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
38867
39261
|
}
|
|
39262
|
+
// the value at load, which a form reset brings back as the value attribute of a native input
|
|
39263
|
+
this.defaultValue = '';
|
|
39264
|
+
// replaced by buildValidation on load, a valid empty set before
|
|
39265
|
+
this.inputValidation = createInputValidationManager('text');
|
|
39266
|
+
// the validators added through addValidator, kept apart so that a rebuild of the rules keeps them
|
|
39267
|
+
this.customValidators = [];
|
|
39268
|
+
// true once a blur has validated the field and driven its variant
|
|
39269
|
+
this.validated = false;
|
|
38868
39270
|
this.speechToTextLabelKey = 'speechToTextOn';
|
|
38869
39271
|
this.speechToTextIcon = miOutlineMic;
|
|
38870
39272
|
this.hasFocus = false;
|
|
38871
39273
|
this.isRecording = false;
|
|
38872
39274
|
this.countVariant = 'count-empty';
|
|
38873
39275
|
this.isPasswordVisible = false;
|
|
38874
|
-
// private valuePristine?: string
|
|
38875
39276
|
this.t = new Locale$1({
|
|
38876
39277
|
el: localeEl$q,
|
|
38877
39278
|
en: localeEn$q,
|
|
38878
39279
|
es: localeEs$q,
|
|
38879
39280
|
it: localeIt$r,
|
|
38880
39281
|
});
|
|
39282
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
39283
|
+
// around it, which disables the host but not the native control in its shadow root
|
|
39284
|
+
this.formDisabled = false;
|
|
38881
39285
|
/**
|
|
38882
39286
|
* Specifies whether the element should have autocomplete enabled
|
|
38883
39287
|
*/
|
|
@@ -38926,6 +39330,9 @@ class MdsInput {
|
|
|
38926
39330
|
* Specifies the value of the input element
|
|
38927
39331
|
*/
|
|
38928
39332
|
this.value = '';
|
|
39333
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
39334
|
+
// the user can change the value: the buttons that change it (steppers, mic) follow it
|
|
39335
|
+
this.canEdit = () => !this.isDisabled() && !this.readonly;
|
|
38929
39336
|
this.countMaxLength = () => {
|
|
38930
39337
|
var _a, _b, _c;
|
|
38931
39338
|
if (this.maxlength === undefined || this.maxlength === 0 || Number.isNaN(this.maxlength))
|
|
@@ -38962,6 +39369,8 @@ class MdsInput {
|
|
|
38962
39369
|
this.value = input.value;
|
|
38963
39370
|
setFormValue(this.internals, this.value);
|
|
38964
39371
|
}
|
|
39372
|
+
};
|
|
39373
|
+
this.onKeyDown = (ev) => {
|
|
38965
39374
|
this.keyDownEvent.emit(ev);
|
|
38966
39375
|
};
|
|
38967
39376
|
this.onBlur = () => {
|
|
@@ -38983,18 +39392,21 @@ class MdsInput {
|
|
|
38983
39392
|
}
|
|
38984
39393
|
};
|
|
38985
39394
|
this.stepUp = () => {
|
|
38986
|
-
if (this.nativeInput &&
|
|
39395
|
+
if (this.nativeInput && this.canEdit()) {
|
|
38987
39396
|
this.nativeInput.stepUp();
|
|
38988
39397
|
this.value = this.nativeInput.value;
|
|
38989
39398
|
}
|
|
38990
39399
|
};
|
|
38991
39400
|
this.stepDown = () => {
|
|
38992
|
-
if (this.nativeInput &&
|
|
39401
|
+
if (this.nativeInput && this.canEdit()) {
|
|
38993
39402
|
this.nativeInput.stepDown();
|
|
38994
39403
|
this.value = this.nativeInput.value;
|
|
38995
39404
|
}
|
|
38996
39405
|
};
|
|
38997
39406
|
this.toggleTextRecognition = () => {
|
|
39407
|
+
// a dictation can always be stopped, started only where the user can change the value
|
|
39408
|
+
if (!this.isRecording && !this.canEdit())
|
|
39409
|
+
return;
|
|
38998
39410
|
this.isRecording = !this.isRecording;
|
|
38999
39411
|
if (!this.isRecording) {
|
|
39000
39412
|
this.speechToTextLabelKey = 'speechToTextOn';
|
|
@@ -39025,11 +39437,12 @@ class MdsInput {
|
|
|
39025
39437
|
const SpeechRecognition =
|
|
39026
39438
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39027
39439
|
(_c = window.SpeechRecognition) !== null && _c !== void 0 ? _c : window.webkitSpeechRecognition;
|
|
39028
|
-
this.value = '';
|
|
39029
39440
|
if (!SpeechRecognition) {
|
|
39030
39441
|
this.onSpeechRecognitionError();
|
|
39031
39442
|
return;
|
|
39032
39443
|
}
|
|
39444
|
+
// the dictation replaces the value, once it can start
|
|
39445
|
+
this.value = '';
|
|
39033
39446
|
this.recognition = new SpeechRecognition();
|
|
39034
39447
|
this.recognition.continuous = true;
|
|
39035
39448
|
this.recognition.lang = navigator.language || 'it-IT';
|
|
@@ -39039,6 +39452,12 @@ class MdsInput {
|
|
|
39039
39452
|
let progress = 0; // need to save position progress on speech results
|
|
39040
39453
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39041
39454
|
this.recognition.onresult = (event) => {
|
|
39455
|
+
// the field was disabled or made read-only while dictating
|
|
39456
|
+
if (!this.canEdit()) {
|
|
39457
|
+
if (this.isRecording)
|
|
39458
|
+
this.toggleTextRecognition();
|
|
39459
|
+
return;
|
|
39460
|
+
}
|
|
39042
39461
|
const speechResult = event.results;
|
|
39043
39462
|
const interimResult = speechResult[progress];
|
|
39044
39463
|
if (interimResult.isFinal) {
|
|
@@ -39063,15 +39482,27 @@ class MdsInput {
|
|
|
39063
39482
|
}
|
|
39064
39483
|
};
|
|
39065
39484
|
}
|
|
39485
|
+
formDisabledCallback(disabled) {
|
|
39486
|
+
this.formDisabled = disabled;
|
|
39487
|
+
}
|
|
39488
|
+
/**
|
|
39489
|
+
* Like a native input, a form reset brings back the value of load and forgets the validation
|
|
39490
|
+
* shown on blur: the field looks pristine until the next blur.
|
|
39491
|
+
*/
|
|
39066
39492
|
formResetCallback() {
|
|
39067
|
-
|
|
39493
|
+
const validated = this.validated;
|
|
39494
|
+
this.validated = false;
|
|
39495
|
+
this.isValid = !(this.required && this.defaultValue === '');
|
|
39496
|
+
this.value = this.defaultValue;
|
|
39497
|
+
if (validated)
|
|
39498
|
+
this.variant = 'primary';
|
|
39068
39499
|
}
|
|
39069
39500
|
connectedCallback() {
|
|
39070
39501
|
this.datalistId = `datalist-${hashRandomValue()}`;
|
|
39071
39502
|
}
|
|
39072
39503
|
componentWillLoad() {
|
|
39073
|
-
|
|
39074
|
-
|
|
39504
|
+
var _a, _b, _c;
|
|
39505
|
+
this.defaultValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
|
|
39075
39506
|
// If the mds-input has a tabindex attribute we get the value
|
|
39076
39507
|
// and pass it down to the native input, then remove it from the
|
|
39077
39508
|
// mds-input to avoid causing tabbing twice on the same element
|
|
@@ -39080,31 +39511,109 @@ class MdsInput {
|
|
|
39080
39511
|
this.tabindex = tabindex !== null ? parseInt(tabindex) : undefined;
|
|
39081
39512
|
this.el.removeAttribute('tabindex');
|
|
39082
39513
|
}
|
|
39083
|
-
setFormValue(this.internals, (
|
|
39514
|
+
setFormValue(this.internals, (_b = this.value) !== null && _b !== void 0 ? _b : null);
|
|
39084
39515
|
this.maxLengthChanged(this.maxlength);
|
|
39085
|
-
this.
|
|
39516
|
+
this.buildValidation();
|
|
39517
|
+
this.isValid = !(this.required && ((_c = this.value) !== null && _c !== void 0 ? _c : '') === '');
|
|
39086
39518
|
}
|
|
39087
39519
|
componentDidLoad() {
|
|
39088
|
-
var _a, _b
|
|
39089
|
-
this.inputValidation = createInputValidationManager(this.type);
|
|
39090
|
-
this.setValidators();
|
|
39091
|
-
(_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.setAttribute('pattern', String(this.inputValidation.pattern));
|
|
39520
|
+
var _a, _b;
|
|
39092
39521
|
if (this.autofocus) {
|
|
39093
|
-
(
|
|
39522
|
+
(_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
39094
39523
|
}
|
|
39095
|
-
this.variantChanged((
|
|
39524
|
+
this.variantChanged((_b = this.variant) !== null && _b !== void 0 ? _b : 'primary');
|
|
39525
|
+
}
|
|
39526
|
+
componentDidRender() {
|
|
39527
|
+
// after every render: the native control the message points at can be a new element
|
|
39528
|
+
this.updateFormValidity();
|
|
39096
39529
|
}
|
|
39097
|
-
|
|
39530
|
+
/**
|
|
39531
|
+
* Builds the validators from scratch: the ones of the type, the ones of the constraint props and
|
|
39532
|
+
* the custom ones. A rebuild instead of an append, so that a rule changed after load replaces
|
|
39533
|
+
* the old one instead of stacking on it.
|
|
39534
|
+
*/
|
|
39535
|
+
buildValidation() {
|
|
39536
|
+
var _a, _b;
|
|
39537
|
+
const validation = createInputValidationManager((_a = this.type) !== null && _a !== void 0 ? _a : 'text');
|
|
39538
|
+
const { validator } = validation;
|
|
39539
|
+
const max = this.numericBound(this.max);
|
|
39540
|
+
const min = this.numericBound(this.min);
|
|
39098
39541
|
if (this.required)
|
|
39099
|
-
|
|
39100
|
-
if (
|
|
39101
|
-
|
|
39102
|
-
if (
|
|
39103
|
-
|
|
39542
|
+
validator.addValidator(requiredValidor);
|
|
39543
|
+
if (max !== undefined)
|
|
39544
|
+
validator.addValidator(maxValidator(max));
|
|
39545
|
+
if (min !== undefined)
|
|
39546
|
+
validator.addValidator(minValidator(min));
|
|
39104
39547
|
if (this.maxlength !== undefined && this.maxlength !== 0 && !Number.isNaN(this.maxlength))
|
|
39105
|
-
|
|
39548
|
+
validator.addValidator(maxLenghtValidator(this.maxlength));
|
|
39106
39549
|
if (this.minlength !== undefined && this.minlength !== 0 && !Number.isNaN(this.minlength))
|
|
39107
|
-
|
|
39550
|
+
validator.addValidator(minLenghtValidator(this.minlength));
|
|
39551
|
+
const pattern = this.patternApplies() ? patternValidator((_b = this.pattern) !== null && _b !== void 0 ? _b : '') : null;
|
|
39552
|
+
if (pattern)
|
|
39553
|
+
validator.addValidator(pattern);
|
|
39554
|
+
validator.addValidator(this.customValidators);
|
|
39555
|
+
this.inputValidation = validation;
|
|
39556
|
+
}
|
|
39557
|
+
/** As on a native input, `pattern` constrains the text types, not a number, a date or a time. */
|
|
39558
|
+
patternApplies() {
|
|
39559
|
+
var _a, _b;
|
|
39560
|
+
return (((_a = this.pattern) !== null && _a !== void 0 ? _a : '') !== '' &&
|
|
39561
|
+
!['date', 'number', 'textarea', 'time'].includes((_b = this.type) !== null && _b !== void 0 ? _b : 'text'));
|
|
39562
|
+
}
|
|
39563
|
+
/** The number held by `min` or `max`, `undefined` when the prop is unset or not a number. */
|
|
39564
|
+
numericBound(bound) {
|
|
39565
|
+
if (bound === undefined || bound === null || bound === '')
|
|
39566
|
+
return undefined;
|
|
39567
|
+
const value = Number(bound);
|
|
39568
|
+
return Number.isNaN(value) ? undefined : value;
|
|
39569
|
+
}
|
|
39570
|
+
/**
|
|
39571
|
+
* Reports the validity of the value to the form, decided by the same validators that drive the
|
|
39572
|
+
* variant: like a native `required`, an invalid field stops the submit of its form. Runs on every
|
|
39573
|
+
* change of the value or of the rules, not on blur: the form can be submitted without a blur.
|
|
39574
|
+
*/
|
|
39575
|
+
updateFormValidity() {
|
|
39576
|
+
var _a;
|
|
39577
|
+
const value = (_a = this.value) !== null && _a !== void 0 ? _a : '';
|
|
39578
|
+
const errors = this.inputValidation.validator.check(value);
|
|
39579
|
+
const problem = errors
|
|
39580
|
+
? validityProblem(errors, value, {
|
|
39581
|
+
max: this.numericBound(this.max),
|
|
39582
|
+
maxlength: this.maxlength,
|
|
39583
|
+
min: this.numericBound(this.min),
|
|
39584
|
+
minlength: this.minlength,
|
|
39585
|
+
})
|
|
39586
|
+
: undefined;
|
|
39587
|
+
updateValidity(this.internals, problem, this.nativeInput);
|
|
39588
|
+
}
|
|
39589
|
+
/**
|
|
39590
|
+
* A submit stopped by an invalid field, or a `checkValidity()` of its form, validates the field
|
|
39591
|
+
* as a blur does, so that it shows what is wrong.
|
|
39592
|
+
*/
|
|
39593
|
+
invalidHandler() {
|
|
39594
|
+
this.validateInput();
|
|
39595
|
+
}
|
|
39596
|
+
/**
|
|
39597
|
+
* Rebuilds the validators when a prop they derive from changes after load, as it does with the
|
|
39598
|
+
* React wrappers under SSR, which set the props on an element that has already loaded.
|
|
39599
|
+
*/
|
|
39600
|
+
validationRulesChanged() {
|
|
39601
|
+
var _a;
|
|
39602
|
+
this.buildValidation();
|
|
39603
|
+
this.updateFormValidity();
|
|
39604
|
+
if (!this.validated) {
|
|
39605
|
+
// pristine field: only the required tip follows, the variant waits for the first blur
|
|
39606
|
+
this.isValid = !(this.required && ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '');
|
|
39607
|
+
return;
|
|
39608
|
+
}
|
|
39609
|
+
if (this.inputValidation.validator.hasValidator()) {
|
|
39610
|
+
this.validateInput();
|
|
39611
|
+
return;
|
|
39612
|
+
}
|
|
39613
|
+
// the last rule is gone: nothing is left to drive the variant, back to the pristine look
|
|
39614
|
+
this.validated = false;
|
|
39615
|
+
this.isValid = true;
|
|
39616
|
+
this.variant = 'primary';
|
|
39108
39617
|
}
|
|
39109
39618
|
/**
|
|
39110
39619
|
* Emits the change event when the component value changes
|
|
@@ -39113,6 +39622,7 @@ class MdsInput {
|
|
|
39113
39622
|
var _a;
|
|
39114
39623
|
this.changeEvent.emit({ value: this.value });
|
|
39115
39624
|
setFormValue(this.internals, (_a = this.value) !== null && _a !== void 0 ? _a : null);
|
|
39625
|
+
this.updateFormValidity();
|
|
39116
39626
|
if (this.maxlength !== undefined) {
|
|
39117
39627
|
this.countMaxLength();
|
|
39118
39628
|
}
|
|
@@ -39141,7 +39651,9 @@ class MdsInput {
|
|
|
39141
39651
|
* @param validator the validator function to add
|
|
39142
39652
|
*/
|
|
39143
39653
|
async addValidator(validator) {
|
|
39654
|
+
this.customValidators.push(validator);
|
|
39144
39655
|
this.inputValidation.validator.addValidator(validator);
|
|
39656
|
+
this.updateFormValidity();
|
|
39145
39657
|
return Promise.resolve();
|
|
39146
39658
|
}
|
|
39147
39659
|
/**
|
|
@@ -39149,7 +39661,9 @@ class MdsInput {
|
|
|
39149
39661
|
* @param validator the validator function to remove
|
|
39150
39662
|
*/
|
|
39151
39663
|
async removeValidator(validator) {
|
|
39664
|
+
this.customValidators = this.customValidators.filter((custom) => custom !== validator);
|
|
39152
39665
|
this.inputValidation.validator.removeValidator(validator);
|
|
39666
|
+
this.updateFormValidity();
|
|
39153
39667
|
}
|
|
39154
39668
|
/**
|
|
39155
39669
|
* Returns if validator is presen
|
|
@@ -39167,11 +39681,13 @@ class MdsInput {
|
|
|
39167
39681
|
return Promise.resolve(this.inputValidation.validator.errors);
|
|
39168
39682
|
}
|
|
39169
39683
|
validateInput() {
|
|
39684
|
+
var _a, _b;
|
|
39170
39685
|
// validate input only when atleast one validator is present
|
|
39171
39686
|
if (this.inputValidation.validator.hasValidator()) {
|
|
39172
|
-
this.
|
|
39687
|
+
this.validated = true;
|
|
39688
|
+
this.isValid = this.inputValidation.isValid((_a = this.value) !== null && _a !== void 0 ? _a : '');
|
|
39173
39689
|
// set variant attribute
|
|
39174
|
-
if (this.value === '' && !this.required)
|
|
39690
|
+
if (((_b = this.value) !== null && _b !== void 0 ? _b : '') === '' && !this.required)
|
|
39175
39691
|
this.variant = 'primary';
|
|
39176
39692
|
else
|
|
39177
39693
|
this.variant = this.isValid ? 'success' : 'error';
|
|
@@ -39207,22 +39723,42 @@ class MdsInput {
|
|
|
39207
39723
|
}
|
|
39208
39724
|
render() {
|
|
39209
39725
|
var _a, _b, _c;
|
|
39210
|
-
return (hAsync(Host, { key: '
|
|
39726
|
+
return (hAsync(Host, { key: '48be1ea3b45d760004cafcc1512d912aa3bbb09b', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, this.type === 'number' && this.controlsLayout === 'horizontal' && (hAsync("mds-button", { key: '4394045c76229b350e2b7925e97ee9cfb7fbc886', class: "counter-button counter-button--horizontal counter-button--decrease", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowDown : miBaselineRemove, disabled: !this.canEdit(), onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), variant: "dark", tone: "text", part: "counter-button-decrease" })), this.type === 'textarea' ? (hAsync("textarea", { "aria-label": this.accessibleName, class: clsx('input', ((_a = this.icon) !== null && _a !== void 0 ? _a : this.await) && 'has-icon', this.mic && 'has-right-icon'), autoFocus: this.autofocus, disabled: this.isDisabled(), maxLength: this.maxlength, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown, part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: (input) => (this.nativeInput = input), required: this.required, tabIndex: this.tabindex, value: this.value })) : (hAsync("input", { "aria-label": this.accessibleName, class: clsx('input', ((_b = this.icon) !== null && _b !== void 0 ? _b : this.await) && 'has-icon', this.mic && 'has-right-icon'), autoComplete: this.autocomplete, autoFocus: this.autofocus, disabled: this.isDisabled(), max: this.max, maxLength: this.maxlength, min: this.min, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown, pattern: this.pattern, list: this.datalistId, part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: (input) => (this.nativeInput = input), required: this.required, step: this.step, tabIndex: this.tabindex, type: this.type === 'password' && this.isPasswordVisible ? 'text' : this.type, value: this.value })), this.type === 'number' && this.controlsLayout === 'vertical' && (hAsync("div", { key: '743be29eebc5999a9d0925a605bb6635f140f92b', class: "counter counter--vertical" }, hAsync("mds-button", { key: '4dc91b23c9c93fa8b8b947abe18e0e831bd041d1', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowUp : miBaselineAdd, disabled: !this.canEdit(), onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), variant: "dark", size: "sm", tone: "text", part: "counter-button-increase" }), hAsync("mds-button", { key: '09a7bc1c90e3fe865f644946777166b86da80194', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowDown : miBaselineRemove, disabled: !this.canEdit(), onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), variant: "dark", size: "sm", tone: "text", part: "counter-button-decrease" }))), this.type === 'number' && this.controlsLayout === 'horizontal' && (hAsync("mds-button", { key: '81cadffb0b8250c384e613495cdc16bc9053e144', class: "counter-button counter-button--horizontal counter-button--increase", variant: "dark", tone: "text", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowUp : miBaselineAdd, disabled: !this.canEdit(), onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" })), this.type === 'password' && (hAsync("mds-button", { key: 'cdbb6575eb87a9937e9bbc0ff2f72f31bb2f0dfc', class: "password-toggle-button", variant: "dark", tone: "text", icon: this.isPasswordVisible ? miBaselineVisibleOff : miBaselineVisible, disabled: this.isDisabled(), onClick: this.handlePasswordToggleClick, tabindex: "0", title: this.isPasswordVisible ? this.t.get('hidePassword') : this.t.get('showPassword'), part: "password-toggle-button" })), this.type === 'password' && !this.isPasswordVisible && ((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) > 0 && (hAsync("div", { key: '69bc7dbdd9f7df55c28baf13dc3bdd94d7b60bb9', class: "password-mask" }, hAsync("div", { key: 'a8e470d57c54e4e2f9572c075cb3cb46b1dab1ef', class: "password-mask-items", part: "password-mask-items" }, Array.from({ length: this.value.length }).map((_, index) => (hAsync("div", { key: index, class: "password-mask-item", part: "password-mask-item" })))))), this.mic && (hAsync("mds-button", { key: 'f55d1b36d90f5e27db83eced736aab4334d53ebf', class: clsx('mic-toggle-button', this.isRecording && 'mic-toggle-button--recording'), icon: this.speechToTextIcon, disabled: !this.canEdit(), onClick: this.toggleTextRecognition, tabindex: "0", title: this.t.get(this.speechToTextLabelKey), variant: "dark", tone: "text", part: "mic-toggle-button" })), hAsync("mds-input-tip", { key: '6ad012233367c3ab1cad76655b157b7adf6bae1a', position: "top", active: this.hasFocus, part: "tip-top" }, this.isDisabled() && (hAsync("mds-input-tip-item", { key: '2a06f717b4805396462b71b2def8cd347eddabce', expanded: true, variant: "disabled" })), this.readonly && hAsync("mds-input-tip-item", { key: '135cebe86e822ed380dc5d08dcdb171fb8a34b82', expanded: true, variant: "readonly" }), this.required && (hAsync("mds-input-tip-item", { key: '572b7216d9ad15133671db09490a0b3c3bc4520f', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' }))), hAsync("mds-input-tip", { key: '97662d138ecf73ade4e2ce1d5bed878f82ff557c', position: "bottom", active: this.hasFocus, part: "tip-bottom" }, this.tip && (hAsync("mds-input-tip-item", { key: '991b04754698281693d30c1fba593d6bf0239b6b', expanded: true, variant: "text" }, this.tip)), this.maxlength && (hAsync("mds-input-tip-item", { key: 'b02d00e94cad631e7804466ee0852c0e3218138c', part: "tip-count", expanded: true, variant: this.countVariant }, this.currentLengthLabel))), this.datalist && (hAsync("datalist", { key: '98076063078aa7427ecb5305cdfb17c0f75f87da', id: this.datalistId, class: "datalist" }, this.datalist.map((element, i) => {
|
|
39211
39727
|
return hAsync("option", { key: i, value: element });
|
|
39212
|
-
}))), this.icon && !this.await && (hAsync("mds-icon", { key: '
|
|
39728
|
+
}))), this.icon && !this.await && (hAsync("mds-icon", { key: 'a48e5af6c49c4f0740ad46fb75fde88ff814a8a7', class: clsx('icon', this.variant), name: this.icon })), hAsync("mds-spinner", { key: '3aec6c0f1a77f68fc271a10e485eeab814a34d35', running: this.await, class: clsx('await', this.variant) })));
|
|
39213
39729
|
}
|
|
39214
39730
|
static get formAssociated() { return true; }
|
|
39215
39731
|
get el() { return getElement(this); }
|
|
39216
39732
|
static get watchers() { return {
|
|
39733
|
+
"max": [{
|
|
39734
|
+
"validationRulesChanged": 0
|
|
39735
|
+
}],
|
|
39736
|
+
"maxlength": [{
|
|
39737
|
+
"validationRulesChanged": 0
|
|
39738
|
+
}, {
|
|
39739
|
+
"maxLengthChanged": 0
|
|
39740
|
+
}],
|
|
39741
|
+
"min": [{
|
|
39742
|
+
"validationRulesChanged": 0
|
|
39743
|
+
}],
|
|
39744
|
+
"minlength": [{
|
|
39745
|
+
"validationRulesChanged": 0
|
|
39746
|
+
}],
|
|
39747
|
+
"pattern": [{
|
|
39748
|
+
"validationRulesChanged": 0
|
|
39749
|
+
}],
|
|
39750
|
+
"required": [{
|
|
39751
|
+
"validationRulesChanged": 0
|
|
39752
|
+
}],
|
|
39753
|
+
"type": [{
|
|
39754
|
+
"validationRulesChanged": 0
|
|
39755
|
+
}],
|
|
39217
39756
|
"value": [{
|
|
39218
39757
|
"valueChanged": 0
|
|
39219
39758
|
}],
|
|
39220
39759
|
"variant": [{
|
|
39221
39760
|
"variantChanged": 0
|
|
39222
39761
|
}],
|
|
39223
|
-
"maxlength": [{
|
|
39224
|
-
"maxLengthChanged": 0
|
|
39225
|
-
}],
|
|
39226
39762
|
"disabled": [{
|
|
39227
39763
|
"disabledChanged": 0
|
|
39228
39764
|
}]
|
|
@@ -39262,6 +39798,7 @@ class MdsInput {
|
|
|
39262
39798
|
"currentLengthLabel": [32],
|
|
39263
39799
|
"countVariant": [32],
|
|
39264
39800
|
"isPasswordVisible": [32],
|
|
39801
|
+
"formDisabled": [32],
|
|
39265
39802
|
"addValidator": [64],
|
|
39266
39803
|
"removeValidator": [64],
|
|
39267
39804
|
"hasValidator": [64],
|
|
@@ -39269,7 +39806,7 @@ class MdsInput {
|
|
|
39269
39806
|
"setFocus": [64],
|
|
39270
39807
|
"getInputElement": [64]
|
|
39271
39808
|
},
|
|
39272
|
-
"$listeners$":
|
|
39809
|
+
"$listeners$": [[0, "invalid", "invalidHandler"]],
|
|
39273
39810
|
"$lazyBundleId$": "-",
|
|
39274
39811
|
"$attrsToReflect$": [["autocomplete", "autocomplete"], ["autofocus", "autofocus"], ["await", "await"], ["controlsLayout", "controls-layout"], ["controlsIcon", "controls-icon"], ["disabled", "disabled"], ["icon", "icon"], ["max", "max"], ["maxlength", "maxlength"], ["mic", "mic"], ["min", "min"], ["minlength", "minlength"], ["name", "name"], ["pattern", "pattern"], ["placeholder", "placeholder"], ["readonly", "readonly"], ["required", "required"], ["variant", "variant"], ["tip", "tip"], ["step", "step"], ["type", "type"], ["typography", "typography"], ["value", "value"]]
|
|
39275
39812
|
}; }
|
|
@@ -39292,8 +39829,15 @@ class MdsInputDate {
|
|
|
39292
39829
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
39293
39830
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
39294
39831
|
}
|
|
39832
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
39833
|
+
// around it, which disables the host but not the native control in its shadow root
|
|
39834
|
+
this.formDisabled = false;
|
|
39295
39835
|
this.isSlotted = false;
|
|
39836
|
+
// the value at load, which a form reset brings back as the value attribute of a native input
|
|
39837
|
+
this.defaultValue = '';
|
|
39296
39838
|
this.empty = undefined;
|
|
39839
|
+
// true once the user has edited or left the field, or a stopped submit pointed at it: from then
|
|
39840
|
+
// on the validation drives the variant, like :user-invalid on a native control
|
|
39297
39841
|
this.touched = false;
|
|
39298
39842
|
/**
|
|
39299
39843
|
* Specifies the value of the input
|
|
@@ -39337,6 +39881,7 @@ class MdsInputDate {
|
|
|
39337
39881
|
this.required = false;
|
|
39338
39882
|
this.calendarKey = 0;
|
|
39339
39883
|
this.hasFocus = false;
|
|
39884
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
39340
39885
|
this.handleChange = (event) => {
|
|
39341
39886
|
const input = event.target;
|
|
39342
39887
|
this.touched = true;
|
|
@@ -39348,6 +39893,7 @@ class MdsInputDate {
|
|
|
39348
39893
|
this.onBlur = (ev) => {
|
|
39349
39894
|
const input = ev.target;
|
|
39350
39895
|
this.hasFocus = false;
|
|
39896
|
+
this.touched = true;
|
|
39351
39897
|
this.value = input.value;
|
|
39352
39898
|
this.validateValue(input.validity.badInput);
|
|
39353
39899
|
};
|
|
@@ -39366,6 +39912,7 @@ class MdsInputDate {
|
|
|
39366
39912
|
this.calendarKey += 1;
|
|
39367
39913
|
};
|
|
39368
39914
|
this.handleCalendarChange = (ev) => {
|
|
39915
|
+
this.touched = true;
|
|
39369
39916
|
this.value = ev.detail.startDate;
|
|
39370
39917
|
if (this.delay === 0)
|
|
39371
39918
|
return;
|
|
@@ -39381,27 +39928,67 @@ class MdsInputDate {
|
|
|
39381
39928
|
this.valueChange.emit(this.value);
|
|
39382
39929
|
this.validateValue();
|
|
39383
39930
|
}
|
|
39931
|
+
/**
|
|
39932
|
+
* Checks the value: the validity reported to the form and the required tip follow it at once,
|
|
39933
|
+
* the variant and `mdsInputValidation` only once the field is touched.
|
|
39934
|
+
*/
|
|
39384
39935
|
validateValue(hasBadInput = false) {
|
|
39385
39936
|
const date = DateTime.fromISO(this.value);
|
|
39386
39937
|
const hasValue = Boolean(this.value);
|
|
39387
39938
|
const hasInvalidValue = hasValue && !date.isValid;
|
|
39388
|
-
|
|
39389
|
-
|
|
39390
|
-
|
|
39391
|
-
|
|
39392
|
-
|
|
39393
|
-
|
|
39394
|
-
|
|
39395
|
-
|
|
39396
|
-
|
|
39939
|
+
this.problem = this.findProblem(date, hasBadInput || hasInvalidValue);
|
|
39940
|
+
this.isValid = this.problem === undefined;
|
|
39941
|
+
setFormValue(this.internals, this.isValid ? this.value : null);
|
|
39942
|
+
this.empty = hasBadInput || hasInvalidValue ? true : undefined;
|
|
39943
|
+
this.updateFormValidity();
|
|
39944
|
+
if (!this.touched)
|
|
39945
|
+
return;
|
|
39946
|
+
this.variant = this.isValid ? 'primary' : 'error';
|
|
39947
|
+
this.validationEvent.emit(this.isValid);
|
|
39948
|
+
}
|
|
39949
|
+
/**
|
|
39950
|
+
* A submit stopped by an invalid date, or a `checkValidity()` of its form, touches the field, so
|
|
39951
|
+
* that it shows what is wrong.
|
|
39952
|
+
*/
|
|
39953
|
+
invalidHandler() {
|
|
39954
|
+
this.touched = true;
|
|
39955
|
+
this.validateValue();
|
|
39956
|
+
}
|
|
39957
|
+
/** The rule the value breaks, `undefined` when it breaks none. */
|
|
39958
|
+
findProblem(date, isBadInput) {
|
|
39959
|
+
var _a, _b, _c;
|
|
39960
|
+
if (isBadInput)
|
|
39961
|
+
return { rule: 'invalidDate' };
|
|
39962
|
+
if (this.required && ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '')
|
|
39963
|
+
return { rule: 'required' };
|
|
39964
|
+
if (!date.isValid)
|
|
39965
|
+
return undefined;
|
|
39966
|
+
if (((_b = this.max) !== null && _b !== void 0 ? _b : '') !== '' && DateTime.fromISO(this.max) < date) {
|
|
39967
|
+
return { rule: 'maxDate', context: { max: this.formatDate(this.max) } };
|
|
39397
39968
|
}
|
|
39398
|
-
|
|
39399
|
-
this.
|
|
39400
|
-
this.variant = 'primary';
|
|
39401
|
-
setFormValue(this.internals, this.value);
|
|
39402
|
-
this.empty = undefined;
|
|
39969
|
+
if (((_c = this.min) !== null && _c !== void 0 ? _c : '') !== '' && DateTime.fromISO(this.min) > date) {
|
|
39970
|
+
return { rule: 'minDate', context: { min: this.formatDate(this.min) } };
|
|
39403
39971
|
}
|
|
39404
|
-
|
|
39972
|
+
return undefined;
|
|
39973
|
+
}
|
|
39974
|
+
/** An ISO date as the page language writes it, for the messages. */
|
|
39975
|
+
formatDate(iso) {
|
|
39976
|
+
return DateTime.fromISO(iso)
|
|
39977
|
+
.setLocale(preferenceStore.state.language)
|
|
39978
|
+
.toLocaleString(DateTime.DATE_SHORT);
|
|
39979
|
+
}
|
|
39980
|
+
/**
|
|
39981
|
+
* Reports the validity of the value to the form, with the rules that drive the variant: like a
|
|
39982
|
+
* native control, an invalid date stops the submit of its form.
|
|
39983
|
+
*/
|
|
39984
|
+
updateFormValidity() {
|
|
39985
|
+
var _a, _b;
|
|
39986
|
+
const input = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.input')) !== null && _b !== void 0 ? _b : undefined;
|
|
39987
|
+
updateValidity(this.internals, this.problem, input);
|
|
39988
|
+
}
|
|
39989
|
+
componentDidRender() {
|
|
39990
|
+
// the native input the message points at exists from the first render on
|
|
39991
|
+
this.updateFormValidity();
|
|
39405
39992
|
}
|
|
39406
39993
|
/**
|
|
39407
39994
|
* Sets focus on the underlying input element.
|
|
@@ -39427,30 +40014,75 @@ class MdsInputDate {
|
|
|
39427
40014
|
async getErrors() {
|
|
39428
40015
|
return Promise.resolve(this.isValid ? null : { error: '' });
|
|
39429
40016
|
}
|
|
40017
|
+
formDisabledCallback(disabled) {
|
|
40018
|
+
this.formDisabled = disabled;
|
|
40019
|
+
}
|
|
40020
|
+
/**
|
|
40021
|
+
* Like a native input, a form reset brings back the value of load and forgets the interaction:
|
|
40022
|
+
* the field looks pristine until the user edits or leaves it again.
|
|
40023
|
+
*/
|
|
39430
40024
|
formResetCallback() {
|
|
39431
|
-
|
|
40025
|
+
var _a;
|
|
40026
|
+
const { touched } = this;
|
|
40027
|
+
this.touched = false;
|
|
40028
|
+
// the native input can hold a partial date that never reached the value
|
|
40029
|
+
const input = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.input');
|
|
40030
|
+
if (input)
|
|
40031
|
+
input.value = this.defaultValue;
|
|
40032
|
+
this.value = this.defaultValue;
|
|
40033
|
+
this.validateValue();
|
|
40034
|
+
if (touched)
|
|
40035
|
+
this.variant = 'primary';
|
|
39432
40036
|
}
|
|
39433
40037
|
componentWillLoad() {
|
|
39434
40038
|
this.isSlotted = !(this.host.getAttribute('slot') === null || this.host.getAttribute('slot') === '');
|
|
39435
40039
|
this.value = this.value || '';
|
|
39436
|
-
|
|
39437
|
-
|
|
39438
|
-
|
|
39439
|
-
|
|
39440
|
-
|
|
39441
|
-
|
|
39442
|
-
|
|
40040
|
+
this.defaultValue = this.value;
|
|
40041
|
+
this.clampRange();
|
|
40042
|
+
this.validateValue();
|
|
40043
|
+
}
|
|
40044
|
+
/**
|
|
40045
|
+
* Snaps `max` to `min` when the range is reversed.
|
|
40046
|
+
* @returns true when `max` changed
|
|
40047
|
+
*/
|
|
40048
|
+
clampRange() {
|
|
40049
|
+
if (this.min === null || this.min === '' || this.max === null || this.max === '')
|
|
40050
|
+
return false;
|
|
40051
|
+
if (DateTime.fromISO(this.max) < DateTime.fromISO(this.min)) {
|
|
40052
|
+
this.max = this.min;
|
|
40053
|
+
return true;
|
|
39443
40054
|
}
|
|
40055
|
+
return false;
|
|
40056
|
+
}
|
|
40057
|
+
/**
|
|
40058
|
+
* Validates again when a rule changes after load, as it does with the React wrappers under SSR,
|
|
40059
|
+
* which set the props on an element that has already loaded.
|
|
40060
|
+
*/
|
|
40061
|
+
validationRulesChanged() {
|
|
40062
|
+
// a reversed range snaps max to min, and that change runs this watcher again
|
|
40063
|
+
if (this.clampRange())
|
|
40064
|
+
return;
|
|
39444
40065
|
this.validateValue();
|
|
39445
40066
|
}
|
|
39446
40067
|
render() {
|
|
39447
|
-
return (hAsync(Host, { key: '
|
|
40068
|
+
return (hAsync(Host, { key: 'bb6ce788477995704deb7554cec8363e0e219418', empty: this.empty, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("input", { key: 'ff6e84704788c49a01491dc042a349c95a5b6ce2', "aria-label": this.accessibleName, value: this.value, id: "dateInput", class: "input", part: "input-date", type: "date", disabled: this.isDisabled(), name: this.name, readOnly: this.readonly, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.handleChange, onChange: this.handleChange }), !this.isSlotted && (hAsync("div", { key: 'e7fa728f2f5ede454ef7cf43da5885484a47a201', class: "action-open-calendar-wrapper" }, hAsync("mds-button", { key: '0c67d5ed8fc65af85a21010be65f37409e1125bc', id: "calendar-dropdown", class: "action-open-calendar",
|
|
40069
|
+
// a read-only date cannot change, from the calendar either
|
|
40070
|
+
disabled: this.isDisabled() || this.readonly, variant: "dark", tone: "text", icon: miBaselineCalendarToday, onClick: this.handleOpenCalendarClick }))), hAsync("mds-input-tip", { key: '43e3767bc9f70ea31883f5d7d562e102b4bcc3c9', position: "top", active: this.hasFocus }, this.isDisabled() && (hAsync("mds-input-tip-item", { key: '6cedaa989e6ec5899d73fc6d4f8c68f798408dae', expanded: true, variant: "disabled" })), this.readonly && hAsync("mds-input-tip-item", { key: '4f067b4c600e75f78fa7bef72a28d5cb1e4ad9e4', expanded: true, variant: "readonly" }), this.required && (hAsync("mds-input-tip-item", { key: '28419231c5a20cd36b9c4c5e668c99707a20c485', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' }))), !this.isSlotted && (hAsync("mds-dropdown", { key: '3f9cdf80cc2167a864e6b7cc4435e6623d5858e2', placement: "bottom-end", "disable-auto-placement": true, ref: (el) => (this.dropdownRef = el), role: "group", target: "#calendar-dropdown" }, hAsync("mds-calendar", Object.assign({ key: this.calendarKey, singlePicker: true, hideToday: this.hideToday, onMdsCalendarChange: this.handleCalendarChange, startDate: this.value }, (this.min !== null && this.min !== '' ? { min: this.min } : {}), (this.max !== null && this.max !== '' ? { max: this.max } : {})))))));
|
|
39448
40071
|
}
|
|
39449
40072
|
static get formAssociated() { return true; }
|
|
39450
40073
|
get host() { return getElement(this); }
|
|
39451
40074
|
static get watchers() { return {
|
|
39452
40075
|
"value": [{
|
|
39453
40076
|
"handleValue": 0
|
|
40077
|
+
}],
|
|
40078
|
+
"max": [{
|
|
40079
|
+
"validationRulesChanged": 0
|
|
40080
|
+
}],
|
|
40081
|
+
"min": [{
|
|
40082
|
+
"validationRulesChanged": 0
|
|
40083
|
+
}],
|
|
40084
|
+
"required": [{
|
|
40085
|
+
"validationRulesChanged": 0
|
|
39454
40086
|
}]
|
|
39455
40087
|
}; }
|
|
39456
40088
|
static get style() { return mdsInputDateCss(); }
|
|
@@ -39469,6 +40101,7 @@ class MdsInputDate {
|
|
|
39469
40101
|
"disabled": [516],
|
|
39470
40102
|
"readonly": [516],
|
|
39471
40103
|
"required": [516],
|
|
40104
|
+
"formDisabled": [32],
|
|
39472
40105
|
"empty": [32],
|
|
39473
40106
|
"isValid": [32],
|
|
39474
40107
|
"touched": [32],
|
|
@@ -39479,7 +40112,7 @@ class MdsInputDate {
|
|
|
39479
40112
|
"setValue": [64],
|
|
39480
40113
|
"getErrors": [64]
|
|
39481
40114
|
},
|
|
39482
|
-
"$listeners$":
|
|
40115
|
+
"$listeners$": [[0, "invalid", "invalidHandler"]],
|
|
39483
40116
|
"$lazyBundleId$": "-",
|
|
39484
40117
|
"$attrsToReflect$": [["value", "value"], ["name", "name"], ["variant", "variant"], ["min", "min"], ["max", "max"], ["delay", "delay"], ["hideToday", "hide-today"], ["disabled", "disabled"], ["readonly", "readonly"], ["required", "required"]]
|
|
39485
40118
|
}; }
|
|
@@ -39529,7 +40162,7 @@ var localeIt$q = {
|
|
|
39529
40162
|
to: to
|
|
39530
40163
|
};
|
|
39531
40164
|
|
|
39532
|
-
const mdsInputDateRangeCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-calendar,mds-dropdown,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-date-range-background:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-date-range-calendar-width:22rem;--mds-input-date-range-fields-firefox-justify-content:start;--mds-input-date-range-fields-gap:0 calc(var(--spacing,.0025rem)*200);--mds-input-date-range-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-date-range-ring:0 0 0 1px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1);--mds-input-date-range-shadow:0 1px 3px 0 rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.06);--mds-input-date-range-transition-duration:var(--duration-300,.3s);--private-input-date-range-transition-duration:var(--mds-input-date-range-transition-duration);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:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));corner-shape:var(--magma-corner-shape,squircle);container-type:inline-size;cursor:text;display:flex;gap:calc(var(--spacing,.0025rem)*200);overflow:visible;position:relative;--mds-input-date-range-icon-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-date-range-variant-color-rgb:0 0 0}.date-preselection{display:grid;gap:calc(var(--spacing,.0025rem)*200)}.inputs{font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-hack,.875rem);font-weight:var(--tw-font-weight,var(--text-size-code-hack--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-hack--line-height,1.25rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--mds-input-date-range-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border-radius:inherit;-webkit-box-shadow:var(--mds-input-date-range-ring),var(--mds-input-date-range-shadow);box-shadow:var(--mds-input-date-range-ring),var(--mds-input-date-range-shadow);box-sizing:border-box;color:inherit;corner-shape:inherit;align-items:center;border:0;display:inline-flex;flex-wrap:wrap;gap:var(--mds-input-date-range-fields-gap,0 calc(var(--spacing,.0025rem)*200));margin:0;min-height:3rem;overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);text-overflow:ellipsis;-webkit-transition-duration:var(--private-input-date-range-transition-duration);transition-duration:var(--private-input-date-range-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,margin,opacity,padding,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));width:100%}.input-element{align-items:baseline;display:inline-flex}:host(:focus-within) .inputs{--tw-outline-style:none;outline-style:none;transition-duration:var(--default-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;transition-timing-function:var(--default-transition-timing-function);--mds-input-date-range-ring:0 0 0 3px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/1);--mds-input-date-range-shadow:0 4px 6px 3px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.06);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input-wrapper{display:flex;flex-shrink:0}:host ::slotted(mds-input-date){color:inherit}.date-label{margin-left:calc(var(--spacing,.0025rem)*50);margin-right:calc(var(--spacing,.0025rem)*50);min-width:min-content;white-space:nowrap}.date-label:first-child{margin-left:0}.calendars{display:flex;flex-wrap:nowrap;gap:calc(var(--spacing,.0025rem)*200);min-width:max-content}.calendar-preselection-panel{align-content:start;background-color:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))));border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));box-sizing:border-box;display:grid;min-inline-size:max-content;padding:calc(var(--spacing,.0025rem)*400)}.calendar-single{display:flex;flex-wrap:nowrap;gap:calc(var(--spacing,.0025rem)*200);min-width:max-content}:is(.calendar-single,.calendars) mds-calendar{-ms-flex:0 0 var(--mds-input-date-range-calendar-width,22rem);flex:0 0 var(--mds-input-date-range-calendar-width,22rem);inline-size:var(--mds-input-date-range-calendar-width,22rem);max-inline-size:var(--mds-input-date-range-calendar-width,22rem);min-inline-size:var(--mds-input-date-range-calendar-width,22rem)}.action-open-calendar-wrapper{align-items:center;aspect-ratio:1;bottom:0;display:flex;justify-content:center;position:absolute;right:0;top:0}.action-open-calendar{--mds-button-color:var(--mds-input-date-range-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));align-self:center}mds-dropdown{padding:0}: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-date-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-date-range-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])) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}:host([pref-contrast=more]){--mds-input-date-range-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-date-range-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:host([pref-contrast=more]) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([pref-contrast=more]) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}@supports ((-moz-appearance:none)){.action-open-calendar{display:none}.inputs{-ms-flex-pack:var(--mds-input-date-range-fields-firefox-justify-content,start);justify-content:var(--mds-input-date-range-fields-firefox-justify-content,start);padding-right:calc(var(--spacing,.0025rem)*400)}}:host(:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-date-range-variant-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([variant=ai]){--mds-input-date-range-icon-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-input-tip-background:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=ai]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-date-range-variant-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)))}:host([variant=info]){--mds-input-date-range-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=info]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-date-range-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-date-range-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=success]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-date-range-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-date-range-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-date-range-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-date-range-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=error]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-date-range-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}@media (forced-colors:active){:host(:focus-within) .inputs{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-date-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-date-range-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]))) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-date-range-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-date-range-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::-webkit-input-placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}}`;
|
|
40165
|
+
const mdsInputDateRangeCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-calendar,mds-dropdown,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-date-range-background:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-date-range-calendar-width:22rem;--mds-input-date-range-fields-firefox-justify-content:start;--mds-input-date-range-fields-gap:0 calc(var(--spacing,.0025rem)*200);--mds-input-date-range-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-date-range-ring:0 0 0 1px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1);--mds-input-date-range-shadow:0 1px 3px 0 rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.06);--mds-input-date-range-transition-duration:var(--duration-300,.3s);--private-input-date-range-transition-duration:var(--mds-input-date-range-transition-duration);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:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));corner-shape:var(--magma-corner-shape,squircle);container-type:inline-size;cursor:text;display:flex;gap:calc(var(--spacing,.0025rem)*200);overflow:visible;position:relative;--mds-input-date-range-icon-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-date-range-variant-color-rgb:0 0 0}.date-preselection{display:grid;gap:calc(var(--spacing,.0025rem)*200)}.inputs{font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-hack,.875rem);font-weight:var(--tw-font-weight,var(--text-size-code-hack--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-hack--line-height,1.25rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--mds-input-date-range-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border-radius:inherit;-webkit-box-shadow:var(--mds-input-date-range-ring),var(--mds-input-date-range-shadow);box-shadow:var(--mds-input-date-range-ring),var(--mds-input-date-range-shadow);box-sizing:border-box;color:inherit;corner-shape:inherit;align-items:center;border:0;display:inline-flex;flex-wrap:wrap;gap:var(--mds-input-date-range-fields-gap,0 calc(var(--spacing,.0025rem)*200));margin:0;min-height:3rem;overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);text-overflow:ellipsis;-webkit-transition-duration:var(--private-input-date-range-transition-duration);transition-duration:var(--private-input-date-range-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,margin,opacity,padding,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));width:100%}.input-element{align-items:baseline;display:inline-flex}:host(:focus-within) .inputs{--tw-outline-style:none;outline-style:none;transition-duration:var(--default-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;transition-timing-function:var(--default-transition-timing-function);--mds-input-date-range-ring:0 0 0 3px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/1);--mds-input-date-range-shadow:0 4px 6px 3px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.06);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input-wrapper{display:flex;flex-shrink:0}:host ::slotted(mds-input-date){color:inherit}.date-label{margin-left:calc(var(--spacing,.0025rem)*50);margin-right:calc(var(--spacing,.0025rem)*50);min-width:min-content;white-space:nowrap}.date-label:first-child{margin-left:0}.calendars{display:flex;flex-wrap:nowrap;gap:calc(var(--spacing,.0025rem)*200);min-width:max-content}.calendar-preselection-panel{align-content:start;background-color:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))));border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));box-sizing:border-box;display:grid;min-inline-size:max-content;padding:calc(var(--spacing,.0025rem)*400)}.calendar-single{display:flex;flex-wrap:nowrap;gap:calc(var(--spacing,.0025rem)*200);min-width:max-content}:is(.calendar-single,.calendars) mds-calendar{-ms-flex:0 0 var(--mds-input-date-range-calendar-width,22rem);flex:0 0 var(--mds-input-date-range-calendar-width,22rem);inline-size:var(--mds-input-date-range-calendar-width,22rem);max-inline-size:var(--mds-input-date-range-calendar-width,22rem);min-inline-size:var(--mds-input-date-range-calendar-width,22rem)}.action-open-calendar-wrapper{align-items:center;aspect-ratio:1;bottom:0;display:flex;justify-content:center;position:absolute;right:0;top:0}.action-open-calendar{--mds-button-color:var(--mds-input-date-range-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));align-self:center}mds-dropdown{padding:0}:host(:disabled:not([disabled=false])),:host([disabled]:not([disabled=false])){color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));cursor:default}:host(:disabled:not([disabled=false])) .inputs,:host([disabled]:not([disabled=false])) .inputs{background-color:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))))}: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-date-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-date-range-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])) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}:host([pref-contrast=more]){--mds-input-date-range-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-date-range-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:host([pref-contrast=more]) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([pref-contrast=more]) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}@supports ((-moz-appearance:none)){.action-open-calendar{display:none}.inputs{-ms-flex-pack:var(--mds-input-date-range-fields-firefox-justify-content,start);justify-content:var(--mds-input-date-range-fields-firefox-justify-content,start);padding-right:calc(var(--spacing,.0025rem)*400)}}:host(:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-date-range-variant-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([variant=ai]){--mds-input-date-range-icon-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-input-tip-background:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=ai]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-date-range-variant-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)))}:host([variant=info]){--mds-input-date-range-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=info]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-date-range-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-date-range-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=success]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-date-range-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-date-range-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-date-range-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-date-range-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=error]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-date-range-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}@media (forced-colors:active){:host(:focus-within) .inputs{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-date-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-date-range-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]))) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-date-range-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-date-range-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::-webkit-input-placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}}`;
|
|
39533
40166
|
|
|
39534
40167
|
/**
|
|
39535
40168
|
* @slot calendar-preselection - Add `HTML elements` or `components` to this slot.
|
|
@@ -39552,6 +40185,9 @@ class MdsInputDateRange {
|
|
|
39552
40185
|
this.internalEndDate = '';
|
|
39553
40186
|
this.visibleCalendarDate = '';
|
|
39554
40187
|
this.hasPreselection = false;
|
|
40188
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
40189
|
+
// around it, which disables the host but not the calendar button in its shadow root
|
|
40190
|
+
this.formDisabled = false;
|
|
39555
40191
|
this.t = new Locale$1({
|
|
39556
40192
|
el: localeEl$p,
|
|
39557
40193
|
en: localeEn$p,
|
|
@@ -39591,6 +40227,12 @@ class MdsInputDateRange {
|
|
|
39591
40227
|
* Enables the linked dual-calendar range picker behavior.
|
|
39592
40228
|
*/
|
|
39593
40229
|
this.dualCalendar = false;
|
|
40230
|
+
/**
|
|
40231
|
+
* Disables the range, like a disabled native input: the dates cannot be changed, from the fields
|
|
40232
|
+
* or from the calendar, and are left out of the form. It disables the two slotted fields too. A
|
|
40233
|
+
* disabled `<fieldset>` around the component does the same.
|
|
40234
|
+
*/
|
|
40235
|
+
this.disabled = false;
|
|
39594
40236
|
this.lastEmittedStartDate = null;
|
|
39595
40237
|
this.lastEmittedEndDate = null;
|
|
39596
40238
|
this.initialStartDate = '';
|
|
@@ -39642,6 +40284,7 @@ class MdsInputDateRange {
|
|
|
39642
40284
|
setAttributeIfEmpty(field, 'aria-label', ((_a = this.accessibleName) !== null && _a !== void 0 ? _a : '') !== '' ? `${this.accessibleName}, ${part}` : part);
|
|
39643
40285
|
});
|
|
39644
40286
|
};
|
|
40287
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
39645
40288
|
this.handleCalendarHover = (ev) => {
|
|
39646
40289
|
if (this.internalStartDate === '' || this.internalEndDate !== '') {
|
|
39647
40290
|
this.clearHoverPreview();
|
|
@@ -39767,12 +40410,23 @@ class MdsInputDateRange {
|
|
|
39767
40410
|
this.hoveredCalendarDate = null;
|
|
39768
40411
|
this.syncCalendarsHoverAttributes();
|
|
39769
40412
|
}
|
|
40413
|
+
/** A date inside `min` and `max`, the bounds that are set. */
|
|
40414
|
+
isWithinRange(date) {
|
|
40415
|
+
var _a, _b;
|
|
40416
|
+
const min = DateTime.fromISO((_a = this.min) !== null && _a !== void 0 ? _a : '');
|
|
40417
|
+
const max = DateTime.fromISO((_b = this.max) !== null && _b !== void 0 ? _b : '');
|
|
40418
|
+
return !(min.isValid && date < min) && !(max.isValid && date > max);
|
|
40419
|
+
}
|
|
39770
40420
|
getEmittableDateRangeDetail() {
|
|
39771
40421
|
const startDate = DateTime.fromISO(this.internalStartDate);
|
|
39772
40422
|
const endDate = DateTime.fromISO(this.internalEndDate);
|
|
39773
40423
|
if (!startDate.isValid || !endDate.isValid) {
|
|
39774
40424
|
return null;
|
|
39775
40425
|
}
|
|
40426
|
+
// a date typed outside the window is flagged by its field, not emitted as a range
|
|
40427
|
+
if (!this.isWithinRange(startDate) || !this.isWithinRange(endDate)) {
|
|
40428
|
+
return null;
|
|
40429
|
+
}
|
|
39776
40430
|
return {
|
|
39777
40431
|
startDate: this.internalStartDate,
|
|
39778
40432
|
endDate: this.internalEndDate,
|
|
@@ -39797,6 +40451,46 @@ class MdsInputDateRange {
|
|
|
39797
40451
|
handleEndDateChange(newValue) {
|
|
39798
40452
|
this.syncExternalDate('end', newValue);
|
|
39799
40453
|
}
|
|
40454
|
+
handleRangeChange() {
|
|
40455
|
+
this.forwardRange(true);
|
|
40456
|
+
}
|
|
40457
|
+
handleDisabledChange() {
|
|
40458
|
+
this.forwardDisabled(true);
|
|
40459
|
+
}
|
|
40460
|
+
/**
|
|
40461
|
+
* Bounds both fields, as the range promises: min and max reach the slotted dates, which flag a
|
|
40462
|
+
* date typed outside them and report it to the form. At load a bound the range does not set
|
|
40463
|
+
* leaves the one written on the field alone; a bound changed later always reaches the fields.
|
|
40464
|
+
*/
|
|
40465
|
+
forwardRange(changed) {
|
|
40466
|
+
['start', 'end'].forEach((slotName) => {
|
|
40467
|
+
var _a, _b;
|
|
40468
|
+
const field = this.slottedField(slotName);
|
|
40469
|
+
if (field == null)
|
|
40470
|
+
return;
|
|
40471
|
+
if (changed || ((_a = this.min) !== null && _a !== void 0 ? _a : '') !== '')
|
|
40472
|
+
field.min = this.min;
|
|
40473
|
+
if (changed || ((_b = this.max) !== null && _b !== void 0 ? _b : '') !== '')
|
|
40474
|
+
field.max = this.max;
|
|
40475
|
+
});
|
|
40476
|
+
}
|
|
40477
|
+
/**
|
|
40478
|
+
* Disables both fields with the range. At load a range that is not disabled leaves a field
|
|
40479
|
+
* disabled on its own alone; a disabled changed later always reaches the fields. A disabled
|
|
40480
|
+
* fieldset needs no forwarding: the fields are inside it and follow it themselves.
|
|
40481
|
+
*/
|
|
40482
|
+
forwardDisabled(changed) {
|
|
40483
|
+
['start', 'end'].forEach((slotName) => {
|
|
40484
|
+
const field = this.slottedField(slotName);
|
|
40485
|
+
if (field != null && (changed || this.disabled))
|
|
40486
|
+
field.disabled = !!this.disabled;
|
|
40487
|
+
});
|
|
40488
|
+
}
|
|
40489
|
+
slottedField(slotName) {
|
|
40490
|
+
var _a;
|
|
40491
|
+
const slot = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
|
|
40492
|
+
return slot === null || slot === void 0 ? void 0 : slot.assignedElements()[0];
|
|
40493
|
+
}
|
|
39800
40494
|
componentWillLoad() {
|
|
39801
40495
|
var _a, _b;
|
|
39802
40496
|
// a null bound by a framework counts as no date, as the watchers already do
|
|
@@ -39848,6 +40542,8 @@ class MdsInputDateRange {
|
|
|
39848
40542
|
else {
|
|
39849
40543
|
this.internalEndDate = event.start;
|
|
39850
40544
|
}
|
|
40545
|
+
// a preset ending before it starts snaps its end to the start, as a typed range does
|
|
40546
|
+
this.validateDateRange();
|
|
39851
40547
|
this.updateInputValue('end', this.internalEndDate);
|
|
39852
40548
|
this.syncFormValue();
|
|
39853
40549
|
const calendars = this.getCalendars();
|
|
@@ -39861,13 +40557,23 @@ class MdsInputDateRange {
|
|
|
39861
40557
|
componentDidLoad() {
|
|
39862
40558
|
var _a;
|
|
39863
40559
|
this.nameSlottedFields();
|
|
40560
|
+
this.forwardRange(false);
|
|
40561
|
+
this.forwardDisabled(false);
|
|
39864
40562
|
this.updateInputListeners();
|
|
39865
40563
|
this.updateInputValue('start', this.internalStartDate);
|
|
39866
40564
|
this.updateInputValue('end', this.internalEndDate);
|
|
40565
|
+
// a preset matching the dates of load shows selected from the start
|
|
40566
|
+
this.checkPreselections();
|
|
39867
40567
|
this.syncFormValue();
|
|
39868
40568
|
this.host.addEventListener('focusout', this.handleFocusOut);
|
|
39869
40569
|
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('mdsCalendarHover', this.handleCalendarHover);
|
|
39870
40570
|
}
|
|
40571
|
+
formDisabledCallback(disabled) {
|
|
40572
|
+
this.formDisabled = disabled;
|
|
40573
|
+
// a calendar left open would still change the dates
|
|
40574
|
+
if (disabled && this.dropdownRef)
|
|
40575
|
+
this.dropdownRef.visible = false;
|
|
40576
|
+
}
|
|
39871
40577
|
formResetCallback() {
|
|
39872
40578
|
this.clearHoverPreview();
|
|
39873
40579
|
this.internalStartDate = this.initialStartDate;
|
|
@@ -39899,9 +40605,7 @@ class MdsInputDateRange {
|
|
|
39899
40605
|
this.syncFormValue();
|
|
39900
40606
|
}
|
|
39901
40607
|
updateInputValue(slotName, newValue) {
|
|
39902
|
-
|
|
39903
|
-
const slot = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
|
|
39904
|
-
const input = slot === null || slot === void 0 ? void 0 : slot.assignedElements()[0];
|
|
40608
|
+
const input = this.slottedField(slotName);
|
|
39905
40609
|
if (input != null) {
|
|
39906
40610
|
this.syncingInputSlots.add(slotName);
|
|
39907
40611
|
input.setValue(newValue).finally(() => {
|
|
@@ -39985,7 +40689,7 @@ class MdsInputDateRange {
|
|
|
39985
40689
|
return (hAsync("div", { class: "calendars" }, this.renderCalendarPreselectionPanel(), hAsync("mds-calendar", Object.assign({ key: `${this.calendarKey}-start`, hideToday: this.hideToday, hideNextButton: true, disableMonthYearSelection: true, viewDate: this.getCalendarViewDate(), onMdsCalendarNavigate: this.handleCalendarNavigate, onMdsCalendarChange: this.handleCalendarChange, onMdsCalendarPreselect: this.handleCalendarPreselect, startDate: this.internalStartDate, endDate: this.internalEndDate }, (this.min !== null && this.min !== '' ? { min: this.min } : {}), (this.max !== null && this.max !== '' ? { max: this.max } : {}))), hAsync("mds-calendar", Object.assign({ key: `${this.calendarKey}-end`, hideToday: this.hideToday, hidePreviousButton: true, disableMonthYearSelection: true, viewDate: this.getCalendarViewDate(1), onMdsCalendarNavigate: this.handleCalendarNavigate, onMdsCalendarChange: this.handleCalendarChange, onMdsCalendarPreselect: this.handleCalendarPreselect, startDate: this.internalStartDate, endDate: this.internalEndDate }, (this.min !== null && this.min !== '' ? { min: this.min } : {}), (this.max !== null && this.max !== '' ? { max: this.max } : {})))));
|
|
39986
40690
|
}
|
|
39987
40691
|
render() {
|
|
39988
|
-
return (hAsync(Host, { key: '
|
|
40692
|
+
return (hAsync(Host, { key: 'a4e8ec428307b1f97e36c7bb9043161492402c55', onClick: this.focusDateInput, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: 'b268dca893e7aed56b485ab2d4aac7da87cd2281', class: "inputs" }, hAsync("div", { key: '956cd85c968e0b390643e7faba8dbdb129c8f7ca', class: "input-element" }, hAsync("mds-text", { key: 'c87e22b6dca6c6128d01cfa0344650839727b457', class: "date-label", typography: "detail", onClick: this.focusStartDateInput }, this.t.get('from')), hAsync("div", { key: 'ee0e90044817fab1ea582e8a21bcb886771f5e28', class: "input-wrapper" }, hAsync("slot", { key: '85362085edd727aca5c20e969294c8d3e79f2c8a', name: "start" }))), hAsync("div", { key: 'e3839ed897233bf7a3f10f37304abc636bb9f595', class: "input-element" }, hAsync("mds-text", { key: '674476a4fcb3c532f4b06f55518d01405e1ade51', class: "date-label", typography: "detail", onClick: this.focusEndDateInput }, this.t.get('to')), hAsync("div", { key: 'f50b01476fa382d240b620e1036c05f7726f12b5', class: "input-wrapper" }, hAsync("slot", { key: 'f114e11c0715a6257374d40a16c2f8ab74ca68a2', name: "end" })))), hAsync("div", { key: '641ea2c039b9c275b0bcf37237fab78d17f9f0b2', class: "action-open-calendar-wrapper" }, hAsync("mds-button", { key: 'd24d7b2d4b0ba45e87388208499181031785ceb3', class: "action-open-calendar", disabled: this.isDisabled(), variant: "dark", tone: "text", icon: miBaselineCalendarToday, id: "calendar-dropdown", onClick: this.handleOpenCalendarClick })), hAsync("mds-dropdown", { key: '74b9b52ea2c08752de62593cc7d92db3552502ed', ref: (el) => (this.dropdownRef = el), target: "#calendar-dropdown", "disable-auto-placement": true, placement: "bottom-end", role: "group" }, this.dualCalendar ? this.renderDualCalendars() : this.renderSingleCalendar())));
|
|
39989
40693
|
}
|
|
39990
40694
|
syncFormValue() {
|
|
39991
40695
|
var _a, _b, _c, _d;
|
|
@@ -40005,6 +40709,15 @@ class MdsInputDateRange {
|
|
|
40005
40709
|
}],
|
|
40006
40710
|
"endDate": [{
|
|
40007
40711
|
"handleEndDateChange": 0
|
|
40712
|
+
}],
|
|
40713
|
+
"min": [{
|
|
40714
|
+
"handleRangeChange": 0
|
|
40715
|
+
}],
|
|
40716
|
+
"max": [{
|
|
40717
|
+
"handleRangeChange": 0
|
|
40718
|
+
}],
|
|
40719
|
+
"disabled": [{
|
|
40720
|
+
"handleDisabledChange": 0
|
|
40008
40721
|
}]
|
|
40009
40722
|
}; }
|
|
40010
40723
|
static get style() { return mdsInputDateRangeCss(); }
|
|
@@ -40021,17 +40734,19 @@ class MdsInputDateRange {
|
|
|
40021
40734
|
"hideToday": [516, "hide-today"],
|
|
40022
40735
|
"dualCalendar": [516, "dual-calendar"],
|
|
40023
40736
|
"name": [513],
|
|
40737
|
+
"disabled": [516],
|
|
40024
40738
|
"calendarKey": [32],
|
|
40025
40739
|
"internalStartDate": [32],
|
|
40026
40740
|
"internalEndDate": [32],
|
|
40027
40741
|
"visibleCalendarDate": [32],
|
|
40028
40742
|
"dropdownRef": [32],
|
|
40029
40743
|
"hasPreselection": [32],
|
|
40744
|
+
"formDisabled": [32],
|
|
40030
40745
|
"preselect": [64]
|
|
40031
40746
|
},
|
|
40032
40747
|
"$listeners$": undefined,
|
|
40033
40748
|
"$lazyBundleId$": "-",
|
|
40034
|
-
"$attrsToReflect$": [["startDate", "start-date"], ["endDate", "end-date"], ["min", "min"], ["max", "max"], ["delay", "delay"], ["hideToday", "hide-today"], ["dualCalendar", "dual-calendar"], ["name", "name"]]
|
|
40749
|
+
"$attrsToReflect$": [["startDate", "start-date"], ["endDate", "end-date"], ["min", "min"], ["max", "max"], ["delay", "delay"], ["hideToday", "hide-today"], ["dualCalendar", "dual-calendar"], ["name", "name"], ["disabled", "disabled"]]
|
|
40035
40750
|
}; }
|
|
40036
40751
|
}
|
|
40037
40752
|
|
|
@@ -40185,7 +40900,7 @@ var localeIt$p = {
|
|
|
40185
40900
|
digit: digit
|
|
40186
40901
|
};
|
|
40187
40902
|
|
|
40188
|
-
const mdsInputOtpCss = () => `@layer reset,vendor,theme,base,components,utilities;:host{display:inline-flex;gap:calc(var(--spacing,.0025rem)*400)}.input{width:calc(var(--spacing,.0025rem)*1200)}.input::part(field){text-align:center}.input::part(tip-count){display:none}`;
|
|
40903
|
+
const mdsInputOtpCss = () => `@layer reset,vendor,theme,base,components,utilities;:host{display:inline-flex;gap:calc(var(--spacing,.0025rem)*400)}.input{width:calc(var(--spacing,.0025rem)*1200)}.input::part(field){text-align:center}.input::part(tip-count),.input::part(tip-top){display:none}`;
|
|
40189
40904
|
|
|
40190
40905
|
class MdsInputOtp {
|
|
40191
40906
|
constructor(hostRef) {
|
|
@@ -40197,6 +40912,13 @@ class MdsInputOtp {
|
|
|
40197
40912
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
40198
40913
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
40199
40914
|
}
|
|
40915
|
+
// the value of load, which a form reset brings back as the value attribute of a native input
|
|
40916
|
+
this.loadValue = '';
|
|
40917
|
+
// the digit of each cell, by position: value joins them and drops the empty ones
|
|
40918
|
+
this.digits = [];
|
|
40919
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
40920
|
+
// around it, which disables the host but not the cells in its shadow root
|
|
40921
|
+
this.formDisabled = false;
|
|
40200
40922
|
this.t = new Locale$1({
|
|
40201
40923
|
el: localeEl$o,
|
|
40202
40924
|
en: localeEn$o,
|
|
@@ -40212,26 +40934,29 @@ class MdsInputOtp {
|
|
|
40212
40934
|
*/
|
|
40213
40935
|
this.autosubmit = false;
|
|
40214
40936
|
/**
|
|
40215
|
-
*
|
|
40937
|
+
* Disables every cell of the code, like a disabled native input: the code cannot be changed and
|
|
40938
|
+
* is left out of the form. A disabled `<fieldset>` around the component does the same.
|
|
40939
|
+
*/
|
|
40940
|
+
this.disabled = false;
|
|
40941
|
+
/**
|
|
40942
|
+
* The current value of the OTP code: a value set in the markup or by code fills the cells from
|
|
40943
|
+
* the first one
|
|
40216
40944
|
*/
|
|
40217
40945
|
this.value = '';
|
|
40218
|
-
this.
|
|
40219
|
-
const inputs = Array.from(this.element.shadowRoot.querySelectorAll('mds-input'));
|
|
40220
|
-
const otpCode = inputs.map((input) => input.value).join('');
|
|
40221
|
-
return otpCode;
|
|
40222
|
-
};
|
|
40946
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
40223
40947
|
this.setOtpDigit = (currentInput, digit) => {
|
|
40224
|
-
|
|
40225
|
-
const
|
|
40226
|
-
|
|
40227
|
-
|
|
40948
|
+
const index = Array.from(this.element.shadowRoot.querySelectorAll('mds-input')).indexOf(currentInput);
|
|
40949
|
+
const digits = [...this.digits];
|
|
40950
|
+
digits[index] = digit;
|
|
40951
|
+
this.digits = digits;
|
|
40952
|
+
this.updateValue();
|
|
40228
40953
|
};
|
|
40229
40954
|
this.submit = (currentInput) => {
|
|
40230
|
-
var _a;
|
|
40231
|
-
const isOtpCompleted = this.
|
|
40955
|
+
var _a, _b;
|
|
40956
|
+
const isOtpCompleted = ((_a = this.value) !== null && _a !== void 0 ? _a : '').length === this.length;
|
|
40232
40957
|
currentInput.blur();
|
|
40233
40958
|
if (this.autosubmit && isOtpCompleted) {
|
|
40234
|
-
(
|
|
40959
|
+
(_b = this.internals.form) === null || _b === void 0 ? void 0 : _b.requestSubmit();
|
|
40235
40960
|
}
|
|
40236
40961
|
};
|
|
40237
40962
|
this.handleKeyDown = (e) => {
|
|
@@ -40281,11 +41006,47 @@ class MdsInputOtp {
|
|
|
40281
41006
|
return ((_a = this.accessibleName) !== null && _a !== void 0 ? _a : '') !== '' ? `${this.accessibleName}, ${digit}` : digit;
|
|
40282
41007
|
};
|
|
40283
41008
|
}
|
|
41009
|
+
valueChanged(newValue) {
|
|
41010
|
+
// the value a typed digit writes already matches the cells
|
|
41011
|
+
if ((newValue !== null && newValue !== void 0 ? newValue : '') === this.digits.join(''))
|
|
41012
|
+
return;
|
|
41013
|
+
this.fillCells(newValue !== null && newValue !== void 0 ? newValue : '');
|
|
41014
|
+
}
|
|
41015
|
+
formDisabledCallback(disabled) {
|
|
41016
|
+
this.formDisabled = disabled;
|
|
41017
|
+
}
|
|
41018
|
+
/** Like a native input, a form reset brings back the code of load. */
|
|
41019
|
+
formResetCallback() {
|
|
41020
|
+
this.fillCells(this.loadValue);
|
|
41021
|
+
}
|
|
41022
|
+
componentWillLoad() {
|
|
41023
|
+
var _a;
|
|
41024
|
+
this.loadValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
|
|
41025
|
+
this.fillCells(this.loadValue);
|
|
41026
|
+
}
|
|
41027
|
+
/** Puts a code in the cells, from the first one, as many digits as there are cells. */
|
|
41028
|
+
fillCells(code) {
|
|
41029
|
+
this.digits = Array.from(code).slice(0, this.length);
|
|
41030
|
+
this.updateValue();
|
|
41031
|
+
}
|
|
41032
|
+
/** Joins the cells into value, the code the form submits. */
|
|
41033
|
+
updateValue() {
|
|
41034
|
+
this.value = this.digits.join('');
|
|
41035
|
+
setFormValue(this.internals, this.value);
|
|
41036
|
+
}
|
|
40284
41037
|
render() {
|
|
40285
|
-
return (hAsync(Host, { key: '
|
|
41038
|
+
return (hAsync(Host, { key: 'a04c64edf256fa28b732e52380df22b2fa452ed7' }, Array.from({ length: this.length }).map((_, index) => {
|
|
41039
|
+
var _a;
|
|
41040
|
+
return (hAsync("mds-input", { "aria-label": this.digitName(index), class: "input", disabled: this.isDisabled(), maxlength: 1, onKeyDown: this.handleKeyDown, onPaste: this.handlePaste, value: (_a = this.digits[index]) !== null && _a !== void 0 ? _a : '' }));
|
|
41041
|
+
})));
|
|
40286
41042
|
}
|
|
40287
41043
|
static get formAssociated() { return true; }
|
|
40288
41044
|
get element() { return getElement(this); }
|
|
41045
|
+
static get watchers() { return {
|
|
41046
|
+
"value": [{
|
|
41047
|
+
"valueChanged": 0
|
|
41048
|
+
}]
|
|
41049
|
+
}; }
|
|
40289
41050
|
static get style() { return mdsInputOtpCss(); }
|
|
40290
41051
|
static get cmpMeta() { return {
|
|
40291
41052
|
"$flags$": 73,
|
|
@@ -40294,15 +41055,18 @@ class MdsInputOtp {
|
|
|
40294
41055
|
"accessibleName": [1, "aria-label"],
|
|
40295
41056
|
"length": [2],
|
|
40296
41057
|
"autosubmit": [516],
|
|
40297
|
-
"
|
|
41058
|
+
"disabled": [516],
|
|
41059
|
+
"value": [1537],
|
|
41060
|
+
"digits": [32],
|
|
41061
|
+
"formDisabled": [32]
|
|
40298
41062
|
},
|
|
40299
41063
|
"$listeners$": undefined,
|
|
40300
41064
|
"$lazyBundleId$": "-",
|
|
40301
|
-
"$attrsToReflect$": [["autosubmit", "autosubmit"], ["value", "value"]]
|
|
41065
|
+
"$attrsToReflect$": [["autosubmit", "autosubmit"], ["disabled", "disabled"], ["value", "value"]]
|
|
40302
41066
|
}; }
|
|
40303
41067
|
}
|
|
40304
41068
|
|
|
40305
|
-
const mdsInputRangeCss = () => `@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(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-thumb-background:rgb(var(--magma-surface-overlay,var(--magma-tint-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(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-track-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-track-progress-background-disabled:rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-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);-webkit-transition-duration:var(--private-input-range-transition-duration);transition-duration:var(--private-input-range-transition-duration);transition-property:color;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.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(--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);-webkit-transition-duration:var(--private-input-range-transition-duration);transition-duration:var(--private-input-range-transition-duration);transition-property:background-color}.track-total{background-color:var(--mds-input-range-track-background);overflow:hidden;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);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])){--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([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(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))}:host([pref-contrast=more]){color:rgb(var(--magma-text-default,var(--magma-tint-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(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-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(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}}`;
|
|
41069
|
+
const mdsInputRangeCss = () => `@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(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-thumb-background:rgb(var(--magma-surface-overlay,var(--magma-tint-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(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-track-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-track-progress-background-disabled:rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-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);-webkit-transition-duration:var(--private-input-range-transition-duration);transition-duration:var(--private-input-range-transition-duration);transition-property:color;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.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(--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);-webkit-transition-duration:var(--private-input-range-transition-duration);transition-duration:var(--private-input-range-transition-duration);transition-property:background-color}.track-total{background-color:var(--mds-input-range-track-background);overflow:hidden;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);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(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))}:host([pref-contrast=more]){color:rgb(var(--magma-text-default,var(--magma-tint-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(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-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(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}}`;
|
|
40306
41070
|
|
|
40307
41071
|
/**
|
|
40308
41072
|
* @part header - The element containing the labels displayed over the input element
|
|
@@ -40320,6 +41084,9 @@ class MdsInputRange {
|
|
|
40320
41084
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
40321
41085
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
40322
41086
|
}
|
|
41087
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
41088
|
+
// around it, which disables the host but not the native control in its shadow root
|
|
41089
|
+
this.formDisabled = false;
|
|
40323
41090
|
/**
|
|
40324
41091
|
* The greatest value in the range of permitted values
|
|
40325
41092
|
*/
|
|
@@ -40334,25 +41101,31 @@ class MdsInputRange {
|
|
|
40334
41101
|
*/
|
|
40335
41102
|
this.step = 1;
|
|
40336
41103
|
this.onInput = () => {
|
|
40337
|
-
|
|
40338
|
-
throw Error(`Entered value ${this.inputElement.value} is not a Number`);
|
|
41104
|
+
// a range input always holds a number: the browser sanitizes anything else
|
|
40339
41105
|
// trigger valueChanged that update progress and emit event
|
|
40340
41106
|
this.value = Number(this.inputElement.value);
|
|
40341
41107
|
};
|
|
41108
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
41109
|
+
}
|
|
41110
|
+
/** As on a native input, a step that is not a positive number falls back to the default, 1. */
|
|
41111
|
+
allowedStep() {
|
|
41112
|
+
const step = Number(this.step);
|
|
41113
|
+
return step > 0 ? step : 1;
|
|
40342
41114
|
}
|
|
40343
41115
|
calculateProgress() {
|
|
40344
41116
|
// validate value
|
|
40345
41117
|
let v = Number(this.inputElement.value);
|
|
41118
|
+
const step = this.allowedStep();
|
|
40346
41119
|
// multiplier is needed to manage decimal value and step, so we can work with integer value and avoid decimal division
|
|
40347
|
-
const multiplier = Math.pow(10, this.
|
|
41120
|
+
const multiplier = Math.pow(10, this.countDecimals(step));
|
|
40348
41121
|
if (v > this.max)
|
|
40349
41122
|
v = this.max;
|
|
40350
41123
|
else if (v < this.min)
|
|
40351
41124
|
v = this.min;
|
|
40352
|
-
if (((v - this.min) * multiplier) % (
|
|
41125
|
+
if (((v - this.min) * multiplier) % (step * multiplier) !== 0) {
|
|
40353
41126
|
v =
|
|
40354
|
-
(Math.round((v * multiplier - this.min * multiplier) / (
|
|
40355
|
-
(
|
|
41127
|
+
(Math.round((v * multiplier - this.min * multiplier) / (step * multiplier)) *
|
|
41128
|
+
(step * multiplier) +
|
|
40356
41129
|
this.min * multiplier) /
|
|
40357
41130
|
multiplier;
|
|
40358
41131
|
}
|
|
@@ -40391,24 +41164,31 @@ class MdsInputRange {
|
|
|
40391
41164
|
this.calculateProgress();
|
|
40392
41165
|
}
|
|
40393
41166
|
stepChanged() {
|
|
40394
|
-
if (this.step <= 0)
|
|
40395
|
-
throw Error('step cant be negative or zero');
|
|
40396
|
-
this.decimalPlaces = this.countDecimals(this.step);
|
|
40397
41167
|
this.calculateProgress();
|
|
40398
41168
|
}
|
|
41169
|
+
formDisabledCallback(disabled) {
|
|
41170
|
+
this.formDisabled = disabled;
|
|
41171
|
+
}
|
|
41172
|
+
/** Like a native input, a form reset brings back the value of load, thumb included. */
|
|
40399
41173
|
formResetCallback() {
|
|
40400
|
-
|
|
41174
|
+
// an empty value makes the native input take its default, the middle of the range
|
|
41175
|
+
this.inputElement.value = this.loadValue === undefined ? '' : String(this.loadValue);
|
|
41176
|
+
this.onInput();
|
|
41177
|
+
}
|
|
41178
|
+
componentWillLoad() {
|
|
41179
|
+
var _a;
|
|
41180
|
+
const value = Number((_a = this.value) !== null && _a !== void 0 ? _a : NaN);
|
|
41181
|
+
this.loadValue = Number.isNaN(value) ? undefined : value;
|
|
40401
41182
|
}
|
|
40402
41183
|
componentDidLoad() {
|
|
40403
41184
|
var _a;
|
|
40404
|
-
this.decimalPlaces = this.countDecimals(this.step);
|
|
40405
41185
|
this.onInput(); // define value
|
|
40406
41186
|
this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
|
|
40407
41187
|
this.calculateProgress();
|
|
40408
41188
|
}
|
|
40409
41189
|
render() {
|
|
40410
41190
|
var _a;
|
|
40411
|
-
return (hAsync(Host, { key: '
|
|
41191
|
+
return (hAsync(Host, { key: 'd223cb20d2d286382af3b1605e4d77d1a77d67c0', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("header", { key: '2e618309f22f583ea4583901965a3669073ee17e', class: "header", part: "header" }, hAsync("mds-text", { key: 'cf89fae0a98b66a470ab220811af5cf1b1922f59', class: "label", typography: "label" }, hAsync("slot", { key: '392a0503e0ad2af44ecb9ce184713b5245a64063' })), hAsync("mds-text", { key: 'ab5f2a7fe91bae04199b100e6bc6711ccd6c6e2a', class: "value", typography: "label" }, this.formatValue ? this.formatValue(this.value) : this.value)), hAsync("div", { key: '5d5681f116e152979f0d329070be816173507caf', class: "range" }, hAsync("div", { key: 'f539571bbf87692d690b792ed8c638fd3f3810f7', class: "track", part: "track" }, hAsync("div", { key: '6b0eef0ba0ef24a80bf52bd04dce7d9ed2114ad4', class: "contrast-area" }), hAsync("div", { key: '622bce4e0e3edf7de827c64a8b97bd6ea90f7e67', class: "track-total" }, hAsync("div", { key: '1a05102fb4ebd2f8fa452df45302c6983aa0234d', class: "track-progress", style: { '--mds-input-range-progress': `${(_a = this.progress) !== null && _a !== void 0 ? _a : 0}` } }))), hAsync("input", { key: '81eb2d3245ab389890b14ee0aa6aec6324450933', ref: (el) => (this.inputElement = el), 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 }))));
|
|
40412
41192
|
}
|
|
40413
41193
|
static get formAssociated() { return true; }
|
|
40414
41194
|
get element() { return getElement(this); }
|
|
@@ -40441,7 +41221,8 @@ class MdsInputRange {
|
|
|
40441
41221
|
"step": [2],
|
|
40442
41222
|
"disabled": [1540],
|
|
40443
41223
|
"value": [1538],
|
|
40444
|
-
"progress": [32]
|
|
41224
|
+
"progress": [32],
|
|
41225
|
+
"formDisabled": [32]
|
|
40445
41226
|
},
|
|
40446
41227
|
"$listeners$": undefined,
|
|
40447
41228
|
"$lazyBundleId$": "-",
|
|
@@ -40467,8 +41248,14 @@ class MdsInputSelect {
|
|
|
40467
41248
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
40468
41249
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
40469
41250
|
}
|
|
41251
|
+
// true while value takes the selection of the native select, which must not be applied back:
|
|
41252
|
+
// with multiple, selecting the first option alone would drop the others
|
|
41253
|
+
this.adoptingSelection = false;
|
|
40470
41254
|
// @State() selected: boolean
|
|
40471
41255
|
this.hasFocus = false;
|
|
41256
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
41257
|
+
// around it, which disables the host but not the native control in its shadow root
|
|
41258
|
+
this.formDisabled = false;
|
|
40472
41259
|
/**
|
|
40473
41260
|
* If true, the element is displayed as disabled
|
|
40474
41261
|
*/
|
|
@@ -40489,11 +41276,10 @@ class MdsInputSelect {
|
|
|
40489
41276
|
* Specifies the value of the component
|
|
40490
41277
|
*/
|
|
40491
41278
|
this.value = '';
|
|
40492
|
-
this.
|
|
40493
|
-
|
|
40494
|
-
|
|
40495
|
-
|
|
40496
|
-
}
|
|
41279
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
41280
|
+
this.onInput = () => {
|
|
41281
|
+
this.adoptSelection();
|
|
41282
|
+
this.syncSelection();
|
|
40497
41283
|
};
|
|
40498
41284
|
this.onBlur = () => {
|
|
40499
41285
|
this.hasFocus = false;
|
|
@@ -40503,6 +41289,7 @@ class MdsInputSelect {
|
|
|
40503
41289
|
};
|
|
40504
41290
|
// a removed attribute or a null bound by a framework counts as no placeholder, like ''
|
|
40505
41291
|
this.hasPlaceholder = () => { var _a; return ((_a = this.placeholder) !== null && _a !== void 0 ? _a : '') !== ''; };
|
|
41292
|
+
this.placeholderOption = () => { var _a, _b; return (_b = (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.querySelector('.placeholder-option')) !== null && _b !== void 0 ? _b : null; };
|
|
40506
41293
|
this.emptyOptions = () => {
|
|
40507
41294
|
var _a;
|
|
40508
41295
|
const select = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('select');
|
|
@@ -40536,20 +41323,8 @@ class MdsInputSelect {
|
|
|
40536
41323
|
var _a;
|
|
40537
41324
|
(_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.appendChild(element.cloneNode(true));
|
|
40538
41325
|
});
|
|
40539
|
-
this.
|
|
40540
|
-
|
|
40541
|
-
this.setCurrentValue = () => {
|
|
40542
|
-
var _a;
|
|
40543
|
-
if (this.selectEl == null)
|
|
40544
|
-
return;
|
|
40545
|
-
if (this.value != null && this.value !== '' && this.value !== 0 && !Number.isNaN(this.value)) {
|
|
40546
|
-
this.selectEl.querySelectorAll('option').forEach((element) => {
|
|
40547
|
-
element.selected = element.value === this.value;
|
|
40548
|
-
});
|
|
40549
|
-
}
|
|
40550
|
-
else if (!this.hasPlaceholder()) {
|
|
40551
|
-
this.value = (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.querySelectorAll('option')[0].value;
|
|
40552
|
-
}
|
|
41326
|
+
this.applySelection(true);
|
|
41327
|
+
this.syncSelection();
|
|
40553
41328
|
};
|
|
40554
41329
|
}
|
|
40555
41330
|
/**
|
|
@@ -40563,10 +41338,67 @@ class MdsInputSelect {
|
|
|
40563
41338
|
* Emits the change event when the component value changes
|
|
40564
41339
|
*/
|
|
40565
41340
|
valueChanged() {
|
|
41341
|
+
if (this.adoptingSelection)
|
|
41342
|
+
return;
|
|
41343
|
+
this.applySelection(false);
|
|
41344
|
+
this.syncSelection();
|
|
41345
|
+
}
|
|
41346
|
+
requiredChanged() {
|
|
41347
|
+
this.updateFormValidity();
|
|
41348
|
+
}
|
|
41349
|
+
nameChanged() {
|
|
41350
|
+
this.updateFormValue(this.selectedValues());
|
|
41351
|
+
}
|
|
41352
|
+
/** The values of the selected options, the placeholder left out. */
|
|
41353
|
+
selectedValues() {
|
|
41354
|
+
var _a;
|
|
41355
|
+
if (this.selectEl == null) {
|
|
41356
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '' ? [] : [this.value.toString()];
|
|
41357
|
+
}
|
|
41358
|
+
return Array.from(this.selectEl.selectedOptions)
|
|
41359
|
+
.filter((option) => !option.classList.contains('placeholder-option'))
|
|
41360
|
+
.map((option) => option.value);
|
|
41361
|
+
}
|
|
41362
|
+
/**
|
|
41363
|
+
* Reports the selection to the form and emits the change, once per selection: a single select
|
|
41364
|
+
* submits its value, a multiple one an entry per selected option under `name`, as a native
|
|
41365
|
+
* select.
|
|
41366
|
+
*/
|
|
41367
|
+
syncSelection() {
|
|
41368
|
+
var _a;
|
|
41369
|
+
const values = this.selectedValues();
|
|
41370
|
+
this.updateFormValue(values);
|
|
41371
|
+
this.updateFormValidity();
|
|
41372
|
+
const value = (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString();
|
|
41373
|
+
const selection = JSON.stringify([value, values]);
|
|
41374
|
+
if (selection === this.emittedSelection)
|
|
41375
|
+
return;
|
|
41376
|
+
this.emittedSelection = selection;
|
|
41377
|
+
this.changeEvent.emit({ value, values });
|
|
41378
|
+
}
|
|
41379
|
+
updateFormValue(values) {
|
|
40566
41380
|
var _a, _b, _c;
|
|
40567
|
-
|
|
40568
|
-
|
|
40569
|
-
|
|
41381
|
+
if (!this.multiple) {
|
|
41382
|
+
setFormValue(this.internals, (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null);
|
|
41383
|
+
return;
|
|
41384
|
+
}
|
|
41385
|
+
const name = (_c = this.name) !== null && _c !== void 0 ? _c : '';
|
|
41386
|
+
if (name === '' || values.length === 0) {
|
|
41387
|
+
setFormValue(this.internals, null);
|
|
41388
|
+
return;
|
|
41389
|
+
}
|
|
41390
|
+
const data = new FormData();
|
|
41391
|
+
values.forEach((value) => data.append(name, value));
|
|
41392
|
+
setFormValue(this.internals, data);
|
|
41393
|
+
}
|
|
41394
|
+
/**
|
|
41395
|
+
* Reports to the form a required select left empty: like a native `required`, it stops the
|
|
41396
|
+
* submit of its form.
|
|
41397
|
+
*/
|
|
41398
|
+
updateFormValidity() {
|
|
41399
|
+
var _a;
|
|
41400
|
+
const missing = this.required && ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '';
|
|
41401
|
+
updateValidity(this.internals, missing ? { rule: 'requiredSelect' } : undefined, this.selectEl);
|
|
40570
41402
|
}
|
|
40571
41403
|
disabledChanged(newValue) {
|
|
40572
41404
|
/**
|
|
@@ -40586,11 +41418,15 @@ class MdsInputSelect {
|
|
|
40586
41418
|
* @param oldValue placeholder old value
|
|
40587
41419
|
*/
|
|
40588
41420
|
placeholderChanged(newValue, oldValue) {
|
|
41421
|
+
if (this.selectEl == null)
|
|
41422
|
+
return;
|
|
40589
41423
|
if (newValue != null && newValue !== '' && (oldValue !== null && oldValue !== void 0 ? oldValue : '') === '') {
|
|
40590
|
-
|
|
41424
|
+
// the placeholder of this select, in its shadow root, not one of the page
|
|
41425
|
+
let defaultOption = this.placeholderOption();
|
|
40591
41426
|
if (defaultOption)
|
|
40592
41427
|
defaultOption.remove();
|
|
40593
41428
|
defaultOption = document.createElement('option');
|
|
41429
|
+
defaultOption.className = 'placeholder-option';
|
|
40594
41430
|
this.selectEl.insertBefore(defaultOption, this.selectEl.firstChild);
|
|
40595
41431
|
defaultOption.value = '';
|
|
40596
41432
|
defaultOption.text = newValue;
|
|
@@ -40605,8 +41441,29 @@ class MdsInputSelect {
|
|
|
40605
41441
|
defaultOption.disabled = true;
|
|
40606
41442
|
}
|
|
40607
41443
|
}
|
|
41444
|
+
formDisabledCallback(disabled) {
|
|
41445
|
+
this.formDisabled = disabled;
|
|
41446
|
+
}
|
|
41447
|
+
/**
|
|
41448
|
+
* Like a native select, a form reset brings the options back to the selection of the markup,
|
|
41449
|
+
* the placeholder when the markup selects none, and the value of load on top.
|
|
41450
|
+
*/
|
|
40608
41451
|
formResetCallback() {
|
|
40609
|
-
|
|
41452
|
+
if (this.selectEl == null)
|
|
41453
|
+
return;
|
|
41454
|
+
const options = Array.from(this.selectEl.querySelectorAll('option'));
|
|
41455
|
+
options.forEach((option) => {
|
|
41456
|
+
option.selected = option.defaultSelected;
|
|
41457
|
+
});
|
|
41458
|
+
const placeholder = this.placeholderOption();
|
|
41459
|
+
if (placeholder && this.hasPlaceholder() && !options.some((option) => option.defaultSelected)) {
|
|
41460
|
+
placeholder.selected = true;
|
|
41461
|
+
}
|
|
41462
|
+
this.adoptingSelection = true;
|
|
41463
|
+
this.value = this.loadValue;
|
|
41464
|
+
this.adoptingSelection = false;
|
|
41465
|
+
this.applySelection(true);
|
|
41466
|
+
this.syncSelection();
|
|
40610
41467
|
}
|
|
40611
41468
|
componentWillLoad() {
|
|
40612
41469
|
// needed for react component, this prop should be used as default-value html attributo instead of defaultValue prop
|
|
@@ -40616,19 +41473,64 @@ class MdsInputSelect {
|
|
|
40616
41473
|
!Number.isNaN(this.defaultValue)) {
|
|
40617
41474
|
this.value = this.defaultValue;
|
|
40618
41475
|
}
|
|
41476
|
+
this.loadValue = this.value;
|
|
41477
|
+
}
|
|
41478
|
+
componentDidRender() {
|
|
41479
|
+
// the select the message points at exists from the first render on
|
|
41480
|
+
this.updateFormValidity();
|
|
40619
41481
|
}
|
|
40620
41482
|
componentDidLoad() {
|
|
40621
|
-
if (this.
|
|
41483
|
+
if (!this.multiple &&
|
|
41484
|
+
this.value != null &&
|
|
41485
|
+
this.value !== '' &&
|
|
41486
|
+
this.value !== 0 &&
|
|
41487
|
+
!Number.isNaN(this.value)) {
|
|
40622
41488
|
setFormValue(this.internals, this.value.toString());
|
|
40623
41489
|
}
|
|
40624
41490
|
}
|
|
41491
|
+
/** Sets value to the selection of the native select, without applying it back. */
|
|
41492
|
+
adoptSelection() {
|
|
41493
|
+
if (this.selectEl == null)
|
|
41494
|
+
return;
|
|
41495
|
+
this.adoptingSelection = true;
|
|
41496
|
+
this.value = this.selectEl.value;
|
|
41497
|
+
this.adoptingSelection = false;
|
|
41498
|
+
}
|
|
41499
|
+
/**
|
|
41500
|
+
* Applies value to the options. A value selects its option alone, as `select.value` does, with
|
|
41501
|
+
* `multiple` too. Without a value, the select keeps the options the markup selects, or its own
|
|
41502
|
+
* default, when `fromMarkup`; a value cleared by code clears the selection instead, down to the
|
|
41503
|
+
* placeholder or, without one, the first option a single select falls back to.
|
|
41504
|
+
*/
|
|
41505
|
+
applySelection(fromMarkup) {
|
|
41506
|
+
if (this.selectEl == null)
|
|
41507
|
+
return;
|
|
41508
|
+
if (this.value != null && this.value !== '' && this.value !== 0 && !Number.isNaN(this.value)) {
|
|
41509
|
+
this.selectEl.querySelectorAll('option').forEach((element) => {
|
|
41510
|
+
element.selected = element.value === this.value;
|
|
41511
|
+
});
|
|
41512
|
+
return;
|
|
41513
|
+
}
|
|
41514
|
+
if (fromMarkup) {
|
|
41515
|
+
this.adoptSelection();
|
|
41516
|
+
return;
|
|
41517
|
+
}
|
|
41518
|
+
this.selectEl.querySelectorAll('option').forEach((element) => {
|
|
41519
|
+
element.selected = false;
|
|
41520
|
+
});
|
|
41521
|
+
const placeholder = this.placeholderOption();
|
|
41522
|
+
if (placeholder && this.hasPlaceholder())
|
|
41523
|
+
placeholder.selected = true;
|
|
41524
|
+
this.adoptSelection();
|
|
41525
|
+
}
|
|
40625
41526
|
render() {
|
|
40626
|
-
|
|
41527
|
+
var _a;
|
|
41528
|
+
return (hAsync(Host, { key: 'cbdd53b56d64ee8ace9cf091d86ec6a529415f7b', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("select", { key: 'df3ffc167f4452b6b098720eff7b01abf6088d84', "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.size, part: "select", ref: (el) => (this.selectEl = el) }, hAsync("option", { key: '3372af1fe267f93fe42751dc264c8fa1be41a681', class: "placeholder-option", value: "", disabled: !this.required ? undefined : true, selected: this.defaultValue != null &&
|
|
40627
41529
|
this.defaultValue !== '' &&
|
|
40628
41530
|
this.defaultValue !== 0 &&
|
|
40629
41531
|
!Number.isNaN(this.defaultValue)
|
|
40630
41532
|
? undefined
|
|
40631
|
-
: true }, this.placeholder)), hAsync("div", { key: '
|
|
41533
|
+
: true }, this.placeholder)), hAsync("div", { key: '2054fdad7eb96317127f0a5f5d3545c51be98a6e', class: "icon-container" }, hAsync("mds-icon", { key: '8f7c8a2377912ec8c62b04f95fcb15b97c46deed', class: "icon", name: miBaselineKeyboardArrowDown })), hAsync("div", { key: 'f9b5a34c5f60d2a8d2c8ee8be5e8b8a0f3bd3800', class: "option-container" }, hAsync("slot", { key: '5c03186b7deca1d7bd2aba50b03f7bf7e6038f29', onSlotchange: this.onSlotChangeHandler })), hAsync("mds-input-tip", { key: 'b7013f98b08bfa532df0cc602cc0683c762af2b7', position: "top", active: this.hasFocus, part: "tip-top" }, this.isDisabled() && (hAsync("mds-input-tip-item", { key: '2519d758e2ca30c6886b39c0fffbe50a7d33f016', expanded: true, variant: "disabled" })), this.required && (hAsync("mds-input-tip-item", { key: 'a6db53481ffe5d62cd31a3eae0be3ad3c4b77828', expanded: this.hasFocus, variant: ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '' ? 'required' : 'required-success' })))));
|
|
40632
41534
|
}
|
|
40633
41535
|
static get formAssociated() { return true; }
|
|
40634
41536
|
get host() { return getElement(this); }
|
|
@@ -40636,6 +41538,12 @@ class MdsInputSelect {
|
|
|
40636
41538
|
"value": [{
|
|
40637
41539
|
"valueChanged": 0
|
|
40638
41540
|
}],
|
|
41541
|
+
"required": [{
|
|
41542
|
+
"requiredChanged": 0
|
|
41543
|
+
}],
|
|
41544
|
+
"name": [{
|
|
41545
|
+
"nameChanged": 0
|
|
41546
|
+
}],
|
|
40639
41547
|
"disabled": [{
|
|
40640
41548
|
"disabledChanged": 0
|
|
40641
41549
|
}],
|
|
@@ -40661,6 +41569,7 @@ class MdsInputSelect {
|
|
|
40661
41569
|
"defaultValue": [520, "default-value"],
|
|
40662
41570
|
"variant": [513],
|
|
40663
41571
|
"hasFocus": [32],
|
|
41572
|
+
"formDisabled": [32],
|
|
40664
41573
|
"setValue": [64]
|
|
40665
41574
|
},
|
|
40666
41575
|
"$listeners$": undefined,
|
|
@@ -40730,7 +41639,7 @@ var localeIt$o = {
|
|
|
40730
41639
|
unselect: unselect
|
|
40731
41640
|
};
|
|
40732
41641
|
|
|
40733
|
-
const mdsInputSwitchCss = () => `@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,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-switch-animation-timing-adjust:1.4;--mds-input-switch-animation-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-padding-lg:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding-md:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding-sm:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem)*100));--mds-input-switch-duration:.3s;--mds-input-switch-icon-color-checked-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-unchecked:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem) * 600)) * 2) + calc(var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem) * 100)) * 2));--mds-input-switch-toggle-size-lg:calc(var(--spacing,.0025rem)*800);--mds-input-switch-toggle-size-md:calc(var(--spacing,.0025rem)*600);--mds-input-switch-toggle-size-sm:calc(var(--spacing,.0025rem)*400);--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600));align-items:flex-start;display:inline-flex;gap:calc(var(--spacing,.0025rem)*200)}.field{height:0;margin:0;opacity:0;pointer-events:none;position:absolute;width:0}.label-icon{align-items:baseline;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));border-radius:var(--radius);cursor:pointer;display:flex;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));position:relative;transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-property:outline-offset,opacity;transition-timing-function:ease-in-out}.field:focus-visible+.label-icon,.label-icon:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.label-text{cursor:pointer;display:flex}.label-text--empty{display:none}:host([type=switch]) .label-text{align-items:center;align-self:center}.icon-explicit{fill:var(--mds-input-switch-icon-explicit-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));height:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600));width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}.icon-typography-checked,.icon-typography-unchecked{align-items:center;display:inline-flex}.icon-typography-checked{left:0;position:absolute;top:0}.switch-container{align-self:stretch;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));border-radius:var(--radius-full,1000px);box-sizing:border-box;display:flex;flex-shrink: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-property:width,outline-offset,opacity;transition-timing-function:ease-in-out;width:var(--mds-input-switch-toggle-container-size,calc(var(--spacing,.0025rem)*600*2 + var(--spacing,.0025rem)*100*2))}.field:focus-visible+.switch-container,.switch-container:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.switch{background-color:var(--mds-input-switch-box-color-enabled-unchecked,rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140)))));box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;height:min-content;padding:var(--mds-input-switch-box-padding,calc(var(--spacing,.0025rem)*100));-webkit-transition-duration:var(--mds-input-switch-duration,.3s);transition-duration:var(--mds-input-switch-duration,.3s);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);width:var(--mds-input-switch-toggle-container-size,calc(var(--spacing,.0025rem)*600*2 + var(--spacing,.0025rem)*100*2))}.switch,.switch-toggle{border-radius:var(--radius-full,1000px)}.switch-toggle{align-items:center;-webkit-animation-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);animation-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);animation-fill-mode:forwards;animation-iteration-count:1;animation-name:none;animation-play-state:paused;-webkit-animation-timing-function:var(--mds-input-switch-animation-timing-function);animation-timing-function:var(--mds-input-switch-animation-timing-function);background-color:var(--mds-input-switch-toggle-color-enabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));-webkit-box-shadow:var(--shadow);box-shadow:var(--shadow);display:flex;height:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600));justify-content:center;-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;-webkit-transition-timing-function:var(--ease-linear);transition-timing-function:var(--ease-linear);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}.field:checked+.switch-container .switch{background-color:var(--mds-input-switch-box-color-enabled-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))))}.field:checked+.switch-container .switch-toggle{animation-name:check;-webkit-animation-play-state:initial;animation-play-state:initial;background-color:var(--mds-input-switch-toggle-color-enabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}.field:not(:checked)+.dirty .switch-toggle{animation-name:uncheck;-webkit-animation-play-state:initial;animation-play-state:initial;background-color:var(--mds-input-switch-toggle-color-enabled-unchecked,rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237)))))}.field:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-unchecked,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.field:checked:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-checked,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.field:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-unchecked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}.field:checked:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}@keyframes check{0%{transform:translate(0);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem) * 600)) * var(--mds-input-switch-animation-timing-adjust,1.4))}to{transform:translate(100%);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}}@keyframes uncheck{0%{transform:translate(100%);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem) * 600)) * var(--mds-input-switch-animation-timing-adjust,1.4))}to{transform:translate(0);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}}:host([disabled]){pointer-events:none}.icon-checked,.icon-unchecked{--tw-font-weight:var(--font-weight-normal,400);font-weight:var(--font-weight-normal,400);-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:fill,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.icon-unchecked{fill:var(--mds-input-switch-icon-color-unchecked,rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99)))));opacity:1;transform:scale(1)}.icon-checked,.icon-unchecked{-webkit-transition-duration:var(--mds-input-switch-duration,.3s);transition-duration:var(--mds-input-switch-duration,.3s)}.icon-checked{fill:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));transform:scale(0)}.field:disabled+.label-icon,.field:disabled+.label-icon+.label-text{cursor:default}.field:checked+.label-icon .icon-unchecked{opacity:0;transform:scale(1.5);-webkit-transition-duration:calc(var(--mds-input-switch-duration,.3s)*2);transition-duration:calc(var(--mds-input-switch-duration,.3s)*2)}.field:checked+.label-icon .icon-checked{transform:scale(1);-webkit-transition-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);transition-duration:calc(var(--mds-input-switch-duration,.3s)*1.5)}.field:disabled+.label-icon .icon-unchecked{fill:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:disabled+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:disabled:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));transform:scale(1)}:host([explicit]:not([disabled]):not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked,rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99)))))}:host([explicit][checked]:not([disabled])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))))}:host([explicit][checked][disabled]){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}:host([explicit][disabled]:not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-border,var(--magma-tint-accent-border,var(--variant-primary-06,148 172 218))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}:host([size=sm]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-sm,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-sm,calc(var(--spacing,.0025rem)*400));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-sm,calc(var(--spacing,.0025rem) * 400)) * 2) + calc(var(--mds-input-switch-box-padding-sm,calc(var(--spacing,.0025rem) * 100)) * 2))}:host([size=md]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem) * 600)) * 2) + calc(var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem) * 100)) * 2))}:host([size=lg]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-lg,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-lg,calc(var(--spacing,.0025rem)*800));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-lg,calc(var(--spacing,.0025rem) * 800)) * 2) + calc(var(--mds-input-switch-box-padding-lg,calc(var(--spacing,.0025rem) * 100)) * 2))}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-border,var(--magma-tint-accent-border,var(--variant-primary-06,148 172 218))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}}`;
|
|
41642
|
+
const mdsInputSwitchCss = () => `@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,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-switch-animation-timing-adjust:1.4;--mds-input-switch-animation-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-padding-lg:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding-md:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding-sm:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem)*100));--mds-input-switch-duration:.3s;--mds-input-switch-icon-color-checked-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-unchecked:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem) * 600)) * 2) + calc(var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem) * 100)) * 2));--mds-input-switch-toggle-size-lg:calc(var(--spacing,.0025rem)*800);--mds-input-switch-toggle-size-md:calc(var(--spacing,.0025rem)*600);--mds-input-switch-toggle-size-sm:calc(var(--spacing,.0025rem)*400);--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600));align-items:flex-start;display:inline-flex;gap:calc(var(--spacing,.0025rem)*200)}.field{height:0;margin:0;opacity:0;pointer-events:none;position:absolute;width:0}.label-icon{align-items:baseline;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));border-radius:var(--radius);cursor:pointer;display:flex;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));position:relative;transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-property:outline-offset,opacity;transition-timing-function:ease-in-out}.field:focus-visible+.label-icon,.label-icon:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.label-text{cursor:pointer;display:flex}.label-text--empty{display:none}:host([type=switch]) .label-text{align-items:center;align-self:center}.icon-explicit{fill:var(--mds-input-switch-icon-explicit-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));height:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600));width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}.icon-typography-checked,.icon-typography-unchecked{align-items:center;display:inline-flex}.icon-typography-checked{left:0;position:absolute;top:0}.switch-container{align-self:stretch;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));border-radius:var(--radius-full,1000px);box-sizing:border-box;display:flex;flex-shrink: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-property:width,outline-offset,opacity;transition-timing-function:ease-in-out;width:var(--mds-input-switch-toggle-container-size,calc(var(--spacing,.0025rem)*600*2 + var(--spacing,.0025rem)*100*2))}.field:focus-visible+.switch-container,.switch-container:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.switch{background-color:var(--mds-input-switch-box-color-enabled-unchecked,rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140)))));box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;height:min-content;padding:var(--mds-input-switch-box-padding,calc(var(--spacing,.0025rem)*100));-webkit-transition-duration:var(--mds-input-switch-duration,.3s);transition-duration:var(--mds-input-switch-duration,.3s);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);width:var(--mds-input-switch-toggle-container-size,calc(var(--spacing,.0025rem)*600*2 + var(--spacing,.0025rem)*100*2))}.switch,.switch-toggle{border-radius:var(--radius-full,1000px)}.switch-toggle{align-items:center;-webkit-animation-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);animation-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);animation-fill-mode:forwards;animation-iteration-count:1;animation-name:none;animation-play-state:paused;-webkit-animation-timing-function:var(--mds-input-switch-animation-timing-function);animation-timing-function:var(--mds-input-switch-animation-timing-function);background-color:var(--mds-input-switch-toggle-color-enabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));-webkit-box-shadow:var(--shadow);box-shadow:var(--shadow);display:flex;height:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600));justify-content:center;-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;-webkit-transition-timing-function:var(--ease-linear);transition-timing-function:var(--ease-linear);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}.field:checked+.switch-container .switch{background-color:var(--mds-input-switch-box-color-enabled-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))))}.field:checked+.switch-container .switch-toggle{animation-name:check;-webkit-animation-play-state:initial;animation-play-state:initial;background-color:var(--mds-input-switch-toggle-color-enabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}.field:not(:checked)+.dirty .switch-toggle{animation-name:uncheck;-webkit-animation-play-state:initial;animation-play-state:initial;background-color:var(--mds-input-switch-toggle-color-enabled-unchecked,rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237)))))}.field:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-unchecked,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.field:checked:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-checked,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.field:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-unchecked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}.field:checked:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}@keyframes check{0%{transform:translate(0);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem) * 600)) * var(--mds-input-switch-animation-timing-adjust,1.4))}to{transform:translate(100%);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}}@keyframes uncheck{0%{transform:translate(100%);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem) * 600)) * var(--mds-input-switch-animation-timing-adjust,1.4))}to{transform:translate(0);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}}:host(:disabled),:host([disabled]){pointer-events:none}.icon-checked,.icon-unchecked{--tw-font-weight:var(--font-weight-normal,400);font-weight:var(--font-weight-normal,400);-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:fill,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.icon-unchecked{fill:var(--mds-input-switch-icon-color-unchecked,rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99)))));opacity:1;transform:scale(1)}.icon-checked,.icon-unchecked{-webkit-transition-duration:var(--mds-input-switch-duration,.3s);transition-duration:var(--mds-input-switch-duration,.3s)}.icon-checked{fill:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));transform:scale(0)}.field:disabled+.label-icon,.field:disabled+.label-icon+.label-text{cursor:default}.field:checked+.label-icon .icon-unchecked{opacity:0;transform:scale(1.5);-webkit-transition-duration:calc(var(--mds-input-switch-duration,.3s)*2);transition-duration:calc(var(--mds-input-switch-duration,.3s)*2)}.field:checked+.label-icon .icon-checked{transform:scale(1);-webkit-transition-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);transition-duration:calc(var(--mds-input-switch-duration,.3s)*1.5)}.field:disabled+.label-icon .icon-unchecked{fill:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:disabled+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:disabled:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));transform:scale(1)}:host([explicit]:not([disabled]):not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked,rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99)))))}:host([explicit][checked]:not([disabled])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))))}:host([explicit][checked][disabled]){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}:host([explicit][disabled]:not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-border,var(--magma-tint-accent-border,var(--variant-primary-06,148 172 218))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}:host([size=sm]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-sm,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-sm,calc(var(--spacing,.0025rem)*400));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-sm,calc(var(--spacing,.0025rem) * 400)) * 2) + calc(var(--mds-input-switch-box-padding-sm,calc(var(--spacing,.0025rem) * 100)) * 2))}:host([size=md]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem) * 600)) * 2) + calc(var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem) * 100)) * 2))}:host([size=lg]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-lg,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-lg,calc(var(--spacing,.0025rem)*800));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-lg,calc(var(--spacing,.0025rem) * 800)) * 2) + calc(var(--mds-input-switch-box-padding-lg,calc(var(--spacing,.0025rem) * 100)) * 2))}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-border,var(--magma-tint-accent-border,var(--variant-primary-06,148 172 218))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}}`;
|
|
40734
41643
|
|
|
40735
41644
|
/**
|
|
40736
41645
|
* @slot - Put text string or elements here
|
|
@@ -40746,7 +41655,13 @@ class MdsInputSwitch {
|
|
|
40746
41655
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
40747
41656
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
40748
41657
|
}
|
|
41658
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
41659
|
+
// around it, which disables the host but not the native control in its shadow root
|
|
41660
|
+
this.formDisabled = false;
|
|
40749
41661
|
this.km = new KeyboardManager();
|
|
41662
|
+
// the checked state of load, which a form reset brings back as the checked attribute of a
|
|
41663
|
+
// native input
|
|
41664
|
+
this.loadChecked = false;
|
|
40750
41665
|
this.dirty = false;
|
|
40751
41666
|
this.hasText = false;
|
|
40752
41667
|
this.t = new Locale$1({
|
|
@@ -40779,27 +41694,35 @@ class MdsInputSwitch {
|
|
|
40779
41694
|
* Specifies the value of the input element
|
|
40780
41695
|
*/
|
|
40781
41696
|
this.value = '';
|
|
41697
|
+
/**
|
|
41698
|
+
* Unchecks the other radios of the group, as a native radio does: the same name in the same
|
|
41699
|
+
* form and the same tree. A radio without a name is a group of its own.
|
|
41700
|
+
*/
|
|
40782
41701
|
this.uncheckSiblings = () => {
|
|
40783
|
-
|
|
40784
|
-
|
|
40785
|
-
|
|
41702
|
+
var _a;
|
|
41703
|
+
if (((_a = this.name) !== null && _a !== void 0 ? _a : '') === '')
|
|
41704
|
+
return;
|
|
41705
|
+
const root = this.host.getRootNode();
|
|
41706
|
+
const form = this.host.closest('form');
|
|
41707
|
+
root
|
|
41708
|
+
.querySelectorAll('mds-input-switch[type="radio"]')
|
|
41709
|
+
.forEach((element) => {
|
|
41710
|
+
if (element !== this.host &&
|
|
41711
|
+
element.name === this.name &&
|
|
41712
|
+
element.closest('form') === form) {
|
|
40786
41713
|
element.checked = false;
|
|
40787
41714
|
}
|
|
40788
41715
|
});
|
|
40789
41716
|
};
|
|
40790
41717
|
this.handleInputOnChange = (e) => {
|
|
40791
|
-
var _a
|
|
41718
|
+
var _a;
|
|
40792
41719
|
const { value } = e.target;
|
|
40793
41720
|
e.preventDefault();
|
|
40794
41721
|
e.stopPropagation();
|
|
40795
41722
|
const input = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('field');
|
|
40796
41723
|
this.checked = input.checked;
|
|
40797
41724
|
this.indeterminate = false;
|
|
40798
|
-
if (this.type === 'radio') {
|
|
40799
|
-
this.uncheckSiblings();
|
|
40800
|
-
}
|
|
40801
41725
|
this.changeEvent.emit({ name: this.name, checked: this.checked, value });
|
|
40802
|
-
setFormValue(this.internals, this.checked ? ((_b = this.value) !== null && _b !== void 0 ? _b : null) : null);
|
|
40803
41726
|
};
|
|
40804
41727
|
this.handleDirty = () => {
|
|
40805
41728
|
this.dirty = true;
|
|
@@ -40810,6 +41733,12 @@ class MdsInputSwitch {
|
|
|
40810
41733
|
this.km.addElement((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.field'));
|
|
40811
41734
|
this.km.attachClickBehavior();
|
|
40812
41735
|
};
|
|
41736
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
41737
|
+
}
|
|
41738
|
+
/** Submits the value while checked and enabled, nothing otherwise, as a native input. */
|
|
41739
|
+
updateFormValue() {
|
|
41740
|
+
var _a;
|
|
41741
|
+
setFormValue(this.internals, this.checked && !this.disabled ? ((_a = this.value) !== null && _a !== void 0 ? _a : null) : null);
|
|
40813
41742
|
}
|
|
40814
41743
|
disabledChanged(newValue) {
|
|
40815
41744
|
/**
|
|
@@ -40817,31 +41746,50 @@ class MdsInputSwitch {
|
|
|
40817
41746
|
* if solved, please check mds-button, mds-input, mds-input-*
|
|
40818
41747
|
* https://github.com/ionic-team/stencil/issues/5461
|
|
40819
41748
|
*/
|
|
40820
|
-
if (newValue) {
|
|
40821
|
-
setFormValue(this.internals, null);
|
|
40822
|
-
return;
|
|
40823
|
-
}
|
|
40824
41749
|
if (newValue === false) {
|
|
41750
|
+
// the watcher runs again with undefined
|
|
40825
41751
|
this.disabled = undefined;
|
|
41752
|
+
return;
|
|
40826
41753
|
}
|
|
41754
|
+
this.updateFormValue();
|
|
40827
41755
|
}
|
|
41756
|
+
/**
|
|
41757
|
+
* The form value follows every change of checked, by the user or by code; a radio checked
|
|
41758
|
+
* unchecks the others of its group, which clear their own form value.
|
|
41759
|
+
*/
|
|
40828
41760
|
checkedChanged(newValue) {
|
|
40829
41761
|
if (newValue === false) {
|
|
41762
|
+
// the watcher runs again with undefined
|
|
40830
41763
|
this.checked = undefined;
|
|
41764
|
+
return;
|
|
40831
41765
|
}
|
|
41766
|
+
if (newValue && this.type === 'radio')
|
|
41767
|
+
this.uncheckSiblings();
|
|
41768
|
+
this.updateFormValue();
|
|
41769
|
+
}
|
|
41770
|
+
valueChanged() {
|
|
41771
|
+
this.updateFormValue();
|
|
40832
41772
|
}
|
|
40833
41773
|
explicitChanged(newValue) {
|
|
40834
41774
|
if (newValue === false) {
|
|
40835
41775
|
this.explicit = undefined;
|
|
40836
41776
|
}
|
|
40837
41777
|
}
|
|
41778
|
+
formDisabledCallback(disabled) {
|
|
41779
|
+
this.formDisabled = disabled;
|
|
41780
|
+
}
|
|
41781
|
+
/** Like a native checkbox or radio, a form reset brings back the checked state of load. */
|
|
40838
41782
|
formResetCallback() {
|
|
40839
|
-
|
|
41783
|
+
this.checked = this.loadChecked ? true : undefined;
|
|
41784
|
+
this.updateFormValue();
|
|
41785
|
+
}
|
|
41786
|
+
componentWillLoad() {
|
|
41787
|
+
this.loadChecked = this.checked === true;
|
|
40840
41788
|
}
|
|
40841
41789
|
componentDidLoad() {
|
|
40842
|
-
var _a
|
|
41790
|
+
var _a;
|
|
40843
41791
|
this.label = (_a = this.host.textContent) !== null && _a !== void 0 ? _a : '';
|
|
40844
|
-
|
|
41792
|
+
this.updateFormValue();
|
|
40845
41793
|
this.checkFocusElement();
|
|
40846
41794
|
this.hasText = hasSlotted(this.host);
|
|
40847
41795
|
}
|
|
@@ -40849,7 +41797,7 @@ class MdsInputSwitch {
|
|
|
40849
41797
|
var _a;
|
|
40850
41798
|
const { iconChecked, iconUnchecked, iconIndeterminate } = inputSwitchIconVariant[this.type];
|
|
40851
41799
|
const iconCheckedUser = this.icon !== '' ? this.icon : iconChecked;
|
|
40852
|
-
return (hAsync(Host, { key: '
|
|
41800
|
+
return (hAsync(Host, { key: 'dc4f6b92e7a7f8e64147487aa29dda42abe36a42', onClick: this.handleDirty, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("input", { key: '66ecfc3ede5d9e910ceba7a1d688004e4d1fa02c', "aria-label": this.t.get(this.checked ? 'unselect' : 'select', { label: this.label }), autoFocus: this.autofocus, checked: this.checked, class: "field", disabled: this.isDisabled(), id: "field", indeterminate: this.indeterminate, name: this.name, onChange: this.handleInputOnChange, role: this.type === 'switch' ? 'switch' : undefined, type: this.type === 'switch' ? 'checkbox' : this.type, value: (_a = this.value) !== null && _a !== void 0 ? _a : undefined }), this.type === 'switch' ? (hAsync("label", { htmlFor: "field", class: clsx('switch-container', this.dirty !== false && 'dirty') }, hAsync("div", { class: "switch" }, hAsync("div", { class: "switch-toggle" }, this.explicit && (hAsync("mds-icon", { class: "icon-explicit", name: this.checked ? miBaselineChecked : miBaselineRemove })))))) : (hAsync("label", { htmlFor: "field", class: "label-icon" }, hAsync("mds-text", { class: "icon-typography-unchecked", tag: "div", typography: this.typography, variant: this.variant }, hAsync("mds-icon", { class: "icon-unchecked", name: clsx(this.indeterminate ? iconIndeterminate : iconUnchecked) })), this.checked && (hAsync("mds-text", { class: "icon-typography-checked", tag: "div", typography: this.typography, variant: this.variant }, hAsync("mds-icon", { class: "icon-checked", name: clsx(this.indeterminate ? iconIndeterminate : iconCheckedUser) }))))), hAsync("label", { key: '6c683b5b694dbe8925ab481d1f8fa0e1b7678630', htmlFor: "field", class: clsx('label-text', !this.hasText && 'label-text--empty') }, hAsync("mds-text", { key: '211c7fb20a182438447eb46976ad9aa599e2e1bc', tag: "p", typography: this.typography, variant: this.variant }, hAsync("slot", { key: '0d755335e5e4a63ac2bb662f7cb1a13a63cb22e3' })))));
|
|
40853
41801
|
}
|
|
40854
41802
|
static get formAssociated() { return true; }
|
|
40855
41803
|
get host() { return getElement(this); }
|
|
@@ -40860,6 +41808,9 @@ class MdsInputSwitch {
|
|
|
40860
41808
|
"checked": [{
|
|
40861
41809
|
"checkedChanged": 0
|
|
40862
41810
|
}],
|
|
41811
|
+
"value": [{
|
|
41812
|
+
"valueChanged": 0
|
|
41813
|
+
}],
|
|
40863
41814
|
"explicit": [{
|
|
40864
41815
|
"explicitChanged": 0
|
|
40865
41816
|
}]
|
|
@@ -40881,6 +41832,7 @@ class MdsInputSwitch {
|
|
|
40881
41832
|
"typography": [513],
|
|
40882
41833
|
"variant": [513],
|
|
40883
41834
|
"value": [1537],
|
|
41835
|
+
"formDisabled": [32],
|
|
40884
41836
|
"dirty": [32],
|
|
40885
41837
|
"hasText": [32]
|
|
40886
41838
|
},
|
|
@@ -41311,8 +42263,9 @@ var localeIt$m = {
|
|
|
41311
42263
|
sortByStatus: sortByStatus
|
|
41312
42264
|
};
|
|
41313
42265
|
|
|
41314
|
-
const mdsInputUploadCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-file-preview,mds-progress,mds-tab,mds-tab-item,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-upload-drag-area-background-color-on-drag:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-input-upload-drag-area-background-color:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-upload-drag-area-border-on-drag:3px dashed rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-upload-drag-area-border:3px dashed rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-upload-min-cols:3;container-type:inline-size;display:grid;gap:calc(var(--spacing,.0025rem)*400);grid-template-columns:repeat(1,minmax(1px,100%))}.drag-area{align-items:center;background-color:var(--mds-input-upload-drag-area-background-color,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border:var(--mds-input-upload-drag-area-border);border-radius:var(--radius-2xl,24px);display:flex;flex-direction:column;gap:calc(var(--spacing,.0025rem)*400);justify-content:center;padding:calc(var(--spacing,.0025rem)*600);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);-webkit-user-select:none;user-select:none}.drag-area--on-drag-enter{--mds-input-upload-drag-area-background-color:var(--mds-input-upload-drag-area-background-color-on-drag,rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237)))));--mds-input-upload-drag-area-border:var(--mds-input-upload-drag-area-border-on-drag)}.icon{display:flex;fill:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));width:calc(var(--spacing,.0025rem)*600)}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.action{border-radius:var(--radius-full,1000px);fill:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));height:auto;padding:calc(var(--spacing,.0025rem)*150)}.action--cancel-upload:focus-visible,.action--cancel-upload:hover{--mds-button-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));fill:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)))}.action--retry-upload:focus-visible,.action--retry-upload:hover{--mds-button-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));fill:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)))}.main-action{display:grid;grid-template-columns:repeat(1,minmax(1px,100%));pointer-events:none;text-align:center}.main-action,.main-actions{gap:calc(var(--spacing,.0025rem)*200)}.main-actions{display:flex;flex-flow:wrap;justify-content:center}.main-action-icon{align-items:center;display:inline-flex;justify-content:center}.file-list,.main-infos{display:grid;gap:calc(var(--spacing,.0025rem)*100);grid-template-columns:repeat(1,minmax(1px,100%))}.file-list{--cols:var(--mds-input-upload-min-cols,3);--perc-w:calc(100%/var(--cols));--gap:calc(var(--spacing,.0025rem)*400);--gap-w:calc(var(--gap) - var(--gap)/var(--cols));--max-w:calc(var(--perc-w) - var(--gap-w));--template-cols:repeat(auto-fit,minmax(calc(var(--spacing,.0025rem)*4000),var(--max-w)));gap:calc(var(--spacing,.0025rem)*400);grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));grid-template-columns:var(--template-cols)}.file-list--more-items{--template-cols:repeat(auto-fit,minmax(calc(var(--spacing,.0025rem)*4000),1fr))}.main-infos{min-width:0;text-align:center;width:100%}.progress-bar{justify-self:center;max-width:calc(var(--spacing,.0025rem)*8000);min-width:0;width:100%}.additional-infos{align-items:flex-start;gap:calc(var(--spacing,.0025rem)*400)}.additional-infos,.file-specs{display:flex;flex-wrap:wrap;justify-content:space-between}.file-specs{flex-grow:1;gap:calc(var(--spacing,.0025rem)*100) calc(var(--spacing,.0025rem)*400)}.action-sort{display:inline-flex}.file-specs.file-specs-sort{flex-flow:column;justify-content:center}@container (max-width:340px){.file-list{--template-cols:1fr}.main-actions{flex-direction:column}}`;
|
|
42266
|
+
const mdsInputUploadCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-file-preview,mds-progress,mds-tab,mds-tab-item,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-upload-drag-area-background-color-on-drag:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-input-upload-drag-area-background-color:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-upload-drag-area-border-on-drag:3px dashed rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-upload-drag-area-border:3px dashed rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-upload-min-cols:3;container-type:inline-size;display:grid;gap:calc(var(--spacing,.0025rem)*400);grid-template-columns:repeat(1,minmax(1px,100%))}.drag-area{align-items:center;background-color:var(--mds-input-upload-drag-area-background-color,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border:var(--mds-input-upload-drag-area-border);border-radius:var(--radius-2xl,24px);display:flex;flex-direction:column;gap:calc(var(--spacing,.0025rem)*400);justify-content:center;padding:calc(var(--spacing,.0025rem)*600);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);-webkit-user-select:none;user-select:none}.drag-area--on-drag-enter{--mds-input-upload-drag-area-background-color:var(--mds-input-upload-drag-area-background-color-on-drag,rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237)))));--mds-input-upload-drag-area-border:var(--mds-input-upload-drag-area-border-on-drag)}.icon{display:flex;fill:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));width:calc(var(--spacing,.0025rem)*600)}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.action{border-radius:var(--radius-full,1000px);fill:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));height:auto;padding:calc(var(--spacing,.0025rem)*150)}.action--cancel-upload:focus-visible,.action--cancel-upload:hover{--mds-button-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));fill:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)))}.action--retry-upload:focus-visible,.action--retry-upload:hover{--mds-button-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));fill:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)))}.main-action{display:grid;grid-template-columns:repeat(1,minmax(1px,100%));pointer-events:none;text-align:center}.main-action,.main-actions{gap:calc(var(--spacing,.0025rem)*200)}.main-actions{display:flex;flex-flow:wrap;justify-content:center}.main-action-icon{align-items:center;display:inline-flex;justify-content:center}.file-list,.main-infos{display:grid;gap:calc(var(--spacing,.0025rem)*100);grid-template-columns:repeat(1,minmax(1px,100%))}.file-list{--cols:var(--mds-input-upload-min-cols,3);--perc-w:calc(100%/var(--cols));--gap:calc(var(--spacing,.0025rem)*400);--gap-w:calc(var(--gap) - var(--gap)/var(--cols));--max-w:calc(var(--perc-w) - var(--gap-w));--template-cols:repeat(auto-fit,minmax(calc(var(--spacing,.0025rem)*4000),var(--max-w)));gap:calc(var(--spacing,.0025rem)*400);grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));grid-template-columns:var(--template-cols)}.file-list--more-items{--template-cols:repeat(auto-fit,minmax(calc(var(--spacing,.0025rem)*4000),1fr))}.main-infos{min-width:0;text-align:center;width:100%}.progress-bar{justify-self:center;max-width:calc(var(--spacing,.0025rem)*8000);min-width:0;width:100%}.additional-infos{align-items:flex-start;gap:calc(var(--spacing,.0025rem)*400)}.additional-infos,.file-specs{display:flex;flex-wrap:wrap;justify-content:space-between}.file-specs{flex-grow:1;gap:calc(var(--spacing,.0025rem)*100) calc(var(--spacing,.0025rem)*400)}.action-sort{display:inline-flex}.file-specs.file-specs-sort{flex-flow:column;justify-content:center}@container (max-width:340px){.file-list{--template-cols:1fr}.main-actions{flex-direction:column}}:host(:disabled:not([disabled=false])) .drag-area,:host([disabled]:not([disabled=false])) .drag-area{background-color:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));cursor:not-allowed}:host(:disabled:not([disabled=false])) .icon,:host([disabled]:not([disabled=false])) .icon{fill:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}`;
|
|
41315
42267
|
|
|
42268
|
+
const isSort = (value) => value === 'date' || value === 'status';
|
|
41316
42269
|
class MdsInputUpload {
|
|
41317
42270
|
constructor(hostRef) {
|
|
41318
42271
|
registerInstance(this, hostRef);
|
|
@@ -41327,6 +42280,8 @@ class MdsInputUpload {
|
|
|
41327
42280
|
this.fileUploaded = 0;
|
|
41328
42281
|
this.cssMinCols = 1000;
|
|
41329
42282
|
this.idFile = 0;
|
|
42283
|
+
// one object URL per previewed file, created once and revoked when the file leaves the list
|
|
42284
|
+
this.previewUrls = new Map();
|
|
41330
42285
|
this.t = new Locale$1({
|
|
41331
42286
|
el: localeEl$l,
|
|
41332
42287
|
en: localeEn$l,
|
|
@@ -41337,10 +42292,21 @@ class MdsInputUpload {
|
|
|
41337
42292
|
this.files = [];
|
|
41338
42293
|
this.progress = 0;
|
|
41339
42294
|
this.animateText = false;
|
|
42295
|
+
// the order applied to the files: sort at load, then the user's choice from the sort tabs
|
|
42296
|
+
this.activeSort = 'date';
|
|
42297
|
+
// the disabled state of the host as a form control: its own disabled, or a disabled fieldset
|
|
42298
|
+
// around it, which disables the host but not the controls in its shadow root
|
|
42299
|
+
this.formDisabled = false;
|
|
41340
42300
|
/**
|
|
41341
42301
|
* Defines the file types the file input should accept
|
|
41342
42302
|
*/
|
|
41343
42303
|
this.accept = '';
|
|
42304
|
+
/**
|
|
42305
|
+
* Disables the component, like a disabled native file input: no file can be added, dropped or
|
|
42306
|
+
* removed, and the files are left out of the form. A disabled `<fieldset>` around the component
|
|
42307
|
+
* does the same.
|
|
42308
|
+
*/
|
|
42309
|
+
this.disabled = false;
|
|
41344
42310
|
/**
|
|
41345
42311
|
* Specifies the max size of a single file that can be uploaded in MB
|
|
41346
42312
|
*/
|
|
@@ -41349,6 +42315,7 @@ class MdsInputUpload {
|
|
|
41349
42315
|
* Specifies the max number of files that can be uploaded
|
|
41350
42316
|
*/
|
|
41351
42317
|
this.maxFiles = 1;
|
|
42318
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
41352
42319
|
this.updateCSSCustomProps = () => {
|
|
41353
42320
|
if (typeof window === 'undefined')
|
|
41354
42321
|
return;
|
|
@@ -41356,37 +42323,44 @@ class MdsInputUpload {
|
|
|
41356
42323
|
this.cssMinCols = Number(elementStyles.getPropertyValue('--mds-input-upload-min-cols'));
|
|
41357
42324
|
};
|
|
41358
42325
|
this.onDropHandler = (event) => {
|
|
41359
|
-
if (this.nativeInput && event.dataTransfer) {
|
|
41360
|
-
this.update(this.nativeInput, this.prepareFiles(event.dataTransfer.files));
|
|
41361
|
-
}
|
|
41362
42326
|
event.preventDefault();
|
|
42327
|
+
this.dragging = false;
|
|
42328
|
+
if (event.dataTransfer && !this.isDisabled()) {
|
|
42329
|
+
this.onAdd(event.dataTransfer.files);
|
|
42330
|
+
}
|
|
41363
42331
|
};
|
|
41364
42332
|
this.onDragOverHandler = (event) => {
|
|
42333
|
+
// still handled when disabled: a file dropped on the page would otherwise be opened by the
|
|
42334
|
+
// browser, so the drop is refused instead
|
|
41365
42335
|
event.preventDefault();
|
|
42336
|
+
if (this.isDisabled() && event.dataTransfer)
|
|
42337
|
+
event.dataTransfer.dropEffect = 'none';
|
|
41366
42338
|
};
|
|
41367
42339
|
this.onDragEnterHandler = (event) => {
|
|
41368
|
-
|
|
42340
|
+
if (this.isDisabled()) {
|
|
42341
|
+
event.preventDefault();
|
|
42342
|
+
return;
|
|
42343
|
+
}
|
|
41369
42344
|
this.dragging = true;
|
|
41370
42345
|
this.animateText = true;
|
|
41371
|
-
(_a = this.elDragArea) === null || _a === void 0 ? void 0 : _a.classList.add('drag-area--on-drag-enter');
|
|
41372
42346
|
event.preventDefault();
|
|
41373
42347
|
};
|
|
41374
42348
|
this.onDragLeaveHandler = (event) => {
|
|
41375
|
-
var _a;
|
|
41376
42349
|
this.dragging = false;
|
|
41377
|
-
(_a = this.elDragArea) === null || _a === void 0 ? void 0 : _a.classList.remove('drag-area--on-drag-enter');
|
|
41378
42350
|
event.preventDefault();
|
|
41379
42351
|
};
|
|
41380
|
-
this.onAdd = (
|
|
41381
|
-
if (!
|
|
42352
|
+
this.onAdd = (fileList) => {
|
|
42353
|
+
if (!fileList)
|
|
41382
42354
|
return;
|
|
41383
|
-
|
|
41384
|
-
|
|
41385
|
-
|
|
41386
|
-
|
|
41387
|
-
|
|
41388
|
-
|
|
41389
|
-
|
|
42355
|
+
this.prepareFiles(fileList);
|
|
42356
|
+
this.update();
|
|
42357
|
+
};
|
|
42358
|
+
this.onInputChange = (event) => {
|
|
42359
|
+
const input = event.target;
|
|
42360
|
+
this.onAdd(input.files);
|
|
42361
|
+
// the input only picks the files, the list lives in this.files: clearing it lets the user
|
|
42362
|
+
// pick a removed file again
|
|
42363
|
+
input.value = '';
|
|
41390
42364
|
};
|
|
41391
42365
|
/**
|
|
41392
42366
|
* Delete single file from upload
|
|
@@ -41394,32 +42368,23 @@ class MdsInputUpload {
|
|
|
41394
42368
|
*/
|
|
41395
42369
|
this.onCancel = (filekey) => {
|
|
41396
42370
|
this.files = this.files.filter((f) => f.key !== filekey);
|
|
41397
|
-
|
|
41398
|
-
const data = new DataTransfer();
|
|
41399
|
-
this.files.forEach((f) => {
|
|
41400
|
-
if (f.status === Status.SUCCESS) {
|
|
41401
|
-
data.items.add(f.file);
|
|
41402
|
-
}
|
|
41403
|
-
});
|
|
41404
|
-
this.update(this.nativeInput, data.files);
|
|
41405
|
-
}
|
|
42371
|
+
this.update();
|
|
41406
42372
|
};
|
|
41407
42373
|
/**
|
|
41408
42374
|
* Delete all files from upload
|
|
41409
42375
|
*/
|
|
41410
42376
|
this.onReset = () => {
|
|
41411
|
-
|
|
41412
|
-
|
|
41413
|
-
this.nativeInput.value = '';
|
|
41414
|
-
this.update(this.nativeInput, null);
|
|
41415
|
-
}
|
|
42377
|
+
this.files = [];
|
|
42378
|
+
this.update(true);
|
|
41416
42379
|
};
|
|
41417
42380
|
this.onChangeTab = (event) => {
|
|
41418
|
-
|
|
41419
|
-
|
|
41420
|
-
|
|
41421
|
-
|
|
41422
|
-
|
|
42381
|
+
// the tab reports the selection the component makes itself too (a new sort): only a
|
|
42382
|
+
// different order is the user's choice
|
|
42383
|
+
if (!isSort(event.value) || event.value === this.activeSort)
|
|
42384
|
+
return;
|
|
42385
|
+
this.activeSort = event.value;
|
|
42386
|
+
this.sortFiles(this.files, this.activeSort);
|
|
42387
|
+
localStorage.setItem(LOCALSTORAGE_KEY_USER_SORT, this.activeSort);
|
|
41423
42388
|
};
|
|
41424
42389
|
this.handleAddFileClick = () => {
|
|
41425
42390
|
var _a;
|
|
@@ -41432,29 +42397,51 @@ class MdsInputUpload {
|
|
|
41432
42397
|
this.onCancel(filekey);
|
|
41433
42398
|
};
|
|
41434
42399
|
}
|
|
42400
|
+
formDisabledCallback(disabled) {
|
|
42401
|
+
this.formDisabled = disabled;
|
|
42402
|
+
}
|
|
41435
42403
|
formResetCallback() {
|
|
41436
42404
|
this.onReset();
|
|
41437
42405
|
}
|
|
42406
|
+
connectedCallback() {
|
|
42407
|
+
// disconnectedCallback revoked the preview URLs: a moved component renders new ones
|
|
42408
|
+
if (this.files.length > 0)
|
|
42409
|
+
forceUpdate$1(this);
|
|
42410
|
+
}
|
|
41438
42411
|
componentWillLoad() {
|
|
41439
|
-
var _a;
|
|
41440
42412
|
this.extensions = this.getExtension();
|
|
41441
|
-
|
|
42413
|
+
const userSort = localStorage.getItem(LOCALSTORAGE_KEY_USER_SORT);
|
|
42414
|
+
this.activeSort = isSort(this.sort) ? this.sort : isSort(userSort) ? userSort : 'date';
|
|
41442
42415
|
this.updateInitialValue(this.initialValue);
|
|
41443
42416
|
}
|
|
41444
42417
|
componentDidLoad() {
|
|
41445
42418
|
this.updateCSSCustomProps();
|
|
41446
42419
|
}
|
|
42420
|
+
componentDidRender() {
|
|
42421
|
+
this.revokePreviewUrls(new Set(this.files.map((f) => f.file)));
|
|
42422
|
+
}
|
|
42423
|
+
disconnectedCallback() {
|
|
42424
|
+
this.revokePreviewUrls(new Set());
|
|
42425
|
+
}
|
|
41447
42426
|
updateInitialValue(newValue) {
|
|
41448
42427
|
if (newValue) {
|
|
41449
42428
|
this.onAdd(newValue);
|
|
41450
42429
|
}
|
|
41451
42430
|
}
|
|
42431
|
+
handleNameChange() {
|
|
42432
|
+
this.updateFormValue();
|
|
42433
|
+
}
|
|
42434
|
+
handleSortChange(newValue) {
|
|
42435
|
+
if (isSort(newValue)) {
|
|
42436
|
+
this.activeSort = newValue;
|
|
42437
|
+
this.sortFiles(this.files, newValue);
|
|
42438
|
+
}
|
|
42439
|
+
}
|
|
41452
42440
|
/**
|
|
41453
|
-
* Returns a promise of files
|
|
42441
|
+
* Returns a promise of the accepted files as a FileList, empty if there's none
|
|
41454
42442
|
*/
|
|
41455
42443
|
getFiles() {
|
|
41456
|
-
|
|
41457
|
-
return Promise.resolve((_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : null);
|
|
42444
|
+
return Promise.resolve(this.acceptedFiles());
|
|
41458
42445
|
}
|
|
41459
42446
|
/**
|
|
41460
42447
|
* Returns a promise of files error or null if there's none
|
|
@@ -41482,14 +42469,9 @@ class MdsInputUpload {
|
|
|
41482
42469
|
* Limit number of file to maxFiles
|
|
41483
42470
|
* Check size and type for every single file.
|
|
41484
42471
|
* @param fileList list recieved from input selection or drag and drop
|
|
41485
|
-
* @returns list of files accepted
|
|
41486
42472
|
*/
|
|
41487
42473
|
prepareFiles(fileList) {
|
|
41488
|
-
var _a;
|
|
41489
|
-
if (!fileList)
|
|
41490
|
-
return null;
|
|
41491
42474
|
const files = fileList instanceof FileList ? Array.from(fileList) : fileList;
|
|
41492
|
-
const data = new DataTransfer();
|
|
41493
42475
|
// prepare new file added
|
|
41494
42476
|
for (const file of files) {
|
|
41495
42477
|
// update only file not added previously or files with errors
|
|
@@ -41517,11 +42499,7 @@ class MdsInputUpload {
|
|
|
41517
42499
|
}
|
|
41518
42500
|
}
|
|
41519
42501
|
}
|
|
41520
|
-
|
|
41521
|
-
this.files.filter((f) => f.status === Status.SUCCESS).forEach((f) => data.items.add(f.file));
|
|
41522
|
-
this.sortFiles(this.files, (_a = this.sort) !== null && _a !== void 0 ? _a : this.userSort);
|
|
41523
|
-
// this.updateProgress()
|
|
41524
|
-
return data.files;
|
|
42502
|
+
this.sortFiles(this.files, this.activeSort);
|
|
41525
42503
|
}
|
|
41526
42504
|
// Stores the locale key, not the translated message: consumers translate at
|
|
41527
42505
|
// read time so the texts follow the current language
|
|
@@ -41542,10 +42520,31 @@ class MdsInputUpload {
|
|
|
41542
42520
|
}
|
|
41543
42521
|
return { errorKey, type };
|
|
41544
42522
|
}
|
|
41545
|
-
|
|
41546
|
-
|
|
42523
|
+
// the files the form submits and getFiles() returns: the ones that passed the checks, in the
|
|
42524
|
+
// order they were added whatever order the list shows
|
|
42525
|
+
acceptedFiles() {
|
|
42526
|
+
const data = new DataTransfer();
|
|
42527
|
+
this.files
|
|
42528
|
+
.filter((f) => f.status === Status.SUCCESS)
|
|
42529
|
+
.sort((a, b) => a.id - b.id)
|
|
42530
|
+
.forEach((f) => data.items.add(f.file));
|
|
42531
|
+
return data.files;
|
|
42532
|
+
}
|
|
42533
|
+
// one entry per file under the name, as a native file input submits them; a file input
|
|
42534
|
+
// without a name submits nothing
|
|
42535
|
+
updateFormValue() {
|
|
42536
|
+
var _a;
|
|
42537
|
+
const files = this.acceptedFiles();
|
|
42538
|
+
const name = (_a = this.name) !== null && _a !== void 0 ? _a : '';
|
|
42539
|
+
if (name === '' || files.length === 0) {
|
|
42540
|
+
setFormValue(this.internals, null);
|
|
41547
42541
|
return;
|
|
41548
|
-
|
|
42542
|
+
}
|
|
42543
|
+
const data = new FormData();
|
|
42544
|
+
Array.from(files).forEach((file) => data.append(name, file));
|
|
42545
|
+
setFormValue(this.internals, data);
|
|
42546
|
+
}
|
|
42547
|
+
update(reset = false) {
|
|
41549
42548
|
const validity = {};
|
|
41550
42549
|
const errorMessage = new Set();
|
|
41551
42550
|
this.files
|
|
@@ -41564,10 +42563,10 @@ class MdsInputUpload {
|
|
|
41564
42563
|
}
|
|
41565
42564
|
errorMessage.add(this.t.get(error.errorKey));
|
|
41566
42565
|
});
|
|
41567
|
-
|
|
42566
|
+
this.updateFormValue();
|
|
41568
42567
|
setValidity(this.internals, validity, Array.from(errorMessage).join(', '));
|
|
41569
42568
|
this.updateProgress();
|
|
41570
|
-
this.changedEvent.emit(
|
|
42569
|
+
this.changedEvent.emit(reset ? null : this.acceptedFiles());
|
|
41571
42570
|
}
|
|
41572
42571
|
/**
|
|
41573
42572
|
* Update progress bar
|
|
@@ -41635,6 +42634,22 @@ class MdsInputUpload {
|
|
|
41635
42634
|
sortById(a, b) {
|
|
41636
42635
|
return b.id - a.id;
|
|
41637
42636
|
}
|
|
42637
|
+
previewUrl(file) {
|
|
42638
|
+
let url = this.previewUrls.get(file);
|
|
42639
|
+
if (url === undefined) {
|
|
42640
|
+
url = URL.createObjectURL(file);
|
|
42641
|
+
this.previewUrls.set(file, url);
|
|
42642
|
+
}
|
|
42643
|
+
return url;
|
|
42644
|
+
}
|
|
42645
|
+
revokePreviewUrls(keep) {
|
|
42646
|
+
this.previewUrls.forEach((url, file) => {
|
|
42647
|
+
if (!keep.has(file)) {
|
|
42648
|
+
URL.revokeObjectURL(url);
|
|
42649
|
+
this.previewUrls.delete(file);
|
|
42650
|
+
}
|
|
42651
|
+
});
|
|
42652
|
+
}
|
|
41638
42653
|
isSortTabShown() {
|
|
41639
42654
|
var _a;
|
|
41640
42655
|
// the type has no empty sort, but the attribute can be empty or removed
|
|
@@ -41643,23 +42658,23 @@ class MdsInputUpload {
|
|
|
41643
42658
|
}
|
|
41644
42659
|
render() {
|
|
41645
42660
|
var _a;
|
|
41646
|
-
return (hAsync(Host, { key: '
|
|
42661
|
+
return (hAsync(Host, { key: '2644c38a7b6037c5376dfd31adc4c753f20f52bc' }, hAsync("div", { key: 'b0ba5a112e01d0177f3ff6da57d51546d0abf355', class: clsx('drag-area', this.dragging && 'drag-area--on-drag-enter'), onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler }, hAsync("div", { key: 'de532adb36df80996061b07e429b3b1312c3ea11', class: "main-action" }, hAsync("div", { key: 'a10d7a5bf0eab47460e07a1021d0dd8eccbfba71', class: "main-action-icon" }, hAsync("mds-icon", { key: '7d68284af1d4f74712676a61d5230478b6649b13', class: "icon", name: miOutlineFileUpload })), hAsync("mds-text", { key: 'f37d1e61e598de34792368f123bcc1755d661f8b', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.dragging
|
|
41647
42662
|
? this.t.get('dragEnter')
|
|
41648
|
-
: this.t.get('clickOrDrag', { maxFiles: this.maxFiles }) })), hAsync("div", { key: '
|
|
42663
|
+
: this.t.get('clickOrDrag', { maxFiles: this.maxFiles }) })), hAsync("div", { key: '074afd34533489652602381303b1c967a7c71aed', class: "main-actions" }, hAsync("mds-button", { key: '28c3b07e927222db52675ae27044b83148563c5d', variant: "primary", disabled: this.isDisabled(), onClick: this.handleAddFileClick, label: this.files != null
|
|
41649
42664
|
? this.t.get('addFile', { maxFiles: this.maxFiles })
|
|
41650
|
-
: this.t.get('selectFile') }), this.files.length > 0 && (hAsync("mds-button", { key: '
|
|
42665
|
+
: this.t.get('selectFile') }), this.files.length > 0 && (hAsync("mds-button", { key: 'a0f6ac365c6b1a1e7dd2a62204331f1ad4357d03', variant: "error", disabled: this.isDisabled(), onClick: this.onReset, label: this.t.get('cancel') }))), hAsync("div", { key: '9c82bbc279746a05148d1107f4568c08beae6141', class: "main-infos" }, hAsync("mds-progress", { key: '25c2636d434a46cb54a304f2e2192f70940e14fe', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1 ? (hAsync("mds-text", { variant: "info", typography: "caption" }, this.t.get('maxFilesUpload', { maxFiles: this.maxFiles }))) : (hAsync("mds-text", { variant: "info", typography: "caption" }, ((_a = this.maxFiles) !== null && _a !== void 0 ? _a : 0) !== 0 && !Number.isNaN(this.maxFiles)
|
|
41651
42666
|
? this.t.get('currentFilesWithMax', {
|
|
41652
42667
|
currentFiles: this.files.length,
|
|
41653
42668
|
maxFiles: this.maxFiles,
|
|
41654
42669
|
})
|
|
41655
|
-
: this.t.get('currentFilesNoMax', { currentFiles: this.files.length }))))), hAsync("input", { key: '
|
|
42670
|
+
: this.t.get('currentFilesNoMax', { currentFiles: this.files.length }))))), hAsync("input", { key: 'ecde7b22afc1ef5a6ab26d0d90a450cab30df028', type: "file", accept: this.accept, disabled: this.isDisabled(), hidden: true, ref: (i) => (this.nativeInput = i), onChange: this.onInputChange, multiple: this.maxFiles > 1 }), hAsync("div", { key: '0b7cfe2d35557ce63475e0100dfd12379bd7e9a5', class: "additional-infos" }, hAsync("div", { key: 'ed538f5298e23166895fc6810028143353a4fab0', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, hAsync("mds-text", { key: '3de05cd3fecfd9fc2ee3394d61b0ca32c59d21e8', variant: "info", typography: "caption" }, this.extensions !== ''
|
|
41656
42671
|
? `${this.t.get('canUpload')} ${this.extensions}`
|
|
41657
|
-
: this.t.get('canUploadAll')), hAsync("mds-text", { key: '
|
|
42672
|
+
: this.t.get('canUploadAll')), hAsync("mds-text", { key: 'ce8e3aec8d6cd776186e32ec70d08ae76eeff13a', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() && (hAsync("mds-tab", { key: 'f849f3703d7c2a4aee551ef3d513e062d074c65a', class: "action-sort", onMdsTabChange: this.handleTabChange }, hAsync("mds-tab-item", { key: '892e958efc1e37f32dd69929fdb10482fcb01879', disabled: this.isDisabled(), icon: iconSortById, selected: this.activeSort === 'date', title: this.t.get('sortByDate'), value: "date" }), hAsync("mds-tab-item", { key: '9f332bcf7146bb45e5ee4b0c02a70f3410c9cfd9', disabled: this.isDisabled(), icon: iconSortByStatus, selected: this.activeSort === 'status', title: this.t.get('sortByStatus'), value: "status" })))), hAsync("div", { key: 'ea61a5d4a2f7d98e891b3b42c883c710606cc353', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map((file) => {
|
|
41658
42673
|
switch (file.status) {
|
|
41659
42674
|
case Status.ERROR:
|
|
41660
|
-
return (hAsync("mds-file-preview", { deletable:
|
|
42675
|
+
return (hAsync("mds-file-preview", { deletable: !this.isDisabled(), variant: "error", filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: this.handleFileDelete(file.key), message: this.t.get(file.errorKey) }));
|
|
41661
42676
|
case Status.SUCCESS:
|
|
41662
|
-
return (hAsync("mds-file-preview", { deletable:
|
|
42677
|
+
return (hAsync("mds-file-preview", { deletable: !this.isDisabled(), filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: this.handleFileDelete(file.key), src: this.previewUrl(file.file) }));
|
|
41663
42678
|
}
|
|
41664
42679
|
}))));
|
|
41665
42680
|
}
|
|
@@ -41669,6 +42684,12 @@ class MdsInputUpload {
|
|
|
41669
42684
|
"initialValue": [{
|
|
41670
42685
|
"updateInitialValue": 0
|
|
41671
42686
|
}],
|
|
42687
|
+
"name": [{
|
|
42688
|
+
"handleNameChange": 0
|
|
42689
|
+
}],
|
|
42690
|
+
"sort": [{
|
|
42691
|
+
"handleSortChange": 0
|
|
42692
|
+
}],
|
|
41672
42693
|
"maxFiles": [{
|
|
41673
42694
|
"handleMaxFilesChange": 0
|
|
41674
42695
|
}]
|
|
@@ -41679,6 +42700,8 @@ class MdsInputUpload {
|
|
|
41679
42700
|
"$tagName$": "mds-input-upload",
|
|
41680
42701
|
"$members$": {
|
|
41681
42702
|
"accept": [513],
|
|
42703
|
+
"disabled": [516],
|
|
42704
|
+
"name": [513],
|
|
41682
42705
|
"maxFileSize": [514, "max-file-size"],
|
|
41683
42706
|
"maxFiles": [514, "max-files"],
|
|
41684
42707
|
"sort": [513],
|
|
@@ -41687,13 +42710,15 @@ class MdsInputUpload {
|
|
|
41687
42710
|
"files": [32],
|
|
41688
42711
|
"progress": [32],
|
|
41689
42712
|
"animateText": [32],
|
|
42713
|
+
"activeSort": [32],
|
|
42714
|
+
"formDisabled": [32],
|
|
41690
42715
|
"getFiles": [64],
|
|
41691
42716
|
"getFilesError": [64],
|
|
41692
42717
|
"reset": [64]
|
|
41693
42718
|
},
|
|
41694
42719
|
"$listeners$": undefined,
|
|
41695
42720
|
"$lazyBundleId$": "-",
|
|
41696
|
-
"$attrsToReflect$": [["accept", "accept"], ["maxFileSize", "max-file-size"], ["maxFiles", "max-files"], ["sort", "sort"]]
|
|
42721
|
+
"$attrsToReflect$": [["accept", "accept"], ["disabled", "disabled"], ["name", "name"], ["maxFileSize", "max-file-size"], ["maxFiles", "max-files"], ["sort", "sort"]]
|
|
41697
42722
|
}; }
|
|
41698
42723
|
}
|
|
41699
42724
|
|
|
@@ -44149,6 +45174,9 @@ var localeIt$f = {
|
|
|
44149
45174
|
|
|
44150
45175
|
const mdsPrefCss = () => `@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{display:grid;gap:calc(var(--spacing,.0025rem)*400)}:host(:empty),:host([controller]){display:none}.reload-required{display:grid;gap:calc(var(--spacing,.0025rem)*200)}`;
|
|
44151
45176
|
|
|
45177
|
+
// The mounted instances: `data-magma-pref` stays on <html> while any of them is, so
|
|
45178
|
+
// a settings page unmounting its own mds-pref leaves the app controller in charge.
|
|
45179
|
+
const mountedPrefs = new Set();
|
|
44152
45180
|
/**
|
|
44153
45181
|
* @name Pref
|
|
44154
45182
|
* @description This component is based on MdsTab component pattern
|
|
@@ -44252,6 +45280,7 @@ class MdsPref {
|
|
|
44252
45280
|
}
|
|
44253
45281
|
componentDidLoad() {
|
|
44254
45282
|
var _a;
|
|
45283
|
+
mountedPrefs.add(this.host);
|
|
44255
45284
|
if (typeof window !== 'undefined') {
|
|
44256
45285
|
(_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.setAttribute('data-magma-pref', '');
|
|
44257
45286
|
}
|
|
@@ -44265,14 +45294,15 @@ class MdsPref {
|
|
|
44265
45294
|
}
|
|
44266
45295
|
disconnectedCallback() {
|
|
44267
45296
|
var _a;
|
|
44268
|
-
|
|
45297
|
+
mountedPrefs.delete(this.host);
|
|
45298
|
+
if (typeof window !== 'undefined' && mountedPrefs.size === 0) {
|
|
44269
45299
|
(_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-magma-pref');
|
|
44270
45300
|
}
|
|
44271
45301
|
this.removePerfEvents();
|
|
44272
45302
|
this.removeThemeEvent(this.host.querySelector('mds-pref-theme'));
|
|
44273
45303
|
}
|
|
44274
45304
|
render() {
|
|
44275
|
-
return (hAsync(Host, { key: '
|
|
45305
|
+
return (hAsync(Host, { key: '3e9d23654e644bc31a70425bfd5a4e0cca0d3d74' }, hAsync("slot", { key: '6688f1a65df7f2197bf6f4456e9d644b446a84b5' }), this.showReload && (hAsync("div", { key: '2283359a9f78f4465e334f1fabe89b1e5300d993', class: "reload-required" }, hAsync("mds-text", { key: '37a204636723d04c4a9d46d39d84296f6535f2ca', typography: "caption" }, this.t.get('reloadPageToSeeChanges'))))));
|
|
44276
45306
|
}
|
|
44277
45307
|
get host() { return getElement(this); }
|
|
44278
45308
|
static get watchers() { return {
|
|
@@ -44357,6 +45387,7 @@ class MdsPrefAnimation {
|
|
|
44357
45387
|
this.localStorageAlias = 'mdsPrefAnimation';
|
|
44358
45388
|
this.customPropertyAlias = '--magma-pref-animation';
|
|
44359
45389
|
this.defaultMode = 'system';
|
|
45390
|
+
this.syncingFromStore = false;
|
|
44360
45391
|
this.t = new Locale$1({
|
|
44361
45392
|
el: localeEl$d,
|
|
44362
45393
|
en: localeEn$e,
|
|
@@ -44377,6 +45408,18 @@ class MdsPrefAnimation {
|
|
|
44377
45408
|
label: 'animationEnabled',
|
|
44378
45409
|
},
|
|
44379
45410
|
};
|
|
45411
|
+
/**
|
|
45412
|
+
* Follows an animation applied elsewhere (another instance, or a writer of the
|
|
45413
|
+
* `<html>` classes) without applying it again: no event, no storage write.
|
|
45414
|
+
*/
|
|
45415
|
+
this.syncAnimation = (mode) => {
|
|
45416
|
+
if (mode === undefined || mode === this.mode) {
|
|
45417
|
+
return;
|
|
45418
|
+
}
|
|
45419
|
+
this.syncingFromStore = true;
|
|
45420
|
+
this.mode = mode;
|
|
45421
|
+
this.syncingFromStore = false;
|
|
45422
|
+
};
|
|
44380
45423
|
this.setAnimation = (mode) => {
|
|
44381
45424
|
this.prefChangeEvent.emit({ preference: 'animation' });
|
|
44382
45425
|
this.mode = mode;
|
|
@@ -44397,16 +45440,27 @@ class MdsPrefAnimation {
|
|
|
44397
45440
|
this.setAnimation(mode);
|
|
44398
45441
|
};
|
|
44399
45442
|
}
|
|
44400
|
-
|
|
45443
|
+
// Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
|
|
45444
|
+
componentWillLoad() {
|
|
44401
45445
|
var _a, _b;
|
|
44402
45446
|
this.setAnimation((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
|
|
44403
45447
|
}
|
|
45448
|
+
connectedCallback() {
|
|
45449
|
+
this.unsubscribeStore = preferenceStore.onChange('animation', this.syncAnimation);
|
|
45450
|
+
}
|
|
45451
|
+
disconnectedCallback() {
|
|
45452
|
+
var _a;
|
|
45453
|
+
(_a = this.unsubscribeStore) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
45454
|
+
}
|
|
44404
45455
|
modeChanged(newValue) {
|
|
45456
|
+
if (this.syncingFromStore) {
|
|
45457
|
+
return;
|
|
45458
|
+
}
|
|
44405
45459
|
this.setAnimation(newValue);
|
|
44406
45460
|
}
|
|
44407
45461
|
render() {
|
|
44408
45462
|
var _a;
|
|
44409
|
-
return (hAsync(Host, { key: '
|
|
45463
|
+
return (hAsync(Host, { key: 'd25afdb5885370379e89e39f75a296e9ec450580', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '8e87fb8a03a0cc859606faccfd0e20f30bca1926', class: "info", typography: "caption" }, hAsync("b", { key: '1a2c122bace752fd63249bd6c5bdb147804129f8' }, this.t.get('label')), ' ', this.t.get(this.animation[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: '48bfc95518d841d5745ffd93ba0ebc2a5e6f8a82', fill: true, size: this.size }, hAsync("mds-tab-item", { key: '1921aebbfb66ceaf9195e5f439221161d8fc36c6', selected: this.mode === 'reduce', onClick: this.handleModeClick('reduce'), class: "item item--reduce", icon: miOutlineCircle, title: this.t.get(this.animation.reduce.label) }), hAsync("mds-tab-item", { key: '7bbab624ad0bd68aede42badc4bf1caf0df773fc', selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.animation.system.label) }), hAsync("mds-tab-item", { key: '37a797b325134f7beaa31575beab581844de951d', selected: this.mode === 'no-preference', onClick: this.handleModeClick('no-preference'), class: "item item--no-preference", icon: miBaselineAnimation, title: this.t.get(this.animation['no-preference'].label) }))));
|
|
44410
45464
|
}
|
|
44411
45465
|
static get watchers() { return {
|
|
44412
45466
|
"mode": [{
|
|
@@ -44498,6 +45552,7 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
|
|
|
44498
45552
|
this.localStorageAlias = 'mdsPrefConsumption';
|
|
44499
45553
|
this.customPropertyAlias = '--magma-pref-consumption';
|
|
44500
45554
|
this.defaultMode = 'high';
|
|
45555
|
+
this.syncingFromStore = false;
|
|
44501
45556
|
this.t = new Locale$1({
|
|
44502
45557
|
el: localeEl$c,
|
|
44503
45558
|
en: localeEn$d,
|
|
@@ -44518,6 +45573,18 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
|
|
|
44518
45573
|
label: 'consumptionLow',
|
|
44519
45574
|
},
|
|
44520
45575
|
};
|
|
45576
|
+
/**
|
|
45577
|
+
* Follows a consumption applied elsewhere (another instance, or a writer of the
|
|
45578
|
+
* `<html>` classes) without applying it again: no event, no storage write.
|
|
45579
|
+
*/
|
|
45580
|
+
this.syncConsumption = (mode) => {
|
|
45581
|
+
if (mode === undefined || mode === this.mode) {
|
|
45582
|
+
return;
|
|
45583
|
+
}
|
|
45584
|
+
this.syncingFromStore = true;
|
|
45585
|
+
this.mode = mode;
|
|
45586
|
+
this.syncingFromStore = false;
|
|
45587
|
+
};
|
|
44521
45588
|
this.setConsumption = (mode) => {
|
|
44522
45589
|
this.prefChangeEvent.emit({ preference: 'consumption' });
|
|
44523
45590
|
this.mode = mode;
|
|
@@ -44538,16 +45605,27 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
|
|
|
44538
45605
|
this.setConsumption(mode);
|
|
44539
45606
|
};
|
|
44540
45607
|
}
|
|
44541
|
-
|
|
45608
|
+
// Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
|
|
45609
|
+
componentWillLoad() {
|
|
44542
45610
|
var _a, _b;
|
|
44543
45611
|
this.setConsumption((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
|
|
44544
45612
|
}
|
|
45613
|
+
connectedCallback() {
|
|
45614
|
+
this.unsubscribeStore = preferenceStore.onChange('consumption', this.syncConsumption);
|
|
45615
|
+
}
|
|
45616
|
+
disconnectedCallback() {
|
|
45617
|
+
var _a;
|
|
45618
|
+
(_a = this.unsubscribeStore) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
45619
|
+
}
|
|
44545
45620
|
modeChanged(newValue) {
|
|
45621
|
+
if (this.syncingFromStore) {
|
|
45622
|
+
return;
|
|
45623
|
+
}
|
|
44546
45624
|
this.setConsumption(newValue);
|
|
44547
45625
|
}
|
|
44548
45626
|
render() {
|
|
44549
45627
|
var _a;
|
|
44550
|
-
return (hAsync(Host, { key: '
|
|
45628
|
+
return (hAsync(Host, { key: 'c85635ab48a40e3fbd570876d6c941fb6a4f00ad', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '2a81b0c3ad64a38f3f6934c5712fe4359dde2a35', class: "info", typography: "caption" }, hAsync("b", { key: '4f0e560287cf8a81d809493d95dcce1e30d166ae' }, this.t.get('label')), ' ', this.t.get(this.consumption[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: 'c8af1116e00ea1ee5d4c839b83344964c09e3a30', fill: true, size: this.size }, hAsync("mds-tab-item", { key: 'c907c9f847e0180fc33b60a362ea297fc9f53b39', selected: this.mode === 'low', onClick: this.handleModeClick('low'), class: "item item--low", icon: mggConsumptionLow, title: this.t.get(this.consumption.low.label) }), hAsync("mds-tab-item", { key: '181190f490172350ec485b715efdbc67557fe1b7', selected: this.mode === 'medium', onClick: this.handleModeClick('medium'), class: "item item--medium", icon: mggConsumptionMedium, title: this.t.get(this.consumption.medium.label) }), hAsync("mds-tab-item", { key: '6ad366ced10575c9edc07b3b64271672c52b0a5f', selected: this.mode === 'high', onClick: this.handleModeClick('high'), class: "item item--high", icon: mggConsumptionHigh, title: this.t.get(this.consumption.high.label) }))));
|
|
44551
45629
|
}
|
|
44552
45630
|
static get watchers() { return {
|
|
44553
45631
|
"mode": [{
|
|
@@ -44627,6 +45705,7 @@ class MdsPrefContrast {
|
|
|
44627
45705
|
this.localStorageAlias = 'mdsPrefContrast';
|
|
44628
45706
|
this.customPropertyAlias = '--magma-pref-contrast';
|
|
44629
45707
|
this.defaultMode = 'system';
|
|
45708
|
+
this.syncingFromStore = false;
|
|
44630
45709
|
this.t = new Locale$1({
|
|
44631
45710
|
el: localeEl$b,
|
|
44632
45711
|
en: localeEn$c,
|
|
@@ -44653,6 +45732,18 @@ class MdsPrefContrast {
|
|
|
44653
45732
|
label: 'contrastDefault',
|
|
44654
45733
|
},
|
|
44655
45734
|
};
|
|
45735
|
+
/**
|
|
45736
|
+
* Follows a contrast applied elsewhere (another instance, or a writer of the
|
|
45737
|
+
* `<html>` classes) without applying it again: no event, no storage write.
|
|
45738
|
+
*/
|
|
45739
|
+
this.syncContrast = (mode) => {
|
|
45740
|
+
if (mode === undefined || mode === this.mode) {
|
|
45741
|
+
return;
|
|
45742
|
+
}
|
|
45743
|
+
this.syncingFromStore = true;
|
|
45744
|
+
this.mode = mode;
|
|
45745
|
+
this.syncingFromStore = false;
|
|
45746
|
+
};
|
|
44656
45747
|
this.rollbackContrast = () => {
|
|
44657
45748
|
if (typeof window === 'undefined') {
|
|
44658
45749
|
return this.defaultMode;
|
|
@@ -44689,18 +45780,26 @@ class MdsPrefContrast {
|
|
|
44689
45780
|
this.setContrast(mode);
|
|
44690
45781
|
};
|
|
44691
45782
|
}
|
|
44692
|
-
|
|
45783
|
+
// Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
|
|
45784
|
+
componentWillLoad() {
|
|
44693
45785
|
var _a, _b;
|
|
44694
45786
|
this.setContrast((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
|
|
44695
45787
|
}
|
|
45788
|
+
connectedCallback() {
|
|
45789
|
+
this.unsubscribeStore = preferenceStore.onChange('contrast', this.syncContrast);
|
|
45790
|
+
}
|
|
45791
|
+
disconnectedCallback() {
|
|
45792
|
+
var _a;
|
|
45793
|
+
(_a = this.unsubscribeStore) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
45794
|
+
}
|
|
44696
45795
|
modeChanged(newValue, oldValue) {
|
|
44697
|
-
if (newValue !== oldValue) {
|
|
45796
|
+
if (newValue !== oldValue && !this.syncingFromStore) {
|
|
44698
45797
|
this.setContrast(newValue);
|
|
44699
45798
|
}
|
|
44700
45799
|
}
|
|
44701
45800
|
render() {
|
|
44702
45801
|
var _a;
|
|
44703
|
-
return (hAsync(Host, { key: '
|
|
45802
|
+
return (hAsync(Host, { key: 'e616ac6092e299e246f1d1eb53c39f45f241ac95', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '68d13eb8be2ee6adaf88e78bc9b2be38dc70feca', class: "info", typography: "caption" }, hAsync("b", { key: '47e8b4c296c88bb4e860135b846c536197312443' }, this.t.get('label')), ' ', this.t.get(this.contrast[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: '24a16f9b5bd82bc838a899b75399817d73d1dfb0', fill: true, size: this.size }, hAsync("mds-tab-item", { key: 'ac1df9489fe6df41d8040e30da99d095fa8db50d', selected: this.mode === 'more', onClick: this.handleModeClick('more'), class: "item item--more", icon: miBaselineContrast, title: this.t.get(this.contrast.more.label) }), hAsync("mds-tab-item", { key: 'd7a46a75971a9f66e6283fa717e46c8940c16f59', selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.contrast.system.label) }), hAsync("mds-tab-item", { key: '8838c3b0829cc9f8ec387dd0f5dfb5c7ebea8994', selected: this.mode === 'no-preference', onClick: this.handleModeClick('no-preference'), class: "item item--default", icon: this.mode === 'no-preference' ? miBaselineAutoAwesome : miOutlineAutoAwesome, title: this.t.get(this.contrast['no-preference'].label) }))));
|
|
44704
45803
|
}
|
|
44705
45804
|
static get watchers() { return {
|
|
44706
45805
|
"mode": [{
|
|
@@ -46057,6 +47156,7 @@ class MdsPrefMode {
|
|
|
46057
47156
|
this.cssOverlayZIndex = '6000';
|
|
46058
47157
|
this.overlayId = 'mds-pref-mode-overlay';
|
|
46059
47158
|
this.overlayShow = false;
|
|
47159
|
+
this.syncingFromStore = false;
|
|
46060
47160
|
this.disabled = false;
|
|
46061
47161
|
this.updateCSSCustomProps = () => {
|
|
46062
47162
|
var _a, _b, _c;
|
|
@@ -46088,6 +47188,18 @@ class MdsPrefMode {
|
|
|
46088
47188
|
label: 'lightMode',
|
|
46089
47189
|
},
|
|
46090
47190
|
};
|
|
47191
|
+
/**
|
|
47192
|
+
* Follows a mode applied elsewhere (another instance, or a writer of the
|
|
47193
|
+
* `<html>` classes) without applying it again: no event, no storage write.
|
|
47194
|
+
*/
|
|
47195
|
+
this.syncMode = (mode) => {
|
|
47196
|
+
if (mode === undefined || mode === this.mode || this.disabled) {
|
|
47197
|
+
return;
|
|
47198
|
+
}
|
|
47199
|
+
this.syncingFromStore = true;
|
|
47200
|
+
this.mode = mode;
|
|
47201
|
+
this.syncingFromStore = false;
|
|
47202
|
+
};
|
|
46091
47203
|
this.setMode = (mode) => {
|
|
46092
47204
|
this.prefChangeEvent.emit({ preference: 'mode' });
|
|
46093
47205
|
this.mode = mode;
|
|
@@ -46205,7 +47317,10 @@ class MdsPrefMode {
|
|
|
46205
47317
|
this.changeMode(mode);
|
|
46206
47318
|
};
|
|
46207
47319
|
}
|
|
46208
|
-
|
|
47320
|
+
// The stored mode is applied once, on load. After that each instance only mirrors
|
|
47321
|
+
// the shared store: re-applying its own `mode` on every render made a second
|
|
47322
|
+
// instance (a controller next to a settings page) revert what the other one chose.
|
|
47323
|
+
componentWillLoad() {
|
|
46209
47324
|
var _a, _b;
|
|
46210
47325
|
if (!isSafari()) {
|
|
46211
47326
|
this.setMode((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
|
|
@@ -46214,11 +47329,18 @@ class MdsPrefMode {
|
|
|
46214
47329
|
this.disabled = true;
|
|
46215
47330
|
this.mode = 'light';
|
|
46216
47331
|
}
|
|
47332
|
+
connectedCallback() {
|
|
47333
|
+
this.unsubscribeStore = preferenceStore.onChange('mode', this.syncMode);
|
|
47334
|
+
}
|
|
47335
|
+
disconnectedCallback() {
|
|
47336
|
+
var _a;
|
|
47337
|
+
(_a = this.unsubscribeStore) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
47338
|
+
}
|
|
46217
47339
|
componentDidLoad() {
|
|
46218
47340
|
this.updateCSSCustomProps();
|
|
46219
47341
|
}
|
|
46220
47342
|
modeChanged(newValue, oldValue) {
|
|
46221
|
-
if (newValue === oldValue) {
|
|
47343
|
+
if (newValue === oldValue || this.syncingFromStore) {
|
|
46222
47344
|
return;
|
|
46223
47345
|
}
|
|
46224
47346
|
this.setMode(newValue);
|
|
@@ -46235,9 +47357,9 @@ class MdsPrefMode {
|
|
|
46235
47357
|
}
|
|
46236
47358
|
render() {
|
|
46237
47359
|
var _a, _b;
|
|
46238
|
-
return (hAsync(Host, { key: '
|
|
47360
|
+
return (hAsync(Host, { key: '38b5a158f45cd24c544afceb41f0baf1e04910da', "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-text", { key: 'cc086f42401d84ab5ae370d406ba5e6b28cf1d29', class: "info", typography: "caption" }, hAsync("b", { key: '945bdb711e6038f86f3bf5ffcaaafb4c362191e5' }, this.t.get('label')), ' ', this.disabled
|
|
46239
47361
|
? this.t.get(this.modes[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label, { forced: true })
|
|
46240
|
-
: this.t.get(this.modes[(_b = this.mode) !== null && _b !== void 0 ? _b : this.defaultMode].label, { forced: false })), hAsync("mds-tab", { key: '
|
|
47362
|
+
: this.t.get(this.modes[(_b = this.mode) !== null && _b !== void 0 ? _b : this.defaultMode].label, { forced: false })), hAsync("mds-tab", { key: 'd40d4317bdcd1bf41b5d516c0d8a6c5c2f6e6689', fill: true, size: this.size }, hAsync("mds-tab-item", { key: '13ddcc4bab79d042f1171d383c800eb309c59299', disabled: this.isModeDisabled('light'), selected: this.mode === 'light', onClick: this.handleModeClick('light'), class: "item item--light", icon: miBaselineLightMode, title: this.t.get(this.modes.light.label, { forced: false }) }), hAsync("mds-tab-item", { key: '84b9c4484e359a81e0cc57f447bc911c723aea30', disabled: this.isModeDisabled('system'), selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.modes.system.label) }), hAsync("mds-tab-item", { key: '6d4092d1145c98051a4fb526ca24e1d6caa1e900', disabled: this.isModeDisabled('dark'), selected: this.mode === 'dark', onClick: this.handleModeClick('dark'), class: "item item--dark", icon: this.mode === 'dark' ? miBaselineDarkMode : miOutlineDarkMode, title: this.t.get(this.modes.dark.label) }))));
|
|
46241
47363
|
}
|
|
46242
47364
|
get element() { return getElement(this); }
|
|
46243
47365
|
static get watchers() { return {
|