@eunomia/elements 1.0.0-beta.3 → 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-3LMI7KUA.js → chunk-2JLDJFYD.js} +1 -1
- 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-TBKKTJOX.js → chunk-GSJEJLFA.js} +3 -3
- 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-53QH6MPM.js → chunk-NHFWATVN.js} +1 -1
- 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-EAGGN3ZI.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/eun-alert.js +65 -45
- 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 +21 -12
- 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 +13 -12
- package/dist/cdn/components/eun-color-picker.js +12 -12
- package/dist/cdn/components/eun-counter.js +8 -8
- 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 +12 -12
- package/dist/cdn/components/eun-input-phone.js +13 -13
- 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 +1 -1
- 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 +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 +22 -22
- 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 +41 -24
- package/dist/cdn/components/eun-toggle.js +11 -8
- package/dist/cdn/components/eun-toolbar.js +14 -7
- 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 +2 -0
- package/dist/components/action/button/button.js +2 -0
- package/dist/components/action/button/button.styles.js +132 -384
- 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 +161 -45
- 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 +37 -20
- 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.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 +19 -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 -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.styles.js +10 -9
- 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 -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 +1 -1
- 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.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.styles.js +12 -12
- package/dist/components/form/input/input.d.ts +1 -1
- 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 +1 -1
- 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.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 +1 -1
- 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 +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.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.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.styles.js +8 -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.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 +4 -4
- package/dist/index.js +5 -2
- 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/editable.mixin.d.ts +1 -1
- 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/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 +6 -1
- 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-5TH3P53V.js +0 -16
- 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-Z6PJYSC3.js +0 -622
- package/dist/cdn/components/chunks/chunk-ZKPCO5RB.js +0 -262
|
@@ -48,6 +48,8 @@ export const EunomiaDropdownButtonTagName = "eun-dropdown-button";
|
|
|
48
48
|
* @prop {boolean} [disabled=false] - Whether the trigger button is disabled
|
|
49
49
|
* @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The size of the trigger button
|
|
50
50
|
* @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} variant - The color theme applied to the trigger button
|
|
51
|
+
* @prop {boolean} [fixedColor=false] - Keeps a light or dark trigger button white or black in every theme. Without it, they follow the grey scale, which flips with the active theme. Has no effect on the other variants
|
|
52
|
+
* @attr {boolean} [fixed-color=false] - Keeps a light or dark trigger button white or black in every theme. Without it, they follow the grey scale, which flips with the active theme. Has no effect on the other variants
|
|
51
53
|
* @prop {boolean} [rounded=false] - Whether the trigger button has fully rounded corners
|
|
52
54
|
* @prop {'default' | 'fill' | 'outline' | 'flat' | 'raised' | 'ghost'} [appearance='default'] - The trigger button's surface style, using the same values as the button component. Defaults to a paler tint rather than a solid fill, since a menu trigger reads better as a lighter weight control than a standalone primary action
|
|
53
55
|
* @prop {EunomiaDropdownPlacement} [placement='bottom-start'] - Where the menu opens relative to the trigger
|
|
@@ -96,6 +98,11 @@ let EunomiaDropdownButton = class EunomiaDropdownButton extends LitElement {
|
|
|
96
98
|
* @default m
|
|
97
99
|
*/
|
|
98
100
|
this.size = "m";
|
|
101
|
+
/**
|
|
102
|
+
* Forwarded to the trigger `eun-button`.
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
this.fixedColor = false;
|
|
99
106
|
/**
|
|
100
107
|
* Forwarded to the trigger `eun-button`.
|
|
101
108
|
* @default false
|
|
@@ -1065,6 +1072,7 @@ let EunomiaDropdownButton = class EunomiaDropdownButton extends LitElement {
|
|
|
1065
1072
|
type="button"
|
|
1066
1073
|
size=${this.size}
|
|
1067
1074
|
variant=${ifDefined(this.variant)}
|
|
1075
|
+
?fixed-color=${this.fixedColor}
|
|
1068
1076
|
appearance=${this.appearance}
|
|
1069
1077
|
?rounded=${this.rounded}
|
|
1070
1078
|
?disabled=${this.disabled}
|
|
@@ -1121,6 +1129,9 @@ __decorate([
|
|
|
1121
1129
|
__decorate([
|
|
1122
1130
|
property({ reflect: true })
|
|
1123
1131
|
], EunomiaDropdownButton.prototype, "variant", void 0);
|
|
1132
|
+
__decorate([
|
|
1133
|
+
property({ type: Boolean, reflect: true, attribute: "fixed-color" })
|
|
1134
|
+
], EunomiaDropdownButton.prototype, "fixedColor", void 0);
|
|
1124
1135
|
__decorate([
|
|
1125
1136
|
property({ type: Boolean, reflect: true })
|
|
1126
1137
|
], EunomiaDropdownButton.prototype, "rounded", void 0);
|
|
@@ -34,17 +34,17 @@ const base = css `
|
|
|
34
34
|
max-height: 260px;
|
|
35
35
|
overflow-y: auto;
|
|
36
36
|
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
37
|
-
font-size: var(--eun-
|
|
37
|
+
font-size: var(--eun-font-size-s, 14px);
|
|
38
38
|
color: var(--dropdown-menu-color, var(--eun-text-color, #071621));
|
|
39
39
|
background: var(
|
|
40
40
|
--dropdown-menu-background,
|
|
41
41
|
var(--eun-surface-color, #ffffff)
|
|
42
42
|
);
|
|
43
|
-
border: var(--eun-
|
|
43
|
+
border: var(--eun-border-width-s, 1px) solid
|
|
44
44
|
var(--dropdown-menu-border-color, var(--eun-border-color, #dee0e7));
|
|
45
45
|
border-radius: var(
|
|
46
46
|
--dropdown-menu-border-radius,
|
|
47
|
-
var(--eun-
|
|
47
|
+
var(--eun-border-radius-m, 8px)
|
|
48
48
|
);
|
|
49
49
|
box-shadow: var(
|
|
50
50
|
--dropdown-menu-shadow,
|
|
@@ -118,7 +118,7 @@ const base = css `
|
|
|
118
118
|
}
|
|
119
119
|
#menu li.active,
|
|
120
120
|
.submenu li.active {
|
|
121
|
-
font-weight: var(--eun-
|
|
121
|
+
font-weight: var(--eun-font-weight-l, 700);
|
|
122
122
|
color: var(
|
|
123
123
|
--dropdown-menu-accent-color,
|
|
124
124
|
var(--eun-color-primary-500, #3d6fff)
|
|
@@ -152,7 +152,7 @@ const base = css `
|
|
|
152
152
|
}
|
|
153
153
|
#menu li .description,
|
|
154
154
|
.submenu li .description {
|
|
155
|
-
font-size: var(--eun-
|
|
155
|
+
font-size: var(--eun-font-size-xs, 12px);
|
|
156
156
|
color: var(
|
|
157
157
|
--dropdown-menu-description-color,
|
|
158
158
|
var(--eun-text-secondary, #484e61)
|
|
@@ -171,17 +171,17 @@ const base = css `
|
|
|
171
171
|
max-height: 260px;
|
|
172
172
|
overflow-y: auto;
|
|
173
173
|
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
174
|
-
font-size: var(--eun-
|
|
174
|
+
font-size: var(--eun-font-size-s, 14px);
|
|
175
175
|
color: var(--dropdown-menu-color, var(--eun-text-color, #071621));
|
|
176
176
|
background: var(
|
|
177
177
|
--dropdown-menu-background,
|
|
178
178
|
var(--eun-surface-color, #ffffff)
|
|
179
179
|
);
|
|
180
|
-
border: var(--eun-
|
|
180
|
+
border: var(--eun-border-width-s, 1px) solid
|
|
181
181
|
var(--dropdown-menu-border-color, var(--eun-border-color, #dee0e7));
|
|
182
182
|
border-radius: var(
|
|
183
183
|
--dropdown-menu-border-radius,
|
|
184
|
-
var(--eun-
|
|
184
|
+
var(--eun-border-radius-m, 8px)
|
|
185
185
|
);
|
|
186
186
|
box-shadow: var(
|
|
187
187
|
--dropdown-menu-shadow,
|
|
@@ -20,7 +20,7 @@ const base = css `
|
|
|
20
20
|
display: block;
|
|
21
21
|
white-space: nowrap;
|
|
22
22
|
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
23
|
-
font-size: var(--eun-
|
|
23
|
+
font-size: var(--eun-font-size-s, 14px);
|
|
24
24
|
outline: none;
|
|
25
25
|
}
|
|
26
26
|
.content {
|
|
@@ -62,7 +62,7 @@ const base = css `
|
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
:host([active]) .content {
|
|
65
|
-
font-weight: var(--eun-
|
|
65
|
+
font-weight: var(--eun-font-weight-l, 700);
|
|
66
66
|
color: var(
|
|
67
67
|
--dropdown-menu-accent-color,
|
|
68
68
|
var(--eun-color-primary-500, #3d6fff)
|
|
@@ -90,7 +90,7 @@ const base = css `
|
|
|
90
90
|
text-overflow: ellipsis;
|
|
91
91
|
}
|
|
92
92
|
.description {
|
|
93
|
-
font-size: var(--eun-
|
|
93
|
+
font-size: var(--eun-font-size-xs, 12px);
|
|
94
94
|
color: var(
|
|
95
95
|
--dropdown-menu-description-color,
|
|
96
96
|
var(--eun-text-secondary, #484e61)
|
|
@@ -109,17 +109,17 @@ const base = css `
|
|
|
109
109
|
max-height: 260px;
|
|
110
110
|
overflow-y: auto;
|
|
111
111
|
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
112
|
-
font-size: var(--eun-
|
|
112
|
+
font-size: var(--eun-font-size-s, 14px);
|
|
113
113
|
color: var(--dropdown-menu-color, var(--eun-text-color, #071621));
|
|
114
114
|
background: var(
|
|
115
115
|
--dropdown-menu-background,
|
|
116
116
|
var(--eun-surface-color, #ffffff)
|
|
117
117
|
);
|
|
118
|
-
border: var(--eun-
|
|
118
|
+
border: var(--eun-border-width-s, 1px) solid
|
|
119
119
|
var(--dropdown-menu-border-color, var(--eun-border-color, #dee0e7));
|
|
120
120
|
border-radius: var(
|
|
121
121
|
--dropdown-menu-border-radius,
|
|
122
|
-
var(--eun-
|
|
122
|
+
var(--eun-border-radius-m, 8px)
|
|
123
123
|
);
|
|
124
124
|
box-shadow: var(
|
|
125
125
|
--dropdown-menu-shadow,
|
|
@@ -26,6 +26,8 @@ declare const EunomiaFab_base: import("../../../utils/constructor.type.js").Cons
|
|
|
26
26
|
* @prop {string} label - An optional text label, revealed on hover or focus by the slide animation. Omit it for an icon only button
|
|
27
27
|
* @prop {'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'} position - Fixes the button to a corner of the viewport. Left unset, the button follows the normal document flow
|
|
28
28
|
* @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} [variant='primary'] - The color theme applied to the button
|
|
29
|
+
* @prop {boolean} [fixedColor=false] - Keeps a light or dark button white or black in every theme. Without it, they follow the grey scale, which flips with the active theme. Has no effect on the other variants
|
|
30
|
+
* @attr {boolean} [fixed-color=false] - Keeps a light or dark button white or black in every theme. Without it, they follow the grey scale, which flips with the active theme. Has no effect on the other variants
|
|
29
31
|
* @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The size of the button
|
|
30
32
|
* @prop {boolean} [disabled=false] - Whether the button is disabled. For a link button, this removes the href instead, since links have no native disabled state
|
|
31
33
|
* @prop {string} href - The URL the button navigates to. When set, the button renders as a link instead of a button
|
|
@@ -38,7 +40,7 @@ declare const EunomiaFab_base: import("../../../utils/constructor.type.js").Cons
|
|
|
38
40
|
* @attr {string} aria-label - The accessible label for the button. Required when label isn't set, since an icon alone has no accessible name, and recommended even when it is if the label text alone doesn't describe the action
|
|
39
41
|
* @fires click - Fired when the button is activated by mouse, Enter, or Space
|
|
40
42
|
* @fires {NavigationEvent} eunnavigate - Fired before following href, so a client-side router can intercept the navigation. Not fired for downloads, and cancelable
|
|
41
|
-
* @cssprop [--fab-background] - Sets the background color
|
|
43
|
+
* @cssprop [--fab-background] - Sets the background color, for every variant
|
|
42
44
|
* @cssprop [--fab-background-hover] - Sets the background color on hover
|
|
43
45
|
* @cssprop [--fab-text] - Sets the color of the text and icon
|
|
44
46
|
* @cssprop [--fab-focus-outline] - Sets the color of the focus outline
|
|
@@ -33,6 +33,8 @@ export const EunomiaFabTagName = "eun-fab";
|
|
|
33
33
|
* @prop {string} label - An optional text label, revealed on hover or focus by the slide animation. Omit it for an icon only button
|
|
34
34
|
* @prop {'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'} position - Fixes the button to a corner of the viewport. Left unset, the button follows the normal document flow
|
|
35
35
|
* @prop {'primary' | 'secondary' | 'critical' | 'success' | 'warning'} [variant='primary'] - The color theme applied to the button
|
|
36
|
+
* @prop {boolean} [fixedColor=false] - Keeps a light or dark button white or black in every theme. Without it, they follow the grey scale, which flips with the active theme. Has no effect on the other variants
|
|
37
|
+
* @attr {boolean} [fixed-color=false] - Keeps a light or dark button white or black in every theme. Without it, they follow the grey scale, which flips with the active theme. Has no effect on the other variants
|
|
36
38
|
* @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The size of the button
|
|
37
39
|
* @prop {boolean} [disabled=false] - Whether the button is disabled. For a link button, this removes the href instead, since links have no native disabled state
|
|
38
40
|
* @prop {string} href - The URL the button navigates to. When set, the button renders as a link instead of a button
|
|
@@ -45,7 +47,7 @@ export const EunomiaFabTagName = "eun-fab";
|
|
|
45
47
|
* @attr {string} aria-label - The accessible label for the button. Required when label isn't set, since an icon alone has no accessible name, and recommended even when it is if the label text alone doesn't describe the action
|
|
46
48
|
* @fires click - Fired when the button is activated by mouse, Enter, or Space
|
|
47
49
|
* @fires {NavigationEvent} eunnavigate - Fired before following href, so a client-side router can intercept the navigation. Not fired for downloads, and cancelable
|
|
48
|
-
* @cssprop [--fab-background] - Sets the background color
|
|
50
|
+
* @cssprop [--fab-background] - Sets the background color, for every variant
|
|
49
51
|
* @cssprop [--fab-background-hover] - Sets the background color on hover
|
|
50
52
|
* @cssprop [--fab-text] - Sets the color of the text and icon
|
|
51
53
|
* @cssprop [--fab-focus-outline] - Sets the color of the focus outline
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
+
import { buttonPaletteStyles } from "../shared-styles/button-palette.styles.js";
|
|
2
3
|
/**
|
|
3
4
|
* Base style for the floating action button.
|
|
4
5
|
*
|
|
5
|
-
* The
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* individual pieces, so this re-derives the same pattern rather than
|
|
10
|
-
* importing it.
|
|
6
|
+
* The variant palette is shared with `eun-button` (see
|
|
7
|
+
* {@link buttonPaletteStyles}) and read *behind* the `--fab-*` custom
|
|
8
|
+
* properties, so those win over every variant. A fab only has a solid look,
|
|
9
|
+
* so it only reads the solid slots.
|
|
11
10
|
*
|
|
12
11
|
* Custom css variables:
|
|
13
|
-
* [--fab-background] - Set a custom background color
|
|
14
|
-
* [--fab-background-hover] - Set a custom background color for hover state
|
|
15
|
-
* [--fab-text] - Set a custom text/icon color
|
|
12
|
+
* [--fab-background] - Set a custom background color, for every variant
|
|
13
|
+
* [--fab-background-hover] - Set a custom background color for hover state. Derived from --fab-background when only that one is set
|
|
14
|
+
* [--fab-text] - Set a custom text/icon color, for every variant
|
|
16
15
|
* [--fab-focus-outline] - Set a custom color to the focus outline
|
|
17
16
|
* [--fab-transition] - Set a custom transition time, shared by the slide-open animation and the hover/focus color changes (mirrors `eun-button`'s own `--button-transition`)
|
|
18
17
|
* [--fab-z-index] - Set a custom z-index for a positioned FAB
|
|
@@ -20,16 +19,8 @@ import { css } from "lit";
|
|
|
20
19
|
*/
|
|
21
20
|
const base = css `
|
|
22
21
|
:host {
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--fab-background-hover,
|
|
26
|
-
var(--eun-color-primary-700, #3662e0)
|
|
27
|
-
);
|
|
28
|
-
--_mainColor-text: var(
|
|
29
|
-
--fab-text,
|
|
30
|
-
var(--eun-color-on-primary-500, #ffffff)
|
|
31
|
-
);
|
|
32
|
-
--_focusIndicator: var(--fab-focus-outline, var(--_mainColor));
|
|
22
|
+
--_focusIndicator: var(--fab-focus-outline, var(--_solid));
|
|
23
|
+
--_hoverFromCustom: color-mix(in srgb, var(--fab-background) 88%, black);
|
|
33
24
|
--_transition: var(--fab-transition, 0.3s);
|
|
34
25
|
--_gap: var(--eun-space-xs, 4px);
|
|
35
26
|
--_circleSize: 56px;
|
|
@@ -39,7 +30,7 @@ const base = css `
|
|
|
39
30
|
user-select: none;
|
|
40
31
|
outline: 2px solid transparent;
|
|
41
32
|
z-index: 0;
|
|
42
|
-
border-radius: var(--eun-
|
|
33
|
+
border-radius: var(--eun-border-radius-xl);
|
|
43
34
|
transition:
|
|
44
35
|
background 0.3s ease-out,
|
|
45
36
|
box-shadow 0.3s ease-out,
|
|
@@ -69,32 +60,15 @@ const base = css `
|
|
|
69
60
|
--_circleSize: 88px;
|
|
70
61
|
--icon-size: 34px;
|
|
71
62
|
}
|
|
72
|
-
:host([variant="secondary"]) {
|
|
73
|
-
--_mainColor: var(--eun-color-secondary-500, #e5a030);
|
|
74
|
-
--_mainColor-hover: var(--eun-color-secondary-700, #ca8d2a);
|
|
75
|
-
--_mainColor-text: var(--eun-color-on-secondary-500, #000000de);
|
|
76
|
-
}
|
|
77
|
-
:host([variant="critical"]) {
|
|
78
|
-
--_mainColor: var(--eun-color-critical-100, #aa0014);
|
|
79
|
-
--_mainColor-hover: var(--eun-color-critical-100, #aa0014);
|
|
80
|
-
--_mainColor-text: #fff;
|
|
81
|
-
}
|
|
82
|
-
:host([variant="success"]) {
|
|
83
|
-
--_mainColor: var(--eun-color-success-100, #1a9948);
|
|
84
|
-
--_mainColor-hover: var(--eun-color-success-100, #1a9948);
|
|
85
|
-
--_mainColor-text: #fff;
|
|
86
|
-
}
|
|
87
|
-
:host([variant="warning"]) {
|
|
88
|
-
--_mainColor: var(--eun-color-warning-100, #c85207);
|
|
89
|
-
--_mainColor-hover: var(--eun-color-warning-100, #c85207);
|
|
90
|
-
--_mainColor-text: #fff;
|
|
91
|
-
}
|
|
92
63
|
:host([disabled]) {
|
|
93
|
-
--
|
|
94
|
-
--
|
|
95
|
-
--
|
|
64
|
+
--_solid: var(--eun-disabled-color, #ecedf0);
|
|
65
|
+
--_solid-hover: var(--eun-disabled-color, #ecedf0);
|
|
66
|
+
--_onSolid: var(--eun-text-disabled-color, #8d93aa);
|
|
96
67
|
}
|
|
68
|
+
/* A disabled fab never loses its look to a custom property. */
|
|
97
69
|
:host([disabled]) #fab {
|
|
70
|
+
background: var(--_solid);
|
|
71
|
+
color: var(--_onSolid);
|
|
98
72
|
cursor: not-allowed;
|
|
99
73
|
pointer-events: none;
|
|
100
74
|
box-shadow: none;
|
|
@@ -112,11 +86,11 @@ const base = css `
|
|
|
112
86
|
box-sizing: border-box;
|
|
113
87
|
overflow: hidden;
|
|
114
88
|
border: none;
|
|
115
|
-
border-radius: var(--eun-
|
|
116
|
-
background: var(--
|
|
117
|
-
color: var(--
|
|
89
|
+
border-radius: var(--eun-border-radius-xl, 999px);
|
|
90
|
+
background: var(--fab-background, var(--_solid));
|
|
91
|
+
color: var(--fab-text, var(--_onSolid));
|
|
118
92
|
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
119
|
-
font-size: var(--eun-
|
|
93
|
+
font-size: var(--eun-font-size-s, 14px);
|
|
120
94
|
text-decoration: none;
|
|
121
95
|
cursor: pointer;
|
|
122
96
|
outline: 2px solid transparent;
|
|
@@ -139,7 +113,10 @@ const base = css `
|
|
|
139
113
|
transform: rotate(-45deg);
|
|
140
114
|
}
|
|
141
115
|
:host(:not([disabled]):not([loading])) #fab:hover {
|
|
142
|
-
background: var(
|
|
116
|
+
background: var(
|
|
117
|
+
--fab-background-hover,
|
|
118
|
+
var(--_hoverFromCustom, var(--_solid-hover))
|
|
119
|
+
);
|
|
143
120
|
box-shadow: var(
|
|
144
121
|
--eun-shadow-l,
|
|
145
122
|
0 10px 15px -3px rgba(0, 0, 0, 0.15),
|
|
@@ -242,4 +219,4 @@ const position = css `
|
|
|
242
219
|
left: var(--fab-offset, var(--eun-space-l, 32px));
|
|
243
220
|
}
|
|
244
221
|
`;
|
|
245
|
-
export const fabStyles = [base, slide, position];
|
|
222
|
+
export const fabStyles = [buttonPaletteStyles, base, slide, position];
|
|
@@ -18,6 +18,7 @@ export declare const EunomiaLinkTagName = "eun-link";
|
|
|
18
18
|
* @prop {import('../../content/icon/icon.type.js').EunomiaIconName} icon - An optional decorative icon displayed to the left of the link
|
|
19
19
|
* @prop {'light' | 'dark'} [theme='light'] - The text color theme. Use dark on a dark background
|
|
20
20
|
* @prop {'auto' | 'off' | 'on'} [visitedStyle='auto'] - Controls the visited state color. Auto follows the browser's real navigation history, off always renders as unvisited, and on always renders as visited
|
|
21
|
+
* @prop {boolean} [current=false] - Marks the link as the current page: it renders with aria-current="page" and keeps the --link-color-current color in every state (hover, focus, visited), for example an active item in a navigation
|
|
21
22
|
* @attr {string} aria-label - An accessible label that overrides the link content. When the link also opens in a new tab, a note announcing it is appended automatically
|
|
22
23
|
* @fires {NavigationEvent} eunnavigate - Fired before following the link, so a client-side router can intercept the navigation. Cancelable
|
|
23
24
|
* @cssprop [--link-color] - Sets the color of the link
|
|
@@ -25,12 +26,15 @@ export declare const EunomiaLinkTagName = "eun-link";
|
|
|
25
26
|
* @cssprop [--link-color-focus] - Sets the color of the link on focus
|
|
26
27
|
* @cssprop [--link-color-visited] - Sets the color of a visited link
|
|
27
28
|
* @cssprop [--link-color-visited-hover] - Sets the color of a visited link on hover
|
|
29
|
+
* @cssprop [--link-color-current] - Sets the color of the current page link, kept on hover, focus and visited states
|
|
30
|
+
* @cssprop [--link-line-height] - Sets the line-height of the link. Inherits the surrounding text's line-height when unset
|
|
28
31
|
* @cssprop [--link-text-decoration] - Sets the text decoration of the link, for example none, when embedding a link inside an already distinct interactive surface such as a card
|
|
29
32
|
* @cssprop [--link-icon-color] - Sets the color of the leading icon, independently of the link text color
|
|
30
33
|
* @cssprop [--link-padding] - Sets padding around the link, for example to give its focus outline room to breathe. Defaults to 0, flush with the text
|
|
31
34
|
* @cssprop [--link-background] - Sets a persistent background color behind the link. Defaults to transparent
|
|
32
35
|
* @cssprop [--link-background-focus] - Sets a background color shown while the link is keyboard-focused, falling back to --link-background when unset
|
|
33
36
|
* @cssprop [--link-border-radius] - Sets the corner radius of the link's own background/focus outline box
|
|
37
|
+
* @cssstate focus-visible - Set while the link is keyboard-focused (never after a mouse click), so it can be styled from outside the shadow root with eun-link:state(focus-visible). Turbopack's CSS parser (lightningcss) doesn't recognize :state() yet and rejects the whole stylesheet it's in ; ship that rule as a runtime <style>/<link> instead until it's supported
|
|
34
38
|
* @element eun-link
|
|
35
39
|
*/
|
|
36
40
|
export declare class EunomiaLink extends LitElement {
|
|
@@ -67,6 +71,36 @@ export declare class EunomiaLink extends LitElement {
|
|
|
67
71
|
* @default auto
|
|
68
72
|
*/
|
|
69
73
|
visitedStyle: "auto" | "off" | "on";
|
|
74
|
+
/**
|
|
75
|
+
* Exposes the `focus-visible` custom state (see {@link handleFocus}).
|
|
76
|
+
* Absent where `ElementInternals` isn't available, such as server-side.
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
private readonly internals?;
|
|
80
|
+
/**
|
|
81
|
+
* The element's custom state set, typed locally since the bundled DOM
|
|
82
|
+
* typings don't declare `ElementInternals.states` yet.
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private get states();
|
|
86
|
+
constructor();
|
|
87
|
+
/**
|
|
88
|
+
* Marks the link as the current page (for example the active item of a
|
|
89
|
+
* navigation) : renders `aria-current="page"` on the inner anchor and
|
|
90
|
+
* keeps `--link-color-current` in every state.
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
current: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* React's server renderer writes a custom element's camelCase prop as an
|
|
96
|
+
* attribute of that exact name, lowercased (`visitedStyle="off"` becomes
|
|
97
|
+
* `visitedstyle="off"`), which never matches `visited-style`. Without this
|
|
98
|
+
* alias the link would start in `auto` (so, visited) and only switch once
|
|
99
|
+
* hydration sets the property, flashing the visited color on first load.
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
static get observedAttributes(): string[];
|
|
103
|
+
attributeChangedCallback(name: string, oldValue: string | null, value: string | null): void;
|
|
70
104
|
/**
|
|
71
105
|
* Elements assigned to the `icon` slot, if any ; queried live so
|
|
72
106
|
* {@link render} can decide whether to fall back to the `icon` prop.
|
|
@@ -81,6 +115,22 @@ export declare class EunomiaLink extends LitElement {
|
|
|
81
115
|
* @private
|
|
82
116
|
*/
|
|
83
117
|
private handleIconSlotChange;
|
|
118
|
+
/**
|
|
119
|
+
* Mirrors the inner anchor's real `:focus-visible` state onto the host as
|
|
120
|
+
* the `focus-visible` custom state, styled from outside with
|
|
121
|
+
* `eun-link:state(focus-visible)`. The anchor is shadow-internal, so the
|
|
122
|
+
* host's own `:focus-visible` never matches, and a plain `focus` listener
|
|
123
|
+
* can't stand in for it (a mouse click focuses the anchor too). Checking
|
|
124
|
+
* `:focus-visible` on the anchor itself keeps mouse focus out.
|
|
125
|
+
* @param event the anchor's focus event.
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
private handleFocus;
|
|
129
|
+
/**
|
|
130
|
+
* Clears the `focus-visible` custom state once the anchor loses focus.
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
133
|
+
private handleBlur;
|
|
84
134
|
/**
|
|
85
135
|
* Gives an SPA router (Next.js, Angular, React Router, Vue Router, ...) a
|
|
86
136
|
* chance to intercept the click and perform client-side navigation instead
|
|
@@ -28,6 +28,7 @@ export const EunomiaLinkTagName = "eun-link";
|
|
|
28
28
|
* @prop {import('../../content/icon/icon.type.js').EunomiaIconName} icon - An optional decorative icon displayed to the left of the link
|
|
29
29
|
* @prop {'light' | 'dark'} [theme='light'] - The text color theme. Use dark on a dark background
|
|
30
30
|
* @prop {'auto' | 'off' | 'on'} [visitedStyle='auto'] - Controls the visited state color. Auto follows the browser's real navigation history, off always renders as unvisited, and on always renders as visited
|
|
31
|
+
* @prop {boolean} [current=false] - Marks the link as the current page: it renders with aria-current="page" and keeps the --link-color-current color in every state (hover, focus, visited), for example an active item in a navigation
|
|
31
32
|
* @attr {string} aria-label - An accessible label that overrides the link content. When the link also opens in a new tab, a note announcing it is appended automatically
|
|
32
33
|
* @fires {NavigationEvent} eunnavigate - Fired before following the link, so a client-side router can intercept the navigation. Cancelable
|
|
33
34
|
* @cssprop [--link-color] - Sets the color of the link
|
|
@@ -35,17 +36,28 @@ export const EunomiaLinkTagName = "eun-link";
|
|
|
35
36
|
* @cssprop [--link-color-focus] - Sets the color of the link on focus
|
|
36
37
|
* @cssprop [--link-color-visited] - Sets the color of a visited link
|
|
37
38
|
* @cssprop [--link-color-visited-hover] - Sets the color of a visited link on hover
|
|
39
|
+
* @cssprop [--link-color-current] - Sets the color of the current page link, kept on hover, focus and visited states
|
|
40
|
+
* @cssprop [--link-line-height] - Sets the line-height of the link. Inherits the surrounding text's line-height when unset
|
|
38
41
|
* @cssprop [--link-text-decoration] - Sets the text decoration of the link, for example none, when embedding a link inside an already distinct interactive surface such as a card
|
|
39
42
|
* @cssprop [--link-icon-color] - Sets the color of the leading icon, independently of the link text color
|
|
40
43
|
* @cssprop [--link-padding] - Sets padding around the link, for example to give its focus outline room to breathe. Defaults to 0, flush with the text
|
|
41
44
|
* @cssprop [--link-background] - Sets a persistent background color behind the link. Defaults to transparent
|
|
42
45
|
* @cssprop [--link-background-focus] - Sets a background color shown while the link is keyboard-focused, falling back to --link-background when unset
|
|
43
46
|
* @cssprop [--link-border-radius] - Sets the corner radius of the link's own background/focus outline box
|
|
47
|
+
* @cssstate focus-visible - Set while the link is keyboard-focused (never after a mouse click), so it can be styled from outside the shadow root with eun-link:state(focus-visible). Turbopack's CSS parser (lightningcss) doesn't recognize :state() yet and rejects the whole stylesheet it's in ; ship that rule as a runtime <style>/<link> instead until it's supported
|
|
44
48
|
* @element eun-link
|
|
45
49
|
*/
|
|
46
50
|
let EunomiaLink = class EunomiaLink extends LitElement {
|
|
51
|
+
/**
|
|
52
|
+
* The element's custom state set, typed locally since the bundled DOM
|
|
53
|
+
* typings don't declare `ElementInternals.states` yet.
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
get states() {
|
|
57
|
+
return this.internals?.states;
|
|
58
|
+
}
|
|
47
59
|
constructor() {
|
|
48
|
-
super(
|
|
60
|
+
super();
|
|
49
61
|
/**
|
|
50
62
|
* The native `target` attribute forwarded to the link.
|
|
51
63
|
* @default _self
|
|
@@ -63,6 +75,13 @@ let EunomiaLink = class EunomiaLink extends LitElement {
|
|
|
63
75
|
* @default auto
|
|
64
76
|
*/
|
|
65
77
|
this.visitedStyle = "auto";
|
|
78
|
+
/**
|
|
79
|
+
* Marks the link as the current page (for example the active item of a
|
|
80
|
+
* navigation) : renders `aria-current="page"` on the inner anchor and
|
|
81
|
+
* keeps `--link-color-current` in every state.
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
84
|
+
this.current = false;
|
|
66
85
|
/**
|
|
67
86
|
* Re-renders when the `icon` slot's assigned content changes, so the
|
|
68
87
|
* `icon` prop fallback correctly appears/disappears as content is
|
|
@@ -72,6 +91,49 @@ let EunomiaLink = class EunomiaLink extends LitElement {
|
|
|
72
91
|
this.handleIconSlotChange = () => {
|
|
73
92
|
this.requestUpdate();
|
|
74
93
|
};
|
|
94
|
+
if (typeof this.attachInternals === "function") {
|
|
95
|
+
this.internals = this.attachInternals();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* React's server renderer writes a custom element's camelCase prop as an
|
|
100
|
+
* attribute of that exact name, lowercased (`visitedStyle="off"` becomes
|
|
101
|
+
* `visitedstyle="off"`), which never matches `visited-style`. Without this
|
|
102
|
+
* alias the link would start in `auto` (so, visited) and only switch once
|
|
103
|
+
* hydration sets the property, flashing the visited color on first load.
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
static get observedAttributes() {
|
|
107
|
+
return [...super.observedAttributes, "visitedstyle"];
|
|
108
|
+
}
|
|
109
|
+
attributeChangedCallback(name, oldValue, value) {
|
|
110
|
+
if (name === "visitedstyle") {
|
|
111
|
+
this.visitedStyle = (value ?? "auto");
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
super.attributeChangedCallback(name, oldValue, value);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Mirrors the inner anchor's real `:focus-visible` state onto the host as
|
|
118
|
+
* the `focus-visible` custom state, styled from outside with
|
|
119
|
+
* `eun-link:state(focus-visible)`. The anchor is shadow-internal, so the
|
|
120
|
+
* host's own `:focus-visible` never matches, and a plain `focus` listener
|
|
121
|
+
* can't stand in for it (a mouse click focuses the anchor too). Checking
|
|
122
|
+
* `:focus-visible` on the anchor itself keeps mouse focus out.
|
|
123
|
+
* @param event the anchor's focus event.
|
|
124
|
+
* @private
|
|
125
|
+
*/
|
|
126
|
+
handleFocus(event) {
|
|
127
|
+
if (event.currentTarget.matches(":focus-visible")) {
|
|
128
|
+
this.states?.add("focus-visible");
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Clears the `focus-visible` custom state once the anchor loses focus.
|
|
133
|
+
* @private
|
|
134
|
+
*/
|
|
135
|
+
handleBlur() {
|
|
136
|
+
this.states?.delete("focus-visible");
|
|
75
137
|
}
|
|
76
138
|
/**
|
|
77
139
|
* Gives an SPA router (Next.js, Angular, React Router, Vue Router, ...) a
|
|
@@ -99,11 +161,14 @@ let EunomiaLink = class EunomiaLink extends LitElement {
|
|
|
99
161
|
class=${classMap({ "has-icon": hasIcon })}
|
|
100
162
|
href=${ifDefined(this.href)}
|
|
101
163
|
target=${this.target}
|
|
164
|
+
aria-current=${ifDefined(this.current ? "page" : undefined)}
|
|
102
165
|
rel=${ifDefined(isBlank ? "noopener noreferrer" : undefined)}
|
|
103
166
|
aria-label=${ifDefined(isBlank && this.ariaLabel
|
|
104
167
|
? `${this.ariaLabel} (opens in a new tab)`
|
|
105
168
|
: (this.ariaLabel ?? undefined))}
|
|
106
169
|
@click=${this.handleClick}
|
|
170
|
+
@focus=${this.handleFocus}
|
|
171
|
+
@blur=${this.handleBlur}
|
|
107
172
|
>
|
|
108
173
|
<slot
|
|
109
174
|
name="icon"
|
|
@@ -145,6 +210,9 @@ __decorate([
|
|
|
145
210
|
__decorate([
|
|
146
211
|
property({ reflect: true, attribute: "visited-style" })
|
|
147
212
|
], EunomiaLink.prototype, "visitedStyle", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
property({ type: Boolean, reflect: true })
|
|
215
|
+
], EunomiaLink.prototype, "current", void 0);
|
|
148
216
|
__decorate([
|
|
149
217
|
queryAssignedElements({ slot: "icon" })
|
|
150
218
|
], EunomiaLink.prototype, "iconSlotEls", void 0);
|
|
@@ -3,12 +3,14 @@ import { css } from "lit";
|
|
|
3
3
|
* Base style for the link component.
|
|
4
4
|
*
|
|
5
5
|
* Custom css variables:
|
|
6
|
-
* [--link-color] - Set a custom link color, also used as the hover blend base
|
|
6
|
+
* [--link-color] - Set a custom link color, also used as the hover blend base. A visited link still uses the visited color, override it with --link-color-visited or set visited-style="off"
|
|
7
7
|
* [--link-font-size] - Set a custom font-size to the link
|
|
8
|
+
* [--link-line-height] - Set a custom line-height to the link. Inherits the surrounding text's line-height when unset
|
|
8
9
|
* [--link-color-hover] - Set a custom link color on hover state
|
|
9
10
|
* [--link-color-focus] - Set a custom link color on focus-visible state
|
|
10
11
|
* [--link-color-visited] - Set a custom link color on visited state
|
|
11
12
|
* [--link-color-visited-hover] - Set a custom link color on visited+hover state
|
|
13
|
+
* [--link-color-current] - Set a custom link color for the current page link (the `current` attribute). It stays this color on hover, focus and visited states
|
|
12
14
|
* [--link-text-decoration] - Set a custom text-decoration for the link
|
|
13
15
|
* [--link-icon-color] - Set a custom color for the leading icon, independent from the link text color
|
|
14
16
|
* [--link-padding] - Set custom padding around the link, for example to give its focus outline room to breathe. Defaults to 0, flush with the text
|
|
@@ -35,10 +37,15 @@ const base = css `
|
|
|
35
37
|
--link-color-visited-hover,
|
|
36
38
|
color-mix(in srgb, var(--_colorVisited) 80%, black)
|
|
37
39
|
);
|
|
40
|
+
--_colorCurrent: var(
|
|
41
|
+
--link-color-current,
|
|
42
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
43
|
+
);
|
|
38
44
|
--_textDecoration: var(--link-text-decoration, underline);
|
|
39
45
|
--_iconColor: var(--link-icon-color, var(--_color));
|
|
40
46
|
--icon-color: var(--_iconColor);
|
|
41
47
|
font-size: var(--link-font-size, unset);
|
|
48
|
+
line-height: var(--link-line-height, inherit);
|
|
42
49
|
display: inline-flex;
|
|
43
50
|
align-items: center;
|
|
44
51
|
}
|
|
@@ -68,7 +75,7 @@ const base = css `
|
|
|
68
75
|
font: inherit;
|
|
69
76
|
text-decoration: var(--_textDecoration);
|
|
70
77
|
text-wrap: pretty;
|
|
71
|
-
border-radius: var(--link-border-radius, var(--eun-
|
|
78
|
+
border-radius: var(--link-border-radius, var(--eun-border-radius-m, 8px));
|
|
72
79
|
cursor: pointer;
|
|
73
80
|
outline: 2px solid transparent;
|
|
74
81
|
transition:
|
|
@@ -117,6 +124,16 @@ const base = css `
|
|
|
117
124
|
--icon-color: var(--link-icon-color, var(--_colorHover));
|
|
118
125
|
}
|
|
119
126
|
|
|
127
|
+
:host([current]) #link,
|
|
128
|
+
:host([current]) #link:visited,
|
|
129
|
+
:host([current]) #link:hover,
|
|
130
|
+
:host([current]) #link:visited:hover,
|
|
131
|
+
:host([current]) #link:focus-visible {
|
|
132
|
+
color: var(--_colorCurrent) !important;
|
|
133
|
+
text-decoration-color: var(--_colorCurrent);
|
|
134
|
+
--icon-color: var(--link-icon-color, var(--_colorCurrent));
|
|
135
|
+
}
|
|
136
|
+
|
|
120
137
|
@media (prefers-reduced-motion: reduce) {
|
|
121
138
|
#link {
|
|
122
139
|
transition: none;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared color palette of the button family (`eun-button`, `eun-fab`, and so
|
|
3
|
+
* `eun-dropdown-button`, which renders an `eun-button`). A `variant` fills
|
|
4
|
+
* the same slots on the host, and each component's stylesheet then reads
|
|
5
|
+
* them, per appearance and state, *behind* its public `--<component>-*`
|
|
6
|
+
* custom properties, so those always win over any variant and appearance.
|
|
7
|
+
*
|
|
8
|
+
* Slots :
|
|
9
|
+
* - `--_solid`, `--_solid-hover`, `--_solid-active` : the strong color, at
|
|
10
|
+
* rest, hovered and pressed.
|
|
11
|
+
* - `--_onSolid` : the text color on top of the strong color.
|
|
12
|
+
* - `--_accent` : the text/border color on a pale or transparent surface.
|
|
13
|
+
* - `--_tint`, `--_tint-hover`, `--_tint-active` : the pale wash, and
|
|
14
|
+
* `--_fgTint` the text color on it.
|
|
15
|
+
* - `--_wash-hover`, `--_wash-active` : the wash a transparent surface
|
|
16
|
+
* (outline, ghost) takes on hover and press.
|
|
17
|
+
* - `--_flat`, `--_flat-hover`, `--_flatFg` : the muted `flat` surface.
|
|
18
|
+
* - `--_ring` : the focus outline color.
|
|
19
|
+
*
|
|
20
|
+
* `light` and `dark` are absolute colors : white and black, whatever the
|
|
21
|
+
* appearance. They have no pale wash, so the tinted surface is as solid as
|
|
22
|
+
* the strong one, and `flat` is a faint wash of the color itself rather than
|
|
23
|
+
* the neutral surface every other variant shares. By default they follow the
|
|
24
|
+
* grey scale, which flips with the active theme ; `fixed-color` pins them to
|
|
25
|
+
* the light theme's white and black instead.
|
|
26
|
+
*/
|
|
27
|
+
export declare const buttonPaletteStyles: import("lit").CSSResult;
|