@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
|
@@ -29,6 +29,56 @@ export declare const GUEST_STATUS_ICON: Record<EunomiaSchedulerGuestStatus, Euno
|
|
|
29
29
|
* `severity` prop in the editor.
|
|
30
30
|
*/
|
|
31
31
|
export declare const GUEST_STATUS_SEMANTIC_STATE: Record<EunomiaSchedulerGuestStatus, EunomiaChipSeverity>;
|
|
32
|
+
/**
|
|
33
|
+
* The six preset event colors, each with its `500` hex (the value the
|
|
34
|
+
* editor's swatches store, and an alias of the name itself) and the two
|
|
35
|
+
* token shades the chip is tinted with.
|
|
36
|
+
*/
|
|
37
|
+
export declare const EVENT_COLOR_PRESETS: readonly [{
|
|
38
|
+
readonly name: "red";
|
|
39
|
+
readonly hex: "#f14959";
|
|
40
|
+
readonly accent: "#ed1b2f";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "purple";
|
|
43
|
+
readonly hex: "#9562e3";
|
|
44
|
+
readonly accent: "#991bed";
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "yellow";
|
|
47
|
+
readonly hex: "#f0f050";
|
|
48
|
+
readonly accent: "#e0e000";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "blue";
|
|
51
|
+
readonly hex: "#3bb3b9";
|
|
52
|
+
readonly accent: "#0aa5a8";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "green";
|
|
55
|
+
readonly hex: "#49f15f";
|
|
56
|
+
readonly accent: "#1bed22";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "pink";
|
|
59
|
+
readonly hex: "#d05df3";
|
|
60
|
+
readonly accent: "#c300ff";
|
|
61
|
+
}];
|
|
62
|
+
/**
|
|
63
|
+
* Normalizes an event color to a lowercase `#rrggbb` hex : a preset name
|
|
64
|
+
* becomes its `500` hex, a color `normalizeHexColor` recognizes its hex,
|
|
65
|
+
* and anything else is returned as is.
|
|
66
|
+
*
|
|
67
|
+
* @param color a preset name or a color.
|
|
68
|
+
*/
|
|
69
|
+
export declare function toEventColorHex(color: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* The CSS colors an event color resolves to : the preset's own token
|
|
72
|
+
* shades for a preset name or its `500` hex, the normalized hex for any
|
|
73
|
+
* other color `normalizeHexColor` recognizes (`#rgb`, `#rrggbb`,
|
|
74
|
+
* `rgb()`), and `null` for anything else.
|
|
75
|
+
*
|
|
76
|
+
* @param color a preset name or a color.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveEventColor(color: string): {
|
|
79
|
+
accent: string;
|
|
80
|
+
tint: string;
|
|
81
|
+
} | null;
|
|
32
82
|
/**
|
|
33
83
|
* An inclusive `[start, end]` calendar range, at day boundaries.
|
|
34
84
|
*/
|
|
@@ -59,6 +109,17 @@ export declare function getVisibleRange(view: EunomiaSchedulerView, displayedDat
|
|
|
59
109
|
* @returns the new anchor date.
|
|
60
110
|
*/
|
|
61
111
|
export declare function addPeriod(view: EunomiaSchedulerView, date: Date, direction: 1 | -1): Date;
|
|
112
|
+
/**
|
|
113
|
+
* The last instant `event` actually covers. A timed event's `end` is
|
|
114
|
+
* exclusive, so one ending exactly at midnight stops on the day before :
|
|
115
|
+
* 29 00:00 → 31 00:00 covers the 29th and 30th only, and 10:00 → 00:00
|
|
116
|
+
* the next day stays a same-day event. An all-day event's `end` names its
|
|
117
|
+
* last day instead, so it's returned as is.
|
|
118
|
+
*
|
|
119
|
+
* @param event the event to check.
|
|
120
|
+
* @returns the event's inclusive end.
|
|
121
|
+
*/
|
|
122
|
+
export declare function inclusiveEnd(event: EunomiaSchedulerEvent): Date;
|
|
62
123
|
/**
|
|
63
124
|
* Whether `event` is all-day, or spans more than one calendar day — either
|
|
64
125
|
* way, it belongs in the all-day row above the hour grid rather than as a
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { addDays, addMonths, addWeeks, addYears, endOfDay, endOfYear, getCalendarMonthMatrix, isSameDay, isWeekend, startOfDay, startOfYear, } from "../../../utils/date.utils.js";
|
|
2
|
+
import { normalizeHexColor } from "../../../utils/color.utils.js";
|
|
2
3
|
/**
|
|
3
4
|
* `priority` → the `eun-tag` severity it's rendered with in the read-only
|
|
4
5
|
* popover (`--eun-color-<state>-*`) — the only color scale in the library
|
|
@@ -37,6 +38,59 @@ export const GUEST_STATUS_SEMANTIC_STATE = {
|
|
|
37
38
|
confirmed: "success",
|
|
38
39
|
declined: "critical",
|
|
39
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* The six preset event colors, each with its `500` hex (the value the
|
|
43
|
+
* editor's swatches store, and an alias of the name itself) and the two
|
|
44
|
+
* token shades the chip is tinted with.
|
|
45
|
+
*/
|
|
46
|
+
export const EVENT_COLOR_PRESETS = [
|
|
47
|
+
{ name: "red", hex: "#f14959", accent: "#ed1b2f" },
|
|
48
|
+
{ name: "purple", hex: "#9562e3", accent: "#991bed" },
|
|
49
|
+
{ name: "yellow", hex: "#f0f050", accent: "#e0e000" },
|
|
50
|
+
{ name: "blue", hex: "#3bb3b9", accent: "#0aa5a8" },
|
|
51
|
+
{ name: "green", hex: "#49f15f", accent: "#1bed22" },
|
|
52
|
+
{ name: "pink", hex: "#d05df3", accent: "#c300ff" },
|
|
53
|
+
];
|
|
54
|
+
/**
|
|
55
|
+
* The preset an event color names, by its name or its `500` hex alike,
|
|
56
|
+
* the hex being compared once normalized by `eun-color-picker`'s own
|
|
57
|
+
* `normalizeHexColor`.
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
function findColorPreset(color, hex) {
|
|
61
|
+
const name = color.trim().toLowerCase();
|
|
62
|
+
return EVENT_COLOR_PRESETS.find((preset) => preset.name === name || preset.hex === hex);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Normalizes an event color to a lowercase `#rrggbb` hex : a preset name
|
|
66
|
+
* becomes its `500` hex, a color `normalizeHexColor` recognizes its hex,
|
|
67
|
+
* and anything else is returned as is.
|
|
68
|
+
*
|
|
69
|
+
* @param color a preset name or a color.
|
|
70
|
+
*/
|
|
71
|
+
export function toEventColorHex(color) {
|
|
72
|
+
const hex = normalizeHexColor(color);
|
|
73
|
+
return findColorPreset(color, hex)?.hex ?? hex ?? color;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The CSS colors an event color resolves to : the preset's own token
|
|
77
|
+
* shades for a preset name or its `500` hex, the normalized hex for any
|
|
78
|
+
* other color `normalizeHexColor` recognizes (`#rgb`, `#rrggbb`,
|
|
79
|
+
* `rgb()`), and `null` for anything else.
|
|
80
|
+
*
|
|
81
|
+
* @param color a preset name or a color.
|
|
82
|
+
*/
|
|
83
|
+
export function resolveEventColor(color) {
|
|
84
|
+
const hex = normalizeHexColor(color);
|
|
85
|
+
const preset = findColorPreset(color, hex);
|
|
86
|
+
if (preset) {
|
|
87
|
+
return {
|
|
88
|
+
accent: `var(--eun-color-${preset.name}-600, ${preset.accent})`,
|
|
89
|
+
tint: `var(--eun-color-${preset.name}-500, ${preset.hex})`,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
return hex ? { accent: hex, tint: hex } : null;
|
|
93
|
+
}
|
|
40
94
|
/**
|
|
41
95
|
* The full visible range for `view`, anchored on `displayedDate` : the day
|
|
42
96
|
* itself, the 7-day week/work-week containing it, the 6-week grid a month
|
|
@@ -105,6 +159,23 @@ export function addPeriod(view, date, direction) {
|
|
|
105
159
|
return date;
|
|
106
160
|
}
|
|
107
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* The last instant `event` actually covers. A timed event's `end` is
|
|
164
|
+
* exclusive, so one ending exactly at midnight stops on the day before :
|
|
165
|
+
* 29 00:00 → 31 00:00 covers the 29th and 30th only, and 10:00 → 00:00
|
|
166
|
+
* the next day stays a same-day event. An all-day event's `end` names its
|
|
167
|
+
* last day instead, so it's returned as is.
|
|
168
|
+
*
|
|
169
|
+
* @param event the event to check.
|
|
170
|
+
* @returns the event's inclusive end.
|
|
171
|
+
*/
|
|
172
|
+
export function inclusiveEnd(event) {
|
|
173
|
+
const endsAtMidnight = startOfDay(event.end).getTime() === event.end.getTime();
|
|
174
|
+
if (event.allDay || !endsAtMidnight || event.end <= event.start) {
|
|
175
|
+
return event.end;
|
|
176
|
+
}
|
|
177
|
+
return new Date(event.end.getTime() - 1);
|
|
178
|
+
}
|
|
108
179
|
/**
|
|
109
180
|
* Whether `event` is all-day, or spans more than one calendar day — either
|
|
110
181
|
* way, it belongs in the all-day row above the hour grid rather than as a
|
|
@@ -113,7 +184,7 @@ export function addPeriod(view, date, direction) {
|
|
|
113
184
|
* @param event the event to check.
|
|
114
185
|
*/
|
|
115
186
|
export function isMultiDay(event) {
|
|
116
|
-
return !!event.allDay || !isSameDay(event.start, event
|
|
187
|
+
return !!event.allDay || !isSameDay(event.start, inclusiveEnd(event));
|
|
117
188
|
}
|
|
118
189
|
/**
|
|
119
190
|
* The *timed*, same-day events starting on `day` (local calendar day),
|
|
@@ -143,7 +214,8 @@ export function eventsOnDay(events, day) {
|
|
|
143
214
|
const dayStart = startOfDay(day).getTime();
|
|
144
215
|
const dayEnd = endOfDay(day).getTime();
|
|
145
216
|
return events
|
|
146
|
-
.filter((event) => event.start.getTime() <= dayEnd &&
|
|
217
|
+
.filter((event) => event.start.getTime() <= dayEnd &&
|
|
218
|
+
inclusiveEnd(event).getTime() >= dayStart)
|
|
147
219
|
.sort((a, b) => a.start.getTime() - b.start.getTime());
|
|
148
220
|
}
|
|
149
221
|
/**
|
|
@@ -219,12 +291,14 @@ function layoutBars(candidates, days) {
|
|
|
219
291
|
const rangeStart = startOfDay(days[0]).getTime();
|
|
220
292
|
const rangeEnd = endOfDay(days[days.length - 1]).getTime();
|
|
221
293
|
const bars = candidates
|
|
222
|
-
.filter((event) => event.start.getTime() <= rangeEnd &&
|
|
294
|
+
.filter((event) => event.start.getTime() <= rangeEnd &&
|
|
295
|
+
inclusiveEnd(event).getTime() >= rangeStart)
|
|
223
296
|
.map((event) => {
|
|
297
|
+
const end = inclusiveEnd(event).getTime();
|
|
224
298
|
const startIndex = Math.max(days.findIndex((day) => endOfDay(day).getTime() >= event.start.getTime()), 0);
|
|
225
299
|
let endIndex = days.length - 1;
|
|
226
300
|
for (let index = 0; index < days.length; index += 1) {
|
|
227
|
-
if (startOfDay(days[index]).getTime() >
|
|
301
|
+
if (startOfDay(days[index]).getTime() > end) {
|
|
228
302
|
endIndex = index - 1;
|
|
229
303
|
break;
|
|
230
304
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
+
import { cssBelow } from "../../../utils/media.styles.js";
|
|
2
3
|
/**
|
|
3
4
|
* Light DOM style of the native `<table>` slotted into `eun-table`. A
|
|
4
5
|
* shadow root can't reach a slotted table's rows and cells, so `eun-table`
|
|
@@ -319,7 +320,7 @@ export const tableNativeStyles = css `
|
|
|
319
320
|
);
|
|
320
321
|
text-align: center;
|
|
321
322
|
font-size: var(--eun-font-size-s, 13px);
|
|
322
|
-
color: var(--table-empty-color, var(--eun-text-secondary, #
|
|
323
|
+
color: var(--table-empty-color, var(--eun-text-secondary, #666e8a));
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
eun-table:not(:defined):is([loading], :has(> table > tbody > tr))
|
|
@@ -387,7 +388,10 @@ export const tableNativeStyles = css `
|
|
|
387
388
|
var(--eun-surface-color, #ffffff)
|
|
388
389
|
);
|
|
389
390
|
font-weight: var(--table-column-font-weight, var(--eun-font-weight-m, 500));
|
|
390
|
-
color: var(
|
|
391
|
+
color: var(
|
|
392
|
+
--table-header-color,
|
|
393
|
+
var(--table-column-color, var(--eun-text-secondary, #666e8a))
|
|
394
|
+
);
|
|
391
395
|
white-space: nowrap;
|
|
392
396
|
}
|
|
393
397
|
|
|
@@ -510,7 +514,7 @@ export const tableNativeStyles = css `
|
|
|
510
514
|
text-align: center;
|
|
511
515
|
white-space: nowrap;
|
|
512
516
|
font-variant-numeric: tabular-nums;
|
|
513
|
-
color: var(--table-row-number-color, var(--eun-text-secondary, #
|
|
517
|
+
color: var(--table-row-number-color, var(--eun-text-secondary, #666e8a));
|
|
514
518
|
background-color: var(
|
|
515
519
|
--table-sticky-column-background,
|
|
516
520
|
var(--table-row-background, var(--eun-surface-color, #ffffff))
|
|
@@ -617,7 +621,7 @@ export const tableNativeStyles = css `
|
|
|
617
621
|
--_table-action-opacity: 0 !important;
|
|
618
622
|
}
|
|
619
623
|
|
|
620
|
-
@media (hover: none) {
|
|
624
|
+
@media (hover: none), ${cssBelow("laptop")} {
|
|
621
625
|
eun-table > table > tbody > tr > [data-table-select] eun-checkbox {
|
|
622
626
|
opacity: 1;
|
|
623
627
|
}
|
|
@@ -131,7 +131,8 @@ declare const EunomiaTable_base: import("../../../utils/constructor.type.js").Co
|
|
|
131
131
|
* @cssprop [--table-row-selected-background] - Sets the tint of a selected body row
|
|
132
132
|
* @cssprop [--table-row-dragging-background] - Sets the tint of a row being reordered with `createDragReorder`
|
|
133
133
|
* @cssprop [--table-row-transition-duration] - Sets the duration of the hover and selection tint transitions
|
|
134
|
-
* @cssprop [--table-
|
|
134
|
+
* @cssprop [--table-header-color] - Sets the text color of the header cells
|
|
135
|
+
* @cssprop [--table-column-color] - Sets the text color of the header cells, while `--table-header-color` is unset
|
|
135
136
|
* @cssprop [--table-column-font-weight] - Sets the font weight of the header cells
|
|
136
137
|
* @cssprop [--table-header-padding-block] - Sets the vertical padding of the header cells, the body cells' own by default
|
|
137
138
|
* @cssprop [--table-header-padding-inline] - Sets the horizontal padding of the header cells, the body cells' own by default
|
|
@@ -201,7 +201,8 @@ const INTERACTIVE_SELECTOR = 'a[href], button, input, select, textarea, summary,
|
|
|
201
201
|
* @cssprop [--table-row-selected-background] - Sets the tint of a selected body row
|
|
202
202
|
* @cssprop [--table-row-dragging-background] - Sets the tint of a row being reordered with `createDragReorder`
|
|
203
203
|
* @cssprop [--table-row-transition-duration] - Sets the duration of the hover and selection tint transitions
|
|
204
|
-
* @cssprop [--table-
|
|
204
|
+
* @cssprop [--table-header-color] - Sets the text color of the header cells
|
|
205
|
+
* @cssprop [--table-column-color] - Sets the text color of the header cells, while `--table-header-color` is unset
|
|
205
206
|
* @cssprop [--table-column-font-weight] - Sets the font weight of the header cells
|
|
206
207
|
* @cssprop [--table-header-padding-block] - Sets the vertical padding of the header cells, the body cells' own by default
|
|
207
208
|
* @cssprop [--table-header-padding-inline] - Sets the horizontal padding of the header cells, the body cells' own by default
|
|
@@ -4,10 +4,12 @@ import { cssBelow } from "../../../utils/media.styles.js";
|
|
|
4
4
|
* Style for `eun-table`'s own shadow root. `#frame` is the table's border
|
|
5
5
|
* and its scroll container: a sticky header, column, or footer sticks
|
|
6
6
|
* relative to whichever ancestor actually scrolls, and this is the one
|
|
7
|
-
* meant to.
|
|
7
|
+
* meant to. Its top margin reserves room above it for the `<caption>`,
|
|
8
8
|
* which the light DOM sheet positions against the host, outside the
|
|
9
|
-
* frame's clipping.
|
|
10
|
-
*
|
|
9
|
+
* frame's clipping. That room is kept off `:host`, where a page reset
|
|
10
|
+
* such as `* { padding: 0 }` would win over it. The slotted native
|
|
11
|
+
* table itself is styled from the light DOM (see
|
|
12
|
+
* `table-native.styles.ts`).
|
|
11
13
|
*
|
|
12
14
|
* Custom css variables:
|
|
13
15
|
* [--table-border-color] - Set a custom border color
|
|
@@ -25,7 +27,6 @@ const base = css `
|
|
|
25
27
|
position: relative;
|
|
26
28
|
box-sizing: border-box;
|
|
27
29
|
max-height: var(--table-max-height, none);
|
|
28
|
-
padding-top: var(--_table-caption-height, 0px);
|
|
29
30
|
font-family: var(--eun-font-family, "Mulish", sans-serif);
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -48,6 +49,7 @@ const base = css `
|
|
|
48
49
|
#frame {
|
|
49
50
|
flex: 1 1 auto;
|
|
50
51
|
min-height: 0;
|
|
52
|
+
margin-top: var(--_table-caption-height, 0px);
|
|
51
53
|
box-sizing: border-box;
|
|
52
54
|
border: var(--table-border-width, var(--eun-border-width-s, 1px)) solid
|
|
53
55
|
var(--table-border-color, var(--eun-border-color, #dee0e7));
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export declare const en: {
|
|
|
20
20
|
noResults: string;
|
|
21
21
|
keepEditing: string;
|
|
22
22
|
discard: string;
|
|
23
|
+
discardChangesHeading: string;
|
|
24
|
+
discardChangesDescription: string;
|
|
23
25
|
};
|
|
24
26
|
datePicker: {
|
|
25
27
|
openCalendar: string;
|
|
@@ -96,6 +98,7 @@ export declare const en: {
|
|
|
96
98
|
next: string;
|
|
97
99
|
calendarView: string;
|
|
98
100
|
newEvent: string;
|
|
101
|
+
deleteConfirm: string;
|
|
99
102
|
viewDay: string;
|
|
100
103
|
viewWeek: string;
|
|
101
104
|
viewWorkWeek: string;
|
|
@@ -263,6 +266,8 @@ export declare const en: {
|
|
|
263
266
|
priority: string;
|
|
264
267
|
color: string;
|
|
265
268
|
required: string;
|
|
269
|
+
titleRequired: string;
|
|
270
|
+
endBeforeStart: string;
|
|
266
271
|
guests: string;
|
|
267
272
|
addGuest: string;
|
|
268
273
|
removeGuest: string;
|
|
@@ -272,13 +277,25 @@ export declare const en: {
|
|
|
272
277
|
};
|
|
273
278
|
stepper: {
|
|
274
279
|
label: string;
|
|
280
|
+
substep: (index: number, total: number, label: string) => string;
|
|
275
281
|
};
|
|
276
282
|
validation: {
|
|
277
283
|
valueMissing: string;
|
|
284
|
+
typeMismatch: {
|
|
285
|
+
email: string;
|
|
286
|
+
url: string;
|
|
287
|
+
};
|
|
288
|
+
patternMismatch: string;
|
|
278
289
|
tooShort: (min: number, length: number) => string;
|
|
279
290
|
tooLong: (max: number, length: number) => string;
|
|
291
|
+
rangeUnderflow: (min: string) => string;
|
|
292
|
+
rangeOverflow: (max: string) => string;
|
|
293
|
+
stepMismatch: (lower: string, upper: string) => string;
|
|
294
|
+
badInput: string;
|
|
280
295
|
invalidDate: string;
|
|
296
|
+
unavailableDate: string;
|
|
281
297
|
invalidTime: string;
|
|
298
|
+
invalidColor: string;
|
|
282
299
|
};
|
|
283
300
|
};
|
|
284
301
|
/**
|
package/dist/i18n/en.js
CHANGED
|
@@ -20,6 +20,8 @@ export const en = {
|
|
|
20
20
|
noResults: "No results",
|
|
21
21
|
keepEditing: "Keep editing",
|
|
22
22
|
discard: "Discard",
|
|
23
|
+
discardChangesHeading: "Discard changes?",
|
|
24
|
+
discardChangesDescription: "You have unsaved changes. This action can't be undone.",
|
|
23
25
|
},
|
|
24
26
|
datePicker: {
|
|
25
27
|
openCalendar: "Open calendar",
|
|
@@ -78,6 +80,7 @@ export const en = {
|
|
|
78
80
|
next: "Next period",
|
|
79
81
|
calendarView: "Calendar view",
|
|
80
82
|
newEvent: "New event",
|
|
83
|
+
deleteConfirm: "Delete this event?",
|
|
81
84
|
viewDay: "Day",
|
|
82
85
|
viewWeek: "Week",
|
|
83
86
|
viewWorkWeek: "Work week",
|
|
@@ -245,6 +248,8 @@ export const en = {
|
|
|
245
248
|
priority: "Priority",
|
|
246
249
|
color: "Color",
|
|
247
250
|
required: "is required",
|
|
251
|
+
titleRequired: "Title is required",
|
|
252
|
+
endBeforeStart: "The end must be after the start",
|
|
248
253
|
guests: "Guests",
|
|
249
254
|
addGuest: "Add guest",
|
|
250
255
|
removeGuest: "Remove",
|
|
@@ -254,12 +259,24 @@ export const en = {
|
|
|
254
259
|
},
|
|
255
260
|
stepper: {
|
|
256
261
|
label: "Progress",
|
|
262
|
+
substep: (index, total, label) => `, step ${index} of ${total}: ${label}`,
|
|
257
263
|
},
|
|
258
264
|
validation: {
|
|
259
265
|
valueMissing: "This field is required",
|
|
266
|
+
typeMismatch: {
|
|
267
|
+
email: "Enter a valid email address",
|
|
268
|
+
url: "Enter a valid URL",
|
|
269
|
+
},
|
|
270
|
+
patternMismatch: "Match the requested format",
|
|
260
271
|
tooShort: (min, length) => `Please lengthen this text to ${min} characters or more (you are currently using ${length} characters).`,
|
|
261
272
|
tooLong: (max, length) => `Please shorten this text to ${max} characters or less (you are currently using ${length} characters).`,
|
|
273
|
+
rangeUnderflow: (min) => `Enter a value greater than or equal to ${min}`,
|
|
274
|
+
rangeOverflow: (max) => `Enter a value less than or equal to ${max}`,
|
|
275
|
+
stepMismatch: (lower, upper) => `Enter a valid value. The two nearest valid values are ${lower} and ${upper}`,
|
|
276
|
+
badInput: "Enter a valid value",
|
|
262
277
|
invalidDate: "Enter a valid date",
|
|
278
|
+
unavailableDate: "This date isn't available",
|
|
263
279
|
invalidTime: "Enter a valid time",
|
|
280
|
+
invalidColor: "Enter a valid color",
|
|
264
281
|
},
|
|
265
282
|
};
|
package/dist/i18n/fr.js
CHANGED
|
@@ -18,6 +18,8 @@ export const fr = {
|
|
|
18
18
|
noResults: "Aucun résultat",
|
|
19
19
|
keepEditing: "Continuer la modification",
|
|
20
20
|
discard: "Abandonner",
|
|
21
|
+
discardChangesHeading: "Abandonner les modifications\u00a0?",
|
|
22
|
+
discardChangesDescription: "Vos modifications non enregistrées seront perdues. Cette action est irréversible.",
|
|
21
23
|
},
|
|
22
24
|
datePicker: {
|
|
23
25
|
openCalendar: "Ouvrir le calendrier",
|
|
@@ -94,6 +96,7 @@ export const fr = {
|
|
|
94
96
|
next: "Période suivante",
|
|
95
97
|
calendarView: "Vue du calendrier",
|
|
96
98
|
newEvent: "Nouvel événement",
|
|
99
|
+
deleteConfirm: "Supprimer cet événement\u00a0?",
|
|
97
100
|
viewDay: "Jour",
|
|
98
101
|
viewWeek: "Semaine",
|
|
99
102
|
viewWorkWeek: "Semaine de travail",
|
|
@@ -265,6 +268,8 @@ export const fr = {
|
|
|
265
268
|
priority: "Priorité",
|
|
266
269
|
color: "Couleur",
|
|
267
270
|
required: "est obligatoire",
|
|
271
|
+
titleRequired: "Le titre est obligatoire",
|
|
272
|
+
endBeforeStart: "La fin doit être après le début",
|
|
268
273
|
guests: "Invités",
|
|
269
274
|
addGuest: "Ajouter un invité",
|
|
270
275
|
removeGuest: "Retirer",
|
|
@@ -274,12 +279,24 @@ export const fr = {
|
|
|
274
279
|
},
|
|
275
280
|
stepper: {
|
|
276
281
|
label: "Progression",
|
|
282
|
+
substep: (index, total, label) => `, étape ${index} sur ${total}\u00a0: ${label}`,
|
|
277
283
|
},
|
|
278
284
|
validation: {
|
|
279
285
|
valueMissing: "Ce champ est obligatoire",
|
|
286
|
+
typeMismatch: {
|
|
287
|
+
email: "Saisissez une adresse e-mail valide",
|
|
288
|
+
url: "Saisissez une URL valide",
|
|
289
|
+
},
|
|
290
|
+
patternMismatch: "Respectez le format demandé",
|
|
280
291
|
tooShort: (min, length) => `Saisissez au moins ${min} caractères (actuellement ${length}).`,
|
|
281
292
|
tooLong: (max, length) => `Saisissez au plus ${max} caractères (actuellement ${length}).`,
|
|
293
|
+
rangeUnderflow: (min) => `Saisissez une valeur supérieure ou égale à ${min}`,
|
|
294
|
+
rangeOverflow: (max) => `Saisissez une valeur inférieure ou égale à ${max}`,
|
|
295
|
+
stepMismatch: (lower, upper) => `Saisissez une valeur valide. Les deux valeurs valides les plus proches sont ${lower} et ${upper}`,
|
|
296
|
+
badInput: "Saisissez une valeur valide",
|
|
282
297
|
invalidDate: "Saisissez une date valide",
|
|
298
|
+
unavailableDate: "Cette date n'est pas disponible",
|
|
283
299
|
invalidTime: "Saisissez une heure valide",
|
|
300
|
+
invalidColor: "Saisissez une couleur valide",
|
|
284
301
|
},
|
|
285
302
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export { EunomiaTabPanel, EunomiaTabPanelTagName, } from "./components/navigatio
|
|
|
43
43
|
export { EunomiaCarousel, EunomiaCarouselTagName, } from "./components/navigation/carousel/carousel.js";
|
|
44
44
|
export type { EunomiaCarouselLayout } from "./components/navigation/carousel/carousel.js";
|
|
45
45
|
export { EunomiaBreadcrumb, EunomiaBreadcrumbTagName, } from "./components/navigation/breadcrumb/breadcrumb.js";
|
|
46
|
+
export { EunomiaNavMenu, EunomiaNavMenuTagName, } from "./components/navigation/nav-menu/nav-menu.js";
|
|
47
|
+
export type { EunomiaNavMenuPlacement, EunomiaNavMenuTrigger, } from "./components/navigation/nav-menu/nav-menu.js";
|
|
46
48
|
export { EunomiaPagination, EunomiaPaginationTagName, } from "./components/navigation/pagination/pagination.js";
|
|
47
49
|
export { EunomiaStepper, EunomiaStepperTagName, } from "./components/navigation/stepper/stepper.js";
|
|
48
50
|
export type { EunomiaStepperItemState, EunomiaStepperOrientation, EunomiaStepperStepData, EunomiaStepperSubstepData, EunomiaStepperVariant, } from "./components/navigation/stepper/stepper.js";
|
|
@@ -96,6 +98,8 @@ export { EunomiaSchedulerEventCard, EunomiaSchedulerEventCardTagName, } from "./
|
|
|
96
98
|
export type { EunomiaSchedulerEventAppearance } from "./features/scheduler/scheduler-event/scheduler-event.js";
|
|
97
99
|
export { EunomiaSchedulerEventEditor, EunomiaSchedulerEventEditorTagName, } from "./features/scheduler/scheduler-event-editor/scheduler-event-editor.js";
|
|
98
100
|
export type { EunomiaSchedulerEvent, EunomiaSchedulerEventColor, EunomiaSchedulerEventPriority, EunomiaSchedulerGuest, EunomiaSchedulerGuestStatus, EunomiaSchedulerView, } from "./features/scheduler/shared/scheduler.types.js";
|
|
101
|
+
export { addPeriod, getVisibleRange, } from "./features/scheduler/shared/scheduler.utils.js";
|
|
102
|
+
export type { DateRange as EunomiaSchedulerDateRange } from "./features/scheduler/shared/scheduler.utils.js";
|
|
99
103
|
export { EunomiaTable, EunomiaTableTagName, } from "./features/table/table/table.js";
|
|
100
104
|
export { EunomiaTableActionBar, EunomiaTableActionBarTagName, } from "./features/table/table-action-bar/table-action-bar.js";
|
|
101
105
|
export type { EunomiaTableAction, EunomiaTableColumnDef, EunomiaTableColumnSort, EunomiaTableRowButtonActionDef, EunomiaTableRowDropdownActionDef, EunomiaTableRowActionDef, } from "./features/table/table/table.types.js";
|
|
@@ -130,6 +134,8 @@ export { FileRejectEvent } from "./events/file-reject.event.js";
|
|
|
130
134
|
export { EventCreateEvent } from "./events/event-create.event.js";
|
|
131
135
|
export { EventUpdateEvent } from "./events/event-update.event.js";
|
|
132
136
|
export { EventDeleteEvent } from "./events/event-delete.event.js";
|
|
137
|
+
export { EventCancelEvent } from "./events/event-cancel.event.js";
|
|
138
|
+
export { EditorStateChangeEvent } from "./events/editor-state-change.event.js";
|
|
133
139
|
export { GuestInviteEvent } from "./events/event-guest-invite.event.js";
|
|
134
140
|
export { PeriodChangeEvent } from "./events/period-change.event.js";
|
|
135
141
|
export { EventClickEvent } from "./events/event-click.event.js";
|
package/dist/index.js
CHANGED
|
@@ -62,6 +62,7 @@ export { EunomiaTab, EunomiaTabTagName, } from "./components/navigation/tabs/tab
|
|
|
62
62
|
export { EunomiaTabPanel, EunomiaTabPanelTagName, } from "./components/navigation/tabs/tab-panel/tab-panel.js";
|
|
63
63
|
export { EunomiaCarousel, EunomiaCarouselTagName, } from "./components/navigation/carousel/carousel.js";
|
|
64
64
|
export { EunomiaBreadcrumb, EunomiaBreadcrumbTagName, } from "./components/navigation/breadcrumb/breadcrumb.js";
|
|
65
|
+
export { EunomiaNavMenu, EunomiaNavMenuTagName, } from "./components/navigation/nav-menu/nav-menu.js";
|
|
65
66
|
export { EunomiaPagination, EunomiaPaginationTagName, } from "./components/navigation/pagination/pagination.js";
|
|
66
67
|
export { EunomiaStepper, EunomiaStepperTagName, } from "./components/navigation/stepper/stepper.js";
|
|
67
68
|
export { EunomiaStep, EunomiaStepTagName, } from "./components/navigation/stepper/step.js";
|
|
@@ -97,6 +98,7 @@ export { EunomiaScheduler, EunomiaSchedulerTagName, } from "./features/scheduler
|
|
|
97
98
|
export { EunomiaCalendar, EunomiaCalendarTagName, } from "./features/scheduler/calendar/calendar.js";
|
|
98
99
|
export { EunomiaSchedulerEventCard, EunomiaSchedulerEventCardTagName, } from "./features/scheduler/scheduler-event/scheduler-event.js";
|
|
99
100
|
export { EunomiaSchedulerEventEditor, EunomiaSchedulerEventEditorTagName, } from "./features/scheduler/scheduler-event-editor/scheduler-event-editor.js";
|
|
101
|
+
export { addPeriod, getVisibleRange, } from "./features/scheduler/shared/scheduler.utils.js";
|
|
100
102
|
export { EunomiaTable, EunomiaTableTagName, } from "./features/table/table/table.js";
|
|
101
103
|
export { EunomiaTableActionBar, EunomiaTableActionBarTagName, } from "./features/table/table-action-bar/table-action-bar.js";
|
|
102
104
|
export { debounce, throttle } from "./utils/time.utils.js";
|
|
@@ -124,6 +126,8 @@ export { FileRejectEvent } from "./events/file-reject.event.js";
|
|
|
124
126
|
export { EventCreateEvent } from "./events/event-create.event.js";
|
|
125
127
|
export { EventUpdateEvent } from "./events/event-update.event.js";
|
|
126
128
|
export { EventDeleteEvent } from "./events/event-delete.event.js";
|
|
129
|
+
export { EventCancelEvent } from "./events/event-cancel.event.js";
|
|
130
|
+
export { EditorStateChangeEvent } from "./events/editor-state-change.event.js";
|
|
127
131
|
export { GuestInviteEvent } from "./events/event-guest-invite.event.js";
|
|
128
132
|
export { PeriodChangeEvent } from "./events/period-change.event.js";
|
|
129
133
|
export { EventClickEvent } from "./events/event-click.event.js";
|
package/dist/jsx.d.ts
CHANGED
|
@@ -27,24 +27,66 @@
|
|
|
27
27
|
import type { HTMLAttributes, Key, Ref } from "react";
|
|
28
28
|
type EunomiaTagName = Extract<keyof HTMLElementTagNameMap, `eun-${string}`>;
|
|
29
29
|
type EunomiaOwnProps<T> = Partial<Omit<T, keyof HTMLElement | keyof HTMLOrSVGElement>>;
|
|
30
|
+
type KebabCase<S extends string> = S extends `${infer Head}${infer Tail}` ? `${Head extends Lowercase<Head> ? Head : `-${Lowercase<Head>}`}${KebabCase<Tail>}` : S;
|
|
31
|
+
/**
|
|
32
|
+
* Properties mirroring a native HTML attribute keep its all-lowercase
|
|
33
|
+
* spelling (`commandfor`, `popovertarget`) instead of the kebab-case one.
|
|
34
|
+
*/
|
|
35
|
+
type NativeAttributeName = "commandFor" | "popoverTarget";
|
|
36
|
+
type AttributeName<K extends string> = K extends NativeAttributeName ? Lowercase<K> : KebabCase<K>;
|
|
37
|
+
/**
|
|
38
|
+
* The attribute twin of every camelCase own property holding a string,
|
|
39
|
+
* number or boolean (`transparent-at-top` for `transparentAtTop`),
|
|
40
|
+
* following the library-wide `attribute: "kebab-case"` convention. React 19
|
|
41
|
+
* renders a camelCase prop as a camelCase attribute during SSR, which the
|
|
42
|
+
* component doesn't observe and its `*-ssr.css` selectors don't match, so
|
|
43
|
+
* server-rendered markup has to use these names. Object/array properties
|
|
44
|
+
* (`attribute: false`) have no attribute and are left out.
|
|
45
|
+
*/
|
|
46
|
+
type EunomiaAttributeProps<T> = {
|
|
47
|
+
[K in keyof EunomiaOwnProps<T> as K extends string ? AttributeName<K> extends K ? never : NonNullable<EunomiaOwnProps<T>[K]> extends string | number | boolean ? AttributeName<K> : never : never]: EunomiaOwnProps<T>[K];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Attributes a component parses from a string although the property
|
|
51
|
+
* behind them holds an array or a date (`steps` as JSON, `default-value`
|
|
52
|
+
* as yyyy-mm-dd), declared by each component's own module next to its
|
|
53
|
+
* `HTMLElementTagNameMap` entry. Being strings, they're the only form of
|
|
54
|
+
* these values a server render writes into the markup.
|
|
55
|
+
*/
|
|
56
|
+
type EunomiaStringAttributeName<K extends EunomiaTagName> = K extends keyof EunomiaStringAttributeMap ? EunomiaStringAttributeMap[K] : never;
|
|
57
|
+
type EunomiaStringAttributeProps<K extends EunomiaTagName> = {
|
|
58
|
+
[A in EunomiaStringAttributeName<K>]?: A extends keyof EunomiaOwnProps<HTMLElementTagNameMap[K]> ? EunomiaOwnProps<HTMLElementTagNameMap[K]>[A] | string : string;
|
|
59
|
+
};
|
|
30
60
|
/**
|
|
31
61
|
* Props allowed on a `<eun-*>` tag in TSX: the element's own reactive
|
|
32
|
-
* properties
|
|
62
|
+
* properties and their kebab-case attribute names, the attributes parsed
|
|
63
|
+
* from a string ({@link EunomiaStringAttributeName}), plus every standard
|
|
64
|
+
* HTML/ARIA attribute and event handler
|
|
33
65
|
* React already knows about (id, style, title, tabIndex, aria-*, onClick,
|
|
34
66
|
* ...). `className` is deliberately excluded: React only rewrites it to
|
|
35
67
|
* the `class` attribute for elements it recognizes, not arbitrary custom
|
|
36
|
-
* elements
|
|
37
|
-
* (`eunnavigate`, `eunchange`, ...) aren't included
|
|
38
|
-
*
|
|
68
|
+
* elements, `class` is the one that actually works here. Custom events
|
|
69
|
+
* (`eunnavigate`, `eunchange`, ...) aren't included: React never attaches
|
|
70
|
+
* them to a server-rendered element on hydration, which is why
|
|
71
|
+
* `eunProps` (see react.ts) sets them, and object properties, from a ref.
|
|
39
72
|
*/
|
|
40
|
-
type EunomiaElementProps<T> = EunomiaOwnProps<T> & Omit<HTMLAttributes<T>, "className" | keyof EunomiaOwnProps<T>> & {
|
|
73
|
+
type EunomiaElementProps<K extends EunomiaTagName, T = HTMLElementTagNameMap[K]> = Omit<EunomiaOwnProps<T>, EunomiaStringAttributeName<K>> & Omit<EunomiaAttributeProps<T>, EunomiaStringAttributeName<K>> & EunomiaStringAttributeProps<K> & Omit<HTMLAttributes<T>, "className" | keyof EunomiaOwnProps<T> | keyof EunomiaAttributeProps<T> | EunomiaStringAttributeName<K>> & {
|
|
41
74
|
ref?: Ref<T>;
|
|
42
75
|
key?: Key | null;
|
|
43
76
|
class?: string;
|
|
44
77
|
};
|
|
45
78
|
type EunomiaJSXElements = {
|
|
46
|
-
[K in EunomiaTagName]: EunomiaElementProps<
|
|
79
|
+
[K in EunomiaTagName]: EunomiaElementProps<K>;
|
|
47
80
|
};
|
|
81
|
+
declare global {
|
|
82
|
+
/**
|
|
83
|
+
* Each tag's attributes parsed from a string, see
|
|
84
|
+
* {@link EunomiaStringAttributeName}. Filled by the components' own
|
|
85
|
+
* modules.
|
|
86
|
+
*/
|
|
87
|
+
interface EunomiaStringAttributeMap {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
48
90
|
declare module "react" {
|
|
49
91
|
namespace JSX {
|
|
50
92
|
interface IntrinsicElements extends EunomiaJSXElements {
|
|
@@ -23,6 +23,23 @@ export interface AnchorPositionOptions {
|
|
|
23
23
|
* @default "vertical"
|
|
24
24
|
*/
|
|
25
25
|
axis?: "vertical" | "horizontal";
|
|
26
|
+
/**
|
|
27
|
+
* On the fallback path's `"vertical"` axis, the side `floating` prefers
|
|
28
|
+
* : `"bottom"` opens below the anchor and flips above it, `"top"` the
|
|
29
|
+
* other way around. The native path's preferred side comes from the
|
|
30
|
+
* consumer's own CSS.
|
|
31
|
+
* @default "bottom"
|
|
32
|
+
*/
|
|
33
|
+
side?: "bottom" | "top";
|
|
34
|
+
/**
|
|
35
|
+
* On the fallback path's `"vertical"` axis, which edge of the anchor
|
|
36
|
+
* `floating` lines up with : its left edge (`"start"`), its center, or
|
|
37
|
+
* its right edge (`"end"`). Once set, `floating` is also kept within the
|
|
38
|
+
* viewport horizontally. Left unset, `floating` lines up with the
|
|
39
|
+
* anchor's left edge, unclamped. The native path's alignment comes from
|
|
40
|
+
* the consumer's own CSS.
|
|
41
|
+
*/
|
|
42
|
+
align?: "start" | "center" | "end";
|
|
26
43
|
/**
|
|
27
44
|
* Forces the fallback (`getBoundingClientRect`-based) positioning path
|
|
28
45
|
* even on a browser that otherwise supports native CSS Anchor
|