@cognite/aura 0.3.5 → 1.46105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +264 -0
- package/DESIGN.md +638 -281
- package/LICENSE +21 -0
- package/README.md +21 -13
- package/dist/colors-deprecated.css +587 -0
- package/dist/colors.css +803 -830
- package/dist/components/index.d.ts +63 -57
- package/dist/components/index.js +62 -59
- package/dist/components/index.js.map +1 -0
- package/dist/components/ui/core/accordion/accordion.d.ts +19 -18
- package/dist/components/ui/core/accordion/accordion.js +99 -78
- package/dist/components/ui/core/accordion/accordion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.d.ts +8 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js +125 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar-motion.js.map +1 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +31 -31
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +156 -106
- package/dist/components/ui/core/action-toolbar/action-toolbar.js.map +1 -0
- package/dist/components/ui/core/alert/alert.d.ts +25 -25
- package/dist/components/ui/core/alert/alert.js +181 -152
- package/dist/components/ui/core/alert/alert.js.map +1 -0
- package/dist/components/ui/core/avatar/avatar.d.ts +10 -9
- package/dist/components/ui/core/avatar/avatar.js +75 -65
- package/dist/components/ui/core/avatar/avatar.js.map +1 -0
- package/dist/components/ui/core/badge/badge.d.ts +13 -12
- package/dist/components/ui/core/badge/badge.js +88 -72
- package/dist/components/ui/core/badge/badge.js.map +1 -0
- package/dist/components/ui/core/banner/banner.d.ts +18 -18
- package/dist/components/ui/core/banner/banner.js +179 -142
- package/dist/components/ui/core/banner/banner.js.map +1 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +12 -12
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +139 -104
- package/dist/components/ui/core/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/components/ui/core/button/button.d.ts +7 -7
- package/dist/components/ui/core/button/button.gallery.d.ts +2 -0
- package/dist/components/ui/core/button/button.gallery.js +76 -0
- package/dist/components/ui/core/button/button.gallery.js.map +1 -0
- package/dist/components/ui/core/button/button.js +57 -47
- package/dist/components/ui/core/button/button.js.map +1 -0
- package/dist/components/ui/core/button-group/button-group.d.ts +9 -9
- package/dist/components/ui/core/button-group/button-group.js +50 -40
- package/dist/components/ui/core/button-group/button-group.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-header.d.ts +7 -7
- package/dist/components/ui/core/calendar/calendar-header.js +102 -63
- package/dist/components/ui/core/calendar/calendar-header.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar-utils.d.ts +30 -30
- package/dist/components/ui/core/calendar/calendar-utils.js +116 -39
- package/dist/components/ui/core/calendar/calendar-utils.js.map +1 -0
- package/dist/components/ui/core/calendar/calendar.d.ts +10 -10
- package/dist/components/ui/core/calendar/calendar.js +95 -66
- package/dist/components/ui/core/calendar/calendar.js.map +1 -0
- package/dist/components/ui/core/calendar/constants.js +3 -0
- package/dist/components/ui/core/calendar/constants.js.map +1 -0
- package/dist/components/ui/core/card/card.d.ts +20 -20
- package/dist/components/ui/core/card/card.js +133 -104
- package/dist/components/ui/core/card/card.js.map +1 -0
- package/dist/components/ui/core/chart/chart.d.ts +55 -53
- package/dist/components/ui/core/chart/chart.js +196 -116
- package/dist/components/ui/core/chart/chart.js.map +1 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -2
- package/dist/components/ui/core/chart/index.js +3 -2
- package/dist/components/ui/core/chart/index.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +9 -9
- package/dist/components/ui/core/checkbox/checkbox.js +88 -68
- package/dist/components/ui/core/checkbox/checkbox.js.map +1 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +1 -1
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +6 -7
- package/dist/components/ui/core/checkbox/checkbox.metadata.js.map +1 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +19 -19
- package/dist/components/ui/core/code-block/code-block.js +259 -175
- package/dist/components/ui/core/code-block/code-block.js.map +1 -0
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -5
- package/dist/components/ui/core/collapsible/collapsible.js +36 -30
- package/dist/components/ui/core/collapsible/collapsible.js.map +1 -0
- package/dist/components/ui/core/combobox/combobox.d.ts +13 -13
- package/dist/components/ui/core/combobox/combobox.js +89 -40
- package/dist/components/ui/core/combobox/combobox.js.map +1 -0
- package/dist/components/ui/core/command/command.d.ts +20 -18
- package/dist/components/ui/core/command/command.js +137 -85
- package/dist/components/ui/core/command/command.js.map +1 -0
- package/dist/components/ui/core/conversation/conversation.d.ts +14 -0
- package/dist/components/ui/core/conversation/conversation.js +51 -0
- package/dist/components/ui/core/conversation/conversation.js.map +1 -0
- package/dist/components/ui/core/count/count.d.ts +8 -6
- package/dist/components/ui/core/count/count.js +51 -21
- package/dist/components/ui/core/count/count.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-cell.d.ts +7 -7
- package/dist/components/ui/core/data-grid/data-grid-cell.js +22 -22
- package/dist/components/ui/core/data-grid/data-grid-cell.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.d.ts +14 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js +36 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-clauses.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.d.ts +41 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js +273 -0
- package/dist/components/ui/core/data-grid/data-grid-filter-panel.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.d.ts +6 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js +34 -0
- package/dist/components/ui/core/data-grid/data-grid-footer.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header-row.d.ts +10 -10
- package/dist/components/ui/core/data-grid/data-grid-header-row.js +69 -55
- package/dist/components/ui/core/data-grid/data-grid-header-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-header.d.ts +11 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js +67 -0
- package/dist/components/ui/core/data-grid/data-grid-header.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid-row.d.ts +15 -15
- package/dist/components/ui/core/data-grid/data-grid-row.js +104 -76
- package/dist/components/ui/core/data-grid/data-grid-row.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.d.ts +85 -35
- package/dist/components/ui/core/data-grid/data-grid.fixtures.d.ts +7 -7
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js +139 -0
- package/dist/components/ui/core/data-grid/data-grid.fixtures.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.js +402 -132
- package/dist/components/ui/core/data-grid/data-grid.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.utils.d.ts +3 -3
- package/dist/components/ui/core/data-grid/data-grid.utils.js +44 -33
- package/dist/components/ui/core/data-grid/data-grid.utils.js.map +1 -0
- package/dist/components/ui/core/data-grid/index.d.ts +4 -1
- package/dist/components/ui/core/data-grid/index.js +5 -2
- package/dist/components/ui/core/data-grid/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +85 -61
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +14 -14
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +51 -36
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +11 -13
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +89 -64
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -4
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +95 -60
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js +120 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.d.ts +25 -32
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js +78 -0
- package/dist/components/ui/core/date-time-pickers/date-time-picker/use-date-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +13 -15
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +165 -119
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +37 -37
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +163 -104
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +17 -12
- package/dist/components/ui/core/date-time-pickers/index.js +10 -6
- package/dist/components/ui/core/date-time-pickers/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +52 -42
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +6 -1
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +16 -15
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +87 -64
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +10 -9
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +89 -38
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +34 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +23 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +95 -52
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +22 -18
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.d.ts +19 -19
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +41 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +33 -24
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +5 -5
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +9 -4
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -9
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +22 -17
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.d.ts +13 -13
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +49 -40
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +7 -7
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +41 -34
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.d.ts +3 -3
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.d.ts +12 -14
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +99 -79
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.d.ts +20 -20
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +63 -41
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.d.ts +3 -1
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/index.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.d.ts +14 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js +115 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.d.ts +30 -36
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js +3 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/types.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.d.ts +2 -2
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js +145 -0
- package/dist/components/ui/core/date-time-pickers/time-range-picker/use-time-range-picker.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.d.ts +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js +67 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-input.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +18 -18
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js +42 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +31 -29
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js +56 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +21 -21
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js +170 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +28 -28
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +88 -7
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js.map +1 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +17 -17
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.js.map +1 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +12 -9
- package/dist/components/ui/core/dialog/dialog.js +90 -82
- package/dist/components/ui/core/dialog/dialog.js.map +1 -0
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +22 -19
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +204 -149
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +4 -4
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -5
- package/dist/components/ui/core/empty-state/empty-state.context.js.map +1 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +14 -14
- package/dist/components/ui/core/empty-state/empty-state.js +96 -82
- package/dist/components/ui/core/empty-state/empty-state.js.map +1 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -7
- package/dist/components/ui/core/helper-text/helper-text.js +55 -36
- package/dist/components/ui/core/helper-text/helper-text.js.map +1 -0
- package/dist/components/ui/core/hover-card/hover-card.d.ts +7 -6
- package/dist/components/ui/core/hover-card/hover-card.js +56 -52
- package/dist/components/ui/core/hover-card/hover-card.js.map +1 -0
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.js +121 -97
- package/dist/components/ui/core/inline-citation/inline-citation.js.map +1 -0
- package/dist/components/ui/core/input/input.d.ts +2 -2
- package/dist/components/ui/core/input/input.js +15 -13
- package/dist/components/ui/core/input/input.js.map +1 -0
- package/dist/components/ui/core/input-group/input-group.d.ts +25 -14
- package/dist/components/ui/core/input-group/input-group.js +149 -76
- package/dist/components/ui/core/input-group/input-group.js.map +1 -0
- package/dist/components/ui/core/item/item.d.ts +20 -0
- package/dist/components/ui/core/item/item.js +93 -0
- package/dist/components/ui/core/item/item.js.map +1 -0
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -3
- package/dist/components/ui/core/kbd/kbd.js +24 -20
- package/dist/components/ui/core/kbd/kbd.js.map +1 -0
- package/dist/components/ui/core/label/label.d.ts +3 -3
- package/dist/components/ui/core/label/label.js +33 -26
- package/dist/components/ui/core/label/label.js.map +1 -0
- package/dist/components/ui/core/loader/loader.d.ts +6 -6
- package/dist/components/ui/core/loader/loader.js +97 -80
- package/dist/components/ui/core/loader/loader.js.map +1 -0
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.d.ts +9 -9
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +19 -12
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js.map +1 -0
- package/dist/components/ui/core/message/message-response-math-plugin.d.ts +3 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js +6 -0
- package/dist/components/ui/core/message/message-response-math-plugin.js.map +1 -0
- package/dist/components/ui/core/message/message.d.ts +27 -23
- package/dist/components/ui/core/message/message.js +453 -316
- package/dist/components/ui/core/message/message.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.d.ts +21 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js +197 -0
- package/dist/components/ui/core/overflow-list/overflow-list.js.map +1 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.d.ts +37 -35
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js +206 -0
- package/dist/components/ui/core/overflow-list/overflow-list.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +2 -2
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -5
- package/dist/components/ui/core/pagination/pagination-size-context.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +9 -9
- package/dist/components/ui/core/pagination/pagination-teleport.js +127 -84
- package/dist/components/ui/core/pagination/pagination-teleport.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js.map +1 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +39 -39
- package/dist/components/ui/core/pagination/pagination.js +294 -234
- package/dist/components/ui/core/pagination/pagination.js.map +1 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -11
- package/dist/components/ui/core/popover/popover.js +104 -89
- package/dist/components/ui/core/popover/popover.js.map +1 -0
- package/dist/components/ui/core/progress/progress.d.ts +9 -8
- package/dist/components/ui/core/progress/progress.js +50 -35
- package/dist/components/ui/core/progress/progress.js.map +1 -0
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +27 -27
- package/dist/components/ui/core/prompt-input/prompt-input.js +342 -271
- package/dist/components/ui/core/prompt-input/prompt-input.js.map +1 -0
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -12
- package/dist/components/ui/core/radio-group/radio-group.js +88 -58
- package/dist/components/ui/core/radio-group/radio-group.js.map +1 -0
- package/dist/components/ui/core/reasoning/reasoning.d.ts +7 -7
- package/dist/components/ui/core/reasoning/reasoning.js +68 -56
- package/dist/components/ui/core/reasoning/reasoning.js.map +1 -0
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -4
- package/dist/components/ui/core/scroll-area/scroll-area.js +50 -40
- package/dist/components/ui/core/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/ui/core/search/search.d.ts +8 -8
- package/dist/components/ui/core/search/search.js +122 -76
- package/dist/components/ui/core/search/search.js.map +1 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +10 -10
- package/dist/components/ui/core/segmented-control/segmented-control.js +203 -149
- package/dist/components/ui/core/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/ui/core/select/select.d.ts +27 -26
- package/dist/components/ui/core/select/select.js +213 -168
- package/dist/components/ui/core/select/select.js.map +1 -0
- package/dist/components/ui/core/separator/separator.d.ts +2 -2
- package/dist/components/ui/core/separator/separator.js +13 -13
- package/dist/components/ui/core/separator/separator.js.map +1 -0
- package/dist/components/ui/core/shimmer/shimmer.d.ts +8 -8
- package/dist/components/ui/core/shimmer/shimmer.js +64 -40
- package/dist/components/ui/core/shimmer/shimmer.js.map +1 -0
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -2
- package/dist/components/ui/core/skeleton/skeleton.js +13 -13
- package/dist/components/ui/core/skeleton/skeleton.js.map +1 -0
- package/dist/components/ui/core/slider/slider.d.ts +7 -7
- package/dist/components/ui/core/slider/slider.js +51 -39
- package/dist/components/ui/core/slider/slider.js.map +1 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +67 -54
- package/dist/components/ui/core/sonner-toast/sonner-toast.js.map +1 -0
- package/dist/components/ui/core/sources/sources.d.ts +12 -12
- package/dist/components/ui/core/sources/sources.js +87 -58
- package/dist/components/ui/core/sources/sources.js.map +1 -0
- package/dist/components/ui/core/switch/switch.d.ts +9 -9
- package/dist/components/ui/core/switch/switch.js +83 -61
- package/dist/components/ui/core/switch/switch.js.map +1 -0
- package/dist/components/ui/core/switch/switch.metadata.d.ts +1 -1
- package/dist/components/ui/core/switch/switch.metadata.js +8 -0
- package/dist/components/ui/core/switch/switch.metadata.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.d.ts +20 -18
- package/dist/components/ui/core/tabs/tabs.js +176 -147
- package/dist/components/ui/core/tabs/tabs.js.map +1 -0
- package/dist/components/ui/core/tabs/tabs.utils.d.ts +1 -1
- package/dist/components/ui/core/tabs/tabs.utils.js +10 -6
- package/dist/components/ui/core/tabs/tabs.utils.js.map +1 -0
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -2
- package/dist/components/ui/core/textarea/textarea.js +13 -13
- package/dist/components/ui/core/textarea/textarea.js.map +1 -0
- package/dist/components/ui/core/toggle/toggle.d.ts +9 -9
- package/dist/components/ui/core/toggle/toggle.js +60 -54
- package/dist/components/ui/core/toggle/toggle.js.map +1 -0
- package/dist/components/ui/core/tool/tool.d.ts +18 -18
- package/dist/components/ui/core/tool/tool.js +167 -126
- package/dist/components/ui/core/tool/tool.js.map +1 -0
- package/dist/components/ui/core/toolbar/toolbar.d.ts +37 -0
- package/dist/components/ui/core/toolbar/toolbar.js +171 -0
- package/dist/components/ui/core/toolbar/toolbar.js.map +1 -0
- package/dist/components/ui/core/tooltip/tooltip.d.ts +8 -7
- package/dist/components/ui/core/tooltip/tooltip.js +53 -46
- package/dist/components/ui/core/tooltip/tooltip.js.map +1 -0
- package/dist/components/ui/core/topbar/topbar.d.ts +26 -26
- package/dist/components/ui/core/topbar/topbar.js +160 -105
- package/dist/components/ui/core/topbar/topbar.js.map +1 -0
- package/dist/components/ui/core/tree/tree.d.ts +20 -0
- package/dist/components/ui/core/tree/tree.js +100 -0
- package/dist/components/ui/core/tree/tree.js.map +1 -0
- package/dist/eslint/index.d.ts +5 -5
- package/dist/eslint/index.js +9 -5
- package/dist/eslint/index.js.map +1 -0
- package/dist/eslint/no-overriding-styles.d.ts +1 -1
- package/dist/eslint/no-overriding-styles.js +341 -201
- package/dist/eslint/no-overriding-styles.js.map +1 -0
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +2 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/ai/types.d.ts +43 -43
- package/dist/lib/ai/types.js +3 -0
- package/dist/lib/ai/types.js.map +1 -0
- package/dist/lib/decorative-variant-classes.d.ts +53 -0
- package/dist/lib/decorative-variant-classes.js +58 -0
- package/dist/lib/decorative-variant-classes.js.map +1 -0
- package/dist/lib/highlight-code.d.ts +11 -8
- package/dist/lib/highlight-code.js +58 -40
- package/dist/lib/highlight-code.js.map +1 -0
- package/dist/lib/portal-container-context.d.ts +1 -1
- package/dist/lib/portal-container-context.js +8 -8
- package/dist/lib/portal-container-context.js.map +1 -0
- package/dist/lib/shared-theme-from-url.d.ts +13 -0
- package/dist/lib/shared-theme-from-url.js +61 -0
- package/dist/lib/shared-theme-from-url.js.map +1 -0
- package/dist/lib/style-scope.d.ts +2 -2
- package/dist/lib/style-scope.js +6 -6
- package/dist/lib/style-scope.js.map +1 -0
- package/dist/lib/theme-share-url.d.ts +31 -0
- package/dist/lib/theme-share-url.js +116 -0
- package/dist/lib/theme-share-url.js.map +1 -0
- package/dist/lib/types.d.ts +39 -39
- package/dist/lib/types.js +3 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/use-controllable-state.d.ts +4 -7
- package/dist/lib/use-controllable-state.js +34 -21
- package/dist/lib/use-controllable-state.js.map +1 -0
- package/dist/lib/utils.d.ts +63 -34
- package/dist/lib/utils.js +134 -32
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +2 -1
- package/dist/styles.source.css +24 -12
- package/dist/utils/assign-ref.d.ts +3 -0
- package/dist/utils/assign-ref.js +13 -0
- package/dist/utils/assign-ref.js.map +1 -0
- package/package.json +46 -11
- package/src/components/ui/core/button/button.md +93 -0
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from
|
|
2
|
-
import { SelectTriggerProps } from
|
|
3
|
-
import { PaginationSize } from
|
|
4
|
-
import { PaginationTeleport } from
|
|
5
|
-
declare const Pagination: ForwardRefExoticComponent<Omit<ComponentProps<
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
declare const PaginationContent: ForwardRefExoticComponent<Omit<ComponentProps<
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
declare const PaginationItem: ForwardRefExoticComponent<ComponentProps<
|
|
12
|
-
declare const PaginationStatus: ForwardRefExoticComponent<ComponentProps<
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps } from "react";
|
|
2
|
+
import type { SelectTriggerProps } from "@base-ui/react";
|
|
3
|
+
import { type PaginationSize } from "./pagination-size-context";
|
|
4
|
+
import { PaginationTeleport } from "./pagination-teleport";
|
|
5
|
+
declare const Pagination: ForwardRefExoticComponent<Omit<ComponentProps<"nav"> & {
|
|
6
|
+
size?: PaginationSize;
|
|
7
|
+
}, "ref"> & RefAttributes<HTMLElement>>;
|
|
8
|
+
declare const PaginationContent: ForwardRefExoticComponent<Omit<ComponentProps<"ul"> & {
|
|
9
|
+
size?: PaginationSize;
|
|
10
|
+
}, "ref"> & RefAttributes<HTMLUListElement>>;
|
|
11
|
+
declare const PaginationItem: ForwardRefExoticComponent<ComponentProps<"li"> & RefAttributes<HTMLLIElement>>;
|
|
12
|
+
declare const PaginationStatus: ForwardRefExoticComponent<ComponentProps<"output"> & RefAttributes<HTMLOutputElement>>;
|
|
13
13
|
declare const PaginationSelectTrigger: ForwardRefExoticComponent<Omit<SelectTriggerProps & {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
14
|
+
size?: "sm" | "default";
|
|
15
|
+
errorMessage?: string;
|
|
16
|
+
}, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
17
17
|
type PaginationLinkProps = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} & ComponentProps<
|
|
22
|
-
declare const PaginationLink: ForwardRefExoticComponent<Omit<PaginationLinkProps,
|
|
23
|
-
declare const PaginationFirst: ForwardRefExoticComponent<Omit<Omit<PaginationLinkProps,
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
declare const PaginationPrevious: ForwardRefExoticComponent<Omit<Omit<PaginationLinkProps,
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
declare const PaginationNext: ForwardRefExoticComponent<Omit<Omit<PaginationLinkProps,
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
declare const PaginationLast: ForwardRefExoticComponent<Omit<Omit<PaginationLinkProps,
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
declare const PaginationEllipsis: ForwardRefExoticComponent<Omit<ComponentProps<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
declare const PaginationResultsPerPage: ForwardRefExoticComponent<ComponentProps<
|
|
40
|
-
declare const PaginationResultsPerPageLabel: ForwardRefExoticComponent<ComponentProps<
|
|
41
|
-
export { Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationResultsPerPage, PaginationResultsPerPageLabel, PaginationSelectTrigger, PaginationStatus, PaginationTeleport
|
|
18
|
+
isActive?: boolean;
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
size?: PaginationSize;
|
|
21
|
+
} & ComponentProps<"a">;
|
|
22
|
+
declare const PaginationLink: ForwardRefExoticComponent<Omit<PaginationLinkProps, "ref"> & RefAttributes<HTMLAnchorElement>>;
|
|
23
|
+
declare const PaginationFirst: ForwardRefExoticComponent<Omit<Omit<PaginationLinkProps, "isActive"> & {
|
|
24
|
+
label?: string;
|
|
25
|
+
}, "ref"> & RefAttributes<HTMLAnchorElement>>;
|
|
26
|
+
declare const PaginationPrevious: ForwardRefExoticComponent<Omit<Omit<PaginationLinkProps, "isActive"> & {
|
|
27
|
+
label?: string;
|
|
28
|
+
}, "ref"> & RefAttributes<HTMLAnchorElement>>;
|
|
29
|
+
declare const PaginationNext: ForwardRefExoticComponent<Omit<Omit<PaginationLinkProps, "isActive"> & {
|
|
30
|
+
label?: string;
|
|
31
|
+
}, "ref"> & RefAttributes<HTMLAnchorElement>>;
|
|
32
|
+
declare const PaginationLast: ForwardRefExoticComponent<Omit<Omit<PaginationLinkProps, "isActive"> & {
|
|
33
|
+
label?: string;
|
|
34
|
+
}, "ref"> & RefAttributes<HTMLAnchorElement>>;
|
|
35
|
+
declare const PaginationEllipsis: ForwardRefExoticComponent<Omit<ComponentProps<"span"> & {
|
|
36
|
+
size?: PaginationSize;
|
|
37
|
+
label?: string;
|
|
38
|
+
}, "ref"> & RefAttributes<HTMLSpanElement>>;
|
|
39
|
+
declare const PaginationResultsPerPage: ForwardRefExoticComponent<ComponentProps<"li"> & RefAttributes<HTMLLIElement>>;
|
|
40
|
+
declare const PaginationResultsPerPageLabel: ForwardRefExoticComponent<ComponentProps<"span"> & RefAttributes<HTMLSpanElement>>;
|
|
41
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationResultsPerPage, PaginationResultsPerPageLabel, PaginationSelectTrigger, PaginationStatus, PaginationTeleport };
|
|
@@ -1,234 +1,294 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
})
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
})
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { IconChevronLeft, IconChevronRight, IconChevronsLeft, IconChevronsRight, IconDots } from "@tabler/icons-react";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { cn } from "../../../../lib/utils.js";
|
|
6
|
+
import { Button } from "../button/button.js";
|
|
7
|
+
import { SelectTrigger } from "../select/select.js";
|
|
8
|
+
import { PaginationSizeContext, usePaginationSize } from "./pagination-size-context.js";
|
|
9
|
+
import { PaginationTeleport } from "./pagination-teleport.js";
|
|
10
|
+
const paginationLinkVariants = cva('border border-transparent text-base font-normal leading-5 tracking-tightest focus-visible:shadow-focus-ring', {
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
default: '',
|
|
14
|
+
small: 'text-sm leading-4.5 tracking-tight'
|
|
15
|
+
},
|
|
16
|
+
active: {
|
|
17
|
+
true: '',
|
|
18
|
+
false: ''
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
compoundVariants: [
|
|
22
|
+
{
|
|
23
|
+
active: false,
|
|
24
|
+
className: 'text-medium-foreground hover:bg-base-background-hover hover:text-base-foreground focus-visible:bg-medium-background focus-visible:text-base-foreground'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
active: true,
|
|
28
|
+
className: 'border-emphasized bg-secondary-background text-secondary-foreground hover:bg-base-background-hover hover:text-secondary-foreground focus-visible:bg-secondary-background focus-visible:text-secondary-foreground'
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
size: 'default',
|
|
33
|
+
active: false
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const paginationEllipsisVariants = cva('flex items-center justify-center text-medium-foreground', {
|
|
37
|
+
variants: {
|
|
38
|
+
size: {
|
|
39
|
+
default: 'h-9 w-9',
|
|
40
|
+
small: 'h-7 w-7'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
size: 'default'
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const paginationSelectTriggerVariants = cva('w-auto whitespace-nowrap min-h-0', {
|
|
48
|
+
variants: {
|
|
49
|
+
size: {
|
|
50
|
+
default: 'h-9 gap-2 rounded-lg px-3 min-w-19',
|
|
51
|
+
sm: 'h-7 gap-1.5 rounded-md px-2 min-w-16'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
size: 'default'
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const ICON_BUTTON_WIDTH_BY_SIZE = {
|
|
59
|
+
small: 'max-w-7',
|
|
60
|
+
default: 'max-w-9'
|
|
61
|
+
};
|
|
62
|
+
const TEXT_LINK_WIDTH_BY_SIZE = {
|
|
63
|
+
small: 'min-w-7',
|
|
64
|
+
default: 'min-w-9'
|
|
65
|
+
};
|
|
66
|
+
const getPaginationButtonStyles = (size = 'default')=>{
|
|
67
|
+
const buttonSize = size === 'small' ? 'sm' : 'default';
|
|
68
|
+
const radiusClass = size === 'small' ? 'rounded-md' : 'rounded-lg';
|
|
69
|
+
const iconButtonWidth = ICON_BUTTON_WIDTH_BY_SIZE[size];
|
|
70
|
+
const textLinkWidth = TEXT_LINK_WIDTH_BY_SIZE[size];
|
|
71
|
+
return {
|
|
72
|
+
buttonSize,
|
|
73
|
+
radiusClass,
|
|
74
|
+
iconButtonWidth,
|
|
75
|
+
textLinkWidth
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
const Pagination = /*#__PURE__*/ forwardRef(({ className, size = 'default', ...props }, ref)=>{
|
|
79
|
+
return /*#__PURE__*/ _jsx(PaginationSizeContext.Provider, {
|
|
80
|
+
value: size,
|
|
81
|
+
children: /*#__PURE__*/ _jsx("nav", {
|
|
82
|
+
ref: ref,
|
|
83
|
+
"aria-label": "pagination",
|
|
84
|
+
"data-slot": "pagination",
|
|
85
|
+
className: cn('mx-auto flex w-full justify-center gap-2', className),
|
|
86
|
+
...props
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
Pagination.displayName = 'Pagination';
|
|
91
|
+
const PaginationContent = /*#__PURE__*/ forwardRef(({ className, size, ...props }, ref)=>{
|
|
92
|
+
const inheritedSize = usePaginationSize();
|
|
93
|
+
const resolvedSize = size ?? inheritedSize;
|
|
94
|
+
return /*#__PURE__*/ _jsx(PaginationSizeContext.Provider, {
|
|
95
|
+
value: resolvedSize,
|
|
96
|
+
children: /*#__PURE__*/ _jsx("ul", {
|
|
97
|
+
ref: ref,
|
|
98
|
+
"data-slot": "pagination-content",
|
|
99
|
+
"data-size": resolvedSize,
|
|
100
|
+
className: cn('flex flex-row items-center gap-1', className),
|
|
101
|
+
...props
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
PaginationContent.displayName = 'PaginationContent';
|
|
106
|
+
const PaginationItem = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
107
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
108
|
+
ref: ref,
|
|
109
|
+
"data-slot": "pagination-item",
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
PaginationItem.displayName = 'PaginationItem';
|
|
114
|
+
const PaginationStatus = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
115
|
+
return /*#__PURE__*/ _jsx("output", {
|
|
116
|
+
ref: ref,
|
|
117
|
+
"data-slot": "pagination-status",
|
|
118
|
+
className: cn('flex items-center text-sm leading-4.5 tracking-tight font-normal text-muted-foreground', className),
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
PaginationStatus.displayName = 'PaginationStatus';
|
|
123
|
+
const PaginationSelectTrigger = /*#__PURE__*/ forwardRef(({ className, size, style, ...props }, ref)=>{
|
|
124
|
+
const inheritedSize = usePaginationSize();
|
|
125
|
+
const isPaginationSmall = inheritedSize === 'small' && size === undefined;
|
|
126
|
+
const resolvedSize = size ?? (isPaginationSmall ? 'sm' : 'default');
|
|
127
|
+
return /*#__PURE__*/ _jsx(SelectTrigger, {
|
|
128
|
+
ref: ref,
|
|
129
|
+
size: resolvedSize,
|
|
130
|
+
"data-slot": "pagination-select-trigger",
|
|
131
|
+
style: style,
|
|
132
|
+
className: cn(paginationSelectTriggerVariants({
|
|
133
|
+
size: resolvedSize
|
|
134
|
+
}), className),
|
|
135
|
+
...props
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
PaginationSelectTrigger.displayName = 'PaginationSelectTrigger';
|
|
139
|
+
const PaginationLink = /*#__PURE__*/ forwardRef(({ children, className, isActive, isDisabled, onClick, size, ...props }, ref)=>{
|
|
140
|
+
const inheritedSize = usePaginationSize();
|
|
141
|
+
const resolvedSize = size ?? inheritedSize;
|
|
142
|
+
const { buttonSize, radiusClass, textLinkWidth } = getPaginationButtonStyles(resolvedSize);
|
|
143
|
+
const handleClick = (event)=>{
|
|
144
|
+
if (isDisabled) {
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
onClick?.(event);
|
|
149
|
+
};
|
|
150
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
151
|
+
variant: "ghost",
|
|
152
|
+
size: buttonSize,
|
|
153
|
+
"data-slot": "pagination-link",
|
|
154
|
+
"data-active": isActive,
|
|
155
|
+
className: cn(radiusClass, textLinkWidth, paginationLinkVariants({
|
|
156
|
+
size: resolvedSize,
|
|
157
|
+
active: isActive
|
|
158
|
+
}), isDisabled && 'pointer-events-none text-base-foreground-disabled', className),
|
|
159
|
+
render: /*#__PURE__*/ _jsx("a", {
|
|
160
|
+
ref: ref,
|
|
161
|
+
"aria-current": isActive ? 'page' : undefined,
|
|
162
|
+
"aria-disabled": isDisabled || undefined,
|
|
163
|
+
onClick: handleClick,
|
|
164
|
+
tabIndex: isDisabled ? -1 : undefined,
|
|
165
|
+
...props,
|
|
166
|
+
children: children
|
|
167
|
+
})
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
PaginationLink.displayName = 'PaginationLink';
|
|
171
|
+
const PaginationIconLink = /*#__PURE__*/ forwardRef(({ ariaLabel, className, dataSlot, icon, isDisabled, onClick, size, ...linkProps }, ref)=>{
|
|
172
|
+
const inheritedSize = usePaginationSize();
|
|
173
|
+
const resolvedSize = size ?? inheritedSize;
|
|
174
|
+
const { buttonSize, radiusClass, iconButtonWidth } = getPaginationButtonStyles(resolvedSize);
|
|
175
|
+
const handleClick = (event)=>{
|
|
176
|
+
if (isDisabled) {
|
|
177
|
+
event.preventDefault();
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
onClick?.(event);
|
|
181
|
+
};
|
|
182
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
183
|
+
variant: "ghost",
|
|
184
|
+
size: buttonSize,
|
|
185
|
+
"data-slot": dataSlot,
|
|
186
|
+
className: cn(radiusClass, iconButtonWidth, paginationLinkVariants({
|
|
187
|
+
size: resolvedSize,
|
|
188
|
+
active: false
|
|
189
|
+
}), isDisabled && 'pointer-events-none text-base-foreground-disabled', className),
|
|
190
|
+
render: /*#__PURE__*/ _jsx("a", {
|
|
191
|
+
ref: ref,
|
|
192
|
+
"aria-label": ariaLabel,
|
|
193
|
+
"aria-disabled": isDisabled || undefined,
|
|
194
|
+
onClick: handleClick,
|
|
195
|
+
tabIndex: isDisabled ? -1 : undefined,
|
|
196
|
+
...linkProps,
|
|
197
|
+
children: icon
|
|
198
|
+
})
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
PaginationIconLink.displayName = 'PaginationIconLink';
|
|
202
|
+
const PaginationFirst = /*#__PURE__*/ forwardRef(({ className, size, label = 'Go to first page', ...props }, ref)=>{
|
|
203
|
+
return /*#__PURE__*/ _jsx(PaginationIconLink, {
|
|
204
|
+
ref: ref,
|
|
205
|
+
dataSlot: "pagination-first",
|
|
206
|
+
ariaLabel: label,
|
|
207
|
+
icon: /*#__PURE__*/ _jsx(IconChevronsLeft, {}),
|
|
208
|
+
className: className,
|
|
209
|
+
size: size,
|
|
210
|
+
...props
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
PaginationFirst.displayName = 'PaginationFirst';
|
|
214
|
+
const PaginationPrevious = /*#__PURE__*/ forwardRef(({ className, size, label = 'Go to previous page', ...props }, ref)=>{
|
|
215
|
+
return /*#__PURE__*/ _jsx(PaginationIconLink, {
|
|
216
|
+
ref: ref,
|
|
217
|
+
dataSlot: "pagination-previous",
|
|
218
|
+
ariaLabel: label,
|
|
219
|
+
icon: /*#__PURE__*/ _jsx(IconChevronLeft, {}),
|
|
220
|
+
className: className,
|
|
221
|
+
size: size,
|
|
222
|
+
...props
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
PaginationPrevious.displayName = 'PaginationPrevious';
|
|
226
|
+
const PaginationNext = /*#__PURE__*/ forwardRef(({ className, size, label = 'Go to next page', ...props }, ref)=>{
|
|
227
|
+
return /*#__PURE__*/ _jsx(PaginationIconLink, {
|
|
228
|
+
ref: ref,
|
|
229
|
+
dataSlot: "pagination-next",
|
|
230
|
+
ariaLabel: label,
|
|
231
|
+
icon: /*#__PURE__*/ _jsx(IconChevronRight, {}),
|
|
232
|
+
className: className,
|
|
233
|
+
size: size,
|
|
234
|
+
...props
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
PaginationNext.displayName = 'PaginationNext';
|
|
238
|
+
const PaginationLast = /*#__PURE__*/ forwardRef(({ className, size, label = 'Go to last page', ...props }, ref)=>{
|
|
239
|
+
return /*#__PURE__*/ _jsx(PaginationIconLink, {
|
|
240
|
+
ref: ref,
|
|
241
|
+
dataSlot: "pagination-last",
|
|
242
|
+
ariaLabel: label,
|
|
243
|
+
icon: /*#__PURE__*/ _jsx(IconChevronsRight, {}),
|
|
244
|
+
className: className,
|
|
245
|
+
size: size,
|
|
246
|
+
...props
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
PaginationLast.displayName = 'PaginationLast';
|
|
250
|
+
const PaginationEllipsis = /*#__PURE__*/ forwardRef(({ className, size, label = 'More pages', ...props }, ref)=>{
|
|
251
|
+
const inheritedSize = usePaginationSize();
|
|
252
|
+
const resolvedSize = size ?? inheritedSize;
|
|
253
|
+
const { iconButtonWidth } = getPaginationButtonStyles(resolvedSize);
|
|
254
|
+
return /*#__PURE__*/ _jsxs("span", {
|
|
255
|
+
ref: ref,
|
|
256
|
+
"data-slot": "pagination-ellipsis",
|
|
257
|
+
className: cn(iconButtonWidth, paginationEllipsisVariants({
|
|
258
|
+
size: resolvedSize
|
|
259
|
+
}), className),
|
|
260
|
+
...props,
|
|
261
|
+
children: [
|
|
262
|
+
/*#__PURE__*/ _jsx(IconDots, {
|
|
263
|
+
"aria-hidden": "true",
|
|
264
|
+
className: "h-4 w-4"
|
|
265
|
+
}),
|
|
266
|
+
/*#__PURE__*/ _jsx("span", {
|
|
267
|
+
className: "sr-only",
|
|
268
|
+
children: label
|
|
269
|
+
})
|
|
270
|
+
]
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
PaginationEllipsis.displayName = 'PaginationEllipsis';
|
|
274
|
+
const PaginationResultsPerPage = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
275
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
276
|
+
ref: ref,
|
|
277
|
+
"data-slot": "pagination-results-per-page",
|
|
278
|
+
className: cn('flex items-center gap-2 pl-3', className),
|
|
279
|
+
...props
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
PaginationResultsPerPage.displayName = 'PaginationResultsPerPage';
|
|
283
|
+
const PaginationResultsPerPageLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
284
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
285
|
+
ref: ref,
|
|
286
|
+
"data-slot": "pagination-results-per-page-label",
|
|
287
|
+
className: cn('text-sm leading-4.5 tracking-tight font-normal text-muted-foreground', className),
|
|
288
|
+
...props
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
PaginationResultsPerPageLabel.displayName = 'PaginationResultsPerPageLabel';
|
|
292
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationResultsPerPage, PaginationResultsPerPageLabel, PaginationSelectTrigger, PaginationStatus, PaginationTeleport };
|
|
293
|
+
|
|
294
|
+
//# sourceMappingURL=pagination.js.map
|