@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
|
@@ -22,14 +22,17 @@ export type EunomiaAnimateAnimation = "none" | "fade" | "scroll-right" | "scroll
|
|
|
22
22
|
* @prop {EunomiaAnimateAnimation} [animation='fade'] - Which transition to apply. None renders the content immediately, with no transition
|
|
23
23
|
* @prop {number} [duration=1000] - The transition duration, in milliseconds. Left unset, it follows --animate-duration
|
|
24
24
|
* @prop {number} [delay=0] - The transition delay, in milliseconds
|
|
25
|
-
* @prop {number} [
|
|
26
|
-
* @attr {number} [
|
|
25
|
+
* @prop {number} [laptopDelay] - Overrides `delay` below the laptop breakpoint (width < 1024px)
|
|
26
|
+
* @attr {number} [laptop-delay] - Overrides `delay` below the laptop breakpoint (width < 1024px)
|
|
27
|
+
* @prop {number} [tabletDelay] - Overrides `delay` (and `laptopDelay`, if also set) below the tablet breakpoint (width < 768px)
|
|
28
|
+
* @attr {number} [tablet-delay] - Overrides `delay` (and `laptopDelay`, if also set) below the tablet breakpoint (width < 768px)
|
|
27
29
|
* @prop {number} [mobileDelay] - Overrides `delay` (and `tabletDelay`, if also set) below the mobile breakpoint (width < 600px)
|
|
28
30
|
* @attr {number} [mobile-delay] - Overrides `delay` (and `tabletDelay`, if also set) below the mobile breakpoint (width < 600px)
|
|
29
|
-
* @prop {boolean} [once=
|
|
31
|
+
* @prop {boolean} [once=false] - Whether the animation plays only the first time it enters the viewport, or replays every time it re-enters
|
|
30
32
|
* @prop {number} [threshold=0.1] - The ratio of the element, from 0 to 1, that must be visible before the animation triggers
|
|
31
33
|
* @prop {string} [rootMargin='0px'] - The margin applied around the viewport before threshold is evaluated, accepting CSS-like values such as -50px 0px
|
|
32
|
-
* @prop {EunomiaAnimateAnimation} [
|
|
34
|
+
* @prop {EunomiaAnimateAnimation} [laptopAnimation] - Overrides `animation` below the laptop breakpoint (width < 1024px). Left unset, the viewport keeps using `animation`
|
|
35
|
+
* @prop {EunomiaAnimateAnimation} [tabletAnimation] - Overrides `animation` (and `laptopAnimation`, if also set) below the tablet breakpoint (width < 768px)
|
|
33
36
|
* @prop {EunomiaAnimateAnimation} [mobileAnimation] - Overrides `animation` (and `tabletAnimation`, if also set) below the mobile breakpoint (width < 600px)
|
|
34
37
|
* @cssprop [--animate-distance] - Sets the travel distance for the scroll and faded-scroll animations
|
|
35
38
|
* @cssprop [--animate-duration=1000ms] - Sets the transition duration of every animate that has no duration of its own, for example once for the whole site
|
|
@@ -63,9 +66,16 @@ export declare class EunomiaAnimate extends LitElement {
|
|
|
63
66
|
*/
|
|
64
67
|
delay: number;
|
|
65
68
|
/**
|
|
66
|
-
* Overrides `delay` at
|
|
67
|
-
* `@media` switch as {@link
|
|
68
|
-
*
|
|
69
|
+
* Overrides `delay` at laptop-width viewports and narrower, with the same
|
|
70
|
+
* `@media` switch as {@link laptopAnimation}.
|
|
71
|
+
* @default undefined
|
|
72
|
+
*/
|
|
73
|
+
laptopDelay?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Overrides `delay` (and `laptopDelay`, if also set) at tablet-width
|
|
76
|
+
* viewports and narrower, with the same `@media` switch as
|
|
77
|
+
* {@link tabletAnimation}. A stagger between cards in a desktop grid, for
|
|
78
|
+
* example, makes no sense once they're stacked.
|
|
69
79
|
* @default undefined
|
|
70
80
|
*/
|
|
71
81
|
tabletDelay?: number;
|
|
@@ -79,7 +89,7 @@ export declare class EunomiaAnimate extends LitElement {
|
|
|
79
89
|
/**
|
|
80
90
|
* Whether the animation plays only the first time it enters the
|
|
81
91
|
* viewport (unobserved right after), or replays every time it re-enters.
|
|
82
|
-
* @default
|
|
92
|
+
* @default false
|
|
83
93
|
*/
|
|
84
94
|
once: boolean;
|
|
85
95
|
/**
|
|
@@ -95,8 +105,8 @@ export declare class EunomiaAnimate extends LitElement {
|
|
|
95
105
|
*/
|
|
96
106
|
rootMargin: string;
|
|
97
107
|
/**
|
|
98
|
-
* Overrides `animation` below the
|
|
99
|
-
* (`mediaBelow("
|
|
108
|
+
* Overrides `animation` below the laptop breakpoint
|
|
109
|
+
* (`mediaBelow("laptop")`, `width < 1024px`). Purely a
|
|
100
110
|
* CSS `@media` switch (`animate.styles.ts`, mirrored in
|
|
101
111
|
* `animate-ssr.css` for the pre-hydration state) — never read from JS,
|
|
102
112
|
* so there's no `matchMedia` listener to keep in sync with the actual
|
|
@@ -105,12 +115,20 @@ export declare class EunomiaAnimate extends LitElement {
|
|
|
105
115
|
* keeps using `animation`.
|
|
106
116
|
* @default undefined
|
|
107
117
|
*/
|
|
118
|
+
laptopAnimation?: EunomiaAnimateAnimation;
|
|
119
|
+
/**
|
|
120
|
+
* Overrides `animation` (and `laptopAnimation`, if also set)
|
|
121
|
+
* below the tablet breakpoint (`mediaBelow("tablet")`,
|
|
122
|
+
* `width < 768px`). Same pure-CSS mechanism as
|
|
123
|
+
* {@link laptopAnimation}.
|
|
124
|
+
* @default undefined
|
|
125
|
+
*/
|
|
108
126
|
tabletAnimation?: EunomiaAnimateAnimation;
|
|
109
127
|
/**
|
|
110
128
|
* Overrides `animation` (and `tabletAnimation`, if also set)
|
|
111
129
|
* below the mobile breakpoint (`mediaBelow("mobile")`,
|
|
112
130
|
* `width < 600px`). Same pure-CSS mechanism as
|
|
113
|
-
* {@link
|
|
131
|
+
* {@link laptopAnimation}.
|
|
114
132
|
* @default undefined
|
|
115
133
|
*/
|
|
116
134
|
mobileAnimation?: EunomiaAnimateAnimation;
|
|
@@ -122,13 +140,13 @@ export declare class EunomiaAnimate extends LitElement {
|
|
|
122
140
|
*/
|
|
123
141
|
private observer?;
|
|
124
142
|
/**
|
|
125
|
-
* Whether at least one of `animation`, `
|
|
126
|
-
* `mobileAnimation` is set to something other than `"none"` — i.e.
|
|
143
|
+
* Whether at least one of `animation`, `laptopAnimation`,
|
|
144
|
+
* `tabletAnimation`, or `mobileAnimation` is set to something other than `"none"` — i.e.
|
|
127
145
|
* whether *some* viewport width could actually reveal an animation, and
|
|
128
146
|
* the observer is therefore worth setting up at all. Deliberately
|
|
129
|
-
* ignores the current viewport width itself: which of the
|
|
147
|
+
* ignores the current viewport width itself: which of the four ends up
|
|
130
148
|
* active is a CSS `@media` decision, not something this component reads
|
|
131
|
-
* from JS (see {@link
|
|
149
|
+
* from JS (see {@link laptopAnimation}).
|
|
132
150
|
* @private
|
|
133
151
|
*/
|
|
134
152
|
private get hasAnyAnimation();
|
|
@@ -154,8 +172,8 @@ export declare class EunomiaAnimate extends LitElement {
|
|
|
154
172
|
* host's transition through a shadow-internal `<style>`, only when they
|
|
155
173
|
* differ from the stylesheet's own defaults : an inline style on the host
|
|
156
174
|
* would be a hydration mismatch for an SSR framework, since the server
|
|
157
|
-
* never renders it. The breakpoints match {@link
|
|
158
|
-
* {@link mobileAnimation}.
|
|
175
|
+
* never renders it. The breakpoints match {@link laptopAnimation},
|
|
176
|
+
* {@link tabletAnimation} and {@link mobileAnimation}.
|
|
159
177
|
* @private
|
|
160
178
|
*/
|
|
161
179
|
private renderTiming;
|
|
@@ -8,7 +8,6 @@ import { customElement, property } from "lit/decorators.js";
|
|
|
8
8
|
import { html, LitElement, nothing } from "lit";
|
|
9
9
|
import { animateStyles } from "./animate.styles.js";
|
|
10
10
|
import { mediaBelow } from "../../../breakpoints.js";
|
|
11
|
-
import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
|
|
12
11
|
/**
|
|
13
12
|
* Tag name of the animate component.
|
|
14
13
|
*/
|
|
@@ -35,14 +34,17 @@ const IN_VIEW_ATTR = "in-view";
|
|
|
35
34
|
* @prop {EunomiaAnimateAnimation} [animation='fade'] - Which transition to apply. None renders the content immediately, with no transition
|
|
36
35
|
* @prop {number} [duration=1000] - The transition duration, in milliseconds. Left unset, it follows --animate-duration
|
|
37
36
|
* @prop {number} [delay=0] - The transition delay, in milliseconds
|
|
38
|
-
* @prop {number} [
|
|
39
|
-
* @attr {number} [
|
|
37
|
+
* @prop {number} [laptopDelay] - Overrides `delay` below the laptop breakpoint (width < 1024px)
|
|
38
|
+
* @attr {number} [laptop-delay] - Overrides `delay` below the laptop breakpoint (width < 1024px)
|
|
39
|
+
* @prop {number} [tabletDelay] - Overrides `delay` (and `laptopDelay`, if also set) below the tablet breakpoint (width < 768px)
|
|
40
|
+
* @attr {number} [tablet-delay] - Overrides `delay` (and `laptopDelay`, if also set) below the tablet breakpoint (width < 768px)
|
|
40
41
|
* @prop {number} [mobileDelay] - Overrides `delay` (and `tabletDelay`, if also set) below the mobile breakpoint (width < 600px)
|
|
41
42
|
* @attr {number} [mobile-delay] - Overrides `delay` (and `tabletDelay`, if also set) below the mobile breakpoint (width < 600px)
|
|
42
|
-
* @prop {boolean} [once=
|
|
43
|
+
* @prop {boolean} [once=false] - Whether the animation plays only the first time it enters the viewport, or replays every time it re-enters
|
|
43
44
|
* @prop {number} [threshold=0.1] - The ratio of the element, from 0 to 1, that must be visible before the animation triggers
|
|
44
45
|
* @prop {string} [rootMargin='0px'] - The margin applied around the viewport before threshold is evaluated, accepting CSS-like values such as -50px 0px
|
|
45
|
-
* @prop {EunomiaAnimateAnimation} [
|
|
46
|
+
* @prop {EunomiaAnimateAnimation} [laptopAnimation] - Overrides `animation` below the laptop breakpoint (width < 1024px). Left unset, the viewport keeps using `animation`
|
|
47
|
+
* @prop {EunomiaAnimateAnimation} [tabletAnimation] - Overrides `animation` (and `laptopAnimation`, if also set) below the tablet breakpoint (width < 768px)
|
|
46
48
|
* @prop {EunomiaAnimateAnimation} [mobileAnimation] - Overrides `animation` (and `tabletAnimation`, if also set) below the mobile breakpoint (width < 600px)
|
|
47
49
|
* @cssprop [--animate-distance] - Sets the travel distance for the scroll and faded-scroll animations
|
|
48
50
|
* @cssprop [--animate-duration=1000ms] - Sets the transition duration of every animate that has no duration of its own, for example once for the whole site
|
|
@@ -66,9 +68,9 @@ let EunomiaAnimate = class EunomiaAnimate extends LitElement {
|
|
|
66
68
|
/**
|
|
67
69
|
* Whether the animation plays only the first time it enters the
|
|
68
70
|
* viewport (unobserved right after), or replays every time it re-enters.
|
|
69
|
-
* @default
|
|
71
|
+
* @default false
|
|
70
72
|
*/
|
|
71
|
-
this.once =
|
|
73
|
+
this.once = false;
|
|
72
74
|
/**
|
|
73
75
|
* Ratio (0-1) of the element that must be visible before the animation
|
|
74
76
|
* triggers.
|
|
@@ -83,17 +85,18 @@ let EunomiaAnimate = class EunomiaAnimate extends LitElement {
|
|
|
83
85
|
this.rootMargin = "0px";
|
|
84
86
|
}
|
|
85
87
|
/**
|
|
86
|
-
* Whether at least one of `animation`, `
|
|
87
|
-
* `mobileAnimation` is set to something other than `"none"` — i.e.
|
|
88
|
+
* Whether at least one of `animation`, `laptopAnimation`,
|
|
89
|
+
* `tabletAnimation`, or `mobileAnimation` is set to something other than `"none"` — i.e.
|
|
88
90
|
* whether *some* viewport width could actually reveal an animation, and
|
|
89
91
|
* the observer is therefore worth setting up at all. Deliberately
|
|
90
|
-
* ignores the current viewport width itself: which of the
|
|
92
|
+
* ignores the current viewport width itself: which of the four ends up
|
|
91
93
|
* active is a CSS `@media` decision, not something this component reads
|
|
92
|
-
* from JS (see {@link
|
|
94
|
+
* from JS (see {@link laptopAnimation}).
|
|
93
95
|
* @private
|
|
94
96
|
*/
|
|
95
97
|
get hasAnyAnimation() {
|
|
96
98
|
return (this.animation !== "none" ||
|
|
99
|
+
(this.laptopAnimation !== undefined && this.laptopAnimation !== "none") ||
|
|
97
100
|
(this.tabletAnimation !== undefined && this.tabletAnimation !== "none") ||
|
|
98
101
|
(this.mobileAnimation !== undefined && this.mobileAnimation !== "none"));
|
|
99
102
|
}
|
|
@@ -109,6 +112,7 @@ let EunomiaAnimate = class EunomiaAnimate extends LitElement {
|
|
|
109
112
|
super.updated(changed);
|
|
110
113
|
if (this.isConnected &&
|
|
111
114
|
(changed.has("animation") ||
|
|
115
|
+
changed.has("laptopAnimation") ||
|
|
112
116
|
changed.has("tabletAnimation") ||
|
|
113
117
|
changed.has("mobileAnimation") ||
|
|
114
118
|
changed.has("threshold") ||
|
|
@@ -156,8 +160,8 @@ let EunomiaAnimate = class EunomiaAnimate extends LitElement {
|
|
|
156
160
|
* host's transition through a shadow-internal `<style>`, only when they
|
|
157
161
|
* differ from the stylesheet's own defaults : an inline style on the host
|
|
158
162
|
* would be a hydration mismatch for an SSR framework, since the server
|
|
159
|
-
* never renders it. The breakpoints match {@link
|
|
160
|
-
* {@link mobileAnimation}.
|
|
163
|
+
* never renders it. The breakpoints match {@link laptopAnimation},
|
|
164
|
+
* {@link tabletAnimation} and {@link mobileAnimation}.
|
|
161
165
|
* @private
|
|
162
166
|
*/
|
|
163
167
|
renderTiming() {
|
|
@@ -169,6 +173,9 @@ let EunomiaAnimate = class EunomiaAnimate extends LitElement {
|
|
|
169
173
|
].join("");
|
|
170
174
|
const rules = [
|
|
171
175
|
host ? `:host { ${host} }` : "",
|
|
176
|
+
this.laptopDelay !== undefined
|
|
177
|
+
? `@media ${mediaBelow("laptop")} { :host { --_delay: ${Number(this.laptopDelay)}ms; } }`
|
|
178
|
+
: "",
|
|
172
179
|
this.tabletDelay !== undefined
|
|
173
180
|
? `@media ${mediaBelow("tablet")} { :host { --_delay: ${Number(this.tabletDelay)}ms; } }`
|
|
174
181
|
: "",
|
|
@@ -203,6 +210,9 @@ __decorate([
|
|
|
203
210
|
__decorate([
|
|
204
211
|
property({ type: Number })
|
|
205
212
|
], EunomiaAnimate.prototype, "delay", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
property({ type: Number, attribute: "laptop-delay" })
|
|
215
|
+
], EunomiaAnimate.prototype, "laptopDelay", void 0);
|
|
206
216
|
__decorate([
|
|
207
217
|
property({ type: Number, attribute: "tablet-delay" })
|
|
208
218
|
], EunomiaAnimate.prototype, "tabletDelay", void 0);
|
|
@@ -210,7 +220,7 @@ __decorate([
|
|
|
210
220
|
property({ type: Number, attribute: "mobile-delay" })
|
|
211
221
|
], EunomiaAnimate.prototype, "mobileDelay", void 0);
|
|
212
222
|
__decorate([
|
|
213
|
-
property({
|
|
223
|
+
property({ type: Boolean })
|
|
214
224
|
], EunomiaAnimate.prototype, "once", void 0);
|
|
215
225
|
__decorate([
|
|
216
226
|
property({ type: Number })
|
|
@@ -218,6 +228,9 @@ __decorate([
|
|
|
218
228
|
__decorate([
|
|
219
229
|
property({ attribute: "root-margin" })
|
|
220
230
|
], EunomiaAnimate.prototype, "rootMargin", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ attribute: "laptop-animation", reflect: true })
|
|
233
|
+
], EunomiaAnimate.prototype, "laptopAnimation", void 0);
|
|
221
234
|
__decorate([
|
|
222
235
|
property({ attribute: "tablet-animation", reflect: true })
|
|
223
236
|
], EunomiaAnimate.prototype, "tabletAnimation", void 0);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSResult } from "lit";
|
|
2
|
+
export declare const animateStyles: CSSResult[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
1
|
+
import { css, unsafeCSS } from "lit";
|
|
2
2
|
import { cssBelow } from "../../../utils/media.styles.js";
|
|
3
3
|
/**
|
|
4
4
|
* Base style for the animate component.
|
|
@@ -106,181 +106,109 @@ const base = css `
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
`;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
transition-property: transform;
|
|
216
|
-
}
|
|
217
|
-
:host([mobile-animation="scroll-right"][in-view]) {
|
|
218
|
-
transform: translateX(0);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
:host([mobile-animation="scroll-left"]) {
|
|
222
|
-
transform: translateX(var(--_distance));
|
|
223
|
-
transition-property: transform;
|
|
224
|
-
}
|
|
225
|
-
:host([mobile-animation="scroll-left"][in-view]) {
|
|
226
|
-
transform: translateX(0);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
:host([mobile-animation="scroll-top"]) {
|
|
230
|
-
transform: translateY(var(--_distance));
|
|
231
|
-
transition-property: transform;
|
|
232
|
-
}
|
|
233
|
-
:host([mobile-animation="scroll-top"][in-view]) {
|
|
234
|
-
transform: translateY(0);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
:host([mobile-animation="scroll-bottom"]) {
|
|
238
|
-
transform: translateY(calc(-1 * var(--_distance)));
|
|
239
|
-
transition-property: transform;
|
|
240
|
-
}
|
|
241
|
-
:host([mobile-animation="scroll-bottom"][in-view]) {
|
|
242
|
-
transform: translateY(0);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
:host([mobile-animation="faded-scroll-right"]) {
|
|
246
|
-
opacity: 0;
|
|
247
|
-
transform: translateX(calc(-1 * var(--_distance)));
|
|
248
|
-
transition-property: opacity, transform;
|
|
249
|
-
}
|
|
250
|
-
:host([mobile-animation="faded-scroll-right"][in-view]) {
|
|
251
|
-
opacity: 1;
|
|
252
|
-
transform: translateX(0);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
:host([mobile-animation="faded-scroll-left"]) {
|
|
256
|
-
opacity: 0;
|
|
257
|
-
transform: translateX(var(--_distance));
|
|
258
|
-
transition-property: opacity, transform;
|
|
259
|
-
}
|
|
260
|
-
:host([mobile-animation="faded-scroll-left"][in-view]) {
|
|
261
|
-
opacity: 1;
|
|
262
|
-
transform: translateX(0);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
:host([mobile-animation="faded-scroll-top"]) {
|
|
266
|
-
opacity: 0;
|
|
267
|
-
transform: translateY(var(--_distance));
|
|
268
|
-
transition-property: opacity, transform;
|
|
269
|
-
}
|
|
270
|
-
:host([mobile-animation="faded-scroll-top"][in-view]) {
|
|
271
|
-
opacity: 1;
|
|
272
|
-
transform: translateY(0);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
:host([mobile-animation="faded-scroll-bottom"]) {
|
|
276
|
-
opacity: 0;
|
|
277
|
-
transform: translateY(calc(-1 * var(--_distance)));
|
|
278
|
-
transition-property: opacity, transform;
|
|
279
|
-
}
|
|
280
|
-
:host([mobile-animation="faded-scroll-bottom"][in-view]) {
|
|
281
|
-
opacity: 1;
|
|
282
|
-
transform: translateY(0);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
`;
|
|
286
|
-
export const animateStyles = [base, breakpoints];
|
|
109
|
+
/**
|
|
110
|
+
* The rules switching to `<breakpoint>-animation` below that breakpoint,
|
|
111
|
+
* the same for every breakpoint the component exposes.
|
|
112
|
+
*
|
|
113
|
+
* @param breakpoint the breakpoint the override applies under.
|
|
114
|
+
* @returns the breakpoint's `@media` block.
|
|
115
|
+
*/
|
|
116
|
+
function breakpointOverride(breakpoint) {
|
|
117
|
+
const attribute = unsafeCSS(`${breakpoint}-animation`);
|
|
118
|
+
return css `
|
|
119
|
+
@media ${cssBelow(breakpoint)} {
|
|
120
|
+
:host([${attribute}="none"]) {
|
|
121
|
+
opacity: 1;
|
|
122
|
+
transform: none;
|
|
123
|
+
transition-property: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:host([${attribute}="fade"]) {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
transition-property: opacity;
|
|
129
|
+
}
|
|
130
|
+
:host([${attribute}="fade"][in-view]) {
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:host([${attribute}="scroll-right"]) {
|
|
135
|
+
transform: translateX(calc(-1 * var(--_distance)));
|
|
136
|
+
transition-property: transform;
|
|
137
|
+
}
|
|
138
|
+
:host([${attribute}="scroll-right"][in-view]) {
|
|
139
|
+
transform: translateX(0);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
:host([${attribute}="scroll-left"]) {
|
|
143
|
+
transform: translateX(var(--_distance));
|
|
144
|
+
transition-property: transform;
|
|
145
|
+
}
|
|
146
|
+
:host([${attribute}="scroll-left"][in-view]) {
|
|
147
|
+
transform: translateX(0);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:host([${attribute}="scroll-top"]) {
|
|
151
|
+
transform: translateY(var(--_distance));
|
|
152
|
+
transition-property: transform;
|
|
153
|
+
}
|
|
154
|
+
:host([${attribute}="scroll-top"][in-view]) {
|
|
155
|
+
transform: translateY(0);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:host([${attribute}="scroll-bottom"]) {
|
|
159
|
+
transform: translateY(calc(-1 * var(--_distance)));
|
|
160
|
+
transition-property: transform;
|
|
161
|
+
}
|
|
162
|
+
:host([${attribute}="scroll-bottom"][in-view]) {
|
|
163
|
+
transform: translateY(0);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:host([${attribute}="faded-scroll-right"]) {
|
|
167
|
+
opacity: 0;
|
|
168
|
+
transform: translateX(calc(-1 * var(--_distance)));
|
|
169
|
+
transition-property: opacity, transform;
|
|
170
|
+
}
|
|
171
|
+
:host([${attribute}="faded-scroll-right"][in-view]) {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
transform: translateX(0);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:host([${attribute}="faded-scroll-left"]) {
|
|
177
|
+
opacity: 0;
|
|
178
|
+
transform: translateX(var(--_distance));
|
|
179
|
+
transition-property: opacity, transform;
|
|
180
|
+
}
|
|
181
|
+
:host([${attribute}="faded-scroll-left"][in-view]) {
|
|
182
|
+
opacity: 1;
|
|
183
|
+
transform: translateX(0);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:host([${attribute}="faded-scroll-top"]) {
|
|
187
|
+
opacity: 0;
|
|
188
|
+
transform: translateY(var(--_distance));
|
|
189
|
+
transition-property: opacity, transform;
|
|
190
|
+
}
|
|
191
|
+
:host([${attribute}="faded-scroll-top"][in-view]) {
|
|
192
|
+
opacity: 1;
|
|
193
|
+
transform: translateY(0);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:host([${attribute}="faded-scroll-bottom"]) {
|
|
197
|
+
opacity: 0;
|
|
198
|
+
transform: translateY(calc(-1 * var(--_distance)));
|
|
199
|
+
transition-property: opacity, transform;
|
|
200
|
+
}
|
|
201
|
+
:host([${attribute}="faded-scroll-bottom"][in-view]) {
|
|
202
|
+
opacity: 1;
|
|
203
|
+
transform: translateY(0);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
`;
|
|
207
|
+
}
|
|
208
|
+
// Widest first, so a narrower breakpoint's override wins once both match.
|
|
209
|
+
const breakpoints = [
|
|
210
|
+
breakpointOverride("laptop"),
|
|
211
|
+
breakpointOverride("tablet"),
|
|
212
|
+
breakpointOverride("mobile"),
|
|
213
|
+
];
|
|
214
|
+
export const animateStyles = [base, ...breakpoints];
|
|
@@ -21,6 +21,7 @@ export type EunomiaDividerOrientation = "horizontal" | "vertical";
|
|
|
21
21
|
* @prop {EunomiaDividerOrientation} [orientation='horizontal'] - The direction the line runs along
|
|
22
22
|
* @cssprop [--divider-color] - Sets the color of the line, defaulting to the shared border color token
|
|
23
23
|
* @cssprop [--divider-spacing] - Sets the margin on either side of the line, along its perpendicular axis
|
|
24
|
+
* @csspart line - The line itself, carrying its color and spacing
|
|
24
25
|
* @element eun-divider
|
|
25
26
|
*/
|
|
26
27
|
export declare class EunomiaDivider extends LitElement {
|
|
@@ -25,6 +25,7 @@ export const EunomiaDividerTagName = "eun-divider";
|
|
|
25
25
|
* @prop {EunomiaDividerOrientation} [orientation='horizontal'] - The direction the line runs along
|
|
26
26
|
* @cssprop [--divider-color] - Sets the color of the line, defaulting to the shared border color token
|
|
27
27
|
* @cssprop [--divider-spacing] - Sets the margin on either side of the line, along its perpendicular axis
|
|
28
|
+
* @csspart line - The line itself, carrying its color and spacing
|
|
28
29
|
* @element eun-divider
|
|
29
30
|
*/
|
|
30
31
|
let EunomiaDivider = class EunomiaDivider extends LitElement {
|
|
@@ -52,7 +53,7 @@ let EunomiaDivider = class EunomiaDivider extends LitElement {
|
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
render() {
|
|
55
|
-
return html
|
|
56
|
+
return html `<div id="line" part="line"></div>`;
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
@@ -13,18 +13,19 @@ const base = css `
|
|
|
13
13
|
display: block;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
:host(
|
|
17
|
-
|
|
16
|
+
:host([orientation="vertical"]) {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-self: stretch;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host(:is([orientation="horizontal"], :not([orientation]))) #line {
|
|
18
22
|
height: 0;
|
|
19
23
|
margin-block: var(--_spacing);
|
|
20
24
|
border-block-start: 1px solid var(--_color);
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
:host([orientation="vertical"]) {
|
|
24
|
-
display: inline-block;
|
|
25
|
-
align-self: stretch;
|
|
27
|
+
:host([orientation="vertical"]) #line {
|
|
26
28
|
width: 0;
|
|
27
|
-
height: auto;
|
|
28
29
|
margin-inline: var(--_spacing);
|
|
29
30
|
border-inline-start: 1px solid var(--_color);
|
|
30
31
|
}
|
|
@@ -60,7 +60,7 @@ export const infiniteListStyles = css `
|
|
|
60
60
|
#empty {
|
|
61
61
|
padding: var(--eun-space-m, 16px) 0;
|
|
62
62
|
text-align: center;
|
|
63
|
-
color: var(--infinite-list-end-color, var(--eun-text-secondary, #
|
|
63
|
+
color: var(--infinite-list-end-color, var(--eun-text-secondary, #666e8a));
|
|
64
64
|
}
|
|
65
65
|
.visually-hidden {
|
|
66
66
|
position: absolute;
|
|
@@ -42,7 +42,7 @@ export const breadcrumbStyles = css `
|
|
|
42
42
|
overflow: hidden;
|
|
43
43
|
text-overflow: ellipsis;
|
|
44
44
|
white-space: nowrap;
|
|
45
|
-
color: var(--breadcrumb-current-color, var(--eun-text-secondary, #
|
|
45
|
+
color: var(--breadcrumb-current-color, var(--eun-text-secondary, #666e8a));
|
|
46
46
|
font-weight: var(--eun-font-weight-m, 500);
|
|
47
47
|
}
|
|
48
48
|
::slotted(a[href]) {
|
|
@@ -73,7 +73,7 @@ export const breadcrumbStyles = css `
|
|
|
73
73
|
}
|
|
74
74
|
::slotted(a[aria-current="page"]),
|
|
75
75
|
::slotted(a[aria-current="page"]:hover) {
|
|
76
|
-
color: var(--breadcrumb-current-color, var(--eun-text-secondary, #
|
|
76
|
+
color: var(--breadcrumb-current-color, var(--eun-text-secondary, #666e8a));
|
|
77
77
|
font-weight: var(--eun-font-weight-m, 500);
|
|
78
78
|
text-decoration: none;
|
|
79
79
|
}
|
|
@@ -81,7 +81,7 @@ export const breadcrumbStyles = css `
|
|
|
81
81
|
margin-inline: var(--breadcrumb-separator-gap, var(--eun-space-s, 8px));
|
|
82
82
|
color: var(
|
|
83
83
|
--breadcrumb-separator-color,
|
|
84
|
-
var(--eun-text-secondary, #
|
|
84
|
+
var(--eun-text-secondary, #666e8a)
|
|
85
85
|
);
|
|
86
86
|
user-select: none;
|
|
87
87
|
}
|