@moontra/moonui 3.3.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 +25 -7
- package/dist/index.d.ts +25 -7
- package/dist/index.global.js +20 -20
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +503 -353
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +467 -318
- 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__/checkbox.test.tsx +16 -12
- package/src/components/ui/__tests__/color-picker.test.tsx +147 -331
- package/src/components/ui/__tests__/radio-group.test.tsx +60 -0
- package/src/components/ui/__tests__/select.test.tsx +24 -2
- package/src/components/ui/__tests__/slider.test.tsx +96 -0
- package/src/components/ui/__tests__/switch.test.tsx +36 -3
- package/src/components/ui/__tests__/toggle-group.test.tsx +30 -0
- 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/checkbox.tsx +20 -18
- package/src/components/ui/color-picker.tsx +12 -0
- package/src/components/ui/index.ts +17 -0
- package/src/components/ui/radio-group.tsx +47 -8
- package/src/components/ui/select.tsx +59 -23
- package/src/components/ui/slider.tsx +56 -2
- package/src/components/ui/switch.tsx +108 -51
- package/src/components/ui/toggle-group.tsx +4 -0
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,
|
|
@@ -1717,14 +1727,14 @@ var CarouselNext = React10__namespace.forwardRef(({ className, variant = "outlin
|
|
|
1717
1727
|
});
|
|
1718
1728
|
CarouselNext.displayName = "CarouselNext";
|
|
1719
1729
|
var checkboxVariants = classVarianceAuthority.cva(
|
|
1720
|
-
"peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",
|
|
1730
|
+
"peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground data-[state=indeterminate]:text-primary-foreground",
|
|
1721
1731
|
{
|
|
1722
1732
|
variants: {
|
|
1723
1733
|
variant: {
|
|
1724
|
-
default: "border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",
|
|
1725
|
-
outline: "border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",
|
|
1726
|
-
muted: "border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",
|
|
1727
|
-
ghost: "border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"
|
|
1734
|
+
default: "border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",
|
|
1735
|
+
outline: "border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",
|
|
1736
|
+
muted: "border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",
|
|
1737
|
+
ghost: "border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary"
|
|
1728
1738
|
},
|
|
1729
1739
|
size: {
|
|
1730
1740
|
sm: "h-3.5 w-3.5",
|
|
@@ -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,
|
|
@@ -1765,11 +1775,7 @@ var Checkbox = React10__namespace.forwardRef(({
|
|
|
1765
1775
|
checked,
|
|
1766
1776
|
...props
|
|
1767
1777
|
}, ref) => {
|
|
1768
|
-
const
|
|
1769
|
-
React10__namespace.useEffect(() => {
|
|
1770
|
-
setIsIndeterminate(indeterminate);
|
|
1771
|
-
}, [indeterminate]);
|
|
1772
|
-
const effectiveChecked = isIndeterminate ? false : checked;
|
|
1778
|
+
const effectiveChecked = indeterminate ? "indeterminate" : checked;
|
|
1773
1779
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1774
1780
|
CheckboxPrimitive__namespace.Root,
|
|
1775
1781
|
{
|
|
@@ -1784,14 +1790,14 @@ var Checkbox = React10__namespace.forwardRef(({
|
|
|
1784
1790
|
"flex items-center justify-center text-current",
|
|
1785
1791
|
animation === "bounce" && "data-[state=checked]:animate-bounce"
|
|
1786
1792
|
),
|
|
1787
|
-
children:
|
|
1793
|
+
children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "h-[65%] w-[65%]" }) : icon ? icon : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-[65%] w-[65%]" })
|
|
1788
1794
|
}
|
|
1789
1795
|
)
|
|
1790
1796
|
}
|
|
1791
1797
|
);
|
|
1792
1798
|
});
|
|
1793
1799
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
1794
|
-
var CheckboxGroup =
|
|
1800
|
+
var CheckboxGroup = React11__namespace.forwardRef(
|
|
1795
1801
|
({ className, orientation = "vertical", spacing = "1rem", children, ...props }, ref) => {
|
|
1796
1802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1797
1803
|
"div",
|
|
@@ -1811,7 +1817,7 @@ var CheckboxGroup = React10__namespace.forwardRef(
|
|
|
1811
1817
|
}
|
|
1812
1818
|
);
|
|
1813
1819
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
1814
|
-
var CheckboxLabel =
|
|
1820
|
+
var CheckboxLabel = React11__namespace.forwardRef(
|
|
1815
1821
|
({ className, htmlFor, children, position = "end", disabled = false, ...props }, ref) => {
|
|
1816
1822
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1817
1823
|
"label",
|
|
@@ -1831,14 +1837,14 @@ var CheckboxLabel = React10__namespace.forwardRef(
|
|
|
1831
1837
|
}
|
|
1832
1838
|
);
|
|
1833
1839
|
CheckboxLabel.displayName = "CheckboxLabel";
|
|
1834
|
-
var CheckboxWithLabel =
|
|
1840
|
+
var CheckboxWithLabel = React11__namespace.forwardRef(({
|
|
1835
1841
|
id,
|
|
1836
1842
|
label,
|
|
1837
1843
|
labelPosition = "end",
|
|
1838
1844
|
labelClassName,
|
|
1839
1845
|
...checkboxProps
|
|
1840
1846
|
}, ref) => {
|
|
1841
|
-
const generatedId =
|
|
1847
|
+
const generatedId = React11__namespace.useId();
|
|
1842
1848
|
const checkboxId = id || generatedId;
|
|
1843
1849
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
1844
1850
|
labelPosition === "start" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1888,7 +1894,7 @@ var collapsibleTriggerVariants = classVarianceAuthority.cva(
|
|
|
1888
1894
|
}
|
|
1889
1895
|
}
|
|
1890
1896
|
);
|
|
1891
|
-
var CollapsibleTrigger =
|
|
1897
|
+
var CollapsibleTrigger = React11__namespace.forwardRef(({ className, children, variant, size, asChild, ...props }, ref) => {
|
|
1892
1898
|
if (asChild) {
|
|
1893
1899
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1894
1900
|
CollapsiblePrimitive__namespace.Trigger,
|
|
@@ -1937,7 +1943,7 @@ var collapsibleContentVariants = classVarianceAuthority.cva(
|
|
|
1937
1943
|
}
|
|
1938
1944
|
}
|
|
1939
1945
|
);
|
|
1940
|
-
var CollapsibleContent =
|
|
1946
|
+
var CollapsibleContent = React11__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1941
1947
|
CollapsiblePrimitive__namespace.Content,
|
|
1942
1948
|
{
|
|
1943
1949
|
ref,
|
|
@@ -2020,7 +2026,7 @@ var inputVariants = classVarianceAuthority.cva(
|
|
|
2020
2026
|
}
|
|
2021
2027
|
}
|
|
2022
2028
|
);
|
|
2023
|
-
var Input =
|
|
2029
|
+
var Input = React11__namespace.forwardRef(
|
|
2024
2030
|
({
|
|
2025
2031
|
className,
|
|
2026
2032
|
wrapperClassName,
|
|
@@ -2047,8 +2053,8 @@ var Input = React10__namespace.forwardRef(
|
|
|
2047
2053
|
placeholder,
|
|
2048
2054
|
...props
|
|
2049
2055
|
}, ref) => {
|
|
2050
|
-
const [isFocused, setIsFocused] =
|
|
2051
|
-
const [internalValue, setInternalValue] =
|
|
2056
|
+
const [isFocused, setIsFocused] = React11__namespace.useState(false);
|
|
2057
|
+
const [internalValue, setInternalValue] = React11__namespace.useState(value || defaultValue || "");
|
|
2052
2058
|
const hasValue = internalValue !== "" && internalValue !== null && internalValue !== void 0;
|
|
2053
2059
|
const isLabelActive = isFocused || hasValue;
|
|
2054
2060
|
const handleFocus = (e) => {
|
|
@@ -2063,7 +2069,7 @@ var Input = React10__namespace.forwardRef(
|
|
|
2063
2069
|
setInternalValue(e.target.value);
|
|
2064
2070
|
onChange?.(e);
|
|
2065
2071
|
};
|
|
2066
|
-
|
|
2072
|
+
React11__namespace.useEffect(() => {
|
|
2067
2073
|
if (value !== void 0) {
|
|
2068
2074
|
setInternalValue(value);
|
|
2069
2075
|
}
|
|
@@ -2147,7 +2153,7 @@ Input.displayName = "Input";
|
|
|
2147
2153
|
var labelVariants = classVarianceAuthority.cva(
|
|
2148
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"
|
|
2149
2155
|
);
|
|
2150
|
-
var Label =
|
|
2156
|
+
var Label = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2151
2157
|
LabelPrimitive__namespace.Root,
|
|
2152
2158
|
{
|
|
2153
2159
|
ref,
|
|
@@ -2208,7 +2214,7 @@ var popoverContentVariants = classVarianceAuthority.cva(
|
|
|
2208
2214
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
2209
2215
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
2210
2216
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
2211
|
-
var PopoverContent =
|
|
2217
|
+
var PopoverContent = React11__namespace.forwardRef(({
|
|
2212
2218
|
className,
|
|
2213
2219
|
variant,
|
|
2214
2220
|
size,
|
|
@@ -2276,7 +2282,7 @@ var PopoverFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
2276
2282
|
}
|
|
2277
2283
|
);
|
|
2278
2284
|
PopoverFooter.displayName = "PopoverFooter";
|
|
2279
|
-
var Tabs =
|
|
2285
|
+
var Tabs = React11__namespace.forwardRef(({ vertical = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2280
2286
|
TabsPrimitive__namespace.Root,
|
|
2281
2287
|
{
|
|
2282
2288
|
ref,
|
|
@@ -2317,7 +2323,7 @@ var tabsListVariants = classVarianceAuthority.cva(
|
|
|
2317
2323
|
}
|
|
2318
2324
|
}
|
|
2319
2325
|
);
|
|
2320
|
-
var TabsList =
|
|
2326
|
+
var TabsList = React11__namespace.forwardRef(({ className, variant, orientation, fullWidth, scrollable, ...props }, ref) => {
|
|
2321
2327
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2322
2328
|
TabsPrimitive__namespace.List,
|
|
2323
2329
|
{
|
|
@@ -2360,7 +2366,7 @@ var tabsTriggerVariants = classVarianceAuthority.cva(
|
|
|
2360
2366
|
}
|
|
2361
2367
|
}
|
|
2362
2368
|
);
|
|
2363
|
-
var TabsTrigger =
|
|
2369
|
+
var TabsTrigger = React11__namespace.forwardRef(({
|
|
2364
2370
|
className,
|
|
2365
2371
|
variant,
|
|
2366
2372
|
size,
|
|
@@ -2392,7 +2398,7 @@ var TabsTrigger = React10__namespace.forwardRef(({
|
|
|
2392
2398
|
}
|
|
2393
2399
|
));
|
|
2394
2400
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
2395
|
-
var TabsContent =
|
|
2401
|
+
var TabsContent = React11__namespace.forwardRef(({ className, animated = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2396
2402
|
TabsPrimitive__namespace.Content,
|
|
2397
2403
|
{
|
|
2398
2404
|
ref,
|
|
@@ -2486,7 +2492,7 @@ var sliderThumbVariants = classVarianceAuthority.cva(
|
|
|
2486
2492
|
}
|
|
2487
2493
|
}
|
|
2488
2494
|
);
|
|
2489
|
-
var Slider =
|
|
2495
|
+
var Slider = React11__namespace.forwardRef(({
|
|
2490
2496
|
className,
|
|
2491
2497
|
size,
|
|
2492
2498
|
trackVariant,
|
|
@@ -2502,10 +2508,10 @@ var Slider = React10__namespace.forwardRef(({
|
|
|
2502
2508
|
disabled,
|
|
2503
2509
|
...props
|
|
2504
2510
|
}, ref) => {
|
|
2505
|
-
const [sliderValue, setSliderValue] =
|
|
2511
|
+
const [sliderValue, setSliderValue] = React11__namespace.useState(
|
|
2506
2512
|
value || defaultValue || [0]
|
|
2507
2513
|
);
|
|
2508
|
-
|
|
2514
|
+
React11__namespace.useEffect(() => {
|
|
2509
2515
|
if (value !== void 0) {
|
|
2510
2516
|
setSliderValue(value);
|
|
2511
2517
|
}
|
|
@@ -2520,7 +2526,7 @@ var Slider = React10__namespace.forwardRef(({
|
|
|
2520
2526
|
const calculateThumbPercent = (value2, min2, max2) => {
|
|
2521
2527
|
return (value2 - min2) / (max2 - min2) * 100;
|
|
2522
2528
|
};
|
|
2523
|
-
const trackRef =
|
|
2529
|
+
const trackRef = React11__namespace.useRef(null);
|
|
2524
2530
|
const min = props.min || 0;
|
|
2525
2531
|
const max = props.max || 100;
|
|
2526
2532
|
const step = props.step || 1;
|
|
@@ -2576,6 +2582,44 @@ var Slider = React10__namespace.forwardRef(({
|
|
|
2576
2582
|
document.addEventListener("mousemove", handleMouseMove);
|
|
2577
2583
|
document.addEventListener("mouseup", handleMouseUp);
|
|
2578
2584
|
};
|
|
2585
|
+
const handleThumbKeyDown = (index) => (event) => {
|
|
2586
|
+
if (disabled)
|
|
2587
|
+
return;
|
|
2588
|
+
const largeStep = step * 10;
|
|
2589
|
+
const current = sliderValue[index];
|
|
2590
|
+
let next;
|
|
2591
|
+
switch (event.key) {
|
|
2592
|
+
case "ArrowRight":
|
|
2593
|
+
case "ArrowUp":
|
|
2594
|
+
next = current + step;
|
|
2595
|
+
break;
|
|
2596
|
+
case "ArrowLeft":
|
|
2597
|
+
case "ArrowDown":
|
|
2598
|
+
next = current - step;
|
|
2599
|
+
break;
|
|
2600
|
+
case "PageUp":
|
|
2601
|
+
next = current + largeStep;
|
|
2602
|
+
break;
|
|
2603
|
+
case "PageDown":
|
|
2604
|
+
next = current - largeStep;
|
|
2605
|
+
break;
|
|
2606
|
+
case "Home":
|
|
2607
|
+
next = min;
|
|
2608
|
+
break;
|
|
2609
|
+
case "End":
|
|
2610
|
+
next = max;
|
|
2611
|
+
break;
|
|
2612
|
+
default:
|
|
2613
|
+
return;
|
|
2614
|
+
}
|
|
2615
|
+
event.preventDefault();
|
|
2616
|
+
const lowerBound = index > 0 ? sliderValue[index - 1] : min;
|
|
2617
|
+
const upperBound = index < sliderValue.length - 1 ? sliderValue[index + 1] : max;
|
|
2618
|
+
const bounded = Math.max(lowerBound, Math.min(upperBound, next));
|
|
2619
|
+
const newValues = [...sliderValue];
|
|
2620
|
+
newValues[index] = bounded;
|
|
2621
|
+
handleValueChange(newValues);
|
|
2622
|
+
};
|
|
2579
2623
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", ref, ...props, children: [
|
|
2580
2624
|
showValueLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
2581
2625
|
"flex justify-end mb-1 text-sm text-muted-foreground",
|
|
@@ -2625,6 +2669,7 @@ var Slider = React10__namespace.forwardRef(({
|
|
|
2625
2669
|
cursor: disabled ? "not-allowed" : "pointer"
|
|
2626
2670
|
},
|
|
2627
2671
|
onMouseDown: handleThumbMouseDown(i),
|
|
2672
|
+
onKeyDown: handleThumbKeyDown(i),
|
|
2628
2673
|
"aria-label": `Thumb ${i + 1}`,
|
|
2629
2674
|
tabIndex: disabled ? -1 : 0,
|
|
2630
2675
|
role: "slider",
|
|
@@ -2793,14 +2838,14 @@ function ColorPicker({
|
|
|
2793
2838
|
disabled,
|
|
2794
2839
|
...props
|
|
2795
2840
|
}) {
|
|
2796
|
-
const [open, setOpen] =
|
|
2797
|
-
const [color, setColor] =
|
|
2798
|
-
const [opacity, setOpacity] =
|
|
2799
|
-
const [copied, setCopied] =
|
|
2800
|
-
const [inputValue, setInputValue] =
|
|
2801
|
-
const hsl =
|
|
2802
|
-
const rgb =
|
|
2803
|
-
|
|
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(() => {
|
|
2804
2849
|
setColor(value);
|
|
2805
2850
|
setInputValue(value);
|
|
2806
2851
|
}, [value]);
|
|
@@ -3143,8 +3188,12 @@ function ColorPicker({
|
|
|
3143
3188
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-10 gap-1", children: presets.map((presetColor) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3144
3189
|
"button",
|
|
3145
3190
|
{
|
|
3191
|
+
type: "button",
|
|
3192
|
+
"aria-label": `Select color ${presetColor}`,
|
|
3193
|
+
"aria-pressed": color === presetColor,
|
|
3146
3194
|
className: cn(
|
|
3147
3195
|
"h-7 w-7 rounded border-2 transition-all hover:scale-110",
|
|
3196
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
3148
3197
|
color === presetColor ? "border-primary" : "border-transparent"
|
|
3149
3198
|
),
|
|
3150
3199
|
style: { backgroundColor: presetColor },
|
|
@@ -3171,8 +3220,12 @@ function SimpleColorPicker({
|
|
|
3171
3220
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("moonui-theme", "flex flex-wrap gap-2", className), children: colors.map((color) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3172
3221
|
"button",
|
|
3173
3222
|
{
|
|
3223
|
+
type: "button",
|
|
3224
|
+
"aria-label": `Select color ${color}`,
|
|
3225
|
+
"aria-pressed": value === color,
|
|
3174
3226
|
className: cn(
|
|
3175
3227
|
"rounded-full border-2 transition-all hover:scale-110",
|
|
3228
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
3176
3229
|
sizeClasses[size],
|
|
3177
3230
|
value === color ? "border-primary ring-2 ring-primary/20" : "border-transparent"
|
|
3178
3231
|
),
|
|
@@ -3187,7 +3240,7 @@ function GradientPicker({
|
|
|
3187
3240
|
onChange,
|
|
3188
3241
|
className
|
|
3189
3242
|
}) {
|
|
3190
|
-
const [gradient, setGradient] =
|
|
3243
|
+
const [gradient, setGradient] = React11__namespace.useState(value);
|
|
3191
3244
|
const handleChange = (field, newValue) => {
|
|
3192
3245
|
const newGradient = { ...gradient, [field]: newValue };
|
|
3193
3246
|
setGradient(newGradient);
|
|
@@ -3273,7 +3326,7 @@ var overlayVariants = classVarianceAuthority.cva(
|
|
|
3273
3326
|
}
|
|
3274
3327
|
}
|
|
3275
3328
|
);
|
|
3276
|
-
var DialogOverlay =
|
|
3329
|
+
var DialogOverlay = React11__namespace.forwardRef(({ className, variant, animation, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3277
3330
|
DialogPrimitive__namespace.Overlay,
|
|
3278
3331
|
{
|
|
3279
3332
|
ref,
|
|
@@ -3332,7 +3385,7 @@ var dialogContentVariants = classVarianceAuthority.cva(
|
|
|
3332
3385
|
}
|
|
3333
3386
|
}
|
|
3334
3387
|
);
|
|
3335
|
-
var DialogContent =
|
|
3388
|
+
var DialogContent = React11__namespace.forwardRef(
|
|
3336
3389
|
({
|
|
3337
3390
|
className,
|
|
3338
3391
|
children,
|
|
@@ -3445,7 +3498,7 @@ var DialogFooter = ({
|
|
|
3445
3498
|
}
|
|
3446
3499
|
);
|
|
3447
3500
|
DialogFooter.displayName = "DialogFooter";
|
|
3448
|
-
var DialogTitle =
|
|
3501
|
+
var DialogTitle = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3449
3502
|
DialogPrimitive__namespace.Title,
|
|
3450
3503
|
{
|
|
3451
3504
|
ref,
|
|
@@ -3457,7 +3510,7 @@ var DialogTitle = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3457
3510
|
}
|
|
3458
3511
|
));
|
|
3459
3512
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
3460
|
-
var DialogDescription =
|
|
3513
|
+
var DialogDescription = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3461
3514
|
DialogPrimitive__namespace.Description,
|
|
3462
3515
|
{
|
|
3463
3516
|
ref,
|
|
@@ -3469,7 +3522,7 @@ var DialogDescription = React10__namespace.forwardRef(({ className, ...props },
|
|
|
3469
3522
|
}
|
|
3470
3523
|
));
|
|
3471
3524
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
3472
|
-
var DialogForm =
|
|
3525
|
+
var DialogForm = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3473
3526
|
"form",
|
|
3474
3527
|
{
|
|
3475
3528
|
ref,
|
|
@@ -3499,7 +3552,7 @@ var commandVariants = classVarianceAuthority.cva(
|
|
|
3499
3552
|
}
|
|
3500
3553
|
}
|
|
3501
3554
|
);
|
|
3502
|
-
var Command =
|
|
3555
|
+
var Command = React11__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3503
3556
|
cmdk.Command,
|
|
3504
3557
|
{
|
|
3505
3558
|
ref,
|
|
@@ -3521,7 +3574,7 @@ var CommandDialog = ({
|
|
|
3521
3574
|
), children })
|
|
3522
3575
|
] }) });
|
|
3523
3576
|
};
|
|
3524
|
-
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: [
|
|
3525
3578
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
3526
3579
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3527
3580
|
cmdk.Command.Input,
|
|
@@ -3536,7 +3589,7 @@ var CommandInput = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3536
3589
|
)
|
|
3537
3590
|
] }));
|
|
3538
3591
|
CommandInput.displayName = cmdk.Command.Input.displayName;
|
|
3539
|
-
var CommandList =
|
|
3592
|
+
var CommandList = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3540
3593
|
cmdk.Command.List,
|
|
3541
3594
|
{
|
|
3542
3595
|
ref,
|
|
@@ -3545,7 +3598,7 @@ var CommandList = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3545
3598
|
}
|
|
3546
3599
|
));
|
|
3547
3600
|
CommandList.displayName = cmdk.Command.List.displayName;
|
|
3548
|
-
var CommandEmpty =
|
|
3601
|
+
var CommandEmpty = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3549
3602
|
cmdk.Command.Empty,
|
|
3550
3603
|
{
|
|
3551
3604
|
ref,
|
|
@@ -3554,7 +3607,7 @@ var CommandEmpty = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3554
3607
|
}
|
|
3555
3608
|
));
|
|
3556
3609
|
CommandEmpty.displayName = cmdk.Command.Empty.displayName;
|
|
3557
|
-
var CommandGroup =
|
|
3610
|
+
var CommandGroup = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3558
3611
|
cmdk.Command.Group,
|
|
3559
3612
|
{
|
|
3560
3613
|
ref,
|
|
@@ -3566,7 +3619,7 @@ var CommandGroup = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3566
3619
|
}
|
|
3567
3620
|
));
|
|
3568
3621
|
CommandGroup.displayName = cmdk.Command.Group.displayName;
|
|
3569
|
-
var CommandSeparator =
|
|
3622
|
+
var CommandSeparator = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3570
3623
|
cmdk.Command.Separator,
|
|
3571
3624
|
{
|
|
3572
3625
|
ref,
|
|
@@ -3575,7 +3628,7 @@ var CommandSeparator = React10__namespace.forwardRef(({ className, ...props }, r
|
|
|
3575
3628
|
}
|
|
3576
3629
|
));
|
|
3577
3630
|
CommandSeparator.displayName = cmdk.Command.Separator.displayName;
|
|
3578
|
-
var CommandItem =
|
|
3631
|
+
var CommandItem = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3579
3632
|
cmdk.Command.Item,
|
|
3580
3633
|
{
|
|
3581
3634
|
ref,
|
|
@@ -3626,7 +3679,7 @@ var tableVariants = classVarianceAuthority.cva(
|
|
|
3626
3679
|
}
|
|
3627
3680
|
}
|
|
3628
3681
|
);
|
|
3629
|
-
var Table =
|
|
3682
|
+
var Table = React11__namespace.forwardRef(({
|
|
3630
3683
|
className,
|
|
3631
3684
|
variant,
|
|
3632
3685
|
size,
|
|
@@ -3643,11 +3696,11 @@ var Table = React10__namespace.forwardRef(({
|
|
|
3643
3696
|
...props
|
|
3644
3697
|
}, ref) => {
|
|
3645
3698
|
const striped = variant === "striped";
|
|
3646
|
-
const childrenWithProps =
|
|
3647
|
-
if (
|
|
3699
|
+
const childrenWithProps = React11__namespace.Children.map(props.children, (child) => {
|
|
3700
|
+
if (React11__namespace.isValidElement(child)) {
|
|
3648
3701
|
if (child.type === "tbody") {
|
|
3649
3702
|
const tbodyProps = child.props;
|
|
3650
|
-
return
|
|
3703
|
+
return React11__namespace.cloneElement(child, {
|
|
3651
3704
|
className: cn(tbodyProps.className, striped && "even:[&>tr]:bg-muted/50")
|
|
3652
3705
|
});
|
|
3653
3706
|
}
|
|
@@ -3672,10 +3725,10 @@ var Table = React10__namespace.forwardRef(({
|
|
|
3672
3725
|
] });
|
|
3673
3726
|
});
|
|
3674
3727
|
Table.displayName = "Table";
|
|
3675
|
-
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 }));
|
|
3676
3729
|
TableHeader.displayName = "TableHeader";
|
|
3677
|
-
var TableBody =
|
|
3678
|
-
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;
|
|
3679
3732
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3680
3733
|
"tbody",
|
|
3681
3734
|
{
|
|
@@ -3687,7 +3740,7 @@ var TableBody = React10__namespace.forwardRef(({ className, emptyContent, emptyM
|
|
|
3687
3740
|
);
|
|
3688
3741
|
});
|
|
3689
3742
|
TableBody.displayName = "TableBody";
|
|
3690
|
-
var TableFooter =
|
|
3743
|
+
var TableFooter = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3691
3744
|
"tfoot",
|
|
3692
3745
|
{
|
|
3693
3746
|
ref,
|
|
@@ -3696,7 +3749,7 @@ var TableFooter = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3696
3749
|
}
|
|
3697
3750
|
));
|
|
3698
3751
|
TableFooter.displayName = "TableFooter";
|
|
3699
|
-
var TableRow =
|
|
3752
|
+
var TableRow = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3700
3753
|
"tr",
|
|
3701
3754
|
{
|
|
3702
3755
|
ref,
|
|
@@ -3708,7 +3761,7 @@ var TableRow = React10__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
3708
3761
|
}
|
|
3709
3762
|
));
|
|
3710
3763
|
TableRow.displayName = "TableRow";
|
|
3711
|
-
var TableHead =
|
|
3764
|
+
var TableHead = React11__namespace.forwardRef(
|
|
3712
3765
|
({ className, sortable, sorted, onSort, align = "left", children, ...props }, ref) => {
|
|
3713
3766
|
const renderSortIcon = () => {
|
|
3714
3767
|
if (!sortable)
|
|
@@ -3796,7 +3849,7 @@ var TableHead = React10__namespace.forwardRef(
|
|
|
3796
3849
|
}
|
|
3797
3850
|
);
|
|
3798
3851
|
TableHead.displayName = "TableHead";
|
|
3799
|
-
var TableCell =
|
|
3852
|
+
var TableCell = React11__namespace.forwardRef(({ className, align = "left", ...props }, ref) => {
|
|
3800
3853
|
const alignmentClass = {
|
|
3801
3854
|
left: "text-left",
|
|
3802
3855
|
center: "text-center",
|
|
@@ -3812,7 +3865,7 @@ var TableCell = React10__namespace.forwardRef(({ className, align = "left", ...p
|
|
|
3812
3865
|
);
|
|
3813
3866
|
});
|
|
3814
3867
|
TableCell.displayName = "TableCell";
|
|
3815
|
-
var TableCaption =
|
|
3868
|
+
var TableCaption = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3816
3869
|
"caption",
|
|
3817
3870
|
{
|
|
3818
3871
|
ref,
|
|
@@ -3832,8 +3885,8 @@ function DataTableBasic({
|
|
|
3832
3885
|
emptyMessage = "No results found.",
|
|
3833
3886
|
className
|
|
3834
3887
|
}) {
|
|
3835
|
-
const [sorting, setSorting] =
|
|
3836
|
-
const [globalFilter, setGlobalFilter] =
|
|
3888
|
+
const [sorting, setSorting] = React11__namespace.useState([]);
|
|
3889
|
+
const [globalFilter, setGlobalFilter] = React11__namespace.useState("");
|
|
3837
3890
|
const table = reactTable.useReactTable({
|
|
3838
3891
|
data,
|
|
3839
3892
|
columns,
|
|
@@ -4019,9 +4072,9 @@ function DatePicker({
|
|
|
4019
4072
|
disabled,
|
|
4020
4073
|
...props
|
|
4021
4074
|
}) {
|
|
4022
|
-
const [open, setOpen] =
|
|
4023
|
-
const [internalDate, setInternalDate] =
|
|
4024
|
-
|
|
4075
|
+
const [open, setOpen] = React11__namespace.useState(false);
|
|
4076
|
+
const [internalDate, setInternalDate] = React11__namespace.useState(value);
|
|
4077
|
+
React11__namespace.useEffect(() => {
|
|
4025
4078
|
setInternalDate(value);
|
|
4026
4079
|
}, [value]);
|
|
4027
4080
|
const handleSelect = (date) => {
|
|
@@ -4177,9 +4230,9 @@ function DateRangePicker({
|
|
|
4177
4230
|
separator = " - ",
|
|
4178
4231
|
...props
|
|
4179
4232
|
}) {
|
|
4180
|
-
const [open, setOpen] =
|
|
4181
|
-
const [internalRange, setInternalRange] =
|
|
4182
|
-
|
|
4233
|
+
const [open, setOpen] = React11__namespace.useState(false);
|
|
4234
|
+
const [internalRange, setInternalRange] = React11__namespace.useState(value);
|
|
4235
|
+
React11__namespace.useEffect(() => {
|
|
4183
4236
|
setInternalRange(value);
|
|
4184
4237
|
}, [value]);
|
|
4185
4238
|
const handleSelect = (range) => {
|
|
@@ -4189,7 +4242,7 @@ function DateRangePicker({
|
|
|
4189
4242
|
setOpen(false);
|
|
4190
4243
|
}
|
|
4191
4244
|
};
|
|
4192
|
-
const displayValue =
|
|
4245
|
+
const displayValue = React11__namespace.useMemo(() => {
|
|
4193
4246
|
if (!internalRange?.from)
|
|
4194
4247
|
return null;
|
|
4195
4248
|
if (!internalRange?.to) {
|
|
@@ -4244,8 +4297,8 @@ function DateTimePicker({
|
|
|
4244
4297
|
timeInterval = 15,
|
|
4245
4298
|
...props
|
|
4246
4299
|
}) {
|
|
4247
|
-
const [date, setDate] =
|
|
4248
|
-
const [time, setTime] =
|
|
4300
|
+
const [date, setDate] = React11__namespace.useState(value);
|
|
4301
|
+
const [time, setTime] = React11__namespace.useState(
|
|
4249
4302
|
value ? dateFns.format(value, timeFormat === "24" ? "HH:mm" : "hh:mm a") : "00:00"
|
|
4250
4303
|
);
|
|
4251
4304
|
const handleDateChange = (newDate) => {
|
|
@@ -4270,7 +4323,7 @@ function DateTimePicker({
|
|
|
4270
4323
|
onChange?.(newDate);
|
|
4271
4324
|
}
|
|
4272
4325
|
};
|
|
4273
|
-
const timeOptions =
|
|
4326
|
+
const timeOptions = React11__namespace.useMemo(() => {
|
|
4274
4327
|
const options = [];
|
|
4275
4328
|
for (let h = 0; h < 24; h++) {
|
|
4276
4329
|
for (let m = 0; m < 60; m += timeInterval) {
|
|
@@ -4330,8 +4383,8 @@ function MonthPicker({
|
|
|
4330
4383
|
formatString = "MMMM yyyy",
|
|
4331
4384
|
...props
|
|
4332
4385
|
}) {
|
|
4333
|
-
const [open, setOpen] =
|
|
4334
|
-
const [viewDate, setViewDate] =
|
|
4386
|
+
const [open, setOpen] = React11__namespace.useState(false);
|
|
4387
|
+
const [viewDate, setViewDate] = React11__namespace.useState(value || /* @__PURE__ */ new Date());
|
|
4335
4388
|
const months = [
|
|
4336
4389
|
"January",
|
|
4337
4390
|
"February",
|
|
@@ -4423,7 +4476,7 @@ function DraggableList({
|
|
|
4423
4476
|
className,
|
|
4424
4477
|
disabled = false
|
|
4425
4478
|
}) {
|
|
4426
|
-
const [draggedIndex, setDraggedIndex] =
|
|
4479
|
+
const [draggedIndex, setDraggedIndex] = React11__namespace.useState(null);
|
|
4427
4480
|
const handleDragStart = (e, index) => {
|
|
4428
4481
|
if (disabled)
|
|
4429
4482
|
return;
|
|
@@ -4475,7 +4528,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
4475
4528
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
4476
4529
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
4477
4530
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
4478
|
-
var DropdownMenuSubTrigger =
|
|
4531
|
+
var DropdownMenuSubTrigger = React11__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4479
4532
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
4480
4533
|
{
|
|
4481
4534
|
ref,
|
|
@@ -4492,7 +4545,7 @@ var DropdownMenuSubTrigger = React10__namespace.forwardRef(({ className, inset,
|
|
|
4492
4545
|
}
|
|
4493
4546
|
));
|
|
4494
4547
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
4495
|
-
var DropdownMenuSubContent =
|
|
4548
|
+
var DropdownMenuSubContent = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4496
4549
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
4497
4550
|
{
|
|
4498
4551
|
ref,
|
|
@@ -4504,7 +4557,7 @@ var DropdownMenuSubContent = React10__namespace.forwardRef(({ className, ...prop
|
|
|
4504
4557
|
}
|
|
4505
4558
|
));
|
|
4506
4559
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
4507
|
-
var DropdownMenuContent =
|
|
4560
|
+
var DropdownMenuContent = React11__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4508
4561
|
DropdownMenuPrimitive__namespace.Content,
|
|
4509
4562
|
{
|
|
4510
4563
|
ref,
|
|
@@ -4517,7 +4570,7 @@ var DropdownMenuContent = React10__namespace.forwardRef(({ className, sideOffset
|
|
|
4517
4570
|
}
|
|
4518
4571
|
) }));
|
|
4519
4572
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
4520
|
-
var DropdownMenuItem =
|
|
4573
|
+
var DropdownMenuItem = React11__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4521
4574
|
DropdownMenuPrimitive__namespace.Item,
|
|
4522
4575
|
{
|
|
4523
4576
|
ref,
|
|
@@ -4530,7 +4583,7 @@ var DropdownMenuItem = React10__namespace.forwardRef(({ className, inset, ...pro
|
|
|
4530
4583
|
}
|
|
4531
4584
|
));
|
|
4532
4585
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
4533
|
-
var DropdownMenuCheckboxItem =
|
|
4586
|
+
var DropdownMenuCheckboxItem = React11__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4534
4587
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
4535
4588
|
{
|
|
4536
4589
|
ref,
|
|
@@ -4547,7 +4600,7 @@ var DropdownMenuCheckboxItem = React10__namespace.forwardRef(({ className, child
|
|
|
4547
4600
|
}
|
|
4548
4601
|
));
|
|
4549
4602
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
4550
|
-
var DropdownMenuRadioItem =
|
|
4603
|
+
var DropdownMenuRadioItem = React11__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4551
4604
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
4552
4605
|
{
|
|
4553
4606
|
ref,
|
|
@@ -4563,7 +4616,7 @@ var DropdownMenuRadioItem = React10__namespace.forwardRef(({ className, children
|
|
|
4563
4616
|
}
|
|
4564
4617
|
));
|
|
4565
4618
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
4566
|
-
var DropdownMenuLabel =
|
|
4619
|
+
var DropdownMenuLabel = React11__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4567
4620
|
DropdownMenuPrimitive__namespace.Label,
|
|
4568
4621
|
{
|
|
4569
4622
|
ref,
|
|
@@ -4576,7 +4629,7 @@ var DropdownMenuLabel = React10__namespace.forwardRef(({ className, inset, ...pr
|
|
|
4576
4629
|
}
|
|
4577
4630
|
));
|
|
4578
4631
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
4579
|
-
var DropdownMenuSeparator =
|
|
4632
|
+
var DropdownMenuSeparator = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4580
4633
|
DropdownMenuPrimitive__namespace.Separator,
|
|
4581
4634
|
{
|
|
4582
4635
|
ref,
|
|
@@ -4665,7 +4718,7 @@ var progressIndicatorVariants = classVarianceAuthority.cva(
|
|
|
4665
4718
|
}
|
|
4666
4719
|
}
|
|
4667
4720
|
);
|
|
4668
|
-
var Progress =
|
|
4721
|
+
var Progress = React11__namespace.forwardRef(({
|
|
4669
4722
|
className,
|
|
4670
4723
|
value = 0,
|
|
4671
4724
|
variant,
|
|
@@ -4794,7 +4847,7 @@ var FileItem = ({
|
|
|
4794
4847
|
}
|
|
4795
4848
|
);
|
|
4796
4849
|
};
|
|
4797
|
-
var FileUpload =
|
|
4850
|
+
var FileUpload = React11__namespace.default.forwardRef(
|
|
4798
4851
|
({
|
|
4799
4852
|
accept = "*",
|
|
4800
4853
|
multiple = true,
|
|
@@ -4808,9 +4861,9 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
4808
4861
|
children,
|
|
4809
4862
|
...props
|
|
4810
4863
|
}, ref) => {
|
|
4811
|
-
const [uploadedFiles, setUploadedFiles] =
|
|
4812
|
-
const [isDragOver, setIsDragOver] =
|
|
4813
|
-
const [error, setError] =
|
|
4864
|
+
const [uploadedFiles, setUploadedFiles] = React11.useState([]);
|
|
4865
|
+
const [isDragOver, setIsDragOver] = React11.useState(false);
|
|
4866
|
+
const [error, setError] = React11.useState(null);
|
|
4814
4867
|
const validateFile = (file) => {
|
|
4815
4868
|
if (file.size > maxSize) {
|
|
4816
4869
|
return `File size exceeds ${formatFileSize(maxSize)}`;
|
|
@@ -4826,7 +4879,7 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
4826
4879
|
}
|
|
4827
4880
|
return null;
|
|
4828
4881
|
};
|
|
4829
|
-
const processFiles =
|
|
4882
|
+
const processFiles = React11.useCallback(async (files) => {
|
|
4830
4883
|
const fileArray = Array.from(files);
|
|
4831
4884
|
setError(null);
|
|
4832
4885
|
if (uploadedFiles.length + fileArray.length > maxFiles) {
|
|
@@ -4889,7 +4942,7 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
4889
4942
|
}
|
|
4890
4943
|
}
|
|
4891
4944
|
}, [uploadedFiles.length, maxFiles, maxSize, accept, onUpload]);
|
|
4892
|
-
const handleDrop =
|
|
4945
|
+
const handleDrop = React11.useCallback((e) => {
|
|
4893
4946
|
e.preventDefault();
|
|
4894
4947
|
setIsDragOver(false);
|
|
4895
4948
|
if (disabled)
|
|
@@ -4899,24 +4952,24 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
4899
4952
|
processFiles(files);
|
|
4900
4953
|
}
|
|
4901
4954
|
}, [processFiles, disabled]);
|
|
4902
|
-
const handleDragOver =
|
|
4955
|
+
const handleDragOver = React11.useCallback((e) => {
|
|
4903
4956
|
e.preventDefault();
|
|
4904
4957
|
if (!disabled) {
|
|
4905
4958
|
setIsDragOver(true);
|
|
4906
4959
|
}
|
|
4907
4960
|
}, [disabled]);
|
|
4908
|
-
const handleDragLeave =
|
|
4961
|
+
const handleDragLeave = React11.useCallback((e) => {
|
|
4909
4962
|
e.preventDefault();
|
|
4910
4963
|
setIsDragOver(false);
|
|
4911
4964
|
}, []);
|
|
4912
|
-
const handleFileSelect =
|
|
4965
|
+
const handleFileSelect = React11.useCallback((e) => {
|
|
4913
4966
|
const files = e.target.files;
|
|
4914
4967
|
if (files && files.length > 0) {
|
|
4915
4968
|
processFiles(files);
|
|
4916
4969
|
}
|
|
4917
4970
|
e.target.value = "";
|
|
4918
4971
|
}, [processFiles]);
|
|
4919
|
-
const removeFile =
|
|
4972
|
+
const removeFile = React11.useCallback((fileId) => {
|
|
4920
4973
|
setUploadedFiles((prev) => {
|
|
4921
4974
|
const fileToRemove = prev.find((f) => f.id === fileId);
|
|
4922
4975
|
if (fileToRemove?.preview) {
|
|
@@ -5016,7 +5069,7 @@ var FileUpload = React10__namespace.default.forwardRef(
|
|
|
5016
5069
|
}
|
|
5017
5070
|
);
|
|
5018
5071
|
FileUpload.displayName = "FileUpload";
|
|
5019
|
-
var GestureDrawer =
|
|
5072
|
+
var GestureDrawer = React11__namespace.default.forwardRef(
|
|
5020
5073
|
({
|
|
5021
5074
|
children,
|
|
5022
5075
|
isOpen,
|
|
@@ -5138,9 +5191,9 @@ function GitHubStars({
|
|
|
5138
5191
|
showWatchers = false,
|
|
5139
5192
|
repoUrl = "https://github.com/moonui/moonui"
|
|
5140
5193
|
}) {
|
|
5141
|
-
const [stats, setStats] =
|
|
5142
|
-
const [isLoading, setIsLoading] =
|
|
5143
|
-
|
|
5194
|
+
const [stats, setStats] = React11.useState(null);
|
|
5195
|
+
const [isLoading, setIsLoading] = React11.useState(true);
|
|
5196
|
+
React11.useEffect(() => {
|
|
5144
5197
|
const fetchStats = async () => {
|
|
5145
5198
|
try {
|
|
5146
5199
|
const response = await fetch("/api/github-stars");
|
|
@@ -5239,9 +5292,9 @@ function GitHubStarButton({
|
|
|
5239
5292
|
size = "md",
|
|
5240
5293
|
repoUrl = "https://github.com/moonui/moonui"
|
|
5241
5294
|
}) {
|
|
5242
|
-
const [stars, setStars] =
|
|
5243
|
-
const [isLoading, setIsLoading] =
|
|
5244
|
-
|
|
5295
|
+
const [stars, setStars] = React11.useState(null);
|
|
5296
|
+
const [isLoading, setIsLoading] = React11.useState(true);
|
|
5297
|
+
React11.useEffect(() => {
|
|
5245
5298
|
const fetchStats = async () => {
|
|
5246
5299
|
try {
|
|
5247
5300
|
const response = await fetch("/api/github-stars");
|
|
@@ -5287,7 +5340,7 @@ function GitHubStarButton({
|
|
|
5287
5340
|
}
|
|
5288
5341
|
);
|
|
5289
5342
|
}
|
|
5290
|
-
var InputOTP =
|
|
5343
|
+
var InputOTP = React11__namespace.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5291
5344
|
inputOtp.OTPInput,
|
|
5292
5345
|
{
|
|
5293
5346
|
ref,
|
|
@@ -5301,7 +5354,7 @@ var InputOTP = React10__namespace.forwardRef(({ className, containerClassName, .
|
|
|
5301
5354
|
}
|
|
5302
5355
|
));
|
|
5303
5356
|
InputOTP.displayName = "InputOTP";
|
|
5304
|
-
var InputOTPGroup =
|
|
5357
|
+
var InputOTPGroup = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
5305
5358
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
5306
5359
|
var inputOTPSlotVariants = classVarianceAuthority.cva(
|
|
5307
5360
|
[
|
|
@@ -5323,9 +5376,9 @@ var inputOTPSlotVariants = classVarianceAuthority.cva(
|
|
|
5323
5376
|
}
|
|
5324
5377
|
}
|
|
5325
5378
|
);
|
|
5326
|
-
var InputOTPSlot =
|
|
5379
|
+
var InputOTPSlot = React11__namespace.forwardRef(
|
|
5327
5380
|
({ index, className, ...props }, ref) => {
|
|
5328
|
-
const inputOTPContext =
|
|
5381
|
+
const inputOTPContext = React11__namespace.useContext(inputOtp.OTPInputContext);
|
|
5329
5382
|
const slot = inputOTPContext?.slots?.[index];
|
|
5330
5383
|
const char = slot?.char;
|
|
5331
5384
|
const hasFakeCaret = slot?.hasFakeCaret;
|
|
@@ -5347,7 +5400,7 @@ var InputOTPSlot = React10__namespace.forwardRef(
|
|
|
5347
5400
|
}
|
|
5348
5401
|
);
|
|
5349
5402
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
5350
|
-
var InputOTPSeparator =
|
|
5403
|
+
var InputOTPSeparator = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5351
5404
|
"div",
|
|
5352
5405
|
{
|
|
5353
5406
|
ref,
|
|
@@ -5365,8 +5418,8 @@ function LockedComponent({
|
|
|
5365
5418
|
showPreview = true,
|
|
5366
5419
|
previewDuration = 2e3
|
|
5367
5420
|
}) {
|
|
5368
|
-
const [isPreviewActive, setIsPreviewActive] =
|
|
5369
|
-
const [previewTimeout, setPreviewTimeout] =
|
|
5421
|
+
const [isPreviewActive, setIsPreviewActive] = React11.useState(false);
|
|
5422
|
+
const [previewTimeout, setPreviewTimeout] = React11.useState(null);
|
|
5370
5423
|
const handleMouseEnter = () => {
|
|
5371
5424
|
if (!showPreview)
|
|
5372
5425
|
return;
|
|
@@ -5463,13 +5516,13 @@ function ProComponentWrapper({
|
|
|
5463
5516
|
fallback,
|
|
5464
5517
|
requireCLI = true
|
|
5465
5518
|
}) {
|
|
5466
|
-
const [authState, setAuthState] =
|
|
5519
|
+
const [authState, setAuthState] = React11.useState({
|
|
5467
5520
|
isAuthenticated: false,
|
|
5468
5521
|
deviceValid: false,
|
|
5469
5522
|
hasProAccess: false,
|
|
5470
5523
|
loading: true
|
|
5471
5524
|
});
|
|
5472
|
-
|
|
5525
|
+
React11.useEffect(() => {
|
|
5473
5526
|
const isDevelopment2 = () => {
|
|
5474
5527
|
const checks = {
|
|
5475
5528
|
nodeEnv: process.env.NODE_ENV === "development",
|
|
@@ -5646,7 +5699,7 @@ function MoonLogo({
|
|
|
5646
5699
|
showText = true,
|
|
5647
5700
|
...props
|
|
5648
5701
|
}) {
|
|
5649
|
-
const logoId =
|
|
5702
|
+
const logoId = React11__namespace.useId();
|
|
5650
5703
|
const gradientId = `moon-gradient-${logoId}`;
|
|
5651
5704
|
const maskId = `moon-mask-${logoId}`;
|
|
5652
5705
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
@@ -5728,7 +5781,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
5728
5781
|
}
|
|
5729
5782
|
);
|
|
5730
5783
|
Pagination.displayName = "Pagination";
|
|
5731
|
-
var PaginationContent =
|
|
5784
|
+
var PaginationContent = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5732
5785
|
"ul",
|
|
5733
5786
|
{
|
|
5734
5787
|
ref,
|
|
@@ -5737,7 +5790,7 @@ var PaginationContent = React10__namespace.forwardRef(({ className, ...props },
|
|
|
5737
5790
|
}
|
|
5738
5791
|
));
|
|
5739
5792
|
PaginationContent.displayName = "PaginationContent";
|
|
5740
|
-
var PaginationItem =
|
|
5793
|
+
var PaginationItem = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("moonui-theme", "", className), ...props }));
|
|
5741
5794
|
PaginationItem.displayName = "PaginationItem";
|
|
5742
5795
|
var PaginationLink = ({
|
|
5743
5796
|
className,
|
|
@@ -5813,41 +5866,62 @@ var Select = SelectPrimitive__namespace.Root;
|
|
|
5813
5866
|
Select.displayName = "Select";
|
|
5814
5867
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
5815
5868
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
5816
|
-
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(
|
|
5817
5902
|
SelectPrimitive__namespace.Trigger,
|
|
5818
5903
|
{
|
|
5819
5904
|
ref,
|
|
5820
5905
|
className: cn(
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
error && "border-error focus-visible:ring-error/30 focus-visible:border-error",
|
|
5827
|
-
/* Success state */
|
|
5828
|
-
success && "border-success focus-visible:ring-success/30 focus-visible:border-success",
|
|
5829
|
-
/* Size variants */
|
|
5830
|
-
size === "sm" && "h-8 text-xs px-2",
|
|
5831
|
-
size === "md" && "h-10 text-sm px-3",
|
|
5832
|
-
size === "lg" && "h-12 text-base px-4",
|
|
5833
|
-
/* Visual variants */
|
|
5834
|
-
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",
|
|
5835
|
-
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",
|
|
5836
|
-
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",
|
|
5837
|
-
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
|
+
}),
|
|
5838
5911
|
className
|
|
5839
5912
|
),
|
|
5840
5913
|
...props,
|
|
5841
5914
|
disabled: props.disabled || loading,
|
|
5915
|
+
"aria-invalid": error ? true : void 0,
|
|
5842
5916
|
"data-error": error ? true : void 0,
|
|
5843
5917
|
"data-success": success ? true : void 0,
|
|
5844
5918
|
"data-loading": loading ? true : void 0,
|
|
5845
5919
|
children: [
|
|
5846
5920
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center flex-1 gap-2", children: [
|
|
5847
|
-
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 }),
|
|
5848
5922
|
loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5849
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground
|
|
5850
|
-
/* @__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..." })
|
|
5851
5925
|
] }) : children
|
|
5852
5926
|
] }),
|
|
5853
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" }) })
|
|
@@ -5855,7 +5929,7 @@ var SelectTrigger = React10__namespace.forwardRef(({ className, children, varian
|
|
|
5855
5929
|
}
|
|
5856
5930
|
));
|
|
5857
5931
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
5858
|
-
var SelectScrollUpButton =
|
|
5932
|
+
var SelectScrollUpButton = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5859
5933
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
5860
5934
|
{
|
|
5861
5935
|
ref,
|
|
@@ -5868,7 +5942,7 @@ var SelectScrollUpButton = React10__namespace.forwardRef(({ className, ...props
|
|
|
5868
5942
|
}
|
|
5869
5943
|
));
|
|
5870
5944
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
5871
|
-
var SelectScrollDownButton =
|
|
5945
|
+
var SelectScrollDownButton = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5872
5946
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
5873
5947
|
{
|
|
5874
5948
|
ref,
|
|
@@ -5881,7 +5955,7 @@ var SelectScrollDownButton = React10__namespace.forwardRef(({ className, ...prop
|
|
|
5881
5955
|
}
|
|
5882
5956
|
));
|
|
5883
5957
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
5884
|
-
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(
|
|
5885
5959
|
SelectPrimitive__namespace.Content,
|
|
5886
5960
|
{
|
|
5887
5961
|
ref,
|
|
@@ -5922,7 +5996,7 @@ var SelectContent = React10__namespace.forwardRef(({ className, children, positi
|
|
|
5922
5996
|
}
|
|
5923
5997
|
) }));
|
|
5924
5998
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
5925
|
-
var SelectLabel =
|
|
5999
|
+
var SelectLabel = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5926
6000
|
SelectPrimitive__namespace.Label,
|
|
5927
6001
|
{
|
|
5928
6002
|
ref,
|
|
@@ -5931,7 +6005,7 @@ var SelectLabel = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5931
6005
|
}
|
|
5932
6006
|
));
|
|
5933
6007
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
5934
|
-
var SelectItem =
|
|
6008
|
+
var SelectItem = React11__namespace.forwardRef(({ className, children, variant = "default", size = "md", rightIcon, customIndicator, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5935
6009
|
SelectPrimitive__namespace.Item,
|
|
5936
6010
|
{
|
|
5937
6011
|
ref,
|
|
@@ -5961,7 +6035,7 @@ var SelectItem = React10__namespace.forwardRef(({ className, children, variant =
|
|
|
5961
6035
|
}
|
|
5962
6036
|
));
|
|
5963
6037
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
5964
|
-
var SelectSeparator =
|
|
6038
|
+
var SelectSeparator = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5965
6039
|
SelectPrimitive__namespace.Separator,
|
|
5966
6040
|
{
|
|
5967
6041
|
ref,
|
|
@@ -6043,7 +6117,7 @@ var getMaxLength = (countryCode) => {
|
|
|
6043
6117
|
return 15;
|
|
6044
6118
|
}
|
|
6045
6119
|
};
|
|
6046
|
-
var PhoneInput =
|
|
6120
|
+
var PhoneInput = React11__namespace.forwardRef(
|
|
6047
6121
|
({
|
|
6048
6122
|
className,
|
|
6049
6123
|
value = "",
|
|
@@ -6055,8 +6129,8 @@ var PhoneInput = React10__namespace.forwardRef(
|
|
|
6055
6129
|
size,
|
|
6056
6130
|
...props
|
|
6057
6131
|
}, ref) => {
|
|
6058
|
-
const [countryCode, setCountryCode] =
|
|
6059
|
-
const [phoneNumber, setPhoneNumber] =
|
|
6132
|
+
const [countryCode, setCountryCode] = React11__namespace.useState(defaultCountry);
|
|
6133
|
+
const [phoneNumber, setPhoneNumber] = React11__namespace.useState(value);
|
|
6060
6134
|
const selectedCountry = countries.find((c) => c.code === countryCode) || countries[0];
|
|
6061
6135
|
const handlePhoneChange = (e) => {
|
|
6062
6136
|
const rawValue = e.target.value.replace(/\D/g, "");
|
|
@@ -6127,24 +6201,49 @@ var radioGroupItemVariants = classVarianceAuthority.cva(
|
|
|
6127
6201
|
}
|
|
6128
6202
|
}
|
|
6129
6203
|
);
|
|
6130
|
-
var RadioGroupContext =
|
|
6131
|
-
var RadioGroup2 =
|
|
6132
|
-
({ className, value, onValueChange, disabled, name, ...props }, ref) => {
|
|
6133
|
-
|
|
6134
|
-
|
|
6204
|
+
var RadioGroupContext = React11__namespace.createContext({});
|
|
6205
|
+
var RadioGroup2 = React11__namespace.forwardRef(
|
|
6206
|
+
({ className, value, defaultValue, onValueChange, disabled, name, ...props }, ref) => {
|
|
6207
|
+
const [internalValue, setInternalValue] = React11__namespace.useState(
|
|
6208
|
+
defaultValue
|
|
6209
|
+
);
|
|
6210
|
+
const isControlled = value !== void 0;
|
|
6211
|
+
const currentValue = isControlled ? value : internalValue;
|
|
6212
|
+
const handleValueChange = React11__namespace.useCallback(
|
|
6213
|
+
(next) => {
|
|
6214
|
+
if (!isControlled) {
|
|
6215
|
+
setInternalValue(next);
|
|
6216
|
+
}
|
|
6217
|
+
onValueChange?.(next);
|
|
6218
|
+
},
|
|
6219
|
+
[isControlled, onValueChange]
|
|
6220
|
+
);
|
|
6221
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6222
|
+
RadioGroupContext.Provider,
|
|
6135
6223
|
{
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6224
|
+
value: {
|
|
6225
|
+
value: currentValue,
|
|
6226
|
+
onValueChange: handleValueChange,
|
|
6227
|
+
disabled,
|
|
6228
|
+
name
|
|
6229
|
+
},
|
|
6230
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6231
|
+
"div",
|
|
6232
|
+
{
|
|
6233
|
+
ref,
|
|
6234
|
+
role: "radiogroup",
|
|
6235
|
+
className: cn("moonui-theme", "grid gap-2", className),
|
|
6236
|
+
...props
|
|
6237
|
+
}
|
|
6238
|
+
)
|
|
6140
6239
|
}
|
|
6141
|
-
)
|
|
6240
|
+
);
|
|
6142
6241
|
}
|
|
6143
6242
|
);
|
|
6144
6243
|
RadioGroup2.displayName = "RadioGroup";
|
|
6145
|
-
var RadioGroupItem =
|
|
6146
|
-
const radioGroup =
|
|
6147
|
-
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();
|
|
6148
6247
|
const radioId = id || generatedId;
|
|
6149
6248
|
const isChecked = radioGroup.value === value;
|
|
6150
6249
|
const handleChange = (e) => {
|
|
@@ -6167,7 +6266,7 @@ var RadioGroupItem = React10__namespace.forwardRef(({ className, variant, size,
|
|
|
6167
6266
|
disabled: disabled || radioGroup.disabled,
|
|
6168
6267
|
name: radioGroup.name,
|
|
6169
6268
|
onChange: handleChange,
|
|
6170
|
-
className: "sr-only",
|
|
6269
|
+
className: "peer sr-only",
|
|
6171
6270
|
...props
|
|
6172
6271
|
}
|
|
6173
6272
|
),
|
|
@@ -6178,7 +6277,12 @@ var RadioGroupItem = React10__namespace.forwardRef(({ className, variant, size,
|
|
|
6178
6277
|
className: cn(
|
|
6179
6278
|
radioGroupItemVariants({ variant, size }),
|
|
6180
6279
|
"rounded-full",
|
|
6181
|
-
|
|
6280
|
+
// Gerçekte odaklanan eleman görsel olarak gizli `sr-only` input'tur.
|
|
6281
|
+
// Görünür label onun KARDEŞİ olduğu için label'da `:focus-visible` hiç
|
|
6282
|
+
// tetiklenmiyor, dolayısıyla klavye kullanıcısı hiçbir focus izi
|
|
6283
|
+
// görmüyordu. Tailwind `peer` deseniyle (input `peer` sınıfını taşır ve
|
|
6284
|
+
// DOM'da label'dan önce gelir) focus izi görünür elemana taşınır.
|
|
6285
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary/50",
|
|
6182
6286
|
"relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",
|
|
6183
6287
|
disabled && "cursor-not-allowed opacity-50",
|
|
6184
6288
|
className
|
|
@@ -6192,7 +6296,7 @@ var RadioGroupItem = React10__namespace.forwardRef(({ className, variant, size,
|
|
|
6192
6296
|
] });
|
|
6193
6297
|
});
|
|
6194
6298
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
6195
|
-
var RadioLabel =
|
|
6299
|
+
var RadioLabel = React11__namespace.forwardRef(
|
|
6196
6300
|
({ className, htmlFor, children, disabled = false, ...props }, ref) => {
|
|
6197
6301
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6198
6302
|
"label",
|
|
@@ -6211,13 +6315,13 @@ var RadioLabel = React10__namespace.forwardRef(
|
|
|
6211
6315
|
}
|
|
6212
6316
|
);
|
|
6213
6317
|
RadioLabel.displayName = "RadioLabel";
|
|
6214
|
-
var RadioItemWithLabel =
|
|
6318
|
+
var RadioItemWithLabel = React11__namespace.forwardRef(({
|
|
6215
6319
|
id,
|
|
6216
6320
|
label,
|
|
6217
6321
|
labelClassName,
|
|
6218
6322
|
...radioProps
|
|
6219
6323
|
}, ref) => {
|
|
6220
|
-
const generatedId =
|
|
6324
|
+
const generatedId = React11__namespace.useId();
|
|
6221
6325
|
const radioId = id || generatedId;
|
|
6222
6326
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
6223
6327
|
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { ref, id: radioId, ...radioProps }),
|
|
@@ -6294,7 +6398,7 @@ function RichTextEditor({
|
|
|
6294
6398
|
)
|
|
6295
6399
|
] });
|
|
6296
6400
|
}
|
|
6297
|
-
var ScrollArea =
|
|
6401
|
+
var ScrollArea = React11__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6298
6402
|
ScrollAreaPrimitive__namespace.Root,
|
|
6299
6403
|
{
|
|
6300
6404
|
ref,
|
|
@@ -6308,7 +6412,7 @@ var ScrollArea = React10__namespace.forwardRef(({ className, children, ...props
|
|
|
6308
6412
|
}
|
|
6309
6413
|
));
|
|
6310
6414
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
6311
|
-
var ScrollBar =
|
|
6415
|
+
var ScrollBar = React11__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6312
6416
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
6313
6417
|
{
|
|
6314
6418
|
ref,
|
|
@@ -6362,7 +6466,7 @@ var defaultTransition = {
|
|
|
6362
6466
|
ease: [0.25, 0.46, 0.45, 0.94]
|
|
6363
6467
|
// Custom cubic-bezier for smooth motion
|
|
6364
6468
|
};
|
|
6365
|
-
var ScrollReveal =
|
|
6469
|
+
var ScrollReveal = React11__namespace.forwardRef(
|
|
6366
6470
|
({
|
|
6367
6471
|
children,
|
|
6368
6472
|
direction = "up",
|
|
@@ -6383,17 +6487,17 @@ var ScrollReveal = React10__namespace.forwardRef(
|
|
|
6383
6487
|
viewport
|
|
6384
6488
|
}, ref) => {
|
|
6385
6489
|
const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
|
|
6386
|
-
const animationVariants =
|
|
6490
|
+
const animationVariants = React11__namespace.useMemo(() => {
|
|
6387
6491
|
if (variants)
|
|
6388
6492
|
return variants;
|
|
6389
6493
|
return createDefaultVariants(direction, distance);
|
|
6390
6494
|
}, [direction, distance, variants]);
|
|
6391
|
-
const transition =
|
|
6495
|
+
const transition = React11__namespace.useMemo(() => ({
|
|
6392
6496
|
...defaultTransition,
|
|
6393
6497
|
duration,
|
|
6394
6498
|
delay: delay + stagger
|
|
6395
6499
|
}), [duration, delay, stagger]);
|
|
6396
|
-
const viewportConfig =
|
|
6500
|
+
const viewportConfig = React11__namespace.useMemo(() => ({
|
|
6397
6501
|
once: shouldTriggerOnce,
|
|
6398
6502
|
amount: threshold,
|
|
6399
6503
|
...viewport
|
|
@@ -6428,7 +6532,7 @@ var ScrollReveal = React10__namespace.forwardRef(
|
|
|
6428
6532
|
}
|
|
6429
6533
|
);
|
|
6430
6534
|
ScrollReveal.displayName = "ScrollReveal";
|
|
6431
|
-
var ScrollRevealContainer =
|
|
6535
|
+
var ScrollRevealContainer = React11__namespace.forwardRef(
|
|
6432
6536
|
({
|
|
6433
6537
|
children,
|
|
6434
6538
|
stagger = 0.1,
|
|
@@ -6441,7 +6545,7 @@ var ScrollRevealContainer = React10__namespace.forwardRef(
|
|
|
6441
6545
|
viewport
|
|
6442
6546
|
}, ref) => {
|
|
6443
6547
|
const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
|
|
6444
|
-
const viewportConfig =
|
|
6548
|
+
const viewportConfig = React11__namespace.useMemo(() => ({
|
|
6445
6549
|
once: shouldTriggerOnce,
|
|
6446
6550
|
amount: threshold,
|
|
6447
6551
|
...viewport
|
|
@@ -6472,7 +6576,7 @@ var ScrollRevealContainer = React10__namespace.forwardRef(
|
|
|
6472
6576
|
}
|
|
6473
6577
|
);
|
|
6474
6578
|
ScrollRevealContainer.displayName = "ScrollRevealContainer";
|
|
6475
|
-
var ScrollRevealItem =
|
|
6579
|
+
var ScrollRevealItem = React11__namespace.forwardRef(
|
|
6476
6580
|
({
|
|
6477
6581
|
children,
|
|
6478
6582
|
direction = "up",
|
|
@@ -6483,12 +6587,12 @@ var ScrollRevealItem = React10__namespace.forwardRef(
|
|
|
6483
6587
|
style,
|
|
6484
6588
|
id
|
|
6485
6589
|
}, ref) => {
|
|
6486
|
-
const animationVariants =
|
|
6590
|
+
const animationVariants = React11__namespace.useMemo(() => {
|
|
6487
6591
|
if (variants)
|
|
6488
6592
|
return variants;
|
|
6489
6593
|
return createDefaultVariants(direction, distance);
|
|
6490
6594
|
}, [direction, distance, variants]);
|
|
6491
|
-
const transition =
|
|
6595
|
+
const transition = React11__namespace.useMemo(() => ({
|
|
6492
6596
|
...defaultTransition,
|
|
6493
6597
|
duration
|
|
6494
6598
|
}), [duration]);
|
|
@@ -6604,7 +6708,7 @@ var separatorVariants = classVarianceAuthority.cva(
|
|
|
6604
6708
|
}
|
|
6605
6709
|
}
|
|
6606
6710
|
);
|
|
6607
|
-
var Separator3 =
|
|
6711
|
+
var Separator3 = React11__namespace.forwardRef(
|
|
6608
6712
|
({
|
|
6609
6713
|
className,
|
|
6610
6714
|
orientation = "horizontal",
|
|
@@ -6647,7 +6751,7 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
6647
6751
|
}
|
|
6648
6752
|
}
|
|
6649
6753
|
);
|
|
6650
|
-
var Toggle =
|
|
6754
|
+
var Toggle = React11__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6651
6755
|
TogglePrimitive__namespace.Root,
|
|
6652
6756
|
{
|
|
6653
6757
|
ref,
|
|
@@ -6683,7 +6787,7 @@ var tooltipVariants = classVarianceAuthority.cva(
|
|
|
6683
6787
|
);
|
|
6684
6788
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
6685
6789
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
6686
|
-
var TooltipArrow =
|
|
6790
|
+
var TooltipArrow = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6687
6791
|
TooltipPrimitive__namespace.Arrow,
|
|
6688
6792
|
{
|
|
6689
6793
|
ref,
|
|
@@ -6692,7 +6796,7 @@ var TooltipArrow = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
6692
6796
|
}
|
|
6693
6797
|
));
|
|
6694
6798
|
TooltipArrow.displayName = TooltipPrimitive__namespace.Arrow.displayName;
|
|
6695
|
-
var TooltipContent =
|
|
6799
|
+
var TooltipContent = React11__namespace.forwardRef(({ className, variant, size, showArrow = false, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6696
6800
|
TooltipPrimitive__namespace.Content,
|
|
6697
6801
|
{
|
|
6698
6802
|
ref,
|
|
@@ -6706,7 +6810,7 @@ var TooltipContent = React10__namespace.forwardRef(({ className, variant, size,
|
|
|
6706
6810
|
}
|
|
6707
6811
|
));
|
|
6708
6812
|
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
6709
|
-
var SimpleTooltip =
|
|
6813
|
+
var SimpleTooltip = React11__namespace.forwardRef(
|
|
6710
6814
|
({
|
|
6711
6815
|
children,
|
|
6712
6816
|
content,
|
|
@@ -6791,7 +6895,7 @@ var ColorPicker2 = ({ onColorSelect }) => {
|
|
|
6791
6895
|
color
|
|
6792
6896
|
)) });
|
|
6793
6897
|
};
|
|
6794
|
-
var SimpleEditor =
|
|
6898
|
+
var SimpleEditor = React11__namespace.default.forwardRef(
|
|
6795
6899
|
({
|
|
6796
6900
|
value = "",
|
|
6797
6901
|
onChange,
|
|
@@ -6804,13 +6908,13 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6804
6908
|
showPreview = true,
|
|
6805
6909
|
...props
|
|
6806
6910
|
}, ref) => {
|
|
6807
|
-
const [content, setContent] =
|
|
6808
|
-
const [isPreview, setIsPreview] =
|
|
6809
|
-
const [sourceContent, setSourceContent] =
|
|
6810
|
-
|
|
6811
|
-
const editorRef =
|
|
6812
|
-
const sourceRef =
|
|
6813
|
-
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({
|
|
6814
6918
|
bold: false,
|
|
6815
6919
|
italic: false,
|
|
6816
6920
|
underline: false,
|
|
@@ -6824,18 +6928,18 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6824
6928
|
quote: false,
|
|
6825
6929
|
code: false
|
|
6826
6930
|
});
|
|
6827
|
-
const updateContent =
|
|
6931
|
+
const updateContent = React11.useCallback((newContent) => {
|
|
6828
6932
|
setContent(newContent);
|
|
6829
6933
|
onChange?.(newContent);
|
|
6830
6934
|
}, [onChange]);
|
|
6831
|
-
const saveSelection =
|
|
6935
|
+
const saveSelection = React11.useCallback(() => {
|
|
6832
6936
|
const selection2 = window.getSelection();
|
|
6833
6937
|
if (selection2 && selection2.rangeCount > 0) {
|
|
6834
6938
|
return selection2.getRangeAt(0);
|
|
6835
6939
|
}
|
|
6836
6940
|
return null;
|
|
6837
6941
|
}, []);
|
|
6838
|
-
|
|
6942
|
+
React11.useCallback((range) => {
|
|
6839
6943
|
if (!range)
|
|
6840
6944
|
return;
|
|
6841
6945
|
const selection2 = window.getSelection();
|
|
@@ -6844,7 +6948,7 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6844
6948
|
selection2.addRange(range);
|
|
6845
6949
|
}
|
|
6846
6950
|
}, []);
|
|
6847
|
-
const executeCommand =
|
|
6951
|
+
const executeCommand = React11.useCallback((command, value2) => {
|
|
6848
6952
|
if (disabled)
|
|
6849
6953
|
return;
|
|
6850
6954
|
if (editorRef.current) {
|
|
@@ -6877,11 +6981,11 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6877
6981
|
editorRef.current.focus();
|
|
6878
6982
|
}
|
|
6879
6983
|
}, [disabled, saveSelection, updateContent]);
|
|
6880
|
-
const handleInput =
|
|
6984
|
+
const handleInput = React11.useCallback((e) => {
|
|
6881
6985
|
const newContent = e.currentTarget.innerHTML;
|
|
6882
6986
|
updateContent(newContent);
|
|
6883
6987
|
}, [updateContent]);
|
|
6884
|
-
const handleKeyDown =
|
|
6988
|
+
const handleKeyDown = React11.useCallback((e) => {
|
|
6885
6989
|
if (e.ctrlKey || e.metaKey) {
|
|
6886
6990
|
switch (e.key) {
|
|
6887
6991
|
case "b":
|
|
@@ -6911,22 +7015,22 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6911
7015
|
executeCommand("insertHTML", " ");
|
|
6912
7016
|
}
|
|
6913
7017
|
}, [executeCommand]);
|
|
6914
|
-
const insertLink =
|
|
7018
|
+
const insertLink = React11.useCallback(() => {
|
|
6915
7019
|
const url = prompt("Enter URL:");
|
|
6916
7020
|
if (url) {
|
|
6917
7021
|
executeCommand("createLink", url);
|
|
6918
7022
|
}
|
|
6919
7023
|
}, [executeCommand]);
|
|
6920
|
-
const insertImage =
|
|
7024
|
+
const insertImage = React11.useCallback(() => {
|
|
6921
7025
|
const url = prompt("Enter image URL:");
|
|
6922
7026
|
if (url) {
|
|
6923
7027
|
executeCommand("insertImage", url);
|
|
6924
7028
|
}
|
|
6925
7029
|
}, [executeCommand]);
|
|
6926
|
-
const formatHeading =
|
|
7030
|
+
const formatHeading = React11.useCallback((level) => {
|
|
6927
7031
|
executeCommand("formatBlock", `<h${level}>`);
|
|
6928
7032
|
}, [executeCommand]);
|
|
6929
|
-
const setTextColor =
|
|
7033
|
+
const setTextColor = React11.useCallback((color) => {
|
|
6930
7034
|
const selection2 = window.getSelection();
|
|
6931
7035
|
if (selection2 && selection2.rangeCount > 0) {
|
|
6932
7036
|
const range = selection2.getRangeAt(0);
|
|
@@ -6943,12 +7047,12 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
6943
7047
|
}
|
|
6944
7048
|
}
|
|
6945
7049
|
}, [executeCommand, updateContent]);
|
|
6946
|
-
|
|
7050
|
+
React11__namespace.default.useEffect(() => {
|
|
6947
7051
|
if (editorRef.current && content && content !== editorRef.current.innerHTML) {
|
|
6948
7052
|
editorRef.current.innerHTML = content;
|
|
6949
7053
|
}
|
|
6950
7054
|
}, [content]);
|
|
6951
|
-
|
|
7055
|
+
React11__namespace.default.useEffect(() => {
|
|
6952
7056
|
if (value !== void 0 && value !== content) {
|
|
6953
7057
|
setContent(value);
|
|
6954
7058
|
setSourceContent(value);
|
|
@@ -7305,8 +7409,8 @@ var SimpleEditor = React10__namespace.default.forwardRef(
|
|
|
7305
7409
|
);
|
|
7306
7410
|
SimpleEditor.displayName = "SimpleEditor";
|
|
7307
7411
|
var CharacterCount = ({ content }) => {
|
|
7308
|
-
const [count, setCount] =
|
|
7309
|
-
|
|
7412
|
+
const [count, setCount] = React11.useState(0);
|
|
7413
|
+
React11.useEffect(() => {
|
|
7310
7414
|
const getPlainText = (html) => {
|
|
7311
7415
|
const div = document.createElement("div");
|
|
7312
7416
|
div.innerHTML = html;
|
|
@@ -7353,7 +7457,7 @@ var skeletonVariants = classVarianceAuthority.cva(
|
|
|
7353
7457
|
}
|
|
7354
7458
|
}
|
|
7355
7459
|
);
|
|
7356
|
-
var Skeleton =
|
|
7460
|
+
var Skeleton = React11__namespace.forwardRef(
|
|
7357
7461
|
({
|
|
7358
7462
|
className,
|
|
7359
7463
|
variant,
|
|
@@ -7437,7 +7541,7 @@ var Skeleton = React10__namespace.forwardRef(
|
|
|
7437
7541
|
}
|
|
7438
7542
|
);
|
|
7439
7543
|
Skeleton.displayName = "Skeleton";
|
|
7440
|
-
var SkeletonText =
|
|
7544
|
+
var SkeletonText = React11__namespace.forwardRef(
|
|
7441
7545
|
({
|
|
7442
7546
|
className,
|
|
7443
7547
|
lines = 3,
|
|
@@ -7478,7 +7582,7 @@ var SkeletonText = React10__namespace.forwardRef(
|
|
|
7478
7582
|
}
|
|
7479
7583
|
);
|
|
7480
7584
|
SkeletonText.displayName = "SkeletonText";
|
|
7481
|
-
var SkeletonAvatar =
|
|
7585
|
+
var SkeletonAvatar = React11__namespace.forwardRef(
|
|
7482
7586
|
({
|
|
7483
7587
|
className,
|
|
7484
7588
|
size = "2.5rem",
|
|
@@ -7504,7 +7608,7 @@ var SkeletonAvatar = React10__namespace.forwardRef(
|
|
|
7504
7608
|
}
|
|
7505
7609
|
);
|
|
7506
7610
|
SkeletonAvatar.displayName = "SkeletonAvatar";
|
|
7507
|
-
var SkeletonCard =
|
|
7611
|
+
var SkeletonCard = React11__namespace.forwardRef(
|
|
7508
7612
|
({
|
|
7509
7613
|
className,
|
|
7510
7614
|
showHeader = true,
|
|
@@ -7578,11 +7682,11 @@ var SkeletonCard = React10__namespace.forwardRef(
|
|
|
7578
7682
|
}
|
|
7579
7683
|
);
|
|
7580
7684
|
SkeletonCard.displayName = "SkeletonCard";
|
|
7581
|
-
var SwipeableCard =
|
|
7685
|
+
var SwipeableCard = React11__namespace.forwardRef(
|
|
7582
7686
|
({ className, children, onSwipeLeft, onSwipeRight, threshold = 100, disabled = false, ...props }, ref) => {
|
|
7583
|
-
const [startX, setStartX] =
|
|
7584
|
-
const [currentX, setCurrentX] =
|
|
7585
|
-
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);
|
|
7586
7690
|
const handleTouchStart = (e) => {
|
|
7587
7691
|
if (disabled)
|
|
7588
7692
|
return;
|
|
@@ -7628,54 +7732,95 @@ var SwipeableCard = React10__namespace.forwardRef(
|
|
|
7628
7732
|
}
|
|
7629
7733
|
);
|
|
7630
7734
|
SwipeableCard.displayName = "SwipeableCard";
|
|
7631
|
-
var
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
"
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
className: cn(
|
|
7663
|
-
"pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
7664
|
-
// Boyuta göre thumb boyutları
|
|
7665
|
-
size === "sm" && "h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",
|
|
7666
|
-
size === "md" && "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
7667
|
-
size === "lg" && "h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0"
|
|
7668
|
-
)
|
|
7669
|
-
}
|
|
7670
|
-
)
|
|
7671
|
-
]
|
|
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"
|
|
7672
7766
|
}
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
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
|
+
});
|
|
7677
7822
|
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
7678
|
-
var TagsInput =
|
|
7823
|
+
var TagsInput = React11__namespace.forwardRef(
|
|
7679
7824
|
({
|
|
7680
7825
|
value = [],
|
|
7681
7826
|
onChange,
|
|
@@ -7688,8 +7833,8 @@ var TagsInput = React10__namespace.forwardRef(
|
|
|
7688
7833
|
disabled,
|
|
7689
7834
|
...props
|
|
7690
7835
|
}, ref) => {
|
|
7691
|
-
const [inputValue, setInputValue] =
|
|
7692
|
-
const [error, setError] =
|
|
7836
|
+
const [inputValue, setInputValue] = React11__namespace.useState("");
|
|
7837
|
+
const [error, setError] = React11__namespace.useState("");
|
|
7693
7838
|
const handleKeyDown = (e) => {
|
|
7694
7839
|
if (e.key === "Enter" || e.key === delimiter) {
|
|
7695
7840
|
e.preventDefault();
|
|
@@ -7820,7 +7965,7 @@ var textareaVariants = classVarianceAuthority.cva(
|
|
|
7820
7965
|
}
|
|
7821
7966
|
}
|
|
7822
7967
|
);
|
|
7823
|
-
var Textarea =
|
|
7968
|
+
var Textarea = React11__namespace.forwardRef(
|
|
7824
7969
|
({
|
|
7825
7970
|
className,
|
|
7826
7971
|
wrapperClassName,
|
|
@@ -7840,10 +7985,10 @@ var Textarea = React10__namespace.forwardRef(
|
|
|
7840
7985
|
onChange,
|
|
7841
7986
|
...props
|
|
7842
7987
|
}, ref) => {
|
|
7843
|
-
const textareaRef =
|
|
7844
|
-
const [internalValue, setInternalValue] =
|
|
7845
|
-
|
|
7846
|
-
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(() => {
|
|
7847
7992
|
const textarea = textareaRef.current;
|
|
7848
7993
|
if (!textarea || !autoResize)
|
|
7849
7994
|
return;
|
|
@@ -7857,10 +8002,10 @@ var Textarea = React10__namespace.forwardRef(
|
|
|
7857
8002
|
textarea.style.overflowY = "hidden";
|
|
7858
8003
|
}
|
|
7859
8004
|
}, [autoResize, maxHeight]);
|
|
7860
|
-
|
|
8005
|
+
React11__namespace.useEffect(() => {
|
|
7861
8006
|
adjustHeight();
|
|
7862
8007
|
}, [internalValue, adjustHeight]);
|
|
7863
|
-
|
|
8008
|
+
React11__namespace.useEffect(() => {
|
|
7864
8009
|
if (value !== void 0) {
|
|
7865
8010
|
setInternalValue(value);
|
|
7866
8011
|
}
|
|
@@ -7926,7 +8071,7 @@ var Textarea = React10__namespace.forwardRef(
|
|
|
7926
8071
|
);
|
|
7927
8072
|
Textarea.displayName = "Textarea";
|
|
7928
8073
|
var ToastProvider = ToastPrimitives__namespace.Provider;
|
|
7929
|
-
var ToastViewport =
|
|
8074
|
+
var ToastViewport = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7930
8075
|
ToastPrimitives__namespace.Viewport,
|
|
7931
8076
|
{
|
|
7932
8077
|
ref,
|
|
@@ -7955,7 +8100,7 @@ var toastVariants = classVarianceAuthority.cva(
|
|
|
7955
8100
|
}
|
|
7956
8101
|
}
|
|
7957
8102
|
);
|
|
7958
|
-
var Toast =
|
|
8103
|
+
var Toast = React11__namespace.forwardRef(({ className, variant, ...props }, ref) => {
|
|
7959
8104
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7960
8105
|
ToastPrimitives__namespace.Root,
|
|
7961
8106
|
{
|
|
@@ -7966,7 +8111,7 @@ var Toast = React10__namespace.forwardRef(({ className, variant, ...props }, ref
|
|
|
7966
8111
|
);
|
|
7967
8112
|
});
|
|
7968
8113
|
Toast.displayName = ToastPrimitives__namespace.Root.displayName;
|
|
7969
|
-
var ToastAction =
|
|
8114
|
+
var ToastAction = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7970
8115
|
ToastPrimitives__namespace.Action,
|
|
7971
8116
|
{
|
|
7972
8117
|
ref,
|
|
@@ -7978,7 +8123,7 @@ var ToastAction = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
7978
8123
|
}
|
|
7979
8124
|
));
|
|
7980
8125
|
ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
|
|
7981
|
-
var ToastClose =
|
|
8126
|
+
var ToastClose = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7982
8127
|
ToastPrimitives__namespace.Close,
|
|
7983
8128
|
{
|
|
7984
8129
|
ref,
|
|
@@ -7992,7 +8137,7 @@ var ToastClose = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
7992
8137
|
}
|
|
7993
8138
|
));
|
|
7994
8139
|
ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
|
|
7995
|
-
var ToastTitle =
|
|
8140
|
+
var ToastTitle = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7996
8141
|
ToastPrimitives__namespace.Title,
|
|
7997
8142
|
{
|
|
7998
8143
|
ref,
|
|
@@ -8001,7 +8146,7 @@ var ToastTitle = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
8001
8146
|
}
|
|
8002
8147
|
));
|
|
8003
8148
|
ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
|
|
8004
|
-
var ToastDescription =
|
|
8149
|
+
var ToastDescription = React11__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8005
8150
|
ToastPrimitives__namespace.Description,
|
|
8006
8151
|
{
|
|
8007
8152
|
ref,
|
|
@@ -8109,8 +8254,8 @@ function toast({ ...props }) {
|
|
|
8109
8254
|
};
|
|
8110
8255
|
}
|
|
8111
8256
|
function useToast() {
|
|
8112
|
-
const [state, setState] =
|
|
8113
|
-
|
|
8257
|
+
const [state, setState] = React11__namespace.useState(memoryState);
|
|
8258
|
+
React11__namespace.useEffect(() => {
|
|
8114
8259
|
listeners.push(setState);
|
|
8115
8260
|
return () => {
|
|
8116
8261
|
const index = listeners.indexOf(setState);
|
|
@@ -8163,7 +8308,7 @@ var kbdVariants = classVarianceAuthority.cva(
|
|
|
8163
8308
|
}
|
|
8164
8309
|
}
|
|
8165
8310
|
);
|
|
8166
|
-
var Kbd =
|
|
8311
|
+
var Kbd = React11__namespace.forwardRef(
|
|
8167
8312
|
({ className, size, children, ...props }, ref) => {
|
|
8168
8313
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8169
8314
|
"kbd",
|
|
@@ -8200,7 +8345,7 @@ var iconSizeMap = {
|
|
|
8200
8345
|
md: "h-5 w-5",
|
|
8201
8346
|
lg: "h-6 w-6"
|
|
8202
8347
|
};
|
|
8203
|
-
var Rating =
|
|
8348
|
+
var Rating = React11__namespace.forwardRef(
|
|
8204
8349
|
({
|
|
8205
8350
|
className,
|
|
8206
8351
|
value,
|
|
@@ -8218,11 +8363,11 @@ var Rating = React10__namespace.forwardRef(
|
|
|
8218
8363
|
const iconSizeClass = iconSizeMap[resolvedSize];
|
|
8219
8364
|
const step = precision === "half" ? 0.5 : 1;
|
|
8220
8365
|
const isControlled = value !== void 0;
|
|
8221
|
-
const [internalValue, setInternalValue] =
|
|
8366
|
+
const [internalValue, setInternalValue] = React11__namespace.useState(defaultValue ?? 0);
|
|
8222
8367
|
const currentValue = isControlled ? value ?? 0 : internalValue;
|
|
8223
|
-
const [hoverValue, setHoverValue] =
|
|
8368
|
+
const [hoverValue, setHoverValue] = React11__namespace.useState(null);
|
|
8224
8369
|
const displayValue = hoverValue !== null ? hoverValue : currentValue;
|
|
8225
|
-
const commit =
|
|
8370
|
+
const commit = React11__namespace.useCallback(
|
|
8226
8371
|
(next) => {
|
|
8227
8372
|
if (readOnly)
|
|
8228
8373
|
return;
|
|
@@ -8232,7 +8377,7 @@ var Rating = React10__namespace.forwardRef(
|
|
|
8232
8377
|
},
|
|
8233
8378
|
[readOnly, isControlled, onValueChange]
|
|
8234
8379
|
);
|
|
8235
|
-
const handleKeyDown =
|
|
8380
|
+
const handleKeyDown = React11__namespace.useCallback(
|
|
8236
8381
|
(event) => {
|
|
8237
8382
|
if (readOnly)
|
|
8238
8383
|
return;
|
|
@@ -8261,9 +8406,9 @@ var Rating = React10__namespace.forwardRef(
|
|
|
8261
8406
|
[readOnly, max, currentValue, step, commit]
|
|
8262
8407
|
);
|
|
8263
8408
|
const renderIcon = (filled) => {
|
|
8264
|
-
if (
|
|
8409
|
+
if (React11__namespace.isValidElement(icon)) {
|
|
8265
8410
|
const element = icon;
|
|
8266
|
-
return
|
|
8411
|
+
return React11__namespace.cloneElement(element, {
|
|
8267
8412
|
className: cn(
|
|
8268
8413
|
iconSizeClass,
|
|
8269
8414
|
"shrink-0",
|
|
@@ -8397,7 +8542,7 @@ var dotSizeMap = {
|
|
|
8397
8542
|
lg: "h-2 w-2",
|
|
8398
8543
|
xl: "h-2.5 w-2.5"
|
|
8399
8544
|
};
|
|
8400
|
-
var Spinner =
|
|
8545
|
+
var Spinner = React11__namespace.forwardRef(
|
|
8401
8546
|
({ className, size, variant = "default", label = "Loading", ...props }, ref) => {
|
|
8402
8547
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8403
8548
|
"div",
|
|
@@ -8476,15 +8621,15 @@ var buttonGroupVariants = classVarianceAuthority.cva(
|
|
|
8476
8621
|
}
|
|
8477
8622
|
}
|
|
8478
8623
|
);
|
|
8479
|
-
var ButtonGroup =
|
|
8624
|
+
var ButtonGroup = React11__namespace.forwardRef(
|
|
8480
8625
|
({ className, orientation, attached, size, variant, children, ...props }, ref) => {
|
|
8481
8626
|
const shouldPropagate = size !== void 0 || variant !== void 0;
|
|
8482
|
-
const enhancedChildren = shouldPropagate ?
|
|
8483
|
-
if (!
|
|
8627
|
+
const enhancedChildren = shouldPropagate ? React11__namespace.Children.map(children, (child) => {
|
|
8628
|
+
if (!React11__namespace.isValidElement(child) || child.type !== Button) {
|
|
8484
8629
|
return child;
|
|
8485
8630
|
}
|
|
8486
8631
|
const childProps = child.props;
|
|
8487
|
-
return
|
|
8632
|
+
return React11__namespace.cloneElement(child, {
|
|
8488
8633
|
size: childProps.size ?? size,
|
|
8489
8634
|
variant: childProps.variant ?? variant
|
|
8490
8635
|
});
|
|
@@ -8502,16 +8647,20 @@ var ButtonGroup = React10__namespace.forwardRef(
|
|
|
8502
8647
|
}
|
|
8503
8648
|
);
|
|
8504
8649
|
ButtonGroup.displayName = "ButtonGroup";
|
|
8505
|
-
var ToggleGroupContext =
|
|
8650
|
+
var ToggleGroupContext = React11__namespace.createContext({
|
|
8506
8651
|
size: "default",
|
|
8507
8652
|
variant: "default"
|
|
8508
8653
|
});
|
|
8509
|
-
var ToggleGroup =
|
|
8654
|
+
var ToggleGroup = React11__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8510
8655
|
ToggleGroupPrimitive__namespace.Root,
|
|
8511
8656
|
{
|
|
8512
8657
|
ref,
|
|
8513
8658
|
className: cn(
|
|
8514
8659
|
"moonui-theme inline-flex items-center justify-center gap-1",
|
|
8660
|
+
// Radix roving-focus kök elemana `data-orientation` yazar; dikey yerleşim
|
|
8661
|
+
// buna bağlanır. Yatay/tanımsız durumda taban sınıflar geçerli kalır —
|
|
8662
|
+
// yani mevcut render değişmez. Kardeş `button-group` ile desen paritesi.
|
|
8663
|
+
"data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",
|
|
8515
8664
|
className
|
|
8516
8665
|
),
|
|
8517
8666
|
...props,
|
|
@@ -8519,8 +8668,8 @@ var ToggleGroup = React10__namespace.forwardRef(({ className, variant, size, chi
|
|
|
8519
8668
|
}
|
|
8520
8669
|
));
|
|
8521
8670
|
ToggleGroup.displayName = "ToggleGroup";
|
|
8522
|
-
var ToggleGroupItem =
|
|
8523
|
-
const context =
|
|
8671
|
+
var ToggleGroupItem = React11__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
8672
|
+
const context = React11__namespace.useContext(ToggleGroupContext);
|
|
8524
8673
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8525
8674
|
ToggleGroupPrimitive__namespace.Item,
|
|
8526
8675
|
{
|
|
@@ -8947,6 +9096,7 @@ exports.ratingVariants = ratingVariants;
|
|
|
8947
9096
|
exports.separatorVariants = separatorVariants;
|
|
8948
9097
|
exports.skeletonVariants = skeletonVariants;
|
|
8949
9098
|
exports.spinnerVariants = spinnerVariants;
|
|
9099
|
+
exports.switchVariants = switchVariants;
|
|
8950
9100
|
exports.toast = toast;
|
|
8951
9101
|
exports.toggleVariants = toggleVariants;
|
|
8952
9102
|
exports.tooltipVariants = tooltipVariants;
|