@cognite/aura 0.3.5 → 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 +21 -13
- package/dist/colors-deprecated.css +587 -0
- package/dist/colors.css +803 -830
- package/dist/components/index.d.ts +63 -57
- package/dist/components/index.js +62 -59
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/core/accordion/accordion.d.ts +19 -18
- package/dist/components/ui/core/accordion/accordion.js +99 -78
- package/dist/components/ui/core/accordion/accordion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.d.ts +8 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js +125 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +31 -31
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +156 -106
- package/dist/components/ui/core/action-toolbar/action-toolbar.js.map +1 -0
- package/dist/components/ui/core/alert/alert.d.ts +25 -25
- package/dist/components/ui/core/alert/alert.js +181 -152
- package/dist/components/ui/core/alert/alert.js.map +1 -0
- package/dist/components/ui/core/avatar/avatar.d.ts +10 -9
- package/dist/components/ui/core/avatar/avatar.js +75 -65
- package/dist/components/ui/core/avatar/avatar.js.map +1 -0
- package/dist/components/ui/core/badge/badge.d.ts +13 -12
- package/dist/components/ui/core/badge/badge.js +88 -72
- package/dist/components/ui/core/badge/badge.js.map +1 -0
- package/dist/components/ui/core/banner/banner.d.ts +18 -18
- package/dist/components/ui/core/banner/banner.js +179 -142
- package/dist/components/ui/core/banner/banner.js.map +1 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +12 -12
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +139 -104
- package/dist/components/ui/core/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/ui/core/button/button.d.ts +7 -7
- package/dist/components/ui/core/button/button.gallery.d.ts +2 -0
- package/dist/components/ui/core/button/button.gallery.js +76 -0
- package/dist/components/ui/core/button/button.gallery.js.map +1 -0
- package/dist/components/ui/core/button/button.js +57 -47
- package/dist/components/ui/core/button/button.js.map +1 -0
- package/dist/components/ui/core/button-group/button-group.d.ts +9 -9
- package/dist/components/ui/core/button-group/button-group.js +50 -40
- package/dist/components/ui/core/button-group/button-group.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-header.d.ts +7 -7
- package/dist/components/ui/core/calendar/calendar-header.js +102 -63
- package/dist/components/ui/core/calendar/calendar-header.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-utils.d.ts +30 -30
- package/dist/components/ui/core/calendar/calendar-utils.js +116 -39
- package/dist/components/ui/core/calendar/calendar-utils.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar.d.ts +10 -10
- package/dist/components/ui/core/calendar/calendar.js +95 -66
- package/dist/components/ui/core/calendar/calendar.js.map +1 -0
- package/dist/components/ui/core/calendar/constants.js +3 -0
- package/dist/components/ui/core/calendar/constants.js.map +1 -0
- package/dist/components/ui/core/card/card.d.ts +20 -20
- package/dist/components/ui/core/card/card.js +133 -104
- package/dist/components/ui/core/card/card.js.map +1 -0
- package/dist/components/ui/core/chart/chart.d.ts +55 -53
- package/dist/components/ui/core/chart/chart.js +196 -116
- package/dist/components/ui/core/chart/chart.js.map +1 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -2
- package/dist/components/ui/core/chart/index.js +3 -2
- package/dist/components/ui/core/chart/index.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +9 -9
- package/dist/components/ui/core/checkbox/checkbox.js +88 -68
- package/dist/components/ui/core/checkbox/checkbox.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +1 -1
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +6 -7
- package/dist/components/ui/core/checkbox/checkbox.metadata.js.map +1 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +19 -19
- package/dist/components/ui/core/code-block/code-block.js +259 -175
- package/dist/components/ui/core/code-block/code-block.js.map +1 -0
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -5
- package/dist/components/ui/core/collapsible/collapsible.js +36 -30
- package/dist/components/ui/core/collapsible/collapsible.js.map +1 -0
- package/dist/components/ui/core/combobox/combobox.d.ts +13 -13
- package/dist/components/ui/core/combobox/combobox.js +89 -40
- package/dist/components/ui/core/combobox/combobox.js.map +1 -0
- package/dist/components/ui/core/command/command.d.ts +20 -18
- package/dist/components/ui/core/command/command.js +137 -85
- package/dist/components/ui/core/command/command.js.map +1 -0
- package/dist/components/ui/core/conversation/conversation.d.ts +14 -0
- package/dist/components/ui/core/conversation/conversation.js +51 -0
- package/dist/components/ui/core/conversation/conversation.js.map +1 -0
- package/dist/components/ui/core/count/count.d.ts +8 -6
- package/dist/components/ui/core/count/count.js +51 -21
- package/dist/components/ui/core/count/count.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-cell.d.ts +7 -7
- package/dist/components/ui/core/data-grid/data-grid-cell.js +22 -22
- package/dist/components/ui/core/data-grid/data-grid-cell.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.d.ts +14 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js +36 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.d.ts +41 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js +273 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.d.ts +6 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js +34 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header-row.d.ts +10 -10
- package/dist/components/ui/core/data-grid/data-grid-header-row.js +69 -55
- package/dist/components/ui/core/data-grid/data-grid-header-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header.d.ts +11 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js +67 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-row.d.ts +15 -15
- package/dist/components/ui/core/data-grid/data-grid-row.js +104 -76
- package/dist/components/ui/core/data-grid/data-grid-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.d.ts +85 -35
- package/dist/components/ui/core/data-grid/data-grid.fixtures.d.ts +7 -7
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js +139 -0
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.js +402 -132
- package/dist/components/ui/core/data-grid/data-grid.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.utils.d.ts +3 -3
- package/dist/components/ui/core/data-grid/data-grid.utils.js +44 -33
- package/dist/components/ui/core/data-grid/data-grid.utils.js.map +1 -0
- package/dist/components/ui/core/data-grid/index.d.ts +4 -1
- package/dist/components/ui/core/data-grid/index.js +5 -2
- package/dist/components/ui/core/data-grid/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +85 -61
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +14 -14
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +51 -36
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +89 -64
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -4
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +95 -60
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js +120 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.d.ts +25 -32
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js +78 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +13 -15
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +165 -119
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +37 -37
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +163 -104
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +17 -12
- package/dist/components/ui/core/date-time-pickers/index.js +10 -6
- package/dist/components/ui/core/date-time-pickers/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +52 -42
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +6 -1
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +16 -15
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +87 -64
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +10 -9
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +89 -38
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +34 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +23 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +95 -52
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +22 -18
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +19 -19
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +41 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +33 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +9 -4
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -9
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +22 -17
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +49 -40
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +7 -7
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +41 -34
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.d.ts +12 -14
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +99 -79
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +63 -41
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.d.ts +14 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js +115 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.d.ts +30 -36
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js +145 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.d.ts +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js +67 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +18 -18
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js +42 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +31 -29
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +21 -21
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js +170 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +28 -28
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +88 -7
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +17 -17
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js.map +1 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +12 -9
- package/dist/components/ui/core/dialog/dialog.js +90 -82
- package/dist/components/ui/core/dialog/dialog.js.map +1 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +22 -19
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +204 -149
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +4 -4
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -5
- package/dist/components/ui/core/empty-state/empty-state.context.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +14 -14
- package/dist/components/ui/core/empty-state/empty-state.js +96 -82
- package/dist/components/ui/core/empty-state/empty-state.js.map +1 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -7
- package/dist/components/ui/core/helper-text/helper-text.js +55 -36
- package/dist/components/ui/core/helper-text/helper-text.js.map +1 -0
- package/dist/components/ui/core/hover-card/hover-card.d.ts +7 -6
- package/dist/components/ui/core/hover-card/hover-card.js +56 -52
- package/dist/components/ui/core/hover-card/hover-card.js.map +1 -0
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.js +121 -97
- package/dist/components/ui/core/inline-citation/inline-citation.js.map +1 -0
- package/dist/components/ui/core/input/input.d.ts +2 -2
- package/dist/components/ui/core/input/input.js +15 -13
- package/dist/components/ui/core/input/input.js.map +1 -0
- package/dist/components/ui/core/input-group/input-group.d.ts +25 -14
- package/dist/components/ui/core/input-group/input-group.js +149 -76
- package/dist/components/ui/core/input-group/input-group.js.map +1 -0
- package/dist/components/ui/core/item/item.d.ts +20 -0
- package/dist/components/ui/core/item/item.js +93 -0
- package/dist/components/ui/core/item/item.js.map +1 -0
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -3
- package/dist/components/ui/core/kbd/kbd.js +24 -20
- package/dist/components/ui/core/kbd/kbd.js.map +1 -0
- package/dist/components/ui/core/label/label.d.ts +3 -3
- package/dist/components/ui/core/label/label.js +33 -26
- package/dist/components/ui/core/label/label.js.map +1 -0
- package/dist/components/ui/core/loader/loader.d.ts +6 -6
- package/dist/components/ui/core/loader/loader.js +97 -80
- package/dist/components/ui/core/loader/loader.js.map +1 -0
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +9 -9
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +19 -12
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js.map +1 -0
- package/dist/components/ui/core/message/message-response-math-plugin.d.ts +3 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js +6 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js.map +1 -0
- package/dist/components/ui/core/message/message.d.ts +27 -23
- package/dist/components/ui/core/message/message.js +453 -316
- package/dist/components/ui/core/message/message.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.d.ts +21 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js +197 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.d.ts +37 -35
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js +206 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +2 -2
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -5
- package/dist/components/ui/core/pagination/pagination-size-context.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +9 -9
- package/dist/components/ui/core/pagination/pagination-teleport.js +127 -84
- package/dist/components/ui/core/pagination/pagination-teleport.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +39 -39
- package/dist/components/ui/core/pagination/pagination.js +294 -234
- package/dist/components/ui/core/pagination/pagination.js.map +1 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -11
- package/dist/components/ui/core/popover/popover.js +104 -89
- package/dist/components/ui/core/popover/popover.js.map +1 -0
- package/dist/components/ui/core/progress/progress.d.ts +9 -8
- package/dist/components/ui/core/progress/progress.js +50 -35
- package/dist/components/ui/core/progress/progress.js.map +1 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +27 -27
- package/dist/components/ui/core/prompt-input/prompt-input.js +342 -271
- package/dist/components/ui/core/prompt-input/prompt-input.js.map +1 -0
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -12
- package/dist/components/ui/core/radio-group/radio-group.js +88 -58
- package/dist/components/ui/core/radio-group/radio-group.js.map +1 -0
- package/dist/components/ui/core/reasoning/reasoning.d.ts +7 -7
- package/dist/components/ui/core/reasoning/reasoning.js +68 -56
- package/dist/components/ui/core/reasoning/reasoning.js.map +1 -0
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -4
- package/dist/components/ui/core/scroll-area/scroll-area.js +50 -40
- package/dist/components/ui/core/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/core/search/search.d.ts +8 -8
- package/dist/components/ui/core/search/search.js +122 -76
- package/dist/components/ui/core/search/search.js.map +1 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +10 -10
- package/dist/components/ui/core/segmented-control/segmented-control.js +203 -149
- package/dist/components/ui/core/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/ui/core/select/select.d.ts +27 -26
- package/dist/components/ui/core/select/select.js +213 -168
- package/dist/components/ui/core/select/select.js.map +1 -0
- package/dist/components/ui/core/separator/separator.d.ts +2 -2
- package/dist/components/ui/core/separator/separator.js +13 -13
- package/dist/components/ui/core/separator/separator.js.map +1 -0
- package/dist/components/ui/core/shimmer/shimmer.d.ts +8 -8
- package/dist/components/ui/core/shimmer/shimmer.js +64 -40
- package/dist/components/ui/core/shimmer/shimmer.js.map +1 -0
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -2
- package/dist/components/ui/core/skeleton/skeleton.js +13 -13
- package/dist/components/ui/core/skeleton/skeleton.js.map +1 -0
- package/dist/components/ui/core/slider/slider.d.ts +7 -7
- package/dist/components/ui/core/slider/slider.js +51 -39
- package/dist/components/ui/core/slider/slider.js.map +1 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +67 -54
- package/dist/components/ui/core/sonner-toast/sonner-toast.js.map +1 -0
- package/dist/components/ui/core/sources/sources.d.ts +12 -12
- package/dist/components/ui/core/sources/sources.js +87 -58
- package/dist/components/ui/core/sources/sources.js.map +1 -0
- package/dist/components/ui/core/switch/switch.d.ts +9 -9
- package/dist/components/ui/core/switch/switch.js +83 -61
- package/dist/components/ui/core/switch/switch.js.map +1 -0
- package/dist/components/ui/core/switch/switch.metadata.d.ts +1 -1
- package/dist/components/ui/core/switch/switch.metadata.js +8 -0
- package/dist/components/ui/core/switch/switch.metadata.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.d.ts +20 -18
- package/dist/components/ui/core/tabs/tabs.js +176 -147
- package/dist/components/ui/core/tabs/tabs.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.utils.d.ts +1 -1
- package/dist/components/ui/core/tabs/tabs.utils.js +10 -6
- package/dist/components/ui/core/tabs/tabs.utils.js.map +1 -0
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -2
- package/dist/components/ui/core/textarea/textarea.js +13 -13
- package/dist/components/ui/core/textarea/textarea.js.map +1 -0
- package/dist/components/ui/core/toggle/toggle.d.ts +9 -9
- package/dist/components/ui/core/toggle/toggle.js +60 -54
- package/dist/components/ui/core/toggle/toggle.js.map +1 -0
- package/dist/components/ui/core/tool/tool.d.ts +18 -18
- package/dist/components/ui/core/tool/tool.js +167 -126
- package/dist/components/ui/core/tool/tool.js.map +1 -0
- package/dist/components/ui/core/toolbar/toolbar.d.ts +37 -0
- package/dist/components/ui/core/toolbar/toolbar.js +171 -0
- package/dist/components/ui/core/toolbar/toolbar.js.map +1 -0
- package/dist/components/ui/core/tooltip/tooltip.d.ts +8 -7
- package/dist/components/ui/core/tooltip/tooltip.js +53 -46
- package/dist/components/ui/core/tooltip/tooltip.js.map +1 -0
- package/dist/components/ui/core/topbar/topbar.d.ts +26 -26
- package/dist/components/ui/core/topbar/topbar.js +160 -105
- package/dist/components/ui/core/topbar/topbar.js.map +1 -0
- package/dist/components/ui/core/tree/tree.d.ts +20 -0
- package/dist/components/ui/core/tree/tree.js +100 -0
- package/dist/components/ui/core/tree/tree.js.map +1 -0
- package/dist/eslint/index.d.ts +5 -5
- package/dist/eslint/index.js +9 -5
- package/dist/eslint/index.js.map +1 -0
- package/dist/eslint/no-overriding-styles.d.ts +1 -1
- package/dist/eslint/no-overriding-styles.js +341 -201
- package/dist/eslint/no-overriding-styles.js.map +1 -0
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +2 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/ai/types.d.ts +43 -43
- package/dist/lib/ai/types.js +3 -0
- package/dist/lib/ai/types.js.map +1 -0
- package/dist/lib/decorative-variant-classes.d.ts +53 -0
- package/dist/lib/decorative-variant-classes.js +58 -0
- package/dist/lib/decorative-variant-classes.js.map +1 -0
- package/dist/lib/highlight-code.d.ts +11 -8
- package/dist/lib/highlight-code.js +58 -40
- package/dist/lib/highlight-code.js.map +1 -0
- package/dist/lib/portal-container-context.d.ts +1 -1
- package/dist/lib/portal-container-context.js +8 -8
- package/dist/lib/portal-container-context.js.map +1 -0
- package/dist/lib/shared-theme-from-url.d.ts +13 -0
- package/dist/lib/shared-theme-from-url.js +61 -0
- package/dist/lib/shared-theme-from-url.js.map +1 -0
- package/dist/lib/style-scope.d.ts +2 -2
- package/dist/lib/style-scope.js +6 -6
- package/dist/lib/style-scope.js.map +1 -0
- package/dist/lib/theme-share-url.d.ts +31 -0
- package/dist/lib/theme-share-url.js +116 -0
- package/dist/lib/theme-share-url.js.map +1 -0
- package/dist/lib/types.d.ts +39 -39
- package/dist/lib/types.js +3 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/use-controllable-state.d.ts +4 -7
- package/dist/lib/use-controllable-state.js +34 -21
- package/dist/lib/use-controllable-state.js.map +1 -0
- package/dist/lib/utils.d.ts +63 -34
- package/dist/lib/utils.js +134 -32
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +2 -1
- package/dist/styles.source.css +24 -12
- package/dist/utils/assign-ref.d.ts +3 -0
- package/dist/utils/assign-ref.js +13 -0
- package/dist/utils/assign-ref.js.map +1 -0
- package/package.json +46 -11
- package/src/components/ui/core/button/button.md +93 -0
|
@@ -1,157 +1,211 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createContext
|
|
3
|
-
import {
|
|
4
|
-
import { cva
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
});
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useLayoutEffect, useRef } from "react";
|
|
3
|
+
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../../../../lib/utils.js";
|
|
6
|
+
function SegmentedControl({ className, ...props }) {
|
|
7
|
+
return /*#__PURE__*/ _jsx(TabsPrimitive.Root, {
|
|
8
|
+
"data-slot": "segmented-control",
|
|
9
|
+
className: cn('flex flex-col gap-2', className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
const segmentedControlListVariants = cva('bg-medium-background text-muted-foreground relative isolate inline-flex w-fit items-center justify-center gap-2 p-0.5', {
|
|
14
|
+
variants: {
|
|
15
|
+
size: {
|
|
16
|
+
default: 'h-9 rounded-lg',
|
|
17
|
+
small: 'h-7 rounded-md'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
size: 'default'
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const SegmentedControlSizeContext = /*#__PURE__*/ createContext(undefined);
|
|
25
|
+
function useSegmentedControlSize(size) {
|
|
26
|
+
const inherited = useContext(SegmentedControlSizeContext);
|
|
27
|
+
return size ?? inherited ?? 'default';
|
|
24
28
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
function SegmentedControlList({ className, size, children, ...props }) {
|
|
30
|
+
const resolvedSize = size ?? 'default';
|
|
31
|
+
return /*#__PURE__*/ _jsx(TabsPrimitive.List, {
|
|
32
|
+
"data-slot": "segmented-control-list",
|
|
33
|
+
className: cn(segmentedControlListVariants({
|
|
34
|
+
size
|
|
35
|
+
}), className),
|
|
36
|
+
...props,
|
|
37
|
+
children: /*#__PURE__*/ _jsxs(SegmentedControlSizeContext.Provider, {
|
|
38
|
+
value: resolvedSize,
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ _jsx(SegmentedControlIndicator, {
|
|
41
|
+
size: resolvedSize,
|
|
42
|
+
activeSelector: '[aria-selected="true"]'
|
|
43
|
+
}),
|
|
44
|
+
children
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
});
|
|
39
48
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
const segmentedControlIndicatorVariants = cva('bg-background shadow-sm pointer-events-none absolute top-(--active-tab-top) left-(--active-tab-left) -z-0 h-(--active-tab-height) w-(--active-tab-width) motion-safe:transition-[top,left,width,height] motion-safe:duration-200 motion-safe:ease-out data-[activation-direction=none]:transition-none', {
|
|
50
|
+
variants: {
|
|
51
|
+
size: {
|
|
52
|
+
default: 'rounded-md',
|
|
53
|
+
small: 'rounded-sm'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
size: 'default'
|
|
58
|
+
}
|
|
46
59
|
});
|
|
47
|
-
function
|
|
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
|
-
|
|
60
|
+
function SegmentedControlIndicator({ className, size, activeSelector = '[aria-selected="true"],[data-active]', style, ...props }) {
|
|
61
|
+
const ref = useRef(null);
|
|
62
|
+
const previousLeftRef = useRef(null);
|
|
63
|
+
useLayoutEffect(()=>{
|
|
64
|
+
const indicator = ref.current;
|
|
65
|
+
const list = indicator?.parentElement;
|
|
66
|
+
if (!indicator || !list) {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
let currentActive = null;
|
|
70
|
+
const pendingInitialObserve = new Set();
|
|
71
|
+
const observeResize = (element)=>{
|
|
72
|
+
pendingInitialObserve.add(element);
|
|
73
|
+
resizeObserver.observe(element);
|
|
74
|
+
};
|
|
75
|
+
const update = (isResize = false)=>{
|
|
76
|
+
const active = list.querySelector(activeSelector);
|
|
77
|
+
if (!active) {
|
|
78
|
+
indicator.style.opacity = '0';
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (active !== currentActive) {
|
|
82
|
+
if (currentActive) {
|
|
83
|
+
resizeObserver.unobserve(currentActive);
|
|
84
|
+
}
|
|
85
|
+
observeResize(active);
|
|
86
|
+
currentActive = active;
|
|
87
|
+
}
|
|
88
|
+
const left = active.offsetLeft;
|
|
89
|
+
const previousLeft = previousLeftRef.current;
|
|
90
|
+
const direction = isResize || previousLeft === null || left === previousLeft ? 'none' : left > previousLeft ? 'right' : 'left';
|
|
91
|
+
indicator.dataset.activationDirection = direction;
|
|
92
|
+
indicator.style.opacity = '1';
|
|
93
|
+
indicator.style.setProperty('--active-tab-left', `${left}px`);
|
|
94
|
+
indicator.style.setProperty('--active-tab-top', `${active.offsetTop}px`);
|
|
95
|
+
indicator.style.setProperty('--active-tab-width', `${active.offsetWidth}px`);
|
|
96
|
+
indicator.style.setProperty('--active-tab-height', `${active.offsetHeight}px`);
|
|
97
|
+
previousLeftRef.current = left;
|
|
98
|
+
};
|
|
99
|
+
const resizeObserver = new ResizeObserver((entries)=>{
|
|
100
|
+
const isGenuineResize = entries.some((entry)=>{
|
|
101
|
+
if (pendingInitialObserve.has(entry.target)) {
|
|
102
|
+
pendingInitialObserve.delete(entry.target);
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
});
|
|
107
|
+
if (isGenuineResize) {
|
|
108
|
+
update(true);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
observeResize(list);
|
|
112
|
+
update();
|
|
113
|
+
const mutationObserver = new MutationObserver(()=>update(false));
|
|
114
|
+
mutationObserver.observe(list, {
|
|
115
|
+
attributes: true,
|
|
116
|
+
attributeFilter: [
|
|
117
|
+
'aria-selected',
|
|
118
|
+
'data-active',
|
|
119
|
+
'class'
|
|
120
|
+
],
|
|
121
|
+
subtree: true,
|
|
122
|
+
childList: true
|
|
123
|
+
});
|
|
124
|
+
return ()=>{
|
|
125
|
+
mutationObserver.disconnect();
|
|
126
|
+
resizeObserver.disconnect();
|
|
127
|
+
};
|
|
128
|
+
}, [
|
|
129
|
+
activeSelector
|
|
130
|
+
]);
|
|
131
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
132
|
+
ref: ref,
|
|
133
|
+
"data-slot": "segmented-control-indicator",
|
|
134
|
+
"data-activation-direction": "none",
|
|
135
|
+
className: cn('opacity-0', segmentedControlIndicatorVariants({
|
|
136
|
+
size
|
|
137
|
+
}), className),
|
|
138
|
+
style: style,
|
|
139
|
+
...props
|
|
140
|
+
});
|
|
88
141
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
142
|
+
const segmentedControlButtonVariants = cva('text-sm leading-4.5 tracking-normal font-medium relative z-10 inline-flex flex-1 items-center justify-center whitespace-nowrap text-muted-foreground dark:text-muted-foreground border border-transparent transition-[color,box-shadow] duration-200 ease-out focus-visible:border-ring focus-visible:ring focus-visible:ring-ring-shadow focus-visible:outline-1 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 data-disabled:pointer-events-none data-disabled:opacity-50 hover:text-foreground data-active:text-foreground data-active:hover:text-foreground', {
|
|
143
|
+
variants: {
|
|
144
|
+
size: {
|
|
145
|
+
default: 'rounded-md',
|
|
146
|
+
small: 'rounded-sm'
|
|
147
|
+
},
|
|
148
|
+
tabContent: {
|
|
149
|
+
'icon-label': '',
|
|
150
|
+
'label-only': '',
|
|
151
|
+
'icon-only': 'px-0'
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
compoundVariants: [
|
|
155
|
+
{
|
|
156
|
+
size: 'default',
|
|
157
|
+
tabContent: 'icon-label',
|
|
158
|
+
className: 'h-8 gap-2 px-2 py-0'
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
size: 'default',
|
|
162
|
+
tabContent: 'label-only',
|
|
163
|
+
className: 'h-8 gap-0 px-2 py-0'
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
size: 'default',
|
|
167
|
+
tabContent: 'icon-only',
|
|
168
|
+
className: 'size-8 gap-0 py-0'
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
size: 'small',
|
|
172
|
+
tabContent: 'icon-label',
|
|
173
|
+
className: 'h-6 gap-2 px-2 py-0'
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
size: 'small',
|
|
177
|
+
tabContent: 'label-only',
|
|
178
|
+
className: 'h-6 gap-0 px-2 py-0'
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
size: 'small',
|
|
182
|
+
tabContent: 'icon-only',
|
|
183
|
+
className: 'size-6 gap-0 py-0'
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
defaultVariants: {
|
|
187
|
+
size: 'default',
|
|
188
|
+
tabContent: 'icon-label'
|
|
189
|
+
}
|
|
137
190
|
});
|
|
138
|
-
function
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
191
|
+
function SegmentedControlButton({ className, size, tabContent, ...props }) {
|
|
192
|
+
const resolvedSize = useSegmentedControlSize(size);
|
|
193
|
+
return /*#__PURE__*/ _jsx(TabsPrimitive.Tab, {
|
|
194
|
+
"data-slot": "segmented-control-trigger",
|
|
195
|
+
className: cn(segmentedControlButtonVariants({
|
|
196
|
+
size: resolvedSize,
|
|
197
|
+
tabContent
|
|
198
|
+
}), className),
|
|
199
|
+
...props
|
|
200
|
+
});
|
|
148
201
|
}
|
|
149
|
-
function
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
202
|
+
function SegmentedControlContent({ className, ...props }) {
|
|
203
|
+
return /*#__PURE__*/ _jsx(TabsPrimitive.Panel, {
|
|
204
|
+
"data-slot": "segmented-control-content",
|
|
205
|
+
className: cn('flex-1 outline-none', className),
|
|
206
|
+
...props
|
|
207
|
+
});
|
|
155
208
|
}
|
|
156
|
-
|
|
157
|
-
|
|
209
|
+
export { SegmentedControl, SegmentedControlButton, SegmentedControlContent, SegmentedControlIndicator, SegmentedControlList, segmentedControlButtonVariants, segmentedControlIndicatorVariants, segmentedControlListVariants };
|
|
210
|
+
|
|
211
|
+
//# sourceMappingURL=segmented-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/segmented-control/segmented-control.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type Context,\n type ReactNode,\n createContext,\n useContext,\n useLayoutEffect,\n useRef,\n} from 'react';\n\nimport { Tabs as TabsPrimitive } from '@base-ui/react/tabs';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassProp } from 'class-variance-authority/types';\n\nimport { cn } from '../../../../lib/utils';\n\nfunction SegmentedControl({\n className,\n ...props\n}: TabsPrimitive.Root.Props): ReactNode {\n return (\n <TabsPrimitive.Root\n data-slot=\"segmented-control\"\n className={cn('flex flex-col gap-2', className)}\n {...props}\n />\n );\n}\n\ninterface SegmentedControlSizeVariantProps {\n size?: 'small' | 'default' | null;\n}\n\nconst segmentedControlListVariants: (\n props?: (SegmentedControlSizeVariantProps & ClassProp) | undefined\n) => string = cva(\n 'bg-medium-background text-muted-foreground relative isolate inline-flex w-fit items-center justify-center gap-2 p-0.5',\n {\n variants: {\n size: {\n default: 'h-9 rounded-lg',\n small: 'h-7 rounded-md',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\ntype SegmentedControlSize = NonNullable<\n VariantProps<typeof segmentedControlListVariants>['size']\n>;\n\nconst SegmentedControlSizeContext: Context<SegmentedControlSize | undefined> =\n createContext<SegmentedControlSize | undefined>(undefined);\n\nfunction useSegmentedControlSize(\n size?: SegmentedControlSize | null\n): SegmentedControlSize {\n const inherited = useContext(SegmentedControlSizeContext);\n return size ?? inherited ?? 'default';\n}\n\ntype SegmentedControlListProps = TabsPrimitive.List.Props &\n VariantProps<typeof segmentedControlListVariants>;\n\nfunction SegmentedControlList({\n className,\n size,\n children,\n ...props\n}: SegmentedControlListProps): ReactNode {\n const resolvedSize = size ?? 'default';\n\n return (\n <TabsPrimitive.List\n data-slot=\"segmented-control-list\"\n className={cn(segmentedControlListVariants({ size }), className)}\n {...props}\n >\n <SegmentedControlSizeContext.Provider value={resolvedSize}>\n <SegmentedControlIndicator\n size={resolvedSize}\n activeSelector='[aria-selected=\"true\"]'\n />\n {children}\n </SegmentedControlSizeContext.Provider>\n </TabsPrimitive.List>\n );\n}\n\nconst segmentedControlIndicatorVariants: (\n props?: (SegmentedControlSizeVariantProps & ClassProp) | undefined\n) => string = cva(\n 'bg-background shadow-sm pointer-events-none absolute top-(--active-tab-top) left-(--active-tab-left) -z-0 h-(--active-tab-height) w-(--active-tab-width) motion-safe:transition-[top,left,width,height] motion-safe:duration-200 motion-safe:ease-out data-[activation-direction=none]:transition-none',\n {\n variants: {\n size: {\n default: 'rounded-md',\n small: 'rounded-sm',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n }\n);\n\ntype SegmentedControlIndicatorProps = ComponentProps<'div'> &\n VariantProps<typeof segmentedControlIndicatorVariants> & {\n activeSelector?: string;\n };\n\nfunction SegmentedControlIndicator({\n className,\n size,\n activeSelector = '[aria-selected=\"true\"],[data-active]',\n style,\n ...props\n}: SegmentedControlIndicatorProps): ReactNode {\n const ref = useRef<HTMLDivElement>(null);\n const previousLeftRef = useRef<number | null>(null);\n\n useLayoutEffect(() => {\n const indicator = ref.current;\n const list = indicator?.parentElement;\n if (!indicator || !list) {\n return undefined;\n }\n\n let currentActive: HTMLElement | null = null;\n const pendingInitialObserve = new Set<Element>();\n\n const observeResize = (element: Element): void => {\n pendingInitialObserve.add(element);\n resizeObserver.observe(element);\n };\n\n const update = (isResize = false): void => {\n const active = list.querySelector<HTMLElement>(activeSelector);\n if (!active) {\n indicator.style.opacity = '0';\n return;\n }\n\n if (active !== currentActive) {\n if (currentActive) {\n resizeObserver.unobserve(currentActive);\n }\n observeResize(active);\n currentActive = active;\n }\n\n const left = active.offsetLeft;\n const previousLeft = previousLeftRef.current;\n const direction =\n isResize || previousLeft === null || left === previousLeft\n ? 'none'\n : left > previousLeft\n ? 'right'\n : 'left';\n\n indicator.dataset.activationDirection = direction;\n indicator.style.opacity = '1';\n indicator.style.setProperty('--active-tab-left', `${left}px`);\n indicator.style.setProperty('--active-tab-top', `${active.offsetTop}px`);\n indicator.style.setProperty(\n '--active-tab-width',\n `${active.offsetWidth}px`\n );\n indicator.style.setProperty(\n '--active-tab-height',\n `${active.offsetHeight}px`\n );\n\n previousLeftRef.current = left;\n };\n\n const resizeObserver = new ResizeObserver((entries) => {\n const isGenuineResize = entries.some((entry) => {\n if (pendingInitialObserve.has(entry.target)) {\n pendingInitialObserve.delete(entry.target);\n return false;\n }\n return true;\n });\n if (isGenuineResize) {\n update(true);\n }\n });\n observeResize(list);\n\n update();\n\n const mutationObserver = new MutationObserver(() => update(false));\n mutationObserver.observe(list, {\n attributes: true,\n attributeFilter: ['aria-selected', 'data-active', 'class'],\n subtree: true,\n childList: true,\n });\n\n return () => {\n mutationObserver.disconnect();\n resizeObserver.disconnect();\n };\n }, [activeSelector]);\n\n return (\n <div\n ref={ref}\n data-slot=\"segmented-control-indicator\"\n data-activation-direction=\"none\"\n className={cn(\n 'opacity-0',\n segmentedControlIndicatorVariants({ size }),\n className\n )}\n style={style}\n {...props}\n />\n );\n}\n\ninterface SegmentedControlButtonVariantProps extends SegmentedControlSizeVariantProps {\n tabContent?: 'icon-label' | 'label-only' | 'icon-only' | null;\n}\n\nconst segmentedControlButtonVariants: (\n props?: (SegmentedControlButtonVariantProps & ClassProp) | undefined\n) => string = cva(\n 'text-sm leading-4.5 tracking-normal font-medium relative z-10 inline-flex flex-1 items-center justify-center whitespace-nowrap text-muted-foreground dark:text-muted-foreground border border-transparent transition-[color,box-shadow] duration-200 ease-out focus-visible:border-ring focus-visible:ring focus-visible:ring-ring-shadow focus-visible:outline-1 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 data-disabled:pointer-events-none data-disabled:opacity-50 hover:text-foreground data-active:text-foreground data-active:hover:text-foreground',\n {\n variants: {\n size: {\n default: 'rounded-md',\n small: 'rounded-sm',\n },\n tabContent: {\n 'icon-label': '',\n 'label-only': '',\n 'icon-only': 'px-0',\n },\n },\n compoundVariants: [\n {\n size: 'default',\n tabContent: 'icon-label',\n className: 'h-8 gap-2 px-2 py-0',\n },\n {\n size: 'default',\n tabContent: 'label-only',\n className: 'h-8 gap-0 px-2 py-0',\n },\n {\n size: 'default',\n tabContent: 'icon-only',\n className: 'size-8 gap-0 py-0',\n },\n {\n size: 'small',\n tabContent: 'icon-label',\n className: 'h-6 gap-2 px-2 py-0',\n },\n {\n size: 'small',\n tabContent: 'label-only',\n className: 'h-6 gap-0 px-2 py-0',\n },\n {\n size: 'small',\n tabContent: 'icon-only',\n className: 'size-6 gap-0 py-0',\n },\n ],\n defaultVariants: {\n size: 'default',\n tabContent: 'icon-label',\n },\n }\n);\n\ntype SegmentedControlButtonProps = TabsPrimitive.Tab.Props &\n VariantProps<typeof segmentedControlButtonVariants>;\n\nfunction SegmentedControlButton({\n className,\n size,\n tabContent,\n ...props\n}: SegmentedControlButtonProps): ReactNode {\n const resolvedSize = useSegmentedControlSize(size);\n\n return (\n <TabsPrimitive.Tab\n data-slot=\"segmented-control-trigger\"\n className={cn(\n segmentedControlButtonVariants({ size: resolvedSize, tabContent }),\n className\n )}\n {...props}\n />\n );\n}\n\nfunction SegmentedControlContent({\n className,\n ...props\n}: TabsPrimitive.Panel.Props): ReactNode {\n return (\n <TabsPrimitive.Panel\n data-slot=\"segmented-control-content\"\n className={cn('flex-1 outline-none', className)}\n {...props}\n />\n );\n}\n\nexport {\n SegmentedControl,\n SegmentedControlButton,\n SegmentedControlContent,\n SegmentedControlIndicator,\n SegmentedControlList,\n segmentedControlButtonVariants,\n segmentedControlIndicatorVariants,\n segmentedControlListVariants,\n};\nexport type { SegmentedControlSize };\n"],"names":["createContext","useContext","useLayoutEffect","useRef","Tabs","TabsPrimitive","cva","cn","SegmentedControl","className","props","Root","data-slot","segmentedControlListVariants","variants","size","default","small","defaultVariants","SegmentedControlSizeContext","undefined","useSegmentedControlSize","inherited","SegmentedControlList","children","resolvedSize","List","Provider","value","SegmentedControlIndicator","activeSelector","segmentedControlIndicatorVariants","style","ref","previousLeftRef","indicator","current","list","parentElement","currentActive","pendingInitialObserve","Set","observeResize","element","add","resizeObserver","observe","update","isResize","active","querySelector","opacity","unobserve","left","offsetLeft","previousLeft","direction","dataset","activationDirection","setProperty","offsetTop","offsetWidth","offsetHeight","ResizeObserver","entries","isGenuineResize","some","entry","has","target","delete","mutationObserver","MutationObserver","attributes","attributeFilter","subtree","childList","disconnect","div","data-activation-direction","segmentedControlButtonVariants","tabContent","compoundVariants","SegmentedControlButton","Tab","SegmentedControlContent","Panel"],"mappings":"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"}
|
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ReactNode } from
|
|
2
|
-
import { SelectTriggerProps
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ReactNode } from "react";
|
|
2
|
+
import type { SelectTriggerProps } from "@base-ui/react/select";
|
|
3
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
4
|
+
type SelectPropsBase = Omit<SelectPrimitive.Root.Props<string>, "open" | "defaultOpen" | "onOpenChange" | "value" | "defaultValue" | "onValueChange" | "multiple"> & {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
8
|
};
|
|
8
9
|
type SelectPropsSingle = SelectPropsBase & {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
multiple?: false;
|
|
11
|
+
value?: string;
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
13
14
|
};
|
|
14
15
|
type SelectPropsMultiple = SelectPropsBase & {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
multiple: true;
|
|
17
|
+
value?: string[];
|
|
18
|
+
defaultValue?: string[];
|
|
19
|
+
onValueChange?: (value: string[]) => void;
|
|
19
20
|
};
|
|
20
21
|
declare function Select(props: SelectPropsSingle): ReactNode;
|
|
21
22
|
declare function Select(props: SelectPropsMultiple): ReactNode;
|
|
22
23
|
declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): ReactNode;
|
|
23
24
|
declare function SelectValue({ icon, ...props }: SelectPrimitive.Value.Props & {
|
|
24
|
-
|
|
25
|
+
icon?: ReactNode;
|
|
25
26
|
}): ReactNode;
|
|
26
27
|
declare const SelectTrigger: ForwardRefExoticComponent<Omit<SelectTriggerProps & {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
28
|
+
size?: "sm" | "default";
|
|
29
|
+
errorMessage?: string;
|
|
30
|
+
}, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
30
31
|
declare function SelectContent({ className, children, position: _position, align, alignOffset, side, sideOffset, ...props }: SelectPrimitive.Popup.Props & {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
position?: "popper" | "item-aligned";
|
|
33
|
+
align?: SelectPrimitive.Positioner.Props["align"];
|
|
34
|
+
alignOffset?: SelectPrimitive.Positioner.Props["alignOffset"];
|
|
35
|
+
side?: SelectPrimitive.Positioner.Props["side"];
|
|
36
|
+
sideOffset?: SelectPrimitive.Positioner.Props["sideOffset"];
|
|
36
37
|
}): ReactNode;
|
|
37
38
|
declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): ReactNode;
|
|
38
39
|
declare function SelectItem({ className, children, icon, suffix, ...props }: SelectPrimitive.Item.Props & {
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
icon?: ReactNode;
|
|
41
|
+
suffix?: ReactNode;
|
|
41
42
|
}): ReactNode;
|
|
42
43
|
declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): ReactNode;
|
|
43
44
|
declare function SelectScrollUpButton({ className, ...props }: SelectPrimitive.ScrollUpArrow.Props): ReactNode;
|
|
44
45
|
declare function SelectScrollDownButton({ className, ...props }: SelectPrimitive.ScrollDownArrow.Props): ReactNode;
|
|
45
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue
|
|
46
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|