@moontra/moonui 6.1.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-VXDFZPDA.global.js +33 -0
- package/dist/chunk-VXDFZPDA.global.js.map +1 -0
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.global.js +1 -30
- package/dist/hooks/index.global.js.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.global.js +458 -153
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +476 -364
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +438 -326
- package/dist/index.mjs.map +1 -1
- package/dist/lib/theme.d.mts +1 -1
- package/dist/lib/theme.d.ts +1 -1
- package/dist/lib/theme.global.js +6 -30
- package/dist/lib/theme.global.js.map +1 -1
- package/dist/lib/theme.js +11 -6
- package/dist/lib/theme.js.map +1 -1
- package/dist/lib/theme.mjs +11 -6
- package/dist/lib/theme.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/__tests__/badge.test.tsx +67 -9
- package/src/components/ui/__tests__/input.test.tsx +4 -1
- package/src/components/ui/badge.tsx +12 -2
- package/src/components/ui/button.tsx +12 -1
- package/src/components/ui/input.tsx +15 -4
- package/src/components/ui/select.tsx +12 -1
- package/src/components/ui/textarea.tsx +15 -4
- package/src/lib/utils.ts +25 -0
- package/dist/chunk-2EN7SB2G.global.js +0 -33
- package/dist/chunk-2EN7SB2G.global.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var React25 = 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 React25__namespace = /*#__PURE__*/_interopNamespace(React25);
|
|
56
56
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
57
57
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
58
58
|
var useEmblaCarousel__default = /*#__PURE__*/_interopDefault(useEmblaCarousel);
|
|
@@ -75,8 +75,22 @@ var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroup
|
|
|
75
75
|
function cn(...inputs) {
|
|
76
76
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
77
77
|
}
|
|
78
|
+
function readableText(node) {
|
|
79
|
+
if (node === null || node === void 0 || typeof node === "boolean")
|
|
80
|
+
return "";
|
|
81
|
+
if (typeof node === "string" || typeof node === "number")
|
|
82
|
+
return String(node);
|
|
83
|
+
if (Array.isArray(node)) {
|
|
84
|
+
return node.map(readableText).filter(Boolean).join(" ").trim();
|
|
85
|
+
}
|
|
86
|
+
if (React25__namespace.isValidElement(node)) {
|
|
87
|
+
const props = node.props;
|
|
88
|
+
return readableText(props.children);
|
|
89
|
+
}
|
|
90
|
+
return "";
|
|
91
|
+
}
|
|
78
92
|
var Accordion = AccordionPrimitive__namespace.Root;
|
|
79
|
-
var AccordionItem =
|
|
93
|
+
var AccordionItem = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
94
|
AccordionPrimitive__namespace.Item,
|
|
81
95
|
{
|
|
82
96
|
ref,
|
|
@@ -85,7 +99,7 @@ var AccordionItem = React24__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
85
99
|
}
|
|
86
100
|
));
|
|
87
101
|
AccordionItem.displayName = "AccordionItem";
|
|
88
|
-
var AccordionTrigger =
|
|
102
|
+
var AccordionTrigger = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
89
103
|
AccordionPrimitive__namespace.Trigger,
|
|
90
104
|
{
|
|
91
105
|
ref,
|
|
@@ -103,7 +117,7 @@ var AccordionTrigger = React24__namespace.forwardRef(({ className, children, ...
|
|
|
103
117
|
}
|
|
104
118
|
) }));
|
|
105
119
|
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
106
|
-
var AccordionContent =
|
|
120
|
+
var AccordionContent = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
107
121
|
AccordionPrimitive__namespace.Content,
|
|
108
122
|
{
|
|
109
123
|
ref,
|
|
@@ -156,7 +170,7 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
156
170
|
}
|
|
157
171
|
}
|
|
158
172
|
);
|
|
159
|
-
var Alert =
|
|
173
|
+
var Alert = React25__namespace.forwardRef(
|
|
160
174
|
({
|
|
161
175
|
className,
|
|
162
176
|
variant = "default",
|
|
@@ -168,7 +182,7 @@ var Alert = React24__namespace.forwardRef(
|
|
|
168
182
|
children,
|
|
169
183
|
...props
|
|
170
184
|
}, ref) => {
|
|
171
|
-
const Icon2 =
|
|
185
|
+
const Icon2 = React25__namespace.useMemo(() => {
|
|
172
186
|
switch (variant) {
|
|
173
187
|
case "success":
|
|
174
188
|
return lucideReact.Check;
|
|
@@ -216,7 +230,7 @@ var Alert = React24__namespace.forwardRef(
|
|
|
216
230
|
}
|
|
217
231
|
);
|
|
218
232
|
Alert.displayName = "Alert";
|
|
219
|
-
var AlertTitle =
|
|
233
|
+
var AlertTitle = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
220
234
|
"h5",
|
|
221
235
|
{
|
|
222
236
|
ref,
|
|
@@ -229,7 +243,7 @@ var AlertTitle = React24__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
229
243
|
}
|
|
230
244
|
));
|
|
231
245
|
AlertTitle.displayName = "AlertTitle";
|
|
232
|
-
var AlertDescription =
|
|
246
|
+
var AlertDescription = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
233
247
|
"div",
|
|
234
248
|
{
|
|
235
249
|
ref,
|
|
@@ -271,7 +285,7 @@ var aspectRatioVariants = classVarianceAuthority.cva(
|
|
|
271
285
|
}
|
|
272
286
|
}
|
|
273
287
|
);
|
|
274
|
-
var AspectRatio =
|
|
288
|
+
var AspectRatio = React25__namespace.forwardRef(({ className, variant, radius, ratio = 16 / 9, style, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
275
289
|
"div",
|
|
276
290
|
{
|
|
277
291
|
ref,
|
|
@@ -320,7 +334,7 @@ var avatarVariants = classVarianceAuthority.cva(
|
|
|
320
334
|
}
|
|
321
335
|
}
|
|
322
336
|
);
|
|
323
|
-
var Avatar =
|
|
337
|
+
var Avatar = React25__namespace.forwardRef(({ className, size, radius, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
324
338
|
AvatarPrimitive__namespace.Root,
|
|
325
339
|
{
|
|
326
340
|
ref,
|
|
@@ -329,7 +343,7 @@ var Avatar = React24__namespace.forwardRef(({ className, size, radius, variant,
|
|
|
329
343
|
}
|
|
330
344
|
));
|
|
331
345
|
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
332
|
-
var AvatarImage =
|
|
346
|
+
var AvatarImage = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
333
347
|
AvatarPrimitive__namespace.Image,
|
|
334
348
|
{
|
|
335
349
|
ref,
|
|
@@ -338,7 +352,7 @@ var AvatarImage = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
338
352
|
}
|
|
339
353
|
));
|
|
340
354
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
341
|
-
var AvatarFallback =
|
|
355
|
+
var AvatarFallback = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
342
356
|
AvatarPrimitive__namespace.Fallback,
|
|
343
357
|
{
|
|
344
358
|
ref,
|
|
@@ -350,9 +364,9 @@ var AvatarFallback = React24__namespace.forwardRef(({ className, ...props }, ref
|
|
|
350
364
|
}
|
|
351
365
|
));
|
|
352
366
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
353
|
-
var AvatarGroup =
|
|
367
|
+
var AvatarGroup = React25__namespace.forwardRef(
|
|
354
368
|
({ className, max, children, overlapOffset = -8, ...props }, ref) => {
|
|
355
|
-
const childrenArray =
|
|
369
|
+
const childrenArray = React25__namespace.Children.toArray(children);
|
|
356
370
|
const visibleAvatars = max ? childrenArray.slice(0, max) : childrenArray;
|
|
357
371
|
const remainingCount = max ? Math.max(0, childrenArray.length - max) : 0;
|
|
358
372
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -483,7 +497,7 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
483
497
|
}
|
|
484
498
|
}
|
|
485
499
|
);
|
|
486
|
-
var Badge =
|
|
500
|
+
var Badge = React25__namespace.forwardRef(({
|
|
487
501
|
className,
|
|
488
502
|
variant,
|
|
489
503
|
size,
|
|
@@ -492,6 +506,7 @@ var Badge = React24__namespace.forwardRef(({
|
|
|
492
506
|
dotColor,
|
|
493
507
|
removable,
|
|
494
508
|
onRemove,
|
|
509
|
+
removeLabel,
|
|
495
510
|
leftIcon,
|
|
496
511
|
rightIcon,
|
|
497
512
|
noAutoSpacing,
|
|
@@ -548,7 +563,7 @@ var Badge = React24__namespace.forwardRef(({
|
|
|
548
563
|
e.stopPropagation();
|
|
549
564
|
onRemove();
|
|
550
565
|
},
|
|
551
|
-
"aria-label": "Remove badge",
|
|
566
|
+
"aria-label": removeLabel || (readableText(autoChildren) ? `Remove ${readableText(autoChildren)}` : "Remove badge"),
|
|
552
567
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
553
568
|
"svg",
|
|
554
569
|
{
|
|
@@ -590,7 +605,7 @@ var breadcrumbVariants = classVarianceAuthority.cva(
|
|
|
590
605
|
}
|
|
591
606
|
}
|
|
592
607
|
);
|
|
593
|
-
var Breadcrumb =
|
|
608
|
+
var Breadcrumb = React25__namespace.forwardRef(
|
|
594
609
|
({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
595
610
|
"nav",
|
|
596
611
|
{
|
|
@@ -602,9 +617,9 @@ var Breadcrumb = React24__namespace.forwardRef(
|
|
|
602
617
|
)
|
|
603
618
|
);
|
|
604
619
|
Breadcrumb.displayName = "Breadcrumb";
|
|
605
|
-
var BreadcrumbList =
|
|
620
|
+
var BreadcrumbList = React25__namespace.forwardRef(
|
|
606
621
|
({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
|
|
607
|
-
const childrenArray =
|
|
622
|
+
const childrenArray = React25__namespace.Children.toArray(props.children).filter(Boolean);
|
|
608
623
|
const childCount = childrenArray.length;
|
|
609
624
|
if (collapsed && childCount > collapsedWidth) {
|
|
610
625
|
const firstItem = childrenArray[0];
|
|
@@ -640,9 +655,9 @@ var BreadcrumbList = React24__namespace.forwardRef(
|
|
|
640
655
|
}
|
|
641
656
|
);
|
|
642
657
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
643
|
-
var BreadcrumbItem =
|
|
658
|
+
var BreadcrumbItem = React25__namespace.forwardRef(
|
|
644
659
|
({ className, isCurrent, href, asChild = false, ...props }, ref) => {
|
|
645
|
-
const Comp = asChild ?
|
|
660
|
+
const Comp = asChild ? React25__namespace.Fragment : href ? "a" : "span";
|
|
646
661
|
const itemProps = asChild ? {} : href ? { href } : {};
|
|
647
662
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
648
663
|
"li",
|
|
@@ -699,7 +714,7 @@ var BreadcrumbEllipsis = ({
|
|
|
699
714
|
}
|
|
700
715
|
);
|
|
701
716
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
702
|
-
var BreadcrumbLink =
|
|
717
|
+
var BreadcrumbLink = React25__namespace.forwardRef(
|
|
703
718
|
({ className, href, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
704
719
|
"a",
|
|
705
720
|
{
|
|
@@ -714,7 +729,7 @@ var BreadcrumbLink = React24__namespace.forwardRef(
|
|
|
714
729
|
)
|
|
715
730
|
);
|
|
716
731
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
717
|
-
var BreadcrumbPage =
|
|
732
|
+
var BreadcrumbPage = React25__namespace.forwardRef(
|
|
718
733
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
719
734
|
"span",
|
|
720
735
|
{
|
|
@@ -754,7 +769,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
754
769
|
"dark:bg-gray-800 dark:text-gray-100",
|
|
755
770
|
"hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
756
771
|
"active:bg-gray-300 dark:active:bg-gray-600",
|
|
757
|
-
"border border-
|
|
772
|
+
"border border-input",
|
|
758
773
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
759
774
|
"shadow-sm hover:shadow-md"
|
|
760
775
|
],
|
|
@@ -877,7 +892,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
877
892
|
}
|
|
878
893
|
}
|
|
879
894
|
);
|
|
880
|
-
var Button =
|
|
895
|
+
var Button = React25__namespace.forwardRef(
|
|
881
896
|
({
|
|
882
897
|
className,
|
|
883
898
|
variant,
|
|
@@ -996,7 +1011,26 @@ var springAnimations = {
|
|
|
996
1011
|
type: "spring",
|
|
997
1012
|
stiffness: 260,
|
|
998
1013
|
damping: 20
|
|
999
|
-
}
|
|
1014
|
+
},
|
|
1015
|
+
// Bouncy spring for playful interactions
|
|
1016
|
+
bouncy: {
|
|
1017
|
+
type: "spring",
|
|
1018
|
+
stiffness: 300,
|
|
1019
|
+
damping: 15
|
|
1020
|
+
},
|
|
1021
|
+
// Stiff spring for quick responses
|
|
1022
|
+
stiff: {
|
|
1023
|
+
type: "spring",
|
|
1024
|
+
stiffness: 400,
|
|
1025
|
+
damping: 25
|
|
1026
|
+
},
|
|
1027
|
+
// Gentle spring for subtle movements
|
|
1028
|
+
gentle: {
|
|
1029
|
+
type: "spring",
|
|
1030
|
+
stiffness: 150,
|
|
1031
|
+
damping: 15
|
|
1032
|
+
}
|
|
1033
|
+
};
|
|
1000
1034
|
var hoverAnimations = {
|
|
1001
1035
|
lift: {
|
|
1002
1036
|
y: -2,
|
|
@@ -1009,12 +1043,22 @@ var hoverAnimations = {
|
|
|
1009
1043
|
glow: {
|
|
1010
1044
|
boxShadow: "0 0 20px rgba(var(--primary), 0.3)",
|
|
1011
1045
|
transition: springAnimations.smooth
|
|
1012
|
-
}
|
|
1046
|
+
},
|
|
1047
|
+
rotate: {
|
|
1048
|
+
rotate: 2,
|
|
1049
|
+
transition: springAnimations.bouncy
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1013
1052
|
var tapAnimations = {
|
|
1014
1053
|
scale: {
|
|
1015
1054
|
scale: 0.95,
|
|
1016
1055
|
transition: { duration: 0.1 }
|
|
1017
|
-
}
|
|
1056
|
+
},
|
|
1057
|
+
depress: {
|
|
1058
|
+
y: 1,
|
|
1059
|
+
transition: { duration: 0.1 }
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1018
1062
|
var skeletonAnimation = {
|
|
1019
1063
|
initial: { opacity: 0.5 },
|
|
1020
1064
|
animate: {
|
|
@@ -1063,7 +1107,7 @@ var cardVariants = classVarianceAuthority.cva(
|
|
|
1063
1107
|
}
|
|
1064
1108
|
}
|
|
1065
1109
|
);
|
|
1066
|
-
var Card =
|
|
1110
|
+
var Card = React25__namespace.forwardRef(
|
|
1067
1111
|
({ className, variant, size, radius, interactive, microInteraction = "lift", ...props }, ref) => {
|
|
1068
1112
|
if (interactive && microInteraction !== "none") {
|
|
1069
1113
|
const interactionProps = {
|
|
@@ -1091,7 +1135,7 @@ var Card = React24__namespace.forwardRef(
|
|
|
1091
1135
|
}
|
|
1092
1136
|
);
|
|
1093
1137
|
Card.displayName = "Card";
|
|
1094
|
-
var CardHeader =
|
|
1138
|
+
var CardHeader = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1095
1139
|
"div",
|
|
1096
1140
|
{
|
|
1097
1141
|
ref,
|
|
@@ -1100,7 +1144,7 @@ var CardHeader = React24__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1100
1144
|
}
|
|
1101
1145
|
));
|
|
1102
1146
|
CardHeader.displayName = "CardHeader";
|
|
1103
|
-
var CardTitle =
|
|
1147
|
+
var CardTitle = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1104
1148
|
"h3",
|
|
1105
1149
|
{
|
|
1106
1150
|
ref,
|
|
@@ -1109,7 +1153,7 @@ var CardTitle = React24__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1109
1153
|
}
|
|
1110
1154
|
));
|
|
1111
1155
|
CardTitle.displayName = "CardTitle";
|
|
1112
|
-
var CardDescription =
|
|
1156
|
+
var CardDescription = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1113
1157
|
"p",
|
|
1114
1158
|
{
|
|
1115
1159
|
ref,
|
|
@@ -1118,9 +1162,9 @@ var CardDescription = React24__namespace.forwardRef(({ className, ...props }, re
|
|
|
1118
1162
|
}
|
|
1119
1163
|
));
|
|
1120
1164
|
CardDescription.displayName = "CardDescription";
|
|
1121
|
-
var CardContent =
|
|
1165
|
+
var CardContent = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("moonui-theme", "p-6 pt-0", className), ...props }));
|
|
1122
1166
|
CardContent.displayName = "CardContent";
|
|
1123
|
-
var CardFooter =
|
|
1167
|
+
var CardFooter = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1124
1168
|
"div",
|
|
1125
1169
|
{
|
|
1126
1170
|
ref,
|
|
@@ -1141,7 +1185,7 @@ function Calendar({
|
|
|
1141
1185
|
defaultMonth,
|
|
1142
1186
|
...props
|
|
1143
1187
|
}) {
|
|
1144
|
-
const [currentMonth, setCurrentMonth] =
|
|
1188
|
+
const [currentMonth, setCurrentMonth] = React25__namespace.useState(
|
|
1145
1189
|
defaultMonth || selected && selected || /* @__PURE__ */ new Date()
|
|
1146
1190
|
);
|
|
1147
1191
|
const weekDays = [
|
|
@@ -1160,7 +1204,8 @@ function Calendar({
|
|
|
1160
1204
|
setCurrentMonth(dateFns.addMonths(currentMonth, 1));
|
|
1161
1205
|
};
|
|
1162
1206
|
const handleDateClick = (date) => {
|
|
1163
|
-
if (disabled?.(date))
|
|
1207
|
+
if (disabled?.(date))
|
|
1208
|
+
return;
|
|
1164
1209
|
if (mode === "single") {
|
|
1165
1210
|
onSelect?.(date);
|
|
1166
1211
|
} else if (mode === "range") {
|
|
@@ -1177,7 +1222,8 @@ function Calendar({
|
|
|
1177
1222
|
}
|
|
1178
1223
|
};
|
|
1179
1224
|
const isDateSelected = (date) => {
|
|
1180
|
-
if (!selected)
|
|
1225
|
+
if (!selected)
|
|
1226
|
+
return false;
|
|
1181
1227
|
if (mode === "single") {
|
|
1182
1228
|
return dateFns.isSameDay(date, selected);
|
|
1183
1229
|
} else if (mode === "range") {
|
|
@@ -1190,19 +1236,23 @@ function Calendar({
|
|
|
1190
1236
|
return false;
|
|
1191
1237
|
};
|
|
1192
1238
|
const isRangeStart = (date) => {
|
|
1193
|
-
if (mode !== "range" || !selected)
|
|
1239
|
+
if (mode !== "range" || !selected)
|
|
1240
|
+
return false;
|
|
1194
1241
|
const range = selected;
|
|
1195
1242
|
return range.from ? dateFns.isSameDay(date, range.from) : false;
|
|
1196
1243
|
};
|
|
1197
1244
|
const isRangeEnd = (date) => {
|
|
1198
|
-
if (mode !== "range" || !selected)
|
|
1245
|
+
if (mode !== "range" || !selected)
|
|
1246
|
+
return false;
|
|
1199
1247
|
const range = selected;
|
|
1200
1248
|
return range.to ? dateFns.isSameDay(date, range.to) : false;
|
|
1201
1249
|
};
|
|
1202
1250
|
const isRangeMiddle = (date) => {
|
|
1203
|
-
if (mode !== "range" || !selected)
|
|
1251
|
+
if (mode !== "range" || !selected)
|
|
1252
|
+
return false;
|
|
1204
1253
|
const range = selected;
|
|
1205
|
-
if (!range.from || !range.to)
|
|
1254
|
+
if (!range.from || !range.to)
|
|
1255
|
+
return false;
|
|
1206
1256
|
return date > range.from && date < range.to;
|
|
1207
1257
|
};
|
|
1208
1258
|
const getDaysInMonth = () => {
|
|
@@ -1329,7 +1379,8 @@ var getCardType = (number) => {
|
|
|
1329
1379
|
jcb: /^35/
|
|
1330
1380
|
};
|
|
1331
1381
|
for (const [type, pattern] of Object.entries(patterns)) {
|
|
1332
|
-
if (pattern.test(number))
|
|
1382
|
+
if (pattern.test(number))
|
|
1383
|
+
return type;
|
|
1333
1384
|
}
|
|
1334
1385
|
return "unknown";
|
|
1335
1386
|
};
|
|
@@ -1339,16 +1390,18 @@ var formatCardNumber = (value, cardType) => {
|
|
|
1339
1390
|
let formatted = "";
|
|
1340
1391
|
let position = 0;
|
|
1341
1392
|
for (const group of groups) {
|
|
1342
|
-
if (position >= cleaned.length)
|
|
1343
|
-
|
|
1393
|
+
if (position >= cleaned.length)
|
|
1394
|
+
break;
|
|
1395
|
+
if (formatted)
|
|
1396
|
+
formatted += " ";
|
|
1344
1397
|
formatted += cleaned.slice(position, position + group);
|
|
1345
1398
|
position += group;
|
|
1346
1399
|
}
|
|
1347
1400
|
return formatted;
|
|
1348
1401
|
};
|
|
1349
|
-
var CardNumberInput =
|
|
1402
|
+
var CardNumberInput = React25__namespace.forwardRef(
|
|
1350
1403
|
({ className, value = "", onChange, showIcon = true, size, ...props }, ref) => {
|
|
1351
|
-
const [cardType, setCardType] =
|
|
1404
|
+
const [cardType, setCardType] = React25__namespace.useState("unknown");
|
|
1352
1405
|
const handleChange = (e) => {
|
|
1353
1406
|
const rawValue = e.target.value.replace(/\D/g, "");
|
|
1354
1407
|
const detectedType = getCardType(rawValue);
|
|
@@ -1379,7 +1432,7 @@ var CardNumberInput = React24__namespace.forwardRef(
|
|
|
1379
1432
|
}
|
|
1380
1433
|
);
|
|
1381
1434
|
CardNumberInput.displayName = "CardNumberInput";
|
|
1382
|
-
var CardExpiryInput =
|
|
1435
|
+
var CardExpiryInput = React25__namespace.forwardRef(
|
|
1383
1436
|
({ className, value = "", onChange, size, ...props }, ref) => {
|
|
1384
1437
|
const handleChange = (e) => {
|
|
1385
1438
|
let rawValue = e.target.value.replace(/\D/g, "");
|
|
@@ -1417,7 +1470,7 @@ var CardExpiryInput = React24__namespace.forwardRef(
|
|
|
1417
1470
|
}
|
|
1418
1471
|
);
|
|
1419
1472
|
CardExpiryInput.displayName = "CardExpiryInput";
|
|
1420
|
-
var CardCVCInput =
|
|
1473
|
+
var CardCVCInput = React25__namespace.forwardRef(
|
|
1421
1474
|
({ className, value = "", onChange, cardType = "unknown", size, ...props }, ref) => {
|
|
1422
1475
|
const maxLength = cardType === "amex" ? 4 : 3;
|
|
1423
1476
|
const handleChange = (e) => {
|
|
@@ -1442,7 +1495,7 @@ var CardCVCInput = React24__namespace.forwardRef(
|
|
|
1442
1495
|
}
|
|
1443
1496
|
);
|
|
1444
1497
|
CardCVCInput.displayName = "CardCVCInput";
|
|
1445
|
-
var CardZipInput =
|
|
1498
|
+
var CardZipInput = React25__namespace.forwardRef(
|
|
1446
1499
|
({ className, value = "", onChange, format: format4 = "US", size, ...props }, ref) => {
|
|
1447
1500
|
const handleChange = (e) => {
|
|
1448
1501
|
let rawValue = e.target.value;
|
|
@@ -1493,15 +1546,15 @@ var CardZipInput = React24__namespace.forwardRef(
|
|
|
1493
1546
|
}
|
|
1494
1547
|
);
|
|
1495
1548
|
CardZipInput.displayName = "CardZipInput";
|
|
1496
|
-
var CarouselContext =
|
|
1549
|
+
var CarouselContext = React25__namespace.createContext(null);
|
|
1497
1550
|
function useCarousel() {
|
|
1498
|
-
const context =
|
|
1551
|
+
const context = React25__namespace.useContext(CarouselContext);
|
|
1499
1552
|
if (!context) {
|
|
1500
1553
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1501
1554
|
}
|
|
1502
1555
|
return context;
|
|
1503
1556
|
}
|
|
1504
|
-
var Carousel =
|
|
1557
|
+
var Carousel = React25__namespace.forwardRef(
|
|
1505
1558
|
({
|
|
1506
1559
|
orientation = "horizontal",
|
|
1507
1560
|
opts,
|
|
@@ -1519,20 +1572,21 @@ var Carousel = React24__namespace.forwardRef(
|
|
|
1519
1572
|
},
|
|
1520
1573
|
plugins
|
|
1521
1574
|
);
|
|
1522
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1523
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1524
|
-
const onSelect =
|
|
1525
|
-
if (!emblaApi)
|
|
1575
|
+
const [canScrollPrev, setCanScrollPrev] = React25__namespace.useState(false);
|
|
1576
|
+
const [canScrollNext, setCanScrollNext] = React25__namespace.useState(false);
|
|
1577
|
+
const onSelect = React25__namespace.useCallback((emblaApi) => {
|
|
1578
|
+
if (!emblaApi)
|
|
1579
|
+
return;
|
|
1526
1580
|
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
1527
1581
|
setCanScrollNext(emblaApi.canScrollNext());
|
|
1528
1582
|
}, []);
|
|
1529
|
-
const scrollPrev =
|
|
1583
|
+
const scrollPrev = React25__namespace.useCallback(() => {
|
|
1530
1584
|
api?.scrollPrev();
|
|
1531
1585
|
}, [api]);
|
|
1532
|
-
const scrollNext =
|
|
1586
|
+
const scrollNext = React25__namespace.useCallback(() => {
|
|
1533
1587
|
api?.scrollNext();
|
|
1534
1588
|
}, [api]);
|
|
1535
|
-
const handleKeyDown =
|
|
1589
|
+
const handleKeyDown = React25__namespace.useCallback(
|
|
1536
1590
|
(event) => {
|
|
1537
1591
|
const prevKey = resolvedOrientation === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
1538
1592
|
const nextKey = resolvedOrientation === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
@@ -1546,12 +1600,14 @@ var Carousel = React24__namespace.forwardRef(
|
|
|
1546
1600
|
},
|
|
1547
1601
|
[resolvedOrientation, scrollPrev, scrollNext]
|
|
1548
1602
|
);
|
|
1549
|
-
|
|
1550
|
-
if (!api || !setApi)
|
|
1603
|
+
React25__namespace.useEffect(() => {
|
|
1604
|
+
if (!api || !setApi)
|
|
1605
|
+
return;
|
|
1551
1606
|
setApi(api);
|
|
1552
1607
|
}, [api, setApi]);
|
|
1553
|
-
|
|
1554
|
-
if (!api)
|
|
1608
|
+
React25__namespace.useEffect(() => {
|
|
1609
|
+
if (!api)
|
|
1610
|
+
return;
|
|
1555
1611
|
onSelect(api);
|
|
1556
1612
|
api.on("reInit", onSelect);
|
|
1557
1613
|
api.on("select", onSelect);
|
|
@@ -1601,7 +1657,7 @@ var carouselContentVariants = classVarianceAuthority.cva("flex", {
|
|
|
1601
1657
|
orientation: "horizontal"
|
|
1602
1658
|
}
|
|
1603
1659
|
});
|
|
1604
|
-
var CarouselContent =
|
|
1660
|
+
var CarouselContent = React25__namespace.forwardRef(
|
|
1605
1661
|
({ className, ...props }, ref) => {
|
|
1606
1662
|
const { carouselRef, orientation } = useCarousel();
|
|
1607
1663
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1626,7 +1682,7 @@ var carouselItemVariants = classVarianceAuthority.cva("min-w-0 shrink-0 grow-0 b
|
|
|
1626
1682
|
orientation: "horizontal"
|
|
1627
1683
|
}
|
|
1628
1684
|
});
|
|
1629
|
-
var CarouselItem =
|
|
1685
|
+
var CarouselItem = React25__namespace.forwardRef(
|
|
1630
1686
|
({ className, ...props }, ref) => {
|
|
1631
1687
|
const { orientation } = useCarousel();
|
|
1632
1688
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1642,7 +1698,7 @@ var CarouselItem = React24__namespace.forwardRef(
|
|
|
1642
1698
|
}
|
|
1643
1699
|
);
|
|
1644
1700
|
CarouselItem.displayName = "CarouselItem";
|
|
1645
|
-
var CarouselPrevious =
|
|
1701
|
+
var CarouselPrevious = React25__namespace.forwardRef(({ className, variant = "outline", size = "icon-sm", ...props }, ref) => {
|
|
1646
1702
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1647
1703
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1648
1704
|
Button,
|
|
@@ -1667,7 +1723,7 @@ var CarouselPrevious = React24__namespace.forwardRef(({ className, variant = "ou
|
|
|
1667
1723
|
);
|
|
1668
1724
|
});
|
|
1669
1725
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1670
|
-
var CarouselNext =
|
|
1726
|
+
var CarouselNext = React25__namespace.forwardRef(({ className, variant = "outline", size = "icon-sm", ...props }, ref) => {
|
|
1671
1727
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1672
1728
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1673
1729
|
Button,
|
|
@@ -1730,7 +1786,7 @@ var checkboxVariants = classVarianceAuthority.cva(
|
|
|
1730
1786
|
}
|
|
1731
1787
|
}
|
|
1732
1788
|
);
|
|
1733
|
-
var Checkbox =
|
|
1789
|
+
var Checkbox = React25__namespace.forwardRef(({
|
|
1734
1790
|
className,
|
|
1735
1791
|
variant,
|
|
1736
1792
|
size,
|
|
@@ -1763,7 +1819,7 @@ var Checkbox = React24__namespace.forwardRef(({
|
|
|
1763
1819
|
);
|
|
1764
1820
|
});
|
|
1765
1821
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
1766
|
-
var CheckboxGroup =
|
|
1822
|
+
var CheckboxGroup = React25__namespace.forwardRef(
|
|
1767
1823
|
({ className, orientation = "vertical", spacing = "1rem", children, ...props }, ref) => {
|
|
1768
1824
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1769
1825
|
"div",
|
|
@@ -1783,7 +1839,7 @@ var CheckboxGroup = React24__namespace.forwardRef(
|
|
|
1783
1839
|
}
|
|
1784
1840
|
);
|
|
1785
1841
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
1786
|
-
var CheckboxLabel =
|
|
1842
|
+
var CheckboxLabel = React25__namespace.forwardRef(
|
|
1787
1843
|
({ className, htmlFor, children, position = "end", disabled = false, ...props }, ref) => {
|
|
1788
1844
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1789
1845
|
"label",
|
|
@@ -1803,14 +1859,14 @@ var CheckboxLabel = React24__namespace.forwardRef(
|
|
|
1803
1859
|
}
|
|
1804
1860
|
);
|
|
1805
1861
|
CheckboxLabel.displayName = "CheckboxLabel";
|
|
1806
|
-
var CheckboxWithLabel =
|
|
1862
|
+
var CheckboxWithLabel = React25__namespace.forwardRef(({
|
|
1807
1863
|
id,
|
|
1808
1864
|
label,
|
|
1809
1865
|
labelPosition = "end",
|
|
1810
1866
|
labelClassName,
|
|
1811
1867
|
...checkboxProps
|
|
1812
1868
|
}, ref) => {
|
|
1813
|
-
const generatedId =
|
|
1869
|
+
const generatedId = React25__namespace.useId();
|
|
1814
1870
|
const checkboxId = id || generatedId;
|
|
1815
1871
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
1816
1872
|
labelPosition === "start" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1860,7 +1916,7 @@ var collapsibleTriggerVariants = classVarianceAuthority.cva(
|
|
|
1860
1916
|
}
|
|
1861
1917
|
}
|
|
1862
1918
|
);
|
|
1863
|
-
var CollapsibleTrigger =
|
|
1919
|
+
var CollapsibleTrigger = React25__namespace.forwardRef(({ className, children, variant, size, asChild, ...props }, ref) => {
|
|
1864
1920
|
if (asChild) {
|
|
1865
1921
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1866
1922
|
CollapsiblePrimitive__namespace.Trigger,
|
|
@@ -1909,7 +1965,7 @@ var collapsibleContentVariants = classVarianceAuthority.cva(
|
|
|
1909
1965
|
}
|
|
1910
1966
|
}
|
|
1911
1967
|
);
|
|
1912
|
-
var CollapsibleContent =
|
|
1968
|
+
var CollapsibleContent = React25__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1913
1969
|
CollapsiblePrimitive__namespace.Content,
|
|
1914
1970
|
{
|
|
1915
1971
|
ref,
|
|
@@ -1937,7 +1993,7 @@ var inputWrapperVariants = classVarianceAuthority.cva(
|
|
|
1937
1993
|
var inputVariants = classVarianceAuthority.cva(
|
|
1938
1994
|
[
|
|
1939
1995
|
"w-full bg-background transition-all duration-200",
|
|
1940
|
-
"text-foreground placeholder:text-muted-foreground
|
|
1996
|
+
"text-foreground placeholder:text-muted-foreground",
|
|
1941
1997
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1942
1998
|
"file:border-0 file:bg-transparent file:font-medium",
|
|
1943
1999
|
"focus-visible:outline-none dark:text-gray-200"
|
|
@@ -1945,10 +2001,10 @@ var inputVariants = classVarianceAuthority.cva(
|
|
|
1945
2001
|
{
|
|
1946
2002
|
variants: {
|
|
1947
2003
|
variant: {
|
|
1948
|
-
standard: "border border-
|
|
2004
|
+
standard: "border border-input rounded-md px-3 py-2 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 dark:bg-gray-800/80 dark:shadow-inner dark:shadow-gray-950/10",
|
|
1949
2005
|
filled: "border border-transparent bg-gray-100 dark:bg-gray-800 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",
|
|
1950
|
-
ghost: "border-none bg-transparent shadow-none px-1 dark:text-gray-300
|
|
1951
|
-
underline: "border-t-0 border-l-0 border-r-0 border-b border-
|
|
2006
|
+
ghost: "border-none bg-transparent shadow-none px-1 dark:text-gray-300 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
|
|
2007
|
+
underline: "border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 py-2 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300 dark:bg-transparent"
|
|
1952
2008
|
},
|
|
1953
2009
|
size: {
|
|
1954
2010
|
sm: "h-8 text-xs",
|
|
@@ -1992,7 +2048,7 @@ var inputVariants = classVarianceAuthority.cva(
|
|
|
1992
2048
|
}
|
|
1993
2049
|
}
|
|
1994
2050
|
);
|
|
1995
|
-
var Input =
|
|
2051
|
+
var Input = React25__namespace.forwardRef(
|
|
1996
2052
|
({
|
|
1997
2053
|
className,
|
|
1998
2054
|
wrapperClassName,
|
|
@@ -2019,10 +2075,10 @@ var Input = React24__namespace.forwardRef(
|
|
|
2019
2075
|
placeholder,
|
|
2020
2076
|
...props
|
|
2021
2077
|
}, ref) => {
|
|
2022
|
-
const reactId =
|
|
2078
|
+
const reactId = React25__namespace.useId();
|
|
2023
2079
|
const fieldId = props.id || reactId;
|
|
2024
|
-
const [isFocused, setIsFocused] =
|
|
2025
|
-
const [internalValue, setInternalValue] =
|
|
2080
|
+
const [isFocused, setIsFocused] = React25__namespace.useState(false);
|
|
2081
|
+
const [internalValue, setInternalValue] = React25__namespace.useState(value || defaultValue || "");
|
|
2026
2082
|
const hasValue = internalValue !== "" && internalValue !== null && internalValue !== void 0;
|
|
2027
2083
|
const isLabelActive = isFocused || hasValue;
|
|
2028
2084
|
const handleFocus = (e) => {
|
|
@@ -2037,7 +2093,7 @@ var Input = React24__namespace.forwardRef(
|
|
|
2037
2093
|
setInternalValue(e.target.value);
|
|
2038
2094
|
onChange?.(e);
|
|
2039
2095
|
};
|
|
2040
|
-
|
|
2096
|
+
React25__namespace.useEffect(() => {
|
|
2041
2097
|
if (value !== void 0) {
|
|
2042
2098
|
setInternalValue(value);
|
|
2043
2099
|
}
|
|
@@ -2121,7 +2177,7 @@ Input.displayName = "Input";
|
|
|
2121
2177
|
var labelVariants = classVarianceAuthority.cva(
|
|
2122
2178
|
"text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"
|
|
2123
2179
|
);
|
|
2124
|
-
var Label =
|
|
2180
|
+
var Label = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2125
2181
|
LabelPrimitive__namespace.Root,
|
|
2126
2182
|
{
|
|
2127
2183
|
ref,
|
|
@@ -2182,7 +2238,7 @@ var popoverContentVariants = classVarianceAuthority.cva(
|
|
|
2182
2238
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
2183
2239
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
2184
2240
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
2185
|
-
var PopoverContent =
|
|
2241
|
+
var PopoverContent = React25__namespace.forwardRef(({
|
|
2186
2242
|
className,
|
|
2187
2243
|
variant,
|
|
2188
2244
|
size,
|
|
@@ -2250,7 +2306,7 @@ var PopoverFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
2250
2306
|
}
|
|
2251
2307
|
);
|
|
2252
2308
|
PopoverFooter.displayName = "PopoverFooter";
|
|
2253
|
-
var Tabs =
|
|
2309
|
+
var Tabs = React25__namespace.forwardRef(({ vertical = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2254
2310
|
TabsPrimitive__namespace.Root,
|
|
2255
2311
|
{
|
|
2256
2312
|
ref,
|
|
@@ -2291,7 +2347,7 @@ var tabsListVariants = classVarianceAuthority.cva(
|
|
|
2291
2347
|
}
|
|
2292
2348
|
}
|
|
2293
2349
|
);
|
|
2294
|
-
var TabsList =
|
|
2350
|
+
var TabsList = React25__namespace.forwardRef(({ className, variant, orientation, fullWidth, scrollable, ...props }, ref) => {
|
|
2295
2351
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2296
2352
|
TabsPrimitive__namespace.List,
|
|
2297
2353
|
{
|
|
@@ -2334,7 +2390,7 @@ var tabsTriggerVariants = classVarianceAuthority.cva(
|
|
|
2334
2390
|
}
|
|
2335
2391
|
}
|
|
2336
2392
|
);
|
|
2337
|
-
var TabsTrigger =
|
|
2393
|
+
var TabsTrigger = React25__namespace.forwardRef(({
|
|
2338
2394
|
className,
|
|
2339
2395
|
variant,
|
|
2340
2396
|
size,
|
|
@@ -2366,7 +2422,7 @@ var TabsTrigger = React24__namespace.forwardRef(({
|
|
|
2366
2422
|
}
|
|
2367
2423
|
));
|
|
2368
2424
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
2369
|
-
var TabsContent =
|
|
2425
|
+
var TabsContent = React25__namespace.forwardRef(({ className, animated = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2370
2426
|
TabsPrimitive__namespace.Content,
|
|
2371
2427
|
{
|
|
2372
2428
|
ref,
|
|
@@ -2460,7 +2516,7 @@ var sliderThumbVariants = classVarianceAuthority.cva(
|
|
|
2460
2516
|
}
|
|
2461
2517
|
}
|
|
2462
2518
|
);
|
|
2463
|
-
var Slider =
|
|
2519
|
+
var Slider = React25__namespace.forwardRef(({
|
|
2464
2520
|
className,
|
|
2465
2521
|
size,
|
|
2466
2522
|
trackVariant,
|
|
@@ -2476,10 +2532,10 @@ var Slider = React24__namespace.forwardRef(({
|
|
|
2476
2532
|
disabled,
|
|
2477
2533
|
...props
|
|
2478
2534
|
}, ref) => {
|
|
2479
|
-
const [sliderValue, setSliderValue] =
|
|
2535
|
+
const [sliderValue, setSliderValue] = React25__namespace.useState(
|
|
2480
2536
|
value || defaultValue || [0]
|
|
2481
2537
|
);
|
|
2482
|
-
|
|
2538
|
+
React25__namespace.useEffect(() => {
|
|
2483
2539
|
if (value !== void 0) {
|
|
2484
2540
|
setSliderValue(value);
|
|
2485
2541
|
}
|
|
@@ -2494,7 +2550,7 @@ var Slider = React24__namespace.forwardRef(({
|
|
|
2494
2550
|
const calculateThumbPercent = (value2, min2, max2) => {
|
|
2495
2551
|
return (value2 - min2) / (max2 - min2) * 100;
|
|
2496
2552
|
};
|
|
2497
|
-
const trackRef =
|
|
2553
|
+
const trackRef = React25__namespace.useRef(null);
|
|
2498
2554
|
const min = props.min || 0;
|
|
2499
2555
|
const max = props.max || 100;
|
|
2500
2556
|
const step = props.step || 1;
|
|
@@ -2512,9 +2568,11 @@ var Slider = React24__namespace.forwardRef(({
|
|
|
2512
2568
|
}
|
|
2513
2569
|
};
|
|
2514
2570
|
const handleTrackClick = (event) => {
|
|
2515
|
-
if (disabled)
|
|
2571
|
+
if (disabled)
|
|
2572
|
+
return;
|
|
2516
2573
|
const track = trackRef.current;
|
|
2517
|
-
if (!track)
|
|
2574
|
+
if (!track)
|
|
2575
|
+
return;
|
|
2518
2576
|
const rect = track.getBoundingClientRect();
|
|
2519
2577
|
const percent = (event.clientX - rect.left) / rect.width;
|
|
2520
2578
|
const rawValue = min + percent * (max - min);
|
|
@@ -2525,11 +2583,13 @@ var Slider = React24__namespace.forwardRef(({
|
|
|
2525
2583
|
handleValueChange(newValues);
|
|
2526
2584
|
};
|
|
2527
2585
|
const handleThumbMouseDown = (index) => (event) => {
|
|
2528
|
-
if (disabled)
|
|
2586
|
+
if (disabled)
|
|
2587
|
+
return;
|
|
2529
2588
|
event.preventDefault();
|
|
2530
2589
|
const handleMouseMove = (moveEvent) => {
|
|
2531
2590
|
const track = trackRef.current;
|
|
2532
|
-
if (!track)
|
|
2591
|
+
if (!track)
|
|
2592
|
+
return;
|
|
2533
2593
|
const rect = track.getBoundingClientRect();
|
|
2534
2594
|
const percent = (moveEvent.clientX - rect.left) / rect.width;
|
|
2535
2595
|
const rawValue = min + percent * (max - min);
|
|
@@ -2547,7 +2607,8 @@ var Slider = React24__namespace.forwardRef(({
|
|
|
2547
2607
|
document.addEventListener("mouseup", handleMouseUp);
|
|
2548
2608
|
};
|
|
2549
2609
|
const handleThumbKeyDown = (index) => (event) => {
|
|
2550
|
-
if (disabled)
|
|
2610
|
+
if (disabled)
|
|
2611
|
+
return;
|
|
2551
2612
|
const largeStep = step * 10;
|
|
2552
2613
|
const current = sliderValue[index];
|
|
2553
2614
|
let next;
|
|
@@ -2684,7 +2745,8 @@ function rgbToHex(r, g, b) {
|
|
|
2684
2745
|
}
|
|
2685
2746
|
function hexToHsl(hex) {
|
|
2686
2747
|
const rgb = hexToRgb(hex);
|
|
2687
|
-
if (!rgb)
|
|
2748
|
+
if (!rgb)
|
|
2749
|
+
return null;
|
|
2688
2750
|
const r = rgb.r / 255;
|
|
2689
2751
|
const g = rgb.g / 255;
|
|
2690
2752
|
const b = rgb.b / 255;
|
|
@@ -2723,11 +2785,16 @@ function hslToHex(h, s, l) {
|
|
|
2723
2785
|
r = g = b = l;
|
|
2724
2786
|
} else {
|
|
2725
2787
|
const hue2rgb = (p2, q2, t) => {
|
|
2726
|
-
if (t < 0)
|
|
2727
|
-
|
|
2728
|
-
if (t
|
|
2729
|
-
|
|
2730
|
-
if (t <
|
|
2788
|
+
if (t < 0)
|
|
2789
|
+
t += 1;
|
|
2790
|
+
if (t > 1)
|
|
2791
|
+
t -= 1;
|
|
2792
|
+
if (t < 1 / 6)
|
|
2793
|
+
return p2 + (q2 - p2) * 6 * t;
|
|
2794
|
+
if (t < 1 / 2)
|
|
2795
|
+
return q2;
|
|
2796
|
+
if (t < 2 / 3)
|
|
2797
|
+
return p2 + (q2 - p2) * (2 / 3 - t) * 6;
|
|
2731
2798
|
return p2;
|
|
2732
2799
|
};
|
|
2733
2800
|
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
@@ -2795,14 +2862,14 @@ function ColorPicker({
|
|
|
2795
2862
|
disabled,
|
|
2796
2863
|
...props
|
|
2797
2864
|
}) {
|
|
2798
|
-
const [open, setOpen] =
|
|
2799
|
-
const [color, setColor] =
|
|
2800
|
-
const [opacity, setOpacity] =
|
|
2801
|
-
const [copied, setCopied] =
|
|
2802
|
-
const [inputValue, setInputValue] =
|
|
2803
|
-
const hsl =
|
|
2804
|
-
const rgb =
|
|
2805
|
-
|
|
2865
|
+
const [open, setOpen] = React25__namespace.useState(false);
|
|
2866
|
+
const [color, setColor] = React25__namespace.useState(value);
|
|
2867
|
+
const [opacity, setOpacity] = React25__namespace.useState(100);
|
|
2868
|
+
const [copied, setCopied] = React25__namespace.useState(false);
|
|
2869
|
+
const [inputValue, setInputValue] = React25__namespace.useState(value);
|
|
2870
|
+
const hsl = React25__namespace.useMemo(() => hexToHsl(color) || { h: 0, s: 0, l: 0 }, [color]);
|
|
2871
|
+
const rgb = React25__namespace.useMemo(() => hexToRgb(color) || { r: 0, g: 0, b: 0 }, [color]);
|
|
2872
|
+
React25__namespace.useEffect(() => {
|
|
2806
2873
|
setColor(value);
|
|
2807
2874
|
setInputValue(value);
|
|
2808
2875
|
}, [value]);
|
|
@@ -2844,8 +2911,10 @@ function ColorPicker({
|
|
|
2844
2911
|
}
|
|
2845
2912
|
};
|
|
2846
2913
|
const formatDisplay = () => {
|
|
2847
|
-
if (format4 === "rgb")
|
|
2848
|
-
|
|
2914
|
+
if (format4 === "rgb")
|
|
2915
|
+
return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
|
|
2916
|
+
if (format4 === "hsl")
|
|
2917
|
+
return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;
|
|
2849
2918
|
return color;
|
|
2850
2919
|
};
|
|
2851
2920
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
@@ -3195,7 +3264,7 @@ function GradientPicker({
|
|
|
3195
3264
|
onChange,
|
|
3196
3265
|
className
|
|
3197
3266
|
}) {
|
|
3198
|
-
const [gradient, setGradient] =
|
|
3267
|
+
const [gradient, setGradient] = React25__namespace.useState(value);
|
|
3199
3268
|
const handleChange = (field, newValue) => {
|
|
3200
3269
|
const newGradient = { ...gradient, [field]: newValue };
|
|
3201
3270
|
setGradient(newGradient);
|
|
@@ -3281,7 +3350,7 @@ var overlayVariants = classVarianceAuthority.cva(
|
|
|
3281
3350
|
}
|
|
3282
3351
|
}
|
|
3283
3352
|
);
|
|
3284
|
-
var DialogOverlay =
|
|
3353
|
+
var DialogOverlay = React25__namespace.forwardRef(({ className, variant, animation, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3285
3354
|
DialogPrimitive__namespace.Overlay,
|
|
3286
3355
|
{
|
|
3287
3356
|
ref,
|
|
@@ -3340,7 +3409,7 @@ var dialogContentVariants = classVarianceAuthority.cva(
|
|
|
3340
3409
|
}
|
|
3341
3410
|
}
|
|
3342
3411
|
);
|
|
3343
|
-
var DialogContent =
|
|
3412
|
+
var DialogContent = React25__namespace.forwardRef(
|
|
3344
3413
|
({
|
|
3345
3414
|
className,
|
|
3346
3415
|
children,
|
|
@@ -3453,7 +3522,7 @@ var DialogFooter = ({
|
|
|
3453
3522
|
}
|
|
3454
3523
|
);
|
|
3455
3524
|
DialogFooter.displayName = "DialogFooter";
|
|
3456
|
-
var DialogTitle =
|
|
3525
|
+
var DialogTitle = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3457
3526
|
DialogPrimitive__namespace.Title,
|
|
3458
3527
|
{
|
|
3459
3528
|
ref,
|
|
@@ -3465,7 +3534,7 @@ var DialogTitle = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3465
3534
|
}
|
|
3466
3535
|
));
|
|
3467
3536
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
3468
|
-
var DialogDescription =
|
|
3537
|
+
var DialogDescription = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3469
3538
|
DialogPrimitive__namespace.Description,
|
|
3470
3539
|
{
|
|
3471
3540
|
ref,
|
|
@@ -3477,7 +3546,7 @@ var DialogDescription = React24__namespace.forwardRef(({ className, ...props },
|
|
|
3477
3546
|
}
|
|
3478
3547
|
));
|
|
3479
3548
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
3480
|
-
var DialogForm =
|
|
3549
|
+
var DialogForm = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3481
3550
|
"form",
|
|
3482
3551
|
{
|
|
3483
3552
|
ref,
|
|
@@ -3507,7 +3576,7 @@ var commandVariants = classVarianceAuthority.cva(
|
|
|
3507
3576
|
}
|
|
3508
3577
|
}
|
|
3509
3578
|
);
|
|
3510
|
-
var Command =
|
|
3579
|
+
var Command = React25__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3511
3580
|
cmdk.Command,
|
|
3512
3581
|
{
|
|
3513
3582
|
ref,
|
|
@@ -3529,7 +3598,7 @@ var CommandDialog = ({
|
|
|
3529
3598
|
), children })
|
|
3530
3599
|
] }) });
|
|
3531
3600
|
};
|
|
3532
|
-
var CommandInput =
|
|
3601
|
+
var CommandInput = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
3533
3602
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
3534
3603
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3535
3604
|
cmdk.Command.Input,
|
|
@@ -3544,7 +3613,7 @@ var CommandInput = React24__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3544
3613
|
)
|
|
3545
3614
|
] }));
|
|
3546
3615
|
CommandInput.displayName = "CommandInput";
|
|
3547
|
-
var CommandList =
|
|
3616
|
+
var CommandList = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3548
3617
|
cmdk.Command.List,
|
|
3549
3618
|
{
|
|
3550
3619
|
ref,
|
|
@@ -3553,7 +3622,7 @@ var CommandList = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3553
3622
|
}
|
|
3554
3623
|
));
|
|
3555
3624
|
CommandList.displayName = "CommandList";
|
|
3556
|
-
var CommandEmpty =
|
|
3625
|
+
var CommandEmpty = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3557
3626
|
cmdk.Command.Empty,
|
|
3558
3627
|
{
|
|
3559
3628
|
ref,
|
|
@@ -3562,7 +3631,7 @@ var CommandEmpty = React24__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3562
3631
|
}
|
|
3563
3632
|
));
|
|
3564
3633
|
CommandEmpty.displayName = "CommandEmpty";
|
|
3565
|
-
var CommandGroup =
|
|
3634
|
+
var CommandGroup = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3566
3635
|
cmdk.Command.Group,
|
|
3567
3636
|
{
|
|
3568
3637
|
ref,
|
|
@@ -3574,7 +3643,7 @@ var CommandGroup = React24__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3574
3643
|
}
|
|
3575
3644
|
));
|
|
3576
3645
|
CommandGroup.displayName = "CommandGroup";
|
|
3577
|
-
var CommandSeparator =
|
|
3646
|
+
var CommandSeparator = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3578
3647
|
cmdk.Command.Separator,
|
|
3579
3648
|
{
|
|
3580
3649
|
ref,
|
|
@@ -3583,7 +3652,7 @@ var CommandSeparator = React24__namespace.forwardRef(({ className, ...props }, r
|
|
|
3583
3652
|
}
|
|
3584
3653
|
));
|
|
3585
3654
|
CommandSeparator.displayName = "CommandSeparator";
|
|
3586
|
-
var CommandItem =
|
|
3655
|
+
var CommandItem = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3587
3656
|
cmdk.Command.Item,
|
|
3588
3657
|
{
|
|
3589
3658
|
ref,
|
|
@@ -3634,7 +3703,7 @@ var tableVariants = classVarianceAuthority.cva(
|
|
|
3634
3703
|
}
|
|
3635
3704
|
}
|
|
3636
3705
|
);
|
|
3637
|
-
var Table =
|
|
3706
|
+
var Table = React25__namespace.forwardRef(({
|
|
3638
3707
|
className,
|
|
3639
3708
|
variant,
|
|
3640
3709
|
size,
|
|
@@ -3651,11 +3720,11 @@ var Table = React24__namespace.forwardRef(({
|
|
|
3651
3720
|
...props
|
|
3652
3721
|
}, ref) => {
|
|
3653
3722
|
const striped = variant === "striped";
|
|
3654
|
-
const childrenWithProps =
|
|
3655
|
-
if (
|
|
3723
|
+
const childrenWithProps = React25__namespace.Children.map(props.children, (child) => {
|
|
3724
|
+
if (React25__namespace.isValidElement(child)) {
|
|
3656
3725
|
if (child.type === "tbody") {
|
|
3657
3726
|
const tbodyProps = child.props;
|
|
3658
|
-
return
|
|
3727
|
+
return React25__namespace.cloneElement(child, {
|
|
3659
3728
|
className: cn(tbodyProps.className, striped && "even:[&>tr]:bg-muted/50")
|
|
3660
3729
|
});
|
|
3661
3730
|
}
|
|
@@ -3680,10 +3749,10 @@ var Table = React24__namespace.forwardRef(({
|
|
|
3680
3749
|
] });
|
|
3681
3750
|
});
|
|
3682
3751
|
Table.displayName = "Table";
|
|
3683
|
-
var TableHeader =
|
|
3752
|
+
var TableHeader = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("moonui-theme", "[&_tr]:border-b", className), ...props }));
|
|
3684
3753
|
TableHeader.displayName = "TableHeader";
|
|
3685
|
-
var TableBody =
|
|
3686
|
-
const hasChildren =
|
|
3754
|
+
var TableBody = React25__namespace.forwardRef(({ className, emptyContent, emptyMessage = "No data available", children, ...props }, ref) => {
|
|
3755
|
+
const hasChildren = React25__namespace.Children.count(children) > 0;
|
|
3687
3756
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3688
3757
|
"tbody",
|
|
3689
3758
|
{
|
|
@@ -3695,7 +3764,7 @@ var TableBody = React24__namespace.forwardRef(({ className, emptyContent, emptyM
|
|
|
3695
3764
|
);
|
|
3696
3765
|
});
|
|
3697
3766
|
TableBody.displayName = "TableBody";
|
|
3698
|
-
var TableFooter =
|
|
3767
|
+
var TableFooter = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3699
3768
|
"tfoot",
|
|
3700
3769
|
{
|
|
3701
3770
|
ref,
|
|
@@ -3704,7 +3773,7 @@ var TableFooter = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3704
3773
|
}
|
|
3705
3774
|
));
|
|
3706
3775
|
TableFooter.displayName = "TableFooter";
|
|
3707
|
-
var TableRow =
|
|
3776
|
+
var TableRow = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3708
3777
|
"tr",
|
|
3709
3778
|
{
|
|
3710
3779
|
ref,
|
|
@@ -3716,10 +3785,11 @@ var TableRow = React24__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
3716
3785
|
}
|
|
3717
3786
|
));
|
|
3718
3787
|
TableRow.displayName = "TableRow";
|
|
3719
|
-
var TableHead =
|
|
3788
|
+
var TableHead = React25__namespace.forwardRef(
|
|
3720
3789
|
({ className, sortable, sorted, onSort, align = "left", children, ...props }, ref) => {
|
|
3721
3790
|
const renderSortIcon = () => {
|
|
3722
|
-
if (!sortable)
|
|
3791
|
+
if (!sortable)
|
|
3792
|
+
return null;
|
|
3723
3793
|
if (sorted === "asc") {
|
|
3724
3794
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3725
3795
|
"svg",
|
|
@@ -3803,7 +3873,7 @@ var TableHead = React24__namespace.forwardRef(
|
|
|
3803
3873
|
}
|
|
3804
3874
|
);
|
|
3805
3875
|
TableHead.displayName = "TableHead";
|
|
3806
|
-
var TableCell =
|
|
3876
|
+
var TableCell = React25__namespace.forwardRef(({ className, align = "left", ...props }, ref) => {
|
|
3807
3877
|
const alignmentClass = {
|
|
3808
3878
|
left: "text-left",
|
|
3809
3879
|
center: "text-center",
|
|
@@ -3819,7 +3889,7 @@ var TableCell = React24__namespace.forwardRef(({ className, align = "left", ...p
|
|
|
3819
3889
|
);
|
|
3820
3890
|
});
|
|
3821
3891
|
TableCell.displayName = "TableCell";
|
|
3822
|
-
var TableCaption =
|
|
3892
|
+
var TableCaption = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3823
3893
|
"caption",
|
|
3824
3894
|
{
|
|
3825
3895
|
ref,
|
|
@@ -3839,8 +3909,8 @@ function DataTableBasic({
|
|
|
3839
3909
|
emptyMessage = "No results found.",
|
|
3840
3910
|
className
|
|
3841
3911
|
}) {
|
|
3842
|
-
const [sorting, setSorting] =
|
|
3843
|
-
const [globalFilter, setGlobalFilter] =
|
|
3912
|
+
const [sorting, setSorting] = React25__namespace.useState([]);
|
|
3913
|
+
const [globalFilter, setGlobalFilter] = React25__namespace.useState("");
|
|
3844
3914
|
const table = reactTable.useReactTable({
|
|
3845
3915
|
data,
|
|
3846
3916
|
columns,
|
|
@@ -4003,7 +4073,7 @@ var datePickerVariants = classVarianceAuthority.cva(
|
|
|
4003
4073
|
}
|
|
4004
4074
|
}
|
|
4005
4075
|
);
|
|
4006
|
-
var DatePicker =
|
|
4076
|
+
var DatePicker = React25__namespace.forwardRef(function DatePicker2({
|
|
4007
4077
|
className,
|
|
4008
4078
|
variant,
|
|
4009
4079
|
size,
|
|
@@ -4026,9 +4096,9 @@ var DatePicker = React24__namespace.forwardRef(function DatePicker2({
|
|
|
4026
4096
|
disabled,
|
|
4027
4097
|
...props
|
|
4028
4098
|
}, ref) {
|
|
4029
|
-
const [open, setOpen] =
|
|
4030
|
-
const [internalDate, setInternalDate] =
|
|
4031
|
-
|
|
4099
|
+
const [open, setOpen] = React25__namespace.useState(false);
|
|
4100
|
+
const [internalDate, setInternalDate] = React25__namespace.useState(value);
|
|
4101
|
+
React25__namespace.useEffect(() => {
|
|
4032
4102
|
setInternalDate(value);
|
|
4033
4103
|
}, [value]);
|
|
4034
4104
|
const handleSelect = (date) => {
|
|
@@ -4048,10 +4118,14 @@ var DatePicker = React24__namespace.forwardRef(function DatePicker2({
|
|
|
4048
4118
|
handleSelect(today);
|
|
4049
4119
|
};
|
|
4050
4120
|
const isDateDisabled = (date) => {
|
|
4051
|
-
if (minDate && date < minDate)
|
|
4052
|
-
|
|
4053
|
-
if (
|
|
4054
|
-
|
|
4121
|
+
if (minDate && date < minDate)
|
|
4122
|
+
return true;
|
|
4123
|
+
if (maxDate && date > maxDate)
|
|
4124
|
+
return true;
|
|
4125
|
+
if (disabledDates?.some((d) => d.toDateString() === date.toDateString()))
|
|
4126
|
+
return true;
|
|
4127
|
+
if (disabledDaysOfWeek?.includes(date.getDay()))
|
|
4128
|
+
return true;
|
|
4055
4129
|
return false;
|
|
4056
4130
|
};
|
|
4057
4131
|
const displayValue = internalDate && dateFns.isValid(internalDate) ? dateFns.format(internalDate, formatString) : null;
|
|
@@ -4172,7 +4246,7 @@ var DatePicker = React24__namespace.forwardRef(function DatePicker2({
|
|
|
4172
4246
|
] }) });
|
|
4173
4247
|
});
|
|
4174
4248
|
DatePicker.displayName = "DatePicker";
|
|
4175
|
-
var DateRangePicker =
|
|
4249
|
+
var DateRangePicker = React25__namespace.forwardRef(function DateRangePicker2({
|
|
4176
4250
|
className,
|
|
4177
4251
|
value,
|
|
4178
4252
|
onChange,
|
|
@@ -4181,9 +4255,9 @@ var DateRangePicker = React24__namespace.forwardRef(function DateRangePicker2({
|
|
|
4181
4255
|
separator = " - ",
|
|
4182
4256
|
...props
|
|
4183
4257
|
}, ref) {
|
|
4184
|
-
const [open, setOpen] =
|
|
4185
|
-
const [internalRange, setInternalRange] =
|
|
4186
|
-
|
|
4258
|
+
const [open, setOpen] = React25__namespace.useState(false);
|
|
4259
|
+
const [internalRange, setInternalRange] = React25__namespace.useState(value);
|
|
4260
|
+
React25__namespace.useEffect(() => {
|
|
4187
4261
|
setInternalRange(value);
|
|
4188
4262
|
}, [value]);
|
|
4189
4263
|
const handleSelect = (range) => {
|
|
@@ -4193,8 +4267,9 @@ var DateRangePicker = React24__namespace.forwardRef(function DateRangePicker2({
|
|
|
4193
4267
|
setOpen(false);
|
|
4194
4268
|
}
|
|
4195
4269
|
};
|
|
4196
|
-
const displayValue =
|
|
4197
|
-
if (!internalRange?.from)
|
|
4270
|
+
const displayValue = React25__namespace.useMemo(() => {
|
|
4271
|
+
if (!internalRange?.from)
|
|
4272
|
+
return null;
|
|
4198
4273
|
if (!internalRange?.to) {
|
|
4199
4274
|
return dateFns.format(internalRange.from, formatString);
|
|
4200
4275
|
}
|
|
@@ -4240,7 +4315,7 @@ var DateRangePicker = React24__namespace.forwardRef(function DateRangePicker2({
|
|
|
4240
4315
|
] });
|
|
4241
4316
|
});
|
|
4242
4317
|
DateRangePicker.displayName = "DateRangePicker";
|
|
4243
|
-
var DateTimePicker =
|
|
4318
|
+
var DateTimePicker = React25__namespace.forwardRef(function DateTimePicker2({
|
|
4244
4319
|
value,
|
|
4245
4320
|
onChange,
|
|
4246
4321
|
// Saat ayrı bir <select> ile gösterildiği için buton yalnızca TARİHİ yazar;
|
|
@@ -4252,8 +4327,8 @@ var DateTimePicker = React24__namespace.forwardRef(function DateTimePicker2({
|
|
|
4252
4327
|
timeInterval = 15,
|
|
4253
4328
|
...props
|
|
4254
4329
|
}, ref) {
|
|
4255
|
-
const [date, setDate] =
|
|
4256
|
-
const [time, setTime] =
|
|
4330
|
+
const [date, setDate] = React25__namespace.useState(value);
|
|
4331
|
+
const [time, setTime] = React25__namespace.useState(
|
|
4257
4332
|
value ? dateFns.format(value, timeFormat === "24" ? "HH:mm" : "hh:mm a") : "00:00"
|
|
4258
4333
|
);
|
|
4259
4334
|
const handleDateChange = (newDate) => {
|
|
@@ -4278,7 +4353,7 @@ var DateTimePicker = React24__namespace.forwardRef(function DateTimePicker2({
|
|
|
4278
4353
|
onChange?.(newDate);
|
|
4279
4354
|
}
|
|
4280
4355
|
};
|
|
4281
|
-
const timeOptions =
|
|
4356
|
+
const timeOptions = React25__namespace.useMemo(() => {
|
|
4282
4357
|
const options = [];
|
|
4283
4358
|
for (let h = 0; h < 24; h++) {
|
|
4284
4359
|
for (let m = 0; m < 60; m += timeInterval) {
|
|
@@ -4332,15 +4407,15 @@ var DateTimePicker = React24__namespace.forwardRef(function DateTimePicker2({
|
|
|
4332
4407
|
] });
|
|
4333
4408
|
});
|
|
4334
4409
|
DateTimePicker.displayName = "DateTimePicker";
|
|
4335
|
-
var MonthPicker =
|
|
4410
|
+
var MonthPicker = React25__namespace.forwardRef(function MonthPicker2({
|
|
4336
4411
|
value,
|
|
4337
4412
|
onChange,
|
|
4338
4413
|
placeholder = "Pick a month",
|
|
4339
4414
|
formatString = "MMMM yyyy",
|
|
4340
4415
|
...props
|
|
4341
4416
|
}, ref) {
|
|
4342
|
-
const [open, setOpen] =
|
|
4343
|
-
const [viewDate, setViewDate] =
|
|
4417
|
+
const [open, setOpen] = React25__namespace.useState(false);
|
|
4418
|
+
const [viewDate, setViewDate] = React25__namespace.useState(value || /* @__PURE__ */ new Date());
|
|
4344
4419
|
const months = [
|
|
4345
4420
|
"January",
|
|
4346
4421
|
"February",
|
|
@@ -4436,9 +4511,10 @@ function DraggableList({
|
|
|
4436
4511
|
className,
|
|
4437
4512
|
disabled = false
|
|
4438
4513
|
}) {
|
|
4439
|
-
const [draggedIndex, setDraggedIndex] =
|
|
4514
|
+
const [draggedIndex, setDraggedIndex] = React25__namespace.useState(null);
|
|
4440
4515
|
const handleDragStart = (e, index) => {
|
|
4441
|
-
if (disabled)
|
|
4516
|
+
if (disabled)
|
|
4517
|
+
return;
|
|
4442
4518
|
setDraggedIndex(index);
|
|
4443
4519
|
e.dataTransfer.effectAllowed = "move";
|
|
4444
4520
|
};
|
|
@@ -4487,7 +4563,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
4487
4563
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
4488
4564
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
4489
4565
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
4490
|
-
var DropdownMenuSubTrigger =
|
|
4566
|
+
var DropdownMenuSubTrigger = React25__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4491
4567
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
4492
4568
|
{
|
|
4493
4569
|
ref,
|
|
@@ -4504,7 +4580,7 @@ var DropdownMenuSubTrigger = React24__namespace.forwardRef(({ className, inset,
|
|
|
4504
4580
|
}
|
|
4505
4581
|
));
|
|
4506
4582
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
4507
|
-
var DropdownMenuSubContent =
|
|
4583
|
+
var DropdownMenuSubContent = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4508
4584
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
4509
4585
|
{
|
|
4510
4586
|
ref,
|
|
@@ -4516,7 +4592,7 @@ var DropdownMenuSubContent = React24__namespace.forwardRef(({ className, ...prop
|
|
|
4516
4592
|
}
|
|
4517
4593
|
));
|
|
4518
4594
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
4519
|
-
var DropdownMenuContent =
|
|
4595
|
+
var DropdownMenuContent = React25__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4520
4596
|
DropdownMenuPrimitive__namespace.Content,
|
|
4521
4597
|
{
|
|
4522
4598
|
ref,
|
|
@@ -4529,7 +4605,7 @@ var DropdownMenuContent = React24__namespace.forwardRef(({ className, sideOffset
|
|
|
4529
4605
|
}
|
|
4530
4606
|
) }));
|
|
4531
4607
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
4532
|
-
var DropdownMenuItem =
|
|
4608
|
+
var DropdownMenuItem = React25__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4533
4609
|
DropdownMenuPrimitive__namespace.Item,
|
|
4534
4610
|
{
|
|
4535
4611
|
ref,
|
|
@@ -4542,7 +4618,7 @@ var DropdownMenuItem = React24__namespace.forwardRef(({ className, inset, ...pro
|
|
|
4542
4618
|
}
|
|
4543
4619
|
));
|
|
4544
4620
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
4545
|
-
var DropdownMenuCheckboxItem =
|
|
4621
|
+
var DropdownMenuCheckboxItem = React25__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4546
4622
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
4547
4623
|
{
|
|
4548
4624
|
ref,
|
|
@@ -4559,7 +4635,7 @@ var DropdownMenuCheckboxItem = React24__namespace.forwardRef(({ className, child
|
|
|
4559
4635
|
}
|
|
4560
4636
|
));
|
|
4561
4637
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
4562
|
-
var DropdownMenuRadioItem =
|
|
4638
|
+
var DropdownMenuRadioItem = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4563
4639
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
4564
4640
|
{
|
|
4565
4641
|
ref,
|
|
@@ -4575,7 +4651,7 @@ var DropdownMenuRadioItem = React24__namespace.forwardRef(({ className, children
|
|
|
4575
4651
|
}
|
|
4576
4652
|
));
|
|
4577
4653
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
4578
|
-
var DropdownMenuLabel =
|
|
4654
|
+
var DropdownMenuLabel = React25__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4579
4655
|
DropdownMenuPrimitive__namespace.Label,
|
|
4580
4656
|
{
|
|
4581
4657
|
ref,
|
|
@@ -4588,7 +4664,7 @@ var DropdownMenuLabel = React24__namespace.forwardRef(({ className, inset, ...pr
|
|
|
4588
4664
|
}
|
|
4589
4665
|
));
|
|
4590
4666
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
4591
|
-
var DropdownMenuSeparator =
|
|
4667
|
+
var DropdownMenuSeparator = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4592
4668
|
DropdownMenuPrimitive__namespace.Separator,
|
|
4593
4669
|
{
|
|
4594
4670
|
ref,
|
|
@@ -4677,7 +4753,7 @@ var progressIndicatorVariants = classVarianceAuthority.cva(
|
|
|
4677
4753
|
}
|
|
4678
4754
|
}
|
|
4679
4755
|
);
|
|
4680
|
-
var Progress =
|
|
4756
|
+
var Progress = React25__namespace.forwardRef(({
|
|
4681
4757
|
className,
|
|
4682
4758
|
value = 0,
|
|
4683
4759
|
variant,
|
|
@@ -4732,14 +4808,19 @@ var Progress = React24__namespace.forwardRef(({
|
|
|
4732
4808
|
});
|
|
4733
4809
|
Progress.displayName = "Progress";
|
|
4734
4810
|
var getFileIcon = (type) => {
|
|
4735
|
-
if (type.startsWith("image/"))
|
|
4736
|
-
|
|
4737
|
-
if (type.startsWith("
|
|
4738
|
-
|
|
4811
|
+
if (type.startsWith("image/"))
|
|
4812
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Image, { className: "h-4 w-4" });
|
|
4813
|
+
if (type.startsWith("video/"))
|
|
4814
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Video, { className: "h-4 w-4" });
|
|
4815
|
+
if (type.startsWith("audio/"))
|
|
4816
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Music, { className: "h-4 w-4" });
|
|
4817
|
+
if (type.includes("text") || type.includes("document"))
|
|
4818
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "h-4 w-4" });
|
|
4739
4819
|
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.File, { className: "h-4 w-4" });
|
|
4740
4820
|
};
|
|
4741
4821
|
var formatFileSize = (bytes) => {
|
|
4742
|
-
if (bytes === 0)
|
|
4822
|
+
if (bytes === 0)
|
|
4823
|
+
return "0 Bytes";
|
|
4743
4824
|
const k = 1024;
|
|
4744
4825
|
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
4745
4826
|
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
@@ -4802,7 +4883,7 @@ var FileItem = ({
|
|
|
4802
4883
|
}
|
|
4803
4884
|
);
|
|
4804
4885
|
};
|
|
4805
|
-
var FileUpload =
|
|
4886
|
+
var FileUpload = React25__namespace.default.forwardRef(
|
|
4806
4887
|
({
|
|
4807
4888
|
accept = "*",
|
|
4808
4889
|
multiple = true,
|
|
@@ -4816,9 +4897,9 @@ var FileUpload = React24__namespace.default.forwardRef(
|
|
|
4816
4897
|
children,
|
|
4817
4898
|
...props
|
|
4818
4899
|
}, ref) => {
|
|
4819
|
-
const [uploadedFiles, setUploadedFiles] =
|
|
4820
|
-
const [isDragOver, setIsDragOver] =
|
|
4821
|
-
const [error, setError] =
|
|
4900
|
+
const [uploadedFiles, setUploadedFiles] = React25.useState([]);
|
|
4901
|
+
const [isDragOver, setIsDragOver] = React25.useState(false);
|
|
4902
|
+
const [error, setError] = React25.useState(null);
|
|
4822
4903
|
const validateFile = (file) => {
|
|
4823
4904
|
if (file.size > maxSize) {
|
|
4824
4905
|
return `File size exceeds ${formatFileSize(maxSize)}`;
|
|
@@ -4834,7 +4915,7 @@ var FileUpload = React24__namespace.default.forwardRef(
|
|
|
4834
4915
|
}
|
|
4835
4916
|
return null;
|
|
4836
4917
|
};
|
|
4837
|
-
const processFiles =
|
|
4918
|
+
const processFiles = React25.useCallback(async (files) => {
|
|
4838
4919
|
const fileArray = Array.from(files);
|
|
4839
4920
|
setError(null);
|
|
4840
4921
|
if (uploadedFiles.length + fileArray.length > maxFiles) {
|
|
@@ -4897,33 +4978,34 @@ var FileUpload = React24__namespace.default.forwardRef(
|
|
|
4897
4978
|
}
|
|
4898
4979
|
}
|
|
4899
4980
|
}, [uploadedFiles.length, maxFiles, maxSize, accept, onUpload]);
|
|
4900
|
-
const handleDrop =
|
|
4981
|
+
const handleDrop = React25.useCallback((e) => {
|
|
4901
4982
|
e.preventDefault();
|
|
4902
4983
|
setIsDragOver(false);
|
|
4903
|
-
if (disabled)
|
|
4984
|
+
if (disabled)
|
|
4985
|
+
return;
|
|
4904
4986
|
const files = e.dataTransfer.files;
|
|
4905
4987
|
if (files.length > 0) {
|
|
4906
4988
|
processFiles(files);
|
|
4907
4989
|
}
|
|
4908
4990
|
}, [processFiles, disabled]);
|
|
4909
|
-
const handleDragOver =
|
|
4991
|
+
const handleDragOver = React25.useCallback((e) => {
|
|
4910
4992
|
e.preventDefault();
|
|
4911
4993
|
if (!disabled) {
|
|
4912
4994
|
setIsDragOver(true);
|
|
4913
4995
|
}
|
|
4914
4996
|
}, [disabled]);
|
|
4915
|
-
const handleDragLeave =
|
|
4997
|
+
const handleDragLeave = React25.useCallback((e) => {
|
|
4916
4998
|
e.preventDefault();
|
|
4917
4999
|
setIsDragOver(false);
|
|
4918
5000
|
}, []);
|
|
4919
|
-
const handleFileSelect =
|
|
5001
|
+
const handleFileSelect = React25.useCallback((e) => {
|
|
4920
5002
|
const files = e.target.files;
|
|
4921
5003
|
if (files && files.length > 0) {
|
|
4922
5004
|
processFiles(files);
|
|
4923
5005
|
}
|
|
4924
5006
|
e.target.value = "";
|
|
4925
5007
|
}, [processFiles]);
|
|
4926
|
-
const removeFile =
|
|
5008
|
+
const removeFile = React25.useCallback((fileId) => {
|
|
4927
5009
|
setUploadedFiles((prev) => {
|
|
4928
5010
|
const fileToRemove = prev.find((f) => f.id === fileId);
|
|
4929
5011
|
if (fileToRemove?.preview) {
|
|
@@ -5024,7 +5106,7 @@ var FileUpload = React24__namespace.default.forwardRef(
|
|
|
5024
5106
|
}
|
|
5025
5107
|
);
|
|
5026
5108
|
FileUpload.displayName = "FileUpload";
|
|
5027
|
-
var GestureDrawer =
|
|
5109
|
+
var GestureDrawer = React25__namespace.default.forwardRef(
|
|
5028
5110
|
({
|
|
5029
5111
|
children,
|
|
5030
5112
|
isOpen,
|
|
@@ -5042,7 +5124,8 @@ var GestureDrawer = React24__namespace.default.forwardRef(
|
|
|
5042
5124
|
const motionValue = isVertical ? y : x;
|
|
5043
5125
|
const opacity = framerMotion.useTransform(motionValue, [0, threshold], [1, 0.5]);
|
|
5044
5126
|
const handleDragEnd = (event, info) => {
|
|
5045
|
-
if (!enableSwipeToClose)
|
|
5127
|
+
if (!enableSwipeToClose)
|
|
5128
|
+
return;
|
|
5046
5129
|
const offset = isVertical ? info.offset.y : info.offset.x;
|
|
5047
5130
|
const velocity = isVertical ? info.velocity.y : info.velocity.x;
|
|
5048
5131
|
let shouldClose = false;
|
|
@@ -5083,7 +5166,8 @@ var GestureDrawer = React24__namespace.default.forwardRef(
|
|
|
5083
5166
|
const getAnimatePosition = () => {
|
|
5084
5167
|
return isVertical ? { y: 0 } : { x: 0 };
|
|
5085
5168
|
};
|
|
5086
|
-
if (!isOpen)
|
|
5169
|
+
if (!isOpen)
|
|
5170
|
+
return null;
|
|
5087
5171
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50", children: [
|
|
5088
5172
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5089
5173
|
framerMotion.motion.div,
|
|
@@ -5144,9 +5228,9 @@ function GitHubStars({
|
|
|
5144
5228
|
showWatchers = false,
|
|
5145
5229
|
repoUrl = "https://github.com/moonui/moonui"
|
|
5146
5230
|
}) {
|
|
5147
|
-
const [stats, setStats] =
|
|
5148
|
-
const [isLoading, setIsLoading] =
|
|
5149
|
-
|
|
5231
|
+
const [stats, setStats] = React25.useState(null);
|
|
5232
|
+
const [isLoading, setIsLoading] = React25.useState(true);
|
|
5233
|
+
React25.useEffect(() => {
|
|
5150
5234
|
const fetchStats = async () => {
|
|
5151
5235
|
try {
|
|
5152
5236
|
const response = await fetch("/api/github-stars");
|
|
@@ -5245,9 +5329,9 @@ function GitHubStarButton({
|
|
|
5245
5329
|
size = "md",
|
|
5246
5330
|
repoUrl = "https://github.com/moonui/moonui"
|
|
5247
5331
|
}) {
|
|
5248
|
-
const [stars, setStars] =
|
|
5249
|
-
const [isLoading, setIsLoading] =
|
|
5250
|
-
|
|
5332
|
+
const [stars, setStars] = React25.useState(null);
|
|
5333
|
+
const [isLoading, setIsLoading] = React25.useState(true);
|
|
5334
|
+
React25.useEffect(() => {
|
|
5251
5335
|
const fetchStats = async () => {
|
|
5252
5336
|
try {
|
|
5253
5337
|
const response = await fetch("/api/github-stars");
|
|
@@ -5293,7 +5377,7 @@ function GitHubStarButton({
|
|
|
5293
5377
|
}
|
|
5294
5378
|
);
|
|
5295
5379
|
}
|
|
5296
|
-
var InputOTP =
|
|
5380
|
+
var InputOTP = React25__namespace.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5297
5381
|
inputOtp.OTPInput,
|
|
5298
5382
|
{
|
|
5299
5383
|
ref,
|
|
@@ -5308,7 +5392,7 @@ var InputOTP = React24__namespace.forwardRef(({ className, containerClassName, .
|
|
|
5308
5392
|
}
|
|
5309
5393
|
));
|
|
5310
5394
|
InputOTP.displayName = "InputOTP";
|
|
5311
|
-
var InputOTPGroup =
|
|
5395
|
+
var InputOTPGroup = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
5312
5396
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
5313
5397
|
var inputOTPSlotVariants = classVarianceAuthority.cva(
|
|
5314
5398
|
[
|
|
@@ -5330,9 +5414,9 @@ var inputOTPSlotVariants = classVarianceAuthority.cva(
|
|
|
5330
5414
|
}
|
|
5331
5415
|
}
|
|
5332
5416
|
);
|
|
5333
|
-
var InputOTPSlot =
|
|
5417
|
+
var InputOTPSlot = React25__namespace.forwardRef(
|
|
5334
5418
|
({ index, className, ...props }, ref) => {
|
|
5335
|
-
const inputOTPContext =
|
|
5419
|
+
const inputOTPContext = React25__namespace.useContext(inputOtp.OTPInputContext);
|
|
5336
5420
|
const slot = inputOTPContext?.slots?.[index];
|
|
5337
5421
|
const char = slot?.char;
|
|
5338
5422
|
const hasFakeCaret = slot?.hasFakeCaret;
|
|
@@ -5354,7 +5438,7 @@ var InputOTPSlot = React24__namespace.forwardRef(
|
|
|
5354
5438
|
}
|
|
5355
5439
|
);
|
|
5356
5440
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
5357
|
-
var InputOTPSeparator =
|
|
5441
|
+
var InputOTPSeparator = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5358
5442
|
"div",
|
|
5359
5443
|
{
|
|
5360
5444
|
ref,
|
|
@@ -5372,10 +5456,11 @@ function LockedComponent({
|
|
|
5372
5456
|
showPreview = true,
|
|
5373
5457
|
previewDuration = 2e3
|
|
5374
5458
|
}) {
|
|
5375
|
-
const [isPreviewActive, setIsPreviewActive] =
|
|
5376
|
-
const [previewTimeout, setPreviewTimeout] =
|
|
5459
|
+
const [isPreviewActive, setIsPreviewActive] = React25.useState(false);
|
|
5460
|
+
const [previewTimeout, setPreviewTimeout] = React25.useState(null);
|
|
5377
5461
|
const handleMouseEnter = () => {
|
|
5378
|
-
if (!showPreview)
|
|
5462
|
+
if (!showPreview)
|
|
5463
|
+
return;
|
|
5379
5464
|
setIsPreviewActive(true);
|
|
5380
5465
|
if (previewTimeout) {
|
|
5381
5466
|
clearTimeout(previewTimeout);
|
|
@@ -5469,18 +5554,19 @@ function ProComponentWrapper({
|
|
|
5469
5554
|
fallback,
|
|
5470
5555
|
requireCLI = true
|
|
5471
5556
|
}) {
|
|
5472
|
-
const [authState, setAuthState] =
|
|
5557
|
+
const [authState, setAuthState] = React25.useState({
|
|
5473
5558
|
isAuthenticated: false,
|
|
5474
5559
|
deviceValid: false,
|
|
5475
5560
|
hasProAccess: false,
|
|
5476
5561
|
loading: true
|
|
5477
5562
|
});
|
|
5478
|
-
|
|
5563
|
+
React25.useEffect(() => {
|
|
5479
5564
|
const isDevelopment2 = () => {
|
|
5480
5565
|
const checks = {
|
|
5481
5566
|
nodeEnv: process.env.NODE_ENV === "development",
|
|
5482
5567
|
nextPublicEnv: process.env.NEXT_PUBLIC_VERCEL_ENV === "development",
|
|
5483
5568
|
localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
|
|
5569
|
+
port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080"),
|
|
5484
5570
|
vercelEnv: !process.env.VERCEL,
|
|
5485
5571
|
ciEnv: !process.env.CI,
|
|
5486
5572
|
deploymentEnv: !process.env.DEPLOYMENT_ENV
|
|
@@ -5561,7 +5647,9 @@ function ProComponentWrapper({
|
|
|
5561
5647
|
const isDevelopment = () => {
|
|
5562
5648
|
const checks = {
|
|
5563
5649
|
nodeEnv: process.env.NODE_ENV === "development",
|
|
5564
|
-
localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local"))
|
|
5650
|
+
localhost: typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes(".local")),
|
|
5651
|
+
port: typeof window !== "undefined" && (window.location.port === "3000" || window.location.port === "3001" || window.location.port === "8080")
|
|
5652
|
+
};
|
|
5565
5653
|
if (process.env.VERCEL || process.env.NETLIFY || process.env.RENDER || process.env.RAILWAY_ENVIRONMENT || process.env.FLY_APP_NAME) {
|
|
5566
5654
|
return false;
|
|
5567
5655
|
}
|
|
@@ -5649,7 +5737,7 @@ function MoonLogo({
|
|
|
5649
5737
|
showText = true,
|
|
5650
5738
|
...props
|
|
5651
5739
|
}) {
|
|
5652
|
-
const logoId =
|
|
5740
|
+
const logoId = React25__namespace.useId();
|
|
5653
5741
|
const gradientId = `moon-gradient-${logoId}`;
|
|
5654
5742
|
const maskId = `moon-mask-${logoId}`;
|
|
5655
5743
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
@@ -5731,7 +5819,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
5731
5819
|
}
|
|
5732
5820
|
);
|
|
5733
5821
|
Pagination.displayName = "Pagination";
|
|
5734
|
-
var PaginationContent =
|
|
5822
|
+
var PaginationContent = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5735
5823
|
"ul",
|
|
5736
5824
|
{
|
|
5737
5825
|
ref,
|
|
@@ -5740,7 +5828,7 @@ var PaginationContent = React24__namespace.forwardRef(({ className, ...props },
|
|
|
5740
5828
|
}
|
|
5741
5829
|
));
|
|
5742
5830
|
PaginationContent.displayName = "PaginationContent";
|
|
5743
|
-
var PaginationItem =
|
|
5831
|
+
var PaginationItem = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("moonui-theme", "", className), ...props }));
|
|
5744
5832
|
PaginationItem.displayName = "PaginationItem";
|
|
5745
5833
|
var PaginationLink = ({
|
|
5746
5834
|
className,
|
|
@@ -5848,7 +5936,7 @@ var selectTriggerVariants = classVarianceAuthority.cva(
|
|
|
5848
5936
|
}
|
|
5849
5937
|
}
|
|
5850
5938
|
);
|
|
5851
|
-
var SelectTrigger =
|
|
5939
|
+
var SelectTrigger = React25__namespace.forwardRef(({ className, children, variant, size, error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5852
5940
|
SelectPrimitive__namespace.Trigger,
|
|
5853
5941
|
{
|
|
5854
5942
|
ref,
|
|
@@ -5879,7 +5967,7 @@ var SelectTrigger = React24__namespace.forwardRef(({ className, children, varian
|
|
|
5879
5967
|
}
|
|
5880
5968
|
));
|
|
5881
5969
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
5882
|
-
var SelectScrollUpButton =
|
|
5970
|
+
var SelectScrollUpButton = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5883
5971
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
5884
5972
|
{
|
|
5885
5973
|
ref,
|
|
@@ -5892,7 +5980,7 @@ var SelectScrollUpButton = React24__namespace.forwardRef(({ className, ...props
|
|
|
5892
5980
|
}
|
|
5893
5981
|
));
|
|
5894
5982
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
5895
|
-
var SelectScrollDownButton =
|
|
5983
|
+
var SelectScrollDownButton = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5896
5984
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
5897
5985
|
{
|
|
5898
5986
|
ref,
|
|
@@ -5905,7 +5993,7 @@ var SelectScrollDownButton = React24__namespace.forwardRef(({ className, ...prop
|
|
|
5905
5993
|
}
|
|
5906
5994
|
));
|
|
5907
5995
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
5908
|
-
var SelectContent =
|
|
5996
|
+
var SelectContent = React25__namespace.forwardRef(({ className, children, position = "popper", side = "bottom", sideOffset = 4, align = "start", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5909
5997
|
SelectPrimitive__namespace.Content,
|
|
5910
5998
|
{
|
|
5911
5999
|
ref,
|
|
@@ -5916,7 +6004,7 @@ var SelectContent = React24__namespace.forwardRef(({ className, children, positi
|
|
|
5916
6004
|
className: cn(
|
|
5917
6005
|
[
|
|
5918
6006
|
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
|
|
5919
|
-
"rounded-md border border-
|
|
6007
|
+
"rounded-md border border-input",
|
|
5920
6008
|
"bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200",
|
|
5921
6009
|
"shadow-lg dark:shadow-gray-900/20",
|
|
5922
6010
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
@@ -5946,7 +6034,7 @@ var SelectContent = React24__namespace.forwardRef(({ className, children, positi
|
|
|
5946
6034
|
}
|
|
5947
6035
|
) }));
|
|
5948
6036
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
5949
|
-
var SelectLabel =
|
|
6037
|
+
var SelectLabel = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5950
6038
|
SelectPrimitive__namespace.Label,
|
|
5951
6039
|
{
|
|
5952
6040
|
ref,
|
|
@@ -5955,7 +6043,7 @@ var SelectLabel = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5955
6043
|
}
|
|
5956
6044
|
));
|
|
5957
6045
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
5958
|
-
var SelectItem =
|
|
6046
|
+
var SelectItem = React25__namespace.forwardRef(({ className, children, variant = "default", size = "md", rightIcon, customIndicator, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5959
6047
|
SelectPrimitive__namespace.Item,
|
|
5960
6048
|
{
|
|
5961
6049
|
ref,
|
|
@@ -5985,7 +6073,7 @@ var SelectItem = React24__namespace.forwardRef(({ className, children, variant =
|
|
|
5985
6073
|
}
|
|
5986
6074
|
));
|
|
5987
6075
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
5988
|
-
var SelectSeparator =
|
|
6076
|
+
var SelectSeparator = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5989
6077
|
SelectPrimitive__namespace.Separator,
|
|
5990
6078
|
{
|
|
5991
6079
|
ref,
|
|
@@ -6026,22 +6114,30 @@ var formatPhoneNumber = (value, countryCode) => {
|
|
|
6026
6114
|
const cleaned = value.replace(/\D/g, "");
|
|
6027
6115
|
switch (countryCode) {
|
|
6028
6116
|
case "+1":
|
|
6029
|
-
if (cleaned.length <= 3)
|
|
6030
|
-
|
|
6117
|
+
if (cleaned.length <= 3)
|
|
6118
|
+
return cleaned;
|
|
6119
|
+
if (cleaned.length <= 6)
|
|
6120
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
|
|
6031
6121
|
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)}-${cleaned.slice(6, 10)}`;
|
|
6032
6122
|
case "+44":
|
|
6033
|
-
if (cleaned.length <= 4)
|
|
6034
|
-
|
|
6123
|
+
if (cleaned.length <= 4)
|
|
6124
|
+
return cleaned;
|
|
6125
|
+
if (cleaned.length <= 7)
|
|
6126
|
+
return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
|
|
6035
6127
|
return `${cleaned.slice(0, 4)} ${cleaned.slice(4, 7)} ${cleaned.slice(7, 11)}`;
|
|
6036
6128
|
case "+90":
|
|
6037
|
-
if (cleaned.length <= 3)
|
|
6038
|
-
|
|
6039
|
-
if (cleaned.length <=
|
|
6129
|
+
if (cleaned.length <= 3)
|
|
6130
|
+
return cleaned;
|
|
6131
|
+
if (cleaned.length <= 6)
|
|
6132
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
|
|
6133
|
+
if (cleaned.length <= 9)
|
|
6134
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
|
|
6040
6135
|
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8, 10)}`;
|
|
6041
6136
|
default:
|
|
6042
6137
|
let formatted = "";
|
|
6043
6138
|
for (let i = 0; i < cleaned.length; i++) {
|
|
6044
|
-
if (i > 0 && i % 3 === 0)
|
|
6139
|
+
if (i > 0 && i % 3 === 0)
|
|
6140
|
+
formatted += " ";
|
|
6045
6141
|
formatted += cleaned[i];
|
|
6046
6142
|
}
|
|
6047
6143
|
return formatted;
|
|
@@ -6051,18 +6147,15 @@ var getMaxLength = (countryCode) => {
|
|
|
6051
6147
|
switch (countryCode) {
|
|
6052
6148
|
case "+1":
|
|
6053
6149
|
return 10;
|
|
6054
|
-
// US/Canada
|
|
6055
6150
|
case "+44":
|
|
6056
6151
|
return 11;
|
|
6057
|
-
// UK
|
|
6058
6152
|
case "+90":
|
|
6059
6153
|
return 10;
|
|
6060
|
-
// Turkey
|
|
6061
6154
|
default:
|
|
6062
6155
|
return 15;
|
|
6063
6156
|
}
|
|
6064
6157
|
};
|
|
6065
|
-
var PhoneInput =
|
|
6158
|
+
var PhoneInput = React25__namespace.forwardRef(
|
|
6066
6159
|
({
|
|
6067
6160
|
className,
|
|
6068
6161
|
value = "",
|
|
@@ -6074,8 +6167,8 @@ var PhoneInput = React24__namespace.forwardRef(
|
|
|
6074
6167
|
size,
|
|
6075
6168
|
...props
|
|
6076
6169
|
}, ref) => {
|
|
6077
|
-
const [countryCode, setCountryCode] =
|
|
6078
|
-
const [phoneNumber, setPhoneNumber] =
|
|
6170
|
+
const [countryCode, setCountryCode] = React25__namespace.useState(defaultCountry);
|
|
6171
|
+
const [phoneNumber, setPhoneNumber] = React25__namespace.useState(value);
|
|
6079
6172
|
const selectedCountry = countries.find((c) => c.code === countryCode) || countries[0];
|
|
6080
6173
|
const handlePhoneChange = (e) => {
|
|
6081
6174
|
const rawValue = e.target.value.replace(/\D/g, "");
|
|
@@ -6146,15 +6239,15 @@ var radioGroupItemVariants = classVarianceAuthority.cva(
|
|
|
6146
6239
|
}
|
|
6147
6240
|
}
|
|
6148
6241
|
);
|
|
6149
|
-
var RadioGroupContext =
|
|
6150
|
-
var RadioGroup2 =
|
|
6242
|
+
var RadioGroupContext = React25__namespace.createContext({});
|
|
6243
|
+
var RadioGroup2 = React25__namespace.forwardRef(
|
|
6151
6244
|
({ className, value, defaultValue, onValueChange, disabled, name, ...props }, ref) => {
|
|
6152
|
-
const [internalValue, setInternalValue] =
|
|
6245
|
+
const [internalValue, setInternalValue] = React25__namespace.useState(
|
|
6153
6246
|
defaultValue
|
|
6154
6247
|
);
|
|
6155
6248
|
const isControlled = value !== void 0;
|
|
6156
6249
|
const currentValue = isControlled ? value : internalValue;
|
|
6157
|
-
const handleValueChange =
|
|
6250
|
+
const handleValueChange = React25__namespace.useCallback(
|
|
6158
6251
|
(next) => {
|
|
6159
6252
|
if (!isControlled) {
|
|
6160
6253
|
setInternalValue(next);
|
|
@@ -6186,9 +6279,9 @@ var RadioGroup2 = React24__namespace.forwardRef(
|
|
|
6186
6279
|
}
|
|
6187
6280
|
);
|
|
6188
6281
|
RadioGroup2.displayName = "RadioGroup";
|
|
6189
|
-
var RadioGroupItem =
|
|
6190
|
-
const radioGroup =
|
|
6191
|
-
const generatedId =
|
|
6282
|
+
var RadioGroupItem = React25__namespace.forwardRef(({ className, variant, size, indicator, id, value, disabled, ...props }, ref) => {
|
|
6283
|
+
const radioGroup = React25__namespace.useContext(RadioGroupContext);
|
|
6284
|
+
const generatedId = React25__namespace.useId();
|
|
6192
6285
|
const radioId = id || generatedId;
|
|
6193
6286
|
const isChecked = radioGroup.value === value;
|
|
6194
6287
|
const handleChange = (e) => {
|
|
@@ -6241,7 +6334,7 @@ var RadioGroupItem = React24__namespace.forwardRef(({ className, variant, size,
|
|
|
6241
6334
|
] });
|
|
6242
6335
|
});
|
|
6243
6336
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
6244
|
-
var RadioLabel =
|
|
6337
|
+
var RadioLabel = React25__namespace.forwardRef(
|
|
6245
6338
|
({ className, htmlFor, children, disabled = false, ...props }, ref) => {
|
|
6246
6339
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6247
6340
|
"label",
|
|
@@ -6260,13 +6353,13 @@ var RadioLabel = React24__namespace.forwardRef(
|
|
|
6260
6353
|
}
|
|
6261
6354
|
);
|
|
6262
6355
|
RadioLabel.displayName = "RadioLabel";
|
|
6263
|
-
var RadioItemWithLabel =
|
|
6356
|
+
var RadioItemWithLabel = React25__namespace.forwardRef(({
|
|
6264
6357
|
id,
|
|
6265
6358
|
label,
|
|
6266
6359
|
labelClassName,
|
|
6267
6360
|
...radioProps
|
|
6268
6361
|
}, ref) => {
|
|
6269
|
-
const generatedId =
|
|
6362
|
+
const generatedId = React25__namespace.useId();
|
|
6270
6363
|
const radioId = id || generatedId;
|
|
6271
6364
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
6272
6365
|
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { ref, id: radioId, ...radioProps }),
|
|
@@ -6343,7 +6436,7 @@ function RichTextEditor({
|
|
|
6343
6436
|
)
|
|
6344
6437
|
] });
|
|
6345
6438
|
}
|
|
6346
|
-
var ScrollArea =
|
|
6439
|
+
var ScrollArea = React25__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6347
6440
|
ScrollAreaPrimitive__namespace.Root,
|
|
6348
6441
|
{
|
|
6349
6442
|
ref,
|
|
@@ -6357,7 +6450,7 @@ var ScrollArea = React24__namespace.forwardRef(({ className, children, ...props
|
|
|
6357
6450
|
}
|
|
6358
6451
|
));
|
|
6359
6452
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
6360
|
-
var ScrollBar =
|
|
6453
|
+
var ScrollBar = React25__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6361
6454
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
6362
6455
|
{
|
|
6363
6456
|
ref,
|
|
@@ -6411,7 +6504,7 @@ var defaultTransition = {
|
|
|
6411
6504
|
ease: [0.25, 0.46, 0.45, 0.94]
|
|
6412
6505
|
// Custom cubic-bezier for smooth motion
|
|
6413
6506
|
};
|
|
6414
|
-
var ScrollReveal =
|
|
6507
|
+
var ScrollReveal = React25__namespace.forwardRef(
|
|
6415
6508
|
({
|
|
6416
6509
|
children,
|
|
6417
6510
|
direction = "up",
|
|
@@ -6432,16 +6525,17 @@ var ScrollReveal = React24__namespace.forwardRef(
|
|
|
6432
6525
|
viewport
|
|
6433
6526
|
}, ref) => {
|
|
6434
6527
|
const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
|
|
6435
|
-
const animationVariants =
|
|
6436
|
-
if (variants)
|
|
6528
|
+
const animationVariants = React25__namespace.useMemo(() => {
|
|
6529
|
+
if (variants)
|
|
6530
|
+
return variants;
|
|
6437
6531
|
return createDefaultVariants(direction, distance);
|
|
6438
6532
|
}, [direction, distance, variants]);
|
|
6439
|
-
const transition =
|
|
6533
|
+
const transition = React25__namespace.useMemo(() => ({
|
|
6440
6534
|
...defaultTransition,
|
|
6441
6535
|
duration,
|
|
6442
6536
|
delay: delay + stagger
|
|
6443
6537
|
}), [duration, delay, stagger]);
|
|
6444
|
-
const viewportConfig =
|
|
6538
|
+
const viewportConfig = React25__namespace.useMemo(() => ({
|
|
6445
6539
|
once: shouldTriggerOnce,
|
|
6446
6540
|
amount: threshold,
|
|
6447
6541
|
...viewport
|
|
@@ -6476,7 +6570,7 @@ var ScrollReveal = React24__namespace.forwardRef(
|
|
|
6476
6570
|
}
|
|
6477
6571
|
);
|
|
6478
6572
|
ScrollReveal.displayName = "ScrollReveal";
|
|
6479
|
-
var ScrollRevealContainer =
|
|
6573
|
+
var ScrollRevealContainer = React25__namespace.forwardRef(
|
|
6480
6574
|
({
|
|
6481
6575
|
children,
|
|
6482
6576
|
stagger = 0.1,
|
|
@@ -6489,7 +6583,7 @@ var ScrollRevealContainer = React24__namespace.forwardRef(
|
|
|
6489
6583
|
viewport
|
|
6490
6584
|
}, ref) => {
|
|
6491
6585
|
const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
|
|
6492
|
-
const viewportConfig =
|
|
6586
|
+
const viewportConfig = React25__namespace.useMemo(() => ({
|
|
6493
6587
|
once: shouldTriggerOnce,
|
|
6494
6588
|
amount: threshold,
|
|
6495
6589
|
...viewport
|
|
@@ -6520,7 +6614,7 @@ var ScrollRevealContainer = React24__namespace.forwardRef(
|
|
|
6520
6614
|
}
|
|
6521
6615
|
);
|
|
6522
6616
|
ScrollRevealContainer.displayName = "ScrollRevealContainer";
|
|
6523
|
-
var ScrollRevealItem =
|
|
6617
|
+
var ScrollRevealItem = React25__namespace.forwardRef(
|
|
6524
6618
|
({
|
|
6525
6619
|
children,
|
|
6526
6620
|
direction = "up",
|
|
@@ -6531,11 +6625,12 @@ var ScrollRevealItem = React24__namespace.forwardRef(
|
|
|
6531
6625
|
style,
|
|
6532
6626
|
id
|
|
6533
6627
|
}, ref) => {
|
|
6534
|
-
const animationVariants =
|
|
6535
|
-
if (variants)
|
|
6628
|
+
const animationVariants = React25__namespace.useMemo(() => {
|
|
6629
|
+
if (variants)
|
|
6630
|
+
return variants;
|
|
6536
6631
|
return createDefaultVariants(direction, distance);
|
|
6537
6632
|
}, [direction, distance, variants]);
|
|
6538
|
-
const transition =
|
|
6633
|
+
const transition = React25__namespace.useMemo(() => ({
|
|
6539
6634
|
...defaultTransition,
|
|
6540
6635
|
duration
|
|
6541
6636
|
}), [duration]);
|
|
@@ -6651,7 +6746,7 @@ var separatorVariants = classVarianceAuthority.cva(
|
|
|
6651
6746
|
}
|
|
6652
6747
|
}
|
|
6653
6748
|
);
|
|
6654
|
-
var Separator3 =
|
|
6749
|
+
var Separator3 = React25__namespace.forwardRef(
|
|
6655
6750
|
({
|
|
6656
6751
|
className,
|
|
6657
6752
|
orientation = "horizontal",
|
|
@@ -6694,7 +6789,7 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
6694
6789
|
}
|
|
6695
6790
|
}
|
|
6696
6791
|
);
|
|
6697
|
-
var Toggle =
|
|
6792
|
+
var Toggle = React25__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6698
6793
|
TogglePrimitive__namespace.Root,
|
|
6699
6794
|
{
|
|
6700
6795
|
ref,
|
|
@@ -6730,7 +6825,7 @@ var tooltipVariants = classVarianceAuthority.cva(
|
|
|
6730
6825
|
);
|
|
6731
6826
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
6732
6827
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
6733
|
-
var TooltipArrow =
|
|
6828
|
+
var TooltipArrow = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6734
6829
|
TooltipPrimitive__namespace.Arrow,
|
|
6735
6830
|
{
|
|
6736
6831
|
ref,
|
|
@@ -6739,7 +6834,7 @@ var TooltipArrow = React24__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
6739
6834
|
}
|
|
6740
6835
|
));
|
|
6741
6836
|
TooltipArrow.displayName = TooltipPrimitive__namespace.Arrow.displayName;
|
|
6742
|
-
var TooltipContent =
|
|
6837
|
+
var TooltipContent = React25__namespace.forwardRef(({ className, variant, size, showArrow = false, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6743
6838
|
TooltipPrimitive__namespace.Content,
|
|
6744
6839
|
{
|
|
6745
6840
|
ref,
|
|
@@ -6753,7 +6848,7 @@ var TooltipContent = React24__namespace.forwardRef(({ className, variant, size,
|
|
|
6753
6848
|
}
|
|
6754
6849
|
));
|
|
6755
6850
|
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
6756
|
-
var SimpleTooltip =
|
|
6851
|
+
var SimpleTooltip = React25__namespace.forwardRef(
|
|
6757
6852
|
({
|
|
6758
6853
|
children,
|
|
6759
6854
|
content,
|
|
@@ -6841,7 +6936,7 @@ var ColorPicker2 = ({ onColorSelect }) => {
|
|
|
6841
6936
|
color
|
|
6842
6937
|
)) });
|
|
6843
6938
|
};
|
|
6844
|
-
var SimpleEditor =
|
|
6939
|
+
var SimpleEditor = React25__namespace.default.forwardRef(
|
|
6845
6940
|
({
|
|
6846
6941
|
value = "",
|
|
6847
6942
|
onChange,
|
|
@@ -6854,13 +6949,13 @@ var SimpleEditor = React24__namespace.default.forwardRef(
|
|
|
6854
6949
|
showPreview = true,
|
|
6855
6950
|
...props
|
|
6856
6951
|
}, ref) => {
|
|
6857
|
-
const [content, setContent] =
|
|
6858
|
-
const [isPreview, setIsPreview] =
|
|
6859
|
-
const [sourceContent, setSourceContent] =
|
|
6860
|
-
|
|
6861
|
-
const editorRef =
|
|
6862
|
-
const sourceRef =
|
|
6863
|
-
const [formatState, setFormatState] =
|
|
6952
|
+
const [content, setContent] = React25.useState(value);
|
|
6953
|
+
const [isPreview, setIsPreview] = React25.useState(false);
|
|
6954
|
+
const [sourceContent, setSourceContent] = React25.useState(value);
|
|
6955
|
+
React25.useState(null);
|
|
6956
|
+
const editorRef = React25__namespace.default.useRef(null);
|
|
6957
|
+
const sourceRef = React25__namespace.default.useRef(null);
|
|
6958
|
+
const [formatState, setFormatState] = React25.useState({
|
|
6864
6959
|
bold: false,
|
|
6865
6960
|
italic: false,
|
|
6866
6961
|
underline: false,
|
|
@@ -6874,27 +6969,29 @@ var SimpleEditor = React24__namespace.default.forwardRef(
|
|
|
6874
6969
|
quote: false,
|
|
6875
6970
|
code: false
|
|
6876
6971
|
});
|
|
6877
|
-
const updateContent =
|
|
6972
|
+
const updateContent = React25.useCallback((newContent) => {
|
|
6878
6973
|
setContent(newContent);
|
|
6879
6974
|
onChange?.(newContent);
|
|
6880
6975
|
}, [onChange]);
|
|
6881
|
-
const saveSelection =
|
|
6976
|
+
const saveSelection = React25.useCallback(() => {
|
|
6882
6977
|
const selection2 = window.getSelection();
|
|
6883
6978
|
if (selection2 && selection2.rangeCount > 0) {
|
|
6884
6979
|
return selection2.getRangeAt(0);
|
|
6885
6980
|
}
|
|
6886
6981
|
return null;
|
|
6887
6982
|
}, []);
|
|
6888
|
-
|
|
6889
|
-
if (!range)
|
|
6983
|
+
React25.useCallback((range) => {
|
|
6984
|
+
if (!range)
|
|
6985
|
+
return;
|
|
6890
6986
|
const selection2 = window.getSelection();
|
|
6891
6987
|
if (selection2) {
|
|
6892
6988
|
selection2.removeAllRanges();
|
|
6893
6989
|
selection2.addRange(range);
|
|
6894
6990
|
}
|
|
6895
6991
|
}, []);
|
|
6896
|
-
const executeCommand =
|
|
6897
|
-
if (disabled)
|
|
6992
|
+
const executeCommand = React25.useCallback((command, value2) => {
|
|
6993
|
+
if (disabled)
|
|
6994
|
+
return;
|
|
6898
6995
|
if (editorRef.current) {
|
|
6899
6996
|
editorRef.current.focus();
|
|
6900
6997
|
}
|
|
@@ -6925,11 +7022,11 @@ var SimpleEditor = React24__namespace.default.forwardRef(
|
|
|
6925
7022
|
editorRef.current.focus();
|
|
6926
7023
|
}
|
|
6927
7024
|
}, [disabled, saveSelection, updateContent]);
|
|
6928
|
-
const handleInput =
|
|
7025
|
+
const handleInput = React25.useCallback((e) => {
|
|
6929
7026
|
const newContent = e.currentTarget.innerHTML;
|
|
6930
7027
|
updateContent(newContent);
|
|
6931
7028
|
}, [updateContent]);
|
|
6932
|
-
const handleKeyDown =
|
|
7029
|
+
const handleKeyDown = React25.useCallback((e) => {
|
|
6933
7030
|
if (e.ctrlKey || e.metaKey) {
|
|
6934
7031
|
switch (e.key) {
|
|
6935
7032
|
case "b":
|
|
@@ -6959,22 +7056,22 @@ var SimpleEditor = React24__namespace.default.forwardRef(
|
|
|
6959
7056
|
executeCommand("insertHTML", " ");
|
|
6960
7057
|
}
|
|
6961
7058
|
}, [executeCommand]);
|
|
6962
|
-
const insertLink =
|
|
7059
|
+
const insertLink = React25.useCallback(() => {
|
|
6963
7060
|
const url = prompt("Enter URL:");
|
|
6964
7061
|
if (url) {
|
|
6965
7062
|
executeCommand("createLink", url);
|
|
6966
7063
|
}
|
|
6967
7064
|
}, [executeCommand]);
|
|
6968
|
-
const insertImage =
|
|
7065
|
+
const insertImage = React25.useCallback(() => {
|
|
6969
7066
|
const url = prompt("Enter image URL:");
|
|
6970
7067
|
if (url) {
|
|
6971
7068
|
executeCommand("insertImage", url);
|
|
6972
7069
|
}
|
|
6973
7070
|
}, [executeCommand]);
|
|
6974
|
-
const formatHeading =
|
|
7071
|
+
const formatHeading = React25.useCallback((level) => {
|
|
6975
7072
|
executeCommand("formatBlock", `<h${level}>`);
|
|
6976
7073
|
}, [executeCommand]);
|
|
6977
|
-
const setTextColor =
|
|
7074
|
+
const setTextColor = React25.useCallback((color) => {
|
|
6978
7075
|
const selection2 = window.getSelection();
|
|
6979
7076
|
if (selection2 && selection2.rangeCount > 0) {
|
|
6980
7077
|
const range = selection2.getRangeAt(0);
|
|
@@ -6991,12 +7088,12 @@ var SimpleEditor = React24__namespace.default.forwardRef(
|
|
|
6991
7088
|
}
|
|
6992
7089
|
}
|
|
6993
7090
|
}, [executeCommand, updateContent]);
|
|
6994
|
-
|
|
7091
|
+
React25__namespace.default.useEffect(() => {
|
|
6995
7092
|
if (editorRef.current && content && content !== editorRef.current.innerHTML) {
|
|
6996
7093
|
editorRef.current.innerHTML = content;
|
|
6997
7094
|
}
|
|
6998
7095
|
}, [content]);
|
|
6999
|
-
|
|
7096
|
+
React25__namespace.default.useEffect(() => {
|
|
7000
7097
|
if (value !== void 0 && value !== content) {
|
|
7001
7098
|
setContent(value);
|
|
7002
7099
|
setSourceContent(value);
|
|
@@ -7358,8 +7455,8 @@ var SimpleEditor = React24__namespace.default.forwardRef(
|
|
|
7358
7455
|
);
|
|
7359
7456
|
SimpleEditor.displayName = "SimpleEditor";
|
|
7360
7457
|
var CharacterCount = ({ content }) => {
|
|
7361
|
-
const [count, setCount] =
|
|
7362
|
-
|
|
7458
|
+
const [count, setCount] = React25.useState(0);
|
|
7459
|
+
React25.useEffect(() => {
|
|
7363
7460
|
const getPlainText = (html) => {
|
|
7364
7461
|
const div = document.createElement("div");
|
|
7365
7462
|
div.innerHTML = html;
|
|
@@ -7406,7 +7503,7 @@ var skeletonVariants = classVarianceAuthority.cva(
|
|
|
7406
7503
|
}
|
|
7407
7504
|
}
|
|
7408
7505
|
);
|
|
7409
|
-
var Skeleton =
|
|
7506
|
+
var Skeleton = React25__namespace.forwardRef(
|
|
7410
7507
|
({
|
|
7411
7508
|
className,
|
|
7412
7509
|
variant,
|
|
@@ -7490,7 +7587,7 @@ var Skeleton = React24__namespace.forwardRef(
|
|
|
7490
7587
|
}
|
|
7491
7588
|
);
|
|
7492
7589
|
Skeleton.displayName = "Skeleton";
|
|
7493
|
-
var SkeletonText =
|
|
7590
|
+
var SkeletonText = React25__namespace.forwardRef(
|
|
7494
7591
|
({
|
|
7495
7592
|
className,
|
|
7496
7593
|
lines = 3,
|
|
@@ -7531,7 +7628,7 @@ var SkeletonText = React24__namespace.forwardRef(
|
|
|
7531
7628
|
}
|
|
7532
7629
|
);
|
|
7533
7630
|
SkeletonText.displayName = "SkeletonText";
|
|
7534
|
-
var SkeletonAvatar =
|
|
7631
|
+
var SkeletonAvatar = React25__namespace.forwardRef(
|
|
7535
7632
|
({
|
|
7536
7633
|
className,
|
|
7537
7634
|
size = "2.5rem",
|
|
@@ -7557,7 +7654,7 @@ var SkeletonAvatar = React24__namespace.forwardRef(
|
|
|
7557
7654
|
}
|
|
7558
7655
|
);
|
|
7559
7656
|
SkeletonAvatar.displayName = "SkeletonAvatar";
|
|
7560
|
-
var SkeletonCard =
|
|
7657
|
+
var SkeletonCard = React25__namespace.forwardRef(
|
|
7561
7658
|
({
|
|
7562
7659
|
className,
|
|
7563
7660
|
showHeader = true,
|
|
@@ -7631,22 +7728,25 @@ var SkeletonCard = React24__namespace.forwardRef(
|
|
|
7631
7728
|
}
|
|
7632
7729
|
);
|
|
7633
7730
|
SkeletonCard.displayName = "SkeletonCard";
|
|
7634
|
-
var SwipeableCard =
|
|
7731
|
+
var SwipeableCard = React25__namespace.forwardRef(
|
|
7635
7732
|
({ className, children, onSwipeLeft, onSwipeRight, threshold = 100, disabled = false, ...props }, ref) => {
|
|
7636
|
-
const [startX, setStartX] =
|
|
7637
|
-
const [currentX, setCurrentX] =
|
|
7638
|
-
const [isSwiping, setIsSwiping] =
|
|
7733
|
+
const [startX, setStartX] = React25__namespace.useState(0);
|
|
7734
|
+
const [currentX, setCurrentX] = React25__namespace.useState(0);
|
|
7735
|
+
const [isSwiping, setIsSwiping] = React25__namespace.useState(false);
|
|
7639
7736
|
const handleTouchStart = (e) => {
|
|
7640
|
-
if (disabled)
|
|
7737
|
+
if (disabled)
|
|
7738
|
+
return;
|
|
7641
7739
|
setStartX(e.touches[0].clientX);
|
|
7642
7740
|
setIsSwiping(true);
|
|
7643
7741
|
};
|
|
7644
7742
|
const handleTouchMove = (e) => {
|
|
7645
|
-
if (disabled || !isSwiping)
|
|
7743
|
+
if (disabled || !isSwiping)
|
|
7744
|
+
return;
|
|
7646
7745
|
setCurrentX(e.touches[0].clientX);
|
|
7647
7746
|
};
|
|
7648
7747
|
const handleTouchEnd = () => {
|
|
7649
|
-
if (disabled || !isSwiping)
|
|
7748
|
+
if (disabled || !isSwiping)
|
|
7749
|
+
return;
|
|
7650
7750
|
const deltaX = currentX - startX;
|
|
7651
7751
|
if (Math.abs(deltaX) > threshold) {
|
|
7652
7752
|
if (deltaX > 0 && onSwipeRight) {
|
|
@@ -7727,7 +7827,7 @@ var switchThumbVariants = classVarianceAuthority.cva(
|
|
|
7727
7827
|
}
|
|
7728
7828
|
}
|
|
7729
7829
|
);
|
|
7730
|
-
var Switch =
|
|
7830
|
+
var Switch = React25__namespace.forwardRef(({
|
|
7731
7831
|
className,
|
|
7732
7832
|
size,
|
|
7733
7833
|
variant,
|
|
@@ -7738,7 +7838,7 @@ var Switch = React24__namespace.forwardRef(({
|
|
|
7738
7838
|
"aria-describedby": ariaDescribedBy,
|
|
7739
7839
|
...props
|
|
7740
7840
|
}, ref) => {
|
|
7741
|
-
const reactId =
|
|
7841
|
+
const reactId = React25__namespace.useId();
|
|
7742
7842
|
const descriptionId = description ? `${reactId}-description` : void 0;
|
|
7743
7843
|
const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
7744
7844
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "moonui-theme inline-flex items-center gap-2", children: [
|
|
@@ -7766,7 +7866,7 @@ var Switch = React24__namespace.forwardRef(({
|
|
|
7766
7866
|
] });
|
|
7767
7867
|
});
|
|
7768
7868
|
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
7769
|
-
var TagsInput =
|
|
7869
|
+
var TagsInput = React25__namespace.forwardRef(
|
|
7770
7870
|
({
|
|
7771
7871
|
value = [],
|
|
7772
7872
|
onChange,
|
|
@@ -7779,14 +7879,15 @@ var TagsInput = React24__namespace.forwardRef(
|
|
|
7779
7879
|
disabled,
|
|
7780
7880
|
...props
|
|
7781
7881
|
}, ref) => {
|
|
7782
|
-
const [inputValue, setInputValue] =
|
|
7783
|
-
const [error, setError] =
|
|
7784
|
-
const innerInputRef =
|
|
7785
|
-
|
|
7786
|
-
const tagButtonRefs =
|
|
7787
|
-
const errorId =
|
|
7882
|
+
const [inputValue, setInputValue] = React25__namespace.useState("");
|
|
7883
|
+
const [error, setError] = React25__namespace.useState("");
|
|
7884
|
+
const innerInputRef = React25__namespace.useRef(null);
|
|
7885
|
+
React25__namespace.useImperativeHandle(ref, () => innerInputRef.current);
|
|
7886
|
+
const tagButtonRefs = React25__namespace.useRef([]);
|
|
7887
|
+
const errorId = React25__namespace.useId();
|
|
7788
7888
|
const focusTag = (index) => {
|
|
7789
|
-
if (value.length === 0)
|
|
7889
|
+
if (value.length === 0)
|
|
7890
|
+
return;
|
|
7790
7891
|
const clamped = Math.max(0, Math.min(value.length - 1, index));
|
|
7791
7892
|
tagButtonRefs.current[clamped]?.focus();
|
|
7792
7893
|
};
|
|
@@ -7809,8 +7910,10 @@ var TagsInput = React24__namespace.forwardRef(
|
|
|
7809
7910
|
break;
|
|
7810
7911
|
case "ArrowRight":
|
|
7811
7912
|
e.preventDefault();
|
|
7812
|
-
if (index >= value.length - 1)
|
|
7813
|
-
|
|
7913
|
+
if (index >= value.length - 1)
|
|
7914
|
+
innerInputRef.current?.focus();
|
|
7915
|
+
else
|
|
7916
|
+
focusTag(index + 1);
|
|
7814
7917
|
break;
|
|
7815
7918
|
case "Home":
|
|
7816
7919
|
e.preventDefault();
|
|
@@ -7826,8 +7929,10 @@ var TagsInput = React24__namespace.forwardRef(
|
|
|
7826
7929
|
const remaining = value.length - 1;
|
|
7827
7930
|
removeTag(index);
|
|
7828
7931
|
requestAnimationFrame(() => {
|
|
7829
|
-
if (remaining > 0)
|
|
7830
|
-
|
|
7932
|
+
if (remaining > 0)
|
|
7933
|
+
focusTag(Math.min(index, remaining - 1));
|
|
7934
|
+
else
|
|
7935
|
+
innerInputRef.current?.focus();
|
|
7831
7936
|
});
|
|
7832
7937
|
break;
|
|
7833
7938
|
}
|
|
@@ -7835,7 +7940,8 @@ var TagsInput = React24__namespace.forwardRef(
|
|
|
7835
7940
|
};
|
|
7836
7941
|
const addTag = () => {
|
|
7837
7942
|
const tag = inputValue.trim();
|
|
7838
|
-
if (!tag)
|
|
7943
|
+
if (!tag)
|
|
7944
|
+
return;
|
|
7839
7945
|
if (!allowDuplicates && value.includes(tag)) {
|
|
7840
7946
|
setError("This tag already exists");
|
|
7841
7947
|
setTimeout(() => setError(""), 2e3);
|
|
@@ -7851,7 +7957,8 @@ var TagsInput = React24__namespace.forwardRef(
|
|
|
7851
7957
|
setError("");
|
|
7852
7958
|
};
|
|
7853
7959
|
const removeTag = (index) => {
|
|
7854
|
-
if (disabled)
|
|
7960
|
+
if (disabled)
|
|
7961
|
+
return;
|
|
7855
7962
|
onChange(value.filter((_, i) => i !== index));
|
|
7856
7963
|
};
|
|
7857
7964
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
@@ -7918,7 +8025,7 @@ TagsInput.displayName = "TagsInput";
|
|
|
7918
8025
|
var textareaVariants = classVarianceAuthority.cva(
|
|
7919
8026
|
[
|
|
7920
8027
|
"flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200",
|
|
7921
|
-
"text-foreground placeholder:text-muted-foreground
|
|
8028
|
+
"text-foreground placeholder:text-muted-foreground",
|
|
7922
8029
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
7923
8030
|
"focus-visible:outline-none dark:text-gray-200",
|
|
7924
8031
|
"resize-none"
|
|
@@ -7927,10 +8034,10 @@ var textareaVariants = classVarianceAuthority.cva(
|
|
|
7927
8034
|
{
|
|
7928
8035
|
variants: {
|
|
7929
8036
|
variant: {
|
|
7930
|
-
default: "border border-
|
|
7931
|
-
outline: "border-2 border-
|
|
8037
|
+
default: "border border-input bg-background dark:bg-gray-800/80 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 dark:shadow-inner dark:shadow-gray-950/10",
|
|
8038
|
+
outline: "border-2 border-input bg-transparent focus-visible:border-primary dark:focus-visible:border-primary/80",
|
|
7932
8039
|
ghost: "border-none bg-transparent hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
|
|
7933
|
-
underline: "border-t-0 border-l-0 border-r-0 border-b-2 border-
|
|
8040
|
+
underline: "border-t-0 border-l-0 border-r-0 border-b-2 border-input rounded-none px-0 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"
|
|
7934
8041
|
},
|
|
7935
8042
|
size: {
|
|
7936
8043
|
sm: "min-h-[60px] text-xs",
|
|
@@ -7954,7 +8061,7 @@ var textareaVariants = classVarianceAuthority.cva(
|
|
|
7954
8061
|
}
|
|
7955
8062
|
}
|
|
7956
8063
|
);
|
|
7957
|
-
var Textarea =
|
|
8064
|
+
var Textarea = React25__namespace.forwardRef(
|
|
7958
8065
|
({
|
|
7959
8066
|
className,
|
|
7960
8067
|
wrapperClassName,
|
|
@@ -7974,14 +8081,15 @@ var Textarea = React24__namespace.forwardRef(
|
|
|
7974
8081
|
onChange,
|
|
7975
8082
|
...props
|
|
7976
8083
|
}, ref) => {
|
|
7977
|
-
const reactId =
|
|
8084
|
+
const reactId = React25__namespace.useId();
|
|
7978
8085
|
const fieldId = props.id || reactId;
|
|
7979
|
-
const textareaRef =
|
|
7980
|
-
const [internalValue, setInternalValue] =
|
|
7981
|
-
|
|
7982
|
-
const adjustHeight =
|
|
8086
|
+
const textareaRef = React25__namespace.useRef(null);
|
|
8087
|
+
const [internalValue, setInternalValue] = React25__namespace.useState(value || defaultValue || "");
|
|
8088
|
+
React25__namespace.useImperativeHandle(ref, () => textareaRef.current);
|
|
8089
|
+
const adjustHeight = React25__namespace.useCallback(() => {
|
|
7983
8090
|
const textarea = textareaRef.current;
|
|
7984
|
-
if (!textarea || !autoResize)
|
|
8091
|
+
if (!textarea || !autoResize)
|
|
8092
|
+
return;
|
|
7985
8093
|
textarea.style.height = "auto";
|
|
7986
8094
|
const newHeight = textarea.scrollHeight;
|
|
7987
8095
|
if (maxHeight && newHeight > maxHeight) {
|
|
@@ -7992,10 +8100,10 @@ var Textarea = React24__namespace.forwardRef(
|
|
|
7992
8100
|
textarea.style.overflowY = "hidden";
|
|
7993
8101
|
}
|
|
7994
8102
|
}, [autoResize, maxHeight]);
|
|
7995
|
-
|
|
8103
|
+
React25__namespace.useEffect(() => {
|
|
7996
8104
|
adjustHeight();
|
|
7997
8105
|
}, [internalValue, adjustHeight]);
|
|
7998
|
-
|
|
8106
|
+
React25__namespace.useEffect(() => {
|
|
7999
8107
|
if (value !== void 0) {
|
|
8000
8108
|
setInternalValue(value);
|
|
8001
8109
|
}
|
|
@@ -8061,7 +8169,7 @@ var Textarea = React24__namespace.forwardRef(
|
|
|
8061
8169
|
);
|
|
8062
8170
|
Textarea.displayName = "Textarea";
|
|
8063
8171
|
var ToastProvider = ToastPrimitives__namespace.Provider;
|
|
8064
|
-
var ToastViewport =
|
|
8172
|
+
var ToastViewport = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8065
8173
|
ToastPrimitives__namespace.Viewport,
|
|
8066
8174
|
{
|
|
8067
8175
|
ref,
|
|
@@ -8090,7 +8198,7 @@ var toastVariants = classVarianceAuthority.cva(
|
|
|
8090
8198
|
}
|
|
8091
8199
|
}
|
|
8092
8200
|
);
|
|
8093
|
-
var Toast =
|
|
8201
|
+
var Toast = React25__namespace.forwardRef(({ className, variant, ...props }, ref) => {
|
|
8094
8202
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8095
8203
|
ToastPrimitives__namespace.Root,
|
|
8096
8204
|
{
|
|
@@ -8101,7 +8209,7 @@ var Toast = React24__namespace.forwardRef(({ className, variant, ...props }, ref
|
|
|
8101
8209
|
);
|
|
8102
8210
|
});
|
|
8103
8211
|
Toast.displayName = ToastPrimitives__namespace.Root.displayName;
|
|
8104
|
-
var ToastAction =
|
|
8212
|
+
var ToastAction = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8105
8213
|
ToastPrimitives__namespace.Action,
|
|
8106
8214
|
{
|
|
8107
8215
|
ref,
|
|
@@ -8113,7 +8221,7 @@ var ToastAction = React24__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
8113
8221
|
}
|
|
8114
8222
|
));
|
|
8115
8223
|
ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
|
|
8116
|
-
var ToastClose =
|
|
8224
|
+
var ToastClose = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8117
8225
|
ToastPrimitives__namespace.Close,
|
|
8118
8226
|
{
|
|
8119
8227
|
ref,
|
|
@@ -8130,7 +8238,7 @@ var ToastClose = React24__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
8130
8238
|
}
|
|
8131
8239
|
));
|
|
8132
8240
|
ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
|
|
8133
|
-
var ToastTitle =
|
|
8241
|
+
var ToastTitle = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8134
8242
|
ToastPrimitives__namespace.Title,
|
|
8135
8243
|
{
|
|
8136
8244
|
ref,
|
|
@@ -8139,7 +8247,7 @@ var ToastTitle = React24__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
8139
8247
|
}
|
|
8140
8248
|
));
|
|
8141
8249
|
ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
|
|
8142
|
-
var ToastDescription =
|
|
8250
|
+
var ToastDescription = React25__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8143
8251
|
ToastPrimitives__namespace.Description,
|
|
8144
8252
|
{
|
|
8145
8253
|
ref,
|
|
@@ -8235,7 +8343,8 @@ function toast({ ...props }) {
|
|
|
8235
8343
|
id,
|
|
8236
8344
|
open: true,
|
|
8237
8345
|
onOpenChange: (open) => {
|
|
8238
|
-
if (!open)
|
|
8346
|
+
if (!open)
|
|
8347
|
+
dismiss();
|
|
8239
8348
|
}
|
|
8240
8349
|
}
|
|
8241
8350
|
});
|
|
@@ -8246,8 +8355,8 @@ function toast({ ...props }) {
|
|
|
8246
8355
|
};
|
|
8247
8356
|
}
|
|
8248
8357
|
function useToast() {
|
|
8249
|
-
const [state, setState] =
|
|
8250
|
-
|
|
8358
|
+
const [state, setState] = React25__namespace.useState(memoryState);
|
|
8359
|
+
React25__namespace.useEffect(() => {
|
|
8251
8360
|
listeners.push(setState);
|
|
8252
8361
|
return () => {
|
|
8253
8362
|
const index = listeners.indexOf(setState);
|
|
@@ -8300,7 +8409,7 @@ var kbdVariants = classVarianceAuthority.cva(
|
|
|
8300
8409
|
}
|
|
8301
8410
|
}
|
|
8302
8411
|
);
|
|
8303
|
-
var Kbd =
|
|
8412
|
+
var Kbd = React25__namespace.forwardRef(
|
|
8304
8413
|
({ className, size, children, ...props }, ref) => {
|
|
8305
8414
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8306
8415
|
"kbd",
|
|
@@ -8337,7 +8446,7 @@ var iconSizeMap = {
|
|
|
8337
8446
|
md: "h-5 w-5",
|
|
8338
8447
|
lg: "h-6 w-6"
|
|
8339
8448
|
};
|
|
8340
|
-
var Rating =
|
|
8449
|
+
var Rating = React25__namespace.forwardRef(
|
|
8341
8450
|
({
|
|
8342
8451
|
className,
|
|
8343
8452
|
value,
|
|
@@ -8355,21 +8464,24 @@ var Rating = React24__namespace.forwardRef(
|
|
|
8355
8464
|
const iconSizeClass = iconSizeMap[resolvedSize];
|
|
8356
8465
|
const step = precision === "half" ? 0.5 : 1;
|
|
8357
8466
|
const isControlled = value !== void 0;
|
|
8358
|
-
const [internalValue, setInternalValue] =
|
|
8467
|
+
const [internalValue, setInternalValue] = React25__namespace.useState(defaultValue ?? 0);
|
|
8359
8468
|
const currentValue = isControlled ? value ?? 0 : internalValue;
|
|
8360
|
-
const [hoverValue, setHoverValue] =
|
|
8469
|
+
const [hoverValue, setHoverValue] = React25__namespace.useState(null);
|
|
8361
8470
|
const displayValue = hoverValue !== null ? hoverValue : currentValue;
|
|
8362
|
-
const commit =
|
|
8471
|
+
const commit = React25__namespace.useCallback(
|
|
8363
8472
|
(next) => {
|
|
8364
|
-
if (readOnly)
|
|
8365
|
-
|
|
8473
|
+
if (readOnly)
|
|
8474
|
+
return;
|
|
8475
|
+
if (!isControlled)
|
|
8476
|
+
setInternalValue(next);
|
|
8366
8477
|
onValueChange?.(next);
|
|
8367
8478
|
},
|
|
8368
8479
|
[readOnly, isControlled, onValueChange]
|
|
8369
8480
|
);
|
|
8370
|
-
const handleKeyDown =
|
|
8481
|
+
const handleKeyDown = React25__namespace.useCallback(
|
|
8371
8482
|
(event) => {
|
|
8372
|
-
if (readOnly)
|
|
8483
|
+
if (readOnly)
|
|
8484
|
+
return;
|
|
8373
8485
|
let next = null;
|
|
8374
8486
|
switch (event.key) {
|
|
8375
8487
|
case "ArrowRight":
|
|
@@ -8395,9 +8507,9 @@ var Rating = React24__namespace.forwardRef(
|
|
|
8395
8507
|
[readOnly, max, currentValue, step, commit]
|
|
8396
8508
|
);
|
|
8397
8509
|
const renderIcon = (filled) => {
|
|
8398
|
-
if (
|
|
8510
|
+
if (React25__namespace.isValidElement(icon)) {
|
|
8399
8511
|
const element = icon;
|
|
8400
|
-
return
|
|
8512
|
+
return React25__namespace.cloneElement(element, {
|
|
8401
8513
|
className: cn(
|
|
8402
8514
|
iconSizeClass,
|
|
8403
8515
|
"shrink-0",
|
|
@@ -8531,7 +8643,7 @@ var dotSizeMap = {
|
|
|
8531
8643
|
lg: "h-2 w-2",
|
|
8532
8644
|
xl: "h-2.5 w-2.5"
|
|
8533
8645
|
};
|
|
8534
|
-
var Spinner =
|
|
8646
|
+
var Spinner = React25__namespace.forwardRef(
|
|
8535
8647
|
({ className, size, variant = "default", label = "Loading", ...props }, ref) => {
|
|
8536
8648
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8537
8649
|
"div",
|
|
@@ -8610,15 +8722,15 @@ var buttonGroupVariants = classVarianceAuthority.cva(
|
|
|
8610
8722
|
}
|
|
8611
8723
|
}
|
|
8612
8724
|
);
|
|
8613
|
-
var ButtonGroup =
|
|
8725
|
+
var ButtonGroup = React25__namespace.forwardRef(
|
|
8614
8726
|
({ className, orientation, attached, size, variant, children, ...props }, ref) => {
|
|
8615
8727
|
const shouldPropagate = size !== void 0 || variant !== void 0;
|
|
8616
|
-
const enhancedChildren = shouldPropagate ?
|
|
8617
|
-
if (!
|
|
8728
|
+
const enhancedChildren = shouldPropagate ? React25__namespace.Children.map(children, (child) => {
|
|
8729
|
+
if (!React25__namespace.isValidElement(child) || child.type !== Button) {
|
|
8618
8730
|
return child;
|
|
8619
8731
|
}
|
|
8620
8732
|
const childProps = child.props;
|
|
8621
|
-
return
|
|
8733
|
+
return React25__namespace.cloneElement(child, {
|
|
8622
8734
|
size: childProps.size ?? size,
|
|
8623
8735
|
variant: childProps.variant ?? variant
|
|
8624
8736
|
});
|
|
@@ -8636,11 +8748,11 @@ var ButtonGroup = React24__namespace.forwardRef(
|
|
|
8636
8748
|
}
|
|
8637
8749
|
);
|
|
8638
8750
|
ButtonGroup.displayName = "ButtonGroup";
|
|
8639
|
-
var ToggleGroupContext =
|
|
8751
|
+
var ToggleGroupContext = React25__namespace.createContext({
|
|
8640
8752
|
size: "default",
|
|
8641
8753
|
variant: "default"
|
|
8642
8754
|
});
|
|
8643
|
-
var ToggleGroup =
|
|
8755
|
+
var ToggleGroup = React25__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8644
8756
|
ToggleGroupPrimitive__namespace.Root,
|
|
8645
8757
|
{
|
|
8646
8758
|
ref,
|
|
@@ -8657,8 +8769,8 @@ var ToggleGroup = React24__namespace.forwardRef(({ className, variant, size, chi
|
|
|
8657
8769
|
}
|
|
8658
8770
|
));
|
|
8659
8771
|
ToggleGroup.displayName = "ToggleGroup";
|
|
8660
|
-
var ToggleGroupItem =
|
|
8661
|
-
const context =
|
|
8772
|
+
var ToggleGroupItem = React25__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
8773
|
+
const context = React25__namespace.useContext(ToggleGroupContext);
|
|
8662
8774
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8663
8775
|
ToggleGroupPrimitive__namespace.Item,
|
|
8664
8776
|
{
|
|
@@ -8677,27 +8789,27 @@ var ToggleGroupItem = React24__namespace.forwardRef(({ className, children, vari
|
|
|
8677
8789
|
});
|
|
8678
8790
|
ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
8679
8791
|
|
|
8680
|
-
Object.defineProperty(exports,
|
|
8792
|
+
Object.defineProperty(exports, 'Palette', {
|
|
8681
8793
|
enumerable: true,
|
|
8682
8794
|
get: function () { return lucideReact.Palette; }
|
|
8683
8795
|
});
|
|
8684
|
-
Object.defineProperty(exports,
|
|
8796
|
+
Object.defineProperty(exports, 'Pipette', {
|
|
8685
8797
|
enumerable: true,
|
|
8686
8798
|
get: function () { return lucideReact.Pipette; }
|
|
8687
8799
|
});
|
|
8688
|
-
Object.defineProperty(exports,
|
|
8800
|
+
Object.defineProperty(exports, 'format', {
|
|
8689
8801
|
enumerable: true,
|
|
8690
8802
|
get: function () { return dateFns.format; }
|
|
8691
8803
|
});
|
|
8692
|
-
Object.defineProperty(exports,
|
|
8804
|
+
Object.defineProperty(exports, 'REGEXP_ONLY_CHARS', {
|
|
8693
8805
|
enumerable: true,
|
|
8694
8806
|
get: function () { return inputOtp.REGEXP_ONLY_CHARS; }
|
|
8695
8807
|
});
|
|
8696
|
-
Object.defineProperty(exports,
|
|
8808
|
+
Object.defineProperty(exports, 'REGEXP_ONLY_DIGITS', {
|
|
8697
8809
|
enumerable: true,
|
|
8698
8810
|
get: function () { return inputOtp.REGEXP_ONLY_DIGITS; }
|
|
8699
8811
|
});
|
|
8700
|
-
Object.defineProperty(exports,
|
|
8812
|
+
Object.defineProperty(exports, 'REGEXP_ONLY_DIGITS_AND_CHARS', {
|
|
8701
8813
|
enumerable: true,
|
|
8702
8814
|
get: function () { return inputOtp.REGEXP_ONLY_DIGITS_AND_CHARS; }
|
|
8703
8815
|
});
|
|
@@ -9091,5 +9203,5 @@ exports.toggleVariants = toggleVariants;
|
|
|
9091
9203
|
exports.tooltipVariants = tooltipVariants;
|
|
9092
9204
|
exports.useCarousel = useCarousel;
|
|
9093
9205
|
exports.useToast = useToast;
|
|
9094
|
-
//# sourceMappingURL=
|
|
9206
|
+
//# sourceMappingURL=out.js.map
|
|
9095
9207
|
//# sourceMappingURL=index.js.map
|