@nocoo/basalt 2.1.8 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/ai/COMPATIBILITY.md +11 -1
- package/ai/DESIGN.md +342 -0
- package/ai/INTEGRATION.md +239 -152
- package/ai/RECIPES.md +96 -26
- package/ai/USAGE.md +5 -5
- package/ai/registry.json +2883 -275
- package/dist/assets/brand-mark.js.map +1 -1
- package/dist/charts/area.js.map +1 -1
- package/dist/charts/bar.js.map +1 -1
- package/dist/charts/bullet.js.map +1 -1
- package/dist/charts/charts.js.map +1 -1
- package/dist/charts/config.d.ts +11 -11
- package/dist/charts/config.js +4 -4
- package/dist/charts/config.js.map +1 -1
- package/dist/charts/custom-chart.js.map +1 -1
- package/dist/charts/date-navigation.js +10 -10
- package/dist/charts/date-navigation.js.map +1 -1
- package/dist/charts/donut.js +1 -1
- package/dist/charts/donut.js.map +1 -1
- package/dist/charts/frame.d.ts +1 -1
- package/dist/charts/frame.js +4 -4
- package/dist/charts/frame.js.map +1 -1
- package/dist/charts/funnel.js.map +1 -1
- package/dist/charts/gauge.js +5 -5
- package/dist/charts/gauge.js.map +1 -1
- package/dist/charts/grouped-bar.js.map +1 -1
- package/dist/charts/heatmap-calendar.js +11 -11
- package/dist/charts/heatmap-calendar.js.map +1 -1
- package/dist/charts/heatmap-matrix.js +8 -8
- package/dist/charts/heatmap-matrix.js.map +1 -1
- package/dist/charts/item-list.js +1 -1
- package/dist/charts/item-list.js.map +1 -1
- package/dist/charts/legend.js +19 -19
- package/dist/charts/legend.js.map +1 -1
- package/dist/charts/line.js.map +1 -1
- package/dist/charts/palette.js +2 -2
- package/dist/charts/palette.js.map +1 -1
- package/dist/charts/radar.js.map +1 -1
- package/dist/charts/sample.js.map +1 -1
- package/dist/charts/sankey.js.map +1 -1
- package/dist/charts/series.js.map +1 -1
- package/dist/charts/slot-bar.js +2 -2
- package/dist/charts/slot-bar.js.map +1 -1
- package/dist/charts/sparkline.js +38 -23
- package/dist/charts/sparkline.js.map +1 -1
- package/dist/charts/stacked-bar.js.map +1 -1
- package/dist/charts/stat-card.d.ts +2 -2
- package/dist/charts/stat-card.js +61 -58
- package/dist/charts/stat-card.js.map +1 -1
- package/dist/charts/timeline.js +18 -9
- package/dist/charts/timeline.js.map +1 -1
- package/dist/charts/timeseries.js.map +1 -1
- package/dist/charts/tooltip.js +16 -16
- package/dist/charts/tooltip.js.map +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +4 -4
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/app-header.d.ts +5 -1
- package/dist/components/app-header.js +19 -11
- package/dist/components/app-header.js.map +1 -1
- package/dist/components/app-shell.d.ts +4 -1
- package/dist/components/app-shell.js +8 -5
- package/dist/components/app-shell.js.map +1 -1
- package/dist/components/approval-card.d.ts +13 -0
- package/dist/components/approval-card.js +161 -0
- package/dist/components/approval-card.js.map +1 -0
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.d.ts +12 -0
- package/dist/components/avatar.js +39 -18
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.js +8 -8
- package/dist/components/badge.js.map +1 -1
- package/dist/components/banner.d.ts +2 -2
- package/dist/components/banner.js +9 -8
- package/dist/components/banner.js.map +1 -1
- package/dist/components/basalt-mark.js +1 -1
- package/dist/components/basalt-mark.js.map +1 -1
- package/dist/components/battery-meter.js +5 -5
- package/dist/components/battery-meter.js.map +1 -1
- package/dist/components/breadcrumbs.js +6 -6
- package/dist/components/breadcrumbs.js.map +1 -1
- package/dist/components/button.js +10 -10
- package/dist/components/button.js.map +1 -1
- package/dist/components/chat-bubble.js +4 -3
- package/dist/components/chat-bubble.js.map +1 -1
- package/dist/components/chat-composer.d.ts +21 -3
- package/dist/components/chat-composer.js +126 -60
- package/dist/components/chat-composer.js.map +1 -1
- package/dist/components/chat-header.js +6 -6
- package/dist/components/chat-header.js.map +1 -1
- package/dist/components/chat-inbox.js +34 -30
- package/dist/components/chat-inbox.js.map +1 -1
- package/dist/components/chat-markdown.d.ts +8 -0
- package/dist/components/chat-markdown.js +122 -0
- package/dist/components/chat-markdown.js.map +1 -0
- package/dist/components/chat-message.d.ts +26 -0
- package/dist/components/chat-message.js +145 -0
- package/dist/components/chat-message.js.map +1 -0
- package/dist/components/checkbox.js +11 -11
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/clipboard-text.js +3 -3
- package/dist/components/clipboard-text.js.map +1 -1
- package/dist/components/code.d.ts +22 -20
- package/dist/components/code.js +94 -32
- package/dist/components/code.js.map +1 -1
- package/dist/components/collapsible.js +8 -4
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command-palette.js +73 -47
- package/dist/components/command-palette.js.map +1 -1
- package/dist/components/confirm-dialog.d.ts +4 -1
- package/dist/components/confirm-dialog.js +20 -18
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/context-cards.d.ts +15 -0
- package/dist/components/context-cards.js +148 -0
- package/dist/components/context-cards.js.map +1 -0
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.js +18 -14
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/data-table.d.ts +8 -2
- package/dist/components/data-table.js +161 -106
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.js +13 -13
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/delete-resource.js +1 -1
- package/dist/components/delete-resource.js.map +1 -1
- package/dist/components/description-list.js +3 -3
- package/dist/components/description-list.js.map +1 -1
- package/dist/components/dialog.d.ts +2 -2
- package/dist/components/dialog.js +8 -8
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/diff-table.d.ts +15 -0
- package/dist/components/diff-table.js +146 -0
- package/dist/components/diff-table.js.map +1 -0
- package/dist/components/dock.js +2 -2
- package/dist/components/dock.js.map +1 -1
- package/dist/components/dropdown-menu.js +23 -18
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/editable-nav-item.js +63 -58
- package/dist/components/editable-nav-item.js.map +1 -1
- package/dist/components/empty.js +6 -6
- package/dist/components/empty.js.map +1 -1
- package/dist/components/fab.js +1 -1
- package/dist/components/fab.js.map +1 -1
- package/dist/components/field.js +3 -3
- package/dist/components/field.js.map +1 -1
- package/dist/components/file-dropzone.js +7 -7
- package/dist/components/file-dropzone.js.map +1 -1
- package/dist/components/filter-bar.js +6 -6
- package/dist/components/filter-bar.js.map +1 -1
- package/dist/components/flow.js +4 -3
- package/dist/components/flow.js.map +1 -1
- package/dist/components/grid.d.ts +3 -1
- package/dist/components/grid.js +15 -8
- package/dist/components/grid.js.map +1 -1
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/icon-picker.d.ts +8 -2
- package/dist/components/icon-picker.js +75 -47
- package/dist/components/icon-picker.js.map +1 -1
- package/dist/components/inline-editable.js +6 -6
- package/dist/components/inline-editable.js.map +1 -1
- package/dist/components/input-area.js +3 -3
- package/dist/components/input-area.js.map +1 -1
- package/dist/components/input-group.js +5 -5
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.js +4 -4
- package/dist/components/input.js.map +1 -1
- package/dist/components/label.js +3 -3
- package/dist/components/label.js.map +1 -1
- package/dist/components/layer-card.d.ts +9 -4
- package/dist/components/layer-card.js +72 -67
- package/dist/components/layer-card.js.map +1 -1
- package/dist/components/link.js.map +1 -1
- package/dist/components/loader.d.ts +16 -10
- package/dist/components/loader.js +46 -53
- package/dist/components/loader.js.map +1 -1
- package/dist/components/loading-screen.js +3 -3
- package/dist/components/loading-screen.js.map +1 -1
- package/dist/components/menu-bar.js +32 -27
- package/dist/components/menu-bar.js.map +1 -1
- package/dist/components/meter.d.ts +5 -5
- package/dist/components/meter.js +25 -12
- package/dist/components/meter.js.map +1 -1
- package/dist/components/multi-select.js +66 -62
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +22 -8
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/overlay.js +2 -2
- package/dist/components/overlay.js.map +1 -1
- package/dist/components/page-header.d.ts +3 -1
- package/dist/components/page-header.js +12 -12
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/pagination.js +3 -3
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.js +18 -23
- package/dist/components/popover.js.map +1 -1
- package/dist/components/prompt-bar.d.ts +16 -0
- package/dist/components/prompt-bar.js +49 -0
- package/dist/components/prompt-bar.js.map +1 -0
- package/dist/components/radio.js +9 -9
- package/dist/components/radio.js.map +1 -1
- package/dist/components/recommendation-card.d.ts +13 -0
- package/dist/components/recommendation-card.js +123 -0
- package/dist/components/recommendation-card.js.map +1 -0
- package/dist/components/resource-list.js +1 -1
- package/dist/components/resource-list.js.map +1 -1
- package/dist/components/responsive-master-detail.js +7 -7
- package/dist/components/responsive-master-detail.js.map +1 -1
- package/dist/components/scroll-area.js +3 -3
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/section-rule.d.ts +5 -3
- package/dist/components/section-rule.js +12 -12
- package/dist/components/section-rule.js.map +1 -1
- package/dist/components/segment-control.js +3 -3
- package/dist/components/segment-control.js.map +1 -1
- package/dist/components/select.js +47 -32
- package/dist/components/select.js.map +1 -1
- package/dist/components/sensitive-input.js +17 -19
- package/dist/components/sensitive-input.js.map +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.d.ts +4 -4
- package/dist/components/sheet.js +12 -10
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.d.ts +3 -1
- package/dist/components/sidebar.js +150 -138
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton-line.d.ts +1 -1
- package/dist/components/skeleton-line.js +2 -2
- package/dist/components/skeleton-line.js.map +1 -1
- package/dist/components/slider.js +2 -2
- package/dist/components/slider.js.map +1 -1
- package/dist/components/stat-strip.js +5 -4
- package/dist/components/stat-strip.js.map +1 -1
- package/dist/components/switch.js +6 -6
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table-of-contents.js +5 -5
- package/dist/components/table-of-contents.js.map +1 -1
- package/dist/components/table-pager.js +2 -2
- package/dist/components/table-pager.js.map +1 -1
- package/dist/components/table.js +4 -4
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +7 -6
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tag-badge.d.ts +10 -10
- package/dist/components/tag-badge.js +11 -11
- package/dist/components/tag-badge.js.map +1 -1
- package/dist/components/tag-color-picker.d.ts +8 -1
- package/dist/components/tag-color-picker.js +33 -25
- package/dist/components/tag-color-picker.js.map +1 -1
- package/dist/components/text.js +5 -5
- package/dist/components/text.js.map +1 -1
- package/dist/components/theme-toggle.js +1 -1
- package/dist/components/theme-toggle.js.map +1 -1
- package/dist/components/thinking.d.ts +16 -0
- package/dist/components/thinking.js +85 -0
- package/dist/components/thinking.js.map +1 -0
- package/dist/components/toast.js +25 -20
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +6 -5
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.js +6 -6
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tool-chips.d.ts +12 -0
- package/dist/components/tool-chips.js +138 -0
- package/dist/components/tool-chips.js.map +1 -0
- package/dist/components/toolbar.js +3 -3
- package/dist/components/toolbar.js.map +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/typeahead-field.js +59 -56
- package/dist/components/typeahead-field.js.map +1 -1
- package/dist/components/upload-queue.js +15 -14
- package/dist/components/upload-queue.js.map +1 -1
- package/dist/models/agent-feedback.d.ts +44 -0
- package/dist/models/agent-feedback.js +28 -0
- package/dist/models/agent-feedback.js.map +1 -0
- package/dist/models/avatar.d.ts +2 -0
- package/dist/models/avatar.js +15 -0
- package/dist/models/avatar.js.map +1 -0
- package/dist/models/code.d.ts +6 -0
- package/dist/models/code.js +24 -0
- package/dist/models/code.js.map +1 -0
- package/dist/models/context-cards.d.ts +13 -0
- package/dist/models/context-cards.js +17 -0
- package/dist/models/context-cards.js.map +1 -0
- package/dist/models/diff-table.d.ts +12 -0
- package/dist/models/diff-table.js +9 -0
- package/dist/models/diff-table.js.map +1 -0
- package/dist/models/recommendation.d.ts +26 -0
- package/dist/models/recommendation.js +23 -0
- package/dist/models/recommendation.js.map +1 -0
- package/dist/providers/accent.js +1 -1
- package/dist/providers/accent.js.map +1 -1
- package/dist/providers/link.js.map +1 -1
- package/dist/providers/theme.js +1 -1
- package/dist/providers/theme.js.map +1 -1
- package/dist/styles/base.css +128 -0
- package/dist/styles/standalone.css +1994 -937
- package/dist/styles/tailwind.css +179 -13
- package/dist/styles/tokens.css +679 -20
- package/dist/utils/cn.js +25 -4
- package/dist/utils/cn.js.map +1 -1
- package/dist/utils/control-surface.d.ts +1 -1
- package/dist/utils/control-surface.js +1 -1
- package/dist/utils/control-surface.js.map +1 -1
- package/dist/utils/navigation.d.ts +3 -0
- package/dist/utils/navigation.js +8 -0
- package/dist/utils/navigation.js.map +1 -0
- package/dist/utils/preference-store.js +1 -1
- package/dist/utils/preference-store.js.map +1 -1
- package/dist/utils/selection-indicator.d.ts +1 -1
- package/dist/utils/selection-indicator.js +49 -72
- package/dist/utils/selection-indicator.js.map +1 -1
- package/dist/utils/use-checkable-group.js.map +1 -1
- package/dist/utils/use-hover-highlight.d.ts +4 -0
- package/dist/utils/use-hover-highlight.js +80 -0
- package/dist/utils/use-hover-highlight.js.map +1 -0
- package/dist/viewmodels/use-approval-card.d.ts +20 -0
- package/dist/viewmodels/use-approval-card.js +83 -0
- package/dist/viewmodels/use-approval-card.js.map +1 -0
- package/dist/viewmodels/use-chat-composer.d.ts +16 -0
- package/dist/viewmodels/use-chat-composer.js +34 -0
- package/dist/viewmodels/use-chat-composer.js.map +1 -0
- package/dist/viewmodels/use-chat-message.d.ts +16 -0
- package/dist/viewmodels/use-chat-message.js +26 -0
- package/dist/viewmodels/use-chat-message.js.map +1 -0
- package/dist/viewmodels/use-code-block.d.ts +8 -0
- package/dist/viewmodels/use-code-block.js +38 -0
- package/dist/viewmodels/use-code-block.js.map +1 -0
- package/dist/viewmodels/use-context-cards.d.ts +17 -0
- package/dist/viewmodels/use-context-cards.js +18 -0
- package/dist/viewmodels/use-context-cards.js.map +1 -0
- package/dist/viewmodels/use-diff-table.d.ts +16 -0
- package/dist/viewmodels/use-diff-table.js +42 -0
- package/dist/viewmodels/use-diff-table.js.map +1 -0
- package/dist/viewmodels/use-loader.d.ts +4 -0
- package/dist/viewmodels/use-loader.js +22 -0
- package/dist/viewmodels/use-loader.js.map +1 -0
- package/dist/viewmodels/use-recommendation-card.d.ts +17 -0
- package/dist/viewmodels/use-recommendation-card.js +41 -0
- package/dist/viewmodels/use-recommendation-card.js.map +1 -0
- package/dist/viewmodels/use-thinking.d.ts +13 -0
- package/dist/viewmodels/use-thinking.js +18 -0
- package/dist/viewmodels/use-thinking.js.map +1 -0
- package/dist/viewmodels/use-tool-chips.d.ts +10 -0
- package/dist/viewmodels/use-tool-chips.js +20 -0
- package/dist/viewmodels/use-tool-chips.js.map +1 -0
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.js","names":[],"sources":["../../src/components/collapsible.tsx"],"sourcesContent":["import * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\nimport { ChevronDown } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { FOCUS_INSET, OVERLAY_MOTION } from \"./overlay\";\n\ntype RadixCollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;\ntype RadixCollapsibleTriggerProps = React.ComponentPropsWithoutRef<\n\ttypeof CollapsiblePrimitive.CollapsibleTrigger\n>;\ntype RadixCollapsibleContentProps = React.ComponentPropsWithoutRef<\n\ttypeof CollapsiblePrimitive.CollapsibleContent\n>;\n\nexport interface CollapsibleProps\n\textends Omit<\n\t\tRadixCollapsibleProps,\n\t\t\"open\" | \"defaultOpen\" | \"onOpenChange\" | \"disabled\" | \"asChild\" | \"children\"\n\t> {\n\t/**\n\t * Collapsible structure elements, typically CollapsibleTrigger and CollapsibleContent.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * The controlled open state of the collapsible.\n\t */\n\topen?: RadixCollapsibleProps[\"open\"];\n\t/**\n\t * The uncontrolled initial open state of the collapsible.\n\t * @default false\n\t */\n\tdefaultOpen?: RadixCollapsibleProps[\"defaultOpen\"];\n\t/**\n\t * Called when the open state changes.\n\t */\n\tonOpenChange?: RadixCollapsibleProps[\"onOpenChange\"];\n\t/**\n\t * When true, prevents the user from interacting with the collapsible.\n\t * @default false\n\t */\n\tdisabled?: RadixCollapsibleProps[\"disabled\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * Note: Collapsible root is typed as React.FC and does not declare ref in its public Props;\n\t * forwards rest props and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCollapsibleProps[\"asChild\"];\n}\n\nexport const Collapsible: React.FC<CollapsibleProps> = CollapsiblePrimitive.Root;\n\nexport interface CollapsibleTriggerProps\n\textends Omit<RadixCollapsibleTriggerProps, \"asChild\" | \"children\"> {\n\t/**\n\t * Content of the trigger button. When asChild is false, automatically renders\n\t * a text container span alongside an animated ChevronDown icon.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * When true, bypasses the default text span and ChevronDown icon wrapping.\n\t * CollapsibleTrigger forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCollapsibleTriggerProps[\"asChild\"];\n}\n\nexport const CollapsibleTrigger = React.forwardRef<\n\tReact.ElementRef<typeof CollapsiblePrimitive.CollapsibleTrigger>,\n\tCollapsibleTriggerProps\n>(({ className, children, asChild = false, ...props }, ref) => {\n\tif (asChild) {\n\t\treturn (\n\t\t\t<CollapsiblePrimitive.CollapsibleTrigger ref={ref} asChild className={className} {...props}>\n\t\t\t\t{children}\n\t\t\t</CollapsiblePrimitive.CollapsibleTrigger>\n\t\t);\n\t}\n\treturn (\n\t\t<CollapsiblePrimitive.CollapsibleTrigger\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"m-0 inline-flex cursor-pointer items-center gap-
|
|
1
|
+
{"version":3,"file":"collapsible.js","names":["React","CollapsiblePrimitive","Collapsible","CollapsibleTrigger","props","asChild","cn","FOCUS_INSET","OVERLAY_MOTION","className","ChevronDown","CollapsibleContent","unstyled","children"],"sources":["../../src/components/collapsible.tsx"],"sourcesContent":["import * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\nimport { ChevronDown } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { FOCUS_INSET, OVERLAY_MOTION } from \"./overlay\";\n\ntype RadixCollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;\ntype RadixCollapsibleTriggerProps = React.ComponentPropsWithoutRef<\n\ttypeof CollapsiblePrimitive.CollapsibleTrigger\n>;\ntype RadixCollapsibleContentProps = React.ComponentPropsWithoutRef<\n\ttypeof CollapsiblePrimitive.CollapsibleContent\n>;\n\nexport interface CollapsibleProps\n\textends Omit<\n\t\tRadixCollapsibleProps,\n\t\t\"open\" | \"defaultOpen\" | \"onOpenChange\" | \"disabled\" | \"asChild\" | \"children\"\n\t> {\n\t/**\n\t * Collapsible structure elements, typically CollapsibleTrigger and CollapsibleContent.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * The controlled open state of the collapsible.\n\t */\n\topen?: RadixCollapsibleProps[\"open\"];\n\t/**\n\t * The uncontrolled initial open state of the collapsible.\n\t * @default false\n\t */\n\tdefaultOpen?: RadixCollapsibleProps[\"defaultOpen\"];\n\t/**\n\t * Called when the open state changes.\n\t */\n\tonOpenChange?: RadixCollapsibleProps[\"onOpenChange\"];\n\t/**\n\t * When true, prevents the user from interacting with the collapsible.\n\t * @default false\n\t */\n\tdisabled?: RadixCollapsibleProps[\"disabled\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * Note: Collapsible root is typed as React.FC and does not declare ref in its public Props;\n\t * forwards rest props and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCollapsibleProps[\"asChild\"];\n}\n\nexport const Collapsible: React.FC<CollapsibleProps> = CollapsiblePrimitive.Root;\n\nexport interface CollapsibleTriggerProps\n\textends Omit<RadixCollapsibleTriggerProps, \"asChild\" | \"children\"> {\n\t/**\n\t * Content of the trigger button. When asChild is false, automatically renders\n\t * a text container span alongside an animated ChevronDown icon.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * When true, bypasses the default text span and ChevronDown icon wrapping.\n\t * CollapsibleTrigger forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCollapsibleTriggerProps[\"asChild\"];\n}\n\nexport const CollapsibleTrigger = React.forwardRef<\n\tReact.ElementRef<typeof CollapsiblePrimitive.CollapsibleTrigger>,\n\tCollapsibleTriggerProps\n>(({ className, children, asChild = false, ...props }, ref) => {\n\tif (asChild) {\n\t\treturn (\n\t\t\t<CollapsiblePrimitive.CollapsibleTrigger ref={ref} asChild className={className} {...props}>\n\t\t\t\t{children}\n\t\t\t</CollapsiblePrimitive.CollapsibleTrigger>\n\t\t);\n\t}\n\treturn (\n\t\t<CollapsiblePrimitive.CollapsibleTrigger\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"basalt-ui group/collapsible m-0 inline-flex min-w-0 cursor-pointer items-center gap-basalt-control-gap border-none bg-transparent p-0 text-left text-basalt-base font-medium leading-[var(--basalt-line-body)] text-basalt-foreground shadow-none select-none\",\n\t\t\t\tFOCUS_INSET,\n\t\t\t\tOVERLAY_MOTION,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"flex min-w-0 items-center gap-basalt-control-gap\">{children}</span>\n\t\t\t<ChevronDown\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tdata-slot=\"collapsible-chevron\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"size-basalt-icon-sm shrink-0 transition-transform basalt-motion duration-basalt-normal ease-basalt group-data-[state=open]/collapsible:rotate-180\",\n\t\t\t\t\tOVERLAY_MOTION,\n\t\t\t\t)}\n\t\t\t/>\n\t\t</CollapsiblePrimitive.CollapsibleTrigger>\n\t);\n});\nCollapsibleTrigger.displayName = CollapsiblePrimitive.CollapsibleTrigger.displayName;\n\nexport interface CollapsibleContentProps\n\textends Omit<RadixCollapsibleContentProps, \"unstyled\" | \"forceMount\" | \"asChild\"> {\n\t/**\n\t * Render children without the default inset border container.\n\t * Note: When unstyled is false (default), children are wrapped in an inner inset border div.\n\t * When combined with asChild, asChild slots onto that inner div unless unstyled={true} is set.\n\t * @default false\n\t */\n\tunstyled?: boolean;\n\t/**\n\t * Used to force mounting when more control is needed. Useful when\n\t * controlling animation with React animation libraries.\n\t */\n\tforceMount?: RadixCollapsibleContentProps[\"forceMount\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * Note: When unstyled is false, asChild operates within the inner inset div wrapper;\n\t * set unstyled={true} to slot directly onto the child element as the content/ref target.\n\t * CollapsibleContent forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCollapsibleContentProps[\"asChild\"];\n}\n\nexport const CollapsibleContent = React.forwardRef<\n\tReact.ElementRef<typeof CollapsiblePrimitive.CollapsibleContent>,\n\tCollapsibleContentProps\n>(({ className, children, unstyled = false, ...props }, ref) => (\n\t<CollapsiblePrimitive.CollapsibleContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"overflow-hidden data-[state=closed]:animate-basalt-collapsible-up data-[state=open]:animate-basalt-collapsible-down\",\n\t\t\tOVERLAY_MOTION,\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{unstyled ? (\n\t\t\tchildren\n\t\t) : (\n\t\t\t<div className=\"my-basalt-layout-sm border-l-2 border-basalt-border px-basalt-card py-basalt-card-sm text-basalt-base text-basalt-foreground\">\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t)}\n\t</CollapsiblePrimitive.CollapsibleContent>\n));\nCollapsibleContent.displayName = CollapsiblePrimitive.CollapsibleContent.displayName;\n"],"mappings":";;;;;;;;AAkDA,IAAaE,IAA0CD,EAAqB,MAkB/DE,IAAqBH,EAAM,YAGrC,EAAE,cAAW,aAAU,aAAU,IAAO,GAAGI,KAAS,MAClDC,IAEF,kBAACJ,EAAqB,oBAAtB;CAA8C;CAAK,SAAA;CAAmB;CAAW,GAAIG;CACnF;AACuC,CAAA,IAI1C,kBAACH,EAAqB,oBAAtB;CACM;CACL,WAAWK,EACV,iQACAC,GACAC,GACAC,CACD;CACA,GAAIL;CARL,UAAA,CAUC,kBAAC,QAAD;EAAM,WAAU;EAAoD;CAAe,CAAA,GACnF,kBAACM,GAAD;EACC,eAAY;EACZ,aAAU;EACV,WAAWJ,EACV,qJACAE,CACD;CACA,CAAA,CACuC;EAE1C;AACD,EAAmB,cAAcP,EAAqB,mBAAmB;AA0BzE,IAAaU,IAAqBX,EAAM,YAGrC,EAAE,cAAW,aAAU,cAAW,IAAO,GAAGI,KAAS,MACvD,kBAACH,EAAqB,oBAAtB;CACM;CACL,WAAWK,EACV,uHACAE,GACAC,CACD;CACA,GAAIL;CAEH,UAAAQ,IACAC,IAEA,kBAAC,OAAD;EAAK,WAAU;EACb;CACG,CAAA;AAEkC,CAAA,CACzC;AACD,EAAmB,cAAcZ,EAAqB,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","names":[],"sources":["../../src/components/combobox.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from \"react\";\nimport type { InputSize } from \"./input\";\nimport { TypeaheadField, type TypeaheadItem } from \"./typeahead-field\";\n\nexport type ComboboxItem = TypeaheadItem;\n\nexport type ComboboxProps = Omit<\n\tComponentPropsWithoutRef<\"div\">,\n\t\"children\" | \"defaultValue\" | \"onChange\"\n> & {\n\t/**\n\t * Options shown in the list. Selection must match one of these values.\n\t */\n\titems: ComboboxItem[];\n\t/**\n\t * The controlled selected value.\n\t */\n\tvalue?: string;\n\t/**\n\t * The uncontrolled initial value.\n\t */\n\tdefaultValue?: string;\n\t/**\n\t * Called when the selected value changes.\n\t */\n\tonValueChange?: (value: string) => void;\n\t/**\n\t * Native form field name.\n\t */\n\tname?: string;\n\t/**\n\t * Placeholder shown when the field is empty.\n\t * @default Select…\n\t */\n\tplaceholder?: string;\n\t/**\n\t * Disable the field.\n\t * @default false\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Disable the field and mark it busy.\n\t * @default false\n\t */\n\tloading?: boolean;\n\t/**\n\t * The visual size of the field.\n\t * @default default\n\t */\n\tsize?: InputSize;\n};\n\nexport function Combobox({ placeholder = \"Select…\", ...rest }: ComboboxProps) {\n\treturn <TypeaheadField placeholder={placeholder} allowFreeform={false} {...rest} />;\n}\n"],"mappings":";;;;AAoDA,
|
|
1
|
+
{"version":3,"file":"combobox.js","names":["Combobox","rest","TypeaheadField"],"sources":["../../src/components/combobox.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from \"react\";\nimport type { InputSize } from \"./input\";\nimport { TypeaheadField, type TypeaheadItem } from \"./typeahead-field\";\n\nexport type ComboboxItem = TypeaheadItem;\n\nexport type ComboboxProps = Omit<\n\tComponentPropsWithoutRef<\"div\">,\n\t\"children\" | \"defaultValue\" | \"onChange\"\n> & {\n\t/**\n\t * Options shown in the list. Selection must match one of these values.\n\t */\n\titems: ComboboxItem[];\n\t/**\n\t * The controlled selected value.\n\t */\n\tvalue?: string;\n\t/**\n\t * The uncontrolled initial value.\n\t */\n\tdefaultValue?: string;\n\t/**\n\t * Called when the selected value changes.\n\t */\n\tonValueChange?: (value: string) => void;\n\t/**\n\t * Native form field name.\n\t */\n\tname?: string;\n\t/**\n\t * Placeholder shown when the field is empty.\n\t * @default Select…\n\t */\n\tplaceholder?: string;\n\t/**\n\t * Disable the field.\n\t * @default false\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * Disable the field and mark it busy.\n\t * @default false\n\t */\n\tloading?: boolean;\n\t/**\n\t * The visual size of the field.\n\t * @default default\n\t */\n\tsize?: InputSize;\n};\n\nexport function Combobox({ placeholder = \"Select…\", ...rest }: ComboboxProps) {\n\treturn <TypeaheadField placeholder={placeholder} allowFreeform={false} {...rest} />;\n}\n"],"mappings":";;;;AAoDA,SAAgBA,EAAS,EAAE,iBAAc,WAAW,GAAGC,KAAuB;CAC7E,OAAO,kBAACC,GAAD;EAA6B;EAAa,eAAe;EAAO,GAAID;CAAO,CAAA;AACnF"}
|
|
@@ -1,90 +1,116 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../utils/cn.js";
|
|
3
3
|
import { Dialog as t, DialogContent as n, DialogTitle as r, DialogTrigger as i } from "./dialog.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useSelectionIndicator as a } from "../utils/selection-indicator.js";
|
|
5
|
+
import * as o from "react";
|
|
6
|
+
import { Search as s } from "lucide-react";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import { Command as u } from "cmdk";
|
|
8
9
|
//#region src/components/command-palette.tsx
|
|
9
|
-
var
|
|
10
|
+
var d = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ c(u, {
|
|
10
11
|
ref: r,
|
|
11
|
-
className: e("flex h-
|
|
12
|
+
className: e("flex min-h-0 w-full flex-col overflow-hidden rounded-basalt-md bg-basalt-popover text-basalt-popover-foreground", t),
|
|
12
13
|
...n
|
|
13
14
|
}));
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
...
|
|
20
|
-
children: [
|
|
15
|
+
d.displayName = u.displayName;
|
|
16
|
+
var f = i;
|
|
17
|
+
function p({ children: e, shouldFilter: i, ...a }) {
|
|
18
|
+
let s = o.Children.toArray(e), u = s.filter((e) => o.isValidElement(e) && e.type === f), p = s.filter((e) => !(o.isValidElement(e) && e.type === f));
|
|
19
|
+
return /* @__PURE__ */ l(t, {
|
|
20
|
+
...a,
|
|
21
|
+
children: [u, /* @__PURE__ */ l(n, {
|
|
21
22
|
size: "lg",
|
|
22
23
|
"aria-describedby": void 0,
|
|
23
|
-
className: "overflow-hidden bg-basalt-popover p-0 shadow-lg",
|
|
24
|
-
children: [/* @__PURE__ */
|
|
24
|
+
className: "flex flex-col overflow-hidden bg-basalt-popover p-0 shadow-lg",
|
|
25
|
+
children: [/* @__PURE__ */ c(r, {
|
|
25
26
|
className: "sr-only",
|
|
26
27
|
children: "Command Palette"
|
|
27
|
-
}), /* @__PURE__ */
|
|
28
|
+
}), /* @__PURE__ */ c(d, {
|
|
28
29
|
label: "Command Palette",
|
|
29
30
|
...i !== void 0 && { shouldFilter: i },
|
|
30
|
-
className: "[&_[cmdk-group-heading]]:px-
|
|
31
|
+
className: "[&_[cmdk-group-heading]]:px-basalt-space-lg [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-basalt-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-basalt-5 [&_[cmdk-input-wrapper]_svg]:w-basalt-5 [&_[cmdk-input]]:min-h-basalt-control [&_[cmdk-item]]:px-basalt-space-lg [&_[cmdk-item]]:py-basalt-space-md [&_[cmdk-item]_svg]:h-basalt-4 [&_[cmdk-item]_svg]:w-basalt-4",
|
|
31
32
|
children: p
|
|
32
33
|
})]
|
|
33
34
|
})]
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
|
-
var
|
|
37
|
-
className: "flex items-center border-b border-basalt-border px-
|
|
37
|
+
var m = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ l("div", {
|
|
38
|
+
className: "flex shrink-0 items-center border-b border-basalt-border px-basalt-space-lg",
|
|
38
39
|
"cmdk-input-wrapper": "",
|
|
39
|
-
children: [/* @__PURE__ */ s
|
|
40
|
-
className: "mr-
|
|
40
|
+
children: [/* @__PURE__ */ c(s, {
|
|
41
|
+
className: "mr-basalt-space-lg size-basalt-icon-lg shrink-0 opacity-50",
|
|
41
42
|
"aria-hidden": "true"
|
|
42
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ c(u.Input, {
|
|
43
44
|
ref: r,
|
|
44
|
-
className: e("flex
|
|
45
|
+
className: e("basalt-action flex min-w-0 w-full rounded-basalt-md bg-transparent outline-hidden ring-0 shadow-none placeholder:text-basalt-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", t),
|
|
45
46
|
...n,
|
|
46
47
|
"aria-label": n["aria-label"] ?? (typeof n.placeholder == "string" ? n.placeholder : "Command Palette")
|
|
47
48
|
})]
|
|
48
49
|
}));
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
m.displayName = u.Input.displayName;
|
|
51
|
+
function h(e, t) {
|
|
52
|
+
let n = 0, r = 0;
|
|
53
|
+
for (let i = e; i && i !== t; i = i.offsetParent) n += i.offsetLeft, r += i.offsetTop;
|
|
54
|
+
return {
|
|
55
|
+
left: n,
|
|
56
|
+
top: r,
|
|
57
|
+
width: e.offsetWidth,
|
|
58
|
+
height: e.offsetHeight
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
var g = o.forwardRef(({ className: t, style: n, ...r }, i) => {
|
|
62
|
+
let { ref: o, state: s } = a({
|
|
63
|
+
itemSelector: "[cmdk-item][data-selected=\"true\"]:not([data-disabled=\"true\"])",
|
|
64
|
+
mapGeometry: h,
|
|
65
|
+
ref: i
|
|
66
|
+
});
|
|
67
|
+
return /* @__PURE__ */ c(u.List, {
|
|
68
|
+
ref: o,
|
|
69
|
+
className: e("basalt-command-list relative isolate min-h-0 max-h-[18.75rem] overflow-y-auto overflow-x-hidden p-basalt-menu-inset", t),
|
|
70
|
+
...r,
|
|
71
|
+
"data-basalt-command-animated": s.animated,
|
|
72
|
+
style: {
|
|
73
|
+
"--basalt-command-left": `${s.left}px`,
|
|
74
|
+
"--basalt-command-top": `${s.top}px`,
|
|
75
|
+
"--basalt-command-width": `${s.visible ? s.width : 0}px`,
|
|
76
|
+
"--basalt-command-height": `${s.visible ? s.height : 0}px`,
|
|
77
|
+
...n
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
g.displayName = u.List.displayName;
|
|
82
|
+
var _ = o.forwardRef((e, t) => /* @__PURE__ */ c(u.Empty, {
|
|
57
83
|
ref: t,
|
|
58
|
-
className: "py-
|
|
84
|
+
className: "py-basalt-space-lg text-center text-basalt-base text-basalt-muted-foreground",
|
|
59
85
|
...e
|
|
60
86
|
}));
|
|
61
|
-
|
|
62
|
-
var
|
|
87
|
+
_.displayName = u.Empty.displayName;
|
|
88
|
+
var v = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ c(u.Group, {
|
|
63
89
|
ref: r,
|
|
64
|
-
className: e("overflow-hidden
|
|
90
|
+
className: e("overflow-hidden py-basalt-space-sm text-basalt-foreground [&_[cmdk-group-heading]]:px-basalt-space-lg [&_[cmdk-group-heading]]:py-basalt-space-md [&_[cmdk-group-heading]]:text-basalt-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-basalt-muted-foreground", t),
|
|
65
91
|
...n
|
|
66
92
|
}));
|
|
67
|
-
|
|
68
|
-
var
|
|
93
|
+
v.displayName = u.Group.displayName;
|
|
94
|
+
var y = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ c(u.Separator, {
|
|
69
95
|
ref: r,
|
|
70
|
-
className: e("-mx-
|
|
96
|
+
className: e("-mx-basalt-space-sm h-px bg-basalt-border", t),
|
|
71
97
|
...n
|
|
72
98
|
}));
|
|
73
|
-
|
|
74
|
-
var
|
|
99
|
+
y.displayName = u.Separator.displayName;
|
|
100
|
+
var b = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ c(u.Item, {
|
|
75
101
|
ref: r,
|
|
76
|
-
className: e("relative flex cursor-default items-center rounded-basalt-sm px-
|
|
102
|
+
className: e("relative z-10 flex cursor-default items-center rounded-basalt-sm px-basalt-menu-x py-basalt-menu-y text-basalt-base leading-basalt-row outline-hidden select-none data-[disabled=true]:pointer-events-none data-[selected=true]:text-basalt-accent-foreground data-[disabled=true]:opacity-50", t),
|
|
77
103
|
...n
|
|
78
104
|
}));
|
|
79
|
-
|
|
80
|
-
function
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
className: e("ml-auto text-
|
|
105
|
+
b.displayName = u.Item.displayName;
|
|
106
|
+
function x({ className: t, ...n }) {
|
|
107
|
+
return /* @__PURE__ */ c("span", {
|
|
108
|
+
className: e("ml-auto text-basalt-sm tracking-widest text-basalt-muted-foreground", t),
|
|
83
109
|
...n
|
|
84
110
|
});
|
|
85
111
|
}
|
|
86
|
-
|
|
112
|
+
x.displayName = "CommandShortcut";
|
|
87
113
|
//#endregion
|
|
88
|
-
export {
|
|
114
|
+
export { _ as CommandEmpty, v as CommandGroup, m as CommandInput, b as CommandItem, g as CommandList, p as CommandPalette, f as CommandPaletteTrigger, y as CommandSeparator, x as CommandShortcut };
|
|
89
115
|
|
|
90
116
|
//# sourceMappingURL=command-palette.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.js","names":[],"sources":["../../src/components/command-palette.tsx"],"sourcesContent":["import type * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport type { DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { Dialog, DialogContent, DialogTitle, DialogTrigger } from \"./dialog\";\n\nconst Command = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full flex-col overflow-hidden rounded-basalt-md bg-basalt-popover text-basalt-popover-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nexport interface CommandPaletteProps\n\textends Omit<DialogProps, \"open\" | \"defaultOpen\" | \"onOpenChange\" | \"children\" | \"modal\"> {\n\t/**\n\t * Command palette structure elements, including CommandPaletteTrigger and inner command items.\n\t * Note: Triggers must be direct children of CommandPalette (child.type === CommandPaletteTrigger)\n\t * to be separated from modal dialog content. Wrapping triggers in Fragments or HOCs will cause\n\t * them to be treated as modal content.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * The controlled open state of the command palette dialog.\n\t */\n\topen?: boolean;\n\t/**\n\t * The uncontrolled initial open state of the command palette dialog.\n\t * @default false\n\t */\n\tdefaultOpen?: boolean;\n\t/**\n\t * Called when the open state changes.\n\t */\n\tonOpenChange?: (open: boolean) => void;\n\t/**\n\t * Filter items as the query changes.\n\t * @default true\n\t */\n\tshouldFilter?: boolean;\n\t/**\n\t * The modality of the dialog. When set to true, interaction with outside elements\n\t * will be disabled and only dialog content will be visible to screen readers.\n\t * @default true\n\t */\n\tmodal?: boolean;\n}\n\ntype RadixDialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\n\nexport interface CommandPaletteTriggerProps extends Omit<RadixDialogTriggerProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * CommandPaletteTrigger is an alias for DialogTrigger; forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixDialogTriggerProps[\"asChild\"];\n}\n\nexport const CommandPaletteTrigger = DialogTrigger;\n\nexport function CommandPalette({ children, shouldFilter, ...props }: CommandPaletteProps) {\n\tconst kids = React.Children.toArray(children);\n\tconst triggers = kids.filter(\n\t\t(child) => React.isValidElement(child) && child.type === CommandPaletteTrigger,\n\t);\n\tconst content = kids.filter(\n\t\t(child) => !(React.isValidElement(child) && child.type === CommandPaletteTrigger),\n\t);\n\treturn (\n\t\t<Dialog {...props}>\n\t\t\t{triggers}\n\t\t\t<DialogContent\n\t\t\t\tsize=\"lg\"\n\t\t\t\taria-describedby={undefined}\n\t\t\t\tclassName=\"overflow-hidden bg-basalt-popover p-0 shadow-lg\"\n\t\t\t>\n\t\t\t\t<DialogTitle className=\"sr-only\">Command Palette</DialogTitle>\n\t\t\t\t<Command\n\t\t\t\t\tlabel=\"Command Palette\"\n\t\t\t\t\t{...(shouldFilter !== undefined && { shouldFilter })}\n\t\t\t\t\tclassName=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-basalt-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\"\n\t\t\t\t>\n\t\t\t\t\t{content}\n\t\t\t\t</Command>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n\ntype RadixCommandInputProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>;\n\nexport interface CommandInputProps\n\textends Omit<RadixCommandInputProps, \"value\" | \"onValueChange\" | \"asChild\"> {\n\t/**\n\t * Optional controlled state for the search input value.\n\t * Note: Underlying cmdk input excludes standard onChange/type props in favor of value/onValueChange.\n\t */\n\tvalue?: RadixCommandInputProps[\"value\"];\n\t/**\n\t * Event handler called when the search value changes.\n\t */\n\tonValueChange?: RadixCommandInputProps[\"onValueChange\"];\n\t/**\n\t * Change the default rendered input element to the child element, merging props and behavior.\n\t * CommandInput forwards ref to HTMLInputElement and inherits native input attributes (excluding onChange/type).\n\t * Note: When aria-label is omitted, defaults to placeholder if string, or \"Command Palette\".\n\t * @default false\n\t */\n\tasChild?: RadixCommandInputProps[\"asChild\"];\n}\n\nexport const CommandInput = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Input>,\n\tCommandInputProps\n>(({ className, ...props }, ref) => (\n\t<div className=\"flex items-center border-b border-basalt-border px-3\" cmdk-input-wrapper=\"\">\n\t\t<Search className=\"mr-2 size-4 shrink-0 opacity-50\" aria-hidden=\"true\" />\n\t\t<CommandPrimitive.Input\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-11 w-full rounded-basalt-md bg-transparent py-3 text-sm outline-hidden ring-0 shadow-none placeholder:text-basalt-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t\taria-label={\n\t\t\t\tprops[\"aria-label\"] ??\n\t\t\t\t(typeof props.placeholder === \"string\" ? props.placeholder : \"Command Palette\")\n\t\t\t}\n\t\t/>\n\t</div>\n));\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\ntype RadixCommandListProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>;\n\nexport interface CommandListProps extends Omit<RadixCommandListProps, \"label\" | \"asChild\"> {\n\t/**\n\t * Accessible label for this list of suggestions. Not shown visibly.\n\t * @default \"Suggestions\"\n\t */\n\tlabel?: RadixCommandListProps[\"label\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandList forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCommandListProps[\"asChild\"];\n}\n\nexport const CommandList = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.List>,\n\tCommandListProps\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n\t\t{...props}\n\t/>\n));\nCommandList.displayName = CommandPrimitive.List.displayName;\n\ntype RadixCommandEmptyProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>;\n\nexport interface CommandEmptyProps extends Omit<RadixCommandEmptyProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandEmpty forwards ref to HTMLDivElement and inherits native div attributes.\n\t * Note: cmdk Empty does not support forceMount.\n\t * @default false\n\t */\n\tasChild?: RadixCommandEmptyProps[\"asChild\"];\n}\n\nexport const CommandEmpty = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Empty>,\n\tCommandEmptyProps\n>((props, ref) => (\n\t<CommandPrimitive.Empty\n\t\tref={ref}\n\t\tclassName=\"py-6 text-center text-sm text-basalt-muted-foreground\"\n\t\t{...props}\n\t/>\n));\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\ntype RadixCommandGroupProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>;\n\nexport interface CommandGroupProps\n\textends Omit<RadixCommandGroupProps, \"heading\" | \"value\" | \"forceMount\" | \"asChild\"> {\n\t/**\n\t * Heading to render for this group of command items.\n\t */\n\theading?: RadixCommandGroupProps[\"heading\"];\n\t/**\n\t * Unique value identifying this group. If no heading is provided, value must be specified.\n\t */\n\tvalue?: RadixCommandGroupProps[\"value\"];\n\t/**\n\t * Whether this group is forcibly rendered regardless of filtering state.\n\t */\n\tforceMount?: RadixCommandGroupProps[\"forceMount\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandGroup forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCommandGroupProps[\"asChild\"];\n}\n\nexport const CommandGroup = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Group>,\n\tCommandGroupProps\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Group\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"overflow-hidden p-1 text-basalt-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-basalt-muted-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\ntype RadixCommandSeparatorProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>;\n\nexport interface CommandSeparatorProps\n\textends Omit<RadixCommandSeparatorProps, \"alwaysRender\" | \"asChild\"> {\n\t/**\n\t * Whether this separator should always be rendered. Useful when automatic filtering is disabled.\n\t * When false (default), visible only when the search query is empty.\n\t */\n\talwaysRender?: RadixCommandSeparatorProps[\"alwaysRender\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandSeparator forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCommandSeparatorProps[\"asChild\"];\n}\n\nexport const CommandSeparator = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Separator>,\n\tCommandSeparatorProps\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-1 h-px bg-basalt-border\", className)}\n\t\t{...props}\n\t/>\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\ntype RadixCommandItemProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>;\n\nexport interface CommandItemProps\n\textends Omit<\n\t\tRadixCommandItemProps,\n\t\t\"disabled\" | \"onSelect\" | \"value\" | \"keywords\" | \"forceMount\" | \"asChild\"\n\t> {\n\t/**\n\t * Whether this item is currently disabled from selection.\n\t * @default false\n\t */\n\tdisabled?: RadixCommandItemProps[\"disabled\"];\n\t/**\n\t * Event handler called when this item is selected via click or keyboard.\n\t * Note: cmdk passes the item's resolved value string `(value: string) => void`,\n\t * not a standard DOM SelectEvent.\n\t */\n\tonSelect?: RadixCommandItemProps[\"onSelect\"];\n\t/**\n\t * Unique value identifying this item during filtering and selection.\n\t * Inferred from children/textContent if omitted.\n\t */\n\tvalue?: RadixCommandItemProps[\"value\"];\n\t/**\n\t * Optional additional keywords matched during filtering.\n\t */\n\tkeywords?: RadixCommandItemProps[\"keywords\"];\n\t/**\n\t * Whether this item is forcibly rendered regardless of query filtering.\n\t * Inherits forceMount from parent CommandGroup when omitted.\n\t */\n\tforceMount?: RadixCommandItemProps[\"forceMount\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandItem forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCommandItemProps[\"asChild\"];\n}\n\nexport const CommandItem = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Item>,\n\tCommandItemProps\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default items-center rounded-basalt-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-basalt-accent data-[selected=true]:text-basalt-accent-foreground data-[disabled=true]:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nexport interface CommandShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nexport function CommandShortcut({ className, ...props }: CommandShortcutProps) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\"ml-auto text-xs tracking-widest text-basalt-muted-foreground\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\nCommandShortcut.displayName = \"CommandShortcut\";\n"],"mappings":";;;;;;;;AAQA,IAAM,IAAU,EAAM,YAGnB,EAAE,cAAW,GAAG,KAAS,MAC3B,kBAAC,GAAD;CACM;CACL,WAAW,EACV,kHACA,CACD;CACA,GAAI;AACJ,CAAA,CACD;AACD,EAAQ,cAAc,EAAiB;AAgDvC,IAAa,IAAwB;AAErC,SAAgB,EAAe,EAAE,aAAU,iBAAc,GAAG,KAA8B;CACzF,IAAM,IAAO,EAAM,SAAS,QAAQ,CAAQ,GACtC,IAAW,EAAK,QACpB,MAAU,EAAM,eAAe,CAAK,KAAK,EAAM,SAAS,CAC1D,GACM,IAAU,EAAK,QACnB,MAAU,EAAE,EAAM,eAAe,CAAK,KAAK,EAAM,SAAS,EAC5D;CACA,OACC,kBAAC,GAAD;EAAQ,GAAI;EAAZ,UAAA,CACE,GACD,kBAAC,GAAD;GACC,MAAK;GACL,oBAAkB,KAAA;GAClB,WAAU;GAHX,UAAA,CAKC,kBAAC,GAAD;IAAa,WAAU;IAAU,UAAA;GAA4B,CAAA,GAC7D,kBAAC,GAAD;IACC,OAAM;IACN,GAAK,MAAiB,KAAA,KAAa,EAAE,gBAAa;IAClD,WAAU;IAET,UAAA;GACO,CAAA,CACK;EACR,CAAA,CAAA;;AAEV;AAwBA,IAAa,IAAe,EAAM,YAG/B,EAAE,cAAW,GAAG,KAAS,MAC3B,kBAAC,OAAD;CAAK,WAAU;CAAuD,sBAAmB;CAAzF,UAAA,CACC,kBAAC,GAAD;EAAQ,WAAU;EAAkC,eAAY;CAAQ,CAAA,GACxE,kBAAC,EAAiB,OAAlB;EACM;EACL,WAAW,EACV,6LACA,CACD;EACA,GAAI;EACJ,cACC,EAAM,kBACL,OAAO,EAAM,eAAgB,WAAW,EAAM,cAAc;CAE9D,CAAA,CACG;AACL,CAAA,CAAA;AACD,EAAa,cAAc,EAAiB,MAAM;AAkBlD,IAAa,IAAc,EAAM,YAG9B,EAAE,cAAW,GAAG,KAAS,MAC3B,kBAAC,EAAiB,MAAlB;CACM;CACL,WAAW,EAAG,mDAAmD,CAAS;CAC1E,GAAI;AACJ,CAAA,CACD;AACD,EAAY,cAAc,EAAiB,KAAK;AAchD,IAAa,IAAe,EAAM,YAG/B,GAAO,MACT,kBAAC,EAAiB,OAAlB;CACM;CACL,WAAU;CACV,GAAI;AACJ,CAAA,CACD;AACD,EAAa,cAAc,EAAiB,MAAM;AA0BlD,IAAa,IAAe,EAAM,YAG/B,EAAE,cAAW,GAAG,KAAS,MAC3B,kBAAC,EAAiB,OAAlB;CACM;CACL,WAAW,EACV,wOACA,CACD;CACA,GAAI;AACJ,CAAA,CACD;AACD,EAAa,cAAc,EAAiB,MAAM;AAmBlD,IAAa,IAAmB,EAAM,YAGnC,EAAE,cAAW,GAAG,KAAS,MAC3B,kBAAC,EAAiB,WAAlB;CACM;CACL,WAAW,EAAG,+BAA+B,CAAS;CACtD,GAAI;AACJ,CAAA,CACD;AACD,EAAiB,cAAc,EAAiB,UAAU;AA0C1D,IAAa,IAAc,EAAM,YAG9B,EAAE,cAAW,GAAG,KAAS,MAC3B,kBAAC,EAAiB,MAAlB;CACM;CACL,WAAW,EACV,gRACA,CACD;CACA,GAAI;AACJ,CAAA,CACD;AACD,EAAY,cAAc,EAAiB,KAAK;AAIhD,SAAgB,EAAgB,EAAE,cAAW,GAAG,KAA+B;CAC9E,OACC,kBAAC,QAAD;EACC,WAAW,EAAG,gEAAgE,CAAS;EACvF,GAAI;CACJ,CAAA;AAEH;AACA,EAAgB,cAAc"}
|
|
1
|
+
{"version":3,"file":"command-palette.js","names":["Command","CommandPrimitive","React","Command$1","props","Command","cn","className","CommandPaletteTrigger","DialogTrigger","CommandPalette","kids","children","triggers","child","content","Dialog","DialogContent","DialogTitle","shouldFilter","CommandInput","Search","measureCommandItem","left","top","node","item","root","CommandList","listRef","useSelectionIndicator","state","style","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"sources":["../../src/components/command-palette.tsx"],"sourcesContent":["import type * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport type { DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { useSelectionIndicator } from \"../utils/selection-indicator\";\nimport { Dialog, DialogContent, DialogTitle, DialogTrigger } from \"./dialog\";\n\nconst Command = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex min-h-0 w-full flex-col overflow-hidden rounded-basalt-md bg-basalt-popover text-basalt-popover-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nexport interface CommandPaletteProps\n\textends Omit<DialogProps, \"open\" | \"defaultOpen\" | \"onOpenChange\" | \"children\" | \"modal\"> {\n\t/**\n\t * Command palette structure elements, including CommandPaletteTrigger and inner command items.\n\t * Note: Triggers must be direct children of CommandPalette (child.type === CommandPaletteTrigger)\n\t * to be separated from modal dialog content. Wrapping triggers in Fragments or HOCs will cause\n\t * them to be treated as modal content.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * The controlled open state of the command palette dialog.\n\t */\n\topen?: boolean;\n\t/**\n\t * The uncontrolled initial open state of the command palette dialog.\n\t * @default false\n\t */\n\tdefaultOpen?: boolean;\n\t/**\n\t * Called when the open state changes.\n\t */\n\tonOpenChange?: (open: boolean) => void;\n\t/**\n\t * Filter items as the query changes.\n\t * @default true\n\t */\n\tshouldFilter?: boolean;\n\t/**\n\t * The modality of the dialog. When set to true, interaction with outside elements\n\t * will be disabled and only dialog content will be visible to screen readers.\n\t * @default true\n\t */\n\tmodal?: boolean;\n}\n\ntype RadixDialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;\n\nexport interface CommandPaletteTriggerProps extends Omit<RadixDialogTriggerProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * CommandPaletteTrigger is an alias for DialogTrigger; forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixDialogTriggerProps[\"asChild\"];\n}\n\nexport const CommandPaletteTrigger = DialogTrigger;\n\nexport function CommandPalette({ children, shouldFilter, ...props }: CommandPaletteProps) {\n\tconst kids = React.Children.toArray(children);\n\tconst triggers = kids.filter(\n\t\t(child) => React.isValidElement(child) && child.type === CommandPaletteTrigger,\n\t);\n\tconst content = kids.filter(\n\t\t(child) => !(React.isValidElement(child) && child.type === CommandPaletteTrigger),\n\t);\n\treturn (\n\t\t<Dialog {...props}>\n\t\t\t{triggers}\n\t\t\t<DialogContent\n\t\t\t\tsize=\"lg\"\n\t\t\t\taria-describedby={undefined}\n\t\t\t\tclassName=\"flex flex-col overflow-hidden bg-basalt-popover p-0 shadow-lg\"\n\t\t\t>\n\t\t\t\t<DialogTitle className=\"sr-only\">Command Palette</DialogTitle>\n\t\t\t\t<Command\n\t\t\t\t\tlabel=\"Command Palette\"\n\t\t\t\t\t{...(shouldFilter !== undefined && { shouldFilter })}\n\t\t\t\t\tclassName=\"[&_[cmdk-group-heading]]:px-basalt-space-lg [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-basalt-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-basalt-5 [&_[cmdk-input-wrapper]_svg]:w-basalt-5 [&_[cmdk-input]]:min-h-basalt-control [&_[cmdk-item]]:px-basalt-space-lg [&_[cmdk-item]]:py-basalt-space-md [&_[cmdk-item]_svg]:h-basalt-4 [&_[cmdk-item]_svg]:w-basalt-4\"\n\t\t\t\t>\n\t\t\t\t\t{content}\n\t\t\t\t</Command>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n}\n\ntype RadixCommandInputProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>;\n\nexport interface CommandInputProps\n\textends Omit<RadixCommandInputProps, \"value\" | \"onValueChange\" | \"asChild\"> {\n\t/**\n\t * Optional controlled state for the search input value.\n\t * Note: Underlying cmdk input excludes standard onChange/type props in favor of value/onValueChange.\n\t */\n\tvalue?: RadixCommandInputProps[\"value\"];\n\t/**\n\t * Event handler called when the search value changes.\n\t */\n\tonValueChange?: RadixCommandInputProps[\"onValueChange\"];\n\t/**\n\t * Change the default rendered input element to the child element, merging props and behavior.\n\t * CommandInput forwards ref to HTMLInputElement and inherits native input attributes (excluding onChange/type).\n\t * Note: When aria-label is omitted, defaults to placeholder if string, or \"Command Palette\".\n\t * @default false\n\t */\n\tasChild?: RadixCommandInputProps[\"asChild\"];\n}\n\nexport const CommandInput = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Input>,\n\tCommandInputProps\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tclassName=\"flex shrink-0 items-center border-b border-basalt-border px-basalt-space-lg\"\n\t\tcmdk-input-wrapper=\"\"\n\t>\n\t\t<Search\n\t\t\tclassName=\"mr-basalt-space-lg size-basalt-icon-lg shrink-0 opacity-50\"\n\t\t\taria-hidden=\"true\"\n\t\t/>\n\t\t<CommandPrimitive.Input\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"basalt-action flex min-w-0 w-full rounded-basalt-md bg-transparent outline-hidden ring-0 shadow-none placeholder:text-basalt-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t\taria-label={\n\t\t\t\tprops[\"aria-label\"] ??\n\t\t\t\t(typeof props.placeholder === \"string\" ? props.placeholder : \"Command Palette\")\n\t\t\t}\n\t\t/>\n\t</div>\n));\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\ntype RadixCommandListProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>;\n\nexport interface CommandListProps extends Omit<RadixCommandListProps, \"label\" | \"asChild\"> {\n\t/**\n\t * Accessible label for this list of suggestions. Not shown visibly.\n\t * @default \"Suggestions\"\n\t */\n\tlabel?: RadixCommandListProps[\"label\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandList forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCommandListProps[\"asChild\"];\n}\n\nfunction measureCommandItem(item: HTMLElement, root: HTMLElement) {\n\tlet left = 0;\n\tlet top = 0;\n\tfor (\n\t\tlet node: HTMLElement | null = item;\n\t\tnode && node !== root;\n\t\tnode = node.offsetParent as HTMLElement | null\n\t) {\n\t\tleft += node.offsetLeft;\n\t\ttop += node.offsetTop;\n\t}\n\treturn { left, top, width: item.offsetWidth, height: item.offsetHeight };\n}\n\nexport const CommandList = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.List>,\n\tCommandListProps\n>(({ className, style, ...props }, ref) => {\n\tconst { ref: listRef, state } = useSelectionIndicator({\n\t\titemSelector: '[cmdk-item][data-selected=\"true\"]:not([data-disabled=\"true\"])',\n\t\tmapGeometry: measureCommandItem,\n\t\tref,\n\t});\n\treturn (\n\t\t<CommandPrimitive.List\n\t\t\tref={listRef}\n\t\t\tclassName={cn(\n\t\t\t\t\"basalt-command-list relative isolate min-h-0 max-h-[18.75rem] overflow-y-auto overflow-x-hidden p-basalt-menu-inset\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t\tdata-basalt-command-animated={state.animated}\n\t\t\tstyle={\n\t\t\t\t{\n\t\t\t\t\t\"--basalt-command-left\": `${state.left}px`,\n\t\t\t\t\t\"--basalt-command-top\": `${state.top}px`,\n\t\t\t\t\t\"--basalt-command-width\": `${state.visible ? state.width : 0}px`,\n\t\t\t\t\t\"--basalt-command-height\": `${state.visible ? state.height : 0}px`,\n\t\t\t\t\t...style,\n\t\t\t\t} as React.CSSProperties\n\t\t\t}\n\t\t/>\n\t);\n});\nCommandList.displayName = CommandPrimitive.List.displayName;\n\ntype RadixCommandEmptyProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>;\n\nexport interface CommandEmptyProps extends Omit<RadixCommandEmptyProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandEmpty forwards ref to HTMLDivElement and inherits native div attributes.\n\t * Note: cmdk Empty does not support forceMount.\n\t * @default false\n\t */\n\tasChild?: RadixCommandEmptyProps[\"asChild\"];\n}\n\nexport const CommandEmpty = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Empty>,\n\tCommandEmptyProps\n>((props, ref) => (\n\t<CommandPrimitive.Empty\n\t\tref={ref}\n\t\tclassName=\"py-basalt-space-lg text-center text-basalt-base text-basalt-muted-foreground\"\n\t\t{...props}\n\t/>\n));\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\ntype RadixCommandGroupProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>;\n\nexport interface CommandGroupProps\n\textends Omit<RadixCommandGroupProps, \"heading\" | \"value\" | \"forceMount\" | \"asChild\"> {\n\t/**\n\t * Heading to render for this group of command items.\n\t */\n\theading?: RadixCommandGroupProps[\"heading\"];\n\t/**\n\t * Unique value identifying this group. If no heading is provided, value must be specified.\n\t */\n\tvalue?: RadixCommandGroupProps[\"value\"];\n\t/**\n\t * Whether this group is forcibly rendered regardless of filtering state.\n\t */\n\tforceMount?: RadixCommandGroupProps[\"forceMount\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandGroup forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCommandGroupProps[\"asChild\"];\n}\n\nexport const CommandGroup = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Group>,\n\tCommandGroupProps\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Group\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"overflow-hidden py-basalt-space-sm text-basalt-foreground [&_[cmdk-group-heading]]:px-basalt-space-lg [&_[cmdk-group-heading]]:py-basalt-space-md [&_[cmdk-group-heading]]:text-basalt-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-basalt-muted-foreground\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\ntype RadixCommandSeparatorProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>;\n\nexport interface CommandSeparatorProps\n\textends Omit<RadixCommandSeparatorProps, \"alwaysRender\" | \"asChild\"> {\n\t/**\n\t * Whether this separator should always be rendered. Useful when automatic filtering is disabled.\n\t * When false (default), visible only when the search query is empty.\n\t */\n\talwaysRender?: RadixCommandSeparatorProps[\"alwaysRender\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandSeparator forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCommandSeparatorProps[\"asChild\"];\n}\n\nexport const CommandSeparator = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Separator>,\n\tCommandSeparatorProps\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-basalt-space-sm h-px bg-basalt-border\", className)}\n\t\t{...props}\n\t/>\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\ntype RadixCommandItemProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>;\n\nexport interface CommandItemProps\n\textends Omit<\n\t\tRadixCommandItemProps,\n\t\t\"disabled\" | \"onSelect\" | \"value\" | \"keywords\" | \"forceMount\" | \"asChild\"\n\t> {\n\t/**\n\t * Whether this item is currently disabled from selection.\n\t * @default false\n\t */\n\tdisabled?: RadixCommandItemProps[\"disabled\"];\n\t/**\n\t * Event handler called when this item is selected via click or keyboard.\n\t * Note: cmdk passes the item's resolved value string `(value: string) => void`,\n\t * not a standard DOM SelectEvent.\n\t */\n\tonSelect?: RadixCommandItemProps[\"onSelect\"];\n\t/**\n\t * Unique value identifying this item during filtering and selection.\n\t * Inferred from children/textContent if omitted.\n\t */\n\tvalue?: RadixCommandItemProps[\"value\"];\n\t/**\n\t * Optional additional keywords matched during filtering.\n\t */\n\tkeywords?: RadixCommandItemProps[\"keywords\"];\n\t/**\n\t * Whether this item is forcibly rendered regardless of query filtering.\n\t * Inherits forceMount from parent CommandGroup when omitted.\n\t */\n\tforceMount?: RadixCommandItemProps[\"forceMount\"];\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * CommandItem forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixCommandItemProps[\"asChild\"];\n}\n\nexport const CommandItem = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Item>,\n\tCommandItemProps\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative z-10 flex cursor-default items-center rounded-basalt-sm px-basalt-menu-x py-basalt-menu-y text-basalt-base leading-basalt-row outline-hidden select-none data-[disabled=true]:pointer-events-none data-[selected=true]:text-basalt-accent-foreground data-[disabled=true]:opacity-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nexport interface CommandShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nexport function CommandShortcut({ className, ...props }: CommandShortcutProps) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-basalt-sm tracking-widest text-basalt-muted-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\nCommandShortcut.displayName = \"CommandShortcut\";\n"],"mappings":"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"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type AlertDialogContentProps } from "./alert-dialog.js";
|
|
2
3
|
export type ConfirmDialogVariant = "default" | "destructive";
|
|
3
4
|
export interface ConfirmDialogProps {
|
|
4
5
|
/** Whether the confirmation dialog is shown. */
|
|
5
6
|
open: boolean;
|
|
6
7
|
/** Called when the dialog requests to open or close. */
|
|
7
8
|
onOpenChange: (open: boolean) => void;
|
|
9
|
+
/** Runs after the close focus trap releases. Prevent default to focus a replacement control. */
|
|
10
|
+
onCloseAutoFocus?: AlertDialogContentProps["onCloseAutoFocus"];
|
|
8
11
|
/** Called once when the user confirms. The dialog does not close itself; caller manages loading and asynchronous errors. */
|
|
9
12
|
onConfirm: () => void | Promise<void>;
|
|
10
13
|
/** The dialog title. */
|
|
@@ -52,5 +55,5 @@ export interface UseConfirmResult {
|
|
|
52
55
|
confirm: (options: UseConfirmOptions) => Promise<boolean>;
|
|
53
56
|
dialogProps: ConfirmDialogProps;
|
|
54
57
|
}
|
|
55
|
-
export declare function ConfirmDialog({ cancelLabel, confirmLabel, description, loading, onConfirm, onOpenChange, open, title, trigger, variant, }: ConfirmDialogProps): React.JSX.Element;
|
|
58
|
+
export declare function ConfirmDialog({ cancelLabel, confirmLabel, description, loading, onConfirm, onCloseAutoFocus, onOpenChange, open, title, trigger, variant, }: ConfirmDialogProps): React.JSX.Element;
|
|
56
59
|
export declare function useConfirm(): UseConfirmResult;
|
|
@@ -5,37 +5,39 @@ import * as c from "@radix-ui/react-alert-dialog";
|
|
|
5
5
|
import * as l from "react";
|
|
6
6
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/confirm-dialog.tsx
|
|
8
|
-
function f({ cancelLabel: f = "Cancel", confirmLabel: p = "Confirm", description: m, loading: h = !1, onConfirm: g,
|
|
9
|
-
let
|
|
10
|
-
|
|
8
|
+
function f({ cancelLabel: f = "Cancel", confirmLabel: p = "Confirm", description: m, loading: h = !1, onConfirm: g, onCloseAutoFocus: _, onOpenChange: v, open: y, title: b, trigger: x, variant: S = "default" }) {
|
|
9
|
+
let C = l.useRef(null), w = l.useRef(null), T = l.useRef(null), E = l.useRef(null), D = l.useCallback(() => {
|
|
10
|
+
C.current?.isConnected ? C.current.focus() : E.current?.isConnected && E.current.focus(), E.current = null;
|
|
11
11
|
}, []);
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
}, [v]), /* @__PURE__ */ d(t, {
|
|
15
|
-
open: v,
|
|
12
|
+
return /* @__PURE__ */ d(t, {
|
|
13
|
+
open: y,
|
|
16
14
|
onOpenChange: (e) => {
|
|
17
|
-
(!h || e) &&
|
|
15
|
+
(!h || e) && v(e);
|
|
18
16
|
},
|
|
19
|
-
children: [l.isValidElement(
|
|
20
|
-
ref:
|
|
17
|
+
children: [l.isValidElement(x) ? /* @__PURE__ */ u(s, {
|
|
18
|
+
ref: C,
|
|
21
19
|
asChild: !0,
|
|
22
|
-
children:
|
|
20
|
+
children: x
|
|
23
21
|
}) : null, /* @__PURE__ */ d(n, {
|
|
24
|
-
ref:
|
|
22
|
+
ref: w,
|
|
25
23
|
onOpenAutoFocus: (e) => {
|
|
26
|
-
if (e.preventDefault(), !E.current?.isConnected && document.activeElement instanceof HTMLElement && !
|
|
27
|
-
|
|
24
|
+
if (e.preventDefault(), !E.current?.isConnected && document.activeElement instanceof HTMLElement && !w.current?.contains(document.activeElement) && (E.current = document.activeElement), T.current && !T.current.disabled) {
|
|
25
|
+
T.current.focus();
|
|
28
26
|
return;
|
|
29
27
|
}
|
|
30
|
-
|
|
28
|
+
w.current?.focus();
|
|
31
29
|
},
|
|
32
30
|
onCloseAutoFocus: (e) => {
|
|
31
|
+
if (_?.(e), e.defaultPrevented) {
|
|
32
|
+
E.current = null;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
33
35
|
e.preventDefault(), D();
|
|
34
36
|
},
|
|
35
|
-
children: [/* @__PURE__ */ d(a, { children: [/* @__PURE__ */ u(o, { children:
|
|
37
|
+
children: [/* @__PURE__ */ d(a, { children: [/* @__PURE__ */ u(o, { children: b }), /* @__PURE__ */ u(r, { children: m })] }), /* @__PURE__ */ d(i, { children: [/* @__PURE__ */ u(c.Cancel, {
|
|
36
38
|
asChild: !0,
|
|
37
39
|
children: /* @__PURE__ */ u(e, {
|
|
38
|
-
ref:
|
|
40
|
+
ref: T,
|
|
39
41
|
disabled: h,
|
|
40
42
|
variant: "outline",
|
|
41
43
|
children: f
|
|
@@ -44,7 +46,7 @@ function f({ cancelLabel: f = "Cancel", confirmLabel: p = "Confirm", description
|
|
|
44
46
|
asChild: !0,
|
|
45
47
|
children: /* @__PURE__ */ u(e, {
|
|
46
48
|
loading: h,
|
|
47
|
-
variant:
|
|
49
|
+
variant: S,
|
|
48
50
|
onClick: (e) => {
|
|
49
51
|
e.preventDefault(), h || g();
|
|
50
52
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-dialog.js","names":[],"sources":["../../src/components/confirm-dialog.tsx"],"sourcesContent":["import * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\nimport {\n\tAlertDialog,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"./alert-dialog\";\nimport { Button } from \"./button\";\n\nexport type ConfirmDialogVariant = \"default\" | \"destructive\";\n\nexport interface ConfirmDialogProps {\n\t/** Whether the confirmation dialog is shown. */\n\topen: boolean;\n\t/** Called when the dialog requests to open or close. */\n\tonOpenChange: (open: boolean) => void;\n\t/** Called once when the user confirms. The dialog does not close itself; caller manages loading and asynchronous errors. */\n\tonConfirm: () => void | Promise<void>;\n\t/** The dialog title. */\n\ttitle: React.ReactNode;\n\t/** Supporting copy that describes the action. */\n\tdescription: React.ReactNode;\n\t/**\n\t * Label for the confirm button.\n\t * @default \"Confirm\"\n\t */\n\tconfirmLabel?: React.ReactNode;\n\t/**\n\t * Label for the cancel button.\n\t * @default \"Cancel\"\n\t */\n\tcancelLabel?: React.ReactNode;\n\t/**\n\t * Appearance of the confirm button.\n\t * @default \"default\"\n\t */\n\tvariant?: ConfirmDialogVariant;\n\t/**\n\t * Disable both actions and ignore close requests while work is pending.\n\t * @default false\n\t */\n\tloading?: boolean;\n\t/**\n\t * Control that opens the dialog. When set, closing restores focus to it.\n\t */\n\ttrigger?: React.ReactElement;\n}\n\nexport interface UseConfirmOptions {\n\t/** The dialog title. */\n\ttitle: React.ReactNode;\n\t/** Supporting copy that describes the action. */\n\tdescription: React.ReactNode;\n\t/** Label for the confirm button. */\n\tconfirmLabel?: React.ReactNode;\n\t/** Label for the cancel button. */\n\tcancelLabel?: React.ReactNode;\n\t/** Appearance of the confirm button. */\n\tvariant?: ConfirmDialogVariant;\n}\n\nexport interface UseConfirmResult {\n\tconfirm: (options: UseConfirmOptions) => Promise<boolean>;\n\tdialogProps: ConfirmDialogProps;\n}\n\nexport function ConfirmDialog({\n\tcancelLabel = \"Cancel\",\n\tconfirmLabel = \"Confirm\",\n\tdescription,\n\tloading = false,\n\tonConfirm,\n\tonOpenChange,\n\topen,\n\ttitle,\n\ttrigger,\n\tvariant = \"default\",\n}: ConfirmDialogProps) {\n\tconst triggerRef = React.useRef<HTMLButtonElement>(null);\n\tconst panelRef = React.useRef<HTMLDivElement>(null);\n\tconst cancelRef = React.useRef<HTMLButtonElement>(null);\n\tconst
|
|
1
|
+
{"version":3,"file":"confirm-dialog.js","names":["AlertDialogPrimitive","React","ConfirmDialog","triggerRef","panelRef","cancelRef","openerRef","restoreFocus","AlertDialog","next","onOpenChange","trigger","AlertDialogTrigger","AlertDialogContent","event","onCloseAutoFocus","AlertDialogHeader","AlertDialogTitle","title","AlertDialogDescription","description","AlertDialogFooter","Button","loading","cancelLabel","onConfirm","confirmLabel","useConfirm","open","setOpen","options","setOptions","resolverRef","settle","resolve","value"],"sources":["../../src/components/confirm-dialog.tsx"],"sourcesContent":["import * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\nimport {\n\tAlertDialog,\n\tAlertDialogContent,\n\ttype AlertDialogContentProps,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n} from \"./alert-dialog\";\nimport { Button } from \"./button\";\n\nexport type ConfirmDialogVariant = \"default\" | \"destructive\";\n\nexport interface ConfirmDialogProps {\n\t/** Whether the confirmation dialog is shown. */\n\topen: boolean;\n\t/** Called when the dialog requests to open or close. */\n\tonOpenChange: (open: boolean) => void;\n\t/** Runs after the close focus trap releases. Prevent default to focus a replacement control. */\n\tonCloseAutoFocus?: AlertDialogContentProps[\"onCloseAutoFocus\"];\n\t/** Called once when the user confirms. The dialog does not close itself; caller manages loading and asynchronous errors. */\n\tonConfirm: () => void | Promise<void>;\n\t/** The dialog title. */\n\ttitle: React.ReactNode;\n\t/** Supporting copy that describes the action. */\n\tdescription: React.ReactNode;\n\t/**\n\t * Label for the confirm button.\n\t * @default \"Confirm\"\n\t */\n\tconfirmLabel?: React.ReactNode;\n\t/**\n\t * Label for the cancel button.\n\t * @default \"Cancel\"\n\t */\n\tcancelLabel?: React.ReactNode;\n\t/**\n\t * Appearance of the confirm button.\n\t * @default \"default\"\n\t */\n\tvariant?: ConfirmDialogVariant;\n\t/**\n\t * Disable both actions and ignore close requests while work is pending.\n\t * @default false\n\t */\n\tloading?: boolean;\n\t/**\n\t * Control that opens the dialog. When set, closing restores focus to it.\n\t */\n\ttrigger?: React.ReactElement;\n}\n\nexport interface UseConfirmOptions {\n\t/** The dialog title. */\n\ttitle: React.ReactNode;\n\t/** Supporting copy that describes the action. */\n\tdescription: React.ReactNode;\n\t/** Label for the confirm button. */\n\tconfirmLabel?: React.ReactNode;\n\t/** Label for the cancel button. */\n\tcancelLabel?: React.ReactNode;\n\t/** Appearance of the confirm button. */\n\tvariant?: ConfirmDialogVariant;\n}\n\nexport interface UseConfirmResult {\n\tconfirm: (options: UseConfirmOptions) => Promise<boolean>;\n\tdialogProps: ConfirmDialogProps;\n}\n\nexport function ConfirmDialog({\n\tcancelLabel = \"Cancel\",\n\tconfirmLabel = \"Confirm\",\n\tdescription,\n\tloading = false,\n\tonConfirm,\n\tonCloseAutoFocus,\n\tonOpenChange,\n\topen,\n\ttitle,\n\ttrigger,\n\tvariant = \"default\",\n}: ConfirmDialogProps) {\n\tconst triggerRef = React.useRef<HTMLButtonElement>(null);\n\tconst panelRef = React.useRef<HTMLDivElement>(null);\n\tconst cancelRef = React.useRef<HTMLButtonElement>(null);\n\tconst openerRef = React.useRef<HTMLElement | null>(null);\n\n\tconst restoreFocus = React.useCallback(() => {\n\t\tif (triggerRef.current?.isConnected) {\n\t\t\ttriggerRef.current.focus();\n\t\t} else if (openerRef.current?.isConnected) {\n\t\t\topenerRef.current.focus();\n\t\t}\n\t\topenerRef.current = null;\n\t}, []);\n\n\treturn (\n\t\t<AlertDialog\n\t\t\topen={open}\n\t\t\tonOpenChange={(next) => {\n\t\t\t\tif (loading && !next) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tonOpenChange(next);\n\t\t\t}}\n\t\t>\n\t\t\t{React.isValidElement(trigger) ? (\n\t\t\t\t<AlertDialogTrigger ref={triggerRef} asChild>\n\t\t\t\t\t{trigger}\n\t\t\t\t</AlertDialogTrigger>\n\t\t\t) : null}\n\t\t\t<AlertDialogContent\n\t\t\t\tref={panelRef}\n\t\t\t\tonOpenAutoFocus={(event) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (\n\t\t\t\t\t\t!openerRef.current?.isConnected &&\n\t\t\t\t\t\tdocument.activeElement instanceof HTMLElement &&\n\t\t\t\t\t\t!panelRef.current?.contains(document.activeElement)\n\t\t\t\t\t) {\n\t\t\t\t\t\topenerRef.current = document.activeElement;\n\t\t\t\t\t}\n\t\t\t\t\tif (cancelRef.current && !cancelRef.current.disabled) {\n\t\t\t\t\t\tcancelRef.current.focus();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tpanelRef.current?.focus();\n\t\t\t\t}}\n\t\t\t\tonCloseAutoFocus={(event) => {\n\t\t\t\t\tonCloseAutoFocus?.(event);\n\t\t\t\t\tif (event.defaultPrevented) {\n\t\t\t\t\t\topenerRef.current = null;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\trestoreFocus();\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<AlertDialogHeader>\n\t\t\t\t\t<AlertDialogTitle>{title}</AlertDialogTitle>\n\t\t\t\t\t<AlertDialogDescription>{description}</AlertDialogDescription>\n\t\t\t\t</AlertDialogHeader>\n\t\t\t\t<AlertDialogFooter>\n\t\t\t\t\t<AlertDialogPrimitive.Cancel asChild>\n\t\t\t\t\t\t<Button ref={cancelRef} disabled={loading} variant=\"outline\">\n\t\t\t\t\t\t\t{cancelLabel}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</AlertDialogPrimitive.Cancel>\n\t\t\t\t\t<AlertDialogPrimitive.Action asChild>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tloading={loading}\n\t\t\t\t\t\t\tvariant={variant}\n\t\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\tif (!loading) {\n\t\t\t\t\t\t\t\t\tvoid onConfirm();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{confirmLabel}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</AlertDialogPrimitive.Action>\n\t\t\t\t</AlertDialogFooter>\n\t\t\t</AlertDialogContent>\n\t\t</AlertDialog>\n\t);\n}\n\nexport function useConfirm(): UseConfirmResult {\n\tconst [open, setOpen] = React.useState(false);\n\tconst [options, setOptions] = React.useState<UseConfirmOptions>({\n\t\ttitle: \"\",\n\t\tdescription: \"\",\n\t});\n\tconst resolverRef = React.useRef<((value: boolean) => void) | null>(null);\n\n\tconst settle = React.useCallback((value: boolean) => {\n\t\tconst resolve = resolverRef.current;\n\t\tresolverRef.current = null;\n\t\tresolve?.(value);\n\t}, []);\n\n\tReact.useEffect(() => {\n\t\treturn () => {\n\t\t\tsettle(false);\n\t\t};\n\t}, [settle]);\n\n\tconst confirm = React.useCallback(\n\t\t(next: UseConfirmOptions) => {\n\t\t\tsettle(false);\n\t\t\tsetOptions(next);\n\t\t\tsetOpen(true);\n\t\t\treturn new Promise<boolean>((resolve) => {\n\t\t\t\tresolverRef.current = resolve;\n\t\t\t});\n\t\t},\n\t\t[settle],\n\t);\n\n\treturn {\n\t\tconfirm,\n\t\tdialogProps: {\n\t\t\topen,\n\t\t\ttitle: options.title,\n\t\t\tdescription: options.description,\n\t\t\tconfirmLabel: options.confirmLabel,\n\t\t\tcancelLabel: options.cancelLabel,\n\t\t\tvariant: options.variant,\n\t\t\tonOpenChange: (next) => {\n\t\t\t\tsetOpen(next);\n\t\t\t\tif (!next) {\n\t\t\t\t\tsettle(false);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonConfirm: () => {\n\t\t\t\tsettle(true);\n\t\t\t\tsetOpen(false);\n\t\t\t},\n\t\t},\n\t};\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ContextChunk } from "../models/context-cards.js";
|
|
2
|
+
export type { ContextChunk } from "../models/context-cards.js";
|
|
3
|
+
export interface ContextCardsProps {
|
|
4
|
+
/** Retrieved chunks with stable IDs and caller-owned source metadata. */
|
|
5
|
+
chunks: readonly ContextChunk[];
|
|
6
|
+
/** Heading for the chunk list. @default "All chunks" */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Total available chunks, when displaying a subset. Never smaller than the visible count. */
|
|
9
|
+
totalCount?: number;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
error?: string;
|
|
12
|
+
onRetry?: () => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function ContextCards({ chunks, title, totalCount, loading, error, onRetry, className, }: ContextCardsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../utils/cn.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { Badge as n } from "./badge.js";
|
|
5
|
+
import { SkeletonLine as r } from "./skeleton-line.js";
|
|
6
|
+
import { LayerCard as i } from "./layer-card.js";
|
|
7
|
+
import { useContextCardsViewModel as a } from "../viewmodels/use-context-cards.js";
|
|
8
|
+
import { useId as o } from "react";
|
|
9
|
+
import { ExternalLink as s, FileText as c, TextAlignStart as l } from "lucide-react";
|
|
10
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
11
|
+
//#region src/components/context-cards.tsx
|
|
12
|
+
function f({ chunks: f, title: p = "All chunks", totalCount: m, loading: h = !1, error: g, onRetry: _, className: v }) {
|
|
13
|
+
let y = a(f, m), b = o();
|
|
14
|
+
return /* @__PURE__ */ d("section", {
|
|
15
|
+
"aria-labelledby": b,
|
|
16
|
+
"aria-busy": h || void 0,
|
|
17
|
+
className: e("basalt-ui min-w-0 space-y-basalt-content-gap leading-[var(--basalt-line-body)]", v),
|
|
18
|
+
children: [/* @__PURE__ */ d("header", {
|
|
19
|
+
className: "flex items-center gap-basalt-content-gap",
|
|
20
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
21
|
+
id: b,
|
|
22
|
+
className: "text-basalt-code font-medium",
|
|
23
|
+
children: p
|
|
24
|
+
}), /* @__PURE__ */ u(n, {
|
|
25
|
+
variant: "secondary",
|
|
26
|
+
className: "tabular-nums leading-[var(--basalt-line-compact)]",
|
|
27
|
+
children: y.count
|
|
28
|
+
})]
|
|
29
|
+
}), h ? /* @__PURE__ */ u(i, {
|
|
30
|
+
padding: "sm",
|
|
31
|
+
children: /* @__PURE__ */ d("div", {
|
|
32
|
+
role: "status",
|
|
33
|
+
"aria-label": "Loading context",
|
|
34
|
+
className: "space-y-basalt-space-lg",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ u(r, {}),
|
|
37
|
+
/* @__PURE__ */ u(r, {}),
|
|
38
|
+
/* @__PURE__ */ u(r, {})
|
|
39
|
+
]
|
|
40
|
+
})
|
|
41
|
+
}) : g ? /* @__PURE__ */ d(i, {
|
|
42
|
+
padding: "sm",
|
|
43
|
+
children: [/* @__PURE__ */ u("p", {
|
|
44
|
+
role: "alert",
|
|
45
|
+
className: "text-basalt-base text-basalt-danger",
|
|
46
|
+
children: g
|
|
47
|
+
}), _ && /* @__PURE__ */ u(t, {
|
|
48
|
+
size: "sm",
|
|
49
|
+
variant: "outline",
|
|
50
|
+
className: "mt-basalt-space-lg",
|
|
51
|
+
onClick: _,
|
|
52
|
+
children: "Try again"
|
|
53
|
+
})]
|
|
54
|
+
}) : y.chunks.length === 0 ? /* @__PURE__ */ u("p", {
|
|
55
|
+
role: "status",
|
|
56
|
+
className: "py-basalt-space-lg text-basalt-base text-basalt-muted-foreground",
|
|
57
|
+
children: "No context retrieved"
|
|
58
|
+
}) : /* @__PURE__ */ u("ul", {
|
|
59
|
+
className: "space-y-basalt-content-gap",
|
|
60
|
+
children: y.chunks.map((e) => /* @__PURE__ */ u("li", {
|
|
61
|
+
className: "basalt-agent-reveal",
|
|
62
|
+
style: {
|
|
63
|
+
animationDelay: `${e.delay}ms`,
|
|
64
|
+
animationFillMode: "both"
|
|
65
|
+
},
|
|
66
|
+
children: /* @__PURE__ */ d(i, {
|
|
67
|
+
padding: "none",
|
|
68
|
+
className: "min-w-0 overflow-hidden",
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ d("div", {
|
|
71
|
+
className: "flex flex-wrap items-center justify-between gap-basalt-control-gap border-b border-basalt-border px-basalt-panel-x py-basalt-panel-y",
|
|
72
|
+
children: [/* @__PURE__ */ d("h4", {
|
|
73
|
+
className: "inline-flex min-w-0 items-center gap-basalt-row-gap text-basalt-code leading-[var(--basalt-line-body)] font-medium",
|
|
74
|
+
children: [/* @__PURE__ */ u(l, {
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
className: "size-basalt-icon shrink-0",
|
|
77
|
+
strokeWidth: 1.5
|
|
78
|
+
}), /* @__PURE__ */ u("span", {
|
|
79
|
+
className: "break-words",
|
|
80
|
+
children: e.title
|
|
81
|
+
})]
|
|
82
|
+
}), /* @__PURE__ */ d("span", {
|
|
83
|
+
className: "shrink-0 text-basalt-sm tabular-nums text-basalt-muted-foreground",
|
|
84
|
+
children: [e.characters.toLocaleString("en-US"), " characters"]
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ u("p", {
|
|
88
|
+
className: "whitespace-pre-wrap break-words px-basalt-panel-x py-basalt-panel-y text-basalt-code leading-[var(--basalt-line-body)] text-basalt-muted-foreground",
|
|
89
|
+
children: e.body
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ u("div", {
|
|
92
|
+
className: "flex min-w-0 px-basalt-panel-x pb-basalt-panel-y",
|
|
93
|
+
children: e.href ? /* @__PURE__ */ d("a", {
|
|
94
|
+
href: e.href,
|
|
95
|
+
target: "_blank",
|
|
96
|
+
rel: "noopener noreferrer",
|
|
97
|
+
className: "inline-flex max-w-full items-center gap-basalt-control-gap py-basalt-space-xs text-basalt-sm text-basalt-foreground outline-hidden hover:bg-basalt-hover focus-visible:ring-2 focus-visible:ring-basalt-ring",
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ u(c, {
|
|
100
|
+
"aria-hidden": "true",
|
|
101
|
+
className: "size-basalt-icon shrink-0",
|
|
102
|
+
strokeWidth: 1.5
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ u("span", {
|
|
105
|
+
className: "shrink-0 font-mono text-basalt-xs text-basalt-muted-foreground",
|
|
106
|
+
children: e.source.type
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ u("span", {
|
|
109
|
+
className: "truncate",
|
|
110
|
+
title: e.source.name,
|
|
111
|
+
children: e.source.name
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ u(s, {
|
|
114
|
+
"aria-hidden": "true",
|
|
115
|
+
className: "size-basalt-icon shrink-0",
|
|
116
|
+
strokeWidth: 1.5
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
}) : /* @__PURE__ */ d("span", {
|
|
120
|
+
className: "inline-flex max-w-full items-center gap-basalt-control-gap py-basalt-space-xs text-basalt-sm",
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ u(c, {
|
|
123
|
+
"aria-hidden": "true",
|
|
124
|
+
className: "size-basalt-icon shrink-0",
|
|
125
|
+
strokeWidth: 1.5
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ u("span", {
|
|
128
|
+
className: "shrink-0 font-mono text-basalt-xs text-basalt-muted-foreground",
|
|
129
|
+
children: e.source.type
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ u("span", {
|
|
132
|
+
className: "truncate",
|
|
133
|
+
title: e.source.name,
|
|
134
|
+
children: e.source.name
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
})
|
|
141
|
+
}, e.id))
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
//#endregion
|
|
146
|
+
export { f as ContextCards };
|
|
147
|
+
|
|
148
|
+
//# sourceMappingURL=context-cards.js.map
|