@eunomia/elements 1.0.0-beta.9 → 1.0.0
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 +28 -6
- package/dist/angular/forms.d.ts +80 -0
- package/dist/angular/forms.js +267 -0
- package/dist/cdn/components/chunks/chunk-2XPIGFBD.js +1 -0
- package/dist/cdn/components/chunks/chunk-5IUNSTM3.js +1 -0
- package/dist/cdn/components/chunks/chunk-7HXPLZ7C.js +1 -0
- package/dist/cdn/components/chunks/{chunk-J3SZBXM6.js → chunk-A2NO4RSF.js} +7 -7
- package/dist/cdn/components/chunks/{chunk-Q34EQ5HZ.js → chunk-A623JJXJ.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-Y3HOIL64.js → chunk-AW7PU43S.js} +2 -2
- package/dist/cdn/components/chunks/{chunk-FF3I7C3C.js → chunk-DWTNRFWW.js} +1 -3
- package/dist/cdn/components/chunks/chunk-FPNWPMHA.js +1 -0
- package/dist/cdn/components/chunks/chunk-GMWUHGNI.js +319 -0
- package/dist/cdn/components/chunks/{chunk-FQUWHNQT.js → chunk-GXOEPXDW.js} +1 -1
- package/dist/cdn/components/chunks/chunk-HXESKTK2.js +1 -0
- package/dist/cdn/components/chunks/chunk-JDUWKPHW.js +46 -0
- package/dist/cdn/components/chunks/{chunk-D3JJBHXN.js → chunk-JLKCBPD2.js} +2 -2
- package/dist/cdn/components/chunks/chunk-M6ZJHL4Q.js +1 -0
- package/dist/cdn/components/chunks/{chunk-TN3HGHQO.js → chunk-MDSUMP3O.js} +4 -4
- package/dist/cdn/components/chunks/chunk-MSQWOKBB.js +1 -0
- package/dist/cdn/components/chunks/{chunk-3UUZM7X2.js → chunk-NPXRQHUN.js} +3 -3
- package/dist/cdn/components/chunks/chunk-OB7DEGNX.js +1 -0
- package/dist/cdn/components/chunks/{chunk-JANNHW4Q.js → chunk-PADHCLBG.js} +4 -4
- package/dist/cdn/components/chunks/chunk-QMXE3KLT.js +1 -0
- package/dist/cdn/components/chunks/chunk-QNWKRPOW.js +1 -0
- package/dist/cdn/components/chunks/{chunk-KQUUMZ7U.js → chunk-RZF7QQDX.js} +7 -7
- package/dist/cdn/components/chunks/chunk-SCAP7J35.js +1 -0
- package/dist/cdn/components/chunks/chunk-TISMX7UL.js +1 -0
- package/dist/cdn/components/chunks/chunk-TWLI2ZOT.js +1 -0
- package/dist/cdn/components/chunks/chunk-W4VCWRY7.js +210 -0
- package/dist/cdn/components/chunks/{chunk-SZZRMJ65.js → chunk-WEG3KO6T.js} +3 -3
- package/dist/cdn/components/chunks/chunk-WP6ZYBAC.js +1 -0
- package/dist/cdn/components/chunks/{chunk-HGX6GPHM.js → chunk-XCBQ4CKH.js} +1 -1
- package/dist/cdn/components/chunks/{chunk-3UW2LJ7T.js → chunk-XZ3LFOQP.js} +2 -2
- package/dist/cdn/components/eun-alert.js +1 -1
- package/dist/cdn/components/eun-animate.js +92 -180
- package/dist/cdn/components/eun-breadcrumb.js +4 -4
- package/dist/cdn/components/eun-button.js +1 -1
- package/dist/cdn/components/eun-calendar.js +188 -115
- package/dist/cdn/components/eun-card.js +1 -1
- package/dist/cdn/components/eun-carousel.js +36 -28
- package/dist/cdn/components/eun-check-card.js +3 -3
- package/dist/cdn/components/eun-checkbox-list.js +2 -2
- package/dist/cdn/components/eun-checkbox.js +1 -1
- package/dist/cdn/components/eun-chip.js +11 -15
- package/dist/cdn/components/eun-collapse.js +21 -10
- package/dist/cdn/components/eun-color-picker.js +32 -32
- package/dist/cdn/components/eun-counter.js +8 -8
- package/dist/cdn/components/eun-date-picker.js +83 -79
- package/dist/cdn/components/eun-description-list.js +1 -1
- package/dist/cdn/components/eun-divider.js +9 -8
- package/dist/cdn/components/eun-drawer.js +8 -6
- package/dist/cdn/components/eun-dropdown-button.js +1 -1
- package/dist/cdn/components/eun-dropdown-item.js +4 -4
- package/dist/cdn/components/eun-fab.js +1 -1
- package/dist/cdn/components/eun-image-card.js +2 -2
- package/dist/cdn/components/eun-image-carousel.js +55 -29
- package/dist/cdn/components/eun-infinite-list.js +2 -2
- package/dist/cdn/components/eun-input-file.js +3 -3
- package/dist/cdn/components/eun-input-phone.js +6 -6
- package/dist/cdn/components/eun-input.js +1 -1
- package/dist/cdn/components/eun-label.js +1 -1
- package/dist/cdn/components/eun-link.js +18 -329
- package/dist/cdn/components/eun-loader.js +1 -1
- package/dist/cdn/components/eun-modal.js +9 -7
- package/dist/cdn/components/eun-nav-menu.js +363 -0
- package/dist/cdn/components/eun-pagination.js +4 -4
- package/dist/cdn/components/eun-password-strength.js +2 -2
- package/dist/cdn/components/eun-progress-bar.js +1 -1
- package/dist/cdn/components/eun-radio-card.js +4 -4
- package/dist/cdn/components/eun-radio-list.js +1 -1
- package/dist/cdn/components/eun-radio.js +1 -1
- package/dist/cdn/components/eun-rating.js +9 -9
- package/dist/cdn/components/eun-scheduler-event-editor.js +113 -77
- package/dist/cdn/components/eun-scheduler-event.js +1 -1
- package/dist/cdn/components/eun-scheduler.js +137 -79
- package/dist/cdn/components/eun-search.js +6 -6
- package/dist/cdn/components/eun-select.js +1 -1
- package/dist/cdn/components/eun-sidebar.js +23 -14
- package/dist/cdn/components/eun-slider.js +2 -2
- package/dist/cdn/components/eun-sliding-card.js +1 -1
- package/dist/cdn/components/eun-step.js +2 -2
- package/dist/cdn/components/eun-stepper.js +11 -12
- package/dist/cdn/components/eun-switch.js +2 -2
- package/dist/cdn/components/eun-tab-group.js +1 -1
- package/dist/cdn/components/eun-tab-panel.js +1 -1
- package/dist/cdn/components/eun-table-action-bar.js +1 -1
- package/dist/cdn/components/eun-table.js +13 -10
- package/dist/cdn/components/eun-tag.js +1 -1
- package/dist/cdn/components/eun-textarea.js +4 -4
- package/dist/cdn/components/eun-time-picker.js +28 -25
- package/dist/cdn/components/eun-toast.js +8 -8
- package/dist/cdn/components/eun-toggle-group.js +8 -2
- package/dist/cdn/components/eun-toggle-item.js +8 -2
- package/dist/cdn/components/eun-toggle.js +4 -1
- package/dist/cdn/components/eun-toolbar.js +114 -36
- package/dist/cdn/components/eun-tooltip.js +1 -1
- package/dist/cdn/styles/eunomia-themes.css +1 -1
- package/dist/cdn/styles/themes/eunomia-theme.css +1 -1
- package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +2 -2
- package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
- package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
- package/dist/cdn/styles/tools/mixins/layout/eunomia-grid.mixin.scss +116 -8
- package/dist/components/action/button/button.styles.js +2 -2
- package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -0
- package/dist/components/action/dropdown-button/dropdown-button.js +1 -0
- package/dist/components/action/dropdown-button/dropdown-button.styles.js +5 -4
- package/dist/components/action/dropdown-button/dropdown-item.d.ts +1 -0
- package/dist/components/action/dropdown-button/dropdown-item.js +1 -0
- package/dist/components/action/dropdown-button/dropdown-item.styles.js +4 -4
- package/dist/components/action/link/link.d.ts +2 -1
- package/dist/components/action/link/link.js +2 -1
- package/dist/components/action/link/link.styles.d.ts +40 -1
- package/dist/components/action/link/link.styles.js +83 -60
- package/dist/components/action/shared-styles/button-palette.styles.js +1 -1
- package/dist/components/action/toggle/toggle-group.d.ts +1 -0
- package/dist/components/action/toggle/toggle-group.js +1 -0
- package/dist/components/action/toggle/toggle-group.styles.d.ts +1 -0
- package/dist/components/action/toggle/toggle-group.styles.js +9 -2
- package/dist/components/action/toggle/toggle-item.styles.js +8 -2
- package/dist/components/action/toggle/toggle.d.ts +1 -0
- package/dist/components/action/toggle/toggle.js +1 -0
- package/dist/components/action/toggle/toggle.styles.d.ts +1 -0
- package/dist/components/action/toggle/toggle.styles.js +5 -1
- package/dist/components/alert/drawer/drawer.d.ts +14 -13
- package/dist/components/alert/drawer/drawer.js +20 -28
- package/dist/components/alert/modal/modal.d.ts +14 -13
- package/dist/components/alert/modal/modal.js +20 -28
- package/dist/components/alert/modal/modal.styles.js +1 -1
- package/dist/components/alert/toast/toast.d.ts +5 -5
- package/dist/components/alert/toast/toast.js +9 -10
- package/dist/components/alert/toast/toast.styles.js +3 -3
- package/dist/components/content/card/image-card.styles.js +1 -1
- package/dist/components/content/chip/chip.d.ts +7 -9
- package/dist/components/content/chip/chip.js +11 -14
- package/dist/components/content/chip/chip.styles.js +1 -5
- package/dist/components/content/collapse/collapse.d.ts +5 -0
- package/dist/components/content/collapse/collapse.js +7 -0
- package/dist/components/content/collapse/collapse.styles.d.ts +3 -0
- package/dist/components/content/collapse/collapse.styles.js +13 -1
- package/dist/components/content/description-list/description-list.styles.js +1 -1
- package/dist/components/content/image-carousel/image-carousel.d.ts +60 -13
- package/dist/components/content/image-carousel/image-carousel.js +100 -22
- package/dist/components/content/image-carousel/image-carousel.styles.js +32 -6
- package/dist/components/content/password-strength/password-strength.styles.js +1 -1
- package/dist/components/content/progress-bar/progress-bar.styles.js +1 -1
- package/dist/components/content/shared-styles/card-link.styles.js +1 -1
- package/dist/components/content/shared-styles/tone-surface.styles.js +1 -3
- package/dist/components/form/checkbox/check-card.styles.js +2 -2
- package/dist/components/form/checkbox/checkbox-list.d.ts +3 -1
- package/dist/components/form/checkbox/checkbox-list.js +3 -1
- package/dist/components/form/checkbox/checkbox.styles.js +1 -1
- package/dist/components/form/color-picker/color-picker.d.ts +28 -3
- package/dist/components/form/color-picker/color-picker.js +53 -7
- package/dist/components/form/counter/counter.js +1 -1
- package/dist/components/form/counter/counter.styles.js +2 -2
- package/dist/components/form/date-picker/date-picker-day-grid.styles.js +1 -1
- package/dist/components/form/date-picker/date-picker-month-grid.js +1 -1
- package/dist/components/form/date-picker/date-picker.d.ts +50 -13
- package/dist/components/form/date-picker/date-picker.js +178 -43
- package/dist/components/form/input/input.js +1 -4
- package/dist/components/form/input-file/input-file.styles.js +2 -2
- package/dist/components/form/input-phone/input-phone.js +4 -3
- package/dist/components/form/label/label.styles.js +1 -1
- package/dist/components/form/radio/radio-card.styles.js +2 -2
- package/dist/components/form/radio/radio.styles.js +1 -1
- package/dist/components/form/rating/rating.js +3 -5
- package/dist/components/form/rating/rating.styles.js +2 -2
- package/dist/components/form/search/search.d.ts +1 -7
- package/dist/components/form/search/search.js +2 -12
- package/dist/components/form/shared-styles/field.styles.js +2 -2
- package/dist/components/form/slider/slider.styles.js +1 -1
- package/dist/components/form/switch/switch.styles.js +1 -1
- package/dist/components/form/textarea/textarea.js +1 -5
- package/dist/components/form/textarea/textarea.styles.js +2 -2
- package/dist/components/form/time-picker/time-picker-columns.d.ts +4 -1
- package/dist/components/form/time-picker/time-picker-columns.js +64 -15
- package/dist/components/form/time-picker/time-picker-columns.styles.js +5 -1
- package/dist/components/form/time-picker/time-picker-list.d.ts +4 -1
- package/dist/components/form/time-picker/time-picker-list.js +15 -8
- package/dist/components/form/time-picker/time-picker.d.ts +11 -2
- package/dist/components/form/time-picker/time-picker.js +22 -8
- package/dist/components/layout/animate/animate.d.ts +35 -17
- package/dist/components/layout/animate/animate.js +27 -14
- package/dist/components/layout/animate/animate.styles.d.ts +2 -1
- package/dist/components/layout/animate/animate.styles.js +107 -179
- package/dist/components/layout/divider/divider.d.ts +1 -0
- package/dist/components/layout/divider/divider.js +2 -1
- package/dist/components/layout/divider/divider.styles.js +7 -6
- package/dist/components/layout/infinite-list/infinite-list.styles.js +1 -1
- package/dist/components/navigation/breadcrumb/breadcrumb.styles.js +3 -3
- package/dist/components/navigation/carousel/carousel.d.ts +23 -14
- package/dist/components/navigation/carousel/carousel.js +39 -27
- package/dist/components/navigation/carousel/carousel.styles.js +16 -8
- package/dist/components/navigation/nav-menu/nav-menu.d.ts +201 -0
- package/dist/components/navigation/nav-menu/nav-menu.js +673 -0
- package/dist/components/navigation/nav-menu/nav-menu.styles.d.ts +1 -0
- package/dist/components/navigation/nav-menu/nav-menu.styles.js +352 -0
- package/dist/components/navigation/pagination/pagination.d.ts +3 -0
- package/dist/components/navigation/pagination/pagination.styles.js +2 -2
- package/dist/components/navigation/sidebar/sidebar.d.ts +8 -10
- package/dist/components/navigation/sidebar/sidebar.js +12 -15
- package/dist/components/navigation/sidebar/sidebar.styles.js +13 -4
- package/dist/components/navigation/stepper/step.styles.js +2 -2
- package/dist/components/navigation/stepper/stepper.d.ts +24 -13
- package/dist/components/navigation/stepper/stepper.js +36 -23
- package/dist/components/navigation/stepper/stepper.styles.js +2 -2
- package/dist/components/navigation/tabs/tab-group/tab-group.js +1 -1
- package/dist/components/navigation/tabs/tab-panel/tab-panel.styles.js +1 -1
- package/dist/components/navigation/toolbar/toolbar.d.ts +121 -20
- package/dist/components/navigation/toolbar/toolbar.js +176 -45
- package/dist/components/navigation/toolbar/toolbar.styles.js +113 -28
- package/dist/events/editor-state-change.event.d.ts +28 -0
- package/dist/events/editor-state-change.event.js +22 -0
- package/dist/events/event-cancel.event.d.ts +20 -0
- package/dist/events/event-cancel.event.js +17 -0
- package/dist/events/period-change.event.d.ts +14 -6
- package/dist/events/period-change.event.js +9 -6
- package/dist/features/scheduler/calendar/calendar.d.ts +52 -20
- package/dist/features/scheduler/calendar/calendar.js +84 -36
- package/dist/features/scheduler/calendar/calendar.styles.js +5 -2
- package/dist/features/scheduler/scheduler/scheduler.d.ts +69 -4
- package/dist/features/scheduler/scheduler/scheduler.js +172 -47
- package/dist/features/scheduler/scheduler/scheduler.styles.js +6 -0
- package/dist/features/scheduler/scheduler-event/scheduler-event.d.ts +18 -20
- package/dist/features/scheduler/scheduler-event/scheduler-event.js +29 -38
- package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +2 -2
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts +102 -18
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +249 -112
- package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.styles.js +11 -1
- package/dist/features/scheduler/shared/scheduler-event-popover.d.ts +9 -1
- package/dist/features/scheduler/shared/scheduler-event-popover.js +77 -42
- package/dist/features/scheduler/shared/scheduler-event-popover.styles.js +14 -3
- package/dist/features/scheduler/shared/scheduler-hour-grid.d.ts +3 -2
- package/dist/features/scheduler/shared/scheduler-hour-grid.js +53 -46
- package/dist/features/scheduler/shared/scheduler-hour-grid.styles.js +13 -7
- package/dist/features/scheduler/shared/scheduler-month-view.js +1 -1
- package/dist/features/scheduler/shared/scheduler-month-view.styles.js +13 -7
- package/dist/features/scheduler/shared/scheduler-year-view.d.ts +6 -5
- package/dist/features/scheduler/shared/scheduler-year-view.js +11 -7
- package/dist/features/scheduler/shared/scheduler-year-view.styles.js +57 -3
- package/dist/features/scheduler/shared/scheduler.types.d.ts +5 -9
- package/dist/features/scheduler/shared/scheduler.utils.d.ts +61 -0
- package/dist/features/scheduler/shared/scheduler.utils.js +78 -4
- package/dist/features/table/table/table-native.styles.js +8 -4
- package/dist/features/table/table/table.d.ts +2 -1
- package/dist/features/table/table/table.js +2 -1
- package/dist/features/table/table/table.styles.js +6 -4
- package/dist/i18n/en.d.ts +17 -0
- package/dist/i18n/en.js +17 -0
- package/dist/i18n/fr.js +17 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -0
- package/dist/jsx.d.ts +48 -6
- package/dist/mixins/anchor-position.mixin.d.ts +17 -0
- package/dist/mixins/anchor-position.mixin.js +45 -7
- package/dist/mixins/button.mixin.js +2 -1
- package/dist/mixins/check.mixin.js +14 -5
- package/dist/mixins/dialog-surface.mixin.d.ts +1 -1
- package/dist/mixins/dialog-surface.mixin.js +5 -5
- package/dist/mixins/form.mixin.js +33 -13
- package/dist/mixins/localizable.mixin.d.ts +1 -0
- package/dist/mixins/localizable.mixin.js +9 -2
- package/dist/mixins/radio.mixin.js +14 -5
- package/dist/mixins/validators.mixin.js +4 -3
- package/dist/react.d.ts +59 -0
- package/dist/react.js +42 -0
- package/dist/ssr/animate-ssr.css +35 -0
- package/dist/ssr/breadcrumb-ssr.css +3 -3
- package/dist/ssr/button-ssr.css +8 -2
- package/dist/ssr/card-ssr.css +1 -1
- package/dist/ssr/carousel-ssr.css +15 -4
- package/dist/ssr/chip-ssr.css +3 -3
- package/dist/ssr/collapse-ssr.css +2 -2
- package/dist/ssr/description-list-ssr.css +1 -1
- package/dist/ssr/divider-ssr.css +23 -0
- package/dist/ssr/field-ssr.css +245 -42
- package/dist/ssr/image-carousel-ssr.css +2 -4
- package/dist/ssr/links-ssr.css +17 -3
- package/dist/ssr/nav-menu-ssr.css +82 -0
- package/dist/ssr/overlay-ssr.css +4 -0
- package/dist/ssr/scheduler-ssr.css +182 -0
- package/dist/ssr/stepper-ssr.css +136 -0
- package/dist/ssr/table-ssr.css +7 -4
- package/dist/ssr/tag-ssr.css +1 -1
- package/dist/ssr/toolbar-ssr.css +7 -5
- package/dist/utils/css-length.utils.d.ts +14 -0
- package/dist/utils/css-length.utils.js +32 -0
- package/dist/utils/form-validation.utils.d.ts +36 -0
- package/dist/utils/form-validation.utils.js +113 -0
- package/dist/utils/implicit-submission.utils.js +2 -14
- package/dist/utils/interactive-content.utils.d.ts +10 -0
- package/dist/utils/interactive-content.utils.js +43 -0
- package/dist/utils/popover.utils.js +3 -2
- package/dist/utils/scroll-lock.utils.d.ts +9 -1
- package/dist/utils/scroll-lock.utils.js +21 -2
- package/dist/utils/theme-generator.utils.d.ts +1 -0
- package/dist/utils/theme-generator.utils.js +23 -10
- package/dist/utils/validity.utils.d.ts +18 -4
- package/dist/utils/validity.utils.js +74 -4
- package/package.json +34 -3
- package/styles/themes/mixins/eunomia-neutrals.mixin.scss +2 -2
- package/styles/tools/mixins/layout/eunomia-grid.mixin.scss +116 -8
- package/dist/cdn/components/chunks/chunk-4DRU3IYJ.js +0 -1
- package/dist/cdn/components/chunks/chunk-647ISUF4.js +0 -1
- package/dist/cdn/components/chunks/chunk-6TIEBY34.js +0 -1
- package/dist/cdn/components/chunks/chunk-E6UOI36Q.js +0 -1
- package/dist/cdn/components/chunks/chunk-GNAUNTS5.js +0 -1
- package/dist/cdn/components/chunks/chunk-IJJ67C66.js +0 -1
- package/dist/cdn/components/chunks/chunk-J7ETIRSK.js +0 -1
- package/dist/cdn/components/chunks/chunk-JGV7LHEI.js +0 -1
- package/dist/cdn/components/chunks/chunk-L74LXUGL.js +0 -1
- package/dist/cdn/components/chunks/chunk-MY6ORZJR.js +0 -46
- package/dist/cdn/components/chunks/chunk-QWTFP56P.js +0 -1
- package/dist/cdn/components/chunks/chunk-SFX2LQ4K.js +0 -205
- package/dist/cdn/components/chunks/chunk-WW4BTWMH.js +0 -1
- package/dist/utils/boolean.utils.d.ts +0 -14
- package/dist/utils/boolean.utils.js +0 -20
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { css, unsafeCSS } from "lit";
|
|
2
|
+
import { linkBlockRule } from "../../action/link/link.styles.js";
|
|
3
|
+
/**
|
|
4
|
+
* Base style for the nav-menu component.
|
|
5
|
+
*
|
|
6
|
+
* The trigger takes the colors of an eun-link, so it sits among the other
|
|
7
|
+
* links of a navigation without any setup, and its own theme="dark"
|
|
8
|
+
* follows eun-link's. The panel is a manual popover in the top layer,
|
|
9
|
+
* anchored to the trigger by AnchorPositionMixin, and animated in CSS with
|
|
10
|
+
* @starting-style and allow-discrete transitions. Its position comes from
|
|
11
|
+
* the mixin's --_anchorTop/--_anchorLeft/--_anchorWidth on the fallback
|
|
12
|
+
* path, and from the @supports (anchor-name) block below on the native
|
|
13
|
+
* one, which only applies once the mixin actually linked the panel
|
|
14
|
+
* natively (data-native-anchor).
|
|
15
|
+
*
|
|
16
|
+
* The links are styled from here through ::slotted : an eun-link gets its
|
|
17
|
+
* --link-* custom properties, which its own styles still override, plus
|
|
18
|
+
* eun-link's own block layout so it fills its row without the block
|
|
19
|
+
* attribute, and a plain anchor gets the same row look directly.
|
|
20
|
+
*/
|
|
21
|
+
const base = css `
|
|
22
|
+
:host {
|
|
23
|
+
--_duration: var(
|
|
24
|
+
--nav-menu-transition-duration,
|
|
25
|
+
var(--eun-duration-xl, 300ms)
|
|
26
|
+
);
|
|
27
|
+
--_easing: var(--eun-easing-out, ease-out);
|
|
28
|
+
--_triggerColor: var(
|
|
29
|
+
--nav-menu-trigger-color,
|
|
30
|
+
var(--eun-text-color, #071621)
|
|
31
|
+
);
|
|
32
|
+
--_triggerColorHover: var(
|
|
33
|
+
--nav-menu-trigger-color-hover,
|
|
34
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
35
|
+
);
|
|
36
|
+
--_triggerColorCurrent: var(
|
|
37
|
+
--nav-menu-trigger-color-current,
|
|
38
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
39
|
+
);
|
|
40
|
+
--_focusOutline: var(
|
|
41
|
+
--nav-menu-focus-outline-color,
|
|
42
|
+
var(--eun-color-primary-700, #3662e0)
|
|
43
|
+
);
|
|
44
|
+
--_panelBackground: var(
|
|
45
|
+
--nav-menu-panel-background,
|
|
46
|
+
var(--eun-surface-color, #ffffff)
|
|
47
|
+
);
|
|
48
|
+
--_panelBorderColor: var(
|
|
49
|
+
--nav-menu-panel-border-color,
|
|
50
|
+
var(--eun-border-color, #dee0e7)
|
|
51
|
+
);
|
|
52
|
+
--_linkColor: var(--nav-menu-link-color, var(--eun-text-color, #071621));
|
|
53
|
+
--_linkColorHover: var(
|
|
54
|
+
--nav-menu-link-color-hover,
|
|
55
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
56
|
+
);
|
|
57
|
+
--_linkColorCurrent: var(
|
|
58
|
+
--nav-menu-link-color-current,
|
|
59
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
60
|
+
);
|
|
61
|
+
--_linkBackgroundHover: var(
|
|
62
|
+
--nav-menu-link-background-hover,
|
|
63
|
+
var(--eun-content-hover, #edeff0)
|
|
64
|
+
);
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
vertical-align: middle;
|
|
67
|
+
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
68
|
+
}
|
|
69
|
+
:host([theme="dark"]) {
|
|
70
|
+
--_triggerColor: var(
|
|
71
|
+
--nav-menu-trigger-color,
|
|
72
|
+
var(--eun-text-on-inverse-secondary, rgba(255, 255, 255, 0.7))
|
|
73
|
+
);
|
|
74
|
+
--_triggerColorHover: var(
|
|
75
|
+
--nav-menu-trigger-color-hover,
|
|
76
|
+
var(--eun-text-on-inverse, #ffffff)
|
|
77
|
+
);
|
|
78
|
+
--_triggerColorCurrent: var(
|
|
79
|
+
--nav-menu-trigger-color-current,
|
|
80
|
+
color-mix(in srgb, var(--eun-color-primary-500, #3d6fff) 55%, #ffffff)
|
|
81
|
+
);
|
|
82
|
+
--_focusOutline: var(
|
|
83
|
+
--nav-menu-focus-outline-color,
|
|
84
|
+
var(--eun-text-on-inverse, #ffffff)
|
|
85
|
+
);
|
|
86
|
+
--_panelBackground: var(
|
|
87
|
+
--nav-menu-panel-background,
|
|
88
|
+
var(--eun-surface-inverse, #0b1620)
|
|
89
|
+
);
|
|
90
|
+
--_panelBorderColor: var(
|
|
91
|
+
--nav-menu-panel-border-color,
|
|
92
|
+
rgba(255, 255, 255, 0.12)
|
|
93
|
+
);
|
|
94
|
+
--_linkColor: var(
|
|
95
|
+
--nav-menu-link-color,
|
|
96
|
+
var(--eun-text-on-inverse-secondary, rgba(255, 255, 255, 0.7))
|
|
97
|
+
);
|
|
98
|
+
--_linkColorHover: var(
|
|
99
|
+
--nav-menu-link-color-hover,
|
|
100
|
+
var(--eun-text-on-inverse, #ffffff)
|
|
101
|
+
);
|
|
102
|
+
--_linkColorCurrent: var(
|
|
103
|
+
--nav-menu-link-color-current,
|
|
104
|
+
color-mix(in srgb, var(--eun-color-primary-500, #3d6fff) 55%, #ffffff)
|
|
105
|
+
);
|
|
106
|
+
--_linkBackgroundHover: var(
|
|
107
|
+
--nav-menu-link-background-hover,
|
|
108
|
+
rgba(255, 255, 255, 0.08)
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
#trigger {
|
|
113
|
+
--icon-color: currentColor;
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: var(--nav-menu-trigger-gap, var(--eun-space-xs, 4px));
|
|
117
|
+
margin: 0;
|
|
118
|
+
padding: var(
|
|
119
|
+
--nav-menu-trigger-padding,
|
|
120
|
+
var(--nav-menu-trigger-padding-block, var(--eun-space-xs, 4px))
|
|
121
|
+
var(--nav-menu-trigger-padding-inline, var(--eun-space-xs, 4px))
|
|
122
|
+
);
|
|
123
|
+
border: none;
|
|
124
|
+
border-radius: var(
|
|
125
|
+
--nav-menu-trigger-border-radius,
|
|
126
|
+
var(--eun-border-radius-m, 8px)
|
|
127
|
+
);
|
|
128
|
+
background: var(--nav-menu-trigger-background, transparent);
|
|
129
|
+
box-shadow: var(--nav-menu-trigger-shadow, none);
|
|
130
|
+
color: var(--_triggerColor);
|
|
131
|
+
font: inherit;
|
|
132
|
+
font-size: var(--nav-menu-trigger-font-size, inherit);
|
|
133
|
+
font-weight: var(--nav-menu-trigger-font-weight, inherit);
|
|
134
|
+
line-height: inherit;
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
outline: 2px solid transparent;
|
|
138
|
+
outline-offset: 2px;
|
|
139
|
+
transition:
|
|
140
|
+
color var(--_duration) var(--_easing),
|
|
141
|
+
background-color var(--_duration) var(--_easing),
|
|
142
|
+
box-shadow var(--_duration) var(--_easing),
|
|
143
|
+
outline-color var(--_duration) var(--_easing);
|
|
144
|
+
}
|
|
145
|
+
#trigger.current {
|
|
146
|
+
color: var(--_triggerColorCurrent);
|
|
147
|
+
}
|
|
148
|
+
#trigger:hover,
|
|
149
|
+
#trigger:focus-visible,
|
|
150
|
+
:host([open]) #trigger {
|
|
151
|
+
color: var(--_triggerColorHover);
|
|
152
|
+
background: var(
|
|
153
|
+
--nav-menu-trigger-background-hover,
|
|
154
|
+
var(--nav-menu-trigger-background, transparent)
|
|
155
|
+
);
|
|
156
|
+
box-shadow: var(
|
|
157
|
+
--nav-menu-trigger-shadow-hover,
|
|
158
|
+
var(--nav-menu-trigger-shadow, none)
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
#trigger:focus-visible {
|
|
162
|
+
outline-color: var(--_focusOutline);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.icon,
|
|
166
|
+
slot[name="icon"]::slotted(*),
|
|
167
|
+
slot[name="chevron"]::slotted(*) {
|
|
168
|
+
--icon-size: var(--nav-menu-icon-size, 1.25em);
|
|
169
|
+
flex-shrink: 0;
|
|
170
|
+
}
|
|
171
|
+
slot[name="icon"] {
|
|
172
|
+
display: inline-flex;
|
|
173
|
+
}
|
|
174
|
+
slot[name="icon"].hidden {
|
|
175
|
+
display: none;
|
|
176
|
+
}
|
|
177
|
+
#chevron {
|
|
178
|
+
display: inline-flex;
|
|
179
|
+
transition: transform var(--_duration) var(--_easing);
|
|
180
|
+
}
|
|
181
|
+
:host([open]) #chevron {
|
|
182
|
+
transform: rotate(var(--nav-menu-chevron-rotation, 180deg));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
#panel {
|
|
186
|
+
--_offset: var(--nav-menu-offset, var(--eun-space-xs, 4px));
|
|
187
|
+
--_shift: calc(-1 * var(--eun-space-xs, 4px));
|
|
188
|
+
scroll-margin-top: var(--_offset);
|
|
189
|
+
position: fixed;
|
|
190
|
+
inset: auto;
|
|
191
|
+
top: var(--_anchorTop, 0);
|
|
192
|
+
left: var(--_anchorLeft, 0);
|
|
193
|
+
box-sizing: border-box;
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
gap: var(--nav-menu-panel-gap, 0);
|
|
197
|
+
min-width: max(
|
|
198
|
+
var(--_anchorWidth, 0px),
|
|
199
|
+
var(--nav-menu-panel-min-width, 200px)
|
|
200
|
+
);
|
|
201
|
+
max-height: var(--nav-menu-panel-max-height, 70vh);
|
|
202
|
+
overflow-y: auto;
|
|
203
|
+
margin: 0;
|
|
204
|
+
padding: var(--nav-menu-panel-padding, var(--eun-space-xs, 4px));
|
|
205
|
+
list-style: none;
|
|
206
|
+
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
207
|
+
font-size: var(--eun-font-size-s, 14px);
|
|
208
|
+
color: var(--_linkColor);
|
|
209
|
+
background: var(--_panelBackground);
|
|
210
|
+
border: var(--eun-border-width-s, 1px) solid var(--_panelBorderColor);
|
|
211
|
+
border-radius: var(
|
|
212
|
+
--nav-menu-panel-border-radius,
|
|
213
|
+
var(--eun-border-radius-m, 8px)
|
|
214
|
+
);
|
|
215
|
+
box-shadow: var(
|
|
216
|
+
--nav-menu-panel-shadow,
|
|
217
|
+
var(
|
|
218
|
+
--eun-shadow-m,
|
|
219
|
+
0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
220
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.05)
|
|
221
|
+
)
|
|
222
|
+
);
|
|
223
|
+
opacity: 0;
|
|
224
|
+
translate: 0 var(--_shift);
|
|
225
|
+
transition:
|
|
226
|
+
opacity var(--_duration) var(--_easing),
|
|
227
|
+
translate var(--_duration) var(--_easing),
|
|
228
|
+
display var(--_duration) allow-discrete,
|
|
229
|
+
overlay var(--_duration) allow-discrete;
|
|
230
|
+
}
|
|
231
|
+
#panel[data-placement="top"] {
|
|
232
|
+
--_shift: var(--eun-space-xs, 4px);
|
|
233
|
+
}
|
|
234
|
+
#panel:not(:popover-open) {
|
|
235
|
+
display: none;
|
|
236
|
+
}
|
|
237
|
+
#panel:popover-open {
|
|
238
|
+
opacity: 1;
|
|
239
|
+
translate: 0 0;
|
|
240
|
+
}
|
|
241
|
+
@starting-style {
|
|
242
|
+
#panel:popover-open {
|
|
243
|
+
opacity: 0;
|
|
244
|
+
translate: 0 var(--_shift);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
#panel li {
|
|
248
|
+
display: block;
|
|
249
|
+
margin: 0;
|
|
250
|
+
padding: 0;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
${linkBlockRule(unsafeCSS("#panel ::slotted(eun-link)"))}
|
|
254
|
+
|
|
255
|
+
#panel ::slotted(eun-link) {
|
|
256
|
+
--link-color: var(--_linkColor);
|
|
257
|
+
--link-color-hover: var(--_linkColorHover);
|
|
258
|
+
--link-color-focus: var(--_linkColorHover);
|
|
259
|
+
--link-color-visited: var(--_linkColor);
|
|
260
|
+
--link-color-visited-hover: var(--_linkColorHover);
|
|
261
|
+
--link-color-current: var(--_linkColorCurrent);
|
|
262
|
+
--link-focus-outline-color: var(--_focusOutline);
|
|
263
|
+
--link-text-decoration: none;
|
|
264
|
+
--link-background-hover: var(--_linkBackgroundHover);
|
|
265
|
+
--link-background-focus: var(--_linkBackgroundHover);
|
|
266
|
+
--link-padding: var(
|
|
267
|
+
--nav-menu-link-padding,
|
|
268
|
+
var(--eun-space-s, 8px) var(--eun-space-m, 16px)
|
|
269
|
+
);
|
|
270
|
+
--link-border-radius: var(
|
|
271
|
+
--nav-menu-link-border-radius,
|
|
272
|
+
var(--eun-border-radius-s, 4px)
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
#panel ::slotted(a) {
|
|
277
|
+
display: block;
|
|
278
|
+
padding: var(
|
|
279
|
+
--nav-menu-link-padding,
|
|
280
|
+
var(--eun-space-s, 8px) var(--eun-space-m, 16px)
|
|
281
|
+
);
|
|
282
|
+
border-radius: var(
|
|
283
|
+
--nav-menu-link-border-radius,
|
|
284
|
+
var(--eun-border-radius-s, 4px)
|
|
285
|
+
);
|
|
286
|
+
color: var(--_linkColor);
|
|
287
|
+
text-decoration: none;
|
|
288
|
+
white-space: nowrap;
|
|
289
|
+
outline: 2px solid transparent;
|
|
290
|
+
outline-offset: -2px;
|
|
291
|
+
transition:
|
|
292
|
+
color var(--_duration) var(--_easing),
|
|
293
|
+
background-color var(--_duration) var(--_easing),
|
|
294
|
+
outline-color var(--_duration) var(--_easing);
|
|
295
|
+
}
|
|
296
|
+
#panel ::slotted(a:hover),
|
|
297
|
+
#panel ::slotted(a:focus-visible) {
|
|
298
|
+
color: var(--_linkColorHover);
|
|
299
|
+
background: var(--_linkBackgroundHover);
|
|
300
|
+
}
|
|
301
|
+
#panel ::slotted(a:focus-visible) {
|
|
302
|
+
outline-color: var(--_focusOutline);
|
|
303
|
+
}
|
|
304
|
+
#panel ::slotted(a[aria-current="page"]) {
|
|
305
|
+
color: var(--_linkColorCurrent);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@supports (anchor-name: --a) {
|
|
309
|
+
#panel[data-native-anchor] {
|
|
310
|
+
top: auto;
|
|
311
|
+
left: auto;
|
|
312
|
+
position-area: block-end span-inline-end;
|
|
313
|
+
position-try-fallbacks:
|
|
314
|
+
flip-block,
|
|
315
|
+
flip-inline,
|
|
316
|
+
flip-block flip-inline;
|
|
317
|
+
margin-block-start: var(--_offset);
|
|
318
|
+
min-width: max(
|
|
319
|
+
anchor-size(width),
|
|
320
|
+
var(--nav-menu-panel-min-width, 200px)
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
:host([placement="bottom"]) #panel[data-native-anchor] {
|
|
324
|
+
position-area: block-end;
|
|
325
|
+
}
|
|
326
|
+
:host([placement="bottom-end"]) #panel[data-native-anchor] {
|
|
327
|
+
position-area: block-end span-inline-start;
|
|
328
|
+
}
|
|
329
|
+
:host([placement^="top"]) #panel[data-native-anchor] {
|
|
330
|
+
margin-block: 0 var(--_offset);
|
|
331
|
+
}
|
|
332
|
+
:host([placement="top-start"]) #panel[data-native-anchor] {
|
|
333
|
+
position-area: block-start span-inline-end;
|
|
334
|
+
}
|
|
335
|
+
:host([placement="top"]) #panel[data-native-anchor] {
|
|
336
|
+
position-area: block-start;
|
|
337
|
+
}
|
|
338
|
+
:host([placement="top-end"]) #panel[data-native-anchor] {
|
|
339
|
+
position-area: block-start span-inline-start;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
@media (prefers-reduced-motion: reduce) {
|
|
344
|
+
#trigger,
|
|
345
|
+
#chevron,
|
|
346
|
+
#panel,
|
|
347
|
+
#panel ::slotted(a) {
|
|
348
|
+
transition: none;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
`;
|
|
352
|
+
export const navMenuStyles = base;
|
|
@@ -86,7 +86,7 @@ const base = css `
|
|
|
86
86
|
var(--eun-border-radius-m, 8px)
|
|
87
87
|
);
|
|
88
88
|
background: transparent;
|
|
89
|
-
color: var(--pagination-item-color, var(--eun-text-secondary, #
|
|
89
|
+
color: var(--pagination-item-color, var(--eun-text-secondary, #666e8a));
|
|
90
90
|
outline: 2px solid transparent;
|
|
91
91
|
outline-offset: 2px;
|
|
92
92
|
user-select: none;
|
|
@@ -149,7 +149,7 @@ const base = css `
|
|
|
149
149
|
cursor: default;
|
|
150
150
|
}
|
|
151
151
|
span.ellipsis {
|
|
152
|
-
color: var(--pagination-ellipsis-color, var(--eun-text-secondary, #
|
|
152
|
+
color: var(--pagination-ellipsis-color, var(--eun-text-secondary, #666e8a));
|
|
153
153
|
cursor: default;
|
|
154
154
|
user-select: none;
|
|
155
155
|
}
|
|
@@ -52,7 +52,7 @@ declare const EunomiaSidebar_base: import("../../../utils/constructor.type.js").
|
|
|
52
52
|
* @prop {'mobile' | 'tablet' | 'laptop' | 'desktop'} hideBelow - Hides the sidebar below this breakpoint, for a layout where another navigation takes over on small screens, such as the toolbar's mobile panel. Also applies before the component loads when sidebar-ssr.css is linked
|
|
53
53
|
* @attr {'mobile' | 'tablet' | 'laptop' | 'desktop'} hide-below - Hides the sidebar below this breakpoint
|
|
54
54
|
* @prop {'light' | 'dark'} [theme='light'] - The sidebar's color scheme. Dark uses the inverse surface, for a sidebar on a dark background
|
|
55
|
-
* @prop {boolean} [collapsible=
|
|
55
|
+
* @prop {boolean} [collapsible=false] - Whether the built-in toggle button renders at all. The collapse, expand, and toggle methods still work regardless, for driving collapse from elsewhere, such as a page header menu button. Leave it off to rely on resizable alone
|
|
56
56
|
* @prop {'edge' | 'inline'} [togglePlacement='edge'] - Where the built-in toggle button renders: edge floats on the border, and inline sits inside the panel, pinned below the body and footer
|
|
57
57
|
* @attr {'edge' | 'inline'} [toggle-placement='edge'] - Where the built-in toggle button renders: edge floats on the border, and inline sits inside the panel, pinned below the body and footer
|
|
58
58
|
* @prop {'mini' | 'hidden'} [collapseMode='mini'] - The shape the collapsed state takes
|
|
@@ -62,7 +62,7 @@ declare const EunomiaSidebar_base: import("../../../utils/constructor.type.js").
|
|
|
62
62
|
* @attr {string} [expand-label] - The accessible label of the toggle button while collapsed. Defaults to the localized string for the current locale (English: "Expand sidebar")
|
|
63
63
|
* @prop {string} [collapseLabel] - The accessible label of the toggle button while expanded. Defaults to the localized string for the current locale (English: "Collapse sidebar")
|
|
64
64
|
* @attr {string} [collapse-label] - The accessible label of the toggle button while expanded. Defaults to the localized string for the current locale (English: "Collapse sidebar")
|
|
65
|
-
* @prop {boolean} [resizable=
|
|
65
|
+
* @prop {boolean} [resizable=false] - Whether the border can be dragged, or, once focused, adjusted with arrow keys, to resize the panel
|
|
66
66
|
* @prop {string} [resizeLabel] - The accessible label of the drag-to-resize border. Defaults to the localized string for the current locale (English: "Resize sidebar")
|
|
67
67
|
* @attr {string} [resize-label] - The accessible label of the drag-to-resize border. Defaults to the localized string for the current locale (English: "Resize sidebar")
|
|
68
68
|
* @fires {ChangeEvent} eunchange - Fired whenever collapsed changes, including as a result of dragging or keyboard-resizing below the mini width. A collapse reached this way takes the shape set by collapseMode, and expanding again returns to --sidebar-width
|
|
@@ -78,6 +78,7 @@ declare const EunomiaSidebar_base: import("../../../utils/constructor.type.js").
|
|
|
78
78
|
* @cssprop [--sidebar-gap] - Sets the gap inside the header and footer rows
|
|
79
79
|
* @cssprop [--sidebar-toggle-color] - Sets the color of the toggle button
|
|
80
80
|
* @cssprop [--sidebar-toggle-background-hover] - Sets the background color of the toggle button on hover
|
|
81
|
+
* @cssprop [--sidebar-focus-outline-color] - Sets the keyboard focus color of the toggle button's outline and of the resize handle
|
|
81
82
|
* @cssprop [--sidebar-resize-handle-delay] - Sets how long the pointer must rest on the border before the resize handle shows. Set to 0 to show it right away
|
|
82
83
|
* @cssprop [--sidebar-transition-duration] - Sets the duration of the collapse and resize transition
|
|
83
84
|
* @element eun-sidebar
|
|
@@ -122,11 +123,9 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
122
123
|
* Whether the built-in toggle button renders at all (see `togglePlacement`
|
|
123
124
|
* for where) ; `collapse()`/`expand()`/`toggleCollapse()` work regardless,
|
|
124
125
|
* for driving collapse from elsewhere (e.g. a page header menu button) —
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* defaultTrueConverter}).
|
|
129
|
-
* @default true
|
|
126
|
+
* leave it off to rely on `resizable` (dragging the border past the mini
|
|
127
|
+
* floor) alone.
|
|
128
|
+
* @default false
|
|
130
129
|
*/
|
|
131
130
|
collapsible: boolean;
|
|
132
131
|
/**
|
|
@@ -164,9 +163,8 @@ export declare class EunomiaSidebar extends EunomiaSidebar_base {
|
|
|
164
163
|
* Whether the border can be dragged (or, once focused, adjusted with the
|
|
165
164
|
* arrow keys) to resize the panel between `--sidebar-mini-width` and
|
|
166
165
|
* `--sidebar-max-width`. Independent of `collapsible`, which only
|
|
167
|
-
* controls the discrete toggle button.
|
|
168
|
-
*
|
|
169
|
-
* @default true
|
|
166
|
+
* controls the discrete toggle button.
|
|
167
|
+
* @default false
|
|
170
168
|
*/
|
|
171
169
|
resizable: boolean;
|
|
172
170
|
/**
|
|
@@ -11,7 +11,6 @@ import { ChangeEvent } from "../../../events/change.event.js";
|
|
|
11
11
|
import { sidebarStyles } from "./sidebar.styles.js";
|
|
12
12
|
import { LocalizableMixin } from "../../../mixins/localizable.mixin.js";
|
|
13
13
|
import { cssTimeToMs } from "../../../utils/motion.utils.js";
|
|
14
|
-
import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
|
|
15
14
|
/**
|
|
16
15
|
* Tag name of the sidebar component.
|
|
17
16
|
*/
|
|
@@ -46,7 +45,7 @@ export const EunomiaSidebarTagName = "eun-sidebar";
|
|
|
46
45
|
* @prop {'mobile' | 'tablet' | 'laptop' | 'desktop'} hideBelow - Hides the sidebar below this breakpoint, for a layout where another navigation takes over on small screens, such as the toolbar's mobile panel. Also applies before the component loads when sidebar-ssr.css is linked
|
|
47
46
|
* @attr {'mobile' | 'tablet' | 'laptop' | 'desktop'} hide-below - Hides the sidebar below this breakpoint
|
|
48
47
|
* @prop {'light' | 'dark'} [theme='light'] - The sidebar's color scheme. Dark uses the inverse surface, for a sidebar on a dark background
|
|
49
|
-
* @prop {boolean} [collapsible=
|
|
48
|
+
* @prop {boolean} [collapsible=false] - Whether the built-in toggle button renders at all. The collapse, expand, and toggle methods still work regardless, for driving collapse from elsewhere, such as a page header menu button. Leave it off to rely on resizable alone
|
|
50
49
|
* @prop {'edge' | 'inline'} [togglePlacement='edge'] - Where the built-in toggle button renders: edge floats on the border, and inline sits inside the panel, pinned below the body and footer
|
|
51
50
|
* @attr {'edge' | 'inline'} [toggle-placement='edge'] - Where the built-in toggle button renders: edge floats on the border, and inline sits inside the panel, pinned below the body and footer
|
|
52
51
|
* @prop {'mini' | 'hidden'} [collapseMode='mini'] - The shape the collapsed state takes
|
|
@@ -56,7 +55,7 @@ export const EunomiaSidebarTagName = "eun-sidebar";
|
|
|
56
55
|
* @attr {string} [expand-label] - The accessible label of the toggle button while collapsed. Defaults to the localized string for the current locale (English: "Expand sidebar")
|
|
57
56
|
* @prop {string} [collapseLabel] - The accessible label of the toggle button while expanded. Defaults to the localized string for the current locale (English: "Collapse sidebar")
|
|
58
57
|
* @attr {string} [collapse-label] - The accessible label of the toggle button while expanded. Defaults to the localized string for the current locale (English: "Collapse sidebar")
|
|
59
|
-
* @prop {boolean} [resizable=
|
|
58
|
+
* @prop {boolean} [resizable=false] - Whether the border can be dragged, or, once focused, adjusted with arrow keys, to resize the panel
|
|
60
59
|
* @prop {string} [resizeLabel] - The accessible label of the drag-to-resize border. Defaults to the localized string for the current locale (English: "Resize sidebar")
|
|
61
60
|
* @attr {string} [resize-label] - The accessible label of the drag-to-resize border. Defaults to the localized string for the current locale (English: "Resize sidebar")
|
|
62
61
|
* @fires {ChangeEvent} eunchange - Fired whenever collapsed changes, including as a result of dragging or keyboard-resizing below the mini width. A collapse reached this way takes the shape set by collapseMode, and expanding again returns to --sidebar-width
|
|
@@ -72,6 +71,7 @@ export const EunomiaSidebarTagName = "eun-sidebar";
|
|
|
72
71
|
* @cssprop [--sidebar-gap] - Sets the gap inside the header and footer rows
|
|
73
72
|
* @cssprop [--sidebar-toggle-color] - Sets the color of the toggle button
|
|
74
73
|
* @cssprop [--sidebar-toggle-background-hover] - Sets the background color of the toggle button on hover
|
|
74
|
+
* @cssprop [--sidebar-focus-outline-color] - Sets the keyboard focus color of the toggle button's outline and of the resize handle
|
|
75
75
|
* @cssprop [--sidebar-resize-handle-delay] - Sets how long the pointer must rest on the border before the resize handle shows. Set to 0 to show it right away
|
|
76
76
|
* @cssprop [--sidebar-transition-duration] - Sets the duration of the collapse and resize transition
|
|
77
77
|
* @element eun-sidebar
|
|
@@ -96,13 +96,11 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
|
|
|
96
96
|
* Whether the built-in toggle button renders at all (see `togglePlacement`
|
|
97
97
|
* for where) ; `collapse()`/`expand()`/`toggleCollapse()` work regardless,
|
|
98
98
|
* for driving collapse from elsewhere (e.g. a page header menu button) —
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* defaultTrueConverter}).
|
|
103
|
-
* @default true
|
|
99
|
+
* leave it off to rely on `resizable` (dragging the border past the mini
|
|
100
|
+
* floor) alone.
|
|
101
|
+
* @default false
|
|
104
102
|
*/
|
|
105
|
-
this.collapsible =
|
|
103
|
+
this.collapsible = false;
|
|
106
104
|
/**
|
|
107
105
|
* Where the built-in toggle button renders : `edge` floats on the
|
|
108
106
|
* border, vertically centered — `inline` sits inside the panel instead,
|
|
@@ -128,11 +126,10 @@ let EunomiaSidebar = class EunomiaSidebar extends LocalizableMixin(LitElement) {
|
|
|
128
126
|
* Whether the border can be dragged (or, once focused, adjusted with the
|
|
129
127
|
* arrow keys) to resize the panel between `--sidebar-mini-width` and
|
|
130
128
|
* `--sidebar-max-width`. Independent of `collapsible`, which only
|
|
131
|
-
* controls the discrete toggle button.
|
|
132
|
-
*
|
|
133
|
-
* @default true
|
|
129
|
+
* controls the discrete toggle button.
|
|
130
|
+
* @default false
|
|
134
131
|
*/
|
|
135
|
-
this.resizable =
|
|
132
|
+
this.resizable = false;
|
|
136
133
|
/**
|
|
137
134
|
* The panel width, in px, right before the current drag-resize started.
|
|
138
135
|
* @internal
|
|
@@ -748,7 +745,7 @@ __decorate([
|
|
|
748
745
|
property()
|
|
749
746
|
], EunomiaSidebar.prototype, "heading", void 0);
|
|
750
747
|
__decorate([
|
|
751
|
-
property({
|
|
748
|
+
property({ type: Boolean })
|
|
752
749
|
], EunomiaSidebar.prototype, "collapsible", void 0);
|
|
753
750
|
__decorate([
|
|
754
751
|
property({ reflect: true, attribute: "toggle-placement", useDefault: true })
|
|
@@ -766,7 +763,7 @@ __decorate([
|
|
|
766
763
|
property({ attribute: "collapse-label" })
|
|
767
764
|
], EunomiaSidebar.prototype, "collapseLabel", void 0);
|
|
768
765
|
__decorate([
|
|
769
|
-
property({
|
|
766
|
+
property({ type: Boolean })
|
|
770
767
|
], EunomiaSidebar.prototype, "resizable", void 0);
|
|
771
768
|
__decorate([
|
|
772
769
|
property({ attribute: "resize-label" })
|
|
@@ -31,7 +31,7 @@ const base = css `
|
|
|
31
31
|
);
|
|
32
32
|
--_toggleColor: var(
|
|
33
33
|
--sidebar-toggle-color,
|
|
34
|
-
var(--eun-text-secondary, #
|
|
34
|
+
var(--eun-text-secondary, #666e8a)
|
|
35
35
|
);
|
|
36
36
|
--_toggleBackgroundHover: var(
|
|
37
37
|
--sidebar-toggle-background-hover,
|
|
@@ -155,7 +155,10 @@ const base = css `
|
|
|
155
155
|
#resize-handle.armed,
|
|
156
156
|
#resize-handle:focus-visible {
|
|
157
157
|
cursor: ew-resize;
|
|
158
|
-
background: var(
|
|
158
|
+
background: var(
|
|
159
|
+
--sidebar-focus-outline-color,
|
|
160
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
161
|
+
);
|
|
159
162
|
opacity: 0.35;
|
|
160
163
|
transition: background-color var(--eun-duration-s, 150ms)
|
|
161
164
|
var(--eun-easing-default, ease);
|
|
@@ -243,12 +246,18 @@ const base = css `
|
|
|
243
246
|
}
|
|
244
247
|
|
|
245
248
|
#collapse-toggle:focus-visible {
|
|
246
|
-
outline-color: var(
|
|
249
|
+
outline-color: var(
|
|
250
|
+
--sidebar-focus-outline-color,
|
|
251
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
252
|
+
);
|
|
247
253
|
outline-offset: 1px;
|
|
248
254
|
}
|
|
249
255
|
#collapse-toggle.inline:focus-visible {
|
|
250
256
|
outline-offset: -2px;
|
|
251
|
-
outline-color: var(
|
|
257
|
+
outline-color: var(
|
|
258
|
+
--sidebar-focus-outline-color,
|
|
259
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
260
|
+
);
|
|
252
261
|
border-start-start-radius: var(--eun-border-radius-m, 8px);
|
|
253
262
|
border-start-end-radius: var(--eun-border-radius-m, 8px);
|
|
254
263
|
background: var(--_toggleBackgroundHover);
|
|
@@ -106,7 +106,7 @@ export const stepStyles = css `
|
|
|
106
106
|
--stepper-indicator-background,
|
|
107
107
|
var(--eun-content-hover, #edeff0)
|
|
108
108
|
);
|
|
109
|
-
color: var(--stepper-indicator-color, var(--eun-text-secondary, #
|
|
109
|
+
color: var(--stepper-indicator-color, var(--eun-text-secondary, #666e8a));
|
|
110
110
|
font-size: var(
|
|
111
111
|
--stepper-indicator-font-size,
|
|
112
112
|
var(--eun-font-size-xs, 12px)
|
|
@@ -185,7 +185,7 @@ export const stepStyles = css `
|
|
|
185
185
|
--stepper-description-font-size,
|
|
186
186
|
var(--eun-font-size-xs, 12px)
|
|
187
187
|
);
|
|
188
|
-
color: var(--stepper-description-color, var(--eun-text-secondary, #
|
|
188
|
+
color: var(--stepper-description-color, var(--eun-text-secondary, #666e8a));
|
|
189
189
|
}
|
|
190
190
|
.description[hidden] {
|
|
191
191
|
display: none;
|
|
@@ -80,11 +80,11 @@ declare const EunomiaStepper_base: import("../../../utils/constructor.type.js").
|
|
|
80
80
|
*
|
|
81
81
|
* Whether, and how far, someone can jump between steps by activating them
|
|
82
82
|
* directly is controlled by linear and each step's own disabled setting.
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
83
|
+
* By default every non-disabled step is freely reachable in any order.
|
|
84
|
+
* With linear, only steps before activeStep are reachable: revisiting a
|
|
85
|
+
* past step is always allowed, while skipping ahead of the current one is
|
|
86
|
+
* not, since that's exactly the case where something isn't filled in
|
|
87
|
+
* yet. Disabled on the stepper itself disables
|
|
88
88
|
* every step's control the same way an individual step's own disabled
|
|
89
89
|
* does, leaving a read-only progress summary with no navigation at all,
|
|
90
90
|
* the current step still rendered as non-interactive text either way.
|
|
@@ -94,11 +94,11 @@ declare const EunomiaStepper_base: import("../../../utils/constructor.type.js").
|
|
|
94
94
|
* @attr {string} [steps='[]'] - The process's steps, as a JSON array
|
|
95
95
|
* @prop {number} [activeStep=0] - The zero-based index of the current step
|
|
96
96
|
* @attr {number} [active-step=0] - The zero-based index of the current step
|
|
97
|
-
* @prop {number} [activeSubstep] - The zero-based index, into the active step's substeps, of the current substep. Meaningless when that step has no substeps
|
|
98
|
-
* @attr {number} [active-substep] - The zero-based index, into the active step's substeps, of the current substep. Meaningless when that step has no substeps
|
|
97
|
+
* @prop {number} [activeSubstep] - The zero-based index, into the active step's substeps, of the current substep, bounded to the last one. Meaningless when that step has no substeps
|
|
98
|
+
* @attr {number} [active-substep] - The zero-based index, into the active step's substeps, of the current substep, bounded to the last one. Meaningless when that step has no substeps
|
|
99
99
|
* @prop {'horizontal' | 'vertical'} [orientation='horizontal'] - The numbered display's layout direction. Has no effect on the progress variant
|
|
100
100
|
* @prop {'numbered' | 'progress'} [variant='numbered'] - Which of the two displays to render
|
|
101
|
-
* @prop {boolean} [linear=
|
|
101
|
+
* @prop {boolean} [linear=false] - Restricts direct navigation to steps before activeStep. Left off, any non-disabled step can be reached in any order
|
|
102
102
|
* @prop {boolean} [disabled=false] - Disables every step's control, leaving a read-only progress summary with no navigation at all, the same way an individual step's own disabled does
|
|
103
103
|
* @attr {string} [aria-label] - The accessible label for the navigation landmark. Numbered display only. Defaults to the localized string for the current locale (English: "Progress")
|
|
104
104
|
* @fires {StepChangeEvent} eunstepchange - Fired with the requested step whenever a reachable step is activated. ActiveStep and activeSubstep are never updated internally
|
|
@@ -174,11 +174,9 @@ export declare class EunomiaStepper extends EunomiaStepper_base {
|
|
|
174
174
|
*/
|
|
175
175
|
variant: EunomiaStepperVariant;
|
|
176
176
|
/**
|
|
177
|
-
* Restricts direct navigation to steps before {@link activeStep}
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* non-`disabled` step in any order.
|
|
181
|
-
* @default true
|
|
177
|
+
* Restricts direct navigation to steps before {@link activeStep}. Left
|
|
178
|
+
* off, any non-`disabled` step can be reached in any order.
|
|
179
|
+
* @default false
|
|
182
180
|
*/
|
|
183
181
|
linear: boolean;
|
|
184
182
|
/**
|
|
@@ -271,6 +269,16 @@ export declare class EunomiaStepper extends EunomiaStepper_base {
|
|
|
271
269
|
* @private
|
|
272
270
|
*/
|
|
273
271
|
private renderIndicatorContent;
|
|
272
|
+
/**
|
|
273
|
+
* {@link activeSubstep}, bounded to the active step's `substeps` : an
|
|
274
|
+
* index past the last substep reads as the last one, a negative one as
|
|
275
|
+
* the first, and an unset or non-numeric one as none.
|
|
276
|
+
*
|
|
277
|
+
* @param substeps the active step's `substeps`.
|
|
278
|
+
* @returns the bounded index, or `undefined`.
|
|
279
|
+
* @private
|
|
280
|
+
*/
|
|
281
|
+
private currentSubstepIndex;
|
|
274
282
|
/**
|
|
275
283
|
* Renders the current step's substep-progress ring : purely decorative
|
|
276
284
|
* (`aria-hidden`, see {@link renderStep} for the accessible text
|
|
@@ -352,5 +360,8 @@ declare global {
|
|
|
352
360
|
interface HTMLElementTagNameMap {
|
|
353
361
|
[EunomiaStepperTagName]: EunomiaStepper;
|
|
354
362
|
}
|
|
363
|
+
interface EunomiaStringAttributeMap {
|
|
364
|
+
[EunomiaStepperTagName]: "steps";
|
|
365
|
+
}
|
|
355
366
|
}
|
|
356
367
|
export {};
|