@moontra/moonui 6.3.0 → 6.5.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/hooks/index.global.js +29 -0
- package/dist/hooks/index.global.js.map +1 -1
- package/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.global.js +345 -10
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +344 -288
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +299 -253
- package/dist/index.mjs.map +1 -1
- package/dist/lib/theme.global.js +37 -0
- package/dist/lib/theme.global.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/__tests__/table-sortable.test.tsx +159 -0
- package/src/components/ui/index.ts +15 -0
- package/src/components/ui/table.tsx +125 -23
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var React23 = 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 React23__namespace = /*#__PURE__*/_interopNamespace(React23);
|
|
56
56
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
57
57
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
58
58
|
var useEmblaCarousel__default = /*#__PURE__*/_interopDefault(useEmblaCarousel);
|
|
@@ -83,14 +83,14 @@ function readableText(node) {
|
|
|
83
83
|
if (Array.isArray(node)) {
|
|
84
84
|
return node.map(readableText).filter(Boolean).join(" ").trim();
|
|
85
85
|
}
|
|
86
|
-
if (
|
|
86
|
+
if (React23__namespace.isValidElement(node)) {
|
|
87
87
|
const props = node.props;
|
|
88
88
|
return readableText(props.children);
|
|
89
89
|
}
|
|
90
90
|
return "";
|
|
91
91
|
}
|
|
92
92
|
var Accordion = AccordionPrimitive__namespace.Root;
|
|
93
|
-
var AccordionItem =
|
|
93
|
+
var AccordionItem = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
94
94
|
AccordionPrimitive__namespace.Item,
|
|
95
95
|
{
|
|
96
96
|
ref,
|
|
@@ -99,7 +99,7 @@ var AccordionItem = React25__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
99
99
|
}
|
|
100
100
|
));
|
|
101
101
|
AccordionItem.displayName = "AccordionItem";
|
|
102
|
-
var AccordionTrigger =
|
|
102
|
+
var AccordionTrigger = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
103
103
|
AccordionPrimitive__namespace.Trigger,
|
|
104
104
|
{
|
|
105
105
|
ref,
|
|
@@ -117,7 +117,7 @@ var AccordionTrigger = React25__namespace.forwardRef(({ className, children, ...
|
|
|
117
117
|
}
|
|
118
118
|
) }));
|
|
119
119
|
AccordionTrigger.displayName = AccordionPrimitive__namespace.Trigger.displayName;
|
|
120
|
-
var AccordionContent =
|
|
120
|
+
var AccordionContent = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
121
121
|
AccordionPrimitive__namespace.Content,
|
|
122
122
|
{
|
|
123
123
|
ref,
|
|
@@ -170,7 +170,7 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
|
-
var Alert =
|
|
173
|
+
var Alert = React23__namespace.forwardRef(
|
|
174
174
|
({
|
|
175
175
|
className,
|
|
176
176
|
variant = "default",
|
|
@@ -182,7 +182,7 @@ var Alert = React25__namespace.forwardRef(
|
|
|
182
182
|
children,
|
|
183
183
|
...props
|
|
184
184
|
}, ref) => {
|
|
185
|
-
const Icon2 =
|
|
185
|
+
const Icon2 = React23__namespace.useMemo(() => {
|
|
186
186
|
switch (variant) {
|
|
187
187
|
case "success":
|
|
188
188
|
return lucideReact.Check;
|
|
@@ -230,7 +230,7 @@ var Alert = React25__namespace.forwardRef(
|
|
|
230
230
|
}
|
|
231
231
|
);
|
|
232
232
|
Alert.displayName = "Alert";
|
|
233
|
-
var AlertTitle =
|
|
233
|
+
var AlertTitle = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
234
234
|
"h5",
|
|
235
235
|
{
|
|
236
236
|
ref,
|
|
@@ -243,7 +243,7 @@ var AlertTitle = React25__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
243
243
|
}
|
|
244
244
|
));
|
|
245
245
|
AlertTitle.displayName = "AlertTitle";
|
|
246
|
-
var AlertDescription =
|
|
246
|
+
var AlertDescription = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
247
247
|
"div",
|
|
248
248
|
{
|
|
249
249
|
ref,
|
|
@@ -285,7 +285,7 @@ var aspectRatioVariants = classVarianceAuthority.cva(
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
);
|
|
288
|
-
var AspectRatio =
|
|
288
|
+
var AspectRatio = React23__namespace.forwardRef(({ className, variant, radius, ratio = 16 / 9, style, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
289
289
|
"div",
|
|
290
290
|
{
|
|
291
291
|
ref,
|
|
@@ -334,7 +334,7 @@ var avatarVariants = classVarianceAuthority.cva(
|
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
);
|
|
337
|
-
var Avatar =
|
|
337
|
+
var Avatar = React23__namespace.forwardRef(({ className, size, radius, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
338
338
|
AvatarPrimitive__namespace.Root,
|
|
339
339
|
{
|
|
340
340
|
ref,
|
|
@@ -343,7 +343,7 @@ var Avatar = React25__namespace.forwardRef(({ className, size, radius, variant,
|
|
|
343
343
|
}
|
|
344
344
|
));
|
|
345
345
|
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
346
|
-
var AvatarImage =
|
|
346
|
+
var AvatarImage = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
347
347
|
AvatarPrimitive__namespace.Image,
|
|
348
348
|
{
|
|
349
349
|
ref,
|
|
@@ -352,7 +352,7 @@ var AvatarImage = React25__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
352
352
|
}
|
|
353
353
|
));
|
|
354
354
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
355
|
-
var AvatarFallback =
|
|
355
|
+
var AvatarFallback = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
356
356
|
AvatarPrimitive__namespace.Fallback,
|
|
357
357
|
{
|
|
358
358
|
ref,
|
|
@@ -364,9 +364,9 @@ var AvatarFallback = React25__namespace.forwardRef(({ className, ...props }, ref
|
|
|
364
364
|
}
|
|
365
365
|
));
|
|
366
366
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
367
|
-
var AvatarGroup =
|
|
367
|
+
var AvatarGroup = React23__namespace.forwardRef(
|
|
368
368
|
({ className, max, children, overlapOffset = -8, ...props }, ref) => {
|
|
369
|
-
const childrenArray =
|
|
369
|
+
const childrenArray = React23__namespace.Children.toArray(children);
|
|
370
370
|
const visibleAvatars = max ? childrenArray.slice(0, max) : childrenArray;
|
|
371
371
|
const remainingCount = max ? Math.max(0, childrenArray.length - max) : 0;
|
|
372
372
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -497,7 +497,7 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
);
|
|
500
|
-
var Badge =
|
|
500
|
+
var Badge = React23__namespace.forwardRef(({
|
|
501
501
|
className,
|
|
502
502
|
variant,
|
|
503
503
|
size,
|
|
@@ -605,7 +605,7 @@ var breadcrumbVariants = classVarianceAuthority.cva(
|
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
);
|
|
608
|
-
var Breadcrumb =
|
|
608
|
+
var Breadcrumb = React23__namespace.forwardRef(
|
|
609
609
|
({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
610
610
|
"nav",
|
|
611
611
|
{
|
|
@@ -617,9 +617,9 @@ var Breadcrumb = React25__namespace.forwardRef(
|
|
|
617
617
|
)
|
|
618
618
|
);
|
|
619
619
|
Breadcrumb.displayName = "Breadcrumb";
|
|
620
|
-
var BreadcrumbList =
|
|
620
|
+
var BreadcrumbList = React23__namespace.forwardRef(
|
|
621
621
|
({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
|
|
622
|
-
const childrenArray =
|
|
622
|
+
const childrenArray = React23__namespace.Children.toArray(props.children).filter(Boolean);
|
|
623
623
|
const childCount = childrenArray.length;
|
|
624
624
|
if (collapsed && childCount > collapsedWidth) {
|
|
625
625
|
const firstItem = childrenArray[0];
|
|
@@ -655,9 +655,9 @@ var BreadcrumbList = React25__namespace.forwardRef(
|
|
|
655
655
|
}
|
|
656
656
|
);
|
|
657
657
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
658
|
-
var BreadcrumbItem =
|
|
658
|
+
var BreadcrumbItem = React23__namespace.forwardRef(
|
|
659
659
|
({ className, isCurrent, href, asChild = false, ...props }, ref) => {
|
|
660
|
-
const Comp = asChild ?
|
|
660
|
+
const Comp = asChild ? React23__namespace.Fragment : href ? "a" : "span";
|
|
661
661
|
const itemProps = asChild ? {} : href ? { href } : {};
|
|
662
662
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
663
663
|
"li",
|
|
@@ -714,7 +714,7 @@ var BreadcrumbEllipsis = ({
|
|
|
714
714
|
}
|
|
715
715
|
);
|
|
716
716
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
717
|
-
var BreadcrumbLink =
|
|
717
|
+
var BreadcrumbLink = React23__namespace.forwardRef(
|
|
718
718
|
({ className, href, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
719
719
|
"a",
|
|
720
720
|
{
|
|
@@ -729,7 +729,7 @@ var BreadcrumbLink = React25__namespace.forwardRef(
|
|
|
729
729
|
)
|
|
730
730
|
);
|
|
731
731
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
732
|
-
var BreadcrumbPage =
|
|
732
|
+
var BreadcrumbPage = React23__namespace.forwardRef(
|
|
733
733
|
({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
734
734
|
"span",
|
|
735
735
|
{
|
|
@@ -892,7 +892,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
894
|
);
|
|
895
|
-
var Button =
|
|
895
|
+
var Button = React23__namespace.forwardRef(
|
|
896
896
|
({
|
|
897
897
|
className,
|
|
898
898
|
variant,
|
|
@@ -1107,7 +1107,7 @@ var cardVariants = classVarianceAuthority.cva(
|
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
);
|
|
1110
|
-
var Card =
|
|
1110
|
+
var Card = React23__namespace.forwardRef(
|
|
1111
1111
|
({ className, variant, size, radius, interactive, microInteraction = "lift", ...props }, ref) => {
|
|
1112
1112
|
if (interactive && microInteraction !== "none") {
|
|
1113
1113
|
const interactionProps = {
|
|
@@ -1135,7 +1135,7 @@ var Card = React25__namespace.forwardRef(
|
|
|
1135
1135
|
}
|
|
1136
1136
|
);
|
|
1137
1137
|
Card.displayName = "Card";
|
|
1138
|
-
var CardHeader =
|
|
1138
|
+
var CardHeader = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1139
1139
|
"div",
|
|
1140
1140
|
{
|
|
1141
1141
|
ref,
|
|
@@ -1144,7 +1144,7 @@ var CardHeader = React25__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1144
1144
|
}
|
|
1145
1145
|
));
|
|
1146
1146
|
CardHeader.displayName = "CardHeader";
|
|
1147
|
-
var CardTitle =
|
|
1147
|
+
var CardTitle = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1148
1148
|
"h3",
|
|
1149
1149
|
{
|
|
1150
1150
|
ref,
|
|
@@ -1153,7 +1153,7 @@ var CardTitle = React25__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1153
1153
|
}
|
|
1154
1154
|
));
|
|
1155
1155
|
CardTitle.displayName = "CardTitle";
|
|
1156
|
-
var CardDescription =
|
|
1156
|
+
var CardDescription = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1157
1157
|
"p",
|
|
1158
1158
|
{
|
|
1159
1159
|
ref,
|
|
@@ -1162,9 +1162,9 @@ var CardDescription = React25__namespace.forwardRef(({ className, ...props }, re
|
|
|
1162
1162
|
}
|
|
1163
1163
|
));
|
|
1164
1164
|
CardDescription.displayName = "CardDescription";
|
|
1165
|
-
var CardContent =
|
|
1165
|
+
var CardContent = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("moonui-theme", "p-6 pt-0", className), ...props }));
|
|
1166
1166
|
CardContent.displayName = "CardContent";
|
|
1167
|
-
var CardFooter =
|
|
1167
|
+
var CardFooter = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1168
1168
|
"div",
|
|
1169
1169
|
{
|
|
1170
1170
|
ref,
|
|
@@ -1185,7 +1185,7 @@ function Calendar({
|
|
|
1185
1185
|
defaultMonth,
|
|
1186
1186
|
...props
|
|
1187
1187
|
}) {
|
|
1188
|
-
const [currentMonth, setCurrentMonth] =
|
|
1188
|
+
const [currentMonth, setCurrentMonth] = React23__namespace.useState(
|
|
1189
1189
|
defaultMonth || selected && selected || /* @__PURE__ */ new Date()
|
|
1190
1190
|
);
|
|
1191
1191
|
const weekDays = [
|
|
@@ -1399,9 +1399,9 @@ var formatCardNumber = (value, cardType) => {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
return formatted;
|
|
1401
1401
|
};
|
|
1402
|
-
var CardNumberInput =
|
|
1402
|
+
var CardNumberInput = React23__namespace.forwardRef(
|
|
1403
1403
|
({ className, value = "", onChange, showIcon = true, size, ...props }, ref) => {
|
|
1404
|
-
const [cardType, setCardType] =
|
|
1404
|
+
const [cardType, setCardType] = React23__namespace.useState("unknown");
|
|
1405
1405
|
const handleChange = (e) => {
|
|
1406
1406
|
const rawValue = e.target.value.replace(/\D/g, "");
|
|
1407
1407
|
const detectedType = getCardType(rawValue);
|
|
@@ -1432,7 +1432,7 @@ var CardNumberInput = React25__namespace.forwardRef(
|
|
|
1432
1432
|
}
|
|
1433
1433
|
);
|
|
1434
1434
|
CardNumberInput.displayName = "CardNumberInput";
|
|
1435
|
-
var CardExpiryInput =
|
|
1435
|
+
var CardExpiryInput = React23__namespace.forwardRef(
|
|
1436
1436
|
({ className, value = "", onChange, size, ...props }, ref) => {
|
|
1437
1437
|
const handleChange = (e) => {
|
|
1438
1438
|
let rawValue = e.target.value.replace(/\D/g, "");
|
|
@@ -1470,7 +1470,7 @@ var CardExpiryInput = React25__namespace.forwardRef(
|
|
|
1470
1470
|
}
|
|
1471
1471
|
);
|
|
1472
1472
|
CardExpiryInput.displayName = "CardExpiryInput";
|
|
1473
|
-
var CardCVCInput =
|
|
1473
|
+
var CardCVCInput = React23__namespace.forwardRef(
|
|
1474
1474
|
({ className, value = "", onChange, cardType = "unknown", size, ...props }, ref) => {
|
|
1475
1475
|
const maxLength = cardType === "amex" ? 4 : 3;
|
|
1476
1476
|
const handleChange = (e) => {
|
|
@@ -1495,7 +1495,7 @@ var CardCVCInput = React25__namespace.forwardRef(
|
|
|
1495
1495
|
}
|
|
1496
1496
|
);
|
|
1497
1497
|
CardCVCInput.displayName = "CardCVCInput";
|
|
1498
|
-
var CardZipInput =
|
|
1498
|
+
var CardZipInput = React23__namespace.forwardRef(
|
|
1499
1499
|
({ className, value = "", onChange, format: format4 = "US", size, ...props }, ref) => {
|
|
1500
1500
|
const handleChange = (e) => {
|
|
1501
1501
|
let rawValue = e.target.value;
|
|
@@ -1546,15 +1546,15 @@ var CardZipInput = React25__namespace.forwardRef(
|
|
|
1546
1546
|
}
|
|
1547
1547
|
);
|
|
1548
1548
|
CardZipInput.displayName = "CardZipInput";
|
|
1549
|
-
var CarouselContext =
|
|
1549
|
+
var CarouselContext = React23__namespace.createContext(null);
|
|
1550
1550
|
function useCarousel() {
|
|
1551
|
-
const context =
|
|
1551
|
+
const context = React23__namespace.useContext(CarouselContext);
|
|
1552
1552
|
if (!context) {
|
|
1553
1553
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1554
1554
|
}
|
|
1555
1555
|
return context;
|
|
1556
1556
|
}
|
|
1557
|
-
var Carousel =
|
|
1557
|
+
var Carousel = React23__namespace.forwardRef(
|
|
1558
1558
|
({
|
|
1559
1559
|
orientation = "horizontal",
|
|
1560
1560
|
opts,
|
|
@@ -1572,21 +1572,21 @@ var Carousel = React25__namespace.forwardRef(
|
|
|
1572
1572
|
},
|
|
1573
1573
|
plugins
|
|
1574
1574
|
);
|
|
1575
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1576
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1577
|
-
const onSelect =
|
|
1575
|
+
const [canScrollPrev, setCanScrollPrev] = React23__namespace.useState(false);
|
|
1576
|
+
const [canScrollNext, setCanScrollNext] = React23__namespace.useState(false);
|
|
1577
|
+
const onSelect = React23__namespace.useCallback((emblaApi) => {
|
|
1578
1578
|
if (!emblaApi)
|
|
1579
1579
|
return;
|
|
1580
1580
|
setCanScrollPrev(emblaApi.canScrollPrev());
|
|
1581
1581
|
setCanScrollNext(emblaApi.canScrollNext());
|
|
1582
1582
|
}, []);
|
|
1583
|
-
const scrollPrev =
|
|
1583
|
+
const scrollPrev = React23__namespace.useCallback(() => {
|
|
1584
1584
|
api?.scrollPrev();
|
|
1585
1585
|
}, [api]);
|
|
1586
|
-
const scrollNext =
|
|
1586
|
+
const scrollNext = React23__namespace.useCallback(() => {
|
|
1587
1587
|
api?.scrollNext();
|
|
1588
1588
|
}, [api]);
|
|
1589
|
-
const handleKeyDown =
|
|
1589
|
+
const handleKeyDown = React23__namespace.useCallback(
|
|
1590
1590
|
(event) => {
|
|
1591
1591
|
const prevKey = resolvedOrientation === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
1592
1592
|
const nextKey = resolvedOrientation === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
@@ -1600,12 +1600,12 @@ var Carousel = React25__namespace.forwardRef(
|
|
|
1600
1600
|
},
|
|
1601
1601
|
[resolvedOrientation, scrollPrev, scrollNext]
|
|
1602
1602
|
);
|
|
1603
|
-
|
|
1603
|
+
React23__namespace.useEffect(() => {
|
|
1604
1604
|
if (!api || !setApi)
|
|
1605
1605
|
return;
|
|
1606
1606
|
setApi(api);
|
|
1607
1607
|
}, [api, setApi]);
|
|
1608
|
-
|
|
1608
|
+
React23__namespace.useEffect(() => {
|
|
1609
1609
|
if (!api)
|
|
1610
1610
|
return;
|
|
1611
1611
|
onSelect(api);
|
|
@@ -1657,7 +1657,7 @@ var carouselContentVariants = classVarianceAuthority.cva("flex", {
|
|
|
1657
1657
|
orientation: "horizontal"
|
|
1658
1658
|
}
|
|
1659
1659
|
});
|
|
1660
|
-
var CarouselContent =
|
|
1660
|
+
var CarouselContent = React23__namespace.forwardRef(
|
|
1661
1661
|
({ className, ...props }, ref) => {
|
|
1662
1662
|
const { carouselRef, orientation } = useCarousel();
|
|
1663
1663
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1682,7 +1682,7 @@ var carouselItemVariants = classVarianceAuthority.cva("min-w-0 shrink-0 grow-0 b
|
|
|
1682
1682
|
orientation: "horizontal"
|
|
1683
1683
|
}
|
|
1684
1684
|
});
|
|
1685
|
-
var CarouselItem =
|
|
1685
|
+
var CarouselItem = React23__namespace.forwardRef(
|
|
1686
1686
|
({ className, ...props }, ref) => {
|
|
1687
1687
|
const { orientation } = useCarousel();
|
|
1688
1688
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1698,7 +1698,7 @@ var CarouselItem = React25__namespace.forwardRef(
|
|
|
1698
1698
|
}
|
|
1699
1699
|
);
|
|
1700
1700
|
CarouselItem.displayName = "CarouselItem";
|
|
1701
|
-
var CarouselPrevious =
|
|
1701
|
+
var CarouselPrevious = React23__namespace.forwardRef(({ className, variant = "outline", size = "icon-sm", ...props }, ref) => {
|
|
1702
1702
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1703
1703
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1704
1704
|
Button,
|
|
@@ -1723,7 +1723,7 @@ var CarouselPrevious = React25__namespace.forwardRef(({ className, variant = "ou
|
|
|
1723
1723
|
);
|
|
1724
1724
|
});
|
|
1725
1725
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1726
|
-
var CarouselNext =
|
|
1726
|
+
var CarouselNext = React23__namespace.forwardRef(({ className, variant = "outline", size = "icon-sm", ...props }, ref) => {
|
|
1727
1727
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1728
1728
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1729
1729
|
Button,
|
|
@@ -1786,7 +1786,7 @@ var checkboxVariants = classVarianceAuthority.cva(
|
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
1788
1788
|
);
|
|
1789
|
-
var Checkbox =
|
|
1789
|
+
var Checkbox = React23__namespace.forwardRef(({
|
|
1790
1790
|
className,
|
|
1791
1791
|
variant,
|
|
1792
1792
|
size,
|
|
@@ -1819,7 +1819,7 @@ var Checkbox = React25__namespace.forwardRef(({
|
|
|
1819
1819
|
);
|
|
1820
1820
|
});
|
|
1821
1821
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
1822
|
-
var CheckboxGroup =
|
|
1822
|
+
var CheckboxGroup = React23__namespace.forwardRef(
|
|
1823
1823
|
({ className, orientation = "vertical", spacing = "1rem", children, ...props }, ref) => {
|
|
1824
1824
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1825
1825
|
"div",
|
|
@@ -1839,7 +1839,7 @@ var CheckboxGroup = React25__namespace.forwardRef(
|
|
|
1839
1839
|
}
|
|
1840
1840
|
);
|
|
1841
1841
|
CheckboxGroup.displayName = "CheckboxGroup";
|
|
1842
|
-
var CheckboxLabel =
|
|
1842
|
+
var CheckboxLabel = React23__namespace.forwardRef(
|
|
1843
1843
|
({ className, htmlFor, children, position = "end", disabled = false, ...props }, ref) => {
|
|
1844
1844
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1845
1845
|
"label",
|
|
@@ -1859,14 +1859,14 @@ var CheckboxLabel = React25__namespace.forwardRef(
|
|
|
1859
1859
|
}
|
|
1860
1860
|
);
|
|
1861
1861
|
CheckboxLabel.displayName = "CheckboxLabel";
|
|
1862
|
-
var CheckboxWithLabel =
|
|
1862
|
+
var CheckboxWithLabel = React23__namespace.forwardRef(({
|
|
1863
1863
|
id,
|
|
1864
1864
|
label,
|
|
1865
1865
|
labelPosition = "end",
|
|
1866
1866
|
labelClassName,
|
|
1867
1867
|
...checkboxProps
|
|
1868
1868
|
}, ref) => {
|
|
1869
|
-
const generatedId =
|
|
1869
|
+
const generatedId = React23__namespace.useId();
|
|
1870
1870
|
const checkboxId = id || generatedId;
|
|
1871
1871
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
1872
1872
|
labelPosition === "start" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1916,7 +1916,7 @@ var collapsibleTriggerVariants = classVarianceAuthority.cva(
|
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
1918
|
);
|
|
1919
|
-
var CollapsibleTrigger =
|
|
1919
|
+
var CollapsibleTrigger = React23__namespace.forwardRef(({ className, children, variant, size, asChild, ...props }, ref) => {
|
|
1920
1920
|
if (asChild) {
|
|
1921
1921
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1922
1922
|
CollapsiblePrimitive__namespace.Trigger,
|
|
@@ -1965,7 +1965,7 @@ var collapsibleContentVariants = classVarianceAuthority.cva(
|
|
|
1965
1965
|
}
|
|
1966
1966
|
}
|
|
1967
1967
|
);
|
|
1968
|
-
var CollapsibleContent =
|
|
1968
|
+
var CollapsibleContent = React23__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1969
1969
|
CollapsiblePrimitive__namespace.Content,
|
|
1970
1970
|
{
|
|
1971
1971
|
ref,
|
|
@@ -2048,7 +2048,7 @@ var inputVariants = classVarianceAuthority.cva(
|
|
|
2048
2048
|
}
|
|
2049
2049
|
}
|
|
2050
2050
|
);
|
|
2051
|
-
var Input =
|
|
2051
|
+
var Input = React23__namespace.forwardRef(
|
|
2052
2052
|
({
|
|
2053
2053
|
className,
|
|
2054
2054
|
wrapperClassName,
|
|
@@ -2075,10 +2075,10 @@ var Input = React25__namespace.forwardRef(
|
|
|
2075
2075
|
placeholder,
|
|
2076
2076
|
...props
|
|
2077
2077
|
}, ref) => {
|
|
2078
|
-
const reactId =
|
|
2078
|
+
const reactId = React23__namespace.useId();
|
|
2079
2079
|
const fieldId = props.id || reactId;
|
|
2080
|
-
const [isFocused, setIsFocused] =
|
|
2081
|
-
const [internalValue, setInternalValue] =
|
|
2080
|
+
const [isFocused, setIsFocused] = React23__namespace.useState(false);
|
|
2081
|
+
const [internalValue, setInternalValue] = React23__namespace.useState(value || defaultValue || "");
|
|
2082
2082
|
const hasValue = internalValue !== "" && internalValue !== null && internalValue !== void 0;
|
|
2083
2083
|
const isLabelActive = isFocused || hasValue;
|
|
2084
2084
|
const handleFocus = (e) => {
|
|
@@ -2093,7 +2093,7 @@ var Input = React25__namespace.forwardRef(
|
|
|
2093
2093
|
setInternalValue(e.target.value);
|
|
2094
2094
|
onChange?.(e);
|
|
2095
2095
|
};
|
|
2096
|
-
|
|
2096
|
+
React23__namespace.useEffect(() => {
|
|
2097
2097
|
if (value !== void 0) {
|
|
2098
2098
|
setInternalValue(value);
|
|
2099
2099
|
}
|
|
@@ -2177,7 +2177,7 @@ Input.displayName = "Input";
|
|
|
2177
2177
|
var labelVariants = classVarianceAuthority.cva(
|
|
2178
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"
|
|
2179
2179
|
);
|
|
2180
|
-
var Label =
|
|
2180
|
+
var Label = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2181
2181
|
LabelPrimitive__namespace.Root,
|
|
2182
2182
|
{
|
|
2183
2183
|
ref,
|
|
@@ -2238,7 +2238,7 @@ var popoverContentVariants = classVarianceAuthority.cva(
|
|
|
2238
2238
|
var Popover = PopoverPrimitive__namespace.Root;
|
|
2239
2239
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
2240
2240
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
2241
|
-
var PopoverContent =
|
|
2241
|
+
var PopoverContent = React23__namespace.forwardRef(({
|
|
2242
2242
|
className,
|
|
2243
2243
|
variant,
|
|
2244
2244
|
size,
|
|
@@ -2306,7 +2306,7 @@ var PopoverFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
2306
2306
|
}
|
|
2307
2307
|
);
|
|
2308
2308
|
PopoverFooter.displayName = "PopoverFooter";
|
|
2309
|
-
var Tabs =
|
|
2309
|
+
var Tabs = React23__namespace.forwardRef(({ vertical = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2310
2310
|
TabsPrimitive__namespace.Root,
|
|
2311
2311
|
{
|
|
2312
2312
|
ref,
|
|
@@ -2347,7 +2347,7 @@ var tabsListVariants = classVarianceAuthority.cva(
|
|
|
2347
2347
|
}
|
|
2348
2348
|
}
|
|
2349
2349
|
);
|
|
2350
|
-
var TabsList =
|
|
2350
|
+
var TabsList = React23__namespace.forwardRef(({ className, variant, orientation, fullWidth, scrollable, ...props }, ref) => {
|
|
2351
2351
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2352
2352
|
TabsPrimitive__namespace.List,
|
|
2353
2353
|
{
|
|
@@ -2390,7 +2390,7 @@ var tabsTriggerVariants = classVarianceAuthority.cva(
|
|
|
2390
2390
|
}
|
|
2391
2391
|
}
|
|
2392
2392
|
);
|
|
2393
|
-
var TabsTrigger =
|
|
2393
|
+
var TabsTrigger = React23__namespace.forwardRef(({
|
|
2394
2394
|
className,
|
|
2395
2395
|
variant,
|
|
2396
2396
|
size,
|
|
@@ -2422,7 +2422,7 @@ var TabsTrigger = React25__namespace.forwardRef(({
|
|
|
2422
2422
|
}
|
|
2423
2423
|
));
|
|
2424
2424
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
2425
|
-
var TabsContent =
|
|
2425
|
+
var TabsContent = React23__namespace.forwardRef(({ className, animated = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2426
2426
|
TabsPrimitive__namespace.Content,
|
|
2427
2427
|
{
|
|
2428
2428
|
ref,
|
|
@@ -2516,7 +2516,7 @@ var sliderThumbVariants = classVarianceAuthority.cva(
|
|
|
2516
2516
|
}
|
|
2517
2517
|
}
|
|
2518
2518
|
);
|
|
2519
|
-
var Slider =
|
|
2519
|
+
var Slider = React23__namespace.forwardRef(({
|
|
2520
2520
|
className,
|
|
2521
2521
|
size,
|
|
2522
2522
|
trackVariant,
|
|
@@ -2532,10 +2532,10 @@ var Slider = React25__namespace.forwardRef(({
|
|
|
2532
2532
|
disabled,
|
|
2533
2533
|
...props
|
|
2534
2534
|
}, ref) => {
|
|
2535
|
-
const [sliderValue, setSliderValue] =
|
|
2535
|
+
const [sliderValue, setSliderValue] = React23__namespace.useState(
|
|
2536
2536
|
value || defaultValue || [0]
|
|
2537
2537
|
);
|
|
2538
|
-
|
|
2538
|
+
React23__namespace.useEffect(() => {
|
|
2539
2539
|
if (value !== void 0) {
|
|
2540
2540
|
setSliderValue(value);
|
|
2541
2541
|
}
|
|
@@ -2550,7 +2550,7 @@ var Slider = React25__namespace.forwardRef(({
|
|
|
2550
2550
|
const calculateThumbPercent = (value2, min2, max2) => {
|
|
2551
2551
|
return (value2 - min2) / (max2 - min2) * 100;
|
|
2552
2552
|
};
|
|
2553
|
-
const trackRef =
|
|
2553
|
+
const trackRef = React23__namespace.useRef(null);
|
|
2554
2554
|
const min = props.min || 0;
|
|
2555
2555
|
const max = props.max || 100;
|
|
2556
2556
|
const step = props.step || 1;
|
|
@@ -2862,14 +2862,14 @@ function ColorPicker({
|
|
|
2862
2862
|
disabled,
|
|
2863
2863
|
...props
|
|
2864
2864
|
}) {
|
|
2865
|
-
const [open, setOpen] =
|
|
2866
|
-
const [color, setColor] =
|
|
2867
|
-
const [opacity, setOpacity] =
|
|
2868
|
-
const [copied, setCopied] =
|
|
2869
|
-
const [inputValue, setInputValue] =
|
|
2870
|
-
const hsl =
|
|
2871
|
-
const rgb =
|
|
2872
|
-
|
|
2865
|
+
const [open, setOpen] = React23__namespace.useState(false);
|
|
2866
|
+
const [color, setColor] = React23__namespace.useState(value);
|
|
2867
|
+
const [opacity, setOpacity] = React23__namespace.useState(100);
|
|
2868
|
+
const [copied, setCopied] = React23__namespace.useState(false);
|
|
2869
|
+
const [inputValue, setInputValue] = React23__namespace.useState(value);
|
|
2870
|
+
const hsl = React23__namespace.useMemo(() => hexToHsl(color) || { h: 0, s: 0, l: 0 }, [color]);
|
|
2871
|
+
const rgb = React23__namespace.useMemo(() => hexToRgb(color) || { r: 0, g: 0, b: 0 }, [color]);
|
|
2872
|
+
React23__namespace.useEffect(() => {
|
|
2873
2873
|
setColor(value);
|
|
2874
2874
|
setInputValue(value);
|
|
2875
2875
|
}, [value]);
|
|
@@ -3264,7 +3264,7 @@ function GradientPicker({
|
|
|
3264
3264
|
onChange,
|
|
3265
3265
|
className
|
|
3266
3266
|
}) {
|
|
3267
|
-
const [gradient, setGradient] =
|
|
3267
|
+
const [gradient, setGradient] = React23__namespace.useState(value);
|
|
3268
3268
|
const handleChange = (field, newValue) => {
|
|
3269
3269
|
const newGradient = { ...gradient, [field]: newValue };
|
|
3270
3270
|
setGradient(newGradient);
|
|
@@ -3350,7 +3350,7 @@ var overlayVariants = classVarianceAuthority.cva(
|
|
|
3350
3350
|
}
|
|
3351
3351
|
}
|
|
3352
3352
|
);
|
|
3353
|
-
var DialogOverlay =
|
|
3353
|
+
var DialogOverlay = React23__namespace.forwardRef(({ className, variant, animation, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3354
3354
|
DialogPrimitive__namespace.Overlay,
|
|
3355
3355
|
{
|
|
3356
3356
|
ref,
|
|
@@ -3409,7 +3409,7 @@ var dialogContentVariants = classVarianceAuthority.cva(
|
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
3411
|
);
|
|
3412
|
-
var DialogContent =
|
|
3412
|
+
var DialogContent = React23__namespace.forwardRef(
|
|
3413
3413
|
({
|
|
3414
3414
|
className,
|
|
3415
3415
|
children,
|
|
@@ -3522,7 +3522,7 @@ var DialogFooter = ({
|
|
|
3522
3522
|
}
|
|
3523
3523
|
);
|
|
3524
3524
|
DialogFooter.displayName = "DialogFooter";
|
|
3525
|
-
var DialogTitle =
|
|
3525
|
+
var DialogTitle = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3526
3526
|
DialogPrimitive__namespace.Title,
|
|
3527
3527
|
{
|
|
3528
3528
|
ref,
|
|
@@ -3534,7 +3534,7 @@ var DialogTitle = React25__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3534
3534
|
}
|
|
3535
3535
|
));
|
|
3536
3536
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
3537
|
-
var DialogDescription =
|
|
3537
|
+
var DialogDescription = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3538
3538
|
DialogPrimitive__namespace.Description,
|
|
3539
3539
|
{
|
|
3540
3540
|
ref,
|
|
@@ -3546,7 +3546,7 @@ var DialogDescription = React25__namespace.forwardRef(({ className, ...props },
|
|
|
3546
3546
|
}
|
|
3547
3547
|
));
|
|
3548
3548
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
3549
|
-
var DialogForm =
|
|
3549
|
+
var DialogForm = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3550
3550
|
"form",
|
|
3551
3551
|
{
|
|
3552
3552
|
ref,
|
|
@@ -3576,7 +3576,7 @@ var commandVariants = classVarianceAuthority.cva(
|
|
|
3576
3576
|
}
|
|
3577
3577
|
}
|
|
3578
3578
|
);
|
|
3579
|
-
var Command =
|
|
3579
|
+
var Command = React23__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3580
3580
|
cmdk.Command,
|
|
3581
3581
|
{
|
|
3582
3582
|
ref,
|
|
@@ -3598,7 +3598,7 @@ var CommandDialog = ({
|
|
|
3598
3598
|
), children })
|
|
3599
3599
|
] }) });
|
|
3600
3600
|
};
|
|
3601
|
-
var CommandInput =
|
|
3601
|
+
var CommandInput = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
3602
3602
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
3603
3603
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3604
3604
|
cmdk.Command.Input,
|
|
@@ -3613,7 +3613,7 @@ var CommandInput = React25__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3613
3613
|
)
|
|
3614
3614
|
] }));
|
|
3615
3615
|
CommandInput.displayName = "CommandInput";
|
|
3616
|
-
var CommandList =
|
|
3616
|
+
var CommandList = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3617
3617
|
cmdk.Command.List,
|
|
3618
3618
|
{
|
|
3619
3619
|
ref,
|
|
@@ -3622,7 +3622,7 @@ var CommandList = React25__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3622
3622
|
}
|
|
3623
3623
|
));
|
|
3624
3624
|
CommandList.displayName = "CommandList";
|
|
3625
|
-
var CommandEmpty =
|
|
3625
|
+
var CommandEmpty = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3626
3626
|
cmdk.Command.Empty,
|
|
3627
3627
|
{
|
|
3628
3628
|
ref,
|
|
@@ -3631,7 +3631,7 @@ var CommandEmpty = React25__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3631
3631
|
}
|
|
3632
3632
|
));
|
|
3633
3633
|
CommandEmpty.displayName = "CommandEmpty";
|
|
3634
|
-
var CommandGroup =
|
|
3634
|
+
var CommandGroup = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3635
3635
|
cmdk.Command.Group,
|
|
3636
3636
|
{
|
|
3637
3637
|
ref,
|
|
@@ -3643,7 +3643,7 @@ var CommandGroup = React25__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
3643
3643
|
}
|
|
3644
3644
|
));
|
|
3645
3645
|
CommandGroup.displayName = "CommandGroup";
|
|
3646
|
-
var CommandSeparator =
|
|
3646
|
+
var CommandSeparator = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3647
3647
|
cmdk.Command.Separator,
|
|
3648
3648
|
{
|
|
3649
3649
|
ref,
|
|
@@ -3652,7 +3652,7 @@ var CommandSeparator = React25__namespace.forwardRef(({ className, ...props }, r
|
|
|
3652
3652
|
}
|
|
3653
3653
|
));
|
|
3654
3654
|
CommandSeparator.displayName = "CommandSeparator";
|
|
3655
|
-
var CommandItem =
|
|
3655
|
+
var CommandItem = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3656
3656
|
cmdk.Command.Item,
|
|
3657
3657
|
{
|
|
3658
3658
|
ref,
|
|
@@ -3680,6 +3680,14 @@ var CommandShortcut = ({
|
|
|
3680
3680
|
);
|
|
3681
3681
|
};
|
|
3682
3682
|
CommandShortcut.displayName = "CommandShortcut";
|
|
3683
|
+
var TableSortContext = React23__namespace.createContext(null);
|
|
3684
|
+
function nextSortDirection(current) {
|
|
3685
|
+
if (current === "asc")
|
|
3686
|
+
return "desc";
|
|
3687
|
+
if (current === "desc")
|
|
3688
|
+
return null;
|
|
3689
|
+
return "asc";
|
|
3690
|
+
}
|
|
3683
3691
|
var tableVariants = classVarianceAuthority.cva(
|
|
3684
3692
|
"w-full caption-bottom text-sm",
|
|
3685
3693
|
{
|
|
@@ -3703,28 +3711,38 @@ var tableVariants = classVarianceAuthority.cva(
|
|
|
3703
3711
|
}
|
|
3704
3712
|
}
|
|
3705
3713
|
);
|
|
3706
|
-
var Table =
|
|
3714
|
+
var Table = React23__namespace.forwardRef(({
|
|
3707
3715
|
className,
|
|
3708
3716
|
variant,
|
|
3709
3717
|
size,
|
|
3710
3718
|
loading,
|
|
3711
3719
|
emptyContent,
|
|
3712
|
-
//
|
|
3713
|
-
//
|
|
3714
|
-
//
|
|
3715
|
-
//
|
|
3716
|
-
//
|
|
3717
|
-
//
|
|
3718
|
-
//
|
|
3719
|
-
|
|
3720
|
+
// #321: Bunlar eskiden yoruma alınmıştı ve `...props` içinde kalıp native
|
|
3721
|
+
// <table>'a sızıyordu (ölçüldü: `sortcolumn`/`sortdirection` geçersiz DOM
|
|
3722
|
+
// attribute olarak basılıyor + 4 React uyarısı). Artık destructure ediliyorlar:
|
|
3723
|
+
// • sıralama üçlüsü GERÇEKTEN bağlandı (aşağıdaki TableSortContext)
|
|
3724
|
+
// • seçim dörtlüsü yalnız DOM'dan ÇIKARILIYOR — bağlanamazlar, çünkü `Table`
|
|
3725
|
+
// veri almıyor (tamamen kompozisyonel) ve `getRowId(row)` bir veri satırı
|
|
3726
|
+
// ister. Satır seçimi için veri-güdümlü `DataTable` kullanılmalı.
|
|
3727
|
+
sortColumn,
|
|
3728
|
+
sortDirection,
|
|
3729
|
+
onSortChange,
|
|
3730
|
+
selectedRowIds: _selectedRowIds,
|
|
3731
|
+
onRowSelectionChange: _onRowSelectionChange,
|
|
3732
|
+
disableRowSelection: _disableRowSelection,
|
|
3733
|
+
getRowId: _getRowId,
|
|
3720
3734
|
...props
|
|
3721
3735
|
}, ref) => {
|
|
3722
3736
|
const striped = variant === "striped";
|
|
3723
|
-
const
|
|
3724
|
-
|
|
3737
|
+
const sortContextValue = React23__namespace.useMemo(
|
|
3738
|
+
() => ({ sortColumn, sortDirection, onSortChange }),
|
|
3739
|
+
[sortColumn, sortDirection, onSortChange]
|
|
3740
|
+
);
|
|
3741
|
+
const childrenWithProps = React23__namespace.Children.map(props.children, (child) => {
|
|
3742
|
+
if (React23__namespace.isValidElement(child)) {
|
|
3725
3743
|
if (child.type === "tbody") {
|
|
3726
3744
|
const tbodyProps = child.props;
|
|
3727
|
-
return
|
|
3745
|
+
return React23__namespace.cloneElement(child, {
|
|
3728
3746
|
className: cn(tbodyProps.className, striped && "even:[&>tr]:bg-muted/50")
|
|
3729
3747
|
});
|
|
3730
3748
|
}
|
|
@@ -3733,7 +3751,7 @@ var Table = React25__namespace.forwardRef(({
|
|
|
3733
3751
|
});
|
|
3734
3752
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-full overflow-auto", children: [
|
|
3735
3753
|
loading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-background/60 flex items-center justify-center z-10", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" }) }),
|
|
3736
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3754
|
+
/* @__PURE__ */ jsxRuntime.jsx(TableSortContext.Provider, { value: sortContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3737
3755
|
"table",
|
|
3738
3756
|
{
|
|
3739
3757
|
ref,
|
|
@@ -3745,14 +3763,14 @@ var Table = React25__namespace.forwardRef(({
|
|
|
3745
3763
|
...props,
|
|
3746
3764
|
children: childrenWithProps
|
|
3747
3765
|
}
|
|
3748
|
-
)
|
|
3766
|
+
) })
|
|
3749
3767
|
] });
|
|
3750
3768
|
});
|
|
3751
3769
|
Table.displayName = "Table";
|
|
3752
|
-
var TableHeader =
|
|
3770
|
+
var TableHeader = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("moonui-theme", "[&_tr]:border-b", className), ...props }));
|
|
3753
3771
|
TableHeader.displayName = "TableHeader";
|
|
3754
|
-
var TableBody =
|
|
3755
|
-
const hasChildren =
|
|
3772
|
+
var TableBody = React23__namespace.forwardRef(({ className, emptyContent, emptyMessage = "No data available", children, ...props }, ref) => {
|
|
3773
|
+
const hasChildren = React23__namespace.Children.count(children) > 0;
|
|
3756
3774
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3757
3775
|
"tbody",
|
|
3758
3776
|
{
|
|
@@ -3764,7 +3782,7 @@ var TableBody = React25__namespace.forwardRef(({ className, emptyContent, emptyM
|
|
|
3764
3782
|
);
|
|
3765
3783
|
});
|
|
3766
3784
|
TableBody.displayName = "TableBody";
|
|
3767
|
-
var TableFooter =
|
|
3785
|
+
var TableFooter = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3768
3786
|
"tfoot",
|
|
3769
3787
|
{
|
|
3770
3788
|
ref,
|
|
@@ -3773,7 +3791,7 @@ var TableFooter = React25__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
3773
3791
|
}
|
|
3774
3792
|
));
|
|
3775
3793
|
TableFooter.displayName = "TableFooter";
|
|
3776
|
-
var TableRow =
|
|
3794
|
+
var TableRow = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3777
3795
|
"tr",
|
|
3778
3796
|
{
|
|
3779
3797
|
ref,
|
|
@@ -3785,8 +3803,21 @@ var TableRow = React25__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
3785
3803
|
}
|
|
3786
3804
|
));
|
|
3787
3805
|
TableRow.displayName = "TableRow";
|
|
3788
|
-
var TableHead =
|
|
3789
|
-
({ className, sortable, sorted, onSort, align = "left", children, ...props }, ref) => {
|
|
3806
|
+
var TableHead = React23__namespace.forwardRef(
|
|
3807
|
+
({ className, sortable, sorted, onSort, columnId, align = "left", children, ...props }, ref) => {
|
|
3808
|
+
const sortCtx = React23__namespace.useContext(TableSortContext);
|
|
3809
|
+
const ctxSorted = columnId && sortCtx && sortCtx.sortColumn === columnId ? sortCtx.sortDirection ?? null : null;
|
|
3810
|
+
const effectiveSorted = sorted !== void 0 ? sorted : ctxSorted;
|
|
3811
|
+
const handleSort = React23__namespace.useCallback(() => {
|
|
3812
|
+
if (onSort) {
|
|
3813
|
+
onSort();
|
|
3814
|
+
return;
|
|
3815
|
+
}
|
|
3816
|
+
if (columnId && sortCtx?.onSortChange) {
|
|
3817
|
+
sortCtx.onSortChange(columnId, nextSortDirection(ctxSorted));
|
|
3818
|
+
}
|
|
3819
|
+
}, [onSort, columnId, sortCtx, ctxSorted]);
|
|
3820
|
+
const isInteractive = Boolean(sortable && (onSort || columnId && sortCtx?.onSortChange));
|
|
3790
3821
|
const renderSortIcon = () => {
|
|
3791
3822
|
if (!sortable)
|
|
3792
3823
|
return null;
|
|
@@ -3862,18 +3893,33 @@ var TableHead = React25__namespace.forwardRef(
|
|
|
3862
3893
|
sortable && "cursor-pointer hover:text-foreground select-none",
|
|
3863
3894
|
className
|
|
3864
3895
|
),
|
|
3865
|
-
|
|
3896
|
+
"aria-sort": sortable ? effectiveSorted === "asc" ? "ascending" : effectiveSorted === "desc" ? "descending" : "none" : void 0,
|
|
3897
|
+
onClick: isInteractive ? handleSort : void 0,
|
|
3866
3898
|
...props,
|
|
3867
|
-
children: sortable || align !== "left" ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3899
|
+
children: sortable || align !== "left" ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3900
|
+
"div",
|
|
3901
|
+
{
|
|
3902
|
+
className: cn("flex items-center", alignmentClasses[align].split(" ")[1]),
|
|
3903
|
+
role: isInteractive ? "button" : void 0,
|
|
3904
|
+
tabIndex: isInteractive ? 0 : void 0,
|
|
3905
|
+
onKeyDown: isInteractive ? (e) => {
|
|
3906
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
3907
|
+
e.preventDefault();
|
|
3908
|
+
handleSort();
|
|
3909
|
+
}
|
|
3910
|
+
} : void 0,
|
|
3911
|
+
children: [
|
|
3912
|
+
children,
|
|
3913
|
+
sortable && renderSortIcon()
|
|
3914
|
+
]
|
|
3915
|
+
}
|
|
3916
|
+
) : children
|
|
3871
3917
|
}
|
|
3872
3918
|
);
|
|
3873
3919
|
}
|
|
3874
3920
|
);
|
|
3875
3921
|
TableHead.displayName = "TableHead";
|
|
3876
|
-
var TableCell =
|
|
3922
|
+
var TableCell = React23__namespace.forwardRef(({ className, align = "left", ...props }, ref) => {
|
|
3877
3923
|
const alignmentClass = {
|
|
3878
3924
|
left: "text-left",
|
|
3879
3925
|
center: "text-center",
|
|
@@ -3889,7 +3935,7 @@ var TableCell = React25__namespace.forwardRef(({ className, align = "left", ...p
|
|
|
3889
3935
|
);
|
|
3890
3936
|
});
|
|
3891
3937
|
TableCell.displayName = "TableCell";
|
|
3892
|
-
var TableCaption =
|
|
3938
|
+
var TableCaption = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3893
3939
|
"caption",
|
|
3894
3940
|
{
|
|
3895
3941
|
ref,
|
|
@@ -3909,8 +3955,8 @@ function DataTableBasic({
|
|
|
3909
3955
|
emptyMessage = "No results found.",
|
|
3910
3956
|
className
|
|
3911
3957
|
}) {
|
|
3912
|
-
const [sorting, setSorting] =
|
|
3913
|
-
const [globalFilter, setGlobalFilter] =
|
|
3958
|
+
const [sorting, setSorting] = React23__namespace.useState([]);
|
|
3959
|
+
const [globalFilter, setGlobalFilter] = React23__namespace.useState("");
|
|
3914
3960
|
const table = reactTable.useReactTable({
|
|
3915
3961
|
data,
|
|
3916
3962
|
columns,
|
|
@@ -4073,7 +4119,7 @@ var datePickerVariants = classVarianceAuthority.cva(
|
|
|
4073
4119
|
}
|
|
4074
4120
|
}
|
|
4075
4121
|
);
|
|
4076
|
-
var DatePicker =
|
|
4122
|
+
var DatePicker = React23__namespace.forwardRef(function DatePicker2({
|
|
4077
4123
|
className,
|
|
4078
4124
|
variant,
|
|
4079
4125
|
size,
|
|
@@ -4096,9 +4142,9 @@ var DatePicker = React25__namespace.forwardRef(function DatePicker2({
|
|
|
4096
4142
|
disabled,
|
|
4097
4143
|
...props
|
|
4098
4144
|
}, ref) {
|
|
4099
|
-
const [open, setOpen] =
|
|
4100
|
-
const [internalDate, setInternalDate] =
|
|
4101
|
-
|
|
4145
|
+
const [open, setOpen] = React23__namespace.useState(false);
|
|
4146
|
+
const [internalDate, setInternalDate] = React23__namespace.useState(value);
|
|
4147
|
+
React23__namespace.useEffect(() => {
|
|
4102
4148
|
setInternalDate(value);
|
|
4103
4149
|
}, [value]);
|
|
4104
4150
|
const handleSelect = (date) => {
|
|
@@ -4246,7 +4292,7 @@ var DatePicker = React25__namespace.forwardRef(function DatePicker2({
|
|
|
4246
4292
|
] }) });
|
|
4247
4293
|
});
|
|
4248
4294
|
DatePicker.displayName = "DatePicker";
|
|
4249
|
-
var DateRangePicker =
|
|
4295
|
+
var DateRangePicker = React23__namespace.forwardRef(function DateRangePicker2({
|
|
4250
4296
|
className,
|
|
4251
4297
|
value,
|
|
4252
4298
|
onChange,
|
|
@@ -4255,9 +4301,9 @@ var DateRangePicker = React25__namespace.forwardRef(function DateRangePicker2({
|
|
|
4255
4301
|
separator = " - ",
|
|
4256
4302
|
...props
|
|
4257
4303
|
}, ref) {
|
|
4258
|
-
const [open, setOpen] =
|
|
4259
|
-
const [internalRange, setInternalRange] =
|
|
4260
|
-
|
|
4304
|
+
const [open, setOpen] = React23__namespace.useState(false);
|
|
4305
|
+
const [internalRange, setInternalRange] = React23__namespace.useState(value);
|
|
4306
|
+
React23__namespace.useEffect(() => {
|
|
4261
4307
|
setInternalRange(value);
|
|
4262
4308
|
}, [value]);
|
|
4263
4309
|
const handleSelect = (range) => {
|
|
@@ -4267,7 +4313,7 @@ var DateRangePicker = React25__namespace.forwardRef(function DateRangePicker2({
|
|
|
4267
4313
|
setOpen(false);
|
|
4268
4314
|
}
|
|
4269
4315
|
};
|
|
4270
|
-
const displayValue =
|
|
4316
|
+
const displayValue = React23__namespace.useMemo(() => {
|
|
4271
4317
|
if (!internalRange?.from)
|
|
4272
4318
|
return null;
|
|
4273
4319
|
if (!internalRange?.to) {
|
|
@@ -4315,7 +4361,7 @@ var DateRangePicker = React25__namespace.forwardRef(function DateRangePicker2({
|
|
|
4315
4361
|
] });
|
|
4316
4362
|
});
|
|
4317
4363
|
DateRangePicker.displayName = "DateRangePicker";
|
|
4318
|
-
var DateTimePicker =
|
|
4364
|
+
var DateTimePicker = React23__namespace.forwardRef(function DateTimePicker2({
|
|
4319
4365
|
value,
|
|
4320
4366
|
onChange,
|
|
4321
4367
|
// Saat ayrı bir <select> ile gösterildiği için buton yalnızca TARİHİ yazar;
|
|
@@ -4327,8 +4373,8 @@ var DateTimePicker = React25__namespace.forwardRef(function DateTimePicker2({
|
|
|
4327
4373
|
timeInterval = 15,
|
|
4328
4374
|
...props
|
|
4329
4375
|
}, ref) {
|
|
4330
|
-
const [date, setDate] =
|
|
4331
|
-
const [time, setTime] =
|
|
4376
|
+
const [date, setDate] = React23__namespace.useState(value);
|
|
4377
|
+
const [time, setTime] = React23__namespace.useState(
|
|
4332
4378
|
value ? dateFns.format(value, timeFormat === "24" ? "HH:mm" : "hh:mm a") : "00:00"
|
|
4333
4379
|
);
|
|
4334
4380
|
const handleDateChange = (newDate) => {
|
|
@@ -4353,7 +4399,7 @@ var DateTimePicker = React25__namespace.forwardRef(function DateTimePicker2({
|
|
|
4353
4399
|
onChange?.(newDate);
|
|
4354
4400
|
}
|
|
4355
4401
|
};
|
|
4356
|
-
const timeOptions =
|
|
4402
|
+
const timeOptions = React23__namespace.useMemo(() => {
|
|
4357
4403
|
const options = [];
|
|
4358
4404
|
for (let h = 0; h < 24; h++) {
|
|
4359
4405
|
for (let m = 0; m < 60; m += timeInterval) {
|
|
@@ -4407,15 +4453,15 @@ var DateTimePicker = React25__namespace.forwardRef(function DateTimePicker2({
|
|
|
4407
4453
|
] });
|
|
4408
4454
|
});
|
|
4409
4455
|
DateTimePicker.displayName = "DateTimePicker";
|
|
4410
|
-
var MonthPicker =
|
|
4456
|
+
var MonthPicker = React23__namespace.forwardRef(function MonthPicker2({
|
|
4411
4457
|
value,
|
|
4412
4458
|
onChange,
|
|
4413
4459
|
placeholder = "Pick a month",
|
|
4414
4460
|
formatString = "MMMM yyyy",
|
|
4415
4461
|
...props
|
|
4416
4462
|
}, ref) {
|
|
4417
|
-
const [open, setOpen] =
|
|
4418
|
-
const [viewDate, setViewDate] =
|
|
4463
|
+
const [open, setOpen] = React23__namespace.useState(false);
|
|
4464
|
+
const [viewDate, setViewDate] = React23__namespace.useState(value || /* @__PURE__ */ new Date());
|
|
4419
4465
|
const months = [
|
|
4420
4466
|
"January",
|
|
4421
4467
|
"February",
|
|
@@ -4511,7 +4557,7 @@ function DraggableList({
|
|
|
4511
4557
|
className,
|
|
4512
4558
|
disabled = false
|
|
4513
4559
|
}) {
|
|
4514
|
-
const [draggedIndex, setDraggedIndex] =
|
|
4560
|
+
const [draggedIndex, setDraggedIndex] = React23__namespace.useState(null);
|
|
4515
4561
|
const handleDragStart = (e, index) => {
|
|
4516
4562
|
if (disabled)
|
|
4517
4563
|
return;
|
|
@@ -4563,7 +4609,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
4563
4609
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
4564
4610
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
4565
4611
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
4566
|
-
var DropdownMenuSubTrigger =
|
|
4612
|
+
var DropdownMenuSubTrigger = React23__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4567
4613
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
4568
4614
|
{
|
|
4569
4615
|
ref,
|
|
@@ -4580,7 +4626,7 @@ var DropdownMenuSubTrigger = React25__namespace.forwardRef(({ className, inset,
|
|
|
4580
4626
|
}
|
|
4581
4627
|
));
|
|
4582
4628
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
4583
|
-
var DropdownMenuSubContent =
|
|
4629
|
+
var DropdownMenuSubContent = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4584
4630
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
4585
4631
|
{
|
|
4586
4632
|
ref,
|
|
@@ -4592,7 +4638,7 @@ var DropdownMenuSubContent = React25__namespace.forwardRef(({ className, ...prop
|
|
|
4592
4638
|
}
|
|
4593
4639
|
));
|
|
4594
4640
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
4595
|
-
var DropdownMenuContent =
|
|
4641
|
+
var DropdownMenuContent = React23__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4596
4642
|
DropdownMenuPrimitive__namespace.Content,
|
|
4597
4643
|
{
|
|
4598
4644
|
ref,
|
|
@@ -4605,7 +4651,7 @@ var DropdownMenuContent = React25__namespace.forwardRef(({ className, sideOffset
|
|
|
4605
4651
|
}
|
|
4606
4652
|
) }));
|
|
4607
4653
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
4608
|
-
var DropdownMenuItem =
|
|
4654
|
+
var DropdownMenuItem = React23__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4609
4655
|
DropdownMenuPrimitive__namespace.Item,
|
|
4610
4656
|
{
|
|
4611
4657
|
ref,
|
|
@@ -4618,7 +4664,7 @@ var DropdownMenuItem = React25__namespace.forwardRef(({ className, inset, ...pro
|
|
|
4618
4664
|
}
|
|
4619
4665
|
));
|
|
4620
4666
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
4621
|
-
var DropdownMenuCheckboxItem =
|
|
4667
|
+
var DropdownMenuCheckboxItem = React23__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4622
4668
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
4623
4669
|
{
|
|
4624
4670
|
ref,
|
|
@@ -4635,7 +4681,7 @@ var DropdownMenuCheckboxItem = React25__namespace.forwardRef(({ className, child
|
|
|
4635
4681
|
}
|
|
4636
4682
|
));
|
|
4637
4683
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
4638
|
-
var DropdownMenuRadioItem =
|
|
4684
|
+
var DropdownMenuRadioItem = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4639
4685
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
4640
4686
|
{
|
|
4641
4687
|
ref,
|
|
@@ -4651,7 +4697,7 @@ var DropdownMenuRadioItem = React25__namespace.forwardRef(({ className, children
|
|
|
4651
4697
|
}
|
|
4652
4698
|
));
|
|
4653
4699
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
4654
|
-
var DropdownMenuLabel =
|
|
4700
|
+
var DropdownMenuLabel = React23__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4655
4701
|
DropdownMenuPrimitive__namespace.Label,
|
|
4656
4702
|
{
|
|
4657
4703
|
ref,
|
|
@@ -4664,7 +4710,7 @@ var DropdownMenuLabel = React25__namespace.forwardRef(({ className, inset, ...pr
|
|
|
4664
4710
|
}
|
|
4665
4711
|
));
|
|
4666
4712
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
4667
|
-
var DropdownMenuSeparator =
|
|
4713
|
+
var DropdownMenuSeparator = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4668
4714
|
DropdownMenuPrimitive__namespace.Separator,
|
|
4669
4715
|
{
|
|
4670
4716
|
ref,
|
|
@@ -4753,7 +4799,7 @@ var progressIndicatorVariants = classVarianceAuthority.cva(
|
|
|
4753
4799
|
}
|
|
4754
4800
|
}
|
|
4755
4801
|
);
|
|
4756
|
-
var Progress =
|
|
4802
|
+
var Progress = React23__namespace.forwardRef(({
|
|
4757
4803
|
className,
|
|
4758
4804
|
value = 0,
|
|
4759
4805
|
variant,
|
|
@@ -4883,7 +4929,7 @@ var FileItem = ({
|
|
|
4883
4929
|
}
|
|
4884
4930
|
);
|
|
4885
4931
|
};
|
|
4886
|
-
var FileUpload =
|
|
4932
|
+
var FileUpload = React23__namespace.default.forwardRef(
|
|
4887
4933
|
({
|
|
4888
4934
|
accept = "*",
|
|
4889
4935
|
multiple = true,
|
|
@@ -4897,9 +4943,9 @@ var FileUpload = React25__namespace.default.forwardRef(
|
|
|
4897
4943
|
children,
|
|
4898
4944
|
...props
|
|
4899
4945
|
}, ref) => {
|
|
4900
|
-
const [uploadedFiles, setUploadedFiles] =
|
|
4901
|
-
const [isDragOver, setIsDragOver] =
|
|
4902
|
-
const [error, setError] =
|
|
4946
|
+
const [uploadedFiles, setUploadedFiles] = React23.useState([]);
|
|
4947
|
+
const [isDragOver, setIsDragOver] = React23.useState(false);
|
|
4948
|
+
const [error, setError] = React23.useState(null);
|
|
4903
4949
|
const validateFile = (file) => {
|
|
4904
4950
|
if (file.size > maxSize) {
|
|
4905
4951
|
return `File size exceeds ${formatFileSize(maxSize)}`;
|
|
@@ -4915,7 +4961,7 @@ var FileUpload = React25__namespace.default.forwardRef(
|
|
|
4915
4961
|
}
|
|
4916
4962
|
return null;
|
|
4917
4963
|
};
|
|
4918
|
-
const processFiles =
|
|
4964
|
+
const processFiles = React23.useCallback(async (files) => {
|
|
4919
4965
|
const fileArray = Array.from(files);
|
|
4920
4966
|
setError(null);
|
|
4921
4967
|
if (uploadedFiles.length + fileArray.length > maxFiles) {
|
|
@@ -4978,7 +5024,7 @@ var FileUpload = React25__namespace.default.forwardRef(
|
|
|
4978
5024
|
}
|
|
4979
5025
|
}
|
|
4980
5026
|
}, [uploadedFiles.length, maxFiles, maxSize, accept, onUpload]);
|
|
4981
|
-
const handleDrop =
|
|
5027
|
+
const handleDrop = React23.useCallback((e) => {
|
|
4982
5028
|
e.preventDefault();
|
|
4983
5029
|
setIsDragOver(false);
|
|
4984
5030
|
if (disabled)
|
|
@@ -4988,24 +5034,24 @@ var FileUpload = React25__namespace.default.forwardRef(
|
|
|
4988
5034
|
processFiles(files);
|
|
4989
5035
|
}
|
|
4990
5036
|
}, [processFiles, disabled]);
|
|
4991
|
-
const handleDragOver =
|
|
5037
|
+
const handleDragOver = React23.useCallback((e) => {
|
|
4992
5038
|
e.preventDefault();
|
|
4993
5039
|
if (!disabled) {
|
|
4994
5040
|
setIsDragOver(true);
|
|
4995
5041
|
}
|
|
4996
5042
|
}, [disabled]);
|
|
4997
|
-
const handleDragLeave =
|
|
5043
|
+
const handleDragLeave = React23.useCallback((e) => {
|
|
4998
5044
|
e.preventDefault();
|
|
4999
5045
|
setIsDragOver(false);
|
|
5000
5046
|
}, []);
|
|
5001
|
-
const handleFileSelect =
|
|
5047
|
+
const handleFileSelect = React23.useCallback((e) => {
|
|
5002
5048
|
const files = e.target.files;
|
|
5003
5049
|
if (files && files.length > 0) {
|
|
5004
5050
|
processFiles(files);
|
|
5005
5051
|
}
|
|
5006
5052
|
e.target.value = "";
|
|
5007
5053
|
}, [processFiles]);
|
|
5008
|
-
const removeFile =
|
|
5054
|
+
const removeFile = React23.useCallback((fileId) => {
|
|
5009
5055
|
setUploadedFiles((prev) => {
|
|
5010
5056
|
const fileToRemove = prev.find((f) => f.id === fileId);
|
|
5011
5057
|
if (fileToRemove?.preview) {
|
|
@@ -5106,7 +5152,7 @@ var FileUpload = React25__namespace.default.forwardRef(
|
|
|
5106
5152
|
}
|
|
5107
5153
|
);
|
|
5108
5154
|
FileUpload.displayName = "FileUpload";
|
|
5109
|
-
var GestureDrawer =
|
|
5155
|
+
var GestureDrawer = React23__namespace.default.forwardRef(
|
|
5110
5156
|
({
|
|
5111
5157
|
children,
|
|
5112
5158
|
isOpen,
|
|
@@ -5228,9 +5274,9 @@ function GitHubStars({
|
|
|
5228
5274
|
showWatchers = false,
|
|
5229
5275
|
repoUrl = "https://github.com/moonui/moonui"
|
|
5230
5276
|
}) {
|
|
5231
|
-
const [stats, setStats] =
|
|
5232
|
-
const [isLoading, setIsLoading] =
|
|
5233
|
-
|
|
5277
|
+
const [stats, setStats] = React23.useState(null);
|
|
5278
|
+
const [isLoading, setIsLoading] = React23.useState(true);
|
|
5279
|
+
React23.useEffect(() => {
|
|
5234
5280
|
const fetchStats = async () => {
|
|
5235
5281
|
try {
|
|
5236
5282
|
const response = await fetch("/api/github-stars");
|
|
@@ -5329,9 +5375,9 @@ function GitHubStarButton({
|
|
|
5329
5375
|
size = "md",
|
|
5330
5376
|
repoUrl = "https://github.com/moonui/moonui"
|
|
5331
5377
|
}) {
|
|
5332
|
-
const [stars, setStars] =
|
|
5333
|
-
const [isLoading, setIsLoading] =
|
|
5334
|
-
|
|
5378
|
+
const [stars, setStars] = React23.useState(null);
|
|
5379
|
+
const [isLoading, setIsLoading] = React23.useState(true);
|
|
5380
|
+
React23.useEffect(() => {
|
|
5335
5381
|
const fetchStats = async () => {
|
|
5336
5382
|
try {
|
|
5337
5383
|
const response = await fetch("/api/github-stars");
|
|
@@ -5377,7 +5423,7 @@ function GitHubStarButton({
|
|
|
5377
5423
|
}
|
|
5378
5424
|
);
|
|
5379
5425
|
}
|
|
5380
|
-
var InputOTP =
|
|
5426
|
+
var InputOTP = React23__namespace.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5381
5427
|
inputOtp.OTPInput,
|
|
5382
5428
|
{
|
|
5383
5429
|
ref,
|
|
@@ -5392,7 +5438,7 @@ var InputOTP = React25__namespace.forwardRef(({ className, containerClassName, .
|
|
|
5392
5438
|
}
|
|
5393
5439
|
));
|
|
5394
5440
|
InputOTP.displayName = "InputOTP";
|
|
5395
|
-
var InputOTPGroup =
|
|
5441
|
+
var InputOTPGroup = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
5396
5442
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
5397
5443
|
var inputOTPSlotVariants = classVarianceAuthority.cva(
|
|
5398
5444
|
[
|
|
@@ -5414,9 +5460,9 @@ var inputOTPSlotVariants = classVarianceAuthority.cva(
|
|
|
5414
5460
|
}
|
|
5415
5461
|
}
|
|
5416
5462
|
);
|
|
5417
|
-
var InputOTPSlot =
|
|
5463
|
+
var InputOTPSlot = React23__namespace.forwardRef(
|
|
5418
5464
|
({ index, className, ...props }, ref) => {
|
|
5419
|
-
const inputOTPContext =
|
|
5465
|
+
const inputOTPContext = React23__namespace.useContext(inputOtp.OTPInputContext);
|
|
5420
5466
|
const slot = inputOTPContext?.slots?.[index];
|
|
5421
5467
|
const char = slot?.char;
|
|
5422
5468
|
const hasFakeCaret = slot?.hasFakeCaret;
|
|
@@ -5438,7 +5484,7 @@ var InputOTPSlot = React25__namespace.forwardRef(
|
|
|
5438
5484
|
}
|
|
5439
5485
|
);
|
|
5440
5486
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
5441
|
-
var InputOTPSeparator =
|
|
5487
|
+
var InputOTPSeparator = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5442
5488
|
"div",
|
|
5443
5489
|
{
|
|
5444
5490
|
ref,
|
|
@@ -5456,8 +5502,8 @@ function LockedComponent({
|
|
|
5456
5502
|
showPreview = true,
|
|
5457
5503
|
previewDuration = 2e3
|
|
5458
5504
|
}) {
|
|
5459
|
-
const [isPreviewActive, setIsPreviewActive] =
|
|
5460
|
-
const [previewTimeout, setPreviewTimeout] =
|
|
5505
|
+
const [isPreviewActive, setIsPreviewActive] = React23.useState(false);
|
|
5506
|
+
const [previewTimeout, setPreviewTimeout] = React23.useState(null);
|
|
5461
5507
|
const handleMouseEnter = () => {
|
|
5462
5508
|
if (!showPreview)
|
|
5463
5509
|
return;
|
|
@@ -5554,13 +5600,13 @@ function ProComponentWrapper({
|
|
|
5554
5600
|
fallback,
|
|
5555
5601
|
requireCLI = true
|
|
5556
5602
|
}) {
|
|
5557
|
-
const [authState, setAuthState] =
|
|
5603
|
+
const [authState, setAuthState] = React23.useState({
|
|
5558
5604
|
isAuthenticated: false,
|
|
5559
5605
|
deviceValid: false,
|
|
5560
5606
|
hasProAccess: false,
|
|
5561
5607
|
loading: true
|
|
5562
5608
|
});
|
|
5563
|
-
|
|
5609
|
+
React23.useEffect(() => {
|
|
5564
5610
|
const isDevelopment2 = () => {
|
|
5565
5611
|
const checks = {
|
|
5566
5612
|
nodeEnv: process.env.NODE_ENV === "development",
|
|
@@ -5737,7 +5783,7 @@ function MoonLogo({
|
|
|
5737
5783
|
showText = true,
|
|
5738
5784
|
...props
|
|
5739
5785
|
}) {
|
|
5740
|
-
const logoId =
|
|
5786
|
+
const logoId = React23__namespace.useId();
|
|
5741
5787
|
const gradientId = `moon-gradient-${logoId}`;
|
|
5742
5788
|
const maskId = `moon-mask-${logoId}`;
|
|
5743
5789
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
@@ -5819,7 +5865,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
5819
5865
|
}
|
|
5820
5866
|
);
|
|
5821
5867
|
Pagination.displayName = "Pagination";
|
|
5822
|
-
var PaginationContent =
|
|
5868
|
+
var PaginationContent = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5823
5869
|
"ul",
|
|
5824
5870
|
{
|
|
5825
5871
|
ref,
|
|
@@ -5828,7 +5874,7 @@ var PaginationContent = React25__namespace.forwardRef(({ className, ...props },
|
|
|
5828
5874
|
}
|
|
5829
5875
|
));
|
|
5830
5876
|
PaginationContent.displayName = "PaginationContent";
|
|
5831
|
-
var PaginationItem =
|
|
5877
|
+
var PaginationItem = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("moonui-theme", "", className), ...props }));
|
|
5832
5878
|
PaginationItem.displayName = "PaginationItem";
|
|
5833
5879
|
var PaginationLink = ({
|
|
5834
5880
|
className,
|
|
@@ -5936,7 +5982,7 @@ var selectTriggerVariants = classVarianceAuthority.cva(
|
|
|
5936
5982
|
}
|
|
5937
5983
|
}
|
|
5938
5984
|
);
|
|
5939
|
-
var SelectTrigger =
|
|
5985
|
+
var SelectTrigger = React23__namespace.forwardRef(({ className, children, variant, size, error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5940
5986
|
SelectPrimitive__namespace.Trigger,
|
|
5941
5987
|
{
|
|
5942
5988
|
ref,
|
|
@@ -5967,7 +6013,7 @@ var SelectTrigger = React25__namespace.forwardRef(({ className, children, varian
|
|
|
5967
6013
|
}
|
|
5968
6014
|
));
|
|
5969
6015
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
5970
|
-
var SelectScrollUpButton =
|
|
6016
|
+
var SelectScrollUpButton = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5971
6017
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
5972
6018
|
{
|
|
5973
6019
|
ref,
|
|
@@ -5980,7 +6026,7 @@ var SelectScrollUpButton = React25__namespace.forwardRef(({ className, ...props
|
|
|
5980
6026
|
}
|
|
5981
6027
|
));
|
|
5982
6028
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
5983
|
-
var SelectScrollDownButton =
|
|
6029
|
+
var SelectScrollDownButton = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5984
6030
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
5985
6031
|
{
|
|
5986
6032
|
ref,
|
|
@@ -5993,7 +6039,7 @@ var SelectScrollDownButton = React25__namespace.forwardRef(({ className, ...prop
|
|
|
5993
6039
|
}
|
|
5994
6040
|
));
|
|
5995
6041
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
5996
|
-
var SelectContent =
|
|
6042
|
+
var SelectContent = React23__namespace.forwardRef(({ className, children, position = "popper", side = "bottom", sideOffset = 4, align = "start", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5997
6043
|
SelectPrimitive__namespace.Content,
|
|
5998
6044
|
{
|
|
5999
6045
|
ref,
|
|
@@ -6034,7 +6080,7 @@ var SelectContent = React25__namespace.forwardRef(({ className, children, positi
|
|
|
6034
6080
|
}
|
|
6035
6081
|
) }));
|
|
6036
6082
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
6037
|
-
var SelectLabel =
|
|
6083
|
+
var SelectLabel = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6038
6084
|
SelectPrimitive__namespace.Label,
|
|
6039
6085
|
{
|
|
6040
6086
|
ref,
|
|
@@ -6043,7 +6089,7 @@ var SelectLabel = React25__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
6043
6089
|
}
|
|
6044
6090
|
));
|
|
6045
6091
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
6046
|
-
var SelectItem =
|
|
6092
|
+
var SelectItem = React23__namespace.forwardRef(({ className, children, variant = "default", size = "md", rightIcon, customIndicator, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6047
6093
|
SelectPrimitive__namespace.Item,
|
|
6048
6094
|
{
|
|
6049
6095
|
ref,
|
|
@@ -6073,7 +6119,7 @@ var SelectItem = React25__namespace.forwardRef(({ className, children, variant =
|
|
|
6073
6119
|
}
|
|
6074
6120
|
));
|
|
6075
6121
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
6076
|
-
var SelectSeparator =
|
|
6122
|
+
var SelectSeparator = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6077
6123
|
SelectPrimitive__namespace.Separator,
|
|
6078
6124
|
{
|
|
6079
6125
|
ref,
|
|
@@ -6155,7 +6201,7 @@ var getMaxLength = (countryCode) => {
|
|
|
6155
6201
|
return 15;
|
|
6156
6202
|
}
|
|
6157
6203
|
};
|
|
6158
|
-
var PhoneInput =
|
|
6204
|
+
var PhoneInput = React23__namespace.forwardRef(
|
|
6159
6205
|
({
|
|
6160
6206
|
className,
|
|
6161
6207
|
value = "",
|
|
@@ -6167,8 +6213,8 @@ var PhoneInput = React25__namespace.forwardRef(
|
|
|
6167
6213
|
size,
|
|
6168
6214
|
...props
|
|
6169
6215
|
}, ref) => {
|
|
6170
|
-
const [countryCode, setCountryCode] =
|
|
6171
|
-
const [phoneNumber, setPhoneNumber] =
|
|
6216
|
+
const [countryCode, setCountryCode] = React23__namespace.useState(defaultCountry);
|
|
6217
|
+
const [phoneNumber, setPhoneNumber] = React23__namespace.useState(value);
|
|
6172
6218
|
const selectedCountry = countries.find((c) => c.code === countryCode) || countries[0];
|
|
6173
6219
|
const handlePhoneChange = (e) => {
|
|
6174
6220
|
const rawValue = e.target.value.replace(/\D/g, "");
|
|
@@ -6239,15 +6285,15 @@ var radioGroupItemVariants = classVarianceAuthority.cva(
|
|
|
6239
6285
|
}
|
|
6240
6286
|
}
|
|
6241
6287
|
);
|
|
6242
|
-
var RadioGroupContext =
|
|
6243
|
-
var RadioGroup2 =
|
|
6288
|
+
var RadioGroupContext = React23__namespace.createContext({});
|
|
6289
|
+
var RadioGroup2 = React23__namespace.forwardRef(
|
|
6244
6290
|
({ className, value, defaultValue, onValueChange, disabled, name, ...props }, ref) => {
|
|
6245
|
-
const [internalValue, setInternalValue] =
|
|
6291
|
+
const [internalValue, setInternalValue] = React23__namespace.useState(
|
|
6246
6292
|
defaultValue
|
|
6247
6293
|
);
|
|
6248
6294
|
const isControlled = value !== void 0;
|
|
6249
6295
|
const currentValue = isControlled ? value : internalValue;
|
|
6250
|
-
const handleValueChange =
|
|
6296
|
+
const handleValueChange = React23__namespace.useCallback(
|
|
6251
6297
|
(next) => {
|
|
6252
6298
|
if (!isControlled) {
|
|
6253
6299
|
setInternalValue(next);
|
|
@@ -6279,9 +6325,9 @@ var RadioGroup2 = React25__namespace.forwardRef(
|
|
|
6279
6325
|
}
|
|
6280
6326
|
);
|
|
6281
6327
|
RadioGroup2.displayName = "RadioGroup";
|
|
6282
|
-
var RadioGroupItem =
|
|
6283
|
-
const radioGroup =
|
|
6284
|
-
const generatedId =
|
|
6328
|
+
var RadioGroupItem = React23__namespace.forwardRef(({ className, variant, size, indicator, id, value, disabled, ...props }, ref) => {
|
|
6329
|
+
const radioGroup = React23__namespace.useContext(RadioGroupContext);
|
|
6330
|
+
const generatedId = React23__namespace.useId();
|
|
6285
6331
|
const radioId = id || generatedId;
|
|
6286
6332
|
const isChecked = radioGroup.value === value;
|
|
6287
6333
|
const handleChange = (e) => {
|
|
@@ -6334,7 +6380,7 @@ var RadioGroupItem = React25__namespace.forwardRef(({ className, variant, size,
|
|
|
6334
6380
|
] });
|
|
6335
6381
|
});
|
|
6336
6382
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
6337
|
-
var RadioLabel =
|
|
6383
|
+
var RadioLabel = React23__namespace.forwardRef(
|
|
6338
6384
|
({ className, htmlFor, children, disabled = false, ...props }, ref) => {
|
|
6339
6385
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6340
6386
|
"label",
|
|
@@ -6353,13 +6399,13 @@ var RadioLabel = React25__namespace.forwardRef(
|
|
|
6353
6399
|
}
|
|
6354
6400
|
);
|
|
6355
6401
|
RadioLabel.displayName = "RadioLabel";
|
|
6356
|
-
var RadioItemWithLabel =
|
|
6402
|
+
var RadioItemWithLabel = React23__namespace.forwardRef(({
|
|
6357
6403
|
id,
|
|
6358
6404
|
label,
|
|
6359
6405
|
labelClassName,
|
|
6360
6406
|
...radioProps
|
|
6361
6407
|
}, ref) => {
|
|
6362
|
-
const generatedId =
|
|
6408
|
+
const generatedId = React23__namespace.useId();
|
|
6363
6409
|
const radioId = id || generatedId;
|
|
6364
6410
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
6365
6411
|
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { ref, id: radioId, ...radioProps }),
|
|
@@ -6436,7 +6482,7 @@ function RichTextEditor({
|
|
|
6436
6482
|
)
|
|
6437
6483
|
] });
|
|
6438
6484
|
}
|
|
6439
|
-
var ScrollArea =
|
|
6485
|
+
var ScrollArea = React23__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6440
6486
|
ScrollAreaPrimitive__namespace.Root,
|
|
6441
6487
|
{
|
|
6442
6488
|
ref,
|
|
@@ -6450,7 +6496,7 @@ var ScrollArea = React25__namespace.forwardRef(({ className, children, ...props
|
|
|
6450
6496
|
}
|
|
6451
6497
|
));
|
|
6452
6498
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
6453
|
-
var ScrollBar =
|
|
6499
|
+
var ScrollBar = React23__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6454
6500
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
6455
6501
|
{
|
|
6456
6502
|
ref,
|
|
@@ -6504,7 +6550,7 @@ var defaultTransition = {
|
|
|
6504
6550
|
ease: [0.25, 0.46, 0.45, 0.94]
|
|
6505
6551
|
// Custom cubic-bezier for smooth motion
|
|
6506
6552
|
};
|
|
6507
|
-
var ScrollReveal =
|
|
6553
|
+
var ScrollReveal = React23__namespace.forwardRef(
|
|
6508
6554
|
({
|
|
6509
6555
|
children,
|
|
6510
6556
|
direction = "up",
|
|
@@ -6525,17 +6571,17 @@ var ScrollReveal = React25__namespace.forwardRef(
|
|
|
6525
6571
|
viewport
|
|
6526
6572
|
}, ref) => {
|
|
6527
6573
|
const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
|
|
6528
|
-
const animationVariants =
|
|
6574
|
+
const animationVariants = React23__namespace.useMemo(() => {
|
|
6529
6575
|
if (variants)
|
|
6530
6576
|
return variants;
|
|
6531
6577
|
return createDefaultVariants(direction, distance);
|
|
6532
6578
|
}, [direction, distance, variants]);
|
|
6533
|
-
const transition =
|
|
6579
|
+
const transition = React23__namespace.useMemo(() => ({
|
|
6534
6580
|
...defaultTransition,
|
|
6535
6581
|
duration,
|
|
6536
6582
|
delay: delay + stagger
|
|
6537
6583
|
}), [duration, delay, stagger]);
|
|
6538
|
-
const viewportConfig =
|
|
6584
|
+
const viewportConfig = React23__namespace.useMemo(() => ({
|
|
6539
6585
|
once: shouldTriggerOnce,
|
|
6540
6586
|
amount: threshold,
|
|
6541
6587
|
...viewport
|
|
@@ -6570,7 +6616,7 @@ var ScrollReveal = React25__namespace.forwardRef(
|
|
|
6570
6616
|
}
|
|
6571
6617
|
);
|
|
6572
6618
|
ScrollReveal.displayName = "ScrollReveal";
|
|
6573
|
-
var ScrollRevealContainer =
|
|
6619
|
+
var ScrollRevealContainer = React23__namespace.forwardRef(
|
|
6574
6620
|
({
|
|
6575
6621
|
children,
|
|
6576
6622
|
stagger = 0.1,
|
|
@@ -6583,7 +6629,7 @@ var ScrollRevealContainer = React25__namespace.forwardRef(
|
|
|
6583
6629
|
viewport
|
|
6584
6630
|
}, ref) => {
|
|
6585
6631
|
const shouldTriggerOnce = triggerOnce !== void 0 ? triggerOnce : once;
|
|
6586
|
-
const viewportConfig =
|
|
6632
|
+
const viewportConfig = React23__namespace.useMemo(() => ({
|
|
6587
6633
|
once: shouldTriggerOnce,
|
|
6588
6634
|
amount: threshold,
|
|
6589
6635
|
...viewport
|
|
@@ -6614,7 +6660,7 @@ var ScrollRevealContainer = React25__namespace.forwardRef(
|
|
|
6614
6660
|
}
|
|
6615
6661
|
);
|
|
6616
6662
|
ScrollRevealContainer.displayName = "ScrollRevealContainer";
|
|
6617
|
-
var ScrollRevealItem =
|
|
6663
|
+
var ScrollRevealItem = React23__namespace.forwardRef(
|
|
6618
6664
|
({
|
|
6619
6665
|
children,
|
|
6620
6666
|
direction = "up",
|
|
@@ -6625,12 +6671,12 @@ var ScrollRevealItem = React25__namespace.forwardRef(
|
|
|
6625
6671
|
style,
|
|
6626
6672
|
id
|
|
6627
6673
|
}, ref) => {
|
|
6628
|
-
const animationVariants =
|
|
6674
|
+
const animationVariants = React23__namespace.useMemo(() => {
|
|
6629
6675
|
if (variants)
|
|
6630
6676
|
return variants;
|
|
6631
6677
|
return createDefaultVariants(direction, distance);
|
|
6632
6678
|
}, [direction, distance, variants]);
|
|
6633
|
-
const transition =
|
|
6679
|
+
const transition = React23__namespace.useMemo(() => ({
|
|
6634
6680
|
...defaultTransition,
|
|
6635
6681
|
duration
|
|
6636
6682
|
}), [duration]);
|
|
@@ -6746,7 +6792,7 @@ var separatorVariants = classVarianceAuthority.cva(
|
|
|
6746
6792
|
}
|
|
6747
6793
|
}
|
|
6748
6794
|
);
|
|
6749
|
-
var Separator3 =
|
|
6795
|
+
var Separator3 = React23__namespace.forwardRef(
|
|
6750
6796
|
({
|
|
6751
6797
|
className,
|
|
6752
6798
|
orientation = "horizontal",
|
|
@@ -6789,7 +6835,7 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
6789
6835
|
}
|
|
6790
6836
|
}
|
|
6791
6837
|
);
|
|
6792
|
-
var Toggle =
|
|
6838
|
+
var Toggle = React23__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6793
6839
|
TogglePrimitive__namespace.Root,
|
|
6794
6840
|
{
|
|
6795
6841
|
ref,
|
|
@@ -6825,7 +6871,7 @@ var tooltipVariants = classVarianceAuthority.cva(
|
|
|
6825
6871
|
);
|
|
6826
6872
|
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
6827
6873
|
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
6828
|
-
var TooltipArrow =
|
|
6874
|
+
var TooltipArrow = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6829
6875
|
TooltipPrimitive__namespace.Arrow,
|
|
6830
6876
|
{
|
|
6831
6877
|
ref,
|
|
@@ -6834,7 +6880,7 @@ var TooltipArrow = React25__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
6834
6880
|
}
|
|
6835
6881
|
));
|
|
6836
6882
|
TooltipArrow.displayName = TooltipPrimitive__namespace.Arrow.displayName;
|
|
6837
|
-
var TooltipContent =
|
|
6883
|
+
var TooltipContent = React23__namespace.forwardRef(({ className, variant, size, showArrow = false, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6838
6884
|
TooltipPrimitive__namespace.Content,
|
|
6839
6885
|
{
|
|
6840
6886
|
ref,
|
|
@@ -6848,7 +6894,7 @@ var TooltipContent = React25__namespace.forwardRef(({ className, variant, size,
|
|
|
6848
6894
|
}
|
|
6849
6895
|
));
|
|
6850
6896
|
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
6851
|
-
var SimpleTooltip =
|
|
6897
|
+
var SimpleTooltip = React23__namespace.forwardRef(
|
|
6852
6898
|
({
|
|
6853
6899
|
children,
|
|
6854
6900
|
content,
|
|
@@ -6936,7 +6982,7 @@ var ColorPicker2 = ({ onColorSelect }) => {
|
|
|
6936
6982
|
color
|
|
6937
6983
|
)) });
|
|
6938
6984
|
};
|
|
6939
|
-
var SimpleEditor =
|
|
6985
|
+
var SimpleEditor = React23__namespace.default.forwardRef(
|
|
6940
6986
|
({
|
|
6941
6987
|
value = "",
|
|
6942
6988
|
onChange,
|
|
@@ -6949,13 +6995,13 @@ var SimpleEditor = React25__namespace.default.forwardRef(
|
|
|
6949
6995
|
showPreview = true,
|
|
6950
6996
|
...props
|
|
6951
6997
|
}, ref) => {
|
|
6952
|
-
const [content, setContent] =
|
|
6953
|
-
const [isPreview, setIsPreview] =
|
|
6954
|
-
const [sourceContent, setSourceContent] =
|
|
6955
|
-
|
|
6956
|
-
const editorRef =
|
|
6957
|
-
const sourceRef =
|
|
6958
|
-
const [formatState, setFormatState] =
|
|
6998
|
+
const [content, setContent] = React23.useState(value);
|
|
6999
|
+
const [isPreview, setIsPreview] = React23.useState(false);
|
|
7000
|
+
const [sourceContent, setSourceContent] = React23.useState(value);
|
|
7001
|
+
React23.useState(null);
|
|
7002
|
+
const editorRef = React23__namespace.default.useRef(null);
|
|
7003
|
+
const sourceRef = React23__namespace.default.useRef(null);
|
|
7004
|
+
const [formatState, setFormatState] = React23.useState({
|
|
6959
7005
|
bold: false,
|
|
6960
7006
|
italic: false,
|
|
6961
7007
|
underline: false,
|
|
@@ -6969,18 +7015,18 @@ var SimpleEditor = React25__namespace.default.forwardRef(
|
|
|
6969
7015
|
quote: false,
|
|
6970
7016
|
code: false
|
|
6971
7017
|
});
|
|
6972
|
-
const updateContent =
|
|
7018
|
+
const updateContent = React23.useCallback((newContent) => {
|
|
6973
7019
|
setContent(newContent);
|
|
6974
7020
|
onChange?.(newContent);
|
|
6975
7021
|
}, [onChange]);
|
|
6976
|
-
const saveSelection =
|
|
7022
|
+
const saveSelection = React23.useCallback(() => {
|
|
6977
7023
|
const selection2 = window.getSelection();
|
|
6978
7024
|
if (selection2 && selection2.rangeCount > 0) {
|
|
6979
7025
|
return selection2.getRangeAt(0);
|
|
6980
7026
|
}
|
|
6981
7027
|
return null;
|
|
6982
7028
|
}, []);
|
|
6983
|
-
|
|
7029
|
+
React23.useCallback((range) => {
|
|
6984
7030
|
if (!range)
|
|
6985
7031
|
return;
|
|
6986
7032
|
const selection2 = window.getSelection();
|
|
@@ -6989,7 +7035,7 @@ var SimpleEditor = React25__namespace.default.forwardRef(
|
|
|
6989
7035
|
selection2.addRange(range);
|
|
6990
7036
|
}
|
|
6991
7037
|
}, []);
|
|
6992
|
-
const executeCommand =
|
|
7038
|
+
const executeCommand = React23.useCallback((command, value2) => {
|
|
6993
7039
|
if (disabled)
|
|
6994
7040
|
return;
|
|
6995
7041
|
if (editorRef.current) {
|
|
@@ -7022,11 +7068,11 @@ var SimpleEditor = React25__namespace.default.forwardRef(
|
|
|
7022
7068
|
editorRef.current.focus();
|
|
7023
7069
|
}
|
|
7024
7070
|
}, [disabled, saveSelection, updateContent]);
|
|
7025
|
-
const handleInput =
|
|
7071
|
+
const handleInput = React23.useCallback((e) => {
|
|
7026
7072
|
const newContent = e.currentTarget.innerHTML;
|
|
7027
7073
|
updateContent(newContent);
|
|
7028
7074
|
}, [updateContent]);
|
|
7029
|
-
const handleKeyDown =
|
|
7075
|
+
const handleKeyDown = React23.useCallback((e) => {
|
|
7030
7076
|
if (e.ctrlKey || e.metaKey) {
|
|
7031
7077
|
switch (e.key) {
|
|
7032
7078
|
case "b":
|
|
@@ -7056,22 +7102,22 @@ var SimpleEditor = React25__namespace.default.forwardRef(
|
|
|
7056
7102
|
executeCommand("insertHTML", " ");
|
|
7057
7103
|
}
|
|
7058
7104
|
}, [executeCommand]);
|
|
7059
|
-
const insertLink =
|
|
7105
|
+
const insertLink = React23.useCallback(() => {
|
|
7060
7106
|
const url = prompt("Enter URL:");
|
|
7061
7107
|
if (url) {
|
|
7062
7108
|
executeCommand("createLink", url);
|
|
7063
7109
|
}
|
|
7064
7110
|
}, [executeCommand]);
|
|
7065
|
-
const insertImage =
|
|
7111
|
+
const insertImage = React23.useCallback(() => {
|
|
7066
7112
|
const url = prompt("Enter image URL:");
|
|
7067
7113
|
if (url) {
|
|
7068
7114
|
executeCommand("insertImage", url);
|
|
7069
7115
|
}
|
|
7070
7116
|
}, [executeCommand]);
|
|
7071
|
-
const formatHeading =
|
|
7117
|
+
const formatHeading = React23.useCallback((level) => {
|
|
7072
7118
|
executeCommand("formatBlock", `<h${level}>`);
|
|
7073
7119
|
}, [executeCommand]);
|
|
7074
|
-
const setTextColor =
|
|
7120
|
+
const setTextColor = React23.useCallback((color) => {
|
|
7075
7121
|
const selection2 = window.getSelection();
|
|
7076
7122
|
if (selection2 && selection2.rangeCount > 0) {
|
|
7077
7123
|
const range = selection2.getRangeAt(0);
|
|
@@ -7088,12 +7134,12 @@ var SimpleEditor = React25__namespace.default.forwardRef(
|
|
|
7088
7134
|
}
|
|
7089
7135
|
}
|
|
7090
7136
|
}, [executeCommand, updateContent]);
|
|
7091
|
-
|
|
7137
|
+
React23__namespace.default.useEffect(() => {
|
|
7092
7138
|
if (editorRef.current && content && content !== editorRef.current.innerHTML) {
|
|
7093
7139
|
editorRef.current.innerHTML = content;
|
|
7094
7140
|
}
|
|
7095
7141
|
}, [content]);
|
|
7096
|
-
|
|
7142
|
+
React23__namespace.default.useEffect(() => {
|
|
7097
7143
|
if (value !== void 0 && value !== content) {
|
|
7098
7144
|
setContent(value);
|
|
7099
7145
|
setSourceContent(value);
|
|
@@ -7455,8 +7501,8 @@ var SimpleEditor = React25__namespace.default.forwardRef(
|
|
|
7455
7501
|
);
|
|
7456
7502
|
SimpleEditor.displayName = "SimpleEditor";
|
|
7457
7503
|
var CharacterCount = ({ content }) => {
|
|
7458
|
-
const [count, setCount] =
|
|
7459
|
-
|
|
7504
|
+
const [count, setCount] = React23.useState(0);
|
|
7505
|
+
React23.useEffect(() => {
|
|
7460
7506
|
const getPlainText = (html) => {
|
|
7461
7507
|
const div = document.createElement("div");
|
|
7462
7508
|
div.innerHTML = html;
|
|
@@ -7503,7 +7549,7 @@ var skeletonVariants = classVarianceAuthority.cva(
|
|
|
7503
7549
|
}
|
|
7504
7550
|
}
|
|
7505
7551
|
);
|
|
7506
|
-
var Skeleton =
|
|
7552
|
+
var Skeleton = React23__namespace.forwardRef(
|
|
7507
7553
|
({
|
|
7508
7554
|
className,
|
|
7509
7555
|
variant,
|
|
@@ -7587,7 +7633,7 @@ var Skeleton = React25__namespace.forwardRef(
|
|
|
7587
7633
|
}
|
|
7588
7634
|
);
|
|
7589
7635
|
Skeleton.displayName = "Skeleton";
|
|
7590
|
-
var SkeletonText =
|
|
7636
|
+
var SkeletonText = React23__namespace.forwardRef(
|
|
7591
7637
|
({
|
|
7592
7638
|
className,
|
|
7593
7639
|
lines = 3,
|
|
@@ -7628,7 +7674,7 @@ var SkeletonText = React25__namespace.forwardRef(
|
|
|
7628
7674
|
}
|
|
7629
7675
|
);
|
|
7630
7676
|
SkeletonText.displayName = "SkeletonText";
|
|
7631
|
-
var SkeletonAvatar =
|
|
7677
|
+
var SkeletonAvatar = React23__namespace.forwardRef(
|
|
7632
7678
|
({
|
|
7633
7679
|
className,
|
|
7634
7680
|
size = "2.5rem",
|
|
@@ -7654,7 +7700,7 @@ var SkeletonAvatar = React25__namespace.forwardRef(
|
|
|
7654
7700
|
}
|
|
7655
7701
|
);
|
|
7656
7702
|
SkeletonAvatar.displayName = "SkeletonAvatar";
|
|
7657
|
-
var SkeletonCard =
|
|
7703
|
+
var SkeletonCard = React23__namespace.forwardRef(
|
|
7658
7704
|
({
|
|
7659
7705
|
className,
|
|
7660
7706
|
showHeader = true,
|
|
@@ -7728,11 +7774,11 @@ var SkeletonCard = React25__namespace.forwardRef(
|
|
|
7728
7774
|
}
|
|
7729
7775
|
);
|
|
7730
7776
|
SkeletonCard.displayName = "SkeletonCard";
|
|
7731
|
-
var SwipeableCard =
|
|
7777
|
+
var SwipeableCard = React23__namespace.forwardRef(
|
|
7732
7778
|
({ className, children, onSwipeLeft, onSwipeRight, threshold = 100, disabled = false, ...props }, ref) => {
|
|
7733
|
-
const [startX, setStartX] =
|
|
7734
|
-
const [currentX, setCurrentX] =
|
|
7735
|
-
const [isSwiping, setIsSwiping] =
|
|
7779
|
+
const [startX, setStartX] = React23__namespace.useState(0);
|
|
7780
|
+
const [currentX, setCurrentX] = React23__namespace.useState(0);
|
|
7781
|
+
const [isSwiping, setIsSwiping] = React23__namespace.useState(false);
|
|
7736
7782
|
const handleTouchStart = (e) => {
|
|
7737
7783
|
if (disabled)
|
|
7738
7784
|
return;
|
|
@@ -7827,7 +7873,7 @@ var switchThumbVariants = classVarianceAuthority.cva(
|
|
|
7827
7873
|
}
|
|
7828
7874
|
}
|
|
7829
7875
|
);
|
|
7830
|
-
var Switch =
|
|
7876
|
+
var Switch = React23__namespace.forwardRef(({
|
|
7831
7877
|
className,
|
|
7832
7878
|
size,
|
|
7833
7879
|
variant,
|
|
@@ -7838,7 +7884,7 @@ var Switch = React25__namespace.forwardRef(({
|
|
|
7838
7884
|
"aria-describedby": ariaDescribedBy,
|
|
7839
7885
|
...props
|
|
7840
7886
|
}, ref) => {
|
|
7841
|
-
const reactId =
|
|
7887
|
+
const reactId = React23__namespace.useId();
|
|
7842
7888
|
const descriptionId = description ? `${reactId}-description` : void 0;
|
|
7843
7889
|
const describedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
|
|
7844
7890
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "moonui-theme inline-flex items-center gap-2", children: [
|
|
@@ -7866,7 +7912,7 @@ var Switch = React25__namespace.forwardRef(({
|
|
|
7866
7912
|
] });
|
|
7867
7913
|
});
|
|
7868
7914
|
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
7869
|
-
var TagsInput =
|
|
7915
|
+
var TagsInput = React23__namespace.forwardRef(
|
|
7870
7916
|
({
|
|
7871
7917
|
value = [],
|
|
7872
7918
|
onChange,
|
|
@@ -7879,12 +7925,12 @@ var TagsInput = React25__namespace.forwardRef(
|
|
|
7879
7925
|
disabled,
|
|
7880
7926
|
...props
|
|
7881
7927
|
}, ref) => {
|
|
7882
|
-
const [inputValue, setInputValue] =
|
|
7883
|
-
const [error, setError] =
|
|
7884
|
-
const innerInputRef =
|
|
7885
|
-
|
|
7886
|
-
const tagButtonRefs =
|
|
7887
|
-
const errorId =
|
|
7928
|
+
const [inputValue, setInputValue] = React23__namespace.useState("");
|
|
7929
|
+
const [error, setError] = React23__namespace.useState("");
|
|
7930
|
+
const innerInputRef = React23__namespace.useRef(null);
|
|
7931
|
+
React23__namespace.useImperativeHandle(ref, () => innerInputRef.current);
|
|
7932
|
+
const tagButtonRefs = React23__namespace.useRef([]);
|
|
7933
|
+
const errorId = React23__namespace.useId();
|
|
7888
7934
|
const focusTag = (index) => {
|
|
7889
7935
|
if (value.length === 0)
|
|
7890
7936
|
return;
|
|
@@ -8061,7 +8107,7 @@ var textareaVariants = classVarianceAuthority.cva(
|
|
|
8061
8107
|
}
|
|
8062
8108
|
}
|
|
8063
8109
|
);
|
|
8064
|
-
var Textarea =
|
|
8110
|
+
var Textarea = React23__namespace.forwardRef(
|
|
8065
8111
|
({
|
|
8066
8112
|
className,
|
|
8067
8113
|
wrapperClassName,
|
|
@@ -8081,12 +8127,12 @@ var Textarea = React25__namespace.forwardRef(
|
|
|
8081
8127
|
onChange,
|
|
8082
8128
|
...props
|
|
8083
8129
|
}, ref) => {
|
|
8084
|
-
const reactId =
|
|
8130
|
+
const reactId = React23__namespace.useId();
|
|
8085
8131
|
const fieldId = props.id || reactId;
|
|
8086
|
-
const textareaRef =
|
|
8087
|
-
const [internalValue, setInternalValue] =
|
|
8088
|
-
|
|
8089
|
-
const adjustHeight =
|
|
8132
|
+
const textareaRef = React23__namespace.useRef(null);
|
|
8133
|
+
const [internalValue, setInternalValue] = React23__namespace.useState(value || defaultValue || "");
|
|
8134
|
+
React23__namespace.useImperativeHandle(ref, () => textareaRef.current);
|
|
8135
|
+
const adjustHeight = React23__namespace.useCallback(() => {
|
|
8090
8136
|
const textarea = textareaRef.current;
|
|
8091
8137
|
if (!textarea || !autoResize)
|
|
8092
8138
|
return;
|
|
@@ -8100,10 +8146,10 @@ var Textarea = React25__namespace.forwardRef(
|
|
|
8100
8146
|
textarea.style.overflowY = "hidden";
|
|
8101
8147
|
}
|
|
8102
8148
|
}, [autoResize, maxHeight]);
|
|
8103
|
-
|
|
8149
|
+
React23__namespace.useEffect(() => {
|
|
8104
8150
|
adjustHeight();
|
|
8105
8151
|
}, [internalValue, adjustHeight]);
|
|
8106
|
-
|
|
8152
|
+
React23__namespace.useEffect(() => {
|
|
8107
8153
|
if (value !== void 0) {
|
|
8108
8154
|
setInternalValue(value);
|
|
8109
8155
|
}
|
|
@@ -8169,7 +8215,7 @@ var Textarea = React25__namespace.forwardRef(
|
|
|
8169
8215
|
);
|
|
8170
8216
|
Textarea.displayName = "Textarea";
|
|
8171
8217
|
var ToastProvider = ToastPrimitives__namespace.Provider;
|
|
8172
|
-
var ToastViewport =
|
|
8218
|
+
var ToastViewport = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8173
8219
|
ToastPrimitives__namespace.Viewport,
|
|
8174
8220
|
{
|
|
8175
8221
|
ref,
|
|
@@ -8198,7 +8244,7 @@ var toastVariants = classVarianceAuthority.cva(
|
|
|
8198
8244
|
}
|
|
8199
8245
|
}
|
|
8200
8246
|
);
|
|
8201
|
-
var Toast =
|
|
8247
|
+
var Toast = React23__namespace.forwardRef(({ className, variant, ...props }, ref) => {
|
|
8202
8248
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8203
8249
|
ToastPrimitives__namespace.Root,
|
|
8204
8250
|
{
|
|
@@ -8209,7 +8255,7 @@ var Toast = React25__namespace.forwardRef(({ className, variant, ...props }, ref
|
|
|
8209
8255
|
);
|
|
8210
8256
|
});
|
|
8211
8257
|
Toast.displayName = ToastPrimitives__namespace.Root.displayName;
|
|
8212
|
-
var ToastAction =
|
|
8258
|
+
var ToastAction = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8213
8259
|
ToastPrimitives__namespace.Action,
|
|
8214
8260
|
{
|
|
8215
8261
|
ref,
|
|
@@ -8221,7 +8267,7 @@ var ToastAction = React25__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
8221
8267
|
}
|
|
8222
8268
|
));
|
|
8223
8269
|
ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
|
|
8224
|
-
var ToastClose =
|
|
8270
|
+
var ToastClose = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8225
8271
|
ToastPrimitives__namespace.Close,
|
|
8226
8272
|
{
|
|
8227
8273
|
ref,
|
|
@@ -8238,7 +8284,7 @@ var ToastClose = React25__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
8238
8284
|
}
|
|
8239
8285
|
));
|
|
8240
8286
|
ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
|
|
8241
|
-
var ToastTitle =
|
|
8287
|
+
var ToastTitle = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8242
8288
|
ToastPrimitives__namespace.Title,
|
|
8243
8289
|
{
|
|
8244
8290
|
ref,
|
|
@@ -8247,7 +8293,7 @@ var ToastTitle = React25__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
8247
8293
|
}
|
|
8248
8294
|
));
|
|
8249
8295
|
ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
|
|
8250
|
-
var ToastDescription =
|
|
8296
|
+
var ToastDescription = React23__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8251
8297
|
ToastPrimitives__namespace.Description,
|
|
8252
8298
|
{
|
|
8253
8299
|
ref,
|
|
@@ -8355,8 +8401,8 @@ function toast({ ...props }) {
|
|
|
8355
8401
|
};
|
|
8356
8402
|
}
|
|
8357
8403
|
function useToast() {
|
|
8358
|
-
const [state, setState] =
|
|
8359
|
-
|
|
8404
|
+
const [state, setState] = React23__namespace.useState(memoryState);
|
|
8405
|
+
React23__namespace.useEffect(() => {
|
|
8360
8406
|
listeners.push(setState);
|
|
8361
8407
|
return () => {
|
|
8362
8408
|
const index = listeners.indexOf(setState);
|
|
@@ -8409,7 +8455,7 @@ var kbdVariants = classVarianceAuthority.cva(
|
|
|
8409
8455
|
}
|
|
8410
8456
|
}
|
|
8411
8457
|
);
|
|
8412
|
-
var Kbd =
|
|
8458
|
+
var Kbd = React23__namespace.forwardRef(
|
|
8413
8459
|
({ className, size, children, ...props }, ref) => {
|
|
8414
8460
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8415
8461
|
"kbd",
|
|
@@ -8446,7 +8492,7 @@ var iconSizeMap = {
|
|
|
8446
8492
|
md: "h-5 w-5",
|
|
8447
8493
|
lg: "h-6 w-6"
|
|
8448
8494
|
};
|
|
8449
|
-
var Rating =
|
|
8495
|
+
var Rating = React23__namespace.forwardRef(
|
|
8450
8496
|
({
|
|
8451
8497
|
className,
|
|
8452
8498
|
value,
|
|
@@ -8464,11 +8510,11 @@ var Rating = React25__namespace.forwardRef(
|
|
|
8464
8510
|
const iconSizeClass = iconSizeMap[resolvedSize];
|
|
8465
8511
|
const step = precision === "half" ? 0.5 : 1;
|
|
8466
8512
|
const isControlled = value !== void 0;
|
|
8467
|
-
const [internalValue, setInternalValue] =
|
|
8513
|
+
const [internalValue, setInternalValue] = React23__namespace.useState(defaultValue ?? 0);
|
|
8468
8514
|
const currentValue = isControlled ? value ?? 0 : internalValue;
|
|
8469
|
-
const [hoverValue, setHoverValue] =
|
|
8515
|
+
const [hoverValue, setHoverValue] = React23__namespace.useState(null);
|
|
8470
8516
|
const displayValue = hoverValue !== null ? hoverValue : currentValue;
|
|
8471
|
-
const commit =
|
|
8517
|
+
const commit = React23__namespace.useCallback(
|
|
8472
8518
|
(next) => {
|
|
8473
8519
|
if (readOnly)
|
|
8474
8520
|
return;
|
|
@@ -8478,7 +8524,7 @@ var Rating = React25__namespace.forwardRef(
|
|
|
8478
8524
|
},
|
|
8479
8525
|
[readOnly, isControlled, onValueChange]
|
|
8480
8526
|
);
|
|
8481
|
-
const handleKeyDown =
|
|
8527
|
+
const handleKeyDown = React23__namespace.useCallback(
|
|
8482
8528
|
(event) => {
|
|
8483
8529
|
if (readOnly)
|
|
8484
8530
|
return;
|
|
@@ -8507,9 +8553,9 @@ var Rating = React25__namespace.forwardRef(
|
|
|
8507
8553
|
[readOnly, max, currentValue, step, commit]
|
|
8508
8554
|
);
|
|
8509
8555
|
const renderIcon = (filled) => {
|
|
8510
|
-
if (
|
|
8556
|
+
if (React23__namespace.isValidElement(icon)) {
|
|
8511
8557
|
const element = icon;
|
|
8512
|
-
return
|
|
8558
|
+
return React23__namespace.cloneElement(element, {
|
|
8513
8559
|
className: cn(
|
|
8514
8560
|
iconSizeClass,
|
|
8515
8561
|
"shrink-0",
|
|
@@ -8643,7 +8689,7 @@ var dotSizeMap = {
|
|
|
8643
8689
|
lg: "h-2 w-2",
|
|
8644
8690
|
xl: "h-2.5 w-2.5"
|
|
8645
8691
|
};
|
|
8646
|
-
var Spinner =
|
|
8692
|
+
var Spinner = React23__namespace.forwardRef(
|
|
8647
8693
|
({ className, size, variant = "default", label = "Loading", ...props }, ref) => {
|
|
8648
8694
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8649
8695
|
"div",
|
|
@@ -8722,15 +8768,15 @@ var buttonGroupVariants = classVarianceAuthority.cva(
|
|
|
8722
8768
|
}
|
|
8723
8769
|
}
|
|
8724
8770
|
);
|
|
8725
|
-
var ButtonGroup =
|
|
8771
|
+
var ButtonGroup = React23__namespace.forwardRef(
|
|
8726
8772
|
({ className, orientation, attached, size, variant, children, ...props }, ref) => {
|
|
8727
8773
|
const shouldPropagate = size !== void 0 || variant !== void 0;
|
|
8728
|
-
const enhancedChildren = shouldPropagate ?
|
|
8729
|
-
if (!
|
|
8774
|
+
const enhancedChildren = shouldPropagate ? React23__namespace.Children.map(children, (child) => {
|
|
8775
|
+
if (!React23__namespace.isValidElement(child) || child.type !== Button) {
|
|
8730
8776
|
return child;
|
|
8731
8777
|
}
|
|
8732
8778
|
const childProps = child.props;
|
|
8733
|
-
return
|
|
8779
|
+
return React23__namespace.cloneElement(child, {
|
|
8734
8780
|
size: childProps.size ?? size,
|
|
8735
8781
|
variant: childProps.variant ?? variant
|
|
8736
8782
|
});
|
|
@@ -8748,11 +8794,11 @@ var ButtonGroup = React25__namespace.forwardRef(
|
|
|
8748
8794
|
}
|
|
8749
8795
|
);
|
|
8750
8796
|
ButtonGroup.displayName = "ButtonGroup";
|
|
8751
|
-
var ToggleGroupContext =
|
|
8797
|
+
var ToggleGroupContext = React23__namespace.createContext({
|
|
8752
8798
|
size: "default",
|
|
8753
8799
|
variant: "default"
|
|
8754
8800
|
});
|
|
8755
|
-
var ToggleGroup =
|
|
8801
|
+
var ToggleGroup = React23__namespace.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8756
8802
|
ToggleGroupPrimitive__namespace.Root,
|
|
8757
8803
|
{
|
|
8758
8804
|
ref,
|
|
@@ -8769,8 +8815,8 @@ var ToggleGroup = React25__namespace.forwardRef(({ className, variant, size, chi
|
|
|
8769
8815
|
}
|
|
8770
8816
|
));
|
|
8771
8817
|
ToggleGroup.displayName = "ToggleGroup";
|
|
8772
|
-
var ToggleGroupItem =
|
|
8773
|
-
const context =
|
|
8818
|
+
var ToggleGroupItem = React23__namespace.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
8819
|
+
const context = React23__namespace.useContext(ToggleGroupContext);
|
|
8774
8820
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8775
8821
|
ToggleGroupPrimitive__namespace.Item,
|
|
8776
8822
|
{
|
|
@@ -8977,6 +9023,7 @@ exports.MoonUIDialogClose = DialogClose;
|
|
|
8977
9023
|
exports.MoonUIDialogContent = DialogContent;
|
|
8978
9024
|
exports.MoonUIDialogDescription = DialogDescription;
|
|
8979
9025
|
exports.MoonUIDialogFooter = DialogFooter;
|
|
9026
|
+
exports.MoonUIDialogForm = DialogForm;
|
|
8980
9027
|
exports.MoonUIDialogHeader = DialogHeader;
|
|
8981
9028
|
exports.MoonUIDialogTitle = DialogTitle;
|
|
8982
9029
|
exports.MoonUIDialogTrigger = DialogTrigger;
|
|
@@ -9020,7 +9067,12 @@ exports.MoonUIPaginationNext = PaginationNext;
|
|
|
9020
9067
|
exports.MoonUIPaginationPrevious = PaginationPrevious;
|
|
9021
9068
|
exports.MoonUIPhoneInput = PhoneInput;
|
|
9022
9069
|
exports.MoonUIPopover = Popover;
|
|
9070
|
+
exports.MoonUIPopoverAnchor = PopoverAnchor;
|
|
9071
|
+
exports.MoonUIPopoverClose = PopoverClose;
|
|
9023
9072
|
exports.MoonUIPopoverContent = PopoverContent;
|
|
9073
|
+
exports.MoonUIPopoverFooter = PopoverFooter;
|
|
9074
|
+
exports.MoonUIPopoverHeader = PopoverHeader;
|
|
9075
|
+
exports.MoonUIPopoverSeparator = PopoverSeparator;
|
|
9024
9076
|
exports.MoonUIPopoverTrigger = PopoverTrigger;
|
|
9025
9077
|
exports.MoonUIProBadge = ProBadge;
|
|
9026
9078
|
exports.MoonUIProComponentWrapper = ProComponentWrapper;
|
|
@@ -9049,6 +9101,7 @@ exports.MoonUISelectValue = SelectValue;
|
|
|
9049
9101
|
exports.MoonUISeparator = Separator3;
|
|
9050
9102
|
exports.MoonUISimpleColorPicker = SimpleColorPicker;
|
|
9051
9103
|
exports.MoonUISimpleEditor = SimpleEditor;
|
|
9104
|
+
exports.MoonUISimpleTooltip = SimpleTooltip;
|
|
9052
9105
|
exports.MoonUISkeleton = Skeleton;
|
|
9053
9106
|
exports.MoonUISkeletonAvatar = SkeletonAvatar;
|
|
9054
9107
|
exports.MoonUISkeletonCard = SkeletonCard;
|
|
@@ -9083,6 +9136,7 @@ exports.MoonUIToggle = Toggle;
|
|
|
9083
9136
|
exports.MoonUIToggleGroup = ToggleGroup;
|
|
9084
9137
|
exports.MoonUIToggleGroupItem = ToggleGroupItem;
|
|
9085
9138
|
exports.MoonUITooltip = Tooltip;
|
|
9139
|
+
exports.MoonUITooltipArrow = TooltipArrow;
|
|
9086
9140
|
exports.MoonUITooltipContent = TooltipContent;
|
|
9087
9141
|
exports.MoonUITooltipProvider = TooltipProvider;
|
|
9088
9142
|
exports.MoonUITooltipTrigger = TooltipTrigger;
|
|
@@ -9187,10 +9241,12 @@ exports.moonUICarouselItemVariants = carouselItemVariants;
|
|
|
9187
9241
|
exports.moonUICreateSortableHeader = createSortableHeader;
|
|
9188
9242
|
exports.moonUIInputOTPSlotVariants = inputOTPSlotVariants;
|
|
9189
9243
|
exports.moonUIKbdVariants = kbdVariants;
|
|
9244
|
+
exports.moonUIPopoverContentVariants = popoverContentVariants;
|
|
9190
9245
|
exports.moonUIRatingVariants = ratingVariants;
|
|
9191
9246
|
exports.moonUISkeletonVariants = skeletonVariants;
|
|
9192
9247
|
exports.moonUISpinnerVariants = spinnerVariants;
|
|
9193
9248
|
exports.moonUIToggleVariants = toggleVariants;
|
|
9249
|
+
exports.moonUITooltipVariants = tooltipVariants;
|
|
9194
9250
|
exports.popoverContentVariants = popoverContentVariants;
|
|
9195
9251
|
exports.progressVariants = progressVariants;
|
|
9196
9252
|
exports.ratingVariants = ratingVariants;
|