@mlw-packages/react-components 1.9.8 → 1.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +8 -28
- package/dist/index.d.mts +45 -31
- package/dist/index.d.ts +45 -31
- package/dist/index.js +735 -780
- package/dist/index.mjs +429 -470
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
|
-
var
|
|
4
|
+
var React32 = require('react');
|
|
5
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
7
|
var clsx = require('clsx');
|
|
@@ -29,7 +29,6 @@ var HoverCardPrimitive = require('@radix-ui/react-hover-card');
|
|
|
29
29
|
var inputOtp = require('input-otp');
|
|
30
30
|
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
31
31
|
var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
32
|
-
var useEmblaCarousel = require('embla-carousel-react');
|
|
33
32
|
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
34
33
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
35
34
|
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
@@ -65,7 +64,7 @@ function _interopNamespace(e) {
|
|
|
65
64
|
return Object.freeze(n);
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
var
|
|
67
|
+
var React32__namespace = /*#__PURE__*/_interopNamespace(React32);
|
|
69
68
|
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
|
|
70
69
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
71
70
|
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
@@ -79,7 +78,6 @@ var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(Collapsible
|
|
|
79
78
|
var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
|
|
80
79
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
81
80
|
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
82
|
-
var useEmblaCarousel__default = /*#__PURE__*/_interopDefault(useEmblaCarousel);
|
|
83
81
|
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
84
82
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
85
83
|
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
@@ -564,7 +562,7 @@ function cn(...inputs) {
|
|
|
564
562
|
var AlertDialogBase = AlertDialogPrimitive__namespace.Root;
|
|
565
563
|
var AlertDialogTriggerBase = AlertDialogPrimitive__namespace.Trigger;
|
|
566
564
|
var AlertDialogPortalBase = AlertDialogPrimitive__namespace.Portal;
|
|
567
|
-
var AlertDialogOverlayBase =
|
|
565
|
+
var AlertDialogOverlayBase = React32__namespace.forwardRef(({ className, testid = "alertdialog-overlay", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
568
566
|
AlertDialogPrimitive__namespace.Overlay,
|
|
569
567
|
{
|
|
570
568
|
className: cn(
|
|
@@ -577,7 +575,7 @@ var AlertDialogOverlayBase = React33__namespace.forwardRef(({ className, testid
|
|
|
577
575
|
}
|
|
578
576
|
));
|
|
579
577
|
AlertDialogOverlayBase.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
580
|
-
var AlertDialogContentBase =
|
|
578
|
+
var AlertDialogContentBase = React32__namespace.forwardRef(({ className, testid = "alertdialog-content", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortalBase, { children: [
|
|
581
579
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlayBase, {}),
|
|
582
580
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
583
581
|
AlertDialogPrimitive__namespace.Content,
|
|
@@ -621,7 +619,7 @@ var AlertDialogFooterBase = ({
|
|
|
621
619
|
}
|
|
622
620
|
);
|
|
623
621
|
AlertDialogFooterBase.displayName = "AlertDialogFooterBase";
|
|
624
|
-
var AlertDialogTitleBase =
|
|
622
|
+
var AlertDialogTitleBase = React32__namespace.forwardRef(({ className, testid = "alertdialog-title", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
625
623
|
AlertDialogPrimitive__namespace.Title,
|
|
626
624
|
{
|
|
627
625
|
ref,
|
|
@@ -631,7 +629,7 @@ var AlertDialogTitleBase = React33__namespace.forwardRef(({ className, testid =
|
|
|
631
629
|
}
|
|
632
630
|
));
|
|
633
631
|
AlertDialogTitleBase.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
634
|
-
var AlertDialogDescriptionBase =
|
|
632
|
+
var AlertDialogDescriptionBase = React32__namespace.forwardRef(({ className, testid = "alertdialog-description", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
635
633
|
AlertDialogPrimitive__namespace.Description,
|
|
636
634
|
{
|
|
637
635
|
ref,
|
|
@@ -641,7 +639,7 @@ var AlertDialogDescriptionBase = React33__namespace.forwardRef(({ className, tes
|
|
|
641
639
|
}
|
|
642
640
|
));
|
|
643
641
|
AlertDialogDescriptionBase.displayName = AlertDialogPrimitive__namespace.Description.displayName;
|
|
644
|
-
var AlertDialogActionBase =
|
|
642
|
+
var AlertDialogActionBase = React32__namespace.forwardRef(({ className, testid = "alertdialog-action", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
645
643
|
AlertDialogPrimitive__namespace.Action,
|
|
646
644
|
{
|
|
647
645
|
ref,
|
|
@@ -651,7 +649,7 @@ var AlertDialogActionBase = React33__namespace.forwardRef(({ className, testid =
|
|
|
651
649
|
}
|
|
652
650
|
));
|
|
653
651
|
AlertDialogActionBase.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
654
|
-
var AlertDialogCancelBase =
|
|
652
|
+
var AlertDialogCancelBase = React32__namespace.forwardRef(({ className, testid = "alertdialog-cancel", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
655
653
|
AlertDialogPrimitive__namespace.Cancel,
|
|
656
654
|
{
|
|
657
655
|
ref,
|
|
@@ -665,7 +663,7 @@ var DialogBase = DialogPrimitive__namespace.Root;
|
|
|
665
663
|
var DialogTriggerBase = DialogPrimitive__namespace.Trigger;
|
|
666
664
|
var DialogPortalBase = DialogPrimitive__namespace.Portal;
|
|
667
665
|
var DialogCloseBase = DialogPrimitive__namespace.Close;
|
|
668
|
-
var DialogOverlayBase =
|
|
666
|
+
var DialogOverlayBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "dialog-overlay", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
669
667
|
DialogPrimitive__namespace.Overlay,
|
|
670
668
|
{
|
|
671
669
|
ref,
|
|
@@ -678,7 +676,7 @@ var DialogOverlayBase = React33__namespace.forwardRef(({ className, testid: data
|
|
|
678
676
|
}
|
|
679
677
|
));
|
|
680
678
|
DialogOverlayBase.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
681
|
-
var DialogContentBase =
|
|
679
|
+
var DialogContentBase = React32__namespace.forwardRef(
|
|
682
680
|
({ className, children, testid: dataTestId = "dialog-content", ...props }, ref) => {
|
|
683
681
|
const userOnWheel = props.onWheel;
|
|
684
682
|
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortalBase, { children: [
|
|
@@ -707,7 +705,7 @@ var DialogContentBase = React33__namespace.forwardRef(
|
|
|
707
705
|
}
|
|
708
706
|
);
|
|
709
707
|
DialogContentBase.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
710
|
-
var DialogHeaderBase =
|
|
708
|
+
var DialogHeaderBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "dialog-header", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
711
709
|
"div",
|
|
712
710
|
{
|
|
713
711
|
ref,
|
|
@@ -720,7 +718,7 @@ var DialogHeaderBase = React33__namespace.forwardRef(({ className, testid: dataT
|
|
|
720
718
|
}
|
|
721
719
|
));
|
|
722
720
|
DialogHeaderBase.displayName = "DialogHeader";
|
|
723
|
-
var DialogFooterBase =
|
|
721
|
+
var DialogFooterBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "dialog-footer", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
724
722
|
"div",
|
|
725
723
|
{
|
|
726
724
|
ref,
|
|
@@ -733,7 +731,7 @@ var DialogFooterBase = React33__namespace.forwardRef(({ className, testid: dataT
|
|
|
733
731
|
}
|
|
734
732
|
));
|
|
735
733
|
DialogFooterBase.displayName = "DialogFooter";
|
|
736
|
-
var DialogTitleBase =
|
|
734
|
+
var DialogTitleBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "dialog-title", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
737
735
|
DialogPrimitive__namespace.Title,
|
|
738
736
|
{
|
|
739
737
|
ref,
|
|
@@ -746,7 +744,7 @@ var DialogTitleBase = React33__namespace.forwardRef(({ className, testid: dataTe
|
|
|
746
744
|
}
|
|
747
745
|
));
|
|
748
746
|
DialogTitleBase.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
749
|
-
var DialogDescriptionBase =
|
|
747
|
+
var DialogDescriptionBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "dialog-description", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
750
748
|
DialogPrimitive__namespace.Description,
|
|
751
749
|
{
|
|
752
750
|
ref,
|
|
@@ -804,9 +802,9 @@ var dotVariants = classVarianceAuthority.cva(
|
|
|
804
802
|
}
|
|
805
803
|
}
|
|
806
804
|
);
|
|
807
|
-
var LoadingBase =
|
|
805
|
+
var LoadingBase = React32__namespace.forwardRef(
|
|
808
806
|
({ className, size, message, overlay = false, variant = "spinner", ...props }, ref) => {
|
|
809
|
-
|
|
807
|
+
React32__namespace.useEffect(() => {
|
|
810
808
|
const style = document.createElement("style");
|
|
811
809
|
style.textContent = `
|
|
812
810
|
@keyframes dotBounce {
|
|
@@ -922,7 +920,7 @@ var LoadingBase = React33__namespace.forwardRef(
|
|
|
922
920
|
}
|
|
923
921
|
);
|
|
924
922
|
LoadingBase.displayName = "LoadingBase";
|
|
925
|
-
var LabelBase =
|
|
923
|
+
var LabelBase = React32__namespace.forwardRef(
|
|
926
924
|
({ className, asChild = false, testid = "label-base", ...props }, ref) => {
|
|
927
925
|
const Comp = asChild ? reactSlot.Slot : "label";
|
|
928
926
|
return /* @__PURE__ */ jsxRuntime.jsx(reactLabel.Label, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -941,7 +939,7 @@ var LabelBase = React33__namespace.forwardRef(
|
|
|
941
939
|
);
|
|
942
940
|
LabelBase.displayName = "LabelBase";
|
|
943
941
|
var LabelBase_default = LabelBase;
|
|
944
|
-
var ProgressBase =
|
|
942
|
+
var ProgressBase = React32__namespace.forwardRef(
|
|
945
943
|
({
|
|
946
944
|
className,
|
|
947
945
|
value: rawValue,
|
|
@@ -1123,7 +1121,7 @@ var ProgressPanelsBase = ({
|
|
|
1123
1121
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full gap-1 rounded-lg overflow-hidden", children: steps.map((step, idx) => {
|
|
1124
1122
|
const isActive = idx === currentStep;
|
|
1125
1123
|
const isLast = idx === steps.length - 1;
|
|
1126
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1124
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React32__namespace.Fragment, { children: [
|
|
1127
1125
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1128
1126
|
"div",
|
|
1129
1127
|
{
|
|
@@ -1315,10 +1313,10 @@ var toast = {
|
|
|
1315
1313
|
};
|
|
1316
1314
|
var MOBILE_BREAKPOINT = 768;
|
|
1317
1315
|
function useIsMobile() {
|
|
1318
|
-
const [isMobile, setIsMobile] =
|
|
1316
|
+
const [isMobile, setIsMobile] = React32__namespace.useState(
|
|
1319
1317
|
void 0
|
|
1320
1318
|
);
|
|
1321
|
-
|
|
1319
|
+
React32__namespace.useEffect(() => {
|
|
1322
1320
|
const checkIsMobile = () => {
|
|
1323
1321
|
const isTouch = window.matchMedia("(pointer: coarse)").matches || navigator.maxTouchPoints > 0;
|
|
1324
1322
|
const isSmallScreen = window.innerWidth < MOBILE_BREAKPOINT;
|
|
@@ -1343,12 +1341,12 @@ var isTouchDevice = () => {
|
|
|
1343
1341
|
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints !== void 0;
|
|
1344
1342
|
};
|
|
1345
1343
|
var useDrag = (options = {}) => {
|
|
1346
|
-
const [isDragging, setIsDragging] =
|
|
1347
|
-
const [positions, setPositions] =
|
|
1348
|
-
const dragStartPos =
|
|
1349
|
-
const dragId =
|
|
1350
|
-
const isTouch =
|
|
1351
|
-
const handleDragStart =
|
|
1344
|
+
const [isDragging, setIsDragging] = React32.useState(null);
|
|
1345
|
+
const [positions, setPositions] = React32.useState({});
|
|
1346
|
+
const dragStartPos = React32.useRef(null);
|
|
1347
|
+
const dragId = React32.useRef(null);
|
|
1348
|
+
const isTouch = React32.useRef(isTouchDevice());
|
|
1349
|
+
const handleDragStart = React32.useCallback(
|
|
1352
1350
|
(id, e) => {
|
|
1353
1351
|
const isTouchEvent = "touches" in e;
|
|
1354
1352
|
const clientX = isTouchEvent ? e.touches[0].clientX : e.clientX;
|
|
@@ -1367,7 +1365,7 @@ var useDrag = (options = {}) => {
|
|
|
1367
1365
|
},
|
|
1368
1366
|
[positions, options]
|
|
1369
1367
|
);
|
|
1370
|
-
const handleMouseMove =
|
|
1368
|
+
const handleMouseMove = React32.useCallback(
|
|
1371
1369
|
(e) => {
|
|
1372
1370
|
if (!isDragging || !dragStartPos.current || !dragId.current) return;
|
|
1373
1371
|
const isTouchEvent = "touches" in e;
|
|
@@ -1398,7 +1396,7 @@ var useDrag = (options = {}) => {
|
|
|
1398
1396
|
},
|
|
1399
1397
|
[isDragging, options]
|
|
1400
1398
|
);
|
|
1401
|
-
const handleMouseUp =
|
|
1399
|
+
const handleMouseUp = React32.useCallback(() => {
|
|
1402
1400
|
if (dragId.current) {
|
|
1403
1401
|
options.onDragEnd?.(dragId.current);
|
|
1404
1402
|
}
|
|
@@ -1406,7 +1404,7 @@ var useDrag = (options = {}) => {
|
|
|
1406
1404
|
dragStartPos.current = null;
|
|
1407
1405
|
dragId.current = null;
|
|
1408
1406
|
}, [options]);
|
|
1409
|
-
|
|
1407
|
+
React32.useEffect(() => {
|
|
1410
1408
|
if (isDragging) {
|
|
1411
1409
|
const isTouchDev = isTouch.current;
|
|
1412
1410
|
if (isTouchDev) {
|
|
@@ -1431,19 +1429,19 @@ var useDrag = (options = {}) => {
|
|
|
1431
1429
|
};
|
|
1432
1430
|
}
|
|
1433
1431
|
}, [isDragging, handleMouseMove, handleMouseUp]);
|
|
1434
|
-
const setPosition =
|
|
1432
|
+
const setPosition = React32.useCallback((id, position) => {
|
|
1435
1433
|
setPositions((prev) => ({
|
|
1436
1434
|
...prev,
|
|
1437
1435
|
[id]: position
|
|
1438
1436
|
}));
|
|
1439
1437
|
}, []);
|
|
1440
|
-
const getPosition =
|
|
1438
|
+
const getPosition = React32.useCallback(
|
|
1441
1439
|
(id) => {
|
|
1442
1440
|
return positions[id] || { top: 0, left: 0 };
|
|
1443
1441
|
},
|
|
1444
1442
|
[positions]
|
|
1445
1443
|
);
|
|
1446
|
-
const isElementDragging =
|
|
1444
|
+
const isElementDragging = React32.useCallback(
|
|
1447
1445
|
(id) => {
|
|
1448
1446
|
return isDragging === id;
|
|
1449
1447
|
},
|
|
@@ -1461,11 +1459,11 @@ var TOOLTIP_DELAY_DURATION = 600;
|
|
|
1461
1459
|
var TOOLTIP_SIDE_OFFSET = 8;
|
|
1462
1460
|
var TOOLTIP_MOBILE_DELAY = Infinity;
|
|
1463
1461
|
var TooltipProviderBase = TooltipPrimitive__namespace.Provider;
|
|
1464
|
-
var TooltipClickContext =
|
|
1462
|
+
var TooltipClickContext = React32__namespace.createContext({});
|
|
1465
1463
|
var TooltipBase = ({ children, delayDuration = TOOLTIP_DELAY_DURATION, ...props }) => {
|
|
1466
|
-
const [open, setOpen] =
|
|
1464
|
+
const [open, setOpen] = React32__namespace.useState(false);
|
|
1467
1465
|
const isMobile = useIsMobile();
|
|
1468
|
-
|
|
1466
|
+
React32__namespace.useEffect(() => {
|
|
1469
1467
|
if (!open || !isMobile) return;
|
|
1470
1468
|
const handleClickOutside = (e) => {
|
|
1471
1469
|
const target = e.target;
|
|
@@ -1478,7 +1476,7 @@ var TooltipBase = ({ children, delayDuration = TOOLTIP_DELAY_DURATION, ...props
|
|
|
1478
1476
|
document.addEventListener("pointerdown", handleClickOutside);
|
|
1479
1477
|
return () => document.removeEventListener("pointerdown", handleClickOutside);
|
|
1480
1478
|
}, [open, isMobile]);
|
|
1481
|
-
const contextValue =
|
|
1479
|
+
const contextValue = React32__namespace.useMemo(() => ({ setOpen, isMobile }), [isMobile]);
|
|
1482
1480
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipClickContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1483
1481
|
TooltipPrimitive__namespace.Root,
|
|
1484
1482
|
{
|
|
@@ -1491,9 +1489,9 @@ var TooltipBase = ({ children, delayDuration = TOOLTIP_DELAY_DURATION, ...props
|
|
|
1491
1489
|
) });
|
|
1492
1490
|
};
|
|
1493
1491
|
TooltipBase.displayName = "TooltipBase";
|
|
1494
|
-
var TooltipTriggerBase =
|
|
1495
|
-
const { setOpen, isMobile } =
|
|
1496
|
-
const handlePointerDown =
|
|
1492
|
+
var TooltipTriggerBase = React32__namespace.forwardRef(({ children, onPointerDown, onClick: propOnClick, ...props }, ref) => {
|
|
1493
|
+
const { setOpen, isMobile } = React32__namespace.useContext(TooltipClickContext);
|
|
1494
|
+
const handlePointerDown = React32__namespace.useCallback(
|
|
1497
1495
|
(e) => {
|
|
1498
1496
|
if (onPointerDown) {
|
|
1499
1497
|
onPointerDown(e);
|
|
@@ -1501,7 +1499,7 @@ var TooltipTriggerBase = React33__namespace.forwardRef(({ children, onPointerDow
|
|
|
1501
1499
|
},
|
|
1502
1500
|
[onPointerDown]
|
|
1503
1501
|
);
|
|
1504
|
-
const onClick =
|
|
1502
|
+
const onClick = React32__namespace.useCallback(
|
|
1505
1503
|
(e) => {
|
|
1506
1504
|
if (propOnClick) {
|
|
1507
1505
|
propOnClick(e);
|
|
@@ -1516,7 +1514,7 @@ var TooltipTriggerBase = React33__namespace.forwardRef(({ children, onPointerDow
|
|
|
1516
1514
|
},
|
|
1517
1515
|
[onPointerDown, isMobile, setOpen, propOnClick]
|
|
1518
1516
|
);
|
|
1519
|
-
const preventDefaultOnMobile =
|
|
1517
|
+
const preventDefaultOnMobile = React32__namespace.useCallback(
|
|
1520
1518
|
(e) => {
|
|
1521
1519
|
if (isMobile) {
|
|
1522
1520
|
e.preventDefault();
|
|
@@ -1542,7 +1540,7 @@ var TooltipTriggerBase = React33__namespace.forwardRef(({ children, onPointerDow
|
|
|
1542
1540
|
);
|
|
1543
1541
|
});
|
|
1544
1542
|
TooltipTriggerBase.displayName = "TooltipTriggerBase";
|
|
1545
|
-
var TooltipContentBase =
|
|
1543
|
+
var TooltipContentBase = React32__namespace.forwardRef(
|
|
1546
1544
|
({ className, sideOffset = TOOLTIP_SIDE_OFFSET, onPointerDown, ...props }, ref) => {
|
|
1547
1545
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1548
1546
|
TooltipPrimitive__namespace.Content,
|
|
@@ -1583,7 +1581,7 @@ var DestructiveDialog = ({
|
|
|
1583
1581
|
triggerContent,
|
|
1584
1582
|
className
|
|
1585
1583
|
}) => {
|
|
1586
|
-
const triggerEl =
|
|
1584
|
+
const triggerEl = React32__namespace.isValidElement(children) ? /* @__PURE__ */ jsxRuntime.jsx(AlertDialogTriggerBase, { asChild: true, children }) : /* @__PURE__ */ jsxRuntime.jsx(AlertDialogTriggerBase, { children: /* @__PURE__ */ jsxRuntime.jsx(ButtonBase, { variant: "destructive", children: triggerContent ?? "Excluir" }) });
|
|
1587
1585
|
return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogBase, { children: [
|
|
1588
1586
|
triggerEl,
|
|
1589
1587
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1630,7 +1628,7 @@ var ModalBase = DialogPrimitive__namespace.Root;
|
|
|
1630
1628
|
var ModalTriggerBase = DialogPrimitive__namespace.Trigger;
|
|
1631
1629
|
var ModalPortalBase = DialogPrimitive__namespace.Portal;
|
|
1632
1630
|
var ModalCloseBase = DialogPrimitive__namespace.Close;
|
|
1633
|
-
var ModalOverlayBase =
|
|
1631
|
+
var ModalOverlayBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "modal-overlay", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1634
1632
|
DialogPrimitive__namespace.Overlay,
|
|
1635
1633
|
{
|
|
1636
1634
|
ref,
|
|
@@ -1643,7 +1641,7 @@ var ModalOverlayBase = React33__namespace.forwardRef(({ className, testid: dataT
|
|
|
1643
1641
|
}
|
|
1644
1642
|
));
|
|
1645
1643
|
ModalOverlayBase.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
1646
|
-
var ModalContentBase =
|
|
1644
|
+
var ModalContentBase = React32__namespace.forwardRef(
|
|
1647
1645
|
({
|
|
1648
1646
|
className,
|
|
1649
1647
|
children,
|
|
@@ -1707,7 +1705,7 @@ var ModalContentBase = React33__namespace.forwardRef(
|
|
|
1707
1705
|
}
|
|
1708
1706
|
);
|
|
1709
1707
|
ModalContentBase.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
1710
|
-
var ModalHeaderBase =
|
|
1708
|
+
var ModalHeaderBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "modal-header", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1711
1709
|
"div",
|
|
1712
1710
|
{
|
|
1713
1711
|
ref,
|
|
@@ -1720,7 +1718,7 @@ var ModalHeaderBase = React33__namespace.forwardRef(({ className, testid: dataTe
|
|
|
1720
1718
|
}
|
|
1721
1719
|
));
|
|
1722
1720
|
ModalHeaderBase.displayName = "ModalHeader";
|
|
1723
|
-
var ModalFooterBase =
|
|
1721
|
+
var ModalFooterBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "modal-footer", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1724
1722
|
"div",
|
|
1725
1723
|
{
|
|
1726
1724
|
ref,
|
|
@@ -1733,7 +1731,7 @@ var ModalFooterBase = React33__namespace.forwardRef(({ className, testid: dataTe
|
|
|
1733
1731
|
}
|
|
1734
1732
|
));
|
|
1735
1733
|
ModalFooterBase.displayName = "ModalFooter";
|
|
1736
|
-
var ModalTitleBase =
|
|
1734
|
+
var ModalTitleBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "modal-title", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1737
1735
|
DialogPrimitive__namespace.Title,
|
|
1738
1736
|
{
|
|
1739
1737
|
ref,
|
|
@@ -1746,7 +1744,7 @@ var ModalTitleBase = React33__namespace.forwardRef(({ className, testid: dataTes
|
|
|
1746
1744
|
}
|
|
1747
1745
|
));
|
|
1748
1746
|
ModalTitleBase.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
1749
|
-
var ModalDescriptionBase =
|
|
1747
|
+
var ModalDescriptionBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "modal-description", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1750
1748
|
DialogPrimitive__namespace.Description,
|
|
1751
1749
|
{
|
|
1752
1750
|
ref,
|
|
@@ -1783,7 +1781,7 @@ var buttonVariantsBase = classVarianceAuthority.cva(
|
|
|
1783
1781
|
}
|
|
1784
1782
|
}
|
|
1785
1783
|
);
|
|
1786
|
-
var ButtonBase =
|
|
1784
|
+
var ButtonBase = React32__namespace.default.forwardRef(
|
|
1787
1785
|
({
|
|
1788
1786
|
className,
|
|
1789
1787
|
variant,
|
|
@@ -1835,7 +1833,7 @@ var ButtonBase = React33__namespace.default.forwardRef(
|
|
|
1835
1833
|
}
|
|
1836
1834
|
);
|
|
1837
1835
|
ButtonBase.displayName = "Button";
|
|
1838
|
-
var ButtonGroupBase =
|
|
1836
|
+
var ButtonGroupBase = React32__namespace.default.forwardRef(
|
|
1839
1837
|
({ className, children, orientation = "horizontal", ...props }, ref) => {
|
|
1840
1838
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1841
1839
|
"div",
|
|
@@ -1848,17 +1846,17 @@ var ButtonGroupBase = React33__namespace.default.forwardRef(
|
|
|
1848
1846
|
className
|
|
1849
1847
|
),
|
|
1850
1848
|
...props,
|
|
1851
|
-
children:
|
|
1852
|
-
if (!
|
|
1849
|
+
children: React32__namespace.default.Children.map(children, (child, index) => {
|
|
1850
|
+
if (!React32__namespace.default.isValidElement(child)) return child;
|
|
1853
1851
|
const typedChild = child;
|
|
1854
|
-
return
|
|
1852
|
+
return React32__namespace.default.cloneElement(typedChild, {
|
|
1855
1853
|
className: cn(
|
|
1856
1854
|
typedChild.props.className,
|
|
1857
1855
|
"rounded-none",
|
|
1858
1856
|
index === 0 && orientation === "horizontal" && "rounded-l-md",
|
|
1859
1857
|
index === 0 && orientation === "vertical" && "rounded-t-md",
|
|
1860
|
-
index ===
|
|
1861
|
-
index ===
|
|
1858
|
+
index === React32__namespace.default.Children.count(children) - 1 && orientation === "horizontal" && "rounded-r-md",
|
|
1859
|
+
index === React32__namespace.default.Children.count(children) - 1 && orientation === "vertical" && "rounded-b-md"
|
|
1862
1860
|
)
|
|
1863
1861
|
});
|
|
1864
1862
|
})
|
|
@@ -1872,7 +1870,7 @@ var ErrorMessage = ({ error }) => {
|
|
|
1872
1870
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: error });
|
|
1873
1871
|
};
|
|
1874
1872
|
var ErrorMessage_default = ErrorMessage;
|
|
1875
|
-
var InputBase =
|
|
1873
|
+
var InputBase = React32__namespace.forwardRef(
|
|
1876
1874
|
({
|
|
1877
1875
|
className,
|
|
1878
1876
|
type = "text",
|
|
@@ -1893,7 +1891,8 @@ var InputBase = React33__namespace.forwardRef(
|
|
|
1893
1891
|
className: cn(
|
|
1894
1892
|
"flex items-center rounded-md transition h-9 bg-background overflow-hidden",
|
|
1895
1893
|
type !== "file" && "border border-input",
|
|
1896
|
-
error ? "border-destructive focus:ring-1 focus:ring-destructive" : "border-input"
|
|
1894
|
+
error ? "border-destructive focus:ring-1 focus:ring-destructive" : "border-input",
|
|
1895
|
+
className
|
|
1897
1896
|
),
|
|
1898
1897
|
children: [
|
|
1899
1898
|
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
@@ -1921,7 +1920,66 @@ var InputBase = React33__namespace.forwardRef(
|
|
|
1921
1920
|
}
|
|
1922
1921
|
);
|
|
1923
1922
|
InputBase.displayName = "Input";
|
|
1924
|
-
var
|
|
1923
|
+
var DebouncedInput = React32.forwardRef(
|
|
1924
|
+
({
|
|
1925
|
+
value: initialValue,
|
|
1926
|
+
onChange,
|
|
1927
|
+
debounce: debounce2 = 500,
|
|
1928
|
+
label,
|
|
1929
|
+
labelClassname,
|
|
1930
|
+
leftIcon,
|
|
1931
|
+
rightIcon,
|
|
1932
|
+
showLoadingIndicator = false,
|
|
1933
|
+
className,
|
|
1934
|
+
error,
|
|
1935
|
+
...props
|
|
1936
|
+
}, ref) => {
|
|
1937
|
+
const [value, setValue] = React32.useState(initialValue);
|
|
1938
|
+
const [isDebouncing, setIsDebouncing] = React32.useState(false);
|
|
1939
|
+
React32.useEffect(() => {
|
|
1940
|
+
setValue(initialValue);
|
|
1941
|
+
}, [initialValue]);
|
|
1942
|
+
React32.useEffect(() => {
|
|
1943
|
+
if (value === initialValue) {
|
|
1944
|
+
setIsDebouncing(false);
|
|
1945
|
+
return;
|
|
1946
|
+
}
|
|
1947
|
+
setIsDebouncing(true);
|
|
1948
|
+
const timeout = setTimeout(() => {
|
|
1949
|
+
onChange(value);
|
|
1950
|
+
setIsDebouncing(false);
|
|
1951
|
+
}, debounce2);
|
|
1952
|
+
return () => {
|
|
1953
|
+
clearTimeout(timeout);
|
|
1954
|
+
setIsDebouncing(false);
|
|
1955
|
+
};
|
|
1956
|
+
}, [debounce2, initialValue, onChange, value]);
|
|
1957
|
+
const renderRightIcon = () => {
|
|
1958
|
+
if (showLoadingIndicator && isDebouncing) {
|
|
1959
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.CircleNotchIcon, { className: "h-4 w-4 animate-spin text-muted-foreground" });
|
|
1960
|
+
}
|
|
1961
|
+
return rightIcon;
|
|
1962
|
+
};
|
|
1963
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1964
|
+
InputBase,
|
|
1965
|
+
{
|
|
1966
|
+
...props,
|
|
1967
|
+
ref,
|
|
1968
|
+
label,
|
|
1969
|
+
labelClassname,
|
|
1970
|
+
leftIcon,
|
|
1971
|
+
rightIcon: renderRightIcon(),
|
|
1972
|
+
className: cn("transition-all duration-200", className),
|
|
1973
|
+
value,
|
|
1974
|
+
onChange: (e) => setValue(e.target.value),
|
|
1975
|
+
error
|
|
1976
|
+
}
|
|
1977
|
+
);
|
|
1978
|
+
}
|
|
1979
|
+
);
|
|
1980
|
+
DebouncedInput.displayName = "DebouncedInput";
|
|
1981
|
+
var DebouncedInput_default = DebouncedInput;
|
|
1982
|
+
var CommandBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "command-base", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1925
1983
|
cmdk.Command,
|
|
1926
1984
|
{
|
|
1927
1985
|
ref,
|
|
@@ -1954,7 +2012,7 @@ var CommandDialogBase = ({ children, open, ...props }) => {
|
|
|
1954
2012
|
"command-dialog"
|
|
1955
2013
|
) }) }) });
|
|
1956
2014
|
};
|
|
1957
|
-
var CommandInputBase =
|
|
2015
|
+
var CommandInputBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "command-input", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1958
2016
|
"div",
|
|
1959
2017
|
{
|
|
1960
2018
|
className: "flex items-center border-b px-3 border-border",
|
|
@@ -1977,33 +2035,51 @@ var CommandInputBase = React33__namespace.forwardRef(({ className, testid: dataT
|
|
|
1977
2035
|
}
|
|
1978
2036
|
));
|
|
1979
2037
|
CommandInputBase.displayName = cmdk.Command.Input.displayName;
|
|
1980
|
-
var CommandDebouncedInputBase =
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2038
|
+
var CommandDebouncedInputBase = React32__namespace.forwardRef(
|
|
2039
|
+
({
|
|
2040
|
+
className,
|
|
2041
|
+
testid: dataTestId = "command-input",
|
|
2042
|
+
onValueChange,
|
|
2043
|
+
value: propValue,
|
|
2044
|
+
onChange: propOnChange,
|
|
2045
|
+
search,
|
|
2046
|
+
onSearch,
|
|
2047
|
+
...props
|
|
2048
|
+
}, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2049
|
+
"div",
|
|
2050
|
+
{
|
|
2051
|
+
className: "flex items-center px-3 border-border border-b",
|
|
2052
|
+
"cmdk-input-wrapper": "",
|
|
2053
|
+
children: [
|
|
2054
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 text-primary" }),
|
|
2055
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2056
|
+
DebouncedInput_default,
|
|
2057
|
+
{
|
|
2058
|
+
ref,
|
|
2059
|
+
className: cn(
|
|
2060
|
+
"flex h-10 border-transparent w-full rounded-md bg-transparent text-sm outline-none text-primary placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
2061
|
+
className
|
|
2062
|
+
),
|
|
2063
|
+
"data-testid": dataTestId,
|
|
2064
|
+
"cmdk-input": "",
|
|
2065
|
+
value: search ?? propValue ?? "",
|
|
2066
|
+
...props,
|
|
2067
|
+
onChange: (value) => {
|
|
2068
|
+
onValueChange?.(value);
|
|
2069
|
+
propOnChange?.(value);
|
|
2070
|
+
onSearch?.(value);
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
)
|
|
2074
|
+
]
|
|
2075
|
+
}
|
|
2076
|
+
)
|
|
2077
|
+
);
|
|
2078
|
+
CommandDebouncedInputBase.displayName = "CommandDebouncedInputBase";
|
|
2079
|
+
var CommandListBase = React32__namespace.forwardRef(
|
|
2004
2080
|
({ className, testid: dataTestId = "command-list", onEndReached, ...props }, ref) => {
|
|
2005
|
-
const listRef =
|
|
2006
|
-
|
|
2081
|
+
const listRef = React32__namespace.useRef(null);
|
|
2082
|
+
React32__namespace.useEffect(() => {
|
|
2007
2083
|
const element = listRef.current;
|
|
2008
2084
|
if (!element) return;
|
|
2009
2085
|
const handleWheel = (e) => {
|
|
@@ -2066,7 +2142,7 @@ var CommandListBase = React33__namespace.forwardRef(
|
|
|
2066
2142
|
element.removeEventListener("touchstart", handleTouchStart);
|
|
2067
2143
|
};
|
|
2068
2144
|
}, [onEndReached]);
|
|
2069
|
-
const combinedRef =
|
|
2145
|
+
const combinedRef = React32__namespace.useCallback(
|
|
2070
2146
|
(node) => {
|
|
2071
2147
|
listRef.current = node;
|
|
2072
2148
|
if (typeof ref === "function") {
|
|
@@ -2102,7 +2178,7 @@ var CommandListBase = React33__namespace.forwardRef(
|
|
|
2102
2178
|
}
|
|
2103
2179
|
);
|
|
2104
2180
|
CommandListBase.displayName = cmdk.Command.List.displayName;
|
|
2105
|
-
var CommandEmptyBase =
|
|
2181
|
+
var CommandEmptyBase = React32__namespace.forwardRef(({ testid: dataTestId = "command-empty", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2106
2182
|
cmdk.Command.Empty,
|
|
2107
2183
|
{
|
|
2108
2184
|
ref,
|
|
@@ -2112,7 +2188,7 @@ var CommandEmptyBase = React33__namespace.forwardRef(({ testid: dataTestId = "co
|
|
|
2112
2188
|
}
|
|
2113
2189
|
));
|
|
2114
2190
|
CommandEmptyBase.displayName = cmdk.Command.Empty.displayName;
|
|
2115
|
-
var CommandGroupBase =
|
|
2191
|
+
var CommandGroupBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "command-group", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2116
2192
|
cmdk.Command.Group,
|
|
2117
2193
|
{
|
|
2118
2194
|
ref,
|
|
@@ -2125,7 +2201,7 @@ var CommandGroupBase = React33__namespace.forwardRef(({ className, testid: dataT
|
|
|
2125
2201
|
}
|
|
2126
2202
|
));
|
|
2127
2203
|
CommandGroupBase.displayName = cmdk.Command.Group.displayName;
|
|
2128
|
-
var CommandSeparatorBase =
|
|
2204
|
+
var CommandSeparatorBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "command-separator", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2129
2205
|
cmdk.Command.Separator,
|
|
2130
2206
|
{
|
|
2131
2207
|
ref,
|
|
@@ -2135,7 +2211,7 @@ var CommandSeparatorBase = React33__namespace.forwardRef(({ className, testid: d
|
|
|
2135
2211
|
}
|
|
2136
2212
|
));
|
|
2137
2213
|
CommandSeparatorBase.displayName = cmdk.Command.Separator.displayName;
|
|
2138
|
-
var CommandItemBase =
|
|
2214
|
+
var CommandItemBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "command-item", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2139
2215
|
cmdk.Command.Item,
|
|
2140
2216
|
{
|
|
2141
2217
|
ref,
|
|
@@ -2167,7 +2243,7 @@ CommandShortcutBase.displayName = "CommandShortcut";
|
|
|
2167
2243
|
var PopoverBase = PopoverPrimitive__namespace.Root;
|
|
2168
2244
|
var PopoverTriggerBase = PopoverPrimitive__namespace.Trigger;
|
|
2169
2245
|
var PopoverAnchorBase = PopoverPrimitive__namespace.Anchor;
|
|
2170
|
-
var PopoverContentBase =
|
|
2246
|
+
var PopoverContentBase = React32__namespace.forwardRef(
|
|
2171
2247
|
({
|
|
2172
2248
|
className,
|
|
2173
2249
|
align = "center",
|
|
@@ -2251,7 +2327,7 @@ function ComboboxBase({
|
|
|
2251
2327
|
hasSelected = false,
|
|
2252
2328
|
hideClear = false
|
|
2253
2329
|
}) {
|
|
2254
|
-
const [open, setOpen] =
|
|
2330
|
+
const [open, setOpen] = React32.useState(false);
|
|
2255
2331
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2256
2332
|
"div",
|
|
2257
2333
|
{
|
|
@@ -2414,7 +2490,7 @@ function Combobox({
|
|
|
2414
2490
|
hideClear = false
|
|
2415
2491
|
}) {
|
|
2416
2492
|
const selectedItem = items.find((item) => item.value === selected);
|
|
2417
|
-
const renderSelected =
|
|
2493
|
+
const renderSelected = React32.useMemo(() => {
|
|
2418
2494
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2419
2495
|
"span",
|
|
2420
2496
|
{
|
|
@@ -2428,17 +2504,17 @@ function Combobox({
|
|
|
2428
2504
|
}
|
|
2429
2505
|
);
|
|
2430
2506
|
}, [placeholder, selectedItem, testIds?.selected, disabled]);
|
|
2431
|
-
const checkIsSelected =
|
|
2507
|
+
const checkIsSelected = React32.useCallback(
|
|
2432
2508
|
(value) => selected == null ? false : selected == value,
|
|
2433
2509
|
[selected]
|
|
2434
2510
|
);
|
|
2435
|
-
const handleSelection =
|
|
2511
|
+
const handleSelection = React32.useCallback(
|
|
2436
2512
|
(value) => {
|
|
2437
2513
|
onChange(value === selected ? null : value);
|
|
2438
2514
|
},
|
|
2439
2515
|
[selected, onChange]
|
|
2440
2516
|
);
|
|
2441
|
-
const handleClear =
|
|
2517
|
+
const handleClear = React32.useCallback(() => {
|
|
2442
2518
|
onChange(null);
|
|
2443
2519
|
}, [onChange]);
|
|
2444
2520
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col w-full min-w-[150px]", className), children: [
|
|
@@ -2512,7 +2588,7 @@ function Badge({
|
|
|
2512
2588
|
}
|
|
2513
2589
|
);
|
|
2514
2590
|
}
|
|
2515
|
-
var MultiSelectContext =
|
|
2591
|
+
var MultiSelectContext = React32.createContext(null);
|
|
2516
2592
|
function MultiSelectBase({
|
|
2517
2593
|
children,
|
|
2518
2594
|
values,
|
|
@@ -2523,12 +2599,12 @@ function MultiSelectBase({
|
|
|
2523
2599
|
error,
|
|
2524
2600
|
initialItems
|
|
2525
2601
|
}) {
|
|
2526
|
-
const [open, setOpen] =
|
|
2527
|
-
const [internalValues, setInternalValues] =
|
|
2602
|
+
const [open, setOpen] = React32.useState(false);
|
|
2603
|
+
const [internalValues, setInternalValues] = React32.useState(
|
|
2528
2604
|
new Set(values ?? defaultValues)
|
|
2529
2605
|
);
|
|
2530
2606
|
const selectedValues = values ? new Set(values) : internalValues;
|
|
2531
|
-
const [items, setItems] =
|
|
2607
|
+
const [items, setItems] = React32.useState(() => {
|
|
2532
2608
|
if (!initialItems) return /* @__PURE__ */ new Map();
|
|
2533
2609
|
if (initialItems instanceof Map) return new Map(initialItems);
|
|
2534
2610
|
return new Map(initialItems.map((it) => [it.value, it.label]));
|
|
@@ -2547,7 +2623,7 @@ function MultiSelectBase({
|
|
|
2547
2623
|
setInternalValues(getNewSet);
|
|
2548
2624
|
onValuesChange?.([...getNewSet(selectedValues)]);
|
|
2549
2625
|
}
|
|
2550
|
-
const onItemAdded =
|
|
2626
|
+
const onItemAdded = React32.useCallback((value, label) => {
|
|
2551
2627
|
setItems((prev) => {
|
|
2552
2628
|
if (prev.get(value) === label) return prev;
|
|
2553
2629
|
return new Map(prev).set(value, label);
|
|
@@ -2622,13 +2698,13 @@ function MultiSelectValueBase({
|
|
|
2622
2698
|
...props
|
|
2623
2699
|
}) {
|
|
2624
2700
|
const { selectedValues, toggleValue, items, open } = useMultiSelectContext();
|
|
2625
|
-
const [overflowAmount, setOverflowAmount] =
|
|
2626
|
-
const valueRef =
|
|
2627
|
-
const overflowRef =
|
|
2628
|
-
const mutationObserverRef =
|
|
2629
|
-
const resizeObserverRef =
|
|
2701
|
+
const [overflowAmount, setOverflowAmount] = React32.useState(0);
|
|
2702
|
+
const valueRef = React32.useRef(null);
|
|
2703
|
+
const overflowRef = React32.useRef(null);
|
|
2704
|
+
const mutationObserverRef = React32.useRef(null);
|
|
2705
|
+
const resizeObserverRef = React32.useRef(null);
|
|
2630
2706
|
const shouldWrap = overflowBehavior === "wrap" || overflowBehavior === "wrap-when-open" && open;
|
|
2631
|
-
const checkOverflow =
|
|
2707
|
+
const checkOverflow = React32.useCallback(() => {
|
|
2632
2708
|
if (valueRef.current == null) return;
|
|
2633
2709
|
const containerElement = valueRef.current;
|
|
2634
2710
|
const overflowElement = overflowRef.current;
|
|
@@ -2649,7 +2725,7 @@ function MultiSelectValueBase({
|
|
|
2649
2725
|
}
|
|
2650
2726
|
setOverflowAmount(amount);
|
|
2651
2727
|
}, []);
|
|
2652
|
-
const handleResize =
|
|
2728
|
+
const handleResize = React32.useCallback(
|
|
2653
2729
|
(node) => {
|
|
2654
2730
|
if (node == null) {
|
|
2655
2731
|
valueRef.current = null;
|
|
@@ -2800,7 +2876,7 @@ function MultiSelectItemBase({
|
|
|
2800
2876
|
}) {
|
|
2801
2877
|
const { toggleValue, selectedValues, onItemAdded } = useMultiSelectContext();
|
|
2802
2878
|
const isSelected = selectedValues.has(value);
|
|
2803
|
-
|
|
2879
|
+
React32.useEffect(() => {
|
|
2804
2880
|
onItemAdded(value, badgeLabel ?? children);
|
|
2805
2881
|
}, [value, children, onItemAdded, badgeLabel]);
|
|
2806
2882
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2833,7 +2909,7 @@ function MultiSelectSeparatorBase(props) {
|
|
|
2833
2909
|
return /* @__PURE__ */ jsxRuntime.jsx(CommandSeparatorBase, { ...props });
|
|
2834
2910
|
}
|
|
2835
2911
|
function useMultiSelectContext() {
|
|
2836
|
-
const context =
|
|
2912
|
+
const context = React32.useContext(MultiSelectContext);
|
|
2837
2913
|
if (context == null) {
|
|
2838
2914
|
throw new Error(
|
|
2839
2915
|
"useMultiSelectContext must be used within a MultiSelectContext "
|
|
@@ -2940,7 +3016,7 @@ __toESM(require_colors2());
|
|
|
2940
3016
|
var SelectBase = SelectPrimitive__namespace.Root;
|
|
2941
3017
|
var SelectGroupBase = SelectPrimitive__namespace.Group;
|
|
2942
3018
|
var SelectValueBase = SelectPrimitive__namespace.Value;
|
|
2943
|
-
var SelectTriggerBase =
|
|
3019
|
+
var SelectTriggerBase = React32__namespace.forwardRef(({ className, children, error, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full", error && "mb-0"), children: [
|
|
2944
3020
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2945
3021
|
SelectPrimitive__namespace.Trigger,
|
|
2946
3022
|
{
|
|
@@ -2957,7 +3033,7 @@ var SelectTriggerBase = React33__namespace.forwardRef(({ className, children, er
|
|
|
2957
3033
|
error ? /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage_default, { error }) : null
|
|
2958
3034
|
] }));
|
|
2959
3035
|
SelectTriggerBase.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
2960
|
-
var SelectScrollUpButtonBase =
|
|
3036
|
+
var SelectScrollUpButtonBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2961
3037
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
2962
3038
|
{
|
|
2963
3039
|
ref,
|
|
@@ -2970,7 +3046,7 @@ var SelectScrollUpButtonBase = React33__namespace.forwardRef(({ className, ...pr
|
|
|
2970
3046
|
}
|
|
2971
3047
|
));
|
|
2972
3048
|
SelectScrollUpButtonBase.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
2973
|
-
var SelectScrollDownButtonBase =
|
|
3049
|
+
var SelectScrollDownButtonBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2974
3050
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
2975
3051
|
{
|
|
2976
3052
|
ref,
|
|
@@ -2983,7 +3059,7 @@ var SelectScrollDownButtonBase = React33__namespace.forwardRef(({ className, ...
|
|
|
2983
3059
|
}
|
|
2984
3060
|
));
|
|
2985
3061
|
SelectScrollDownButtonBase.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
2986
|
-
var SelectContentBase =
|
|
3062
|
+
var SelectContentBase = React32__namespace.forwardRef(
|
|
2987
3063
|
({
|
|
2988
3064
|
className,
|
|
2989
3065
|
children,
|
|
@@ -3034,7 +3110,7 @@ var SelectContentBase = React33__namespace.forwardRef(
|
|
|
3034
3110
|
) }) })
|
|
3035
3111
|
);
|
|
3036
3112
|
SelectContentBase.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
3037
|
-
var SelectLabelBase =
|
|
3113
|
+
var SelectLabelBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3038
3114
|
SelectPrimitive__namespace.Label,
|
|
3039
3115
|
{
|
|
3040
3116
|
ref,
|
|
@@ -3043,7 +3119,7 @@ var SelectLabelBase = React33__namespace.forwardRef(({ className, ...props }, re
|
|
|
3043
3119
|
}
|
|
3044
3120
|
));
|
|
3045
3121
|
SelectLabelBase.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
3046
|
-
var SelectItemBase =
|
|
3122
|
+
var SelectItemBase = React32__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3047
3123
|
SelectPrimitive__namespace.Item,
|
|
3048
3124
|
{
|
|
3049
3125
|
ref,
|
|
@@ -3076,7 +3152,7 @@ var SelectItemBase = React33__namespace.forwardRef(({ className, children, ...pr
|
|
|
3076
3152
|
}
|
|
3077
3153
|
));
|
|
3078
3154
|
SelectItemBase.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
3079
|
-
var SelectSeparatorBase =
|
|
3155
|
+
var SelectSeparatorBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3080
3156
|
SelectPrimitive__namespace.Separator,
|
|
3081
3157
|
{
|
|
3082
3158
|
ref,
|
|
@@ -3085,7 +3161,7 @@ var SelectSeparatorBase = React33__namespace.forwardRef(({ className, ...props }
|
|
|
3085
3161
|
}
|
|
3086
3162
|
));
|
|
3087
3163
|
SelectSeparatorBase.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
3088
|
-
var SelectEmpty =
|
|
3164
|
+
var SelectEmpty = React32__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3089
3165
|
"div",
|
|
3090
3166
|
{
|
|
3091
3167
|
ref,
|
|
@@ -3105,7 +3181,7 @@ var DropDownMenuGroupBase = DropdownMenuPrimitive__namespace.Group;
|
|
|
3105
3181
|
var DropDownMenuPortalBase = DropdownMenuPrimitive__namespace.Portal;
|
|
3106
3182
|
var DropDownMenuSubBase = DropdownMenuPrimitive__namespace.Sub;
|
|
3107
3183
|
var DropDownMenuRadioGroupBase = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
3108
|
-
var DropDownMenuSubTriggerBase =
|
|
3184
|
+
var DropDownMenuSubTriggerBase = React32__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.SubTrigger, { ref, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3109
3185
|
framerMotion.motion.span,
|
|
3110
3186
|
{
|
|
3111
3187
|
className: cn(
|
|
@@ -3122,7 +3198,7 @@ var DropDownMenuSubTriggerBase = React33__namespace.forwardRef(({ className, ins
|
|
|
3122
3198
|
}
|
|
3123
3199
|
) }));
|
|
3124
3200
|
DropDownMenuSubTriggerBase.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
3125
|
-
var DropDownMenuSubContentBase =
|
|
3201
|
+
var DropDownMenuSubContentBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3126
3202
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
3127
3203
|
{
|
|
3128
3204
|
ref,
|
|
@@ -3133,7 +3209,7 @@ var DropDownMenuSubContentBase = React33__namespace.forwardRef(({ className, ...
|
|
|
3133
3209
|
...props
|
|
3134
3210
|
}
|
|
3135
3211
|
));
|
|
3136
|
-
var DropDownMenuContentBase =
|
|
3212
|
+
var DropDownMenuContentBase = React32__namespace.forwardRef(
|
|
3137
3213
|
({
|
|
3138
3214
|
className,
|
|
3139
3215
|
sideOffset = 4,
|
|
@@ -3166,7 +3242,7 @@ var DropDownMenuContentBase = React33__namespace.forwardRef(
|
|
|
3166
3242
|
) })
|
|
3167
3243
|
);
|
|
3168
3244
|
DropDownMenuContentBase.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
3169
|
-
var DropDownMenuItemBase =
|
|
3245
|
+
var DropDownMenuItemBase = React32__namespace.forwardRef(({ className, inset, rightIcon, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3170
3246
|
DropdownMenuPrimitive__namespace.Item,
|
|
3171
3247
|
{
|
|
3172
3248
|
ref,
|
|
@@ -3183,7 +3259,7 @@ var DropDownMenuItemBase = React33__namespace.forwardRef(({ className, inset, ri
|
|
|
3183
3259
|
}
|
|
3184
3260
|
));
|
|
3185
3261
|
DropDownMenuItemBase.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
3186
|
-
var DropDownMenuCheckboxItemBase =
|
|
3262
|
+
var DropDownMenuCheckboxItemBase = React32__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3187
3263
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
3188
3264
|
{
|
|
3189
3265
|
ref,
|
|
@@ -3200,7 +3276,7 @@ var DropDownMenuCheckboxItemBase = React33__namespace.forwardRef(({ className, c
|
|
|
3200
3276
|
}
|
|
3201
3277
|
));
|
|
3202
3278
|
DropDownMenuCheckboxItemBase.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
3203
|
-
var DropDownMenuRadioItemBase =
|
|
3279
|
+
var DropDownMenuRadioItemBase = React32__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3204
3280
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
3205
3281
|
{
|
|
3206
3282
|
ref,
|
|
@@ -3216,7 +3292,7 @@ var DropDownMenuRadioItemBase = React33__namespace.forwardRef(({ className, chil
|
|
|
3216
3292
|
}
|
|
3217
3293
|
));
|
|
3218
3294
|
DropDownMenuRadioItemBase.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
3219
|
-
var DropDownMenuLabelBase =
|
|
3295
|
+
var DropDownMenuLabelBase = React32__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3220
3296
|
DropdownMenuPrimitive__namespace.Label,
|
|
3221
3297
|
{
|
|
3222
3298
|
ref,
|
|
@@ -3229,7 +3305,7 @@ var DropDownMenuLabelBase = React33__namespace.forwardRef(({ className, inset, .
|
|
|
3229
3305
|
}
|
|
3230
3306
|
));
|
|
3231
3307
|
DropDownMenuLabelBase.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
3232
|
-
var DropDownMenuSeparatorBase =
|
|
3308
|
+
var DropDownMenuSeparatorBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3233
3309
|
DropdownMenuPrimitive__namespace.Separator,
|
|
3234
3310
|
{
|
|
3235
3311
|
ref,
|
|
@@ -3255,15 +3331,15 @@ var initialState = {
|
|
|
3255
3331
|
theme: "system",
|
|
3256
3332
|
setTheme: () => null
|
|
3257
3333
|
};
|
|
3258
|
-
var ThemeProviderContext =
|
|
3334
|
+
var ThemeProviderContext = React32.createContext(initialState);
|
|
3259
3335
|
function ThemeProviderBase({
|
|
3260
3336
|
children,
|
|
3261
3337
|
defaultTheme = "system",
|
|
3262
3338
|
storageKey = "app-ui-theme",
|
|
3263
3339
|
...props
|
|
3264
3340
|
}) {
|
|
3265
|
-
const [theme, setThemeState] =
|
|
3266
|
-
|
|
3341
|
+
const [theme, setThemeState] = React32.useState(defaultTheme);
|
|
3342
|
+
React32.useEffect(() => {
|
|
3267
3343
|
const root = window.document.documentElement;
|
|
3268
3344
|
root.classList.remove(
|
|
3269
3345
|
"light",
|
|
@@ -3289,7 +3365,7 @@ function ThemeProviderBase({
|
|
|
3289
3365
|
document.body.style.color = "";
|
|
3290
3366
|
}
|
|
3291
3367
|
}, [theme]);
|
|
3292
|
-
|
|
3368
|
+
React32.useEffect(() => {
|
|
3293
3369
|
const stored = localStorage.getItem(storageKey);
|
|
3294
3370
|
if (stored) setThemeState(stored);
|
|
3295
3371
|
}, [storageKey]);
|
|
@@ -3303,7 +3379,7 @@ function ThemeProviderBase({
|
|
|
3303
3379
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeProviderContext.Provider, { ...props, value, children });
|
|
3304
3380
|
}
|
|
3305
3381
|
var useTheme = () => {
|
|
3306
|
-
const context =
|
|
3382
|
+
const context = React32.useContext(ThemeProviderContext);
|
|
3307
3383
|
if (context === void 0)
|
|
3308
3384
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
3309
3385
|
return context;
|
|
@@ -3351,10 +3427,10 @@ function ModeToggleBase({
|
|
|
3351
3427
|
className,
|
|
3352
3428
|
variant = "ghost"
|
|
3353
3429
|
}) {
|
|
3354
|
-
const [mounted, setMounted] =
|
|
3430
|
+
const [mounted, setMounted] = React32.useState(false);
|
|
3355
3431
|
const { setTheme, theme: currentTheme } = useTheme();
|
|
3356
|
-
const buttonRef =
|
|
3357
|
-
|
|
3432
|
+
const buttonRef = React32.useRef(null);
|
|
3433
|
+
React32.useEffect(() => {
|
|
3358
3434
|
setMounted(true);
|
|
3359
3435
|
}, []);
|
|
3360
3436
|
const isDark = mounted && (currentTheme?.includes("dark") || currentTheme === "system" && typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches);
|
|
@@ -3453,7 +3529,7 @@ function ModeToggleBase({
|
|
|
3453
3529
|
)
|
|
3454
3530
|
] });
|
|
3455
3531
|
}
|
|
3456
|
-
var AvatarBase =
|
|
3532
|
+
var AvatarBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3457
3533
|
AvatarPrimitive__namespace.Root,
|
|
3458
3534
|
{
|
|
3459
3535
|
ref,
|
|
@@ -3465,7 +3541,7 @@ var AvatarBase = React33__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
3465
3541
|
}
|
|
3466
3542
|
));
|
|
3467
3543
|
AvatarBase.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
3468
|
-
var AvatarImageBase =
|
|
3544
|
+
var AvatarImageBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3469
3545
|
AvatarPrimitive__namespace.Image,
|
|
3470
3546
|
{
|
|
3471
3547
|
ref,
|
|
@@ -3474,7 +3550,7 @@ var AvatarImageBase = React33__namespace.forwardRef(({ className, ...props }, re
|
|
|
3474
3550
|
}
|
|
3475
3551
|
));
|
|
3476
3552
|
AvatarImageBase.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
3477
|
-
var AvatarFallbackBase =
|
|
3553
|
+
var AvatarFallbackBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3478
3554
|
AvatarPrimitive__namespace.Fallback,
|
|
3479
3555
|
{
|
|
3480
3556
|
ref,
|
|
@@ -3540,7 +3616,7 @@ function CalendarBase({
|
|
|
3540
3616
|
);
|
|
3541
3617
|
}
|
|
3542
3618
|
CalendarBase.displayName = "Calendar";
|
|
3543
|
-
var CardBase =
|
|
3619
|
+
var CardBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "card-base", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3544
3620
|
"div",
|
|
3545
3621
|
{
|
|
3546
3622
|
ref,
|
|
@@ -3553,7 +3629,7 @@ var CardBase = React33__namespace.forwardRef(({ className, testid: dataTestId =
|
|
|
3553
3629
|
}
|
|
3554
3630
|
));
|
|
3555
3631
|
CardBase.displayName = "Card";
|
|
3556
|
-
var CardHeaderBase =
|
|
3632
|
+
var CardHeaderBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "card-header", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3557
3633
|
"div",
|
|
3558
3634
|
{
|
|
3559
3635
|
ref,
|
|
@@ -3563,7 +3639,7 @@ var CardHeaderBase = React33__namespace.forwardRef(({ className, testid: dataTes
|
|
|
3563
3639
|
}
|
|
3564
3640
|
));
|
|
3565
3641
|
CardHeaderBase.displayName = "CardHeader";
|
|
3566
|
-
var CardTitleBase =
|
|
3642
|
+
var CardTitleBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "card-title", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3567
3643
|
"div",
|
|
3568
3644
|
{
|
|
3569
3645
|
ref,
|
|
@@ -3573,7 +3649,7 @@ var CardTitleBase = React33__namespace.forwardRef(({ className, testid: dataTest
|
|
|
3573
3649
|
}
|
|
3574
3650
|
));
|
|
3575
3651
|
CardTitleBase.displayName = "CardTitle";
|
|
3576
|
-
var CardDescriptionBase =
|
|
3652
|
+
var CardDescriptionBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "card-description", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3577
3653
|
"div",
|
|
3578
3654
|
{
|
|
3579
3655
|
ref,
|
|
@@ -3583,7 +3659,7 @@ var CardDescriptionBase = React33__namespace.forwardRef(({ className, testid: da
|
|
|
3583
3659
|
}
|
|
3584
3660
|
));
|
|
3585
3661
|
CardDescriptionBase.displayName = "CardDescription";
|
|
3586
|
-
var CardContentBase =
|
|
3662
|
+
var CardContentBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "card-content", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3587
3663
|
"div",
|
|
3588
3664
|
{
|
|
3589
3665
|
ref,
|
|
@@ -3593,7 +3669,7 @@ var CardContentBase = React33__namespace.forwardRef(({ className, testid: dataTe
|
|
|
3593
3669
|
}
|
|
3594
3670
|
));
|
|
3595
3671
|
CardContentBase.displayName = "CardContent";
|
|
3596
|
-
var CardFooterBase =
|
|
3672
|
+
var CardFooterBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "card-footer", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3597
3673
|
"div",
|
|
3598
3674
|
{
|
|
3599
3675
|
ref,
|
|
@@ -3666,7 +3742,7 @@ var createImagePreview = (file) => {
|
|
|
3666
3742
|
reader.readAsDataURL(file);
|
|
3667
3743
|
});
|
|
3668
3744
|
};
|
|
3669
|
-
var FileUploader =
|
|
3745
|
+
var FileUploader = React32__namespace.forwardRef(
|
|
3670
3746
|
({
|
|
3671
3747
|
className,
|
|
3672
3748
|
accept,
|
|
@@ -3679,18 +3755,18 @@ var FileUploader = React33__namespace.forwardRef(
|
|
|
3679
3755
|
showPreview = true,
|
|
3680
3756
|
dropzoneText = "Arraste arquivos aqui ou clique para selecionar",
|
|
3681
3757
|
dropzoneSubtext,
|
|
3682
|
-
animate = true,
|
|
3758
|
+
animate: animate2 = true,
|
|
3683
3759
|
...props
|
|
3684
3760
|
}, ref) => {
|
|
3685
|
-
const [isDragging, setIsDragging] =
|
|
3686
|
-
const [files, setFiles] =
|
|
3687
|
-
const inputRef =
|
|
3688
|
-
const dragCounterRef =
|
|
3761
|
+
const [isDragging, setIsDragging] = React32__namespace.useState(false);
|
|
3762
|
+
const [files, setFiles] = React32__namespace.useState(value);
|
|
3763
|
+
const inputRef = React32__namespace.useRef(null);
|
|
3764
|
+
const dragCounterRef = React32__namespace.useRef(0);
|
|
3689
3765
|
const multiple = maxFiles > 1;
|
|
3690
|
-
|
|
3766
|
+
React32__namespace.useEffect(() => {
|
|
3691
3767
|
setFiles(value);
|
|
3692
3768
|
}, [value]);
|
|
3693
|
-
|
|
3769
|
+
React32__namespace.useEffect(() => {
|
|
3694
3770
|
return () => {
|
|
3695
3771
|
files.forEach((file) => {
|
|
3696
3772
|
if (file.preview) {
|
|
@@ -3887,7 +3963,7 @@ var FileUploader = React33__namespace.forwardRef(
|
|
|
3887
3963
|
framerMotion.motion.p,
|
|
3888
3964
|
{
|
|
3889
3965
|
className: "mb-2 text-base font-semibold text-foreground",
|
|
3890
|
-
initial:
|
|
3966
|
+
initial: animate2 ? { opacity: 0, y: -10 } : false,
|
|
3891
3967
|
animate: { opacity: 1, y: 0 },
|
|
3892
3968
|
transition: { delay: 0.1 },
|
|
3893
3969
|
children: dropzoneText
|
|
@@ -3897,7 +3973,7 @@ var FileUploader = React33__namespace.forwardRef(
|
|
|
3897
3973
|
framerMotion.motion.p,
|
|
3898
3974
|
{
|
|
3899
3975
|
className: "text-sm text-muted-foreground",
|
|
3900
|
-
initial:
|
|
3976
|
+
initial: animate2 ? { opacity: 0, y: -10 } : false,
|
|
3901
3977
|
animate: { opacity: 1, y: 0 },
|
|
3902
3978
|
transition: { delay: 0.2 },
|
|
3903
3979
|
children: defaultSubtext
|
|
@@ -3941,7 +4017,7 @@ var FileUploader = React33__namespace.forwardRef(
|
|
|
3941
4017
|
framerMotion.motion.div,
|
|
3942
4018
|
{
|
|
3943
4019
|
className: "mt-6 w-full",
|
|
3944
|
-
initial:
|
|
4020
|
+
initial: animate2 ? { opacity: 0, y: 10 } : false,
|
|
3945
4021
|
animate: { opacity: 1, y: 0 },
|
|
3946
4022
|
transition: { delay: 0.3 },
|
|
3947
4023
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -3956,7 +4032,7 @@ var FileUploader = React33__namespace.forwardRef(
|
|
|
3956
4032
|
framerMotion.motion.div,
|
|
3957
4033
|
{
|
|
3958
4034
|
layout: true,
|
|
3959
|
-
initial:
|
|
4035
|
+
initial: animate2 ? { opacity: 0, x: -20 } : false,
|
|
3960
4036
|
animate: { opacity: 1, x: 0 },
|
|
3961
4037
|
exit: {
|
|
3962
4038
|
opacity: 0,
|
|
@@ -3964,7 +4040,7 @@ var FileUploader = React33__namespace.forwardRef(
|
|
|
3964
4040
|
transition: { duration: 0.2 }
|
|
3965
4041
|
},
|
|
3966
4042
|
transition: {
|
|
3967
|
-
delay:
|
|
4043
|
+
delay: animate2 ? index * 0.05 : 0,
|
|
3968
4044
|
layout: { duration: 0.2 }
|
|
3969
4045
|
},
|
|
3970
4046
|
className: cn(
|
|
@@ -4038,12 +4114,12 @@ var FileUploader = React33__namespace.forwardRef(
|
|
|
4038
4114
|
}
|
|
4039
4115
|
);
|
|
4040
4116
|
FileUploader.displayName = "FileUploader";
|
|
4041
|
-
var CheckboxBase =
|
|
4117
|
+
var CheckboxBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "checkbox-base", checked: checkedProp, defaultChecked, onCheckedChange, ...props }, ref) => {
|
|
4042
4118
|
const isControlled = checkedProp !== void 0;
|
|
4043
|
-
const [checkedState, setCheckedState] =
|
|
4119
|
+
const [checkedState, setCheckedState] = React32__namespace.useState(
|
|
4044
4120
|
isControlled ? checkedProp : defaultChecked ?? false
|
|
4045
4121
|
);
|
|
4046
|
-
|
|
4122
|
+
React32__namespace.useEffect(() => {
|
|
4047
4123
|
if (isControlled) setCheckedState(checkedProp);
|
|
4048
4124
|
}, [checkedProp, isControlled]);
|
|
4049
4125
|
const handleCheckedChange = (next) => {
|
|
@@ -4083,11 +4159,11 @@ var CheckboxBase = React33__namespace.forwardRef(({ className, testid: dataTestI
|
|
|
4083
4159
|
);
|
|
4084
4160
|
});
|
|
4085
4161
|
CheckboxBase.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
4086
|
-
var CollapsibleBase =
|
|
4162
|
+
var CollapsibleBase = React32__namespace.forwardRef(({ ...props }, ref) => {
|
|
4087
4163
|
return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.Root, { ref, "data-slot": "collapsible", ...props });
|
|
4088
4164
|
});
|
|
4089
4165
|
CollapsibleBase.displayName = CollapsiblePrimitive__namespace.Root.displayName;
|
|
4090
|
-
var CollapsibleTriggerBase =
|
|
4166
|
+
var CollapsibleTriggerBase = React32__namespace.forwardRef(({ className, children, leftIcon, showCaret = true, ...props }, ref) => {
|
|
4091
4167
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4092
4168
|
CollapsiblePrimitive__namespace.CollapsibleTrigger,
|
|
4093
4169
|
{
|
|
@@ -4109,7 +4185,7 @@ var CollapsibleTriggerBase = React33__namespace.forwardRef(({ className, childre
|
|
|
4109
4185
|
);
|
|
4110
4186
|
});
|
|
4111
4187
|
CollapsibleTriggerBase.displayName = CollapsiblePrimitive__namespace.CollapsibleTrigger.displayName;
|
|
4112
|
-
var CollapsibleContentBase =
|
|
4188
|
+
var CollapsibleContentBase = React32__namespace.forwardRef(({ className, children, ...props }, ref) => {
|
|
4113
4189
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4114
4190
|
CollapsiblePrimitive__namespace.CollapsibleContent,
|
|
4115
4191
|
{
|
|
@@ -4131,7 +4207,7 @@ function HoverCardBase(props) {
|
|
|
4131
4207
|
function HoverCardTriggerBase(props) {
|
|
4132
4208
|
return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Trigger, { ...props });
|
|
4133
4209
|
}
|
|
4134
|
-
var HoverCardContentBase =
|
|
4210
|
+
var HoverCardContentBase = React32__namespace.forwardRef(
|
|
4135
4211
|
({ className, align = "center", sideOffset = 6, children, ...props }, ref) => {
|
|
4136
4212
|
return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4137
4213
|
HoverCardPrimitive__namespace.Content,
|
|
@@ -4208,7 +4284,7 @@ function InputOTPSlotBase({
|
|
|
4208
4284
|
className,
|
|
4209
4285
|
...props
|
|
4210
4286
|
}) {
|
|
4211
|
-
const inputOTPContext =
|
|
4287
|
+
const inputOTPContext = React32__namespace.useContext(inputOtp.OTPInputContext);
|
|
4212
4288
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4213
4289
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4214
4290
|
"div",
|
|
@@ -4230,7 +4306,7 @@ function InputOTPSlotBase({
|
|
|
4230
4306
|
function InputOTPSeparatorBase({ ...props }) {
|
|
4231
4307
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(react.MinusIcon, {}) });
|
|
4232
4308
|
}
|
|
4233
|
-
var SlideBase =
|
|
4309
|
+
var SlideBase = React32__namespace.forwardRef(
|
|
4234
4310
|
({
|
|
4235
4311
|
className,
|
|
4236
4312
|
orientation = "horizontal",
|
|
@@ -4308,7 +4384,7 @@ var SlideBase = React33__namespace.forwardRef(
|
|
|
4308
4384
|
}
|
|
4309
4385
|
);
|
|
4310
4386
|
SlideBase.displayName = "SlideBase";
|
|
4311
|
-
var EditButton =
|
|
4387
|
+
var EditButton = React32__namespace.forwardRef(
|
|
4312
4388
|
({
|
|
4313
4389
|
disabled,
|
|
4314
4390
|
onClick,
|
|
@@ -4348,7 +4424,7 @@ var EditButton = React33__namespace.forwardRef(
|
|
|
4348
4424
|
)
|
|
4349
4425
|
);
|
|
4350
4426
|
EditButton.displayName = "EditButton";
|
|
4351
|
-
var ChangeButton =
|
|
4427
|
+
var ChangeButton = React32__namespace.forwardRef(
|
|
4352
4428
|
({
|
|
4353
4429
|
disabled,
|
|
4354
4430
|
onClick,
|
|
@@ -4388,7 +4464,7 @@ var ChangeButton = React33__namespace.forwardRef(
|
|
|
4388
4464
|
)
|
|
4389
4465
|
);
|
|
4390
4466
|
ChangeButton.displayName = "ChangeButton";
|
|
4391
|
-
var SaveButton =
|
|
4467
|
+
var SaveButton = React32__namespace.forwardRef(
|
|
4392
4468
|
({
|
|
4393
4469
|
disabled,
|
|
4394
4470
|
onClick,
|
|
@@ -4428,7 +4504,7 @@ var SaveButton = React33__namespace.forwardRef(
|
|
|
4428
4504
|
)
|
|
4429
4505
|
);
|
|
4430
4506
|
SaveButton.displayName = "SaveButton";
|
|
4431
|
-
var AddButton =
|
|
4507
|
+
var AddButton = React32__namespace.forwardRef(
|
|
4432
4508
|
({
|
|
4433
4509
|
disabled,
|
|
4434
4510
|
onClick,
|
|
@@ -4468,7 +4544,7 @@ var AddButton = React33__namespace.forwardRef(
|
|
|
4468
4544
|
)
|
|
4469
4545
|
);
|
|
4470
4546
|
AddButton.displayName = "AddButton";
|
|
4471
|
-
var CloseButton =
|
|
4547
|
+
var CloseButton = React32__namespace.forwardRef(
|
|
4472
4548
|
({
|
|
4473
4549
|
disabled,
|
|
4474
4550
|
onClick,
|
|
@@ -5006,7 +5082,7 @@ var LockButton = ({
|
|
|
5006
5082
|
}
|
|
5007
5083
|
);
|
|
5008
5084
|
var UnlockButton = (props) => /* @__PURE__ */ jsxRuntime.jsx(LockButton, { isLocked: false, testid: "button-unlock", ...props });
|
|
5009
|
-
var SwitchBase =
|
|
5085
|
+
var SwitchBase = React32__namespace.forwardRef(({ className, testid: dataTestId = "switch-base", ...props }, ref) => {
|
|
5010
5086
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5011
5087
|
SwitchPrimitives__namespace.Root,
|
|
5012
5088
|
{
|
|
@@ -5033,14 +5109,14 @@ var SwitchBase = React33__namespace.forwardRef(({ className, testid: dataTestId
|
|
|
5033
5109
|
);
|
|
5034
5110
|
});
|
|
5035
5111
|
SwitchBase.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
5036
|
-
var TextAreaBase =
|
|
5112
|
+
var TextAreaBase = React32__namespace.forwardRef(
|
|
5037
5113
|
({ className, hideClear = false, onClear, ...props }, ref) => {
|
|
5038
|
-
const [isFocused, setIsFocused] =
|
|
5039
|
-
const [hasContent, setHasContent] =
|
|
5114
|
+
const [isFocused, setIsFocused] = React32__namespace.useState(false);
|
|
5115
|
+
const [hasContent, setHasContent] = React32__namespace.useState(
|
|
5040
5116
|
!!props.value || !!props.defaultValue
|
|
5041
5117
|
);
|
|
5042
|
-
const [showConfirmTooltip, setShowConfirmTooltip] =
|
|
5043
|
-
const textareaRef =
|
|
5118
|
+
const [showConfirmTooltip, setShowConfirmTooltip] = React32__namespace.useState(false);
|
|
5119
|
+
const textareaRef = React32__namespace.useRef(null);
|
|
5044
5120
|
const handleFocus = (e) => {
|
|
5045
5121
|
setIsFocused(true);
|
|
5046
5122
|
props.onFocus?.(e);
|
|
@@ -5076,8 +5152,8 @@ var TextAreaBase = React33__namespace.forwardRef(
|
|
|
5076
5152
|
const handleCancelClear = () => {
|
|
5077
5153
|
setShowConfirmTooltip(false);
|
|
5078
5154
|
};
|
|
5079
|
-
|
|
5080
|
-
|
|
5155
|
+
React32__namespace.useImperativeHandle(ref, () => textareaRef.current);
|
|
5156
|
+
React32__namespace.useEffect(() => {
|
|
5081
5157
|
setHasContent(!!props.value || !!props.defaultValue);
|
|
5082
5158
|
}, [props.value, props.defaultValue]);
|
|
5083
5159
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
@@ -5202,202 +5278,7 @@ var TextAreaBase = React33__namespace.forwardRef(
|
|
|
5202
5278
|
}
|
|
5203
5279
|
);
|
|
5204
5280
|
TextAreaBase.displayName = "TextAreaBase";
|
|
5205
|
-
var
|
|
5206
|
-
function useCarousel() {
|
|
5207
|
-
const context = React33__namespace.useContext(CarouselContext);
|
|
5208
|
-
if (!context) {
|
|
5209
|
-
throw new Error("useCarousel must be used within a <CarouselBase />");
|
|
5210
|
-
}
|
|
5211
|
-
return context;
|
|
5212
|
-
}
|
|
5213
|
-
function CarouselBase({
|
|
5214
|
-
orientation = "horizontal",
|
|
5215
|
-
opts,
|
|
5216
|
-
setApi,
|
|
5217
|
-
plugins,
|
|
5218
|
-
className,
|
|
5219
|
-
children,
|
|
5220
|
-
...props
|
|
5221
|
-
}) {
|
|
5222
|
-
const [carouselRef, api] = useEmblaCarousel__default.default(
|
|
5223
|
-
{
|
|
5224
|
-
...opts,
|
|
5225
|
-
axis: orientation === "horizontal" ? "x" : "y"
|
|
5226
|
-
},
|
|
5227
|
-
plugins
|
|
5228
|
-
);
|
|
5229
|
-
const [canScrollPrev, setCanScrollPrev] = React33__namespace.useState(false);
|
|
5230
|
-
const [canScrollNext, setCanScrollNext] = React33__namespace.useState(false);
|
|
5231
|
-
const onSelect = React33__namespace.useCallback((api2) => {
|
|
5232
|
-
if (!api2) return;
|
|
5233
|
-
setCanScrollPrev(api2.canScrollPrev());
|
|
5234
|
-
setCanScrollNext(api2.canScrollNext());
|
|
5235
|
-
}, []);
|
|
5236
|
-
const scrollPrev = React33__namespace.useCallback(() => {
|
|
5237
|
-
api?.scrollPrev();
|
|
5238
|
-
}, [api]);
|
|
5239
|
-
const scrollNext = React33__namespace.useCallback(() => {
|
|
5240
|
-
api?.scrollNext();
|
|
5241
|
-
}, [api]);
|
|
5242
|
-
const handleKeyDown = React33__namespace.useCallback(
|
|
5243
|
-
(event) => {
|
|
5244
|
-
if (event.key === "ArrowLeft") {
|
|
5245
|
-
event.preventDefault();
|
|
5246
|
-
scrollPrev();
|
|
5247
|
-
} else if (event.key === "ArrowRight") {
|
|
5248
|
-
event.preventDefault();
|
|
5249
|
-
scrollNext();
|
|
5250
|
-
}
|
|
5251
|
-
},
|
|
5252
|
-
[scrollPrev, scrollNext]
|
|
5253
|
-
);
|
|
5254
|
-
React33__namespace.useEffect(() => {
|
|
5255
|
-
if (!api || !setApi) return;
|
|
5256
|
-
setApi(api);
|
|
5257
|
-
}, [api, setApi]);
|
|
5258
|
-
React33__namespace.useEffect(() => {
|
|
5259
|
-
if (!api) return;
|
|
5260
|
-
onSelect(api);
|
|
5261
|
-
api.on("reInit", onSelect);
|
|
5262
|
-
api.on("select", onSelect);
|
|
5263
|
-
return () => {
|
|
5264
|
-
api?.off("select", onSelect);
|
|
5265
|
-
};
|
|
5266
|
-
}, [api, onSelect]);
|
|
5267
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5268
|
-
CarouselContext.Provider,
|
|
5269
|
-
{
|
|
5270
|
-
value: {
|
|
5271
|
-
carouselRef,
|
|
5272
|
-
api,
|
|
5273
|
-
opts,
|
|
5274
|
-
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
5275
|
-
scrollPrev,
|
|
5276
|
-
scrollNext,
|
|
5277
|
-
canScrollPrev,
|
|
5278
|
-
canScrollNext
|
|
5279
|
-
},
|
|
5280
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5281
|
-
"div",
|
|
5282
|
-
{
|
|
5283
|
-
onKeyDownCapture: handleKeyDown,
|
|
5284
|
-
className: cn("relative", className),
|
|
5285
|
-
role: "region",
|
|
5286
|
-
"aria-roledescription": "carousel",
|
|
5287
|
-
"data-slot": "carousel",
|
|
5288
|
-
...props,
|
|
5289
|
-
children
|
|
5290
|
-
}
|
|
5291
|
-
)
|
|
5292
|
-
}
|
|
5293
|
-
);
|
|
5294
|
-
}
|
|
5295
|
-
function CarouselContentBase({
|
|
5296
|
-
className,
|
|
5297
|
-
...props
|
|
5298
|
-
}) {
|
|
5299
|
-
const { carouselRef, orientation } = useCarousel();
|
|
5300
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5301
|
-
"div",
|
|
5302
|
-
{
|
|
5303
|
-
ref: carouselRef,
|
|
5304
|
-
className: "overflow-hidden",
|
|
5305
|
-
"data-slot": "carousel-content",
|
|
5306
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5307
|
-
"div",
|
|
5308
|
-
{
|
|
5309
|
-
className: cn(
|
|
5310
|
-
"flex",
|
|
5311
|
-
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
5312
|
-
className
|
|
5313
|
-
),
|
|
5314
|
-
...props
|
|
5315
|
-
}
|
|
5316
|
-
)
|
|
5317
|
-
}
|
|
5318
|
-
);
|
|
5319
|
-
}
|
|
5320
|
-
function CarouselItemBase({
|
|
5321
|
-
className,
|
|
5322
|
-
...props
|
|
5323
|
-
}) {
|
|
5324
|
-
const { orientation } = useCarousel();
|
|
5325
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5326
|
-
"div",
|
|
5327
|
-
{
|
|
5328
|
-
role: "group",
|
|
5329
|
-
"aria-roledescription": "slide",
|
|
5330
|
-
"data-slot": "carousel-item",
|
|
5331
|
-
className: cn(
|
|
5332
|
-
"min-w-0 shrink-0 grow-0 basis-full",
|
|
5333
|
-
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
5334
|
-
className
|
|
5335
|
-
),
|
|
5336
|
-
...props
|
|
5337
|
-
}
|
|
5338
|
-
);
|
|
5339
|
-
}
|
|
5340
|
-
function CarouselPreviousBase({
|
|
5341
|
-
className,
|
|
5342
|
-
variant = "outline",
|
|
5343
|
-
size = "icon",
|
|
5344
|
-
...props
|
|
5345
|
-
}) {
|
|
5346
|
-
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
5347
|
-
const btnRef = React33__namespace.useRef(null);
|
|
5348
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5349
|
-
ButtonBase,
|
|
5350
|
-
{
|
|
5351
|
-
"data-slot": "carousel-previous",
|
|
5352
|
-
variant,
|
|
5353
|
-
size,
|
|
5354
|
-
ref: btnRef,
|
|
5355
|
-
className: cn(
|
|
5356
|
-
"absolute size-8 rounded-l-3xl px-6",
|
|
5357
|
-
orientation === "horizontal" ? "top-2 right-1" : "bottom-64 left-1/3 rotate-90",
|
|
5358
|
-
className
|
|
5359
|
-
),
|
|
5360
|
-
disabled: !canScrollPrev,
|
|
5361
|
-
onClick: scrollPrev,
|
|
5362
|
-
...props,
|
|
5363
|
-
children: [
|
|
5364
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.ArrowLeftIcon, {}),
|
|
5365
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
5366
|
-
]
|
|
5367
|
-
}
|
|
5368
|
-
);
|
|
5369
|
-
}
|
|
5370
|
-
function CarouselNextBase({
|
|
5371
|
-
className,
|
|
5372
|
-
variant = "outline",
|
|
5373
|
-
size = "icon",
|
|
5374
|
-
...props
|
|
5375
|
-
}) {
|
|
5376
|
-
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
5377
|
-
const btnRef = React33__namespace.useRef(null);
|
|
5378
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5379
|
-
ButtonBase,
|
|
5380
|
-
{
|
|
5381
|
-
"data-slot": "carousel-next",
|
|
5382
|
-
variant,
|
|
5383
|
-
size,
|
|
5384
|
-
ref: btnRef,
|
|
5385
|
-
className: cn(
|
|
5386
|
-
"absolute size-8 rounded-r-3xl px-6",
|
|
5387
|
-
orientation === "horizontal" ? "top-2" : "left-14 -translate-x-1/2 rotate-90",
|
|
5388
|
-
className
|
|
5389
|
-
),
|
|
5390
|
-
disabled: !canScrollNext,
|
|
5391
|
-
onClick: scrollNext,
|
|
5392
|
-
...props,
|
|
5393
|
-
children: [
|
|
5394
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.ArrowRightIcon, {}),
|
|
5395
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Next slide" })
|
|
5396
|
-
]
|
|
5397
|
-
}
|
|
5398
|
-
);
|
|
5399
|
-
}
|
|
5400
|
-
var ScrollAreaBase = React33__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5281
|
+
var ScrollAreaBase = React32__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5401
5282
|
ScrollAreaPrimitive__namespace.Root,
|
|
5402
5283
|
{
|
|
5403
5284
|
ref,
|
|
@@ -5411,7 +5292,7 @@ var ScrollAreaBase = React33__namespace.forwardRef(({ className, children, ...pr
|
|
|
5411
5292
|
}
|
|
5412
5293
|
));
|
|
5413
5294
|
ScrollAreaBase.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
5414
|
-
var ScrollBarBase =
|
|
5295
|
+
var ScrollBarBase = React32__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5415
5296
|
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
5416
5297
|
{
|
|
5417
5298
|
ref,
|
|
@@ -5427,7 +5308,7 @@ var ScrollBarBase = React33__namespace.forwardRef(({ className, orientation = "v
|
|
|
5427
5308
|
}
|
|
5428
5309
|
));
|
|
5429
5310
|
ScrollBarBase.displayName = ScrollAreaPrimitive__namespace.ScrollAreaScrollbar.displayName;
|
|
5430
|
-
var SeparatorBase =
|
|
5311
|
+
var SeparatorBase = React32__namespace.forwardRef(
|
|
5431
5312
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
|
|
5432
5313
|
const isHorizontal = orientation === "horizontal";
|
|
5433
5314
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5459,7 +5340,7 @@ var SeparatorBase = React33__namespace.forwardRef(
|
|
|
5459
5340
|
}
|
|
5460
5341
|
);
|
|
5461
5342
|
SeparatorBase.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
5462
|
-
var TableBase =
|
|
5343
|
+
var TableBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5463
5344
|
"table",
|
|
5464
5345
|
{
|
|
5465
5346
|
ref,
|
|
@@ -5468,9 +5349,9 @@ var TableBase = React33__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
5468
5349
|
}
|
|
5469
5350
|
) }));
|
|
5470
5351
|
TableBase.displayName = "TableBase";
|
|
5471
|
-
var TableHeaderBase =
|
|
5352
|
+
var TableHeaderBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
5472
5353
|
TableHeaderBase.displayName = "TableHeaderBase";
|
|
5473
|
-
var TableBodyBase =
|
|
5354
|
+
var TableBodyBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5474
5355
|
"tbody",
|
|
5475
5356
|
{
|
|
5476
5357
|
ref,
|
|
@@ -5479,7 +5360,7 @@ var TableBodyBase = React33__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
5479
5360
|
}
|
|
5480
5361
|
));
|
|
5481
5362
|
TableBodyBase.displayName = "TableBodyBase";
|
|
5482
|
-
var TableFooterBase =
|
|
5363
|
+
var TableFooterBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5483
5364
|
"tfoot",
|
|
5484
5365
|
{
|
|
5485
5366
|
ref,
|
|
@@ -5491,7 +5372,7 @@ var TableFooterBase = React33__namespace.forwardRef(({ className, ...props }, re
|
|
|
5491
5372
|
}
|
|
5492
5373
|
));
|
|
5493
5374
|
TableFooterBase.displayName = "TableFooterBase";
|
|
5494
|
-
var TableRowBase =
|
|
5375
|
+
var TableRowBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5495
5376
|
"tr",
|
|
5496
5377
|
{
|
|
5497
5378
|
ref,
|
|
@@ -5503,7 +5384,7 @@ var TableRowBase = React33__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
5503
5384
|
}
|
|
5504
5385
|
));
|
|
5505
5386
|
TableRowBase.displayName = "TableRowBase";
|
|
5506
|
-
var TableHeadBase =
|
|
5387
|
+
var TableHeadBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5507
5388
|
"th",
|
|
5508
5389
|
{
|
|
5509
5390
|
ref,
|
|
@@ -5515,7 +5396,7 @@ var TableHeadBase = React33__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
5515
5396
|
}
|
|
5516
5397
|
));
|
|
5517
5398
|
TableHeadBase.displayName = "TableHeadBase";
|
|
5518
|
-
var TableCellBase =
|
|
5399
|
+
var TableCellBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5519
5400
|
"td",
|
|
5520
5401
|
{
|
|
5521
5402
|
ref,
|
|
@@ -5527,7 +5408,7 @@ var TableCellBase = React33__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
5527
5408
|
}
|
|
5528
5409
|
));
|
|
5529
5410
|
TableCellBase.displayName = "TableCellBase";
|
|
5530
|
-
var TableCaptionBase =
|
|
5411
|
+
var TableCaptionBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5531
5412
|
"caption",
|
|
5532
5413
|
{
|
|
5533
5414
|
ref,
|
|
@@ -5536,7 +5417,7 @@ var TableCaptionBase = React33__namespace.forwardRef(({ className, ...props }, r
|
|
|
5536
5417
|
}
|
|
5537
5418
|
));
|
|
5538
5419
|
TableCaptionBase.displayName = "TableCaptionBase";
|
|
5539
|
-
var TabsBase =
|
|
5420
|
+
var TabsBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5540
5421
|
TabsPrimitive__namespace.Root,
|
|
5541
5422
|
{
|
|
5542
5423
|
ref,
|
|
@@ -5545,7 +5426,7 @@ var TabsBase = React33__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
5545
5426
|
}
|
|
5546
5427
|
));
|
|
5547
5428
|
TabsBase.displayName = TabsPrimitive__namespace.Root.displayName;
|
|
5548
|
-
var TabsListBase =
|
|
5429
|
+
var TabsListBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5549
5430
|
TabsPrimitive__namespace.List,
|
|
5550
5431
|
{
|
|
5551
5432
|
ref,
|
|
@@ -5565,7 +5446,7 @@ var TabsListBase = React33__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
5565
5446
|
}
|
|
5566
5447
|
));
|
|
5567
5448
|
TabsListBase.displayName = TabsPrimitive__namespace.List.displayName;
|
|
5568
|
-
var TabsTriggerBase =
|
|
5449
|
+
var TabsTriggerBase = React32__namespace.forwardRef(({ className, animation = "default", ...props }, ref) => {
|
|
5569
5450
|
const base = cn(
|
|
5570
5451
|
"relative inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium",
|
|
5571
5452
|
"text-muted-foreground hover:text-foreground",
|
|
@@ -5585,7 +5466,7 @@ var TabsTriggerBase = React33__namespace.forwardRef(({ className, animation = "d
|
|
|
5585
5466
|
}
|
|
5586
5467
|
);
|
|
5587
5468
|
});
|
|
5588
|
-
var TabsContentBase =
|
|
5469
|
+
var TabsContentBase = React32__namespace.forwardRef(({ className, animation = "default", ...props }, ref) => {
|
|
5589
5470
|
const animationClasses = animation === "none" ? "" : animation === "slide" ? "animate-in slide-in-from-left-2 duration-500 ease-in-out" : "animate-in fade-in-0 duration-500 ease-in-out";
|
|
5590
5471
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5591
5472
|
TabsPrimitive__namespace.Content,
|
|
@@ -5837,7 +5718,7 @@ var SheetBase = DialogPrimitive__namespace.Root;
|
|
|
5837
5718
|
var SheetTriggerBase = DialogPrimitive__namespace.Trigger;
|
|
5838
5719
|
var SheetCloseBase = DialogPrimitive__namespace.Close;
|
|
5839
5720
|
var SheetPortalBase = DialogPrimitive__namespace.Portal;
|
|
5840
|
-
var SheetOverlayBase =
|
|
5721
|
+
var SheetOverlayBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5841
5722
|
DialogPrimitive__namespace.Overlay,
|
|
5842
5723
|
{
|
|
5843
5724
|
className: cn(
|
|
@@ -5865,7 +5746,7 @@ var sheetVariants = classVarianceAuthority.cva(
|
|
|
5865
5746
|
}
|
|
5866
5747
|
}
|
|
5867
5748
|
);
|
|
5868
|
-
var SheetContentBase =
|
|
5749
|
+
var SheetContentBase = React32__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortalBase, { children: [
|
|
5869
5750
|
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlayBase, {}),
|
|
5870
5751
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5871
5752
|
DialogPrimitive__namespace.Content,
|
|
@@ -5912,7 +5793,7 @@ var SheetFooterBase = ({
|
|
|
5912
5793
|
}
|
|
5913
5794
|
);
|
|
5914
5795
|
SheetFooterBase.displayName = "SheetFooterBase";
|
|
5915
|
-
var SheetTitleBase =
|
|
5796
|
+
var SheetTitleBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5916
5797
|
DialogPrimitive__namespace.Title,
|
|
5917
5798
|
{
|
|
5918
5799
|
ref,
|
|
@@ -5921,7 +5802,7 @@ var SheetTitleBase = React33__namespace.forwardRef(({ className, ...props }, ref
|
|
|
5921
5802
|
}
|
|
5922
5803
|
));
|
|
5923
5804
|
SheetTitleBase.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
5924
|
-
var SheetDescriptionBase =
|
|
5805
|
+
var SheetDescriptionBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5925
5806
|
DialogPrimitive__namespace.Description,
|
|
5926
5807
|
{
|
|
5927
5808
|
ref,
|
|
@@ -5936,9 +5817,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
5936
5817
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
5937
5818
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
5938
5819
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
5939
|
-
var SidebarContext =
|
|
5820
|
+
var SidebarContext = React32__namespace.createContext(null);
|
|
5940
5821
|
function UseSideBarBase() {
|
|
5941
|
-
const context =
|
|
5822
|
+
const context = React32__namespace.useContext(SidebarContext);
|
|
5942
5823
|
if (!context) {
|
|
5943
5824
|
throw new Error(
|
|
5944
5825
|
"UseSideBarBase must be used within a SidebarProviderBase."
|
|
@@ -5946,7 +5827,7 @@ function UseSideBarBase() {
|
|
|
5946
5827
|
}
|
|
5947
5828
|
return context;
|
|
5948
5829
|
}
|
|
5949
|
-
var SidebarProviderBase =
|
|
5830
|
+
var SidebarProviderBase = React32__namespace.forwardRef(
|
|
5950
5831
|
({
|
|
5951
5832
|
defaultOpen = true,
|
|
5952
5833
|
open: openProp,
|
|
@@ -5957,10 +5838,10 @@ var SidebarProviderBase = React33__namespace.forwardRef(
|
|
|
5957
5838
|
...props
|
|
5958
5839
|
}, ref) => {
|
|
5959
5840
|
const isMobile = useIsMobile();
|
|
5960
|
-
const [openMobile, setOpenMobile] =
|
|
5961
|
-
const [_open, _setOpen] =
|
|
5841
|
+
const [openMobile, setOpenMobile] = React32__namespace.useState(false);
|
|
5842
|
+
const [_open, _setOpen] = React32__namespace.useState(defaultOpen);
|
|
5962
5843
|
const open = openProp ?? _open;
|
|
5963
|
-
const setOpen =
|
|
5844
|
+
const setOpen = React32__namespace.useCallback(
|
|
5964
5845
|
(value) => {
|
|
5965
5846
|
const openState = typeof value === "function" ? value(open) : value;
|
|
5966
5847
|
if (setOpenProp) {
|
|
@@ -5972,10 +5853,10 @@ var SidebarProviderBase = React33__namespace.forwardRef(
|
|
|
5972
5853
|
},
|
|
5973
5854
|
[setOpenProp, open]
|
|
5974
5855
|
);
|
|
5975
|
-
const toggleSidebar =
|
|
5856
|
+
const toggleSidebar = React32__namespace.useCallback(() => {
|
|
5976
5857
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
5977
5858
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
5978
|
-
|
|
5859
|
+
React32__namespace.useEffect(() => {
|
|
5979
5860
|
const handleKeyDown = (event) => {
|
|
5980
5861
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
5981
5862
|
event.preventDefault();
|
|
@@ -5986,7 +5867,7 @@ var SidebarProviderBase = React33__namespace.forwardRef(
|
|
|
5986
5867
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
5987
5868
|
}, [toggleSidebar]);
|
|
5988
5869
|
const state = open ? "expanded" : "collapsed";
|
|
5989
|
-
const contextValue =
|
|
5870
|
+
const contextValue = React32__namespace.useMemo(
|
|
5990
5871
|
() => ({
|
|
5991
5872
|
state,
|
|
5992
5873
|
open,
|
|
@@ -6018,7 +5899,7 @@ var SidebarProviderBase = React33__namespace.forwardRef(
|
|
|
6018
5899
|
}
|
|
6019
5900
|
);
|
|
6020
5901
|
SidebarProviderBase.displayName = "SidebarProviderBase";
|
|
6021
|
-
var SidebarBase =
|
|
5902
|
+
var SidebarBase = React32__namespace.forwardRef(
|
|
6022
5903
|
({
|
|
6023
5904
|
side = "left",
|
|
6024
5905
|
variant = "sidebar",
|
|
@@ -6105,7 +5986,7 @@ var SidebarBase = React33__namespace.forwardRef(
|
|
|
6105
5986
|
}
|
|
6106
5987
|
);
|
|
6107
5988
|
SidebarBase.displayName = "SidebarBase";
|
|
6108
|
-
var SidebarTriggerBase =
|
|
5989
|
+
var SidebarTriggerBase = React32__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
6109
5990
|
const { toggleSidebar } = UseSideBarBase();
|
|
6110
5991
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6111
5992
|
ButtonBase,
|
|
@@ -6128,7 +6009,7 @@ var SidebarTriggerBase = React33__namespace.forwardRef(({ className, onClick, ..
|
|
|
6128
6009
|
) });
|
|
6129
6010
|
});
|
|
6130
6011
|
SidebarTriggerBase.displayName = "SidebarTriggerBase";
|
|
6131
|
-
var SidebarRailBase =
|
|
6012
|
+
var SidebarRailBase = React32__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
6132
6013
|
const { toggleSidebar } = UseSideBarBase();
|
|
6133
6014
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6134
6015
|
"button",
|
|
@@ -6153,7 +6034,7 @@ var SidebarRailBase = React33__namespace.forwardRef(({ className, ...props }, re
|
|
|
6153
6034
|
);
|
|
6154
6035
|
});
|
|
6155
6036
|
SidebarRailBase.displayName = "SidebarRailBase";
|
|
6156
|
-
var SidebarInsetBase =
|
|
6037
|
+
var SidebarInsetBase = React32__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
6157
6038
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6158
6039
|
"main",
|
|
6159
6040
|
{
|
|
@@ -6168,7 +6049,7 @@ var SidebarInsetBase = React33__namespace.forwardRef(({ className, ...props }, r
|
|
|
6168
6049
|
);
|
|
6169
6050
|
});
|
|
6170
6051
|
SidebarInsetBase.displayName = "SidebarInsetBase";
|
|
6171
|
-
var SidebarInputBase =
|
|
6052
|
+
var SidebarInputBase = React32__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
6172
6053
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6173
6054
|
InputBase,
|
|
6174
6055
|
{
|
|
@@ -6183,7 +6064,7 @@ var SidebarInputBase = React33__namespace.forwardRef(({ className, ...props }, r
|
|
|
6183
6064
|
);
|
|
6184
6065
|
});
|
|
6185
6066
|
SidebarInputBase.displayName = "SidebarInputBase";
|
|
6186
|
-
var SidebarHeaderBase =
|
|
6067
|
+
var SidebarHeaderBase = React32__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
6187
6068
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6188
6069
|
"div",
|
|
6189
6070
|
{
|
|
@@ -6195,7 +6076,7 @@ var SidebarHeaderBase = React33__namespace.forwardRef(({ className, ...props },
|
|
|
6195
6076
|
);
|
|
6196
6077
|
});
|
|
6197
6078
|
SidebarHeaderBase.displayName = "SidebarHeaderBase";
|
|
6198
|
-
var SidebarFooterBase =
|
|
6079
|
+
var SidebarFooterBase = React32__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
6199
6080
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6200
6081
|
"div",
|
|
6201
6082
|
{
|
|
@@ -6207,7 +6088,7 @@ var SidebarFooterBase = React33__namespace.forwardRef(({ className, ...props },
|
|
|
6207
6088
|
);
|
|
6208
6089
|
});
|
|
6209
6090
|
SidebarFooterBase.displayName = "SidebarFooterBase";
|
|
6210
|
-
var SidebarSeparatorBase =
|
|
6091
|
+
var SidebarSeparatorBase = React32__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
6211
6092
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6212
6093
|
SeparatorBase,
|
|
6213
6094
|
{
|
|
@@ -6219,7 +6100,7 @@ var SidebarSeparatorBase = React33__namespace.forwardRef(({ className, ...props
|
|
|
6219
6100
|
);
|
|
6220
6101
|
});
|
|
6221
6102
|
SidebarSeparatorBase.displayName = "SidebarSeparatorBase";
|
|
6222
|
-
var SidebarContentBase =
|
|
6103
|
+
var SidebarContentBase = React32__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
6223
6104
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6224
6105
|
"div",
|
|
6225
6106
|
{
|
|
@@ -6234,7 +6115,7 @@ var SidebarContentBase = React33__namespace.forwardRef(({ className, ...props },
|
|
|
6234
6115
|
);
|
|
6235
6116
|
});
|
|
6236
6117
|
SidebarContentBase.displayName = "SidebarContentBase";
|
|
6237
|
-
var SidebarGroupBase =
|
|
6118
|
+
var SidebarGroupBase = React32__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
6238
6119
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6239
6120
|
"div",
|
|
6240
6121
|
{
|
|
@@ -6246,7 +6127,7 @@ var SidebarGroupBase = React33__namespace.forwardRef(({ className, ...props }, r
|
|
|
6246
6127
|
);
|
|
6247
6128
|
});
|
|
6248
6129
|
SidebarGroupBase.displayName = "SidebarGroupBase";
|
|
6249
|
-
var SidebarGroupLabelBase =
|
|
6130
|
+
var SidebarGroupLabelBase = React32__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
6250
6131
|
const Comp = asChild ? reactSlot.Slot : "div";
|
|
6251
6132
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6252
6133
|
Comp,
|
|
@@ -6263,7 +6144,7 @@ var SidebarGroupLabelBase = React33__namespace.forwardRef(({ className, asChild
|
|
|
6263
6144
|
);
|
|
6264
6145
|
});
|
|
6265
6146
|
SidebarGroupLabelBase.displayName = "SidebarGroupLabelBase";
|
|
6266
|
-
var SidebarGroupActionBase =
|
|
6147
|
+
var SidebarGroupActionBase = React32__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
6267
6148
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
6268
6149
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6269
6150
|
Comp,
|
|
@@ -6282,7 +6163,7 @@ var SidebarGroupActionBase = React33__namespace.forwardRef(({ className, asChild
|
|
|
6282
6163
|
);
|
|
6283
6164
|
});
|
|
6284
6165
|
SidebarGroupActionBase.displayName = "SidebarGroupActionBase";
|
|
6285
|
-
var SidebarGroupContentBase =
|
|
6166
|
+
var SidebarGroupContentBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6286
6167
|
"div",
|
|
6287
6168
|
{
|
|
6288
6169
|
ref,
|
|
@@ -6292,7 +6173,7 @@ var SidebarGroupContentBase = React33__namespace.forwardRef(({ className, ...pro
|
|
|
6292
6173
|
}
|
|
6293
6174
|
));
|
|
6294
6175
|
SidebarGroupContentBase.displayName = "SidebarGroupContentBase";
|
|
6295
|
-
var SidebarMenuBase =
|
|
6176
|
+
var SidebarMenuBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6296
6177
|
"ul",
|
|
6297
6178
|
{
|
|
6298
6179
|
ref,
|
|
@@ -6302,7 +6183,7 @@ var SidebarMenuBase = React33__namespace.forwardRef(({ className, ...props }, re
|
|
|
6302
6183
|
}
|
|
6303
6184
|
));
|
|
6304
6185
|
SidebarMenuBase.displayName = "SidebarMenuBase";
|
|
6305
|
-
var SidebarMenuItemBase =
|
|
6186
|
+
var SidebarMenuItemBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6306
6187
|
"li",
|
|
6307
6188
|
{
|
|
6308
6189
|
ref,
|
|
@@ -6332,7 +6213,7 @@ var sidebarMenuButtonVariants = classVarianceAuthority.cva(
|
|
|
6332
6213
|
}
|
|
6333
6214
|
}
|
|
6334
6215
|
);
|
|
6335
|
-
var SidebarMenuButtonBase =
|
|
6216
|
+
var SidebarMenuButtonBase = React32__namespace.forwardRef(
|
|
6336
6217
|
({
|
|
6337
6218
|
asChild = false,
|
|
6338
6219
|
isActive = false,
|
|
@@ -6378,7 +6259,7 @@ var SidebarMenuButtonBase = React33__namespace.forwardRef(
|
|
|
6378
6259
|
}
|
|
6379
6260
|
);
|
|
6380
6261
|
SidebarMenuButtonBase.displayName = "SidebarMenuButtonBase";
|
|
6381
|
-
var SidebarMenuActionBase =
|
|
6262
|
+
var SidebarMenuActionBase = React32__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
6382
6263
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
6383
6264
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6384
6265
|
Comp,
|
|
@@ -6401,7 +6282,7 @@ var SidebarMenuActionBase = React33__namespace.forwardRef(({ className, asChild
|
|
|
6401
6282
|
);
|
|
6402
6283
|
});
|
|
6403
6284
|
SidebarMenuActionBase.displayName = "SidebarMenuActionBase";
|
|
6404
|
-
var SidebarMenuBadgeBase =
|
|
6285
|
+
var SidebarMenuBadgeBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6405
6286
|
"div",
|
|
6406
6287
|
{
|
|
6407
6288
|
ref,
|
|
@@ -6419,8 +6300,8 @@ var SidebarMenuBadgeBase = React33__namespace.forwardRef(({ className, ...props
|
|
|
6419
6300
|
}
|
|
6420
6301
|
));
|
|
6421
6302
|
SidebarMenuBadgeBase.displayName = "SidebarMenuBadgeBase";
|
|
6422
|
-
var SidebarMenuSkeletonBase =
|
|
6423
|
-
const width =
|
|
6303
|
+
var SidebarMenuSkeletonBase = React32__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
6304
|
+
const width = React32__namespace.useMemo(() => {
|
|
6424
6305
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
6425
6306
|
}, []);
|
|
6426
6307
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6453,7 +6334,7 @@ var SidebarMenuSkeletonBase = React33__namespace.forwardRef(({ className, showIc
|
|
|
6453
6334
|
);
|
|
6454
6335
|
});
|
|
6455
6336
|
SidebarMenuSkeletonBase.displayName = "SidebarMenuSkeletonBase";
|
|
6456
|
-
var SidebarMenuSubBase =
|
|
6337
|
+
var SidebarMenuSubBase = React32__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6457
6338
|
"ul",
|
|
6458
6339
|
{
|
|
6459
6340
|
ref,
|
|
@@ -6467,9 +6348,9 @@ var SidebarMenuSubBase = React33__namespace.forwardRef(({ className, ...props },
|
|
|
6467
6348
|
}
|
|
6468
6349
|
));
|
|
6469
6350
|
SidebarMenuSubBase.displayName = "SidebarMenuSubBase";
|
|
6470
|
-
var SidebarMenuSubItemBase =
|
|
6351
|
+
var SidebarMenuSubItemBase = React32__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, ...props }));
|
|
6471
6352
|
SidebarMenuSubItemBase.displayName = "SidebarMenuSubItemBase";
|
|
6472
|
-
var SidebarMenuSubButtonBase =
|
|
6353
|
+
var SidebarMenuSubButtonBase = React32__namespace.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
6473
6354
|
const Comp = asChild ? reactSlot.Slot : "a";
|
|
6474
6355
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6475
6356
|
Comp,
|
|
@@ -6610,9 +6491,9 @@ function DrawerDescriptionBase({
|
|
|
6610
6491
|
}
|
|
6611
6492
|
);
|
|
6612
6493
|
}
|
|
6613
|
-
var UniversalTooltipContext =
|
|
6494
|
+
var UniversalTooltipContext = React32.createContext(null);
|
|
6614
6495
|
var useUniversalTooltip = () => {
|
|
6615
|
-
const context =
|
|
6496
|
+
const context = React32.useContext(UniversalTooltipContext);
|
|
6616
6497
|
if (!context) {
|
|
6617
6498
|
throw new Error("useUniversalTooltip deve ser usado dentro de UniversalTooltipProvider");
|
|
6618
6499
|
}
|
|
@@ -6620,7 +6501,7 @@ var useUniversalTooltip = () => {
|
|
|
6620
6501
|
};
|
|
6621
6502
|
var useTooltip = () => {
|
|
6622
6503
|
const { addTooltip, removeTooltip, startDrag } = useUniversalTooltip();
|
|
6623
|
-
const createTooltip =
|
|
6504
|
+
const createTooltip = React32.useCallback((element, content, options) => {
|
|
6624
6505
|
const rect = element.getBoundingClientRect();
|
|
6625
6506
|
let position;
|
|
6626
6507
|
switch (options?.position || "auto") {
|
|
@@ -6650,7 +6531,7 @@ var useTooltip = () => {
|
|
|
6650
6531
|
metadata: options?.metadata
|
|
6651
6532
|
});
|
|
6652
6533
|
}, [addTooltip]);
|
|
6653
|
-
const handleElementMouseDown =
|
|
6534
|
+
const handleElementMouseDown = React32.useCallback((tooltipId, event) => {
|
|
6654
6535
|
const rect = event.target.getBoundingClientRect();
|
|
6655
6536
|
const offset = {
|
|
6656
6537
|
x: event.clientX - rect.left,
|
|
@@ -7014,11 +6895,11 @@ var CodeBlock = ({
|
|
|
7014
6895
|
breadcrumb = [],
|
|
7015
6896
|
showStats = true
|
|
7016
6897
|
}) => {
|
|
7017
|
-
const [copied, setCopied] =
|
|
7018
|
-
const [activeTab, setActiveTab] =
|
|
7019
|
-
const [isExpanded, setIsExpanded] =
|
|
6898
|
+
const [copied, setCopied] = React32__namespace.default.useState(false);
|
|
6899
|
+
const [activeTab, setActiveTab] = React32__namespace.default.useState(0);
|
|
6900
|
+
const [isExpanded, setIsExpanded] = React32__namespace.default.useState(false);
|
|
7020
6901
|
const tabsExist = tabs.length > 0;
|
|
7021
|
-
const cssVars =
|
|
6902
|
+
const cssVars = React32__namespace.default.useMemo(
|
|
7022
6903
|
() => ({
|
|
7023
6904
|
container: {
|
|
7024
6905
|
backgroundColor: "hsl(var(--card))",
|
|
@@ -7114,7 +6995,7 @@ var CodeBlock = ({
|
|
|
7114
6995
|
] }),
|
|
7115
6996
|
breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center min-w-0", children: [
|
|
7116
6997
|
/* @__PURE__ */ jsxRuntime.jsx(react.FolderIcon, { size: "1em", style: cssVars.icon }),
|
|
7117
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6998
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ jsxRuntime.jsxs(React32__namespace.default.Fragment, { children: [
|
|
7118
6999
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7119
7000
|
"span",
|
|
7120
7001
|
{
|
|
@@ -7366,64 +7247,8 @@ function StatusIndicator({
|
|
|
7366
7247
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children })
|
|
7367
7248
|
] });
|
|
7368
7249
|
}
|
|
7369
|
-
var DebouncedInput = React33.forwardRef(
|
|
7370
|
-
({
|
|
7371
|
-
value: initialValue,
|
|
7372
|
-
onChange,
|
|
7373
|
-
debounce: debounce2 = 500,
|
|
7374
|
-
label,
|
|
7375
|
-
labelClassname,
|
|
7376
|
-
leftIcon,
|
|
7377
|
-
rightIcon,
|
|
7378
|
-
showLoadingIndicator = false,
|
|
7379
|
-
className,
|
|
7380
|
-
error,
|
|
7381
|
-
...props
|
|
7382
|
-
}, ref) => {
|
|
7383
|
-
const [value, setValue] = React33.useState(initialValue);
|
|
7384
|
-
const [isDebouncing, setIsDebouncing] = React33.useState(false);
|
|
7385
|
-
React33.useEffect(() => {
|
|
7386
|
-
setValue(initialValue);
|
|
7387
|
-
}, [initialValue]);
|
|
7388
|
-
React33.useEffect(() => {
|
|
7389
|
-
if (value !== initialValue) {
|
|
7390
|
-
setIsDebouncing(true);
|
|
7391
|
-
}
|
|
7392
|
-
const timeout = setTimeout(() => {
|
|
7393
|
-
onChange(value);
|
|
7394
|
-
setIsDebouncing(false);
|
|
7395
|
-
}, debounce2);
|
|
7396
|
-
return () => {
|
|
7397
|
-
clearTimeout(timeout);
|
|
7398
|
-
setIsDebouncing(false);
|
|
7399
|
-
};
|
|
7400
|
-
}, [debounce2, initialValue, onChange, value]);
|
|
7401
|
-
const renderRightIcon = () => {
|
|
7402
|
-
if (showLoadingIndicator && isDebouncing) {
|
|
7403
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.CircleNotchIcon, { className: "h-4 w-4 animate-spin text-muted-foreground" });
|
|
7404
|
-
}
|
|
7405
|
-
return rightIcon;
|
|
7406
|
-
};
|
|
7407
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7408
|
-
InputBase,
|
|
7409
|
-
{
|
|
7410
|
-
...props,
|
|
7411
|
-
ref,
|
|
7412
|
-
label,
|
|
7413
|
-
labelClassname,
|
|
7414
|
-
leftIcon,
|
|
7415
|
-
rightIcon: renderRightIcon(),
|
|
7416
|
-
className: cn("transition-all duration-200", className),
|
|
7417
|
-
value,
|
|
7418
|
-
onChange: (e) => setValue(e.target.value),
|
|
7419
|
-
error
|
|
7420
|
-
}
|
|
7421
|
-
);
|
|
7422
|
-
}
|
|
7423
|
-
);
|
|
7424
|
-
DebouncedInput.displayName = "DebouncedInput";
|
|
7425
7250
|
function useCheckboxTree(initialTree) {
|
|
7426
|
-
const initialCheckedNodes =
|
|
7251
|
+
const initialCheckedNodes = React32.useMemo(() => {
|
|
7427
7252
|
const checkedSet = /* @__PURE__ */ new Set();
|
|
7428
7253
|
const initializeCheckedNodes = (node) => {
|
|
7429
7254
|
if (node.defaultChecked) {
|
|
@@ -7434,8 +7259,8 @@ function useCheckboxTree(initialTree) {
|
|
|
7434
7259
|
initializeCheckedNodes(initialTree);
|
|
7435
7260
|
return checkedSet;
|
|
7436
7261
|
}, [initialTree]);
|
|
7437
|
-
const [checkedNodes, setCheckedNodes] =
|
|
7438
|
-
const isChecked =
|
|
7262
|
+
const [checkedNodes, setCheckedNodes] = React32.useState(initialCheckedNodes);
|
|
7263
|
+
const isChecked = React32.useCallback(
|
|
7439
7264
|
(node) => {
|
|
7440
7265
|
if (!node.children) {
|
|
7441
7266
|
return checkedNodes.has(node.id);
|
|
@@ -7453,7 +7278,7 @@ function useCheckboxTree(initialTree) {
|
|
|
7453
7278
|
},
|
|
7454
7279
|
[checkedNodes]
|
|
7455
7280
|
);
|
|
7456
|
-
const handleCheck =
|
|
7281
|
+
const handleCheck = React32.useCallback(
|
|
7457
7282
|
(node) => {
|
|
7458
7283
|
const newCheckedNodes = new Set(checkedNodes);
|
|
7459
7284
|
const toggleNode = (n, check) => {
|
|
@@ -7483,9 +7308,9 @@ function CheckboxTree({ tree, renderNode }) {
|
|
|
7483
7308
|
onCheckedChange,
|
|
7484
7309
|
children
|
|
7485
7310
|
}) => {
|
|
7486
|
-
const [open, setOpen] =
|
|
7487
|
-
const checkboxRef =
|
|
7488
|
-
|
|
7311
|
+
const [open, setOpen] = React32.useState(() => !!node.children && status !== false);
|
|
7312
|
+
const checkboxRef = React32.useRef(null);
|
|
7313
|
+
React32.useEffect(() => {
|
|
7489
7314
|
if (checkboxRef.current) {
|
|
7490
7315
|
checkboxRef.current.indeterminate = status === "indeterminate";
|
|
7491
7316
|
}
|
|
@@ -7808,18 +7633,18 @@ function useScrollColumn({
|
|
|
7808
7633
|
max,
|
|
7809
7634
|
step = 1
|
|
7810
7635
|
}) {
|
|
7811
|
-
const containerRef =
|
|
7636
|
+
const containerRef = React32.useRef(null);
|
|
7812
7637
|
const items = getItems(max, step);
|
|
7813
|
-
const scrollTimeoutRef =
|
|
7814
|
-
const isScrollingRef =
|
|
7815
|
-
const [isDragging, setIsDragging] =
|
|
7816
|
-
const startYRef =
|
|
7817
|
-
const startScrollRef =
|
|
7638
|
+
const scrollTimeoutRef = React32.useRef(null);
|
|
7639
|
+
const isScrollingRef = React32.useRef(false);
|
|
7640
|
+
const [isDragging, setIsDragging] = React32.useState(false);
|
|
7641
|
+
const startYRef = React32.useRef(0);
|
|
7642
|
+
const startScrollRef = React32.useRef(0);
|
|
7818
7643
|
const itemHeight = ITEM_HEIGHT;
|
|
7819
7644
|
const centerIndex = CENTER_INDEX;
|
|
7820
7645
|
const visibleItems = VISIBLE_ITEMS;
|
|
7821
7646
|
const containerHeight = visibleItems * itemHeight;
|
|
7822
|
-
|
|
7647
|
+
React32.useEffect(() => {
|
|
7823
7648
|
if (containerRef.current && !isScrollingRef.current) {
|
|
7824
7649
|
const index = Math.round(value / step);
|
|
7825
7650
|
const clampedIndex = Math.max(0, Math.min(items.length - 1, index));
|
|
@@ -7827,7 +7652,7 @@ function useScrollColumn({
|
|
|
7827
7652
|
containerRef.current.scrollTop = scrollPosition;
|
|
7828
7653
|
}
|
|
7829
7654
|
}, [value, itemHeight, step, items.length]);
|
|
7830
|
-
|
|
7655
|
+
React32.useEffect(() => {
|
|
7831
7656
|
return () => {
|
|
7832
7657
|
if (scrollTimeoutRef.current) clearTimeout(scrollTimeoutRef.current);
|
|
7833
7658
|
};
|
|
@@ -7993,9 +7818,9 @@ function TimeScrollPicker({
|
|
|
7993
7818
|
] }) });
|
|
7994
7819
|
}
|
|
7995
7820
|
function useAutoCenter(open) {
|
|
7996
|
-
const ref =
|
|
7997
|
-
const [center, setCenter] =
|
|
7998
|
-
|
|
7821
|
+
const ref = React32.useRef(null);
|
|
7822
|
+
const [center, setCenter] = React32.useState(false);
|
|
7823
|
+
React32.useEffect(() => {
|
|
7999
7824
|
if (!open) {
|
|
8000
7825
|
setCenter(false);
|
|
8001
7826
|
return;
|
|
@@ -8035,9 +7860,9 @@ function DateTimePicker({
|
|
|
8035
7860
|
error,
|
|
8036
7861
|
hideClear = true
|
|
8037
7862
|
}) {
|
|
8038
|
-
const [internalDate, setInternalDate] =
|
|
8039
|
-
const [open, setOpen] =
|
|
8040
|
-
const [activeTab, setActiveTab] =
|
|
7863
|
+
const [internalDate, setInternalDate] = React32.useState(date);
|
|
7864
|
+
const [open, setOpen] = React32.useState(false);
|
|
7865
|
+
const [activeTab, setActiveTab] = React32.useState("calendar");
|
|
8041
7866
|
const isMobile = useIsMobile();
|
|
8042
7867
|
const handleSelect = (newDay) => {
|
|
8043
7868
|
if (!newDay) return;
|
|
@@ -8074,7 +7899,7 @@ function DateTimePicker({
|
|
|
8074
7899
|
if (!timeFormat) return "dd MMMM yyyy";
|
|
8075
7900
|
return `dd MMMM yyyy - ${timeFormat}`;
|
|
8076
7901
|
};
|
|
8077
|
-
|
|
7902
|
+
React32.useEffect(() => {
|
|
8078
7903
|
setInternalDate(date);
|
|
8079
7904
|
if (open) {
|
|
8080
7905
|
setActiveTab("calendar");
|
|
@@ -8317,9 +8142,9 @@ function RangePicker({
|
|
|
8317
8142
|
disabled,
|
|
8318
8143
|
className
|
|
8319
8144
|
}) {
|
|
8320
|
-
const [open, setOpen] =
|
|
8321
|
-
const [range, setRange] =
|
|
8322
|
-
|
|
8145
|
+
const [open, setOpen] = React32__namespace.useState(false);
|
|
8146
|
+
const [range, setRange] = React32__namespace.useState(value);
|
|
8147
|
+
React32__namespace.useEffect(() => {
|
|
8323
8148
|
setRange(value);
|
|
8324
8149
|
}, [value]);
|
|
8325
8150
|
const handleSelect = (selected) => {
|
|
@@ -8553,7 +8378,7 @@ function RangePicker({
|
|
|
8553
8378
|
] });
|
|
8554
8379
|
}
|
|
8555
8380
|
RangePicker.displayName = "RangePicker";
|
|
8556
|
-
var TimePickerInput =
|
|
8381
|
+
var TimePickerInput = React32__namespace.default.forwardRef(
|
|
8557
8382
|
({
|
|
8558
8383
|
className,
|
|
8559
8384
|
type = "tel",
|
|
@@ -8572,10 +8397,10 @@ var TimePickerInput = React33__namespace.default.forwardRef(
|
|
|
8572
8397
|
label,
|
|
8573
8398
|
...props
|
|
8574
8399
|
}, ref) => {
|
|
8575
|
-
const [flag, setFlag] =
|
|
8576
|
-
const [prevIntKey, setPrevIntKey] =
|
|
8577
|
-
const [isFocused, setIsFocused] =
|
|
8578
|
-
|
|
8400
|
+
const [flag, setFlag] = React32__namespace.default.useState(false);
|
|
8401
|
+
const [prevIntKey, setPrevIntKey] = React32__namespace.default.useState("0");
|
|
8402
|
+
const [isFocused, setIsFocused] = React32__namespace.default.useState(false);
|
|
8403
|
+
React32__namespace.default.useEffect(() => {
|
|
8579
8404
|
if (flag) {
|
|
8580
8405
|
const timer = setTimeout(() => {
|
|
8581
8406
|
setFlag(false);
|
|
@@ -8583,7 +8408,7 @@ var TimePickerInput = React33__namespace.default.forwardRef(
|
|
|
8583
8408
|
return () => clearTimeout(timer);
|
|
8584
8409
|
}
|
|
8585
8410
|
}, [flag]);
|
|
8586
|
-
const calculatedValue =
|
|
8411
|
+
const calculatedValue = React32__namespace.default.useMemo(() => {
|
|
8587
8412
|
const safeDate = date ?? new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
|
|
8588
8413
|
return getDateByType(safeDate, picker);
|
|
8589
8414
|
}, [date, picker]);
|
|
@@ -8762,9 +8587,9 @@ function TimePicker({
|
|
|
8762
8587
|
hideSeconds,
|
|
8763
8588
|
enableButton
|
|
8764
8589
|
}) {
|
|
8765
|
-
const minuteRef =
|
|
8766
|
-
const hourRef =
|
|
8767
|
-
const secondRef =
|
|
8590
|
+
const minuteRef = React32__namespace.useRef(null);
|
|
8591
|
+
const hourRef = React32__namespace.useRef(null);
|
|
8592
|
+
const secondRef = React32__namespace.useRef(null);
|
|
8768
8593
|
const containerVariants = {
|
|
8769
8594
|
hidden: { opacity: 0, y: 10 },
|
|
8770
8595
|
visible: {
|
|
@@ -8864,15 +8689,15 @@ function Agenda({
|
|
|
8864
8689
|
return false;
|
|
8865
8690
|
}
|
|
8866
8691
|
};
|
|
8867
|
-
const datedEvents =
|
|
8692
|
+
const datedEvents = React32.useMemo(
|
|
8868
8693
|
() => events.filter((e) => isValidDate5(e.start) || isValidDate5(e.end)),
|
|
8869
8694
|
[events]
|
|
8870
8695
|
);
|
|
8871
|
-
const undatedEvents =
|
|
8696
|
+
const undatedEvents = React32.useMemo(
|
|
8872
8697
|
() => events.filter((e) => !(isValidDate5(e.start) || isValidDate5(e.end))),
|
|
8873
8698
|
[events]
|
|
8874
8699
|
);
|
|
8875
|
-
const days =
|
|
8700
|
+
const days = React32.useMemo(() => {
|
|
8876
8701
|
const start = dateFns.startOfMonth(new Date(currentDate));
|
|
8877
8702
|
const end = dateFns.endOfMonth(new Date(currentDate));
|
|
8878
8703
|
return dateFns.eachDayOfInterval({ start, end });
|
|
@@ -8943,7 +8768,7 @@ function Agenda({
|
|
|
8943
8768
|
)
|
|
8944
8769
|
] }) });
|
|
8945
8770
|
}
|
|
8946
|
-
var CalendarDndContext =
|
|
8771
|
+
var CalendarDndContext = React32.createContext({
|
|
8947
8772
|
activeEvent: null,
|
|
8948
8773
|
activeId: null,
|
|
8949
8774
|
activeView: null,
|
|
@@ -8953,24 +8778,24 @@ var CalendarDndContext = React33.createContext({
|
|
|
8953
8778
|
isMultiDay: false,
|
|
8954
8779
|
multiDayWidth: null
|
|
8955
8780
|
});
|
|
8956
|
-
var useCalendarDndAgenda = () =>
|
|
8781
|
+
var useCalendarDndAgenda = () => React32.useContext(CalendarDndContext);
|
|
8957
8782
|
function CalendarDndProviderAgenda({
|
|
8958
8783
|
children,
|
|
8959
8784
|
onEventUpdate
|
|
8960
8785
|
}) {
|
|
8961
|
-
const [activeEvent, setActiveEvent] =
|
|
8786
|
+
const [activeEvent, setActiveEvent] = React32.useState(
|
|
8962
8787
|
null
|
|
8963
8788
|
);
|
|
8964
|
-
const [activeId, setActiveId] =
|
|
8965
|
-
const [activeView, setActiveView] =
|
|
8789
|
+
const [activeId, setActiveId] = React32.useState(null);
|
|
8790
|
+
const [activeView, setActiveView] = React32.useState(
|
|
8966
8791
|
null
|
|
8967
8792
|
);
|
|
8968
|
-
const [currentTime, setCurrentTime] =
|
|
8969
|
-
const [eventHeight, setEventHeight] =
|
|
8970
|
-
const [isMultiDay, setIsMultiDay] =
|
|
8971
|
-
const [multiDayWidth, setMultiDayWidth] =
|
|
8972
|
-
const [dragHandlePosition, setDragHandlePosition] =
|
|
8973
|
-
const eventDimensions =
|
|
8793
|
+
const [currentTime, setCurrentTime] = React32.useState(null);
|
|
8794
|
+
const [eventHeight, setEventHeight] = React32.useState(null);
|
|
8795
|
+
const [isMultiDay, setIsMultiDay] = React32.useState(false);
|
|
8796
|
+
const [multiDayWidth, setMultiDayWidth] = React32.useState(null);
|
|
8797
|
+
const [dragHandlePosition, setDragHandlePosition] = React32.useState(null);
|
|
8798
|
+
const eventDimensions = React32.useRef({ height: 0 });
|
|
8974
8799
|
const sensors = core.useSensors(
|
|
8975
8800
|
core.useSensor(core.MouseSensor, {
|
|
8976
8801
|
// Require the mouse to move by 5px before activating
|
|
@@ -8992,7 +8817,7 @@ function CalendarDndProviderAgenda({
|
|
|
8992
8817
|
}
|
|
8993
8818
|
})
|
|
8994
8819
|
);
|
|
8995
|
-
const dndContextId =
|
|
8820
|
+
const dndContextId = React32.useId();
|
|
8996
8821
|
const handleDragStart = (event) => {
|
|
8997
8822
|
const { active } = event;
|
|
8998
8823
|
if (!active.data.current) {
|
|
@@ -9311,9 +9136,9 @@ function addHoursToDateAgenda(date, hours) {
|
|
|
9311
9136
|
return addMinutesToDateAgenda(date, Math.round(hours * 60));
|
|
9312
9137
|
}
|
|
9313
9138
|
function useCurrentTimeIndicatorAgenda(currentDate, view) {
|
|
9314
|
-
const [currentTimePosition, setCurrentTimePosition] =
|
|
9315
|
-
const [currentTimeVisible, setCurrentTimeVisible] =
|
|
9316
|
-
|
|
9139
|
+
const [currentTimePosition, setCurrentTimePosition] = React32.useState(0);
|
|
9140
|
+
const [currentTimeVisible, setCurrentTimeVisible] = React32.useState(false);
|
|
9141
|
+
React32.useEffect(() => {
|
|
9317
9142
|
const calculateTimePosition = () => {
|
|
9318
9143
|
const now = /* @__PURE__ */ new Date();
|
|
9319
9144
|
const hours = now.getHours();
|
|
@@ -9423,13 +9248,13 @@ function EventItemAgenda({
|
|
|
9423
9248
|
const endDate = getEventEndDate(event);
|
|
9424
9249
|
const hasValidTime = !!startDate || !!endDate;
|
|
9425
9250
|
const colorClasses = hasValidTime ? getEventColorClassesAgenda(eventColor) : "bg-gray-200/50 hover:bg-gray-200/40 text-gray-900/80 dark:bg-gray-700/25 dark:text-gray-200/90 shadow-none";
|
|
9426
|
-
const displayStart =
|
|
9251
|
+
const displayStart = React32.useMemo(() => {
|
|
9427
9252
|
if (!hasValidTime) return void 0;
|
|
9428
9253
|
if (startDate) return currentTime || startDate;
|
|
9429
9254
|
if (endDate) return currentTime || endDate;
|
|
9430
9255
|
return void 0;
|
|
9431
9256
|
}, [currentTime, startDate, endDate, hasValidTime]);
|
|
9432
|
-
const displayEnd =
|
|
9257
|
+
const displayEnd = React32.useMemo(() => {
|
|
9433
9258
|
if (!hasValidTime) return void 0;
|
|
9434
9259
|
if (endDate) {
|
|
9435
9260
|
return currentTime ? new Date(
|
|
@@ -9441,7 +9266,7 @@ function EventItemAgenda({
|
|
|
9441
9266
|
}
|
|
9442
9267
|
return void 0;
|
|
9443
9268
|
}, [currentTime, startDate, endDate, hasValidTime]);
|
|
9444
|
-
const durationMinutes =
|
|
9269
|
+
const durationMinutes = React32.useMemo(() => {
|
|
9445
9270
|
if (!hasValidTime || !displayStart || !displayEnd) return 0;
|
|
9446
9271
|
return dateFns.differenceInMinutes(displayEnd, displayStart);
|
|
9447
9272
|
}, [displayStart, displayEnd, hasValidTime]);
|
|
@@ -9682,14 +9507,14 @@ function DayViewAgenda({
|
|
|
9682
9507
|
onEventSelect,
|
|
9683
9508
|
showUndatedEvents
|
|
9684
9509
|
}) {
|
|
9685
|
-
const hours =
|
|
9510
|
+
const hours = React32.useMemo(() => {
|
|
9686
9511
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
9687
9512
|
return dateFns.eachHourOfInterval({
|
|
9688
9513
|
end: dateFns.addHours(dayStart, EndHourAgenda - 1),
|
|
9689
9514
|
start: dateFns.addHours(dayStart, StartHourAgenda)
|
|
9690
9515
|
});
|
|
9691
9516
|
}, [currentDate]);
|
|
9692
|
-
const dayEvents =
|
|
9517
|
+
const dayEvents = React32.useMemo(() => {
|
|
9693
9518
|
return events.filter((event) => {
|
|
9694
9519
|
if (event.start == null) return false;
|
|
9695
9520
|
const eventStart = getEventStartDate(event) ?? /* @__PURE__ */ new Date();
|
|
@@ -9699,17 +9524,17 @@ function DayViewAgenda({
|
|
|
9699
9524
|
(a, b) => new Date(a.start).getTime() - new Date(b.start).getTime()
|
|
9700
9525
|
);
|
|
9701
9526
|
}, [currentDate, events]);
|
|
9702
|
-
const allDayEvents =
|
|
9527
|
+
const allDayEvents = React32.useMemo(() => {
|
|
9703
9528
|
return dayEvents.filter((event) => {
|
|
9704
9529
|
return event.allDay || isMultiDayEventAgenda(event);
|
|
9705
9530
|
});
|
|
9706
9531
|
}, [dayEvents]);
|
|
9707
|
-
const timeEvents =
|
|
9532
|
+
const timeEvents = React32.useMemo(() => {
|
|
9708
9533
|
return dayEvents.filter((event) => {
|
|
9709
9534
|
return !event.allDay && !isMultiDayEventAgenda(event);
|
|
9710
9535
|
});
|
|
9711
9536
|
}, [dayEvents]);
|
|
9712
|
-
const positionedEvents =
|
|
9537
|
+
const positionedEvents = React32.useMemo(() => {
|
|
9713
9538
|
const result = [];
|
|
9714
9539
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
9715
9540
|
const sortedEvents = [...timeEvents].sort((a, b) => {
|
|
@@ -9919,14 +9744,14 @@ function Select({
|
|
|
9919
9744
|
hideClear = false,
|
|
9920
9745
|
empty
|
|
9921
9746
|
}) {
|
|
9922
|
-
const [page, setPage] =
|
|
9923
|
-
const [animating, setAnimating] =
|
|
9924
|
-
const [open, setOpen] =
|
|
9747
|
+
const [page, setPage] = React32.useState(1);
|
|
9748
|
+
const [animating, setAnimating] = React32.useState(false);
|
|
9749
|
+
const [open, setOpen] = React32.useState(false);
|
|
9925
9750
|
const groupCount = groupItems ? Object.keys(groupItems).length : 0;
|
|
9926
|
-
|
|
9751
|
+
React32.useEffect(() => {
|
|
9927
9752
|
setPage(1);
|
|
9928
9753
|
}, [items?.length, groupCount, pagination]);
|
|
9929
|
-
const paged =
|
|
9754
|
+
const paged = React32.useMemo(() => {
|
|
9930
9755
|
if (!pagination || pagination <= 0) return null;
|
|
9931
9756
|
if (groupItems) {
|
|
9932
9757
|
const flattened = Object.keys(groupItems).flatMap(
|
|
@@ -9953,7 +9778,7 @@ function Select({
|
|
|
9953
9778
|
}, [items, groupItems, page, pagination]);
|
|
9954
9779
|
const goPrev = () => setPage((p) => Math.max(1, p - 1));
|
|
9955
9780
|
const goNext = () => setPage((p) => paged ? Math.min(paged.totalPages, p + 1) : p + 1);
|
|
9956
|
-
|
|
9781
|
+
React32.useEffect(() => {
|
|
9957
9782
|
if (!pagination) return;
|
|
9958
9783
|
setAnimating(true);
|
|
9959
9784
|
const id = setTimeout(() => setAnimating(false), 220);
|
|
@@ -10137,11 +9962,11 @@ function EventAgenda({
|
|
|
10137
9962
|
initialDate,
|
|
10138
9963
|
onClick
|
|
10139
9964
|
}) {
|
|
10140
|
-
const [currentDate, setCurrentDate] =
|
|
9965
|
+
const [currentDate, setCurrentDate] = React32.useState(
|
|
10141
9966
|
initialDate && new Date(initialDate) || /* @__PURE__ */ new Date()
|
|
10142
9967
|
);
|
|
10143
|
-
const [view, setView] =
|
|
10144
|
-
const [selectedEvent, setSelectedEvent] =
|
|
9968
|
+
const [view, setView] = React32.useState(initialView);
|
|
9969
|
+
const [selectedEvent, setSelectedEvent] = React32.useState(null);
|
|
10145
9970
|
const goPrevious = () => {
|
|
10146
9971
|
if (view === "month") setCurrentDate((d) => dateFns.subMonths(d, 1));
|
|
10147
9972
|
else if (view === "week") setCurrentDate((d) => dateFns.subWeeks(d, 1));
|
|
@@ -10165,7 +9990,7 @@ function EventAgenda({
|
|
|
10165
9990
|
);
|
|
10166
9991
|
return;
|
|
10167
9992
|
}
|
|
10168
|
-
if (
|
|
9993
|
+
if (React32__namespace.default.isValidElement(onClick)) {
|
|
10169
9994
|
setSelectedEvent(event);
|
|
10170
9995
|
return;
|
|
10171
9996
|
}
|
|
@@ -10197,7 +10022,7 @@ function EventAgenda({
|
|
|
10197
10022
|
const entry = labels[v] || { full: v, short: v };
|
|
10198
10023
|
return condensed ? entry.short : entry.full;
|
|
10199
10024
|
};
|
|
10200
|
-
const viewTitle =
|
|
10025
|
+
const viewTitle = React32.useMemo(() => {
|
|
10201
10026
|
const capitalize = (s) => s ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
10202
10027
|
if (view === "month")
|
|
10203
10028
|
return capitalize(dateFns.format(currentDate, "MMMM yyyy", { locale: locale.ptBR }));
|
|
@@ -10317,7 +10142,7 @@ function EventAgenda({
|
|
|
10317
10142
|
}
|
|
10318
10143
|
)
|
|
10319
10144
|
] }),
|
|
10320
|
-
selectedEvent &&
|
|
10145
|
+
selectedEvent && React32__namespace.default.isValidElement(onClick) ? React32__namespace.default.cloneElement(onClick, {
|
|
10321
10146
|
event: selectedEvent,
|
|
10322
10147
|
onClose: () => setSelectedEvent(null)
|
|
10323
10148
|
}) : null
|
|
@@ -10340,7 +10165,7 @@ function UndatedEvents({
|
|
|
10340
10165
|
title = "Data de Atendimento n\xE3o Prevista",
|
|
10341
10166
|
show = true
|
|
10342
10167
|
}) {
|
|
10343
|
-
const undatedEvents =
|
|
10168
|
+
const undatedEvents = React32.useMemo(
|
|
10344
10169
|
() => events.filter((e) => !(isValidDate2(e.start) || isValidDate2(e.end))),
|
|
10345
10170
|
[events]
|
|
10346
10171
|
);
|
|
@@ -10364,10 +10189,10 @@ function useEventVisibilityAgenda({
|
|
|
10364
10189
|
eventHeight,
|
|
10365
10190
|
eventGap
|
|
10366
10191
|
}) {
|
|
10367
|
-
const contentRef =
|
|
10368
|
-
const observerRef =
|
|
10369
|
-
const [contentHeight, setContentHeight] =
|
|
10370
|
-
|
|
10192
|
+
const contentRef = React32.useRef(null);
|
|
10193
|
+
const observerRef = React32.useRef(null);
|
|
10194
|
+
const [contentHeight, setContentHeight] = React32.useState(null);
|
|
10195
|
+
React32.useLayoutEffect(() => {
|
|
10371
10196
|
if (!contentRef.current) return;
|
|
10372
10197
|
const updateHeight = () => {
|
|
10373
10198
|
if (contentRef.current) {
|
|
@@ -10387,7 +10212,7 @@ function useEventVisibilityAgenda({
|
|
|
10387
10212
|
}
|
|
10388
10213
|
};
|
|
10389
10214
|
}, []);
|
|
10390
|
-
const getVisibleEventCount =
|
|
10215
|
+
const getVisibleEventCount = React32.useMemo(() => {
|
|
10391
10216
|
return (totalEvents) => {
|
|
10392
10217
|
if (!contentHeight) return totalEvents;
|
|
10393
10218
|
const maxEvents = Math.floor(contentHeight / (eventHeight + eventGap));
|
|
@@ -10409,21 +10234,21 @@ function MonthViewAgenda({
|
|
|
10409
10234
|
onEventSelect,
|
|
10410
10235
|
showUndatedEvents
|
|
10411
10236
|
}) {
|
|
10412
|
-
const days =
|
|
10237
|
+
const days = React32.useMemo(() => {
|
|
10413
10238
|
const monthStart = dateFns.startOfMonth(currentDate);
|
|
10414
10239
|
const monthEnd = dateFns.endOfMonth(monthStart);
|
|
10415
10240
|
const calendarStart = dateFns.startOfWeek(monthStart, { weekStartsOn: 0 });
|
|
10416
10241
|
const calendarEnd = dateFns.endOfWeek(monthEnd, { weekStartsOn: 0 });
|
|
10417
10242
|
return dateFns.eachDayOfInterval({ end: calendarEnd, start: calendarStart });
|
|
10418
10243
|
}, [currentDate]);
|
|
10419
|
-
const weekdays =
|
|
10244
|
+
const weekdays = React32.useMemo(() => {
|
|
10420
10245
|
return Array.from({ length: 7 }).map((_, i) => {
|
|
10421
10246
|
const date = dateFns.addDays(dateFns.startOfWeek(/* @__PURE__ */ new Date(), { weekStartsOn: 0 }), i);
|
|
10422
10247
|
const short = dateFns.format(date, "EEE", { locale: locale.ptBR });
|
|
10423
10248
|
return short.charAt(0).toUpperCase() + short.slice(1);
|
|
10424
10249
|
});
|
|
10425
10250
|
}, []);
|
|
10426
|
-
const weeks =
|
|
10251
|
+
const weeks = React32.useMemo(() => {
|
|
10427
10252
|
const result = [];
|
|
10428
10253
|
let week = [];
|
|
10429
10254
|
for (let i = 0; i < days.length; i++) {
|
|
@@ -10439,12 +10264,12 @@ function MonthViewAgenda({
|
|
|
10439
10264
|
e.stopPropagation();
|
|
10440
10265
|
onEventSelect(event, e);
|
|
10441
10266
|
};
|
|
10442
|
-
const [isMounted, setIsMounted] =
|
|
10267
|
+
const [isMounted, setIsMounted] = React32.useState(false);
|
|
10443
10268
|
const { contentRef, getVisibleEventCount } = useEventVisibilityAgenda({
|
|
10444
10269
|
eventGap: EventGapAgenda,
|
|
10445
10270
|
eventHeight: EventHeightAgenda
|
|
10446
10271
|
});
|
|
10447
|
-
|
|
10272
|
+
React32.useEffect(() => {
|
|
10448
10273
|
setIsMounted(true);
|
|
10449
10274
|
}, []);
|
|
10450
10275
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "contents", "data-slot": "month-view", children: [
|
|
@@ -10678,8 +10503,8 @@ function DraggableEvent({
|
|
|
10678
10503
|
draggable = true
|
|
10679
10504
|
}) {
|
|
10680
10505
|
const { activeId } = useCalendarDndAgenda();
|
|
10681
|
-
const elementRef =
|
|
10682
|
-
const [dragHandlePosition, setDragHandlePosition] =
|
|
10506
|
+
const elementRef = React32.useRef(null);
|
|
10507
|
+
const [dragHandlePosition, setDragHandlePosition] = React32.useState(null);
|
|
10683
10508
|
const eventStart = getEventStartDate(event) ?? /* @__PURE__ */ new Date();
|
|
10684
10509
|
const eventEnd = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
|
|
10685
10510
|
const isMultiDayEvent2 = isMultiDay || event.allDay || dateFns.differenceInDays(eventEnd, eventStart) >= 1;
|
|
@@ -10773,23 +10598,23 @@ function WeekViewAgenda({
|
|
|
10773
10598
|
onEventCreate,
|
|
10774
10599
|
showUndatedEvents
|
|
10775
10600
|
}) {
|
|
10776
|
-
const days =
|
|
10601
|
+
const days = React32.useMemo(() => {
|
|
10777
10602
|
const weekStart2 = dateFns.startOfWeek(currentDate, { weekStartsOn: 0 });
|
|
10778
10603
|
const weekEnd = dateFns.endOfWeek(currentDate, { weekStartsOn: 0 });
|
|
10779
10604
|
return dateFns.eachDayOfInterval({ end: weekEnd, start: weekStart2 });
|
|
10780
10605
|
}, [currentDate]);
|
|
10781
|
-
const weekStart =
|
|
10606
|
+
const weekStart = React32.useMemo(
|
|
10782
10607
|
() => dateFns.startOfWeek(currentDate, { weekStartsOn: 0 }),
|
|
10783
10608
|
[currentDate]
|
|
10784
10609
|
);
|
|
10785
|
-
const hours =
|
|
10610
|
+
const hours = React32.useMemo(() => {
|
|
10786
10611
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
10787
10612
|
return dateFns.eachHourOfInterval({
|
|
10788
10613
|
end: dateFns.addHours(dayStart, EndHour - 1),
|
|
10789
10614
|
start: dateFns.addHours(dayStart, StartHour)
|
|
10790
10615
|
});
|
|
10791
10616
|
}, [currentDate]);
|
|
10792
|
-
const allDayEvents =
|
|
10617
|
+
const allDayEvents = React32.useMemo(() => {
|
|
10793
10618
|
const isValidStart = (ev) => {
|
|
10794
10619
|
try {
|
|
10795
10620
|
if (ev.start == null) return false;
|
|
@@ -10814,7 +10639,7 @@ function WeekViewAgenda({
|
|
|
10814
10639
|
});
|
|
10815
10640
|
});
|
|
10816
10641
|
}, [events, days]);
|
|
10817
|
-
const processedDayEvents =
|
|
10642
|
+
const processedDayEvents = React32.useMemo(() => {
|
|
10818
10643
|
const result = days.map((day) => {
|
|
10819
10644
|
const dayEvents = events.filter((event) => {
|
|
10820
10645
|
if (event.allDay || isMultiDayEventAgenda(event)) return false;
|
|
@@ -11079,15 +10904,15 @@ function AgendaView({
|
|
|
11079
10904
|
return false;
|
|
11080
10905
|
}
|
|
11081
10906
|
};
|
|
11082
|
-
const datedEvents =
|
|
10907
|
+
const datedEvents = React32.useMemo(
|
|
11083
10908
|
() => events.filter((e) => isValidDate5(e.start) || isValidDate5(e.end)),
|
|
11084
10909
|
[events]
|
|
11085
10910
|
);
|
|
11086
|
-
const undatedEvents =
|
|
10911
|
+
const undatedEvents = React32.useMemo(
|
|
11087
10912
|
() => events.filter((e) => !(isValidDate5(e.start) || isValidDate5(e.end))),
|
|
11088
10913
|
[events]
|
|
11089
10914
|
);
|
|
11090
|
-
const days =
|
|
10915
|
+
const days = React32.useMemo(() => {
|
|
11091
10916
|
return Array.from(
|
|
11092
10917
|
{ length: AgendaDaysToShow },
|
|
11093
10918
|
(_, i) => dateFns.addDays(new Date(currentDate), i)
|
|
@@ -11156,7 +10981,7 @@ function AgendaView({
|
|
|
11156
10981
|
] })
|
|
11157
10982
|
] }) });
|
|
11158
10983
|
}
|
|
11159
|
-
var CalendarDndContext2 =
|
|
10984
|
+
var CalendarDndContext2 = React32.createContext({
|
|
11160
10985
|
activeEvent: null,
|
|
11161
10986
|
activeId: null,
|
|
11162
10987
|
activeView: null,
|
|
@@ -11166,22 +10991,22 @@ var CalendarDndContext2 = React33.createContext({
|
|
|
11166
10991
|
isMultiDay: false,
|
|
11167
10992
|
multiDayWidth: null
|
|
11168
10993
|
});
|
|
11169
|
-
var useCalendarDnd = () =>
|
|
10994
|
+
var useCalendarDnd = () => React32.useContext(CalendarDndContext2);
|
|
11170
10995
|
function CalendarDndProvider({
|
|
11171
10996
|
children,
|
|
11172
10997
|
onEventUpdate
|
|
11173
10998
|
}) {
|
|
11174
|
-
const [activeEvent, setActiveEvent] =
|
|
11175
|
-
const [activeId, setActiveId] =
|
|
11176
|
-
const [activeView, setActiveView] =
|
|
10999
|
+
const [activeEvent, setActiveEvent] = React32.useState(null);
|
|
11000
|
+
const [activeId, setActiveId] = React32.useState(null);
|
|
11001
|
+
const [activeView, setActiveView] = React32.useState(
|
|
11177
11002
|
null
|
|
11178
11003
|
);
|
|
11179
|
-
const [currentTime, setCurrentTime] =
|
|
11180
|
-
const [eventHeight, setEventHeight] =
|
|
11181
|
-
const [isMultiDay, setIsMultiDay] =
|
|
11182
|
-
const [multiDayWidth, setMultiDayWidth] =
|
|
11183
|
-
const [dragHandlePosition, setDragHandlePosition] =
|
|
11184
|
-
const eventDimensions =
|
|
11004
|
+
const [currentTime, setCurrentTime] = React32.useState(null);
|
|
11005
|
+
const [eventHeight, setEventHeight] = React32.useState(null);
|
|
11006
|
+
const [isMultiDay, setIsMultiDay] = React32.useState(false);
|
|
11007
|
+
const [multiDayWidth, setMultiDayWidth] = React32.useState(null);
|
|
11008
|
+
const [dragHandlePosition, setDragHandlePosition] = React32.useState(null);
|
|
11009
|
+
const eventDimensions = React32.useRef({ height: 0 });
|
|
11185
11010
|
const sensors = core.useSensors(
|
|
11186
11011
|
core.useSensor(core.MouseSensor, {
|
|
11187
11012
|
// Require the mouse to move by 5px before activating
|
|
@@ -11203,7 +11028,7 @@ function CalendarDndProvider({
|
|
|
11203
11028
|
}
|
|
11204
11029
|
})
|
|
11205
11030
|
);
|
|
11206
|
-
const dndContextId =
|
|
11031
|
+
const dndContextId = React32.useId();
|
|
11207
11032
|
const handleDragStart = (event) => {
|
|
11208
11033
|
const { active } = event;
|
|
11209
11034
|
if (!active.data.current) {
|
|
@@ -11388,14 +11213,14 @@ function DayView({
|
|
|
11388
11213
|
onEventSelect,
|
|
11389
11214
|
onEventCreate
|
|
11390
11215
|
}) {
|
|
11391
|
-
const hours =
|
|
11216
|
+
const hours = React32.useMemo(() => {
|
|
11392
11217
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
11393
11218
|
return dateFns.eachHourOfInterval({
|
|
11394
11219
|
end: dateFns.addHours(dayStart, EndHour - 1),
|
|
11395
11220
|
start: dateFns.addHours(dayStart, StartHour)
|
|
11396
11221
|
});
|
|
11397
11222
|
}, [currentDate]);
|
|
11398
|
-
const dayEvents =
|
|
11223
|
+
const dayEvents = React32.useMemo(() => {
|
|
11399
11224
|
return events.filter((event) => {
|
|
11400
11225
|
const eventStart = new Date(event.start);
|
|
11401
11226
|
const eventEnd = new Date(event.end);
|
|
@@ -11404,17 +11229,17 @@ function DayView({
|
|
|
11404
11229
|
(a, b) => new Date(a.start).getTime() - new Date(b.start).getTime()
|
|
11405
11230
|
);
|
|
11406
11231
|
}, [currentDate, events]);
|
|
11407
|
-
const allDayEvents =
|
|
11232
|
+
const allDayEvents = React32.useMemo(() => {
|
|
11408
11233
|
return dayEvents.filter((event) => {
|
|
11409
11234
|
return event.allDay || isMultiDayEvent(event);
|
|
11410
11235
|
});
|
|
11411
11236
|
}, [dayEvents]);
|
|
11412
|
-
const timeEvents =
|
|
11237
|
+
const timeEvents = React32.useMemo(() => {
|
|
11413
11238
|
return dayEvents.filter((event) => {
|
|
11414
11239
|
return !event.allDay && !isMultiDayEvent(event);
|
|
11415
11240
|
});
|
|
11416
11241
|
}, [dayEvents]);
|
|
11417
|
-
const positionedEvents =
|
|
11242
|
+
const positionedEvents = React32.useMemo(() => {
|
|
11418
11243
|
const result = [];
|
|
11419
11244
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
11420
11245
|
const sortedEvents = [...timeEvents].sort((a, b) => {
|
|
@@ -11603,8 +11428,8 @@ function DraggableEvent2({
|
|
|
11603
11428
|
"aria-hidden": ariaHidden
|
|
11604
11429
|
}) {
|
|
11605
11430
|
const { activeId } = useCalendarDnd();
|
|
11606
|
-
const elementRef =
|
|
11607
|
-
const [dragHandlePosition, setDragHandlePosition] =
|
|
11431
|
+
const elementRef = React32.useRef(null);
|
|
11432
|
+
const [dragHandlePosition, setDragHandlePosition] = React32.useState(null);
|
|
11608
11433
|
const eventStart = new Date(event.start);
|
|
11609
11434
|
const eventEnd = new Date(event.end);
|
|
11610
11435
|
const isMultiDayEvent2 = isMultiDay || event.allDay || dateFns.differenceInDays(eventEnd, eventStart) >= 1;
|
|
@@ -11729,11 +11554,11 @@ function EventCalendar({
|
|
|
11729
11554
|
className,
|
|
11730
11555
|
initialView = "month"
|
|
11731
11556
|
}) {
|
|
11732
|
-
const [currentDate, setCurrentDate] =
|
|
11733
|
-
const [view, setView] =
|
|
11734
|
-
const [isFading, setIsFading] =
|
|
11557
|
+
const [currentDate, setCurrentDate] = React32.useState(/* @__PURE__ */ new Date());
|
|
11558
|
+
const [view, setView] = React32.useState(initialView);
|
|
11559
|
+
const [isFading, setIsFading] = React32.useState(false);
|
|
11735
11560
|
const FADE_DURATION = 220;
|
|
11736
|
-
const changeView =
|
|
11561
|
+
const changeView = React32.useCallback(
|
|
11737
11562
|
(next) => {
|
|
11738
11563
|
if (next === view) return;
|
|
11739
11564
|
setIsFading(true);
|
|
@@ -11744,12 +11569,12 @@ function EventCalendar({
|
|
|
11744
11569
|
},
|
|
11745
11570
|
[view]
|
|
11746
11571
|
);
|
|
11747
|
-
const [isPaging, setIsPaging] =
|
|
11748
|
-
const [pageDirection, setPageDirection] =
|
|
11572
|
+
const [isPaging, setIsPaging] = React32.useState(false);
|
|
11573
|
+
const [pageDirection, setPageDirection] = React32.useState(
|
|
11749
11574
|
null
|
|
11750
11575
|
);
|
|
11751
11576
|
const PAGE_DURATION = 200;
|
|
11752
|
-
const pageTransition =
|
|
11577
|
+
const pageTransition = React32.useCallback(
|
|
11753
11578
|
(applyDateChange, direction) => {
|
|
11754
11579
|
setIsPaging(true);
|
|
11755
11580
|
setPageDirection(direction);
|
|
@@ -11763,11 +11588,11 @@ function EventCalendar({
|
|
|
11763
11588
|
},
|
|
11764
11589
|
[]
|
|
11765
11590
|
);
|
|
11766
|
-
const [isEventDialogOpen, setIsEventDialogOpen] =
|
|
11767
|
-
const [selectedEvent, setSelectedEvent] =
|
|
11591
|
+
const [isEventDialogOpen, setIsEventDialogOpen] = React32.useState(false);
|
|
11592
|
+
const [selectedEvent, setSelectedEvent] = React32.useState(
|
|
11768
11593
|
null
|
|
11769
11594
|
);
|
|
11770
|
-
|
|
11595
|
+
React32.useEffect(() => {
|
|
11771
11596
|
const handleKeyDown = (e) => {
|
|
11772
11597
|
if (isEventDialogOpen || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLElement && e.target.isContentEditable) {
|
|
11773
11598
|
return;
|
|
@@ -11909,7 +11734,7 @@ function EventCalendar({
|
|
|
11909
11734
|
position: "bottom-left"
|
|
11910
11735
|
});
|
|
11911
11736
|
};
|
|
11912
|
-
const viewTitle =
|
|
11737
|
+
const viewTitle = React32.useMemo(() => {
|
|
11913
11738
|
const capitalize = (s) => s && s.length > 0 ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
11914
11739
|
if (view === "month") {
|
|
11915
11740
|
return capitalize(dateFns.format(currentDate, "MMMM yyyy", { locale: locale.ptBR }));
|
|
@@ -12168,21 +11993,21 @@ function EventDialog({
|
|
|
12168
11993
|
onSave,
|
|
12169
11994
|
onDelete
|
|
12170
11995
|
}) {
|
|
12171
|
-
const [title, setTitle] =
|
|
12172
|
-
const [description, setDescription] =
|
|
12173
|
-
const [startDate, setStartDate] =
|
|
12174
|
-
const [endDate, setEndDate] =
|
|
12175
|
-
const [startTime, setStartTime] =
|
|
12176
|
-
const [endTime, setEndTime] =
|
|
12177
|
-
const [allDay, setAllDay] =
|
|
12178
|
-
const [location, setLocation] =
|
|
12179
|
-
const [color, setColor] =
|
|
12180
|
-
const [error, setError] =
|
|
12181
|
-
const [startDateOpen, setStartDateOpen] =
|
|
12182
|
-
const [endDateOpen, setEndDateOpen] =
|
|
12183
|
-
|
|
11996
|
+
const [title, setTitle] = React32.useState("");
|
|
11997
|
+
const [description, setDescription] = React32.useState("");
|
|
11998
|
+
const [startDate, setStartDate] = React32.useState(/* @__PURE__ */ new Date());
|
|
11999
|
+
const [endDate, setEndDate] = React32.useState(/* @__PURE__ */ new Date());
|
|
12000
|
+
const [startTime, setStartTime] = React32.useState(`${DefaultStartHour}:00`);
|
|
12001
|
+
const [endTime, setEndTime] = React32.useState(`${DefaultEndHour}:00`);
|
|
12002
|
+
const [allDay, setAllDay] = React32.useState(false);
|
|
12003
|
+
const [location, setLocation] = React32.useState("");
|
|
12004
|
+
const [color, setColor] = React32.useState("sky");
|
|
12005
|
+
const [error, setError] = React32.useState(null);
|
|
12006
|
+
const [startDateOpen, setStartDateOpen] = React32.useState(false);
|
|
12007
|
+
const [endDateOpen, setEndDateOpen] = React32.useState(false);
|
|
12008
|
+
React32.useEffect(() => {
|
|
12184
12009
|
}, [event]);
|
|
12185
|
-
const resetForm =
|
|
12010
|
+
const resetForm = React32.useCallback(() => {
|
|
12186
12011
|
setTitle("");
|
|
12187
12012
|
setDescription("");
|
|
12188
12013
|
setStartDate(/* @__PURE__ */ new Date());
|
|
@@ -12194,12 +12019,12 @@ function EventDialog({
|
|
|
12194
12019
|
setColor("sky");
|
|
12195
12020
|
setError(null);
|
|
12196
12021
|
}, []);
|
|
12197
|
-
const formatTimeForInput =
|
|
12022
|
+
const formatTimeForInput = React32.useCallback((date) => {
|
|
12198
12023
|
const hours = date.getHours().toString().padStart(2, "0");
|
|
12199
12024
|
const minutes = Math.floor(date.getMinutes() / 15) * 15;
|
|
12200
12025
|
return `${hours}:${minutes.toString().padStart(2, "0")}`;
|
|
12201
12026
|
}, []);
|
|
12202
|
-
|
|
12027
|
+
React32.useEffect(() => {
|
|
12203
12028
|
if (event) {
|
|
12204
12029
|
setTitle(event.title || "");
|
|
12205
12030
|
setDescription(event.description || "");
|
|
@@ -12217,7 +12042,7 @@ function EventDialog({
|
|
|
12217
12042
|
resetForm();
|
|
12218
12043
|
}
|
|
12219
12044
|
}, [event, formatTimeForInput, resetForm]);
|
|
12220
|
-
const timeOptions =
|
|
12045
|
+
const timeOptions = React32.useMemo(() => {
|
|
12221
12046
|
const options = [];
|
|
12222
12047
|
for (let hour = StartHour; hour <= EndHour; hour++) {
|
|
12223
12048
|
for (let minute = 0; minute < 60; minute += 15) {
|
|
@@ -12696,7 +12521,7 @@ function EventItem({
|
|
|
12696
12521
|
const eventColor = event.color;
|
|
12697
12522
|
const hasValidTime = isValidDate3(event.start) && isValidDate3(event.end) || isValidDate3(event.attend_date);
|
|
12698
12523
|
const colorClasses = hasValidTime ? getEventColorClasses(eventColor) : "bg-gray-200/50 hover:bg-gray-200/40 text-gray-900/80 dark:bg-gray-700/25 dark:text-gray-200/90 shadow-none";
|
|
12699
|
-
const displayStart =
|
|
12524
|
+
const displayStart = React32.useMemo(() => {
|
|
12700
12525
|
if (!hasValidTime) return void 0;
|
|
12701
12526
|
if (isValidDate3(event.start))
|
|
12702
12527
|
return currentTime || new Date(event.start);
|
|
@@ -12704,7 +12529,7 @@ function EventItem({
|
|
|
12704
12529
|
return currentTime || new Date(event.attend_date);
|
|
12705
12530
|
return void 0;
|
|
12706
12531
|
}, [currentTime, event.start, event.attend_date, hasValidTime]);
|
|
12707
|
-
const displayEnd =
|
|
12532
|
+
const displayEnd = React32.useMemo(() => {
|
|
12708
12533
|
if (!hasValidTime) return void 0;
|
|
12709
12534
|
if (isValidDate3(event.end)) {
|
|
12710
12535
|
return currentTime ? new Date(
|
|
@@ -12717,7 +12542,7 @@ function EventItem({
|
|
|
12717
12542
|
}
|
|
12718
12543
|
return void 0;
|
|
12719
12544
|
}, [currentTime, event.start, event.end, event.attend_date, hasValidTime]);
|
|
12720
|
-
const durationMinutes =
|
|
12545
|
+
const durationMinutes = React32.useMemo(() => {
|
|
12721
12546
|
if (!hasValidTime || !displayStart || !displayEnd) return 0;
|
|
12722
12547
|
return dateFns.differenceInMinutes(displayEnd, displayStart);
|
|
12723
12548
|
}, [displayStart, displayEnd, hasValidTime]);
|
|
@@ -12923,8 +12748,8 @@ function EventsPopup({
|
|
|
12923
12748
|
onClose,
|
|
12924
12749
|
onEventSelect
|
|
12925
12750
|
}) {
|
|
12926
|
-
const popupRef =
|
|
12927
|
-
|
|
12751
|
+
const popupRef = React32.useRef(null);
|
|
12752
|
+
React32.useEffect(() => {
|
|
12928
12753
|
const handleClickOutside = (event) => {
|
|
12929
12754
|
if (popupRef.current && !popupRef.current.contains(event.target)) {
|
|
12930
12755
|
onClose();
|
|
@@ -12935,7 +12760,7 @@ function EventsPopup({
|
|
|
12935
12760
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
12936
12761
|
};
|
|
12937
12762
|
}, [onClose]);
|
|
12938
|
-
|
|
12763
|
+
React32.useEffect(() => {
|
|
12939
12764
|
const handleEscKey = (event) => {
|
|
12940
12765
|
if (event.key === "Escape") {
|
|
12941
12766
|
onClose();
|
|
@@ -12950,7 +12775,7 @@ function EventsPopup({
|
|
|
12950
12775
|
if (onEventSelect) onEventSelect(event);
|
|
12951
12776
|
onClose();
|
|
12952
12777
|
};
|
|
12953
|
-
const adjustedPosition =
|
|
12778
|
+
const adjustedPosition = React32.useMemo(() => {
|
|
12954
12779
|
const positionCopy = { ...position };
|
|
12955
12780
|
if (popupRef.current) {
|
|
12956
12781
|
const rect = popupRef.current.getBoundingClientRect();
|
|
@@ -13028,9 +12853,9 @@ function EventsPopup({
|
|
|
13028
12853
|
);
|
|
13029
12854
|
}
|
|
13030
12855
|
function useCurrentTimeIndicator(currentDate, view) {
|
|
13031
|
-
const [currentTimePosition, setCurrentTimePosition] =
|
|
13032
|
-
const [currentTimeVisible, setCurrentTimeVisible] =
|
|
13033
|
-
|
|
12856
|
+
const [currentTimePosition, setCurrentTimePosition] = React32.useState(0);
|
|
12857
|
+
const [currentTimeVisible, setCurrentTimeVisible] = React32.useState(false);
|
|
12858
|
+
React32.useEffect(() => {
|
|
13034
12859
|
const calculateTimePosition = () => {
|
|
13035
12860
|
const now = /* @__PURE__ */ new Date();
|
|
13036
12861
|
const hours = now.getHours();
|
|
@@ -13063,10 +12888,10 @@ function useEventVisibility({
|
|
|
13063
12888
|
eventHeight,
|
|
13064
12889
|
eventGap
|
|
13065
12890
|
}) {
|
|
13066
|
-
const contentRef =
|
|
13067
|
-
const observerRef =
|
|
13068
|
-
const [contentHeight, setContentHeight] =
|
|
13069
|
-
|
|
12891
|
+
const contentRef = React32.useRef(null);
|
|
12892
|
+
const observerRef = React32.useRef(null);
|
|
12893
|
+
const [contentHeight, setContentHeight] = React32.useState(null);
|
|
12894
|
+
React32.useLayoutEffect(() => {
|
|
13070
12895
|
if (!contentRef.current) return;
|
|
13071
12896
|
const updateHeight = () => {
|
|
13072
12897
|
if (contentRef.current) {
|
|
@@ -13086,7 +12911,7 @@ function useEventVisibility({
|
|
|
13086
12911
|
}
|
|
13087
12912
|
};
|
|
13088
12913
|
}, []);
|
|
13089
|
-
const getVisibleEventCount =
|
|
12914
|
+
const getVisibleEventCount = React32.useMemo(() => {
|
|
13090
12915
|
return (totalEvents) => {
|
|
13091
12916
|
if (!contentHeight) return totalEvents;
|
|
13092
12917
|
const maxEvents = Math.floor(contentHeight / (eventHeight + eventGap));
|
|
@@ -13108,21 +12933,21 @@ function MonthView({
|
|
|
13108
12933
|
onEventSelect,
|
|
13109
12934
|
onEventCreate
|
|
13110
12935
|
}) {
|
|
13111
|
-
const days =
|
|
12936
|
+
const days = React32.useMemo(() => {
|
|
13112
12937
|
const monthStart = dateFns.startOfMonth(currentDate);
|
|
13113
12938
|
const monthEnd = dateFns.endOfMonth(monthStart);
|
|
13114
12939
|
const calendarStart = dateFns.startOfWeek(monthStart, { weekStartsOn: 0 });
|
|
13115
12940
|
const calendarEnd = dateFns.endOfWeek(monthEnd, { weekStartsOn: 0 });
|
|
13116
12941
|
return dateFns.eachDayOfInterval({ end: calendarEnd, start: calendarStart });
|
|
13117
12942
|
}, [currentDate]);
|
|
13118
|
-
const weekdays =
|
|
12943
|
+
const weekdays = React32.useMemo(() => {
|
|
13119
12944
|
return Array.from({ length: 7 }).map((_, i) => {
|
|
13120
12945
|
const date = dateFns.addDays(dateFns.startOfWeek(/* @__PURE__ */ new Date(), { weekStartsOn: 0 }), i);
|
|
13121
12946
|
const short = dateFns.format(date, "EEE", { locale: locale.ptBR });
|
|
13122
12947
|
return short.charAt(0).toUpperCase() + short.slice(1);
|
|
13123
12948
|
});
|
|
13124
12949
|
}, []);
|
|
13125
|
-
const weeks =
|
|
12950
|
+
const weeks = React32.useMemo(() => {
|
|
13126
12951
|
const result = [];
|
|
13127
12952
|
let week = [];
|
|
13128
12953
|
for (let i = 0; i < days.length; i++) {
|
|
@@ -13138,12 +12963,12 @@ function MonthView({
|
|
|
13138
12963
|
e.stopPropagation();
|
|
13139
12964
|
onEventSelect(event);
|
|
13140
12965
|
};
|
|
13141
|
-
const [isMounted, setIsMounted] =
|
|
12966
|
+
const [isMounted, setIsMounted] = React32.useState(false);
|
|
13142
12967
|
const { contentRef, getVisibleEventCount } = useEventVisibility({
|
|
13143
12968
|
eventGap: EventGap,
|
|
13144
12969
|
eventHeight: EventHeight
|
|
13145
12970
|
});
|
|
13146
|
-
|
|
12971
|
+
React32.useEffect(() => {
|
|
13147
12972
|
setIsMounted(true);
|
|
13148
12973
|
}, []);
|
|
13149
12974
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "contents", "data-slot": "month-view", children: [
|
|
@@ -13417,23 +13242,23 @@ function WeekView({
|
|
|
13417
13242
|
onEventSelect,
|
|
13418
13243
|
onEventCreate
|
|
13419
13244
|
}) {
|
|
13420
|
-
const days =
|
|
13245
|
+
const days = React32.useMemo(() => {
|
|
13421
13246
|
const weekStart2 = dateFns.startOfWeek(currentDate, { weekStartsOn: 0 });
|
|
13422
13247
|
const weekEnd = dateFns.endOfWeek(currentDate, { weekStartsOn: 0 });
|
|
13423
13248
|
return dateFns.eachDayOfInterval({ end: weekEnd, start: weekStart2 });
|
|
13424
13249
|
}, [currentDate]);
|
|
13425
|
-
const weekStart =
|
|
13250
|
+
const weekStart = React32.useMemo(
|
|
13426
13251
|
() => dateFns.startOfWeek(currentDate, { weekStartsOn: 0 }),
|
|
13427
13252
|
[currentDate]
|
|
13428
13253
|
);
|
|
13429
|
-
const hours =
|
|
13254
|
+
const hours = React32.useMemo(() => {
|
|
13430
13255
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
13431
13256
|
return dateFns.eachHourOfInterval({
|
|
13432
13257
|
end: dateFns.addHours(dayStart, EndHour - 1),
|
|
13433
13258
|
start: dateFns.addHours(dayStart, StartHour)
|
|
13434
13259
|
});
|
|
13435
13260
|
}, [currentDate]);
|
|
13436
|
-
const allDayEvents =
|
|
13261
|
+
const allDayEvents = React32.useMemo(() => {
|
|
13437
13262
|
return events.filter((event) => {
|
|
13438
13263
|
return event.allDay || isMultiDayEvent(event);
|
|
13439
13264
|
}).filter((event) => {
|
|
@@ -13444,7 +13269,7 @@ function WeekView({
|
|
|
13444
13269
|
);
|
|
13445
13270
|
});
|
|
13446
13271
|
}, [events, days]);
|
|
13447
|
-
const processedDayEvents =
|
|
13272
|
+
const processedDayEvents = React32.useMemo(() => {
|
|
13448
13273
|
const result = days.map((day) => {
|
|
13449
13274
|
const dayEvents = events.filter((event) => {
|
|
13450
13275
|
if (event.allDay || isMultiDayEvent(event)) return false;
|
|
@@ -13733,8 +13558,8 @@ function AvatarCombobox({
|
|
|
13733
13558
|
className,
|
|
13734
13559
|
colors: colors2
|
|
13735
13560
|
}) {
|
|
13736
|
-
const [open, setOpen] =
|
|
13737
|
-
const id =
|
|
13561
|
+
const [open, setOpen] = React32.useState(false);
|
|
13562
|
+
const id = React32.useId();
|
|
13738
13563
|
const allItems = items || (groupItems ? Object.values(groupItems).flat() : []);
|
|
13739
13564
|
const selectedItem = allItems.find((item) => item.value === selected);
|
|
13740
13565
|
const renderItem = (item) => {
|
|
@@ -13872,13 +13697,13 @@ function MultiSelect({
|
|
|
13872
13697
|
clickToRemove = true,
|
|
13873
13698
|
overflowBehavior = "wrap-when-open"
|
|
13874
13699
|
}) {
|
|
13875
|
-
const [page, setPage] =
|
|
13876
|
-
const [animating, setAnimating] =
|
|
13700
|
+
const [page, setPage] = React32.useState(1);
|
|
13701
|
+
const [animating, setAnimating] = React32.useState(false);
|
|
13877
13702
|
const groupCount = groupItems ? Object.keys(groupItems).length : 0;
|
|
13878
|
-
|
|
13703
|
+
React32.useEffect(() => {
|
|
13879
13704
|
setPage(1);
|
|
13880
13705
|
}, [items?.length, groupCount, pagination]);
|
|
13881
|
-
const paged =
|
|
13706
|
+
const paged = React32.useMemo(() => {
|
|
13882
13707
|
if (!pagination || pagination <= 0) return null;
|
|
13883
13708
|
if (groupItems) {
|
|
13884
13709
|
const flattened = Object.keys(groupItems).flatMap(
|
|
@@ -13909,13 +13734,13 @@ function MultiSelect({
|
|
|
13909
13734
|
}, [items, groupItems, page, pagination]);
|
|
13910
13735
|
const goPrev = () => setPage((p) => Math.max(1, p - 1));
|
|
13911
13736
|
const goNext = () => setPage((p) => paged ? Math.min(paged.totalPages, p + 1) : p + 1);
|
|
13912
|
-
|
|
13737
|
+
React32.useEffect(() => {
|
|
13913
13738
|
if (!pagination) return;
|
|
13914
13739
|
setAnimating(true);
|
|
13915
13740
|
const id = setTimeout(() => setAnimating(false), 220);
|
|
13916
13741
|
return () => clearTimeout(id);
|
|
13917
13742
|
}, [page, pagination]);
|
|
13918
|
-
const initialItems =
|
|
13743
|
+
const initialItems = React32.useMemo(() => {
|
|
13919
13744
|
if (groupItems) {
|
|
13920
13745
|
return Object.values(groupItems).flat();
|
|
13921
13746
|
}
|
|
@@ -13964,7 +13789,7 @@ function MultiSelect({
|
|
|
13964
13789
|
"div",
|
|
13965
13790
|
{
|
|
13966
13791
|
className: `transition-all duration-200 ${animating ? "opacity-0 -translate-y-1" : "opacity-100 translate-y-0"}`,
|
|
13967
|
-
children: paged && "grouped" in paged ? Object.keys(paged.grouped).map((key, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13792
|
+
children: paged && "grouped" in paged ? Object.keys(paged.grouped).map((key, index) => /* @__PURE__ */ jsxRuntime.jsxs(React32__namespace.default.Fragment, { children: [
|
|
13968
13793
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13969
13794
|
MultiSelectGroupBase,
|
|
13970
13795
|
{
|
|
@@ -14031,7 +13856,7 @@ function MultiSelect({
|
|
|
14031
13856
|
)
|
|
14032
13857
|
] })
|
|
14033
13858
|
] })
|
|
14034
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: groupItems ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: Object.keys(groupItems).map((key, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13859
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: groupItems ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: Object.keys(groupItems).map((key, index) => /* @__PURE__ */ jsxRuntime.jsxs(React32__namespace.default.Fragment, { children: [
|
|
14035
13860
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14036
13861
|
MultiSelectGroupBase,
|
|
14037
13862
|
{
|
|
@@ -14416,11 +14241,11 @@ function PeriodsDropdown({
|
|
|
14416
14241
|
activePeriods
|
|
14417
14242
|
}) {
|
|
14418
14243
|
const periods = processedData.map((d) => String(d.name));
|
|
14419
|
-
const [open, setOpen] =
|
|
14420
|
-
const wrapperRef =
|
|
14421
|
-
const firstItemRef =
|
|
14422
|
-
const listRef =
|
|
14423
|
-
|
|
14244
|
+
const [open, setOpen] = React32.useState(false);
|
|
14245
|
+
const wrapperRef = React32.useRef(null);
|
|
14246
|
+
const firstItemRef = React32.useRef(null);
|
|
14247
|
+
const listRef = React32.useRef(null);
|
|
14248
|
+
React32.useEffect(() => {
|
|
14424
14249
|
const handleClickOutside = (e) => {
|
|
14425
14250
|
if (!wrapperRef.current) return;
|
|
14426
14251
|
if (!wrapperRef.current.contains(e.target)) setOpen(false);
|
|
@@ -14435,7 +14260,7 @@ function PeriodsDropdown({
|
|
|
14435
14260
|
document.removeEventListener("keydown", handleEscape);
|
|
14436
14261
|
};
|
|
14437
14262
|
}, []);
|
|
14438
|
-
|
|
14263
|
+
React32.useEffect(() => {
|
|
14439
14264
|
if (open && firstItemRef.current) {
|
|
14440
14265
|
firstItemRef.current.focus();
|
|
14441
14266
|
}
|
|
@@ -14839,12 +14664,12 @@ var DraggableTooltipComponent = ({
|
|
|
14839
14664
|
valueFormatter,
|
|
14840
14665
|
categoryFormatter
|
|
14841
14666
|
}) => {
|
|
14842
|
-
const visibleKeys =
|
|
14667
|
+
const visibleKeys = React32.useMemo(
|
|
14843
14668
|
() => showOnlyHighlighted && highlightedSeries && highlightedSeries.size > 0 ? dataKeys.filter((k) => highlightedSeries.has(k)) : dataKeys,
|
|
14844
14669
|
[showOnlyHighlighted, highlightedSeries, dataKeys]
|
|
14845
14670
|
);
|
|
14846
|
-
const TotalDisplay =
|
|
14847
|
-
const total =
|
|
14671
|
+
const TotalDisplay = React32__namespace.default.memo(({ data: data2, visibleKeys: visibleKeys2, valueFormatter: localformatter }) => {
|
|
14672
|
+
const total = React32.useMemo(() => {
|
|
14848
14673
|
const numeric = visibleKeys2.map((k) => data2[k]).filter((v) => typeof v === "number");
|
|
14849
14674
|
return numeric.reduce((s, v) => s + (v || 0), 0);
|
|
14850
14675
|
}, [data2, visibleKeys2]);
|
|
@@ -14866,14 +14691,14 @@ var DraggableTooltipComponent = ({
|
|
|
14866
14691
|
)
|
|
14867
14692
|
] });
|
|
14868
14693
|
});
|
|
14869
|
-
const [localPos, setLocalPos] =
|
|
14870
|
-
const [dragging, setDragging] =
|
|
14871
|
-
const offsetRef =
|
|
14872
|
-
const lastMouse =
|
|
14873
|
-
const [alignmentGuides, setAlignmentGuides] =
|
|
14874
|
-
const [globalTooltipCountLocal, setGlobalTooltipCountLocal] =
|
|
14875
|
-
|
|
14876
|
-
const getAllTooltips =
|
|
14694
|
+
const [localPos, setLocalPos] = React32.useState(position);
|
|
14695
|
+
const [dragging, setDragging] = React32.useState(false);
|
|
14696
|
+
const offsetRef = React32.useRef({ x: 0, y: 0 });
|
|
14697
|
+
const lastMouse = React32.useRef({ x: 0, y: 0 });
|
|
14698
|
+
const [alignmentGuides, setAlignmentGuides] = React32.useState([]);
|
|
14699
|
+
const [globalTooltipCountLocal, setGlobalTooltipCountLocal] = React32.useState(0);
|
|
14700
|
+
React32.useEffect(() => setLocalPos(position), [position]);
|
|
14701
|
+
const getAllTooltips = React32.useCallback(() => {
|
|
14877
14702
|
const response = [];
|
|
14878
14703
|
const ev = new CustomEvent("requestGlobalTooltips", {
|
|
14879
14704
|
detail: { requesterId: id, response }
|
|
@@ -14881,7 +14706,7 @@ var DraggableTooltipComponent = ({
|
|
|
14881
14706
|
window.dispatchEvent(ev);
|
|
14882
14707
|
return response;
|
|
14883
14708
|
}, [id]);
|
|
14884
|
-
const updateAlignmentGuides =
|
|
14709
|
+
const updateAlignmentGuides = React32.useCallback(
|
|
14885
14710
|
(currentPosition) => {
|
|
14886
14711
|
const allTooltips = getAllTooltips();
|
|
14887
14712
|
const otherTooltips = allTooltips.filter((t) => t.id !== id);
|
|
@@ -14930,7 +14755,7 @@ var DraggableTooltipComponent = ({
|
|
|
14930
14755
|
},
|
|
14931
14756
|
[getAllTooltips, id]
|
|
14932
14757
|
);
|
|
14933
|
-
const snapToGuides =
|
|
14758
|
+
const snapToGuides = React32.useCallback(
|
|
14934
14759
|
(position2) => {
|
|
14935
14760
|
const snappedPosition = { ...position2 };
|
|
14936
14761
|
let hasSnapped = false;
|
|
@@ -14977,7 +14802,7 @@ var DraggableTooltipComponent = ({
|
|
|
14977
14802
|
},
|
|
14978
14803
|
[alignmentGuides]
|
|
14979
14804
|
);
|
|
14980
|
-
|
|
14805
|
+
React32.useEffect(() => {
|
|
14981
14806
|
let rafId = null;
|
|
14982
14807
|
const handleMouseMove = (e) => {
|
|
14983
14808
|
if (!dragging) return;
|
|
@@ -15051,7 +14876,7 @@ var DraggableTooltipComponent = ({
|
|
|
15051
14876
|
document.body.style.userSelect = "";
|
|
15052
14877
|
};
|
|
15053
14878
|
}, [dragging, snapToGuides, updateAlignmentGuides, id, onPositionChange]);
|
|
15054
|
-
|
|
14879
|
+
React32.useEffect(() => {
|
|
15055
14880
|
const handleCloseAll = () => onClose(id);
|
|
15056
14881
|
const handleRequestTooltipCount = () => {
|
|
15057
14882
|
window.dispatchEvent(
|
|
@@ -15082,7 +14907,7 @@ var DraggableTooltipComponent = ({
|
|
|
15082
14907
|
});
|
|
15083
14908
|
};
|
|
15084
14909
|
}, [id, localPos, onClose]);
|
|
15085
|
-
|
|
14910
|
+
React32.useEffect(() => {
|
|
15086
14911
|
if (dragging) return;
|
|
15087
14912
|
let total = 0;
|
|
15088
14913
|
const timeoutId = setTimeout(() => {
|
|
@@ -15100,7 +14925,7 @@ var DraggableTooltipComponent = ({
|
|
|
15100
14925
|
}, 0);
|
|
15101
14926
|
return () => clearTimeout(timeoutId);
|
|
15102
14927
|
}, [localPos, dragging]);
|
|
15103
|
-
|
|
14928
|
+
React32.useEffect(() => {
|
|
15104
14929
|
const recount = () => {
|
|
15105
14930
|
if (dragging) return;
|
|
15106
14931
|
let total = 0;
|
|
@@ -15118,7 +14943,7 @@ var DraggableTooltipComponent = ({
|
|
|
15118
14943
|
window.addEventListener("recountTooltips", recount);
|
|
15119
14944
|
return () => window.removeEventListener("recountTooltips", recount);
|
|
15120
14945
|
}, [dragging]);
|
|
15121
|
-
const handleMouseDownLocal =
|
|
14946
|
+
const handleMouseDownLocal = React32.useCallback(
|
|
15122
14947
|
(e) => {
|
|
15123
14948
|
e.preventDefault();
|
|
15124
14949
|
e.stopPropagation();
|
|
@@ -15129,7 +14954,7 @@ var DraggableTooltipComponent = ({
|
|
|
15129
14954
|
},
|
|
15130
14955
|
[id, onMouseDown]
|
|
15131
14956
|
);
|
|
15132
|
-
const handleTouchStartLocal =
|
|
14957
|
+
const handleTouchStartLocal = React32.useCallback(
|
|
15133
14958
|
(e) => {
|
|
15134
14959
|
e.preventDefault();
|
|
15135
14960
|
e.stopPropagation();
|
|
@@ -15145,7 +14970,7 @@ var DraggableTooltipComponent = ({
|
|
|
15145
14970
|
},
|
|
15146
14971
|
[id, onMouseDown]
|
|
15147
14972
|
);
|
|
15148
|
-
const handleCloseClick =
|
|
14973
|
+
const handleCloseClick = React32.useCallback(
|
|
15149
14974
|
(e) => {
|
|
15150
14975
|
e.stopPropagation();
|
|
15151
14976
|
onClose(id);
|
|
@@ -15291,7 +15116,7 @@ var DraggableTooltipComponent = ({
|
|
|
15291
15116
|
] }) }),
|
|
15292
15117
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 pt-2 space-y-2", children: [
|
|
15293
15118
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2", children: dataLabel }),
|
|
15294
|
-
|
|
15119
|
+
React32.useMemo(
|
|
15295
15120
|
() => visibleKeys.map((key) => {
|
|
15296
15121
|
const value = data[key];
|
|
15297
15122
|
if (value === void 0) return null;
|
|
@@ -15409,7 +15234,7 @@ var DraggableTooltipComponent = ({
|
|
|
15409
15234
|
)
|
|
15410
15235
|
] });
|
|
15411
15236
|
};
|
|
15412
|
-
var DraggableTooltip =
|
|
15237
|
+
var DraggableTooltip = React32__namespace.default.memo(DraggableTooltipComponent);
|
|
15413
15238
|
DraggableTooltip.displayName = "DraggableTooltip";
|
|
15414
15239
|
var DraggableTooltip_default = DraggableTooltip;
|
|
15415
15240
|
var RechartTooltipWithTotal = ({
|
|
@@ -15688,13 +15513,13 @@ var SystemTooltip = ({
|
|
|
15688
15513
|
onClose,
|
|
15689
15514
|
onPositionChange
|
|
15690
15515
|
}) => {
|
|
15691
|
-
const [localPos, setLocalPos] =
|
|
15692
|
-
const [dragging, setDragging] =
|
|
15693
|
-
const [expandedId, setExpandedId] =
|
|
15694
|
-
const offsetRef =
|
|
15695
|
-
const lastMouse =
|
|
15696
|
-
|
|
15697
|
-
|
|
15516
|
+
const [localPos, setLocalPos] = React32.useState(position);
|
|
15517
|
+
const [dragging, setDragging] = React32.useState(false);
|
|
15518
|
+
const [expandedId, setExpandedId] = React32.useState(null);
|
|
15519
|
+
const offsetRef = React32.useRef({ x: 0, y: 0 });
|
|
15520
|
+
const lastMouse = React32.useRef({ x: 0, y: 0 });
|
|
15521
|
+
React32.useEffect(() => setLocalPos(position), [position]);
|
|
15522
|
+
React32.useEffect(() => {
|
|
15698
15523
|
let rafId = null;
|
|
15699
15524
|
const handleMouseMove = (e) => {
|
|
15700
15525
|
if (!dragging) return;
|
|
@@ -15733,7 +15558,7 @@ var SystemTooltip = ({
|
|
|
15733
15558
|
document.body.style.userSelect = "";
|
|
15734
15559
|
};
|
|
15735
15560
|
}, [dragging, id, onPositionChange]);
|
|
15736
|
-
const handleMouseDownLocal =
|
|
15561
|
+
const handleMouseDownLocal = React32.useCallback(
|
|
15737
15562
|
(e) => {
|
|
15738
15563
|
e.preventDefault();
|
|
15739
15564
|
e.stopPropagation();
|
|
@@ -15745,7 +15570,7 @@ var SystemTooltip = ({
|
|
|
15745
15570
|
},
|
|
15746
15571
|
[id, onMouseDown]
|
|
15747
15572
|
);
|
|
15748
|
-
const handleTouchStartLocal =
|
|
15573
|
+
const handleTouchStartLocal = React32.useCallback(
|
|
15749
15574
|
(e) => {
|
|
15750
15575
|
e.stopPropagation();
|
|
15751
15576
|
const touch = e.touches[0];
|
|
@@ -15761,11 +15586,11 @@ var SystemTooltip = ({
|
|
|
15761
15586
|
},
|
|
15762
15587
|
[id, onMouseDown]
|
|
15763
15588
|
);
|
|
15764
|
-
const entries =
|
|
15589
|
+
const entries = React32.useMemo(
|
|
15765
15590
|
() => data.connections.filter((c) => c.type === "entrada"),
|
|
15766
15591
|
[data.connections]
|
|
15767
15592
|
);
|
|
15768
|
-
const exits =
|
|
15593
|
+
const exits = React32.useMemo(
|
|
15769
15594
|
() => data.connections.filter((c) => c.type === "saida"),
|
|
15770
15595
|
[data.connections]
|
|
15771
15596
|
);
|
|
@@ -16837,11 +16662,11 @@ var NoData = ({
|
|
|
16837
16662
|
};
|
|
16838
16663
|
var NoData_default = NoData;
|
|
16839
16664
|
var useChartHighlights = () => {
|
|
16840
|
-
const [highlightedSeries, setHighlightedSeries] =
|
|
16665
|
+
const [highlightedSeries, setHighlightedSeries] = React32.useState(
|
|
16841
16666
|
/* @__PURE__ */ new Set()
|
|
16842
16667
|
);
|
|
16843
|
-
const [showOnlyHighlighted, setShowOnlyHighlighted] =
|
|
16844
|
-
const toggleHighlight =
|
|
16668
|
+
const [showOnlyHighlighted, setShowOnlyHighlighted] = React32.useState(false);
|
|
16669
|
+
const toggleHighlight = React32.useCallback((key) => {
|
|
16845
16670
|
setHighlightedSeries((prev) => {
|
|
16846
16671
|
const next = new Set(prev);
|
|
16847
16672
|
if (next.has(key)) {
|
|
@@ -16852,17 +16677,17 @@ var useChartHighlights = () => {
|
|
|
16852
16677
|
return next;
|
|
16853
16678
|
});
|
|
16854
16679
|
}, []);
|
|
16855
|
-
const clearHighlights =
|
|
16680
|
+
const clearHighlights = React32.useCallback(() => {
|
|
16856
16681
|
setHighlightedSeries(/* @__PURE__ */ new Set());
|
|
16857
16682
|
setShowOnlyHighlighted(false);
|
|
16858
16683
|
}, []);
|
|
16859
|
-
const isHighlighted =
|
|
16684
|
+
const isHighlighted = React32.useCallback(
|
|
16860
16685
|
(key) => {
|
|
16861
16686
|
return highlightedSeries.has(key);
|
|
16862
16687
|
},
|
|
16863
16688
|
[highlightedSeries]
|
|
16864
16689
|
);
|
|
16865
|
-
const getSeriesStyle =
|
|
16690
|
+
const getSeriesStyle = React32.useCallback(
|
|
16866
16691
|
(key) => {
|
|
16867
16692
|
const hasHighlights = highlightedSeries.size > 0;
|
|
16868
16693
|
const isSeriesHighlighted = highlightedSeries.has(key);
|
|
@@ -16907,9 +16732,9 @@ var useChartHighlights = () => {
|
|
|
16907
16732
|
};
|
|
16908
16733
|
};
|
|
16909
16734
|
var useChartDimensions = () => {
|
|
16910
|
-
const wrapperRef =
|
|
16911
|
-
const [measuredWidth, setMeasuredWidth] =
|
|
16912
|
-
|
|
16735
|
+
const wrapperRef = React32.useRef(null);
|
|
16736
|
+
const [measuredWidth, setMeasuredWidth] = React32.useState(null);
|
|
16737
|
+
React32.useLayoutEffect(() => {
|
|
16913
16738
|
const el = wrapperRef.current;
|
|
16914
16739
|
if (!el) return;
|
|
16915
16740
|
const ro = new ResizeObserver((entries) => {
|
|
@@ -16925,11 +16750,11 @@ var useChartDimensions = () => {
|
|
|
16925
16750
|
return { wrapperRef, measuredWidth };
|
|
16926
16751
|
};
|
|
16927
16752
|
var useChartTooltips = (maxTooltips = 5) => {
|
|
16928
|
-
const [activeTooltips, setActiveTooltips] =
|
|
16929
|
-
|
|
16753
|
+
const [activeTooltips, setActiveTooltips] = React32.useState([]);
|
|
16754
|
+
React32.useEffect(() => {
|
|
16930
16755
|
window.dispatchEvent(new Event("recountTooltips"));
|
|
16931
16756
|
}, [activeTooltips.length]);
|
|
16932
|
-
const toggleTooltip =
|
|
16757
|
+
const toggleTooltip = React32.useCallback(
|
|
16933
16758
|
(tooltipId, data, basePosition) => {
|
|
16934
16759
|
const existingIndex = activeTooltips.findIndex((t) => t.id === tooltipId);
|
|
16935
16760
|
if (existingIndex !== -1) {
|
|
@@ -16958,7 +16783,7 @@ var useChartTooltips = (maxTooltips = 5) => {
|
|
|
16958
16783
|
},
|
|
16959
16784
|
[activeTooltips, maxTooltips]
|
|
16960
16785
|
);
|
|
16961
|
-
const onTooltipPositionChange =
|
|
16786
|
+
const onTooltipPositionChange = React32.useCallback(
|
|
16962
16787
|
(id, position) => {
|
|
16963
16788
|
setActiveTooltips(
|
|
16964
16789
|
(prev) => prev.map((t) => t.id === id ? { ...t, position } : t)
|
|
@@ -16966,10 +16791,10 @@ var useChartTooltips = (maxTooltips = 5) => {
|
|
|
16966
16791
|
},
|
|
16967
16792
|
[]
|
|
16968
16793
|
);
|
|
16969
|
-
const closeTooltip =
|
|
16794
|
+
const closeTooltip = React32.useCallback((id) => {
|
|
16970
16795
|
setActiveTooltips((prev) => prev.filter((t) => t.id !== id));
|
|
16971
16796
|
}, []);
|
|
16972
|
-
const closeAllTooltips =
|
|
16797
|
+
const closeAllTooltips = React32.useCallback(() => {
|
|
16973
16798
|
setActiveTooltips([]);
|
|
16974
16799
|
}, []);
|
|
16975
16800
|
return {
|
|
@@ -16987,7 +16812,7 @@ var useChartClick = ({
|
|
|
16987
16812
|
toggleTooltip,
|
|
16988
16813
|
setActiveTooltips
|
|
16989
16814
|
}) => {
|
|
16990
|
-
const handleChartClick =
|
|
16815
|
+
const handleChartClick = React32.useCallback(
|
|
16991
16816
|
(e) => {
|
|
16992
16817
|
if (!enableDraggableTooltips) return;
|
|
16993
16818
|
const ev = e;
|
|
@@ -17005,7 +16830,7 @@ var useChartClick = ({
|
|
|
17005
16830
|
},
|
|
17006
16831
|
[enableDraggableTooltips, xAxisDataKey, toggleTooltip, setActiveTooltips]
|
|
17007
16832
|
);
|
|
17008
|
-
const handleBarClick =
|
|
16833
|
+
const handleBarClick = React32.useCallback(
|
|
17009
16834
|
(data, index, event) => {
|
|
17010
16835
|
if (!enableDraggableTooltips) return;
|
|
17011
16836
|
event.stopPropagation();
|
|
@@ -17019,7 +16844,7 @@ var useChartClick = ({
|
|
|
17019
16844
|
},
|
|
17020
16845
|
[enableDraggableTooltips, xAxisDataKey, toggleTooltip]
|
|
17021
16846
|
);
|
|
17022
|
-
const handleSeriesClick =
|
|
16847
|
+
const handleSeriesClick = React32.useCallback(
|
|
17023
16848
|
(...args) => {
|
|
17024
16849
|
if (args.length >= 3) {
|
|
17025
16850
|
const [data, index, event] = args;
|
|
@@ -17042,16 +16867,16 @@ function useTimeSeriesRange({
|
|
|
17042
16867
|
defaultEndIndex,
|
|
17043
16868
|
onRangeChange
|
|
17044
16869
|
}) {
|
|
17045
|
-
const [startIndex, setStartIndex] =
|
|
17046
|
-
const [endIndex, setEndIndex] =
|
|
16870
|
+
const [startIndex, setStartIndex] = React32.useState(defaultStartIndex);
|
|
16871
|
+
const [endIndex, setEndIndex] = React32.useState(
|
|
17047
16872
|
defaultEndIndex ?? Math.max(0, dataLength - 1)
|
|
17048
16873
|
);
|
|
17049
|
-
const [isDragging, setIsDragging] =
|
|
17050
|
-
const [dragStartX, setDragStartX] =
|
|
17051
|
-
const [initialStartIndex, setInitialStartIndex] =
|
|
17052
|
-
const [initialEndIndex, setInitialEndIndex] =
|
|
17053
|
-
const brushRef =
|
|
17054
|
-
|
|
16874
|
+
const [isDragging, setIsDragging] = React32.useState(null);
|
|
16875
|
+
const [dragStartX, setDragStartX] = React32.useState(0);
|
|
16876
|
+
const [initialStartIndex, setInitialStartIndex] = React32.useState(0);
|
|
16877
|
+
const [initialEndIndex, setInitialEndIndex] = React32.useState(0);
|
|
16878
|
+
const brushRef = React32.useRef(null);
|
|
16879
|
+
React32.useEffect(() => {
|
|
17055
16880
|
if (dataLength > 0) {
|
|
17056
16881
|
setStartIndex((prev) => Math.min(prev, dataLength - 1));
|
|
17057
16882
|
setEndIndex((prev) => {
|
|
@@ -17062,7 +16887,7 @@ function useTimeSeriesRange({
|
|
|
17062
16887
|
});
|
|
17063
16888
|
}
|
|
17064
16889
|
}, [dataLength, defaultEndIndex]);
|
|
17065
|
-
const handleRangeChange =
|
|
16890
|
+
const handleRangeChange = React32.useCallback(
|
|
17066
16891
|
(newStart, newEnd) => {
|
|
17067
16892
|
const clampedStart = Math.max(0, Math.min(newStart, dataLength - 1));
|
|
17068
16893
|
const clampedEnd = Math.max(
|
|
@@ -17077,7 +16902,7 @@ function useTimeSeriesRange({
|
|
|
17077
16902
|
},
|
|
17078
16903
|
[dataLength, onRangeChange]
|
|
17079
16904
|
);
|
|
17080
|
-
const handleMouseDown =
|
|
16905
|
+
const handleMouseDown = React32.useCallback(
|
|
17081
16906
|
(e, type) => {
|
|
17082
16907
|
e.preventDefault();
|
|
17083
16908
|
const isTouchEvent = "touches" in e;
|
|
@@ -17089,7 +16914,7 @@ function useTimeSeriesRange({
|
|
|
17089
16914
|
},
|
|
17090
16915
|
[startIndex, endIndex]
|
|
17091
16916
|
);
|
|
17092
|
-
const handleMouseMove =
|
|
16917
|
+
const handleMouseMove = React32.useCallback(
|
|
17093
16918
|
(e) => {
|
|
17094
16919
|
if (!isDragging || !brushRef.current) return;
|
|
17095
16920
|
const isTouchEvent = "touches" in e;
|
|
@@ -17134,10 +16959,10 @@ function useTimeSeriesRange({
|
|
|
17134
16959
|
handleRangeChange
|
|
17135
16960
|
]
|
|
17136
16961
|
);
|
|
17137
|
-
const handleMouseUp =
|
|
16962
|
+
const handleMouseUp = React32.useCallback(() => {
|
|
17138
16963
|
setIsDragging(null);
|
|
17139
16964
|
}, []);
|
|
17140
|
-
|
|
16965
|
+
React32.useEffect(() => {
|
|
17141
16966
|
if (isDragging) {
|
|
17142
16967
|
document.addEventListener("mousemove", handleMouseMove);
|
|
17143
16968
|
document.addEventListener("mouseup", handleMouseUp);
|
|
@@ -17165,7 +16990,7 @@ var useChartMinMax = ({
|
|
|
17165
16990
|
xAxisDataKey,
|
|
17166
16991
|
categoryFormatter
|
|
17167
16992
|
}) => {
|
|
17168
|
-
return
|
|
16993
|
+
return React32.useMemo(() => {
|
|
17169
16994
|
if (!processedData || processedData.length === 0 || !orderBy) {
|
|
17170
16995
|
return {
|
|
17171
16996
|
maxPeriodLabel: "",
|
|
@@ -17202,7 +17027,7 @@ function useProcessedData({
|
|
|
17202
17027
|
startIndex,
|
|
17203
17028
|
endIndex
|
|
17204
17029
|
}) {
|
|
17205
|
-
return
|
|
17030
|
+
return React32.useMemo(() => {
|
|
17206
17031
|
const mapped = data.map((item) => ({
|
|
17207
17032
|
...item,
|
|
17208
17033
|
name: String(item[xAxisKey] || "N/A")
|
|
@@ -17214,7 +17039,7 @@ function useProcessedData({
|
|
|
17214
17039
|
}, [data, xAxisKey, timeSeriesConfig, startIndex, endIndex]);
|
|
17215
17040
|
}
|
|
17216
17041
|
function useBiaxial(biaxial, yAxisLabel) {
|
|
17217
|
-
return
|
|
17042
|
+
return React32.useMemo(() => {
|
|
17218
17043
|
if (!biaxial) return null;
|
|
17219
17044
|
if (typeof biaxial === "string") return { key: [biaxial] };
|
|
17220
17045
|
if (Array.isArray(biaxial)) return { key: biaxial };
|
|
@@ -17243,7 +17068,7 @@ function useChartLayout({
|
|
|
17243
17068
|
}) {
|
|
17244
17069
|
const finalChartRightMargin = chartMargin?.right ?? (rightKeysLength > 0 ? AXIS_LABEL_MARGIN : 30);
|
|
17245
17070
|
const finalChartLeftMargin = chartMargin?.left ?? (yAxisLabel ? AXIS_LABEL_MARGIN : 0);
|
|
17246
|
-
const yAxisTickWidth =
|
|
17071
|
+
const yAxisTickWidth = React32.useMemo(() => {
|
|
17247
17072
|
const yAxisLabelStr = yAxisLabel === null || yAxisLabel === void 0 ? void 0 : String(yAxisLabel);
|
|
17248
17073
|
return computeYAxisTickWidth(
|
|
17249
17074
|
chartMargin?.left,
|
|
@@ -17276,7 +17101,7 @@ function useChartLayout({
|
|
|
17276
17101
|
};
|
|
17277
17102
|
}
|
|
17278
17103
|
function useSeriesOpacity(highlightedSeries) {
|
|
17279
|
-
return
|
|
17104
|
+
return React32.useCallback(
|
|
17280
17105
|
(key) => {
|
|
17281
17106
|
return highlightedSeries.size > 0 ? highlightedSeries.has(key) ? 1 : 0.25 : 1;
|
|
17282
17107
|
},
|
|
@@ -17415,7 +17240,7 @@ function useOpenTooltipForPeriod({
|
|
|
17415
17240
|
maxTooltips,
|
|
17416
17241
|
effectiveChartWidth
|
|
17417
17242
|
}) {
|
|
17418
|
-
return
|
|
17243
|
+
return React32.useCallback(
|
|
17419
17244
|
(periodName) => {
|
|
17420
17245
|
fnOpenTooltipForPeriod(
|
|
17421
17246
|
enableDraggableTooltips,
|
|
@@ -17487,7 +17312,7 @@ var Chart = ({
|
|
|
17487
17312
|
const wrapperStyle = usesFullHeight ? void 0 : {
|
|
17488
17313
|
height: typeof responsiveHeight === "number" ? `${responsiveHeight}px` : responsiveHeight
|
|
17489
17314
|
};
|
|
17490
|
-
const { xAxisConfig, mapperConfig } =
|
|
17315
|
+
const { xAxisConfig, mapperConfig } = React32.useMemo(() => {
|
|
17491
17316
|
return fnSmartConfig({ xAxis, data, labelMap });
|
|
17492
17317
|
}, [data, xAxis, labelMap]);
|
|
17493
17318
|
const {
|
|
@@ -17504,12 +17329,12 @@ var Chart = ({
|
|
|
17504
17329
|
onTooltipPositionChange,
|
|
17505
17330
|
setActiveTooltips
|
|
17506
17331
|
} = useChartTooltips(maxTooltips);
|
|
17507
|
-
|
|
17332
|
+
React32.useEffect(() => {
|
|
17508
17333
|
if (highlightedSeries.size === 0 && showOnlyHighlighted) {
|
|
17509
17334
|
setShowOnlyHighlighted(false);
|
|
17510
17335
|
}
|
|
17511
17336
|
}, [highlightedSeries, showOnlyHighlighted, setShowOnlyHighlighted]);
|
|
17512
|
-
const timeSeriesConfig =
|
|
17337
|
+
const timeSeriesConfig = React32.useMemo(() => {
|
|
17513
17338
|
if (typeof timeSeries === "boolean") {
|
|
17514
17339
|
return timeSeries ? {} : void 0;
|
|
17515
17340
|
}
|
|
@@ -17530,48 +17355,48 @@ var Chart = ({
|
|
|
17530
17355
|
});
|
|
17531
17356
|
const seriesOrder = filtersOrder(mapperConfig, series);
|
|
17532
17357
|
const allKeys = seriesOrder.map((s) => s.key).filter(Boolean);
|
|
17533
|
-
const finalColors =
|
|
17358
|
+
const finalColors = React32.useMemo(
|
|
17534
17359
|
() => generateColorMap(allKeys, colors2, mapperConfig),
|
|
17535
17360
|
[allKeys, colors2, mapperConfig]
|
|
17536
17361
|
);
|
|
17537
17362
|
const biaxialConfigNormalized = useBiaxial(biaxial, yAxisLabel);
|
|
17538
|
-
const rightKeys =
|
|
17363
|
+
const rightKeys = React32.useMemo(
|
|
17539
17364
|
() => biaxialConfigNormalized?.key ?? [],
|
|
17540
17365
|
[biaxialConfigNormalized]
|
|
17541
17366
|
);
|
|
17542
|
-
const leftKeys =
|
|
17367
|
+
const leftKeys = React32.useMemo(
|
|
17543
17368
|
() => allKeys.filter((k) => !rightKeys.includes(k)),
|
|
17544
17369
|
[allKeys, rightKeys]
|
|
17545
17370
|
);
|
|
17546
|
-
const activePeriods =
|
|
17371
|
+
const activePeriods = React32.useMemo(
|
|
17547
17372
|
() => activeTooltips.map((t) => adaptDataForTooltip(t.data, xAxisConfig.dataKey).name),
|
|
17548
17373
|
[activeTooltips, xAxisConfig.dataKey]
|
|
17549
17374
|
);
|
|
17550
|
-
const maxLeftDataValue =
|
|
17375
|
+
const maxLeftDataValue = React32.useMemo(() => {
|
|
17551
17376
|
const numericKeys = leftKeys.length > 0 ? leftKeys : allKeys;
|
|
17552
17377
|
return getMaxDataValue(processedData, numericKeys);
|
|
17553
17378
|
}, [processedData, leftKeys, allKeys]);
|
|
17554
|
-
const minLeftDataValue =
|
|
17379
|
+
const minLeftDataValue = React32.useMemo(() => {
|
|
17555
17380
|
const numericKeys = leftKeys.length > 0 ? leftKeys : allKeys;
|
|
17556
17381
|
return getMinDataValue(processedData, numericKeys);
|
|
17557
17382
|
}, [processedData, leftKeys, allKeys]);
|
|
17558
|
-
const maxRightDataValue =
|
|
17383
|
+
const maxRightDataValue = React32.useMemo(() => {
|
|
17559
17384
|
if (rightKeys.length === 0) return 0;
|
|
17560
17385
|
return getMaxDataValue(processedData, rightKeys);
|
|
17561
17386
|
}, [processedData, rightKeys]);
|
|
17562
|
-
const minRightDataValue =
|
|
17387
|
+
const minRightDataValue = React32.useMemo(() => {
|
|
17563
17388
|
if (rightKeys.length === 0) return 0;
|
|
17564
17389
|
return getMinDataValue(processedData, rightKeys);
|
|
17565
17390
|
}, [processedData, rightKeys]);
|
|
17566
|
-
const niceMaxLeft =
|
|
17391
|
+
const niceMaxLeft = React32.useMemo(
|
|
17567
17392
|
() => computeNiceMax(maxLeftDataValue),
|
|
17568
17393
|
[maxLeftDataValue]
|
|
17569
17394
|
);
|
|
17570
|
-
const niceMaxRight =
|
|
17395
|
+
const niceMaxRight = React32.useMemo(
|
|
17571
17396
|
() => computeNiceMax(maxRightDataValue),
|
|
17572
17397
|
[maxRightDataValue]
|
|
17573
17398
|
);
|
|
17574
|
-
const computedWidth =
|
|
17399
|
+
const computedWidth = React32.useMemo(
|
|
17575
17400
|
() => computeChartWidth(
|
|
17576
17401
|
width,
|
|
17577
17402
|
processedData.length,
|
|
@@ -17590,11 +17415,11 @@ var Chart = ({
|
|
|
17590
17415
|
}
|
|
17591
17416
|
);
|
|
17592
17417
|
const getSeriesOpacity = useSeriesOpacity(highlightedSeries);
|
|
17593
|
-
const finalValueFormatter =
|
|
17418
|
+
const finalValueFormatter = React32.useMemo(
|
|
17594
17419
|
() => createValueFormatter(valueFormatter, formatBR),
|
|
17595
17420
|
[valueFormatter, formatBR]
|
|
17596
17421
|
);
|
|
17597
|
-
const yTickFormatter =
|
|
17422
|
+
const yTickFormatter = React32.useMemo(
|
|
17598
17423
|
() => createYTickFormatter(finalValueFormatter),
|
|
17599
17424
|
[finalValueFormatter]
|
|
17600
17425
|
);
|
|
@@ -18113,7 +17938,7 @@ var HorizontalChart = ({
|
|
|
18113
17938
|
customLegend,
|
|
18114
17939
|
orderBy
|
|
18115
17940
|
}) => {
|
|
18116
|
-
const { xAxisConfig, mapperConfig } =
|
|
17941
|
+
const { xAxisConfig, mapperConfig } = React32.useMemo(() => {
|
|
18117
17942
|
return fnSmartConfig({ xAxis, data, labelMap });
|
|
18118
17943
|
}, [data, xAxis, labelMap]);
|
|
18119
17944
|
const {
|
|
@@ -18130,12 +17955,12 @@ var HorizontalChart = ({
|
|
|
18130
17955
|
onTooltipPositionChange,
|
|
18131
17956
|
setActiveTooltips
|
|
18132
17957
|
} = useChartTooltips(maxTooltips);
|
|
18133
|
-
|
|
17958
|
+
React32.useEffect(() => {
|
|
18134
17959
|
if (highlightedSeries.size === 0 && showOnlyHighlighted) {
|
|
18135
17960
|
setShowOnlyHighlighted(false);
|
|
18136
17961
|
}
|
|
18137
17962
|
}, [highlightedSeries, showOnlyHighlighted, setShowOnlyHighlighted]);
|
|
18138
|
-
const processedData =
|
|
17963
|
+
const processedData = React32.useMemo(() => {
|
|
18139
17964
|
const mapped = data.map((item) => ({
|
|
18140
17965
|
...item,
|
|
18141
17966
|
name: String(item[xAxisConfig.dataKey] || "N/A")
|
|
@@ -18151,38 +17976,38 @@ var HorizontalChart = ({
|
|
|
18151
17976
|
}, [data, xAxisConfig.dataKey, orderBy]);
|
|
18152
17977
|
const seriesOrder = filtersOrder(mapperConfig, series);
|
|
18153
17978
|
const allKeys = seriesOrder.map((s) => s.key).filter(Boolean);
|
|
18154
|
-
const finalColors =
|
|
17979
|
+
const finalColors = React32.useMemo(
|
|
18155
17980
|
() => generateColorMap(allKeys, colors2, mapperConfig),
|
|
18156
17981
|
[allKeys, colors2, mapperConfig]
|
|
18157
17982
|
);
|
|
18158
|
-
const activePeriods =
|
|
17983
|
+
const activePeriods = React32.useMemo(
|
|
18159
17984
|
() => activeTooltips.map((t) => adaptDataForTooltip(t.data, xAxisConfig.dataKey).name),
|
|
18160
17985
|
[activeTooltips, xAxisConfig.dataKey]
|
|
18161
17986
|
);
|
|
18162
|
-
const maxDataValue =
|
|
17987
|
+
const maxDataValue = React32.useMemo(() => {
|
|
18163
17988
|
return getMaxDataValue(processedData, allKeys);
|
|
18164
17989
|
}, [processedData, allKeys]);
|
|
18165
|
-
const minDataValue =
|
|
17990
|
+
const minDataValue = React32.useMemo(() => {
|
|
18166
17991
|
return getMinDataValue(processedData, allKeys);
|
|
18167
17992
|
}, [processedData, allKeys]);
|
|
18168
|
-
const niceMax =
|
|
17993
|
+
const niceMax = React32.useMemo(() => computeNiceMax(maxDataValue), [maxDataValue]);
|
|
18169
17994
|
const { handleChartClick, handleBarClick } = useChartClick({
|
|
18170
17995
|
enableDraggableTooltips,
|
|
18171
17996
|
xAxisDataKey: xAxisConfig.dataKey,
|
|
18172
17997
|
toggleTooltip,
|
|
18173
17998
|
setActiveTooltips
|
|
18174
17999
|
});
|
|
18175
|
-
const getSeriesOpacity =
|
|
18000
|
+
const getSeriesOpacity = React32.useCallback(
|
|
18176
18001
|
(key) => {
|
|
18177
18002
|
return highlightedSeries.size > 0 ? highlightedSeries.has(key) ? 1 : 0.25 : 1;
|
|
18178
18003
|
},
|
|
18179
18004
|
[highlightedSeries]
|
|
18180
18005
|
);
|
|
18181
|
-
const finalValueFormatter =
|
|
18006
|
+
const finalValueFormatter = React32.useMemo(
|
|
18182
18007
|
() => createValueFormatter(valueFormatter, formatBR),
|
|
18183
18008
|
[valueFormatter, formatBR]
|
|
18184
18009
|
);
|
|
18185
|
-
const yTickFormatter =
|
|
18010
|
+
const yTickFormatter = React32.useMemo(
|
|
18186
18011
|
() => createYTickFormatter(finalValueFormatter),
|
|
18187
18012
|
[finalValueFormatter]
|
|
18188
18013
|
);
|
|
@@ -18192,7 +18017,7 @@ var HorizontalChart = ({
|
|
|
18192
18017
|
const HORIZONTAL_PADDING_CLASS = "px-6";
|
|
18193
18018
|
const effectiveChartWidth = typeof width === "number" ? width : measuredWidth ? Math.max(0, measuredWidth - 32) : 800;
|
|
18194
18019
|
const chartInnerWidth = effectiveChartWidth - finalChartLeftMargin - finalChartRightMargin;
|
|
18195
|
-
const openTooltipForPeriod =
|
|
18020
|
+
const openTooltipForPeriod = React32.useCallback(
|
|
18196
18021
|
(periodName) => {
|
|
18197
18022
|
fnOpenTooltipForPeriod(
|
|
18198
18023
|
enableDraggableTooltips,
|
|
@@ -18618,8 +18443,8 @@ function NumericInput({
|
|
|
18618
18443
|
hideConfirm = false,
|
|
18619
18444
|
numericKeyboard
|
|
18620
18445
|
}) {
|
|
18621
|
-
const original =
|
|
18622
|
-
const [internalValue, setInternalValue] =
|
|
18446
|
+
const original = React32.useMemo(() => value, [value]);
|
|
18447
|
+
const [internalValue, setInternalValue] = React32.useState(original);
|
|
18623
18448
|
const hasChanged = internalValue !== original;
|
|
18624
18449
|
const handleSave = () => {
|
|
18625
18450
|
if (!hasChanged || isLoading || disabled) return;
|
|
@@ -18703,8 +18528,8 @@ function Leaderboard({
|
|
|
18703
18528
|
isLoading = false,
|
|
18704
18529
|
legend
|
|
18705
18530
|
}) {
|
|
18706
|
-
const [order, setOrder] =
|
|
18707
|
-
const [searchTerm, setSearchTerm] =
|
|
18531
|
+
const [order, setOrder] = React32.useState(initialOrder);
|
|
18532
|
+
const [searchTerm, setSearchTerm] = React32.useState("");
|
|
18708
18533
|
const mockData = [
|
|
18709
18534
|
{ name: "Ana", value: 92 },
|
|
18710
18535
|
{ name: "Bruno", value: 81 },
|
|
@@ -18822,6 +18647,139 @@ function Leaderboard({
|
|
|
18822
18647
|
}
|
|
18823
18648
|
);
|
|
18824
18649
|
}
|
|
18650
|
+
function CarouselBase({
|
|
18651
|
+
items,
|
|
18652
|
+
className,
|
|
18653
|
+
containerClassName,
|
|
18654
|
+
imageClassName,
|
|
18655
|
+
width,
|
|
18656
|
+
height = "400px",
|
|
18657
|
+
showControls = true,
|
|
18658
|
+
showIndicators = true,
|
|
18659
|
+
autoPlay = false,
|
|
18660
|
+
autoPlayInterval = 3e3,
|
|
18661
|
+
springConfig = {
|
|
18662
|
+
stiffness: 300,
|
|
18663
|
+
damping: 30
|
|
18664
|
+
}
|
|
18665
|
+
}) {
|
|
18666
|
+
const [index, setIndex] = React32.useState(0);
|
|
18667
|
+
const containerRef = React32.useRef(null);
|
|
18668
|
+
const x = framerMotion.useMotionValue(0);
|
|
18669
|
+
React32.useEffect(() => {
|
|
18670
|
+
if (containerRef.current) {
|
|
18671
|
+
const containerWidth = containerRef.current.offsetWidth || 1;
|
|
18672
|
+
const targetX = -index * containerWidth;
|
|
18673
|
+
framerMotion.animate(x, targetX, {
|
|
18674
|
+
type: "spring",
|
|
18675
|
+
stiffness: springConfig.stiffness,
|
|
18676
|
+
damping: springConfig.damping
|
|
18677
|
+
});
|
|
18678
|
+
}
|
|
18679
|
+
}, [index, x, springConfig.stiffness, springConfig.damping]);
|
|
18680
|
+
React32.useEffect(() => {
|
|
18681
|
+
if (!autoPlay || items.length <= 1) return;
|
|
18682
|
+
const interval = setInterval(() => {
|
|
18683
|
+
setIndex((i) => (i + 1) % items.length);
|
|
18684
|
+
}, autoPlayInterval);
|
|
18685
|
+
return () => clearInterval(interval);
|
|
18686
|
+
}, [autoPlay, autoPlayInterval, items.length]);
|
|
18687
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18688
|
+
"div",
|
|
18689
|
+
{
|
|
18690
|
+
className: cn("w-full lg:p-10 sm:p-4 p-2", className),
|
|
18691
|
+
style: { width },
|
|
18692
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18693
|
+
"div",
|
|
18694
|
+
{
|
|
18695
|
+
className: cn(
|
|
18696
|
+
"relative overflow-hidden rounded-lg",
|
|
18697
|
+
containerClassName
|
|
18698
|
+
),
|
|
18699
|
+
ref: containerRef,
|
|
18700
|
+
children: [
|
|
18701
|
+
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { className: "flex", style: { x }, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 w-full", style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18702
|
+
"img",
|
|
18703
|
+
{
|
|
18704
|
+
src: item.url,
|
|
18705
|
+
alt: item.title,
|
|
18706
|
+
className: cn(
|
|
18707
|
+
"w-full h-full object-cover rounded-lg select-none pointer-events-none",
|
|
18708
|
+
imageClassName
|
|
18709
|
+
),
|
|
18710
|
+
draggable: false
|
|
18711
|
+
}
|
|
18712
|
+
) }, item.id)) }),
|
|
18713
|
+
showControls && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18714
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18715
|
+
framerMotion.motion.button,
|
|
18716
|
+
{
|
|
18717
|
+
disabled: index === 0,
|
|
18718
|
+
onClick: () => setIndex((i) => Math.max(0, i - 1)),
|
|
18719
|
+
className: `absolute left-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full flex items-center justify-center shadow-lg transition-transform z-10
|
|
18720
|
+
${index === 0 ? "opacity-40 cursor-not-allowed" : "bg-secondary hover:scale-110 hover:opacity-100 opacity-70"}`,
|
|
18721
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18722
|
+
"svg",
|
|
18723
|
+
{
|
|
18724
|
+
className: "w-6 h-6",
|
|
18725
|
+
fill: "none",
|
|
18726
|
+
stroke: "currentColor",
|
|
18727
|
+
viewBox: "0 0 24 24",
|
|
18728
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18729
|
+
"path",
|
|
18730
|
+
{
|
|
18731
|
+
strokeLinecap: "round",
|
|
18732
|
+
strokeLinejoin: "round",
|
|
18733
|
+
strokeWidth: 2,
|
|
18734
|
+
d: "M15 19l-7-7 7-7"
|
|
18735
|
+
}
|
|
18736
|
+
)
|
|
18737
|
+
}
|
|
18738
|
+
)
|
|
18739
|
+
}
|
|
18740
|
+
),
|
|
18741
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18742
|
+
framerMotion.motion.button,
|
|
18743
|
+
{
|
|
18744
|
+
disabled: index === items.length - 1,
|
|
18745
|
+
onClick: () => setIndex((i) => Math.min(items.length - 1, i + 1)),
|
|
18746
|
+
className: `absolute right-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full flex items-center justify-center shadow-lg transition-transform z-10
|
|
18747
|
+
${index === items.length - 1 ? "opacity-40 cursor-not-allowed" : "bg-secondary hover:scale-110 hover:opacity-100 opacity-70"}`,
|
|
18748
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18749
|
+
"svg",
|
|
18750
|
+
{
|
|
18751
|
+
className: "w-6 h-6",
|
|
18752
|
+
fill: "none",
|
|
18753
|
+
stroke: "currentColor",
|
|
18754
|
+
viewBox: "0 0 24 24",
|
|
18755
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18756
|
+
"path",
|
|
18757
|
+
{
|
|
18758
|
+
strokeLinecap: "round",
|
|
18759
|
+
strokeLinejoin: "round",
|
|
18760
|
+
strokeWidth: 2,
|
|
18761
|
+
d: "M9 5l7 7-7 7"
|
|
18762
|
+
}
|
|
18763
|
+
)
|
|
18764
|
+
}
|
|
18765
|
+
)
|
|
18766
|
+
}
|
|
18767
|
+
)
|
|
18768
|
+
] }),
|
|
18769
|
+
showIndicators && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2", children: items.map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
18770
|
+
"button",
|
|
18771
|
+
{
|
|
18772
|
+
onClick: () => setIndex(i),
|
|
18773
|
+
className: `h-2 rounded-full transition-all ${i === index ? "w-8 bg-white" : "w-2 bg-white/50"}`
|
|
18774
|
+
},
|
|
18775
|
+
i
|
|
18776
|
+
)) })
|
|
18777
|
+
]
|
|
18778
|
+
}
|
|
18779
|
+
) })
|
|
18780
|
+
}
|
|
18781
|
+
);
|
|
18782
|
+
}
|
|
18825
18783
|
|
|
18826
18784
|
exports.AddButton = AddButton;
|
|
18827
18785
|
exports.Agenda = Agenda;
|
|
@@ -18866,10 +18824,6 @@ exports.CardFooterBase = CardFooterBase;
|
|
|
18866
18824
|
exports.CardHeaderBase = CardHeaderBase;
|
|
18867
18825
|
exports.CardTitleBase = CardTitleBase;
|
|
18868
18826
|
exports.CarouselBase = CarouselBase;
|
|
18869
|
-
exports.CarouselContentBase = CarouselContentBase;
|
|
18870
|
-
exports.CarouselItemBase = CarouselItemBase;
|
|
18871
|
-
exports.CarouselNextBase = CarouselNextBase;
|
|
18872
|
-
exports.CarouselPreviousBase = CarouselPreviousBase;
|
|
18873
18827
|
exports.ChangeButton = ChangeButton;
|
|
18874
18828
|
exports.Chart = Chart_default;
|
|
18875
18829
|
exports.ChartControls = ChartControls;
|
|
@@ -18886,6 +18840,7 @@ exports.CollapsibleContentBase = CollapsibleContentBase;
|
|
|
18886
18840
|
exports.CollapsibleTriggerBase = CollapsibleTriggerBase;
|
|
18887
18841
|
exports.Combobox = Combobox;
|
|
18888
18842
|
exports.CommandBase = CommandBase;
|
|
18843
|
+
exports.CommandDebouncedInputBase = CommandDebouncedInputBase;
|
|
18889
18844
|
exports.CommandDialogBase = CommandDialogBase;
|
|
18890
18845
|
exports.CommandEmptyBase = CommandEmptyBase;
|
|
18891
18846
|
exports.CommandGroupBase = CommandGroupBase;
|