@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,22 +1,22 @@
|
|
|
1
|
-
import { ComponentProps, ForwardRefExoticComponent, RefAttributes } from
|
|
2
|
-
import { CollapsibleRootProps, CollapsiblePanelProps } from
|
|
3
|
-
import { ToolUIPart } from
|
|
4
|
-
import { CollapsibleTrigger } from
|
|
5
|
-
declare const Tool: ForwardRefExoticComponent<Omit<CollapsibleRootProps,
|
|
6
|
-
type ToolHeaderProps = Omit<ComponentProps<typeof CollapsibleTrigger>,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type { ComponentProps, ForwardRefExoticComponent, RefAttributes } from "react";
|
|
2
|
+
import type { CollapsibleRootProps, CollapsiblePanelProps } from "@base-ui/react";
|
|
3
|
+
import type { ToolUIPart } from "../../../../lib/ai/types";
|
|
4
|
+
import { CollapsibleTrigger } from "../collapsible/collapsible";
|
|
5
|
+
declare const Tool: ForwardRefExoticComponent<Omit<CollapsibleRootProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
6
|
+
type ToolHeaderProps = Omit<ComponentProps<typeof CollapsibleTrigger>, "type"> & {
|
|
7
|
+
title?: string;
|
|
8
|
+
type: ToolUIPart["type"];
|
|
9
|
+
hasError?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare const ToolHeader: ForwardRefExoticComponent<Omit<ToolHeaderProps,
|
|
12
|
-
declare const ToolContent: ForwardRefExoticComponent<Omit<CollapsiblePanelProps,
|
|
13
|
-
type ToolInputProps = ComponentProps<
|
|
14
|
-
|
|
11
|
+
declare const ToolHeader: ForwardRefExoticComponent<Omit<ToolHeaderProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
declare const ToolContent: ForwardRefExoticComponent<Omit<CollapsiblePanelProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
type ToolInputProps = ComponentProps<"div"> & {
|
|
14
|
+
input: ToolUIPart["input"];
|
|
15
15
|
};
|
|
16
|
-
declare const ToolInput: ForwardRefExoticComponent<Omit<ToolInputProps,
|
|
17
|
-
type ToolOutputProps = ComponentProps<
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
declare const ToolInput: ForwardRefExoticComponent<Omit<ToolInputProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
17
|
+
type ToolOutputProps = ComponentProps<"div"> & {
|
|
18
|
+
output: ToolUIPart["output"];
|
|
19
|
+
errorText: ToolUIPart["errorText"];
|
|
20
20
|
};
|
|
21
|
-
declare const ToolOutput: ForwardRefExoticComponent<Omit<ToolOutputProps,
|
|
21
|
+
declare const ToolOutput: ForwardRefExoticComponent<Omit<ToolOutputProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
22
22
|
export { Tool, ToolHeader, ToolContent, ToolInput, ToolOutput };
|
|
@@ -1,127 +1,168 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { IconSelector } from "@tabler/icons-react";
|
|
4
|
+
import { cn, isJsonString } from "../../../../lib/utils.js";
|
|
5
|
+
import { Badge } from "../badge/badge.js";
|
|
6
|
+
import { Button } from "../button/button.js";
|
|
7
|
+
import { CodeBlock, CodeBlockCollapseButton, CodeBlockCopyButton, CodeBlockDownloadButton } from "../code-block/code-block.js";
|
|
8
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../collapsible/collapsible.js";
|
|
9
|
+
const Tool = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(Collapsible, {
|
|
10
|
+
ref: ref,
|
|
11
|
+
"data-slot": "tool",
|
|
12
|
+
className: cn('group not-prose w-full bg-card-background rounded-md flex flex-col gap-2', className),
|
|
13
|
+
...props
|
|
14
|
+
}));
|
|
15
|
+
Tool.displayName = 'Tool';
|
|
16
|
+
const ToolHeader = /*#__PURE__*/ forwardRef(({ className, title, type, hasError = false, ...props }, ref)=>/*#__PURE__*/ _jsx(CollapsibleTrigger, {
|
|
17
|
+
ref: ref,
|
|
18
|
+
"data-slot": "tool-header",
|
|
19
|
+
className: className,
|
|
20
|
+
render: /*#__PURE__*/ _jsxs(Button, {
|
|
21
|
+
variant: "ghost",
|
|
22
|
+
className: "w-full justify-between text-base leading-5 tracking-tighter",
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ _jsx("span", {
|
|
25
|
+
children: title ?? type.substring(type.indexOf('-') + 1)
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
28
|
+
className: "flex items-center gap-2",
|
|
29
|
+
children: [
|
|
30
|
+
hasError ? /*#__PURE__*/ _jsx(Badge, {
|
|
31
|
+
outline: true,
|
|
32
|
+
className: "bg-card-background text-critical-foreground-strong border-default",
|
|
33
|
+
children: "Error"
|
|
34
|
+
}) : null,
|
|
35
|
+
/*#__PURE__*/ _jsx(IconSelector, {
|
|
36
|
+
className: "h-4 w-4"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
}),
|
|
42
|
+
...props
|
|
43
|
+
}));
|
|
44
|
+
ToolHeader.displayName = 'ToolHeader';
|
|
45
|
+
const ToolContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx(CollapsibleContent, {
|
|
46
|
+
ref: ref,
|
|
47
|
+
"data-slot": "tool-content",
|
|
48
|
+
className: cn(/* min-h-0: flex descendants (e.g. CodeBlock max-height) may shrink */ 'flex min-h-0 flex-col gap-4 py-3 text-popover-foreground outline-none', className),
|
|
49
|
+
...props
|
|
50
|
+
}));
|
|
51
|
+
ToolContent.displayName = 'ToolContent';
|
|
52
|
+
const ToolInput = /*#__PURE__*/ forwardRef(({ className, input, ...props }, ref)=>/*#__PURE__*/ _jsxs("div", {
|
|
53
|
+
ref: ref,
|
|
54
|
+
"data-slot": "tool-input",
|
|
55
|
+
className: cn('min-h-0 space-y-2 overflow-x-hidden overflow-y-visible px-3.25', className),
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
/*#__PURE__*/ _jsx("h4", {
|
|
59
|
+
className: "text-sm font-medium uppercase tracking-wide text-muted-foreground",
|
|
60
|
+
children: "Parameters"
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ _jsx("div", {
|
|
63
|
+
className: "min-h-0 rounded-md bg-muted/50",
|
|
64
|
+
children: /*#__PURE__*/ _jsxs(CodeBlock, {
|
|
65
|
+
code: JSON.stringify(input, null, 2),
|
|
66
|
+
language: "json",
|
|
67
|
+
collapsed: true,
|
|
68
|
+
children: [
|
|
69
|
+
/*#__PURE__*/ _jsx(CodeBlockCopyButton, {}),
|
|
70
|
+
/*#__PURE__*/ _jsx(CodeBlockDownloadButton, {
|
|
71
|
+
fileName: "tool-parameters.json"
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ _jsx(CodeBlockCollapseButton, {})
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
}));
|
|
79
|
+
ToolInput.displayName = 'ToolInput';
|
|
80
|
+
const ToolOutput = /*#__PURE__*/ forwardRef(({ className, output, errorText, ...props }, ref)=>{
|
|
81
|
+
if ((output === null || output === undefined) && !errorText) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
let outputElement = null;
|
|
85
|
+
if (typeof output === 'string') {
|
|
86
|
+
outputElement = /*#__PURE__*/ _jsxs(CodeBlock, {
|
|
87
|
+
code: output,
|
|
88
|
+
language: isJsonString(output) ? 'json' : 'text',
|
|
89
|
+
collapsed: true,
|
|
90
|
+
children: [
|
|
91
|
+
/*#__PURE__*/ _jsx(CodeBlockCopyButton, {}),
|
|
92
|
+
/*#__PURE__*/ _jsx(CodeBlockDownloadButton, {
|
|
93
|
+
fileName: "tool-result.json"
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ _jsx(CodeBlockCollapseButton, {})
|
|
96
|
+
]
|
|
97
|
+
});
|
|
98
|
+
} else if (output === null || output === undefined) {
|
|
99
|
+
outputElement = null;
|
|
100
|
+
} else if (typeof output === 'object') {
|
|
101
|
+
outputElement = /*#__PURE__*/ _jsxs(CodeBlock, {
|
|
102
|
+
code: JSON.stringify(output, null, 2),
|
|
103
|
+
language: "json",
|
|
104
|
+
collapsed: true,
|
|
105
|
+
children: [
|
|
106
|
+
/*#__PURE__*/ _jsx(CodeBlockCopyButton, {}),
|
|
107
|
+
/*#__PURE__*/ _jsx(CodeBlockDownloadButton, {
|
|
108
|
+
fileName: "tool-result.json"
|
|
109
|
+
}),
|
|
110
|
+
/*#__PURE__*/ _jsx(CodeBlockCollapseButton, {})
|
|
111
|
+
]
|
|
112
|
+
});
|
|
113
|
+
} else if (typeof output === 'number' || typeof output === 'boolean' || typeof output === 'bigint') {
|
|
114
|
+
outputElement = /*#__PURE__*/ _jsxs(CodeBlock, {
|
|
115
|
+
code: String(output),
|
|
116
|
+
language: "json",
|
|
117
|
+
collapsed: true,
|
|
118
|
+
children: [
|
|
119
|
+
/*#__PURE__*/ _jsx(CodeBlockCopyButton, {}),
|
|
120
|
+
/*#__PURE__*/ _jsx(CodeBlockDownloadButton, {
|
|
121
|
+
fileName: "tool-result.json"
|
|
122
|
+
}),
|
|
123
|
+
/*#__PURE__*/ _jsx(CodeBlockCollapseButton, {})
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
if (errorText) {
|
|
128
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
129
|
+
ref: ref,
|
|
130
|
+
"data-slot": "tool-output",
|
|
131
|
+
className: cn('space-y-2 px-3.25', className),
|
|
132
|
+
...props,
|
|
133
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
134
|
+
className: "flex flex-col gap-2 text-sm",
|
|
135
|
+
children: [
|
|
136
|
+
/*#__PURE__*/ _jsx("span", {
|
|
137
|
+
className: "font-medium text-critical-foreground-strong",
|
|
138
|
+
children: "ERROR"
|
|
139
|
+
}),
|
|
140
|
+
/*#__PURE__*/ _jsx("span", {
|
|
141
|
+
className: "text-base-foreground",
|
|
142
|
+
children: errorText
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
})
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
149
|
+
ref: ref,
|
|
150
|
+
"data-slot": "tool-output",
|
|
151
|
+
className: cn('space-y-2 px-3.25', className),
|
|
152
|
+
...props,
|
|
153
|
+
children: [
|
|
154
|
+
/*#__PURE__*/ _jsx("h4", {
|
|
155
|
+
className: "text-sm font-medium uppercase tracking-wide text-muted-foreground",
|
|
156
|
+
children: "Result"
|
|
157
|
+
}),
|
|
158
|
+
/*#__PURE__*/ _jsx("div", {
|
|
159
|
+
className: "min-h-0 overflow-x-auto rounded-md bg-muted-background/50 text-xs text-base-foreground [&_table]:w-full",
|
|
160
|
+
children: outputElement
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
});
|
|
124
164
|
});
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
165
|
+
ToolOutput.displayName = 'ToolOutput';
|
|
166
|
+
export { Tool, ToolHeader, ToolContent, ToolInput, ToolOutput };
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/tool/tool.tsx"],"sourcesContent":["import type {\n ComponentProps,\n ComponentRef,\n ForwardRefExoticComponent,\n ReactNode,\n RefAttributes,\n} from 'react';\nimport { forwardRef } from 'react';\n\nimport type {\n CollapsibleRootProps,\n CollapsiblePanelProps,\n} from '@base-ui/react';\nimport { IconSelector } from '@tabler/icons-react';\n\nimport type { ToolUIPart } from '../../../../lib/ai/types';\nimport type { CodeLanguage } from '../../../../lib/highlight-code';\nimport { cn, isJsonString } from '../../../../lib/utils';\nimport { Badge } from '../badge/badge';\nimport { Button } from '../button/button';\nimport {\n CodeBlock,\n CodeBlockCollapseButton,\n CodeBlockCopyButton,\n CodeBlockDownloadButton,\n} from '../code-block/code-block';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '../collapsible/collapsible';\n\ntype ToolProps = ComponentProps<typeof Collapsible>;\n\nconst Tool: ForwardRefExoticComponent<\n Omit<CollapsibleRootProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<typeof Collapsible>, ToolProps>(\n ({ className, ...props }, ref) => (\n <Collapsible\n ref={ref}\n data-slot=\"tool\"\n className={cn(\n 'group not-prose w-full bg-card-background rounded-md flex flex-col gap-2',\n className\n )}\n {...props}\n />\n )\n);\nTool.displayName = 'Tool';\n\ntype ToolHeaderProps = Omit<\n ComponentProps<typeof CollapsibleTrigger>,\n 'type'\n> & {\n title?: string;\n type: ToolUIPart['type'];\n hasError?: boolean;\n};\n\nconst ToolHeader: ForwardRefExoticComponent<\n Omit<ToolHeaderProps, 'ref'> & RefAttributes<HTMLButtonElement>\n> = forwardRef<ComponentRef<typeof CollapsibleTrigger>, ToolHeaderProps>(\n ({ className, title, type, hasError = false, ...props }, ref) => (\n <CollapsibleTrigger\n ref={ref}\n data-slot=\"tool-header\"\n className={className}\n render={\n <Button\n variant=\"ghost\"\n className=\"w-full justify-between text-base leading-5 tracking-tighter\"\n >\n <span>{title ?? type.substring(type.indexOf('-') + 1)}</span>\n <div className=\"flex items-center gap-2\">\n {hasError ? (\n <Badge\n outline\n className=\"bg-card-background text-critical-foreground-strong border-default\"\n >\n Error\n </Badge>\n ) : null}\n <IconSelector className=\"h-4 w-4\" />\n </div>\n </Button>\n }\n {...props}\n />\n )\n);\nToolHeader.displayName = 'ToolHeader';\n\ntype ToolContentProps = ComponentProps<typeof CollapsibleContent>;\n\nconst ToolContent: ForwardRefExoticComponent<\n Omit<CollapsiblePanelProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<typeof CollapsibleContent>, ToolContentProps>(\n ({ className, ...props }, ref) => (\n <CollapsibleContent\n ref={ref}\n data-slot=\"tool-content\"\n className={cn(\n /* min-h-0: flex descendants (e.g. CodeBlock max-height) may shrink */\n 'flex min-h-0 flex-col gap-4 py-3 text-popover-foreground outline-none',\n className\n )}\n {...props}\n />\n )\n);\nToolContent.displayName = 'ToolContent';\n\ntype ToolInputProps = ComponentProps<'div'> & {\n input: ToolUIPart['input'];\n};\n\nconst ToolInput: ForwardRefExoticComponent<\n Omit<ToolInputProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<HTMLDivElement, ToolInputProps>(\n ({ className, input, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"tool-input\"\n className={cn(\n 'min-h-0 space-y-2 overflow-x-hidden overflow-y-visible px-3.25',\n className\n )}\n {...props}\n >\n <h4 className=\"text-sm font-medium uppercase tracking-wide text-muted-foreground\">\n Parameters\n </h4>\n <div className=\"min-h-0 rounded-md bg-muted/50\">\n <CodeBlock\n code={JSON.stringify(input, null, 2)}\n language=\"json\"\n collapsed\n >\n <CodeBlockCopyButton />\n <CodeBlockDownloadButton fileName=\"tool-parameters.json\" />\n <CodeBlockCollapseButton />\n </CodeBlock>\n </div>\n </div>\n )\n);\nToolInput.displayName = 'ToolInput';\n\ntype ToolOutputProps = ComponentProps<'div'> & {\n output: ToolUIPart['output'];\n errorText: ToolUIPart['errorText'];\n};\n\nconst ToolOutput: ForwardRefExoticComponent<\n Omit<ToolOutputProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<HTMLDivElement, ToolOutputProps>(\n ({ className, output, errorText, ...props }, ref) => {\n if ((output === null || output === undefined) && !errorText) {\n return null;\n }\n\n let outputElement: ReactNode = null;\n if (typeof output === 'string') {\n outputElement = (\n <CodeBlock\n code={output}\n language={(isJsonString(output) ? 'json' : 'text') as CodeLanguage}\n collapsed\n >\n <CodeBlockCopyButton />\n <CodeBlockDownloadButton fileName=\"tool-result.json\" />\n <CodeBlockCollapseButton />\n </CodeBlock>\n );\n } else if (output === null || output === undefined) {\n outputElement = null;\n } else if (typeof output === 'object') {\n outputElement = (\n <CodeBlock\n code={JSON.stringify(output, null, 2)}\n language=\"json\"\n collapsed\n >\n <CodeBlockCopyButton />\n <CodeBlockDownloadButton fileName=\"tool-result.json\" />\n <CodeBlockCollapseButton />\n </CodeBlock>\n );\n } else if (\n typeof output === 'number' ||\n typeof output === 'boolean' ||\n typeof output === 'bigint'\n ) {\n outputElement = (\n <CodeBlock code={String(output)} language=\"json\" collapsed>\n <CodeBlockCopyButton />\n <CodeBlockDownloadButton fileName=\"tool-result.json\" />\n <CodeBlockCollapseButton />\n </CodeBlock>\n );\n }\n\n if (errorText) {\n return (\n <div\n ref={ref}\n data-slot=\"tool-output\"\n className={cn('space-y-2 px-3.25', className)}\n {...props}\n >\n <div className=\"flex flex-col gap-2 text-sm\">\n <span className=\"font-medium text-critical-foreground-strong\">\n ERROR\n </span>\n <span className=\"text-base-foreground\">{errorText}</span>\n </div>\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n data-slot=\"tool-output\"\n className={cn('space-y-2 px-3.25', className)}\n {...props}\n >\n <h4 className=\"text-sm font-medium uppercase tracking-wide text-muted-foreground\">\n Result\n </h4>\n <div className=\"min-h-0 overflow-x-auto rounded-md bg-muted-background/50 text-xs text-base-foreground [&_table]:w-full\">\n {outputElement}\n </div>\n </div>\n );\n }\n);\nToolOutput.displayName = 'ToolOutput';\n\nexport { Tool, ToolHeader, ToolContent, ToolInput, ToolOutput };\n"],"names":["forwardRef","IconSelector","cn","isJsonString","Badge","Button","CodeBlock","CodeBlockCollapseButton","CodeBlockCopyButton","CodeBlockDownloadButton","Collapsible","CollapsibleContent","CollapsibleTrigger","Tool","className","props","ref","data-slot","displayName","ToolHeader","title","type","hasError","render","variant","span","substring","indexOf","div","outline","ToolContent","ToolInput","input","h4","code","JSON","stringify","language","collapsed","fileName","ToolOutput","output","errorText","undefined","outputElement","String"],"mappings":";AAOA,SAASA,UAAU,QAAQ,QAAQ;AAMnC,SAASC,YAAY,QAAQ,sBAAsB;AAInD,SAASC,EAAE,EAAEC,YAAY,QAAQ,2BAAwB;AACzD,SAASC,KAAK,QAAQ,oBAAiB;AACvC,SAASC,MAAM,QAAQ,sBAAmB;AAC1C,SACEC,SAAS,EACTC,uBAAuB,EACvBC,mBAAmB,EACnBC,uBAAuB,QAClB,8BAA2B;AAClC,SACEC,WAAW,EACXC,kBAAkB,EAClBC,kBAAkB,QACb,gCAA6B;AAIpC,MAAMC,qBAEFb,WACF,CAAC,EAAEc,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBACxB,KAACN;QACC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;;AAIT;AAEFJ,WAAWtB,WAAW,GAAG;AAEzB,SAASL,IAAI,EAAEM,UAAU,EAAEW,WAAW,EAAEC,SAAS,EAAES,UAAU,GAAG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ComponentProps, type ForwardRefExoticComponent, type ReactNode, type RefAttributes } from "react";
|
|
2
|
+
import type { ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSeparatorProps } from "@base-ui/react/toolbar";
|
|
3
|
+
import { Toolbar as ToolbarPrimitive } from "@base-ui/react/toolbar";
|
|
4
|
+
import { type VariantProps } from "class-variance-authority";
|
|
5
|
+
import type { ClassProp } from "class-variance-authority/types";
|
|
6
|
+
import { buttonVariants } from "../button/button";
|
|
7
|
+
import { segmentedControlButtonVariants, segmentedControlListVariants } from "../segmented-control/segmented-control";
|
|
8
|
+
interface ToolbarVariantProps {
|
|
9
|
+
floating?: boolean | null;
|
|
10
|
+
}
|
|
11
|
+
declare const toolbarVariants: (props?: (ToolbarVariantProps & ClassProp) | undefined) => string;
|
|
12
|
+
declare const Toolbar: ForwardRefExoticComponent<Omit<ToolbarRootProps & ToolbarVariantProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const ToolbarButton: ForwardRefExoticComponent<Omit<ToolbarButtonProps & VariantProps<typeof buttonVariants>, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const ToolbarSeparator: ForwardRefExoticComponent<Omit<ToolbarSeparatorProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const ToolbarGroup: ForwardRefExoticComponent<Omit<ToolbarGroupProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
16
|
+
type ToolbarTitleProps = ComponentProps<"span"> & {
|
|
17
|
+
badge?: ReactNode;
|
|
18
|
+
dropdown?: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare function ToolbarTitle({ className, children, badge, dropdown, ...props }: ToolbarTitleProps): ReactNode;
|
|
21
|
+
type ToolbarSegmentedControlProps = Omit<ToolbarPrimitive.Group.Props, "onChange"> & VariantProps<typeof segmentedControlListVariants> & {
|
|
22
|
+
value?: string;
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
onValueChange?: (value: string) => void;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* A single-select segmented control that participates in the Toolbar roving
|
|
28
|
+
* tabindex as real toolbar items (so arrow keys traverse it and the toolbar
|
|
29
|
+
* remains a single tab stop), while reusing SegmentedControl's styling and
|
|
30
|
+
* sliding indicator.
|
|
31
|
+
*/
|
|
32
|
+
declare function ToolbarSegmentedControl({ className, size, value, defaultValue, onValueChange, children, ...props }: ToolbarSegmentedControlProps): ReactNode;
|
|
33
|
+
type ToolbarSegmentedControlButtonProps = ComponentProps<typeof ToolbarPrimitive.Button> & VariantProps<typeof segmentedControlButtonVariants> & {
|
|
34
|
+
value: string;
|
|
35
|
+
};
|
|
36
|
+
declare function ToolbarSegmentedControlButton({ className, size, tabContent, value, onClick, children, ...props }: ToolbarSegmentedControlButtonProps): ReactNode;
|
|
37
|
+
export { Toolbar, ToolbarButton, ToolbarGroup, ToolbarSegmentedControl, ToolbarSegmentedControlButton, ToolbarSeparator, ToolbarTitle, toolbarVariants };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { Toolbar as ToolbarPrimitive } from "@base-ui/react/toolbar";
|
|
4
|
+
import { IconChevronDown } from "@tabler/icons-react";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { cn } from "../../../../lib/utils.js";
|
|
7
|
+
import { buttonVariants } from "../button/button.js";
|
|
8
|
+
import { SegmentedControlIndicator, segmentedControlButtonVariants, segmentedControlListVariants } from "../segmented-control/segmented-control.js";
|
|
9
|
+
const toolbarVariants = cva('flex items-center justify-start data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col data-[orientation=horizontal]:gap-1.5 data-[orientation=vertical]:gap-1', {
|
|
10
|
+
variants: {
|
|
11
|
+
floating: {
|
|
12
|
+
true: 'rounded-xl border bg-popover-background shadow-sm data-[orientation=horizontal]:p-1.5 data-[orientation=vertical]:p-1',
|
|
13
|
+
false: ''
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
floating: true
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const Toolbar = /*#__PURE__*/ forwardRef(({ orientation, floating, className, ...props }, ref)=>{
|
|
21
|
+
return /*#__PURE__*/ _jsx(ToolbarPrimitive.Root, {
|
|
22
|
+
ref: ref,
|
|
23
|
+
"data-slot": "toolbar",
|
|
24
|
+
className: cn(toolbarVariants({
|
|
25
|
+
floating,
|
|
26
|
+
className
|
|
27
|
+
})),
|
|
28
|
+
orientation: orientation,
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const ToolbarButton = /*#__PURE__*/ forwardRef(({ className, variant = 'ghost', size, render, ...props }, ref)=>{
|
|
33
|
+
return /*#__PURE__*/ _jsx(ToolbarPrimitive.Button, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
"data-slot": "toolbar-button",
|
|
36
|
+
className: cn(buttonVariants({
|
|
37
|
+
variant,
|
|
38
|
+
size,
|
|
39
|
+
className
|
|
40
|
+
})),
|
|
41
|
+
render: render,
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
const ToolbarSeparator = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
46
|
+
return /*#__PURE__*/ _jsx(ToolbarPrimitive.Separator, {
|
|
47
|
+
ref: ref,
|
|
48
|
+
"data-slot": "toolbar-separator",
|
|
49
|
+
className: cn('bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-4 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-px', className),
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
const ToolbarGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
54
|
+
return /*#__PURE__*/ _jsx(ToolbarPrimitive.Group, {
|
|
55
|
+
ref: ref,
|
|
56
|
+
"data-slot": "toolbar-group",
|
|
57
|
+
className: cn('flex items-center gap-1', className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
function ToolbarTitle({ className, children, badge, dropdown = false, ...props }) {
|
|
62
|
+
return /*#__PURE__*/ _jsxs("span", {
|
|
63
|
+
"data-slot": "toolbar-title",
|
|
64
|
+
className: cn('inline-flex h-9 items-center gap-2 text-sm font-medium text-foreground whitespace-nowrap px-2 [[data-slot=toolbar-button]_&]:px-0', className),
|
|
65
|
+
...props,
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
68
|
+
"data-slot": "toolbar-title-content",
|
|
69
|
+
className: "inline-flex items-center gap-2",
|
|
70
|
+
children: [
|
|
71
|
+
children,
|
|
72
|
+
badge
|
|
73
|
+
]
|
|
74
|
+
}),
|
|
75
|
+
dropdown ? /*#__PURE__*/ _jsx(IconChevronDown, {
|
|
76
|
+
className: "size-4 shrink-0 text-muted-foreground"
|
|
77
|
+
}) : null
|
|
78
|
+
]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
const ToolbarSegmentedControlContext = /*#__PURE__*/ createContext(null);
|
|
82
|
+
function useToolbarSegmentedControlContext() {
|
|
83
|
+
const context = useContext(ToolbarSegmentedControlContext);
|
|
84
|
+
if (!context) {
|
|
85
|
+
throw new Error('ToolbarSegmentedControlButton must be used within a ToolbarSegmentedControl');
|
|
86
|
+
}
|
|
87
|
+
return context;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A single-select segmented control that participates in the Toolbar roving
|
|
91
|
+
* tabindex as real toolbar items (so arrow keys traverse it and the toolbar
|
|
92
|
+
* remains a single tab stop), while reusing SegmentedControl's styling and
|
|
93
|
+
* sliding indicator.
|
|
94
|
+
*/ function ToolbarSegmentedControl({ className, size, value, defaultValue, onValueChange, children, ...props }) {
|
|
95
|
+
const resolvedSize = size ?? 'default';
|
|
96
|
+
const isControlled = value !== undefined;
|
|
97
|
+
const [internalValue, setInternalValue] = useState(defaultValue);
|
|
98
|
+
const currentValue = isControlled ? value : internalValue;
|
|
99
|
+
const onValueChangeRef = useRef(onValueChange);
|
|
100
|
+
useEffect(()=>{
|
|
101
|
+
onValueChangeRef.current = onValueChange;
|
|
102
|
+
}, [
|
|
103
|
+
onValueChange
|
|
104
|
+
]);
|
|
105
|
+
const setValue = useCallback((next)=>{
|
|
106
|
+
if (!isControlled) {
|
|
107
|
+
setInternalValue(next);
|
|
108
|
+
}
|
|
109
|
+
onValueChangeRef.current?.(next);
|
|
110
|
+
}, [
|
|
111
|
+
isControlled
|
|
112
|
+
]);
|
|
113
|
+
// useMemo required by @eslint-react/no-unstable-context-value — without it
|
|
114
|
+
// a new object is created every render, causing unnecessary re-renders in
|
|
115
|
+
// all context consumers.
|
|
116
|
+
const contextValue = useMemo(()=>({
|
|
117
|
+
value: currentValue,
|
|
118
|
+
setValue,
|
|
119
|
+
size: resolvedSize
|
|
120
|
+
}), [
|
|
121
|
+
currentValue,
|
|
122
|
+
setValue,
|
|
123
|
+
resolvedSize
|
|
124
|
+
]);
|
|
125
|
+
return /*#__PURE__*/ _jsx(ToolbarSegmentedControlContext.Provider, {
|
|
126
|
+
value: contextValue,
|
|
127
|
+
children: /*#__PURE__*/ _jsxs(ToolbarPrimitive.Group, {
|
|
128
|
+
"data-slot": "toolbar-segmented-control",
|
|
129
|
+
className: cn(segmentedControlListVariants({
|
|
130
|
+
size
|
|
131
|
+
}), className),
|
|
132
|
+
...props,
|
|
133
|
+
children: [
|
|
134
|
+
/*#__PURE__*/ _jsx(SegmentedControlIndicator, {
|
|
135
|
+
size: resolvedSize,
|
|
136
|
+
activeSelector: "[data-active]"
|
|
137
|
+
}),
|
|
138
|
+
children
|
|
139
|
+
]
|
|
140
|
+
})
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function ToolbarSegmentedControlButton({ className, size, tabContent, value, onClick, children, ...props }) {
|
|
144
|
+
const context = useToolbarSegmentedControlContext();
|
|
145
|
+
const resolvedSize = size ?? context.size;
|
|
146
|
+
const isActive = context.value === value;
|
|
147
|
+
return /*#__PURE__*/ _jsx(ToolbarPrimitive.Button, {
|
|
148
|
+
"data-slot": "toolbar-segmented-control-trigger",
|
|
149
|
+
"aria-pressed": isActive,
|
|
150
|
+
"data-active": isActive ? '' : undefined,
|
|
151
|
+
className: cn(segmentedControlButtonVariants({
|
|
152
|
+
size: resolvedSize,
|
|
153
|
+
tabContent
|
|
154
|
+
}), className),
|
|
155
|
+
onClick: (event)=>{
|
|
156
|
+
onClick?.(event);
|
|
157
|
+
if (!event.defaultPrevented) {
|
|
158
|
+
context.setValue(value);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
...props,
|
|
162
|
+
children: children
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
Toolbar.displayName = 'Toolbar';
|
|
166
|
+
ToolbarButton.displayName = 'ToolbarButton';
|
|
167
|
+
ToolbarSeparator.displayName = 'ToolbarSeparator';
|
|
168
|
+
ToolbarGroup.displayName = 'ToolbarGroup';
|
|
169
|
+
export { Toolbar, ToolbarButton, ToolbarGroup, ToolbarSegmentedControl, ToolbarSegmentedControlButton, ToolbarSeparator, ToolbarTitle, toolbarVariants };
|
|
170
|
+
|
|
171
|
+
//# sourceMappingURL=toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/toolbar/toolbar.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type ComponentRef,\n type Context,\n type ForwardRefExoticComponent,\n type ReactNode,\n type RefAttributes,\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport type {\n ToolbarButtonProps,\n ToolbarGroupProps,\n ToolbarRootProps,\n ToolbarSeparatorProps,\n} from '@base-ui/react/toolbar';\nimport { Toolbar as ToolbarPrimitive } from '@base-ui/react/toolbar';\nimport { IconChevronDown } 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 { buttonVariants } from '../button/button';\nimport {\n type SegmentedControlSize,\n SegmentedControlIndicator,\n segmentedControlButtonVariants,\n segmentedControlListVariants,\n} from '../segmented-control/segmented-control';\n\ninterface ToolbarVariantProps {\n floating?: boolean | null;\n}\n\nconst toolbarVariants: (\n props?: (ToolbarVariantProps & ClassProp) | undefined\n) => string = cva(\n 'flex items-center justify-start data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col data-[orientation=horizontal]:gap-1.5 data-[orientation=vertical]:gap-1',\n {\n variants: {\n floating: {\n true: 'rounded-xl border bg-popover-background shadow-sm data-[orientation=horizontal]:p-1.5 data-[orientation=vertical]:p-1',\n false: '',\n },\n },\n defaultVariants: {\n floating: true,\n },\n }\n);\n\ntype ToolbarProps = ToolbarPrimitive.Root.Props & ToolbarVariantProps;\n\nconst Toolbar: ForwardRefExoticComponent<\n Omit<ToolbarRootProps & ToolbarVariantProps, 'ref'> &\n RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<typeof ToolbarPrimitive.Root>, ToolbarProps>(\n ({ orientation, floating, className, ...props }, ref) => {\n return (\n <ToolbarPrimitive.Root\n ref={ref}\n data-slot=\"toolbar\"\n className={cn(toolbarVariants({ floating, className }))}\n orientation={orientation}\n {...props}\n />\n );\n }\n);\n\nconst ToolbarButton: ForwardRefExoticComponent<\n Omit<ToolbarButtonProps & VariantProps<typeof buttonVariants>, 'ref'> &\n RefAttributes<HTMLButtonElement>\n> = forwardRef<\n ComponentRef<typeof ToolbarPrimitive.Button>,\n ToolbarPrimitive.Button.Props & VariantProps<typeof buttonVariants>\n>(({ className, variant = 'ghost', size, render, ...props }, ref) => {\n return (\n <ToolbarPrimitive.Button\n ref={ref}\n data-slot=\"toolbar-button\"\n className={cn(buttonVariants({ variant, size, className }))}\n render={render}\n {...props}\n />\n );\n});\n\nconst ToolbarSeparator: ForwardRefExoticComponent<\n Omit<ToolbarSeparatorProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof ToolbarPrimitive.Separator>,\n ToolbarPrimitive.Separator.Props\n>(({ className, ...props }, ref) => {\n return (\n <ToolbarPrimitive.Separator\n ref={ref}\n data-slot=\"toolbar-separator\"\n className={cn(\n 'bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-4 data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n );\n});\n\nconst ToolbarGroup: ForwardRefExoticComponent<\n Omit<ToolbarGroupProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof ToolbarPrimitive.Group>,\n ToolbarPrimitive.Group.Props\n>(({ className, ...props }, ref) => {\n return (\n <ToolbarPrimitive.Group\n ref={ref}\n data-slot=\"toolbar-group\"\n className={cn('flex items-center gap-1', className)}\n {...props}\n />\n );\n});\n\ntype ToolbarTitleProps = ComponentProps<'span'> & {\n badge?: ReactNode;\n dropdown?: boolean;\n};\n\nfunction ToolbarTitle({\n className,\n children,\n badge,\n dropdown = false,\n ...props\n}: ToolbarTitleProps): ReactNode {\n return (\n <span\n data-slot=\"toolbar-title\"\n className={cn(\n 'inline-flex h-9 items-center gap-2 text-sm font-medium text-foreground whitespace-nowrap px-2 [[data-slot=toolbar-button]_&]:px-0',\n className\n )}\n {...props}\n >\n <span\n data-slot=\"toolbar-title-content\"\n className=\"inline-flex items-center gap-2\"\n >\n {children}\n {badge}\n </span>\n {dropdown ? (\n <IconChevronDown className=\"size-4 shrink-0 text-muted-foreground\" />\n ) : null}\n </span>\n );\n}\n\ninterface ToolbarSegmentedControlContextValue {\n value: string | undefined;\n setValue: (value: string) => void;\n size: SegmentedControlSize;\n}\n\nconst ToolbarSegmentedControlContext: Context<ToolbarSegmentedControlContextValue | null> =\n createContext<ToolbarSegmentedControlContextValue | null>(null);\n\nfunction useToolbarSegmentedControlContext(): ToolbarSegmentedControlContextValue {\n const context = useContext(ToolbarSegmentedControlContext);\n if (!context) {\n throw new Error(\n 'ToolbarSegmentedControlButton must be used within a ToolbarSegmentedControl'\n );\n }\n return context;\n}\n\ntype ToolbarSegmentedControlProps = Omit<\n ToolbarPrimitive.Group.Props,\n 'onChange'\n> &\n VariantProps<typeof segmentedControlListVariants> & {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n };\n\n/**\n * A single-select segmented control that participates in the Toolbar roving\n * tabindex as real toolbar items (so arrow keys traverse it and the toolbar\n * remains a single tab stop), while reusing SegmentedControl's styling and\n * sliding indicator.\n */\nfunction ToolbarSegmentedControl({\n className,\n size,\n value,\n defaultValue,\n onValueChange,\n children,\n ...props\n}: ToolbarSegmentedControlProps): ReactNode {\n const resolvedSize = size ?? 'default';\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState(defaultValue);\n const currentValue = isControlled ? value : internalValue;\n\n const onValueChangeRef = useRef(onValueChange);\n useEffect(() => {\n onValueChangeRef.current = onValueChange;\n }, [onValueChange]);\n\n const setValue = useCallback(\n (next: string): void => {\n if (!isControlled) {\n setInternalValue(next);\n }\n onValueChangeRef.current?.(next);\n },\n [isControlled]\n );\n\n // useMemo required by @eslint-react/no-unstable-context-value — without it\n // a new object is created every render, causing unnecessary re-renders in\n // all context consumers.\n const contextValue = useMemo<ToolbarSegmentedControlContextValue>(\n () => ({ value: currentValue, setValue, size: resolvedSize }),\n [currentValue, setValue, resolvedSize]\n );\n\n return (\n <ToolbarSegmentedControlContext.Provider value={contextValue}>\n <ToolbarPrimitive.Group\n data-slot=\"toolbar-segmented-control\"\n className={cn(segmentedControlListVariants({ size }), className)}\n {...props}\n >\n <SegmentedControlIndicator\n size={resolvedSize}\n activeSelector=\"[data-active]\"\n />\n {children}\n </ToolbarPrimitive.Group>\n </ToolbarSegmentedControlContext.Provider>\n );\n}\n\ntype ToolbarSegmentedControlButtonProps = ComponentProps<\n typeof ToolbarPrimitive.Button\n> &\n VariantProps<typeof segmentedControlButtonVariants> & {\n value: string;\n };\n\nfunction ToolbarSegmentedControlButton({\n className,\n size,\n tabContent,\n value,\n onClick,\n children,\n ...props\n}: ToolbarSegmentedControlButtonProps): ReactNode {\n const context = useToolbarSegmentedControlContext();\n const resolvedSize = size ?? context.size;\n const isActive = context.value === value;\n\n return (\n <ToolbarPrimitive.Button\n data-slot=\"toolbar-segmented-control-trigger\"\n aria-pressed={isActive}\n data-active={isActive ? '' : undefined}\n className={cn(\n segmentedControlButtonVariants({ size: resolvedSize, tabContent }),\n className\n )}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) {\n context.setValue(value);\n }\n }}\n {...props}\n >\n {children}\n </ToolbarPrimitive.Button>\n );\n}\n\nToolbar.displayName = 'Toolbar';\nToolbarButton.displayName = 'ToolbarButton';\nToolbarSeparator.displayName = 'ToolbarSeparator';\nToolbarGroup.displayName = 'ToolbarGroup';\n\nexport {\n Toolbar,\n ToolbarButton,\n ToolbarGroup,\n ToolbarSegmentedControl,\n ToolbarSegmentedControlButton,\n ToolbarSeparator,\n ToolbarTitle,\n toolbarVariants,\n};\n"],"names":["createContext","forwardRef","useCallback","useContext","useEffect","useMemo","useRef","useState","Toolbar","ToolbarPrimitive","IconChevronDown","cva","cn","buttonVariants","SegmentedControlIndicator","segmentedControlButtonVariants","segmentedControlListVariants","toolbarVariants","variants","floating","true","false","defaultVariants","orientation","className","props","ref","Root","data-slot","ToolbarButton","variant","size","render","Button","ToolbarSeparator","Separator","ToolbarGroup","Group","ToolbarTitle","children","badge","dropdown","span","ToolbarSegmentedControlContext","useToolbarSegmentedControlContext","context","Error","ToolbarSegmentedControl","value","defaultValue","onValueChange","resolvedSize","isControlled","undefined","internalValue","setInternalValue","currentValue","onValueChangeRef","current","setValue","next","contextValue","Provider","activeSelector","ToolbarSegmentedControlButton","tabContent","onClick","isActive","aria-pressed","data-active","event","defaultPrevented","displayName"],"mappings":";AAAA,SAOEA,aAAa,EACbC,UAAU,EACVC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,QAAQ;AAQf,SAASC,WAAWC,gBAAgB,QAAQ,yBAAyB;AACrE,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAA4BC,GAAG,QAAQ,2BAA2B;AAGlE,SAASC,EAAE,QAAQ,2BAAwB;AAC3C,SAASC,cAAc,QAAQ,sBAAmB;AAClD,SAEEC,yBAAyB,EACzBC,8BAA8B,EAC9BC,4BAA4B,QACvB,4CAAyC;AAMhD,MAAMC,kBAEQN,IACZ,uLACA;IACEO,UAAU;QACRC,UAAU;YACRC,MAAM;YACNC,OAAO;QACT;IACF;IACAC,iBAAiB;QACfH,UAAU;IACZ;AACF;AAKF,MAAMX,wBAGFP,WACF,CAAC,EAAEsB,WAAW,EAAEJ,QAAQ,EAAEK,SAAS,EAAE,GAAGC,OAAO,EAAEC;IAC/C,qBACE,KAACjB,iBAAiBkB,IAAI;QACpBD,KAAKA;QACLE,aAAU;QACVJ,WAAWZ,GAAGK,gBAAgB;YAAEE;YAAUK;QAAU;QACpDD,aAAaA;QACZ,GAAGE,KAAK;;AAGf;AAGF,MAAMI,8BAGF5B,WAGF,CAAC,EAAEuB,SAAS,EAAEM,UAAU,OAAO,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGP,OAAO,EAAEC;IAC3D,qBACE,KAACjB,iBAAiBwB,MAAM;QACtBP,KAAKA;QACLE,aAAU;QACVJ,WAAWZ,GAAGC,eAAe;YAAEiB;YAASC;YAAMP;QAAU;QACxDQ,QAAQA;QACP,GAAGP,KAAK;;AAGf;AAEA,MA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