@mcp-b/react-components 0.1.1 → 0.1.3
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/Button-QCM8ZKgR.d.ts +98 -0
- package/dist/CodeBlock-CttHhWcb.js +356 -0
- package/dist/CodeBlock-V6pgafSS.d.ts +174 -0
- package/dist/Select-CRsKCJ9x.d.ts +200 -0
- package/dist/class-names-9UtZwb0J.js +12 -0
- package/dist/components/Accordion.d.ts +81 -0
- package/dist/components/Accordion.js +97 -0
- package/dist/components/AgentConnection.d.ts +69 -0
- package/dist/components/AgentConnection.js +176 -0
- package/dist/components/AlertDialog.d.ts +148 -0
- package/dist/components/AlertDialog.js +141 -0
- package/dist/components/Artifact.d.ts +128 -0
- package/dist/components/Artifact.js +115 -0
- package/dist/components/Autocomplete.d.ts +186 -0
- package/dist/components/Autocomplete.js +186 -0
- package/dist/components/Avatar.d.ts +134 -0
- package/dist/components/Avatar.js +118 -0
- package/dist/components/Badge.d.ts +68 -0
- package/dist/components/Badge.js +108 -0
- package/dist/components/Button.d.ts +2 -0
- package/dist/components/Button.js +73 -0
- package/dist/components/Card.d.ts +87 -0
- package/dist/components/Card.js +81 -0
- package/dist/components/ChainOfThought.d.ts +153 -0
- package/dist/components/ChainOfThought.js +157 -0
- package/dist/components/Checkbox.d.ts +35 -0
- package/dist/components/Checkbox.js +47 -0
- package/dist/components/CheckboxGroup.d.ts +76 -0
- package/dist/components/CheckboxGroup.js +69 -0
- package/dist/components/CodeBlock.d.ts +2 -0
- package/dist/components/CodeBlock.js +2 -0
- package/dist/components/Collapsible.d.ts +127 -0
- package/dist/components/Collapsible.js +103 -0
- package/dist/components/Combobox.d.ts +177 -0
- package/dist/components/Combobox.js +179 -0
- package/dist/components/Commit.d.ts +265 -0
- package/dist/components/Commit.js +282 -0
- package/dist/components/Context.d.ts +129 -0
- package/dist/components/Context.js +309 -0
- package/dist/components/ContextMenu.d.ts +282 -0
- package/dist/components/ContextMenu.js +270 -0
- package/dist/components/Conversation.d.ts +166 -0
- package/dist/components/Conversation.js +202 -0
- package/dist/components/Dialog.d.ts +120 -0
- package/dist/components/Dialog.js +114 -0
- package/dist/components/EnvironmentVariables.d.ts +176 -0
- package/dist/components/EnvironmentVariables.js +221 -0
- package/dist/components/Field.d.ts +281 -0
- package/dist/components/Field.js +274 -0
- package/dist/components/Fieldset.d.ts +93 -0
- package/dist/components/Fieldset.js +81 -0
- package/dist/components/FileTree.d.ts +116 -0
- package/dist/components/FileTree.js +310 -0
- package/dist/components/Form.d.ts +94 -0
- package/dist/components/Form.js +88 -0
- package/dist/components/GithubMotionMark.d.ts +13 -0
- package/dist/components/GithubMotionMark.js +23 -0
- package/dist/components/Input.d.ts +33 -0
- package/dist/components/Input.js +27 -0
- package/dist/components/Label.d.ts +44 -0
- package/dist/components/Label.js +41 -0
- package/dist/components/Menu.d.ts +395 -0
- package/dist/components/Menu.js +338 -0
- package/dist/components/Menubar.d.ts +331 -0
- package/dist/components/Menubar.js +299 -0
- package/dist/components/Message.d.ts +216 -0
- package/dist/components/Message.js +245 -0
- package/dist/components/Meter.d.ts +151 -0
- package/dist/components/Meter.js +121 -0
- package/dist/components/ModelSelector.d.ts +198 -0
- package/dist/components/ModelSelector.js +306 -0
- package/dist/components/NaniteScene.d.ts +33 -0
- package/dist/components/NaniteScene.js +405 -0
- package/dist/components/NavigationMenu.d.ts +256 -0
- package/dist/components/NavigationMenu.js +228 -0
- package/dist/components/NumberField.d.ts +159 -0
- package/dist/components/NumberField.js +123 -0
- package/dist/components/Popover.d.ts +278 -0
- package/dist/components/Popover.js +245 -0
- package/dist/components/PreviewCard.d.ts +156 -0
- package/dist/components/PreviewCard.js +156 -0
- package/dist/components/PricingPage.d.ts +209 -0
- package/dist/components/PricingPage.js +506 -0
- package/dist/components/Progress.d.ts +58 -0
- package/dist/components/Progress.js +51 -0
- package/dist/components/PromptInput.d.ts +399 -0
- package/dist/components/PromptInput.js +737 -0
- package/dist/components/Queue.d.ts +241 -0
- package/dist/components/Queue.js +225 -0
- package/dist/components/RadioGroup.d.ts +78 -0
- package/dist/components/RadioGroup.js +72 -0
- package/dist/components/Reasoning.d.ts +88 -0
- package/dist/components/Reasoning.js +187 -0
- package/dist/components/ScrollArea.d.ts +160 -0
- package/dist/components/ScrollArea.js +145 -0
- package/dist/components/Select.d.ts +2 -0
- package/dist/components/Select.js +260 -0
- package/dist/components/Separator.d.ts +45 -0
- package/dist/components/Separator.js +40 -0
- package/dist/components/Shell.d.ts +163 -0
- package/dist/components/Shell.js +137 -0
- package/dist/components/Slider.d.ts +120 -0
- package/dist/components/Slider.js +115 -0
- package/dist/components/Sources.d.ts +91 -0
- package/dist/components/Sources.js +121 -0
- package/dist/components/Stepper.d.ts +190 -0
- package/dist/components/Stepper.js +315 -0
- package/dist/components/Switch.d.ts +57 -0
- package/dist/components/Switch.js +55 -0
- package/dist/components/Tabs.d.ts +84 -0
- package/dist/components/Tabs.js +78 -0
- package/dist/components/Task.d.ts +100 -0
- package/dist/components/Task.js +120 -0
- package/dist/components/Terminal.d.ts +118 -0
- package/dist/components/Terminal.js +234 -0
- package/dist/components/TestResults.d.ts +236 -0
- package/dist/components/TestResults.js +346 -0
- package/dist/components/Toast.d.ts +192 -0
- package/dist/components/Toast.js +163 -0
- package/dist/components/Toggle.d.ts +69 -0
- package/dist/components/Toggle.js +66 -0
- package/dist/components/ToggleGroup.d.ts +69 -0
- package/dist/components/ToggleGroup.js +99 -0
- package/dist/components/Tool.d.ts +119 -0
- package/dist/components/Tool.js +192 -0
- package/dist/components/Toolbar.d.ts +162 -0
- package/dist/components/Toolbar.js +126 -0
- package/dist/components/Tooltip.d.ts +81 -0
- package/dist/components/Tooltip.js +74 -0
- package/dist/components/WebPreview.d.ts +143 -0
- package/dist/components/WebPreview.js +280 -0
- package/dist/components/useStickToBottom.d.ts +30 -0
- package/dist/components/useStickToBottom.js +95 -0
- package/dist/copy-button-BIATcZWZ.d.ts +16 -0
- package/dist/copy-button-BNgclDrO.js +43 -0
- package/dist/icons-BsWc8g4E.js +221 -0
- package/dist/styles/accordion.css +10 -10
- package/dist/styles/agent-connection.css +18 -17
- package/dist/styles/alert-dialog.css +48 -29
- package/dist/styles/artifact.css +10 -10
- package/dist/styles/autocomplete.css +25 -24
- package/dist/styles/avatar.css +96 -6
- package/dist/styles/badge.css +78 -14
- package/dist/styles/base.css +9 -9
- package/dist/styles/button.css +57 -38
- package/dist/styles/card.css +57 -10
- package/dist/styles/chain-of-thought.css +47 -33
- package/dist/styles/checkbox.css +24 -10
- package/dist/styles/code-block.css +22 -15
- package/dist/styles/collapsible.css +14 -12
- package/dist/styles/combobox.css +26 -25
- package/dist/styles/commit.css +49 -24
- package/dist/styles/context-menu.css +70 -16
- package/dist/styles/context.css +15 -15
- package/dist/styles/conversation.css +12 -12
- package/dist/styles/dialog.css +52 -16
- package/dist/styles/environment-variables.css +19 -19
- package/dist/styles/field.css +184 -22
- package/dist/styles/fieldset.css +5 -4
- package/dist/styles/file-tree.css +17 -17
- package/dist/styles/index.css.d.ts +1 -0
- package/dist/styles/input.css +45 -11
- package/dist/styles/label.css +21 -4
- package/dist/styles/menu.css +55 -32
- package/dist/styles/menubar.css +80 -28
- package/dist/styles/message.css +22 -13
- package/dist/styles/meter.css +8 -8
- package/dist/styles/model-selector.css +33 -21
- package/dist/styles/navigation-menu.css +26 -24
- package/dist/styles/number-field.css +20 -18
- package/dist/styles/popover.css +38 -28
- package/dist/styles/preview-card.css +15 -13
- package/dist/styles/pricing-page.css +53 -53
- package/dist/styles/progress.css +7 -7
- package/dist/styles/prompt-input.css +73 -24
- package/dist/styles/queue.css +58 -32
- package/dist/styles/radio.css +26 -11
- package/dist/styles/reasoning.css +15 -11
- package/dist/styles/scroll-area.css +6 -6
- package/dist/styles/scrollbars.css +4 -4
- package/dist/styles/select.css +84 -25
- package/dist/styles/separator.css +1 -1
- package/dist/styles/shell.css +21 -20
- package/dist/styles/slider.css +35 -11
- package/dist/styles/sources.css +20 -20
- package/dist/styles/stepper.css +22 -22
- package/dist/styles/switch.css +29 -13
- package/dist/styles/tabs.css +23 -16
- package/dist/styles/task.css +27 -23
- package/dist/styles/terminal.css +16 -13
- package/dist/styles/test-results.css +79 -32
- package/dist/styles/toast.css +26 -25
- package/dist/styles/toggle-group.css +12 -12
- package/dist/styles/toggle.css +29 -11
- package/dist/styles/tool.css +54 -32
- package/dist/styles/toolbar.css +30 -28
- package/dist/styles/tooltip.css +10 -8
- package/dist/styles/web-preview.css +37 -21
- package/dist/utils/structured-code.d.ts +10 -0
- package/dist/utils/structured-code.js +81 -0
- package/package.json +17 -8
- package/dist/index.d.ts +0 -7236
- package/dist/index.js +0 -8945
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/Badge.tsx
|
|
4
|
+
const SHADCN_BADGE_VARIANT = {
|
|
5
|
+
default: ["normal", "primary"],
|
|
6
|
+
secondary: ["normal", "neutral"],
|
|
7
|
+
destructive: ["normal", "destructive"],
|
|
8
|
+
outline: ["outline", "neutral"],
|
|
9
|
+
ghost: ["ghost", "neutral"],
|
|
10
|
+
link: ["link", "primary"]
|
|
11
|
+
};
|
|
12
|
+
const BADGE_VARIANT_DEFAULT_COLOR = {
|
|
13
|
+
normal: "primary",
|
|
14
|
+
outline: "neutral",
|
|
15
|
+
ghost: "neutral",
|
|
16
|
+
link: "primary"
|
|
17
|
+
};
|
|
18
|
+
function badgeVariants({ variant = "default", color, size = "md", className } = {}) {
|
|
19
|
+
const badgeVariant = variant ?? "default";
|
|
20
|
+
const mapped = badgeVariant === "normal" || badgeVariant === "outline" || badgeVariant === "ghost" || badgeVariant === "link" ? [badgeVariant, color ?? BADGE_VARIANT_DEFAULT_COLOR[badgeVariant]] : SHADCN_BADGE_VARIANT[badgeVariant];
|
|
21
|
+
return [
|
|
22
|
+
"badge",
|
|
23
|
+
`badge--${mapped[0]}`,
|
|
24
|
+
`badge--${color ?? mapped[1]}`,
|
|
25
|
+
size !== "md" && `badge--${size}`,
|
|
26
|
+
className
|
|
27
|
+
].filter(Boolean).join(" ");
|
|
28
|
+
}
|
|
29
|
+
function assignRef(ref, value) {
|
|
30
|
+
if (!ref) return;
|
|
31
|
+
if (typeof ref === "function") {
|
|
32
|
+
ref(value);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
ref.current = value;
|
|
36
|
+
}
|
|
37
|
+
function mergeRefs(...refs) {
|
|
38
|
+
const activeRefs = refs.filter(Boolean);
|
|
39
|
+
if (activeRefs.length === 0) return;
|
|
40
|
+
return (value) => {
|
|
41
|
+
for (const activeRef of activeRefs) assignRef(activeRef, value);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function isEventHandler(propName, value) {
|
|
45
|
+
return /^on[A-Z]/.test(propName) && typeof value === "function";
|
|
46
|
+
}
|
|
47
|
+
function mergeSlottedBadgeProps(childProps, badgeProps) {
|
|
48
|
+
const mergedProps = {
|
|
49
|
+
...childProps,
|
|
50
|
+
...badgeProps
|
|
51
|
+
};
|
|
52
|
+
const badgePropsRecord = badgeProps;
|
|
53
|
+
for (const propName of Object.keys(childProps)) {
|
|
54
|
+
const childValue = childProps[propName];
|
|
55
|
+
const badgeValue = badgePropsRecord[propName];
|
|
56
|
+
if (isEventHandler(propName, childValue) && isEventHandler(propName, badgeValue)) mergedProps[propName] = (...args) => {
|
|
57
|
+
childValue(...args);
|
|
58
|
+
badgeValue(...args);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
mergedProps.className = [childProps.className, badgeProps.className].filter(Boolean).join(" ");
|
|
62
|
+
mergedProps.style = childProps.style || badgeProps.style ? {
|
|
63
|
+
...childProps.style,
|
|
64
|
+
...badgeProps.style
|
|
65
|
+
} : void 0;
|
|
66
|
+
mergedProps.ref = mergeRefs(childProps.ref, badgeProps.ref);
|
|
67
|
+
mergedProps["data-slot"] = "badge";
|
|
68
|
+
mergedProps["data-variant"] = badgeProps["data-variant"];
|
|
69
|
+
return mergedProps;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A badge component for highlighting status, labels, or categories.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* <Badge>Default</Badge>
|
|
77
|
+
* <Badge color="success">Active</Badge>
|
|
78
|
+
* <Badge color="warning">Pending</Badge>
|
|
79
|
+
* <Badge variant="outline">Info</Badge>
|
|
80
|
+
* <Badge asChild><a href="/docs">Docs</a></Badge>
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
function Badge({ variant = "default", color, size = "md", className, asChild = false, children, ref, ...props }) {
|
|
84
|
+
const badgeVariant = variant ?? "default";
|
|
85
|
+
const classes = badgeVariants({
|
|
86
|
+
variant,
|
|
87
|
+
color,
|
|
88
|
+
size,
|
|
89
|
+
className
|
|
90
|
+
});
|
|
91
|
+
if (asChild && React.isValidElement(children)) return React.cloneElement(children, mergeSlottedBadgeProps(children.props, {
|
|
92
|
+
...props,
|
|
93
|
+
ref,
|
|
94
|
+
className: classes,
|
|
95
|
+
"data-slot": "badge",
|
|
96
|
+
"data-variant": badgeVariant
|
|
97
|
+
}));
|
|
98
|
+
return /* @__PURE__ */ jsx("span", {
|
|
99
|
+
ref,
|
|
100
|
+
"data-slot": "badge",
|
|
101
|
+
"data-variant": badgeVariant,
|
|
102
|
+
className: classes,
|
|
103
|
+
...props,
|
|
104
|
+
children
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as ButtonVariant, c as ShadcnButtonVariant, i as ButtonSize, l as buttonVariants, n as ButtonColor, o as ButtonVariantsOptions, r as ButtonProps, s as ShadcnButtonSize, t as Button } from "../Button-QCM8ZKgR.js";
|
|
2
|
+
export { Button, ButtonColor, ButtonProps, ButtonSize, ButtonVariant, ButtonVariantsOptions, ShadcnButtonSize, ShadcnButtonVariant, buttonVariants };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
3
|
+
//#region src/components/Button.tsx
|
|
4
|
+
const SHADCN_BUTTON_VARIANT = {
|
|
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;
|
|
27
|
+
return [
|
|
28
|
+
"button",
|
|
29
|
+
`button--${mapped[0]}`,
|
|
30
|
+
`button--${color ?? mapped[1]}`,
|
|
31
|
+
`button--${buttonSize}`,
|
|
32
|
+
className
|
|
33
|
+
].filter(Boolean).join(" ");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A button component built on Base UI with semantic styling variants.
|
|
37
|
+
*
|
|
38
|
+
* Separates visual style (`variant`) from color intent (`color`) for
|
|
39
|
+
* maximum flexibility. Supports keyboard navigation, focus management, and
|
|
40
|
+
* accessibility out of the box. Keeps shadcn-compatible variant and size
|
|
41
|
+
* aliases for migration, while styling through Sigvelo CSS tokens.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <Button color="primary">Save changes</Button>
|
|
46
|
+
* <Button color="destructive">Delete account</Button>
|
|
47
|
+
* <Button variant="outline">Cancel</Button>
|
|
48
|
+
* <Button variant="ghost" size="icon"><SearchIcon /></Button>
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @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
|
+
*/
|
|
54
|
+
function Button({ variant = "default", color, size = "default", className, ref, ...props }) {
|
|
55
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
56
|
+
ref,
|
|
57
|
+
"data-slot": "button",
|
|
58
|
+
className: typeof className === "function" ? (state) => buttonVariants({
|
|
59
|
+
variant,
|
|
60
|
+
color,
|
|
61
|
+
size,
|
|
62
|
+
className: className(state)
|
|
63
|
+
}) : buttonVariants({
|
|
64
|
+
variant,
|
|
65
|
+
color,
|
|
66
|
+
size,
|
|
67
|
+
className
|
|
68
|
+
}),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/Card.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Props for the Card component.
|
|
6
|
+
*/
|
|
7
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/**
|
|
9
|
+
* Enable hover animation effects.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
hover?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
15
|
+
interface CardTitleProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
16
|
+
interface CardDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
17
|
+
interface CardActionProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
18
|
+
interface CardContentProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
19
|
+
interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
20
|
+
/**
|
|
21
|
+
* A container component that provides consistent styling and elevation.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Card>
|
|
26
|
+
* <h3>Title</h3>
|
|
27
|
+
* <p>Content</p>
|
|
28
|
+
* </Card>
|
|
29
|
+
*
|
|
30
|
+
* <Card hover onClick={() => navigate('/details')}>
|
|
31
|
+
* Clickable card
|
|
32
|
+
* </Card>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare function Card({
|
|
36
|
+
hover,
|
|
37
|
+
className,
|
|
38
|
+
children,
|
|
39
|
+
ref,
|
|
40
|
+
...props
|
|
41
|
+
}: CardProps & {
|
|
42
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
43
|
+
}): React.JSX.Element;
|
|
44
|
+
declare function CardHeader({
|
|
45
|
+
className,
|
|
46
|
+
ref,
|
|
47
|
+
...props
|
|
48
|
+
}: CardHeaderProps & {
|
|
49
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
50
|
+
}): React.JSX.Element;
|
|
51
|
+
declare function CardTitle({
|
|
52
|
+
className,
|
|
53
|
+
ref,
|
|
54
|
+
...props
|
|
55
|
+
}: CardTitleProps & {
|
|
56
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
57
|
+
}): React.JSX.Element;
|
|
58
|
+
declare function CardDescription({
|
|
59
|
+
className,
|
|
60
|
+
ref,
|
|
61
|
+
...props
|
|
62
|
+
}: CardDescriptionProps & {
|
|
63
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
64
|
+
}): React.JSX.Element;
|
|
65
|
+
declare function CardAction({
|
|
66
|
+
className,
|
|
67
|
+
ref,
|
|
68
|
+
...props
|
|
69
|
+
}: CardActionProps & {
|
|
70
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
71
|
+
}): React.JSX.Element;
|
|
72
|
+
declare function CardContent({
|
|
73
|
+
className,
|
|
74
|
+
ref,
|
|
75
|
+
...props
|
|
76
|
+
}: CardContentProps & {
|
|
77
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
78
|
+
}): React.JSX.Element;
|
|
79
|
+
declare function CardFooter({
|
|
80
|
+
className,
|
|
81
|
+
ref,
|
|
82
|
+
...props
|
|
83
|
+
}: CardFooterProps & {
|
|
84
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
85
|
+
}): React.JSX.Element;
|
|
86
|
+
//#endregion
|
|
87
|
+
export { Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/Card.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A container component that provides consistent styling and elevation.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Card>
|
|
10
|
+
* <h3>Title</h3>
|
|
11
|
+
* <p>Content</p>
|
|
12
|
+
* </Card>
|
|
13
|
+
*
|
|
14
|
+
* <Card hover onClick={() => navigate('/details')}>
|
|
15
|
+
* Clickable card
|
|
16
|
+
* </Card>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
function Card({ hover = false, className = "", children, ref, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx("div", {
|
|
21
|
+
ref,
|
|
22
|
+
"data-slot": "card",
|
|
23
|
+
className: [
|
|
24
|
+
"card",
|
|
25
|
+
hover && "card--hover",
|
|
26
|
+
className
|
|
27
|
+
].filter(Boolean).join(" "),
|
|
28
|
+
...props,
|
|
29
|
+
children
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function CardHeader({ className = "", ref, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx("div", {
|
|
34
|
+
ref,
|
|
35
|
+
"data-slot": "card-header",
|
|
36
|
+
className: ["card__header", className].filter(Boolean).join(" "),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function CardTitle({ className = "", ref, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx("div", {
|
|
42
|
+
ref,
|
|
43
|
+
"data-slot": "card-title",
|
|
44
|
+
className: ["card__title", className].filter(Boolean).join(" "),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function CardDescription({ className = "", ref, ...props }) {
|
|
49
|
+
return /* @__PURE__ */ jsx("div", {
|
|
50
|
+
ref,
|
|
51
|
+
"data-slot": "card-description",
|
|
52
|
+
className: ["card__description", className].filter(Boolean).join(" "),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function CardAction({ className = "", ref, ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsx("div", {
|
|
58
|
+
ref,
|
|
59
|
+
"data-slot": "card-action",
|
|
60
|
+
className: ["card__action", className].filter(Boolean).join(" "),
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function CardContent({ className = "", ref, ...props }) {
|
|
65
|
+
return /* @__PURE__ */ jsx("div", {
|
|
66
|
+
ref,
|
|
67
|
+
"data-slot": "card-content",
|
|
68
|
+
className: ["card__content", className].filter(Boolean).join(" "),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function CardFooter({ className = "", ref, ...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsx("div", {
|
|
74
|
+
ref,
|
|
75
|
+
"data-slot": "card-footer",
|
|
76
|
+
className: ["card__footer", className].filter(Boolean).join(" "),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { CollapsiblePanelProps, CollapsibleRootProps, CollapsibleTriggerProps } from "./Collapsible.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/_internal/icons.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Small inline-SVG icon set used across AI chat and code components.
|
|
7
|
+
*
|
|
8
|
+
* All icons are 16x16 by default, use `currentColor` for strokes/fills, and
|
|
9
|
+
* accept standard SVG props so consumers can override size and aria-hidden.
|
|
10
|
+
*/
|
|
11
|
+
type IconProps = Omit<React.SVGAttributes<SVGSVGElement>, "width" | "height"> & {
|
|
12
|
+
size?: number | string;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/ChainOfThought.d.ts
|
|
16
|
+
interface ChainOfThoughtProps extends Omit<CollapsibleRootProps, "className" | "unstyled"> {
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A collapsible display of an AI's step-by-step reasoning trace. Compose
|
|
21
|
+
* ChainOfThoughtHeader with ChainOfThoughtContent, then nest
|
|
22
|
+
* ChainOfThoughtStep (and optional ChainOfThoughtSearchResults /
|
|
23
|
+
* ChainOfThoughtImage) inside the content.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <ChainOfThought defaultOpen>
|
|
28
|
+
* <ChainOfThoughtHeader>Thinking</ChainOfThoughtHeader>
|
|
29
|
+
* <ChainOfThoughtContent>
|
|
30
|
+
* <ChainOfThoughtStep
|
|
31
|
+
* status="complete"
|
|
32
|
+
* label="Search docs"
|
|
33
|
+
* description="Found 3 relevant pages"
|
|
34
|
+
* >
|
|
35
|
+
* <ChainOfThoughtSearchResults>
|
|
36
|
+
* <ChainOfThoughtSearchResult title="Guide" href="…" />
|
|
37
|
+
* </ChainOfThoughtSearchResults>
|
|
38
|
+
* </ChainOfThoughtStep>
|
|
39
|
+
* <ChainOfThoughtStep status="active" label="Drafting answer" />
|
|
40
|
+
* </ChainOfThoughtContent>
|
|
41
|
+
* </ChainOfThought>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare function ChainOfThought({
|
|
45
|
+
className,
|
|
46
|
+
ref,
|
|
47
|
+
...props
|
|
48
|
+
}: ChainOfThoughtProps & {
|
|
49
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
50
|
+
}): React.JSX.Element;
|
|
51
|
+
interface ChainOfThoughtHeaderProps extends Omit<CollapsibleTriggerProps, "className" | "unstyled"> {
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Clickable header row that toggles the reasoning trace.
|
|
56
|
+
*/
|
|
57
|
+
declare function ChainOfThoughtHeader({
|
|
58
|
+
className,
|
|
59
|
+
children,
|
|
60
|
+
ref,
|
|
61
|
+
...props
|
|
62
|
+
}: ChainOfThoughtHeaderProps & {
|
|
63
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
64
|
+
}): React.JSX.Element;
|
|
65
|
+
interface ChainOfThoughtContentProps extends Omit<CollapsiblePanelProps, "className" | "unstyled"> {
|
|
66
|
+
className?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Collapsible panel containing step rows.
|
|
70
|
+
*/
|
|
71
|
+
declare function ChainOfThoughtContent({
|
|
72
|
+
className,
|
|
73
|
+
children,
|
|
74
|
+
ref,
|
|
75
|
+
...props
|
|
76
|
+
}: ChainOfThoughtContentProps & {
|
|
77
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
78
|
+
}): React.JSX.Element;
|
|
79
|
+
type ChainOfThoughtStepStatus = "pending" | "active" | "complete";
|
|
80
|
+
interface ChainOfThoughtStepProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
81
|
+
/** Optional icon component rendered instead of the default status icon. */
|
|
82
|
+
icon?: React.ComponentType<IconProps>;
|
|
83
|
+
/** Visual status of this step. */
|
|
84
|
+
status?: ChainOfThoughtStepStatus;
|
|
85
|
+
/** Primary label text for the step. */
|
|
86
|
+
label: React.ReactNode;
|
|
87
|
+
/** Optional secondary description rendered beneath the label. */
|
|
88
|
+
description?: React.ReactNode;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* A single step in the reasoning trace. Shows a status indicator, label,
|
|
92
|
+
* optional description, and any children (e.g. search results).
|
|
93
|
+
*/
|
|
94
|
+
declare function ChainOfThoughtStep({
|
|
95
|
+
className,
|
|
96
|
+
icon: Icon,
|
|
97
|
+
status,
|
|
98
|
+
label,
|
|
99
|
+
description,
|
|
100
|
+
children,
|
|
101
|
+
ref,
|
|
102
|
+
...props
|
|
103
|
+
}: ChainOfThoughtStepProps & {
|
|
104
|
+
ref?: React.Ref<HTMLLIElement>;
|
|
105
|
+
}): React.JSX.Element;
|
|
106
|
+
interface ChainOfThoughtSearchResultsProps extends React.HTMLAttributes<HTMLUListElement> {}
|
|
107
|
+
/**
|
|
108
|
+
* Container for a set of search-result chips displayed inside a step.
|
|
109
|
+
*/
|
|
110
|
+
declare function ChainOfThoughtSearchResults({
|
|
111
|
+
className,
|
|
112
|
+
children,
|
|
113
|
+
ref,
|
|
114
|
+
...props
|
|
115
|
+
}: ChainOfThoughtSearchResultsProps & {
|
|
116
|
+
ref?: React.Ref<HTMLUListElement>;
|
|
117
|
+
}): React.JSX.Element;
|
|
118
|
+
interface ChainOfThoughtSearchResultProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "title"> {
|
|
119
|
+
title?: React.ReactNode;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* A single search-result chip link.
|
|
123
|
+
*/
|
|
124
|
+
declare function ChainOfThoughtSearchResult({
|
|
125
|
+
className,
|
|
126
|
+
children,
|
|
127
|
+
title,
|
|
128
|
+
href,
|
|
129
|
+
ref,
|
|
130
|
+
...props
|
|
131
|
+
}: ChainOfThoughtSearchResultProps & {
|
|
132
|
+
ref?: React.Ref<HTMLAnchorElement>;
|
|
133
|
+
}): React.JSX.Element;
|
|
134
|
+
interface ChainOfThoughtImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
135
|
+
/** Optional caption rendered beneath the image. */
|
|
136
|
+
caption?: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* An image thumbnail with optional caption, displayed inside a step's
|
|
140
|
+
* children area.
|
|
141
|
+
*/
|
|
142
|
+
declare function ChainOfThoughtImage({
|
|
143
|
+
className,
|
|
144
|
+
children,
|
|
145
|
+
caption,
|
|
146
|
+
alt,
|
|
147
|
+
ref,
|
|
148
|
+
...props
|
|
149
|
+
}: ChainOfThoughtImageProps & {
|
|
150
|
+
ref?: React.Ref<HTMLImageElement>;
|
|
151
|
+
}): React.JSX.Element;
|
|
152
|
+
//#endregion
|
|
153
|
+
export { ChainOfThought, ChainOfThoughtContent, ChainOfThoughtContentProps, ChainOfThoughtHeader, ChainOfThoughtHeaderProps, ChainOfThoughtImage, ChainOfThoughtImageProps, ChainOfThoughtProps, ChainOfThoughtSearchResult, ChainOfThoughtSearchResultProps, ChainOfThoughtSearchResults, ChainOfThoughtSearchResultsProps, ChainOfThoughtStep, ChainOfThoughtStepProps, ChainOfThoughtStepStatus };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { C as SpinnerIcon, c as ChevronRightIcon, o as CheckIcon, u as DotIcon } from "../icons-BsWc8g4E.js";
|
|
2
|
+
import { t as cx } from "../class-names-9UtZwb0J.js";
|
|
3
|
+
import { CollapsiblePanel, CollapsibleRoot, CollapsibleTrigger } from "./Collapsible.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/ChainOfThought.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A collapsible display of an AI's step-by-step reasoning trace. Compose
|
|
9
|
+
* ChainOfThoughtHeader with ChainOfThoughtContent, then nest
|
|
10
|
+
* ChainOfThoughtStep (and optional ChainOfThoughtSearchResults /
|
|
11
|
+
* ChainOfThoughtImage) inside the content.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <ChainOfThought defaultOpen>
|
|
16
|
+
* <ChainOfThoughtHeader>Thinking</ChainOfThoughtHeader>
|
|
17
|
+
* <ChainOfThoughtContent>
|
|
18
|
+
* <ChainOfThoughtStep
|
|
19
|
+
* status="complete"
|
|
20
|
+
* label="Search docs"
|
|
21
|
+
* description="Found 3 relevant pages"
|
|
22
|
+
* >
|
|
23
|
+
* <ChainOfThoughtSearchResults>
|
|
24
|
+
* <ChainOfThoughtSearchResult title="Guide" href="…" />
|
|
25
|
+
* </ChainOfThoughtSearchResults>
|
|
26
|
+
* </ChainOfThoughtStep>
|
|
27
|
+
* <ChainOfThoughtStep status="active" label="Drafting answer" />
|
|
28
|
+
* </ChainOfThoughtContent>
|
|
29
|
+
* </ChainOfThought>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
function ChainOfThought({ className, ref, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx(CollapsibleRoot, {
|
|
34
|
+
ref,
|
|
35
|
+
className: cx("chain-of-thought", className),
|
|
36
|
+
...props,
|
|
37
|
+
unstyled: true
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Clickable header row that toggles the reasoning trace.
|
|
42
|
+
*/
|
|
43
|
+
function ChainOfThoughtHeader({ className, children = "Chain of Thought", ref, ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
45
|
+
ref,
|
|
46
|
+
className: cx("chain-of-thought__header", className),
|
|
47
|
+
...props,
|
|
48
|
+
unstyled: true,
|
|
49
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
50
|
+
className: "chain-of-thought__header-icon",
|
|
51
|
+
"aria-hidden": "true",
|
|
52
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
53
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "chain-of-thought__header-label",
|
|
55
|
+
children
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Collapsible panel containing step rows.
|
|
61
|
+
*/
|
|
62
|
+
function ChainOfThoughtContent({ className, children, ref, ...props }) {
|
|
63
|
+
return /* @__PURE__ */ jsx(CollapsiblePanel, {
|
|
64
|
+
ref,
|
|
65
|
+
className: cx("chain-of-thought__content", className),
|
|
66
|
+
...props,
|
|
67
|
+
unstyled: true,
|
|
68
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
69
|
+
className: "chain-of-thought__steps",
|
|
70
|
+
children
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A single step in the reasoning trace. Shows a status indicator, label,
|
|
76
|
+
* optional description, and any children (e.g. search results).
|
|
77
|
+
*/
|
|
78
|
+
function ChainOfThoughtStep({ className, icon: Icon, status = "complete", label, description, children, ref, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
80
|
+
ref,
|
|
81
|
+
className: cx("chain-of-thought__step", `chain-of-thought__step--${status}`, className),
|
|
82
|
+
"data-status": status,
|
|
83
|
+
...props,
|
|
84
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
85
|
+
className: "chain-of-thought__step-indicator",
|
|
86
|
+
"aria-hidden": "true",
|
|
87
|
+
children: Icon ? /* @__PURE__ */ jsx(Icon, {}) : status === "complete" ? /* @__PURE__ */ jsx(CheckIcon, {}) : status === "active" ? /* @__PURE__ */ jsx(SpinnerIcon, {}) : /* @__PURE__ */ jsx(DotIcon, {})
|
|
88
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
89
|
+
className: "chain-of-thought__step-body",
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx("div", {
|
|
92
|
+
className: "chain-of-thought__step-label",
|
|
93
|
+
children: label
|
|
94
|
+
}),
|
|
95
|
+
description ? /* @__PURE__ */ jsx("div", {
|
|
96
|
+
className: "chain-of-thought__step-description",
|
|
97
|
+
children: description
|
|
98
|
+
}) : null,
|
|
99
|
+
children ? /* @__PURE__ */ jsx("div", {
|
|
100
|
+
className: "chain-of-thought__step-children",
|
|
101
|
+
children
|
|
102
|
+
}) : null
|
|
103
|
+
]
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Container for a set of search-result chips displayed inside a step.
|
|
109
|
+
*/
|
|
110
|
+
function ChainOfThoughtSearchResults({ className, children, ref, ...props }) {
|
|
111
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
112
|
+
ref,
|
|
113
|
+
className: cx("chain-of-thought__search-results", className),
|
|
114
|
+
...props,
|
|
115
|
+
children
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A single search-result chip link.
|
|
120
|
+
*/
|
|
121
|
+
function ChainOfThoughtSearchResult({ className, children, title, href, ref, ...props }) {
|
|
122
|
+
return /* @__PURE__ */ jsx("li", {
|
|
123
|
+
className: "chain-of-thought__search-result-item",
|
|
124
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
125
|
+
ref,
|
|
126
|
+
href,
|
|
127
|
+
className: cx("chain-of-thought__search-result", className),
|
|
128
|
+
target: "_blank",
|
|
129
|
+
rel: "noreferrer",
|
|
130
|
+
...props,
|
|
131
|
+
children: children ?? title
|
|
132
|
+
})
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* An image thumbnail with optional caption, displayed inside a step's
|
|
137
|
+
* children area.
|
|
138
|
+
*/
|
|
139
|
+
function ChainOfThoughtImage({ className, children, caption, alt = "", ref, ...props }) {
|
|
140
|
+
return /* @__PURE__ */ jsxs("figure", {
|
|
141
|
+
className: cx("chain-of-thought__image", className),
|
|
142
|
+
children: [children ? /* @__PURE__ */ jsx("div", {
|
|
143
|
+
className: "chain-of-thought__image-frame",
|
|
144
|
+
children
|
|
145
|
+
}) : /* @__PURE__ */ jsx("img", {
|
|
146
|
+
ref,
|
|
147
|
+
alt,
|
|
148
|
+
className: "chain-of-thought__image-img",
|
|
149
|
+
...props
|
|
150
|
+
}), caption ? /* @__PURE__ */ jsx("figcaption", {
|
|
151
|
+
className: "chain-of-thought__image-caption",
|
|
152
|
+
children: caption
|
|
153
|
+
}) : null]
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
export { ChainOfThought, ChainOfThoughtContent, ChainOfThoughtHeader, ChainOfThoughtImage, ChainOfThoughtSearchResult, ChainOfThoughtSearchResults, ChainOfThoughtStep };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CheckboxRootProps } from "@base-ui/react/checkbox";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Checkbox.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Checkbox component.
|
|
7
|
+
*/
|
|
8
|
+
interface CheckboxProps extends Omit<CheckboxRootProps, "className"> {
|
|
9
|
+
/** Additional CSS class names */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An accessible checkbox component with custom styling.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Checkbox defaultChecked onChange={(checked) => console.log(checked)} />
|
|
18
|
+
*
|
|
19
|
+
* <div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
|
|
20
|
+
* <Checkbox id="terms" checked={agreed} onChange={setAgreed} />
|
|
21
|
+
* <Label htmlFor="terms">I agree to the terms</Label>
|
|
22
|
+
* </div>
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @see {@link https://base-ui.com/react/components/checkbox | Base UI Checkbox}
|
|
26
|
+
*/
|
|
27
|
+
declare function Checkbox({
|
|
28
|
+
className,
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
}: CheckboxProps & {
|
|
32
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
33
|
+
}): React.JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Checkbox, CheckboxProps };
|