@eui/eds-wc 22.0.0-alpha.5 → 22.0.0-alpha.50
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/eds-accordion/eds-wc-accordion.d.ts.map +1 -1
- package/eds-accordion/eds-wc-accordion.js +6 -3
- package/eds-accordion/eds-wc-accordion.js.map +1 -1
- package/eds-alert/eds-wc-alert.d.ts +59 -21
- package/eds-alert/eds-wc-alert.d.ts.map +1 -1
- package/eds-alert/eds-wc-alert.js +211 -85
- package/eds-alert/eds-wc-alert.js.map +1 -1
- package/eds-alert/index.d.ts +1 -0
- package/eds-alert/index.d.ts.map +1 -1
- package/eds-autocomplete/eds-wc-autocomplete.d.ts.map +1 -1
- package/eds-autocomplete/eds-wc-autocomplete.js +3 -0
- package/eds-autocomplete/eds-wc-autocomplete.js.map +1 -1
- package/eds-avatar/eds-wc-avatar.d.ts.map +1 -1
- package/eds-avatar/eds-wc-avatar.js +19 -18
- package/eds-avatar/eds-wc-avatar.js.map +1 -1
- package/eds-badge/eds-wc-badge.d.ts +63 -23
- package/eds-badge/eds-wc-badge.d.ts.map +1 -1
- package/eds-badge/eds-wc-badge.js +228 -101
- package/eds-badge/eds-wc-badge.js.map +1 -1
- package/eds-badge/index.d.ts +1 -0
- package/eds-badge/index.d.ts.map +1 -1
- package/eds-blockquote/eds-wc-blockquote.d.ts.map +1 -1
- package/eds-blockquote/eds-wc-blockquote.js +2 -1
- package/eds-blockquote/eds-wc-blockquote.js.map +1 -1
- package/eds-breadcrumb/eds-wc-breadcrumb.d.ts +20 -1
- package/eds-breadcrumb/eds-wc-breadcrumb.d.ts.map +1 -1
- package/eds-breadcrumb/eds-wc-breadcrumb.js +68 -22
- package/eds-breadcrumb/eds-wc-breadcrumb.js.map +1 -1
- package/eds-breadcrumb/index.d.ts +2 -1
- package/eds-breadcrumb/index.d.ts.map +1 -1
- package/eds-breadcrumb/index.js +1 -1
- package/eds-breadcrumb/index.js.map +1 -1
- package/eds-button/eds-wc-button.d.ts +41 -17
- package/eds-button/eds-wc-button.d.ts.map +1 -1
- package/eds-button/eds-wc-button.js +178 -150
- package/eds-button/eds-wc-button.js.map +1 -1
- package/eds-button/index.d.ts +2 -2
- package/eds-button/index.d.ts.map +1 -1
- package/eds-button/index.js +1 -1
- package/eds-button/index.js.map +1 -1
- package/eds-calendar/eds-wc-calendar.d.ts +274 -0
- package/eds-calendar/eds-wc-calendar.d.ts.map +1 -0
- package/eds-calendar/eds-wc-calendar.js +1237 -0
- package/eds-calendar/eds-wc-calendar.js.map +1 -0
- package/eds-calendar/index.d.ts +3 -0
- package/eds-calendar/index.d.ts.map +1 -0
- package/eds-calendar/index.js +2 -0
- package/eds-calendar/index.js.map +1 -0
- package/eds-card/eds-wc-card.d.ts.map +1 -1
- package/eds-card/eds-wc-card.js +2 -1
- package/eds-card/eds-wc-card.js.map +1 -1
- package/eds-chat-bubble/eds-wc-chat-bubble.d.ts +83 -0
- package/eds-chat-bubble/eds-wc-chat-bubble.d.ts.map +1 -0
- package/eds-chat-bubble/eds-wc-chat-bubble.js +238 -0
- package/eds-chat-bubble/eds-wc-chat-bubble.js.map +1 -0
- package/eds-chat-bubble/index.d.ts +3 -0
- package/eds-chat-bubble/index.d.ts.map +1 -0
- package/eds-chat-bubble/index.js +2 -0
- package/eds-chat-bubble/index.js.map +1 -0
- package/{eds-input-checkbox/eds-wc-input-checkbox.d.ts → eds-checkbox/eds-wc-checkbox.d.ts} +8 -8
- package/eds-checkbox/eds-wc-checkbox.d.ts.map +1 -0
- package/{eds-input-checkbox/eds-wc-input-checkbox.js → eds-checkbox/eds-wc-checkbox.js} +19 -19
- package/eds-checkbox/eds-wc-checkbox.js.map +1 -0
- package/eds-checkbox/index.d.ts +2 -0
- package/eds-checkbox/index.d.ts.map +1 -0
- package/eds-checkbox/index.js +2 -0
- package/eds-checkbox/index.js.map +1 -0
- package/eds-chip/eds-wc-chip.d.ts +107 -18
- package/eds-chip/eds-wc-chip.d.ts.map +1 -1
- package/eds-chip/eds-wc-chip.js +418 -114
- package/eds-chip/eds-wc-chip.js.map +1 -1
- package/eds-chip/index.d.ts +2 -1
- package/eds-chip/index.d.ts.map +1 -1
- package/eds-chip/index.js +1 -1
- package/eds-chip/index.js.map +1 -1
- package/eds-content-item/eds-wc-content-item.d.ts +110 -0
- package/eds-content-item/eds-wc-content-item.d.ts.map +1 -0
- package/eds-content-item/eds-wc-content-item.js +420 -0
- package/eds-content-item/eds-wc-content-item.js.map +1 -0
- package/eds-content-item/index.d.ts +3 -0
- package/eds-content-item/index.d.ts.map +1 -0
- package/eds-content-item/index.js +2 -0
- package/eds-content-item/index.js.map +1 -0
- package/eds-date-block/eds-wc-date-block.d.ts.map +1 -1
- package/eds-date-block/eds-wc-date-block.js +4 -2
- package/eds-date-block/eds-wc-date-block.js.map +1 -1
- package/eds-datepicker/eds-wc-datepicker.js +1 -1
- package/eds-dialog/eds-wc-dialog.js +1 -1
- package/eds-discussion-thread/eds-wc-discussion-thread.js +2 -2
- package/eds-divider/eds-wc-divider.d.ts +56 -0
- package/eds-divider/eds-wc-divider.d.ts.map +1 -0
- package/eds-divider/eds-wc-divider.js +109 -0
- package/eds-divider/eds-wc-divider.js.map +1 -0
- package/eds-divider/index.d.ts +3 -0
- package/eds-divider/index.d.ts.map +1 -0
- package/eds-divider/index.js +2 -0
- package/eds-divider/index.js.map +1 -0
- package/eds-empty-state/eds-wc-empty-state.d.ts.map +1 -1
- package/eds-empty-state/eds-wc-empty-state.js +2 -1
- package/eds-empty-state/eds-wc-empty-state.js.map +1 -1
- package/eds-fab-button/eds-wc-fab-button.js +2 -2
- package/eds-fieldset/eds-wc-fieldset.d.ts.map +1 -1
- package/eds-fieldset/eds-wc-fieldset.js +2 -1
- package/eds-fieldset/eds-wc-fieldset.js.map +1 -1
- package/eds-file-upload/eds-wc-file-upload.js +1 -1
- package/eds-icon/eds-wc-icon-image.d.ts +43 -0
- package/eds-icon/eds-wc-icon-image.d.ts.map +1 -0
- package/eds-icon/eds-wc-icon-image.js +107 -0
- package/eds-icon/eds-wc-icon-image.js.map +1 -0
- package/eds-icon/eds-wc-icon.d.ts +44 -28
- package/eds-icon/eds-wc-icon.d.ts.map +1 -1
- package/eds-icon/eds-wc-icon.js +129 -85
- package/eds-icon/eds-wc-icon.js.map +1 -1
- package/eds-icon/index.d.ts +3 -1
- package/eds-icon/index.d.ts.map +1 -1
- package/eds-icon/index.js +2 -1
- package/eds-icon/index.js.map +1 -1
- package/eds-icon-button/eds-wc-icon-button.d.ts +53 -18
- package/eds-icon-button/eds-wc-icon-button.d.ts.map +1 -1
- package/eds-icon-button/eds-wc-icon-button.js +165 -74
- package/eds-icon-button/eds-wc-icon-button.js.map +1 -1
- package/eds-icon-button/index.d.ts +2 -1
- package/eds-icon-button/index.d.ts.map +1 -1
- package/eds-icon-button/index.js +1 -1
- package/eds-icon-button/index.js.map +1 -1
- package/eds-icon-state/eds-wc-icon-state.d.ts +56 -0
- package/eds-icon-state/eds-wc-icon-state.d.ts.map +1 -0
- package/eds-icon-state/eds-wc-icon-state.js +93 -0
- package/eds-icon-state/eds-wc-icon-state.js.map +1 -0
- package/eds-icon-state/index.d.ts +3 -0
- package/eds-icon-state/index.d.ts.map +1 -0
- package/eds-icon-state/index.js +2 -0
- package/eds-icon-state/index.js.map +1 -0
- package/eds-input-addon/eds-wc-input-addon.d.ts +55 -0
- package/eds-input-addon/eds-wc-input-addon.d.ts.map +1 -0
- package/eds-input-addon/eds-wc-input-addon.js +177 -0
- package/eds-input-addon/eds-wc-input-addon.js.map +1 -0
- package/eds-input-addon/index.d.ts +3 -0
- package/eds-input-addon/index.d.ts.map +1 -0
- package/eds-input-addon/index.js +2 -0
- package/eds-input-addon/index.js.map +1 -0
- package/eds-input-button/eds-wc-input-button.d.ts +86 -8
- package/eds-input-button/eds-wc-input-button.d.ts.map +1 -1
- package/eds-input-button/eds-wc-input-button.js +275 -13
- package/eds-input-button/eds-wc-input-button.js.map +1 -1
- package/eds-input-button/index.d.ts +2 -1
- package/eds-input-button/index.d.ts.map +1 -1
- package/eds-input-button/index.js +1 -1
- package/eds-input-button/index.js.map +1 -1
- package/eds-input-chat/eds-wc-input-chat.d.ts +97 -0
- package/eds-input-chat/eds-wc-input-chat.d.ts.map +1 -0
- package/eds-input-chat/eds-wc-input-chat.js +363 -0
- package/eds-input-chat/eds-wc-input-chat.js.map +1 -0
- package/eds-input-chat/index.d.ts +3 -0
- package/eds-input-chat/index.d.ts.map +1 -0
- package/eds-input-chat/index.js +2 -0
- package/eds-input-chat/index.js.map +1 -0
- package/eds-input-number/eds-wc-input-number.js +1 -1
- package/eds-input-password/eds-wc-input-password.d.ts +115 -0
- package/eds-input-password/eds-wc-input-password.d.ts.map +1 -0
- package/eds-input-password/eds-wc-input-password.js +295 -0
- package/eds-input-password/eds-wc-input-password.js.map +1 -0
- package/eds-input-password/index.d.ts +2 -0
- package/eds-input-password/index.d.ts.map +1 -0
- package/eds-input-password/index.js +2 -0
- package/eds-input-password/index.js.map +1 -0
- package/eds-input-text/eds-wc-input-text.d.ts +4 -0
- package/eds-input-text/eds-wc-input-text.d.ts.map +1 -1
- package/eds-input-text/eds-wc-input-text.js +37 -5
- package/eds-input-text/eds-wc-input-text.js.map +1 -1
- package/eds-label/eds-wc-label.d.ts +10 -0
- package/eds-label/eds-wc-label.d.ts.map +1 -1
- package/eds-label/eds-wc-label.js +29 -1
- package/eds-label/eds-wc-label.js.map +1 -1
- package/eds-language-selector/eds-wc-language-selector.d.ts +108 -0
- package/eds-language-selector/eds-wc-language-selector.d.ts.map +1 -0
- package/eds-language-selector/eds-wc-language-selector.js +655 -0
- package/eds-language-selector/eds-wc-language-selector.js.map +1 -0
- package/eds-language-selector/index.d.ts +3 -0
- package/eds-language-selector/index.d.ts.map +1 -0
- package/eds-language-selector/index.js +2 -0
- package/eds-language-selector/index.js.map +1 -0
- package/eds-loading-indicator/eds-wc-loading-indicator.d.ts +61 -0
- package/eds-loading-indicator/eds-wc-loading-indicator.d.ts.map +1 -0
- package/eds-loading-indicator/eds-wc-loading-indicator.js +106 -0
- package/eds-loading-indicator/eds-wc-loading-indicator.js.map +1 -0
- package/eds-loading-indicator/index.d.ts +3 -0
- package/eds-loading-indicator/index.d.ts.map +1 -0
- package/eds-loading-indicator/index.js +2 -0
- package/eds-loading-indicator/index.js.map +1 -0
- package/eds-message-box/eds-wc-message-box.js +1 -1
- package/eds-multiselect/eds-wc-multiselect.d.ts +118 -0
- package/eds-multiselect/eds-wc-multiselect.d.ts.map +1 -0
- package/eds-multiselect/eds-wc-multiselect.js +618 -0
- package/eds-multiselect/eds-wc-multiselect.js.map +1 -0
- package/eds-multiselect/index.d.ts +3 -0
- package/eds-multiselect/index.d.ts.map +1 -0
- package/eds-multiselect/index.js +2 -0
- package/eds-multiselect/index.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-content.d.ts +17 -0
- package/eds-overlay/eds-wc-overlay-content.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-content.js +34 -0
- package/eds-overlay/eds-wc-overlay-content.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-footer.d.ts +17 -0
- package/eds-overlay/eds-wc-overlay-footer.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-footer.js +35 -0
- package/eds-overlay/eds-wc-overlay-footer.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-action-items.d.ts +18 -0
- package/eds-overlay/eds-wc-overlay-header-action-items.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-action-items.js +34 -0
- package/eds-overlay/eds-wc-overlay-header-action-items.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-label.d.ts +17 -0
- package/eds-overlay/eds-wc-overlay-header-label.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-label.js +32 -0
- package/eds-overlay/eds-wc-overlay-header-label.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-sublabel.d.ts +17 -0
- package/eds-overlay/eds-wc-overlay-header-sublabel.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-sublabel.js +32 -0
- package/eds-overlay/eds-wc-overlay-header-sublabel.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-header.d.ts +25 -0
- package/eds-overlay/eds-wc-overlay-header.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-header.js +105 -0
- package/eds-overlay/eds-wc-overlay-header.js.map +1 -0
- package/eds-overlay/eds-wc-overlay.d.ts +97 -0
- package/eds-overlay/eds-wc-overlay.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay.js +352 -0
- package/eds-overlay/eds-wc-overlay.js.map +1 -0
- package/eds-overlay/index.d.ts +9 -0
- package/eds-overlay/index.d.ts.map +1 -0
- package/eds-overlay/index.js +8 -0
- package/eds-overlay/index.js.map +1 -0
- package/{eds-paginator/eds-wc-paginator.d.ts → eds-pagination/eds-wc-pagination.d.ts} +6 -6
- package/eds-pagination/eds-wc-pagination.d.ts.map +1 -0
- package/{eds-paginator/eds-wc-paginator.js → eds-pagination/eds-wc-pagination.js} +21 -21
- package/eds-pagination/eds-wc-pagination.js.map +1 -0
- package/eds-pagination/index.d.ts +3 -0
- package/eds-pagination/index.d.ts.map +1 -0
- package/eds-pagination/index.js +2 -0
- package/eds-pagination/index.js.map +1 -0
- package/eds-popover/eds-wc-popover.js +1 -1
- package/eds-progress-bar/eds-wc-progress-bar.d.ts.map +1 -1
- package/eds-progress-bar/eds-wc-progress-bar.js +2 -1
- package/eds-progress-bar/eds-wc-progress-bar.js.map +1 -1
- package/eds-progress-circle/eds-wc-progress-circle.d.ts.map +1 -1
- package/eds-progress-circle/eds-wc-progress-circle.js +4 -3
- package/eds-progress-circle/eds-wc-progress-circle.js.map +1 -1
- package/{eds-input-radio/eds-wc-input-radio.d.ts → eds-radio/eds-wc-radio.d.ts} +6 -6
- package/eds-radio/eds-wc-radio.d.ts.map +1 -0
- package/{eds-input-radio/eds-wc-input-radio.js → eds-radio/eds-wc-radio.js} +19 -19
- package/eds-radio/eds-wc-radio.js.map +1 -0
- package/eds-radio/index.d.ts +2 -0
- package/eds-radio/index.d.ts.map +1 -0
- package/eds-radio/index.js +2 -0
- package/eds-radio/index.js.map +1 -0
- package/eds-segmented-control/eds-wc-segmented-control.d.ts +67 -0
- package/eds-segmented-control/eds-wc-segmented-control.d.ts.map +1 -0
- package/{eds-button-group/eds-wc-button-group.js → eds-segmented-control/eds-wc-segmented-control.js} +40 -35
- package/eds-segmented-control/eds-wc-segmented-control.js.map +1 -0
- package/eds-segmented-control/index.d.ts +3 -0
- package/eds-segmented-control/index.d.ts.map +1 -0
- package/eds-segmented-control/index.js +2 -0
- package/eds-segmented-control/index.js.map +1 -0
- package/eds-select/eds-wc-select.d.ts +11 -0
- package/eds-select/eds-wc-select.d.ts.map +1 -1
- package/eds-select/eds-wc-select.js +42 -4
- package/eds-select/eds-wc-select.js.map +1 -1
- package/eds-side-sheet/eds-wc-side-sheet-content.d.ts +17 -0
- package/eds-side-sheet/eds-wc-side-sheet-content.d.ts.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-content.js +34 -0
- package/eds-side-sheet/eds-wc-side-sheet-content.js.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-footer.d.ts +17 -0
- package/eds-side-sheet/eds-wc-side-sheet-footer.d.ts.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-footer.js +35 -0
- package/eds-side-sheet/eds-wc-side-sheet-footer.js.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-action-items.d.ts +18 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-action-items.d.ts.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-action-items.js +34 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-action-items.js.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-label.d.ts +17 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-label.d.ts.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-label.js +32 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-label.js.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-sublabel.d.ts +17 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-sublabel.d.ts.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-sublabel.js +32 -0
- package/eds-side-sheet/eds-wc-side-sheet-header-sublabel.js.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-header.d.ts +25 -0
- package/eds-side-sheet/eds-wc-side-sheet-header.d.ts.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet-header.js +105 -0
- package/eds-side-sheet/eds-wc-side-sheet-header.js.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet.d.ts +97 -0
- package/eds-side-sheet/eds-wc-side-sheet.d.ts.map +1 -0
- package/eds-side-sheet/eds-wc-side-sheet.js +352 -0
- package/eds-side-sheet/eds-wc-side-sheet.js.map +1 -0
- package/eds-side-sheet/index.d.ts +9 -0
- package/eds-side-sheet/index.d.ts.map +1 -0
- package/eds-side-sheet/index.js +8 -0
- package/eds-side-sheet/index.js.map +1 -0
- package/eds-skeleton/eds-wc-skeleton.js +1 -1
- package/eds-swiper/eds-wc-swiper.d.ts +100 -0
- package/eds-swiper/eds-wc-swiper.d.ts.map +1 -0
- package/eds-swiper/eds-wc-swiper.js +384 -0
- package/eds-swiper/eds-wc-swiper.js.map +1 -0
- package/eds-swiper/index.d.ts +2 -0
- package/eds-swiper/index.d.ts.map +1 -0
- package/eds-swiper/index.js +2 -0
- package/eds-swiper/index.js.map +1 -0
- package/{eds-toggle/eds-wc-toggle.d.ts → eds-switch/eds-wc-switch.d.ts} +11 -11
- package/{eds-toggle/eds-wc-toggle.d.ts.map → eds-switch/eds-wc-switch.d.ts.map} +1 -1
- package/{eds-toggle/eds-wc-toggle.js → eds-switch/eds-wc-switch.js} +39 -39
- package/{eds-toggle/eds-wc-toggle.js.map → eds-switch/eds-wc-switch.js.map} +1 -1
- package/eds-switch/index.d.ts +2 -0
- package/eds-switch/index.d.ts.map +1 -0
- package/eds-switch/index.js +2 -0
- package/eds-switch/index.js.map +1 -0
- package/eds-table/eds-wc-table.js +1 -1
- package/eds-tabs/eds-wc-tabs.d.ts.map +1 -1
- package/eds-tabs/eds-wc-tabs.js +2 -1
- package/eds-tabs/eds-wc-tabs.js.map +1 -1
- package/eds-tag/eds-wc-tag.d.ts +45 -16
- package/eds-tag/eds-wc-tag.d.ts.map +1 -1
- package/eds-tag/eds-wc-tag.js +196 -72
- package/eds-tag/eds-wc-tag.js.map +1 -1
- package/eds-tag/index.d.ts +2 -1
- package/eds-tag/index.d.ts.map +1 -1
- package/eds-tag/index.js +1 -1
- package/eds-tag/index.js.map +1 -1
- package/eds-textarea/eds-wc-textarea.js +1 -1
- package/eds-timeline/eds-wc-timeline.js +2 -2
- package/eds-timepicker/eds-wc-timepicker.js +1 -1
- package/{eds-growl/eds-wc-growl.d.ts → eds-toast/eds-wc-toast.d.ts} +18 -18
- package/{eds-growl/eds-wc-growl.d.ts.map → eds-toast/eds-wc-toast.d.ts.map} +1 -1
- package/{eds-growl/eds-wc-growl.js → eds-toast/eds-wc-toast.js} +17 -17
- package/{eds-growl/eds-wc-growl.js.map → eds-toast/eds-wc-toast.js.map} +1 -1
- package/eds-toast/index.d.ts +3 -0
- package/eds-toast/index.d.ts.map +1 -0
- package/eds-toast/index.js +2 -0
- package/eds-toast/index.js.map +1 -0
- package/eds-user-profile/eds-wc-user-profile.d.ts +146 -0
- package/eds-user-profile/eds-wc-user-profile.d.ts.map +1 -0
- package/eds-user-profile/eds-wc-user-profile.js +564 -0
- package/eds-user-profile/eds-wc-user-profile.js.map +1 -0
- package/eds-user-profile/index.d.ts +2 -0
- package/eds-user-profile/index.d.ts.map +1 -0
- package/eds-user-profile/index.js +2 -0
- package/eds-user-profile/index.js.map +1 -0
- package/eds-wizard/eds-wc-wizard.js +1 -1
- package/index.d.ts +46 -12
- package/index.d.ts.map +1 -1
- package/index.js +31 -9
- package/index.js.map +1 -1
- package/package.json +79 -19
- package/eds-button-group/eds-wc-button-group.d.ts +0 -62
- package/eds-button-group/eds-wc-button-group.d.ts.map +0 -1
- package/eds-button-group/eds-wc-button-group.js.map +0 -1
- package/eds-button-group/index.d.ts +0 -2
- package/eds-button-group/index.d.ts.map +0 -1
- package/eds-button-group/index.js +0 -2
- package/eds-button-group/index.js.map +0 -1
- package/eds-growl/index.d.ts +0 -3
- package/eds-growl/index.d.ts.map +0 -1
- package/eds-growl/index.js +0 -2
- package/eds-growl/index.js.map +0 -1
- package/eds-input-checkbox/eds-wc-input-checkbox.d.ts.map +0 -1
- package/eds-input-checkbox/eds-wc-input-checkbox.js.map +0 -1
- package/eds-input-checkbox/index.d.ts +0 -2
- package/eds-input-checkbox/index.d.ts.map +0 -1
- package/eds-input-checkbox/index.js +0 -2
- package/eds-input-checkbox/index.js.map +0 -1
- package/eds-input-radio/eds-wc-input-radio.d.ts.map +0 -1
- package/eds-input-radio/eds-wc-input-radio.js.map +0 -1
- package/eds-input-radio/index.d.ts +0 -2
- package/eds-input-radio/index.d.ts.map +0 -1
- package/eds-input-radio/index.js +0 -2
- package/eds-input-radio/index.js.map +0 -1
- package/eds-paginator/eds-wc-paginator.d.ts.map +0 -1
- package/eds-paginator/eds-wc-paginator.js.map +0 -1
- package/eds-paginator/index.d.ts +0 -3
- package/eds-paginator/index.d.ts.map +0 -1
- package/eds-paginator/index.js +0 -2
- package/eds-paginator/index.js.map +0 -1
- package/eds-toggle/index.d.ts +0 -2
- package/eds-toggle/index.d.ts.map +0 -1
- package/eds-toggle/index.js +0 -2
- package/eds-toggle/index.js.map +0 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, css } from 'lit';
|
|
8
|
+
import { customElement, property, state, query } from 'lit/decorators.js';
|
|
9
|
+
import { EdsBaseElement } from '../shared/eds-base.js';
|
|
10
|
+
import '../eds-input-button/eds-wc-input-button.js';
|
|
11
|
+
import '../eds-input-text/eds-wc-input-text.js';
|
|
12
|
+
import '../eds-icon-button/eds-wc-icon-button.js';
|
|
13
|
+
/**
|
|
14
|
+
* `<eds-wc-input-password>` — EDS Password Input Web Component.
|
|
15
|
+
*
|
|
16
|
+
* A composite password field: an `<eds-wc-input-button>` wrapping an `<eds-wc-input-text>` (default
|
|
17
|
+
* slot) and a trailing `<eds-wc-icon-button>` toggle (`slot="button"`) that switches the field
|
|
18
|
+
* between `type="password"` (masked) and `type="text"` (plain). The toggle flips its icon between
|
|
19
|
+
* `eye` (currently hidden) and `eye-slash` (currently shown), carries `aria-pressed` (`true` when
|
|
20
|
+
* the value is visible), and swaps its `aria-label` between `showLabel` and `hideLabel`. Because the
|
|
21
|
+
* toggle is an `eds-wc-icon-button` living in the input-button's `button` slot, it participates in
|
|
22
|
+
* the input-button's roving-tabindex focus model and receives the inset, critical-aware focus ring.
|
|
23
|
+
*
|
|
24
|
+
* 1:1 projection of the Angular `eds-input-password` component. Like the Angular source it is a form
|
|
25
|
+
* control: it participates in the surrounding `<form>` via `ElementInternals` (form-associated
|
|
26
|
+
* custom element) and also dispatches `input` / `change` events. The visibility toggle state is
|
|
27
|
+
* internal.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```html
|
|
31
|
+
* <eds-wc-input-password placeholder="Enter your password"></eds-wc-input-password>
|
|
32
|
+
* <eds-wc-input-password invalid></eds-wc-input-password>
|
|
33
|
+
* <eds-wc-input-password disabled></eds-wc-input-password>
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @fires input - Dispatched on every keystroke as the value changes. `detail: { value: string }`
|
|
37
|
+
* @fires change - Dispatched when the value is committed (native change). `detail: { value: string }`
|
|
38
|
+
*
|
|
39
|
+
* @csspart input - The internal `<eds-wc-input-text>` field
|
|
40
|
+
* @csspart toggle - The trailing visibility toggle `<eds-wc-icon-button>`
|
|
41
|
+
*/
|
|
42
|
+
let EdsWcInputPassword = class EdsWcInputPassword extends EdsBaseElement {
|
|
43
|
+
constructor() {
|
|
44
|
+
super(...arguments);
|
|
45
|
+
this._internals = this.attachInternals();
|
|
46
|
+
/**
|
|
47
|
+
* Data attribute value for end-to-end testing identification.
|
|
48
|
+
* @default 'eds-input-password'
|
|
49
|
+
*/
|
|
50
|
+
this.e2eAttr = 'eds-input-password';
|
|
51
|
+
/**
|
|
52
|
+
* Current value of the password field.
|
|
53
|
+
* @default ''
|
|
54
|
+
*/
|
|
55
|
+
this.value = '';
|
|
56
|
+
/**
|
|
57
|
+
* Placeholder text shown in the input when empty.
|
|
58
|
+
* @default ''
|
|
59
|
+
*/
|
|
60
|
+
this.placeholder = '';
|
|
61
|
+
/**
|
|
62
|
+
* Controls whether the input is disabled. Reflected as the `disabled` host attribute.
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
this.disabled = false;
|
|
66
|
+
/**
|
|
67
|
+
* Controls whether the input is readonly. Reflected as the `readonly` host attribute.
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
this.readonly = false;
|
|
71
|
+
/**
|
|
72
|
+
* Controls whether the input shows an invalid/error state. Reflected as the `invalid` host
|
|
73
|
+
* attribute (String-Props model).
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
this.invalid = false;
|
|
77
|
+
/**
|
|
78
|
+
* Accessible label for the visibility toggle button when the password is hidden (pressing it
|
|
79
|
+
* will show the password).
|
|
80
|
+
* @default 'Show password'
|
|
81
|
+
*/
|
|
82
|
+
this.showLabel = 'Show password';
|
|
83
|
+
/**
|
|
84
|
+
* Accessible label for the visibility toggle button when the password is shown (pressing it
|
|
85
|
+
* will hide the password).
|
|
86
|
+
* @default 'Hide password'
|
|
87
|
+
*/
|
|
88
|
+
this.hideLabel = 'Hide password';
|
|
89
|
+
/**
|
|
90
|
+
* Whether the password value is currently visible (`true` → `text`, `false` → `password`).
|
|
91
|
+
* Internal toggle state.
|
|
92
|
+
*/
|
|
93
|
+
this._visible = false;
|
|
94
|
+
}
|
|
95
|
+
/** Form-associated custom element — participates in the surrounding `<form>`. */
|
|
96
|
+
static { this.formAssociated = true; }
|
|
97
|
+
/** Resolved input `type` derived from the visibility state. */
|
|
98
|
+
get _inputType() {
|
|
99
|
+
return this._visible ? 'text' : 'password';
|
|
100
|
+
}
|
|
101
|
+
/** Icon shown on the toggle button, derived from the visibility state. */
|
|
102
|
+
get _toggleIcon() {
|
|
103
|
+
return this._visible ? 'eye-slash' : 'eye';
|
|
104
|
+
}
|
|
105
|
+
/** Accessible label for the toggle button, derived from the visibility state. */
|
|
106
|
+
get _toggleLabel() {
|
|
107
|
+
return this._visible ? this.hideLabel : this.showLabel;
|
|
108
|
+
}
|
|
109
|
+
static { this.styles = css `
|
|
110
|
+
:host, *, *::before, *::after {
|
|
111
|
+
box-sizing: border-box;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host {
|
|
115
|
+
display: block;
|
|
116
|
+
width: 100%;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* The composed input-button fills the available width. */
|
|
120
|
+
eds-wc-input-button {
|
|
121
|
+
width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* The trailing toggle is an eds-wc-icon-button, which eds-wc-input-button does NOT style
|
|
125
|
+
(it only joins borders on the generic button slot). Give it the same bordered, divided
|
|
126
|
+
treatment as a text button sitting at the end of the field. */
|
|
127
|
+
eds-wc-icon-button {
|
|
128
|
+
border: var(--eds-bw-xs) solid var(--eds-c-border-neutral);
|
|
129
|
+
border-left: none;
|
|
130
|
+
border-top-left-radius: 0;
|
|
131
|
+
border-bottom-left-radius: 0;
|
|
132
|
+
border-top-right-radius: var(--eds-br-s);
|
|
133
|
+
border-bottom-right-radius: var(--eds-br-s);
|
|
134
|
+
background-color: var(--eds-c-surface-elevation);
|
|
135
|
+
position: relative;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
eds-wc-icon-button::before {
|
|
139
|
+
background-color: var(--eds-c-border-divider);
|
|
140
|
+
content: "";
|
|
141
|
+
display: block;
|
|
142
|
+
height: 1.75rem;
|
|
143
|
+
left: -1px;
|
|
144
|
+
position: absolute;
|
|
145
|
+
top: var(--eds-sp-2xs);
|
|
146
|
+
width: 1px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* The masked "dot" glyph renders at 1rem — mirrors the Angular SCSS
|
|
150
|
+
\`::ng-deep input[type="password"] { font-size: var(--eds-f-s-m); }\`. Scoped to the
|
|
151
|
+
masked input only (type="password"); the composed input lives in eds-wc-input-text's
|
|
152
|
+
shadow root, so expose it as a CSS custom property the sibling consumes.
|
|
153
|
+
LIMITATION: Shadow-DOM encapsulation prevents reaching the slotted input's internal
|
|
154
|
+
\`input\` element directly; eds-wc-input-text's own styles apply this when masked. */
|
|
155
|
+
eds-wc-input-text {
|
|
156
|
+
--_eds-input-password-masked-font-size: var(--eds-f-s-m);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Disabled — mirror the eds-input mixin's disabled visuals on the toggle so both halves of
|
|
160
|
+
the field match. */
|
|
161
|
+
:host([disabled]) eds-wc-icon-button {
|
|
162
|
+
background-color: var(--eds-c-surface-disabled);
|
|
163
|
+
border-color: var(--eds-c-border-disabled);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Readonly — the input becomes borderless/transparent; match the toggle and drop its
|
|
167
|
+
divider so the field reads as static text. */
|
|
168
|
+
:host([readonly]) eds-wc-icon-button {
|
|
169
|
+
background-color: transparent;
|
|
170
|
+
border-color: transparent;
|
|
171
|
+
}
|
|
172
|
+
:host([readonly]) eds-wc-icon-button::before {
|
|
173
|
+
display: none;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Invalid state — reflected as the \`invalid\` host attribute. The composed input-text and
|
|
177
|
+
the toggle both carry the critical border. */
|
|
178
|
+
:host([invalid]) eds-wc-input-text,
|
|
179
|
+
:host([invalid]) eds-wc-icon-button {
|
|
180
|
+
border-color: var(--eds-c-border-critical);
|
|
181
|
+
}
|
|
182
|
+
`; }
|
|
183
|
+
render() {
|
|
184
|
+
return html `
|
|
185
|
+
<eds-wc-input-button
|
|
186
|
+
?invalid="${this.invalid}"
|
|
187
|
+
position="end">
|
|
188
|
+
<eds-wc-input-text
|
|
189
|
+
part="input"
|
|
190
|
+
type="${this._inputType}"
|
|
191
|
+
.value="${this.value}"
|
|
192
|
+
placeholder="${this.placeholder}"
|
|
193
|
+
?disabled="${this.disabled}"
|
|
194
|
+
?readonly="${this.readonly}"
|
|
195
|
+
?invalid="${this.invalid}"
|
|
196
|
+
@input="${this._onInput}"
|
|
197
|
+
@change="${this._onChange}"></eds-wc-input-text>
|
|
198
|
+
<eds-wc-icon-button
|
|
199
|
+
slot="button"
|
|
200
|
+
part="toggle"
|
|
201
|
+
color="neutral"
|
|
202
|
+
icon="${this._toggleIcon}"
|
|
203
|
+
aria-label="${this._toggleLabel}"
|
|
204
|
+
aria-pressed="${this._visible}"
|
|
205
|
+
?disabled="${this.disabled}"
|
|
206
|
+
@button-click="${this._toggleVisibility}"></eds-wc-icon-button>
|
|
207
|
+
</eds-wc-input-button>
|
|
208
|
+
`;
|
|
209
|
+
}
|
|
210
|
+
connectedCallback() {
|
|
211
|
+
super.connectedCallback();
|
|
212
|
+
this._syncFormValue();
|
|
213
|
+
}
|
|
214
|
+
/** Toggles the password visibility. No-op when disabled or readonly. */
|
|
215
|
+
_toggleVisibility() {
|
|
216
|
+
if (this.disabled || this.readonly) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this._visible = !this._visible;
|
|
220
|
+
}
|
|
221
|
+
/** Handles input from the composed text field. */
|
|
222
|
+
_onInput(event) {
|
|
223
|
+
const target = event.target;
|
|
224
|
+
this.value = target.value ?? '';
|
|
225
|
+
this._syncFormValue();
|
|
226
|
+
this.dispatchEvent(new CustomEvent('input', {
|
|
227
|
+
bubbles: true,
|
|
228
|
+
composed: true,
|
|
229
|
+
detail: { value: this.value },
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
232
|
+
/** Re-emits the composed field's native change event. */
|
|
233
|
+
_onChange() {
|
|
234
|
+
this.dispatchEvent(new CustomEvent('change', {
|
|
235
|
+
bubbles: true,
|
|
236
|
+
composed: true,
|
|
237
|
+
detail: { value: this.value },
|
|
238
|
+
}));
|
|
239
|
+
}
|
|
240
|
+
/** Bridges the shadow-DOM value + validity to the surrounding form. */
|
|
241
|
+
_syncFormValue() {
|
|
242
|
+
this._internals.setFormValue(this.value);
|
|
243
|
+
this._internals.setValidity(this.invalid ? { customError: true } : {}, this.invalid ? 'Invalid value' : undefined, this._inputText);
|
|
244
|
+
}
|
|
245
|
+
/** Reset the value when the surrounding form is reset. */
|
|
246
|
+
formResetCallback() {
|
|
247
|
+
this.value = '';
|
|
248
|
+
this._visible = false;
|
|
249
|
+
this._syncFormValue();
|
|
250
|
+
}
|
|
251
|
+
/** Mirror the form's disabled state (fieldset[disabled], etc.). */
|
|
252
|
+
formDisabledCallback(disabled) {
|
|
253
|
+
this.disabled = disabled;
|
|
254
|
+
}
|
|
255
|
+
updated(changed) {
|
|
256
|
+
if (changed.has('value') || changed.has('invalid')) {
|
|
257
|
+
this._syncFormValue();
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
__decorate([
|
|
262
|
+
property({ type: String, attribute: 'data-e2e', reflect: true })
|
|
263
|
+
], EdsWcInputPassword.prototype, "e2eAttr", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
property({ type: String })
|
|
266
|
+
], EdsWcInputPassword.prototype, "value", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
property({ type: String })
|
|
269
|
+
], EdsWcInputPassword.prototype, "placeholder", void 0);
|
|
270
|
+
__decorate([
|
|
271
|
+
property({ type: Boolean, reflect: true })
|
|
272
|
+
], EdsWcInputPassword.prototype, "disabled", void 0);
|
|
273
|
+
__decorate([
|
|
274
|
+
property({ type: Boolean, reflect: true })
|
|
275
|
+
], EdsWcInputPassword.prototype, "readonly", void 0);
|
|
276
|
+
__decorate([
|
|
277
|
+
property({ type: Boolean, reflect: true })
|
|
278
|
+
], EdsWcInputPassword.prototype, "invalid", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
property({ type: String, attribute: 'show-label' })
|
|
281
|
+
], EdsWcInputPassword.prototype, "showLabel", void 0);
|
|
282
|
+
__decorate([
|
|
283
|
+
property({ type: String, attribute: 'hide-label' })
|
|
284
|
+
], EdsWcInputPassword.prototype, "hideLabel", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
state()
|
|
287
|
+
], EdsWcInputPassword.prototype, "_visible", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
query('eds-wc-input-text')
|
|
290
|
+
], EdsWcInputPassword.prototype, "_inputText", void 0);
|
|
291
|
+
EdsWcInputPassword = __decorate([
|
|
292
|
+
customElement('eds-wc-input-password')
|
|
293
|
+
], EdsWcInputPassword);
|
|
294
|
+
export { EdsWcInputPassword };
|
|
295
|
+
//# sourceMappingURL=eds-wc-input-password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eds-wc-input-password.js","sourceRoot":"","sources":["../../src/eds-input-password/eds-wc-input-password.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE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,MAAM,EAAE,CAAC;uDACV;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAC1B;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAC1B;AAQjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;mDAC3B;AAQhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;qDACxB;AAQ5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;qDACxB;AAOpB;IADP,KAAK,EAAE;oDACiB;AAGjB;IADP,KAAK,CAAC,mBAAmB,CAAC;sDAC0B;AAzE5C,kBAAkB;IAD9B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,kBAAkB,CA8P9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eds-input-password/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eds-input-password/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { EdsBaseElement } from '../shared/eds-base.js';
|
|
2
|
+
/** Size variants supported by the EDS text input (mirrors `EdsInputTextSize`). */
|
|
3
|
+
export type EdsWcInputTextSize = 's' | 'm' | 'l';
|
|
2
4
|
/**
|
|
3
5
|
* `<eds-wc-input-text>` — EDS Text Input Web Component.
|
|
4
6
|
*
|
|
@@ -37,6 +39,8 @@ export declare class EdsWcInputText extends EdsBaseElement {
|
|
|
37
39
|
clearable: boolean;
|
|
38
40
|
/** Show a loading spinner inside the input. */
|
|
39
41
|
loading: boolean;
|
|
42
|
+
/** Size variant — reflected as the `size` host attribute. */
|
|
43
|
+
size: EdsWcInputTextSize;
|
|
40
44
|
/** Accessible label (when no visible label element). */
|
|
41
45
|
ariaLabel: string | null;
|
|
42
46
|
private _input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eds-wc-input-text.d.ts","sourceRoot":"","sources":["../../src/eds-input-text/eds-wc-input-text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBACa,cAAe,SAAQ,cAAc;IAC9C,qBAAqB;IAErB,KAAK,SAAM;IAEX,wBAAwB;IAExB,WAAW,SAAM;IAEjB,wDAAwD;IAExD,IAAI,SAAU;IAEd,sBAAsB;IAEtB,QAAQ,UAAS;IAEjB,sBAAsB;IAEtB,QAAQ,UAAS;IAEjB,2BAA2B;IAE3B,OAAO,UAAS;IAEhB,kDAAkD;IAElD,SAAS,UAAS;IAElB,+CAA+C;IAE/C,OAAO,UAAS;IAEhB,wDAAwD;IAE/C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGzC,OAAO,CAAC,MAAM,CAAoB;IAElC,sDAAsD;IACtD,IAAI,YAAY,IAAI,gBAAgB,CAEnC;IAED,OAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"eds-wc-input-text.d.ts","sourceRoot":"","sources":["../../src/eds-input-text/eds-wc-input-text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,kFAAkF;AAClF,MAAM,MAAM,kBAAkB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBACa,cAAe,SAAQ,cAAc;IAC9C,qBAAqB;IAErB,KAAK,SAAM;IAEX,wBAAwB;IAExB,WAAW,SAAM;IAEjB,wDAAwD;IAExD,IAAI,SAAU;IAEd,sBAAsB;IAEtB,QAAQ,UAAS;IAEjB,sBAAsB;IAEtB,QAAQ,UAAS;IAEjB,2BAA2B;IAE3B,OAAO,UAAS;IAEhB,kDAAkD;IAElD,SAAS,UAAS;IAElB,+CAA+C;IAE/C,OAAO,UAAS;IAEhB,6DAA6D;IAE7D,IAAI,EAAE,kBAAkB,CAAO;IAE/B,wDAAwD;IAE/C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGzC,OAAO,CAAC,MAAM,CAAoB;IAElC,sDAAsD;IACtD,IAAI,YAAY,IAAI,gBAAgB,CAEnC;IAED,OAAgB,MAAM,0BAkJpB;cAEiB,MAAM;IA6BzB,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,QAAQ;CAOnB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,mBAAmB,EAAE,cAAc,CAAC;KACvC;CACJ"}
|
|
@@ -47,6 +47,8 @@ let EdsWcInputText = class EdsWcInputText extends EdsBaseElement {
|
|
|
47
47
|
this.clearable = false;
|
|
48
48
|
/** Show a loading spinner inside the input. */
|
|
49
49
|
this.loading = false;
|
|
50
|
+
/** Size variant — reflected as the `size` host attribute. */
|
|
51
|
+
this.size = 'm';
|
|
50
52
|
/** Accessible label (when no visible label element). */
|
|
51
53
|
this.ariaLabel = null;
|
|
52
54
|
}
|
|
@@ -60,16 +62,42 @@ let EdsWcInputText = class EdsWcInputText extends EdsBaseElement {
|
|
|
60
62
|
position: relative;
|
|
61
63
|
}
|
|
62
64
|
|
|
65
|
+
:host {
|
|
66
|
+
/* Size-driven privates (defaults = m) */
|
|
67
|
+
--_eds-input-text-min-height: var(--eds-si-4xl);
|
|
68
|
+
--_eds-input-text-pad-v: var(--eds-sp-xs);
|
|
69
|
+
--_eds-input-text-pad-h: var(--eds-sp-s);
|
|
70
|
+
--_eds-input-text-font: var(--eds-f-paragraph-m);
|
|
71
|
+
--_eds-input-text-placeholder-font: var(--eds-f-placeholder-m);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([size="s"]) {
|
|
75
|
+
--_eds-input-text-min-height: var(--eds-si-3xl); /* 32px */
|
|
76
|
+
--_eds-input-text-pad-v: var(--eds-sp-2xs);
|
|
77
|
+
--_eds-input-text-pad-h: var(--eds-sp-s);
|
|
78
|
+
--_eds-input-text-font: var(--eds-f-paragraph-s);
|
|
79
|
+
--_eds-input-text-placeholder-font: var(--eds-f-placeholder-s);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([size="l"]) {
|
|
83
|
+
--_eds-input-text-min-height: var(--eds-si-6xl); /* 48px */
|
|
84
|
+
--_eds-input-text-pad-v: var(--eds-sp-s);
|
|
85
|
+
--_eds-input-text-pad-h: var(--eds-sp-m);
|
|
86
|
+
--_eds-input-text-font: var(--eds-f-paragraph-l);
|
|
87
|
+
/* No --eds-f-placeholder-l token exists; l reuses the m placeholder font. */
|
|
88
|
+
--_eds-input-text-placeholder-font: var(--eds-f-placeholder-m);
|
|
89
|
+
}
|
|
90
|
+
|
|
63
91
|
input {
|
|
64
|
-
font: var(--
|
|
92
|
+
font: var(--_eds-input-text-font);
|
|
65
93
|
appearance: none;
|
|
66
94
|
background-color: var(--eds-c-surface-elevation);
|
|
67
95
|
border: var(--eds-bw-xs) solid var(--eds-c-border-neutral);
|
|
68
96
|
border-radius: var(--eds-br-s);
|
|
69
97
|
box-shadow: none;
|
|
70
98
|
color: var(--eds-c-foreground-default);
|
|
71
|
-
min-height: var(--
|
|
72
|
-
padding: var(--
|
|
99
|
+
min-height: var(--_eds-input-text-min-height);
|
|
100
|
+
padding: var(--_eds-input-text-pad-v) var(--_eds-input-text-pad-h);
|
|
73
101
|
width: 100%;
|
|
74
102
|
box-sizing: border-box;
|
|
75
103
|
outline: none;
|
|
@@ -77,7 +105,8 @@ let EdsWcInputText = class EdsWcInputText extends EdsBaseElement {
|
|
|
77
105
|
}
|
|
78
106
|
|
|
79
107
|
input::placeholder {
|
|
80
|
-
color: var(--eds-c-foreground-
|
|
108
|
+
color: var(--eds-c-foreground-placeholder);
|
|
109
|
+
font: var(--_eds-input-text-placeholder-font);
|
|
81
110
|
opacity: 1;
|
|
82
111
|
}
|
|
83
112
|
|
|
@@ -88,7 +117,7 @@ let EdsWcInputText = class EdsWcInputText extends EdsBaseElement {
|
|
|
88
117
|
|
|
89
118
|
/* Disabled */
|
|
90
119
|
input:disabled {
|
|
91
|
-
background-color: var(--eds-c-
|
|
120
|
+
background-color: var(--eds-c-surface-disabled);
|
|
92
121
|
border-color: var(--eds-c-border-disabled);
|
|
93
122
|
color: var(--eds-c-foreground-subtler);
|
|
94
123
|
pointer-events: none;
|
|
@@ -240,6 +269,9 @@ __decorate([
|
|
|
240
269
|
__decorate([
|
|
241
270
|
property({ type: Boolean, reflect: true })
|
|
242
271
|
], EdsWcInputText.prototype, "loading", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
property({ type: String, reflect: true })
|
|
274
|
+
], EdsWcInputText.prototype, "size", void 0);
|
|
243
275
|
__decorate([
|
|
244
276
|
property({ type: String, attribute: 'aria-label' })
|
|
245
277
|
], EdsWcInputText.prototype, "ariaLabel", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eds-wc-input-text.js","sourceRoot":"","sources":["../../src/eds-input-text/eds-wc-input-text.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"eds-wc-input-text.js","sourceRoot":"","sources":["../../src/eds-input-text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I,EAAE,CAAC,CAAC,CAAC;QAC1E,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;;AA/OD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAChB;AAIX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACV;AAIjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACb;AAId;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAC1B;AAIjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAC1B;AAIjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAC3B;AAIhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDACzB;AAIlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAC3B;AAIhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACX;AAItB;IADR,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;iDACX;AAGjC;IADP,KAAK,CAAC,OAAO,CAAC;8CACmB;AA1CzB,cAAc;IAD1B,aAAa,CAAC,mBAAmB,CAAC;GACtB,cAAc,CAmP1B"}
|
|
@@ -18,6 +18,16 @@ declare const EdsWcLabel_base: (new (...args: any[]) => import("../shared/color-
|
|
|
18
18
|
export declare class EdsWcLabel extends EdsWcLabel_base {
|
|
19
19
|
/** Marks the label as required (appends a red asterisk). */
|
|
20
20
|
required: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* When `required` is set, appends a `(required)` text label instead of the asterisk.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
hasRequiredLabel: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Appends an `(optional)` text label to the label.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
hasOptionalLabel: boolean;
|
|
21
31
|
static styles: import("lit").CSSResult;
|
|
22
32
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
23
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eds-wc-label.d.ts","sourceRoot":"","sources":["../../src/eds-label/eds-wc-label.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;;AAGvD;;;;;;;;;;;;;;GAcG;AACH,qBACa,UAAW,SAAQ,eAA0B;IACtD,4DAA4D;IAE5D,QAAQ,UAAS;IAEjB,OAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"eds-wc-label.d.ts","sourceRoot":"","sources":["../../src/eds-label/eds-wc-label.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;;AAGvD;;;;;;;;;;;;;;GAcG;AACH,qBACa,UAAW,SAAQ,eAA0B;IACtD,4DAA4D;IAE5D,QAAQ,UAAS;IAEjB;;;OAGG;IAEH,gBAAgB,UAAS;IAEzB;;;OAGG;IAEH,gBAAgB,UAAS;IAEzB,OAAgB,MAAM,0BA2BpB;cAEiB,MAAM;CAG5B;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,cAAc,EAAE,UAAU,CAAC;KAC9B;CACJ"}
|
|
@@ -28,11 +28,22 @@ let EdsWcLabel = class EdsWcLabel extends ColorMixin(EdsBaseElement) {
|
|
|
28
28
|
super(...arguments);
|
|
29
29
|
/** Marks the label as required (appends a red asterisk). */
|
|
30
30
|
this.required = false;
|
|
31
|
+
/**
|
|
32
|
+
* When `required` is set, appends a `(required)` text label instead of the asterisk.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
this.hasRequiredLabel = false;
|
|
36
|
+
/**
|
|
37
|
+
* Appends an `(optional)` text label to the label.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
this.hasOptionalLabel = false;
|
|
31
41
|
}
|
|
32
42
|
static { this.styles = css `
|
|
33
43
|
:host {
|
|
34
44
|
display: inline-block;
|
|
35
|
-
font: var(--eds-f-label-m
|
|
45
|
+
font: var(--eds-f-label-m);
|
|
46
|
+
font-weight: var(--eds-f-w-semibold);
|
|
36
47
|
color: var(--eds-c-foreground);
|
|
37
48
|
}
|
|
38
49
|
|
|
@@ -44,6 +55,17 @@ let EdsWcLabel = class EdsWcLabel extends ColorMixin(EdsBaseElement) {
|
|
|
44
55
|
content: ' *';
|
|
45
56
|
color: var(--eds-c-foreground-critical);
|
|
46
57
|
}
|
|
58
|
+
|
|
59
|
+
:host([required][has-required-label])::after {
|
|
60
|
+
content: ' (required)';
|
|
61
|
+
font: var(--eds-f-label-s);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([has-optional-label])::after {
|
|
65
|
+
content: ' (optional)';
|
|
66
|
+
color: var(--eds-c-foreground-subtle);
|
|
67
|
+
font: var(--eds-f-label-s);
|
|
68
|
+
}
|
|
47
69
|
`; }
|
|
48
70
|
render() {
|
|
49
71
|
return html `<slot></slot>`;
|
|
@@ -52,6 +74,12 @@ let EdsWcLabel = class EdsWcLabel extends ColorMixin(EdsBaseElement) {
|
|
|
52
74
|
__decorate([
|
|
53
75
|
property({ type: Boolean, reflect: true })
|
|
54
76
|
], EdsWcLabel.prototype, "required", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
property({ type: Boolean, reflect: true, attribute: 'has-required-label' })
|
|
79
|
+
], EdsWcLabel.prototype, "hasRequiredLabel", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
property({ type: Boolean, reflect: true, attribute: 'has-optional-label' })
|
|
82
|
+
], EdsWcLabel.prototype, "hasOptionalLabel", void 0);
|
|
55
83
|
EdsWcLabel = __decorate([
|
|
56
84
|
customElement('eds-wc-label')
|
|
57
85
|
], EdsWcLabel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eds-wc-label.js","sourceRoot":"","sources":["../../src/eds-label/eds-wc-label.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;;;;;;;;;;;;GAcG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU,CAAC,cAAc,CAAC;IAAnD;;QACH,4DAA4D;QAE5D,aAAQ,GAAG,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"eds-wc-label.js","sourceRoot":"","sources":["../../src/eds-label/eds-wc-label.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD;;;;;;;;;;;;;;GAcG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU,CAAC,cAAc,CAAC;IAAnD;;QACH,4DAA4D;QAE5D,aAAQ,GAAG,KAAK,CAAC;QAEjB;;;WAGG;QAEH,qBAAgB,GAAG,KAAK,CAAC;QAEzB;;;WAGG;QAEH,qBAAgB,GAAG,KAAK,CAAC;IAkC7B,CAAC;aAhCmB,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2B3B,AA3BqB,CA2BpB;IAEiB,MAAM;QACrB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC/B,CAAC;;AA/CD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC1B;AAOjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;oDACnD;AAOzB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;oDACnD;AAjBhB,UAAU;IADtB,aAAa,CAAC,cAAc,CAAC;GACjB,UAAU,CAmDtB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { EdsBaseElement } from '../shared/eds-base.js';
|
|
2
|
+
/**
|
|
3
|
+
* A single selectable language entry.
|
|
4
|
+
* Projected from the Angular `EdsLanguage` interface.
|
|
5
|
+
*/
|
|
6
|
+
export interface EdsLanguage {
|
|
7
|
+
/** Language code (e.g. 'en', 'fr', 'de'). */
|
|
8
|
+
code: string;
|
|
9
|
+
/** Display label (e.g. 'English', 'Français'). */
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Local narrowed color union — the language-selector's color contract.
|
|
14
|
+
* Copied from the Angular `eds-language-selector` `EdsColorDirective` inputs
|
|
15
|
+
* (`edsBrand`/`edsNeutral`); only `brand` alters the visual (see SCSS `--brand` block).
|
|
16
|
+
*/
|
|
17
|
+
export type EdsWcLanguageSelectorColor = 'neutral' | 'brand';
|
|
18
|
+
/**
|
|
19
|
+
* `<eds-wc-language-selector>` — EDS Language Selector Web Component.
|
|
20
|
+
*
|
|
21
|
+
* A trigger button that opens either a dropdown listbox (≤ 3 languages) or a modal
|
|
22
|
+
* dialog with EU / non-EU grid sections (> 3 languages) so the user can switch the
|
|
23
|
+
* active language. 1:1 projection of the Angular `eds-language-selector` (which
|
|
24
|
+
* composes the private `eds-language-selector-dialog` sub-component).
|
|
25
|
+
*
|
|
26
|
+
* The trigger has two layouts: a bordered button showing the current language code
|
|
27
|
+
* with a caret, or a borderless button with a globe icon + code (`has-icon-layout`).
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```html
|
|
31
|
+
* <eds-wc-language-selector
|
|
32
|
+
* .languages="${[{ code: 'en', label: 'English' }, { code: 'fr', label: 'Français' }]}"
|
|
33
|
+
* selected-language="en">
|
|
34
|
+
* </eds-wc-language-selector>
|
|
35
|
+
*
|
|
36
|
+
* <eds-wc-language-selector has-icon-layout color="brand" .languages="${manyLangs}">
|
|
37
|
+
* </eds-wc-language-selector>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @fires language-change - Dispatched when the user picks a language. `detail: { code: string }`
|
|
41
|
+
*/
|
|
42
|
+
export declare class EdsWcLanguageSelector extends EdsBaseElement {
|
|
43
|
+
/** Available languages. */
|
|
44
|
+
languages: EdsLanguage[];
|
|
45
|
+
/** Currently selected language code. */
|
|
46
|
+
selectedLanguage: string;
|
|
47
|
+
/** Accessible label override for the trigger. */
|
|
48
|
+
ariaLabel: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the dropdown aligns to the right edge (opens towards left). Can be set
|
|
51
|
+
* explicitly or computed from the viewport when left unset.
|
|
52
|
+
*/
|
|
53
|
+
isRightAligned: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* When true, the trigger displays a globe icon with the language code in a
|
|
56
|
+
* borderless button layout.
|
|
57
|
+
*/
|
|
58
|
+
hasIconLayout: boolean;
|
|
59
|
+
/** Semantic color of the trigger. Only `brand` alters the default styling. */
|
|
60
|
+
color: EdsWcLanguageSelectorColor;
|
|
61
|
+
/** Dropdown open state. */
|
|
62
|
+
private _open;
|
|
63
|
+
/** Index of the currently focused item in the dropdown. */
|
|
64
|
+
private _focusedIndex;
|
|
65
|
+
/** Internal viewport-based alignment override (only used when `isRightAligned` is unset). */
|
|
66
|
+
private _dropdownAlignRight;
|
|
67
|
+
private _toggleEl;
|
|
68
|
+
private _dialog;
|
|
69
|
+
/** Whether the language list should open in a dialog (more than 3 languages). */
|
|
70
|
+
private get _useDialog();
|
|
71
|
+
/** Resolved alignment: explicit input takes priority, then viewport-based. */
|
|
72
|
+
private get _resolvedAlignRight();
|
|
73
|
+
/** The resolved current language object. */
|
|
74
|
+
private get _currentLanguage();
|
|
75
|
+
/** Computed accessible label. */
|
|
76
|
+
private get _computedAriaLabel();
|
|
77
|
+
/** The id of the currently active descendant for aria-activedescendant. */
|
|
78
|
+
private get _activeDescendantId();
|
|
79
|
+
/** EU languages filtered from the provided list. */
|
|
80
|
+
private get _euLanguages();
|
|
81
|
+
/** Non-EU (additional) languages filtered from the provided list. */
|
|
82
|
+
private get _nonEuLanguages();
|
|
83
|
+
connectedCallback(): void;
|
|
84
|
+
disconnectedCallback(): void;
|
|
85
|
+
static styles: import("lit").CSSResult;
|
|
86
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
87
|
+
private _renderDialog;
|
|
88
|
+
private _icon;
|
|
89
|
+
private _toggle;
|
|
90
|
+
private _selectLanguage;
|
|
91
|
+
private _onToggleKeydown;
|
|
92
|
+
private _onDropdownKeydown;
|
|
93
|
+
private _openDropdown;
|
|
94
|
+
private _closeDropdown;
|
|
95
|
+
private _setFocusedIndex;
|
|
96
|
+
private _computeDropdownAlignment;
|
|
97
|
+
private _openDialog;
|
|
98
|
+
private _closeDialog;
|
|
99
|
+
private _onDialogNativeClose;
|
|
100
|
+
private _onDialogBackdropClick;
|
|
101
|
+
private _onDocumentClick;
|
|
102
|
+
}
|
|
103
|
+
declare global {
|
|
104
|
+
interface HTMLElementTagNameMap {
|
|
105
|
+
'eds-wc-language-selector': EdsWcLanguageSelector;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=eds-wc-language-selector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eds-wc-language-selector.d.ts","sourceRoot":"","sources":["../../src/eds-language-selector/eds-wc-language-selector.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,OAAO,CAAC;AAe7D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBACa,qBAAsB,SAAQ,cAAc;IACrD,2BAA2B;IAE3B,SAAS,EAAE,WAAW,EAAE,CAAM;IAE9B,wCAAwC;IAExC,gBAAgB,SAAQ;IAExB,iDAAiD;IAExC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAM;IAEvC;;;OAGG;IAEH,cAAc,UAAS;IAEvB;;;OAGG;IAEH,aAAa,UAAS;IAEtB,8EAA8E;IAE9E,KAAK,EAAE,0BAA0B,CAAa;IAE9C,2BAA2B;IAClB,OAAO,CAAC,KAAK,CAAS;IAE/B,2DAA2D;IAClD,OAAO,CAAC,aAAa,CAAM;IAEpC,6FAA6F;IACpF,OAAO,CAAC,mBAAmB,CAAS;IAElB,OAAO,CAAC,SAAS,CAAqB;IAChD,OAAO,CAAC,OAAO,CAAqB;IAErD,iFAAiF;IACjF,OAAO,KAAK,UAAU,GAErB;IAED,8EAA8E;IAC9E,OAAO,KAAK,mBAAmB,GAE9B;IAED,4CAA4C;IAC5C,OAAO,KAAK,gBAAgB,GAO3B;IAED,iCAAiC;IACjC,OAAO,KAAK,kBAAkB,GAG7B;IAED,2EAA2E;IAC3E,OAAO,KAAK,mBAAmB,GAO9B;IAED,oDAAoD;IACpD,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