@burtson-labs/ui 0.13.1 → 0.14.1
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/LICENSES/DEPENDENCIES.txt +2745 -0
- package/LICENSES/Radix-MIT.txt +21 -0
- package/LICENSES/cmdk-MIT.txt +21 -0
- package/LICENSES/overrides/react-remove-scroll-bar.txt +26 -0
- package/LICENSES/shadcn-MIT.txt +21 -0
- package/README.md +20 -12
- package/THIRD_PARTY_NOTICES.md +15 -3
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +22 -18
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.d.ts +13 -11
- package/dist/components/alert-dialog.js +41 -31
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.d.ts +5 -3
- package/dist/components/alert.js +12 -7
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-shell.d.ts +7 -6
- package/dist/components/app-shell.js +22 -14
- package/dist/components/app-shell.js.map +1 -1
- package/dist/components/attachment.d.ts +3 -3
- package/dist/components/attachment.js +11 -7
- package/dist/components/attachment.js.map +1 -1
- package/dist/components/audio-player.d.ts +2 -2
- package/dist/components/audio-player.js +9 -6
- package/dist/components/audio-player.js.map +1 -1
- package/dist/components/avatar.d.ts +4 -4
- package/dist/components/avatar.js +16 -12
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +15 -13
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +27 -20
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.d.ts +9 -2
- package/dist/components/button.js +15 -6
- package/dist/components/button.js.map +1 -1
- package/dist/components/card.d.ts +9 -9
- package/dist/components/card.js +33 -23
- package/dist/components/card.js.map +1 -1
- package/dist/components/chat-history.d.ts +1 -1
- package/dist/components/chat-history.js +11 -9
- package/dist/components/chat-history.js.map +1 -1
- package/dist/components/chat-layout.d.ts +1 -1
- package/dist/components/chat-layout.js +8 -3
- package/dist/components/chat-layout.js.map +1 -1
- package/dist/components/checkbox-card.d.ts +3 -3
- package/dist/components/checkbox-card.js +12 -10
- package/dist/components/checkbox-card.js.map +1 -1
- package/dist/components/checkbox.d.ts +24 -3
- package/dist/components/checkbox.js +52 -9
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.d.ts +3 -3
- package/dist/components/collapsible.js +14 -11
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.d.ts +14 -4
- package/dist/components/combobox.js +19 -8
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.d.ts +68 -12
- package/dist/components/command.js +48 -34
- package/dist/components/command.js.map +1 -1
- package/dist/components/composer.d.ts +2 -2
- package/dist/components/composer.js +10 -7
- package/dist/components/composer.js.map +1 -1
- package/dist/components/connection-status.d.ts +3 -3
- package/dist/components/connection-status.js +19 -14
- package/dist/components/connection-status.js.map +1 -1
- package/dist/components/context-menu.d.ts +15 -14
- package/dist/components/context-menu.js +52 -41
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/conversation.d.ts +1 -1
- package/dist/components/conversation.js +7 -5
- package/dist/components/conversation.js.map +1 -1
- package/dist/components/copy-button.d.ts +1 -1
- package/dist/components/copy-button.js +4 -2
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/data-table.d.ts +7 -2
- package/dist/components/data-table.js +17 -42
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/dialog.d.ts +19 -10
- package/dist/components/dialog.js +50 -33
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dropdown-menu.d.ts +15 -14
- package/dist/components/dropdown-menu.js +52 -41
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/editor-tabs.d.ts +1 -1
- package/dist/components/editor-tabs.js +7 -5
- package/dist/components/editor-tabs.js.map +1 -1
- package/dist/components/empty-state.d.ts +5 -5
- package/dist/components/empty-state.js +17 -11
- package/dist/components/empty-state.js.map +1 -1
- package/dist/components/error-summary.d.ts +21 -0
- package/dist/components/error-summary.js +62 -0
- package/dist/components/error-summary.js.map +1 -0
- package/dist/components/field.d.ts +66 -7
- package/dist/components/field.js +152 -20
- package/dist/components/field.js.map +1 -1
- package/dist/components/form-actions.d.ts +18 -0
- package/dist/components/form-actions.js +30 -0
- package/dist/components/form-actions.js.map +1 -0
- package/dist/components/icon-button.d.ts +3 -1
- package/dist/components/icon-button.js +6 -3
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/input.d.ts +42 -7
- package/dist/components/input.js +54 -10
- package/dist/components/input.js.map +1 -1
- package/dist/components/kbd.d.ts +2 -2
- package/dist/components/kbd.js +8 -5
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/label.d.ts +7 -2
- package/dist/components/label.js +14 -7
- package/dist/components/label.js.map +1 -1
- package/dist/components/markdown.d.ts +4 -3
- package/dist/components/markdown.js +8 -6
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/menubar.d.ts +17 -15
- package/dist/components/menubar.js +58 -45
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/message-actions.d.ts +3 -3
- package/dist/components/message-actions.js +16 -12
- package/dist/components/message-actions.js.map +1 -1
- package/dist/components/message.d.ts +1 -1
- package/dist/components/message.js +6 -3
- package/dist/components/message.js.map +1 -1
- package/dist/components/mobile-nav.d.ts +1 -1
- package/dist/components/mobile-nav.js +7 -5
- package/dist/components/mobile-nav.js.map +1 -1
- package/dist/components/native-select.d.ts +16 -0
- package/dist/components/native-select.js +33 -0
- package/dist/components/native-select.js.map +1 -0
- package/dist/components/navigation-menu.d.ts +13 -12
- package/dist/components/navigation-menu.js +43 -33
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/number-input.d.ts +23 -0
- package/dist/components/number-input.js +45 -0
- package/dist/components/number-input.js.map +1 -0
- package/dist/components/onboarding-checklist.d.ts +1 -1
- package/dist/components/onboarding-checklist.js +5 -3
- package/dist/components/onboarding-checklist.js.map +1 -1
- package/dist/components/page-header.d.ts +7 -6
- package/dist/components/page-header.js +23 -15
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +4 -2
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.d.ts +14 -11
- package/dist/components/popover.js +30 -23
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +11 -9
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.d.ts +23 -4
- package/dist/components/radio-group.js +56 -14
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/reasoning.d.ts +3 -3
- package/dist/components/reasoning.js +14 -11
- package/dist/components/reasoning.js.map +1 -1
- package/dist/components/resizable.js +1 -0
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/scroll-area.d.ts +4 -3
- package/dist/components/scroll-area.js +18 -14
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/secret-input.d.ts +3 -2
- package/dist/components/secret-input.js +7 -4
- package/dist/components/secret-input.js.map +1 -1
- package/dist/components/select.d.ts +12 -7
- package/dist/components/select.js +42 -35
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.d.ts +2 -2
- package/dist/components/separator.js +8 -6
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.d.ts +11 -9
- package/dist/components/sheet.js +41 -29
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/skeleton.d.ts +2 -1
- package/dist/components/skeleton.js +7 -4
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.d.ts +10 -6
- package/dist/components/slider.js +16 -7
- package/dist/components/slider.js.map +1 -1
- package/dist/components/source.d.ts +2 -2
- package/dist/components/source.js +10 -7
- package/dist/components/source.js.map +1 -1
- package/dist/components/spinner.d.ts +4 -2
- package/dist/components/spinner.js +5 -3
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/stat-card.d.ts +27 -2
- package/dist/components/stat-card.js +70 -9
- package/dist/components/stat-card.js.map +1 -1
- package/dist/components/status.d.ts +7 -6
- package/dist/components/status.js +12 -5
- package/dist/components/status.js.map +1 -1
- package/dist/components/steps.d.ts +1 -1
- package/dist/components/steps.js +5 -3
- package/dist/components/steps.js.map +1 -1
- package/dist/components/switch.d.ts +47 -3
- package/dist/components/switch.js +89 -11
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +29 -12
- package/dist/components/table.js +80 -34
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +10 -5
- package/dist/components/tabs.js +29 -19
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.d.ts +6 -1
- package/dist/components/textarea.js +4 -3
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast.d.ts +11 -7
- package/dist/components/toast.js +37 -27
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toaster.d.ts +4 -2
- package/dist/components/toaster.js +7 -2
- package/dist/components/toaster.js.map +1 -1
- package/dist/components/tool-call.d.ts +2 -2
- package/dist/components/tool-call.js +15 -12
- package/dist/components/tool-call.js.map +1 -1
- package/dist/components/toolbar.d.ts +9 -4
- package/dist/components/toolbar.js +15 -9
- package/dist/components/toolbar.js.map +1 -1
- package/dist/components/tooltip.d.ts +4 -3
- package/dist/components/tooltip.js +17 -13
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/tour.js +10 -8
- package/dist/components/tour.js.map +1 -1
- package/dist/components/tree-view.d.ts +1 -1
- package/dist/components/tree-view.js +10 -5
- package/dist/components/tree-view.js.map +1 -1
- package/dist/components/voice-recorder.d.ts +1 -1
- package/dist/components/voice-recorder.js +5 -2
- package/dist/components/voice-recorder.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +17 -12
- package/dist/lib/media.d.ts +18 -0
- package/dist/lib/media.js +34 -0
- package/dist/lib/media.js.map +1 -0
- package/dist/lib/utils.d.ts +32 -0
- package/dist/lib/utils.js +33 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/mui/index.js +20 -8
- package/dist/mui/index.js.map +1 -1
- package/dist/primitives/vendor/cmdk/command-score.d.ts +1 -0
- package/dist/primitives/vendor/cmdk/command-score.js +64 -0
- package/dist/primitives/vendor/cmdk/command-score.js.map +1 -0
- package/dist/primitives/vendor/cmdk/index.d.ts +384 -0
- package/dist/primitives/vendor/cmdk/index.js +687 -0
- package/dist/primitives/vendor/cmdk/index.js.map +1 -0
- package/dist/primitives/vendor/radix/number/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/number/number.d.ts +2 -0
- package/dist/primitives/vendor/radix/number/number.js +9 -0
- package/dist/primitives/vendor/radix/number/number.js.map +1 -0
- package/dist/primitives/vendor/radix/primitive/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/primitive/is-development.d.ts +1 -0
- package/dist/primitives/vendor/radix/primitive/is-development.js +7 -0
- package/dist/primitives/vendor/radix/primitive/is-development.js.map +1 -0
- package/dist/primitives/vendor/radix/primitive/primitive.d.ts +14 -0
- package/dist/primitives/vendor/radix/primitive/primitive.js +12 -0
- package/dist/primitives/vendor/radix/primitive/primitive.js.map +1 -0
- package/dist/primitives/vendor/radix/primitive/types.d.ts +5 -0
- package/dist/primitives/vendor/radix/react-accordion/accordion.d.ts +112 -0
- package/dist/primitives/vendor/radix/react-accordion/accordion.js +266 -0
- package/dist/primitives/vendor/radix/react-accordion/accordion.js.map +1 -0
- package/dist/primitives/vendor/radix/react-accordion/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-alert-dialog/alert-dialog.d.ts +49 -0
- package/dist/primitives/vendor/radix/react-alert-dialog/alert-dialog.js +122 -0
- package/dist/primitives/vendor/radix/react-alert-dialog/alert-dialog.js.map +1 -0
- package/dist/primitives/vendor/radix/react-alert-dialog/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-arrow/arrow.d.ts +9 -0
- package/dist/primitives/vendor/radix/react-arrow/arrow.js +22 -0
- package/dist/primitives/vendor/radix/react-arrow/arrow.js.map +1 -0
- package/dist/primitives/vendor/radix/react-arrow/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-avatar/avatar.d.ts +19 -0
- package/dist/primitives/vendor/radix/react-avatar/avatar.js +132 -0
- package/dist/primitives/vendor/radix/react-avatar/avatar.js.map +1 -0
- package/dist/primitives/vendor/radix/react-avatar/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-checkbox/checkbox.d.ts +47 -0
- package/dist/primitives/vendor/radix/react-checkbox/checkbox.js +197 -0
- package/dist/primitives/vendor/radix/react-checkbox/checkbox.js.map +1 -0
- package/dist/primitives/vendor/radix/react-checkbox/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-collapsible/collapsible.d.ts +31 -0
- package/dist/primitives/vendor/radix/react-collapsible/collapsible.js +133 -0
- package/dist/primitives/vendor/radix/react-collapsible/collapsible.js.map +1 -0
- package/dist/primitives/vendor/radix/react-collapsible/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-collection/collection-legacy.d.ts +21 -0
- package/dist/primitives/vendor/radix/react-collection/collection-legacy.js +84 -0
- package/dist/primitives/vendor/radix/react-collection/collection-legacy.js.map +1 -0
- package/dist/primitives/vendor/radix/react-collection/collection.d.ts +32 -0
- package/dist/primitives/vendor/radix/react-collection/index.d.ts +4 -0
- package/dist/primitives/vendor/radix/react-collection/ordered-dictionary.d.ts +51 -0
- package/dist/primitives/vendor/radix/react-compose-refs/compose-refs.d.ts +13 -0
- package/dist/primitives/vendor/radix/react-compose-refs/compose-refs.js +43 -0
- package/dist/primitives/vendor/radix/react-compose-refs/compose-refs.js.map +1 -0
- package/dist/primitives/vendor/radix/react-compose-refs/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-context/create-context.d.ts +45 -0
- package/dist/primitives/vendor/radix/react-context/create-context.js +74 -0
- package/dist/primitives/vendor/radix/react-context/create-context.js.map +1 -0
- package/dist/primitives/vendor/radix/react-context/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-context-menu/context-menu.d.ts +95 -0
- package/dist/primitives/vendor/radix/react-context-menu/context-menu.js +279 -0
- package/dist/primitives/vendor/radix/react-context-menu/context-menu.js.map +1 -0
- package/dist/primitives/vendor/radix/react-context-menu/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-dialog/dialog.d.ts +97 -0
- package/dist/primitives/vendor/radix/react-dialog/dialog.js +262 -0
- package/dist/primitives/vendor/radix/react-dialog/dialog.js.map +1 -0
- package/dist/primitives/vendor/radix/react-dialog/index.d.ts +4 -0
- package/dist/primitives/vendor/radix/react-direction/direction.d.ts +10 -0
- package/dist/primitives/vendor/radix/react-direction/direction.js +13 -0
- package/dist/primitives/vendor/radix/react-direction/direction.js.map +1 -0
- package/dist/primitives/vendor/radix/react-direction/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-dismissable-layer/dismissable-layer.d.ts +61 -0
- package/dist/primitives/vendor/radix/react-dismissable-layer/dismissable-layer.js +336 -0
- package/dist/primitives/vendor/radix/react-dismissable-layer/dismissable-layer.js.map +1 -0
- package/dist/primitives/vendor/radix/react-dismissable-layer/index.d.ts +4 -0
- package/dist/primitives/vendor/radix/react-dropdown-menu/dropdown-menu.d.ts +95 -0
- package/dist/primitives/vendor/radix/react-dropdown-menu/dropdown-menu.js +257 -0
- package/dist/primitives/vendor/radix/react-dropdown-menu/dropdown-menu.js.map +1 -0
- package/dist/primitives/vendor/radix/react-dropdown-menu/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-focus-guards/focus-guards.d.ts +11 -0
- package/dist/primitives/vendor/radix/react-focus-guards/focus-guards.js +49 -0
- package/dist/primitives/vendor/radix/react-focus-guards/focus-guards.js.map +1 -0
- package/dist/primitives/vendor/radix/react-focus-guards/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-focus-scope/focus-scope.d.ts +31 -0
- package/dist/primitives/vendor/radix/react-focus-scope/focus-scope.js +221 -0
- package/dist/primitives/vendor/radix/react-focus-scope/focus-scope.js.map +1 -0
- package/dist/primitives/vendor/radix/react-focus-scope/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-id/id.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-id/id.js +17 -0
- package/dist/primitives/vendor/radix/react-id/id.js.map +1 -0
- package/dist/primitives/vendor/radix/react-id/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-label/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-label/label.d.ts +9 -0
- package/dist/primitives/vendor/radix/react-label/label.js +21 -0
- package/dist/primitives/vendor/radix/react-label/label.js.map +1 -0
- package/dist/primitives/vendor/radix/react-menu/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-menu/menu.d.ts +173 -0
- package/dist/primitives/vendor/radix/react-menu/menu.js +806 -0
- package/dist/primitives/vendor/radix/react-menu/menu.js.map +1 -0
- package/dist/primitives/vendor/radix/react-menubar/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-menubar/menubar.d.ts +106 -0
- package/dist/primitives/vendor/radix/react-menubar/menubar.js +377 -0
- package/dist/primitives/vendor/radix/react-menubar/menubar.js.map +1 -0
- package/dist/primitives/vendor/radix/react-navigation-menu/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-navigation-menu/navigation-menu.d.ts +124 -0
- package/dist/primitives/vendor/radix/react-navigation-menu/navigation-menu.js +743 -0
- package/dist/primitives/vendor/radix/react-navigation-menu/navigation-menu.js.map +1 -0
- package/dist/primitives/vendor/radix/react-popover/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-popover/popover.d.ts +83 -0
- package/dist/primitives/vendor/radix/react-popover/popover.js +236 -0
- package/dist/primitives/vendor/radix/react-popover/popover.js.map +1 -0
- package/dist/primitives/vendor/radix/react-popper/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-popper/popper.d.ts +44 -0
- package/dist/primitives/vendor/radix/react-popper/popper.js +276 -0
- package/dist/primitives/vendor/radix/react-popper/popper.js.map +1 -0
- package/dist/primitives/vendor/radix/react-portal/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-portal/portal.d.ts +13 -0
- package/dist/primitives/vendor/radix/react-portal/portal.js +21 -0
- package/dist/primitives/vendor/radix/react-portal/portal.js.map +1 -0
- package/dist/primitives/vendor/radix/react-presence/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-presence/presence.d.ts +11 -0
- package/dist/primitives/vendor/radix/react-presence/presence.js +152 -0
- package/dist/primitives/vendor/radix/react-presence/presence.js.map +1 -0
- package/dist/primitives/vendor/radix/react-presence/use-state-machine.d.ts +10 -0
- package/dist/primitives/vendor/radix/react-presence/use-state-machine.js +12 -0
- package/dist/primitives/vendor/radix/react-presence/use-state-machine.js.map +1 -0
- package/dist/primitives/vendor/radix/react-primitive/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-primitive/primitive.d.ts +56 -0
- package/dist/primitives/vendor/radix/react-primitive/primitive.js +84 -0
- package/dist/primitives/vendor/radix/react-primitive/primitive.js.map +1 -0
- package/dist/primitives/vendor/radix/react-progress/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-progress/progress.d.ts +17 -0
- package/dist/primitives/vendor/radix/react-progress/progress.js +79 -0
- package/dist/primitives/vendor/radix/react-progress/progress.js.map +1 -0
- package/dist/primitives/vendor/radix/react-radio-group/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-radio-group/radio-group.d.ts +55 -0
- package/dist/primitives/vendor/radix/react-radio-group/radio-group.js +173 -0
- package/dist/primitives/vendor/radix/react-radio-group/radio-group.js.map +1 -0
- package/dist/primitives/vendor/radix/react-radio-group/radio.d.ts +62 -0
- package/dist/primitives/vendor/radix/react-radio-group/radio.js +150 -0
- package/dist/primitives/vendor/radix/react-radio-group/radio.js.map +1 -0
- package/dist/primitives/vendor/radix/react-roving-focus/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-roving-focus/roving-focus-group.d.ts +47 -0
- package/dist/primitives/vendor/radix/react-roving-focus/roving-focus-group.js +218 -0
- package/dist/primitives/vendor/radix/react-roving-focus/roving-focus-group.js.map +1 -0
- package/dist/primitives/vendor/radix/react-scroll-area/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-scroll-area/scroll-area.d.ts +121 -0
- package/dist/primitives/vendor/radix/react-scroll-area/scroll-area.js +713 -0
- package/dist/primitives/vendor/radix/react-scroll-area/scroll-area.js.map +1 -0
- package/dist/primitives/vendor/radix/react-scroll-area/use-state-machine.d.ts +10 -0
- package/dist/primitives/vendor/radix/react-scroll-area/use-state-machine.js +12 -0
- package/dist/primitives/vendor/radix/react-scroll-area/use-state-machine.js.map +1 -0
- package/dist/primitives/vendor/radix/react-select/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-select/select.d.ts +163 -0
- package/dist/primitives/vendor/radix/react-select/select.js +1040 -0
- package/dist/primitives/vendor/radix/react-select/select.js.map +1 -0
- package/dist/primitives/vendor/radix/react-separator/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-separator/separator.d.ts +20 -0
- package/dist/primitives/vendor/radix/react-separator/separator.js +29 -0
- package/dist/primitives/vendor/radix/react-separator/separator.js.map +1 -0
- package/dist/primitives/vendor/radix/react-slot/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-slot/slot.d.ts +29 -0
- package/dist/primitives/vendor/radix/react-slot/slot.js +107 -0
- package/dist/primitives/vendor/radix/react-slot/slot.js.map +1 -0
- package/dist/primitives/vendor/radix/react-switch/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-switch/switch.d.ts +41 -0
- package/dist/primitives/vendor/radix/react-switch/switch.js +185 -0
- package/dist/primitives/vendor/radix/react-switch/switch.js.map +1 -0
- package/dist/primitives/vendor/radix/react-tabs/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-tabs/tabs.d.ts +54 -0
- package/dist/primitives/vendor/radix/react-tabs/tabs.js +145 -0
- package/dist/primitives/vendor/radix/react-tabs/tabs.js.map +1 -0
- package/dist/primitives/vendor/radix/react-toast/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-toast/toast.d.ts +125 -0
- package/dist/primitives/vendor/radix/react-toast/toast.js +557 -0
- package/dist/primitives/vendor/radix/react-toast/toast.js.map +1 -0
- package/dist/primitives/vendor/radix/react-tooltip/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-tooltip/tooltip.d.ts +99 -0
- package/dist/primitives/vendor/radix/react-tooltip/tooltip.js +503 -0
- package/dist/primitives/vendor/radix/react-tooltip/tooltip.js.map +1 -0
- package/dist/primitives/vendor/radix/react-use-callback-ref/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-use-callback-ref/use-callback-ref.d.ts +6 -0
- package/dist/primitives/vendor/radix/react-use-callback-ref/use-callback-ref.js +18 -0
- package/dist/primitives/vendor/radix/react-use-callback-ref/use-callback-ref.js.map +1 -0
- package/dist/primitives/vendor/radix/react-use-controllable-state/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-use-controllable-state/use-controllable-state-reducer.d.ts +28 -0
- package/dist/primitives/vendor/radix/react-use-controllable-state/use-controllable-state.d.ts +11 -0
- package/dist/primitives/vendor/radix/react-use-controllable-state/use-controllable-state.js +59 -0
- package/dist/primitives/vendor/radix/react-use-controllable-state/use-controllable-state.js.map +1 -0
- package/dist/primitives/vendor/radix/react-use-effect-event/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-use-effect-event/use-effect-event.d.ts +7 -0
- package/dist/primitives/vendor/radix/react-use-is-hydrated/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated-legacy.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated-legacy.js +18 -0
- package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated-legacy.js.map +1 -0
- package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated.d.ts +6 -0
- package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated.js +19 -0
- package/dist/primitives/vendor/radix/react-use-is-hydrated/use-is-hydrated.js.map +1 -0
- package/dist/primitives/vendor/radix/react-use-layout-effect/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-use-layout-effect/use-layout-effect.d.ts +10 -0
- package/dist/primitives/vendor/radix/react-use-layout-effect/use-layout-effect.js +15 -0
- package/dist/primitives/vendor/radix/react-use-layout-effect/use-layout-effect.js.map +1 -0
- package/dist/primitives/vendor/radix/react-use-previous/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-use-previous/use-previous.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-use-previous/use-previous.js +20 -0
- package/dist/primitives/vendor/radix/react-use-previous/use-previous.js.map +1 -0
- package/dist/primitives/vendor/radix/react-use-size/index.d.ts +1 -0
- package/dist/primitives/vendor/radix/react-use-size/use-size.d.ts +5 -0
- package/dist/primitives/vendor/radix/react-use-size/use-size.js +42 -0
- package/dist/primitives/vendor/radix/react-use-size/use-size.js.map +1 -0
- package/dist/primitives/vendor/radix/react-visually-hidden/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/react-visually-hidden/visually-hidden.d.ts +21 -0
- package/dist/primitives/vendor/radix/react-visually-hidden/visually-hidden.js +32 -0
- package/dist/primitives/vendor/radix/react-visually-hidden/visually-hidden.js.map +1 -0
- package/dist/primitives/vendor/radix/rect/index.d.ts +2 -0
- package/dist/primitives/vendor/radix/rect/observe-element-rect.d.ts +16 -0
- package/dist/styles.css +1 -1
- package/dist/theme.css +36 -17
- package/dist/tokens.d.ts +78 -36
- package/dist/tokens.js +63 -32
- package/dist/tokens.js.map +1 -1
- package/package.json +25 -13
- package/vendor-manifest.json +1101 -0
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import "react";
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn, focusRingClasses } from "../lib/utils.js";
|
|
3
|
+
import { Root as Slot } from "../primitives/vendor/radix/react-slot/slot.js";
|
|
4
|
+
import * as React from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import ChevronRight from "@burtson-labs/icons/react/chevron-right";
|
|
6
7
|
import MoreHorizontal from "@burtson-labs/icons/react/more-horizontal";
|
|
7
8
|
//#region src/components/breadcrumb.tsx
|
|
8
|
-
function Breadcrumb(props) {
|
|
9
|
+
var Breadcrumb = React.forwardRef(function Breadcrumb(props, ref) {
|
|
9
10
|
return /* @__PURE__ */ jsx("nav", {
|
|
11
|
+
ref,
|
|
10
12
|
"aria-label": "Breadcrumb",
|
|
11
13
|
"data-slot": "breadcrumb",
|
|
12
14
|
...props
|
|
13
15
|
});
|
|
14
|
-
}
|
|
15
|
-
function BreadcrumbList({ className, ...props }) {
|
|
16
|
+
});
|
|
17
|
+
var BreadcrumbList = React.forwardRef(function BreadcrumbList({ className, ...props }, ref) {
|
|
16
18
|
return /* @__PURE__ */ jsx("ol", {
|
|
19
|
+
ref,
|
|
17
20
|
"data-slot": "breadcrumb-list",
|
|
18
21
|
className: cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground", className),
|
|
19
22
|
...props
|
|
20
23
|
});
|
|
21
|
-
}
|
|
22
|
-
function BreadcrumbItem({ className, ...props }) {
|
|
24
|
+
});
|
|
25
|
+
var BreadcrumbItem = React.forwardRef(function BreadcrumbItem({ className, ...props }, ref) {
|
|
23
26
|
return /* @__PURE__ */ jsx("li", {
|
|
27
|
+
ref,
|
|
24
28
|
"data-slot": "breadcrumb-item",
|
|
25
29
|
className: cn("inline-flex items-center gap-1.5", className),
|
|
26
30
|
...props
|
|
27
31
|
});
|
|
28
|
-
}
|
|
29
|
-
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
});
|
|
33
|
+
var BreadcrumbLink = React.forwardRef(function BreadcrumbLink({ asChild, className, ...props }, ref) {
|
|
34
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "a", {
|
|
35
|
+
ref,
|
|
32
36
|
"data-slot": "breadcrumb-link",
|
|
33
|
-
className: cn("transition-colors hover:text-foreground", className),
|
|
37
|
+
className: cn("rounded-xs transition-colors hover:text-foreground", focusRingClasses, className),
|
|
34
38
|
...props
|
|
35
39
|
});
|
|
36
|
-
}
|
|
37
|
-
function BreadcrumbPage({ className, ...props }) {
|
|
40
|
+
});
|
|
41
|
+
var BreadcrumbPage = React.forwardRef(function BreadcrumbPage({ className, ...props }, ref) {
|
|
38
42
|
return /* @__PURE__ */ jsx("span", {
|
|
43
|
+
ref,
|
|
39
44
|
"data-slot": "breadcrumb-page",
|
|
40
45
|
role: "link",
|
|
41
46
|
"aria-disabled": "true",
|
|
@@ -43,9 +48,10 @@ function BreadcrumbPage({ className, ...props }) {
|
|
|
43
48
|
className: cn("font-medium text-foreground", className),
|
|
44
49
|
...props
|
|
45
50
|
});
|
|
46
|
-
}
|
|
47
|
-
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
51
|
+
});
|
|
52
|
+
var BreadcrumbSeparator = React.forwardRef(function BreadcrumbSeparator({ children, className, ...props }, ref) {
|
|
48
53
|
return /* @__PURE__ */ jsx("li", {
|
|
54
|
+
ref,
|
|
49
55
|
"data-slot": "breadcrumb-separator",
|
|
50
56
|
role: "presentation",
|
|
51
57
|
"aria-hidden": "true",
|
|
@@ -53,9 +59,10 @@ function BreadcrumbSeparator({ children, className, ...props }) {
|
|
|
53
59
|
...props,
|
|
54
60
|
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
55
61
|
});
|
|
56
|
-
}
|
|
57
|
-
function BreadcrumbEllipsis({ className, ...props }) {
|
|
62
|
+
});
|
|
63
|
+
var BreadcrumbEllipsis = React.forwardRef(function BreadcrumbEllipsis({ className, ...props }, ref) {
|
|
58
64
|
return /* @__PURE__ */ jsxs("span", {
|
|
65
|
+
ref,
|
|
59
66
|
"data-slot": "breadcrumb-ellipsis",
|
|
60
67
|
role: "presentation",
|
|
61
68
|
"aria-hidden": "true",
|
|
@@ -66,7 +73,7 @@ function BreadcrumbEllipsis({ className, ...props }) {
|
|
|
66
73
|
children: "More"
|
|
67
74
|
})]
|
|
68
75
|
});
|
|
69
|
-
}
|
|
76
|
+
});
|
|
70
77
|
//#endregion
|
|
71
78
|
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
72
79
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","names":[],"sources":["../../src/components/breadcrumb.tsx"],"sourcesContent":["import ChevronRight from '@burtson-labs/icons/react/chevron-right';\nimport MoreHorizontal from '@burtson-labs/icons/react/more-horizontal';\nimport
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","names":["Slot.Root"],"sources":["../../src/components/breadcrumb.tsx"],"sourcesContent":["import ChevronRight from '@burtson-labs/icons/react/chevron-right';\nimport MoreHorizontal from '@burtson-labs/icons/react/more-horizontal';\nimport * as React from 'react';\n\nimport { cn, focusRingClasses } from '../lib/utils';\nimport * as Slot from '../primitives/vendor/radix/react-slot';\n\nconst Breadcrumb = React.forwardRef<HTMLElement, React.ComponentProps<'nav'>>(\n function Breadcrumb(props, ref) {\n return <nav ref={ref} aria-label=\"Breadcrumb\" data-slot=\"breadcrumb\" {...props} />;\n },\n);\n\nconst BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentProps<'ol'>>(\n function BreadcrumbList({ className, ...props }, ref) {\n return (\n <ol\n ref={ref}\n data-slot=\"breadcrumb-list\"\n className={cn(\n 'flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground',\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nconst BreadcrumbItem = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(\n function BreadcrumbItem({ className, ...props }, ref) {\n return (\n <li\n ref={ref}\n data-slot=\"breadcrumb-item\"\n className={cn('inline-flex items-center gap-1.5', className)}\n {...props}\n />\n );\n },\n);\n\nconst BreadcrumbLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<'a'> & { asChild?: boolean }\n>(function BreadcrumbLink({ asChild, className, ...props }, ref) {\n const Comp = asChild ? Slot.Root : 'a';\n return (\n <Comp\n ref={ref}\n data-slot=\"breadcrumb-link\"\n className={cn(\n 'rounded-xs transition-colors hover:text-foreground',\n focusRingClasses,\n className,\n )}\n {...props}\n />\n );\n});\n\nconst BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentProps<'span'>>(\n function BreadcrumbPage({ className, ...props }, ref) {\n return (\n <span\n ref={ref}\n data-slot=\"breadcrumb-page\"\n role=\"link\"\n aria-disabled=\"true\"\n aria-current=\"page\"\n className={cn('font-medium text-foreground', className)}\n {...props}\n />\n );\n },\n);\n\nconst BreadcrumbSeparator = React.forwardRef<HTMLLIElement, React.ComponentProps<'li'>>(\n function BreadcrumbSeparator({ children, className, ...props }, ref) {\n return (\n <li\n ref={ref}\n data-slot=\"breadcrumb-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('[&>svg]:size-3.5', className)}\n {...props}\n >\n {children ?? <ChevronRight />}\n </li>\n );\n },\n);\n\nconst BreadcrumbEllipsis = React.forwardRef<HTMLSpanElement, React.ComponentProps<'span'>>(\n function BreadcrumbEllipsis({ className, ...props }, ref) {\n return (\n <span\n ref={ref}\n data-slot=\"breadcrumb-ellipsis\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontal className=\"size-4\" />\n <span className=\"sr-only\">More</span>\n </span>\n );\n },\n);\n\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n};\n"],"mappings":";;;;;;;;AAOA,IAAM,aAAa,MAAM,WACvB,SAAS,WAAW,OAAO,KAAK;CAC9B,OAAO,oBAAC,OAAD;EAAU;EAAK,cAAW;EAAa,aAAU;EAAa,GAAI;CAAQ,CAAA;AACnF,CACF;AAEA,IAAM,iBAAiB,MAAM,WAC3B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAAC,MAAD;EACO;EACL,aAAU;EACV,WAAW,GACT,iFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL,CACF;AAEA,IAAM,iBAAiB,MAAM,WAC3B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAAC,MAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,oCAAoC,SAAS;EAC3D,GAAI;CACL,CAAA;AAEL,CACF;AAEA,IAAM,iBAAiB,MAAM,WAG3B,SAAS,eAAe,EAAE,SAAS,WAAW,GAAG,SAAS,KAAK;CAE/D,OACE,oBAFW,UAAUA,OAAY,KAEjC;EACO;EACL,aAAU;EACV,WAAW,GACT,sDACA,kBACA,SACF;EACA,GAAI;CACL,CAAA;AAEL,CAAC;AAED,IAAM,iBAAiB,MAAM,WAC3B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAAC,QAAD;EACO;EACL,aAAU;EACV,MAAK;EACL,iBAAc;EACd,gBAAa;EACb,WAAW,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL,CACF;AAEA,IAAM,sBAAsB,MAAM,WAChC,SAAS,oBAAoB,EAAE,UAAU,WAAW,GAAG,SAAS,KAAK;CACnE,OACE,oBAAC,MAAD;EACO;EACL,aAAU;EACV,MAAK;EACL,eAAY;EACZ,WAAW,GAAG,oBAAoB,SAAS;EAC3C,GAAI;EAEH,UAAA,YAAY,oBAAC,cAAD,CAAe,CAAA;CAC1B,CAAA;AAER,CACF;AAEA,IAAM,qBAAqB,MAAM,WAC/B,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAS,KAAK;CACxD,OACE,qBAAC,QAAD;EACO;EACL,aAAU;EACV,MAAK;EACL,eAAY;EACZ,WAAW,GAAG,2CAA2C,SAAS;EAClE,GAAI;EANN,UAAA,CAQE,oBAAC,gBAAD,EAAgB,WAAU,SAAU,CAAA,GACpC,oBAAC,QAAD;GAAM,WAAU;GAAU,UAAA;EAAU,CAAA,CAChC;;AAEV,CACF"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "secondary" | "destructive" | "brand" | "link" | "default" | "
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "secondary" | "destructive" | "brand" | "link" | "default" | "outline" | "soft" | "ghost" | null | undefined;
|
|
5
|
+
size?: "sm" | "lg" | "default" | "icon" | "xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The action primitive. On touch screens every button is at least 44px
|
|
13
|
+
* (`pointer-coarse:min-h-8` opts a button in a dense header out); link-styled
|
|
14
|
+
* buttons stay inline. `data-variant` and `data-size` are set for CSS that
|
|
15
|
+
* needs them. A trigger's `asChild` replaces `data-slot` with its own
|
|
16
|
+
* (`dialog-trigger`), which is why the sizing lives in the classes.
|
|
17
|
+
*/
|
|
11
18
|
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
19
|
export { Button, buttonVariants };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn, focusRingClasses } from "../lib/utils.js";
|
|
3
|
+
import { Root as Slot } from "../primitives/vendor/radix/react-slot/slot.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
7
|
//#region src/components/button.tsx
|
|
7
|
-
var buttonVariants = cva(
|
|
8
|
+
var buttonVariants = cva(`inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-semibold tracking-[-0.01em] transition-[background-color,border-color,color,box-shadow,transform,filter] select-none ${focusRingClasses} pointer-coarse:min-h-11 pointer-coarse:min-w-11 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`, {
|
|
8
9
|
variants: {
|
|
9
10
|
variant: {
|
|
10
11
|
default: "border border-primary bg-primary text-primary-foreground shadow-xs hover:brightness-90",
|
|
@@ -14,7 +15,7 @@ var buttonVariants = cva("inline-flex shrink-0 items-center justify-center gap-2
|
|
|
14
15
|
outline: "border border-border-strong bg-surface text-foreground shadow-xs hover:border-brand/35 hover:bg-accent/60 hover:text-accent-foreground",
|
|
15
16
|
ghost: "border border-transparent text-foreground hover:bg-muted",
|
|
16
17
|
destructive: "border border-destructive bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",
|
|
17
|
-
link: "h-auto rounded-none border-0 p-0 text-brand shadow-none hover:text-brand-hover hover:underline hover:underline-offset-4 active:translate-y-0"
|
|
18
|
+
link: "h-auto rounded-none border-0 p-0 text-brand shadow-none hover:text-brand-hover hover:underline hover:underline-offset-4 active:translate-y-0 pointer-coarse:min-h-0 pointer-coarse:min-w-0"
|
|
18
19
|
},
|
|
19
20
|
size: {
|
|
20
21
|
xs: "h-7 gap-1.5 rounded-sm px-2.5 text-xs [&_svg:not([class*=size-])]:size-3.5",
|
|
@@ -31,12 +32,20 @@ var buttonVariants = cva("inline-flex shrink-0 items-center justify-center gap-2
|
|
|
31
32
|
size: "default"
|
|
32
33
|
}
|
|
33
34
|
});
|
|
35
|
+
/**
|
|
36
|
+
* The action primitive. On touch screens every button is at least 44px
|
|
37
|
+
* (`pointer-coarse:min-h-8` opts a button in a dense header out); link-styled
|
|
38
|
+
* buttons stay inline. `data-variant` and `data-size` are set for CSS that
|
|
39
|
+
* needs them. A trigger's `asChild` replaces `data-slot` with its own
|
|
40
|
+
* (`dialog-trigger`), which is why the sizing lives in the classes.
|
|
41
|
+
*/
|
|
34
42
|
var Button = React.forwardRef(function Button({ className, variant, size, asChild = false, loading = false, disabled, children, type, onClickCapture, onKeyDownCapture, ...props }, ref) {
|
|
35
|
-
|
|
36
|
-
return /* @__PURE__ */ jsx(Comp, {
|
|
43
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
37
44
|
ref,
|
|
38
45
|
type: asChild ? void 0 : type ?? "button",
|
|
39
46
|
"data-slot": "button",
|
|
47
|
+
"data-variant": variant ?? "default",
|
|
48
|
+
"data-size": size ?? "default",
|
|
40
49
|
"data-loading": loading ? "" : void 0,
|
|
41
50
|
"aria-busy": loading || void 0,
|
|
42
51
|
disabled: !asChild ? disabled || loading : void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","names":["_Fragment"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport
|
|
1
|
+
{"version":3,"file":"button.js","names":["Slot.Root","_Fragment"],"sources":["../../src/components/button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn, focusRingClasses } from '../lib/utils';\nimport * as Slot from '../primitives/vendor/radix/react-slot';\n\nconst buttonVariants = cva(\n `inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-semibold tracking-[-0.01em] transition-[background-color,border-color,color,box-shadow,transform,filter] select-none ${focusRingClasses} pointer-coarse:min-h-11 pointer-coarse:min-w-11 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,\n {\n variants: {\n variant: {\n default:\n 'border border-primary bg-primary text-primary-foreground shadow-xs hover:brightness-90',\n brand:\n 'border border-primary bg-primary text-primary-foreground shadow-xs hover:brightness-90',\n soft: 'border border-brand/15 bg-brand-soft text-brand-soft-foreground hover:bg-brand/15',\n secondary:\n 'border border-border bg-secondary text-secondary-foreground shadow-xs hover:border-border-strong hover:bg-muted',\n outline:\n 'border border-border-strong bg-surface text-foreground shadow-xs hover:border-brand/35 hover:bg-accent/60 hover:text-accent-foreground',\n ghost: 'border border-transparent text-foreground hover:bg-muted',\n destructive:\n 'border border-destructive bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90',\n link: 'h-auto rounded-none border-0 p-0 text-brand shadow-none hover:text-brand-hover hover:underline hover:underline-offset-4 active:translate-y-0 pointer-coarse:min-h-0 pointer-coarse:min-w-0',\n },\n size: {\n xs: 'h-7 gap-1.5 rounded-sm px-2.5 text-xs [&_svg:not([class*=size-])]:size-3.5',\n sm: 'h-8 px-3 text-[13px]',\n default: 'h-9 px-3.5',\n lg: 'h-10 rounded-lg px-4 text-[15px]',\n icon: 'size-9 px-0',\n 'icon-sm': 'size-8 px-0',\n 'icon-lg': 'size-10 rounded-lg px-0',\n },\n },\n defaultVariants: { variant: 'default', size: 'default' },\n },\n);\n\nexport interface ButtonProps\n extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n loading?: boolean;\n}\n\n/**\n * The action primitive. On touch screens every button is at least 44px\n * (`pointer-coarse:min-h-8` opts a button in a dense header out); link-styled\n * buttons stay inline. `data-variant` and `data-size` are set for CSS that\n * needs them. A trigger's `asChild` replaces `data-slot` with its own\n * (`dialog-trigger`), which is why the sizing lives in the classes.\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n disabled,\n children,\n type,\n onClickCapture,\n onKeyDownCapture,\n ...props\n }: ButtonProps,\n ref,\n) {\n const Comp = asChild ? Slot.Root : 'button';\n\n return (\n <Comp\n ref={ref}\n type={asChild ? undefined : (type ?? 'button')}\n data-slot=\"button\"\n data-variant={variant ?? 'default'}\n data-size={size ?? 'default'}\n data-loading={loading ? '' : undefined}\n aria-busy={loading || undefined}\n disabled={!asChild ? disabled || loading : undefined}\n className={cn(buttonVariants({ variant, size }), className)}\n {...props}\n aria-disabled={asChild && (disabled || loading) ? true : props['aria-disabled']}\n tabIndex={asChild && (disabled || loading) ? -1 : props.tabIndex}\n onClickCapture={(event) => {\n if (disabled || loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onClickCapture?.(event);\n }}\n onKeyDownCapture={(event) => {\n if ((disabled || loading) && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n onKeyDownCapture?.(event);\n }}\n >\n {asChild ? (\n // Slot needs exactly one child to merge onto, so no spinner here.\n children\n ) : (\n <>\n {loading ? (\n <span\n aria-hidden=\"true\"\n className=\"size-3.5 animate-spin rounded-full border-2 border-current border-r-transparent opacity-70\"\n />\n ) : null}\n {children}\n </>\n )}\n </Comp>\n );\n});\n\nexport { Button, buttonVariants };\n"],"mappings":";;;;;;;AAMA,IAAM,iBAAiB,IACrB,yNAAyN,iBAAiB,4MAC1O;CACE,UAAU;EACR,SAAS;GACP,SACE;GACF,OACE;GACF,MAAM;GACN,WACE;GACF,SACE;GACF,OAAO;GACP,aACE;GACF,MAAM;EACR;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;GACJ,MAAM;GACN,WAAW;GACX,WAAW;EACb;CACF;CACA,iBAAiB;EAAE,SAAS;EAAW,MAAM;CAAU;AACzD,CACF;;;;;;;;AAeA,IAAM,SAAS,MAAM,WAA2C,SAAS,OACvE,EACE,WACA,SACA,MACA,UAAU,OACV,UAAU,OACV,UACA,UACA,MACA,gBACA,kBACA,GAAG,SAEL,KACA;CAGA,OACE,oBAHW,UAAUA,OAAY,UAGjC;EACO;EACL,MAAM,UAAU,KAAA,IAAa,QAAQ;EACrC,aAAU;EACV,gBAAc,WAAW;EACzB,aAAW,QAAQ;EACnB,gBAAc,UAAU,KAAK,KAAA;EAC7B,aAAW,WAAW,KAAA;EACtB,UAAU,CAAC,UAAU,YAAY,UAAU,KAAA;EAC3C,WAAW,GAAG,eAAe;GAAE;GAAS;EAAK,CAAC,GAAG,SAAS;EAC1D,GAAI;EACJ,iBAAe,YAAY,YAAY,WAAW,OAAO,MAAM;EAC/D,UAAU,YAAY,YAAY,WAAW,KAAK,MAAM;EACxD,iBAAiB,UAAU;GACzB,IAAI,YAAY,SAAS;IACvB,MAAM,eAAe;IACrB,MAAM,gBAAgB;IACtB;GACF;GACA,iBAAiB,KAAK;EACxB;EACA,mBAAmB,UAAU;GAC3B,KAAK,YAAY,aAAa,MAAM,QAAQ,WAAW,MAAM,QAAQ,MAAM;IACzE,MAAM,eAAe;IACrB,MAAM,gBAAgB;IACtB;GACF;GACA,mBAAmB,KAAK;EAC1B;EAEC,UAAA,UAEC,WAEA,qBAAAC,UAAA,EAAA,UAAA,CACG,UACC,oBAAC,QAAD;GACE,eAAY;GACZ,WAAU;EACX,CAAA,IACC,MACH,QACD,EAAA,CAAA;CAEA,CAAA;AAEV,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const cardVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "terminal" | "default" | "raised" | "subtle" | "interactive" | null | undefined;
|
|
5
5
|
density?: "default" | "compact" | "roomy" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface CardProps extends React.ComponentProps<'div'>, VariantProps<typeof cardVariants> {
|
|
8
8
|
}
|
|
9
|
-
declare
|
|
10
|
-
declare
|
|
11
|
-
declare
|
|
12
|
-
declare
|
|
13
|
-
declare
|
|
14
|
-
declare
|
|
15
|
-
declare
|
|
16
|
-
declare
|
|
9
|
+
declare const Card: React.ForwardRefExoticComponent<Omit<CardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const CardHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const CardEyebrow: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const CardTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const CardDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const CardAction: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const CardContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const CardFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export { Card, CardAction, CardContent, CardDescription, CardEyebrow, CardFooter, CardHeader, CardTitle, cardVariants, };
|
package/dist/components/card.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { cva } from "class-variance-authority";
|
|
5
6
|
//#region src/components/card.tsx
|
|
6
|
-
var cardVariants = cva("group/card relative flex flex-col overflow-hidden rounded-lg border text-card-foreground transition-[border-color,background-color,box-shadow,transform]
|
|
7
|
+
var cardVariants = cva("group/card relative flex flex-col overflow-hidden rounded-lg border text-card-foreground transition-[border-color,background-color,box-shadow,transform]", {
|
|
7
8
|
variants: {
|
|
8
9
|
variant: {
|
|
9
10
|
default: "border-border bg-card shadow-xs",
|
|
10
11
|
raised: "border-border bg-surface-raised shadow-md",
|
|
11
12
|
subtle: "border-border/70 bg-surface-muted shadow-none",
|
|
12
13
|
interactive: "border-border bg-card shadow-xs hover:-translate-y-0.5 hover:border-brand/30 hover:shadow-md",
|
|
13
|
-
terminal: "border-border-strong bg-code text-code-foreground shadow-md"
|
|
14
|
+
terminal: "border-border-strong bg-code text-code-foreground shadow-md [--foreground:var(--code-foreground)] [--muted-foreground:color-mix(in_srgb,var(--code-foreground)_72%,var(--code))] [--muted:color-mix(in_srgb,var(--code-foreground)_10%,var(--code))] [--border:color-mix(in_srgb,var(--code-foreground)_16%,var(--code))]"
|
|
14
15
|
},
|
|
15
16
|
density: {
|
|
16
|
-
compact: "[&_[data-slot=card-header]]:p-4 [&_[data-slot=card-content]]:px-4 [&_[data-slot=card-footer]]:p-4",
|
|
17
|
-
default: "[&_[data-slot=card-header]]:p-5 [&_[data-slot=card-content]]:px-5 [&_[data-slot=card-footer]]:p-5",
|
|
18
|
-
roomy: "[&_[data-slot=card-header]]:p-6 [&_[data-slot=card-content]]:px-6 [&_[data-slot=card-footer]]:p-6"
|
|
17
|
+
compact: "[&_[data-slot=card-header]]:p-4 [&_[data-slot=card-content]]:px-4 [&_[data-slot=card-content]]:pb-4 [&_[data-slot=card-footer]]:p-4",
|
|
18
|
+
default: "[&_[data-slot=card-header]]:p-5 [&_[data-slot=card-content]]:px-5 [&_[data-slot=card-content]]:pb-5 [&_[data-slot=card-footer]]:p-5",
|
|
19
|
+
roomy: "[&_[data-slot=card-header]]:p-6 [&_[data-slot=card-content]]:px-6 [&_[data-slot=card-content]]:pb-6 [&_[data-slot=card-footer]]:p-6"
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
defaultVariants: {
|
|
@@ -23,65 +24,74 @@ var cardVariants = cva("group/card relative flex flex-col overflow-hidden rounde
|
|
|
23
24
|
density: "default"
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
|
-
function Card({ className, variant, density, ...props }) {
|
|
27
|
+
var Card = React.forwardRef(function Card({ className, variant, density, ...props }, ref) {
|
|
27
28
|
return /* @__PURE__ */ jsx("div", {
|
|
29
|
+
ref,
|
|
28
30
|
"data-slot": "card",
|
|
31
|
+
"data-variant": variant ?? "default",
|
|
29
32
|
className: cn(cardVariants({
|
|
30
33
|
variant,
|
|
31
34
|
density
|
|
32
35
|
}), className),
|
|
33
36
|
...props
|
|
34
37
|
});
|
|
35
|
-
}
|
|
36
|
-
function CardHeader({ className, ...props }) {
|
|
38
|
+
});
|
|
39
|
+
var CardHeader = React.forwardRef(function CardHeader({ className, ...props }, ref) {
|
|
37
40
|
return /* @__PURE__ */ jsx("div", {
|
|
41
|
+
ref,
|
|
38
42
|
"data-slot": "card-header",
|
|
39
|
-
className: cn("grid grid-cols-[1fr_auto] items-start gap-x-4 gap-y-1
|
|
43
|
+
className: cn("grid grid-cols-[1fr_auto] items-start gap-x-4 gap-y-1", className),
|
|
40
44
|
...props
|
|
41
45
|
});
|
|
42
|
-
}
|
|
43
|
-
function CardEyebrow({ className, ...props }) {
|
|
46
|
+
});
|
|
47
|
+
var CardEyebrow = React.forwardRef(function CardEyebrow({ className, ...props }, ref) {
|
|
44
48
|
return /* @__PURE__ */ jsx("div", {
|
|
49
|
+
ref,
|
|
45
50
|
"data-slot": "card-eyebrow",
|
|
46
51
|
className: cn("col-span-full mb-0.5 text-[11px] font-semibold tracking-[0.12em] text-muted-foreground uppercase", className),
|
|
47
52
|
...props
|
|
48
53
|
});
|
|
49
|
-
}
|
|
50
|
-
function CardTitle({ className, ...props }) {
|
|
54
|
+
});
|
|
55
|
+
var CardTitle = React.forwardRef(function CardTitle({ className, ...props }, ref) {
|
|
51
56
|
return /* @__PURE__ */ jsx("div", {
|
|
57
|
+
ref,
|
|
52
58
|
"data-slot": "card-title",
|
|
53
59
|
className: cn("min-w-0 text-sm font-semibold tracking-[-0.015em]", className),
|
|
54
60
|
...props
|
|
55
61
|
});
|
|
56
|
-
}
|
|
57
|
-
function CardDescription({ className, ...props }) {
|
|
62
|
+
});
|
|
63
|
+
var CardDescription = React.forwardRef(function CardDescription({ className, ...props }, ref) {
|
|
58
64
|
return /* @__PURE__ */ jsx("div", {
|
|
65
|
+
ref,
|
|
59
66
|
"data-slot": "card-description",
|
|
60
67
|
className: cn("col-start-1 text-sm leading-5 text-muted-foreground", className),
|
|
61
68
|
...props
|
|
62
69
|
});
|
|
63
|
-
}
|
|
64
|
-
function CardAction({ className, ...props }) {
|
|
70
|
+
});
|
|
71
|
+
var CardAction = React.forwardRef(function CardAction({ className, ...props }, ref) {
|
|
65
72
|
return /* @__PURE__ */ jsx("div", {
|
|
73
|
+
ref,
|
|
66
74
|
"data-slot": "card-action",
|
|
67
75
|
className: cn("col-start-2 row-span-2 row-start-1 self-start", className),
|
|
68
76
|
...props
|
|
69
77
|
});
|
|
70
|
-
}
|
|
71
|
-
function CardContent({ className, ...props }) {
|
|
78
|
+
});
|
|
79
|
+
var CardContent = React.forwardRef(function CardContent({ className, ...props }, ref) {
|
|
72
80
|
return /* @__PURE__ */ jsx("div", {
|
|
81
|
+
ref,
|
|
73
82
|
"data-slot": "card-content",
|
|
74
83
|
className: cn("pb-5", className),
|
|
75
84
|
...props
|
|
76
85
|
});
|
|
77
|
-
}
|
|
78
|
-
function CardFooter({ className, ...props }) {
|
|
86
|
+
});
|
|
87
|
+
var CardFooter = React.forwardRef(function CardFooter({ className, ...props }, ref) {
|
|
79
88
|
return /* @__PURE__ */ jsx("div", {
|
|
89
|
+
ref,
|
|
80
90
|
"data-slot": "card-footer",
|
|
81
91
|
className: cn("mt-auto flex items-center gap-2 border-t pt-4", className),
|
|
82
92
|
...props
|
|
83
93
|
});
|
|
84
|
-
}
|
|
94
|
+
});
|
|
85
95
|
//#endregion
|
|
86
96
|
export { Card, CardAction, CardContent, CardDescription, CardEyebrow, CardFooter, CardHeader, CardTitle, cardVariants };
|
|
87
97
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nconst cardVariants = cva(\n 'group/card relative flex flex-col overflow-hidden rounded-lg border text-card-foreground transition-[border-color,background-color,box-shadow,transform]
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../src/components/card.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nconst cardVariants = cva(\n 'group/card relative flex flex-col overflow-hidden rounded-lg border text-card-foreground transition-[border-color,background-color,box-shadow,transform]',\n {\n variants: {\n variant: {\n default: 'border-border bg-card shadow-xs',\n raised: 'border-border bg-surface-raised shadow-md',\n subtle: 'border-border/70 bg-surface-muted shadow-none',\n interactive:\n 'border-border bg-card shadow-xs hover:-translate-y-0.5 hover:border-brand/30 hover:shadow-md',\n // A dark panel in either theme. It re-points the text and rule tokens\n // at the code palette, so muted text, ghost buttons and dividers inside\n // it stay legible instead of using the page's colours.\n terminal:\n 'border-border-strong bg-code text-code-foreground shadow-md [--foreground:var(--code-foreground)] [--muted-foreground:color-mix(in_srgb,var(--code-foreground)_72%,var(--code))] [--muted:color-mix(in_srgb,var(--code-foreground)_10%,var(--code))] [--border:color-mix(in_srgb,var(--code-foreground)_16%,var(--code))]',\n },\n density: {\n compact:\n '[&_[data-slot=card-header]]:p-4 [&_[data-slot=card-content]]:px-4 [&_[data-slot=card-content]]:pb-4 [&_[data-slot=card-footer]]:p-4',\n default:\n '[&_[data-slot=card-header]]:p-5 [&_[data-slot=card-content]]:px-5 [&_[data-slot=card-content]]:pb-5 [&_[data-slot=card-footer]]:p-5',\n roomy:\n '[&_[data-slot=card-header]]:p-6 [&_[data-slot=card-content]]:px-6 [&_[data-slot=card-content]]:pb-6 [&_[data-slot=card-footer]]:p-6',\n },\n },\n defaultVariants: { variant: 'default', density: 'default' },\n },\n);\n\nexport interface CardProps extends React.ComponentProps<'div'>, VariantProps<typeof cardVariants> {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(function Card(\n { className, variant, density, ...props },\n ref,\n) {\n return (\n <div\n ref={ref}\n data-slot=\"card\"\n data-variant={variant ?? 'default'}\n className={cn(cardVariants({ variant, density }), className)}\n {...props}\n />\n );\n});\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n function CardHeader({ className, ...props }, ref) {\n return (\n <div\n ref={ref}\n data-slot=\"card-header\"\n className={cn('grid grid-cols-[1fr_auto] items-start gap-x-4 gap-y-1', className)}\n {...props}\n />\n );\n },\n);\n\nconst CardEyebrow = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n function CardEyebrow({ className, ...props }, ref) {\n return (\n <div\n ref={ref}\n data-slot=\"card-eyebrow\"\n className={cn(\n 'col-span-full mb-0.5 text-[11px] font-semibold tracking-[0.12em] text-muted-foreground uppercase',\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(function CardTitle(\n { className, ...props },\n ref,\n) {\n return (\n <div\n ref={ref}\n data-slot=\"card-title\"\n className={cn('min-w-0 text-sm font-semibold tracking-[-0.015em]', className)}\n {...props}\n />\n );\n});\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n function CardDescription({ className, ...props }, ref) {\n return (\n <div\n ref={ref}\n data-slot=\"card-description\"\n className={cn('col-start-1 text-sm leading-5 text-muted-foreground', className)}\n {...props}\n />\n );\n },\n);\n\nconst CardAction = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n function CardAction({ className, ...props }, ref) {\n return (\n <div\n ref={ref}\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start', className)}\n {...props}\n />\n );\n },\n);\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n function CardContent({ className, ...props }, ref) {\n return <div ref={ref} data-slot=\"card-content\" className={cn('pb-5', className)} {...props} />;\n },\n);\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n function CardFooter({ className, ...props }, ref) {\n return (\n <div\n ref={ref}\n data-slot=\"card-footer\"\n className={cn('mt-auto flex items-center gap-2 border-t pt-4', className)}\n {...props}\n />\n );\n },\n);\n\nexport {\n Card,\n CardAction,\n CardContent,\n CardDescription,\n CardEyebrow,\n CardFooter,\n CardHeader,\n CardTitle,\n cardVariants,\n};\n"],"mappings":";;;;;;AAKA,IAAM,eAAe,IACnB,4JACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,QAAQ;GACR,QAAQ;GACR,aACE;GAIF,UACE;EACJ;EACA,SAAS;GACP,SACE;GACF,SACE;GACF,OACE;EACJ;CACF;CACA,iBAAiB;EAAE,SAAS;EAAW,SAAS;CAAU;AAC5D,CACF;AAIA,IAAM,OAAO,MAAM,WAAsC,SAAS,KAChE,EAAE,WAAW,SAAS,SAAS,GAAG,SAClC,KACA;CACA,OACE,oBAAC,OAAD;EACO;EACL,aAAU;EACV,gBAAc,WAAW;EACzB,WAAW,GAAG,aAAa;GAAE;GAAS;EAAQ,CAAC,GAAG,SAAS;EAC3D,GAAI;CACL,CAAA;AAEL,CAAC;AAED,IAAM,aAAa,MAAM,WACvB,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,oBAAC,OAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL,CACF;AAEA,IAAM,cAAc,MAAM,WACxB,SAAS,YAAY,EAAE,WAAW,GAAG,SAAS,KAAK;CACjD,OACE,oBAAC,OAAD;EACO;EACL,aAAU;EACV,WAAW,GACT,oGACA,SACF;EACA,GAAI;CACL,CAAA;AAEL,CACF;AAEA,IAAM,YAAY,MAAM,WAAwD,SAAS,UACvF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,qDAAqD,SAAS;EAC5E,GAAI;CACL,CAAA;AAEL,CAAC;AAED,IAAM,kBAAkB,MAAM,WAC5B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,oBAAC,OAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,uDAAuD,SAAS;EAC9E,GAAI;CACL,CAAA;AAEL,CACF;AAEA,IAAM,aAAa,MAAM,WACvB,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,oBAAC,OAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL,CACF;AAEA,IAAM,cAAc,MAAM,WACxB,SAAS,YAAY,EAAE,WAAW,GAAG,SAAS,KAAK;CACjD,OAAO,oBAAC,OAAD;EAAU;EAAK,aAAU;EAAe,WAAW,GAAG,QAAQ,SAAS;EAAG,GAAI;CAAQ,CAAA;AAC/F,CACF;AAEA,IAAM,aAAa,MAAM,WACvB,SAAS,WAAW,EAAE,WAAW,GAAG,SAAS,KAAK;CAChD,OACE,oBAAC,OAAD;EACO;EACL,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL,CACF"}
|
|
@@ -60,5 +60,5 @@ export interface ChatHistoryProps extends Omit<React.ComponentProps<'div'>, 'onS
|
|
|
60
60
|
* rows, Home and End jump, Enter opens; each row has a menu for rename, pin
|
|
61
61
|
* and delete. The app owns the data; this only reports what the person did.
|
|
62
62
|
*/
|
|
63
|
-
declare
|
|
63
|
+
declare const ChatHistory: React.ForwardRefExoticComponent<Omit<ChatHistoryProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
64
64
|
export { ChatHistory };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn, focusRingClasses, noOutlineClasses } from "../lib/utils.js";
|
|
2
3
|
import { Button } from "./button.js";
|
|
3
4
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
4
|
-
import "./input.js";
|
|
5
|
+
import { fieldFocusClasses } from "./input.js";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import AlertCircle from "@burtson-labs/icons/react/alert-circle";
|
|
@@ -61,7 +62,7 @@ function matchesConversation(item, query) {
|
|
|
61
62
|
* rows, Home and End jump, Enter opens; each row has a menu for rename, pin
|
|
62
63
|
* and delete. The app owns the data; this only reports what the person did.
|
|
63
64
|
*/
|
|
64
|
-
function ChatHistory({ items, activeId, onSelect, onNewChat, onRename, onDelete, onPinChange, query: controlledQuery, onQueryChange, searchable = true, loading = false, error, onRetry, empty, now, renderItems, label = "Chat history", className, ...props }) {
|
|
65
|
+
var ChatHistory = React.forwardRef(function ChatHistory({ items, activeId, onSelect, onNewChat, onRename, onDelete, onPinChange, query: controlledQuery, onQueryChange, searchable = true, loading = false, error, onRetry, empty, now, renderItems, label = "Chat history", className, ...props }, ref) {
|
|
65
66
|
const [ownQuery, setOwnQuery] = React.useState("");
|
|
66
67
|
const query = controlledQuery ?? ownQuery;
|
|
67
68
|
const setQuery = (q) => {
|
|
@@ -101,6 +102,7 @@ function ChatHistory({ items, activeId, onSelect, onNewChat, onRename, onDelete,
|
|
|
101
102
|
onKeyDown: onRowKeyDown
|
|
102
103
|
}, item.id);
|
|
103
104
|
return /* @__PURE__ */ jsxs("div", {
|
|
105
|
+
ref,
|
|
104
106
|
"data-slot": "chat-history",
|
|
105
107
|
"aria-label": label,
|
|
106
108
|
role: "navigation",
|
|
@@ -131,7 +133,7 @@ function ChatHistory({ items, activeId, onSelect, onNewChat, onRename, onDelete,
|
|
|
131
133
|
value: query,
|
|
132
134
|
onChange: (e) => setQuery(e.target.value),
|
|
133
135
|
placeholder: "Search chats",
|
|
134
|
-
className: cn("h-8 w-full rounded-md border border-input bg-surface pr-2 pl-8 text-base placeholder:text-muted-foreground sm:text-sm
|
|
136
|
+
className: cn("h-8 w-full rounded-md border border-input bg-surface pr-2 pl-8 text-base placeholder:text-muted-foreground sm:text-sm pointer-coarse:h-11", fieldFocusClasses)
|
|
135
137
|
})
|
|
136
138
|
]
|
|
137
139
|
})]
|
|
@@ -193,7 +195,7 @@ function ChatHistory({ items, activeId, onSelect, onNewChat, onRename, onDelete,
|
|
|
193
195
|
"aria-label": g.label,
|
|
194
196
|
className: "mt-2 first:mt-0",
|
|
195
197
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
196
|
-
className: "px-2 pt-2 pb-1 text-[11px] font-semibold tracking-
|
|
198
|
+
className: "px-2 pt-2 pb-1 text-[11px] font-semibold tracking-[0.06em] text-muted-foreground uppercase",
|
|
197
199
|
children: g.label
|
|
198
200
|
}), /* @__PURE__ */ jsx("ul", {
|
|
199
201
|
className: "grid grid-cols-[minmax(0,1fr)] gap-0.5",
|
|
@@ -202,7 +204,7 @@ function ChatHistory({ items, activeId, onSelect, onNewChat, onRename, onDelete,
|
|
|
202
204
|
}, g.key))
|
|
203
205
|
})]
|
|
204
206
|
});
|
|
205
|
-
}
|
|
207
|
+
});
|
|
206
208
|
function HistoryRow({ item, active, renaming, onSelect, onStartRename, onRename, onDelete, onPinChange, onKeyDown }) {
|
|
207
209
|
const hasMenu = Boolean(onStartRename || onDelete || onPinChange);
|
|
208
210
|
if (renaming) return /* @__PURE__ */ jsx(RenameRow, {
|
|
@@ -217,14 +219,14 @@ function HistoryRow({ item, active, renaming, onSelect, onStartRename, onRename,
|
|
|
217
219
|
"aria-current": active ? "page" : void 0,
|
|
218
220
|
onClick: onSelect,
|
|
219
221
|
onKeyDown,
|
|
220
|
-
className: cn("flex h-8 w-full items-center gap-2 rounded-md px-2 text-left text-sm
|
|
222
|
+
className: cn("flex h-8 w-full items-center gap-2 rounded-md px-2 text-left text-sm transition-colors hover:bg-muted pointer-coarse:h-11", focusRingClasses, "focus-visible:outline-offset-[-2px]", hasMenu && "pr-9", active && "bg-accent font-medium text-accent-foreground hover:bg-accent"),
|
|
221
223
|
children: /* @__PURE__ */ jsx("span", {
|
|
222
224
|
className: "min-w-0 flex-1 truncate",
|
|
223
225
|
children: item.title || "Untitled chat"
|
|
224
226
|
})
|
|
225
227
|
}), hasMenu && /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
226
228
|
"aria-label": `Actions for ${item.title || "chat"}`,
|
|
227
|
-
className: cn("absolute top-1/2 right-1 grid size-7 -translate-y-1/2 place-items-center rounded-sm text-muted-foreground opacity-0
|
|
229
|
+
className: cn("absolute top-1/2 right-1 grid size-7 -translate-y-1/2 place-items-center rounded-sm text-muted-foreground opacity-0 transition-opacity hover:bg-background hover:text-foreground focus-visible:opacity-100 group-hover/row:opacity-100 data-[state=open]:opacity-100 pointer-coarse:size-9 pointer-coarse:opacity-100 [&_svg]:size-4", "outline-none focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", "relative pointer-coarse:before:absolute pointer-coarse:before:top-1/2 pointer-coarse:before:left-1/2 pointer-coarse:before:size-11 pointer-coarse:before:-translate-1/2 pointer-coarse:before:content-['']", "absolute", active && "opacity-100"),
|
|
228
230
|
children: /* @__PURE__ */ jsx(MoreHorizontal, { "aria-hidden": true })
|
|
229
231
|
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
230
232
|
align: "end",
|
|
@@ -273,7 +275,7 @@ function RenameRow({ title, onDone }) {
|
|
|
273
275
|
onDone(title);
|
|
274
276
|
}
|
|
275
277
|
},
|
|
276
|
-
className: "h-8 w-full rounded-md border border-ring bg-surface px-2 text-base inset-ring-1 inset-ring-ring
|
|
278
|
+
className: cn("h-8 w-full rounded-md border border-ring bg-surface px-2 text-base inset-ring-1 inset-ring-ring sm:text-sm", noOutlineClasses)
|
|
277
279
|
})
|
|
278
280
|
});
|
|
279
281
|
}
|