@cognite/aura 0.3.4 → 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/CHANGELOG.md +274 -0
- package/DESIGN.md +664 -281
- package/LICENSE +21 -0
- package/README.md +48 -13
- package/dist/colors-deprecated.css +618 -0
- package/dist/colors.css +803 -830
- package/dist/components/index.d.ts +63 -57
- package/dist/components/index.js +62 -59
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/core/accordion/accordion.d.ts +19 -18
- package/dist/components/ui/core/accordion/accordion.js +99 -78
- package/dist/components/ui/core/accordion/accordion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.d.ts +8 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js +132 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +31 -31
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +156 -106
- package/dist/components/ui/core/action-toolbar/action-toolbar.js.map +1 -0
- package/dist/components/ui/core/alert/alert.d.ts +25 -25
- package/dist/components/ui/core/alert/alert.gallery.d.ts +2 -0
- package/dist/components/ui/core/alert/alert.gallery.js +54 -0
- package/dist/components/ui/core/alert/alert.gallery.js.map +1 -0
- package/dist/components/ui/core/alert/alert.js +181 -152
- package/dist/components/ui/core/alert/alert.js.map +1 -0
- package/dist/components/ui/core/avatar/avatar.d.ts +10 -9
- package/dist/components/ui/core/avatar/avatar.gallery.d.ts +2 -0
- package/dist/components/ui/core/avatar/avatar.gallery.js +67 -0
- package/dist/components/ui/core/avatar/avatar.gallery.js.map +1 -0
- package/dist/components/ui/core/avatar/avatar.js +75 -65
- package/dist/components/ui/core/avatar/avatar.js.map +1 -0
- package/dist/components/ui/core/badge/badge.d.ts +13 -12
- package/dist/components/ui/core/badge/badge.gallery.d.ts +2 -0
- package/dist/components/ui/core/badge/badge.gallery.js +64 -0
- package/dist/components/ui/core/badge/badge.gallery.js.map +1 -0
- package/dist/components/ui/core/badge/badge.js +88 -72
- package/dist/components/ui/core/badge/badge.js.map +1 -0
- package/dist/components/ui/core/banner/banner.d.ts +18 -18
- package/dist/components/ui/core/banner/banner.gallery.d.ts +2 -0
- package/dist/components/ui/core/banner/banner.gallery.js +56 -0
- package/dist/components/ui/core/banner/banner.gallery.js.map +1 -0
- package/dist/components/ui/core/banner/banner.js +179 -142
- package/dist/components/ui/core/banner/banner.js.map +1 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +12 -12
- package/dist/components/ui/core/breadcrumb/breadcrumb.gallery.d.ts +2 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.gallery.js +31 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.gallery.js.map +1 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +139 -104
- package/dist/components/ui/core/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/ui/core/button/button.d.ts +7 -7
- package/dist/components/ui/core/button/button.gallery.d.ts +2 -0
- package/dist/components/ui/core/button/button.gallery.js +76 -0
- package/dist/components/ui/core/button/button.gallery.js.map +1 -0
- package/dist/components/ui/core/button/button.js +57 -47
- package/dist/components/ui/core/button/button.js.map +1 -0
- package/dist/components/ui/core/button-group/button-group.d.ts +9 -9
- package/dist/components/ui/core/button-group/button-group.gallery.d.ts +2 -0
- package/dist/components/ui/core/button-group/button-group.gallery.js +62 -0
- package/dist/components/ui/core/button-group/button-group.gallery.js.map +1 -0
- package/dist/components/ui/core/button-group/button-group.js +50 -40
- package/dist/components/ui/core/button-group/button-group.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-header.d.ts +7 -7
- package/dist/components/ui/core/calendar/calendar-header.js +102 -63
- package/dist/components/ui/core/calendar/calendar-header.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-utils.d.ts +30 -30
- package/dist/components/ui/core/calendar/calendar-utils.js +116 -39
- package/dist/components/ui/core/calendar/calendar-utils.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar.d.ts +10 -10
- package/dist/components/ui/core/calendar/calendar.js +95 -66
- package/dist/components/ui/core/calendar/calendar.js.map +1 -0
- package/dist/components/ui/core/calendar/constants.js +3 -0
- package/dist/components/ui/core/calendar/constants.js.map +1 -0
- package/dist/components/ui/core/card/card.d.ts +20 -20
- package/dist/components/ui/core/card/card.js +133 -104
- package/dist/components/ui/core/card/card.js.map +1 -0
- package/dist/components/ui/core/chart/chart.d.ts +55 -53
- package/dist/components/ui/core/chart/chart.js +196 -116
- package/dist/components/ui/core/chart/chart.js.map +1 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -2
- package/dist/components/ui/core/chart/index.js +3 -2
- package/dist/components/ui/core/chart/index.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +9 -9
- package/dist/components/ui/core/checkbox/checkbox.gallery.d.ts +2 -0
- package/dist/components/ui/core/checkbox/checkbox.gallery.js +36 -0
- package/dist/components/ui/core/checkbox/checkbox.gallery.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.js +88 -68
- package/dist/components/ui/core/checkbox/checkbox.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +1 -1
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +6 -7
- package/dist/components/ui/core/checkbox/checkbox.metadata.js.map +1 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +19 -19
- package/dist/components/ui/core/code-block/code-block.js +260 -175
- package/dist/components/ui/core/code-block/code-block.js.map +1 -0
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -5
- package/dist/components/ui/core/collapsible/collapsible.gallery.d.ts +2 -0
- package/dist/components/ui/core/collapsible/collapsible.gallery.js +39 -0
- package/dist/components/ui/core/collapsible/collapsible.gallery.js.map +1 -0
- package/dist/components/ui/core/collapsible/collapsible.js +36 -30
- package/dist/components/ui/core/collapsible/collapsible.js.map +1 -0
- package/dist/components/ui/core/combobox/combobox.d.ts +13 -13
- package/dist/components/ui/core/combobox/combobox.js +89 -40
- package/dist/components/ui/core/combobox/combobox.js.map +1 -0
- package/dist/components/ui/core/command/command.d.ts +20 -18
- package/dist/components/ui/core/command/command.js +137 -85
- package/dist/components/ui/core/command/command.js.map +1 -0
- package/dist/components/ui/core/conversation/conversation.d.ts +14 -0
- package/dist/components/ui/core/conversation/conversation.js +51 -0
- package/dist/components/ui/core/conversation/conversation.js.map +1 -0
- package/dist/components/ui/core/count/count.d.ts +8 -6
- package/dist/components/ui/core/count/count.gallery.d.ts +2 -0
- package/dist/components/ui/core/count/count.gallery.js +55 -0
- package/dist/components/ui/core/count/count.gallery.js.map +1 -0
- package/dist/components/ui/core/count/count.js +51 -21
- package/dist/components/ui/core/count/count.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-cell.d.ts +5 -7
- package/dist/components/ui/core/data-grid/data-grid-cell.js +19 -0
- package/dist/components/ui/core/data-grid/data-grid-cell.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-column-filter.d.ts +4 -0
- package/dist/components/ui/core/data-grid/data-grid-column-filter.js +13 -0
- package/dist/components/ui/core/data-grid/data-grid-column-filter.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-column-resizer.d.ts +8 -0
- package/dist/components/ui/core/data-grid/data-grid-column-resizer.js +25 -0
- package/dist/components/ui/core/data-grid/data-grid-column-resizer.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.d.ts +14 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js +36 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.d.ts +43 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js +287 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.d.ts +6 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js +34 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header-row.d.ts +10 -10
- package/dist/components/ui/core/data-grid/data-grid-header-row.js +86 -0
- package/dist/components/ui/core/data-grid/data-grid-header-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header.d.ts +11 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js +67 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-row.d.ts +13 -15
- package/dist/components/ui/core/data-grid/data-grid-row.js +118 -0
- package/dist/components/ui/core/data-grid/data-grid-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-state.d.ts +15 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-state.js +32 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-state.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-toolbar.d.ts +11 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-toolbar.js +129 -0
- package/dist/components/ui/core/data-grid/data-grid-selection-toolbar.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-selection.types.d.ts +24 -0
- package/dist/components/ui/core/data-grid/data-grid-selection.types.js +3 -0
- package/dist/components/ui/core/data-grid/data-grid-selection.types.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.d.ts +125 -35
- package/dist/components/ui/core/data-grid/data-grid.fixtures.d.ts +7 -7
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js +139 -0
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.js +542 -0
- package/dist/components/ui/core/data-grid/data-grid.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.utils.d.ts +3 -4
- package/dist/components/ui/core/data-grid/data-grid.utils.js +53 -0
- package/dist/components/ui/core/data-grid/data-grid.utils.js.map +1 -0
- package/dist/components/ui/core/data-grid/index.d.ts +6 -0
- package/dist/components/ui/core/data-grid/index.js +6 -0
- package/dist/components/ui/core/data-grid/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +85 -61
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +14 -14
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +51 -36
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +89 -64
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -4
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +95 -60
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js +120 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.d.ts +25 -32
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js +78 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +13 -15
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +165 -119
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +37 -37
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +163 -104
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +17 -12
- package/dist/components/ui/core/date-time-pickers/index.js +10 -6
- package/dist/components/ui/core/date-time-pickers/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +52 -42
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +6 -1
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +16 -15
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +87 -64
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +10 -9
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +89 -38
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +34 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +23 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +95 -52
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +22 -18
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +19 -19
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +41 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +33 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +9 -4
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -9
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +22 -17
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +49 -40
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +7 -7
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +41 -34
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.d.ts +12 -14
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +99 -79
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +63 -41
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.d.ts +14 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js +115 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.d.ts +30 -36
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js +145 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.d.ts +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js +67 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +18 -18
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js +42 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +31 -29
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +21 -21
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js +170 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +28 -28
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +88 -7
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +17 -17
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js.map +1 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +12 -9
- package/dist/components/ui/core/dialog/dialog.js +90 -82
- package/dist/components/ui/core/dialog/dialog.js.map +1 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +22 -19
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +204 -149
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +4 -4
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -5
- package/dist/components/ui/core/empty-state/empty-state.context.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +14 -14
- package/dist/components/ui/core/empty-state/empty-state.js +96 -82
- package/dist/components/ui/core/empty-state/empty-state.js.map +1 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -7
- package/dist/components/ui/core/helper-text/helper-text.js +55 -36
- package/dist/components/ui/core/helper-text/helper-text.js.map +1 -0
- package/dist/components/ui/core/hover-card/hover-card.d.ts +7 -6
- package/dist/components/ui/core/hover-card/hover-card.js +56 -52
- package/dist/components/ui/core/hover-card/hover-card.js.map +1 -0
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.js +121 -97
- package/dist/components/ui/core/inline-citation/inline-citation.js.map +1 -0
- package/dist/components/ui/core/input/input.d.ts +2 -2
- package/dist/components/ui/core/input/input.gallery.d.ts +2 -0
- package/dist/components/ui/core/input/input.gallery.js +89 -0
- package/dist/components/ui/core/input/input.gallery.js.map +1 -0
- package/dist/components/ui/core/input/input.js +15 -13
- package/dist/components/ui/core/input/input.js.map +1 -0
- package/dist/components/ui/core/input-group/input-group.d.ts +25 -14
- package/dist/components/ui/core/input-group/input-group.js +149 -76
- package/dist/components/ui/core/input-group/input-group.js.map +1 -0
- package/dist/components/ui/core/item/item.d.ts +20 -0
- package/dist/components/ui/core/item/item.js +93 -0
- package/dist/components/ui/core/item/item.js.map +1 -0
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -3
- package/dist/components/ui/core/kbd/kbd.js +24 -20
- package/dist/components/ui/core/kbd/kbd.js.map +1 -0
- package/dist/components/ui/core/label/label.d.ts +3 -3
- package/dist/components/ui/core/label/label.gallery.d.ts +2 -0
- package/dist/components/ui/core/label/label.gallery.js +57 -0
- package/dist/components/ui/core/label/label.gallery.js.map +1 -0
- package/dist/components/ui/core/label/label.js +33 -26
- package/dist/components/ui/core/label/label.js.map +1 -0
- package/dist/components/ui/core/loader/loader.d.ts +6 -6
- package/dist/components/ui/core/loader/loader.js +97 -80
- package/dist/components/ui/core/loader/loader.js.map +1 -0
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +8 -9
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +18 -12
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js.map +1 -0
- package/dist/components/ui/core/message/message-response-math-plugin.d.ts +3 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js +6 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js.map +1 -0
- package/dist/components/ui/core/message/message.d.ts +27 -23
- package/dist/components/ui/core/message/message.js +458 -316
- package/dist/components/ui/core/message/message.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.d.ts +21 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js +197 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.d.ts +37 -35
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js +206 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +2 -2
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -5
- package/dist/components/ui/core/pagination/pagination-size-context.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +9 -9
- package/dist/components/ui/core/pagination/pagination-teleport.js +127 -84
- package/dist/components/ui/core/pagination/pagination-teleport.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +39 -39
- package/dist/components/ui/core/pagination/pagination.js +294 -234
- package/dist/components/ui/core/pagination/pagination.js.map +1 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -11
- package/dist/components/ui/core/popover/popover.js +104 -89
- package/dist/components/ui/core/popover/popover.js.map +1 -0
- package/dist/components/ui/core/progress/progress.d.ts +9 -8
- package/dist/components/ui/core/progress/progress.js +50 -35
- package/dist/components/ui/core/progress/progress.js.map +1 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +27 -27
- package/dist/components/ui/core/prompt-input/prompt-input.js +342 -271
- package/dist/components/ui/core/prompt-input/prompt-input.js.map +1 -0
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -12
- package/dist/components/ui/core/radio-group/radio-group.gallery.d.ts +2 -0
- package/dist/components/ui/core/radio-group/radio-group.gallery.js +44 -0
- package/dist/components/ui/core/radio-group/radio-group.gallery.js.map +1 -0
- package/dist/components/ui/core/radio-group/radio-group.js +88 -58
- package/dist/components/ui/core/radio-group/radio-group.js.map +1 -0
- package/dist/components/ui/core/reasoning/reasoning.d.ts +7 -7
- package/dist/components/ui/core/reasoning/reasoning.js +68 -56
- package/dist/components/ui/core/reasoning/reasoning.js.map +1 -0
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -4
- package/dist/components/ui/core/scroll-area/scroll-area.js +50 -40
- package/dist/components/ui/core/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/core/search/search.d.ts +8 -8
- package/dist/components/ui/core/search/search.js +122 -76
- package/dist/components/ui/core/search/search.js.map +1 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +17 -11
- package/dist/components/ui/core/segmented-control/segmented-control.js +204 -108
- package/dist/components/ui/core/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/ui/core/select/select.d.ts +33 -26
- package/dist/components/ui/core/select/select.js +262 -168
- package/dist/components/ui/core/select/select.js.map +1 -0
- package/dist/components/ui/core/separator/separator.d.ts +2 -2
- package/dist/components/ui/core/separator/separator.gallery.d.ts +2 -0
- package/dist/components/ui/core/separator/separator.gallery.js +63 -0
- package/dist/components/ui/core/separator/separator.gallery.js.map +1 -0
- package/dist/components/ui/core/separator/separator.js +13 -13
- package/dist/components/ui/core/separator/separator.js.map +1 -0
- package/dist/components/ui/core/shimmer/shimmer.d.ts +8 -8
- package/dist/components/ui/core/shimmer/shimmer.js +64 -40
- package/dist/components/ui/core/shimmer/shimmer.js.map +1 -0
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -2
- package/dist/components/ui/core/skeleton/skeleton.gallery.d.ts +2 -0
- package/dist/components/ui/core/skeleton/skeleton.gallery.js +22 -0
- package/dist/components/ui/core/skeleton/skeleton.gallery.js.map +1 -0
- package/dist/components/ui/core/skeleton/skeleton.js +13 -13
- package/dist/components/ui/core/skeleton/skeleton.js.map +1 -0
- package/dist/components/ui/core/slider/slider.d.ts +7 -7
- package/dist/components/ui/core/slider/slider.gallery.d.ts +2 -0
- package/dist/components/ui/core/slider/slider.gallery.js +62 -0
- package/dist/components/ui/core/slider/slider.gallery.js.map +1 -0
- package/dist/components/ui/core/slider/slider.js +51 -39
- package/dist/components/ui/core/slider/slider.js.map +1 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +67 -54
- package/dist/components/ui/core/sonner-toast/sonner-toast.js.map +1 -0
- package/dist/components/ui/core/sources/sources.d.ts +12 -12
- package/dist/components/ui/core/sources/sources.js +87 -58
- package/dist/components/ui/core/sources/sources.js.map +1 -0
- package/dist/components/ui/core/status-text/status-text.d.ts +4 -0
- package/dist/components/ui/core/status-text/status-text.js +14 -0
- package/dist/components/ui/core/status-text/status-text.js.map +1 -0
- package/dist/components/ui/core/switch/switch.d.ts +9 -9
- package/dist/components/ui/core/switch/switch.gallery.d.ts +2 -0
- package/dist/components/ui/core/switch/switch.gallery.js +67 -0
- package/dist/components/ui/core/switch/switch.gallery.js.map +1 -0
- package/dist/components/ui/core/switch/switch.js +83 -61
- package/dist/components/ui/core/switch/switch.js.map +1 -0
- package/dist/components/ui/core/switch/switch.metadata.d.ts +1 -1
- package/dist/components/ui/core/switch/switch.metadata.js +8 -0
- package/dist/components/ui/core/switch/switch.metadata.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.d.ts +20 -18
- package/dist/components/ui/core/tabs/tabs.js +176 -147
- package/dist/components/ui/core/tabs/tabs.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.utils.d.ts +1 -1
- package/dist/components/ui/core/tabs/tabs.utils.js +10 -6
- package/dist/components/ui/core/tabs/tabs.utils.js.map +1 -0
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -2
- package/dist/components/ui/core/textarea/textarea.gallery.d.ts +2 -0
- package/dist/components/ui/core/textarea/textarea.gallery.js +51 -0
- package/dist/components/ui/core/textarea/textarea.gallery.js.map +1 -0
- package/dist/components/ui/core/textarea/textarea.js +13 -13
- package/dist/components/ui/core/textarea/textarea.js.map +1 -0
- package/dist/components/ui/core/toggle/toggle.d.ts +9 -9
- package/dist/components/ui/core/toggle/toggle.gallery.d.ts +2 -0
- package/dist/components/ui/core/toggle/toggle.gallery.js +32 -0
- package/dist/components/ui/core/toggle/toggle.gallery.js.map +1 -0
- package/dist/components/ui/core/toggle/toggle.js +60 -54
- package/dist/components/ui/core/toggle/toggle.js.map +1 -0
- package/dist/components/ui/core/tool/tool.d.ts +18 -18
- package/dist/components/ui/core/tool/tool.js +167 -126
- package/dist/components/ui/core/tool/tool.js.map +1 -0
- package/dist/components/ui/core/toolbar/toolbar.d.ts +37 -0
- package/dist/components/ui/core/toolbar/toolbar.js +171 -0
- package/dist/components/ui/core/toolbar/toolbar.js.map +1 -0
- package/dist/components/ui/core/tooltip/tooltip.d.ts +8 -7
- package/dist/components/ui/core/tooltip/tooltip.gallery.d.ts +2 -0
- package/dist/components/ui/core/tooltip/tooltip.gallery.js +52 -0
- package/dist/components/ui/core/tooltip/tooltip.gallery.js.map +1 -0
- package/dist/components/ui/core/tooltip/tooltip.js +53 -46
- package/dist/components/ui/core/tooltip/tooltip.js.map +1 -0
- package/dist/components/ui/core/topbar/topbar.d.ts +26 -26
- package/dist/components/ui/core/topbar/topbar.js +160 -105
- package/dist/components/ui/core/topbar/topbar.js.map +1 -0
- package/dist/components/ui/core/tree/tree.d.ts +20 -0
- package/dist/components/ui/core/tree/tree.js +100 -0
- package/dist/components/ui/core/tree/tree.js.map +1 -0
- package/dist/eslint/index.d.ts +5 -5
- package/dist/eslint/index.js +9 -5
- package/dist/eslint/index.js.map +1 -0
- package/dist/eslint/no-overriding-styles.d.ts +1 -1
- package/dist/eslint/no-overriding-styles.js +341 -201
- package/dist/eslint/no-overriding-styles.js.map +1 -0
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +2 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/ai/types.d.ts +43 -43
- package/dist/lib/ai/types.js +3 -0
- package/dist/lib/ai/types.js.map +1 -0
- package/dist/lib/decorative-variant-classes.d.ts +53 -0
- package/dist/lib/decorative-variant-classes.js +58 -0
- package/dist/lib/decorative-variant-classes.js.map +1 -0
- package/dist/lib/highlight-code.d.ts +11 -8
- package/dist/lib/highlight-code.js +58 -40
- package/dist/lib/highlight-code.js.map +1 -0
- package/dist/lib/portal-container-context.d.ts +1 -1
- package/dist/lib/portal-container-context.js +8 -8
- package/dist/lib/portal-container-context.js.map +1 -0
- package/dist/lib/shared-theme-from-url.d.ts +13 -0
- package/dist/lib/shared-theme-from-url.js +61 -0
- package/dist/lib/shared-theme-from-url.js.map +1 -0
- package/dist/lib/style-scope.d.ts +2 -2
- package/dist/lib/style-scope.js +6 -6
- package/dist/lib/style-scope.js.map +1 -0
- package/dist/lib/theme-share-url.d.ts +31 -0
- package/dist/lib/theme-share-url.js +116 -0
- package/dist/lib/theme-share-url.js.map +1 -0
- package/dist/lib/types.d.ts +39 -39
- package/dist/lib/types.js +3 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/use-controllable-state.d.ts +4 -7
- package/dist/lib/use-controllable-state.js +34 -21
- package/dist/lib/use-controllable-state.js.map +1 -0
- package/dist/lib/utils.d.ts +63 -34
- package/dist/lib/utils.js +134 -32
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +2 -1
- package/dist/styles.source.css +46 -16
- package/dist/utils/assign-ref.d.ts +3 -0
- package/dist/utils/assign-ref.js +13 -0
- package/dist/utils/assign-ref.js.map +1 -0
- package/package.json +53 -14
- package/src/components/ui/core/alert/alert.md +46 -0
- package/src/components/ui/core/avatar/avatar.md +30 -0
- package/src/components/ui/core/badge/badge.md +32 -0
- package/src/components/ui/core/banner/banner.md +51 -0
- package/src/components/ui/core/breadcrumb/breadcrumb.md +45 -0
- package/src/components/ui/core/button/button.md +93 -0
- package/src/components/ui/core/button-group/button-group.md +38 -0
- package/src/components/ui/core/checkbox/checkbox.md +37 -0
- package/src/components/ui/core/collapsible/collapsible.md +42 -0
- package/src/components/ui/core/count/count.md +33 -0
- package/src/components/ui/core/input/input.md +48 -0
- package/src/components/ui/core/label/label.md +35 -0
- package/src/components/ui/core/radio-group/radio-group.md +38 -0
- package/src/components/ui/core/separator/separator.md +32 -0
- package/src/components/ui/core/skeleton/skeleton.md +33 -0
- package/src/components/ui/core/slider/slider.md +41 -0
- package/src/components/ui/core/switch/switch.md +26 -0
- package/src/components/ui/core/textarea/textarea.md +42 -0
- package/src/components/ui/core/toggle/toggle.md +39 -0
- package/src/components/ui/core/tooltip/tooltip.md +41 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { IconMinus, IconPlus, IconX } from "@tabler/icons-react";
|
|
4
|
+
import { cn } from "../../../../lib/utils.js";
|
|
5
|
+
import { Button } from "../button/button.js";
|
|
6
|
+
import { Input } from "../input/input.js";
|
|
7
|
+
import { Select, SelectContent, SelectItem, SelectTrigger } from "../select/select.js";
|
|
8
|
+
const DEFAULT_COLUMN_OPERATORS = [
|
|
9
|
+
'contains',
|
|
10
|
+
'equals',
|
|
11
|
+
'startsWith'
|
|
12
|
+
];
|
|
13
|
+
function operatorsForColumnId(columns, columnId) {
|
|
14
|
+
const custom = columns.find((column)=>column.id === columnId)?.operators;
|
|
15
|
+
return custom != null && custom.length > 0 ? custom : DEFAULT_COLUMN_OPERATORS;
|
|
16
|
+
}
|
|
17
|
+
const isDataGridFilterJoin = (value)=>value === 'and' || value === 'or';
|
|
18
|
+
const isDataGridFilterOperator = (value)=>value === 'contains' || value === 'equals' || value === 'startsWith';
|
|
19
|
+
const defaultDataGridFilterPanelLabels = {
|
|
20
|
+
title: 'Filters',
|
|
21
|
+
close: 'Close filters',
|
|
22
|
+
showFieldsWhere: 'Show fields where',
|
|
23
|
+
join: 'Filter join',
|
|
24
|
+
joinAnd: 'And',
|
|
25
|
+
joinOr: 'Or',
|
|
26
|
+
column: 'Filter column',
|
|
27
|
+
operator: 'Filter operator',
|
|
28
|
+
operatorContains: 'Contains',
|
|
29
|
+
operatorEquals: 'Equals',
|
|
30
|
+
operatorStartsWith: 'Starts with',
|
|
31
|
+
value: 'Filter value',
|
|
32
|
+
valuePlaceholder: 'Enter value',
|
|
33
|
+
removeClause: 'Remove filter',
|
|
34
|
+
addClause: 'Add condition',
|
|
35
|
+
clearAll: 'Clear all',
|
|
36
|
+
apply: 'Apply filters',
|
|
37
|
+
results: (filteredResultCount)=>`Results ${filteredResultCount.toLocaleString()}`,
|
|
38
|
+
maxClausesReached: (maxClauses)=>`Maximum ${maxClauses} conditions`
|
|
39
|
+
};
|
|
40
|
+
const DataGridFilterPanel = /*#__PURE__*/ forwardRef(function DataGridFilterPanel({ clauses, columns, maxClauses = 5, filteredResultCount, lockedColumnId, labels: labelOverrides, onChange, onClearAll, onClose, onApply, hasActiveFilters = true, className, ...props }, ref) {
|
|
41
|
+
const labels = {
|
|
42
|
+
...defaultDataGridFilterPanelLabels,
|
|
43
|
+
...labelOverrides
|
|
44
|
+
};
|
|
45
|
+
const canAddClause = clauses.length < maxClauses;
|
|
46
|
+
const uniformJoinValue = clauses[1]?.join ?? 'and';
|
|
47
|
+
const draftHasActiveClause = clauses.some((clause)=>clause.value.trim() !== '');
|
|
48
|
+
const canApply = draftHasActiveClause;
|
|
49
|
+
const columnSelectDisabled = lockedColumnId != null || columns.length <= 1;
|
|
50
|
+
const operatorLabel = {
|
|
51
|
+
contains: labels.operatorContains,
|
|
52
|
+
equals: labels.operatorEquals,
|
|
53
|
+
startsWith: labels.operatorStartsWith
|
|
54
|
+
};
|
|
55
|
+
const joinLabel = {
|
|
56
|
+
and: labels.joinAnd,
|
|
57
|
+
or: labels.joinOr
|
|
58
|
+
};
|
|
59
|
+
const columnLabel = (id)=>columns.find((column)=>column.id === id)?.label ?? id;
|
|
60
|
+
const updateClause = (index, patch)=>{
|
|
61
|
+
onChange(clauses.map((clause, clauseIndex)=>clauseIndex === index ? {
|
|
62
|
+
...clause,
|
|
63
|
+
...patch
|
|
64
|
+
} : clause));
|
|
65
|
+
};
|
|
66
|
+
const createClause = (join = 'and')=>{
|
|
67
|
+
const columnId = lockedColumnId ?? columns[0]?.id ?? '';
|
|
68
|
+
const allowed = operatorsForColumnId(columns, columnId);
|
|
69
|
+
return {
|
|
70
|
+
columnId,
|
|
71
|
+
operator: allowed[0],
|
|
72
|
+
value: '',
|
|
73
|
+
join
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
const addClause = ()=>{
|
|
77
|
+
if (!canAddClause) return;
|
|
78
|
+
onChange([
|
|
79
|
+
...clauses,
|
|
80
|
+
createClause(clauses[clauses.length - 1]?.join ?? 'and')
|
|
81
|
+
]);
|
|
82
|
+
};
|
|
83
|
+
const removeClause = (index)=>{
|
|
84
|
+
const next = clauses.filter((_clause, clauseIndex)=>clauseIndex !== index);
|
|
85
|
+
onChange(next.length > 0 ? next : [
|
|
86
|
+
createClause()
|
|
87
|
+
]);
|
|
88
|
+
};
|
|
89
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
90
|
+
ref: ref,
|
|
91
|
+
"data-slot": "data-grid-filter-panel",
|
|
92
|
+
className: cn('w-[min(52rem,calc(100vw-2rem))] rounded-lg border border-border bg-background p-4 shadow-default', className),
|
|
93
|
+
...props,
|
|
94
|
+
children: [
|
|
95
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
96
|
+
className: "mb-2 flex items-center justify-between gap-3",
|
|
97
|
+
children: [
|
|
98
|
+
/*#__PURE__*/ _jsx("p", {
|
|
99
|
+
className: "text-base font-medium text-foreground",
|
|
100
|
+
children: labels.title
|
|
101
|
+
}),
|
|
102
|
+
onClose != null && /*#__PURE__*/ _jsx(Button, {
|
|
103
|
+
size: "icon-sm",
|
|
104
|
+
variant: "ghost",
|
|
105
|
+
className: "shrink-0",
|
|
106
|
+
"aria-label": labels.close,
|
|
107
|
+
onClick: onClose,
|
|
108
|
+
children: /*#__PURE__*/ _jsx(IconX, {
|
|
109
|
+
className: "size-4",
|
|
110
|
+
"aria-hidden": true
|
|
111
|
+
})
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
}),
|
|
115
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
116
|
+
className: "grid gap-2",
|
|
117
|
+
children: [
|
|
118
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
119
|
+
className: "grid grid-cols-[75px_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_36px] gap-2",
|
|
120
|
+
children: [
|
|
121
|
+
/*#__PURE__*/ _jsx("span", {}),
|
|
122
|
+
/*#__PURE__*/ _jsx("span", {
|
|
123
|
+
className: "text-sm font-medium text-muted-foreground",
|
|
124
|
+
children: labels.showFieldsWhere
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
}),
|
|
128
|
+
clauses.map((clause, index)=>/*#__PURE__*/ _jsxs("div", {
|
|
129
|
+
className: "grid grid-cols-[75px_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_36px] items-center gap-2",
|
|
130
|
+
children: [
|
|
131
|
+
index === 0 ? /*#__PURE__*/ _jsx("span", {}) : index > 1 ? /*#__PURE__*/ _jsx("span", {
|
|
132
|
+
className: "px-3 text-sm font-medium text-foreground capitalize",
|
|
133
|
+
children: uniformJoinValue
|
|
134
|
+
}) : /*#__PURE__*/ _jsxs(Select, {
|
|
135
|
+
value: uniformJoinValue,
|
|
136
|
+
onValueChange: (join)=>{
|
|
137
|
+
if (isDataGridFilterJoin(join)) {
|
|
138
|
+
onChange(clauses.map((joined, joinedIndex)=>joinedIndex === 0 ? joined : {
|
|
139
|
+
...joined,
|
|
140
|
+
join
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
children: [
|
|
145
|
+
/*#__PURE__*/ _jsx(SelectTrigger, {
|
|
146
|
+
"aria-label": labels.join,
|
|
147
|
+
className: "h-8 min-w-0 w-full text-sm",
|
|
148
|
+
children: joinLabel[uniformJoinValue]
|
|
149
|
+
}),
|
|
150
|
+
/*#__PURE__*/ _jsxs(SelectContent, {
|
|
151
|
+
children: [
|
|
152
|
+
/*#__PURE__*/ _jsx(SelectItem, {
|
|
153
|
+
value: "and",
|
|
154
|
+
children: labels.joinAnd
|
|
155
|
+
}),
|
|
156
|
+
/*#__PURE__*/ _jsx(SelectItem, {
|
|
157
|
+
value: "or",
|
|
158
|
+
children: labels.joinOr
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
}),
|
|
164
|
+
/*#__PURE__*/ _jsxs(Select, {
|
|
165
|
+
value: clause.columnId,
|
|
166
|
+
onValueChange: (value)=>{
|
|
167
|
+
const allowed = operatorsForColumnId(columns, value);
|
|
168
|
+
const operator = allowed.includes(clause.operator) ? clause.operator : allowed[0];
|
|
169
|
+
updateClause(index, {
|
|
170
|
+
columnId: value,
|
|
171
|
+
operator
|
|
172
|
+
});
|
|
173
|
+
},
|
|
174
|
+
disabled: columnSelectDisabled,
|
|
175
|
+
children: [
|
|
176
|
+
/*#__PURE__*/ _jsx(SelectTrigger, {
|
|
177
|
+
"aria-label": labels.column,
|
|
178
|
+
className: "h-8 min-w-0 w-full text-sm",
|
|
179
|
+
children: columnLabel(clause.columnId)
|
|
180
|
+
}),
|
|
181
|
+
/*#__PURE__*/ _jsx(SelectContent, {
|
|
182
|
+
children: columns.map((column)=>/*#__PURE__*/ _jsx(SelectItem, {
|
|
183
|
+
value: column.id,
|
|
184
|
+
children: column.label
|
|
185
|
+
}, column.id))
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
}),
|
|
189
|
+
/*#__PURE__*/ _jsxs(Select, {
|
|
190
|
+
value: clause.operator,
|
|
191
|
+
onValueChange: (value)=>{
|
|
192
|
+
if (isDataGridFilterOperator(value)) {
|
|
193
|
+
updateClause(index, {
|
|
194
|
+
operator: value
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
disabled: operatorsForColumnId(columns, clause.columnId).length <= 1,
|
|
199
|
+
children: [
|
|
200
|
+
/*#__PURE__*/ _jsx(SelectTrigger, {
|
|
201
|
+
"aria-label": labels.operator,
|
|
202
|
+
className: "h-8 min-w-0 w-full text-sm",
|
|
203
|
+
children: operatorLabel[clause.operator]
|
|
204
|
+
}),
|
|
205
|
+
/*#__PURE__*/ _jsx(SelectContent, {
|
|
206
|
+
children: operatorsForColumnId(columns, clause.columnId).map((operator)=>/*#__PURE__*/ _jsx(SelectItem, {
|
|
207
|
+
value: operator,
|
|
208
|
+
children: operatorLabel[operator]
|
|
209
|
+
}, operator))
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
}),
|
|
213
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
214
|
+
"aria-label": labels.value,
|
|
215
|
+
value: clause.value,
|
|
216
|
+
placeholder: labels.valuePlaceholder,
|
|
217
|
+
onChange: (event)=>updateClause(index, {
|
|
218
|
+
value: event.target.value
|
|
219
|
+
})
|
|
220
|
+
}),
|
|
221
|
+
index === 0 ? /*#__PURE__*/ _jsx("span", {}) : /*#__PURE__*/ _jsx(Button, {
|
|
222
|
+
size: "icon",
|
|
223
|
+
variant: "ghost",
|
|
224
|
+
"aria-label": labels.removeClause,
|
|
225
|
+
onClick: ()=>removeClause(index),
|
|
226
|
+
children: /*#__PURE__*/ _jsx(IconMinus, {
|
|
227
|
+
className: "size-4",
|
|
228
|
+
"aria-hidden": "true"
|
|
229
|
+
})
|
|
230
|
+
})
|
|
231
|
+
]
|
|
232
|
+
}, clause.id ?? index))
|
|
233
|
+
]
|
|
234
|
+
}),
|
|
235
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
236
|
+
className: "mt-3 flex items-center justify-between gap-2 pl-[83px]",
|
|
237
|
+
children: [
|
|
238
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
239
|
+
className: "flex items-center gap-2",
|
|
240
|
+
children: [
|
|
241
|
+
/*#__PURE__*/ _jsxs(Button, {
|
|
242
|
+
variant: "outline",
|
|
243
|
+
onClick: addClause,
|
|
244
|
+
disabled: !canAddClause,
|
|
245
|
+
children: [
|
|
246
|
+
/*#__PURE__*/ _jsx(IconPlus, {
|
|
247
|
+
className: "size-4",
|
|
248
|
+
"aria-hidden": "true"
|
|
249
|
+
}),
|
|
250
|
+
labels.addClause
|
|
251
|
+
]
|
|
252
|
+
}),
|
|
253
|
+
filteredResultCount != null && /*#__PURE__*/ _jsx("span", {
|
|
254
|
+
className: "text-sm font-medium text-foreground",
|
|
255
|
+
children: labels.results(filteredResultCount)
|
|
256
|
+
}),
|
|
257
|
+
!canAddClause ? /*#__PURE__*/ _jsx("span", {
|
|
258
|
+
className: "text-sm text-muted-foreground",
|
|
259
|
+
children: labels.maxClausesReached(maxClauses)
|
|
260
|
+
}) : null
|
|
261
|
+
]
|
|
262
|
+
}),
|
|
263
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
264
|
+
className: "flex items-center gap-2",
|
|
265
|
+
children: [
|
|
266
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
267
|
+
variant: "ghost",
|
|
268
|
+
onClick: onClearAll,
|
|
269
|
+
disabled: !hasActiveFilters,
|
|
270
|
+
children: labels.clearAll
|
|
271
|
+
}),
|
|
272
|
+
onApply ? /*#__PURE__*/ _jsx(Button, {
|
|
273
|
+
onClick: onApply,
|
|
274
|
+
disabled: !canApply,
|
|
275
|
+
children: labels.apply
|
|
276
|
+
}) : null
|
|
277
|
+
]
|
|
278
|
+
})
|
|
279
|
+
]
|
|
280
|
+
})
|
|
281
|
+
]
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
DataGridFilterPanel.displayName = 'DataGridFilterPanel';
|
|
285
|
+
export { DataGridFilterPanel };
|
|
286
|
+
|
|
287
|
+
//# sourceMappingURL=data-grid-filter-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/data-grid/data-grid-filter-panel.tsx"],"sourcesContent":["import {\n type ChangeEvent,\n type ComponentProps,\n type ComponentRef,\n type ForwardRefExoticComponent,\n type Ref,\n type RefAttributes,\n forwardRef,\n} from 'react';\n\nimport { IconMinus, IconPlus, IconX } from '@tabler/icons-react';\n\nimport { cn } from '../../../../lib/utils';\nimport { Button } from '../button/button';\nimport { Input } from '../input/input';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n} from '../select/select';\n\nimport type {\n DataGridFilterClause,\n DataGridFilterJoin,\n DataGridFilterOperator,\n} from './data-grid-filter-clauses';\n\nconst DEFAULT_COLUMN_OPERATORS: DataGridFilterOperator[] = [\n 'contains',\n 'equals',\n 'startsWith',\n];\n\ntype DataGridFilterColumn = {\n id: string;\n label: string;\n operators?: DataGridFilterOperator[];\n};\n\nfunction operatorsForColumnId(\n columns: DataGridFilterColumn[],\n columnId: string\n): DataGridFilterOperator[] {\n const custom = columns.find(\n (column: DataGridFilterColumn) => column.id === columnId\n )?.operators;\n return custom != null && custom.length > 0\n ? custom\n : DEFAULT_COLUMN_OPERATORS;\n}\n\nconst isDataGridFilterJoin = (value: string): value is DataGridFilterJoin =>\n value === 'and' || value === 'or';\n\nconst isDataGridFilterOperator = (\n value: string\n): value is DataGridFilterOperator =>\n value === 'contains' || value === 'equals' || value === 'startsWith';\n\ntype DataGridFilterPanelLabels = {\n title: string;\n close: string;\n showFieldsWhere: string;\n join: string;\n joinAnd: string;\n joinOr: string;\n column: string;\n operator: string;\n operatorContains: string;\n operatorEquals: string;\n operatorStartsWith: string;\n value: string;\n valuePlaceholder: string;\n removeClause: string;\n addClause: string;\n clearAll: string;\n apply: string;\n results: (filteredResultCount: number) => string;\n maxClausesReached: (maxClauses: number) => string;\n};\n\nconst defaultDataGridFilterPanelLabels: DataGridFilterPanelLabels = {\n title: 'Filters',\n close: 'Close filters',\n showFieldsWhere: 'Show fields where',\n join: 'Filter join',\n joinAnd: 'And',\n joinOr: 'Or',\n column: 'Filter column',\n operator: 'Filter operator',\n operatorContains: 'Contains',\n operatorEquals: 'Equals',\n operatorStartsWith: 'Starts with',\n value: 'Filter value',\n valuePlaceholder: 'Enter value',\n removeClause: 'Remove filter',\n addClause: 'Add condition',\n clearAll: 'Clear all',\n apply: 'Apply filters',\n results: (filteredResultCount: number) =>\n `Results ${filteredResultCount.toLocaleString()}`,\n maxClausesReached: (maxClauses: number) => `Maximum ${maxClauses} conditions`,\n};\n\ntype DataGridFilterPanelProps = Omit<ComponentProps<'div'>, 'onChange'> & {\n clauses: DataGridFilterClause[];\n columns: DataGridFilterColumn[];\n maxClauses?: number;\n filteredResultCount?: number;\n lockedColumnId?: string;\n labels?: Partial<DataGridFilterPanelLabels>;\n onChange: (clauses: DataGridFilterClause[]) => void;\n onClearAll: () => void;\n onClose?: () => void;\n onApply?: () => void;\n hasActiveFilters?: boolean;\n};\n\nconst DataGridFilterPanel: ForwardRefExoticComponent<\n DataGridFilterPanelProps & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, DataGridFilterPanelProps>(\n function DataGridFilterPanel(\n {\n clauses,\n columns,\n maxClauses = 5,\n filteredResultCount,\n lockedColumnId,\n labels: labelOverrides,\n onChange,\n onClearAll,\n onClose,\n onApply,\n hasActiveFilters = true,\n className,\n ...props\n }: DataGridFilterPanelProps,\n ref: Ref<ComponentRef<'div'>>\n ) {\n const labels = { ...defaultDataGridFilterPanelLabels, ...labelOverrides };\n const canAddClause = clauses.length < maxClauses;\n const uniformJoinValue = clauses[1]?.join ?? 'and';\n const draftHasActiveClause = clauses.some(\n (clause: DataGridFilterClause) => clause.value.trim() !== ''\n );\n const canApply = draftHasActiveClause;\n const columnSelectDisabled = lockedColumnId != null || columns.length <= 1;\n\n const operatorLabel: Record<DataGridFilterOperator, string> = {\n contains: labels.operatorContains,\n equals: labels.operatorEquals,\n startsWith: labels.operatorStartsWith,\n };\n const joinLabel: Record<DataGridFilterJoin, string> = {\n and: labels.joinAnd,\n or: labels.joinOr,\n };\n const columnLabel = (id: string) =>\n columns.find((column: DataGridFilterColumn) => column.id === id)?.label ??\n id;\n\n const updateClause = (\n index: number,\n patch: Partial<DataGridFilterClause>\n ) => {\n onChange(\n clauses.map((clause: DataGridFilterClause, clauseIndex: number) =>\n clauseIndex === index ? { ...clause, ...patch } : clause\n )\n );\n };\n\n const createClause = (\n join: DataGridFilterJoin = 'and'\n ): DataGridFilterClause => {\n const columnId = lockedColumnId ?? columns[0]?.id ?? '';\n const allowed = operatorsForColumnId(columns, columnId);\n return {\n columnId,\n operator: allowed[0],\n value: '',\n join,\n };\n };\n\n const addClause = () => {\n if (!canAddClause) return;\n onChange([\n ...clauses,\n createClause(clauses[clauses.length - 1]?.join ?? 'and'),\n ]);\n };\n\n const removeClause = (index: number) => {\n const next = clauses.filter(\n (_clause: DataGridFilterClause, clauseIndex: number) =>\n clauseIndex !== index\n );\n onChange(next.length > 0 ? next : [createClause()]);\n };\n\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-filter-panel\"\n className={cn(\n 'w-[min(52rem,calc(100vw-2rem))] rounded-lg border border-border bg-background p-4 shadow-default',\n className\n )}\n {...props}\n >\n <div className=\"mb-2 flex items-center justify-between gap-3\">\n <p className=\"text-base font-medium text-foreground\">\n {labels.title}\n </p>\n {onClose != null && (\n <Button\n size=\"icon-sm\"\n variant=\"ghost\"\n className=\"shrink-0\"\n aria-label={labels.close}\n onClick={onClose}\n >\n <IconX className=\"size-4\" aria-hidden />\n </Button>\n )}\n </div>\n\n <div className=\"grid gap-2\">\n <div className=\"grid grid-cols-[75px_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_36px] gap-2\">\n <span />\n <span className=\"text-sm font-medium text-muted-foreground\">\n {labels.showFieldsWhere}\n </span>\n </div>\n {clauses.map((clause: DataGridFilterClause, index: number) => (\n <div\n key={clause.id ?? index}\n className=\"grid grid-cols-[75px_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_36px] items-center gap-2\"\n >\n {index === 0 ? (\n <span />\n ) : index > 1 ? (\n <span className=\"px-3 text-sm font-medium text-foreground capitalize\">\n {uniformJoinValue}\n </span>\n ) : (\n <Select\n value={uniformJoinValue}\n onValueChange={(join: string) => {\n if (isDataGridFilterJoin(join)) {\n onChange(\n clauses.map(\n (\n joined: DataGridFilterClause,\n joinedIndex: number\n ) =>\n joinedIndex === 0 ? joined : { ...joined, join }\n )\n );\n }\n }}\n >\n <SelectTrigger\n aria-label={labels.join}\n className=\"h-8 min-w-0 w-full text-sm\"\n >\n {joinLabel[uniformJoinValue]}\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"and\">{labels.joinAnd}</SelectItem>\n <SelectItem value=\"or\">{labels.joinOr}</SelectItem>\n </SelectContent>\n </Select>\n )}\n <Select\n value={clause.columnId}\n onValueChange={(value: string) => {\n const allowed = operatorsForColumnId(columns, value);\n const operator = allowed.includes(clause.operator)\n ? clause.operator\n : allowed[0];\n updateClause(index, { columnId: value, operator });\n }}\n disabled={columnSelectDisabled}\n >\n <SelectTrigger\n aria-label={labels.column}\n className=\"h-8 min-w-0 w-full text-sm\"\n >\n {columnLabel(clause.columnId)}\n </SelectTrigger>\n <SelectContent>\n {columns.map((column: DataGridFilterColumn) => (\n <SelectItem key={column.id} value={column.id}>\n {column.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <Select\n value={clause.operator}\n onValueChange={(value: string) => {\n if (isDataGridFilterOperator(value)) {\n updateClause(index, { operator: value });\n }\n }}\n disabled={\n operatorsForColumnId(columns, clause.columnId).length <= 1\n }\n >\n <SelectTrigger\n aria-label={labels.operator}\n className=\"h-8 min-w-0 w-full text-sm\"\n >\n {operatorLabel[clause.operator]}\n </SelectTrigger>\n <SelectContent>\n {operatorsForColumnId(columns, clause.columnId).map(\n (operator: DataGridFilterOperator) => (\n <SelectItem key={operator} value={operator}>\n {operatorLabel[operator]}\n </SelectItem>\n )\n )}\n </SelectContent>\n </Select>\n <Input\n aria-label={labels.value}\n value={clause.value}\n placeholder={labels.valuePlaceholder}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n updateClause(index, { value: event.target.value })\n }\n />\n {index === 0 ? (\n <span />\n ) : (\n <Button\n size=\"icon\"\n variant=\"ghost\"\n aria-label={labels.removeClause}\n onClick={() => removeClause(index)}\n >\n <IconMinus className=\"size-4\" aria-hidden=\"true\" />\n </Button>\n )}\n </div>\n ))}\n </div>\n\n <div className=\"mt-3 flex items-center justify-between gap-2 pl-[83px]\">\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"outline\"\n onClick={addClause}\n disabled={!canAddClause}\n >\n <IconPlus className=\"size-4\" aria-hidden=\"true\" />\n {labels.addClause}\n </Button>\n {filteredResultCount != null && (\n <span className=\"text-sm font-medium text-foreground\">\n {labels.results(filteredResultCount)}\n </span>\n )}\n {!canAddClause ? (\n <span className=\"text-sm text-muted-foreground\">\n {labels.maxClausesReached(maxClauses)}\n </span>\n ) : null}\n </div>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"ghost\"\n onClick={onClearAll}\n disabled={!hasActiveFilters}\n >\n {labels.clearAll}\n </Button>\n {onApply ? (\n <Button onClick={onApply} disabled={!canApply}>\n {labels.apply}\n </Button>\n ) : null}\n </div>\n </div>\n </div>\n );\n }\n);\nDataGridFilterPanel.displayName = 'DataGridFilterPanel';\n\nexport {\n DataGridFilterPanel,\n type DataGridFilterColumn,\n type DataGridFilterPanelLabels,\n};\n"],"names":["forwardRef","IconMinus","IconPlus","IconX","cn","Button","Input","Select","SelectContent","SelectItem","SelectTrigger","DEFAULT_COLUMN_OPERATORS","operatorsForColumnId","columns","columnId","custom","find","column","id","operators","length","isDataGridFilterJoin","value","isDataGridFilterOperator","defaultDataGridFilterPanelLabels","title","close","showFieldsWhere","join","joinAnd","joinOr","operator","operatorContains","operatorEquals","operatorStartsWith","valuePlaceholder","removeClause","addClause","clearAll","apply","results","filteredResultCount","toLocaleString","maxClausesReached","maxClauses","DataGridFilterPanel","clauses","lockedColumnId","labels","labelOverrides","onChange","onClearAll","onClose","onApply","hasActiveFilters","className","props","ref","canAddClause","uniformJoinValue","draftHasActiveClause","some","clause","trim","canApply","columnSelectDisabled","operatorLabel","contains","equals","startsWith","joinLabel","and","or","columnLabel","label","updateClause","index","patch","map","clauseIndex","createClause","allowed","next","filter","_clause","div","data-slot","p","size","variant","aria-label","onClick","aria-hidden","span","onValueChange","joined","joinedIndex","includes","disabled","placeholder","event","target","displayName"],"mappings":";AAAA,SAOEA,UAAU,QACL,QAAQ;AAEf,SAASC,SAAS,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,sBAAsB;AAEjE,SAASC,EAAE,QAAQ,2BAAwB;AAC3C,SAASC,MAAM,QAAQ,sBAAmB;AAC1C,SAASC,KAAK,QAAQ,oBAAiB;AACvC,SACEC,MAAM,EACNC,aAAa,EACbC,UAAU,EACVC,aAAa,QACR,sBAAmB;AAQ1B,MAAMC,2BAAqD;IACzD;IACA;IACA;CACD;AAQD,SAASC,qBACPC,OAA+B,EAC/BC,QAAgB;IAEhB,MAAMC,SAASF,QAAQG,IAAI,CACzB,CAACC,SAAiCA,OAAOC,EAAE,KAAKJ,WAC/CK;IACH,OAAOJ,UAAU,QAAQA,OAAOK,MAAM,GAAG,IACrCL,SACAJ;AACN;AAEA,MAAMU,uBAAuB,CAACC,QAC5BA,UAAU,SAASA,UAAU;AAE/B,MAAMC,2BAA2B,CAC/BD,QAEAA,UAAU,cAAcA,UAAU,YAAYA,UAAU;AAwB1D,MAAME,mCAA8D;IAClEC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRb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AQ;;4BAEjBe,wBACC,KAAChD;gCAAOsF,SAAStC;gCAAS6C,UAAU,CAAClC;0CAClChB,OAAOT,KAAK;iCAEb;;;;;;;AAKd;AAEFM,oBAAoByD,WAAW,GAAG;AAElC,SACEzD,mBAAmB,GAGnB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentProps, type ForwardRefExoticComponent, type RefAttributes } from "react";
|
|
2
|
+
type DataGridFooterProps = ComponentProps<"div">;
|
|
3
|
+
declare const DataGridFooter: ForwardRefExoticComponent<DataGridFooterProps & RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const DataGridFooterStart: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const DataGridFooterEnd: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { DataGridFooter, DataGridFooterEnd, DataGridFooterStart };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../../../lib/utils.js";
|
|
4
|
+
const DataGridFooter = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
|
|
5
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
6
|
+
ref: ref,
|
|
7
|
+
"data-slot": "data-grid-footer",
|
|
8
|
+
className: cn('order-3 mt-auto flex min-h-17 items-center justify-between border-t py-4 pl-1.5 pr-4', className),
|
|
9
|
+
...props,
|
|
10
|
+
children: children
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
DataGridFooter.displayName = 'DataGridFooter';
|
|
14
|
+
const DataGridFooterStart = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
15
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
16
|
+
ref: ref,
|
|
17
|
+
"data-slot": "data-grid-footer-start",
|
|
18
|
+
className: cn('flex min-w-0 flex-1 items-center gap-2', className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
DataGridFooterStart.displayName = 'DataGridFooterStart';
|
|
23
|
+
const DataGridFooterEnd = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
24
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
25
|
+
ref: ref,
|
|
26
|
+
"data-slot": "data-grid-footer-end",
|
|
27
|
+
className: cn('flex items-center justify-end gap-2', className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
DataGridFooterEnd.displayName = 'DataGridFooterEnd';
|
|
32
|
+
export { DataGridFooter, DataGridFooterEnd, DataGridFooterStart };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=data-grid-footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/data-grid/data-grid-footer.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type ComponentRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n forwardRef,\n} from 'react';\n\nimport { cn } from '../../../../lib/utils';\n\ntype DataGridFooterProps = ComponentProps<'div'>;\n\nconst DataGridFooter: ForwardRefExoticComponent<\n DataGridFooterProps & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, DataGridFooterProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-footer\"\n className={cn(\n 'order-3 mt-auto flex min-h-17 items-center justify-between border-t py-4 pl-1.5 pr-4',\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\nDataGridFooter.displayName = 'DataGridFooter';\n\nconst DataGridFooterStart: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ComponentProps<'div'>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-footer-start\"\n className={cn('flex min-w-0 flex-1 items-center gap-2', className)}\n {...props}\n />\n );\n }\n);\nDataGridFooterStart.displayName = 'DataGridFooterStart';\n\nconst DataGridFooterEnd: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ComponentProps<'div'>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-footer-end\"\n className={cn('flex items-center justify-end gap-2', className)}\n {...props}\n />\n );\n }\n);\nDataGridFooterEnd.displayName = 'DataGridFooterEnd';\n\nexport { DataGridFooter, DataGridFooterEnd, DataGridFooterStart };\n"],"names":["forwardRef","cn","DataGridFooter","className","children","props","ref","div","data-slot","displayName","DataGridFooterStart","DataGridFooterEnd"],"mappings":";AAAA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,EAAE,QAAQ,2BAAwB;AAI3C,MAAMC,+BAEFF,WACF,CAAC,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAAO,EAAEC;IAClC,qBACE,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVL,WAAWF,GACT,wFACAE;QAED,GAAGE,KAAK;kBAERD;;AAGP;AAEFF,eAAeO,WAAW,GAAG;AAE7B,MAAMC,oCAEFV,WACF,CAAC,EAAEG,SAAS,EAAE,GAAGE,OAAO,EAAEC;IACxB,qBACE,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVL,WAAWF,GAAG,0CAA0CE;QACvD,GAAGE,KAAK;;AAGf;AAEFK,oBAAoBD,WAAW,GAAG;AAElC,MAAME,kCAEFX,WACF,CAAC,EAAEG,SAAS,EAAE,GAAGE,OAAO,EAAEC;IACxB,qBACE,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVL,WAAWF,GAAG,uCAAuCE;QACpD,GAAGE,KAAK;;AAGf;AAEFM,kBAAkBF,WAAW,GAAG;AAEhC,SAASP,cAAc,EAAES,iBAAiB,EAAED,mBAAmB,GAAG"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ReactElement } from
|
|
2
|
-
import { HeaderGroup } from
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type HeaderGroup } from "@tanstack/react-table";
|
|
3
3
|
type DataGridHeaderRowProps<TData> = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
headerGroup: HeaderGroup<TData>;
|
|
5
|
+
headerRowIndex: number;
|
|
6
|
+
resolvedHeaderHeight: number;
|
|
7
|
+
pinnedColumnIds: Set<string>;
|
|
8
|
+
lastPinnedColumnId: string | undefined;
|
|
9
|
+
isResizingColumn: boolean;
|
|
10
|
+
emphasizeHeader?: boolean;
|
|
11
11
|
};
|
|
12
|
-
declare function DataGridHeaderRow<TData>({ headerGroup, headerRowIndex, resolvedHeaderHeight,
|
|
12
|
+
declare function DataGridHeaderRow<TData>({ headerGroup, headerRowIndex, resolvedHeaderHeight, pinnedColumnIds, lastPinnedColumnId, isResizingColumn, emphasizeHeader }: DataGridHeaderRowProps<TData>): ReactElement;
|
|
13
13
|
export { DataGridHeaderRow, type DataGridHeaderRowProps };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { IconArrowDown, IconSelector } from "@tabler/icons-react";
|
|
4
|
+
import { flexRender } from "@tanstack/react-table";
|
|
5
|
+
import { cn, focusState } from "../../../../lib/utils.js";
|
|
6
|
+
import { DataGridColumnResizer } from "./data-grid-column-resizer.js";
|
|
7
|
+
import { PINNED_COLUMN_Z_INDEX, getAriaSort } from "./data-grid.utils.js";
|
|
8
|
+
function DataGridHeaderRow({ headerGroup, headerRowIndex, resolvedHeaderHeight, pinnedColumnIds, lastPinnedColumnId, isResizingColumn, emphasizeHeader = false }) {
|
|
9
|
+
const headerRowInstanceId = useId();
|
|
10
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
11
|
+
"data-slot": "data-grid-header-row",
|
|
12
|
+
role: "row",
|
|
13
|
+
"aria-rowindex": headerRowIndex + 1,
|
|
14
|
+
className: cn(// z-[20]: cogs defines `.z-20` as box-shadow; EOS loads it and would shadow the header row.
|
|
15
|
+
'sticky z-[20] grid bg-base-background', headerRowIndex === 0 ? 'border-y' : 'border-b'),
|
|
16
|
+
style: {
|
|
17
|
+
top: headerRowIndex * resolvedHeaderHeight,
|
|
18
|
+
gridTemplateColumns: 'var(--data-grid-template-columns)',
|
|
19
|
+
minHeight: resolvedHeaderHeight
|
|
20
|
+
},
|
|
21
|
+
children: headerGroup.headers.map((header)=>{
|
|
22
|
+
const isLeafHeader = header.colSpan === 1;
|
|
23
|
+
const isPinned = isLeafHeader && pinnedColumnIds.has(header.column.id);
|
|
24
|
+
const isLastPinned = isPinned && lastPinnedColumnId === header.column.id;
|
|
25
|
+
const sortDirection = header.column.getIsSorted();
|
|
26
|
+
const canSort = isLeafHeader && header.column.getCanSort();
|
|
27
|
+
const isGroupedHeader = header.colSpan > 1;
|
|
28
|
+
const renderedHeader = header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext());
|
|
29
|
+
const isPlainTextHeader = typeof renderedHeader === 'string' || typeof renderedHeader === 'number';
|
|
30
|
+
const showResizer = isLeafHeader && header.column.getCanResize();
|
|
31
|
+
const isResizing = showResizer && header.column.getIsResizing();
|
|
32
|
+
const headerTitleId = `${headerRowInstanceId}-${header.id}-title`;
|
|
33
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
34
|
+
"data-slot": "data-grid-column-header",
|
|
35
|
+
role: "columnheader",
|
|
36
|
+
"aria-colindex": header.index + 1,
|
|
37
|
+
"aria-colspan": header.colSpan > 1 ? header.colSpan : undefined,
|
|
38
|
+
"aria-sort": getAriaSort(sortDirection, canSort),
|
|
39
|
+
"aria-labelledby": showResizer ? headerTitleId : undefined,
|
|
40
|
+
className: cn('group/header relative flex min-w-0 items-center overflow-hidden pr-3 text-left text-sm', emphasizeHeader ? 'font-semibold text-foreground' : 'font-medium text-muted-foreground', header.index === 0 ? 'pl-4' : 'pl-3', isGroupedHeader && 'justify-center text-base font-semibold text-foreground/70', header.isPlaceholder && 'pointer-events-none', isPinned && 'sticky left-0 z-10 bg-base-background', isLastPinned && 'shadow-pinned-column', (canSort || showResizer) && !isResizingColumn && 'hover:bg-medium-background-hover', isResizing && 'bg-medium-background-hover'),
|
|
41
|
+
style: {
|
|
42
|
+
gridColumn: `span ${header.colSpan} / span ${header.colSpan}`,
|
|
43
|
+
...isPinned ? {
|
|
44
|
+
position: 'sticky',
|
|
45
|
+
left: header.column.getStart('left'),
|
|
46
|
+
zIndex: PINNED_COLUMN_Z_INDEX
|
|
47
|
+
} : {}
|
|
48
|
+
},
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ _jsx("div", {
|
|
51
|
+
id: showResizer ? headerTitleId : undefined,
|
|
52
|
+
className: "flex min-w-0 items-center",
|
|
53
|
+
children: canSort ? /*#__PURE__*/ _jsxs("button", {
|
|
54
|
+
type: "button",
|
|
55
|
+
className: cn('group/sort inline-flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-sm select-none', focusState),
|
|
56
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
57
|
+
children: [
|
|
58
|
+
isPlainTextHeader ? /*#__PURE__*/ _jsx("span", {
|
|
59
|
+
className: "block min-w-0 truncate",
|
|
60
|
+
children: renderedHeader
|
|
61
|
+
}) : renderedHeader,
|
|
62
|
+
sortDirection ? /*#__PURE__*/ _jsx(IconArrowDown, {
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
className: cn('size-3.5 shrink-0', sortDirection === 'asc' && 'rotate-180')
|
|
65
|
+
}) : /*#__PURE__*/ _jsx(IconSelector, {
|
|
66
|
+
"aria-hidden": "true",
|
|
67
|
+
className: "size-3.5 shrink-0 opacity-30 group-hover/header:opacity-100 group-focus-visible/sort:opacity-100"
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}) : isPlainTextHeader ? /*#__PURE__*/ _jsx("span", {
|
|
71
|
+
className: "block min-w-0 truncate",
|
|
72
|
+
children: renderedHeader
|
|
73
|
+
}) : renderedHeader
|
|
74
|
+
}),
|
|
75
|
+
showResizer && /*#__PURE__*/ _jsx(DataGridColumnResizer, {
|
|
76
|
+
header: header,
|
|
77
|
+
columnLabel: isPlainTextHeader ? String(renderedHeader) : header.column.id
|
|
78
|
+
})
|
|
79
|
+
]
|
|
80
|
+
}, header.id);
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
export { DataGridHeaderRow };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=data-grid-header-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/data-grid/data-grid-header-row.tsx"],"sourcesContent":["import { type ReactElement, useId } from 'react';\n\nimport { IconArrowDown, IconSelector } from '@tabler/icons-react';\nimport { type HeaderGroup, flexRender } from '@tanstack/react-table';\n\nimport { cn, focusState } from '../../../../lib/utils';\n\nimport { DataGridColumnResizer } from './data-grid-column-resizer';\nimport { PINNED_COLUMN_Z_INDEX, getAriaSort } from './data-grid.utils';\n\ntype DataGridHeaderRowProps<TData> = {\n headerGroup: HeaderGroup<TData>;\n headerRowIndex: number;\n resolvedHeaderHeight: number;\n pinnedColumnIds: Set<string>;\n lastPinnedColumnId: string | undefined;\n isResizingColumn: boolean;\n emphasizeHeader?: boolean;\n};\n\nfunction DataGridHeaderRow<TData>({\n headerGroup,\n headerRowIndex,\n resolvedHeaderHeight,\n pinnedColumnIds,\n lastPinnedColumnId,\n isResizingColumn,\n emphasizeHeader = false,\n}: DataGridHeaderRowProps<TData>): ReactElement {\n const headerRowInstanceId = useId();\n\n return (\n <div\n data-slot=\"data-grid-header-row\"\n role=\"row\"\n aria-rowindex={headerRowIndex + 1}\n className={cn(\n // z-[20]: cogs defines `.z-20` as box-shadow; EOS loads it and would shadow the header row.\n 'sticky z-[20] grid bg-base-background',\n headerRowIndex === 0 ? 'border-y' : 'border-b'\n )}\n style={{\n top: headerRowIndex * resolvedHeaderHeight,\n gridTemplateColumns: 'var(--data-grid-template-columns)',\n minHeight: resolvedHeaderHeight,\n }}\n >\n {headerGroup.headers.map((header) => {\n const isLeafHeader = header.colSpan === 1;\n const isPinned = isLeafHeader && pinnedColumnIds.has(header.column.id);\n const isLastPinned =\n isPinned && lastPinnedColumnId === header.column.id;\n const sortDirection = header.column.getIsSorted();\n const canSort = isLeafHeader && header.column.getCanSort();\n const isGroupedHeader = header.colSpan > 1;\n const renderedHeader = header.isPlaceholder\n ? null\n : flexRender(header.column.columnDef.header, header.getContext());\n const isPlainTextHeader =\n typeof renderedHeader === 'string' ||\n typeof renderedHeader === 'number';\n const showResizer = isLeafHeader && header.column.getCanResize();\n const isResizing = showResizer && header.column.getIsResizing();\n const headerTitleId = `${headerRowInstanceId}-${header.id}-title`;\n\n return (\n <div\n key={header.id}\n data-slot=\"data-grid-column-header\"\n role=\"columnheader\"\n aria-colindex={header.index + 1}\n aria-colspan={header.colSpan > 1 ? header.colSpan : undefined}\n aria-sort={getAriaSort(sortDirection, canSort)}\n aria-labelledby={showResizer ? headerTitleId : undefined}\n className={cn(\n 'group/header relative flex min-w-0 items-center overflow-hidden pr-3 text-left text-sm',\n emphasizeHeader\n ? 'font-semibold text-foreground'\n : 'font-medium text-muted-foreground',\n header.index === 0 ? 'pl-4' : 'pl-3',\n isGroupedHeader &&\n 'justify-center text-base font-semibold text-foreground/70',\n header.isPlaceholder && 'pointer-events-none',\n isPinned && 'sticky left-0 z-10 bg-base-background',\n isLastPinned && 'shadow-pinned-column',\n (canSort || showResizer) &&\n !isResizingColumn &&\n 'hover:bg-medium-background-hover',\n isResizing && 'bg-medium-background-hover'\n )}\n style={{\n gridColumn: `span ${header.colSpan} / span ${header.colSpan}`,\n ...(isPinned\n ? {\n position: 'sticky',\n left: header.column.getStart('left'),\n zIndex: PINNED_COLUMN_Z_INDEX,\n }\n : {}),\n }}\n >\n <div\n id={showResizer ? headerTitleId : undefined}\n className=\"flex min-w-0 items-center\"\n >\n {canSort ? (\n <button\n type=\"button\"\n className={cn(\n 'group/sort inline-flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-sm select-none',\n focusState\n )}\n onClick={header.column.getToggleSortingHandler()}\n >\n {isPlainTextHeader ? (\n <span className=\"block min-w-0 truncate\">\n {renderedHeader}\n </span>\n ) : (\n renderedHeader\n )}\n {sortDirection ? (\n <IconArrowDown\n aria-hidden=\"true\"\n className={cn(\n 'size-3.5 shrink-0',\n sortDirection === 'asc' && 'rotate-180'\n )}\n />\n ) : (\n <IconSelector\n aria-hidden=\"true\"\n className=\"size-3.5 shrink-0 opacity-30 group-hover/header:opacity-100 group-focus-visible/sort:opacity-100\"\n />\n )}\n </button>\n ) : isPlainTextHeader ? (\n <span className=\"block min-w-0 truncate\">{renderedHeader}</span>\n ) : (\n renderedHeader\n )}\n </div>\n {showResizer && (\n <DataGridColumnResizer\n header={header}\n columnLabel={\n isPlainTextHeader ? String(renderedHeader) : header.column.id\n }\n />\n )}\n </div>\n );\n })}\n </div>\n );\n}\n\nexport { DataGridHeaderRow, type DataGridHeaderRowProps };\n"],"names":["useId","IconArrowDown","IconSelector","flexRender","cn","focusState","DataGridColumnResizer","PINNED_COLUMN_Z_INDEX","getAriaSort","DataGridHeaderRow","headerGroup","headerRowIndex","resolvedHeaderHeight","pinnedColumnIds","lastPinnedColumnId","isResizingColumn","emphasizeHeader","headerRowInstanceId","div","data-slot","role","aria-rowindex","className","style","top","gridTemplateColumns","minHeight","headers","map","header","isLeafHeader","colSpan","isPinned","has","column","id","isLastPinned","sortDirection","getIsSorted","canSort","getCanSort","isGroupedHeader","renderedHeader","isPlaceholder","columnDef","getContext","isPlainTextHeader","showResizer","getCanResize","isResizing","getIsResizing","headerTitleId","aria-colindex","index","aria-colspan","undefined","aria-sort","aria-labelledby","gridColumn","position","left","getStart","zIndex","button","type","onClick","getToggleSortingHandler","span","aria-hidden","columnLabel","String"],"mappings":";AAAA,SAA4BA,KAAK,QAAQ,QAAQ;AAEjD,SAASC,aAAa,EAAEC,YAAY,QAAQ,sBAAsB;AAClE,SAA2BC,UAAU,QAAQ,wBAAwB;AAErE,SAASC,EAAE,EAAEC,UAAU,QAAQ,2BAAwB;AAEvD,SAASC,qBAAqB,QAAQ,gCAA6B;AACnE,SAASC,qBAAqB,EAAEC,WAAW,QAAQ,uBAAoB;AAYvE,SAASC,kBAAyB,EAChCC,WAAW,EACXC,cAAc,EACdC,oBAAoB,EACpBC,eAAe,EACfC,kBAAkB,EAClBC,gBAAgB,EAChBC,kBAAkB,KAAK,EACO;IAC9B,MAAMC,sBAAsBjB;IAE5B,qBACE,KAACkB;QACCC,aAAU;QACVC,MAAK;QACLC,iBAAeV,iBAAiB;QAChCW,WAAWlB,GACT,4FAA4F;QAC5F,yCACAO,mBAAmB,IAAI,aAAa;QAEtCY,OAAO;YACLC,KAAKb,iBAAiBC;YACtBa,qBAAqB;YACrBC,WAAWd;QACb;kBAECF,YAAYiB,OAAO,CAACC,GAAG,CAAC,CAACC;YACxB,MAAMC,eAAeD,OAAOE,OAAO,KAAK;YACxC,MAAMC,WAAWF,gBAAgBjB,gBAAgBoB,GAAG,CAACJ,OAAOK,MAAM,CAACC,EAAE;YACrE,MAAMC,eACJJ,YAAYlB,uBAAuBe,OAAOK,MAAM,CAACC,EAAE;YACrD,MAAME,gBAAgBR,OAAOK,MAAM,CAACI,WAAW;YAC/C,MAAMC,UAAUT,gBAAgBD,OAAOK,MAAM,CAACM,UAAU;YACxD,MAAMC,kBAAkBZ,OAAOE,OAAO,GAAG;YACzC,MAAMW,iBAAiBb,OAAOc,aAAa,GACvC,OACAxC,WAAW0B,OAAOK,MAAM,CAACU,SAAS,CAACf,MAAM,EAAEA,OAAOgB,UAAU;YAChE,MAAMC,oBACJ,OAAOJ,mBAAmB,YAC1B,OAAOA,mBAAmB;YAC5B,MAAM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B,kCACF,KAACqB;4BAAK7C,WAAU;sCAA0BoB;6BAE1CA;;oBAGHK,6BACC,KAACzC;wBACCuB,QAAQA;wBACRwC,aACEvB,oBAAoBwB,OAAO5B,kBAAkBb,OAAOK,MAAM,CAACC,EAAE;;;eA/E9DN,OAAOM,EAAE;QAqFpB;;AAGN;AAEA,SAAS1B,iBAAiB,GAAgC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentProps, type ForwardRefExoticComponent, type RefAttributes } from "react";
|
|
2
|
+
type DataGridHeaderProps = ComponentProps<"div">;
|
|
3
|
+
declare const DataGridHeader: ForwardRefExoticComponent<DataGridHeaderProps & RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const DataGridHeaderStart: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const DataGridHeaderEnd: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const DataGridTitle: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
7
|
+
type DataGridSubtitleProps = ComponentProps<"div">;
|
|
8
|
+
declare const DataGridSubtitle: ForwardRefExoticComponent<DataGridSubtitleProps & RefAttributes<HTMLDivElement>>;
|
|
9
|
+
type DataGridHeaderActionsProps = ComponentProps<"div">;
|
|
10
|
+
declare const DataGridHeaderActions: ForwardRefExoticComponent<DataGridHeaderActionsProps & RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { DataGridHeader, DataGridHeaderActions, DataGridHeaderEnd, DataGridHeaderStart, DataGridSubtitle, DataGridTitle };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../../../lib/utils.js";
|
|
4
|
+
const DataGridHeader = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
|
|
5
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
6
|
+
ref: ref,
|
|
7
|
+
"data-slot": "data-grid-header",
|
|
8
|
+
className: cn('order-1 group/data-grid-header @container/data-grid-header grid items-center gap-x-4', 'grid-cols-[minmax(0,1fr)_auto]', className),
|
|
9
|
+
...props,
|
|
10
|
+
children: children
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
DataGridHeader.displayName = 'DataGridHeader';
|
|
14
|
+
const DataGridHeaderStart = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
15
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
16
|
+
ref: ref,
|
|
17
|
+
"data-slot": "data-grid-header-start",
|
|
18
|
+
className: cn('col-start-1 row-start-1 min-w-0 flex flex-col gap-1 p-4', className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
DataGridHeaderStart.displayName = 'DataGridHeaderStart';
|
|
23
|
+
const DataGridHeaderEnd = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
24
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
25
|
+
ref: ref,
|
|
26
|
+
"data-slot": "data-grid-header-end",
|
|
27
|
+
className: cn('col-start-2 row-start-1 flex items-center justify-end gap-2 pr-3', className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
DataGridHeaderEnd.displayName = 'DataGridHeaderEnd';
|
|
32
|
+
const DataGridTitle = /*#__PURE__*/ forwardRef(function DataGridTitle({ children, className, ...props }, ref) {
|
|
33
|
+
if (!children) return null;
|
|
34
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
35
|
+
ref: ref,
|
|
36
|
+
"data-slot": "data-grid-title",
|
|
37
|
+
className: cn('truncate text-lg font-medium text-foreground', className),
|
|
38
|
+
...props,
|
|
39
|
+
children: children
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
DataGridTitle.displayName = 'DataGridTitle';
|
|
43
|
+
const DataGridSubtitle = /*#__PURE__*/ forwardRef(function DataGridSubtitle({ children, className, ...props }, ref) {
|
|
44
|
+
if (!children) return null;
|
|
45
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
46
|
+
ref: ref,
|
|
47
|
+
"data-slot": "data-grid-subtitle",
|
|
48
|
+
className: cn('truncate text-sm text-muted-foreground', className),
|
|
49
|
+
...props,
|
|
50
|
+
children: children
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
DataGridSubtitle.displayName = 'DataGridSubtitle';
|
|
54
|
+
const DataGridHeaderActions = /*#__PURE__*/ forwardRef(function DataGridHeaderActions({ children, className, ...props }, ref) {
|
|
55
|
+
if (!children) return null;
|
|
56
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
57
|
+
ref: ref,
|
|
58
|
+
"data-slot": "data-grid-header-actions",
|
|
59
|
+
className: cn('flex items-center gap-2 py-4', className),
|
|
60
|
+
...props,
|
|
61
|
+
children: children
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
DataGridHeaderActions.displayName = 'DataGridHeaderActions';
|
|
65
|
+
export { DataGridHeader, DataGridHeaderActions, DataGridHeaderEnd, DataGridHeaderStart, DataGridSubtitle, DataGridTitle };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=data-grid-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/data-grid/data-grid-header.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type ComponentRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n forwardRef,\n} from 'react';\n\nimport { cn } from '../../../../lib/utils';\n\ntype DataGridHeaderProps = ComponentProps<'div'>;\n\nconst DataGridHeader: ForwardRefExoticComponent<\n DataGridHeaderProps & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, DataGridHeaderProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-header\"\n className={cn(\n 'order-1 group/data-grid-header @container/data-grid-header grid items-center gap-x-4',\n 'grid-cols-[minmax(0,1fr)_auto]',\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\nDataGridHeader.displayName = 'DataGridHeader';\n\nconst DataGridHeaderStart: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ComponentProps<'div'>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-header-start\"\n className={cn(\n 'col-start-1 row-start-1 min-w-0 flex flex-col gap-1 p-4',\n className\n )}\n {...props}\n />\n );\n }\n);\nDataGridHeaderStart.displayName = 'DataGridHeaderStart';\n\nconst DataGridHeaderEnd: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ComponentProps<'div'>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-header-end\"\n className={cn(\n 'col-start-2 row-start-1 flex items-center justify-end gap-2 pr-3',\n className\n )}\n {...props}\n />\n );\n }\n);\nDataGridHeaderEnd.displayName = 'DataGridHeaderEnd';\n\nconst DataGridTitle: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ComponentProps<'div'>>(\n function DataGridTitle({ children, className, ...props }, ref) {\n if (!children) return null;\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-title\"\n className={cn(\n 'truncate text-lg font-medium text-foreground',\n className\n )}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\nDataGridTitle.displayName = 'DataGridTitle';\n\ntype DataGridSubtitleProps = ComponentProps<'div'>;\n\nconst DataGridSubtitle: ForwardRefExoticComponent<\n DataGridSubtitleProps & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, DataGridSubtitleProps>(\n function DataGridSubtitle({ children, className, ...props }, ref) {\n if (!children) return null;\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-subtitle\"\n className={cn('truncate text-sm text-muted-foreground', className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\nDataGridSubtitle.displayName = 'DataGridSubtitle';\n\ntype DataGridHeaderActionsProps = ComponentProps<'div'>;\n\nconst DataGridHeaderActions: ForwardRefExoticComponent<\n DataGridHeaderActionsProps & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, DataGridHeaderActionsProps>(\n function DataGridHeaderActions({ children, className, ...props }, ref) {\n if (!children) return null;\n return (\n <div\n ref={ref}\n data-slot=\"data-grid-header-actions\"\n className={cn('flex items-center gap-2 py-4', className)}\n {...props}\n >\n {children}\n </div>\n );\n }\n);\nDataGridHeaderActions.displayName = 'DataGridHeaderActions';\n\nexport {\n DataGridHeader,\n DataGridHeaderActions,\n DataGridHeaderEnd,\n DataGridHeaderStart,\n DataGridSubtitle,\n DataGridTitle,\n};\n"],"names":["forwardRef","cn","DataGridHeader","className","children","props","ref","div","data-slot","displayName","DataGridHeaderStart","DataGridHeaderEnd","DataGridTitle","DataGridSubtitle","DataGridHeaderActions"],"mappings":";AAAA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,EAAE,QAAQ,2BAAwB;AAI3C,MAAMC,+BAEFF,WACF,CAAC,EAAEG,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAAO,EAAEC;IAClC,qBACE,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVL,WAAWF,GACT,wFACA,kCACAE;QAED,GAAGE,KAAK;kBAERD;;AAGP;AAEFF,eAAeO,WAAW,GAAG;AAE7B,MAAMC,oCAEFV,WACF,CAAC,EAAEG,SAAS,EAAE,GAAGE,OAAO,EAAEC;IACxB,qBACE,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVL,WAAWF,GACT,2DACAE;QAED,GAAGE,KAAK;;AAGf;AAEFK,oBAAoBD,WAAW,GAAG;AAElC,MAAME,kCAEFX,WACF,CAAC,EAAEG,SAAS,EAAE,GAAGE,OAA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