@constructive-io/ui 0.1.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.
Files changed (176) hide show
  1. package/dist/components/alert-dialog.d.ts +31 -0
  2. package/dist/components/alert-dialog.js +314 -0
  3. package/dist/components/alert-dialog.js.map +1 -0
  4. package/dist/components/alert.d.ts +14 -0
  5. package/dist/components/alert.js +38 -0
  6. package/dist/components/alert.js.map +1 -0
  7. package/dist/components/autocomplete.d.ts +28 -0
  8. package/dist/components/autocomplete.js +395 -0
  9. package/dist/components/autocomplete.js.map +1 -0
  10. package/dist/components/avatar.d.ts +13 -0
  11. package/dist/components/avatar.js +37 -0
  12. package/dist/components/avatar.js.map +1 -0
  13. package/dist/components/badge.d.ts +15 -0
  14. package/dist/components/badge.js +43 -0
  15. package/dist/components/badge.js.map +1 -0
  16. package/dist/components/breadcrumb.d.ts +14 -0
  17. package/dist/components/breadcrumb.js +154 -0
  18. package/dist/components/breadcrumb.js.map +1 -0
  19. package/dist/components/button.d.ts +17 -0
  20. package/dist/components/button.js +62 -0
  21. package/dist/components/button.js.map +1 -0
  22. package/dist/components/calendar-rac.d.ts +13 -0
  23. package/dist/components/calendar-rac.js +82 -0
  24. package/dist/components/calendar-rac.js.map +1 -0
  25. package/dist/components/card.d.ts +19 -0
  26. package/dist/components/card.js +75 -0
  27. package/dist/components/card.js.map +1 -0
  28. package/dist/components/checkbox-group.d.ts +7 -0
  29. package/dist/components/checkbox-group.js +16 -0
  30. package/dist/components/checkbox-group.js.map +1 -0
  31. package/dist/components/checkbox.d.ts +8 -0
  32. package/dist/components/checkbox.js +67 -0
  33. package/dist/components/checkbox.js.map +1 -0
  34. package/dist/components/collapsible.d.ts +54 -0
  35. package/dist/components/collapsible.js +121 -0
  36. package/dist/components/collapsible.js.map +1 -0
  37. package/dist/components/combobox.d.ts +44 -0
  38. package/dist/components/combobox.js +486 -0
  39. package/dist/components/combobox.js.map +1 -0
  40. package/dist/components/command.d.ts +43 -0
  41. package/dist/components/command.js +690 -0
  42. package/dist/components/command.js.map +1 -0
  43. package/dist/components/dialog.d.ts +35 -0
  44. package/dist/components/dialog.js +440 -0
  45. package/dist/components/dialog.js.map +1 -0
  46. package/dist/components/dock.d.ts +31 -0
  47. package/dist/components/dock.js +111 -0
  48. package/dist/components/dock.js.map +1 -0
  49. package/dist/components/drawer.d.ts +16 -0
  50. package/dist/components/drawer.js +147 -0
  51. package/dist/components/drawer.js.map +1 -0
  52. package/dist/components/dropdown-menu.d.ts +50 -0
  53. package/dist/components/dropdown-menu.js +380 -0
  54. package/dist/components/dropdown-menu.js.map +1 -0
  55. package/dist/components/field.d.ts +51 -0
  56. package/dist/components/field.js +115 -0
  57. package/dist/components/field.js.map +1 -0
  58. package/dist/components/flickering-grid.d.ts +15 -0
  59. package/dist/components/flickering-grid.js +147 -0
  60. package/dist/components/flickering-grid.js.map +1 -0
  61. package/dist/components/form-control.d.ts +15 -0
  62. package/dist/components/form-control.js +173 -0
  63. package/dist/components/form-control.js.map +1 -0
  64. package/dist/components/form.d.ts +37 -0
  65. package/dist/components/form.js +179 -0
  66. package/dist/components/form.js.map +1 -0
  67. package/dist/components/input-group.d.ts +18 -0
  68. package/dist/components/input-group.js +177 -0
  69. package/dist/components/input-group.js.map +1 -0
  70. package/dist/components/input.d.ts +11 -0
  71. package/dist/components/input.js +60 -0
  72. package/dist/components/input.js.map +1 -0
  73. package/dist/components/json-input.d.ts +25 -0
  74. package/dist/components/json-input.js +351 -0
  75. package/dist/components/json-input.js.map +1 -0
  76. package/dist/components/label.d.ts +11 -0
  77. package/dist/components/label.js +27 -0
  78. package/dist/components/label.js.map +1 -0
  79. package/dist/components/motion-grid.d.ts +20 -0
  80. package/dist/components/motion-grid.js +81 -0
  81. package/dist/components/motion-grid.js.map +1 -0
  82. package/dist/components/multi-select.d.ts +198 -0
  83. package/dist/components/multi-select.js +882 -0
  84. package/dist/components/multi-select.js.map +1 -0
  85. package/dist/components/page-header.d.ts +17 -0
  86. package/dist/components/page-header.js +17 -0
  87. package/dist/components/page-header.js.map +1 -0
  88. package/dist/components/pagination.d.ts +19 -0
  89. package/dist/components/pagination.js +144 -0
  90. package/dist/components/pagination.js.map +1 -0
  91. package/dist/components/popover.d.ts +35 -0
  92. package/dist/components/popover.js +188 -0
  93. package/dist/components/popover.js.map +1 -0
  94. package/dist/components/portal.d.ts +108 -0
  95. package/dist/components/portal.js +75 -0
  96. package/dist/components/portal.js.map +1 -0
  97. package/dist/components/progress.d.ts +10 -0
  98. package/dist/components/progress.js +30 -0
  99. package/dist/components/progress.js.map +1 -0
  100. package/dist/components/progressive-blur-scroll-container.d.ts +25 -0
  101. package/dist/components/progressive-blur-scroll-container.js +142 -0
  102. package/dist/components/progressive-blur-scroll-container.js.map +1 -0
  103. package/dist/components/progressive-blur.d.ts +16 -0
  104. package/dist/components/progressive-blur.js +68 -0
  105. package/dist/components/progressive-blur.js.map +1 -0
  106. package/dist/components/radio-group.d.ts +10 -0
  107. package/dist/components/radio-group.js +37 -0
  108. package/dist/components/radio-group.js.map +1 -0
  109. package/dist/components/record-picker.d.ts +16 -0
  110. package/dist/components/record-picker.js +366 -0
  111. package/dist/components/record-picker.js.map +1 -0
  112. package/dist/components/resizable.d.ts +11 -0
  113. package/dist/components/resizable.js +52 -0
  114. package/dist/components/resizable.js.map +1 -0
  115. package/dist/components/responsive-diagram.d.ts +10 -0
  116. package/dist/components/responsive-diagram.js +63 -0
  117. package/dist/components/responsive-diagram.js.map +1 -0
  118. package/dist/components/scroll-area.d.ts +12 -0
  119. package/dist/components/scroll-area.js +69 -0
  120. package/dist/components/scroll-area.js.map +1 -0
  121. package/dist/components/select.d.ts +47 -0
  122. package/dist/components/select.js +287 -0
  123. package/dist/components/select.js.map +1 -0
  124. package/dist/components/separator.d.ts +11 -0
  125. package/dist/components/separator.js +24 -0
  126. package/dist/components/separator.js.map +1 -0
  127. package/dist/components/sheet.d.ts +112 -0
  128. package/dist/components/sheet.js +600 -0
  129. package/dist/components/sheet.js.map +1 -0
  130. package/dist/components/sidebar.d.ts +77 -0
  131. package/dist/components/sidebar.js +1217 -0
  132. package/dist/components/sidebar.js.map +1 -0
  133. package/dist/components/skeleton.d.ts +7 -0
  134. package/dist/components/skeleton.js +16 -0
  135. package/dist/components/skeleton.js.map +1 -0
  136. package/dist/components/sonner.d.ts +10 -0
  137. package/dist/components/sonner.js +23 -0
  138. package/dist/components/sonner.js.map +1 -0
  139. package/dist/components/stack/index.d.ts +663 -0
  140. package/dist/components/stack/index.js +1418 -0
  141. package/dist/components/stack/index.js.map +1 -0
  142. package/dist/components/stepper.d.ts +30 -0
  143. package/dist/components/stepper.js +280 -0
  144. package/dist/components/stepper.js.map +1 -0
  145. package/dist/components/switch.d.ts +8 -0
  146. package/dist/components/switch.js +40 -0
  147. package/dist/components/switch.js.map +1 -0
  148. package/dist/components/table.d.ts +15 -0
  149. package/dist/components/table.js +65 -0
  150. package/dist/components/table.js.map +1 -0
  151. package/dist/components/tabs.d.ts +10 -0
  152. package/dist/components/tabs.js +48 -0
  153. package/dist/components/tabs.js.map +1 -0
  154. package/dist/components/tags.d.ts +42 -0
  155. package/dist/components/tags.js +728 -0
  156. package/dist/components/tags.js.map +1 -0
  157. package/dist/components/textarea.d.ts +10 -0
  158. package/dist/components/textarea.js +54 -0
  159. package/dist/components/textarea.js.map +1 -0
  160. package/dist/components/toast/index.d.ts +52 -0
  161. package/dist/components/toast/index.js +221 -0
  162. package/dist/components/toast/index.js.map +1 -0
  163. package/dist/components/tooltip.d.ts +29 -0
  164. package/dist/components/tooltip.js +174 -0
  165. package/dist/components/tooltip.js.map +1 -0
  166. package/dist/components/unlink-button.d.ts +14 -0
  167. package/dist/components/unlink-button.js +91 -0
  168. package/dist/components/unlink-button.js.map +1 -0
  169. package/dist/index.cjs +7692 -0
  170. package/dist/index.cjs.map +1 -0
  171. package/dist/index.d.cts +2157 -0
  172. package/dist/index.d.ts +2157 -0
  173. package/dist/index.js +7375 -0
  174. package/dist/index.js.map +1 -0
  175. package/package.json +490 -0
  176. package/src/styles/globals.css +397 -0
