@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,80 +1,101 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import { Accordion as
|
|
4
|
-
import { IconChevronDown
|
|
5
|
-
import {
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
4
|
+
import { IconChevronDown } from "@tabler/icons-react";
|
|
5
|
+
import { cn, focusRing } from "../../../../lib/utils.js";
|
|
6
|
+
const Accordion = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
7
|
+
if (props.type === 'multiple') {
|
|
8
|
+
const { type: _type, value, defaultValue, onValueChange, ...rootProps } = props;
|
|
9
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Root, {
|
|
10
|
+
ref: ref,
|
|
11
|
+
"data-slot": "accordion",
|
|
12
|
+
multiple: true,
|
|
13
|
+
value: value,
|
|
14
|
+
defaultValue: defaultValue,
|
|
15
|
+
onValueChange: (nextValue)=>{
|
|
16
|
+
if (!onValueChange) return;
|
|
17
|
+
const filtered = nextValue.filter((next)=>next != null);
|
|
18
|
+
onValueChange(filtered);
|
|
19
|
+
},
|
|
20
|
+
...rootProps
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const { type: _type, collapsible = false, value, defaultValue, onValueChange, ...rootProps } = props;
|
|
24
|
+
const controlledValue = value === undefined ? undefined : value === '' ? [] : [
|
|
25
|
+
value
|
|
26
|
+
];
|
|
27
|
+
const uncontrolledDefaultValue = defaultValue === undefined ? undefined : defaultValue === '' ? [] : [
|
|
28
|
+
defaultValue
|
|
29
|
+
];
|
|
30
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Root, {
|
|
31
|
+
ref: ref,
|
|
32
|
+
"data-slot": "accordion",
|
|
33
|
+
multiple: false,
|
|
34
|
+
value: controlledValue,
|
|
35
|
+
defaultValue: uncontrolledDefaultValue,
|
|
36
|
+
onValueChange: (nextValue, details)=>{
|
|
37
|
+
if (!onValueChange) return;
|
|
38
|
+
if (!collapsible && nextValue.length === 0) {
|
|
39
|
+
details.cancel();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
onValueChange(nextValue[0] ?? '');
|
|
43
|
+
},
|
|
44
|
+
...rootProps
|
|
45
|
+
});
|
|
42
46
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
var c = t(({ className: t, children: o, icon: s, ...c }, l) => {
|
|
52
|
-
let u = s;
|
|
53
|
-
return /* @__PURE__ */ i(n.Header, {
|
|
54
|
-
className: "flex",
|
|
55
|
-
children: /* @__PURE__ */ a(n.Trigger, {
|
|
56
|
-
ref: l,
|
|
57
|
-
"data-slot": "accordion-trigger",
|
|
58
|
-
className: e("focus-visible:border-ring focus-visible:ring-ring-muted group/accordion-trigger flex flex-1 items-center justify-between gap-4.5 rounded-lg px-3 py-2 text-left hover:bg-muted-background hover:text-foreground focus-visible:ring text-base font-normal tracking-tightest transition-all outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:text-disabled-foreground aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:text-disabled-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:text-disabled-foreground", t),
|
|
59
|
-
...c,
|
|
60
|
-
children: [/* @__PURE__ */ a("div", {
|
|
61
|
-
className: "flex items-center gap-2",
|
|
62
|
-
children: [u && /* @__PURE__ */ i(u, { className: "pointer-events-none size-4 shrink-0 transition-transform duration-200" }), /* @__PURE__ */ i("span", { children: o })]
|
|
63
|
-
}), /* @__PURE__ */ i(r, { className: "pointer-events-none size-4 shrink-0 transition-transform duration-200 group-aria-expanded/accordion-trigger:rotate-180" })]
|
|
64
|
-
})
|
|
65
|
-
});
|
|
47
|
+
Accordion.displayName = 'Accordion';
|
|
48
|
+
const AccordionItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
49
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Item, {
|
|
50
|
+
ref: ref,
|
|
51
|
+
"data-slot": "accordion-item",
|
|
52
|
+
className: cn('mt-2 first:mt-0 rounded-md', className),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
66
55
|
});
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
56
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
57
|
+
const AccordionTrigger = /*#__PURE__*/ forwardRef(({ className, children, icon, ...props }, ref)=>{
|
|
58
|
+
const Icon = icon;
|
|
59
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Header, {
|
|
60
|
+
className: "flex",
|
|
61
|
+
children: /*#__PURE__*/ _jsxs(AccordionPrimitive.Trigger, {
|
|
62
|
+
ref: ref,
|
|
63
|
+
"data-slot": "accordion-trigger",
|
|
64
|
+
className: cn('group/accordion-trigger flex flex-1 items-center justify-between gap-4.5 rounded-lg px-3 py-2 text-left text-base font-normal tracking-tightest text-base-foreground 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),
|
|
65
|
+
...props,
|
|
66
|
+
children: [
|
|
67
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
68
|
+
className: "flex items-center gap-2",
|
|
69
|
+
children: [
|
|
70
|
+
Icon && /*#__PURE__*/ _jsx(Icon, {
|
|
71
|
+
className: "pointer-events-none size-4 shrink-0 transition-transform duration-200"
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ _jsx("span", {
|
|
74
|
+
children: children
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ _jsx(IconChevronDown, {
|
|
79
|
+
className: "pointer-events-none size-4 shrink-0 transition-transform duration-200 group-aria-expanded/accordion-trigger:rotate-180"
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
AccordionTrigger.displayName = 'AccordionTrigger';
|
|
86
|
+
const AccordionContent = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
|
|
87
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Panel, {
|
|
88
|
+
ref: ref,
|
|
89
|
+
"data-slot": "accordion-content",
|
|
90
|
+
className: "h-(--accordion-panel-height) overflow-hidden text-sm font-normal tracking-tightest text-muted-foreground transition-all duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0",
|
|
91
|
+
...props,
|
|
92
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
93
|
+
className: cn('px-3 pb-3 pt-2', className),
|
|
94
|
+
children: children
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
AccordionContent.displayName = 'AccordionContent';
|
|
99
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/accordion/accordion.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n forwardRef,\n} from 'react';\n\nimport type {\n AccordionItemProps,\n AccordionPanelProps,\n AccordionTriggerProps,\n} from '@base-ui/react/accordion';\nimport { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';\nimport { type Icon, IconChevronDown } from '@tabler/icons-react';\n\nimport { cn, focusRing } from '../../../../lib/utils';\n\ntype AccordionCommonProps = Omit<\n ComponentProps<typeof AccordionPrimitive.Root>,\n 'multiple' | 'value' | 'defaultValue' | 'onValueChange'\n>;\n\ntype AccordionSingleProps = {\n type?: 'single';\n collapsible?: boolean;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n};\n\ntype AccordionMultipleProps = {\n type: 'multiple';\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (value: string[]) => void;\n};\n\ntype AccordionProps = AccordionCommonProps &\n (AccordionSingleProps | AccordionMultipleProps);\n\nconst Accordion: ForwardRefExoticComponent<\n Omit<AccordionCommonProps, 'ref'> &\n (AccordionSingleProps | AccordionMultipleProps) &\n RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<typeof AccordionPrimitive.Root>, AccordionProps>(\n (props, ref) => {\n if (props.type === 'multiple') {\n const {\n type: _type,\n value,\n defaultValue,\n onValueChange,\n ...rootProps\n } = props;\n\n return (\n <AccordionPrimitive.Root\n ref={ref}\n data-slot=\"accordion\"\n multiple\n value={value}\n defaultValue={defaultValue}\n onValueChange={(nextValue) => {\n if (!onValueChange) return;\n const filtered = nextValue.filter(\n (next): next is string => next != null\n );\n onValueChange(filtered);\n }}\n {...rootProps}\n />\n );\n }\n\n const {\n type: _type,\n collapsible = false,\n value,\n defaultValue,\n onValueChange,\n ...rootProps\n } = props;\n\n const controlledValue =\n value === undefined ? undefined : value === '' ? [] : [value];\n const uncontrolledDefaultValue =\n defaultValue === undefined\n ? undefined\n : defaultValue === ''\n ? []\n : [defaultValue];\n\n return (\n <AccordionPrimitive.Root\n ref={ref}\n data-slot=\"accordion\"\n multiple={false}\n value={controlledValue}\n defaultValue={uncontrolledDefaultValue}\n onValueChange={(nextValue, details) => {\n if (!onValueChange) return;\n if (!collapsible && nextValue.length === 0) {\n details.cancel();\n return;\n }\n onValueChange(nextValue[0] ?? '');\n }}\n {...rootProps}\n />\n );\n }\n);\nAccordion.displayName = 'Accordion';\n\nconst AccordionItem: ForwardRefExoticComponent<\n Omit<AccordionItemProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof AccordionPrimitive.Item>,\n AccordionPrimitive.Item.Props\n>(({ className, ...props }, ref) => {\n return (\n <AccordionPrimitive.Item\n ref={ref}\n data-slot=\"accordion-item\"\n className={cn('mt-2 first:mt-0 rounded-md', className)}\n {...props}\n />\n );\n});\nAccordionItem.displayName = 'AccordionItem';\n\nconst AccordionTrigger: ForwardRefExoticComponent<\n Omit<\n AccordionTriggerProps & {\n icon?: Icon;\n },\n 'ref'\n > &\n RefAttributes<HTMLElement>\n> = forwardRef<\n ComponentRef<typeof AccordionPrimitive.Trigger>,\n AccordionPrimitive.Trigger.Props & {\n icon?: Icon;\n }\n>(({ className, children, icon, ...props }, ref) => {\n const Icon = icon;\n\n return (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n data-slot=\"accordion-trigger\"\n className={cn(\n 'group/accordion-trigger flex flex-1 items-center justify-between gap-4.5 rounded-lg px-3 py-2 text-left text-base font-normal tracking-tightest text-base-foreground 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 <div className=\"flex items-center gap-2\">\n {Icon && (\n <Icon className=\"pointer-events-none size-4 shrink-0 transition-transform duration-200\" />\n )}\n <span>{children}</span>\n </div>\n <IconChevronDown className=\"pointer-events-none size-4 shrink-0 transition-transform duration-200 group-aria-expanded/accordion-trigger:rotate-180\" />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n});\nAccordionTrigger.displayName = 'AccordionTrigger';\n\nconst AccordionContent: ForwardRefExoticComponent<\n Omit<AccordionPanelProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<\n ComponentRef<typeof AccordionPrimitive.Panel>,\n AccordionPrimitive.Panel.Props\n>(({ className, children, ...props }, ref) => {\n return (\n <AccordionPrimitive.Panel\n ref={ref}\n data-slot=\"accordion-content\"\n className=\"h-(--accordion-panel-height) overflow-hidden text-sm font-normal tracking-tightest text-muted-foreground transition-all duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0\"\n {...props}\n >\n <div className={cn('px-3 pb-3 pt-2', className)}>{children}</div>\n </AccordionPrimitive.Panel>\n );\n});\nAccordionContent.displayName = 'AccordionContent';\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n"],"names":["forwardRef","Accordion","AccordionPrimitive","IconChevronDown","cn","focusRing","props","ref","type","_type","value","defaultValue","onValueChange","rootProps","Root","data-slot","multiple","nextValue","filtered","filter","next","collapsible","controlledValue","undefined","uncontrolledDefaultValue","details","length","cancel","displayName","AccordionItem","className","Item","AccordionTrigger","children","icon","Icon","Header","Trigger","div","span","AccordionContent","Panel"],"mappings":";AAAA,SAKEA,UAAU,QACL,QAAQ;AAOf,SAASC,aAAaC,kBAAkB,QAAQ,2BAA2B;AAC3E,SAAoBC,eAAe,QAAQ,sBAAsB;AAEjE,SAASC,EAAE,EAAEC,SAAS,QAAQ,2BAAwB;AAyBtD,MAAMJ,0BAIFD,WACF,CAACM,OAAOC;IACN,IAAID,MAAME,IAAI,KAAK,YAAY;QAC7B,MAAM,EACJA,MAAMC,KAAK,EACXC,KAAK,EACLC,YAAY,EACZC,aAAa,EACb,GAAGC,WACJ,GAAGP;QAEJ,qBACE,KAACJ,mBAAmBY,IAAI;YACtBP,KAAKA;YACLQ,aAAU;YACVC,QAAQ;YACRN,OAAOA;YACPC,cAAcA;YACdC,eAAe,CAACK;gBACd,IAAI,CAACL,eAAe;gBACpB,MAAMM,WAAWD,UAAUE,MAAM,CAC/B,CAACC,OAAyBA,QAAQ;gBAEpCR,cAAcM;YAChB;YACC,GAAGL,SAAS;;IAGnB;IAEA,MAAM,EACJL,MAAMC,KAAK,EACXY,cAAc,KAAK,EACnBX,KAAK,EACLC,YAAY,EACZC,aAAa,EACb,GAAGC,WACJ,GAAGP;IAEJ,MAAMgB,kBACJZ,UAAUa,YAAYA,YAAYb,UAAU,KAAK,EAAE,GAAG;QAACA;KAAM;IAC/D,MAAMc,2BACJb,iBAAiBY,YACbA,YACAZ,iBAAiB,KACf,EAAE,GACF;QAACA;KAAa;IAEtB,qBACE,KAACT,mBAAmBY,IAAI;QACtBP,KAAKA;QACLQ,aAAU;QACVC,UAAU;QACVN,OAAOY;QACPX,cAAca;QACdZ,eAAe,CAACK,WAAWQ;YACzB,IAAI,CAACb,eAAe;YACpB,IAAI,CAACS,eAAeJ,UAAUS,MAAM,KAAK,GAAG;gBAC1CD,QAAQE,MAAM;gBACd;YACF;YACAf,cAAcK,SAAS,CAAC,EAAE,IAAI;QAChC;QACC,GAAGJ,SAAS;;AAGnB;AAEFZ,UAAU2B,WAAW,GAAG;AAExB,MAAMC,8BAEF7B,WAGF,CAAC,EAAE8B,SAAS,EAAE,GAAGxB,OAAO,EAAEC;IAC1B,qBACE,KAACL,mBAAmB6B,IAAI;QACtBxB,KAAKA;QACLQ,aAAU;QACVe,WAAW1B,GAAG,8BAA8B0B;QAC3C,GAAGxB,KAAK;;AAGf;AACAuB,cAAcD,WAAW,GAAG;AAE5B,MAAMI,iCAQFhC,WAKF,CAAC,EAAE8B,SAAS,EAAEG,QAAQ,EAAEC,IAAI,EAAE,GAAG5B,OAAO,EAAEC;IAC1C,MAAM4B,OAAOD;IAEb,qBACE,KAAChC,mBAAmBkC,MAAM;QAACN,WAAU;kBACnC,cAAA,MAAC5B,mBAAmBmC,OAAO;YACzB9B,KAAKA;YACLQ,aAAU;YACVe,WAAW1B,GACT,oMACA,6DACA,mGACA,kHACA,wHACAC,WACAyB;YAED,GAAGxB,KAAK;;8BAET,MAACgC;oBAAIR,WAAU;;wBACZK,sBACC,KAACA;4BAAKL,WAAU;;sCAElB,KAACS;sCAAMN;;;;8BAET,KAAC9B;oBAAgB2B,WAAU;;;;;AAInC;AACAE,iBAAiBJ,WAAW,GAAG;AAE/B,MAAMY,iCAEFxC,WAGF,CAAC,EAAE8B,SAAS,EAAEG,QAAQ,EAAE,GAAG3B,OAAO,EAAEC;IACpC,qBACE,KAACL,mBAAmBuC,KAAK;QACvBlC,KAAKA;QACLQ,aAAU;QACVe,WAAU;QACT,GAAGxB,KAAK;kBAET,cAAA,KAACgC;YAAIR,WAAW1B,GAAG,kBAAkB0B;sBAAaG;;;AAGxD;AACAO,iBAAiBZ,WAAW,GAAG;AAE/B,SAAS3B,SAAS,EAAE4B,aAAa,EAAEG,gBAAgB,EAAEQ,gBAAgB,GAAG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS = 640;
|
|
2
|
+
type ActionToolbarPresence = {
|
|
3
|
+
mounted: boolean;
|
|
4
|
+
selectedCount: number | undefined;
|
|
5
|
+
bindMotion: (node: HTMLDivElement | null) => void;
|
|
6
|
+
};
|
|
7
|
+
declare function useActionToolbarPresence(selectedCount: number | undefined): ActionToolbarPresence;
|
|
8
|
+
export { TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS, useActionToolbarPresence };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
const TOOLBAR_ENTER_MS = 420;
|
|
3
|
+
const TOOLBAR_EXIT_MS = 560;
|
|
4
|
+
const TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS = 640;
|
|
5
|
+
const TOOLBAR_DRIFT_OFFSET = '0.75rem';
|
|
6
|
+
const TOOLBAR_TRAVEL_OFFSET = '3.5rem';
|
|
7
|
+
const TOOLBAR_EXIT_FADE_START = 0.4;
|
|
8
|
+
const TOOLBAR_ENTER_SETTLE_START = 0.6;
|
|
9
|
+
const TOOLBAR_ENTER_KEYFRAMES = [
|
|
10
|
+
{
|
|
11
|
+
transform: `translateY(${TOOLBAR_TRAVEL_OFFSET})`,
|
|
12
|
+
opacity: 0
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
transform: `translateY(${TOOLBAR_DRIFT_OFFSET})`,
|
|
16
|
+
opacity: 1,
|
|
17
|
+
offset: TOOLBAR_ENTER_SETTLE_START
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
transform: 'translateY(0)',
|
|
21
|
+
opacity: 1
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
const TOOLBAR_EXIT_KEYFRAMES = [
|
|
25
|
+
{
|
|
26
|
+
transform: 'translateY(0)',
|
|
27
|
+
opacity: 1
|
|
28
|
+
},
|
|
29
|
+
// Drift down while the toolbar is still fully visible.
|
|
30
|
+
// Fade only after that, while the rest of the travel finishes.
|
|
31
|
+
{
|
|
32
|
+
transform: `translateY(${TOOLBAR_DRIFT_OFFSET})`,
|
|
33
|
+
opacity: 1,
|
|
34
|
+
offset: TOOLBAR_EXIT_FADE_START
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
transform: `translateY(${TOOLBAR_TRAVEL_OFFSET})`,
|
|
38
|
+
opacity: 0
|
|
39
|
+
}
|
|
40
|
+
];
|
|
41
|
+
function prefersReducedMotion() {
|
|
42
|
+
if (typeof window === 'undefined') return false;
|
|
43
|
+
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
44
|
+
}
|
|
45
|
+
function isSelectionHidden(selectedCount) {
|
|
46
|
+
return typeof selectedCount === 'number' && selectedCount === 0;
|
|
47
|
+
}
|
|
48
|
+
function playToolbarMotion(node, keyframes, duration) {
|
|
49
|
+
if (typeof node.animate !== 'function') return null;
|
|
50
|
+
return node.animate(keyframes, {
|
|
51
|
+
duration,
|
|
52
|
+
easing: 'linear',
|
|
53
|
+
fill: 'forwards'
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function startToolbarMotion(node, hidden, motionRef, exitTimerRef, onExit) {
|
|
57
|
+
motionRef.current?.cancel();
|
|
58
|
+
if (!hidden) {
|
|
59
|
+
motionRef.current = playToolbarMotion(node, TOOLBAR_ENTER_KEYFRAMES, TOOLBAR_ENTER_MS);
|
|
60
|
+
return ()=>{
|
|
61
|
+
motionRef.current?.cancel();
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const animation = playToolbarMotion(node, TOOLBAR_EXIT_KEYFRAMES, TOOLBAR_EXIT_MS);
|
|
65
|
+
motionRef.current = animation;
|
|
66
|
+
let finished = false;
|
|
67
|
+
const finishExit = ()=>{
|
|
68
|
+
if (finished) return;
|
|
69
|
+
finished = true;
|
|
70
|
+
window.clearTimeout(exitTimerRef.current);
|
|
71
|
+
onExit();
|
|
72
|
+
};
|
|
73
|
+
// element.animate() reports completion through onfinish.
|
|
74
|
+
// It does not dispatch animationend.
|
|
75
|
+
if (animation) animation.onfinish = finishExit;
|
|
76
|
+
exitTimerRef.current = window.setTimeout(finishExit, TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS);
|
|
77
|
+
return ()=>{
|
|
78
|
+
window.clearTimeout(exitTimerRef.current);
|
|
79
|
+
motionRef.current?.cancel();
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function useActionToolbarPresence(selectedCount) {
|
|
83
|
+
const hidden = isSelectionHidden(selectedCount);
|
|
84
|
+
const reducedMotion = prefersReducedMotion();
|
|
85
|
+
const [trackedHidden, setTrackedHidden] = useState(hidden);
|
|
86
|
+
const [mounted, setMounted] = useState(!hidden);
|
|
87
|
+
const [displayedCount, setDisplayedCount] = useState(selectedCount);
|
|
88
|
+
const nodeRef = useRef(null);
|
|
89
|
+
const motionRef = useRef(null);
|
|
90
|
+
const exitTimerRef = useRef(0);
|
|
91
|
+
if (hidden !== trackedHidden) {
|
|
92
|
+
setTrackedHidden(hidden);
|
|
93
|
+
if (!hidden) {
|
|
94
|
+
setMounted(true);
|
|
95
|
+
if (typeof selectedCount === 'number') setDisplayedCount(selectedCount);
|
|
96
|
+
} else if (!mounted || reducedMotion) {
|
|
97
|
+
setMounted(false);
|
|
98
|
+
}
|
|
99
|
+
} else if (!hidden && typeof selectedCount === 'number' && selectedCount !== displayedCount) {
|
|
100
|
+
setDisplayedCount(selectedCount);
|
|
101
|
+
}
|
|
102
|
+
const bindMotion = useCallback((node)=>{
|
|
103
|
+
nodeRef.current = node;
|
|
104
|
+
}, []);
|
|
105
|
+
useEffect(()=>{
|
|
106
|
+
if (reducedMotion || !mounted) return undefined;
|
|
107
|
+
const node = nodeRef.current;
|
|
108
|
+
if (!node) return undefined;
|
|
109
|
+
return startToolbarMotion(node, hidden, motionRef, exitTimerRef, ()=>{
|
|
110
|
+
setMounted(false);
|
|
111
|
+
});
|
|
112
|
+
}, [
|
|
113
|
+
hidden,
|
|
114
|
+
mounted,
|
|
115
|
+
reducedMotion
|
|
116
|
+
]);
|
|
117
|
+
return {
|
|
118
|
+
mounted,
|
|
119
|
+
selectedCount: hidden ? displayedCount : selectedCount,
|
|
120
|
+
bindMotion
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export { TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS, useActionToolbarPresence };
|
|
124
|
+
|
|
125
|
+
//# sourceMappingURL=action-toolbar-motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/action-toolbar/action-toolbar-motion.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\nconst TOOLBAR_ENTER_MS = 420;\nconst TOOLBAR_EXIT_MS = 560;\nconst TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS = 640;\nconst TOOLBAR_DRIFT_OFFSET = '0.75rem';\nconst TOOLBAR_TRAVEL_OFFSET = '3.5rem';\nconst TOOLBAR_EXIT_FADE_START = 0.4;\nconst TOOLBAR_ENTER_SETTLE_START = 0.6;\n\nconst TOOLBAR_ENTER_KEYFRAMES: Keyframe[] = [\n { transform: `translateY(${TOOLBAR_TRAVEL_OFFSET})`, opacity: 0 },\n {\n transform: `translateY(${TOOLBAR_DRIFT_OFFSET})`,\n opacity: 1,\n offset: TOOLBAR_ENTER_SETTLE_START,\n },\n { transform: 'translateY(0)', opacity: 1 },\n];\n\nconst TOOLBAR_EXIT_KEYFRAMES: Keyframe[] = [\n { transform: 'translateY(0)', opacity: 1 },\n // Drift down while the toolbar is still fully visible.\n // Fade only after that, while the rest of the travel finishes.\n {\n transform: `translateY(${TOOLBAR_DRIFT_OFFSET})`,\n opacity: 1,\n offset: TOOLBAR_EXIT_FADE_START,\n },\n { transform: `translateY(${TOOLBAR_TRAVEL_OFFSET})`, opacity: 0 },\n];\n\ntype ActionToolbarPresence = {\n mounted: boolean;\n selectedCount: number | undefined;\n bindMotion: (node: HTMLDivElement | null) => void;\n};\n\nfunction prefersReducedMotion(): boolean {\n if (typeof window === 'undefined') return false;\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n\nfunction isSelectionHidden(selectedCount: number | undefined): boolean {\n return typeof selectedCount === 'number' && selectedCount === 0;\n}\n\nfunction playToolbarMotion(\n node: HTMLDivElement,\n keyframes: Keyframe[],\n duration: number\n): Animation | null {\n if (typeof node.animate !== 'function') return null;\n return node.animate(keyframes, {\n duration,\n easing: 'linear',\n fill: 'forwards',\n });\n}\n\nfunction startToolbarMotion(\n node: HTMLDivElement,\n hidden: boolean,\n motionRef: { current: Animation | null },\n exitTimerRef: { current: number },\n onExit: () => void\n): () => void {\n motionRef.current?.cancel();\n\n if (!hidden) {\n motionRef.current = playToolbarMotion(\n node,\n TOOLBAR_ENTER_KEYFRAMES,\n TOOLBAR_ENTER_MS\n );\n return () => {\n motionRef.current?.cancel();\n };\n }\n\n const animation = playToolbarMotion(\n node,\n TOOLBAR_EXIT_KEYFRAMES,\n TOOLBAR_EXIT_MS\n );\n motionRef.current = animation;\n let finished = false;\n const finishExit = () => {\n if (finished) return;\n finished = true;\n window.clearTimeout(exitTimerRef.current);\n onExit();\n };\n // element.animate() reports completion through onfinish.\n // It does not dispatch animationend.\n if (animation) animation.onfinish = finishExit;\n exitTimerRef.current = window.setTimeout(\n finishExit,\n TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS\n );\n\n return () => {\n window.clearTimeout(exitTimerRef.current);\n motionRef.current?.cancel();\n };\n}\n\nfunction useActionToolbarPresence(\n selectedCount: number | undefined\n): ActionToolbarPresence {\n const hidden = isSelectionHidden(selectedCount);\n const reducedMotion = prefersReducedMotion();\n const [trackedHidden, setTrackedHidden] = useState(hidden);\n const [mounted, setMounted] = useState(!hidden);\n const [displayedCount, setDisplayedCount] = useState(selectedCount);\n const nodeRef = useRef<HTMLDivElement | null>(null);\n const motionRef = useRef<Animation | null>(null);\n const exitTimerRef = useRef(0);\n\n if (hidden !== trackedHidden) {\n setTrackedHidden(hidden);\n if (!hidden) {\n setMounted(true);\n if (typeof selectedCount === 'number') setDisplayedCount(selectedCount);\n } else if (!mounted || reducedMotion) {\n setMounted(false);\n }\n } else if (\n !hidden &&\n typeof selectedCount === 'number' &&\n selectedCount !== displayedCount\n ) {\n setDisplayedCount(selectedCount);\n }\n\n const bindMotion = useCallback((node: HTMLDivElement | null) => {\n nodeRef.current = node;\n }, []);\n\n useEffect(() => {\n if (reducedMotion || !mounted) return undefined;\n const node = nodeRef.current;\n if (!node) return undefined;\n\n return startToolbarMotion(node, hidden, motionRef, exitTimerRef, () => {\n setMounted(false);\n });\n }, [hidden, mounted, reducedMotion]);\n\n return {\n mounted,\n selectedCount: hidden ? displayedCount : selectedCount,\n bindMotion,\n };\n}\n\nexport { TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS, useActionToolbarPresence };\n"],"names":["useCallback","useEffect","useRef","useState","TOOLBAR_ENTER_MS","TOOLBAR_EXIT_MS","TOOLBAR_EXIT_UNMOUNT_FALLBACK_MS","TOOLBAR_DRIFT_OFFSET","TOOLBAR_TRAVEL_OFFSET","TOOLBAR_EXIT_FADE_START","TOOLBAR_ENTER_SETTLE_START","TOOLBAR_ENTER_KEYFRAMES","transform","opacity","offset","TOOLBAR_EXIT_KEYFRAMES","prefersReducedMotion","window","matchMedia","matches","isSelectionHidden","selectedCount","playToolbarMotion","node","keyframes","duration","animate","easing","fill","startToolbarMotion","hidden","motionRef","exitTimerRef","onExit","current","cancel","animation","finished","finishExit","clearTimeout","onfinish","setTimeout","useActionToolbarPresence","reducedMotion","trackedHidden","setTrackedHidden","mounted","setMounted","displayedCount","setDisplayedCount","nodeRef","bindMotion","undefined"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAEjE,MAAMC,mBAAmB;AACzB,MAAMC,kBAAkB;AACxB,MAAMC,mCAAmC;AACzC,MAAMC,uBAAuB;AAC7B,MAAMC,wBAAwB;AAC9B,MAAMC,0BAA0B;AAChC,MAAMC,6BAA6B;AAEnC,MAAMC,0BAAsC;IAC1C;QAAEC,WAAW,CAAC,WAAW,EAAEJ,sBAAsB,CAAC,CAAC;QAAEK,SAAS;IAAE;IAChE;QACED,WAAW,CAAC,WAAW,EAAEL,qBAAqB,CAAC,CAAC;QAChDM,SAAS;QACTC,QAAQJ;IACV;IACA;QAAEE,WAAW;QAAiBC,SAAS;IAAE;CAC1C;AAED,MAAME,yBAAqC;IACzC;QAAEH,WAAW;QAAiBC,SAAS;IAAE;IACzC,uDAAuD;IACvD,+DAA+D;IAC/D;QACED,WAAW,CAAC,WAAW,EAAEL,qBAAqB,CAAC,CAAC;QAChDM,SAAS;QACTC,QAAQL;IACV;IACA;QAAEG,WAAW,CAAC,WAAW,EAAEJ,sBAAsB,CAAC,CAAC;QAAEK,SAAS;IAAE;CACjE;AAQD,SAASG;IACP,IAAI,OAAOC,WAAW,aAAa,OAAO;IAC1C,OAAOA,OAAOC,UAAU,CAAC,oCAAoCC,OAAO;AACtE;AAEA,SAASC,kBAAkBC,aAAiC;IAC1D,OAAO,OAAOA,kBAAkB,YAAYA,kBAAkB;AAChE;AAEA,SAASC,kBACPC,IAAoB,EACpBC,SAAqB,EACrBC,QAAgB;IAEhB,IAAI,OAAOF,KAAKG,OAAO,KAAK,YAAY,OAAO;IAC/C,OAAOH,KAAKG,OAAO,CAACF,WAAW;QAC7BC;QACAE,QAAQ;QACRC,MAAM;IACR;AACF;AAEA,SAASC,mBACPN,IAAoB,EACpBO,MAAe,EACfC,SAAwC,EACxCC,YAAiC,EACjCC,MAAkB;IAElBF,UAAUG,OAAO,EAAEC;IAEnB,IAAI,CAACL,QAAQ;QACXC,UAAUG,OAAO,GAAGZ,kBAClBC,MACAZ,yBACAP;QAEF,OAAO;YACL2B,UAAUG,OAAO,EAAEC;QACrB;IACF;IAEA,MAAMC,YAAYd,kBAChBC,MACAR,wBACAV;IAEF0B,UAAUG,OAAO,GAAGE;IACpB,IAAIC,WAAW;IACf,MAAMC,aAAa;QACjB,IAAID,UAAU;QACdA,WAAW;QACXpB,OAAOsB,YAAY,CAACP,aAAaE,OAAO;QACxCD;IACF;IACA,yDAAyD;IACzD,qCAAqC;IACrC,IAAIG,WAAWA,UAAUI,QAAQ,GAAGF;IACpCN,aAAaE,OAAO,GAAGjB,OAAOwB,UAAU,CACtCH,YACAhC;IAGF,OAAO;QACLW,OAAOsB,YAAY,CAACP,aAAaE,OAAO;QACxCH,UAAUG,OAAO,EAAEC;IACrB;AACF;AAEA,SAASO,yBACPrB,aAAiC;IAEjC,MAAMS,SAASV,kBAAkBC;IACjC,MAAMsB,gBAAgB3B;IACtB,MAAM,CAAC4B,eAAeC,iBAAiB,GAAG1C,SAAS2B;IACnD,MAAM,CAACgB,SAASC,WAAW,GAAG5C,SAAS,CAAC2B;IACxC,MAAM,CAACkB,gBAAgBC,kBAAkB,GAAG9C,SAASkB;IACrD,MAAM6B,UAAUhD,OAA8B;IAC9C,MAAM6B,YAAY7B,OAAyB;IAC3C,MAAM8B,eAAe9B,OAAO;IAE5B,IAAI4B,WAAWc,eAAe;QAC5BC,iBAAiBf;QACjB,IAAI,CAACA,QAAQ;YACXiB,WAAW;YACX,IAAI,OAAO1B,kBAAkB,UAAU4B,kBAAkB5B;QAC3D,OAAO,IAAI,CAACyB,WAAWH,eAAe;YACpCI,WAAW;QACb;IACF,OAAO,IACL,CAACjB,UACD,OAAOT,kBAAkB,YACzBA,kBAAkB2B,gBAClB;QACAC,kBAAkB5B;IACpB;IAEA,MAAM8B,aAAanD,YAAY,CAACuB;QAC9B2B,QAAQhB,OAAO,GAAGX;IACpB,GAAG,EAAE;IAELtB,UAAU;QACR,IAAI0C,iBAAiB,CAACG,SAAS,OAAOM;QACtC,MAAM7B,OAAO2B,QAAQhB,OAAO;QAC5B,IAAI,CAACX,MAAM,OAAO6B;QAElB,OAAOvB,mBAAmBN,MAAMO,QAAQC,WAAWC,cAAc;YAC/De,WAAW;QACb;IACF,GAAG;QAACjB;QAAQgB;QAASH;KAAc;IAEnC,OAAO;QACLG;QACAzB,eAAeS,SAASkB,iBAAiB3B;QACzC8B;IACF;AACF;AAEA,SAAS7C,gCAAgC,EAAEoC,wBAAwB,GAAG"}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from
|
|
2
|
-
import { VariantProps } from
|
|
3
|
-
import { ClassProp } from
|
|
4
|
-
import { Button } from
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import type { ClassProp } from "class-variance-authority/types";
|
|
4
|
+
import { Button } from "../button/button";
|
|
5
5
|
interface ActionToolbarVariantProps {
|
|
6
|
-
|
|
6
|
+
width?: "full" | "fit" | null;
|
|
7
7
|
}
|
|
8
8
|
declare const actionToolbarVariants: (props?: (ActionToolbarVariantProps & ClassProp) | undefined) => string;
|
|
9
|
-
type ActionToolbarProps = ComponentProps<
|
|
10
|
-
|
|
9
|
+
type ActionToolbarProps = ComponentProps<"div"> & VariantProps<typeof actionToolbarVariants> & {
|
|
10
|
+
selectedCount?: number;
|
|
11
11
|
};
|
|
12
|
-
declare const ActionToolbar: ForwardRefExoticComponent<Omit<ActionToolbarProps,
|
|
13
|
-
declare const ActionToolbarSelection: ForwardRefExoticComponent<ComponentProps<
|
|
14
|
-
type ActionToolbarSelectionSummaryProps = ComponentProps<
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
declare const ActionToolbar: ForwardRefExoticComponent<Omit<ActionToolbarProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const ActionToolbarSelection: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
14
|
+
type ActionToolbarSelectionSummaryProps = ComponentProps<"div"> & {
|
|
15
|
+
count?: ReactNode;
|
|
16
|
+
label?: ReactNode;
|
|
17
17
|
};
|
|
18
|
-
declare const ActionToolbarSelectionSummary: ForwardRefExoticComponent<Omit<ActionToolbarSelectionSummaryProps,
|
|
19
|
-
declare const ActionToolbarActions: ForwardRefExoticComponent<ComponentProps<
|
|
20
|
-
type ActionToolbarActionProps = Omit<ComponentProps<typeof Button>,
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
declare const ActionToolbarSelectionSummary: ForwardRefExoticComponent<Omit<ActionToolbarSelectionSummaryProps, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const ActionToolbarActions: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
20
|
+
type ActionToolbarActionProps = Omit<ComponentProps<typeof Button>, "size"> & ({
|
|
21
|
+
iconOnly: true;
|
|
22
|
+
"aria-label": string;
|
|
23
23
|
} | {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
iconOnly?: false;
|
|
25
|
+
"aria-label"?: string;
|
|
26
26
|
});
|
|
27
|
-
declare const ActionToolbarAction: ForwardRefExoticComponent<Omit<ComponentProps<typeof Button>,
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
declare const ActionToolbarAction: ForwardRefExoticComponent<Omit<ComponentProps<typeof Button>, "size" | "ref"> & ({
|
|
28
|
+
iconOnly: true;
|
|
29
|
+
"aria-label": string;
|
|
30
30
|
} | {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
iconOnly?: false;
|
|
32
|
+
"aria-label"?: string;
|
|
33
33
|
}) & RefAttributes<HTMLElement>>;
|
|
34
|
-
type ActionToolbarActionClearProps = Omit<ActionToolbarActionProps,
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
type ActionToolbarActionClearProps = Omit<ActionToolbarActionProps, "variant" | "iconOnly" | "children"> & {
|
|
35
|
+
icon?: ReactNode;
|
|
36
|
+
label?: ReactNode;
|
|
37
37
|
};
|
|
38
|
-
declare const ActionToolbarActionClear: ForwardRefExoticComponent<Omit<ActionToolbarActionClearProps,
|
|
39
|
-
type ActionToolbarPrimaryActionProps = Omit<ActionToolbarActionProps,
|
|
40
|
-
declare const ActionToolbarPrimaryAction: ForwardRefExoticComponent<Omit<ActionToolbarPrimaryActionProps,
|
|
41
|
-
export { ActionToolbar, ActionToolbarAction, ActionToolbarActionClear, ActionToolbarActions, ActionToolbarPrimaryAction, ActionToolbarSelection, ActionToolbarSelectionSummary
|
|
38
|
+
declare const ActionToolbarActionClear: ForwardRefExoticComponent<Omit<ActionToolbarActionClearProps, "ref"> & RefAttributes<HTMLElement>>;
|
|
39
|
+
type ActionToolbarPrimaryActionProps = Omit<ActionToolbarActionProps, "variant" | "iconOnly">;
|
|
40
|
+
declare const ActionToolbarPrimaryAction: ForwardRefExoticComponent<Omit<ActionToolbarPrimaryActionProps, "ref"> & RefAttributes<HTMLElement>>;
|
|
41
|
+
export { ActionToolbar, ActionToolbarAction, ActionToolbarActionClear, ActionToolbarActions, ActionToolbarPrimaryAction, ActionToolbarSelection, ActionToolbarSelectionSummary };
|