@mcp-b/react-components 0.16.1 → 0.18.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/dist/{AgentActivity-BNUNrP9O.d.ts → AgentActivity-D2SHSGFX.d.ts} +1 -1
- package/dist/{AgentChat-CrlpbvQJ.d.ts → AgentChat-ClxViuUM.d.ts} +4 -29
- package/dist/AgentMessageParts-CyD2UB3V.d.ts +46 -0
- package/dist/AgentToolRunsContext-BVe4stgw.d.ts +21 -0
- package/dist/{Button-FX_hpqxm.d.ts → Button-DLGzHsjc.d.ts} +13 -7
- package/dist/{CodeBlock-BmB4Xaqq.js → CodeBlock-Bfp5PAg3.js} +9 -6
- package/dist/{CodeBlock-BRajW4QU.d.ts → CodeBlock-gV4kZeCI.d.ts} +2 -9
- package/dist/Collapsible-N64ASIQr.d.ts +119 -0
- package/dist/{Combobox-B9Fcd6q-.d.ts → Combobox-CYc37s5l.d.ts} +11 -33
- package/dist/{FileTree-CkVbIMWV.js → FileTree-3zYtrddG.js} +46 -20
- package/dist/{Menu-Bgu-ufb5.d.ts → Menu-L6MZm-7N.d.ts} +15 -56
- package/dist/{Message-BkMdE3bS.js → Message-BXtmfc9Q.js} +13 -20
- package/dist/{ModelSelector-SlJNgwKY.js → ModelSelector-Cqw_qrUG.js} +18 -25
- package/dist/{PromptInput-BWTuXMOD.d.ts → PromptInput-Bdh9pqlo.d.ts} +41 -71
- package/dist/{ResponsiveSidebarShell-Dd9DCcBT.d.ts → ResponsiveSidebarShell-CsAh4NyL.d.ts} +1 -0
- package/dist/{Select-BeEsefzh.d.ts → Select-B_13gg_J.d.ts} +16 -44
- package/dist/{Tabs-3Zc4tb9D.d.ts → Tabs-ColWK-XA.d.ts} +14 -20
- package/dist/{ThinkChat-CzC-zNGA.js → ThinkChat-15EhfvYJ.js} +123 -73
- package/dist/{ThinkChatActivity-BFQnb2ct.d.ts → ThinkChatActivity-Bzot45kX.d.ts} +9 -4
- package/dist/{ThinkChatActivitySummary-BPmu9a-c.d.ts → ThinkChatActivitySummary-D1xOrNrq.d.ts} +1 -1
- package/dist/{ThinkChatContext-C3Eb1Xpi.d.ts → ThinkChatContext-DrsZqdaO.d.ts} +1 -1
- package/dist/ThinkRecoveryNotice-DFIcG9UX.d.ts +19 -0
- package/dist/{Toggle-CAAlNl-M.d.ts → Toggle-JKZ43D5S.d.ts} +2 -2
- package/dist/{ToggleGroup-8hPv-b69.d.ts → ToggleGroup-DNd6cDJZ.d.ts} +4 -5
- package/dist/Workspace-Jez8ffUj.d.ts +274 -0
- package/dist/WorkspaceExplorer-B9dQWNVK.d.ts +32 -0
- package/dist/{WorkspaceFile-DOZkPwzu.d.ts → WorkspaceFile-CzyHnESE.d.ts} +1 -1
- package/dist/{WorkspaceFileView-rSN_yT0L.js → WorkspaceFileView-C68Ub8S8.js} +121 -128
- package/dist/{WorkspaceLink-DIPbXrUM.js → WorkspaceLink-BYYeTQLf.js} +20 -55
- package/dist/{WorkspaceLink-DK1DWMHe.d.ts → WorkspaceLink-O-EBKUJ8.d.ts} +6 -9
- package/dist/class-names-BiMDVpUo.js +14 -0
- package/dist/components/Accordion.d.ts +5 -15
- package/dist/components/Accordion.js +16 -10
- package/dist/components/Activity.d.ts +5 -10
- package/dist/components/Activity.js +2 -2
- package/dist/components/AgentActivity.d.ts +1 -1
- package/dist/components/AgentActivity.js +4 -5
- package/dist/components/AgentActivityPreview.d.ts +9 -9
- package/dist/components/AgentActivityPreview.js +8 -12
- package/dist/components/AgentAttention.d.ts +2 -2
- package/dist/components/AgentAttention.js +1 -1
- package/dist/components/AgentChat.d.ts +2 -2
- package/dist/components/AgentChat.js +113 -218
- package/dist/components/AgentChatMessageEditor.js +3 -3
- package/dist/components/AgentChatTurnError.js +2 -2
- package/dist/components/AgentConnection.js +4 -4
- package/dist/components/AgentMessageParts.d.ts +2 -0
- package/dist/components/AgentMessageParts.js +119 -0
- package/dist/components/AgentToolDetail.d.ts +57 -0
- package/dist/components/AgentToolDetail.js +100 -0
- package/dist/components/AgentToolRunsContext.d.ts +2 -0
- package/dist/components/AgentToolRunsContext.js +16 -0
- package/dist/components/AlertDialog.d.ts +7 -19
- package/dist/components/AlertDialog.js +21 -32
- package/dist/components/AppTopBar.d.ts +28 -8
- package/dist/components/AppTopBar.js +36 -12
- package/dist/components/Approval.d.ts +102 -0
- package/dist/components/Approval.js +227 -0
- package/dist/components/Artifact.d.ts +3 -5
- package/dist/components/Artifact.js +7 -5
- package/dist/components/Autocomplete.d.ts +11 -33
- package/dist/components/Autocomplete.js +23 -30
- package/dist/components/Avatar.d.ts +4 -12
- package/dist/components/Avatar.js +13 -12
- package/dist/components/Badge.js +3 -0
- package/dist/components/BrowserLiveView.js +27 -12
- package/dist/components/BrowserReplay.js +4 -3
- package/dist/components/BrowserRunPanel.js +58 -78
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +14 -16
- package/dist/components/Card.d.ts +7 -8
- package/dist/components/Card.js +19 -10
- package/dist/components/ChainOfThought.d.ts +5 -11
- package/dist/components/ChainOfThought.js +3 -2
- package/dist/components/ChatGptSignInScreen.js +8 -8
- package/dist/components/Checkbox.d.ts +2 -4
- package/dist/components/Checkbox.js +6 -5
- package/dist/components/CheckboxGroup.d.ts +1 -3
- package/dist/components/CheckboxGroup.js +15 -14
- package/dist/components/Checkpoint.d.ts +64 -0
- package/dist/components/Checkpoint.js +63 -0
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.d.ts +1 -1
- package/dist/components/CodexModelSelector.js +2 -2
- package/dist/components/Collapsible.d.ts +1 -124
- package/dist/components/Collapsible.js +7 -10
- package/dist/components/Combobox.d.ts +1 -1
- package/dist/components/Combobox.js +23 -30
- package/dist/components/Commit.d.ts +5 -11
- package/dist/components/Commit.js +6 -5
- package/dist/components/Context.js +1 -1
- package/dist/components/ContextMenu.d.ts +21 -37
- package/dist/components/ContextMenu.js +34 -51
- package/dist/components/Conversation.d.ts +3 -5
- package/dist/components/Conversation.js +5 -4
- package/dist/components/DescriptionListParts.js +1 -1
- package/dist/components/Dialog.d.ts +6 -17
- package/dist/components/Dialog.js +17 -24
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +4 -3
- package/dist/components/Field.d.ts +17 -20
- package/dist/components/Field.js +20 -17
- package/dist/components/Fieldset.d.ts +2 -7
- package/dist/components/Fieldset.js +7 -6
- package/dist/components/FileTree.d.ts +6 -0
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Form.d.ts +1 -4
- package/dist/components/Form.js +3 -2
- package/dist/components/GithubMotionMark.js +1 -1
- package/dist/components/IconButton.d.ts +2 -3
- package/dist/components/IconButton.js +2 -1
- package/dist/components/InlineCitation.d.ts +66 -0
- package/dist/components/InlineCitation.js +142 -0
- package/dist/components/Input.d.ts +1 -4
- package/dist/components/Input.js +3 -2
- package/dist/components/Marker.js +1 -1
- package/dist/components/McpConnectionRequest.js +2 -2
- package/dist/components/McpServerPicker.d.ts +1 -1
- package/dist/components/McpServerPicker.js +6 -5
- package/dist/components/MediaPreviewCard.d.ts +103 -0
- package/dist/components/MediaPreviewCard.js +193 -0
- package/dist/components/Menu.d.ts +1 -1
- package/dist/components/Menu.js +33 -52
- package/dist/components/Menubar.d.ts +22 -43
- package/dist/components/Menubar.js +36 -53
- package/dist/components/Message.d.ts +7 -7
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.d.ts +2 -2
- package/dist/components/MessageScroller.js +6 -5
- package/dist/components/Meter.d.ts +5 -20
- package/dist/components/Meter.js +11 -10
- package/dist/components/ModelSelector.d.ts +6 -9
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.d.ts +11 -33
- package/dist/components/NavigationMenu.js +23 -30
- package/dist/components/NumberField.d.ts +6 -24
- package/dist/components/NumberField.js +13 -12
- package/dist/components/Plan.d.ts +103 -0
- package/dist/components/Plan.js +113 -0
- package/dist/components/Popover.d.ts +9 -36
- package/dist/components/Popover.js +23 -34
- package/dist/components/PreviewCard.d.ts +6 -24
- package/dist/components/PreviewCard.js +13 -24
- package/dist/components/PricingBillingToggle.js +1 -1
- package/dist/components/PricingFAQ.js +1 -1
- package/dist/components/PricingPage.js +2 -1
- package/dist/components/PricingPlanCard.js +5 -4
- package/dist/components/PricingUsageCalculator.js +3 -3
- package/dist/components/Progress.d.ts +3 -8
- package/dist/components/Progress.js +7 -10
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +83 -218
- package/dist/components/Queue.d.ts +7 -17
- package/dist/components/Queue.js +2 -3
- package/dist/components/RadioGroup.d.ts +3 -8
- package/dist/components/RadioGroup.js +7 -10
- package/dist/components/Reasoning.d.ts +4 -8
- package/dist/components/Reasoning.js +3 -6
- package/dist/components/ResizableSidePanel.js +2 -2
- package/dist/components/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/ResponsiveSidebarShell.js +18 -11
- package/dist/components/ScrollArea.d.ts +5 -20
- package/dist/components/ScrollArea.js +12 -10
- package/dist/components/SearchField.d.ts +43 -0
- package/dist/components/SearchField.js +52 -0
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.js +33 -57
- package/dist/components/Separator.d.ts +1 -5
- package/dist/components/Separator.js +3 -6
- package/dist/components/Slider.d.ts +6 -19
- package/dist/components/Slider.js +15 -14
- package/dist/components/Sources.d.ts +4 -9
- package/dist/components/Sources.js +3 -2
- package/dist/components/Stepper.js +16 -9
- package/dist/components/SubagentRunDetails.js +1 -1
- package/dist/components/SubagentRunIndicator.js +2 -2
- package/dist/components/SubagentRunList.d.ts +3 -5
- package/dist/components/SubagentRunList.js +3 -5
- package/dist/components/SubagentRunSelector.d.ts +9 -22
- package/dist/components/SubagentRunSelector.js +29 -31
- package/dist/components/Switch.d.ts +4 -7
- package/dist/components/Switch.js +6 -10
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +21 -18
- package/dist/components/Task.d.ts +4 -9
- package/dist/components/Task.js +4 -3
- package/dist/components/Terminal.d.ts +3 -4
- package/dist/components/Terminal.js +5 -4
- package/dist/components/TestResults.d.ts +4 -9
- package/dist/components/TestResults.js +11 -6
- package/dist/components/Textarea.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +45 -22
- package/dist/components/ThinkChat.js +7 -5
- package/dist/components/ThinkChatActivity.d.ts +2 -2
- package/dist/components/ThinkChatActivity.js +24 -7
- package/dist/components/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/ThinkChatActivitySummary.js +7 -3
- package/dist/components/ThinkChatContext.d.ts +1 -1
- package/dist/components/ThinkChatToolPanels.js +27 -17
- package/dist/components/ThinkExecutionDetail.js +2 -2
- package/dist/components/ThinkExecutionStatus.js +2 -2
- package/dist/components/ThinkExecutionWorkbench.d.ts +30 -8
- package/dist/components/ThinkExecutionWorkbench.js +70 -134
- package/dist/components/ThinkFullApp.d.ts +40 -15
- package/dist/components/ThinkFullApp.js +193 -117
- package/dist/components/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/ThinkFullAppViewSwitch.js +2 -2
- package/dist/components/ThinkPendingApproval.d.ts +60 -0
- package/dist/components/ThinkPendingApproval.js +99 -0
- package/dist/components/ThinkRecoveryNotice.d.ts +2 -0
- package/dist/components/ThinkRecoveryNotice.js +46 -0
- package/dist/components/ThinkRoutine.js +1 -0
- package/dist/components/ThinkRoutineBrowser.d.ts +17 -9
- package/dist/components/ThinkRoutineBrowser.js +37 -44
- package/dist/components/ThinkRoutineDetail.d.ts +5 -2
- package/dist/components/ThinkRoutineDetail.js +4 -4
- package/dist/components/ThinkRoutineForm.d.ts +3 -2
- package/dist/components/ThinkRoutineForm.js +11 -10
- package/dist/components/ThinkRoutineLibrary.d.ts +27 -25
- package/dist/components/ThinkRoutineLibrary.js +104 -80
- package/dist/components/ThinkRoutineRuns.d.ts +3 -2
- package/dist/components/ThinkRoutineRuns.js +31 -24
- package/dist/components/ThinkThreadPicker.d.ts +17 -11
- package/dist/components/ThinkThreadPicker.js +163 -39
- package/dist/components/ThinkThreadShell.d.ts +1 -1
- package/dist/components/Toast.d.ts +7 -28
- package/dist/components/Toast.js +15 -14
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +10 -8
- package/dist/components/ToggleGroup.d.ts +1 -1
- package/dist/components/ToggleGroup.js +21 -26
- package/dist/components/ToolApproval.d.ts +28 -0
- package/dist/components/ToolApproval.js +35 -0
- package/dist/components/ToolInvocation.d.ts +26 -0
- package/dist/components/ToolInvocation.js +72 -0
- package/dist/components/Toolbar.d.ts +6 -24
- package/dist/components/Toolbar.js +13 -12
- package/dist/components/Tooltip.d.ts +11 -10
- package/dist/components/Tooltip.js +17 -11
- package/dist/components/TransitionSurface.d.ts +27 -0
- package/dist/components/TransitionSurface.js +20 -0
- package/dist/components/WebPreview.d.ts +6 -7
- package/dist/components/WebPreview.js +70 -55
- package/dist/components/Workspace.d.ts +2 -2
- package/dist/components/Workspace.js +361 -346
- package/dist/components/WorkspaceBrowser.d.ts +4 -7
- package/dist/components/WorkspaceBrowser.js +16 -26
- package/dist/components/WorkspaceExplorer.d.ts +5 -33
- package/dist/components/WorkspaceExplorer.js +19 -32
- package/dist/components/WorkspaceFile.d.ts +1 -1
- package/dist/components/WorkspaceFileView.d.ts +14 -2
- package/dist/components/WorkspaceFileView.js +1 -1
- package/dist/components/WorkspaceHeader.d.ts +0 -8
- package/dist/components/WorkspaceHeader.js +3 -15
- package/dist/components/WorkspaceLink.d.ts +1 -1
- package/dist/components/WorkspaceLink.js +1 -1
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-DtPMgN7e.d.ts → copy-button-D7aAYA-2.d.ts} +2 -3
- package/dist/{copy-button-Dejn5heL.js → copy-button-DeK6KXEV.js} +3 -2
- package/dist/{icons-CpfUer49.js → icons-CQJ-aMnI.js} +7 -3
- package/dist/{icons-GQd1xF4e.d.ts → icons-CYXmvKlJ.d.ts} +22 -2
- package/dist/navigation-link-Cob7KBlM.js +19 -0
- package/dist/styles/accordion.css +4 -19
- package/dist/styles/activity.css +48 -56
- package/dist/styles/agent-activity-preview.css +6 -0
- package/dist/styles/agent-chat.css +14 -63
- package/dist/styles/agent-connection.css +0 -12
- package/dist/styles/agent-tool-detail.css +54 -0
- package/dist/styles/alert-dialog.css +16 -18
- package/dist/styles/app-top-bar.css +17 -9
- package/dist/styles/approval.css +177 -0
- package/dist/styles/artifact.css +6 -18
- package/dist/styles/autocomplete.css +2 -1
- package/dist/styles/avatar.css +35 -30
- package/dist/styles/badge.css +10 -10
- package/dist/styles/base-ui-motion.css +94 -39
- package/dist/styles/browser-control-overlay.css +0 -1
- package/dist/styles/browser-live-view.css +39 -22
- package/dist/styles/browser-replay.css +1 -1
- package/dist/styles/browser-run-panel.css +13 -6
- package/dist/styles/button.css +36 -33
- package/dist/styles/card.css +5 -6
- package/dist/styles/chain-of-thought.css +22 -24
- package/dist/styles/checkbox.css +18 -5
- package/dist/styles/checkpoint.css +58 -0
- package/dist/styles/codex-model-selector.css +3 -7
- package/dist/styles/collapsible.css +10 -10
- package/dist/styles/combobox.css +4 -3
- package/dist/styles/commit.css +19 -39
- package/dist/styles/composition-motion.css +83 -0
- package/dist/styles/context-menu.css +3 -11
- package/dist/styles/context.css +11 -10
- package/dist/styles/conversation.css +18 -23
- package/dist/styles/dialog.css +15 -15
- package/dist/styles/environment-variables.css +0 -13
- package/dist/styles/field.css +32 -12
- package/dist/styles/file-tree.css +66 -22
- package/dist/styles/form.css +1 -1
- package/dist/styles/index.css +13 -4
- package/dist/styles/inline-citation.css +107 -0
- package/dist/styles/input.css +2 -2
- package/dist/styles/marker.css +14 -13
- package/dist/styles/mcp-server-picker.css +20 -47
- package/dist/styles/media-preview-card.css +160 -0
- package/dist/styles/menu.css +11 -40
- package/dist/styles/menubar.css +12 -19
- package/dist/styles/message-scroller.css +0 -12
- package/dist/styles/message.css +25 -31
- package/dist/styles/meter.css +2 -2
- package/dist/styles/model-selector.css +16 -34
- package/dist/styles/motion-reduction.css +29 -0
- package/dist/styles/navigation-menu.css +14 -30
- package/dist/styles/number-field.css +22 -4
- package/dist/styles/plan.css +132 -0
- package/dist/styles/popover.css +15 -52
- package/dist/styles/preview-card.css +2 -32
- package/dist/styles/progress.css +8 -3
- package/dist/styles/prompt-input.css +76 -269
- package/dist/styles/queue.css +48 -32
- package/dist/styles/radio.css +19 -12
- package/dist/styles/reasoning.css +2 -1
- package/dist/styles/recipes.css +207 -26
- package/dist/styles/resizable-side-panel.css +4 -10
- package/dist/styles/responsive-sidebar-shell.css +32 -34
- package/dist/styles/scroll-area.css +32 -15
- package/dist/styles/search-field.css +21 -0
- package/dist/styles/select.css +19 -12
- package/dist/styles/slider.css +25 -29
- package/dist/styles/sources.css +3 -11
- package/dist/styles/stepper.css +36 -26
- package/dist/styles/subagent-run.css +13 -71
- package/dist/styles/switch.css +32 -29
- package/dist/styles/tabs.css +79 -23
- package/dist/styles/task.css +11 -23
- package/dist/styles/test-results.css +29 -36
- package/dist/styles/theme-mode-control.css +8 -0
- package/dist/styles/think-execution-workbench.css +18 -15
- package/dist/styles/think-full-app.css +51 -100
- package/dist/styles/think-routine-library.css +51 -40
- package/dist/styles/think-thread-picker.css +207 -50
- package/dist/styles/toast.css +48 -34
- package/dist/styles/toggle-group.css +2 -36
- package/dist/styles/toggle.css +29 -5
- package/dist/styles/toolbar.css +25 -27
- package/dist/styles/tooltip.css +2 -32
- package/dist/styles/transition-surface.css +55 -0
- package/dist/styles/utilities.css +31 -0
- package/dist/styles/web-preview.css +0 -21
- package/dist/styles/workspace-explorer.css +104 -99
- package/dist/summarize-tool-input-CqTcGRYy.js +15 -0
- package/dist/think-agent-Cip5KAPj.d.ts +7 -0
- package/dist/utils/codex-model-catalog.d.ts +4 -4
- package/dist/utils/mcp-server-catalog.d.ts +132 -0
- package/dist/utils/mcp-server-catalog.js +90 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/workspace-path-L_KmjRjq.js +26 -0
- package/package.json +14 -9
- package/dist/Workspace-D39LxGvP.d.ts +0 -62
- package/dist/class-names-9UtZwb0J.js +0 -12
- package/dist/components/AppFrame.d.ts +0 -24
- package/dist/components/AppFrame.js +0 -25
- package/dist/components/Shell.d.ts +0 -163
- package/dist/components/Shell.js +0 -137
- package/dist/components/SubagentRun.d.ts +0 -86
- package/dist/components/SubagentRun.js +0 -108
- package/dist/styles/app-frame.css +0 -15
- package/dist/styles/shell.css +0 -122
- package/dist/summarize-tool-input-BUJsENSn.js +0 -12
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/Approval.d.ts
|
|
4
|
+
interface ApprovalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Approval question, preview, and decision controls composed by the application. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/** Presentation-only frame for a human approval request. */
|
|
9
|
+
declare function Approval({
|
|
10
|
+
className,
|
|
11
|
+
ref,
|
|
12
|
+
...props
|
|
13
|
+
}: ApprovalProps & {
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
interface ApprovalHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
17
|
+
/** Question and optional queue position for an approval request. */
|
|
18
|
+
declare function ApprovalHeader({
|
|
19
|
+
className,
|
|
20
|
+
ref,
|
|
21
|
+
...props
|
|
22
|
+
}: ApprovalHeaderProps & {
|
|
23
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
24
|
+
}): React.JSX.Element;
|
|
25
|
+
interface ApprovalQuestionProps extends React.HTMLAttributes<HTMLSpanElement> {}
|
|
26
|
+
/** The request phrased as a human-readable question. */
|
|
27
|
+
declare function ApprovalQuestion({
|
|
28
|
+
className,
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
}: ApprovalQuestionProps & {
|
|
32
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
interface ApprovalCountProps extends React.HTMLAttributes<HTMLSpanElement> {}
|
|
35
|
+
/** Position of the current request in an app-owned approval queue. */
|
|
36
|
+
declare function ApprovalCount({
|
|
37
|
+
className,
|
|
38
|
+
ref,
|
|
39
|
+
...props
|
|
40
|
+
}: ApprovalCountProps & {
|
|
41
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
42
|
+
}): React.JSX.Element;
|
|
43
|
+
interface ApprovalPreviewProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
44
|
+
/** Bounded, read-only preview of the operation being authorized. */
|
|
45
|
+
declare function ApprovalPreview({
|
|
46
|
+
className,
|
|
47
|
+
ref,
|
|
48
|
+
...props
|
|
49
|
+
}: ApprovalPreviewProps & {
|
|
50
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
51
|
+
}): React.JSX.Element;
|
|
52
|
+
interface ApprovalPreviewRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
53
|
+
label?: React.ReactNode;
|
|
54
|
+
}
|
|
55
|
+
/** One labelled value in an approval preview. */
|
|
56
|
+
declare function ApprovalPreviewRow({
|
|
57
|
+
children,
|
|
58
|
+
className,
|
|
59
|
+
label,
|
|
60
|
+
ref,
|
|
61
|
+
...props
|
|
62
|
+
}: ApprovalPreviewRowProps & {
|
|
63
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
64
|
+
}): React.JSX.Element;
|
|
65
|
+
declare function formatApprovalValue(value: unknown): string;
|
|
66
|
+
interface ApprovalInputPreviewProps {
|
|
67
|
+
input: unknown;
|
|
68
|
+
}
|
|
69
|
+
/** Renders unknown upstream input without changing or normalizing its shape. */
|
|
70
|
+
declare function ApprovalInputPreview({
|
|
71
|
+
input
|
|
72
|
+
}: ApprovalInputPreviewProps): React.JSX.Element;
|
|
73
|
+
interface ApprovalDecisionValue {
|
|
74
|
+
approved: boolean;
|
|
75
|
+
reason?: string;
|
|
76
|
+
}
|
|
77
|
+
interface ApprovalDecisionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
78
|
+
/** Presentation callback. Transport adapters supply the upstream operation. */
|
|
79
|
+
onDecision: (decision: ApprovalDecisionValue) => void | PromiseLike<void>;
|
|
80
|
+
/** Dismisses the local presentation without settling the upstream request. */
|
|
81
|
+
onSkip?: () => void;
|
|
82
|
+
/** Accessible subject used by the deny-reason label. */
|
|
83
|
+
subject?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Keyboard-operable approve/deny controls shared by inline and durable adapters.
|
|
87
|
+
* Arrow keys move between approve and deny, `1` returns to approve, and Enter
|
|
88
|
+
* in the reason field submits a denial. Async failures stay visible and are
|
|
89
|
+
* announced politely without coupling this presentation to a transport.
|
|
90
|
+
*/
|
|
91
|
+
declare function ApprovalDecision({
|
|
92
|
+
className,
|
|
93
|
+
onDecision,
|
|
94
|
+
onSkip,
|
|
95
|
+
subject,
|
|
96
|
+
ref,
|
|
97
|
+
...props
|
|
98
|
+
}: ApprovalDecisionProps & {
|
|
99
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
100
|
+
}): React.JSX.Element;
|
|
101
|
+
//#endregion
|
|
102
|
+
export { Approval, ApprovalCount, ApprovalCountProps, ApprovalDecision, ApprovalDecisionProps, ApprovalDecisionValue, ApprovalHeader, ApprovalHeaderProps, ApprovalInputPreview, ApprovalInputPreviewProps, ApprovalPreview, ApprovalPreviewProps, ApprovalPreviewRow, ApprovalPreviewRowProps, ApprovalProps, ApprovalQuestion, ApprovalQuestionProps, formatApprovalValue };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { R as PencilIcon } from "../icons-CQJ-aMnI.js";
|
|
3
|
+
import { Button } from "./Button.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/Approval.tsx
|
|
7
|
+
/** Presentation-only frame for a human approval request. */
|
|
8
|
+
function Approval({ className, ref, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
ref,
|
|
11
|
+
role: "group",
|
|
12
|
+
"data-slot": "approval",
|
|
13
|
+
className: cx("approval", className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/** Question and optional queue position for an approval request. */
|
|
18
|
+
function ApprovalHeader({ className, ref, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("div", {
|
|
20
|
+
ref,
|
|
21
|
+
"data-slot": "approval-header",
|
|
22
|
+
className: cx("approval__header", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/** The request phrased as a human-readable question. */
|
|
27
|
+
function ApprovalQuestion({ className, ref, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx("span", {
|
|
29
|
+
ref,
|
|
30
|
+
"data-slot": "approval-question",
|
|
31
|
+
className: cx("approval__question", className),
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/** Position of the current request in an app-owned approval queue. */
|
|
36
|
+
function ApprovalCount({ className, ref, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx("span", {
|
|
38
|
+
ref,
|
|
39
|
+
"data-slot": "approval-count",
|
|
40
|
+
className: cx("approval__count", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/** Bounded, read-only preview of the operation being authorized. */
|
|
45
|
+
function ApprovalPreview({ className, ref, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("div", {
|
|
47
|
+
ref,
|
|
48
|
+
"data-slot": "approval-preview",
|
|
49
|
+
className: cx("approval__preview", className),
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** One labelled value in an approval preview. */
|
|
54
|
+
function ApprovalPreviewRow({ children, className, label, ref, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
56
|
+
ref,
|
|
57
|
+
"data-slot": "approval-preview-row",
|
|
58
|
+
className: cx("approval__preview-row", className),
|
|
59
|
+
...props,
|
|
60
|
+
children: [
|
|
61
|
+
label !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: "approval__preview-key",
|
|
63
|
+
children: label
|
|
64
|
+
}) : null,
|
|
65
|
+
label !== void 0 && children !== void 0 ? " " : null,
|
|
66
|
+
children
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function formatApprovalValue(value) {
|
|
71
|
+
if (typeof value === "string") return value;
|
|
72
|
+
return JSON.stringify(value) ?? String(value);
|
|
73
|
+
}
|
|
74
|
+
/** Renders unknown upstream input without changing or normalizing its shape. */
|
|
75
|
+
function ApprovalInputPreview({ input }) {
|
|
76
|
+
const entries = input && typeof input === "object" && !Array.isArray(input) ? Object.entries(input) : void 0;
|
|
77
|
+
return /* @__PURE__ */ jsx(ApprovalPreview, { children: entries ? entries.map(([key, value]) => /* @__PURE__ */ jsx(ApprovalPreviewRow, {
|
|
78
|
+
label: key,
|
|
79
|
+
children: formatApprovalValue(value)
|
|
80
|
+
}, key)) : /* @__PURE__ */ jsx(ApprovalPreviewRow, { children: formatApprovalValue(input) }) });
|
|
81
|
+
}
|
|
82
|
+
function getErrorMessage(error) {
|
|
83
|
+
if (error instanceof Error && error.message.trim()) return error.message;
|
|
84
|
+
return "The approval could not be submitted. Try again.";
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Keyboard-operable approve/deny controls shared by inline and durable adapters.
|
|
88
|
+
* Arrow keys move between approve and deny, `1` returns to approve, and Enter
|
|
89
|
+
* in the reason field submits a denial. Async failures stay visible and are
|
|
90
|
+
* announced politely without coupling this presentation to a transport.
|
|
91
|
+
*/
|
|
92
|
+
function ApprovalDecision({ className, onDecision, onSkip, subject = "this action", ref, ...props }) {
|
|
93
|
+
const [selected, setSelected] = React.useState("approve");
|
|
94
|
+
const [reason, setReason] = React.useState("");
|
|
95
|
+
const [busy, setBusy] = React.useState(false);
|
|
96
|
+
const [errorMessage, setErrorMessage] = React.useState("");
|
|
97
|
+
const busyRef = React.useRef(false);
|
|
98
|
+
const approveRef = React.useRef(null);
|
|
99
|
+
const reasonRef = React.useRef(null);
|
|
100
|
+
const reasonId = React.useId();
|
|
101
|
+
const respond = async (approved) => {
|
|
102
|
+
if (busyRef.current) return;
|
|
103
|
+
busyRef.current = true;
|
|
104
|
+
setBusy(true);
|
|
105
|
+
setErrorMessage("");
|
|
106
|
+
const trimmed = reason.trim();
|
|
107
|
+
try {
|
|
108
|
+
await onDecision({
|
|
109
|
+
approved,
|
|
110
|
+
reason: !approved && trimmed ? trimmed : void 0
|
|
111
|
+
});
|
|
112
|
+
} catch (error) {
|
|
113
|
+
setErrorMessage(getErrorMessage(error));
|
|
114
|
+
} finally {
|
|
115
|
+
busyRef.current = false;
|
|
116
|
+
setBusy(false);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
120
|
+
ref,
|
|
121
|
+
"data-slot": "approval-options",
|
|
122
|
+
className: cx("approval__options", className),
|
|
123
|
+
"aria-busy": busy || void 0,
|
|
124
|
+
onKeyDown: (event) => {
|
|
125
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
(selected === "approve" ? reasonRef : approveRef).current?.focus();
|
|
128
|
+
} else if (event.key === "1" && event.target !== reasonRef.current) approveRef.current?.focus();
|
|
129
|
+
},
|
|
130
|
+
...props,
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
133
|
+
ref: approveRef,
|
|
134
|
+
type: "button",
|
|
135
|
+
size: "sm",
|
|
136
|
+
variant: "ghost",
|
|
137
|
+
color: "neutral",
|
|
138
|
+
className: "approval__option",
|
|
139
|
+
"data-selected": selected === "approve" || void 0,
|
|
140
|
+
disabled: busy,
|
|
141
|
+
onClick: () => void respond(true),
|
|
142
|
+
onFocus: () => setSelected("approve"),
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ jsx("span", {
|
|
145
|
+
className: "approval__key",
|
|
146
|
+
children: "1"
|
|
147
|
+
}),
|
|
148
|
+
"Yes, approve",
|
|
149
|
+
/* @__PURE__ */ jsx("span", {
|
|
150
|
+
className: "approval__arrows",
|
|
151
|
+
"aria-hidden": "true",
|
|
152
|
+
children: "↑↓"
|
|
153
|
+
})
|
|
154
|
+
]
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ jsxs("div", {
|
|
157
|
+
className: "approval__option approval__deny",
|
|
158
|
+
"data-selected": selected === "deny" || void 0,
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ jsx("span", {
|
|
161
|
+
className: "approval__key",
|
|
162
|
+
"aria-hidden": "true",
|
|
163
|
+
children: /* @__PURE__ */ jsx(PencilIcon, { size: 11 })
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ jsxs("label", {
|
|
166
|
+
className: "approval__deny-label",
|
|
167
|
+
htmlFor: reasonId,
|
|
168
|
+
children: ["No, deny", /* @__PURE__ */ jsxs("span", {
|
|
169
|
+
className: "sigvelo-visually-hidden",
|
|
170
|
+
children: [" ", subject]
|
|
171
|
+
})]
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ jsx("input", {
|
|
174
|
+
id: reasonId,
|
|
175
|
+
ref: reasonRef,
|
|
176
|
+
type: "text",
|
|
177
|
+
className: "approval__reason",
|
|
178
|
+
placeholder: "Tell the agent what to do differently",
|
|
179
|
+
value: reason,
|
|
180
|
+
disabled: busy,
|
|
181
|
+
onFocus: () => setSelected("deny"),
|
|
182
|
+
onChange: (event) => {
|
|
183
|
+
setSelected("deny");
|
|
184
|
+
setReason(event.currentTarget.value);
|
|
185
|
+
},
|
|
186
|
+
onKeyDown: (event) => {
|
|
187
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing) {
|
|
188
|
+
event.preventDefault();
|
|
189
|
+
respond(false);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}),
|
|
193
|
+
onSkip ? /* @__PURE__ */ jsx(Button, {
|
|
194
|
+
type: "button",
|
|
195
|
+
size: "sm",
|
|
196
|
+
variant: "ghost",
|
|
197
|
+
color: "neutral",
|
|
198
|
+
className: "approval__skip",
|
|
199
|
+
disabled: busy,
|
|
200
|
+
onClick: onSkip,
|
|
201
|
+
children: "Skip"
|
|
202
|
+
}) : null,
|
|
203
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
204
|
+
type: "button",
|
|
205
|
+
size: "sm",
|
|
206
|
+
color: "primary",
|
|
207
|
+
className: "approval__submit",
|
|
208
|
+
disabled: busy,
|
|
209
|
+
onClick: () => void respond(selected === "approve"),
|
|
210
|
+
children: [busy ? "Submitting…" : selected === "approve" ? "Approve" : "Submit denial", !busy ? /* @__PURE__ */ jsx("kbd", {
|
|
211
|
+
className: "approval__kbd",
|
|
212
|
+
children: "⏎"
|
|
213
|
+
}) : null]
|
|
214
|
+
})
|
|
215
|
+
]
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ jsx("span", {
|
|
218
|
+
className: cx("approval__status", !errorMessage && "sigvelo-visually-hidden"),
|
|
219
|
+
role: "status",
|
|
220
|
+
"aria-atomic": "true",
|
|
221
|
+
children: errorMessage || (busy ? "Submitting approval" : "")
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
export { Approval, ApprovalCount, ApprovalDecision, ApprovalHeader, ApprovalInputPreview, ApprovalPreview, ApprovalPreviewRow, ApprovalQuestion, formatApprovalValue };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "../Button-
|
|
1
|
+
import { r as ButtonProps } from "../Button-DLGzHsjc.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Artifact.d.ts
|
|
@@ -83,8 +83,7 @@ declare function ArtifactActions({
|
|
|
83
83
|
}: ArtifactActionsProps & {
|
|
84
84
|
ref?: React.Ref<HTMLDivElement>;
|
|
85
85
|
}): React.JSX.Element;
|
|
86
|
-
interface ArtifactActionProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color"
|
|
87
|
-
className?: string;
|
|
86
|
+
interface ArtifactActionProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color"> {
|
|
88
87
|
/** Accessible label for the button. */
|
|
89
88
|
label?: string;
|
|
90
89
|
/** Tooltip text shown on hover. Defaults to label. */
|
|
@@ -103,8 +102,7 @@ declare function ArtifactAction({
|
|
|
103
102
|
children,
|
|
104
103
|
...props
|
|
105
104
|
}: ArtifactActionProps): React.JSX.Element;
|
|
106
|
-
interface ArtifactCloseProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color"
|
|
107
|
-
className?: string;
|
|
105
|
+
interface ArtifactCloseProps extends Omit<ButtonProps, "children" | "variant" | "size" | "color"> {
|
|
108
106
|
/** Accessible label for the close button. */
|
|
109
107
|
label?: string;
|
|
110
108
|
children?: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as cx } from "../class-names-
|
|
2
|
-
import {
|
|
1
|
+
import { t as cx } from "../class-names-BiMDVpUo.js";
|
|
2
|
+
import { $ as XIcon } from "../icons-CQJ-aMnI.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import "react";
|
|
@@ -81,12 +81,13 @@ function ArtifactAction({ className, label, tooltip, icon, children, ...props })
|
|
|
81
81
|
const accessibleLabel = label ?? tooltip;
|
|
82
82
|
const button = /* @__PURE__ */ jsxs(Button, {
|
|
83
83
|
variant: "ghost",
|
|
84
|
-
size: "
|
|
84
|
+
size: "sm",
|
|
85
|
+
iconOnly: true,
|
|
85
86
|
"aria-label": accessibleLabel,
|
|
86
87
|
className: cx("artifact__action", className),
|
|
87
88
|
...props,
|
|
88
89
|
children: [Icon ? /* @__PURE__ */ jsx(Icon, {}) : icon ?? children, accessibleLabel ? /* @__PURE__ */ jsx("span", {
|
|
89
|
-
className: "
|
|
90
|
+
className: "sigvelo-visually-hidden",
|
|
90
91
|
children: accessibleLabel
|
|
91
92
|
}) : null]
|
|
92
93
|
});
|
|
@@ -96,7 +97,8 @@ function ArtifactAction({ className, label, tooltip, icon, children, ...props })
|
|
|
96
97
|
function ArtifactClose({ className, label = "Close", children, ...props }) {
|
|
97
98
|
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
98
99
|
variant: "ghost",
|
|
99
|
-
size: "
|
|
100
|
+
size: "sm",
|
|
101
|
+
iconOnly: true,
|
|
100
102
|
"aria-label": label,
|
|
101
103
|
className: cx("artifact__close", className),
|
|
102
104
|
...props,
|
|
@@ -6,99 +6,77 @@ declare function Input({
|
|
|
6
6
|
className,
|
|
7
7
|
ref,
|
|
8
8
|
...props
|
|
9
|
-
}:
|
|
10
|
-
className?: string;
|
|
11
|
-
} & {
|
|
9
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Input> & {
|
|
12
10
|
ref?: React.Ref<HTMLInputElement>;
|
|
13
11
|
}): React.JSX.Element;
|
|
14
12
|
declare function Trigger({
|
|
15
13
|
className,
|
|
16
14
|
ref,
|
|
17
15
|
...props
|
|
18
|
-
}:
|
|
19
|
-
className?: string;
|
|
20
|
-
} & {
|
|
16
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Trigger> & {
|
|
21
17
|
ref?: React.Ref<HTMLButtonElement>;
|
|
22
18
|
}): React.JSX.Element;
|
|
23
19
|
declare function Clear({
|
|
24
20
|
className,
|
|
25
21
|
ref,
|
|
26
22
|
...props
|
|
27
|
-
}:
|
|
28
|
-
className?: string;
|
|
29
|
-
} & {
|
|
23
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Clear> & {
|
|
30
24
|
ref?: React.Ref<HTMLButtonElement>;
|
|
31
25
|
}): React.JSX.Element;
|
|
32
26
|
declare function Positioner({
|
|
33
27
|
className,
|
|
34
28
|
ref,
|
|
35
29
|
...props
|
|
36
|
-
}:
|
|
37
|
-
className?: string;
|
|
38
|
-
} & {
|
|
30
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Positioner> & {
|
|
39
31
|
ref?: React.Ref<HTMLDivElement>;
|
|
40
32
|
}): React.JSX.Element;
|
|
41
33
|
declare function Popup({
|
|
42
34
|
className,
|
|
43
35
|
ref,
|
|
44
36
|
...props
|
|
45
|
-
}:
|
|
46
|
-
className?: string;
|
|
47
|
-
} & {
|
|
37
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Popup> & {
|
|
48
38
|
ref?: React.Ref<HTMLDivElement>;
|
|
49
39
|
}): React.JSX.Element;
|
|
50
40
|
declare function List({
|
|
51
41
|
className,
|
|
52
42
|
ref,
|
|
53
43
|
...props
|
|
54
|
-
}:
|
|
55
|
-
className?: string;
|
|
56
|
-
} & {
|
|
44
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.List> & {
|
|
57
45
|
ref?: React.Ref<HTMLDivElement>;
|
|
58
46
|
}): React.JSX.Element;
|
|
59
47
|
declare function Item({
|
|
60
48
|
className,
|
|
61
49
|
ref,
|
|
62
50
|
...props
|
|
63
|
-
}:
|
|
64
|
-
className?: string;
|
|
65
|
-
} & {
|
|
51
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Item> & {
|
|
66
52
|
ref?: React.Ref<HTMLDivElement>;
|
|
67
53
|
}): React.JSX.Element;
|
|
68
54
|
declare function Empty({
|
|
69
55
|
className,
|
|
70
56
|
ref,
|
|
71
57
|
...props
|
|
72
|
-
}:
|
|
73
|
-
className?: string;
|
|
74
|
-
} & {
|
|
58
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Empty> & {
|
|
75
59
|
ref?: React.Ref<HTMLDivElement>;
|
|
76
60
|
}): React.JSX.Element;
|
|
77
61
|
declare function Status({
|
|
78
62
|
className,
|
|
79
63
|
ref,
|
|
80
64
|
...props
|
|
81
|
-
}:
|
|
82
|
-
className?: string;
|
|
83
|
-
} & {
|
|
65
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Status> & {
|
|
84
66
|
ref?: React.Ref<HTMLDivElement>;
|
|
85
67
|
}): React.JSX.Element;
|
|
86
68
|
declare function Group({
|
|
87
69
|
className,
|
|
88
70
|
ref,
|
|
89
71
|
...props
|
|
90
|
-
}:
|
|
91
|
-
className?: string;
|
|
92
|
-
} & {
|
|
72
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.Group> & {
|
|
93
73
|
ref?: React.Ref<HTMLDivElement>;
|
|
94
74
|
}): React.JSX.Element;
|
|
95
75
|
declare function GroupLabel({
|
|
96
76
|
className,
|
|
97
77
|
ref,
|
|
98
78
|
...props
|
|
99
|
-
}:
|
|
100
|
-
className?: string;
|
|
101
|
-
} & {
|
|
79
|
+
}: React.ComponentPropsWithRef<typeof Autocomplete$1.GroupLabel> & {
|
|
102
80
|
ref?: React.Ref<HTMLDivElement>;
|
|
103
81
|
}): React.JSX.Element;
|
|
104
82
|
/**
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { n as mergeBaseClassName } from "../class-names-BiMDVpUo.js";
|
|
1
2
|
import "react";
|
|
2
3
|
import { jsx } from "react/jsx-runtime";
|
|
3
4
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
4
5
|
//#region src/components/Autocomplete.tsx
|
|
5
|
-
function Input({ className
|
|
6
|
-
const classes = ["autocomplete__input"
|
|
6
|
+
function Input({ className, ref, ...props }) {
|
|
7
|
+
const classes = mergeBaseClassName(["autocomplete__input"].filter(Boolean).join(" "), className);
|
|
7
8
|
return /* @__PURE__ */ jsx(Autocomplete$1.Input, {
|
|
8
9
|
ref,
|
|
9
10
|
"data-slot": "autocomplete-input",
|
|
@@ -11,8 +12,8 @@ function Input({ className = "", ref, ...props }) {
|
|
|
11
12
|
...props
|
|
12
13
|
});
|
|
13
14
|
}
|
|
14
|
-
function Trigger({ className
|
|
15
|
-
const classes = ["autocomplete__trigger"
|
|
15
|
+
function Trigger({ className, ref, ...props }) {
|
|
16
|
+
const classes = mergeBaseClassName(["autocomplete__trigger"].filter(Boolean).join(" "), className);
|
|
16
17
|
return /* @__PURE__ */ jsx(Autocomplete$1.Trigger, {
|
|
17
18
|
ref,
|
|
18
19
|
"data-slot": "autocomplete-trigger",
|
|
@@ -20,8 +21,8 @@ function Trigger({ className = "", ref, ...props }) {
|
|
|
20
21
|
...props
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
|
-
function Clear({ className
|
|
24
|
-
const classes = ["autocomplete__clear"
|
|
24
|
+
function Clear({ className, ref, ...props }) {
|
|
25
|
+
const classes = mergeBaseClassName(["autocomplete__clear"].filter(Boolean).join(" "), className);
|
|
25
26
|
return /* @__PURE__ */ jsx(Autocomplete$1.Clear, {
|
|
26
27
|
ref,
|
|
27
28
|
"data-slot": "autocomplete-clear",
|
|
@@ -29,12 +30,8 @@ function Clear({ className = "", ref, ...props }) {
|
|
|
29
30
|
...props
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
|
-
function Positioner({ className
|
|
33
|
-
const classes = [
|
|
34
|
-
"autocomplete__positioner",
|
|
35
|
-
"base-ui-positioner",
|
|
36
|
-
className
|
|
37
|
-
].filter(Boolean).join(" ");
|
|
33
|
+
function Positioner({ className, ref, ...props }) {
|
|
34
|
+
const classes = mergeBaseClassName(["autocomplete__positioner", "base-ui-positioner"].filter(Boolean).join(" "), className);
|
|
38
35
|
return /* @__PURE__ */ jsx(Autocomplete$1.Positioner, {
|
|
39
36
|
ref,
|
|
40
37
|
"data-slot": "autocomplete-positioner",
|
|
@@ -42,12 +39,8 @@ function Positioner({ className = "", ref, ...props }) {
|
|
|
42
39
|
...props
|
|
43
40
|
});
|
|
44
41
|
}
|
|
45
|
-
function Popup({ className
|
|
46
|
-
const classes = [
|
|
47
|
-
"autocomplete__popup",
|
|
48
|
-
"base-ui-popup",
|
|
49
|
-
className
|
|
50
|
-
].filter(Boolean).join(" ");
|
|
42
|
+
function Popup({ className, ref, ...props }) {
|
|
43
|
+
const classes = mergeBaseClassName(["autocomplete__popup", "base-ui-popup"].filter(Boolean).join(" "), className);
|
|
51
44
|
return /* @__PURE__ */ jsx(Autocomplete$1.Popup, {
|
|
52
45
|
ref,
|
|
53
46
|
"data-slot": "autocomplete-content",
|
|
@@ -55,8 +48,8 @@ function Popup({ className = "", ref, ...props }) {
|
|
|
55
48
|
...props
|
|
56
49
|
});
|
|
57
50
|
}
|
|
58
|
-
function List({ className
|
|
59
|
-
const classes = ["autocomplete__list"
|
|
51
|
+
function List({ className, ref, ...props }) {
|
|
52
|
+
const classes = mergeBaseClassName(["autocomplete__list"].filter(Boolean).join(" "), className);
|
|
60
53
|
return /* @__PURE__ */ jsx(Autocomplete$1.List, {
|
|
61
54
|
ref,
|
|
62
55
|
"data-slot": "autocomplete-list",
|
|
@@ -64,8 +57,8 @@ function List({ className = "", ref, ...props }) {
|
|
|
64
57
|
...props
|
|
65
58
|
});
|
|
66
59
|
}
|
|
67
|
-
function Item({ className
|
|
68
|
-
const classes = ["autocomplete__item"
|
|
60
|
+
function Item({ className, ref, ...props }) {
|
|
61
|
+
const classes = mergeBaseClassName(["autocomplete__item"].filter(Boolean).join(" "), className);
|
|
69
62
|
return /* @__PURE__ */ jsx(Autocomplete$1.Item, {
|
|
70
63
|
ref,
|
|
71
64
|
"data-slot": "autocomplete-item",
|
|
@@ -73,8 +66,8 @@ function Item({ className = "", ref, ...props }) {
|
|
|
73
66
|
...props
|
|
74
67
|
});
|
|
75
68
|
}
|
|
76
|
-
function Empty({ className
|
|
77
|
-
const classes = ["autocomplete__empty"
|
|
69
|
+
function Empty({ className, ref, ...props }) {
|
|
70
|
+
const classes = mergeBaseClassName(["autocomplete__empty"].filter(Boolean).join(" "), className);
|
|
78
71
|
return /* @__PURE__ */ jsx(Autocomplete$1.Empty, {
|
|
79
72
|
ref,
|
|
80
73
|
"data-slot": "autocomplete-empty",
|
|
@@ -82,8 +75,8 @@ function Empty({ className = "", ref, ...props }) {
|
|
|
82
75
|
...props
|
|
83
76
|
});
|
|
84
77
|
}
|
|
85
|
-
function Status({ className
|
|
86
|
-
const classes = ["autocomplete__status"
|
|
78
|
+
function Status({ className, ref, ...props }) {
|
|
79
|
+
const classes = mergeBaseClassName(["autocomplete__status"].filter(Boolean).join(" "), className);
|
|
87
80
|
return /* @__PURE__ */ jsx(Autocomplete$1.Status, {
|
|
88
81
|
ref,
|
|
89
82
|
"data-slot": "autocomplete-status",
|
|
@@ -91,8 +84,8 @@ function Status({ className = "", ref, ...props }) {
|
|
|
91
84
|
...props
|
|
92
85
|
});
|
|
93
86
|
}
|
|
94
|
-
function Group({ className
|
|
95
|
-
const classes = ["autocomplete__group"
|
|
87
|
+
function Group({ className, ref, ...props }) {
|
|
88
|
+
const classes = mergeBaseClassName(["autocomplete__group"].filter(Boolean).join(" "), className);
|
|
96
89
|
return /* @__PURE__ */ jsx(Autocomplete$1.Group, {
|
|
97
90
|
ref,
|
|
98
91
|
"data-slot": "autocomplete-group",
|
|
@@ -100,8 +93,8 @@ function Group({ className = "", ref, ...props }) {
|
|
|
100
93
|
...props
|
|
101
94
|
});
|
|
102
95
|
}
|
|
103
|
-
function GroupLabel({ className
|
|
104
|
-
const classes = ["autocomplete__group-label"
|
|
96
|
+
function GroupLabel({ className, ref, ...props }) {
|
|
97
|
+
const classes = mergeBaseClassName(["autocomplete__group-label"].filter(Boolean).join(" "), className);
|
|
105
98
|
return /* @__PURE__ */ jsx(Autocomplete$1.GroupLabel, {
|
|
106
99
|
ref,
|
|
107
100
|
"data-slot": "autocomplete-group-label",
|
|
@@ -5,25 +5,17 @@ import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for the Avatar.Root component.
|
|
7
7
|
*/
|
|
8
|
-
interface AvatarRootProps extends
|
|
9
|
-
|
|
10
|
-
className?: string;
|
|
11
|
-
size?: "default" | "sm" | "lg";
|
|
8
|
+
interface AvatarRootProps extends React.ComponentPropsWithoutRef<typeof Avatar$1.Root> {
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
12
10
|
}
|
|
13
11
|
/**
|
|
14
12
|
* Props for the Avatar.Image component.
|
|
15
13
|
*/
|
|
16
|
-
interface AvatarImageProps extends
|
|
17
|
-
/** Additional CSS class names */
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
14
|
+
interface AvatarImageProps extends React.ComponentPropsWithoutRef<typeof Avatar$1.Image> {}
|
|
20
15
|
/**
|
|
21
16
|
* Props for the Avatar.Fallback component.
|
|
22
17
|
*/
|
|
23
|
-
interface AvatarFallbackProps extends
|
|
24
|
-
/** Additional CSS class names */
|
|
25
|
-
className?: string;
|
|
26
|
-
}
|
|
18
|
+
interface AvatarFallbackProps extends React.ComponentPropsWithoutRef<typeof Avatar$1.Fallback> {}
|
|
27
19
|
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
28
20
|
interface AvatarGroupCountProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
29
21
|
interface AvatarBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {}
|