@mcp-b/react-components 0.1.1 → 0.1.2

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.
Files changed (203) hide show
  1. package/dist/Button-QCM8ZKgR.d.ts +98 -0
  2. package/dist/CodeBlock-CttHhWcb.js +356 -0
  3. package/dist/CodeBlock-V6pgafSS.d.ts +174 -0
  4. package/dist/Select-CRsKCJ9x.d.ts +200 -0
  5. package/dist/class-names-9UtZwb0J.js +12 -0
  6. package/dist/components/Accordion.d.ts +81 -0
  7. package/dist/components/Accordion.js +97 -0
  8. package/dist/components/AgentConnection.d.ts +69 -0
  9. package/dist/components/AgentConnection.js +176 -0
  10. package/dist/components/AlertDialog.d.ts +148 -0
  11. package/dist/components/AlertDialog.js +141 -0
  12. package/dist/components/Artifact.d.ts +128 -0
  13. package/dist/components/Artifact.js +115 -0
  14. package/dist/components/Autocomplete.d.ts +186 -0
  15. package/dist/components/Autocomplete.js +186 -0
  16. package/dist/components/Avatar.d.ts +134 -0
  17. package/dist/components/Avatar.js +118 -0
  18. package/dist/components/Badge.d.ts +68 -0
  19. package/dist/components/Badge.js +108 -0
  20. package/dist/components/Button.d.ts +2 -0
  21. package/dist/components/Button.js +73 -0
  22. package/dist/components/Card.d.ts +87 -0
  23. package/dist/components/Card.js +81 -0
  24. package/dist/components/ChainOfThought.d.ts +153 -0
  25. package/dist/components/ChainOfThought.js +157 -0
  26. package/dist/components/Checkbox.d.ts +35 -0
  27. package/dist/components/Checkbox.js +47 -0
  28. package/dist/components/CheckboxGroup.d.ts +76 -0
  29. package/dist/components/CheckboxGroup.js +69 -0
  30. package/dist/components/CodeBlock.d.ts +2 -0
  31. package/dist/components/CodeBlock.js +2 -0
  32. package/dist/components/Collapsible.d.ts +127 -0
  33. package/dist/components/Collapsible.js +103 -0
  34. package/dist/components/Combobox.d.ts +177 -0
  35. package/dist/components/Combobox.js +179 -0
  36. package/dist/components/Commit.d.ts +265 -0
  37. package/dist/components/Commit.js +282 -0
  38. package/dist/components/Context.d.ts +129 -0
  39. package/dist/components/Context.js +309 -0
  40. package/dist/components/ContextMenu.d.ts +282 -0
  41. package/dist/components/ContextMenu.js +270 -0
  42. package/dist/components/Conversation.d.ts +166 -0
  43. package/dist/components/Conversation.js +202 -0
  44. package/dist/components/Dialog.d.ts +120 -0
  45. package/dist/components/Dialog.js +114 -0
  46. package/dist/components/EnvironmentVariables.d.ts +176 -0
  47. package/dist/components/EnvironmentVariables.js +221 -0
  48. package/dist/components/Field.d.ts +281 -0
  49. package/dist/components/Field.js +274 -0
  50. package/dist/components/Fieldset.d.ts +93 -0
  51. package/dist/components/Fieldset.js +81 -0
  52. package/dist/components/FileTree.d.ts +116 -0
  53. package/dist/components/FileTree.js +310 -0
  54. package/dist/components/Form.d.ts +94 -0
  55. package/dist/components/Form.js +88 -0
  56. package/dist/components/GithubMotionMark.d.ts +13 -0
  57. package/dist/components/GithubMotionMark.js +23 -0
  58. package/dist/components/Input.d.ts +33 -0
  59. package/dist/components/Input.js +27 -0
  60. package/dist/components/Label.d.ts +44 -0
  61. package/dist/components/Label.js +41 -0
  62. package/dist/components/Menu.d.ts +395 -0
  63. package/dist/components/Menu.js +338 -0
  64. package/dist/components/Menubar.d.ts +331 -0
  65. package/dist/components/Menubar.js +299 -0
  66. package/dist/components/Message.d.ts +216 -0
  67. package/dist/components/Message.js +245 -0
  68. package/dist/components/Meter.d.ts +151 -0
  69. package/dist/components/Meter.js +121 -0
  70. package/dist/components/ModelSelector.d.ts +198 -0
  71. package/dist/components/ModelSelector.js +306 -0
  72. package/dist/components/NaniteScene.d.ts +33 -0
  73. package/dist/components/NaniteScene.js +405 -0
  74. package/dist/components/NavigationMenu.d.ts +256 -0
  75. package/dist/components/NavigationMenu.js +228 -0
  76. package/dist/components/NumberField.d.ts +159 -0
  77. package/dist/components/NumberField.js +123 -0
  78. package/dist/components/Popover.d.ts +278 -0
  79. package/dist/components/Popover.js +245 -0
  80. package/dist/components/PreviewCard.d.ts +156 -0
  81. package/dist/components/PreviewCard.js +156 -0
  82. package/dist/components/PricingPage.d.ts +209 -0
  83. package/dist/components/PricingPage.js +506 -0
  84. package/dist/components/Progress.d.ts +58 -0
  85. package/dist/components/Progress.js +51 -0
  86. package/dist/components/PromptInput.d.ts +399 -0
  87. package/dist/components/PromptInput.js +737 -0
  88. package/dist/components/Queue.d.ts +241 -0
  89. package/dist/components/Queue.js +225 -0
  90. package/dist/components/RadioGroup.d.ts +78 -0
  91. package/dist/components/RadioGroup.js +72 -0
  92. package/dist/components/Reasoning.d.ts +88 -0
  93. package/dist/components/Reasoning.js +187 -0
  94. package/dist/components/ScrollArea.d.ts +160 -0
  95. package/dist/components/ScrollArea.js +145 -0
  96. package/dist/components/Select.d.ts +2 -0
  97. package/dist/components/Select.js +260 -0
  98. package/dist/components/Separator.d.ts +45 -0
  99. package/dist/components/Separator.js +40 -0
  100. package/dist/components/Shell.d.ts +163 -0
  101. package/dist/components/Shell.js +137 -0
  102. package/dist/components/Slider.d.ts +120 -0
  103. package/dist/components/Slider.js +115 -0
  104. package/dist/components/Sources.d.ts +91 -0
  105. package/dist/components/Sources.js +121 -0
  106. package/dist/components/Stepper.d.ts +190 -0
  107. package/dist/components/Stepper.js +315 -0
  108. package/dist/components/Switch.d.ts +57 -0
  109. package/dist/components/Switch.js +55 -0
  110. package/dist/components/Tabs.d.ts +84 -0
  111. package/dist/components/Tabs.js +78 -0
  112. package/dist/components/Task.d.ts +100 -0
  113. package/dist/components/Task.js +120 -0
  114. package/dist/components/Terminal.d.ts +118 -0
  115. package/dist/components/Terminal.js +234 -0
  116. package/dist/components/TestResults.d.ts +236 -0
  117. package/dist/components/TestResults.js +346 -0
  118. package/dist/components/Toast.d.ts +192 -0
  119. package/dist/components/Toast.js +163 -0
  120. package/dist/components/Toggle.d.ts +69 -0
  121. package/dist/components/Toggle.js +66 -0
  122. package/dist/components/ToggleGroup.d.ts +69 -0
  123. package/dist/components/ToggleGroup.js +99 -0
  124. package/dist/components/Tool.d.ts +119 -0
  125. package/dist/components/Tool.js +192 -0
  126. package/dist/components/Toolbar.d.ts +162 -0
  127. package/dist/components/Toolbar.js +126 -0
  128. package/dist/components/Tooltip.d.ts +81 -0
  129. package/dist/components/Tooltip.js +74 -0
  130. package/dist/components/WebPreview.d.ts +143 -0
  131. package/dist/components/WebPreview.js +280 -0
  132. package/dist/components/useStickToBottom.d.ts +30 -0
  133. package/dist/components/useStickToBottom.js +95 -0
  134. package/dist/copy-button-BIATcZWZ.d.ts +16 -0
  135. package/dist/copy-button-BNgclDrO.js +43 -0
  136. package/dist/icons-BsWc8g4E.js +221 -0
  137. package/dist/styles/accordion.css +10 -10
  138. package/dist/styles/agent-connection.css +18 -17
  139. package/dist/styles/alert-dialog.css +48 -29
  140. package/dist/styles/artifact.css +10 -10
  141. package/dist/styles/autocomplete.css +25 -24
  142. package/dist/styles/avatar.css +96 -6
  143. package/dist/styles/badge.css +78 -14
  144. package/dist/styles/base.css +9 -9
  145. package/dist/styles/button.css +57 -38
  146. package/dist/styles/card.css +57 -10
  147. package/dist/styles/chain-of-thought.css +47 -33
  148. package/dist/styles/checkbox.css +24 -10
  149. package/dist/styles/code-block.css +22 -15
  150. package/dist/styles/collapsible.css +14 -12
  151. package/dist/styles/combobox.css +26 -25
  152. package/dist/styles/commit.css +49 -24
  153. package/dist/styles/context-menu.css +70 -16
  154. package/dist/styles/context.css +15 -15
  155. package/dist/styles/conversation.css +12 -12
  156. package/dist/styles/dialog.css +52 -16
  157. package/dist/styles/environment-variables.css +19 -19
  158. package/dist/styles/field.css +184 -22
  159. package/dist/styles/fieldset.css +5 -4
  160. package/dist/styles/file-tree.css +17 -17
  161. package/dist/styles/index.css.d.ts +1 -0
  162. package/dist/styles/input.css +45 -11
  163. package/dist/styles/label.css +21 -4
  164. package/dist/styles/menu.css +55 -32
  165. package/dist/styles/menubar.css +80 -28
  166. package/dist/styles/message.css +22 -13
  167. package/dist/styles/meter.css +8 -8
  168. package/dist/styles/model-selector.css +33 -21
  169. package/dist/styles/navigation-menu.css +26 -24
  170. package/dist/styles/number-field.css +20 -18
  171. package/dist/styles/popover.css +38 -28
  172. package/dist/styles/preview-card.css +15 -13
  173. package/dist/styles/pricing-page.css +53 -53
  174. package/dist/styles/progress.css +7 -7
  175. package/dist/styles/prompt-input.css +73 -24
  176. package/dist/styles/queue.css +58 -32
  177. package/dist/styles/radio.css +26 -11
  178. package/dist/styles/reasoning.css +15 -11
  179. package/dist/styles/scroll-area.css +6 -6
  180. package/dist/styles/scrollbars.css +4 -4
  181. package/dist/styles/select.css +84 -25
  182. package/dist/styles/separator.css +1 -1
  183. package/dist/styles/shell.css +21 -20
  184. package/dist/styles/slider.css +35 -11
  185. package/dist/styles/sources.css +20 -20
  186. package/dist/styles/stepper.css +22 -22
  187. package/dist/styles/switch.css +29 -13
  188. package/dist/styles/tabs.css +23 -16
  189. package/dist/styles/task.css +27 -23
  190. package/dist/styles/terminal.css +16 -13
  191. package/dist/styles/test-results.css +79 -32
  192. package/dist/styles/toast.css +26 -25
  193. package/dist/styles/toggle-group.css +12 -12
  194. package/dist/styles/toggle.css +29 -11
  195. package/dist/styles/tool.css +54 -32
  196. package/dist/styles/toolbar.css +30 -28
  197. package/dist/styles/tooltip.css +10 -8
  198. package/dist/styles/web-preview.css +37 -21
  199. package/dist/utils/structured-code.d.ts +10 -0
  200. package/dist/utils/structured-code.js +81 -0
  201. package/package.json +16 -7
  202. package/dist/index.d.ts +0 -7236
  203. package/dist/index.js +0 -8945
