@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
package/dist/i18n/en.js
CHANGED
|
@@ -6,7 +6,15 @@
|
|
|
6
6
|
* silent runtime fallback.
|
|
7
7
|
*/
|
|
8
8
|
export const en = {
|
|
9
|
+
common: {
|
|
10
|
+
close: "Close",
|
|
11
|
+
cancel: "Cancel",
|
|
12
|
+
confirm: "Confirm",
|
|
13
|
+
noValue: "No value set",
|
|
14
|
+
save: "Save",
|
|
15
|
+
},
|
|
9
16
|
datePicker: {
|
|
17
|
+
openCalendar: "Open calendar",
|
|
10
18
|
previousMonth: "Previous month",
|
|
11
19
|
chooseMonthYear: "Choose month and year",
|
|
12
20
|
nextMonth: "Next month",
|
|
@@ -19,6 +27,11 @@ export const en = {
|
|
|
19
27
|
amPm: "AM/PM",
|
|
20
28
|
hour: "Hour",
|
|
21
29
|
minute: "Minute",
|
|
30
|
+
day: "Day",
|
|
31
|
+
month: "Month",
|
|
32
|
+
year: "Year",
|
|
33
|
+
startDate: "Start date",
|
|
34
|
+
endDate: "End date",
|
|
22
35
|
heading: {
|
|
23
36
|
day: { single: "Select a date", range: "Select a date range" },
|
|
24
37
|
month: { single: "Select a month", range: "Select a month range" },
|
|
@@ -31,6 +44,7 @@ export const en = {
|
|
|
31
44
|
},
|
|
32
45
|
},
|
|
33
46
|
timePicker: {
|
|
47
|
+
openClock: "Open clock",
|
|
34
48
|
amPm: "AM/PM",
|
|
35
49
|
hour: "Hour",
|
|
36
50
|
minute: "Minute",
|
|
@@ -40,6 +54,8 @@ export const en = {
|
|
|
40
54
|
mustBeAtOrBefore: (time) => `Time must be at or before ${time}`,
|
|
41
55
|
},
|
|
42
56
|
scheduler: {
|
|
57
|
+
previous: "Previous period",
|
|
58
|
+
next: "Next period",
|
|
43
59
|
calendarView: "Calendar view",
|
|
44
60
|
},
|
|
45
61
|
carousel: {
|
|
@@ -64,6 +80,11 @@ export const en = {
|
|
|
64
80
|
chip: {
|
|
65
81
|
remove: "Remove",
|
|
66
82
|
},
|
|
83
|
+
passwordStrength: {
|
|
84
|
+
label: "Password strength",
|
|
85
|
+
levels: ["Weak", "Fair", "Good", "Strong"],
|
|
86
|
+
caption: (label) => `${label}:`,
|
|
87
|
+
},
|
|
67
88
|
infiniteList: {
|
|
68
89
|
loadingMore: "Loading more items…",
|
|
69
90
|
itemsLoaded: (count) => `${count} more item${count > 1 ? "s" : ""} loaded`,
|
|
@@ -84,6 +105,53 @@ export const en = {
|
|
|
84
105
|
link: {
|
|
85
106
|
opensInNewTab: "opens in a new tab",
|
|
86
107
|
},
|
|
108
|
+
input: {
|
|
109
|
+
clear: "Clear field",
|
|
110
|
+
showPassword: "Show password",
|
|
111
|
+
hidePassword: "Hide password",
|
|
112
|
+
},
|
|
113
|
+
search: {
|
|
114
|
+
panel: "Search",
|
|
115
|
+
},
|
|
116
|
+
counter: {
|
|
117
|
+
increment: "Increase value",
|
|
118
|
+
decrement: "Decrease value",
|
|
119
|
+
},
|
|
120
|
+
inputFile: {
|
|
121
|
+
remove: "Remove file",
|
|
122
|
+
select: "Select file",
|
|
123
|
+
open: "Open in a new tab",
|
|
124
|
+
},
|
|
125
|
+
inputPhone: {
|
|
126
|
+
selectCountry: "Select a country",
|
|
127
|
+
},
|
|
128
|
+
colorPicker: {
|
|
129
|
+
noColor: "No color selected",
|
|
130
|
+
},
|
|
131
|
+
pagination: {
|
|
132
|
+
previous: "Previous page",
|
|
133
|
+
next: "Next page",
|
|
134
|
+
first: "First page",
|
|
135
|
+
last: "Last page",
|
|
136
|
+
page: "Page",
|
|
137
|
+
},
|
|
138
|
+
sidebar: {
|
|
139
|
+
expand: "Expand sidebar",
|
|
140
|
+
collapse: "Collapse sidebar",
|
|
141
|
+
resize: "Resize sidebar",
|
|
142
|
+
},
|
|
143
|
+
toolbar: {
|
|
144
|
+
menuOpen: "Open menu",
|
|
145
|
+
menuClose: "Close menu",
|
|
146
|
+
menu: "Menu",
|
|
147
|
+
},
|
|
148
|
+
rating: {
|
|
149
|
+
label: "Rating",
|
|
150
|
+
valueText: (value, max) => `${value} out of ${max}`,
|
|
151
|
+
summary: (label, valueText) => `${label}: ${valueText}`,
|
|
152
|
+
noValue: "Not rated",
|
|
153
|
+
clear: "Clear rating",
|
|
154
|
+
},
|
|
87
155
|
validation: {
|
|
88
156
|
valueMissing: "This field is required",
|
|
89
157
|
tooShort: (min, length) => `Please lengthen this text to ${min} characters or more (you are currently using ${length} characters).`,
|
package/dist/i18n/fr.js
CHANGED
|
@@ -4,7 +4,15 @@
|
|
|
4
4
|
* error here, not a silent fallback to English at runtime.
|
|
5
5
|
*/
|
|
6
6
|
export const fr = {
|
|
7
|
+
common: {
|
|
8
|
+
close: "Fermer",
|
|
9
|
+
cancel: "Annuler",
|
|
10
|
+
confirm: "Confirmer",
|
|
11
|
+
save: "Enregistrer",
|
|
12
|
+
noValue: "Aucune valeur",
|
|
13
|
+
},
|
|
7
14
|
datePicker: {
|
|
15
|
+
openCalendar: "Ouvrir le calendrier",
|
|
8
16
|
previousMonth: "Mois précédent",
|
|
9
17
|
chooseMonthYear: "Choisir le mois et l'année",
|
|
10
18
|
nextMonth: "Mois suivant",
|
|
@@ -17,6 +25,11 @@ export const fr = {
|
|
|
17
25
|
amPm: "AM/PM",
|
|
18
26
|
hour: "Heure",
|
|
19
27
|
minute: "Minute",
|
|
28
|
+
day: "Jour",
|
|
29
|
+
month: "Mois",
|
|
30
|
+
year: "Année",
|
|
31
|
+
startDate: "Date de début",
|
|
32
|
+
endDate: "Date de fin",
|
|
20
33
|
heading: {
|
|
21
34
|
day: {
|
|
22
35
|
single: "Sélectionner une date",
|
|
@@ -31,8 +44,6 @@ export const fr = {
|
|
|
31
44
|
range: "Sélectionner une plage d'années",
|
|
32
45
|
},
|
|
33
46
|
},
|
|
34
|
-
// French keeps the article in both contexts, unlike English's shorter
|
|
35
|
-
// "Select date" — same phrasing as `heading` above.
|
|
36
47
|
modalPreview: {
|
|
37
48
|
day: {
|
|
38
49
|
single: "Sélectionner une date",
|
|
@@ -49,6 +60,7 @@ export const fr = {
|
|
|
49
60
|
},
|
|
50
61
|
},
|
|
51
62
|
timePicker: {
|
|
63
|
+
openClock: "Ouvrir l'horloge",
|
|
52
64
|
amPm: "AM/PM",
|
|
53
65
|
hour: "Heure",
|
|
54
66
|
minute: "Minute",
|
|
@@ -58,6 +70,8 @@ export const fr = {
|
|
|
58
70
|
mustBeAtOrBefore: (time) => `L'heure doit être à ${time} ou avant`,
|
|
59
71
|
},
|
|
60
72
|
scheduler: {
|
|
73
|
+
previous: "Période précédente",
|
|
74
|
+
next: "Période suivante",
|
|
61
75
|
calendarView: "Vue du calendrier",
|
|
62
76
|
},
|
|
63
77
|
carousel: {
|
|
@@ -82,6 +96,11 @@ export const fr = {
|
|
|
82
96
|
chip: {
|
|
83
97
|
remove: "Retirer",
|
|
84
98
|
},
|
|
99
|
+
passwordStrength: {
|
|
100
|
+
label: "Robustesse du mot de passe",
|
|
101
|
+
levels: ["Faible", "Moyen", "Bon", "Fort"],
|
|
102
|
+
caption: (label) => `${label}\u00A0:`,
|
|
103
|
+
},
|
|
85
104
|
infiniteList: {
|
|
86
105
|
loadingMore: "Chargement d'autres éléments…",
|
|
87
106
|
itemsLoaded: (count) => count > 1
|
|
@@ -106,6 +125,53 @@ export const fr = {
|
|
|
106
125
|
link: {
|
|
107
126
|
opensInNewTab: "ouvre dans un nouvel onglet",
|
|
108
127
|
},
|
|
128
|
+
input: {
|
|
129
|
+
clear: "Effacer le champ",
|
|
130
|
+
showPassword: "Afficher le mot de passe",
|
|
131
|
+
hidePassword: "Masquer le mot de passe",
|
|
132
|
+
},
|
|
133
|
+
search: {
|
|
134
|
+
panel: "Rechercher",
|
|
135
|
+
},
|
|
136
|
+
counter: {
|
|
137
|
+
increment: "Augmenter la valeur",
|
|
138
|
+
decrement: "Diminuer la valeur",
|
|
139
|
+
},
|
|
140
|
+
inputFile: {
|
|
141
|
+
remove: "Retirer le fichier",
|
|
142
|
+
select: "Sélectionner un fichier",
|
|
143
|
+
open: "Ouvrir dans un nouvel onglet",
|
|
144
|
+
},
|
|
145
|
+
inputPhone: {
|
|
146
|
+
selectCountry: "Sélectionner un pays",
|
|
147
|
+
},
|
|
148
|
+
colorPicker: {
|
|
149
|
+
noColor: "Aucune couleur sélectionnée",
|
|
150
|
+
},
|
|
151
|
+
pagination: {
|
|
152
|
+
previous: "Page précédente",
|
|
153
|
+
next: "Page suivante",
|
|
154
|
+
first: "Première page",
|
|
155
|
+
last: "Dernière page",
|
|
156
|
+
page: "Page",
|
|
157
|
+
},
|
|
158
|
+
sidebar: {
|
|
159
|
+
expand: "Déplier la barre latérale",
|
|
160
|
+
collapse: "Replier la barre latérale",
|
|
161
|
+
resize: "Redimensionner la barre latérale",
|
|
162
|
+
},
|
|
163
|
+
toolbar: {
|
|
164
|
+
menuOpen: "Ouvrir le menu",
|
|
165
|
+
menuClose: "Fermer le menu",
|
|
166
|
+
menu: "Menu",
|
|
167
|
+
},
|
|
168
|
+
rating: {
|
|
169
|
+
label: "Note",
|
|
170
|
+
valueText: (value, max) => `${value} sur ${max}`,
|
|
171
|
+
summary: (label, valueText) => `${label}\u00A0: ${valueText}`,
|
|
172
|
+
noValue: "Non noté",
|
|
173
|
+
clear: "Effacer la note",
|
|
174
|
+
},
|
|
109
175
|
validation: {
|
|
110
176
|
valueMissing: "Ce champ est obligatoire",
|
|
111
177
|
tooShort: (min, length) => `Saisissez au moins ${min} caractères (actuellement ${length}).`,
|
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export type { EunomiaSidebarPosition, EunomiaSidebarCollapseMode, } from "./comp
|
|
|
55
55
|
export { EunomiaModal, EunomiaModalTagName, } from "./components/alert/modal/modal.js";
|
|
56
56
|
export { EunomiaDrawer, EunomiaDrawerTagName, } from "./components/alert/drawer/drawer.js";
|
|
57
57
|
export type { EunomiaDrawerPosition } from "./components/alert/drawer/drawer.js";
|
|
58
|
+
export type { EunomiaDialogInitialFocus } from "./mixins/dialog-surface.mixin.js";
|
|
58
59
|
export { EunomiaAlert, EunomiaAlertTagName, } from "./components/alert/alert/alert.js";
|
|
59
60
|
export { EunomiaToast, EunomiaToastTagName, } from "./components/alert/toast/toast.js";
|
|
60
61
|
export type { EunomiaToastSeverity, EunomiaToastAppearance, EunomiaToastPosition, EunomiaToastSlide, } from "./components/alert/toast/toast.js";
|
|
@@ -83,6 +84,8 @@ export { EunomiaColorPicker, EunomiaColorPickerTagName, } from "./components/for
|
|
|
83
84
|
export { EunomiaInputFile, EunomiaInputFileTagName, } from "./components/form/input-file/input-file.js";
|
|
84
85
|
export type { EunomiaInputFileKind } from "./components/form/input-file/input-file.js";
|
|
85
86
|
export { EunomiaSlider, EunomiaSliderTagName, } from "./components/form/slider/slider.js";
|
|
87
|
+
export { EunomiaRating, EunomiaRatingTagName, } from "./components/form/rating/rating.js";
|
|
88
|
+
export type { EunomiaRatingStep } from "./components/form/rating/rating.js";
|
|
86
89
|
export { EunomiaLoader, EunomiaLoaderTagName, } from "./components/loader/loader/loader.js";
|
|
87
90
|
export type { EunomiaLoaderVariant } from "./components/loader/loader/loader.js";
|
|
88
91
|
export { EunomiaSkeleton, EunomiaSkeletonTagName, } from "./components/loader/skeleton/skeleton.js";
|
package/dist/index.js
CHANGED
|
@@ -90,6 +90,7 @@ export { EunomiaSelect, EunomiaSelectTagName, } from "./components/form/select/s
|
|
|
90
90
|
export { EunomiaColorPicker, EunomiaColorPickerTagName, } from "./components/form/color-picker/color-picker.js";
|
|
91
91
|
export { EunomiaInputFile, EunomiaInputFileTagName, } from "./components/form/input-file/input-file.js";
|
|
92
92
|
export { EunomiaSlider, EunomiaSliderTagName, } from "./components/form/slider/slider.js";
|
|
93
|
+
export { EunomiaRating, EunomiaRatingTagName, } from "./components/form/rating/rating.js";
|
|
93
94
|
export { EunomiaLoader, EunomiaLoaderTagName, } from "./components/loader/loader/loader.js";
|
|
94
95
|
export { EunomiaSkeleton, EunomiaSkeletonTagName, } from "./components/loader/skeleton/skeleton.js";
|
|
95
96
|
export { EunomiaScheduler, EunomiaSchedulerTagName, } from "./features/scheduler/scheduler/scheduler.js";
|
|
@@ -34,7 +34,7 @@ export type ButtonSize = EunomiaSize;
|
|
|
34
34
|
* (a floating action button has no `stroke`/`raised`/`flat`/`ghost` look of
|
|
35
35
|
* its own).
|
|
36
36
|
*/
|
|
37
|
-
export type EunomiaButtonAppearance = Extract<EunomiaAppearance, "
|
|
37
|
+
export type EunomiaButtonAppearance = Extract<EunomiaAppearance, "soft" | "fill" | "outline" | "flat" | "raised" | "ghost">;
|
|
38
38
|
/**
|
|
39
39
|
* Interface for the ButtonMixin.
|
|
40
40
|
* Extend this in components if needed.
|
|
@@ -36,7 +36,8 @@ export const ButtonMixin = (superClass) => {
|
|
|
36
36
|
*/
|
|
37
37
|
this.fixedColor = false;
|
|
38
38
|
/**
|
|
39
|
-
* The button size.
|
|
39
|
+
* The button size. The default isn't reflected, so an SSR framework
|
|
40
|
+
* doesn't see an attribute it never rendered.
|
|
40
41
|
* @default "m"
|
|
41
42
|
*/
|
|
42
43
|
this.size = "m";
|
|
@@ -109,7 +110,11 @@ export const ButtonMixin = (superClass) => {
|
|
|
109
110
|
}
|
|
110
111
|
/**
|
|
111
112
|
* Handles keyboard interaction.
|
|
112
|
-
* Supports "Enter" and "Space" to simulate native button behavior
|
|
113
|
+
* Supports "Enter" and "Space" to simulate native button behavior : a
|
|
114
|
+
* real `click()`, bubbling, composed and cancelable like a native
|
|
115
|
+
* button's, so delegated listeners (React's `onClick`, a parent slot)
|
|
116
|
+
* see it too. {@link handleClick} then applies the form, command or
|
|
117
|
+
* popover behavior, exactly as for a mouse click.
|
|
113
118
|
*
|
|
114
119
|
* @param event the received Keyboard event.
|
|
115
120
|
* @private
|
|
@@ -121,9 +126,7 @@ export const ButtonMixin = (superClass) => {
|
|
|
121
126
|
return;
|
|
122
127
|
}
|
|
123
128
|
event.preventDefault();
|
|
124
|
-
|
|
125
|
-
this.dispatchEvent(new Event("click"));
|
|
126
|
-
}
|
|
129
|
+
this.click();
|
|
127
130
|
}
|
|
128
131
|
/**
|
|
129
132
|
* Handles native form behavior if the button is inside a <form>.
|
|
@@ -171,7 +174,7 @@ export const ButtonMixin = (superClass) => {
|
|
|
171
174
|
property({ type: Boolean, reflect: true, attribute: "fixed-color" })
|
|
172
175
|
], ButtonMixinClass.prototype, "fixedColor", void 0);
|
|
173
176
|
__decorate([
|
|
174
|
-
property({ reflect: true })
|
|
177
|
+
property({ reflect: true, useDefault: true })
|
|
175
178
|
], ButtonMixinClass.prototype, "size", void 0);
|
|
176
179
|
__decorate([
|
|
177
180
|
property({ type: Boolean, reflect: true })
|
|
@@ -30,6 +30,17 @@ export const CheckMixin = (superClass) => {
|
|
|
30
30
|
* @default true
|
|
31
31
|
*/
|
|
32
32
|
this.checkable = true;
|
|
33
|
+
/**
|
|
34
|
+
* The host is the control, so its hint or error goes on its own
|
|
35
|
+
* `aria-description`.
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
this.descriptionOnHost = true;
|
|
39
|
+
/**
|
|
40
|
+
* Every change is a complete choice, so its error shows right away.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
this.errorOnChange = true;
|
|
33
44
|
/**
|
|
34
45
|
* Overrides `ValidatorsMixin`'s own `required` check, which validates
|
|
35
46
|
* emptiness of `this.value` — meaningless here, since a checkable
|
|
@@ -120,7 +131,6 @@ export const CheckMixin = (superClass) => {
|
|
|
120
131
|
* - Prevents propagation.
|
|
121
132
|
* - Ignores action if `disabled` or `readonly`.
|
|
122
133
|
* - Toggles the `checked` state.
|
|
123
|
-
* - Updates ARIA attributes (`aria-description`).
|
|
124
134
|
* - Dispatches a custom `ChangeEvent`.
|
|
125
135
|
*
|
|
126
136
|
* @param event The triggered mouse or keyboard event
|
|
@@ -134,15 +144,6 @@ export const CheckMixin = (superClass) => {
|
|
|
134
144
|
this.checked = !this.checked;
|
|
135
145
|
this.updateInternals();
|
|
136
146
|
this.checkValidity(this.checked);
|
|
137
|
-
if (this.description) {
|
|
138
|
-
const attribute = this.description instanceof Array
|
|
139
|
-
? this.description.join(",")
|
|
140
|
-
: this.description;
|
|
141
|
-
this.setAttribute("aria-description", attribute);
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
this.removeAttribute("aria-description");
|
|
145
|
-
}
|
|
146
147
|
this.dispatchEvent(new ChangeEvent(this.checked));
|
|
147
148
|
}
|
|
148
149
|
/**
|
|
@@ -16,6 +16,14 @@ export declare class DialogSurfaceMixinInterface {
|
|
|
16
16
|
protected closeDialogSurface(fallbackFocusEl?: HTMLElement): void;
|
|
17
17
|
protected teardownDialogSurface(open: boolean): void;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Where focus lands when a dialog surface opens. `auto` keeps each
|
|
21
|
+
* component's own default target. `first-field` moves it to the first
|
|
22
|
+
* focusable element of the body when the surface was opened from the
|
|
23
|
+
* keyboard, and behaves like `auto` otherwise, so a touch opening doesn't
|
|
24
|
+
* bring up the virtual keyboard. A slotted `[autofocus]` element always wins.
|
|
25
|
+
*/
|
|
26
|
+
export type EunomiaDialogInitialFocus = "auto" | "first-field";
|
|
19
27
|
/**
|
|
20
28
|
* Shared machinery behind every `manual`-mode popover "dialog surface" in
|
|
21
29
|
* this library (`eun-drawer`, `eun-modal`, `eun-toolbar`'s mobile panel):
|
|
@@ -13,6 +13,11 @@ export declare class DisabledMixinInterface {
|
|
|
13
13
|
* - `tabindex` (to prevent focus when disabled),
|
|
14
14
|
* - `aria-disabled` for accessibility, only present while disabled.
|
|
15
15
|
*
|
|
16
|
+
* A component whose host is the control itself (a checkbox, a button) gets
|
|
17
|
+
* `tabindex="0"` while enabled. One rendering its own focusable controls
|
|
18
|
+
* inside its shadow root overrides {@link hostTabStop} to `false`, so the
|
|
19
|
+
* host never becomes an extra, empty stop in front of them.
|
|
20
|
+
*
|
|
16
21
|
* @param superClass - The base class to extend.
|
|
17
22
|
* @returns A new class extending the base with `disabled` behavior.
|
|
18
23
|
*/
|
|
@@ -12,6 +12,11 @@ import { property } from "lit/decorators.js";
|
|
|
12
12
|
* - `tabindex` (to prevent focus when disabled),
|
|
13
13
|
* - `aria-disabled` for accessibility, only present while disabled.
|
|
14
14
|
*
|
|
15
|
+
* A component whose host is the control itself (a checkbox, a button) gets
|
|
16
|
+
* `tabindex="0"` while enabled. One rendering its own focusable controls
|
|
17
|
+
* inside its shadow root overrides {@link hostTabStop} to `false`, so the
|
|
18
|
+
* host never becomes an extra, empty stop in front of them.
|
|
19
|
+
*
|
|
15
20
|
* @param superClass - The base class to extend.
|
|
16
21
|
* @returns A new class extending the base with `disabled` behavior.
|
|
17
22
|
*/
|
|
@@ -26,6 +31,13 @@ export const DisabledMixin = (superClass) => {
|
|
|
26
31
|
*/
|
|
27
32
|
this.disabled = false;
|
|
28
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Whether the host itself is a tab stop while enabled. `false` for a
|
|
36
|
+
* component whose focusable controls live inside its shadow root.
|
|
37
|
+
*/
|
|
38
|
+
get hostTabStop() {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
29
41
|
/**
|
|
30
42
|
* LitElement lifecycle method.
|
|
31
43
|
* Called when reactive properties are updated.
|
|
@@ -35,7 +47,15 @@ export const DisabledMixin = (superClass) => {
|
|
|
35
47
|
updated(_changedProperties) {
|
|
36
48
|
super.updated(_changedProperties);
|
|
37
49
|
if (_changedProperties.has("disabled")) {
|
|
38
|
-
|
|
50
|
+
if (this.disabled) {
|
|
51
|
+
this.setAttribute("tabindex", "-1");
|
|
52
|
+
}
|
|
53
|
+
else if (this.hostTabStop) {
|
|
54
|
+
this.setAttribute("tabindex", "0");
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.removeAttribute("tabindex");
|
|
58
|
+
}
|
|
39
59
|
if (this.disabled) {
|
|
40
60
|
this.setAttribute("aria-disabled", "true");
|
|
41
61
|
}
|
|
@@ -4,6 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
7
12
|
import { property } from "lit/decorators.js";
|
|
8
13
|
import { CommitEvent } from "../events/commit.event.js";
|
|
9
14
|
/**
|
|
@@ -22,9 +27,11 @@ import { CommitEvent } from "../events/commit.event.js";
|
|
|
22
27
|
* @returns A class extending the provided superclass with editable behavior.
|
|
23
28
|
*/
|
|
24
29
|
export const EditableMixin = (superClass) => {
|
|
30
|
+
var _EditableMixinClass_instances, _EditableMixinClass_leaveEdit, _EditableMixinClass_ownsFocus;
|
|
25
31
|
class EditableMixinClass extends superClass {
|
|
26
32
|
constructor() {
|
|
27
33
|
super(...arguments);
|
|
34
|
+
_EditableMixinClass_instances.add(this);
|
|
28
35
|
/**
|
|
29
36
|
* Whether the field can switch between a static read display and an
|
|
30
37
|
* editable one. When false, the field always renders as fully editable.
|
|
@@ -50,15 +57,19 @@ export const EditableMixin = (superClass) => {
|
|
|
50
57
|
}
|
|
51
58
|
/**
|
|
52
59
|
* Confirms the current edit. Runs validation first; if it fails, the
|
|
53
|
-
* field stays in edit mode
|
|
54
|
-
* On success, dispatches a {@link CommitEvent}
|
|
55
|
-
* the new value.
|
|
60
|
+
* field stays in edit mode, shows its error and gets the focus back
|
|
61
|
+
* instead of committing. On success, dispatches a {@link CommitEvent}
|
|
62
|
+
* so consumers can persist the new value.
|
|
56
63
|
*/
|
|
57
64
|
confirmEdit() {
|
|
58
65
|
if (!this.checkValidity(this.value)) {
|
|
66
|
+
this.validationRequested = true;
|
|
67
|
+
if (__classPrivateFieldGet(this, _EditableMixinClass_instances, "m", _EditableMixinClass_ownsFocus).call(this)) {
|
|
68
|
+
this.focus();
|
|
69
|
+
}
|
|
59
70
|
return;
|
|
60
71
|
}
|
|
61
|
-
this
|
|
72
|
+
__classPrivateFieldGet(this, _EditableMixinClass_instances, "m", _EditableMixinClass_leaveEdit).call(this);
|
|
62
73
|
this.dispatchEvent(new CommitEvent());
|
|
63
74
|
}
|
|
64
75
|
/**
|
|
@@ -67,9 +78,21 @@ export const EditableMixin = (superClass) => {
|
|
|
67
78
|
*/
|
|
68
79
|
cancelEdit() {
|
|
69
80
|
this.value = this.valueOnEditStart;
|
|
70
|
-
this
|
|
81
|
+
__classPrivateFieldGet(this, _EditableMixinClass_instances, "m", _EditableMixinClass_leaveEdit).call(this);
|
|
71
82
|
}
|
|
72
83
|
}
|
|
84
|
+
_EditableMixinClass_instances = new WeakSet(), _EditableMixinClass_leaveEdit = function _EditableMixinClass_leaveEdit() {
|
|
85
|
+
const restoreFocus = __classPrivateFieldGet(this, _EditableMixinClass_instances, "m", _EditableMixinClass_ownsFocus).call(this);
|
|
86
|
+
this.editing = false;
|
|
87
|
+
if (restoreFocus) {
|
|
88
|
+
void this.updateComplete.then(() => this.shadowRoot
|
|
89
|
+
?.querySelector("#readonly-display")
|
|
90
|
+
?.focus());
|
|
91
|
+
}
|
|
92
|
+
}, _EditableMixinClass_ownsFocus = function _EditableMixinClass_ownsFocus() {
|
|
93
|
+
const active = document.activeElement;
|
|
94
|
+
return (!active || active === document.body || this.matches(":focus-within"));
|
|
95
|
+
};
|
|
73
96
|
__decorate([
|
|
74
97
|
property({
|
|
75
98
|
type: Boolean,
|
|
@@ -20,13 +20,14 @@ export const FieldAppearanceMixin = (superClass) => {
|
|
|
20
20
|
super(...arguments);
|
|
21
21
|
/**
|
|
22
22
|
* How the field's surface is drawn.
|
|
23
|
-
* By default, set to "outline".
|
|
23
|
+
* By default, set to "outline". The default isn't reflected, so an SSR
|
|
24
|
+
* framework doesn't see an attribute it never rendered.
|
|
24
25
|
*/
|
|
25
26
|
this.appearance = "outline";
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
__decorate([
|
|
29
|
-
property({ reflect: true })
|
|
30
|
+
property({ reflect: true, useDefault: true })
|
|
30
31
|
], FieldAppearanceMixinClass.prototype, "appearance", void 0);
|
|
31
32
|
return FieldAppearanceMixinClass;
|
|
32
33
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { Constructor } from "../utils/constructor.type.js";
|
|
3
|
+
import { EunomiaSize } from "../types/variant.type.js";
|
|
4
|
+
/**
|
|
5
|
+
* Interface defining the contract for components using FieldSizeMixin.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FieldSizeMixinInterface {
|
|
8
|
+
size?: EunomiaSize;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A mixin that adds a `size` property to a text-like form field component,
|
|
12
|
+
* with the same values as `eun-button`'s own. A field and a button of the
|
|
13
|
+
* same size share their font size, vertical padding and line height, so
|
|
14
|
+
* they line up at the same height side by side (see `field.styles.ts`).
|
|
15
|
+
*
|
|
16
|
+
* @param superClass - The base class to extend.
|
|
17
|
+
* @returns A new class extending the base with `size` behavior.
|
|
18
|
+
*/
|
|
19
|
+
export declare const FieldSizeMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<FieldSizeMixinInterface> & T;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { property } from "lit/decorators.js";
|
|
8
|
+
/**
|
|
9
|
+
* A mixin that adds a `size` property to a text-like form field component,
|
|
10
|
+
* with the same values as `eun-button`'s own. A field and a button of the
|
|
11
|
+
* same size share their font size, vertical padding and line height, so
|
|
12
|
+
* they line up at the same height side by side (see `field.styles.ts`).
|
|
13
|
+
*
|
|
14
|
+
* @param superClass - The base class to extend.
|
|
15
|
+
* @returns A new class extending the base with `size` behavior.
|
|
16
|
+
*/
|
|
17
|
+
export const FieldSizeMixin = (superClass) => {
|
|
18
|
+
class FieldSizeMixinClass extends superClass {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/**
|
|
22
|
+
* The field size, matching the button size of the same name.
|
|
23
|
+
* By default, set to "m". The default isn't reflected, so an SSR
|
|
24
|
+
* framework doesn't see an attribute it never rendered.
|
|
25
|
+
*/
|
|
26
|
+
this.size = "m";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
__decorate([
|
|
30
|
+
property({ reflect: true, useDefault: true })
|
|
31
|
+
], FieldSizeMixinClass.prototype, "size", void 0);
|
|
32
|
+
return FieldSizeMixinClass;
|
|
33
|
+
};
|
|
@@ -17,12 +17,16 @@ export declare class FormMixinInterface<T> {
|
|
|
17
17
|
description?: string | string[] | undefined;
|
|
18
18
|
valueState?: T;
|
|
19
19
|
hideError?: boolean;
|
|
20
|
+
invalid: boolean;
|
|
20
21
|
form: HTMLFormElement | null;
|
|
21
22
|
dirty: boolean;
|
|
22
23
|
touched: boolean;
|
|
23
24
|
validationRequested: boolean;
|
|
24
25
|
controlled: boolean;
|
|
26
|
+
descriptionOnHost: boolean;
|
|
27
|
+
errorOnChange: boolean;
|
|
25
28
|
get showError(): boolean;
|
|
29
|
+
get showErrorMessages(): boolean;
|
|
26
30
|
get pristine(): boolean;
|
|
27
31
|
get untouched(): boolean;
|
|
28
32
|
get value(): T;
|