@@ -0,0 +1,380 @@
1
+ "use client";
2
+ import * as React2 from 'react';
3
+ import { Menu } from '@base-ui/react/menu';
4
+ import { CheckIcon, CircleIcon, ChevronRightIcon } from 'lucide-react';
5
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
6
+ import { clsx } from 'clsx';
7
+ import { twMerge } from 'tailwind-merge';
8
+
9
+ var PORTAL_ROOT_ID = "portal-root";
10
+ var PortalContext = React2.createContext({
11
+ layer: "base",
12
+ depth: 0,
13
+ floatingPortalStrategy: "root",
14
+ floatingZIndex: "default"
15
+ });
16
+ function useRootPortalContainer() {
17
+ const [container, setContainer] = React2.useState(null);
18
+ React2.useLayoutEffect(() => {
19
+ const el = document.getElementById(PORTAL_ROOT_ID);
20
+ setContainer(el);
21
+ }, []);
22
+ return container;
23
+ }
24
+ function useFloatingOverlayPortalProps() {
25
+ const rootContainer = useRootPortalContainer();
26
+ const { floatingPortalStrategy, floatingZIndex } = React2.useContext(PortalContext);
27
+ const container = floatingPortalStrategy === "nested" ? void 0 : rootContainer ?? null;
28
+ const zIndexClass = floatingZIndex === "elevated" ? "z-[var(--z-layer-floating-elevated)]" : "z-[var(--z-layer-floating)]";
29
+ return { container, zIndexClass };
30
+ }
31
+ function composeRefs(...refs) {
32
+ return (node) => {
33
+ refs.forEach((ref) => {
34
+ if (typeof ref === "function") {
35
+ ref(node);
36
+ } else if (ref != null) {
37
+ ref.current = node;
38
+ }
39
+ });
40
+ };
41
+ }
42
+ function mergeProps(slotProps, childProps) {
43
+ const overrideProps = { ...childProps };
44
+ for (const propName in childProps) {
45
+ if (propName === "ref") continue;
46
+ const slotPropValue = slotProps[propName];
47
+ const childPropValue = childProps[propName];
48
+ if (/^on[A-Z]/.test(propName) && typeof slotPropValue === "function" && typeof childPropValue === "function") {
49
+ overrideProps[propName] = (...args) => {
50
+ childPropValue(...args);
51
+ slotPropValue(...args);
52
+ };
53
+ } else if (propName === "className" && typeof slotPropValue === "string" && typeof childPropValue === "string") {
54
+ overrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();
55
+ } else if (propName === "style" && typeof slotPropValue === "object" && typeof childPropValue === "object") {
56
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
57
+ }
58
+ }
59
+ return { ...slotProps, ...overrideProps };
60
+ }
61
+ function mergePropsWithRef(parentProps, childElement) {
62
+ const childProps = childElement.props;
63
+ const parentRef = parentProps.ref;
64
+ const childRef = childProps.ref;
65
+ const mergedProps = mergeProps(parentProps, childProps);
66
+ if (parentRef || childRef) {
67
+ mergedProps.ref = composeRefs(parentRef, childRef);
68
+ }
69
+ return mergedProps;
70
+ }
71
+ function isSlottable(child) {
72
+ return React2.isValidElement(child);
73
+ }
74
+ var Slot = React2.forwardRef((props, forwardedRef) => {
75
+ const { children, ...slotProps } = props;
76
+ if (isSlottable(children)) {
77
+ const childProps = children.props;
78
+ const childRef = childProps.ref;
79
+ return React2.cloneElement(children, {
80
+ ...mergeProps(slotProps, childProps),
81
+ ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef
82
+ });
83
+ }
84
+ if (React2.Children.count(children) > 1) {
85
+ const childrenArray = React2.Children.toArray(children);
86
+ const slottableChild = childrenArray.find(
87
+ (child) => React2.isValidElement(child) && child.type === Slottable
88
+ );
89
+ if (slottableChild) {
90
+ const newElement = slottableChild.props.children;
91
+ if (isSlottable(newElement)) {
92
+ const newElementProps = newElement.props;
93
+ const newChildren = childrenArray.map((child) => {
94
+ if (child === slottableChild) {
95
+ return React2.Children.count(newElementProps.children) > 1 ? React2.Children.only(null) : newElementProps.children;
96
+ }
97
+ return child;
98
+ });
99
+ const childRef = newElementProps.ref;
100
+ return React2.cloneElement(newElement, {
101
+ ...mergeProps(slotProps, newElementProps),
102
+ ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,
103
+ children: newChildren
104
+ });
105
+ }
106
+ }
107
+ }
108
+ return /* @__PURE__ */ jsx(Fragment, { children });
109
+ });
110
+ Slot.displayName = "Slot";
111
+ function Slottable({ children }) {
112
+ return /* @__PURE__ */ jsx(Fragment, { children });
113
+ }
114
+ function cn(...inputs) {
115
+ return twMerge(clsx(inputs));
116
+ }
117
+ function DropdownMenu({ ...props }) {
118
+ return /* @__PURE__ */ jsx(Menu.Root, { "data-slot": "dropdown-menu", ...props });
119
+ }
120
+ function DropdownMenuPortal({ ...props }) {
121
+ const { container } = useFloatingOverlayPortalProps();
122
+ return /* @__PURE__ */ jsx(Menu.Portal, { "data-slot": "dropdown-menu-portal", container, ...props });
123
+ }
124
+ function DropdownMenuTrigger({ asChild, nativeButton, children, ...props }) {
125
+ if (asChild && React2.isValidElement(children)) {
126
+ return /* @__PURE__ */ jsx(
127
+ Menu.Trigger,
128
+ {
129
+ "data-slot": "dropdown-menu-trigger",
130
+ nativeButton: nativeButton ?? true,
131
+ ...props,
132
+ render: (triggerProps) => {
133
+ const { nativeButton: _, ...rest } = triggerProps;
134
+ return React2.cloneElement(
135
+ children,
136
+ mergePropsWithRef(rest, children)
137
+ );
138
+ }
139
+ }
140
+ );
141
+ }
142
+ return /* @__PURE__ */ jsx(Menu.Trigger, { "data-slot": "dropdown-menu-trigger", nativeButton, ...props, children });
143
+ }
144
+ function DropdownMenuContent({
145
+ className,
146
+ sideOffset = 4,
147
+ side = "bottom",
148
+ align = "start",
149
+ onPointerDown: _onPointerDown,
150
+ onPointerDownOutside: _onPointerDownOutside,
151
+ onCloseAutoFocus: _onCloseAutoFocus,
152
+ forceMount: _forceMount,
153
+ ...props
154
+ }) {
155
+ const { zIndexClass } = useFloatingOverlayPortalProps();
156
+ return /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { side, align, sideOffset, className: zIndexClass, children: /* @__PURE__ */ jsx(
157
+ Menu.Popup,
158
+ {
159
+ "data-slot": "dropdown-menu-content",
160
+ className: cn(
161
+ `bg-popover text-popover-foreground data-[open]:animate-in data-[closed]:animate-out
162
+ data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95
163
+ data-[open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2
164
+ data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-40 overflow-hidden
165
+ rounded-md border p-1 shadow-lg`,
166
+ className
167
+ ),
168
+ ...props
169
+ }
170
+ ) }) });
171
+ }
172
+ function DropdownMenuGroup({ ...props }) {
173
+ return /* @__PURE__ */ jsx(Menu.Group, { "data-slot": "dropdown-menu-group", ...props });
174
+ }
175
+ function DropdownMenuItem({
176
+ className,
177
+ inset,
178
+ variant = "default",
179
+ asChild,
180
+ children,
181
+ onClick,
182
+ ...props
183
+ }) {
184
+ const itemClassName = cn(
185
+ `data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[variant=destructive]:text-destructive-foreground
186
+ data-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/40
187
+ data-[variant=destructive]:data-[highlighted]:text-destructive-foreground
188
+ data-[variant=destructive]:*:[svg]:!text-destructive-foreground relative flex cursor-default items-center gap-2
189
+ rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none
190
+ data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,
191
+ className
192
+ );
193
+ if (asChild && React2.isValidElement(children)) {
194
+ return /* @__PURE__ */ jsx(
195
+ Menu.Item,
196
+ {
197
+ "data-slot": "dropdown-menu-item",
198
+ "data-inset": inset,
199
+ "data-variant": variant,
200
+ ...props,
201
+ render: (itemProps) => {
202
+ const childProps = children.props;
203
+ const itemOnClick = itemProps.onClick;
204
+ return React2.cloneElement(children, {
205
+ ...itemProps,
206
+ className: cn(itemClassName, childProps.className),
207
+ onClick: (e) => {
208
+ onClick?.(e);
209
+ itemOnClick?.(e);
210
+ }
211
+ });
212
+ }
213
+ }
214
+ );
215
+ }
216
+ return /* @__PURE__ */ jsx(
217
+ Menu.Item,
218
+ {
219
+ "data-slot": "dropdown-menu-item",
220
+ "data-inset": inset,
221
+ "data-variant": variant,
222
+ ...props,
223
+ render: (itemProps) => {
224
+ const itemOnClick = itemProps.onClick;
225
+ return /* @__PURE__ */ jsx(
226
+ "div",
227
+ {
228
+ ...itemProps,
229
+ className: cn(itemClassName, itemProps.className),
230
+ onClick: (e) => {
231
+ onClick?.(e);
232
+ itemOnClick?.(e);
233
+ },
234
+ children
235
+ }
236
+ );
237
+ }
238
+ }
239
+ );
240
+ }
241
+ function DropdownMenuCheckboxItem({
242
+ className,
243
+ children,
244
+ checked,
245
+ ...props
246
+ }) {
247
+ return /* @__PURE__ */ jsxs(
248
+ Menu.CheckboxItem,
249
+ {
250
+ "data-slot": "dropdown-menu-checkbox-item",
251
+ className: cn(
252
+ `data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
253
+ pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50
254
+ [&_svg]:pointer-events-none [&_svg]:shrink-0`,
255
+ className
256
+ ),
257
+ checked,
258
+ ...props,
259
+ children: [
260
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { size: 16 }) }) }),
261
+ children
262
+ ]
263
+ }
264
+ );
265
+ }
266
+ function DropdownMenuRadioGroup({ ...props }) {
267
+ return /* @__PURE__ */ jsx(Menu.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
268
+ }
269
+ function DropdownMenuRadioItem({
270
+ className,
271
+ children,
272
+ ...props
273
+ }) {
274
+ return /* @__PURE__ */ jsxs(
275
+ Menu.RadioItem,
276
+ {
277
+ "data-slot": "dropdown-menu-radio-item",
278
+ className: cn(
279
+ `data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5
280
+ pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50
281
+ [&_svg]:pointer-events-none [&_svg]:shrink-0`,
282
+ className
283
+ ),
284
+ ...props,
285
+ children: [
286
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
287
+ children
288
+ ]
289
+ }
290
+ );
291
+ }
292
+ function DropdownMenuLabel({
293
+ className,
294
+ inset,
295
+ ...props
296
+ }) {
297
+ return /* @__PURE__ */ jsx(
298
+ Menu.GroupLabel,
299
+ {
300
+ "data-slot": "dropdown-menu-label",
301
+ "data-inset": inset,
302
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8", className),
303
+ ...props
304
+ }
305
+ );
306
+ }
307
+ function DropdownMenuSeparator({ className, ...props }) {
308
+ return /* @__PURE__ */ jsx(
309
+ Menu.Separator,
310
+ {
311
+ "data-slot": "dropdown-menu-separator",
312
+ className: cn("bg-border -mx-1 my-1 h-px", className),
313
+ ...props
314
+ }
315
+ );
316
+ }
317
+ function DropdownMenuShortcut({ className, ...props }) {
318
+ return /* @__PURE__ */ jsx(
319
+ "kbd",
320
+ {
321
+ "data-slot": "dropdown-menu-shortcut",
322
+ className: cn(
323
+ `bg-background text-muted-foreground/70 ms-auto -me-1 inline-flex h-5 max-h-full items-center rounded border
324
+ px-1 font-[inherit] text-[0.625rem] font-medium`,
325
+ className
326
+ ),
327
+ ...props
328
+ }
329
+ );
330
+ }
331
+ function DropdownMenuSub({ ...props }) {
332
+ return /* @__PURE__ */ jsx(Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
333
+ }
334
+ function DropdownMenuSubTrigger({
335
+ className,
336
+ inset,
337
+ children,
338
+ ...props
339
+ }) {
340
+ return /* @__PURE__ */ jsxs(
341
+ Menu.SubmenuTrigger,
342
+ {
343
+ "data-slot": "dropdown-menu-sub-trigger",
344
+ "data-inset": inset,
345
+ className: cn(
346
+ `data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[popup-open]:bg-accent
347
+ data-[popup-open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm
348
+ outline-hidden select-none data-[inset]:pl-8`,
349
+ className
350
+ ),
351
+ ...props,
352
+ children: [
353
+ children,
354
+ /* @__PURE__ */ jsx(ChevronRightIcon, { size: 16, className: "text-muted-foreground/80 ml-auto" })
355
+ ]
356
+ }
357
+ );
358
+ }
359
+ function DropdownMenuSubContent({ className, ...props }) {
360
+ const { container, zIndexClass } = useFloatingOverlayPortalProps();
361
+ return /* @__PURE__ */ jsx(Menu.Portal, { container, children: /* @__PURE__ */ jsx(Menu.Positioner, { side: "right", sideOffset: -4, className: zIndexClass, children: /* @__PURE__ */ jsx(
362
+ Menu.Popup,
363
+ {
364
+ "data-slot": "dropdown-menu-sub-content",
365
+ className: cn(
366
+ `bg-popover text-popover-foreground data-[open]:animate-in data-[closed]:animate-out
367
+ data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95
368
+ data-[open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2
369
+ data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-40 overflow-hidden
370
+ rounded-md border p-1 shadow-lg`,
371
+ className
372
+ ),
373
+ ...props
374
+ }
375
+ ) }) });
376
+ }
377
+
378
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
379
+ //# sourceMappingURL=dropdown-menu.js.map
380
+ //# sourceMappingURL=dropdown-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/portal.tsx","../../src/lib/slot.tsx","../../src/lib/utils.ts","../../src/components/dropdown-menu.tsx"],"names":["React","jsx","MenuPrimitive","React3"],"mappings":";;;;;;;AA4CO,IAAM,cAAA,GAAiB,aAAA;AAM9B,IAAM,gBAAsBA,MAAA,CAAA,aAAA,CAAkC;AAAA,EAC7D,KAAA,EAAO,MAAA;AAAA,EACP,KAAA,EAAO,CAAA;AAAA,EACP,sBAAA,EAAwB,MAAA;AAAA,EACxB,cAAA,EAAgB;AACjB,CAAC,CAAA;AAwEM,SAAS,sBAAA,GAA6C;AAC5D,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAUA,gBAA6B,IAAI,CAAA;AAEzE,EAAMA,uBAAgB,MAAM;AAC3B,IAAA,MAAM,EAAA,GAAK,QAAA,CAAS,cAAA,CAAe,cAAc,CAAA;AACjD,IAAA,YAAA,CAAa,EAAE,CAAA;AAAA,EAChB,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO,SAAA;AACR;AASO,SAAS,6BAAA,GAGd;AACD,EAAA,MAAM,gBAAgB,sBAAA,EAAuB;AAC7C,EAAA,MAAM,EAAE,sBAAA,EAAwB,cAAA,EAAe,GAAUA,kBAAW,aAAa,CAAA;AAEjF,EAAA,MAAM,SAAA,GAAY,sBAAA,KAA2B,QAAA,GAAW,MAAA,GAAa,aAAA,IAAiB,IAAA;AACtF,EAAA,MAAM,WAAA,GACL,cAAA,KAAmB,UAAA,GAChB,sCAAA,GACA,6BAAA;AAEJ,EAAA,OAAO,EAAE,WAAW,WAAA,EAAY;AACjC;ACvJA,SAAS,eAAkB,IAAA,EAA0D;AACpF,EAAA,OAAO,CAAC,IAAA,KAAS;AAChB,IAAA,IAAA,CAAK,OAAA,CAAQ,CAAC,GAAA,KAAQ;AAC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A;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACJ,CAAA,EAEG;AACF,EAAA,uBACC,IAAA;AAAA,IAACA,IAAA,CAAc,cAAA;AAAA,IAAd;AAAA,MACA,WAAA,EAAU,2BAAA;AAAA,MACV,YAAA,EAAY,KAAA;AAAA,MACZ,SAAA,EAAW,EAAA;AAAA,QACV,CAAA;AAAA;AAAA,gDAAA,CAAA;AAAA,QAGA;AAAA,OACD;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACDD,GAAAA,CAAC,gBAAA,EAAA,EAAiB,IAAA,EAAM,EAAA,EAAI,WAAU,kCAAA,EAAmC;AAAA;AAAA;AAAA,GAC1E;AAEF;AAEA,SAAS,sBAAA,CAAuB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAqD;AAC1G,EAAA,MAAM,EAAE,SAAA,EAAW,WAAA,EAAY,GAAI,6BAAA,EAA8B;AAEjE,EAAA,uBACCA,GAAAA,CAACC,IAAA,CAAc,MAAA,EAAd,EAAqB,WACrB,QAAA,kBAAAD,GAAAA,CAACC,IAAA,CAAc,UAAA,EAAd,EAAyB,IAAA,EAAK,OAAA,EAAQ,YAAY,EAAA,EAAI,SAAA,EAAW,aACjE,QAAA,kBAAAD,GAAAA;AAAA,IAACC,IAAA,CAAc,KAAA;AAAA,IAAd;AAAA,MACA,WAAA,EAAU,2BAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,CAAA;AAAA;AAAA;AAAA;AAAA,qCAAA,CAAA;AAAA,QAKA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,KAEN,CAAA,EACD,CAAA;AAEF","file":"dropdown-menu.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/**\n * Overlay layer type:\n * - 'base': Root level (page content, base floating elements)\n * - 'modal': Inside a modal overlay (dialog, sheet, drawer)\n */\nexport type OverlayLayer = 'base' | 'modal';\n\n/**\n * Where floating overlays should portal:\n * - 'root': always portal into #portal-root\n * - 'nested': let Base UI nest portals into the nearest Base UI portal node\n */\nexport type FloatingPortalStrategy = 'root' | 'nested';\n\n/**\n * Z-index mode for floating overlays.\n * - 'default': --z-layer-floating\n * - 'elevated': --z-layer-floating-elevated\n */\nexport type FloatingZIndex = 'default' | 'elevated';\n\ninterface PortalContextValue {\n\t/** Current overlay layer */\n\tlayer: OverlayLayer;\n\t/** Modal nesting depth (0 for first modal, 1 for nested, etc.) */\n\tdepth: number;\n\t/** Strategy for where floating overlays should portal */\n\tfloatingPortalStrategy: FloatingPortalStrategy;\n\t/** Z-index mode for floating overlays */\n\tfloatingZIndex: FloatingZIndex;\n}\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nexport const PORTAL_ROOT_ID = 'portal-root';\n\n// ============================================================================\n// Context\n// ============================================================================\n\nconst PortalContext = React.createContext<PortalContextValue>({\n\tlayer: 'base',\n\tdepth: 0,\n\tfloatingPortalStrategy: 'root',\n\tfloatingZIndex: 'default',\n});\n\n// ============================================================================\n// Providers\n// ============================================================================\n\n/**\n * Provider for modal overlays (Dialog, Sheet, Drawer, etc.)\n *\n * Wraps modal content to:\n * 1. Create a scoped portal container for nested floating elements\n * 2. Track the overlay layer (so floating elements know to use elevated z-index)\n * 3. Track nesting depth for stacked modals\n *\n * Usage:\n * ```tsx\n * <DialogPopup>\n * <ModalPortalScope>\n * {children} // Popovers inside here will render in the scoped container\n * </ModalPortalScope>\n * </DialogPopup>\n * ```\n */\nexport function ModalPortalScope({\n\tchildren,\n\tfloatingPortalStrategy = 'nested',\n\tfloatingZIndex = 'default',\n}: {\n\tchildren: React.ReactNode;\n\tfloatingPortalStrategy?: FloatingPortalStrategy;\n\tfloatingZIndex?: FloatingZIndex;\n}) {\n\tconst parentContext = React.useContext(PortalContext);\n\n\t// Increment depth from parent if already in modal layer\n\tconst depth = parentContext.layer === 'modal' ? parentContext.depth + 1 : 0;\n\n\tconst value = React.useMemo<PortalContextValue>(\n\t\t() => ({\n\t\t\tlayer: 'modal',\n\t\t\tdepth,\n\t\t\tfloatingPortalStrategy,\n\t\t\tfloatingZIndex,\n\t\t}),\n\t\t[depth, floatingPortalStrategy, floatingZIndex],\n\t);\n\n\treturn <PortalContext.Provider value={value}>{children}</PortalContext.Provider>;\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Get the current portal context value.\n * Used internally by other hooks.\n */\nexport function usePortalContext(): PortalContextValue {\n\treturn React.useContext(PortalContext);\n}\n\nexport function useInModalOverlay(): boolean {\n\treturn React.useContext(PortalContext).layer === 'modal';\n}\n\n/**\n * Get the root portal container element.\n * Used by modal components (Dialog, Sheet, etc.) to render their portals.\n *\n * @returns The root portal container, or null during SSR/before mount\n */\nexport function useRootPortalContainer(): HTMLElement | null {\n\tconst [container, setContainer] = React.useState<HTMLElement | null>(null);\n\n\tReact.useLayoutEffect(() => {\n\t\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\t\tsetContainer(el);\n\t}, []);\n\n\treturn container;\n}\n\n/**\n * Centralized portal + z-index policy for floating overlays.\n *\n * - When `floatingPortalStrategy` is 'nested', Base UI will automatically portal\n * into the nearest Base UI portal node (so dialog \"inert\" behavior includes it).\n * - When it's 'root', we portal into #portal-root.\n */\nexport function useFloatingOverlayPortalProps(): {\n\tcontainer?: HTMLElement | null;\n\tzIndexClass: string;\n} {\n\tconst rootContainer = useRootPortalContainer();\n\tconst { floatingPortalStrategy, floatingZIndex } = React.useContext(PortalContext);\n\n\tconst container = floatingPortalStrategy === 'nested' ? undefined : (rootContainer ?? null);\n\tconst zIndexClass =\n\t\tfloatingZIndex === 'elevated'\n\t\t\t? 'z-[var(--z-layer-floating-elevated)]'\n\t\t\t: 'z-[var(--z-layer-floating)]';\n\n\treturn { container, zIndexClass };\n}\n\n// ============================================================================\n// Components\n// ============================================================================\n\n/**\n * Portal root component to render in app layout.\n * All overlay components will render their portals inside this container.\n *\n * Usage in layout.tsx:\n * ```tsx\n * import { PortalRoot } from '@constructive-io/ui/portal';\n *\n * export default function RootLayout({ children }) {\n * return (\n * <html>\n * <body>\n * {children}\n * <PortalRoot />\n * </body>\n * </html>\n * );\n * }\n * ```\n */\nexport function PortalRoot() {\n\treturn (\n\t\t<div\n\t\t\tid={PORTAL_ROOT_ID}\n\t\t\tdata-slot='portal-root'\n\t\t\tstyle={{\n\t\t\t\tposition: 'fixed',\n\t\t\t\tinset: 0,\n\t\t\t\tzIndex: 'var(--z-layer-portal-root)',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\t// Children (portal contents) will have pointer-events: auto\n\t\t\t}}\n\t\t/>\n\t);\n}\n\n/**\n * Hook to get the portal container element for rendering floating UI elements.\n * Returns the element with id=\"portal-root\" if it exists in the DOM.\n *\n * @deprecated Use useRootPortalContainer or useFloatingOverlayPortalProps instead\n */\nexport function usePortalContainer(): HTMLElement | undefined {\n\tif (typeof document === 'undefined') return undefined;\n\tconst el = document.getElementById(PORTAL_ROOT_ID);\n\treturn el instanceof HTMLElement ? el : undefined;\n}\n","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\n","import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\nimport { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\n\nimport { useFloatingOverlayPortalProps } from './portal';\nimport { mergePropsWithRef } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof MenuPrimitive.Root>) {\n\treturn <MenuPrimitive.Root data-slot='dropdown-menu' {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof MenuPrimitive.Portal>) {\n\tconst { container } = useFloatingOverlayPortalProps();\n\treturn <MenuPrimitive.Portal data-slot='dropdown-menu-portal' container={container} {...props} />;\n}\n\ntype DropdownMenuTriggerProps = Omit<React.ComponentProps<typeof MenuPrimitive.Trigger>, 'render' | 'nativeButton'> & {\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n\t/** Whether the child renders a native button. Defaults to true when asChild is used. */\n\tnativeButton?: boolean;\n};\n\nfunction DropdownMenuTrigger({ asChild, nativeButton, children, ...props }: DropdownMenuTriggerProps) {\n\tif (asChild && React.isValidElement(children)) {\n\t\treturn (\n\t\t\t<MenuPrimitive.Trigger\n\t\t\t\tdata-slot='dropdown-menu-trigger'\n\t\t\t\tnativeButton={nativeButton ?? true}\n\t\t\t\t{...props}\n\t\t\trender={(triggerProps) => {\n\t\t\t\tconst { nativeButton: _, ...rest } = triggerProps as Record<string, unknown>;\n\t\t\t\treturn React.cloneElement(\n\t\t\t\t\tchildren as React.ReactElement<Record<string, unknown>>,\n\t\t\t\t\tmergePropsWithRef(rest, children as React.ReactElement),\n\t\t\t\t);\n\t\t\t}}\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<MenuPrimitive.Trigger data-slot='dropdown-menu-trigger' nativeButton={nativeButton} {...props}>\n\t\t\t{children}\n\t\t</MenuPrimitive.Trigger>\n\t);\n}\n\ntype DropdownMenuContentProps = React.ComponentProps<typeof MenuPrimitive.Popup> & {\n\tsideOffset?: number;\n\tside?: 'top' | 'bottom' | 'left' | 'right';\n\talign?: 'start' | 'center' | 'end';\n\t/** @deprecated Not supported in Base UI */\n\tonPointerDown?: (e: React.PointerEvent) => void;\n\t/** @deprecated Not supported in Base UI */\n\tonPointerDownOutside?: (e: Event) => void;\n\t/** @deprecated Not supported in Base UI */\n\tonCloseAutoFocus?: (e: Event) => void;\n\t/** @deprecated Base UI menus mount on open automatically */\n\tforceMount?: boolean;\n};\n\nfunction DropdownMenuContent({\n\tclassName,\n\tsideOffset = 4,\n\tside = 'bottom',\n\talign = 'start',\n\tonPointerDown: _onPointerDown,\n\tonPointerDownOutside: _onPointerDownOutside,\n\tonCloseAutoFocus: _onCloseAutoFocus,\n\tforceMount: _forceMount,\n\t...props\n}: DropdownMenuContentProps) {\n\tconst { zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<DropdownMenuPortal>\n\t\t\t<MenuPrimitive.Positioner side={side} align={align} sideOffset={sideOffset} className={zIndexClass}>\n\t\t\t\t<MenuPrimitive.Popup\n\t\t\t\t\tdata-slot='dropdown-menu-content'\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground data-[open]:animate-in data-[closed]:animate-out\n\t\t\t\t\t\tdata-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95\n\t\t\t\t\t\tdata-[open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2\n\t\t\t\t\t\tdata-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-40 overflow-hidden\n\t\t\t\t\t\trounded-md border p-1 shadow-lg`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</MenuPrimitive.Positioner>\n\t\t</DropdownMenuPortal>\n\t);\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof MenuPrimitive.Group>) {\n\treturn <MenuPrimitive.Group data-slot='dropdown-menu-group' {...props} />;\n}\n\ntype DropdownMenuItemProps = Omit<React.ComponentProps<typeof MenuPrimitive.Item>, 'render'> & {\n\tinset?: boolean;\n\tvariant?: 'default' | 'destructive';\n\t/** When true, merges props onto the child element instead of rendering a div */\n\tasChild?: boolean;\n};\n\nfunction DropdownMenuItem({\n\tclassName,\n\tinset,\n\tvariant = 'default',\n\tasChild,\n\tchildren,\n\tonClick,\n\t...props\n}: DropdownMenuItemProps) {\n\tconst itemClassName = cn(\n\t\t`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[variant=destructive]:text-destructive-foreground\n\t\tdata-[variant=destructive]:data-[highlighted]:bg-destructive/10 dark:data-[variant=destructive]:data-[highlighted]:bg-destructive/40\n\t\tdata-[variant=destructive]:data-[highlighted]:text-destructive-foreground\n\t\tdata-[variant=destructive]:*:[svg]:!text-destructive-foreground relative flex cursor-default items-center gap-2\n\t\trounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none\n\t\tdata-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0`,\n\t\tclassName,\n\t);\n\n\t// Use render prop for both cases to ensure onClick is properly handled\n\t// Base UI Menu.Item may not forward onClick to the element directly\n\tif (asChild && React.isValidElement(children)) {\n\t\treturn (\n\t\t\t<MenuPrimitive.Item\n\t\t\t\tdata-slot='dropdown-menu-item'\n\t\t\t\tdata-inset={inset}\n\t\t\t\tdata-variant={variant}\n\t\t\t\t{...props}\n\t\t\t\trender={(itemProps) => {\n\t\t\t\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t\t\t\tconst itemOnClick = itemProps.onClick as React.MouseEventHandler<HTMLElement> | undefined;\n\t\t\t\t\treturn React.cloneElement(children as React.ReactElement<Record<string, unknown>>, {\n\t\t\t\t\t\t...itemProps,\n\t\t\t\t\t\tclassName: cn(itemClassName, childProps.className as string | undefined),\n\t\t\t\t\t\tonClick: (e: React.MouseEvent<HTMLElement>) => {\n\t\t\t\t\t\t\tonClick?.(e);\n\t\t\t\t\t\t\titemOnClick?.(e);\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<MenuPrimitive.Item\n\t\t\tdata-slot='dropdown-menu-item'\n\t\t\tdata-inset={inset}\n\t\t\tdata-variant={variant}\n\t\t\t{...props}\n\t\t\trender={(itemProps) => {\n\t\t\t\tconst itemOnClick = itemProps.onClick as React.MouseEventHandler<HTMLDivElement> | undefined;\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\t{...itemProps}\n\t\t\t\t\t\tclassName={cn(itemClassName, itemProps.className)}\n\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\tonClick?.(e);\n\t\t\t\t\t\t\titemOnClick?.(e);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<MenuPrimitive.CheckboxItem\n\t\t\tdata-slot='dropdown-menu-checkbox-item'\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5\n\t\t\t\tpr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50\n\t\t\t\t[&_svg]:pointer-events-none [&_svg]:shrink-0`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute left-2 flex size-3.5 items-center justify-center'>\n\t\t\t\t<MenuPrimitive.CheckboxItemIndicator>\n\t\t\t\t\t<CheckIcon size={16} />\n\t\t\t\t</MenuPrimitive.CheckboxItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenuPrimitive.CheckboxItem>\n\t);\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof MenuPrimitive.RadioGroup>) {\n\treturn <MenuPrimitive.RadioGroup data-slot='dropdown-menu-radio-group' {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.RadioItem>) {\n\treturn (\n\t\t<MenuPrimitive.RadioItem\n\t\t\tdata-slot='dropdown-menu-radio-item'\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5\n\t\t\t\tpr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50\n\t\t\t\t[&_svg]:pointer-events-none [&_svg]:shrink-0`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute left-2 flex size-3.5 items-center justify-center'>\n\t\t\t\t<MenuPrimitive.RadioItemIndicator>\n\t\t\t\t\t<CircleIcon className='size-2 fill-current' />\n\t\t\t\t</MenuPrimitive.RadioItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenuPrimitive.RadioItem>\n\t);\n}\n\nfunction DropdownMenuLabel({\n\tclassName,\n\tinset,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.GroupLabel> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenuPrimitive.GroupLabel\n\t\t\tdata-slot='dropdown-menu-label'\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn('text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>) {\n\treturn (\n\t\t<MenuPrimitive.Separator\n\t\t\tdata-slot='dropdown-menu-separator'\n\t\t\tclassName={cn('bg-border -mx-1 my-1 h-px', className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<kbd\n\t\t\tdata-slot='dropdown-menu-shortcut'\n\t\t\tclassName={cn(\n\t\t\t\t`bg-background text-muted-foreground/70 ms-auto -me-1 inline-flex h-5 max-h-full items-center rounded border\n\t\t\t\tpx-1 font-[inherit] text-[0.625rem] font-medium`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof MenuPrimitive.SubmenuRoot>) {\n\treturn <MenuPrimitive.SubmenuRoot data-slot='dropdown-menu-sub' {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenuPrimitive.SubmenuTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenuPrimitive.SubmenuTrigger\n\t\t\tdata-slot='dropdown-menu-sub-trigger'\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t`data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[popup-open]:bg-accent\n\t\t\t\tdata-[popup-open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm\n\t\t\t\toutline-hidden select-none data-[inset]:pl-8`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon size={16} className='text-muted-foreground/80 ml-auto' />\n\t\t</MenuPrimitive.SubmenuTrigger>\n\t);\n}\n\nfunction DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Popup>) {\n\tconst { container, zIndexClass } = useFloatingOverlayPortalProps();\n\n\treturn (\n\t\t<MenuPrimitive.Portal container={container}>\n\t\t\t<MenuPrimitive.Positioner side='right' sideOffset={-4} className={zIndexClass}>\n\t\t\t\t<MenuPrimitive.Popup\n\t\t\t\t\tdata-slot='dropdown-menu-sub-content'\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t`bg-popover text-popover-foreground data-[open]:animate-in data-[closed]:animate-out\n\t\t\t\t\t\tdata-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95\n\t\t\t\t\t\tdata-[open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2\n\t\t\t\t\t\tdata-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 min-w-40 overflow-hidden\n\t\t\t\t\t\trounded-md border p-1 shadow-lg`,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t</MenuPrimitive.Positioner>\n\t\t</MenuPrimitive.Portal>\n\t);\n}\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuPortal,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuTrigger,\n};\n"]}
@@ -0,0 +1,51 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface FieldProps {
4
+ /** Field label text */
5
+ label: string;
6
+ /** Optional description text shown below the control */
7
+ description?: string;
8
+ /** Error message - shows in destructive color */
9
+ error?: string;
10
+ /** Shows required indicator (*) after label */
11
+ required?: boolean;
12
+ /** HTML id for the form control - used for label's htmlFor */
13
+ htmlFor?: string;
14
+ /** Additional className for the wrapper */
15
+ className?: string;
16
+ /** The form control (InputGroup, Input, Select, etc.) */
17
+ children: React.ReactNode;
18
+ }
19
+ /**
20
+ * Field wraps a form control with label, description, and error message.
21
+ * Works standalone without any form library dependency.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <Field label="Email" required error={errors.email} htmlFor="email">
26
+ * <InputGroup>
27
+ * <InputGroupAddon><Mail /></InputGroupAddon>
28
+ * <InputGroupInput id="email" type="email" placeholder="name@example.com" />
29
+ * </InputGroup>
30
+ * </Field>
31
+ * ```
32
+ */
33
+ declare function Field({ label, description, error, required, htmlFor, className, children, }: FieldProps): react_jsx_runtime.JSX.Element;
34
+ /**
35
+ * FieldRow is a horizontal layout variant for inline controls like checkboxes and switches.
36
+ * Places label beside the control instead of above.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * <FieldRow label="Enable notifications" description="Receive email updates" htmlFor="notifications">
41
+ * <Switch id="notifications" />
42
+ * </FieldRow>
43
+ * ```
44
+ */
45
+ interface FieldRowProps extends Omit<FieldProps, 'required'> {
46
+ /** Position of the label relative to the control */
47
+ labelPosition?: 'start' | 'end';
48
+ }
49
+ declare function FieldRow({ label, description, error, labelPosition, htmlFor, className, children, }: FieldRowProps): react_jsx_runtime.JSX.Element;
50
+
51
+ export { Field, type FieldProps, FieldRow, type FieldRowProps };
@@ -0,0 +1,115 @@
1
+ "use client";
2
+ import { clsx } from 'clsx';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ function cn(...inputs) {
7
+ return twMerge(clsx(inputs));
8
+ }
9
+ function Label({ className, ...props }) {
10
+ return /* @__PURE__ */ jsx(
11
+ "label",
12
+ {
13
+ "data-slot": "label",
14
+ className: cn(
15
+ `text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none
16
+ group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50
17
+ data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,
18
+ className
19
+ ),
20
+ ...props
21
+ }
22
+ );
23
+ }
24
+ function Field({
25
+ label,
26
+ description,
27
+ error,
28
+ required,
29
+ htmlFor,
30
+ className,
31
+ children
32
+ }) {
33
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "field", className: cn("grid gap-2", className), children: [
34
+ /* @__PURE__ */ jsxs(
35
+ Label,
36
+ {
37
+ htmlFor,
38
+ "data-slot": "field-label",
39
+ className: cn(error && "text-destructive"),
40
+ children: [
41
+ label,
42
+ required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", "aria-hidden": "true", children: "*" })
43
+ ]
44
+ }
45
+ ),
46
+ children,
47
+ description && /* @__PURE__ */ jsx(
48
+ "p",
49
+ {
50
+ "data-slot": "field-description",
51
+ className: "text-muted-foreground text-sm",
52
+ children: description
53
+ }
54
+ ),
55
+ error && /* @__PURE__ */ jsx(
56
+ "p",
57
+ {
58
+ "data-slot": "field-error",
59
+ className: "text-destructive text-sm",
60
+ role: "alert",
61
+ children: error
62
+ }
63
+ )
64
+ ] });
65
+ }
66
+ function FieldRow({
67
+ label,
68
+ description,
69
+ error,
70
+ labelPosition = "end",
71
+ htmlFor,
72
+ className,
73
+ children
74
+ }) {
75
+ const labelElement = /* @__PURE__ */ jsx(
76
+ Label,
77
+ {
78
+ htmlFor,
79
+ "data-slot": "field-label",
80
+ className: cn(
81
+ "text-sm font-medium leading-none",
82
+ error && "text-destructive"
83
+ ),
84
+ children: label
85
+ }
86
+ );
87
+ return /* @__PURE__ */ jsxs("div", { "data-slot": "field-row", className: cn("grid gap-2", className), children: [
88
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
89
+ labelPosition === "start" && labelElement,
90
+ children,
91
+ labelPosition === "end" && labelElement
92
+ ] }),
93
+ description && /* @__PURE__ */ jsx(
94
+ "p",
95
+ {
96
+ "data-slot": "field-description",
97
+ className: "text-muted-foreground text-sm",
98
+ children: description
99
+ }
100
+ ),
101
+ error && /* @__PURE__ */ jsx(
102
+ "p",
103
+ {
104
+ "data-slot": "field-error",
105
+ className: "text-destructive text-sm",
106
+ role: "alert",
107
+ children: error
108
+ }
109
+ )
110
+ ] });
111
+ }
112
+
113
+ export { Field, FieldRow };
114
+ //# sourceMappingURL=field.js.map
115
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/label.tsx","../../src/components/field.tsx"],"names":["jsx"],"mappings":";;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACOA,SAAS,KAAA,CAAM,EAAE,SAAA,EAAW,GAAG,OAAM,EAAe;AACnD,EAAA,uBACC,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACA,WAAA,EAAU,OAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACV,CAAA;AAAA;AAAA,kEAAA,CAAA;AAAA,QAGA;AAAA,OACD;AAAA,MACC,GAAG;AAAA;AAAA,GACL;AAEF;ACWA,SAAS,KAAA,CAAM;AAAA,EACd,KAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA;AACD,CAAA,EAAe;AACd,EAAA,uBACC,IAAA,CAAC,SAAI,WAAA,EAAU,OAAA,EAA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A,EAAU,WAAA,EAAY,WAAW,EAAA,CAAG,YAAA,EAAc,SAAS,CAAA,EAC/D,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,yBAAA,EACb,QAAA,EAAA;AAAA,MAAA,aAAA,KAAkB,OAAA,IAAW,YAAA;AAAA,MAC7B,QAAA;AAAA,MACA,kBAAkB,KAAA,IAAS;AAAA,KAAA,EAC7B,CAAA;AAAA,IAEC,+BACAA,GAAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACA,WAAA,EAAU,mBAAA;AAAA,QACV,SAAA,EAAU,+BAAA;AAAA,QAET,QAAA,EAAA;AAAA;AAAA,KACF;AAAA,IAGA,yBACAA,GAAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACA,WAAA,EAAU,aAAA;AAAA,QACV,SAAA,EAAU,0BAAA;AAAA,QACV,IAAA,EAAK,OAAA;AAAA,QAEJ,QAAA,EAAA;AAAA;AAAA;AACF,GAAA,EAEF,CAAA;AAEF","file":"field.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\n\nimport { cn } from '../lib/utils';\n\ntype LabelProps = React.ComponentProps<'label'>;\n\n/**\n * Label component for form controls.\n * Uses a standard HTML label element for maximum compatibility.\n */\nfunction Label({ className, ...props }: LabelProps) {\n\treturn (\n\t\t<label\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t`text-foreground text-sm leading-4 font-medium select-none group-data-[disabled=true]:pointer-events-none\n\t\t\t\tgroup-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\n\t\t\t\tdata-[disabled]:pointer-events-none data-[disabled]:opacity-50`,\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Label };\nexport type { LabelProps };\n","'use client';\n\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\ninterface FieldProps {\n\t/** Field label text */\n\tlabel: string;\n\t/** Optional description text shown below the control */\n\tdescription?: string;\n\t/** Error message - shows in destructive color */\n\terror?: string;\n\t/** Shows required indicator (*) after label */\n\trequired?: boolean;\n\t/** HTML id for the form control - used for label's htmlFor */\n\thtmlFor?: string;\n\t/** Additional className for the wrapper */\n\tclassName?: string;\n\t/** The form control (InputGroup, Input, Select, etc.) */\n\tchildren: React.ReactNode;\n}\n\n/**\n * Field wraps a form control with label, description, and error message.\n * Works standalone without any form library dependency.\n *\n * @example\n * ```tsx\n * <Field label=\"Email\" required error={errors.email} htmlFor=\"email\">\n * <InputGroup>\n * <InputGroupAddon><Mail /></InputGroupAddon>\n * <InputGroupInput id=\"email\" type=\"email\" placeholder=\"name@example.com\" />\n * </InputGroup>\n * </Field>\n * ```\n */\nfunction Field({\n\tlabel,\n\tdescription,\n\terror,\n\trequired,\n\thtmlFor,\n\tclassName,\n\tchildren,\n}: FieldProps) {\n\treturn (\n\t\t<div data-slot=\"field\" className={cn('grid gap-2', className)}>\n\t\t\t<Label\n\t\t\t\thtmlFor={htmlFor}\n\t\t\t\tdata-slot=\"field-label\"\n\t\t\t\tclassName={cn(error && 'text-destructive')}\n\t\t\t>\n\t\t\t\t{label}\n\t\t\t\t{required && (\n\t\t\t\t\t<span className=\"text-destructive ml-1\" aria-hidden=\"true\">\n\t\t\t\t\t\t*\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</Label>\n\n\t\t\t{children}\n\n\t\t\t{description && (\n\t\t\t\t<p\n\t\t\t\t\tdata-slot=\"field-description\"\n\t\t\t\t\tclassName=\"text-muted-foreground text-sm\"\n\t\t\t\t>\n\t\t\t\t\t{description}\n\t\t\t\t</p>\n\t\t\t)}\n\n\t\t\t{error && (\n\t\t\t\t<p\n\t\t\t\t\tdata-slot=\"field-error\"\n\t\t\t\t\tclassName=\"text-destructive text-sm\"\n\t\t\t\t\trole=\"alert\"\n\t\t\t\t>\n\t\t\t\t\t{error}\n\t\t\t\t</p>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\n/**\n * FieldRow is a horizontal layout variant for inline controls like checkboxes and switches.\n * Places label beside the control instead of above.\n *\n * @example\n * ```tsx\n * <FieldRow label=\"Enable notifications\" description=\"Receive email updates\" htmlFor=\"notifications\">\n * <Switch id=\"notifications\" />\n * </FieldRow>\n * ```\n */\ninterface FieldRowProps extends Omit<FieldProps, 'required'> {\n\t/** Position of the label relative to the control */\n\tlabelPosition?: 'start' | 'end';\n}\n\nfunction FieldRow({\n\tlabel,\n\tdescription,\n\terror,\n\tlabelPosition = 'end',\n\thtmlFor,\n\tclassName,\n\tchildren,\n}: FieldRowProps) {\n\tconst labelElement = (\n\t\t<Label\n\t\t\thtmlFor={htmlFor}\n\t\t\tdata-slot=\"field-label\"\n\t\t\tclassName={cn(\n\t\t\t\t'text-sm font-medium leading-none',\n\t\t\t\terror && 'text-destructive',\n\t\t\t)}\n\t\t>\n\t\t\t{label}\n\t\t</Label>\n\t);\n\n\treturn (\n\t\t<div data-slot=\"field-row\" className={cn('grid gap-2', className)}>\n\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t{labelPosition === 'start' && labelElement}\n\t\t\t\t{children}\n\t\t\t\t{labelPosition === 'end' && labelElement}\n\t\t\t</div>\n\n\t\t\t{description && (\n\t\t\t\t<p\n\t\t\t\t\tdata-slot=\"field-description\"\n\t\t\t\t\tclassName=\"text-muted-foreground text-sm\"\n\t\t\t\t>\n\t\t\t\t\t{description}\n\t\t\t\t</p>\n\t\t\t)}\n\n\t\t\t{error && (\n\t\t\t\t<p\n\t\t\t\t\tdata-slot=\"field-error\"\n\t\t\t\t\tclassName=\"text-destructive text-sm\"\n\t\t\t\t\trole=\"alert\"\n\t\t\t\t>\n\t\t\t\t\t{error}\n\t\t\t\t</p>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport { Field, FieldRow, type FieldProps, type FieldRowProps };\n"]}
@@ -0,0 +1,15 @@
1
+ import React__default from 'react';
2
+
3
+ interface FlickeringGridProps extends React__default.HTMLAttributes<HTMLDivElement> {
4
+ squareSize?: number;
5
+ gridGap?: number;
6
+ flickerChance?: number;
7
+ color?: string;
8
+ width?: number;
9
+ height?: number;
10
+ className?: string;
11
+ maxOpacity?: number;
12
+ }
13
+ declare const FlickeringGrid: React__default.FC<FlickeringGridProps>;
14
+
15
+ export { FlickeringGrid };