@eunomia/elements 1.0.0-beta.3 → 1.0.0-beta.5
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-EAGGN3ZI.js → chunk-2XASWWKR.js} +9 -9
- package/dist/cdn/components/chunks/chunk-32DTNR52.js +1 -0
- package/dist/cdn/components/chunks/chunk-3MTUVMM5.js +1 -0
- package/dist/cdn/components/chunks/chunk-5GKM5DIB.js +1 -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-TBKKTJOX.js → chunk-6ETDXUH2.js} +3 -3
- 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-NEYBPT3D.js → chunk-AIS3UICU.js} +9 -9
- package/dist/cdn/components/chunks/{chunk-LJYTHDZP.js → chunk-D2M4BV5Y.js} +6 -6
- package/dist/cdn/components/chunks/chunk-DKOPI7QA.js +415 -0
- package/dist/cdn/components/chunks/{chunk-53QH6MPM.js → chunk-EAKYD33D.js} +3 -3
- package/dist/cdn/components/chunks/chunk-EST3M4AO.js +1 -0
- package/dist/cdn/components/chunks/{chunk-BYBUXKXC.js → chunk-IDKZKLJR.js} +7 -7
- package/dist/cdn/components/chunks/chunk-JRGM3W7I.js +53 -0
- package/dist/cdn/components/chunks/{chunk-RWONCXTF.js → chunk-KVYUNKUO.js} +2 -2
- package/dist/cdn/components/chunks/{chunk-6UPI7GHJ.js → chunk-L65WUTXM.js} +12 -12
- package/dist/cdn/components/chunks/chunk-LFCXUVDO.js +1 -0
- package/dist/cdn/components/chunks/chunk-LGLQ36QB.js +16 -0
- package/dist/cdn/components/chunks/chunk-MPQP4R54.js +263 -0
- package/dist/cdn/components/chunks/{chunk-ON42P6FI.js → chunk-NBIENHLV.js} +6 -6
- package/dist/cdn/components/chunks/chunk-OAULRKHQ.js +38 -0
- package/dist/cdn/components/chunks/chunk-OW7XKDCH.js +124 -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-5C7YND22.js → chunk-S2UCEWNG.js} +8 -8
- package/dist/cdn/components/chunks/{chunk-5RCCZVFZ.js → chunk-SD2WHGPF.js} +7 -6
- package/dist/cdn/components/chunks/chunk-SJWRE6PW.js +1 -0
- package/dist/cdn/components/chunks/{chunk-6IILPCSQ.js → chunk-X2AUBZD2.js} +3 -3
- package/dist/cdn/components/eun-alert.js +65 -45
- package/dist/cdn/components/eun-animate.js +5 -3
- package/dist/cdn/components/eun-badge.js +8 -8
- 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 +20 -20
- package/dist/cdn/components/eun-card.js +61 -13
- package/dist/cdn/components/eun-carousel.js +35 -27
- 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 -207
- package/dist/cdn/components/eun-collapse.js +49 -29
- package/dist/cdn/components/eun-color-picker.js +13 -13
- package/dist/cdn/components/eun-counter.js +15 -15
- package/dist/cdn/components/eun-date-picker.js +62 -62
- package/dist/cdn/components/eun-drawer.js +12 -12
- 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 +18 -18
- package/dist/cdn/components/eun-infinite-list.js +1 -1
- package/dist/cdn/components/eun-input-file.js +12 -12
- package/dist/cdn/components/eun-input-phone.js +28 -28
- 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 +134 -18
- package/dist/cdn/components/eun-loader.js +1 -1
- package/dist/cdn/components/eun-modal.js +21 -21
- 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 +1 -1
- package/dist/cdn/components/eun-radio.js +1 -1
- package/dist/cdn/components/eun-scheduler-event-editor.js +9 -9
- package/dist/cdn/components/eun-scheduler-event.js +1 -1
- package/dist/cdn/components/eun-scheduler.js +26 -26
- package/dist/cdn/components/eun-search.js +21 -21
- package/dist/cdn/components/eun-select.js +10 -10
- package/dist/cdn/components/eun-sidebar.js +9 -9
- package/dist/cdn/components/eun-skeleton.js +1 -1
- package/dist/cdn/components/eun-slider.js +8 -8
- package/dist/cdn/components/eun-sliding-card.js +4 -3
- 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 -126
- package/dist/cdn/components/eun-textarea.js +23 -23
- package/dist/cdn/components/eun-time-picker.js +32 -32
- package/dist/cdn/components/eun-toast.js +40 -36
- package/dist/cdn/components/eun-toggle-group.js +213 -72
- package/dist/cdn/components/eun-toggle-item.js +49 -30
- package/dist/cdn/components/eun-toggle.js +12 -9
- package/dist/cdn/components/eun-toolbar.js +15 -8
- 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 +44 -15
- package/dist/components/action/button/button.js +100 -20
- package/dist/components/action/button/button.styles.js +179 -393
- package/dist/components/action/dropdown-button/dropdown-button.d.ts +13 -6
- package/dist/components/action/dropdown-button/dropdown-button.js +16 -5
- 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 +7 -4
- package/dist/components/action/fab/fab.js +11 -6
- package/dist/components/action/fab/fab.styles.js +26 -49
- package/dist/components/action/link/link.d.ts +115 -6
- package/dist/components/action/link/link.js +245 -21
- package/dist/components/action/link/link.styles.js +105 -3
- 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 +55 -11
- package/dist/components/action/toggle/toggle-group.js +193 -52
- package/dist/components/action/toggle/toggle-group.styles.d.ts +7 -5
- package/dist/components/action/toggle/toggle-group.styles.js +166 -41
- package/dist/components/action/toggle/toggle-item.d.ts +4 -4
- package/dist/components/action/toggle/toggle-item.js +2 -2
- package/dist/components/action/toggle/toggle-item.styles.js +45 -26
- package/dist/components/action/toggle/toggle.d.ts +1 -1
- package/dist/components/action/toggle/toggle.js +1 -1
- 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.js +1 -1
- package/dist/components/alert/drawer/drawer.styles.js +3 -3
- package/dist/components/alert/modal/modal.d.ts +8 -8
- package/dist/components/alert/modal/modal.js +11 -11
- 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.d.ts +6 -6
- package/dist/components/content/badge/badge.js +4 -4
- package/dist/components/content/badge/badge.styles.js +5 -5
- package/dist/components/content/card/card.d.ts +36 -8
- package/dist/components/content/card/card.js +68 -8
- package/dist/components/content/card/card.styles.js +52 -11
- package/dist/components/content/card/image-card.d.ts +3 -2
- package/dist/components/content/card/image-card.js +2 -1
- package/dist/components/content/card/image-card.styles.js +17 -10
- package/dist/components/content/card/sliding-card.d.ts +2 -1
- package/dist/components/content/card/sliding-card.js +1 -0
- package/dist/components/content/card/sliding-card.styles.js +3 -2
- 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 -207
- package/dist/components/content/collapse/collapse.d.ts +29 -11
- package/dist/components/content/collapse/collapse.js +53 -23
- package/dist/components/content/collapse/collapse.styles.js +23 -9
- package/dist/components/content/icon/icon.d.ts +12 -2
- package/dist/components/content/icon/icon.js +52 -22
- package/dist/components/content/icon/icon.style.d.ts +2 -0
- package/dist/components/content/icon/icon.style.js +5 -2
- 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/card-link.styles.js +1 -0
- 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 -125
- 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.d.ts +1 -1
- package/dist/components/form/checkbox/checkbox.styles.js +6 -6
- package/dist/components/form/color-picker/color-picker.d.ts +3 -3
- package/dist/components/form/color-picker/color-picker.js +4 -4
- package/dist/components/form/color-picker/color-picker.styles.js +7 -7
- package/dist/components/form/counter/counter.d.ts +3 -3
- package/dist/components/form/counter/counter.js +3 -3
- package/dist/components/form/counter/counter.styles.js +12 -12
- 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 +3 -3
- package/dist/components/form/date-picker/date-picker.js +3 -3
- package/dist/components/form/date-picker/date-picker.styles.js +17 -17
- package/dist/components/form/input/input.d.ts +3 -3
- package/dist/components/form/input/input.js +4 -4
- package/dist/components/form/input-file/input-file.d.ts +1 -1
- package/dist/components/form/input-file/input-file.styles.js +9 -9
- package/dist/components/form/input-phone/input-phone.d.ts +3 -3
- package/dist/components/form/input-phone/input-phone.js +3 -3
- package/dist/components/form/input-phone/input-phone.styles.js +19 -19
- 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.d.ts +1 -1
- package/dist/components/form/radio/radio.styles.js +2 -2
- package/dist/components/form/search/search.styles.js +9 -9
- package/dist/components/form/select/select.d.ts +3 -3
- package/dist/components/form/select/select.js +3 -3
- package/dist/components/form/select/select.styles.js +6 -6
- package/dist/components/form/shared-styles/card.styles.js +1 -1
- package/dist/components/form/shared-styles/field.styles.js +12 -12
- 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.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 +3 -3
- 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 +3 -3
- package/dist/components/form/time-picker/time-picker.js +3 -3
- package/dist/components/form/time-picker/time-picker.styles.js +13 -13
- package/dist/components/layout/animate/animate.d.ts +8 -0
- package/dist/components/layout/animate/animate.js +20 -8
- 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 +19 -7
- 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 +2 -0
- package/dist/components/navigation/toolbar/toolbar.js +2 -0
- package/dist/components/navigation/toolbar/toolbar.styles.js +16 -7
- package/dist/features/scheduler/calendar/calendar.d.ts +6 -6
- package/dist/features/scheduler/calendar/calendar.js +10 -10
- package/dist/features/scheduler/calendar/calendar.styles.js +3 -3
- package/dist/features/scheduler/scheduler/scheduler.d.ts +6 -6
- package/dist/features/scheduler/scheduler/scheduler.js +13 -13
- package/dist/features/scheduler/scheduler/scheduler.styles.js +2 -2
- package/dist/features/scheduler/scheduler-event/scheduler-event.d.ts +10 -8
- package/dist/features/scheduler/scheduler-event/scheduler-event.js +7 -7
- package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +8 -8
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +5 -5
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.styles.js +2 -2
- package/dist/features/scheduler/shared/scheduler-event-popover.js +2 -2
- package/dist/features/scheduler/shared/scheduler-event-popover.styles.js +4 -4
- package/dist/features/scheduler/shared/scheduler-hour-grid.d.ts +2 -2
- package/dist/features/scheduler/shared/scheduler-hour-grid.js +3 -3
- package/dist/features/scheduler/shared/scheduler-hour-grid.styles.js +1 -1
- package/dist/features/scheduler/shared/scheduler-month-view.d.ts +3 -3
- package/dist/features/scheduler/shared/scheduler-month-view.js +2 -2
- package/dist/features/scheduler/shared/scheduler-month-view.styles.js +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/table.types.d.ts +7 -3
- package/dist/features/table/table-action-bar/table-action-bar.js +3 -3
- 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-managed/table-managed.js +2 -2
- package/dist/features/table/table-skeleton-row/table-skeleton-row.styles.js +1 -1
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.js +3 -0
- package/dist/i18n/fr.js +3 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +5 -2
- package/dist/jsx.d.ts +19 -6
- package/dist/mixins/button.mixin.d.ts +11 -9
- package/dist/mixins/button.mixin.js +23 -5
- package/dist/mixins/card-link.mixin.d.ts +3 -2
- package/dist/mixins/card-link.mixin.js +12 -5
- package/dist/mixins/check.mixin.d.ts +1 -1
- package/dist/mixins/disabled.mixin.d.ts +3 -3
- package/dist/mixins/disabled.mixin.js +10 -5
- package/dist/mixins/editable.mixin.d.ts +1 -1
- package/dist/mixins/field-appearance.mixin.d.ts +19 -0
- package/dist/mixins/{field-variant.mixin.js → field-appearance.mixin.js} +11 -11
- package/dist/mixins/form.mixin.d.ts +5 -1
- package/dist/mixins/form.mixin.js +32 -12
- package/dist/mixins/overflow-navigation.mixin.js +2 -1
- package/dist/mixins/radio.mixin.d.ts +1 -1
- package/dist/mixins/validators.mixin.d.ts +9 -3
- package/dist/ssr/animate-ssr.css +26 -72
- package/dist/ssr/links-ssr.css +35 -0
- package/dist/ssr/overlay-ssr.css +0 -41
- package/dist/ssr/rich-text.css +38 -0
- package/dist/ssr/sidebar-ssr.css +0 -38
- package/dist/ssr/toolbar-ssr.css +73 -39
- package/dist/types/variant.type.d.ts +26 -10
- package/dist/utils/navigation.utils.d.ts +14 -0
- package/dist/utils/navigation.utils.js +33 -0
- package/dist/utils/new-tab-anchor.controller.d.ts +44 -0
- package/dist/utils/new-tab-anchor.controller.js +102 -0
- package/dist/utils/rich-text.utils.d.ts +33 -0
- package/dist/utils/rich-text.utils.js +140 -49
- package/dist/utils/severity-icon.utils.d.ts +1 -1
- package/dist/utils/severity-icon.utils.js +1 -1
- package/dist/utils/theme-generator.utils.d.ts +26 -3
- package/dist/utils/theme-generator.utils.js +68 -21
- package/package.json +13 -2
- 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-3LMI7KUA.js +0 -48
- package/dist/cdn/components/chunks/chunk-5TH3P53V.js +0 -16
- package/dist/cdn/components/chunks/chunk-ATH2OAMU.js +0 -1
- package/dist/cdn/components/chunks/chunk-BKHD4S57.js +0 -1
- package/dist/cdn/components/chunks/chunk-KNM5QHDK.js +0 -38
- package/dist/cdn/components/chunks/chunk-MBF52GEL.js +0 -1
- package/dist/cdn/components/chunks/chunk-T7WABJEJ.js +0 -1
- package/dist/cdn/components/chunks/chunk-XSMCT4DF.js +0 -1
- package/dist/cdn/components/chunks/chunk-Z6PJYSC3.js +0 -622
- package/dist/cdn/components/chunks/chunk-ZKPCO5RB.js +0 -262
- package/dist/mixins/field-variant.mixin.d.ts +0 -22
|
@@ -16,14 +16,20 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17
17
|
};
|
|
18
18
|
var _EunomiaToggleGroup_resizeObserver, _EunomiaToggleGroup_hasSeededInitialValue;
|
|
19
|
-
import { customElement, property, query, queryAssignedElements, } from "lit/decorators.js";
|
|
19
|
+
import { customElement, property, query, queryAssignedElements, state, } from "lit/decorators.js";
|
|
20
20
|
import { html, LitElement, nothing } from "lit";
|
|
21
21
|
import { classMap } from "lit/directives/class-map.js";
|
|
22
22
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
23
23
|
import { DisabledMixin } from "../../../mixins/disabled.mixin.js";
|
|
24
|
+
import { NavigationOverflowMixin } from "../../../mixins/overflow-navigation.mixin.js";
|
|
24
25
|
import { ChangeEvent } from "../../../events/change.event.js";
|
|
25
26
|
import { debounce } from "../../../utils/time.utils.js";
|
|
26
27
|
import { toggleGroupStyles } from "./toggle-group.styles.js";
|
|
28
|
+
/**
|
|
29
|
+
* Room kept between a revealed entry and the row's edge, so the overflow
|
|
30
|
+
* arrows (24px wide) never sit over it.
|
|
31
|
+
*/
|
|
32
|
+
const ARROW_CLEARANCE = 28;
|
|
27
33
|
/**
|
|
28
34
|
* Tag name of the toggle group component.
|
|
29
35
|
*/
|
|
@@ -55,6 +61,8 @@ export const EunomiaToggleGroupTagName = "eun-toggle-group";
|
|
|
55
61
|
* the Examples tab for what each shape looks like.
|
|
56
62
|
*
|
|
57
63
|
* @slot [default] - Toggle item elements, used instead of or alongside options
|
|
64
|
+
* @prop {boolean} [full=false] - Stretches the group to 100% of its parent's width, dividing that width equally between every choice, instead of sizing to content
|
|
65
|
+
* @attr {boolean} [full=false] - Stretches the group to 100% of its parent's width, dividing that width equally between every choice, instead of sizing to content
|
|
58
66
|
* @prop {Array<EunomiaToggleGroupOption>} options - The choices to render, in order
|
|
59
67
|
* @prop {Array<string>} value - The currently selected choices' values. Always exactly one entry in exclusive mode
|
|
60
68
|
* @prop {boolean} [single=false] - Forces the exclusive, sliding indicator mode regardless of choice count. Already the case for exactly two choices without setting this
|
|
@@ -62,26 +70,29 @@ export const EunomiaToggleGroupTagName = "eun-toggle-group";
|
|
|
62
70
|
* @prop {boolean} [disabled=false] - Whether the whole group is disabled
|
|
63
71
|
* @attr {string} [aria-label] - The accessible label for the group, required since the group has no visible legend of its own
|
|
64
72
|
* @fires {ChangeEvent} eunchange - Fired whenever the selection changes
|
|
65
|
-
* @cssprop [--toggle-group-background] - Sets the background color of the track
|
|
66
|
-
* @cssprop [--toggle-group-border-color] - Sets the border color of the track, and the border color of each option at rest in the outline
|
|
73
|
+
* @cssprop [--toggle-group-background] - Sets the background color of the track, for every appearance (transparent by default in outline and flat)
|
|
74
|
+
* @cssprop [--toggle-group-border-color] - Sets the border color of the track in the default appearance, and the border color of each option at rest in the outline and flat appearances
|
|
67
75
|
* @cssprop [--toggle-group-color] - Sets the text color of unselected options
|
|
68
|
-
* @cssprop [--toggle-group-active-background] - Sets the background color of selected options, and the sliding indicator in exclusive mode, in the default appearance.
|
|
69
|
-
* @cssprop [--toggle-group-active-color] - Sets the text color of selected options
|
|
76
|
+
* @cssprop [--toggle-group-active-background] - Sets the background color of selected options, and the sliding indicator in exclusive mode, in the default appearance. In the outline and flat appearances, sets the selected color of every option, over its own color
|
|
77
|
+
* @cssprop [--toggle-group-active-color] - Sets the text color of selected options, for every appearance
|
|
70
78
|
* @cssprop [--toggle-group-border-radius] - Sets the corner radius of the track and its options
|
|
71
79
|
* @cssprop [--toggle-group-gap] - Sets the gap between the options
|
|
72
80
|
* @cssprop [--toggle-group-padding] - Sets the padding of the track, also used as the indicator's inset so it stays flush with the track's edge. Ignored once appearance isn't default
|
|
73
|
-
* @cssprop [--toggle-group-hover-color] - Sets the text color of an unselected option on hover
|
|
81
|
+
* @cssprop [--toggle-group-hover-color] - Sets the text color of an unselected option on hover and keyboard focus, for every appearance
|
|
74
82
|
* @cssprop [--toggle-group-hover-background] - Sets the background color of an unselected option on hover. Transparent by default, and applies regardless of appearance
|
|
83
|
+
* @cssprop [--toggle-group-box-shadow] - Sets a box shadow on the track itself, for every appearance. None by default
|
|
75
84
|
* @cssprop [--toggle-group-shadow] - Sets a box shadow on every option, and the sliding indicator in exclusive mode. None by default
|
|
76
85
|
* @cssprop [--toggle-group-shadow-hover] - Sets the box shadow of an unselected option on hover, falling back to toggle-group-shadow when unset
|
|
86
|
+
* @cssprop [--toggle-group-arrows-color] - Sets the background color the overflow arrows fade out to, once the group overflows its container
|
|
77
87
|
* @element eun-toggle-group
|
|
78
88
|
*/
|
|
79
|
-
let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitElement) {
|
|
89
|
+
let EunomiaToggleGroup = class EunomiaToggleGroup extends NavigationOverflowMixin(DisabledMixin(LitElement)) {
|
|
80
90
|
constructor() {
|
|
81
91
|
super(...arguments);
|
|
82
92
|
/**
|
|
83
93
|
* The choices to render, in order. Also reflected as a JSON-serialized
|
|
84
|
-
* `options` attribute (Lit's default `Array` converter)
|
|
94
|
+
* `options` attribute (Lit's default `Array` converter), left out while
|
|
95
|
+
* empty so an SSR framework doesn't see an attribute it never rendered.
|
|
85
96
|
* @default []
|
|
86
97
|
*/
|
|
87
98
|
this.options = [];
|
|
@@ -106,6 +117,13 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
106
117
|
* @default default
|
|
107
118
|
*/
|
|
108
119
|
this.appearance = "default";
|
|
120
|
+
/**
|
|
121
|
+
* Stretches the group to 100% of its parent's width, dividing that width
|
|
122
|
+
* equally between every choice instead of sizing to content. A label
|
|
123
|
+
* that doesn't fit its share makes the row overflow rather than shrink.
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
this.full = false;
|
|
109
127
|
/**
|
|
110
128
|
* Keeps the indicator aligned when the track is resized (a responsive
|
|
111
129
|
* layout change, a custom font loading in, ...) without a value/options
|
|
@@ -125,6 +143,14 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
125
143
|
* @internal
|
|
126
144
|
*/
|
|
127
145
|
_EunomiaToggleGroup_hasSeededInitialValue.set(this, false);
|
|
146
|
+
/**
|
|
147
|
+
* Whether the initial selection has been painted once. Until then, the
|
|
148
|
+
* choices and their icons skip their color transitions (see the
|
|
149
|
+
* `#scrollable:not(.settled)` rule), so the selected one appears in its
|
|
150
|
+
* final state on load instead of fading in from the unselected color.
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
this.settled = false;
|
|
128
154
|
/**
|
|
129
155
|
* Debounced wrapper around {@link moveIndicator}, used by the resize
|
|
130
156
|
* observer so a burst of layout changes doesn't retrigger it constantly.
|
|
@@ -184,8 +210,15 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
184
210
|
__classPrivateFieldGet(this, _EunomiaToggleGroup_resizeObserver, "f")?.disconnect();
|
|
185
211
|
super.disconnectedCallback?.();
|
|
186
212
|
}
|
|
187
|
-
firstUpdated() {
|
|
188
|
-
|
|
213
|
+
firstUpdated(changedProperties) {
|
|
214
|
+
super.firstUpdated(changedProperties);
|
|
215
|
+
this.settleAndSync(false)
|
|
216
|
+
.then(() => Promise.all((this.items ?? []).map((item) => this.whenItemReady(item))))
|
|
217
|
+
.then(() => {
|
|
218
|
+
requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
219
|
+
this.settled = true;
|
|
220
|
+
}));
|
|
221
|
+
});
|
|
189
222
|
}
|
|
190
223
|
updated(_changedProperties) {
|
|
191
224
|
super.updated(_changedProperties);
|
|
@@ -195,7 +228,8 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
195
228
|
if (_changedProperties.has("value") ||
|
|
196
229
|
_changedProperties.has("options") ||
|
|
197
230
|
_changedProperties.has("single") ||
|
|
198
|
-
_changedProperties.has("appearance")
|
|
231
|
+
_changedProperties.has("appearance") ||
|
|
232
|
+
_changedProperties.has("full")) {
|
|
199
233
|
this.settleAndSync(true);
|
|
200
234
|
}
|
|
201
235
|
if (_changedProperties.has("disabled") && this.disabled) {
|
|
@@ -235,11 +269,12 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
235
269
|
* @private
|
|
236
270
|
*/
|
|
237
271
|
settleAndSync(animate) {
|
|
238
|
-
this.whenItemsReady().then(() => {
|
|
272
|
+
return this.whenItemsReady().then(() => {
|
|
239
273
|
this.seedInitialValue();
|
|
240
274
|
this.applyExclusiveDefault();
|
|
241
275
|
this.syncItems();
|
|
242
276
|
this.refreshIndicator(animate);
|
|
277
|
+
this.updateScroll();
|
|
243
278
|
});
|
|
244
279
|
}
|
|
245
280
|
/**
|
|
@@ -345,6 +380,7 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
345
380
|
item.checked = this.value.includes(item.value);
|
|
346
381
|
item.toggleAttribute("exclusive", this.exclusive);
|
|
347
382
|
item.setAttribute("appearance", this.appearance);
|
|
383
|
+
item.toggleAttribute("full", this.full);
|
|
348
384
|
});
|
|
349
385
|
if (this.exclusive) {
|
|
350
386
|
this.applyRovingTabindex();
|
|
@@ -416,15 +452,52 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
416
452
|
* @private
|
|
417
453
|
*/
|
|
418
454
|
refreshIndicator(animate) {
|
|
419
|
-
if (!this.exclusive
|
|
455
|
+
if (!this.exclusive) {
|
|
420
456
|
return;
|
|
421
457
|
}
|
|
458
|
+
const settle = () => {
|
|
459
|
+
if (this.appearance === "default") {
|
|
460
|
+
this.moveIndicator(animate);
|
|
461
|
+
}
|
|
462
|
+
this.revealActive(animate);
|
|
463
|
+
};
|
|
422
464
|
const active = this.entries.find((entry) => entry.value === this.value[0]);
|
|
423
465
|
if (active && active.element.tagName !== "BUTTON") {
|
|
424
|
-
this.whenItemReady(active.element).then(
|
|
466
|
+
this.whenItemReady(active.element).then(settle);
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
settle();
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Scrolls the row just enough to bring the selected entry into view, once
|
|
473
|
+
* the group overflows its container, leaving room for the arrows.
|
|
474
|
+
*
|
|
475
|
+
* @param animate whether to scroll smoothly, or jump there instantly.
|
|
476
|
+
* @private
|
|
477
|
+
*/
|
|
478
|
+
revealActive(animate) {
|
|
479
|
+
const track = this.trackEl;
|
|
480
|
+
const active = this.entries.find((entry) => entry.value === this.value[0]);
|
|
481
|
+
if (!track || !active || track.scrollWidth <= track.clientWidth) {
|
|
425
482
|
return;
|
|
426
483
|
}
|
|
427
|
-
|
|
484
|
+
const trackRect = track.getBoundingClientRect();
|
|
485
|
+
const rect = active.element.getBoundingClientRect();
|
|
486
|
+
const left = rect.left - trackRect.left - track.clientLeft;
|
|
487
|
+
const right = left + rect.width;
|
|
488
|
+
let delta = 0;
|
|
489
|
+
if (left < ARROW_CLEARANCE) {
|
|
490
|
+
delta = left - ARROW_CLEARANCE;
|
|
491
|
+
}
|
|
492
|
+
else if (right > track.clientWidth - ARROW_CLEARANCE) {
|
|
493
|
+
delta = right - (track.clientWidth - ARROW_CLEARANCE);
|
|
494
|
+
}
|
|
495
|
+
if (delta) {
|
|
496
|
+
track.scrollBy({
|
|
497
|
+
left: delta,
|
|
498
|
+
behavior: animate ? "smooth" : "instant",
|
|
499
|
+
});
|
|
500
|
+
}
|
|
428
501
|
}
|
|
429
502
|
/**
|
|
430
503
|
* Slides the highlight behind the currently selected entry, resizing it
|
|
@@ -448,12 +521,16 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
448
521
|
}
|
|
449
522
|
const trackRect = this.trackEl.getBoundingClientRect();
|
|
450
523
|
const activeRect = active.element.getBoundingClientRect();
|
|
524
|
+
const offset = activeRect.left -
|
|
525
|
+
trackRect.left -
|
|
526
|
+
this.trackEl.clientLeft +
|
|
527
|
+
this.trackEl.scrollLeft;
|
|
451
528
|
if (!animate) {
|
|
452
529
|
indicator.style.transition = "none";
|
|
453
530
|
}
|
|
454
531
|
indicator.style.opacity = "1";
|
|
455
|
-
indicator.style.width = `${
|
|
456
|
-
indicator.style.transform = `translateX(${
|
|
532
|
+
indicator.style.width = `${activeRect.width}px`;
|
|
533
|
+
indicator.style.transform = `translateX(${offset}px)`;
|
|
457
534
|
if (!animate) {
|
|
458
535
|
indicator.getBoundingClientRect();
|
|
459
536
|
indicator.style.transition = "";
|
|
@@ -543,52 +620,98 @@ let EunomiaToggleGroup = class EunomiaToggleGroup extends DisabledMixin(LitEleme
|
|
|
543
620
|
this.activateValue(next.value);
|
|
544
621
|
next.element.focus();
|
|
545
622
|
}
|
|
623
|
+
/**
|
|
624
|
+
* Whether a given overflow arrow should currently be visible : hidden
|
|
625
|
+
* when nothing overflows, and once scrolled all the way to that edge.
|
|
626
|
+
*
|
|
627
|
+
* @param arrowPosition the position of the arrow to check.
|
|
628
|
+
* @returns true if it should be visible, false otherwise.
|
|
629
|
+
* @private
|
|
630
|
+
*/
|
|
631
|
+
arrowVisible(arrowPosition) {
|
|
632
|
+
if (!this.overflowState) {
|
|
633
|
+
return false;
|
|
634
|
+
}
|
|
635
|
+
const overflowPositions = [
|
|
636
|
+
"middle",
|
|
637
|
+
arrowPosition === "start" ? "end" : "start",
|
|
638
|
+
];
|
|
639
|
+
return overflowPositions.includes(String(this.overflowState));
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* The row mixes internal `<button>`s (`options`) with slotted items, so the
|
|
643
|
+
* mixin's slot-based measurement can't see every choice : compares the
|
|
644
|
+
* scrollable's own sizes instead.
|
|
645
|
+
* @protected
|
|
646
|
+
*/
|
|
647
|
+
isOnOverflow() {
|
|
648
|
+
const el = this.trackEl;
|
|
649
|
+
return !!el && el.scrollWidth > el.clientWidth;
|
|
650
|
+
}
|
|
546
651
|
render() {
|
|
547
652
|
const exclusive = this.exclusive;
|
|
548
653
|
const showIndicator = exclusive && this.appearance === "default";
|
|
549
654
|
return html `
|
|
550
|
-
<div
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
655
|
+
<div id="scrollable-wrapper">
|
|
656
|
+
<div
|
|
657
|
+
id="scrollable"
|
|
658
|
+
class=${classMap({ settled: this.settled })}
|
|
659
|
+
role=${exclusive ? "radiogroup" : "group"}
|
|
660
|
+
part="track"
|
|
661
|
+
aria-label=${this.ariaLabel ?? nothing}
|
|
662
|
+
aria-disabled=${this.disabled ? "true" : "false"}
|
|
663
|
+
@keydown=${(event) => this.handleKeydown(event)}
|
|
664
|
+
@scroll=${this.updateScroll}
|
|
665
|
+
>
|
|
666
|
+
${showIndicator
|
|
559
667
|
? html `<span
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
668
|
+
id="indicator"
|
|
669
|
+
part="indicator"
|
|
670
|
+
aria-hidden="true"
|
|
671
|
+
></span>`
|
|
564
672
|
: nothing}
|
|
565
|
-
|
|
673
|
+
${this.options.map((option, index) => {
|
|
566
674
|
const checked = this.value.includes(option.value);
|
|
567
675
|
const iconOnly = !!option.icon && !option.showLabel;
|
|
568
676
|
return html `
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
677
|
+
<button
|
|
678
|
+
type="button"
|
|
679
|
+
class=${classMap({ active: checked, "icon-only": iconOnly })}
|
|
680
|
+
data-value=${option.value}
|
|
681
|
+
data-color=${ifDefined(option.color)}
|
|
682
|
+
role=${exclusive ? "radio" : "checkbox"}
|
|
683
|
+
aria-checked=${checked ? "true" : "false"}
|
|
684
|
+
aria-label=${ifDefined(iconOnly ? option.label : undefined)}
|
|
685
|
+
title=${ifDefined(iconOnly ? option.label : undefined)}
|
|
686
|
+
tabindex=${ifDefined(exclusive
|
|
579
687
|
? this.exclusiveTabIndex(option.value, index)
|
|
580
688
|
: undefined)}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
689
|
+
?disabled=${this.disabled}
|
|
690
|
+
@click=${() => this.activateValue(option.value)}
|
|
691
|
+
>
|
|
692
|
+
${option.icon
|
|
585
693
|
? html `<eun-icon name=${option.icon} size="16"></eun-icon>`
|
|
586
694
|
: nothing}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
695
|
+
${iconOnly ? nothing : option.label}
|
|
696
|
+
</button>
|
|
697
|
+
`;
|
|
590
698
|
})}
|
|
591
|
-
|
|
699
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
700
|
+
</div>
|
|
701
|
+
<div id="arrows">
|
|
702
|
+
<arrow-container
|
|
703
|
+
class=${classMap({ visible: this.arrowVisible("start") })}
|
|
704
|
+
@click=${this.scrollItem("back")}
|
|
705
|
+
>
|
|
706
|
+
<eun-icon name="chevron_left"></eun-icon>
|
|
707
|
+
</arrow-container>
|
|
708
|
+
<arrow-container
|
|
709
|
+
class=${classMap({ visible: this.arrowVisible("end") })}
|
|
710
|
+
@click=${this.scrollItem("front")}
|
|
711
|
+
>
|
|
712
|
+
<eun-icon name="chevron_right"></eun-icon>
|
|
713
|
+
</arrow-container>
|
|
714
|
+
</div>
|
|
592
715
|
</div>
|
|
593
716
|
`;
|
|
594
717
|
}
|
|
@@ -604,10 +727,22 @@ _EunomiaToggleGroup_hasSeededInitialValue = new WeakMap();
|
|
|
604
727
|
*/
|
|
605
728
|
EunomiaToggleGroup.styles = [toggleGroupStyles];
|
|
606
729
|
__decorate([
|
|
607
|
-
property({
|
|
730
|
+
property({
|
|
731
|
+
type: Array,
|
|
732
|
+
reflect: true,
|
|
733
|
+
converter: {
|
|
734
|
+
toAttribute: (value) => value?.length ? JSON.stringify(value) : null,
|
|
735
|
+
},
|
|
736
|
+
})
|
|
608
737
|
], EunomiaToggleGroup.prototype, "options", void 0);
|
|
609
738
|
__decorate([
|
|
610
|
-
property({
|
|
739
|
+
property({
|
|
740
|
+
type: Array,
|
|
741
|
+
reflect: true,
|
|
742
|
+
converter: {
|
|
743
|
+
toAttribute: (value) => value?.length ? JSON.stringify(value) : null,
|
|
744
|
+
},
|
|
745
|
+
})
|
|
611
746
|
], EunomiaToggleGroup.prototype, "value", void 0);
|
|
612
747
|
__decorate([
|
|
613
748
|
property({ type: Boolean, reflect: true })
|
|
@@ -615,15 +750,21 @@ __decorate([
|
|
|
615
750
|
__decorate([
|
|
616
751
|
property({ reflect: true })
|
|
617
752
|
], EunomiaToggleGroup.prototype, "appearance", void 0);
|
|
753
|
+
__decorate([
|
|
754
|
+
property({ type: Boolean, reflect: true })
|
|
755
|
+
], EunomiaToggleGroup.prototype, "full", void 0);
|
|
618
756
|
__decorate([
|
|
619
757
|
queryAssignedElements()
|
|
620
758
|
], EunomiaToggleGroup.prototype, "items", void 0);
|
|
621
759
|
__decorate([
|
|
622
|
-
query("#
|
|
760
|
+
query("#scrollable")
|
|
623
761
|
], EunomiaToggleGroup.prototype, "trackEl", void 0);
|
|
624
762
|
__decorate([
|
|
625
763
|
query("#indicator")
|
|
626
764
|
], EunomiaToggleGroup.prototype, "indicatorEl", void 0);
|
|
765
|
+
__decorate([
|
|
766
|
+
state()
|
|
767
|
+
], EunomiaToggleGroup.prototype, "settled", void 0);
|
|
627
768
|
EunomiaToggleGroup = __decorate([
|
|
628
769
|
customElement(EunomiaToggleGroupTagName)
|
|
629
770
|
], EunomiaToggleGroup);
|
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
* Base style for the toggle group component.
|
|
3
3
|
*
|
|
4
4
|
* Custom css variables:
|
|
5
|
-
* [--toggle-group-background] - Set a custom background color for the track
|
|
6
|
-
* [--toggle-group-border-color] - Set a custom border color for the track
|
|
5
|
+
* [--toggle-group-background] - Set a custom background color for the track, for every appearance (transparent by default in `outline`/`flat`)
|
|
6
|
+
* [--toggle-group-border-color] - Set a custom border color for the track in `default` appearance, and for each option's border at rest in `outline` and `flat` appearance
|
|
7
7
|
* [--toggle-group-color] - Set a custom text color for unselected options
|
|
8
|
-
* [--toggle-group-active-background] - Set a custom background color for selected options (and the sliding indicator, in exclusive mode) in `default` appearance ;
|
|
9
|
-
* [--toggle-group-active-color] - Set a custom text color for selected options
|
|
8
|
+
* [--toggle-group-active-background] - Set a custom background color for selected options (and the sliding indicator, in exclusive mode) in `default` appearance ; in `outline`/`flat` appearance, the selected color of every option, over its own color
|
|
9
|
+
* [--toggle-group-active-color] - Set a custom text color for selected options, for every appearance
|
|
10
10
|
* [--toggle-group-border-radius] - Set a custom border radius for the track and its options
|
|
11
11
|
* [--toggle-group-gap] - Set a custom gap between the options
|
|
12
12
|
* [--toggle-group-padding] - Set a custom padding for the track ; also used as the indicator's inset, so it stays flush with the track's edge. Ignored once `appearance` isn't `default`
|
|
13
|
-
* [--toggle-group-hover-color] - Set a custom text color on hover state, for an unselected option,
|
|
13
|
+
* [--toggle-group-hover-color] - Set a custom text color on hover state, for an unselected option, for every appearance
|
|
14
14
|
* [--toggle-group-hover-background] - Set a custom background color on hover state, for an unselected option ; transparent by default. Applies regardless of `appearance`
|
|
15
|
+
* [--toggle-group-box-shadow] - Set a custom box shadow on the track itself, for every appearance, none by default
|
|
15
16
|
* [--toggle-group-shadow] - Set a custom box shadow on every option (and the sliding indicator, in exclusive mode), none by default
|
|
16
17
|
* [--toggle-group-shadow-hover] - Set a custom box shadow on hover state, for an unselected option ; falls back to `--toggle-group-shadow`
|
|
18
|
+
* [--toggle-group-arrows-color] - Set a custom background color the overflow arrows fade out to, once the group overflows its container ; defaults to the track color laid over `--eun-surface-color`, so set it when the group sits on another background
|
|
17
19
|
*/
|
|
18
20
|
export declare const toggleGroupStyles: import("lit").CSSResult;
|