@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,98 +1,122 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn, getHostname } from "../../../../lib/utils.js";
|
|
4
|
+
import { Badge } from "../badge/badge.js";
|
|
5
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from "../hover-card/hover-card.js";
|
|
6
|
+
const InlineCitation = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx("span", {
|
|
7
|
+
ref: ref,
|
|
8
|
+
"data-slot": "inline-citation",
|
|
9
|
+
className: cn('group inline-flex items-center gap-1', className),
|
|
10
|
+
...props
|
|
11
|
+
}));
|
|
12
|
+
InlineCitation.displayName = 'InlineCitation';
|
|
13
|
+
const InlineCitationGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx("div", {
|
|
14
|
+
ref: ref,
|
|
15
|
+
"data-slot": "inline-citation-group",
|
|
16
|
+
className: cn('flex flex-wrap gap-2', className),
|
|
17
|
+
...props
|
|
18
|
+
}));
|
|
19
|
+
InlineCitationGroup.displayName = 'InlineCitationGroup';
|
|
20
|
+
const InlineCitationText = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ _jsx("span", {
|
|
21
|
+
ref: ref,
|
|
22
|
+
"data-slot": "inline-citation-text",
|
|
23
|
+
className: cn('transition-colors group-hover:bg-accent-background', className),
|
|
24
|
+
...props
|
|
25
|
+
}));
|
|
26
|
+
InlineCitationText.displayName = 'InlineCitationText';
|
|
27
|
+
const InlineCitationCard = (props)=>/*#__PURE__*/ _jsx(HoverCard, {
|
|
28
|
+
"data-slot": "inline-citation-card",
|
|
29
|
+
closeDelay: 0,
|
|
30
|
+
openDelay: 0,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
const InlineCitationCardTrigger = ({ sources, icon: Icon, className, ...props })=>{
|
|
34
|
+
return /*#__PURE__*/ _jsx(HoverCardTrigger, {
|
|
35
|
+
render: /*#__PURE__*/ _jsxs(Badge, {
|
|
36
|
+
"data-slot": "inline-citation-card-trigger",
|
|
37
|
+
className: cn('ml-1 inline-flex items-center justify-center rounded-md border border-transparent bg-decorative-2-background px-1 text-sm leading-4.5 font-medium text-decorative-2-foreground whitespace-nowrap gap-1 transition-[color,box-shadow]', '[&>svg]:size-3 [&>svg]:pointer-events-none', className),
|
|
38
|
+
...props,
|
|
39
|
+
children: [
|
|
40
|
+
Icon && /*#__PURE__*/ _jsx(Icon, {
|
|
41
|
+
className: "size-3"
|
|
42
|
+
}),
|
|
43
|
+
sources[0] ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
44
|
+
children: [
|
|
45
|
+
getHostname(sources[0]),
|
|
46
|
+
' ',
|
|
47
|
+
sources.length > 1 && `+${sources.length - 1}`
|
|
48
|
+
]
|
|
49
|
+
}) : 'unknown'
|
|
50
|
+
]
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const InlineCitationCardBody = ({ className, ...props })=>/*#__PURE__*/ _jsx(HoverCardContent, {
|
|
55
|
+
"data-slot": "inline-citation-card-body",
|
|
56
|
+
className: cn('relative w-80 p-0', className),
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
const InlineCitationSource = /*#__PURE__*/ forwardRef(({ title, url, description, className, children, ...props }, ref)=>/*#__PURE__*/ _jsxs("div", {
|
|
60
|
+
ref: ref,
|
|
61
|
+
"data-slot": "inline-citation-source",
|
|
62
|
+
className: cn('space-y-1', className),
|
|
63
|
+
...props,
|
|
64
|
+
children: [
|
|
65
|
+
title && /*#__PURE__*/ _jsx("h4", {
|
|
66
|
+
className: "truncate font-medium text-sm leading-tight",
|
|
67
|
+
children: title
|
|
68
|
+
}),
|
|
69
|
+
url && /*#__PURE__*/ _jsx("p", {
|
|
70
|
+
className: "truncate break-all text-muted-foreground text-xs",
|
|
71
|
+
children: url
|
|
72
|
+
}),
|
|
73
|
+
description && /*#__PURE__*/ _jsx("p", {
|
|
74
|
+
className: "line-clamp-3 text-muted-foreground text-sm leading-relaxed",
|
|
75
|
+
children: description
|
|
76
|
+
}),
|
|
77
|
+
children
|
|
78
|
+
]
|
|
79
|
+
}));
|
|
80
|
+
InlineCitationSource.displayName = 'InlineCitationSource';
|
|
81
|
+
const InlineCitationQuote = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ _jsx("blockquote", {
|
|
82
|
+
ref: ref,
|
|
83
|
+
"data-slot": "inline-citation-quote",
|
|
84
|
+
className: cn('border-muted-background border-l-2 pl-3 text-muted-foreground text-sm italic', className),
|
|
85
|
+
...props,
|
|
86
|
+
children: children
|
|
87
|
+
}));
|
|
88
|
+
InlineCitationQuote.displayName = 'InlineCitationQuote';
|
|
89
|
+
const InlineCitationLink = /*#__PURE__*/ forwardRef(({ href, target = '_self', icon: Icon, variant = 'decorative-1', className, children, ...props }, ref)=>{
|
|
90
|
+
const hostname = getHostname(href);
|
|
91
|
+
const variantStyles = {
|
|
92
|
+
'decorative-1': 'bg-decorative-1-background hover:bg-decorative-1-background-hover text-decorative-1-foreground',
|
|
93
|
+
'decorative-2': 'bg-decorative-2-background hover:bg-decorative-2-background-hover text-decorative-2-foreground',
|
|
94
|
+
'decorative-3': 'bg-decorative-3-background hover:bg-decorative-3-background-hover text-decorative-3-foreground',
|
|
95
|
+
'decorative-4': 'bg-decorative-4-background hover:bg-decorative-4-background-hover text-decorative-4-foreground',
|
|
96
|
+
'decorative-5': 'bg-decorative-5-background hover:bg-decorative-5-background-hover text-decorative-5-foreground',
|
|
97
|
+
'decorative-6': 'bg-decorative-6-background hover:bg-decorative-6-background-hover text-decorative-6-foreground',
|
|
98
|
+
'decorative-7': 'bg-decorative-7-background hover:bg-decorative-7-background-hover text-decorative-7-foreground'
|
|
99
|
+
};
|
|
100
|
+
return /*#__PURE__*/ _jsx("a", {
|
|
101
|
+
ref: ref,
|
|
102
|
+
href: href,
|
|
103
|
+
target: target,
|
|
104
|
+
rel: target === '_blank' ? 'noopener noreferrer' : undefined,
|
|
105
|
+
className: "inline-flex items-stretch",
|
|
106
|
+
...props,
|
|
107
|
+
children: /*#__PURE__*/ _jsxs(Badge, {
|
|
108
|
+
"data-slot": "inline-citation-link",
|
|
109
|
+
className: cn('inline-flex items-center justify-center rounded-md border border-transparent px-1 text-sm leading-4.5 font-medium whitespace-nowrap gap-1 transition-colors', '[&>svg]:size-3 [&>svg]:pointer-events-none', variantStyles[variant], className),
|
|
110
|
+
children: [
|
|
111
|
+
Icon && /*#__PURE__*/ _jsx(Icon, {
|
|
112
|
+
className: "size-3"
|
|
113
|
+
}),
|
|
114
|
+
children ?? hostname
|
|
115
|
+
]
|
|
116
|
+
})
|
|
117
|
+
});
|
|
95
118
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
119
|
+
InlineCitationLink.displayName = 'InlineCitationLink';
|
|
120
|
+
export { InlineCitation, InlineCitationCard, InlineCitationCardBody, InlineCitationCardTrigger, InlineCitationGroup, InlineCitationLink, InlineCitationQuote, InlineCitationSource, InlineCitationText };
|
|
121
|
+
|
|
122
|
+
//# sourceMappingURL=inline-citation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/inline-citation/inline-citation.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ComponentRef,\n type ComponentType,\n type ReactNode,\n forwardRef,\n} from 'react';\n\nimport type { DecorativeVariant } from '../../../../lib/decorative-variant-classes';\nimport { cn, getHostname } from '../../../../lib/utils';\nimport { Badge } from '../badge/badge';\nimport {\n HoverCard,\n HoverCardContent,\n HoverCardTrigger,\n} from '../hover-card/hover-card';\n\ntype InlineCitationProps = ComponentProps<'span'>;\n\nconst InlineCitation: ForwardRefExoticComponent<\n ComponentProps<'span'> & RefAttributes<HTMLSpanElement>\n> = forwardRef<ComponentRef<'span'>, InlineCitationProps>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot=\"inline-citation\"\n className={cn('group inline-flex items-center gap-1', className)}\n {...props}\n />\n )\n);\nInlineCitation.displayName = 'InlineCitation';\n\ntype InlineCitationGroupProps = ComponentProps<'div'>;\n\nconst InlineCitationGroup: ForwardRefExoticComponent<\n ComponentProps<'div'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, InlineCitationGroupProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"inline-citation-group\"\n className={cn('flex flex-wrap gap-2', className)}\n {...props}\n />\n )\n);\nInlineCitationGroup.displayName = 'InlineCitationGroup';\n\ntype InlineCitationTextProps = ComponentProps<'span'>;\n\nconst InlineCitationText: ForwardRefExoticComponent<\n ComponentProps<'span'> & RefAttributes<HTMLSpanElement>\n> = forwardRef<ComponentRef<'span'>, InlineCitationTextProps>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot=\"inline-citation-text\"\n className={cn(\n 'transition-colors group-hover:bg-accent-background',\n className\n )}\n {...props}\n />\n )\n);\nInlineCitationText.displayName = 'InlineCitationText';\n\ntype InlineCitationCardProps = ComponentProps<typeof HoverCard>;\n\nconst InlineCitationCard = (props: InlineCitationCardProps): ReactNode => (\n <HoverCard\n data-slot=\"inline-citation-card\"\n closeDelay={0}\n openDelay={0}\n {...props}\n />\n);\n\ntype InlineCitationCardTriggerProps = ComponentProps<typeof Badge> & {\n sources: string[];\n icon?: ComponentType<{ className?: string }>;\n};\n\nconst InlineCitationCardTrigger = ({\n sources,\n icon: Icon,\n className,\n ...props\n}: InlineCitationCardTriggerProps): ReactNode => {\n return (\n <HoverCardTrigger\n render={\n <Badge\n data-slot=\"inline-citation-card-trigger\"\n className={cn(\n 'ml-1 inline-flex items-center justify-center rounded-md border border-transparent bg-decorative-2-background px-1 text-sm leading-4.5 font-medium text-decorative-2-foreground whitespace-nowrap gap-1 transition-[color,box-shadow]',\n '[&>svg]:size-3 [&>svg]:pointer-events-none',\n className\n )}\n {...props}\n >\n {Icon && <Icon className=\"size-3\" />}\n {sources[0] ? (\n <>\n {getHostname(sources[0])}{' '}\n {sources.length > 1 && `+${sources.length - 1}`}\n </>\n ) : (\n 'unknown'\n )}\n </Badge>\n }\n />\n );\n};\n\ntype InlineCitationCardBodyProps = ComponentProps<'div'>;\n\nconst InlineCitationCardBody = ({\n className,\n ...props\n}: InlineCitationCardBodyProps): ReactNode => (\n <HoverCardContent\n data-slot=\"inline-citation-card-body\"\n className={cn('relative w-80 p-0', className)}\n {...props}\n />\n);\n\ntype InlineCitationSourceProps = ComponentProps<'div'> & {\n title?: string;\n url?: string;\n description?: string;\n};\n\nconst InlineCitationSource: ForwardRefExoticComponent<\n Omit<InlineCitationSourceProps, 'ref'> & RefAttributes<HTMLDivElement>\n> = forwardRef<ComponentRef<'div'>, InlineCitationSourceProps>(\n ({ title, url, description, className, children, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"inline-citation-source\"\n className={cn('space-y-1', className)}\n {...props}\n >\n {title && (\n <h4 className=\"truncate font-medium text-sm leading-tight\">{title}</h4>\n )}\n {url && (\n <p className=\"truncate break-all text-muted-foreground text-xs\">\n {url}\n </p>\n )}\n {description && (\n <p className=\"line-clamp-3 text-muted-foreground text-sm leading-relaxed\">\n {description}\n </p>\n )}\n {children}\n </div>\n )\n);\nInlineCitationSource.displayName = 'InlineCitationSource';\n\ntype InlineCitationQuoteProps = ComponentProps<'blockquote'>;\n\nconst InlineCitationQuote: ForwardRefExoticComponent<\n ComponentProps<'blockquote'> & RefAttributes<HTMLQuoteElement>\n> = forwardRef<ComponentRef<'blockquote'>, InlineCitationQuoteProps>(\n ({ children, className, ...props }, ref) => (\n <blockquote\n ref={ref}\n data-slot=\"inline-citation-quote\"\n className={cn(\n 'border-muted-background border-l-2 pl-3 text-muted-foreground text-sm italic',\n className\n )}\n {...props}\n >\n {children}\n </blockquote>\n )\n);\nInlineCitationQuote.displayName = 'InlineCitationQuote';\n\nexport type InlineCitationLinkProps = Omit<ComponentProps<'a'>, 'target'> & {\n target?: '_blank' | '_self';\n icon?: ComponentType<{ className?: string }>;\n variant?: DecorativeVariant;\n};\n\nconst InlineCitationLink: ForwardRefExoticComponent<\n Omit<InlineCitationLinkProps, 'ref'> & RefAttributes<HTMLAnchorElement>\n> = forwardRef<ComponentRef<'a'>, InlineCitationLinkProps>(\n (\n {\n href,\n target = '_self',\n icon: Icon,\n variant = 'decorative-1',\n className,\n children,\n ...props\n },\n ref\n ) => {\n const hostname = getHostname(href);\n\n const variantStyles: Record<DecorativeVariant, string> = {\n 'decorative-1':\n 'bg-decorative-1-background hover:bg-decorative-1-background-hover text-decorative-1-foreground',\n 'decorative-2':\n 'bg-decorative-2-background hover:bg-decorative-2-background-hover text-decorative-2-foreground',\n 'decorative-3':\n 'bg-decorative-3-background hover:bg-decorative-3-background-hover text-decorative-3-foreground',\n 'decorative-4':\n 'bg-decorative-4-background hover:bg-decorative-4-background-hover text-decorative-4-foreground',\n 'decorative-5':\n 'bg-decorative-5-background hover:bg-decorative-5-background-hover text-decorative-5-foreground',\n 'decorative-6':\n 'bg-decorative-6-background hover:bg-decorative-6-background-hover text-decorative-6-foreground',\n 'decorative-7':\n 'bg-decorative-7-background hover:bg-decorative-7-background-hover text-decorative-7-foreground',\n };\n\n return (\n <a\n ref={ref}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : undefined}\n className=\"inline-flex items-stretch\"\n {...props}\n >\n <Badge\n data-slot=\"inline-citation-link\"\n className={cn(\n 'inline-flex items-center justify-center rounded-md border border-transparent px-1 text-sm leading-4.5 font-medium whitespace-nowrap gap-1 transition-colors',\n '[&>svg]:size-3 [&>svg]:pointer-events-none',\n variantStyles[variant],\n className\n )}\n >\n {Icon && <Icon className=\"size-3\" />}\n {children ?? hostname}\n </Badge>\n </a>\n );\n }\n);\nInlineCitationLink.displayName = 'InlineCitationLink';\n\nexport {\n InlineCitation,\n InlineCitationCard,\n InlineCitationCardBody,\n InlineCitationCardTrigger,\n InlineCitationGroup,\n InlineCitationLink,\n InlineCitationQuote,\n InlineCitationSource,\n InlineCitationText,\n};\n"],"names":["forwardRef","cn","getHostname","Badge","HoverCard","HoverCardContent","HoverCardTrigger","InlineCitation","className","props","ref","span","data-slot","displayName","InlineCitationGroup","div","InlineCitationText","InlineCitationCard","closeDelay","openDelay","InlineCitationCardTrigger","sources","icon","Icon","render","length","InlineCitationCardBody","InlineCitationSource","title","url","description","children","h4","p","InlineCitationQuote","blockquote","InlineCitationLink","href","target","variant","hostname","variantStyles","a","rel","undefined"],"mappings":";AAAA,SAOEA,UAAU,QACL,QAAQ;AAGf,SAASC,EAAE,EAAEC,WAAW,QAAQ,2BAAwB;AACxD,SAASC,KAAK,QAAQ,oBAAiB;AACvC,SACEC,SAAS,EACTC,gBAAgB,EAChBC,gBAAgB,QACX,8BAA2B;AAIlC,MAAMC,+BAEFP,WACF,CAAC,EAAEQ,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBACxB,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVJ,WAAWP,GAAG,wCAAwCO;QACrD,GAAGC,KAAK;;AAIfF,eAAeM,WAAW,GAAG;AAI7B,MAAMC,oCAEFd,WACF,CAAC,EAAEQ,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBACxB,KAACK;QACCL,KAAKA;QACLE,aAAU;QACVJ,WAAWP,GAAG,wBAAwBO;QACrC,GAAGC,KAAK;;AAIfK,oBAAoBD,WAAW,GAAG;AAIlC,MAAMG,mCAEFhB,WACF,CAAC,EAAEQ,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBACxB,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVJ,WAAWP,GACT,sDACAO;QAED,GAAGC,KAAK;;AAIfO,mBAAmBH,WAAW,GAAG;AAIjC,MAAMI,qBAAqB,CAACR,sBAC1B,KAACL;QACCQ,aAAU;QACVM,YAAY;QACZC,WAAW;QACV,GAAGV,KAAK;;AASb,MAAMW,4BAA4B,CAAC,EACjCC,OAAO,EACPC,MAAMC,IAAI,EACVf,SAAS,EACT,GAAGC,OAC4B;IAC/B,qBACE,KAACH;QACCkB,sBACE,MAACrB;YACCS,aAAU;YACVJ,WAAWP,GACT,wOACA,8CACAO;YAED,GAAGC,KAAK;;gBAERc,sBAAQ,KAACA;oBAAKf,WAAU;;gBACxBa,OAAO,CAAC,EAAE,iBACT;;wBACGnB,YAAYmB,OAAO,CAAC,EAAE;wBAAG;wBACzBA,QAAQI,MAAM,GAAG,KAAK,CAAC,CAAC,EAAEJ,QAAQI,MAAM,GAAG,GAAG;;qBAGjD;;;;AAMZ;AAIA,MAAMC,yBAAyB,CAAC,EAC9BlB,SAAS,EACT,GAAGC,OACyB,iBAC5B,KAACJ;QACCO,aAAU;QACVJ,WAAWP,GAAG,qBAAqBO;QAClC,GAAGC,KAAK;;AAUb,MAAMkB,qCAEF3B,WACF,CAAC,EAAE4B,KAAK,EAAEC,GAAG,EAAEC,WAAW,EAAEtB,SAAS,EAAEuB,QAAQ,EAAE,GAAGtB,OAAO,EAAEC,oBAC3D,MAACK;QACCL,KAAKA;QACLE,aAAU;QACVJ,WAAWP,GAAG,aAAaO;QAC1B,GAAGC,KAAK;;YAERmB,uBACC,KAACI;gBAAGxB,WAAU;0BAA8CoB;;YAE7DC,qBACC,KAACI;gBAAEzB,WAAU;0BACVqB;;YAGJC,6BACC,KAACG;gBAAEzB,WAAU;0BACVsB;;YAGJC;;;AAIPJ,qBAAqBd,WAAW,GAAG;AAInC,MAAMqB,oCAEFlC,WACF,CAAC,EAAE+B,QAAQ,EAAEvB,SAAS,EAAE,GAAGC,OAAO,EAAEC,oBAClC,KAACyB;QACCzB,KAAKA;QACLE,aAAU;QACVJ,WAAWP,GACT,gFACAO;QAED,GAAGC,KAAK;kBAERsB;;AAIPG,oBAAoBrB,WAAW,GAAG;AAQlC,MAAMuB,mCAEFpC,WACF,CACE,EACEqC,IAAI,EACJC,SAAS,OAAO,EAChBhB,MAAMC,IAAI,EACVgB,UAAU,cAAc,EACxB/B,SAAS,EACTuB,QAAQ,EACR,GAAGtB,OACJ,EACDC;IAEA,MAAM8B,WAAWtC,YAAYmC;IAE7B,MAAMI,gBAAmD;QACvD,gBACE;QACF,gBACE;QACF,gBACE;QACF,gBACE;QACF,gBACE;QACF,gBACE;QACF,gBACE;IACJ;IAEA,qBACE,KAACC;QACChC,KAAKA;QACL2B,MAAMA;QACNC,QAAQA;QACRK,KAAKL,WAAW,WAAW,wBAAwBM;QACnDpC,WAAU;QACT,GAAGC,KAAK;kBAET,cAAA,MAACN;YACCS,aAAU;YACVJ,WAAWP,GACT,+JACA,8CACAwC,aAAa,CAACF,QAAQ,EACtB/B;;gBAGDe,sBAAQ,KAACA;oBAAKf,WAAU;;gBACxBuB,YAAYS;;;;AAIrB;AAEFJ,mBAAmBvB,WAAW,GAAG;AAEjC,SACEN,cAAc,EACdU,kBAAkB,EAClBS,sBAAsB,EACtBN,yBAAyB,EACzBN,mBAAmB,EACnBsB,kBAAkB,EAClBF,mBAAmB,EACnBP,oBAAoB,EACpBX,kBAAkB,GAClB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from
|
|
2
|
-
declare const Input: ForwardRefExoticComponent<ComponentProps<
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps } from "react";
|
|
2
|
+
declare const Input: ForwardRefExoticComponent<ComponentProps<"input"> & RefAttributes<HTMLInputElement>>;
|
|
3
3
|
export { Input };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { cn, disabledState, filledState, focusState, formElementBase, hoverState, invalidState, readOnlyState } from "../../../../lib/utils.js";
|
|
4
|
+
const Input = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
5
|
+
return /*#__PURE__*/ _jsx("input", {
|
|
6
|
+
ref: ref,
|
|
7
|
+
"data-slot": "input",
|
|
8
|
+
className: cn('w-full h-9', formElementBase, hoverState, filledState, focusState, invalidState, disabledState, readOnlyState, className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
Input.displayName = 'Input';
|
|
13
|
+
export { Input };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/input/input.tsx"],"sourcesContent":["import {\n type ForwardRefExoticComponent,\n type RefAttributes,\n type ComponentProps,\n type ForwardedRef,\n forwardRef,\n} from 'react';\n\nimport {\n cn,\n disabledState,\n filledState,\n focusState,\n formElementBase,\n hoverState,\n invalidState,\n readOnlyState,\n} from '../../../../lib/utils';\n\nconst Input: ForwardRefExoticComponent<\n ComponentProps<'input'> & RefAttributes<HTMLInputElement>\n> = forwardRef<HTMLInputElement, ComponentProps<'input'>>(\n (\n { className, ...props }: ComponentProps<'input'>,\n ref: ForwardedRef<HTMLInputElement>\n ) => {\n return (\n <input\n ref={ref}\n data-slot=\"input\"\n className={cn(\n 'w-full h-9',\n formElementBase,\n hoverState,\n filledState,\n focusState,\n invalidState,\n disabledState,\n readOnlyState,\n className\n )}\n {...props}\n />\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":["forwardRef","cn","disabledState","filledState","focusState","formElementBase","hoverState","invalidState","readOnlyState","Input","className","props","ref","input","data-slot","displayName"],"mappings":";AAAA,SAKEA,UAAU,QACL,QAAQ;AAEf,SACEC,EAAE,EACFC,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,aAAa,QACR,2BAAwB;AAE/B,MAAMC,sBAEFT,WACF,CACE,EAAEU,SAAS,EAAE,GAAGC,OAAgC,EAChDC;IAEA,qBACE,KAACC;QACCD,KAAKA;QACLE,aAAU;QACVJ,WAAWT,GACT,cACAI,iBACAC,YACAH,aACAC,YACAG,cACAL,eACAM,eACAE;QAED,GAAGC,KAAK;;AAGf;AAGFF,MAAMM,WAAW,GAAG;AAEpB,SAASN,KAAK,GAAG"}
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from
|
|
2
|
-
import { VariantProps } from
|
|
3
|
-
import { ClassProp } from
|
|
4
|
-
import { Button } from
|
|
5
|
-
declare const InputGroup: ForwardRefExoticComponent<ComponentProps<
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes, type ComponentProps } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import type { ClassProp } from "class-variance-authority/types";
|
|
4
|
+
import { Button } from "../button/button";
|
|
5
|
+
declare const InputGroup: ForwardRefExoticComponent<ComponentProps<"div"> & RefAttributes<HTMLDivElement>>;
|
|
6
6
|
interface InputGroupAddonVariantProps {
|
|
7
|
-
|
|
7
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null;
|
|
8
8
|
}
|
|
9
9
|
declare const inputGroupAddonVariants: (props?: (InputGroupAddonVariantProps & ClassProp) | undefined) => string;
|
|
10
|
-
declare const InputGroupAddon: ForwardRefExoticComponent<ComponentProps<
|
|
10
|
+
declare const InputGroupAddon: ForwardRefExoticComponent<ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants> & RefAttributes<HTMLDivElement>>;
|
|
11
11
|
interface InputGroupButtonVariantProps {
|
|
12
|
-
|
|
12
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null;
|
|
13
13
|
}
|
|
14
|
-
type InputGroupButtonProps = Omit<ComponentProps<typeof Button>,
|
|
15
|
-
declare const InputGroupButton: ForwardRefExoticComponent<Omit<InputGroupButtonProps,
|
|
16
|
-
declare const InputGroupText: ForwardRefExoticComponent<ComponentProps<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
type InputGroupButtonProps = Omit<ComponentProps<typeof Button>, "size"> & InputGroupButtonVariantProps;
|
|
15
|
+
declare const InputGroupButton: ForwardRefExoticComponent<Omit<InputGroupButtonProps, "ref"> & RefAttributes<HTMLElement>>;
|
|
16
|
+
declare const InputGroupText: ForwardRefExoticComponent<ComponentProps<"span"> & RefAttributes<HTMLSpanElement>>;
|
|
17
|
+
type InputGroupStepperProps = ComponentProps<"div"> & {
|
|
18
|
+
onIncrement?: () => void;
|
|
19
|
+
onDecrement?: () => void;
|
|
20
|
+
incrementLabel?: string;
|
|
21
|
+
decrementLabel?: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
incrementDisabled?: boolean;
|
|
24
|
+
decrementDisabled?: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare const InputGroupStepper: ForwardRefExoticComponent<InputGroupStepperProps & RefAttributes<HTMLDivElement>>;
|
|
27
|
+
declare const inputGroupInputControlClasses: string;
|
|
28
|
+
declare const InputGroupInput: ForwardRefExoticComponent<ComponentProps<"input"> & RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare const InputGroupTextarea: ForwardRefExoticComponent<ComponentProps<"textarea"> & RefAttributes<HTMLTextAreaElement>>;
|
|
30
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupStepper, InputGroupText, InputGroupInput, inputGroupInputControlClasses, InputGroupTextarea };
|
|
@@ -1,76 +1,149 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { IconChevronDown, IconChevronUp } 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 { Input } from "../input/input.js";
|
|
8
|
+
import { Textarea } from "../textarea/textarea.js";
|
|
9
|
+
const InputGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
10
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
11
|
+
ref: ref,
|
|
12
|
+
"data-slot": "input-group",
|
|
13
|
+
role: "group",
|
|
14
|
+
className: cn('group/input-group bg-medium-background border border-transparent relative flex w-full items-stretch rounded-lg shadow-none transition-[color,box-shadow,border-color,background-color] outline-none', 'hover:border-emphasized', 'h-9 min-w-0 has-[>textarea]:h-auto', 'has-[>[data-align=inline-start]]:[&>input]:pl-2 has-[>[data-align=inline-start]]:[&>input]:rounded-l-none has-[>[data-align=inline-start]]:[&>textarea]:rounded-l-none', 'has-[>[data-align=inline-end]]:[&>input]:rounded-r-none has-[>[data-align=inline-end]]:[&>textarea]:rounded-r-none', '[&>input]:pr-2 [&>textarea]:pr-2', 'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3', 'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3', 'has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:bg-base-background has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:shadow-focus-ring has-[[data-slot=input-group-control]:focus-visible:not(:read-only)]:border-transparent', 'has-[[data-slot=input-group-control][aria-invalid=true]:not(:focus-visible)]:shadow-focus-ring-destructive has-[[data-slot=input-group-control][aria-invalid=true]:not(:focus-visible)]:border-transparent', 'has-[[data-slot=input-group-control]:read-only:not(:disabled)]:border-transparent has-[[data-slot=input-group-control]:read-only:not(:disabled)]:bg-card-background has-[[data-slot=input-group-control]:read-only:not(:disabled)]:text-muted-foreground has-[[data-slot=input-group-control]:read-only:not(:disabled)]:shadow-none', 'hover:has-[[data-slot=input-group-control]:read-only:not(:disabled)]:border-transparent hover:has-[[data-slot=input-group-control]:read-only:not(:disabled)]:bg-card-background hover:has-[[data-slot=input-group-control]:read-only:not(:disabled)]:text-muted-foreground', 'has-[[data-slot=input-group-control]:disabled]:bg-transparent has-[[data-slot=input-group-control]:disabled]:border-disabled has-[[data-slot=input-group-control]:disabled]:hover:border-disabled has-[[data-slot=input-group-control]:disabled]:text-base-foreground-disabled', className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
InputGroup.displayName = 'InputGroup';
|
|
19
|
+
const inputGroupLeadingIcon = "[&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-colors group-hover/input-group:group-has-[[data-slot=input-group-control]:enabled:not(:read-only)]/input-group:[&>svg]:text-base-foreground group-has-[[data-slot=input-group-control]:enabled:focus-visible:not(:read-only)]/input-group:[&>svg]:text-base-foreground group-has-[[data-slot=input-group-control]:enabled:not(:placeholder-shown):not(:read-only)]/input-group:[&>svg]:text-base-foreground group-has-[[data-slot=input-group-control][aria-invalid=true]:enabled:not(:read-only)]/input-group:[&>svg]:text-base-foreground group-has-[[data-slot=input-group-control]:read-only:enabled]/input-group:[&>svg]:text-muted-foreground group-has-[[data-slot=input-group-control]:disabled]/input-group:[&>svg]:text-base-foreground-disabled";
|
|
20
|
+
const inputGroupSuffixAddon = "[&>svg:not([class*='size-'])]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:transition-colors";
|
|
21
|
+
const inputGroupAddonVariants = cva('text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-2 text-xs font-normal select-none [&>kbd]:rounded-sm group-has-[[data-slot=input-group-control]:read-only:not(:disabled)]/input-group:cursor-default', {
|
|
22
|
+
variants: {
|
|
23
|
+
align: {
|
|
24
|
+
'inline-start': cn('order-first min-h-0 rounded-l-lg pl-2', inputGroupLeadingIcon),
|
|
25
|
+
'inline-end': cn('order-last min-h-0 rounded-r-lg pr-2 has-[>button]:pr-1 has-[kbd]:pr-1 has-[[class*=stepper]]:pr-1', inputGroupSuffixAddon),
|
|
26
|
+
'block-start': cn('order-first w-full justify-start px-2 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5', inputGroupLeadingIcon),
|
|
27
|
+
'block-end': cn('order-last w-full justify-start px-2 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5', inputGroupSuffixAddon)
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
align: 'inline-start'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const InputGroupAddon = /*#__PURE__*/ forwardRef(({ className, align = 'inline-start', ...props }, ref)=>{
|
|
35
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
36
|
+
ref: ref,
|
|
37
|
+
role: "group",
|
|
38
|
+
"data-slot": "input-group-addon",
|
|
39
|
+
"data-align": align,
|
|
40
|
+
className: cn(inputGroupAddonVariants({
|
|
41
|
+
align
|
|
42
|
+
}), className),
|
|
43
|
+
onClick: (e)=>{
|
|
44
|
+
if (e.target instanceof HTMLElement && e.target.closest('button')) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
// Clicks that bubbled from a React portal still hit this handler (React tree), but
|
|
48
|
+
// `target` lives outside `currentTarget` in the DOM — do not forward focus to the
|
|
49
|
+
// group's primary control (e.g. PAIA agent menu search vs. message textarea).
|
|
50
|
+
if (e.target instanceof Node && !e.currentTarget.contains(e.target)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
e.currentTarget.parentElement?.querySelector('[data-slot="input-group-control"]')?.focus();
|
|
54
|
+
},
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
InputGroupAddon.displayName = 'InputGroupAddon';
|
|
59
|
+
const inputGroupButtonVariants = cva('text-sm shadow-none flex gap-2 items-center', {
|
|
60
|
+
variants: {
|
|
61
|
+
size: {
|
|
62
|
+
xs: "h-6 gap-1 px-2 rounded-sm [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2",
|
|
63
|
+
sm: 'h-7 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5',
|
|
64
|
+
'icon-xs': 'size-6 rounded-xs p-0 has-[>svg]:p-0',
|
|
65
|
+
'icon-sm': 'size-7 p-0 has-[>svg]:p-0'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
defaultVariants: {
|
|
69
|
+
size: 'xs'
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const InputGroupButton = /*#__PURE__*/ forwardRef(({ className, type = 'button', variant = 'ghost', size = 'xs', ...props }, ref)=>{
|
|
73
|
+
return /*#__PURE__*/ _jsx(Button, {
|
|
74
|
+
ref: ref,
|
|
75
|
+
type: type,
|
|
76
|
+
"data-size": size,
|
|
77
|
+
variant: variant,
|
|
78
|
+
className: cn(inputGroupButtonVariants({
|
|
79
|
+
size
|
|
80
|
+
}), className),
|
|
81
|
+
...props
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
InputGroupButton.displayName = 'InputGroupButton';
|
|
85
|
+
const InputGroupText = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
86
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
87
|
+
ref: ref,
|
|
88
|
+
"data-slot": "input-group-text",
|
|
89
|
+
className: cn("text-muted-foreground flex items-center gap-2 text-xs leading-[14px] tracking-[-0.00833em] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:text-muted-foreground", className),
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
InputGroupText.displayName = 'InputGroupText';
|
|
94
|
+
const inputGroupStepperButtonClasses = 'bg-secondary-background hover:bg-secondary-background-hover flex min-h-0 flex-1 items-center justify-center rounded-sm p-1 text-muted-foreground transition-colors disabled:pointer-events-none disabled:opacity-50';
|
|
95
|
+
const InputGroupStepper = /*#__PURE__*/ forwardRef(({ className, onIncrement, onDecrement, incrementLabel = 'Increase value', decrementLabel = 'Decrease value', disabled = false, incrementDisabled = false, decrementDisabled = false, ...props }, ref)=>{
|
|
96
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
97
|
+
ref: ref,
|
|
98
|
+
"data-slot": "input-group-stepper",
|
|
99
|
+
className: cn('stepper flex w-7 shrink-0 flex-col gap-0.5', className),
|
|
100
|
+
...props,
|
|
101
|
+
children: [
|
|
102
|
+
/*#__PURE__*/ _jsx("button", {
|
|
103
|
+
type: "button",
|
|
104
|
+
className: inputGroupStepperButtonClasses,
|
|
105
|
+
"aria-label": incrementLabel,
|
|
106
|
+
onClick: onIncrement,
|
|
107
|
+
disabled: disabled || incrementDisabled,
|
|
108
|
+
children: /*#__PURE__*/ _jsx(IconChevronUp, {
|
|
109
|
+
className: "size-1.5 shrink-0",
|
|
110
|
+
"aria-hidden": true
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
/*#__PURE__*/ _jsx("button", {
|
|
114
|
+
type: "button",
|
|
115
|
+
className: inputGroupStepperButtonClasses,
|
|
116
|
+
"aria-label": decrementLabel,
|
|
117
|
+
onClick: onDecrement,
|
|
118
|
+
disabled: disabled || decrementDisabled,
|
|
119
|
+
children: /*#__PURE__*/ _jsx(IconChevronDown, {
|
|
120
|
+
className: "size-1.5 shrink-0",
|
|
121
|
+
"aria-hidden": true
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
InputGroupStepper.displayName = 'InputGroupStepper';
|
|
128
|
+
const inputGroupInputControlClasses = cn('min-h-0 h-full min-w-0 flex-1 rounded-lg border-0 bg-transparent shadow-none hover:text-muted-foreground', 'tracking-[-0.04em]', 'focus-visible:not(:read-only):bg-base-background focus-visible:shadow-none focus-visible:border-transparent', 'read-only:not(:disabled):bg-transparent read-only:not(:disabled):cursor-default read-only:not(:disabled):hover:text-muted-foreground read-only:not(:disabled):focus-visible:bg-transparent', 'aria-invalid:shadow-none aria-invalid:border-transparent', 'aria-invalid:[&:not(:placeholder-shown)]:border-transparent', 'aria-invalid:focus-visible:not(:read-only):bg-base-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent', 'read-only:not(:disabled):aria-invalid:focus-visible:bg-transparent', 'hover:border-0', 'disabled:bg-transparent disabled:text-base-foreground-disabled disabled:placeholder:text-base-foreground-disabled disabled:hover:text-base-foreground-disabled disabled:[&:not(:placeholder-shown)]:text-base-foreground-disabled');
|
|
129
|
+
const InputGroupInput = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
130
|
+
return /*#__PURE__*/ _jsx(Input, {
|
|
131
|
+
ref: ref,
|
|
132
|
+
"data-slot": "input-group-control",
|
|
133
|
+
className: cn(inputGroupInputControlClasses, className),
|
|
134
|
+
...props
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
InputGroupInput.displayName = 'InputGroupInput';
|
|
138
|
+
const InputGroupTextarea = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
|
|
139
|
+
return /*#__PURE__*/ _jsx(Textarea, {
|
|
140
|
+
ref: ref,
|
|
141
|
+
"data-slot": "input-group-control",
|
|
142
|
+
className: cn('min-h-0 flex-1 resize-none rounded-lg border-0 bg-transparent py-3 shadow-none', 'tracking-[-0.04em]', 'hover:border-0 hover:bg-transparent hover:text-muted-foreground', 'filled:border-transparent', 'focus-visible:shadow-none focus-visible:border-transparent', 'read-only:not(:disabled):bg-transparent read-only:not(:disabled):cursor-default read-only:not(:disabled):hover:text-muted-foreground read-only:not(:disabled):focus-visible:bg-transparent', 'aria-invalid:shadow-none aria-invalid:border-transparent', 'aria-invalid:[&:not(:placeholder-shown)]:border-transparent', 'aria-invalid:focus-visible:not(:read-only):bg-base-background aria-invalid:focus-visible:shadow-none aria-invalid:focus-visible:border-transparent', 'read-only:not(:disabled):aria-invalid:focus-visible:bg-transparent', 'read-only:not(:disabled):text-muted-foreground [&:read-only:not(:disabled):not(:placeholder-shown)]:text-muted-foreground', 'disabled:bg-transparent disabled:text-base-foreground-disabled disabled:placeholder:text-base-foreground-disabled disabled:hover:text-base-foreground-disabled disabled:[&:not(:placeholder-shown)]:text-base-foreground-disabled', className),
|
|
143
|
+
...props
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
InputGroupTextarea.displayName = 'InputGroupTextarea';
|
|
147
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupStepper, InputGroupText, InputGroupInput, inputGroupInputControlClasses, InputGroupTextarea };
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=input-group.js.map
|