@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
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* Base style for rating.
|
|
4
|
+
*
|
|
5
|
+
* Custom css variables:
|
|
6
|
+
* [--rating-size] - Set a custom width/height for each icon
|
|
7
|
+
* [--rating-gap] - Set a custom space between two icons
|
|
8
|
+
* [--rating-color] - Set a custom color to the filled icons
|
|
9
|
+
* [--rating-empty-color] - Set a custom color to the empty icons
|
|
10
|
+
* [--rating-error-color] - Set a custom color to the error message, and to the empty icons while in error
|
|
11
|
+
* [--rating-hint-color] - Set a custom color to the hint message
|
|
12
|
+
* [--rating-focus-outline-color] - Set a custom color to the focus outline drawn around the focused icon and the clear button
|
|
13
|
+
*/
|
|
14
|
+
const base = css `
|
|
15
|
+
:host {
|
|
16
|
+
--_iconSize: var(--rating-size, 24px);
|
|
17
|
+
--_gap: var(--rating-gap, var(--eun-space-xs, 4px));
|
|
18
|
+
--_color: var(--rating-color, var(--eun-color-primary-500, #3d6fff));
|
|
19
|
+
--_emptyColor: var(
|
|
20
|
+
--rating-empty-color,
|
|
21
|
+
color-mix(
|
|
22
|
+
in srgb,
|
|
23
|
+
var(--eun-text-color, #071621) 55%,
|
|
24
|
+
var(--eun-surface-color, #ffffff)
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
--_errorColor: var(
|
|
28
|
+
--rating-error-color,
|
|
29
|
+
var(--eun-color-critical-100, #aa0014)
|
|
30
|
+
);
|
|
31
|
+
--_hintColor: var(--rating-hint-color, var(--eun-text-secondary, #484e61));
|
|
32
|
+
--_focusIndicator: var(
|
|
33
|
+
--rating-focus-outline-color,
|
|
34
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
35
|
+
);
|
|
36
|
+
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
37
|
+
font-size: var(--eun-font-size-s, 14px);
|
|
38
|
+
display: inline-block;
|
|
39
|
+
vertical-align: middle;
|
|
40
|
+
outline: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#wrapper {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: var(--eun-space-xs, 4px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#control {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
gap: var(--eun-space-s, 8px);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
#items {
|
|
56
|
+
display: flex;
|
|
57
|
+
gap: var(--_gap);
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.item {
|
|
62
|
+
position: relative;
|
|
63
|
+
flex: none;
|
|
64
|
+
width: var(--_iconSize);
|
|
65
|
+
height: var(--_iconSize);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([display-only]) #items {
|
|
69
|
+
cursor: default;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.icon {
|
|
73
|
+
position: absolute;
|
|
74
|
+
inset: 0;
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.icon eun-icon {
|
|
79
|
+
--icon-size: var(--_iconSize);
|
|
80
|
+
display: block;
|
|
81
|
+
width: var(--_iconSize);
|
|
82
|
+
height: var(--_iconSize);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.empty {
|
|
86
|
+
--icon-color: var(--_emptyColor);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.fill {
|
|
90
|
+
position: absolute;
|
|
91
|
+
inset-block: 0;
|
|
92
|
+
inset-inline-start: 0;
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
--icon-color: var(--_color);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.fill eun-icon {
|
|
98
|
+
flex: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
input {
|
|
102
|
+
position: absolute;
|
|
103
|
+
inset-block: 0;
|
|
104
|
+
inset-inline-start: 0;
|
|
105
|
+
width: 100%;
|
|
106
|
+
height: 100%;
|
|
107
|
+
margin: 0;
|
|
108
|
+
opacity: 0;
|
|
109
|
+
appearance: none;
|
|
110
|
+
pointer-events: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
input.half {
|
|
114
|
+
width: 50%;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
input.end {
|
|
118
|
+
inset-inline-start: 50%;
|
|
119
|
+
width: 50%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.focus-ring {
|
|
123
|
+
position: absolute;
|
|
124
|
+
inset: -3px;
|
|
125
|
+
border-radius: var(--eun-border-radius-s, 4px);
|
|
126
|
+
outline: 2px solid transparent;
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
transition: outline-color var(--eun-duration-s, 150ms)
|
|
129
|
+
var(--eun-easing-default, ease);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.focus-ring.half {
|
|
133
|
+
inset-inline-end: 50%;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
input:focus-visible + .focus-ring {
|
|
137
|
+
outline-color: var(--_focusIndicator);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
#clear {
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
min-width: 24px;
|
|
145
|
+
min-height: 24px;
|
|
146
|
+
padding: 2px;
|
|
147
|
+
border: none;
|
|
148
|
+
border-radius: 50%;
|
|
149
|
+
background: transparent;
|
|
150
|
+
color: var(--eun-text-secondary, #484e61);
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
outline: 2px solid transparent;
|
|
153
|
+
outline-offset: 2px;
|
|
154
|
+
--icon-size: 18px;
|
|
155
|
+
transition:
|
|
156
|
+
background-color var(--eun-duration-s, 150ms)
|
|
157
|
+
var(--eun-easing-default, ease),
|
|
158
|
+
outline-color var(--eun-duration-s, 150ms) var(--eun-easing-default, ease);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
#clear:hover {
|
|
162
|
+
background: var(--eun-content-hover, #9696961a);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
#clear:active {
|
|
166
|
+
background: var(--eun-content-pressed, #e4e6e8);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
#clear:focus-visible {
|
|
170
|
+
outline-color: var(--_focusIndicator);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
#items[aria-invalid="true"] {
|
|
174
|
+
--_emptyColor: var(--_errorColor);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host([aria-readonly="true"]) {
|
|
178
|
+
--_color: var(--eun-readonly-color, #666e8a);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:host([aria-readonly="true"]) #items {
|
|
182
|
+
cursor: default;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:host([aria-disabled="true"]) {
|
|
186
|
+
--_color: var(--eun-text-disabled-color, #8d93aa);
|
|
187
|
+
--_emptyColor: var(--eun-disabled-content, #c1c9d6);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:host([aria-disabled="true"]) #items {
|
|
191
|
+
cursor: not-allowed;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@media (forced-colors: active) {
|
|
195
|
+
.fill {
|
|
196
|
+
--icon-color: CanvasText;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.empty {
|
|
200
|
+
--icon-color: CanvasText;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
input:focus-visible + .focus-ring,
|
|
204
|
+
#clear:focus-visible {
|
|
205
|
+
outline-color: Highlight;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:host([aria-disabled="true"]) .icon eun-icon {
|
|
209
|
+
--icon-color: GrayText;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
`;
|
|
213
|
+
export const ratingStyles = base;
|
|
@@ -5,6 +5,12 @@ import { EunomiaIconName } from "../../content/icon/icon.type.js";
|
|
|
5
5
|
* Tag name of the search component.
|
|
6
6
|
*/
|
|
7
7
|
export declare const EunomiaSearchTagName = "eun-search";
|
|
8
|
+
/**
|
|
9
|
+
* How the suggestions dropdown filters its options against the typed value.
|
|
10
|
+
* `contains` keeps the options whose label contains it, `none` shows every
|
|
11
|
+
* option as is, for results already filtered by a server.
|
|
12
|
+
*/
|
|
13
|
+
export type EunomiaSearchFilter = "contains" | "none";
|
|
8
14
|
declare const EunomiaSearch_base: import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/anchor-position.mixin.js").AnchorPositionMixinInterface> & typeof EunomiaInput;
|
|
9
15
|
/**
|
|
10
16
|
* An input field specialized for search: the native type is locked to
|
|
@@ -24,15 +30,20 @@ declare const EunomiaSearch_base: import("../../../utils/constructor.type.js").C
|
|
|
24
30
|
*
|
|
25
31
|
* @slot [icon] - Replaces the leading icon entirely with any content, not just an icon element. Falls back to icon when empty. Applies to the real field, inline or inside the panel modal. The compact panel trigger button always shows the plain icon glyph, since it can't project the same slotted content a second time
|
|
26
32
|
* @slot results - Content rendered below the field inside the panel, such as a result list. Only relevant when panel is set
|
|
33
|
+
* @slot trigger - Replaces the panel's built-in trigger button, for example with an icon button. A click on it opens the panel, and focus returns to it on close. Give it its own accessible name. Only relevant when panel is set
|
|
34
|
+
* @csspart trigger - The panel's built-in trigger button, shown while nothing is slotted in trigger
|
|
27
35
|
* @prop {boolean} [shortcut=false] - Enables the Ctrl+K or Cmd+K global shortcut and its visual key hint badge
|
|
28
36
|
* @prop {boolean} [panel=false] - Opens a modal command palette panel on shortcut or click instead of focusing inline
|
|
29
|
-
* @prop {string} [
|
|
37
|
+
* @prop {string} [panelLabel] - The accessible name of the panel's dialog, used when label isn't set. Defaults to the localized string for the current locale (English: "Search")
|
|
30
38
|
* @prop {boolean} [loading=false] - Whether a search request is currently in flight. Shows a spinning loading indicator in place of the clear button or shortcut hint on the inline field only. Ignored on the panel trigger and the panel's own field, which stay static, so reflect the loading state on the results slot instead
|
|
31
39
|
* @prop {string} [loadingLabel='Loading…'] - The accessible label announced by the loading indicator while loading is set
|
|
32
40
|
* @prop {boolean} [suggestions=false] - Opens a dropdown listbox showing light DOM option and optgroup children matching the typed value, highlighting the matched substring. Ignored while panel is set
|
|
33
41
|
* @prop {string} [noResultsLabel='No results'] - Text displayed in the dropdown when no option matches, while suggestions is set
|
|
34
|
-
* @
|
|
42
|
+
* @prop {'contains' | 'none'} [filter='contains'] - How the suggestions are filtered against the typed value. Contains keeps the options whose label contains it, none shows every option as is, for results already filtered by a server
|
|
43
|
+
* @fires {ChangeEvent} eunchange - Fired on every value change, typed or picked from the suggestions
|
|
44
|
+
* @fires {SelectEvent} eunselect - Fired when a suggestion is picked, with the option's value as key
|
|
35
45
|
* @cssprop [--field-listbox-max-height=260px] - Sets the maximum height of the suggestions dropdown, past which it scrolls. Shared with the select component
|
|
46
|
+
* @cssprop [--field-listbox-border-radius] - Sets the corner radius of the suggestions dropdown, independent of the field's own radius. Shared with the select component
|
|
36
47
|
* @cssprop [--field-listbox-transition-duration=200ms] - Sets the duration of the suggestions dropdown's open and close transition. Shared with the select component
|
|
37
48
|
* @cssprop [--field-match-color] - Sets the color of the matched search substring, highlighted while suggestions is set. Shared with the select component
|
|
38
49
|
* @cssprop [--field-match-background] - Sets the background of the matched search substring, none by default. Shared with the select component
|
|
@@ -54,7 +65,8 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
54
65
|
/**
|
|
55
66
|
* Always `"search"` — enforced in `willUpdate`, since `EunomiaInput` declares
|
|
56
67
|
* `type` as a plain property (not an accessor), which TypeScript doesn't
|
|
57
|
-
* allow overriding as a getter/setter pair from a subclass.
|
|
68
|
+
* allow overriding as a getter/setter pair from a subclass. Never
|
|
69
|
+
* reflected, since it can't differ from its default.
|
|
58
70
|
* @default search
|
|
59
71
|
*/
|
|
60
72
|
type: EunomiaInputType;
|
|
@@ -91,9 +103,9 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
91
103
|
* Accessible name of the panel's dialog, used as `eun-modal`'s `aria-label`
|
|
92
104
|
* since the panel renders no visible heading. Ignored when `label` is set
|
|
93
105
|
* (used instead, since it already names the field itself).
|
|
94
|
-
*
|
|
106
|
+
* Falls back to the localized string for the current locale when unset.
|
|
95
107
|
*/
|
|
96
|
-
|
|
108
|
+
panelLabel?: string;
|
|
97
109
|
/**
|
|
98
110
|
* Indicates whether a search request is currently in flight. Shows a
|
|
99
111
|
* spinning `eun-loader` in place of the clear button/shortcut hint on the
|
|
@@ -119,9 +131,10 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
119
131
|
* mechanic (`AnchorPositionMixin`, CSS Anchor Positioning with a JS
|
|
120
132
|
* fallback) as `eun-select`'s own dropdown, sharing its CSS custom
|
|
121
133
|
* properties (`--field-listbox-max-height`, `--field-match-*`, etc.).
|
|
122
|
-
* Picking a suggestion sets `value` to its label
|
|
123
|
-
*
|
|
124
|
-
*
|
|
134
|
+
* Picking a suggestion sets `value` to its label, then fires `eunselect`
|
|
135
|
+
* with the option's own `value` attribute, so two options sharing a label
|
|
136
|
+
* stay distinguishable. Ignored while `panel` is set — combining the two
|
|
137
|
+
* isn't supported.
|
|
125
138
|
* @default false
|
|
126
139
|
*/
|
|
127
140
|
suggestions: boolean;
|
|
@@ -131,6 +144,14 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
131
144
|
* @default No results
|
|
132
145
|
*/
|
|
133
146
|
noResultsLabel: string;
|
|
147
|
+
/**
|
|
148
|
+
* How the suggestions are filtered against the typed value : `contains`
|
|
149
|
+
* keeps the options whose label contains it, `none` shows every option as
|
|
150
|
+
* is, for results a server already filtered, possibly on another field
|
|
151
|
+
* than the label.
|
|
152
|
+
* @default contains
|
|
153
|
+
*/
|
|
154
|
+
filter: EunomiaSearchFilter;
|
|
134
155
|
/**
|
|
135
156
|
* Whether the suggestions dropdown is currently open.
|
|
136
157
|
* @internal
|
|
@@ -155,6 +176,12 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
155
176
|
* @readonly
|
|
156
177
|
*/
|
|
157
178
|
private readonly fieldWrapperEl?;
|
|
179
|
+
/**
|
|
180
|
+
* The `trigger` slot, rendered in place of the field while `panel` is set,
|
|
181
|
+
* with the built-in trigger button as its fallback content.
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
private readonly triggerSlot?;
|
|
158
185
|
/**
|
|
159
186
|
* The collapsed trigger button rendered in place of the field while
|
|
160
187
|
* `panel` is set.
|
|
@@ -190,6 +217,14 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
190
217
|
* @private
|
|
191
218
|
*/
|
|
192
219
|
private static readonly FIELD_POINTER_DOWN_WINDOW_MS;
|
|
220
|
+
/**
|
|
221
|
+
* Re-renders the suggestions whenever the light DOM `option`/`optgroup`
|
|
222
|
+
* children change, since they aren't reactive properties : a consumer
|
|
223
|
+
* replacing them with a server's results would otherwise stay unseen until
|
|
224
|
+
* some unrelated property changed.
|
|
225
|
+
* @internal
|
|
226
|
+
*/
|
|
227
|
+
private readonly optionsObserver;
|
|
193
228
|
connectedCallback(): void;
|
|
194
229
|
disconnectedCallback(): void;
|
|
195
230
|
/**
|
|
@@ -200,13 +235,13 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
200
235
|
*/
|
|
201
236
|
protected willUpdate(changedProperties: PropertyValues): void;
|
|
202
237
|
/**
|
|
203
|
-
*
|
|
238
|
+
* Sends a direct `focus()` call on the host to
|
|
204
239
|
* the collapsed trigger button while `panel` is set, instead of the
|
|
205
240
|
* inherited default (the native field) : that field lives inside the
|
|
206
241
|
* still-closed modal at this point, and focusing hidden popover content
|
|
207
242
|
* is a no-op — leaving focus stranded on the (invisible) host with
|
|
208
243
|
* nowhere to land, e.g. on a Shift+Tab back onto it from just past the
|
|
209
|
-
* trigger.
|
|
244
|
+
* trigger. A trigger slotted in `trigger` takes its place.
|
|
210
245
|
* @protected
|
|
211
246
|
*/
|
|
212
247
|
protected focusTarget(): HTMLElement | undefined;
|
|
@@ -218,6 +253,12 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
218
253
|
* Closes the command-palette panel. No-op when `panel` isn't set.
|
|
219
254
|
*/
|
|
220
255
|
closePanel(): void;
|
|
256
|
+
/**
|
|
257
|
+
* Opens the panel on a click anywhere in the `trigger` slot, its slotted
|
|
258
|
+
* content or the built-in button it falls back to, unless disabled.
|
|
259
|
+
* @private
|
|
260
|
+
*/
|
|
261
|
+
private readonly handleTriggerClick;
|
|
221
262
|
/**
|
|
222
263
|
* Lifecycle hook called after the component's first render. Attaches the
|
|
223
264
|
* suggestions dropdown's event listeners directly on the field element,
|
|
@@ -249,7 +290,7 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
249
290
|
private get effectiveQuery();
|
|
250
291
|
/**
|
|
251
292
|
* Options filtered by {@link effectiveQuery}. Shows every option when the
|
|
252
|
-
* field is empty
|
|
293
|
+
* field is empty, or when {@link filter} is `none`.
|
|
253
294
|
* @internal
|
|
254
295
|
*/
|
|
255
296
|
private get filteredOptions();
|
|
@@ -317,6 +358,19 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
317
358
|
* @private
|
|
318
359
|
*/
|
|
319
360
|
private readonly handleSuggestionsFieldActivate;
|
|
361
|
+
/**
|
|
362
|
+
* Closes the dropdown once focus has left the component entirely, e.g.
|
|
363
|
+
* `Tab`-ing away, same as `eun-select`'s own `handleFocusOut` : the
|
|
364
|
+
* Popover API's light-dismiss only reacts to outside clicks, not to focus
|
|
365
|
+
* moving via the keyboard. `closeSuggestions` checks the popover itself
|
|
366
|
+
* rather than `isOpen`, which only follows the asynchronous `toggle`
|
|
367
|
+
* event. Checked a frame later, since the newly focused
|
|
368
|
+
* element hasn't received focus yet when `focusout` fires. Picking an
|
|
369
|
+
* option never gets here, its row cancels `mousedown` so the field keeps
|
|
370
|
+
* focus.
|
|
371
|
+
* @private
|
|
372
|
+
*/
|
|
373
|
+
private readonly handleSuggestionsFocusOut;
|
|
320
374
|
/**
|
|
321
375
|
* Opens the dropdown and resets the highlight on every keystroke. Bound to
|
|
322
376
|
* the field's native `input` event (rather than reacting to `value`
|
|
@@ -328,9 +382,9 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
328
382
|
*/
|
|
329
383
|
private readonly handleSuggestionsInput;
|
|
330
384
|
/**
|
|
331
|
-
* Picks a suggestion : sets `value` to its label
|
|
332
|
-
*
|
|
333
|
-
*
|
|
385
|
+
* Picks a suggestion : sets `value` to its label, fires `eunchange` with
|
|
386
|
+
* it like a keystroke would, then `eunselect` with the option's own
|
|
387
|
+
* `value`, and closes the dropdown.
|
|
334
388
|
*
|
|
335
389
|
* @param option the chosen option.
|
|
336
390
|
* @private
|
|
@@ -360,9 +414,8 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
360
414
|
*/
|
|
361
415
|
private readonly handleSuggestionsPopoverToggle;
|
|
362
416
|
/**
|
|
363
|
-
* Renders the dropdown's option rows,
|
|
364
|
-
*
|
|
365
|
-
* and highlighting the matched substring — same rendering as
|
|
417
|
+
* Renders the dropdown's option rows, grouped under their `optgroup`
|
|
418
|
+
* label (see {@link renderListboxRows}), and highlighting the matched substring — same rendering as
|
|
366
419
|
* `eun-select`'s own `renderOptionRows`, minus the `multiple` checkbox
|
|
367
420
|
* (search has no multi-select concept) and the `selected` state now
|
|
368
421
|
* meaning "exactly matches the current value" rather than "is the stored
|
|
@@ -495,7 +548,8 @@ export declare class EunomiaSearch extends EunomiaSearch_base {
|
|
|
495
548
|
private syncSuggestionsAria;
|
|
496
549
|
/**
|
|
497
550
|
* Renders the search component: the inherited inline field, or — when
|
|
498
|
-
* `panel` is set — a trigger
|
|
551
|
+
* `panel` is set — a trigger (the `trigger` slot, falling back to a
|
|
552
|
+
* built-in button) plus a `eun-modal[kind=search]`
|
|
499
553
|
* (flush, no padding, no close button) containing the real field (reused
|
|
500
554
|
* via `renderField`, wrapped for its own full-width/no-border styling) and
|
|
501
555
|
* a `results` slot.
|