@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.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React32 from 'react';
|
|
3
|
+
import React32__default, { forwardRef, useState, useEffect, createContext, useMemo, useRef, useCallback, useContext, useId, useLayoutEffect } from 'react';
|
|
4
4
|
import { Slot } from '@radix-ui/react-slot';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
|
-
import { XIcon, CircleNotchIcon, MagnifyingGlassIcon, CaretUpIcon, CaretDownIcon, CheckIcon, CaretRightIcon, CircleIcon, CloudArrowUpIcon, MinusIcon, CaretUpDownIcon, PencilSimpleIcon, ArrowsLeftRightIcon, FloppyDiskIcon, PlusIcon, TrashIcon, SidebarSimpleIcon, FilePdfIcon, FileDocIcon, FileXlsIcon, FilePptIcon, FileCsvIcon, FileTextIcon, FileImageIcon, FileVideoIcon, FileAudioIcon, FileZipIcon, FileIcon, DotsSixVerticalIcon, InfoIcon, WarningIcon, XCircleIcon, CheckCircleIcon, SunIcon, MoonIcon, CaretLeftIcon, DownloadSimpleIcon, UploadSimpleIcon, CopyIcon, ArrowClockwiseIcon, ArrowLeftIcon, GearIcon, BellIcon, DotsThreeIcon, FunnelIcon, HeartIcon, StarIcon, EyeIcon, EyeSlashIcon, LockIcon, LockOpenIcon, ArrowRightIcon as ArrowRightIcon$1,
|
|
8
|
+
import { XIcon, CircleNotchIcon, MagnifyingGlassIcon, CaretUpIcon, CaretDownIcon, CheckIcon, CaretRightIcon, CircleIcon, CloudArrowUpIcon, MinusIcon, CaretUpDownIcon, PencilSimpleIcon, ArrowsLeftRightIcon, FloppyDiskIcon, PlusIcon, TrashIcon, SidebarSimpleIcon, FilePdfIcon, FileDocIcon, FileXlsIcon, FilePptIcon, FileCsvIcon, FileTextIcon, FileImageIcon, FileVideoIcon, FileAudioIcon, FileZipIcon, FileIcon, DotsSixVerticalIcon, InfoIcon, WarningIcon, XCircleIcon, CheckCircleIcon, SunIcon, MoonIcon, CaretLeftIcon, DownloadSimpleIcon, UploadSimpleIcon, CopyIcon, ArrowClockwiseIcon, ArrowLeftIcon, GearIcon, BellIcon, DotsThreeIcon, FunnelIcon, HeartIcon, StarIcon, EyeIcon, EyeSlashIcon, LockIcon, LockOpenIcon, FolderIcon, ArrowRightIcon as ArrowRightIcon$1, ArrowsOutIcon, DownloadIcon, CalendarBlankIcon, CalendarIcon, CaretLeft, CaretRight, ArrowDownIcon, ClockUserIcon, EyeSlash, Eye, ArrowRight, ArrowUpRightIcon, ArrowDownRightIcon, FunnelSimpleIcon, FileArchiveIcon, TerminalIcon, CodeIcon, CalendarDotIcon as CalendarDotIcon$1, DesktopIcon } from '@phosphor-icons/react';
|
|
9
9
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
10
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -15,7 +15,7 @@ import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
|
|
|
15
15
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
16
16
|
import 'react-router-dom';
|
|
17
17
|
import { Command } from 'cmdk';
|
|
18
|
-
import { AnimatePresence, motion } from 'framer-motion';
|
|
18
|
+
import { AnimatePresence, motion, useMotionValue, animate } from 'framer-motion';
|
|
19
19
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
20
20
|
import { XIcon as XIcon$1, CalendarDotIcon, DotsThreeIcon as DotsThreeIcon$1, Check, CheckIcon as CheckIcon$1 } from '@phosphor-icons/react/dist/ssr';
|
|
21
21
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
@@ -28,7 +28,6 @@ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
|
28
28
|
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
29
29
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
30
30
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
31
|
-
import useEmblaCarousel from 'embla-carousel-react';
|
|
32
31
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
33
32
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
34
33
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
@@ -521,7 +520,7 @@ function cn(...inputs) {
|
|
|
521
520
|
var AlertDialogBase = AlertDialogPrimitive.Root;
|
|
522
521
|
var AlertDialogTriggerBase = AlertDialogPrimitive.Trigger;
|
|
523
522
|
var AlertDialogPortalBase = AlertDialogPrimitive.Portal;
|
|
524
|
-
var AlertDialogOverlayBase =
|
|
523
|
+
var AlertDialogOverlayBase = React32.forwardRef(({ className, testid = "alertdialog-overlay", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
525
524
|
AlertDialogPrimitive.Overlay,
|
|
526
525
|
{
|
|
527
526
|
className: cn(
|
|
@@ -534,7 +533,7 @@ var AlertDialogOverlayBase = React33.forwardRef(({ className, testid = "alertdia
|
|
|
534
533
|
}
|
|
535
534
|
));
|
|
536
535
|
AlertDialogOverlayBase.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
537
|
-
var AlertDialogContentBase =
|
|
536
|
+
var AlertDialogContentBase = React32.forwardRef(({ className, testid = "alertdialog-content", ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortalBase, { children: [
|
|
538
537
|
/* @__PURE__ */ jsx(AlertDialogOverlayBase, {}),
|
|
539
538
|
/* @__PURE__ */ jsx(
|
|
540
539
|
AlertDialogPrimitive.Content,
|
|
@@ -578,7 +577,7 @@ var AlertDialogFooterBase = ({
|
|
|
578
577
|
}
|
|
579
578
|
);
|
|
580
579
|
AlertDialogFooterBase.displayName = "AlertDialogFooterBase";
|
|
581
|
-
var AlertDialogTitleBase =
|
|
580
|
+
var AlertDialogTitleBase = React32.forwardRef(({ className, testid = "alertdialog-title", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
582
581
|
AlertDialogPrimitive.Title,
|
|
583
582
|
{
|
|
584
583
|
ref,
|
|
@@ -588,7 +587,7 @@ var AlertDialogTitleBase = React33.forwardRef(({ className, testid = "alertdialo
|
|
|
588
587
|
}
|
|
589
588
|
));
|
|
590
589
|
AlertDialogTitleBase.displayName = AlertDialogPrimitive.Title.displayName;
|
|
591
|
-
var AlertDialogDescriptionBase =
|
|
590
|
+
var AlertDialogDescriptionBase = React32.forwardRef(({ className, testid = "alertdialog-description", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
592
591
|
AlertDialogPrimitive.Description,
|
|
593
592
|
{
|
|
594
593
|
ref,
|
|
@@ -598,7 +597,7 @@ var AlertDialogDescriptionBase = React33.forwardRef(({ className, testid = "aler
|
|
|
598
597
|
}
|
|
599
598
|
));
|
|
600
599
|
AlertDialogDescriptionBase.displayName = AlertDialogPrimitive.Description.displayName;
|
|
601
|
-
var AlertDialogActionBase =
|
|
600
|
+
var AlertDialogActionBase = React32.forwardRef(({ className, testid = "alertdialog-action", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
602
601
|
AlertDialogPrimitive.Action,
|
|
603
602
|
{
|
|
604
603
|
ref,
|
|
@@ -608,7 +607,7 @@ var AlertDialogActionBase = React33.forwardRef(({ className, testid = "alertdial
|
|
|
608
607
|
}
|
|
609
608
|
));
|
|
610
609
|
AlertDialogActionBase.displayName = AlertDialogPrimitive.Action.displayName;
|
|
611
|
-
var AlertDialogCancelBase =
|
|
610
|
+
var AlertDialogCancelBase = React32.forwardRef(({ className, testid = "alertdialog-cancel", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
612
611
|
AlertDialogPrimitive.Cancel,
|
|
613
612
|
{
|
|
614
613
|
ref,
|
|
@@ -622,7 +621,7 @@ var DialogBase = DialogPrimitive.Root;
|
|
|
622
621
|
var DialogTriggerBase = DialogPrimitive.Trigger;
|
|
623
622
|
var DialogPortalBase = DialogPrimitive.Portal;
|
|
624
623
|
var DialogCloseBase = DialogPrimitive.Close;
|
|
625
|
-
var DialogOverlayBase =
|
|
624
|
+
var DialogOverlayBase = React32.forwardRef(({ className, testid: dataTestId = "dialog-overlay", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
626
625
|
DialogPrimitive.Overlay,
|
|
627
626
|
{
|
|
628
627
|
ref,
|
|
@@ -635,7 +634,7 @@ var DialogOverlayBase = React33.forwardRef(({ className, testid: dataTestId = "d
|
|
|
635
634
|
}
|
|
636
635
|
));
|
|
637
636
|
DialogOverlayBase.displayName = DialogPrimitive.Overlay.displayName;
|
|
638
|
-
var DialogContentBase =
|
|
637
|
+
var DialogContentBase = React32.forwardRef(
|
|
639
638
|
({ className, children, testid: dataTestId = "dialog-content", ...props }, ref) => {
|
|
640
639
|
const userOnWheel = props.onWheel;
|
|
641
640
|
return /* @__PURE__ */ jsxs(DialogPortalBase, { children: [
|
|
@@ -664,7 +663,7 @@ var DialogContentBase = React33.forwardRef(
|
|
|
664
663
|
}
|
|
665
664
|
);
|
|
666
665
|
DialogContentBase.displayName = DialogPrimitive.Content.displayName;
|
|
667
|
-
var DialogHeaderBase =
|
|
666
|
+
var DialogHeaderBase = React32.forwardRef(({ className, testid: dataTestId = "dialog-header", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
668
667
|
"div",
|
|
669
668
|
{
|
|
670
669
|
ref,
|
|
@@ -677,7 +676,7 @@ var DialogHeaderBase = React33.forwardRef(({ className, testid: dataTestId = "di
|
|
|
677
676
|
}
|
|
678
677
|
));
|
|
679
678
|
DialogHeaderBase.displayName = "DialogHeader";
|
|
680
|
-
var DialogFooterBase =
|
|
679
|
+
var DialogFooterBase = React32.forwardRef(({ className, testid: dataTestId = "dialog-footer", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
681
680
|
"div",
|
|
682
681
|
{
|
|
683
682
|
ref,
|
|
@@ -690,7 +689,7 @@ var DialogFooterBase = React33.forwardRef(({ className, testid: dataTestId = "di
|
|
|
690
689
|
}
|
|
691
690
|
));
|
|
692
691
|
DialogFooterBase.displayName = "DialogFooter";
|
|
693
|
-
var DialogTitleBase =
|
|
692
|
+
var DialogTitleBase = React32.forwardRef(({ className, testid: dataTestId = "dialog-title", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
694
693
|
DialogPrimitive.Title,
|
|
695
694
|
{
|
|
696
695
|
ref,
|
|
@@ -703,7 +702,7 @@ var DialogTitleBase = React33.forwardRef(({ className, testid: dataTestId = "dia
|
|
|
703
702
|
}
|
|
704
703
|
));
|
|
705
704
|
DialogTitleBase.displayName = DialogPrimitive.Title.displayName;
|
|
706
|
-
var DialogDescriptionBase =
|
|
705
|
+
var DialogDescriptionBase = React32.forwardRef(({ className, testid: dataTestId = "dialog-description", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
707
706
|
DialogPrimitive.Description,
|
|
708
707
|
{
|
|
709
708
|
ref,
|
|
@@ -761,9 +760,9 @@ var dotVariants = cva(
|
|
|
761
760
|
}
|
|
762
761
|
}
|
|
763
762
|
);
|
|
764
|
-
var LoadingBase =
|
|
763
|
+
var LoadingBase = React32.forwardRef(
|
|
765
764
|
({ className, size, message, overlay = false, variant = "spinner", ...props }, ref) => {
|
|
766
|
-
|
|
765
|
+
React32.useEffect(() => {
|
|
767
766
|
const style = document.createElement("style");
|
|
768
767
|
style.textContent = `
|
|
769
768
|
@keyframes dotBounce {
|
|
@@ -879,7 +878,7 @@ var LoadingBase = React33.forwardRef(
|
|
|
879
878
|
}
|
|
880
879
|
);
|
|
881
880
|
LoadingBase.displayName = "LoadingBase";
|
|
882
|
-
var LabelBase =
|
|
881
|
+
var LabelBase = React32.forwardRef(
|
|
883
882
|
({ className, asChild = false, testid = "label-base", ...props }, ref) => {
|
|
884
883
|
const Comp = asChild ? Slot : "label";
|
|
885
884
|
return /* @__PURE__ */ jsx(Label, { children: /* @__PURE__ */ jsx(
|
|
@@ -898,7 +897,7 @@ var LabelBase = React33.forwardRef(
|
|
|
898
897
|
);
|
|
899
898
|
LabelBase.displayName = "LabelBase";
|
|
900
899
|
var LabelBase_default = LabelBase;
|
|
901
|
-
var ProgressBase =
|
|
900
|
+
var ProgressBase = React32.forwardRef(
|
|
902
901
|
({
|
|
903
902
|
className,
|
|
904
903
|
value: rawValue,
|
|
@@ -1080,7 +1079,7 @@ var ProgressPanelsBase = ({
|
|
|
1080
1079
|
/* @__PURE__ */ jsx("div", { className: "flex w-full gap-1 rounded-lg overflow-hidden", children: steps.map((step, idx) => {
|
|
1081
1080
|
const isActive = idx === currentStep;
|
|
1082
1081
|
const isLast = idx === steps.length - 1;
|
|
1083
|
-
return /* @__PURE__ */ jsxs(
|
|
1082
|
+
return /* @__PURE__ */ jsxs(React32.Fragment, { children: [
|
|
1084
1083
|
/* @__PURE__ */ jsxs(
|
|
1085
1084
|
"div",
|
|
1086
1085
|
{
|
|
@@ -1272,10 +1271,10 @@ var toast = {
|
|
|
1272
1271
|
};
|
|
1273
1272
|
var MOBILE_BREAKPOINT = 768;
|
|
1274
1273
|
function useIsMobile() {
|
|
1275
|
-
const [isMobile, setIsMobile] =
|
|
1274
|
+
const [isMobile, setIsMobile] = React32.useState(
|
|
1276
1275
|
void 0
|
|
1277
1276
|
);
|
|
1278
|
-
|
|
1277
|
+
React32.useEffect(() => {
|
|
1279
1278
|
const checkIsMobile = () => {
|
|
1280
1279
|
const isTouch = window.matchMedia("(pointer: coarse)").matches || navigator.maxTouchPoints > 0;
|
|
1281
1280
|
const isSmallScreen = window.innerWidth < MOBILE_BREAKPOINT;
|
|
@@ -1418,11 +1417,11 @@ var TOOLTIP_DELAY_DURATION = 600;
|
|
|
1418
1417
|
var TOOLTIP_SIDE_OFFSET = 8;
|
|
1419
1418
|
var TOOLTIP_MOBILE_DELAY = Infinity;
|
|
1420
1419
|
var TooltipProviderBase = TooltipPrimitive.Provider;
|
|
1421
|
-
var TooltipClickContext =
|
|
1420
|
+
var TooltipClickContext = React32.createContext({});
|
|
1422
1421
|
var TooltipBase = ({ children, delayDuration = TOOLTIP_DELAY_DURATION, ...props }) => {
|
|
1423
|
-
const [open, setOpen] =
|
|
1422
|
+
const [open, setOpen] = React32.useState(false);
|
|
1424
1423
|
const isMobile = useIsMobile();
|
|
1425
|
-
|
|
1424
|
+
React32.useEffect(() => {
|
|
1426
1425
|
if (!open || !isMobile) return;
|
|
1427
1426
|
const handleClickOutside = (e) => {
|
|
1428
1427
|
const target = e.target;
|
|
@@ -1435,7 +1434,7 @@ var TooltipBase = ({ children, delayDuration = TOOLTIP_DELAY_DURATION, ...props
|
|
|
1435
1434
|
document.addEventListener("pointerdown", handleClickOutside);
|
|
1436
1435
|
return () => document.removeEventListener("pointerdown", handleClickOutside);
|
|
1437
1436
|
}, [open, isMobile]);
|
|
1438
|
-
const contextValue =
|
|
1437
|
+
const contextValue = React32.useMemo(() => ({ setOpen, isMobile }), [isMobile]);
|
|
1439
1438
|
return /* @__PURE__ */ jsx(TooltipClickContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
|
|
1440
1439
|
TooltipPrimitive.Root,
|
|
1441
1440
|
{
|
|
@@ -1448,9 +1447,9 @@ var TooltipBase = ({ children, delayDuration = TOOLTIP_DELAY_DURATION, ...props
|
|
|
1448
1447
|
) });
|
|
1449
1448
|
};
|
|
1450
1449
|
TooltipBase.displayName = "TooltipBase";
|
|
1451
|
-
var TooltipTriggerBase =
|
|
1452
|
-
const { setOpen, isMobile } =
|
|
1453
|
-
const handlePointerDown =
|
|
1450
|
+
var TooltipTriggerBase = React32.forwardRef(({ children, onPointerDown, onClick: propOnClick, ...props }, ref) => {
|
|
1451
|
+
const { setOpen, isMobile } = React32.useContext(TooltipClickContext);
|
|
1452
|
+
const handlePointerDown = React32.useCallback(
|
|
1454
1453
|
(e) => {
|
|
1455
1454
|
if (onPointerDown) {
|
|
1456
1455
|
onPointerDown(e);
|
|
@@ -1458,7 +1457,7 @@ var TooltipTriggerBase = React33.forwardRef(({ children, onPointerDown, onClick:
|
|
|
1458
1457
|
},
|
|
1459
1458
|
[onPointerDown]
|
|
1460
1459
|
);
|
|
1461
|
-
const onClick =
|
|
1460
|
+
const onClick = React32.useCallback(
|
|
1462
1461
|
(e) => {
|
|
1463
1462
|
if (propOnClick) {
|
|
1464
1463
|
propOnClick(e);
|
|
@@ -1473,7 +1472,7 @@ var TooltipTriggerBase = React33.forwardRef(({ children, onPointerDown, onClick:
|
|
|
1473
1472
|
},
|
|
1474
1473
|
[onPointerDown, isMobile, setOpen, propOnClick]
|
|
1475
1474
|
);
|
|
1476
|
-
const preventDefaultOnMobile =
|
|
1475
|
+
const preventDefaultOnMobile = React32.useCallback(
|
|
1477
1476
|
(e) => {
|
|
1478
1477
|
if (isMobile) {
|
|
1479
1478
|
e.preventDefault();
|
|
@@ -1499,7 +1498,7 @@ var TooltipTriggerBase = React33.forwardRef(({ children, onPointerDown, onClick:
|
|
|
1499
1498
|
);
|
|
1500
1499
|
});
|
|
1501
1500
|
TooltipTriggerBase.displayName = "TooltipTriggerBase";
|
|
1502
|
-
var TooltipContentBase =
|
|
1501
|
+
var TooltipContentBase = React32.forwardRef(
|
|
1503
1502
|
({ className, sideOffset = TOOLTIP_SIDE_OFFSET, onPointerDown, ...props }, ref) => {
|
|
1504
1503
|
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
1505
1504
|
TooltipPrimitive.Content,
|
|
@@ -1540,7 +1539,7 @@ var DestructiveDialog = ({
|
|
|
1540
1539
|
triggerContent,
|
|
1541
1540
|
className
|
|
1542
1541
|
}) => {
|
|
1543
|
-
const triggerEl =
|
|
1542
|
+
const triggerEl = React32.isValidElement(children) ? /* @__PURE__ */ jsx(AlertDialogTriggerBase, { asChild: true, children }) : /* @__PURE__ */ jsx(AlertDialogTriggerBase, { children: /* @__PURE__ */ jsx(ButtonBase, { variant: "destructive", children: triggerContent ?? "Excluir" }) });
|
|
1544
1543
|
return /* @__PURE__ */ jsxs(AlertDialogBase, { children: [
|
|
1545
1544
|
triggerEl,
|
|
1546
1545
|
/* @__PURE__ */ jsxs(
|
|
@@ -1587,7 +1586,7 @@ var ModalBase = DialogPrimitive.Root;
|
|
|
1587
1586
|
var ModalTriggerBase = DialogPrimitive.Trigger;
|
|
1588
1587
|
var ModalPortalBase = DialogPrimitive.Portal;
|
|
1589
1588
|
var ModalCloseBase = DialogPrimitive.Close;
|
|
1590
|
-
var ModalOverlayBase =
|
|
1589
|
+
var ModalOverlayBase = React32.forwardRef(({ className, testid: dataTestId = "modal-overlay", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1591
1590
|
DialogPrimitive.Overlay,
|
|
1592
1591
|
{
|
|
1593
1592
|
ref,
|
|
@@ -1600,7 +1599,7 @@ var ModalOverlayBase = React33.forwardRef(({ className, testid: dataTestId = "mo
|
|
|
1600
1599
|
}
|
|
1601
1600
|
));
|
|
1602
1601
|
ModalOverlayBase.displayName = DialogPrimitive.Overlay.displayName;
|
|
1603
|
-
var ModalContentBase =
|
|
1602
|
+
var ModalContentBase = React32.forwardRef(
|
|
1604
1603
|
({
|
|
1605
1604
|
className,
|
|
1606
1605
|
children,
|
|
@@ -1664,7 +1663,7 @@ var ModalContentBase = React33.forwardRef(
|
|
|
1664
1663
|
}
|
|
1665
1664
|
);
|
|
1666
1665
|
ModalContentBase.displayName = DialogPrimitive.Content.displayName;
|
|
1667
|
-
var ModalHeaderBase =
|
|
1666
|
+
var ModalHeaderBase = React32.forwardRef(({ className, testid: dataTestId = "modal-header", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1668
1667
|
"div",
|
|
1669
1668
|
{
|
|
1670
1669
|
ref,
|
|
@@ -1677,7 +1676,7 @@ var ModalHeaderBase = React33.forwardRef(({ className, testid: dataTestId = "mod
|
|
|
1677
1676
|
}
|
|
1678
1677
|
));
|
|
1679
1678
|
ModalHeaderBase.displayName = "ModalHeader";
|
|
1680
|
-
var ModalFooterBase =
|
|
1679
|
+
var ModalFooterBase = React32.forwardRef(({ className, testid: dataTestId = "modal-footer", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1681
1680
|
"div",
|
|
1682
1681
|
{
|
|
1683
1682
|
ref,
|
|
@@ -1690,7 +1689,7 @@ var ModalFooterBase = React33.forwardRef(({ className, testid: dataTestId = "mod
|
|
|
1690
1689
|
}
|
|
1691
1690
|
));
|
|
1692
1691
|
ModalFooterBase.displayName = "ModalFooter";
|
|
1693
|
-
var ModalTitleBase =
|
|
1692
|
+
var ModalTitleBase = React32.forwardRef(({ className, testid: dataTestId = "modal-title", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1694
1693
|
DialogPrimitive.Title,
|
|
1695
1694
|
{
|
|
1696
1695
|
ref,
|
|
@@ -1703,7 +1702,7 @@ var ModalTitleBase = React33.forwardRef(({ className, testid: dataTestId = "moda
|
|
|
1703
1702
|
}
|
|
1704
1703
|
));
|
|
1705
1704
|
ModalTitleBase.displayName = DialogPrimitive.Title.displayName;
|
|
1706
|
-
var ModalDescriptionBase =
|
|
1705
|
+
var ModalDescriptionBase = React32.forwardRef(({ className, testid: dataTestId = "modal-description", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1707
1706
|
DialogPrimitive.Description,
|
|
1708
1707
|
{
|
|
1709
1708
|
ref,
|
|
@@ -1740,7 +1739,7 @@ var buttonVariantsBase = cva(
|
|
|
1740
1739
|
}
|
|
1741
1740
|
}
|
|
1742
1741
|
);
|
|
1743
|
-
var ButtonBase =
|
|
1742
|
+
var ButtonBase = React32__default.forwardRef(
|
|
1744
1743
|
({
|
|
1745
1744
|
className,
|
|
1746
1745
|
variant,
|
|
@@ -1792,7 +1791,7 @@ var ButtonBase = React33__default.forwardRef(
|
|
|
1792
1791
|
}
|
|
1793
1792
|
);
|
|
1794
1793
|
ButtonBase.displayName = "Button";
|
|
1795
|
-
var ButtonGroupBase =
|
|
1794
|
+
var ButtonGroupBase = React32__default.forwardRef(
|
|
1796
1795
|
({ className, children, orientation = "horizontal", ...props }, ref) => {
|
|
1797
1796
|
return /* @__PURE__ */ jsx(
|
|
1798
1797
|
"div",
|
|
@@ -1805,17 +1804,17 @@ var ButtonGroupBase = React33__default.forwardRef(
|
|
|
1805
1804
|
className
|
|
1806
1805
|
),
|
|
1807
1806
|
...props,
|
|
1808
|
-
children:
|
|
1809
|
-
if (!
|
|
1807
|
+
children: React32__default.Children.map(children, (child, index) => {
|
|
1808
|
+
if (!React32__default.isValidElement(child)) return child;
|
|
1810
1809
|
const typedChild = child;
|
|
1811
|
-
return
|
|
1810
|
+
return React32__default.cloneElement(typedChild, {
|
|
1812
1811
|
className: cn(
|
|
1813
1812
|
typedChild.props.className,
|
|
1814
1813
|
"rounded-none",
|
|
1815
1814
|
index === 0 && orientation === "horizontal" && "rounded-l-md",
|
|
1816
1815
|
index === 0 && orientation === "vertical" && "rounded-t-md",
|
|
1817
|
-
index ===
|
|
1818
|
-
index ===
|
|
1816
|
+
index === React32__default.Children.count(children) - 1 && orientation === "horizontal" && "rounded-r-md",
|
|
1817
|
+
index === React32__default.Children.count(children) - 1 && orientation === "vertical" && "rounded-b-md"
|
|
1819
1818
|
)
|
|
1820
1819
|
});
|
|
1821
1820
|
})
|
|
@@ -1829,7 +1828,7 @@ var ErrorMessage = ({ error }) => {
|
|
|
1829
1828
|
return /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: error });
|
|
1830
1829
|
};
|
|
1831
1830
|
var ErrorMessage_default = ErrorMessage;
|
|
1832
|
-
var InputBase =
|
|
1831
|
+
var InputBase = React32.forwardRef(
|
|
1833
1832
|
({
|
|
1834
1833
|
className,
|
|
1835
1834
|
type = "text",
|
|
@@ -1850,7 +1849,8 @@ var InputBase = React33.forwardRef(
|
|
|
1850
1849
|
className: cn(
|
|
1851
1850
|
"flex items-center rounded-md transition h-9 bg-background overflow-hidden",
|
|
1852
1851
|
type !== "file" && "border border-input",
|
|
1853
|
-
error ? "border-destructive focus:ring-1 focus:ring-destructive" : "border-input"
|
|
1852
|
+
error ? "border-destructive focus:ring-1 focus:ring-destructive" : "border-input",
|
|
1853
|
+
className
|
|
1854
1854
|
),
|
|
1855
1855
|
children: [
|
|
1856
1856
|
leftIcon && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
@@ -1878,7 +1878,66 @@ var InputBase = React33.forwardRef(
|
|
|
1878
1878
|
}
|
|
1879
1879
|
);
|
|
1880
1880
|
InputBase.displayName = "Input";
|
|
1881
|
-
var
|
|
1881
|
+
var DebouncedInput = forwardRef(
|
|
1882
|
+
({
|
|
1883
|
+
value: initialValue,
|
|
1884
|
+
onChange,
|
|
1885
|
+
debounce: debounce2 = 500,
|
|
1886
|
+
label,
|
|
1887
|
+
labelClassname,
|
|
1888
|
+
leftIcon,
|
|
1889
|
+
rightIcon,
|
|
1890
|
+
showLoadingIndicator = false,
|
|
1891
|
+
className,
|
|
1892
|
+
error,
|
|
1893
|
+
...props
|
|
1894
|
+
}, ref) => {
|
|
1895
|
+
const [value, setValue] = useState(initialValue);
|
|
1896
|
+
const [isDebouncing, setIsDebouncing] = useState(false);
|
|
1897
|
+
useEffect(() => {
|
|
1898
|
+
setValue(initialValue);
|
|
1899
|
+
}, [initialValue]);
|
|
1900
|
+
useEffect(() => {
|
|
1901
|
+
if (value === initialValue) {
|
|
1902
|
+
setIsDebouncing(false);
|
|
1903
|
+
return;
|
|
1904
|
+
}
|
|
1905
|
+
setIsDebouncing(true);
|
|
1906
|
+
const timeout = setTimeout(() => {
|
|
1907
|
+
onChange(value);
|
|
1908
|
+
setIsDebouncing(false);
|
|
1909
|
+
}, debounce2);
|
|
1910
|
+
return () => {
|
|
1911
|
+
clearTimeout(timeout);
|
|
1912
|
+
setIsDebouncing(false);
|
|
1913
|
+
};
|
|
1914
|
+
}, [debounce2, initialValue, onChange, value]);
|
|
1915
|
+
const renderRightIcon = () => {
|
|
1916
|
+
if (showLoadingIndicator && isDebouncing) {
|
|
1917
|
+
return /* @__PURE__ */ jsx(CircleNotchIcon, { className: "h-4 w-4 animate-spin text-muted-foreground" });
|
|
1918
|
+
}
|
|
1919
|
+
return rightIcon;
|
|
1920
|
+
};
|
|
1921
|
+
return /* @__PURE__ */ jsx(
|
|
1922
|
+
InputBase,
|
|
1923
|
+
{
|
|
1924
|
+
...props,
|
|
1925
|
+
ref,
|
|
1926
|
+
label,
|
|
1927
|
+
labelClassname,
|
|
1928
|
+
leftIcon,
|
|
1929
|
+
rightIcon: renderRightIcon(),
|
|
1930
|
+
className: cn("transition-all duration-200", className),
|
|
1931
|
+
value,
|
|
1932
|
+
onChange: (e) => setValue(e.target.value),
|
|
1933
|
+
error
|
|
1934
|
+
}
|
|
1935
|
+
);
|
|
1936
|
+
}
|
|
1937
|
+
);
|
|
1938
|
+
DebouncedInput.displayName = "DebouncedInput";
|
|
1939
|
+
var DebouncedInput_default = DebouncedInput;
|
|
1940
|
+
var CommandBase = React32.forwardRef(({ className, testid: dataTestId = "command-base", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1882
1941
|
Command,
|
|
1883
1942
|
{
|
|
1884
1943
|
ref,
|
|
@@ -1911,7 +1970,7 @@ var CommandDialogBase = ({ children, open, ...props }) => {
|
|
|
1911
1970
|
"command-dialog"
|
|
1912
1971
|
) }) }) });
|
|
1913
1972
|
};
|
|
1914
|
-
var CommandInputBase =
|
|
1973
|
+
var CommandInputBase = React32.forwardRef(({ className, testid: dataTestId = "command-input", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1915
1974
|
"div",
|
|
1916
1975
|
{
|
|
1917
1976
|
className: "flex items-center border-b px-3 border-border",
|
|
@@ -1934,33 +1993,51 @@ var CommandInputBase = React33.forwardRef(({ className, testid: dataTestId = "co
|
|
|
1934
1993
|
}
|
|
1935
1994
|
));
|
|
1936
1995
|
CommandInputBase.displayName = Command.Input.displayName;
|
|
1937
|
-
var CommandDebouncedInputBase =
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1996
|
+
var CommandDebouncedInputBase = React32.forwardRef(
|
|
1997
|
+
({
|
|
1998
|
+
className,
|
|
1999
|
+
testid: dataTestId = "command-input",
|
|
2000
|
+
onValueChange,
|
|
2001
|
+
value: propValue,
|
|
2002
|
+
onChange: propOnChange,
|
|
2003
|
+
search,
|
|
2004
|
+
onSearch,
|
|
2005
|
+
...props
|
|
2006
|
+
}, ref) => /* @__PURE__ */ jsxs(
|
|
2007
|
+
"div",
|
|
2008
|
+
{
|
|
2009
|
+
className: "flex items-center px-3 border-border border-b",
|
|
2010
|
+
"cmdk-input-wrapper": "",
|
|
2011
|
+
children: [
|
|
2012
|
+
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 text-primary" }),
|
|
2013
|
+
/* @__PURE__ */ jsx(
|
|
2014
|
+
DebouncedInput_default,
|
|
2015
|
+
{
|
|
2016
|
+
ref,
|
|
2017
|
+
className: cn(
|
|
2018
|
+
"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",
|
|
2019
|
+
className
|
|
2020
|
+
),
|
|
2021
|
+
"data-testid": dataTestId,
|
|
2022
|
+
"cmdk-input": "",
|
|
2023
|
+
value: search ?? propValue ?? "",
|
|
2024
|
+
...props,
|
|
2025
|
+
onChange: (value) => {
|
|
2026
|
+
onValueChange?.(value);
|
|
2027
|
+
propOnChange?.(value);
|
|
2028
|
+
onSearch?.(value);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
)
|
|
2032
|
+
]
|
|
2033
|
+
}
|
|
2034
|
+
)
|
|
2035
|
+
);
|
|
2036
|
+
CommandDebouncedInputBase.displayName = "CommandDebouncedInputBase";
|
|
2037
|
+
var CommandListBase = React32.forwardRef(
|
|
1961
2038
|
({ className, testid: dataTestId = "command-list", onEndReached, ...props }, ref) => {
|
|
1962
|
-
const listRef =
|
|
1963
|
-
|
|
2039
|
+
const listRef = React32.useRef(null);
|
|
2040
|
+
React32.useEffect(() => {
|
|
1964
2041
|
const element = listRef.current;
|
|
1965
2042
|
if (!element) return;
|
|
1966
2043
|
const handleWheel = (e) => {
|
|
@@ -2023,7 +2100,7 @@ var CommandListBase = React33.forwardRef(
|
|
|
2023
2100
|
element.removeEventListener("touchstart", handleTouchStart);
|
|
2024
2101
|
};
|
|
2025
2102
|
}, [onEndReached]);
|
|
2026
|
-
const combinedRef =
|
|
2103
|
+
const combinedRef = React32.useCallback(
|
|
2027
2104
|
(node) => {
|
|
2028
2105
|
listRef.current = node;
|
|
2029
2106
|
if (typeof ref === "function") {
|
|
@@ -2059,7 +2136,7 @@ var CommandListBase = React33.forwardRef(
|
|
|
2059
2136
|
}
|
|
2060
2137
|
);
|
|
2061
2138
|
CommandListBase.displayName = Command.List.displayName;
|
|
2062
|
-
var CommandEmptyBase =
|
|
2139
|
+
var CommandEmptyBase = React32.forwardRef(({ testid: dataTestId = "command-empty", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2063
2140
|
Command.Empty,
|
|
2064
2141
|
{
|
|
2065
2142
|
ref,
|
|
@@ -2069,7 +2146,7 @@ var CommandEmptyBase = React33.forwardRef(({ testid: dataTestId = "command-empty
|
|
|
2069
2146
|
}
|
|
2070
2147
|
));
|
|
2071
2148
|
CommandEmptyBase.displayName = Command.Empty.displayName;
|
|
2072
|
-
var CommandGroupBase =
|
|
2149
|
+
var CommandGroupBase = React32.forwardRef(({ className, testid: dataTestId = "command-group", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2073
2150
|
Command.Group,
|
|
2074
2151
|
{
|
|
2075
2152
|
ref,
|
|
@@ -2082,7 +2159,7 @@ var CommandGroupBase = React33.forwardRef(({ className, testid: dataTestId = "co
|
|
|
2082
2159
|
}
|
|
2083
2160
|
));
|
|
2084
2161
|
CommandGroupBase.displayName = Command.Group.displayName;
|
|
2085
|
-
var CommandSeparatorBase =
|
|
2162
|
+
var CommandSeparatorBase = React32.forwardRef(({ className, testid: dataTestId = "command-separator", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2086
2163
|
Command.Separator,
|
|
2087
2164
|
{
|
|
2088
2165
|
ref,
|
|
@@ -2092,7 +2169,7 @@ var CommandSeparatorBase = React33.forwardRef(({ className, testid: dataTestId =
|
|
|
2092
2169
|
}
|
|
2093
2170
|
));
|
|
2094
2171
|
CommandSeparatorBase.displayName = Command.Separator.displayName;
|
|
2095
|
-
var CommandItemBase =
|
|
2172
|
+
var CommandItemBase = React32.forwardRef(({ className, testid: dataTestId = "command-item", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2096
2173
|
Command.Item,
|
|
2097
2174
|
{
|
|
2098
2175
|
ref,
|
|
@@ -2124,7 +2201,7 @@ CommandShortcutBase.displayName = "CommandShortcut";
|
|
|
2124
2201
|
var PopoverBase = PopoverPrimitive.Root;
|
|
2125
2202
|
var PopoverTriggerBase = PopoverPrimitive.Trigger;
|
|
2126
2203
|
var PopoverAnchorBase = PopoverPrimitive.Anchor;
|
|
2127
|
-
var PopoverContentBase =
|
|
2204
|
+
var PopoverContentBase = React32.forwardRef(
|
|
2128
2205
|
({
|
|
2129
2206
|
className,
|
|
2130
2207
|
align = "center",
|
|
@@ -2897,7 +2974,7 @@ __toESM(require_colors2());
|
|
|
2897
2974
|
var SelectBase = SelectPrimitive.Root;
|
|
2898
2975
|
var SelectGroupBase = SelectPrimitive.Group;
|
|
2899
2976
|
var SelectValueBase = SelectPrimitive.Value;
|
|
2900
|
-
var SelectTriggerBase =
|
|
2977
|
+
var SelectTriggerBase = React32.forwardRef(({ className, children, error, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: cn("w-full", error && "mb-0"), children: [
|
|
2901
2978
|
/* @__PURE__ */ jsx(
|
|
2902
2979
|
SelectPrimitive.Trigger,
|
|
2903
2980
|
{
|
|
@@ -2914,7 +2991,7 @@ var SelectTriggerBase = React33.forwardRef(({ className, children, error, ...pro
|
|
|
2914
2991
|
error ? /* @__PURE__ */ jsx(ErrorMessage_default, { error }) : null
|
|
2915
2992
|
] }));
|
|
2916
2993
|
SelectTriggerBase.displayName = SelectPrimitive.Trigger.displayName;
|
|
2917
|
-
var SelectScrollUpButtonBase =
|
|
2994
|
+
var SelectScrollUpButtonBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2918
2995
|
SelectPrimitive.ScrollUpButton,
|
|
2919
2996
|
{
|
|
2920
2997
|
ref,
|
|
@@ -2927,7 +3004,7 @@ var SelectScrollUpButtonBase = React33.forwardRef(({ className, ...props }, ref)
|
|
|
2927
3004
|
}
|
|
2928
3005
|
));
|
|
2929
3006
|
SelectScrollUpButtonBase.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2930
|
-
var SelectScrollDownButtonBase =
|
|
3007
|
+
var SelectScrollDownButtonBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2931
3008
|
SelectPrimitive.ScrollDownButton,
|
|
2932
3009
|
{
|
|
2933
3010
|
ref,
|
|
@@ -2940,7 +3017,7 @@ var SelectScrollDownButtonBase = React33.forwardRef(({ className, ...props }, re
|
|
|
2940
3017
|
}
|
|
2941
3018
|
));
|
|
2942
3019
|
SelectScrollDownButtonBase.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2943
|
-
var SelectContentBase =
|
|
3020
|
+
var SelectContentBase = React32.forwardRef(
|
|
2944
3021
|
({
|
|
2945
3022
|
className,
|
|
2946
3023
|
children,
|
|
@@ -2991,7 +3068,7 @@ var SelectContentBase = React33.forwardRef(
|
|
|
2991
3068
|
) }) })
|
|
2992
3069
|
);
|
|
2993
3070
|
SelectContentBase.displayName = SelectPrimitive.Content.displayName;
|
|
2994
|
-
var SelectLabelBase =
|
|
3071
|
+
var SelectLabelBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2995
3072
|
SelectPrimitive.Label,
|
|
2996
3073
|
{
|
|
2997
3074
|
ref,
|
|
@@ -3000,7 +3077,7 @@ var SelectLabelBase = React33.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3000
3077
|
}
|
|
3001
3078
|
));
|
|
3002
3079
|
SelectLabelBase.displayName = SelectPrimitive.Label.displayName;
|
|
3003
|
-
var SelectItemBase =
|
|
3080
|
+
var SelectItemBase = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3004
3081
|
SelectPrimitive.Item,
|
|
3005
3082
|
{
|
|
3006
3083
|
ref,
|
|
@@ -3033,7 +3110,7 @@ var SelectItemBase = React33.forwardRef(({ className, children, ...props }, ref)
|
|
|
3033
3110
|
}
|
|
3034
3111
|
));
|
|
3035
3112
|
SelectItemBase.displayName = SelectPrimitive.Item.displayName;
|
|
3036
|
-
var SelectSeparatorBase =
|
|
3113
|
+
var SelectSeparatorBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3037
3114
|
SelectPrimitive.Separator,
|
|
3038
3115
|
{
|
|
3039
3116
|
ref,
|
|
@@ -3042,7 +3119,7 @@ var SelectSeparatorBase = React33.forwardRef(({ className, ...props }, ref) => /
|
|
|
3042
3119
|
}
|
|
3043
3120
|
));
|
|
3044
3121
|
SelectSeparatorBase.displayName = SelectPrimitive.Separator.displayName;
|
|
3045
|
-
var SelectEmpty =
|
|
3122
|
+
var SelectEmpty = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3046
3123
|
"div",
|
|
3047
3124
|
{
|
|
3048
3125
|
ref,
|
|
@@ -3062,7 +3139,7 @@ var DropDownMenuGroupBase = DropdownMenuPrimitive.Group;
|
|
|
3062
3139
|
var DropDownMenuPortalBase = DropdownMenuPrimitive.Portal;
|
|
3063
3140
|
var DropDownMenuSubBase = DropdownMenuPrimitive.Sub;
|
|
3064
3141
|
var DropDownMenuRadioGroupBase = DropdownMenuPrimitive.RadioGroup;
|
|
3065
|
-
var DropDownMenuSubTriggerBase =
|
|
3142
|
+
var DropDownMenuSubTriggerBase = React32.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubTrigger, { ref, ...props, children: /* @__PURE__ */ jsxs(
|
|
3066
3143
|
motion.span,
|
|
3067
3144
|
{
|
|
3068
3145
|
className: cn(
|
|
@@ -3079,7 +3156,7 @@ var DropDownMenuSubTriggerBase = React33.forwardRef(({ className, inset, childre
|
|
|
3079
3156
|
}
|
|
3080
3157
|
) }));
|
|
3081
3158
|
DropDownMenuSubTriggerBase.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
3082
|
-
var DropDownMenuSubContentBase =
|
|
3159
|
+
var DropDownMenuSubContentBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3083
3160
|
DropdownMenuPrimitive.SubContent,
|
|
3084
3161
|
{
|
|
3085
3162
|
ref,
|
|
@@ -3090,7 +3167,7 @@ var DropDownMenuSubContentBase = React33.forwardRef(({ className, ...props }, re
|
|
|
3090
3167
|
...props
|
|
3091
3168
|
}
|
|
3092
3169
|
));
|
|
3093
|
-
var DropDownMenuContentBase =
|
|
3170
|
+
var DropDownMenuContentBase = React32.forwardRef(
|
|
3094
3171
|
({
|
|
3095
3172
|
className,
|
|
3096
3173
|
sideOffset = 4,
|
|
@@ -3123,7 +3200,7 @@ var DropDownMenuContentBase = React33.forwardRef(
|
|
|
3123
3200
|
) })
|
|
3124
3201
|
);
|
|
3125
3202
|
DropDownMenuContentBase.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
3126
|
-
var DropDownMenuItemBase =
|
|
3203
|
+
var DropDownMenuItemBase = React32.forwardRef(({ className, inset, rightIcon, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3127
3204
|
DropdownMenuPrimitive.Item,
|
|
3128
3205
|
{
|
|
3129
3206
|
ref,
|
|
@@ -3140,7 +3217,7 @@ var DropDownMenuItemBase = React33.forwardRef(({ className, inset, rightIcon, ch
|
|
|
3140
3217
|
}
|
|
3141
3218
|
));
|
|
3142
3219
|
DropDownMenuItemBase.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
3143
|
-
var DropDownMenuCheckboxItemBase =
|
|
3220
|
+
var DropDownMenuCheckboxItemBase = React32.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3144
3221
|
DropdownMenuPrimitive.CheckboxItem,
|
|
3145
3222
|
{
|
|
3146
3223
|
ref,
|
|
@@ -3157,7 +3234,7 @@ var DropDownMenuCheckboxItemBase = React33.forwardRef(({ className, children, ch
|
|
|
3157
3234
|
}
|
|
3158
3235
|
));
|
|
3159
3236
|
DropDownMenuCheckboxItemBase.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
3160
|
-
var DropDownMenuRadioItemBase =
|
|
3237
|
+
var DropDownMenuRadioItemBase = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
3161
3238
|
DropdownMenuPrimitive.RadioItem,
|
|
3162
3239
|
{
|
|
3163
3240
|
ref,
|
|
@@ -3173,7 +3250,7 @@ var DropDownMenuRadioItemBase = React33.forwardRef(({ className, children, ...pr
|
|
|
3173
3250
|
}
|
|
3174
3251
|
));
|
|
3175
3252
|
DropDownMenuRadioItemBase.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
3176
|
-
var DropDownMenuLabelBase =
|
|
3253
|
+
var DropDownMenuLabelBase = React32.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3177
3254
|
DropdownMenuPrimitive.Label,
|
|
3178
3255
|
{
|
|
3179
3256
|
ref,
|
|
@@ -3186,7 +3263,7 @@ var DropDownMenuLabelBase = React33.forwardRef(({ className, inset, ...props },
|
|
|
3186
3263
|
}
|
|
3187
3264
|
));
|
|
3188
3265
|
DropDownMenuLabelBase.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
3189
|
-
var DropDownMenuSeparatorBase =
|
|
3266
|
+
var DropDownMenuSeparatorBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3190
3267
|
DropdownMenuPrimitive.Separator,
|
|
3191
3268
|
{
|
|
3192
3269
|
ref,
|
|
@@ -3410,7 +3487,7 @@ function ModeToggleBase({
|
|
|
3410
3487
|
)
|
|
3411
3488
|
] });
|
|
3412
3489
|
}
|
|
3413
|
-
var AvatarBase =
|
|
3490
|
+
var AvatarBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3414
3491
|
AvatarPrimitive.Root,
|
|
3415
3492
|
{
|
|
3416
3493
|
ref,
|
|
@@ -3422,7 +3499,7 @@ var AvatarBase = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3422
3499
|
}
|
|
3423
3500
|
));
|
|
3424
3501
|
AvatarBase.displayName = AvatarPrimitive.Root.displayName;
|
|
3425
|
-
var AvatarImageBase =
|
|
3502
|
+
var AvatarImageBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3426
3503
|
AvatarPrimitive.Image,
|
|
3427
3504
|
{
|
|
3428
3505
|
ref,
|
|
@@ -3431,7 +3508,7 @@ var AvatarImageBase = React33.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3431
3508
|
}
|
|
3432
3509
|
));
|
|
3433
3510
|
AvatarImageBase.displayName = AvatarPrimitive.Image.displayName;
|
|
3434
|
-
var AvatarFallbackBase =
|
|
3511
|
+
var AvatarFallbackBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3435
3512
|
AvatarPrimitive.Fallback,
|
|
3436
3513
|
{
|
|
3437
3514
|
ref,
|
|
@@ -3497,7 +3574,7 @@ function CalendarBase({
|
|
|
3497
3574
|
);
|
|
3498
3575
|
}
|
|
3499
3576
|
CalendarBase.displayName = "Calendar";
|
|
3500
|
-
var CardBase =
|
|
3577
|
+
var CardBase = React32.forwardRef(({ className, testid: dataTestId = "card-base", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3501
3578
|
"div",
|
|
3502
3579
|
{
|
|
3503
3580
|
ref,
|
|
@@ -3510,7 +3587,7 @@ var CardBase = React33.forwardRef(({ className, testid: dataTestId = "card-base"
|
|
|
3510
3587
|
}
|
|
3511
3588
|
));
|
|
3512
3589
|
CardBase.displayName = "Card";
|
|
3513
|
-
var CardHeaderBase =
|
|
3590
|
+
var CardHeaderBase = React32.forwardRef(({ className, testid: dataTestId = "card-header", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3514
3591
|
"div",
|
|
3515
3592
|
{
|
|
3516
3593
|
ref,
|
|
@@ -3520,7 +3597,7 @@ var CardHeaderBase = React33.forwardRef(({ className, testid: dataTestId = "card
|
|
|
3520
3597
|
}
|
|
3521
3598
|
));
|
|
3522
3599
|
CardHeaderBase.displayName = "CardHeader";
|
|
3523
|
-
var CardTitleBase =
|
|
3600
|
+
var CardTitleBase = React32.forwardRef(({ className, testid: dataTestId = "card-title", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3524
3601
|
"div",
|
|
3525
3602
|
{
|
|
3526
3603
|
ref,
|
|
@@ -3530,7 +3607,7 @@ var CardTitleBase = React33.forwardRef(({ className, testid: dataTestId = "card-
|
|
|
3530
3607
|
}
|
|
3531
3608
|
));
|
|
3532
3609
|
CardTitleBase.displayName = "CardTitle";
|
|
3533
|
-
var CardDescriptionBase =
|
|
3610
|
+
var CardDescriptionBase = React32.forwardRef(({ className, testid: dataTestId = "card-description", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3534
3611
|
"div",
|
|
3535
3612
|
{
|
|
3536
3613
|
ref,
|
|
@@ -3540,7 +3617,7 @@ var CardDescriptionBase = React33.forwardRef(({ className, testid: dataTestId =
|
|
|
3540
3617
|
}
|
|
3541
3618
|
));
|
|
3542
3619
|
CardDescriptionBase.displayName = "CardDescription";
|
|
3543
|
-
var CardContentBase =
|
|
3620
|
+
var CardContentBase = React32.forwardRef(({ className, testid: dataTestId = "card-content", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3544
3621
|
"div",
|
|
3545
3622
|
{
|
|
3546
3623
|
ref,
|
|
@@ -3550,7 +3627,7 @@ var CardContentBase = React33.forwardRef(({ className, testid: dataTestId = "car
|
|
|
3550
3627
|
}
|
|
3551
3628
|
));
|
|
3552
3629
|
CardContentBase.displayName = "CardContent";
|
|
3553
|
-
var CardFooterBase =
|
|
3630
|
+
var CardFooterBase = React32.forwardRef(({ className, testid: dataTestId = "card-footer", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3554
3631
|
"div",
|
|
3555
3632
|
{
|
|
3556
3633
|
ref,
|
|
@@ -3623,7 +3700,7 @@ var createImagePreview = (file) => {
|
|
|
3623
3700
|
reader.readAsDataURL(file);
|
|
3624
3701
|
});
|
|
3625
3702
|
};
|
|
3626
|
-
var FileUploader =
|
|
3703
|
+
var FileUploader = React32.forwardRef(
|
|
3627
3704
|
({
|
|
3628
3705
|
className,
|
|
3629
3706
|
accept,
|
|
@@ -3636,18 +3713,18 @@ var FileUploader = React33.forwardRef(
|
|
|
3636
3713
|
showPreview = true,
|
|
3637
3714
|
dropzoneText = "Arraste arquivos aqui ou clique para selecionar",
|
|
3638
3715
|
dropzoneSubtext,
|
|
3639
|
-
animate = true,
|
|
3716
|
+
animate: animate2 = true,
|
|
3640
3717
|
...props
|
|
3641
3718
|
}, ref) => {
|
|
3642
|
-
const [isDragging, setIsDragging] =
|
|
3643
|
-
const [files, setFiles] =
|
|
3644
|
-
const inputRef =
|
|
3645
|
-
const dragCounterRef =
|
|
3719
|
+
const [isDragging, setIsDragging] = React32.useState(false);
|
|
3720
|
+
const [files, setFiles] = React32.useState(value);
|
|
3721
|
+
const inputRef = React32.useRef(null);
|
|
3722
|
+
const dragCounterRef = React32.useRef(0);
|
|
3646
3723
|
const multiple = maxFiles > 1;
|
|
3647
|
-
|
|
3724
|
+
React32.useEffect(() => {
|
|
3648
3725
|
setFiles(value);
|
|
3649
3726
|
}, [value]);
|
|
3650
|
-
|
|
3727
|
+
React32.useEffect(() => {
|
|
3651
3728
|
return () => {
|
|
3652
3729
|
files.forEach((file) => {
|
|
3653
3730
|
if (file.preview) {
|
|
@@ -3844,7 +3921,7 @@ var FileUploader = React33.forwardRef(
|
|
|
3844
3921
|
motion.p,
|
|
3845
3922
|
{
|
|
3846
3923
|
className: "mb-2 text-base font-semibold text-foreground",
|
|
3847
|
-
initial:
|
|
3924
|
+
initial: animate2 ? { opacity: 0, y: -10 } : false,
|
|
3848
3925
|
animate: { opacity: 1, y: 0 },
|
|
3849
3926
|
transition: { delay: 0.1 },
|
|
3850
3927
|
children: dropzoneText
|
|
@@ -3854,7 +3931,7 @@ var FileUploader = React33.forwardRef(
|
|
|
3854
3931
|
motion.p,
|
|
3855
3932
|
{
|
|
3856
3933
|
className: "text-sm text-muted-foreground",
|
|
3857
|
-
initial:
|
|
3934
|
+
initial: animate2 ? { opacity: 0, y: -10 } : false,
|
|
3858
3935
|
animate: { opacity: 1, y: 0 },
|
|
3859
3936
|
transition: { delay: 0.2 },
|
|
3860
3937
|
children: defaultSubtext
|
|
@@ -3898,7 +3975,7 @@ var FileUploader = React33.forwardRef(
|
|
|
3898
3975
|
motion.div,
|
|
3899
3976
|
{
|
|
3900
3977
|
className: "mt-6 w-full",
|
|
3901
|
-
initial:
|
|
3978
|
+
initial: animate2 ? { opacity: 0, y: 10 } : false,
|
|
3902
3979
|
animate: { opacity: 1, y: 0 },
|
|
3903
3980
|
transition: { delay: 0.3 },
|
|
3904
3981
|
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -3913,7 +3990,7 @@ var FileUploader = React33.forwardRef(
|
|
|
3913
3990
|
motion.div,
|
|
3914
3991
|
{
|
|
3915
3992
|
layout: true,
|
|
3916
|
-
initial:
|
|
3993
|
+
initial: animate2 ? { opacity: 0, x: -20 } : false,
|
|
3917
3994
|
animate: { opacity: 1, x: 0 },
|
|
3918
3995
|
exit: {
|
|
3919
3996
|
opacity: 0,
|
|
@@ -3921,7 +3998,7 @@ var FileUploader = React33.forwardRef(
|
|
|
3921
3998
|
transition: { duration: 0.2 }
|
|
3922
3999
|
},
|
|
3923
4000
|
transition: {
|
|
3924
|
-
delay:
|
|
4001
|
+
delay: animate2 ? index * 0.05 : 0,
|
|
3925
4002
|
layout: { duration: 0.2 }
|
|
3926
4003
|
},
|
|
3927
4004
|
className: cn(
|
|
@@ -3995,12 +4072,12 @@ var FileUploader = React33.forwardRef(
|
|
|
3995
4072
|
}
|
|
3996
4073
|
);
|
|
3997
4074
|
FileUploader.displayName = "FileUploader";
|
|
3998
|
-
var CheckboxBase =
|
|
4075
|
+
var CheckboxBase = React32.forwardRef(({ className, testid: dataTestId = "checkbox-base", checked: checkedProp, defaultChecked, onCheckedChange, ...props }, ref) => {
|
|
3999
4076
|
const isControlled = checkedProp !== void 0;
|
|
4000
|
-
const [checkedState, setCheckedState] =
|
|
4077
|
+
const [checkedState, setCheckedState] = React32.useState(
|
|
4001
4078
|
isControlled ? checkedProp : defaultChecked ?? false
|
|
4002
4079
|
);
|
|
4003
|
-
|
|
4080
|
+
React32.useEffect(() => {
|
|
4004
4081
|
if (isControlled) setCheckedState(checkedProp);
|
|
4005
4082
|
}, [checkedProp, isControlled]);
|
|
4006
4083
|
const handleCheckedChange = (next) => {
|
|
@@ -4040,11 +4117,11 @@ var CheckboxBase = React33.forwardRef(({ className, testid: dataTestId = "checkb
|
|
|
4040
4117
|
);
|
|
4041
4118
|
});
|
|
4042
4119
|
CheckboxBase.displayName = CheckboxPrimitive.Root.displayName;
|
|
4043
|
-
var CollapsibleBase =
|
|
4120
|
+
var CollapsibleBase = React32.forwardRef(({ ...props }, ref) => {
|
|
4044
4121
|
return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { ref, "data-slot": "collapsible", ...props });
|
|
4045
4122
|
});
|
|
4046
4123
|
CollapsibleBase.displayName = CollapsiblePrimitive.Root.displayName;
|
|
4047
|
-
var CollapsibleTriggerBase =
|
|
4124
|
+
var CollapsibleTriggerBase = React32.forwardRef(({ className, children, leftIcon, showCaret = true, ...props }, ref) => {
|
|
4048
4125
|
return /* @__PURE__ */ jsxs(
|
|
4049
4126
|
CollapsiblePrimitive.CollapsibleTrigger,
|
|
4050
4127
|
{
|
|
@@ -4066,7 +4143,7 @@ var CollapsibleTriggerBase = React33.forwardRef(({ className, children, leftIcon
|
|
|
4066
4143
|
);
|
|
4067
4144
|
});
|
|
4068
4145
|
CollapsibleTriggerBase.displayName = CollapsiblePrimitive.CollapsibleTrigger.displayName;
|
|
4069
|
-
var CollapsibleContentBase =
|
|
4146
|
+
var CollapsibleContentBase = React32.forwardRef(({ className, children, ...props }, ref) => {
|
|
4070
4147
|
return /* @__PURE__ */ jsx(
|
|
4071
4148
|
CollapsiblePrimitive.CollapsibleContent,
|
|
4072
4149
|
{
|
|
@@ -4088,7 +4165,7 @@ function HoverCardBase(props) {
|
|
|
4088
4165
|
function HoverCardTriggerBase(props) {
|
|
4089
4166
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { ...props });
|
|
4090
4167
|
}
|
|
4091
|
-
var HoverCardContentBase =
|
|
4168
|
+
var HoverCardContentBase = React32.forwardRef(
|
|
4092
4169
|
({ className, align = "center", sideOffset = 6, children, ...props }, ref) => {
|
|
4093
4170
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
4094
4171
|
HoverCardPrimitive.Content,
|
|
@@ -4165,7 +4242,7 @@ function InputOTPSlotBase({
|
|
|
4165
4242
|
className,
|
|
4166
4243
|
...props
|
|
4167
4244
|
}) {
|
|
4168
|
-
const inputOTPContext =
|
|
4245
|
+
const inputOTPContext = React32.useContext(OTPInputContext);
|
|
4169
4246
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4170
4247
|
return /* @__PURE__ */ jsxs(
|
|
4171
4248
|
"div",
|
|
@@ -4187,7 +4264,7 @@ function InputOTPSlotBase({
|
|
|
4187
4264
|
function InputOTPSeparatorBase({ ...props }) {
|
|
4188
4265
|
return /* @__PURE__ */ jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx(MinusIcon, {}) });
|
|
4189
4266
|
}
|
|
4190
|
-
var SlideBase =
|
|
4267
|
+
var SlideBase = React32.forwardRef(
|
|
4191
4268
|
({
|
|
4192
4269
|
className,
|
|
4193
4270
|
orientation = "horizontal",
|
|
@@ -4265,7 +4342,7 @@ var SlideBase = React33.forwardRef(
|
|
|
4265
4342
|
}
|
|
4266
4343
|
);
|
|
4267
4344
|
SlideBase.displayName = "SlideBase";
|
|
4268
|
-
var EditButton =
|
|
4345
|
+
var EditButton = React32.forwardRef(
|
|
4269
4346
|
({
|
|
4270
4347
|
disabled,
|
|
4271
4348
|
onClick,
|
|
@@ -4305,7 +4382,7 @@ var EditButton = React33.forwardRef(
|
|
|
4305
4382
|
)
|
|
4306
4383
|
);
|
|
4307
4384
|
EditButton.displayName = "EditButton";
|
|
4308
|
-
var ChangeButton =
|
|
4385
|
+
var ChangeButton = React32.forwardRef(
|
|
4309
4386
|
({
|
|
4310
4387
|
disabled,
|
|
4311
4388
|
onClick,
|
|
@@ -4345,7 +4422,7 @@ var ChangeButton = React33.forwardRef(
|
|
|
4345
4422
|
)
|
|
4346
4423
|
);
|
|
4347
4424
|
ChangeButton.displayName = "ChangeButton";
|
|
4348
|
-
var SaveButton =
|
|
4425
|
+
var SaveButton = React32.forwardRef(
|
|
4349
4426
|
({
|
|
4350
4427
|
disabled,
|
|
4351
4428
|
onClick,
|
|
@@ -4385,7 +4462,7 @@ var SaveButton = React33.forwardRef(
|
|
|
4385
4462
|
)
|
|
4386
4463
|
);
|
|
4387
4464
|
SaveButton.displayName = "SaveButton";
|
|
4388
|
-
var AddButton =
|
|
4465
|
+
var AddButton = React32.forwardRef(
|
|
4389
4466
|
({
|
|
4390
4467
|
disabled,
|
|
4391
4468
|
onClick,
|
|
@@ -4425,7 +4502,7 @@ var AddButton = React33.forwardRef(
|
|
|
4425
4502
|
)
|
|
4426
4503
|
);
|
|
4427
4504
|
AddButton.displayName = "AddButton";
|
|
4428
|
-
var CloseButton =
|
|
4505
|
+
var CloseButton = React32.forwardRef(
|
|
4429
4506
|
({
|
|
4430
4507
|
disabled,
|
|
4431
4508
|
onClick,
|
|
@@ -4963,7 +5040,7 @@ var LockButton = ({
|
|
|
4963
5040
|
}
|
|
4964
5041
|
);
|
|
4965
5042
|
var UnlockButton = (props) => /* @__PURE__ */ jsx(LockButton, { isLocked: false, testid: "button-unlock", ...props });
|
|
4966
|
-
var SwitchBase =
|
|
5043
|
+
var SwitchBase = React32.forwardRef(({ className, testid: dataTestId = "switch-base", ...props }, ref) => {
|
|
4967
5044
|
return /* @__PURE__ */ jsx(
|
|
4968
5045
|
SwitchPrimitives.Root,
|
|
4969
5046
|
{
|
|
@@ -4990,14 +5067,14 @@ var SwitchBase = React33.forwardRef(({ className, testid: dataTestId = "switch-b
|
|
|
4990
5067
|
);
|
|
4991
5068
|
});
|
|
4992
5069
|
SwitchBase.displayName = SwitchPrimitives.Root.displayName;
|
|
4993
|
-
var TextAreaBase =
|
|
5070
|
+
var TextAreaBase = React32.forwardRef(
|
|
4994
5071
|
({ className, hideClear = false, onClear, ...props }, ref) => {
|
|
4995
|
-
const [isFocused, setIsFocused] =
|
|
4996
|
-
const [hasContent, setHasContent] =
|
|
5072
|
+
const [isFocused, setIsFocused] = React32.useState(false);
|
|
5073
|
+
const [hasContent, setHasContent] = React32.useState(
|
|
4997
5074
|
!!props.value || !!props.defaultValue
|
|
4998
5075
|
);
|
|
4999
|
-
const [showConfirmTooltip, setShowConfirmTooltip] =
|
|
5000
|
-
const textareaRef =
|
|
5076
|
+
const [showConfirmTooltip, setShowConfirmTooltip] = React32.useState(false);
|
|
5077
|
+
const textareaRef = React32.useRef(null);
|
|
5001
5078
|
const handleFocus = (e) => {
|
|
5002
5079
|
setIsFocused(true);
|
|
5003
5080
|
props.onFocus?.(e);
|
|
@@ -5033,8 +5110,8 @@ var TextAreaBase = React33.forwardRef(
|
|
|
5033
5110
|
const handleCancelClear = () => {
|
|
5034
5111
|
setShowConfirmTooltip(false);
|
|
5035
5112
|
};
|
|
5036
|
-
|
|
5037
|
-
|
|
5113
|
+
React32.useImperativeHandle(ref, () => textareaRef.current);
|
|
5114
|
+
React32.useEffect(() => {
|
|
5038
5115
|
setHasContent(!!props.value || !!props.defaultValue);
|
|
5039
5116
|
}, [props.value, props.defaultValue]);
|
|
5040
5117
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
@@ -5159,202 +5236,7 @@ var TextAreaBase = React33.forwardRef(
|
|
|
5159
5236
|
}
|
|
5160
5237
|
);
|
|
5161
5238
|
TextAreaBase.displayName = "TextAreaBase";
|
|
5162
|
-
var
|
|
5163
|
-
function useCarousel() {
|
|
5164
|
-
const context = React33.useContext(CarouselContext);
|
|
5165
|
-
if (!context) {
|
|
5166
|
-
throw new Error("useCarousel must be used within a <CarouselBase />");
|
|
5167
|
-
}
|
|
5168
|
-
return context;
|
|
5169
|
-
}
|
|
5170
|
-
function CarouselBase({
|
|
5171
|
-
orientation = "horizontal",
|
|
5172
|
-
opts,
|
|
5173
|
-
setApi,
|
|
5174
|
-
plugins,
|
|
5175
|
-
className,
|
|
5176
|
-
children,
|
|
5177
|
-
...props
|
|
5178
|
-
}) {
|
|
5179
|
-
const [carouselRef, api] = useEmblaCarousel(
|
|
5180
|
-
{
|
|
5181
|
-
...opts,
|
|
5182
|
-
axis: orientation === "horizontal" ? "x" : "y"
|
|
5183
|
-
},
|
|
5184
|
-
plugins
|
|
5185
|
-
);
|
|
5186
|
-
const [canScrollPrev, setCanScrollPrev] = React33.useState(false);
|
|
5187
|
-
const [canScrollNext, setCanScrollNext] = React33.useState(false);
|
|
5188
|
-
const onSelect = React33.useCallback((api2) => {
|
|
5189
|
-
if (!api2) return;
|
|
5190
|
-
setCanScrollPrev(api2.canScrollPrev());
|
|
5191
|
-
setCanScrollNext(api2.canScrollNext());
|
|
5192
|
-
}, []);
|
|
5193
|
-
const scrollPrev = React33.useCallback(() => {
|
|
5194
|
-
api?.scrollPrev();
|
|
5195
|
-
}, [api]);
|
|
5196
|
-
const scrollNext = React33.useCallback(() => {
|
|
5197
|
-
api?.scrollNext();
|
|
5198
|
-
}, [api]);
|
|
5199
|
-
const handleKeyDown = React33.useCallback(
|
|
5200
|
-
(event) => {
|
|
5201
|
-
if (event.key === "ArrowLeft") {
|
|
5202
|
-
event.preventDefault();
|
|
5203
|
-
scrollPrev();
|
|
5204
|
-
} else if (event.key === "ArrowRight") {
|
|
5205
|
-
event.preventDefault();
|
|
5206
|
-
scrollNext();
|
|
5207
|
-
}
|
|
5208
|
-
},
|
|
5209
|
-
[scrollPrev, scrollNext]
|
|
5210
|
-
);
|
|
5211
|
-
React33.useEffect(() => {
|
|
5212
|
-
if (!api || !setApi) return;
|
|
5213
|
-
setApi(api);
|
|
5214
|
-
}, [api, setApi]);
|
|
5215
|
-
React33.useEffect(() => {
|
|
5216
|
-
if (!api) return;
|
|
5217
|
-
onSelect(api);
|
|
5218
|
-
api.on("reInit", onSelect);
|
|
5219
|
-
api.on("select", onSelect);
|
|
5220
|
-
return () => {
|
|
5221
|
-
api?.off("select", onSelect);
|
|
5222
|
-
};
|
|
5223
|
-
}, [api, onSelect]);
|
|
5224
|
-
return /* @__PURE__ */ jsx(
|
|
5225
|
-
CarouselContext.Provider,
|
|
5226
|
-
{
|
|
5227
|
-
value: {
|
|
5228
|
-
carouselRef,
|
|
5229
|
-
api,
|
|
5230
|
-
opts,
|
|
5231
|
-
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
5232
|
-
scrollPrev,
|
|
5233
|
-
scrollNext,
|
|
5234
|
-
canScrollPrev,
|
|
5235
|
-
canScrollNext
|
|
5236
|
-
},
|
|
5237
|
-
children: /* @__PURE__ */ jsx(
|
|
5238
|
-
"div",
|
|
5239
|
-
{
|
|
5240
|
-
onKeyDownCapture: handleKeyDown,
|
|
5241
|
-
className: cn("relative", className),
|
|
5242
|
-
role: "region",
|
|
5243
|
-
"aria-roledescription": "carousel",
|
|
5244
|
-
"data-slot": "carousel",
|
|
5245
|
-
...props,
|
|
5246
|
-
children
|
|
5247
|
-
}
|
|
5248
|
-
)
|
|
5249
|
-
}
|
|
5250
|
-
);
|
|
5251
|
-
}
|
|
5252
|
-
function CarouselContentBase({
|
|
5253
|
-
className,
|
|
5254
|
-
...props
|
|
5255
|
-
}) {
|
|
5256
|
-
const { carouselRef, orientation } = useCarousel();
|
|
5257
|
-
return /* @__PURE__ */ jsx(
|
|
5258
|
-
"div",
|
|
5259
|
-
{
|
|
5260
|
-
ref: carouselRef,
|
|
5261
|
-
className: "overflow-hidden",
|
|
5262
|
-
"data-slot": "carousel-content",
|
|
5263
|
-
children: /* @__PURE__ */ jsx(
|
|
5264
|
-
"div",
|
|
5265
|
-
{
|
|
5266
|
-
className: cn(
|
|
5267
|
-
"flex",
|
|
5268
|
-
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
5269
|
-
className
|
|
5270
|
-
),
|
|
5271
|
-
...props
|
|
5272
|
-
}
|
|
5273
|
-
)
|
|
5274
|
-
}
|
|
5275
|
-
);
|
|
5276
|
-
}
|
|
5277
|
-
function CarouselItemBase({
|
|
5278
|
-
className,
|
|
5279
|
-
...props
|
|
5280
|
-
}) {
|
|
5281
|
-
const { orientation } = useCarousel();
|
|
5282
|
-
return /* @__PURE__ */ jsx(
|
|
5283
|
-
"div",
|
|
5284
|
-
{
|
|
5285
|
-
role: "group",
|
|
5286
|
-
"aria-roledescription": "slide",
|
|
5287
|
-
"data-slot": "carousel-item",
|
|
5288
|
-
className: cn(
|
|
5289
|
-
"min-w-0 shrink-0 grow-0 basis-full",
|
|
5290
|
-
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
5291
|
-
className
|
|
5292
|
-
),
|
|
5293
|
-
...props
|
|
5294
|
-
}
|
|
5295
|
-
);
|
|
5296
|
-
}
|
|
5297
|
-
function CarouselPreviousBase({
|
|
5298
|
-
className,
|
|
5299
|
-
variant = "outline",
|
|
5300
|
-
size = "icon",
|
|
5301
|
-
...props
|
|
5302
|
-
}) {
|
|
5303
|
-
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
5304
|
-
const btnRef = React33.useRef(null);
|
|
5305
|
-
return /* @__PURE__ */ jsxs(
|
|
5306
|
-
ButtonBase,
|
|
5307
|
-
{
|
|
5308
|
-
"data-slot": "carousel-previous",
|
|
5309
|
-
variant,
|
|
5310
|
-
size,
|
|
5311
|
-
ref: btnRef,
|
|
5312
|
-
className: cn(
|
|
5313
|
-
"absolute size-8 rounded-l-3xl px-6",
|
|
5314
|
-
orientation === "horizontal" ? "top-2 right-1" : "bottom-64 left-1/3 rotate-90",
|
|
5315
|
-
className
|
|
5316
|
-
),
|
|
5317
|
-
disabled: !canScrollPrev,
|
|
5318
|
-
onClick: scrollPrev,
|
|
5319
|
-
...props,
|
|
5320
|
-
children: [
|
|
5321
|
-
/* @__PURE__ */ jsx(ArrowLeftIcon, {}),
|
|
5322
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous slide" })
|
|
5323
|
-
]
|
|
5324
|
-
}
|
|
5325
|
-
);
|
|
5326
|
-
}
|
|
5327
|
-
function CarouselNextBase({
|
|
5328
|
-
className,
|
|
5329
|
-
variant = "outline",
|
|
5330
|
-
size = "icon",
|
|
5331
|
-
...props
|
|
5332
|
-
}) {
|
|
5333
|
-
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
5334
|
-
const btnRef = React33.useRef(null);
|
|
5335
|
-
return /* @__PURE__ */ jsxs(
|
|
5336
|
-
ButtonBase,
|
|
5337
|
-
{
|
|
5338
|
-
"data-slot": "carousel-next",
|
|
5339
|
-
variant,
|
|
5340
|
-
size,
|
|
5341
|
-
ref: btnRef,
|
|
5342
|
-
className: cn(
|
|
5343
|
-
"absolute size-8 rounded-r-3xl px-6",
|
|
5344
|
-
orientation === "horizontal" ? "top-2" : "left-14 -translate-x-1/2 rotate-90",
|
|
5345
|
-
className
|
|
5346
|
-
),
|
|
5347
|
-
disabled: !canScrollNext,
|
|
5348
|
-
onClick: scrollNext,
|
|
5349
|
-
...props,
|
|
5350
|
-
children: [
|
|
5351
|
-
/* @__PURE__ */ jsx(ArrowRightIcon$1, {}),
|
|
5352
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next slide" })
|
|
5353
|
-
]
|
|
5354
|
-
}
|
|
5355
|
-
);
|
|
5356
|
-
}
|
|
5357
|
-
var ScrollAreaBase = React33.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5239
|
+
var ScrollAreaBase = React32.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5358
5240
|
ScrollAreaPrimitive.Root,
|
|
5359
5241
|
{
|
|
5360
5242
|
ref,
|
|
@@ -5368,7 +5250,7 @@ var ScrollAreaBase = React33.forwardRef(({ className, children, ...props }, ref)
|
|
|
5368
5250
|
}
|
|
5369
5251
|
));
|
|
5370
5252
|
ScrollAreaBase.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
5371
|
-
var ScrollBarBase =
|
|
5253
|
+
var ScrollBarBase = React32.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5372
5254
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
5373
5255
|
{
|
|
5374
5256
|
ref,
|
|
@@ -5384,7 +5266,7 @@ var ScrollBarBase = React33.forwardRef(({ className, orientation = "vertical", .
|
|
|
5384
5266
|
}
|
|
5385
5267
|
));
|
|
5386
5268
|
ScrollBarBase.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
5387
|
-
var SeparatorBase =
|
|
5269
|
+
var SeparatorBase = React32.forwardRef(
|
|
5388
5270
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
|
|
5389
5271
|
const isHorizontal = orientation === "horizontal";
|
|
5390
5272
|
return /* @__PURE__ */ jsx(
|
|
@@ -5416,7 +5298,7 @@ var SeparatorBase = React33.forwardRef(
|
|
|
5416
5298
|
}
|
|
5417
5299
|
);
|
|
5418
5300
|
SeparatorBase.displayName = SeparatorPrimitive.Root.displayName;
|
|
5419
|
-
var TableBase =
|
|
5301
|
+
var TableBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
5420
5302
|
"table",
|
|
5421
5303
|
{
|
|
5422
5304
|
ref,
|
|
@@ -5425,9 +5307,9 @@ var TableBase = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
5425
5307
|
}
|
|
5426
5308
|
) }));
|
|
5427
5309
|
TableBase.displayName = "TableBase";
|
|
5428
|
-
var TableHeaderBase =
|
|
5310
|
+
var TableHeaderBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
5429
5311
|
TableHeaderBase.displayName = "TableHeaderBase";
|
|
5430
|
-
var TableBodyBase =
|
|
5312
|
+
var TableBodyBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5431
5313
|
"tbody",
|
|
5432
5314
|
{
|
|
5433
5315
|
ref,
|
|
@@ -5436,7 +5318,7 @@ var TableBodyBase = React33.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
5436
5318
|
}
|
|
5437
5319
|
));
|
|
5438
5320
|
TableBodyBase.displayName = "TableBodyBase";
|
|
5439
|
-
var TableFooterBase =
|
|
5321
|
+
var TableFooterBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5440
5322
|
"tfoot",
|
|
5441
5323
|
{
|
|
5442
5324
|
ref,
|
|
@@ -5448,7 +5330,7 @@ var TableFooterBase = React33.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
5448
5330
|
}
|
|
5449
5331
|
));
|
|
5450
5332
|
TableFooterBase.displayName = "TableFooterBase";
|
|
5451
|
-
var TableRowBase =
|
|
5333
|
+
var TableRowBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5452
5334
|
"tr",
|
|
5453
5335
|
{
|
|
5454
5336
|
ref,
|
|
@@ -5460,7 +5342,7 @@ var TableRowBase = React33.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
5460
5342
|
}
|
|
5461
5343
|
));
|
|
5462
5344
|
TableRowBase.displayName = "TableRowBase";
|
|
5463
|
-
var TableHeadBase =
|
|
5345
|
+
var TableHeadBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5464
5346
|
"th",
|
|
5465
5347
|
{
|
|
5466
5348
|
ref,
|
|
@@ -5472,7 +5354,7 @@ var TableHeadBase = React33.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
5472
5354
|
}
|
|
5473
5355
|
));
|
|
5474
5356
|
TableHeadBase.displayName = "TableHeadBase";
|
|
5475
|
-
var TableCellBase =
|
|
5357
|
+
var TableCellBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5476
5358
|
"td",
|
|
5477
5359
|
{
|
|
5478
5360
|
ref,
|
|
@@ -5484,7 +5366,7 @@ var TableCellBase = React33.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
5484
5366
|
}
|
|
5485
5367
|
));
|
|
5486
5368
|
TableCellBase.displayName = "TableCellBase";
|
|
5487
|
-
var TableCaptionBase =
|
|
5369
|
+
var TableCaptionBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5488
5370
|
"caption",
|
|
5489
5371
|
{
|
|
5490
5372
|
ref,
|
|
@@ -5493,7 +5375,7 @@ var TableCaptionBase = React33.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5493
5375
|
}
|
|
5494
5376
|
));
|
|
5495
5377
|
TableCaptionBase.displayName = "TableCaptionBase";
|
|
5496
|
-
var TabsBase =
|
|
5378
|
+
var TabsBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5497
5379
|
TabsPrimitive.Root,
|
|
5498
5380
|
{
|
|
5499
5381
|
ref,
|
|
@@ -5502,7 +5384,7 @@ var TabsBase = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
5502
5384
|
}
|
|
5503
5385
|
));
|
|
5504
5386
|
TabsBase.displayName = TabsPrimitive.Root.displayName;
|
|
5505
|
-
var TabsListBase =
|
|
5387
|
+
var TabsListBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5506
5388
|
TabsPrimitive.List,
|
|
5507
5389
|
{
|
|
5508
5390
|
ref,
|
|
@@ -5522,7 +5404,7 @@ var TabsListBase = React33.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
5522
5404
|
}
|
|
5523
5405
|
));
|
|
5524
5406
|
TabsListBase.displayName = TabsPrimitive.List.displayName;
|
|
5525
|
-
var TabsTriggerBase =
|
|
5407
|
+
var TabsTriggerBase = React32.forwardRef(({ className, animation = "default", ...props }, ref) => {
|
|
5526
5408
|
const base = cn(
|
|
5527
5409
|
"relative inline-flex items-center justify-center whitespace-nowrap px-4 py-2 text-sm font-medium",
|
|
5528
5410
|
"text-muted-foreground hover:text-foreground",
|
|
@@ -5542,7 +5424,7 @@ var TabsTriggerBase = React33.forwardRef(({ className, animation = "default", ..
|
|
|
5542
5424
|
}
|
|
5543
5425
|
);
|
|
5544
5426
|
});
|
|
5545
|
-
var TabsContentBase =
|
|
5427
|
+
var TabsContentBase = React32.forwardRef(({ className, animation = "default", ...props }, ref) => {
|
|
5546
5428
|
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";
|
|
5547
5429
|
return /* @__PURE__ */ jsx(
|
|
5548
5430
|
TabsPrimitive.Content,
|
|
@@ -5794,7 +5676,7 @@ var SheetBase = DialogPrimitive.Root;
|
|
|
5794
5676
|
var SheetTriggerBase = DialogPrimitive.Trigger;
|
|
5795
5677
|
var SheetCloseBase = DialogPrimitive.Close;
|
|
5796
5678
|
var SheetPortalBase = DialogPrimitive.Portal;
|
|
5797
|
-
var SheetOverlayBase =
|
|
5679
|
+
var SheetOverlayBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5798
5680
|
DialogPrimitive.Overlay,
|
|
5799
5681
|
{
|
|
5800
5682
|
className: cn(
|
|
@@ -5822,7 +5704,7 @@ var sheetVariants = cva(
|
|
|
5822
5704
|
}
|
|
5823
5705
|
}
|
|
5824
5706
|
);
|
|
5825
|
-
var SheetContentBase =
|
|
5707
|
+
var SheetContentBase = React32.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortalBase, { children: [
|
|
5826
5708
|
/* @__PURE__ */ jsx(SheetOverlayBase, {}),
|
|
5827
5709
|
/* @__PURE__ */ jsxs(
|
|
5828
5710
|
DialogPrimitive.Content,
|
|
@@ -5869,7 +5751,7 @@ var SheetFooterBase = ({
|
|
|
5869
5751
|
}
|
|
5870
5752
|
);
|
|
5871
5753
|
SheetFooterBase.displayName = "SheetFooterBase";
|
|
5872
|
-
var SheetTitleBase =
|
|
5754
|
+
var SheetTitleBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5873
5755
|
DialogPrimitive.Title,
|
|
5874
5756
|
{
|
|
5875
5757
|
ref,
|
|
@@ -5878,7 +5760,7 @@ var SheetTitleBase = React33.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
5878
5760
|
}
|
|
5879
5761
|
));
|
|
5880
5762
|
SheetTitleBase.displayName = DialogPrimitive.Title.displayName;
|
|
5881
|
-
var SheetDescriptionBase =
|
|
5763
|
+
var SheetDescriptionBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5882
5764
|
DialogPrimitive.Description,
|
|
5883
5765
|
{
|
|
5884
5766
|
ref,
|
|
@@ -5893,9 +5775,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
5893
5775
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
5894
5776
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
5895
5777
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
5896
|
-
var SidebarContext =
|
|
5778
|
+
var SidebarContext = React32.createContext(null);
|
|
5897
5779
|
function UseSideBarBase() {
|
|
5898
|
-
const context =
|
|
5780
|
+
const context = React32.useContext(SidebarContext);
|
|
5899
5781
|
if (!context) {
|
|
5900
5782
|
throw new Error(
|
|
5901
5783
|
"UseSideBarBase must be used within a SidebarProviderBase."
|
|
@@ -5903,7 +5785,7 @@ function UseSideBarBase() {
|
|
|
5903
5785
|
}
|
|
5904
5786
|
return context;
|
|
5905
5787
|
}
|
|
5906
|
-
var SidebarProviderBase =
|
|
5788
|
+
var SidebarProviderBase = React32.forwardRef(
|
|
5907
5789
|
({
|
|
5908
5790
|
defaultOpen = true,
|
|
5909
5791
|
open: openProp,
|
|
@@ -5914,10 +5796,10 @@ var SidebarProviderBase = React33.forwardRef(
|
|
|
5914
5796
|
...props
|
|
5915
5797
|
}, ref) => {
|
|
5916
5798
|
const isMobile = useIsMobile();
|
|
5917
|
-
const [openMobile, setOpenMobile] =
|
|
5918
|
-
const [_open, _setOpen] =
|
|
5799
|
+
const [openMobile, setOpenMobile] = React32.useState(false);
|
|
5800
|
+
const [_open, _setOpen] = React32.useState(defaultOpen);
|
|
5919
5801
|
const open = openProp ?? _open;
|
|
5920
|
-
const setOpen =
|
|
5802
|
+
const setOpen = React32.useCallback(
|
|
5921
5803
|
(value) => {
|
|
5922
5804
|
const openState = typeof value === "function" ? value(open) : value;
|
|
5923
5805
|
if (setOpenProp) {
|
|
@@ -5929,10 +5811,10 @@ var SidebarProviderBase = React33.forwardRef(
|
|
|
5929
5811
|
},
|
|
5930
5812
|
[setOpenProp, open]
|
|
5931
5813
|
);
|
|
5932
|
-
const toggleSidebar =
|
|
5814
|
+
const toggleSidebar = React32.useCallback(() => {
|
|
5933
5815
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
5934
5816
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
5935
|
-
|
|
5817
|
+
React32.useEffect(() => {
|
|
5936
5818
|
const handleKeyDown = (event) => {
|
|
5937
5819
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
5938
5820
|
event.preventDefault();
|
|
@@ -5943,7 +5825,7 @@ var SidebarProviderBase = React33.forwardRef(
|
|
|
5943
5825
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
5944
5826
|
}, [toggleSidebar]);
|
|
5945
5827
|
const state = open ? "expanded" : "collapsed";
|
|
5946
|
-
const contextValue =
|
|
5828
|
+
const contextValue = React32.useMemo(
|
|
5947
5829
|
() => ({
|
|
5948
5830
|
state,
|
|
5949
5831
|
open,
|
|
@@ -5975,7 +5857,7 @@ var SidebarProviderBase = React33.forwardRef(
|
|
|
5975
5857
|
}
|
|
5976
5858
|
);
|
|
5977
5859
|
SidebarProviderBase.displayName = "SidebarProviderBase";
|
|
5978
|
-
var SidebarBase =
|
|
5860
|
+
var SidebarBase = React32.forwardRef(
|
|
5979
5861
|
({
|
|
5980
5862
|
side = "left",
|
|
5981
5863
|
variant = "sidebar",
|
|
@@ -6062,7 +5944,7 @@ var SidebarBase = React33.forwardRef(
|
|
|
6062
5944
|
}
|
|
6063
5945
|
);
|
|
6064
5946
|
SidebarBase.displayName = "SidebarBase";
|
|
6065
|
-
var SidebarTriggerBase =
|
|
5947
|
+
var SidebarTriggerBase = React32.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
6066
5948
|
const { toggleSidebar } = UseSideBarBase();
|
|
6067
5949
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
6068
5950
|
ButtonBase,
|
|
@@ -6085,7 +5967,7 @@ var SidebarTriggerBase = React33.forwardRef(({ className, onClick, ...props }, r
|
|
|
6085
5967
|
) });
|
|
6086
5968
|
});
|
|
6087
5969
|
SidebarTriggerBase.displayName = "SidebarTriggerBase";
|
|
6088
|
-
var SidebarRailBase =
|
|
5970
|
+
var SidebarRailBase = React32.forwardRef(({ className, ...props }, ref) => {
|
|
6089
5971
|
const { toggleSidebar } = UseSideBarBase();
|
|
6090
5972
|
return /* @__PURE__ */ jsx(
|
|
6091
5973
|
"button",
|
|
@@ -6110,7 +5992,7 @@ var SidebarRailBase = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
6110
5992
|
);
|
|
6111
5993
|
});
|
|
6112
5994
|
SidebarRailBase.displayName = "SidebarRailBase";
|
|
6113
|
-
var SidebarInsetBase =
|
|
5995
|
+
var SidebarInsetBase = React32.forwardRef(({ className, ...props }, ref) => {
|
|
6114
5996
|
return /* @__PURE__ */ jsx(
|
|
6115
5997
|
"main",
|
|
6116
5998
|
{
|
|
@@ -6125,7 +6007,7 @@ var SidebarInsetBase = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
6125
6007
|
);
|
|
6126
6008
|
});
|
|
6127
6009
|
SidebarInsetBase.displayName = "SidebarInsetBase";
|
|
6128
|
-
var SidebarInputBase =
|
|
6010
|
+
var SidebarInputBase = React32.forwardRef(({ className, ...props }, ref) => {
|
|
6129
6011
|
return /* @__PURE__ */ jsx(
|
|
6130
6012
|
InputBase,
|
|
6131
6013
|
{
|
|
@@ -6140,7 +6022,7 @@ var SidebarInputBase = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
6140
6022
|
);
|
|
6141
6023
|
});
|
|
6142
6024
|
SidebarInputBase.displayName = "SidebarInputBase";
|
|
6143
|
-
var SidebarHeaderBase =
|
|
6025
|
+
var SidebarHeaderBase = React32.forwardRef(({ className, ...props }, ref) => {
|
|
6144
6026
|
return /* @__PURE__ */ jsx(
|
|
6145
6027
|
"div",
|
|
6146
6028
|
{
|
|
@@ -6152,7 +6034,7 @@ var SidebarHeaderBase = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
6152
6034
|
);
|
|
6153
6035
|
});
|
|
6154
6036
|
SidebarHeaderBase.displayName = "SidebarHeaderBase";
|
|
6155
|
-
var SidebarFooterBase =
|
|
6037
|
+
var SidebarFooterBase = React32.forwardRef(({ className, ...props }, ref) => {
|
|
6156
6038
|
return /* @__PURE__ */ jsx(
|
|
6157
6039
|
"div",
|
|
6158
6040
|
{
|
|
@@ -6164,7 +6046,7 @@ var SidebarFooterBase = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
6164
6046
|
);
|
|
6165
6047
|
});
|
|
6166
6048
|
SidebarFooterBase.displayName = "SidebarFooterBase";
|
|
6167
|
-
var SidebarSeparatorBase =
|
|
6049
|
+
var SidebarSeparatorBase = React32.forwardRef(({ className, ...props }, ref) => {
|
|
6168
6050
|
return /* @__PURE__ */ jsx(
|
|
6169
6051
|
SeparatorBase,
|
|
6170
6052
|
{
|
|
@@ -6176,7 +6058,7 @@ var SidebarSeparatorBase = React33.forwardRef(({ className, ...props }, ref) =>
|
|
|
6176
6058
|
);
|
|
6177
6059
|
});
|
|
6178
6060
|
SidebarSeparatorBase.displayName = "SidebarSeparatorBase";
|
|
6179
|
-
var SidebarContentBase =
|
|
6061
|
+
var SidebarContentBase = React32.forwardRef(({ className, ...props }, ref) => {
|
|
6180
6062
|
return /* @__PURE__ */ jsx(
|
|
6181
6063
|
"div",
|
|
6182
6064
|
{
|
|
@@ -6191,7 +6073,7 @@ var SidebarContentBase = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
6191
6073
|
);
|
|
6192
6074
|
});
|
|
6193
6075
|
SidebarContentBase.displayName = "SidebarContentBase";
|
|
6194
|
-
var SidebarGroupBase =
|
|
6076
|
+
var SidebarGroupBase = React32.forwardRef(({ className, ...props }, ref) => {
|
|
6195
6077
|
return /* @__PURE__ */ jsx(
|
|
6196
6078
|
"div",
|
|
6197
6079
|
{
|
|
@@ -6203,7 +6085,7 @@ var SidebarGroupBase = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
6203
6085
|
);
|
|
6204
6086
|
});
|
|
6205
6087
|
SidebarGroupBase.displayName = "SidebarGroupBase";
|
|
6206
|
-
var SidebarGroupLabelBase =
|
|
6088
|
+
var SidebarGroupLabelBase = React32.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
6207
6089
|
const Comp = asChild ? Slot : "div";
|
|
6208
6090
|
return /* @__PURE__ */ jsx(
|
|
6209
6091
|
Comp,
|
|
@@ -6220,7 +6102,7 @@ var SidebarGroupLabelBase = React33.forwardRef(({ className, asChild = false, ..
|
|
|
6220
6102
|
);
|
|
6221
6103
|
});
|
|
6222
6104
|
SidebarGroupLabelBase.displayName = "SidebarGroupLabelBase";
|
|
6223
|
-
var SidebarGroupActionBase =
|
|
6105
|
+
var SidebarGroupActionBase = React32.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
6224
6106
|
const Comp = asChild ? Slot : "button";
|
|
6225
6107
|
return /* @__PURE__ */ jsx(
|
|
6226
6108
|
Comp,
|
|
@@ -6239,7 +6121,7 @@ var SidebarGroupActionBase = React33.forwardRef(({ className, asChild = false, .
|
|
|
6239
6121
|
);
|
|
6240
6122
|
});
|
|
6241
6123
|
SidebarGroupActionBase.displayName = "SidebarGroupActionBase";
|
|
6242
|
-
var SidebarGroupContentBase =
|
|
6124
|
+
var SidebarGroupContentBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6243
6125
|
"div",
|
|
6244
6126
|
{
|
|
6245
6127
|
ref,
|
|
@@ -6249,7 +6131,7 @@ var SidebarGroupContentBase = React33.forwardRef(({ className, ...props }, ref)
|
|
|
6249
6131
|
}
|
|
6250
6132
|
));
|
|
6251
6133
|
SidebarGroupContentBase.displayName = "SidebarGroupContentBase";
|
|
6252
|
-
var SidebarMenuBase =
|
|
6134
|
+
var SidebarMenuBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6253
6135
|
"ul",
|
|
6254
6136
|
{
|
|
6255
6137
|
ref,
|
|
@@ -6259,7 +6141,7 @@ var SidebarMenuBase = React33.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
6259
6141
|
}
|
|
6260
6142
|
));
|
|
6261
6143
|
SidebarMenuBase.displayName = "SidebarMenuBase";
|
|
6262
|
-
var SidebarMenuItemBase =
|
|
6144
|
+
var SidebarMenuItemBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6263
6145
|
"li",
|
|
6264
6146
|
{
|
|
6265
6147
|
ref,
|
|
@@ -6289,7 +6171,7 @@ var sidebarMenuButtonVariants = cva(
|
|
|
6289
6171
|
}
|
|
6290
6172
|
}
|
|
6291
6173
|
);
|
|
6292
|
-
var SidebarMenuButtonBase =
|
|
6174
|
+
var SidebarMenuButtonBase = React32.forwardRef(
|
|
6293
6175
|
({
|
|
6294
6176
|
asChild = false,
|
|
6295
6177
|
isActive = false,
|
|
@@ -6335,7 +6217,7 @@ var SidebarMenuButtonBase = React33.forwardRef(
|
|
|
6335
6217
|
}
|
|
6336
6218
|
);
|
|
6337
6219
|
SidebarMenuButtonBase.displayName = "SidebarMenuButtonBase";
|
|
6338
|
-
var SidebarMenuActionBase =
|
|
6220
|
+
var SidebarMenuActionBase = React32.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
6339
6221
|
const Comp = asChild ? Slot : "button";
|
|
6340
6222
|
return /* @__PURE__ */ jsx(
|
|
6341
6223
|
Comp,
|
|
@@ -6358,7 +6240,7 @@ var SidebarMenuActionBase = React33.forwardRef(({ className, asChild = false, sh
|
|
|
6358
6240
|
);
|
|
6359
6241
|
});
|
|
6360
6242
|
SidebarMenuActionBase.displayName = "SidebarMenuActionBase";
|
|
6361
|
-
var SidebarMenuBadgeBase =
|
|
6243
|
+
var SidebarMenuBadgeBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6362
6244
|
"div",
|
|
6363
6245
|
{
|
|
6364
6246
|
ref,
|
|
@@ -6376,8 +6258,8 @@ var SidebarMenuBadgeBase = React33.forwardRef(({ className, ...props }, ref) =>
|
|
|
6376
6258
|
}
|
|
6377
6259
|
));
|
|
6378
6260
|
SidebarMenuBadgeBase.displayName = "SidebarMenuBadgeBase";
|
|
6379
|
-
var SidebarMenuSkeletonBase =
|
|
6380
|
-
const width =
|
|
6261
|
+
var SidebarMenuSkeletonBase = React32.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
6262
|
+
const width = React32.useMemo(() => {
|
|
6381
6263
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
6382
6264
|
}, []);
|
|
6383
6265
|
return /* @__PURE__ */ jsxs(
|
|
@@ -6410,7 +6292,7 @@ var SidebarMenuSkeletonBase = React33.forwardRef(({ className, showIcon = false,
|
|
|
6410
6292
|
);
|
|
6411
6293
|
});
|
|
6412
6294
|
SidebarMenuSkeletonBase.displayName = "SidebarMenuSkeletonBase";
|
|
6413
|
-
var SidebarMenuSubBase =
|
|
6295
|
+
var SidebarMenuSubBase = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6414
6296
|
"ul",
|
|
6415
6297
|
{
|
|
6416
6298
|
ref,
|
|
@@ -6424,9 +6306,9 @@ var SidebarMenuSubBase = React33.forwardRef(({ className, ...props }, ref) => /*
|
|
|
6424
6306
|
}
|
|
6425
6307
|
));
|
|
6426
6308
|
SidebarMenuSubBase.displayName = "SidebarMenuSubBase";
|
|
6427
|
-
var SidebarMenuSubItemBase =
|
|
6309
|
+
var SidebarMenuSubItemBase = React32.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, ...props }));
|
|
6428
6310
|
SidebarMenuSubItemBase.displayName = "SidebarMenuSubItemBase";
|
|
6429
|
-
var SidebarMenuSubButtonBase =
|
|
6311
|
+
var SidebarMenuSubButtonBase = React32.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
6430
6312
|
const Comp = asChild ? Slot : "a";
|
|
6431
6313
|
return /* @__PURE__ */ jsx(
|
|
6432
6314
|
Comp,
|
|
@@ -6971,11 +6853,11 @@ var CodeBlock = ({
|
|
|
6971
6853
|
breadcrumb = [],
|
|
6972
6854
|
showStats = true
|
|
6973
6855
|
}) => {
|
|
6974
|
-
const [copied, setCopied] =
|
|
6975
|
-
const [activeTab, setActiveTab] =
|
|
6976
|
-
const [isExpanded, setIsExpanded] =
|
|
6856
|
+
const [copied, setCopied] = React32__default.useState(false);
|
|
6857
|
+
const [activeTab, setActiveTab] = React32__default.useState(0);
|
|
6858
|
+
const [isExpanded, setIsExpanded] = React32__default.useState(false);
|
|
6977
6859
|
const tabsExist = tabs.length > 0;
|
|
6978
|
-
const cssVars =
|
|
6860
|
+
const cssVars = React32__default.useMemo(
|
|
6979
6861
|
() => ({
|
|
6980
6862
|
container: {
|
|
6981
6863
|
backgroundColor: "hsl(var(--card))",
|
|
@@ -7071,7 +6953,7 @@ var CodeBlock = ({
|
|
|
7071
6953
|
] }),
|
|
7072
6954
|
breadcrumb.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center min-w-0", children: [
|
|
7073
6955
|
/* @__PURE__ */ jsx(FolderIcon, { size: "1em", style: cssVars.icon }),
|
|
7074
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ jsxs(
|
|
6956
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ jsxs(React32__default.Fragment, { children: [
|
|
7075
6957
|
/* @__PURE__ */ jsx(
|
|
7076
6958
|
"span",
|
|
7077
6959
|
{
|
|
@@ -7323,62 +7205,6 @@ function StatusIndicator({
|
|
|
7323
7205
|
/* @__PURE__ */ jsx("div", { className: "min-w-0", children })
|
|
7324
7206
|
] });
|
|
7325
7207
|
}
|
|
7326
|
-
var DebouncedInput = forwardRef(
|
|
7327
|
-
({
|
|
7328
|
-
value: initialValue,
|
|
7329
|
-
onChange,
|
|
7330
|
-
debounce: debounce2 = 500,
|
|
7331
|
-
label,
|
|
7332
|
-
labelClassname,
|
|
7333
|
-
leftIcon,
|
|
7334
|
-
rightIcon,
|
|
7335
|
-
showLoadingIndicator = false,
|
|
7336
|
-
className,
|
|
7337
|
-
error,
|
|
7338
|
-
...props
|
|
7339
|
-
}, ref) => {
|
|
7340
|
-
const [value, setValue] = useState(initialValue);
|
|
7341
|
-
const [isDebouncing, setIsDebouncing] = useState(false);
|
|
7342
|
-
useEffect(() => {
|
|
7343
|
-
setValue(initialValue);
|
|
7344
|
-
}, [initialValue]);
|
|
7345
|
-
useEffect(() => {
|
|
7346
|
-
if (value !== initialValue) {
|
|
7347
|
-
setIsDebouncing(true);
|
|
7348
|
-
}
|
|
7349
|
-
const timeout = setTimeout(() => {
|
|
7350
|
-
onChange(value);
|
|
7351
|
-
setIsDebouncing(false);
|
|
7352
|
-
}, debounce2);
|
|
7353
|
-
return () => {
|
|
7354
|
-
clearTimeout(timeout);
|
|
7355
|
-
setIsDebouncing(false);
|
|
7356
|
-
};
|
|
7357
|
-
}, [debounce2, initialValue, onChange, value]);
|
|
7358
|
-
const renderRightIcon = () => {
|
|
7359
|
-
if (showLoadingIndicator && isDebouncing) {
|
|
7360
|
-
return /* @__PURE__ */ jsx(CircleNotchIcon, { className: "h-4 w-4 animate-spin text-muted-foreground" });
|
|
7361
|
-
}
|
|
7362
|
-
return rightIcon;
|
|
7363
|
-
};
|
|
7364
|
-
return /* @__PURE__ */ jsx(
|
|
7365
|
-
InputBase,
|
|
7366
|
-
{
|
|
7367
|
-
...props,
|
|
7368
|
-
ref,
|
|
7369
|
-
label,
|
|
7370
|
-
labelClassname,
|
|
7371
|
-
leftIcon,
|
|
7372
|
-
rightIcon: renderRightIcon(),
|
|
7373
|
-
className: cn("transition-all duration-200", className),
|
|
7374
|
-
value,
|
|
7375
|
-
onChange: (e) => setValue(e.target.value),
|
|
7376
|
-
error
|
|
7377
|
-
}
|
|
7378
|
-
);
|
|
7379
|
-
}
|
|
7380
|
-
);
|
|
7381
|
-
DebouncedInput.displayName = "DebouncedInput";
|
|
7382
7208
|
function useCheckboxTree(initialTree) {
|
|
7383
7209
|
const initialCheckedNodes = useMemo(() => {
|
|
7384
7210
|
const checkedSet = /* @__PURE__ */ new Set();
|
|
@@ -8274,9 +8100,9 @@ function RangePicker({
|
|
|
8274
8100
|
disabled,
|
|
8275
8101
|
className
|
|
8276
8102
|
}) {
|
|
8277
|
-
const [open, setOpen] =
|
|
8278
|
-
const [range, setRange] =
|
|
8279
|
-
|
|
8103
|
+
const [open, setOpen] = React32.useState(false);
|
|
8104
|
+
const [range, setRange] = React32.useState(value);
|
|
8105
|
+
React32.useEffect(() => {
|
|
8280
8106
|
setRange(value);
|
|
8281
8107
|
}, [value]);
|
|
8282
8108
|
const handleSelect = (selected) => {
|
|
@@ -8510,7 +8336,7 @@ function RangePicker({
|
|
|
8510
8336
|
] });
|
|
8511
8337
|
}
|
|
8512
8338
|
RangePicker.displayName = "RangePicker";
|
|
8513
|
-
var TimePickerInput =
|
|
8339
|
+
var TimePickerInput = React32__default.forwardRef(
|
|
8514
8340
|
({
|
|
8515
8341
|
className,
|
|
8516
8342
|
type = "tel",
|
|
@@ -8529,10 +8355,10 @@ var TimePickerInput = React33__default.forwardRef(
|
|
|
8529
8355
|
label,
|
|
8530
8356
|
...props
|
|
8531
8357
|
}, ref) => {
|
|
8532
|
-
const [flag, setFlag] =
|
|
8533
|
-
const [prevIntKey, setPrevIntKey] =
|
|
8534
|
-
const [isFocused, setIsFocused] =
|
|
8535
|
-
|
|
8358
|
+
const [flag, setFlag] = React32__default.useState(false);
|
|
8359
|
+
const [prevIntKey, setPrevIntKey] = React32__default.useState("0");
|
|
8360
|
+
const [isFocused, setIsFocused] = React32__default.useState(false);
|
|
8361
|
+
React32__default.useEffect(() => {
|
|
8536
8362
|
if (flag) {
|
|
8537
8363
|
const timer = setTimeout(() => {
|
|
8538
8364
|
setFlag(false);
|
|
@@ -8540,7 +8366,7 @@ var TimePickerInput = React33__default.forwardRef(
|
|
|
8540
8366
|
return () => clearTimeout(timer);
|
|
8541
8367
|
}
|
|
8542
8368
|
}, [flag]);
|
|
8543
|
-
const calculatedValue =
|
|
8369
|
+
const calculatedValue = React32__default.useMemo(() => {
|
|
8544
8370
|
const safeDate = date ?? new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
|
|
8545
8371
|
return getDateByType(safeDate, picker);
|
|
8546
8372
|
}, [date, picker]);
|
|
@@ -8719,9 +8545,9 @@ function TimePicker({
|
|
|
8719
8545
|
hideSeconds,
|
|
8720
8546
|
enableButton
|
|
8721
8547
|
}) {
|
|
8722
|
-
const minuteRef =
|
|
8723
|
-
const hourRef =
|
|
8724
|
-
const secondRef =
|
|
8548
|
+
const minuteRef = React32.useRef(null);
|
|
8549
|
+
const hourRef = React32.useRef(null);
|
|
8550
|
+
const secondRef = React32.useRef(null);
|
|
8725
8551
|
const containerVariants = {
|
|
8726
8552
|
hidden: { opacity: 0, y: 10 },
|
|
8727
8553
|
visible: {
|
|
@@ -10122,7 +9948,7 @@ function EventAgenda({
|
|
|
10122
9948
|
);
|
|
10123
9949
|
return;
|
|
10124
9950
|
}
|
|
10125
|
-
if (
|
|
9951
|
+
if (React32__default.isValidElement(onClick)) {
|
|
10126
9952
|
setSelectedEvent(event);
|
|
10127
9953
|
return;
|
|
10128
9954
|
}
|
|
@@ -10274,7 +10100,7 @@ function EventAgenda({
|
|
|
10274
10100
|
}
|
|
10275
10101
|
)
|
|
10276
10102
|
] }),
|
|
10277
|
-
selectedEvent &&
|
|
10103
|
+
selectedEvent && React32__default.isValidElement(onClick) ? React32__default.cloneElement(onClick, {
|
|
10278
10104
|
event: selectedEvent,
|
|
10279
10105
|
onClose: () => setSelectedEvent(null)
|
|
10280
10106
|
}) : null
|
|
@@ -13921,7 +13747,7 @@ function MultiSelect({
|
|
|
13921
13747
|
"div",
|
|
13922
13748
|
{
|
|
13923
13749
|
className: `transition-all duration-200 ${animating ? "opacity-0 -translate-y-1" : "opacity-100 translate-y-0"}`,
|
|
13924
|
-
children: paged && "grouped" in paged ? Object.keys(paged.grouped).map((key, index) => /* @__PURE__ */ jsxs(
|
|
13750
|
+
children: paged && "grouped" in paged ? Object.keys(paged.grouped).map((key, index) => /* @__PURE__ */ jsxs(React32__default.Fragment, { children: [
|
|
13925
13751
|
/* @__PURE__ */ jsx(
|
|
13926
13752
|
MultiSelectGroupBase,
|
|
13927
13753
|
{
|
|
@@ -13988,7 +13814,7 @@ function MultiSelect({
|
|
|
13988
13814
|
)
|
|
13989
13815
|
] })
|
|
13990
13816
|
] })
|
|
13991
|
-
] }) : /* @__PURE__ */ jsx(Fragment, { children: groupItems ? /* @__PURE__ */ jsx(Fragment, { children: Object.keys(groupItems).map((key, index) => /* @__PURE__ */ jsxs(
|
|
13817
|
+
] }) : /* @__PURE__ */ jsx(Fragment, { children: groupItems ? /* @__PURE__ */ jsx(Fragment, { children: Object.keys(groupItems).map((key, index) => /* @__PURE__ */ jsxs(React32__default.Fragment, { children: [
|
|
13992
13818
|
/* @__PURE__ */ jsx(
|
|
13993
13819
|
MultiSelectGroupBase,
|
|
13994
13820
|
{
|
|
@@ -14800,7 +14626,7 @@ var DraggableTooltipComponent = ({
|
|
|
14800
14626
|
() => showOnlyHighlighted && highlightedSeries && highlightedSeries.size > 0 ? dataKeys.filter((k) => highlightedSeries.has(k)) : dataKeys,
|
|
14801
14627
|
[showOnlyHighlighted, highlightedSeries, dataKeys]
|
|
14802
14628
|
);
|
|
14803
|
-
const TotalDisplay =
|
|
14629
|
+
const TotalDisplay = React32__default.memo(({ data: data2, visibleKeys: visibleKeys2, valueFormatter: localformatter }) => {
|
|
14804
14630
|
const total = useMemo(() => {
|
|
14805
14631
|
const numeric = visibleKeys2.map((k) => data2[k]).filter((v) => typeof v === "number");
|
|
14806
14632
|
return numeric.reduce((s, v) => s + (v || 0), 0);
|
|
@@ -15366,7 +15192,7 @@ var DraggableTooltipComponent = ({
|
|
|
15366
15192
|
)
|
|
15367
15193
|
] });
|
|
15368
15194
|
};
|
|
15369
|
-
var DraggableTooltip =
|
|
15195
|
+
var DraggableTooltip = React32__default.memo(DraggableTooltipComponent);
|
|
15370
15196
|
DraggableTooltip.displayName = "DraggableTooltip";
|
|
15371
15197
|
var DraggableTooltip_default = DraggableTooltip;
|
|
15372
15198
|
var RechartTooltipWithTotal = ({
|
|
@@ -18779,5 +18605,138 @@ function Leaderboard({
|
|
|
18779
18605
|
}
|
|
18780
18606
|
);
|
|
18781
18607
|
}
|
|
18608
|
+
function CarouselBase({
|
|
18609
|
+
items,
|
|
18610
|
+
className,
|
|
18611
|
+
containerClassName,
|
|
18612
|
+
imageClassName,
|
|
18613
|
+
width,
|
|
18614
|
+
height = "400px",
|
|
18615
|
+
showControls = true,
|
|
18616
|
+
showIndicators = true,
|
|
18617
|
+
autoPlay = false,
|
|
18618
|
+
autoPlayInterval = 3e3,
|
|
18619
|
+
springConfig = {
|
|
18620
|
+
stiffness: 300,
|
|
18621
|
+
damping: 30
|
|
18622
|
+
}
|
|
18623
|
+
}) {
|
|
18624
|
+
const [index, setIndex] = useState(0);
|
|
18625
|
+
const containerRef = useRef(null);
|
|
18626
|
+
const x = useMotionValue(0);
|
|
18627
|
+
useEffect(() => {
|
|
18628
|
+
if (containerRef.current) {
|
|
18629
|
+
const containerWidth = containerRef.current.offsetWidth || 1;
|
|
18630
|
+
const targetX = -index * containerWidth;
|
|
18631
|
+
animate(x, targetX, {
|
|
18632
|
+
type: "spring",
|
|
18633
|
+
stiffness: springConfig.stiffness,
|
|
18634
|
+
damping: springConfig.damping
|
|
18635
|
+
});
|
|
18636
|
+
}
|
|
18637
|
+
}, [index, x, springConfig.stiffness, springConfig.damping]);
|
|
18638
|
+
useEffect(() => {
|
|
18639
|
+
if (!autoPlay || items.length <= 1) return;
|
|
18640
|
+
const interval = setInterval(() => {
|
|
18641
|
+
setIndex((i) => (i + 1) % items.length);
|
|
18642
|
+
}, autoPlayInterval);
|
|
18643
|
+
return () => clearInterval(interval);
|
|
18644
|
+
}, [autoPlay, autoPlayInterval, items.length]);
|
|
18645
|
+
return /* @__PURE__ */ jsx(
|
|
18646
|
+
"div",
|
|
18647
|
+
{
|
|
18648
|
+
className: cn("w-full lg:p-10 sm:p-4 p-2", className),
|
|
18649
|
+
style: { width },
|
|
18650
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ jsxs(
|
|
18651
|
+
"div",
|
|
18652
|
+
{
|
|
18653
|
+
className: cn(
|
|
18654
|
+
"relative overflow-hidden rounded-lg",
|
|
18655
|
+
containerClassName
|
|
18656
|
+
),
|
|
18657
|
+
ref: containerRef,
|
|
18658
|
+
children: [
|
|
18659
|
+
/* @__PURE__ */ jsx(motion.div, { className: "flex", style: { x }, children: items.map((item) => /* @__PURE__ */ jsx("div", { className: "shrink-0 w-full", style: { height }, children: /* @__PURE__ */ jsx(
|
|
18660
|
+
"img",
|
|
18661
|
+
{
|
|
18662
|
+
src: item.url,
|
|
18663
|
+
alt: item.title,
|
|
18664
|
+
className: cn(
|
|
18665
|
+
"w-full h-full object-cover rounded-lg select-none pointer-events-none",
|
|
18666
|
+
imageClassName
|
|
18667
|
+
),
|
|
18668
|
+
draggable: false
|
|
18669
|
+
}
|
|
18670
|
+
) }, item.id)) }),
|
|
18671
|
+
showControls && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18672
|
+
/* @__PURE__ */ jsx(
|
|
18673
|
+
motion.button,
|
|
18674
|
+
{
|
|
18675
|
+
disabled: index === 0,
|
|
18676
|
+
onClick: () => setIndex((i) => Math.max(0, i - 1)),
|
|
18677
|
+
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
|
|
18678
|
+
${index === 0 ? "opacity-40 cursor-not-allowed" : "bg-secondary hover:scale-110 hover:opacity-100 opacity-70"}`,
|
|
18679
|
+
children: /* @__PURE__ */ jsx(
|
|
18680
|
+
"svg",
|
|
18681
|
+
{
|
|
18682
|
+
className: "w-6 h-6",
|
|
18683
|
+
fill: "none",
|
|
18684
|
+
stroke: "currentColor",
|
|
18685
|
+
viewBox: "0 0 24 24",
|
|
18686
|
+
children: /* @__PURE__ */ jsx(
|
|
18687
|
+
"path",
|
|
18688
|
+
{
|
|
18689
|
+
strokeLinecap: "round",
|
|
18690
|
+
strokeLinejoin: "round",
|
|
18691
|
+
strokeWidth: 2,
|
|
18692
|
+
d: "M15 19l-7-7 7-7"
|
|
18693
|
+
}
|
|
18694
|
+
)
|
|
18695
|
+
}
|
|
18696
|
+
)
|
|
18697
|
+
}
|
|
18698
|
+
),
|
|
18699
|
+
/* @__PURE__ */ jsx(
|
|
18700
|
+
motion.button,
|
|
18701
|
+
{
|
|
18702
|
+
disabled: index === items.length - 1,
|
|
18703
|
+
onClick: () => setIndex((i) => Math.min(items.length - 1, i + 1)),
|
|
18704
|
+
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
|
|
18705
|
+
${index === items.length - 1 ? "opacity-40 cursor-not-allowed" : "bg-secondary hover:scale-110 hover:opacity-100 opacity-70"}`,
|
|
18706
|
+
children: /* @__PURE__ */ jsx(
|
|
18707
|
+
"svg",
|
|
18708
|
+
{
|
|
18709
|
+
className: "w-6 h-6",
|
|
18710
|
+
fill: "none",
|
|
18711
|
+
stroke: "currentColor",
|
|
18712
|
+
viewBox: "0 0 24 24",
|
|
18713
|
+
children: /* @__PURE__ */ jsx(
|
|
18714
|
+
"path",
|
|
18715
|
+
{
|
|
18716
|
+
strokeLinecap: "round",
|
|
18717
|
+
strokeLinejoin: "round",
|
|
18718
|
+
strokeWidth: 2,
|
|
18719
|
+
d: "M9 5l7 7-7 7"
|
|
18720
|
+
}
|
|
18721
|
+
)
|
|
18722
|
+
}
|
|
18723
|
+
)
|
|
18724
|
+
}
|
|
18725
|
+
)
|
|
18726
|
+
] }),
|
|
18727
|
+
showIndicators && /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2", children: items.map((_, i) => /* @__PURE__ */ jsx(
|
|
18728
|
+
"button",
|
|
18729
|
+
{
|
|
18730
|
+
onClick: () => setIndex(i),
|
|
18731
|
+
className: `h-2 rounded-full transition-all ${i === index ? "w-8 bg-white" : "w-2 bg-white/50"}`
|
|
18732
|
+
},
|
|
18733
|
+
i
|
|
18734
|
+
)) })
|
|
18735
|
+
]
|
|
18736
|
+
}
|
|
18737
|
+
) })
|
|
18738
|
+
}
|
|
18739
|
+
);
|
|
18740
|
+
}
|
|
18782
18741
|
|
|
18783
|
-
export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase,
|
|
18742
|
+
export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, ChangeButton, Chart_default as Chart, ChartControls, ChartHeader, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDebouncedInputBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HorizontalChart_default as HorizontalChart, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, NumericInput, PeriodsDropdown_default as PeriodsDropdown, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectEmpty, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, SystemTooltip_default as SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, formatLinePercentage, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getItems, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, processNeo4jData, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useBiaxial, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartLayout, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useOpenTooltipForPeriod, useProcessedData, useSeriesOpacity, useTheme, useTimeSeriesRange, visualForItem };
|