@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
|
@@ -12,7 +12,10 @@ import { css } from "lit";
|
|
|
12
12
|
* [--toolbar-gap-start] - Set a custom gap between items inside the start slot, falling back to --toolbar-gap
|
|
13
13
|
* [--toolbar-gap-center] - Set a custom gap between items inside the center slot, falling back to --toolbar-gap
|
|
14
14
|
* [--toolbar-gap-end] - Set a custom gap between items inside the end slot, falling back to --toolbar-gap
|
|
15
|
+
* [--toolbar-columns] - Set custom grid columns for start/center/end, overriding the ones set by layout
|
|
15
16
|
* [--toolbar-background] - Set a custom background color, overriding both light/dark variants below
|
|
17
|
+
* [--toolbar-background-at-top] - Set a custom background while transparent-at-top applies, default transparent
|
|
18
|
+
* [--toolbar-backdrop-blur] - Set a custom backdrop-filter blur radius for the bar itself
|
|
16
19
|
* [--toolbar-color] - Set a custom text color, overriding both light/dark variants below
|
|
17
20
|
* [--toolbar-background-light] - Set a custom background color for theme="light"
|
|
18
21
|
* [--toolbar-color-light] - Set a custom text color for theme="light"
|
|
@@ -22,6 +25,8 @@ import { css } from "lit";
|
|
|
22
25
|
* [--toolbar-shadow] - Set a custom shadow
|
|
23
26
|
* [--toolbar-z-index] - Set a custom stacking order
|
|
24
27
|
* [--toolbar-transition-duration] - Set a custom duration for the collapse/transparent/theme/panel transitions
|
|
28
|
+
* [--toolbar-color-transition-duration] - Set a custom duration for the bar's background/color/border/shadow transitions, falling back to --toolbar-transition-duration
|
|
29
|
+
* [--toolbar-transition-easing] - Set a custom timing function for every transition
|
|
25
30
|
* [--toolbar-panel-size] - Set a custom open size for the mobile panel (height for top/bottom, width for left/right)
|
|
26
31
|
* [--toolbar-panel-background] - Set a custom background for the mobile panel, default a translucent mix of the bar's own background
|
|
27
32
|
* [--toolbar-panel-color] - Set a custom text color for the mobile panel
|
|
@@ -33,13 +38,20 @@ import { css } from "lit";
|
|
|
33
38
|
* [--toolbar-burger-padding] - Set a custom padding around the burger button, default 0 on the block axis and --toolbar-panel-padding on the inline axis
|
|
34
39
|
* [--toolbar-burger-padding-block] - Set a custom vertical padding, as one length applied to both sides. Ignored when --toolbar-burger-padding is set
|
|
35
40
|
* [--toolbar-burger-padding-inline] - Set a custom horizontal padding, as one length applied to both sides. Ignored when --toolbar-burger-padding is set
|
|
41
|
+
* [--toolbar-burger-color] - Set a custom color for the burger button, default the bar's text color (the panel's once open)
|
|
42
|
+
* [--toolbar-burger-background-hover] - Set a custom hover background for the burger button
|
|
43
|
+
* [--toolbar-burger-background-active] - Set a custom pressed background for the burger button
|
|
36
44
|
* [--toolbar-panel-gap] - Set a custom gap inside the mobile panel
|
|
37
45
|
* [--toolbar-panel-backdrop-blur] - Set a custom backdrop-filter blur radius for the mobile panel
|
|
38
46
|
* [--toolbar-skip-links-height] - Set a custom height for the skip-links bar
|
|
39
47
|
* [--toolbar-skip-links-background] - Set a custom background for the skip-links bar, default a darker mix of the bar's own background
|
|
40
48
|
* [--toolbar-skip-links-color] - Set a custom text color for the skip-links bar
|
|
41
49
|
* [--toolbar-skip-links-separator-color] - Set a custom color for the divider drawn between skip links
|
|
50
|
+
* [--toolbar-skip-links-separator] - Replace the divider drawn between skip links with a glyph, as a CSS content string
|
|
42
51
|
* [--toolbar-skip-links-gap] - Set a custom gap between skip links, with the divider centered in it
|
|
52
|
+
* [--toolbar-skip-links-padding-inline] - Set a custom horizontal padding for the skip-links bar
|
|
53
|
+
* [--toolbar-skip-links-font-size] - Set a custom font size for the skip links
|
|
54
|
+
* [--toolbar-skip-link-padding] - Set a custom padding for each skip link
|
|
43
55
|
*/
|
|
44
56
|
const base = css `
|
|
45
57
|
:host {
|
|
@@ -79,6 +91,14 @@ const base = css `
|
|
|
79
91
|
--toolbar-transition-duration,
|
|
80
92
|
var(--eun-duration-l, 250ms)
|
|
81
93
|
);
|
|
94
|
+
--_colorTransitionDuration: var(
|
|
95
|
+
--toolbar-color-transition-duration,
|
|
96
|
+
var(--_transitionDuration)
|
|
97
|
+
);
|
|
98
|
+
--_easing: var(
|
|
99
|
+
--toolbar-transition-easing,
|
|
100
|
+
var(--eun-easing-default, ease)
|
|
101
|
+
);
|
|
82
102
|
--_panelSize: var(--toolbar-panel-size, 100%);
|
|
83
103
|
--_panelBackground: var(
|
|
84
104
|
--toolbar-panel-background,
|
|
@@ -116,6 +136,10 @@ const base = css `
|
|
|
116
136
|
);
|
|
117
137
|
--_skipLinksColor: var(--toolbar-skip-links-color, #fff);
|
|
118
138
|
--_skipLinksGap: var(--toolbar-skip-links-gap, var(--eun-space-m, 16px));
|
|
139
|
+
--_skipLinkPadding: var(
|
|
140
|
+
--toolbar-skip-link-padding,
|
|
141
|
+
var(--eun-space-xs, 4px)
|
|
142
|
+
);
|
|
119
143
|
--_skipLinksSeparatorColor: var(
|
|
120
144
|
--toolbar-skip-links-separator-color,
|
|
121
145
|
color-mix(in srgb, var(--_skipLinksColor) 50%, transparent)
|
|
@@ -148,7 +172,8 @@ const base = css `
|
|
|
148
172
|
box-sizing: border-box;
|
|
149
173
|
position: relative;
|
|
150
174
|
display: grid;
|
|
151
|
-
grid-template-columns: 1fr auto 1fr;
|
|
175
|
+
grid-template-columns: var(--toolbar-columns, 1fr auto 1fr);
|
|
176
|
+
grid-template-rows: minmax(0, 1fr);
|
|
152
177
|
align-items: center;
|
|
153
178
|
gap: var(--_gap);
|
|
154
179
|
height: var(--_currentHeight);
|
|
@@ -157,21 +182,26 @@ const base = css `
|
|
|
157
182
|
color: var(--_color);
|
|
158
183
|
border-block-end: var(--eun-border-width-s, 1px) solid var(--_borderColor);
|
|
159
184
|
box-shadow: var(--_shadow);
|
|
185
|
+
backdrop-filter: blur(var(--toolbar-backdrop-blur));
|
|
186
|
+
-webkit-backdrop-filter: blur(var(--toolbar-backdrop-blur));
|
|
160
187
|
transition:
|
|
161
|
-
height var(--_transitionDuration) var(--
|
|
162
|
-
background-color var(--
|
|
163
|
-
|
|
164
|
-
color var(--
|
|
165
|
-
|
|
166
|
-
|
|
188
|
+
height var(--_transitionDuration) var(--_easing),
|
|
189
|
+
background-color var(--_colorTransitionDuration) var(--_easing),
|
|
190
|
+
color var(--_colorTransitionDuration) var(--_easing),
|
|
191
|
+
border-color var(--_colorTransitionDuration) var(--_easing),
|
|
192
|
+
box-shadow var(--_colorTransitionDuration) var(--_easing);
|
|
193
|
+
}
|
|
194
|
+
:host([layout="between"]) #bar {
|
|
195
|
+
grid-template-columns: var(--toolbar-columns, auto 1fr auto);
|
|
167
196
|
}
|
|
168
197
|
:host([transparent-at-top][at-top]) #bar {
|
|
169
|
-
background: transparent;
|
|
198
|
+
background: var(--toolbar-background-at-top, transparent);
|
|
170
199
|
border-color: transparent;
|
|
171
200
|
box-shadow: none;
|
|
172
201
|
}
|
|
173
202
|
|
|
174
203
|
#start {
|
|
204
|
+
align-self: stretch;
|
|
175
205
|
grid-column: 1;
|
|
176
206
|
justify-self: start;
|
|
177
207
|
display: flex;
|
|
@@ -180,6 +210,7 @@ const base = css `
|
|
|
180
210
|
min-width: 0;
|
|
181
211
|
}
|
|
182
212
|
#center {
|
|
213
|
+
align-self: stretch;
|
|
183
214
|
grid-column: 2;
|
|
184
215
|
justify-self: center;
|
|
185
216
|
display: flex;
|
|
@@ -188,6 +219,7 @@ const base = css `
|
|
|
188
219
|
min-width: 0;
|
|
189
220
|
}
|
|
190
221
|
#end {
|
|
222
|
+
align-self: stretch;
|
|
191
223
|
grid-column: 3;
|
|
192
224
|
justify-self: end;
|
|
193
225
|
display: flex;
|
|
@@ -205,14 +237,18 @@ const base = css `
|
|
|
205
237
|
#start ::slotted(*),
|
|
206
238
|
#center ::slotted(*),
|
|
207
239
|
#end ::slotted(*) {
|
|
208
|
-
max-height:
|
|
240
|
+
max-height: 100%;
|
|
209
241
|
}
|
|
210
242
|
|
|
211
243
|
#start ::slotted(eun-link),
|
|
212
244
|
#center ::slotted(eun-link),
|
|
213
245
|
#end ::slotted(eun-link) {
|
|
214
246
|
--link-padding: var(--eun-space-xs, 4px);
|
|
215
|
-
--link-background-focus: var(
|
|
247
|
+
--link-background-focus: var(
|
|
248
|
+
--toolbar-link-background-focus,
|
|
249
|
+
var(--eun-color-primary-alpha-20, #3d6fff33)
|
|
250
|
+
);
|
|
251
|
+
--link-focus-outline-color: var(--toolbar-focus-outline-color);
|
|
216
252
|
}
|
|
217
253
|
|
|
218
254
|
#start ::slotted(a) {
|
|
@@ -225,12 +261,28 @@ const base = css `
|
|
|
225
261
|
border-radius: var(--eun-border-radius-s);
|
|
226
262
|
}
|
|
227
263
|
#start ::slotted(a:focus-visible) {
|
|
228
|
-
outline-color: var(
|
|
264
|
+
outline-color: var(
|
|
265
|
+
--toolbar-focus-outline-color,
|
|
266
|
+
var(--eun-color-primary-500, #3d6fff)
|
|
267
|
+
);
|
|
229
268
|
}
|
|
230
269
|
|
|
231
270
|
#burger {
|
|
271
|
+
--_burgerColor: var(--toolbar-burger-color, var(--_color));
|
|
272
|
+
--button-text: var(--_burgerColor);
|
|
273
|
+
--button-background-hover: var(
|
|
274
|
+
--toolbar-burger-background-hover,
|
|
275
|
+
color-mix(in srgb, var(--_burgerColor) 10%, transparent)
|
|
276
|
+
);
|
|
277
|
+
--button-background-active: var(
|
|
278
|
+
--toolbar-burger-background-active,
|
|
279
|
+
color-mix(in srgb, var(--_burgerColor) 16%, transparent)
|
|
280
|
+
);
|
|
232
281
|
flex-shrink: 0;
|
|
233
282
|
}
|
|
283
|
+
:host([open]) #burger {
|
|
284
|
+
--_burgerColor: var(--toolbar-burger-color, var(--_panelColor));
|
|
285
|
+
}
|
|
234
286
|
|
|
235
287
|
#skip-links {
|
|
236
288
|
box-sizing: border-box;
|
|
@@ -243,15 +295,18 @@ const base = css `
|
|
|
243
295
|
gap: var(--_skipLinksGap);
|
|
244
296
|
overflow: hidden;
|
|
245
297
|
height: var(--_skipLinksHeight);
|
|
246
|
-
padding-inline: var(
|
|
298
|
+
padding-inline: var(
|
|
299
|
+
--toolbar-skip-links-padding-inline,
|
|
300
|
+
var(--eun-space-m, 16px)
|
|
301
|
+
);
|
|
247
302
|
background: var(--_skipLinksBackground);
|
|
248
303
|
color: var(--_skipLinksColor);
|
|
249
304
|
box-shadow: var(--eun-shadow-m, rgba(0, 0, 0, 0.1) 0 4px 6px -2px);
|
|
250
305
|
transform: translateY(-100%);
|
|
251
306
|
opacity: 0;
|
|
252
307
|
transition:
|
|
253
|
-
transform var(--_transitionDuration) var(--
|
|
254
|
-
opacity var(--_transitionDuration) var(--
|
|
308
|
+
transform var(--_transitionDuration) var(--_easing),
|
|
309
|
+
opacity var(--_transitionDuration) var(--_easing);
|
|
255
310
|
}
|
|
256
311
|
#skip-links:focus-within {
|
|
257
312
|
transform: translateY(0);
|
|
@@ -264,7 +319,10 @@ const base = css `
|
|
|
264
319
|
display: inline-flex;
|
|
265
320
|
align-items: center;
|
|
266
321
|
color: inherit;
|
|
267
|
-
font-size: var(
|
|
322
|
+
font-size: var(
|
|
323
|
+
--toolbar-skip-links-font-size,
|
|
324
|
+
var(--eun-font-size-s, 13px)
|
|
325
|
+
);
|
|
268
326
|
text-decoration: none;
|
|
269
327
|
white-space: nowrap;
|
|
270
328
|
}
|
|
@@ -273,14 +331,21 @@ const base = css `
|
|
|
273
331
|
--link-color: var(--_skipLinksColor);
|
|
274
332
|
--link-color-hover: var(--_skipLinksColor);
|
|
275
333
|
--link-color-focus: var(--_skipLinksColor);
|
|
276
|
-
--link-
|
|
277
|
-
|
|
334
|
+
--link-focus-outline-color: var(
|
|
335
|
+
--toolbar-skip-links-focus-outline-color,
|
|
336
|
+
var(--_skipLinksColor)
|
|
337
|
+
);
|
|
338
|
+
--link-padding: var(--_skipLinkPadding);
|
|
339
|
+
--link-background-focus: var(
|
|
340
|
+
--toolbar-skip-links-background-focus,
|
|
341
|
+
var(--eun-color-secondary-alpha-20, #edbd6f33)
|
|
342
|
+
);
|
|
278
343
|
--link-border-radius: var(--eun-border-radius-l, 999px);
|
|
279
344
|
}
|
|
280
345
|
|
|
281
346
|
#skip-links ::slotted(a),
|
|
282
347
|
.skip-link {
|
|
283
|
-
padding: var(--
|
|
348
|
+
padding: var(--_skipLinkPadding);
|
|
284
349
|
outline: 2px solid transparent;
|
|
285
350
|
outline-offset: 2px;
|
|
286
351
|
border-radius: var(--eun-border-radius-l, 999px);
|
|
@@ -295,12 +360,27 @@ const base = css `
|
|
|
295
360
|
}
|
|
296
361
|
#skip-links ::slotted(a:not(:first-child))::before,
|
|
297
362
|
#skip-links ::slotted(eun-link:not(:first-child))::before {
|
|
298
|
-
content: "";
|
|
363
|
+
content: var(--toolbar-skip-links-separator, "");
|
|
299
364
|
position: absolute;
|
|
300
|
-
inset-inline-start: calc(var(--_skipLinksGap)
|
|
365
|
+
inset-inline-start: calc(var(--_skipLinksGap) * -1);
|
|
301
366
|
inset-block: 0;
|
|
302
|
-
width:
|
|
303
|
-
|
|
367
|
+
width: var(--_skipLinksGap);
|
|
368
|
+
display: flex;
|
|
369
|
+
align-items: center;
|
|
370
|
+
justify-content: center;
|
|
371
|
+
color: var(--_skipLinksSeparatorColor);
|
|
372
|
+
/* The 1px line, centered in the gap. A glyph set through
|
|
373
|
+
--toolbar-skip-links-separator turns it off : a string is never a
|
|
374
|
+
valid image, so the declaration falls back to none. */
|
|
375
|
+
background: var(
|
|
376
|
+
--toolbar-skip-links-separator,
|
|
377
|
+
linear-gradient(
|
|
378
|
+
var(--_skipLinksSeparatorColor),
|
|
379
|
+
var(--_skipLinksSeparatorColor)
|
|
380
|
+
)
|
|
381
|
+
)
|
|
382
|
+
center / 1px 100% no-repeat;
|
|
383
|
+
pointer-events: none;
|
|
304
384
|
}
|
|
305
385
|
#skip-links ::slotted(a:hover),
|
|
306
386
|
#skip-links ::slotted(a:focus-visible),
|
|
@@ -310,8 +390,14 @@ const base = css `
|
|
|
310
390
|
}
|
|
311
391
|
#skip-links ::slotted(a:focus-visible),
|
|
312
392
|
.skip-link:focus-visible {
|
|
313
|
-
outline-color: var(
|
|
314
|
-
|
|
393
|
+
outline-color: var(
|
|
394
|
+
--toolbar-skip-links-focus-outline-color,
|
|
395
|
+
var(--_skipLinksColor)
|
|
396
|
+
);
|
|
397
|
+
background: var(
|
|
398
|
+
--toolbar-skip-links-background-focus,
|
|
399
|
+
var(--eun-color-secondary-alpha-20, #edbd6f33)
|
|
400
|
+
);
|
|
315
401
|
}
|
|
316
402
|
|
|
317
403
|
#panel {
|
|
@@ -346,8 +432,7 @@ const base = css `
|
|
|
346
432
|
height: calc(var(--_currentHeight) - var(--eun-border-width-s, 1px));
|
|
347
433
|
padding: var(--_burgerPadding);
|
|
348
434
|
pointer-events: auto;
|
|
349
|
-
transition: height var(--_transitionDuration)
|
|
350
|
-
var(--eun-easing-default, ease);
|
|
435
|
+
transition: height var(--_transitionDuration) var(--_easing);
|
|
351
436
|
}
|
|
352
437
|
|
|
353
438
|
#panel-body {
|
|
@@ -365,8 +450,8 @@ const base = css `
|
|
|
365
450
|
opacity: 0;
|
|
366
451
|
pointer-events: none;
|
|
367
452
|
transition:
|
|
368
|
-
opacity var(--_transitionDuration) var(--
|
|
369
|
-
transform var(--_transitionDuration) var(--
|
|
453
|
+
opacity var(--_transitionDuration) var(--_easing),
|
|
454
|
+
transform var(--_transitionDuration) var(--_easing);
|
|
370
455
|
}
|
|
371
456
|
#panel[data-direction="top"] #panel-body {
|
|
372
457
|
inset-block-end: calc(100% - var(--_panelSize));
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatched by `eun-scheduler-event-editor` whenever its `dirty` or
|
|
3
|
+
* `valid` getter changes value, so a custom footer can enable or disable
|
|
4
|
+
* its own buttons without listening to every field. Not fired for the
|
|
5
|
+
* initial render : read the getters for that.
|
|
6
|
+
*/
|
|
7
|
+
export declare class EditorStateChangeEvent extends Event {
|
|
8
|
+
/**
|
|
9
|
+
* The name of the editor-state-change event.
|
|
10
|
+
* @static
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
static readonly eventName = "euneditorstatechange";
|
|
14
|
+
/**
|
|
15
|
+
* Whether any field has changed since the last seed or save.
|
|
16
|
+
*/
|
|
17
|
+
readonly dirty: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the form currently passes validation.
|
|
20
|
+
*/
|
|
21
|
+
readonly valid: boolean;
|
|
22
|
+
constructor(dirty: boolean, valid: boolean);
|
|
23
|
+
}
|
|
24
|
+
declare global {
|
|
25
|
+
interface GlobalEventHandlersEventMap {
|
|
26
|
+
[EditorStateChangeEvent.eventName]: EditorStateChangeEvent;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatched by `eun-scheduler-event-editor` whenever its `dirty` or
|
|
3
|
+
* `valid` getter changes value, so a custom footer can enable or disable
|
|
4
|
+
* its own buttons without listening to every field. Not fired for the
|
|
5
|
+
* initial render : read the getters for that.
|
|
6
|
+
*/
|
|
7
|
+
export class EditorStateChangeEvent extends Event {
|
|
8
|
+
constructor(dirty, valid) {
|
|
9
|
+
super(EditorStateChangeEvent.eventName, {
|
|
10
|
+
bubbles: true,
|
|
11
|
+
composed: false,
|
|
12
|
+
});
|
|
13
|
+
this.dirty = dirty;
|
|
14
|
+
this.valid = valid;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The name of the editor-state-change event.
|
|
19
|
+
* @static
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
EditorStateChangeEvent.eventName = "euneditorstatechange";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatched by `eun-scheduler-event-editor` when its Cancel button, or
|
|
3
|
+
* `requestCancel()`, discards the form's changes, once the form is reset
|
|
4
|
+
* to its last-seeded values. A host modal or drawer listens for it to
|
|
5
|
+
* close itself.
|
|
6
|
+
*/
|
|
7
|
+
export declare class EventCancelEvent extends Event {
|
|
8
|
+
/**
|
|
9
|
+
* The name of the event-cancel event.
|
|
10
|
+
* @static
|
|
11
|
+
* @readonly
|
|
12
|
+
*/
|
|
13
|
+
static readonly eventName = "euneventcancel";
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
16
|
+
declare global {
|
|
17
|
+
interface GlobalEventHandlersEventMap {
|
|
18
|
+
[EventCancelEvent.eventName]: EventCancelEvent;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatched by `eun-scheduler-event-editor` when its Cancel button, or
|
|
3
|
+
* `requestCancel()`, discards the form's changes, once the form is reset
|
|
4
|
+
* to its last-seeded values. A host modal or drawer listens for it to
|
|
5
|
+
* close itself.
|
|
6
|
+
*/
|
|
7
|
+
export class EventCancelEvent extends Event {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(EventCancelEvent.eventName, { bubbles: true, composed: false });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The name of the event-cancel event.
|
|
14
|
+
* @static
|
|
15
|
+
* @readonly
|
|
16
|
+
*/
|
|
17
|
+
EventCancelEvent.eventName = "euneventcancel";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { EunomiaSchedulerView } from "../features/scheduler/shared/scheduler.types.js";
|
|
2
2
|
/**
|
|
3
|
-
* Dispatched by `eun-scheduler` whenever the visible
|
|
4
|
-
* prev/next/"Today" click, a mobile swipe, a view
|
|
5
|
-
* `displayedDate`/`view` assignment.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
3
|
+
* Dispatched by `eun-scheduler` and `eun-calendar` whenever the visible
|
|
4
|
+
* period changes — a prev/next/"Today" click, a mobile swipe, a view
|
|
5
|
+
* switch, or an external `displayedDate`/`view` assignment. Never fired for
|
|
6
|
+
* the initial render : read the component's own `visibleRange` for that.
|
|
7
|
+
* Meant for consumers that lazy-load events per range : listen for this and
|
|
8
|
+
* fetch/filter for `[rangeStart, rangeEnd]` instead of loading everything
|
|
9
|
+
* up front.
|
|
8
10
|
*/
|
|
9
11
|
export declare class PeriodChangeEvent extends Event {
|
|
10
12
|
/**
|
|
@@ -25,7 +27,13 @@ export declare class PeriodChangeEvent extends Event {
|
|
|
25
27
|
* The end of the now-visible period (inclusive, end of day).
|
|
26
28
|
*/
|
|
27
29
|
readonly rangeEnd: Date;
|
|
28
|
-
|
|
30
|
+
/**
|
|
31
|
+
* The now-active anchor date. In `month` view, the range covers the whole
|
|
32
|
+
* 6-week grid, leading and trailing days included, while this date stays
|
|
33
|
+
* inside the displayed month.
|
|
34
|
+
*/
|
|
35
|
+
readonly displayedDate: Date;
|
|
36
|
+
constructor(view: EunomiaSchedulerView, rangeStart: Date, rangeEnd: Date, displayedDate: Date);
|
|
29
37
|
}
|
|
30
38
|
declare global {
|
|
31
39
|
interface GlobalEventHandlersEventMap {
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Dispatched by `eun-scheduler` whenever the visible
|
|
3
|
-
* prev/next/"Today" click, a mobile swipe, a view
|
|
4
|
-
* `displayedDate`/`view` assignment.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* Dispatched by `eun-scheduler` and `eun-calendar` whenever the visible
|
|
3
|
+
* period changes — a prev/next/"Today" click, a mobile swipe, a view
|
|
4
|
+
* switch, or an external `displayedDate`/`view` assignment. Never fired for
|
|
5
|
+
* the initial render : read the component's own `visibleRange` for that.
|
|
6
|
+
* Meant for consumers that lazy-load events per range : listen for this and
|
|
7
|
+
* fetch/filter for `[rangeStart, rangeEnd]` instead of loading everything
|
|
8
|
+
* up front.
|
|
7
9
|
*/
|
|
8
10
|
export class PeriodChangeEvent extends Event {
|
|
9
|
-
constructor(view, rangeStart, rangeEnd) {
|
|
11
|
+
constructor(view, rangeStart, rangeEnd, displayedDate) {
|
|
10
12
|
super(PeriodChangeEvent.eventName, { bubbles: true, composed: false });
|
|
11
13
|
this.view = view;
|
|
12
14
|
this.rangeStart = rangeStart;
|
|
13
15
|
this.rangeEnd = rangeEnd;
|
|
16
|
+
this.displayedDate = displayedDate;
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
@@ -2,6 +2,7 @@ import { LitElement, PropertyValues, TemplateResult } from "lit";
|
|
|
2
2
|
import { WeekStartsOn } from "../../../utils/date.utils.js";
|
|
3
3
|
import { EunomiaSchedulerEvent, EunomiaSchedulerView } from "../shared/scheduler.types.js";
|
|
4
4
|
import { type EunomiaSchedulerEventAppearance } from "../scheduler-event/scheduler-event.js";
|
|
5
|
+
import { DateRange } from "../shared/scheduler.utils.js";
|
|
5
6
|
/**
|
|
6
7
|
* Tag name of the calendar component.
|
|
7
8
|
*/
|
|
@@ -48,7 +49,7 @@ declare const EunomiaCalendar_base: import("../../../utils/constructor.type.js")
|
|
|
48
49
|
* @prop {number} [dayStartHour=0] - The first visible hour row in day, week, and work week
|
|
49
50
|
* @prop {number} [dayEndHour=24] - The last visible hour row, exclusive, in day, week, and work week
|
|
50
51
|
* @prop {number} [slotDuration=30] - The grid's row granularity, in minutes
|
|
51
|
-
* @prop {string} [locale] - The locale used throughout. Defaults to the
|
|
52
|
+
* @prop {string} [locale] - The locale used throughout. Defaults to the one set with setDefaultLocale, English otherwise
|
|
52
53
|
* @prop {boolean} [readonly=false] - Disables the slot click event, removing the create-here affordance, and event-chip dragging. View only
|
|
53
54
|
* @prop {boolean} [noAnimation=false] - Disables the mobile swipe slide animation
|
|
54
55
|
* @prop {boolean} [hideNowLine=false] - Hides the line marking the current time in day, week and work week views
|
|
@@ -59,13 +60,14 @@ declare const EunomiaCalendar_base: import("../../../utils/constructor.type.js")
|
|
|
59
60
|
* @fires {EventClickEvent} euneventclick - Fired when an event chip is clicked
|
|
60
61
|
* @fires {SlotClickEvent} eunslotclick - Fired when an empty hour-grid slot is clicked
|
|
61
62
|
* @fires {EventUpdateEvent} euneventupdate - Fired when a day, week, or work week event chip is dragged to a new time or day and dropped
|
|
62
|
-
* @fires {PeriodChangeEvent} eunperiodchange - Fired whenever the visible period changes, from a swipe, a drill-down, or an external view or displayedDate assignment
|
|
63
|
+
* @fires {PeriodChangeEvent} eunperiodchange - Fired whenever the visible period changes, from a swipe, a drill-down, a navigation method, or an external view or displayedDate assignment. Not fired for the initial render, read visibleRange instead
|
|
63
64
|
* @cssprop [--scheduler-slot-height] - Sets the pixel height per slotDuration row in day, week, and work week
|
|
64
65
|
* @cssprop [--scheduler-gutter-width] - Sets the width of the hour-label gutter
|
|
65
|
-
* @cssprop [--scheduler-body-max-height=640px] - Sets the maximum height, with scroll, of the day, week, and work week grid body and the year view. Below a small viewport, the grid also fills its own host's height first, still capped at this same value
|
|
66
|
+
* @cssprop [--scheduler-body-max-height=640px] - Sets the maximum height, with scroll, of the day, week, and work week grid body and the year view, and of the month view when set (uncapped by default). Below a small viewport, the grid also fills its own host's height first, still capped at this same value
|
|
66
67
|
* @cssprop [--scheduler-month-cell-height] - Sets the height of month view cells
|
|
67
68
|
* @cssprop [--scheduler-swipe-duration=200ms] - Sets the duration of the mobile swipe slide animation
|
|
68
69
|
* @cssprop [--scheduler-accent-color] - Sets the color marking today, the selected day and the focus ring. Defaults to the theme's primary color
|
|
70
|
+
* @cssprop [--scheduler-focus-outline-color] - Sets the keyboard focus outline color, falling back to --scheduler-accent-color
|
|
69
71
|
* @cssprop [--scheduler-accent-text-color] - Sets the text color shown on the accent color, such as today's number in month view
|
|
70
72
|
* @cssprop [--scheduler-now-line-color] - Sets the color of the line marking the current time. Defaults to the critical color
|
|
71
73
|
* @element eun-calendar
|
|
@@ -114,7 +116,8 @@ export declare class EunomiaCalendar extends EunomiaCalendar_base {
|
|
|
114
116
|
*/
|
|
115
117
|
slotDuration: number;
|
|
116
118
|
/**
|
|
117
|
-
* The locale used throughout ; defaults to the
|
|
119
|
+
* The locale used throughout ; defaults to the one set with
|
|
120
|
+
* `setDefaultLocale()`, English otherwise.
|
|
118
121
|
*/
|
|
119
122
|
locale?: string;
|
|
120
123
|
/**
|
|
@@ -387,15 +390,36 @@ export declare class EunomiaCalendar extends EunomiaCalendar_base {
|
|
|
387
390
|
* @private
|
|
388
391
|
*/
|
|
389
392
|
private readonly handleMonthDayKeydown;
|
|
393
|
+
/**
|
|
394
|
+
* The range currently visible for {@link view} and {@link displayedDate},
|
|
395
|
+
* the same one `eunperiodchange` reports. In `month` view, it covers the
|
|
396
|
+
* whole 6-week grid, leading and trailing days included.
|
|
397
|
+
*/
|
|
398
|
+
get visibleRange(): DateRange;
|
|
399
|
+
/**
|
|
400
|
+
* Moves the displayed period one `view`-sized unit forward.
|
|
401
|
+
*/
|
|
402
|
+
next(): void;
|
|
403
|
+
/**
|
|
404
|
+
* Moves the displayed period one `view`-sized unit back.
|
|
405
|
+
*/
|
|
406
|
+
previous(): void;
|
|
407
|
+
/**
|
|
408
|
+
* Brings the period containing today into view.
|
|
409
|
+
*/
|
|
410
|
+
today(): void;
|
|
390
411
|
/**
|
|
391
412
|
* Re-dispatches `eunperiodchange` whenever the visible period changes.
|
|
413
|
+
* Skipped on the first update (every old value is still `undefined`
|
|
414
|
+
* then), since a listener attached after the upgrade could never catch
|
|
415
|
+
* it : {@link visibleRange} gives the initial range instead.
|
|
392
416
|
*
|
|
393
417
|
* @param changed the changed properties.
|
|
394
418
|
*/
|
|
395
419
|
protected updated(changed: PropertyValues): void;
|
|
396
420
|
/**
|
|
397
|
-
* Positions the very first render
|
|
398
|
-
* to midnight/January : {@link displayedDate} already defaults to today
|
|
421
|
+
* Positions the very first render, and every later view change, on
|
|
422
|
+
* "now" instead of opening scrolled to midnight/January : {@link displayedDate} already defaults to today
|
|
399
423
|
* (see its own doc), which is enough for `month` view, but the
|
|
400
424
|
* scrollable views need their own scroll position set explicitly.
|
|
401
425
|
* Deferred to {@link runOnceVisible} rather than applied directly here,
|
|
@@ -404,19 +428,25 @@ export declare class EunomiaCalendar extends EunomiaCalendar_base {
|
|
|
404
428
|
* zero layout at this point — `scrollTop` silently no-ops on a
|
|
405
429
|
* zero-height/`display: none` box, so scrolling only once the box
|
|
406
430
|
* actually has size is what makes this work regardless of where the
|
|
407
|
-
* calendar happens to live. Runs
|
|
408
|
-
*
|
|
409
|
-
* user's own scroll position on every
|
|
431
|
+
* calendar happens to live. Runs on the first render and on view
|
|
432
|
+
* changes only, matching "open a view and land on the current period"
|
|
433
|
+
* rather than fighting the user's own scroll position on every other
|
|
434
|
+
* render.
|
|
410
435
|
*
|
|
411
436
|
* @param changed the changed properties.
|
|
412
437
|
*/
|
|
413
438
|
protected firstUpdated(changed: PropertyValues): void;
|
|
439
|
+
/**
|
|
440
|
+
* Scrolls the current view to "now", see {@link firstUpdated}.
|
|
441
|
+
* @private
|
|
442
|
+
*/
|
|
443
|
+
private scrollToCurrentPeriod;
|
|
414
444
|
/**
|
|
415
445
|
* Calls `action` as soon as the element matching `selector` in the
|
|
416
446
|
* shadow root actually has layout (`clientHeight > 0`) — immediately, if
|
|
417
447
|
* it already does, otherwise once a {@link ResizeObserver} sees it gain
|
|
418
448
|
* size (e.g. its `eun-tab-panel` ancestor becomes the active tab) —
|
|
419
|
-
* and only once
|
|
449
|
+
* and only once per call. See {@link firstUpdated}'s own doc for why this
|
|
420
450
|
* indirection exists.
|
|
421
451
|
* @param selector a shadow-root selector for the element to watch.
|
|
422
452
|
* @param action called exactly once, as soon as that element is visible.
|
|
@@ -425,7 +455,8 @@ export declare class EunomiaCalendar extends EunomiaCalendar_base {
|
|
|
425
455
|
private runOnceVisible;
|
|
426
456
|
/**
|
|
427
457
|
* Scrolls day/week/work-week's `#hour-grid-scroll` so the current time
|
|
428
|
-
* sits roughly a third of the way down the visible
|
|
458
|
+
* sits roughly a third of the way down the area left visible below the
|
|
459
|
+
* sticky header and all-day rows, rather than
|
|
429
460
|
* opening scrolled to {@link dayStartHour}. Computed from the time math
|
|
430
461
|
* directly (not the `.hour-grid-now-line` element, which only renders
|
|
431
462
|
* within {@link dayStartHour}/{@link dayEndHour}'s own bounds) so a
|
|
@@ -437,12 +468,13 @@ export declare class EunomiaCalendar extends EunomiaCalendar_base {
|
|
|
437
468
|
*/
|
|
438
469
|
private scrollHourGridToNow;
|
|
439
470
|
/**
|
|
440
|
-
* Scrolls `year` view's `.year-scroll` so
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
471
|
+
* Scrolls `year` view's `.year-scroll` so {@link displayedDate}'s month
|
|
472
|
+
* section (the current month by default, or the month just left when
|
|
473
|
+
* coming back from `month` view) starts right below the sticky weekday
|
|
474
|
+
* header, rather than opening scrolled to January. The header's own
|
|
475
|
+
* height is subtracted from the target, since it stays pinned to the top
|
|
476
|
+
* of the scroll container and would otherwise overlap the very section
|
|
477
|
+
* just scrolled into view.
|
|
446
478
|
* @private
|
|
447
479
|
*/
|
|
448
480
|
private scrollYearViewToCurrentMonth;
|
|
@@ -490,9 +522,9 @@ export declare class EunomiaCalendar extends EunomiaCalendar_base {
|
|
|
490
522
|
connectedCallback(): void;
|
|
491
523
|
disconnectedCallback(): void;
|
|
492
524
|
/**
|
|
493
|
-
* Moves the displayed period by one `view`-sized unit — swipe
|
|
494
|
-
*
|
|
495
|
-
* `eun-scheduler`)
|
|
525
|
+
* Moves the displayed period by one `view`-sized unit — swipe and
|
|
526
|
+
* {@link next}/{@link previous}, the header itself living in the consumer
|
|
527
|
+
* (see `eun-scheduler`).
|
|
496
528
|
* @private
|
|
497
529
|
*/
|
|
498
530
|
private navigate;
|