@egen-civitas/esm-styleguide 4.0.0 → 5.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/CHANGELOG.md +42 -0
- package/README.md +1 -1
- package/dist/cards/card-header.component.d.ts.map +1 -1
- package/dist/cards/card-header.component.js +4 -6
- package/dist/cards/card-header.stories.js +11 -7
- package/dist/cards/decorated-card/card-decorations.js +1 -1
- package/dist/cards/decorated-card/decorated-card.component.js +1 -1
- package/dist/cards/decorated-card/{decorated-card.module.scss → decorated-card.module.css} +45 -70
- package/dist/carousel/circular-gallery/circular-gallery.component.js +1 -1
- package/dist/carousel/circular-gallery/circular-gallery.module.css +140 -0
- package/dist/carousel/circular-gallery/gallery-image.component.js +1 -1
- package/dist/carousel/circular-gallery/gallery-tabs.component.js +1 -1
- package/dist/carousel/image-swiper/image-swiper.component.js +1 -1
- package/dist/carousel/image-swiper/image-swiper.module.css +31 -0
- package/dist/carousel/slider/carousel.component.js +1 -1
- package/dist/carousel/slider/slider-container.component.js +1 -1
- package/dist/carousel/slider/slider-dot-button.component.js +1 -1
- package/dist/carousel/slider/slider.component.js +1 -1
- package/dist/carousel/slider/slider.module.css +133 -0
- package/dist/carousel/slider/thumbs-slider.component.js +1 -1
- package/dist/carousel/testimonial-card/testimonial-card-stack.component.js +1 -1
- package/dist/carousel/testimonial-card/testimonial-card-stack.module.css +5 -0
- package/dist/carousel/testimonial-card/testimonial-card.component.js +1 -1
- package/dist/carousel/testimonial-card/testimonial-card.module.css +51 -0
- package/dist/cascading-nav-dropdown/cascading-nav-dropdown.component.js +1 -1
- package/dist/cascading-nav-dropdown/{cascading-nav-dropdown.module.scss → cascading-nav-dropdown.module.css} +27 -52
- package/dist/cascading-nav-dropdown/column-with-search.component.js +1 -1
- package/dist/classification-tags/classification-tags.component.d.ts +0 -19
- package/dist/classification-tags/classification-tags.component.d.ts.map +1 -1
- package/dist/classification-tags/classification-tags.component.js +20 -5
- package/dist/config-schema.d.ts +3 -3
- package/dist/config-schema.d.ts.map +1 -1
- package/dist/config-schema.js +3 -3
- package/dist/containers/folder-gallery/folder-gallery.component.js +1 -1
- package/dist/containers/folder-gallery/{folder-gallery.module.scss → folder-gallery.module.css} +4 -32
- package/dist/containers/layout-grid/layout-grid.component.js +1 -1
- package/dist/containers/layout-grid/layout-grid.module.css +105 -0
- package/dist/content-section/content-section.component.js +1 -1
- package/dist/custom-overflow-menu/custom-overflow-menu.component.d.ts +26 -8
- package/dist/custom-overflow-menu/custom-overflow-menu.component.d.ts.map +1 -1
- package/dist/custom-overflow-menu/custom-overflow-menu.component.js +66 -29
- package/dist/custom-overflow-menu/custom-overflow-menu.module.css +82 -0
- package/dist/data-table-batch-actions/data-table-batch-actions.component.d.ts +14 -1
- package/dist/data-table-batch-actions/data-table-batch-actions.component.d.ts.map +1 -1
- package/dist/data-table-batch-actions/data-table-batch-actions.component.js +42 -20
- package/dist/datepicker/auto-close-dialog.component.js +1 -1
- package/dist/datepicker/calendar-popover.component.js +3 -3
- package/dist/datepicker/date-picker-input.component.d.ts +1 -1
- package/dist/datepicker/date-picker-input.component.js +1 -1
- package/dist/datepicker/datepicker.module.css +540 -0
- package/dist/datepicker/egen-date-picker.component.d.ts +1 -1
- package/dist/datepicker/egen-date-picker.component.d.ts.map +1 -1
- package/dist/datepicker/egen-date-picker.component.js +13 -10
- package/dist/datepicker/egen-date-range-picker.component.d.ts +1 -1
- package/dist/datepicker/egen-date-range-picker.component.d.ts.map +1 -1
- package/dist/datepicker/egen-date-range-picker.component.js +15 -11
- package/dist/datepicker/month-year.component.d.ts +1 -1
- package/dist/datepicker/month-year.component.js +1 -1
- package/dist/dialogs/card-modal/card-modal.component.js +1 -1
- package/dist/dialogs/card-modal/{card-modal.module.scss → card-modal.module.css} +10 -32
- package/dist/dialogs/card-modal/card-modal.warp-glow.js +1 -1
- package/dist/empty-card/empty-card.component.d.ts.map +1 -1
- package/dist/empty-card/empty-card.component.js +6 -7
- package/dist/error-state/error-state.component.d.ts.map +1 -1
- package/dist/error-state/error-state.component.js +5 -5
- package/dist/fields/dynamic-field.component.js +1 -1
- package/dist/fields/{dynamic-field.module.scss → dynamic-field.module.css} +60 -107
- package/dist/fields/dynamic-field.types.d.ts +1 -1
- package/dist/fields/dynamic-field.types.d.ts.map +1 -1
- package/dist/fields/field-icon.component.js +1 -1
- package/dist/fields/kinetic-label.component.js +1 -1
- package/dist/fields/validation-icon.component.js +1 -1
- package/dist/glass-card/liquid-glass-card.component.js +1 -1
- package/dist/glass-card/liquid-glass-card.module.css +121 -0
- package/dist/hero-mosaic/hero-mosaic.component.js +1 -1
- package/dist/hero-mosaic/{hero-mosaic.module.scss → hero-mosaic.module.css} +32 -28
- package/dist/hero-mosaic/hero-tile-card.component.js +1 -1
- package/dist/icons/error-filled.icon.d.ts +1 -2
- package/dist/icons/error-filled.icon.d.ts.map +1 -1
- package/dist/icons/error-filled.icon.js +1 -2
- package/dist/icons/icons.js +1 -1
- package/dist/icons/icons.module.css +3 -0
- package/dist/master-detail/entity-detail-browser/entity-detail-browser.component.js +1 -1
- package/dist/master-detail/entity-detail-browser/{entity-detail-browser.module.scss → entity-detail-browser.module.css} +74 -66
- package/dist/master-detail/entity-detail-browser/gradient-blur.component.js +1 -1
- package/dist/modals/index.d.ts.map +1 -1
- package/dist/modals/index.js +24 -1
- package/dist/notifications/actionable-notification.component.d.ts.map +1 -1
- package/dist/notifications/actionable-notification.component.js +6 -9
- package/dist/notifications/notification.component.d.ts.map +1 -1
- package/dist/notifications/notification.component.js +5 -7
- package/dist/page-background/page-background.utils.d.ts +3 -5
- package/dist/page-background/page-background.utils.d.ts.map +1 -1
- package/dist/page-background/page-background.utils.js +3 -7
- package/dist/page-header/page-header.component.js +1 -1
- package/dist/page-header/page-header.module.css +28 -0
- package/dist/pagination/pagination.component.d.ts +6 -3
- package/dist/pagination/pagination.component.d.ts.map +1 -1
- package/dist/pagination/pagination.component.js +98 -33
- package/dist/pictograms/pictograms.js +1 -1
- package/dist/pictograms/pictograms.module.css +3 -0
- package/dist/public.d.ts +1 -0
- package/dist/public.d.ts.map +1 -1
- package/dist/public.js +1 -0
- package/dist/responsive-wrapper/responsive-wrapper.component.d.ts +1 -1
- package/dist/responsive-wrapper/responsive-wrapper.component.js +3 -2
- package/dist/responsive-wrapper/responsive-wrapper.stories.js +3 -3
- package/dist/selections/interactive-selector/interactive-selector.component.js +1 -1
- package/dist/selections/interactive-selector/{interactive-selector.module.scss → interactive-selector.module.css} +15 -49
- package/dist/selections/select-popover/select-avatar.component.js +1 -1
- package/dist/selections/select-popover/select-content.component.js +1 -1
- package/dist/selections/select-popover/{select-popover.module.scss → select-popover.module.css} +22 -34
- package/dist/selections/select-popover/select-trigger.component.js +1 -1
- package/dist/sheet/sheet-content.component.js +1 -1
- package/dist/sheet/sheet-overlay.component.js +1 -1
- package/dist/sheet/sheet-parts.component.js +1 -1
- package/dist/sheet/sheet-trigger.component.js +1 -1
- package/dist/sheet/{sheet.module.scss → sheet.module.css} +12 -31
- package/dist/snackbars/snackbar.component.d.ts.map +1 -1
- package/dist/snackbars/snackbar.component.js +8 -10
- package/dist/snackbars/{snackbar.module.scss → snackbar.module.css} +0 -2
- package/dist/styles.css +1364 -0
- package/dist/toasts/toast-progress-bar.component.js +1 -1
- package/dist/toasts/toast.component.js +1 -1
- package/dist/toasts/{toast.module.scss → toast.module.css} +27 -34
- package/dist/top-bar/top-bar.component.d.ts +1 -1
- package/dist/top-bar/top-bar.component.d.ts.map +1 -1
- package/dist/ui/alert.d.ts +10 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +47 -0
- package/dist/ui/app-header.d.ts +10 -0
- package/dist/ui/app-header.d.ts.map +1 -0
- package/dist/ui/app-header.js +36 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +34 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +48 -0
- package/dist/ui/cn.d.ts +7 -0
- package/dist/ui/cn.d.ts.map +1 -0
- package/dist/ui/cn.js +8 -0
- package/dist/ui/dialog.d.ts +18 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +105 -0
- package/dist/ui/dropdown-menu.d.ts +26 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +143 -0
- package/dist/ui/icon-button.d.ts +17 -0
- package/dist/ui/icon-button.d.ts.map +1 -0
- package/dist/ui/icon-button.js +30 -0
- package/dist/ui/index.d.ts +23 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +25 -0
- package/dist/ui/inline-loading.d.ts +11 -0
- package/dist/ui/inline-loading.d.ts.map +1 -0
- package/dist/ui/inline-loading.js +34 -0
- package/dist/ui/input.d.ts +4 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +14 -0
- package/dist/ui/label.d.ts +5 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +14 -0
- package/dist/ui/layer.d.ts +8 -0
- package/dist/ui/layer.d.ts.map +1 -0
- package/dist/ui/layer.js +14 -0
- package/dist/ui/link.d.ts +11 -0
- package/dist/ui/link.d.ts.map +1 -0
- package/dist/ui/link.js +15 -0
- package/dist/ui/modal.d.ts +14 -0
- package/dist/ui/modal.d.ts.map +1 -0
- package/dist/ui/modal.js +48 -0
- package/dist/ui/notification-banner.d.ts +19 -0
- package/dist/ui/notification-banner.d.ts.map +1 -0
- package/dist/ui/notification-banner.js +75 -0
- package/dist/ui/separator.d.ts +5 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +16 -0
- package/dist/ui/spinner.d.ts +4 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/spinner.js +15 -0
- package/dist/ui/switch.d.ts +7 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +19 -0
- package/dist/ui/table.d.ts +11 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +66 -0
- package/dist/ui/tabs.d.ts +12 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +52 -0
- package/dist/ui/text-input.d.ts +19 -0
- package/dist/ui/text-input.d.ts.map +1 -0
- package/dist/ui/text-input.js +35 -0
- package/dist/ui/tile.d.ts +10 -0
- package/dist/ui/tile.d.ts.map +1 -0
- package/dist/ui/tile.js +55 -0
- package/dist/ui/tooltip.d.ts +8 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +42 -0
- package/dist/utils.d.ts +3 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -3
- package/dist/workbench/section-nav-panel.component.d.ts +1 -1
- package/dist/workbench/section-nav-panel.component.d.ts.map +1 -1
- package/dist/workbench/section-nav-panel.component.js +4 -19
- package/dist/workbench/{section-nav-panel.module.scss → section-nav-panel.module.css} +14 -20
- package/dist/workbench/splitter.component.js +1 -1
- package/dist/workbench/tool-window-rail.component.js +1 -1
- package/dist/workbench/tool-window-zone.component.js +1 -1
- package/dist/workbench/workbench.module.css +363 -0
- package/dist/workspaces/action-menu-button/action-menu-button.component.d.ts.map +1 -1
- package/dist/workspaces/action-menu-button/action-menu-button.component.js +5 -10
- package/dist/workspaces/action-menu-button/action-menu-button.module.css +94 -0
- package/dist/workspaces/container/action-menu.component.js +1 -1
- package/dist/workspaces/container/action-menu.module.css +68 -0
- package/dist/workspaces/container/workspace-container.component.d.ts.map +1 -1
- package/dist/workspaces/container/workspace-container.component.js +13 -14
- package/dist/workspaces/container/workspace-renderer.component.js +2 -2
- package/dist/workspaces/container/workspace.module.css +204 -0
- package/dist/workspaces/notification/workspace-notification.component.d.ts.map +1 -1
- package/dist/workspaces/notification/workspace-notification.component.js +32 -28
- package/dist/workspaces2/action-menu2/action-menu-button2.component.d.ts.map +1 -1
- package/dist/workspaces2/action-menu2/action-menu-button2.component.js +5 -10
- package/dist/workspaces2/action-menu2/action-menu-button2.module.css +93 -0
- package/dist/workspaces2/action-menu2/action-menu2.component.d.ts.map +1 -1
- package/dist/workspaces2/action-menu2/action-menu2.component.js +4 -5
- package/dist/workspaces2/action-menu2/action-menu2.module.css +70 -0
- package/dist/workspaces2/active-workspace-window.component.js +2 -2
- package/dist/workspaces2/workspace-windows-and-menu.component.js +1 -1
- package/dist/workspaces2/workspace-windows-and-menu.module.css +27 -0
- package/dist/workspaces2/workspace2-close-prompt.modal.d.ts.map +1 -1
- package/dist/workspaces2/workspace2-close-prompt.modal.js +7 -6
- package/dist/workspaces2/workspace2.component.js +11 -12
- package/dist/workspaces2/workspace2.module.css +163 -0
- package/package.json +15 -15
- package/dist/_all.scss +0 -31
- package/dist/_carbon-bridge.scss +0 -194
- package/dist/_glass.scss +0 -75
- package/dist/_overrides.scss +0 -731
- package/dist/_panel.scss +0 -123
- package/dist/_vars.scss +0 -111
- package/dist/animations/_animations.scss +0 -102
- package/dist/animations/_index.scss +0 -5
- package/dist/animations/_keyframes.scss +0 -135
- package/dist/animations/_mixins.scss +0 -16
- package/dist/animations/_tokens.scss +0 -16
- package/dist/animations/_workbench-motion.scss +0 -36
- package/dist/cards/card-header.module.scss +0 -45
- package/dist/cards/decorated-card/_decoration-bleed.scss +0 -26
- package/dist/carousel/circular-gallery/circular-gallery.module.scss +0 -165
- package/dist/carousel/image-swiper/image-swiper.module.scss +0 -43
- package/dist/carousel/slider/slider.module.scss +0 -176
- package/dist/carousel/testimonial-card/testimonial-card-stack.module.scss +0 -18
- package/dist/carousel/testimonial-card/testimonial-card.module.scss +0 -73
- package/dist/components/_breadcrumbs.scss +0 -11
- package/dist/components/_canvas.scss +0 -19
- package/dist/components/_general.scss +0 -337
- package/dist/components/_main-content.scss +0 -28
- package/dist/components/_panel-overrides.scss +0 -130
- package/dist/containers/layout-grid/layout-grid.module.scss +0 -143
- package/dist/custom-overflow-menu/custom-overflow-menu.module.scss +0 -38
- package/dist/datepicker/datepicker.module.scss +0 -502
- package/dist/empty-card/empty-card.module.scss +0 -27
- package/dist/error-state/error-state.module.scss +0 -21
- package/dist/glass-card/liquid-glass-card.module.scss +0 -154
- package/dist/icons/icons.module.scss +0 -5
- package/dist/modals/_modals.scss +0 -13
- package/dist/notifications/_actionable-notifications.scss +0 -23
- package/dist/notifications/_notifications.scss +0 -22
- package/dist/page-header/page-header.module.scss +0 -28
- package/dist/pagination/pagination.module.scss +0 -66
- package/dist/pictograms/pictograms.module.scss +0 -5
- package/dist/snackbars/_snackbars.scss +0 -31
- package/dist/spinner/_loader.scss +0 -94
- package/dist/spinner/_spinner.scss +0 -1
- package/dist/toasts/_toasts.scss +0 -22
- package/dist/workbench/workbench.module.scss +0 -439
- package/dist/workspaces/action-menu-button/action-menu-button.module.scss +0 -111
- package/dist/workspaces/container/action-menu.module.scss +0 -90
- package/dist/workspaces/container/workspace.module.scss +0 -276
- package/dist/workspaces/notification/workspace-notification.module.scss +0 -5
- package/dist/workspaces2/action-menu2/action-menu-button2.module.scss +0 -113
- package/dist/workspaces2/action-menu2/action-menu2.module.scss +0 -87
- package/dist/workspaces2/workspace-windows-and-menu.module.scss +0 -32
- package/dist/workspaces2/workspace2-close-prompt.module.scss +0 -8
- package/dist/workspaces2/workspace2.module.scss +0 -228
- package/src/_vars.scss +0 -111
- /package/dist/content-section/{content-section.module.scss → content-section.module.css} +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
padding: 2.5rem;
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-auto-rows: 20rem;
|
|
7
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
8
|
+
gap: 1rem;
|
|
9
|
+
max-width: 80rem;
|
|
10
|
+
margin: 0 auto;
|
|
11
|
+
}
|
|
12
|
+
@media (min-width: 768px) {
|
|
13
|
+
.root {
|
|
14
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.card {
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.card--default {
|
|
24
|
+
height: 100%;
|
|
25
|
+
width: 100%;
|
|
26
|
+
background: var(--colors-surface-card);
|
|
27
|
+
border-radius: var(--border-radius-xl);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.card--lastSelected {
|
|
31
|
+
z-index: 40;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.card--selected {
|
|
35
|
+
position: absolute;
|
|
36
|
+
inset: 0;
|
|
37
|
+
height: 50%;
|
|
38
|
+
width: 100%;
|
|
39
|
+
margin: auto;
|
|
40
|
+
z-index: 50;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
flex-wrap: wrap;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
border-radius: var(--border-radius-lg);
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
@media (min-width: 768px) {
|
|
50
|
+
.card--selected {
|
|
51
|
+
width: 50%;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.image {
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset: 0;
|
|
58
|
+
height: 100%;
|
|
59
|
+
width: 100%;
|
|
60
|
+
object-fit: cover;
|
|
61
|
+
object-position: top;
|
|
62
|
+
transition: all var(--animation-duration-normal) var(--animation-easing-in-out);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.backdrop {
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 0;
|
|
68
|
+
z-index: 10;
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
background: var(--panel-overlay-background);
|
|
71
|
+
backdrop-filter: var(--panel-overlay-backdrop-filter);
|
|
72
|
+
-webkit-backdrop-filter: var(--panel-overlay-backdrop-filter);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.backdrop--interactive {
|
|
76
|
+
pointer-events: auto;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.selectedCard {
|
|
80
|
+
position: relative;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
height: 100%;
|
|
83
|
+
width: 100%;
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
justify-content: flex-end;
|
|
87
|
+
background: transparent;
|
|
88
|
+
border-radius: var(--border-radius-lg);
|
|
89
|
+
box-shadow: var(--shadows-2xl);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.scrim {
|
|
93
|
+
position: absolute;
|
|
94
|
+
inset: 0;
|
|
95
|
+
z-index: 1;
|
|
96
|
+
height: 100%;
|
|
97
|
+
width: 100%;
|
|
98
|
+
background: var(--colors-neutral-950);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.selectedContent {
|
|
102
|
+
position: relative;
|
|
103
|
+
z-index: 2;
|
|
104
|
+
padding: 0 2rem 1rem;
|
|
105
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/** @category Content Section */ import React from "react";
|
|
3
|
-
import styles from "./content-section.module.
|
|
3
|
+
import styles from "./content-section.module.css";
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Préférer `Section` (en-tête / corps / pied, trait fin, repli,
|
|
6
6
|
* dispositions configurables). `ContentSection` est conservé tel quel pour ne
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/** @module @category UI */
|
|
2
|
-
import React
|
|
3
|
-
import { OverflowMenuItem } from '@carbon/react';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
interface CustomOverflowMenuContextValue {
|
|
5
4
|
closeMenu: () => void;
|
|
6
5
|
}
|
|
@@ -12,13 +11,32 @@ interface CustomOverflowMenuProps {
|
|
|
12
11
|
children: React.ReactNode;
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
15
|
-
* A custom overflow menu
|
|
16
|
-
*
|
|
17
|
-
* than Carbon's FloatingMenu portal, so keyboard behavior (Escape, arrow keys,
|
|
18
|
-
* auto-focus) is implemented here to match the WAI-ARIA menu button pattern.
|
|
14
|
+
* A custom overflow menu with a text/icon trigger button. Uses CSS-based show/hide (no portal), so keyboard
|
|
15
|
+
* behavior (Escape, arrow keys, auto-focus) is implemented here to match the WAI-ARIA menu button pattern.
|
|
19
16
|
*/
|
|
20
17
|
export declare function CustomOverflowMenu({ menuTitle, children }: CustomOverflowMenuProps): React.JSX.Element;
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
export interface CustomOverflowMenuItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onClick'> {
|
|
19
|
+
/** Texte de l'entrée. */
|
|
20
|
+
itemText: React.ReactNode;
|
|
21
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
22
|
+
/** Entrée destructive (rouge). */
|
|
23
|
+
isDelete?: boolean;
|
|
24
|
+
/** Filet de séparation au-dessus de l'entrée. */
|
|
25
|
+
hasDivider?: boolean;
|
|
26
|
+
/** Rend un lien (`<a>`) au lieu d'un bouton. */
|
|
27
|
+
href?: string;
|
|
28
|
+
/** Ajoute le texte en infobulle (`title`). */
|
|
29
|
+
requireTitle?: boolean;
|
|
30
|
+
wrapperClassName?: string;
|
|
31
|
+
/** Fournis par `CustomOverflowMenu` ; ferme le menu après l'action. */
|
|
32
|
+
closeMenu?: () => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function CustomOverflowMenuItem({ itemText, onClick, isDelete, hasDivider, href, requireTitle, wrapperClassName, className, disabled, closeMenu: closeMenuProp, handleOverflowMenuItemFocus, index: _index, ...rest }: CustomOverflowMenuItemProps & {
|
|
35
|
+
handleOverflowMenuItemFocus?: (args: {
|
|
36
|
+
currentIndex?: number;
|
|
37
|
+
direction: number;
|
|
38
|
+
}) => void;
|
|
39
|
+
index?: number;
|
|
40
|
+
}): React.JSX.Element;
|
|
23
41
|
export {};
|
|
24
42
|
//# sourceMappingURL=custom-overflow-menu.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-overflow-menu.component.d.ts","sourceRoot":"","sources":["../../src/custom-overflow-menu/custom-overflow-menu.component.tsx"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"custom-overflow-menu.component.d.ts","sourceRoot":"","sources":["../../src/custom-overflow-menu/custom-overflow-menu.component.tsx"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,KAYN,MAAM,OAAO,CAAC;AAKf,UAAU,8BAA8B;IACtC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,qBAAqB,mCAMpC;AAED,UAAU,uBAAuB;IAC/B,yDAAyD;IACzD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,uDAAuD;IACvD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,uBAAuB,qBAuGlF;AAED,MAAM,WAAW,2BACf,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACnF,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD,kCAAkC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,SAAS,EAAE,aAAa,EACxB,2BAA2B,EAC3B,KAAK,EAAE,MAAM,EACb,GAAG,IAAI,EACR,EAAE,2BAA2B,GAAG;IAC/B,2BAA2B,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,qBAwCA"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/** @module @category UI */ import React, { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useMemo, useRef } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import { OverflowMenuItem } from "@carbon/react";
|
|
5
4
|
import { useLayoutType, useOnClickOutside } from "@egen-civitas/esm-react-utils";
|
|
6
|
-
import styles from "./custom-overflow-menu.module.
|
|
5
|
+
import styles from "./custom-overflow-menu.module.css";
|
|
7
6
|
const CustomOverflowMenuContext = /*#__PURE__*/ createContext(null);
|
|
8
7
|
export function useCustomOverflowMenu() {
|
|
9
8
|
const context = useContext(CustomOverflowMenuContext);
|
|
@@ -13,10 +12,8 @@ export function useCustomOverflowMenu() {
|
|
|
13
12
|
return context;
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
|
-
* A custom overflow menu
|
|
17
|
-
*
|
|
18
|
-
* than Carbon's FloatingMenu portal, so keyboard behavior (Escape, arrow keys,
|
|
19
|
-
* auto-focus) is implemented here to match the WAI-ARIA menu button pattern.
|
|
15
|
+
* A custom overflow menu with a text/icon trigger button. Uses CSS-based show/hide (no portal), so keyboard
|
|
16
|
+
* behavior (Escape, arrow keys, auto-focus) is implemented here to match the WAI-ARIA menu button pattern.
|
|
20
17
|
*/ export function CustomOverflowMenu({ menuTitle, children }) {
|
|
21
18
|
const [menuIsOpen, setMenuIsOpen] = React.useState(false);
|
|
22
19
|
const ref = useOnClickOutside(()=>setMenuIsOpen(false), menuIsOpen);
|
|
@@ -81,13 +78,14 @@ export function useCustomOverflowMenu() {
|
|
|
81
78
|
});
|
|
82
79
|
return /*#__PURE__*/ _jsxs("div", {
|
|
83
80
|
"data-overflow-menu": true,
|
|
84
|
-
className:
|
|
81
|
+
className: styles.container,
|
|
85
82
|
ref: ref,
|
|
86
83
|
children: [
|
|
87
84
|
/*#__PURE__*/ _jsx("button", {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
type: "button",
|
|
86
|
+
className: classNames(styles.trigger, {
|
|
87
|
+
[styles.triggerOpen]: menuIsOpen
|
|
88
|
+
}),
|
|
91
89
|
"aria-controls": menuId,
|
|
92
90
|
"aria-expanded": menuIsOpen,
|
|
93
91
|
"aria-haspopup": "true",
|
|
@@ -97,37 +95,76 @@ export function useCustomOverflowMenu() {
|
|
|
97
95
|
ref: triggerRef,
|
|
98
96
|
children: menuTitle
|
|
99
97
|
}),
|
|
100
|
-
/*#__PURE__*/
|
|
101
|
-
className: classNames(
|
|
98
|
+
/*#__PURE__*/ _jsx("div", {
|
|
99
|
+
className: classNames(styles.menu, {
|
|
102
100
|
[styles.show]: menuIsOpen
|
|
103
101
|
}),
|
|
104
102
|
"aria-labelledby": triggerId,
|
|
105
|
-
"data-
|
|
103
|
+
"data-placement": "bottom",
|
|
106
104
|
id: menuId,
|
|
107
105
|
onKeyDown: handleEscapeKey,
|
|
108
106
|
ref: menuRef,
|
|
109
107
|
role: "menu",
|
|
110
108
|
tabIndex: -1,
|
|
111
|
-
children:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
children:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
})
|
|
120
|
-
}),
|
|
121
|
-
/*#__PURE__*/ _jsx("span", {})
|
|
122
|
-
]
|
|
109
|
+
children: /*#__PURE__*/ _jsx("ul", {
|
|
110
|
+
className: styles.list,
|
|
111
|
+
"data-size": isTablet ? 'lg' : 'md',
|
|
112
|
+
children: /*#__PURE__*/ _jsx(CustomOverflowMenuContext.Provider, {
|
|
113
|
+
value: contextValue,
|
|
114
|
+
children: enrichedChildren
|
|
115
|
+
})
|
|
116
|
+
})
|
|
123
117
|
})
|
|
124
118
|
]
|
|
125
119
|
});
|
|
126
120
|
}
|
|
127
|
-
export function CustomOverflowMenuItem(
|
|
121
|
+
export function CustomOverflowMenuItem({ itemText, onClick, isDelete, hasDivider, href, requireTitle, wrapperClassName, className, disabled, closeMenu: closeMenuProp, handleOverflowMenuItemFocus, index: _index, ...rest }) {
|
|
128
122
|
const context = useContext(CustomOverflowMenuContext);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
123
|
+
const closeMenu = closeMenuProp ?? context?.closeMenu;
|
|
124
|
+
const itemClass = classNames(styles.item, {
|
|
125
|
+
[styles.itemDelete]: isDelete
|
|
126
|
+
}, className);
|
|
127
|
+
const handleClick = (event)=>{
|
|
128
|
+
onClick?.(event);
|
|
129
|
+
closeMenu?.();
|
|
130
|
+
};
|
|
131
|
+
const handleKeyDown = (event)=>{
|
|
132
|
+
if (event.key === 'ArrowDown') {
|
|
133
|
+
event.preventDefault();
|
|
134
|
+
handleOverflowMenuItemFocus?.({
|
|
135
|
+
direction: 1
|
|
136
|
+
});
|
|
137
|
+
} else if (event.key === 'ArrowUp') {
|
|
138
|
+
event.preventDefault();
|
|
139
|
+
handleOverflowMenuItemFocus?.({
|
|
140
|
+
direction: -1
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
const title = requireTitle && typeof itemText === 'string' ? itemText : undefined;
|
|
145
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
146
|
+
role: "none",
|
|
147
|
+
className: classNames(styles.itemWrapper, {
|
|
148
|
+
[styles.itemDivider]: hasDivider
|
|
149
|
+
}, wrapperClassName),
|
|
150
|
+
children: href ? /*#__PURE__*/ _jsx("a", {
|
|
151
|
+
role: "menuitem",
|
|
152
|
+
href: href,
|
|
153
|
+
className: itemClass,
|
|
154
|
+
title: title,
|
|
155
|
+
onClick: handleClick,
|
|
156
|
+
onKeyDown: handleKeyDown,
|
|
157
|
+
children: itemText
|
|
158
|
+
}) : /*#__PURE__*/ _jsx("button", {
|
|
159
|
+
type: "button",
|
|
160
|
+
role: "menuitem",
|
|
161
|
+
className: itemClass,
|
|
162
|
+
disabled: disabled,
|
|
163
|
+
title: title,
|
|
164
|
+
onClick: handleClick,
|
|
165
|
+
onKeyDown: handleKeyDown,
|
|
166
|
+
...rest,
|
|
167
|
+
children: itemText
|
|
168
|
+
})
|
|
132
169
|
});
|
|
133
170
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.trigger {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
min-height: 3rem;
|
|
10
|
+
padding: 0.875rem 1rem;
|
|
11
|
+
border: 0;
|
|
12
|
+
background: transparent;
|
|
13
|
+
color: var(--colors-primary-600, #0f62fe);
|
|
14
|
+
font: inherit;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
}
|
|
17
|
+
.trigger:hover,
|
|
18
|
+
.triggerOpen {
|
|
19
|
+
background-color: var(--colors-surface-muted, #e8e8e8);
|
|
20
|
+
}
|
|
21
|
+
.trigger:focus-visible {
|
|
22
|
+
outline: 2px solid var(--colors-primary-500, #0f62fe);
|
|
23
|
+
outline-offset: -2px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.menu {
|
|
27
|
+
display: none;
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 3.125rem;
|
|
30
|
+
right: 0;
|
|
31
|
+
z-index: 6000;
|
|
32
|
+
min-width: 10rem;
|
|
33
|
+
margin-right: 0.2rem;
|
|
34
|
+
background-color: var(--colors-surface-muted, #f4f4f4);
|
|
35
|
+
box-shadow: 0 6px 6px rgba(0, 0, 0, 0.3);
|
|
36
|
+
}
|
|
37
|
+
.show {
|
|
38
|
+
display: block;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.list {
|
|
42
|
+
margin: 0;
|
|
43
|
+
padding: 0;
|
|
44
|
+
list-style: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.itemWrapper {
|
|
48
|
+
list-style: none;
|
|
49
|
+
}
|
|
50
|
+
.itemDivider {
|
|
51
|
+
border-top: 1px solid var(--colors-border-default, #cbd5e1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.item {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
width: 100%;
|
|
58
|
+
min-height: 2.5rem;
|
|
59
|
+
padding: 0 1rem;
|
|
60
|
+
border: 0;
|
|
61
|
+
background: transparent;
|
|
62
|
+
color: var(--colors-surface-foreground, #161616);
|
|
63
|
+
font: inherit;
|
|
64
|
+
text-align: left;
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
.list[data-size='lg'] .item {
|
|
69
|
+
min-height: 3rem;
|
|
70
|
+
}
|
|
71
|
+
.item:hover,
|
|
72
|
+
.item:focus-visible {
|
|
73
|
+
background-color: var(--colors-surface-card, #e8e8e8);
|
|
74
|
+
outline: none;
|
|
75
|
+
}
|
|
76
|
+
.item:disabled {
|
|
77
|
+
color: var(--colors-surface-muted-foreground, #8d8d8d);
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
}
|
|
80
|
+
.itemDelete {
|
|
81
|
+
color: var(--colors-destructive, #da1e28);
|
|
82
|
+
}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
/** @module @category UI */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
3
|
+
export interface TableBatchActionsProps extends Omit<React.ComponentProps<'div'>, 'onCancel'> {
|
|
4
|
+
/** Affiche la barre (sans lui, rien n'est rendu). */
|
|
5
|
+
shouldShowBatchActions?: boolean;
|
|
6
|
+
/** Nombre de lignes sélectionnées. */
|
|
7
|
+
totalSelected: number;
|
|
8
|
+
/** Nombre total de lignes : propose « Tout sélectionner » quand il est supérieur à la sélection. */
|
|
9
|
+
totalCount?: number;
|
|
10
|
+
onCancel: () => void;
|
|
11
|
+
onSelectAll?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Barre d'actions par lots d'un tableau : nombre de lignes sélectionnées, actions (en enfants, ex. des `Button`),
|
|
15
|
+
* « Tout sélectionner » et « Annuler ». Les textes viennent des traductions du core.
|
|
16
|
+
*/
|
|
4
17
|
export declare const TableBatchActions: React.FC<TableBatchActionsProps>;
|
|
5
18
|
//# sourceMappingURL=data-table-batch-actions.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-batch-actions.component.d.ts","sourceRoot":"","sources":["../../src/data-table-batch-actions/data-table-batch-actions.component.tsx"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"data-table-batch-actions.component.d.ts","sourceRoot":"","sources":["../../src/data-table-batch-actions/data-table-batch-actions.component.tsx"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC3F,qDAAqD;IACrD,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sCAAsC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,oGAAoG;IACpG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAoC9D,CAAC"}
|
|
@@ -1,24 +1,46 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/** @module @category UI */ import React from "react";
|
|
3
|
-
import { TableBatchActions as CarbonTableBatchActions } from "@carbon/react";
|
|
4
3
|
import { getCoreTranslation } from "@egen-civitas/esm-translations";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
import { Button } from "../ui/index.js";
|
|
5
|
+
import { cn } from "../ui/cn.js";
|
|
6
|
+
/**
|
|
7
|
+
* Barre d'actions par lots d'un tableau : nombre de lignes sélectionnées, actions (en enfants, ex. des `Button`),
|
|
8
|
+
* « Tout sélectionner » et « Annuler ». Les textes viennent des traductions du core.
|
|
9
|
+
*/ export const TableBatchActions = ({ shouldShowBatchActions = true, totalSelected, totalCount, onCancel, onSelectAll, className, children, ...props })=>{
|
|
10
|
+
if (!shouldShowBatchActions) return null;
|
|
11
|
+
const label = totalSelected === 1 ? getCoreTranslation('batchActionItemSelected', '{{totalSelected}} item selected', {
|
|
12
|
+
totalSelected
|
|
13
|
+
}) : getCoreTranslation('batchActionsItemsSelected', '{{totalSelected}} items selected', {
|
|
14
|
+
totalSelected
|
|
15
|
+
});
|
|
16
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
17
|
+
role: "toolbar",
|
|
18
|
+
"aria-label": label,
|
|
19
|
+
className: cn('flex items-center gap-2 bg-primary px-4 py-2 text-primary-foreground', className),
|
|
20
|
+
...props,
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ _jsx("span", {
|
|
23
|
+
className: "mr-auto text-sm font-semibold",
|
|
24
|
+
"aria-live": "polite",
|
|
25
|
+
children: label
|
|
26
|
+
}),
|
|
27
|
+
children,
|
|
28
|
+
onSelectAll && totalCount !== undefined && totalSelected < totalCount ? /*#__PURE__*/ _jsx(Button, {
|
|
29
|
+
type: "button",
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
size: "sm",
|
|
32
|
+
onClick: onSelectAll,
|
|
33
|
+
className: "text-current hover:bg-white/15",
|
|
34
|
+
children: getCoreTranslation('selectAll', 'Select all')
|
|
35
|
+
}) : null,
|
|
36
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
37
|
+
type: "button",
|
|
38
|
+
variant: "ghost",
|
|
39
|
+
size: "sm",
|
|
40
|
+
onClick: onCancel,
|
|
41
|
+
className: "text-current hover:bg-white/15",
|
|
42
|
+
children: getCoreTranslation('cancel', 'Cancel')
|
|
43
|
+
})
|
|
44
|
+
]
|
|
23
45
|
});
|
|
24
46
|
};
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { useContext } from "react";
|
|
3
3
|
import { DatePickerStateContext, DateRangePickerStateContext, Dialog } from "react-aria-components";
|
|
4
4
|
import { useOnClickOutside } from "@egen-civitas/esm-react-utils";
|
|
5
|
-
import styles from "./datepicker.module.
|
|
5
|
+
import styles from "./datepicker.module.css";
|
|
6
6
|
export function AutoCloseDialog({ children }) {
|
|
7
7
|
const datePickerState = useContext(DatePickerStateContext);
|
|
8
8
|
const rangePickerState = useContext(DateRangePickerStateContext);
|
|
@@ -5,7 +5,7 @@ import { Button, Calendar, CalendarCell, CalendarGrid, Popover, RangeCalendar }
|
|
|
5
5
|
import { ChevronLeftIcon, ChevronRightIcon } from "../icons/index.js";
|
|
6
6
|
import { MonthYear } from "./month-year.component.js";
|
|
7
7
|
import { AutoCloseDialog } from "./auto-close-dialog.component.js";
|
|
8
|
-
import styles from "./datepicker.module.
|
|
8
|
+
import styles from "./datepicker.module.css";
|
|
9
9
|
/**
|
|
10
10
|
* The calendar dropdown content shared between the single and range date pickers.
|
|
11
11
|
* Renders the popover, auto-close dialog, navigation header, and calendar grid.
|
|
@@ -18,7 +18,7 @@ import styles from "./datepicker.module.scss";
|
|
|
18
18
|
const calendarProps = isRange ? {
|
|
19
19
|
minValue: minDate,
|
|
20
20
|
maxValue: maxDate,
|
|
21
|
-
className:
|
|
21
|
+
className: styles.calendar
|
|
22
22
|
} : {};
|
|
23
23
|
return /*#__PURE__*/ _jsx(Popover, {
|
|
24
24
|
ref: ref,
|
|
@@ -55,7 +55,7 @@ import styles from "./datepicker.module.scss";
|
|
|
55
55
|
/*#__PURE__*/ _jsx(CalendarGrid, {
|
|
56
56
|
className: styles.calendarGrid,
|
|
57
57
|
children: (date)=>/*#__PURE__*/ _jsx(CalendarCell, {
|
|
58
|
-
className: classNames(
|
|
58
|
+
className: classNames(styles.day, {
|
|
59
59
|
[styles.today]: today_.compare(date) === 0
|
|
60
60
|
}),
|
|
61
61
|
date: date
|
|
@@ -5,7 +5,7 @@ interface EgenDateInputProps {
|
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* This is just the standard React Aria Components DatePickerInput with an added `onClick` handler to open
|
|
8
|
-
* the calendar when the group is clicked. This is used to emulate
|
|
8
|
+
* the calendar when the group is clicked. This is used to emulate the usual date-picker behaviour in the DatePicker.
|
|
9
9
|
*/
|
|
10
10
|
export declare const DatePickerInput: React.ForwardRefExoticComponent<DateInputProps & EgenDateInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export {};
|
|
@@ -6,7 +6,7 @@ import { useDateFieldState } from "react-stately";
|
|
|
6
6
|
import { createCalendar } from "@internationalized/date";
|
|
7
7
|
/**
|
|
8
8
|
* This is just the standard React Aria Components DatePickerInput with an added `onClick` handler to open
|
|
9
|
-
* the calendar when the group is clicked. This is used to emulate
|
|
9
|
+
* the calendar when the group is clicked. This is used to emulate the usual date-picker behaviour in the DatePicker.
|
|
10
10
|
*/ export const DatePickerInput = /*#__PURE__*/ forwardRef(function DatePickerInput(props, ref) {
|
|
11
11
|
const datePickerState = useContext(DatePickerStateContext);
|
|
12
12
|
const [dateFieldProps, fieldRef] = useContextProps({
|