@mcp-b/react-components 0.40.0 → 0.42.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/{AgentChat-CVO7xyLC.d.ts → AgentChat-DVr2giwD.d.ts} +1 -1
- package/dist/{AgentToolRunsContext-BCVqCtJ1.d.ts → AgentToolRunsContext-daY67hFM.d.ts} +12 -0
- package/dist/{CodeBlock-CWk1FVtm.js → CodeBlock-BjELA-_s.js} +1 -1
- package/dist/{FileTree-xqHYBw4g.js → FileTree-DMYRdT6R.js} +1 -1
- package/dist/McpConnectorForm-MRm1r59e.d.ts +39 -0
- package/dist/{Message-DBsHHhcM.d.ts → Message-D_vCVEGB.d.ts} +20 -1
- package/dist/{ThinkChatActivity-D6-_5Phw.d.ts → ThinkChatActivity-CsDql-ER.d.ts} +4 -1
- package/dist/{ThinkExecutionRun-lYYgyeE1.d.ts → ThinkExecutionRun-k8bpyXqt.d.ts} +3 -3
- package/dist/{WorkspaceFileView-Lab3om3F.js → WorkspaceFileView-DwdXiKku.js} +17 -22
- package/dist/{WorkspaceMessageResponse-Cy28WGSz.d.ts → WorkspaceMessageResponse-D66ty4FO.d.ts} +1 -1
- package/dist/components/agents-sdk/AgentActivity.js +4 -3
- package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChat.js +42 -18
- package/dist/components/agents-sdk/AgentToolRunsContext.d.ts +1 -1
- package/dist/components/agents-sdk/AgentToolRunsContext.js +12 -0
- package/dist/components/agents-sdk/BrowserLiveScreen.d.ts +135 -0
- package/dist/components/agents-sdk/BrowserLiveScreen.js +637 -0
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +2 -2
- package/dist/components/agents-sdk/BrowserLiveView.js +6 -9
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +8 -13
- package/dist/components/agents-sdk/ManagerOffice.d.ts +168 -0
- package/dist/components/agents-sdk/ManagerOffice.js +698 -0
- package/dist/components/agents-sdk/McpConnectionRequest.js +3 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -38
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +8 -2
- package/dist/components/agents-sdk/McpPluginCatalog.js +82 -62
- package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelSelector.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SubagentRunDetails.d.ts +1 -9
- package/dist/components/agents-sdk/SubagentRunDetails.js +1 -9
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.d.ts +4 -2
- package/dist/components/agents-sdk/SubagentRunSelector.js +7 -6
- package/dist/components/agents-sdk/ThinkChat.d.ts +4 -4
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +18 -4
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +7 -3
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +45 -43
- package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkExecutionRun.js +5 -6
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +8 -12
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +43 -37
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +42 -78
- package/dist/components/agents-sdk/ThinkFullApp.js +121 -202
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineDetail.js +4 -15
- package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +7 -6
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +112 -140
- package/dist/components/agents-sdk/ThinkRoutineRuns.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +3 -10
- package/dist/components/agents-sdk/ThinkThreadPicker.js +2 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +2 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +11 -11
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentAttention.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/Approval.js +1 -1
- package/dist/components/ai-sdk/Artifact.js +1 -1
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +1 -1
- package/dist/components/ai-sdk/Checkpoint.js +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/Conversation.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
- package/dist/components/ai-sdk/Message.d.ts +2 -2
- package/dist/components/ai-sdk/Message.js +25 -3
- package/dist/components/ai-sdk/MessageScroller.js +3 -2
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +2 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +21 -15
- package/dist/components/ai-sdk/Queue.d.ts +4 -4
- package/dist/components/ai-sdk/Queue.js +6 -15
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.d.ts +2 -2
- package/dist/components/ai-sdk/Task.js +2 -2
- package/dist/components/extension/ChatGptSignInScreen.js +2 -1
- package/dist/components/extension/CodexModelSelector.js +1 -1
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- package/dist/components/foundations/Avatar.d.ts +1 -10
- package/dist/components/foundations/Avatar.js +1 -10
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/CheckboxGroup.js +1 -0
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/LinkButton.d.ts +12 -10
- package/dist/components/foundations/LinkButton.js +15 -11
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/ToggleGroup.d.ts +79 -1
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/AppFrame.js +1 -0
- package/dist/components/general-purpose/AppTopBar.d.ts +6 -0
- package/dist/components/general-purpose/AppTopBar.js +2 -1
- package/dist/components/general-purpose/Commit.d.ts +2 -2
- package/dist/components/general-purpose/Commit.js +5 -13
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +4 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.js +4 -9
- package/dist/components/general-purpose/PricingPlanCard.js +15 -14
- package/dist/components/general-purpose/ResizableSidePanel.d.ts +8 -0
- package/dist/components/general-purpose/ResizableSidePanel.js +3 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +105 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +112 -56
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/Terminal.d.ts +1 -1
- package/dist/components/general-purpose/Terminal.js +4 -12
- package/dist/components/general-purpose/TestResults.d.ts +1 -1
- package/dist/components/general-purpose/TestResults.js +8 -21
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.d.ts +4 -1
- package/dist/components/general-purpose/WebPreview.js +6 -14
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
- package/dist/components/nanites/AgentToolDetail.js +6 -5
- package/dist/components/nanites/NaniteScene.js +11 -11
- package/dist/{copy-button-Bc7jsYv_.js → copy-button-lys9N_aI.js} +1 -1
- package/dist/{icons-DwgNir1Q.d.ts → icons-0corjfxR.d.ts} +1 -16
- package/dist/{icons-MmIXciMO.js → icons-CVFSeTJn.js} +2 -5
- package/dist/styles/accordion.css +1 -0
- package/dist/styles/action-guide.css +8 -7
- package/dist/styles/activity-header.css +13 -39
- package/dist/styles/activity.css +40 -55
- package/dist/styles/agent-attention.css +19 -19
- package/dist/styles/agent-chat.css +94 -42
- package/dist/styles/agent-connection.css +10 -4
- package/dist/styles/agent-tool-detail.css +5 -15
- package/dist/styles/alert-dialog.css +4 -4
- package/dist/styles/app-frame.css +1 -3
- package/dist/styles/app-icon.css +12 -18
- package/dist/styles/app-top-bar.css +31 -9
- package/dist/styles/approval.css +1 -0
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/attachment-preview.css +5 -4
- package/dist/styles/avatar.css +6 -22
- package/dist/styles/base.css +2 -8
- package/dist/styles/browser-live-screen.css +38 -0
- package/dist/styles/browser-live-view.css +12 -4
- package/dist/styles/browser-replay.css +6 -6
- package/dist/styles/browser-run-panel.css +21 -18
- package/dist/styles/button.css +15 -6
- package/dist/styles/card.css +5 -5
- package/dist/styles/chatgpt-sign-in-screen.css +6 -6
- package/dist/styles/code-block.css +14 -13
- package/dist/styles/codex-model-selector.css +2 -0
- package/dist/styles/collapsible.css +1 -0
- package/dist/styles/commit.css +30 -7
- package/dist/styles/context.css +9 -9
- package/dist/styles/conversation-tab-picker.css +1 -1
- package/dist/styles/conversation.css +6 -8
- package/dist/styles/dialog.css +4 -4
- package/dist/styles/empty-state.css +3 -3
- package/dist/styles/environment-variables.css +12 -9
- package/dist/styles/field.css +2 -1
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/index.css +8 -7
- package/dist/styles/manager-office.css +480 -0
- package/dist/styles/mcp-plugin-catalog.css +44 -39
- package/dist/styles/mcp-server-picker.css +4 -4
- package/dist/styles/message-scroller.css +9 -11
- package/dist/styles/message.css +74 -28
- package/dist/styles/nanite-scene.css +9 -9
- package/dist/styles/navigation-menu.css +1 -0
- package/dist/styles/plan.css +13 -12
- package/dist/styles/pricing-page.css +37 -30
- package/dist/styles/prompt-input.css +26 -18
- package/dist/styles/queue.css +1 -0
- package/dist/styles/reasoning.css +1 -9
- package/dist/styles/recipes.css +29 -58
- package/dist/styles/responsive-sidebar-shell.css +107 -29
- package/dist/styles/separator.css +5 -5
- package/dist/styles/sources.css +4 -4
- package/dist/styles/stepper.css +1 -0
- package/dist/styles/streamdown.css +31 -21
- package/dist/styles/subagent-run.css +20 -3
- package/dist/styles/tabs.css +1 -0
- package/dist/styles/task.css +5 -17
- package/dist/styles/terminal.css +29 -10
- package/dist/styles/test-results.css +16 -7
- package/dist/styles/think-execution-status.css +10 -26
- package/dist/styles/think-execution-workbench.css +98 -108
- package/dist/styles/think-full-app.css +75 -225
- package/dist/styles/think-routine-library.css +26 -95
- package/dist/styles/think-thread-picker.css +17 -12
- package/dist/styles/transition-surface.css +7 -8
- package/dist/styles/utilities.css +75 -0
- package/dist/styles/web-preview.css +46 -22
- package/dist/styles/workspace-explorer.css +22 -44
- package/dist/styles/workspace-mount-manager.css +24 -2
- package/dist/utils/favicon.d.ts +6 -1
- package/dist/utils/favicon.js +18 -1
- package/package.json +37 -35
- package/dist/ResponsiveSidebarShell-DWjULskY.d.ts +0 -68
- package/dist/ToggleGroup-_pQMyHGM.d.ts +0 -80
- package/dist/components/agents-sdk/AgentActivityPreview.d.ts +0 -46
- package/dist/components/agents-sdk/AgentActivityPreview.js +0 -93
- package/dist/components/agents-sdk/ThinkThreadShell.d.ts +0 -38
- package/dist/components/agents-sdk/ThinkThreadShell.js +0 -27
- package/dist/components/foundations/Badge.d.ts +0 -62
- package/dist/components/foundations/Badge.js +0 -55
- package/dist/components/foundations/StatusPill.d.ts +0 -43
- package/dist/components/foundations/StatusPill.js +0 -35
- package/dist/components/general-purpose/Shell.d.ts +0 -149
- package/dist/components/general-purpose/Shell.js +0 -116
- package/dist/styles/agent-activity-preview-overlay.css +0 -169
- package/dist/styles/agent-activity-preview.css +0 -209
- package/dist/styles/badge.css +0 -120
- package/dist/styles/shell.css +0 -122
- package/dist/styles/status-pill.css +0 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-b/react-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "MCP-B React components built on Base UI and shared design tokens, including Cloudflare Think chat primitives.",
|
|
5
5
|
"homepage": "https://design-system.sigvelo.com",
|
|
6
6
|
"bugs": {
|
|
@@ -39,52 +39,52 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@base-ui/react": "~1.6.0",
|
|
42
|
-
"@rrweb/replay": "^2.1.
|
|
42
|
+
"@rrweb/replay": "^2.1.1",
|
|
43
43
|
"@shadcn/react": "^0.2.1",
|
|
44
44
|
"@streamdown/cjk": "^1.0.3",
|
|
45
45
|
"@streamdown/code": "^1.1.1",
|
|
46
|
-
"@tanstack/react-virtual": "^3.14.
|
|
47
|
-
"agent-skills-ts-sdk": "^2.4.
|
|
46
|
+
"@tanstack/react-virtual": "^3.14.9",
|
|
47
|
+
"agent-skills-ts-sdk": "^2.4.2",
|
|
48
48
|
"anser": "^2.3.5",
|
|
49
|
-
"lucide-react": "^1.
|
|
49
|
+
"lucide-react": "^1.31.0",
|
|
50
50
|
"react-icons": "^5.7.0",
|
|
51
51
|
"rehype-slug": "^6.0.0",
|
|
52
|
-
"shiki": "^
|
|
52
|
+
"shiki": "^3.23.0",
|
|
53
53
|
"streamdown": "^2.5.0",
|
|
54
54
|
"unist-util-visit": "^5.1.0",
|
|
55
|
-
"yet-another-react-lightbox": "^3.32.
|
|
56
|
-
"@mcp-b/design-tokens": "0.
|
|
55
|
+
"yet-another-react-lightbox": "^3.32.2",
|
|
56
|
+
"@mcp-b/design-tokens": "0.42.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@ai-sdk/react": "^3.0.
|
|
60
|
-
"@cloudflare/codemode": "^0.5.
|
|
59
|
+
"@ai-sdk/react": "^3.0.249",
|
|
60
|
+
"@cloudflare/codemode": "^0.5.1",
|
|
61
61
|
"@cloudflare/shell": "^0.4.3",
|
|
62
|
-
"@cloudflare/think": "^0.15.
|
|
63
|
-
"@cloudflare/voice": "^0.3.
|
|
64
|
-
"@cloudflare/workers-types": "^5.
|
|
65
|
-
"@storybook/addon-a11y": "^10.5.
|
|
66
|
-
"@storybook/addon-docs": "^10.5.
|
|
67
|
-
"@storybook/addon-vitest": "^10.5.
|
|
68
|
-
"@storybook/tanstack-react": "^10.5.
|
|
69
|
-
"@tanstack/react-form": "^1.33.
|
|
70
|
-
"@tanstack/react-query": "^5.101.
|
|
71
|
-
"@tanstack/react-router": "^1.170.
|
|
62
|
+
"@cloudflare/think": "^0.15.1",
|
|
63
|
+
"@cloudflare/voice": "^0.3.5",
|
|
64
|
+
"@cloudflare/workers-types": "^5.20260811.1",
|
|
65
|
+
"@storybook/addon-a11y": "^10.5.7",
|
|
66
|
+
"@storybook/addon-docs": "^10.5.7",
|
|
67
|
+
"@storybook/addon-vitest": "^10.5.7",
|
|
68
|
+
"@storybook/tanstack-react": "^10.5.7",
|
|
69
|
+
"@tanstack/react-form": "^1.33.4",
|
|
70
|
+
"@tanstack/react-query": "^5.101.4",
|
|
71
|
+
"@tanstack/react-router": "^1.170.25",
|
|
72
72
|
"@tanstack/react-store": "^0.9.3",
|
|
73
|
-
"@tanstack/router-core": "^1.171.
|
|
74
|
-
"@types/hast": "^3.0.
|
|
75
|
-
"@types/node": "^26",
|
|
76
|
-
"@types/react": "^19.2.
|
|
77
|
-
"@types/react-dom": "^19.2.
|
|
73
|
+
"@tanstack/router-core": "^1.171.21",
|
|
74
|
+
"@types/hast": "^3.0.5",
|
|
75
|
+
"@types/node": "^26.2.0",
|
|
76
|
+
"@types/react": "^19.2.18",
|
|
77
|
+
"@types/react-dom": "^19.2.4",
|
|
78
78
|
"@vitest/browser-playwright": "^4.1.10",
|
|
79
79
|
"@vitest/coverage-v8": "^4.1.10",
|
|
80
80
|
"@vitest/mocker": "^4.1.10",
|
|
81
|
-
"agents": "^0.
|
|
82
|
-
"ai": "^6.0.
|
|
81
|
+
"agents": "^0.20.1",
|
|
82
|
+
"ai": "^6.0.247",
|
|
83
83
|
"cloudflare": "^7.0.0",
|
|
84
|
-
"playwright": "~1.61.
|
|
84
|
+
"playwright": "~1.61.1",
|
|
85
85
|
"react": "19.3.0-canary-711c445b-20260722",
|
|
86
86
|
"react-dom": "19.3.0-canary-711c445b-20260722",
|
|
87
|
-
"storybook": "^10.5.
|
|
87
|
+
"storybook": "^10.5.7",
|
|
88
88
|
"typescript": "^6.0.3",
|
|
89
89
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.4",
|
|
90
90
|
"vite-plus": "0.2.4",
|
|
@@ -92,14 +92,13 @@
|
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@ai-sdk/react": "^3.0.230",
|
|
95
|
-
"@cloudflare/codemode": "^0.5.
|
|
95
|
+
"@cloudflare/codemode": "^0.5.1",
|
|
96
96
|
"@cloudflare/shell": "^0.4.3",
|
|
97
|
-
"@cloudflare/think": "^0.15.
|
|
98
|
-
"@cloudflare/voice": "^0.3.
|
|
97
|
+
"@cloudflare/think": "^0.15.1",
|
|
98
|
+
"@cloudflare/voice": "^0.3.5",
|
|
99
99
|
"@cloudflare/workers-types": "^5.20260715.1",
|
|
100
100
|
"@tanstack/react-query": "^5.101.2",
|
|
101
|
-
"
|
|
102
|
-
"agents": "^0.19.0",
|
|
101
|
+
"agents": "^0.20.1",
|
|
103
102
|
"ai": "^6.0.228",
|
|
104
103
|
"cloudflare": "^7.0.0",
|
|
105
104
|
"react": "19.3.0-canary-711c445b-20260722",
|
|
@@ -124,6 +123,9 @@
|
|
|
124
123
|
"@cloudflare/workers-types": {
|
|
125
124
|
"optional": true
|
|
126
125
|
},
|
|
126
|
+
"@tanstack/react-query": {
|
|
127
|
+
"optional": true
|
|
128
|
+
},
|
|
127
129
|
"agents": {
|
|
128
130
|
"optional": true
|
|
129
131
|
},
|
|
@@ -140,6 +142,6 @@
|
|
|
140
142
|
"test": "vp test",
|
|
141
143
|
"check": "vp check",
|
|
142
144
|
"storybook": "storybook dev -p 6011",
|
|
143
|
-
"build-storybook": "storybook build"
|
|
145
|
+
"build-storybook": "storybook build && node ../../scripts/audit-storybook-manifest.mjs --write-imports"
|
|
144
146
|
}
|
|
145
147
|
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/general-purpose/ResponsiveSidebarShell.d.ts
|
|
4
|
-
interface ResponsiveSidebarShellControls {
|
|
5
|
-
/** Close the sidebar and move focus to the main content. */
|
|
6
|
-
closeSidebar: () => void;
|
|
7
|
-
/** Close only when the shell is currently using its compact drawer layout. */
|
|
8
|
-
closeSidebarOnCompact: () => void;
|
|
9
|
-
}
|
|
10
|
-
interface ResponsiveSidebarShellTopBarControls {
|
|
11
|
-
/** The shell-owned, labelled sidebar toggle to place in a top-bar slot. */
|
|
12
|
-
sidebarToggle: React.ReactNode;
|
|
13
|
-
/** Stable id for a caller-composed compact disclosure trigger. */
|
|
14
|
-
sidebarId: string;
|
|
15
|
-
/** Whether the shared sidebar surface is currently visible. */
|
|
16
|
-
sidebarOpen: boolean;
|
|
17
|
-
/** Toggle the sidebar and remember the invoking control for Escape focus restoration. */
|
|
18
|
-
toggleSidebar: (trigger?: HTMLElement) => void;
|
|
19
|
-
}
|
|
20
|
-
interface ResponsiveSidebarShellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
21
|
-
/** Navigation or other secondary surface shown beside the selected content. */
|
|
22
|
-
sidebar: React.ReactNode | ((controls: ResponsiveSidebarShellControls) => React.ReactNode);
|
|
23
|
-
/**
|
|
24
|
-
* Optional composable application bar. The render form receives the
|
|
25
|
-
* shell-owned sidebar toggle so callers can place it beside their own icon
|
|
26
|
-
* groups without duplicating drawer behavior.
|
|
27
|
-
*/
|
|
28
|
-
topBar?: React.ReactNode | ((controls: ResponsiveSidebarShellTopBarControls) => React.ReactNode);
|
|
29
|
-
/** Short noun used by the toggle and resize control, such as “threads” or “schedules”. */
|
|
30
|
-
sidebarLabel: string;
|
|
31
|
-
/** Whether the sidebar is open. Omit for internal state. */
|
|
32
|
-
sidebarOpen?: boolean;
|
|
33
|
-
/** Initial sidebar state when `sidebarOpen` is uncontrolled. */
|
|
34
|
-
defaultSidebarOpen?: boolean;
|
|
35
|
-
/** Initial desktop sidebar width in CSS pixels. */
|
|
36
|
-
defaultSidebarWidth?: number;
|
|
37
|
-
/** Called when the sidebar is opened or closed. */
|
|
38
|
-
onSidebarOpenChange?: (open: boolean) => void;
|
|
39
|
-
/** Accessible name for the toolbar containing the sidebar toggle. */
|
|
40
|
-
toolbarLabel?: string;
|
|
41
|
-
/** Accessible name for the mobile preview target that returns to the main content. */
|
|
42
|
-
showMainLabel?: string;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Responsive master-detail shell with a resizable desktop sidebar and a compact
|
|
46
|
-
* floating sidebar that leaves the main content in place as a dismiss target.
|
|
47
|
-
* The root exposes `data-sidebar-open="true" | "false"` as its public styling hook.
|
|
48
|
-
*/
|
|
49
|
-
declare function ResponsiveSidebarShell({
|
|
50
|
-
sidebar,
|
|
51
|
-
topBar,
|
|
52
|
-
sidebarLabel,
|
|
53
|
-
sidebarOpen,
|
|
54
|
-
defaultSidebarOpen,
|
|
55
|
-
defaultSidebarWidth,
|
|
56
|
-
onSidebarOpenChange,
|
|
57
|
-
toolbarLabel,
|
|
58
|
-
showMainLabel,
|
|
59
|
-
className,
|
|
60
|
-
children,
|
|
61
|
-
ref,
|
|
62
|
-
style,
|
|
63
|
-
...props
|
|
64
|
-
}: ResponsiveSidebarShellProps & {
|
|
65
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
66
|
-
}): React.JSX.Element;
|
|
67
|
-
//#endregion
|
|
68
|
-
export { ResponsiveSidebarShellTopBarControls as i, ResponsiveSidebarShellControls as n, ResponsiveSidebarShellProps as r, ResponsiveSidebarShell as t };
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { r as ToggleVariantsOptions } from "./Toggle-DLrIf5YH.js";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { Toggle } from "@base-ui/react/toggle";
|
|
4
|
-
import { ToggleGroup } from "@base-ui/react/toggle-group";
|
|
5
|
-
|
|
6
|
-
//#region src/components/foundations/ToggleGroup.d.ts
|
|
7
|
-
type ToggleGroupSize = ToggleVariantsOptions["size"];
|
|
8
|
-
type ToggleGroupProps<Value extends string = string> = ToggleGroup.Props<Value> & {
|
|
9
|
-
variant?: ToggleVariantsOptions["variant"];
|
|
10
|
-
/**
|
|
11
|
-
* The size of the toggle group.
|
|
12
|
-
* @default 'md'
|
|
13
|
-
*/
|
|
14
|
-
size?: ToggleGroupSize;
|
|
15
|
-
spacing?: number;
|
|
16
|
-
/**
|
|
17
|
-
* Draws one shared thumb that slides between segments rather than lighting up
|
|
18
|
-
* each item's own background. This is the permission-mode / view-switch
|
|
19
|
-
* control; it is a presentation of this group, not a separate component.
|
|
20
|
-
*
|
|
21
|
-
* Only meaningful for single selection — a sliding thumb cannot be in two
|
|
22
|
-
* places, so a `multiple` group ignores it.
|
|
23
|
-
*/
|
|
24
|
-
segmented?: boolean;
|
|
25
|
-
};
|
|
26
|
-
interface ToggleGroupItemProps extends React.ComponentPropsWithRef<typeof Toggle>, Omit<ToggleVariantsOptions, "className"> {}
|
|
27
|
-
/**
|
|
28
|
-
* A toggle group component for selecting one or multiple options.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```tsx
|
|
32
|
-
* // Single selection (defaultValue is an array)
|
|
33
|
-
* <ToggleGroup.Root defaultValue={["center"]}>
|
|
34
|
-
* <ToggleGroup.Item value="left">Left</ToggleGroup.Item>
|
|
35
|
-
* <ToggleGroup.Item value="center">Center</ToggleGroup.Item>
|
|
36
|
-
* <ToggleGroup.Item value="right">Right</ToggleGroup.Item>
|
|
37
|
-
* </ToggleGroup.Root>
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```tsx
|
|
42
|
-
* // Multiple selection
|
|
43
|
-
* <ToggleGroup.Root multiple defaultValue={["bold", "italic"]}>
|
|
44
|
-
* <ToggleGroup.Item value="bold">Bold</ToggleGroup.Item>
|
|
45
|
-
* <ToggleGroup.Item value="italic">Italic</ToggleGroup.Item>
|
|
46
|
-
* <ToggleGroup.Item value="underline">Underline</ToggleGroup.Item>
|
|
47
|
-
* </ToggleGroup.Root>
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* @see {@link https://base-ui.com/react/components/toggle-group | Base UI Toggle Group}
|
|
51
|
-
*/
|
|
52
|
-
declare function ToggleGroupRoot<Value extends string>({
|
|
53
|
-
size,
|
|
54
|
-
spacing,
|
|
55
|
-
segmented,
|
|
56
|
-
variant,
|
|
57
|
-
className,
|
|
58
|
-
children,
|
|
59
|
-
style,
|
|
60
|
-
ref,
|
|
61
|
-
...props
|
|
62
|
-
}: ToggleGroupProps<Value>): React.JSX.Element;
|
|
63
|
-
/**
|
|
64
|
-
* A single toggle item within a ToggleGroup.
|
|
65
|
-
*/
|
|
66
|
-
declare function ToggleGroupItem({
|
|
67
|
-
className,
|
|
68
|
-
variant,
|
|
69
|
-
size,
|
|
70
|
-
ref,
|
|
71
|
-
...props
|
|
72
|
-
}: ToggleGroupItemProps & {
|
|
73
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
74
|
-
}): React.JSX.Element;
|
|
75
|
-
declare const ToggleGroup$1: {
|
|
76
|
-
Root: typeof ToggleGroupRoot;
|
|
77
|
-
Item: typeof ToggleGroupItem;
|
|
78
|
-
};
|
|
79
|
-
//#endregion
|
|
80
|
-
export { ToggleGroupItemProps as n, ToggleGroupProps as r, ToggleGroup$1 as t };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { n as WorkspaceDestination } from "../../WorkspaceLink-Bh9-Jo1r.js";
|
|
2
|
-
import { s as AgentActivitySummary } from "../../AgentActivity-Cc_oDYum.js";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/components/agents-sdk/AgentActivityPreview.d.ts
|
|
6
|
-
/** The three conditions that make an agent relevant to the transient preview. */
|
|
7
|
-
type AgentActivityPreviewStatus = "running" | "input-required" | "unviewed";
|
|
8
|
-
interface AgentActivityPreviewFavicon {
|
|
9
|
-
src: string;
|
|
10
|
-
label: string;
|
|
11
|
-
}
|
|
12
|
-
type AgentActivityPreviewItem = Omit<AgentActivitySummary, "mode"> & {
|
|
13
|
-
id: string;
|
|
14
|
-
status: AgentActivityPreviewStatus;
|
|
15
|
-
favicons?: readonly AgentActivityPreviewFavicon[];
|
|
16
|
-
};
|
|
17
|
-
interface AgentActivityPreviewProps extends Omit<React.HTMLAttributes<HTMLElement>, "children" | "onSelect"> {
|
|
18
|
-
/** Current agent summaries to show in the transient preview. */
|
|
19
|
-
items: readonly AgentActivityPreviewItem[];
|
|
20
|
-
/** App-authored TanStack Router Link for every durable agent destination. */
|
|
21
|
-
renderAgentLink: (item: AgentActivityPreviewItem) => React.ReactElement;
|
|
22
|
-
/** App-authored TanStack Router Link for a projected workspace file destination. */
|
|
23
|
-
renderWorkspaceFileLink?: (item: AgentActivityPreviewItem, destination: Extract<WorkspaceDestination, {
|
|
24
|
-
kind: "file";
|
|
25
|
-
}>) => React.ReactElement;
|
|
26
|
-
/** Hides the complete preview when the host supports dismissal. */
|
|
27
|
-
onDismiss?: () => void;
|
|
28
|
-
/** Product mark shown beside the agent rows. */
|
|
29
|
-
brandIcon?: React.ReactNode;
|
|
30
|
-
}
|
|
31
|
-
/** Compact multi-agent preview for a page overlay or secondary application rail. */
|
|
32
|
-
declare function AgentActivityPreview({
|
|
33
|
-
"aria-label": ariaLabel,
|
|
34
|
-
brandIcon,
|
|
35
|
-
className,
|
|
36
|
-
items,
|
|
37
|
-
onDismiss,
|
|
38
|
-
renderAgentLink,
|
|
39
|
-
renderWorkspaceFileLink,
|
|
40
|
-
ref,
|
|
41
|
-
...props
|
|
42
|
-
}: AgentActivityPreviewProps & {
|
|
43
|
-
ref?: React.Ref<HTMLElement>;
|
|
44
|
-
}): React.JSX.Element | null;
|
|
45
|
-
//#endregion
|
|
46
|
-
export { AgentActivityPreview, AgentActivityPreviewFavicon, AgentActivityPreviewItem, AgentActivityPreviewProps, AgentActivityPreviewStatus };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { C as FileIcon, M as McpIcon, Y as SpinnerIcon, it as XIcon, nt as WarningIcon } from "../../icons-MmIXciMO.js";
|
|
3
|
-
import { ActivityHeader } from "../ai-sdk/Activity.js";
|
|
4
|
-
import { Button } from "../foundations/Button.js";
|
|
5
|
-
import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
|
|
6
|
-
import { AppIcon } from "../foundations/AppIcon.js";
|
|
7
|
-
import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
8
|
-
import "react";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
//#region src/components/agents-sdk/AgentActivityPreview.tsx
|
|
11
|
-
/** Compact multi-agent preview for a page overlay or secondary application rail. */
|
|
12
|
-
function AgentActivityPreview({ "aria-label": ariaLabel = "Agent activity", brandIcon = /* @__PURE__ */ jsx(McpIcon, {}), className, items, onDismiss, renderAgentLink, renderWorkspaceFileLink, ref, ...props }) {
|
|
13
|
-
if (items.length === 0) return null;
|
|
14
|
-
return /* @__PURE__ */ jsxs("section", {
|
|
15
|
-
ref,
|
|
16
|
-
"aria-label": ariaLabel,
|
|
17
|
-
className: cx("agent-activity-preview", className),
|
|
18
|
-
"data-slot": "agent-activity-preview",
|
|
19
|
-
...props,
|
|
20
|
-
children: [
|
|
21
|
-
/* @__PURE__ */ jsx("div", {
|
|
22
|
-
className: "agent-activity-preview__badge",
|
|
23
|
-
"aria-hidden": "true",
|
|
24
|
-
children: brandIcon
|
|
25
|
-
}),
|
|
26
|
-
onDismiss ? /* @__PURE__ */ jsx(Button, {
|
|
27
|
-
"aria-label": "Hide agent activity",
|
|
28
|
-
className: "agent-activity-preview__dismiss",
|
|
29
|
-
color: "neutral",
|
|
30
|
-
iconOnly: true,
|
|
31
|
-
size: "sm",
|
|
32
|
-
variant: "ghost",
|
|
33
|
-
onClick: onDismiss,
|
|
34
|
-
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
35
|
-
}) : null,
|
|
36
|
-
/* @__PURE__ */ jsx("ul", {
|
|
37
|
-
className: "agent-activity-preview__list",
|
|
38
|
-
role: "list",
|
|
39
|
-
children: items.map((item) => /* @__PURE__ */ jsxs("li", {
|
|
40
|
-
className: "agent-activity-preview__item",
|
|
41
|
-
children: [/* @__PURE__ */ jsx(NavigationLink, {
|
|
42
|
-
render: renderAgentLink(item),
|
|
43
|
-
className: "agent-activity-preview__row",
|
|
44
|
-
"aria-label": `${item.action}${item.detail ? ` ${item.detail}` : ""}. ${statusLabel(item.status)}. Open agent.`,
|
|
45
|
-
"data-status": item.status,
|
|
46
|
-
children: /* @__PURE__ */ jsx(ActivityHeader, {
|
|
47
|
-
icon: item.url ? /* @__PURE__ */ jsx(AgentActivityFavicon, {
|
|
48
|
-
url: item.url,
|
|
49
|
-
fallbackKind: item.iconKind
|
|
50
|
-
}) : /* @__PURE__ */ jsx(AgentActivityIcon, { kind: item.iconKind }),
|
|
51
|
-
isStreaming: item.status === "running",
|
|
52
|
-
action: item.action,
|
|
53
|
-
detail: item.detail,
|
|
54
|
-
trailing: /* @__PURE__ */ jsxs("span", {
|
|
55
|
-
className: "agent-activity-preview__trailing",
|
|
56
|
-
"aria-hidden": "true",
|
|
57
|
-
children: [item.favicons?.length ? /* @__PURE__ */ jsx(AppIcon.Stack, { children: item.favicons.map((favicon) => /* @__PURE__ */ jsxs(AppIcon.Root, {
|
|
58
|
-
size: "sm",
|
|
59
|
-
title: favicon.label,
|
|
60
|
-
children: [/* @__PURE__ */ jsx(AppIcon.Image, {
|
|
61
|
-
src: favicon.src,
|
|
62
|
-
alt: ""
|
|
63
|
-
}), /* @__PURE__ */ jsx(AppIcon.Fallback, { children: favicon.label.slice(0, 1) })]
|
|
64
|
-
}, `${favicon.src}:${favicon.label}`)) }) : null, /* @__PURE__ */ jsx(StatusIcon, { status: item.status })]
|
|
65
|
-
})
|
|
66
|
-
})
|
|
67
|
-
}), item.workspaceDestination && renderWorkspaceFileLink ? /* @__PURE__ */ jsx(NavigationLink, {
|
|
68
|
-
render: renderWorkspaceFileLink(item, item.workspaceDestination),
|
|
69
|
-
className: "agent-activity-preview__file-action",
|
|
70
|
-
"aria-label": `Open ${item.workspaceDestination.path} in workspace`,
|
|
71
|
-
children: /* @__PURE__ */ jsx(FileIcon, {})
|
|
72
|
-
}) : null]
|
|
73
|
-
}, item.id))
|
|
74
|
-
})
|
|
75
|
-
]
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function StatusIcon({ status }) {
|
|
79
|
-
switch (status) {
|
|
80
|
-
case "running": return /* @__PURE__ */ jsx(SpinnerIcon, {});
|
|
81
|
-
case "input-required": return /* @__PURE__ */ jsx(WarningIcon, {});
|
|
82
|
-
case "unviewed": return /* @__PURE__ */ jsx("span", { className: "agent-activity-preview__unviewed-dot" });
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function statusLabel(status) {
|
|
86
|
-
switch (status) {
|
|
87
|
-
case "running": return "Working";
|
|
88
|
-
case "input-required": return "Needs your input";
|
|
89
|
-
case "unviewed": return "Not yet viewed";
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
//#endregion
|
|
93
|
-
export { AgentActivityPreview };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { t as ResponsiveSidebarShell } from "../../ResponsiveSidebarShell-DWjULskY.js";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/agents-sdk/ThinkThreadShell.d.ts
|
|
5
|
-
interface ThinkThreadShellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
/**
|
|
7
|
-
* Thread picker or app-owned sidebar shown beside the selected child shell.
|
|
8
|
-
* Use the render form to close the compact drawer when a thread is selected.
|
|
9
|
-
*/
|
|
10
|
-
sidebar: React.ComponentProps<typeof ResponsiveSidebarShell>["sidebar"];
|
|
11
|
-
/** Whether the thread drawer is open. Omit for internal state. */
|
|
12
|
-
sidebarOpen?: boolean;
|
|
13
|
-
/** Initial thread drawer state when `sidebarOpen` is uncontrolled. */
|
|
14
|
-
defaultSidebarOpen?: boolean;
|
|
15
|
-
/** Called when the thread drawer is opened or closed. */
|
|
16
|
-
onSidebarOpenChange?: (open: boolean) => void;
|
|
17
|
-
/** Application bar composed with the shell-owned thread toggle. */
|
|
18
|
-
topBar?: React.ComponentProps<typeof ResponsiveSidebarShell>["topBar"];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Thread-specific adapter for ResponsiveSidebarShell. Callers still own the
|
|
22
|
-
* parent agent, selected child agent, chat hook, and shared workspace.
|
|
23
|
-
*/
|
|
24
|
-
declare function ThinkThreadShell({
|
|
25
|
-
sidebar,
|
|
26
|
-
sidebarOpen,
|
|
27
|
-
defaultSidebarOpen,
|
|
28
|
-
onSidebarOpenChange,
|
|
29
|
-
topBar,
|
|
30
|
-
children,
|
|
31
|
-
className,
|
|
32
|
-
ref,
|
|
33
|
-
...props
|
|
34
|
-
}: ThinkThreadShellProps & {
|
|
35
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
36
|
-
}): React.JSX.Element;
|
|
37
|
-
//#endregion
|
|
38
|
-
export { ThinkThreadShell, ThinkThreadShellProps };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/agents-sdk/ThinkThreadShell.tsx
|
|
6
|
-
/**
|
|
7
|
-
* Thread-specific adapter for ResponsiveSidebarShell. Callers still own the
|
|
8
|
-
* parent agent, selected child agent, chat hook, and shared workspace.
|
|
9
|
-
*/
|
|
10
|
-
function ThinkThreadShell({ sidebar, sidebarOpen, defaultSidebarOpen, onSidebarOpenChange, topBar, children, className, ref, ...props }) {
|
|
11
|
-
return /* @__PURE__ */ jsx(ResponsiveSidebarShell, {
|
|
12
|
-
...props,
|
|
13
|
-
ref,
|
|
14
|
-
className: cx("think-thread-shell", className),
|
|
15
|
-
sidebar,
|
|
16
|
-
sidebarLabel: "threads",
|
|
17
|
-
sidebarOpen,
|
|
18
|
-
defaultSidebarOpen,
|
|
19
|
-
onSidebarOpenChange,
|
|
20
|
-
topBar,
|
|
21
|
-
toolbarLabel: "Thread controls",
|
|
22
|
-
showMainLabel: "Show selected thread",
|
|
23
|
-
children
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
export { ThinkThreadShell };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
|
|
3
|
-
//#region src/components/foundations/Badge.d.ts
|
|
4
|
-
type BadgeVariant = "normal" | "outline" | "ghost" | "link";
|
|
5
|
-
type BadgeColor = "neutral" | "primary" | "success" | "destructive" | "warning";
|
|
6
|
-
interface BadgeVariantsOptions {
|
|
7
|
-
variant?: BadgeVariant | null;
|
|
8
|
-
color?: BadgeColor | null;
|
|
9
|
-
size?: "sm" | "md" | null;
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
declare function badgeVariants({
|
|
13
|
-
variant,
|
|
14
|
-
color,
|
|
15
|
-
size,
|
|
16
|
-
className
|
|
17
|
-
}?: BadgeVariantsOptions): string;
|
|
18
|
-
type BadgeRenderState = {
|
|
19
|
-
slot: "badge";
|
|
20
|
-
variant: BadgeVariant;
|
|
21
|
-
size: "sm" | "md";
|
|
22
|
-
};
|
|
23
|
-
interface BadgeProps extends Omit<useRender.ComponentProps<"span", BadgeRenderState>, "color"> {
|
|
24
|
-
/**
|
|
25
|
-
* The visual rendering style of the badge.
|
|
26
|
-
* @default 'normal'
|
|
27
|
-
*/
|
|
28
|
-
variant?: BadgeVariant;
|
|
29
|
-
/**
|
|
30
|
-
* The semantic color intent of the badge.
|
|
31
|
-
* @default 'primary'
|
|
32
|
-
*/
|
|
33
|
-
color?: BadgeColor;
|
|
34
|
-
/**
|
|
35
|
-
* The size of the badge.
|
|
36
|
-
* @default 'md'
|
|
37
|
-
*/
|
|
38
|
-
size?: "sm" | "md";
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* A badge component for highlighting status, labels, or categories.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```tsx
|
|
45
|
-
* <Badge>Default</Badge>
|
|
46
|
-
* <Badge color="success">Active</Badge>
|
|
47
|
-
* <Badge color="warning">Pending</Badge>
|
|
48
|
-
* <Badge variant="outline">Info</Badge>
|
|
49
|
-
* <Badge render={<a href="/docs" />}>Docs</Badge>
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
declare function Badge({
|
|
53
|
-
variant,
|
|
54
|
-
color,
|
|
55
|
-
size,
|
|
56
|
-
className,
|
|
57
|
-
render,
|
|
58
|
-
ref,
|
|
59
|
-
...props
|
|
60
|
-
}: BadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
61
|
-
//#endregion
|
|
62
|
-
export { Badge, BadgeColor, BadgeProps, BadgeVariant, BadgeVariantsOptions, badgeVariants };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
//#region src/components/foundations/Badge.tsx
|
|
3
|
-
const BADGE_VARIANT_DEFAULT_COLOR = {
|
|
4
|
-
normal: "primary",
|
|
5
|
-
outline: "neutral",
|
|
6
|
-
ghost: "neutral",
|
|
7
|
-
link: "primary"
|
|
8
|
-
};
|
|
9
|
-
function badgeVariants({ variant = "normal", color, size = "md", className } = {}) {
|
|
10
|
-
const badgeVariant = variant ?? "normal";
|
|
11
|
-
return [
|
|
12
|
-
"badge",
|
|
13
|
-
`badge--${badgeVariant}`,
|
|
14
|
-
`badge--${color ?? BADGE_VARIANT_DEFAULT_COLOR[badgeVariant]}`,
|
|
15
|
-
size !== "md" && `badge--${size}`,
|
|
16
|
-
className
|
|
17
|
-
].filter(Boolean).join(" ");
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* A badge component for highlighting status, labels, or categories.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```tsx
|
|
24
|
-
* <Badge>Default</Badge>
|
|
25
|
-
* <Badge color="success">Active</Badge>
|
|
26
|
-
* <Badge color="warning">Pending</Badge>
|
|
27
|
-
* <Badge variant="outline">Info</Badge>
|
|
28
|
-
* <Badge render={<a href="/docs" />}>Docs</Badge>
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
function Badge({ variant = "normal", color, size = "md", className, render, ref, ...props }) {
|
|
32
|
-
const badgeVariant = variant ?? "normal";
|
|
33
|
-
const classes = badgeVariants({
|
|
34
|
-
variant,
|
|
35
|
-
color,
|
|
36
|
-
size,
|
|
37
|
-
className
|
|
38
|
-
});
|
|
39
|
-
return useRender({
|
|
40
|
-
defaultTagName: "span",
|
|
41
|
-
render,
|
|
42
|
-
ref,
|
|
43
|
-
props: {
|
|
44
|
-
...props,
|
|
45
|
-
className: classes
|
|
46
|
-
},
|
|
47
|
-
state: {
|
|
48
|
-
slot: "badge",
|
|
49
|
-
variant: badgeVariant,
|
|
50
|
-
size
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { Badge, badgeVariants };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { BadgeProps } from "./Badge.js";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/foundations/StatusPill.d.ts
|
|
5
|
-
interface StatusPillProps extends BadgeProps {
|
|
6
|
-
/**
|
|
7
|
-
* Whether the state this reports is still ongoing. A live state pulses; a
|
|
8
|
-
* settled one holds still, so "Live" and "Ended" are told apart without
|
|
9
|
-
* reading either word.
|
|
10
|
-
*/
|
|
11
|
-
busy?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Replaces the dot for states that have a picture — a spinner while a run
|
|
14
|
-
* starts, a check once it lands.
|
|
15
|
-
*/
|
|
16
|
-
icon?: React.ReactNode;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* A short state report: an indicator, then the state itself.
|
|
20
|
-
*
|
|
21
|
-
* This is a `Badge` with an indicator in front, not a second kind of chip, so
|
|
22
|
-
* `variant`, `color`, and `size` mean here exactly what they mean there. What
|
|
23
|
-
* it adds is the dot and its pulse, which several surfaces had been writing
|
|
24
|
-
* out by hand.
|
|
25
|
-
*
|
|
26
|
-
* It reports; it does not ask. A state that needs the user to do something is
|
|
27
|
-
* `AgentAttention`.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```tsx
|
|
31
|
-
* <StatusPill busy color="destructive" size="sm">Live</StatusPill>
|
|
32
|
-
* <StatusPill color="success" icon={<CheckIcon />}>Passed</StatusPill>
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
declare function StatusPill({
|
|
36
|
-
busy,
|
|
37
|
-
className,
|
|
38
|
-
icon,
|
|
39
|
-
children,
|
|
40
|
-
...props
|
|
41
|
-
}: StatusPillProps): React.JSX.Element;
|
|
42
|
-
//#endregion
|
|
43
|
-
export { StatusPill, StatusPillProps };
|