@eunomia/elements 1.0.0-beta.6 → 1.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cdn/components/chunks/{chunk-KDN4O5W2.js → chunk-32L2QYWQ.js} +5 -5
- package/dist/cdn/components/chunks/{chunk-JYIIWN2P.js → chunk-36KLGY6U.js} +8 -8
- package/dist/cdn/components/chunks/chunk-3BMACIDO.js +1 -0
- package/dist/cdn/components/chunks/{chunk-2Y2EU2CI.js → chunk-3UUZM7X2.js} +1 -1
- package/dist/cdn/components/chunks/chunk-55PUDL7D.js +109 -0
- package/dist/cdn/components/chunks/chunk-5LA5DQMP.js +1 -0
- package/dist/cdn/components/chunks/chunk-5LXGJVJR.js +1 -0
- package/dist/cdn/components/chunks/{chunk-ZKZV2YG5.js → chunk-5XPOGBPL.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-LMVW522V.js → chunk-62RLISRD.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-PMPSJG5V.js → chunk-6FYW5TQU.js} +3 -3
- package/dist/cdn/components/chunks/chunk-6TIEBY34.js +1 -0
- package/dist/cdn/components/chunks/{chunk-MOMYII3P.js → chunk-AH2SKZ7T.js} +14 -1
- package/dist/cdn/components/chunks/chunk-AK2DIJX7.js +1 -0
- package/dist/cdn/components/chunks/chunk-B5XMGWM7.js +10 -0
- package/dist/cdn/components/chunks/chunk-GVS6IUKC.js +1 -0
- package/dist/cdn/components/chunks/chunk-GWLD2I3P.js +8 -0
- package/dist/cdn/components/chunks/{chunk-UDVB4LAE.js → chunk-I4ERDXSM.js} +5 -3
- package/dist/cdn/components/chunks/{chunk-QZ5SHR3I.js → chunk-J3SZBXM6.js} +2 -2
- package/dist/cdn/components/chunks/chunk-JAGZL7JH.js +1 -0
- package/dist/cdn/components/chunks/{chunk-VYFR364B.js → chunk-LD35BFNK.js} +18 -17
- package/dist/cdn/components/chunks/{chunk-XDPRWUKN.js → chunk-MQQJ6DID.js} +1 -1
- package/dist/cdn/components/chunks/chunk-P6LGU3FT.js +1 -0
- package/dist/cdn/components/chunks/chunk-QL5GSW2A.js +1 -0
- package/dist/cdn/components/chunks/{chunk-UYZR4JXZ.js → chunk-QSZO4GIH.js} +45 -9
- package/dist/cdn/components/chunks/{chunk-7KKWYPHY.js → chunk-QXQ25SQS.js} +21 -19
- package/dist/cdn/components/chunks/{chunk-SZYEBMG6.js → chunk-QYB6Z6FG.js} +5 -5
- package/dist/cdn/components/chunks/{chunk-RIFF2D2F.js → chunk-RGC3I6MK.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-L2ADCEN7.js → chunk-SVGWCKWT.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-N6ZW5CDN.js → chunk-TCSB2MLU.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-MQQ4BGVJ.js → chunk-TFTRCIIK.js} +7 -6
- package/dist/cdn/components/chunks/chunk-TLBXTBMM.js +46 -0
- package/dist/cdn/components/chunks/chunk-UVHVQRPT.js +1 -0
- package/dist/cdn/components/chunks/chunk-WIUERJII.js +1 -0
- package/dist/cdn/components/chunks/chunk-WW4BTWMH.js +1 -0
- package/dist/cdn/components/eun-alert.js +13 -6
- package/dist/cdn/components/eun-animate.js +6 -6
- package/dist/cdn/components/eun-badge.js +1 -1
- package/dist/cdn/components/eun-button.js +1 -1
- package/dist/cdn/components/eun-calendar.js +2 -2
- package/dist/cdn/components/eun-card.js +4 -4
- package/dist/cdn/components/eun-carousel.js +26 -22
- package/dist/cdn/components/eun-check-card.js +1 -1
- package/dist/cdn/components/eun-checkbox-list.js +11 -8
- package/dist/cdn/components/eun-checkbox.js +1 -1
- package/dist/cdn/components/eun-chip.js +17 -11
- package/dist/cdn/components/eun-collapse.js +1 -1
- package/dist/cdn/components/eun-color-picker.js +74 -69
- package/dist/cdn/components/eun-counter.js +16 -14
- package/dist/cdn/components/eun-date-picker.js +67 -63
- package/dist/cdn/components/eun-description-list.js +2 -2
- package/dist/cdn/components/eun-divider.js +3 -3
- package/dist/cdn/components/eun-drawer.js +21 -22
- package/dist/cdn/components/eun-dropdown-button.js +1 -1
- package/dist/cdn/components/eun-dropdown-item.js +3 -3
- package/dist/cdn/components/eun-fab.js +2 -2
- package/dist/cdn/components/eun-icon.js +1 -1
- package/dist/cdn/components/eun-image-card.js +1 -1
- package/dist/cdn/components/eun-image-carousel.js +10 -10
- package/dist/cdn/components/eun-infinite-list.js +1 -1
- package/dist/cdn/components/eun-input-file.js +21 -21
- package/dist/cdn/components/eun-input-phone.js +16 -12
- package/dist/cdn/components/eun-input.js +1 -1
- package/dist/cdn/components/eun-link.js +59 -13
- package/dist/cdn/components/eun-loader.js +1 -1
- package/dist/cdn/components/eun-modal.js +33 -23
- package/dist/cdn/components/eun-pagination.js +16 -16
- package/dist/cdn/components/eun-password-strength.js +14 -10
- package/dist/cdn/components/eun-radio-card.js +1 -1
- package/dist/cdn/components/eun-radio-list.js +11 -8
- package/dist/cdn/components/eun-radio.js +1 -1
- package/dist/cdn/components/eun-rating.js +276 -0
- package/dist/cdn/components/eun-scheduler-event-editor.js +11 -11
- package/dist/cdn/components/eun-scheduler-event.js +1 -1
- package/dist/cdn/components/eun-scheduler.js +28 -28
- package/dist/cdn/components/eun-search.js +36 -32
- package/dist/cdn/components/eun-select.js +27 -27
- package/dist/cdn/components/eun-sidebar.js +73 -26
- package/dist/cdn/components/eun-skeleton.js +1 -1
- package/dist/cdn/components/eun-slider.js +3 -3
- package/dist/cdn/components/eun-sliding-card.js +1 -1
- package/dist/cdn/components/eun-step.js +5 -4
- package/dist/cdn/components/eun-stepper.js +30 -30
- package/dist/cdn/components/eun-switch.js +1 -1
- package/dist/cdn/components/eun-tab-group.js +4 -4
- package/dist/cdn/components/eun-tab-panel.js +1 -1
- package/dist/cdn/components/eun-tab.js +1 -1
- package/dist/cdn/components/eun-table-action-bar.js +1 -1
- package/dist/cdn/components/eun-table.js +2 -2
- package/dist/cdn/components/eun-tag.js +3 -3
- package/dist/cdn/components/eun-textarea.js +36 -28
- package/dist/cdn/components/eun-time-picker.js +31 -28
- package/dist/cdn/components/eun-toast.js +24 -15
- package/dist/cdn/components/eun-toggle-group.js +75 -37
- package/dist/cdn/components/eun-toggle-item.js +9 -9
- package/dist/cdn/components/eun-toggle.js +2 -2
- package/dist/cdn/components/eun-toolbar.js +22 -22
- package/dist/cdn/components/eun-tooltip.js +6 -6
- package/dist/cdn/styles/eunomia-themes.css +1 -1
- package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
- package/dist/components/action/button/button.d.ts +4 -3
- package/dist/components/action/button/button.js +6 -9
- package/dist/components/action/button/button.styles.js +13 -8
- package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -6
- package/dist/components/action/dropdown-button/dropdown-button.js +16 -13
- package/dist/components/action/dropdown-button/dropdown-item.d.ts +10 -2
- package/dist/components/action/dropdown-button/dropdown-item.js +24 -9
- package/dist/components/action/link/link.d.ts +10 -1
- package/dist/components/action/link/link.js +13 -1
- package/dist/components/action/link/link.styles.js +50 -3
- package/dist/components/action/toggle/toggle-group.d.ts +12 -2
- package/dist/components/action/toggle/toggle-group.js +18 -3
- package/dist/components/action/toggle/toggle-group.styles.js +58 -20
- package/dist/components/action/toggle/toggle-item.js +1 -3
- package/dist/components/action/toggle/toggle-item.styles.js +7 -7
- package/dist/components/action/toggle/toggle.js +1 -1
- package/dist/components/alert/alert/alert.d.ts +9 -7
- package/dist/components/alert/alert/alert.js +11 -14
- package/dist/components/alert/alert/alert.styles.js +9 -2
- package/dist/components/alert/drawer/drawer.d.ts +30 -5
- package/dist/components/alert/drawer/drawer.js +48 -13
- package/dist/components/alert/drawer/drawer.styles.js +7 -7
- package/dist/components/alert/modal/modal.d.ts +35 -10
- package/dist/components/alert/modal/modal.js +55 -28
- package/dist/components/alert/modal/modal.styles.js +17 -6
- package/dist/components/alert/toast/toast.d.ts +7 -5
- package/dist/components/alert/toast/toast.js +12 -15
- package/dist/components/alert/toast/toast.styles.js +18 -9
- package/dist/components/content/badge/badge.js +2 -2
- package/dist/components/content/card/card.js +1 -1
- package/dist/components/content/card/card.styles.js +2 -2
- package/dist/components/content/chip/chip.d.ts +4 -4
- package/dist/components/content/chip/chip.js +11 -10
- package/dist/components/content/chip/chip.styles.js +9 -3
- package/dist/components/content/description-list/description-list.js +3 -3
- package/dist/components/content/icon/icon.d.ts +3 -0
- package/dist/components/content/icon/icon.js +3 -0
- package/dist/components/content/icon/icon.style.d.ts +2 -0
- package/dist/components/content/icon/icon.style.js +4 -0
- package/dist/components/content/image-carousel/image-carousel.d.ts +12 -12
- package/dist/components/content/image-carousel/image-carousel.js +29 -28
- package/dist/components/content/password-strength/password-strength.d.ts +21 -6
- package/dist/components/content/password-strength/password-strength.js +37 -16
- package/dist/components/content/password-strength/password-strength.styles.js +4 -0
- package/dist/components/content/tag/tag.js +2 -2
- package/dist/components/content/tooltip/tooltip.d.ts +16 -9
- package/dist/components/content/tooltip/tooltip.js +31 -15
- package/dist/components/content/tooltip/tooltip.styles.js +1 -1
- package/dist/components/form/checkbox/check-card.d.ts +1 -0
- package/dist/components/form/checkbox/check-card.js +1 -0
- package/dist/components/form/checkbox/checkbox-list.d.ts +17 -0
- package/dist/components/form/checkbox/checkbox-list.js +39 -10
- package/dist/components/form/checkbox/checkbox.d.ts +1 -0
- package/dist/components/form/checkbox/checkbox.js +3 -1
- package/dist/components/form/checkbox/checkbox.styles.js +3 -2
- package/dist/components/form/color-picker/color-picker.d.ts +47 -28
- package/dist/components/form/color-picker/color-picker.js +73 -51
- package/dist/components/form/color-picker/color-picker.styles.js +14 -1
- package/dist/components/form/counter/counter.d.ts +24 -18
- package/dist/components/form/counter/counter.js +61 -61
- package/dist/components/form/counter/counter.styles.js +6 -4
- package/dist/components/form/date-picker/date-picker.d.ts +33 -7
- package/dist/components/form/date-picker/date-picker.js +82 -56
- package/dist/components/form/date-picker/date-picker.styles.js +9 -6
- package/dist/components/form/input/input.d.ts +43 -39
- package/dist/components/form/input/input.js +91 -110
- package/dist/components/form/input-file/input-file.d.ts +26 -13
- package/dist/components/form/input-file/input-file.js +35 -35
- package/dist/components/form/input-file/input-file.styles.js +4 -4
- package/dist/components/form/input-phone/input-phone.d.ts +28 -5
- package/dist/components/form/input-phone/input-phone.js +47 -13
- package/dist/components/form/input-phone/input-phone.styles.js +6 -3
- package/dist/components/form/radio/radio-card.d.ts +1 -0
- package/dist/components/form/radio/radio-card.js +1 -0
- package/dist/components/form/radio/radio-list.d.ts +23 -7
- package/dist/components/form/radio/radio-list.js +47 -22
- package/dist/components/form/radio/radio.d.ts +1 -0
- package/dist/components/form/radio/radio.js +1 -0
- package/dist/components/form/rating/rating.d.ts +349 -0
- package/dist/components/form/rating/rating.js +665 -0
- package/dist/components/form/rating/rating.styles.d.ts +1 -0
- package/dist/components/form/rating/rating.styles.js +213 -0
- package/dist/components/form/search/search.d.ts +72 -18
- package/dist/components/form/search/search.js +135 -72
- package/dist/components/form/search/search.styles.js +2 -0
- package/dist/components/form/select/select.d.ts +29 -10
- package/dist/components/form/select/select.js +65 -41
- package/dist/components/form/shared-styles/field.styles.js +45 -8
- package/dist/components/form/shared-styles/listbox.styles.js +15 -1
- package/dist/components/form/slider/slider.d.ts +7 -8
- package/dist/components/form/slider/slider.js +9 -12
- package/dist/components/form/switch/switch.d.ts +1 -0
- package/dist/components/form/switch/switch.js +1 -0
- package/dist/components/form/textarea/textarea.d.ts +90 -23
- package/dist/components/form/textarea/textarea.js +194 -44
- package/dist/components/form/textarea/textarea.styles.js +3 -0
- package/dist/components/form/time-picker/time-picker-columns.d.ts +2 -2
- package/dist/components/form/time-picker/time-picker-columns.js +8 -8
- package/dist/components/form/time-picker/time-picker.d.ts +30 -9
- package/dist/components/form/time-picker/time-picker.js +66 -40
- package/dist/components/form/time-picker/time-picker.styles.js +7 -5
- package/dist/components/layout/animate/animate.js +3 -2
- package/dist/components/layout/animate/animate.styles.js +2 -2
- package/dist/components/layout/divider/divider.js +1 -1
- package/dist/components/layout/divider/divider.styles.js +1 -1
- package/dist/components/loader/loader/loader.js +2 -2
- package/dist/components/loader/loader/loader.styles.js +14 -12
- package/dist/components/loader/skeleton/skeleton.js +1 -1
- package/dist/components/navigation/carousel/carousel.d.ts +32 -9
- package/dist/components/navigation/carousel/carousel.js +88 -41
- package/dist/components/navigation/carousel/carousel.styles.js +10 -6
- package/dist/components/navigation/pagination/pagination.d.ts +23 -21
- package/dist/components/navigation/pagination/pagination.js +30 -53
- package/dist/components/navigation/sidebar/sidebar.d.ts +113 -65
- package/dist/components/navigation/sidebar/sidebar.js +161 -118
- package/dist/components/navigation/sidebar/sidebar.styles.d.ts +1 -1
- package/dist/components/navigation/sidebar/sidebar.styles.js +74 -24
- package/dist/components/navigation/stepper/step.js +9 -8
- package/dist/components/navigation/stepper/stepper.d.ts +1 -3
- package/dist/components/navigation/stepper/stepper.js +15 -26
- package/dist/components/navigation/tabs/tab-group/tab-group.js +2 -2
- package/dist/components/navigation/tabs/tab-group/tab-group.styles.js +2 -2
- package/dist/components/navigation/toolbar/toolbar.d.ts +23 -13
- package/dist/components/navigation/toolbar/toolbar.js +28 -35
- package/dist/components/navigation/toolbar/toolbar.styles.js +18 -17
- package/dist/events/select.event.d.ts +3 -2
- package/dist/events/select.event.js +2 -1
- package/dist/features/scheduler/calendar/calendar.js +1 -1
- package/dist/features/scheduler/scheduler/scheduler.d.ts +7 -7
- package/dist/features/scheduler/scheduler/scheduler.js +15 -24
- package/dist/features/scheduler/scheduler-event/scheduler-event.js +3 -3
- package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +1 -1
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts +6 -4
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +7 -8
- package/dist/features/table/table/table.js +1 -1
- package/dist/features/table/table-action-bar/table-action-bar.js +2 -2
- package/dist/i18n/en.d.ts +68 -0
- package/dist/i18n/en.js +68 -0
- package/dist/i18n/fr.js +68 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/mixins/button.mixin.d.ts +1 -1
- package/dist/mixins/button.mixin.js +9 -6
- package/dist/mixins/check.mixin.js +11 -10
- package/dist/mixins/dialog-surface.mixin.d.ts +8 -0
- package/dist/mixins/disabled.mixin.d.ts +5 -0
- package/dist/mixins/disabled.mixin.js +21 -1
- package/dist/mixins/editable.mixin.js +28 -5
- package/dist/mixins/field-appearance.mixin.js +3 -2
- package/dist/mixins/field-size.mixin.d.ts +19 -0
- package/dist/mixins/field-size.mixin.js +33 -0
- package/dist/mixins/form.mixin.d.ts +4 -0
- package/dist/mixins/form.mixin.js +87 -13
- package/dist/mixins/localizable.mixin.d.ts +1 -1
- package/dist/mixins/localizable.mixin.js +1 -1
- package/dist/mixins/radio.mixin.js +11 -10
- package/dist/mixins/readonly.mixin.d.ts +2 -1
- package/dist/mixins/readonly.mixin.js +10 -3
- package/dist/mixins/rounded.mixin.d.ts +18 -0
- package/dist/mixins/rounded.mixin.js +32 -0
- package/dist/ssr/alert-ssr.css +187 -0
- package/dist/ssr/badge-ssr.css +67 -0
- package/dist/ssr/breadcrumb-ssr.css +41 -0
- package/dist/ssr/button-ssr.css +5 -5
- package/dist/ssr/card-ssr.css +27 -15
- package/dist/ssr/carousel-ssr.css +247 -0
- package/dist/ssr/checkbox-ssr.css +67 -0
- package/dist/ssr/chip-ssr.css +250 -0
- package/dist/ssr/collapse-ssr.css +180 -0
- package/dist/ssr/field-ssr.css +202 -0
- package/dist/ssr/icon-ssr.css +266 -0
- package/dist/ssr/image-carousel-ssr.css +34 -0
- package/dist/ssr/links-ssr.css +44 -1
- package/dist/ssr/pagination-ssr.css +4 -0
- package/dist/ssr/rating-ssr.css +254 -0
- package/dist/ssr/sidebar-ssr.css +102 -3
- package/dist/ssr/skeleton-ssr.css +63 -0
- package/dist/ssr/tabs-ssr.css +129 -0
- package/dist/ssr/toggle-group-ssr.css +233 -0
- package/dist/ssr/toolbar-ssr.css +81 -2
- package/dist/types/variant.type.d.ts +4 -1
- package/dist/utils/boolean.utils.d.ts +14 -0
- package/dist/utils/boolean.utils.js +20 -0
- package/dist/utils/dropdown-menu.utils.d.ts +1 -1
- package/dist/utils/focusable-elements.utils.d.ts +12 -0
- package/dist/utils/focusable-elements.utils.js +26 -0
- package/dist/utils/implicit-submission.utils.d.ts +18 -0
- package/dist/utils/implicit-submission.utils.js +79 -0
- package/dist/utils/input-modality.utils.d.ts +13 -0
- package/dist/utils/input-modality.utils.js +34 -0
- package/dist/utils/listbox-options.utils.d.ts +11 -0
- package/dist/utils/listbox-options.utils.js +41 -3
- package/dist/utils/theme-generator.utils.d.ts +8 -2
- package/dist/utils/theme-generator.utils.js +30 -9
- package/package.json +26 -7
- package/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
- package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
- package/dist/cdn/components/chunks/chunk-4PI6RDUS.js +0 -1
- package/dist/cdn/components/chunks/chunk-6VK6SHCG.js +0 -1
- package/dist/cdn/components/chunks/chunk-A3X4KD2X.js +0 -1
- package/dist/cdn/components/chunks/chunk-BQFJR2UP.js +0 -110
- package/dist/cdn/components/chunks/chunk-G5SBDQQ3.js +0 -1
- package/dist/cdn/components/chunks/chunk-KSZRQRN4.js +0 -1
- package/dist/cdn/components/chunks/chunk-PE4DAXHQ.js +0 -3
- package/dist/cdn/components/chunks/chunk-RS7TWEMQ.js +0 -1
- package/dist/cdn/components/chunks/chunk-UDOZRIJZ.js +0 -1
- package/dist/cdn/components/chunks/chunk-VOTRXBDS.js +0 -38
|
@@ -10,6 +10,7 @@ import { CloseEvent } from "../../../events/close.event.js";
|
|
|
10
10
|
import { resolveIcon } from "../../../utils/severity-icon.utils.js";
|
|
11
11
|
import { LocalizableMixin } from "../../../mixins/localizable.mixin.js";
|
|
12
12
|
import { chipStyles } from "./chip.styles.js";
|
|
13
|
+
import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
|
|
13
14
|
/**
|
|
14
15
|
* Tag name of the chip component.
|
|
15
16
|
*/
|
|
@@ -74,8 +75,8 @@ const DELETE_ICON_SIZES = {
|
|
|
74
75
|
* @prop {boolean} [rounded=true] - Whether the chip is fully rounded, as a pill
|
|
75
76
|
* @prop {boolean} [removable=true] - Shows the delete button. Clicking it fires the close event without changing the chip's own rendering
|
|
76
77
|
* @prop {boolean} [disabled=false] - Disables the delete button, preventing removal
|
|
77
|
-
* @prop {string} [
|
|
78
|
-
* @attr {string} [
|
|
78
|
+
* @prop {string} [removeLabel] - A prefix combined with the chip's own slotted text to build the delete button's accessible name, such as "Remove Alice Doe", so multiple chips on the same page stay distinguishable to assistive technology. Defaults to the localized string for the current locale (English: "Remove")
|
|
79
|
+
* @attr {string} [remove-label] - A prefix combined with the chip's own slotted text to build the delete button's accessible name. Defaults to the localized string for the current locale (English: "Remove")
|
|
79
80
|
* @prop {string} [locale] - The locale used to resolve the default accessible label of the delete button. Defaults to the runtime's own
|
|
80
81
|
* @cssprop [--chip-background-color] - Sets the background color of the chip, for every appearance, color and severity
|
|
81
82
|
* @cssprop [--chip-border-color] - Sets the border color of the chip, for every appearance, color and severity
|
|
@@ -190,7 +191,7 @@ let EunomiaChip = class EunomiaChip extends LocalizableMixin(LitElement) {
|
|
|
190
191
|
}
|
|
191
192
|
/**
|
|
192
193
|
* Builds the delete button's accessible name : the chip's own slotted
|
|
193
|
-
* text appended to `
|
|
194
|
+
* text appended to `removeLabel` (or its locale-resolved fallback),
|
|
194
195
|
* so multiple chips on the same page stay distinguishable from one
|
|
195
196
|
* another by sound alone. Falls back to that prefix alone when there's
|
|
196
197
|
* no label text yet.
|
|
@@ -198,7 +199,7 @@ let EunomiaChip = class EunomiaChip extends LocalizableMixin(LitElement) {
|
|
|
198
199
|
* @private
|
|
199
200
|
*/
|
|
200
201
|
getRemoveLabel() {
|
|
201
|
-
const removeLabel = this.
|
|
202
|
+
const removeLabel = this.removeLabel ?? this.dictionary.chip.remove;
|
|
202
203
|
return this.labelText ? `${removeLabel} ${this.labelText}` : removeLabel;
|
|
203
204
|
}
|
|
204
205
|
/**
|
|
@@ -330,7 +331,7 @@ let EunomiaChip = class EunomiaChip extends LocalizableMixin(LitElement) {
|
|
|
330
331
|
*/
|
|
331
332
|
EunomiaChip.styles = chipStyles;
|
|
332
333
|
__decorate([
|
|
333
|
-
property({ reflect: true })
|
|
334
|
+
property({ reflect: true, useDefault: true })
|
|
334
335
|
], EunomiaChip.prototype, "color", void 0);
|
|
335
336
|
__decorate([
|
|
336
337
|
property({ type: Boolean, reflect: true, attribute: "fixed-color" })
|
|
@@ -339,7 +340,7 @@ __decorate([
|
|
|
339
340
|
property({ reflect: true })
|
|
340
341
|
], EunomiaChip.prototype, "severity", void 0);
|
|
341
342
|
__decorate([
|
|
342
|
-
property({ reflect: true })
|
|
343
|
+
property({ reflect: true, useDefault: true })
|
|
343
344
|
], EunomiaChip.prototype, "appearance", void 0);
|
|
344
345
|
__decorate([
|
|
345
346
|
property({ reflect: true })
|
|
@@ -363,17 +364,17 @@ __decorate([
|
|
|
363
364
|
property({ attribute: "avatar-initials" })
|
|
364
365
|
], EunomiaChip.prototype, "avatarInitials", void 0);
|
|
365
366
|
__decorate([
|
|
366
|
-
property({
|
|
367
|
+
property({ converter: defaultTrueConverter, reflect: true })
|
|
367
368
|
], EunomiaChip.prototype, "rounded", void 0);
|
|
368
369
|
__decorate([
|
|
369
|
-
property({
|
|
370
|
+
property({ converter: defaultTrueConverter, reflect: true })
|
|
370
371
|
], EunomiaChip.prototype, "removable", void 0);
|
|
371
372
|
__decorate([
|
|
372
373
|
property({ type: Boolean, reflect: true })
|
|
373
374
|
], EunomiaChip.prototype, "disabled", void 0);
|
|
374
375
|
__decorate([
|
|
375
|
-
property({ attribute: "
|
|
376
|
-
], EunomiaChip.prototype, "
|
|
376
|
+
property({ attribute: "remove-label" })
|
|
377
|
+
], EunomiaChip.prototype, "removeLabel", void 0);
|
|
377
378
|
__decorate([
|
|
378
379
|
state()
|
|
379
380
|
], EunomiaChip.prototype, "labelText", void 0);
|
|
@@ -65,7 +65,7 @@ const base = css `
|
|
|
65
65
|
:host {
|
|
66
66
|
--_radius: var(--eun-border-radius-s, 5px);
|
|
67
67
|
}
|
|
68
|
-
:host([rounded]) {
|
|
68
|
+
:host([rounded]:not([rounded="false"])) {
|
|
69
69
|
--_radius: var(--eun-border-radius-xl, 999px);
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -82,8 +82,14 @@ const base = css `
|
|
|
82
82
|
--chip-border-* never changes the chip's size. */
|
|
83
83
|
border: var(--_borderWidth) solid var(--chip-border-color, var(--_bd));
|
|
84
84
|
border-radius: var(--chip-border-radius, var(--_radius));
|
|
85
|
-
padding-inline-start: max(
|
|
86
|
-
|
|
85
|
+
padding-inline-start: max(
|
|
86
|
+
0px,
|
|
87
|
+
calc(var(--_paddingInline) - var(--_borderWidth))
|
|
88
|
+
);
|
|
89
|
+
padding-inline-end: max(
|
|
90
|
+
0px,
|
|
91
|
+
calc(var(--_paddingInline) - var(--_borderWidth))
|
|
92
|
+
);
|
|
87
93
|
font-size: var(--_fontSize);
|
|
88
94
|
gap: var(--chip-gap, var(--_gap));
|
|
89
95
|
color: var(--chip-color, var(--_fg));
|
|
@@ -90,13 +90,13 @@ let EunomiaDescriptionList = class EunomiaDescriptionList extends ReactiveElemen
|
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
__decorate([
|
|
93
|
-
property({ reflect: true })
|
|
93
|
+
property({ reflect: true, useDefault: true })
|
|
94
94
|
], EunomiaDescriptionList.prototype, "layout", void 0);
|
|
95
95
|
__decorate([
|
|
96
|
-
property({ reflect: true })
|
|
96
|
+
property({ reflect: true, useDefault: true })
|
|
97
97
|
], EunomiaDescriptionList.prototype, "align", void 0);
|
|
98
98
|
__decorate([
|
|
99
|
-
property({ type: Number, reflect: true })
|
|
99
|
+
property({ type: Number, reflect: true, useDefault: true })
|
|
100
100
|
], EunomiaDescriptionList.prototype, "columns", void 0);
|
|
101
101
|
__decorate([
|
|
102
102
|
property({ type: Boolean, reflect: true })
|
|
@@ -33,7 +33,10 @@ export declare function setIconBaseUrl(url: string): void;
|
|
|
33
33
|
* @cssprop [--icon-padding-block] - Sets the vertical padding, as one length applied to both sides. Ignored when --icon-padding is set
|
|
34
34
|
* @cssprop [--icon-padding-inline] - Sets the horizontal padding, as one length applied to both sides. Ignored when --icon-padding is set
|
|
35
35
|
* @cssprop [--icon-border-radius] - Sets the corner radius of the background box
|
|
36
|
+
* @cssprop [--icon-border-width] - Sets the border width of the background box. Zero by default
|
|
37
|
+
* @cssprop [--icon-border-color] - Sets the border color of the background box, once --icon-border-width is set
|
|
36
38
|
* @cssprop [--icon-transition] - Sets the transition applied to the icon's color, background, and size changes. 0.2s by default
|
|
39
|
+
* @csspart wrapper - The background box around the icon, for effects its CSS custom properties don't cover
|
|
37
40
|
* @element eun-icon
|
|
38
41
|
*/
|
|
39
42
|
export declare class EunomiaIcon extends LitElement {
|
|
@@ -89,7 +89,10 @@ export function setIconBaseUrl(url) {
|
|
|
89
89
|
* @cssprop [--icon-padding-block] - Sets the vertical padding, as one length applied to both sides. Ignored when --icon-padding is set
|
|
90
90
|
* @cssprop [--icon-padding-inline] - Sets the horizontal padding, as one length applied to both sides. Ignored when --icon-padding is set
|
|
91
91
|
* @cssprop [--icon-border-radius] - Sets the corner radius of the background box
|
|
92
|
+
* @cssprop [--icon-border-width] - Sets the border width of the background box. Zero by default
|
|
93
|
+
* @cssprop [--icon-border-color] - Sets the border color of the background box, once --icon-border-width is set
|
|
92
94
|
* @cssprop [--icon-transition] - Sets the transition applied to the icon's color, background, and size changes. 0.2s by default
|
|
95
|
+
* @csspart wrapper - The background box around the icon, for effects its CSS custom properties don't cover
|
|
93
96
|
* @element eun-icon
|
|
94
97
|
*/
|
|
95
98
|
let EunomiaIcon = class EunomiaIcon extends LitElement {
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* --icon-padding : space between the icon and its background box. Zero by
|
|
9
9
|
* default, so the background hugs the icon exactly unless widened.
|
|
10
10
|
* --icon-border-radius : corner radius of the background box.
|
|
11
|
+
* --icon-border-width : border width of the background box. Zero by default.
|
|
12
|
+
* --icon-border-color : border color of the background box.
|
|
11
13
|
* --icon-transition : transition applied to the icon's color, background,
|
|
12
14
|
* and size changes. 0.2s by default.
|
|
13
15
|
*/
|
|
@@ -9,6 +9,8 @@ import { css } from "lit";
|
|
|
9
9
|
* --icon-padding : space between the icon and its background box. Zero by
|
|
10
10
|
* default, so the background hugs the icon exactly unless widened.
|
|
11
11
|
* --icon-border-radius : corner radius of the background box.
|
|
12
|
+
* --icon-border-width : border width of the background box. Zero by default.
|
|
13
|
+
* --icon-border-color : border color of the background box.
|
|
12
14
|
* --icon-transition : transition applied to the icon's color, background,
|
|
13
15
|
* and size changes. 0.2s by default.
|
|
14
16
|
*/
|
|
@@ -30,6 +32,8 @@ export const iconStyles = css `
|
|
|
30
32
|
fill: var(--_color);
|
|
31
33
|
color: var(--_color);
|
|
32
34
|
background-color: var(--_background);
|
|
35
|
+
border: var(--icon-border-width, 0) solid
|
|
36
|
+
var(--icon-border-color, var(--eun-border-color, #dee0e7));
|
|
33
37
|
border-radius: var(--icon-border-radius, var(--eun-border-radius-m, 8px));
|
|
34
38
|
text-decoration: none;
|
|
35
39
|
white-space: normal;
|
|
@@ -61,14 +61,14 @@ declare const EunomiaImageCarousel_base: import("../../../utils/constructor.type
|
|
|
61
61
|
* @prop {number} [autoplayInterval=4000] - Milliseconds between each autoplay advance
|
|
62
62
|
* @attr {number} [autoplay-interval=4000] - Milliseconds between each autoplay advance
|
|
63
63
|
* @attr {string} aria-label - The accessible name for the main stage. Defaults to the localized string for the current locale (English: "Image gallery")
|
|
64
|
-
* @prop {string} [
|
|
65
|
-
* @attr {string} [
|
|
66
|
-
* @prop {string} [
|
|
67
|
-
* @attr {string} [
|
|
68
|
-
* @prop {string} [
|
|
69
|
-
* @attr {string} [
|
|
70
|
-
* @prop {string} [
|
|
71
|
-
* @attr {string} [
|
|
64
|
+
* @prop {string} [previousLabel] - The accessible label of the previous controls, on both the main stage and the lightbox. Defaults to the localized string for the current locale (English: "Previous image")
|
|
65
|
+
* @attr {string} [previous-label] - The accessible label of the previous controls, on both the main stage and the lightbox. Defaults to the localized string for the current locale (English: "Previous image")
|
|
66
|
+
* @prop {string} [nextLabel] - The accessible label of the next controls, on both the main stage and the lightbox. Defaults to the localized string for the current locale (English: "Next image")
|
|
67
|
+
* @attr {string} [next-label] - The accessible label of the next controls, on both the main stage and the lightbox. Defaults to the localized string for the current locale (English: "Next image")
|
|
68
|
+
* @prop {string} [expandLabel] - The accessible label of the main stage's expand control. Defaults to the localized string for the current locale (English: "View full-size image")
|
|
69
|
+
* @attr {string} [expand-label] - The accessible label of the main stage's expand control. Defaults to the localized string for the current locale (English: "View full-size image")
|
|
70
|
+
* @prop {string} [lightboxLabel] - The accessible name of the lightbox dialog. Defaults to the localized string for the current locale (English: "Image viewer")
|
|
71
|
+
* @attr {string} [lightbox-label] - The accessible name of the lightbox dialog. Defaults to the localized string for the current locale (English: "Image viewer")
|
|
72
72
|
* @fires {ImageChangeEvent} eunimagechange - Fired whenever the active image changes, from either the main stage or the lightbox
|
|
73
73
|
* @cssprop [--image-carousel-aspect-ratio] - Sets the aspect ratio of the main stage
|
|
74
74
|
* @cssprop [--image-carousel-object-fit] - Sets how the main image fits its box
|
|
@@ -191,26 +191,26 @@ export declare class EunomiaImageCarousel extends EunomiaImageCarousel_base {
|
|
|
191
191
|
* `locale` automatically.
|
|
192
192
|
* @default {i18n:imageCarousel.previous}
|
|
193
193
|
*/
|
|
194
|
-
|
|
194
|
+
previousLabel?: string;
|
|
195
195
|
/**
|
|
196
196
|
* Accessible label of the Next controls (main stage and lightbox).
|
|
197
197
|
* Resolved from the locale dictionary when unset, so it follows
|
|
198
198
|
* `locale` automatically.
|
|
199
199
|
* @default {i18n:imageCarousel.next}
|
|
200
200
|
*/
|
|
201
|
-
|
|
201
|
+
nextLabel?: string;
|
|
202
202
|
/**
|
|
203
203
|
* Accessible label of the main stage's expand control. Resolved from the
|
|
204
204
|
* locale dictionary when unset, so it follows `locale` automatically.
|
|
205
205
|
* @default {i18n:imageCarousel.expand}
|
|
206
206
|
*/
|
|
207
|
-
|
|
207
|
+
expandLabel?: string;
|
|
208
208
|
/**
|
|
209
209
|
* Accessible name of the lightbox dialog. Resolved from the locale
|
|
210
210
|
* dictionary when unset, so it follows `locale` automatically.
|
|
211
211
|
* @default {i18n:imageCarousel.lightbox}
|
|
212
212
|
*/
|
|
213
|
-
|
|
213
|
+
lightboxLabel?: string;
|
|
214
214
|
/**
|
|
215
215
|
* Text of the visually-hidden live region, debounced so rapid prev/next
|
|
216
216
|
* clicks announce once rather than flooding it.
|
|
@@ -14,6 +14,7 @@ import { ImageChangeEvent } from "../../../events/imagechange.event.js";
|
|
|
14
14
|
import { imageCarouselStyles } from "./image-carousel.styles.js";
|
|
15
15
|
import { LocalizableMixin } from "../../../mixins/localizable.mixin.js";
|
|
16
16
|
import { cssTimeToMs } from "../../../utils/motion.utils.js";
|
|
17
|
+
import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
|
|
17
18
|
/**
|
|
18
19
|
* Tag name of the image carousel component.
|
|
19
20
|
*/
|
|
@@ -58,14 +59,14 @@ export const EunomiaImageCarouselTagName = "eun-image-carousel";
|
|
|
58
59
|
* @prop {number} [autoplayInterval=4000] - Milliseconds between each autoplay advance
|
|
59
60
|
* @attr {number} [autoplay-interval=4000] - Milliseconds between each autoplay advance
|
|
60
61
|
* @attr {string} aria-label - The accessible name for the main stage. Defaults to the localized string for the current locale (English: "Image gallery")
|
|
61
|
-
* @prop {string} [
|
|
62
|
-
* @attr {string} [
|
|
63
|
-
* @prop {string} [
|
|
64
|
-
* @attr {string} [
|
|
65
|
-
* @prop {string} [
|
|
66
|
-
* @attr {string} [
|
|
67
|
-
* @prop {string} [
|
|
68
|
-
* @attr {string} [
|
|
62
|
+
* @prop {string} [previousLabel] - The accessible label of the previous controls, on both the main stage and the lightbox. Defaults to the localized string for the current locale (English: "Previous image")
|
|
63
|
+
* @attr {string} [previous-label] - The accessible label of the previous controls, on both the main stage and the lightbox. Defaults to the localized string for the current locale (English: "Previous image")
|
|
64
|
+
* @prop {string} [nextLabel] - The accessible label of the next controls, on both the main stage and the lightbox. Defaults to the localized string for the current locale (English: "Next image")
|
|
65
|
+
* @attr {string} [next-label] - The accessible label of the next controls, on both the main stage and the lightbox. Defaults to the localized string for the current locale (English: "Next image")
|
|
66
|
+
* @prop {string} [expandLabel] - The accessible label of the main stage's expand control. Defaults to the localized string for the current locale (English: "View full-size image")
|
|
67
|
+
* @attr {string} [expand-label] - The accessible label of the main stage's expand control. Defaults to the localized string for the current locale (English: "View full-size image")
|
|
68
|
+
* @prop {string} [lightboxLabel] - The accessible name of the lightbox dialog. Defaults to the localized string for the current locale (English: "Image viewer")
|
|
69
|
+
* @attr {string} [lightbox-label] - The accessible name of the lightbox dialog. Defaults to the localized string for the current locale (English: "Image viewer")
|
|
69
70
|
* @fires {ImageChangeEvent} eunimagechange - Fired whenever the active image changes, from either the main stage or the lightbox
|
|
70
71
|
* @cssprop [--image-carousel-aspect-ratio] - Sets the aspect ratio of the main stage
|
|
71
72
|
* @cssprop [--image-carousel-object-fit] - Sets how the main image fits its box
|
|
@@ -968,7 +969,7 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
|
|
|
968
969
|
type="button"
|
|
969
970
|
id="expand-trigger"
|
|
970
971
|
aria-haspopup="dialog"
|
|
971
|
-
aria-label="${this.
|
|
972
|
+
aria-label="${this.expandLabel ??
|
|
972
973
|
this.dictionary.imageCarousel.expand} (${this.activeIndex +
|
|
973
974
|
1}/${count})"
|
|
974
975
|
@click=${this.handleExpandClick}
|
|
@@ -990,7 +991,7 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
|
|
|
990
991
|
type="button"
|
|
991
992
|
class="stage-nav"
|
|
992
993
|
id="prev"
|
|
993
|
-
aria-label=${this.
|
|
994
|
+
aria-label=${this.previousLabel ??
|
|
994
995
|
this.dictionary.imageCarousel.previous}
|
|
995
996
|
?disabled=${disablePrev}
|
|
996
997
|
@click=${() => this.previous()}
|
|
@@ -1001,7 +1002,7 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
|
|
|
1001
1002
|
type="button"
|
|
1002
1003
|
class="stage-nav"
|
|
1003
1004
|
id="next"
|
|
1004
|
-
aria-label=${this.
|
|
1005
|
+
aria-label=${this.nextLabel ?? this.dictionary.imageCarousel.next}
|
|
1005
1006
|
?disabled=${disableNext}
|
|
1006
1007
|
@click=${() => this.next()}
|
|
1007
1008
|
>
|
|
@@ -1097,7 +1098,7 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
|
|
|
1097
1098
|
<eun-modal
|
|
1098
1099
|
id="modal"
|
|
1099
1100
|
hide-actions
|
|
1100
|
-
aria-label=${this.
|
|
1101
|
+
aria-label=${this.lightboxLabel ??
|
|
1101
1102
|
this.dictionary.imageCarousel.lightbox}
|
|
1102
1103
|
@euncancel=${() => this.handleTransientResume()}
|
|
1103
1104
|
>
|
|
@@ -1133,7 +1134,7 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
|
|
|
1133
1134
|
type="button"
|
|
1134
1135
|
class="lightbox-nav"
|
|
1135
1136
|
id="lightbox-prev"
|
|
1136
|
-
aria-label=${this.
|
|
1137
|
+
aria-label=${this.previousLabel ??
|
|
1137
1138
|
this.dictionary.imageCarousel.previous}
|
|
1138
1139
|
?disabled=${!this.loop && this.activeIndex <= 0}
|
|
1139
1140
|
@click=${() => this.previous()}
|
|
@@ -1144,7 +1145,7 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
|
|
|
1144
1145
|
type="button"
|
|
1145
1146
|
class="lightbox-nav"
|
|
1146
1147
|
id="lightbox-next"
|
|
1147
|
-
aria-label=${this.
|
|
1148
|
+
aria-label=${this.nextLabel ??
|
|
1148
1149
|
this.dictionary.imageCarousel.next}
|
|
1149
1150
|
?disabled=${!this.loop && this.activeIndex >= count - 1}
|
|
1150
1151
|
@click=${() => this.next()}
|
|
@@ -1248,7 +1249,7 @@ EunomiaImageCarousel.SWIPE_THRESHOLD = 40;
|
|
|
1248
1249
|
*/
|
|
1249
1250
|
EunomiaImageCarousel.EDGE_RESISTANCE = 0.3;
|
|
1250
1251
|
__decorate([
|
|
1251
|
-
property({ type: Array, reflect: true })
|
|
1252
|
+
property({ type: Array, reflect: true, useDefault: true })
|
|
1252
1253
|
], EunomiaImageCarousel.prototype, "images", void 0);
|
|
1253
1254
|
__decorate([
|
|
1254
1255
|
property({ type: Number, attribute: "active-index" })
|
|
@@ -1260,22 +1261,22 @@ __decorate([
|
|
|
1260
1261
|
property({ type: Number, attribute: "magnifier-zoom" })
|
|
1261
1262
|
], EunomiaImageCarousel.prototype, "magnifierZoom", void 0);
|
|
1262
1263
|
__decorate([
|
|
1263
|
-
property({
|
|
1264
|
+
property({ converter: defaultTrueConverter, attribute: "show-thumbnails" })
|
|
1264
1265
|
], EunomiaImageCarousel.prototype, "showThumbnails", void 0);
|
|
1265
1266
|
__decorate([
|
|
1266
|
-
property({
|
|
1267
|
+
property({ converter: defaultTrueConverter, attribute: "show-dots" })
|
|
1267
1268
|
], EunomiaImageCarousel.prototype, "showDots", void 0);
|
|
1268
1269
|
__decorate([
|
|
1269
|
-
property({
|
|
1270
|
+
property({ converter: defaultTrueConverter })
|
|
1270
1271
|
], EunomiaImageCarousel.prototype, "lightbox", void 0);
|
|
1271
1272
|
__decorate([
|
|
1272
|
-
property({
|
|
1273
|
+
property({ converter: defaultTrueConverter, attribute: "lightbox-grid" })
|
|
1273
1274
|
], EunomiaImageCarousel.prototype, "lightboxGrid", void 0);
|
|
1274
1275
|
__decorate([
|
|
1275
1276
|
property({ type: Boolean })
|
|
1276
1277
|
], EunomiaImageCarousel.prototype, "loop", void 0);
|
|
1277
1278
|
__decorate([
|
|
1278
|
-
property({ reflect: true })
|
|
1279
|
+
property({ reflect: true, useDefault: true })
|
|
1279
1280
|
], EunomiaImageCarousel.prototype, "transition", void 0);
|
|
1280
1281
|
__decorate([
|
|
1281
1282
|
property({ type: Boolean })
|
|
@@ -1284,17 +1285,17 @@ __decorate([
|
|
|
1284
1285
|
property({ type: Number, attribute: "autoplay-interval" })
|
|
1285
1286
|
], EunomiaImageCarousel.prototype, "autoplayInterval", void 0);
|
|
1286
1287
|
__decorate([
|
|
1287
|
-
property({ attribute: "
|
|
1288
|
-
], EunomiaImageCarousel.prototype, "
|
|
1288
|
+
property({ attribute: "previous-label" })
|
|
1289
|
+
], EunomiaImageCarousel.prototype, "previousLabel", void 0);
|
|
1289
1290
|
__decorate([
|
|
1290
|
-
property({ attribute: "
|
|
1291
|
-
], EunomiaImageCarousel.prototype, "
|
|
1291
|
+
property({ attribute: "next-label" })
|
|
1292
|
+
], EunomiaImageCarousel.prototype, "nextLabel", void 0);
|
|
1292
1293
|
__decorate([
|
|
1293
|
-
property({ attribute: "
|
|
1294
|
-
], EunomiaImageCarousel.prototype, "
|
|
1294
|
+
property({ attribute: "expand-label" })
|
|
1295
|
+
], EunomiaImageCarousel.prototype, "expandLabel", void 0);
|
|
1295
1296
|
__decorate([
|
|
1296
|
-
property({ attribute: "
|
|
1297
|
-
], EunomiaImageCarousel.prototype, "
|
|
1297
|
+
property({ attribute: "lightbox-label" })
|
|
1298
|
+
], EunomiaImageCarousel.prototype, "lightboxLabel", void 0);
|
|
1298
1299
|
__decorate([
|
|
1299
1300
|
state()
|
|
1300
1301
|
], EunomiaImageCarousel.prototype, "announcement", void 0);
|
|
@@ -4,6 +4,7 @@ import { PasswordStrengthLevel, PasswordStrengthRule } from "./password-strength
|
|
|
4
4
|
* Tag name of the password strength component.
|
|
5
5
|
*/
|
|
6
6
|
export declare const EunomiaPasswordStrengthTagName = "eun-password-strength";
|
|
7
|
+
declare const EunomiaPasswordStrength_base: import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/localizable.mixin.js").LocalizableMixinInterface> & typeof LitElement;
|
|
7
8
|
/**
|
|
8
9
|
* A visual and assistive technology indicator of how well a password
|
|
9
10
|
* satisfies a set of configurable requirements, graded into levels,
|
|
@@ -21,9 +22,10 @@ export declare const EunomiaPasswordStrengthTagName = "eun-password-strength";
|
|
|
21
22
|
* escape hatch for a level that needs a specific pattern instead.
|
|
22
23
|
*
|
|
23
24
|
* @prop {string} [value=''] - The password to grade
|
|
24
|
-
* @prop {string} [label
|
|
25
|
+
* @prop {string} [label] - A static caption shown next to the current level's name, and used to prefix the message announced to screen readers on every level change. Defaults to the localized string for the current locale (English: "Password strength")
|
|
25
26
|
* @prop {Array<import('./password-strength.type.js').PasswordStrengthRule>} [rules] - The shared pool of requirements levels are scored against by default. Four by default: eight or more characters, upper and lower case, one number, and one special character
|
|
26
|
-
* @prop {Array<import('./password-strength.type.js').PasswordStrengthLevel>} [levels] - The levels to render, ordered from weakest to strongest. Four by default: Weak, Fair, Good, and Strong
|
|
27
|
+
* @prop {Array<import('./password-strength.type.js').PasswordStrengthLevel>} [levels] - The levels to render, ordered from weakest to strongest. Four by default: Weak, Fair, Good, and Strong, named in the current locale
|
|
28
|
+
* @prop {string} [locale] - The locale used to resolve the default caption and level names. Defaults to the shared default locale
|
|
27
29
|
* @prop {boolean} [hideLabel=false] - Hides the always-visible caption and level name. The level name is still announced to screen readers on every change either way
|
|
28
30
|
* @attr {boolean} [hide-label=false] - Hides the always-visible caption and level name
|
|
29
31
|
* @cssprop [--password-strength-gap] - Sets the gap between the segment row and the label
|
|
@@ -42,7 +44,7 @@ export declare const EunomiaPasswordStrengthTagName = "eun-password-strength";
|
|
|
42
44
|
* @cssprop [--password-strength-level-font-weight] - Sets the font weight of the level name
|
|
43
45
|
* @element eun-password-strength
|
|
44
46
|
*/
|
|
45
|
-
export declare class EunomiaPasswordStrength extends
|
|
47
|
+
export declare class EunomiaPasswordStrength extends EunomiaPasswordStrength_base {
|
|
46
48
|
/**
|
|
47
49
|
* Styles to import to the component.
|
|
48
50
|
*
|
|
@@ -59,10 +61,10 @@ export declare class EunomiaPasswordStrength extends LitElement {
|
|
|
59
61
|
/**
|
|
60
62
|
* Static caption shown next to the current level's name, and used to
|
|
61
63
|
* prefix the message announced to screen readers on every level change
|
|
62
|
-
* (e.g. "Password strength: Fair").
|
|
63
|
-
*
|
|
64
|
+
* (e.g. "Password strength: Fair"). Falls back to the localized string
|
|
65
|
+
* for the current locale when unset.
|
|
64
66
|
*/
|
|
65
|
-
label
|
|
67
|
+
label?: string;
|
|
66
68
|
/**
|
|
67
69
|
* The shared pool of regex-based requirements levels are scored against
|
|
68
70
|
* by default (see {@link PasswordStrengthLevel.minScore}). A JS-only
|
|
@@ -107,6 +109,18 @@ export declare class EunomiaPasswordStrength extends LitElement {
|
|
|
107
109
|
* @internal
|
|
108
110
|
*/
|
|
109
111
|
private get currentLevelIndex();
|
|
112
|
+
/**
|
|
113
|
+
* {@link levels}, with the default levels named in the current locale.
|
|
114
|
+
* Custom levels are returned as is.
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
private get resolvedLevels();
|
|
118
|
+
/**
|
|
119
|
+
* {@link label} or its localized fallback, punctuated for the current
|
|
120
|
+
* locale (e.g. "Password strength:").
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
private get caption();
|
|
110
124
|
/**
|
|
111
125
|
* Lifecycle hook called whenever reactive properties change. Speaks the
|
|
112
126
|
* newly-reached level through {@link announcerEl} whenever it actually
|
|
@@ -122,3 +136,4 @@ declare global {
|
|
|
122
136
|
[EunomiaPasswordStrengthTagName]: EunomiaPasswordStrength;
|
|
123
137
|
}
|
|
124
138
|
}
|
|
139
|
+
export {};
|
|
@@ -10,6 +10,7 @@ import { classMap } from "lit/directives/class-map.js";
|
|
|
10
10
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
11
11
|
import { passwordStrengthStyles } from "./password-strength.styles.js";
|
|
12
12
|
import { DEFAULT_PASSWORD_STRENGTH_LEVELS, DEFAULT_PASSWORD_STRENGTH_RULES, getPasswordStrengthLevelIndex, } from "./password-strength.type.js";
|
|
13
|
+
import { LocalizableMixin } from "../../../mixins/localizable.mixin.js";
|
|
13
14
|
/**
|
|
14
15
|
* Tag name of the password strength component.
|
|
15
16
|
*/
|
|
@@ -31,9 +32,10 @@ export const EunomiaPasswordStrengthTagName = "eun-password-strength";
|
|
|
31
32
|
* escape hatch for a level that needs a specific pattern instead.
|
|
32
33
|
*
|
|
33
34
|
* @prop {string} [value=''] - The password to grade
|
|
34
|
-
* @prop {string} [label
|
|
35
|
+
* @prop {string} [label] - A static caption shown next to the current level's name, and used to prefix the message announced to screen readers on every level change. Defaults to the localized string for the current locale (English: "Password strength")
|
|
35
36
|
* @prop {Array<import('./password-strength.type.js').PasswordStrengthRule>} [rules] - The shared pool of requirements levels are scored against by default. Four by default: eight or more characters, upper and lower case, one number, and one special character
|
|
36
|
-
* @prop {Array<import('./password-strength.type.js').PasswordStrengthLevel>} [levels] - The levels to render, ordered from weakest to strongest. Four by default: Weak, Fair, Good, and Strong
|
|
37
|
+
* @prop {Array<import('./password-strength.type.js').PasswordStrengthLevel>} [levels] - The levels to render, ordered from weakest to strongest. Four by default: Weak, Fair, Good, and Strong, named in the current locale
|
|
38
|
+
* @prop {string} [locale] - The locale used to resolve the default caption and level names. Defaults to the shared default locale
|
|
37
39
|
* @prop {boolean} [hideLabel=false] - Hides the always-visible caption and level name. The level name is still announced to screen readers on every change either way
|
|
38
40
|
* @attr {boolean} [hide-label=false] - Hides the always-visible caption and level name
|
|
39
41
|
* @cssprop [--password-strength-gap] - Sets the gap between the segment row and the label
|
|
@@ -52,7 +54,7 @@ export const EunomiaPasswordStrengthTagName = "eun-password-strength";
|
|
|
52
54
|
* @cssprop [--password-strength-level-font-weight] - Sets the font weight of the level name
|
|
53
55
|
* @element eun-password-strength
|
|
54
56
|
*/
|
|
55
|
-
let EunomiaPasswordStrength = class EunomiaPasswordStrength extends LitElement {
|
|
57
|
+
let EunomiaPasswordStrength = class EunomiaPasswordStrength extends LocalizableMixin(LitElement) {
|
|
56
58
|
constructor() {
|
|
57
59
|
super(...arguments);
|
|
58
60
|
/**
|
|
@@ -60,13 +62,6 @@ let EunomiaPasswordStrength = class EunomiaPasswordStrength extends LitElement {
|
|
|
60
62
|
* @default ''
|
|
61
63
|
*/
|
|
62
64
|
this.value = "";
|
|
63
|
-
/**
|
|
64
|
-
* Static caption shown next to the current level's name, and used to
|
|
65
|
-
* prefix the message announced to screen readers on every level change
|
|
66
|
-
* (e.g. "Password strength: Fair").
|
|
67
|
-
* @default Password strength
|
|
68
|
-
*/
|
|
69
|
-
this.label = "Password strength";
|
|
70
65
|
/**
|
|
71
66
|
* The shared pool of regex-based requirements levels are scored against
|
|
72
67
|
* by default (see {@link PasswordStrengthLevel.minScore}). A JS-only
|
|
@@ -106,6 +101,30 @@ let EunomiaPasswordStrength = class EunomiaPasswordStrength extends LitElement {
|
|
|
106
101
|
get currentLevelIndex() {
|
|
107
102
|
return getPasswordStrengthLevelIndex(this.value, this.rules, this.levels);
|
|
108
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* {@link levels}, with the default levels named in the current locale.
|
|
106
|
+
* Custom levels are returned as is.
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
get resolvedLevels() {
|
|
110
|
+
if (this.levels !== DEFAULT_PASSWORD_STRENGTH_LEVELS) {
|
|
111
|
+
return this.levels;
|
|
112
|
+
}
|
|
113
|
+
const names = this.dictionary.passwordStrength.levels;
|
|
114
|
+
return this.levels.map((level, index) => ({
|
|
115
|
+
...level,
|
|
116
|
+
label: names[index] ?? level.label,
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* {@link label} or its localized fallback, punctuated for the current
|
|
121
|
+
* locale (e.g. "Password strength:").
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
get caption() {
|
|
125
|
+
const { passwordStrength } = this.dictionary;
|
|
126
|
+
return passwordStrength.caption(this.label ?? passwordStrength.label);
|
|
127
|
+
}
|
|
109
128
|
/**
|
|
110
129
|
* Lifecycle hook called whenever reactive properties change. Speaks the
|
|
111
130
|
* newly-reached level through {@link announcerEl} whenever it actually
|
|
@@ -127,12 +146,14 @@ let EunomiaPasswordStrength = class EunomiaPasswordStrength extends LitElement {
|
|
|
127
146
|
this.previousLevelIndex = index;
|
|
128
147
|
if (this.announcerEl) {
|
|
129
148
|
this.announcerEl.textContent =
|
|
130
|
-
index === -1
|
|
149
|
+
index === -1
|
|
150
|
+
? ""
|
|
151
|
+
: `${this.caption} ${this.resolvedLevels[index].label}`;
|
|
131
152
|
}
|
|
132
153
|
}
|
|
133
154
|
render() {
|
|
134
155
|
const index = this.currentLevelIndex;
|
|
135
|
-
const level = index === -1 ? undefined : this.
|
|
156
|
+
const level = index === -1 ? undefined : this.resolvedLevels[index];
|
|
136
157
|
return html `
|
|
137
158
|
<div id="wrapper" data-severity=${ifDefined(level?.severity)}>
|
|
138
159
|
<div id="segments" role="presentation" aria-hidden="true">
|
|
@@ -145,12 +166,12 @@ let EunomiaPasswordStrength = class EunomiaPasswordStrength extends LitElement {
|
|
|
145
166
|
></span>
|
|
146
167
|
`)}
|
|
147
168
|
</div>
|
|
148
|
-
${this.hideLabel
|
|
169
|
+
${this.hideLabel
|
|
149
170
|
? nothing
|
|
150
171
|
: html `
|
|
151
|
-
<span id="label">
|
|
152
|
-
<span id="caption">${this.
|
|
153
|
-
<span id="level-name">${level
|
|
172
|
+
<span id="label" class=${classMap({ empty: !level })}>
|
|
173
|
+
<span id="caption">${this.caption}</span>
|
|
174
|
+
<span id="level-name">${level?.label ?? "\u00A0"}</span>
|
|
154
175
|
</span>
|
|
155
176
|
`}
|
|
156
177
|
</div>
|
|
@@ -167,13 +167,13 @@ let EunomiaTag = class EunomiaTag extends LitElement {
|
|
|
167
167
|
*/
|
|
168
168
|
EunomiaTag.styles = tagStyles;
|
|
169
169
|
__decorate([
|
|
170
|
-
property({ reflect: true })
|
|
170
|
+
property({ reflect: true, useDefault: true })
|
|
171
171
|
], EunomiaTag.prototype, "color", void 0);
|
|
172
172
|
__decorate([
|
|
173
173
|
property({ reflect: true })
|
|
174
174
|
], EunomiaTag.prototype, "severity", void 0);
|
|
175
175
|
__decorate([
|
|
176
|
-
property({ reflect: true })
|
|
176
|
+
property({ reflect: true, useDefault: true })
|
|
177
177
|
], EunomiaTag.prototype, "appearance", void 0);
|
|
178
178
|
__decorate([
|
|
179
179
|
property()
|
|
@@ -614,16 +614,23 @@ export declare class EunomiaTooltip extends EunomiaTooltipMixinBase {
|
|
|
614
614
|
*/
|
|
615
615
|
private readGap;
|
|
616
616
|
/**
|
|
617
|
-
* Links the
|
|
618
|
-
*
|
|
619
|
-
* Idempotent — only ever applied once per anchor.
|
|
617
|
+
* Links the anchor's focusable element to the panel, so a screen reader
|
|
618
|
+
* announces the tooltip's content as a description of whatever actually
|
|
619
|
+
* holds focus. Idempotent — only ever applied once per anchor.
|
|
620
620
|
*
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
621
|
+
* The described element is resolved by `resolveFocusTarget` rather than
|
|
622
|
+
* being the slotted anchor itself : when the anchor is a component
|
|
623
|
+
* (`<eun-link slot="anchor"><a href>…</a></eun-link>`, an `eun-button`
|
|
624
|
+
* with `href`), focus lands on the slotted `<a>` or on a control inside
|
|
625
|
+
* the component's shadow root, and a description set on the host is
|
|
626
|
+
* never announced.
|
|
627
|
+
*
|
|
628
|
+
* When that element shares the panel's tree scope (the anchor itself, or
|
|
629
|
+
* its light DOM descendants, since the panel is portaled into the
|
|
630
|
+
* anchor's own scope, see {@link ensurePortal}), a plain `id`-string
|
|
631
|
+
* `aria-describedby` is enough. A control inside the anchor's shadow root
|
|
632
|
+
* can't reference an id outside it, so it gets an element reference
|
|
633
|
+
* through `ariaDescribedByElements` instead.
|
|
627
634
|
* @private
|
|
628
635
|
*/
|
|
629
636
|
private applyAriaDescribedBy;
|