@maggioli-design-system/magma 2.0.0 → 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 +65 -23
- 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 +29 -34
- package/dist/cjs/mds-badge.cjs.entry.js +5 -4
- package/dist/cjs/mds-banner_3.cjs.entry.js +3 -3
- package/dist/cjs/mds-benchmark-bar.cjs.entry.js +4 -3
- package/dist/cjs/mds-bibliography.cjs.entry.js +5 -4
- 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 +42 -15
- 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 +7 -6
- package/dist/cjs/mds-emoji.cjs.entry.js +2 -2
- package/dist/cjs/mds-entity.cjs.entry.js +3 -3
- package/dist/cjs/mds-file-preview.cjs.entry.js +20 -20
- 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 +19 -10
- 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 +6 -6
- package/dist/cjs/mds-input-date-range-preselection.cjs.entry.js +1 -1
- package/dist/cjs/mds-input-date-range.cjs.entry.js +95 -13
- 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 +166 -35
- 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 +141 -68
- package/dist/cjs/mds-input.cjs.entry.js +320 -36
- package/dist/cjs/mds-keyboard-key.cjs.entry.js +11 -8
- package/dist/cjs/mds-keyboard.cjs.entry.js +9 -6
- 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 +6 -5
- 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 +13 -10
- 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 +6 -5
- 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 +4 -3
- 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 +4 -4
- 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 +6 -4
- package/dist/cjs/mds-tab-bar-item.cjs.entry.js +5 -4
- 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 +4 -4
- 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 +4 -3
- package/dist/cjs/mds-toast.cjs.entry.js +11 -5
- package/dist/cjs/mds-tooltip.cjs.entry.js +7 -7
- 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/mds-avatar.js +27 -32
- 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/mds-badge.js +3 -2
- 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/mds-benchmark-bar.js +3 -2
- 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/mds-bibliography.js +4 -3
- 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 +48 -8
- 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/mds-dropdown.js +4 -3
- 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/mds-file-preview.js +6 -7
- 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/mds-header.js +17 -8
- 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/mds-icon.js +29 -4
- package/dist/collection/components/mds-icon/pattern.md +135 -0
- package/dist/collection/components/mds-icon/services/icons-set.service.js +47 -18
- 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/mds-img.js +3 -3
- 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 +112 -9
- 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 +171 -40
- 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 +181 -67
- 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/mds-keyboard.js +6 -3
- 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/mds-keyboard-key.js +8 -5
- 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/mds-mention.js +3 -2
- 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/mds-notification.js +11 -8
- 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/mds-pref-language-item.js +3 -2
- 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/mds-pref-theme-item.js +3 -2
- 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/mds-stepper-bar.js +5 -3
- 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/mds-tab-bar-item.js +3 -2
- 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/mds-table-header-cell.js +2 -2
- 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/mds-text.js +2 -1
- 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/mds-toast.js +9 -3
- 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/mds-tooltip.js +4 -4
- 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/collection/dictionary/icon.js +1 -1
- 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 +65 -23
- 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 +29 -34
- package/dist/esm/mds-badge.entry.js +5 -4
- package/dist/esm/mds-banner_3.entry.js +3 -3
- package/dist/esm/mds-benchmark-bar.entry.js +4 -3
- package/dist/esm/mds-bibliography.entry.js +5 -4
- 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 +42 -15
- 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 +7 -6
- package/dist/esm/mds-emoji.entry.js +2 -2
- package/dist/esm/mds-entity.entry.js +3 -3
- package/dist/esm/mds-file-preview.entry.js +20 -20
- 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 +19 -10
- 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 +6 -6
- package/dist/esm/mds-input-date-range-preselection.entry.js +1 -1
- package/dist/esm/mds-input-date-range.entry.js +95 -13
- 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 +166 -35
- 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 +141 -68
- package/dist/esm/mds-input.entry.js +320 -36
- package/dist/esm/mds-keyboard-key.entry.js +11 -8
- package/dist/esm/mds-keyboard.entry.js +9 -6
- 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 +6 -5
- 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 +13 -10
- 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 +6 -5
- 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 +4 -3
- 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 +4 -4
- 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 +6 -4
- package/dist/esm/mds-tab-bar-item.entry.js +5 -4
- 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 +4 -4
- 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 +4 -3
- package/dist/esm/mds-toast.entry.js +11 -5
- package/dist/esm/mds-tooltip.entry.js +7 -7
- 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 +37 -26
- 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 +5 -3
- package/dist/esm-es5/mds-badge.entry.js +3 -4
- package/dist/esm-es5/mds-banner_3.entry.js +1 -1
- package/dist/esm-es5/mds-benchmark-bar.entry.js +3 -4
- package/dist/esm-es5/mds-bibliography.entry.js +2 -2
- 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 +14 -9
- 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 +3 -3
- 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 +16 -14
- 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 +8 -6
- 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 +2 -2
- package/dist/esm-es5/mds-input-date-range-preselection.entry.js +1 -1
- package/dist/esm-es5/mds-input-date-range.entry.js +35 -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 +39 -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 +43 -17
- package/dist/esm-es5/mds-input.entry.js +105 -22
- package/dist/esm-es5/mds-keyboard-key.entry.js +3 -1
- package/dist/esm-es5/mds-keyboard.entry.js +4 -2
- 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 +2 -2
- 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 +5 -3
- 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 +3 -3
- 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 +3 -3
- 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 +4 -4
- package/dist/esm-es5/mds-tab-bar-item.entry.js +3 -4
- 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 +2 -2
- 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 +2 -2
- package/dist/esm-es5/mds-toast.entry.js +5 -3
- package/dist/esm-es5/mds-tooltip.entry.js +3 -3
- 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 +1687 -459
- package/dist/hydrate/index.mjs +1687 -459
- 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 +3303 -2650
- 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-avatar/mds-avatar.d.ts +2 -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-header/mds-header.d.ts +1 -0
- package/dist/types/components/mds-icon/mds-icon.d.ts +5 -0
- package/dist/types/components/mds-icon/services/icons-set.service.d.ts +10 -9
- 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 +42 -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/mds-toast/mds-toast.d.ts +1 -0
- package/dist/types/components.d.ts +102 -19
- package/package.json +33 -20
- 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--8aaJX-p.js +0 -1
- package/dist/components/p-A9TZf0Ii.js +0 -1
- package/dist/components/p-B2A_hlV2.js +0 -1
- package/dist/components/p-B9DJLgwr.js +0 -1
- package/dist/components/p-BH3bWzRT.js +0 -1
- package/dist/components/p-BJNK4p33.js +0 -1
- package/dist/components/p-BNHXZ-JR.js +0 -1
- package/dist/components/p-BSxuG1vZ.js +0 -1
- package/dist/components/p-BTHR4xXu.js +0 -1
- package/dist/components/p-BhFTcUD0.js +0 -3
- package/dist/components/p-BouRLCYL.js +0 -1
- package/dist/components/p-Bss3F51Q.js +0 -5
- package/dist/components/p-Bt4xX5ww.js +0 -1
- package/dist/components/p-C03KYHGv.js +0 -1
- package/dist/components/p-C58NKMEE.js +0 -1
- package/dist/components/p-CBLAz3_J.js +0 -1
- package/dist/components/p-CVgKDZPF.js +0 -1
- package/dist/components/p-CVpjH8Un.js +0 -1
- package/dist/components/p-Caksrfcd.js +0 -1
- package/dist/components/p-CatD1iUY.js +0 -1
- package/dist/components/p-CbufYCNj.js +0 -1
- package/dist/components/p-Cehcn85x.js +0 -1
- package/dist/components/p-ClKNADBg.js +0 -8
- package/dist/components/p-CvIFS8oA.js +0 -1
- package/dist/components/p-D3-GP4KF.js +0 -1
- package/dist/components/p-D8I1RblC.js +0 -1
- package/dist/components/p-DLE5TNTp.js +0 -1
- package/dist/components/p-DaI5QqNu.js +0 -1
- package/dist/components/p-Deh5Aia-.js +0 -1
- package/dist/components/p-Dj_oN194.js +0 -1
- package/dist/components/p-DmELzfvf.js +0 -1
- package/dist/components/p-DtxB7DYE.js +0 -1
- package/dist/components/p-cBZsPiMJ.js +0 -1
- package/dist/components/p-sqRs6oj4.js +0 -1
- package/dist/components/p-wq6nWuWE.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-03be5c0c.entry.js +0 -1
- package/dist/magma-components/p-0715a2cb.system.entry.js +0 -12
- 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-07fde74d.system.entry.js +0 -39
- 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-0ad3b4da.system.entry.js +0 -102
- package/dist/magma-components/p-0af8d821.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-15f63bf3.entry.js +0 -1
- package/dist/magma-components/p-16e9fb14.system.entry.js +0 -7
- package/dist/magma-components/p-1780b8ba.entry.js +0 -1
- 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-18f7b970.system.entry.js +0 -4
- package/dist/magma-components/p-1a8c5086.system.entry.js +0 -19
- package/dist/magma-components/p-1afc0452.entry.js +0 -1
- package/dist/magma-components/p-1c0a7e24.system.entry.js +0 -30
- package/dist/magma-components/p-1cce738a.system.entry.js +0 -32
- package/dist/magma-components/p-1dcfb13e.entry.js +0 -1
- 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-231505e8.entry.js +0 -1
- package/dist/magma-components/p-23e61db9.system.entry.js +0 -4
- package/dist/magma-components/p-241dbf61.entry.js +0 -1
- package/dist/magma-components/p-25935d33.system.entry.js +0 -1
- package/dist/magma-components/p-27ea99ee.entry.js +0 -8
- 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-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-3d8e63a2.system.entry.js +0 -63
- 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-3f7d3060.system.entry.js +0 -42
- 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-4297da23.system.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-454c4774.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-481008e9.system.entry.js +0 -13
- package/dist/magma-components/p-48d37230.entry.js +0 -1
- package/dist/magma-components/p-4b3a8132.system.entry.js +0 -13
- 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-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-54b995c2.system.entry.js +0 -4
- package/dist/magma-components/p-56ad5bf2.entry.js +0 -1
- package/dist/magma-components/p-59de81ac.entry.js +0 -1
- package/dist/magma-components/p-5a7ead55.system.entry.js +0 -37
- package/dist/magma-components/p-5e43274a.system.entry.js +0 -15
- 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-66ce2dee.entry.js +0 -1
- 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-69d1b815.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-6cd7cfe3.entry.js +0 -1
- 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-6edc4f16.system.entry.js +0 -14
- 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-75dd012a.system.entry.js +0 -11
- package/dist/magma-components/p-75fcf1a4.entry.js +0 -1
- 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-78fef00a.entry.js +0 -1
- package/dist/magma-components/p-7c0d202c.entry.js +0 -1
- package/dist/magma-components/p-7fc29447.entry.js +0 -1
- 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-896ae0ee.entry.js +0 -1
- package/dist/magma-components/p-89a3bc7a.system.entry.js +0 -16
- package/dist/magma-components/p-8b7fa8d7.entry.js +0 -1
- package/dist/magma-components/p-8c4fb7ec.system.entry.js +0 -30
- 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-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-960dc9b5.system.entry.js +0 -15
- package/dist/magma-components/p-9626eaff.system.entry.js +0 -134
- 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-9b2ee3fe.entry.js +0 -1
- package/dist/magma-components/p-9be4a736.entry.js +0 -1
- package/dist/magma-components/p-9ca7932d.system.entry.js +0 -8
- package/dist/magma-components/p-9d86477d.system.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-CBam2PI8.system.js +0 -79
- 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-DmC-b-ZK.system.js +0 -67
- package/dist/magma-components/p-MGv0i39Y.system.js +0 -162
- package/dist/magma-components/p-a3279a73.system.entry.js +0 -11
- package/dist/magma-components/p-a3b0f586.entry.js +0 -1
- package/dist/magma-components/p-a3fc2ea4.system.entry.js +0 -39
- package/dist/magma-components/p-a5ac5e0b.entry.js +0 -1
- package/dist/magma-components/p-a8ec3080.system.entry.js +0 -27
- package/dist/magma-components/p-a906a02f.system.entry.js +0 -16
- 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-ac544ab1.entry.js +0 -1
- 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-af41c8b8.system.entry.js +0 -1
- package/dist/magma-components/p-af45f0a5.system.entry.js +0 -20
- package/dist/magma-components/p-b23a6c83.entry.js +0 -1
- 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-b9fecfd5.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-be692266.system.entry.js +0 -13
- 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-c1fb2eb7.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-c70d7159.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-cd21137b.system.entry.js +0 -1
- package/dist/magma-components/p-cd5866c8.entry.js +0 -1
- package/dist/magma-components/p-ce0ecc75.system.entry.js +0 -15
- package/dist/magma-components/p-ce4e1a41.system.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-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-ddbdce09.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-e05d2df8.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-e3e893c4.entry.js +0 -1
- package/dist/magma-components/p-e4868ade.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-ec59ec9a.entry.js +0 -1
- package/dist/magma-components/p-eddcef53.system.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-efe8d359.entry.js +0 -1
- package/dist/magma-components/p-f070a5b5.system.entry.js +0 -11
- package/dist/magma-components/p-f0a168f4.system.entry.js +0 -13
- package/dist/magma-components/p-f1462410.system.entry.js +0 -9
- 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-fe1662e8.system.entry.js +0 -28
- package/dist/magma-components/p-ff133cbd.entry.js +0 -1
- package/dist/magma-components/p-fff44704.entry.js +0 -1
package/dist/hydrate/index.mjs
CHANGED
|
@@ -7861,9 +7861,25 @@ class MdsAvatar {
|
|
|
7861
7861
|
this.handleImgLoadSuccess = () => {
|
|
7862
7862
|
this.loaded = true;
|
|
7863
7863
|
};
|
|
7864
|
+
// a removed attribute or a null bound by a framework counts as not set, like '' or 0
|
|
7865
|
+
this.hasCount = () => {
|
|
7866
|
+
var _a;
|
|
7867
|
+
const count = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
|
|
7868
|
+
return count !== 0 && !Number.isNaN(count);
|
|
7869
|
+
};
|
|
7870
|
+
this.checkTexts = () => {
|
|
7871
|
+
var _a;
|
|
7872
|
+
const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
|
|
7873
|
+
if (initials !== '')
|
|
7874
|
+
this.checkText(initials);
|
|
7875
|
+
if (this.hasCount())
|
|
7876
|
+
this.checkText(String(this.count));
|
|
7877
|
+
};
|
|
7864
7878
|
this.checkInitialsVariant = () => {
|
|
7865
|
-
|
|
7866
|
-
|
|
7879
|
+
var _a;
|
|
7880
|
+
const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
|
|
7881
|
+
if (initials !== '') {
|
|
7882
|
+
let cleanedInitials = initials
|
|
7867
7883
|
.toLowerCase()
|
|
7868
7884
|
.replace(/[^a-zA-Z0-9]+/g, '')
|
|
7869
7885
|
.substring(0, 2);
|
|
@@ -7884,21 +7900,13 @@ class MdsAvatar {
|
|
|
7884
7900
|
if (this.src !== undefined) {
|
|
7885
7901
|
this.loaded = false;
|
|
7886
7902
|
}
|
|
7887
|
-
|
|
7888
|
-
this.checkText(this.initials);
|
|
7889
|
-
}
|
|
7890
|
-
if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count)) {
|
|
7891
|
-
this.checkText(this.count.toString());
|
|
7892
|
-
}
|
|
7903
|
+
this.checkTexts();
|
|
7893
7904
|
}
|
|
7894
7905
|
componentDidRender() {
|
|
7895
7906
|
if (this.textChanged) {
|
|
7896
7907
|
// placed here becase @Watch('initials') is fired
|
|
7897
7908
|
// BEFORE the element .fit is attached on shDOM
|
|
7898
|
-
|
|
7899
|
-
this.checkText(this.initials);
|
|
7900
|
-
if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count))
|
|
7901
|
-
this.checkText(this.count.toString());
|
|
7909
|
+
this.checkTexts();
|
|
7902
7910
|
this.textChanged = false;
|
|
7903
7911
|
}
|
|
7904
7912
|
}
|
|
@@ -7921,26 +7929,13 @@ class MdsAvatar {
|
|
|
7921
7929
|
}
|
|
7922
7930
|
}
|
|
7923
7931
|
render() {
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
'avatar--fallback', this.icon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, this.initials &&
|
|
7932
|
-
(this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
|
|
7933
|
-
!this.fallback &&
|
|
7934
|
-
(this.src === undefined || this.src === '') && (hAsync("div", { key: '08dd0918a258022793f5331a9de7b2460a2e1404', class: "initials-text" }, hAsync("span", { key: '69379497bb9096cea56b366c52ba5372adb5506d', class: "fit" }, this.initials.substring(0, 2)))), this.count && !this.fallback && (this.src === undefined || this.src === '') && (hAsync("div", { key: '07c1e94db40562b8a2467605591236433fd6af39', class: "initials-text" }, hAsync("span", { key: '36c2b72540c03d140f97d64304d46583419d23df', class: "fit" }, "+", this.count))), this.src &&
|
|
7935
|
-
(this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
|
|
7936
|
-
!this.fallback &&
|
|
7937
|
-
(this.icon === undefined || this.icon === '') && (hAsync("mds-img", { key: '9d6a6d4a12a5142686aede6e9f9a974f592b674f', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), this.icon &&
|
|
7938
|
-
(this.initials === undefined || this.initials === '') &&
|
|
7939
|
-
(this.count === undefined || this.count === 0 || Number.isNaN(this.count)) && (hAsync("mds-icon", { key: 'b37eae32b77654190b14d8b046d2f9a51801ae2a', class: "icon", part: "icon", name: this.icon })), (this.fallback ||
|
|
7940
|
-
((this.icon === undefined || this.icon === '') &&
|
|
7941
|
-
(this.initials === undefined || this.initials === '') &&
|
|
7942
|
-
(this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
|
|
7943
|
-
(this.src === undefined || this.src === ''))) && (hAsync("i", { key: '18d842d4aea1f73adef926ff74a896a9d8a52bc6', class: "fallback-icon", innerHTML: miBaselinePerson })))));
|
|
7932
|
+
var _a, _b, _c, _d;
|
|
7933
|
+
const hasCount = this.hasCount();
|
|
7934
|
+
const icon = (_a = this.icon) !== null && _a !== void 0 ? _a : '';
|
|
7935
|
+
const hasIcon = icon !== '';
|
|
7936
|
+
const hasInitials = ((_b = this.initials) !== null && _b !== void 0 ? _b : '') !== '';
|
|
7937
|
+
const hasSrc = ((_c = this.src) !== null && _c !== void 0 ? _c : '') !== '';
|
|
7938
|
+
return (hAsync(Host, { key: '87e19218bbfe6e9c79f5edd7b4dd0350572b4f84', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast }, hAsync("div", { key: 'b8775a55b682778312539df8ba0d8107075873e1', class: clsx('avatar', hasInitials && !this.fallback && !hasSrc && 'avatar--initials', (this.fallback || (!hasIcon && !hasInitials && !hasSrc)) && 'avatar--fallback', hasIcon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, hasInitials && !hasCount && !this.fallback && !hasSrc && (hAsync("div", { key: 'acea5faae52d0cfaaa8f03788a22c89c8f0095ad', class: "initials-text" }, hAsync("span", { key: 'aedd03f85b197fc6ed24b4a0238804856145aa4c', class: "fit" }, (_d = this.initials) === null || _d === void 0 ? void 0 : _d.substring(0, 2)))), hasCount && !this.fallback && !hasSrc && (hAsync("div", { key: 'dd8af02204937c6558ab63b26d5993aa34e4df37', class: "initials-text" }, hAsync("span", { key: 'fdf6930557054172bea785b8c6be0decb743887a', class: "fit" }, "+", this.count))), hasSrc && !hasCount && !this.fallback && !hasIcon && (hAsync("mds-img", { key: '4519cc0bd3e701abf9d7bdaf0189f2ca3bcd86ed', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), hasIcon && !hasInitials && !hasCount && (hAsync("mds-icon", { key: '5958962b68d5797dd46f1322b0e12717bf70c93e', class: "icon", part: "icon", name: icon })), (this.fallback || (!hasIcon && !hasInitials && !hasCount && !hasSrc)) && (hAsync("i", { key: 'e6509636da3e20d93144dde5f3ecce6f1cfc5506', class: "fallback-icon", innerHTML: miBaselinePerson })))));
|
|
7944
7939
|
}
|
|
7945
7940
|
get element() { return getElement(this); }
|
|
7946
7941
|
static get watchers() { return {
|
|
@@ -8058,8 +8053,9 @@ class MdsBadge {
|
|
|
8058
8053
|
*/
|
|
8059
8054
|
this.typography = 'option';
|
|
8060
8055
|
this.onSlotChangeHandler = () => {
|
|
8056
|
+
var _a;
|
|
8061
8057
|
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
8062
|
-
if (this.label !==
|
|
8058
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
|
|
8063
8059
|
return;
|
|
8064
8060
|
this.label = readSlottedLabel(this.host);
|
|
8065
8061
|
};
|
|
@@ -8068,7 +8064,7 @@ class MdsBadge {
|
|
|
8068
8064
|
this.label = sanitizeLabel(newValue);
|
|
8069
8065
|
}
|
|
8070
8066
|
render() {
|
|
8071
|
-
return (hAsync(Host, { key: '
|
|
8067
|
+
return (hAsync(Host, { key: '30205c3754c77ad904a3a01a695ec9daf058bd81', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-text", { key: '3a850df57ca87e8efbf505094f3d1e4e309deb42', tag: "span", typography: this.typography, variant: "info", text: this.label }, this.label || hAsync("slot", { key: '99531173211bd788d288b9d20d36d5eb7b2dc95e', onSlotchange: this.onSlotChangeHandler }))));
|
|
8072
8068
|
}
|
|
8073
8069
|
get host() { return getElement(this); }
|
|
8074
8070
|
static get watchers() { return {
|
|
@@ -8955,22 +8951,22 @@ let Locale$1 = class Locale {
|
|
|
8955
8951
|
};
|
|
8956
8952
|
|
|
8957
8953
|
const cancel$7 = "Ακύρωση";
|
|
8958
|
-
var localeEl$
|
|
8954
|
+
var localeEl$x = {
|
|
8959
8955
|
cancel: cancel$7
|
|
8960
8956
|
};
|
|
8961
8957
|
|
|
8962
8958
|
const cancel$6 = "Cancel";
|
|
8963
|
-
var localeEn$
|
|
8959
|
+
var localeEn$x = {
|
|
8964
8960
|
cancel: cancel$6
|
|
8965
8961
|
};
|
|
8966
8962
|
|
|
8967
8963
|
const cancel$5 = "Cancelar";
|
|
8968
|
-
var localeEs$
|
|
8964
|
+
var localeEs$x = {
|
|
8969
8965
|
cancel: cancel$5
|
|
8970
8966
|
};
|
|
8971
8967
|
|
|
8972
8968
|
const cancel$4 = "Annulla";
|
|
8973
|
-
var localeIt$
|
|
8969
|
+
var localeIt$y = {
|
|
8974
8970
|
cancel: cancel$4
|
|
8975
8971
|
};
|
|
8976
8972
|
|
|
@@ -8987,10 +8983,10 @@ class MdsBanner {
|
|
|
8987
8983
|
this.closeEvent = createEvent(this, "mdsBannerClose", 7);
|
|
8988
8984
|
this.km = new KeyboardManager();
|
|
8989
8985
|
this.t = new Locale$1({
|
|
8990
|
-
el: localeEl$
|
|
8991
|
-
en: localeEn$
|
|
8992
|
-
es: localeEs$
|
|
8993
|
-
it: localeIt$
|
|
8986
|
+
el: localeEl$x,
|
|
8987
|
+
en: localeEn$x,
|
|
8988
|
+
es: localeEs$x,
|
|
8989
|
+
it: localeIt$y,
|
|
8994
8990
|
});
|
|
8995
8991
|
/**
|
|
8996
8992
|
* Sets the theme variant colors
|
|
@@ -9119,8 +9115,9 @@ class MdsBenchmarkBar {
|
|
|
9119
9115
|
*/
|
|
9120
9116
|
this.size = 'md';
|
|
9121
9117
|
this.onSlotChangeHandler = () => {
|
|
9118
|
+
var _a;
|
|
9122
9119
|
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
9123
|
-
if (this.label !==
|
|
9120
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
|
|
9124
9121
|
return;
|
|
9125
9122
|
this.label = readSlottedLabel(this.host);
|
|
9126
9123
|
};
|
|
@@ -9130,7 +9127,7 @@ class MdsBenchmarkBar {
|
|
|
9130
9127
|
}
|
|
9131
9128
|
render() {
|
|
9132
9129
|
var _a;
|
|
9133
|
-
return (hAsync(Host, { key: '
|
|
9130
|
+
return (hAsync(Host, { key: 'e07ff600bed598dc0d97144ef596c2a2010efbbd' }, hAsync("div", { key: 'd3493800ec6d4f20e36d38132f10a3b67f565006', class: "infos" }, hAsync("mds-text", { key: '07423f38822e314059dcee2cda38abffbea3bb62', typography: this.typography, class: "label", id: "label", truncate: "word" }, this.label || hAsync("slot", { key: 'e4aff25b3be0d2f87aefb2a88dd6050715c74d56', onSlotchange: this.onSlotChangeHandler })), hAsync("mds-text", { key: '8b1ec4a01389199b881f46a69ccee96c8867446e', typography: this.typography, class: "value", truncate: "word" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), hAsync("mds-progress", { key: 'bc44dc2a31dd43599393df1129671da224f45f43', "aria-labelledby": "label", "aria-valuetext": this.alias, class: "progress", variant: this.variant, progress: this.value / 100, size: this.size, part: "progress-bar" })));
|
|
9134
9131
|
}
|
|
9135
9132
|
get host() { return getElement(this); }
|
|
9136
9133
|
static get watchers() { return {
|
|
@@ -9241,7 +9238,7 @@ class MdsBibliography {
|
|
|
9241
9238
|
return `${lastName}${lastName !== '' ? ',' : ''} ${formattedFirstName}`;
|
|
9242
9239
|
};
|
|
9243
9240
|
this.formatAuthors = (author) => {
|
|
9244
|
-
var _a;
|
|
9241
|
+
var _a, _b;
|
|
9245
9242
|
const authorName = author.replace(/"/g, "'");
|
|
9246
9243
|
const splitNames = new RegExp(/([A-Za-z ]{2,})/g);
|
|
9247
9244
|
const fullName = (_a = authorName.match(splitNames)) !== null && _a !== void 0 ? _a : authorName;
|
|
@@ -9257,7 +9254,7 @@ class MdsBibliography {
|
|
|
9257
9254
|
};
|
|
9258
9255
|
}
|
|
9259
9256
|
const firstName = fullName[0].split(' ')[0].trim();
|
|
9260
|
-
const lastName = fullName[0].split(' ')[1] !==
|
|
9257
|
+
const lastName = ((_b = fullName[0].split(' ')[1]) !== null && _b !== void 0 ? _b : '').trim();
|
|
9261
9258
|
return {
|
|
9262
9259
|
apa: this.fullNameAPA(firstName, lastName),
|
|
9263
9260
|
firstName,
|
|
@@ -9290,7 +9287,8 @@ class MdsBibliography {
|
|
|
9290
9287
|
};
|
|
9291
9288
|
}
|
|
9292
9289
|
render() {
|
|
9293
|
-
|
|
9290
|
+
var _a, _b, _c;
|
|
9291
|
+
return (hAsync(Host, { key: '4fe352d77a5ceea45f9b82d11fbb4ffe2d887aef' }, hAsync("mds-text", { key: '30052872c829ff3b2c142cd54cb64eebcd558f76', typography: this.typography, variant: this.variant }, this.author && hAsync("span", { key: '14d5043a19e193f34a4502029d7dc21fe2ae8083' }, this.showAuthors(this.normalizeAuthors(this.author))), this.format === 'mla' && (hAsync("span", { key: '7b903d623a57baf664c7cd425e78d7a17fca8331' }, this.name && ' ', ((_a = this.name) !== null && _a !== void 0 ? _a : '') !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, this.name, ".")))) : (hAsync("b", null, hAsync("i", null, this.name, "."))), this.location && (hAsync("span", { key: '9c52f22dd20cafb9eb7df4835c2f5a99ca71a1a6' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && (hAsync("span", { key: '3ff1124122ef8d52079fa7337ed51f116fa1f266' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && hAsync("time", { key: 'ac4e6e1506bbca2633c95593d44df61622b6e040', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))), this.format === 'apa' && (hAsync("span", { key: '71558449f856a09fda8b02f2808c93b1dd72c532' }, this.date && hAsync("time", { key: 'f952a6c0f8be0cbf83a8d04ff13e08b3221cbdc4', dateTime: this.date }, " (", this.dateFormatAPA(this.date), ")."), this.name && ' ', ((_b = this.name) !== null && _b !== void 0 ? _b : '') !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, " ", this.name, ".")))) : (hAsync("b", null, hAsync("i", null, " ", this.name, "."))), this.location && (hAsync("span", { key: 'ecead881a08e1f08ebe0c08f5016414238b0c0aa' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && hAsync("span", { key: '7f5caaaecb02bdda257974de0439d0c15e4ebd71' }, " ", this.publisher, "."))), this.format === 'turabian' && (hAsync("span", { key: 'e2869b0cbf35ddb64020edfb9aeab7a5bd94e56d' }, this.name && ' ', ((_c = this.name) !== null && _c !== void 0 ? _c : '') !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, " ", this.name, ".")))) : (hAsync("b", null, hAsync("i", null, " ", this.name, "."))), this.location && (hAsync("span", { key: '1de156ae83032c28eef77b059c52beed6f7bb8a8' }, ' ', this.location, this.publisher !== undefined ? ':' : ',')), this.publisher && (hAsync("span", { key: 'c82b2387e90227b129d5078561c60492901fb9e3' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && hAsync("time", { key: 'fe9da6c7294ee249a0d892cf882a387ba0196159', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))))));
|
|
9294
9292
|
}
|
|
9295
9293
|
static get style() { return mdsBibliographyCss(); }
|
|
9296
9294
|
static get cmpMeta() { return {
|
|
@@ -9317,22 +9315,22 @@ class MdsBibliography {
|
|
|
9317
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>`;
|
|
9318
9316
|
|
|
9319
9317
|
const back$3 = "Πήγαινε πίσω";
|
|
9320
|
-
var localeEl$
|
|
9318
|
+
var localeEl$w = {
|
|
9321
9319
|
back: back$3
|
|
9322
9320
|
};
|
|
9323
9321
|
|
|
9324
9322
|
const back$2 = "Go back";
|
|
9325
|
-
var localeEn$
|
|
9323
|
+
var localeEn$w = {
|
|
9326
9324
|
back: back$2
|
|
9327
9325
|
};
|
|
9328
9326
|
|
|
9329
9327
|
const back$1 = "Volver atrás";
|
|
9330
|
-
var localeEs$
|
|
9328
|
+
var localeEs$w = {
|
|
9331
9329
|
back: back$1
|
|
9332
9330
|
};
|
|
9333
9331
|
|
|
9334
9332
|
const back = "Indietro";
|
|
9335
|
-
var localeIt$
|
|
9333
|
+
var localeIt$x = {
|
|
9336
9334
|
back: back
|
|
9337
9335
|
};
|
|
9338
9336
|
|
|
@@ -9347,10 +9345,10 @@ class MdsBreadcrumb {
|
|
|
9347
9345
|
this.changedEvent = createEvent(this, "mdsBreadcrumbChange", 7);
|
|
9348
9346
|
this.kb = new KeyboardManager();
|
|
9349
9347
|
this.t = new Locale$1({
|
|
9350
|
-
el: localeEl$
|
|
9351
|
-
en: localeEn$
|
|
9352
|
-
es: localeEs$
|
|
9353
|
-
it: localeIt$
|
|
9348
|
+
el: localeEl$w,
|
|
9349
|
+
en: localeEn$w,
|
|
9350
|
+
es: localeEs$w,
|
|
9351
|
+
it: localeIt$x,
|
|
9354
9352
|
});
|
|
9355
9353
|
/**
|
|
9356
9354
|
* Hides the back arrow button
|
|
@@ -9543,12 +9541,53 @@ const isIconFormatIsSVG = (icon) => {
|
|
|
9543
9541
|
return icon.startsWith(MARKUP_SVG_ICON);
|
|
9544
9542
|
};
|
|
9545
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
|
+
|
|
9546
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>`;
|
|
9547
9586
|
|
|
9548
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>
|
|
9549
9588
|
`;
|
|
9550
9589
|
|
|
9551
|
-
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}}`;
|
|
9552
9591
|
|
|
9553
9592
|
/**
|
|
9554
9593
|
* @slot - Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here.
|
|
@@ -9599,9 +9638,9 @@ class MdsButton {
|
|
|
9599
9638
|
*/
|
|
9600
9639
|
this.truncate = 'word';
|
|
9601
9640
|
this.handleRequestSubmitForm = (e) => {
|
|
9602
|
-
var _a;
|
|
9603
9641
|
e.preventDefault();
|
|
9604
|
-
(
|
|
9642
|
+
if (this.internals.form)
|
|
9643
|
+
requestSubmitAs(this.internals.form, this.name, this.value);
|
|
9605
9644
|
};
|
|
9606
9645
|
this.handleReset = (e) => {
|
|
9607
9646
|
var _a;
|
|
@@ -9622,8 +9661,9 @@ class MdsButton {
|
|
|
9622
9661
|
throw Error('Object window is not defined');
|
|
9623
9662
|
};
|
|
9624
9663
|
this.onSlotChangeHandler = () => {
|
|
9664
|
+
var _a;
|
|
9625
9665
|
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
9626
|
-
if (this.label !==
|
|
9666
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
|
|
9627
9667
|
return;
|
|
9628
9668
|
this.label = readSlottedLabel(this.host);
|
|
9629
9669
|
};
|
|
@@ -9680,8 +9720,9 @@ class MdsButton {
|
|
|
9680
9720
|
}
|
|
9681
9721
|
}
|
|
9682
9722
|
componentWillLoad() {
|
|
9723
|
+
var _a;
|
|
9683
9724
|
this.handleVariantChange(this.variant);
|
|
9684
|
-
if (this.href !==
|
|
9725
|
+
if (((_a = this.href) !== null && _a !== void 0 ? _a : '') !== '') {
|
|
9685
9726
|
this.host.addEventListener('click', (e) => {
|
|
9686
9727
|
var _a;
|
|
9687
9728
|
e.preventDefault();
|
|
@@ -9704,6 +9745,7 @@ class MdsButton {
|
|
|
9704
9745
|
}
|
|
9705
9746
|
}
|
|
9706
9747
|
componentDidLoad() {
|
|
9748
|
+
var _a;
|
|
9707
9749
|
this.km.addElement(this.host);
|
|
9708
9750
|
if (!this.await) {
|
|
9709
9751
|
this.km.attachClickBehavior();
|
|
@@ -9721,9 +9763,7 @@ class MdsButton {
|
|
|
9721
9763
|
if (this.label === '') {
|
|
9722
9764
|
this.label = undefined;
|
|
9723
9765
|
}
|
|
9724
|
-
if ((this.label ===
|
|
9725
|
-
this.icon !== undefined &&
|
|
9726
|
-
this.icon !== '') {
|
|
9766
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') === '' && this.icon != null && this.icon !== '') {
|
|
9727
9767
|
const iconTitle = unslugName(this.icon);
|
|
9728
9768
|
if (!this.host.hasAttribute('aria-label')) {
|
|
9729
9769
|
setAttributeIfEmpty(this.host, 'title', iconTitle);
|
|
@@ -9752,7 +9792,7 @@ class MdsButton {
|
|
|
9752
9792
|
render() {
|
|
9753
9793
|
var _a;
|
|
9754
9794
|
this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
|
|
9755
|
-
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" }))));
|
|
9756
9796
|
}
|
|
9757
9797
|
static get formAssociated() { return true; }
|
|
9758
9798
|
get host() { return getElement(this); }
|
|
@@ -9786,6 +9826,8 @@ class MdsButton {
|
|
|
9786
9826
|
"icon": [1537],
|
|
9787
9827
|
"iconPosition": [513, "icon-position"],
|
|
9788
9828
|
"type": [513],
|
|
9829
|
+
"name": [513],
|
|
9830
|
+
"value": [513],
|
|
9789
9831
|
"variant": [513],
|
|
9790
9832
|
"tone": [513],
|
|
9791
9833
|
"size": [513],
|
|
@@ -9798,7 +9840,7 @@ class MdsButton {
|
|
|
9798
9840
|
},
|
|
9799
9841
|
"$listeners$": undefined,
|
|
9800
9842
|
"$lazyBundleId$": "-",
|
|
9801
|
-
"$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"]]
|
|
9802
9844
|
}; }
|
|
9803
9845
|
}
|
|
9804
9846
|
|
|
@@ -9812,10 +9854,22 @@ const mdsButtonDropdownCss = () => `@layer reset,vendor,theme,base,components,ut
|
|
|
9812
9854
|
class MdsButtonDropdown {
|
|
9813
9855
|
constructor(hostRef) {
|
|
9814
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;
|
|
9815
9868
|
/**
|
|
9816
|
-
* 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'`
|
|
9817
9871
|
*/
|
|
9818
|
-
this.type = '
|
|
9872
|
+
this.type = 'button';
|
|
9819
9873
|
/**
|
|
9820
9874
|
* Specifies the color variant for the button
|
|
9821
9875
|
*/
|
|
@@ -9836,19 +9890,42 @@ class MdsButtonDropdown {
|
|
|
9836
9890
|
* Specifies if the text shoud be truncated or should behave as a normal text
|
|
9837
9891
|
*/
|
|
9838
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;
|
|
9839
9913
|
}
|
|
9840
9914
|
render() {
|
|
9841
|
-
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' }))));
|
|
9842
9916
|
}
|
|
9917
|
+
static get formAssociated() { return true; }
|
|
9843
9918
|
static get style() { return mdsButtonDropdownCss(); }
|
|
9844
9919
|
static get cmpMeta() { return {
|
|
9845
|
-
"$flags$":
|
|
9920
|
+
"$flags$": 329,
|
|
9846
9921
|
"$tagName$": "mds-button-dropdown",
|
|
9847
9922
|
"$members$": {
|
|
9848
9923
|
"label": [1],
|
|
9849
9924
|
"autoFocus": [4, "auto-focus"],
|
|
9850
9925
|
"icon": [1537],
|
|
9851
9926
|
"type": [513],
|
|
9927
|
+
"name": [513],
|
|
9928
|
+
"value": [513],
|
|
9852
9929
|
"variant": [513],
|
|
9853
9930
|
"tone": [513],
|
|
9854
9931
|
"size": [513],
|
|
@@ -9857,11 +9934,12 @@ class MdsButtonDropdown {
|
|
|
9857
9934
|
"await": [1540],
|
|
9858
9935
|
"href": [513],
|
|
9859
9936
|
"target": [1],
|
|
9860
|
-
"truncate": [513]
|
|
9937
|
+
"truncate": [513],
|
|
9938
|
+
"formDisabled": [32]
|
|
9861
9939
|
},
|
|
9862
9940
|
"$listeners$": undefined,
|
|
9863
9941
|
"$lazyBundleId$": "-",
|
|
9864
|
-
"$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"]]
|
|
9865
9943
|
}; }
|
|
9866
9944
|
}
|
|
9867
9945
|
|
|
@@ -18844,22 +18922,22 @@ class MdsCardMedia {
|
|
|
18844
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>`;
|
|
18845
18923
|
|
|
18846
18924
|
const deleteLabel$7 = "Αφαίρεση";
|
|
18847
|
-
var localeEl$
|
|
18925
|
+
var localeEl$v = {
|
|
18848
18926
|
deleteLabel: deleteLabel$7
|
|
18849
18927
|
};
|
|
18850
18928
|
|
|
18851
18929
|
const deleteLabel$6 = "Remove";
|
|
18852
|
-
var localeEn$
|
|
18930
|
+
var localeEn$v = {
|
|
18853
18931
|
deleteLabel: deleteLabel$6
|
|
18854
18932
|
};
|
|
18855
18933
|
|
|
18856
18934
|
const deleteLabel$5 = "Eliminar";
|
|
18857
|
-
var localeEs$
|
|
18935
|
+
var localeEs$v = {
|
|
18858
18936
|
deleteLabel: deleteLabel$5
|
|
18859
18937
|
};
|
|
18860
18938
|
|
|
18861
18939
|
const deleteLabel$4 = "Rimuovi";
|
|
18862
|
-
var localeIt$
|
|
18940
|
+
var localeIt$w = {
|
|
18863
18941
|
deleteLabel: deleteLabel$4
|
|
18864
18942
|
};
|
|
18865
18943
|
|
|
@@ -18873,10 +18951,10 @@ class MdsChip {
|
|
|
18873
18951
|
this.selectEvent = createEvent(this, "mdsChipSelect", 7);
|
|
18874
18952
|
this.km = new KeyboardManager();
|
|
18875
18953
|
this.t = new Locale$1({
|
|
18876
|
-
el: localeEl$
|
|
18877
|
-
en: localeEn$
|
|
18878
|
-
es: localeEs$
|
|
18879
|
-
it: localeIt$
|
|
18954
|
+
el: localeEl$v,
|
|
18955
|
+
en: localeEn$v,
|
|
18956
|
+
es: localeEs$v,
|
|
18957
|
+
it: localeIt$w,
|
|
18880
18958
|
});
|
|
18881
18959
|
/**
|
|
18882
18960
|
* Sets the component disabled status
|
|
@@ -19133,8 +19211,8 @@ var arrowSvg$1 = `<svg width="30" height="16" viewBox="0 0 30 16" xmlns="http://
|
|
|
19133
19211
|
const sides = ['top', 'right', 'bottom', 'left'];
|
|
19134
19212
|
const alignments = ['start', 'end'];
|
|
19135
19213
|
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
19136
|
-
const min = Math.min;
|
|
19137
|
-
const max = Math.max;
|
|
19214
|
+
const min$4 = Math.min;
|
|
19215
|
+
const max$4 = Math.max;
|
|
19138
19216
|
const round = Math.round;
|
|
19139
19217
|
const floor = Math.floor;
|
|
19140
19218
|
const createCoords = v => ({
|
|
@@ -19148,7 +19226,7 @@ const oppositeSideMap = {
|
|
|
19148
19226
|
top: 'bottom'
|
|
19149
19227
|
};
|
|
19150
19228
|
function clamp$1(start, value, end) {
|
|
19151
|
-
return max(start, min(value, end));
|
|
19229
|
+
return max$4(start, min$4(value, end));
|
|
19152
19230
|
}
|
|
19153
19231
|
function evaluate(value, param) {
|
|
19154
19232
|
return typeof value === 'function' ? value(param) : value;
|
|
@@ -19524,8 +19602,8 @@ const arrow$1 = options => ({
|
|
|
19524
19602
|
// If the padding is large enough that it causes the arrow to no longer be
|
|
19525
19603
|
// centered, modify the padding so that it is centered.
|
|
19526
19604
|
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
19527
|
-
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
19528
|
-
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
19605
|
+
const minPadding = min$4(paddingObject[minProp], largestPossiblePadding);
|
|
19606
|
+
const maxPadding = min$4(paddingObject[maxProp], largestPossiblePadding);
|
|
19529
19607
|
|
|
19530
19608
|
// Make sure the arrow doesn't overflow the floating element if the center
|
|
19531
19609
|
// point is outside the floating element's bounds.
|
|
@@ -20312,12 +20390,12 @@ function getDocumentRect(element) {
|
|
|
20312
20390
|
const html = getDocumentElement(element);
|
|
20313
20391
|
const scroll = getNodeScroll(element);
|
|
20314
20392
|
const body = element.ownerDocument.body;
|
|
20315
|
-
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
20316
|
-
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);
|
|
20317
20395
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
20318
20396
|
const y = -scroll.scrollTop;
|
|
20319
20397
|
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
20320
|
-
x += max(html.clientWidth, body.clientWidth) - width;
|
|
20398
|
+
x += max$4(html.clientWidth, body.clientWidth) - width;
|
|
20321
20399
|
}
|
|
20322
20400
|
return {
|
|
20323
20401
|
width,
|
|
@@ -20444,10 +20522,10 @@ function getClippingRect(_ref) {
|
|
|
20444
20522
|
const firstClippingAncestor = clippingAncestors[0];
|
|
20445
20523
|
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
20446
20524
|
const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
|
|
20447
|
-
accRect.top = max(rect.top, accRect.top);
|
|
20448
|
-
accRect.right = min(rect.right, accRect.right);
|
|
20449
|
-
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
20450
|
-
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);
|
|
20451
20529
|
return accRect;
|
|
20452
20530
|
}, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
|
|
20453
20531
|
return {
|
|
@@ -20624,7 +20702,7 @@ function observeMove(element, onMove) {
|
|
|
20624
20702
|
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
20625
20703
|
const options = {
|
|
20626
20704
|
rootMargin,
|
|
20627
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
20705
|
+
threshold: max$4(0, min$4(1, threshold)) || 1
|
|
20628
20706
|
};
|
|
20629
20707
|
let isFirstUpdate = true;
|
|
20630
20708
|
function handleObserve(entries) {
|
|
@@ -21449,7 +21527,8 @@ class MdsDropdown {
|
|
|
21449
21527
|
this.floatingController.updatePosition();
|
|
21450
21528
|
}
|
|
21451
21529
|
targetChanged() {
|
|
21452
|
-
|
|
21530
|
+
var _a;
|
|
21531
|
+
if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '' || this.floatingController == null)
|
|
21453
21532
|
return;
|
|
21454
21533
|
const caller = this.floatingController.updateCaller(this.target);
|
|
21455
21534
|
if (!caller)
|
|
@@ -21518,9 +21597,9 @@ class MdsDropdown {
|
|
|
21518
21597
|
this.km.detachEscapeBehavior();
|
|
21519
21598
|
}
|
|
21520
21599
|
render() {
|
|
21521
|
-
return (hAsync(Host, { key: '
|
|
21600
|
+
return (hAsync(Host, { key: '42bb1259088a7cc15869cd0cbf007ce9f34331cb', style: {
|
|
21522
21601
|
zIndex: `${this.zIndex}`,
|
|
21523
|
-
}, "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: '
|
|
21602
|
+
}, "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: '6a2caa47a6dca50fe6ae209229daddcd7791473d', class: "arrow", innerHTML: arrowSvg$1 }), hAsync("slot", { key: '656a32363daa94dc4433cd5fb86d689d80502221' })));
|
|
21524
21603
|
}
|
|
21525
21604
|
get host() { return getElement(this); }
|
|
21526
21605
|
static get watchers() { return {
|
|
@@ -28684,7 +28763,7 @@ class MdsEmoji {
|
|
|
28684
28763
|
}; }
|
|
28685
28764
|
}
|
|
28686
28765
|
|
|
28687
|
-
const mdsEntityCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,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-entity-background:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-detail-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-entity-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-entity-icon-radius:var(--radius-md,12px);--mds-entity-icon-color:rgb(var(--label-blue-04,63 94 248));align-items:stretch;background-color:var(--mds-entity-background,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--radius-lg,16px);-webkit-box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);color:var(--mds-entity-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:flex;gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.delete,.preview,.spinner{border-radius:var(--radius-md,12px);flex-shrink:0;width:calc(var(--spacing,.0025rem)*1100)}.preview{--mds-avatar-radius:var(--mds-entity-icon-radius,var(--radius-md,12px))}.preview:not([variant]){--mds-avatar-color:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)));--mds-avatar-background-color:var(--mds-entity-icon-background,rgb(var(--label-blue-09,216 222 254)))}.preview,.spinner{align-items:center;aspect-ratio:var(--aspect-square,1/1);display:inline-flex;justify-content:center}.spinner{background-color:#0000;display:none;fill:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)))}:host([await]:not([await=false])) .spinner{display:inline-flex}mds-spinner{height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.infos{display:flex;flex-direction:column;flex-grow:1;gap:
|
|
28766
|
+
const mdsEntityCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,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-entity-background:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-detail-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-entity-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-entity-icon-radius:var(--radius-md,12px);--mds-entity-icon-color:rgb(var(--label-blue-04,63 94 248));align-items:stretch;background-color:var(--mds-entity-background,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--radius-lg,16px);-webkit-box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);color:var(--mds-entity-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:flex;gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.delete,.preview,.spinner{border-radius:var(--radius-md,12px);flex-shrink:0;width:calc(var(--spacing,.0025rem)*1100)}.preview{--mds-avatar-radius:var(--mds-entity-icon-radius,var(--radius-md,12px))}.preview:not([variant]){--mds-avatar-color:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)));--mds-avatar-background-color:var(--mds-entity-icon-background,rgb(var(--label-blue-09,216 222 254)))}.preview,.spinner{align-items:center;aspect-ratio:var(--aspect-square,1/1);display:inline-flex;justify-content:center}.spinner{background-color:#0000;display:none;fill:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)))}:host([await]:not([await=false])) .spinner{display:inline-flex}mds-spinner{height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.infos{display:flex;flex-direction:column;flex-grow:1;gap:0;justify-content:center;min-width:0;white-space:nowrap}.details{align-items:baseline;color:var(--mds-entity-detail-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));display:flex;gap:calc(var(--spacing,.0025rem)*100)}.details--hidden{display:none}.actions{align-items:center;display:flex;gap:calc(var(--spacing,.0025rem)*200)}.actions--hidden{display:none}::slotted([slot=action]){aspect-ratio:var(--aspect-square,1/1);height:auto;width:calc(var(--spacing,.0025rem)*1100)}::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title{display:flex;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([pref-contrast=more]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}}`;
|
|
28688
28767
|
|
|
28689
28768
|
/**
|
|
28690
28769
|
* @slot - Add `text string`, `HTML elements` or `components` to this slot.
|
|
@@ -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
|
/**
|
|
@@ -36920,13 +36999,13 @@ class MdsFile {
|
|
|
36920
36999
|
}; }
|
|
36921
37000
|
}
|
|
36922
37001
|
|
|
36923
|
-
/**
|
|
36924
|
-
* filesize
|
|
36925
|
-
*
|
|
36926
|
-
* @copyright
|
|
36927
|
-
* @license BSD-3-Clause
|
|
36928
|
-
* @version 10.1.
|
|
36929
|
-
*/
|
|
37002
|
+
/**
|
|
37003
|
+
* filesize
|
|
37004
|
+
*
|
|
37005
|
+
* @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
|
|
37006
|
+
* @license BSD-3-Clause
|
|
37007
|
+
* @version 10.1.6
|
|
37008
|
+
*/
|
|
36930
37009
|
const ARRAY = "array";
|
|
36931
37010
|
const BIT = "bit";
|
|
36932
37011
|
const BITS = "bits";
|
|
@@ -37089,9 +37168,10 @@ const STRINGS = {
|
|
|
37089
37168
|
result[0] = result[0].toString().replace(PERIOD, separator);
|
|
37090
37169
|
}
|
|
37091
37170
|
|
|
37092
|
-
if (pad &&
|
|
37093
|
-
const
|
|
37094
|
-
|
|
37171
|
+
if (pad && round > 0) {
|
|
37172
|
+
const i = result[0].toString(),
|
|
37173
|
+
x = separator || ((i.match(/(\D)/g) || []).pop() || PERIOD),
|
|
37174
|
+
tmp = i.toString().split(x),
|
|
37095
37175
|
s = tmp[1] || EMPTY,
|
|
37096
37176
|
l = s.length,
|
|
37097
37177
|
n = round - l;
|
|
@@ -37113,22 +37193,22 @@ const STRINGS = {
|
|
|
37113
37193
|
}
|
|
37114
37194
|
|
|
37115
37195
|
const remove$a = "Αφαιρέστε το αρχείο από την ουρά μεταφόρτωσης";
|
|
37116
|
-
var localeEl$
|
|
37196
|
+
var localeEl$t = {
|
|
37117
37197
|
remove: remove$a
|
|
37118
37198
|
};
|
|
37119
37199
|
|
|
37120
37200
|
const remove$9 = "Remove file from upload queue";
|
|
37121
|
-
var localeEn$
|
|
37201
|
+
var localeEn$t = {
|
|
37122
37202
|
remove: remove$9
|
|
37123
37203
|
};
|
|
37124
37204
|
|
|
37125
37205
|
const remove$8 = "Eliminar archivo de la cola de carga";
|
|
37126
|
-
var localeEs$
|
|
37206
|
+
var localeEs$t = {
|
|
37127
37207
|
remove: remove$8
|
|
37128
37208
|
};
|
|
37129
37209
|
|
|
37130
37210
|
const remove$7 = "Rimuovi file dalla coda di upload";
|
|
37131
|
-
var localeIt$
|
|
37211
|
+
var localeIt$u = {
|
|
37132
37212
|
remove: remove$7
|
|
37133
37213
|
};
|
|
37134
37214
|
|
|
@@ -37140,10 +37220,10 @@ class MdsFilePreview {
|
|
|
37140
37220
|
this.downloadedEvent = createEvent(this, "mdsFileDownload", 7);
|
|
37141
37221
|
this.deletedEvent = createEvent(this, "mdsFileDelete", 7);
|
|
37142
37222
|
this.t = new Locale$1({
|
|
37143
|
-
el: Object.assign(Object.assign({}, localeEl$
|
|
37144
|
-
en: Object.assign(Object.assign({}, localeEn$
|
|
37145
|
-
es: Object.assign(Object.assign({}, localeEs$
|
|
37146
|
-
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),
|
|
37147
37227
|
});
|
|
37148
37228
|
/**
|
|
37149
37229
|
* Truncates the filename shown
|
|
@@ -37186,13 +37266,12 @@ class MdsFilePreview {
|
|
|
37186
37266
|
card === null || card === void 0 ? void 0 : card.removeEventListener('click', this.onClickDownloadEvent);
|
|
37187
37267
|
}
|
|
37188
37268
|
render() {
|
|
37189
|
-
var _a, _b, _c;
|
|
37190
|
-
|
|
37191
|
-
|
|
37192
|
-
|
|
37193
|
-
|
|
37194
|
-
|
|
37195
|
-
: 'preview--status') }, this.icon !== undefined && this.icon !== '' ? (hAsync("mds-icon", { class: "icon", name: this.icon })) : (hAsync("mds-icon", { class: "icon", name: getFormatsVariant(this.filename, this.suffix).icon })), this.message && (hAsync("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), hAsync("mds-text", { key: '32d3359b9c41a845001e17987ce703219ba29843', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), hAsync("div", { key: '79e555cedfc5d35b2d54ec6a3aee7591cc0edf2e', class: clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (hAsync("mds-text", { key: '84e7d78e1d0639e637173a1c781a61f21e459b6d', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, filesize(Number(this.filesize), { standard: 'jedec' }))), this.filesize && this.filesize !== Number(this.filesize).toString() && (hAsync("mds-text", { key: '8945ff2c6224b7a4803390eae2fc12474903a3dd', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), getSuffix(this.filename, this.suffix) && (hAsync("mds-badge", { key: '5581cb1f4d13f6f15f28c0957094dcd5982f0a0f', variant: getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_a = this.description) !== null && _a !== void 0 ? _a : this.t.get(this.getDefaultKeyDescription()) }, getSuffix(this.filename, this.suffix))), (this.filesize === undefined || this.filesize === '') && (hAsync("mds-text", { key: 'd743b838cc6fa9fed0f5cdf7914c7652bfc3e1ac', class: "description", truncate: "word", typography: "caption", variant: "info", title: (_b = this.description) !== null && _b !== void 0 ? _b : this.t.get(this.getDefaultKeyDescription()) }, (_c = this.description) !== null && _c !== void 0 ? _c : this.t.get(this.getDefaultKeyDescription())))))));
|
|
37269
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
37270
|
+
// a removed attribute or a null bound by a framework counts as not set, like an empty value
|
|
37271
|
+
const hasMessage = ((_a = this.message) !== null && _a !== void 0 ? _a : '') !== '';
|
|
37272
|
+
return (hAsync(Host, { key: '4450e7351e840c4b0f7d72c9b1bc441d9087ad7e', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, this.deletable && (hAsync("mds-button", { key: '8f1d4ced62f8c479a5e1c324b5ce940cf7aa2d84', title: this.t.get('remove'), class: "action-delete", icon: miBaselineCancel, variant: "light", onClick: this.onClickDeletedEvent })), hAsync("div", { key: '45d38745f7466b0da5b8f2724879ef46d6826bfd', class: "card", part: "card", onClick: this.onClickDownloadEvent }, ((_b = this.src) !== null && _b !== void 0 ? _b : '') !== '' &&
|
|
37273
|
+
!hasMessage &&
|
|
37274
|
+
getExtensionInfos(this.filename, this.suffix).preview ? (hAsync("mds-img", { src: this.src, class: "preview preview--image", "aspect-ratio": "1/1" })) : (hAsync("div", { class: clsx('preview', hasMessage ? 'preview--status' : 'preview--icon') }, ((_c = this.icon) !== null && _c !== void 0 ? _c : '') !== '' ? (hAsync("mds-icon", { class: "icon", name: this.icon })) : (hAsync("mds-icon", { class: "icon", name: getFormatsVariant(this.filename, this.suffix).icon })), this.message && (hAsync("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), hAsync("mds-text", { key: 'e87d673948267ccf70636d4c2940fb8885f2fb96', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), hAsync("div", { key: '25e05eb7f5bef19a392b87401f2e780bd8e605cd', class: clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (hAsync("mds-text", { key: 'cdd7ebbbc99f90caee0c49d74a4b8f4ce0769a2a', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, filesize(Number(this.filesize), { standard: 'jedec' }))), this.filesize && this.filesize !== Number(this.filesize).toString() && (hAsync("mds-text", { key: '381998bfae5b4d76fed78c70f38ef2aab5d13f9e', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), getSuffix(this.filename, this.suffix) && (hAsync("mds-badge", { key: '89f980cf0ec10d220c83f5a6e8ded4a4d9491a0c', variant: getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_d = this.description) !== null && _d !== void 0 ? _d : this.t.get(this.getDefaultKeyDescription()) }, getSuffix(this.filename, this.suffix))), ((_e = this.filesize) !== null && _e !== void 0 ? _e : '') === '' && (hAsync("mds-text", { key: 'f29356eb97dbb5bc137d3d278176633ce938111f', class: "description", truncate: "word", typography: "caption", variant: "info", title: (_f = this.description) !== null && _f !== void 0 ? _f : this.t.get(this.getDefaultKeyDescription()) }, (_g = this.description) !== null && _g !== void 0 ? _g : this.t.get(this.getDefaultKeyDescription())))))));
|
|
37196
37275
|
}
|
|
37197
37276
|
get host() { return getElement(this); }
|
|
37198
37277
|
static get watchers() { return {
|
|
@@ -37447,12 +37526,19 @@ class MdsHeader {
|
|
|
37447
37526
|
this.closedEvent.emit({ bar: this.headerBar });
|
|
37448
37527
|
this.headerBar.setOpened(false);
|
|
37449
37528
|
};
|
|
37529
|
+
// a removed attribute leaves null, which turns the auto hide off like 0
|
|
37530
|
+
this.getAutoHide = () => {
|
|
37531
|
+
var _a;
|
|
37532
|
+
const autoHide = (_a = this.autoHide) !== null && _a !== void 0 ? _a : 0;
|
|
37533
|
+
return Number.isNaN(autoHide) ? 0 : autoHide;
|
|
37534
|
+
};
|
|
37450
37535
|
this.handleVisibility = () => {
|
|
37451
|
-
|
|
37536
|
+
const autoHide = this.getAutoHide();
|
|
37537
|
+
if (autoHide === 0) {
|
|
37452
37538
|
return;
|
|
37453
37539
|
}
|
|
37454
37540
|
// reset var if the page is scrolled to top
|
|
37455
|
-
if (window.scrollY <
|
|
37541
|
+
if (window.scrollY < autoHide) {
|
|
37456
37542
|
this.visibility = 'visible';
|
|
37457
37543
|
this.relativeThresholdUp = 0;
|
|
37458
37544
|
this.relativeTresholdDown = 0;
|
|
@@ -37469,9 +37555,9 @@ class MdsHeader {
|
|
|
37469
37555
|
this.relativePosition = this.relativeThresholdUp;
|
|
37470
37556
|
}
|
|
37471
37557
|
// set hidden for the first scroll from top
|
|
37472
|
-
if (this.relativePosition <
|
|
37558
|
+
if (this.relativePosition < autoHide && autoHide - window.scrollY <= 0) {
|
|
37473
37559
|
this.visibility = 'hidden';
|
|
37474
|
-
this.relativePosition =
|
|
37560
|
+
this.relativePosition = autoHide;
|
|
37475
37561
|
}
|
|
37476
37562
|
// update respective threshold if page is scrolled up or down
|
|
37477
37563
|
if (window.scrollY > this.relativeThresholdUp) {
|
|
@@ -37482,11 +37568,13 @@ class MdsHeader {
|
|
|
37482
37568
|
}
|
|
37483
37569
|
};
|
|
37484
37570
|
this.sanitizeAppearance = () => {
|
|
37485
|
-
|
|
37571
|
+
var _a;
|
|
37572
|
+
const appearanceSet = (_a = this.appearanceSet) !== null && _a !== void 0 ? _a : '';
|
|
37573
|
+
if (appearanceSet === '') {
|
|
37486
37574
|
return [this.appearance];
|
|
37487
37575
|
}
|
|
37488
37576
|
const regex = /\b(\w+)\b/g;
|
|
37489
|
-
const matches =
|
|
37577
|
+
const matches = appearanceSet.match(regex);
|
|
37490
37578
|
if (matches) {
|
|
37491
37579
|
return matches;
|
|
37492
37580
|
}
|
|
@@ -37503,7 +37591,7 @@ class MdsHeader {
|
|
|
37503
37591
|
this.handleScroll = () => {
|
|
37504
37592
|
if (typeof window === 'undefined')
|
|
37505
37593
|
return;
|
|
37506
|
-
if (this.
|
|
37594
|
+
if (this.getAutoHide() !== 0) {
|
|
37507
37595
|
this.handleVisibility();
|
|
37508
37596
|
}
|
|
37509
37597
|
if (this.sanitizedAppearance.length > 1) {
|
|
@@ -37582,7 +37670,7 @@ class MdsHeader {
|
|
|
37582
37670
|
}
|
|
37583
37671
|
}
|
|
37584
37672
|
render() {
|
|
37585
|
-
return (hAsync(Host, { key: '
|
|
37673
|
+
return (hAsync(Host, { key: 'f672f81878e181d21c234188d2ad02ded1bdb039', "pref-consumption": preferenceStore.state.consumption, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, !this.hideBackdrop && (hAsync("div", { key: '6bf87ed021bcdb62c728fbee3818a8ad11895b06', class: "backdrop" }, hAsync("div", { key: '6a3ad84c2e41313c14531b514b2752f972986ec4', class: "backdrop-blur-item" }), hAsync("div", { key: 'b8031f912733bcc01f47ae28e756ae9f9f184bf1', class: "backdrop-blur-item" }), hAsync("div", { key: 'b9fddc9c2c459bc1b16ef7cc4fe0dd62c6ae0357', class: "backdrop-blur-item" }), hAsync("div", { key: 'fb97781789e0773d35b31744a3f28bd23816e9eb', class: "backdrop-blur-item" }), hAsync("div", { key: '1d464ccd4d846ac79d1b0ea303ab66f41af84116', class: "backdrop-blur-item" }), hAsync("div", { key: '7ab61f7f2f21da6ad94408442237b8e2a16d32c1', class: "backdrop-blur-item" }), hAsync("div", { key: '90fb7f3244c8047c6a576288dad756451de07cdf', class: "backdrop-blur-item" }), hAsync("div", { key: '955ff4ac62f6a5e50726fcf5d097202622e760d2', class: "backdrop-blur-item" }), hAsync("div", { key: '49e995993b74ce17e06c3a05004e7411442dd694', class: "backdrop-blur-item" }), hAsync("div", { key: 'd0c693752ed5b8eee3f0c6925e158168b4e06822', class: "backdrop-blur-item" }))), hAsync("slot", { key: '564de9025f4cdc11edb1dadf27c0c3e03be5d06d' }), this.hasMenu && (hAsync("div", { key: 'c6cd25b6e417675a67662bbe4e2a8f0c89e1fd74', class: "menu", part: "menu" }, hAsync("mds-modal", { key: 'cb330659a98adcf88e8af18097450edb71cb1423', class: "modal", opened: this.isOpened, onMdsModalClose: this.close, position: "right" }, hAsync("slot", { key: 'd4f1dbcaee3303ad4c2130d7f7d64be3486bdc19', name: "menu" }))))));
|
|
37586
37674
|
}
|
|
37587
37675
|
get host() { return getElement(this); }
|
|
37588
37676
|
static get watchers() { return {
|
|
@@ -37987,10 +38075,23 @@ function promisifyRequest(request) {
|
|
|
37987
38075
|
});
|
|
37988
38076
|
}
|
|
37989
38077
|
function createStore(dbName, storeName) {
|
|
37990
|
-
|
|
37991
|
-
|
|
37992
|
-
|
|
37993
|
-
|
|
38078
|
+
let dbp;
|
|
38079
|
+
const getDB = () => {
|
|
38080
|
+
if (dbp)
|
|
38081
|
+
return dbp;
|
|
38082
|
+
const request = indexedDB.open(dbName);
|
|
38083
|
+
request.onupgradeneeded = () => request.result.createObjectStore(storeName);
|
|
38084
|
+
dbp = promisifyRequest(request);
|
|
38085
|
+
dbp.then((db) => {
|
|
38086
|
+
// It seems like Safari sometimes likes to just close the connection.
|
|
38087
|
+
// It's supposed to fire this event when that happens. Let's hope it does!
|
|
38088
|
+
db.onclose = () => (dbp = undefined);
|
|
38089
|
+
}, () => {
|
|
38090
|
+
dbp = undefined;
|
|
38091
|
+
});
|
|
38092
|
+
return dbp;
|
|
38093
|
+
};
|
|
38094
|
+
return (txMode, callback) => getDB().then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
|
|
37994
38095
|
}
|
|
37995
38096
|
let defaultGetStoreFunc;
|
|
37996
38097
|
function defaultGetStore() {
|
|
@@ -38074,7 +38175,7 @@ class IconsSetController {
|
|
|
38074
38175
|
this._iconsSets = new Map();
|
|
38075
38176
|
this._svgPathUpdate = 'mdsIconSvgPathUpdate';
|
|
38076
38177
|
this.cacheExp = 60 * 60 * 1000 * 24;
|
|
38077
|
-
this.listeners =
|
|
38178
|
+
this.listeners = new Set();
|
|
38078
38179
|
this.memoryCache = {};
|
|
38079
38180
|
// Try to retrieve svg from cache
|
|
38080
38181
|
this.isCacheAvailable = async (url) => {
|
|
@@ -38153,29 +38254,46 @@ class IconsSetController {
|
|
|
38153
38254
|
return { set: this._iconsSets.get(iconName.split('/')[0]) };
|
|
38154
38255
|
}
|
|
38155
38256
|
/**
|
|
38156
|
-
*
|
|
38257
|
+
* Sets the directory of the svg files. Query and fragment are dropped: the icon name is
|
|
38258
|
+
* appended to the path.
|
|
38157
38259
|
*
|
|
38158
|
-
* input path: https://www.abc.com/svg/path
|
|
38159
|
-
* svgPath =
|
|
38260
|
+
* input path: https://www.abc.com/svg/path/
|
|
38261
|
+
* svgPath = https://www.abc.com/svg/path/
|
|
38160
38262
|
*
|
|
38161
|
-
* input path: localhost:9000/svg/path
|
|
38162
|
-
* svgPath = localhost:9000/svg/path
|
|
38263
|
+
* input path: localhost:9000/svg/path/
|
|
38264
|
+
* svgPath = //localhost:9000/svg/path/ (with the protocol of the page)
|
|
38163
38265
|
*
|
|
38164
|
-
* input path: /svg/path
|
|
38165
|
-
* svgPath =
|
|
38266
|
+
* input path: /svg/path/ or svg/path/
|
|
38267
|
+
* svgPath = unchanged, resolved by `fetch` against the document base URL on each request
|
|
38166
38268
|
*
|
|
38167
|
-
* input path:
|
|
38269
|
+
* input path: empty or not a URL
|
|
38168
38270
|
* throw error
|
|
38169
|
-
*
|
|
38170
38271
|
*/
|
|
38171
38272
|
setSvgPath(svgPath) {
|
|
38172
|
-
const
|
|
38173
|
-
|
|
38174
|
-
|
|
38175
|
-
|
|
38273
|
+
const error = Error(`Svg path not recognize ${svgPath}, ensure is a absolute path starting with '/' or a url`);
|
|
38274
|
+
if (typeof svgPath !== 'string' || svgPath.trim() === '') {
|
|
38275
|
+
throw error;
|
|
38276
|
+
}
|
|
38277
|
+
const value = svgPath.trim();
|
|
38278
|
+
// a host with a port and no scheme (`localhost:9000/svg/`) would be read as the scheme `localhost:`
|
|
38279
|
+
const path = /^[\w.-]+:\d+(\/|$)/.test(value) ? `//${value}` : value;
|
|
38280
|
+
let url;
|
|
38281
|
+
try {
|
|
38282
|
+
// the placeholder base only validates a path, which is kept as it is
|
|
38283
|
+
url = new URL(path, 'http://localhost/');
|
|
38284
|
+
}
|
|
38285
|
+
catch (_a) {
|
|
38286
|
+
throw error;
|
|
38176
38287
|
}
|
|
38177
38288
|
if (typeof window !== 'undefined') {
|
|
38178
|
-
|
|
38289
|
+
if (/^[a-z][a-z\d+.-]*:/i.test(path)) {
|
|
38290
|
+
url.search = '';
|
|
38291
|
+
url.hash = '';
|
|
38292
|
+
this._svgPath = url.href;
|
|
38293
|
+
}
|
|
38294
|
+
else {
|
|
38295
|
+
this._svgPath = path.replace(/[?#].*$/, '');
|
|
38296
|
+
}
|
|
38179
38297
|
window.dispatchEvent(new Event(this._svgPathUpdate));
|
|
38180
38298
|
}
|
|
38181
38299
|
}
|
|
@@ -38183,7 +38301,10 @@ class IconsSetController {
|
|
|
38183
38301
|
return this._svgPath;
|
|
38184
38302
|
}
|
|
38185
38303
|
registerListener(callback) {
|
|
38186
|
-
this.listeners.
|
|
38304
|
+
this.listeners.add(callback);
|
|
38305
|
+
}
|
|
38306
|
+
unregisterListener(callback) {
|
|
38307
|
+
this.listeners.delete(callback);
|
|
38187
38308
|
}
|
|
38188
38309
|
setUpListener() {
|
|
38189
38310
|
if (typeof window !== 'undefined') {
|
|
@@ -38203,6 +38324,10 @@ class IconsSetController {
|
|
|
38203
38324
|
if (Build.isServer && !Build.isTesting) {
|
|
38204
38325
|
return '';
|
|
38205
38326
|
}
|
|
38327
|
+
// an icon without the attribute passes an undefined (or null) name: there is nothing to load
|
|
38328
|
+
if (!name) {
|
|
38329
|
+
return '';
|
|
38330
|
+
}
|
|
38206
38331
|
try {
|
|
38207
38332
|
if (!this._svgPath && typeof window === 'undefined') {
|
|
38208
38333
|
throw Error('Cant find svgPath, ensure you set it');
|
|
@@ -38224,9 +38349,14 @@ class IconsSetController {
|
|
|
38224
38349
|
}
|
|
38225
38350
|
}
|
|
38226
38351
|
const src = this._svgPath && !name.startsWith('http') ? this._svgPath.concat(name, '.svg') : name;
|
|
38352
|
+
// Memory first: every instance of an icon already loaded skips the IndexedDB round-trip
|
|
38353
|
+
if (this.memoryCache[src]) {
|
|
38354
|
+
return this.memoryCache[src];
|
|
38355
|
+
}
|
|
38227
38356
|
const lsCache = await this.isCacheAvailable(src);
|
|
38228
|
-
if (
|
|
38229
|
-
|
|
38357
|
+
if (lsCache) {
|
|
38358
|
+
this.memoryCache[src] = lsCache;
|
|
38359
|
+
return lsCache;
|
|
38230
38360
|
}
|
|
38231
38361
|
const response = await fetch(src);
|
|
38232
38362
|
if (!response.ok) {
|
|
@@ -38257,14 +38387,31 @@ const mdsIconCss = () => `@layer reset,vendor,theme,base,components,utilities;:h
|
|
|
38257
38387
|
class MdsIcon {
|
|
38258
38388
|
constructor(hostRef) {
|
|
38259
38389
|
registerInstance(this, hostRef);
|
|
38390
|
+
// Each update supersedes the ones still loading: only the latest one sets the svg
|
|
38391
|
+
this.lastUpdate = 0;
|
|
38392
|
+
this.wasDisconnected = false;
|
|
38393
|
+
this.onSvgPathUpdate = () => {
|
|
38394
|
+
this.updateIcon();
|
|
38395
|
+
};
|
|
38260
38396
|
this.convertBase64ToSvg = () => {
|
|
38261
38397
|
const svgBase64 = this.name.replace(BASE64_SVG_ICON, '').replace(/=/i, '');
|
|
38262
38398
|
return atob(svgBase64);
|
|
38263
38399
|
};
|
|
38264
38400
|
}
|
|
38401
|
+
connectedCallback() {
|
|
38402
|
+
IconsSetService.registerListener(this.onSvgPathUpdate);
|
|
38403
|
+
// the svg path may have changed while the icon was out of the page
|
|
38404
|
+
if (this.wasDisconnected) {
|
|
38405
|
+
this.wasDisconnected = false;
|
|
38406
|
+
this.updateIcon();
|
|
38407
|
+
}
|
|
38408
|
+
}
|
|
38409
|
+
disconnectedCallback() {
|
|
38410
|
+
IconsSetService.unregisterListener(this.onSvgPathUpdate);
|
|
38411
|
+
this.wasDisconnected = true;
|
|
38412
|
+
}
|
|
38265
38413
|
componentWillLoad() {
|
|
38266
38414
|
this.updateIcon();
|
|
38267
|
-
IconsSetService.registerListener(() => this.updateIcon());
|
|
38268
38415
|
}
|
|
38269
38416
|
/**
|
|
38270
38417
|
* Set the path to the directory of svg files
|
|
@@ -38275,8 +38422,13 @@ class MdsIcon {
|
|
|
38275
38422
|
return Promise.resolve();
|
|
38276
38423
|
}
|
|
38277
38424
|
async updateIcon() {
|
|
38278
|
-
|
|
38425
|
+
var _a;
|
|
38426
|
+
const update = ++this.lastUpdate;
|
|
38427
|
+
// `name` is undefined (or null) at runtime when the attribute is missing or removed
|
|
38428
|
+
if (((_a = this.name) !== null && _a !== void 0 ? _a : '') === '') {
|
|
38429
|
+
this.svgHTML = '';
|
|
38279
38430
|
return Promise.resolve();
|
|
38431
|
+
}
|
|
38280
38432
|
if (isIconFormatIsBase64(this.name)) {
|
|
38281
38433
|
this.svgHTML = this.convertBase64ToSvg();
|
|
38282
38434
|
return Promise.resolve();
|
|
@@ -38285,10 +38437,13 @@ class MdsIcon {
|
|
|
38285
38437
|
this.svgHTML = this.name;
|
|
38286
38438
|
return Promise.resolve();
|
|
38287
38439
|
}
|
|
38288
|
-
|
|
38440
|
+
const svgHTML = await IconsSetService.fetchSvg(this.name);
|
|
38441
|
+
if (update === this.lastUpdate) {
|
|
38442
|
+
this.svgHTML = svgHTML;
|
|
38443
|
+
}
|
|
38289
38444
|
}
|
|
38290
38445
|
render() {
|
|
38291
|
-
return (hAsync(Host, { key: '
|
|
38446
|
+
return (hAsync(Host, { key: '9544b1ca2b153e95f6710e0bbed762048676fb48' }, this.svgHTML && hAsync("i", { key: '745b56492d69be55e449b94633b09391972e3d79', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
|
|
38292
38447
|
}
|
|
38293
38448
|
get hostElement() { return getElement(this); }
|
|
38294
38449
|
static get watchers() { return {
|
|
@@ -38315,22 +38470,22 @@ class MdsIcon {
|
|
|
38315
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>`;
|
|
38316
38471
|
|
|
38317
38472
|
const clickToLoad$3 = "Φόρτωση εικόνας";
|
|
38318
|
-
var localeEl$
|
|
38473
|
+
var localeEl$s = {
|
|
38319
38474
|
clickToLoad: clickToLoad$3
|
|
38320
38475
|
};
|
|
38321
38476
|
|
|
38322
38477
|
const clickToLoad$2 = "Load image";
|
|
38323
|
-
var localeEn$
|
|
38478
|
+
var localeEn$s = {
|
|
38324
38479
|
clickToLoad: clickToLoad$2
|
|
38325
38480
|
};
|
|
38326
38481
|
|
|
38327
38482
|
const clickToLoad$1 = "Cargar imagen";
|
|
38328
|
-
var localeEs$
|
|
38483
|
+
var localeEs$s = {
|
|
38329
38484
|
clickToLoad: clickToLoad$1
|
|
38330
38485
|
};
|
|
38331
38486
|
|
|
38332
38487
|
const clickToLoad = "Carica immagine";
|
|
38333
|
-
var localeIt$
|
|
38488
|
+
var localeIt$t = {
|
|
38334
38489
|
clickToLoad: clickToLoad
|
|
38335
38490
|
};
|
|
38336
38491
|
|
|
@@ -38345,10 +38500,10 @@ class MdsImg {
|
|
|
38345
38500
|
this.imageError = false;
|
|
38346
38501
|
this.consumptionMode = 'high';
|
|
38347
38502
|
this.t = new Locale$1({
|
|
38348
|
-
el: localeEl$
|
|
38349
|
-
en: localeEn$
|
|
38350
|
-
es: localeEs$
|
|
38351
|
-
it: localeIt$
|
|
38503
|
+
el: localeEl$s,
|
|
38504
|
+
en: localeEn$s,
|
|
38505
|
+
es: localeEs$s,
|
|
38506
|
+
it: localeIt$t,
|
|
38352
38507
|
});
|
|
38353
38508
|
/**
|
|
38354
38509
|
* Specifies an alternate text for an image
|
|
@@ -38417,14 +38572,14 @@ class MdsImg {
|
|
|
38417
38572
|
this.imageError = false;
|
|
38418
38573
|
}
|
|
38419
38574
|
componentWillLoad() {
|
|
38420
|
-
var _a;
|
|
38575
|
+
var _a, _b;
|
|
38421
38576
|
this.consumptionMode =
|
|
38422
38577
|
(_a = localStorage.getItem('mdsPrefConsumption')) !== null && _a !== void 0 ? _a : 'high';
|
|
38423
|
-
if (this.srcsetConsumption
|
|
38578
|
+
if (this.srcsetConsumption != null && this.srcsetConsumption !== '') {
|
|
38424
38579
|
this.srcsetConsumptionData = this.formatConsumptionData(this.srcsetConsumption);
|
|
38425
38580
|
}
|
|
38426
38581
|
this.image = this.host.querySelector('img');
|
|
38427
|
-
if (this.alt === '') {
|
|
38582
|
+
if (((_b = this.alt) !== null && _b !== void 0 ? _b : '') === '') {
|
|
38428
38583
|
this.alt = this.autoAltName();
|
|
38429
38584
|
}
|
|
38430
38585
|
}
|
|
@@ -38500,22 +38655,196 @@ var miOutlineMicOff = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height
|
|
|
38500
38655
|
|
|
38501
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>`;
|
|
38502
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);
|
|
38503
38834
|
/**
|
|
38504
|
-
*
|
|
38505
|
-
*
|
|
38506
|
-
*
|
|
38507
|
-
*
|
|
38508
|
-
*
|
|
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
|
|
38509
38841
|
*/
|
|
38510
|
-
const
|
|
38511
|
-
if (
|
|
38512
|
-
internals
|
|
38513
|
-
|
|
38514
|
-
};
|
|
38515
|
-
const setValidity = (internals, flags, message, anchor) => {
|
|
38516
|
-
if (typeof (internals === null || internals === void 0 ? void 0 : internals.setValidity) === 'function') {
|
|
38517
|
-
internals.setValidity(flags, message, anchor);
|
|
38842
|
+
const updateValidity = (internals, problem, anchor) => {
|
|
38843
|
+
if (problem === undefined) {
|
|
38844
|
+
setValidity(internals, {});
|
|
38845
|
+
return;
|
|
38518
38846
|
}
|
|
38847
|
+
setValidity(internals, { [flags[problem.rule]]: true }, validityMessage(problem), anchor);
|
|
38519
38848
|
};
|
|
38520
38849
|
|
|
38521
38850
|
const decrease$3 = "Μείωση";
|
|
@@ -38632,6 +38961,97 @@ const minLenghtValidator = (length) => {
|
|
|
38632
38961
|
: null;
|
|
38633
38962
|
};
|
|
38634
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
|
+
};
|
|
38635
39055
|
const isbnValidatorFn = (input) => {
|
|
38636
39056
|
if (input === '')
|
|
38637
39057
|
return null; // don't validate empty values to allow optional controls
|
|
@@ -38681,11 +39101,18 @@ class Validator {
|
|
|
38681
39101
|
removeValidator(validator) {
|
|
38682
39102
|
this._validators = this._validators.filter((v) => !this._hasValidator(validator, v));
|
|
38683
39103
|
}
|
|
38684
|
-
|
|
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) {
|
|
38685
39109
|
const res = this._validators
|
|
38686
39110
|
.map((v) => v(value))
|
|
38687
39111
|
.reduce((prev, curr) => (Object.assign(Object.assign({}, prev), curr)), NullValidator);
|
|
38688
|
-
|
|
39112
|
+
return Object.keys(res).length === 0 ? null : res;
|
|
39113
|
+
}
|
|
39114
|
+
validate(value) {
|
|
39115
|
+
this._errors = this.check(value);
|
|
38689
39116
|
this.isValid = !this._errors;
|
|
38690
39117
|
}
|
|
38691
39118
|
get errors() {
|
|
@@ -38735,11 +39162,17 @@ function createInputValidationManager(type) {
|
|
|
38735
39162
|
case 'tel':
|
|
38736
39163
|
inputManager = new InputValidationManager('');
|
|
38737
39164
|
break;
|
|
39165
|
+
case 'email':
|
|
39166
|
+
inputManager = new InputValidationManager('');
|
|
39167
|
+
inputManager.validator.addValidator(emailValidatorFn);
|
|
39168
|
+
break;
|
|
38738
39169
|
case 'url':
|
|
38739
39170
|
inputManager = new InputValidationManager('');
|
|
39171
|
+
inputManager.validator.addValidator(urlValidatorFn);
|
|
38740
39172
|
break;
|
|
38741
39173
|
case 'cc':
|
|
38742
39174
|
inputManager = new InputValidationManager(InputMaskPattern.CC_MASK);
|
|
39175
|
+
inputManager.validator.addValidator(ccValidatorFn);
|
|
38743
39176
|
break;
|
|
38744
39177
|
case 'cf':
|
|
38745
39178
|
inputManager = new InputValidationManager(InputMaskPattern.CF_MASK);
|
|
@@ -38764,6 +39197,7 @@ function createInputValidationManager(type) {
|
|
|
38764
39197
|
break;
|
|
38765
39198
|
case 'piva':
|
|
38766
39199
|
inputManager = new InputValidationManager('');
|
|
39200
|
+
inputManager.validator.addValidator(pivaValidatorFn);
|
|
38767
39201
|
break;
|
|
38768
39202
|
default:
|
|
38769
39203
|
inputManager = new InputValidationManager('');
|
|
@@ -38771,6 +39205,42 @@ function createInputValidationManager(type) {
|
|
|
38771
39205
|
return inputManager;
|
|
38772
39206
|
}
|
|
38773
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
|
+
|
|
38774
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))))}}`;
|
|
38775
39245
|
|
|
38776
39246
|
class MdsInput {
|
|
@@ -38789,19 +39259,29 @@ class MdsInput {
|
|
|
38789
39259
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
38790
39260
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
38791
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;
|
|
38792
39270
|
this.speechToTextLabelKey = 'speechToTextOn';
|
|
38793
39271
|
this.speechToTextIcon = miOutlineMic;
|
|
38794
39272
|
this.hasFocus = false;
|
|
38795
39273
|
this.isRecording = false;
|
|
38796
39274
|
this.countVariant = 'count-empty';
|
|
38797
39275
|
this.isPasswordVisible = false;
|
|
38798
|
-
// private valuePristine?: string
|
|
38799
39276
|
this.t = new Locale$1({
|
|
38800
39277
|
el: localeEl$q,
|
|
38801
39278
|
en: localeEn$q,
|
|
38802
39279
|
es: localeEs$q,
|
|
38803
39280
|
it: localeIt$r,
|
|
38804
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;
|
|
38805
39285
|
/**
|
|
38806
39286
|
* Specifies whether the element should have autocomplete enabled
|
|
38807
39287
|
*/
|
|
@@ -38850,6 +39330,9 @@ class MdsInput {
|
|
|
38850
39330
|
* Specifies the value of the input element
|
|
38851
39331
|
*/
|
|
38852
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;
|
|
38853
39336
|
this.countMaxLength = () => {
|
|
38854
39337
|
var _a, _b, _c;
|
|
38855
39338
|
if (this.maxlength === undefined || this.maxlength === 0 || Number.isNaN(this.maxlength))
|
|
@@ -38886,6 +39369,8 @@ class MdsInput {
|
|
|
38886
39369
|
this.value = input.value;
|
|
38887
39370
|
setFormValue(this.internals, this.value);
|
|
38888
39371
|
}
|
|
39372
|
+
};
|
|
39373
|
+
this.onKeyDown = (ev) => {
|
|
38889
39374
|
this.keyDownEvent.emit(ev);
|
|
38890
39375
|
};
|
|
38891
39376
|
this.onBlur = () => {
|
|
@@ -38907,18 +39392,21 @@ class MdsInput {
|
|
|
38907
39392
|
}
|
|
38908
39393
|
};
|
|
38909
39394
|
this.stepUp = () => {
|
|
38910
|
-
if (this.nativeInput &&
|
|
39395
|
+
if (this.nativeInput && this.canEdit()) {
|
|
38911
39396
|
this.nativeInput.stepUp();
|
|
38912
39397
|
this.value = this.nativeInput.value;
|
|
38913
39398
|
}
|
|
38914
39399
|
};
|
|
38915
39400
|
this.stepDown = () => {
|
|
38916
|
-
if (this.nativeInput &&
|
|
39401
|
+
if (this.nativeInput && this.canEdit()) {
|
|
38917
39402
|
this.nativeInput.stepDown();
|
|
38918
39403
|
this.value = this.nativeInput.value;
|
|
38919
39404
|
}
|
|
38920
39405
|
};
|
|
38921
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;
|
|
38922
39410
|
this.isRecording = !this.isRecording;
|
|
38923
39411
|
if (!this.isRecording) {
|
|
38924
39412
|
this.speechToTextLabelKey = 'speechToTextOn';
|
|
@@ -38949,11 +39437,12 @@ class MdsInput {
|
|
|
38949
39437
|
const SpeechRecognition =
|
|
38950
39438
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38951
39439
|
(_c = window.SpeechRecognition) !== null && _c !== void 0 ? _c : window.webkitSpeechRecognition;
|
|
38952
|
-
this.value = '';
|
|
38953
39440
|
if (!SpeechRecognition) {
|
|
38954
39441
|
this.onSpeechRecognitionError();
|
|
38955
39442
|
return;
|
|
38956
39443
|
}
|
|
39444
|
+
// the dictation replaces the value, once it can start
|
|
39445
|
+
this.value = '';
|
|
38957
39446
|
this.recognition = new SpeechRecognition();
|
|
38958
39447
|
this.recognition.continuous = true;
|
|
38959
39448
|
this.recognition.lang = navigator.language || 'it-IT';
|
|
@@ -38963,6 +39452,12 @@ class MdsInput {
|
|
|
38963
39452
|
let progress = 0; // need to save position progress on speech results
|
|
38964
39453
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38965
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
|
+
}
|
|
38966
39461
|
const speechResult = event.results;
|
|
38967
39462
|
const interimResult = speechResult[progress];
|
|
38968
39463
|
if (interimResult.isFinal) {
|
|
@@ -38987,15 +39482,27 @@ class MdsInput {
|
|
|
38987
39482
|
}
|
|
38988
39483
|
};
|
|
38989
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
|
+
*/
|
|
38990
39492
|
formResetCallback() {
|
|
38991
|
-
|
|
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';
|
|
38992
39499
|
}
|
|
38993
39500
|
connectedCallback() {
|
|
38994
39501
|
this.datalistId = `datalist-${hashRandomValue()}`;
|
|
38995
39502
|
}
|
|
38996
39503
|
componentWillLoad() {
|
|
38997
|
-
|
|
38998
|
-
|
|
39504
|
+
var _a, _b, _c;
|
|
39505
|
+
this.defaultValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
|
|
38999
39506
|
// If the mds-input has a tabindex attribute we get the value
|
|
39000
39507
|
// and pass it down to the native input, then remove it from the
|
|
39001
39508
|
// mds-input to avoid causing tabbing twice on the same element
|
|
@@ -39004,31 +39511,109 @@ class MdsInput {
|
|
|
39004
39511
|
this.tabindex = tabindex !== null ? parseInt(tabindex) : undefined;
|
|
39005
39512
|
this.el.removeAttribute('tabindex');
|
|
39006
39513
|
}
|
|
39007
|
-
setFormValue(this.internals, (
|
|
39514
|
+
setFormValue(this.internals, (_b = this.value) !== null && _b !== void 0 ? _b : null);
|
|
39008
39515
|
this.maxLengthChanged(this.maxlength);
|
|
39009
|
-
this.
|
|
39516
|
+
this.buildValidation();
|
|
39517
|
+
this.isValid = !(this.required && ((_c = this.value) !== null && _c !== void 0 ? _c : '') === '');
|
|
39010
39518
|
}
|
|
39011
39519
|
componentDidLoad() {
|
|
39012
|
-
var _a, _b
|
|
39013
|
-
this.inputValidation = createInputValidationManager(this.type);
|
|
39014
|
-
this.setValidators();
|
|
39015
|
-
(_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.setAttribute('pattern', String(this.inputValidation.pattern));
|
|
39520
|
+
var _a, _b;
|
|
39016
39521
|
if (this.autofocus) {
|
|
39017
|
-
(
|
|
39522
|
+
(_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.focus();
|
|
39018
39523
|
}
|
|
39019
|
-
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();
|
|
39020
39529
|
}
|
|
39021
|
-
|
|
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);
|
|
39022
39541
|
if (this.required)
|
|
39023
|
-
|
|
39024
|
-
if (
|
|
39025
|
-
|
|
39026
|
-
if (
|
|
39027
|
-
|
|
39542
|
+
validator.addValidator(requiredValidor);
|
|
39543
|
+
if (max !== undefined)
|
|
39544
|
+
validator.addValidator(maxValidator(max));
|
|
39545
|
+
if (min !== undefined)
|
|
39546
|
+
validator.addValidator(minValidator(min));
|
|
39028
39547
|
if (this.maxlength !== undefined && this.maxlength !== 0 && !Number.isNaN(this.maxlength))
|
|
39029
|
-
|
|
39548
|
+
validator.addValidator(maxLenghtValidator(this.maxlength));
|
|
39030
39549
|
if (this.minlength !== undefined && this.minlength !== 0 && !Number.isNaN(this.minlength))
|
|
39031
|
-
|
|
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';
|
|
39032
39617
|
}
|
|
39033
39618
|
/**
|
|
39034
39619
|
* Emits the change event when the component value changes
|
|
@@ -39037,6 +39622,7 @@ class MdsInput {
|
|
|
39037
39622
|
var _a;
|
|
39038
39623
|
this.changeEvent.emit({ value: this.value });
|
|
39039
39624
|
setFormValue(this.internals, (_a = this.value) !== null && _a !== void 0 ? _a : null);
|
|
39625
|
+
this.updateFormValidity();
|
|
39040
39626
|
if (this.maxlength !== undefined) {
|
|
39041
39627
|
this.countMaxLength();
|
|
39042
39628
|
}
|
|
@@ -39065,7 +39651,9 @@ class MdsInput {
|
|
|
39065
39651
|
* @param validator the validator function to add
|
|
39066
39652
|
*/
|
|
39067
39653
|
async addValidator(validator) {
|
|
39654
|
+
this.customValidators.push(validator);
|
|
39068
39655
|
this.inputValidation.validator.addValidator(validator);
|
|
39656
|
+
this.updateFormValidity();
|
|
39069
39657
|
return Promise.resolve();
|
|
39070
39658
|
}
|
|
39071
39659
|
/**
|
|
@@ -39073,7 +39661,9 @@ class MdsInput {
|
|
|
39073
39661
|
* @param validator the validator function to remove
|
|
39074
39662
|
*/
|
|
39075
39663
|
async removeValidator(validator) {
|
|
39664
|
+
this.customValidators = this.customValidators.filter((custom) => custom !== validator);
|
|
39076
39665
|
this.inputValidation.validator.removeValidator(validator);
|
|
39666
|
+
this.updateFormValidity();
|
|
39077
39667
|
}
|
|
39078
39668
|
/**
|
|
39079
39669
|
* Returns if validator is presen
|
|
@@ -39091,11 +39681,13 @@ class MdsInput {
|
|
|
39091
39681
|
return Promise.resolve(this.inputValidation.validator.errors);
|
|
39092
39682
|
}
|
|
39093
39683
|
validateInput() {
|
|
39684
|
+
var _a, _b;
|
|
39094
39685
|
// validate input only when atleast one validator is present
|
|
39095
39686
|
if (this.inputValidation.validator.hasValidator()) {
|
|
39096
|
-
this.
|
|
39687
|
+
this.validated = true;
|
|
39688
|
+
this.isValid = this.inputValidation.isValid((_a = this.value) !== null && _a !== void 0 ? _a : '');
|
|
39097
39689
|
// set variant attribute
|
|
39098
|
-
if (this.value === '' && !this.required)
|
|
39690
|
+
if (((_b = this.value) !== null && _b !== void 0 ? _b : '') === '' && !this.required)
|
|
39099
39691
|
this.variant = 'primary';
|
|
39100
39692
|
else
|
|
39101
39693
|
this.variant = this.isValid ? 'success' : 'error';
|
|
@@ -39131,22 +39723,42 @@ class MdsInput {
|
|
|
39131
39723
|
}
|
|
39132
39724
|
render() {
|
|
39133
39725
|
var _a, _b, _c;
|
|
39134
|
-
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) => {
|
|
39135
39727
|
return hAsync("option", { key: i, value: element });
|
|
39136
|
-
}))), 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) })));
|
|
39137
39729
|
}
|
|
39138
39730
|
static get formAssociated() { return true; }
|
|
39139
39731
|
get el() { return getElement(this); }
|
|
39140
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
|
+
}],
|
|
39141
39756
|
"value": [{
|
|
39142
39757
|
"valueChanged": 0
|
|
39143
39758
|
}],
|
|
39144
39759
|
"variant": [{
|
|
39145
39760
|
"variantChanged": 0
|
|
39146
39761
|
}],
|
|
39147
|
-
"maxlength": [{
|
|
39148
|
-
"maxLengthChanged": 0
|
|
39149
|
-
}],
|
|
39150
39762
|
"disabled": [{
|
|
39151
39763
|
"disabledChanged": 0
|
|
39152
39764
|
}]
|
|
@@ -39186,6 +39798,7 @@ class MdsInput {
|
|
|
39186
39798
|
"currentLengthLabel": [32],
|
|
39187
39799
|
"countVariant": [32],
|
|
39188
39800
|
"isPasswordVisible": [32],
|
|
39801
|
+
"formDisabled": [32],
|
|
39189
39802
|
"addValidator": [64],
|
|
39190
39803
|
"removeValidator": [64],
|
|
39191
39804
|
"hasValidator": [64],
|
|
@@ -39193,7 +39806,7 @@ class MdsInput {
|
|
|
39193
39806
|
"setFocus": [64],
|
|
39194
39807
|
"getInputElement": [64]
|
|
39195
39808
|
},
|
|
39196
|
-
"$listeners$":
|
|
39809
|
+
"$listeners$": [[0, "invalid", "invalidHandler"]],
|
|
39197
39810
|
"$lazyBundleId$": "-",
|
|
39198
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"]]
|
|
39199
39812
|
}; }
|
|
@@ -39216,8 +39829,15 @@ class MdsInputDate {
|
|
|
39216
39829
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
39217
39830
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
39218
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;
|
|
39219
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 = '';
|
|
39220
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
|
|
39221
39841
|
this.touched = false;
|
|
39222
39842
|
/**
|
|
39223
39843
|
* Specifies the value of the input
|
|
@@ -39261,6 +39881,7 @@ class MdsInputDate {
|
|
|
39261
39881
|
this.required = false;
|
|
39262
39882
|
this.calendarKey = 0;
|
|
39263
39883
|
this.hasFocus = false;
|
|
39884
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
39264
39885
|
this.handleChange = (event) => {
|
|
39265
39886
|
const input = event.target;
|
|
39266
39887
|
this.touched = true;
|
|
@@ -39272,6 +39893,7 @@ class MdsInputDate {
|
|
|
39272
39893
|
this.onBlur = (ev) => {
|
|
39273
39894
|
const input = ev.target;
|
|
39274
39895
|
this.hasFocus = false;
|
|
39896
|
+
this.touched = true;
|
|
39275
39897
|
this.value = input.value;
|
|
39276
39898
|
this.validateValue(input.validity.badInput);
|
|
39277
39899
|
};
|
|
@@ -39290,6 +39912,7 @@ class MdsInputDate {
|
|
|
39290
39912
|
this.calendarKey += 1;
|
|
39291
39913
|
};
|
|
39292
39914
|
this.handleCalendarChange = (ev) => {
|
|
39915
|
+
this.touched = true;
|
|
39293
39916
|
this.value = ev.detail.startDate;
|
|
39294
39917
|
if (this.delay === 0)
|
|
39295
39918
|
return;
|
|
@@ -39305,27 +39928,67 @@ class MdsInputDate {
|
|
|
39305
39928
|
this.valueChange.emit(this.value);
|
|
39306
39929
|
this.validateValue();
|
|
39307
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
|
+
*/
|
|
39308
39935
|
validateValue(hasBadInput = false) {
|
|
39309
39936
|
const date = DateTime.fromISO(this.value);
|
|
39310
39937
|
const hasValue = Boolean(this.value);
|
|
39311
39938
|
const hasInvalidValue = hasValue && !date.isValid;
|
|
39312
|
-
|
|
39313
|
-
|
|
39314
|
-
|
|
39315
|
-
|
|
39316
|
-
|
|
39317
|
-
|
|
39318
|
-
|
|
39319
|
-
|
|
39320
|
-
|
|
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) } };
|
|
39321
39968
|
}
|
|
39322
|
-
|
|
39323
|
-
this.
|
|
39324
|
-
this.variant = 'primary';
|
|
39325
|
-
setFormValue(this.internals, this.value);
|
|
39326
|
-
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) } };
|
|
39327
39971
|
}
|
|
39328
|
-
|
|
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();
|
|
39329
39992
|
}
|
|
39330
39993
|
/**
|
|
39331
39994
|
* Sets focus on the underlying input element.
|
|
@@ -39351,30 +40014,75 @@ class MdsInputDate {
|
|
|
39351
40014
|
async getErrors() {
|
|
39352
40015
|
return Promise.resolve(this.isValid ? null : { error: '' });
|
|
39353
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
|
+
*/
|
|
39354
40024
|
formResetCallback() {
|
|
39355
|
-
|
|
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';
|
|
39356
40036
|
}
|
|
39357
40037
|
componentWillLoad() {
|
|
39358
40038
|
this.isSlotted = !(this.host.getAttribute('slot') === null || this.host.getAttribute('slot') === '');
|
|
39359
40039
|
this.value = this.value || '';
|
|
39360
|
-
|
|
39361
|
-
|
|
39362
|
-
|
|
39363
|
-
|
|
39364
|
-
|
|
39365
|
-
|
|
39366
|
-
|
|
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;
|
|
39367
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;
|
|
39368
40065
|
this.validateValue();
|
|
39369
40066
|
}
|
|
39370
40067
|
render() {
|
|
39371
|
-
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 } : {})))))));
|
|
39372
40071
|
}
|
|
39373
40072
|
static get formAssociated() { return true; }
|
|
39374
40073
|
get host() { return getElement(this); }
|
|
39375
40074
|
static get watchers() { return {
|
|
39376
40075
|
"value": [{
|
|
39377
40076
|
"handleValue": 0
|
|
40077
|
+
}],
|
|
40078
|
+
"max": [{
|
|
40079
|
+
"validationRulesChanged": 0
|
|
40080
|
+
}],
|
|
40081
|
+
"min": [{
|
|
40082
|
+
"validationRulesChanged": 0
|
|
40083
|
+
}],
|
|
40084
|
+
"required": [{
|
|
40085
|
+
"validationRulesChanged": 0
|
|
39378
40086
|
}]
|
|
39379
40087
|
}; }
|
|
39380
40088
|
static get style() { return mdsInputDateCss(); }
|
|
@@ -39393,6 +40101,7 @@ class MdsInputDate {
|
|
|
39393
40101
|
"disabled": [516],
|
|
39394
40102
|
"readonly": [516],
|
|
39395
40103
|
"required": [516],
|
|
40104
|
+
"formDisabled": [32],
|
|
39396
40105
|
"empty": [32],
|
|
39397
40106
|
"isValid": [32],
|
|
39398
40107
|
"touched": [32],
|
|
@@ -39403,7 +40112,7 @@ class MdsInputDate {
|
|
|
39403
40112
|
"setValue": [64],
|
|
39404
40113
|
"getErrors": [64]
|
|
39405
40114
|
},
|
|
39406
|
-
"$listeners$":
|
|
40115
|
+
"$listeners$": [[0, "invalid", "invalidHandler"]],
|
|
39407
40116
|
"$lazyBundleId$": "-",
|
|
39408
40117
|
"$attrsToReflect$": [["value", "value"], ["name", "name"], ["variant", "variant"], ["min", "min"], ["max", "max"], ["delay", "delay"], ["hideToday", "hide-today"], ["disabled", "disabled"], ["readonly", "readonly"], ["required", "required"]]
|
|
39409
40118
|
}; }
|
|
@@ -39453,7 +40162,7 @@ var localeIt$q = {
|
|
|
39453
40162
|
to: to
|
|
39454
40163
|
};
|
|
39455
40164
|
|
|
39456
|
-
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))))}}`;
|
|
39457
40166
|
|
|
39458
40167
|
/**
|
|
39459
40168
|
* @slot calendar-preselection - Add `HTML elements` or `components` to this slot.
|
|
@@ -39476,6 +40185,9 @@ class MdsInputDateRange {
|
|
|
39476
40185
|
this.internalEndDate = '';
|
|
39477
40186
|
this.visibleCalendarDate = '';
|
|
39478
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;
|
|
39479
40191
|
this.t = new Locale$1({
|
|
39480
40192
|
el: localeEl$p,
|
|
39481
40193
|
en: localeEn$p,
|
|
@@ -39515,6 +40227,12 @@ class MdsInputDateRange {
|
|
|
39515
40227
|
* Enables the linked dual-calendar range picker behavior.
|
|
39516
40228
|
*/
|
|
39517
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;
|
|
39518
40236
|
this.lastEmittedStartDate = null;
|
|
39519
40237
|
this.lastEmittedEndDate = null;
|
|
39520
40238
|
this.initialStartDate = '';
|
|
@@ -39566,6 +40284,7 @@ class MdsInputDateRange {
|
|
|
39566
40284
|
setAttributeIfEmpty(field, 'aria-label', ((_a = this.accessibleName) !== null && _a !== void 0 ? _a : '') !== '' ? `${this.accessibleName}, ${part}` : part);
|
|
39567
40285
|
});
|
|
39568
40286
|
};
|
|
40287
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
39569
40288
|
this.handleCalendarHover = (ev) => {
|
|
39570
40289
|
if (this.internalStartDate === '' || this.internalEndDate !== '') {
|
|
39571
40290
|
this.clearHoverPreview();
|
|
@@ -39691,12 +40410,23 @@ class MdsInputDateRange {
|
|
|
39691
40410
|
this.hoveredCalendarDate = null;
|
|
39692
40411
|
this.syncCalendarsHoverAttributes();
|
|
39693
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
|
+
}
|
|
39694
40420
|
getEmittableDateRangeDetail() {
|
|
39695
40421
|
const startDate = DateTime.fromISO(this.internalStartDate);
|
|
39696
40422
|
const endDate = DateTime.fromISO(this.internalEndDate);
|
|
39697
40423
|
if (!startDate.isValid || !endDate.isValid) {
|
|
39698
40424
|
return null;
|
|
39699
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
|
+
}
|
|
39700
40430
|
return {
|
|
39701
40431
|
startDate: this.internalStartDate,
|
|
39702
40432
|
endDate: this.internalEndDate,
|
|
@@ -39721,11 +40451,53 @@ class MdsInputDateRange {
|
|
|
39721
40451
|
handleEndDateChange(newValue) {
|
|
39722
40452
|
this.syncExternalDate('end', newValue);
|
|
39723
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
|
+
}
|
|
39724
40494
|
componentWillLoad() {
|
|
39725
|
-
|
|
39726
|
-
|
|
39727
|
-
this.
|
|
39728
|
-
this.
|
|
40495
|
+
var _a, _b;
|
|
40496
|
+
// a null bound by a framework counts as no date, as the watchers already do
|
|
40497
|
+
this.internalStartDate = (_a = this.startDate) !== null && _a !== void 0 ? _a : '';
|
|
40498
|
+
this.internalEndDate = (_b = this.endDate) !== null && _b !== void 0 ? _b : '';
|
|
40499
|
+
this.initialStartDate = this.internalStartDate;
|
|
40500
|
+
this.initialEndDate = this.internalEndDate;
|
|
39729
40501
|
this.visibleCalendarDate = this.resolveVisibleCalendarDate(this.internalStartDate, this.internalEndDate);
|
|
39730
40502
|
// Se max è precedente a min, imposto max uguale a min
|
|
39731
40503
|
if (this.min !== null && this.min !== '' && this.max !== null && this.max !== '') {
|
|
@@ -39770,6 +40542,8 @@ class MdsInputDateRange {
|
|
|
39770
40542
|
else {
|
|
39771
40543
|
this.internalEndDate = event.start;
|
|
39772
40544
|
}
|
|
40545
|
+
// a preset ending before it starts snaps its end to the start, as a typed range does
|
|
40546
|
+
this.validateDateRange();
|
|
39773
40547
|
this.updateInputValue('end', this.internalEndDate);
|
|
39774
40548
|
this.syncFormValue();
|
|
39775
40549
|
const calendars = this.getCalendars();
|
|
@@ -39783,13 +40557,23 @@ class MdsInputDateRange {
|
|
|
39783
40557
|
componentDidLoad() {
|
|
39784
40558
|
var _a;
|
|
39785
40559
|
this.nameSlottedFields();
|
|
40560
|
+
this.forwardRange(false);
|
|
40561
|
+
this.forwardDisabled(false);
|
|
39786
40562
|
this.updateInputListeners();
|
|
39787
40563
|
this.updateInputValue('start', this.internalStartDate);
|
|
39788
40564
|
this.updateInputValue('end', this.internalEndDate);
|
|
40565
|
+
// a preset matching the dates of load shows selected from the start
|
|
40566
|
+
this.checkPreselections();
|
|
39789
40567
|
this.syncFormValue();
|
|
39790
40568
|
this.host.addEventListener('focusout', this.handleFocusOut);
|
|
39791
40569
|
(_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('mdsCalendarHover', this.handleCalendarHover);
|
|
39792
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
|
+
}
|
|
39793
40577
|
formResetCallback() {
|
|
39794
40578
|
this.clearHoverPreview();
|
|
39795
40579
|
this.internalStartDate = this.initialStartDate;
|
|
@@ -39821,9 +40605,7 @@ class MdsInputDateRange {
|
|
|
39821
40605
|
this.syncFormValue();
|
|
39822
40606
|
}
|
|
39823
40607
|
updateInputValue(slotName, newValue) {
|
|
39824
|
-
|
|
39825
|
-
const slot = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
|
|
39826
|
-
const input = slot === null || slot === void 0 ? void 0 : slot.assignedElements()[0];
|
|
40608
|
+
const input = this.slottedField(slotName);
|
|
39827
40609
|
if (input != null) {
|
|
39828
40610
|
this.syncingInputSlots.add(slotName);
|
|
39829
40611
|
input.setValue(newValue).finally(() => {
|
|
@@ -39907,7 +40689,7 @@ class MdsInputDateRange {
|
|
|
39907
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 } : {})))));
|
|
39908
40690
|
}
|
|
39909
40691
|
render() {
|
|
39910
|
-
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())));
|
|
39911
40693
|
}
|
|
39912
40694
|
syncFormValue() {
|
|
39913
40695
|
var _a, _b, _c, _d;
|
|
@@ -39927,6 +40709,15 @@ class MdsInputDateRange {
|
|
|
39927
40709
|
}],
|
|
39928
40710
|
"endDate": [{
|
|
39929
40711
|
"handleEndDateChange": 0
|
|
40712
|
+
}],
|
|
40713
|
+
"min": [{
|
|
40714
|
+
"handleRangeChange": 0
|
|
40715
|
+
}],
|
|
40716
|
+
"max": [{
|
|
40717
|
+
"handleRangeChange": 0
|
|
40718
|
+
}],
|
|
40719
|
+
"disabled": [{
|
|
40720
|
+
"handleDisabledChange": 0
|
|
39930
40721
|
}]
|
|
39931
40722
|
}; }
|
|
39932
40723
|
static get style() { return mdsInputDateRangeCss(); }
|
|
@@ -39943,17 +40734,19 @@ class MdsInputDateRange {
|
|
|
39943
40734
|
"hideToday": [516, "hide-today"],
|
|
39944
40735
|
"dualCalendar": [516, "dual-calendar"],
|
|
39945
40736
|
"name": [513],
|
|
40737
|
+
"disabled": [516],
|
|
39946
40738
|
"calendarKey": [32],
|
|
39947
40739
|
"internalStartDate": [32],
|
|
39948
40740
|
"internalEndDate": [32],
|
|
39949
40741
|
"visibleCalendarDate": [32],
|
|
39950
40742
|
"dropdownRef": [32],
|
|
39951
40743
|
"hasPreselection": [32],
|
|
40744
|
+
"formDisabled": [32],
|
|
39952
40745
|
"preselect": [64]
|
|
39953
40746
|
},
|
|
39954
40747
|
"$listeners$": undefined,
|
|
39955
40748
|
"$lazyBundleId$": "-",
|
|
39956
|
-
"$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"]]
|
|
39957
40750
|
}; }
|
|
39958
40751
|
}
|
|
39959
40752
|
|
|
@@ -40107,7 +40900,7 @@ var localeIt$p = {
|
|
|
40107
40900
|
digit: digit
|
|
40108
40901
|
};
|
|
40109
40902
|
|
|
40110
|
-
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}`;
|
|
40111
40904
|
|
|
40112
40905
|
class MdsInputOtp {
|
|
40113
40906
|
constructor(hostRef) {
|
|
@@ -40119,6 +40912,13 @@ class MdsInputOtp {
|
|
|
40119
40912
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
40120
40913
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
40121
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;
|
|
40122
40922
|
this.t = new Locale$1({
|
|
40123
40923
|
el: localeEl$o,
|
|
40124
40924
|
en: localeEn$o,
|
|
@@ -40134,26 +40934,29 @@ class MdsInputOtp {
|
|
|
40134
40934
|
*/
|
|
40135
40935
|
this.autosubmit = false;
|
|
40136
40936
|
/**
|
|
40137
|
-
*
|
|
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
|
|
40138
40944
|
*/
|
|
40139
40945
|
this.value = '';
|
|
40140
|
-
this.
|
|
40141
|
-
const inputs = Array.from(this.element.shadowRoot.querySelectorAll('mds-input'));
|
|
40142
|
-
const otpCode = inputs.map((input) => input.value).join('');
|
|
40143
|
-
return otpCode;
|
|
40144
|
-
};
|
|
40946
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
40145
40947
|
this.setOtpDigit = (currentInput, digit) => {
|
|
40146
|
-
|
|
40147
|
-
const
|
|
40148
|
-
|
|
40149
|
-
|
|
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();
|
|
40150
40953
|
};
|
|
40151
40954
|
this.submit = (currentInput) => {
|
|
40152
|
-
var _a;
|
|
40153
|
-
const isOtpCompleted = this.
|
|
40955
|
+
var _a, _b;
|
|
40956
|
+
const isOtpCompleted = ((_a = this.value) !== null && _a !== void 0 ? _a : '').length === this.length;
|
|
40154
40957
|
currentInput.blur();
|
|
40155
40958
|
if (this.autosubmit && isOtpCompleted) {
|
|
40156
|
-
(
|
|
40959
|
+
(_b = this.internals.form) === null || _b === void 0 ? void 0 : _b.requestSubmit();
|
|
40157
40960
|
}
|
|
40158
40961
|
};
|
|
40159
40962
|
this.handleKeyDown = (e) => {
|
|
@@ -40203,11 +41006,47 @@ class MdsInputOtp {
|
|
|
40203
41006
|
return ((_a = this.accessibleName) !== null && _a !== void 0 ? _a : '') !== '' ? `${this.accessibleName}, ${digit}` : digit;
|
|
40204
41007
|
};
|
|
40205
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
|
+
}
|
|
40206
41037
|
render() {
|
|
40207
|
-
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
|
+
})));
|
|
40208
41042
|
}
|
|
40209
41043
|
static get formAssociated() { return true; }
|
|
40210
41044
|
get element() { return getElement(this); }
|
|
41045
|
+
static get watchers() { return {
|
|
41046
|
+
"value": [{
|
|
41047
|
+
"valueChanged": 0
|
|
41048
|
+
}]
|
|
41049
|
+
}; }
|
|
40211
41050
|
static get style() { return mdsInputOtpCss(); }
|
|
40212
41051
|
static get cmpMeta() { return {
|
|
40213
41052
|
"$flags$": 73,
|
|
@@ -40216,15 +41055,18 @@ class MdsInputOtp {
|
|
|
40216
41055
|
"accessibleName": [1, "aria-label"],
|
|
40217
41056
|
"length": [2],
|
|
40218
41057
|
"autosubmit": [516],
|
|
40219
|
-
"
|
|
41058
|
+
"disabled": [516],
|
|
41059
|
+
"value": [1537],
|
|
41060
|
+
"digits": [32],
|
|
41061
|
+
"formDisabled": [32]
|
|
40220
41062
|
},
|
|
40221
41063
|
"$listeners$": undefined,
|
|
40222
41064
|
"$lazyBundleId$": "-",
|
|
40223
|
-
"$attrsToReflect$": [["autosubmit", "autosubmit"], ["value", "value"]]
|
|
41065
|
+
"$attrsToReflect$": [["autosubmit", "autosubmit"], ["disabled", "disabled"], ["value", "value"]]
|
|
40224
41066
|
}; }
|
|
40225
41067
|
}
|
|
40226
41068
|
|
|
40227
|
-
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))))}}`;
|
|
40228
41070
|
|
|
40229
41071
|
/**
|
|
40230
41072
|
* @part header - The element containing the labels displayed over the input element
|
|
@@ -40242,6 +41084,9 @@ class MdsInputRange {
|
|
|
40242
41084
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
40243
41085
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
40244
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;
|
|
40245
41090
|
/**
|
|
40246
41091
|
* The greatest value in the range of permitted values
|
|
40247
41092
|
*/
|
|
@@ -40256,25 +41101,31 @@ class MdsInputRange {
|
|
|
40256
41101
|
*/
|
|
40257
41102
|
this.step = 1;
|
|
40258
41103
|
this.onInput = () => {
|
|
40259
|
-
|
|
40260
|
-
throw Error(`Entered value ${this.inputElement.value} is not a Number`);
|
|
41104
|
+
// a range input always holds a number: the browser sanitizes anything else
|
|
40261
41105
|
// trigger valueChanged that update progress and emit event
|
|
40262
41106
|
this.value = Number(this.inputElement.value);
|
|
40263
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;
|
|
40264
41114
|
}
|
|
40265
41115
|
calculateProgress() {
|
|
40266
41116
|
// validate value
|
|
40267
41117
|
let v = Number(this.inputElement.value);
|
|
41118
|
+
const step = this.allowedStep();
|
|
40268
41119
|
// multiplier is needed to manage decimal value and step, so we can work with integer value and avoid decimal division
|
|
40269
|
-
const multiplier = Math.pow(10, this.
|
|
41120
|
+
const multiplier = Math.pow(10, this.countDecimals(step));
|
|
40270
41121
|
if (v > this.max)
|
|
40271
41122
|
v = this.max;
|
|
40272
41123
|
else if (v < this.min)
|
|
40273
41124
|
v = this.min;
|
|
40274
|
-
if (((v - this.min) * multiplier) % (
|
|
41125
|
+
if (((v - this.min) * multiplier) % (step * multiplier) !== 0) {
|
|
40275
41126
|
v =
|
|
40276
|
-
(Math.round((v * multiplier - this.min * multiplier) / (
|
|
40277
|
-
(
|
|
41127
|
+
(Math.round((v * multiplier - this.min * multiplier) / (step * multiplier)) *
|
|
41128
|
+
(step * multiplier) +
|
|
40278
41129
|
this.min * multiplier) /
|
|
40279
41130
|
multiplier;
|
|
40280
41131
|
}
|
|
@@ -40313,24 +41164,31 @@ class MdsInputRange {
|
|
|
40313
41164
|
this.calculateProgress();
|
|
40314
41165
|
}
|
|
40315
41166
|
stepChanged() {
|
|
40316
|
-
if (this.step <= 0)
|
|
40317
|
-
throw Error('step cant be negative or zero');
|
|
40318
|
-
this.decimalPlaces = this.countDecimals(this.step);
|
|
40319
41167
|
this.calculateProgress();
|
|
40320
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. */
|
|
40321
41173
|
formResetCallback() {
|
|
40322
|
-
|
|
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;
|
|
40323
41182
|
}
|
|
40324
41183
|
componentDidLoad() {
|
|
40325
41184
|
var _a;
|
|
40326
|
-
this.decimalPlaces = this.countDecimals(this.step);
|
|
40327
41185
|
this.onInput(); // define value
|
|
40328
41186
|
this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
|
|
40329
41187
|
this.calculateProgress();
|
|
40330
41188
|
}
|
|
40331
41189
|
render() {
|
|
40332
41190
|
var _a;
|
|
40333
|
-
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 }))));
|
|
40334
41192
|
}
|
|
40335
41193
|
static get formAssociated() { return true; }
|
|
40336
41194
|
get element() { return getElement(this); }
|
|
@@ -40363,7 +41221,8 @@ class MdsInputRange {
|
|
|
40363
41221
|
"step": [2],
|
|
40364
41222
|
"disabled": [1540],
|
|
40365
41223
|
"value": [1538],
|
|
40366
|
-
"progress": [32]
|
|
41224
|
+
"progress": [32],
|
|
41225
|
+
"formDisabled": [32]
|
|
40367
41226
|
},
|
|
40368
41227
|
"$listeners$": undefined,
|
|
40369
41228
|
"$lazyBundleId$": "-",
|
|
@@ -40389,8 +41248,14 @@ class MdsInputSelect {
|
|
|
40389
41248
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
40390
41249
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
40391
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;
|
|
40392
41254
|
// @State() selected: boolean
|
|
40393
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;
|
|
40394
41259
|
/**
|
|
40395
41260
|
* If true, the element is displayed as disabled
|
|
40396
41261
|
*/
|
|
@@ -40411,11 +41276,10 @@ class MdsInputSelect {
|
|
|
40411
41276
|
* Specifies the value of the component
|
|
40412
41277
|
*/
|
|
40413
41278
|
this.value = '';
|
|
40414
|
-
this.
|
|
40415
|
-
|
|
40416
|
-
|
|
40417
|
-
|
|
40418
|
-
}
|
|
41279
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
41280
|
+
this.onInput = () => {
|
|
41281
|
+
this.adoptSelection();
|
|
41282
|
+
this.syncSelection();
|
|
40419
41283
|
};
|
|
40420
41284
|
this.onBlur = () => {
|
|
40421
41285
|
this.hasFocus = false;
|
|
@@ -40423,6 +41287,9 @@ class MdsInputSelect {
|
|
|
40423
41287
|
this.onFocus = () => {
|
|
40424
41288
|
this.hasFocus = true;
|
|
40425
41289
|
};
|
|
41290
|
+
// a removed attribute or a null bound by a framework counts as no placeholder, like ''
|
|
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; };
|
|
40426
41293
|
this.emptyOptions = () => {
|
|
40427
41294
|
var _a;
|
|
40428
41295
|
const select = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('select');
|
|
@@ -40431,10 +41298,10 @@ class MdsInputSelect {
|
|
|
40431
41298
|
return;
|
|
40432
41299
|
}
|
|
40433
41300
|
options.forEach((option, index) => {
|
|
40434
|
-
if (this.
|
|
41301
|
+
if (!this.hasPlaceholder()) {
|
|
40435
41302
|
option.remove();
|
|
40436
41303
|
}
|
|
40437
|
-
if (this.
|
|
41304
|
+
if (this.hasPlaceholder() && index > 0) {
|
|
40438
41305
|
option.remove();
|
|
40439
41306
|
}
|
|
40440
41307
|
});
|
|
@@ -40446,30 +41313,18 @@ class MdsInputSelect {
|
|
|
40446
41313
|
if (options == null) {
|
|
40447
41314
|
return;
|
|
40448
41315
|
}
|
|
40449
|
-
if (
|
|
41316
|
+
if (!this.hasPlaceholder() && options.length > 0) {
|
|
40450
41317
|
this.emptyOptions();
|
|
40451
41318
|
}
|
|
40452
|
-
if (this.
|
|
41319
|
+
if (this.hasPlaceholder() && options.length > 1) {
|
|
40453
41320
|
this.emptyOptions();
|
|
40454
41321
|
}
|
|
40455
41322
|
elements === null || elements === void 0 ? void 0 : elements.forEach((element) => {
|
|
40456
41323
|
var _a;
|
|
40457
41324
|
(_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.appendChild(element.cloneNode(true));
|
|
40458
41325
|
});
|
|
40459
|
-
this.
|
|
40460
|
-
|
|
40461
|
-
this.setCurrentValue = () => {
|
|
40462
|
-
var _a;
|
|
40463
|
-
if (this.selectEl == null)
|
|
40464
|
-
return;
|
|
40465
|
-
if (this.value != null && this.value !== '' && this.value !== 0 && !Number.isNaN(this.value)) {
|
|
40466
|
-
this.selectEl.querySelectorAll('option').forEach((element) => {
|
|
40467
|
-
element.selected = element.value === this.value;
|
|
40468
|
-
});
|
|
40469
|
-
}
|
|
40470
|
-
else if (this.placeholder === undefined || this.placeholder === '') {
|
|
40471
|
-
this.value = (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.querySelectorAll('option')[0].value;
|
|
40472
|
-
}
|
|
41326
|
+
this.applySelection(true);
|
|
41327
|
+
this.syncSelection();
|
|
40473
41328
|
};
|
|
40474
41329
|
}
|
|
40475
41330
|
/**
|
|
@@ -40483,10 +41338,67 @@ class MdsInputSelect {
|
|
|
40483
41338
|
* Emits the change event when the component value changes
|
|
40484
41339
|
*/
|
|
40485
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) {
|
|
40486
41380
|
var _a, _b, _c;
|
|
40487
|
-
|
|
40488
|
-
|
|
40489
|
-
|
|
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);
|
|
40490
41402
|
}
|
|
40491
41403
|
disabledChanged(newValue) {
|
|
40492
41404
|
/**
|
|
@@ -40506,11 +41418,15 @@ class MdsInputSelect {
|
|
|
40506
41418
|
* @param oldValue placeholder old value
|
|
40507
41419
|
*/
|
|
40508
41420
|
placeholderChanged(newValue, oldValue) {
|
|
40509
|
-
if (
|
|
40510
|
-
|
|
41421
|
+
if (this.selectEl == null)
|
|
41422
|
+
return;
|
|
41423
|
+
if (newValue != null && newValue !== '' && (oldValue !== null && oldValue !== void 0 ? oldValue : '') === '') {
|
|
41424
|
+
// the placeholder of this select, in its shadow root, not one of the page
|
|
41425
|
+
let defaultOption = this.placeholderOption();
|
|
40511
41426
|
if (defaultOption)
|
|
40512
41427
|
defaultOption.remove();
|
|
40513
41428
|
defaultOption = document.createElement('option');
|
|
41429
|
+
defaultOption.className = 'placeholder-option';
|
|
40514
41430
|
this.selectEl.insertBefore(defaultOption, this.selectEl.firstChild);
|
|
40515
41431
|
defaultOption.value = '';
|
|
40516
41432
|
defaultOption.text = newValue;
|
|
@@ -40525,8 +41441,29 @@ class MdsInputSelect {
|
|
|
40525
41441
|
defaultOption.disabled = true;
|
|
40526
41442
|
}
|
|
40527
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
|
+
*/
|
|
40528
41451
|
formResetCallback() {
|
|
40529
|
-
|
|
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();
|
|
40530
41467
|
}
|
|
40531
41468
|
componentWillLoad() {
|
|
40532
41469
|
// needed for react component, this prop should be used as default-value html attributo instead of defaultValue prop
|
|
@@ -40536,19 +41473,64 @@ class MdsInputSelect {
|
|
|
40536
41473
|
!Number.isNaN(this.defaultValue)) {
|
|
40537
41474
|
this.value = this.defaultValue;
|
|
40538
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();
|
|
40539
41481
|
}
|
|
40540
41482
|
componentDidLoad() {
|
|
40541
|
-
if (this.
|
|
41483
|
+
if (!this.multiple &&
|
|
41484
|
+
this.value != null &&
|
|
41485
|
+
this.value !== '' &&
|
|
41486
|
+
this.value !== 0 &&
|
|
41487
|
+
!Number.isNaN(this.value)) {
|
|
40542
41488
|
setFormValue(this.internals, this.value.toString());
|
|
40543
41489
|
}
|
|
40544
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
|
+
}
|
|
40545
41526
|
render() {
|
|
40546
|
-
|
|
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 &&
|
|
40547
41529
|
this.defaultValue !== '' &&
|
|
40548
41530
|
this.defaultValue !== 0 &&
|
|
40549
41531
|
!Number.isNaN(this.defaultValue)
|
|
40550
41532
|
? undefined
|
|
40551
|
-
: 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' })))));
|
|
40552
41534
|
}
|
|
40553
41535
|
static get formAssociated() { return true; }
|
|
40554
41536
|
get host() { return getElement(this); }
|
|
@@ -40556,6 +41538,12 @@ class MdsInputSelect {
|
|
|
40556
41538
|
"value": [{
|
|
40557
41539
|
"valueChanged": 0
|
|
40558
41540
|
}],
|
|
41541
|
+
"required": [{
|
|
41542
|
+
"requiredChanged": 0
|
|
41543
|
+
}],
|
|
41544
|
+
"name": [{
|
|
41545
|
+
"nameChanged": 0
|
|
41546
|
+
}],
|
|
40559
41547
|
"disabled": [{
|
|
40560
41548
|
"disabledChanged": 0
|
|
40561
41549
|
}],
|
|
@@ -40581,6 +41569,7 @@ class MdsInputSelect {
|
|
|
40581
41569
|
"defaultValue": [520, "default-value"],
|
|
40582
41570
|
"variant": [513],
|
|
40583
41571
|
"hasFocus": [32],
|
|
41572
|
+
"formDisabled": [32],
|
|
40584
41573
|
"setValue": [64]
|
|
40585
41574
|
},
|
|
40586
41575
|
"$listeners$": undefined,
|
|
@@ -40650,7 +41639,7 @@ var localeIt$o = {
|
|
|
40650
41639
|
unselect: unselect
|
|
40651
41640
|
};
|
|
40652
41641
|
|
|
40653
|
-
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))))}}`;
|
|
40654
41643
|
|
|
40655
41644
|
/**
|
|
40656
41645
|
* @slot - Put text string or elements here
|
|
@@ -40666,7 +41655,13 @@ class MdsInputSwitch {
|
|
|
40666
41655
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
40667
41656
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
40668
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;
|
|
40669
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;
|
|
40670
41665
|
this.dirty = false;
|
|
40671
41666
|
this.hasText = false;
|
|
40672
41667
|
this.t = new Locale$1({
|
|
@@ -40699,27 +41694,35 @@ class MdsInputSwitch {
|
|
|
40699
41694
|
* Specifies the value of the input element
|
|
40700
41695
|
*/
|
|
40701
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
|
+
*/
|
|
40702
41701
|
this.uncheckSiblings = () => {
|
|
40703
|
-
|
|
40704
|
-
|
|
40705
|
-
|
|
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) {
|
|
40706
41713
|
element.checked = false;
|
|
40707
41714
|
}
|
|
40708
41715
|
});
|
|
40709
41716
|
};
|
|
40710
41717
|
this.handleInputOnChange = (e) => {
|
|
40711
|
-
var _a
|
|
41718
|
+
var _a;
|
|
40712
41719
|
const { value } = e.target;
|
|
40713
41720
|
e.preventDefault();
|
|
40714
41721
|
e.stopPropagation();
|
|
40715
41722
|
const input = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('field');
|
|
40716
41723
|
this.checked = input.checked;
|
|
40717
41724
|
this.indeterminate = false;
|
|
40718
|
-
if (this.type === 'radio') {
|
|
40719
|
-
this.uncheckSiblings();
|
|
40720
|
-
}
|
|
40721
41725
|
this.changeEvent.emit({ name: this.name, checked: this.checked, value });
|
|
40722
|
-
setFormValue(this.internals, this.checked ? ((_b = this.value) !== null && _b !== void 0 ? _b : null) : null);
|
|
40723
41726
|
};
|
|
40724
41727
|
this.handleDirty = () => {
|
|
40725
41728
|
this.dirty = true;
|
|
@@ -40730,6 +41733,12 @@ class MdsInputSwitch {
|
|
|
40730
41733
|
this.km.addElement((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.field'));
|
|
40731
41734
|
this.km.attachClickBehavior();
|
|
40732
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);
|
|
40733
41742
|
}
|
|
40734
41743
|
disabledChanged(newValue) {
|
|
40735
41744
|
/**
|
|
@@ -40737,31 +41746,50 @@ class MdsInputSwitch {
|
|
|
40737
41746
|
* if solved, please check mds-button, mds-input, mds-input-*
|
|
40738
41747
|
* https://github.com/ionic-team/stencil/issues/5461
|
|
40739
41748
|
*/
|
|
40740
|
-
if (newValue) {
|
|
40741
|
-
setFormValue(this.internals, null);
|
|
40742
|
-
return;
|
|
40743
|
-
}
|
|
40744
41749
|
if (newValue === false) {
|
|
41750
|
+
// the watcher runs again with undefined
|
|
40745
41751
|
this.disabled = undefined;
|
|
41752
|
+
return;
|
|
40746
41753
|
}
|
|
41754
|
+
this.updateFormValue();
|
|
40747
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
|
+
*/
|
|
40748
41760
|
checkedChanged(newValue) {
|
|
40749
41761
|
if (newValue === false) {
|
|
41762
|
+
// the watcher runs again with undefined
|
|
40750
41763
|
this.checked = undefined;
|
|
41764
|
+
return;
|
|
40751
41765
|
}
|
|
41766
|
+
if (newValue && this.type === 'radio')
|
|
41767
|
+
this.uncheckSiblings();
|
|
41768
|
+
this.updateFormValue();
|
|
41769
|
+
}
|
|
41770
|
+
valueChanged() {
|
|
41771
|
+
this.updateFormValue();
|
|
40752
41772
|
}
|
|
40753
41773
|
explicitChanged(newValue) {
|
|
40754
41774
|
if (newValue === false) {
|
|
40755
41775
|
this.explicit = undefined;
|
|
40756
41776
|
}
|
|
40757
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. */
|
|
40758
41782
|
formResetCallback() {
|
|
40759
|
-
|
|
41783
|
+
this.checked = this.loadChecked ? true : undefined;
|
|
41784
|
+
this.updateFormValue();
|
|
41785
|
+
}
|
|
41786
|
+
componentWillLoad() {
|
|
41787
|
+
this.loadChecked = this.checked === true;
|
|
40760
41788
|
}
|
|
40761
41789
|
componentDidLoad() {
|
|
40762
|
-
var _a
|
|
41790
|
+
var _a;
|
|
40763
41791
|
this.label = (_a = this.host.textContent) !== null && _a !== void 0 ? _a : '';
|
|
40764
|
-
|
|
41792
|
+
this.updateFormValue();
|
|
40765
41793
|
this.checkFocusElement();
|
|
40766
41794
|
this.hasText = hasSlotted(this.host);
|
|
40767
41795
|
}
|
|
@@ -40769,7 +41797,7 @@ class MdsInputSwitch {
|
|
|
40769
41797
|
var _a;
|
|
40770
41798
|
const { iconChecked, iconUnchecked, iconIndeterminate } = inputSwitchIconVariant[this.type];
|
|
40771
41799
|
const iconCheckedUser = this.icon !== '' ? this.icon : iconChecked;
|
|
40772
|
-
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' })))));
|
|
40773
41801
|
}
|
|
40774
41802
|
static get formAssociated() { return true; }
|
|
40775
41803
|
get host() { return getElement(this); }
|
|
@@ -40780,6 +41808,9 @@ class MdsInputSwitch {
|
|
|
40780
41808
|
"checked": [{
|
|
40781
41809
|
"checkedChanged": 0
|
|
40782
41810
|
}],
|
|
41811
|
+
"value": [{
|
|
41812
|
+
"valueChanged": 0
|
|
41813
|
+
}],
|
|
40783
41814
|
"explicit": [{
|
|
40784
41815
|
"explicitChanged": 0
|
|
40785
41816
|
}]
|
|
@@ -40801,6 +41832,7 @@ class MdsInputSwitch {
|
|
|
40801
41832
|
"typography": [513],
|
|
40802
41833
|
"variant": [513],
|
|
40803
41834
|
"value": [1537],
|
|
41835
|
+
"formDisabled": [32],
|
|
40804
41836
|
"dirty": [32],
|
|
40805
41837
|
"hasText": [32]
|
|
40806
41838
|
},
|
|
@@ -41231,8 +42263,9 @@ var localeIt$m = {
|
|
|
41231
42263
|
sortByStatus: sortByStatus
|
|
41232
42264
|
};
|
|
41233
42265
|
|
|
41234
|
-
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))))}`;
|
|
41235
42267
|
|
|
42268
|
+
const isSort = (value) => value === 'date' || value === 'status';
|
|
41236
42269
|
class MdsInputUpload {
|
|
41237
42270
|
constructor(hostRef) {
|
|
41238
42271
|
registerInstance(this, hostRef);
|
|
@@ -41247,6 +42280,8 @@ class MdsInputUpload {
|
|
|
41247
42280
|
this.fileUploaded = 0;
|
|
41248
42281
|
this.cssMinCols = 1000;
|
|
41249
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();
|
|
41250
42285
|
this.t = new Locale$1({
|
|
41251
42286
|
el: localeEl$l,
|
|
41252
42287
|
en: localeEn$l,
|
|
@@ -41257,10 +42292,21 @@ class MdsInputUpload {
|
|
|
41257
42292
|
this.files = [];
|
|
41258
42293
|
this.progress = 0;
|
|
41259
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;
|
|
41260
42300
|
/**
|
|
41261
42301
|
* Defines the file types the file input should accept
|
|
41262
42302
|
*/
|
|
41263
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;
|
|
41264
42310
|
/**
|
|
41265
42311
|
* Specifies the max size of a single file that can be uploaded in MB
|
|
41266
42312
|
*/
|
|
@@ -41269,6 +42315,7 @@ class MdsInputUpload {
|
|
|
41269
42315
|
* Specifies the max number of files that can be uploaded
|
|
41270
42316
|
*/
|
|
41271
42317
|
this.maxFiles = 1;
|
|
42318
|
+
this.isDisabled = () => !!this.disabled || this.formDisabled;
|
|
41272
42319
|
this.updateCSSCustomProps = () => {
|
|
41273
42320
|
if (typeof window === 'undefined')
|
|
41274
42321
|
return;
|
|
@@ -41276,37 +42323,44 @@ class MdsInputUpload {
|
|
|
41276
42323
|
this.cssMinCols = Number(elementStyles.getPropertyValue('--mds-input-upload-min-cols'));
|
|
41277
42324
|
};
|
|
41278
42325
|
this.onDropHandler = (event) => {
|
|
41279
|
-
if (this.nativeInput && event.dataTransfer) {
|
|
41280
|
-
this.update(this.nativeInput, this.prepareFiles(event.dataTransfer.files));
|
|
41281
|
-
}
|
|
41282
42326
|
event.preventDefault();
|
|
42327
|
+
this.dragging = false;
|
|
42328
|
+
if (event.dataTransfer && !this.isDisabled()) {
|
|
42329
|
+
this.onAdd(event.dataTransfer.files);
|
|
42330
|
+
}
|
|
41283
42331
|
};
|
|
41284
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
|
|
41285
42335
|
event.preventDefault();
|
|
42336
|
+
if (this.isDisabled() && event.dataTransfer)
|
|
42337
|
+
event.dataTransfer.dropEffect = 'none';
|
|
41286
42338
|
};
|
|
41287
42339
|
this.onDragEnterHandler = (event) => {
|
|
41288
|
-
|
|
42340
|
+
if (this.isDisabled()) {
|
|
42341
|
+
event.preventDefault();
|
|
42342
|
+
return;
|
|
42343
|
+
}
|
|
41289
42344
|
this.dragging = true;
|
|
41290
42345
|
this.animateText = true;
|
|
41291
|
-
(_a = this.elDragArea) === null || _a === void 0 ? void 0 : _a.classList.add('drag-area--on-drag-enter');
|
|
41292
42346
|
event.preventDefault();
|
|
41293
42347
|
};
|
|
41294
42348
|
this.onDragLeaveHandler = (event) => {
|
|
41295
|
-
var _a;
|
|
41296
42349
|
this.dragging = false;
|
|
41297
|
-
(_a = this.elDragArea) === null || _a === void 0 ? void 0 : _a.classList.remove('drag-area--on-drag-enter');
|
|
41298
42350
|
event.preventDefault();
|
|
41299
42351
|
};
|
|
41300
|
-
this.onAdd = (
|
|
41301
|
-
if (!
|
|
42352
|
+
this.onAdd = (fileList) => {
|
|
42353
|
+
if (!fileList)
|
|
41302
42354
|
return;
|
|
41303
|
-
|
|
41304
|
-
|
|
41305
|
-
|
|
41306
|
-
|
|
41307
|
-
|
|
41308
|
-
|
|
41309
|
-
|
|
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 = '';
|
|
41310
42364
|
};
|
|
41311
42365
|
/**
|
|
41312
42366
|
* Delete single file from upload
|
|
@@ -41314,32 +42368,23 @@ class MdsInputUpload {
|
|
|
41314
42368
|
*/
|
|
41315
42369
|
this.onCancel = (filekey) => {
|
|
41316
42370
|
this.files = this.files.filter((f) => f.key !== filekey);
|
|
41317
|
-
|
|
41318
|
-
const data = new DataTransfer();
|
|
41319
|
-
this.files.forEach((f) => {
|
|
41320
|
-
if (f.status === Status.SUCCESS) {
|
|
41321
|
-
data.items.add(f.file);
|
|
41322
|
-
}
|
|
41323
|
-
});
|
|
41324
|
-
this.update(this.nativeInput, data.files);
|
|
41325
|
-
}
|
|
42371
|
+
this.update();
|
|
41326
42372
|
};
|
|
41327
42373
|
/**
|
|
41328
42374
|
* Delete all files from upload
|
|
41329
42375
|
*/
|
|
41330
42376
|
this.onReset = () => {
|
|
41331
|
-
|
|
41332
|
-
|
|
41333
|
-
this.nativeInput.value = '';
|
|
41334
|
-
this.update(this.nativeInput, null);
|
|
41335
|
-
}
|
|
42377
|
+
this.files = [];
|
|
42378
|
+
this.update(true);
|
|
41336
42379
|
};
|
|
41337
42380
|
this.onChangeTab = (event) => {
|
|
41338
|
-
|
|
41339
|
-
|
|
41340
|
-
|
|
41341
|
-
|
|
41342
|
-
|
|
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);
|
|
41343
42388
|
};
|
|
41344
42389
|
this.handleAddFileClick = () => {
|
|
41345
42390
|
var _a;
|
|
@@ -41352,29 +42397,51 @@ class MdsInputUpload {
|
|
|
41352
42397
|
this.onCancel(filekey);
|
|
41353
42398
|
};
|
|
41354
42399
|
}
|
|
42400
|
+
formDisabledCallback(disabled) {
|
|
42401
|
+
this.formDisabled = disabled;
|
|
42402
|
+
}
|
|
41355
42403
|
formResetCallback() {
|
|
41356
42404
|
this.onReset();
|
|
41357
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
|
+
}
|
|
41358
42411
|
componentWillLoad() {
|
|
41359
|
-
var _a;
|
|
41360
42412
|
this.extensions = this.getExtension();
|
|
41361
|
-
|
|
42413
|
+
const userSort = localStorage.getItem(LOCALSTORAGE_KEY_USER_SORT);
|
|
42414
|
+
this.activeSort = isSort(this.sort) ? this.sort : isSort(userSort) ? userSort : 'date';
|
|
41362
42415
|
this.updateInitialValue(this.initialValue);
|
|
41363
42416
|
}
|
|
41364
42417
|
componentDidLoad() {
|
|
41365
42418
|
this.updateCSSCustomProps();
|
|
41366
42419
|
}
|
|
42420
|
+
componentDidRender() {
|
|
42421
|
+
this.revokePreviewUrls(new Set(this.files.map((f) => f.file)));
|
|
42422
|
+
}
|
|
42423
|
+
disconnectedCallback() {
|
|
42424
|
+
this.revokePreviewUrls(new Set());
|
|
42425
|
+
}
|
|
41367
42426
|
updateInitialValue(newValue) {
|
|
41368
42427
|
if (newValue) {
|
|
41369
42428
|
this.onAdd(newValue);
|
|
41370
42429
|
}
|
|
41371
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
|
+
}
|
|
41372
42440
|
/**
|
|
41373
|
-
* Returns a promise of files
|
|
42441
|
+
* Returns a promise of the accepted files as a FileList, empty if there's none
|
|
41374
42442
|
*/
|
|
41375
42443
|
getFiles() {
|
|
41376
|
-
|
|
41377
|
-
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());
|
|
41378
42445
|
}
|
|
41379
42446
|
/**
|
|
41380
42447
|
* Returns a promise of files error or null if there's none
|
|
@@ -41402,14 +42469,9 @@ class MdsInputUpload {
|
|
|
41402
42469
|
* Limit number of file to maxFiles
|
|
41403
42470
|
* Check size and type for every single file.
|
|
41404
42471
|
* @param fileList list recieved from input selection or drag and drop
|
|
41405
|
-
* @returns list of files accepted
|
|
41406
42472
|
*/
|
|
41407
42473
|
prepareFiles(fileList) {
|
|
41408
|
-
var _a;
|
|
41409
|
-
if (!fileList)
|
|
41410
|
-
return null;
|
|
41411
42474
|
const files = fileList instanceof FileList ? Array.from(fileList) : fileList;
|
|
41412
|
-
const data = new DataTransfer();
|
|
41413
42475
|
// prepare new file added
|
|
41414
42476
|
for (const file of files) {
|
|
41415
42477
|
// update only file not added previously or files with errors
|
|
@@ -41437,11 +42499,7 @@ class MdsInputUpload {
|
|
|
41437
42499
|
}
|
|
41438
42500
|
}
|
|
41439
42501
|
}
|
|
41440
|
-
|
|
41441
|
-
this.files.filter((f) => f.status === Status.SUCCESS).forEach((f) => data.items.add(f.file));
|
|
41442
|
-
this.sortFiles(this.files, (_a = this.sort) !== null && _a !== void 0 ? _a : this.userSort);
|
|
41443
|
-
// this.updateProgress()
|
|
41444
|
-
return data.files;
|
|
42502
|
+
this.sortFiles(this.files, this.activeSort);
|
|
41445
42503
|
}
|
|
41446
42504
|
// Stores the locale key, not the translated message: consumers translate at
|
|
41447
42505
|
// read time so the texts follow the current language
|
|
@@ -41462,10 +42520,31 @@ class MdsInputUpload {
|
|
|
41462
42520
|
}
|
|
41463
42521
|
return { errorKey, type };
|
|
41464
42522
|
}
|
|
41465
|
-
|
|
41466
|
-
|
|
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);
|
|
41467
42541
|
return;
|
|
41468
|
-
|
|
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) {
|
|
41469
42548
|
const validity = {};
|
|
41470
42549
|
const errorMessage = new Set();
|
|
41471
42550
|
this.files
|
|
@@ -41484,10 +42563,10 @@ class MdsInputUpload {
|
|
|
41484
42563
|
}
|
|
41485
42564
|
errorMessage.add(this.t.get(error.errorKey));
|
|
41486
42565
|
});
|
|
41487
|
-
|
|
42566
|
+
this.updateFormValue();
|
|
41488
42567
|
setValidity(this.internals, validity, Array.from(errorMessage).join(', '));
|
|
41489
42568
|
this.updateProgress();
|
|
41490
|
-
this.changedEvent.emit(
|
|
42569
|
+
this.changedEvent.emit(reset ? null : this.acceptedFiles());
|
|
41491
42570
|
}
|
|
41492
42571
|
/**
|
|
41493
42572
|
* Update progress bar
|
|
@@ -41555,27 +42634,47 @@ class MdsInputUpload {
|
|
|
41555
42634
|
sortById(a, b) {
|
|
41556
42635
|
return b.id - a.id;
|
|
41557
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
|
+
}
|
|
41558
42653
|
isSortTabShown() {
|
|
41559
|
-
|
|
42654
|
+
var _a;
|
|
42655
|
+
// the type has no empty sort, but the attribute can be empty or removed
|
|
42656
|
+
const sort = (_a = this.sort) !== null && _a !== void 0 ? _a : '';
|
|
42657
|
+
return sort !== '' && this.files.length > 1;
|
|
41560
42658
|
}
|
|
41561
42659
|
render() {
|
|
41562
|
-
|
|
42660
|
+
var _a;
|
|
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
|
|
41563
42662
|
? this.t.get('dragEnter')
|
|
41564
|
-
: 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
|
|
41565
42664
|
? this.t.get('addFile', { maxFiles: this.maxFiles })
|
|
41566
|
-
: 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)
|
|
41567
42666
|
? this.t.get('currentFilesWithMax', {
|
|
41568
42667
|
currentFiles: this.files.length,
|
|
41569
42668
|
maxFiles: this.maxFiles,
|
|
41570
42669
|
})
|
|
41571
|
-
: 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 !== ''
|
|
41572
42671
|
? `${this.t.get('canUpload')} ${this.extensions}`
|
|
41573
|
-
: 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) => {
|
|
41574
42673
|
switch (file.status) {
|
|
41575
42674
|
case Status.ERROR:
|
|
41576
|
-
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) }));
|
|
41577
42676
|
case Status.SUCCESS:
|
|
41578
|
-
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) }));
|
|
41579
42678
|
}
|
|
41580
42679
|
}))));
|
|
41581
42680
|
}
|
|
@@ -41585,6 +42684,12 @@ class MdsInputUpload {
|
|
|
41585
42684
|
"initialValue": [{
|
|
41586
42685
|
"updateInitialValue": 0
|
|
41587
42686
|
}],
|
|
42687
|
+
"name": [{
|
|
42688
|
+
"handleNameChange": 0
|
|
42689
|
+
}],
|
|
42690
|
+
"sort": [{
|
|
42691
|
+
"handleSortChange": 0
|
|
42692
|
+
}],
|
|
41588
42693
|
"maxFiles": [{
|
|
41589
42694
|
"handleMaxFilesChange": 0
|
|
41590
42695
|
}]
|
|
@@ -41595,6 +42700,8 @@ class MdsInputUpload {
|
|
|
41595
42700
|
"$tagName$": "mds-input-upload",
|
|
41596
42701
|
"$members$": {
|
|
41597
42702
|
"accept": [513],
|
|
42703
|
+
"disabled": [516],
|
|
42704
|
+
"name": [513],
|
|
41598
42705
|
"maxFileSize": [514, "max-file-size"],
|
|
41599
42706
|
"maxFiles": [514, "max-files"],
|
|
41600
42707
|
"sort": [513],
|
|
@@ -41603,13 +42710,15 @@ class MdsInputUpload {
|
|
|
41603
42710
|
"files": [32],
|
|
41604
42711
|
"progress": [32],
|
|
41605
42712
|
"animateText": [32],
|
|
42713
|
+
"activeSort": [32],
|
|
42714
|
+
"formDisabled": [32],
|
|
41606
42715
|
"getFiles": [64],
|
|
41607
42716
|
"getFilesError": [64],
|
|
41608
42717
|
"reset": [64]
|
|
41609
42718
|
},
|
|
41610
42719
|
"$listeners$": undefined,
|
|
41611
42720
|
"$lazyBundleId$": "-",
|
|
41612
|
-
"$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"]]
|
|
41613
42722
|
}; }
|
|
41614
42723
|
}
|
|
41615
42724
|
|
|
@@ -42468,9 +43577,12 @@ class MdsKeyboard {
|
|
|
42468
43577
|
};
|
|
42469
43578
|
this.updateElements = () => {
|
|
42470
43579
|
this.filteredNodes.forEach((node) => {
|
|
42471
|
-
|
|
43580
|
+
var _a;
|
|
43581
|
+
// the type has no empty name, but the attribute can be empty or removed
|
|
43582
|
+
const name = (_a = node.name) !== null && _a !== void 0 ? _a : '';
|
|
43583
|
+
if (name !== '') {
|
|
42472
43584
|
this.keyEls.push(node);
|
|
42473
|
-
this.keyCombination.add(this.keyCodes(
|
|
43585
|
+
this.keyCombination.add(this.keyCodes(name.toLowerCase()).toString());
|
|
42474
43586
|
}
|
|
42475
43587
|
});
|
|
42476
43588
|
};
|
|
@@ -42586,7 +43698,7 @@ class MdsKeyboard {
|
|
|
42586
43698
|
}
|
|
42587
43699
|
}
|
|
42588
43700
|
render() {
|
|
42589
|
-
return (hAsync(Host, { key: '
|
|
43701
|
+
return (hAsync(Host, { key: '0f22438d7c2df4f9370f9daad1756c065720fded', "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: '302124ad13826c7dc832a8d4dbfc3866f3bb5af9', class: "shortcuts" }, hAsync("slot", { key: '0e74fab3079d226dbb14d062e24f7e460984e1da' })), this.try && (hAsync("mds-button", { key: '18ad345428615395f0a6e20453c57db4f8ed93f8', icon: this.getButtonIcon(), "aria-label": this.t.get('testKeyCombination'), class: "combination-checker", variant: "dark", tone: "text", onClick: this.startKeyboardShortcutTest })), this.try && (hAsync("mds-tooltip", { key: '545d9abac32f56ce8199d75a1cc1dc114dd442ac', target: ".combination-checker" }, this.testPassed === undefined && this.t.get('testKeyCombination'), this.testPassed === true && this.t.get('testPassed'), this.testPassed === false && (hAsync("div", { key: 'f668a098b0b91658a9db962c2560d90169083a9c', class: "errors" }, [...this.errors].map((error) => (hAsync("mds-text", { typography: "tip" }, this.t.get(error))))))))));
|
|
42590
43702
|
}
|
|
42591
43703
|
get host() { return getElement(this); }
|
|
42592
43704
|
static get watchers() { return {
|
|
@@ -42874,10 +43986,13 @@ class MdsKeyboardKey {
|
|
|
42874
43986
|
});
|
|
42875
43987
|
this.keyboardKeys = keyboardKeysData;
|
|
42876
43988
|
this.getTitle = () => {
|
|
42877
|
-
|
|
42878
|
-
|
|
42879
|
-
|
|
42880
|
-
|
|
43989
|
+
var _a;
|
|
43990
|
+
// the type has no empty name, but the attribute can be empty or removed
|
|
43991
|
+
const name = (_a = this.name) !== null && _a !== void 0 ? _a : '';
|
|
43992
|
+
if (name !== '') {
|
|
43993
|
+
return this.t.get(this.keyboardKeys[name.toLowerCase()].description, {
|
|
43994
|
+
character: this.keyboardKeys[name.toLowerCase()].alias,
|
|
43995
|
+
keyboardPosition: this.keyboardKeys[name.toLowerCase()].keyboardPosition,
|
|
42881
43996
|
});
|
|
42882
43997
|
}
|
|
42883
43998
|
return undefined;
|
|
@@ -42885,7 +44000,7 @@ class MdsKeyboardKey {
|
|
|
42885
44000
|
}
|
|
42886
44001
|
render() {
|
|
42887
44002
|
var _a, _b, _c, _d;
|
|
42888
|
-
return (hAsync(Host, { key: '
|
|
44003
|
+
return (hAsync(Host, { key: 'c6f1c7d6e70627515b3eb3c962967050c41e8e4c', title: this.getTitle() }, hAsync("div", { key: '0b9a357f1a03a8842d01e10e9fab975e14e4c07d', class: "physical-key" }, this.name && icons.has(this.name) ? (hAsync("mds-icon", { name: (_a = icons.get(this.name)) !== null && _a !== void 0 ? _a : miBaselineBrokenImage, class: "shortcut-icon" })) : (hAsync("mds-text", { class: "shortcut-text", typography: "detail" }, this.name && hAsync("b", null, this.keyboardKeys[this.name].alias))), this.name && ((_b = this.keyboardKeys[this.name]) === null || _b === void 0 ? void 0 : _b.keyboardPosition) && (hAsync("mds-text", { key: '47ff355c39a1575159216946af4dd43735bd37e5', typography: "label" }, ((_c = this.keyboardKeys[this.name].keyboardPosition) === null || _c === void 0 ? void 0 : _c.left) && 'l', ((_d = this.keyboardKeys[this.name].keyboardPosition) === null || _d === void 0 ? void 0 : _d.right) && 'r')))));
|
|
42889
44004
|
}
|
|
42890
44005
|
static get style() { return mdsKeyboardKeyCss(); }
|
|
42891
44006
|
static get cmpMeta() { return {
|
|
@@ -43192,8 +44307,9 @@ class MdsMention {
|
|
|
43192
44307
|
};
|
|
43193
44308
|
}
|
|
43194
44309
|
render() {
|
|
43195
|
-
var _a, _b;
|
|
43196
|
-
|
|
44310
|
+
var _a, _b, _c;
|
|
44311
|
+
const icon = (_a = this.icon) !== null && _a !== void 0 ? _a : '';
|
|
44312
|
+
return (hAsync(Host, { key: '914ba108dd94074f6d4cfe55d3ae8f6da5d20c07' }, hAsync("mds-icon", { key: '452fa5eafee76b142b2ca9491f0bdb0ed21649a2', name: icon !== '' ? icon : miBaselineAlternateEmail }), hAsync("mds-text", { key: '1070089d8e8d38d6d9ae477b6ac7b16b7d5bb29a', typography: this.sizeTypography[(_b = this.size) !== null && _b !== void 0 ? _b : 'md'] }, this.size === 'lg' ? this.label : hAsync("b", null, this.label)), this.deletable && (hAsync("mds-button", { key: '958f40a8b6b208f3bdd5572750b7e6e728176f18', class: "action-remove", icon: miBaselineCancel, onClick: this.onDeleteHandler, size: "sm", title: `${this.t.get('remove')} ${(_c = this.label) !== null && _c !== void 0 ? _c : ''}`.trim(), tone: "text", variant: "dark" }))));
|
|
43197
44313
|
}
|
|
43198
44314
|
get host() { return getElement(this); }
|
|
43199
44315
|
static get style() { return mdsMentionCss(); }
|
|
@@ -43660,18 +44776,20 @@ class MdsNotification {
|
|
|
43660
44776
|
});
|
|
43661
44777
|
};
|
|
43662
44778
|
this.clean = (value) => {
|
|
43663
|
-
|
|
44779
|
+
var _a;
|
|
44780
|
+
// a removed attribute leaves null, which counts as no value and no maximum
|
|
44781
|
+
if ((value !== null && value !== void 0 ? value : 0) === 0 || isNaN(value))
|
|
43664
44782
|
return '';
|
|
43665
|
-
|
|
43666
|
-
|
|
43667
|
-
|
|
43668
|
-
}
|
|
44783
|
+
const max = (_a = this.max) !== null && _a !== void 0 ? _a : 0;
|
|
44784
|
+
if (max !== 0 && !Number.isNaN(max) && value > max) {
|
|
44785
|
+
return `+${Number(max).toLocaleString()}`;
|
|
43669
44786
|
}
|
|
43670
44787
|
return Number(value).toLocaleString();
|
|
43671
44788
|
};
|
|
43672
44789
|
}
|
|
43673
44790
|
componentDidRender() {
|
|
43674
|
-
|
|
44791
|
+
var _a;
|
|
44792
|
+
if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '') {
|
|
43675
44793
|
this.strategy = 'disabled';
|
|
43676
44794
|
return;
|
|
43677
44795
|
}
|
|
@@ -43686,10 +44804,11 @@ class MdsNotification {
|
|
|
43686
44804
|
this.caller = c;
|
|
43687
44805
|
}
|
|
43688
44806
|
componentDidLoad() {
|
|
44807
|
+
var _a;
|
|
43689
44808
|
if (this.strategy === 'disabled') {
|
|
43690
44809
|
return;
|
|
43691
44810
|
}
|
|
43692
|
-
if (this.target !== '' && this.cleanupAutoUpdate == null) {
|
|
44811
|
+
if (((_a = this.target) !== null && _a !== void 0 ? _a : '') !== '' && this.cleanupAutoUpdate == null) {
|
|
43693
44812
|
setTimeout(() => {
|
|
43694
44813
|
this.cleanupAutoUpdate = autoUpdate(this.caller, this.host, this.updatePosition);
|
|
43695
44814
|
}, 100);
|
|
@@ -43705,7 +44824,7 @@ class MdsNotification {
|
|
|
43705
44824
|
}
|
|
43706
44825
|
render() {
|
|
43707
44826
|
var _a;
|
|
43708
|
-
return (hAsync(Host, { key: '
|
|
44827
|
+
return (hAsync(Host, { key: '7ccd6942aef0bc72b1da02625dd1eff455998ef5', "aria-labelledby": this.target, "aria-label": (_a = this.value) !== null && _a !== void 0 ? _a : '0', "pref-animation": preferenceStore.state.animation }, hAsync("mds-text", { key: '8f4283fa8d54781cd37040427fd1c0dc2ee11348', typography: "caption", class: "dot", "aria-hidden": "true" }, this.clean(this.value))));
|
|
43709
44828
|
}
|
|
43710
44829
|
get host() { return getElement(this); }
|
|
43711
44830
|
static get watchers() { return {
|
|
@@ -44055,6 +45174,9 @@ var localeIt$f = {
|
|
|
44055
45174
|
|
|
44056
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)}`;
|
|
44057
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();
|
|
44058
45180
|
/**
|
|
44059
45181
|
* @name Pref
|
|
44060
45182
|
* @description This component is based on MdsTab component pattern
|
|
@@ -44158,6 +45280,7 @@ class MdsPref {
|
|
|
44158
45280
|
}
|
|
44159
45281
|
componentDidLoad() {
|
|
44160
45282
|
var _a;
|
|
45283
|
+
mountedPrefs.add(this.host);
|
|
44161
45284
|
if (typeof window !== 'undefined') {
|
|
44162
45285
|
(_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.setAttribute('data-magma-pref', '');
|
|
44163
45286
|
}
|
|
@@ -44171,14 +45294,15 @@ class MdsPref {
|
|
|
44171
45294
|
}
|
|
44172
45295
|
disconnectedCallback() {
|
|
44173
45296
|
var _a;
|
|
44174
|
-
|
|
45297
|
+
mountedPrefs.delete(this.host);
|
|
45298
|
+
if (typeof window !== 'undefined' && mountedPrefs.size === 0) {
|
|
44175
45299
|
(_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-magma-pref');
|
|
44176
45300
|
}
|
|
44177
45301
|
this.removePerfEvents();
|
|
44178
45302
|
this.removeThemeEvent(this.host.querySelector('mds-pref-theme'));
|
|
44179
45303
|
}
|
|
44180
45304
|
render() {
|
|
44181
|
-
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'))))));
|
|
44182
45306
|
}
|
|
44183
45307
|
get host() { return getElement(this); }
|
|
44184
45308
|
static get watchers() { return {
|
|
@@ -44263,6 +45387,7 @@ class MdsPrefAnimation {
|
|
|
44263
45387
|
this.localStorageAlias = 'mdsPrefAnimation';
|
|
44264
45388
|
this.customPropertyAlias = '--magma-pref-animation';
|
|
44265
45389
|
this.defaultMode = 'system';
|
|
45390
|
+
this.syncingFromStore = false;
|
|
44266
45391
|
this.t = new Locale$1({
|
|
44267
45392
|
el: localeEl$d,
|
|
44268
45393
|
en: localeEn$e,
|
|
@@ -44283,6 +45408,18 @@ class MdsPrefAnimation {
|
|
|
44283
45408
|
label: 'animationEnabled',
|
|
44284
45409
|
},
|
|
44285
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
|
+
};
|
|
44286
45423
|
this.setAnimation = (mode) => {
|
|
44287
45424
|
this.prefChangeEvent.emit({ preference: 'animation' });
|
|
44288
45425
|
this.mode = mode;
|
|
@@ -44303,16 +45440,27 @@ class MdsPrefAnimation {
|
|
|
44303
45440
|
this.setAnimation(mode);
|
|
44304
45441
|
};
|
|
44305
45442
|
}
|
|
44306
|
-
|
|
45443
|
+
// Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
|
|
45444
|
+
componentWillLoad() {
|
|
44307
45445
|
var _a, _b;
|
|
44308
45446
|
this.setAnimation((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
|
|
44309
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
|
+
}
|
|
44310
45455
|
modeChanged(newValue) {
|
|
45456
|
+
if (this.syncingFromStore) {
|
|
45457
|
+
return;
|
|
45458
|
+
}
|
|
44311
45459
|
this.setAnimation(newValue);
|
|
44312
45460
|
}
|
|
44313
45461
|
render() {
|
|
44314
45462
|
var _a;
|
|
44315
|
-
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) }))));
|
|
44316
45464
|
}
|
|
44317
45465
|
static get watchers() { return {
|
|
44318
45466
|
"mode": [{
|
|
@@ -44404,6 +45552,7 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
|
|
|
44404
45552
|
this.localStorageAlias = 'mdsPrefConsumption';
|
|
44405
45553
|
this.customPropertyAlias = '--magma-pref-consumption';
|
|
44406
45554
|
this.defaultMode = 'high';
|
|
45555
|
+
this.syncingFromStore = false;
|
|
44407
45556
|
this.t = new Locale$1({
|
|
44408
45557
|
el: localeEl$c,
|
|
44409
45558
|
en: localeEn$d,
|
|
@@ -44424,6 +45573,18 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
|
|
|
44424
45573
|
label: 'consumptionLow',
|
|
44425
45574
|
},
|
|
44426
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
|
+
};
|
|
44427
45588
|
this.setConsumption = (mode) => {
|
|
44428
45589
|
this.prefChangeEvent.emit({ preference: 'consumption' });
|
|
44429
45590
|
this.mode = mode;
|
|
@@ -44444,16 +45605,27 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
|
|
|
44444
45605
|
this.setConsumption(mode);
|
|
44445
45606
|
};
|
|
44446
45607
|
}
|
|
44447
|
-
|
|
45608
|
+
// Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
|
|
45609
|
+
componentWillLoad() {
|
|
44448
45610
|
var _a, _b;
|
|
44449
45611
|
this.setConsumption((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
|
|
44450
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
|
+
}
|
|
44451
45620
|
modeChanged(newValue) {
|
|
45621
|
+
if (this.syncingFromStore) {
|
|
45622
|
+
return;
|
|
45623
|
+
}
|
|
44452
45624
|
this.setConsumption(newValue);
|
|
44453
45625
|
}
|
|
44454
45626
|
render() {
|
|
44455
45627
|
var _a;
|
|
44456
|
-
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) }))));
|
|
44457
45629
|
}
|
|
44458
45630
|
static get watchers() { return {
|
|
44459
45631
|
"mode": [{
|
|
@@ -44533,6 +45705,7 @@ class MdsPrefContrast {
|
|
|
44533
45705
|
this.localStorageAlias = 'mdsPrefContrast';
|
|
44534
45706
|
this.customPropertyAlias = '--magma-pref-contrast';
|
|
44535
45707
|
this.defaultMode = 'system';
|
|
45708
|
+
this.syncingFromStore = false;
|
|
44536
45709
|
this.t = new Locale$1({
|
|
44537
45710
|
el: localeEl$b,
|
|
44538
45711
|
en: localeEn$c,
|
|
@@ -44559,6 +45732,18 @@ class MdsPrefContrast {
|
|
|
44559
45732
|
label: 'contrastDefault',
|
|
44560
45733
|
},
|
|
44561
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
|
+
};
|
|
44562
45747
|
this.rollbackContrast = () => {
|
|
44563
45748
|
if (typeof window === 'undefined') {
|
|
44564
45749
|
return this.defaultMode;
|
|
@@ -44595,18 +45780,26 @@ class MdsPrefContrast {
|
|
|
44595
45780
|
this.setContrast(mode);
|
|
44596
45781
|
};
|
|
44597
45782
|
}
|
|
44598
|
-
|
|
45783
|
+
// Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
|
|
45784
|
+
componentWillLoad() {
|
|
44599
45785
|
var _a, _b;
|
|
44600
45786
|
this.setContrast((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
|
|
44601
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
|
+
}
|
|
44602
45795
|
modeChanged(newValue, oldValue) {
|
|
44603
|
-
if (newValue !== oldValue) {
|
|
45796
|
+
if (newValue !== oldValue && !this.syncingFromStore) {
|
|
44604
45797
|
this.setContrast(newValue);
|
|
44605
45798
|
}
|
|
44606
45799
|
}
|
|
44607
45800
|
render() {
|
|
44608
45801
|
var _a;
|
|
44609
|
-
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) }))));
|
|
44610
45803
|
}
|
|
44611
45804
|
static get watchers() { return {
|
|
44612
45805
|
"mode": [{
|
|
@@ -45844,7 +47037,7 @@ class MdsPrefLanguageItem {
|
|
|
45844
47037
|
// unrecognized code is a real error; empty codes fall back to the `noCode` branch
|
|
45845
47038
|
// already handled in render().
|
|
45846
47039
|
this.validateCode = (code) => {
|
|
45847
|
-
if (code
|
|
47040
|
+
if (code != null && code !== '' && localeDefault[code] === undefined) {
|
|
45848
47041
|
throw Error(`Language code not found: ${code}`);
|
|
45849
47042
|
}
|
|
45850
47043
|
};
|
|
@@ -45859,10 +47052,11 @@ class MdsPrefLanguageItem {
|
|
|
45859
47052
|
this.validateCode(newValue);
|
|
45860
47053
|
}
|
|
45861
47054
|
render() {
|
|
47055
|
+
var _a;
|
|
45862
47056
|
return (
|
|
45863
47057
|
// the item is an entry of the `menu` the mds-dropdown of the controller opens:
|
|
45864
47058
|
// without the role axe rejects it as a child of that menu (aria-required-children)
|
|
45865
|
-
hAsync(Host, { key: '
|
|
47059
|
+
hAsync(Host, { key: '968d0f761a2c4b2de6652069dc1db4f51d61ee76', onClick: this.handleClick, role: "menuitem" }, ((_a = this.code) !== null && _a !== void 0 ? _a : '') !== '' ? (hAsync("mds-button", { icon: this.selected ? miBaselineCheckCircle : miOutlineCircle, variant: "dark", tone: "text", label: localeDefault[this.code] })) : (hAsync("mds-button", { icon: miBaselineCheckCircle, variant: "error", tone: "text", label: this.t.get('noCode') }))));
|
|
45866
47060
|
}
|
|
45867
47061
|
static get watchers() { return {
|
|
45868
47062
|
"code": [{
|
|
@@ -45962,6 +47156,7 @@ class MdsPrefMode {
|
|
|
45962
47156
|
this.cssOverlayZIndex = '6000';
|
|
45963
47157
|
this.overlayId = 'mds-pref-mode-overlay';
|
|
45964
47158
|
this.overlayShow = false;
|
|
47159
|
+
this.syncingFromStore = false;
|
|
45965
47160
|
this.disabled = false;
|
|
45966
47161
|
this.updateCSSCustomProps = () => {
|
|
45967
47162
|
var _a, _b, _c;
|
|
@@ -45993,6 +47188,18 @@ class MdsPrefMode {
|
|
|
45993
47188
|
label: 'lightMode',
|
|
45994
47189
|
},
|
|
45995
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
|
+
};
|
|
45996
47203
|
this.setMode = (mode) => {
|
|
45997
47204
|
this.prefChangeEvent.emit({ preference: 'mode' });
|
|
45998
47205
|
this.mode = mode;
|
|
@@ -46110,7 +47317,10 @@ class MdsPrefMode {
|
|
|
46110
47317
|
this.changeMode(mode);
|
|
46111
47318
|
};
|
|
46112
47319
|
}
|
|
46113
|
-
|
|
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() {
|
|
46114
47324
|
var _a, _b;
|
|
46115
47325
|
if (!isSafari()) {
|
|
46116
47326
|
this.setMode((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
|
|
@@ -46119,11 +47329,18 @@ class MdsPrefMode {
|
|
|
46119
47329
|
this.disabled = true;
|
|
46120
47330
|
this.mode = 'light';
|
|
46121
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
|
+
}
|
|
46122
47339
|
componentDidLoad() {
|
|
46123
47340
|
this.updateCSSCustomProps();
|
|
46124
47341
|
}
|
|
46125
47342
|
modeChanged(newValue, oldValue) {
|
|
46126
|
-
if (newValue === oldValue) {
|
|
47343
|
+
if (newValue === oldValue || this.syncingFromStore) {
|
|
46127
47344
|
return;
|
|
46128
47345
|
}
|
|
46129
47346
|
this.setMode(newValue);
|
|
@@ -46140,9 +47357,9 @@ class MdsPrefMode {
|
|
|
46140
47357
|
}
|
|
46141
47358
|
render() {
|
|
46142
47359
|
var _a, _b;
|
|
46143
|
-
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
|
|
46144
47361
|
? this.t.get(this.modes[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label, { forced: true })
|
|
46145
|
-
: 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) }))));
|
|
46146
47363
|
}
|
|
46147
47364
|
get element() { return getElement(this); }
|
|
46148
47365
|
static get watchers() { return {
|
|
@@ -46399,7 +47616,8 @@ class MdsPrefThemeItem {
|
|
|
46399
47616
|
};
|
|
46400
47617
|
}
|
|
46401
47618
|
componentWillRender() {
|
|
46402
|
-
|
|
47619
|
+
var _a;
|
|
47620
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') === '') {
|
|
46403
47621
|
this.label = this.name.charAt(0).toUpperCase() + this.name.slice(1).replace(/-/g, ' ');
|
|
46404
47622
|
}
|
|
46405
47623
|
}
|
|
@@ -46407,7 +47625,7 @@ class MdsPrefThemeItem {
|
|
|
46407
47625
|
return (
|
|
46408
47626
|
// the item is an entry of the `menu` the mds-dropdown of the controller opens:
|
|
46409
47627
|
// without the role axe rejects it as a child of that menu (aria-required-children)
|
|
46410
|
-
hAsync(Host, { key: '
|
|
47628
|
+
hAsync(Host, { key: 'd14e86d120deb8ce9c1425dafb96c93e9cba4005', onClick: this.handleClick, role: "menuitem" }, hAsync("mds-button", { key: '60a1cf50d3875d1a6aa5493d6436edab1d96349e', icon: this.selected ? miBaselineCheckCircle : miOutlineCircle, variant: "dark", tone: "text" }, hAsync("div", { key: 'b6cd3b716ea2bf811c90c63156ad5d57e5bd7aed', class: "label" }, hAsync("div", { key: 'cf8468e4b9f3d3b03d5060c9531ae1035555270e', class: "theme-preview" }, hAsync("div", { key: 'b634d507168fdec1c9536d7cac619ff1195ca9f1', class: "theme-color theme-color--variant-primary" }), hAsync("div", { key: '67c459ade780433bde32a6a2ba302ae9814a275c', class: "theme-color theme-color--status-success" }), hAsync("div", { key: 'e68b927681b50d439bf937c55fb33b06b01463f6', class: "theme-color theme-color--status-warning" }), hAsync("div", { key: 'eb392e74cecbeb00d06989d3fe5650977e0328ea', class: "theme-color theme-color--status-error" })), this.label))));
|
|
46411
47629
|
}
|
|
46412
47630
|
static get style() { return mdsPrefThemeItemCss(); }
|
|
46413
47631
|
static get cmpMeta() { return {
|
|
@@ -46917,7 +48135,7 @@ function requireDayjs_min () {
|
|
|
46917
48135
|
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
46918
48136
|
hasRequiredDayjs_min = 1;
|
|
46919
48137
|
(function (module, exports) {
|
|
46920
|
-
!function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|
|
|
48138
|
+
!function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),Y=_.prototype;return O.prototype=Y,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){Y[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
46921
48139
|
} (dayjs_min$1));
|
|
46922
48140
|
return dayjs_min$1.exports;
|
|
46923
48141
|
}
|
|
@@ -47723,11 +48941,13 @@ class MdsStepperBar {
|
|
|
47723
48941
|
this.currentItem = index - 1;
|
|
47724
48942
|
const values = new Array();
|
|
47725
48943
|
this.items.forEach((item, key) => {
|
|
48944
|
+
var _a;
|
|
47726
48945
|
item.done = false;
|
|
47727
48946
|
if (key < this.currentItem) {
|
|
47728
48947
|
item.done = true;
|
|
47729
|
-
|
|
47730
|
-
|
|
48948
|
+
const value = (_a = item.value) !== null && _a !== void 0 ? _a : '';
|
|
48949
|
+
if (value !== '') {
|
|
48950
|
+
values.push(value);
|
|
47731
48951
|
}
|
|
47732
48952
|
}
|
|
47733
48953
|
item.current = false;
|
|
@@ -47805,7 +49025,7 @@ class MdsStepperBar {
|
|
|
47805
49025
|
});
|
|
47806
49026
|
}
|
|
47807
49027
|
render() {
|
|
47808
|
-
return (hAsync(Host, { key: '
|
|
49028
|
+
return (hAsync(Host, { key: '35f536c577499c237e0a5b1865c2dcfaa5735d72' }, hAsync("div", { key: '5c204cc4ca343076982d3357e7645cc8770a22be', class: "items", part: "items" }, hAsync("slot", { key: '69c3b461ada662e58051b875411781a862ff565d' })), hAsync("div", { key: '7fb5381e1126a5227b50ecc202154e44928aab5e', class: "contents", part: "contents" }, hAsync("slot", { key: '535d40033b20590f72e9fef336bda3ed7b06cead', name: "content" }))));
|
|
47809
49029
|
}
|
|
47810
49030
|
get element() { return getElement(this); }
|
|
47811
49031
|
static get watchers() { return {
|
|
@@ -48308,8 +49528,9 @@ class MdsTabBarItem {
|
|
|
48308
49528
|
}
|
|
48309
49529
|
};
|
|
48310
49530
|
this.onSlotChangeHandler = () => {
|
|
49531
|
+
var _a;
|
|
48311
49532
|
/* this should be removed in the future once slotted text is no longer used, use the label property instead */
|
|
48312
|
-
if (this.label !==
|
|
49533
|
+
if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
|
|
48313
49534
|
return;
|
|
48314
49535
|
this.label = readSlottedLabel(this.element);
|
|
48315
49536
|
};
|
|
@@ -48324,7 +49545,7 @@ class MdsTabBarItem {
|
|
|
48324
49545
|
this.label = sanitizeLabel(newValue);
|
|
48325
49546
|
}
|
|
48326
49547
|
render() {
|
|
48327
|
-
return (hAsync(Host, { key: '
|
|
49548
|
+
return (hAsync(Host, { key: '6e2c08fad0e04d0725ab7ef827c654cf9edecb51', onClick: this.select, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-icon", { key: 'cc8cc878d899d20532b1582ae7eb2aa459a82078', name: this.icon }), hAsync("mds-text", { key: 'ea6030247b5999f34cd64a6a3ea8b15de66ba5ab', typography: this.typography }, this.label || hAsync("slot", { key: 'b922dbfe1b35997ac2c9e9d384e22505838a6994', onSlotchange: this.onSlotChangeHandler }))));
|
|
48328
49549
|
}
|
|
48329
49550
|
get element() { return getElement(this); }
|
|
48330
49551
|
static get watchers() { return {
|
|
@@ -48867,7 +50088,7 @@ class MdsTableHeaderCell {
|
|
|
48867
50088
|
this.tableRowsDefaultSorted = Array.from(this.tableBody.children);
|
|
48868
50089
|
};
|
|
48869
50090
|
this.getValue = (element) => {
|
|
48870
|
-
if (element.value
|
|
50091
|
+
if (element.value != null &&
|
|
48871
50092
|
element.value !== '' &&
|
|
48872
50093
|
element.value !== 0 &&
|
|
48873
50094
|
!Number.isNaN(element.value)) {
|
|
@@ -48950,7 +50171,7 @@ class MdsTableHeaderCell {
|
|
|
48950
50171
|
}
|
|
48951
50172
|
}
|
|
48952
50173
|
render() {
|
|
48953
|
-
return (hAsync(Host, { key: '
|
|
50174
|
+
return (hAsync(Host, { key: 'e7c077673fa918dfd50f25d7b341881f72eaefe2', role: "columnheader", "aria-sort": this.direction, "pref-animation": preferenceStore.state.animation }, this.sortable ? (hAsync("mds-button", { class: "action", icon: clsx(this.direction === 'none' && miBaselineUnfoldMore, this.direction === 'ascending' && miBaselineKeyboardArrowUp, this.direction === 'descending' && miBaselineKeyboardArrowDown), "icon-position": "right", onClick: this.sort, tone: "text", variant: "dark", size: "sm", part: "action", label: this.label })) : (hAsync("mds-text", { class: "label", typography: "label", part: "label" }, this.label))));
|
|
48954
50175
|
}
|
|
48955
50176
|
get element() { return getElement(this); }
|
|
48956
50177
|
static get watchers() { return {
|
|
@@ -49397,7 +50618,8 @@ class MdsText {
|
|
|
49397
50618
|
this.animateText(newValue);
|
|
49398
50619
|
}
|
|
49399
50620
|
render() {
|
|
49400
|
-
|
|
50621
|
+
var _a;
|
|
50622
|
+
return (hAsync(Host, { key: '468c9b04797da9ab100c89474a7a67313aac829b', "pref-animation": preferenceStore.state.animation }, hAsync(this.tag, { key: '245ab42bd31cd0cb4be371f074fee956d3c1c13c', class: "text" }, ((_a = this.text) !== null && _a !== void 0 ? _a : '') === '' ? hAsync("slot", null) : this.text)));
|
|
49401
50623
|
}
|
|
49402
50624
|
get host() { return getElement(this); }
|
|
49403
50625
|
static get watchers() { return {
|
|
@@ -49451,10 +50673,16 @@ class MdsToast {
|
|
|
49451
50673
|
* Sets position of toast
|
|
49452
50674
|
*/
|
|
49453
50675
|
this.position = 'bottom-center';
|
|
50676
|
+
// a removed attribute leaves null, which counts as no duration, like 0
|
|
50677
|
+
this.hasDuration = () => {
|
|
50678
|
+
var _a;
|
|
50679
|
+
const duration = (_a = this.duration) !== null && _a !== void 0 ? _a : 0;
|
|
50680
|
+
return duration !== 0 && !Number.isNaN(duration);
|
|
50681
|
+
};
|
|
49454
50682
|
this.reloadTimeListeners = (visible) => {
|
|
49455
50683
|
if (typeof window === 'undefined')
|
|
49456
50684
|
return;
|
|
49457
|
-
if (this.
|
|
50685
|
+
if (!this.hasDuration()) {
|
|
49458
50686
|
return;
|
|
49459
50687
|
}
|
|
49460
50688
|
if (!visible) {
|
|
@@ -49491,7 +50719,7 @@ class MdsToast {
|
|
|
49491
50719
|
componentWillLoad() {
|
|
49492
50720
|
this.hasText = this.hostElement.innerHTML !== '';
|
|
49493
50721
|
this.hasActions = hasChildWithSlot(this.hostElement, 'action');
|
|
49494
|
-
if (this.
|
|
50722
|
+
if (!this.hasDuration()) {
|
|
49495
50723
|
return;
|
|
49496
50724
|
}
|
|
49497
50725
|
if (this.visible) {
|
|
@@ -49508,7 +50736,7 @@ class MdsToast {
|
|
|
49508
50736
|
this.reloadTimeListeners(!!this.visible);
|
|
49509
50737
|
}
|
|
49510
50738
|
render() {
|
|
49511
|
-
return (hAsync(Host, { key: '
|
|
50739
|
+
return (hAsync(Host, { key: 'd043662b287519f10abe2a4568d2f3458b89857e', "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: '5f8945ad6b39700172920d34c405d616c685de61', class: clsx('dialog', this.position && `to-${this.position}`, this.visible && 'dialog--visible') }, hAsync("slot", { key: 'ad778db94450394931cfb554357e91cbf192fe66', name: "icon" }), this.hasText && (hAsync("mds-text", { key: '43ac2cbcd4101ade9b03ec137ec36d512b9fd87e', typography: "caption" }, hAsync("slot", { key: '4ede3cb3db5c6f096fe66ed87f05a1e2deab2b24' }))), hAsync("div", { key: 'd811c95881d28ccba3be66605efb8197235bc1ef', class: clsx('actions', !this.hasActions && 'actions--hidden') }, hAsync("slot", { key: '08e8d1cb3e62bf1eb104a3de3d473ca57a6991e9', name: "action", onSlotchange: this.onActionSlotChange })))));
|
|
49512
50740
|
}
|
|
49513
50741
|
get hostElement() { return getElement(this); }
|
|
49514
50742
|
static get watchers() { return {
|
|
@@ -49631,10 +50859,10 @@ class MdsTooltip {
|
|
|
49631
50859
|
this.floatingController.dismiss();
|
|
49632
50860
|
}
|
|
49633
50861
|
targetChanged() {
|
|
49634
|
-
var _a;
|
|
49635
|
-
if (this.target === '')
|
|
50862
|
+
var _a, _b;
|
|
50863
|
+
if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '')
|
|
49636
50864
|
return;
|
|
49637
|
-
const caller = (
|
|
50865
|
+
const caller = (_b = this.floatingController) === null || _b === void 0 ? void 0 : _b.updateCaller(this.target);
|
|
49638
50866
|
if (!caller)
|
|
49639
50867
|
return;
|
|
49640
50868
|
this.caller = caller;
|
|
@@ -49656,7 +50884,7 @@ class MdsTooltip {
|
|
|
49656
50884
|
this.floatingController.dismiss();
|
|
49657
50885
|
}
|
|
49658
50886
|
render() {
|
|
49659
|
-
return (hAsync(Host, { key: '
|
|
50887
|
+
return (hAsync(Host, { key: '2031b33e6cc0837318acce18e2298a4bacfc5b0b', "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: 'ba0236540eb28111cba583fc346e4d3717ed0385', class: "arrow", innerHTML: arrowSvg }), hAsync("mds-text", { key: '8aa8abf3be3b4ab25dc1bf4bf85d9fbdb6470639', class: "text", typography: this.typography, part: "text" }, hAsync("slot", { key: '79d6f5b7055890731d8e861985a9de7c5df9c725' }))));
|
|
49660
50888
|
}
|
|
49661
50889
|
get host() { return getElement(this); }
|
|
49662
50890
|
static get watchers() { return {
|