@mcp-b/react-components 0.1.3 → 0.2.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/{Button-QCM8ZKgR.d.ts → Button-Ct5I6aTu.d.ts} +1 -0
- package/dist/{CodeBlock-CttHhWcb.js → CodeBlock-BrCoypnc.js} +2 -2
- package/dist/{CodeBlock-V6pgafSS.d.ts → CodeBlock-CxQXv3C4.d.ts} +1 -1
- package/dist/Combobox-D9anamNr.d.ts +177 -0
- package/dist/Menu-B5vDqZe_.d.ts +395 -0
- package/dist/Tabs-D9EAq09D.d.ts +84 -0
- package/dist/components/Activity.d.ts +148 -0
- package/dist/components/Activity.js +177 -0
- package/dist/components/AgentChat.d.ts +61 -0
- package/dist/components/AgentChat.js +91 -0
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/Artifact.d.ts +1 -1
- package/dist/components/Artifact.js +1 -1
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +2 -1
- package/dist/components/ChainOfThought.d.ts +1 -11
- package/dist/components/ChainOfThought.js +2 -2
- package/dist/components/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/CodeBlock.d.ts +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/Combobox.d.ts +1 -176
- package/dist/components/Commit.d.ts +1 -1
- package/dist/components/Commit.js +3 -3
- package/dist/components/Context.d.ts +1 -1
- package/dist/components/ContextMenu.js +1 -1
- package/dist/components/Conversation.d.ts +1 -1
- package/dist/components/Conversation.js +11 -8
- package/dist/components/Dialog.js +1 -1
- package/dist/components/EnvironmentVariables.d.ts +1 -1
- package/dist/components/EnvironmentVariables.js +1 -1
- package/dist/components/FileTree.js +1 -1
- package/dist/components/Menu.d.ts +1 -394
- package/dist/components/Menubar.js +1 -1
- package/dist/components/Message.d.ts +1 -1
- package/dist/components/Message.js +1 -1
- package/dist/components/ModelSelector.d.ts +1 -1
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/NavigationMenu.js +1 -1
- package/dist/components/PricingPage.js +1 -1
- package/dist/components/PromptInput.d.ts +4 -4
- package/dist/components/PromptInput.js +2 -2
- package/dist/components/Queue.d.ts +1 -1
- package/dist/components/Queue.js +2 -2
- package/dist/components/Reasoning.js +2 -2
- package/dist/components/Select.js +1 -1
- package/dist/components/Sources.js +2 -2
- package/dist/components/Stepper.js +1 -1
- package/dist/components/Tabs.d.ts +1 -83
- package/dist/components/Task.js +2 -2
- package/dist/components/Terminal.d.ts +2 -2
- package/dist/components/Terminal.js +2 -2
- package/dist/components/TestResults.js +2 -2
- package/dist/components/Tool.js +8 -4
- package/dist/components/WebPreview.d.ts +1 -1
- package/dist/components/WebPreview.js +1 -1
- package/dist/components/icons.d.ts +2 -0
- package/dist/components/icons.js +2 -0
- package/dist/components/useStickToBottom.js +10 -1
- package/dist/{copy-button-BIATcZWZ.d.ts → copy-button-BKXqGiNm.d.ts} +1 -1
- package/dist/{copy-button-BNgclDrO.js → copy-button-DAPlB8Z0.js} +1 -1
- package/dist/{icons-BsWc8g4E.js → icons-Bf7JMKk-.js} +41 -1
- package/dist/icons-BklFyZbx.d.ts +48 -0
- package/dist/styles/accordion.css +34 -17
- package/dist/styles/activity.css +386 -0
- package/dist/styles/agent-chat.css +21 -0
- package/dist/styles/agent-connection.css +20 -3
- package/dist/styles/alert-dialog.css +37 -15
- package/dist/styles/artifact.css +24 -6
- package/dist/styles/autocomplete.css +25 -6
- package/dist/styles/badge.css +8 -6
- package/dist/styles/browser-live-view.css +164 -0
- package/dist/styles/browser-replay.css +189 -0
- package/dist/styles/button.css +14 -6
- package/dist/styles/card.css +4 -8
- package/dist/styles/chain-of-thought.css +5 -12
- package/dist/styles/checkbox.css +3 -3
- package/dist/styles/code-block.css +4 -8
- package/dist/styles/collapsible.css +7 -10
- package/dist/styles/combobox.css +6 -6
- package/dist/styles/commit.css +2 -9
- package/dist/styles/context-menu.css +2 -2
- package/dist/styles/conversation.css +12 -5
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/field.css +2 -2
- package/dist/styles/file-tree.css +2 -2
- package/dist/styles/index.css +5 -0
- package/dist/styles/input.css +8 -3
- package/dist/styles/menu.css +4 -4
- package/dist/styles/menubar.css +5 -5
- package/dist/styles/message.css +3 -4
- package/dist/styles/navigation-menu.css +6 -6
- package/dist/styles/number-field.css +4 -4
- package/dist/styles/popover.css +7 -7
- package/dist/styles/preview-card.css +2 -2
- package/dist/styles/pricing-page.css +2 -2
- package/dist/styles/prompt-input.css +11 -9
- package/dist/styles/queue.css +6 -15
- package/dist/styles/radio.css +5 -5
- package/dist/styles/reasoning.css +6 -10
- package/dist/styles/scroll-area.css +2 -2
- package/dist/styles/select.css +3 -3
- package/dist/styles/slider.css +2 -2
- package/dist/styles/sources.css +5 -12
- package/dist/styles/stepper.css +13 -9
- package/dist/styles/switch.css +4 -4
- package/dist/styles/tabs.css +3 -3
- package/dist/styles/task.css +13 -18
- package/dist/styles/terminal.css +1 -3
- package/dist/styles/test-results.css +2 -9
- package/dist/styles/toast.css +3 -3
- package/dist/styles/toggle-group.css +3 -3
- package/dist/styles/toggle.css +3 -3
- package/dist/styles/tool.css +22 -21
- package/dist/styles/toolbar.css +4 -4
- package/dist/styles/workspace-explorer.css +108 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/package.json +9 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Select, SelectContent, SelectItem, SelectList, SelectTrigger, SelectValue } from "./components/Select.js";
|
|
2
1
|
import { t as cx } from "./class-names-9UtZwb0J.js";
|
|
3
|
-
import {
|
|
2
|
+
import { Select, SelectContent, SelectItem, SelectList, SelectTrigger, SelectValue } from "./components/Select.js";
|
|
3
|
+
import { t as CopyButton } from "./copy-button-DAPlB8Z0.js";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { createHighlighter } from "shiki";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as SelectTriggerProps, M as SelectValueProps, S as SelectProps, r as SelectContentProps, s as SelectItemProps } from "./Select-CRsKCJ9x.js";
|
|
2
|
-
import { t as CopyButtonProps } from "./copy-button-
|
|
2
|
+
import { t as CopyButtonProps } from "./copy-button-BKXqGiNm.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { BundledLanguage, ThemedToken } from "shiki";
|
|
5
5
|
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Combobox } from "@base-ui/react/combobox";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Combobox.d.ts
|
|
5
|
+
declare function ComboboxInput({
|
|
6
|
+
className,
|
|
7
|
+
ref,
|
|
8
|
+
...props
|
|
9
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.Input>, "className"> & {
|
|
10
|
+
className?: string;
|
|
11
|
+
} & {
|
|
12
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
13
|
+
}): React.JSX.Element;
|
|
14
|
+
declare function ComboboxTrigger({
|
|
15
|
+
className,
|
|
16
|
+
ref,
|
|
17
|
+
...props
|
|
18
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.Trigger>, "className"> & {
|
|
19
|
+
className?: string;
|
|
20
|
+
} & {
|
|
21
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
declare function Clear({
|
|
24
|
+
className,
|
|
25
|
+
ref,
|
|
26
|
+
...props
|
|
27
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.Clear>, "className"> & {
|
|
28
|
+
className?: string;
|
|
29
|
+
} & {
|
|
30
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
31
|
+
}): React.JSX.Element;
|
|
32
|
+
declare function ComboboxPositioner({
|
|
33
|
+
className,
|
|
34
|
+
ref,
|
|
35
|
+
...props
|
|
36
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.Positioner>, "className"> & {
|
|
37
|
+
className?: string;
|
|
38
|
+
} & {
|
|
39
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
40
|
+
}): React.JSX.Element;
|
|
41
|
+
declare function ComboboxPopup({
|
|
42
|
+
className,
|
|
43
|
+
tabIndex,
|
|
44
|
+
ref,
|
|
45
|
+
...props
|
|
46
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.Popup>, "className"> & {
|
|
47
|
+
className?: string;
|
|
48
|
+
} & {
|
|
49
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
50
|
+
}): React.JSX.Element;
|
|
51
|
+
declare function ComboboxList({
|
|
52
|
+
className,
|
|
53
|
+
ref,
|
|
54
|
+
...props
|
|
55
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.List>, "className"> & {
|
|
56
|
+
className?: string;
|
|
57
|
+
} & {
|
|
58
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
59
|
+
}): React.JSX.Element;
|
|
60
|
+
declare function ComboboxItem({
|
|
61
|
+
className,
|
|
62
|
+
ref,
|
|
63
|
+
...props
|
|
64
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.Item>, "className"> & {
|
|
65
|
+
className?: string;
|
|
66
|
+
} & {
|
|
67
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
68
|
+
}): React.JSX.Element;
|
|
69
|
+
declare function ItemIndicator({
|
|
70
|
+
className,
|
|
71
|
+
ref,
|
|
72
|
+
...props
|
|
73
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.ItemIndicator>, "className"> & {
|
|
74
|
+
className?: string;
|
|
75
|
+
} & {
|
|
76
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
77
|
+
}): React.JSX.Element;
|
|
78
|
+
declare function ComboboxEmpty({
|
|
79
|
+
className,
|
|
80
|
+
ref,
|
|
81
|
+
...props
|
|
82
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.Empty>, "className"> & {
|
|
83
|
+
className?: string;
|
|
84
|
+
} & {
|
|
85
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
86
|
+
}): React.JSX.Element;
|
|
87
|
+
declare function ComboboxGroup({
|
|
88
|
+
className,
|
|
89
|
+
ref,
|
|
90
|
+
...props
|
|
91
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.Group>, "className"> & {
|
|
92
|
+
className?: string;
|
|
93
|
+
} & {
|
|
94
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
95
|
+
}): React.JSX.Element;
|
|
96
|
+
declare function ComboboxLabel({
|
|
97
|
+
className,
|
|
98
|
+
ref,
|
|
99
|
+
...props
|
|
100
|
+
}: Omit<React.ComponentPropsWithRef<typeof Combobox.GroupLabel>, "className"> & {
|
|
101
|
+
className?: string;
|
|
102
|
+
} & {
|
|
103
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
104
|
+
}): React.JSX.Element;
|
|
105
|
+
/**
|
|
106
|
+
* An input combined with a filterable list of predefined items.
|
|
107
|
+
* Supports single and multiple selection, async search, and grouping.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```tsx
|
|
111
|
+
* // Basic single select
|
|
112
|
+
* const fruits = [
|
|
113
|
+
* { label: 'Apple', value: 'apple' },
|
|
114
|
+
* { label: 'Banana', value: 'banana' },
|
|
115
|
+
* { label: 'Orange', value: 'orange' },
|
|
116
|
+
* ];
|
|
117
|
+
*
|
|
118
|
+
* <Combobox.Root items={fruits}>
|
|
119
|
+
* <Combobox.Input placeholder="Select a fruit" />
|
|
120
|
+
* <Combobox.Trigger>
|
|
121
|
+
* <ChevronDownIcon />
|
|
122
|
+
* </Combobox.Trigger>
|
|
123
|
+
* <Combobox.Portal>
|
|
124
|
+
* <Combobox.Positioner>
|
|
125
|
+
* <Combobox.Popup>
|
|
126
|
+
* <Combobox.List>
|
|
127
|
+
* {(item) => (
|
|
128
|
+
* <Combobox.Item value={item}>
|
|
129
|
+
* <Combobox.ItemIndicator>
|
|
130
|
+
* <CheckIcon />
|
|
131
|
+
* </Combobox.ItemIndicator>
|
|
132
|
+
* {item.label}
|
|
133
|
+
* </Combobox.Item>
|
|
134
|
+
* )}
|
|
135
|
+
* </Combobox.List>
|
|
136
|
+
* <Combobox.Empty>No results found</Combobox.Empty>
|
|
137
|
+
* </Combobox.Popup>
|
|
138
|
+
* </Combobox.Positioner>
|
|
139
|
+
* </Combobox.Portal>
|
|
140
|
+
* </Combobox.Root>
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* @see {@link https://base-ui.com/react/components/combobox | Base UI Combobox}
|
|
144
|
+
*/
|
|
145
|
+
declare const ComboboxContent: typeof ComboboxPopup;
|
|
146
|
+
declare const ComboboxValue: typeof Combobox.Value;
|
|
147
|
+
declare const ComboboxChips: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ComboboxChipsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
148
|
+
declare const ComboboxChip: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ComboboxChipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
149
|
+
declare const ComboboxChipsInput: typeof ComboboxInput;
|
|
150
|
+
declare const ComboboxCollection: typeof Combobox.Collection;
|
|
151
|
+
declare const ComboboxSeparator: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
152
|
+
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
153
|
+
declare const Combobox$1: typeof Combobox.Root & {
|
|
154
|
+
Root: typeof Combobox.Root;
|
|
155
|
+
Input: typeof ComboboxInput;
|
|
156
|
+
Trigger: typeof ComboboxTrigger;
|
|
157
|
+
Clear: typeof Clear;
|
|
158
|
+
Portal: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").AutocompletePortalProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
159
|
+
Positioner: typeof ComboboxPositioner;
|
|
160
|
+
Popup: typeof ComboboxPopup;
|
|
161
|
+
Content: typeof ComboboxPopup;
|
|
162
|
+
List: typeof ComboboxList;
|
|
163
|
+
Item: typeof ComboboxItem;
|
|
164
|
+
ItemIndicator: typeof ItemIndicator;
|
|
165
|
+
Empty: typeof ComboboxEmpty;
|
|
166
|
+
Group: typeof ComboboxGroup;
|
|
167
|
+
GroupLabel: typeof ComboboxLabel;
|
|
168
|
+
Label: typeof ComboboxLabel;
|
|
169
|
+
Value: typeof Combobox.Value;
|
|
170
|
+
Chips: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ComboboxChipsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
171
|
+
Chip: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ComboboxChipProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
172
|
+
ChipsInput: typeof ComboboxInput;
|
|
173
|
+
Collection: typeof Combobox.Collection;
|
|
174
|
+
Separator: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
175
|
+
};
|
|
176
|
+
//#endregion
|
|
177
|
+
export { ComboboxValue as _, ComboboxCollection as a, ComboboxGroup as c, ComboboxLabel as d, ComboboxList as f, ComboboxTrigger as g, ComboboxSeparator as h, ComboboxChipsInput as i, ComboboxInput as l, ComboboxPositioner as m, ComboboxChip as n, ComboboxContent as o, ComboboxPopup as p, ComboboxChips as r, ComboboxEmpty as s, Combobox$1 as t, ComboboxItem as u, useComboboxAnchor as v };
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Menu } from "@base-ui/react/menu";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Menu.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Menu.Root component.
|
|
7
|
+
*/
|
|
8
|
+
interface MenuProps extends React.ComponentPropsWithoutRef<typeof Menu.Root> {}
|
|
9
|
+
/**
|
|
10
|
+
* Props for the Menu.Trigger component.
|
|
11
|
+
*/
|
|
12
|
+
interface MenuTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.Trigger>, "className"> {
|
|
13
|
+
/** Additional CSS class names */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Props for the Menu.Portal component.
|
|
18
|
+
*/
|
|
19
|
+
interface MenuPortalProps extends React.ComponentPropsWithoutRef<typeof Menu.Portal> {}
|
|
20
|
+
/**
|
|
21
|
+
* Props for the Menu.Positioner component.
|
|
22
|
+
*/
|
|
23
|
+
interface MenuPositionerProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.Positioner>, "className"> {
|
|
24
|
+
/** Additional CSS class names */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Props for the Menu.Popup component.
|
|
29
|
+
*/
|
|
30
|
+
interface MenuPopupProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.Popup>, "className"> {
|
|
31
|
+
/** Additional CSS class names */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
type MenuPlacementProps = Pick<MenuPositionerProps, "anchor" | "positionMethod" | "side" | "sideOffset" | "align" | "alignOffset" | "collisionBoundary" | "collisionPadding" | "sticky" | "arrowPadding" | "disableAnchorTracking" | "collisionAvoidance">;
|
|
35
|
+
type MenuContentProps = MenuPopupProps & MenuPlacementProps;
|
|
36
|
+
/**
|
|
37
|
+
* Props for the Menu.Item component.
|
|
38
|
+
*/
|
|
39
|
+
interface MenuItemProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.Item>, "className"> {
|
|
40
|
+
/** Additional CSS class names */
|
|
41
|
+
className?: string;
|
|
42
|
+
inset?: boolean;
|
|
43
|
+
variant?: "default" | "destructive";
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Props for the Menu.Group component.
|
|
47
|
+
*/
|
|
48
|
+
interface MenuGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.Group>, "className"> {
|
|
49
|
+
/** Additional CSS class names */
|
|
50
|
+
className?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Props for the Menu.GroupLabel component.
|
|
54
|
+
*/
|
|
55
|
+
interface MenuGroupLabelProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.GroupLabel>, "className"> {
|
|
56
|
+
/** Additional CSS class names */
|
|
57
|
+
className?: string;
|
|
58
|
+
inset?: boolean;
|
|
59
|
+
}
|
|
60
|
+
type MenuLabelProps = MenuGroupLabelProps;
|
|
61
|
+
/**
|
|
62
|
+
* Props for the Menu.Arrow component.
|
|
63
|
+
*/
|
|
64
|
+
interface MenuArrowProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.Arrow>, "className"> {
|
|
65
|
+
/** Additional CSS class names */
|
|
66
|
+
className?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Props for the Menu.Separator component.
|
|
70
|
+
*/
|
|
71
|
+
interface MenuSeparatorProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.Separator>, "className"> {
|
|
72
|
+
/** Additional CSS class names */
|
|
73
|
+
className?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Props for the Menu.RadioGroup component.
|
|
77
|
+
*/
|
|
78
|
+
interface MenuRadioGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.RadioGroup>, "className"> {
|
|
79
|
+
/** Additional CSS class names */
|
|
80
|
+
className?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Props for the Menu.RadioItem component.
|
|
84
|
+
*/
|
|
85
|
+
interface MenuRadioItemProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.RadioItem>, "className"> {
|
|
86
|
+
/** Additional CSS class names */
|
|
87
|
+
className?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Props for the Menu.RadioItemIndicator component.
|
|
91
|
+
*/
|
|
92
|
+
interface MenuRadioItemIndicatorProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.RadioItemIndicator>, "className"> {
|
|
93
|
+
/** Additional CSS class names */
|
|
94
|
+
className?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Props for the Menu.CheckboxItem component.
|
|
98
|
+
*/
|
|
99
|
+
interface MenuCheckboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.CheckboxItem>, "className"> {
|
|
100
|
+
/** Additional CSS class names */
|
|
101
|
+
className?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Props for the Menu.CheckboxItemIndicator component.
|
|
105
|
+
*/
|
|
106
|
+
interface MenuCheckboxItemIndicatorProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.CheckboxItemIndicator>, "className"> {
|
|
107
|
+
/** Additional CSS class names */
|
|
108
|
+
className?: string;
|
|
109
|
+
}
|
|
110
|
+
interface MenuShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {}
|
|
111
|
+
interface MenuSubProps extends React.ComponentPropsWithoutRef<typeof Menu.SubmenuRoot> {}
|
|
112
|
+
type MenuSubContentProps = MenuContentProps;
|
|
113
|
+
/**
|
|
114
|
+
* Props for the Menu.SubmenuTrigger component.
|
|
115
|
+
*/
|
|
116
|
+
interface MenuSubmenuTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof Menu.SubmenuTrigger>, "className"> {
|
|
117
|
+
/** Additional CSS class names */
|
|
118
|
+
className?: string;
|
|
119
|
+
inset?: boolean;
|
|
120
|
+
}
|
|
121
|
+
type MenuSubTriggerProps = MenuSubmenuTriggerProps;
|
|
122
|
+
/**
|
|
123
|
+
* Root component that manages menu state.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```tsx
|
|
127
|
+
* <Menu.Root>
|
|
128
|
+
* <Menu.Trigger>Actions</Menu.Trigger>
|
|
129
|
+
* <Menu.Portal>
|
|
130
|
+
* <Menu.Positioner>
|
|
131
|
+
* <Menu.Popup>
|
|
132
|
+
* <Menu.Item>Edit</Menu.Item>
|
|
133
|
+
* <Menu.Item>Delete</Menu.Item>
|
|
134
|
+
* </Menu.Popup>
|
|
135
|
+
* </Menu.Positioner>
|
|
136
|
+
* </Menu.Portal>
|
|
137
|
+
* </Menu.Root>
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* @see {@link https://base-ui.com/react/components/menu | Base UI Menu}
|
|
141
|
+
*/
|
|
142
|
+
declare const MenuRoot: (props: MenuProps) => React.JSX.Element;
|
|
143
|
+
/**
|
|
144
|
+
* Button that toggles the menu visibility.
|
|
145
|
+
*/
|
|
146
|
+
declare function MenuTrigger({
|
|
147
|
+
className,
|
|
148
|
+
ref,
|
|
149
|
+
...props
|
|
150
|
+
}: MenuTriggerProps & {
|
|
151
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
152
|
+
}): React.JSX.Element;
|
|
153
|
+
/**
|
|
154
|
+
* Renders menu content in a portal.
|
|
155
|
+
*/
|
|
156
|
+
declare const MenuPortal: (props: MenuPortalProps) => React.JSX.Element;
|
|
157
|
+
/**
|
|
158
|
+
* Positions the menu popup relative to the trigger.
|
|
159
|
+
*/
|
|
160
|
+
declare function MenuPositioner({
|
|
161
|
+
className,
|
|
162
|
+
ref,
|
|
163
|
+
...props
|
|
164
|
+
}: MenuPositionerProps & {
|
|
165
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
166
|
+
}): React.JSX.Element;
|
|
167
|
+
/**
|
|
168
|
+
* Container for menu items.
|
|
169
|
+
*/
|
|
170
|
+
declare function MenuPopup({
|
|
171
|
+
className,
|
|
172
|
+
ref,
|
|
173
|
+
...props
|
|
174
|
+
}: MenuPopupProps & {
|
|
175
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
176
|
+
}): React.JSX.Element;
|
|
177
|
+
declare function MenuContent({
|
|
178
|
+
anchor,
|
|
179
|
+
positionMethod,
|
|
180
|
+
side,
|
|
181
|
+
sideOffset,
|
|
182
|
+
align,
|
|
183
|
+
alignOffset,
|
|
184
|
+
collisionBoundary,
|
|
185
|
+
collisionPadding,
|
|
186
|
+
sticky,
|
|
187
|
+
arrowPadding,
|
|
188
|
+
disableAnchorTracking,
|
|
189
|
+
collisionAvoidance,
|
|
190
|
+
...props
|
|
191
|
+
}: MenuContentProps & {
|
|
192
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
193
|
+
}): React.JSX.Element;
|
|
194
|
+
/**
|
|
195
|
+
* Interactive menu item.
|
|
196
|
+
*/
|
|
197
|
+
declare function MenuItem({
|
|
198
|
+
className,
|
|
199
|
+
inset,
|
|
200
|
+
variant,
|
|
201
|
+
ref,
|
|
202
|
+
...props
|
|
203
|
+
}: MenuItemProps & {
|
|
204
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
205
|
+
}): React.JSX.Element;
|
|
206
|
+
/**
|
|
207
|
+
* Groups related menu items.
|
|
208
|
+
*/
|
|
209
|
+
declare function MenuGroup({
|
|
210
|
+
className,
|
|
211
|
+
ref,
|
|
212
|
+
...props
|
|
213
|
+
}: MenuGroupProps & {
|
|
214
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
215
|
+
}): React.JSX.Element;
|
|
216
|
+
/**
|
|
217
|
+
* Label for a group of menu items.
|
|
218
|
+
*/
|
|
219
|
+
declare function MenuGroupLabel({
|
|
220
|
+
className,
|
|
221
|
+
inset,
|
|
222
|
+
ref,
|
|
223
|
+
...props
|
|
224
|
+
}: MenuGroupLabelProps & {
|
|
225
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
226
|
+
}): React.JSX.Element;
|
|
227
|
+
declare const MenuLabel: typeof MenuGroupLabel;
|
|
228
|
+
/**
|
|
229
|
+
* Arrow pointing to the trigger.
|
|
230
|
+
*/
|
|
231
|
+
declare function MenuArrow({
|
|
232
|
+
className,
|
|
233
|
+
ref,
|
|
234
|
+
...props
|
|
235
|
+
}: MenuArrowProps & {
|
|
236
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
237
|
+
}): React.JSX.Element;
|
|
238
|
+
/**
|
|
239
|
+
* Visual separator between menu sections.
|
|
240
|
+
*/
|
|
241
|
+
declare function MenuSeparator({
|
|
242
|
+
className,
|
|
243
|
+
ref,
|
|
244
|
+
...props
|
|
245
|
+
}: MenuSeparatorProps & {
|
|
246
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
247
|
+
}): React.JSX.Element;
|
|
248
|
+
/**
|
|
249
|
+
* Group for exclusive radio selection.
|
|
250
|
+
*/
|
|
251
|
+
declare function MenuRadioGroup({
|
|
252
|
+
className,
|
|
253
|
+
ref,
|
|
254
|
+
...props
|
|
255
|
+
}: MenuRadioGroupProps & {
|
|
256
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
257
|
+
}): React.JSX.Element;
|
|
258
|
+
/**
|
|
259
|
+
* Radio item for exclusive selection.
|
|
260
|
+
*/
|
|
261
|
+
declare function MenuRadioItem({
|
|
262
|
+
className,
|
|
263
|
+
children,
|
|
264
|
+
ref,
|
|
265
|
+
...props
|
|
266
|
+
}: MenuRadioItemProps & {
|
|
267
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
268
|
+
}): React.JSX.Element;
|
|
269
|
+
/**
|
|
270
|
+
* Indicator for selected radio item.
|
|
271
|
+
*/
|
|
272
|
+
declare function MenuRadioItemIndicator({
|
|
273
|
+
className,
|
|
274
|
+
ref,
|
|
275
|
+
...props
|
|
276
|
+
}: MenuRadioItemIndicatorProps & {
|
|
277
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
278
|
+
}): React.JSX.Element;
|
|
279
|
+
/**
|
|
280
|
+
* Checkbox item for toggling options.
|
|
281
|
+
*/
|
|
282
|
+
declare function MenuCheckboxItem({
|
|
283
|
+
className,
|
|
284
|
+
children,
|
|
285
|
+
ref,
|
|
286
|
+
...props
|
|
287
|
+
}: MenuCheckboxItemProps & {
|
|
288
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
289
|
+
}): React.JSX.Element;
|
|
290
|
+
/**
|
|
291
|
+
* Indicator for checked checkbox item.
|
|
292
|
+
*/
|
|
293
|
+
declare function MenuCheckboxItemIndicator({
|
|
294
|
+
className,
|
|
295
|
+
ref,
|
|
296
|
+
...props
|
|
297
|
+
}: MenuCheckboxItemIndicatorProps & {
|
|
298
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
299
|
+
}): React.JSX.Element;
|
|
300
|
+
declare function MenuShortcut({
|
|
301
|
+
className,
|
|
302
|
+
ref,
|
|
303
|
+
...props
|
|
304
|
+
}: MenuShortcutProps & {
|
|
305
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
306
|
+
}): React.JSX.Element;
|
|
307
|
+
declare function MenuSub(props: MenuSubProps): React.JSX.Element;
|
|
308
|
+
declare function MenuSubContent({
|
|
309
|
+
side,
|
|
310
|
+
align,
|
|
311
|
+
sideOffset,
|
|
312
|
+
...props
|
|
313
|
+
}: MenuSubContentProps & {
|
|
314
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
315
|
+
}): React.JSX.Element;
|
|
316
|
+
/**
|
|
317
|
+
* Trigger that opens a submenu.
|
|
318
|
+
*/
|
|
319
|
+
declare function MenuSubmenuTrigger({
|
|
320
|
+
className,
|
|
321
|
+
inset,
|
|
322
|
+
ref,
|
|
323
|
+
...props
|
|
324
|
+
}: MenuSubmenuTriggerProps & {
|
|
325
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
326
|
+
}): React.JSX.Element;
|
|
327
|
+
declare const MenuSubTrigger: typeof MenuSubmenuTrigger;
|
|
328
|
+
/**
|
|
329
|
+
* A dropdown menu with keyboard navigation support.
|
|
330
|
+
* Provides items, groups, checkboxes, radio selections, and nested submenus.
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```tsx
|
|
334
|
+
* // Basic menu
|
|
335
|
+
* <Menu.Root>
|
|
336
|
+
* <Menu.Trigger>Actions</Menu.Trigger>
|
|
337
|
+
* <Menu.Portal>
|
|
338
|
+
* <Menu.Positioner>
|
|
339
|
+
* <Menu.Popup>
|
|
340
|
+
* <Menu.Item onClick={() => console.log('Edit')}>Edit</Menu.Item>
|
|
341
|
+
* <Menu.Item onClick={() => console.log('Copy')}>Copy</Menu.Item>
|
|
342
|
+
* <Menu.Separator />
|
|
343
|
+
* <Menu.Item onClick={() => console.log('Delete')}>Delete</Menu.Item>
|
|
344
|
+
* </Menu.Popup>
|
|
345
|
+
* </Menu.Positioner>
|
|
346
|
+
* </Menu.Portal>
|
|
347
|
+
* </Menu.Root>
|
|
348
|
+
* ```
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```tsx
|
|
352
|
+
* // Menu with checkbox items
|
|
353
|
+
* <Menu.Root>
|
|
354
|
+
* <Menu.Trigger>View Options</Menu.Trigger>
|
|
355
|
+
* <Menu.Portal>
|
|
356
|
+
* <Menu.Positioner>
|
|
357
|
+
* <Menu.Popup>
|
|
358
|
+
* <Menu.CheckboxItem checked={showGrid} onCheckedChange={setShowGrid}>
|
|
359
|
+
* <Menu.CheckboxItemIndicator />
|
|
360
|
+
* Show Grid
|
|
361
|
+
* </Menu.CheckboxItem>
|
|
362
|
+
* </Menu.Popup>
|
|
363
|
+
* </Menu.Positioner>
|
|
364
|
+
* </Menu.Portal>
|
|
365
|
+
* </Menu.Root>
|
|
366
|
+
* ```
|
|
367
|
+
*
|
|
368
|
+
* @see {@link https://base-ui.com/react/components/menu | Base UI Menu}
|
|
369
|
+
*/
|
|
370
|
+
declare const Menu$1: ((props: MenuProps) => React.JSX.Element) & {
|
|
371
|
+
Root: (props: MenuProps) => React.JSX.Element;
|
|
372
|
+
Trigger: typeof MenuTrigger;
|
|
373
|
+
Portal: (props: MenuPortalProps) => React.JSX.Element;
|
|
374
|
+
Positioner: typeof MenuPositioner;
|
|
375
|
+
Popup: typeof MenuPopup;
|
|
376
|
+
Content: typeof MenuContent;
|
|
377
|
+
Item: typeof MenuItem;
|
|
378
|
+
Group: typeof MenuGroup;
|
|
379
|
+
GroupLabel: typeof MenuGroupLabel;
|
|
380
|
+
Label: typeof MenuGroupLabel;
|
|
381
|
+
Arrow: typeof MenuArrow;
|
|
382
|
+
Separator: typeof MenuSeparator;
|
|
383
|
+
RadioGroup: typeof MenuRadioGroup;
|
|
384
|
+
RadioItem: typeof MenuRadioItem;
|
|
385
|
+
RadioItemIndicator: typeof MenuRadioItemIndicator;
|
|
386
|
+
CheckboxItem: typeof MenuCheckboxItem;
|
|
387
|
+
CheckboxItemIndicator: typeof MenuCheckboxItemIndicator;
|
|
388
|
+
Shortcut: typeof MenuShortcut;
|
|
389
|
+
Sub: typeof MenuSub;
|
|
390
|
+
SubContent: typeof MenuSubContent;
|
|
391
|
+
SubTrigger: typeof MenuSubmenuTrigger;
|
|
392
|
+
SubmenuTrigger: typeof MenuSubmenuTrigger;
|
|
393
|
+
};
|
|
394
|
+
//#endregion
|
|
395
|
+
export { MenuRadioItemProps as A, MenuSubTrigger as B, MenuPositionerProps as C, MenuRadioItem as D, MenuRadioGroupProps as E, MenuShortcutProps as F, MenuTriggerProps as G, MenuSubmenuTrigger as H, MenuSub as I, MenuSubContent as L, MenuSeparator as M, MenuSeparatorProps as N, MenuRadioItemIndicator as O, MenuShortcut as P, MenuSubContentProps as R, MenuPositioner as S, MenuRadioGroup as T, MenuSubmenuTriggerProps as U, MenuSubTriggerProps as V, MenuTrigger as W, MenuLabelProps as _, MenuCheckboxItemIndicator as a, MenuPortal as b, MenuContent as c, MenuGroupLabel as d, MenuGroupLabelProps as f, MenuLabel as g, MenuItemProps as h, MenuCheckboxItem as i, MenuRoot as j, MenuRadioItemIndicatorProps as k, MenuContentProps as l, MenuItem as m, MenuArrow as n, MenuCheckboxItemIndicatorProps as o, MenuGroupProps as p, MenuArrowProps as r, MenuCheckboxItemProps as s, Menu$1 as t, MenuGroup as u, MenuPopup as v, MenuProps as w, MenuPortalProps as x, MenuPopupProps as y, MenuSubProps as z };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Tabs.d.ts
|
|
5
|
+
interface TabsProps extends Omit<Tabs.Root.Props, "className"> {
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The visual style variant.
|
|
9
|
+
* @default 'default'
|
|
10
|
+
*/
|
|
11
|
+
variant?: "default" | "bordered";
|
|
12
|
+
}
|
|
13
|
+
interface TabsListProps extends Omit<Tabs.List.Props, "className"> {
|
|
14
|
+
className?: string;
|
|
15
|
+
variant?: "default" | "line" | null;
|
|
16
|
+
}
|
|
17
|
+
interface TabProps extends Omit<Tabs.Tab.Props, "className"> {
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
interface TabPanelProps extends Omit<Tabs.Panel.Props, "className"> {
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
type TabsTriggerProps = TabProps;
|
|
24
|
+
type TabsContentProps = TabPanelProps;
|
|
25
|
+
interface TabsListVariantsOptions {
|
|
26
|
+
variant?: "default" | "line" | null;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
declare function tabsListVariants({
|
|
30
|
+
variant,
|
|
31
|
+
className
|
|
32
|
+
}?: TabsListVariantsOptions): string;
|
|
33
|
+
/**
|
|
34
|
+
* A tabs component for organizing content into separate views.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Tabs defaultValue="tab1">
|
|
39
|
+
* <TabsList>
|
|
40
|
+
* <Tab value="tab1">Tab 1</Tab>
|
|
41
|
+
* <Tab value="tab2">Tab 2</Tab>
|
|
42
|
+
* </TabsList>
|
|
43
|
+
* <TabPanel value="tab1">Content 1</TabPanel>
|
|
44
|
+
* <TabPanel value="tab2">Content 2</TabPanel>
|
|
45
|
+
* </Tabs>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @see {@link https://base-ui.com/react/components/tabs | Base UI Tabs}
|
|
49
|
+
*/
|
|
50
|
+
declare function Tabs$1({
|
|
51
|
+
orientation,
|
|
52
|
+
variant,
|
|
53
|
+
className,
|
|
54
|
+
ref,
|
|
55
|
+
...props
|
|
56
|
+
}: TabsProps & {
|
|
57
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
+
}): React.JSX.Element;
|
|
59
|
+
declare function TabsList({
|
|
60
|
+
className,
|
|
61
|
+
variant,
|
|
62
|
+
ref,
|
|
63
|
+
...props
|
|
64
|
+
}: TabsListProps & {
|
|
65
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
66
|
+
}): React.JSX.Element;
|
|
67
|
+
declare function Tab({
|
|
68
|
+
className,
|
|
69
|
+
ref,
|
|
70
|
+
...props
|
|
71
|
+
}: TabProps & {
|
|
72
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
73
|
+
}): React.JSX.Element;
|
|
74
|
+
declare function TabPanel({
|
|
75
|
+
className,
|
|
76
|
+
ref,
|
|
77
|
+
...props
|
|
78
|
+
}: TabPanelProps & {
|
|
79
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
80
|
+
}): React.JSX.Element;
|
|
81
|
+
declare const TabsTrigger: typeof Tab;
|
|
82
|
+
declare const TabsContent: typeof TabPanel;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { Tabs$1 as a, TabsList as c, TabsProps as d, TabsTrigger as f, TabProps as i, TabsListProps as l, tabsListVariants as m, TabPanel as n, TabsContent as o, TabsTriggerProps as p, TabPanelProps as r, TabsContentProps as s, Tab as t, TabsListVariantsOptions as u };
|