@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
|
@@ -9,7 +9,6 @@ import { html, LitElement, nothing } from "lit";
|
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
10
|
import { StepChangeEvent } from "../../../events/stepchange.event.js";
|
|
11
11
|
import { stepperStyles } from "./stepper.styles.js";
|
|
12
|
-
import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
|
|
13
12
|
import { LocalizableMixin } from "../../../mixins/localizable.mixin.js";
|
|
14
13
|
/**
|
|
15
14
|
* Tag name of the stepper component.
|
|
@@ -52,11 +51,11 @@ export const EunomiaStepperTagName = "eun-stepper";
|
|
|
52
51
|
*
|
|
53
52
|
* Whether, and how far, someone can jump between steps by activating them
|
|
54
53
|
* directly is controlled by linear and each step's own disabled setting.
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
54
|
+
* By default every non-disabled step is freely reachable in any order.
|
|
55
|
+
* With linear, only steps before activeStep are reachable: revisiting a
|
|
56
|
+
* past step is always allowed, while skipping ahead of the current one is
|
|
57
|
+
* not, since that's exactly the case where something isn't filled in
|
|
58
|
+
* yet. Disabled on the stepper itself disables
|
|
60
59
|
* every step's control the same way an individual step's own disabled
|
|
61
60
|
* does, leaving a read-only progress summary with no navigation at all,
|
|
62
61
|
* the current step still rendered as non-interactive text either way.
|
|
@@ -66,11 +65,11 @@ export const EunomiaStepperTagName = "eun-stepper";
|
|
|
66
65
|
* @attr {string} [steps='[]'] - The process's steps, as a JSON array
|
|
67
66
|
* @prop {number} [activeStep=0] - The zero-based index of the current step
|
|
68
67
|
* @attr {number} [active-step=0] - The zero-based index of the current step
|
|
69
|
-
* @prop {number} [activeSubstep] - The zero-based index, into the active step's substeps, of the current substep. Meaningless when that step has no substeps
|
|
70
|
-
* @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
|
|
68
|
+
* @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
|
|
69
|
+
* @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
|
|
71
70
|
* @prop {'horizontal' | 'vertical'} [orientation='horizontal'] - The numbered display's layout direction. Has no effect on the progress variant
|
|
72
71
|
* @prop {'numbered' | 'progress'} [variant='numbered'] - Which of the two displays to render
|
|
73
|
-
* @prop {boolean} [linear=
|
|
72
|
+
* @prop {boolean} [linear=false] - Restricts direct navigation to steps before activeStep. Left off, any non-disabled step can be reached in any order
|
|
74
73
|
* @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
|
|
75
74
|
* @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")
|
|
76
75
|
* @fires {StepChangeEvent} eunstepchange - Fired with the requested step whenever a reachable step is activated. ActiveStep and activeSubstep are never updated internally
|
|
@@ -135,13 +134,11 @@ let EunomiaStepper = class EunomiaStepper extends LocalizableMixin(LitElement) {
|
|
|
135
134
|
*/
|
|
136
135
|
this.variant = "numbered";
|
|
137
136
|
/**
|
|
138
|
-
* Restricts direct navigation to steps before {@link activeStep}
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* non-`disabled` step in any order.
|
|
142
|
-
* @default true
|
|
137
|
+
* Restricts direct navigation to steps before {@link activeStep}. Left
|
|
138
|
+
* off, any non-`disabled` step can be reached in any order.
|
|
139
|
+
* @default false
|
|
143
140
|
*/
|
|
144
|
-
this.linear =
|
|
141
|
+
this.linear = false;
|
|
145
142
|
/**
|
|
146
143
|
* Disables every step's control (a read-only progress summary with no
|
|
147
144
|
* navigation at all), the same way an individual step's own `disabled`
|
|
@@ -280,6 +277,22 @@ let EunomiaStepper = class EunomiaStepper extends LocalizableMixin(LitElement) {
|
|
|
280
277
|
}
|
|
281
278
|
return `${index + 1}`;
|
|
282
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
* {@link activeSubstep}, bounded to the active step's `substeps` : an
|
|
282
|
+
* index past the last substep reads as the last one, a negative one as
|
|
283
|
+
* the first, and an unset or non-numeric one as none.
|
|
284
|
+
*
|
|
285
|
+
* @param substeps the active step's `substeps`.
|
|
286
|
+
* @returns the bounded index, or `undefined`.
|
|
287
|
+
* @private
|
|
288
|
+
*/
|
|
289
|
+
currentSubstepIndex(substeps) {
|
|
290
|
+
const index = this.activeSubstep;
|
|
291
|
+
if (index === undefined || !Number.isFinite(index) || !substeps.length) {
|
|
292
|
+
return undefined;
|
|
293
|
+
}
|
|
294
|
+
return Math.min(Math.max(Math.trunc(index), 0), substeps.length - 1);
|
|
295
|
+
}
|
|
283
296
|
/**
|
|
284
297
|
* Renders the current step's substep-progress ring : purely decorative
|
|
285
298
|
* (`aria-hidden`, see {@link renderStep} for the accessible text
|
|
@@ -294,10 +307,8 @@ let EunomiaStepper = class EunomiaStepper extends LocalizableMixin(LitElement) {
|
|
|
294
307
|
* @private
|
|
295
308
|
*/
|
|
296
309
|
renderSubstepRing(substeps) {
|
|
297
|
-
const activeSubstep = this.
|
|
298
|
-
const fraction = substeps.length > 0
|
|
299
|
-
? Math.min(Math.max((activeSubstep + 1) / substeps.length, 0), 1)
|
|
300
|
-
: 0;
|
|
310
|
+
const activeSubstep = this.currentSubstepIndex(substeps) ?? -1;
|
|
311
|
+
const fraction = substeps.length > 0 ? (activeSubstep + 1) / substeps.length : 0;
|
|
301
312
|
const hasError = substeps[activeSubstep]?.state === "error";
|
|
302
313
|
return html `<span
|
|
303
314
|
class=${classMap({ "substep-ring": true, error: hasError })}
|
|
@@ -357,10 +368,12 @@ let EunomiaStepper = class EunomiaStepper extends LocalizableMixin(LitElement) {
|
|
|
357
368
|
// A screen reader alternative to the (aria-hidden) substep-progress
|
|
358
369
|
// ring : visually hidden, not omitted, so the current step's control
|
|
359
370
|
// still announces where the process stands within its substeps.
|
|
360
|
-
const
|
|
371
|
+
const substepIndex = isCurrent
|
|
372
|
+
? this.currentSubstepIndex(step.substeps ?? [])
|
|
373
|
+
: undefined;
|
|
374
|
+
const substep = substepIndex !== undefined
|
|
361
375
|
? html `<span class="sr-only"
|
|
362
|
-
|
|
363
|
-
${step.substeps[this.activeSubstep]?.label}</span
|
|
376
|
+
>${this.dictionary.stepper.substep(substepIndex + 1, step.substeps.length, step.substeps[substepIndex].label)}</span
|
|
364
377
|
>`
|
|
365
378
|
: nothing;
|
|
366
379
|
let control;
|
|
@@ -513,7 +526,7 @@ __decorate([
|
|
|
513
526
|
property({ reflect: true, useDefault: true })
|
|
514
527
|
], EunomiaStepper.prototype, "variant", void 0);
|
|
515
528
|
__decorate([
|
|
516
|
-
property({
|
|
529
|
+
property({ type: Boolean, reflect: true })
|
|
517
530
|
], EunomiaStepper.prototype, "linear", void 0);
|
|
518
531
|
__decorate([
|
|
519
532
|
property({ type: Boolean, reflect: true })
|
|
@@ -207,7 +207,7 @@ export const stepperStyles = css `
|
|
|
207
207
|
--stepper-indicator-background,
|
|
208
208
|
var(--eun-content-hover, #edeff0)
|
|
209
209
|
);
|
|
210
|
-
color: var(--stepper-indicator-color, var(--eun-text-secondary, #
|
|
210
|
+
color: var(--stepper-indicator-color, var(--eun-text-secondary, #666e8a));
|
|
211
211
|
font-size: var(
|
|
212
212
|
--stepper-indicator-font-size,
|
|
213
213
|
var(--eun-font-size-xs, 12px)
|
|
@@ -328,7 +328,7 @@ export const stepperStyles = css `
|
|
|
328
328
|
--stepper-description-font-size,
|
|
329
329
|
var(--eun-font-size-xs, 12px)
|
|
330
330
|
);
|
|
331
|
-
color: var(--stepper-description-color, var(--eun-text-secondary, #
|
|
331
|
+
color: var(--stepper-description-color, var(--eun-text-secondary, #666e8a));
|
|
332
332
|
}
|
|
333
333
|
.step-control:disabled .label,
|
|
334
334
|
.step-control:disabled .description {
|
|
@@ -730,7 +730,7 @@ __decorate([
|
|
|
730
730
|
property({ reflect: true, useDefault: true })
|
|
731
731
|
], EunomiaTabGroup.prototype, "animation", void 0);
|
|
732
732
|
__decorate([
|
|
733
|
-
property({ type: Boolean, reflect: true })
|
|
733
|
+
property({ type: Boolean, reflect: true, attribute: "hide-indicator" })
|
|
734
734
|
], EunomiaTabGroup.prototype, "hideIndicator", void 0);
|
|
735
735
|
__decorate([
|
|
736
736
|
queryAssignedElements()
|
|
@@ -15,6 +15,20 @@ export type EunomiaToolbarPanelDirection = "top" | "bottom" | "left" | "right";
|
|
|
15
15
|
* The two color schemes the toolbar itself can render in.
|
|
16
16
|
*/
|
|
17
17
|
export type EunomiaToolbarTheme = "light" | "dark";
|
|
18
|
+
/**
|
|
19
|
+
* How start, center, and end share the bar.
|
|
20
|
+
*/
|
|
21
|
+
export type EunomiaToolbarLayout = "centered" | "between";
|
|
22
|
+
/**
|
|
23
|
+
* The value of the toolbar's `eunchange` event : which property changed,
|
|
24
|
+
* and the toolbar's state right after the change.
|
|
25
|
+
*/
|
|
26
|
+
export interface EunomiaToolbarChange {
|
|
27
|
+
property: "open" | "collapsed" | "theme";
|
|
28
|
+
open: boolean;
|
|
29
|
+
collapsed: boolean;
|
|
30
|
+
theme: EunomiaToolbarTheme;
|
|
31
|
+
}
|
|
18
32
|
declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/dialog-surface.mixin.js").DialogSurfaceMixinInterface> & import("../../../utils/constructor.type.js").Constructor<import("../../../mixins/localizable.mixin.js").LocalizableMixinInterface> & typeof LitElement;
|
|
19
33
|
/**
|
|
20
34
|
* A sticky top page toolbar with start, center, and end layout slots, and
|
|
@@ -55,6 +69,7 @@ declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").
|
|
|
55
69
|
* everything behind it, including the logo and any other bar content;
|
|
56
70
|
* the burger is the only thing that stays visible in front of it.
|
|
57
71
|
*
|
|
72
|
+
* @slot [burger-icon] - Replaces both burger icons with a single piece of content, kept in place while the panel opens and closes, so it can animate between the two states itself, styled from the host's own open attribute (eun-toolbar[open]). Takes priority over menu-icon and close-icon
|
|
58
73
|
* @slot [menu-icon] - Replaces the burger's default open icon (an `eun-icon name="menu"`) with any content, shown while the panel is closed. Useful wherever `eun-icon`'s own dynamic SVG resolution doesn't fit, e.g. some bundler setups
|
|
59
74
|
* @slot [close-icon] - Replaces the burger's default close icon (an `eun-icon name="close"`) with any content, shown while the panel is open. See `menu-icon` above
|
|
60
75
|
* @slot start - Left-side content, such as the logo, as a link of your own wrapping an image
|
|
@@ -63,6 +78,7 @@ declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").
|
|
|
63
78
|
* @slot [default] - The mobile slide-in panel's content, opened by the burger button below the mobile breakpoint. Entirely up to the consumer ; never rendered anywhere else
|
|
64
79
|
* @slot skip-links - Custom skip to X links, such as skip to navigation, main content, or footer, replacing the single default skip link built from skipLinkTarget and skipLinkLabel. Accepts plain `a` elements or `eun-link`, styled the same either way, separated by a thin divider drawn between them rather than on either link itself, so it never ends up inside either one's own focus ring. Hidden as a group, revealed as a small panel opening from the top-start corner as soon as focus lands on any of them, staying open while Tab cycles between them. Clicking any of them, default or slotted, also focuses its `href` target directly, on top of the native anchor jump, since that native jump alone doesn't reliably move focus across browsers
|
|
65
80
|
* @prop {'sticky' | 'fixed' | 'static'} [position='sticky'] - How the toolbar is positioned relative to the page
|
|
81
|
+
* @prop {'centered' | 'between'} [layout='centered'] - How start, center, and end share the bar. centered keeps center truly centered on the bar whatever the widths of start and end, while between spaces the three out evenly, like a flexbox space-between
|
|
66
82
|
* @prop {number} [mobileBreakpoint=768] - The viewport width in pixels below which the burger button and its sliding panel become available
|
|
67
83
|
* @attr {number} [mobile-breakpoint=768] - The viewport width in pixels below which the burger button and its sliding panel become available
|
|
68
84
|
* @prop {boolean} [open=false] - Whether the mobile menu panel is open
|
|
@@ -72,8 +88,8 @@ declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").
|
|
|
72
88
|
* @attr {string} panel-size - A custom open size for the mobile panel
|
|
73
89
|
* @prop {string} mobileHide - The bar slots hidden below the mobile breakpoint, as a space-separated list of start, center and end, such as "center end" when their content is repeated in the panel. Applied by toolbar-ssr.css before the upgrade too
|
|
74
90
|
* @attr {string} mobile-hide - The bar slots hidden below the mobile breakpoint, as a space-separated list of start, center and end
|
|
75
|
-
* @prop {boolean} [closeOnBackdrop=
|
|
76
|
-
* @attr {boolean} [close-on-backdrop=
|
|
91
|
+
* @prop {boolean} [closeOnBackdrop=false] - Whether clicking outside the mobile panel closes it
|
|
92
|
+
* @attr {boolean} [close-on-backdrop=false] - Whether clicking outside the mobile panel closes it
|
|
77
93
|
* @prop {string} [menuOpenLabel] - The accessible label of the burger button while the panel is closed. Defaults to the localized string for the current locale (English: "Open menu")
|
|
78
94
|
* @attr {string} [menu-open-label] - The accessible label of the burger button while the panel is closed. Defaults to the localized string for the current locale (English: "Open menu")
|
|
79
95
|
* @prop {string} [menuCloseLabel] - The accessible label of the burger button while the panel is open. Defaults to the localized string for the current locale (English: "Close menu")
|
|
@@ -94,8 +110,10 @@ declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").
|
|
|
94
110
|
* @attr {string} scroll-target - A CSS selector for a custom scroll container to track instead of the page
|
|
95
111
|
* @prop {boolean} [adaptiveTheme=false] - Enables automatic theme switching driven by marked page sections scrolling underneath the bar
|
|
96
112
|
* @attr {boolean} [adaptive-theme=false] - Enables automatic theme switching driven by marked page sections
|
|
97
|
-
* @prop {string} [
|
|
98
|
-
* @attr {string} [adaptive-theme-
|
|
113
|
+
* @prop {string} [adaptiveThemeAttribute='data-toolbar-theme'] - The marker attribute adaptiveTheme reads dark or light from, for a page that already marks its sections with an attribute of its own
|
|
114
|
+
* @attr {string} [adaptive-theme-attribute='data-toolbar-theme'] - The marker attribute adaptive-theme reads dark or light from
|
|
115
|
+
* @prop {string} adaptiveThemeSelector - A selector for the marker elements adaptiveTheme observes, defaulting to every element carrying adaptiveThemeAttribute. Each should carry that attribute set to dark or light
|
|
116
|
+
* @attr {string} adaptive-theme-selector - A selector for the marker elements adaptive-theme observes, defaulting to every element carrying adaptive-theme-attribute
|
|
99
117
|
* @prop {'light' | 'dark'} [theme='light'] - The toolbar's current color scheme. A plain manual switch when adaptiveTheme is off, and driven by the marker observer, though still settable to seed the initial value, when it's on
|
|
100
118
|
* @prop {'light' | 'dark'} [defaultTheme='light'] - The fallback theme used while adaptiveTheme is on and no marked section currently intersects the bar
|
|
101
119
|
* @attr {'light' | 'dark'} [default-theme='light'] - The fallback theme used while adaptive-theme is on and no marked section currently intersects the bar
|
|
@@ -103,7 +121,7 @@ declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").
|
|
|
103
121
|
* @attr {string} skip-link-target - The id of the page's main-content landmark
|
|
104
122
|
* @prop {string} [skipLinkLabel] - The text of the default skip link built from skipLinkTarget. Defaults to the localized string for the current locale (English: "Skip to main content")
|
|
105
123
|
* @attr {string} [skip-link-label] - The text of the default skip link built from skip-link-target. Defaults to the localized string for the current locale (English: "Skip to main content")
|
|
106
|
-
* @fires {ChangeEvent} eunchange - Fired whenever open, collapsed, or, under adaptiveTheme, theme changes
|
|
124
|
+
* @fires {ChangeEvent} eunchange - Fired once whenever open, collapsed, or, under adaptiveTheme, theme changes. Its value holds the property that changed and the current open, collapsed, and theme. On close, it fires once the panel has finished closing and page scroll is released
|
|
107
125
|
* @cssprop [--toolbar-height] - Sets the expanded height of the bar
|
|
108
126
|
* @cssprop [--toolbar-height-collapsed] - Sets the collapsed height of the bar, for collapseOnScroll only
|
|
109
127
|
* @cssprop [--toolbar-padding] - Sets the padding of the bar
|
|
@@ -113,7 +131,10 @@ declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").
|
|
|
113
131
|
* @cssprop [--toolbar-gap-start] - Sets the gap between items inside the start slot, falling back to --toolbar-gap
|
|
114
132
|
* @cssprop [--toolbar-gap-center] - Sets the gap between items inside the center slot, falling back to --toolbar-gap
|
|
115
133
|
* @cssprop [--toolbar-gap-end] - Sets the gap between items inside the end slot, falling back to --toolbar-gap
|
|
134
|
+
* @cssprop [--toolbar-columns] - Sets the grid columns of start, center, and end, overriding the ones set by layout
|
|
116
135
|
* @cssprop [--toolbar-background] - Sets the background color, overriding both light and dark variants below
|
|
136
|
+
* @cssprop [--toolbar-background-at-top] - Sets the background of the bar while transparent-at-top applies, transparent by default
|
|
137
|
+
* @cssprop [--toolbar-backdrop-blur] - Sets a backdrop blur radius for the bar itself, for a frosted glass effect behind a translucent background
|
|
117
138
|
* @cssprop [--toolbar-color] - Sets the text color, overriding both light and dark variants below
|
|
118
139
|
* @cssprop [--toolbar-background-light] - Sets the background color for the light theme
|
|
119
140
|
* @cssprop [--toolbar-color-light] - Sets the text color for the light theme
|
|
@@ -123,6 +144,8 @@ declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").
|
|
|
123
144
|
* @cssprop [--toolbar-shadow] - Sets the shadow of the bar
|
|
124
145
|
* @cssprop [--toolbar-z-index] - Sets the stacking order of the bar
|
|
125
146
|
* @cssprop [--toolbar-transition-duration] - Sets the duration of the collapse, transparency, theme, and panel transitions
|
|
147
|
+
* @cssprop [--toolbar-color-transition-duration] - Sets the duration of the background, text color, border, and shadow transitions of the bar, falling back to --toolbar-transition-duration
|
|
148
|
+
* @cssprop [--toolbar-transition-easing] - Sets the timing function of every transition of the toolbar
|
|
126
149
|
* @cssprop [--toolbar-panel-size] - Sets a custom open size for the mobile panel, also settable through the panel-size attribute
|
|
127
150
|
* @cssprop [--toolbar-panel-background] - Sets the background of the mobile panel, defaulting to a translucent mix of the bar's own background
|
|
128
151
|
* @cssprop [--toolbar-panel-color] - Sets the text color of the mobile panel
|
|
@@ -134,13 +157,24 @@ declare const EunomiaToolbar_base: import("../../../utils/constructor.type.js").
|
|
|
134
157
|
* @cssprop [--toolbar-burger-padding] - Sets the padding around the burger button, defaulting to 0 on the block axis and --toolbar-panel-padding on the inline axis
|
|
135
158
|
* @cssprop [--toolbar-burger-padding-block] - Sets the vertical padding, as one length applied to both sides. Ignored when --toolbar-burger-padding is set
|
|
136
159
|
* @cssprop [--toolbar-burger-padding-inline] - Sets the horizontal padding, as one length applied to both sides. Ignored when --toolbar-burger-padding is set
|
|
160
|
+
* @cssprop [--toolbar-burger-color] - Sets the color of the burger button, defaulting to the bar's text color, or the panel's once open
|
|
161
|
+
* @cssprop [--toolbar-burger-background-hover] - Sets the background of the burger button on hover, defaulting to a light mix of its own color
|
|
162
|
+
* @cssprop [--toolbar-burger-background-active] - Sets the background of the burger button while pressed, defaulting to a light mix of its own color
|
|
137
163
|
* @cssprop [--toolbar-panel-gap] - Sets the gap inside the mobile panel
|
|
138
164
|
* @cssprop [--toolbar-panel-backdrop-blur] - Sets a backdrop blur radius for the mobile panel
|
|
139
165
|
* @cssprop [--toolbar-skip-links-height] - Sets the height of the skip-links bar
|
|
140
166
|
* @cssprop [--toolbar-skip-links-background] - Sets the background of the skip-links bar, defaulting to a darker mix of the bar's background, or of primary-600 in the light theme without --toolbar-background
|
|
141
167
|
* @cssprop [--toolbar-skip-links-color] - Sets the text color of the skip-links bar
|
|
168
|
+
* @cssprop [--toolbar-skip-links-focus-outline-color] - Sets the keyboard focus outline color of the skip links, defaulting to their text color
|
|
169
|
+
* @cssprop [--toolbar-skip-links-background-focus] - Sets the background color of a skip link on keyboard focus
|
|
142
170
|
* @cssprop [--toolbar-skip-links-separator-color] - Sets the color of the divider drawn between skip links
|
|
171
|
+
* @cssprop [--toolbar-skip-links-separator] - Replaces the thin divider drawn between skip links with a glyph, as a CSS content string such as "/"
|
|
143
172
|
* @cssprop [--toolbar-skip-links-gap] - Sets the gap between skip links, with the divider centered in it
|
|
173
|
+
* @cssprop [--toolbar-skip-links-padding-inline] - Sets the horizontal padding of the skip-links bar
|
|
174
|
+
* @cssprop [--toolbar-skip-links-font-size] - Sets the font size of the skip links
|
|
175
|
+
* @cssprop [--toolbar-skip-link-padding] - Sets the padding of each skip link
|
|
176
|
+
* @cssprop [--toolbar-focus-outline-color] - Sets the keyboard focus outline color of the links in the bar
|
|
177
|
+
* @cssprop [--toolbar-link-background-focus] - Sets the background color of an eun-link in the bar on keyboard focus
|
|
144
178
|
* @element eun-toolbar
|
|
145
179
|
*/
|
|
146
180
|
export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
@@ -157,6 +191,13 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
157
191
|
* @default sticky
|
|
158
192
|
*/
|
|
159
193
|
position: EunomiaToolbarPosition;
|
|
194
|
+
/**
|
|
195
|
+
* How start, center, and end share the bar. Reflected, since the layout
|
|
196
|
+
* is pure CSS on the attribute, also matched by `toolbar-ssr.css` before
|
|
197
|
+
* upgrade.
|
|
198
|
+
* @default centered
|
|
199
|
+
*/
|
|
200
|
+
layout: EunomiaToolbarLayout;
|
|
160
201
|
/**
|
|
161
202
|
* Viewport width (px) below which the burger button and its sliding
|
|
162
203
|
* panel become available.
|
|
@@ -187,7 +228,7 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
187
228
|
mobileHide?: string;
|
|
188
229
|
/**
|
|
189
230
|
* Whether clicking outside the mobile panel closes it.
|
|
190
|
-
* @default
|
|
231
|
+
* @default false
|
|
191
232
|
*/
|
|
192
233
|
closeOnBackdrop: boolean;
|
|
193
234
|
/**
|
|
@@ -245,11 +286,16 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
245
286
|
*/
|
|
246
287
|
adaptiveTheme: boolean;
|
|
247
288
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
|
|
289
|
+
* The marker attribute `adaptiveTheme` reads `"dark"` or `"light"` from.
|
|
290
|
+
* @default data-toolbar-theme
|
|
291
|
+
*/
|
|
292
|
+
adaptiveThemeAttribute: string;
|
|
293
|
+
/**
|
|
294
|
+
* Selector for the marker elements `adaptiveTheme` observes, defaulting
|
|
295
|
+
* to every element carrying `adaptiveThemeAttribute` ; each should carry
|
|
296
|
+
* that attribute set to `"dark"` or `"light"`.
|
|
251
297
|
*/
|
|
252
|
-
adaptiveThemeSelector
|
|
298
|
+
adaptiveThemeSelector?: string;
|
|
253
299
|
/**
|
|
254
300
|
* The toolbar's current color scheme. A plain manual switch when
|
|
255
301
|
* `adaptiveTheme` is off ; driven by the marker observer (still settable
|
|
@@ -357,6 +403,23 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
357
403
|
* @internal
|
|
358
404
|
*/
|
|
359
405
|
private readonly intersectingThemeEls;
|
|
406
|
+
/**
|
|
407
|
+
* Marker elements the adaptive-theme observer currently observes.
|
|
408
|
+
* @internal
|
|
409
|
+
*/
|
|
410
|
+
private readonly observedThemeEls;
|
|
411
|
+
/**
|
|
412
|
+
* Watches the document for marker elements being added, removed, or
|
|
413
|
+
* re-marked, so client-side navigation needs no manual refresh.
|
|
414
|
+
* @internal
|
|
415
|
+
*/
|
|
416
|
+
private themeMarkerObserver?;
|
|
417
|
+
/**
|
|
418
|
+
* The pending frame coalescing {@link themeMarkerObserver}'s mutations
|
|
419
|
+
* into a single marker sync.
|
|
420
|
+
* @internal
|
|
421
|
+
*/
|
|
422
|
+
private themeMarkerRafId?;
|
|
360
423
|
/**
|
|
361
424
|
* Lifecycle callback triggered when the component is connected to the
|
|
362
425
|
* DOM. Sets up the `mobile` matchMedia listener and the scroll listener
|
|
@@ -400,8 +463,9 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
400
463
|
* The `updated()` slice handling `adaptiveTheme` : sets up or tears down
|
|
401
464
|
* the marker observer when the mode itself toggles, and re-anchors it
|
|
402
465
|
* when anything its setup depends on changes while already on
|
|
403
|
-
* (`adaptiveThemeSelector`, `collapsed` — the
|
|
404
|
-
* line is measured from — or `scrollTarget` — the
|
|
466
|
+
* (`adaptiveThemeSelector`, `adaptiveThemeAttribute`, `collapsed` — the
|
|
467
|
+
* bar height the trigger line is measured from — or `scrollTarget` — the
|
|
468
|
+
* observer's root).
|
|
405
469
|
*
|
|
406
470
|
* @param changed the changed properties.
|
|
407
471
|
* @private
|
|
@@ -420,12 +484,20 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
420
484
|
*/
|
|
421
485
|
toggle(): void;
|
|
422
486
|
/**
|
|
423
|
-
* Re-queries `adaptiveThemeSelector` and
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
487
|
+
* Re-queries `adaptiveThemeSelector` and syncs the observed markers with
|
|
488
|
+
* the current matches. Marker sections added, removed, or re-marked
|
|
489
|
+
* through their `adaptiveThemeAttribute` are already picked up on their
|
|
490
|
+
* own ; this is left for a change the document watch can't see, such as
|
|
491
|
+
* an element starting to match a custom `adaptiveThemeSelector` through
|
|
492
|
+
* a class.
|
|
427
493
|
*/
|
|
428
494
|
refreshAdaptiveTheme(): void;
|
|
495
|
+
/**
|
|
496
|
+
* The selector matching the marker elements, `adaptiveThemeSelector`
|
|
497
|
+
* when set, every element carrying `adaptiveThemeAttribute` otherwise.
|
|
498
|
+
* @private
|
|
499
|
+
*/
|
|
500
|
+
private get themeMarkerSelector();
|
|
429
501
|
/**
|
|
430
502
|
* (Re)builds the `mobile` matchMedia listener for the current
|
|
431
503
|
* `mobileBreakpoint`, replacing any previous one.
|
|
@@ -493,7 +565,11 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
493
565
|
private currentScrollY;
|
|
494
566
|
/**
|
|
495
567
|
* Recomputes `collapsed`/`atTop` from the current scroll position,
|
|
496
|
-
* dispatching `eunchange` for a genuine `collapsed` transition.
|
|
568
|
+
* dispatching `eunchange` for a genuine `collapsed` transition. Skipped
|
|
569
|
+
* while page scroll is locked (the mobile panel, or any other overlay, is
|
|
570
|
+
* open) : the pinned `<body>` makes `window.scrollY` read `0`, which would
|
|
571
|
+
* otherwise expand the bar and fire `eunchange` for a scroll that never
|
|
572
|
+
* happened. The real position comes back with the unlock.
|
|
497
573
|
* @private
|
|
498
574
|
*/
|
|
499
575
|
private updateScrollState;
|
|
@@ -512,6 +588,14 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
512
588
|
* @private
|
|
513
589
|
*/
|
|
514
590
|
private setTheme;
|
|
591
|
+
/**
|
|
592
|
+
* Dispatches `eunchange` for `property`, with the toolbar's current state
|
|
593
|
+
* as its value.
|
|
594
|
+
*
|
|
595
|
+
* @param property the property that just changed.
|
|
596
|
+
* @private
|
|
597
|
+
*/
|
|
598
|
+
private dispatchChange;
|
|
515
599
|
/**
|
|
516
600
|
* The bar's current live height, used to anchor the adaptive-theme
|
|
517
601
|
* observer's trigger line right at its bottom edge. Falls back to the
|
|
@@ -532,10 +616,25 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
532
616
|
*/
|
|
533
617
|
private setupAdaptiveThemeObserver;
|
|
534
618
|
/**
|
|
535
|
-
* Disconnects and clears the adaptive-theme
|
|
619
|
+
* Disconnects and clears the adaptive-theme observers, if any.
|
|
536
620
|
* @private
|
|
537
621
|
*/
|
|
538
622
|
private teardownAdaptiveThemeObserver;
|
|
623
|
+
/**
|
|
624
|
+
* Coalesces document mutations into one marker sync per frame, since a
|
|
625
|
+
* client-side navigation swaps many nodes at once.
|
|
626
|
+
* @private
|
|
627
|
+
*/
|
|
628
|
+
private readonly handleThemeMutation;
|
|
629
|
+
/**
|
|
630
|
+
* Observes markers that newly match `adaptiveThemeSelector` and drops
|
|
631
|
+
* the ones gone from the document, then resolves `theme`. Resolving waits
|
|
632
|
+
* for the observer when new markers were just observed : it reports each
|
|
633
|
+
* of them once, and resolving before that would briefly fall back to
|
|
634
|
+
* `defaultTheme` while the new page's section is already under the bar.
|
|
635
|
+
* @private
|
|
636
|
+
*/
|
|
637
|
+
private syncThemeMarkers;
|
|
539
638
|
/**
|
|
540
639
|
* Tracks which marker elements currently cross the trigger line and
|
|
541
640
|
* resolves `theme` from them.
|
|
@@ -553,8 +652,10 @@ export declare class EunomiaToolbar extends EunomiaToolbar_base {
|
|
|
553
652
|
*/
|
|
554
653
|
private resolveAdaptiveTheme;
|
|
555
654
|
/**
|
|
556
|
-
* Focuses the `[autofocus]` slotted element if present, otherwise
|
|
557
|
-
*
|
|
655
|
+
* Focuses the `[autofocus]` slotted element if present, otherwise keeps
|
|
656
|
+
* it on the burger button, which lives inside the panel : the button just
|
|
657
|
+
* activated keeps its visible focus ring, and since the panel header
|
|
658
|
+
* comes first in the DOM, the next `Tab` lands on the panel's first item.
|
|
558
659
|
* @private
|
|
559
660
|
*/
|
|
560
661
|
private focusInitialElement;
|