@cognite/aura 0.3.5 → 1.46105.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 +21 -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 +22 -22
- 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 +69 -55
- 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 +104 -76
- 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 +402 -132
- 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 +44 -33
- 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 -1
- package/dist/components/ui/core/data-grid/index.js +5 -2
- 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 +10 -10
- package/dist/components/ui/core/segmented-control/segmented-control.js +203 -149
- 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 +46 -11
- package/src/components/ui/core/button/button.md +93 -0
|
@@ -1,108 +1,158 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
value: u,
|
|
21
|
-
children: /* @__PURE__ */ d("div", {
|
|
22
|
-
ref: s,
|
|
23
|
-
"data-slot": "action-toolbar",
|
|
24
|
-
role: r,
|
|
25
|
-
className: e(m({ width: n }), t),
|
|
26
|
-
...o
|
|
27
|
-
})
|
|
28
|
-
})
|
|
29
|
-
});
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, forwardRef, useContext, useMemo } from "react";
|
|
3
|
+
import { IconX } from "@tabler/icons-react";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../../../../lib/utils.js";
|
|
6
|
+
import { assignRef } from "../../../../utils/assign-ref.js";
|
|
7
|
+
import { Button } from "../button/button.js";
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../tooltip/tooltip.js";
|
|
9
|
+
import { useActionToolbarPresence } from "./action-toolbar-motion.js";
|
|
10
|
+
const actionToolbarVariants = cva('min-w-[400px] max-w-[1200px] h-14 flex items-center justify-between gap-3 bg-popover-background-fixed-dark text-popover-foreground-fixed-dark pl-4 pr-3 rounded-xl shadow-default', {
|
|
11
|
+
variants: {
|
|
12
|
+
width: {
|
|
13
|
+
full: 'w-full',
|
|
14
|
+
fit: 'w-fit'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
width: 'full'
|
|
19
|
+
}
|
|
30
20
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
ref: i,
|
|
34
|
-
"data-slot": "action-toolbar-selection",
|
|
35
|
-
role: n,
|
|
36
|
-
className: e("flex min-w-0 shrink-0 items-center gap-3", t),
|
|
37
|
-
...r
|
|
38
|
-
}));
|
|
39
|
-
_.displayName = "ActionToolbarSelection";
|
|
40
|
-
var v = s(({ className: t, count: n, label: r = "selected", children: i, ...a }, o) => {
|
|
41
|
-
let { selectedCount: s } = c(h), l = n ?? s;
|
|
42
|
-
return /* @__PURE__ */ d("div", {
|
|
43
|
-
ref: o,
|
|
44
|
-
"data-slot": "action-toolbar-selection-summary",
|
|
45
|
-
className: e("flex min-w-0", t),
|
|
46
|
-
...a,
|
|
47
|
-
children: i ?? /* @__PURE__ */ f("span", {
|
|
48
|
-
"data-slot": "action-toolbar-selection-label",
|
|
49
|
-
className: "flex min-w-0 items-center gap-0.5 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light",
|
|
50
|
-
children: [l == null ? null : /* @__PURE__ */ d("span", { children: l }), /* @__PURE__ */ d("span", {
|
|
51
|
-
className: "truncate",
|
|
52
|
-
children: r
|
|
53
|
-
})]
|
|
54
|
-
})
|
|
55
|
-
});
|
|
21
|
+
const ActionToolbarContext = /*#__PURE__*/ createContext({
|
|
22
|
+
selectedCount: undefined
|
|
56
23
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
24
|
+
const ActionToolbar = /*#__PURE__*/ forwardRef(({ className, width, role = 'toolbar', selectedCount, ...props }, ref)=>{
|
|
25
|
+
const presence = useActionToolbarPresence(selectedCount);
|
|
26
|
+
const contextValue = useMemo(()=>({
|
|
27
|
+
selectedCount: presence.selectedCount
|
|
28
|
+
}), [
|
|
29
|
+
presence.selectedCount
|
|
30
|
+
]);
|
|
31
|
+
if (!presence.mounted) return null;
|
|
32
|
+
return /*#__PURE__*/ _jsx(TooltipProvider, {
|
|
33
|
+
delayDuration: 0,
|
|
34
|
+
children: /*#__PURE__*/ _jsx(ActionToolbarContext.Provider, {
|
|
35
|
+
value: contextValue,
|
|
36
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
37
|
+
ref: (node)=>{
|
|
38
|
+
assignRef(ref, node);
|
|
39
|
+
presence.bindMotion(node);
|
|
40
|
+
},
|
|
41
|
+
"data-slot": "action-toolbar",
|
|
42
|
+
role: role,
|
|
43
|
+
className: cn(actionToolbarVariants({
|
|
44
|
+
width
|
|
45
|
+
}), className),
|
|
46
|
+
...props
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
ActionToolbar.displayName = 'ActionToolbar';
|
|
52
|
+
const ActionToolbarSelection = /*#__PURE__*/ forwardRef(({ className, role = 'group', ...props }, ref)=>{
|
|
53
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
54
|
+
ref: ref,
|
|
55
|
+
"data-slot": "action-toolbar-selection",
|
|
56
|
+
role: role,
|
|
57
|
+
className: cn('flex min-w-0 shrink-0 items-center gap-3', className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
ActionToolbarSelection.displayName = 'ActionToolbarSelection';
|
|
62
|
+
const ActionToolbarSelectionSummary = /*#__PURE__*/ forwardRef(({ className, count, label = 'selected', children, ...props }, ref)=>{
|
|
63
|
+
const { selectedCount } = useContext(ActionToolbarContext);
|
|
64
|
+
const resolvedCount = count ?? selectedCount;
|
|
65
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
66
|
+
ref: ref,
|
|
67
|
+
"data-slot": "action-toolbar-selection-summary",
|
|
68
|
+
className: cn('flex min-w-0', className),
|
|
69
|
+
...props,
|
|
70
|
+
children: children ?? /*#__PURE__*/ _jsxs("span", {
|
|
71
|
+
"data-slot": "action-toolbar-selection-label",
|
|
72
|
+
className: "flex min-w-0 items-center gap-0.5 text-sm font-medium leading-4.5 tracking-normal text-popover-foreground-fixed-dark",
|
|
73
|
+
children: [
|
|
74
|
+
resolvedCount == null ? null : /*#__PURE__*/ _jsx("span", {
|
|
75
|
+
children: resolvedCount
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ _jsx("span", {
|
|
78
|
+
className: "truncate",
|
|
79
|
+
children: label
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
ActionToolbarSelectionSummary.displayName = 'ActionToolbarSelectionSummary';
|
|
86
|
+
const ActionToolbarActions = /*#__PURE__*/ forwardRef(({ className, role = 'group', ...props }, ref)=>{
|
|
87
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
88
|
+
ref: ref,
|
|
89
|
+
"data-slot": "action-toolbar-actions",
|
|
90
|
+
role: role,
|
|
91
|
+
className: cn('flex min-w-0 shrink-0 items-center justify-end gap-1', className),
|
|
92
|
+
...props
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
ActionToolbarActions.displayName = 'ActionToolbarActions';
|
|
96
|
+
const ActionToolbarAction = /*#__PURE__*/ forwardRef(({ className, variant = 'ghostOnDark', iconOnly = false, 'aria-label': ariaLabel, children, ...props }, ref)=>{
|
|
97
|
+
if (iconOnly && ariaLabel) {
|
|
98
|
+
return /*#__PURE__*/ _jsxs(Tooltip, {
|
|
99
|
+
children: [
|
|
100
|
+
/*#__PURE__*/ _jsx(TooltipTrigger, {
|
|
101
|
+
render: /*#__PURE__*/ _jsx(Button, {
|
|
102
|
+
ref: ref,
|
|
103
|
+
"data-slot": "action-toolbar-action",
|
|
104
|
+
variant: variant,
|
|
105
|
+
size: "icon",
|
|
106
|
+
"aria-label": ariaLabel,
|
|
107
|
+
className: className,
|
|
108
|
+
...props,
|
|
109
|
+
children: children
|
|
110
|
+
})
|
|
111
|
+
}),
|
|
112
|
+
/*#__PURE__*/ _jsx(TooltipContent, {
|
|
113
|
+
sideOffset: 18,
|
|
114
|
+
children: ariaLabel
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
120
|
+
ref: ref,
|
|
121
|
+
"data-slot": "action-toolbar-action",
|
|
122
|
+
variant: variant,
|
|
123
|
+
size: iconOnly ? 'icon' : 'default',
|
|
124
|
+
"aria-label": ariaLabel,
|
|
125
|
+
className: className,
|
|
126
|
+
...props,
|
|
127
|
+
children: children
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
ActionToolbarAction.displayName = 'ActionToolbarAction';
|
|
131
|
+
const ActionToolbarActionClear = /*#__PURE__*/ forwardRef(({ icon, label = 'Clear', ...props }, ref)=>{
|
|
132
|
+
return /*#__PURE__*/ _jsxs(ActionToolbarAction, {
|
|
133
|
+
ref: ref,
|
|
134
|
+
"data-slot": "action-toolbar-action-clear",
|
|
135
|
+
variant: "secondaryOnDark",
|
|
136
|
+
iconOnly: false,
|
|
137
|
+
...props,
|
|
138
|
+
children: [
|
|
139
|
+
icon ?? /*#__PURE__*/ _jsx(IconX, {}),
|
|
140
|
+
label
|
|
141
|
+
]
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
ActionToolbarActionClear.displayName = 'ActionToolbarActionClear';
|
|
145
|
+
const ActionToolbarPrimaryAction = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
146
|
+
return /*#__PURE__*/ _jsx(ActionToolbarAction, {
|
|
147
|
+
ref: ref,
|
|
148
|
+
"data-slot": "action-toolbar-primary-action",
|
|
149
|
+
variant: "defaultOnDark",
|
|
150
|
+
iconOnly: false,
|
|
151
|
+
className: cn('ml-2', className),
|
|
152
|
+
...props
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
ActionToolbarPrimaryAction.displayName = 'ActionToolbarPrimaryAction';
|
|
156
|
+
export { ActionToolbar, ActionToolbarAction, ActionToolbarActionClear, ActionToolbarActions, ActionToolbarPrimaryAction, ActionToolbarSelection, ActionToolbarSelectionSummary };
|
|
157
|
+
|
|
158
|
+
//# sourceMappingURL=action-toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/action-toolbar/action-toolbar.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n type ReactNode,\n createContext,\n forwardRef,\n useContext,\n useMemo,\n} from 'react';\n\nimport { IconX } from '@tabler/icons-react';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassProp } from 'class-variance-authority/types';\n\nimport { cn } from '../../../../lib/utils';\nimport { assignRef } from '../../../../utils/assign-ref';\nimport { Button } from '../button/button';\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '../tooltip/tooltip';\n\nimport { useActionToolbarPresence } from './action-toolbar-motion';\n\ninterface ActionToolbarVariantProps {\n width?: 'full' | 'fit' | null;\n}\n\nconst actionToolbarVariants: (\n props?: (ActionToolbarVariantProps & ClassProp) | undefined\n) => string = cva(\n 'min-w-[400px] max-w-[1200px] h-14 flex items-center justify-between gap-3 bg-popover-background-fixed-dark text-popover-foreground-fixed-dark pl-4 pr-3 rounded-xl shadow-default',\n {\n variants: {\n width: {\n full: 'w-full',\n fit: 'w-fit',\n },\n },\n defaultVariants: {\n width: 'full',\n },\n }\n);\n\ntype ActionToolbarProps = ComponentProps<'div'> &\n VariantProps<typeof actionToolbarVariants> & {\n selectedCount?: number;\n };\n\ntype ActionToolbarContextValue = {\n selectedCount?: number;\n};\n\nconst ActionToolbarContext = createContext<ActionToolbarContextValue>({\n selectedCount: undefined,\n});\n\nconst ActionToolbar: ForwardRefExoticComponent<\n Omit<ActionToolbarProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ActionToolbarProps>(\n ({ className, width, role = 'toolbar', selectedCount, ...props }, ref) => {\n const presence = useActionToolbarPresence(selectedCount);\n const contextValue = useMemo(\n () => ({ selectedCount: presence.selectedCount }),\n [presence.selectedCount]\n );\n\n if (!presence.mounted) return null;\n\n return (\n <TooltipProvider delayDuration={0}>\n <ActionToolbarContext.Provider value={contextValue}>\n <div\n ref={(node: HTMLDivElement | null) => {\n assignRef(ref, node);\n presence.bindMotion(node);\n }}\n data-slot=\"action-toolbar\"\n role={role}\n className={cn(actionToolbarVariants({ width }), className)}\n {...props}\n />\n </ActionToolbarContext.Provider>\n </TooltipProvider>\n );\n }\n);\nActionToolbar.displayName = 'ActionToolbar';\n\ntype ActionToolbarSelectionProps = ComponentProps<'div'>;\n\nconst ActionToolbarSelection: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ActionToolbarSelectionProps>(\n ({ className, role = 'group', ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"action-toolbar-selection\"\n role={role}\n className={cn('flex min-w-0 shrink-0 items-center gap-3', className)}\n {...props}\n />\n );\n }\n);\nActionToolbarSelection.displayName = 'ActionToolbarSelection';\n\ntype ActionToolbarSelectionSummaryProps = ComponentProps<'div'> & {\n count?: ReactNode;\n label?: ReactNode;\n};\n\nconst ActionToolbarSelectionSummary: ForwardRefExoticComponent<\n Omit<ActionToolbarSelectionSummaryProps, 'ref'> &\n RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ActionToolbarSelectionSummaryProps>(\n ({ className, count, label = 'selected', children, ...props }, ref) => {\n const { selectedCount } = useContext(ActionToolbarContext);\n const resolvedCount = count ?? selectedCount;\n\n return (\n <div\n ref={ref}\n data-slot=\"action-toolbar-selection-summary\"\n className={cn('flex min-w-0', className)}\n {...props}\n >\n {children ?? (\n <span\n data-slot=\"action-toolbar-selection-label\"\n className=\"flex min-w-0 items-center gap-0.5 text-sm font-medium leading-4.5 tracking-normal text-popover-foreground-fixed-dark\"\n >\n {resolvedCount == null ? null : <span>{resolvedCount}</span>}\n <span className=\"truncate\">{label}</span>\n </span>\n )}\n </div>\n );\n }\n);\nActionToolbarSelectionSummary.displayName = 'ActionToolbarSelectionSummary';\n\ntype ActionToolbarActionsProps = ComponentProps<'div'>;\n\nconst ActionToolbarActions: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ActionToolbarActionsProps>(\n ({ className, role = 'group', ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot=\"action-toolbar-actions\"\n role={role}\n className={cn(\n 'flex min-w-0 shrink-0 items-center justify-end gap-1',\n className\n )}\n {...props}\n />\n );\n }\n);\nActionToolbarActions.displayName = 'ActionToolbarActions';\n\ntype ActionToolbarActionProps = Omit<ComponentProps<typeof Button>, 'size'> &\n (\n | { iconOnly: true; 'aria-label': string }\n | { iconOnly?: false; 'aria-label'?: string }\n );\n\nconst ActionToolbarAction: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof Button>, 'size' | 'ref'> &\n (\n | { iconOnly: true; 'aria-label': string }\n | { iconOnly?: false; 'aria-label'?: string }\n ) &\n RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, ActionToolbarActionProps>(\n (\n {\n className,\n variant = 'ghostOnDark',\n iconOnly = false,\n 'aria-label': ariaLabel,\n children,\n ...props\n },\n ref\n ) => {\n if (iconOnly && ariaLabel) {\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <Button\n ref={ref}\n data-slot=\"action-toolbar-action\"\n variant={variant}\n size=\"icon\"\n aria-label={ariaLabel}\n className={className}\n {...props}\n >\n {children}\n </Button>\n }\n />\n <TooltipContent sideOffset={18}>{ariaLabel}</TooltipContent>\n </Tooltip>\n );\n }\n\n return (\n <Button\n ref={ref}\n data-slot=\"action-toolbar-action\"\n variant={variant}\n size={iconOnly ? 'icon' : 'default'}\n aria-label={ariaLabel}\n className={className}\n {...props}\n >\n {children}\n </Button>\n );\n }\n);\nActionToolbarAction.displayName = 'ActionToolbarAction';\n\ntype ActionToolbarActionClearProps = Omit<\n ActionToolbarActionProps,\n 'variant' | 'iconOnly' | 'children'\n> & {\n icon?: ReactNode;\n label?: ReactNode;\n};\n\nconst ActionToolbarActionClear: ForwardRefExoticComponent<\n Omit<ActionToolbarActionClearProps, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, ActionToolbarActionClearProps>(\n ({ icon, label = 'Clear', ...props }, ref) => {\n return (\n <ActionToolbarAction\n ref={ref}\n data-slot=\"action-toolbar-action-clear\"\n variant=\"secondaryOnDark\"\n iconOnly={false}\n {...props}\n >\n {icon ?? <IconX />}\n {label}\n </ActionToolbarAction>\n );\n }\n);\nActionToolbarActionClear.displayName = 'ActionToolbarActionClear';\n\ntype ActionToolbarPrimaryActionProps = Omit<\n ActionToolbarActionProps,\n 'variant' | 'iconOnly'\n>;\n\nconst ActionToolbarPrimaryAction: ForwardRefExoticComponent<\n Omit<ActionToolbarPrimaryActionProps, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, ActionToolbarPrimaryActionProps>(\n ({ className, ...props }, ref) => {\n return (\n <ActionToolbarAction\n ref={ref}\n data-slot=\"action-toolbar-primary-action\"\n variant=\"defaultOnDark\"\n iconOnly={false}\n className={cn('ml-2', className)}\n {...props}\n />\n );\n }\n);\nActionToolbarPrimaryAction.displayName = 'ActionToolbarPrimaryAction';\n\nexport {\n ActionToolbar,\n ActionToolbarAction,\n ActionToolbarActionClear,\n ActionToolbarActions,\n ActionToolbarPrimaryAction,\n ActionToolbarSelection,\n ActionToolbarSelectionSummary,\n};\n"],"names":["createContext","forwardRef","useContext","useMemo","IconX","cva","cn","assignRef","Button","Tooltip","TooltipContent","TooltipProvider","TooltipTrigger","useActionToolbarPresence","actionToolbarVariants","variants","width","full","fit","defaultVariants","ActionToolbarContext","selectedCount","undefined","ActionToolbar","className","role","props","ref","presence","contextValue","mounted","delayDuration","Provider","value","div","node","bindMotion","data-slot","displayName","ActionToolbarSelection","ActionToolbarSelectionSummary","count","label","children","resolvedCount","span","ActionToolbarActions","ActionToolbarAction","variant","iconOnly","ariaLabel","render","size","aria-label","sideOffset","ActionToolbarActionClear","icon","ActionToolbarPrimaryAction"],"mappings":"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"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from
|
|
2
|
-
import { VariantProps } from
|
|
3
|
-
import { ClassProp } from
|
|
4
|
-
type AlertVariant =
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import type { ClassProp } from "class-variance-authority/types";
|
|
4
|
+
type AlertVariant = "default" | "info" | "warning" | "error";
|
|
5
5
|
/** @deprecated Use `'info'` instead. Will be removed in a future major release. */
|
|
6
|
-
type DeprecatedAlertVariant =
|
|
6
|
+
type DeprecatedAlertVariant = "secondary";
|
|
7
7
|
type AlertVariantInput = AlertVariant | DeprecatedAlertVariant;
|
|
8
|
-
type AlertStyle =
|
|
8
|
+
type AlertStyle = "card" | "strip";
|
|
9
9
|
interface AlertVariantProps {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
variant?: "default" | "error" | "info" | "warning" | null;
|
|
11
|
+
alertStyle?: "card" | "strip" | null;
|
|
12
12
|
}
|
|
13
13
|
declare const alertVariants: (props?: (AlertVariantProps & ClassProp) | undefined) => string;
|
|
14
|
-
type AlertProps = ComponentProps<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
type AlertProps = ComponentProps<"div"> & Omit<VariantProps<typeof alertVariants>, "variant"> & {
|
|
15
|
+
variant?: AlertVariantInput;
|
|
16
|
+
alertStyle?: AlertStyle;
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
defaultVisible?: boolean;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
icon?: ReactNode;
|
|
21
21
|
};
|
|
22
|
-
declare const Alert: ForwardRefExoticComponent<Omit<AlertProps,
|
|
23
|
-
declare const AlertTitle: ForwardRefExoticComponent<ComponentProps<
|
|
24
|
-
declare const AlertDescription: ForwardRefExoticComponent<ComponentProps<
|
|
25
|
-
declare const AlertActions: ForwardRefExoticComponent<ComponentProps<
|
|
26
|
-
type AlertButtonVariant =
|
|
27
|
-
declare const AlertButton: ForwardRefExoticComponent<Omit<ComponentProps<
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
declare const AlertClose: ForwardRefExoticComponent<ComponentProps<
|
|
31
|
-
export { Alert, AlertTitle, AlertDescription, AlertActions, AlertButton, AlertClose
|
|
22
|
+
declare const Alert: ForwardRefExoticComponent<Omit<AlertProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const AlertTitle: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const AlertDescription: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const AlertActions: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
26
|
+
type AlertButtonVariant = "default" | "ghost";
|
|
27
|
+
declare const AlertButton: ForwardRefExoticComponent<Omit<ComponentProps<"button"> & {
|
|
28
|
+
variant?: AlertButtonVariant;
|
|
29
|
+
}, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
declare const AlertClose: ForwardRefExoticComponent<ComponentProps<"button"> & RefAttributes<HTMLButtonElement>>;
|
|
31
|
+
export { Alert, AlertTitle, AlertDescription, AlertActions, AlertButton, AlertClose };
|