@pos-360/horizon 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-24KNWDO5.js → chunk-BWR6DSQJ.js} +329 -50
- package/dist/chunk-BWR6DSQJ.js.map +1 -0
- package/dist/{chunk-RMVND66S.mjs → chunk-HJPQ6TOR.mjs} +488 -88
- package/dist/chunk-HJPQ6TOR.mjs.map +1 -0
- package/dist/{chunk-VMM4FQ6A.js → chunk-S2A3IDOX.js} +507 -88
- package/dist/chunk-S2A3IDOX.js.map +1 -0
- package/dist/{chunk-FEMSTEHE.mjs → chunk-TQPMV72P.mjs} +307 -51
- package/dist/chunk-TQPMV72P.mjs.map +1 -0
- package/dist/enhanced.d.mts +10 -3
- package/dist/enhanced.d.ts +10 -3
- package/dist/enhanced.js +30 -6
- package/dist/enhanced.mjs +1 -1
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +178 -82
- package/dist/index.mjs +2 -2
- package/dist/primitives.d.mts +104 -10
- package/dist/primitives.d.ts +104 -10
- package/dist/primitives.js +148 -76
- package/dist/primitives.mjs +1 -1
- package/package.json +15 -11
- package/tailwind.config.js +1 -0
- package/dist/chunk-24KNWDO5.js.map +0 -1
- package/dist/chunk-FEMSTEHE.mjs.map +0 -1
- package/dist/chunk-RMVND66S.mjs.map +0 -1
- package/dist/chunk-VMM4FQ6A.js.map +0 -1
|
@@ -1,17 +1,42 @@
|
|
|
1
1
|
import { cn } from './chunk-TDRL2RCT.mjs';
|
|
2
|
-
import * as React9 from 'react';
|
|
3
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
4
2
|
import { cva } from 'class-variance-authority';
|
|
5
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import * as React7 from 'react';
|
|
5
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
6
6
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
7
7
|
import { Check, X, ChevronRight, Circle, ChevronDown, ChevronUp } from 'lucide-react';
|
|
8
8
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
9
9
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
10
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
10
11
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
11
12
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
12
13
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
13
14
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
14
15
|
|
|
16
|
+
var badgeVariants = cva(
|
|
17
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
default: "border-transparent bg-blue-600 text-white hover:bg-blue-700",
|
|
22
|
+
secondary: "border-transparent bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-neutral-700 dark:text-gray-100 dark:hover:bg-neutral-600",
|
|
23
|
+
destructive: "border-transparent bg-red-600 text-white hover:bg-red-700",
|
|
24
|
+
outline: "border-gray-300 text-gray-700 dark:border-neutral-600 dark:text-gray-300",
|
|
25
|
+
success: "border-transparent bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",
|
|
26
|
+
warning: "border-transparent bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",
|
|
27
|
+
info: "border-transparent bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",
|
|
28
|
+
purple: "border-transparent bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400",
|
|
29
|
+
purpleOutline: "border-purple-300 dark:border-purple-600 bg-transparent text-purple-700 dark:text-purple-300 hover:bg-purple-50 dark:hover:bg-purple-900/20"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: "default"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
function Badge({ className, variant, ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
39
|
+
}
|
|
15
40
|
var buttonVariants = cva(
|
|
16
41
|
"group inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
17
42
|
{
|
|
@@ -37,7 +62,7 @@ var buttonVariants = cva(
|
|
|
37
62
|
}
|
|
38
63
|
}
|
|
39
64
|
);
|
|
40
|
-
var Button =
|
|
65
|
+
var Button = React7.forwardRef(
|
|
41
66
|
({
|
|
42
67
|
className,
|
|
43
68
|
variant,
|
|
@@ -77,31 +102,7 @@ var Button = React9.forwardRef(
|
|
|
77
102
|
}
|
|
78
103
|
);
|
|
79
104
|
Button.displayName = "Button";
|
|
80
|
-
var
|
|
81
|
-
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
|
|
82
|
-
{
|
|
83
|
-
variants: {
|
|
84
|
-
variant: {
|
|
85
|
-
default: "border-transparent bg-blue-600 text-white hover:bg-blue-700",
|
|
86
|
-
secondary: "border-transparent bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-neutral-700 dark:text-gray-100 dark:hover:bg-neutral-600",
|
|
87
|
-
destructive: "border-transparent bg-red-600 text-white hover:bg-red-700",
|
|
88
|
-
outline: "border-gray-300 text-gray-700 dark:border-neutral-600 dark:text-gray-300",
|
|
89
|
-
success: "border-transparent bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",
|
|
90
|
-
warning: "border-transparent bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",
|
|
91
|
-
info: "border-transparent bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",
|
|
92
|
-
purple: "border-transparent bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-400",
|
|
93
|
-
purpleOutline: "border-purple-300 dark:border-purple-600 bg-transparent text-purple-700 dark:text-purple-300 hover:bg-purple-50 dark:hover:bg-purple-900/20"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
defaultVariants: {
|
|
97
|
-
variant: "default"
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
function Badge({ className, variant, ...props }) {
|
|
102
|
-
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
103
|
-
}
|
|
104
|
-
var Card = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
105
|
+
var Card = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
105
106
|
"div",
|
|
106
107
|
{
|
|
107
108
|
ref,
|
|
@@ -113,7 +114,7 @@ var Card = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
113
114
|
}
|
|
114
115
|
));
|
|
115
116
|
Card.displayName = "Card";
|
|
116
|
-
var CardHeader =
|
|
117
|
+
var CardHeader = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
117
118
|
"div",
|
|
118
119
|
{
|
|
119
120
|
ref,
|
|
@@ -122,7 +123,7 @@ var CardHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
122
123
|
}
|
|
123
124
|
));
|
|
124
125
|
CardHeader.displayName = "CardHeader";
|
|
125
|
-
var CardTitle =
|
|
126
|
+
var CardTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
126
127
|
"div",
|
|
127
128
|
{
|
|
128
129
|
ref,
|
|
@@ -131,7 +132,7 @@ var CardTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
131
132
|
}
|
|
132
133
|
));
|
|
133
134
|
CardTitle.displayName = "CardTitle";
|
|
134
|
-
var CardDescription =
|
|
135
|
+
var CardDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
135
136
|
"div",
|
|
136
137
|
{
|
|
137
138
|
ref,
|
|
@@ -140,7 +141,7 @@ var CardDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
140
141
|
}
|
|
141
142
|
));
|
|
142
143
|
CardDescription.displayName = "CardDescription";
|
|
143
|
-
var CardContent =
|
|
144
|
+
var CardContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
144
145
|
"div",
|
|
145
146
|
{
|
|
146
147
|
ref,
|
|
@@ -149,7 +150,7 @@ var CardContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
149
150
|
}
|
|
150
151
|
));
|
|
151
152
|
CardContent.displayName = "CardContent";
|
|
152
|
-
var CardFooter =
|
|
153
|
+
var CardFooter = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
153
154
|
"div",
|
|
154
155
|
{
|
|
155
156
|
ref,
|
|
@@ -158,7 +159,7 @@ var CardFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
158
159
|
}
|
|
159
160
|
));
|
|
160
161
|
CardFooter.displayName = "CardFooter";
|
|
161
|
-
var Checkbox =
|
|
162
|
+
var Checkbox = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
162
163
|
CheckboxPrimitive.Root,
|
|
163
164
|
{
|
|
164
165
|
ref,
|
|
@@ -181,7 +182,7 @@ var Dialog = DialogPrimitive.Root;
|
|
|
181
182
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
182
183
|
var DialogPortal = DialogPrimitive.Portal;
|
|
183
184
|
var DialogClose = DialogPrimitive.Close;
|
|
184
|
-
var DialogOverlay =
|
|
185
|
+
var DialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
185
186
|
DialogPrimitive.Overlay,
|
|
186
187
|
{
|
|
187
188
|
ref,
|
|
@@ -193,7 +194,7 @@ var DialogOverlay = React9.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
193
194
|
}
|
|
194
195
|
));
|
|
195
196
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
196
|
-
var DialogContent =
|
|
197
|
+
var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
197
198
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
198
199
|
/* @__PURE__ */ jsxs(
|
|
199
200
|
DialogPrimitive.Content,
|
|
@@ -243,7 +244,7 @@ var DialogFooter = ({
|
|
|
243
244
|
}
|
|
244
245
|
);
|
|
245
246
|
DialogFooter.displayName = "DialogFooter";
|
|
246
|
-
var DialogTitle =
|
|
247
|
+
var DialogTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
247
248
|
DialogPrimitive.Title,
|
|
248
249
|
{
|
|
249
250
|
ref,
|
|
@@ -255,7 +256,7 @@ var DialogTitle = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
255
256
|
}
|
|
256
257
|
));
|
|
257
258
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
258
|
-
var DialogDescription =
|
|
259
|
+
var DialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
259
260
|
DialogPrimitive.Description,
|
|
260
261
|
{
|
|
261
262
|
ref,
|
|
@@ -270,7 +271,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
270
271
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
271
272
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
272
273
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
273
|
-
var DropdownMenuSubTrigger =
|
|
274
|
+
var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
274
275
|
DropdownMenuPrimitive.SubTrigger,
|
|
275
276
|
{
|
|
276
277
|
ref,
|
|
@@ -287,7 +288,7 @@ var DropdownMenuSubTrigger = React9.forwardRef(({ className, inset, children, ..
|
|
|
287
288
|
}
|
|
288
289
|
));
|
|
289
290
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
290
|
-
var DropdownMenuSubContent =
|
|
291
|
+
var DropdownMenuSubContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
291
292
|
DropdownMenuPrimitive.SubContent,
|
|
292
293
|
{
|
|
293
294
|
ref,
|
|
@@ -299,7 +300,7 @@ var DropdownMenuSubContent = React9.forwardRef(({ className, ...props }, ref) =>
|
|
|
299
300
|
}
|
|
300
301
|
));
|
|
301
302
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
302
|
-
var DropdownMenuContent =
|
|
303
|
+
var DropdownMenuContent = React7.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
303
304
|
DropdownMenuPrimitive.Content,
|
|
304
305
|
{
|
|
305
306
|
ref,
|
|
@@ -313,7 +314,7 @@ var DropdownMenuContent = React9.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
313
314
|
}
|
|
314
315
|
) }));
|
|
315
316
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
316
|
-
var DropdownMenuItem =
|
|
317
|
+
var DropdownMenuItem = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
317
318
|
DropdownMenuPrimitive.Item,
|
|
318
319
|
{
|
|
319
320
|
ref,
|
|
@@ -326,7 +327,7 @@ var DropdownMenuItem = React9.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
326
327
|
}
|
|
327
328
|
));
|
|
328
329
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
329
|
-
var DropdownMenuCheckboxItem =
|
|
330
|
+
var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
330
331
|
DropdownMenuPrimitive.CheckboxItem,
|
|
331
332
|
{
|
|
332
333
|
ref,
|
|
@@ -343,7 +344,7 @@ var DropdownMenuCheckboxItem = React9.forwardRef(({ className, children, checked
|
|
|
343
344
|
}
|
|
344
345
|
));
|
|
345
346
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
346
|
-
var DropdownMenuRadioItem =
|
|
347
|
+
var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
347
348
|
DropdownMenuPrimitive.RadioItem,
|
|
348
349
|
{
|
|
349
350
|
ref,
|
|
@@ -359,7 +360,7 @@ var DropdownMenuRadioItem = React9.forwardRef(({ className, children, ...props }
|
|
|
359
360
|
}
|
|
360
361
|
));
|
|
361
362
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
362
|
-
var DropdownMenuLabel =
|
|
363
|
+
var DropdownMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
363
364
|
DropdownMenuPrimitive.Label,
|
|
364
365
|
{
|
|
365
366
|
ref,
|
|
@@ -372,7 +373,7 @@ var DropdownMenuLabel = React9.forwardRef(({ className, inset, ...props }, ref)
|
|
|
372
373
|
}
|
|
373
374
|
));
|
|
374
375
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
375
|
-
var DropdownMenuSeparator =
|
|
376
|
+
var DropdownMenuSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
376
377
|
DropdownMenuPrimitive.Separator,
|
|
377
378
|
{
|
|
378
379
|
ref,
|
|
@@ -394,14 +395,218 @@ var DropdownMenuShortcut = ({
|
|
|
394
395
|
);
|
|
395
396
|
};
|
|
396
397
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
397
|
-
var
|
|
398
|
+
var labelVariants = cva(
|
|
399
|
+
"font-bricolage font-medium text-neutral-900 dark:text-neutral-100 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
400
|
+
{
|
|
401
|
+
variants: {
|
|
402
|
+
variant: {
|
|
403
|
+
default: "",
|
|
404
|
+
eyebrow: "uppercase tracking-[0.2em]"
|
|
405
|
+
},
|
|
406
|
+
size: {
|
|
407
|
+
xs: "text-[10px] leading-3",
|
|
408
|
+
sm: "text-xs leading-4",
|
|
409
|
+
base: "text-sm leading-5",
|
|
410
|
+
lg: "text-base leading-6",
|
|
411
|
+
xl: "text-lg leading-7"
|
|
412
|
+
},
|
|
413
|
+
weight: {
|
|
414
|
+
medium: "font-medium",
|
|
415
|
+
semibold: "font-semibold",
|
|
416
|
+
bold: "font-bold"
|
|
417
|
+
},
|
|
418
|
+
required: {
|
|
419
|
+
true: "after:content-['*'] after:ml-0.5 after:text-red-500",
|
|
420
|
+
false: ""
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
defaultVariants: {
|
|
424
|
+
variant: "default",
|
|
425
|
+
size: "base",
|
|
426
|
+
weight: "medium",
|
|
427
|
+
required: false
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
);
|
|
431
|
+
var Label2 = React7.forwardRef(({ className, variant, size, weight, required, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
432
|
+
LabelPrimitive.Root,
|
|
433
|
+
{
|
|
434
|
+
ref,
|
|
435
|
+
className: cn(labelVariants({ variant, size, weight, required, className })),
|
|
436
|
+
...props
|
|
437
|
+
}
|
|
438
|
+
));
|
|
439
|
+
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
440
|
+
var FormContext = React7.createContext(null);
|
|
441
|
+
function useFormContext() {
|
|
442
|
+
const context = React7.useContext(FormContext);
|
|
443
|
+
if (!context) {
|
|
444
|
+
throw new Error("useFormContext must be used within a Form component");
|
|
445
|
+
}
|
|
446
|
+
return context;
|
|
447
|
+
}
|
|
448
|
+
var FormFieldContext = React7.createContext(
|
|
449
|
+
null
|
|
450
|
+
);
|
|
451
|
+
function useFormFieldContext() {
|
|
452
|
+
const context = React7.useContext(FormFieldContext);
|
|
453
|
+
if (!context) {
|
|
454
|
+
throw new Error(
|
|
455
|
+
"useFormFieldContext must be used within a FormField component"
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
return context;
|
|
459
|
+
}
|
|
460
|
+
var Form = React7.forwardRef(
|
|
461
|
+
({ className, children, onFormSubmit, ...props }, ref) => {
|
|
462
|
+
const [errors, setErrors] = React7.useState({});
|
|
463
|
+
const [isSubmitting, setIsSubmitting] = React7.useState(false);
|
|
464
|
+
const setError = React7.useCallback(
|
|
465
|
+
(name, message) => {
|
|
466
|
+
setErrors((prev) => ({ ...prev, [name]: message }));
|
|
467
|
+
},
|
|
468
|
+
[]
|
|
469
|
+
);
|
|
470
|
+
const clearError = React7.useCallback((name) => {
|
|
471
|
+
setErrors((prev) => {
|
|
472
|
+
const next = { ...prev };
|
|
473
|
+
delete next[name];
|
|
474
|
+
return next;
|
|
475
|
+
});
|
|
476
|
+
}, []);
|
|
477
|
+
const clearAllErrors = React7.useCallback(() => {
|
|
478
|
+
setErrors({});
|
|
479
|
+
}, []);
|
|
480
|
+
const isValid = Object.keys(errors).length === 0;
|
|
481
|
+
const handleSubmit = async (e) => {
|
|
482
|
+
e.preventDefault();
|
|
483
|
+
if (onFormSubmit) {
|
|
484
|
+
setIsSubmitting(true);
|
|
485
|
+
try {
|
|
486
|
+
await onFormSubmit(e, {
|
|
487
|
+
setError: (name, message) => setError(name, message),
|
|
488
|
+
clearErrors: clearAllErrors,
|
|
489
|
+
setSubmitting: setIsSubmitting
|
|
490
|
+
});
|
|
491
|
+
} finally {
|
|
492
|
+
setIsSubmitting(false);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
const contextValue = React7.useMemo(
|
|
497
|
+
() => ({
|
|
498
|
+
errors,
|
|
499
|
+
setError,
|
|
500
|
+
clearError,
|
|
501
|
+
clearAllErrors,
|
|
502
|
+
isSubmitting,
|
|
503
|
+
isValid
|
|
504
|
+
}),
|
|
505
|
+
[errors, setError, clearError, clearAllErrors, isSubmitting, isValid]
|
|
506
|
+
);
|
|
507
|
+
return /* @__PURE__ */ jsx(FormContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
508
|
+
"form",
|
|
509
|
+
{
|
|
510
|
+
ref,
|
|
511
|
+
className: cn("space-y-6", className),
|
|
512
|
+
onSubmit: handleSubmit,
|
|
513
|
+
...props,
|
|
514
|
+
children
|
|
515
|
+
}
|
|
516
|
+
) });
|
|
517
|
+
}
|
|
518
|
+
);
|
|
519
|
+
Form.displayName = "Form";
|
|
520
|
+
var FormField = React7.forwardRef(
|
|
521
|
+
({ className, name, children, ...props }, ref) => {
|
|
522
|
+
const { errors } = useFormContext();
|
|
523
|
+
const id = React7.useId();
|
|
524
|
+
const error = errors[name];
|
|
525
|
+
const contextValue = React7.useMemo(
|
|
526
|
+
() => ({ name, error, id }),
|
|
527
|
+
[name, error, id]
|
|
528
|
+
);
|
|
529
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props, children }) });
|
|
530
|
+
}
|
|
531
|
+
);
|
|
532
|
+
FormField.displayName = "FormField";
|
|
533
|
+
var FormLabel = React7.forwardRef(({ className, ...props }, ref) => {
|
|
534
|
+
const { id, error } = useFormFieldContext();
|
|
535
|
+
return /* @__PURE__ */ jsx(
|
|
536
|
+
Label2,
|
|
537
|
+
{
|
|
538
|
+
ref,
|
|
539
|
+
htmlFor: id,
|
|
540
|
+
className: cn(error && "text-red-500 dark:text-red-400", className),
|
|
541
|
+
...props
|
|
542
|
+
}
|
|
543
|
+
);
|
|
544
|
+
});
|
|
545
|
+
FormLabel.displayName = "FormLabel";
|
|
546
|
+
var FormControl = React7.forwardRef(
|
|
547
|
+
({ children, ...props }, ref) => {
|
|
548
|
+
const { id, error, name } = useFormFieldContext();
|
|
549
|
+
const child = React7.cloneElement(children, {
|
|
550
|
+
id,
|
|
551
|
+
name,
|
|
552
|
+
"aria-invalid": !!error,
|
|
553
|
+
"aria-describedby": error ? `${id}-error` : void 0,
|
|
554
|
+
...children.props
|
|
555
|
+
});
|
|
556
|
+
return /* @__PURE__ */ jsx("div", { ref, ...props, children: child });
|
|
557
|
+
}
|
|
558
|
+
);
|
|
559
|
+
FormControl.displayName = "FormControl";
|
|
560
|
+
var FormDescription = React7.forwardRef(
|
|
561
|
+
({ className, ...props }, ref) => {
|
|
562
|
+
return /* @__PURE__ */ jsx(
|
|
563
|
+
"span",
|
|
564
|
+
{
|
|
565
|
+
ref,
|
|
566
|
+
className: cn(
|
|
567
|
+
"block text-sm text-neutral-500 dark:text-neutral-400",
|
|
568
|
+
className
|
|
569
|
+
),
|
|
570
|
+
...props
|
|
571
|
+
}
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
FormDescription.displayName = "FormDescription";
|
|
576
|
+
var FormMessage = React7.forwardRef(
|
|
577
|
+
({ className, children, error: errorProp, ...props }, ref) => {
|
|
578
|
+
const fieldContext = React7.useContext(FormFieldContext);
|
|
579
|
+
const error = errorProp ?? fieldContext?.error;
|
|
580
|
+
const id = fieldContext?.id;
|
|
581
|
+
if (!error && !children) {
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
584
|
+
return /* @__PURE__ */ jsx(
|
|
585
|
+
"p",
|
|
586
|
+
{
|
|
587
|
+
ref,
|
|
588
|
+
id: id ? `${id}-error` : void 0,
|
|
589
|
+
className: cn(
|
|
590
|
+
"text-sm font-medium",
|
|
591
|
+
error ? "text-red-500 dark:text-red-400" : "text-neutral-600 dark:text-neutral-400",
|
|
592
|
+
className
|
|
593
|
+
),
|
|
594
|
+
role: error ? "alert" : void 0,
|
|
595
|
+
...props,
|
|
596
|
+
children: error || children
|
|
597
|
+
}
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
);
|
|
601
|
+
FormMessage.displayName = "FormMessage";
|
|
602
|
+
var PopoverContext = React7.createContext({ open: false });
|
|
398
603
|
var Popover = ({
|
|
399
604
|
children,
|
|
400
605
|
open: controlledOpen,
|
|
401
606
|
onOpenChange,
|
|
402
607
|
...props
|
|
403
608
|
}) => {
|
|
404
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
609
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React7.useState(false);
|
|
405
610
|
const isControlled = controlledOpen !== void 0;
|
|
406
611
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
407
612
|
const handleOpenChange = (newOpen) => {
|
|
@@ -422,8 +627,8 @@ var Popover = ({
|
|
|
422
627
|
};
|
|
423
628
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
424
629
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
425
|
-
var PopoverContent =
|
|
426
|
-
const { open } =
|
|
630
|
+
var PopoverContent = React7.forwardRef(({ className, align = "center", sideOffset = 4, children, ...props }, ref) => {
|
|
631
|
+
const { open } = React7.useContext(PopoverContext);
|
|
427
632
|
const {
|
|
428
633
|
onOpenAutoFocus,
|
|
429
634
|
onCloseAutoFocus,
|
|
@@ -483,14 +688,14 @@ var PopoverContent = React9.forwardRef(({ className, align = "center", sideOffse
|
|
|
483
688
|
) }) });
|
|
484
689
|
});
|
|
485
690
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
486
|
-
var SelectContext =
|
|
691
|
+
var SelectContext = React7.createContext({ open: false });
|
|
487
692
|
var Select = ({
|
|
488
693
|
children,
|
|
489
694
|
open: controlledOpen,
|
|
490
695
|
onOpenChange,
|
|
491
696
|
...props
|
|
492
697
|
}) => {
|
|
493
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
698
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React7.useState(false);
|
|
494
699
|
const isControlled = controlledOpen !== void 0;
|
|
495
700
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
496
701
|
const handleOpenChange = (newOpen) => {
|
|
@@ -511,7 +716,7 @@ var Select = ({
|
|
|
511
716
|
};
|
|
512
717
|
var SelectGroup = SelectPrimitive.Group;
|
|
513
718
|
var SelectValue = SelectPrimitive.Value;
|
|
514
|
-
var SelectTrigger =
|
|
719
|
+
var SelectTrigger = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
515
720
|
SelectPrimitive.Trigger,
|
|
516
721
|
{
|
|
517
722
|
ref,
|
|
@@ -527,7 +732,7 @@ var SelectTrigger = React9.forwardRef(({ className, children, ...props }, ref) =
|
|
|
527
732
|
}
|
|
528
733
|
));
|
|
529
734
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
530
|
-
var SelectScrollUpButton =
|
|
735
|
+
var SelectScrollUpButton = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
531
736
|
SelectPrimitive.ScrollUpButton,
|
|
532
737
|
{
|
|
533
738
|
ref,
|
|
@@ -540,7 +745,7 @@ var SelectScrollUpButton = React9.forwardRef(({ className, ...props }, ref) => /
|
|
|
540
745
|
}
|
|
541
746
|
));
|
|
542
747
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
543
|
-
var SelectScrollDownButton =
|
|
748
|
+
var SelectScrollDownButton = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
544
749
|
SelectPrimitive.ScrollDownButton,
|
|
545
750
|
{
|
|
546
751
|
ref,
|
|
@@ -553,8 +758,8 @@ var SelectScrollDownButton = React9.forwardRef(({ className, ...props }, ref) =>
|
|
|
553
758
|
}
|
|
554
759
|
));
|
|
555
760
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
556
|
-
var SelectContent =
|
|
557
|
-
const { open } =
|
|
761
|
+
var SelectContent = React7.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
762
|
+
const { open } = React7.useContext(SelectContext);
|
|
558
763
|
const {
|
|
559
764
|
onCloseAutoFocus,
|
|
560
765
|
onEscapeKeyDown,
|
|
@@ -626,7 +831,7 @@ var SelectContent = React9.forwardRef(({ className, children, position = "popper
|
|
|
626
831
|
) }) });
|
|
627
832
|
});
|
|
628
833
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
629
|
-
var SelectLabel =
|
|
834
|
+
var SelectLabel = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
630
835
|
SelectPrimitive.Label,
|
|
631
836
|
{
|
|
632
837
|
ref,
|
|
@@ -635,7 +840,7 @@ var SelectLabel = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
635
840
|
}
|
|
636
841
|
));
|
|
637
842
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
638
|
-
var SelectItem =
|
|
843
|
+
var SelectItem = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
639
844
|
SelectPrimitive.Item,
|
|
640
845
|
{
|
|
641
846
|
ref,
|
|
@@ -651,7 +856,7 @@ var SelectItem = React9.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
651
856
|
}
|
|
652
857
|
));
|
|
653
858
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
654
|
-
var SelectSeparator =
|
|
859
|
+
var SelectSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
655
860
|
SelectPrimitive.Separator,
|
|
656
861
|
{
|
|
657
862
|
ref,
|
|
@@ -727,7 +932,7 @@ function SkeletonCard({ className }) {
|
|
|
727
932
|
}
|
|
728
933
|
);
|
|
729
934
|
}
|
|
730
|
-
var Table =
|
|
935
|
+
var Table = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
731
936
|
"table",
|
|
732
937
|
{
|
|
733
938
|
ref,
|
|
@@ -736,7 +941,7 @@ var Table = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
736
941
|
}
|
|
737
942
|
) }));
|
|
738
943
|
Table.displayName = "Table";
|
|
739
|
-
var TableHeader =
|
|
944
|
+
var TableHeader = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
740
945
|
"thead",
|
|
741
946
|
{
|
|
742
947
|
ref,
|
|
@@ -745,7 +950,7 @@ var TableHeader = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
745
950
|
}
|
|
746
951
|
));
|
|
747
952
|
TableHeader.displayName = "TableHeader";
|
|
748
|
-
var TableBody =
|
|
953
|
+
var TableBody = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
749
954
|
"tbody",
|
|
750
955
|
{
|
|
751
956
|
ref,
|
|
@@ -754,7 +959,7 @@ var TableBody = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
754
959
|
}
|
|
755
960
|
));
|
|
756
961
|
TableBody.displayName = "TableBody";
|
|
757
|
-
var TableFooter =
|
|
962
|
+
var TableFooter = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
758
963
|
"tfoot",
|
|
759
964
|
{
|
|
760
965
|
ref,
|
|
@@ -766,7 +971,7 @@ var TableFooter = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
766
971
|
}
|
|
767
972
|
));
|
|
768
973
|
TableFooter.displayName = "TableFooter";
|
|
769
|
-
var TableRow =
|
|
974
|
+
var TableRow = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
770
975
|
"tr",
|
|
771
976
|
{
|
|
772
977
|
ref,
|
|
@@ -778,7 +983,7 @@ var TableRow = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
778
983
|
}
|
|
779
984
|
));
|
|
780
985
|
TableRow.displayName = "TableRow";
|
|
781
|
-
var TableHead =
|
|
986
|
+
var TableHead = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
782
987
|
"th",
|
|
783
988
|
{
|
|
784
989
|
ref,
|
|
@@ -790,7 +995,7 @@ var TableHead = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
790
995
|
}
|
|
791
996
|
));
|
|
792
997
|
TableHead.displayName = "TableHead";
|
|
793
|
-
var TableCell =
|
|
998
|
+
var TableCell = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
794
999
|
"td",
|
|
795
1000
|
{
|
|
796
1001
|
ref,
|
|
@@ -799,7 +1004,7 @@ var TableCell = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
799
1004
|
}
|
|
800
1005
|
));
|
|
801
1006
|
TableCell.displayName = "TableCell";
|
|
802
|
-
var TableCaption =
|
|
1007
|
+
var TableCaption = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
803
1008
|
"caption",
|
|
804
1009
|
{
|
|
805
1010
|
ref,
|
|
@@ -808,31 +1013,31 @@ var TableCaption = React9.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
808
1013
|
}
|
|
809
1014
|
));
|
|
810
1015
|
TableCaption.displayName = "TableCaption";
|
|
811
|
-
var TabsContext =
|
|
1016
|
+
var TabsContext = React7.createContext(null);
|
|
812
1017
|
var useTabsContext = () => {
|
|
813
|
-
const context =
|
|
1018
|
+
const context = React7.useContext(TabsContext);
|
|
814
1019
|
if (!context) {
|
|
815
1020
|
throw new Error("Tabs components must be used within a Tabs provider");
|
|
816
1021
|
}
|
|
817
1022
|
return context;
|
|
818
1023
|
};
|
|
819
|
-
var Tabs =
|
|
820
|
-
const [activeTab, setActiveTabState] =
|
|
821
|
-
const tabRefs =
|
|
822
|
-
const listRef =
|
|
823
|
-
const setActiveTab =
|
|
1024
|
+
var Tabs = React7.forwardRef(({ defaultValue, value, onValueChange, children, ...props }, ref) => {
|
|
1025
|
+
const [activeTab, setActiveTabState] = React7.useState(value ?? defaultValue);
|
|
1026
|
+
const tabRefs = React7.useRef(/* @__PURE__ */ new Map()).current;
|
|
1027
|
+
const listRef = React7.useRef(null);
|
|
1028
|
+
const setActiveTab = React7.useCallback(
|
|
824
1029
|
(newValue) => {
|
|
825
1030
|
setActiveTabState(newValue);
|
|
826
1031
|
onValueChange?.(newValue);
|
|
827
1032
|
},
|
|
828
1033
|
[onValueChange]
|
|
829
1034
|
);
|
|
830
|
-
|
|
1035
|
+
React7.useEffect(() => {
|
|
831
1036
|
if (value !== void 0) {
|
|
832
1037
|
setActiveTabState(value);
|
|
833
1038
|
}
|
|
834
1039
|
}, [value]);
|
|
835
|
-
const registerTab =
|
|
1040
|
+
const registerTab = React7.useCallback(
|
|
836
1041
|
(tabValue, element) => {
|
|
837
1042
|
tabRefs.set(tabValue, element);
|
|
838
1043
|
},
|
|
@@ -857,10 +1062,10 @@ var Tabs = React9.forwardRef(({ defaultValue, value, onValueChange, children, ..
|
|
|
857
1062
|
);
|
|
858
1063
|
});
|
|
859
1064
|
Tabs.displayName = "Tabs";
|
|
860
|
-
var TabsList =
|
|
1065
|
+
var TabsList = React7.forwardRef(({ className, children, ...props }, ref) => {
|
|
861
1066
|
const { activeTab, tabRefs, listRef } = useTabsContext();
|
|
862
|
-
const [indicatorStyle, setIndicatorStyle] =
|
|
863
|
-
|
|
1067
|
+
const [indicatorStyle, setIndicatorStyle] = React7.useState(null);
|
|
1068
|
+
React7.useEffect(() => {
|
|
864
1069
|
const updateIndicator = () => {
|
|
865
1070
|
if (!activeTab || !listRef.current) return;
|
|
866
1071
|
const activeElement = tabRefs.get(activeTab);
|
|
@@ -912,10 +1117,10 @@ var TabsList = React9.forwardRef(({ className, children, ...props }, ref) => {
|
|
|
912
1117
|
);
|
|
913
1118
|
});
|
|
914
1119
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
915
|
-
var TabsTrigger =
|
|
1120
|
+
var TabsTrigger = React7.forwardRef(({ className, value, ...props }, ref) => {
|
|
916
1121
|
const { registerTab, activeTab } = useTabsContext();
|
|
917
|
-
const triggerRef =
|
|
918
|
-
|
|
1122
|
+
const triggerRef = React7.useRef(null);
|
|
1123
|
+
React7.useEffect(() => {
|
|
919
1124
|
registerTab(value, triggerRef.current);
|
|
920
1125
|
return () => registerTab(value, null);
|
|
921
1126
|
}, [value, registerTab]);
|
|
@@ -939,7 +1144,7 @@ var TabsTrigger = React9.forwardRef(({ className, value, ...props }, ref) => {
|
|
|
939
1144
|
);
|
|
940
1145
|
});
|
|
941
1146
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
942
|
-
var TabsContent =
|
|
1147
|
+
var TabsContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
943
1148
|
TabsPrimitive.Content,
|
|
944
1149
|
{
|
|
945
1150
|
ref,
|
|
@@ -951,7 +1156,7 @@ var TabsContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
951
1156
|
}
|
|
952
1157
|
));
|
|
953
1158
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
954
|
-
var Textarea =
|
|
1159
|
+
var Textarea = React7.forwardRef(
|
|
955
1160
|
({ className, ...props }, ref) => {
|
|
956
1161
|
return /* @__PURE__ */ jsx(
|
|
957
1162
|
"textarea",
|
|
@@ -967,7 +1172,202 @@ var Textarea = React9.forwardRef(
|
|
|
967
1172
|
}
|
|
968
1173
|
);
|
|
969
1174
|
Textarea.displayName = "Textarea";
|
|
1175
|
+
var headingVariants = cva(
|
|
1176
|
+
"font-bricolage tracking-tight text-neutral-900 dark:text-neutral-50",
|
|
1177
|
+
{
|
|
1178
|
+
variants: {
|
|
1179
|
+
level: {
|
|
1180
|
+
1: "text-4xl sm:text-5xl lg:text-6xl",
|
|
1181
|
+
2: "text-3xl sm:text-4xl lg:text-5xl",
|
|
1182
|
+
3: "text-2xl sm:text-3xl lg:text-4xl",
|
|
1183
|
+
4: "text-xl sm:text-2xl lg:text-3xl",
|
|
1184
|
+
5: "text-lg sm:text-xl lg:text-2xl",
|
|
1185
|
+
6: "text-base sm:text-lg lg:text-xl"
|
|
1186
|
+
},
|
|
1187
|
+
weight: {
|
|
1188
|
+
regular: "font-normal",
|
|
1189
|
+
medium: "font-medium",
|
|
1190
|
+
semibold: "font-semibold",
|
|
1191
|
+
bold: "font-bold"
|
|
1192
|
+
},
|
|
1193
|
+
align: {
|
|
1194
|
+
left: "text-left",
|
|
1195
|
+
center: "text-center",
|
|
1196
|
+
right: "text-right"
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
defaultVariants: {
|
|
1200
|
+
level: 1,
|
|
1201
|
+
weight: "bold",
|
|
1202
|
+
align: "left"
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
);
|
|
1206
|
+
var Heading = React7.forwardRef(
|
|
1207
|
+
({ className, level = 1, weight, align, as, children, ...props }, ref) => {
|
|
1208
|
+
const Tag = as || `h${level}`;
|
|
1209
|
+
return /* @__PURE__ */ jsx(
|
|
1210
|
+
Tag,
|
|
1211
|
+
{
|
|
1212
|
+
ref,
|
|
1213
|
+
className: cn(headingVariants({ level, weight, align, className })),
|
|
1214
|
+
...props,
|
|
1215
|
+
children
|
|
1216
|
+
}
|
|
1217
|
+
);
|
|
1218
|
+
}
|
|
1219
|
+
);
|
|
1220
|
+
Heading.displayName = "Heading";
|
|
1221
|
+
var textVariants = cva("font-bricolage text-neutral-700 dark:text-neutral-300", {
|
|
1222
|
+
variants: {
|
|
1223
|
+
size: {
|
|
1224
|
+
xs: "text-xs leading-4",
|
|
1225
|
+
sm: "text-sm leading-5",
|
|
1226
|
+
base: "text-base leading-6",
|
|
1227
|
+
lg: "text-lg leading-7",
|
|
1228
|
+
xl: "text-xl leading-8",
|
|
1229
|
+
"2xl": "text-2xl leading-9",
|
|
1230
|
+
"3xl": "text-3xl leading-10",
|
|
1231
|
+
"4xl": "text-4xl leading-[2.75rem]"
|
|
1232
|
+
},
|
|
1233
|
+
weight: {
|
|
1234
|
+
regular: "font-normal",
|
|
1235
|
+
medium: "font-medium",
|
|
1236
|
+
semibold: "font-semibold"
|
|
1237
|
+
},
|
|
1238
|
+
align: {
|
|
1239
|
+
left: "text-left",
|
|
1240
|
+
center: "text-center",
|
|
1241
|
+
right: "text-right",
|
|
1242
|
+
justify: "text-justify"
|
|
1243
|
+
},
|
|
1244
|
+
color: {
|
|
1245
|
+
default: "text-neutral-700 dark:text-neutral-300",
|
|
1246
|
+
muted: "text-neutral-500 dark:text-neutral-400",
|
|
1247
|
+
accent: "text-blue-600 dark:text-blue-400",
|
|
1248
|
+
success: "text-emerald-600 dark:text-emerald-400",
|
|
1249
|
+
warning: "text-amber-600 dark:text-amber-400",
|
|
1250
|
+
error: "text-red-600 dark:text-red-400"
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
defaultVariants: {
|
|
1254
|
+
size: "base",
|
|
1255
|
+
weight: "regular",
|
|
1256
|
+
align: "left",
|
|
1257
|
+
color: "default"
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
var Text = React7.forwardRef(
|
|
1261
|
+
({ className, size, weight, align, color, asChild = false, as = "p", children, ...props }, ref) => {
|
|
1262
|
+
const Comp = asChild ? Slot : as;
|
|
1263
|
+
return /* @__PURE__ */ jsx(
|
|
1264
|
+
Comp,
|
|
1265
|
+
{
|
|
1266
|
+
ref,
|
|
1267
|
+
className: cn(textVariants({ size, weight, align, color, className })),
|
|
1268
|
+
...props,
|
|
1269
|
+
children
|
|
1270
|
+
}
|
|
1271
|
+
);
|
|
1272
|
+
}
|
|
1273
|
+
);
|
|
1274
|
+
Text.displayName = "Text";
|
|
1275
|
+
var captionVariants = cva(
|
|
1276
|
+
"font-bricolage text-xs leading-4 text-neutral-500 dark:text-neutral-400",
|
|
1277
|
+
{
|
|
1278
|
+
variants: {
|
|
1279
|
+
weight: {
|
|
1280
|
+
regular: "font-normal",
|
|
1281
|
+
medium: "font-medium"
|
|
1282
|
+
},
|
|
1283
|
+
align: {
|
|
1284
|
+
left: "text-left",
|
|
1285
|
+
center: "text-center",
|
|
1286
|
+
right: "text-right"
|
|
1287
|
+
},
|
|
1288
|
+
color: {
|
|
1289
|
+
default: "text-neutral-500 dark:text-neutral-400",
|
|
1290
|
+
muted: "text-neutral-400 dark:text-neutral-500",
|
|
1291
|
+
accent: "text-blue-500 dark:text-blue-400",
|
|
1292
|
+
success: "text-emerald-500 dark:text-emerald-400",
|
|
1293
|
+
warning: "text-amber-500 dark:text-amber-400",
|
|
1294
|
+
error: "text-red-500 dark:text-red-400"
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
defaultVariants: {
|
|
1298
|
+
weight: "regular",
|
|
1299
|
+
align: "left",
|
|
1300
|
+
color: "default"
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
);
|
|
1304
|
+
var Caption = React7.forwardRef(
|
|
1305
|
+
({ className, weight, align, color, children, ...props }, ref) => {
|
|
1306
|
+
return /* @__PURE__ */ jsx(
|
|
1307
|
+
"span",
|
|
1308
|
+
{
|
|
1309
|
+
ref,
|
|
1310
|
+
className: cn(captionVariants({ weight, align, color, className })),
|
|
1311
|
+
...props,
|
|
1312
|
+
children
|
|
1313
|
+
}
|
|
1314
|
+
);
|
|
1315
|
+
}
|
|
1316
|
+
);
|
|
1317
|
+
Caption.displayName = "Caption";
|
|
1318
|
+
var codeVariants = cva("font-mono", {
|
|
1319
|
+
variants: {
|
|
1320
|
+
variant: {
|
|
1321
|
+
inline: "px-1.5 py-0.5 text-sm rounded-md bg-neutral-100 dark:bg-neutral-800 text-neutral-800 dark:text-neutral-200 border border-neutral-200 dark:border-neutral-700",
|
|
1322
|
+
block: "block p-4 text-sm rounded-lg bg-neutral-900 dark:bg-neutral-950 text-neutral-100 overflow-x-auto"
|
|
1323
|
+
},
|
|
1324
|
+
color: {
|
|
1325
|
+
default: "",
|
|
1326
|
+
accent: "bg-blue-50 dark:bg-blue-950/30 text-blue-700 dark:text-blue-300 border-blue-200 dark:border-blue-800",
|
|
1327
|
+
success: "bg-emerald-50 dark:bg-emerald-950/30 text-emerald-700 dark:text-emerald-300 border-emerald-200 dark:border-emerald-800",
|
|
1328
|
+
warning: "bg-amber-50 dark:bg-amber-950/30 text-amber-700 dark:text-amber-300 border-amber-200 dark:border-amber-800",
|
|
1329
|
+
error: "bg-red-50 dark:bg-red-950/30 text-red-700 dark:text-red-300 border-red-200 dark:border-red-800"
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
compoundVariants: [
|
|
1333
|
+
{
|
|
1334
|
+
variant: "block",
|
|
1335
|
+
color: ["accent", "success", "warning", "error"],
|
|
1336
|
+
className: "border"
|
|
1337
|
+
}
|
|
1338
|
+
],
|
|
1339
|
+
defaultVariants: {
|
|
1340
|
+
variant: "inline",
|
|
1341
|
+
color: "default"
|
|
1342
|
+
}
|
|
1343
|
+
});
|
|
1344
|
+
var Code = React7.forwardRef(
|
|
1345
|
+
({ className, variant, color, children, ...props }, ref) => {
|
|
1346
|
+
const isBlock = variant === "block";
|
|
1347
|
+
if (isBlock) {
|
|
1348
|
+
return /* @__PURE__ */ jsx(
|
|
1349
|
+
"pre",
|
|
1350
|
+
{
|
|
1351
|
+
ref,
|
|
1352
|
+
className: cn(codeVariants({ variant, color, className })),
|
|
1353
|
+
...props,
|
|
1354
|
+
children: /* @__PURE__ */ jsx("code", { children })
|
|
1355
|
+
}
|
|
1356
|
+
);
|
|
1357
|
+
}
|
|
1358
|
+
return /* @__PURE__ */ jsx(
|
|
1359
|
+
"code",
|
|
1360
|
+
{
|
|
1361
|
+
ref,
|
|
1362
|
+
className: cn(codeVariants({ variant, color, className })),
|
|
1363
|
+
...props,
|
|
1364
|
+
children
|
|
1365
|
+
}
|
|
1366
|
+
);
|
|
1367
|
+
}
|
|
1368
|
+
);
|
|
1369
|
+
Code.displayName = "Code";
|
|
970
1370
|
|
|
971
|
-
export { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SkeletonAvatar, SkeletonBadge, SkeletonButton, SkeletonCard, SkeletonIcon, SkeletonInput, SkeletonSubtitle, SkeletonTableRow, SkeletonTableRows, SkeletonText, SkeletonTitle, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, badgeVariants, buttonVariants };
|
|
972
|
-
//# sourceMappingURL=chunk-
|
|
973
|
-
//# sourceMappingURL=chunk-
|
|
1371
|
+
export { Badge, Button, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Code, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormLabel, FormMessage, Heading, Label2 as Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SkeletonAvatar, SkeletonBadge, SkeletonButton, SkeletonCard, SkeletonIcon, SkeletonInput, SkeletonSubtitle, SkeletonTableRow, SkeletonTableRows, SkeletonText, SkeletonTitle, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, Textarea, badgeVariants, buttonVariants, captionVariants, codeVariants, headingVariants, labelVariants, textVariants, useFormContext, useFormFieldContext };
|
|
1372
|
+
//# sourceMappingURL=chunk-HJPQ6TOR.mjs.map
|
|
1373
|
+
//# sourceMappingURL=chunk-HJPQ6TOR.mjs.map
|