@invana/forms 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1079 @@
1
+ import { cn, Accordion, AccordionItem, AccordionTrigger, AccordionContent, Separator, Button } from '@invana/ui';
2
+ import * as React2 from 'react';
3
+ import { useMemo } from 'react';
4
+ import { Slot } from '@radix-ui/react-slot';
5
+ import { useFormContext, Controller, FormProvider } from 'react-hook-form';
6
+ import * as LabelPrimitive from '@radix-ui/react-label';
7
+ import { cva } from 'class-variance-authority';
8
+ import { jsx, jsxs } from 'react/jsx-runtime';
9
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
10
+ import * as SelectPrimitive from '@radix-ui/react-select';
11
+ import { ChevronDown, ChevronUp, Check, Circle } from 'lucide-react';
12
+ import * as SliderPrimitive from '@radix-ui/react-slider';
13
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
14
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
15
+
16
+ // src/form-field.tsx
17
+ var labelVariants = cva(
18
+ "font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
19
+ );
20
+ var Label = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
21
+ LabelPrimitive.Root,
22
+ {
23
+ ref,
24
+ className: cn(labelVariants(), className),
25
+ ...props
26
+ }
27
+ ));
28
+ Label.displayName = LabelPrimitive.Root.displayName;
29
+ var Form = FormProvider;
30
+ var FormFieldContext = React2.createContext(
31
+ {}
32
+ );
33
+ var FormField = ({
34
+ ...props
35
+ }) => {
36
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
37
+ };
38
+ var useFormField = () => {
39
+ const fieldContext = React2.useContext(FormFieldContext);
40
+ const itemContext = React2.useContext(FormItemContext);
41
+ const { getFieldState, formState } = useFormContext();
42
+ const fieldState = getFieldState(fieldContext.name, formState);
43
+ if (!fieldContext) {
44
+ throw new Error("useFormField should be used within <FormField>");
45
+ }
46
+ const { id } = itemContext;
47
+ return {
48
+ id,
49
+ name: fieldContext.name,
50
+ formItemId: `${id}-form-item`,
51
+ formDescriptionId: `${id}-form-item-description`,
52
+ formMessageId: `${id}-form-item-message`,
53
+ ...fieldState
54
+ };
55
+ };
56
+ var FormItemContext = React2.createContext(
57
+ {}
58
+ );
59
+ var FormItem = React2.forwardRef(({ className, ...props }, ref) => {
60
+ const id = React2.useId();
61
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
62
+ });
63
+ FormItem.displayName = "FormItem";
64
+ var FormLabel = React2.forwardRef(({ className, ...props }, ref) => {
65
+ const { error, formItemId } = useFormField();
66
+ return /* @__PURE__ */ jsx(
67
+ Label,
68
+ {
69
+ ref,
70
+ className: cn(error && "text-destructive", className),
71
+ htmlFor: formItemId,
72
+ ...props
73
+ }
74
+ );
75
+ });
76
+ FormLabel.displayName = "FormLabel";
77
+ var FormControl = React2.forwardRef(({ ...props }, ref) => {
78
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
79
+ return /* @__PURE__ */ jsx(
80
+ Slot,
81
+ {
82
+ ref,
83
+ id: formItemId,
84
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
85
+ "aria-invalid": !!error,
86
+ ...props
87
+ }
88
+ );
89
+ });
90
+ FormControl.displayName = "FormControl";
91
+ var FormDescription = React2.forwardRef(({ className, ...props }, ref) => {
92
+ const { formDescriptionId } = useFormField();
93
+ return /* @__PURE__ */ jsx(
94
+ "p",
95
+ {
96
+ ref,
97
+ id: formDescriptionId,
98
+ className: cn("text-[0.8rem] text-muted-foreground", className),
99
+ ...props
100
+ }
101
+ );
102
+ });
103
+ FormDescription.displayName = "FormDescription";
104
+ var FormMessage = React2.forwardRef(({ className, children, ...props }, ref) => {
105
+ const { error, formMessageId } = useFormField();
106
+ const body = error ? String(error?.message) : children;
107
+ if (!body) {
108
+ return null;
109
+ }
110
+ return /* @__PURE__ */ jsx(
111
+ "p",
112
+ {
113
+ ref,
114
+ id: formMessageId,
115
+ className: cn("text-[0.8rem] font-medium text-destructive", className),
116
+ ...props,
117
+ children: body
118
+ }
119
+ );
120
+ });
121
+ FormMessage.displayName = "FormMessage";
122
+ var Input = React2.forwardRef(
123
+ ({ className, type, ...props }, ref) => {
124
+ return /* @__PURE__ */ jsx(
125
+ "input",
126
+ {
127
+ type,
128
+ className: cn(
129
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
130
+ className
131
+ ),
132
+ ref,
133
+ ...props
134
+ }
135
+ );
136
+ }
137
+ );
138
+ Input.displayName = "Input";
139
+ var Switch = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
140
+ SwitchPrimitives.Root,
141
+ {
142
+ className: cn(
143
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border border-border shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=unchecked]:bg-input",
144
+ className
145
+ ),
146
+ ...props,
147
+ ref,
148
+ children: /* @__PURE__ */ jsx(
149
+ SwitchPrimitives.Thumb,
150
+ {
151
+ className: cn(
152
+ "pointer-events-none block h-5 w-5 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 data-[state=checked]:bg-primary-foreground data-[state=unchecked]:bg-foreground"
153
+ )
154
+ }
155
+ )
156
+ }
157
+ ));
158
+ Switch.displayName = SwitchPrimitives.Root.displayName;
159
+ var Select = SelectPrimitive.Root;
160
+ var SelectGroup = SelectPrimitive.Group;
161
+ var SelectValue = SelectPrimitive.Value;
162
+ var SelectTrigger = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
163
+ SelectPrimitive.Trigger,
164
+ {
165
+ ref,
166
+ className: cn(
167
+ "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
168
+ className
169
+ ),
170
+ ...props,
171
+ children: [
172
+ children,
173
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
174
+ ]
175
+ }
176
+ ));
177
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
178
+ var SelectScrollUpButton = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
179
+ SelectPrimitive.ScrollUpButton,
180
+ {
181
+ ref,
182
+ className: cn(
183
+ "flex cursor-default items-center justify-center py-1",
184
+ className
185
+ ),
186
+ ...props,
187
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
188
+ }
189
+ ));
190
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
191
+ var SelectScrollDownButton = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
192
+ SelectPrimitive.ScrollDownButton,
193
+ {
194
+ ref,
195
+ className: cn(
196
+ "flex cursor-default items-center justify-center py-1",
197
+ className
198
+ ),
199
+ ...props,
200
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
201
+ }
202
+ ));
203
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
204
+ var SelectContent = React2.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
205
+ SelectPrimitive.Content,
206
+ {
207
+ ref,
208
+ className: cn(
209
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
210
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
211
+ className
212
+ ),
213
+ position,
214
+ ...props,
215
+ children: [
216
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
217
+ /* @__PURE__ */ jsx(
218
+ SelectPrimitive.Viewport,
219
+ {
220
+ className: cn(
221
+ "p-1",
222
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
223
+ ),
224
+ children
225
+ }
226
+ ),
227
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
228
+ ]
229
+ }
230
+ ) }));
231
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
232
+ var SelectLabel = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
233
+ SelectPrimitive.Label,
234
+ {
235
+ ref,
236
+ className: cn("px-2 py-1.5 text-sm font-semibold", className),
237
+ ...props
238
+ }
239
+ ));
240
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
241
+ var SelectItem = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
242
+ SelectPrimitive.Item,
243
+ {
244
+ ref,
245
+ className: cn(
246
+ "relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-2 pr-8 outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
247
+ className
248
+ ),
249
+ ...props,
250
+ children: [
251
+ /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
252
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
253
+ ]
254
+ }
255
+ ));
256
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
257
+ var SelectSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
258
+ SelectPrimitive.Separator,
259
+ {
260
+ ref,
261
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
262
+ ...props
263
+ }
264
+ ));
265
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
266
+ var DEFAULT_PRESETS = [
267
+ { label: "Black", value: "rgb(0, 0, 0)", darkValue: "rgb(255, 255, 255)" },
268
+ { label: "Red", value: "rgb(239, 68, 68)" },
269
+ { label: "Blue", value: "rgb(59, 130, 246)" }
270
+ ];
271
+ var ColorSwatches = ({
272
+ value,
273
+ onChange,
274
+ presetColors = DEFAULT_PRESETS,
275
+ defaultValue = "rgb(0, 0, 0)"
276
+ }) => {
277
+ const [customColor, setCustomColor] = React2.useState(value || defaultValue);
278
+ const [isCustom, setIsCustom] = React2.useState(false);
279
+ React2.useEffect(() => {
280
+ if (!value) return;
281
+ const isPreset = presetColors.some((c) => c.value === value);
282
+ setIsCustom(!isPreset);
283
+ if (!isPreset) setCustomColor(value);
284
+ }, [value, presetColors]);
285
+ const select = (newColor, custom = false) => {
286
+ setIsCustom(custom);
287
+ if (custom) setCustomColor(newColor);
288
+ onChange?.(newColor);
289
+ };
290
+ return /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
291
+ presetColors.map((color) => /* @__PURE__ */ jsxs(
292
+ "button",
293
+ {
294
+ type: "button",
295
+ onClick: () => select(color.value),
296
+ className: cn(
297
+ "group relative h-8 w-8 overflow-hidden rounded-md border",
298
+ "ring-offset-background transition-all hover:scale-105",
299
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
300
+ !isCustom && value === color.value && "ring-2 ring-ring ring-offset-2"
301
+ ),
302
+ children: [
303
+ /* @__PURE__ */ jsx("div", { className: "h-full w-full", style: { backgroundColor: color.value } }),
304
+ !isCustom && value === color.value && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30", children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 text-white" }) }),
305
+ /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
306
+ "Select ",
307
+ color.label
308
+ ] })
309
+ ]
310
+ },
311
+ color.label
312
+ )),
313
+ /* @__PURE__ */ jsxs(
314
+ "div",
315
+ {
316
+ className: cn(
317
+ "group relative h-8 w-8 overflow-hidden rounded-md border",
318
+ "ring-offset-background transition-all hover:scale-105",
319
+ isCustom && "ring-2 ring-ring ring-offset-2"
320
+ ),
321
+ children: [
322
+ /* @__PURE__ */ jsx(
323
+ "input",
324
+ {
325
+ type: "color",
326
+ value: customColor,
327
+ onChange: (e) => select(e.target.value, true),
328
+ className: "absolute inset-0 cursor-pointer opacity-0"
329
+ }
330
+ ),
331
+ /* @__PURE__ */ jsx("div", { className: "h-full w-full", style: { backgroundColor: customColor } }),
332
+ isCustom && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/30", children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 text-white" }) }),
333
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Custom color" })
334
+ ]
335
+ }
336
+ )
337
+ ] });
338
+ };
339
+ var Slider = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
340
+ SliderPrimitive.Root,
341
+ {
342
+ ref,
343
+ className: cn(
344
+ "relative flex w-full touch-none select-none items-center",
345
+ className
346
+ ),
347
+ ...props,
348
+ children: [
349
+ /* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
350
+ /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
351
+ ]
352
+ }
353
+ ));
354
+ Slider.displayName = SliderPrimitive.Root.displayName;
355
+ var SliderNumber = ({
356
+ value = 0,
357
+ onChange,
358
+ min = 0,
359
+ max = 100,
360
+ step = 1,
361
+ className
362
+ }) => {
363
+ const [local, setLocal] = React2.useState(value);
364
+ React2.useEffect(() => {
365
+ setLocal(value);
366
+ }, [value]);
367
+ const set = (n) => {
368
+ setLocal(n);
369
+ onChange?.(n);
370
+ };
371
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
372
+ /* @__PURE__ */ jsx(
373
+ Slider,
374
+ {
375
+ value: [local],
376
+ onValueChange: ([n]) => set(n),
377
+ min,
378
+ max,
379
+ step,
380
+ className: "flex-1"
381
+ }
382
+ ),
383
+ /* @__PURE__ */ jsx(
384
+ Input,
385
+ {
386
+ type: "number",
387
+ value: local,
388
+ onChange: (e) => set(Number(e.target.value)),
389
+ className: "h-8 w-16",
390
+ min,
391
+ max,
392
+ step
393
+ }
394
+ )
395
+ ] });
396
+ };
397
+ var IconInput = ({ value, onChange }) => {
398
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
399
+ /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md border bg-muted text-sm", children: value ? value.slice(0, 2) : "\u2013" }),
400
+ /* @__PURE__ */ jsx(
401
+ Input,
402
+ {
403
+ type: "text",
404
+ value: value ?? "",
405
+ onChange: (e) => onChange?.(e.target.value),
406
+ placeholder: "icon name",
407
+ className: "h-8 text-sm"
408
+ }
409
+ )
410
+ ] });
411
+ };
412
+ function itemClasses(labelPosition, className) {
413
+ return cn(
414
+ labelPosition === "side" && "grid grid-cols-3 items-center gap-2",
415
+ labelPosition === "top" && "space-y-2",
416
+ className
417
+ );
418
+ }
419
+ function inputWrapper(labelPosition) {
420
+ return cn(labelPosition === "side" && "col-span-2", "space-y-1");
421
+ }
422
+ var InputField = ({
423
+ label,
424
+ description,
425
+ placeholder,
426
+ value,
427
+ onChange,
428
+ labelPosition = "side",
429
+ className
430
+ }) => /* @__PURE__ */ jsxs(FormItem, { className: itemClasses(labelPosition, className), children: [
431
+ label && /* @__PURE__ */ jsx(FormLabel, { className: "text-xs", children: label }),
432
+ /* @__PURE__ */ jsxs("div", { className: inputWrapper(labelPosition), children: [
433
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
434
+ Input,
435
+ {
436
+ className: "h-8 text-sm",
437
+ placeholder,
438
+ value: value ?? "",
439
+ onChange: (e) => onChange?.(e.target.value)
440
+ }
441
+ ) }),
442
+ description && /* @__PURE__ */ jsx(FormDescription, { className: "text-xs", children: description }),
443
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
444
+ ] })
445
+ ] });
446
+ var SelectField = ({
447
+ label,
448
+ description,
449
+ options = [],
450
+ value,
451
+ onChange,
452
+ placeholder = "Select type",
453
+ labelPosition = "side",
454
+ className
455
+ }) => /* @__PURE__ */ jsxs(FormItem, { className: itemClasses(labelPosition, className), children: [
456
+ label && /* @__PURE__ */ jsx(FormLabel, { className: "text-xs", children: label }),
457
+ /* @__PURE__ */ jsxs("div", { className: inputWrapper(labelPosition), children: [
458
+ /* @__PURE__ */ jsxs(Select, { value: value ?? "", onValueChange: onChange, children: [
459
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(SelectTrigger, { className: "h-8", children: /* @__PURE__ */ jsx(SelectValue, { placeholder }) }) }),
460
+ /* @__PURE__ */ jsx(SelectContent, { children: options.map((o) => /* @__PURE__ */ jsx(SelectItem, { value: o.value, children: o.label }, o.value)) })
461
+ ] }),
462
+ description && /* @__PURE__ */ jsx(FormDescription, { className: "text-xs", children: description }),
463
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
464
+ ] })
465
+ ] });
466
+ var BooleanField = ({
467
+ label,
468
+ description,
469
+ value,
470
+ onChange,
471
+ labelPosition = "side"
472
+ }) => {
473
+ if (labelPosition === "side") {
474
+ return /* @__PURE__ */ jsxs(FormItem, { className: "flex items-center justify-between rounded-md border p-2", children: [
475
+ /* @__PURE__ */ jsxs("div", { children: [
476
+ label && /* @__PURE__ */ jsx(FormLabel, { className: "text-xs", children: label }),
477
+ description && /* @__PURE__ */ jsx(FormDescription, { className: "text-xs", children: description })
478
+ ] }),
479
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Switch, { checked: !!value, onCheckedChange: onChange }) })
480
+ ] });
481
+ }
482
+ return /* @__PURE__ */ jsxs(FormItem, { className: "space-y-2", children: [
483
+ label && /* @__PURE__ */ jsx(FormLabel, { className: "text-xs", children: label }),
484
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between rounded-md border p-2", children: [
485
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Switch, { checked: !!value, onCheckedChange: onChange }) }),
486
+ description && /* @__PURE__ */ jsx(FormDescription, { className: "ml-2 text-xs", children: description })
487
+ ] })
488
+ ] });
489
+ };
490
+ var ColorField = ({
491
+ label,
492
+ description,
493
+ value,
494
+ onChange,
495
+ presetColors,
496
+ defaultValue,
497
+ labelPosition = "side",
498
+ className
499
+ }) => /* @__PURE__ */ jsxs(FormItem, { className: itemClasses(labelPosition, className), children: [
500
+ label && /* @__PURE__ */ jsx(FormLabel, { className: "text-xs", children: label }),
501
+ /* @__PURE__ */ jsxs("div", { className: inputWrapper(labelPosition), children: [
502
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
503
+ ColorSwatches,
504
+ {
505
+ value,
506
+ onChange,
507
+ presetColors,
508
+ defaultValue
509
+ }
510
+ ) }),
511
+ description && /* @__PURE__ */ jsx(FormDescription, { className: "text-xs", children: description }),
512
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
513
+ ] })
514
+ ] });
515
+ var NumberField = ({
516
+ label,
517
+ description,
518
+ value,
519
+ onChange,
520
+ min,
521
+ max,
522
+ step,
523
+ labelPosition = "side",
524
+ className
525
+ }) => /* @__PURE__ */ jsxs(FormItem, { className: itemClasses(labelPosition, className), children: [
526
+ label && /* @__PURE__ */ jsx(FormLabel, { className: "text-xs", children: label }),
527
+ /* @__PURE__ */ jsxs("div", { className: inputWrapper(labelPosition), children: [
528
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(
529
+ SliderNumber,
530
+ {
531
+ value: typeof value === "number" ? value : 0,
532
+ onChange,
533
+ min,
534
+ max,
535
+ step
536
+ }
537
+ ) }),
538
+ description && /* @__PURE__ */ jsx(FormDescription, { className: "text-xs", children: description }),
539
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
540
+ ] })
541
+ ] });
542
+ var IconField = ({
543
+ label,
544
+ description,
545
+ value,
546
+ onChange,
547
+ labelPosition = "side",
548
+ className
549
+ }) => /* @__PURE__ */ jsxs(FormItem, { className: itemClasses(labelPosition, className), children: [
550
+ label && /* @__PURE__ */ jsx(FormLabel, { className: "text-xs", children: label }),
551
+ /* @__PURE__ */ jsxs("div", { className: inputWrapper(labelPosition), children: [
552
+ /* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(IconInput, { value, onChange }) }),
553
+ description && /* @__PURE__ */ jsx(FormDescription, { className: "text-xs", children: description }),
554
+ /* @__PURE__ */ jsx(FormMessage, { className: "text-xs" })
555
+ ] })
556
+ ] });
557
+ var Field = {
558
+ Input: InputField,
559
+ Boolean: BooleanField,
560
+ Color: ColorField,
561
+ Number: NumberField,
562
+ Select: SelectField,
563
+ Icon: IconField
564
+ };
565
+ function humanize(name) {
566
+ return name.replace(/([A-Z])/g, " $1").replace(/^./, (c) => c.toUpperCase()).trim();
567
+ }
568
+ function chunk(arr, size) {
569
+ const out = [];
570
+ for (let i = 0; i < arr.length; i += size) out.push(arr.slice(i, i + size));
571
+ return out;
572
+ }
573
+ function renderField(field, parentName, control, labelPosition) {
574
+ return /* @__PURE__ */ jsx(
575
+ FormField,
576
+ {
577
+ control,
578
+ name: `${parentName}.${field.name}`,
579
+ defaultValue: field.defaultValue,
580
+ render: ({ field: rhf }) => {
581
+ const common = {
582
+ label: field.label ?? humanize(field.name),
583
+ description: field.description,
584
+ options: field.options,
585
+ min: field.min,
586
+ max: field.max,
587
+ step: field.step,
588
+ presetColors: field.presetColors,
589
+ defaultValue: field.defaultValue,
590
+ labelPosition,
591
+ value: rhf.value,
592
+ onChange: rhf.onChange
593
+ };
594
+ switch (field.type) {
595
+ case "boolean":
596
+ return /* @__PURE__ */ jsx(BooleanField, { ...common });
597
+ case "color":
598
+ return /* @__PURE__ */ jsx(ColorField, { ...common });
599
+ case "number":
600
+ return /* @__PURE__ */ jsx(NumberField, { ...common });
601
+ case "select":
602
+ return /* @__PURE__ */ jsx(SelectField, { ...common });
603
+ case "icon":
604
+ return /* @__PURE__ */ jsx(IconField, { ...common });
605
+ case "text":
606
+ default:
607
+ return /* @__PURE__ */ jsx(
608
+ InputField,
609
+ {
610
+ ...common,
611
+ placeholder: field.placeholder ?? `Enter ${field.name}`
612
+ }
613
+ );
614
+ }
615
+ }
616
+ },
617
+ field.name
618
+ );
619
+ }
620
+ function renderRows(fields, rowConfig, parentName, control, labelPosition) {
621
+ if (!rowConfig || rowConfig.length === 0) {
622
+ return /* @__PURE__ */ jsx("div", { className: "grid gap-4", children: chunk(fields, 2).map((row, i) => /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: row.map((f) => renderField(f, parentName, control, labelPosition)) }, i)) });
623
+ }
624
+ const used = new Set(rowConfig.flatMap((r) => r.fields));
625
+ const unassigned = fields.filter((f) => !used.has(f.name));
626
+ const byName = new Map(fields.map((f) => [f.name, f]));
627
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
628
+ rowConfig.map((row) => {
629
+ const rowFields = row.fields.map((n) => byName.get(n)).filter((f) => !!f);
630
+ return chunk(rowFields, 2).map((cnk, idx) => /* @__PURE__ */ jsx(
631
+ "div",
632
+ {
633
+ className: "grid grid-cols-1 gap-4 md:grid-cols-2",
634
+ children: cnk.map((f) => renderField(f, parentName, control, labelPosition))
635
+ },
636
+ `${row.id}-${idx}`
637
+ ));
638
+ }),
639
+ unassigned.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid gap-4", children: chunk(unassigned, 2).map((row, i) => /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: row.map((f) => renderField(f, parentName, control, labelPosition)) }, `u-${i}`)) })
640
+ ] });
641
+ }
642
+ var ObjectField = ({
643
+ control,
644
+ name,
645
+ fields,
646
+ rowConfig,
647
+ labelPosition = "side"
648
+ }) => {
649
+ const grouped = fields.reduce((acc, f) => {
650
+ const key = f.group ?? "_ungrouped";
651
+ (acc[key] ??= []).push(f);
652
+ return acc;
653
+ }, {});
654
+ const ungrouped = grouped["_ungrouped"] ?? [];
655
+ delete grouped["_ungrouped"];
656
+ const groupedEntries = Object.entries(grouped);
657
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
658
+ ungrouped.length > 0 && /* @__PURE__ */ jsx("div", { className: "space-y-4", children: renderRows(ungrouped, rowConfig, name, control, labelPosition) }),
659
+ groupedEntries.length > 0 && /* @__PURE__ */ jsx(
660
+ Accordion,
661
+ {
662
+ type: "multiple",
663
+ defaultValue: groupedEntries.map(([k]) => k),
664
+ className: "w-full space-y-2",
665
+ children: groupedEntries.map(([group, gFields]) => /* @__PURE__ */ jsxs(AccordionItem, { value: group, className: "rounded-md border", children: [
666
+ /* @__PURE__ */ jsxs(AccordionTrigger, { className: "px-3 text-sm font-medium hover:no-underline", children: [
667
+ humanize(group),
668
+ " Settings"
669
+ ] }),
670
+ /* @__PURE__ */ jsx(AccordionContent, { className: "px-3 pb-3", children: /* @__PURE__ */ jsx("div", { className: "space-y-4", children: renderRows(gFields, rowConfig, name, control, labelPosition) }) })
671
+ ] }, group))
672
+ }
673
+ )
674
+ ] });
675
+ };
676
+ var FormField2 = Object.assign(FormField, {
677
+ ObjectField,
678
+ Input: InputField,
679
+ Boolean: BooleanField,
680
+ Color: ColorField,
681
+ Number: NumberField,
682
+ Select: SelectField,
683
+ Icon: IconField
684
+ });
685
+ var Textarea = React2.forwardRef(({ className, ...props }, ref) => {
686
+ return /* @__PURE__ */ jsx(
687
+ "textarea",
688
+ {
689
+ className: cn(
690
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
691
+ className
692
+ ),
693
+ ref,
694
+ ...props
695
+ }
696
+ );
697
+ });
698
+ Textarea.displayName = "Textarea";
699
+ var Checkbox = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
700
+ CheckboxPrimitive.Root,
701
+ {
702
+ ref,
703
+ className: cn(
704
+ "peer h-4 w-4 shrink-0 rounded-md border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
705
+ className
706
+ ),
707
+ ...props,
708
+ children: /* @__PURE__ */ jsx(
709
+ CheckboxPrimitive.Indicator,
710
+ {
711
+ className: cn("flex items-center justify-center text-current"),
712
+ children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
713
+ }
714
+ )
715
+ }
716
+ ));
717
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
718
+ var RadioGroup = React2.forwardRef(({ className, ...props }, ref) => {
719
+ return /* @__PURE__ */ jsx(
720
+ RadioGroupPrimitive.Root,
721
+ {
722
+ className: cn("grid gap-2", className),
723
+ ...props,
724
+ ref
725
+ }
726
+ );
727
+ });
728
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
729
+ var RadioGroupItem = React2.forwardRef(({ className, ...props }, ref) => {
730
+ return /* @__PURE__ */ jsx(
731
+ RadioGroupPrimitive.Item,
732
+ {
733
+ ref,
734
+ className: cn(
735
+ "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
736
+ className
737
+ ),
738
+ ...props,
739
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
740
+ }
741
+ );
742
+ });
743
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
744
+ function FieldSet({ className, ...props }) {
745
+ return /* @__PURE__ */ jsx(
746
+ "fieldset",
747
+ {
748
+ "data-slot": "field-set",
749
+ className: cn(
750
+ "flex flex-col gap-6",
751
+ "has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
752
+ className
753
+ ),
754
+ ...props
755
+ }
756
+ );
757
+ }
758
+ function FieldLegend({
759
+ className,
760
+ variant = "legend",
761
+ ...props
762
+ }) {
763
+ return /* @__PURE__ */ jsx(
764
+ "legend",
765
+ {
766
+ "data-slot": "field-legend",
767
+ "data-variant": variant,
768
+ className: cn(
769
+ "mb-3 font-medium",
770
+ "data-[variant=legend]:text-base",
771
+ "data-[variant=label]:text-sm",
772
+ className
773
+ ),
774
+ ...props
775
+ }
776
+ );
777
+ }
778
+ function FieldGroup({ className, ...props }) {
779
+ return /* @__PURE__ */ jsx(
780
+ "div",
781
+ {
782
+ "data-slot": "field-group",
783
+ className: cn(
784
+ "group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
785
+ className
786
+ ),
787
+ ...props
788
+ }
789
+ );
790
+ }
791
+ cva(
792
+ "group/field data-[invalid=true]:text-destructive flex w-full gap-3",
793
+ {
794
+ variants: {
795
+ orientation: {
796
+ vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
797
+ horizontal: [
798
+ "flex-row items-center",
799
+ "[&>[data-slot=field-label]]:flex-auto",
800
+ "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
801
+ ],
802
+ responsive: [
803
+ "@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
804
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
805
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
806
+ ]
807
+ }
808
+ },
809
+ defaultVariants: {
810
+ orientation: "vertical"
811
+ }
812
+ }
813
+ );
814
+ function FieldContent({ className, ...props }) {
815
+ return /* @__PURE__ */ jsx(
816
+ "div",
817
+ {
818
+ "data-slot": "field-content",
819
+ className: cn(
820
+ "group/field-content flex flex-1 flex-col gap-1.5 leading-snug",
821
+ className
822
+ ),
823
+ ...props
824
+ }
825
+ );
826
+ }
827
+ function FieldLabel({
828
+ className,
829
+ ...props
830
+ }) {
831
+ return /* @__PURE__ */ jsx(
832
+ Label,
833
+ {
834
+ "data-slot": "field-label",
835
+ className: cn(
836
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
837
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4",
838
+ "has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
839
+ className
840
+ ),
841
+ ...props
842
+ }
843
+ );
844
+ }
845
+ function FieldTitle({ className, ...props }) {
846
+ return /* @__PURE__ */ jsx(
847
+ "div",
848
+ {
849
+ "data-slot": "field-label",
850
+ className: cn(
851
+ "flex w-fit items-center gap-2 text-sm font-medium leading-snug group-data-[disabled=true]/field:opacity-50",
852
+ className
853
+ ),
854
+ ...props
855
+ }
856
+ );
857
+ }
858
+ function FieldDescription({ className, ...props }) {
859
+ return /* @__PURE__ */ jsx(
860
+ "p",
861
+ {
862
+ "data-slot": "field-description",
863
+ className: cn(
864
+ "text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
865
+ "nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
866
+ "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
867
+ className
868
+ ),
869
+ ...props
870
+ }
871
+ );
872
+ }
873
+ function FieldSeparator({
874
+ children,
875
+ className,
876
+ ...props
877
+ }) {
878
+ return /* @__PURE__ */ jsxs(
879
+ "div",
880
+ {
881
+ "data-slot": "field-separator",
882
+ "data-content": !!children,
883
+ className: cn(
884
+ "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
885
+ className
886
+ ),
887
+ ...props,
888
+ children: [
889
+ /* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
890
+ children && /* @__PURE__ */ jsx(
891
+ "span",
892
+ {
893
+ className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
894
+ "data-slot": "field-separator-content",
895
+ children
896
+ }
897
+ )
898
+ ]
899
+ }
900
+ );
901
+ }
902
+ function FieldError({
903
+ className,
904
+ children,
905
+ errors,
906
+ ...props
907
+ }) {
908
+ const content = useMemo(() => {
909
+ if (children) {
910
+ return children;
911
+ }
912
+ if (!errors) {
913
+ return null;
914
+ }
915
+ if (errors?.length === 1 && errors[0]?.message) {
916
+ return errors[0].message;
917
+ }
918
+ return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
919
+ (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
920
+ ) });
921
+ }, [children, errors]);
922
+ if (!content) {
923
+ return null;
924
+ }
925
+ return /* @__PURE__ */ jsx(
926
+ "div",
927
+ {
928
+ role: "alert",
929
+ "data-slot": "field-error",
930
+ className: cn("text-destructive text-sm font-normal", className),
931
+ ...props,
932
+ children: content
933
+ }
934
+ );
935
+ }
936
+ function InputGroup({ className, ...props }) {
937
+ return /* @__PURE__ */ jsx(
938
+ "div",
939
+ {
940
+ "data-slot": "input-group",
941
+ role: "group",
942
+ className: cn(
943
+ "group/input-group border-input dark:bg-input/30 shadow-xs relative flex w-full items-center rounded-md border outline-none transition-[color,box-shadow]",
944
+ "h-9 has-[>textarea]:h-auto",
945
+ // Variants based on alignment.
946
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
947
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
948
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
949
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
950
+ // Focus state.
951
+ "has-[[data-slot=input-group-control]:focus-visible]:ring-ring has-[[data-slot=input-group-control]:focus-visible]:ring-1",
952
+ // Error state.
953
+ "has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
954
+ className
955
+ ),
956
+ ...props
957
+ }
958
+ );
959
+ }
960
+ var inputGroupAddonVariants = cva(
961
+ "text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
962
+ {
963
+ variants: {
964
+ align: {
965
+ "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
966
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]",
967
+ "block-start": "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
968
+ "block-end": "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5"
969
+ }
970
+ },
971
+ defaultVariants: {
972
+ align: "inline-start"
973
+ }
974
+ }
975
+ );
976
+ function InputGroupAddon({
977
+ className,
978
+ align = "inline-start",
979
+ ...props
980
+ }) {
981
+ return /* @__PURE__ */ jsx(
982
+ "div",
983
+ {
984
+ role: "group",
985
+ "data-slot": "input-group-addon",
986
+ "data-align": align,
987
+ className: cn(inputGroupAddonVariants({ align }), className),
988
+ onClick: (e) => {
989
+ if (e.target.closest("button")) {
990
+ return;
991
+ }
992
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
993
+ },
994
+ ...props
995
+ }
996
+ );
997
+ }
998
+ var inputGroupButtonVariants = cva(
999
+ "flex items-center gap-2 text-sm shadow-none",
1000
+ {
1001
+ variants: {
1002
+ size: {
1003
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
1004
+ sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
1005
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
1006
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
1007
+ }
1008
+ },
1009
+ defaultVariants: {
1010
+ size: "xs"
1011
+ }
1012
+ }
1013
+ );
1014
+ function InputGroupButton({
1015
+ className,
1016
+ type = "button",
1017
+ variant = "ghost",
1018
+ size = "xs",
1019
+ ...props
1020
+ }) {
1021
+ return /* @__PURE__ */ jsx(
1022
+ Button,
1023
+ {
1024
+ type,
1025
+ "data-size": size,
1026
+ variant,
1027
+ className: cn(inputGroupButtonVariants({ size }), className),
1028
+ ...props
1029
+ }
1030
+ );
1031
+ }
1032
+ function InputGroupText({ className, ...props }) {
1033
+ return /* @__PURE__ */ jsx(
1034
+ "span",
1035
+ {
1036
+ className: cn(
1037
+ "text-muted-foreground flex items-center gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
1038
+ className
1039
+ ),
1040
+ ...props
1041
+ }
1042
+ );
1043
+ }
1044
+ function InputGroupInput({
1045
+ className,
1046
+ ...props
1047
+ }) {
1048
+ return /* @__PURE__ */ jsx(
1049
+ Input,
1050
+ {
1051
+ "data-slot": "input-group-control",
1052
+ className: cn(
1053
+ "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
1054
+ className
1055
+ ),
1056
+ ...props
1057
+ }
1058
+ );
1059
+ }
1060
+ function InputGroupTextarea({
1061
+ className,
1062
+ ...props
1063
+ }) {
1064
+ return /* @__PURE__ */ jsx(
1065
+ Textarea,
1066
+ {
1067
+ "data-slot": "input-group-control",
1068
+ className: cn(
1069
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
1070
+ className
1071
+ ),
1072
+ ...props
1073
+ }
1074
+ );
1075
+ }
1076
+
1077
+ export { BooleanField, Checkbox, ColorField, ColorSwatches, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField2 as FormField, FormItem, FormLabel, FormMessage, IconField, IconInput, Input, InputField, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, NumberField, ObjectField, RadioGroup, RadioGroupItem, Select, SelectContent, SelectField, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Slider, SliderNumber, Switch, Textarea, useFormField };
1078
+ //# sourceMappingURL=index.js.map
1079
+ //# sourceMappingURL=index.js.map