@mcp-b/react-components 0.12.0 → 0.13.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-CRmsKg9B.d.ts → AgentChat-Br6tKEl8.d.ts} +29 -5
- package/dist/{Button-Ct5I6aTu.d.ts → Button-FX_hpqxm.d.ts} +8 -11
- package/dist/{CodeBlock-XNQOupQ3.js → CodeBlock-BUFXG8HW.js} +22 -12
- package/dist/{CodeBlock-CxQXv3C4.d.ts → CodeBlock-DUh9WOGo.d.ts} +13 -7
- package/dist/{Combobox-D9anamNr.d.ts → Combobox-B9Fcd6q-.d.ts} +4 -14
- package/dist/{FileTree-wMyZhhHO.js → FileTree-mpEIcfzA.js} +1 -1
- package/dist/{Menu-BLhnNnRK.d.ts → Menu-Bgu-ufb5.d.ts} +26 -65
- package/dist/{ModelSelector-BB-xB-Es.js → ModelSelector-DVgVBdvw.js} +7 -7
- package/dist/{PromptInput-IyM6ZETj.d.ts → PromptInput-p5KmOmt1.d.ts} +302 -46
- package/dist/Select-Dl_vF_Bt.d.ts +213 -0
- package/dist/{Tabs-D9EAq09D.d.ts → Tabs-3Zc4tb9D.d.ts} +9 -6
- package/dist/{ThinkChat-B3wYahor.js → ThinkChat-7DQ2CogF.js} +34 -2
- package/dist/{ThinkChatActivity-F4KFPcJA.d.ts → ThinkChatActivity-Cuk28Js_.d.ts} +1 -1
- package/dist/{attachment-preview-ChtC3HiU.js → attachment-preview-DIs50Q0h.js} +3 -3
- package/dist/components/Accordion.d.ts +17 -6
- package/dist/components/Accordion.js +23 -36
- package/dist/components/Activity.d.ts +5 -5
- package/dist/components/Activity.js +9 -9
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +304 -116
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/AlertDialog.d.ts +40 -32
- package/dist/components/AlertDialog.js +46 -39
- package/dist/components/Artifact.d.ts +1 -1
- package/dist/components/Artifact.js +5 -5
- package/dist/components/Autocomplete.js +10 -2
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/Avatar.js +3 -3
- package/dist/components/Badge.d.ts +11 -14
- package/dist/components/Badge.js +10 -18
- package/dist/components/BrowserLiveView.js +26 -36
- package/dist/components/BrowserReplay.js +4 -4
- package/dist/components/BrowserRunPanel.js +1 -1
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Button.js +7 -30
- package/dist/components/ChainOfThought.d.ts +5 -5
- package/dist/components/ChainOfThought.js +8 -5
- package/dist/components/ChatGptSignInScreen.js +3 -3
- package/dist/components/Checkbox.d.ts +10 -2
- package/dist/components/Checkbox.js +13 -6
- package/dist/components/CheckboxGroup.d.ts +6 -6
- package/dist/components/CheckboxGroup.js +6 -6
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.d.ts +23 -28
- package/dist/components/CodexModelSelector.js +116 -94
- package/dist/components/Collapsible.d.ts +2 -4
- package/dist/components/Collapsible.js +9 -7
- package/dist/components/Combobox.d.ts +2 -2
- package/dist/components/Combobox.js +20 -22
- package/dist/components/Commit.d.ts +5 -5
- package/dist/components/Commit.js +6 -6
- package/dist/components/Context.js +5 -1
- package/dist/components/ContextMenu.d.ts +20 -72
- package/dist/components/ContextMenu.js +46 -56
- package/dist/components/Conversation.d.ts +1 -1
- package/dist/components/Conversation.js +1 -1
- package/dist/components/Dialog.d.ts +38 -30
- package/dist/components/Dialog.js +46 -34
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +5 -5
- package/dist/components/Field.d.ts +3 -3
- package/dist/components/Field.js +7 -8
- package/dist/components/Fieldset.d.ts +2 -2
- package/dist/components/Fieldset.js +2 -2
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Label.d.ts +1 -1
- package/dist/components/Label.js +1 -1
- package/dist/components/McpServerPicker.js +21 -19
- package/dist/components/Menu.d.ts +2 -2
- package/dist/components/Menu.js +39 -49
- package/dist/components/Menubar.d.ts +16 -52
- package/dist/components/Menubar.js +44 -56
- package/dist/components/Message.d.ts +1 -1
- package/dist/components/Message.js +6 -6
- package/dist/components/MessageScroller.d.ts +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/Meter.js +5 -0
- package/dist/components/ModelSelector.d.ts +1 -1
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.d.ts +3 -14
- package/dist/components/NavigationMenu.js +22 -38
- package/dist/components/NumberField.js +6 -0
- package/dist/components/Popover.d.ts +21 -44
- package/dist/components/Popover.js +33 -23
- package/dist/components/PreviewCard.d.ts +20 -18
- package/dist/components/PreviewCard.js +30 -20
- package/dist/components/PricingPage.js +30 -29
- package/dist/components/Progress.d.ts +7 -3
- package/dist/components/Progress.js +9 -4
- package/dist/components/PromptInput.d.ts +2 -2
- package/dist/components/PromptInput.js +139 -54
- package/dist/components/Queue.d.ts +7 -7
- package/dist/components/Queue.js +6 -6
- package/dist/components/RadioGroup.d.ts +10 -9
- package/dist/components/RadioGroup.js +8 -9
- package/dist/components/Reasoning.d.ts +4 -4
- package/dist/components/Reasoning.js +10 -6
- package/dist/components/ScrollArea.d.ts +2 -9
- package/dist/components/ScrollArea.js +5 -23
- package/dist/components/Select.d.ts +2 -2
- package/dist/components/Select.js +100 -134
- package/dist/components/Slider.d.ts +10 -7
- package/dist/components/Slider.js +12 -11
- package/dist/components/Sources.d.ts +4 -4
- package/dist/components/Sources.js +8 -5
- package/dist/components/Stepper.js +1 -1
- package/dist/components/Switch.d.ts +6 -3
- package/dist/components/Switch.js +7 -4
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +9 -4
- package/dist/components/Task.d.ts +4 -4
- package/dist/components/Task.js +10 -6
- package/dist/components/Terminal.d.ts +2 -2
- package/dist/components/Terminal.js +5 -5
- package/dist/components/TestResults.d.ts +4 -4
- package/dist/components/TestResults.js +5 -5
- package/dist/components/ThinkChat.d.ts +9 -2
- package/dist/components/ThinkChat.js +1 -1
- package/dist/components/ThinkChatActivity.d.ts +1 -1
- package/dist/components/ThinkChatActivity.js +1 -1
- package/dist/components/ThinkChatToolPanels.js +8 -8
- package/dist/components/ThinkExecutionWorkbench.js +28 -28
- package/dist/components/ThinkFullApp.js +8 -8
- package/dist/components/ThinkThreadPicker.js +1 -1
- package/dist/components/ThinkThreadShell.js +5 -5
- package/dist/components/Toast.js +7 -0
- package/dist/components/ToggleGroup.d.ts +6 -2
- package/dist/components/ToggleGroup.js +6 -2
- package/dist/components/Toolbar.js +6 -0
- package/dist/components/Tooltip.d.ts +36 -27
- package/dist/components/Tooltip.js +45 -29
- package/dist/components/WebPreview.d.ts +1 -1
- package/dist/components/WebPreview.js +3 -3
- package/dist/components/WorkspaceExplorer.d.ts +6 -8
- package/dist/components/WorkspaceExplorer.js +6 -6
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-C6JSKtFE.js → copy-button-DUMLYdsk.js} +7 -6
- package/dist/{copy-button-BKXqGiNm.d.ts → copy-button-DtPMgN7e.d.ts} +3 -2
- package/dist/icons-Ba9THQKz.js +64 -0
- package/dist/icons-CUCz_Sft.d.ts +210 -0
- package/dist/styles/accessibility.css +14 -0
- package/dist/styles/accordion.css +21 -61
- package/dist/styles/activity.css +23 -58
- package/dist/styles/agent-chat.css +45 -4
- package/dist/styles/agent-connection.css +8 -10
- package/dist/styles/alert-dialog.css +20 -26
- package/dist/styles/artifact.css +6 -6
- package/dist/styles/attachment-preview.css +1 -1
- package/dist/styles/autocomplete.css +5 -170
- package/dist/styles/avatar.css +8 -8
- package/dist/styles/badge.css +8 -10
- package/dist/styles/base-ui-motion.css +176 -0
- package/dist/styles/base.css +19 -25
- package/dist/styles/browser-live-view.css +7 -7
- package/dist/styles/browser-replay.css +5 -5
- package/dist/styles/browser-run-panel.css +5 -5
- package/dist/styles/button.css +48 -43
- package/dist/styles/card.css +3 -5
- package/dist/styles/chain-of-thought.css +14 -70
- package/dist/styles/chatgpt-sign-in-screen.css +3 -3
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +3 -7
- package/dist/styles/code-block.css +10 -10
- package/dist/styles/codex-model-selector.css +33 -44
- package/dist/styles/collapsible.css +11 -27
- package/dist/styles/combobox.css +3 -149
- package/dist/styles/commit.css +19 -35
- package/dist/styles/context-menu.css +1 -77
- package/dist/styles/context.css +12 -12
- package/dist/styles/conversation.css +7 -7
- package/dist/styles/dialog.css +34 -55
- package/dist/styles/environment-variables.css +10 -10
- package/dist/styles/field.css +16 -58
- package/dist/styles/fieldset.css +2 -2
- package/dist/styles/file-tree.css +7 -9
- package/dist/styles/index.css +8 -1
- package/dist/styles/input.css +1 -51
- package/dist/styles/label.css +2 -2
- package/dist/styles/marker.css +2 -4
- package/dist/styles/mcp-server-picker.css +5 -5
- package/dist/styles/menu.css +6 -153
- package/dist/styles/menubar.css +6 -105
- package/dist/styles/message-scroller.css +1 -1
- package/dist/styles/message.css +86 -8
- package/dist/styles/meter.css +4 -20
- package/dist/styles/model-selector.css +13 -13
- package/dist/styles/navigation-menu.css +14 -54
- package/dist/styles/number-field.css +8 -23
- package/dist/styles/popover.css +13 -68
- package/dist/styles/preview-card.css +5 -46
- package/dist/styles/pricing-page.css +43 -43
- package/dist/styles/progress.css +7 -16
- package/dist/styles/prompt-input.css +95 -44
- package/dist/styles/queue.css +12 -28
- package/dist/styles/radio.css +4 -8
- package/dist/styles/reasoning.css +3 -62
- package/dist/styles/recipes.css +475 -0
- package/dist/styles/select.css +7 -103
- package/dist/styles/shell.css +3 -3
- package/dist/styles/slider.css +5 -7
- package/dist/styles/sources.css +9 -66
- package/dist/styles/stepper.css +16 -14
- package/dist/styles/streamdown.css +9 -9
- package/dist/styles/switch.css +4 -7
- package/dist/styles/tabs.css +7 -8
- package/dist/styles/task.css +13 -42
- package/dist/styles/terminal.css +7 -7
- package/dist/styles/test-results.css +21 -37
- package/dist/styles/think-execution-workbench.css +23 -23
- package/dist/styles/think-full-app.css +12 -20
- package/dist/styles/think-resize-handle.css +2 -2
- package/dist/styles/think-thread-picker.css +19 -10
- package/dist/styles/think-thread-shell.css +7 -7
- package/dist/styles/toast.css +14 -25
- package/dist/styles/toggle-group.css +16 -14
- package/dist/styles/toggle.css +14 -15
- package/dist/styles/toolbar.css +13 -25
- package/dist/styles/tooltip.css +6 -16
- package/dist/styles/web-preview.css +15 -15
- package/dist/styles/workspace-explorer.css +14 -13
- package/dist/utils/codex-model-catalog.d.ts +142 -0
- package/dist/utils/codex-model-catalog.js +112 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +8 -2
- package/dist/Select-CRsKCJ9x.d.ts +0 -200
- package/dist/icons-CbjtbIJK.d.ts +0 -51
- package/dist/icons-D2Q5n5C1.js +0 -291
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import { jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
4
4
|
//#region src/components/AlertDialog.tsx
|
|
5
5
|
/**
|
|
@@ -8,27 +8,28 @@ import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```tsx
|
|
11
|
-
* <AlertDialog>
|
|
12
|
-
* <
|
|
13
|
-
* <
|
|
14
|
-
* <
|
|
15
|
-
* <
|
|
16
|
-
* <
|
|
17
|
-
* <
|
|
11
|
+
* <AlertDialog.Root>
|
|
12
|
+
* <AlertDialog.Trigger>Delete Account</AlertDialog.Trigger>
|
|
13
|
+
* <AlertDialog.Portal>
|
|
14
|
+
* <AlertDialog.Backdrop />
|
|
15
|
+
* <AlertDialog.Viewport>
|
|
16
|
+
* <AlertDialog.Popup>
|
|
17
|
+
* <AlertDialog.Title>Are you sure?</AlertDialog.Title>
|
|
18
|
+
* <AlertDialog.Description>
|
|
18
19
|
* This action cannot be undone.
|
|
19
|
-
* </
|
|
20
|
+
* </AlertDialog.Description>
|
|
20
21
|
* <div style={{ display: "flex", gap: "0.5rem", justifyContent: "flex-end" }}>
|
|
21
|
-
* <
|
|
22
|
-
* <
|
|
22
|
+
* <AlertDialog.Close>Cancel</AlertDialog.Close>
|
|
23
|
+
* <AlertDialog.Close variant="destructive">Delete</AlertDialog.Close>
|
|
23
24
|
* </div>
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* </AlertDialog.Popup>
|
|
26
|
+
* </AlertDialog.Viewport>
|
|
27
|
+
* </AlertDialog.Portal>
|
|
28
|
+
* </AlertDialog.Root>
|
|
27
29
|
* ```
|
|
28
30
|
*
|
|
29
31
|
* @see {@link https://base-ui.com/react/components/alert-dialog | Base UI Alert Dialog}
|
|
30
32
|
*/
|
|
31
|
-
const AlertDialog = AlertDialog$1.Root;
|
|
32
33
|
function AlertDialogTrigger({ className = "", ref, ...props }) {
|
|
33
34
|
const classes = ["alert-dialog__trigger", className].filter(Boolean).join(" ");
|
|
34
35
|
return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
|
|
@@ -38,9 +39,12 @@ function AlertDialogTrigger({ className = "", ref, ...props }) {
|
|
|
38
39
|
...props
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
|
-
const AlertDialogPortal = AlertDialog$1.Portal;
|
|
42
42
|
function AlertDialogBackdrop({ className = "", ref, ...props }) {
|
|
43
|
-
const classes = [
|
|
43
|
+
const classes = [
|
|
44
|
+
"alert-dialog__backdrop",
|
|
45
|
+
"base-ui-backdrop",
|
|
46
|
+
className
|
|
47
|
+
].filter(Boolean).join(" ");
|
|
44
48
|
return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
|
|
45
49
|
ref,
|
|
46
50
|
"data-slot": "alert-dialog-overlay",
|
|
@@ -48,7 +52,15 @@ function AlertDialogBackdrop({ className = "", ref, ...props }) {
|
|
|
48
52
|
...props
|
|
49
53
|
});
|
|
50
54
|
}
|
|
51
|
-
|
|
55
|
+
function AlertDialogViewport({ className = "", ref, ...props }) {
|
|
56
|
+
const classes = ["alert-dialog__viewport", className].filter(Boolean).join(" ");
|
|
57
|
+
return /* @__PURE__ */ jsx(AlertDialog$1.Viewport, {
|
|
58
|
+
ref,
|
|
59
|
+
"data-slot": "alert-dialog-viewport",
|
|
60
|
+
className: classes,
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
}
|
|
52
64
|
function AlertDialogPopup({ size = "md", className = "", ref, ...props }) {
|
|
53
65
|
const classes = [
|
|
54
66
|
"alert-dialog__popup",
|
|
@@ -62,12 +74,6 @@ function AlertDialogPopup({ size = "md", className = "", ref, ...props }) {
|
|
|
62
74
|
...props
|
|
63
75
|
});
|
|
64
76
|
}
|
|
65
|
-
function AlertDialogContent({ ref, ...props }) {
|
|
66
|
-
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogBackdrop, {}), /* @__PURE__ */ jsx(AlertDialogPopup, {
|
|
67
|
-
ref,
|
|
68
|
-
...props
|
|
69
|
-
})] });
|
|
70
|
-
}
|
|
71
77
|
function AlertDialogHeader({ className = "", ref, ...props }) {
|
|
72
78
|
return /* @__PURE__ */ jsx("div", {
|
|
73
79
|
ref,
|
|
@@ -123,19 +129,20 @@ function AlertDialogClose({ variant = "secondary", className = "", ref, ...props
|
|
|
123
129
|
...props
|
|
124
130
|
});
|
|
125
131
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
const AlertDialog = {
|
|
133
|
+
Root: AlertDialog$1.Root,
|
|
134
|
+
Trigger: AlertDialogTrigger,
|
|
135
|
+
Portal: AlertDialog$1.Portal,
|
|
136
|
+
Backdrop: AlertDialogBackdrop,
|
|
137
|
+
Viewport: AlertDialogViewport,
|
|
138
|
+
Popup: AlertDialogPopup,
|
|
139
|
+
Header: AlertDialogHeader,
|
|
140
|
+
Footer: AlertDialogFooter,
|
|
141
|
+
Media: AlertDialogMedia,
|
|
142
|
+
Title: AlertDialogTitle,
|
|
143
|
+
Description: AlertDialogDescription,
|
|
144
|
+
Close: AlertDialogClose,
|
|
145
|
+
createHandle: AlertDialog$1.createHandle
|
|
146
|
+
};
|
|
140
147
|
//#endregion
|
|
141
|
-
export { AlertDialog
|
|
148
|
+
export { AlertDialog };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { z as XIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Tooltip
|
|
4
|
+
import { Tooltip } from "./Tooltip.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/Artifact.tsx
|
|
@@ -91,17 +91,17 @@ function ArtifactAction({ className, label, tooltip, icon, children, ...props })
|
|
|
91
91
|
}) : null]
|
|
92
92
|
});
|
|
93
93
|
if (!tooltip) return button;
|
|
94
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
94
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: button }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: tooltip }) }) })] });
|
|
95
95
|
}
|
|
96
96
|
function ArtifactClose({ className, label = "Close", children, ...props }) {
|
|
97
|
-
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(
|
|
97
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
98
98
|
variant: "ghost",
|
|
99
99
|
size: "icon",
|
|
100
100
|
"aria-label": label,
|
|
101
101
|
className: cx("artifact__close", className),
|
|
102
102
|
...props,
|
|
103
103
|
children: children ?? /* @__PURE__ */ jsx(XIcon, {})
|
|
104
|
-
}) }), /* @__PURE__ */ jsx(
|
|
104
|
+
}) }), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Popup, { children: label }) }) })] });
|
|
105
105
|
}
|
|
106
106
|
function ArtifactContent({ className, children, ref, ...props }) {
|
|
107
107
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -30,7 +30,11 @@ function Clear({ className = "", ref, ...props }) {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
function Positioner({ className = "", ref, ...props }) {
|
|
33
|
-
const classes = [
|
|
33
|
+
const classes = [
|
|
34
|
+
"autocomplete__positioner",
|
|
35
|
+
"base-ui-positioner",
|
|
36
|
+
className
|
|
37
|
+
].filter(Boolean).join(" ");
|
|
34
38
|
return /* @__PURE__ */ jsx(Autocomplete$1.Positioner, {
|
|
35
39
|
ref,
|
|
36
40
|
"data-slot": "autocomplete-positioner",
|
|
@@ -39,7 +43,11 @@ function Positioner({ className = "", ref, ...props }) {
|
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
function Popup({ className = "", ref, ...props }) {
|
|
42
|
-
const classes = [
|
|
46
|
+
const classes = [
|
|
47
|
+
"autocomplete__popup",
|
|
48
|
+
"base-ui-popup",
|
|
49
|
+
className
|
|
50
|
+
].filter(Boolean).join(" ");
|
|
43
51
|
return /* @__PURE__ */ jsx(Autocomplete$1.Popup, {
|
|
44
52
|
ref,
|
|
45
53
|
"data-slot": "autocomplete-content",
|
|
@@ -122,7 +122,7 @@ declare function AvatarBadge({
|
|
|
122
122
|
*
|
|
123
123
|
* @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
|
|
124
124
|
*/
|
|
125
|
-
declare const Avatar:
|
|
125
|
+
declare const Avatar: {
|
|
126
126
|
Root: typeof AvatarRoot;
|
|
127
127
|
Image: typeof AvatarImage;
|
|
128
128
|
Fallback: typeof AvatarFallback;
|
|
@@ -131,4 +131,4 @@ declare const Avatar: typeof AvatarRoot & {
|
|
|
131
131
|
Badge: typeof AvatarBadge;
|
|
132
132
|
};
|
|
133
133
|
//#endregion
|
|
134
|
-
export { Avatar,
|
|
134
|
+
export { Avatar, AvatarBadgeProps, AvatarFallbackProps, AvatarGroupCountProps, AvatarGroupProps, AvatarImageProps, AvatarRootProps };
|
|
@@ -106,13 +106,13 @@ function AvatarBadge({ className = "", ref, ...props }) {
|
|
|
106
106
|
*
|
|
107
107
|
* @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
|
|
108
108
|
*/
|
|
109
|
-
const Avatar =
|
|
109
|
+
const Avatar = {
|
|
110
110
|
Root: AvatarRoot,
|
|
111
111
|
Image: AvatarImage,
|
|
112
112
|
Fallback: AvatarFallback,
|
|
113
113
|
Group: AvatarGroup,
|
|
114
114
|
GroupCount: AvatarGroupCount,
|
|
115
115
|
Badge: AvatarBadge
|
|
116
|
-
}
|
|
116
|
+
};
|
|
117
117
|
//#endregion
|
|
118
|
-
export { Avatar
|
|
118
|
+
export { Avatar };
|
|
@@ -3,9 +3,8 @@ import * as React from "react";
|
|
|
3
3
|
//#region src/components/Badge.d.ts
|
|
4
4
|
type BadgeVariant = "normal" | "outline" | "ghost" | "link";
|
|
5
5
|
type BadgeColor = "neutral" | "primary" | "success" | "destructive" | "warning";
|
|
6
|
-
type ShadcnBadgeVariant = "default" | "secondary" | "destructive" | "outline" | "ghost" | "link";
|
|
7
6
|
interface BadgeVariantsOptions {
|
|
8
|
-
variant?:
|
|
7
|
+
variant?: BadgeVariant | null;
|
|
9
8
|
color?: BadgeColor | null;
|
|
10
9
|
size?: "sm" | "md" | null;
|
|
11
10
|
className?: string;
|
|
@@ -16,12 +15,15 @@ declare function badgeVariants({
|
|
|
16
15
|
size,
|
|
17
16
|
className
|
|
18
17
|
}?: BadgeVariantsOptions): string;
|
|
18
|
+
type SlottableBadgeProps = React.HTMLAttributes<HTMLElement> & {
|
|
19
|
+
ref?: React.Ref<HTMLElement>;
|
|
20
|
+
};
|
|
19
21
|
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
20
22
|
/**
|
|
21
23
|
* The visual rendering style of the badge.
|
|
22
|
-
* @default '
|
|
24
|
+
* @default 'normal'
|
|
23
25
|
*/
|
|
24
|
-
variant?:
|
|
26
|
+
variant?: BadgeVariant;
|
|
25
27
|
/**
|
|
26
28
|
* The semantic color intent of the badge.
|
|
27
29
|
* @default 'primary'
|
|
@@ -32,13 +34,8 @@ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
32
34
|
* @default 'md'
|
|
33
35
|
*/
|
|
34
36
|
size?: "sm" | "md";
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
*
|
|
38
|
-
* Mirrors shadcn's `asChild` API for link badges and custom elements.
|
|
39
|
-
* @default false
|
|
40
|
-
*/
|
|
41
|
-
asChild?: boolean;
|
|
37
|
+
/** Replaces the default span while preserving badge props and styles. */
|
|
38
|
+
render?: React.ReactElement<SlottableBadgeProps>;
|
|
42
39
|
}
|
|
43
40
|
/**
|
|
44
41
|
* A badge component for highlighting status, labels, or categories.
|
|
@@ -49,7 +46,7 @@ interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
49
46
|
* <Badge color="success">Active</Badge>
|
|
50
47
|
* <Badge color="warning">Pending</Badge>
|
|
51
48
|
* <Badge variant="outline">Info</Badge>
|
|
52
|
-
* <Badge
|
|
49
|
+
* <Badge render={<a href="/docs" />}>Docs</Badge>
|
|
53
50
|
* ```
|
|
54
51
|
*/
|
|
55
52
|
declare function Badge({
|
|
@@ -57,7 +54,7 @@ declare function Badge({
|
|
|
57
54
|
color,
|
|
58
55
|
size,
|
|
59
56
|
className,
|
|
60
|
-
|
|
57
|
+
render,
|
|
61
58
|
children,
|
|
62
59
|
ref,
|
|
63
60
|
...props
|
|
@@ -65,4 +62,4 @@ declare function Badge({
|
|
|
65
62
|
ref?: React.Ref<HTMLSpanElement>;
|
|
66
63
|
}): React.JSX.Element;
|
|
67
64
|
//#endregion
|
|
68
|
-
export { Badge, BadgeColor, BadgeProps, BadgeVariant, BadgeVariantsOptions,
|
|
65
|
+
export { Badge, BadgeColor, BadgeProps, BadgeVariant, BadgeVariantsOptions, badgeVariants };
|
package/dist/components/Badge.js
CHANGED
|
@@ -2,27 +2,18 @@ import { n as mergeRefs } from "../merge-refs-DF_7w2x_.js";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Badge.tsx
|
|
5
|
-
const SHADCN_BADGE_VARIANT = {
|
|
6
|
-
default: ["normal", "primary"],
|
|
7
|
-
secondary: ["normal", "neutral"],
|
|
8
|
-
destructive: ["normal", "destructive"],
|
|
9
|
-
outline: ["outline", "neutral"],
|
|
10
|
-
ghost: ["ghost", "neutral"],
|
|
11
|
-
link: ["link", "primary"]
|
|
12
|
-
};
|
|
13
5
|
const BADGE_VARIANT_DEFAULT_COLOR = {
|
|
14
6
|
normal: "primary",
|
|
15
7
|
outline: "neutral",
|
|
16
8
|
ghost: "neutral",
|
|
17
9
|
link: "primary"
|
|
18
10
|
};
|
|
19
|
-
function badgeVariants({ variant = "
|
|
20
|
-
const badgeVariant = variant ?? "
|
|
21
|
-
const mapped = badgeVariant === "normal" || badgeVariant === "outline" || badgeVariant === "ghost" || badgeVariant === "link" ? [badgeVariant, color ?? BADGE_VARIANT_DEFAULT_COLOR[badgeVariant]] : SHADCN_BADGE_VARIANT[badgeVariant];
|
|
11
|
+
function badgeVariants({ variant = "normal", color, size = "md", className } = {}) {
|
|
12
|
+
const badgeVariant = variant ?? "normal";
|
|
22
13
|
return [
|
|
23
14
|
"badge",
|
|
24
|
-
`badge--${
|
|
25
|
-
`badge--${color ??
|
|
15
|
+
`badge--${badgeVariant}`,
|
|
16
|
+
`badge--${color ?? BADGE_VARIANT_DEFAULT_COLOR[badgeVariant]}`,
|
|
26
17
|
size !== "md" && `badge--${size}`,
|
|
27
18
|
className
|
|
28
19
|
].filter(Boolean).join(" ");
|
|
@@ -63,23 +54,24 @@ function mergeSlottedBadgeProps(childProps, badgeProps) {
|
|
|
63
54
|
* <Badge color="success">Active</Badge>
|
|
64
55
|
* <Badge color="warning">Pending</Badge>
|
|
65
56
|
* <Badge variant="outline">Info</Badge>
|
|
66
|
-
* <Badge
|
|
57
|
+
* <Badge render={<a href="/docs" />}>Docs</Badge>
|
|
67
58
|
* ```
|
|
68
59
|
*/
|
|
69
|
-
function Badge({ variant = "
|
|
70
|
-
const badgeVariant = variant ?? "
|
|
60
|
+
function Badge({ variant = "normal", color, size = "md", className, render, children, ref, ...props }) {
|
|
61
|
+
const badgeVariant = variant ?? "normal";
|
|
71
62
|
const classes = badgeVariants({
|
|
72
63
|
variant,
|
|
73
64
|
color,
|
|
74
65
|
size,
|
|
75
66
|
className
|
|
76
67
|
});
|
|
77
|
-
if (
|
|
68
|
+
if (React.isValidElement(render)) return React.cloneElement(render, mergeSlottedBadgeProps(render.props, {
|
|
78
69
|
...props,
|
|
79
70
|
ref,
|
|
80
71
|
className: classes,
|
|
81
72
|
"data-slot": "badge",
|
|
82
|
-
"data-variant": badgeVariant
|
|
73
|
+
"data-variant": badgeVariant,
|
|
74
|
+
children
|
|
83
75
|
}));
|
|
84
76
|
return /* @__PURE__ */ jsx("span", {
|
|
85
77
|
ref,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as SpinnerIcon, x as MaximizeIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Dialog
|
|
4
|
+
import { Dialog } from "./Dialog.js";
|
|
5
5
|
import { Badge } from "./Badge.js";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -42,7 +42,6 @@ function EndedState({ title, detail }) {
|
|
|
42
42
|
function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, ...props }) {
|
|
43
43
|
const [expired, setExpired] = React.useState(() => receivedAt !== void 0 && receivedAt + source.expiresInMs <= Date.now());
|
|
44
44
|
const [frameState, setFrameState] = React.useState("loading");
|
|
45
|
-
const [expandedOpen, setExpandedOpen] = React.useState(false);
|
|
46
45
|
React.useEffect(() => {
|
|
47
46
|
const remaining = (receivedAt ?? Date.now()) + source.expiresInMs - Date.now();
|
|
48
47
|
if (remaining <= 0) {
|
|
@@ -99,40 +98,31 @@ function BrowserLiveView({ source, receivedAt, pageTitle, fallback, className, .
|
|
|
99
98
|
...props,
|
|
100
99
|
className: cx("browser-live-view", className),
|
|
101
100
|
"data-expired": expired || failed || void 0,
|
|
102
|
-
children: [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
children: live ? /* @__PURE__ */ jsx("iframe", {
|
|
125
|
-
src: source.url,
|
|
126
|
-
title: frameTitle,
|
|
127
|
-
allow: "clipboard-read; clipboard-write"
|
|
128
|
-
}) : fallback ?? /* @__PURE__ */ jsx(EndedState, {
|
|
129
|
-
title: failed ? "Live view unavailable" : "Live view ended",
|
|
130
|
-
detail: pageTitle
|
|
131
|
-
})
|
|
132
|
-
})]
|
|
101
|
+
children: [view, /* @__PURE__ */ jsxs(Dialog.Root, { children: [/* @__PURE__ */ jsx(Dialog.Trigger, { render: /* @__PURE__ */ jsx(Button, {
|
|
102
|
+
variant: "ghost",
|
|
103
|
+
color: "neutral",
|
|
104
|
+
size: "icon-xs",
|
|
105
|
+
className: "browser-live-view__expand",
|
|
106
|
+
"aria-label": "Expand browser view",
|
|
107
|
+
children: /* @__PURE__ */ jsx(MaximizeIcon, {})
|
|
108
|
+
}) }), /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {}), /* @__PURE__ */ jsx(Dialog.Viewport, { children: /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
109
|
+
size: "fullscreen",
|
|
110
|
+
className: "browser-live-view__dialog",
|
|
111
|
+
children: [/* @__PURE__ */ jsx(Dialog.Title, {
|
|
112
|
+
className: "browser-live-view__dialog-title",
|
|
113
|
+
children: frameTitle
|
|
114
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
115
|
+
className: "browser-live-view__dialog-body",
|
|
116
|
+
children: live ? /* @__PURE__ */ jsx("iframe", {
|
|
117
|
+
src: source.url,
|
|
118
|
+
title: frameTitle,
|
|
119
|
+
allow: "clipboard-read; clipboard-write"
|
|
120
|
+
}) : fallback ?? /* @__PURE__ */ jsx(EndedState, {
|
|
121
|
+
title: failed ? "Live view unavailable" : "Live view ended",
|
|
122
|
+
detail: pageTitle
|
|
133
123
|
})
|
|
134
|
-
})
|
|
135
|
-
]
|
|
124
|
+
})]
|
|
125
|
+
}) })] })] })]
|
|
136
126
|
});
|
|
137
127
|
}
|
|
138
128
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { E as PauseIcon, O as PlayIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { Slider
|
|
4
|
+
import { Slider } from "./Slider.js";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Replayer } from "@rrweb/replay";
|
|
@@ -161,7 +161,7 @@ function BrowserReplay({ className, events, autoPlay, ref, ...props }) {
|
|
|
161
161
|
onClick: handlePlayPause,
|
|
162
162
|
children: isPlaying ? /* @__PURE__ */ jsx(PauseIcon, {}) : /* @__PURE__ */ jsx(PlayIcon, {})
|
|
163
163
|
}),
|
|
164
|
-
/* @__PURE__ */ jsx(Slider, {
|
|
164
|
+
/* @__PURE__ */ jsx(Slider.Root, {
|
|
165
165
|
className: "browser-replay__scrubber",
|
|
166
166
|
min: 0,
|
|
167
167
|
max: Math.max(duration, 1),
|
|
@@ -169,7 +169,7 @@ function BrowserReplay({ className, events, autoPlay, ref, ...props }) {
|
|
|
169
169
|
value: Math.min(currentTime, duration),
|
|
170
170
|
disabled,
|
|
171
171
|
onValueChange: handleScrub,
|
|
172
|
-
children: /* @__PURE__ */ jsx(
|
|
172
|
+
children: /* @__PURE__ */ jsx(Slider.Control, { children: /* @__PURE__ */ jsxs(Slider.Track, { children: [/* @__PURE__ */ jsx(Slider.Indicator, {}), /* @__PURE__ */ jsx(Slider.Thumb, { "aria-label": "Replay position" })] }) })
|
|
173
173
|
}),
|
|
174
174
|
/* @__PURE__ */ jsxs("span", {
|
|
175
175
|
className: "browser-replay__time",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as SpinnerIcon, z as XIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
4
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
5
5
|
import { WebPreview, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl } from "./WebPreview.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ButtonVariant,
|
|
2
|
-
export { Button, ButtonColor, ButtonProps, ButtonSize, ButtonVariant, ButtonVariantsOptions,
|
|
1
|
+
import { a as ButtonVariant, i as ButtonSize, n as ButtonColor, o as ButtonVariantsOptions, r as ButtonProps, s as buttonVariants, t as Button } from "../Button-FX_hpqxm.js";
|
|
2
|
+
export { Button, ButtonColor, ButtonProps, ButtonSize, ButtonVariant, ButtonVariantsOptions, buttonVariants };
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
3
3
|
//#region src/components/Button.tsx
|
|
4
|
-
|
|
5
|
-
default: ["normal", "primary"],
|
|
6
|
-
destructive: ["normal", "destructive"],
|
|
7
|
-
outline: ["outline", "neutral"],
|
|
8
|
-
secondary: ["normal", "neutral"],
|
|
9
|
-
ghost: ["ghost", "neutral"],
|
|
10
|
-
link: ["link", "primary"]
|
|
11
|
-
};
|
|
12
|
-
const SHADCN_BUTTON_SIZE = {
|
|
13
|
-
default: "md",
|
|
14
|
-
xs: "xs",
|
|
15
|
-
sm: "sm",
|
|
16
|
-
lg: "lg",
|
|
17
|
-
icon: "icon",
|
|
18
|
-
"icon-xs": "icon-xs",
|
|
19
|
-
"icon-sm": "icon-sm",
|
|
20
|
-
"icon-lg": "icon-lg"
|
|
21
|
-
};
|
|
22
|
-
function buttonVariants({ variant = "default", color, size = "default", className } = {}) {
|
|
23
|
-
const buttonVariant = variant ?? "default";
|
|
24
|
-
const mapped = buttonVariant === "normal" || buttonVariant === "outline" || buttonVariant === "ghost" || buttonVariant === "link" ? [buttonVariant, color ?? "primary"] : SHADCN_BUTTON_VARIANT[buttonVariant];
|
|
25
|
-
const requestedSize = size ?? "default";
|
|
26
|
-
const buttonSize = requestedSize === "default" ? "md" : SHADCN_BUTTON_SIZE[requestedSize] ?? requestedSize;
|
|
4
|
+
function buttonVariants({ variant = "normal", color = "primary", size = "md", className } = {}) {
|
|
27
5
|
return [
|
|
28
6
|
"button",
|
|
29
|
-
`button--${
|
|
30
|
-
`button--${color ??
|
|
31
|
-
`button--${
|
|
7
|
+
`button--${variant ?? "normal"}`,
|
|
8
|
+
`button--${color ?? "primary"}`,
|
|
9
|
+
`button--${size ?? "md"}`,
|
|
32
10
|
className
|
|
33
11
|
].filter(Boolean).join(" ");
|
|
34
12
|
}
|
|
@@ -37,8 +15,8 @@ function buttonVariants({ variant = "default", color, size = "default", classNam
|
|
|
37
15
|
*
|
|
38
16
|
* Separates visual style (`variant`) from color intent (`color`) for
|
|
39
17
|
* maximum flexibility. Supports keyboard navigation, focus management, and
|
|
40
|
-
* accessibility out of the box.
|
|
41
|
-
*
|
|
18
|
+
* accessibility out of the box. Styling uses the design system's canonical
|
|
19
|
+
* visual variant, semantic color, and size axes.
|
|
42
20
|
*
|
|
43
21
|
* @example
|
|
44
22
|
* ```tsx
|
|
@@ -49,9 +27,8 @@ function buttonVariants({ variant = "default", color, size = "default", classNam
|
|
|
49
27
|
* ```
|
|
50
28
|
*
|
|
51
29
|
* @see {@link https://base-ui.com/react/components/button | Base UI Button}
|
|
52
|
-
* @see {@link https://ui.shadcn.com/docs/components/base/button | shadcn/ui Button}
|
|
53
30
|
*/
|
|
54
|
-
function Button({ variant = "
|
|
31
|
+
function Button({ variant = "normal", color = "primary", size = "md", className, nativeButton, ref, ...props }) {
|
|
55
32
|
return /* @__PURE__ */ jsx(Button$1, {
|
|
56
33
|
ref,
|
|
57
34
|
"data-slot": "button",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as IconProps } from "../icons-
|
|
1
|
+
import { Collapsible } from "./Collapsible.js";
|
|
2
|
+
import { v as IconProps } from "../icons-CUCz_Sft.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ChainOfThought.d.ts
|
|
6
|
-
interface ChainOfThoughtProps extends Omit<
|
|
6
|
+
interface ChainOfThoughtProps extends Omit<React.ComponentProps<typeof Collapsible.Root>, "className" | "unstyled"> {
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
@@ -38,7 +38,7 @@ declare function ChainOfThought({
|
|
|
38
38
|
}: ChainOfThoughtProps & {
|
|
39
39
|
ref?: React.Ref<HTMLDivElement>;
|
|
40
40
|
}): React.JSX.Element;
|
|
41
|
-
interface ChainOfThoughtHeaderProps extends Omit<
|
|
41
|
+
interface ChainOfThoughtHeaderProps extends Omit<React.ComponentProps<typeof Collapsible.Trigger>, "className" | "unstyled"> {
|
|
42
42
|
className?: string;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
@@ -52,7 +52,7 @@ declare function ChainOfThoughtHeader({
|
|
|
52
52
|
}: ChainOfThoughtHeaderProps & {
|
|
53
53
|
ref?: React.Ref<HTMLButtonElement>;
|
|
54
54
|
}): React.JSX.Element;
|
|
55
|
-
interface ChainOfThoughtContentProps extends Omit<
|
|
55
|
+
interface ChainOfThoughtContentProps extends Omit<React.ComponentProps<typeof Collapsible.Panel>, "className" | "unstyled"> {
|
|
56
56
|
className?: string;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Collapsible } from "./Collapsible.js";
|
|
2
2
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
3
|
-
import {
|
|
3
|
+
import { N as SpinnerIcon, a as CheckIcon, c as ChevronRightIcon, u as DotIcon } from "../icons-Ba9THQKz.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/ChainOfThought.tsx
|
|
@@ -30,7 +30,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
function ChainOfThought({ className, ref, ...props }) {
|
|
33
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
+
return /* @__PURE__ */ jsx(Collapsible.Root, {
|
|
34
34
|
ref,
|
|
35
35
|
className: cx("chain-of-thought", className),
|
|
36
36
|
...props,
|
|
@@ -41,12 +41,14 @@ function ChainOfThought({ className, ref, ...props }) {
|
|
|
41
41
|
* Clickable header row that toggles the reasoning trace.
|
|
42
42
|
*/
|
|
43
43
|
function ChainOfThoughtHeader({ className, children = "Chain of Thought", ref, ...props }) {
|
|
44
|
-
return /* @__PURE__ */ jsxs(
|
|
44
|
+
return /* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
45
45
|
ref,
|
|
46
|
+
"data-slot": "chain-of-thought-trigger",
|
|
46
47
|
className: cx("chain-of-thought__header", className),
|
|
47
48
|
...props,
|
|
48
49
|
unstyled: true,
|
|
49
50
|
children: [/* @__PURE__ */ jsx("span", {
|
|
51
|
+
"data-slot": "chain-of-thought-trigger-icon",
|
|
50
52
|
className: "chain-of-thought__header-icon",
|
|
51
53
|
"aria-hidden": "true",
|
|
52
54
|
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
@@ -60,8 +62,9 @@ function ChainOfThoughtHeader({ className, children = "Chain of Thought", ref, .
|
|
|
60
62
|
* Collapsible panel containing step rows.
|
|
61
63
|
*/
|
|
62
64
|
function ChainOfThoughtContent({ className, children, ref, ...props }) {
|
|
63
|
-
return /* @__PURE__ */ jsx(
|
|
65
|
+
return /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
64
66
|
ref,
|
|
67
|
+
"data-slot": "chain-of-thought-content",
|
|
65
68
|
className: cx("chain-of-thought__content", className),
|
|
66
69
|
...props,
|
|
67
70
|
unstyled: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { N as SpinnerIcon } from "../icons-Ba9THQKz.js";
|
|
3
3
|
import { Button } from "./Button.js";
|
|
4
|
-
import { u as ModelSelectorLogo } from "../ModelSelector-
|
|
4
|
+
import { u as ModelSelectorLogo } from "../ModelSelector-DVgVBdvw.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/ChatGptSignInScreen.tsx
|
|
@@ -40,7 +40,7 @@ function ChatGptSignInScreen({ busy = false, error = false, label = "Sign in wit
|
|
|
40
40
|
] })]
|
|
41
41
|
}), /* @__PURE__ */ jsxs(Button, {
|
|
42
42
|
type: "button",
|
|
43
|
-
variant: "
|
|
43
|
+
variant: "normal",
|
|
44
44
|
color: error ? "destructive" : "primary",
|
|
45
45
|
size: "lg",
|
|
46
46
|
className: "chatgpt-sign-in__button",
|