@moontra/moonui 3.4.0 → 4.0.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/index.d.mts +17 -5
- package/dist/index.d.ts +17 -5
- package/dist/index.global.js +365 -52
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +407 -334
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +371 -299
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/__tests__/alert.test.tsx +5 -5
- package/src/components/ui/__tests__/avatar.test.tsx +12 -12
- package/src/components/ui/__tests__/badge.test.tsx +17 -1
- package/src/components/ui/__tests__/select.test.tsx +24 -2
- package/src/components/ui/__tests__/switch.test.tsx +36 -3
- package/src/components/ui/alert.tsx +5 -2
- package/src/components/ui/avatar.tsx +18 -6
- package/src/components/ui/badge.tsx +18 -11
- package/src/components/ui/index.ts +6 -0
- package/src/components/ui/select.tsx +59 -23
- package/src/components/ui/switch.tsx +108 -51
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var React11 = require('react');
|
|
6
6
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
7
7
|
var lucideReact = require('lucide-react');
|
|
8
8
|
var clsx = require('clsx');
|
|
@@ -52,7 +52,7 @@ function _interopNamespace(e) {
|
|
|
52
52
|
return Object.freeze(n);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var React11__namespace = /*#__PURE__*/_interopNamespace(React11);
|
|
56
56
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
57
57
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
58
58
|
var useEmblaCarousel__default = /*#__PURE__*/_interopDefault(useEmblaCarousel);
|
|
@@ -76,7 +76,7 @@ function cn(...inputs) {
|
|
|
76
76
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
77
77
|
}
|
|
78
78
|
var Accordion = AccordionPrimitive__namespace.Root;
|
|
79
|
-
var AccordionItem =
|
|
79
|
+
var AccordionItem = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
80
|
AccordionPrimitive__namespace.Item,
|
|
81
81
|
{
|
|
82
82
|
ref,
|
|
@@ -85,7 +85,7 @@ var AccordionItem = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
85
85
|
}
|
|
86
86
|
));
|
|
87
87
|
AccordionItem.displayName = "AccordionItem";
|
|
88
|
-
var AccordionTrigger =
|
|
88
|
+
var AccordionTrigger = React11__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
89
89
|
AccordionPrimitive__namespace.Trigger,
|
|
90
90
|
{
|
|
91
91
|
ref,
|
|
@@ -103,7 +103,7 @@ var AccordionTrigger = React10__namespace.forwardRef(({ className, children, ...
|
|
|
103
103
|
}
|
|
104
104
|
) }));
|
|
105
105
|
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
106
|
-
var AccordionContent =
|
|
106
|
+
var AccordionContent = React11__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
107
107
|
AccordionPrimitive__namespace.Content,
|
|
108
108
|
{
|
|
109
109
|
ref,
|
|
@@ -127,7 +127,10 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
127
127
|
success: "bg-success/10 text-success border-success/30",
|
|
128
128
|
warning: "bg-warning/10 text-warning border-warning/30",
|
|
129
129
|
error: "bg-destructive/10 text-destructive border-destructive/30",
|
|
130
|
-
info
|
|
130
|
+
// `--info` token'ı (tokens.css) blue-500 ile birebir aynı değeri
|
|
131
|
+
// taşır → görsel değişiklik yok, ancak varyant artık temaya ve
|
|
132
|
+
// karanlık moda duyarlı. Kardeş varyantlarla simetrik.
|
|
133
|
+
info: "bg-info/10 text-info border-info/30"
|
|
131
134
|
},
|
|
132
135
|
size: {
|
|
133
136
|
sm: "py-2 text-xs",
|
|
@@ -153,7 +156,7 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
153
156
|
}
|
|
154
157
|
}
|
|
155
158
|
);
|
|
156
|
-
var Alert =
|
|
159
|
+
var Alert = React11__namespace.forwardRef(
|
|
157
160
|
({
|
|
158
161
|
className,
|
|
159
162
|
variant = "default",
|
|
@@ -165,7 +168,7 @@ var Alert = React10__namespace.forwardRef(
|
|
|
165
168
|
children,
|
|
166
169
|
...props
|
|
167
170
|
}, ref) => {
|
|
168
|
-
const Icon2 =
|
|
171
|
+
const Icon2 = React11__namespace.useMemo(() => {
|
|
169
172
|
switch (variant) {
|
|
170
173
|
case "success":
|
|
171
174
|
return lucideReact.Check;
|
|
@@ -203,7 +206,7 @@ var Alert = React10__namespace.forwardRef(
|
|
|
203
206
|
{
|
|
204
207
|
onClick: onClose,
|
|
205
208
|
className: "absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100",
|
|
206
|
-
"aria-label": "
|
|
209
|
+
"aria-label": "Close alert",
|
|
207
210
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
208
211
|
}
|
|
209
212
|
)
|
|
@@ -213,7 +216,7 @@ var Alert = React10__namespace.forwardRef(
|
|
|
213
216
|
}
|
|
214
217
|
);
|
|
215
218
|
Alert.displayName = "Alert";
|
|
216
|
-
var AlertTitle =
|
|
219
|
+
var AlertTitle = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
217
220
|
"h5",
|
|
218
221
|
{
|
|
219
222
|
ref,
|
|
@@ -226,7 +229,7 @@ var AlertTitle = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
226
229
|
}
|
|
227
230
|
));
|
|
228
231
|
AlertTitle.displayName = "AlertTitle";
|
|
229
|
-
var AlertDescription =
|
|
232
|
+
var AlertDescription = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
230
233
|
"div",
|
|
231
234
|
{
|
|
232
235
|
ref,
|
|
@@ -262,7 +265,7 @@ var aspectRatioVariants = classVarianceAuthority.cva(
|
|
|
262
265
|
}
|
|
263
266
|
}
|
|
264
267
|
);
|
|
265
|
-
var AspectRatio =
|
|
268
|
+
var AspectRatio = React11__namespace.forwardRef(({ className, variant, radius, ratio = 16 / 9, style, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
266
269
|
"div",
|
|
267
270
|
{
|
|
268
271
|
ref,
|
|
@@ -311,7 +314,7 @@ var avatarVariants = classVarianceAuthority.cva(
|
|
|
311
314
|
}
|
|
312
315
|
}
|
|
313
316
|
);
|
|
314
|
-
var Avatar =
|
|
317
|
+
var Avatar = React11__namespace.forwardRef(({ className, size, radius, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
315
318
|
AvatarPrimitive__namespace.Root,
|
|
316
319
|
{
|
|
317
320
|
ref,
|
|
@@ -320,7 +323,7 @@ var Avatar = React10__namespace.forwardRef(({ className, size, radius, variant,
|
|
|
320
323
|
}
|
|
321
324
|
));
|
|
322
325
|
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
323
|
-
var AvatarImage =
|
|
326
|
+
var AvatarImage = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
324
327
|
AvatarPrimitive__namespace.Image,
|
|
325
328
|
{
|
|
326
329
|
ref,
|
|
@@ -329,7 +332,7 @@ var AvatarImage = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
329
332
|
}
|
|
330
333
|
));
|
|
331
334
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
332
|
-
var AvatarFallback =
|
|
335
|
+
var AvatarFallback = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
333
336
|
AvatarPrimitive__namespace.Fallback,
|
|
334
337
|
{
|
|
335
338
|
ref,
|
|
@@ -341,10 +344,11 @@ var AvatarFallback = React10__namespace.forwardRef(({ className, ...props }, ref
|
|
|
341
344
|
}
|
|
342
345
|
));
|
|
343
346
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
344
|
-
var AvatarGroup =
|
|
345
|
-
({ className,
|
|
346
|
-
const
|
|
347
|
-
const
|
|
347
|
+
var AvatarGroup = React11__namespace.forwardRef(
|
|
348
|
+
({ className, max, children, overlapOffset = -8, ...props }, ref) => {
|
|
349
|
+
const childrenArray = React11__namespace.Children.toArray(children);
|
|
350
|
+
const visibleAvatars = max ? childrenArray.slice(0, max) : childrenArray;
|
|
351
|
+
const remainingCount = max ? Math.max(0, childrenArray.length - max) : 0;
|
|
348
352
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
349
353
|
"div",
|
|
350
354
|
{
|
|
@@ -393,11 +397,15 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
393
397
|
{
|
|
394
398
|
variants: {
|
|
395
399
|
variant: {
|
|
400
|
+
// KIRICI (issue #261): önceden ham `gray-900`/`white` kullanılıyordu;
|
|
401
|
+
// aynı varyant pro pakette token'lıydı → free ve pro `primary` için
|
|
402
|
+
// farklı renk üretiyordu. Artık token'a bağlı (tema/karanlık moda duyarlı).
|
|
403
|
+
// `primary` VARSAYILAN varyant olduğu için görünür bir renk değişimidir.
|
|
396
404
|
primary: [
|
|
397
|
-
"border-transparent bg-
|
|
398
|
-
"hover:bg-
|
|
399
|
-
"focus-visible:ring-
|
|
400
|
-
"dark:bg-
|
|
405
|
+
"border-transparent bg-primary text-primary-foreground",
|
|
406
|
+
"hover:bg-primary/90",
|
|
407
|
+
"focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40",
|
|
408
|
+
"dark:bg-primary/90 dark:shadow-inner dark:shadow-primary/10"
|
|
401
409
|
],
|
|
402
410
|
secondary: [
|
|
403
411
|
"border-transparent bg-secondary text-secondary-foreground",
|
|
@@ -469,7 +477,7 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
469
477
|
}
|
|
470
478
|
}
|
|
471
479
|
);
|
|
472
|
-
|
|
480
|
+
var Badge = React11__namespace.forwardRef(({
|
|
473
481
|
className,
|
|
474
482
|
variant,
|
|
475
483
|
size,
|
|
@@ -483,7 +491,7 @@ function Badge({
|
|
|
483
491
|
noAutoSpacing,
|
|
484
492
|
children,
|
|
485
493
|
...props
|
|
486
|
-
}) {
|
|
494
|
+
}, ref) => {
|
|
487
495
|
let autoLeftIcon = leftIcon;
|
|
488
496
|
let autoChildren = children;
|
|
489
497
|
if (variant === "pro") {
|
|
@@ -501,6 +509,7 @@ function Badge({
|
|
|
501
509
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
502
510
|
"div",
|
|
503
511
|
{
|
|
512
|
+
ref,
|
|
504
513
|
className: cn(
|
|
505
514
|
"moonui-theme",
|
|
506
515
|
badgeVariants({ variant, size, radius }),
|
|
@@ -552,7 +561,8 @@ function Badge({
|
|
|
552
561
|
]
|
|
553
562
|
}
|
|
554
563
|
);
|
|
555
|
-
}
|
|
564
|
+
});
|
|
565
|
+
Badge.displayName = "Badge";
|
|
556
566
|
var breadcrumbVariants = classVarianceAuthority.cva(
|
|
557
567
|
"flex items-center gap-1.5 text-sm",
|
|
558
568
|
{
|
|
@@ -574,7 +584,7 @@ var breadcrumbVariants = classVarianceAuthority.cva(
|
|
|
574
584
|
}
|
|
575
585
|
}
|
|
576
586
|
);
|
|
577
|
-
var Breadcrumb =
|
|
587
|
+
var Breadcrumb = React11__namespace.forwardRef(
|
|
578
588
|
({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
579
589
|
"nav",
|
|
580
590
|
{
|
|
@@ -586,9 +596,9 @@ var Breadcrumb = React10__namespace.forwardRef(
|
|
|
586
596
|
)
|
|
587
597
|
);
|
|
588
598
|
Breadcrumb.displayName = "Breadcrumb";
|
|
589
|
-
var BreadcrumbList =
|
|
599
|
+
var BreadcrumbList = React11__namespace.forwardRef(
|
|
590
600
|
({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
|
|
591
|
-
const childrenArray =
|
|
601
|
+
const childrenArray = React11__namespace.Children.toArray(props.children).filter(Boolean);
|
|
592
602
|
const childCount = childrenArray.length;
|
|
593
603
|
if (collapsed && childCount > collapsedWidth) {
|
|
594
604
|
const firstItem = childrenArray[0];
|
|
@@ -624,9 +634,9 @@ var BreadcrumbList = React10__namespace.forwardRef(
|
|
|
624
634
|
}
|
|
625
635
|
);
|
|
626
636
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
627
|
-
var BreadcrumbItem =
|
|
637
|
+
var BreadcrumbItem = React11__namespace.forwardRef(
|
|
628
638
|
({ className, isCurrent, href, asChild = false, ...props }, ref) => {
|
|
629
|
-
const Comp = asChild ?
|
|
639
|
+
const Comp = asChild ? React11__namespace.Fragment : href ? "a" : "span";
|
|
630
640
|
const itemProps = asChild ? {} : href ? { href } : {};
|
|
631
641
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
632
642
|
"li",
|
|
@@ -683,7 +693,7 @@ var BreadcrumbEllipsis = ({
|
|
|
683
693
|
}
|
|
684
694
|
);
|
|
685
695
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
686
|
-
var BreadcrumbLink =
|
|
696
|
+
var BreadcrumbLink = React11__namespace.forwardRef(
|
|
687
697
|
({ className, href, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
688
698
|
"a",
|
|
689
699
|
{
|
|
@@ -698,7 +708,7 @@ var BreadcrumbLink = React10__namespace.forwardRef(
|
|
|
698
708
|
)
|
|
699
709
|
);
|
|
700
710
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
701
|
-
var BreadcrumbPage =
|
|
711
|
+
var BreadcrumbPage = React11__namespace.forwardRef(
|
|
702
712
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
703
713
|
"span",
|
|
704
714
|
{
|
|
@@ -861,7 +871,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
861
871
|
}
|
|
862
872
|
}
|
|
863
873
|
);
|
|
864
|
-
var Button =
|
|
874
|
+
var Button = React11__namespace.forwardRef(
|
|
865
875
|
({
|
|
866
876
|
className,
|
|
867
877
|
variant,
|
|
@@ -1075,7 +1085,7 @@ var cardVariants = classVarianceAuthority.cva(
|
|
|
1075
1085
|
}
|
|
1076
1086
|
}
|
|
1077
1087
|
);
|
|
1078
|
-
var Card =
|
|
1088
|
+
var Card = React11__namespace.forwardRef(
|
|
1079
1089
|
({ className, variant, size, radius, interactive, microInteraction = "lift", ...props }, ref) => {
|
|
1080
1090
|
if (interactive && microInteraction !== "none") {
|
|
1081
1091
|
const interactionProps = {
|
|
@@ -1103,7 +1113,7 @@ var Card = React10__namespace.forwardRef(
|
|
|
1103
1113
|
}
|
|
1104
1114
|
);
|
|
1105
1115
|
Card.displayName = "Card";
|
|
1106
|
-
var CardHeader =
|
|
1116
|
+
var CardHeader = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1107
1117
|
"div",
|
|
1108
1118
|
{
|
|
1109
1119
|
ref,
|
|
@@ -1112,7 +1122,7 @@ var CardHeader = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1112
1122
|
}
|
|
1113
1123
|
));
|
|
1114
1124
|
CardHeader.displayName = "CardHeader";
|
|
1115
|
-
var CardTitle =
|
|
1125
|
+
var CardTitle = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1116
1126
|
"h3",
|
|
1117
1127
|
{
|
|
1118
1128
|
ref,
|
|
@@ -1121,7 +1131,7 @@ var CardTitle = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1121
1131
|
}
|
|
1122
1132
|
));
|
|
1123
1133
|
CardTitle.displayName = "CardTitle";
|
|
1124
|
-
var CardDescription =
|
|
1134
|
+
var CardDescription = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1125
1135
|
"p",
|
|
1126
1136
|
{
|
|
1127
1137
|
ref,
|
|
@@ -1130,9 +1140,9 @@ var CardDescription = React10__namespace.forwardRef(({ className, ...props }, re
|
|
|
1130
1140
|
}
|
|
1131
1141
|
));
|
|
1132
1142
|
CardDescription.displayName = "CardDescription";
|
|
1133
|
-
var CardContent =
|
|
1143
|
+
var CardContent = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("moonui-theme", "p-6 pt-0", className), ...props }));
|
|
1134
1144
|
CardContent.displayName = "CardContent";
|
|
1135
|
-
var CardFooter =
|
|
1145
|
+
var CardFooter = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1136
1146
|
"div",
|
|
1137
1147
|
{
|
|
1138
1148
|
ref,
|
|
@@ -1153,7 +1163,7 @@ function Calendar({
|
|
|
1153
1163
|
defaultMonth,
|
|
1154
1164
|
...props
|
|
1155
1165
|
}) {
|
|
1156
|
-
const [currentMonth, setCurrentMonth] =
|
|
1166
|
+
const [currentMonth, setCurrentMonth] = React11__namespace.useState(
|
|
1157
1167
|
defaultMonth || selected && selected || /* @__PURE__ */ new Date()
|
|
1158
1168
|
);
|
|
1159
1169
|
const weekDays = [
|
|
@@ -1367,9 +1377,9 @@ var formatCardNumber = (value, cardType) => {
|
|
|
1367
1377
|
}
|
|
1368
1378
|
return formatted;
|
|
1369
1379
|
};
|
|
1370
|
-
var CardNumberInput =
|
|
1380
|
+
var CardNumberInput = React11__namespace.forwardRef(
|
|
1371
1381
|
({ className, value = "", onChange, showIcon = true, size, ...props }, ref) => {
|
|
1372
|
-
const [cardType, setCardType] =
|
|
1382
|
+
const [cardType, setCardType] = React11__namespace.useState("unknown");
|
|
1373
1383
|
const handleChange = (e) => {
|
|
1374
1384
|
const rawValue = e.target.value.replace(/\D/g, "");
|
|
1375
1385
|
const detectedType = getCardType(rawValue);
|
|
@@ -1400,7 +1410,7 @@ var CardNumberInput = React10__namespace.forwardRef(
|
|
|
1400
1410
|
}
|
|
1401
1411
|
);
|
|
1402
1412
|
CardNumberInput.displayName = "CardNumberInput";
|
|
1403
|
-
var CardExpiryInput =
|
|
1413
|
+
var CardExpiryInput = React11__namespace.forwardRef(
|
|
1404
1414
|
({ className, value = "", onChange, size, ...props }, ref) => {
|
|
1405
1415
|
const handleChange = (e) => {
|
|
1406
1416
|
let rawValue = e.target.value.replace(/\D/g, "");
|
|
@@ -1438,7 +1448,7 @@ var CardExpiryInput = React10__namespace.forwardRef(
|
|
|
1438
1448
|
}
|
|
1439
1449
|
);
|
|
1440
1450
|
CardExpiryInput.displayName = "CardExpiryInput";
|
|
1441
|
-
var CardCVCInput =
|
|
1451
|
+
var CardCVCInput = React11__namespace.forwardRef(
|
|
1442
1452
|
({ className, value = "", onChange, cardType = "unknown", size, ...props }, ref) => {
|
|
1443
1453
|
const maxLength = cardType === "amex" ? 4 : 3;
|
|
1444
1454
|
const handleChange = (e) => {
|
|
@@ -1463,7 +1473,7 @@ var CardCVCInput = React10__namespace.forwardRef(
|
|
|
1463
1473
|
}
|
|
1464
1474
|
);
|
|
1465
1475
|
CardCVCInput.displayName = "CardCVCInput";
|
|
1466
|
-
var CardZipInput =
|
|
1476
|
+
var CardZipInput = React11__namespace.forwardRef(
|
|
1467
1477
|
({ className, value = "", onChange, format: format4 = "US", size, ...props }, ref) => {
|
|
1468
1478
|
const handleChange = (e) => {
|
|
1469
1479
|
let rawValue = e.target.value;
|
|
@@ -1514,15 +1524,15 @@ var CardZipInput = React10__namespace.forwardRef(
|
|
|
1514
1524
|
}
|
|
1515
1525
|
);
|
|
1516
1526
|
CardZipInput.displayName = "CardZipInput";
|
|
1517
|
-
var CarouselContext =
|
|
1527
|
+
var CarouselContext = React11__namespace.createContext(null);
|
|
1518
1528
|
function useCarousel() {
|
|
1519
|
-
const context =
|
|
1529
|
+
const context = React11__namespace.useContext(CarouselContext);
|
|
1520
1530
|
if (!context) {
|
|
1521
1531
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1522
1532
|
}
|
|
1523
1533
|
return context;
|
|
1524
1534
|
}
|
|
1525
|
-
var Carousel =
|
|
1535
|
+
var Carousel = React11__namespace.forwardRef(
|
|
1526
1536
|
({
|
|
1527
1537
|
orientation = "horizontal",
|
|
1528
1538
|
opts,
|
|
@@ -1540,21 +1550,21 @@ var Carousel = React10__namespace.forwardRef(
|
|
|
1540
1550
|
},
|
|
1541
1551
|
plugins
|
|
1542
1552
|
);
|
|
1543
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1544
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1545
|
-
const onSelect =
|
|
1553
|
+
const [canScrollPrev, setCanScrollPrev] = React11__namespace.useState(false);
|
|
1554
|
+
const [canScrollNext, setCanScrollNext] = React11__namespace.useState(false);
|
|
1555
|
+
const onSelect = React11__namespace.useCallback((emblaApi) => {
|
|
1546
1556
|
if (!emblaApi)
|
|
1547
1557
|
return;
|
|
1548
1558
|
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
1549
1559
|
setCanScrollNext(emblaApi.canScrollNext());
|
|
1550
1560
|
}, []);
|
|
1551
|
-
const scrollPrev =
|
|
1561
|
+
const scrollPrev = React11__namespace.useCallback(() => {
|
|
1552
1562
|
api?.scrollPrev();
|
|
1553
1563
|
}, [api]);
|
|
1554
|
-
const scrollNext =
|
|
1564
|
+
const scrollNext = React11__namespace.useCallback(() => {
|
|
1555
1565
|
api?.scrollNext();
|
|
1556
1566
|
}, [api]);
|
|
1557
|
-
const handleKeyDown =
|
|
1567
|
+
const handleKeyDown = React11__namespace.useCallback(
|
|
1558
1568
|
(event) => {
|
|
1559
1569
|
const prevKey = resolvedOrientation === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
1560
1570
|
const nextKey = resolvedOrientation === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
@@ -1568,12 +1578,12 @@ var Carousel = React10__namespace.forwardRef(
|
|
|
1568
1578
|
},
|
|
1569
1579
|
[resolvedOrientation, scrollPrev, scrollNext]
|
|
1570
1580
|
);
|
|
1571
|
-
|
|
1581
|
+
React11__namespace.useEffect(() => {
|
|
1572
1582
|
if (!api || !setApi)
|
|
1573
1583
|
return;
|
|
1574
1584
|
setApi(api);
|
|
1575
1585
|
}, [api, setApi]);
|
|
1576
|
-
|
|
1586
|
+
React11__namespace.useEffect(() => {
|
|
1577
1587
|
if (!api)
|
|
1578
1588
|
return;
|
|
1579
1589
|
onSelect(api);
|
|
@@ -1625,7 +1635,7 @@ var carouselContentVariants = classVarianceAuthority.cva("flex", {
|
|
|
1625
1635
|
orientation: "horizontal"
|
|
1626
1636
|
}
|
|
1627
1637
|
});
|
|
1628
|
-
var CarouselContent =
|
|
1638
|
+
var CarouselContent = React11__namespace.forwardRef(
|
|
1629
1639
|
({ className, ...props }, ref) => {
|
|
1630
1640
|
const { carouselRef, orientation } = useCarousel();
|
|
1631
1641
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1650,7 +1660,7 @@ var carouselItemVariants = classVarianceAuthority.cva("min-w-0 shrink-0 grow-0 b
|
|
|
1650
1660
|
orientation: "horizontal"
|
|
1651
1661
|
}
|
|
1652
1662
|
});
|
|
1653
|
-
var CarouselItem =
|
|
1663
|
+
var CarouselItem = React11__namespace.forwardRef(
|
|
1654
1664
|
({ className, ...props }, ref) => {
|
|
1655
1665
|
const { orientation } = useCarousel();
|
|
1656
1666
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1666,7 +1676,7 @@ var CarouselItem = React10__namespace.forwardRef(
|
|
|
1666
1676
|
}
|
|
1667
1677
|
);
|
|
1668
1678
|
CarouselItem.displayName = "CarouselItem";
|
|
1669
|
-
var CarouselPrevious =
|
|
1679
|
+
var CarouselPrevious = React11__namespace.forwardRef(({ className, variant = "outline", size = "icon-sm", ...props }, ref) => {
|
|
1670
1680
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1671
1681
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1672
1682
|
Button,
|
|
@@ -1691,7 +1701,7 @@ var CarouselPrevious = React10__namespace.forwardRef(({ className, variant = "ou
|
|
|
1691
1701
|
);
|
|
1692
1702
|
});
|
|
1693
1703
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1694
|
-
var CarouselNext =
|
|
1704
|
+
var CarouselNext = React11__namespace.forwardRef(({ className, variant = "outline", size = "icon-sm", ...props }, ref) => {
|
|
1695
1705
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1696
1706
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1697
1707
|
Button,
|
|
@@ -1754,7 +1764,7 @@ var checkboxVariants = classVarianceAuthority.cva(
|
|
|
1754
1764
|
}
|
|
1755
1765
|
}
|
|
1756
1766
|
);
|
|
1757
|
-
var Checkbox =
|
|
1767
|
+
var Checkbox = React11__namespace.forwardRef(({
|
|
1758
1768
|
className,
|
|
1759
1769
|
variant,
|
|
1760
1770
|
size,
|
|
@@ -1787,7 +1797,7 @@ var Checkbox = React10__namespace.forwardRef(({
|
|
|
1787
1797
|
);
|
|
1788
1798
|
});
|
|
1789
1799
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
1790
|
-
var CheckboxGroup =
|
|
1800
|
+
var CheckboxGroup = React11__namespace.forwardRef(
|
|
1791
1801
|
({ className, orientation = "vertical", spacing = "1rem", children, ...props }, ref) => {
|
|
1792
1802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1793
1803
|
"div",
|
|
@@ -1807,7 +1817,7 @@ var CheckboxGroup = React10__namespace.forwardRef(
|
|
|
1807
1817
|
}
|
|
1808
1818
|
);
|
|
1809
1819
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
1810
|
-
var CheckboxLabel =
|
|
1820
|
+
var CheckboxLabel = React11__namespace.forwardRef(
|
|
1811
1821
|
({ className, htmlFor, children, position = "end", disabled = false, ...props }, ref) => {
|
|
1812
1822
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1813
1823
|
"label",
|
|
@@ -1827,14 +1837,14 @@ var CheckboxLabel = React10__namespace.forwardRef(
|
|
|
1827
1837
|
}
|
|
1828
1838
|
);
|
|
1829
1839
|
CheckboxLabel.displayName = "CheckboxLabel";
|
|
1830
|
-
var CheckboxWithLabel =
|
|
1840
|
+
var CheckboxWithLabel = React11__namespace.forwardRef(({
|
|
1831
1841
|
id,
|
|
1832
1842
|
label,
|
|
1833
1843
|
labelPosition = "end",
|
|
1834
1844
|
labelClassName,
|
|
1835
1845
|
...checkboxProps
|
|
1836
1846
|
}, ref) => {
|
|
1837
|
-
const generatedId =
|
|
1847
|
+
const generatedId = React11__namespace.useId();
|
|
1838
1848
|
const checkboxId = id || generatedId;
|
|
1839
1849
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
1840
1850
|
labelPosition === "start" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1884,7 +1894,7 @@ var collapsibleTriggerVariants = classVarianceAuthority.cva(
|
|
|
1884
1894
|
}
|
|
1885
1895
|
}
|
|
1886
1896
|
);
|
|
1887
|
-
var CollapsibleTrigger =
|
|
1897
|
+
var CollapsibleTrigger = React11__namespace.forwardRef(({ className, children, variant, size, asChild, ...props }, ref) => {
|
|
1888
1898
|
if (asChild) {
|
|
1889
1899
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1890
1900
|
CollapsiblePrimitive__namespace.Trigger,
|
|
@@ -1933,7 +1943,7 @@ var collapsibleContentVariants = classVarianceAuthority.cva(
|
|
|
1933
1943
|
}
|
|
1934
1944
|
}
|
|
1935
1945
|
);
|
|
1936
|
-
var CollapsibleContent =
|
|
1946
|
+
var CollapsibleContent = React11__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1937
1947
|
CollapsiblePrimitive__namespace.Content,
|
|
1938
1948
|
{
|
|
1939
1949
|
ref,
|
|
@@ -2016,7 +2026,7 @@ var inputVariants = classVarianceAuthority.cva(
|
|
|
2016
2026
|
}
|
|
2017
2027
|
}
|
|
2018
2028
|
);
|
|
2019
|
-
var Input =
|
|
2029
|
+
var Input = React11__namespace.forwardRef(
|
|
2020
2030
|
({
|
|
2021
2031
|
className,
|
|
2022
2032
|
wrapperClassName,
|
|
@@ -2043,8 +2053,8 @@ var Input = React10__namespace.forwardRef(
|
|
|
2043
2053
|
placeholder,
|
|
2044
2054
|
...props
|
|
2045
2055
|
}, ref) => {
|
|
2046
|
-
const [isFocused, setIsFocused] =
|
|
2047
|
-
const [internalValue, setInternalValue] =
|
|
2056
|
+
const [isFocused, setIsFocused] = React11__namespace.useState(false);
|
|
2057
|
+
const [internalValue, setInternalValue] = React11__namespace.useState(value || defaultValue || "");
|
|
2048
2058
|
const hasValue = internalValue !== "" && internalValue !== null && internalValue !== void 0;
|
|
2049
2059
|
const isLabelActive = isFocused || hasValue;
|
|
2050
2060
|
const handleFocus = (e) => {
|
|
@@ -2059,7 +2069,7 @@ var Input = React10__namespace.forwardRef(
|
|
|
2059
2069
|
setInternalValue(e.target.value);
|
|
2060
2070
|
onChange?.(e);
|
|
2061
2071
|
};
|
|
2062
|
-
|
|
2072
|
+
React11__namespace.useEffect(() => {
|
|
2063
2073
|
if (value !== void 0) {
|
|
2064
2074
|
setInternalValue(value);
|
|
2065
2075
|
}
|
|
@@ -2143,7 +2153,7 @@ Input.displayName = "Input";
|
|
|
2143
2153
|
var labelVariants = classVarianceAuthority.cva(
|
|
2144
2154
|
"text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"
|
|
2145
2155
|
);
|
|
2146
|
-
var Label =
|
|
2156
|
+
var Label = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2147
2157
|
LabelPrimitive__namespace.Root,
|
|
2148
2158
|
{
|
|
2149
2159
|
ref,
|
|
@@ -2204,7 +2214,7 @@ var popoverContentVariants = classVarianceAuthority.cva(
|
|
|
2204
2214
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
2205
2215
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
2206
2216
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
2207
|
-
var PopoverContent =
|
|
2217
|
+
var PopoverContent = React11__namespace.forwardRef(({
|
|
2208
2218
|
className,
|
|
2209
2219
|
variant,
|
|
2210
2220
|
size,
|
|
@@ -2272,7 +2282,7 @@ var PopoverFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
2272
2282
|
}
|
|
2273
2283
|
);
|
|
2274
2284
|
PopoverFooter.displayName = "PopoverFooter";
|
|
2275
|
-
var Tabs =
|
|
2285
|
+
var Tabs = React11__namespace.forwardRef(({ vertical = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2276
2286
|
TabsPrimitive__namespace.Root,
|
|
2277
2287
|
{
|
|
2278
2288
|
ref,
|
|
@@ -2313,7 +2323,7 @@ var tabsListVariants = classVarianceAuthority.cva(
|
|
|
2313
2323
|
}
|
|
2314
2324
|
}
|
|
2315
2325
|
);
|
|
2316
|
-
var TabsList =
|
|
2326
|
+
var TabsList = React11__namespace.forwardRef(({ className, variant, orientation, fullWidth, scrollable, ...props }, ref) => {
|
|
2317
2327
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2318
2328
|
TabsPrimitive__namespace.List,
|
|
2319
2329
|
{
|
|
@@ -2356,7 +2366,7 @@ var tabsTriggerVariants = classVarianceAuthority.cva(
|
|
|
2356
2366
|
}
|
|
2357
2367
|
}
|
|
2358
2368
|
);
|
|
2359
|
-
var TabsTrigger =
|
|
2369
|
+
var TabsTrigger = React11__namespace.forwardRef(({
|
|
2360
2370
|
className,
|
|
2361
2371
|
variant,
|
|
2362
2372
|
size,
|
|
@@ -2388,7 +2398,7 @@ var TabsTrigger = React10__namespace.forwardRef(({
|
|
|
2388
2398
|
}
|
|
2389
2399
|
));
|
|
2390
2400
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
2391
|
-
var TabsContent =
|
|
2401
|
+
var TabsContent = React11__namespace.forwardRef(({ className, animated = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2392
2402
|
TabsPrimitive__namespace.Content,
|
|
2393
2403
|
{
|
|
2394
2404
|
ref,
|
|
@@ -2482,7 +2492,7 @@ var sliderThumbVariants = classVarianceAuthority.cva(
|
|
|
2482
2492
|
}
|
|
2483
2493
|
}
|
|
2484
2494
|
);
|
|
2485
|
-
var Slider =
|
|
2495
|
+
var Slider = React11__namespace.forwardRef(({
|
|
2486
2496
|
className,
|
|
2487
2497
|
size,
|
|
2488
2498
|
trackVariant,
|
|
@@ -2498,10 +2508,10 @@ var Slider = React10__namespace.forwardRef(({
|
|
|
2498
2508
|
disabled,
|
|
2499
2509
|
...props
|
|
2500
2510
|
}, ref) => {
|
|
2501
|
-
const [sliderValue, setSliderValue] =
|
|
2511
|
+
const [sliderValue, setSliderValue] = React11__namespace.useState(
|
|
2502
2512
|
value || defaultValue || [0]
|
|
2503
2513
|
);
|
|
2504
|
-
|
|
2514
|
+
React11__namespace.useEffect(() => {
|
|
2505
2515
|
if (value !== void 0) {
|
|
2506
2516
|
setSliderValue(value);
|
|
2507
2517
|
}
|
|
@@ -2516,7 +2526,7 @@ var Slider = React10__namespace.forwardRef(({
|
|
|
2516
2526
|
const calculateThumbPercent = (value2, min2, max2) => {
|
|
2517
2527
|
return (value2 - min2) / (max2 - min2) * 100;
|
|
2518
2528
|
};
|
|
2519
|
-
const trackRef =
|
|
2529
|
+
const trackRef = React11__namespace.useRef(null);
|
|
2520
2530
|
const min = props.min || 0;
|
|
2521
2531
|
const max = props.max || 100;
|
|
2522
2532
|
const step = props.step || 1;
|
|
@@ -2828,14 +2838,14 @@ function ColorPicker({
|
|
|
2828
2838
|
disabled,
|
|
2829
2839
|
...props
|
|
2830
2840
|
}) {
|
|
2831
|
-
const [open, setOpen] =
|
|
2832
|
-
const [color, setColor] =
|
|
2833
|
-
const [opacity, setOpacity] =
|
|
2834
|
-
const [copied, setCopied] =
|
|
2835
|
-
const [inputValue, setInputValue] =
|
|
2836
|
-
const hsl =
|
|
2837
|
-
const rgb =
|
|
2838
|
-
|
|
2841
|
+
const [open, setOpen] = React11__namespace.useState(false);
|
|
2842
|
+
const [color, setColor] = React11__namespace.useState(value);
|
|
2843
|
+
const [opacity, setOpacity] = React11__namespace.useState(100);
|
|
2844
|
+
const [copied, setCopied] = React11__namespace.useState(false);
|
|
2845
|
+
const [inputValue, setInputValue] = React11__namespace.useState(value);
|
|
2846
|
+
const hsl = React11__namespace.useMemo(() => hexToHsl(color) || { h: 0, s: 0, l: 0 }, [color]);
|
|
2847
|
+
const rgb = React11__namespace.useMemo(() => hexToRgb(color) || { r: 0, g: 0, b: 0 }, [color]);
|
|
2848
|
+
React11__namespace.useEffect(() => {
|
|
2839
2849
|
setColor(value);
|
|
2840
2850
|
setInputValue(value);
|
|
2841
2851
|
}, [value]);
|
|
@@ -3230,7 +3240,7 @@ function GradientPicker({
|
|
|
3230
3240
|
onChange,
|
|
3231
3241
|
className
|
|
3232
3242
|
}) {
|
|
3233
|
-
const [gradient, setGradient] =
|
|
3243
|
+
const [gradient, setGradient] = React11__namespace.useState(value);
|
|
3234
3244
|
const handleChange = (field, newValue) => {
|
|
3235
3245
|
const newGradient = { ...gradient, [field]: newValue };
|
|
3236
3246
|
setGradient(newGradient);
|
|
@@ -3316,7 +3326,7 @@ var overlayVariants = classVarianceAuthority.cva(
|
|
|
3316
3326
|
}
|
|
3317
3327
|
}
|
|
3318
3328
|
);
|
|
3319
|
-
var DialogOverlay =
|
|
3329
|
+
var DialogOverlay = React11__namespace.forwardRef(({ className, variant, animation, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3320
3330
|
DialogPrimitive__namespace.Overlay,
|
|
3321
3331
|
{
|
|
3322
3332
|
ref,
|
|
@@ -3375,7 +3385,7 @@ var dialogContentVariants = classVarianceAuthority.cva(
|
|
|
3375
3385
|
}
|
|
3376
3386
|
}
|
|
3377
3387
|
);
|
|
3378
|
-
var DialogContent =
|
|
3388
|
+
var DialogContent = React11__namespace.forwardRef(
|
|
3379
3389
|
({
|
|
3380
3390
|
className,
|
|
3381
3391
|
children,
|
|
@@ -3488,7 +3498,7 @@ var DialogFooter = ({
|
|
|
3488
3498
|
}
|
|
3489
3499
|
);
|
|
3490
3500
|
DialogFooter.displayName = "DialogFooter";
|
|
3491
|
-
var DialogTitle =
|
|
3501
|
+
var DialogTitle = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3492
3502
|
DialogPrimitive__namespace.Title,
|
|
3493
3503
|
{
|
|
3494
3504
|
ref,
|
|
@@ -3500,7 +3510,7 @@ var DialogTitle = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3500
3510
|
}
|
|
3501
3511
|
));
|
|
3502
3512
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
3503
|
-
var DialogDescription =
|
|
3513
|
+
var DialogDescription = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3504
3514
|
DialogPrimitive__namespace.Description,
|
|
3505
3515
|
{
|
|
3506
3516
|
ref,
|
|
@@ -3512,7 +3522,7 @@ var DialogDescription = React10__namespace.forwardRef(({ className, ...props },
|
|
|
3512
3522
|
}
|
|
3513
3523
|
));
|
|
3514
3524
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
3515
|
-
var DialogForm =
|
|
3525
|
+
var DialogForm = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3516
3526
|
"form",
|
|
3517
3527
|
{
|
|
3518
3528
|
ref,
|
|
@@ -3542,7 +3552,7 @@ var commandVariants = classVarianceAuthority.cva(
|
|
|
3542
3552
|
}
|
|
3543
3553
|
}
|
|
3544
3554
|
);
|
|
3545
|
-
var Command =
|
|
3555
|
+
var Command = React11__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3546
3556
|
cmdk.Command,
|
|
3547
3557
|
{
|
|
3548
3558
|
ref,
|
|
@@ -3564,7 +3574,7 @@ var CommandDialog = ({
|
|
|
3564
3574
|
), children })
|
|
3565
3575
|
] }) });
|
|
3566
3576
|
};
|
|
3567
|
-
var CommandInput =
|
|
3577
|
+
var CommandInput = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
3568
3578
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
3569
3579
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3570
3580
|
cmdk.Command.Input,
|
|
@@ -3579,7 +3589,7 @@ var CommandInput = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3579
3589
|
)
|
|
3580
3590
|
] }));
|
|
3581
3591
|
CommandInput.displayName = cmdk.Command.Input.displayName;
|
|
3582
|
-
var CommandList =
|
|
3592
|
+
var CommandList = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3583
3593
|
cmdk.Command.List,
|
|
3584
3594
|
{
|
|
3585
3595
|
ref,
|
|
@@ -3588,7 +3598,7 @@ var CommandList = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3588
3598
|
}
|
|
3589
3599
|
));
|
|
3590
3600
|
CommandList.displayName = cmdk.Command.List.displayName;
|
|
3591
|
-
var CommandEmpty =
|
|
3601
|
+
var CommandEmpty = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3592
3602
|
cmdk.Command.Empty,
|
|
3593
3603
|
{
|
|
3594
3604
|
ref,
|
|
@@ -3597,7 +3607,7 @@ var CommandEmpty = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3597
3607
|
}
|
|
3598
3608
|
));
|
|
3599
3609
|
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
|
|
3600
|
-
var CommandGroup =
|
|
3610
|
+
var CommandGroup = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3601
3611
|
cmdk.Command.Group,
|
|
3602
3612
|
{
|
|
3603
3613
|
ref,
|
|
@@ -3609,7 +3619,7 @@ var CommandGroup = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3609
3619
|
}
|
|
3610
3620
|
));
|
|
3611
3621
|
CommandGroup.displayName = cmdk.Command.Group.displayName;
|
|
3612
|
-
var CommandSeparator =
|
|
3622
|
+
var CommandSeparator = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3613
3623
|
cmdk.Command.Separator,
|
|
3614
3624
|
{
|
|
3615
3625
|
ref,
|
|
@@ -3618,7 +3628,7 @@ var CommandSeparator = React10__namespace.forwardRef(({ className, ...props }, r
|
|
|
3618
3628
|
}
|
|
3619
3629
|
));
|
|
3620
3630
|
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
|
|
3621
|
-
var CommandItem =
|
|
3631
|
+
var CommandItem = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3622
3632
|
cmdk.Command.Item,
|
|
3623
3633
|
{
|
|
3624
3634
|
ref,
|
|
@@ -3669,7 +3679,7 @@ var tableVariants = classVarianceAuthority.cva(
|
|
|
3669
3679
|
}
|
|
3670
3680
|
}
|
|
3671
3681
|
);
|
|
3672
|
-
var Table =
|
|
3682
|
+
var Table = React11__namespace.forwardRef(({
|
|
3673
3683
|
className,
|
|
3674
3684
|
variant,
|
|
3675
3685
|
size,
|
|
@@ -3686,11 +3696,11 @@ var Table = React10__namespace.forwardRef(({
|
|
|
3686
3696
|
...props
|
|
3687
3697
|
}, ref) => {
|
|
3688
3698
|
const striped = variant === "striped";
|
|
3689
|
-
const childrenWithProps =
|
|
3690
|
-
if (
|
|
3699
|
+
const childrenWithProps = React11__namespace.Children.map(props.children, (child) => {
|
|
3700
|
+
if (React11__namespace.isValidElement(child)) {
|
|
3691
3701
|
if (child.type === "tbody") {
|
|
3692
3702
|
const tbodyProps = child.props;
|
|
3693
|
-
return
|
|
3703
|
+
return React11__namespace.cloneElement(child, {
|
|
3694
3704
|
className: cn(tbodyProps.className, striped && "even:[&>tr]:bg-muted/50")
|
|
3695
3705
|
});
|
|
3696
3706
|
}
|
|
@@ -3715,10 +3725,10 @@ var Table = React10__namespace.forwardRef(({
|
|
|
3715
3725
|
] });
|
|
3716
3726
|
});
|
|
3717
3727
|
Table.displayName = "Table";
|
|
3718
|
-
var TableHeader =
|
|
3728
|
+
var TableHeader = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("moonui-theme", "[&_tr]:border-b", className), ...props }));
|
|
3719
3729
|
TableHeader.displayName = "TableHeader";
|
|
3720
|
-
var TableBody =
|
|
3721
|
-
const hasChildren =
|
|
3730
|
+
var TableBody = React11__namespace.forwardRef(({ className, emptyContent, emptyMessage = "No data available", children, ...props }, ref) => {
|
|
3731
|
+
const hasChildren = React11__namespace.Children.count(children) > 0;
|
|
3722
3732
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3723
3733
|
"tbody",
|
|
3724
3734
|
{
|
|
@@ -3730,7 +3740,7 @@ var TableBody = React10__namespace.forwardRef(({ className, emptyContent, emptyM
|
|
|
3730
3740
|
);
|
|
3731
3741
|
});
|
|
3732
3742
|
TableBody.displayName = "TableBody";
|
|
3733
|
-
var TableFooter =
|
|
3743
|
+
var TableFooter = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3734
3744
|
"tfoot",
|
|
3735
3745
|
{
|
|
3736
3746
|
ref,
|
|
@@ -3739,7 +3749,7 @@ var TableFooter = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3739
3749
|
}
|
|
3740
3750
|
));
|
|
3741
3751
|
TableFooter.displayName = "TableFooter";
|
|
3742
|
-
var TableRow =
|
|
3752
|
+
var TableRow = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3743
3753
|
"tr",
|
|
3744
3754
|
{
|
|
3745
3755
|
ref,
|
|
@@ -3751,7 +3761,7 @@ var TableRow = React10__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
3751
3761
|
}
|
|
3752
3762
|
));
|
|
3753
3763
|
TableRow.displayName = "TableRow";
|
|
3754
|
-
var TableHead =
|
|
3764
|
+
var TableHead = React11__namespace.forwardRef(
|
|
3755
3765
|
({ className, sortable, sorted, onSort, align = "left", children, ...props }, ref) => {
|
|
3756
3766
|
const renderSortIcon = () => {
|
|
3757
3767
|
if (!sortable)
|
|
@@ -3839,7 +3849,7 @@ var TableHead = React10__namespace.forwardRef(
|
|
|
3839
3849
|
}
|
|
3840
3850
|
);
|
|
3841
3851
|
TableHead.displayName = "TableHead";
|
|
3842
|
-
var TableCell =
|
|
3852
|
+
var TableCell = React11__namespace.forwardRef(({ className, align = "left", ...props }, ref) => {
|
|
3843
3853
|
const alignmentClass = {
|
|
3844
3854
|
left: "text-left",
|
|
3845
3855
|
center: "text-center",
|
|
@@ -3855,7 +3865,7 @@ var TableCell = React10__namespace.forwardRef(({ className, align = "left", ...p
|
|
|
3855
3865
|
);
|
|
3856
3866
|
});
|
|
3857
3867
|
TableCell.displayName = "TableCell";
|
|
3858
|
-
var TableCaption =
|
|
3868
|
+
var TableCaption = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3859
3869
|
"caption",
|
|
3860
3870
|
{
|
|
3861
3871
|
ref,
|
|
@@ -3875,8 +3885,8 @@ function DataTableBasic({
|
|
|
3875
3885
|
emptyMessage = "No results found.",
|
|
3876
3886
|
className
|
|
3877
3887
|
}) {
|
|
3878
|
-
const [sorting, setSorting] =
|
|
3879
|
-
const [globalFilter, setGlobalFilter] =
|
|
3888
|
+
const [sorting, setSorting] = React11__namespace.useState([]);
|
|
3889
|
+
const [globalFilter, setGlobalFilter] = React11__namespace.useState("");
|
|
3880
3890
|
const table = reactTable.useReactTable({
|
|
3881
3891
|
data,
|
|
3882
3892
|
columns,
|
|
@@ -4062,9 +4072,9 @@ function DatePicker({
|
|
|
4062
4072
|
disabled,
|
|
4063
4073
|
...props
|
|
4064
4074
|
}) {
|
|
4065
|
-
const [open, setOpen] =
|
|
4066
|
-
const [internalDate, setInternalDate] =
|
|
4067
|
-
|
|
4075
|
+
const [open, setOpen] = React11__namespace.useState(false);
|
|
4076
|
+
const [internalDate, setInternalDate] = React11__namespace.useState(value);
|
|
4077
|
+
React11__namespace.useEffect(() => {
|
|
4068
4078
|
setInternalDate(value);
|
|
4069
4079
|
}, [value]);
|
|
4070
4080
|
const handleSelect = (date) => {
|
|
@@ -4220,9 +4230,9 @@ function DateRangePicker({
|
|
|
4220
4230
|
separator = " - ",
|
|
4221
4231
|
...props
|
|
4222
4232
|
}) {
|
|
4223
|
-
const [open, setOpen] =
|
|
4224
|
-
const [internalRange, setInternalRange] =
|
|
4225
|
-
|
|
4233
|
+
const [open, setOpen] = React11__namespace.useState(false);
|
|
4234
|
+
const [internalRange, setInternalRange] = React11__namespace.useState(value);
|
|
4235
|
+
React11__namespace.useEffect(() => {
|
|
4226
4236
|
setInternalRange(value);
|
|
4227
4237
|
}, [value]);
|
|
4228
4238
|
const handleSelect = (range) => {
|
|
@@ -4232,7 +4242,7 @@ function DateRangePicker({
|
|
|
4232
4242
|
setOpen(false);
|
|
4233
4243
|
}
|
|
4234
4244
|
};
|
|
4235
|
-
const displayValue =
|
|
4245
|
+
const displayValue = React11__namespace.useMemo(() => {
|
|
4236
4246
|
if (!internalRange?.from)
|
|
4237
4247
|
return null;
|
|
4238
4248
|
if (!internalRange?.to) {
|
|
@@ -4287,8 +4297,8 @@ function DateTimePicker({
|
|
|
4287
4297
|
timeInterval = 15,
|
|
4288
4298
|
...props
|
|
4289
4299
|
}) {
|
|
4290
|
-
const [date, setDate] =
|
|
4291
|
-
const [time, setTime] =
|
|
4300
|
+
const [date, setDate] = React11__namespace.useState(value);
|
|
4301
|
+
const [time, setTime] = React11__namespace.useState(
|
|
4292
4302
|
value ? dateFns.format(value, timeFormat === "24" ? "HH:mm" : "hh:mm a") : "00:00"
|
|
4293
4303
|
);
|
|
4294
4304
|
const handleDateChange = (newDate) => {
|
|
@@ -4313,7 +4323,7 @@ function DateTimePicker({
|
|
|
4313
4323
|
onChange?.(newDate);
|
|
4314
4324
|
}
|
|
4315
4325
|
};
|
|
4316
|
-
const timeOptions =
|
|
4326
|
+
const timeOptions = React11__namespace.useMemo(() => {
|
|
4317
4327
|
const options = [];
|
|
4318
4328
|
for (let h = 0; h < 24; h++) {
|
|
4319
4329
|
for (let m = 0; m < 60; m += timeInterval) {
|
|
@@ -4373,8 +4383,8 @@ function MonthPicker({
|
|
|
4373
4383
|
formatString = "MMMM yyyy",
|
|
4374
4384
|
...props
|
|
4375
4385
|
}) {
|
|
4376
|
-
const [open, setOpen] =
|
|
4377
|
-
const [viewDate, setViewDate] =
|
|
4386
|
+
const [open, setOpen] = React11__namespace.useState(false);
|
|
4387
|
+
const [viewDate, setViewDate] = React11__namespace.useState(value || /* @__PURE__ */ new Date());
|
|
4378
4388
|
const months = [
|
|
4379
4389
|
"January",
|
|
4380
4390
|
"February",
|
|
@@ -4466,7 +4476,7 @@ function DraggableList({
|
|
|
4466
4476
|
className,
|
|
4467
4477
|
disabled = false
|
|
4468
4478
|
}) {
|
|
4469
|
-
const [draggedIndex, setDraggedIndex] =
|
|
4479
|
+
const [draggedIndex, setDraggedIndex] = React11__namespace.useState(null);
|
|
4470
4480
|
const handleDragStart = (e, index) => {
|
|
4471
4481
|
if (disabled)
|
|
4472
4482
|
return;
|
|
@@ -4518,7 +4528,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
4518
4528
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
4519
4529
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
4520
4530
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
4521
|
-
var DropdownMenuSubTrigger =
|
|
4531
|
+
var DropdownMenuSubTrigger = React11__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4522
4532
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
4523
4533
|
{
|
|
4524
4534
|
ref,
|
|
@@ -4535,7 +4545,7 @@ var DropdownMenuSubTrigger = React10__namespace.forwardRef(({ className, inset,
|
|
|
4535
4545
|
}
|
|
4536
4546
|
));
|
|
4537
4547
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
4538
|
-
var DropdownMenuSubContent =
|
|
4548
|
+
var DropdownMenuSubContent = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4539
4549
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
4540
4550
|
{
|
|
4541
4551
|
ref,
|
|
@@ -4547,7 +4557,7 @@ var DropdownMenuSubContent = React10__namespace.forwardRef(({ className, ...prop
|
|
|
4547
4557
|
}
|
|
4548
4558
|
));
|
|
4549
4559
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
4550
|
-
var DropdownMenuContent =
|
|
4560
|
+
var DropdownMenuContent = React11__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4551
4561
|
DropdownMenuPrimitive__namespace.Content,
|
|
4552
4562
|
{
|
|
4553
4563
|
ref,
|
|
@@ -4560,7 +4570,7 @@ var DropdownMenuContent = React10__namespace.forwardRef(({ className, sideOffset
|
|
|
4560
4570
|
}
|
|
4561
4571
|
) }));
|
|
4562
4572
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
4563
|
-
var DropdownMenuItem =
|
|
4573
|
+
var DropdownMenuItem = React11__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4564
4574
|
DropdownMenuPrimitive__namespace.Item,
|
|
4565
4575
|
{
|
|
4566
4576
|
ref,
|
|
@@ -4573,7 +4583,7 @@ var DropdownMenuItem = React10__namespace.forwardRef(({ className, inset, ...pro
|
|
|
4573
4583
|
}
|
|
4574
4584
|
));
|
|
4575
4585
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
4576
|
-
var DropdownMenuCheckboxItem =
|
|
4586
|
+
var DropdownMenuCheckboxItem = React11__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4577
4587
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
4578
4588
|
{
|
|
4579
4589
|
ref,
|
|
@@ -4590,7 +4600,7 @@ var DropdownMenuCheckboxItem = React10__namespace.forwardRef(({ className, child
|
|
|
4590
4600
|
}
|
|
4591
4601
|
));
|
|
4592
4602
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
4593
|
-
var DropdownMenuRadioItem =
|
|
4603
|
+
var DropdownMenuRadioItem = React11__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4594
4604
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
4595
4605
|
{
|
|
4596
4606
|
ref,
|
|
@@ -4606,7 +4616,7 @@ var DropdownMenuRadioItem = React10__namespace.forwardRef(({ className, children
|
|
|
4606
4616
|
}
|
|
4607
4617
|
));
|
|
4608
4618
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
4609
|
-
var DropdownMenuLabel =
|
|
4619
|
+
var DropdownMenuLabel = React11__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4610
4620
|
DropdownMenuPrimitive__namespace.Label,
|
|
4611
4621
|
{
|
|
4612
4622
|
ref,
|
|
@@ -4619,7 +4629,7 @@ var DropdownMenuLabel = React10__namespace.forwardRef(({ className, inset, ...pr
|
|
|
4619
4629
|
}
|
|
4620
4630
|
));
|
|
4621
4631
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
4622
|
-
var DropdownMenuSeparator =
|
|
4632
|
+
var DropdownMenuSeparator = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4623
4633
|
DropdownMenuPrimitive__namespace.Separator,
|
|
4624
4634
|
{
|
|
4625
4635
|
ref,
|
|
@@ -4708,7 +4718,7 @@ var progressIndicatorVariants = classVarianceAuthority.cva(
|
|
|
4708
4718
|
}
|
|
4709
4719
|
}
|
|
4710
4720
|
);
|
|
4711
|
-
var Progress =
|
|
4721
|
+
var Progress = React11__namespace.forwardRef(({
|
|
4712
4722
|
className,
|
|
4713
4723
|
value = 0,
|
|
4714
4724
|
variant,
|
|
@@ -4837,7 +4847,7 @@ var FileItem = ({
|
|
|
4837
4847
|
}
|
|
4838
4848
|
);
|
|
4839
4849
|
};
|
|
4840
|
-
var FileUpload =
|
|
4850
|
+
var FileUpload = React11__namespace.default.forwardRef(
|
|
4841
4851
|
({
|
|
4842
4852
|
accept = "*",
|
|
4843
4853
|
multiple = true,
|
|
@@ -4851,9 +4861,9 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
4851
4861
|
children,
|
|
4852
4862
|
...props
|
|
4853
4863
|
}, ref) => {
|
|
4854
|
-
const [uploadedFiles, setUploadedFiles] =
|
|
4855
|
-
const [isDragOver, setIsDragOver] =
|
|
4856
|
-
const [error, setError] =
|
|
4864
|
+
const [uploadedFiles, setUploadedFiles] = React11.useState([]);
|
|
4865
|
+
const [isDragOver, setIsDragOver] = React11.useState(false);
|
|
4866
|
+
const [error, setError] = React11.useState(null);
|
|
4857
4867
|
const validateFile = (file) => {
|
|
4858
4868
|
if (file.size > maxSize) {
|
|
4859
4869
|
return `File size exceeds ${formatFileSize(maxSize)}`;
|
|
@@ -4869,7 +4879,7 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
4869
4879
|
}
|
|
4870
4880
|
return null;
|
|
4871
4881
|
};
|
|
4872
|
-
const processFiles =
|
|
4882
|
+
const processFiles = React11.useCallback(async (files) => {
|
|
4873
4883
|
const fileArray = Array.from(files);
|
|
4874
4884
|
setError(null);
|
|
4875
4885
|
if (uploadedFiles.length + fileArray.length > maxFiles) {
|
|
@@ -4932,7 +4942,7 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
4932
4942
|
}
|
|
4933
4943
|
}
|
|
4934
4944
|
}, [uploadedFiles.length, maxFiles, maxSize, accept, onUpload]);
|
|
4935
|
-
const handleDrop =
|
|
4945
|
+
const handleDrop = React11.useCallback((e) => {
|
|
4936
4946
|
e.preventDefault();
|
|
4937
4947
|
setIsDragOver(false);
|
|
4938
4948
|
if (disabled)
|
|
@@ -4942,24 +4952,24 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
4942
4952
|
processFiles(files);
|
|
4943
4953
|
}
|
|
4944
4954
|
}, [processFiles, disabled]);
|
|
4945
|
-
const handleDragOver =
|
|
4955
|
+
const handleDragOver = React11.useCallback((e) => {
|
|
4946
4956
|
e.preventDefault();
|
|
4947
4957
|
if (!disabled) {
|
|
4948
4958
|
setIsDragOver(true);
|
|
4949
4959
|
}
|
|
4950
4960
|
}, [disabled]);
|
|
4951
|
-
const handleDragLeave =
|
|
4961
|
+
const handleDragLeave = React11.useCallback((e) => {
|
|
4952
4962
|
e.preventDefault();
|
|
4953
4963
|
setIsDragOver(false);
|
|
4954
4964
|
}, []);
|
|
4955
|
-
const handleFileSelect =
|
|
4965
|
+
const handleFileSelect = React11.useCallback((e) => {
|
|
4956
4966
|
const files = e.target.files;
|
|
4957
4967
|
if (files && files.length > 0) {
|
|
4958
4968
|
processFiles(files);
|
|
4959
4969
|
}
|
|
4960
4970
|
e.target.value = "";
|
|
4961
4971
|
}, [processFiles]);
|
|
4962
|
-
const removeFile =
|
|
4972
|
+
const removeFile = React11.useCallback((fileId) => {
|
|
4963
4973
|
setUploadedFiles((prev) => {
|
|
4964
4974
|
const fileToRemove = prev.find((f) => f.id === fileId);
|
|
4965
4975
|
if (fileToRemove?.preview) {
|
|
@@ -5059,7 +5069,7 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
5059
5069
|
}
|
|
5060
5070
|
);
|
|
5061
5071
|
FileUpload.displayName = "FileUpload";
|
|
5062
|
-
var GestureDrawer =
|
|
5072
|
+
var GestureDrawer = React11__namespace.default.forwardRef(
|
|
5063
5073
|
({
|
|
5064
5074
|
children,
|
|
5065
5075
|
isOpen,
|
|
@@ -5181,9 +5191,9 @@ function GitHubStars({
|
|
|
5181
5191
|
showWatchers = false,
|
|
5182
5192
|
repoUrl = "https://github.com/moonui/moonui"
|
|
5183
5193
|
}) {
|
|
5184
|
-
const [stats, setStats] =
|
|
5185
|
-
const [isLoading, setIsLoading] =
|
|
5186
|
-
|
|
5194
|
+
const [stats, setStats] = React11.useState(null);
|
|
5195
|
+
const [isLoading, setIsLoading] = React11.useState(true);
|
|
5196
|
+
React11.useEffect(() => {
|
|
5187
5197
|
const fetchStats = async () => {
|
|
5188
5198
|
try {
|
|
5189
5199
|
const response = await fetch("/api/github-stars");
|
|
@@ -5282,9 +5292,9 @@ function GitHubStarButton({
|
|
|
5282
5292
|
size = "md",
|
|
5283
5293
|
repoUrl = "https://github.com/moonui/moonui"
|
|
5284
5294
|
}) {
|
|
5285
|
-
const [stars, setStars] =
|
|
5286
|
-
const [isLoading, setIsLoading] =
|
|
5287
|
-
|
|
5295
|
+
const [stars, setStars] = React11.useState(null);
|
|
5296
|
+
const [isLoading, setIsLoading] = React11.useState(true);
|
|
5297
|
+
React11.useEffect(() => {
|
|
5288
5298
|
const fetchStats = async () => {
|
|
5289
5299
|
try {
|
|
5290
5300
|
const response = await fetch("/api/github-stars");
|
|
@@ -5330,7 +5340,7 @@ function GitHubStarButton({
|
|
|
5330
5340
|
}
|
|
5331
5341
|
);
|
|
5332
5342
|
}
|
|
5333
|
-
var InputOTP =
|
|
5343
|
+
var InputOTP = React11__namespace.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5334
5344
|
inputOtp.OTPInput,
|
|
5335
5345
|
{
|
|
5336
5346
|
ref,
|
|
@@ -5344,7 +5354,7 @@ var InputOTP = React10__namespace.forwardRef(({ className, containerClassName, .
|
|
|
5344
5354
|
}
|
|
5345
5355
|
));
|
|
5346
5356
|
InputOTP.displayName = "InputOTP";
|
|
5347
|
-
var InputOTPGroup =
|
|
5357
|
+
var InputOTPGroup = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
5348
5358
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
5349
5359
|
var inputOTPSlotVariants = classVarianceAuthority.cva(
|
|
5350
5360
|
[
|
|
@@ -5366,9 +5376,9 @@ var inputOTPSlotVariants = classVarianceAuthority.cva(
|
|
|
5366
5376
|
}
|
|
5367
5377
|
}
|
|
5368
5378
|
);
|
|
5369
|
-
var InputOTPSlot =
|
|
5379
|
+
var InputOTPSlot = React11__namespace.forwardRef(
|
|
5370
5380
|
({ index, className, ...props }, ref) => {
|
|
5371
|
-
const inputOTPContext =
|
|
5381
|
+
const inputOTPContext = React11__namespace.useContext(inputOtp.OTPInputContext);
|
|
5372
5382
|
const slot = inputOTPContext?.slots?.[index];
|
|
5373
5383
|
const char = slot?.char;
|
|
5374
5384
|
const hasFakeCaret = slot?.hasFakeCaret;
|
|
@@ -5390,7 +5400,7 @@ var InputOTPSlot = React10__namespace.forwardRef(
|
|
|
5390
5400
|
}
|
|
5391
5401
|
);
|
|
5392
5402
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
5393
|
-
var InputOTPSeparator =
|
|
5403
|
+
var InputOTPSeparator = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5394
5404
|
"div",
|
|
5395
5405
|
{
|
|
5396
5406
|
ref,
|
|
@@ -5408,8 +5418,8 @@ function LockedComponent({
|
|
|
5408
5418
|
showPreview = true,
|
|
5409
5419
|
previewDuration = 2e3
|
|
5410
5420
|
}) {
|
|
5411
|
-
const [isPreviewActive, setIsPreviewActive] =
|
|
5412
|
-
const [previewTimeout, setPreviewTimeout] =
|
|
5421
|
+
const [isPreviewActive, setIsPreviewActive] = React11.useState(false);
|
|
5422
|
+
const [previewTimeout, setPreviewTimeout] = React11.useState(null);
|
|
5413
5423
|
const handleMouseEnter = () => {
|
|
5414
5424
|
if (!showPreview)
|
|
5415
5425
|
return;
|
|
@@ -5506,13 +5516,13 @@ function ProComponentWrapper({
|
|
|
5506
5516
|
fallback,
|
|
5507
5517
|
requireCLI = true
|
|
5508
5518
|
}) {
|
|
5509
|
-
const [authState, setAuthState] =
|
|
5519
|
+
const [authState, setAuthState] = React11.useState({
|
|
5510
5520
|
isAuthenticated: false,
|
|
5511
5521
|
deviceValid: false,
|
|
5512
5522
|
hasProAccess: false,
|
|
5513
5523
|
loading: true
|
|
5514
5524
|
});
|
|
5515
|
-
|
|
5525
|
+
React11.useEffect(() => {
|
|
5516
5526
|
const isDevelopment2 = () => {
|
|
5517
5527
|
const checks = {
|
|
5518
5528
|
nodeEnv: process.env.NODE_ENV === "development",
|
|
@@ -5689,7 +5699,7 @@ function MoonLogo({
|
|
|
5689
5699
|
showText = true,
|
|
5690
5700
|
...props
|
|
5691
5701
|
}) {
|
|
5692
|
-
const logoId =
|
|
5702
|
+
const logoId = React11__namespace.useId();
|
|
5693
5703
|
const gradientId = `moon-gradient-${logoId}`;
|
|
5694
5704
|
const maskId = `moon-mask-${logoId}`;
|
|
5695
5705
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
@@ -5771,7 +5781,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
5771
5781
|
}
|
|
5772
5782
|
);
|
|
5773
5783
|
Pagination.displayName = "Pagination";
|
|
5774
|
-
var PaginationContent =
|
|
5784
|
+
var PaginationContent = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5775
5785
|
"ul",
|
|
5776
5786
|
{
|
|
5777
5787
|
ref,
|
|
@@ -5780,7 +5790,7 @@ var PaginationContent = React10__namespace.forwardRef(({ className, ...props },
|
|
|
5780
5790
|
}
|
|
5781
5791
|
));
|
|
5782
5792
|
PaginationContent.displayName = "PaginationContent";
|
|
5783
|
-
var PaginationItem =
|
|
5793
|
+
var PaginationItem = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("moonui-theme", "", className), ...props }));
|
|
5784
5794
|
PaginationItem.displayName = "PaginationItem";
|
|
5785
5795
|
var PaginationLink = ({
|
|
5786
5796
|
className,
|
|
@@ -5856,41 +5866,62 @@ var Select = SelectPrimitive__namespace.Root;
|
|
|
5856
5866
|
Select.displayName = "Select";
|
|
5857
5867
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
5858
5868
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
5859
|
-
var
|
|
5869
|
+
var selectTriggerVariants = classVarianceAuthority.cva(
|
|
5870
|
+
[
|
|
5871
|
+
"flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200",
|
|
5872
|
+
"disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
5873
|
+
"focus-visible:outline-none text-foreground"
|
|
5874
|
+
],
|
|
5875
|
+
{
|
|
5876
|
+
variants: {
|
|
5877
|
+
variant: {
|
|
5878
|
+
standard: "border border-input bg-background hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",
|
|
5879
|
+
outline: "border border-input bg-transparent hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",
|
|
5880
|
+
ghost: "border-none bg-muted hover:bg-muted/80 focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
5881
|
+
underline: "border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 bg-transparent hover:border-ring focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary"
|
|
5882
|
+
},
|
|
5883
|
+
size: {
|
|
5884
|
+
sm: "h-8 text-xs px-2",
|
|
5885
|
+
md: "h-10 text-sm px-3",
|
|
5886
|
+
lg: "h-12 text-base px-4"
|
|
5887
|
+
},
|
|
5888
|
+
state: {
|
|
5889
|
+
none: "",
|
|
5890
|
+
error: "border-error focus-visible:ring-error/30 focus-visible:border-error",
|
|
5891
|
+
success: "border-success focus-visible:ring-success/30 focus-visible:border-success"
|
|
5892
|
+
}
|
|
5893
|
+
},
|
|
5894
|
+
defaultVariants: {
|
|
5895
|
+
variant: "standard",
|
|
5896
|
+
size: "md",
|
|
5897
|
+
state: "none"
|
|
5898
|
+
}
|
|
5899
|
+
}
|
|
5900
|
+
);
|
|
5901
|
+
var SelectTrigger = React11__namespace.forwardRef(({ className, children, variant, size, error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5860
5902
|
SelectPrimitive__namespace.Trigger,
|
|
5861
5903
|
{
|
|
5862
5904
|
ref,
|
|
5863
5905
|
className: cn(
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
error && "border-error focus-visible:ring-error/30 focus-visible:border-error",
|
|
5870
|
-
/* Success state */
|
|
5871
|
-
success && "border-success focus-visible:ring-success/30 focus-visible:border-success",
|
|
5872
|
-
/* Size variants */
|
|
5873
|
-
size === "sm" && "h-8 text-xs px-2",
|
|
5874
|
-
size === "md" && "h-10 text-sm px-3",
|
|
5875
|
-
size === "lg" && "h-12 text-base px-4",
|
|
5876
|
-
/* Visual variants */
|
|
5877
|
-
variant === "standard" && "border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-800/80 dark:shadow-inner dark:shadow-gray-950/10 dark:text-gray-200 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80",
|
|
5878
|
-
variant === "outline" && "border border-gray-300 dark:border-gray-700 bg-transparent dark:text-gray-200 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80",
|
|
5879
|
-
variant === "ghost" && "border-none bg-gray-100 dark:bg-gray-800 dark:shadow-inner dark:shadow-gray-950/10 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20",
|
|
5880
|
-
variant === "underline" && "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 dark:text-gray-200 dark:bg-transparent hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80",
|
|
5906
|
+
selectTriggerVariants({
|
|
5907
|
+
variant,
|
|
5908
|
+
size,
|
|
5909
|
+
state: error ? "error" : success ? "success" : "none"
|
|
5910
|
+
}),
|
|
5881
5911
|
className
|
|
5882
5912
|
),
|
|
5883
5913
|
...props,
|
|
5884
5914
|
disabled: props.disabled || loading,
|
|
5915
|
+
"aria-invalid": error ? true : void 0,
|
|
5885
5916
|
"data-error": error ? true : void 0,
|
|
5886
5917
|
"data-success": success ? true : void 0,
|
|
5887
5918
|
"data-loading": loading ? true : void 0,
|
|
5888
5919
|
children: [
|
|
5889
5920
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center flex-1 gap-2", children: [
|
|
5890
|
-
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center justify-center text-
|
|
5921
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center justify-center text-muted-foreground", children: leftIcon }),
|
|
5891
5922
|
loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5892
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground
|
|
5893
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground
|
|
5923
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }),
|
|
5924
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Loading..." })
|
|
5894
5925
|
] }) : children
|
|
5895
5926
|
] }),
|
|
5896
5927
|
!loading && /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: rightIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-60", children: rightIcon }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" }) })
|
|
@@ -5898,7 +5929,7 @@ var SelectTrigger = React10__namespace.forwardRef(({ className, children, varian
|
|
|
5898
5929
|
}
|
|
5899
5930
|
));
|
|
5900
5931
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
5901
|
-
var SelectScrollUpButton =
|
|
5932
|
+
var SelectScrollUpButton = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5902
5933
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
5903
5934
|
{
|
|
5904
5935
|
ref,
|
|
@@ -5911,7 +5942,7 @@ var SelectScrollUpButton = React10__namespace.forwardRef(({ className, ...props
|
|
|
5911
5942
|
}
|
|
5912
5943
|
));
|
|
5913
5944
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
5914
|
-
var SelectScrollDownButton =
|
|
5945
|
+
var SelectScrollDownButton = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5915
5946
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
5916
5947
|
{
|
|
5917
5948
|
ref,
|
|
@@ -5924,7 +5955,7 @@ var SelectScrollDownButton = React10__namespace.forwardRef(({ className, ...prop
|
|
|
5924
5955
|
}
|
|
5925
5956
|
));
|
|
5926
5957
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
5927
|
-
var SelectContent =
|
|
5958
|
+
var SelectContent = React11__namespace.forwardRef(({ className, children, position = "popper", side = "bottom", sideOffset = 4, align = "start", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5928
5959
|
SelectPrimitive__namespace.Content,
|
|
5929
5960
|
{
|
|
5930
5961
|
ref,
|
|
@@ -5965,7 +5996,7 @@ var SelectContent = React10__namespace.forwardRef(({ className, children, positi
|
|
|
5965
5996
|
}
|
|
5966
5997
|
) }));
|
|
5967
5998
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
5968
|
-
var SelectLabel =
|
|
5999
|
+
var SelectLabel = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5969
6000
|
SelectPrimitive__namespace.Label,
|
|
5970
6001
|
{
|
|
5971
6002
|
ref,
|
|
@@ -5974,7 +6005,7 @@ var SelectLabel = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5974
6005
|
}
|
|
5975
6006
|
));
|
|
5976
6007
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
5977
|
-
var SelectItem =
|
|
6008
|
+
var SelectItem = React11__namespace.forwardRef(({ className, children, variant = "default", size = "md", rightIcon, customIndicator, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5978
6009
|
SelectPrimitive__namespace.Item,
|
|
5979
6010
|
{
|
|
5980
6011
|
ref,
|
|
@@ -6004,7 +6035,7 @@ var SelectItem = React10__namespace.forwardRef(({ className, children, variant =
|
|
|
6004
6035
|
}
|
|
6005
6036
|
));
|
|
6006
6037
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
6007
|
-
var SelectSeparator =
|
|
6038
|
+
var SelectSeparator = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6008
6039
|
SelectPrimitive__namespace.Separator,
|
|
6009
6040
|
{
|
|
6010
6041
|
ref,
|
|
@@ -6086,7 +6117,7 @@ var getMaxLength = (countryCode) => {
|
|
|
6086
6117
|
return 15;
|
|
6087
6118
|
}
|
|
6088
6119
|
};
|
|
6089
|
-
var PhoneInput =
|
|
6120
|
+
var PhoneInput = React11__namespace.forwardRef(
|
|
6090
6121
|
({
|
|
6091
6122
|
className,
|
|
6092
6123
|
value = "",
|
|
@@ -6098,8 +6129,8 @@ var PhoneInput = React10__namespace.forwardRef(
|
|
|
6098
6129
|
size,
|
|
6099
6130
|
...props
|
|
6100
6131
|
}, ref) => {
|
|
6101
|
-
const [countryCode, setCountryCode] =
|
|
6102
|
-
const [phoneNumber, setPhoneNumber] =
|
|
6132
|
+
const [countryCode, setCountryCode] = React11__namespace.useState(defaultCountry);
|
|
6133
|
+
const [phoneNumber, setPhoneNumber] = React11__namespace.useState(value);
|
|
6103
6134
|
const selectedCountry = countries.find((c) => c.code === countryCode) || countries[0];
|
|
6104
6135
|
const handlePhoneChange = (e) => {
|
|
6105
6136
|
const rawValue = e.target.value.replace(/\D/g, "");
|
|
@@ -6170,15 +6201,15 @@ var radioGroupItemVariants = classVarianceAuthority.cva(
|
|
|
6170
6201
|
}
|
|
6171
6202
|
}
|
|
6172
6203
|
);
|
|
6173
|
-
var RadioGroupContext =
|
|
6174
|
-
var RadioGroup2 =
|
|
6204
|
+
var RadioGroupContext = React11__namespace.createContext({});
|
|
6205
|
+
var RadioGroup2 = React11__namespace.forwardRef(
|
|
6175
6206
|
({ className, value, defaultValue, onValueChange, disabled, name, ...props }, ref) => {
|
|
6176
|
-
const [internalValue, setInternalValue] =
|
|
6207
|
+
const [internalValue, setInternalValue] = React11__namespace.useState(
|
|
6177
6208
|
defaultValue
|
|
6178
6209
|
);
|
|
6179
6210
|
const isControlled = value !== void 0;
|
|
6180
6211
|
const currentValue = isControlled ? value : internalValue;
|
|
6181
|
-
const handleValueChange =
|
|
6212
|
+
const handleValueChange = React11__namespace.useCallback(
|
|
6182
6213
|
(next) => {
|
|
6183
6214
|
if (!isControlled) {
|
|
6184
6215
|
setInternalValue(next);
|
|
@@ -6210,9 +6241,9 @@ var RadioGroup2 = React10__namespace.forwardRef(
|
|
|
6210
6241
|
}
|
|
6211
6242
|
);
|
|
6212
6243
|
RadioGroup2.displayName = "RadioGroup";
|
|
6213
|
-
var RadioGroupItem =
|
|
6214
|
-
const radioGroup =
|
|
6215
|
-
const generatedId =
|
|
6244
|
+
var RadioGroupItem = React11__namespace.forwardRef(({ className, variant, size, indicator, id, value, disabled, ...props }, ref) => {
|
|
6245
|
+
const radioGroup = React11__namespace.useContext(RadioGroupContext);
|
|
6246
|
+
const generatedId = React11__namespace.useId();
|
|
6216
6247
|
const radioId = id || generatedId;
|
|
6217
6248
|
const isChecked = radioGroup.value === value;
|
|
6218
6249
|
const handleChange = (e) => {
|
|
@@ -6265,7 +6296,7 @@ var RadioGroupItem = React10__namespace.forwardRef(({ className, variant, size,
|
|
|
6265
6296
|
] });
|
|
6266
6297
|
});
|
|
6267
6298
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
6268
|
-
var RadioLabel =
|
|
6299
|
+
var RadioLabel = React11__namespace.forwardRef(
|
|
6269
6300
|
({ className, htmlFor, children, disabled = false, ...props }, ref) => {
|
|
6270
6301
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6271
6302
|
"label",
|
|
@@ -6284,13 +6315,13 @@ var RadioLabel = React10__namespace.forwardRef(
|
|
|
6284
6315
|
}
|
|
6285
6316
|
);
|
|
6286
6317
|
RadioLabel.displayName = "RadioLabel";
|
|
6287
|
-
var RadioItemWithLabel =
|
|
6318
|
+
var RadioItemWithLabel = React11__namespace.forwardRef(({
|
|
6288
6319
|
id,
|
|
6289
6320
|
label,
|
|
6290
6321
|
labelClassName,
|
|
6291
6322
|
...radioProps
|
|
6292
6323
|
}, ref) => {
|
|
6293
|
-
const generatedId =
|
|
6324
|
+
const generatedId = React11__namespace.useId();
|
|
6294
6325
|
const radioId = id || generatedId;
|
|
6295
6326
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
6296
6327
|
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { ref, id: radioId, ...radioProps }),
|
|
@@ -6367,7 +6398,7 @@ function RichTextEditor({
|
|
|
6367
6398
|
)
|
|
6368
6399
|
] });
|
|
6369
6400
|
}
|
|
6370
|
-
var ScrollArea =
|
|
6401
|
+
var ScrollArea = React11__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6371
6402
|
ScrollAreaPrimitive__namespace.Root,
|
|
6372
6403
|
{
|
|
6373
6404
|
ref,
|
|
@@ -6381,7 +6412,7 @@ var ScrollArea = React10__namespace.forwardRef(({ className, children, ...props
|
|
|
6381
6412
|
}
|
|
6382
6413
|
));
|
|
6383
6414
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
6384
|
-
var ScrollBar =
|
|
6415
|
+
var ScrollBar = React11__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6385
6416
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
6386
6417
|
{
|
|
6387
6418
|
ref,
|
|
@@ -6435,7 +6466,7 @@ var defaultTransition = {
|
|
|
6435
6466
|
ease: [0.25, 0.46, 0.45, 0.94]
|
|
6436
6467
|
// Custom cubic-bezier for smooth motion
|
|
6437
6468
|
};
|
|
6438
|
-
var ScrollReveal =
|
|
6469
|
+
var ScrollReveal = React11__namespace.forwardRef(
|
|
6439
6470
|
({
|
|
6440
6471
|
children,
|
|
6441
6472
|
direction = "up",
|
|
@@ -6456,17 +6487,17 @@ var ScrollReveal = React10__namespace.forwardRef(
|
|
|
6456
6487
|
viewport
|
|
6457
6488
|
}, ref) => {
|
|
6458
6489
|
const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
|
|
6459
|
-
const animationVariants =
|
|
6490
|
+
const animationVariants = React11__namespace.useMemo(() => {
|
|
6460
6491
|
if (variants)
|
|
6461
6492
|
return variants;
|
|
6462
6493
|
return createDefaultVariants(direction, distance);
|
|
6463
6494
|
}, [direction, distance, variants]);
|
|
6464
|
-
const transition =
|
|
6495
|
+
const transition = React11__namespace.useMemo(() => ({
|
|
6465
6496
|
...defaultTransition,
|
|
6466
6497
|
duration,
|
|
6467
6498
|
delay: delay + stagger
|
|
6468
6499
|
}), [duration, delay, stagger]);
|
|
6469
|
-
const viewportConfig =
|
|
6500
|
+
const viewportConfig = React11__namespace.useMemo(() => ({
|
|
6470
6501
|
once: shouldTriggerOnce,
|
|
6471
6502
|
amount: threshold,
|
|
6472
6503
|
...viewport
|
|
@@ -6501,7 +6532,7 @@ var ScrollReveal = React10__namespace.forwardRef(
|
|
|
6501
6532
|
}
|
|
6502
6533
|
);
|
|
6503
6534
|
ScrollReveal.displayName = "ScrollReveal";
|
|
6504
|
-
var ScrollRevealContainer =
|
|
6535
|
+
var ScrollRevealContainer = React11__namespace.forwardRef(
|
|
6505
6536
|
({
|
|
6506
6537
|
children,
|
|
6507
6538
|
stagger = 0.1,
|
|
@@ -6514,7 +6545,7 @@ var ScrollRevealContainer = React10__namespace.forwardRef(
|
|
|
6514
6545
|
viewport
|
|
6515
6546
|
}, ref) => {
|
|
6516
6547
|
const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
|
|
6517
|
-
const viewportConfig =
|
|
6548
|
+
const viewportConfig = React11__namespace.useMemo(() => ({
|
|
6518
6549
|
once: shouldTriggerOnce,
|
|
6519
6550
|
amount: threshold,
|
|
6520
6551
|
...viewport
|
|
@@ -6545,7 +6576,7 @@ var ScrollRevealContainer = React10__namespace.forwardRef(
|
|
|
6545
6576
|
}
|
|
6546
6577
|
);
|
|
6547
6578
|
ScrollRevealContainer.displayName = "ScrollRevealContainer";
|
|
6548
|
-
var ScrollRevealItem =
|
|
6579
|
+
var ScrollRevealItem = React11__namespace.forwardRef(
|
|
6549
6580
|
({
|
|
6550
6581
|
children,
|
|
6551
6582
|
direction = "up",
|
|
@@ -6556,12 +6587,12 @@ var ScrollRevealItem = React10__namespace.forwardRef(
|
|
|
6556
6587
|
style,
|
|
6557
6588
|
id
|
|
6558
6589
|
}, ref) => {
|
|
6559
|
-
const animationVariants =
|
|
6590
|
+
const animationVariants = React11__namespace.useMemo(() => {
|
|
6560
6591
|
if (variants)
|
|
6561
6592
|
return variants;
|
|
6562
6593
|
return createDefaultVariants(direction, distance);
|
|
6563
6594
|
}, [direction, distance, variants]);
|
|
6564
|
-
const transition =
|
|
6595
|
+
const transition = React11__namespace.useMemo(() => ({
|
|
6565
6596
|
...defaultTransition,
|
|
6566
6597
|
duration
|
|
6567
6598
|
}), [duration]);
|
|
@@ -6677,7 +6708,7 @@ var separatorVariants = classVarianceAuthority.cva(
|
|
|
6677
6708
|
}
|
|
6678
6709
|
}
|
|
6679
6710
|
);
|
|
6680
|
-
var Separator3 =
|
|
6711
|
+
var Separator3 = React11__namespace.forwardRef(
|
|
6681
6712
|
({
|
|
6682
6713
|
className,
|
|
6683
6714
|
orientation = "horizontal",
|
|
@@ -6720,7 +6751,7 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
6720
6751
|
}
|
|
6721
6752
|
}
|
|
6722
6753
|
);
|
|
6723
|
-
var Toggle =
|
|
6754
|
+
var Toggle = React11__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6724
6755
|
TogglePrimitive__namespace.Root,
|
|
6725
6756
|
{
|
|
6726
6757
|
ref,
|
|
@@ -6756,7 +6787,7 @@ var tooltipVariants = classVarianceAuthority.cva(
|
|
|
6756
6787
|
);
|
|
6757
6788
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
6758
6789
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
6759
|
-
var TooltipArrow =
|
|
6790
|
+
var TooltipArrow = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6760
6791
|
TooltipPrimitive__namespace.Arrow,
|
|
6761
6792
|
{
|
|
6762
6793
|
ref,
|
|
@@ -6765,7 +6796,7 @@ var TooltipArrow = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
6765
6796
|
}
|
|
6766
6797
|
));
|
|
6767
6798
|
TooltipArrow.displayName = TooltipPrimitive__namespace.Arrow.displayName;
|
|
6768
|
-
var TooltipContent =
|
|
6799
|
+
var TooltipContent = React11__namespace.forwardRef(({ className, variant, size, showArrow = false, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6769
6800
|
TooltipPrimitive__namespace.Content,
|
|
6770
6801
|
{
|
|
6771
6802
|
ref,
|
|
@@ -6779,7 +6810,7 @@ var TooltipContent = React10__namespace.forwardRef(({ className, variant, size,
|
|
|
6779
6810
|
}
|
|
6780
6811
|
));
|
|
6781
6812
|
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
6782
|
-
var SimpleTooltip =
|
|
6813
|
+
var SimpleTooltip = React11__namespace.forwardRef(
|
|
6783
6814
|
({
|
|
6784
6815
|
children,
|
|
6785
6816
|
content,
|
|
@@ -6864,7 +6895,7 @@ var ColorPicker2 = ({ onColorSelect }) => {
|
|
|
6864
6895
|
color
|
|
6865
6896
|
)) });
|
|
6866
6897
|
};
|
|
6867
|
-
var SimpleEditor =
|
|
6898
|
+
var SimpleEditor = React11__namespace.default.forwardRef(
|
|
6868
6899
|
({
|
|
6869
6900
|
value = "",
|
|
6870
6901
|
onChange,
|
|
@@ -6877,13 +6908,13 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6877
6908
|
showPreview = true,
|
|
6878
6909
|
...props
|
|
6879
6910
|
}, ref) => {
|
|
6880
|
-
const [content, setContent] =
|
|
6881
|
-
const [isPreview, setIsPreview] =
|
|
6882
|
-
const [sourceContent, setSourceContent] =
|
|
6883
|
-
|
|
6884
|
-
const editorRef =
|
|
6885
|
-
const sourceRef =
|
|
6886
|
-
const [formatState, setFormatState] =
|
|
6911
|
+
const [content, setContent] = React11.useState(value);
|
|
6912
|
+
const [isPreview, setIsPreview] = React11.useState(false);
|
|
6913
|
+
const [sourceContent, setSourceContent] = React11.useState(value);
|
|
6914
|
+
React11.useState(null);
|
|
6915
|
+
const editorRef = React11__namespace.default.useRef(null);
|
|
6916
|
+
const sourceRef = React11__namespace.default.useRef(null);
|
|
6917
|
+
const [formatState, setFormatState] = React11.useState({
|
|
6887
6918
|
bold: false,
|
|
6888
6919
|
italic: false,
|
|
6889
6920
|
underline: false,
|
|
@@ -6897,18 +6928,18 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6897
6928
|
quote: false,
|
|
6898
6929
|
code: false
|
|
6899
6930
|
});
|
|
6900
|
-
const updateContent =
|
|
6931
|
+
const updateContent = React11.useCallback((newContent) => {
|
|
6901
6932
|
setContent(newContent);
|
|
6902
6933
|
onChange?.(newContent);
|
|
6903
6934
|
}, [onChange]);
|
|
6904
|
-
const saveSelection =
|
|
6935
|
+
const saveSelection = React11.useCallback(() => {
|
|
6905
6936
|
const selection2 = window.getSelection();
|
|
6906
6937
|
if (selection2 && selection2.rangeCount > 0) {
|
|
6907
6938
|
return selection2.getRangeAt(0);
|
|
6908
6939
|
}
|
|
6909
6940
|
return null;
|
|
6910
6941
|
}, []);
|
|
6911
|
-
|
|
6942
|
+
React11.useCallback((range) => {
|
|
6912
6943
|
if (!range)
|
|
6913
6944
|
return;
|
|
6914
6945
|
const selection2 = window.getSelection();
|
|
@@ -6917,7 +6948,7 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6917
6948
|
selection2.addRange(range);
|
|
6918
6949
|
}
|
|
6919
6950
|
}, []);
|
|
6920
|
-
const executeCommand =
|
|
6951
|
+
const executeCommand = React11.useCallback((command, value2) => {
|
|
6921
6952
|
if (disabled)
|
|
6922
6953
|
return;
|
|
6923
6954
|
if (editorRef.current) {
|
|
@@ -6950,11 +6981,11 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6950
6981
|
editorRef.current.focus();
|
|
6951
6982
|
}
|
|
6952
6983
|
}, [disabled, saveSelection, updateContent]);
|
|
6953
|
-
const handleInput =
|
|
6984
|
+
const handleInput = React11.useCallback((e) => {
|
|
6954
6985
|
const newContent = e.currentTarget.innerHTML;
|
|
6955
6986
|
updateContent(newContent);
|
|
6956
6987
|
}, [updateContent]);
|
|
6957
|
-
const handleKeyDown =
|
|
6988
|
+
const handleKeyDown = React11.useCallback((e) => {
|
|
6958
6989
|
if (e.ctrlKey || e.metaKey) {
|
|
6959
6990
|
switch (e.key) {
|
|
6960
6991
|
case "b":
|
|
@@ -6984,22 +7015,22 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6984
7015
|
executeCommand("insertHTML", " ");
|
|
6985
7016
|
}
|
|
6986
7017
|
}, [executeCommand]);
|
|
6987
|
-
const insertLink =
|
|
7018
|
+
const insertLink = React11.useCallback(() => {
|
|
6988
7019
|
const url = prompt("Enter URL:");
|
|
6989
7020
|
if (url) {
|
|
6990
7021
|
executeCommand("createLink", url);
|
|
6991
7022
|
}
|
|
6992
7023
|
}, [executeCommand]);
|
|
6993
|
-
const insertImage =
|
|
7024
|
+
const insertImage = React11.useCallback(() => {
|
|
6994
7025
|
const url = prompt("Enter image URL:");
|
|
6995
7026
|
if (url) {
|
|
6996
7027
|
executeCommand("insertImage", url);
|
|
6997
7028
|
}
|
|
6998
7029
|
}, [executeCommand]);
|
|
6999
|
-
const formatHeading =
|
|
7030
|
+
const formatHeading = React11.useCallback((level) => {
|
|
7000
7031
|
executeCommand("formatBlock", `<h${level}>`);
|
|
7001
7032
|
}, [executeCommand]);
|
|
7002
|
-
const setTextColor =
|
|
7033
|
+
const setTextColor = React11.useCallback((color) => {
|
|
7003
7034
|
const selection2 = window.getSelection();
|
|
7004
7035
|
if (selection2 && selection2.rangeCount > 0) {
|
|
7005
7036
|
const range = selection2.getRangeAt(0);
|
|
@@ -7016,12 +7047,12 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
7016
7047
|
}
|
|
7017
7048
|
}
|
|
7018
7049
|
}, [executeCommand, updateContent]);
|
|
7019
|
-
|
|
7050
|
+
React11__namespace.default.useEffect(() => {
|
|
7020
7051
|
if (editorRef.current && content && content !== editorRef.current.innerHTML) {
|
|
7021
7052
|
editorRef.current.innerHTML = content;
|
|
7022
7053
|
}
|
|
7023
7054
|
}, [content]);
|
|
7024
|
-
|
|
7055
|
+
React11__namespace.default.useEffect(() => {
|
|
7025
7056
|
if (value !== void 0 && value !== content) {
|
|
7026
7057
|
setContent(value);
|
|
7027
7058
|
setSourceContent(value);
|
|
@@ -7378,8 +7409,8 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
7378
7409
|
);
|
|
7379
7410
|
SimpleEditor.displayName = "SimpleEditor";
|
|
7380
7411
|
var CharacterCount = ({ content }) => {
|
|
7381
|
-
const [count, setCount] =
|
|
7382
|
-
|
|
7412
|
+
const [count, setCount] = React11.useState(0);
|
|
7413
|
+
React11.useEffect(() => {
|
|
7383
7414
|
const getPlainText = (html) => {
|
|
7384
7415
|
const div = document.createElement("div");
|
|
7385
7416
|
div.innerHTML = html;
|
|
@@ -7426,7 +7457,7 @@ var skeletonVariants = classVarianceAuthority.cva(
|
|
|
7426
7457
|
}
|
|
7427
7458
|
}
|
|
7428
7459
|
);
|
|
7429
|
-
var Skeleton =
|
|
7460
|
+
var Skeleton = React11__namespace.forwardRef(
|
|
7430
7461
|
({
|
|
7431
7462
|
className,
|
|
7432
7463
|
variant,
|
|
@@ -7510,7 +7541,7 @@ var Skeleton = React10__namespace.forwardRef(
|
|
|
7510
7541
|
}
|
|
7511
7542
|
);
|
|
7512
7543
|
Skeleton.displayName = "Skeleton";
|
|
7513
|
-
var SkeletonText =
|
|
7544
|
+
var SkeletonText = React11__namespace.forwardRef(
|
|
7514
7545
|
({
|
|
7515
7546
|
className,
|
|
7516
7547
|
lines = 3,
|
|
@@ -7551,7 +7582,7 @@ var SkeletonText = React10__namespace.forwardRef(
|
|
|
7551
7582
|
}
|
|
7552
7583
|
);
|
|
7553
7584
|
SkeletonText.displayName = "SkeletonText";
|
|
7554
|
-
var SkeletonAvatar =
|
|
7585
|
+
var SkeletonAvatar = React11__namespace.forwardRef(
|
|
7555
7586
|
({
|
|
7556
7587
|
className,
|
|
7557
7588
|
size = "2.5rem",
|
|
@@ -7577,7 +7608,7 @@ var SkeletonAvatar = React10__namespace.forwardRef(
|
|
|
7577
7608
|
}
|
|
7578
7609
|
);
|
|
7579
7610
|
SkeletonAvatar.displayName = "SkeletonAvatar";
|
|
7580
|
-
var SkeletonCard =
|
|
7611
|
+
var SkeletonCard = React11__namespace.forwardRef(
|
|
7581
7612
|
({
|
|
7582
7613
|
className,
|
|
7583
7614
|
showHeader = true,
|
|
@@ -7651,11 +7682,11 @@ var SkeletonCard = React10__namespace.forwardRef(
|
|
|
7651
7682
|
}
|
|
7652
7683
|
);
|
|
7653
7684
|
SkeletonCard.displayName = "SkeletonCard";
|
|
7654
|
-
var SwipeableCard =
|
|
7685
|
+
var SwipeableCard = React11__namespace.forwardRef(
|
|
7655
7686
|
({ className, children, onSwipeLeft, onSwipeRight, threshold = 100, disabled = false, ...props }, ref) => {
|
|
7656
|
-
const [startX, setStartX] =
|
|
7657
|
-
const [currentX, setCurrentX] =
|
|
7658
|
-
const [isSwiping, setIsSwiping] =
|
|
7687
|
+
const [startX, setStartX] = React11__namespace.useState(0);
|
|
7688
|
+
const [currentX, setCurrentX] = React11__namespace.useState(0);
|
|
7689
|
+
const [isSwiping, setIsSwiping] = React11__namespace.useState(false);
|
|
7659
7690
|
const handleTouchStart = (e) => {
|
|
7660
7691
|
if (disabled)
|
|
7661
7692
|
return;
|
|
@@ -7701,54 +7732,95 @@ var SwipeableCard = React10__namespace.forwardRef(
|
|
|
7701
7732
|
}
|
|
7702
7733
|
);
|
|
7703
7734
|
SwipeableCard.displayName = "SwipeableCard";
|
|
7704
|
-
var
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
"
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
className: cn(
|
|
7736
|
-
"pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
7737
|
-
// Boyuta göre thumb boyutları
|
|
7738
|
-
size === "sm" && "h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",
|
|
7739
|
-
size === "md" && "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
7740
|
-
size === "lg" && "h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0"
|
|
7741
|
-
)
|
|
7742
|
-
}
|
|
7743
|
-
)
|
|
7744
|
-
]
|
|
7735
|
+
var switchVariants = classVarianceAuthority.cva(
|
|
7736
|
+
[
|
|
7737
|
+
"peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full",
|
|
7738
|
+
"border-2 border-transparent transition-colors",
|
|
7739
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
7740
|
+
"focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
7741
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
7742
|
+
// Kapalı durum token'a bağlı; `--input` karanlık modda kendi değerini taşır.
|
|
7743
|
+
// (Önceden ayrıca `dark:data-[state=unchecked]:bg-gray-700/70` hardcode'u
|
|
7744
|
+
// vardı ve token'ı eziyordu — kaldırıldı.)
|
|
7745
|
+
"data-[state=unchecked]:bg-input",
|
|
7746
|
+
"dark:focus-visible:ring-primary/40"
|
|
7747
|
+
],
|
|
7748
|
+
{
|
|
7749
|
+
variants: {
|
|
7750
|
+
size: {
|
|
7751
|
+
sm: "h-4 w-8",
|
|
7752
|
+
md: "h-6 w-11",
|
|
7753
|
+
lg: "h-7 w-14"
|
|
7754
|
+
},
|
|
7755
|
+
variant: {
|
|
7756
|
+
primary: "data-[state=checked]:bg-primary",
|
|
7757
|
+
success: "data-[state=checked]:bg-success",
|
|
7758
|
+
warning: "data-[state=checked]:bg-warning",
|
|
7759
|
+
destructive: "data-[state=checked]:bg-error",
|
|
7760
|
+
secondary: "data-[state=checked]:bg-accent"
|
|
7761
|
+
}
|
|
7762
|
+
},
|
|
7763
|
+
defaultVariants: {
|
|
7764
|
+
size: "md",
|
|
7765
|
+
variant: "primary"
|
|
7745
7766
|
}
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7767
|
+
}
|
|
7768
|
+
);
|
|
7769
|
+
var switchThumbVariants = classVarianceAuthority.cva(
|
|
7770
|
+
"pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
7771
|
+
{
|
|
7772
|
+
variants: {
|
|
7773
|
+
size: {
|
|
7774
|
+
sm: "h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",
|
|
7775
|
+
md: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
7776
|
+
lg: "h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0"
|
|
7777
|
+
}
|
|
7778
|
+
},
|
|
7779
|
+
defaultVariants: {
|
|
7780
|
+
size: "md"
|
|
7781
|
+
}
|
|
7782
|
+
}
|
|
7783
|
+
);
|
|
7784
|
+
var Switch = React11__namespace.forwardRef(({
|
|
7785
|
+
className,
|
|
7786
|
+
size,
|
|
7787
|
+
variant,
|
|
7788
|
+
loading,
|
|
7789
|
+
leftIcon,
|
|
7790
|
+
rightIcon,
|
|
7791
|
+
description,
|
|
7792
|
+
"aria-describedby": ariaDescribedBy,
|
|
7793
|
+
...props
|
|
7794
|
+
}, ref) => {
|
|
7795
|
+
const reactId = React11__namespace.useId();
|
|
7796
|
+
const descriptionId = description ? `${reactId}-description` : void 0;
|
|
7797
|
+
const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
7798
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "moonui-theme inline-flex items-center gap-2", children: [
|
|
7799
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: leftIcon }),
|
|
7800
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7801
|
+
SwitchPrimitives__namespace.Root,
|
|
7802
|
+
{
|
|
7803
|
+
className: cn(
|
|
7804
|
+
switchVariants({ size, variant }),
|
|
7805
|
+
loading && "opacity-80 cursor-wait",
|
|
7806
|
+
className
|
|
7807
|
+
),
|
|
7808
|
+
disabled: loading || props.disabled,
|
|
7809
|
+
"aria-describedby": describedBy,
|
|
7810
|
+
...props,
|
|
7811
|
+
ref,
|
|
7812
|
+
children: [
|
|
7813
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-3 w-3 animate-spin rounded-full border-2 border-muted border-t-primary" }) }) : null,
|
|
7814
|
+
/* @__PURE__ */ jsxRuntime.jsx(SwitchPrimitives__namespace.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
7815
|
+
]
|
|
7816
|
+
}
|
|
7817
|
+
),
|
|
7818
|
+
rightIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: rightIcon }),
|
|
7819
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("span", { id: descriptionId, className: "text-sm text-muted-foreground", children: description })
|
|
7820
|
+
] });
|
|
7821
|
+
});
|
|
7750
7822
|
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
7751
|
-
var TagsInput =
|
|
7823
|
+
var TagsInput = React11__namespace.forwardRef(
|
|
7752
7824
|
({
|
|
7753
7825
|
value = [],
|
|
7754
7826
|
onChange,
|
|
@@ -7761,8 +7833,8 @@ var TagsInput = React10__namespace.forwardRef(
|
|
|
7761
7833
|
disabled,
|
|
7762
7834
|
...props
|
|
7763
7835
|
}, ref) => {
|
|
7764
|
-
const [inputValue, setInputValue] =
|
|
7765
|
-
const [error, setError] =
|
|
7836
|
+
const [inputValue, setInputValue] = React11__namespace.useState("");
|
|
7837
|
+
const [error, setError] = React11__namespace.useState("");
|
|
7766
7838
|
const handleKeyDown = (e) => {
|
|
7767
7839
|
if (e.key === "Enter" || e.key === delimiter) {
|
|
7768
7840
|
e.preventDefault();
|
|
@@ -7893,7 +7965,7 @@ var textareaVariants = classVarianceAuthority.cva(
|
|
|
7893
7965
|
}
|
|
7894
7966
|
}
|
|
7895
7967
|
);
|
|
7896
|
-
var Textarea =
|
|
7968
|
+
var Textarea = React11__namespace.forwardRef(
|
|
7897
7969
|
({
|
|
7898
7970
|
className,
|
|
7899
7971
|
wrapperClassName,
|
|
@@ -7913,10 +7985,10 @@ var Textarea = React10__namespace.forwardRef(
|
|
|
7913
7985
|
onChange,
|
|
7914
7986
|
...props
|
|
7915
7987
|
}, ref) => {
|
|
7916
|
-
const textareaRef =
|
|
7917
|
-
const [internalValue, setInternalValue] =
|
|
7918
|
-
|
|
7919
|
-
const adjustHeight =
|
|
7988
|
+
const textareaRef = React11__namespace.useRef(null);
|
|
7989
|
+
const [internalValue, setInternalValue] = React11__namespace.useState(value || defaultValue || "");
|
|
7990
|
+
React11__namespace.useImperativeHandle(ref, () => textareaRef.current);
|
|
7991
|
+
const adjustHeight = React11__namespace.useCallback(() => {
|
|
7920
7992
|
const textarea = textareaRef.current;
|
|
7921
7993
|
if (!textarea || !autoResize)
|
|
7922
7994
|
return;
|
|
@@ -7930,10 +8002,10 @@ var Textarea = React10__namespace.forwardRef(
|
|
|
7930
8002
|
textarea.style.overflowY = "hidden";
|
|
7931
8003
|
}
|
|
7932
8004
|
}, [autoResize, maxHeight]);
|
|
7933
|
-
|
|
8005
|
+
React11__namespace.useEffect(() => {
|
|
7934
8006
|
adjustHeight();
|
|
7935
8007
|
}, [internalValue, adjustHeight]);
|
|
7936
|
-
|
|
8008
|
+
React11__namespace.useEffect(() => {
|
|
7937
8009
|
if (value !== void 0) {
|
|
7938
8010
|
setInternalValue(value);
|
|
7939
8011
|
}
|
|
@@ -7999,7 +8071,7 @@ var Textarea = React10__namespace.forwardRef(
|
|
|
7999
8071
|
);
|
|
8000
8072
|
Textarea.displayName = "Textarea";
|
|
8001
8073
|
var ToastProvider = ToastPrimitives__namespace.Provider;
|
|
8002
|
-
var ToastViewport =
|
|
8074
|
+
var ToastViewport = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8003
8075
|
ToastPrimitives__namespace.Viewport,
|
|
8004
8076
|
{
|
|
8005
8077
|
ref,
|
|
@@ -8028,7 +8100,7 @@ var toastVariants = classVarianceAuthority.cva(
|
|
|
8028
8100
|
}
|
|
8029
8101
|
}
|
|
8030
8102
|
);
|
|
8031
|
-
var Toast =
|
|
8103
|
+
var Toast = React11__namespace.forwardRef(({ className, variant, ...props }, ref) => {
|
|
8032
8104
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8033
8105
|
ToastPrimitives__namespace.Root,
|
|
8034
8106
|
{
|
|
@@ -8039,7 +8111,7 @@ var Toast = React10__namespace.forwardRef(({ className, variant, ...props }, ref
|
|
|
8039
8111
|
);
|
|
8040
8112
|
});
|
|
8041
8113
|
Toast.displayName = ToastPrimitives__namespace.Root.displayName;
|
|
8042
|
-
var ToastAction =
|
|
8114
|
+
var ToastAction = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8043
8115
|
ToastPrimitives__namespace.Action,
|
|
8044
8116
|
{
|
|
8045
8117
|
ref,
|
|
@@ -8051,7 +8123,7 @@ var ToastAction = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
8051
8123
|
}
|
|
8052
8124
|
));
|
|
8053
8125
|
ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
|
|
8054
|
-
var ToastClose =
|
|
8126
|
+
var ToastClose = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8055
8127
|
ToastPrimitives__namespace.Close,
|
|
8056
8128
|
{
|
|
8057
8129
|
ref,
|
|
@@ -8065,7 +8137,7 @@ var ToastClose = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
8065
8137
|
}
|
|
8066
8138
|
));
|
|
8067
8139
|
ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
|
|
8068
|
-
var ToastTitle =
|
|
8140
|
+
var ToastTitle = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8069
8141
|
ToastPrimitives__namespace.Title,
|
|
8070
8142
|
{
|
|
8071
8143
|
ref,
|
|
@@ -8074,7 +8146,7 @@ var ToastTitle = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
8074
8146
|
}
|
|
8075
8147
|
));
|
|
8076
8148
|
ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
|
|
8077
|
-
var ToastDescription =
|
|
8149
|
+
var ToastDescription = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8078
8150
|
ToastPrimitives__namespace.Description,
|
|
8079
8151
|
{
|
|
8080
8152
|
ref,
|
|
@@ -8182,8 +8254,8 @@ function toast({ ...props }) {
|
|
|
8182
8254
|
};
|
|
8183
8255
|
}
|
|
8184
8256
|
function useToast() {
|
|
8185
|
-
const [state, setState] =
|
|
8186
|
-
|
|
8257
|
+
const [state, setState] = React11__namespace.useState(memoryState);
|
|
8258
|
+
React11__namespace.useEffect(() => {
|
|
8187
8259
|
listeners.push(setState);
|
|
8188
8260
|
return () => {
|
|
8189
8261
|
const index = listeners.indexOf(setState);
|
|
@@ -8236,7 +8308,7 @@ var kbdVariants = classVarianceAuthority.cva(
|
|
|
8236
8308
|
}
|
|
8237
8309
|
}
|
|
8238
8310
|
);
|
|
8239
|
-
var Kbd =
|
|
8311
|
+
var Kbd = React11__namespace.forwardRef(
|
|
8240
8312
|
({ className, size, children, ...props }, ref) => {
|
|
8241
8313
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8242
8314
|
"kbd",
|
|
@@ -8273,7 +8345,7 @@ var iconSizeMap = {
|
|
|
8273
8345
|
md: "h-5 w-5",
|
|
8274
8346
|
lg: "h-6 w-6"
|
|
8275
8347
|
};
|
|
8276
|
-
var Rating =
|
|
8348
|
+
var Rating = React11__namespace.forwardRef(
|
|
8277
8349
|
({
|
|
8278
8350
|
className,
|
|
8279
8351
|
value,
|
|
@@ -8291,11 +8363,11 @@ var Rating = React10__namespace.forwardRef(
|
|
|
8291
8363
|
const iconSizeClass = iconSizeMap[resolvedSize];
|
|
8292
8364
|
const step = precision === "half" ? 0.5 : 1;
|
|
8293
8365
|
const isControlled = value !== void 0;
|
|
8294
|
-
const [internalValue, setInternalValue] =
|
|
8366
|
+
const [internalValue, setInternalValue] = React11__namespace.useState(defaultValue ?? 0);
|
|
8295
8367
|
const currentValue = isControlled ? value ?? 0 : internalValue;
|
|
8296
|
-
const [hoverValue, setHoverValue] =
|
|
8368
|
+
const [hoverValue, setHoverValue] = React11__namespace.useState(null);
|
|
8297
8369
|
const displayValue = hoverValue !== null ? hoverValue : currentValue;
|
|
8298
|
-
const commit =
|
|
8370
|
+
const commit = React11__namespace.useCallback(
|
|
8299
8371
|
(next) => {
|
|
8300
8372
|
if (readOnly)
|
|
8301
8373
|
return;
|
|
@@ -8305,7 +8377,7 @@ var Rating = React10__namespace.forwardRef(
|
|
|
8305
8377
|
},
|
|
8306
8378
|
[readOnly, isControlled, onValueChange]
|
|
8307
8379
|
);
|
|
8308
|
-
const handleKeyDown =
|
|
8380
|
+
const handleKeyDown = React11__namespace.useCallback(
|
|
8309
8381
|
(event) => {
|
|
8310
8382
|
if (readOnly)
|
|
8311
8383
|
return;
|
|
@@ -8334,9 +8406,9 @@ var Rating = React10__namespace.forwardRef(
|
|
|
8334
8406
|
[readOnly, max, currentValue, step, commit]
|
|
8335
8407
|
);
|
|
8336
8408
|
const renderIcon = (filled) => {
|
|
8337
|
-
if (
|
|
8409
|
+
if (React11__namespace.isValidElement(icon)) {
|
|
8338
8410
|
const element = icon;
|
|
8339
|
-
return
|
|
8411
|
+
return React11__namespace.cloneElement(element, {
|
|
8340
8412
|
className: cn(
|
|
8341
8413
|
iconSizeClass,
|
|
8342
8414
|
"shrink-0",
|
|
@@ -8470,7 +8542,7 @@ var dotSizeMap = {
|
|
|
8470
8542
|
lg: "h-2 w-2",
|
|
8471
8543
|
xl: "h-2.5 w-2.5"
|
|
8472
8544
|
};
|
|
8473
|
-
var Spinner =
|
|
8545
|
+
var Spinner = React11__namespace.forwardRef(
|
|
8474
8546
|
({ className, size, variant = "default", label = "Loading", ...props }, ref) => {
|
|
8475
8547
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8476
8548
|
"div",
|
|
@@ -8549,15 +8621,15 @@ var buttonGroupVariants = classVarianceAuthority.cva(
|
|
|
8549
8621
|
}
|
|
8550
8622
|
}
|
|
8551
8623
|
);
|
|
8552
|
-
var ButtonGroup =
|
|
8624
|
+
var ButtonGroup = React11__namespace.forwardRef(
|
|
8553
8625
|
({ className, orientation, attached, size, variant, children, ...props }, ref) => {
|
|
8554
8626
|
const shouldPropagate = size !== void 0 || variant !== void 0;
|
|
8555
|
-
const enhancedChildren = shouldPropagate ?
|
|
8556
|
-
if (!
|
|
8627
|
+
const enhancedChildren = shouldPropagate ? React11__namespace.Children.map(children, (child) => {
|
|
8628
|
+
if (!React11__namespace.isValidElement(child) || child.type !== Button) {
|
|
8557
8629
|
return child;
|
|
8558
8630
|
}
|
|
8559
8631
|
const childProps = child.props;
|
|
8560
|
-
return
|
|
8632
|
+
return React11__namespace.cloneElement(child, {
|
|
8561
8633
|
size: childProps.size ?? size,
|
|
8562
8634
|
variant: childProps.variant ?? variant
|
|
8563
8635
|
});
|
|
@@ -8575,11 +8647,11 @@ var ButtonGroup = React10__namespace.forwardRef(
|
|
|
8575
8647
|
}
|
|
8576
8648
|
);
|
|
8577
8649
|
ButtonGroup.displayName = "ButtonGroup";
|
|
8578
|
-
var ToggleGroupContext =
|
|
8650
|
+
var ToggleGroupContext = React11__namespace.createContext({
|
|
8579
8651
|
size: "default",
|
|
8580
8652
|
variant: "default"
|
|
8581
8653
|
});
|
|
8582
|
-
var ToggleGroup =
|
|
8654
|
+
var ToggleGroup = React11__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8583
8655
|
ToggleGroupPrimitive__namespace.Root,
|
|
8584
8656
|
{
|
|
8585
8657
|
ref,
|
|
@@ -8596,8 +8668,8 @@ var ToggleGroup = React10__namespace.forwardRef(({ className, variant, size, chi
|
|
|
8596
8668
|
}
|
|
8597
8669
|
));
|
|
8598
8670
|
ToggleGroup.displayName = "ToggleGroup";
|
|
8599
|
-
var ToggleGroupItem =
|
|
8600
|
-
const context =
|
|
8671
|
+
var ToggleGroupItem = React11__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
8672
|
+
const context = React11__namespace.useContext(ToggleGroupContext);
|
|
8601
8673
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8602
8674
|
ToggleGroupPrimitive__namespace.Item,
|
|
8603
8675
|
{
|
|
@@ -9024,6 +9096,7 @@ exports.ratingVariants = ratingVariants;
|
|
|
9024
9096
|
exports.separatorVariants = separatorVariants;
|
|
9025
9097
|
exports.skeletonVariants = skeletonVariants;
|
|
9026
9098
|
exports.spinnerVariants = spinnerVariants;
|
|
9099
|
+
exports.switchVariants = switchVariants;
|
|
9027
9100
|
exports.toast = toast;
|
|
9028
9101
|
exports.toggleVariants = toggleVariants;
|
|
9029
9102
|
exports.tooltipVariants = tooltipVariants;
|