@@ -0,0 +1,260 @@
1
+ import { i as ArrowUpIcon, o as CheckIcon, t as ArrowDownIcon } from "../icons-BsWc8g4E.js";
2
+ import * as React from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Select as Select$1 } from "@base-ui/react/select";
5
+ //#region src/components/Select.tsx
6
+ const SelectLabelsContext = React.createContext(null);
7
+ /**
8
+ * A select component for choosing from a list of options.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Select defaultValue="option1">
13
+ * <SelectTrigger>
14
+ * <SelectValue placeholder="Select..." />
15
+ * </SelectTrigger>
16
+ * <SelectPortal>
17
+ * <SelectPositioner>
18
+ * <SelectPopup>
19
+ * <SelectList>
20
+ * <SelectOption value="option1">Option 1</SelectOption>
21
+ * <SelectOption value="option2">Option 2</SelectOption>
22
+ * </SelectList>
23
+ * </SelectPopup>
24
+ * </SelectPositioner>
25
+ * </SelectPortal>
26
+ * </Select>
27
+ * ```
28
+ *
29
+ * @see {@link https://base-ui.com/react/components/select | Base UI Select}
30
+ */
31
+ function Select({ items, ...props }) {
32
+ const [labels, setLabels] = React.useState(() => /* @__PURE__ */ new Map());
33
+ const itemLabels = React.useMemo(() => {
34
+ if (!items) return null;
35
+ const map = /* @__PURE__ */ new Map();
36
+ for (const item of items) map.set(item.value, item.label);
37
+ return map;
38
+ }, [items]);
39
+ const registerLabel = React.useCallback((value, label) => {
40
+ setLabels((prev) => {
41
+ if (prev.get(value) === label && prev.has(value)) return prev;
42
+ const next = new Map(prev);
43
+ next.set(value, label);
44
+ return next;
45
+ });
46
+ }, []);
47
+ const unregisterLabel = React.useCallback((value) => {
48
+ setLabels((prev) => {
49
+ if (!prev.has(value)) return prev;
50
+ const next = new Map(prev);
51
+ next.delete(value);
52
+ return next;
53
+ });
54
+ }, []);
55
+ const mergedLabels = React.useMemo(() => {
56
+ if (!itemLabels) return labels;
57
+ const merged = new Map(itemLabels);
58
+ for (const [k, v] of labels) merged.set(k, v);
59
+ return merged;
60
+ }, [labels, itemLabels]);
61
+ const contextValue = React.useMemo(() => ({
62
+ labels: mergedLabels,
63
+ registerLabel,
64
+ unregisterLabel
65
+ }), [
66
+ mergedLabels,
67
+ registerLabel,
68
+ unregisterLabel
69
+ ]);
70
+ return /* @__PURE__ */ jsx(SelectLabelsContext.Provider, {
71
+ value: contextValue,
72
+ children: /* @__PURE__ */ jsx(Select$1.Root, {
73
+ "data-slot": "select",
74
+ ...props
75
+ })
76
+ });
77
+ }
78
+ function SelectTrigger({ size = "default", className = "", children, ref, ...props }) {
79
+ const normalizedSize = size === "md" ? "default" : size;
80
+ const classes = [
81
+ "select__trigger",
82
+ normalizedSize === "sm" && "select__trigger--sm",
83
+ className
84
+ ].filter(Boolean).join(" ");
85
+ return /* @__PURE__ */ jsxs(Select$1.Trigger, {
86
+ ref,
87
+ "data-slot": "select-trigger",
88
+ "data-size": normalizedSize,
89
+ className: classes,
90
+ ...props,
91
+ children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
92
+ className: "select__icon",
93
+ children: /* @__PURE__ */ jsx(ArrowDownIcon, {})
94
+ })]
95
+ });
96
+ }
97
+ function SelectValue({ placeholder, children, ref, ...props }) {
98
+ const context = React.useContext(SelectLabelsContext);
99
+ if (children) return /* @__PURE__ */ jsx(Select$1.Value, {
100
+ ref,
101
+ "data-slot": "select-value",
102
+ placeholder,
103
+ ...props,
104
+ children
105
+ });
106
+ return /* @__PURE__ */ jsx(Select$1.Value, {
107
+ ref,
108
+ "data-slot": "select-value",
109
+ ...props,
110
+ children: (value) => {
111
+ if (value === null || value === void 0 || value === "") return placeholder ? /* @__PURE__ */ jsx("span", {
112
+ className: "select__placeholder",
113
+ children: placeholder
114
+ }) : null;
115
+ return context?.labels.get(value) ?? value;
116
+ }
117
+ });
118
+ }
119
+ const SelectPortal = Select$1.Portal;
120
+ function SelectPositioner({ className = "", ref, ...props }) {
121
+ const classes = ["select__positioner", className].filter(Boolean).join(" ");
122
+ return /* @__PURE__ */ jsx(Select$1.Positioner, {
123
+ ref,
124
+ className: classes,
125
+ ...props
126
+ });
127
+ }
128
+ function SelectPopup({ className = "", ref, ...props }) {
129
+ const classes = ["select__popup", className].filter(Boolean).join(" ");
130
+ return /* @__PURE__ */ jsx(Select$1.Popup, {
131
+ ref,
132
+ "data-slot": "select-content",
133
+ className: classes,
134
+ ...props
135
+ });
136
+ }
137
+ function SelectContent({ anchor, positionMethod, side, sideOffset = 4, align, alignOffset, collisionBoundary, collisionPadding, sticky, arrowPadding, disableAnchorTracking, collisionAvoidance, position, children, ...props }) {
138
+ return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(SelectPositioner, {
139
+ anchor,
140
+ positionMethod,
141
+ side,
142
+ sideOffset: position === "item-aligned" ? 0 : sideOffset,
143
+ align,
144
+ alignOffset,
145
+ collisionBoundary,
146
+ collisionPadding,
147
+ sticky,
148
+ arrowPadding,
149
+ disableAnchorTracking,
150
+ collisionAvoidance,
151
+ children: /* @__PURE__ */ jsxs(SelectPopup, {
152
+ ...props,
153
+ children: [
154
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
155
+ /* @__PURE__ */ jsx(SelectList, { children }),
156
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
157
+ ]
158
+ })
159
+ }) });
160
+ }
161
+ function SelectList({ className = "", ref, ...props }) {
162
+ const classes = ["select__list", className].filter(Boolean).join(" ");
163
+ return /* @__PURE__ */ jsx(Select$1.List, {
164
+ ref,
165
+ "data-slot": "select-viewport",
166
+ className: classes,
167
+ ...props
168
+ });
169
+ }
170
+ function SelectOption({ className = "", value, children, ref, ...props }) {
171
+ const context = React.useContext(SelectLabelsContext);
172
+ const contextRef = React.useRef(context);
173
+ contextRef.current = context;
174
+ const childrenRef = React.useRef(children);
175
+ childrenRef.current = children;
176
+ React.useEffect(() => {
177
+ const ctx = contextRef.current;
178
+ if (ctx && value !== void 0) {
179
+ ctx.registerLabel(value, childrenRef.current);
180
+ return () => ctx.unregisterLabel(value);
181
+ }
182
+ }, [value]);
183
+ const classes = ["select__option", className].filter(Boolean).join(" ");
184
+ return /* @__PURE__ */ jsxs(Select$1.Item, {
185
+ ref,
186
+ "data-slot": "select-item",
187
+ className: classes,
188
+ value,
189
+ ...props,
190
+ children: [/* @__PURE__ */ jsx("span", {
191
+ "data-slot": "select-item-indicator",
192
+ className: "select__item-indicator",
193
+ children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
194
+ }), /* @__PURE__ */ jsx(Select$1.ItemText, { children })]
195
+ });
196
+ }
197
+ const SelectItem = SelectOption;
198
+ function SelectOptionGroup({ label, className = "", children, ref, ...props }) {
199
+ const classes = ["select__option-group", className].filter(Boolean).join(" ");
200
+ return /* @__PURE__ */ jsxs(Select$1.Group, {
201
+ ref,
202
+ "data-slot": "select-group",
203
+ className: classes,
204
+ ...props,
205
+ children: [label && /* @__PURE__ */ jsx(Select$1.GroupLabel, {
206
+ "data-slot": "select-label",
207
+ className: "select__group-label",
208
+ children: label
209
+ }), children]
210
+ });
211
+ }
212
+ const SelectGroup = SelectOptionGroup;
213
+ function SelectLabel({ className = "", ref, ...props }) {
214
+ const classes = ["select__group-label", className].filter(Boolean).join(" ");
215
+ return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
216
+ ref,
217
+ "data-slot": "select-label",
218
+ className: classes,
219
+ ...props
220
+ });
221
+ }
222
+ function SelectSeparator({ className = "", ref, ...props }) {
223
+ const classes = ["select__separator", className].filter(Boolean).join(" ");
224
+ return /* @__PURE__ */ jsx(Select$1.Separator, {
225
+ ref,
226
+ "data-slot": "select-separator",
227
+ className: classes,
228
+ ...props
229
+ });
230
+ }
231
+ function SelectScrollUpButton({ className = "", children, ref, ...props }) {
232
+ const classes = [
233
+ "select__scroll-button",
234
+ "select__scroll-button--up",
235
+ className
236
+ ].filter(Boolean).join(" ");
237
+ return /* @__PURE__ */ jsx(Select$1.ScrollUpArrow, {
238
+ ref,
239
+ "data-slot": "select-scroll-up-button",
240
+ className: classes,
241
+ ...props,
242
+ children: children ?? /* @__PURE__ */ jsx(ArrowUpIcon, {})
243
+ });
244
+ }
245
+ function SelectScrollDownButton({ className = "", children, ref, ...props }) {
246
+ const classes = [
247
+ "select__scroll-button",
248
+ "select__scroll-button--down",
249
+ className
250
+ ].filter(Boolean).join(" ");
251
+ return /* @__PURE__ */ jsx(Select$1.ScrollDownArrow, {
252
+ ref,
253
+ "data-slot": "select-scroll-down-button",
254
+ className: classes,
255
+ ...props,
256
+ children: children ?? /* @__PURE__ */ jsx(ArrowDownIcon, {})
257
+ });
258
+ }
259
+ //#endregion
260
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectList, SelectOption, SelectOptionGroup, SelectPopup, SelectPortal, SelectPositioner, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ import { Separator as Separator$1 } from "@base-ui/react/separator";
3
+
4
+ //#region src/components/Separator.d.ts
5
+ /**
6
+ * Props for the Separator component.
7
+ */
8
+ interface SeparatorProps extends Omit<React.ComponentPropsWithRef<typeof Separator$1>, "className"> {
9
+ /**
10
+ * Whether the separator is purely visual.
11
+ * @default true
12
+ */
13
+ decorative?: boolean;
14
+ /**
15
+ * Additional CSS class names.
16
+ */
17
+ className?: string;
18
+ }
19
+ /**
20
+ * A visual divider component that separates content sections.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <Separator />
25
+ *
26
+ * <nav style={{ display: 'flex', alignItems: 'center' }}>
27
+ * <a href="/home">Home</a>
28
+ * <Separator orientation="vertical" />
29
+ * <a href="/about">About</a>
30
+ * </nav>
31
+ * ```
32
+ *
33
+ * @see {@link https://base-ui.com/react/components/separator | Base UI Separator}
34
+ */
35
+ declare function Separator({
36
+ orientation,
37
+ decorative,
38
+ className,
39
+ ref,
40
+ ...props
41
+ }: SeparatorProps & {
42
+ ref?: React.Ref<HTMLDivElement>;
43
+ }): React.JSX.Element;
44
+ //#endregion
45
+ export { Separator, SeparatorProps };
@@ -0,0 +1,40 @@
1
+ import "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Separator as Separator$1 } from "@base-ui/react/separator";
4
+ //#region src/components/Separator.tsx
5
+ /**
6
+ * A visual divider component that separates content sections.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <Separator />
11
+ *
12
+ * <nav style={{ display: 'flex', alignItems: 'center' }}>
13
+ * <a href="/home">Home</a>
14
+ * <Separator orientation="vertical" />
15
+ * <a href="/about">About</a>
16
+ * </nav>
17
+ * ```
18
+ *
19
+ * @see {@link https://base-ui.com/react/components/separator | Base UI Separator}
20
+ */
21
+ function Separator({ orientation = "horizontal", decorative = true, className = "", ref, ...props }) {
22
+ const classes = [
23
+ "separator",
24
+ `separator--${orientation}`,
25
+ className
26
+ ].filter(Boolean).join(" ");
27
+ return /* @__PURE__ */ jsx(Separator$1, {
28
+ ref,
29
+ "data-slot": "separator",
30
+ ...decorative ? {
31
+ role: "none",
32
+ "aria-orientation": void 0
33
+ } : { "aria-orientation": orientation === "vertical" ? orientation : void 0 },
34
+ orientation,
35
+ className: classes,
36
+ ...props
37
+ });
38
+ }
39
+ //#endregion
40
+ export { Separator };
@@ -0,0 +1,163 @@
1
+ import * as React from "react";
2
+
3
+ //#region src/components/Shell.d.ts
4
+ /**
5
+ * Props for the Shell.Root component.
6
+ */
7
+ interface ShellRootProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ /** Additional CSS class names */
9
+ className?: string;
10
+ /** The heading text displayed in the header */
11
+ heading?: string;
12
+ }
13
+ /**
14
+ * Props for the Shell.ActionBar component.
15
+ */
16
+ interface ShellActionBarProps extends React.HTMLAttributes<HTMLDivElement> {
17
+ /** Additional CSS class names */
18
+ className?: string;
19
+ }
20
+ /**
21
+ * Props for the Shell.Action component.
22
+ */
23
+ interface ShellActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
24
+ /** Additional CSS class names */
25
+ className?: string;
26
+ /** Icon to display */
27
+ icon?: React.ReactNode;
28
+ /** Whether this action is currently active */
29
+ active?: boolean;
30
+ /** Accessible label for the action */
31
+ label?: string;
32
+ }
33
+ /**
34
+ * Props for the Shell.Panel component.
35
+ */
36
+ interface ShellPanelProps extends React.HTMLAttributes<HTMLDivElement> {
37
+ /** Additional CSS class names */
38
+ className?: string;
39
+ /** The panel heading */
40
+ heading?: string;
41
+ /** Whether the panel is visible */
42
+ open?: boolean;
43
+ }
44
+ /**
45
+ * Props for the Shell.Content component.
46
+ */
47
+ interface ShellContentProps extends React.HTMLAttributes<HTMLDivElement> {
48
+ /** Additional CSS class names */
49
+ className?: string;
50
+ }
51
+ /**
52
+ * Root container for the shell layout.
53
+ * Provides a structured layout with optional header, action bar, panel, and content areas.
54
+ *
55
+ * Built internally for dense tools with side actions and optional panels. Use
56
+ * for app-like work surfaces, not marketing pages or generic sections.
57
+ *
58
+ * Styling consumes Sigvelo layout, border, surface, spacing, and focus tokens.
59
+ * Actions need labels because the visible affordance is usually icon-only.
60
+ *
61
+ * @example
62
+ * ```tsx
63
+ * <Shell.Root heading="Project">
64
+ * <Shell.ActionBar>
65
+ * <Shell.Action icon={<FilterIcon />} label="Filter" />
66
+ * </Shell.ActionBar>
67
+ * <Shell.Content>Map or tool content</Shell.Content>
68
+ * </Shell.Root>
69
+ * ```
70
+ */
71
+ declare function ShellRoot({
72
+ className,
73
+ heading,
74
+ children,
75
+ ref,
76
+ ...props
77
+ }: ShellRootProps & {
78
+ ref?: React.Ref<HTMLDivElement>;
79
+ }): React.JSX.Element;
80
+ /**
81
+ * Container for action buttons that toggle panels.
82
+ * Typically placed on the left side of the shell.
83
+ */
84
+ declare function ShellActionBar({
85
+ className,
86
+ children,
87
+ ref,
88
+ ...props
89
+ }: ShellActionBarProps & {
90
+ ref?: React.Ref<HTMLDivElement>;
91
+ }): React.JSX.Element;
92
+ /**
93
+ * An action button within the action bar.
94
+ */
95
+ declare function ShellAction({
96
+ className,
97
+ icon,
98
+ active,
99
+ label,
100
+ ref,
101
+ ...props
102
+ }: ShellActionProps & {
103
+ ref?: React.Ref<HTMLButtonElement>;
104
+ }): React.JSX.Element;
105
+ /**
106
+ * A collapsible panel that slides in from the side.
107
+ */
108
+ declare function ShellPanel({
109
+ className,
110
+ heading,
111
+ open,
112
+ children,
113
+ ref,
114
+ ...props
115
+ }: ShellPanelProps & {
116
+ ref?: React.Ref<HTMLDivElement>;
117
+ }): React.JSX.Element;
118
+ /**
119
+ * The main content area of the shell.
120
+ */
121
+ declare function ShellContent({
122
+ className,
123
+ children,
124
+ ref,
125
+ ...props
126
+ }: ShellContentProps & {
127
+ ref?: React.Ref<HTMLDivElement>;
128
+ }): React.JSX.Element;
129
+ /**
130
+ * A shell layout component with action bar, collapsible panel, and content areas.
131
+ * Useful for map applications and other interactive tools.
132
+ *
133
+ * @example
134
+ * ```tsx
135
+ * const [filterOpen, setFilterOpen] = useState(false);
136
+ *
137
+ * <Shell.Root heading="My Map Application">
138
+ * <Shell.ActionBar>
139
+ * <Shell.Action
140
+ * icon={<FilterIcon />}
141
+ * active={filterOpen}
142
+ * onClick={() => setFilterOpen(!filterOpen)}
143
+ * label="Filter"
144
+ * />
145
+ * </Shell.ActionBar>
146
+ * <Shell.Panel heading="Filter" open={filterOpen}>
147
+ * <p>Filter controls here</p>
148
+ * </Shell.Panel>
149
+ * <Shell.Content>
150
+ * <div id="map" />
151
+ * </Shell.Content>
152
+ * </Shell.Root>
153
+ * ```
154
+ */
155
+ declare const Shell: {
156
+ Root: typeof ShellRoot;
157
+ ActionBar: typeof ShellActionBar;
158
+ Action: typeof ShellAction;
159
+ Panel: typeof ShellPanel;
160
+ Content: typeof ShellContent;
161
+ };
162
+ //#endregion
163
+ export { Shell, ShellActionBarProps, ShellActionProps, ShellContentProps, ShellPanelProps, ShellRootProps };
@@ -0,0 +1,137 @@
1
+ import "react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/components/Shell.tsx
4
+ /**
5
+ * Root container for the shell layout.
6
+ * Provides a structured layout with optional header, action bar, panel, and content areas.
7
+ *
8
+ * Built internally for dense tools with side actions and optional panels. Use
9
+ * for app-like work surfaces, not marketing pages or generic sections.
10
+ *
11
+ * Styling consumes Sigvelo layout, border, surface, spacing, and focus tokens.
12
+ * Actions need labels because the visible affordance is usually icon-only.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Shell.Root heading="Project">
17
+ * <Shell.ActionBar>
18
+ * <Shell.Action icon={<FilterIcon />} label="Filter" />
19
+ * </Shell.ActionBar>
20
+ * <Shell.Content>Map or tool content</Shell.Content>
21
+ * </Shell.Root>
22
+ * ```
23
+ */
24
+ function ShellRoot({ className = "", heading, children, ref, ...props }) {
25
+ return /* @__PURE__ */ jsxs("div", {
26
+ ref,
27
+ className: ["shell", className].filter(Boolean).join(" "),
28
+ ...props,
29
+ children: [heading && /* @__PURE__ */ jsx("header", {
30
+ className: "shell__header",
31
+ children: /* @__PURE__ */ jsx("h3", {
32
+ className: "shell__heading",
33
+ children: heading
34
+ })
35
+ }), /* @__PURE__ */ jsx("div", {
36
+ className: "shell__body",
37
+ children
38
+ })]
39
+ });
40
+ }
41
+ /**
42
+ * Container for action buttons that toggle panels.
43
+ * Typically placed on the left side of the shell.
44
+ */
45
+ function ShellActionBar({ className = "", children, ref, ...props }) {
46
+ return /* @__PURE__ */ jsx("div", {
47
+ ref,
48
+ className: ["shell__action-bar", className].filter(Boolean).join(" "),
49
+ ...props,
50
+ children
51
+ });
52
+ }
53
+ /**
54
+ * An action button within the action bar.
55
+ */
56
+ function ShellAction({ className = "", icon, active, label, ref, ...props }) {
57
+ return /* @__PURE__ */ jsx("button", {
58
+ ref,
59
+ className: [
60
+ "shell__action",
61
+ active && "shell__action--active",
62
+ className
63
+ ].filter(Boolean).join(" "),
64
+ "aria-label": label,
65
+ "aria-pressed": active,
66
+ ...props,
67
+ children: icon
68
+ });
69
+ }
70
+ /**
71
+ * A collapsible panel that slides in from the side.
72
+ */
73
+ function ShellPanel({ className = "", heading, open = false, children, ref, ...props }) {
74
+ return /* @__PURE__ */ jsxs("div", {
75
+ ref,
76
+ className: [
77
+ "shell__panel",
78
+ open && "shell__panel--open",
79
+ className
80
+ ].filter(Boolean).join(" "),
81
+ hidden: !open,
82
+ ...props,
83
+ children: [heading && /* @__PURE__ */ jsx("div", {
84
+ className: "shell__panel-heading",
85
+ children: heading
86
+ }), /* @__PURE__ */ jsx("div", {
87
+ className: "shell__panel-content",
88
+ children
89
+ })]
90
+ });
91
+ }
92
+ /**
93
+ * The main content area of the shell.
94
+ */
95
+ function ShellContent({ className = "", children, ref, ...props }) {
96
+ return /* @__PURE__ */ jsx("div", {
97
+ ref,
98
+ className: ["shell__content", className].filter(Boolean).join(" "),
99
+ ...props,
100
+ children
101
+ });
102
+ }
103
+ /**
104
+ * A shell layout component with action bar, collapsible panel, and content areas.
105
+ * Useful for map applications and other interactive tools.
106
+ *
107
+ * @example
108
+ * ```tsx
109
+ * const [filterOpen, setFilterOpen] = useState(false);
110
+ *
111
+ * <Shell.Root heading="My Map Application">
112
+ * <Shell.ActionBar>
113
+ * <Shell.Action
114
+ * icon={<FilterIcon />}
115
+ * active={filterOpen}
116
+ * onClick={() => setFilterOpen(!filterOpen)}
117
+ * label="Filter"
118
+ * />
119
+ * </Shell.ActionBar>
120
+ * <Shell.Panel heading="Filter" open={filterOpen}>
121
+ * <p>Filter controls here</p>
122
+ * </Shell.Panel>
123
+ * <Shell.Content>
124
+ * <div id="map" />
125
+ * </Shell.Content>
126
+ * </Shell.Root>
127
+ * ```
128
+ */
129
+ const Shell = {
130
+ Root: ShellRoot,
131
+ ActionBar: ShellActionBar,
132
+ Action: ShellAction,
133
+ Panel: ShellPanel,
134
+ Content: ShellContent
135
+ };
136
+ //#endregion
137
+ export { Shell };