@mcp-b/react-components 0.34.1 → 0.36.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-CV-GuYA6.d.ts → AgentChat-CVO7xyLC.d.ts} +22 -3
- package/dist/{CodeBlock-CM5gfmdq.js → CodeBlock-Bk4nn7l-.js} +4 -3
- package/dist/{CodeBlock-DzGhYyNe.d.ts → CodeBlock-C380GD5t.d.ts} +2 -5
- package/dist/{Dialog-DeOSJ0Oy.d.ts → Dialog-B_FhRWaz.d.ts} +22 -37
- package/dist/{Menu-DVmjBIuM.d.ts → Menu-yb6QXWA3.d.ts} +64 -75
- package/dist/{PromptInput-DOyee1kM.d.ts → PromptInput-BRX7FhjH.d.ts} +7 -272
- package/dist/ResponsiveSidebarShell-DWjULskY.d.ts +68 -0
- package/dist/{Select-D96d09ww.d.ts → Select-RrceeEIe.d.ts} +17 -52
- package/dist/{ThinkChat-en0UbkVv.js → ThinkChat-ByR-QT_D.js} +19 -12
- package/dist/{ThinkChatActivity-CgqpROz_.d.ts → ThinkChatActivity-Dkmm2pIj.d.ts} +1 -1
- package/dist/{ToggleGroup-CSBWfPXo.d.ts → ToggleGroup-BrQZOQn_.d.ts} +4 -6
- package/dist/{WorkspaceFile-C8Riev9j.d.ts → WorkspaceFile-BLaFmMrt.d.ts} +18 -2
- package/dist/{WorkspaceFileView-BtzVKAed.js → WorkspaceFileView-DTHJLKW_.js} +11 -17
- package/dist/components/agents-sdk/AgentChat.d.ts +2 -2
- package/dist/components/agents-sdk/AgentChat.js +47 -26
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +47 -1
- package/dist/components/agents-sdk/BrowserReplay.d.ts +40 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +14 -15
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.js +17 -24
- package/dist/components/agents-sdk/McpServerPicker.d.ts +2 -2
- package/dist/components/agents-sdk/McpServerPicker.js +19 -17
- package/dist/components/agents-sdk/ModelSelector.d.ts +9 -9
- package/dist/components/agents-sdk/ModelSelector.js +504 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/SubagentRunDetails.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +18 -95
- package/dist/components/agents-sdk/ThinkChat.js +2 -12
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +2 -4
- package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +1 -1
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +3 -8
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +5 -3
- package/dist/components/agents-sdk/ThinkExecutionRun.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +2 -2
- package/dist/components/agents-sdk/ThinkFullApp.d.ts +4 -4
- package/dist/components/agents-sdk/ThinkFullApp.js +12 -14
- package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkPendingApproval.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +5 -4
- package/dist/components/agents-sdk/ThinkRoutineForm.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineLibrary.d.ts +2 -3
- package/dist/components/agents-sdk/ThinkRoutineLibrary.js +11 -15
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -4
- package/dist/components/agents-sdk/ThinkThreadShell.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.d.ts +140 -2
- package/dist/components/agents-sdk/Workspace.js +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +32 -5
- package/dist/components/agents-sdk/WorkspaceExplorer.js +3 -5
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceFile.js +41 -4
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
- package/dist/components/ai-sdk/Activity.d.ts +5 -0
- package/dist/components/ai-sdk/Activity.js +33 -13
- package/dist/components/ai-sdk/Approval.d.ts +1 -2
- package/dist/components/ai-sdk/Approval.js +4 -7
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/Context.js +1 -1
- package/dist/components/ai-sdk/Goal.js +1 -1
- package/dist/components/ai-sdk/Message.js +2 -6
- package/dist/components/ai-sdk/MessageScroller.d.ts +5 -0
- package/dist/components/ai-sdk/MessageScroller.js +18 -12
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +18 -10
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +2 -2
- package/dist/components/ai-sdk/PromptInput.js +124 -127
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.d.ts +3 -4
- package/dist/components/ai-sdk/Reasoning.js +29 -13
- package/dist/components/ai-sdk/ToolInvocation.d.ts +3 -5
- package/dist/components/ai-sdk/ToolInvocation.js +2 -2
- package/dist/components/extension/ChatGptSignInScreen.js +2 -2
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +1 -1
- package/dist/components/extension/ConversationTabPicker.js +1 -1
- package/dist/components/foundations/Accordion.d.ts +1 -3
- package/dist/components/foundations/Accordion.js +1 -3
- package/dist/components/foundations/AlertDialog.d.ts +16 -36
- package/dist/components/foundations/Autocomplete.d.ts +12 -33
- package/dist/components/foundations/Autocomplete.js +2 -1
- package/dist/components/foundations/Combobox.d.ts +119 -2
- package/dist/components/foundations/Combobox.js +6 -23
- package/dist/components/foundations/ContextMenu.d.ts +50 -57
- package/dist/components/foundations/ContextMenu.js +4 -28
- package/dist/components/foundations/DescriptionList.d.ts +34 -2
- package/dist/components/foundations/DescriptionList.js +33 -2
- package/dist/components/foundations/Dialog.d.ts +1 -1
- package/dist/components/foundations/Dialog.js +2 -1
- package/dist/components/foundations/EmptyState.d.ts +5 -2
- package/dist/components/foundations/EmptyState.js +11 -7
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menu.js +3 -21
- package/dist/components/foundations/Menubar.d.ts +35 -64
- package/dist/components/foundations/Menubar.js +3 -22
- package/dist/components/foundations/Popover.d.ts +8 -21
- package/dist/components/foundations/Popover.js +3 -48
- package/dist/components/foundations/PreviewCard.d.ts +44 -29
- package/dist/components/foundations/PreviewCard.js +3 -6
- package/dist/components/foundations/RadioGroup.d.ts +4 -6
- package/dist/components/foundations/Select.d.ts +1 -1
- package/dist/components/foundations/Select.js +7 -21
- package/dist/components/foundations/Slider.d.ts +31 -44
- package/dist/components/foundations/Slider.js +26 -25
- package/dist/components/foundations/Stepper.d.ts +3 -3
- package/dist/components/foundations/Stepper.js +5 -6
- package/dist/components/foundations/ToggleGroup.d.ts +1 -1
- package/dist/components/foundations/Tooltip.d.ts +6 -8
- package/dist/components/foundations/Tooltip.js +4 -3
- package/dist/components/general-purpose/Commit.js +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +1 -1
- package/dist/components/general-purpose/PricingBillingToggle.d.ts +2 -3
- package/dist/components/general-purpose/PricingBillingToggle.js +4 -22
- package/dist/components/general-purpose/PricingPage.d.ts +3 -4
- package/dist/components/general-purpose/ResizableSidePanel.js +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -67
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +7 -2
- package/dist/components/general-purpose/SettingsFormDialog.js +18 -3
- package/dist/components/general-purpose/Terminal.js +3 -3
- package/dist/components/general-purpose/ThemeModeControl.js +1 -1
- package/dist/components/general-purpose/WebPreview.js +4 -4
- package/dist/components/nanites/AgentConnection.js +16 -11
- package/dist/components/nanites/AgentToolDetail.js +6 -7
- package/dist/{format-CmopcfqJ.js → format-DB2mX9DA.js} +16 -1
- package/dist/{mcp-server-U71zhxFF.js → mcp-server-SD_S-IpB.js} +18 -2
- package/dist/message-scroller-C8cplcQO.js +32 -0
- package/dist/{progress-ring-Dz_ztrW2.js → progress-ring-BEocM1e3.js} +1 -1
- package/dist/provider-logos-zjZycgV6.js +74 -0
- package/dist/styles/agent-chat.css +25 -0
- package/dist/styles/agent-connection.css +4 -31
- package/dist/styles/agent-tool-detail.css +0 -7
- package/dist/styles/alert-dialog.css +0 -2
- package/dist/styles/base-ui-motion.css +7 -5
- package/dist/styles/chatgpt-sign-in-screen.css +5 -3
- package/dist/styles/dialog.css +0 -2
- package/dist/styles/field.css +2 -2
- package/dist/styles/model-selector.css +30 -12
- package/dist/styles/popover.css +0 -1
- package/dist/styles/preview-card.css +0 -4
- package/dist/styles/pricing-page.css +1 -13
- package/dist/styles/prompt-input.css +12 -10
- package/dist/styles/recipes.css +22 -14
- package/dist/styles/slider.css +2 -2
- package/dist/styles/think-execution-workbench.css +9 -13
- package/dist/styles/think-routine-library.css +2 -30
- package/dist/styles/tooltip.css +0 -1
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +17 -7
- package/dist/BrowserLiveView-tJTWkoyu.d.ts +0 -48
- package/dist/BrowserReplay-B0BQZr-N.d.ts +0 -41
- package/dist/Combobox-WrrDDaEv.d.ts +0 -154
- package/dist/ModelSelector-DzdEs2fX.js +0 -504
- package/dist/Workspace-EhvvlHOB.d.ts +0 -278
- package/dist/WorkspaceExplorer-DygQnEyi.d.ts +0 -32
- package/dist/components/foundations/DescriptionListParts.d.ts +0 -37
- package/dist/components/foundations/DescriptionListParts.js +0 -35
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as AgentMessageRenderPartContext } from "./AgentMessageParts-C7L-Mv9U.js";
|
|
2
2
|
import { n as AgentChatStartScreenProps } from "./AgentChatStartScreen-CO49yepa.js";
|
|
3
|
-
import {
|
|
3
|
+
import { D as PromptInputCommandDefinition, F as PromptInputDictationProps, K as PromptInputMessage, M as PromptInputContextSelectorProps, Q as PromptInputReference, n as PermissionMode } from "./PromptInput-BRX7FhjH.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { ChatAddToolApproveResponseFunction, ChatStatus, UIMessage } from "ai";
|
|
6
6
|
import { PendingApproval, Think } from "@cloudflare/think";
|
|
@@ -8,6 +8,13 @@ import { AgentStub } from "agents/client";
|
|
|
8
8
|
import { UseVoiceInputReturn } from "@cloudflare/voice/react";
|
|
9
9
|
|
|
10
10
|
//#region src/components/agents-sdk/AgentChat.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* The affordance for a compaction that is running right now, for the `notice`
|
|
13
|
+
* slot. Exported because Think's session frames report the same state from
|
|
14
|
+
* outside this component's own `/compact` lifecycle, and one running
|
|
15
|
+
* compaction must not read two ways.
|
|
16
|
+
*/
|
|
17
|
+
declare const compactingNotice: React.JSX.Element;
|
|
11
18
|
interface AgentChatRenderMessageContext<MessageT extends UIMessage = UIMessage> {
|
|
12
19
|
message: MessageT;
|
|
13
20
|
messageIndex: number;
|
|
@@ -87,6 +94,17 @@ interface AgentChatProps<MessageT extends UIMessage = UIMessage> {
|
|
|
87
94
|
disabled?: boolean;
|
|
88
95
|
/** Rendered in place of the transcript while `messages` is empty. */
|
|
89
96
|
emptyState?: React.ReactNode;
|
|
97
|
+
/**
|
|
98
|
+
* Renders the transcript region as loading and holds the composer inert.
|
|
99
|
+
* This is the transcript of a conversation that exists and has not arrived —
|
|
100
|
+
* distinct from `emptyState`, which describes one that has no messages — so
|
|
101
|
+
* it also withholds the start screen's invitation to begin a first turn.
|
|
102
|
+
*
|
|
103
|
+
* A host's Suspense fallback uses it to keep the surrounding shell mounted
|
|
104
|
+
* and interactive: a transcript read that never resolves then leaves every
|
|
105
|
+
* exit reachable instead of replacing the app with a spinner.
|
|
106
|
+
*/
|
|
107
|
+
loading?: boolean;
|
|
90
108
|
/**
|
|
91
109
|
* First-turn composition that places the live composer between a welcoming
|
|
92
110
|
* heading and app-authored starter descriptors. It is the default when
|
|
@@ -273,8 +291,9 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
|
|
|
273
291
|
onStop,
|
|
274
292
|
onPromptQueued,
|
|
275
293
|
placeholder,
|
|
276
|
-
disabled,
|
|
294
|
+
disabled: composerDisabled,
|
|
277
295
|
emptyState,
|
|
296
|
+
loading,
|
|
278
297
|
startScreen,
|
|
279
298
|
composerHeader,
|
|
280
299
|
composerTray,
|
|
@@ -305,4 +324,4 @@ declare function AgentChat<MessageT extends UIMessage = UIMessage>({
|
|
|
305
324
|
ref?: React.Ref<HTMLDivElement>;
|
|
306
325
|
}): React.JSX.Element;
|
|
307
326
|
//#endregion
|
|
308
|
-
export { PermissionModeControl as a, AgentChatRenderMessageContext as i, AgentChatComposerDraft as n, AgentChatProps as r, AgentChat as t };
|
|
327
|
+
export { PermissionModeControl as a, AgentChatRenderMessageContext as i, AgentChatComposerDraft as n, compactingNotice as o, AgentChatProps as r, AgentChat as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { Select } from "./components/foundations/Select.js";
|
|
3
2
|
import { t as CopyButton } from "./copy-button-CsNSSKYG.js";
|
|
3
|
+
import { Select } from "./components/foundations/Select.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { createHighlighter } from "shiki";
|
|
@@ -187,15 +187,16 @@ function CodeBlockCopyButton({ className, label = "Copy code", timeout = 2e3, on
|
|
|
187
187
|
function CodeBlockLanguageSelector({ children, className, languages = CODE_BLOCK_LANGUAGES, onValueChange, ref, value, ...props }) {
|
|
188
188
|
const { language, setLanguage } = useCodeBlockContext();
|
|
189
189
|
const handleValueChange = React.useCallback((next, eventDetails) => {
|
|
190
|
-
setLanguage(next);
|
|
191
190
|
onValueChange?.(next, eventDetails);
|
|
191
|
+
if (eventDetails.isCanceled || next === null) return;
|
|
192
|
+
setLanguage(next);
|
|
192
193
|
}, [onValueChange, setLanguage]);
|
|
193
194
|
return /* @__PURE__ */ jsx("div", {
|
|
194
195
|
ref,
|
|
195
196
|
className: cx("code-block__language-selector", className),
|
|
196
197
|
children: /* @__PURE__ */ jsx(Select.Root, {
|
|
197
198
|
...props,
|
|
198
|
-
value: value
|
|
199
|
+
value: value === void 0 ? language : value,
|
|
199
200
|
onValueChange: handleValueChange,
|
|
200
201
|
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CodeBlockLanguageSelectorTrigger, {
|
|
201
202
|
"aria-label": "Code language",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as SelectProps, t as Select } from "./Select-
|
|
1
|
+
import { m as SelectProps, t as Select } from "./Select-RrceeEIe.js";
|
|
2
2
|
import { t as CopyButtonProps } from "./copy-button-C0JyjClr.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { BundledLanguage } from "shiki";
|
|
@@ -108,11 +108,8 @@ declare function CodeBlockCopyButton({
|
|
|
108
108
|
onClick,
|
|
109
109
|
...props
|
|
110
110
|
}: CodeBlockCopyButtonProps): React.JSX.Element;
|
|
111
|
-
interface CodeBlockLanguageSelectorProps extends
|
|
111
|
+
interface CodeBlockLanguageSelectorProps extends SelectProps<CodeBlockLanguage> {
|
|
112
112
|
languages?: ReadonlyArray<CodeBlockLanguage>;
|
|
113
|
-
value?: SelectProps["value"];
|
|
114
|
-
onValueChange?: SelectProps["onValueChange"];
|
|
115
|
-
children?: React.ReactNode;
|
|
116
113
|
className?: string;
|
|
117
114
|
}
|
|
118
115
|
declare function CodeBlockLanguageSelector({
|
|
@@ -2,23 +2,23 @@ import * as React from "react";
|
|
|
2
2
|
import { Dialog } from "@base-ui/react/dialog";
|
|
3
3
|
|
|
4
4
|
//#region src/components/foundations/Dialog.d.ts
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
interface DialogPortalProps extends Dialog.Portal
|
|
8
|
-
interface DialogBackdropProps extends Dialog.Backdrop
|
|
9
|
-
interface DialogViewportProps extends Dialog.Viewport
|
|
10
|
-
interface DialogPopupProps extends Dialog.Popup
|
|
5
|
+
type DialogProps<Payload = unknown> = Dialog.Root.Props<Payload>;
|
|
6
|
+
type DialogTriggerProps<Payload = unknown> = Dialog.Trigger.Props<Payload> & React.RefAttributes<HTMLElement>;
|
|
7
|
+
interface DialogPortalProps extends React.ComponentPropsWithRef<typeof Dialog.Portal> {}
|
|
8
|
+
interface DialogBackdropProps extends React.ComponentPropsWithRef<typeof Dialog.Backdrop> {}
|
|
9
|
+
interface DialogViewportProps extends React.ComponentPropsWithRef<typeof Dialog.Viewport> {}
|
|
10
|
+
interface DialogPopupProps extends React.ComponentPropsWithRef<typeof Dialog.Popup> {
|
|
11
11
|
/**
|
|
12
12
|
* The size of the dialog.
|
|
13
13
|
* @default 'md'
|
|
14
14
|
*/
|
|
15
15
|
size?: "sm" | "md" | "lg" | "fullscreen";
|
|
16
16
|
}
|
|
17
|
-
interface DialogTitleProps extends Dialog.Title
|
|
18
|
-
interface DialogDescriptionProps extends Dialog.Description
|
|
19
|
-
interface DialogCloseProps extends Dialog.Close
|
|
20
|
-
interface DialogHeaderProps extends React.
|
|
21
|
-
interface DialogFooterProps extends React.
|
|
17
|
+
interface DialogTitleProps extends React.ComponentPropsWithRef<typeof Dialog.Title> {}
|
|
18
|
+
interface DialogDescriptionProps extends React.ComponentPropsWithRef<typeof Dialog.Description> {}
|
|
19
|
+
interface DialogCloseProps extends React.ComponentPropsWithRef<typeof Dialog.Close> {}
|
|
20
|
+
interface DialogHeaderProps extends React.ComponentPropsWithRef<"div"> {}
|
|
21
|
+
interface DialogFooterProps extends React.ComponentPropsWithRef<"div"> {}
|
|
22
22
|
/**
|
|
23
23
|
* A dialog component for modal interactions.
|
|
24
24
|
*
|
|
@@ -41,69 +41,54 @@ interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
|
41
41
|
*
|
|
42
42
|
* @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog}
|
|
43
43
|
*/
|
|
44
|
-
declare function DialogTrigger({
|
|
44
|
+
declare function DialogTrigger<Payload>({
|
|
45
45
|
render,
|
|
46
46
|
className,
|
|
47
|
+
ref,
|
|
47
48
|
...props
|
|
48
|
-
}: DialogTriggerProps): React.JSX.Element;
|
|
49
|
+
}: DialogTriggerProps<Payload>): React.JSX.Element;
|
|
49
50
|
declare function DialogBackdrop({
|
|
50
51
|
className,
|
|
51
52
|
ref,
|
|
52
53
|
...props
|
|
53
|
-
}: DialogBackdropProps
|
|
54
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
55
|
-
}): React.JSX.Element;
|
|
54
|
+
}: DialogBackdropProps): React.JSX.Element;
|
|
56
55
|
declare function DialogViewport({
|
|
57
56
|
className,
|
|
58
57
|
ref,
|
|
59
58
|
...props
|
|
60
|
-
}: DialogViewportProps
|
|
61
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
62
|
-
}): React.JSX.Element;
|
|
59
|
+
}: DialogViewportProps): React.JSX.Element;
|
|
63
60
|
declare function DialogPopup({
|
|
64
61
|
size,
|
|
65
62
|
className,
|
|
66
63
|
ref,
|
|
67
64
|
...props
|
|
68
|
-
}: DialogPopupProps
|
|
69
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
70
|
-
}): React.JSX.Element;
|
|
65
|
+
}: DialogPopupProps): React.JSX.Element;
|
|
71
66
|
declare function DialogHeader({
|
|
72
67
|
className,
|
|
73
68
|
ref,
|
|
74
69
|
...props
|
|
75
|
-
}: DialogHeaderProps
|
|
76
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
77
|
-
}): React.JSX.Element;
|
|
70
|
+
}: DialogHeaderProps): React.JSX.Element;
|
|
78
71
|
declare function DialogFooter({
|
|
79
72
|
className,
|
|
80
73
|
ref,
|
|
81
74
|
...props
|
|
82
|
-
}: DialogFooterProps
|
|
83
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
84
|
-
}): React.JSX.Element;
|
|
75
|
+
}: DialogFooterProps): React.JSX.Element;
|
|
85
76
|
declare function DialogTitle({
|
|
86
77
|
className,
|
|
87
78
|
ref,
|
|
88
79
|
...props
|
|
89
|
-
}: DialogTitleProps
|
|
90
|
-
ref?: React.Ref<HTMLHeadingElement>;
|
|
91
|
-
}): React.JSX.Element;
|
|
80
|
+
}: DialogTitleProps): React.JSX.Element;
|
|
92
81
|
declare function DialogDescription({
|
|
93
82
|
className,
|
|
94
83
|
ref,
|
|
95
84
|
...props
|
|
96
|
-
}: DialogDescriptionProps
|
|
97
|
-
ref?: React.Ref<HTMLParagraphElement>;
|
|
98
|
-
}): React.JSX.Element;
|
|
85
|
+
}: DialogDescriptionProps): React.JSX.Element;
|
|
99
86
|
declare function DialogClose({
|
|
100
87
|
render,
|
|
101
88
|
className,
|
|
102
89
|
ref,
|
|
103
90
|
...props
|
|
104
|
-
}: DialogCloseProps
|
|
105
|
-
ref?: React.Ref<HTMLButtonElement>;
|
|
106
|
-
}): React.JSX.Element;
|
|
91
|
+
}: DialogCloseProps): React.JSX.Element;
|
|
107
92
|
declare const Dialog$1: {
|
|
108
93
|
Root: typeof Dialog.Root;
|
|
109
94
|
Trigger: typeof DialogTrigger;
|
|
@@ -5,95 +5,115 @@ import { Menu } from "@base-ui/react/menu";
|
|
|
5
5
|
/**
|
|
6
6
|
* Props for the Menu.Root component.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
type MenuProps<Payload = unknown> = Menu.Root.Props<Payload>;
|
|
9
9
|
/**
|
|
10
10
|
* Props for the Menu.Trigger component.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
/** Keep Base UI trigger behavior without the default menu trigger chrome. */
|
|
14
|
-
|
|
15
|
-
}
|
|
12
|
+
type MenuTriggerProps<Payload = unknown> = Menu.Trigger.Props<Payload> & React.RefAttributes<HTMLElement> & {
|
|
13
|
+
/** Keep Base UI trigger behavior without the default menu trigger chrome. */unstyled?: boolean;
|
|
14
|
+
};
|
|
16
15
|
/**
|
|
17
16
|
* Props for the Menu.Portal component.
|
|
18
17
|
*/
|
|
19
|
-
interface MenuPortalProps extends React.
|
|
18
|
+
interface MenuPortalProps extends React.ComponentPropsWithRef<typeof Menu.Portal> {}
|
|
20
19
|
/**
|
|
21
20
|
* Props for the Menu.Positioner component.
|
|
22
21
|
*/
|
|
23
|
-
interface MenuPositionerProps extends React.
|
|
22
|
+
interface MenuPositionerProps extends React.ComponentPropsWithRef<typeof Menu.Positioner> {}
|
|
24
23
|
/**
|
|
25
24
|
* Props for the Menu.Popup component.
|
|
26
25
|
*/
|
|
27
|
-
interface MenuPopupProps extends React.
|
|
26
|
+
interface MenuPopupProps extends React.ComponentPropsWithRef<typeof Menu.Popup> {}
|
|
28
27
|
/**
|
|
29
28
|
* Props for the Menu.Viewport component. Use this only when one menu moves
|
|
30
29
|
* between triggers and its content changes during that transition.
|
|
31
30
|
*/
|
|
32
|
-
interface MenuViewportProps extends React.
|
|
31
|
+
interface MenuViewportProps extends React.ComponentPropsWithRef<typeof Menu.Viewport> {}
|
|
33
32
|
/**
|
|
34
33
|
* Props for the Menu.Item component.
|
|
35
34
|
*/
|
|
36
|
-
interface MenuItemProps extends React.
|
|
35
|
+
interface MenuItemProps extends React.ComponentPropsWithRef<typeof Menu.Item> {
|
|
37
36
|
inset?: boolean;
|
|
38
37
|
variant?: "default" | "destructive";
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
41
40
|
* Props for the Menu.Group component.
|
|
42
41
|
*/
|
|
43
|
-
interface MenuGroupProps extends React.
|
|
42
|
+
interface MenuGroupProps extends React.ComponentPropsWithRef<typeof Menu.Group> {}
|
|
44
43
|
/**
|
|
45
44
|
* Props for the Menu.GroupLabel component.
|
|
46
45
|
*/
|
|
47
|
-
interface MenuGroupLabelProps extends React.
|
|
46
|
+
interface MenuGroupLabelProps extends React.ComponentPropsWithRef<typeof Menu.GroupLabel> {
|
|
48
47
|
inset?: boolean;
|
|
49
48
|
}
|
|
50
49
|
/**
|
|
51
50
|
* Props for the Menu.Arrow component.
|
|
52
51
|
*/
|
|
53
|
-
interface MenuArrowProps extends React.
|
|
52
|
+
interface MenuArrowProps extends React.ComponentPropsWithRef<typeof Menu.Arrow> {}
|
|
54
53
|
/**
|
|
55
54
|
* Props for the Menu.Separator component.
|
|
56
55
|
*/
|
|
57
|
-
interface MenuSeparatorProps extends React.
|
|
56
|
+
interface MenuSeparatorProps extends React.ComponentPropsWithRef<typeof Menu.Separator> {}
|
|
58
57
|
/**
|
|
59
58
|
* Props for the Menu.RadioGroup component.
|
|
60
59
|
*/
|
|
61
|
-
interface MenuRadioGroupProps extends React.
|
|
60
|
+
interface MenuRadioGroupProps extends React.ComponentPropsWithRef<typeof Menu.RadioGroup> {}
|
|
62
61
|
/**
|
|
63
62
|
* Props for the Menu.RadioItem component.
|
|
64
63
|
*/
|
|
65
|
-
interface MenuRadioItemProps extends React.
|
|
64
|
+
interface MenuRadioItemProps extends React.ComponentPropsWithRef<typeof Menu.RadioItem> {}
|
|
66
65
|
/**
|
|
67
66
|
* Props for the Menu.RadioItemIndicator component.
|
|
68
67
|
*/
|
|
69
|
-
interface MenuRadioItemIndicatorProps extends React.
|
|
68
|
+
interface MenuRadioItemIndicatorProps extends React.ComponentPropsWithRef<typeof Menu.RadioItemIndicator> {}
|
|
70
69
|
/**
|
|
71
70
|
* Props for the Menu.CheckboxItem component.
|
|
72
71
|
*/
|
|
73
|
-
interface MenuCheckboxItemProps extends React.
|
|
72
|
+
interface MenuCheckboxItemProps extends React.ComponentPropsWithRef<typeof Menu.CheckboxItem> {}
|
|
74
73
|
/**
|
|
75
74
|
* Props for the Menu.CheckboxItemIndicator component.
|
|
76
75
|
*/
|
|
77
|
-
interface MenuCheckboxItemIndicatorProps extends React.
|
|
78
|
-
interface MenuShortcutProps extends React.
|
|
79
|
-
interface MenuSubmenuRootProps extends
|
|
76
|
+
interface MenuCheckboxItemIndicatorProps extends React.ComponentPropsWithRef<typeof Menu.CheckboxItemIndicator> {}
|
|
77
|
+
interface MenuShortcutProps extends React.ComponentPropsWithRef<"span"> {}
|
|
78
|
+
interface MenuSubmenuRootProps extends Menu.SubmenuRoot.Props {}
|
|
80
79
|
/**
|
|
81
80
|
* Props for the Menu.SubmenuTrigger component.
|
|
82
81
|
*/
|
|
83
|
-
interface MenuSubmenuTriggerProps extends React.
|
|
82
|
+
interface MenuSubmenuTriggerProps extends React.ComponentPropsWithRef<typeof Menu.SubmenuTrigger> {
|
|
84
83
|
inset?: boolean;
|
|
85
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Root component that manages menu state.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <Menu.Root>
|
|
91
|
+
* <Menu.Trigger>Actions</Menu.Trigger>
|
|
92
|
+
* <Menu.Portal>
|
|
93
|
+
* <Menu.Positioner>
|
|
94
|
+
* <Menu.Popup>
|
|
95
|
+
* <Menu.Item>Edit</Menu.Item>
|
|
96
|
+
* <Menu.Item>Delete</Menu.Item>
|
|
97
|
+
* </Menu.Popup>
|
|
98
|
+
* </Menu.Positioner>
|
|
99
|
+
* </Menu.Portal>
|
|
100
|
+
* </Menu.Root>
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @see {@link https://base-ui.com/react/components/menu | Base UI Menu}
|
|
104
|
+
*/
|
|
86
105
|
/**
|
|
87
106
|
* Button that toggles the menu visibility.
|
|
88
107
|
*/
|
|
89
|
-
declare function MenuTrigger({
|
|
108
|
+
declare function MenuTrigger<Payload>({
|
|
90
109
|
className,
|
|
91
110
|
unstyled,
|
|
92
111
|
ref,
|
|
93
112
|
...props
|
|
94
|
-
}: MenuTriggerProps
|
|
95
|
-
|
|
96
|
-
|
|
113
|
+
}: MenuTriggerProps<Payload>): React.JSX.Element;
|
|
114
|
+
/**
|
|
115
|
+
* Renders menu content in a portal.
|
|
116
|
+
*/
|
|
97
117
|
/**
|
|
98
118
|
* Positions the menu popup relative to the trigger.
|
|
99
119
|
*/
|
|
@@ -101,9 +121,7 @@ declare function MenuPositioner({
|
|
|
101
121
|
className,
|
|
102
122
|
ref,
|
|
103
123
|
...props
|
|
104
|
-
}: MenuPositionerProps
|
|
105
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
106
|
-
}): React.JSX.Element;
|
|
124
|
+
}: MenuPositionerProps): React.JSX.Element;
|
|
107
125
|
/**
|
|
108
126
|
* Container for menu items.
|
|
109
127
|
*/
|
|
@@ -111,9 +129,7 @@ declare function MenuPopup({
|
|
|
111
129
|
className,
|
|
112
130
|
ref,
|
|
113
131
|
...props
|
|
114
|
-
}: MenuPopupProps
|
|
115
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
116
|
-
}): React.JSX.Element;
|
|
132
|
+
}: MenuPopupProps): React.JSX.Element;
|
|
117
133
|
/**
|
|
118
134
|
* Transition container for content that changes as a menu moves between
|
|
119
135
|
* triggers. Pair the adaptive classes from `base-ui-motion.css` with the
|
|
@@ -123,9 +139,7 @@ declare function MenuViewport({
|
|
|
123
139
|
className,
|
|
124
140
|
ref,
|
|
125
141
|
...props
|
|
126
|
-
}: MenuViewportProps
|
|
127
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
128
|
-
}): React.JSX.Element;
|
|
142
|
+
}: MenuViewportProps): React.JSX.Element;
|
|
129
143
|
/**
|
|
130
144
|
* Interactive menu item.
|
|
131
145
|
*/
|
|
@@ -135,9 +149,7 @@ declare function MenuItem({
|
|
|
135
149
|
variant,
|
|
136
150
|
ref,
|
|
137
151
|
...props
|
|
138
|
-
}: MenuItemProps
|
|
139
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
140
|
-
}): React.JSX.Element;
|
|
152
|
+
}: MenuItemProps): React.JSX.Element;
|
|
141
153
|
/**
|
|
142
154
|
* Groups related menu items.
|
|
143
155
|
*/
|
|
@@ -145,9 +157,7 @@ declare function MenuGroup({
|
|
|
145
157
|
className,
|
|
146
158
|
ref,
|
|
147
159
|
...props
|
|
148
|
-
}: MenuGroupProps
|
|
149
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
150
|
-
}): React.JSX.Element;
|
|
160
|
+
}: MenuGroupProps): React.JSX.Element;
|
|
151
161
|
/**
|
|
152
162
|
* Label for a group of menu items.
|
|
153
163
|
*/
|
|
@@ -156,9 +166,7 @@ declare function MenuGroupLabel({
|
|
|
156
166
|
inset,
|
|
157
167
|
ref,
|
|
158
168
|
...props
|
|
159
|
-
}: MenuGroupLabelProps
|
|
160
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
161
|
-
}): React.JSX.Element;
|
|
169
|
+
}: MenuGroupLabelProps): React.JSX.Element;
|
|
162
170
|
/**
|
|
163
171
|
* Arrow pointing to the trigger.
|
|
164
172
|
*/
|
|
@@ -166,9 +174,7 @@ declare function MenuArrow({
|
|
|
166
174
|
className,
|
|
167
175
|
ref,
|
|
168
176
|
...props
|
|
169
|
-
}: MenuArrowProps
|
|
170
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
171
|
-
}): React.JSX.Element;
|
|
177
|
+
}: MenuArrowProps): React.JSX.Element;
|
|
172
178
|
/**
|
|
173
179
|
* Visual separator between menu sections.
|
|
174
180
|
*/
|
|
@@ -176,9 +182,7 @@ declare function MenuSeparator({
|
|
|
176
182
|
className,
|
|
177
183
|
ref,
|
|
178
184
|
...props
|
|
179
|
-
}: MenuSeparatorProps
|
|
180
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
181
|
-
}): React.JSX.Element;
|
|
185
|
+
}: MenuSeparatorProps): React.JSX.Element;
|
|
182
186
|
/**
|
|
183
187
|
* Group for exclusive radio selection.
|
|
184
188
|
*/
|
|
@@ -186,9 +190,7 @@ declare function MenuRadioGroup({
|
|
|
186
190
|
className,
|
|
187
191
|
ref,
|
|
188
192
|
...props
|
|
189
|
-
}: MenuRadioGroupProps
|
|
190
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
191
|
-
}): React.JSX.Element;
|
|
193
|
+
}: MenuRadioGroupProps): React.JSX.Element;
|
|
192
194
|
/**
|
|
193
195
|
* Radio item for exclusive selection.
|
|
194
196
|
*/
|
|
@@ -196,9 +198,7 @@ declare function MenuRadioItem({
|
|
|
196
198
|
className,
|
|
197
199
|
ref,
|
|
198
200
|
...props
|
|
199
|
-
}: MenuRadioItemProps
|
|
200
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
201
|
-
}): React.JSX.Element;
|
|
201
|
+
}: MenuRadioItemProps): React.JSX.Element;
|
|
202
202
|
/**
|
|
203
203
|
* Indicator for selected radio item.
|
|
204
204
|
*/
|
|
@@ -206,9 +206,7 @@ declare function MenuRadioItemIndicator({
|
|
|
206
206
|
className,
|
|
207
207
|
ref,
|
|
208
208
|
...props
|
|
209
|
-
}: MenuRadioItemIndicatorProps
|
|
210
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
211
|
-
}): React.JSX.Element;
|
|
209
|
+
}: MenuRadioItemIndicatorProps): React.JSX.Element;
|
|
212
210
|
/**
|
|
213
211
|
* Checkbox item for toggling options.
|
|
214
212
|
*/
|
|
@@ -216,9 +214,7 @@ declare function MenuCheckboxItem({
|
|
|
216
214
|
className,
|
|
217
215
|
ref,
|
|
218
216
|
...props
|
|
219
|
-
}: MenuCheckboxItemProps
|
|
220
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
221
|
-
}): React.JSX.Element;
|
|
217
|
+
}: MenuCheckboxItemProps): React.JSX.Element;
|
|
222
218
|
/**
|
|
223
219
|
* Indicator for checked checkbox item.
|
|
224
220
|
*/
|
|
@@ -226,17 +222,12 @@ declare function MenuCheckboxItemIndicator({
|
|
|
226
222
|
className,
|
|
227
223
|
ref,
|
|
228
224
|
...props
|
|
229
|
-
}: MenuCheckboxItemIndicatorProps
|
|
230
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
231
|
-
}): React.JSX.Element;
|
|
225
|
+
}: MenuCheckboxItemIndicatorProps): React.JSX.Element;
|
|
232
226
|
declare function MenuShortcut({
|
|
233
227
|
className,
|
|
234
228
|
ref,
|
|
235
229
|
...props
|
|
236
|
-
}: MenuShortcutProps
|
|
237
|
-
ref?: React.Ref<HTMLSpanElement>;
|
|
238
|
-
}): React.JSX.Element;
|
|
239
|
-
declare function MenuSubmenuRoot(props: MenuSubmenuRootProps): React.JSX.Element;
|
|
230
|
+
}: MenuShortcutProps): React.JSX.Element;
|
|
240
231
|
/**
|
|
241
232
|
* Trigger that opens a submenu.
|
|
242
233
|
*/
|
|
@@ -245,9 +236,7 @@ declare function MenuSubmenuTrigger({
|
|
|
245
236
|
inset,
|
|
246
237
|
ref,
|
|
247
238
|
...props
|
|
248
|
-
}: MenuSubmenuTriggerProps
|
|
249
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
250
|
-
}): React.JSX.Element;
|
|
239
|
+
}: MenuSubmenuTriggerProps): React.JSX.Element;
|
|
251
240
|
/**
|
|
252
241
|
* A dropdown menu with keyboard navigation support.
|
|
253
242
|
* Provides items, groups, checkboxes, radio selections, and nested submenus.
|
|
@@ -292,9 +281,9 @@ declare function MenuSubmenuTrigger({
|
|
|
292
281
|
*/
|
|
293
282
|
declare const Menu$1: {
|
|
294
283
|
createHandle: typeof Menu.createHandle;
|
|
295
|
-
Root: (props:
|
|
284
|
+
Root: <Payload>(props: Menu.Root.Props<Payload>) => import("react/jsx-runtime").JSX.Element;
|
|
296
285
|
Trigger: typeof MenuTrigger;
|
|
297
|
-
Portal: (
|
|
286
|
+
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
298
287
|
Positioner: typeof MenuPositioner;
|
|
299
288
|
Popup: typeof MenuPopup;
|
|
300
289
|
Viewport: typeof MenuViewport;
|
|
@@ -311,7 +300,7 @@ declare const Menu$1: {
|
|
|
311
300
|
CheckboxItem: typeof MenuCheckboxItem;
|
|
312
301
|
CheckboxItemIndicator: typeof MenuCheckboxItemIndicator;
|
|
313
302
|
Shortcut: typeof MenuShortcut;
|
|
314
|
-
SubmenuRoot: typeof
|
|
303
|
+
SubmenuRoot: typeof Menu.SubmenuRoot;
|
|
315
304
|
SubmenuTrigger: typeof MenuSubmenuTrigger;
|
|
316
305
|
};
|
|
317
306
|
//#endregion
|