@cognite/aura 0.3.4 → 1.46104.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 +264 -0
- package/DESIGN.md +638 -281
- package/LICENSE +21 -0
- package/README.md +48 -13
- package/dist/colors-deprecated.css +587 -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 +125 -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.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.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.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.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.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.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.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 +259 -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.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.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 +7 -7
- package/dist/components/ui/core/data-grid/data-grid-cell.js +23 -0
- package/dist/components/ui/core/data-grid/data-grid-cell.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 +41 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js +273 -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 +70 -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 +15 -15
- package/dist/components/ui/core/data-grid/data-grid-row.js +105 -0
- package/dist/components/ui/core/data-grid/data-grid-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.d.ts +85 -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 +404 -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 -3
- package/dist/components/ui/core/data-grid/data-grid.utils.js +51 -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 +4 -0
- package/dist/components/ui/core/data-grid/index.js +5 -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.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.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 +9 -9
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +19 -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 +453 -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.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 +27 -26
- package/dist/components/ui/core/select/select.js +213 -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.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.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.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/switch/switch.d.ts +9 -9
- 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.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.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.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 +24 -12
- 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 +50 -11
- package/src/components/ui/core/button/button.md +93 -0
|
@@ -1,157 +1,212 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { IconCheck
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
4
|
+
import { IconCheck, IconChevronRight } from "@tabler/icons-react";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { usePortalContainer } from "../../../../lib/portal-container-context.js";
|
|
7
|
+
import { cn, menuContainerPadding, menuItemPadding, menuSectionLabelClasses, menuSectionSeparatorClasses } from "../../../../lib/utils.js";
|
|
8
|
+
import { Kbd } from "../kbd/kbd.js";
|
|
9
|
+
const dropdownMenuItemVariants = cva(cn("group/menu-item relative flex min-h-9 cursor-default items-center gap-2 rounded-lg text-sm leading-4.5 font-medium text-popover-foreground outline-hidden select-none data-disabled:pointer-events-none data-disabled:text-base-foreground-disabled [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg]:text-popover-foreground [&>svg:not([class*='size-'])]:size-4 data-disabled:[&>svg]:text-base-foreground-disabled", menuItemPadding), {
|
|
10
|
+
variants: {
|
|
11
|
+
inset: {
|
|
12
|
+
true: 'pl-8'
|
|
13
|
+
},
|
|
14
|
+
variant: {
|
|
15
|
+
default: 'focus:bg-popover-background-hover focus:text-popover-foreground',
|
|
16
|
+
destructive: 'text-critical-foreground-strong focus:bg-popover-background-hover focus:text-critical-foreground-strong hover:bg-popover-background-hover [&>svg]:text-critical-foreground-strong data-disabled:text-base-foreground-disabled data-disabled:[&>svg]:text-base-foreground-disabled'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
inset: false,
|
|
21
|
+
variant: 'default'
|
|
22
|
+
}
|
|
21
23
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const dropdownMenuItemIndicatorClassName = 'size-4 text-popover-foreground group-data-disabled/menu-item:text-base-foreground-disabled';
|
|
25
|
+
function DropdownMenu({ ...props }) {
|
|
26
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.Root, {
|
|
27
|
+
"data-slot": "dropdown-menu",
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
27
30
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
function DropdownMenuPortal({ container, ...props }) {
|
|
32
|
+
const contextContainer = usePortalContainer();
|
|
33
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.Portal, {
|
|
34
|
+
"data-slot": "dropdown-menu-portal",
|
|
35
|
+
container: container ?? contextContainer,
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
35
38
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
const DropdownMenuTrigger = /*#__PURE__*/ forwardRef(({ children, ...props }, ref)=>{
|
|
40
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.Trigger, {
|
|
41
|
+
ref: ref,
|
|
42
|
+
"data-slot": "dropdown-menu-trigger",
|
|
43
|
+
...props,
|
|
44
|
+
children: children
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
DropdownMenuTrigger.displayName = 'DropdownMenuTrigger';
|
|
48
|
+
function DropdownMenuContent({ align = 'start', alignOffset = 0, side = 'bottom', sideOffset = 4, className, container, ...props }) {
|
|
49
|
+
return /*#__PURE__*/ _jsx(DropdownMenuPortal, {
|
|
50
|
+
container: container,
|
|
51
|
+
children: /*#__PURE__*/ _jsx(MenuPrimitive.Positioner, {
|
|
52
|
+
className: "isolate z-50 outline-none",
|
|
53
|
+
align: align,
|
|
54
|
+
alignOffset: alignOffset,
|
|
55
|
+
side: side,
|
|
56
|
+
sideOffset: sideOffset,
|
|
57
|
+
children: /*#__PURE__*/ _jsx(MenuPrimitive.Popup, {
|
|
58
|
+
"data-slot": "dropdown-menu-content",
|
|
59
|
+
className: cn('bg-popover-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border border-default shadow-md outline-none', menuContainerPadding, className),
|
|
60
|
+
...props
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
});
|
|
59
64
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
function DropdownMenuGroup({ ...props }) {
|
|
66
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.Group, {
|
|
67
|
+
"data-slot": "dropdown-menu-group",
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
65
70
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
71
|
+
const DropdownMenuItem = /*#__PURE__*/ forwardRef(({ className, inset, variant = 'default', children, ...props }, ref)=>{
|
|
72
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.Item, {
|
|
73
|
+
ref: ref,
|
|
74
|
+
"data-slot": "dropdown-menu-item",
|
|
75
|
+
"data-inset": inset,
|
|
76
|
+
"data-variant": variant,
|
|
77
|
+
className: cn(dropdownMenuItemVariants({
|
|
78
|
+
inset,
|
|
79
|
+
variant
|
|
80
|
+
}), className),
|
|
81
|
+
...props,
|
|
82
|
+
children: children
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
const DropdownMenuCheckboxItem = /*#__PURE__*/ forwardRef(({ className, children, checked, ...props }, ref)=>{
|
|
86
|
+
return /*#__PURE__*/ _jsxs(MenuPrimitive.CheckboxItem, {
|
|
87
|
+
ref: ref,
|
|
88
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
89
|
+
className: cn(dropdownMenuItemVariants({
|
|
90
|
+
inset: true
|
|
91
|
+
}), className),
|
|
92
|
+
checked: checked,
|
|
93
|
+
...props,
|
|
94
|
+
children: [
|
|
95
|
+
/*#__PURE__*/ _jsx("span", {
|
|
96
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
97
|
+
children: /*#__PURE__*/ _jsx(MenuPrimitive.CheckboxItemIndicator, {
|
|
98
|
+
children: /*#__PURE__*/ _jsx(IconCheck, {
|
|
99
|
+
className: dropdownMenuItemIndicatorClassName
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
}),
|
|
103
|
+
children
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
108
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.RadioGroup, {
|
|
109
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
93
112
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
113
|
+
const DropdownMenuRadioItem = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
|
|
114
|
+
return /*#__PURE__*/ _jsxs(MenuPrimitive.RadioItem, {
|
|
115
|
+
ref: ref,
|
|
116
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
117
|
+
className: cn(dropdownMenuItemVariants({
|
|
118
|
+
inset: true
|
|
119
|
+
}), className),
|
|
120
|
+
...props,
|
|
121
|
+
children: [
|
|
122
|
+
/*#__PURE__*/ _jsx("span", {
|
|
123
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
124
|
+
children: /*#__PURE__*/ _jsx(MenuPrimitive.RadioItemIndicator, {
|
|
125
|
+
children: /*#__PURE__*/ _jsx(IconCheck, {
|
|
126
|
+
className: dropdownMenuItemIndicatorClassName
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
}),
|
|
130
|
+
children
|
|
131
|
+
]
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
const DropdownMenuLabel = /*#__PURE__*/ forwardRef(({ className, inset, ...props }, ref)=>{
|
|
135
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.GroupLabel, {
|
|
136
|
+
ref: ref,
|
|
137
|
+
"data-slot": "dropdown-menu-label",
|
|
138
|
+
"data-inset": inset,
|
|
139
|
+
className: cn('data-inset:pl-8', menuSectionLabelClasses, className),
|
|
140
|
+
...props
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
const DropdownMenuHeader = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
144
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
145
|
+
ref: ref,
|
|
146
|
+
"data-slot": "dropdown-menu-header",
|
|
147
|
+
className: cn('-mx-1 -mt-1 mb-1 flex flex-row items-center gap-2 border-b border-default p-3 pointer-events-none', className),
|
|
148
|
+
...props
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
const DropdownMenuSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
152
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.Separator, {
|
|
153
|
+
ref: ref,
|
|
154
|
+
"data-slot": "dropdown-menu-separator",
|
|
155
|
+
className: cn(menuSectionSeparatorClasses, className),
|
|
156
|
+
...props
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
const DropdownMenuShortcut = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
|
|
160
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
161
|
+
ref: ref,
|
|
162
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
163
|
+
className: cn('ml-auto flex shrink-0 items-center gap-1', className),
|
|
164
|
+
...props,
|
|
165
|
+
children: /*#__PURE__*/ _jsx(Kbd, {
|
|
166
|
+
children: children
|
|
167
|
+
})
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
function DropdownMenuSub({ ...props }) {
|
|
171
|
+
return /*#__PURE__*/ _jsx(MenuPrimitive.SubmenuRoot, {
|
|
172
|
+
"data-slot": "dropdown-menu-sub",
|
|
173
|
+
...props
|
|
174
|
+
});
|
|
130
175
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
176
|
+
const DropdownMenuSubTrigger = /*#__PURE__*/ forwardRef(({ className, inset, children, ...props }, ref)=>{
|
|
177
|
+
return /*#__PURE__*/ _jsxs(MenuPrimitive.SubmenuTrigger, {
|
|
178
|
+
ref: ref,
|
|
179
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
180
|
+
"data-inset": inset,
|
|
181
|
+
className: cn("group/sub-trigger text-popover-foreground focus:bg-popover-background-hover focus:text-popover-foreground data-open:bg-popover-background-hover data-open:text-popover-foreground data-disabled:pointer-events-none data-disabled:text-base-foreground-disabled flex min-h-9 cursor-default items-center gap-2 rounded-lg p-2 text-sm leading-4.5 font-medium outline-hidden select-none data-inset:pl-8 [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4 [&>svg]:text-popover-foreground data-disabled:[&>svg]:text-base-foreground-disabled", className),
|
|
182
|
+
...props,
|
|
183
|
+
children: [
|
|
184
|
+
children,
|
|
185
|
+
/*#__PURE__*/ _jsx(IconChevronRight, {
|
|
186
|
+
className: "ml-auto size-4 text-popover-foreground group-data-disabled/sub-trigger:text-base-foreground-disabled"
|
|
187
|
+
})
|
|
188
|
+
]
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
function DropdownMenuSubContent({ align = 'start', alignOffset = -3, side = 'right', sideOffset = 0, className, ...props }) {
|
|
192
|
+
return /*#__PURE__*/ _jsx(DropdownMenuContent, {
|
|
193
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
194
|
+
className: cn('min-w-32 w-auto', className),
|
|
195
|
+
align: align,
|
|
196
|
+
alignOffset: alignOffset,
|
|
197
|
+
side: side,
|
|
198
|
+
sideOffset: sideOffset,
|
|
199
|
+
...props
|
|
200
|
+
});
|
|
149
201
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
202
|
+
const DropdownMenuSectionLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
203
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
204
|
+
ref: ref,
|
|
205
|
+
"data-slot": "dropdown-menu-section-label",
|
|
206
|
+
className: cn(menuSectionLabelClasses, className),
|
|
207
|
+
...props
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuHeader, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSectionLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
211
|
+
|
|
212
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type ComponentRef,\n type ForwardRefExoticComponent,\n type HTMLAttributes,\n type ReactNode,\n type Ref,\n type RefAttributes,\n forwardRef,\n} from 'react';\n\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { IconCheck, IconChevronRight } from '@tabler/icons-react';\nimport { cva } from 'class-variance-authority';\n\nimport { usePortalContainer } from '../../../../lib/portal-container-context';\nimport {\n cn,\n menuContainerPadding,\n menuItemPadding,\n menuSectionLabelClasses,\n menuSectionSeparatorClasses,\n} from '../../../../lib/utils';\nimport { Kbd } from '../kbd/kbd';\n\nconst dropdownMenuItemVariants = cva(\n cn(\n \"group/menu-item relative flex min-h-9 cursor-default items-center gap-2 rounded-lg text-sm leading-4.5 font-medium text-popover-foreground outline-hidden select-none data-disabled:pointer-events-none data-disabled:text-base-foreground-disabled [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg]:text-popover-foreground [&>svg:not([class*='size-'])]:size-4 data-disabled:[&>svg]:text-base-foreground-disabled\",\n menuItemPadding\n ),\n {\n variants: {\n inset: {\n true: 'pl-8',\n },\n variant: {\n default:\n 'focus:bg-popover-background-hover focus:text-popover-foreground',\n destructive:\n 'text-critical-foreground-strong focus:bg-popover-background-hover focus:text-critical-foreground-strong hover:bg-popover-background-hover [&>svg]:text-critical-foreground-strong data-disabled:text-base-foreground-disabled data-disabled:[&>svg]:text-base-foreground-disabled',\n },\n },\n defaultVariants: {\n inset: false,\n variant: 'default',\n },\n }\n);\n\nconst dropdownMenuItemIndicatorClassName =\n 'size-4 text-popover-foreground group-data-disabled/menu-item:text-base-foreground-disabled';\n\nfunction DropdownMenu({ ...props }: MenuPrimitive.Root.Props): ReactNode {\n return <MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n container,\n ...props\n}: MenuPrimitive.Portal.Props): ReactNode {\n const contextContainer = usePortalContainer();\n return (\n <MenuPrimitive.Portal\n data-slot=\"dropdown-menu-portal\"\n container={container ?? contextContainer}\n {...props}\n />\n );\n}\n\nconst DropdownMenuTrigger: ForwardRefExoticComponent<\n Omit<MenuPrimitive.Trigger.Props, 'ref'> & RefAttributes<HTMLButtonElement>\n> = forwardRef<HTMLButtonElement, MenuPrimitive.Trigger.Props>(\n (\n { children, ...props }: MenuPrimitive.Trigger.Props,\n ref: Ref<HTMLButtonElement>\n ) => {\n return (\n <MenuPrimitive.Trigger\n ref={ref}\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n >\n {children}\n </MenuPrimitive.Trigger>\n );\n }\n);\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\nfunction DropdownMenuContent({\n align = 'start',\n alignOffset = 0,\n side = 'bottom',\n sideOffset = 4,\n className,\n container,\n ...props\n}: MenuPrimitive.Popup.Props &\n Pick<\n MenuPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'side' | 'sideOffset'\n > & {\n container?: MenuPrimitive.Portal.Props['container'];\n }): ReactNode {\n return (\n <DropdownMenuPortal container={container}>\n <MenuPrimitive.Positioner\n className=\"isolate z-50 outline-none\"\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n >\n <MenuPrimitive.Popup\n data-slot=\"dropdown-menu-content\"\n className={cn(\n 'bg-popover-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border border-default shadow-md outline-none',\n menuContainerPadding,\n className\n )}\n {...props}\n />\n </MenuPrimitive.Positioner>\n </DropdownMenuPortal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): ReactNode {\n return <MenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\ntype DropdownMenuItemProps = MenuPrimitive.Item.Props & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n};\n\nconst DropdownMenuItem: ForwardRefExoticComponent<\n Omit<DropdownMenuItemProps, 'ref'> &\n RefAttributes<ComponentRef<typeof MenuPrimitive.Item>>\n> = forwardRef<ComponentRef<typeof MenuPrimitive.Item>, DropdownMenuItemProps>(\n ({ className, inset, variant = 'default', children, ...props }, ref) => {\n return (\n <MenuPrimitive.Item\n ref={ref}\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(dropdownMenuItemVariants({ inset, variant }), className)}\n {...props}\n >\n {children}\n </MenuPrimitive.Item>\n );\n }\n);\n\nconst DropdownMenuCheckboxItem: ForwardRefExoticComponent<\n Omit<MenuPrimitive.CheckboxItem.Props, 'ref'> &\n RefAttributes<ComponentRef<typeof MenuPrimitive.CheckboxItem>>\n> = forwardRef<\n ComponentRef<typeof MenuPrimitive.CheckboxItem>,\n MenuPrimitive.CheckboxItem.Props\n>(({ className, children, checked, ...props }, ref) => {\n return (\n <MenuPrimitive.CheckboxItem\n ref={ref}\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(dropdownMenuItemVariants({ inset: true }), className)}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <MenuPrimitive.CheckboxItemIndicator>\n <IconCheck className={dropdownMenuItemIndicatorClassName} />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n );\n});\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: MenuPrimitive.RadioGroup.Props): ReactNode {\n return (\n <MenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n );\n}\n\nconst DropdownMenuRadioItem: ForwardRefExoticComponent<\n Omit<MenuPrimitive.RadioItem.Props, 'ref'> &\n RefAttributes<ComponentRef<typeof MenuPrimitive.RadioItem>>\n> = forwardRef<\n ComponentRef<typeof MenuPrimitive.RadioItem>,\n MenuPrimitive.RadioItem.Props\n>(({ className, children, ...props }, ref) => {\n return (\n <MenuPrimitive.RadioItem\n ref={ref}\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(dropdownMenuItemVariants({ inset: true }), className)}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <MenuPrimitive.RadioItemIndicator>\n <IconCheck className={dropdownMenuItemIndicatorClassName} />\n </MenuPrimitive.RadioItemIndicator>\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n );\n});\n\ntype DropdownMenuLabelProps = MenuPrimitive.GroupLabel.Props & {\n inset?: boolean;\n};\n\nconst DropdownMenuLabel: ForwardRefExoticComponent<\n Omit<DropdownMenuLabelProps, 'ref'> &\n RefAttributes<ComponentRef<typeof MenuPrimitive.GroupLabel>>\n> = forwardRef<\n ComponentRef<typeof MenuPrimitive.GroupLabel>,\n DropdownMenuLabelProps\n>(({ className, inset, ...props }, ref) => {\n return (\n <MenuPrimitive.GroupLabel\n ref={ref}\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('data-inset:pl-8', menuSectionLabelClasses, className)}\n {...props}\n />\n );\n});\n\nconst DropdownMenuHeader: ForwardRefExoticComponent<\n Omit<HTMLAttributes<HTMLDivElement>, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"dropdown-menu-header\"\n className={cn(\n '-mx-1 -mt-1 mb-1 flex flex-row items-center gap-2 border-b border-default p-3 pointer-events-none',\n className\n )}\n {...props}\n />\n );\n }\n);\n\nconst DropdownMenuSeparator: ForwardRefExoticComponent<\n Omit<MenuPrimitive.Separator.Props, 'ref'> &\n RefAttributes<ComponentRef<typeof MenuPrimitive.Separator>>\n> = forwardRef<\n ComponentRef<typeof MenuPrimitive.Separator>,\n MenuPrimitive.Separator.Props\n>(({ className, ...props }, ref) => {\n return (\n <MenuPrimitive.Separator\n ref={ref}\n data-slot=\"dropdown-menu-separator\"\n className={cn(menuSectionSeparatorClasses, className)}\n {...props}\n />\n );\n});\n\ntype DropdownMenuShortcutProps = Omit<\n HTMLAttributes<HTMLSpanElement>,\n 'children'\n> & {\n children: string;\n};\n\nconst DropdownMenuShortcut: ForwardRefExoticComponent<\n Omit<DropdownMenuShortcutProps, 'ref'> & RefAttributes<HTMLSpanElement>\n> = forwardRef<ComponentRef<'span'>, DropdownMenuShortcutProps>(\n ({ className, children, ...props }, ref) => {\n return (\n <span\n ref={ref}\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('ml-auto flex shrink-0 items-center gap-1', className)}\n {...props}\n >\n <Kbd>{children}</Kbd>\n </span>\n );\n }\n);\n\nfunction DropdownMenuSub({\n ...props\n}: MenuPrimitive.SubmenuRoot.Props): ReactNode {\n return <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\ntype DropdownMenuSubTriggerProps = MenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean;\n};\n\nconst DropdownMenuSubTrigger: ForwardRefExoticComponent<\n Omit<DropdownMenuSubTriggerProps, 'ref'> &\n RefAttributes<ComponentRef<typeof MenuPrimitive.SubmenuTrigger>>\n> = forwardRef<\n ComponentRef<typeof MenuPrimitive.SubmenuTrigger>,\n DropdownMenuSubTriggerProps\n>(({ className, inset, children, ...props }, ref) => {\n return (\n <MenuPrimitive.SubmenuTrigger\n ref={ref}\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"group/sub-trigger text-popover-foreground focus:bg-popover-background-hover focus:text-popover-foreground data-open:bg-popover-background-hover data-open:text-popover-foreground data-disabled:pointer-events-none data-disabled:text-base-foreground-disabled flex min-h-9 cursor-default items-center gap-2 rounded-lg p-2 text-sm leading-4.5 font-medium outline-hidden select-none data-inset:pl-8 [&>svg]:pointer-events-none [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4 [&>svg]:text-popover-foreground data-disabled:[&>svg]:text-base-foreground-disabled\",\n className\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto size-4 text-popover-foreground group-data-disabled/sub-trigger:text-base-foreground-disabled\" />\n </MenuPrimitive.SubmenuTrigger>\n );\n});\n\nfunction DropdownMenuSubContent({\n align = 'start',\n alignOffset = -3,\n side = 'right',\n sideOffset = 0,\n className,\n ...props\n}: ComponentProps<typeof DropdownMenuContent>): ReactNode {\n return (\n <DropdownMenuContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn('min-w-32 w-auto', className)}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n {...props}\n />\n );\n}\n\nconst DropdownMenuSectionLabel: ForwardRefExoticComponent<\n Omit<HTMLAttributes<HTMLDivElement>, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"dropdown-menu-section-label\"\n className={cn(menuSectionLabelClasses, className)}\n {...props}\n />\n );\n }\n);\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuHeader,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSectionLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"],"names":["forwardRef","Menu","MenuPrimitive","IconCheck","IconChevronRight","cva","usePortalContainer","cn","menuContainerPadding","menuItemPadding","menuSectionLabelClasses","menuSectionSeparatorClasses","Kbd","dropdownMenuItemVariants","variants","inset","true","variant","default","destructive","defaultVariants","dropdownMenuItemIndicatorClassName","DropdownMenu","props","Root","data-slot","DropdownMenuPortal","container","contextContainer","Portal","DropdownMenuTrigger","children","ref","Trigger","displayName","DropdownMenuContent","align","alignOffset","side","sideOffset","className","Positioner","Popup","DropdownMenuGroup","Group","DropdownMenuItem","Item","data-inset","data-variant","DropdownMenuCheckboxItem","checked","CheckboxItem","span","CheckboxItemIndicator","DropdownMenuRadioGroup","RadioGroup","DropdownMenuRadioItem","RadioItem","RadioItemIndicator","DropdownMenuLabel","GroupLabel","DropdownMenuHeader","div","DropdownMenuSeparator","Separator","DropdownMenuShortcut","DropdownMenuSub","SubmenuRoot","DropdownMenuSubTrigger","SubmenuTrigger","DropdownMenuSubContent","DropdownMenuSectionLabel"],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Context } from
|
|
2
|
-
type EmptyStateType =
|
|
1
|
+
import type { Context } from "react";
|
|
2
|
+
type EmptyStateType = "error-generic" | "new-object" | "no-access" | "no-results" | "not-found" | "new-chat" | "unknown";
|
|
3
3
|
type EmptyStateContextValue = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
variant: "compact" | "full";
|
|
5
|
+
type?: EmptyStateType;
|
|
6
6
|
};
|
|
7
7
|
declare const EmptyStateContext: Context<EmptyStateContextValue>;
|
|
8
8
|
declare const useEmptyState: () => EmptyStateContextValue;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { createContext
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
const EmptyStateContext = /*#__PURE__*/ createContext({
|
|
3
|
+
variant: 'compact'
|
|
4
|
+
});
|
|
5
|
+
const useEmptyState = ()=>useContext(EmptyStateContext);
|
|
6
|
+
export { EmptyStateContext, useEmptyState };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=empty-state.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/empty-state/empty-state.context.tsx"],"sourcesContent":["import type { Context } from 'react';\nimport { createContext, useContext } from 'react';\n\ntype EmptyStateType =\n | 'error-generic'\n | 'new-object'\n | 'no-access'\n | 'no-results'\n | 'not-found'\n | 'new-chat'\n | 'unknown';\n\ntype EmptyStateContextValue = {\n variant: 'compact' | 'full';\n type?: EmptyStateType;\n};\n\nconst EmptyStateContext: Context<EmptyStateContextValue> =\n createContext<EmptyStateContextValue>({\n variant: 'compact',\n });\n\nconst useEmptyState = (): EmptyStateContextValue =>\n useContext(EmptyStateContext);\n\nexport { EmptyStateContext, useEmptyState };\nexport type { EmptyStateType };\n"],"names":["createContext","useContext","EmptyStateContext","variant","useEmptyState"],"mappings":"AACA,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAQ;AAgBlD,MAAMC,kCACJF,cAAsC;IACpCG,SAAS;AACX;AAEF,MAAMC,gBAAgB,IACpBH,WAAWC;AAEb,SAASA,iBAAiB,EAAEE,aAAa,GAAG"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from
|
|
2
|
-
import { EmptyStateType } from
|
|
3
|
-
declare const EmptyState: ForwardRefExoticComponent<Omit<ComponentProps<
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import type { EmptyStateType } from "./empty-state.context";
|
|
3
|
+
declare const EmptyState: ForwardRefExoticComponent<Omit<ComponentProps<"div">, "ref"> & ({
|
|
4
|
+
variant?: "compact";
|
|
5
|
+
type?: EmptyStateType;
|
|
6
6
|
} | {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
variant: "full";
|
|
8
|
+
type: EmptyStateType;
|
|
9
9
|
}) & RefAttributes<HTMLDivElement>>;
|
|
10
|
-
declare const EmptyStateIcon: ForwardRefExoticComponent<ComponentProps<
|
|
11
|
-
type TitleAs =
|
|
12
|
-
type EmptyStateTitleProps = ComponentProps<
|
|
13
|
-
|
|
10
|
+
declare const EmptyStateIcon: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
11
|
+
type TitleAs = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p";
|
|
12
|
+
type EmptyStateTitleProps = ComponentProps<"h2"> & {
|
|
13
|
+
as?: TitleAs;
|
|
14
14
|
};
|
|
15
15
|
declare function EmptyStateTitle({ className, as: Component, ...props }: EmptyStateTitleProps): ReactNode;
|
|
16
|
-
declare const EmptyStateDescription: ForwardRefExoticComponent<ComponentProps<
|
|
17
|
-
declare const EmptyStateActions: ForwardRefExoticComponent<ComponentProps<
|
|
18
|
-
export { EmptyState, EmptyStateIcon, EmptyStateTitle, EmptyStateDescription, EmptyStateActions
|
|
16
|
+
declare const EmptyStateDescription: ForwardRefExoticComponent<ComponentProps<"p"> & RefAttributes<HTMLParagraphElement>>;
|
|
17
|
+
declare const EmptyStateActions: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export { EmptyState, EmptyStateIcon, EmptyStateTitle, EmptyStateDescription, EmptyStateActions };
|