@mcp-b/react-components 0.39.0 → 0.41.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/AppTopBar-ZdgmB_Lu.d.ts +97 -0
- package/dist/{CodeBlock-DO4Hdu1R.js → CodeBlock-BjELA-_s.js} +1 -1
- package/dist/{FileTree-DbQMpvxV.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-DyGHj01E.d.ts} +1 -1
- package/dist/{ThinkExecutionRun-lYYgyeE1.d.ts → ThinkExecutionRun-k8bpyXqt.d.ts} +3 -3
- package/dist/Toolbar-CBOseBQr.d.ts +152 -0
- package/dist/{WorkspaceFileView-D0r7xnq5.js → WorkspaceFileView-D0yFwoDr.js} +3 -3
- package/dist/{WorkspaceMessageResponse-Cy28WGSz.d.ts → WorkspaceMessageResponse-D66ty4FO.d.ts} +1 -1
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChat.js +41 -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 +72 -25
- package/dist/components/agents-sdk/BrowserRunPanel.js +111 -70
- package/dist/components/agents-sdk/ManagerOffice.d.ts +156 -0
- package/dist/components/agents-sdk/ManagerOffice.js +662 -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 +79 -61
- 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/ThinkChatToolPanels.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +43 -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 -38
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +18 -6
- package/dist/components/agents-sdk/ThinkFullApp.js +112 -144
- 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.js +69 -89
- 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 +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +1 -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 +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.js +1 -1
- 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.d.ts +21 -10
- package/dist/components/extension/ChatGptSignInScreen.js +42 -34
- 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/Toolbar.d.ts +1 -151
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/AppTopBar.d.ts +1 -90
- 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/ResponsiveSidebarShell.d.ts +95 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +90 -34
- 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 +1 -1
- package/dist/components/general-purpose/WebPreview.js +4 -12
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
- package/dist/components/nanites/AgentToolDetail.js +7 -7
- package/dist/components/nanites/NaniteScene.js +11 -11
- package/dist/{copy-button-4YvddK4e.js → copy-button-lys9N_aI.js} +1 -1
- package/dist/{icons-BGZ916hb.d.ts → icons-0corjfxR.d.ts} +6 -16
- package/dist/{icons-B4mGvCvc.js → icons-CVFSeTJn.js} +3 -5
- package/dist/styles/agent-attention.css +5 -5
- package/dist/styles/agent-chat.css +47 -12
- package/dist/styles/agent-tool-detail.css +2 -12
- package/dist/styles/app-icon.css +12 -18
- package/dist/styles/app-top-bar.css +32 -6
- 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-run-panel.css +20 -16
- package/dist/styles/chatgpt-sign-in-screen.css +11 -5
- package/dist/styles/commit.css +24 -1
- package/dist/styles/environment-variables.css +3 -0
- package/dist/styles/index.css +5 -4
- package/dist/styles/manager-office.css +486 -0
- package/dist/styles/mcp-plugin-catalog.css +39 -35
- package/dist/styles/mcp-server-picker.css +1 -1
- package/dist/styles/message.css +41 -18
- package/dist/styles/nanite-scene.css +9 -9
- package/dist/styles/pricing-page.css +12 -8
- package/dist/styles/prompt-input.css +8 -13
- package/dist/styles/recipes.css +1 -57
- package/dist/styles/responsive-sidebar-shell.css +70 -20
- package/dist/styles/subagent-run.css +20 -3
- package/dist/styles/terminal.css +19 -0
- package/dist/styles/test-results.css +10 -1
- package/dist/styles/think-execution-status.css +8 -24
- package/dist/styles/think-execution-workbench.css +98 -105
- package/dist/styles/think-full-app.css +81 -185
- package/dist/styles/think-routine-library.css +0 -40
- package/dist/styles/think-thread-picker.css +8 -3
- package/dist/styles/transition-surface.css +7 -8
- package/dist/styles/utilities.css +42 -0
- package/dist/styles/web-preview.css +28 -5
- package/dist/styles/workspace-explorer.css +4 -23
- package/dist/styles/workspace-mount-manager.css +22 -0
- package/package.json +37 -35
- package/dist/ResponsiveSidebarShell-DWjULskY.d.ts +0 -68
- 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
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { C as FileIcon, J as SpinnerIcon, j as McpIcon, rt as XIcon, tt as WarningIcon } from "../../icons-B4mGvCvc.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 { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
|
|
7
|
-
import { AppIcon } from "../foundations/AppIcon.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 };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import { Badge } from "./Badge.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/foundations/StatusPill.tsx
|
|
6
|
-
/**
|
|
7
|
-
* A short state report: an indicator, then the state itself.
|
|
8
|
-
*
|
|
9
|
-
* This is a `Badge` with an indicator in front, not a second kind of chip, so
|
|
10
|
-
* `variant`, `color`, and `size` mean here exactly what they mean there. What
|
|
11
|
-
* it adds is the dot and its pulse, which several surfaces had been writing
|
|
12
|
-
* out by hand.
|
|
13
|
-
*
|
|
14
|
-
* It reports; it does not ask. A state that needs the user to do something is
|
|
15
|
-
* `AgentAttention`.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* <StatusPill busy color="destructive" size="sm">Live</StatusPill>
|
|
20
|
-
* <StatusPill color="success" icon={<CheckIcon />}>Passed</StatusPill>
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
function StatusPill({ busy = false, className, icon, children, ...props }) {
|
|
24
|
-
return /* @__PURE__ */ jsxs(Badge, {
|
|
25
|
-
className: cx("status-pill", className),
|
|
26
|
-
"data-busy": busy || void 0,
|
|
27
|
-
...props,
|
|
28
|
-
children: [icon ?? /* @__PURE__ */ jsx("span", {
|
|
29
|
-
"aria-hidden": "true",
|
|
30
|
-
className: "status-pill__dot"
|
|
31
|
-
}), children]
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { StatusPill };
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/general-purpose/Shell.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Props for the Shell.Root component.
|
|
6
|
-
*/
|
|
7
|
-
interface ShellRootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
-
/** Additional CSS class names */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** The heading text displayed in the header */
|
|
11
|
-
heading?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Props for the Shell.ActionBar component.
|
|
15
|
-
*/
|
|
16
|
-
interface ShellActionBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
|
-
/** Additional CSS class names */
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Props for the Shell.Action component.
|
|
22
|
-
*/
|
|
23
|
-
interface ShellActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
24
|
-
/** Additional CSS class names */
|
|
25
|
-
className?: string;
|
|
26
|
-
/** Icon to display */
|
|
27
|
-
icon?: React.ReactNode;
|
|
28
|
-
/** Whether this action is currently active */
|
|
29
|
-
active?: boolean;
|
|
30
|
-
/** Accessible label for the action */
|
|
31
|
-
label?: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Props for the Shell.Panel component.
|
|
35
|
-
*/
|
|
36
|
-
interface ShellPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
37
|
-
/** Additional CSS class names */
|
|
38
|
-
className?: string;
|
|
39
|
-
/** The panel heading */
|
|
40
|
-
heading?: string;
|
|
41
|
-
/** Whether the panel is visible */
|
|
42
|
-
open?: boolean;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Props for the Shell.Content component.
|
|
46
|
-
*/
|
|
47
|
-
interface ShellContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
48
|
-
/** Additional CSS class names */
|
|
49
|
-
className?: string;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Root container for the shell layout.
|
|
53
|
-
* Provides a structured layout with optional header, action bar, panel, and content areas.
|
|
54
|
-
*/
|
|
55
|
-
declare function ShellRoot({
|
|
56
|
-
className,
|
|
57
|
-
heading,
|
|
58
|
-
children,
|
|
59
|
-
ref,
|
|
60
|
-
...props
|
|
61
|
-
}: ShellRootProps & {
|
|
62
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
63
|
-
}): React.JSX.Element;
|
|
64
|
-
/**
|
|
65
|
-
* Container for action buttons that toggle panels.
|
|
66
|
-
* Typically placed on the left side of the shell.
|
|
67
|
-
*/
|
|
68
|
-
declare function ShellActionBar({
|
|
69
|
-
className,
|
|
70
|
-
children,
|
|
71
|
-
ref,
|
|
72
|
-
...props
|
|
73
|
-
}: ShellActionBarProps & {
|
|
74
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
75
|
-
}): React.JSX.Element;
|
|
76
|
-
/**
|
|
77
|
-
* An action button within the action bar.
|
|
78
|
-
*/
|
|
79
|
-
declare function ShellAction({
|
|
80
|
-
className,
|
|
81
|
-
icon,
|
|
82
|
-
active,
|
|
83
|
-
label,
|
|
84
|
-
ref,
|
|
85
|
-
...props
|
|
86
|
-
}: ShellActionProps & {
|
|
87
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
88
|
-
}): React.JSX.Element;
|
|
89
|
-
/**
|
|
90
|
-
* A collapsible panel that slides in from the side.
|
|
91
|
-
*/
|
|
92
|
-
declare function ShellPanel({
|
|
93
|
-
className,
|
|
94
|
-
heading,
|
|
95
|
-
open,
|
|
96
|
-
children,
|
|
97
|
-
ref,
|
|
98
|
-
...props
|
|
99
|
-
}: ShellPanelProps & {
|
|
100
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
101
|
-
}): React.JSX.Element;
|
|
102
|
-
/**
|
|
103
|
-
* The main content area of the shell.
|
|
104
|
-
*/
|
|
105
|
-
declare function ShellContent({
|
|
106
|
-
className,
|
|
107
|
-
children,
|
|
108
|
-
ref,
|
|
109
|
-
...props
|
|
110
|
-
}: ShellContentProps & {
|
|
111
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
112
|
-
}): React.JSX.Element;
|
|
113
|
-
/**
|
|
114
|
-
* A shell layout component with an icon action bar, a collapsible side panel,
|
|
115
|
-
* and a content canvas. Useful for map applications and other interactive
|
|
116
|
-
* tools where a full chat or sidebar chrome (see ResponsiveSidebarShell) is
|
|
117
|
-
* too heavy.
|
|
118
|
-
*
|
|
119
|
-
* @example
|
|
120
|
-
* ```tsx
|
|
121
|
-
* const [filterOpen, setFilterOpen] = useState(false);
|
|
122
|
-
*
|
|
123
|
-
* <Shell.Root heading="My Map Application">
|
|
124
|
-
* <Shell.ActionBar>
|
|
125
|
-
* <Shell.Action
|
|
126
|
-
* icon={<FilterIcon />}
|
|
127
|
-
* active={filterOpen}
|
|
128
|
-
* onClick={() => setFilterOpen(!filterOpen)}
|
|
129
|
-
* label="Filter"
|
|
130
|
-
* />
|
|
131
|
-
* </Shell.ActionBar>
|
|
132
|
-
* <Shell.Panel heading="Filter" open={filterOpen}>
|
|
133
|
-
* <p>Filter controls here</p>
|
|
134
|
-
* </Shell.Panel>
|
|
135
|
-
* <Shell.Content>
|
|
136
|
-
* <div id="map" />
|
|
137
|
-
* </Shell.Content>
|
|
138
|
-
* </Shell.Root>
|
|
139
|
-
* ```
|
|
140
|
-
*/
|
|
141
|
-
declare const Shell: {
|
|
142
|
-
Root: typeof ShellRoot;
|
|
143
|
-
ActionBar: typeof ShellActionBar;
|
|
144
|
-
Action: typeof ShellAction;
|
|
145
|
-
Panel: typeof ShellPanel;
|
|
146
|
-
Content: typeof ShellContent;
|
|
147
|
-
};
|
|
148
|
-
//#endregion
|
|
149
|
-
export { Shell, ShellActionBarProps, ShellActionProps, ShellContentProps, ShellPanelProps, ShellRootProps };
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { t as cx } from "../../class-names-BiMDVpUo.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/general-purpose/Shell.tsx
|
|
5
|
-
/**
|
|
6
|
-
* Root container for the shell layout.
|
|
7
|
-
* Provides a structured layout with optional header, action bar, panel, and content areas.
|
|
8
|
-
*/
|
|
9
|
-
function ShellRoot({ className, heading, children, ref, ...props }) {
|
|
10
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
-
ref,
|
|
12
|
-
className: cx("shell", className),
|
|
13
|
-
...props,
|
|
14
|
-
children: [heading && /* @__PURE__ */ jsx("header", {
|
|
15
|
-
className: "shell__header",
|
|
16
|
-
children: /* @__PURE__ */ jsx("h3", {
|
|
17
|
-
className: "shell__heading",
|
|
18
|
-
children: heading
|
|
19
|
-
})
|
|
20
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
21
|
-
className: "shell__body",
|
|
22
|
-
children
|
|
23
|
-
})]
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Container for action buttons that toggle panels.
|
|
28
|
-
* Typically placed on the left side of the shell.
|
|
29
|
-
*/
|
|
30
|
-
function ShellActionBar({ className, children, ref, ...props }) {
|
|
31
|
-
return /* @__PURE__ */ jsx("div", {
|
|
32
|
-
ref,
|
|
33
|
-
className: cx("shell__action-bar", className),
|
|
34
|
-
...props,
|
|
35
|
-
children
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* An action button within the action bar.
|
|
40
|
-
*/
|
|
41
|
-
function ShellAction({ className, icon, active, label, ref, ...props }) {
|
|
42
|
-
return /* @__PURE__ */ jsx("button", {
|
|
43
|
-
ref,
|
|
44
|
-
className: cx("shell__action", active && "shell__action--active", className),
|
|
45
|
-
"aria-label": label,
|
|
46
|
-
"aria-pressed": active,
|
|
47
|
-
...props,
|
|
48
|
-
children: icon
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* A collapsible panel that slides in from the side.
|
|
53
|
-
*/
|
|
54
|
-
function ShellPanel({ className, heading, open = false, children, ref, ...props }) {
|
|
55
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
56
|
-
ref,
|
|
57
|
-
className: cx("shell__panel", open && "shell__panel--open", className),
|
|
58
|
-
hidden: !open,
|
|
59
|
-
...props,
|
|
60
|
-
children: [heading && /* @__PURE__ */ jsx("div", {
|
|
61
|
-
className: "shell__panel-heading",
|
|
62
|
-
children: heading
|
|
63
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
64
|
-
className: "shell__panel-content",
|
|
65
|
-
children
|
|
66
|
-
})]
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* The main content area of the shell.
|
|
71
|
-
*/
|
|
72
|
-
function ShellContent({ className, children, ref, ...props }) {
|
|
73
|
-
return /* @__PURE__ */ jsx("div", {
|
|
74
|
-
ref,
|
|
75
|
-
className: cx("shell__content", className),
|
|
76
|
-
...props,
|
|
77
|
-
children
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* A shell layout component with an icon action bar, a collapsible side panel,
|
|
82
|
-
* and a content canvas. Useful for map applications and other interactive
|
|
83
|
-
* tools where a full chat or sidebar chrome (see ResponsiveSidebarShell) is
|
|
84
|
-
* too heavy.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```tsx
|
|
88
|
-
* const [filterOpen, setFilterOpen] = useState(false);
|
|
89
|
-
*
|
|
90
|
-
* <Shell.Root heading="My Map Application">
|
|
91
|
-
* <Shell.ActionBar>
|
|
92
|
-
* <Shell.Action
|
|
93
|
-
* icon={<FilterIcon />}
|
|
94
|
-
* active={filterOpen}
|
|
95
|
-
* onClick={() => setFilterOpen(!filterOpen)}
|
|
96
|
-
* label="Filter"
|
|
97
|
-
* />
|
|
98
|
-
* </Shell.ActionBar>
|
|
99
|
-
* <Shell.Panel heading="Filter" open={filterOpen}>
|
|
100
|
-
* <p>Filter controls here</p>
|
|
101
|
-
* </Shell.Panel>
|
|
102
|
-
* <Shell.Content>
|
|
103
|
-
* <div id="map" />
|
|
104
|
-
* </Shell.Content>
|
|
105
|
-
* </Shell.Root>
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
const Shell = {
|
|
109
|
-
Root: ShellRoot,
|
|
110
|
-
ActionBar: ShellActionBar,
|
|
111
|
-
Action: ShellAction,
|
|
112
|
-
Panel: ShellPanel,
|
|
113
|
-
Content: ShellContent
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
|
-
export { Shell };
|