@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
|
@@ -41,8 +41,12 @@ export interface EunomiaThemeTints {
|
|
|
41
41
|
* secondary seed separately, a full theme is two of these.
|
|
42
42
|
*/
|
|
43
43
|
export declare function buildPalette(baseHex: EunomiaHexColor, isDark: boolean): EunomiaThemeShadeValue[];
|
|
44
|
-
/**
|
|
45
|
-
|
|
44
|
+
/**
|
|
45
|
+
* The `-tint` counterpart of the surface/border/content-hover/content-pressed
|
|
46
|
+
* neutral tokens. `borderColor` is the border the tint is mixed from, the
|
|
47
|
+
* mode's default border when unset.
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildTints(primaryHex: EunomiaHexColor, isDark: boolean, borderColor?: EunomiaHexColor): EunomiaThemeTints;
|
|
46
50
|
/**
|
|
47
51
|
* The one non-pure export in this file: generates and applies a full
|
|
48
52
|
* custom brand from two hex seed colors by composing `buildPalette` and
|
|
@@ -75,6 +79,8 @@ export interface EunomiaThemeCssOptions {
|
|
|
75
79
|
darkInverseSurfaceColor?: EunomiaHexColor;
|
|
76
80
|
textColor?: EunomiaHexColor;
|
|
77
81
|
darkTextColor?: EunomiaHexColor;
|
|
82
|
+
borderColor?: EunomiaHexColor;
|
|
83
|
+
darkBorderColor?: EunomiaHexColor;
|
|
78
84
|
fontFamily?: string;
|
|
79
85
|
brand?: string;
|
|
80
86
|
}
|
|
@@ -179,13 +179,30 @@ const LIGHT_TINT_BASE = {
|
|
|
179
179
|
contentHover: "#edeff0",
|
|
180
180
|
contentPressed: "#e4e6e8",
|
|
181
181
|
};
|
|
182
|
-
const
|
|
183
|
-
/**
|
|
184
|
-
|
|
182
|
+
const DARK_TEXT = "#f7f8fa";
|
|
183
|
+
/**
|
|
184
|
+
* Share of the text mixed into the surface for the dark
|
|
185
|
+
* `--eun-border-color`, mirroring the prebuilt dark neutrals: about 1.4:1
|
|
186
|
+
* against the surface, as discreet as the light border.
|
|
187
|
+
*/
|
|
188
|
+
const DARK_BORDER_RATIO = 0.12;
|
|
189
|
+
/**
|
|
190
|
+
* The dark `--eun-border-color` for a given surface and text color, the
|
|
191
|
+
* same mix the prebuilt dark neutrals compute in CSS.
|
|
192
|
+
*/
|
|
193
|
+
function darkBorder(surface = DARK_SURFACE, text = DARK_TEXT) {
|
|
194
|
+
return mix(surface, text, DARK_BORDER_RATIO);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* The `-tint` counterpart of the surface/border/content-hover/content-pressed
|
|
198
|
+
* neutral tokens. `borderColor` is the border the tint is mixed from, the
|
|
199
|
+
* mode's default border when unset.
|
|
200
|
+
*/
|
|
201
|
+
export function buildTints(primaryHex, isDark, borderColor) {
|
|
185
202
|
const primary500 = isDark ? darkAccessible(primaryHex) : primaryHex;
|
|
186
|
-
const
|
|
187
|
-
const border = mix(
|
|
188
|
-
const surfaceTint = mix(
|
|
203
|
+
const baseBorder = borderColor ?? (isDark ? darkBorder() : LIGHT_TINT_BASE.border);
|
|
204
|
+
const border = mix(baseBorder, primary500, TINT_RATIO);
|
|
205
|
+
const surfaceTint = mix(isDark ? DARK_SURFACE : LIGHT_TINT_BASE.surface, primary500, TINT_RATIO);
|
|
189
206
|
if (isDark) {
|
|
190
207
|
const hoverBase = mix("#ffffff", primary500, TINT_RATIO);
|
|
191
208
|
return {
|
|
@@ -227,7 +244,7 @@ function secondaryText(text, surface) {
|
|
|
227
244
|
* so the inline and the stylesheet output can never drift apart.
|
|
228
245
|
*/
|
|
229
246
|
function buildThemeTokens(primary, secondary, isDark, options) {
|
|
230
|
-
const { surfaceColor, fontFamily, darkSecondaryColor, inverseSurfaceColor, textColor, } = options;
|
|
247
|
+
const { surfaceColor, fontFamily, darkSecondaryColor, inverseSurfaceColor, textColor, borderColor, } = options;
|
|
231
248
|
const tokens = [];
|
|
232
249
|
for (const [type, seed, checkDark] of [
|
|
233
250
|
["primary", primary, isDark],
|
|
@@ -258,7 +275,10 @@ function buildThemeTokens(primary, secondary, isDark, options) {
|
|
|
258
275
|
if (fontFamily) {
|
|
259
276
|
tokens.push(["--eun-font-family", fontFamily]);
|
|
260
277
|
}
|
|
261
|
-
|
|
278
|
+
if (borderColor) {
|
|
279
|
+
tokens.push(["--eun-border-color", borderColor], ["--eun-divider-color", borderColor]);
|
|
280
|
+
}
|
|
281
|
+
const tints = buildTints(primary, isDark, borderColor ?? (isDark ? darkBorder(surfaceColor, textColor) : undefined));
|
|
262
282
|
tokens.push(["--eun-surface-tint", tints.surfaceTint]);
|
|
263
283
|
tokens.push(["--eun-border-tint", tints.borderTint]);
|
|
264
284
|
tokens.push(["--eun-divider-tint", tints.dividerTint]);
|
|
@@ -311,7 +331,7 @@ export function initializeTheme(primary, secondary, isDark = false, surfaceColor
|
|
|
311
331
|
* switching mode is just a `data-theme` change, no regeneration needed.
|
|
312
332
|
*/
|
|
313
333
|
export function buildThemeCss(primary, secondary, options = {}) {
|
|
314
|
-
const { surfaceColor = "#ffffff", darkSurfaceColor = DARK_SURFACE, darkSecondaryColor, inverseSurfaceColor, darkInverseSurfaceColor = inverseSurfaceColor, textColor, darkTextColor, fontFamily, brand = "custom", } = options;
|
|
334
|
+
const { surfaceColor = "#ffffff", darkSurfaceColor = DARK_SURFACE, darkSecondaryColor, inverseSurfaceColor, darkInverseSurfaceColor = inverseSurfaceColor, textColor, darkTextColor, borderColor, darkBorderColor, fontFamily, brand = "custom", } = options;
|
|
315
335
|
const rule = (selector, isDark) => {
|
|
316
336
|
const tokens = buildThemeTokens(primary, secondary, isDark, {
|
|
317
337
|
surfaceColor: isDark ? darkSurfaceColor : surfaceColor,
|
|
@@ -321,6 +341,7 @@ export function buildThemeCss(primary, secondary, options = {}) {
|
|
|
321
341
|
? darkInverseSurfaceColor
|
|
322
342
|
: inverseSurfaceColor,
|
|
323
343
|
textColor: isDark ? darkTextColor : textColor,
|
|
344
|
+
borderColor: isDark ? darkBorderColor : borderColor,
|
|
324
345
|
});
|
|
325
346
|
if (isDark && textColor && !darkTextColor) {
|
|
326
347
|
tokens.push(["--eun-text-color", "var(--eun-color-grey-800)"], ["--eun-text-secondary", "var(--eun-color-grey-700)"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eunomia/elements",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.8",
|
|
4
4
|
"description": "Eunomia the framework-agnostic web component design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://eunomia-ds.vercel.app",
|
|
@@ -169,6 +169,10 @@
|
|
|
169
169
|
"types": "./dist/components/form/radio/radio.d.ts",
|
|
170
170
|
"default": "./dist/components/form/radio/radio.js"
|
|
171
171
|
},
|
|
172
|
+
"./rating.js": {
|
|
173
|
+
"types": "./dist/components/form/rating/rating.d.ts",
|
|
174
|
+
"default": "./dist/components/form/rating/rating.js"
|
|
175
|
+
},
|
|
172
176
|
"./scheduler-event-editor.js": {
|
|
173
177
|
"types": "./dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts",
|
|
174
178
|
"default": "./dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js"
|
|
@@ -291,17 +295,32 @@
|
|
|
291
295
|
},
|
|
292
296
|
"./styles/*": "./styles/*",
|
|
293
297
|
"./cdn/*": "./dist/cdn/*",
|
|
298
|
+
"./alert-ssr.css": "./dist/ssr/alert-ssr.css",
|
|
294
299
|
"./animate-ssr.css": "./dist/ssr/animate-ssr.css",
|
|
295
|
-
"./
|
|
296
|
-
"./
|
|
297
|
-
"./overlay-ssr.css": "./dist/ssr/overlay-ssr.css",
|
|
298
|
-
"./links-ssr.css": "./dist/ssr/links-ssr.css",
|
|
300
|
+
"./badge-ssr.css": "./dist/ssr/badge-ssr.css",
|
|
301
|
+
"./breadcrumb-ssr.css": "./dist/ssr/breadcrumb-ssr.css",
|
|
299
302
|
"./button-ssr.css": "./dist/ssr/button-ssr.css",
|
|
300
|
-
"./tag-ssr.css": "./dist/ssr/tag-ssr.css",
|
|
301
303
|
"./card-ssr.css": "./dist/ssr/card-ssr.css",
|
|
304
|
+
"./carousel-ssr.css": "./dist/ssr/carousel-ssr.css",
|
|
305
|
+
"./checkbox-ssr.css": "./dist/ssr/checkbox-ssr.css",
|
|
306
|
+
"./chip-ssr.css": "./dist/ssr/chip-ssr.css",
|
|
307
|
+
"./collapse-ssr.css": "./dist/ssr/collapse-ssr.css",
|
|
308
|
+
"./description-list-ssr.css": "./dist/ssr/description-list-ssr.css",
|
|
309
|
+
"./field-ssr.css": "./dist/ssr/field-ssr.css",
|
|
310
|
+
"./icon-ssr.css": "./dist/ssr/icon-ssr.css",
|
|
311
|
+
"./image-carousel-ssr.css": "./dist/ssr/image-carousel-ssr.css",
|
|
312
|
+
"./links-ssr.css": "./dist/ssr/links-ssr.css",
|
|
313
|
+
"./overlay-ssr.css": "./dist/ssr/overlay-ssr.css",
|
|
314
|
+
"./pagination-ssr.css": "./dist/ssr/pagination-ssr.css",
|
|
315
|
+
"./rating-ssr.css": "./dist/ssr/rating-ssr.css",
|
|
302
316
|
"./rich-text.css": "./dist/ssr/rich-text.css",
|
|
317
|
+
"./sidebar-ssr.css": "./dist/ssr/sidebar-ssr.css",
|
|
318
|
+
"./skeleton-ssr.css": "./dist/ssr/skeleton-ssr.css",
|
|
303
319
|
"./table-ssr.css": "./dist/ssr/table-ssr.css",
|
|
304
|
-
"./
|
|
320
|
+
"./tabs-ssr.css": "./dist/ssr/tabs-ssr.css",
|
|
321
|
+
"./tag-ssr.css": "./dist/ssr/tag-ssr.css",
|
|
322
|
+
"./toggle-group-ssr.css": "./dist/ssr/toggle-group-ssr.css",
|
|
323
|
+
"./toolbar-ssr.css": "./dist/ssr/toolbar-ssr.css"
|
|
305
324
|
},
|
|
306
325
|
"files": [
|
|
307
326
|
"dist",
|
|
@@ -39,9 +39,13 @@
|
|
|
39
39
|
@mixin eunomia-dark-neutrals {
|
|
40
40
|
--eun-content-hover: rgba(255, 255, 255, 0.08);
|
|
41
41
|
--eun-content-pressed: rgba(255, 255, 255, 0.14);
|
|
42
|
-
--eun-divider-color: var(--eun-color-grey-300);
|
|
43
|
-
--eun-border-color: var(--eun-color-grey-300);
|
|
44
42
|
--eun-surface-color: var(--eun-color-grey-0);
|
|
43
|
+
--eun-border-color: color-mix(
|
|
44
|
+
in srgb,
|
|
45
|
+
var(--eun-text-color) 12%,
|
|
46
|
+
var(--eun-surface-color)
|
|
47
|
+
);
|
|
48
|
+
--eun-divider-color: var(--eun-border-color);
|
|
45
49
|
--eun-surface-sunken: color-mix(
|
|
46
50
|
in srgb,
|
|
47
51
|
var(--eun-text-color) 8%,
|
|
@@ -63,8 +63,12 @@
|
|
|
63
63
|
@include eunomia-dark-neutrals();
|
|
64
64
|
|
|
65
65
|
--eun-surface-tint: #2a3243;
|
|
66
|
-
--eun-
|
|
67
|
-
|
|
66
|
+
--eun-border-tint: color-mix(
|
|
67
|
+
in srgb,
|
|
68
|
+
var(--eun-color-primary-500) 5%,
|
|
69
|
+
var(--eun-border-color)
|
|
70
|
+
);
|
|
71
|
+
--eun-divider-tint: var(--eun-border-tint);
|
|
68
72
|
--eun-content-hover-tint: rgba(248, 250, 255, 0.08);
|
|
69
73
|
--eun-content-pressed-tint: rgba(248, 250, 255, 0.14);
|
|
70
74
|
}
|
|
@@ -63,8 +63,12 @@
|
|
|
63
63
|
@include eunomia-dark-neutrals();
|
|
64
64
|
|
|
65
65
|
--eun-surface-tint: #2f2e39;
|
|
66
|
-
--eun-
|
|
67
|
-
|
|
66
|
+
--eun-border-tint: color-mix(
|
|
67
|
+
in srgb,
|
|
68
|
+
var(--eun-color-primary-500) 5%,
|
|
69
|
+
var(--eun-border-color)
|
|
70
|
+
);
|
|
71
|
+
--eun-divider-tint: var(--eun-border-tint);
|
|
68
72
|
--eun-content-hover-tint: rgba(253, 245, 245, 0.08);
|
|
69
73
|
--eun-content-pressed-tint: rgba(253, 245, 245, 0.14);
|
|
70
74
|
}
|
|
@@ -63,8 +63,12 @@
|
|
|
63
63
|
@include eunomia-dark-neutrals();
|
|
64
64
|
|
|
65
65
|
--eun-surface-tint: #2b363f;
|
|
66
|
-
--eun-
|
|
67
|
-
|
|
66
|
+
--eun-border-tint: color-mix(
|
|
67
|
+
in srgb,
|
|
68
|
+
var(--eun-color-primary-500) 5%,
|
|
69
|
+
var(--eun-border-color)
|
|
70
|
+
);
|
|
71
|
+
--eun-divider-tint: var(--eun-border-tint);
|
|
68
72
|
--eun-content-hover-tint: rgba(249, 253, 251, 0.08);
|
|
69
73
|
--eun-content-pressed-tint: rgba(249, 253, 251, 0.14);
|
|
70
74
|
}
|
|
@@ -63,8 +63,12 @@
|
|
|
63
63
|
@include eunomia-dark-neutrals();
|
|
64
64
|
|
|
65
65
|
--eun-surface-tint: #2e3339;
|
|
66
|
-
--eun-
|
|
67
|
-
|
|
66
|
+
--eun-border-tint: color-mix(
|
|
67
|
+
in srgb,
|
|
68
|
+
var(--eun-color-primary-500) 5%,
|
|
69
|
+
var(--eun-border-color)
|
|
70
|
+
);
|
|
71
|
+
--eun-divider-tint: var(--eun-border-tint);
|
|
68
72
|
--eun-content-hover-tint: rgba(252, 251, 246, 0.08);
|
|
69
73
|
--eun-content-pressed-tint: rgba(252, 251, 246, 0.14);
|
|
70
74
|
}
|
|
@@ -63,8 +63,12 @@
|
|
|
63
63
|
@include eunomia-dark-neutrals();
|
|
64
64
|
|
|
65
65
|
--eun-surface-tint: #2a3542;
|
|
66
|
-
--eun-
|
|
67
|
-
|
|
66
|
+
--eun-border-tint: color-mix(
|
|
67
|
+
in srgb,
|
|
68
|
+
var(--eun-color-primary-500) 5%,
|
|
69
|
+
var(--eun-border-color)
|
|
70
|
+
);
|
|
71
|
+
--eun-divider-tint: var(--eun-border-tint);
|
|
68
72
|
--eun-content-hover-tint: rgba(248, 253, 254, 0.08);
|
|
69
73
|
--eun-content-pressed-tint: rgba(248, 253, 254, 0.14);
|
|
70
74
|
}
|
|
@@ -63,8 +63,12 @@
|
|
|
63
63
|
@include eunomia-dark-neutrals();
|
|
64
64
|
|
|
65
65
|
--eun-surface-tint: #2a2d37;
|
|
66
|
-
--eun-
|
|
67
|
-
|
|
66
|
+
--eun-border-tint: color-mix(
|
|
67
|
+
in srgb,
|
|
68
|
+
var(--eun-color-primary-500) 5%,
|
|
69
|
+
var(--eun-border-color)
|
|
70
|
+
);
|
|
71
|
+
--eun-divider-tint: var(--eun-border-tint);
|
|
68
72
|
--eun-content-hover-tint: rgba(248, 245, 244, 0.08);
|
|
69
73
|
--eun-content-pressed-tint: rgba(248, 245, 244, 0.14);
|
|
70
74
|
}
|
|
@@ -63,8 +63,12 @@
|
|
|
63
63
|
@include eunomia-dark-neutrals();
|
|
64
64
|
|
|
65
65
|
--eun-surface-tint: #2a2d40;
|
|
66
|
-
--eun-
|
|
67
|
-
|
|
66
|
+
--eun-border-tint: color-mix(
|
|
67
|
+
in srgb,
|
|
68
|
+
var(--eun-color-primary-500) 5%,
|
|
69
|
+
var(--eun-border-color)
|
|
70
|
+
);
|
|
71
|
+
--eun-divider-tint: var(--eun-border-tint);
|
|
68
72
|
--eun-content-hover-tint: rgba(248, 245, 252, 0.08);
|
|
69
73
|
--eun-content-pressed-tint: rgba(248, 245, 252, 0.14);
|
|
70
74
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r,j as a}from"./chunk-YITWLCD3.js";var o=n=>{class e extends n{constructor(){super(...arguments);this.appearance="outline"}}return r([a({reflect:!0})],e.prototype,"appearance",2),e};export{o as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=class e extends Event{static{this.eventName="euncancel"}constructor(){super(e.eventName,{bubbles:!0,composed:!0,cancelable:!0})}};var o=class e extends Event{static{this.eventName="eundirtyclose"}constructor(){super(e.eventName,{bubbles:!0,composed:!0,cancelable:!0})}};function s(e,a){let t=e;if(!t.defaultPrevented)switch(t.command){case"show-modal":a.show();break;case"close":a.hide();break;case"request-close":a.requestClose();break;default:break}}export{n as a,o as b,s as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as n}from"./chunk-VOTRXBDS.js";import{a as r}from"./chunk-YYCEPZUN.js";import{a as i,j as a}from"./chunk-YITWLCD3.js";var p=s=>{class t extends s{constructor(){super(...arguments);this.checked=!1;this.checkable=!0;this.buildCommonValidators=()=>this.required&&!this.checked?{validity:{valueMissing:!0},message:this.validationDictionary.validation.valueMissing}:{validity:{}}}connectedCallback(){super.connectedCallback?.(),this.hasAttribute("role")||this.setAttribute("role","checkbox"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.defaultChecked!==void 0&&!this.hasAttribute("checked")&&(this.checked=this.defaultChecked),this.addEventListener("keydown",this.handleKeydown)}formResetCallback(){this.checked=this.defaultChecked??!1,this.dirty=!1,this.touched=!1}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback?.()}updated(e){super.updated(e),e.has("checked")&&(this.setAttribute("aria-checked",String(this.checked)),this.updateInternals()),n(e)&&this.setAttribute("aria-invalid",String(this.showError)),e.has("required")&&this.setAttribute("aria-required",String(this.required))}handleClick(e){this.handleChange(e)}handleChange(e){if(e.stopPropagation(),!(this.disabled||this.readonly||this.inert)){if(e.preventDefault(),this.checked=!this.checked,this.updateInternals(),this.checkValidity(this.checked),this.description){let d=this.description instanceof Array?this.description.join(","):this.description;this.setAttribute("aria-description",d)}else this.removeAttribute("aria-description");this.dispatchEvent(new r(this.checked))}}handleKeydown(e){e.key===" "&&(e.preventDefault(),this.handleChange(e))}updateInternals(){this.setFormValue(this.valueState)}}return i([a({type:Boolean,reflect:!0})],t.prototype,"checked",2),i([a({type:Boolean,attribute:"default-checked"})],t.prototype,"defaultChecked",2),t};export{p as a};
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import{a as L}from"./chunk-G5SBDQQ3.js";import{a as E}from"./chunk-L74LXUGL.js";import{a as V}from"./chunk-UYZR4JXZ.js";import{a as T}from"./chunk-4PI6RDUS.js";import{a as M}from"./chunk-BO3JOEWM.js";import{a as o,c as w,d as x,e as $,f as d}from"./chunk-VOTRXBDS.js";import{a as h}from"./chunk-YYCEPZUN.js";import{a as v}from"./chunk-RS7TWEMQ.js";import{a as l}from"./chunk-PPCHQG7P.js";import{a as p}from"./chunk-O7PHBLH2.js";import{a as t,f as u,h as b,j as i,k as m,l as f,n as y,p as r,r as n,u as g}from"./chunk-YITWLCD3.js";var C=b`
|
|
2
|
-
.has-trailing-action #field {
|
|
3
|
-
padding-inline-end: calc(
|
|
4
|
-
calc(var(--eun-space-l, 32px) * 1.2) + var(--eun-space-xs, 4px)
|
|
5
|
-
);
|
|
6
|
-
}
|
|
7
|
-
#field[type="search"]::-webkit-search-cancel-button {
|
|
8
|
-
appearance: none;
|
|
9
|
-
display: none;
|
|
10
|
-
}
|
|
11
|
-
`,S=[V,C];var P="eun-input",A=v($(g)),F=T(M(x(L(w(A))))),e=class extends F{constructor(){super(...arguments);this.type="text";this.clearable=!1;this.autocomplete="off";this.emptyValueLabel="No value set";this.confirmLabel="Save";this.cancelLabel="Cancel";this.ariaLabelClear="Clear field";this.ariaLabelShowPassword="Show password";this.ariaLabelHidePassword="Hide password";this.showPassword=!1;this.handleIconSlotChange=()=>{this.requestUpdate()};this.checkLocalValidators=()=>E(this.fieldEl,["valueMissing","typeMismatch","patternMismatch","tooShort","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","badInput"])}get defaultValue(){return super.defaultValue}set defaultValue(a){super.defaultValue=a}focusTarget(){return this.fieldEl}updated(a){super.updated(a),a.has("editing")&&this.editing&&this.fieldEl?.focus(),a.has("disabled")&&(this.disabled?this.setAttribute("tabindex","-1"):this.removeAttribute("tabindex"))}getFocusAnchor(){return this.fieldEl??void 0}focus(){super.focus?.(),this.focusTarget()?.focus()}handleInput(a){this.value=a.target.value,this.dispatchEvent(new h(this.value))}handleClear(){this.value="",this.dispatchEvent(new h(this.value)),this.fieldEl?.focus()}togglePasswordVisibility(){this.showPassword=!this.showPassword}renderReadonlyDisplay(){let a=!!this.value?.trim().length;return r`
|
|
12
|
-
<div
|
|
13
|
-
id="readonly-display"
|
|
14
|
-
role="button"
|
|
15
|
-
tabindex="0"
|
|
16
|
-
aria-label=${l(this.label)}
|
|
17
|
-
@click=${this.startEdit}
|
|
18
|
-
@keydown=${s=>(s.key==="Enter"||s.key===" ")&&this.startEdit()}
|
|
19
|
-
>
|
|
20
|
-
<span class=${p({empty:!a})}
|
|
21
|
-
>${a?this.value:this.emptyValueLabel}</span
|
|
22
|
-
>
|
|
23
|
-
</div>
|
|
24
|
-
`}renderTrailingAddon(a){return n}hasTrailingAddon(){return!1}renderField(a){let s=this.type==="password",c=this.clearable&&!s&&!!this.value&&!this.disabled;return r`
|
|
25
|
-
<div
|
|
26
|
-
id="field-wrapper"
|
|
27
|
-
class=${p({"has-icon":!!this.icon||!!this.iconSlotEls?.length,"has-trailing-action":c||s||this.hasTrailingAddon()})}
|
|
28
|
-
>
|
|
29
|
-
<slot name="icon" @slotchange=${this.handleIconSlotChange}>
|
|
30
|
-
${this.icon?r`<eun-icon id="icon" name=${this.icon} size="16"></eun-icon>`:n}
|
|
31
|
-
</slot>
|
|
32
|
-
<input
|
|
33
|
-
id="field"
|
|
34
|
-
type=${s?this.showPassword?"text":"password":this.type}
|
|
35
|
-
.value=${this.value??""}
|
|
36
|
-
placeholder=${l(this.placeholder)}
|
|
37
|
-
autocomplete=${this.autocomplete}
|
|
38
|
-
?disabled=${this.disabled}
|
|
39
|
-
?readonly=${this.readonly}
|
|
40
|
-
?required=${this.required}
|
|
41
|
-
minlength=${l(this.minlength)}
|
|
42
|
-
maxlength=${l(this.maxlength)}
|
|
43
|
-
pattern=${l(this.pattern)}
|
|
44
|
-
min=${l(this.min)}
|
|
45
|
-
max=${l(this.max)}
|
|
46
|
-
step=${l(this.step)}
|
|
47
|
-
inputmode=${this.type==="number"?"numeric":this.type==="email"?"email":n}
|
|
48
|
-
aria-invalid=${this.showError}
|
|
49
|
-
aria-label=${l(this.label)}
|
|
50
|
-
aria-describedby=${a?"description":n}
|
|
51
|
-
@input=${this.handleInput}
|
|
52
|
-
/>
|
|
53
|
-
${o(c,()=>r`
|
|
54
|
-
<button
|
|
55
|
-
type="button"
|
|
56
|
-
id="clear"
|
|
57
|
-
@click=${this.handleClear}
|
|
58
|
-
aria-label=${this.ariaLabelClear}
|
|
59
|
-
tabindex="-1"
|
|
60
|
-
>
|
|
61
|
-
<eun-icon name="cancel" size="16"></eun-icon>
|
|
62
|
-
</button>
|
|
63
|
-
`)}
|
|
64
|
-
${o(s,()=>r`
|
|
65
|
-
<button
|
|
66
|
-
type="button"
|
|
67
|
-
id="password-toggle"
|
|
68
|
-
@click=${this.togglePasswordVisibility}
|
|
69
|
-
aria-label=${this.showPassword?this.ariaLabelHidePassword:this.ariaLabelShowPassword}
|
|
70
|
-
aria-pressed=${this.showPassword}
|
|
71
|
-
tabindex="-1"
|
|
72
|
-
>
|
|
73
|
-
<eun-icon
|
|
74
|
-
name=${this.showPassword?"visibility_off":"visibility"}
|
|
75
|
-
size="16"
|
|
76
|
-
></eun-icon>
|
|
77
|
-
</button>
|
|
78
|
-
`)}
|
|
79
|
-
${this.renderTrailingAddon(c)}
|
|
80
|
-
</div>
|
|
81
|
-
${o(this.readonlyAvailable,()=>r`
|
|
82
|
-
<div id="edit-actions">
|
|
83
|
-
<eun-button
|
|
84
|
-
class="confirm"
|
|
85
|
-
size="s"
|
|
86
|
-
color="primary"
|
|
87
|
-
appearance="default"
|
|
88
|
-
rounded
|
|
89
|
-
type="button"
|
|
90
|
-
@click=${this.confirmEdit}
|
|
91
|
-
>${this.confirmLabel}</eun-button
|
|
92
|
-
>
|
|
93
|
-
<eun-button
|
|
94
|
-
class="cancel"
|
|
95
|
-
size="s"
|
|
96
|
-
appearance="flat"
|
|
97
|
-
rounded
|
|
98
|
-
type="button"
|
|
99
|
-
@click=${this.cancelEdit}
|
|
100
|
-
>${this.cancelLabel}</eun-button
|
|
101
|
-
>
|
|
102
|
-
</div>
|
|
103
|
-
`)}
|
|
104
|
-
`}render(){let a=this.readonlyAvailable&&!this.editing,s=this.renderDescription();return r`
|
|
105
|
-
<div id="wrapper">
|
|
106
|
-
${this.renderFormLabels(a?void 0:"field")}
|
|
107
|
-
${a?this.renderReadonlyDisplay():this.renderField(s!==n)}
|
|
108
|
-
${s}
|
|
109
|
-
</div>
|
|
110
|
-
`}};e.styles=[S,d.base,d.errorMessages,d.hintMessages],t([i({reflect:!0})],e.prototype,"type",2),t([i({attribute:"default-value"})],e.prototype,"defaultValue",1),t([i()],e.prototype,"placeholder",2),t([i()],e.prototype,"icon",2),t([i({type:Boolean})],e.prototype,"clearable",2),t([i()],e.prototype,"autocomplete",2),t([i({type:Number})],e.prototype,"minlength",2),t([i({type:Number})],e.prototype,"maxlength",2),t([i()],e.prototype,"pattern",2),t([i()],e.prototype,"min",2),t([i()],e.prototype,"max",2),t([i()],e.prototype,"step",2),t([i({attribute:"empty-value-label"})],e.prototype,"emptyValueLabel",2),t([i({attribute:"confirm-label"})],e.prototype,"confirmLabel",2),t([i({attribute:"cancel-label"})],e.prototype,"cancelLabel",2),t([i({attribute:"aria-label-clear"})],e.prototype,"ariaLabelClear",2),t([i({attribute:"aria-label-show-password"})],e.prototype,"ariaLabelShowPassword",2),t([i({attribute:"aria-label-hide-password"})],e.prototype,"ariaLabelHidePassword",2),t([m()],e.prototype,"showPassword",2),t([f("#field")],e.prototype,"fieldEl",2),t([y({slot:"icon"})],e.prototype,"iconSlotEls",2),e=t([u(P)],e);export{P as a,e as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r,j as a}from"./chunk-YITWLCD3.js";var e=class t extends Event{static{this.eventName="euncommit"}constructor(){super(t.eventName,{bubbles:!0,composed:!1})}};var c=t=>{class i extends t{constructor(){super(...arguments);this.readonlyAvailable=!1;this.editing=!1}startEdit(){this.disabled||!this.readonlyAvailable||this.editing||(this.valueOnEditStart=this.value,this.editing=!0)}confirmEdit(){this.checkValidity(this.value)&&(this.editing=!1,this.dispatchEvent(new e))}cancelEdit(){this.value=this.valueOnEditStart,this.editing=!1}}return r([a({type:Boolean,attribute:"readonly-available",reflect:!0})],i.prototype,"readonlyAvailable",2),r([a({type:Boolean,reflect:!0})],i.prototype,"editing",2),i};export{c as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t="en";function r(){return t}var n={datePicker:{previousMonth:"Previous month",chooseMonthYear:"Choose month and year",nextMonth:"Next month",previousYear:"Previous year",chooseYear:"Choose year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",time:"Time",amPm:"AM/PM",hour:"Hour",minute:"Minute",heading:{day:{single:"Select a date",range:"Select a date range"},month:{single:"Select a month",range:"Select a month range"},year:{single:"Select a year",range:"Select a year range"}},modalPreview:{day:{single:"Select date",range:"Select date range"},month:{single:"Select month",range:"Select month range"},year:{single:"Select year",range:"Select year range"}}},timePicker:{amPm:"AM/PM",hour:"Hour",minute:"Minute",time:"Time",selectATime:"Select a time",mustBeAtOrAfter:e=>`Time must be at or after ${e}`,mustBeAtOrBefore:e=>`Time must be at or before ${e}`},scheduler:{calendarView:"Calendar view"},carousel:{ofTotal:(e,i)=>`${e} of ${i}`,slideNavigation:"Slide navigation",previous:"Previous slide",next:"Next slide",goToSlide:(e,i)=>`Go to slide ${e} of ${i}`},imageCarousel:{gallery:"Image gallery",previous:"Previous image",next:"Next image",expand:"View full-size image",lightbox:"Image viewer",selectImage:"Select image",showImage:(e,i)=>`Show image ${e} of ${i}`,imageNavigation:"Image navigation",goToImage:(e,i)=>`Go to image ${e} of ${i}`,allImages:"All images"},chip:{remove:"Remove"},infiniteList:{loadingMore:"Loading more items\u2026",itemsLoaded:e=>`${e} more item${e>1?"s":""} loaded`},table:{loadingMore:"Loading more rows\u2026",selected:"selected",selectAll:"Select all",deselectAll:"Deselect all",selectAllRows:"Select all rows",deselectAllRows:"Deselect all rows",selectRow:"Select row",selectionActions:"Selection actions",clearSelection:"Clear selection",rowActions:"Row actions",rowsLoaded:e=>`${e} more row${e>1?"s":""} loaded`},link:{opensInNewTab:"opens in a new tab"},validation:{valueMissing:"This field is required",tooShort:(e,i)=>`Please lengthen this text to ${e} characters or more (you are currently using ${i} characters).`,tooLong:(e,i)=>`Please shorten this text to ${e} characters or less (you are currently using ${i} characters).`,invalidDate:"Enter a valid date",invalidTime:"Enter a valid time"}};var a={datePicker:{previousMonth:"Mois pr\xE9c\xE9dent",chooseMonthYear:"Choisir le mois et l'ann\xE9e",nextMonth:"Mois suivant",previousYear:"Ann\xE9e pr\xE9c\xE9dente",chooseYear:"Choisir l'ann\xE9e",nextYear:"Ann\xE9e suivante",previousYears:"Ann\xE9es pr\xE9c\xE9dentes",nextYears:"Ann\xE9es suivantes",time:"Heure",amPm:"AM/PM",hour:"Heure",minute:"Minute",heading:{day:{single:"S\xE9lectionner une date",range:"S\xE9lectionner une plage de dates"},month:{single:"S\xE9lectionner un mois",range:"S\xE9lectionner une plage de mois"},year:{single:"S\xE9lectionner une ann\xE9e",range:"S\xE9lectionner une plage d'ann\xE9es"}},modalPreview:{day:{single:"S\xE9lectionner une date",range:"S\xE9lectionner une plage de dates"},month:{single:"S\xE9lectionner un mois",range:"S\xE9lectionner une plage de mois"},year:{single:"S\xE9lectionner une ann\xE9e",range:"S\xE9lectionner une plage d'ann\xE9es"}}},timePicker:{amPm:"AM/PM",hour:"Heure",minute:"Minute",time:"Heure",selectATime:"S\xE9lectionner une heure",mustBeAtOrAfter:e=>`L'heure doit \xEAtre \xE0 ${e} ou apr\xE8s`,mustBeAtOrBefore:e=>`L'heure doit \xEAtre \xE0 ${e} ou avant`},scheduler:{calendarView:"Vue du calendrier"},carousel:{ofTotal:(e,i)=>`${e} sur ${i}`,slideNavigation:"Navigation des diapositives",previous:"Diapositive pr\xE9c\xE9dente",next:"Diapositive suivante",goToSlide:(e,i)=>`Aller \xE0 la diapositive ${e} sur ${i}`},imageCarousel:{gallery:"Galerie d'images",previous:"Image pr\xE9c\xE9dente",next:"Image suivante",expand:"Voir l'image en taille r\xE9elle",lightbox:"Visionneuse d'images",selectImage:"S\xE9lectionner une image",showImage:(e,i)=>`Afficher l'image ${e} sur ${i}`,imageNavigation:"Navigation des images",goToImage:(e,i)=>`Aller \xE0 l'image ${e} sur ${i}`,allImages:"Toutes les images"},chip:{remove:"Retirer"},infiniteList:{loadingMore:"Chargement d'autres \xE9l\xE9ments\u2026",itemsLoaded:e=>e>1?`${e} \xE9l\xE9ments suppl\xE9mentaires charg\xE9s`:`${e} \xE9l\xE9ment suppl\xE9mentaire charg\xE9`},table:{loadingMore:"Chargement d'autres lignes\u2026",selected:"s\xE9lectionn\xE9e(s)",selectAll:"Tout s\xE9lectionner",deselectAll:"Tout d\xE9s\xE9lectionner",selectAllRows:"S\xE9lectionner toutes les lignes",deselectAllRows:"D\xE9s\xE9lectionner toutes les lignes",selectRow:"S\xE9lectionner la ligne",selectionActions:"Actions de s\xE9lection",clearSelection:"Vider la s\xE9lection",rowActions:"Actions de la ligne",rowsLoaded:e=>e>1?`${e} lignes suppl\xE9mentaires charg\xE9es`:`${e} ligne suppl\xE9mentaire charg\xE9e`},link:{opensInNewTab:"ouvre dans un nouvel onglet"},validation:{valueMissing:"Ce champ est obligatoire",tooShort:(e,i)=>`Saisissez au moins ${e} caract\xE8res (actuellement ${i}).`,tooLong:(e,i)=>`Saisissez au plus ${e} caract\xE8res (actuellement ${i}).`,invalidDate:"Saisissez une date valide",invalidTime:"Saisissez une heure valide"}};var d={en:n,fr:a};export{r as a,d as b};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{p as i}from"./chunk-YITWLCD3.js";function l(e){let n=[];for(let t of e)if(t instanceof HTMLOptionElement)n.push({value:t.value,label:t.textContent?.trim()??t.value});else if(t instanceof HTMLOptGroupElement)for(let o of Array.from(t.querySelectorAll("option")))n.push({value:o.value,label:o.textContent?.trim()??o.value,group:t.label});return n}function p(e,n){if(!n)return e;let t=e.toLowerCase().indexOf(n);return t===-1?e:i`${e.slice(0,t)}<mark
|
|
2
|
-
>${e.slice(t,t+n.length)}</mark
|
|
3
|
-
>${e.slice(t+n.length)}`}export{l as a,p as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i,j as r}from"./chunk-YITWLCD3.js";var l=s=>{class e extends s{constructor(){super(...arguments);this.disabled=!1}updated(t){super.updated(t),t.has("disabled")&&(this.setAttribute("tabindex",this.disabled?"-1":"0"),this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}}return i([r({type:Boolean,reflect:!0})],e.prototype,"disabled",2),e};export{l as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[contenteditable='true']","[tabindex]"].join(",");function i(e){return e.getClientRects().length>0}function s(e,l){if(!(e instanceof HTMLElement))return!1;let t=e.getAttribute("tabindex");return t!==null&&Number.parseInt(t,10)<0||!e.matches(a)?!1:l.requireRendered===!1||i(e)}function o(e,l){let t;if(e instanceof HTMLSlotElement){let n=e.assignedElements({flatten:!0});t=n.length>0?n:Array.from(e.children)}else t=Array.from(e.children);for(let n of t){if(l(n))return!0;let r=n.shadowRoot??n;if(o(r,l))return!0}return!1}function u(e,l={}){let t=[];return o(e,n=>(s(n,l)&&t.push(n),!1)),t}function c(e,l={}){return o(e,t=>s(t,l))}export{u as a,c as b};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-YYCEPZUN.js";import{a as b,b as m}from"./chunk-KSZRQRN4.js";import{a as r,h as p,j as n,k as o,p as u,r as v}from"./chunk-YITWLCD3.js";function V(l,i,c){return l?i(l):c?.(l)}var k=["valid","hideError","disabled","touched","dirty","validationRequested","error"],F=l=>k.some(i=>l.has(i)),B=l=>{class i extends l{constructor(...e){super(...e);this.hideError=!1;this.checkable=!1;this.checked=!1;this.dirty=!1;this.touched=!1;this.validationRequested=!1;this.controlled=!1;this.#e=()=>{this.dirty||(this.dirty=!0)};this.#t=()=>{this.touched||(this.touched=!0)};this.#i=()=>{this.validationRequested=!0};this.internals||(this.internals=this.attachInternals())}static{this.formAssociated=!0}#e;#t;#i;get showError(){return!this.valid&&!this.hideError&&!this.disabled&&(this.touched||this.dirty||this.validationRequested||!!this.error)}get pristine(){return!this.dirty}get untouched(){return!this.touched}get defaultValue(){return this.internalDefaultValue}set defaultValue(e){let t=this.value==null||Array.isArray(this.value)&&this.value.length===0;e!=null&&(this.defaultValue==null||this.defaultValue==="")&&t&&(this.value=e),this.internalDefaultValue=e}get value(){return this.valueState}set value(e){this.valueState=e,this.setFormValue(e)}get description(){return this.showError?this.errorMessages.length?this.errorMessages:this.validationMessage.length?this.validationMessage:this.hint:this.hint}get form(){return this.internals.form}get type(){return this.localName}getValueToValidate(){return this.checkable?this.checked:this.value}connectedCallback(){super.connectedCallback?.(),this.checkable&&this.checked&&this.setFormValue(this.value),this.checkable||this.defaultValue===void 0||this.defaultValue===""||(this.value=this.defaultValue),this.checkValidity(this.value),this.addEventListener(y.eventName,this.#e),this.addEventListener("focusout",this.#t),this.addEventListener("invalid",this.#i)}disconnectedCallback(){this.removeEventListener(y.eventName,this.#e),this.removeEventListener("focusout",this.#t),this.removeEventListener("invalid",this.#i),super.disconnectedCallback?.()}willUpdate(e){(e.has("value")||e.has("valueState")||e.has("checked")||e.has("validators")||e.has("required")||e.has("error"))&&this.checkValidity(),super.willUpdate(e)}setFormValue(e){let t=new FormData;if(this.disabled||this.checkable&&!this.checked){this.internals.setFormValue(t);return}let s=this.name||this.getAttribute("name");if(!s){this.internals.setFormValue(t);return}Array.isArray(e)?e.forEach(a=>t.append(s,a instanceof File?a:String(a))):e!=null&&(e instanceof File?t.append(s,e):t.append(s,this.checkable&&!this.value?"on":String(e))),this.internals.setFormValue(t)}formResetCallback(){this.controlled||(this.checkable?this.checked=!1:this.value=this.defaultValue),this.dirty=!1,this.touched=!1,this.validationRequested=!1}renderDescription(){return this.renderError()}renderError(){let{description:e}=this;return e?.length?this.showError?u`
|
|
2
|
-
<p id="description" class="error-messages">
|
|
3
|
-
${V(Array.isArray(e),()=>e.map(t=>u`<span>${t}</span>`),()=>u`<span>${e}</span>`)}
|
|
4
|
-
</p>
|
|
5
|
-
`:u`
|
|
6
|
-
<p id="description" class="hint-messages">
|
|
7
|
-
<span>${e}</span>
|
|
8
|
-
</p>
|
|
9
|
-
`:v}}return r([n({reflect:!0})],i.prototype,"name",2),r([n()],i.prototype,"hint",2),r([n({type:Boolean,attribute:"hide-error"})],i.prototype,"hideError",2),r([o()],i.prototype,"valueState",2),r([o()],i.prototype,"dirty",2),r([o()],i.prototype,"touched",2),r([o()],i.prototype,"validationRequested",2),r([n({type:Boolean})],i.prototype,"controlled",2),r([n({attribute:"default-value",converter:{fromAttribute:e=>e?e.split(","):void 0,toAttribute:e=>e?.join(",")??null}})],i.prototype,"defaultValue",1),r([n()],i.prototype,"value",1),i};var $=l=>{class i extends l{constructor(){super(...arguments);this.readonly=!1}updated(e){super.updated(e),e.has("readonly")&&this.setAttribute("aria-readonly",String(this.readonly))}}return r([n({type:Boolean,reflect:!0})],i.prototype,"readonly",2),i};var G=l=>{class i extends l{constructor(...e){super(...e);this.required=!1;this.valid=!0;this.errorMessages=[];this.internals||(this.internals=this.attachInternals())}get validationDictionary(){let e=this.locale;return m[e??b()]??m.en}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}checkLocalValidators(){return{validity:{}}}buildCommonValidators(){let{value:e}=this,t={},s,a=e==null||typeof e=="string"&&e.trim()===""||e instanceof Array&&!e.length;return this.required&&a&&(t.valueMissing=!0,s=this.validationDictionary.validation.valueMissing),{validity:t,message:s}}checkValidity(e=this.getValueToValidate()){let t=this.checkLocalValidators(),s=this.buildCommonValidators(),a={...t.validity,...s.validity},d=s.message||t.message,h=this.error?[this.error]:[];this.validators?.forEach(E=>this.collectErrors(h,E,e)),this.errorMessages=h,h.length>0&&(a.customError=!0,d=h.join(" ; ")),this.valid=!Object.values(a).some(Boolean);let f=this.getFocusAnchor?.();return this.valid||f||!this.getFocusAnchor?this.setValidity(a,d,f):this.updateComplete.then(()=>this.setValidity(a,d,f)),this.valid}reportValidity(e=this.getValueToValidate()){return this.checkValidity(e),this.internals.reportValidity()}collectErrors(e,t,s){if("~standard"in t){let a=t["~standard"].validate(s);if(a instanceof Promise)throw new TypeError("Validation schemas must be synchronous");a.issues&&e.push(...a.issues.map(d=>d.message))}return"isValid"in t&&(typeof t.isValid=="function"?!t.isValid(s,this.getValidityData()):t.isValid===!1)&&e.push(t.message),"isInvalid"in t&&t.isInvalid({value:s})&&e.push(t.message),e}setValidity(e,t,s){let a=this.validationMessage;this.internals.setValidity(e,t,s),t!==a&&this.requestUpdate("valid")}getValueToValidate(){return this.value}getValidityData(){return{}}}return r([n({type:Array})],i.prototype,"validators",2),r([n({type:Boolean})],i.prototype,"required",2),r([n()],i.prototype,"error",2),r([o()],i.prototype,"valid",2),i};var T=p`
|
|
10
|
-
#description {
|
|
11
|
-
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
12
|
-
display: block;
|
|
13
|
-
margin-block-start: var(--eun-space-xs, 4px);
|
|
14
|
-
font-size: var(--field-message-font-size, var(--eun-font-size-xs, 12px));
|
|
15
|
-
margin-block: 0;
|
|
16
|
-
}
|
|
17
|
-
#description span {
|
|
18
|
-
display: block;
|
|
19
|
-
margin-top: var(--eun-space-xs, 4px);
|
|
20
|
-
}
|
|
21
|
-
`,M=p`
|
|
22
|
-
.error-messages {
|
|
23
|
-
color: var(--_errorColor);
|
|
24
|
-
}
|
|
25
|
-
`,x=p`
|
|
26
|
-
.hint-messages {
|
|
27
|
-
color: var(--_hintColor);
|
|
28
|
-
}
|
|
29
|
-
`,W={base:T,errorMessages:M,hintMessages:x};export{V as a,F as b,B as c,$ as d,G as e,W as f};
|
|
30
|
-
/*! Bundled license information:
|
|
31
|
-
|
|
32
|
-
lit-html/directives/when.js:
|
|
33
|
-
(**
|
|
34
|
-
* @license
|
|
35
|
-
* Copyright 2021 Google LLC
|
|
36
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*)
|
|
38
|
-
*/
|