@offlinemediainc/offline-ui 0.1.2 → 0.1.4
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/README.md +27 -2
- package/dist/index.cjs +914 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +151 -1
- package/dist/index.d.ts +151 -1
- package/dist/index.js +854 -7
- package/dist/index.js.map +1 -1
- package/dist/styles.css +42 -5
- package/package.json +13 -3
package/dist/index.js
CHANGED
|
@@ -2,17 +2,26 @@ import * as React12 from 'react';
|
|
|
2
2
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { Slot } from '@radix-ui/react-slot';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
9
9
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
10
|
-
import { X, ChevronRight,
|
|
10
|
+
import { Check, X, ChevronRight, Circle, PanelLeft, ChevronDown, Dot, ChevronUp, MoreHorizontal, ChevronsUpDown, User2, HelpCircle, Settings, LogOut, LayoutDashboard, Tag, Calendar, FileText } from 'lucide-react';
|
|
11
11
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
12
12
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
13
13
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
14
14
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
15
15
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
16
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
17
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
18
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
19
|
+
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
20
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
21
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
22
|
+
import { Toaster as Toaster$1 } from 'sonner';
|
|
23
|
+
export { toast } from 'sonner';
|
|
24
|
+
import * as RechartsPrimitive from 'recharts';
|
|
16
25
|
import Image2 from 'next/image';
|
|
17
26
|
import Link from 'next/link';
|
|
18
27
|
import { usePathname } from 'next/navigation';
|
|
@@ -1067,7 +1076,7 @@ var SidebarTrigger = React12.forwardRef((_a, ref) => {
|
|
|
1067
1076
|
}
|
|
1068
1077
|
}, props), {
|
|
1069
1078
|
children: [
|
|
1070
|
-
/* @__PURE__ */ jsx(PanelLeft, {}),
|
|
1079
|
+
/* @__PURE__ */ jsx(PanelLeft, { "aria-hidden": "true" }),
|
|
1071
1080
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1072
1081
|
]
|
|
1073
1082
|
})
|
|
@@ -1380,9 +1389,7 @@ var SidebarMenuBadge = React12.forwardRef((_a, ref) => {
|
|
|
1380
1389
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
1381
1390
|
var SidebarMenuSkeleton = React12.forwardRef((_a, ref) => {
|
|
1382
1391
|
var _b = _a, { className, showIcon = false } = _b, props = __objRest(_b, ["className", "showIcon"]);
|
|
1383
|
-
const width =
|
|
1384
|
-
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
1385
|
-
}, []);
|
|
1392
|
+
const width = "70%";
|
|
1386
1393
|
return /* @__PURE__ */ jsxs(
|
|
1387
1394
|
"div",
|
|
1388
1395
|
__spreadProps(__spreadValues({
|
|
@@ -1499,6 +1506,846 @@ var TabsContent = React12.forwardRef((_a, ref) => {
|
|
|
1499
1506
|
);
|
|
1500
1507
|
});
|
|
1501
1508
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
1509
|
+
var Accordion = AccordionPrimitive.Root;
|
|
1510
|
+
var AccordionItem = React12.forwardRef((_a, ref) => {
|
|
1511
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1512
|
+
return /* @__PURE__ */ jsx(
|
|
1513
|
+
AccordionPrimitive.Item,
|
|
1514
|
+
__spreadValues({
|
|
1515
|
+
ref,
|
|
1516
|
+
className: cn("border-b", className)
|
|
1517
|
+
}, props)
|
|
1518
|
+
);
|
|
1519
|
+
});
|
|
1520
|
+
AccordionItem.displayName = "AccordionItem";
|
|
1521
|
+
var AccordionTrigger = React12.forwardRef((_a, ref) => {
|
|
1522
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
1523
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
1524
|
+
AccordionPrimitive.Trigger,
|
|
1525
|
+
__spreadProps(__spreadValues({
|
|
1526
|
+
ref,
|
|
1527
|
+
className: cn(
|
|
1528
|
+
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
|
|
1529
|
+
className
|
|
1530
|
+
)
|
|
1531
|
+
}, props), {
|
|
1532
|
+
children: [
|
|
1533
|
+
children,
|
|
1534
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
|
|
1535
|
+
]
|
|
1536
|
+
})
|
|
1537
|
+
) });
|
|
1538
|
+
});
|
|
1539
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
1540
|
+
var AccordionContent = React12.forwardRef((_a, ref) => {
|
|
1541
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
1542
|
+
return /* @__PURE__ */ jsx(
|
|
1543
|
+
AccordionPrimitive.Content,
|
|
1544
|
+
__spreadProps(__spreadValues({
|
|
1545
|
+
ref,
|
|
1546
|
+
className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
1547
|
+
}, props), {
|
|
1548
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
|
|
1549
|
+
})
|
|
1550
|
+
);
|
|
1551
|
+
});
|
|
1552
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
1553
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
1554
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
1555
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
1556
|
+
var AlertDialogOverlay = React12.forwardRef((_a, ref) => {
|
|
1557
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1558
|
+
return /* @__PURE__ */ jsx(
|
|
1559
|
+
AlertDialogPrimitive.Overlay,
|
|
1560
|
+
__spreadProps(__spreadValues({
|
|
1561
|
+
className: cn(
|
|
1562
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1563
|
+
className
|
|
1564
|
+
)
|
|
1565
|
+
}, props), {
|
|
1566
|
+
ref
|
|
1567
|
+
})
|
|
1568
|
+
);
|
|
1569
|
+
});
|
|
1570
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
1571
|
+
var AlertDialogContent = React12.forwardRef((_a, ref) => {
|
|
1572
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1573
|
+
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
1574
|
+
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
1575
|
+
/* @__PURE__ */ jsx(
|
|
1576
|
+
AlertDialogPrimitive.Content,
|
|
1577
|
+
__spreadValues({
|
|
1578
|
+
ref,
|
|
1579
|
+
className: cn(
|
|
1580
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
1581
|
+
className
|
|
1582
|
+
)
|
|
1583
|
+
}, props)
|
|
1584
|
+
)
|
|
1585
|
+
] });
|
|
1586
|
+
});
|
|
1587
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
1588
|
+
var AlertDialogHeader = (_a) => {
|
|
1589
|
+
var _b = _a, {
|
|
1590
|
+
className
|
|
1591
|
+
} = _b, props = __objRest(_b, [
|
|
1592
|
+
"className"
|
|
1593
|
+
]);
|
|
1594
|
+
return /* @__PURE__ */ jsx(
|
|
1595
|
+
"div",
|
|
1596
|
+
__spreadValues({
|
|
1597
|
+
className: cn(
|
|
1598
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
1599
|
+
className
|
|
1600
|
+
)
|
|
1601
|
+
}, props)
|
|
1602
|
+
);
|
|
1603
|
+
};
|
|
1604
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
1605
|
+
var AlertDialogFooter = (_a) => {
|
|
1606
|
+
var _b = _a, {
|
|
1607
|
+
className
|
|
1608
|
+
} = _b, props = __objRest(_b, [
|
|
1609
|
+
"className"
|
|
1610
|
+
]);
|
|
1611
|
+
return /* @__PURE__ */ jsx(
|
|
1612
|
+
"div",
|
|
1613
|
+
__spreadValues({
|
|
1614
|
+
className: cn(
|
|
1615
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1616
|
+
className
|
|
1617
|
+
)
|
|
1618
|
+
}, props)
|
|
1619
|
+
);
|
|
1620
|
+
};
|
|
1621
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
1622
|
+
var AlertDialogTitle = React12.forwardRef((_a, ref) => {
|
|
1623
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1624
|
+
return /* @__PURE__ */ jsx(
|
|
1625
|
+
AlertDialogPrimitive.Title,
|
|
1626
|
+
__spreadValues({
|
|
1627
|
+
ref,
|
|
1628
|
+
className: cn("text-lg font-semibold", className)
|
|
1629
|
+
}, props)
|
|
1630
|
+
);
|
|
1631
|
+
});
|
|
1632
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
1633
|
+
var AlertDialogDescription = React12.forwardRef((_a, ref) => {
|
|
1634
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1635
|
+
return /* @__PURE__ */ jsx(
|
|
1636
|
+
AlertDialogPrimitive.Description,
|
|
1637
|
+
__spreadValues({
|
|
1638
|
+
ref,
|
|
1639
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
1640
|
+
}, props)
|
|
1641
|
+
);
|
|
1642
|
+
});
|
|
1643
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
1644
|
+
var AlertDialogAction = React12.forwardRef((_a, ref) => {
|
|
1645
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1646
|
+
return /* @__PURE__ */ jsx(
|
|
1647
|
+
AlertDialogPrimitive.Action,
|
|
1648
|
+
__spreadValues({
|
|
1649
|
+
ref,
|
|
1650
|
+
className: cn(buttonVariants(), className)
|
|
1651
|
+
}, props)
|
|
1652
|
+
);
|
|
1653
|
+
});
|
|
1654
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
1655
|
+
var AlertDialogCancel = React12.forwardRef((_a, ref) => {
|
|
1656
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1657
|
+
return /* @__PURE__ */ jsx(
|
|
1658
|
+
AlertDialogPrimitive.Cancel,
|
|
1659
|
+
__spreadValues({
|
|
1660
|
+
ref,
|
|
1661
|
+
className: cn(
|
|
1662
|
+
buttonVariants({ variant: "outline" }),
|
|
1663
|
+
"mt-2 sm:mt-0",
|
|
1664
|
+
className
|
|
1665
|
+
)
|
|
1666
|
+
}, props)
|
|
1667
|
+
);
|
|
1668
|
+
});
|
|
1669
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
1670
|
+
var Checkbox = React12.forwardRef((_a, ref) => {
|
|
1671
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1672
|
+
return /* @__PURE__ */ jsx(
|
|
1673
|
+
CheckboxPrimitive.Root,
|
|
1674
|
+
__spreadProps(__spreadValues({
|
|
1675
|
+
ref,
|
|
1676
|
+
className: cn(
|
|
1677
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
1678
|
+
className
|
|
1679
|
+
)
|
|
1680
|
+
}, props), {
|
|
1681
|
+
children: /* @__PURE__ */ jsx(
|
|
1682
|
+
CheckboxPrimitive.Indicator,
|
|
1683
|
+
{
|
|
1684
|
+
className: cn("flex items-center justify-center text-current"),
|
|
1685
|
+
children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
|
|
1686
|
+
}
|
|
1687
|
+
)
|
|
1688
|
+
})
|
|
1689
|
+
);
|
|
1690
|
+
});
|
|
1691
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
1692
|
+
var InputOTP = React12.forwardRef((_a, ref) => {
|
|
1693
|
+
var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
|
|
1694
|
+
return /* @__PURE__ */ jsx(
|
|
1695
|
+
OTPInput,
|
|
1696
|
+
__spreadValues({
|
|
1697
|
+
ref,
|
|
1698
|
+
containerClassName: cn(
|
|
1699
|
+
"flex items-center gap-2 has-[:disabled]:opacity-50",
|
|
1700
|
+
containerClassName
|
|
1701
|
+
),
|
|
1702
|
+
className: cn("disabled:cursor-not-allowed", className)
|
|
1703
|
+
}, props)
|
|
1704
|
+
);
|
|
1705
|
+
});
|
|
1706
|
+
InputOTP.displayName = "InputOTP";
|
|
1707
|
+
var InputOTPGroup = React12.forwardRef((_a, ref) => {
|
|
1708
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1709
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ ref, className: cn("flex items-center", className) }, props));
|
|
1710
|
+
});
|
|
1711
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1712
|
+
var InputOTPSlot = React12.forwardRef((_a, ref) => {
|
|
1713
|
+
var _b = _a, { index, className } = _b, props = __objRest(_b, ["index", "className"]);
|
|
1714
|
+
const inputOTPContext = React12.useContext(OTPInputContext);
|
|
1715
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1716
|
+
return /* @__PURE__ */ jsxs(
|
|
1717
|
+
"div",
|
|
1718
|
+
__spreadProps(__spreadValues({
|
|
1719
|
+
ref,
|
|
1720
|
+
className: cn(
|
|
1721
|
+
"relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
1722
|
+
isActive && "z-10 ring-2 ring-ring ring-offset-background",
|
|
1723
|
+
className
|
|
1724
|
+
)
|
|
1725
|
+
}, props), {
|
|
1726
|
+
children: [
|
|
1727
|
+
char,
|
|
1728
|
+
hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
1729
|
+
]
|
|
1730
|
+
})
|
|
1731
|
+
);
|
|
1732
|
+
});
|
|
1733
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1734
|
+
var InputOTPSeparator = React12.forwardRef((_a, ref) => {
|
|
1735
|
+
var props = __objRest(_a, []);
|
|
1736
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, role: "separator" }, props), { children: /* @__PURE__ */ jsx(Dot, {}) }));
|
|
1737
|
+
});
|
|
1738
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1739
|
+
var Progress = React12.forwardRef((_a, ref) => {
|
|
1740
|
+
var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
|
|
1741
|
+
return /* @__PURE__ */ jsx(
|
|
1742
|
+
ProgressPrimitive.Root,
|
|
1743
|
+
__spreadProps(__spreadValues({
|
|
1744
|
+
ref,
|
|
1745
|
+
className: cn(
|
|
1746
|
+
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
|
|
1747
|
+
className
|
|
1748
|
+
)
|
|
1749
|
+
}, props), {
|
|
1750
|
+
children: /* @__PURE__ */ jsx(
|
|
1751
|
+
ProgressPrimitive.Indicator,
|
|
1752
|
+
{
|
|
1753
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
1754
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
1755
|
+
}
|
|
1756
|
+
)
|
|
1757
|
+
})
|
|
1758
|
+
);
|
|
1759
|
+
});
|
|
1760
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
1761
|
+
var Select = SelectPrimitive.Root;
|
|
1762
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
1763
|
+
var SelectValue = SelectPrimitive.Value;
|
|
1764
|
+
var SelectTrigger = React12.forwardRef((_a, ref) => {
|
|
1765
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
1766
|
+
return /* @__PURE__ */ jsxs(
|
|
1767
|
+
SelectPrimitive.Trigger,
|
|
1768
|
+
__spreadProps(__spreadValues({
|
|
1769
|
+
ref,
|
|
1770
|
+
className: cn(
|
|
1771
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
1772
|
+
className
|
|
1773
|
+
)
|
|
1774
|
+
}, props), {
|
|
1775
|
+
children: [
|
|
1776
|
+
children,
|
|
1777
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
1778
|
+
]
|
|
1779
|
+
})
|
|
1780
|
+
);
|
|
1781
|
+
});
|
|
1782
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1783
|
+
var SelectScrollUpButton = React12.forwardRef((_a, ref) => {
|
|
1784
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1785
|
+
return /* @__PURE__ */ jsx(
|
|
1786
|
+
SelectPrimitive.ScrollUpButton,
|
|
1787
|
+
__spreadProps(__spreadValues({
|
|
1788
|
+
ref,
|
|
1789
|
+
className: cn(
|
|
1790
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1791
|
+
className
|
|
1792
|
+
)
|
|
1793
|
+
}, props), {
|
|
1794
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
1795
|
+
})
|
|
1796
|
+
);
|
|
1797
|
+
});
|
|
1798
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1799
|
+
var SelectScrollDownButton = React12.forwardRef((_a, ref) => {
|
|
1800
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1801
|
+
return /* @__PURE__ */ jsx(
|
|
1802
|
+
SelectPrimitive.ScrollDownButton,
|
|
1803
|
+
__spreadProps(__spreadValues({
|
|
1804
|
+
ref,
|
|
1805
|
+
className: cn(
|
|
1806
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1807
|
+
className
|
|
1808
|
+
)
|
|
1809
|
+
}, props), {
|
|
1810
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
1811
|
+
})
|
|
1812
|
+
);
|
|
1813
|
+
});
|
|
1814
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1815
|
+
var SelectContent = React12.forwardRef((_a, ref) => {
|
|
1816
|
+
var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
|
|
1817
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
1818
|
+
SelectPrimitive.Content,
|
|
1819
|
+
__spreadProps(__spreadValues({
|
|
1820
|
+
ref,
|
|
1821
|
+
className: cn(
|
|
1822
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1823
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1824
|
+
className
|
|
1825
|
+
),
|
|
1826
|
+
position
|
|
1827
|
+
}, props), {
|
|
1828
|
+
children: [
|
|
1829
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
1830
|
+
/* @__PURE__ */ jsx(
|
|
1831
|
+
SelectPrimitive.Viewport,
|
|
1832
|
+
{
|
|
1833
|
+
className: cn(
|
|
1834
|
+
"p-1",
|
|
1835
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
1836
|
+
),
|
|
1837
|
+
children
|
|
1838
|
+
}
|
|
1839
|
+
),
|
|
1840
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
1841
|
+
]
|
|
1842
|
+
})
|
|
1843
|
+
) });
|
|
1844
|
+
});
|
|
1845
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1846
|
+
var SelectLabel = React12.forwardRef((_a, ref) => {
|
|
1847
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1848
|
+
return /* @__PURE__ */ jsx(
|
|
1849
|
+
SelectPrimitive.Label,
|
|
1850
|
+
__spreadValues({
|
|
1851
|
+
ref,
|
|
1852
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)
|
|
1853
|
+
}, props)
|
|
1854
|
+
);
|
|
1855
|
+
});
|
|
1856
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1857
|
+
var SelectItem = React12.forwardRef((_a, ref) => {
|
|
1858
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
1859
|
+
return /* @__PURE__ */ jsxs(
|
|
1860
|
+
SelectPrimitive.Item,
|
|
1861
|
+
__spreadProps(__spreadValues({
|
|
1862
|
+
ref,
|
|
1863
|
+
className: cn(
|
|
1864
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1865
|
+
className
|
|
1866
|
+
)
|
|
1867
|
+
}, props), {
|
|
1868
|
+
children: [
|
|
1869
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
1870
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
1871
|
+
]
|
|
1872
|
+
})
|
|
1873
|
+
);
|
|
1874
|
+
});
|
|
1875
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1876
|
+
var SelectSeparator = React12.forwardRef((_a, ref) => {
|
|
1877
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1878
|
+
return /* @__PURE__ */ jsx(
|
|
1879
|
+
SelectPrimitive.Separator,
|
|
1880
|
+
__spreadValues({
|
|
1881
|
+
ref,
|
|
1882
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
1883
|
+
}, props)
|
|
1884
|
+
);
|
|
1885
|
+
});
|
|
1886
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1887
|
+
var Toaster = (_a) => {
|
|
1888
|
+
var props = __objRest(_a, []);
|
|
1889
|
+
return /* @__PURE__ */ jsx(
|
|
1890
|
+
Toaster$1,
|
|
1891
|
+
__spreadValues({
|
|
1892
|
+
className: "toaster group",
|
|
1893
|
+
toastOptions: {
|
|
1894
|
+
classNames: {
|
|
1895
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
1896
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
1897
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
1898
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
}, props)
|
|
1902
|
+
);
|
|
1903
|
+
};
|
|
1904
|
+
var Table = React12.forwardRef((_a, ref) => {
|
|
1905
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1906
|
+
return /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
1907
|
+
"table",
|
|
1908
|
+
__spreadValues({
|
|
1909
|
+
ref,
|
|
1910
|
+
className: cn("w-full caption-bottom text-sm", className)
|
|
1911
|
+
}, props)
|
|
1912
|
+
) });
|
|
1913
|
+
});
|
|
1914
|
+
Table.displayName = "Table";
|
|
1915
|
+
var TableHeader = React12.forwardRef((_a, ref) => {
|
|
1916
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1917
|
+
return /* @__PURE__ */ jsx("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
|
|
1918
|
+
});
|
|
1919
|
+
TableHeader.displayName = "TableHeader";
|
|
1920
|
+
var TableBody = React12.forwardRef((_a, ref) => {
|
|
1921
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1922
|
+
return /* @__PURE__ */ jsx(
|
|
1923
|
+
"tbody",
|
|
1924
|
+
__spreadValues({
|
|
1925
|
+
ref,
|
|
1926
|
+
className: cn("[&_tr:last-child]:border-0", className)
|
|
1927
|
+
}, props)
|
|
1928
|
+
);
|
|
1929
|
+
});
|
|
1930
|
+
TableBody.displayName = "TableBody";
|
|
1931
|
+
var TableFooter = React12.forwardRef((_a, ref) => {
|
|
1932
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1933
|
+
return /* @__PURE__ */ jsx(
|
|
1934
|
+
"tfoot",
|
|
1935
|
+
__spreadValues({
|
|
1936
|
+
ref,
|
|
1937
|
+
className: cn(
|
|
1938
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1939
|
+
className
|
|
1940
|
+
)
|
|
1941
|
+
}, props)
|
|
1942
|
+
);
|
|
1943
|
+
});
|
|
1944
|
+
TableFooter.displayName = "TableFooter";
|
|
1945
|
+
var TableRow = React12.forwardRef((_a, ref) => {
|
|
1946
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1947
|
+
return /* @__PURE__ */ jsx(
|
|
1948
|
+
"tr",
|
|
1949
|
+
__spreadValues({
|
|
1950
|
+
ref,
|
|
1951
|
+
className: cn(
|
|
1952
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1953
|
+
className
|
|
1954
|
+
)
|
|
1955
|
+
}, props)
|
|
1956
|
+
);
|
|
1957
|
+
});
|
|
1958
|
+
TableRow.displayName = "TableRow";
|
|
1959
|
+
var TableHead = React12.forwardRef((_a, ref) => {
|
|
1960
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1961
|
+
return /* @__PURE__ */ jsx(
|
|
1962
|
+
"th",
|
|
1963
|
+
__spreadValues({
|
|
1964
|
+
ref,
|
|
1965
|
+
className: cn(
|
|
1966
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
1967
|
+
className
|
|
1968
|
+
)
|
|
1969
|
+
}, props)
|
|
1970
|
+
);
|
|
1971
|
+
});
|
|
1972
|
+
TableHead.displayName = "TableHead";
|
|
1973
|
+
var TableCell = React12.forwardRef((_a, ref) => {
|
|
1974
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1975
|
+
return /* @__PURE__ */ jsx(
|
|
1976
|
+
"td",
|
|
1977
|
+
__spreadValues({
|
|
1978
|
+
ref,
|
|
1979
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)
|
|
1980
|
+
}, props)
|
|
1981
|
+
);
|
|
1982
|
+
});
|
|
1983
|
+
TableCell.displayName = "TableCell";
|
|
1984
|
+
var TableCaption = React12.forwardRef((_a, ref) => {
|
|
1985
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1986
|
+
return /* @__PURE__ */ jsx(
|
|
1987
|
+
"caption",
|
|
1988
|
+
__spreadValues({
|
|
1989
|
+
ref,
|
|
1990
|
+
className: cn("mt-4 text-sm text-muted-foreground", className)
|
|
1991
|
+
}, props)
|
|
1992
|
+
);
|
|
1993
|
+
});
|
|
1994
|
+
TableCaption.displayName = "TableCaption";
|
|
1995
|
+
var Textarea = React12.forwardRef((_a, ref) => {
|
|
1996
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1997
|
+
return /* @__PURE__ */ jsx(
|
|
1998
|
+
"textarea",
|
|
1999
|
+
__spreadValues({
|
|
2000
|
+
className: cn(
|
|
2001
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2002
|
+
className
|
|
2003
|
+
),
|
|
2004
|
+
ref
|
|
2005
|
+
}, props)
|
|
2006
|
+
);
|
|
2007
|
+
});
|
|
2008
|
+
Textarea.displayName = "Textarea";
|
|
2009
|
+
var Breadcrumb = React12.forwardRef((_a, ref) => {
|
|
2010
|
+
var props = __objRest(_a, []);
|
|
2011
|
+
return /* @__PURE__ */ jsx("nav", __spreadValues({ ref, "aria-label": "breadcrumb" }, props));
|
|
2012
|
+
});
|
|
2013
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
2014
|
+
var BreadcrumbList = React12.forwardRef((_a, ref) => {
|
|
2015
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2016
|
+
return /* @__PURE__ */ jsx(
|
|
2017
|
+
"ol",
|
|
2018
|
+
__spreadValues({
|
|
2019
|
+
ref,
|
|
2020
|
+
className: cn(
|
|
2021
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
2022
|
+
className
|
|
2023
|
+
)
|
|
2024
|
+
}, props)
|
|
2025
|
+
);
|
|
2026
|
+
});
|
|
2027
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
2028
|
+
var BreadcrumbItem = React12.forwardRef((_a, ref) => {
|
|
2029
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2030
|
+
return /* @__PURE__ */ jsx(
|
|
2031
|
+
"li",
|
|
2032
|
+
__spreadValues({
|
|
2033
|
+
ref,
|
|
2034
|
+
className: cn("inline-flex items-center gap-1.5", className)
|
|
2035
|
+
}, props)
|
|
2036
|
+
);
|
|
2037
|
+
});
|
|
2038
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
2039
|
+
var BreadcrumbLink = React12.forwardRef((_a, ref) => {
|
|
2040
|
+
var _b = _a, { asChild, className } = _b, props = __objRest(_b, ["asChild", "className"]);
|
|
2041
|
+
const Comp = asChild ? Slot : "a";
|
|
2042
|
+
return /* @__PURE__ */ jsx(
|
|
2043
|
+
Comp,
|
|
2044
|
+
__spreadValues({
|
|
2045
|
+
ref,
|
|
2046
|
+
className: cn(
|
|
2047
|
+
"transition-colors hover:text-foreground inline-flex items-center gap-1.5",
|
|
2048
|
+
className
|
|
2049
|
+
)
|
|
2050
|
+
}, props)
|
|
2051
|
+
);
|
|
2052
|
+
});
|
|
2053
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
2054
|
+
var BreadcrumbPage = React12.forwardRef((_a, ref) => {
|
|
2055
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2056
|
+
return /* @__PURE__ */ jsx(
|
|
2057
|
+
"span",
|
|
2058
|
+
__spreadValues({
|
|
2059
|
+
ref,
|
|
2060
|
+
role: "link",
|
|
2061
|
+
"aria-disabled": "true",
|
|
2062
|
+
"aria-current": "page",
|
|
2063
|
+
className: cn("font-normal text-foreground", className)
|
|
2064
|
+
}, props)
|
|
2065
|
+
);
|
|
2066
|
+
});
|
|
2067
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
2068
|
+
var BreadcrumbSeparator = (_a) => {
|
|
2069
|
+
var _b = _a, {
|
|
2070
|
+
children,
|
|
2071
|
+
className
|
|
2072
|
+
} = _b, props = __objRest(_b, [
|
|
2073
|
+
"children",
|
|
2074
|
+
"className"
|
|
2075
|
+
]);
|
|
2076
|
+
return /* @__PURE__ */ jsx(
|
|
2077
|
+
"li",
|
|
2078
|
+
__spreadProps(__spreadValues({
|
|
2079
|
+
role: "presentation",
|
|
2080
|
+
"aria-hidden": "true",
|
|
2081
|
+
className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)
|
|
2082
|
+
}, props), {
|
|
2083
|
+
children: children != null ? children : /* @__PURE__ */ jsx(ChevronRight, {})
|
|
2084
|
+
})
|
|
2085
|
+
);
|
|
2086
|
+
};
|
|
2087
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
2088
|
+
var BreadcrumbEllipsis = (_a) => {
|
|
2089
|
+
var _b = _a, {
|
|
2090
|
+
className
|
|
2091
|
+
} = _b, props = __objRest(_b, [
|
|
2092
|
+
"className"
|
|
2093
|
+
]);
|
|
2094
|
+
return /* @__PURE__ */ jsxs(
|
|
2095
|
+
"span",
|
|
2096
|
+
__spreadProps(__spreadValues({
|
|
2097
|
+
role: "presentation",
|
|
2098
|
+
"aria-hidden": "true",
|
|
2099
|
+
className: cn("flex h-9 w-9 items-center justify-center", className)
|
|
2100
|
+
}, props), {
|
|
2101
|
+
children: [
|
|
2102
|
+
/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
|
|
2103
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
2104
|
+
]
|
|
2105
|
+
})
|
|
2106
|
+
);
|
|
2107
|
+
};
|
|
2108
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
2109
|
+
function cn2(...inputs) {
|
|
2110
|
+
return twMerge(clsx(inputs));
|
|
2111
|
+
}
|
|
2112
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
2113
|
+
var ChartContext = React12.createContext(null);
|
|
2114
|
+
function useChart() {
|
|
2115
|
+
const context = React12.useContext(ChartContext);
|
|
2116
|
+
if (!context) {
|
|
2117
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
2118
|
+
}
|
|
2119
|
+
return context;
|
|
2120
|
+
}
|
|
2121
|
+
function ChartContainer(_a) {
|
|
2122
|
+
var _b = _a, {
|
|
2123
|
+
id,
|
|
2124
|
+
className,
|
|
2125
|
+
children,
|
|
2126
|
+
config
|
|
2127
|
+
} = _b, props = __objRest(_b, [
|
|
2128
|
+
"id",
|
|
2129
|
+
"className",
|
|
2130
|
+
"children",
|
|
2131
|
+
"config"
|
|
2132
|
+
]);
|
|
2133
|
+
const uniqueId = React12.useId();
|
|
2134
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
2135
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
2136
|
+
"div",
|
|
2137
|
+
__spreadProps(__spreadValues({
|
|
2138
|
+
"data-slot": "chart",
|
|
2139
|
+
"data-chart": chartId,
|
|
2140
|
+
className: cn2(
|
|
2141
|
+
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
2142
|
+
className
|
|
2143
|
+
)
|
|
2144
|
+
}, props), {
|
|
2145
|
+
children: [
|
|
2146
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
2147
|
+
/* @__PURE__ */ jsx(RechartsPrimitive.ResponsiveContainer, { children })
|
|
2148
|
+
]
|
|
2149
|
+
})
|
|
2150
|
+
) });
|
|
2151
|
+
}
|
|
2152
|
+
var ChartStyle = ({ id, config }) => {
|
|
2153
|
+
const colorConfig = Object.entries(config).filter(
|
|
2154
|
+
([, config2]) => config2.theme || config2.color
|
|
2155
|
+
);
|
|
2156
|
+
if (!colorConfig.length) {
|
|
2157
|
+
return null;
|
|
2158
|
+
}
|
|
2159
|
+
return /* @__PURE__ */ jsx(
|
|
2160
|
+
"style",
|
|
2161
|
+
{
|
|
2162
|
+
dangerouslySetInnerHTML: {
|
|
2163
|
+
__html: Object.entries(THEMES).map(
|
|
2164
|
+
([theme, prefix]) => `
|
|
2165
|
+
${prefix} [data-chart=${id}] {
|
|
2166
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
2167
|
+
var _a;
|
|
2168
|
+
const color = ((_a = itemConfig.theme) == null ? void 0 : _a[theme]) || itemConfig.color;
|
|
2169
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
2170
|
+
}).join("\n")}
|
|
2171
|
+
}
|
|
2172
|
+
`
|
|
2173
|
+
).join("\n")
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
);
|
|
2177
|
+
};
|
|
2178
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
2179
|
+
function ChartTooltipContent({
|
|
2180
|
+
active,
|
|
2181
|
+
payload,
|
|
2182
|
+
className,
|
|
2183
|
+
indicator = "dot",
|
|
2184
|
+
hideLabel = false,
|
|
2185
|
+
hideIndicator = false,
|
|
2186
|
+
label,
|
|
2187
|
+
labelFormatter,
|
|
2188
|
+
labelClassName,
|
|
2189
|
+
formatter,
|
|
2190
|
+
color,
|
|
2191
|
+
nameKey,
|
|
2192
|
+
labelKey
|
|
2193
|
+
}) {
|
|
2194
|
+
const { config } = useChart();
|
|
2195
|
+
const tooltipLabel = React12.useMemo(() => {
|
|
2196
|
+
var _a;
|
|
2197
|
+
if (hideLabel || !(payload == null ? void 0 : payload.length)) {
|
|
2198
|
+
return null;
|
|
2199
|
+
}
|
|
2200
|
+
const [item] = payload;
|
|
2201
|
+
const key = `${labelKey || (item == null ? void 0 : item.dataKey) || (item == null ? void 0 : item.name) || "value"}`;
|
|
2202
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
2203
|
+
const value = !labelKey && typeof label === "string" ? ((_a = config[label]) == null ? void 0 : _a.label) || label : itemConfig == null ? void 0 : itemConfig.label;
|
|
2204
|
+
if (labelFormatter) {
|
|
2205
|
+
return /* @__PURE__ */ jsx("div", { className: cn2("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
2206
|
+
}
|
|
2207
|
+
if (!value) {
|
|
2208
|
+
return null;
|
|
2209
|
+
}
|
|
2210
|
+
return /* @__PURE__ */ jsx("div", { className: cn2("font-medium", labelClassName), children: value });
|
|
2211
|
+
}, [
|
|
2212
|
+
label,
|
|
2213
|
+
labelFormatter,
|
|
2214
|
+
payload,
|
|
2215
|
+
hideLabel,
|
|
2216
|
+
labelClassName,
|
|
2217
|
+
config,
|
|
2218
|
+
labelKey
|
|
2219
|
+
]);
|
|
2220
|
+
if (!active || !(payload == null ? void 0 : payload.length)) {
|
|
2221
|
+
return null;
|
|
2222
|
+
}
|
|
2223
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
2224
|
+
return /* @__PURE__ */ jsxs(
|
|
2225
|
+
"div",
|
|
2226
|
+
{
|
|
2227
|
+
className: cn2(
|
|
2228
|
+
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
2229
|
+
className
|
|
2230
|
+
),
|
|
2231
|
+
children: [
|
|
2232
|
+
!nestLabel ? tooltipLabel : null,
|
|
2233
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
2234
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
2235
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
2236
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
2237
|
+
return /* @__PURE__ */ jsx(
|
|
2238
|
+
"div",
|
|
2239
|
+
{
|
|
2240
|
+
className: cn2(
|
|
2241
|
+
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
2242
|
+
indicator === "dot" && "items-center"
|
|
2243
|
+
),
|
|
2244
|
+
children: formatter && (item == null ? void 0 : item.value) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2245
|
+
(itemConfig == null ? void 0 : itemConfig.icon) ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
2246
|
+
"div",
|
|
2247
|
+
{
|
|
2248
|
+
className: cn2(
|
|
2249
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
2250
|
+
{
|
|
2251
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
2252
|
+
"w-1": indicator === "line",
|
|
2253
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
2254
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
2255
|
+
}
|
|
2256
|
+
),
|
|
2257
|
+
style: {
|
|
2258
|
+
"--color-bg": indicatorColor,
|
|
2259
|
+
"--color-border": indicatorColor
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
),
|
|
2263
|
+
/* @__PURE__ */ jsxs(
|
|
2264
|
+
"div",
|
|
2265
|
+
{
|
|
2266
|
+
className: cn2(
|
|
2267
|
+
"flex flex-1 justify-between leading-none",
|
|
2268
|
+
nestLabel ? "items-end" : "items-center"
|
|
2269
|
+
),
|
|
2270
|
+
children: [
|
|
2271
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
2272
|
+
nestLabel ? tooltipLabel : null,
|
|
2273
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: (itemConfig == null ? void 0 : itemConfig.label) || item.name })
|
|
2274
|
+
] }),
|
|
2275
|
+
item.value && /* @__PURE__ */ jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
|
|
2276
|
+
]
|
|
2277
|
+
}
|
|
2278
|
+
)
|
|
2279
|
+
] })
|
|
2280
|
+
},
|
|
2281
|
+
item.dataKey
|
|
2282
|
+
);
|
|
2283
|
+
}) })
|
|
2284
|
+
]
|
|
2285
|
+
}
|
|
2286
|
+
);
|
|
2287
|
+
}
|
|
2288
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
2289
|
+
function ChartLegendContent({
|
|
2290
|
+
className,
|
|
2291
|
+
hideIcon = false,
|
|
2292
|
+
payload,
|
|
2293
|
+
verticalAlign = "bottom",
|
|
2294
|
+
nameKey
|
|
2295
|
+
}) {
|
|
2296
|
+
const { config } = useChart();
|
|
2297
|
+
if (!(payload == null ? void 0 : payload.length)) {
|
|
2298
|
+
return null;
|
|
2299
|
+
}
|
|
2300
|
+
return /* @__PURE__ */ jsx(
|
|
2301
|
+
"div",
|
|
2302
|
+
{
|
|
2303
|
+
className: cn2(
|
|
2304
|
+
"flex items-center justify-center gap-4",
|
|
2305
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
2306
|
+
className
|
|
2307
|
+
),
|
|
2308
|
+
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
2309
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
2310
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
2311
|
+
return /* @__PURE__ */ jsxs(
|
|
2312
|
+
"div",
|
|
2313
|
+
{
|
|
2314
|
+
className: cn2(
|
|
2315
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
2316
|
+
),
|
|
2317
|
+
children: [
|
|
2318
|
+
(itemConfig == null ? void 0 : itemConfig.icon) && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
2319
|
+
"div",
|
|
2320
|
+
{
|
|
2321
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
2322
|
+
style: {
|
|
2323
|
+
backgroundColor: item.color
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
),
|
|
2327
|
+
itemConfig == null ? void 0 : itemConfig.label
|
|
2328
|
+
]
|
|
2329
|
+
},
|
|
2330
|
+
item.value
|
|
2331
|
+
);
|
|
2332
|
+
})
|
|
2333
|
+
}
|
|
2334
|
+
);
|
|
2335
|
+
}
|
|
2336
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
2337
|
+
if (typeof payload !== "object" || payload === null) {
|
|
2338
|
+
return void 0;
|
|
2339
|
+
}
|
|
2340
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
2341
|
+
let configLabelKey = key;
|
|
2342
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
2343
|
+
configLabelKey = payload[key];
|
|
2344
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
2345
|
+
configLabelKey = payloadPayload[key];
|
|
2346
|
+
}
|
|
2347
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
2348
|
+
}
|
|
1502
2349
|
var defaultNavGroups = [
|
|
1503
2350
|
{
|
|
1504
2351
|
label: "Main",
|
|
@@ -1756,6 +2603,6 @@ function OfflineSidebar({
|
|
|
1756
2603
|
] });
|
|
1757
2604
|
}
|
|
1758
2605
|
|
|
1759
|
-
export { Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleNavItem, CollapsibleTrigger2 as CollapsibleTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, Item2 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label2 as Label, NavGroupComponent, OfflineAppIcon, OfflineSidebar, OfflineTopbar, Separator2 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleNavItem, Skeleton, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserFooter, WorkspaceHeader, badgeVariants, buttonVariants, cn, useIsMobile, useSidebar };
|
|
2606
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleNavItem, CollapsibleTrigger2 as CollapsibleTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item2 as Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label2 as Label, NavGroupComponent, OfflineAppIcon, OfflineSidebar, OfflineTopbar, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleNavItem, Skeleton, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserFooter, WorkspaceHeader, badgeVariants, buttonVariants, cn, useIsMobile, useSidebar };
|
|
1760
2607
|
//# sourceMappingURL=index.js.map
|
|
1761
2608
|
//# sourceMappingURL=index.js.map
|