@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
|
@@ -20,12 +20,12 @@ export interface SourceCitationProps extends Omit<React.ComponentProps<typeof Po
|
|
|
20
20
|
source: Source;
|
|
21
21
|
}
|
|
22
22
|
/** An inline [n] marker in an answer; opens the source it points to. */
|
|
23
|
-
declare
|
|
23
|
+
declare const SourceCitation: React.ForwardRefExoticComponent<Omit<SourceCitationProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
24
24
|
export interface SourceListProps extends React.ComponentProps<'section'> {
|
|
25
25
|
sources: Source[];
|
|
26
26
|
/** Heading; also the list's accessible name. */
|
|
27
27
|
label?: string;
|
|
28
28
|
}
|
|
29
29
|
/** Numbered sources under an answer, in citation order. */
|
|
30
|
-
declare
|
|
30
|
+
declare const SourceList: React.ForwardRefExoticComponent<Omit<SourceListProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
31
31
|
export { SourceCitation, SourceList };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn, focusRingClasses } from "../lib/utils.js";
|
|
2
3
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -44,7 +45,7 @@ function SourceBody({ source, index }) {
|
|
|
44
45
|
href,
|
|
45
46
|
target: "_blank",
|
|
46
47
|
rel: "noopener noreferrer",
|
|
47
|
-
className: "min-w-0 font-medium text-foreground underline-offset-2
|
|
48
|
+
className: cn("min-w-0 rounded-xs font-medium text-foreground underline-offset-2 hover:underline", focusRingClasses),
|
|
48
49
|
children: [/* @__PURE__ */ jsx("span", {
|
|
49
50
|
className: "line-clamp-2",
|
|
50
51
|
children: source.title
|
|
@@ -74,11 +75,12 @@ function SourceBody({ source, index }) {
|
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
77
|
/** An inline [n] marker in an answer; opens the source it points to. */
|
|
77
|
-
function SourceCitation({ index, source, className, ...props }) {
|
|
78
|
+
var SourceCitation = React.forwardRef(function SourceCitation({ index, source, className, ...props }, ref) {
|
|
78
79
|
return /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
80
|
+
ref,
|
|
79
81
|
"data-slot": "source-citation",
|
|
80
82
|
"aria-label": `Source ${index}: ${source.title}`,
|
|
81
|
-
className: cn("mx-0.5 inline-grid h-4 min-w-4 translate-y-[-0.1em] place-items-center rounded-xs border bg-surface-muted px-1 align-baseline font-mono text-[10px] leading-none font-semibold text-muted-foreground tabular-nums transition-colors
|
|
83
|
+
className: cn("mx-0.5 inline-grid h-4 min-w-4 translate-y-[-0.1em] place-items-center rounded-xs border bg-surface-muted px-1 align-baseline font-mono text-[10px] leading-none font-semibold text-muted-foreground tabular-nums transition-colors hover:border-brand/40 hover:text-foreground data-[state=open]:border-brand data-[state=open]:text-foreground", focusRingClasses, className),
|
|
82
84
|
...props,
|
|
83
85
|
children: index
|
|
84
86
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
@@ -87,12 +89,13 @@ function SourceCitation({ index, source, className, ...props }) {
|
|
|
87
89
|
className: "w-80 p-3 text-sm",
|
|
88
90
|
children: /* @__PURE__ */ jsx(SourceBody, { source })
|
|
89
91
|
})] });
|
|
90
|
-
}
|
|
92
|
+
});
|
|
91
93
|
/** Numbered sources under an answer, in citation order. */
|
|
92
|
-
function SourceList({ sources, label = "Sources", className, ...props }) {
|
|
94
|
+
var SourceList = React.forwardRef(function SourceList({ sources, label = "Sources", className, ...props }, ref) {
|
|
93
95
|
const headingId = React.useId();
|
|
94
96
|
if (sources.length === 0) return null;
|
|
95
97
|
return /* @__PURE__ */ jsxs("section", {
|
|
98
|
+
ref,
|
|
96
99
|
"data-slot": "source-list",
|
|
97
100
|
"aria-labelledby": headingId,
|
|
98
101
|
className: cn("grid gap-2", className),
|
|
@@ -112,7 +115,7 @@ function SourceList({ sources, label = "Sources", className, ...props }) {
|
|
|
112
115
|
}, source.id))
|
|
113
116
|
})]
|
|
114
117
|
});
|
|
115
|
-
}
|
|
118
|
+
});
|
|
116
119
|
//#endregion
|
|
117
120
|
export { SourceCitation, SourceList, safeSourceHref };
|
|
118
121
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","names":[],"sources":["../../src/components/source.tsx"],"sourcesContent":["import ExternalLink from '@burtson-labs/icons/react/external-link';\nimport FileText from '@burtson-labs/icons/react/file-text';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { Popover, PopoverContent, PopoverTrigger } from './popover';\n\n/** Where an answer came from. The app supplies provenance; this only shows it. */\nexport interface Source {\n id: string;\n title: string;\n /** Only http(s) links are rendered as links. */\n url?: string;\n /** The passage the answer relied on. */\n snippet?: string;\n /** Short location, e.g. \"page 4\" or \"Updated 2 days ago\". */\n meta?: string;\n icon?: React.ReactNode;\n}\n\n/** An http(s) URL, or undefined for anything else (javascript:, data:, relative). */\nexport function safeSourceHref(url: string | undefined): string | undefined {\n if (!url) return undefined;\n try {\n const parsed = new URL(url);\n return parsed.protocol === 'https:' || parsed.protocol === 'http:' ? parsed.href : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction hostOf(href: string | undefined): string | undefined {\n if (!href) return undefined;\n try {\n return new URL(href).hostname.replace(/^www\\./, '');\n } catch {\n return undefined;\n }\n}\n\nfunction SourceBody({ source, index }: { source: Source; index?: number }) {\n const href = safeSourceHref(source.url);\n const host = hostOf(href);\n const location = [host, source.meta].filter(Boolean).join(' · ');\n return (\n <div className=\"grid min-w-0 gap-1\">\n <div className=\"flex min-w-0 items-start gap-2\">\n {index !== undefined && (\n <span className=\"mt-px grid h-5 min-w-5 shrink-0 place-items-center rounded-sm border bg-surface-muted px-1 font-mono text-[11px] font-semibold text-muted-foreground tabular-nums\">\n {index}\n </span>\n )}\n <span className=\"mt-0.5 shrink-0 text-muted-foreground [&_svg]:size-4\">\n {source.icon ?? <FileText aria-hidden />}\n </span>\n {href ? (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className
|
|
1
|
+
{"version":3,"file":"source.js","names":[],"sources":["../../src/components/source.tsx"],"sourcesContent":["import ExternalLink from '@burtson-labs/icons/react/external-link';\nimport FileText from '@burtson-labs/icons/react/file-text';\nimport * as React from 'react';\n\nimport { cn, focusRingClasses } from '../lib/utils';\n\nimport { Popover, PopoverContent, PopoverTrigger } from './popover';\n\n/** Where an answer came from. The app supplies provenance; this only shows it. */\nexport interface Source {\n id: string;\n title: string;\n /** Only http(s) links are rendered as links. */\n url?: string;\n /** The passage the answer relied on. */\n snippet?: string;\n /** Short location, e.g. \"page 4\" or \"Updated 2 days ago\". */\n meta?: string;\n icon?: React.ReactNode;\n}\n\n/** An http(s) URL, or undefined for anything else (javascript:, data:, relative). */\nexport function safeSourceHref(url: string | undefined): string | undefined {\n if (!url) return undefined;\n try {\n const parsed = new URL(url);\n return parsed.protocol === 'https:' || parsed.protocol === 'http:' ? parsed.href : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction hostOf(href: string | undefined): string | undefined {\n if (!href) return undefined;\n try {\n return new URL(href).hostname.replace(/^www\\./, '');\n } catch {\n return undefined;\n }\n}\n\nfunction SourceBody({ source, index }: { source: Source; index?: number }) {\n const href = safeSourceHref(source.url);\n const host = hostOf(href);\n const location = [host, source.meta].filter(Boolean).join(' · ');\n return (\n <div className=\"grid min-w-0 gap-1\">\n <div className=\"flex min-w-0 items-start gap-2\">\n {index !== undefined && (\n <span className=\"mt-px grid h-5 min-w-5 shrink-0 place-items-center rounded-sm border bg-surface-muted px-1 font-mono text-[11px] font-semibold text-muted-foreground tabular-nums\">\n {index}\n </span>\n )}\n <span className=\"mt-0.5 shrink-0 text-muted-foreground [&_svg]:size-4\">\n {source.icon ?? <FileText aria-hidden />}\n </span>\n {href ? (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n 'min-w-0 rounded-xs font-medium text-foreground underline-offset-2 hover:underline',\n focusRingClasses,\n )}\n >\n <span className=\"line-clamp-2\">{source.title}</span>\n <span className=\"sr-only\"> (opens in a new tab)</span>\n </a>\n ) : (\n <span className=\"line-clamp-2 min-w-0 font-medium text-foreground\">{source.title}</span>\n )}\n {href && (\n <ExternalLink className=\"mt-1 size-3 shrink-0 text-muted-foreground\" aria-hidden />\n )}\n </div>\n {location && <p className=\"truncate text-xs text-muted-foreground\">{location}</p>}\n {source.snippet && (\n <blockquote className=\"line-clamp-3 border-l-2 pl-2 text-xs leading-5 text-muted-foreground\">\n {source.snippet}\n </blockquote>\n )}\n </div>\n );\n}\n\nexport interface SourceCitationProps extends Omit<\n React.ComponentProps<typeof PopoverTrigger>,\n 'children'\n> {\n /** 1-based number shown in the text; matches the SourceList entry. */\n index: number;\n source: Source;\n}\n\n/** An inline [n] marker in an answer; opens the source it points to. */\nconst SourceCitation = React.forwardRef<HTMLButtonElement, SourceCitationProps>(\n function SourceCitation({ index, source, className, ...props }, ref) {\n return (\n <Popover>\n <PopoverTrigger\n ref={ref}\n data-slot=\"source-citation\"\n aria-label={`Source ${index}: ${source.title}`}\n className={cn(\n 'mx-0.5 inline-grid h-4 min-w-4 translate-y-[-0.1em] place-items-center rounded-xs border bg-surface-muted px-1 align-baseline font-mono text-[10px] leading-none font-semibold text-muted-foreground tabular-nums transition-colors hover:border-brand/40 hover:text-foreground data-[state=open]:border-brand data-[state=open]:text-foreground',\n focusRingClasses,\n className,\n )}\n {...props}\n >\n {index}\n </PopoverTrigger>\n <PopoverContent side=\"top\" align=\"start\" className=\"w-80 p-3 text-sm\">\n <SourceBody source={source} />\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nexport interface SourceListProps extends React.ComponentProps<'section'> {\n sources: Source[];\n /** Heading; also the list's accessible name. */\n label?: string;\n}\n\n/** Numbered sources under an answer, in citation order. */\nconst SourceList = React.forwardRef<HTMLElement, SourceListProps>(function SourceList(\n { sources, label = 'Sources', className, ...props },\n ref,\n) {\n const headingId = React.useId();\n if (sources.length === 0) return null;\n return (\n <section\n ref={ref}\n data-slot=\"source-list\"\n aria-labelledby={headingId}\n className={cn('grid gap-2', className)}\n {...props}\n >\n <h3\n id={headingId}\n className=\"text-[11px] font-semibold tracking-[0.06em] text-muted-foreground uppercase\"\n >\n {label}\n </h3>\n <ol className=\"grid gap-1.5 sm:grid-cols-2\">\n {sources.map((source, i) => (\n <li\n key={source.id}\n className=\"min-w-0 rounded-md border bg-surface p-2.5 text-sm transition-colors hover:border-border-strong\"\n >\n <SourceBody source={source} index={i + 1} />\n </li>\n ))}\n </ol>\n </section>\n );\n});\n\nexport { SourceCitation, SourceList };\n"],"mappings":";;;;;;;;;AAsBA,SAAgB,eAAe,KAA6C;CAC1E,IAAI,CAAC,KAAK,OAAO,KAAA;CACjB,IAAI;EACF,MAAM,SAAS,IAAI,IAAI,GAAG;EAC1B,OAAO,OAAO,aAAa,YAAY,OAAO,aAAa,UAAU,OAAO,OAAO,KAAA;CACrF,QAAQ;EACN;CACF;AACF;AAEA,SAAS,OAAO,MAA8C;CAC5D,IAAI,CAAC,MAAM,OAAO,KAAA;CAClB,IAAI;EACF,OAAO,IAAI,IAAI,IAAI,CAAC,CAAC,SAAS,QAAQ,UAAU,EAAE;CACpD,QAAQ;EACN;CACF;AACF;AAEA,SAAS,WAAW,EAAE,QAAQ,SAA6C;CACzE,MAAM,OAAO,eAAe,OAAO,GAAG;CAEtC,MAAM,WAAW,CADJ,OAAO,IACF,GAAM,OAAO,IAAI,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,KAAK;CAC/D,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACG,UAAU,KAAA,KACT,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA;KACG,CAAA;KAER,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,OAAO,QAAQ,oBAAC,UAAD,EAAU,eAAA,KAAa,CAAA;KACnC,CAAA;KACL,OACC,qBAAC,KAAD;MACQ;MACN,QAAO;MACP,KAAI;MACJ,WAAW,GACT,qFACA,gBACF;MAPF,UAAA,CASE,oBAAC,QAAD;OAAM,WAAU;OAAgB,UAAA,OAAO;MAAY,CAAA,GACnD,oBAAC,QAAD;OAAM,WAAU;OAAU,UAAA;MAA2B,CAAA,CACpD;KAEH,CAAA,IAAA,oBAAC,QAAD;MAAM,WAAU;MAAoD,UAAA,OAAO;KAAY,CAAA;KAExF,QACC,oBAAC,cAAD;MAAc,WAAU;MAA6C,eAAA;KAAa,CAAA;IAEjF;;GACJ,YAAY,oBAAC,KAAD;IAAG,WAAU;IAA0C,UAAA;GAAY,CAAA;GAC/E,OAAO,WACN,oBAAC,cAAD;IAAY,WAAU;IACnB,UAAA,OAAO;GACE,CAAA;EAEX;;AAET;;AAYA,IAAM,iBAAiB,MAAM,WAC3B,SAAS,eAAe,EAAE,OAAO,QAAQ,WAAW,GAAG,SAAS,KAAK;CACnE,OACE,qBAAC,SAAD,EAAA,UAAA,CACE,oBAAC,gBAAD;EACO;EACL,aAAU;EACV,cAAY,UAAU,MAAM,IAAI,OAAO;EACvC,WAAW,GACT,oVACA,kBACA,SACF;EACA,GAAI;EAEH,UAAA;CACa,CAAA,GAChB,oBAAC,gBAAD;EAAgB,MAAK;EAAM,OAAM;EAAQ,WAAU;EACjD,UAAA,oBAAC,YAAD,EAAoB,OAAS,CAAA;CACf,CAAA,CACT,EAAA,CAAA;AAEb,CACF;;AASA,IAAM,aAAa,MAAM,WAAyC,SAAS,WACzE,EAAE,SAAS,QAAQ,WAAW,WAAW,GAAG,SAC5C,KACA;CACA,MAAM,YAAY,MAAM,MAAM;CAC9B,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,OACE,qBAAC,WAAD;EACO;EACL,aAAU;EACV,mBAAiB;EACjB,WAAW,GAAG,cAAc,SAAS;EACrC,GAAI;EALN,UAAA,CAOE,oBAAC,MAAD;GACE,IAAI;GACJ,WAAU;GAET,UAAA;EACC,CAAA,GACJ,oBAAC,MAAD;GAAI,WAAU;GACX,UAAA,QAAQ,KAAK,QAAQ,MACpB,oBAAC,MAAD;IAEE,WAAU;IAEV,UAAA,oBAAC,YAAD;KAAoB;KAAQ,OAAO,IAAI;IAAI,CAAA;GACzC,GAJG,OAAO,EAIV,CACL;EACC,CAAA,CACG;;AAEb,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import Loader from '@burtson-labs/icons/react/loader';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
|
|
3
|
+
export interface SpinnerProps extends React.ComponentProps<typeof Loader> {
|
|
4
|
+
/** What is loading, for screen readers. */
|
|
4
5
|
label?: string;
|
|
5
|
-
}
|
|
6
|
+
}
|
|
7
|
+
declare const Spinner: React.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
6
8
|
export { Spinner };
|
|
@@ -1,17 +1,19 @@
|
|
|
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 Loader from "@burtson-labs/icons/react/loader";
|
|
5
6
|
//#region src/components/spinner.tsx
|
|
6
|
-
function Spinner({ className, label = "Loading", ...props }) {
|
|
7
|
+
var Spinner = React.forwardRef(function Spinner({ className, label = "Loading", ...props }, ref) {
|
|
7
8
|
return /* @__PURE__ */ jsx(Loader, {
|
|
9
|
+
ref,
|
|
8
10
|
role: "status",
|
|
9
11
|
"aria-label": label,
|
|
10
12
|
"data-slot": "spinner",
|
|
11
13
|
className: cn("size-4 animate-spin", className),
|
|
12
14
|
...props
|
|
13
15
|
});
|
|
14
|
-
}
|
|
16
|
+
});
|
|
15
17
|
//#endregion
|
|
16
18
|
export { Spinner };
|
|
17
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.js","names":[],"sources":["../../src/components/spinner.tsx"],"sourcesContent":["import Loader from '@burtson-labs/icons/react/loader';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\
|
|
1
|
+
{"version":3,"file":"spinner.js","names":[],"sources":["../../src/components/spinner.tsx"],"sourcesContent":["import Loader from '@burtson-labs/icons/react/loader';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface SpinnerProps extends React.ComponentProps<typeof Loader> {\n /** What is loading, for screen readers. */\n label?: string;\n}\n\nconst Spinner = React.forwardRef<SVGSVGElement, SpinnerProps>(function Spinner(\n { className, label = 'Loading', ...props },\n ref,\n) {\n return (\n <Loader\n ref={ref}\n role=\"status\"\n aria-label={label}\n data-slot=\"spinner\"\n className={cn('size-4 animate-spin', className)}\n {...props}\n />\n );\n});\n\nexport { Spinner };\n"],"mappings":";;;;;;AAUA,IAAM,UAAU,MAAM,WAAwC,SAAS,QACrE,EAAE,WAAW,QAAQ,WAAW,GAAG,SACnC,KACA;CACA,OACE,oBAAC,QAAD;EACO;EACL,MAAK;EACL,cAAY;EACZ,aAAU;EACV,WAAW,GAAG,uBAAuB,SAAS;EAC9C,GAAI;CACL,CAAA;AAEL,CAAC"}
|
|
@@ -7,5 +7,30 @@ export interface StatCardProps extends React.ComponentProps<typeof Card> {
|
|
|
7
7
|
detail?: React.ReactNode;
|
|
8
8
|
trend?: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
/** One metric with context. A row of them on a phone is better as a StatStrip. */
|
|
11
|
+
declare const StatCard: React.ForwardRefExoticComponent<Omit<StatCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export interface StatStripItem {
|
|
13
|
+
label: React.ReactNode;
|
|
14
|
+
value: React.ReactNode;
|
|
15
|
+
detail?: React.ReactNode;
|
|
16
|
+
/** Makes the figure a link to this page. */
|
|
17
|
+
href?: string;
|
|
18
|
+
/** Makes the figure a button. */
|
|
19
|
+
onSelect?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface StatStripProps extends Omit<React.ComponentProps<typeof Card>, 'children'> {
|
|
22
|
+
/** Two to four figures. */
|
|
23
|
+
stats: StatStripItem[];
|
|
24
|
+
/**
|
|
25
|
+
* Renders each linked figure through your router's link: it receives
|
|
26
|
+
* `href` and the figure's content as children.
|
|
27
|
+
*/
|
|
28
|
+
renderLink?: (href: string, children: React.ReactNode, className: string) => React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Up to four headline figures in one card, side by side: the phone form of a
|
|
32
|
+
* row of StatCards, which would otherwise stack into a screen of boxes. A
|
|
33
|
+
* figure with `href` or `onSelect` is a target.
|
|
34
|
+
*/
|
|
35
|
+
declare const StatStrip: React.ForwardRefExoticComponent<Omit<StatStripProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export { StatCard, StatStrip };
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn, focusRingClasses } from "../lib/utils.js";
|
|
2
3
|
import { Card } from "./card.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/stat-card.tsx
|
|
6
|
-
|
|
7
|
+
/** One metric with context. A row of them on a phone is better as a StatStrip. */
|
|
8
|
+
var StatCard = React.forwardRef(function StatCard({ label, value, icon, detail, trend, className, ...props }, ref) {
|
|
7
9
|
return /* @__PURE__ */ jsxs(Card, {
|
|
10
|
+
ref,
|
|
8
11
|
density: "compact",
|
|
12
|
+
"data-slot": "stat-card",
|
|
9
13
|
className: cn("min-w-0", className),
|
|
10
14
|
...props,
|
|
11
15
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -14,29 +18,86 @@ function StatCard({ label, value, icon, detail, trend, className, ...props }) {
|
|
|
14
18
|
className: "min-w-0",
|
|
15
19
|
children: [
|
|
16
20
|
/* @__PURE__ */ jsx("div", {
|
|
17
|
-
|
|
21
|
+
"data-slot": "stat-card-label",
|
|
22
|
+
className: "text-[11px] font-semibold tracking-[0.06em] text-muted-foreground uppercase",
|
|
18
23
|
children: label
|
|
19
24
|
}),
|
|
20
25
|
/* @__PURE__ */ jsx("div", {
|
|
21
|
-
|
|
26
|
+
"data-slot": "stat-card-value",
|
|
27
|
+
className: "mt-1 truncate text-2xl font-semibold tracking-[-0.035em] text-foreground tabular-nums",
|
|
22
28
|
children: value
|
|
23
29
|
}),
|
|
24
30
|
detail ? /* @__PURE__ */ jsx("div", {
|
|
31
|
+
"data-slot": "stat-card-detail",
|
|
25
32
|
className: "mt-1 text-xs text-muted-foreground",
|
|
26
33
|
children: detail
|
|
27
34
|
}) : null
|
|
28
35
|
]
|
|
29
36
|
}), icon ? /* @__PURE__ */ jsx("div", {
|
|
30
|
-
className: "grid size-9 shrink-0 place-items-center rounded-lg border border-brand/15 bg-brand-soft text-brand [&_svg]:size-4
|
|
37
|
+
className: "grid size-9 shrink-0 place-items-center rounded-lg border border-brand/15 bg-brand-soft text-brand [&_svg]:size-4",
|
|
31
38
|
children: icon
|
|
32
39
|
}) : null]
|
|
33
40
|
}), trend ? /* @__PURE__ */ jsx("div", {
|
|
41
|
+
"data-slot": "stat-card-trend",
|
|
34
42
|
className: "border-t border-border px-4 py-2.5 text-xs",
|
|
35
43
|
children: trend
|
|
36
44
|
}) : null]
|
|
37
45
|
});
|
|
38
|
-
}
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Up to four headline figures in one card, side by side: the phone form of a
|
|
49
|
+
* row of StatCards, which would otherwise stack into a screen of boxes. A
|
|
50
|
+
* figure with `href` or `onSelect` is a target.
|
|
51
|
+
*/
|
|
52
|
+
var StatStrip = React.forwardRef(function StatStrip({ stats, renderLink, className, ...props }, ref) {
|
|
53
|
+
const cell = cn("grid min-w-0 content-start px-3 py-3 text-left first:rounded-l-[inherit] last:rounded-r-[inherit]", focusRingClasses, "focus-visible:outline-offset-[-2px]");
|
|
54
|
+
const interactive = cn(cell, "transition-colors hover:bg-muted/60 active:bg-muted");
|
|
55
|
+
return /* @__PURE__ */ jsx(Card, {
|
|
56
|
+
ref,
|
|
57
|
+
"data-slot": "stat-strip",
|
|
58
|
+
className: cn("gap-0 py-0", className),
|
|
59
|
+
...props,
|
|
60
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
61
|
+
className: "grid divide-x divide-border",
|
|
62
|
+
style: { gridTemplateColumns: `repeat(${Math.max(1, stats.length)}, minmax(0, 1fr))` },
|
|
63
|
+
children: stats.map((s, i) => {
|
|
64
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
65
|
+
/* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "text-[10.5px] leading-4 font-semibold tracking-[0.06em] text-muted-foreground uppercase",
|
|
67
|
+
children: s.label
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ jsx("span", {
|
|
70
|
+
className: "mt-1 text-xl font-semibold tracking-[-0.03em] tabular-nums",
|
|
71
|
+
children: s.value
|
|
72
|
+
}),
|
|
73
|
+
s.detail && /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "mt-0.5 text-[11.5px] leading-4 text-muted-foreground",
|
|
75
|
+
children: s.detail
|
|
76
|
+
})
|
|
77
|
+
] });
|
|
78
|
+
if (s.href) return /* @__PURE__ */ jsx(React.Fragment, { children: renderLink ? renderLink(s.href, body, interactive) : /* @__PURE__ */ jsx("a", {
|
|
79
|
+
href: s.href,
|
|
80
|
+
"data-slot": "stat-strip-item",
|
|
81
|
+
className: interactive,
|
|
82
|
+
children: body
|
|
83
|
+
}) }, i);
|
|
84
|
+
if (s.onSelect) return /* @__PURE__ */ jsx("button", {
|
|
85
|
+
type: "button",
|
|
86
|
+
"data-slot": "stat-strip-item",
|
|
87
|
+
onClick: s.onSelect,
|
|
88
|
+
className: interactive,
|
|
89
|
+
children: body
|
|
90
|
+
}, i);
|
|
91
|
+
return /* @__PURE__ */ jsx("div", {
|
|
92
|
+
"data-slot": "stat-strip-item",
|
|
93
|
+
className: cell,
|
|
94
|
+
children: body
|
|
95
|
+
}, i);
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
});
|
|
39
100
|
//#endregion
|
|
40
|
-
export { StatCard };
|
|
101
|
+
export { StatCard, StatStrip };
|
|
41
102
|
|
|
42
103
|
//# sourceMappingURL=stat-card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stat-card.js","names":[],"sources":["../../src/components/stat-card.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nimport { Card } from './card';\n\nexport interface StatCardProps extends React.ComponentProps<typeof Card> {\n label: React.ReactNode;\n value: React.ReactNode;\n icon?: React.ReactNode;\n detail?: React.ReactNode;\n trend?: React.ReactNode;\n}\n\
|
|
1
|
+
{"version":3,"file":"stat-card.js","names":["_Fragment"],"sources":["../../src/components/stat-card.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn, focusRingClasses } from '../lib/utils';\n\nimport { Card } from './card';\n\nexport interface StatCardProps extends React.ComponentProps<typeof Card> {\n label: React.ReactNode;\n value: React.ReactNode;\n icon?: React.ReactNode;\n detail?: React.ReactNode;\n trend?: React.ReactNode;\n}\n\n/** One metric with context. A row of them on a phone is better as a StatStrip. */\nconst StatCard = React.forwardRef<HTMLDivElement, StatCardProps>(function StatCard(\n { label, value, icon, detail, trend, className, ...props },\n ref,\n) {\n return (\n <Card\n ref={ref}\n density=\"compact\"\n data-slot=\"stat-card\"\n className={cn('min-w-0', className)}\n {...props}\n >\n <div className=\"flex items-start justify-between gap-4 p-4\">\n <div className=\"min-w-0\">\n <div\n data-slot=\"stat-card-label\"\n className=\"text-[11px] font-semibold tracking-[0.06em] text-muted-foreground uppercase\"\n >\n {label}\n </div>\n <div\n data-slot=\"stat-card-value\"\n className=\"mt-1 truncate text-2xl font-semibold tracking-[-0.035em] text-foreground tabular-nums\"\n >\n {value}\n </div>\n {detail ? (\n <div data-slot=\"stat-card-detail\" className=\"mt-1 text-xs text-muted-foreground\">\n {detail}\n </div>\n ) : null}\n </div>\n {icon ? (\n <div className=\"grid size-9 shrink-0 place-items-center rounded-lg border border-brand/15 bg-brand-soft text-brand [&_svg]:size-4\">\n {icon}\n </div>\n ) : null}\n </div>\n {trend ? (\n <div data-slot=\"stat-card-trend\" className=\"border-t border-border px-4 py-2.5 text-xs\">\n {trend}\n </div>\n ) : null}\n </Card>\n );\n});\n\nexport interface StatStripItem {\n label: React.ReactNode;\n value: React.ReactNode;\n detail?: React.ReactNode;\n /** Makes the figure a link to this page. */\n href?: string;\n /** Makes the figure a button. */\n onSelect?: () => void;\n}\n\nexport interface StatStripProps extends Omit<React.ComponentProps<typeof Card>, 'children'> {\n /** Two to four figures. */\n stats: StatStripItem[];\n /**\n * Renders each linked figure through your router's link: it receives\n * `href` and the figure's content as children.\n */\n renderLink?: (href: string, children: React.ReactNode, className: string) => React.ReactNode;\n}\n\n/**\n * Up to four headline figures in one card, side by side: the phone form of a\n * row of StatCards, which would otherwise stack into a screen of boxes. A\n * figure with `href` or `onSelect` is a target.\n */\nconst StatStrip = React.forwardRef<HTMLDivElement, StatStripProps>(function StatStrip(\n { stats, renderLink, className, ...props },\n ref,\n) {\n const cell = cn(\n 'grid min-w-0 content-start px-3 py-3 text-left first:rounded-l-[inherit] last:rounded-r-[inherit]',\n focusRingClasses,\n 'focus-visible:outline-offset-[-2px]',\n );\n const interactive = cn(cell, 'transition-colors hover:bg-muted/60 active:bg-muted');\n return (\n <Card ref={ref} data-slot=\"stat-strip\" className={cn('gap-0 py-0', className)} {...props}>\n <div\n className=\"grid divide-x divide-border\"\n style={{ gridTemplateColumns: `repeat(${Math.max(1, stats.length)}, minmax(0, 1fr))` }}\n >\n {stats.map((s, i) => {\n const body = (\n <>\n <span className=\"text-[10.5px] leading-4 font-semibold tracking-[0.06em] text-muted-foreground uppercase\">\n {s.label}\n </span>\n <span className=\"mt-1 text-xl font-semibold tracking-[-0.03em] tabular-nums\">\n {s.value}\n </span>\n {s.detail && (\n <span className=\"mt-0.5 text-[11.5px] leading-4 text-muted-foreground\">\n {s.detail}\n </span>\n )}\n </>\n );\n if (s.href)\n return (\n <React.Fragment key={i}>\n {renderLink ? (\n renderLink(s.href, body, interactive)\n ) : (\n <a href={s.href} data-slot=\"stat-strip-item\" className={interactive}>\n {body}\n </a>\n )}\n </React.Fragment>\n );\n if (s.onSelect)\n return (\n <button\n key={i}\n type=\"button\"\n data-slot=\"stat-strip-item\"\n onClick={s.onSelect}\n className={interactive}\n >\n {body}\n </button>\n );\n return (\n <div key={i} data-slot=\"stat-strip-item\" className={cell}>\n {body}\n </div>\n );\n })}\n </div>\n </Card>\n );\n});\n\nexport { StatCard, StatStrip };\n"],"mappings":";;;;;;;AAeA,IAAM,WAAW,MAAM,WAA0C,SAAS,SACxE,EAAE,OAAO,OAAO,MAAM,QAAQ,OAAO,WAAW,GAAG,SACnD,KACA;CACA,OACE,qBAAC,MAAD;EACO;EACL,SAAQ;EACR,aAAU;EACV,WAAW,GAAG,WAAW,SAAS;EAClC,GAAI;EALN,UAAA,CAOE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,oBAAC,OAAD;MACE,aAAU;MACV,WAAU;MAET,UAAA;KACE,CAAA;KACL,oBAAC,OAAD;MACE,aAAU;MACV,WAAU;MAET,UAAA;KACE,CAAA;KACJ,SACC,oBAAC,OAAD;MAAK,aAAU;MAAmB,WAAU;MACzC,UAAA;KACE,CAAA,IACH;IACD;GACJ,CAAA,GAAA,OACC,oBAAC,OAAD;IAAK,WAAU;IACZ,UAAA;GACE,CAAA,IACH,IACD;EACJ,CAAA,GAAA,QACC,oBAAC,OAAD;GAAK,aAAU;GAAkB,WAAU;GACxC,UAAA;EACE,CAAA,IACH,IACA;;AAEV,CAAC;;;;;;AA2BD,IAAM,YAAY,MAAM,WAA2C,SAAS,UAC1E,EAAE,OAAO,YAAY,WAAW,GAAG,SACnC,KACA;CACA,MAAM,OAAO,GACX,qGACA,kBACA,qCACF;CACA,MAAM,cAAc,GAAG,MAAM,qDAAqD;CAClF,OACE,oBAAC,MAAD;EAAW;EAAK,aAAU;EAAa,WAAW,GAAG,cAAc,SAAS;EAAG,GAAI;EACjF,UAAA,oBAAC,OAAD;GACE,WAAU;GACV,OAAO,EAAE,qBAAqB,UAAU,KAAK,IAAI,GAAG,MAAM,MAAM,EAAE,mBAAmB;GAEpF,UAAA,MAAM,KAAK,GAAG,MAAM;IACnB,MAAM,OACJ,qBAAAA,UAAA,EAAA,UAAA;KACE,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,EAAE;KACC,CAAA;KACN,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,EAAE;KACC,CAAA;KACL,EAAE,UACD,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,EAAE;KACC,CAAA;IAER,EAAA,CAAA;IAEJ,IAAI,EAAE,MACJ,OACE,oBAAC,MAAM,UAAP,EAAA,UACG,aACC,WAAW,EAAE,MAAM,MAAM,WAAW,IAEpC,oBAAC,KAAD;KAAG,MAAM,EAAE;KAAM,aAAU;KAAkB,WAAW;KACrD,UAAA;IACA,CAAA,EAES,GARK,CAQL;IAEpB,IAAI,EAAE,UACJ,OACE,oBAAC,UAAD;KAEE,MAAK;KACL,aAAU;KACV,SAAS,EAAE;KACX,WAAW;KAEV,UAAA;IACK,GAPD,CAOC;IAEZ,OACE,oBAAC,OAAD;KAAa,aAAU;KAAkB,WAAW;KACjD,UAAA;IACE,GAFK,CAEL;GAET,CAAC;EACE,CAAA;CACD,CAAA;AAEV,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const statusDotVariants: (props?: ({
|
|
4
|
-
status?: "success" | "warning" | "info" | "brand" | "neutral" | "danger" | null | undefined;
|
|
4
|
+
status?: "destructive" | "success" | "warning" | "info" | "brand" | "neutral" | "danger" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
|
|
6
|
+
export type StatusTone = NonNullable<VariantProps<typeof statusDotVariants>['status']>;
|
|
7
|
+
export interface StatusDotProps extends React.ComponentProps<'span'>, VariantProps<typeof statusDotVariants> {
|
|
8
|
+
/** A ripple for a live state (running, connecting). Still under reduced motion. */
|
|
7
9
|
pulse?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare
|
|
10
|
-
|
|
11
|
-
}): React.JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
declare const StatusDot: React.ForwardRefExoticComponent<Omit<StatusDotProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
declare const Status: React.ForwardRefExoticComponent<Omit<StatusDotProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
13
|
export { Status, StatusDot, statusDotVariants };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { cva } from "class-variance-authority";
|
|
5
6
|
//#region src/components/status.tsx
|
|
@@ -9,23 +10,29 @@ var statusDotVariants = cva("size-2 shrink-0 rounded-full ring-2 ring-current/10
|
|
|
9
10
|
brand: "bg-brand text-brand",
|
|
10
11
|
success: "bg-success text-success",
|
|
11
12
|
warning: "bg-warning text-warning",
|
|
13
|
+
destructive: "bg-destructive text-destructive",
|
|
14
|
+
/** 0.x name for `destructive`; kept so existing apps keep compiling. */
|
|
12
15
|
danger: "bg-destructive text-destructive",
|
|
13
16
|
info: "bg-info text-info"
|
|
14
17
|
} },
|
|
15
18
|
defaultVariants: { status: "neutral" }
|
|
16
19
|
});
|
|
17
|
-
function StatusDot({ className, status, pulse = false, ...props }) {
|
|
20
|
+
var StatusDot = React.forwardRef(function StatusDot({ className, status, pulse = false, ...props }, ref) {
|
|
18
21
|
return /* @__PURE__ */ jsxs("span", {
|
|
22
|
+
ref,
|
|
19
23
|
"data-slot": "status-dot",
|
|
24
|
+
"data-status": status ?? "neutral",
|
|
20
25
|
className: cn("relative inline-flex", className),
|
|
21
26
|
"aria-hidden": "true",
|
|
22
27
|
...props,
|
|
23
28
|
children: [pulse ? /* @__PURE__ */ jsx("span", { className: cn(statusDotVariants({ status }), "absolute inset-0 animate-ping opacity-40 motion-reduce:hidden") }) : null, /* @__PURE__ */ jsx("span", { className: statusDotVariants({ status }) })]
|
|
24
29
|
});
|
|
25
|
-
}
|
|
26
|
-
function Status({ className, status, pulse, children, ...props }) {
|
|
30
|
+
});
|
|
31
|
+
var Status = React.forwardRef(function Status({ className, status, pulse, children, ...props }, ref) {
|
|
27
32
|
return /* @__PURE__ */ jsxs("span", {
|
|
33
|
+
ref,
|
|
28
34
|
"data-slot": "status",
|
|
35
|
+
"data-status": status ?? "neutral",
|
|
29
36
|
className: cn("inline-flex items-center gap-2 text-xs font-medium text-muted-foreground", className),
|
|
30
37
|
...props,
|
|
31
38
|
children: [/* @__PURE__ */ jsx(StatusDot, {
|
|
@@ -33,7 +40,7 @@ function Status({ className, status, pulse, children, ...props }) {
|
|
|
33
40
|
pulse
|
|
34
41
|
}), children]
|
|
35
42
|
});
|
|
36
|
-
}
|
|
43
|
+
});
|
|
37
44
|
//#endregion
|
|
38
45
|
export { Status, StatusDot, statusDotVariants };
|
|
39
46
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","names":[],"sources":["../../src/components/status.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nconst statusDotVariants = cva('size-2 shrink-0 rounded-full ring-2 ring-current/10', {\n variants: {\n status: {\n neutral: 'bg-muted-foreground text-muted-foreground',\n brand: 'bg-brand text-brand',\n success: 'bg-success text-success',\n warning: 'bg-warning text-warning',\n danger: 'bg-destructive text-destructive',\n info: 'bg-info text-info',\n },\n },\n defaultVariants: { status: 'neutral' },\n});\n\
|
|
1
|
+
{"version":3,"file":"status.js","names":[],"sources":["../../src/components/status.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nconst statusDotVariants = cva('size-2 shrink-0 rounded-full ring-2 ring-current/10', {\n variants: {\n status: {\n neutral: 'bg-muted-foreground text-muted-foreground',\n brand: 'bg-brand text-brand',\n success: 'bg-success text-success',\n warning: 'bg-warning text-warning',\n destructive: 'bg-destructive text-destructive',\n /** 0.x name for `destructive`; kept so existing apps keep compiling. */\n danger: 'bg-destructive text-destructive',\n info: 'bg-info text-info',\n },\n },\n defaultVariants: { status: 'neutral' },\n});\n\nexport type StatusTone = NonNullable<VariantProps<typeof statusDotVariants>['status']>;\n\nexport interface StatusDotProps\n extends React.ComponentProps<'span'>, VariantProps<typeof statusDotVariants> {\n /** A ripple for a live state (running, connecting). Still under reduced motion. */\n pulse?: boolean;\n}\n\nconst StatusDot = React.forwardRef<HTMLSpanElement, StatusDotProps>(function StatusDot(\n { className, status, pulse = false, ...props },\n ref,\n) {\n return (\n <span\n ref={ref}\n data-slot=\"status-dot\"\n data-status={status ?? 'neutral'}\n className={cn('relative inline-flex', className)}\n aria-hidden=\"true\"\n {...props}\n >\n {pulse ? (\n <span\n className={cn(\n statusDotVariants({ status }),\n 'absolute inset-0 animate-ping opacity-40 motion-reduce:hidden',\n )}\n />\n ) : null}\n <span className={statusDotVariants({ status })} />\n </span>\n );\n});\n\nconst Status = React.forwardRef<HTMLSpanElement, StatusDotProps>(function Status(\n { className, status, pulse, children, ...props },\n ref,\n) {\n return (\n <span\n ref={ref}\n data-slot=\"status\"\n data-status={status ?? 'neutral'}\n className={cn(\n 'inline-flex items-center gap-2 text-xs font-medium text-muted-foreground',\n className,\n )}\n {...props}\n >\n <StatusDot status={status} pulse={pulse} />\n {children}\n </span>\n );\n});\n\nexport { Status, StatusDot, statusDotVariants };\n"],"mappings":";;;;;;AAKA,IAAM,oBAAoB,IAAI,uDAAuD;CACnF,UAAU,EACR,QAAQ;EACN,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,aAAa;;EAEb,QAAQ;EACR,MAAM;CACR,EACF;CACA,iBAAiB,EAAE,QAAQ,UAAU;AACvC,CAAC;AAUD,IAAM,YAAY,MAAM,WAA4C,SAAS,UAC3E,EAAE,WAAW,QAAQ,QAAQ,OAAO,GAAG,SACvC,KACA;CACA,OACE,qBAAC,QAAD;EACO;EACL,aAAU;EACV,eAAa,UAAU;EACvB,WAAW,GAAG,wBAAwB,SAAS;EAC/C,eAAY;EACZ,GAAI;EANN,UAAA,CAQG,QACC,oBAAC,QAAD,EACE,WAAW,GACT,kBAAkB,EAAE,OAAO,CAAC,GAC5B,+DACF,EACD,CAAA,IACC,MACJ,oBAAC,QAAD,EAAM,WAAW,kBAAkB,EAAE,OAAO,CAAC,EAAI,CAAA,CAC7C;;AAEV,CAAC;AAED,IAAM,SAAS,MAAM,WAA4C,SAAS,OACxE,EAAE,WAAW,QAAQ,OAAO,UAAU,GAAG,SACzC,KACA;CACA,OACE,qBAAC,QAAD;EACO;EACL,aAAU;EACV,eAAa,UAAU;EACvB,WAAW,GACT,4EACA,SACF;EACA,GAAI;EARN,UAAA,CAUE,oBAAC,WAAD;GAAmB;GAAe;EAAQ,CAAA,GACzC,QACG;;AAEV,CAAC"}
|
|
@@ -23,5 +23,5 @@ export interface StepsProps extends React.ComponentProps<'ol'> {
|
|
|
23
23
|
* phone a horizontal Steps collapses to the current step, "Step 2 of 5" and
|
|
24
24
|
* a progress bar, instead of squeezing every title into a few letters.
|
|
25
25
|
*/
|
|
26
|
-
declare
|
|
26
|
+
declare const Steps: React.ForwardRefExoticComponent<Omit<StepsProps, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
27
27
|
export { Steps };
|
package/dist/components/steps.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import Check from "@burtson-labs/icons/react/check";
|
|
5
6
|
//#region src/components/steps.tsx
|
|
@@ -34,10 +35,11 @@ var compactClasses = {
|
|
|
34
35
|
* phone a horizontal Steps collapses to the current step, "Step 2 of 5" and
|
|
35
36
|
* a progress bar, instead of squeezing every title into a few letters.
|
|
36
37
|
*/
|
|
37
|
-
function Steps({ items, current, orientation = "horizontal", compactBelow = orientation === "horizontal" ? "sm" : false, formatCounter = (step, total) => `Step ${step} of ${total}`, className, ...props }) {
|
|
38
|
+
var Steps = React.forwardRef(function Steps({ items, current, orientation = "horizontal", compactBelow = orientation === "horizontal" ? "sm" : false, formatCounter = (step, total) => `Step ${step} of ${total}`, className, ...props }, ref) {
|
|
38
39
|
const compact = compactBelow ? compactClasses[compactBelow] : null;
|
|
39
40
|
const focus = Math.min(Math.max(0, current), items.length - 1);
|
|
40
41
|
return /* @__PURE__ */ jsx("ol", {
|
|
42
|
+
ref,
|
|
41
43
|
"data-slot": "steps",
|
|
42
44
|
"data-orientation": orientation,
|
|
43
45
|
className: cn("flex gap-3", orientation === "horizontal" ? "flex-row items-start" : "flex-col", className),
|
|
@@ -84,7 +86,7 @@ function Steps({ items, current, orientation = "horizontal", compactBelow = orie
|
|
|
84
86
|
}, i);
|
|
85
87
|
})
|
|
86
88
|
});
|
|
87
|
-
}
|
|
89
|
+
});
|
|
88
90
|
//#endregion
|
|
89
91
|
export { Steps };
|
|
90
92
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","names":["_Fragment"],"sources":["../../src/components/steps.tsx"],"sourcesContent":["import Check from '@burtson-labs/icons/react/check';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface StepItem {\n title: React.ReactNode;\n description?: React.ReactNode;\n}\n\nexport type StepsBreakpoint = 'sm' | 'md' | 'lg';\n\nexport interface StepsProps extends React.ComponentProps<'ol'> {\n items: StepItem[];\n /** 0-based index of the step in progress; earlier steps show as done. */\n current: number;\n orientation?: 'horizontal' | 'vertical';\n /**\n * Below this width a horizontal Steps shows only where you are: the step's\n * title, \"Step 2 of 5\" and a segmented progress bar. `sm` (640px) by\n * default for horizontal steps; `false` keeps every step visible.\n */\n compactBelow?: StepsBreakpoint | false;\n /** The compact counter's text. */\n formatCounter?: (step: number, total: number) => string;\n}\n\n// Written out in full per breakpoint so Tailwind finds every class.\nconst compactClasses: Record<\n StepsBreakpoint,\n { other: string; item: string; marker: string; counter: string; bar: string; text: string }\n> = {\n sm: {\n other: 'max-sm:hidden',\n item: 'max-sm:grid max-sm:grid-cols-[minmax(0,1fr)_auto] max-sm:items-baseline max-sm:gap-x-3 max-sm:gap-y-2',\n marker: 'max-sm:hidden',\n counter: 'hidden max-sm:block',\n bar: 'hidden max-sm:flex max-sm:col-span-2',\n text: 'max-sm:pt-0',\n },\n md: {\n other: 'max-md:hidden',\n item: 'max-md:grid max-md:grid-cols-[minmax(0,1fr)_auto] max-md:items-baseline max-md:gap-x-3 max-md:gap-y-2',\n marker: 'max-md:hidden',\n counter: 'hidden max-md:block',\n bar: 'hidden max-md:flex max-md:col-span-2',\n text: 'max-md:pt-0',\n },\n lg: {\n other: 'max-lg:hidden',\n item: 'max-lg:grid max-lg:grid-cols-[minmax(0,1fr)_auto] max-lg:items-baseline max-lg:gap-x-3 max-lg:gap-y-2',\n marker: 'max-lg:hidden',\n counter: 'hidden max-lg:block',\n bar: 'hidden max-lg:flex max-lg:col-span-2',\n text: 'max-lg:pt-0',\n },\n};\n\n/**\n * Progress through a short multi-step flow (a wizard, an onboarding). On a\n * phone a horizontal Steps collapses to the current step, \"Step 2 of 5\" and\n * a progress bar, instead of squeezing every title into a few letters.\n */\
|
|
1
|
+
{"version":3,"file":"steps.js","names":["_Fragment"],"sources":["../../src/components/steps.tsx"],"sourcesContent":["import Check from '@burtson-labs/icons/react/check';\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\nexport interface StepItem {\n title: React.ReactNode;\n description?: React.ReactNode;\n}\n\nexport type StepsBreakpoint = 'sm' | 'md' | 'lg';\n\nexport interface StepsProps extends React.ComponentProps<'ol'> {\n items: StepItem[];\n /** 0-based index of the step in progress; earlier steps show as done. */\n current: number;\n orientation?: 'horizontal' | 'vertical';\n /**\n * Below this width a horizontal Steps shows only where you are: the step's\n * title, \"Step 2 of 5\" and a segmented progress bar. `sm` (640px) by\n * default for horizontal steps; `false` keeps every step visible.\n */\n compactBelow?: StepsBreakpoint | false;\n /** The compact counter's text. */\n formatCounter?: (step: number, total: number) => string;\n}\n\n// Written out in full per breakpoint so Tailwind finds every class.\nconst compactClasses: Record<\n StepsBreakpoint,\n { other: string; item: string; marker: string; counter: string; bar: string; text: string }\n> = {\n sm: {\n other: 'max-sm:hidden',\n item: 'max-sm:grid max-sm:grid-cols-[minmax(0,1fr)_auto] max-sm:items-baseline max-sm:gap-x-3 max-sm:gap-y-2',\n marker: 'max-sm:hidden',\n counter: 'hidden max-sm:block',\n bar: 'hidden max-sm:flex max-sm:col-span-2',\n text: 'max-sm:pt-0',\n },\n md: {\n other: 'max-md:hidden',\n item: 'max-md:grid max-md:grid-cols-[minmax(0,1fr)_auto] max-md:items-baseline max-md:gap-x-3 max-md:gap-y-2',\n marker: 'max-md:hidden',\n counter: 'hidden max-md:block',\n bar: 'hidden max-md:flex max-md:col-span-2',\n text: 'max-md:pt-0',\n },\n lg: {\n other: 'max-lg:hidden',\n item: 'max-lg:grid max-lg:grid-cols-[minmax(0,1fr)_auto] max-lg:items-baseline max-lg:gap-x-3 max-lg:gap-y-2',\n marker: 'max-lg:hidden',\n counter: 'hidden max-lg:block',\n bar: 'hidden max-lg:flex max-lg:col-span-2',\n text: 'max-lg:pt-0',\n },\n};\n\n/**\n * Progress through a short multi-step flow (a wizard, an onboarding). On a\n * phone a horizontal Steps collapses to the current step, \"Step 2 of 5\" and\n * a progress bar, instead of squeezing every title into a few letters.\n */\nconst Steps = React.forwardRef<HTMLOListElement, StepsProps>(function Steps(\n {\n items,\n current,\n orientation = 'horizontal',\n compactBelow = orientation === 'horizontal' ? 'sm' : false,\n formatCounter = (step, total) => `Step ${step} of ${total}`,\n className,\n ...props\n },\n ref,\n) {\n const compact = compactBelow ? compactClasses[compactBelow] : null;\n // The step the compact form shows: the current one, or the last when all are done.\n const focus = Math.min(Math.max(0, current), items.length - 1);\n return (\n <ol\n ref={ref}\n data-slot=\"steps\"\n data-orientation={orientation}\n className={cn(\n 'flex gap-3',\n orientation === 'horizontal' ? 'flex-row items-start' : 'flex-col',\n className,\n )}\n {...props}\n >\n {items.map((item, i) => {\n const state = i < current ? 'complete' : i === current ? 'current' : 'upcoming';\n const isFocus = compact && i === focus;\n return (\n <li\n key={i}\n data-state={state}\n aria-current={state === 'current' ? 'step' : undefined}\n className={cn(\n 'flex min-w-0 items-start gap-2.5',\n orientation === 'horizontal' && 'flex-1',\n compact && (isFocus ? compact.item : compact.other),\n )}\n >\n <span\n className={cn(\n 'grid size-6 shrink-0 place-items-center rounded-full border text-xs font-semibold tabular-nums',\n state === 'complete' && 'border-primary bg-primary text-primary-foreground',\n state === 'current' && 'border-brand bg-brand-soft text-brand',\n state === 'upcoming' && 'border-border-strong text-muted-foreground',\n isFocus && compact.marker,\n )}\n >\n {state === 'complete' ? <Check className=\"size-3.5\" aria-hidden /> : i + 1}\n </span>\n <span className={cn('grid min-w-0 gap-0.5 pt-0.5', isFocus && compact.text)}>\n <span\n className={cn(\n 'break-words text-[13px] font-semibold',\n state === 'upcoming' && 'text-muted-foreground',\n )}\n >\n {item.title}\n <span className=\"sr-only\">\n {state === 'complete' ? ' (done)' : state === 'current' ? ' (current)' : ''}\n </span>\n </span>\n {item.description && (\n <span className=\"text-xs text-muted-foreground\">{item.description}</span>\n )}\n </span>\n {isFocus && (\n <>\n <span\n data-slot=\"steps-counter\"\n className={cn(\n 'text-xs whitespace-nowrap text-muted-foreground tabular-nums',\n compact.counter,\n )}\n >\n {formatCounter(focus + 1, items.length)}\n </span>\n <span data-slot=\"steps-bar\" aria-hidden className={cn('gap-1', compact.bar)}>\n {items.map((_, j) => (\n <span\n key={j}\n className={cn(\n 'h-1 flex-1 rounded-full',\n j <= current ? 'bg-brand' : 'bg-muted',\n )}\n />\n ))}\n </span>\n </>\n )}\n </li>\n );\n })}\n </ol>\n );\n});\n\nexport { Steps };\n"],"mappings":";;;;;;AA4BA,IAAM,iBAGF;CACF,IAAI;EACF,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACT,KAAK;EACL,MAAM;CACR;CACA,IAAI;EACF,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACT,KAAK;EACL,MAAM;CACR;CACA,IAAI;EACF,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACT,KAAK;EACL,MAAM;CACR;AACF;;;;;;AAOA,IAAM,QAAQ,MAAM,WAAyC,SAAS,MACpE,EACE,OACA,SACA,cAAc,cACd,eAAe,gBAAgB,eAAe,OAAO,OACrD,iBAAiB,MAAM,UAAU,QAAQ,KAAK,MAAM,SACpD,WACA,GAAG,SAEL,KACA;CACA,MAAM,UAAU,eAAe,eAAe,gBAAgB;CAE9D,MAAM,QAAQ,KAAK,IAAI,KAAK,IAAI,GAAG,OAAO,GAAG,MAAM,SAAS,CAAC;CAC7D,OACE,oBAAC,MAAD;EACO;EACL,aAAU;EACV,oBAAkB;EAClB,WAAW,GACT,cACA,gBAAgB,eAAe,yBAAyB,YACxD,SACF;EACA,GAAI;EAEH,UAAA,MAAM,KAAK,MAAM,MAAM;GACtB,MAAM,QAAQ,IAAI,UAAU,aAAa,MAAM,UAAU,YAAY;GACrE,MAAM,UAAU,WAAW,MAAM;GACjC,OACE,qBAAC,MAAD;IAEE,cAAY;IACZ,gBAAc,UAAU,YAAY,SAAS,KAAA;IAC7C,WAAW,GACT,oCACA,gBAAgB,gBAAgB,UAChC,YAAY,UAAU,QAAQ,OAAO,QAAQ,MAC/C;IARF,UAAA;KAUE,oBAAC,QAAD;MACE,WAAW,GACT,kGACA,UAAU,cAAc,qDACxB,UAAU,aAAa,yCACvB,UAAU,cAAc,8CACxB,WAAW,QAAQ,MACrB;MAEC,UAAA,UAAU,aAAa,oBAAC,OAAD;OAAO,WAAU;OAAW,eAAA;MAAa,CAAA,IAAI,IAAI;KACrE,CAAA;KACN,qBAAC,QAAD;MAAM,WAAW,GAAG,+BAA+B,WAAW,QAAQ,IAAI;MAA1E,UAAA,CACE,qBAAC,QAAD;OACE,WAAW,GACT,yCACA,UAAU,cAAc,uBAC1B;OAJF,UAAA,CAMG,KAAK,OACN,oBAAC,QAAD;QAAM,WAAU;QACb,UAAA,UAAU,aAAa,YAAY,UAAU,YAAY,eAAe;OACrE,CAAA,CACF;MACL,CAAA,GAAA,KAAK,eACJ,oBAAC,QAAD;OAAM,WAAU;OAAiC,UAAA,KAAK;MAAkB,CAAA,CAEtE;;KACL,WACC,qBAAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;MACE,aAAU;MACV,WAAW,GACT,gEACA,QAAQ,OACV;MAEC,UAAA,cAAc,QAAQ,GAAG,MAAM,MAAM;KAClC,CAAA,GACN,oBAAC,QAAD;MAAM,aAAU;MAAY,eAAA;MAAY,WAAW,GAAG,SAAS,QAAQ,GAAG;MACvE,UAAA,MAAM,KAAK,GAAG,MACb,oBAAC,QAAD,EAEE,WAAW,GACT,2BACA,KAAK,UAAU,aAAa,UAC9B,EACD,GALM,CAKN,CACF;KACG,CAAA,CACN,EAAA,CAAA;IAEF;GA5DG,GAAA,CA4DH;EAER,CAAC;CACC,CAAA;AAER,CAAC"}
|
|
@@ -1,4 +1,48 @@
|
|
|
1
|
-
import { Switch as SwitchPrimitive } from 'radix-ui';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as SwitchPrimitive from '../primitives/vendor/radix/react-switch';
|
|
3
|
+
/**
|
|
4
|
+
* A 36×20 toggle with a 44px hit area on touch screens; the off track is the
|
|
5
|
+
* field border tone (`input`, 3:1 on the page), the on track primary in light
|
|
6
|
+
* mode and brand in dark mode (see Checkbox), focus the shared 2px outline.
|
|
7
|
+
*/
|
|
8
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export interface SwitchRowProps extends Omit<React.ComponentProps<typeof SwitchPrimitive.Root>, 'children'> {
|
|
10
|
+
/** The setting's name. */
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
/** What it does, under the name. */
|
|
13
|
+
description?: React.ReactNode;
|
|
14
|
+
/** Beside the label: a Badge such as "Always on". */
|
|
15
|
+
badge?: React.ReactNode;
|
|
16
|
+
/** Padding for a row in a SwitchList. */
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
/** A control that belongs to the switch (a minutes field for "Alert when late"), beside it on wide screens and under the label on phones. */
|
|
19
|
+
before?: React.ReactNode;
|
|
20
|
+
/** Extra classes for the row; className goes to the switch. */
|
|
21
|
+
rowClassName?: string;
|
|
22
|
+
/** Extra lines under the description. */
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A setting that is on or off: what it is (and what it does) on the left,
|
|
27
|
+
* the switch on the right, level with the first line of the label. Several
|
|
28
|
+
* of them stack in a SwitchList.
|
|
29
|
+
*/
|
|
30
|
+
declare const SwitchRow: React.ForwardRefExoticComponent<Omit<SwitchRowProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
31
|
+
export interface SwitchListProps extends React.ComponentProps<'div'> {
|
|
32
|
+
/** A rounded border around the list, for a list that is not already in a Card. */
|
|
33
|
+
bordered?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** SwitchRows (with `inset`) divided by rules, in a Card or a bordered box. */
|
|
36
|
+
declare const SwitchList: React.ForwardRefExoticComponent<Omit<SwitchListProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
export interface InlineSwitchProps extends Omit<React.ComponentProps<typeof SwitchPrimitive.Root>, 'children'> {
|
|
38
|
+
label: React.ReactNode;
|
|
39
|
+
/** Extra classes for the label; className goes to the switch. */
|
|
40
|
+
rowClassName?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A filter that is on or off, in a row of filters: the switch first, its
|
|
44
|
+
* label after it, at least 44px tall on touch screens. (Settings put the
|
|
45
|
+
* switch on the right: SwitchRow.)
|
|
46
|
+
*/
|
|
47
|
+
declare const InlineSwitch: React.ForwardRefExoticComponent<Omit<InlineSwitchProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
export { InlineSwitch, Switch, SwitchList, SwitchRow };
|