@eunomia/elements 1.0.0-beta.4 → 1.0.0-beta.6
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/breakpoints.d.ts +37 -10
- package/dist/breakpoints.js +38 -10
- package/dist/cdn/components/chunks/{chunk-MMLIPCOY.js → chunk-22D3SRFR.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-4MXL6PZC.js → chunk-2Y2EU2CI.js} +28 -28
- package/dist/cdn/components/chunks/chunk-3MTUVMM5.js +1 -0
- package/dist/cdn/components/chunks/chunk-4PI6RDUS.js +1 -0
- package/dist/cdn/components/chunks/chunk-5GKM5DIB.js +1 -0
- package/dist/cdn/components/chunks/chunk-624VJYNA.js +1 -0
- package/dist/cdn/components/chunks/{chunk-5XJLIHAU.js → chunk-7KKWYPHY.js} +4 -2
- package/dist/cdn/components/chunks/chunk-A3X4KD2X.js +1 -0
- package/dist/cdn/components/chunks/chunk-BKZGTCMF.js +1 -0
- package/dist/cdn/components/chunks/{chunk-GW3VP2L7.js → chunk-BO3JOEWM.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-NHFWATVN.js → chunk-BQFJR2UP.js} +5 -5
- package/dist/cdn/components/chunks/chunk-EUWUDCBZ.js +1 -0
- package/dist/cdn/components/chunks/{chunk-P32B7BFD.js → chunk-FF3I7C3C.js} +15 -15
- package/dist/cdn/components/chunks/{chunk-74AOAB4X.js → chunk-FOILAXLL.js} +6 -5
- package/dist/cdn/components/chunks/{chunk-E4IS25H7.js → chunk-G5SBDQQ3.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-LGLQ36QB.js → chunk-GDBPWZN6.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-S2UCEWNG.js → chunk-JYIIWN2P.js} +13 -11
- package/dist/cdn/components/chunks/{chunk-EOWBYZV7.js → chunk-KDN4O5W2.js} +26 -13
- package/dist/cdn/components/chunks/chunk-KSZRQRN4.js +1 -0
- package/dist/cdn/components/chunks/{chunk-PED5ATYN.js → chunk-L2ADCEN7.js} +1 -1
- package/dist/cdn/components/chunks/chunk-LMVW522V.js +1 -0
- package/dist/cdn/components/chunks/{chunk-5XJGYXW7.js → chunk-MOMYII3P.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-SIHZFOTK.js → chunk-MQQ4BGVJ.js} +5 -5
- package/dist/cdn/components/chunks/{chunk-A4EQSU36.js → chunk-O7PHBLH2.js} +1 -1
- package/dist/cdn/components/chunks/chunk-PD62MBOJ.js +1 -0
- package/dist/cdn/components/chunks/{chunk-KBH5PCUO.js → chunk-PE4DAXHQ.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-GSJEJLFA.js → chunk-PMPSJG5V.js} +7 -7
- package/dist/cdn/components/chunks/{chunk-5EVP7YNE.js → chunk-PPCHQG7P.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-EJIX2D4Z.js → chunk-QZ5SHR3I.js} +15 -11
- package/dist/cdn/components/chunks/chunk-RS7TWEMQ.js +1 -0
- package/dist/cdn/components/chunks/chunk-SMTIDNGW.js +1 -0
- package/dist/cdn/components/chunks/{chunk-YGUJJ25C.js → chunk-SZYEBMG6.js} +11 -10
- package/dist/cdn/components/chunks/chunk-UDVB4LAE.js +56 -0
- package/dist/cdn/components/chunks/{chunk-UAGCQF23.js → chunk-UYZR4JXZ.js} +17 -12
- package/dist/cdn/components/chunks/chunk-VG6NAAIV.js +1 -0
- package/dist/cdn/components/chunks/chunk-VJCNHMQZ.js +10 -0
- package/dist/cdn/components/chunks/chunk-VOTRXBDS.js +38 -0
- package/dist/cdn/components/chunks/{chunk-BMQOI7HX.js → chunk-VYFR364B.js} +128 -74
- package/dist/cdn/components/chunks/{chunk-IJ5WFMK4.js → chunk-XDPRWUKN.js} +7 -6
- package/dist/cdn/components/chunks/{chunk-XH6NREVZ.js → chunk-YITWLCD3.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-BQHYZB2W.js → chunk-ZBN4HTWP.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-RJCJXB7Y.js → chunk-ZKZV2YG5.js} +18 -18
- package/dist/cdn/components/eun-alert.js +24 -16
- package/dist/cdn/components/eun-animate.js +12 -6
- package/dist/cdn/components/eun-badge.js +7 -7
- package/dist/cdn/components/eun-breadcrumb.js +25 -41
- package/dist/cdn/components/eun-button.js +1 -1
- package/dist/cdn/components/eun-calendar.js +68 -66
- package/dist/cdn/components/eun-card.js +67 -13
- package/dist/cdn/components/eun-carousel.js +66 -35
- package/dist/cdn/components/eun-check-card.js +13 -6
- package/dist/cdn/components/eun-checkbox-list.js +4 -4
- package/dist/cdn/components/eun-checkbox.js +1 -1
- package/dist/cdn/components/eun-chip.js +1 -1
- package/dist/cdn/components/eun-collapse.js +87 -39
- package/dist/cdn/components/eun-color-picker.js +54 -53
- package/dist/cdn/components/eun-counter.js +14 -13
- package/dist/cdn/components/eun-date-picker.js +66 -63
- package/dist/cdn/components/eun-description-list.js +152 -0
- package/dist/cdn/components/eun-divider.js +1 -1
- package/dist/cdn/components/eun-drawer.js +26 -12
- package/dist/cdn/components/eun-dropdown-button.js +1 -1
- package/dist/cdn/components/eun-dropdown-item.js +6 -5
- package/dist/cdn/components/eun-fab.js +20 -19
- package/dist/cdn/components/eun-icon.js +1 -1
- package/dist/cdn/components/eun-image-card.js +79 -22
- package/dist/cdn/components/eun-image-carousel.js +92 -47
- package/dist/cdn/components/eun-infinite-list.js +23 -11
- package/dist/cdn/components/eun-input-file.js +14 -13
- package/dist/cdn/components/eun-input-phone.js +26 -26
- package/dist/cdn/components/eun-input.js +1 -1
- package/dist/cdn/components/eun-label.js +4 -4
- package/dist/cdn/components/eun-link.js +174 -27
- package/dist/cdn/components/eun-loader.js +1 -1
- package/dist/cdn/components/eun-modal.js +29 -22
- package/dist/cdn/components/eun-pagination.js +17 -12
- package/dist/cdn/components/eun-password-strength.js +6 -2
- package/dist/cdn/components/eun-progress-bar.js +13 -5
- package/dist/cdn/components/eun-radio-card.js +16 -9
- package/dist/cdn/components/eun-radio-list.js +4 -4
- package/dist/cdn/components/eun-radio.js +1 -1
- package/dist/cdn/components/eun-scheduler-event-editor.js +8 -8
- package/dist/cdn/components/eun-scheduler-event.js +1 -1
- package/dist/cdn/components/eun-scheduler.js +42 -42
- package/dist/cdn/components/eun-search.js +21 -20
- package/dist/cdn/components/eun-select.js +12 -11
- package/dist/cdn/components/eun-sidebar.js +34 -20
- package/dist/cdn/components/eun-skeleton.js +1 -1
- package/dist/cdn/components/eun-slider.js +15 -14
- package/dist/cdn/components/eun-sliding-card.js +8 -4
- package/dist/cdn/components/eun-step.js +17 -6
- package/dist/cdn/components/eun-stepper.js +17 -6
- package/dist/cdn/components/eun-switch.js +10 -8
- package/dist/cdn/components/eun-tab-group.js +22 -17
- package/dist/cdn/components/eun-tab-panel.js +11 -3
- 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 +572 -31
- package/dist/cdn/components/eun-tag.js +13 -7
- package/dist/cdn/components/eun-textarea.js +24 -24
- package/dist/cdn/components/eun-time-picker.js +21 -19
- package/dist/cdn/components/eun-toast.js +36 -16
- package/dist/cdn/components/eun-toggle-group.js +64 -37
- package/dist/cdn/components/eun-toggle-item.js +24 -21
- package/dist/cdn/components/eun-toggle.js +12 -10
- package/dist/cdn/components/eun-toolbar.js +62 -52
- package/dist/cdn/components/eun-tooltip.js +30 -14
- package/dist/cdn/styles/breakpoints.scss +8 -0
- package/dist/cdn/styles/eunomia-grid.scss +6 -0
- package/dist/cdn/styles/eunomia-themes.css +1 -1
- package/dist/cdn/styles/themes/eunomia-theme.css +1 -1
- package/dist/cdn/styles/themes/eunomia-theme.scss +4 -3
- package/dist/cdn/styles/themes/mixins/eunomia-a11y-color.mixin.scss +34 -1
- package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +4 -0
- package/dist/cdn/styles/themes/mixins/eunomia-states.mixin.scss +36 -12
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.scss +3 -2
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.scss +3 -2
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.scss +3 -2
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.scss +3 -2
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.scss +3 -2
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.scss +3 -2
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.mixin.scss +10 -10
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.scss +3 -2
- package/dist/cdn/styles/tools/indexes/eunomia-media-queries.index.scss +1 -3
- package/dist/cdn/styles/tools/indexes/eunomia-tools.index.scss +1 -0
- package/dist/cdn/styles/tools/mixins/layout/eunomia-grid.mixin.scss +117 -53
- package/dist/cdn/styles/tools/mixins/media-queries/eunomia-media-queries.mixin.scss +69 -0
- package/dist/cdn/styles/tools/mixins/settings/eunomia-alpha.mixin.scss +28 -4
- package/dist/cdn/styles/tools/mixins/settings/eunomia-motion.mixin.scss +9 -0
- package/dist/cdn/styles/tools/variables/eunomia.breakpoints.scss +4 -0
- package/dist/components/action/button/button.d.ts +51 -19
- package/dist/components/action/button/button.js +107 -24
- package/dist/components/action/button/button.styles.js +115 -62
- package/dist/components/action/dropdown-button/dropdown-button.d.ts +10 -10
- package/dist/components/action/dropdown-button/dropdown-button.js +18 -17
- package/dist/components/action/dropdown-button/dropdown-button.styles.js +3 -2
- package/dist/components/action/dropdown-button/dropdown-item.js +5 -6
- package/dist/components/action/dropdown-button/dropdown-item.styles.js +3 -2
- package/dist/components/action/fab/fab.d.ts +7 -6
- package/dist/components/action/fab/fab.js +11 -8
- package/dist/components/action/fab/fab.styles.js +18 -17
- package/dist/components/action/link/link.d.ts +72 -9
- package/dist/components/action/link/link.js +183 -23
- package/dist/components/action/link/link.styles.js +146 -10
- package/dist/components/action/shared-styles/button-palette.styles.d.ts +3 -3
- package/dist/components/action/shared-styles/button-palette.styles.js +29 -29
- package/dist/components/action/toggle/toggle-group.d.ts +17 -5
- package/dist/components/action/toggle/toggle-group.js +46 -19
- package/dist/components/action/toggle/toggle-group.styles.d.ts +4 -1
- package/dist/components/action/toggle/toggle-group.styles.js +56 -27
- package/dist/components/action/toggle/toggle-item.d.ts +4 -4
- package/dist/components/action/toggle/toggle-item.js +2 -2
- package/dist/components/action/toggle/toggle-item.styles.js +20 -17
- package/dist/components/action/toggle/toggle.d.ts +2 -0
- package/dist/components/action/toggle/toggle.js +2 -0
- package/dist/components/action/toggle/toggle.styles.d.ts +2 -0
- package/dist/components/action/toggle/toggle.styles.js +12 -8
- package/dist/components/alert/alert/alert.d.ts +2 -0
- package/dist/components/alert/alert/alert.js +2 -0
- package/dist/components/alert/alert/alert.styles.js +23 -13
- package/dist/components/alert/drawer/drawer.d.ts +3 -1
- package/dist/components/alert/drawer/drawer.js +5 -3
- package/dist/components/alert/drawer/drawer.styles.js +25 -9
- package/dist/components/alert/modal/modal.d.ts +11 -9
- package/dist/components/alert/modal/modal.js +15 -13
- package/dist/components/alert/modal/modal.styles.js +16 -7
- package/dist/components/alert/toast/toast.d.ts +2 -0
- package/dist/components/alert/toast/toast.js +2 -0
- package/dist/components/alert/toast/toast.styles.js +37 -15
- package/dist/components/content/badge/badge.d.ts +6 -6
- package/dist/components/content/badge/badge.js +4 -4
- package/dist/components/content/badge/badge.styles.js +4 -4
- package/dist/components/content/card/card.d.ts +39 -7
- package/dist/components/content/card/card.js +71 -7
- package/dist/components/content/card/card.styles.js +58 -11
- package/dist/components/content/card/image-card.d.ts +62 -7
- package/dist/components/content/card/image-card.js +121 -11
- package/dist/components/content/card/image-card.styles.js +66 -15
- package/dist/components/content/card/sliding-card.d.ts +4 -1
- package/dist/components/content/card/sliding-card.js +3 -0
- package/dist/components/content/card/sliding-card.styles.js +5 -1
- package/dist/components/content/collapse/collapse.d.ts +39 -12
- package/dist/components/content/collapse/collapse.js +65 -25
- package/dist/components/content/collapse/collapse.styles.d.ts +10 -1
- package/dist/components/content/collapse/collapse.styles.js +69 -18
- package/dist/components/content/description-list/description-list.d.ts +87 -0
- package/dist/components/content/description-list/description-list.js +107 -0
- package/dist/components/content/description-list/description-list.styles.d.ts +1 -0
- package/dist/components/content/description-list/description-list.styles.js +185 -0
- package/dist/components/content/icon/icon.d.ts +14 -2
- package/dist/components/content/icon/icon.js +54 -22
- package/dist/components/content/icon/icon.style.d.ts +2 -0
- package/dist/components/content/icon/icon.style.js +8 -2
- package/dist/components/content/image-carousel/image-carousel.d.ts +30 -19
- package/dist/components/content/image-carousel/image-carousel.js +48 -45
- package/dist/components/content/image-carousel/image-carousel.styles.js +69 -30
- package/dist/components/content/password-strength/password-strength.styles.js +5 -1
- package/dist/components/content/progress-bar/progress-bar.styles.js +12 -4
- package/dist/components/content/shared-styles/card-link.styles.js +5 -3
- package/dist/components/content/shared-styles/tone-surface.styles.d.ts +5 -0
- package/dist/components/content/shared-styles/tone-surface.styles.js +19 -14
- package/dist/components/content/tag/tag.d.ts +4 -0
- package/dist/components/content/tag/tag.js +4 -0
- package/dist/components/content/tag/tag.styles.js +14 -4
- package/dist/components/content/tooltip/tooltip.d.ts +3 -2
- package/dist/components/content/tooltip/tooltip.js +9 -16
- package/dist/components/content/tooltip/tooltip.styles.js +25 -7
- package/dist/components/form/checkbox/check-card.d.ts +4 -1
- package/dist/components/form/checkbox/check-card.js +4 -1
- package/dist/components/form/checkbox/check-card.styles.js +13 -4
- package/dist/components/form/checkbox/checkbox-list.d.ts +4 -1
- package/dist/components/form/checkbox/checkbox-list.js +11 -7
- package/dist/components/form/checkbox/checkbox.d.ts +4 -1
- package/dist/components/form/checkbox/checkbox.js +4 -1
- package/dist/components/form/checkbox/checkbox.styles.js +2 -2
- package/dist/components/form/color-picker/color-picker.d.ts +10 -4
- package/dist/components/form/color-picker/color-picker.js +23 -25
- package/dist/components/form/color-picker/color-picker.styles.js +6 -5
- package/dist/components/form/counter/counter.d.ts +7 -4
- package/dist/components/form/counter/counter.js +8 -5
- package/dist/components/form/counter/counter.styles.js +10 -9
- package/dist/components/form/date-picker/date-picker.d.ts +40 -36
- package/dist/components/form/date-picker/date-picker.js +35 -45
- package/dist/components/form/date-picker/date-picker.styles.js +13 -10
- package/dist/components/form/input/input.d.ts +10 -4
- package/dist/components/form/input/input.js +12 -6
- package/dist/components/form/input-file/input-file.d.ts +4 -1
- package/dist/components/form/input-file/input-file.js +8 -5
- package/dist/components/form/input-file/input-file.styles.js +3 -2
- package/dist/components/form/input-phone/input-phone.d.ts +11 -5
- package/dist/components/form/input-phone/input-phone.js +16 -20
- package/dist/components/form/input-phone/input-phone.styles.js +16 -16
- package/dist/components/form/label/label.styles.js +3 -3
- package/dist/components/form/radio/radio-card.d.ts +5 -2
- package/dist/components/form/radio/radio-card.js +5 -2
- package/dist/components/form/radio/radio-card.styles.js +14 -5
- package/dist/components/form/radio/radio-list.d.ts +5 -2
- package/dist/components/form/radio/radio-list.js +14 -10
- package/dist/components/form/radio/radio.d.ts +5 -2
- package/dist/components/form/radio/radio.js +5 -2
- package/dist/components/form/radio/radio.styles.js +4 -4
- package/dist/components/form/search/search.d.ts +2 -1
- package/dist/components/form/search/search.js +6 -15
- package/dist/components/form/search/search.styles.js +8 -7
- package/dist/components/form/select/select.d.ts +12 -5
- package/dist/components/form/select/select.js +18 -21
- package/dist/components/form/select/select.styles.js +3 -2
- package/dist/components/form/shared-styles/card.styles.js +5 -4
- package/dist/components/form/shared-styles/field.styles.js +21 -11
- package/dist/components/form/shared-styles/form-labels.styles.js +1 -1
- package/dist/components/form/slider/slider.d.ts +4 -1
- package/dist/components/form/slider/slider.js +5 -2
- package/dist/components/form/slider/slider.styles.js +8 -7
- package/dist/components/form/switch/switch.d.ts +4 -1
- package/dist/components/form/switch/switch.js +4 -1
- package/dist/components/form/switch/switch.styles.js +7 -5
- package/dist/components/form/textarea/textarea.d.ts +10 -4
- package/dist/components/form/textarea/textarea.js +18 -12
- package/dist/components/form/time-picker/time-picker-columns.styles.js +4 -2
- package/dist/components/form/time-picker/time-picker-list.styles.js +2 -1
- package/dist/components/form/time-picker/time-picker.d.ts +9 -5
- package/dist/components/form/time-picker/time-picker.js +25 -29
- package/dist/components/form/time-picker/time-picker.styles.js +9 -8
- package/dist/components/layout/animate/animate.d.ts +41 -11
- package/dist/components/layout/animate/animate.js +48 -16
- package/dist/components/layout/animate/animate.styles.js +9 -16
- package/dist/components/layout/infinite-list/infinite-list.d.ts +33 -10
- package/dist/components/layout/infinite-list/infinite-list.js +115 -18
- package/dist/components/layout/infinite-list/infinite-list.styles.d.ts +3 -0
- package/dist/components/layout/infinite-list/infinite-list.styles.js +17 -5
- package/dist/components/loader/loader/loader.styles.js +3 -1
- package/dist/components/navigation/breadcrumb/breadcrumb.d.ts +31 -45
- package/dist/components/navigation/breadcrumb/breadcrumb.js +111 -77
- package/dist/components/navigation/breadcrumb/breadcrumb.styles.d.ts +3 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.styles.js +22 -26
- package/dist/components/navigation/carousel/carousel.d.ts +30 -10
- package/dist/components/navigation/carousel/carousel.js +37 -18
- package/dist/components/navigation/carousel/carousel.styles.js +60 -20
- package/dist/components/navigation/pagination/pagination.styles.js +8 -3
- package/dist/components/navigation/sidebar/sidebar.d.ts +2 -0
- package/dist/components/navigation/sidebar/sidebar.js +2 -0
- package/dist/components/navigation/sidebar/sidebar.styles.js +27 -11
- package/dist/components/navigation/stepper/step.styles.js +16 -5
- package/dist/components/navigation/stepper/stepper.styles.js +16 -5
- package/dist/components/navigation/tabs/tab/tab.d.ts +11 -0
- package/dist/components/navigation/tabs/tab/tab.js +11 -0
- package/dist/components/navigation/tabs/tab/tab.styles.js +22 -16
- package/dist/components/navigation/tabs/tab-group/tab-group.js +7 -8
- package/dist/components/navigation/tabs/tab-group/tab-group.styles.js +19 -14
- package/dist/components/navigation/tabs/tab-panel/tab-panel.d.ts +4 -0
- package/dist/components/navigation/tabs/tab-panel/tab-panel.js +4 -0
- package/dist/components/navigation/tabs/tab-panel/tab-panel.styles.js +18 -1
- package/dist/components/navigation/toolbar/toolbar.d.ts +17 -49
- package/dist/components/navigation/toolbar/toolbar.js +23 -71
- package/dist/components/navigation/toolbar/toolbar.styles.js +59 -36
- package/dist/events/table-row-click.event.d.ts +5 -4
- package/dist/events/table-row-click.event.js +10 -5
- package/dist/features/scheduler/calendar/calendar.d.ts +12 -12
- package/dist/features/scheduler/calendar/calendar.js +15 -14
- package/dist/features/scheduler/calendar/calendar.styles.js +8 -6
- package/dist/features/scheduler/scheduler/scheduler.d.ts +7 -7
- package/dist/features/scheduler/scheduler/scheduler.js +21 -35
- package/dist/features/scheduler/scheduler/scheduler.styles.js +6 -4
- package/dist/features/scheduler/scheduler-event/scheduler-event.d.ts +12 -8
- package/dist/features/scheduler/scheduler-event/scheduler-event.js +9 -7
- package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +16 -10
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +5 -5
- package/dist/features/scheduler/shared/scheduler-event-popover.js +2 -2
- package/dist/features/scheduler/shared/scheduler-hour-grid.d.ts +2 -2
- package/dist/features/scheduler/shared/scheduler-hour-grid.js +3 -3
- package/dist/features/scheduler/shared/scheduler-hour-grid.styles.js +3 -3
- package/dist/features/scheduler/shared/scheduler-month-view.d.ts +3 -3
- package/dist/features/scheduler/shared/scheduler-month-view.js +2 -2
- package/dist/features/scheduler/shared/scheduler-month-view.styles.js +2 -2
- package/dist/features/scheduler/shared/scheduler-year-view.styles.js +2 -2
- package/dist/features/table/table/table-native.styles.d.ts +28 -0
- package/dist/features/table/table/table-native.styles.js +502 -0
- package/dist/features/table/table/table.d.ts +342 -294
- package/dist/features/table/table/table.js +820 -546
- package/dist/features/table/table/table.styles.js +31 -17
- package/dist/features/table/table/table.types.d.ts +18 -23
- package/dist/features/table/table/table.utils.d.ts +6 -36
- package/dist/features/table/table/table.utils.js +16 -65
- package/dist/features/table/table-action-bar/table-action-bar.d.ts +33 -16
- package/dist/features/table/table-action-bar/table-action-bar.js +18 -25
- package/dist/features/table/table-action-bar/table-action-bar.styles.js +15 -3
- package/dist/i18n/en.d.ts +34 -0
- package/dist/i18n/en.js +34 -0
- package/dist/i18n/fr.js +38 -0
- package/dist/index.d.ts +7 -13
- package/dist/index.js +6 -10
- package/dist/jsx.d.ts +1 -1
- package/dist/mixins/button.mixin.d.ts +10 -9
- package/dist/mixins/button.mixin.js +14 -6
- package/dist/mixins/card-link.mixin.d.ts +3 -2
- package/dist/mixins/card-link.mixin.js +12 -5
- package/dist/mixins/check.mixin.js +4 -5
- package/dist/mixins/disabled.mixin.d.ts +3 -3
- package/dist/mixins/disabled.mixin.js +10 -5
- package/dist/mixins/field-appearance.mixin.d.ts +19 -0
- package/dist/mixins/{field-variant.mixin.js → field-appearance.mixin.js} +11 -11
- package/dist/mixins/form.mixin.d.ts +17 -1
- package/dist/mixins/form.mixin.js +80 -25
- package/dist/mixins/radio.mixin.js +4 -5
- package/dist/mixins/validators.mixin.d.ts +7 -1
- package/dist/mixins/validators.mixin.js +36 -17
- package/dist/ssr/animate-ssr.css +27 -72
- package/dist/ssr/button-ssr.css +319 -0
- package/dist/ssr/card-ssr.css +184 -0
- package/dist/ssr/description-list-ssr.css +150 -0
- package/dist/ssr/links-ssr.css +35 -0
- package/dist/ssr/overlay-ssr.css +0 -41
- package/dist/ssr/rich-text.css +38 -0
- package/dist/ssr/sidebar-ssr.css +0 -38
- package/dist/ssr/table-ssr.css +472 -0
- package/dist/ssr/tag-ssr.css +197 -0
- package/dist/ssr/toolbar-ssr.css +77 -39
- package/dist/types/variant.type.d.ts +26 -10
- package/dist/utils/drag-drop.utils.js +18 -2
- package/dist/utils/dropdown-menu.utils.d.ts +2 -2
- package/dist/utils/dropdown-menu.utils.js +4 -14
- package/dist/utils/light-dom-styles.utils.d.ts +14 -0
- package/dist/utils/light-dom-styles.utils.js +37 -0
- package/dist/utils/media.styles.d.ts +19 -0
- package/dist/utils/media.styles.js +23 -0
- package/dist/utils/motion.utils.d.ts +40 -0
- package/dist/utils/motion.utils.js +51 -0
- package/dist/utils/navigation.utils.d.ts +14 -0
- package/dist/utils/navigation.utils.js +33 -0
- package/dist/utils/new-tab-anchor.controller.d.ts +44 -0
- package/dist/utils/new-tab-anchor.controller.js +102 -0
- package/dist/utils/severity-icon.utils.d.ts +1 -1
- package/dist/utils/severity-icon.utils.js +1 -1
- package/dist/utils/theme-generator.utils.d.ts +9 -2
- package/dist/utils/theme-generator.utils.js +62 -21
- package/package.json +24 -29
- package/styles/breakpoints.scss +8 -0
- package/styles/eunomia-grid.scss +6 -0
- package/styles/themes/eunomia-theme.scss +4 -3
- package/styles/themes/mixins/eunomia-a11y-color.mixin.scss +34 -1
- package/styles/themes/mixins/eunomia-neutrals.mixin.scss +4 -0
- package/styles/themes/mixins/eunomia-states.mixin.scss +36 -12
- package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/eunomia/eunomia.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/eunomia/eunomia.theme.scss +3 -2
- package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/fire/eunomia-fire.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.scss +3 -2
- package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/forest/eunomia-forest.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.scss +3 -2
- package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/gold/eunomia-gold.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.scss +3 -2
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.scss +3 -2
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.scss +3 -2
- package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/violet/eunomia-violet.mixin.scss +10 -10
- package/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.scss +3 -2
- package/styles/tools/indexes/eunomia-media-queries.index.scss +1 -3
- package/styles/tools/indexes/eunomia-tools.index.scss +1 -0
- package/styles/tools/mixins/layout/eunomia-grid.mixin.scss +117 -53
- package/styles/tools/mixins/media-queries/eunomia-media-queries.mixin.scss +69 -0
- package/styles/tools/mixins/settings/eunomia-alpha.mixin.scss +28 -4
- package/styles/tools/mixins/settings/eunomia-motion.mixin.scss +9 -0
- package/styles/tools/variables/eunomia.breakpoints.scss +4 -0
- package/dist/cdn/components/chunks/chunk-2JLDJFYD.js +0 -48
- package/dist/cdn/components/chunks/chunk-A6KGFALA.js +0 -132
- package/dist/cdn/components/chunks/chunk-ATH2OAMU.js +0 -1
- package/dist/cdn/components/chunks/chunk-BKHD4S57.js +0 -1
- package/dist/cdn/components/chunks/chunk-CEDHJUUH.js +0 -1
- package/dist/cdn/components/chunks/chunk-D2M4BV5Y.js +0 -328
- package/dist/cdn/components/chunks/chunk-E74CM7UG.js +0 -66
- package/dist/cdn/components/chunks/chunk-EST3M4AO.js +0 -1
- package/dist/cdn/components/chunks/chunk-GU6BVMFJ.js +0 -1
- package/dist/cdn/components/chunks/chunk-KVYUNKUO.js +0 -27
- package/dist/cdn/components/chunks/chunk-OAULRKHQ.js +0 -38
- package/dist/cdn/components/chunks/chunk-PCM7D3YF.js +0 -84
- package/dist/cdn/components/chunks/chunk-T4PTHUYF.js +0 -10
- package/dist/cdn/components/chunks/chunk-T7WABJEJ.js +0 -1
- package/dist/cdn/components/chunks/chunk-VRGRCYIO.js +0 -1
- package/dist/cdn/components/chunks/chunk-X2AUBZD2.js +0 -30
- package/dist/cdn/components/chunks/chunk-XSMCT4DF.js +0 -1
- package/dist/cdn/components/eun-breadcrumb-item.js +0 -93
- package/dist/cdn/components/eun-table-cell.js +0 -1
- package/dist/cdn/components/eun-table-column.js +0 -1
- package/dist/cdn/components/eun-table-header.js +0 -1
- package/dist/cdn/components/eun-table-item.js +0 -1
- package/dist/cdn/components/eun-table-skeleton-row.js +0 -1
- package/dist/cdn/styles/tools/mixins/media-queries/eunomia-device.mixin.scss +0 -14
- package/dist/cdn/styles/tools/mixins/media-queries/eunomia-gte.mixin.scss +0 -26
- package/dist/cdn/styles/tools/mixins/media-queries/eunomia-lte.mixin.scss +0 -26
- package/dist/components/navigation/breadcrumb/breadcrumb-item.d.ts +0 -77
- package/dist/components/navigation/breadcrumb/breadcrumb-item.js +0 -130
- package/dist/components/navigation/breadcrumb/breadcrumb-item.styles.d.ts +0 -6
- package/dist/components/navigation/breadcrumb/breadcrumb-item.styles.js +0 -78
- package/dist/features/table/native-table.css +0 -276
- package/dist/features/table/shared-styles/table-row.styles.d.ts +0 -7
- package/dist/features/table/shared-styles/table-row.styles.js +0 -47
- package/dist/features/table/shared-styles/table-shared.styles.d.ts +0 -23
- package/dist/features/table/shared-styles/table-shared.styles.js +0 -33
- package/dist/features/table/table-cell/table-cell.d.ts +0 -59
- package/dist/features/table/table-cell/table-cell.js +0 -73
- package/dist/features/table/table-cell/table-cell.styles.d.ts +0 -1
- package/dist/features/table/table-cell/table-cell.styles.js +0 -46
- package/dist/features/table/table-column/table-column.d.ts +0 -73
- package/dist/features/table/table-column/table-column.js +0 -89
- package/dist/features/table/table-column/table-column.styles.d.ts +0 -1
- package/dist/features/table/table-column/table-column.styles.js +0 -51
- package/dist/features/table/table-header/table-header.d.ts +0 -102
- package/dist/features/table/table-header/table-header.js +0 -165
- package/dist/features/table/table-header/table-header.styles.d.ts +0 -1
- package/dist/features/table/table-header/table-header.styles.js +0 -147
- package/dist/features/table/table-item/table-item.d.ts +0 -179
- package/dist/features/table/table-item/table-item.js +0 -291
- package/dist/features/table/table-item/table-item.styles.d.ts +0 -1
- package/dist/features/table/table-item/table-item.styles.js +0 -404
- package/dist/features/table/table-managed/table-managed.d.ts +0 -19
- package/dist/features/table/table-managed/table-managed.js +0 -128
- package/dist/features/table/table-skeleton-row/table-skeleton-row.d.ts +0 -46
- package/dist/features/table/table-skeleton-row/table-skeleton-row.js +0 -110
- package/dist/features/table/table-skeleton-row/table-skeleton-row.styles.d.ts +0 -12
- package/dist/features/table/table-skeleton-row/table-skeleton-row.styles.js +0 -65
- package/dist/mixins/field-variant.mixin.d.ts +0 -22
- package/dist/mixins/table-row.mixin.d.ts +0 -37
- package/dist/mixins/table-row.mixin.js +0 -103
- package/styles/tools/mixins/media-queries/eunomia-device.mixin.scss +0 -14
- package/styles/tools/mixins/media-queries/eunomia-gte.mixin.scss +0 -26
- package/styles/tools/mixins/media-queries/eunomia-lte.mixin.scss +0 -26
|
@@ -13,14 +13,36 @@ import { html, nothing } from "lit";
|
|
|
13
13
|
import { property, state } from "lit/decorators.js";
|
|
14
14
|
import { when } from "lit/directives/when.js";
|
|
15
15
|
import { ChangeEvent } from "../events/change.event.js";
|
|
16
|
+
/**
|
|
17
|
+
* Every property {@link FormMixinInterface.showError} depends on, for
|
|
18
|
+
* components mirroring it outside their template (e.g. onto the host's
|
|
19
|
+
* `aria-invalid`).
|
|
20
|
+
*/
|
|
21
|
+
export const ERROR_DISPLAY_PROPERTIES = [
|
|
22
|
+
"valid",
|
|
23
|
+
"hideError",
|
|
24
|
+
"disabled",
|
|
25
|
+
"touched",
|
|
26
|
+
"dirty",
|
|
27
|
+
"validationRequested",
|
|
28
|
+
"error",
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Whether any property {@link FormMixinInterface.showError} depends on
|
|
32
|
+
* changed in this update.
|
|
33
|
+
*
|
|
34
|
+
* @param changed - The changed properties of the update.
|
|
35
|
+
* @returns true when the error display may have changed.
|
|
36
|
+
*/
|
|
37
|
+
export const hasErrorDisplayChange = (changed) => ERROR_DISPLAY_PROPERTIES.some((name) => changed.has(name));
|
|
16
38
|
export const FormMixin = (superClass) => {
|
|
17
|
-
var _FormMixinClass_markDirty, _FormMixinClass_markTouched;
|
|
39
|
+
var _FormMixinClass_markDirty, _FormMixinClass_markTouched, _FormMixinClass_markValidationRequested;
|
|
18
40
|
class FormMixinClass extends superClass {
|
|
19
41
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
42
|
constructor(...args) {
|
|
21
43
|
super(...args);
|
|
22
44
|
/**
|
|
23
|
-
* When true, validation error messages are hidden.
|
|
45
|
+
* When true, validation error messages are hidden. The hint stays visible.
|
|
24
46
|
* @default false
|
|
25
47
|
*/
|
|
26
48
|
this.hideError = false;
|
|
@@ -53,6 +75,13 @@ export const FormMixin = (superClass) => {
|
|
|
53
75
|
* @default false
|
|
54
76
|
*/
|
|
55
77
|
this.touched = false;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the form asked for this field's validity, on a submit attempt
|
|
80
|
+
* or a `reportValidity()` call, since it connected (or since the last
|
|
81
|
+
* reset). Reveals errors on a field the user never reached.
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
this.validationRequested = false;
|
|
56
85
|
/**
|
|
57
86
|
* Opts this field out of the native reset algorithm's value wipe: when
|
|
58
87
|
* `true`, `formResetCallback` leaves `value`/`checked` untouched.
|
|
@@ -89,10 +118,29 @@ export const FormMixin = (superClass) => {
|
|
|
89
118
|
this.touched = true;
|
|
90
119
|
}
|
|
91
120
|
});
|
|
121
|
+
/**
|
|
122
|
+
* Marks validation as requested when the form checks this field, which
|
|
123
|
+
* fires `invalid` on it.
|
|
124
|
+
*/
|
|
125
|
+
_FormMixinClass_markValidationRequested.set(this, () => {
|
|
126
|
+
this.validationRequested = true;
|
|
127
|
+
});
|
|
92
128
|
if (!this.internals) {
|
|
93
129
|
this.internals = this.attachInternals();
|
|
94
130
|
}
|
|
95
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Whether the field currently shows its error : invalid, not disabled,
|
|
134
|
+
* not `hideError`, and either interacted with (`touched`, `dirty`),
|
|
135
|
+
* checked by its form, or given an external `error`. A required field
|
|
136
|
+
* left empty stays quiet until then.
|
|
137
|
+
*/
|
|
138
|
+
get showError() {
|
|
139
|
+
return (!this.valid &&
|
|
140
|
+
!this.hideError &&
|
|
141
|
+
!this.disabled &&
|
|
142
|
+
(this.touched || this.dirty || this.validationRequested || !!this.error));
|
|
143
|
+
}
|
|
96
144
|
/**
|
|
97
145
|
* Whether the value hasn't changed since the field connected (or since
|
|
98
146
|
* the last reset). The inverse of {@link dirty}.
|
|
@@ -150,14 +198,14 @@ export const FormMixin = (superClass) => {
|
|
|
150
198
|
this.setFormValue(value);
|
|
151
199
|
}
|
|
152
200
|
/**
|
|
153
|
-
* Gets the
|
|
154
|
-
*
|
|
201
|
+
* Gets the validation errors while {@link showError} is true, the hint
|
|
202
|
+
* otherwise.
|
|
155
203
|
*
|
|
156
|
-
* @returns Error message string, array of messages, or
|
|
204
|
+
* @returns Error message string, array of messages, or the hint.
|
|
157
205
|
*/
|
|
158
206
|
get description() {
|
|
159
|
-
if (this.
|
|
160
|
-
return
|
|
207
|
+
if (!this.showError) {
|
|
208
|
+
return this.hint;
|
|
161
209
|
}
|
|
162
210
|
if (this.errorMessages.length) {
|
|
163
211
|
return this.errorMessages;
|
|
@@ -179,6 +227,15 @@ export const FormMixin = (superClass) => {
|
|
|
179
227
|
get type() {
|
|
180
228
|
return this.localName;
|
|
181
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* Validates `checked` rather than `value` for a checkable field.
|
|
232
|
+
*
|
|
233
|
+
* @returns the value {@link checkValidity} validates by default.
|
|
234
|
+
*/
|
|
235
|
+
getValueToValidate() {
|
|
236
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
237
|
+
return (this.checkable ? this.checked : this.value);
|
|
238
|
+
}
|
|
182
239
|
/**
|
|
183
240
|
* Lifecycle callback called when element is connected to the DOM.
|
|
184
241
|
* Initializes the form value depending on state.
|
|
@@ -196,6 +253,7 @@ export const FormMixin = (superClass) => {
|
|
|
196
253
|
this.checkValidity(this.value);
|
|
197
254
|
this.addEventListener(ChangeEvent.eventName, __classPrivateFieldGet(this, _FormMixinClass_markDirty, "f"));
|
|
198
255
|
this.addEventListener("focusout", __classPrivateFieldGet(this, _FormMixinClass_markTouched, "f"));
|
|
256
|
+
this.addEventListener("invalid", __classPrivateFieldGet(this, _FormMixinClass_markValidationRequested, "f"));
|
|
199
257
|
}
|
|
200
258
|
/**
|
|
201
259
|
* Lifecycle callback called when element is disconnected from the DOM.
|
|
@@ -204,6 +262,7 @@ export const FormMixin = (superClass) => {
|
|
|
204
262
|
disconnectedCallback() {
|
|
205
263
|
this.removeEventListener(ChangeEvent.eventName, __classPrivateFieldGet(this, _FormMixinClass_markDirty, "f"));
|
|
206
264
|
this.removeEventListener("focusout", __classPrivateFieldGet(this, _FormMixinClass_markTouched, "f"));
|
|
265
|
+
this.removeEventListener("invalid", __classPrivateFieldGet(this, _FormMixinClass_markValidationRequested, "f"));
|
|
207
266
|
super.disconnectedCallback?.();
|
|
208
267
|
}
|
|
209
268
|
/**
|
|
@@ -217,10 +276,9 @@ export const FormMixin = (superClass) => {
|
|
|
217
276
|
changedProperties.has("valueState") ||
|
|
218
277
|
changedProperties.has("checked") ||
|
|
219
278
|
changedProperties.has("validators") ||
|
|
220
|
-
changedProperties.has("required")
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this.checkValidity(valToCheck);
|
|
279
|
+
changedProperties.has("required") ||
|
|
280
|
+
changedProperties.has("error")) {
|
|
281
|
+
this.checkValidity();
|
|
224
282
|
}
|
|
225
283
|
super.willUpdate(changedProperties);
|
|
226
284
|
}
|
|
@@ -282,6 +340,7 @@ export const FormMixin = (superClass) => {
|
|
|
282
340
|
}
|
|
283
341
|
this.dirty = false;
|
|
284
342
|
this.touched = false;
|
|
343
|
+
this.validationRequested = false;
|
|
285
344
|
}
|
|
286
345
|
/**
|
|
287
346
|
* Renders the description or error messages.
|
|
@@ -292,30 +351,23 @@ export const FormMixin = (superClass) => {
|
|
|
292
351
|
return this.renderError();
|
|
293
352
|
}
|
|
294
353
|
/**
|
|
295
|
-
* Renders the error messages
|
|
296
|
-
*
|
|
354
|
+
* Renders the error messages while {@link showError} is true, the hint
|
|
355
|
+
* otherwise.
|
|
297
356
|
*
|
|
298
357
|
* @returns Template result with error messages, hint or nothing.
|
|
299
358
|
*/
|
|
300
359
|
renderError() {
|
|
301
360
|
const { description } = this;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
if (isHint) {
|
|
361
|
+
if (!description?.length) {
|
|
362
|
+
return nothing;
|
|
363
|
+
}
|
|
364
|
+
if (!this.showError) {
|
|
307
365
|
return html `
|
|
308
366
|
<p id="description" class="hint-messages">
|
|
309
367
|
<span>${description}</span>
|
|
310
368
|
</p>
|
|
311
369
|
`;
|
|
312
370
|
}
|
|
313
|
-
if (this.valid ||
|
|
314
|
-
this.hideError ||
|
|
315
|
-
this.disabled ||
|
|
316
|
-
!description?.length) {
|
|
317
|
-
return nothing;
|
|
318
|
-
}
|
|
319
371
|
return html `
|
|
320
372
|
<p id="description" class="error-messages">
|
|
321
373
|
${when(Array.isArray(description), () => description.map((msg) => html `<span>${msg}</span>`), () => html `<span>${description}</span>`)}
|
|
@@ -323,7 +375,7 @@ export const FormMixin = (superClass) => {
|
|
|
323
375
|
`;
|
|
324
376
|
}
|
|
325
377
|
}
|
|
326
|
-
_FormMixinClass_markDirty = new WeakMap(), _FormMixinClass_markTouched = new WeakMap();
|
|
378
|
+
_FormMixinClass_markDirty = new WeakMap(), _FormMixinClass_markTouched = new WeakMap(), _FormMixinClass_markValidationRequested = new WeakMap();
|
|
327
379
|
FormMixinClass.formAssociated = true;
|
|
328
380
|
__decorate([
|
|
329
381
|
property({ reflect: true })
|
|
@@ -343,6 +395,9 @@ export const FormMixin = (superClass) => {
|
|
|
343
395
|
__decorate([
|
|
344
396
|
state()
|
|
345
397
|
], FormMixinClass.prototype, "touched", void 0);
|
|
398
|
+
__decorate([
|
|
399
|
+
state()
|
|
400
|
+
], FormMixinClass.prototype, "validationRequested", void 0);
|
|
346
401
|
__decorate([
|
|
347
402
|
property({ type: Boolean })
|
|
348
403
|
], FormMixinClass.prototype, "controlled", void 0);
|
|
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { property } from "lit/decorators.js";
|
|
8
|
+
import { hasErrorDisplayChange } from "./form.mixin.js";
|
|
8
9
|
import { ChangeEvent } from "../events/change.event.js";
|
|
9
10
|
/**
|
|
10
11
|
* Mixin adding "radio selectable" behavior to a component.
|
|
@@ -54,7 +55,7 @@ export const RadioMixin = (superClass) => {
|
|
|
54
55
|
if (this.required && !this.checked) {
|
|
55
56
|
return {
|
|
56
57
|
validity: { valueMissing: true },
|
|
57
|
-
message:
|
|
58
|
+
message: this.validationDictionary.validation.valueMissing,
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
61
|
return { validity: {} };
|
|
@@ -105,10 +106,8 @@ export const RadioMixin = (superClass) => {
|
|
|
105
106
|
this.setAttribute("aria-checked", String(this.checked));
|
|
106
107
|
this.updateInternals();
|
|
107
108
|
}
|
|
108
|
-
if (_changedProperties
|
|
109
|
-
|
|
110
|
-
_changedProperties.has("disabled")) {
|
|
111
|
-
this.setAttribute("aria-invalid", String(!this.hideError && !this.disabled && !this.valid));
|
|
109
|
+
if (hasErrorDisplayChange(_changedProperties)) {
|
|
110
|
+
this.setAttribute("aria-invalid", String(this.showError));
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import { Mutable, Validators } from "../types/form-validators.type.js";
|
|
3
3
|
import { Constructor } from "../utils/constructor.type.js";
|
|
4
|
+
import { Dictionary } from "../i18n/index.js";
|
|
4
5
|
/**
|
|
5
6
|
* Defines a Validity object.
|
|
6
7
|
*/
|
|
@@ -20,10 +21,15 @@ export interface Validity {
|
|
|
20
21
|
export declare class ValidatorsMixinInterface<U = unknown> {
|
|
21
22
|
checkLocalValidators: () => Validity;
|
|
22
23
|
buildCommonValidators: () => Validity;
|
|
23
|
-
checkValidity: (dataToCheck
|
|
24
|
+
checkValidity: (dataToCheck?: any) => boolean;
|
|
25
|
+
reportValidity: (valToCheck?: any) => boolean;
|
|
26
|
+
get validity(): ValidityState;
|
|
27
|
+
get willValidate(): boolean;
|
|
24
28
|
internals: globalThis.ElementInternals;
|
|
25
29
|
valid: boolean;
|
|
26
30
|
required: boolean;
|
|
31
|
+
error?: string;
|
|
32
|
+
get validationDictionary(): Dictionary;
|
|
27
33
|
errorMessages: string[];
|
|
28
34
|
validationMessage: string | string[];
|
|
29
35
|
validators?: Validators<U>[];
|
|
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { property, state } from "lit/decorators.js";
|
|
8
|
+
import { dictionaries, getDefaultLocale } from "../i18n/index.js";
|
|
8
9
|
/**
|
|
9
10
|
* Mixin that adds validation capabilities to a LitElement.
|
|
10
11
|
*
|
|
@@ -13,6 +14,15 @@ import { property, state } from "lit/decorators.js";
|
|
|
13
14
|
*/
|
|
14
15
|
export const ValidatorsMixin = (superClass) => {
|
|
15
16
|
class ValidatorsMixinClass extends superClass {
|
|
17
|
+
/**
|
|
18
|
+
* The dictionary built-in validation messages are read from: the field's
|
|
19
|
+
* own `locale` when it has one, the shared default locale otherwise.
|
|
20
|
+
*/
|
|
21
|
+
get validationDictionary() {
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
|
+
const locale = this.locale;
|
|
24
|
+
return dictionaries[locale ?? getDefaultLocale()] ?? dictionaries.en;
|
|
25
|
+
}
|
|
16
26
|
/**
|
|
17
27
|
* Current validity state of the element.
|
|
18
28
|
*/
|
|
@@ -79,18 +89,18 @@ export const ValidatorsMixin = (superClass) => {
|
|
|
79
89
|
(value instanceof Array && !value.length);
|
|
80
90
|
if (this.required && isEmpty) {
|
|
81
91
|
validity.valueMissing = true;
|
|
82
|
-
message =
|
|
92
|
+
message = this.validationDictionary.validation.valueMissing;
|
|
83
93
|
}
|
|
84
94
|
return { validity, message };
|
|
85
95
|
}
|
|
86
96
|
/**
|
|
87
97
|
* Runs all validation rules and updates internal validity.
|
|
88
98
|
*
|
|
89
|
-
* @param dataToCheck The value to validate.
|
|
99
|
+
* @param dataToCheck The value to validate, the field's own one when omitted.
|
|
90
100
|
* @returns true if valid, false otherwise.
|
|
91
101
|
* @throws Error if any async validator is passed (only sync supported).
|
|
92
102
|
*/
|
|
93
|
-
checkValidity(dataToCheck) {
|
|
103
|
+
checkValidity(dataToCheck = this.getValueToValidate()) {
|
|
94
104
|
const localResult = this.checkLocalValidators();
|
|
95
105
|
const commonResult = this.buildCommonValidators();
|
|
96
106
|
const combinedValidity = {
|
|
@@ -98,16 +108,12 @@ export const ValidatorsMixin = (superClass) => {
|
|
|
98
108
|
...commonResult.validity,
|
|
99
109
|
};
|
|
100
110
|
let message = commonResult.message || localResult.message;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
this.errorMessages = [];
|
|
111
|
+
const errorMessages = this.error ? [this.error] : [];
|
|
112
|
+
this.validators?.forEach((validator) => this.collectErrors(errorMessages, validator, dataToCheck));
|
|
113
|
+
this.errorMessages = errorMessages;
|
|
114
|
+
if (errorMessages.length > 0) {
|
|
115
|
+
combinedValidity.customError = true;
|
|
116
|
+
message = errorMessages.join(" ; ");
|
|
111
117
|
}
|
|
112
118
|
this.valid = !Object.values(combinedValidity).some(Boolean);
|
|
113
119
|
const anchor = this.getFocusAnchor?.();
|
|
@@ -115,17 +121,17 @@ export const ValidatorsMixin = (superClass) => {
|
|
|
115
121
|
this.setValidity(combinedValidity, message, anchor);
|
|
116
122
|
}
|
|
117
123
|
else {
|
|
118
|
-
this.updateComplete.then(() => this.setValidity(combinedValidity, message, anchor));
|
|
124
|
+
void this.updateComplete.then(() => this.setValidity(combinedValidity, message, anchor));
|
|
119
125
|
}
|
|
120
|
-
return this.
|
|
126
|
+
return this.valid;
|
|
121
127
|
}
|
|
122
128
|
/**
|
|
123
129
|
* Reports validity and shows native validation UI.
|
|
124
130
|
*
|
|
125
|
-
* @param valToCheck Value to validate and report.
|
|
131
|
+
* @param valToCheck Value to validate and report, the field's own one when omitted.
|
|
126
132
|
* @returns true if valid, false otherwise.
|
|
127
133
|
*/
|
|
128
|
-
reportValidity(valToCheck) {
|
|
134
|
+
reportValidity(valToCheck = this.getValueToValidate()) {
|
|
129
135
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
130
136
|
this.checkValidity(valToCheck);
|
|
131
137
|
return this.internals.reportValidity();
|
|
@@ -180,6 +186,16 @@ export const ValidatorsMixin = (superClass) => {
|
|
|
180
186
|
this.requestUpdate("valid");
|
|
181
187
|
}
|
|
182
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* The value {@link checkValidity} validates when called without one.
|
|
191
|
+
* `FormMixin` overrides it to return `checked` for a checkable field.
|
|
192
|
+
*
|
|
193
|
+
* @returns the field's current value.
|
|
194
|
+
*/
|
|
195
|
+
getValueToValidate() {
|
|
196
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
197
|
+
return this.value;
|
|
198
|
+
}
|
|
183
199
|
/**
|
|
184
200
|
* Provides extra data to validators if needed.
|
|
185
201
|
* Override in subclass.
|
|
@@ -194,6 +210,9 @@ export const ValidatorsMixin = (superClass) => {
|
|
|
194
210
|
__decorate([
|
|
195
211
|
property({ type: Boolean })
|
|
196
212
|
], ValidatorsMixinClass.prototype, "required", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
property()
|
|
215
|
+
], ValidatorsMixinClass.prototype, "error", void 0);
|
|
197
216
|
__decorate([
|
|
198
217
|
state()
|
|
199
218
|
], ValidatorsMixinClass.prototype, "valid", void 0);
|
package/dist/ssr/animate-ssr.css
CHANGED
|
@@ -1,84 +1,39 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Optional light-DOM stylesheet for `<eun-animate>` in server-rendered
|
|
3
|
-
* pages (Next.js, or any framework/setup without Declarative Shadow DOM
|
|
4
|
-
* for Lit components). It closes the SSR flash described in the eun-animate
|
|
5
|
-
* documentation's Accessibility/SSR notes : server HTML has no Shadow DOM
|
|
6
|
-
* yet, so `<eun-animate>`'s own `:host([animation="fade"]) { opacity: 0 }`
|
|
7
|
-
* (and the other animation variants) can't apply until the element is
|
|
8
|
-
* upgraded client-side, meaning content renders visible first, then snaps
|
|
9
|
-
* hidden the instant the custom element registers, then fades back in.
|
|
10
|
-
*
|
|
11
|
-
* This stylesheet lives in the host document instead, applying the exact
|
|
12
|
-
* same starting state through `:not(:defined)`, which is true from first
|
|
13
|
-
* paint and stops matching permanently the moment the browser upgrades the
|
|
14
|
-
* element — handing off to the component's own Shadow DOM styles at
|
|
15
|
-
* exactly the point they take over, with no gap and no double transition.
|
|
16
|
-
*
|
|
17
|
-
* Usage — link it in the page `<head>`, alongside (not instead of)
|
|
18
|
-
* importing "@eunomia/elements/animate.js" :
|
|
19
|
-
*
|
|
20
|
-
* <link
|
|
21
|
-
* rel="stylesheet"
|
|
22
|
-
* href="node_modules/@eunomia/elements/dist/ssr/animate-ssr.css"
|
|
23
|
-
* />
|
|
24
|
-
*
|
|
25
|
-
* Requires every server-rendered `<eun-animate>` to write its `animation`
|
|
26
|
-
* attribute explicitly (even when it's the "fade" default), since that
|
|
27
|
-
* default only ever becomes an attribute once Lit initializes the
|
|
28
|
-
* property client-side — invisible to this stylesheet, or any plain CSS,
|
|
29
|
-
* before then :
|
|
30
|
-
*
|
|
31
|
-
* <eun-animate animation="fade">...</eun-animate>
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
1
|
eun-animate:not(:defined) {
|
|
35
2
|
--_distance: var(--animate-distance, 80px);
|
|
36
3
|
}
|
|
37
4
|
|
|
38
|
-
|
|
39
|
-
eun-animate[animation
|
|
40
|
-
eun-animate[animation="
|
|
41
|
-
eun-animate[animation="faded-scroll-
|
|
42
|
-
eun-animate[animation="faded-scroll-
|
|
43
|
-
|
|
44
|
-
|
|
5
|
+
@media (scripting: enabled) {
|
|
6
|
+
eun-animate:not([animation]):not(:defined),
|
|
7
|
+
eun-animate[animation="fade"]:not(:defined),
|
|
8
|
+
eun-animate[animation="faded-scroll-right"]:not(:defined),
|
|
9
|
+
eun-animate[animation="faded-scroll-left"]:not(:defined),
|
|
10
|
+
eun-animate[animation="faded-scroll-top"]:not(:defined),
|
|
11
|
+
eun-animate[animation="faded-scroll-bottom"]:not(:defined) {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
}
|
|
45
14
|
|
|
46
|
-
eun-animate[animation="scroll-right"]:not(:defined),
|
|
47
|
-
eun-animate[animation="faded-scroll-right"]:not(:defined) {
|
|
48
|
-
|
|
49
|
-
}
|
|
15
|
+
eun-animate[animation="scroll-right"]:not(:defined),
|
|
16
|
+
eun-animate[animation="faded-scroll-right"]:not(:defined) {
|
|
17
|
+
transform: translateX(calc(-1 * var(--_distance)));
|
|
18
|
+
}
|
|
50
19
|
|
|
51
|
-
eun-animate[animation="scroll-left"]:not(:defined),
|
|
52
|
-
eun-animate[animation="faded-scroll-left"]:not(:defined) {
|
|
53
|
-
|
|
54
|
-
}
|
|
20
|
+
eun-animate[animation="scroll-left"]:not(:defined),
|
|
21
|
+
eun-animate[animation="faded-scroll-left"]:not(:defined) {
|
|
22
|
+
transform: translateX(var(--_distance));
|
|
23
|
+
}
|
|
55
24
|
|
|
56
|
-
eun-animate[animation="scroll-top"]:not(:defined),
|
|
57
|
-
eun-animate[animation="faded-scroll-top"]:not(:defined) {
|
|
58
|
-
|
|
59
|
-
}
|
|
25
|
+
eun-animate[animation="scroll-top"]:not(:defined),
|
|
26
|
+
eun-animate[animation="faded-scroll-top"]:not(:defined) {
|
|
27
|
+
transform: translateY(var(--_distance));
|
|
28
|
+
}
|
|
60
29
|
|
|
61
|
-
eun-animate[animation="scroll-bottom"]:not(:defined),
|
|
62
|
-
eun-animate[animation="faded-scroll-bottom"]:not(:defined) {
|
|
63
|
-
|
|
30
|
+
eun-animate[animation="scroll-bottom"]:not(:defined),
|
|
31
|
+
eun-animate[animation="faded-scroll-bottom"]:not(:defined) {
|
|
32
|
+
transform: translateY(calc(-1 * var(--_distance)));
|
|
33
|
+
}
|
|
64
34
|
}
|
|
65
35
|
|
|
66
|
-
|
|
67
|
-
* `tablet-animation`/`mobile-animation` overrides, mirroring the rules
|
|
68
|
-
* above and the same-named `@media` blocks in the component's own
|
|
69
|
-
* `animate.styles.ts` — kept in sync by hand, since this file has to
|
|
70
|
-
* duplicate the shadow DOM's styles for the light-DOM pre-hydration
|
|
71
|
-
* window regardless. Placed after the unscoped rules above so an
|
|
72
|
-
* equal-specificity tie (e.g. both `animation="fade"` and
|
|
73
|
-
* `tablet-animation="none"` set at once) resolves in the narrower
|
|
74
|
-
* breakpoint's favor, once its `@media` condition is true — same
|
|
75
|
-
* source-order reasoning as `animate.styles.ts`.
|
|
76
|
-
*
|
|
77
|
-
* `max-width` values match `EUNOMIA_BREAKPOINTS.tablet`/`.mobile`
|
|
78
|
-
* (`breakpoints.ts`) — hardcoded here since plain CSS can't read a JS
|
|
79
|
-
* constant.
|
|
80
|
-
*/
|
|
81
|
-
@media (max-width: 768px) {
|
|
36
|
+
@media (scripting: enabled) and (width < 768px) {
|
|
82
37
|
eun-animate[tablet-animation="none"]:not(:defined) {
|
|
83
38
|
opacity: 1;
|
|
84
39
|
transform: none;
|
|
@@ -113,7 +68,7 @@ eun-animate[animation="faded-scroll-bottom"]:not(:defined) {
|
|
|
113
68
|
}
|
|
114
69
|
}
|
|
115
70
|
|
|
116
|
-
@media (
|
|
71
|
+
@media (scripting: enabled) and (width < 600px) {
|
|
117
72
|
eun-animate[mobile-animation="none"]:not(:defined) {
|
|
118
73
|
opacity: 1;
|
|
119
74
|
transform: none;
|