@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,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { memo
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useMemo } from "react";
|
|
3
|
+
import { motion } from "framer-motion";
|
|
4
|
+
import { cn } from "../../../../lib/utils.js";
|
|
5
|
+
const gradientMap = {
|
|
6
|
+
nordic: 'var(--gradient-nordic)',
|
|
7
|
+
aurora: 'var(--gradient-aurora)',
|
|
8
|
+
dusk: 'var(--gradient-dusk)',
|
|
9
|
+
equinox: 'var(--gradient-equinox)',
|
|
10
|
+
summer: 'var(--gradient-summer)',
|
|
11
|
+
spring: 'var(--gradient-spring)',
|
|
12
|
+
fall: 'var(--gradient-fall)',
|
|
13
|
+
active: 'var(--gradient-active)'
|
|
14
|
+
};
|
|
15
|
+
const shimmerAnimate = {
|
|
16
|
+
backgroundPosition: [
|
|
17
|
+
'100% center, center',
|
|
18
|
+
'0% center, center'
|
|
19
|
+
]
|
|
20
|
+
};
|
|
21
|
+
const activeShimmerAnimate = {
|
|
22
|
+
backgroundPosition: [
|
|
23
|
+
'0% center, 0% center',
|
|
24
|
+
'-200% center, -200% center'
|
|
25
|
+
]
|
|
26
|
+
};
|
|
27
|
+
function ShimmerComponent({ children, as: Tag = 'p', className, duration = 2, spread = 2, variant = 'default' }) {
|
|
28
|
+
const dynamicSpread = useMemo(()=>(children?.length ?? 0) * spread, [
|
|
29
|
+
children,
|
|
30
|
+
spread
|
|
31
|
+
]);
|
|
32
|
+
const backgroundImage = useMemo(()=>{
|
|
33
|
+
const shimmerBg = 'linear-gradient(90deg, transparent calc(50% - var(--spread)), rgba(255, 255, 255, 0.4), transparent calc(50% + var(--spread)))';
|
|
34
|
+
if (variant === 'default') {
|
|
35
|
+
return `${shimmerBg}, linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))`;
|
|
36
|
+
}
|
|
37
|
+
return `${shimmerBg}, ${gradientMap[variant]}`;
|
|
38
|
+
}, [
|
|
39
|
+
variant
|
|
40
|
+
]);
|
|
41
|
+
const shimmerStyle = {
|
|
42
|
+
'--spread': `${dynamicSpread}px`,
|
|
43
|
+
backgroundImage,
|
|
44
|
+
backgroundSize: variant === 'active' ? '200% 100%, 200% 100%' : '250% 100%, 100% 100%'
|
|
45
|
+
};
|
|
46
|
+
const shimmerTransition = {
|
|
47
|
+
repeat: Number.POSITIVE_INFINITY,
|
|
48
|
+
duration,
|
|
49
|
+
ease: 'linear'
|
|
50
|
+
};
|
|
51
|
+
const MotionTag = motion[Tag];
|
|
52
|
+
return /*#__PURE__*/ _jsx(MotionTag, {
|
|
53
|
+
"data-slot": "shimmer",
|
|
54
|
+
className: cn('relative inline-block bg-clip-text text-transparent rounded-md', className),
|
|
55
|
+
animate: variant === 'active' ? activeShimmerAnimate : shimmerAnimate,
|
|
56
|
+
style: shimmerStyle,
|
|
57
|
+
transition: shimmerTransition,
|
|
58
|
+
children: children
|
|
59
|
+
});
|
|
37
60
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
61
|
+
const MemoizedShimmer = /*#__PURE__*/ memo(ShimmerComponent);
|
|
62
|
+
MemoizedShimmer.displayName = 'Shimmer';
|
|
63
|
+
export { MemoizedShimmer as Shimmer };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=shimmer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/shimmer/shimmer.tsx"],"sourcesContent":["import {\n type MemoExoticComponent,\n type CSSProperties,\n type ReactNode,\n memo,\n useMemo,\n} from 'react';\n\nimport { motion, type Transition } from 'framer-motion';\n\nimport { cn } from '../../../../lib/utils';\n\ntype TextShimmerProps = {\n children: string;\n as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3';\n className?: string;\n duration?: number;\n spread?: number;\n variant?:\n | 'default'\n | 'nordic'\n | 'aurora'\n | 'dusk'\n | 'equinox'\n | 'summer'\n | 'spring'\n | 'fall'\n | 'active';\n};\n\ntype ShimmerVariant = NonNullable<TextShimmerProps['variant']>;\n\nconst gradientMap: Record<Exclude<ShimmerVariant, 'default'>, string> = {\n nordic: 'var(--gradient-nordic)',\n aurora: 'var(--gradient-aurora)',\n dusk: 'var(--gradient-dusk)',\n equinox: 'var(--gradient-equinox)',\n summer: 'var(--gradient-summer)',\n spring: 'var(--gradient-spring)',\n fall: 'var(--gradient-fall)',\n active: 'var(--gradient-active)',\n};\n\nconst shimmerAnimate = {\n backgroundPosition: ['100% center, center', '0% center, center'],\n};\n\nconst activeShimmerAnimate = {\n backgroundPosition: ['0% center, 0% center', '-200% center, -200% center'],\n};\n\nfunction ShimmerComponent({\n children,\n as: Tag = 'p',\n className,\n duration = 2,\n spread = 2,\n variant = 'default',\n}: TextShimmerProps): ReactNode {\n const dynamicSpread = useMemo(\n () => (children?.length ?? 0) * spread,\n [children, spread]\n );\n\n const backgroundImage = useMemo(() => {\n const shimmerBg =\n 'linear-gradient(90deg, transparent calc(50% - var(--spread)), rgba(255, 255, 255, 0.4), transparent calc(50% + var(--spread)))';\n\n if (variant === 'default') {\n return `${shimmerBg}, linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))`;\n }\n\n return `${shimmerBg}, ${gradientMap[variant]}`;\n }, [variant]);\n\n const shimmerStyle: CSSProperties & { '--spread': string } = {\n '--spread': `${dynamicSpread}px`,\n backgroundImage,\n backgroundSize:\n variant === 'active' ? '200% 100%, 200% 100%' : '250% 100%, 100% 100%',\n };\n const shimmerTransition: Transition = {\n repeat: Number.POSITIVE_INFINITY,\n duration,\n ease: 'linear',\n };\n\n const MotionTag = motion[Tag];\n\n return (\n <MotionTag\n data-slot=\"shimmer\"\n className={cn(\n 'relative inline-block bg-clip-text text-transparent rounded-md',\n className\n )}\n animate={variant === 'active' ? activeShimmerAnimate : shimmerAnimate}\n style={shimmerStyle}\n transition={shimmerTransition}\n >\n {children}\n </MotionTag>\n );\n}\n\nconst MemoizedShimmer: MemoExoticComponent<typeof ShimmerComponent> =\n memo(ShimmerComponent);\nMemoizedShimmer.displayName = 'Shimmer';\n\nexport { MemoizedShimmer as Shimmer };\n"],"names":["memo","useMemo","motion","cn","gradientMap","nordic","aurora","dusk","equinox","summer","spring","fall","active","shimmerAnimate","backgroundPosition","activeShimmerAnimate","ShimmerComponent","children","as","Tag","className","duration","spread","variant","dynamicSpread","length","backgroundImage","shimmerBg","shimmerStyle","backgroundSize","shimmerTransition","repeat","Number","POSITIVE_INFINITY","ease","MotionTag","data-slot","animate","style","transition","MemoizedShimmer","displayName","Shimmer"],"mappings":";AAAA,SAIEA,IAAI,EACJC,OAAO,QACF,QAAQ;AAEf,SAASC,MAAM,QAAyB,gBAAgB;AAExD,SAASC,EAAE,QAAQ,2BAAwB;AAsB3C,MAAMC,cAAkE;IACtEC,QAAQ;IACRC,QAAQ;IACRC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRC,QAAQ;IACRC,MAAM;IACNC,QAAQ;AACV;AAEA,MAAMC,iBAAiB;IACrBC,oBAAoB;QAAC;QAAuB;KAAoB;AAClE;AAEA,MAAMC,uBAAuB;IAC3BD,oBAAoB;QAAC;QAAwB;KAA6B;AAC5E;AAEA,SAASE,iBAAiB,EACxBC,QAAQ,EACRC,IAAIC,MAAM,GAAG,EACbC,SAAS,EACTC,WAAW,CAAC,EACZC,SAAS,CAAC,EACVC,UAAU,SAAS,EACF;IACjB,MAAMC,gBAAgBvB,QACpB,IAAM,AAACgB,CAAAA,UAAUQ,UAAU,CAAA,IAAKH,QAChC;QAACL;QAAUK;KAAO;IAGpB,MAAMI,kBAAkBzB,QAAQ;QAC9B,MAAM0B,YACJ;QAEF,IAAIJ,YAAY,WAAW;YACzB,OAAO,GAAGI,UAAU,+EAA+E,CAAC;QACtG;QAEA,OAAO,GAAGA,UAAU,EAAE,EAAEvB,WAAW,CAACmB,QAAQ,EAAE;IAChD,GAAG;QAACA;KAAQ;IAEZ,MAAMK,eAAuD;QAC3D,YAAY,GAAGJ,cAAc,EAAE,CAAC;QAChCE;QACAG,gBACEN,YAAY,WAAW,yBAAyB;IACpD;IACA,MAAMO,oBAAgC;QACpCC,QAAQC,OAAOC,iBAAiB;QAChCZ;QACAa,MAAM;IACR;IAEA,MAAMC,YAAYjC,MAAM,CAACiB,IAAI;IAE7B,qBACE,KAACgB;QACCC,aAAU;QACVhB,WAAWjB,GACT,kEACAiB;QAEFiB,SAASd,YAAY,WAAWR,uBAAuBF;QACvDyB,OAAOV;QACPW,YAAYT;kBAEXb;;AAGP;AAEA,MAAMuB,gCACJxC,KAAKgB;AACPwB,gBAAgBC,WAAW,GAAG;AAE9B,SAASD,mBAAmBE,OAAO,GAAG"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from
|
|
2
|
-
declare const Skeleton: ForwardRefExoticComponent<ComponentProps<
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps } from "react";
|
|
2
|
+
declare const Skeleton: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export { Skeleton };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn } from "../../../../lib/utils.js";
|
|
4
|
+
const Skeleton = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx("div", {
|
|
5
|
+
ref: ref,
|
|
6
|
+
"data-slot": "skeleton",
|
|
7
|
+
className: cn('bg-accent-background animate-pulse rounded-md', className),
|
|
8
|
+
...props
|
|
9
|
+
}));
|
|
10
|
+
Skeleton.displayName = 'Skeleton';
|
|
11
|
+
export { Skeleton };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/skeleton/skeleton.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n forwardRef,\n} from 'react';\n\nimport { cn } from '../../../../lib/utils';\n\nconst Skeleton: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, ComponentProps<'div'>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"skeleton\"\n className={cn('bg-accent-background animate-pulse rounded-md', className)}\n {...props}\n />\n )\n);\n\nSkeleton.displayName = 'Skeleton';\n\nexport { Skeleton };\n"],"names":["forwardRef","cn","Skeleton","className","props","ref","div","data-slot","displayName"],"mappings":";AAAA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,EAAE,QAAQ,2BAAwB;AAE3C,MAAMC,yBAEFF,WACF,CAAC,EAAEG,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBACxB,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVJ,WAAWF,GAAG,iDAAiDE;QAC9D,GAAGC,KAAK;;AAKfF,SAASM,WAAW,GAAG;AAEvB,SAASN,QAAQ,GAAG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ComponentRef, ForwardRefExoticComponent, RefAttributes } from
|
|
2
|
-
import { Slider as SliderPrimitive } from
|
|
3
|
-
type SliderProps = Omit<SliderPrimitive.Root.Props<readonly number[]>,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { type ComponentRef, type ForwardRefExoticComponent, type RefAttributes } from "react";
|
|
2
|
+
import { Slider as SliderPrimitive } from "@base-ui/react/slider";
|
|
3
|
+
type SliderProps = Omit<SliderPrimitive.Root.Props<readonly number[]>, "value" | "defaultValue" | "onValueChange"> & {
|
|
4
|
+
value?: number[];
|
|
5
|
+
defaultValue?: number[];
|
|
6
|
+
onValueChange?: (value: number[]) => void;
|
|
7
7
|
};
|
|
8
|
-
declare const Slider: ForwardRefExoticComponent<Omit<SliderProps,
|
|
8
|
+
declare const Slider: ForwardRefExoticComponent<Omit<SliderProps, "ref"> & RefAttributes<ComponentRef<typeof SliderPrimitive.Root>>>;
|
|
9
9
|
export { Slider };
|
|
@@ -1,40 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { Slider as SliderPrimitive } from "@base-ui/react/slider";
|
|
4
|
+
import { cn } from "../../../../lib/utils.js";
|
|
5
|
+
const Slider = /*#__PURE__*/ forwardRef(({ className, defaultValue, value, min = 0, max = 100, onValueChange, ...props }, ref)=>{
|
|
6
|
+
const thumbValues = Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [
|
|
7
|
+
min
|
|
8
|
+
];
|
|
9
|
+
const handleValueChange = (nextValue)=>{
|
|
10
|
+
if (!onValueChange) return;
|
|
11
|
+
const next = Array.isArray(nextValue) ? [
|
|
12
|
+
...nextValue
|
|
13
|
+
] : [
|
|
14
|
+
nextValue
|
|
15
|
+
];
|
|
16
|
+
onValueChange(next);
|
|
17
|
+
};
|
|
18
|
+
return /*#__PURE__*/ _jsx(SliderPrimitive.Root, {
|
|
19
|
+
ref: ref,
|
|
20
|
+
"data-slot": "slider",
|
|
21
|
+
"data-range": thumbValues.length > 1 ? '' : undefined,
|
|
22
|
+
defaultValue: defaultValue,
|
|
23
|
+
value: value,
|
|
24
|
+
min: min,
|
|
25
|
+
max: max,
|
|
26
|
+
className: cn('group/slider data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full', className),
|
|
27
|
+
thumbAlignment: "edge",
|
|
28
|
+
onValueChange: handleValueChange,
|
|
29
|
+
...props,
|
|
30
|
+
children: /*#__PURE__*/ _jsxs(SliderPrimitive.Control, {
|
|
31
|
+
className: "relative flex w-full touch-none items-center select-none data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ _jsx(SliderPrimitive.Track, {
|
|
34
|
+
"data-slot": "slider-track",
|
|
35
|
+
className: "relative z-0 grow overflow-hidden rounded-full bg-transparent ring-1 ring-border-emphasized ring-inset data-[orientation=horizontal]:h-3 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-3",
|
|
36
|
+
children: /*#__PURE__*/ _jsx(SliderPrimitive.Indicator, {
|
|
37
|
+
"data-slot": "slider-range",
|
|
38
|
+
className: cn('relative z-10 bg-transparent select-none', 'after:absolute after:rounded-full after:bg-secondary-background', 'group-data-[range]/slider:after:rounded-none', 'group-data-[range]/slider:group-data-[orientation=horizontal]/slider:after:left-0', 'group-data-[range]/slider:group-data-[orientation=vertical]/slider:after:bottom-0', 'group-data-[disabled]/slider:after:bg-disabled-background', 'group-data-[orientation=horizontal]/slider:after:inset-e-0 group-data-[orientation=horizontal]/slider:after:left-0.5 group-data-[orientation=horizontal]/slider:after:top-1/2 group-data-[orientation=horizontal]/slider:after:h-2 group-data-[orientation=horizontal]/slider:after:-translate-y-1/2', 'group-data-[orientation=vertical]/slider:after:inset-bs-0 group-data-[orientation=vertical]/slider:after:bottom-0.5 group-data-[orientation=vertical]/slider:after:left-1/2 group-data-[orientation=vertical]/slider:after:w-2 group-data-[orientation=vertical]/slider:after:-translate-x-1/2')
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
thumbValues.map((_, index)=>/*#__PURE__*/ _jsx(SliderPrimitive.Thumb, {
|
|
42
|
+
"data-slot": "slider-thumb",
|
|
43
|
+
className: cn('relative block size-3 shrink-0 rounded-full outline-none', 'before:absolute before:top-1/2 before:left-1/2 before:size-2 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-full before:bg-foreground before:transition-[width,height]', 'hover:before:size-3', 'focus-visible:before:size-3 focus-visible:ring-ring-muted focus-visible:ring-4', 'active:before:size-3', 'data-disabled:pointer-events-none data-disabled:before:bg-disabled-foreground')
|
|
44
|
+
}, index))
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
});
|
|
37
48
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
Slider.displayName = 'Slider';
|
|
50
|
+
export { Slider };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/slider/slider.tsx"],"sourcesContent":["import {\n type ComponentRef,\n type ForwardRefExoticComponent,\n type ReactNode,\n type RefAttributes,\n forwardRef,\n} from 'react';\n\nimport { Slider as SliderPrimitive } from '@base-ui/react/slider';\n\nimport { cn } from '../../../../lib/utils';\n\ntype SliderProps = Omit<\n SliderPrimitive.Root.Props<readonly number[]>,\n 'value' | 'defaultValue' | 'onValueChange'\n> & {\n value?: number[];\n defaultValue?: number[];\n onValueChange?: (value: number[]) => void;\n};\n\nconst Slider: ForwardRefExoticComponent<\n Omit<SliderProps, 'ref'> &\n RefAttributes<ComponentRef<typeof SliderPrimitive.Root>>\n> = forwardRef<ComponentRef<typeof SliderPrimitive.Root>, SliderProps>(\n (\n {\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n onValueChange,\n ...props\n },\n ref\n ): ReactNode => {\n const thumbValues = Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min];\n\n const handleValueChange = (nextValue: number | readonly number[]) => {\n if (!onValueChange) return;\n const next = Array.isArray(nextValue) ? [...nextValue] : [nextValue];\n onValueChange(next);\n };\n\n return (\n <SliderPrimitive.Root\n ref={ref}\n data-slot=\"slider\"\n data-range={thumbValues.length > 1 ? '' : undefined}\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n 'group/slider data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full',\n className\n )}\n thumbAlignment=\"edge\"\n onValueChange={handleValueChange}\n {...props}\n >\n <SliderPrimitive.Control className=\"relative flex w-full touch-none items-center select-none data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col\">\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className=\"relative z-0 grow overflow-hidden rounded-full bg-transparent ring-1 ring-border-emphasized ring-inset data-[orientation=horizontal]:h-3 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-3\"\n >\n <SliderPrimitive.Indicator\n data-slot=\"slider-range\"\n className={cn(\n 'relative z-10 bg-transparent select-none',\n 'after:absolute after:rounded-full after:bg-secondary-background',\n 'group-data-[range]/slider:after:rounded-none',\n 'group-data-[range]/slider:group-data-[orientation=horizontal]/slider:after:left-0',\n 'group-data-[range]/slider:group-data-[orientation=vertical]/slider:after:bottom-0',\n 'group-data-[disabled]/slider:after:bg-disabled-background',\n 'group-data-[orientation=horizontal]/slider:after:inset-e-0 group-data-[orientation=horizontal]/slider:after:left-0.5 group-data-[orientation=horizontal]/slider:after:top-1/2 group-data-[orientation=horizontal]/slider:after:h-2 group-data-[orientation=horizontal]/slider:after:-translate-y-1/2',\n 'group-data-[orientation=vertical]/slider:after:inset-bs-0 group-data-[orientation=vertical]/slider:after:bottom-0.5 group-data-[orientation=vertical]/slider:after:left-1/2 group-data-[orientation=vertical]/slider:after:w-2 group-data-[orientation=vertical]/slider:after:-translate-x-1/2'\n )}\n />\n </SliderPrimitive.Track>\n {thumbValues.map((_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n // eslint-disable-next-line @eslint-react/no-array-index-key\n key={index}\n className={cn(\n 'relative block size-3 shrink-0 rounded-full outline-none',\n 'before:absolute before:top-1/2 before:left-1/2 before:size-2 before:-translate-x-1/2 before:-translate-y-1/2 before:rounded-full before:bg-foreground before:transition-[width,height]',\n 'hover:before:size-3',\n 'focus-visible:before:size-3 focus-visible:ring-ring-muted focus-visible:ring-4',\n 'active:before:size-3',\n 'data-disabled:pointer-events-none data-disabled:before:bg-disabled-foreground'\n )}\n />\n ))}\n </SliderPrimitive.Control>\n </SliderPrimitive.Root>\n );\n }\n);\nSlider.displayName = 'Slider';\n\nexport { Slider };\n"],"names":["forwardRef","Slider","SliderPrimitive","cn","className","defaultValue","value","min","max","onValueChange","props","ref","thumbValues","Array","isArray","handleValueChange","nextValue","next","Root","data-slot","data-range","length","undefined","thumbAlignment","Control","Track","Indicator","map","_","index","Thumb","displayName"],"mappings":";AAAA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,UAAUC,eAAe,QAAQ,wBAAwB;AAElE,SAASC,EAAE,QAAQ,2BAAwB;AAW3C,MAAMF,uBAGFD,WACF,CACE,EACEI,SAAS,EACTC,YAAY,EACZC,KAAK,EACLC,MAAM,CAAC,EACPC,MAAM,GAAG,EACTC,aAAa,EACb,GAAGC,OACJ,EACDC;IAEA,MAAMC,cAAcC,MAAMC,OAAO,CAACR,SAC9BA,QACAO,MAAMC,OAAO,CAACT,gBACZA,eACA;QAACE;KAAI;IAEX,MAAMQ,oBAAoB,CAACC;QACzB,IAAI,CAACP,eAAe;QACpB,MAAMQ,OAAOJ,MAAMC,OAAO,CAACE,aAAa;eAAIA;SAAU,GAAG;YAACA;SAAU;QACpEP,cAAcQ;IAChB;IAEA,qBACE,KAACf,gBAAgBgB,IAAI;QACnBP,KAAKA;QACLQ,aAAU;QACVC,cAAYR,YAAYS,MAAM,GAAG,IAAI,KAAKC;QAC1CjB,cAAcA;QACdC,OAAOA;QACPC,KAAKA;QACLC,KAAKA;QACLJ,WAAWD,GACT,wFACAC;QAEFmB,gBAAe;QACfd,eAAeM;QACd,GAAGL,KAAK;kBAET,cAAA,MAACR,gBAAgBsB,OAAO;YAACpB,WAAU;;8BACjC,KAACF,gBAAgBuB,KAAK;oBACpBN,aAAU;oBACVf,WAAU;8BAEV,cAAA,KAACF,gBAAgBwB,SAAS;wBACxBP,aAAU;wBACVf,WAAWD,GACT,4CACA,mEACA,gDACA,qFACA,qFACA,6DACA,wSACA;;;gBAILS,YAAYe,GAAG,CAAC,CAACC,GAAGC,sBACnB,KAAC3B,gBAAgB4B,KAAK;wBACpBX,aAAU;wBAGVf,WAAWD,GACT,4DACA,0LACA,uBACA,kFACA,wBACA;uBAPG0B;;;;AAcjB;AAEF5B,OAAO8B,WAAW,GAAG;AAErB,SAAS9B,MAAM,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from
|
|
2
|
-
import { ToasterProps, toast } from
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ToasterProps, toast } from "sonner";
|
|
3
3
|
declare const Toaster: ({ ...props }: ToasterProps) => ReactNode;
|
|
4
4
|
export { Toaster, toast };
|
|
@@ -1,55 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IconAlertOctagonFilled
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"--border-radius": "var(--radius-lg)"
|
|
11
|
-
}, d = ({ ...l }) => {
|
|
12
|
-
let d = "flex h-5 min-w-5 items-center justify-center rounded-md px-1";
|
|
13
|
-
return /* @__PURE__ */ s(c, {
|
|
14
|
-
"data-slot": "sonner-toast",
|
|
15
|
-
theme: "system",
|
|
16
|
-
className: "toaster group",
|
|
17
|
-
icons: {
|
|
18
|
-
close: /* @__PURE__ */ s(o, { className: "size-4 text-foreground-fixed-light" }),
|
|
19
|
-
success: /* @__PURE__ */ s("span", {
|
|
20
|
-
className: e(d, "bg-success-background"),
|
|
21
|
-
children: /* @__PURE__ */ s(r, { className: "size-3 text-success-foreground-on-success" })
|
|
22
|
-
}),
|
|
23
|
-
info: /* @__PURE__ */ s("span", {
|
|
24
|
-
className: e(d, "bg-info-background"),
|
|
25
|
-
children: /* @__PURE__ */ s(i, { className: "size-3 text-info-foreground-on-info" })
|
|
26
|
-
}),
|
|
27
|
-
warning: /* @__PURE__ */ s("span", {
|
|
28
|
-
className: e(d, "bg-warning-background"),
|
|
29
|
-
children: /* @__PURE__ */ s(n, { className: "size-3 text-warning-foreground-on-warning" })
|
|
30
|
-
}),
|
|
31
|
-
error: /* @__PURE__ */ s("span", {
|
|
32
|
-
className: e(d, "bg-destructive-background"),
|
|
33
|
-
children: /* @__PURE__ */ s(t, { className: "size-3 text-destructive-foreground-on-critical" })
|
|
34
|
-
}),
|
|
35
|
-
loading: /* @__PURE__ */ s(a, { className: "size-4 animate-spin" })
|
|
36
|
-
},
|
|
37
|
-
style: u,
|
|
38
|
-
toastOptions: {
|
|
39
|
-
unstyled: !0,
|
|
40
|
-
classNames: {
|
|
41
|
-
toast: "flex w-[384px] min-h-11 items-center gap-2 rounded-lg bg-raised-background p-3 shadow-md has-[[data-description]]:[&_[data-icon]]:hidden",
|
|
42
|
-
icon: "order-1 m-0 shrink-0 flex items-start",
|
|
43
|
-
content: "order-2 flex flex-1 basis-0 flex-col items-start gap-0.5",
|
|
44
|
-
title: "w-full self-stretch text-sm font-medium leading-[18px] tracking-normal text-foreground-fixed-light",
|
|
45
|
-
description: "w-full self-stretch text-sm font-normal leading-[18px] tracking-tight text-muted-foreground-fixed-light",
|
|
46
|
-
actionButton: "order-3 ml-auto inline-flex h-7 items-center justify-center gap-1.5 rounded-md bg-transparent px-2 text-sm font-medium leading-[18px] tracking-normal text-foreground-fixed-light transition-all hover:cursor-pointer",
|
|
47
|
-
cancelButton: "order-3 ml-auto inline-flex h-7 items-center justify-center gap-1.5 rounded-md bg-transparent px-2 text-sm font-medium leading-[18px] tracking-normal text-foreground-fixed-light transition-all hover:cursor-pointer",
|
|
48
|
-
closeButton: "order-4 inline-flex size-7 items-center justify-center rounded-md text-foreground-fixed-light transition-all hover:cursor-pointer hover:text-foreground-fixed-light hover:!bg-transparent"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
...l
|
|
52
|
-
});
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { IconAlertOctagonFilled, IconAlertTriangleFilled, IconCircleCheckFilled, IconInfoCircleFilled, IconLoader2, IconX } from "@tabler/icons-react";
|
|
3
|
+
import { Toaster as Sonner, toast } from "sonner";
|
|
4
|
+
import { cn } from "../../../../lib/utils.js";
|
|
5
|
+
const TOASTER_STYLE = {
|
|
6
|
+
'--normal-bg': 'var(--raised-background)',
|
|
7
|
+
'--normal-text': 'var(--foreground-fixed-light)',
|
|
8
|
+
'--normal-border': 'transparent',
|
|
9
|
+
'--border-radius': 'var(--radius-lg)'
|
|
53
10
|
};
|
|
54
|
-
|
|
55
|
-
|
|
11
|
+
const Toaster = ({ ...props })=>{
|
|
12
|
+
const statusBadgeClass = 'flex h-5 min-w-5 items-center justify-center rounded-md px-1';
|
|
13
|
+
return /*#__PURE__*/ _jsx(Sonner, {
|
|
14
|
+
"data-slot": "sonner-toast",
|
|
15
|
+
theme: "system",
|
|
16
|
+
className: "toaster group",
|
|
17
|
+
icons: {
|
|
18
|
+
close: /*#__PURE__*/ _jsx(IconX, {
|
|
19
|
+
className: "size-4 text-foreground-fixed-light"
|
|
20
|
+
}),
|
|
21
|
+
success: /*#__PURE__*/ _jsx("span", {
|
|
22
|
+
className: cn(statusBadgeClass, 'bg-success-background'),
|
|
23
|
+
children: /*#__PURE__*/ _jsx(IconCircleCheckFilled, {
|
|
24
|
+
className: "size-3 text-success-foreground-on-success"
|
|
25
|
+
})
|
|
26
|
+
}),
|
|
27
|
+
info: /*#__PURE__*/ _jsx("span", {
|
|
28
|
+
className: cn(statusBadgeClass, 'bg-info-background'),
|
|
29
|
+
children: /*#__PURE__*/ _jsx(IconInfoCircleFilled, {
|
|
30
|
+
className: "size-3 text-info-foreground-on-info"
|
|
31
|
+
})
|
|
32
|
+
}),
|
|
33
|
+
warning: /*#__PURE__*/ _jsx("span", {
|
|
34
|
+
className: cn(statusBadgeClass, 'bg-warning-background'),
|
|
35
|
+
children: /*#__PURE__*/ _jsx(IconAlertTriangleFilled, {
|
|
36
|
+
className: "size-3 text-warning-foreground-on-warning"
|
|
37
|
+
})
|
|
38
|
+
}),
|
|
39
|
+
error: /*#__PURE__*/ _jsx("span", {
|
|
40
|
+
className: cn(statusBadgeClass, 'bg-destructive-background'),
|
|
41
|
+
children: /*#__PURE__*/ _jsx(IconAlertOctagonFilled, {
|
|
42
|
+
className: "size-3 text-destructive-foreground-on-critical"
|
|
43
|
+
})
|
|
44
|
+
}),
|
|
45
|
+
loading: /*#__PURE__*/ _jsx(IconLoader2, {
|
|
46
|
+
className: "size-4 animate-spin"
|
|
47
|
+
})
|
|
48
|
+
},
|
|
49
|
+
style: TOASTER_STYLE,
|
|
50
|
+
toastOptions: {
|
|
51
|
+
unstyled: true,
|
|
52
|
+
classNames: {
|
|
53
|
+
toast: 'flex w-96 min-h-11 items-center gap-2 rounded-lg bg-raised-background p-3 shadow-md has-[[data-description]]:[&_[data-icon]]:hidden',
|
|
54
|
+
icon: 'order-1 m-0 shrink-0 flex items-start',
|
|
55
|
+
content: 'order-2 flex min-w-0 flex-1 basis-0 flex-col items-start gap-0.5',
|
|
56
|
+
title: 'w-full self-stretch line-clamp-2 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light',
|
|
57
|
+
description: 'w-full self-stretch text-sm font-normal leading-4.5 tracking-tight text-muted-foreground-fixed-light',
|
|
58
|
+
actionButton: 'order-3 ml-auto inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-transparent px-2 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light transition-all hover:cursor-pointer',
|
|
59
|
+
cancelButton: 'order-3 ml-auto inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-transparent px-2 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light transition-all hover:cursor-pointer',
|
|
60
|
+
closeButton: 'order-4 inline-flex size-7 items-center justify-center rounded-md text-foreground-fixed-light transition-all hover:cursor-pointer hover:text-foreground-fixed-light hover:!bg-transparent'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
export { Toaster, toast };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=sonner-toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/sonner-toast/sonner-toast.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\n\nimport {\n IconAlertOctagonFilled,\n IconAlertTriangleFilled,\n IconCircleCheckFilled,\n IconInfoCircleFilled,\n IconLoader2,\n IconX,\n} from '@tabler/icons-react';\nimport { Toaster as Sonner, type ToasterProps, toast } from 'sonner';\n\nimport { cn } from '../../../../lib/utils';\n\ntype ToasterStyle = CSSProperties & {\n '--normal-bg': string;\n '--normal-text': string;\n '--normal-border': string;\n '--border-radius': string;\n};\n\nconst TOASTER_STYLE: ToasterStyle = {\n '--normal-bg': 'var(--raised-background)',\n '--normal-text': 'var(--foreground-fixed-light)',\n '--normal-border': 'transparent',\n '--border-radius': 'var(--radius-lg)',\n};\n\nconst Toaster = ({ ...props }: ToasterProps): ReactNode => {\n const statusBadgeClass =\n 'flex h-5 min-w-5 items-center justify-center rounded-md px-1';\n\n return (\n <Sonner\n data-slot=\"sonner-toast\"\n theme=\"system\"\n className=\"toaster group\"\n icons={{\n close: <IconX className=\"size-4 text-foreground-fixed-light\" />,\n success: (\n <span className={cn(statusBadgeClass, 'bg-success-background')}>\n <IconCircleCheckFilled className=\"size-3 text-success-foreground-on-success\" />\n </span>\n ),\n info: (\n <span className={cn(statusBadgeClass, 'bg-info-background')}>\n <IconInfoCircleFilled className=\"size-3 text-info-foreground-on-info\" />\n </span>\n ),\n warning: (\n <span className={cn(statusBadgeClass, 'bg-warning-background')}>\n <IconAlertTriangleFilled className=\"size-3 text-warning-foreground-on-warning\" />\n </span>\n ),\n error: (\n <span className={cn(statusBadgeClass, 'bg-destructive-background')}>\n <IconAlertOctagonFilled className=\"size-3 text-destructive-foreground-on-critical\" />\n </span>\n ),\n loading: <IconLoader2 className=\"size-4 animate-spin\" />,\n }}\n style={TOASTER_STYLE}\n toastOptions={{\n unstyled: true,\n classNames: {\n toast:\n 'flex w-96 min-h-11 items-center gap-2 rounded-lg bg-raised-background p-3 shadow-md has-[[data-description]]:[&_[data-icon]]:hidden',\n icon: 'order-1 m-0 shrink-0 flex items-start',\n content:\n 'order-2 flex min-w-0 flex-1 basis-0 flex-col items-start gap-0.5',\n title:\n 'w-full self-stretch line-clamp-2 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light',\n description:\n 'w-full self-stretch text-sm font-normal leading-4.5 tracking-tight text-muted-foreground-fixed-light',\n actionButton:\n 'order-3 ml-auto inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-transparent px-2 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light transition-all hover:cursor-pointer',\n cancelButton:\n 'order-3 ml-auto inline-flex h-7 shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md bg-transparent px-2 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light transition-all hover:cursor-pointer',\n closeButton:\n 'order-4 inline-flex size-7 items-center justify-center rounded-md text-foreground-fixed-light transition-all hover:cursor-pointer hover:text-foreground-fixed-light hover:!bg-transparent',\n },\n }}\n {...props}\n />\n );\n};\n\nexport { Toaster, toast };\n"],"names":["IconAlertOctagonFilled","IconAlertTriangleFilled","IconCircleCheckFilled","IconInfoCircleFilled","IconLoader2","IconX","Toaster","Sonner","toast","cn","TOASTER_STYLE","props","statusBadgeClass","data-slot","theme","className","icons","close","success","span","info","warning","error","loading","style","toastOptions","unstyled","classNames","icon","content","title","description","actionButton","cancelButton","closeButton"],"mappings":";AAEA,SACEA,sBAAsB,EACtBC,uBAAuB,EACvBC,qBAAqB,EACrBC,oBAAoB,EACpBC,WAAW,EACXC,KAAK,QACA,sBAAsB;AAC7B,SAASC,WAAWC,MAAM,EAAqBC,KAAK,QAAQ,SAAS;AAErE,SAASC,EAAE,QAAQ,2BAAwB;AAS3C,MAAMC,gBAA8B;IAClC,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,mBAAmB;AACrB;AAEA,MAAMJ,UAAU,CAAC,EAAE,GAAGK,OAAqB;IACzC,MAAMC,mBACJ;IAEF,qBACE,KAACL;QACCM,aAAU;QACVC,OAAM;QACNC,WAAU;QACVC,OAAO;YACLC,qBAAO,KAACZ;gBAAMU,WAAU;;YACxBG,uBACE,KAACC;gBAAKJ,WAAWN,GAAGG,kBAAkB;0BACpC,cAAA,KAACV;oBAAsBa,WAAU;;;YAGrCK,oBACE,KAACD;gBAAKJ,WAAWN,GAAGG,kBAAkB;0BACpC,cAAA,KAACT;oBAAqBY,WAAU;;;YAGpCM,uBACE,KAACF;gBAAKJ,WAAWN,GAAGG,kBAAkB;0BACpC,cAAA,KAACX;oBAAwBc,WAAU;;;YAGvCO,qBACE,KAACH;gBAAKJ,WAAWN,GAAGG,kBAAkB;0BACpC,cAAA,KAACZ;oBAAuBe,WAAU;;;YAGtCQ,uBAAS,KAACnB;gBAAYW,WAAU;;QAClC;QACAS,OAAOd;QACPe,cAAc;YACZC,UAAU;YACVC,YAAY;gBACVnB,OACE;gBACFoB,MAAM;gBACNC,SACE;gBACFC,OACE;gBACFC,aACE;gBACFC,cACE;gBACFC,cACE;gBACFC,aACE;YACJ;QACF;QACC,GAAGvB,KAAK;;AAGf;AAEA,SAASL,OAAO,EAAEE,KAAK,GAAG"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from
|
|
2
|
-
import { InlineCitationLink } from
|
|
3
|
-
type SourcesProps = Omit<ComponentProps<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import { InlineCitationLink } from "../inline-citation/inline-citation";
|
|
3
|
+
type SourcesProps = Omit<ComponentProps<"div">, "title"> & {
|
|
4
|
+
title?: ReactNode | boolean;
|
|
5
|
+
collapsible?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
onOpenChange?: (open: boolean) => void;
|
|
9
9
|
};
|
|
10
10
|
declare const Sources: ({ className, title, children, collapsible, defaultOpen, open, onOpenChange, ...props }: SourcesProps) => ReactNode;
|
|
11
|
-
type SourcesTitleProps = ComponentProps<
|
|
12
|
-
|
|
11
|
+
type SourcesTitleProps = ComponentProps<"div"> & {
|
|
12
|
+
title?: string;
|
|
13
13
|
};
|
|
14
14
|
declare const SourcesTitle: ({ className, title, children, ...props }: SourcesTitleProps) => ReactNode;
|
|
15
15
|
type SourceProps = ComponentProps<typeof InlineCitationLink> & {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
title?: string;
|
|
17
|
+
url?: string;
|
|
18
18
|
};
|
|
19
19
|
declare const Source: ({ href, url, title, variant, target, icon, className, children, ...props }: SourceProps) => ReactNode;
|
|
20
20
|
export { Source, Sources, SourcesTitle };
|