@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,183 +1,267 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable @eslint-react/dom/no-dangerously-set-innerhtml */ import { createContext, forwardRef, useContext, useEffect, useMemo, useState } from "react";
|
|
3
|
+
import { IconCheck, IconCopy, IconDownload, IconSelector } from "@tabler/icons-react";
|
|
4
|
+
import { highlightCode } from "../../../../lib/highlight-code.js";
|
|
5
|
+
import { cn, isStorybookTestEnv } from "../../../../lib/utils.js";
|
|
6
|
+
import { Button } from "../button/button.js";
|
|
7
|
+
const CodeBlockContext = /*#__PURE__*/ createContext({
|
|
8
|
+
code: '',
|
|
9
|
+
copyText: '',
|
|
10
|
+
isCollapsed: false,
|
|
11
|
+
setIsCollapsed: ()=>undefined,
|
|
12
|
+
lineCount: 0
|
|
13
|
+
});
|
|
14
|
+
const escapeHtml = (value)=>value.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"').replaceAll("'", ''');
|
|
15
|
+
/** Collapsed "large" preview: only this much is committed to the DOM (plain text, no Shiki spans). */ const PREVIEW_MAX_LINES = 14;
|
|
16
|
+
const PREVIEW_MAX_CHARS = 8_000;
|
|
17
|
+
/** Beyond this size we do not run Shiki in expanded mode (plain <pre> only). */ const MAX_LINES_FULL_SHIKI = 400;
|
|
18
|
+
const MAX_CHARS_FULL_SHIKI = 16_384;
|
|
19
|
+
const CODE_BLOCK_COLLAPSIBLE_MIN_LINES = 1;
|
|
20
|
+
export function getCollapsedPreviewDisplay(code) {
|
|
21
|
+
const lines = code.split('\n');
|
|
22
|
+
let truncated = false;
|
|
23
|
+
let slice = lines.slice(0, PREVIEW_MAX_LINES).join('\n');
|
|
24
|
+
if (lines.length > PREVIEW_MAX_LINES) {
|
|
25
|
+
truncated = true;
|
|
26
|
+
}
|
|
27
|
+
if (slice.length > PREVIEW_MAX_CHARS) {
|
|
28
|
+
slice = slice.slice(0, PREVIEW_MAX_CHARS);
|
|
29
|
+
truncated = true;
|
|
30
|
+
}
|
|
31
|
+
const body = slice.length === 0 ? ' ' : slice;
|
|
32
|
+
return truncated ? `${body}\n…` : body;
|
|
20
33
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
34
|
+
export function isContentLargerThanPreview(code) {
|
|
35
|
+
return code.split('\n').length > PREVIEW_MAX_LINES || code.length > PREVIEW_MAX_CHARS;
|
|
23
36
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
37
|
+
export function shouldUsePlainTextInsteadOfShiki(code, lineCount) {
|
|
38
|
+
return lineCount > MAX_LINES_FULL_SHIKI || code.length > MAX_CHARS_FULL_SHIKI;
|
|
26
39
|
}
|
|
27
|
-
function
|
|
28
|
-
|
|
40
|
+
export function plainPreMarkup(code) {
|
|
41
|
+
return `<pre><code>${escapeHtml(code)}</code></pre>`;
|
|
29
42
|
}
|
|
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
|
-
|
|
43
|
+
const CODE_BLOCK_EXPANDED_MAX_HEIGHT_CSS = 'min(60vh, 32rem)';
|
|
44
|
+
const codeHtmlInnerClassName = 'dark:hidden [&>pre]:m-0 [&>pre]:min-h-10 [&>pre]:bg-card-background [&>pre]:p-2 [&>pre]:text-medium-foreground [&>pre]:leading-[18px] [&>pre]:tracking-[-0.08px] [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm [&>pre]:overflow-x-auto';
|
|
45
|
+
const codeHtmlInnerDarkClassName = 'hidden dark:block [&>pre]:m-0 [&>pre]:min-h-10 [&>pre]:bg-card-background [&>pre]:p-2 [&>pre]:text-medium-foreground [&>pre]:leading-[18px] [&>pre]:tracking-[-0.08px] [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm [&>pre]:overflow-x-auto';
|
|
46
|
+
const CodeBlock = /*#__PURE__*/ forwardRef(({ code, copyText, language, showLineNumbers = false, collapsed = false, className, children, style: styleFromProps, ...props }, ref)=>{
|
|
47
|
+
const [html, setHtml] = useState('');
|
|
48
|
+
const [darkHtml, setDarkHtml] = useState('');
|
|
49
|
+
const [isCollapsed, setIsCollapsed] = useState(collapsed);
|
|
50
|
+
const codeForRender = code.length === 0 ? ' ' : code;
|
|
51
|
+
const lineCount = code.split('\n').length;
|
|
52
|
+
const isCollapsible = lineCount > CODE_BLOCK_COLLAPSIBLE_MIN_LINES;
|
|
53
|
+
const showCollapsedChrome = isCollapsed && isCollapsible;
|
|
54
|
+
const textToCopy = copyText ?? code;
|
|
55
|
+
const storybookMarkup = useMemo(()=>isStorybookTestEnv ? `<pre><code>${escapeHtml(codeForRender)}</code></pre>` : '', [
|
|
56
|
+
codeForRender
|
|
57
|
+
]);
|
|
58
|
+
useEffect(()=>{
|
|
59
|
+
if (isStorybookTestEnv) return;
|
|
60
|
+
let isCancelled = false;
|
|
61
|
+
const applyPlain = (source)=>{
|
|
62
|
+
if (!isCancelled) {
|
|
63
|
+
const markup = plainPreMarkup(source);
|
|
64
|
+
setHtml(markup);
|
|
65
|
+
setDarkHtml(markup);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
// Collapsed + large: Shiki only on the truncated preview source (not the full blob).
|
|
69
|
+
if (isCollapsed && isContentLargerThanPreview(codeForRender)) {
|
|
70
|
+
const previewSource = getCollapsedPreviewDisplay(codeForRender);
|
|
71
|
+
highlightCode(previewSource, language, showLineNumbers).then(([light, dark])=>{
|
|
72
|
+
if (!isCancelled) {
|
|
73
|
+
setHtml(light);
|
|
74
|
+
setDarkHtml(dark);
|
|
75
|
+
}
|
|
76
|
+
}).catch((error)=>{
|
|
77
|
+
console.error('Failed to highlight code:', error);
|
|
78
|
+
applyPlain(previewSource);
|
|
79
|
+
});
|
|
80
|
+
return ()=>{
|
|
81
|
+
isCancelled = true;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
// Expanded + very large: full plain text (no tokenized spans).
|
|
85
|
+
if (!isCollapsed && shouldUsePlainTextInsteadOfShiki(codeForRender, lineCount)) {
|
|
86
|
+
queueMicrotask(()=>{
|
|
87
|
+
applyPlain(codeForRender);
|
|
88
|
+
});
|
|
89
|
+
return ()=>{
|
|
90
|
+
isCancelled = true;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
highlightCode(codeForRender, language, showLineNumbers).then(([light, dark])=>{
|
|
94
|
+
if (!isCancelled) {
|
|
95
|
+
setHtml(light);
|
|
96
|
+
setDarkHtml(dark);
|
|
97
|
+
}
|
|
98
|
+
}).catch((error)=>{
|
|
99
|
+
console.error('Failed to highlight code:', error);
|
|
100
|
+
applyPlain(codeForRender);
|
|
101
|
+
});
|
|
102
|
+
return ()=>{
|
|
103
|
+
isCancelled = true;
|
|
104
|
+
};
|
|
105
|
+
}, [
|
|
106
|
+
codeForRender,
|
|
107
|
+
language,
|
|
108
|
+
showLineNumbers,
|
|
109
|
+
isCollapsed,
|
|
110
|
+
lineCount
|
|
111
|
+
]);
|
|
112
|
+
const contextValue = useMemo(()=>({
|
|
113
|
+
code,
|
|
114
|
+
copyText: textToCopy,
|
|
115
|
+
isCollapsed,
|
|
116
|
+
setIsCollapsed,
|
|
117
|
+
lineCount
|
|
118
|
+
}), [
|
|
119
|
+
code,
|
|
120
|
+
textToCopy,
|
|
121
|
+
isCollapsed,
|
|
122
|
+
lineCount
|
|
123
|
+
]);
|
|
124
|
+
const codeBody = /*#__PURE__*/ _jsxs("div", {
|
|
125
|
+
className: "relative",
|
|
126
|
+
children: [
|
|
127
|
+
/*#__PURE__*/ _jsx("div", {
|
|
128
|
+
className: cn(codeHtmlInnerClassName, showCollapsedChrome && 'max-h-26 overflow-y-hidden'),
|
|
129
|
+
dangerouslySetInnerHTML: {
|
|
130
|
+
__html: isStorybookTestEnv ? storybookMarkup : html
|
|
131
|
+
}
|
|
132
|
+
}),
|
|
133
|
+
/*#__PURE__*/ _jsx("div", {
|
|
134
|
+
className: cn(codeHtmlInnerDarkClassName, showCollapsedChrome && 'max-h-26 overflow-y-hidden'),
|
|
135
|
+
dangerouslySetInnerHTML: {
|
|
136
|
+
__html: isStorybookTestEnv ? storybookMarkup : darkHtml
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
139
|
+
showCollapsedChrome && /*#__PURE__*/ _jsx("div", {
|
|
140
|
+
className: "pointer-events-none absolute bottom-0 left-0 right-0 h-3/4 bg-linear-to-b from-transparent via-card-background/70 to-card-background"
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
});
|
|
144
|
+
const actions = children != null ? /*#__PURE__*/ _jsx("div", {
|
|
145
|
+
"data-slot": "code-block-actions",
|
|
146
|
+
className: cn(/* Sibling of scroll inner: pinned while code scrolls; even inset from top/right (scrollbar gutter on inner) */ 'pointer-events-none absolute top-5 right-5 z-20 flex items-center gap-1 bg-transparent p-0 shadow-none ring-0 outline-none', 'opacity-0 transition-opacity', 'group-hover/code-block:pointer-events-auto group-hover/code-block:opacity-100', 'group-focus-within/code-block:pointer-events-auto group-focus-within/code-block:opacity-100', isStorybookTestEnv && 'pointer-events-auto opacity-100'),
|
|
147
|
+
children: children
|
|
148
|
+
}) : null;
|
|
149
|
+
return /*#__PURE__*/ _jsx(CodeBlockContext.Provider, {
|
|
150
|
+
value: contextValue,
|
|
151
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
152
|
+
ref: ref,
|
|
153
|
+
"data-slot": "code-block",
|
|
154
|
+
className: cn('group/code-block relative w-full rounded-xl bg-card-background text-medium-foreground', showCollapsedChrome ? 'overflow-hidden' : /* Expanded: flex + clip so actions overlay without a reserved top row */ 'flex min-h-0 max-h-[min(60vh,_32rem)] flex-col overflow-hidden', className),
|
|
155
|
+
style: {
|
|
156
|
+
...!showCollapsedChrome ? {
|
|
157
|
+
maxHeight: CODE_BLOCK_EXPANDED_MAX_HEIGHT_CSS,
|
|
158
|
+
minHeight: 0
|
|
159
|
+
} : {},
|
|
160
|
+
...styleFromProps
|
|
161
|
+
},
|
|
162
|
+
...props,
|
|
163
|
+
children: [
|
|
164
|
+
/*#__PURE__*/ _jsx("div", {
|
|
165
|
+
className: cn(/* Match <pre> card tone so transparent actions are not over root bg-background */ 'relative min-h-0 bg-card-background', !showCollapsedChrome && 'min-h-0 flex-1 overflow-x-auto overflow-y-auto [scrollbar-gutter:stable]'),
|
|
166
|
+
children: codeBody
|
|
167
|
+
}),
|
|
168
|
+
actions
|
|
169
|
+
]
|
|
170
|
+
})
|
|
171
|
+
});
|
|
117
172
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
173
|
+
CodeBlock.displayName = 'CodeBlock';
|
|
174
|
+
const CodeBlockCopyButton = /*#__PURE__*/ forwardRef(({ onCopy, onError, timeout = 2000, children, className, ...props }, ref)=>{
|
|
175
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
176
|
+
const { copyText } = useContext(CodeBlockContext);
|
|
177
|
+
const copyToClipboard = async ()=>{
|
|
178
|
+
if (typeof window === 'undefined' || !navigator?.clipboard?.writeText) {
|
|
179
|
+
onError?.(new Error('Clipboard API not available'));
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
try {
|
|
183
|
+
await navigator.clipboard.writeText(copyText);
|
|
184
|
+
setIsCopied(true);
|
|
185
|
+
onCopy?.();
|
|
186
|
+
setTimeout(()=>setIsCopied(false), timeout);
|
|
187
|
+
} catch (error) {
|
|
188
|
+
console.warn('Clipboard write failed:', error);
|
|
189
|
+
onError?.(error instanceof Error ? error : new Error('Clipboard write failed'));
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
const Icon = isCopied ? IconCheck : IconCopy;
|
|
193
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
194
|
+
ref: ref,
|
|
195
|
+
"data-slot": "code-block-copy-button",
|
|
196
|
+
className: cn('shrink-0', className),
|
|
197
|
+
onClick: copyToClipboard,
|
|
198
|
+
size: "icon-sm",
|
|
199
|
+
variant: "secondary",
|
|
200
|
+
...props,
|
|
201
|
+
children: children ?? /*#__PURE__*/ _jsx(Icon, {
|
|
202
|
+
size: 14
|
|
203
|
+
})
|
|
204
|
+
});
|
|
141
205
|
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
206
|
+
CodeBlockCopyButton.displayName = 'CodeBlockCopyButton';
|
|
207
|
+
const CodeBlockCollapseButton = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>{
|
|
208
|
+
const { isCollapsed, setIsCollapsed, lineCount } = useContext(CodeBlockContext);
|
|
209
|
+
if (lineCount <= CODE_BLOCK_COLLAPSIBLE_MIN_LINES) {
|
|
210
|
+
return null;
|
|
211
|
+
}
|
|
212
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
213
|
+
ref: ref,
|
|
214
|
+
"data-slot": "code-block-collapse-button",
|
|
215
|
+
className: cn('shrink-0', className),
|
|
216
|
+
onClick: ()=>setIsCollapsed(!isCollapsed),
|
|
217
|
+
size: "icon-sm",
|
|
218
|
+
variant: "secondary",
|
|
219
|
+
...props,
|
|
220
|
+
children: children ?? /*#__PURE__*/ _jsx(IconSelector, {
|
|
221
|
+
size: 14
|
|
222
|
+
})
|
|
223
|
+
});
|
|
155
224
|
});
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
225
|
+
CodeBlockCollapseButton.displayName = 'CodeBlockCollapseButton';
|
|
226
|
+
const CodeBlockDownloadButton = /*#__PURE__*/ forwardRef(({ fileName = 'code.txt', mimeType = 'text/plain;charset=utf-8', onDownload, onError, children, className, ...props }, ref)=>{
|
|
227
|
+
const { code } = useContext(CodeBlockContext);
|
|
228
|
+
const download = ()=>{
|
|
229
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
230
|
+
onError?.(new Error('Download not available'));
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
try {
|
|
234
|
+
const blob = new Blob([
|
|
235
|
+
code
|
|
236
|
+
], {
|
|
237
|
+
type: mimeType
|
|
238
|
+
});
|
|
239
|
+
const url = URL.createObjectURL(blob);
|
|
240
|
+
const a = document.createElement('a');
|
|
241
|
+
a.href = url;
|
|
242
|
+
a.download = fileName;
|
|
243
|
+
a.rel = 'noopener';
|
|
244
|
+
a.click();
|
|
245
|
+
URL.revokeObjectURL(url);
|
|
246
|
+
onDownload?.();
|
|
247
|
+
} catch (error) {
|
|
248
|
+
onError?.(error instanceof Error ? error : new Error('Download failed'));
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
252
|
+
ref: ref,
|
|
253
|
+
"data-slot": "code-block-download-button",
|
|
254
|
+
className: cn('shrink-0', className),
|
|
255
|
+
onClick: download,
|
|
256
|
+
size: "icon-sm",
|
|
257
|
+
variant: "secondary",
|
|
258
|
+
...props,
|
|
259
|
+
children: children ?? /*#__PURE__*/ _jsx(IconDownload, {
|
|
260
|
+
size: 14
|
|
261
|
+
})
|
|
262
|
+
});
|
|
180
263
|
});
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
264
|
+
CodeBlockDownloadButton.displayName = 'CodeBlockDownloadButton';
|
|
265
|
+
export { CodeBlock, CodeBlockCollapseButton, CodeBlockCopyButton, CodeBlockDownloadButton };
|
|
266
|
+
|
|
267
|
+
//# sourceMappingURL=code-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/code-block/code-block.tsx"],"sourcesContent":["/* eslint-disable @eslint-react/dom/no-dangerously-set-innerhtml */\nimport {\n type ComponentProps,\n type ComponentRef,\n type ForwardRefExoticComponent,\n type HTMLAttributes,\n type RefAttributes,\n createContext,\n forwardRef,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport {\n IconCheck,\n IconCopy,\n IconDownload,\n IconSelector,\n} from '@tabler/icons-react';\n\nimport {\n highlightCode,\n type CodeLanguage,\n} from '../../../../lib/highlight-code';\nimport { cn, isStorybookTestEnv } from '../../../../lib/utils';\nimport { Button } from '../button/button';\n\ntype CodeBlockProps = HTMLAttributes<HTMLDivElement> & {\n code: string;\n copyText?: string;\n collapsed?: boolean;\n language: CodeLanguage;\n showLineNumbers?: boolean;\n};\n\ntype CodeBlockContextType = {\n code: string;\n copyText: string;\n isCollapsed: boolean;\n setIsCollapsed: (collapsed: boolean) => void;\n lineCount: number;\n};\n\nconst CodeBlockContext = createContext<CodeBlockContextType>({\n code: '',\n copyText: '',\n isCollapsed: false,\n setIsCollapsed: () => undefined,\n lineCount: 0,\n});\n\nconst escapeHtml = (value: string): string =>\n value\n .replaceAll('&', '&')\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('\"', '"')\n .replaceAll(\"'\", ''');\n\n/** Collapsed \"large\" preview: only this much is committed to the DOM (plain text, no Shiki spans). */\nconst PREVIEW_MAX_LINES = 14;\nconst PREVIEW_MAX_CHARS = 8_000;\n\n/** Beyond this size we do not run Shiki in expanded mode (plain <pre> only). */\nconst MAX_LINES_FULL_SHIKI = 400;\nconst MAX_CHARS_FULL_SHIKI = 16_384;\n\nconst CODE_BLOCK_COLLAPSIBLE_MIN_LINES = 1;\n\nexport function getCollapsedPreviewDisplay(code: string): string {\n const lines = code.split('\\n');\n let truncated = false;\n let slice = lines.slice(0, PREVIEW_MAX_LINES).join('\\n');\n if (lines.length > PREVIEW_MAX_LINES) {\n truncated = true;\n }\n if (slice.length > PREVIEW_MAX_CHARS) {\n slice = slice.slice(0, PREVIEW_MAX_CHARS);\n truncated = true;\n }\n const body = slice.length === 0 ? ' ' : slice;\n return truncated ? `${body}\\n…` : body;\n}\n\nexport function isContentLargerThanPreview(code: string): boolean {\n return (\n code.split('\\n').length > PREVIEW_MAX_LINES ||\n code.length > PREVIEW_MAX_CHARS\n );\n}\n\nexport function shouldUsePlainTextInsteadOfShiki(\n code: string,\n lineCount: number\n): boolean {\n return lineCount > MAX_LINES_FULL_SHIKI || code.length > MAX_CHARS_FULL_SHIKI;\n}\n\nexport function plainPreMarkup(code: string): string {\n return `<pre><code>${escapeHtml(code)}</code></pre>`;\n}\n\nconst CODE_BLOCK_EXPANDED_MAX_HEIGHT_CSS = 'min(60vh, 32rem)';\n\nconst codeHtmlInnerClassName =\n 'dark:hidden [&>pre]:m-0 [&>pre]:min-h-10 [&>pre]:bg-card-background [&>pre]:p-2 [&>pre]:text-medium-foreground [&>pre]:leading-[18px] [&>pre]:tracking-[-0.08px] [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm [&>pre]:overflow-x-auto';\n\nconst codeHtmlInnerDarkClassName =\n 'hidden dark:block [&>pre]:m-0 [&>pre]:min-h-10 [&>pre]:bg-card-background [&>pre]:p-2 [&>pre]:text-medium-foreground [&>pre]:leading-[18px] [&>pre]:tracking-[-0.08px] [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm [&>pre]:overflow-x-auto';\n\nconst CodeBlock: ForwardRefExoticComponent<\n HTMLAttributes<HTMLDivElement> & {\n code: string;\n copyText?: string;\n collapsed?: boolean;\n language: CodeLanguage;\n showLineNumbers?: boolean;\n } & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, CodeBlockProps>(\n (\n {\n code,\n copyText,\n language,\n showLineNumbers = false,\n collapsed = false,\n className,\n children,\n style: styleFromProps,\n ...props\n },\n ref\n ) => {\n const [html, setHtml] = useState<string>('');\n const [darkHtml, setDarkHtml] = useState<string>('');\n const [isCollapsed, setIsCollapsed] = useState(collapsed);\n\n const codeForRender = code.length === 0 ? ' ' : code;\n const lineCount = code.split('\\n').length;\n const isCollapsible = lineCount > CODE_BLOCK_COLLAPSIBLE_MIN_LINES;\n const showCollapsedChrome = isCollapsed && isCollapsible;\n const textToCopy = copyText ?? code;\n\n const storybookMarkup = useMemo(\n () =>\n isStorybookTestEnv\n ? `<pre><code>${escapeHtml(codeForRender)}</code></pre>`\n : '',\n [codeForRender]\n );\n\n useEffect(() => {\n if (isStorybookTestEnv) return;\n\n let isCancelled = false;\n\n const applyPlain = (source: string) => {\n if (!isCancelled) {\n const markup = plainPreMarkup(source);\n setHtml(markup);\n setDarkHtml(markup);\n }\n };\n\n // Collapsed + large: Shiki only on the truncated preview source (not the full blob).\n if (isCollapsed && isContentLargerThanPreview(codeForRender)) {\n const previewSource = getCollapsedPreviewDisplay(codeForRender);\n highlightCode(previewSource, language, showLineNumbers)\n .then(([light, dark]) => {\n if (!isCancelled) {\n setHtml(light);\n setDarkHtml(dark);\n }\n })\n .catch((error: unknown) => {\n console.error('Failed to highlight code:', error);\n applyPlain(previewSource);\n });\n return () => {\n isCancelled = true;\n };\n }\n\n // Expanded + very large: full plain text (no tokenized spans).\n if (\n !isCollapsed &&\n shouldUsePlainTextInsteadOfShiki(codeForRender, lineCount)\n ) {\n queueMicrotask(() => {\n applyPlain(codeForRender);\n });\n return () => {\n isCancelled = true;\n };\n }\n\n highlightCode(codeForRender, language, showLineNumbers)\n .then(([light, dark]) => {\n if (!isCancelled) {\n setHtml(light);\n setDarkHtml(dark);\n }\n })\n .catch((error: unknown) => {\n console.error('Failed to highlight code:', error);\n applyPlain(codeForRender);\n });\n\n return () => {\n isCancelled = true;\n };\n }, [codeForRender, language, showLineNumbers, isCollapsed, lineCount]);\n\n const contextValue = useMemo(\n () => ({\n code,\n copyText: textToCopy,\n isCollapsed,\n setIsCollapsed,\n lineCount,\n }),\n [code, textToCopy, isCollapsed, lineCount]\n );\n\n const codeBody = (\n <div className=\"relative\">\n <div\n className={cn(\n codeHtmlInnerClassName,\n showCollapsedChrome && 'max-h-26 overflow-y-hidden'\n )}\n dangerouslySetInnerHTML={{\n __html: isStorybookTestEnv ? storybookMarkup : html,\n }}\n />\n <div\n className={cn(\n codeHtmlInnerDarkClassName,\n showCollapsedChrome && 'max-h-26 overflow-y-hidden'\n )}\n dangerouslySetInnerHTML={{\n __html: isStorybookTestEnv ? storybookMarkup : darkHtml,\n }}\n />\n {showCollapsedChrome && (\n <div className=\"pointer-events-none absolute bottom-0 left-0 right-0 h-3/4 bg-linear-to-b from-transparent via-card-background/70 to-card-background\" />\n )}\n </div>\n );\n\n const actions =\n children != null ? (\n <div\n data-slot=\"code-block-actions\"\n className={cn(\n /* Sibling of scroll inner: pinned while code scrolls; even inset from top/right (scrollbar gutter on inner) */\n 'pointer-events-none absolute top-5 right-5 z-20 flex items-center gap-1 bg-transparent p-0 shadow-none ring-0 outline-none',\n 'opacity-0 transition-opacity',\n 'group-hover/code-block:pointer-events-auto group-hover/code-block:opacity-100',\n 'group-focus-within/code-block:pointer-events-auto group-focus-within/code-block:opacity-100',\n isStorybookTestEnv && 'pointer-events-auto opacity-100'\n )}\n >\n {children}\n </div>\n ) : null;\n\n return (\n <CodeBlockContext.Provider value={contextValue}>\n <div\n ref={ref}\n data-slot=\"code-block\"\n className={cn(\n 'group/code-block relative w-full rounded-xl bg-card-background text-medium-foreground',\n showCollapsedChrome\n ? 'overflow-hidden'\n : /* Expanded: flex + clip so actions overlay without a reserved top row */\n 'flex min-h-0 max-h-[min(60vh,_32rem)] flex-col overflow-hidden',\n className\n )}\n style={{\n ...(!showCollapsedChrome\n ? {\n maxHeight: CODE_BLOCK_EXPANDED_MAX_HEIGHT_CSS,\n minHeight: 0,\n }\n : {}),\n ...styleFromProps,\n }}\n {...props}\n >\n <div\n className={cn(\n /* Match <pre> card tone so transparent actions are not over root bg-background */\n 'relative min-h-0 bg-card-background',\n !showCollapsedChrome &&\n 'min-h-0 flex-1 overflow-x-auto overflow-y-auto [scrollbar-gutter:stable]'\n )}\n >\n {codeBody}\n </div>\n {actions}\n </div>\n </CodeBlockContext.Provider>\n );\n }\n);\nCodeBlock.displayName = 'CodeBlock';\n\ntype CodeBlockCopyButtonProps = ComponentProps<typeof Button> & {\n onCopy?: () => void;\n onError?: (error: Error) => void;\n timeout?: number;\n};\n\nconst CodeBlockCopyButton: ForwardRefExoticComponent<\n Omit<CodeBlockCopyButtonProps, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, CodeBlockCopyButtonProps>(\n ({ onCopy, onError, timeout = 2000, children, className, ...props }, ref) => {\n const [isCopied, setIsCopied] = useState(false);\n const { copyText } = useContext(CodeBlockContext);\n\n const copyToClipboard = async () => {\n if (typeof window === 'undefined' || !navigator?.clipboard?.writeText) {\n onError?.(new Error('Clipboard API not available'));\n return;\n }\n\n try {\n await navigator.clipboard.writeText(copyText);\n setIsCopied(true);\n onCopy?.();\n setTimeout(() => setIsCopied(false), timeout);\n } catch (error: unknown) {\n console.warn('Clipboard write failed:', error);\n onError?.(\n error instanceof Error ? error : new Error('Clipboard write failed')\n );\n }\n };\n\n const Icon = isCopied ? IconCheck : IconCopy;\n\n return (\n <Button\n ref={ref}\n data-slot=\"code-block-copy-button\"\n className={cn('shrink-0', className)}\n onClick={copyToClipboard}\n size=\"icon-sm\"\n variant=\"secondary\"\n {...props}\n >\n {children ?? <Icon size={14} />}\n </Button>\n );\n }\n);\nCodeBlockCopyButton.displayName = 'CodeBlockCopyButton';\n\ntype CodeBlockCollapseButtonProps = ComponentProps<typeof Button>;\n\nconst CodeBlockCollapseButton: ForwardRefExoticComponent<\n Omit<ComponentProps<typeof Button>, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, CodeBlockCollapseButtonProps>(\n ({ children, className, ...props }, ref) => {\n const { isCollapsed, setIsCollapsed, lineCount } =\n useContext(CodeBlockContext);\n\n if (lineCount <= CODE_BLOCK_COLLAPSIBLE_MIN_LINES) {\n return null;\n }\n\n return (\n <Button\n ref={ref}\n data-slot=\"code-block-collapse-button\"\n className={cn('shrink-0', className)}\n onClick={() => setIsCollapsed(!isCollapsed)}\n size=\"icon-sm\"\n variant=\"secondary\"\n {...props}\n >\n {children ?? <IconSelector size={14} />}\n </Button>\n );\n }\n);\nCodeBlockCollapseButton.displayName = 'CodeBlockCollapseButton';\n\ntype CodeBlockDownloadButtonProps = ComponentProps<typeof Button> & {\n fileName?: string;\n mimeType?: string;\n onDownload?: () => void;\n onError?: (error: Error) => void;\n};\n\nconst CodeBlockDownloadButton: ForwardRefExoticComponent<\n Omit<CodeBlockDownloadButtonProps, 'ref'> & RefAttributes<HTMLElement>\n> = forwardRef<ComponentRef<typeof Button>, CodeBlockDownloadButtonProps>(\n (\n {\n fileName = 'code.txt',\n mimeType = 'text/plain;charset=utf-8',\n onDownload,\n onError,\n children,\n className,\n ...props\n },\n ref\n ) => {\n const { code } = useContext(CodeBlockContext);\n\n const download = () => {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n onError?.(new Error('Download not available'));\n return;\n }\n\n try {\n const blob = new Blob([code], { type: mimeType });\n const url = URL.createObjectURL(blob);\n\n const a = document.createElement('a');\n a.href = url;\n a.download = fileName;\n a.rel = 'noopener';\n a.click();\n\n URL.revokeObjectURL(url);\n onDownload?.();\n } catch (error: unknown) {\n onError?.(\n error instanceof Error ? error : new Error('Download failed')\n );\n }\n };\n\n return (\n <Button\n ref={ref}\n data-slot=\"code-block-download-button\"\n className={cn('shrink-0', className)}\n onClick={download}\n size=\"icon-sm\"\n variant=\"secondary\"\n {...props}\n >\n {children ?? <IconDownload size={14} />}\n </Button>\n );\n }\n);\nCodeBlockDownloadButton.displayName = 'CodeBlockDownloadButton';\n\nexport {\n CodeBlock,\n CodeBlockCollapseButton,\n CodeBlockCopyButton,\n CodeBlockDownloadButton,\n};\n"],"names":["createContext","forwardRef","useContext","useEffect","useMemo","useState","IconCheck","IconCopy","IconDownload","IconSelector","highlightCode","cn","isStorybookTestEnv","Button","CodeBlockContext","code","copyText","isCollapsed","setIsCollapsed","undefined","lineCount","escapeHtml","value","replaceAll","PREVIEW_MAX_LINES","PREVIEW_MAX_CHARS","MAX_LINES_FULL_SHIKI","MAX_CHARS_FULL_SHIKI","CODE_BLOCK_COLLAPSIBLE_MIN_LINES","getCollapsedPreviewDisplay","lines","split","truncated","slice","join","length","body","isContentLargerThanPreview","shouldUsePlainTextInsteadOfShiki","plainPreMarkup","CODE_BLOCK_EXPANDED_MAX_HEIGHT_CSS","codeHtmlInnerClassName","codeHtmlInnerDarkClassName","CodeBlock","language","showLineNumbers","collapsed","className","children","style","styleFromProps","props","ref","html","setHtml","darkHtml","setDarkHtml","codeForRender","isCollapsible","showCollapsedChrome","textToCopy","storybookMarkup","isCancelled","applyPlain","source","markup","previewSource","then","light","dark","catch","error","console","queueMicrotask","contextValue","codeBody","div","dangerouslySetInnerHTML","__html","actions","data-slot","Provider","maxHeight","minHeight","displayName","CodeBlockCopyButton","onCopy","onError","timeout","isCopied","setIsCopied","copyToClipboard","window","navigator","clipboard","writeText","Error","setTimeout","warn","Icon","onClick","size","variant","CodeBlockCollapseButton","CodeBlockDownloadButton","fileName","mimeType","onDownload","download","document","blob","Blob","type","url","URL","createObjectURL","a","createElement","href","rel","click","revokeObjectURL"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes } from
|
|
2
|
-
import { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from
|
|
3
|
-
declare const Collapsible: ForwardRefExoticComponent<Omit<CollapsibleRootProps,
|
|
4
|
-
declare const CollapsibleTrigger: ForwardRefExoticComponent<Omit<CollapsibleTriggerProps,
|
|
5
|
-
declare const CollapsibleContent: ForwardRefExoticComponent<Omit<CollapsiblePanelProps,
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes } from "react";
|
|
2
|
+
import type { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from "@base-ui/react/collapsible";
|
|
3
|
+
declare const Collapsible: ForwardRefExoticComponent<Omit<CollapsibleRootProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CollapsibleTrigger: ForwardRefExoticComponent<Omit<CollapsibleTriggerProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const CollapsibleContent: ForwardRefExoticComponent<Omit<CollapsiblePanelProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -1,30 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
4
|
+
import { cn, focusRing } from "../../../../lib/utils.js";
|
|
5
|
+
const Collapsible = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
6
|
+
return /*#__PURE__*/ _jsx(CollapsiblePrimitive.Root, {
|
|
7
|
+
ref: ref,
|
|
8
|
+
"data-slot": "collapsible",
|
|
9
|
+
className: cn('w-full min-w-0 rounded-md box-border *:max-w-full', className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
Collapsible.displayName = 'Collapsible';
|
|
14
|
+
const CollapsibleTrigger = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
|
|
15
|
+
return /*#__PURE__*/ _jsx(CollapsiblePrimitive.Trigger, {
|
|
16
|
+
ref: ref,
|
|
17
|
+
"data-slot": "collapsible-trigger",
|
|
18
|
+
className: cn('group/collapsible-trigger flex w-full items-center rounded-lg px-3 py-2 text-sm font-medium leading-5 text-base-foreground overflow-hidden transition-all outline-none', 'hover:bg-base-background-hover hover:text-base-foreground', 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-base-foreground-disabled', 'aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:text-base-foreground-disabled', 'data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:text-base-foreground-disabled', focusRing, className),
|
|
19
|
+
...props,
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
CollapsibleTrigger.displayName = 'CollapsibleTrigger';
|
|
24
|
+
const CollapsibleContent = /*#__PURE__*/ forwardRef(({ className, keepMounted = true, ...props }, ref)=>{
|
|
25
|
+
return /*#__PURE__*/ _jsx(CollapsiblePrimitive.Panel, {
|
|
26
|
+
ref: ref,
|
|
27
|
+
"data-slot": "collapsible-content",
|
|
28
|
+
className: cn('hidden data-open:block border-none outline-none text-muted-foreground text-sm font-normal leading-5 tracking-tight w-full min-w-0 overflow-x-hidden box-border *:max-w-full *:box-border', className),
|
|
29
|
+
keepMounted: keepMounted,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
CollapsibleContent.displayName = 'CollapsibleContent';
|
|
34
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=collapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/collapsible/collapsible.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentRef,\n forwardRef,\n} from 'react';\n\nimport type {\n CollapsiblePanelProps,\n CollapsibleRootProps,\n CollapsibleTriggerProps,\n} from '@base-ui/react/collapsible';\nimport { Collapsible as CollapsiblePrimitive } from '@base-ui/react/collapsible';\n\nimport { cn, focusRing } from '../../../../lib/utils';\n\nconst Collapsible: ForwardRefExoticComponent<\n Omit<CollapsibleRootProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof CollapsiblePrimitive.Root>,\n CollapsiblePrimitive.Root.Props\n>(({ className, ...props }, ref) => {\n return (\n <CollapsiblePrimitive.Root\n ref={ref}\n data-slot=\"collapsible\"\n className={cn(\n 'w-full min-w-0 rounded-md box-border *:max-w-full',\n className\n )}\n {...props}\n />\n );\n});\nCollapsible.displayName = 'Collapsible';\n\nconst CollapsibleTrigger: ForwardRefExoticComponent<\n Omit<CollapsibleTriggerProps, 'ref'> & RefAttributes<HTMLButtonElement>\n> = forwardRef<\n ComponentRef<typeof CollapsiblePrimitive.Trigger>,\n CollapsiblePrimitive.Trigger.Props\n>(({ className, children, ...props }, ref) => {\n return (\n <CollapsiblePrimitive.Trigger\n ref={ref}\n data-slot=\"collapsible-trigger\"\n className={cn(\n 'group/collapsible-trigger flex w-full items-center rounded-lg px-3 py-2 text-sm font-medium leading-5 text-base-foreground overflow-hidden transition-all outline-none',\n 'hover:bg-base-background-hover hover:text-base-foreground',\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-base-foreground-disabled',\n 'aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:text-base-foreground-disabled',\n 'data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:text-base-foreground-disabled',\n focusRing,\n className\n )}\n {...props}\n >\n {children}\n </CollapsiblePrimitive.Trigger>\n );\n});\nCollapsibleTrigger.displayName = 'CollapsibleTrigger';\n\nconst CollapsibleContent: ForwardRefExoticComponent<\n Omit<CollapsiblePanelProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof CollapsiblePrimitive.Panel>,\n CollapsiblePrimitive.Panel.Props\n>(({ className, keepMounted = true, ...props }, ref) => {\n return (\n <CollapsiblePrimitive.Panel\n ref={ref}\n data-slot=\"collapsible-content\"\n className={cn(\n 'hidden data-open:block border-none outline-none text-muted-foreground text-sm font-normal leading-5 tracking-tight w-full min-w-0 overflow-x-hidden box-border *:max-w-full *:box-border',\n className\n )}\n keepMounted={keepMounted}\n {...props}\n />\n );\n});\nCollapsibleContent.displayName = 'CollapsibleContent';\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n"],"names":["forwardRef","Collapsible","CollapsiblePrimitive","cn","focusRing","className","props","ref","Root","data-slot","displayName","CollapsibleTrigger","children","Trigger","CollapsibleContent","keepMounted","Panel"],"mappings":";AAAA,SAIEA,UAAU,QACL,QAAQ;AAOf,SAASC,eAAeC,oBAAoB,QAAQ,6BAA6B;AAEjF,SAASC,EAAE,EAAEC,SAAS,QAAQ,2BAAwB;AAEtD,MAAMH,4BAEFD,WAGF,CAAC,EAAEK,SAAS,EAAE,GAAGC,OAAO,EAAEC;IAC1B,qBACE,KAACL,qBAAqBM,IAAI;QACxBD,KAAKA;QACLE,aAAU;QACVJ,WAAWF,GACT,qDACAE;QAED,GAAGC,KAAK;;AAGf;AACAL,YAAYS,WAAW,GAAG;AAE1B,MAAMC,mCAEFX,WAGF,CAAC,EAAEK,SAAS,EAAEO,QAAQ,EAAE,GAAGN,OAAO,EAAEC;IACpC,qBACE,KAACL,qBAAqBW,OAAO;QAC3BN,KAAKA;QACLE,aAAU;QACVJ,WAAWF,GACT,0KACA,6DACA,mGACA,kHACA,wHACAC,WACAC;QAED,GAAGC,KAAK;kBAERM;;AAGP;AACAD,mBAAmBD,WAAW,GAAG;AAEjC,MAAMI,mCAEFd,WAGF,CAAC,EAAEK,SAAS,EAAEU,cAAc,IAAI,EAAE,GAAGT,OAAO,EAAEC;IAC9C,qBACE,KAACL,qBAAqBc,KAAK;QACzBT,KAAKA;QACLE,aAAU;QACVJ,WAAWF,GACT,4LACAE;QAEFU,aAAaA;QACZ,GAAGT,KAAK;;AAGf;AACAQ,mBAAmBJ,WAAW,GAAG;AAEjC,SAAST,WAAW,EAAEa,kBAAkB,EAAEH,kBAAkB,GAAG"}
|