@mcp-b/react-components 0.49.1 → 0.50.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/{AgentChatQueue-v5890eA1.d.ts → AgentChatQueue-MrHhV901.d.ts} +1 -1
- package/dist/AgentMessageParts-C7L-Mv9U.d.ts +46 -0
- package/dist/AppTopBar-CVkLRdk7.d.ts +99 -0
- package/dist/{CodeBlock-g8sADidM.js → CodeBlock-BMK6CW9D.js} +1 -1
- package/dist/Dialog-88GF7_Th.d.ts +107 -0
- package/dist/{FileTree-DruTQ-oa.js → FileTree-okaLnS5j.js} +1 -1
- package/dist/Form-CM7GNTwR.d.ts +91 -0
- package/dist/ManagerOffice-5pEFpoV3.js +1146 -0
- package/dist/McpConnectorForm--HB0MEGC.d.ts +39 -0
- package/dist/Popover-CgHG5DtS.d.ts +220 -0
- package/dist/{PromptInput-4kCz3T9P.d.ts → PromptInput-DGPrCTPl.d.ts} +2 -1
- package/dist/ResponsiveSidebarShell-CAmmtQTR.d.ts +128 -0
- package/dist/SessionCompaction-CmTJFpzj.d.ts +89 -0
- package/dist/SetupChecklist-O6qmgwz4.js +77 -0
- package/dist/ThinkChatActivity-DENkintt.d.ts +77 -0
- package/dist/ThinkChatContext-COIgzkYp.d.ts +28 -0
- package/dist/ThinkRoutine-Cb1DdaHa.d.ts +30 -0
- package/dist/ThinkThreadPicker-yetGX_s5.d.ts +91 -0
- package/dist/{WorkspaceFileView-DYPtRVpM.js → WorkspaceFileView-ncZuIWhC.js} +2 -2
- package/dist/WorkspaceMessageResponse-8lOSAbw_.d.ts +48 -0
- package/dist/codex-model-catalog-BBN_gWcc.d.ts +155 -0
- package/dist/components/agents-sdk/AgentActivity.js +1 -1
- package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
- package/dist/components/agents-sdk/AgentChat.js +8 -8
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentEvent.js +2 -2
- package/dist/components/agents-sdk/BrowserLiveScreen.js +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +1 -1
- package/dist/components/agents-sdk/BrowserReplay.js +1 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +1 -1
- package/dist/components/agents-sdk/DiscordConnectionDialog.d.ts +20 -0
- package/dist/components/agents-sdk/DiscordConnectionDialog.js +65 -0
- package/dist/components/agents-sdk/EmployeeApp.d.ts +49 -0
- package/dist/components/agents-sdk/EmployeeApp.js +57 -0
- package/dist/components/agents-sdk/EmployeeChat.d.ts +63 -0
- package/dist/components/agents-sdk/EmployeeChat.js +84 -0
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +10 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +26 -16
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +24 -0
- package/dist/components/agents-sdk/EmployeeSchedules.js +105 -0
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +43 -0
- package/dist/components/agents-sdk/EmployeeStartScreen.js +133 -0
- package/dist/components/agents-sdk/ManagerAccountActions.d.ts +29 -0
- package/dist/components/agents-sdk/ManagerAccountActions.js +62 -0
- package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1145
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +49 -0
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +198 -0
- package/dist/components/agents-sdk/McpConnectionRequest.d.ts +1 -1
- package/dist/components/agents-sdk/McpConnectionRequest.js +3 -3
- package/dist/components/agents-sdk/McpConnectorForm.d.ts +1 -38
- package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
- package/dist/components/agents-sdk/McpPluginCatalog.d.ts +3 -3
- package/dist/components/agents-sdk/McpPluginCatalog.js +4 -4
- package/dist/components/agents-sdk/McpServerIcon.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.d.ts +3 -3
- package/dist/components/agents-sdk/McpServerPicker.js +2 -2
- package/dist/components/agents-sdk/ModelEndpointDialog.d.ts +31 -0
- package/dist/components/agents-sdk/ModelEndpointDialog.js +118 -0
- package/dist/components/agents-sdk/ModelSelector.d.ts +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +4 -4
- package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
- package/dist/components/agents-sdk/SessionCompaction.d.ts +1 -88
- package/dist/components/agents-sdk/SlackConnectionDialog.d.ts +18 -0
- package/dist/components/agents-sdk/SlackConnectionDialog.js +48 -0
- package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
- package/dist/components/agents-sdk/SubagentRunPanel.js +1 -1
- package/dist/components/agents-sdk/SubagentRunSelector.js +1 -1
- package/dist/components/agents-sdk/ThinkChat.d.ts +6 -6
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -76
- package/dist/components/agents-sdk/ThinkChatActivity.js +3 -3
- package/dist/components/agents-sdk/ThinkChatContext.d.ts +1 -27
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +2 -2
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +3 -3
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutine.d.ts +1 -29
- package/dist/components/agents-sdk/ThinkRoutineActions.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkRoutineActions.js +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineBrowser.js +3 -3
- package/dist/components/agents-sdk/ThinkRoutineDetail.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkRoutineForm.js +4 -4
- package/dist/components/agents-sdk/ThinkRoutineRuns.js +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -90
- package/dist/components/agents-sdk/ThinkThreadPicker.js +3 -3
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +6 -6
- package/dist/components/agents-sdk/WorkspaceExecution.js +7 -7
- 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 +1 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -47
- package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +4 -4
- package/dist/components/agents-sdk/WorkspaceUserScript.js +4 -4
- package/dist/components/ai-sdk/Activity.js +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
- package/dist/components/ai-sdk/AgentMessageParts.d.ts +1 -45
- package/dist/components/ai-sdk/Approval.js +2 -2
- package/dist/components/ai-sdk/Artifact.js +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/ComposerLink.js +1 -1
- package/dist/components/ai-sdk/ConnectedAppCards.js +3 -3
- package/dist/components/ai-sdk/Context.d.ts +1 -1
- package/dist/components/ai-sdk/Context.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.js +2 -2
- package/dist/components/ai-sdk/MessageScroller.js +1 -1
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
- package/dist/components/ai-sdk/Plan.d.ts +1 -1
- package/dist/components/ai-sdk/Plan.js +1 -1
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.js +7 -7
- package/dist/components/ai-sdk/Queue.js +1 -1
- package/dist/components/ai-sdk/Reasoning.js +1 -1
- package/dist/components/ai-sdk/Sources.js +1 -1
- package/dist/components/ai-sdk/Task.js +1 -1
- package/dist/components/extension/ChatGptSignInScreen.js +1 -1
- package/dist/components/extension/CodexModelSelector.d.ts +1 -1
- package/dist/components/extension/CodexModelSelector.js +2 -2
- package/dist/components/extension/ConversationTabPicker.js +2 -2
- package/dist/components/foundations/Checkbox.js +1 -1
- package/dist/components/foundations/Collapsible.js +1 -1
- package/dist/components/foundations/ContextMenu.js +1 -1
- package/dist/components/foundations/Dialog.d.ts +1 -106
- package/dist/components/foundations/Form.d.ts +1 -90
- package/dist/components/foundations/Menubar.js +1 -1
- package/dist/components/foundations/Popover.d.ts +1 -219
- package/dist/components/foundations/SearchField.js +1 -1
- package/dist/components/foundations/Select.js +1 -1
- package/dist/components/foundations/Stepper.js +1 -1
- package/dist/components/foundations/Toast.js +1 -1
- package/dist/components/foundations/ToggleGroup.d.ts +1 -1
- package/dist/components/foundations/ToggleGroup.js +1 -1
- package/dist/components/foundations/icons.js +1 -1
- package/dist/components/general-purpose/AccountSignInDialog.d.ts +26 -0
- package/dist/components/general-purpose/AccountSignInDialog.js +25 -0
- package/dist/components/general-purpose/AppTopBar.d.ts +1 -98
- package/dist/components/general-purpose/Commit.js +2 -2
- package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/NotificationPrompt.d.ts +13 -0
- package/dist/components/general-purpose/NotificationPrompt.js +18 -0
- package/dist/components/general-purpose/PricingPlanCard.js +2 -2
- package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -127
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +124 -72
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +2 -2
- package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
- package/dist/components/general-purpose/SetupChecklist.js +1 -76
- package/dist/components/general-purpose/StatusScreen.d.ts +10 -0
- package/dist/components/general-purpose/StatusScreen.js +13 -0
- package/dist/components/general-purpose/Terminal.js +2 -2
- package/dist/components/general-purpose/TestResults.js +1 -1
- package/dist/components/general-purpose/ThemeModeControl.js +2 -2
- package/dist/components/general-purpose/WebPreview.js +2 -2
- package/dist/components/nanites/AgentConnection.js +2 -2
- package/dist/components/nanites/AgentToolDetail.d.ts +1 -1
- package/dist/components/nanites/AgentToolDetail.js +4 -4
- package/dist/{copy-button-CSDuDfdP.js → copy-button-Dk2vRe9j.js} +1 -1
- package/dist/mcp-server-catalog-D9p4gGeJ.d.ts +1112 -0
- package/dist/styles/employee-app.css +29 -0
- package/dist/styles/index.css +2 -0
- package/dist/styles/manager-work.css +93 -0
- package/dist/utils/codex-model-catalog.d.ts +1 -154
- package/dist/utils/mcp-server-catalog.d.ts +1 -1111
- package/dist/{workspace-assets-Bg7XhPsk.js → workspace-assets-wW_lQLYK.js} +2 -2
- package/package.json +2 -2
- package/dist/{icons-cuEtsgj9.js → icons-CeGfXO21.js} +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ChatStatus, UIMessage } from "ai";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ai-sdk/AgentMessageParts.d.ts
|
|
5
|
+
type AgentMessagePart<MessageT extends UIMessage = UIMessage> = MessageT["parts"][number];
|
|
6
|
+
interface AgentMessageRenderPartContext<MessageT extends UIMessage = UIMessage> {
|
|
7
|
+
message: MessageT;
|
|
8
|
+
part: AgentMessagePart<MessageT>;
|
|
9
|
+
partIndex: number;
|
|
10
|
+
defaultRender: () => React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
interface AgentMessagePartsProps<MessageT extends UIMessage = UIMessage> {
|
|
13
|
+
/** The whole upstream AI SDK message whose parts should render in order. */
|
|
14
|
+
message: MessageT;
|
|
15
|
+
/** Drives native reasoning streaming UI. Settled messages default to `ready`. */
|
|
16
|
+
status?: ChatStatus;
|
|
17
|
+
/**
|
|
18
|
+
* Override rendering per part. Return `undefined` to use the default renderer,
|
|
19
|
+
* `null` to suppress the part, or call `defaultRender()` to compose the
|
|
20
|
+
* built-in result into custom UI.
|
|
21
|
+
*
|
|
22
|
+
* The default renderer uses upstream helpers where available:
|
|
23
|
+
* `isTextUIPart`, `isReasoningUIPart`, `isFileUIPart`, `isToolUIPart`,
|
|
24
|
+
* `getToolName`, and the native AI SDK tool-part state fields. It
|
|
25
|
+
* also renders native AI SDK `source-url`/`source-document` parts as a single
|
|
26
|
+
* grouped `Sources` block when they appear consecutively, consolidates native
|
|
27
|
+
* reasoning parts into one disclosure, and treats `step-start` as a silent
|
|
28
|
+
* structural boundary. App-defined `data-*` parts stay whole and should be
|
|
29
|
+
* narrowed with AI SDK's `isDataUIPart` inside this callback. If you override
|
|
30
|
+
* source rendering, return a React node for every source part you want to
|
|
31
|
+
* show; returning `undefined` keeps the upstream-shaped source-run grouping.
|
|
32
|
+
*/
|
|
33
|
+
renderPart?: (context: AgentMessageRenderPartContext<MessageT>) => React.ReactNode | undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Renders the ordered parts of one whole AI SDK `UIMessage` without adding a
|
|
37
|
+
* transcript, message wrapper, composer, or transport. Compose it inside
|
|
38
|
+
* `Message` for read-only run previews and child-agent transcript rows.
|
|
39
|
+
*/
|
|
40
|
+
declare function AgentMessageParts<MessageT extends UIMessage = UIMessage>({
|
|
41
|
+
message,
|
|
42
|
+
status,
|
|
43
|
+
renderPart
|
|
44
|
+
}: AgentMessagePartsProps<MessageT>): (React.JSX.Element | null)[];
|
|
45
|
+
//#endregion
|
|
46
|
+
export { AgentMessageRenderPartContext as i, AgentMessageParts as n, AgentMessagePartsProps as r, AgentMessagePart as t };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { a as ToolbarLinkProps, n as ToolbarButtonProps, r as ToolbarGroupProps, t as Toolbar } from "./Toolbar-CGY004u0.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
|
|
5
|
+
//#region src/components/general-purpose/AppTopBar.d.ts
|
|
6
|
+
interface AppTopBarRootProps extends Omit<React.ComponentPropsWithoutRef<typeof Toolbar.Root>, "disabled"> {
|
|
7
|
+
/** Accessible name describing the controls in this application bar. */
|
|
8
|
+
"aria-label": string;
|
|
9
|
+
/** Disables every interactive control managed by the application bar. */
|
|
10
|
+
disabled?: React.ComponentPropsWithoutRef<typeof Toolbar.Root>["disabled"];
|
|
11
|
+
/**
|
|
12
|
+
* Where the title sits. An application bar centres it between the control
|
|
13
|
+
* groups; a panel header labels its leading edge instead.
|
|
14
|
+
*/
|
|
15
|
+
titleAlign?: "center" | "start";
|
|
16
|
+
}
|
|
17
|
+
interface AppTopBarGroupProps extends ToolbarGroupProps {}
|
|
18
|
+
interface AppTopBarTitleProps extends useRender.ComponentProps<"div"> {}
|
|
19
|
+
interface AppTopBarButtonProps extends Omit<ToolbarButtonProps, "aria-label"> {
|
|
20
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
21
|
+
/** Accessible name and default tooltip text for the icon-only control. */
|
|
22
|
+
label: string;
|
|
23
|
+
/** Tooltip text when it should differ from the accessible name. */
|
|
24
|
+
tooltip?: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
interface AppTopBarLinkProps extends Omit<ToolbarLinkProps, "aria-label"> {
|
|
27
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
28
|
+
/** Accessible name and default tooltip text for the icon-only link. */
|
|
29
|
+
label: string;
|
|
30
|
+
/** Tooltip text when it should differ from the accessible name. */
|
|
31
|
+
tooltip?: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
interface AppTopBarControlProps extends ToolbarButtonProps {
|
|
34
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Stable application-level toolbar with composable leading, title, and trailing
|
|
38
|
+
* slots. Descendant buttons share Base UI's roving focus and tooltip provider.
|
|
39
|
+
*/
|
|
40
|
+
declare function AppTopBarRoot({
|
|
41
|
+
children,
|
|
42
|
+
className,
|
|
43
|
+
titleAlign,
|
|
44
|
+
...props
|
|
45
|
+
}: AppTopBarRootProps): React.JSX.Element;
|
|
46
|
+
declare function AppTopBarLeading({
|
|
47
|
+
className,
|
|
48
|
+
...props
|
|
49
|
+
}: AppTopBarGroupProps): React.JSX.Element;
|
|
50
|
+
declare function AppTopBarTitle({
|
|
51
|
+
className,
|
|
52
|
+
render,
|
|
53
|
+
ref,
|
|
54
|
+
...props
|
|
55
|
+
}: AppTopBarTitleProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
56
|
+
declare function AppTopBarTrailing({
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}: AppTopBarGroupProps): React.JSX.Element;
|
|
60
|
+
declare function AppTopBarControl({
|
|
61
|
+
className,
|
|
62
|
+
...props
|
|
63
|
+
}: AppTopBarControlProps): React.JSX.Element;
|
|
64
|
+
declare function AppTopBarButton({
|
|
65
|
+
children,
|
|
66
|
+
className,
|
|
67
|
+
disabled,
|
|
68
|
+
label,
|
|
69
|
+
render,
|
|
70
|
+
tooltip,
|
|
71
|
+
...props
|
|
72
|
+
}: AppTopBarButtonProps): React.JSX.Element;
|
|
73
|
+
declare function AppTopBarLink({
|
|
74
|
+
children,
|
|
75
|
+
className,
|
|
76
|
+
label,
|
|
77
|
+
render,
|
|
78
|
+
tooltip,
|
|
79
|
+
...props
|
|
80
|
+
}: AppTopBarLinkProps): React.JSX.Element;
|
|
81
|
+
/**
|
|
82
|
+
* Composable application top bar with stable leading, title, and trailing
|
|
83
|
+
* slots. Icon controls use shared Toolbar roving focus and coordinated Tooltip
|
|
84
|
+
* behavior; their fixed slots do not resize when state icons change. Render an
|
|
85
|
+
* existing behavior-rich button through `Control` to retain those toolbar
|
|
86
|
+
* semantics without rebuilding the control. Use `Link` for navigation so an
|
|
87
|
+
* `href` or router-provided link keeps native link semantics.
|
|
88
|
+
*/
|
|
89
|
+
declare const AppTopBar: {
|
|
90
|
+
Root: typeof AppTopBarRoot;
|
|
91
|
+
Leading: typeof AppTopBarLeading;
|
|
92
|
+
Title: typeof AppTopBarTitle;
|
|
93
|
+
Trailing: typeof AppTopBarTrailing;
|
|
94
|
+
Control: typeof AppTopBarControl;
|
|
95
|
+
Button: typeof AppTopBarButton;
|
|
96
|
+
Link: typeof AppTopBarLink;
|
|
97
|
+
};
|
|
98
|
+
//#endregion
|
|
99
|
+
export { AppTopBarLinkProps as a, AppTopBarGroupProps as i, AppTopBarButtonProps as n, AppTopBarRootProps as o, AppTopBarControlProps as r, AppTopBarTitleProps as s, AppTopBar as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { t as CopyButton } from "./copy-button-
|
|
2
|
+
import { t as CopyButton } from "./copy-button-Dk2vRe9j.js";
|
|
3
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";
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
3
|
+
|
|
4
|
+
//#region src/components/foundations/Dialog.d.ts
|
|
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
|
+
/**
|
|
12
|
+
* The size of the dialog.
|
|
13
|
+
* @default 'md'
|
|
14
|
+
*/
|
|
15
|
+
size?: "sm" | "md" | "lg" | "fullscreen";
|
|
16
|
+
}
|
|
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
|
+
/**
|
|
23
|
+
* A dialog component for modal interactions.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <Dialog.Root open={isOpen} onOpenChange={setIsOpen}>
|
|
28
|
+
* <Dialog.Trigger render={<Button />}>Open</Dialog.Trigger>
|
|
29
|
+
* <Dialog.Portal>
|
|
30
|
+
* <Dialog.Backdrop />
|
|
31
|
+
* <Dialog.Viewport>
|
|
32
|
+
* <Dialog.Popup>
|
|
33
|
+
* <Dialog.Title>Confirm</Dialog.Title>
|
|
34
|
+
* <Dialog.Description>Are you sure?</Dialog.Description>
|
|
35
|
+
* <Dialog.Close>Cancel</Dialog.Close>
|
|
36
|
+
* </Dialog.Popup>
|
|
37
|
+
* </Dialog.Viewport>
|
|
38
|
+
* </Dialog.Portal>
|
|
39
|
+
* </Dialog.Root>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog}
|
|
43
|
+
*/
|
|
44
|
+
declare function DialogTrigger<Payload>({
|
|
45
|
+
render,
|
|
46
|
+
className,
|
|
47
|
+
ref,
|
|
48
|
+
...props
|
|
49
|
+
}: DialogTriggerProps<Payload>): React.JSX.Element;
|
|
50
|
+
declare function DialogBackdrop({
|
|
51
|
+
className,
|
|
52
|
+
ref,
|
|
53
|
+
...props
|
|
54
|
+
}: DialogBackdropProps): React.JSX.Element;
|
|
55
|
+
declare function DialogViewport({
|
|
56
|
+
className,
|
|
57
|
+
ref,
|
|
58
|
+
...props
|
|
59
|
+
}: DialogViewportProps): React.JSX.Element;
|
|
60
|
+
declare function DialogPopup({
|
|
61
|
+
size,
|
|
62
|
+
className,
|
|
63
|
+
ref,
|
|
64
|
+
...props
|
|
65
|
+
}: DialogPopupProps): React.JSX.Element;
|
|
66
|
+
declare function DialogHeader({
|
|
67
|
+
className,
|
|
68
|
+
ref,
|
|
69
|
+
...props
|
|
70
|
+
}: DialogHeaderProps): React.JSX.Element;
|
|
71
|
+
declare function DialogFooter({
|
|
72
|
+
className,
|
|
73
|
+
ref,
|
|
74
|
+
...props
|
|
75
|
+
}: DialogFooterProps): React.JSX.Element;
|
|
76
|
+
declare function DialogTitle({
|
|
77
|
+
className,
|
|
78
|
+
ref,
|
|
79
|
+
...props
|
|
80
|
+
}: DialogTitleProps): React.JSX.Element;
|
|
81
|
+
declare function DialogDescription({
|
|
82
|
+
className,
|
|
83
|
+
ref,
|
|
84
|
+
...props
|
|
85
|
+
}: DialogDescriptionProps): React.JSX.Element;
|
|
86
|
+
declare function DialogClose({
|
|
87
|
+
render,
|
|
88
|
+
className,
|
|
89
|
+
ref,
|
|
90
|
+
...props
|
|
91
|
+
}: DialogCloseProps): React.JSX.Element;
|
|
92
|
+
declare const Dialog$1: {
|
|
93
|
+
Root: <Payload>(props: Dialog.Root.Props<Payload>) => React.JSX.Element;
|
|
94
|
+
Trigger: typeof DialogTrigger;
|
|
95
|
+
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
96
|
+
Backdrop: typeof DialogBackdrop;
|
|
97
|
+
Viewport: typeof DialogViewport;
|
|
98
|
+
Popup: typeof DialogPopup;
|
|
99
|
+
Header: typeof DialogHeader;
|
|
100
|
+
Footer: typeof DialogFooter;
|
|
101
|
+
Title: typeof DialogTitle;
|
|
102
|
+
Description: typeof DialogDescription;
|
|
103
|
+
Close: typeof DialogClose;
|
|
104
|
+
createHandle: typeof Dialog.createHandle;
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
export { DialogFooterProps as a, DialogPortalProps as c, DialogTriggerProps as d, DialogViewportProps as f, DialogDescriptionProps as i, DialogProps as l, DialogBackdropProps as n, DialogHeaderProps as o, DialogCloseProps as r, DialogPopupProps as s, Dialog$1 as t, DialogTitleProps as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
|
-
import { C as FolderIcon, S as FileIcon, p as ChevronRightIcon, w as FolderOpenIcon } from "./icons-
|
|
2
|
+
import { C as FolderIcon, S as FileIcon, p as ChevronRightIcon, w as FolderOpenIcon } from "./icons-CeGfXO21.js";
|
|
3
3
|
import { t as NavigationLink } from "./navigation-link-kqMa81v5.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Form } from "@base-ui/react/form";
|
|
3
|
+
|
|
4
|
+
//#region src/components/foundations/Form.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Form component.
|
|
7
|
+
*/
|
|
8
|
+
interface FormProps<Values extends Record<string, unknown> = Record<string, unknown>> extends React.ComponentPropsWithoutRef<typeof Form<Values>> {}
|
|
9
|
+
/**
|
|
10
|
+
* A form component that provides consolidated error handling and validation
|
|
11
|
+
* for form controls. Works seamlessly with the Field component.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // Basic usage with Field components
|
|
16
|
+
* <Form onFormSubmit={(values) => console.log(values)}>
|
|
17
|
+
* <Field.Root name="username">
|
|
18
|
+
* <Field.Label>Username</Field.Label>
|
|
19
|
+
* <Field.Control required />
|
|
20
|
+
* <Field.Error match="valueMissing">Username is required</Field.Error>
|
|
21
|
+
* </Field.Root>
|
|
22
|
+
*
|
|
23
|
+
* <Field.Root name="email">
|
|
24
|
+
* <Field.Label>Email</Field.Label>
|
|
25
|
+
* <Field.Control type="email" required />
|
|
26
|
+
* <Field.Error match="valueMissing">Email is required</Field.Error>
|
|
27
|
+
* <Field.Error match="typeMismatch">Invalid email format</Field.Error>
|
|
28
|
+
* </Field.Root>
|
|
29
|
+
*
|
|
30
|
+
* <Button type="submit">Submit</Button>
|
|
31
|
+
* </Form>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* // With external/server errors
|
|
37
|
+
* const [errors, setErrors] = useState({});
|
|
38
|
+
*
|
|
39
|
+
* async function handleSubmit(values) {
|
|
40
|
+
* const result = await api.submit(values);
|
|
41
|
+
* if (result.errors) {
|
|
42
|
+
* setErrors(result.errors); // { email: "Already registered" }
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* <Form errors={errors} onFormSubmit={handleSubmit}>
|
|
47
|
+
* <Field.Root name="email">
|
|
48
|
+
* <Field.Control type="email" />
|
|
49
|
+
* <Field.Error />
|
|
50
|
+
* </Field.Root>
|
|
51
|
+
* </Form>
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* // Native submit handlers remain native, so TanStack Form can own state.
|
|
57
|
+
* <Form
|
|
58
|
+
* onSubmit={(event) => {
|
|
59
|
+
* event.preventDefault();
|
|
60
|
+
* void form.handleSubmit();
|
|
61
|
+
* }}
|
|
62
|
+
* >
|
|
63
|
+
* ...
|
|
64
|
+
* </Form>
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* // With validation modes
|
|
70
|
+
* // Fields validate when they lose focus
|
|
71
|
+
* <Form validationMode="onBlur">
|
|
72
|
+
* ...
|
|
73
|
+
* </Form>
|
|
74
|
+
*
|
|
75
|
+
* // Fields validate as user types
|
|
76
|
+
* <Form validationMode="onChange">
|
|
77
|
+
* ...
|
|
78
|
+
* </Form>
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* @see {@link https://base-ui.com/react/components/form | Base UI Form}
|
|
82
|
+
*/
|
|
83
|
+
declare function Form$1<Values extends Record<string, unknown> = Record<string, unknown>>({
|
|
84
|
+
className,
|
|
85
|
+
ref,
|
|
86
|
+
...props
|
|
87
|
+
}: FormProps<Values> & {
|
|
88
|
+
/** Ref forwarded to the component's rendered root element. */ref?: React.Ref<HTMLFormElement>;
|
|
89
|
+
}): React.JSX.Element;
|
|
90
|
+
//#endregion
|
|
91
|
+
export { FormProps as n, Form$1 as t };
|