@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
|
@@ -12,6 +12,7 @@ import { classMap } from "lit/directives/class-map.js";
|
|
|
12
12
|
import { AnchorPositionMixin, } from "../../../mixins/anchor-position.mixin.js";
|
|
13
13
|
import { clampToViewport } from "../../../utils/dropdown-menu.utils.js";
|
|
14
14
|
import { isWebKit } from "../../../utils/browser.utils.js";
|
|
15
|
+
import { resolveFocusTarget } from "../../../utils/focusable-elements.utils.js";
|
|
15
16
|
import { formatRichText } from "../../../utils/rich-text.utils.js";
|
|
16
17
|
import { tooltipHostStyles, tooltipPanelStyles, tooltipAnchorPositioningStyles, } from "./tooltip.styles.js";
|
|
17
18
|
import { resolveDurationMs, resolveEasing, } from "../../../utils/motion.utils.js";
|
|
@@ -874,28 +875,43 @@ let EunomiaTooltip = EunomiaTooltip_1 = class EunomiaTooltip extends EunomiaTool
|
|
|
874
875
|
return this.readPixelVar("--tooltip-gap", 8);
|
|
875
876
|
}
|
|
876
877
|
/**
|
|
877
|
-
* Links the
|
|
878
|
-
*
|
|
879
|
-
* Idempotent — only ever applied once per anchor.
|
|
878
|
+
* Links the anchor's focusable element to the panel, so a screen reader
|
|
879
|
+
* announces the tooltip's content as a description of whatever actually
|
|
880
|
+
* holds focus. Idempotent — only ever applied once per anchor.
|
|
880
881
|
*
|
|
881
|
-
*
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
*
|
|
882
|
+
* The described element is resolved by `resolveFocusTarget` rather than
|
|
883
|
+
* being the slotted anchor itself : when the anchor is a component
|
|
884
|
+
* (`<eun-link slot="anchor"><a href>…</a></eun-link>`, an `eun-button`
|
|
885
|
+
* with `href`), focus lands on the slotted `<a>` or on a control inside
|
|
886
|
+
* the component's shadow root, and a description set on the host is
|
|
887
|
+
* never announced.
|
|
888
|
+
*
|
|
889
|
+
* When that element shares the panel's tree scope (the anchor itself, or
|
|
890
|
+
* its light DOM descendants, since the panel is portaled into the
|
|
891
|
+
* anchor's own scope, see {@link ensurePortal}), a plain `id`-string
|
|
892
|
+
* `aria-describedby` is enough. A control inside the anchor's shadow root
|
|
893
|
+
* can't reference an id outside it, so it gets an element reference
|
|
894
|
+
* through `ariaDescribedByElements` instead.
|
|
887
895
|
* @private
|
|
888
896
|
*/
|
|
889
897
|
applyAriaDescribedBy() {
|
|
890
|
-
if (this.ariaDescribedByApplied || !this.anchorEl) {
|
|
898
|
+
if (this.ariaDescribedByApplied || !this.anchorEl || !this.panelEl) {
|
|
891
899
|
return;
|
|
892
900
|
}
|
|
893
901
|
this.ariaDescribedByApplied = true;
|
|
894
|
-
const
|
|
902
|
+
const target = resolveFocusTarget(this.anchorEl);
|
|
903
|
+
if (target.getRootNode() !== this.portalRoot) {
|
|
904
|
+
const existing = target.ariaDescribedByElements ?? [];
|
|
905
|
+
if (!existing.includes(this.panelEl)) {
|
|
906
|
+
target.ariaDescribedByElements = [...existing, this.panelEl];
|
|
907
|
+
}
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
910
|
+
const existing = target.getAttribute("aria-describedby");
|
|
895
911
|
const ids = existing ? existing.split(/\s+/) : [];
|
|
896
912
|
if (!ids.includes(this.panelId)) {
|
|
897
913
|
ids.push(this.panelId);
|
|
898
|
-
|
|
914
|
+
target.setAttribute("aria-describedby", ids.join(" "));
|
|
899
915
|
}
|
|
900
916
|
}
|
|
901
917
|
/**
|
|
@@ -1167,16 +1183,16 @@ __decorate([
|
|
|
1167
1183
|
property({ reflect: true })
|
|
1168
1184
|
], EunomiaTooltip.prototype, "severity", void 0);
|
|
1169
1185
|
__decorate([
|
|
1170
|
-
property({ reflect: true })
|
|
1186
|
+
property({ reflect: true, useDefault: true })
|
|
1171
1187
|
], EunomiaTooltip.prototype, "color", void 0);
|
|
1172
1188
|
__decorate([
|
|
1173
|
-
property({ reflect: true })
|
|
1189
|
+
property({ reflect: true, useDefault: true })
|
|
1174
1190
|
], EunomiaTooltip.prototype, "appearance", void 0);
|
|
1175
1191
|
__decorate([
|
|
1176
1192
|
property({ type: Boolean, reflect: true, attribute: "fixed-color" })
|
|
1177
1193
|
], EunomiaTooltip.prototype, "fixedColor", void 0);
|
|
1178
1194
|
__decorate([
|
|
1179
|
-
property({ reflect: true })
|
|
1195
|
+
property({ reflect: true, useDefault: true })
|
|
1180
1196
|
], EunomiaTooltip.prototype, "placement", void 0);
|
|
1181
1197
|
__decorate([
|
|
1182
1198
|
property()
|
|
@@ -172,7 +172,7 @@ const panel = css `
|
|
|
172
172
|
display: grid;
|
|
173
173
|
row-gap: var(--tooltip-row-gap, var(--eun-space-xs, 4px));
|
|
174
174
|
width: max-content;
|
|
175
|
-
min-width: var(--tooltip-min-width,
|
|
175
|
+
min-width: var(--tooltip-min-width, 0px);
|
|
176
176
|
max-width: var(--tooltip-max-width, 280px);
|
|
177
177
|
padding: var(
|
|
178
178
|
--tooltip-padding,
|
|
@@ -25,6 +25,7 @@ export declare const EunomiaCheckCardTagName = "eun-check-card";
|
|
|
25
25
|
* @prop {boolean} [readonly=false] - Whether the card is read only
|
|
26
26
|
* @prop {boolean} [indeterminate=false] - Whether the card value is indeterminate
|
|
27
27
|
* @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
|
|
28
|
+
* @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
|
|
28
29
|
* @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
|
|
29
30
|
* @attr {boolean} [hide-error=false] - Whether the error message is hidden
|
|
30
31
|
* @prop {boolean} [required=false] - Whether a selection is required
|
|
@@ -36,6 +36,7 @@ export const EunomiaCheckCardTagName = "eun-check-card";
|
|
|
36
36
|
* @prop {boolean} [readonly=false] - Whether the card is read only
|
|
37
37
|
* @prop {boolean} [indeterminate=false] - Whether the card value is indeterminate
|
|
38
38
|
* @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
|
|
39
|
+
* @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
|
|
39
40
|
* @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
|
|
40
41
|
* @attr {boolean} [hide-error=false] - Whether the error message is hidden
|
|
41
42
|
* @prop {boolean} [required=false] - Whether a selection is required
|
|
@@ -30,6 +30,7 @@ declare const EunomiaCheckboxList_base: import("../../../utils/constructor.type.
|
|
|
30
30
|
* @prop {string[]} [defaultValue] - The default selected values
|
|
31
31
|
* @attr {string} [default-value] - The default selected values, as a comma-separated string
|
|
32
32
|
* @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
|
|
33
|
+
* @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
|
|
33
34
|
* @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
|
|
34
35
|
* @attr {boolean} [hide-error=false] - Whether the errors are hidden
|
|
35
36
|
* @prop {Array<import('../../../types/form-validators.type.js').Validators<string[]>>} validators - A list of validation rules applied to the group's selected values
|
|
@@ -50,6 +51,11 @@ export declare class EunomiaCheckboxList extends EunomiaCheckboxList_base {
|
|
|
50
51
|
* @readonly
|
|
51
52
|
*/
|
|
52
53
|
static readonly styles: import("lit").CSSResult[];
|
|
54
|
+
/**
|
|
55
|
+
* Every change is a complete choice, so its error shows right away.
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
errorOnChange: boolean;
|
|
53
59
|
/**
|
|
54
60
|
* Configuration options for the component Shadow DOM
|
|
55
61
|
* @internal
|
|
@@ -94,6 +100,17 @@ export declare class EunomiaCheckboxList extends EunomiaCheckboxList_base {
|
|
|
94
100
|
* Cleans up event listeners.
|
|
95
101
|
*/
|
|
96
102
|
disconnectedCallback(): void;
|
|
103
|
+
/**
|
|
104
|
+
* Whether the group's own `disabled`/`readonly` changed in a way to pass
|
|
105
|
+
* on to every child : always once set, but not for the initial `false`,
|
|
106
|
+
* which would otherwise re-enable a child disabled on its own.
|
|
107
|
+
*
|
|
108
|
+
* @param changed - The changed properties of the update.
|
|
109
|
+
* @param name - The property to check.
|
|
110
|
+
* @returns true when the children should take the group's value.
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
private isGroupChange;
|
|
97
114
|
/**
|
|
98
115
|
* Lifecycle hook called whenever reactive properties change.
|
|
99
116
|
* @param _changedProperties - Map of changed properties
|
|
@@ -5,8 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { customElement, property, query } from "lit/decorators.js";
|
|
8
|
-
import { html, LitElement } from "lit";
|
|
8
|
+
import { html, LitElement, nothing } from "lit";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
11
|
import { FormLabelMixin } from "../../../mixins/form-label.mixin.js";
|
|
11
12
|
import { FormMixin, hasErrorDisplayChange, } from "../../../mixins/form.mixin.js";
|
|
12
13
|
import { DisabledMixin } from "../../../mixins/disabled.mixin.js";
|
|
@@ -79,6 +80,7 @@ const Base = DisabledMixin(ValidatorsMixin(LitElement));
|
|
|
79
80
|
* @prop {string[]} [defaultValue] - The default selected values
|
|
80
81
|
* @attr {string} [default-value] - The default selected values, as a comma-separated string
|
|
81
82
|
* @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
|
|
83
|
+
* @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
|
|
82
84
|
* @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
|
|
83
85
|
* @attr {boolean} [hide-error=false] - Whether the errors are hidden
|
|
84
86
|
* @prop {Array<import('../../../types/form-validators.type.js').Validators<string[]>>} validators - A list of validation rules applied to the group's selected values
|
|
@@ -93,6 +95,11 @@ const Base = DisabledMixin(ValidatorsMixin(LitElement));
|
|
|
93
95
|
let EunomiaCheckboxList = class EunomiaCheckboxList extends FormLabelMixin(ReadonlyMixin(FormMixin(Base))) {
|
|
94
96
|
constructor() {
|
|
95
97
|
super(...arguments);
|
|
98
|
+
/**
|
|
99
|
+
* Every change is a complete choice, so its error shows right away.
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
this.errorOnChange = true;
|
|
96
103
|
/**
|
|
97
104
|
* Indicates whether the elements into the list should be displayed inline.
|
|
98
105
|
* @default false
|
|
@@ -159,18 +166,31 @@ let EunomiaCheckboxList = class EunomiaCheckboxList extends FormLabelMixin(Reado
|
|
|
159
166
|
this.optionsList?.removeEventListener("eunchange", this.handleChangeEvent);
|
|
160
167
|
super.disconnectedCallback?.();
|
|
161
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Whether the group's own `disabled`/`readonly` changed in a way to pass
|
|
171
|
+
* on to every child : always once set, but not for the initial `false`,
|
|
172
|
+
* which would otherwise re-enable a child disabled on its own.
|
|
173
|
+
*
|
|
174
|
+
* @param changed - The changed properties of the update.
|
|
175
|
+
* @param name - The property to check.
|
|
176
|
+
* @returns true when the children should take the group's value.
|
|
177
|
+
* @private
|
|
178
|
+
*/
|
|
179
|
+
isGroupChange(changed, name) {
|
|
180
|
+
return changed.has(name) && (this[name] || changed.get(name) !== undefined);
|
|
181
|
+
}
|
|
162
182
|
/**
|
|
163
183
|
* Lifecycle hook called whenever reactive properties change.
|
|
164
184
|
* @param _changedProperties - Map of changed properties
|
|
165
185
|
*/
|
|
166
186
|
updated(_changedProperties) {
|
|
167
187
|
super.updated(_changedProperties);
|
|
168
|
-
if (
|
|
188
|
+
if (this.isGroupChange(_changedProperties, "disabled")) {
|
|
169
189
|
this.fields.forEach((field) => {
|
|
170
190
|
field.disabled = this.disabled;
|
|
171
191
|
});
|
|
172
192
|
}
|
|
173
|
-
if (
|
|
193
|
+
if (this.isGroupChange(_changedProperties, "readonly")) {
|
|
174
194
|
this.fields.forEach((field) => {
|
|
175
195
|
field.readonly = this.readonly;
|
|
176
196
|
});
|
|
@@ -182,9 +202,6 @@ let EunomiaCheckboxList = class EunomiaCheckboxList extends FormLabelMixin(Reado
|
|
|
182
202
|
field.validationRequested = showError;
|
|
183
203
|
});
|
|
184
204
|
}
|
|
185
|
-
if (_changedProperties.has("label") && !this.hasAttribute("aria-label")) {
|
|
186
|
-
this.setAttribute("aria-label", `${this.label}. ${this.instructions ?? ""}`);
|
|
187
|
-
}
|
|
188
205
|
if (_changedProperties.has("name")) {
|
|
189
206
|
this.fields.forEach((field) => {
|
|
190
207
|
field.name = this.name;
|
|
@@ -241,22 +258,34 @@ let EunomiaCheckboxList = class EunomiaCheckboxList extends FormLabelMixin(Reado
|
|
|
241
258
|
* @returns The rendered template
|
|
242
259
|
*/
|
|
243
260
|
render() {
|
|
261
|
+
const description = this.renderDescription();
|
|
262
|
+
const describedBy = [
|
|
263
|
+
this.instructions ? "group-instructions" : "",
|
|
264
|
+
description === nothing ? "" : "description",
|
|
265
|
+
]
|
|
266
|
+
.filter(Boolean)
|
|
267
|
+
.join(" ") || undefined;
|
|
244
268
|
return html `
|
|
245
|
-
<fieldset id="fieldset">
|
|
269
|
+
<fieldset id="fieldset" role="presentation">
|
|
246
270
|
<div id="legend">${this.renderFormLabels("options")}</div>
|
|
271
|
+
${this.instructions
|
|
272
|
+
? html `<span id="group-instructions" hidden
|
|
273
|
+
>${this.instructions}</span
|
|
274
|
+
>`
|
|
275
|
+
: nothing}
|
|
247
276
|
<div
|
|
248
277
|
id="options"
|
|
249
278
|
part="options"
|
|
250
279
|
role="group"
|
|
251
280
|
class=${classMap({ inline: this.inline })}
|
|
252
281
|
?disabled=${this.disabled}
|
|
253
|
-
aria-
|
|
254
|
-
aria-describedby
|
|
282
|
+
aria-label=${ifDefined(this.label)}
|
|
283
|
+
aria-describedby=${ifDefined(describedBy)}
|
|
255
284
|
aria-disabled=${this.disabled ? "true" : "false"}
|
|
256
285
|
>
|
|
257
286
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
258
287
|
</div>
|
|
259
|
-
${
|
|
288
|
+
${description}
|
|
260
289
|
</fieldset>
|
|
261
290
|
`;
|
|
262
291
|
}
|
|
@@ -31,6 +31,7 @@ declare const EunomiaCheckboxMixinBase: Constructor<EunomiaCheckboxBase>;
|
|
|
31
31
|
* @prop {boolean} [readonly=false] - Whether the checkbox is read only
|
|
32
32
|
* @prop {boolean} [indeterminate=false] - Whether the checkbox value is indeterminate
|
|
33
33
|
* @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
|
|
34
|
+
* @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
|
|
34
35
|
* @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
|
|
35
36
|
* @attr {boolean} [hide-error=false] - Whether the error message is hidden
|
|
36
37
|
* @prop {boolean} [required=false] - Whether a selection is required
|
|
@@ -34,6 +34,7 @@ const EunomiaCheckboxMixinBase = CheckMixin(ReadonlyMixin(FormMixin(DisabledMixi
|
|
|
34
34
|
* @prop {boolean} [readonly=false] - Whether the checkbox is read only
|
|
35
35
|
* @prop {boolean} [indeterminate=false] - Whether the checkbox value is indeterminate
|
|
36
36
|
* @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
|
|
37
|
+
* @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
|
|
37
38
|
* @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
|
|
38
39
|
* @attr {boolean} [hide-error=false] - Whether the error message is hidden
|
|
39
40
|
* @prop {boolean} [required=false] - Whether a selection is required
|
|
@@ -97,7 +98,8 @@ let EunomiaCheckbox = class EunomiaCheckbox extends EunomiaCheckboxMixinBase {
|
|
|
97
98
|
*/
|
|
98
99
|
updated(_changedProperties) {
|
|
99
100
|
super.updated?.(_changedProperties);
|
|
100
|
-
if (_changedProperties.has("indeterminate")
|
|
101
|
+
if (_changedProperties.has("indeterminate") ||
|
|
102
|
+
_changedProperties.has("checked")) {
|
|
101
103
|
this.setAttribute("aria-checked", !this.checked && this.indeterminate ? "mixed" : String(this.checked));
|
|
102
104
|
}
|
|
103
105
|
if (_changedProperties.has("label")) {
|
|
@@ -111,8 +111,9 @@ const base = css `
|
|
|
111
111
|
--_focusIndicator: var(--_errorColor);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
:host([aria-disabled="true"][aria-checked="true"]) #checkbox-component
|
|
115
|
-
|
|
114
|
+
:host([aria-disabled="true"][aria-checked="true"]) #checkbox-component,
|
|
115
|
+
:host([aria-disabled="true"][aria-checked="mixed"]) #checkbox-component {
|
|
116
|
+
--_icon: var(--eun-text-disabled-color, #8d93aa);
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
:host([aria-readonly="true"][aria-checked="true"]) #checkbox-component {
|
|
@@ -6,8 +6,11 @@ import { FormMixinInterface } from "../../../mixins/form.mixin.js";
|
|
|
6
6
|
import { FormLabelMixinInterface } from "../../../mixins/form-label.mixin.js";
|
|
7
7
|
import { EditableMixinInterface } from "../../../mixins/editable.mixin.js";
|
|
8
8
|
import { FieldAppearanceMixinInterface } from "../../../mixins/field-appearance.mixin.js";
|
|
9
|
+
import { RoundedMixinInterface } from "../../../mixins/rounded.mixin.js";
|
|
10
|
+
import { FieldSizeMixinInterface } from "../../../mixins/field-size.mixin.js";
|
|
9
11
|
import { AnchorPositionMixinInterface } from "../../../mixins/anchor-position.mixin.js";
|
|
10
12
|
import { Constructor } from "../../../utils/constructor.type.js";
|
|
13
|
+
import { LocalizableMixinInterface } from "../../../mixins/localizable.mixin.js";
|
|
11
14
|
/**
|
|
12
15
|
* Tag name of the color picker component.
|
|
13
16
|
*/
|
|
@@ -17,7 +20,7 @@ export declare const EunomiaColorPickerTagName = "eun-color-picker";
|
|
|
17
20
|
* interface elements.
|
|
18
21
|
* @internal
|
|
19
22
|
*/
|
|
20
|
-
type EunomiaColorPickerBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<string> & FormMixinInterface<string> & EditableMixinInterface & FormLabelMixinInterface & FieldAppearanceMixinInterface & AnchorPositionMixinInterface;
|
|
23
|
+
type EunomiaColorPickerBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<string> & FormMixinInterface<string> & EditableMixinInterface & FormLabelMixinInterface & FieldAppearanceMixinInterface & RoundedMixinInterface & FieldSizeMixinInterface & AnchorPositionMixinInterface & LocalizableMixinInterface;
|
|
21
24
|
declare const EunomiaColorPickerMixinBase: Constructor<EunomiaColorPickerBase>;
|
|
22
25
|
/**
|
|
23
26
|
* A field for picking a color, as a `#rrggbb` hex string. Declare preset
|
|
@@ -55,6 +58,8 @@ declare const EunomiaColorPickerMixinBase: Constructor<EunomiaColorPickerBase>;
|
|
|
55
58
|
* @prop {string} defaultValue - The default value applied when the field connects, and restored on form reset
|
|
56
59
|
* @attr {string} [default-value] - The default value
|
|
57
60
|
* @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
|
|
61
|
+
* @prop {boolean} [rounded=false] - Whether the field is fully rounded, as a pill. A custom border radius still wins over it
|
|
62
|
+
* @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The field size. A field and a button of the same size share the same height
|
|
58
63
|
* @prop {string} label - The title label of the field, rendered through the label component
|
|
59
64
|
* @prop {string} instructions - Instructions displayed below the label
|
|
60
65
|
* @prop {string} name - The field name
|
|
@@ -62,12 +67,13 @@ declare const EunomiaColorPickerMixinBase: Constructor<EunomiaColorPickerBase>;
|
|
|
62
67
|
* @prop {boolean} [readonly=false] - Whether the field is read only
|
|
63
68
|
* @prop {boolean} [required=false] - Whether a color is required
|
|
64
69
|
* @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
|
|
70
|
+
* @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
|
|
65
71
|
* @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
|
|
66
72
|
* @prop {Array<Validators<string>>} validators - The list of validation rules applied to the field value
|
|
67
73
|
* @prop {boolean} [readonlyAvailable=false] - Whether the field can switch between a static display and an editable one
|
|
68
74
|
* @attr {boolean} [readonly-available=false] - Whether the field can switch between a static display and an editable one
|
|
69
|
-
* @prop {string} [emptyValueLabel
|
|
70
|
-
* @attr {string} [empty-value-label
|
|
75
|
+
* @prop {string} [emptyValueLabel] - Text displayed in place of the value when empty. Defaults to the localized string for the current locale (English: "No color selected")
|
|
76
|
+
* @attr {string} [empty-value-label] - Text displayed in place of the value when empty. Defaults to the localized string for the current locale (English: "No color selected")
|
|
71
77
|
* @prop {string} [swatchesLabel='Presets'] - Heading shown above the preset swatches, while any are declared
|
|
72
78
|
* @attr {string} [swatches-label='Presets'] - Heading shown above the preset swatches
|
|
73
79
|
* @prop {string} [customLabel='Custom'] - Heading shown above the custom color row
|
|
@@ -76,10 +82,10 @@ declare const EunomiaColorPickerMixinBase: Constructor<EunomiaColorPickerBase>;
|
|
|
76
82
|
* @attr {string} [native-input-label='Pick a custom color'] - Accessible label for the native OS color picker
|
|
77
83
|
* @prop {string} [hexInputLabel='Hex color'] - Accessible label for the hex text input
|
|
78
84
|
* @attr {string} [hex-input-label='Hex color'] - Accessible label for the hex text input
|
|
79
|
-
* @prop {string} [confirmLabel
|
|
80
|
-
* @attr {string} [confirm-label
|
|
81
|
-
* @prop {string} [cancelLabel
|
|
82
|
-
* @attr {string} [cancel-label
|
|
85
|
+
* @prop {string} [confirmLabel] - The label of the confirm button in edit mode. Defaults to the localized string for the current locale (English: "Confirm")
|
|
86
|
+
* @attr {string} [confirm-label] - The label of the confirm button in edit mode. Defaults to the localized string for the current locale (English: "Confirm")
|
|
87
|
+
* @prop {string} [cancelLabel] - The label of the cancel button in edit mode. Defaults to the localized string for the current locale (English: "Cancel")
|
|
88
|
+
* @attr {string} [cancel-label] - The label of the cancel button in edit mode. Defaults to the localized string for the current locale (English: "Cancel")
|
|
83
89
|
* @prop {boolean} [noAnimation=false] - Disables the dropdown panel's open and close height transition, on top of the automatic reduced motion handling
|
|
84
90
|
* @attr {boolean} [no-animation=false] - Disables the dropdown panel's open and close height transition
|
|
85
91
|
* @prop {boolean} [swatchOnly=false] - Renders as a native input type="color" styled as a plain swatch, with no panel, no presets, and no hex input at all — only the browser/OS's own color picker. Presets declared as option children are ignored while this is set
|
|
@@ -107,11 +113,13 @@ declare const EunomiaColorPickerMixinBase: Constructor<EunomiaColorPickerBase>;
|
|
|
107
113
|
* @cssprop [--field-edit-confirm-color] - Sets the color of the confirm button in readonly-available edit mode
|
|
108
114
|
* @cssprop [--field-edit-cancel-color] - Sets the color of the cancel button in readonly-available edit mode
|
|
109
115
|
* @cssprop [--field-listbox-max-height=260px] - Sets the maximum height of the dropdown panel, past which it scrolls
|
|
116
|
+
* @cssprop [--field-listbox-border-radius] - Sets the corner radius of the dropdown panel, independent of the field's own radius
|
|
110
117
|
* @cssprop [--field-listbox-transition-duration=200ms] - Sets the duration of the dropdown panel's open and close animation
|
|
111
118
|
* @cssprop [--color-picker-swatch-size=20px] - Sets the diameter of every swatch
|
|
112
119
|
* @cssprop [--eun-viewport-inset-top] - Reserves space, such as a page's sticky header height, that the dropdown panel keeps clear of at the top of the viewport
|
|
113
120
|
* @cssprop [--eun-viewport-inset-bottom] - The same as eun-viewport-inset-top, reserved at the bottom of the viewport
|
|
114
121
|
* @cssprop [--field-font-size] - Sets the font size of the field's value and placeholder
|
|
122
|
+
* @cssprop [--field-line-height] - Sets the line height of the field's value and placeholder
|
|
115
123
|
* @cssprop [--field-label-font-size] - Sets the font size of the label
|
|
116
124
|
* @cssprop [--field-message-font-size] - Sets the font size of the hint, error messages and instructions
|
|
117
125
|
* @element eun-color-picker
|
|
@@ -137,9 +145,9 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
137
145
|
set defaultValue(rawValue: string | undefined);
|
|
138
146
|
/**
|
|
139
147
|
* Text displayed in place of the value when empty.
|
|
140
|
-
*
|
|
148
|
+
* Falls back to the localized string for the current locale when unset.
|
|
141
149
|
*/
|
|
142
|
-
emptyValueLabel
|
|
150
|
+
emptyValueLabel?: string;
|
|
143
151
|
/**
|
|
144
152
|
* Heading shown above the preset swatches, while any are declared.
|
|
145
153
|
* @default Presets
|
|
@@ -162,14 +170,14 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
162
170
|
hexInputLabel: string;
|
|
163
171
|
/**
|
|
164
172
|
* Label of the confirm button in edit mode.
|
|
165
|
-
*
|
|
173
|
+
* Falls back to the localized string for the current locale when unset.
|
|
166
174
|
*/
|
|
167
|
-
confirmLabel
|
|
175
|
+
confirmLabel?: string;
|
|
168
176
|
/**
|
|
169
177
|
* Label of the cancel button in edit mode.
|
|
170
|
-
*
|
|
178
|
+
* Falls back to the localized string for the current locale when unset.
|
|
171
179
|
*/
|
|
172
|
-
cancelLabel
|
|
180
|
+
cancelLabel?: string;
|
|
173
181
|
/**
|
|
174
182
|
* Disables the dropdown panel's open/close height transition, both set
|
|
175
183
|
* explicitly and whenever the browser reports `prefers-reduced-motion:
|
|
@@ -198,7 +206,7 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
198
206
|
* opposite trade-off from `swatchOnly`. The leading native color swatch
|
|
199
207
|
* that normally sits before the trigger button is gone entirely (the
|
|
200
208
|
* button itself shows a plain decorative swatch instead), and the panel
|
|
201
|
-
* drops its hex input, leaving only the preset
|
|
209
|
+
* drops its hex input, leaving only the preset listbox : nothing
|
|
202
210
|
* outside the curated palette is reachable at all, not even by typing a
|
|
203
211
|
* hex value. Has no effect without at least one `option` declared —
|
|
204
212
|
* with none, {@link renderInlineCustomField} already offers nothing but
|
|
@@ -210,7 +218,7 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
210
218
|
presetsOnly: boolean;
|
|
211
219
|
/**
|
|
212
220
|
* Renders the declared `option` presets directly as the field itself,
|
|
213
|
-
* the exact swatch
|
|
221
|
+
* the exact swatch listbox {@link renderPresets} already renders
|
|
214
222
|
* inside the panel, just in place of a trigger button and a panel to
|
|
215
223
|
* open. No native color swatch, no hex input, no button, no popover of
|
|
216
224
|
* any kind, since there is nothing left for one to open. Takes priority
|
|
@@ -235,6 +243,13 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
235
243
|
* @internal
|
|
236
244
|
*/
|
|
237
245
|
private hexDraft;
|
|
246
|
+
/**
|
|
247
|
+
* The preset swatch last moved to with the keyboard, which holds the
|
|
248
|
+
* swatches' single tab stop ; `-1` until then, leaving it on the selected
|
|
249
|
+
* swatch (or the first one).
|
|
250
|
+
* @internal
|
|
251
|
+
*/
|
|
252
|
+
private presetFocusIndex;
|
|
238
253
|
/**
|
|
239
254
|
* The field's trigger : a `<button>` opening the panel, or, while
|
|
240
255
|
* {@link swatchOnly}, the native `<input type="color">` itself (no
|
|
@@ -316,6 +331,12 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
316
331
|
* `eun-select` uses for its own search text vs. `value`.
|
|
317
332
|
*/
|
|
318
333
|
protected willUpdate(_changedProperties: PropertyValues): void;
|
|
334
|
+
/**
|
|
335
|
+
* The host is never a tab stop of its own : sequential navigation goes
|
|
336
|
+
* straight to the controls inside, in both directions, and
|
|
337
|
+
* {@link focus} covers a direct call on the host.
|
|
338
|
+
*/
|
|
339
|
+
protected get hostTabStop(): boolean;
|
|
319
340
|
/**
|
|
320
341
|
* Returns the field element to focus/anchor on validation errors.
|
|
321
342
|
*/
|
|
@@ -423,13 +444,11 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
423
444
|
/**
|
|
424
445
|
* Moves focus among preset swatches on Arrow/Home/End, without picking
|
|
425
446
|
* anything : browsing the palette with the keyboard is deliberately
|
|
426
|
-
* non-destructive,
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
* {@link renderSwatchRadiogroup}), so this is an alternative to Tab/
|
|
432
|
-
* Shift+Tab for moving between them, not the only way to reach one.
|
|
447
|
+
* non-destructive, as a listbox whose selection doesn't follow focus.
|
|
448
|
+
* Picking only ever happens through an explicit activation instead, a
|
|
449
|
+
* click or an Enter/Space press, both already wired through the button's
|
|
450
|
+
* own native `click` handling. The swatches share a single Tab stop,
|
|
451
|
+
* which follows the focus (see {@link renderSwatchListbox}).
|
|
433
452
|
* @param event the native keyboard event.
|
|
434
453
|
* @param index the index of the swatch that received the key press.
|
|
435
454
|
* @private
|
|
@@ -491,28 +510,28 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
491
510
|
*/
|
|
492
511
|
private renderReadonlyDisplay;
|
|
493
512
|
/**
|
|
494
|
-
* Renders the preset swatch
|
|
513
|
+
* Renders the preset swatch listbox, while any presets are declared.
|
|
495
514
|
* @param presets the parsed preset options.
|
|
496
515
|
* @returns the rendered template.
|
|
497
516
|
* @private
|
|
498
517
|
*/
|
|
499
518
|
private renderPresets;
|
|
500
519
|
/**
|
|
501
|
-
* Renders the preset swatch
|
|
520
|
+
* Renders the preset swatch listbox itself, shared between
|
|
502
521
|
* {@link renderPresets} (inside the panel, under its own "Presets"
|
|
503
522
|
* heading) and {@link renderInlinePresetsField} (as the whole field,
|
|
504
523
|
* with no heading of its own since the field's own label already names
|
|
505
524
|
* it).
|
|
506
525
|
* @param presets the preset options to render.
|
|
507
|
-
* @param ariaLabel the
|
|
526
|
+
* @param ariaLabel the listbox's accessible name.
|
|
508
527
|
* @param hasDescription whether a hint/error `#description` is being
|
|
509
528
|
* rendered alongside the field, so it can be wired to `aria-describedby`
|
|
510
|
-
* directly on the
|
|
529
|
+
* directly on the listbox ; only relevant when it stands in for the
|
|
511
530
|
* whole field on its own, see {@link renderInlinePresetsField}.
|
|
512
531
|
* @returns the rendered template.
|
|
513
532
|
* @private
|
|
514
533
|
*/
|
|
515
|
-
private
|
|
534
|
+
private renderSwatchListbox;
|
|
516
535
|
/**
|
|
517
536
|
* Renders the panel's hex row : a plain hex text input, nothing else.
|
|
518
537
|
* The native OS color picker never lives inside the panel — it's always
|
|
@@ -528,7 +547,7 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
|
|
|
528
547
|
private renderHexRow;
|
|
529
548
|
/**
|
|
530
549
|
* Renders the declared `option` presets directly as the field itself,
|
|
531
|
-
* the same swatch
|
|
550
|
+
* the same swatch listbox {@link renderPresets} renders inside the
|
|
532
551
|
* panel, just in place of a trigger button and a panel to open at all.
|
|
533
552
|
* Used whenever {@link presetsInline} is set and at least one preset is
|
|
534
553
|
* declared (see {@link render}).
|