@eunomia/elements 1.0.0-beta.2 → 1.0.0-beta.4
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-2JLDJFYD.js +48 -0
- package/dist/cdn/components/chunks/chunk-4MXL6PZC.js +124 -0
- package/dist/cdn/components/chunks/{chunk-32KRPOPV.js → chunk-5XJGYXW7.js} +6 -6
- package/dist/cdn/components/chunks/{chunk-O2HNWH65.js → chunk-5XJLIHAU.js} +7 -7
- package/dist/cdn/components/chunks/{chunk-5GF2Q3NR.js → chunk-74AOAB4X.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-WYMBUIKX.js → chunk-A6KGFALA.js} +4 -4
- package/dist/cdn/components/chunks/chunk-BMQOI7HX.js +371 -0
- package/dist/cdn/components/chunks/{chunk-LJYTHDZP.js → chunk-D2M4BV5Y.js} +6 -6
- package/dist/cdn/components/chunks/{chunk-NEYBPT3D.js → chunk-EJIX2D4Z.js} +2 -2
- package/dist/cdn/components/chunks/{chunk-BYBUXKXC.js → chunk-EOWBYZV7.js} +2 -2
- package/dist/cdn/components/chunks/chunk-EST3M4AO.js +1 -0
- package/dist/cdn/components/chunks/{chunk-AQQMW353.js → chunk-GSJEJLFA.js} +3 -3
- package/dist/cdn/components/chunks/chunk-GU6BVMFJ.js +1 -0
- package/dist/cdn/components/chunks/{chunk-5RCCZVFZ.js → chunk-IJ5WFMK4.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-RWONCXTF.js → chunk-KVYUNKUO.js} +2 -2
- package/dist/cdn/components/chunks/chunk-LGLQ36QB.js +16 -0
- package/dist/cdn/components/chunks/{chunk-74HHV4CX.js → chunk-NHFWATVN.js} +2 -2
- package/dist/cdn/components/chunks/chunk-OAULRKHQ.js +38 -0
- package/dist/cdn/components/chunks/chunk-P32B7BFD.js +118 -0
- package/dist/cdn/components/chunks/{chunk-ZPFHTJSS.js → chunk-PCM7D3YF.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-ABYEBP57.js → chunk-PED5ATYN.js} +11 -8
- package/dist/cdn/components/chunks/{chunk-ON42P6FI.js → chunk-RJCJXB7Y.js} +5 -5
- package/dist/cdn/components/chunks/{chunk-5C7YND22.js → chunk-S2UCEWNG.js} +8 -8
- package/dist/cdn/components/chunks/{chunk-7WTSHE7M.js → chunk-SIHZFOTK.js} +9 -9
- package/dist/cdn/components/chunks/{chunk-6UPI7GHJ.js → chunk-UAGCQF23.js} +7 -7
- package/dist/cdn/components/chunks/{chunk-6IILPCSQ.js → chunk-X2AUBZD2.js} +3 -3
- package/dist/cdn/components/chunks/chunk-YGUJJ25C.js +263 -0
- package/dist/cdn/components/chunks/chunk-YYCEPZUN.js +1 -0
- package/dist/cdn/components/eun-alert.js +65 -45
- package/dist/cdn/components/eun-animate.js +178 -2
- package/dist/cdn/components/eun-badge.js +1 -1
- package/dist/cdn/components/eun-breadcrumb-item.js +14 -10
- package/dist/cdn/components/eun-breadcrumb.js +11 -7
- package/dist/cdn/components/eun-button.js +1 -1
- package/dist/cdn/components/eun-calendar.js +16 -16
- package/dist/cdn/components/eun-card.js +29 -12
- package/dist/cdn/components/eun-carousel.js +36 -28
- package/dist/cdn/components/eun-check-card.js +3 -3
- package/dist/cdn/components/eun-checkbox-list.js +3 -3
- package/dist/cdn/components/eun-checkbox.js +1 -1
- package/dist/cdn/components/eun-chip.js +45 -210
- package/dist/cdn/components/eun-collapse.js +20 -26
- package/dist/cdn/components/eun-color-picker.js +28 -28
- package/dist/cdn/components/eun-counter.js +11 -11
- package/dist/cdn/components/eun-date-picker.js +50 -50
- package/dist/cdn/components/eun-drawer.js +3 -3
- package/dist/cdn/components/eun-dropdown-button.js +1 -1
- package/dist/cdn/components/eun-dropdown-item.js +6 -6
- package/dist/cdn/components/eun-fab.js +31 -53
- package/dist/cdn/components/eun-icon.js +1 -1
- package/dist/cdn/components/eun-image-card.js +18 -11
- package/dist/cdn/components/eun-image-carousel.js +16 -16
- package/dist/cdn/components/eun-infinite-list.js +1 -1
- package/dist/cdn/components/eun-input-file.js +20 -20
- package/dist/cdn/components/eun-input-phone.js +14 -14
- 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 +29 -11
- package/dist/cdn/components/eun-loader.js +1 -1
- package/dist/cdn/components/eun-modal.js +6 -6
- package/dist/cdn/components/eun-pagination.js +3 -3
- package/dist/cdn/components/eun-password-strength.js +9 -6
- package/dist/cdn/components/eun-progress-bar.js +13 -13
- package/dist/cdn/components/eun-radio-card.js +2 -2
- package/dist/cdn/components/eun-radio-list.js +3 -3
- package/dist/cdn/components/eun-radio.js +1 -1
- package/dist/cdn/components/eun-scheduler-event-editor.js +2 -2
- package/dist/cdn/components/eun-scheduler-event.js +1 -1
- package/dist/cdn/components/eun-scheduler.js +10 -10
- package/dist/cdn/components/eun-search.js +7 -7
- package/dist/cdn/components/eun-select.js +39 -18
- package/dist/cdn/components/eun-sidebar.js +10 -10
- package/dist/cdn/components/eun-skeleton.js +1 -1
- package/dist/cdn/components/eun-slider.js +9 -9
- package/dist/cdn/components/eun-sliding-card.js +7 -10
- package/dist/cdn/components/eun-step.js +8 -8
- package/dist/cdn/components/eun-stepper.js +8 -8
- package/dist/cdn/components/eun-switch.js +10 -10
- package/dist/cdn/components/eun-tab-group.js +19 -11
- 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-cell.js +1 -1
- package/dist/cdn/components/eun-table-column.js +1 -1
- package/dist/cdn/components/eun-table-header.js +1 -1
- package/dist/cdn/components/eun-table-item.js +1 -1
- package/dist/cdn/components/eun-table-skeleton-row.js +1 -1
- package/dist/cdn/components/eun-table.js +3 -3
- package/dist/cdn/components/eun-tag.js +34 -122
- package/dist/cdn/components/eun-textarea.js +28 -28
- package/dist/cdn/components/eun-time-picker.js +25 -25
- package/dist/cdn/components/eun-toast.js +40 -36
- package/dist/cdn/components/eun-toggle-group.js +199 -66
- package/dist/cdn/components/eun-toggle-item.js +42 -25
- package/dist/cdn/components/eun-toggle.js +13 -10
- package/dist/cdn/components/eun-toolbar.js +28 -19
- package/dist/cdn/components/eun-tooltip.js +122 -87
- 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 +1 -0
- package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +71 -0
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +3 -13
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.mixin.scss +3 -13
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.scss +2 -0
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +3 -13
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.mixin.scss +3 -13
- 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 +2 -0
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +3 -13
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.mixin.scss +3 -13
- 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 +2 -0
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +3 -13
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.mixin.scss +3 -13
- 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 +2 -0
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +3 -13
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.mixin.scss +3 -13
- 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 +2 -0
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +3 -13
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.mixin.scss +3 -13
- 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 +2 -0
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +3 -13
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.mixin.scss +3 -13
- 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 +2 -0
- package/dist/cdn/styles/tools/indexes/eunomia-tools.index.scss +1 -0
- package/dist/cdn/styles/tools/mixins/settings/eunomia-alpha.mixin.scss +39 -0
- package/dist/cdn/styles/tools/mixins/settings/eunomia-border.mixin.scss +3 -3
- package/dist/cdn/styles/tools/mixins/settings/eunomia-font.mixin.scss +12 -12
- package/dist/cdn/styles/tools/mixins/settings/eunomia-radius.mixin.scss +4 -4
- package/dist/components/action/button/button.d.ts +7 -6
- package/dist/components/action/button/button.js +7 -6
- package/dist/components/action/button/button.styles.js +143 -373
- package/dist/components/action/dropdown-button/dropdown-button.d.ts +7 -0
- package/dist/components/action/dropdown-button/dropdown-button.js +11 -0
- package/dist/components/action/dropdown-button/dropdown-button.styles.js +8 -8
- package/dist/components/action/dropdown-button/dropdown-item.styles.js +6 -6
- package/dist/components/action/fab/fab.d.ts +3 -1
- package/dist/components/action/fab/fab.js +3 -1
- package/dist/components/action/fab/fab.styles.js +26 -49
- package/dist/components/action/link/link.d.ts +50 -0
- package/dist/components/action/link/link.js +69 -1
- package/dist/components/action/link/link.styles.js +19 -2
- package/dist/components/action/shared-styles/button-palette.styles.d.ts +27 -0
- package/dist/components/action/shared-styles/button-palette.styles.js +151 -0
- package/dist/components/action/toggle/toggle-group.d.ts +41 -7
- package/dist/components/action/toggle/toggle-group.js +162 -46
- package/dist/components/action/toggle/toggle-group.styles.d.ts +6 -5
- package/dist/components/action/toggle/toggle-group.styles.js +152 -35
- package/dist/components/action/toggle/toggle-item.styles.js +38 -21
- package/dist/components/action/toggle/toggle.d.ts +1 -1
- package/dist/components/action/toggle/toggle.js +2 -2
- package/dist/components/action/toggle/toggle.styles.d.ts +2 -2
- package/dist/components/action/toggle/toggle.styles.js +13 -10
- package/dist/components/alert/alert/alert.d.ts +4 -3
- package/dist/components/alert/alert/alert.js +4 -3
- package/dist/components/alert/alert/alert.styles.js +57 -36
- package/dist/components/alert/drawer/drawer.styles.js +3 -3
- package/dist/components/alert/modal/modal.styles.js +6 -6
- package/dist/components/alert/toast/toast.d.ts +4 -3
- package/dist/components/alert/toast/toast.js +4 -3
- package/dist/components/alert/toast/toast.styles.js +41 -36
- package/dist/components/content/badge/badge.styles.js +1 -1
- package/dist/components/content/card/card.d.ts +4 -4
- package/dist/components/content/card/card.js +4 -4
- package/dist/components/content/card/card.styles.js +27 -10
- package/dist/components/content/card/image-card.d.ts +1 -1
- package/dist/components/content/card/image-card.js +1 -1
- package/dist/components/content/card/image-card.styles.js +17 -10
- package/dist/components/content/card/sliding-card.styles.js +3 -6
- package/dist/components/content/chip/chip.d.ts +16 -7
- package/dist/components/content/chip/chip.js +18 -6
- package/dist/components/content/chip/chip.styles.d.ts +1 -1
- package/dist/components/content/chip/chip.styles.js +43 -210
- package/dist/components/content/collapse/collapse.styles.js +10 -16
- package/dist/components/content/icon/icon.d.ts +48 -5
- package/dist/components/content/icon/icon.js +92 -20
- package/dist/components/content/icon/icon.style.js +1 -1
- package/dist/components/content/image-carousel/image-carousel.styles.js +14 -14
- package/dist/components/content/password-strength/password-strength.styles.js +7 -4
- package/dist/components/content/progress-bar/progress-bar.styles.js +9 -9
- package/dist/components/content/shared-styles/tone-surface.styles.d.ts +31 -0
- package/dist/components/content/shared-styles/tone-surface.styles.js +149 -0
- package/dist/components/content/tag/tag.d.ts +16 -6
- package/dist/components/content/tag/tag.js +19 -6
- package/dist/components/content/tag/tag.styles.d.ts +1 -1
- package/dist/components/content/tag/tag.styles.js +40 -121
- package/dist/components/content/tooltip/tooltip.d.ts +15 -4
- package/dist/components/content/tooltip/tooltip.js +21 -4
- package/dist/components/content/tooltip/tooltip.styles.js +115 -79
- package/dist/components/form/checkbox/check-card.styles.js +2 -2
- package/dist/components/form/checkbox/checkbox-list.d.ts +1 -1
- package/dist/components/form/checkbox/checkbox-list.js +1 -1
- package/dist/components/form/checkbox/checkbox.d.ts +1 -1
- package/dist/components/form/checkbox/checkbox.styles.js +6 -6
- package/dist/components/form/color-picker/color-picker.d.ts +1 -1
- package/dist/components/form/color-picker/color-picker.js +9 -7
- package/dist/components/form/color-picker/color-picker.styles.js +7 -7
- package/dist/components/form/counter/counter.d.ts +1 -1
- package/dist/components/form/counter/counter.js +3 -3
- package/dist/components/form/counter/counter.styles.js +7 -7
- package/dist/components/form/date-picker/date-picker-day-grid.styles.js +2 -2
- package/dist/components/form/date-picker/date-picker-grid.styles.js +15 -15
- package/dist/components/form/date-picker/date-picker-month-grid.styles.js +1 -1
- package/dist/components/form/date-picker/date-picker-year-grid.styles.js +1 -1
- package/dist/components/form/date-picker/date-picker.d.ts +1 -1
- package/dist/components/form/date-picker/date-picker.js +3 -3
- package/dist/components/form/date-picker/date-picker.styles.js +12 -12
- package/dist/components/form/input/input.d.ts +1 -1
- package/dist/components/form/input/input.js +2 -2
- package/dist/components/form/input-file/input-file.d.ts +1 -1
- package/dist/components/form/input-file/input-file.js +5 -5
- package/dist/components/form/input-file/input-file.styles.js +9 -9
- package/dist/components/form/input-phone/input-phone.d.ts +1 -1
- package/dist/components/form/input-phone/input-phone.js +3 -3
- package/dist/components/form/input-phone/input-phone.styles.js +7 -7
- package/dist/components/form/label/label.styles.js +4 -4
- package/dist/components/form/radio/radio-card.styles.js +1 -1
- package/dist/components/form/radio/radio-list.d.ts +1 -1
- package/dist/components/form/radio/radio-list.js +2 -2
- package/dist/components/form/radio/radio.d.ts +1 -1
- package/dist/components/form/radio/radio.styles.js +2 -2
- package/dist/components/form/search/search.styles.js +6 -6
- package/dist/components/form/select/select.d.ts +17 -1
- package/dist/components/form/select/select.js +28 -5
- package/dist/components/form/select/select.styles.js +16 -5
- package/dist/components/form/shared-styles/card.styles.js +1 -1
- package/dist/components/form/shared-styles/field.styles.js +7 -7
- package/dist/components/form/shared-styles/form-labels.styles.js +1 -1
- package/dist/components/form/shared-styles/listbox.styles.js +6 -6
- package/dist/components/form/slider/slider.d.ts +1 -1
- package/dist/components/form/slider/slider.js +2 -2
- package/dist/components/form/slider/slider.styles.js +6 -6
- package/dist/components/form/switch/switch.d.ts +1 -1
- package/dist/components/form/switch/switch.styles.js +8 -8
- package/dist/components/form/textarea/textarea.d.ts +1 -1
- package/dist/components/form/textarea/textarea.js +4 -4
- package/dist/components/form/textarea/textarea.styles.js +6 -6
- package/dist/components/form/time-picker/time-picker-columns.styles.js +6 -6
- package/dist/components/form/time-picker/time-picker-list.styles.js +2 -2
- package/dist/components/form/time-picker/time-picker.d.ts +1 -1
- package/dist/components/form/time-picker/time-picker.js +3 -3
- package/dist/components/form/time-picker/time-picker.styles.js +8 -8
- package/dist/components/layout/animate/animate.d.ts +40 -5
- package/dist/components/layout/animate/animate.js +30 -11
- package/dist/components/layout/animate/animate.styles.d.ts +1 -1
- package/dist/components/layout/animate/animate.styles.js +191 -1
- package/dist/components/loader/loader/loader.styles.js +2 -2
- package/dist/components/loader/skeleton/skeleton.styles.js +8 -5
- package/dist/components/navigation/breadcrumb/breadcrumb-item.d.ts +7 -0
- package/dist/components/navigation/breadcrumb/breadcrumb-item.js +15 -1
- package/dist/components/navigation/breadcrumb/breadcrumb-item.styles.js +3 -3
- package/dist/components/navigation/breadcrumb/breadcrumb.d.ts +1 -0
- package/dist/components/navigation/breadcrumb/breadcrumb.js +7 -1
- package/dist/components/navigation/breadcrumb/breadcrumb.styles.js +3 -3
- package/dist/components/navigation/carousel/carousel.d.ts +40 -6
- package/dist/components/navigation/carousel/carousel.js +61 -12
- package/dist/components/navigation/carousel/carousel.styles.js +20 -8
- package/dist/components/navigation/pagination/pagination.styles.js +3 -3
- package/dist/components/navigation/sidebar/sidebar.styles.js +9 -9
- package/dist/components/navigation/stepper/step.styles.js +8 -8
- package/dist/components/navigation/stepper/stepper.styles.js +8 -8
- package/dist/components/navigation/tabs/tab/tab.styles.js +5 -5
- package/dist/components/navigation/tabs/tab-group/tab-group.d.ts +9 -0
- package/dist/components/navigation/tabs/tab-group/tab-group.js +19 -2
- package/dist/components/navigation/tabs/tab-group/tab-group.styles.js +12 -4
- package/dist/components/navigation/tabs/tab-panel/tab-panel.styles.js +1 -1
- package/dist/components/navigation/toolbar/toolbar.d.ts +24 -0
- package/dist/components/navigation/toolbar/toolbar.js +30 -2
- package/dist/components/navigation/toolbar/toolbar.styles.js +20 -10
- package/dist/events/change.event.d.ts +13 -1
- package/dist/events/change.event.js +2 -1
- package/dist/features/scheduler/calendar/calendar.js +1 -1
- package/dist/features/scheduler/calendar/calendar.styles.js +3 -3
- package/dist/features/scheduler/scheduler/scheduler.styles.js +2 -2
- package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +2 -2
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.styles.js +2 -2
- package/dist/features/scheduler/shared/scheduler-event-popover.styles.js +4 -4
- package/dist/features/scheduler/shared/scheduler-hour-grid.styles.js +1 -1
- package/dist/features/scheduler/shared/scheduler-month-view.styles.js +1 -1
- package/dist/features/scheduler/shared/scheduler-year-view.styles.js +1 -1
- package/dist/features/table/native-table.css +11 -11
- package/dist/features/table/table/table.styles.js +2 -2
- package/dist/features/table/table-action-bar/table-action-bar.styles.js +2 -2
- package/dist/features/table/table-cell/table-cell.styles.js +2 -2
- package/dist/features/table/table-column/table-column.styles.js +3 -3
- package/dist/features/table/table-header/table-header.styles.js +4 -4
- package/dist/features/table/table-item/table-item.styles.js +6 -6
- package/dist/features/table/table-skeleton-row/table-skeleton-row.styles.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -3
- package/dist/jsx.d.ts +18 -5
- package/dist/mixins/button.mixin.d.ts +1 -0
- package/dist/mixins/button.mixin.js +10 -0
- package/dist/mixins/check.mixin.d.ts +1 -1
- package/dist/mixins/check.mixin.js +6 -2
- package/dist/mixins/editable.mixin.d.ts +1 -1
- package/dist/mixins/form.mixin.d.ts +9 -1
- package/dist/mixins/form.mixin.js +110 -14
- package/dist/mixins/overflow-navigation.mixin.js +2 -1
- package/dist/mixins/radio.mixin.d.ts +1 -1
- package/dist/mixins/radio.mixin.js +6 -2
- package/dist/mixins/validators.mixin.d.ts +9 -3
- package/dist/ssr/animate-ssr.css +149 -0
- package/dist/ssr/overlay-ssr.css +57 -0
- package/dist/ssr/sidebar-ssr.css +57 -0
- package/dist/ssr/toolbar-ssr.css +41 -0
- package/dist/utils/rich-text.utils.d.ts +33 -0
- package/dist/utils/rich-text.utils.js +140 -49
- package/dist/utils/theme-generator.utils.d.ts +24 -3
- package/dist/utils/theme-generator.utils.js +66 -21
- package/package.json +14 -3
- package/styles/themes/eunomia-theme.scss +1 -0
- package/styles/themes/mixins/eunomia-neutrals.mixin.scss +71 -0
- package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/eunomia/eunomia.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/eunomia/eunomia.theme.scss +2 -0
- package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/fire/eunomia-fire.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.scss +2 -0
- package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/forest/eunomia-forest.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.scss +2 -0
- package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/gold/eunomia-gold.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.scss +2 -0
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.scss +2 -0
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.scss +2 -0
- package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/violet/eunomia-violet.mixin.scss +3 -13
- package/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.scss +2 -0
- package/styles/tools/indexes/eunomia-tools.index.scss +1 -0
- package/styles/tools/mixins/settings/eunomia-alpha.mixin.scss +39 -0
- package/styles/tools/mixins/settings/eunomia-border.mixin.scss +3 -3
- package/styles/tools/mixins/settings/eunomia-font.mixin.scss +12 -12
- package/styles/tools/mixins/settings/eunomia-radius.mixin.scss +4 -4
- package/dist/cdn/components/chunks/chunk-27Q2SLRY.js +0 -603
- package/dist/cdn/components/chunks/chunk-2IQUMAMI.js +0 -38
- package/dist/cdn/components/chunks/chunk-5TH3P53V.js +0 -16
- package/dist/cdn/components/chunks/chunk-7Q6AHVI5.js +0 -1
- package/dist/cdn/components/chunks/chunk-DENMN3WH.js +0 -48
- package/dist/cdn/components/chunks/chunk-MBF52GEL.js +0 -1
- package/dist/cdn/components/chunks/chunk-ONYUXQV2.js +0 -1
- package/dist/cdn/components/chunks/chunk-ZKPCO5RB.js +0 -262
- package/dist/components/layout/animate/animate-ssr.css +0 -64
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk-
|
|
1
|
+
import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk-UAGCQF23.js";import{a as X}from"./chunks/chunk-L74LXUGL.js";import{a as U}from"./chunks/chunk-XSMCT4DF.js";import{a as G}from"./chunks/chunk-GW3VP2L7.js";import{a as z,b as F,c as j,d as K,e as C}from"./chunks/chunk-OAULRKHQ.js";import{a as S}from"./chunks/chunk-YYCEPZUN.js";import{a as N,b as y,c as w,d as A,e as V,f as R,g as O}from"./chunks/chunk-LGLQ36QB.js";import{a as B}from"./chunks/chunk-T7WABJEJ.js";import{a as P}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import{a as v}from"./chunks/chunk-5EVP7YNE.js";import{a as c,f as I,g as _,h as u,i as E,j as k,n as g,p as b,s as D}from"./chunks/chunk-XH6NREVZ.js";var re=_`
|
|
2
2
|
#field {
|
|
3
3
|
resize: vertical;
|
|
4
4
|
min-height: 6rem;
|
|
@@ -70,12 +70,12 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
70
70
|
width: 2rem;
|
|
71
71
|
height: 2rem;
|
|
72
72
|
padding: 0;
|
|
73
|
-
border: var(--eun-
|
|
73
|
+
border: var(--eun-border-width-m, 1.5px) solid
|
|
74
74
|
var(
|
|
75
75
|
--_border-indicator-color,
|
|
76
76
|
var(--field-border-color, var(--eun-border-color, #dee0e7))
|
|
77
77
|
);
|
|
78
|
-
border-radius: var(--eun-
|
|
78
|
+
border-radius: var(--eun-border-radius-m, 8px);
|
|
79
79
|
background: none;
|
|
80
80
|
color: var(--_iconColor, var(--eun-text-secondary, #484e61));
|
|
81
81
|
cursor: pointer;
|
|
@@ -102,9 +102,9 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
102
102
|
left: 0;
|
|
103
103
|
margin: 0;
|
|
104
104
|
padding: var(--eun-space-xs, 4px);
|
|
105
|
-
border: var(--eun-
|
|
105
|
+
border: var(--eun-border-width-m, 1.5px) solid
|
|
106
106
|
var(--eun-border-color, #dee0e7);
|
|
107
|
-
border-radius: var(--eun-
|
|
107
|
+
border-radius: var(--eun-border-radius-m, 8px);
|
|
108
108
|
background: var(--eun-surface-color, #ffffff);
|
|
109
109
|
box-shadow: var(--eun-shadow-m, 0 4px 16px rgba(0, 0, 0, 0.12));
|
|
110
110
|
display: grid;
|
|
@@ -118,7 +118,7 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
118
118
|
width: 1.75rem;
|
|
119
119
|
height: 1.75rem;
|
|
120
120
|
padding: 0;
|
|
121
|
-
border-radius: var(--eun-
|
|
121
|
+
border-radius: var(--eun-border-radius-xl, 999px);
|
|
122
122
|
border: 2px solid transparent;
|
|
123
123
|
background-color: var(--_swatch-bg);
|
|
124
124
|
cursor: pointer;
|
|
@@ -147,14 +147,14 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
147
147
|
flex: 0 0 auto;
|
|
148
148
|
margin-inline-start: auto;
|
|
149
149
|
white-space: nowrap;
|
|
150
|
-
font-size: var(--eun-
|
|
150
|
+
font-size: var(--eun-font-size-xs, 12px);
|
|
151
151
|
color: var(--_hintColor, var(--eun-text-secondary, #484e61));
|
|
152
152
|
}
|
|
153
153
|
#char-count[data-exceeded] {
|
|
154
154
|
color: var(--_errorColor);
|
|
155
155
|
}
|
|
156
|
-
`,Y=[W,
|
|
157
|
-
`);if(
|
|
156
|
+
`,Y=[W,re];var oe="eun-textarea",H={bold:"STRONG",italic:"EM",underline:"U"},T={bold:()=>document.createElement("strong"),italic:()=>document.createElement("em"),underline:()=>document.createElement("u")},se={b:"bold",i:"italic",u:"underline"};function ce(n){return!(n.ctrlKey||n.metaKey)||n.altKey?null:se[n.key.toLowerCase()]??null}function J(n,l){let e=l;for(;e&&e.parentNode!==n;)e=e.parentNode;return e}function m(n){let l=n.getRootNode();return l instanceof ShadowRoot&&typeof l.getSelection=="function"?l.getSelection():window.getSelection()}function $(n){let l=m(n);if(!l||!l.rangeCount)return null;let e=l.getRangeAt(0);return e.collapsed||!n.contains(e.commonAncestorContainer)?null:e}function ne(n,l){let e=document.createRange();e.selectNodeContents(l),n.removeAllRanges(),n.addRange(e)}function Q(n){let l=m(n);if(!l||!l.rangeCount)return null;let e=l.getRangeAt(0);return!e.collapsed||!n.contains(e.commonAncestorContainer)?null:e}function de(n){return!n.bold&&!n.italic&&!n.underline&&!n.color&&!n.highlight}var x="\u200B";function ue(n){let l=[];if(n.bold&&l.push(T.bold()),n.italic&&l.push(T.italic()),n.underline&&l.push(T.underline()),n.color){let e=y(n.color),t=document.createElement("span");t.setAttribute("data-color",n.color),t.style.color=e?.text??"inherit",l.push(t)}if(n.highlight){let e=y(n.highlight),t=document.createElement("span");t.setAttribute("data-highlight",n.highlight),t.style.backgroundColor=e?.highlight??"transparent",l.push(t)}if(!l.length)return null;for(let e=0;e<l.length-1;e+=1)l[e].appendChild(l[e+1]);return l[l.length-1].appendChild(document.createTextNode(x)),l[0]}function he(n,l){let e=l;for(;e.parentNode&&e.parentNode!==n&&e.parentNode.childNodes.length===1;)e=e.parentNode;return e}function Z(n,l){let e=he(n,l),t=e.parentNode,i=Array.from(t.childNodes).indexOf(e);t.removeChild(e);let a=document.createRange();return a.setStart(t,i),a.collapse(!0),a}function ee(n,l,e,t){let i=l,a=e;for(;;){let r=i.parentNode;if(!r||r===n)break;let o=i.nodeType===Node.TEXT_NODE?i.textContent?.length??0:i.childNodes.length;if(!(t?a===0:a===o))break;let h=Array.from(r.childNodes).indexOf(i);i=r,a=t?h:h+1}return{container:i,offset:a}}function le(n,l){let e=ee(n,l.startContainer,l.startOffset,!0),t=ee(n,l.endContainer,l.endOffset,!1);l.setStart(e.container,e.offset),l.setEnd(t.container,t.offset)}function ae(n,l){n.querySelectorAll("*").forEach(e=>{if(!l(e))return;let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}})}function pe(n,l,e){let t=m(n),i=$(n);if(!t||!i)return!1;le(n,i);let a=H[l],r=i.extractContents();ae(r,d=>d.tagName===a);let o=r;if(e){let d=T[l]();d.appendChild(r),o=d}return i.insertNode(o),ne(t,o),!0}function ge(n,l,e){let t=m(n),i=$(n);if(!t||!i)return!1;le(n,i);let a=l==="color"?"color":"highlight",r=i.extractContents();ae(r,d=>d.tagName==="SPAN"&&d.hasAttribute(`data-${a}`));let o=r;if(e){let d=y(e),h=document.createElement("span");h.setAttribute(`data-${a}`,e),h.style.cssText=l==="color"?`color: ${d?.text??"inherit"}`:`background-color: ${d?.highlight??"transparent"}`,h.appendChild(r),o=h}return i.insertNode(o),ne(t,o),!0}function te(n){let l=m(n);if(!l||!l.anchorNode||!n.contains(l.anchorNode))return[];let e=new Set,t=l.anchorNode;for(;t&&t!==n;){if(t instanceof HTMLElement){let i=Object.entries(H).find(([,a])=>a===t.tagName)?.[0];i&&e.add(i)}t=t.parentNode}return Array.from(e)}function ie(n,l){let e=m(n);if(!e||!e.anchorNode||!n.contains(e.anchorNode))return null;let t=e.anchorNode;for(;t&&t!==n;){if(t instanceof HTMLElement){let i=l==="color"?t.getAttribute("data-color"):t.getAttribute("data-highlight");if(i)return i}t=t.parentNode}return null}var fe=B(K(D)),me=U(G(z(q(j(fe))))),s=class extends me{constructor(){super(...arguments);this.formatting=!1;this.formatToolbarLabel="Text formatting";this.formatBoldLabel="Bold";this.formatItalicLabel="Italic";this.formatUnderlineLabel="Underline";this.formatAlignLabel="Text alignment";this.formatAlignStartLabel="Align left";this.formatAlignCenterLabel="Center";this.formatAlignEndLabel="Align right";this.formatAlignJustifyLabel="Justify";this.formatTextColorLabel="Text color";this.formatHighlightLabel="Highlight";this.formatColorClearLabel="Default";this.colorLabels=Object.fromEntries(N.map(e=>[e.name,e.label]));this.autocomplete="off";this.emptyValueLabel="No value set";this.confirmLabel="Save";this.cancelLabel="Cancel";this.openPicker=null;this.activeTextColor=null;this.activeHighlight=null;this.previousActiveFormats=[];this.pendingMarks={bold:!1,italic:!1,underline:!1,color:null,highlight:null};this.pendingCaretNode=null;this.handleHostFocus=()=>{this.fieldEl?.focus()};this.checkLocalValidators=()=>this.formatting?this.checkEditableValidators():X(this.fieldEl,["valueMissing","tooShort","tooLong"]);this.handleEditableInput=()=>{let e=this.fieldEl;if(!(e instanceof HTMLDivElement))return;let t=O(e);this.lastSyncedValue=t,this.value=t,this.resizeEditableField(),this.dispatchEvent(new S(this.value)),this.syncToolbarToSelection()};this.handleEditableBeforeInput=e=>{if(this.maxlength===void 0)return;let t=this.fieldEl;if(!(t instanceof HTMLDivElement)||!e.inputType.startsWith("insert"))return;let i=m(t);!(i&&!i.isCollapsed)&&(t.textContent?.length??0)>=this.maxlength&&e.preventDefault()};this.handleEditablePaste=e=>{let t=this.fieldEl;if(!(t instanceof HTMLDivElement))return;e.preventDefault();let i=e.clipboardData?.getData("text/plain")??"";if(!i)return;let a=m(t);if(!a||!a.rangeCount)return;let r=a.getRangeAt(0);r.deleteContents();let o=i.split(`
|
|
157
|
+
`);if(o.length===1){let d=document.createTextNode(o[0]);r.insertNode(d),r.setStartAfter(d),r.collapse(!0)}else{let d=J(t,r.startContainer),h=r.cloneRange();d&&h.setEndAfter(d.lastChild??d);let p=h.extractContents();r.insertNode(document.createTextNode(o[0]));let f=d;for(let M=1;M<o.length;M+=1){let L=document.createElement("p");L.textContent=o[M],f?.after(L),f=L}f?.appendChild(p),f&&r.selectNodeContents(f),r.collapse(!1)}a.removeAllRanges(),a.addRange(r),this.handleEditableInput()};this.handleEditableKeydown=e=>{let t=this.fieldEl;if(!(t instanceof HTMLDivElement))return;let i=ce(e);if(i){e.preventDefault();let f=te(t).includes(i);this.applyFormat(i,!f);return}if(e.key!=="Enter")return;e.preventDefault();let a=m(t);if(!a||!a.rangeCount)return;let r=a.getRangeAt(0);r.deleteContents();let o=J(t,r.startContainer);if(!o)return;o.hasChildNodes()||o.appendChild(document.createElement("br"));let d=r.cloneRange();d.setEndAfter(o.lastChild??o);let h=d.extractContents();o.hasChildNodes()||o.appendChild(document.createElement("br"));let p=document.createElement("p");p.appendChild(h),p.hasChildNodes()||p.appendChild(document.createElement("br")),o.after(p),r.selectNodeContents(p),r.collapse(!0),a.removeAllRanges(),a.addRange(r),this.handleEditableInput()};this.handleSelectionChange=()=>{this.cleanupAbandonedPendingMarker(),this.syncToolbarToSelection()};this.handleOutsideClick=e=>{e.composedPath().some(a=>a instanceof HTMLElement&&a.classList.contains("color-picker"))||this.closeColorPicker()}}get defaultValue(){return super.defaultValue}set defaultValue(e){super.defaultValue=e}connectedCallback(){super.connectedCallback?.(),this.addEventListener("focus",this.handleHostFocus)}disconnectedCallback(){this.removeEventListener("focus",this.handleHostFocus),document.removeEventListener("click",this.handleOutsideClick,{capture:!0}),super.disconnectedCallback?.()}firstUpdated(){this.formatting&&this.fieldEl instanceof HTMLDivElement?(R(this.fieldEl,this.value??""),this.lastSyncedValue=this.value,this.resizeEditableField()):this.resizeToContent()}updated(e){if(super.updated(e),e.has("editing")&&this.editing&&this.fieldEl?.focus(),!this.formatting){(e.has("value")||e.has("editing"))&&this.resizeToContent();return}(e.has("editing")&&this.editing||e.has("formatting")&&this.formatting||e.has("value")&&this.value!==this.lastSyncedValue)&&this.fieldEl instanceof HTMLDivElement&&this.fieldEl instanceof HTMLDivElement&&(R(this.fieldEl,this.value??""),this.lastSyncedValue=this.value),(e.has("value")||e.has("editing"))&&this.resizeEditableField()}checkEditableValidators(){let e=A(this.value??"");return this.minlength!==void 0&&e>0&&e<this.minlength?{validity:{tooShort:!0},message:`Please lengthen this text to ${this.minlength} characters or more (you are currently using ${e} characters).`}:this.maxlength!==void 0&&e>this.maxlength?{validity:{tooLong:!0},message:`Please shorten this text to ${this.maxlength} characters or less (you are currently using ${e} characters).`}:{validity:{}}}getFocusAnchor(){return this.fieldEl??void 0}focus(){super.focus?.(),this.fieldEl?.focus()}resizeToContent(){let e=this.fieldEl;if(!e||this.rows!==void 0)return;e.style.height="";let t=e.clientHeight;e.style.height="0px";let i=e.scrollHeight;e.style.height=i>t?`${i}px`:""}resizeEditableField(){let e=this.fieldEl;if(!e||!(e instanceof HTMLDivElement))return;if(this.rows===void 0){e.style.height="",e.style.overflowY="";return}let t=parseFloat(getComputedStyle(e).lineHeight)||20;e.style.height=`${t*this.rows}px`,e.style.overflowY="auto"}handleInput(e){this.value=e.target.value,this.resizeToContent(),this.dispatchEvent(new S(this.value))}syncToolbarToSelection(){if(!(!this.formatting||!this.fieldEl)){if(this.toolbarEl){let e=te(this.fieldEl);this.previousActiveFormats=e,this.toolbarEl.value=e}this.activeTextColor=ie(this.fieldEl,"color"),this.activeHighlight=ie(this.fieldEl,"highlight")}}cleanupAbandonedPendingMarker(){let e=this.fieldEl,t=this.pendingCaretNode;if(!t||!(e instanceof HTMLDivElement))return;let i=m(e),a=i?.rangeCount?i.getRangeAt(0):null;a&&a.collapsed&&a.startContainer===t||(t.data===x?Z(e,t):t.data=t.data.replace(x,""),this.pendingCaretNode=null,this.pendingMarks={bold:!1,italic:!1,underline:!1,color:null,highlight:null})}updatePendingMarker(e,t){let i=t,a=this.pendingCaretNode,r=!!a&&t.startContainer===a;if(r&&a.data===x?(i=Z(e,a),this.pendingCaretNode=null):r&&(a.data=a.data.replace(x,""),this.pendingCaretNode=null),de(this.pendingMarks))return;let o=ue(this.pendingMarks);if(!o)return;i.insertNode(o);let h=document.createTreeWalker(o,NodeFilter.SHOW_TEXT).nextNode();if(!h)return;this.pendingCaretNode=h;let p=m(e);if(!p)return;let f=document.createRange();f.setStart(h,h.data.length),f.collapse(!0),p.removeAllRanges(),p.addRange(f)}applyFormat(e,t){let i=this.fieldEl;if(!(i instanceof HTMLDivElement))return;if($(i)){if(!pe(i,e,t))return;this.handleEditableInput(),this.updateComplete.then(()=>{i.focus(),this.syncToolbarToSelection()});return}let r=Q(i);r&&(this.pendingMarks={...this.pendingMarks,[e]:t},this.updatePendingMarker(i,r),i.focus(),this.syncToolbarToSelection())}handleToolbarChange(e){e.stopPropagation();let i=e.target.value;Object.keys(H).forEach(a=>{let r=this.previousActiveFormats.includes(a),o=i.includes(a);r!==o&&this.applyFormat(a,o)}),this.previousActiveFormats=i}handleAlignChange(e){e.stopPropagation();let t=this.fieldEl;if(!(t instanceof HTMLDivElement))return;let[i]=e.target.value;t.style.textAlign=i==="start"?"":i,this.handleEditableInput(),this.updateComplete.then(()=>t.focus())}toggleColorPicker(e){if(this.openPicker===e){this.closeColorPicker();return}this.openPicker=e,document.addEventListener("click",this.handleOutsideClick,{capture:!0})}closeColorPicker(){this.openPicker!==null&&(this.openPicker=null,document.removeEventListener("click",this.handleOutsideClick,{capture:!0}))}selectColor(e,t){let i=this.fieldEl;if(i instanceof HTMLDivElement)if($(i))ge(i,e,t)&&this.handleEditableInput();else{let r=Q(i);r&&(this.pendingMarks={...this.pendingMarks,[e]:t},this.updatePendingMarker(i,r),this.syncToolbarToSelection())}this.closeColorPicker(),this.updateComplete.then(()=>this.fieldEl?.focus())}renderToolbar(){let e=this.disabled||this.readonly,t=w(this.value??"").align;return g`
|
|
158
158
|
<div
|
|
159
159
|
id="toolbar-groups"
|
|
160
160
|
@mousedown=${i=>i.preventDefault()}
|
|
@@ -213,13 +213,13 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
213
213
|
${this.renderColorPicker("color",this.formatTextColorLabel,"format_color_text")}
|
|
214
214
|
${this.renderColorPicker("highlight",this.formatHighlightLabel,"format_color_fill")}
|
|
215
215
|
</div>
|
|
216
|
-
`}renderColorPicker(e,t,i){let a=this.disabled||this.readonly,
|
|
216
|
+
`}renderColorPicker(e,t,i){let a=this.disabled||this.readonly,r=this.openPicker===e,o=e==="color"?this.activeTextColor:this.activeHighlight,d=o?y(o):void 0,h=e==="color"?d?.text:d?.highlight;return g`
|
|
217
217
|
<div class="color-picker">
|
|
218
218
|
<button
|
|
219
219
|
type="button"
|
|
220
220
|
class="color-picker-trigger"
|
|
221
221
|
aria-haspopup="true"
|
|
222
|
-
aria-expanded=${
|
|
222
|
+
aria-expanded=${r?"true":"false"}
|
|
223
223
|
aria-label=${t}
|
|
224
224
|
?disabled=${a}
|
|
225
225
|
style=${h?`--_border-indicator-color: ${h}`:""}
|
|
@@ -227,7 +227,7 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
227
227
|
>
|
|
228
228
|
<eun-icon name=${i} size="18"></eun-icon>
|
|
229
229
|
</button>
|
|
230
|
-
${
|
|
230
|
+
${r?g`
|
|
231
231
|
<div
|
|
232
232
|
class="color-picker-panel"
|
|
233
233
|
role="menu"
|
|
@@ -238,16 +238,16 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
238
238
|
type="button"
|
|
239
239
|
class="color-swatch clear"
|
|
240
240
|
role="menuitemradio"
|
|
241
|
-
aria-checked=${
|
|
241
|
+
aria-checked=${o===null?"true":"false"}
|
|
242
242
|
aria-label=${this.formatColorClearLabel}
|
|
243
243
|
@click=${()=>this.selectColor(e,null)}
|
|
244
244
|
></button>
|
|
245
|
-
${N.map(p=>
|
|
245
|
+
${N.map(p=>g`
|
|
246
246
|
<button
|
|
247
247
|
type="button"
|
|
248
248
|
class="color-swatch"
|
|
249
249
|
role="menuitemradio"
|
|
250
|
-
aria-checked=${
|
|
250
|
+
aria-checked=${o===p.name?"true":"false"}
|
|
251
251
|
aria-label=${this.colorLabels[p.name]??p.label}
|
|
252
252
|
style="--_swatch-bg: ${e==="color"?p.text:p.highlight}"
|
|
253
253
|
@click=${()=>this.selectColor(e,p.name)}
|
|
@@ -256,11 +256,11 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
256
256
|
</div>
|
|
257
257
|
`:b}
|
|
258
258
|
</div>
|
|
259
|
-
`}renderCharCount(){let e=this.formatting?
|
|
259
|
+
`}renderCharCount(){let e=this.formatting?A(this.value??""):this.value?.length??0,t=this.maxlength!==void 0&&e>this.maxlength;return g`
|
|
260
260
|
<span id="char-count" ?data-exceeded=${t}
|
|
261
261
|
>${e}/${this.maxlength}</span
|
|
262
262
|
>
|
|
263
|
-
`}renderReadonlyDisplay(){let e=!!this.value?.trim().length,t=this.formatting?w(this.value??"").align:void 0;return
|
|
263
|
+
`}renderReadonlyDisplay(){let e=!!this.value?.trim().length,t=this.formatting?w(this.value??"").align:void 0;return g`
|
|
264
264
|
<div
|
|
265
265
|
id="readonly-display"
|
|
266
266
|
role="button"
|
|
@@ -270,12 +270,12 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
270
270
|
@click=${this.startEdit}
|
|
271
271
|
@keydown=${i=>(i.key==="Enter"||i.key===" ")&&this.startEdit()}
|
|
272
272
|
>
|
|
273
|
-
${e&&this.formatting?V(this.value):
|
|
273
|
+
${e&&this.formatting?V(this.value):g`<span
|
|
274
274
|
class=${P({"plain-value":!0,empty:!e})}
|
|
275
275
|
>${e?this.value:this.emptyValueLabel}</span
|
|
276
276
|
>`}
|
|
277
277
|
</div>
|
|
278
|
-
`}renderNativeField(e){return
|
|
278
|
+
`}renderNativeField(e){return g`
|
|
279
279
|
<textarea
|
|
280
280
|
id="field"
|
|
281
281
|
rows=${v(this.rows)}
|
|
@@ -287,7 +287,7 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
287
287
|
?required=${this.required}
|
|
288
288
|
minlength=${v(this.minlength)}
|
|
289
289
|
maxlength=${v(this.maxlength)}
|
|
290
|
-
aria-invalid=${this.valid
|
|
290
|
+
aria-invalid=${!this.hideError&&!this.disabled&&!this.valid}
|
|
291
291
|
aria-label=${v(this.label)}
|
|
292
292
|
aria-describedby=${e||b}
|
|
293
293
|
@input=${this.handleInput}
|
|
@@ -296,7 +296,7 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
296
296
|
@click=${this.handleSelectionChange}
|
|
297
297
|
@focus=${this.handleSelectionChange}
|
|
298
298
|
></textarea>
|
|
299
|
-
`}renderEditableField(e){let t=this.disabled||this.readonly;return
|
|
299
|
+
`}renderEditableField(e){let t=this.disabled||this.readonly;return g`
|
|
300
300
|
<div
|
|
301
301
|
id="field"
|
|
302
302
|
contenteditable=${t?"false":"true"}
|
|
@@ -304,7 +304,7 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
304
304
|
role="textbox"
|
|
305
305
|
aria-multiline="true"
|
|
306
306
|
aria-required=${this.required?"true":b}
|
|
307
|
-
aria-invalid=${this.valid
|
|
307
|
+
aria-invalid=${!this.hideError&&!this.disabled&&!this.valid}
|
|
308
308
|
aria-label=${v(this.label)}
|
|
309
309
|
aria-describedby=${e||b}
|
|
310
310
|
@beforeinput=${this.handleEditableBeforeInput}
|
|
@@ -316,13 +316,13 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
316
316
|
@click=${this.handleSelectionChange}
|
|
317
317
|
@focus=${this.handleSelectionChange}
|
|
318
318
|
></div>
|
|
319
|
-
${!this.value&&this.placeholder?
|
|
320
|
-
`}renderField(e){let t=[e?"description":null,this.maxlength!==void 0?"char-count":null].filter(i=>!!i).join(" ");return
|
|
319
|
+
${!this.value&&this.placeholder?g`<span id="editable-placeholder">${this.placeholder}</span>`:b}
|
|
320
|
+
`}renderField(e){let t=[e?"description":null,this.maxlength!==void 0?"char-count":null].filter(i=>!!i).join(" ");return g`
|
|
321
321
|
${this.formatting?this.renderToolbar():b}
|
|
322
322
|
<div id="field-wrapper">
|
|
323
323
|
${this.formatting?this.renderEditableField(t):this.renderNativeField(t)}
|
|
324
324
|
</div>
|
|
325
|
-
${F(this.readonlyAvailable,()=>
|
|
325
|
+
${F(this.readonlyAvailable,()=>g`
|
|
326
326
|
<div id="edit-actions">
|
|
327
327
|
<eun-button
|
|
328
328
|
class="confirm"
|
|
@@ -345,14 +345,14 @@ import{a as q}from"./chunks/chunk-E4IS25H7.js";import{a as W}from"./chunks/chunk
|
|
|
345
345
|
>
|
|
346
346
|
</div>
|
|
347
347
|
`)}
|
|
348
|
-
`}render(){let e=this.readonlyAvailable&&!this.editing,t=this.renderDescription(),i=this.maxlength!==void 0&&!e;return
|
|
348
|
+
`}render(){let e=this.readonlyAvailable&&!this.editing,t=this.renderDescription(),i=this.maxlength!==void 0&&!e;return g`
|
|
349
349
|
<div id="wrapper">
|
|
350
350
|
${this.renderFormLabels(e?void 0:"field")}
|
|
351
351
|
${e?this.renderReadonlyDisplay():this.renderField(t!==b)}
|
|
352
|
-
${F(t!==b||i,()=>
|
|
352
|
+
${F(t!==b||i,()=>g`
|
|
353
353
|
<div id="description-row">
|
|
354
354
|
${t} ${i?this.renderCharCount():b}
|
|
355
355
|
</div>
|
|
356
356
|
`)}
|
|
357
357
|
</div>
|
|
358
|
-
`}};s.styles=[Y,
|
|
358
|
+
`}};s.styles=[Y,C.base,C.errorMessages,C.hintMessages],c([u({attribute:"default-value"})],s.prototype,"defaultValue",1),c([u()],s.prototype,"placeholder",2),c([u({type:Number,reflect:!0})],s.prototype,"rows",2),c([u({type:Boolean,reflect:!0})],s.prototype,"formatting",2),c([u({attribute:"format-toolbar-label"})],s.prototype,"formatToolbarLabel",2),c([u({attribute:"format-bold-label"})],s.prototype,"formatBoldLabel",2),c([u({attribute:"format-italic-label"})],s.prototype,"formatItalicLabel",2),c([u({attribute:"format-underline-label"})],s.prototype,"formatUnderlineLabel",2),c([u({attribute:"format-align-label"})],s.prototype,"formatAlignLabel",2),c([u({attribute:"format-align-start-label"})],s.prototype,"formatAlignStartLabel",2),c([u({attribute:"format-align-center-label"})],s.prototype,"formatAlignCenterLabel",2),c([u({attribute:"format-align-end-label"})],s.prototype,"formatAlignEndLabel",2),c([u({attribute:"format-align-justify-label"})],s.prototype,"formatAlignJustifyLabel",2),c([u({attribute:"format-text-color-label"})],s.prototype,"formatTextColorLabel",2),c([u({attribute:"format-highlight-label"})],s.prototype,"formatHighlightLabel",2),c([u({attribute:"format-color-clear-label"})],s.prototype,"formatColorClearLabel",2),c([u({attribute:!1})],s.prototype,"colorLabels",2),c([u()],s.prototype,"autocomplete",2),c([u({type:Number})],s.prototype,"minlength",2),c([u({type:Number})],s.prototype,"maxlength",2),c([u({attribute:"empty-value-label"})],s.prototype,"emptyValueLabel",2),c([u({attribute:"confirm-label"})],s.prototype,"confirmLabel",2),c([u({attribute:"cancel-label"})],s.prototype,"cancelLabel",2),c([E()],s.prototype,"openPicker",2),c([E()],s.prototype,"activeTextColor",2),c([E()],s.prototype,"activeHighlight",2),c([k("#field")],s.prototype,"fieldEl",2),c([k("#toolbar")],s.prototype,"toolbarEl",2),s=c([I(oe)],s);export{s as EunomiaTextarea,oe as EunomiaTextareaTagName};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as G,b as T,c as W,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k as ee,m as h,o as H,p as te,q as ie,r as oe,s as re}from"./chunks/chunk-S2UCEWNG.js";import"./chunks/chunk-SD2H5UDZ.js";import{a as N}from"./chunks/chunk-ATH2OAMU.js";import"./chunks/chunk-T4PTHUYF.js";import{a as q}from"./chunks/chunk-LK5BJ4SH.js";import{a as Y}from"./chunks/chunk-UAGCQF23.js";import{a as A}from"./chunks/chunk-LYYQAALT.js";import{a as U}from"./chunks/chunk-XSMCT4DF.js";import{a as j}from"./chunks/chunk-GW3VP2L7.js";import{a as R,c as K,d as B,e as C}from"./chunks/chunk-OAULRKHQ.js";import{a as P}from"./chunks/chunk-YYCEPZUN.js";import{a as _}from"./chunks/chunk-T7WABJEJ.js";import{a as V}from"./chunks/chunk-A4EQSU36.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-5EVP7YNE.js";import{a as r,f as O,g as x,h as s,i as M,j as b,n as d,p as k,s as z}from"./chunks/chunk-XH6NREVZ.js";var de=x`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
width: 100%;
|
|
@@ -11,7 +11,7 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
11
11
|
width: 100%;
|
|
12
12
|
color: var(--_textColor);
|
|
13
13
|
background-color: var(--_background);
|
|
14
|
-
border: var(--eun-
|
|
14
|
+
border: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
|
|
15
15
|
border-radius: var(--_borderRadius);
|
|
16
16
|
padding: var(--eun-space-xs, 4px) var(--eun-space-xs, 4px)
|
|
17
17
|
var(--eun-space-xs, 4px) var(--eun-space-s, 8px);
|
|
@@ -52,12 +52,12 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
52
52
|
border-color: transparent;
|
|
53
53
|
}
|
|
54
54
|
:host([variant="fill"][aria-invalid="true"]) #field-wrapper {
|
|
55
|
-
box-shadow: inset 0 0 0 var(--eun-
|
|
55
|
+
box-shadow: inset 0 0 0 var(--eun-border-width-m, 1.5px) var(--_errorColor);
|
|
56
56
|
}
|
|
57
57
|
:host([variant="underline"]) #field-wrapper {
|
|
58
58
|
border: none;
|
|
59
59
|
outline: none;
|
|
60
|
-
border-bottom: var(--eun-
|
|
60
|
+
border-bottom: var(--eun-border-width-m, 1.5px) solid var(--_borderColor);
|
|
61
61
|
border-radius: 0;
|
|
62
62
|
}
|
|
63
63
|
:host([variant="underline"]) #field-wrapper:focus-within {
|
|
@@ -104,7 +104,7 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
104
104
|
justify-content: center;
|
|
105
105
|
margin-inline-start: auto;
|
|
106
106
|
border: none;
|
|
107
|
-
border-radius: var(--eun-
|
|
107
|
+
border-radius: var(--eun-border-radius-s, 5px);
|
|
108
108
|
background: none;
|
|
109
109
|
padding: var(--eun-space-xxs, 1.6px);
|
|
110
110
|
color: var(--_iconColor);
|
|
@@ -134,14 +134,14 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
134
134
|
#timezone-label {
|
|
135
135
|
margin-block-start: var(--eun-space-xxs, 1.6px);
|
|
136
136
|
color: var(--_hintColor);
|
|
137
|
-
font-size: var(--eun-
|
|
137
|
+
font-size: var(--eun-font-size-xs, 12px);
|
|
138
138
|
}
|
|
139
139
|
#clock-popover {
|
|
140
140
|
position: fixed;
|
|
141
141
|
top: var(--_anchorTop, 0);
|
|
142
142
|
left: var(--_anchorLeft, 0);
|
|
143
143
|
margin: 0;
|
|
144
|
-
border: var(--eun-
|
|
144
|
+
border: var(--eun-border-width-s, 1px) solid
|
|
145
145
|
var(--_borderColor, var(--eun-color-grey-300, #dee0e7));
|
|
146
146
|
border-radius: var(--_borderRadius);
|
|
147
147
|
background: var(
|
|
@@ -170,8 +170,8 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
170
170
|
#modal-time-heading {
|
|
171
171
|
padding: var(--eun-space-m, 16px) var(--eun-space-m, 16px) 0;
|
|
172
172
|
color: var(--_textColor);
|
|
173
|
-
font-size: var(--eun-
|
|
174
|
-
font-weight: var(--eun-
|
|
173
|
+
font-size: var(--eun-font-size-l, 20px);
|
|
174
|
+
font-weight: var(--eun-font-weight-l, 700);
|
|
175
175
|
}
|
|
176
176
|
#modal-time {
|
|
177
177
|
--modal-padding: 0;
|
|
@@ -179,7 +179,7 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
179
179
|
#modal-time .modal-footer {
|
|
180
180
|
padding: var(--eun-space-m);
|
|
181
181
|
}
|
|
182
|
-
`,ne=[
|
|
182
|
+
`,ne=[Y,de],ce=x`
|
|
183
183
|
@supports (anchor-name: --a) {
|
|
184
184
|
#clock-popover:popover-open {
|
|
185
185
|
position-try-fallbacks: --eun-time-picker-above;
|
|
@@ -205,7 +205,7 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
205
205
|
display: flex;
|
|
206
206
|
align-items: center;
|
|
207
207
|
border: none;
|
|
208
|
-
border-radius: var(--eun-
|
|
208
|
+
border-radius: var(--eun-border-radius-s, 5px);
|
|
209
209
|
background: none;
|
|
210
210
|
padding: var(--eun-space-xs, 4px) var(--eun-space-s, 8px);
|
|
211
211
|
color: var(--_textColor, var(--eun-text-color, #071621));
|
|
@@ -235,21 +235,21 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
235
235
|
--time-picker-selected-color,
|
|
236
236
|
var(--eun-color-primary-700, #3662e0)
|
|
237
237
|
);
|
|
238
|
-
font-weight: var(--eun-
|
|
238
|
+
font-weight: var(--eun-font-weight-m, 600);
|
|
239
239
|
}
|
|
240
240
|
.tp-list-item:disabled {
|
|
241
241
|
cursor: not-allowed;
|
|
242
242
|
opacity: 0.4;
|
|
243
243
|
}
|
|
244
|
-
`,se=me;var pe=1440;function le(
|
|
244
|
+
`,se=me;var pe=1440;function le(u){let{format:g,hour:e,minute:t,locale:i,disabled:n=!1,onPick:c}=u,m=Math.max(1,Math.round(u.stepMinutes)),w=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"2-digit",hourCycle:g===12?"h12":"h23"}),f=[];for(let a=0;a<pe;a+=m){let l=Math.floor(a/60),p=a%60;f.push({hour24:l,minute:p,text:w.format(new Date(2e3,0,1,l,p)),selected:l===e&&p===t})}let I=f.findIndex(a=>a.selected),F=I===-1?0:I,v=(a,l)=>{let p=a.querySelectorAll('[role="option"]'),S=Math.min(Math.max(l,0),p.length-1);p[S]?.focus()},ue=a=>{let l=a.currentTarget,p=Array.from(l.querySelectorAll('[role="option"]')),S=p.indexOf(document.activeElement),y=S===-1?F:S;switch(a.key){case"ArrowDown":a.preventDefault(),v(l,y+1);break;case"ArrowUp":a.preventDefault(),v(l,y-1);break;case"PageDown":a.preventDefault(),v(l,y+5);break;case"PageUp":a.preventDefault(),v(l,y-5);break;case"Home":a.preventDefault(),v(l,0);break;case"End":a.preventDefault(),v(l,p.length-1);break;case"Enter":case" ":{a.preventDefault();let L=f[y];L&&c(L.hour24,L.minute);break}default:break}};return d`
|
|
245
245
|
<div
|
|
246
246
|
class="tp-list"
|
|
247
247
|
role="listbox"
|
|
248
|
-
aria-label=${
|
|
248
|
+
aria-label=${u.ariaLabel??"Time"}
|
|
249
249
|
aria-disabled=${n?"true":"false"}
|
|
250
|
-
@keydown=${
|
|
250
|
+
@keydown=${ue}
|
|
251
251
|
>
|
|
252
|
-
${f.map((a,l)=>
|
|
252
|
+
${f.map((a,l)=>d`
|
|
253
253
|
<button
|
|
254
254
|
type="button"
|
|
255
255
|
role="option"
|
|
@@ -263,7 +263,7 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
263
263
|
</button>
|
|
264
264
|
`)}
|
|
265
265
|
</div>
|
|
266
|
-
`}var he="eun-time-picker",fe=_(B(z)),ve=
|
|
266
|
+
`}var he="eun-time-picker",fe=_(B(z)),ve=N(q(U(j(R(K(fe)))))),o=class extends ve{constructor(){super(...arguments);this.stepMinute=1;this.mobileMode="wheel";this.panelMode="columns";this.listStepMinutes=30;this.noAnimation=!1;this.applyLabel="Apply";this.cancelLabel="Cancel";this.ariaLabelClock="Open clock";this.hourPlaceholder="hh";this.minutePlaceholder="mm";this.hideTimezoneLabel=!1;this.isOpen=!1;this.isModalOpen=!1;this.stagingValue=null;this.segments={hour:"",minute:"",period:""};this.checkLocalValidators=()=>{let e=this.resolvedHourFormat();if(be(this.segments)&&!E(this.segments,e))return{validity:{badInput:!0},message:"Enter a valid time"};if(this.value){let{hour:t,minute:i}=h(this.value,this.timezone),n=ee({hour:t,minute:i},D(this.minTime),D(this.maxTime));if(!n.valid)return n.violation==="min"?{validity:{rangeUnderflow:!0},message:this.dictionary.timePicker.mustBeAtOrAfter(this.minTime??"")}:{validity:{rangeOverflow:!0},message:this.dictionary.timePicker.mustBeAtOrBefore(this.maxTime??"")}}return{validity:{}}};this.handleHourColumnChange=e=>{let{minute:t}=h(this.displaySource,this.timezone);this.commitAdjustment(e,t)};this.handleMinuteColumnChange=e=>{let{hour:t}=h(this.displaySource,this.timezone);this.commitAdjustment(t,e)};this.handlePeriodColumnChange=e=>{let{hour:t,minute:i}=h(this.displaySource,this.timezone),{hour:n}=T(t);this.commitAdjustment(W(n,e),i)};this.handleTriggerClick=()=>{if(!(this.disabled||this.readonly)){if(this.resetStaging(),this.panelMode!=="list"&&this.isMobileViewport()){this.isModalOpen=!0;return}this.updateComplete.then(()=>{let e=this.popoverEl;if(!e)return;let t=this.popoverAnimation!==void 0;this.popoverAnimation?.cancel(),this.popoverAnimation=void 0;let i=!e.matches(":popover-open");i&&e.showPopover(),(i||t)&&this.playPopoverOpenAnimation(e)})}};this.handlePopoverToggle=e=>{if(e.newState==="open"){this.isOpen=!0,this.fieldWrapperEl&&this.popoverEl&&this.anchorFloatingElement(this.fieldWrapperEl,this.popoverEl,{forceFallback:A}),this.observeAnchorVisibility(this.fieldWrapperEl,()=>this.closePopover()),this.updateComplete.then(()=>this.panelMode==="list"?this.focusListSelection():this.focusFirstSpinbutton());return}this.isOpen=!1,this.unanchorFloatingElement(),this.unobserveAnchorVisibility(),this.triggerEl?.focus()};this.handleModalConfirm=()=>{this.commitStaged(),this.isModalOpen=!1};this.handleModalCancel=()=>{this.isModalOpen=!1};this.handleListPick=(e,t)=>{this.commitAdjustment(e,t),this.closePopover()};this.handlePeriodSegmentClick=()=>{this.setPeriodSegment(Z(this.segments.period||"AM"))};this.handlePeriodSegmentKeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":case"Enter":case" ":e.preventDefault(),this.handlePeriodSegmentClick();break;case"a":case"A":e.preventDefault(),this.setPeriodSegment("AM");break;case"p":case"P":e.preventDefault(),this.setPeriodSegment("PM");break;case"ArrowLeft":e.preventDefault(),this.focusPreviousSegment("period");break;case"ArrowRight":e.preventDefault(),this.focusNextSegment("period");break;default:break}}}get defaultValue(){return super.defaultValue}set defaultValue(e){super.defaultValue=e}willUpdate(e){let t=e.has("segments")||e.has("minTime")||e.has("maxTime");if(e.has("value")||e.has("timezone")||e.has("hourFormat")||e.has("locale")){let i=this.resolvedHourFormat();if(this.value){let n=h(this.value,this.timezone);this.segments=$(n.hour,n.minute,i)}else this.segments=$(null,null,i);t=!0}t&&this.checkValidity(this.value??null),super.willUpdate(e)}updated(e){super.updated(e),(e.has("valid")||e.has("hideError")||e.has("disabled"))&&this.setAttribute("aria-invalid",String(!this.hideError&&!this.disabled&&!this.valid))}getFocusAnchor(){return this.firstSegmentEl??void 0}focus(){super.focus?.(),this.firstSegmentEl?.focus()}isMobileViewport(){return window.matchMedia("(max-width: 767px)").matches}resolvedHourFormat(){return G(this.locale,this.hourFormat)}get displaySource(){return this.stagingValue??this.value??new Date}resetStaging(){this.stagingValue=this.value??null}commitStaged(){this.value=this.stagingValue,this.dispatchEvent(new P(this.value))}commitAdjustment(e,t){let i=H(this.displaySource,this.timezone,e,t);this.stagingValue=i,!this.isModalOpen&&(this.value=i,this.dispatchEvent(new P(this.value)))}commitTypedTime(e,t){this.value=H(this.value??new Date,this.timezone,e,t),this.dispatchEvent(new P(this.value)),(this.isOpen||this.isModalOpen)&&this.resetStaging()}commitSegmentGroupIfComplete(e){let t=this.resolvedHourFormat();if(!X(e,t))return;let i=E(e,t);i&&this.commitTypedTime(i.hour,i.minute)}popoverAnimationDuration(e){if(this.noAnimation||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return 0;let t=getComputedStyle(e).getPropertyValue("--time-picker-panel-transition-duration").trim();if(t){let i=t.endsWith("ms")?Number.parseFloat(t):Number.parseFloat(t)*1e3;if(Number.isFinite(i)&&i>=0)return i}return 200}playPopoverOpenAnimation(e){e.style.removeProperty("pointer-events");let t=this.popoverAnimationDuration(e);t!==0&&(this.popoverAnimation=e.animate([{opacity:0,transform:"scaleY(0.01)"},{opacity:1,transform:"scaleY(1)"}],{duration:t,easing:"ease",fill:"forwards"}))}closePopover(){let e=this.popoverEl;this.popoverAnimation?.cancel(),this.popoverAnimation=void 0,e?.matches(":popover-open")&&this.playPopoverCloseAnimation(e)}playPopoverCloseAnimation(e){e.style.pointerEvents="none";let t=this.popoverAnimationDuration(e);if(t===0){e.hidePopover();return}let i=e.animate([{opacity:1,transform:"scaleY(1)"},{opacity:0,transform:"scaleY(0.01)"}],{duration:t,easing:"ease",fill:"forwards"});this.popoverAnimation=i,i.finished.then(()=>{this.popoverAnimation===i&&(this.popoverAnimation=void 0),e.hidePopover()}).catch(()=>{})}focusFirstSpinbutton(){(this.isModalOpen?this.shadowRoot:this.popoverEl)?.querySelector('[role="spinbutton"]')?.focus({preventScroll:!0})}focusListSelection(){let e=this.popoverEl?.querySelector('[role="option"][aria-selected="true"]')??this.popoverEl?.querySelector('[role="option"]');e?.focus({preventScroll:!0}),e?.scrollIntoView({block:"center",behavior:this.noAnimation?"instant":"smooth"})}visibleSegmentOrder(){let e=J(this.resolvedHourFormat());return Q(this.locale).filter(t=>e.includes(t))}focusPreviousSegment(e){let t=this.visibleSegmentOrder(),i=t.indexOf(e);i<=0||this.focusSegment(t[i-1])}focusNextSegment(e){let t=this.visibleSegmentOrder(),i=t.indexOf(e);i===-1||i>=t.length-1||this.focusSegment(t[i+1])}focusSegment(e){this.shadowRoot?.querySelector(`.segment-${e}`)?.focus()}handleSegmentInput(e,t){let i=e.target,n=i.value.replace(/\D/g,"").slice(0,2);i.value=n;let c={...this.segments,[t]:n};this.segments=c,n.length===2&&this.focusNextSegment(t),this.commitSegmentGroupIfComplete(c)}handleSegmentKeydown(e,t){let i=e.target;e.key==="Backspace"&&i.value===""||e.key==="ArrowLeft"?(e.preventDefault(),this.focusPreviousSegment(t)):e.key==="ArrowRight"?(e.preventDefault(),this.focusNextSegment(t)):e.key==="ArrowUp"?(e.preventDefault(),this.adjustSegment(t,1)):e.key==="ArrowDown"&&(e.preventDefault(),this.adjustSegment(t,-1))}adjustSegment(e,t){let i=this.resolvedHourFormat(),n=e==="hour"?i===12?{min:1,max:12}:{min:0,max:23}:{min:0,max:59},c=Number(this.segments[e]),m;if(this.segments[e]===""||Number.isNaN(c)){let f=h(this.displaySource,this.timezone);m=e==="hour"?i===12?T(f.hour).hour:f.hour:f.minute}else m=c+t,m>n.max?m=n.min:m<n.min&&(m=n.max);let w={...this.segments,[e]:String(m).padStart(2,"0")};this.segments=w,this.commitSegmentGroupIfComplete(w)}setPeriodSegment(e){if(this.disabled||this.readonly)return;let t={...this.segments,period:e};this.segments=t,this.commitSegmentGroupIfComplete(t)}renderSegment(e){return e==="period"?d`
|
|
267
267
|
<button
|
|
268
268
|
type="button"
|
|
269
269
|
class="segment segment-period"
|
|
@@ -275,7 +275,7 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
275
275
|
>
|
|
276
276
|
${this.segments.period||"--"}
|
|
277
277
|
</button>
|
|
278
|
-
`:
|
|
278
|
+
`:d`
|
|
279
279
|
<input
|
|
280
280
|
class="segment segment-${e}"
|
|
281
281
|
type="text"
|
|
@@ -291,15 +291,15 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
291
291
|
@input=${t=>this.handleSegmentInput(t,e)}
|
|
292
292
|
@keydown=${t=>this.handleSegmentKeydown(t,e)}
|
|
293
293
|
/>
|
|
294
|
-
`}renderField(){let e=this.visibleSegmentOrder();return
|
|
294
|
+
`}renderField(){let e=this.visibleSegmentOrder();return d`
|
|
295
295
|
<div id="field-wrapper">
|
|
296
296
|
<div
|
|
297
297
|
class="segment-group"
|
|
298
298
|
role="group"
|
|
299
299
|
aria-label=${this.label??"Time"}
|
|
300
300
|
>
|
|
301
|
-
${e.map((t,i)=>{let n=e[i-1];return
|
|
302
|
-
${i===0?
|
|
301
|
+
${e.map((t,i)=>{let n=e[i-1];return d`
|
|
302
|
+
${i===0?k:d`<span class="segment-divider" aria-hidden="true"
|
|
303
303
|
>${n==="hour"&&t==="minute"||n==="minute"&&t==="hour"?":":" "}</span
|
|
304
304
|
>`}
|
|
305
305
|
${this.renderSegment(t)}
|
|
@@ -317,7 +317,7 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
317
317
|
<eun-icon name="access_time" size="16"></eun-icon>
|
|
318
318
|
</button>
|
|
319
319
|
</div>
|
|
320
|
-
`}renderTimezoneLabel(){if(this.hideTimezoneLabel||!this.timezone||te(this.timezone,void 0))return
|
|
320
|
+
`}renderTimezoneLabel(){if(this.hideTimezoneLabel||!this.timezone||te(this.timezone,void 0))return k;let e=ie(this.value??new Date,this.timezone,{locale:this.locale});return d`<p id="timezone-label">${e}</p>`}renderPanelContent(e){let t=this.resolvedHourFormat(),i=h(this.displaySource,this.timezone),n=i.hour<12?"AM":"PM";return oe({visual:e,format:t,hour:i.hour,minute:i.minute,period:n,stepMinute:this.stepMinute,disabled:this.disabled,noAnimation:this.noAnimation,ariaLabelGroup:this.dictionary.timePicker.time,ariaLabelHour:this.dictionary.timePicker.hour,ariaLabelMinute:this.dictionary.timePicker.minute,ariaLabelPeriod:this.dictionary.timePicker.amPm,onHourChange:this.handleHourColumnChange,onMinuteChange:this.handleMinuteColumnChange,onPeriodChange:this.handlePeriodColumnChange})}renderListPanelContent(){let e=this.resolvedHourFormat(),t=h(this.displaySource,this.timezone);return le({format:e,hour:t.hour,minute:t.minute,locale:this.locale,stepMinutes:this.listStepMinutes,disabled:this.disabled,ariaLabel:this.label??this.dictionary.timePicker.time,onPick:this.handleListPick})}formatModalPreview(){if(!this.stagingValue)return this.dictionary.timePicker.selectATime;let e=this.resolvedHourFormat();return new Intl.DateTimeFormat(this.locale,{hour:"numeric",minute:"2-digit",hourCycle:e===12?"h12":"h23",timeZone:this.timezone}).format(this.stagingValue)}render(){return d`
|
|
321
321
|
<div id="wrapper">
|
|
322
322
|
${this.renderFormLabels("clock-trigger")} ${this.renderField()}
|
|
323
323
|
${this.renderTimezoneLabel()} ${this.renderDescription()}
|
|
@@ -339,10 +339,10 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
339
339
|
@euncancel=${this.handleModalCancel}
|
|
340
340
|
id="modal-time"
|
|
341
341
|
>
|
|
342
|
-
${this.isModalOpen?
|
|
342
|
+
${this.isModalOpen?d`
|
|
343
343
|
<div id="modal-time-heading">${this.formatModalPreview()}</div>
|
|
344
344
|
${this.renderPanelContent(this.mobileMode==="wheel"?"wheel":"buttons")}
|
|
345
|
-
`:
|
|
345
|
+
`:k}
|
|
346
346
|
<div slot="footer" class="modal-footer">
|
|
347
347
|
<eun-button
|
|
348
348
|
appearance="ghost"
|
|
@@ -356,4 +356,4 @@ import{a as Y,b as T,c as G,d as Z,e as J,f as Q,g as $,h as E,i as X,j as D,k a
|
|
|
356
356
|
</eun-button>
|
|
357
357
|
</div>
|
|
358
358
|
</eun-modal>
|
|
359
|
-
`}};o.styles=[ne,...A?[]:[ae],re,se,C.base,C.errorMessages,C.hintMessages],r([s()],o.prototype,"timezone",2),r([s({type:Number,attribute:"hour-format"})],o.prototype,"hourFormat",2),r([s({type:Number,attribute:"step-minute"})],o.prototype,"stepMinute",2),r([s({attribute:"min-time"})],o.prototype,"minTime",2),r([s({attribute:"max-time"})],o.prototype,"maxTime",2),r([s({attribute:"mobile-mode"})],o.prototype,"mobileMode",2),r([s({attribute:"panel-mode"})],o.prototype,"panelMode",2),r([s({type:Number,attribute:"list-step-minutes"})],o.prototype,"listStepMinutes",2),r([s({type:Boolean,reflect:!0,attribute:"no-animation"})],o.prototype,"noAnimation",2),r([s({attribute:"apply-label"})],o.prototype,"applyLabel",2),r([s({attribute:"cancel-label"})],o.prototype,"cancelLabel",2),r([s({attribute:"aria-label-clock"})],o.prototype,"ariaLabelClock",2),r([s({attribute:"hour-placeholder"})],o.prototype,"hourPlaceholder",2),r([s({attribute:"minute-placeholder"})],o.prototype,"minutePlaceholder",2),r([s({type:Boolean,attribute:"hide-timezone-label"})],o.prototype,"hideTimezoneLabel",2),r([s({attribute:"default-value",converter:{fromAttribute:e=>ge(e),toAttribute:e=>e?ye(e):null}})],o.prototype,"defaultValue",1),r([M()],o.prototype,"isOpen",2),r([M()],o.prototype,"isModalOpen",2),r([M()],o.prototype,"stagingValue",2),r([M()],o.prototype,"segments",2),r([b("#clock-trigger")],o.prototype,"triggerEl",2),r([b("#clock-popover")],o.prototype,"popoverEl",2),r([b("#field-wrapper")],o.prototype,"fieldWrapperEl",2),r([b("#modal-time")],o.prototype,"modalEl",2),r([b(".segment")],o.prototype,"firstSegmentEl",2),o=r([O(he)],o);function be(
|
|
359
|
+
`}};o.styles=[ne,...A?[]:[ae],re,se,C.base,C.errorMessages,C.hintMessages],r([s()],o.prototype,"timezone",2),r([s({type:Number,attribute:"hour-format"})],o.prototype,"hourFormat",2),r([s({type:Number,attribute:"step-minute"})],o.prototype,"stepMinute",2),r([s({attribute:"min-time"})],o.prototype,"minTime",2),r([s({attribute:"max-time"})],o.prototype,"maxTime",2),r([s({attribute:"mobile-mode"})],o.prototype,"mobileMode",2),r([s({attribute:"panel-mode"})],o.prototype,"panelMode",2),r([s({type:Number,attribute:"list-step-minutes"})],o.prototype,"listStepMinutes",2),r([s({type:Boolean,reflect:!0,attribute:"no-animation"})],o.prototype,"noAnimation",2),r([s({attribute:"apply-label"})],o.prototype,"applyLabel",2),r([s({attribute:"cancel-label"})],o.prototype,"cancelLabel",2),r([s({attribute:"aria-label-clock"})],o.prototype,"ariaLabelClock",2),r([s({attribute:"hour-placeholder"})],o.prototype,"hourPlaceholder",2),r([s({attribute:"minute-placeholder"})],o.prototype,"minutePlaceholder",2),r([s({type:Boolean,attribute:"hide-timezone-label"})],o.prototype,"hideTimezoneLabel",2),r([s({attribute:"default-value",converter:{fromAttribute:e=>ge(e),toAttribute:e=>e?ye(e):null}})],o.prototype,"defaultValue",1),r([M()],o.prototype,"isOpen",2),r([M()],o.prototype,"isModalOpen",2),r([M()],o.prototype,"stagingValue",2),r([M()],o.prototype,"segments",2),r([b("#clock-trigger")],o.prototype,"triggerEl",2),r([b("#clock-popover")],o.prototype,"popoverEl",2),r([b("#field-wrapper")],o.prototype,"fieldWrapperEl",2),r([b("#modal-time")],o.prototype,"modalEl",2),r([b(".segment")],o.prototype,"firstSegmentEl",2),o=r([O(he)],o);function be(u){return u.hour!==""||u.minute!==""||u.period!==""}function ge(u){if(!u)return null;let g=new Date(u);return Number.isNaN(g.getTime())?null:g}function ye(u){return u?u.toISOString():""}export{o as EunomiaTimePicker,he as EunomiaTimePickerTagName};
|