@onesaz/ui 0.3.8 → 0.3.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.d.ts +16 -3
- package/dist/index.js +994 -939
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1604,7 +1604,10 @@ var Badge = React18.forwardRef(
|
|
|
1604
1604
|
"border-transparent bg-accent text-accent-foreground": variant === "default",
|
|
1605
1605
|
"border-transparent bg-muted text-foreground": variant === "secondary",
|
|
1606
1606
|
"border-transparent bg-destructive text-destructive-foreground": variant === "destructive",
|
|
1607
|
-
"border border-border text-foreground": variant === "outline"
|
|
1607
|
+
"border border-border text-foreground": variant === "outline",
|
|
1608
|
+
"border border-green-300 bg-green-100 text-green-800": variant === "success",
|
|
1609
|
+
"border border-yellow-300 bg-yellow-100 text-yellow-800": variant === "warning",
|
|
1610
|
+
"border border-blue-300 bg-blue-100 text-blue-800": variant === "info"
|
|
1608
1611
|
},
|
|
1609
1612
|
className
|
|
1610
1613
|
),
|
|
@@ -1636,11 +1639,75 @@ var Separator = React19.forwardRef(
|
|
|
1636
1639
|
);
|
|
1637
1640
|
Separator.displayName = "Separator";
|
|
1638
1641
|
|
|
1639
|
-
// src/components/
|
|
1642
|
+
// src/components/accordion.tsx
|
|
1640
1643
|
import * as React20 from "react";
|
|
1641
|
-
import * as
|
|
1644
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
1642
1645
|
import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1643
|
-
var
|
|
1646
|
+
var Accordion = AccordionPrimitive.Root;
|
|
1647
|
+
var AccordionItem = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1648
|
+
AccordionPrimitive.Item,
|
|
1649
|
+
{
|
|
1650
|
+
ref,
|
|
1651
|
+
className: cn(
|
|
1652
|
+
"border border-border rounded-xl overflow-hidden",
|
|
1653
|
+
className
|
|
1654
|
+
),
|
|
1655
|
+
...props
|
|
1656
|
+
}
|
|
1657
|
+
));
|
|
1658
|
+
AccordionItem.displayName = "AccordionItem";
|
|
1659
|
+
var AccordionTrigger = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx20(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs7(
|
|
1660
|
+
AccordionPrimitive.Trigger,
|
|
1661
|
+
{
|
|
1662
|
+
ref,
|
|
1663
|
+
className: cn(
|
|
1664
|
+
"flex w-full items-center justify-between bg-muted/50 px-4 py-3 text-left text-sm font-medium transition-colors",
|
|
1665
|
+
"hover:bg-muted",
|
|
1666
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1667
|
+
"data-[state=open]:bg-muted",
|
|
1668
|
+
className
|
|
1669
|
+
),
|
|
1670
|
+
...props,
|
|
1671
|
+
children: [
|
|
1672
|
+
/* @__PURE__ */ jsx20("span", { className: "flex-1", children }),
|
|
1673
|
+
/* @__PURE__ */ jsx20(
|
|
1674
|
+
"svg",
|
|
1675
|
+
{
|
|
1676
|
+
className: "ml-2 h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 data-[state=open]:rotate-180",
|
|
1677
|
+
viewBox: "0 0 24 24",
|
|
1678
|
+
fill: "none",
|
|
1679
|
+
stroke: "currentColor",
|
|
1680
|
+
strokeWidth: "2",
|
|
1681
|
+
strokeLinecap: "round",
|
|
1682
|
+
strokeLinejoin: "round",
|
|
1683
|
+
"aria-hidden": "true",
|
|
1684
|
+
children: /* @__PURE__ */ jsx20("polyline", { points: "6 9 12 15 18 9" })
|
|
1685
|
+
}
|
|
1686
|
+
)
|
|
1687
|
+
]
|
|
1688
|
+
}
|
|
1689
|
+
) }));
|
|
1690
|
+
AccordionTrigger.displayName = "AccordionTrigger";
|
|
1691
|
+
var AccordionContent = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
1692
|
+
AccordionPrimitive.Content,
|
|
1693
|
+
{
|
|
1694
|
+
ref,
|
|
1695
|
+
className: cn(
|
|
1696
|
+
"overflow-hidden text-sm",
|
|
1697
|
+
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
1698
|
+
className
|
|
1699
|
+
),
|
|
1700
|
+
...props,
|
|
1701
|
+
children: /* @__PURE__ */ jsx20("div", { className: "border-t border-border p-4", children })
|
|
1702
|
+
}
|
|
1703
|
+
));
|
|
1704
|
+
AccordionContent.displayName = "AccordionContent";
|
|
1705
|
+
|
|
1706
|
+
// src/components/select/index.tsx
|
|
1707
|
+
import * as React21 from "react";
|
|
1708
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1709
|
+
import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1710
|
+
var ChevronDownIcon = () => /* @__PURE__ */ jsx21(
|
|
1644
1711
|
"svg",
|
|
1645
1712
|
{
|
|
1646
1713
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1652,10 +1719,10 @@ var ChevronDownIcon = () => /* @__PURE__ */ jsx20(
|
|
|
1652
1719
|
strokeWidth: "2",
|
|
1653
1720
|
strokeLinecap: "round",
|
|
1654
1721
|
strokeLinejoin: "round",
|
|
1655
|
-
children: /* @__PURE__ */
|
|
1722
|
+
children: /* @__PURE__ */ jsx21("path", { d: "m6 9 6 6 6-6" })
|
|
1656
1723
|
}
|
|
1657
1724
|
);
|
|
1658
|
-
var ChevronUpIcon = () => /* @__PURE__ */
|
|
1725
|
+
var ChevronUpIcon = () => /* @__PURE__ */ jsx21(
|
|
1659
1726
|
"svg",
|
|
1660
1727
|
{
|
|
1661
1728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1667,10 +1734,10 @@ var ChevronUpIcon = () => /* @__PURE__ */ jsx20(
|
|
|
1667
1734
|
strokeWidth: "2",
|
|
1668
1735
|
strokeLinecap: "round",
|
|
1669
1736
|
strokeLinejoin: "round",
|
|
1670
|
-
children: /* @__PURE__ */
|
|
1737
|
+
children: /* @__PURE__ */ jsx21("path", { d: "m18 15-6-6-6 6" })
|
|
1671
1738
|
}
|
|
1672
1739
|
);
|
|
1673
|
-
var CheckIcon = () => /* @__PURE__ */
|
|
1740
|
+
var CheckIcon = () => /* @__PURE__ */ jsx21(
|
|
1674
1741
|
"svg",
|
|
1675
1742
|
{
|
|
1676
1743
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1682,13 +1749,13 @@ var CheckIcon = () => /* @__PURE__ */ jsx20(
|
|
|
1682
1749
|
strokeWidth: "2",
|
|
1683
1750
|
strokeLinecap: "round",
|
|
1684
1751
|
strokeLinejoin: "round",
|
|
1685
|
-
children: /* @__PURE__ */
|
|
1752
|
+
children: /* @__PURE__ */ jsx21("path", { d: "M20 6 9 17l-5-5" })
|
|
1686
1753
|
}
|
|
1687
1754
|
);
|
|
1688
1755
|
var Select = SelectPrimitive.Root;
|
|
1689
1756
|
var SelectGroup = SelectPrimitive.Group;
|
|
1690
1757
|
var SelectValue = SelectPrimitive.Value;
|
|
1691
|
-
var SelectTrigger =
|
|
1758
|
+
var SelectTrigger = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
1692
1759
|
SelectPrimitive.Trigger,
|
|
1693
1760
|
{
|
|
1694
1761
|
ref,
|
|
@@ -1705,12 +1772,12 @@ var SelectTrigger = React20.forwardRef(({ className, children, ...props }, ref)
|
|
|
1705
1772
|
...props,
|
|
1706
1773
|
children: [
|
|
1707
1774
|
children,
|
|
1708
|
-
/* @__PURE__ */
|
|
1775
|
+
/* @__PURE__ */ jsx21(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx21(ChevronDownIcon, {}) })
|
|
1709
1776
|
]
|
|
1710
1777
|
}
|
|
1711
1778
|
));
|
|
1712
1779
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1713
|
-
var SelectScrollUpButton =
|
|
1780
|
+
var SelectScrollUpButton = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1714
1781
|
SelectPrimitive.ScrollUpButton,
|
|
1715
1782
|
{
|
|
1716
1783
|
ref,
|
|
@@ -1719,11 +1786,11 @@ var SelectScrollUpButton = React20.forwardRef(({ className, ...props }, ref) =>
|
|
|
1719
1786
|
className
|
|
1720
1787
|
),
|
|
1721
1788
|
...props,
|
|
1722
|
-
children: /* @__PURE__ */
|
|
1789
|
+
children: /* @__PURE__ */ jsx21(ChevronUpIcon, {})
|
|
1723
1790
|
}
|
|
1724
1791
|
));
|
|
1725
1792
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1726
|
-
var SelectScrollDownButton =
|
|
1793
|
+
var SelectScrollDownButton = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1727
1794
|
SelectPrimitive.ScrollDownButton,
|
|
1728
1795
|
{
|
|
1729
1796
|
ref,
|
|
@@ -1732,11 +1799,11 @@ var SelectScrollDownButton = React20.forwardRef(({ className, ...props }, ref) =
|
|
|
1732
1799
|
className
|
|
1733
1800
|
),
|
|
1734
1801
|
...props,
|
|
1735
|
-
children: /* @__PURE__ */
|
|
1802
|
+
children: /* @__PURE__ */ jsx21(ChevronDownIcon, {})
|
|
1736
1803
|
}
|
|
1737
1804
|
));
|
|
1738
1805
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1739
|
-
var SelectContent =
|
|
1806
|
+
var SelectContent = React21.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx21(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs8(
|
|
1740
1807
|
SelectPrimitive.Content,
|
|
1741
1808
|
{
|
|
1742
1809
|
ref,
|
|
@@ -1754,8 +1821,8 @@ var SelectContent = React20.forwardRef(({ className, children, position = "poppe
|
|
|
1754
1821
|
position,
|
|
1755
1822
|
...props,
|
|
1756
1823
|
children: [
|
|
1757
|
-
/* @__PURE__ */
|
|
1758
|
-
/* @__PURE__ */
|
|
1824
|
+
/* @__PURE__ */ jsx21(SelectScrollUpButton, {}),
|
|
1825
|
+
/* @__PURE__ */ jsx21(
|
|
1759
1826
|
SelectPrimitive.Viewport,
|
|
1760
1827
|
{
|
|
1761
1828
|
className: cn(
|
|
@@ -1765,12 +1832,12 @@ var SelectContent = React20.forwardRef(({ className, children, position = "poppe
|
|
|
1765
1832
|
children
|
|
1766
1833
|
}
|
|
1767
1834
|
),
|
|
1768
|
-
/* @__PURE__ */
|
|
1835
|
+
/* @__PURE__ */ jsx21(SelectScrollDownButton, {})
|
|
1769
1836
|
]
|
|
1770
1837
|
}
|
|
1771
1838
|
) }));
|
|
1772
1839
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1773
|
-
var SelectLabel =
|
|
1840
|
+
var SelectLabel = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1774
1841
|
SelectPrimitive.Label,
|
|
1775
1842
|
{
|
|
1776
1843
|
ref,
|
|
@@ -1779,7 +1846,7 @@ var SelectLabel = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1779
1846
|
}
|
|
1780
1847
|
));
|
|
1781
1848
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1782
|
-
var SelectItem =
|
|
1849
|
+
var SelectItem = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
1783
1850
|
SelectPrimitive.Item,
|
|
1784
1851
|
{
|
|
1785
1852
|
ref,
|
|
@@ -1791,13 +1858,13 @@ var SelectItem = React20.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1791
1858
|
),
|
|
1792
1859
|
...props,
|
|
1793
1860
|
children: [
|
|
1794
|
-
/* @__PURE__ */
|
|
1795
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ jsx21("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx21(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx21(CheckIcon, {}) }) }),
|
|
1862
|
+
/* @__PURE__ */ jsx21(SelectPrimitive.ItemText, { children })
|
|
1796
1863
|
]
|
|
1797
1864
|
}
|
|
1798
1865
|
));
|
|
1799
1866
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1800
|
-
var SelectSeparator =
|
|
1867
|
+
var SelectSeparator = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1801
1868
|
SelectPrimitive.Separator,
|
|
1802
1869
|
{
|
|
1803
1870
|
ref,
|
|
@@ -1817,8 +1884,8 @@ var SelectNamespace = Object.assign(Select, {
|
|
|
1817
1884
|
ScrollUpButton: SelectScrollUpButton,
|
|
1818
1885
|
ScrollDownButton: SelectScrollDownButton
|
|
1819
1886
|
});
|
|
1820
|
-
var NativeSelect =
|
|
1821
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
1887
|
+
var NativeSelect = React21.forwardRef(
|
|
1888
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1822
1889
|
"select",
|
|
1823
1890
|
{
|
|
1824
1891
|
ref,
|
|
@@ -1835,20 +1902,20 @@ var NativeSelect = React20.forwardRef(
|
|
|
1835
1902
|
)
|
|
1836
1903
|
);
|
|
1837
1904
|
NativeSelect.displayName = "NativeSelect";
|
|
1838
|
-
var NativeSelectOption =
|
|
1839
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1905
|
+
var NativeSelectOption = React21.forwardRef(
|
|
1906
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx21("option", { ref, className: cn("py-1.5", className), ...props })
|
|
1840
1907
|
);
|
|
1841
1908
|
NativeSelectOption.displayName = "NativeSelectOption";
|
|
1842
1909
|
|
|
1843
1910
|
// src/components/dialog/index.tsx
|
|
1844
|
-
import * as
|
|
1911
|
+
import * as React22 from "react";
|
|
1845
1912
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1846
|
-
import { jsx as
|
|
1913
|
+
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1847
1914
|
var Dialog = DialogPrimitive.Root;
|
|
1848
1915
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1849
1916
|
var DialogPortal = DialogPrimitive.Portal;
|
|
1850
1917
|
var DialogClose = DialogPrimitive.Close;
|
|
1851
|
-
var DialogOverlay =
|
|
1918
|
+
var DialogOverlay = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1852
1919
|
DialogPrimitive.Overlay,
|
|
1853
1920
|
{
|
|
1854
1921
|
ref,
|
|
@@ -1861,9 +1928,9 @@ var DialogOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1861
1928
|
}
|
|
1862
1929
|
));
|
|
1863
1930
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1864
|
-
var DialogContent =
|
|
1865
|
-
/* @__PURE__ */
|
|
1866
|
-
/* @__PURE__ */
|
|
1931
|
+
var DialogContent = React22.forwardRef(({ className, children, hideCloseButton = false, size = "lg", ...props }, ref) => /* @__PURE__ */ jsxs9(DialogPortal, { children: [
|
|
1932
|
+
/* @__PURE__ */ jsx22(DialogOverlay, {}),
|
|
1933
|
+
/* @__PURE__ */ jsxs9(
|
|
1867
1934
|
DialogPrimitive.Content,
|
|
1868
1935
|
{
|
|
1869
1936
|
ref,
|
|
@@ -1884,8 +1951,8 @@ var DialogContent = React21.forwardRef(({ className, children, hideCloseButton =
|
|
|
1884
1951
|
...props,
|
|
1885
1952
|
children: [
|
|
1886
1953
|
children,
|
|
1887
|
-
!hideCloseButton && /* @__PURE__ */
|
|
1888
|
-
/* @__PURE__ */
|
|
1954
|
+
!hideCloseButton && /* @__PURE__ */ jsxs9(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1955
|
+
/* @__PURE__ */ jsxs9(
|
|
1889
1956
|
"svg",
|
|
1890
1957
|
{
|
|
1891
1958
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1899,12 +1966,12 @@ var DialogContent = React21.forwardRef(({ className, children, hideCloseButton =
|
|
|
1899
1966
|
strokeLinejoin: "round",
|
|
1900
1967
|
className: "h-4 w-4",
|
|
1901
1968
|
children: [
|
|
1902
|
-
/* @__PURE__ */
|
|
1903
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ jsx22("path", { d: "M18 6 6 18" }),
|
|
1970
|
+
/* @__PURE__ */ jsx22("path", { d: "m6 6 12 12" })
|
|
1904
1971
|
]
|
|
1905
1972
|
}
|
|
1906
1973
|
),
|
|
1907
|
-
/* @__PURE__ */
|
|
1974
|
+
/* @__PURE__ */ jsx22("span", { className: "sr-only", children: "Close" })
|
|
1908
1975
|
] })
|
|
1909
1976
|
]
|
|
1910
1977
|
}
|
|
@@ -1914,7 +1981,7 @@ DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
|
1914
1981
|
var DialogHeader = ({
|
|
1915
1982
|
className,
|
|
1916
1983
|
...props
|
|
1917
|
-
}) => /* @__PURE__ */
|
|
1984
|
+
}) => /* @__PURE__ */ jsx22(
|
|
1918
1985
|
"div",
|
|
1919
1986
|
{
|
|
1920
1987
|
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className),
|
|
@@ -1925,7 +1992,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
1925
1992
|
var DialogFooter = ({
|
|
1926
1993
|
className,
|
|
1927
1994
|
...props
|
|
1928
|
-
}) => /* @__PURE__ */
|
|
1995
|
+
}) => /* @__PURE__ */ jsx22(
|
|
1929
1996
|
"div",
|
|
1930
1997
|
{
|
|
1931
1998
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
@@ -1933,7 +2000,7 @@ var DialogFooter = ({
|
|
|
1933
2000
|
}
|
|
1934
2001
|
);
|
|
1935
2002
|
DialogFooter.displayName = "DialogFooter";
|
|
1936
|
-
var DialogTitle =
|
|
2003
|
+
var DialogTitle = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1937
2004
|
DialogPrimitive.Title,
|
|
1938
2005
|
{
|
|
1939
2006
|
ref,
|
|
@@ -1942,7 +2009,7 @@ var DialogTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1942
2009
|
}
|
|
1943
2010
|
));
|
|
1944
2011
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1945
|
-
var DialogDescription =
|
|
2012
|
+
var DialogDescription = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1946
2013
|
DialogPrimitive.Description,
|
|
1947
2014
|
{
|
|
1948
2015
|
ref,
|
|
@@ -1964,13 +2031,13 @@ var DialogNamespace = Object.assign(Dialog, {
|
|
|
1964
2031
|
});
|
|
1965
2032
|
|
|
1966
2033
|
// src/components/alert-dialog.tsx
|
|
1967
|
-
import * as
|
|
2034
|
+
import * as React23 from "react";
|
|
1968
2035
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
1969
|
-
import { jsx as
|
|
2036
|
+
import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1970
2037
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
1971
2038
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
1972
2039
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
1973
|
-
var AlertDialogOverlay =
|
|
2040
|
+
var AlertDialogOverlay = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
1974
2041
|
AlertDialogPrimitive.Overlay,
|
|
1975
2042
|
{
|
|
1976
2043
|
ref,
|
|
@@ -2007,33 +2074,33 @@ var variantStyles = {
|
|
|
2007
2074
|
}
|
|
2008
2075
|
};
|
|
2009
2076
|
var VariantIcons = {
|
|
2010
|
-
default: ({ className }) => /* @__PURE__ */
|
|
2011
|
-
/* @__PURE__ */
|
|
2012
|
-
/* @__PURE__ */
|
|
2077
|
+
default: ({ className }) => /* @__PURE__ */ jsxs10("svg", { className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2078
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2079
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 16v-4M12 8h.01" })
|
|
2013
2080
|
] }),
|
|
2014
|
-
destructive: ({ className }) => /* @__PURE__ */
|
|
2015
|
-
/* @__PURE__ */
|
|
2016
|
-
/* @__PURE__ */
|
|
2081
|
+
destructive: ({ className }) => /* @__PURE__ */ jsxs10("svg", { className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2082
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2083
|
+
/* @__PURE__ */ jsx23("path", { d: "m15 9-6 6M9 9l6 6" })
|
|
2017
2084
|
] }),
|
|
2018
|
-
success: ({ className }) => /* @__PURE__ */
|
|
2019
|
-
/* @__PURE__ */
|
|
2020
|
-
/* @__PURE__ */
|
|
2085
|
+
success: ({ className }) => /* @__PURE__ */ jsxs10("svg", { className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2086
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2087
|
+
/* @__PURE__ */ jsx23("path", { d: "m9 12 2 2 4-4" })
|
|
2021
2088
|
] }),
|
|
2022
|
-
warning: ({ className }) => /* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2089
|
+
warning: ({ className }) => /* @__PURE__ */ jsxs10("svg", { className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2090
|
+
/* @__PURE__ */ jsx23("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
2091
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 9v4M12 17h.01" })
|
|
2025
2092
|
] }),
|
|
2026
|
-
info: ({ className }) => /* @__PURE__ */
|
|
2027
|
-
/* @__PURE__ */
|
|
2028
|
-
/* @__PURE__ */
|
|
2093
|
+
info: ({ className }) => /* @__PURE__ */ jsxs10("svg", { className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2094
|
+
/* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2095
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 16v-4M12 8h.01" })
|
|
2029
2096
|
] })
|
|
2030
2097
|
};
|
|
2031
|
-
var AlertDialogContent =
|
|
2098
|
+
var AlertDialogContent = React23.forwardRef(({ className, variant = "default", showIcon = true, children, ...props }, ref) => {
|
|
2032
2099
|
const IconComponent = VariantIcons[variant];
|
|
2033
2100
|
const styles = variantStyles[variant];
|
|
2034
|
-
return /* @__PURE__ */
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
/* @__PURE__ */
|
|
2101
|
+
return /* @__PURE__ */ jsxs10(AlertDialogPortal, { children: [
|
|
2102
|
+
/* @__PURE__ */ jsx23(AlertDialogOverlay, {}),
|
|
2103
|
+
/* @__PURE__ */ jsx23(
|
|
2037
2104
|
AlertDialogPrimitive.Content,
|
|
2038
2105
|
{
|
|
2039
2106
|
ref,
|
|
@@ -2050,17 +2117,17 @@ var AlertDialogContent = React22.forwardRef(({ className, variant = "default", s
|
|
|
2050
2117
|
className
|
|
2051
2118
|
),
|
|
2052
2119
|
...props,
|
|
2053
|
-
children: /* @__PURE__ */
|
|
2054
|
-
showIcon && /* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2120
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex gap-4 items-start", children: [
|
|
2121
|
+
showIcon && /* @__PURE__ */ jsx23("div", { className: cn("shrink-0 mt-1", styles.icon), children: /* @__PURE__ */ jsx23(IconComponent, { className: "h-6 w-6" }) }),
|
|
2122
|
+
/* @__PURE__ */ jsx23("div", { className: "flex-1", children })
|
|
2056
2123
|
] })
|
|
2057
2124
|
}
|
|
2058
2125
|
)
|
|
2059
2126
|
] });
|
|
2060
2127
|
});
|
|
2061
2128
|
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
2062
|
-
var AlertDialogHeader =
|
|
2063
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2129
|
+
var AlertDialogHeader = React23.forwardRef(
|
|
2130
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
2064
2131
|
"div",
|
|
2065
2132
|
{
|
|
2066
2133
|
ref,
|
|
@@ -2070,8 +2137,8 @@ var AlertDialogHeader = React22.forwardRef(
|
|
|
2070
2137
|
)
|
|
2071
2138
|
);
|
|
2072
2139
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
2073
|
-
var AlertDialogFooter =
|
|
2074
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2140
|
+
var AlertDialogFooter = React23.forwardRef(
|
|
2141
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
2075
2142
|
"div",
|
|
2076
2143
|
{
|
|
2077
2144
|
ref,
|
|
@@ -2084,7 +2151,7 @@ var AlertDialogFooter = React22.forwardRef(
|
|
|
2084
2151
|
)
|
|
2085
2152
|
);
|
|
2086
2153
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
2087
|
-
var AlertDialogTitle =
|
|
2154
|
+
var AlertDialogTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
2088
2155
|
AlertDialogPrimitive.Title,
|
|
2089
2156
|
{
|
|
2090
2157
|
ref,
|
|
@@ -2093,7 +2160,7 @@ var AlertDialogTitle = React22.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2093
2160
|
}
|
|
2094
2161
|
));
|
|
2095
2162
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
2096
|
-
var AlertDialogDescription =
|
|
2163
|
+
var AlertDialogDescription = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
2097
2164
|
AlertDialogPrimitive.Description,
|
|
2098
2165
|
{
|
|
2099
2166
|
ref,
|
|
@@ -2102,7 +2169,7 @@ var AlertDialogDescription = React22.forwardRef(({ className, ...props }, ref) =
|
|
|
2102
2169
|
}
|
|
2103
2170
|
));
|
|
2104
2171
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
2105
|
-
var AlertDialogAction =
|
|
2172
|
+
var AlertDialogAction = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
2106
2173
|
AlertDialogPrimitive.Action,
|
|
2107
2174
|
{
|
|
2108
2175
|
ref,
|
|
@@ -2119,7 +2186,7 @@ var AlertDialogAction = React22.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2119
2186
|
}
|
|
2120
2187
|
));
|
|
2121
2188
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
2122
|
-
var AlertDialogCancel =
|
|
2189
|
+
var AlertDialogCancel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx23(
|
|
2123
2190
|
AlertDialogPrimitive.Cancel,
|
|
2124
2191
|
{
|
|
2125
2192
|
ref,
|
|
@@ -2138,11 +2205,11 @@ var AlertDialogCancel = React22.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2138
2205
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
2139
2206
|
|
|
2140
2207
|
// src/components/spinner.tsx
|
|
2141
|
-
import * as
|
|
2142
|
-
import { jsx as
|
|
2143
|
-
var Spinner =
|
|
2208
|
+
import * as React24 from "react";
|
|
2209
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2210
|
+
var Spinner = React24.forwardRef(
|
|
2144
2211
|
({ className, size = "default", ...props }, ref) => {
|
|
2145
|
-
return /* @__PURE__ */
|
|
2212
|
+
return /* @__PURE__ */ jsx24(
|
|
2146
2213
|
"div",
|
|
2147
2214
|
{
|
|
2148
2215
|
ref,
|
|
@@ -2159,7 +2226,7 @@ var Spinner = React23.forwardRef(
|
|
|
2159
2226
|
className
|
|
2160
2227
|
),
|
|
2161
2228
|
...props,
|
|
2162
|
-
children: /* @__PURE__ */
|
|
2229
|
+
children: /* @__PURE__ */ jsx24("span", { className: "sr-only", children: "Loading..." })
|
|
2163
2230
|
}
|
|
2164
2231
|
);
|
|
2165
2232
|
}
|
|
@@ -2167,8 +2234,8 @@ var Spinner = React23.forwardRef(
|
|
|
2167
2234
|
Spinner.displayName = "Spinner";
|
|
2168
2235
|
|
|
2169
2236
|
// src/components/alert.tsx
|
|
2170
|
-
import * as
|
|
2171
|
-
import { jsx as
|
|
2237
|
+
import * as React25 from "react";
|
|
2238
|
+
import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2172
2239
|
var variants = {
|
|
2173
2240
|
default: {
|
|
2174
2241
|
iconBg: "bg-zinc-900",
|
|
@@ -2201,7 +2268,7 @@ var variants = {
|
|
|
2201
2268
|
textColor: "text-rose-700"
|
|
2202
2269
|
}
|
|
2203
2270
|
};
|
|
2204
|
-
var CheckIcon2 = ({ className }) => /* @__PURE__ */
|
|
2271
|
+
var CheckIcon2 = ({ className }) => /* @__PURE__ */ jsx25(
|
|
2205
2272
|
"svg",
|
|
2206
2273
|
{
|
|
2207
2274
|
className,
|
|
@@ -2209,10 +2276,10 @@ var CheckIcon2 = ({ className }) => /* @__PURE__ */ jsx24(
|
|
|
2209
2276
|
fill: "none",
|
|
2210
2277
|
stroke: "currentColor",
|
|
2211
2278
|
strokeWidth: "2",
|
|
2212
|
-
children: /* @__PURE__ */
|
|
2279
|
+
children: /* @__PURE__ */ jsx25("path", { d: "m5 13 4 4L19 7" })
|
|
2213
2280
|
}
|
|
2214
2281
|
);
|
|
2215
|
-
var InfoIcon = ({ className }) => /* @__PURE__ */
|
|
2282
|
+
var InfoIcon = ({ className }) => /* @__PURE__ */ jsxs11(
|
|
2216
2283
|
"svg",
|
|
2217
2284
|
{
|
|
2218
2285
|
className,
|
|
@@ -2221,12 +2288,12 @@ var InfoIcon = ({ className }) => /* @__PURE__ */ jsxs10(
|
|
|
2221
2288
|
stroke: "currentColor",
|
|
2222
2289
|
strokeWidth: "2",
|
|
2223
2290
|
children: [
|
|
2224
|
-
/* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ jsx25("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2292
|
+
/* @__PURE__ */ jsx25("path", { d: "M12 16v-4M12 8h.01" })
|
|
2226
2293
|
]
|
|
2227
2294
|
}
|
|
2228
2295
|
);
|
|
2229
|
-
var WarningIcon = ({ className }) => /* @__PURE__ */
|
|
2296
|
+
var WarningIcon = ({ className }) => /* @__PURE__ */ jsxs11(
|
|
2230
2297
|
"svg",
|
|
2231
2298
|
{
|
|
2232
2299
|
className,
|
|
@@ -2235,12 +2302,12 @@ var WarningIcon = ({ className }) => /* @__PURE__ */ jsxs10(
|
|
|
2235
2302
|
stroke: "currentColor",
|
|
2236
2303
|
strokeWidth: "2",
|
|
2237
2304
|
children: [
|
|
2238
|
-
/* @__PURE__ */
|
|
2239
|
-
/* @__PURE__ */
|
|
2305
|
+
/* @__PURE__ */ jsx25("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
|
|
2306
|
+
/* @__PURE__ */ jsx25("path", { d: "M12 9v4M12 17h.01" })
|
|
2240
2307
|
]
|
|
2241
2308
|
}
|
|
2242
2309
|
);
|
|
2243
|
-
var XCircleIcon = ({ className }) => /* @__PURE__ */
|
|
2310
|
+
var XCircleIcon = ({ className }) => /* @__PURE__ */ jsxs11(
|
|
2244
2311
|
"svg",
|
|
2245
2312
|
{
|
|
2246
2313
|
className,
|
|
@@ -2249,12 +2316,12 @@ var XCircleIcon = ({ className }) => /* @__PURE__ */ jsxs10(
|
|
|
2249
2316
|
stroke: "currentColor",
|
|
2250
2317
|
strokeWidth: "2",
|
|
2251
2318
|
children: [
|
|
2252
|
-
/* @__PURE__ */
|
|
2253
|
-
/* @__PURE__ */
|
|
2319
|
+
/* @__PURE__ */ jsx25("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2320
|
+
/* @__PURE__ */ jsx25("path", { d: "m15 9-6 6M9 9l6 6" })
|
|
2254
2321
|
]
|
|
2255
2322
|
}
|
|
2256
2323
|
);
|
|
2257
|
-
var CloseIcon = ({ className }) => /* @__PURE__ */
|
|
2324
|
+
var CloseIcon = ({ className }) => /* @__PURE__ */ jsx25(
|
|
2258
2325
|
"svg",
|
|
2259
2326
|
{
|
|
2260
2327
|
className,
|
|
@@ -2262,7 +2329,7 @@ var CloseIcon = ({ className }) => /* @__PURE__ */ jsx24(
|
|
|
2262
2329
|
fill: "none",
|
|
2263
2330
|
stroke: "currentColor",
|
|
2264
2331
|
strokeWidth: "2",
|
|
2265
|
-
children: /* @__PURE__ */
|
|
2332
|
+
children: /* @__PURE__ */ jsx25("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
2266
2333
|
}
|
|
2267
2334
|
);
|
|
2268
2335
|
var iconMap = {
|
|
@@ -2282,14 +2349,14 @@ var Alert = ({
|
|
|
2282
2349
|
children,
|
|
2283
2350
|
...props
|
|
2284
2351
|
}) => {
|
|
2285
|
-
const [visible, setVisible] =
|
|
2286
|
-
const [progress, setProgress] =
|
|
2352
|
+
const [visible, setVisible] = React25.useState(true);
|
|
2353
|
+
const [progress, setProgress] = React25.useState(100);
|
|
2287
2354
|
const styles = variants[variant];
|
|
2288
2355
|
const Icon2 = iconMap[variant];
|
|
2289
|
-
const hasDescription =
|
|
2290
|
-
(child) =>
|
|
2356
|
+
const hasDescription = React25.Children.toArray(children).some(
|
|
2357
|
+
(child) => React25.isValidElement(child) && child.type === AlertDescription
|
|
2291
2358
|
);
|
|
2292
|
-
|
|
2359
|
+
React25.useEffect(() => {
|
|
2293
2360
|
if (duration === null) return;
|
|
2294
2361
|
const start = Date.now();
|
|
2295
2362
|
const interval = setInterval(() => {
|
|
@@ -2308,7 +2375,7 @@ var Alert = ({
|
|
|
2308
2375
|
onClose?.();
|
|
2309
2376
|
};
|
|
2310
2377
|
if (!visible) return null;
|
|
2311
|
-
return /* @__PURE__ */
|
|
2378
|
+
return /* @__PURE__ */ jsxs11(
|
|
2312
2379
|
"div",
|
|
2313
2380
|
{
|
|
2314
2381
|
role: "alert",
|
|
@@ -2318,34 +2385,34 @@ var Alert = ({
|
|
|
2318
2385
|
),
|
|
2319
2386
|
...props,
|
|
2320
2387
|
children: [
|
|
2321
|
-
/* @__PURE__ */
|
|
2388
|
+
/* @__PURE__ */ jsx25(
|
|
2322
2389
|
"div",
|
|
2323
2390
|
{
|
|
2324
2391
|
className: cn(
|
|
2325
2392
|
"flex items-center justify-center h-10 w-10 rounded-full text-white shrink-0",
|
|
2326
2393
|
styles.iconBg
|
|
2327
2394
|
),
|
|
2328
|
-
children: /* @__PURE__ */
|
|
2395
|
+
children: /* @__PURE__ */ jsx25(Icon2, { className: "h-5 w-5" })
|
|
2329
2396
|
}
|
|
2330
2397
|
),
|
|
2331
|
-
/* @__PURE__ */
|
|
2332
|
-
if (
|
|
2333
|
-
return
|
|
2398
|
+
/* @__PURE__ */ jsx25("div", { className: cn("flex-1", !hasDescription && "flex items-center mt-2"), children: React25.Children.map(children, (child) => {
|
|
2399
|
+
if (React25.isValidElement(child) && child.type === AlertTitle) {
|
|
2400
|
+
return React25.cloneElement(child, {
|
|
2334
2401
|
hasDescription,
|
|
2335
2402
|
variant
|
|
2336
2403
|
});
|
|
2337
2404
|
}
|
|
2338
2405
|
return child;
|
|
2339
2406
|
}) }),
|
|
2340
|
-
/* @__PURE__ */
|
|
2407
|
+
/* @__PURE__ */ jsx25(
|
|
2341
2408
|
"button",
|
|
2342
2409
|
{
|
|
2343
2410
|
onClick: handleClose,
|
|
2344
2411
|
className: "absolute top-3 right-3 text-muted-foreground hover:text-foreground transition",
|
|
2345
|
-
children: /* @__PURE__ */
|
|
2412
|
+
children: /* @__PURE__ */ jsx25(CloseIcon, { className: "h-4 w-4" })
|
|
2346
2413
|
}
|
|
2347
2414
|
),
|
|
2348
|
-
duration !== null && /* @__PURE__ */
|
|
2415
|
+
duration !== null && /* @__PURE__ */ jsx25("div", { className: "absolute bottom-0 left-0 h-1 w-full bg-muted", children: /* @__PURE__ */ jsx25(
|
|
2349
2416
|
"div",
|
|
2350
2417
|
{
|
|
2351
2418
|
className: cn("h-full transition-all", styles.progress),
|
|
@@ -2364,7 +2431,7 @@ var AlertTitle = ({
|
|
|
2364
2431
|
...props
|
|
2365
2432
|
}) => {
|
|
2366
2433
|
const styles = variants[variant];
|
|
2367
|
-
return /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ jsx25(
|
|
2368
2435
|
"h4",
|
|
2369
2436
|
{
|
|
2370
2437
|
className: cn("font-semibold text-sm", styles.textColor, className),
|
|
@@ -2378,15 +2445,15 @@ var AlertDescription = ({
|
|
|
2378
2445
|
children,
|
|
2379
2446
|
...props
|
|
2380
2447
|
}) => {
|
|
2381
|
-
return /* @__PURE__ */
|
|
2448
|
+
return /* @__PURE__ */ jsx25("p", { className: cn("text-sm text-muted-foreground mt-1", className), ...props, children });
|
|
2382
2449
|
};
|
|
2383
2450
|
|
|
2384
2451
|
// src/components/tabs.tsx
|
|
2385
|
-
import * as
|
|
2452
|
+
import * as React26 from "react";
|
|
2386
2453
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
2387
|
-
import { jsx as
|
|
2454
|
+
import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2388
2455
|
var Tabs = TabsPrimitive.Root;
|
|
2389
|
-
var TabsList =
|
|
2456
|
+
var TabsList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2390
2457
|
TabsPrimitive.List,
|
|
2391
2458
|
{
|
|
2392
2459
|
ref,
|
|
@@ -2399,7 +2466,7 @@ var TabsList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2399
2466
|
}
|
|
2400
2467
|
));
|
|
2401
2468
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
2402
|
-
var TabsTrigger =
|
|
2469
|
+
var TabsTrigger = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2403
2470
|
TabsPrimitive.Trigger,
|
|
2404
2471
|
{
|
|
2405
2472
|
ref,
|
|
@@ -2415,7 +2482,7 @@ var TabsTrigger = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2415
2482
|
}
|
|
2416
2483
|
));
|
|
2417
2484
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
2418
|
-
var TabsContent =
|
|
2485
|
+
var TabsContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2419
2486
|
TabsPrimitive.Content,
|
|
2420
2487
|
{
|
|
2421
2488
|
ref,
|
|
@@ -2429,7 +2496,7 @@ var TabsContent = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2429
2496
|
}
|
|
2430
2497
|
));
|
|
2431
2498
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
2432
|
-
var UnderlineTabsList =
|
|
2499
|
+
var UnderlineTabsList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2433
2500
|
TabsPrimitive.List,
|
|
2434
2501
|
{
|
|
2435
2502
|
ref,
|
|
@@ -2441,7 +2508,7 @@ var UnderlineTabsList = React25.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2441
2508
|
}
|
|
2442
2509
|
));
|
|
2443
2510
|
UnderlineTabsList.displayName = "UnderlineTabsList";
|
|
2444
|
-
var UnderlineTabsTrigger =
|
|
2511
|
+
var UnderlineTabsTrigger = React26.forwardRef(({ className, children, count, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
2445
2512
|
TabsPrimitive.Trigger,
|
|
2446
2513
|
{
|
|
2447
2514
|
ref,
|
|
@@ -2458,7 +2525,7 @@ var UnderlineTabsTrigger = React25.forwardRef(({ className, children, count, ...
|
|
|
2458
2525
|
...props,
|
|
2459
2526
|
children: [
|
|
2460
2527
|
children,
|
|
2461
|
-
count !== void 0 && /* @__PURE__ */
|
|
2528
|
+
count !== void 0 && /* @__PURE__ */ jsx26(
|
|
2462
2529
|
"span",
|
|
2463
2530
|
{
|
|
2464
2531
|
className: cn(
|
|
@@ -2472,7 +2539,7 @@ var UnderlineTabsTrigger = React25.forwardRef(({ className, children, count, ...
|
|
|
2472
2539
|
}
|
|
2473
2540
|
));
|
|
2474
2541
|
UnderlineTabsTrigger.displayName = "UnderlineTabsTrigger";
|
|
2475
|
-
var UnderlineTabsContent =
|
|
2542
|
+
var UnderlineTabsContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2476
2543
|
TabsPrimitive.Content,
|
|
2477
2544
|
{
|
|
2478
2545
|
ref,
|
|
@@ -2485,7 +2552,7 @@ var UnderlineTabsContent = React25.forwardRef(({ className, ...props }, ref) =>
|
|
|
2485
2552
|
}
|
|
2486
2553
|
));
|
|
2487
2554
|
UnderlineTabsContent.displayName = "UnderlineTabsContent";
|
|
2488
|
-
var VerticalTabs =
|
|
2555
|
+
var VerticalTabs = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2489
2556
|
TabsPrimitive.Root,
|
|
2490
2557
|
{
|
|
2491
2558
|
ref,
|
|
@@ -2495,7 +2562,7 @@ var VerticalTabs = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2495
2562
|
}
|
|
2496
2563
|
));
|
|
2497
2564
|
VerticalTabs.displayName = "VerticalTabs";
|
|
2498
|
-
var VerticalTabsList =
|
|
2565
|
+
var VerticalTabsList = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2499
2566
|
TabsPrimitive.List,
|
|
2500
2567
|
{
|
|
2501
2568
|
ref,
|
|
@@ -2504,7 +2571,7 @@ var VerticalTabsList = React25.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2504
2571
|
}
|
|
2505
2572
|
));
|
|
2506
2573
|
VerticalTabsList.displayName = "VerticalTabsList";
|
|
2507
|
-
var VerticalTabsTrigger =
|
|
2574
|
+
var VerticalTabsTrigger = React26.forwardRef(({ className, children, icon, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
2508
2575
|
TabsPrimitive.Trigger,
|
|
2509
2576
|
{
|
|
2510
2577
|
ref,
|
|
@@ -2520,13 +2587,13 @@ var VerticalTabsTrigger = React25.forwardRef(({ className, children, icon, ...pr
|
|
|
2520
2587
|
),
|
|
2521
2588
|
...props,
|
|
2522
2589
|
children: [
|
|
2523
|
-
icon && /* @__PURE__ */
|
|
2590
|
+
icon && /* @__PURE__ */ jsx26("span", { className: "size-4 shrink-0 [&>svg]:size-4", children: icon }),
|
|
2524
2591
|
children
|
|
2525
2592
|
]
|
|
2526
2593
|
}
|
|
2527
2594
|
));
|
|
2528
2595
|
VerticalTabsTrigger.displayName = "VerticalTabsTrigger";
|
|
2529
|
-
var VerticalTabsContent =
|
|
2596
|
+
var VerticalTabsContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2530
2597
|
TabsPrimitive.Content,
|
|
2531
2598
|
{
|
|
2532
2599
|
ref,
|
|
@@ -2539,8 +2606,8 @@ var VerticalTabsContent = React25.forwardRef(({ className, ...props }, ref) => /
|
|
|
2539
2606
|
}
|
|
2540
2607
|
));
|
|
2541
2608
|
VerticalTabsContent.displayName = "VerticalTabsContent";
|
|
2542
|
-
var VerticalTabsGroupLabel =
|
|
2543
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
2609
|
+
var VerticalTabsGroupLabel = React26.forwardRef(
|
|
2610
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
2544
2611
|
"div",
|
|
2545
2612
|
{
|
|
2546
2613
|
ref,
|
|
@@ -2555,14 +2622,14 @@ var VerticalTabsGroupLabel = React25.forwardRef(
|
|
|
2555
2622
|
VerticalTabsGroupLabel.displayName = "VerticalTabsGroupLabel";
|
|
2556
2623
|
|
|
2557
2624
|
// src/components/tooltip.tsx
|
|
2558
|
-
import * as
|
|
2625
|
+
import * as React27 from "react";
|
|
2559
2626
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2560
|
-
import { Fragment as Fragment3, jsx as
|
|
2627
|
+
import { Fragment as Fragment3, jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2561
2628
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
2562
2629
|
var TooltipRoot = TooltipPrimitive.Root;
|
|
2563
2630
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
2564
2631
|
var TooltipPortal = TooltipPrimitive.Portal;
|
|
2565
|
-
var TooltipArrow =
|
|
2632
|
+
var TooltipArrow = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
2566
2633
|
TooltipPrimitive.Arrow,
|
|
2567
2634
|
{
|
|
2568
2635
|
ref,
|
|
@@ -2571,7 +2638,7 @@ var TooltipArrow = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2571
2638
|
}
|
|
2572
2639
|
));
|
|
2573
2640
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
|
2574
|
-
var TooltipContent =
|
|
2641
|
+
var TooltipContent = React27.forwardRef(({ className, sideOffset = 4, showArrow = false, children, ...props }, ref) => /* @__PURE__ */ jsxs13(
|
|
2575
2642
|
TooltipPrimitive.Content,
|
|
2576
2643
|
{
|
|
2577
2644
|
ref,
|
|
@@ -2589,12 +2656,12 @@ var TooltipContent = React26.forwardRef(({ className, sideOffset = 4, showArrow
|
|
|
2589
2656
|
...props,
|
|
2590
2657
|
children: [
|
|
2591
2658
|
children,
|
|
2592
|
-
showArrow && /* @__PURE__ */
|
|
2659
|
+
showArrow && /* @__PURE__ */ jsx27(TooltipArrow, {})
|
|
2593
2660
|
]
|
|
2594
2661
|
}
|
|
2595
2662
|
));
|
|
2596
2663
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
2597
|
-
var Tooltip =
|
|
2664
|
+
var Tooltip = React27.forwardRef(
|
|
2598
2665
|
({
|
|
2599
2666
|
content,
|
|
2600
2667
|
children,
|
|
@@ -2608,17 +2675,17 @@ var Tooltip = React26.forwardRef(
|
|
|
2608
2675
|
className
|
|
2609
2676
|
}, ref) => {
|
|
2610
2677
|
if (disabled) {
|
|
2611
|
-
return /* @__PURE__ */
|
|
2678
|
+
return /* @__PURE__ */ jsx27(Fragment3, { children });
|
|
2612
2679
|
}
|
|
2613
|
-
return /* @__PURE__ */
|
|
2680
|
+
return /* @__PURE__ */ jsx27(TooltipProvider, { children: /* @__PURE__ */ jsxs13(
|
|
2614
2681
|
TooltipRoot,
|
|
2615
2682
|
{
|
|
2616
2683
|
delayDuration,
|
|
2617
2684
|
open,
|
|
2618
2685
|
onOpenChange,
|
|
2619
2686
|
children: [
|
|
2620
|
-
/* @__PURE__ */
|
|
2621
|
-
/* @__PURE__ */
|
|
2687
|
+
/* @__PURE__ */ jsx27(TooltipTrigger, { ref, asChild: true, children }),
|
|
2688
|
+
/* @__PURE__ */ jsx27(TooltipPortal, { children: /* @__PURE__ */ jsx27(
|
|
2622
2689
|
TooltipContent,
|
|
2623
2690
|
{
|
|
2624
2691
|
side,
|
|
@@ -2636,8 +2703,8 @@ var Tooltip = React26.forwardRef(
|
|
|
2636
2703
|
Tooltip.displayName = "Tooltip";
|
|
2637
2704
|
|
|
2638
2705
|
// src/components/progress.tsx
|
|
2639
|
-
import * as
|
|
2640
|
-
import { jsx as
|
|
2706
|
+
import * as React28 from "react";
|
|
2707
|
+
import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2641
2708
|
var linearSizeClasses = {
|
|
2642
2709
|
sm: "h-1",
|
|
2643
2710
|
md: "h-2",
|
|
@@ -2650,7 +2717,7 @@ var variantClasses2 = {
|
|
|
2650
2717
|
error: "bg-red-500",
|
|
2651
2718
|
info: "bg-blue-500"
|
|
2652
2719
|
};
|
|
2653
|
-
var LinearProgress =
|
|
2720
|
+
var LinearProgress = React28.forwardRef(
|
|
2654
2721
|
({
|
|
2655
2722
|
value,
|
|
2656
2723
|
variant = "default",
|
|
@@ -2662,8 +2729,8 @@ var LinearProgress = React27.forwardRef(
|
|
|
2662
2729
|
...props
|
|
2663
2730
|
}, ref) => {
|
|
2664
2731
|
const isIndeterminate = value === void 0;
|
|
2665
|
-
return /* @__PURE__ */
|
|
2666
|
-
/* @__PURE__ */
|
|
2732
|
+
return /* @__PURE__ */ jsxs14("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
2733
|
+
/* @__PURE__ */ jsx28(
|
|
2667
2734
|
"div",
|
|
2668
2735
|
{
|
|
2669
2736
|
className: cn(
|
|
@@ -2674,7 +2741,7 @@ var LinearProgress = React27.forwardRef(
|
|
|
2674
2741
|
"aria-valuenow": isIndeterminate ? void 0 : value,
|
|
2675
2742
|
"aria-valuemin": 0,
|
|
2676
2743
|
"aria-valuemax": 100,
|
|
2677
|
-
children: /* @__PURE__ */
|
|
2744
|
+
children: /* @__PURE__ */ jsx28(
|
|
2678
2745
|
"div",
|
|
2679
2746
|
{
|
|
2680
2747
|
className: cn(
|
|
@@ -2688,7 +2755,7 @@ var LinearProgress = React27.forwardRef(
|
|
|
2688
2755
|
)
|
|
2689
2756
|
}
|
|
2690
2757
|
),
|
|
2691
|
-
showValue && !isIndeterminate && /* @__PURE__ */
|
|
2758
|
+
showValue && !isIndeterminate && /* @__PURE__ */ jsx28("span", { className: "mt-1 text-sm text-muted-foreground", children: formatValue(value) })
|
|
2692
2759
|
] });
|
|
2693
2760
|
}
|
|
2694
2761
|
);
|
|
@@ -2706,7 +2773,7 @@ var strokeColors = {
|
|
|
2706
2773
|
error: "stroke-red-500",
|
|
2707
2774
|
info: "stroke-blue-500"
|
|
2708
2775
|
};
|
|
2709
|
-
var CircularProgress =
|
|
2776
|
+
var CircularProgress = React28.forwardRef(
|
|
2710
2777
|
({
|
|
2711
2778
|
value,
|
|
2712
2779
|
variant = "default",
|
|
@@ -2723,7 +2790,7 @@ var CircularProgress = React27.forwardRef(
|
|
|
2723
2790
|
const radius = (sizeValue - thickness) / 2;
|
|
2724
2791
|
const circumference = 2 * Math.PI * radius;
|
|
2725
2792
|
const strokeDashoffset = isIndeterminate ? 0 : circumference - Math.min(100, Math.max(0, value)) / 100 * circumference;
|
|
2726
|
-
return /* @__PURE__ */
|
|
2793
|
+
return /* @__PURE__ */ jsxs14(
|
|
2727
2794
|
"div",
|
|
2728
2795
|
{
|
|
2729
2796
|
ref,
|
|
@@ -2735,7 +2802,7 @@ var CircularProgress = React27.forwardRef(
|
|
|
2735
2802
|
"aria-valuemax": 100,
|
|
2736
2803
|
...props,
|
|
2737
2804
|
children: [
|
|
2738
|
-
/* @__PURE__ */
|
|
2805
|
+
/* @__PURE__ */ jsxs14(
|
|
2739
2806
|
"svg",
|
|
2740
2807
|
{
|
|
2741
2808
|
className: cn(isIndeterminate && "animate-spin"),
|
|
@@ -2743,7 +2810,7 @@ var CircularProgress = React27.forwardRef(
|
|
|
2743
2810
|
height: sizeValue,
|
|
2744
2811
|
viewBox: `0 0 ${sizeValue} ${sizeValue}`,
|
|
2745
2812
|
children: [
|
|
2746
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ jsx28(
|
|
2747
2814
|
"circle",
|
|
2748
2815
|
{
|
|
2749
2816
|
className: "stroke-muted",
|
|
@@ -2754,7 +2821,7 @@ var CircularProgress = React27.forwardRef(
|
|
|
2754
2821
|
r: radius
|
|
2755
2822
|
}
|
|
2756
2823
|
),
|
|
2757
|
-
/* @__PURE__ */
|
|
2824
|
+
/* @__PURE__ */ jsx28(
|
|
2758
2825
|
"circle",
|
|
2759
2826
|
{
|
|
2760
2827
|
className: cn(
|
|
@@ -2775,7 +2842,7 @@ var CircularProgress = React27.forwardRef(
|
|
|
2775
2842
|
]
|
|
2776
2843
|
}
|
|
2777
2844
|
),
|
|
2778
|
-
(showValue || children) && !isIndeterminate && /* @__PURE__ */
|
|
2845
|
+
(showValue || children) && !isIndeterminate && /* @__PURE__ */ jsx28("div", { className: "absolute inset-0 flex items-center justify-center", children: children || /* @__PURE__ */ jsx28(
|
|
2779
2846
|
"span",
|
|
2780
2847
|
{
|
|
2781
2848
|
className: "text-foreground font-medium",
|
|
@@ -2789,13 +2856,13 @@ var CircularProgress = React27.forwardRef(
|
|
|
2789
2856
|
}
|
|
2790
2857
|
);
|
|
2791
2858
|
CircularProgress.displayName = "CircularProgress";
|
|
2792
|
-
var Progress =
|
|
2859
|
+
var Progress = React28.forwardRef((props, ref) => /* @__PURE__ */ jsx28(LinearProgress, { ref, ...props }));
|
|
2793
2860
|
Progress.displayName = "Progress";
|
|
2794
2861
|
|
|
2795
2862
|
// src/components/table.tsx
|
|
2796
|
-
import * as
|
|
2797
|
-
import { jsx as
|
|
2798
|
-
var Table =
|
|
2863
|
+
import * as React29 from "react";
|
|
2864
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2865
|
+
var Table = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx29(
|
|
2799
2866
|
"table",
|
|
2800
2867
|
{
|
|
2801
2868
|
ref,
|
|
@@ -2804,9 +2871,9 @@ var Table = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2804
2871
|
}
|
|
2805
2872
|
) }));
|
|
2806
2873
|
Table.displayName = "Table";
|
|
2807
|
-
var TableHeader =
|
|
2874
|
+
var TableHeader = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2808
2875
|
TableHeader.displayName = "TableHeader";
|
|
2809
|
-
var TableBody =
|
|
2876
|
+
var TableBody = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2810
2877
|
"tbody",
|
|
2811
2878
|
{
|
|
2812
2879
|
ref,
|
|
@@ -2815,7 +2882,7 @@ var TableBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2815
2882
|
}
|
|
2816
2883
|
));
|
|
2817
2884
|
TableBody.displayName = "TableBody";
|
|
2818
|
-
var TableFooter =
|
|
2885
|
+
var TableFooter = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2819
2886
|
"tfoot",
|
|
2820
2887
|
{
|
|
2821
2888
|
ref,
|
|
@@ -2827,7 +2894,7 @@ var TableFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2827
2894
|
}
|
|
2828
2895
|
));
|
|
2829
2896
|
TableFooter.displayName = "TableFooter";
|
|
2830
|
-
var TableRow =
|
|
2897
|
+
var TableRow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2831
2898
|
"tr",
|
|
2832
2899
|
{
|
|
2833
2900
|
ref,
|
|
@@ -2841,7 +2908,7 @@ var TableRow = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2841
2908
|
}
|
|
2842
2909
|
));
|
|
2843
2910
|
TableRow.displayName = "TableRow";
|
|
2844
|
-
var TableHead =
|
|
2911
|
+
var TableHead = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2845
2912
|
"th",
|
|
2846
2913
|
{
|
|
2847
2914
|
ref,
|
|
@@ -2854,7 +2921,7 @@ var TableHead = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2854
2921
|
}
|
|
2855
2922
|
));
|
|
2856
2923
|
TableHead.displayName = "TableHead";
|
|
2857
|
-
var TableCell =
|
|
2924
|
+
var TableCell = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2858
2925
|
"td",
|
|
2859
2926
|
{
|
|
2860
2927
|
ref,
|
|
@@ -2866,7 +2933,7 @@ var TableCell = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2866
2933
|
}
|
|
2867
2934
|
));
|
|
2868
2935
|
TableCell.displayName = "TableCell";
|
|
2869
|
-
var TableCaption =
|
|
2936
|
+
var TableCaption = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2870
2937
|
"caption",
|
|
2871
2938
|
{
|
|
2872
2939
|
ref,
|
|
@@ -2886,8 +2953,8 @@ var TableNamespace = Object.assign(Table, {
|
|
|
2886
2953
|
});
|
|
2887
2954
|
|
|
2888
2955
|
// src/components/avatar.tsx
|
|
2889
|
-
import * as
|
|
2890
|
-
import { jsx as
|
|
2956
|
+
import * as React30 from "react";
|
|
2957
|
+
import { jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2891
2958
|
var sizeClasses3 = {
|
|
2892
2959
|
xs: "h-6 w-6 text-xs",
|
|
2893
2960
|
sm: "h-8 w-8 text-sm",
|
|
@@ -2896,7 +2963,7 @@ var sizeClasses3 = {
|
|
|
2896
2963
|
xl: "h-16 w-16 text-xl",
|
|
2897
2964
|
"2xl": "h-20 w-20 text-2xl"
|
|
2898
2965
|
};
|
|
2899
|
-
var Avatar =
|
|
2966
|
+
var Avatar = React30.forwardRef(
|
|
2900
2967
|
({
|
|
2901
2968
|
src,
|
|
2902
2969
|
alt,
|
|
@@ -2908,8 +2975,8 @@ var Avatar = React29.forwardRef(
|
|
|
2908
2975
|
className,
|
|
2909
2976
|
...props
|
|
2910
2977
|
}, ref) => {
|
|
2911
|
-
const [imageError, setImageError] =
|
|
2912
|
-
|
|
2978
|
+
const [imageError, setImageError] = React30.useState(false);
|
|
2979
|
+
React30.useEffect(() => {
|
|
2913
2980
|
setImageError(false);
|
|
2914
2981
|
}, [src]);
|
|
2915
2982
|
const showFallback = !src || imageError;
|
|
@@ -2920,7 +2987,7 @@ var Avatar = React29.forwardRef(
|
|
|
2920
2987
|
}
|
|
2921
2988
|
return text.slice(0, 2).toUpperCase();
|
|
2922
2989
|
};
|
|
2923
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ jsx30(
|
|
2924
2991
|
"div",
|
|
2925
2992
|
{
|
|
2926
2993
|
ref,
|
|
@@ -2932,7 +2999,7 @@ var Avatar = React29.forwardRef(
|
|
|
2932
2999
|
className
|
|
2933
3000
|
),
|
|
2934
3001
|
...props,
|
|
2935
|
-
children: !showFallback ? /* @__PURE__ */
|
|
3002
|
+
children: !showFallback ? /* @__PURE__ */ jsx30(
|
|
2936
3003
|
"img",
|
|
2937
3004
|
{
|
|
2938
3005
|
src,
|
|
@@ -2940,9 +3007,9 @@ var Avatar = React29.forwardRef(
|
|
|
2940
3007
|
onError: () => setImageError(true),
|
|
2941
3008
|
className: "h-full w-full object-cover"
|
|
2942
3009
|
}
|
|
2943
|
-
) : fallbackElement ? fallbackElement : fallback ? /* @__PURE__ */
|
|
3010
|
+
) : fallbackElement ? fallbackElement : fallback ? /* @__PURE__ */ jsx30("span", { className: "font-medium", children: getInitials(fallback) }) : (
|
|
2944
3011
|
// Default user icon
|
|
2945
|
-
/* @__PURE__ */
|
|
3012
|
+
/* @__PURE__ */ jsxs15(
|
|
2946
3013
|
"svg",
|
|
2947
3014
|
{
|
|
2948
3015
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2954,8 +3021,8 @@ var Avatar = React29.forwardRef(
|
|
|
2954
3021
|
strokeLinejoin: "round",
|
|
2955
3022
|
className: "h-1/2 w-1/2",
|
|
2956
3023
|
children: [
|
|
2957
|
-
/* @__PURE__ */
|
|
2958
|
-
/* @__PURE__ */
|
|
3024
|
+
/* @__PURE__ */ jsx30("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
|
|
3025
|
+
/* @__PURE__ */ jsx30("circle", { cx: "12", cy: "7", r: "4" })
|
|
2959
3026
|
]
|
|
2960
3027
|
}
|
|
2961
3028
|
)
|
|
@@ -2965,12 +3032,12 @@ var Avatar = React29.forwardRef(
|
|
|
2965
3032
|
}
|
|
2966
3033
|
);
|
|
2967
3034
|
Avatar.displayName = "Avatar";
|
|
2968
|
-
var AvatarGroup =
|
|
3035
|
+
var AvatarGroup = React30.forwardRef(
|
|
2969
3036
|
({ max, size = "md", children, className, ...props }, ref) => {
|
|
2970
|
-
const childArray =
|
|
3037
|
+
const childArray = React30.Children.toArray(children);
|
|
2971
3038
|
const visibleChildren = max ? childArray.slice(0, max) : childArray;
|
|
2972
3039
|
const remainingCount = max ? childArray.length - max : 0;
|
|
2973
|
-
return /* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ jsxs15(
|
|
2974
3041
|
"div",
|
|
2975
3042
|
{
|
|
2976
3043
|
ref,
|
|
@@ -2978,8 +3045,8 @@ var AvatarGroup = React29.forwardRef(
|
|
|
2978
3045
|
...props,
|
|
2979
3046
|
children: [
|
|
2980
3047
|
visibleChildren.map((child, index) => {
|
|
2981
|
-
if (
|
|
2982
|
-
return
|
|
3048
|
+
if (React30.isValidElement(child)) {
|
|
3049
|
+
return React30.cloneElement(child, {
|
|
2983
3050
|
key: index,
|
|
2984
3051
|
size: child.props.size || size,
|
|
2985
3052
|
bordered: true,
|
|
@@ -2988,7 +3055,7 @@ var AvatarGroup = React29.forwardRef(
|
|
|
2988
3055
|
}
|
|
2989
3056
|
return child;
|
|
2990
3057
|
}),
|
|
2991
|
-
remainingCount > 0 && /* @__PURE__ */
|
|
3058
|
+
remainingCount > 0 && /* @__PURE__ */ jsx30(
|
|
2992
3059
|
Avatar,
|
|
2993
3060
|
{
|
|
2994
3061
|
size,
|
|
@@ -3005,9 +3072,9 @@ var AvatarGroup = React29.forwardRef(
|
|
|
3005
3072
|
AvatarGroup.displayName = "AvatarGroup";
|
|
3006
3073
|
|
|
3007
3074
|
// src/components/skeleton.tsx
|
|
3008
|
-
import * as
|
|
3009
|
-
import { jsx as
|
|
3010
|
-
var Skeleton =
|
|
3075
|
+
import * as React31 from "react";
|
|
3076
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3077
|
+
var Skeleton = React31.forwardRef(
|
|
3011
3078
|
({
|
|
3012
3079
|
variant = "text",
|
|
3013
3080
|
width,
|
|
@@ -3029,7 +3096,7 @@ var Skeleton = React30.forwardRef(
|
|
|
3029
3096
|
none: ""
|
|
3030
3097
|
};
|
|
3031
3098
|
const defaultHeight = variant === "text" ? "1em" : void 0;
|
|
3032
|
-
return /* @__PURE__ */
|
|
3099
|
+
return /* @__PURE__ */ jsx31(
|
|
3033
3100
|
"div",
|
|
3034
3101
|
{
|
|
3035
3102
|
ref,
|
|
@@ -3050,7 +3117,7 @@ var Skeleton = React30.forwardRef(
|
|
|
3050
3117
|
}
|
|
3051
3118
|
);
|
|
3052
3119
|
Skeleton.displayName = "Skeleton";
|
|
3053
|
-
var SkeletonText =
|
|
3120
|
+
var SkeletonText = React31.forwardRef(
|
|
3054
3121
|
({
|
|
3055
3122
|
lines = 3,
|
|
3056
3123
|
lastLineWidth = 60,
|
|
@@ -3064,7 +3131,7 @@ var SkeletonText = React30.forwardRef(
|
|
|
3064
3131
|
md: "space-y-2",
|
|
3065
3132
|
lg: "space-y-3"
|
|
3066
3133
|
};
|
|
3067
|
-
return /* @__PURE__ */
|
|
3134
|
+
return /* @__PURE__ */ jsx31("div", { ref, className: cn(gapClasses2[gap], className), ...props, children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ jsx31(
|
|
3068
3135
|
Skeleton,
|
|
3069
3136
|
{
|
|
3070
3137
|
variant: "text",
|
|
@@ -3085,10 +3152,10 @@ var sizeMap = {
|
|
|
3085
3152
|
lg: 48,
|
|
3086
3153
|
xl: 64
|
|
3087
3154
|
};
|
|
3088
|
-
var SkeletonAvatar =
|
|
3155
|
+
var SkeletonAvatar = React31.forwardRef(
|
|
3089
3156
|
({ size = "md", animation = "pulse", className, ...props }, ref) => {
|
|
3090
3157
|
const sizeValue = sizeMap[size];
|
|
3091
|
-
return /* @__PURE__ */
|
|
3158
|
+
return /* @__PURE__ */ jsx31(
|
|
3092
3159
|
Skeleton,
|
|
3093
3160
|
{
|
|
3094
3161
|
ref,
|
|
@@ -3103,7 +3170,7 @@ var SkeletonAvatar = React30.forwardRef(
|
|
|
3103
3170
|
}
|
|
3104
3171
|
);
|
|
3105
3172
|
SkeletonAvatar.displayName = "SkeletonAvatar";
|
|
3106
|
-
var SkeletonCard =
|
|
3173
|
+
var SkeletonCard = React31.forwardRef(
|
|
3107
3174
|
({
|
|
3108
3175
|
hasImage = true,
|
|
3109
3176
|
imageHeight = 200,
|
|
@@ -3112,14 +3179,14 @@ var SkeletonCard = React30.forwardRef(
|
|
|
3112
3179
|
className,
|
|
3113
3180
|
...props
|
|
3114
3181
|
}, ref) => {
|
|
3115
|
-
return /* @__PURE__ */
|
|
3182
|
+
return /* @__PURE__ */ jsxs16(
|
|
3116
3183
|
"div",
|
|
3117
3184
|
{
|
|
3118
3185
|
ref,
|
|
3119
3186
|
className: cn("rounded-lg border border-border p-4 space-y-4", className),
|
|
3120
3187
|
...props,
|
|
3121
3188
|
children: [
|
|
3122
|
-
hasImage && /* @__PURE__ */
|
|
3189
|
+
hasImage && /* @__PURE__ */ jsx31(
|
|
3123
3190
|
Skeleton,
|
|
3124
3191
|
{
|
|
3125
3192
|
variant: "rounded",
|
|
@@ -3127,9 +3194,9 @@ var SkeletonCard = React30.forwardRef(
|
|
|
3127
3194
|
animation
|
|
3128
3195
|
}
|
|
3129
3196
|
),
|
|
3130
|
-
/* @__PURE__ */
|
|
3131
|
-
/* @__PURE__ */
|
|
3132
|
-
/* @__PURE__ */
|
|
3197
|
+
/* @__PURE__ */ jsxs16("div", { className: "space-y-2", children: [
|
|
3198
|
+
/* @__PURE__ */ jsx31(Skeleton, { variant: "text", width: "60%", animation }),
|
|
3199
|
+
/* @__PURE__ */ jsx31(SkeletonText, { lines, animation })
|
|
3133
3200
|
] })
|
|
3134
3201
|
]
|
|
3135
3202
|
}
|
|
@@ -3137,15 +3204,15 @@ var SkeletonCard = React30.forwardRef(
|
|
|
3137
3204
|
}
|
|
3138
3205
|
);
|
|
3139
3206
|
SkeletonCard.displayName = "SkeletonCard";
|
|
3140
|
-
var SkeletonTableRow =
|
|
3207
|
+
var SkeletonTableRow = React31.forwardRef(
|
|
3141
3208
|
({ columns = 4, animation = "pulse", className, ...props }, ref) => {
|
|
3142
|
-
return /* @__PURE__ */
|
|
3209
|
+
return /* @__PURE__ */ jsx31(
|
|
3143
3210
|
"div",
|
|
3144
3211
|
{
|
|
3145
3212
|
ref,
|
|
3146
3213
|
className: cn("flex items-center gap-4 py-3", className),
|
|
3147
3214
|
...props,
|
|
3148
|
-
children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */
|
|
3215
|
+
children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ jsx31(
|
|
3149
3216
|
Skeleton,
|
|
3150
3217
|
{
|
|
3151
3218
|
variant: "text",
|
|
@@ -3161,10 +3228,10 @@ var SkeletonTableRow = React30.forwardRef(
|
|
|
3161
3228
|
SkeletonTableRow.displayName = "SkeletonTableRow";
|
|
3162
3229
|
|
|
3163
3230
|
// src/components/pagination.tsx
|
|
3164
|
-
import * as
|
|
3165
|
-
import { jsx as
|
|
3166
|
-
var Pagination =
|
|
3167
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3231
|
+
import * as React32 from "react";
|
|
3232
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3233
|
+
var Pagination = React32.forwardRef(
|
|
3234
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
3168
3235
|
"nav",
|
|
3169
3236
|
{
|
|
3170
3237
|
ref,
|
|
@@ -3176,7 +3243,7 @@ var Pagination = React31.forwardRef(
|
|
|
3176
3243
|
)
|
|
3177
3244
|
);
|
|
3178
3245
|
Pagination.displayName = "Pagination";
|
|
3179
|
-
var PaginationContent =
|
|
3246
|
+
var PaginationContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
3180
3247
|
"ul",
|
|
3181
3248
|
{
|
|
3182
3249
|
ref,
|
|
@@ -3185,10 +3252,10 @@ var PaginationContent = React31.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3185
3252
|
}
|
|
3186
3253
|
));
|
|
3187
3254
|
PaginationContent.displayName = "PaginationContent";
|
|
3188
|
-
var PaginationItem =
|
|
3255
|
+
var PaginationItem = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32("li", { ref, className: cn("", className), ...props }));
|
|
3189
3256
|
PaginationItem.displayName = "PaginationItem";
|
|
3190
|
-
var PaginationLink =
|
|
3191
|
-
({ className, isActive, ...props }, ref) => /* @__PURE__ */
|
|
3257
|
+
var PaginationLink = React32.forwardRef(
|
|
3258
|
+
({ className, isActive, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
3192
3259
|
Button,
|
|
3193
3260
|
{
|
|
3194
3261
|
ref,
|
|
@@ -3200,7 +3267,7 @@ var PaginationLink = React31.forwardRef(
|
|
|
3200
3267
|
)
|
|
3201
3268
|
);
|
|
3202
3269
|
PaginationLink.displayName = "PaginationLink";
|
|
3203
|
-
var PaginationPrevious =
|
|
3270
|
+
var PaginationPrevious = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
3204
3271
|
Button,
|
|
3205
3272
|
{
|
|
3206
3273
|
ref,
|
|
@@ -3209,7 +3276,7 @@ var PaginationPrevious = React31.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3209
3276
|
className: cn("gap-1 pl-2.5", className),
|
|
3210
3277
|
...props,
|
|
3211
3278
|
children: [
|
|
3212
|
-
/* @__PURE__ */
|
|
3279
|
+
/* @__PURE__ */ jsx32(
|
|
3213
3280
|
"svg",
|
|
3214
3281
|
{
|
|
3215
3282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3222,15 +3289,15 @@ var PaginationPrevious = React31.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3222
3289
|
strokeLinecap: "round",
|
|
3223
3290
|
strokeLinejoin: "round",
|
|
3224
3291
|
className: "h-4 w-4",
|
|
3225
|
-
children: /* @__PURE__ */
|
|
3292
|
+
children: /* @__PURE__ */ jsx32("path", { d: "m15 18-6-6 6-6" })
|
|
3226
3293
|
}
|
|
3227
3294
|
),
|
|
3228
|
-
/* @__PURE__ */
|
|
3295
|
+
/* @__PURE__ */ jsx32("span", { children: "Previous" })
|
|
3229
3296
|
]
|
|
3230
3297
|
}
|
|
3231
3298
|
));
|
|
3232
3299
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
3233
|
-
var PaginationNext =
|
|
3300
|
+
var PaginationNext = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
3234
3301
|
Button,
|
|
3235
3302
|
{
|
|
3236
3303
|
ref,
|
|
@@ -3239,8 +3306,8 @@ var PaginationNext = React31.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3239
3306
|
className: cn("gap-1 pr-2.5", className),
|
|
3240
3307
|
...props,
|
|
3241
3308
|
children: [
|
|
3242
|
-
/* @__PURE__ */
|
|
3243
|
-
/* @__PURE__ */
|
|
3309
|
+
/* @__PURE__ */ jsx32("span", { children: "Next" }),
|
|
3310
|
+
/* @__PURE__ */ jsx32(
|
|
3244
3311
|
"svg",
|
|
3245
3312
|
{
|
|
3246
3313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3253,14 +3320,14 @@ var PaginationNext = React31.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3253
3320
|
strokeLinecap: "round",
|
|
3254
3321
|
strokeLinejoin: "round",
|
|
3255
3322
|
className: "h-4 w-4",
|
|
3256
|
-
children: /* @__PURE__ */
|
|
3323
|
+
children: /* @__PURE__ */ jsx32("path", { d: "m9 18 6-6-6-6" })
|
|
3257
3324
|
}
|
|
3258
3325
|
)
|
|
3259
3326
|
]
|
|
3260
3327
|
}
|
|
3261
3328
|
));
|
|
3262
3329
|
PaginationNext.displayName = "PaginationNext";
|
|
3263
|
-
var PaginationEllipsis =
|
|
3330
|
+
var PaginationEllipsis = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
3264
3331
|
"span",
|
|
3265
3332
|
{
|
|
3266
3333
|
ref,
|
|
@@ -3268,7 +3335,7 @@ var PaginationEllipsis = React31.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3268
3335
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
3269
3336
|
...props,
|
|
3270
3337
|
children: [
|
|
3271
|
-
/* @__PURE__ */
|
|
3338
|
+
/* @__PURE__ */ jsxs17(
|
|
3272
3339
|
"svg",
|
|
3273
3340
|
{
|
|
3274
3341
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3282,13 +3349,13 @@ var PaginationEllipsis = React31.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3282
3349
|
strokeLinejoin: "round",
|
|
3283
3350
|
className: "h-4 w-4",
|
|
3284
3351
|
children: [
|
|
3285
|
-
/* @__PURE__ */
|
|
3286
|
-
/* @__PURE__ */
|
|
3287
|
-
/* @__PURE__ */
|
|
3352
|
+
/* @__PURE__ */ jsx32("circle", { cx: "12", cy: "12", r: "1" }),
|
|
3353
|
+
/* @__PURE__ */ jsx32("circle", { cx: "19", cy: "12", r: "1" }),
|
|
3354
|
+
/* @__PURE__ */ jsx32("circle", { cx: "5", cy: "12", r: "1" })
|
|
3288
3355
|
]
|
|
3289
3356
|
}
|
|
3290
3357
|
),
|
|
3291
|
-
/* @__PURE__ */
|
|
3358
|
+
/* @__PURE__ */ jsx32("span", { className: "sr-only", children: "More pages" })
|
|
3292
3359
|
]
|
|
3293
3360
|
}
|
|
3294
3361
|
));
|
|
@@ -3303,12 +3370,12 @@ var PaginationNamespace = Object.assign(Pagination, {
|
|
|
3303
3370
|
});
|
|
3304
3371
|
|
|
3305
3372
|
// src/components/combobox/index.tsx
|
|
3306
|
-
import * as
|
|
3307
|
-
import { Fragment as Fragment4, jsx as
|
|
3373
|
+
import * as React33 from "react";
|
|
3374
|
+
import { Fragment as Fragment4, jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3308
3375
|
function isMultipleProps(props) {
|
|
3309
3376
|
return props.multiple === true;
|
|
3310
3377
|
}
|
|
3311
|
-
var Combobox =
|
|
3378
|
+
var Combobox = React33.forwardRef(
|
|
3312
3379
|
(props, ref) => {
|
|
3313
3380
|
const {
|
|
3314
3381
|
options,
|
|
@@ -3322,7 +3389,7 @@ var Combobox = React32.forwardRef(
|
|
|
3322
3389
|
} = props;
|
|
3323
3390
|
const labelKey = props.labelKey ?? "label";
|
|
3324
3391
|
const valueKey = props.valueKey ?? "value";
|
|
3325
|
-
const getOptionLabel =
|
|
3392
|
+
const getOptionLabel = React33.useCallback(
|
|
3326
3393
|
(option) => {
|
|
3327
3394
|
if (typeof option === "string") return option;
|
|
3328
3395
|
const record = option;
|
|
@@ -3331,7 +3398,7 @@ var Combobox = React32.forwardRef(
|
|
|
3331
3398
|
},
|
|
3332
3399
|
[labelKey]
|
|
3333
3400
|
);
|
|
3334
|
-
const getOptionValue =
|
|
3401
|
+
const getOptionValue = React33.useCallback(
|
|
3335
3402
|
(option) => {
|
|
3336
3403
|
if (typeof option === "string") return option;
|
|
3337
3404
|
const record = option;
|
|
@@ -3343,7 +3410,7 @@ var Combobox = React32.forwardRef(
|
|
|
3343
3410
|
},
|
|
3344
3411
|
[valueKey, getOptionLabel]
|
|
3345
3412
|
);
|
|
3346
|
-
const normalizedOptions =
|
|
3413
|
+
const normalizedOptions = React33.useMemo(
|
|
3347
3414
|
() => (options ?? []).map((option) => ({
|
|
3348
3415
|
raw: option,
|
|
3349
3416
|
label: getOptionLabel(option),
|
|
@@ -3352,31 +3419,31 @@ var Combobox = React32.forwardRef(
|
|
|
3352
3419
|
})),
|
|
3353
3420
|
[options, getOptionLabel, getOptionValue]
|
|
3354
3421
|
);
|
|
3355
|
-
const [open, setOpen] =
|
|
3356
|
-
const [internalSearch, setInternalSearch] =
|
|
3357
|
-
const containerRef =
|
|
3358
|
-
const searchInputRef =
|
|
3422
|
+
const [open, setOpen] = React33.useState(false);
|
|
3423
|
+
const [internalSearch, setInternalSearch] = React33.useState("");
|
|
3424
|
+
const containerRef = React33.useRef(null);
|
|
3425
|
+
const searchInputRef = React33.useRef(null);
|
|
3359
3426
|
const isMultiple = isMultipleProps(props);
|
|
3360
3427
|
const selectAll = isMultiple ? props.selectAll ?? false : false;
|
|
3361
3428
|
const selectAllLabel = isMultiple ? props.selectAllLabel ?? "Select all" : "Select all";
|
|
3362
|
-
const [internalSingleValue, setInternalSingleValue] =
|
|
3363
|
-
const [internalMultiValue, setInternalMultiValue] =
|
|
3429
|
+
const [internalSingleValue, setInternalSingleValue] = React33.useState(!isMultiple ? props.defaultValue ?? null : null);
|
|
3430
|
+
const [internalMultiValue, setInternalMultiValue] = React33.useState(isMultiple ? props.defaultValue ?? [] : []);
|
|
3364
3431
|
const singleValue = !isMultiple ? props.value !== void 0 ? props.value : internalSingleValue : null;
|
|
3365
3432
|
const multiValue = isMultiple ? props.value !== void 0 ? props.value : internalMultiValue : [];
|
|
3366
3433
|
const search = props.inputValue !== void 0 ? props.inputValue : internalSearch;
|
|
3367
|
-
const filteredOptions =
|
|
3434
|
+
const filteredOptions = React33.useMemo(() => {
|
|
3368
3435
|
if (!search) return normalizedOptions;
|
|
3369
3436
|
return normalizedOptions.filter(
|
|
3370
3437
|
(option) => option.label.toLowerCase().includes(search.toLowerCase())
|
|
3371
3438
|
);
|
|
3372
3439
|
}, [normalizedOptions, search]);
|
|
3373
3440
|
const selectedOptions = isMultiple ? multiValue : [];
|
|
3374
|
-
const selectedValueKeys =
|
|
3441
|
+
const selectedValueKeys = React33.useMemo(
|
|
3375
3442
|
() => new Set(selectedOptions.map((option) => getOptionValue(option))),
|
|
3376
3443
|
[selectedOptions, getOptionValue]
|
|
3377
3444
|
);
|
|
3378
3445
|
const singleValueKey = singleValue ? getOptionValue(singleValue) : null;
|
|
3379
|
-
const selectableOptions =
|
|
3446
|
+
const selectableOptions = React33.useMemo(
|
|
3380
3447
|
() => normalizedOptions.filter((option) => !option.disabled),
|
|
3381
3448
|
[normalizedOptions]
|
|
3382
3449
|
);
|
|
@@ -3444,7 +3511,7 @@ var Combobox = React32.forwardRef(
|
|
|
3444
3511
|
}
|
|
3445
3512
|
}
|
|
3446
3513
|
};
|
|
3447
|
-
|
|
3514
|
+
React33.useEffect(() => {
|
|
3448
3515
|
const handleClickOutside = (event) => {
|
|
3449
3516
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
3450
3517
|
setOpen(false);
|
|
@@ -3453,12 +3520,12 @@ var Combobox = React32.forwardRef(
|
|
|
3453
3520
|
document.addEventListener("mousedown", handleClickOutside);
|
|
3454
3521
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3455
3522
|
}, []);
|
|
3456
|
-
|
|
3523
|
+
React33.useEffect(() => {
|
|
3457
3524
|
if (open) {
|
|
3458
3525
|
searchInputRef.current?.focus();
|
|
3459
3526
|
}
|
|
3460
3527
|
}, [open]);
|
|
3461
|
-
|
|
3528
|
+
React33.useImperativeHandle(
|
|
3462
3529
|
ref,
|
|
3463
3530
|
() => searchInputRef.current,
|
|
3464
3531
|
[]
|
|
@@ -3469,8 +3536,8 @@ var Combobox = React32.forwardRef(
|
|
|
3469
3536
|
const maxDisplayItems = isMultiple ? props.maxDisplayItems ?? 3 : 0;
|
|
3470
3537
|
const displayedOptions = selectedOptions.slice(0, maxDisplayItems);
|
|
3471
3538
|
const remainingCount = selectedOptions.length - maxDisplayItems;
|
|
3472
|
-
return /* @__PURE__ */
|
|
3473
|
-
/* @__PURE__ */
|
|
3539
|
+
return /* @__PURE__ */ jsxs18("div", { ref: containerRef, className: "relative", children: [
|
|
3540
|
+
/* @__PURE__ */ jsxs18(
|
|
3474
3541
|
"button",
|
|
3475
3542
|
{
|
|
3476
3543
|
type: "button",
|
|
@@ -3487,20 +3554,20 @@ var Combobox = React32.forwardRef(
|
|
|
3487
3554
|
className
|
|
3488
3555
|
),
|
|
3489
3556
|
children: [
|
|
3490
|
-
isMultiple ? /* @__PURE__ */
|
|
3491
|
-
displayedOptions.map((option) => /* @__PURE__ */
|
|
3557
|
+
isMultiple ? /* @__PURE__ */ jsx33("div", { className: "flex flex-1 flex-wrap items-center gap-1", children: selectedOptions.length === 0 ? /* @__PURE__ */ jsx33("span", { className: "text-muted-foreground", children: placeholder }) : /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
3558
|
+
displayedOptions.map((option) => /* @__PURE__ */ jsxs18(
|
|
3492
3559
|
"span",
|
|
3493
3560
|
{
|
|
3494
3561
|
className: "inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs font-medium",
|
|
3495
3562
|
children: [
|
|
3496
3563
|
getOptionLabel(option),
|
|
3497
|
-
/* @__PURE__ */
|
|
3564
|
+
/* @__PURE__ */ jsx33(
|
|
3498
3565
|
"button",
|
|
3499
3566
|
{
|
|
3500
3567
|
type: "button",
|
|
3501
3568
|
onClick: (e) => handleRemoveItem(getOptionValue(option), e),
|
|
3502
3569
|
className: "ml-1 rounded-full hover:bg-background/50",
|
|
3503
|
-
children: /* @__PURE__ */
|
|
3570
|
+
children: /* @__PURE__ */ jsx33(
|
|
3504
3571
|
"svg",
|
|
3505
3572
|
{
|
|
3506
3573
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3512,7 +3579,7 @@ var Combobox = React32.forwardRef(
|
|
|
3512
3579
|
strokeWidth: "2",
|
|
3513
3580
|
strokeLinecap: "round",
|
|
3514
3581
|
strokeLinejoin: "round",
|
|
3515
|
-
children: /* @__PURE__ */
|
|
3582
|
+
children: /* @__PURE__ */ jsx33("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3516
3583
|
}
|
|
3517
3584
|
)
|
|
3518
3585
|
}
|
|
@@ -3521,20 +3588,20 @@ var Combobox = React32.forwardRef(
|
|
|
3521
3588
|
},
|
|
3522
3589
|
getOptionValue(option)
|
|
3523
3590
|
)),
|
|
3524
|
-
remainingCount > 0 && /* @__PURE__ */
|
|
3591
|
+
remainingCount > 0 && /* @__PURE__ */ jsxs18("span", { className: "text-xs text-muted-foreground", children: [
|
|
3525
3592
|
"+",
|
|
3526
3593
|
remainingCount,
|
|
3527
3594
|
" more"
|
|
3528
3595
|
] })
|
|
3529
|
-
] }) }) : /* @__PURE__ */
|
|
3530
|
-
/* @__PURE__ */
|
|
3531
|
-
isMultiple && selectedOptions.length > 0 && /* @__PURE__ */
|
|
3596
|
+
] }) }) : /* @__PURE__ */ jsx33("span", { className: cn(!singleValue && "text-muted-foreground"), children: singleValue ? getOptionLabel(singleValue) : placeholder }),
|
|
3597
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1", children: [
|
|
3598
|
+
isMultiple && selectedOptions.length > 0 && /* @__PURE__ */ jsx33(
|
|
3532
3599
|
"button",
|
|
3533
3600
|
{
|
|
3534
3601
|
type: "button",
|
|
3535
3602
|
onClick: handleClearAll,
|
|
3536
3603
|
className: "rounded p-0.5 hover:bg-muted",
|
|
3537
|
-
children: /* @__PURE__ */
|
|
3604
|
+
children: /* @__PURE__ */ jsx33(
|
|
3538
3605
|
"svg",
|
|
3539
3606
|
{
|
|
3540
3607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3547,19 +3614,19 @@ var Combobox = React32.forwardRef(
|
|
|
3547
3614
|
strokeLinecap: "round",
|
|
3548
3615
|
strokeLinejoin: "round",
|
|
3549
3616
|
className: "opacity-50 hover:opacity-100",
|
|
3550
|
-
children: /* @__PURE__ */
|
|
3617
|
+
children: /* @__PURE__ */ jsx33("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3551
3618
|
}
|
|
3552
3619
|
)
|
|
3553
3620
|
}
|
|
3554
3621
|
),
|
|
3555
|
-
!isMultiple && clearable && singleValue && /* @__PURE__ */
|
|
3622
|
+
!isMultiple && clearable && singleValue && /* @__PURE__ */ jsx33(
|
|
3556
3623
|
"button",
|
|
3557
3624
|
{
|
|
3558
3625
|
type: "button",
|
|
3559
3626
|
onClick: handleClearSingle,
|
|
3560
3627
|
className: "rounded p-0.5 hover:bg-muted",
|
|
3561
3628
|
"aria-label": "Clear selection",
|
|
3562
|
-
children: /* @__PURE__ */
|
|
3629
|
+
children: /* @__PURE__ */ jsx33(
|
|
3563
3630
|
"svg",
|
|
3564
3631
|
{
|
|
3565
3632
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3572,12 +3639,12 @@ var Combobox = React32.forwardRef(
|
|
|
3572
3639
|
strokeLinecap: "round",
|
|
3573
3640
|
strokeLinejoin: "round",
|
|
3574
3641
|
className: "opacity-50 hover:opacity-100",
|
|
3575
|
-
children: /* @__PURE__ */
|
|
3642
|
+
children: /* @__PURE__ */ jsx33("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
3576
3643
|
}
|
|
3577
3644
|
)
|
|
3578
3645
|
}
|
|
3579
3646
|
),
|
|
3580
|
-
/* @__PURE__ */
|
|
3647
|
+
/* @__PURE__ */ jsx33(
|
|
3581
3648
|
"svg",
|
|
3582
3649
|
{
|
|
3583
3650
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3593,16 +3660,16 @@ var Combobox = React32.forwardRef(
|
|
|
3593
3660
|
"h-4 w-4 shrink-0 opacity-50 transition-transform",
|
|
3594
3661
|
open && "rotate-180"
|
|
3595
3662
|
),
|
|
3596
|
-
children: /* @__PURE__ */
|
|
3663
|
+
children: /* @__PURE__ */ jsx33("path", { d: "m6 9 6 6 6-6" })
|
|
3597
3664
|
}
|
|
3598
3665
|
)
|
|
3599
3666
|
] })
|
|
3600
3667
|
]
|
|
3601
3668
|
}
|
|
3602
3669
|
),
|
|
3603
|
-
open && /* @__PURE__ */
|
|
3604
|
-
/* @__PURE__ */
|
|
3605
|
-
/* @__PURE__ */
|
|
3670
|
+
open && /* @__PURE__ */ jsxs18("div", { className: "absolute z-50 mt-1 w-full overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-md", children: [
|
|
3671
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center border-b border-border px-3", children: [
|
|
3672
|
+
/* @__PURE__ */ jsxs18(
|
|
3606
3673
|
"svg",
|
|
3607
3674
|
{
|
|
3608
3675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3616,12 +3683,12 @@ var Combobox = React32.forwardRef(
|
|
|
3616
3683
|
strokeLinejoin: "round",
|
|
3617
3684
|
className: "mr-2 h-4 w-4 shrink-0 opacity-50",
|
|
3618
3685
|
children: [
|
|
3619
|
-
/* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3686
|
+
/* @__PURE__ */ jsx33("circle", { cx: "11", cy: "11", r: "8" }),
|
|
3687
|
+
/* @__PURE__ */ jsx33("path", { d: "m21 21-4.3-4.3" })
|
|
3621
3688
|
]
|
|
3622
3689
|
}
|
|
3623
3690
|
),
|
|
3624
|
-
/* @__PURE__ */
|
|
3691
|
+
/* @__PURE__ */ jsx33(
|
|
3625
3692
|
"input",
|
|
3626
3693
|
{
|
|
3627
3694
|
ref: setSearchRef,
|
|
@@ -3640,8 +3707,8 @@ var Combobox = React32.forwardRef(
|
|
|
3640
3707
|
}
|
|
3641
3708
|
)
|
|
3642
3709
|
] }),
|
|
3643
|
-
/* @__PURE__ */
|
|
3644
|
-
isMultiple && selectAll && /* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ jsx33("div", { className: "max-h-[300px] overflow-y-auto p-1", children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx33("div", { className: "py-6 text-center text-sm text-muted-foreground", children: emptyMessage }) : /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
3711
|
+
isMultiple && selectAll && /* @__PURE__ */ jsxs18(
|
|
3645
3712
|
"button",
|
|
3646
3713
|
{
|
|
3647
3714
|
type: "button",
|
|
@@ -3653,14 +3720,14 @@ var Combobox = React32.forwardRef(
|
|
|
3653
3720
|
allSelected && "bg-muted"
|
|
3654
3721
|
),
|
|
3655
3722
|
children: [
|
|
3656
|
-
/* @__PURE__ */
|
|
3723
|
+
/* @__PURE__ */ jsx33("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: /* @__PURE__ */ jsx33(
|
|
3657
3724
|
"div",
|
|
3658
3725
|
{
|
|
3659
3726
|
className: cn(
|
|
3660
3727
|
"flex h-4 w-4 items-center justify-center rounded border border-input",
|
|
3661
3728
|
allSelected && "bg-accent border-accent"
|
|
3662
3729
|
),
|
|
3663
|
-
children: allSelected && /* @__PURE__ */
|
|
3730
|
+
children: allSelected && /* @__PURE__ */ jsx33(
|
|
3664
3731
|
"svg",
|
|
3665
3732
|
{
|
|
3666
3733
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3673,7 +3740,7 @@ var Combobox = React32.forwardRef(
|
|
|
3673
3740
|
strokeLinecap: "round",
|
|
3674
3741
|
strokeLinejoin: "round",
|
|
3675
3742
|
className: "h-3 w-3",
|
|
3676
|
-
children: /* @__PURE__ */
|
|
3743
|
+
children: /* @__PURE__ */ jsx33("polyline", { points: "20 6 9 17 4 12" })
|
|
3677
3744
|
}
|
|
3678
3745
|
)
|
|
3679
3746
|
}
|
|
@@ -3684,7 +3751,7 @@ var Combobox = React32.forwardRef(
|
|
|
3684
3751
|
),
|
|
3685
3752
|
filteredOptions.map((option) => {
|
|
3686
3753
|
const isSelected = isMultiple ? selectedValueKeys.has(option.value) : option.value === singleValueKey;
|
|
3687
|
-
return /* @__PURE__ */
|
|
3754
|
+
return /* @__PURE__ */ jsxs18(
|
|
3688
3755
|
"button",
|
|
3689
3756
|
{
|
|
3690
3757
|
type: "button",
|
|
@@ -3698,16 +3765,16 @@ var Combobox = React32.forwardRef(
|
|
|
3698
3765
|
isSelected && "bg-muted"
|
|
3699
3766
|
),
|
|
3700
3767
|
children: [
|
|
3701
|
-
/* @__PURE__ */
|
|
3768
|
+
/* @__PURE__ */ jsx33("span", { className: "absolute left-2 flex h-4 w-4 items-center justify-center", children: isMultiple ? (
|
|
3702
3769
|
// Checkbox for multi-select
|
|
3703
|
-
/* @__PURE__ */
|
|
3770
|
+
/* @__PURE__ */ jsx33(
|
|
3704
3771
|
"div",
|
|
3705
3772
|
{
|
|
3706
3773
|
className: cn(
|
|
3707
3774
|
"flex h-4 w-4 items-center justify-center rounded border border-input",
|
|
3708
3775
|
isSelected && "bg-accent border-accent"
|
|
3709
3776
|
),
|
|
3710
|
-
children: isSelected && /* @__PURE__ */
|
|
3777
|
+
children: isSelected && /* @__PURE__ */ jsx33(
|
|
3711
3778
|
"svg",
|
|
3712
3779
|
{
|
|
3713
3780
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3720,14 +3787,14 @@ var Combobox = React32.forwardRef(
|
|
|
3720
3787
|
strokeLinecap: "round",
|
|
3721
3788
|
strokeLinejoin: "round",
|
|
3722
3789
|
className: "h-3 w-3",
|
|
3723
|
-
children: /* @__PURE__ */
|
|
3790
|
+
children: /* @__PURE__ */ jsx33("polyline", { points: "20 6 9 17 4 12" })
|
|
3724
3791
|
}
|
|
3725
3792
|
)
|
|
3726
3793
|
}
|
|
3727
3794
|
)
|
|
3728
3795
|
) : (
|
|
3729
3796
|
// Checkmark for single-select
|
|
3730
|
-
isSelected && /* @__PURE__ */
|
|
3797
|
+
isSelected && /* @__PURE__ */ jsx33(
|
|
3731
3798
|
"svg",
|
|
3732
3799
|
{
|
|
3733
3800
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3740,7 +3807,7 @@ var Combobox = React32.forwardRef(
|
|
|
3740
3807
|
strokeLinecap: "round",
|
|
3741
3808
|
strokeLinejoin: "round",
|
|
3742
3809
|
className: "h-4 w-4",
|
|
3743
|
-
children: /* @__PURE__ */
|
|
3810
|
+
children: /* @__PURE__ */ jsx33("polyline", { points: "20 6 9 17 4 12" })
|
|
3744
3811
|
}
|
|
3745
3812
|
)
|
|
3746
3813
|
) }),
|
|
@@ -3758,7 +3825,7 @@ var Combobox = React32.forwardRef(
|
|
|
3758
3825
|
Combobox.displayName = "Combobox";
|
|
3759
3826
|
|
|
3760
3827
|
// src/components/data-grid/index.tsx
|
|
3761
|
-
import * as
|
|
3828
|
+
import * as React34 from "react";
|
|
3762
3829
|
import {
|
|
3763
3830
|
useReactTable,
|
|
3764
3831
|
getCoreRowModel,
|
|
@@ -3768,13 +3835,13 @@ import {
|
|
|
3768
3835
|
flexRender
|
|
3769
3836
|
} from "@tanstack/react-table";
|
|
3770
3837
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
3771
|
-
import { jsx as
|
|
3838
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3772
3839
|
function convertColumns(columns, checkboxSelection) {
|
|
3773
3840
|
const tanstackColumns = [];
|
|
3774
3841
|
if (checkboxSelection) {
|
|
3775
3842
|
tanstackColumns.push({
|
|
3776
3843
|
id: "__select__",
|
|
3777
|
-
header: ({ table }) => /* @__PURE__ */
|
|
3844
|
+
header: ({ table }) => /* @__PURE__ */ jsx34("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx34(
|
|
3778
3845
|
Checkbox,
|
|
3779
3846
|
{
|
|
3780
3847
|
checked: table.getIsAllPageRowsSelected(),
|
|
@@ -3782,7 +3849,7 @@ function convertColumns(columns, checkboxSelection) {
|
|
|
3782
3849
|
"aria-label": "Select all"
|
|
3783
3850
|
}
|
|
3784
3851
|
) }),
|
|
3785
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
3852
|
+
cell: ({ row }) => /* @__PURE__ */ jsx34("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx34(
|
|
3786
3853
|
Checkbox,
|
|
3787
3854
|
{
|
|
3788
3855
|
checked: row.getIsSelected(),
|
|
@@ -3904,7 +3971,7 @@ function calculateInitialColumnWidths(columns, containerWidth, checkboxSelection
|
|
|
3904
3971
|
return widthMap;
|
|
3905
3972
|
}
|
|
3906
3973
|
function useColumnWidths(columns, containerWidth, checkboxSelection, columnSizing) {
|
|
3907
|
-
return
|
|
3974
|
+
return React34.useMemo(
|
|
3908
3975
|
() => calculateInitialColumnWidths(columns, containerWidth, checkboxSelection, columnSizing),
|
|
3909
3976
|
[columns, containerWidth, checkboxSelection, columnSizing]
|
|
3910
3977
|
);
|
|
@@ -3913,7 +3980,7 @@ var ColumnResizeHandle = ({
|
|
|
3913
3980
|
header,
|
|
3914
3981
|
isResizing
|
|
3915
3982
|
}) => {
|
|
3916
|
-
return /* @__PURE__ */
|
|
3983
|
+
return /* @__PURE__ */ jsx34(
|
|
3917
3984
|
"div",
|
|
3918
3985
|
{
|
|
3919
3986
|
className: cn(
|
|
@@ -3932,16 +3999,16 @@ var ColumnResizeHandle = ({
|
|
|
3932
3999
|
};
|
|
3933
4000
|
var SortIcon = ({ direction }) => {
|
|
3934
4001
|
if (!direction) {
|
|
3935
|
-
return /* @__PURE__ */
|
|
4002
|
+
return /* @__PURE__ */ jsx34("svg", { className: "ml-1 h-4 w-4 text-muted-foreground/50", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx34("path", { d: "M7 15l5 5 5-5M7 9l5-5 5 5" }) });
|
|
3936
4003
|
}
|
|
3937
|
-
return /* @__PURE__ */
|
|
4004
|
+
return /* @__PURE__ */ jsx34("svg", { className: "ml-1 h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: direction === "asc" ? /* @__PURE__ */ jsx34("path", { d: "M7 14l5-5 5 5" }) : /* @__PURE__ */ jsx34("path", { d: "M7 10l5 5 5-5" }) });
|
|
3938
4005
|
};
|
|
3939
4006
|
var ColumnVisibilityDropdown = ({
|
|
3940
4007
|
table
|
|
3941
4008
|
}) => {
|
|
3942
|
-
const [open, setOpen] =
|
|
3943
|
-
const dropdownRef =
|
|
3944
|
-
|
|
4009
|
+
const [open, setOpen] = React34.useState(false);
|
|
4010
|
+
const dropdownRef = React34.useRef(null);
|
|
4011
|
+
React34.useEffect(() => {
|
|
3945
4012
|
const handleClickOutside = (event) => {
|
|
3946
4013
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
3947
4014
|
setOpen(false);
|
|
@@ -3951,8 +4018,8 @@ var ColumnVisibilityDropdown = ({
|
|
|
3951
4018
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3952
4019
|
}, []);
|
|
3953
4020
|
const allColumns = table.getAllLeafColumns().filter((col) => col.id !== "__select__");
|
|
3954
|
-
return /* @__PURE__ */
|
|
3955
|
-
/* @__PURE__ */
|
|
4021
|
+
return /* @__PURE__ */ jsxs19("div", { className: "relative", ref: dropdownRef, children: [
|
|
4022
|
+
/* @__PURE__ */ jsxs19(
|
|
3956
4023
|
Button,
|
|
3957
4024
|
{
|
|
3958
4025
|
variant: "outline",
|
|
@@ -3960,40 +4027,40 @@ var ColumnVisibilityDropdown = ({
|
|
|
3960
4027
|
onClick: () => setOpen(!open),
|
|
3961
4028
|
className: "h-9 gap-2",
|
|
3962
4029
|
children: [
|
|
3963
|
-
/* @__PURE__ */
|
|
3964
|
-
/* @__PURE__ */
|
|
3965
|
-
/* @__PURE__ */
|
|
3966
|
-
/* @__PURE__ */
|
|
4030
|
+
/* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4031
|
+
/* @__PURE__ */ jsx34("path", { d: "M12 3v18M3 12h18" }),
|
|
4032
|
+
/* @__PURE__ */ jsx34("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
4033
|
+
/* @__PURE__ */ jsx34("path", { d: "M3 9h18M3 15h18M9 3v18M15 3v18" })
|
|
3967
4034
|
] }),
|
|
3968
4035
|
"Columns"
|
|
3969
4036
|
]
|
|
3970
4037
|
}
|
|
3971
4038
|
),
|
|
3972
|
-
open && /* @__PURE__ */
|
|
3973
|
-
/* @__PURE__ */
|
|
3974
|
-
/* @__PURE__ */
|
|
4039
|
+
open && /* @__PURE__ */ jsxs19("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[180px] rounded-md border border-border bg-popover p-2 shadow-md", children: [
|
|
4040
|
+
/* @__PURE__ */ jsx34("div", { className: "text-sm font-medium text-foreground mb-2 px-2", children: "Show/Hide Columns" }),
|
|
4041
|
+
/* @__PURE__ */ jsx34("div", { className: "max-h-[300px] overflow-auto", children: allColumns.map((column) => {
|
|
3975
4042
|
const meta = column.columnDef.meta;
|
|
3976
4043
|
const headerName = meta?.headerName || column.id;
|
|
3977
|
-
return /* @__PURE__ */
|
|
4044
|
+
return /* @__PURE__ */ jsxs19(
|
|
3978
4045
|
"label",
|
|
3979
4046
|
{
|
|
3980
4047
|
className: "flex items-center gap-2 px-2 py-1.5 hover:bg-muted rounded cursor-pointer",
|
|
3981
4048
|
children: [
|
|
3982
|
-
/* @__PURE__ */
|
|
4049
|
+
/* @__PURE__ */ jsx34(
|
|
3983
4050
|
Checkbox,
|
|
3984
4051
|
{
|
|
3985
4052
|
checked: column.getIsVisible(),
|
|
3986
4053
|
onChange: (e) => column.toggleVisibility(e.target.checked)
|
|
3987
4054
|
}
|
|
3988
4055
|
),
|
|
3989
|
-
/* @__PURE__ */
|
|
4056
|
+
/* @__PURE__ */ jsx34("span", { className: "text-sm", children: headerName })
|
|
3990
4057
|
]
|
|
3991
4058
|
},
|
|
3992
4059
|
column.id
|
|
3993
4060
|
);
|
|
3994
4061
|
}) }),
|
|
3995
|
-
/* @__PURE__ */
|
|
3996
|
-
/* @__PURE__ */
|
|
4062
|
+
/* @__PURE__ */ jsxs19("div", { className: "border-t border-border mt-2 pt-2 flex gap-2 px-2", children: [
|
|
4063
|
+
/* @__PURE__ */ jsx34(
|
|
3997
4064
|
Button,
|
|
3998
4065
|
{
|
|
3999
4066
|
variant: "ghost",
|
|
@@ -4003,7 +4070,7 @@ var ColumnVisibilityDropdown = ({
|
|
|
4003
4070
|
children: "Show All"
|
|
4004
4071
|
}
|
|
4005
4072
|
),
|
|
4006
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ jsx34(
|
|
4007
4074
|
Button,
|
|
4008
4075
|
{
|
|
4009
4076
|
variant: "ghost",
|
|
@@ -4053,28 +4120,28 @@ var DataGridPagination = ({
|
|
|
4053
4120
|
};
|
|
4054
4121
|
const startRow = currentPage * pageSize + 1;
|
|
4055
4122
|
const endRow = Math.min((currentPage + 1) * pageSize, totalRows);
|
|
4056
|
-
return /* @__PURE__ */
|
|
4057
|
-
/* @__PURE__ */
|
|
4058
|
-
/* @__PURE__ */
|
|
4059
|
-
/* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-end gap-4 px-4 py-3 border-t border-border bg-background", children: [
|
|
4124
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
4125
|
+
/* @__PURE__ */ jsx34("span", { children: "Rows per page:" }),
|
|
4126
|
+
/* @__PURE__ */ jsx34(
|
|
4060
4127
|
"select",
|
|
4061
4128
|
{
|
|
4062
4129
|
value: pageSize,
|
|
4063
4130
|
onChange: (e) => table.setPageSize(Number(e.target.value)),
|
|
4064
4131
|
className: "h-8 rounded-md border border-border bg-background px-2 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
|
|
4065
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */
|
|
4132
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx34("option", { value: size, children: size }, size))
|
|
4066
4133
|
}
|
|
4067
4134
|
)
|
|
4068
4135
|
] }),
|
|
4069
|
-
/* @__PURE__ */
|
|
4136
|
+
/* @__PURE__ */ jsxs19("span", { className: "text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
4070
4137
|
startRow,
|
|
4071
4138
|
"-",
|
|
4072
4139
|
endRow,
|
|
4073
4140
|
" of ",
|
|
4074
4141
|
totalRows
|
|
4075
4142
|
] }),
|
|
4076
|
-
/* @__PURE__ */
|
|
4077
|
-
/* @__PURE__ */
|
|
4143
|
+
/* @__PURE__ */ jsx34(PaginationNamespace, { className: "mx-0 w-auto", children: /* @__PURE__ */ jsxs19(PaginationContent, { children: [
|
|
4144
|
+
/* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4078
4145
|
Button,
|
|
4079
4146
|
{
|
|
4080
4147
|
variant: "outline",
|
|
@@ -4082,10 +4149,10 @@ var DataGridPagination = ({
|
|
|
4082
4149
|
className: "h-8 w-8",
|
|
4083
4150
|
onClick: () => table.setPageIndex(0),
|
|
4084
4151
|
disabled: !table.getCanPreviousPage(),
|
|
4085
|
-
children: /* @__PURE__ */
|
|
4152
|
+
children: /* @__PURE__ */ jsx34("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx34("path", { d: "M11 17l-5-5 5-5M18 17l-5-5 5-5" }) })
|
|
4086
4153
|
}
|
|
4087
4154
|
) }),
|
|
4088
|
-
/* @__PURE__ */
|
|
4155
|
+
/* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4089
4156
|
Button,
|
|
4090
4157
|
{
|
|
4091
4158
|
variant: "outline",
|
|
@@ -4093,11 +4160,11 @@ var DataGridPagination = ({
|
|
|
4093
4160
|
className: "h-8 w-8",
|
|
4094
4161
|
onClick: () => table.previousPage(),
|
|
4095
4162
|
disabled: !table.getCanPreviousPage(),
|
|
4096
|
-
children: /* @__PURE__ */
|
|
4163
|
+
children: /* @__PURE__ */ jsx34("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx34("path", { d: "M15 18l-6-6 6-6" }) })
|
|
4097
4164
|
}
|
|
4098
4165
|
) }),
|
|
4099
4166
|
getPageNumbers().map(
|
|
4100
|
-
(page, idx) => page === "ellipsis" ? /* @__PURE__ */
|
|
4167
|
+
(page, idx) => page === "ellipsis" ? /* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(PaginationEllipsis, {}) }, `ellipsis-${idx}`) : /* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4101
4168
|
PaginationLink,
|
|
4102
4169
|
{
|
|
4103
4170
|
isActive: page === currentPage,
|
|
@@ -4106,7 +4173,7 @@ var DataGridPagination = ({
|
|
|
4106
4173
|
}
|
|
4107
4174
|
) }, page)
|
|
4108
4175
|
),
|
|
4109
|
-
/* @__PURE__ */
|
|
4176
|
+
/* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4110
4177
|
Button,
|
|
4111
4178
|
{
|
|
4112
4179
|
variant: "outline",
|
|
@@ -4114,10 +4181,10 @@ var DataGridPagination = ({
|
|
|
4114
4181
|
className: "h-8 w-8",
|
|
4115
4182
|
onClick: () => table.nextPage(),
|
|
4116
4183
|
disabled: !table.getCanNextPage(),
|
|
4117
|
-
children: /* @__PURE__ */
|
|
4184
|
+
children: /* @__PURE__ */ jsx34("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx34("path", { d: "M9 18l6-6-6-6" }) })
|
|
4118
4185
|
}
|
|
4119
4186
|
) }),
|
|
4120
|
-
/* @__PURE__ */
|
|
4187
|
+
/* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4121
4188
|
Button,
|
|
4122
4189
|
{
|
|
4123
4190
|
variant: "outline",
|
|
@@ -4125,7 +4192,7 @@ var DataGridPagination = ({
|
|
|
4125
4192
|
className: "h-8 w-8",
|
|
4126
4193
|
onClick: () => table.setPageIndex(pageCount - 1),
|
|
4127
4194
|
disabled: !table.getCanNextPage(),
|
|
4128
|
-
children: /* @__PURE__ */
|
|
4195
|
+
children: /* @__PURE__ */ jsx34("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx34("path", { d: "M13 17l5-5-5-5M6 17l5-5-5-5" }) })
|
|
4129
4196
|
}
|
|
4130
4197
|
) })
|
|
4131
4198
|
] }) })
|
|
@@ -4137,9 +4204,9 @@ var ExportDropdown = ({
|
|
|
4137
4204
|
columns,
|
|
4138
4205
|
fileName = "data-export"
|
|
4139
4206
|
}) => {
|
|
4140
|
-
const [open, setOpen] =
|
|
4141
|
-
const dropdownRef =
|
|
4142
|
-
|
|
4207
|
+
const [open, setOpen] = React34.useState(false);
|
|
4208
|
+
const dropdownRef = React34.useRef(null);
|
|
4209
|
+
React34.useEffect(() => {
|
|
4143
4210
|
const handleClickOutside = (event) => {
|
|
4144
4211
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
4145
4212
|
setOpen(false);
|
|
@@ -4149,14 +4216,19 @@ var ExportDropdown = ({
|
|
|
4149
4216
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
4150
4217
|
}, []);
|
|
4151
4218
|
const exportToCSV = () => {
|
|
4152
|
-
const visibleColumns = columns.filter((col) => !col.hide);
|
|
4219
|
+
const visibleColumns = columns.filter((col) => !col.hide && !col.disableExport && !col.hideExport);
|
|
4153
4220
|
const headers = visibleColumns.map((col) => col.headerName || col.field);
|
|
4154
4221
|
const csvRows = [headers.join(",")];
|
|
4155
4222
|
rows.forEach((row) => {
|
|
4156
4223
|
const values = visibleColumns.map((col) => {
|
|
4157
|
-
|
|
4224
|
+
let value;
|
|
4225
|
+
if (col.valueGetter) {
|
|
4226
|
+
value = col.valueGetter({ row, field: col.field });
|
|
4227
|
+
} else {
|
|
4228
|
+
value = row[col.field];
|
|
4229
|
+
}
|
|
4158
4230
|
const stringValue = String(value ?? "");
|
|
4159
|
-
if (stringValue.includes(",") || stringValue.includes('"')) {
|
|
4231
|
+
if (stringValue.includes(",") || stringValue.includes('"') || stringValue.includes("\n")) {
|
|
4160
4232
|
return `"${stringValue.replace(/"/g, '""')}"`;
|
|
4161
4233
|
}
|
|
4162
4234
|
return stringValue;
|
|
@@ -4172,32 +4244,14 @@ var ExportDropdown = ({
|
|
|
4172
4244
|
URL.revokeObjectURL(link.href);
|
|
4173
4245
|
setOpen(false);
|
|
4174
4246
|
};
|
|
4175
|
-
const exportToJSON = () => {
|
|
4176
|
-
const visibleColumns = columns.filter((col) => !col.hide);
|
|
4177
|
-
const data = rows.map((row) => {
|
|
4178
|
-
const obj = {};
|
|
4179
|
-
visibleColumns.forEach((col) => {
|
|
4180
|
-
obj[col.field] = row[col.field];
|
|
4181
|
-
});
|
|
4182
|
-
return obj;
|
|
4183
|
-
});
|
|
4184
|
-
const jsonContent = JSON.stringify(data, null, 2);
|
|
4185
|
-
const blob = new Blob([jsonContent], { type: "application/json" });
|
|
4186
|
-
const link = document.createElement("a");
|
|
4187
|
-
link.href = URL.createObjectURL(blob);
|
|
4188
|
-
link.download = `${fileName}.json`;
|
|
4189
|
-
link.click();
|
|
4190
|
-
URL.revokeObjectURL(link.href);
|
|
4191
|
-
setOpen(false);
|
|
4192
|
-
};
|
|
4193
4247
|
const handleCustomExport = () => {
|
|
4194
4248
|
if (onExport) {
|
|
4195
4249
|
onExport(rows, columns);
|
|
4196
4250
|
}
|
|
4197
4251
|
setOpen(false);
|
|
4198
4252
|
};
|
|
4199
|
-
return /* @__PURE__ */
|
|
4200
|
-
/* @__PURE__ */
|
|
4253
|
+
return /* @__PURE__ */ jsxs19("div", { className: "relative", ref: dropdownRef, children: [
|
|
4254
|
+
/* @__PURE__ */ jsxs19(
|
|
4201
4255
|
Button,
|
|
4202
4256
|
{
|
|
4203
4257
|
variant: "outline",
|
|
@@ -4205,53 +4259,39 @@ var ExportDropdown = ({
|
|
|
4205
4259
|
onClick: () => setOpen(!open),
|
|
4206
4260
|
className: "h-9 gap-2",
|
|
4207
4261
|
children: [
|
|
4208
|
-
/* @__PURE__ */
|
|
4209
|
-
/* @__PURE__ */
|
|
4210
|
-
/* @__PURE__ */
|
|
4211
|
-
/* @__PURE__ */
|
|
4262
|
+
/* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4263
|
+
/* @__PURE__ */ jsx34("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
4264
|
+
/* @__PURE__ */ jsx34("polyline", { points: "7 10 12 15 17 10" }),
|
|
4265
|
+
/* @__PURE__ */ jsx34("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
4212
4266
|
] }),
|
|
4213
4267
|
"Export"
|
|
4214
4268
|
]
|
|
4215
4269
|
}
|
|
4216
4270
|
),
|
|
4217
|
-
open && /* @__PURE__ */
|
|
4218
|
-
/* @__PURE__ */
|
|
4271
|
+
open && /* @__PURE__ */ jsxs19("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[140px] rounded-md border border-border bg-popover p-1 shadow-md", children: [
|
|
4272
|
+
/* @__PURE__ */ jsxs19(
|
|
4219
4273
|
"button",
|
|
4220
4274
|
{
|
|
4221
4275
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
4222
4276
|
onClick: exportToCSV,
|
|
4223
4277
|
children: [
|
|
4224
|
-
/* @__PURE__ */
|
|
4225
|
-
/* @__PURE__ */
|
|
4226
|
-
/* @__PURE__ */
|
|
4278
|
+
/* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4279
|
+
/* @__PURE__ */ jsx34("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
4280
|
+
/* @__PURE__ */ jsx34("polyline", { points: "14 2 14 8 20 8" })
|
|
4227
4281
|
] }),
|
|
4228
4282
|
"Export CSV"
|
|
4229
4283
|
]
|
|
4230
4284
|
}
|
|
4231
4285
|
),
|
|
4232
|
-
/* @__PURE__ */
|
|
4233
|
-
"button",
|
|
4234
|
-
{
|
|
4235
|
-
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
4236
|
-
onClick: exportToJSON,
|
|
4237
|
-
children: [
|
|
4238
|
-
/* @__PURE__ */ jsxs18("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4239
|
-
/* @__PURE__ */ jsx33("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
4240
|
-
/* @__PURE__ */ jsx33("polyline", { points: "14 2 14 8 20 8" })
|
|
4241
|
-
] }),
|
|
4242
|
-
"Export JSON"
|
|
4243
|
-
]
|
|
4244
|
-
}
|
|
4245
|
-
),
|
|
4246
|
-
onExport && /* @__PURE__ */ jsxs18(
|
|
4286
|
+
onExport && /* @__PURE__ */ jsxs19(
|
|
4247
4287
|
"button",
|
|
4248
4288
|
{
|
|
4249
4289
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
4250
4290
|
onClick: handleCustomExport,
|
|
4251
4291
|
children: [
|
|
4252
|
-
/* @__PURE__ */
|
|
4253
|
-
/* @__PURE__ */
|
|
4254
|
-
/* @__PURE__ */
|
|
4292
|
+
/* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4293
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "12", r: "3" }),
|
|
4294
|
+
/* @__PURE__ */ jsx34("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
4255
4295
|
] }),
|
|
4256
4296
|
"Custom Export"
|
|
4257
4297
|
]
|
|
@@ -4263,9 +4303,9 @@ var ExportDropdown = ({
|
|
|
4263
4303
|
var MoreOptionsDropdown = ({
|
|
4264
4304
|
options
|
|
4265
4305
|
}) => {
|
|
4266
|
-
const [open, setOpen] =
|
|
4267
|
-
const dropdownRef =
|
|
4268
|
-
|
|
4306
|
+
const [open, setOpen] = React34.useState(false);
|
|
4307
|
+
const dropdownRef = React34.useRef(null);
|
|
4308
|
+
React34.useEffect(() => {
|
|
4269
4309
|
const handleClickOutside = (event) => {
|
|
4270
4310
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
4271
4311
|
setOpen(false);
|
|
@@ -4275,22 +4315,22 @@ var MoreOptionsDropdown = ({
|
|
|
4275
4315
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
4276
4316
|
}, []);
|
|
4277
4317
|
if (options.length === 0) return null;
|
|
4278
|
-
return /* @__PURE__ */
|
|
4279
|
-
/* @__PURE__ */
|
|
4318
|
+
return /* @__PURE__ */ jsxs19("div", { className: "relative", ref: dropdownRef, children: [
|
|
4319
|
+
/* @__PURE__ */ jsx34(
|
|
4280
4320
|
Button,
|
|
4281
4321
|
{
|
|
4282
4322
|
variant: "outline",
|
|
4283
4323
|
size: "icon",
|
|
4284
4324
|
onClick: () => setOpen(!open),
|
|
4285
4325
|
className: "h-9 w-9",
|
|
4286
|
-
children: /* @__PURE__ */
|
|
4287
|
-
/* @__PURE__ */
|
|
4288
|
-
/* @__PURE__ */
|
|
4289
|
-
/* @__PURE__ */
|
|
4326
|
+
children: /* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4327
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "12", r: "1" }),
|
|
4328
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "5", r: "1" }),
|
|
4329
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "19", r: "1" })
|
|
4290
4330
|
] })
|
|
4291
4331
|
}
|
|
4292
4332
|
),
|
|
4293
|
-
open && /* @__PURE__ */
|
|
4333
|
+
open && /* @__PURE__ */ jsx34("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] rounded-md border border-border bg-popover p-1 shadow-md", children: options.map((option, index) => /* @__PURE__ */ jsxs19(
|
|
4294
4334
|
"button",
|
|
4295
4335
|
{
|
|
4296
4336
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
@@ -4322,10 +4362,10 @@ var DataGridToolbar = ({
|
|
|
4322
4362
|
customButtons,
|
|
4323
4363
|
moreOptions = []
|
|
4324
4364
|
}) => {
|
|
4325
|
-
return /* @__PURE__ */
|
|
4326
|
-
title && /* @__PURE__ */
|
|
4327
|
-
/* @__PURE__ */
|
|
4328
|
-
showQuickFilter && /* @__PURE__ */
|
|
4365
|
+
return /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between px-4 py-3 border-b border-border bg-background", children: [
|
|
4366
|
+
title && /* @__PURE__ */ jsx34("h3", { className: "text-lg font-semibold text-foreground", children: title }),
|
|
4367
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
4368
|
+
showQuickFilter && /* @__PURE__ */ jsx34(
|
|
4329
4369
|
Input,
|
|
4330
4370
|
{
|
|
4331
4371
|
placeholder: "Search...",
|
|
@@ -4334,8 +4374,8 @@ var DataGridToolbar = ({
|
|
|
4334
4374
|
className: "h-9 w-64"
|
|
4335
4375
|
}
|
|
4336
4376
|
),
|
|
4337
|
-
showColumnSelector && /* @__PURE__ */
|
|
4338
|
-
showExport && /* @__PURE__ */
|
|
4377
|
+
showColumnSelector && /* @__PURE__ */ jsx34(ColumnVisibilityDropdown, { table }),
|
|
4378
|
+
showExport && /* @__PURE__ */ jsx34(
|
|
4339
4379
|
ExportDropdown,
|
|
4340
4380
|
{
|
|
4341
4381
|
onExport,
|
|
@@ -4345,7 +4385,7 @@ var DataGridToolbar = ({
|
|
|
4345
4385
|
}
|
|
4346
4386
|
),
|
|
4347
4387
|
customButtons,
|
|
4348
|
-
moreOptions.length > 0 && /* @__PURE__ */
|
|
4388
|
+
moreOptions.length > 0 && /* @__PURE__ */ jsx34(MoreOptionsDropdown, { options: moreOptions })
|
|
4349
4389
|
] })
|
|
4350
4390
|
] });
|
|
4351
4391
|
};
|
|
@@ -4362,7 +4402,7 @@ var RowRenderer = ({
|
|
|
4362
4402
|
columnWidths
|
|
4363
4403
|
}) => {
|
|
4364
4404
|
const customClassName = getRowClassName?.({ row: row.original, rowIndex });
|
|
4365
|
-
return /* @__PURE__ */
|
|
4405
|
+
return /* @__PURE__ */ jsx34(
|
|
4366
4406
|
"tr",
|
|
4367
4407
|
{
|
|
4368
4408
|
className: cn(
|
|
@@ -4384,7 +4424,7 @@ var RowRenderer = ({
|
|
|
4384
4424
|
const cellClassName = meta?.cellClassName;
|
|
4385
4425
|
const colWidth = columnWidths.get(cell.column.id);
|
|
4386
4426
|
const width = colWidth?.width || cell.column.getSize();
|
|
4387
|
-
return /* @__PURE__ */
|
|
4427
|
+
return /* @__PURE__ */ jsx34(
|
|
4388
4428
|
"td",
|
|
4389
4429
|
{
|
|
4390
4430
|
className: cn(
|
|
@@ -4399,7 +4439,7 @@ var RowRenderer = ({
|
|
|
4399
4439
|
maxWidth: colWidth?.maxWidth || width,
|
|
4400
4440
|
minWidth: colWidth?.minWidth || cell.column.columnDef.minSize
|
|
4401
4441
|
},
|
|
4402
|
-
children: /* @__PURE__ */
|
|
4442
|
+
children: /* @__PURE__ */ jsx34(
|
|
4403
4443
|
"div",
|
|
4404
4444
|
{
|
|
4405
4445
|
className: cn(
|
|
@@ -4442,7 +4482,7 @@ var VirtualizedTableBody = ({
|
|
|
4442
4482
|
});
|
|
4443
4483
|
const virtualRows = virtualizer.getVirtualItems();
|
|
4444
4484
|
if (rows.length === 0) {
|
|
4445
|
-
return /* @__PURE__ */
|
|
4485
|
+
return /* @__PURE__ */ jsx34("tbody", { children: /* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34(
|
|
4446
4486
|
"td",
|
|
4447
4487
|
{
|
|
4448
4488
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4453,8 +4493,8 @@ var VirtualizedTableBody = ({
|
|
|
4453
4493
|
}
|
|
4454
4494
|
const paddingTop = virtualRows.length > 0 ? virtualRows[0].start : 0;
|
|
4455
4495
|
const paddingBottom = virtualRows.length > 0 ? virtualizer.getTotalSize() - virtualRows[virtualRows.length - 1].end : 0;
|
|
4456
|
-
return /* @__PURE__ */
|
|
4457
|
-
paddingTop > 0 && /* @__PURE__ */
|
|
4496
|
+
return /* @__PURE__ */ jsxs19("tbody", { children: [
|
|
4497
|
+
paddingTop > 0 && /* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34(
|
|
4458
4498
|
"td",
|
|
4459
4499
|
{
|
|
4460
4500
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4463,7 +4503,7 @@ var VirtualizedTableBody = ({
|
|
|
4463
4503
|
) }),
|
|
4464
4504
|
virtualRows.map((virtualRow) => {
|
|
4465
4505
|
const row = rows[virtualRow.index];
|
|
4466
|
-
return /* @__PURE__ */
|
|
4506
|
+
return /* @__PURE__ */ jsx34(
|
|
4467
4507
|
RowRenderer,
|
|
4468
4508
|
{
|
|
4469
4509
|
row,
|
|
@@ -4479,7 +4519,7 @@ var VirtualizedTableBody = ({
|
|
|
4479
4519
|
row.id
|
|
4480
4520
|
);
|
|
4481
4521
|
}),
|
|
4482
|
-
paddingBottom > 0 && /* @__PURE__ */
|
|
4522
|
+
paddingBottom > 0 && /* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34(
|
|
4483
4523
|
"td",
|
|
4484
4524
|
{
|
|
4485
4525
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4500,7 +4540,7 @@ var StandardTableBody = ({
|
|
|
4500
4540
|
}) => {
|
|
4501
4541
|
const rows = table.getRowModel().rows;
|
|
4502
4542
|
if (rows.length === 0) {
|
|
4503
|
-
return /* @__PURE__ */
|
|
4543
|
+
return /* @__PURE__ */ jsx34("tbody", { children: /* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34(
|
|
4504
4544
|
"td",
|
|
4505
4545
|
{
|
|
4506
4546
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4509,7 +4549,7 @@ var StandardTableBody = ({
|
|
|
4509
4549
|
}
|
|
4510
4550
|
) }) });
|
|
4511
4551
|
}
|
|
4512
|
-
return /* @__PURE__ */
|
|
4552
|
+
return /* @__PURE__ */ jsx34("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx34(
|
|
4513
4553
|
RowRenderer,
|
|
4514
4554
|
{
|
|
4515
4555
|
row,
|
|
@@ -4544,6 +4584,8 @@ function DataGrid({
|
|
|
4544
4584
|
rowCount,
|
|
4545
4585
|
pageSizeOptions = [10, 25, 50, 100],
|
|
4546
4586
|
sortingMode = "client",
|
|
4587
|
+
initialSortModel,
|
|
4588
|
+
sortLatestFirst = false,
|
|
4547
4589
|
filterMode = "client",
|
|
4548
4590
|
height = 400,
|
|
4549
4591
|
minHeight,
|
|
@@ -4567,22 +4609,31 @@ function DataGrid({
|
|
|
4567
4609
|
resizableColumns = false,
|
|
4568
4610
|
onColumnResize
|
|
4569
4611
|
}) {
|
|
4570
|
-
const tableContainerRef =
|
|
4571
|
-
const
|
|
4572
|
-
|
|
4573
|
-
|
|
4612
|
+
const tableContainerRef = React34.useRef(null);
|
|
4613
|
+
const computedInitialSort = React34.useMemo(() => {
|
|
4614
|
+
if (initialSortModel && initialSortModel.length > 0) {
|
|
4615
|
+
return initialSortModel.map((s) => ({ id: s.field, desc: s.sort === "desc" }));
|
|
4616
|
+
}
|
|
4617
|
+
if (sortLatestFirst) {
|
|
4618
|
+
return [{ id: "createdAt", desc: true }];
|
|
4619
|
+
}
|
|
4620
|
+
return [];
|
|
4621
|
+
}, []);
|
|
4622
|
+
const [sorting, setSorting] = React34.useState(computedInitialSort);
|
|
4623
|
+
const [globalFilter, setGlobalFilter] = React34.useState("");
|
|
4624
|
+
const [rowSelection, setRowSelection] = React34.useState(
|
|
4574
4625
|
rowSelectionModel || {}
|
|
4575
4626
|
);
|
|
4576
|
-
const [pagination, setPagination] =
|
|
4627
|
+
const [pagination, setPagination] = React34.useState({
|
|
4577
4628
|
pageIndex: paginationModel?.page || 0,
|
|
4578
4629
|
pageSize: paginationModel?.pageSize || 10
|
|
4579
4630
|
});
|
|
4580
|
-
const [columnVisibility, setColumnVisibility] =
|
|
4631
|
+
const [columnVisibility, setColumnVisibility] = React34.useState(
|
|
4581
4632
|
columnVisibilityModel || {}
|
|
4582
4633
|
);
|
|
4583
|
-
const [containerWidth, setContainerWidth] =
|
|
4584
|
-
const [columnSizing, setColumnSizing] =
|
|
4585
|
-
|
|
4634
|
+
const [containerWidth, setContainerWidth] = React34.useState(0);
|
|
4635
|
+
const [columnSizing, setColumnSizing] = React34.useState({});
|
|
4636
|
+
React34.useEffect(() => {
|
|
4586
4637
|
const container = tableContainerRef.current;
|
|
4587
4638
|
if (!container) return;
|
|
4588
4639
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -4595,11 +4646,11 @@ function DataGrid({
|
|
|
4595
4646
|
return () => resizeObserver.disconnect();
|
|
4596
4647
|
}, []);
|
|
4597
4648
|
const columnWidths = useColumnWidths(columns, containerWidth, checkboxSelection, columnSizing);
|
|
4598
|
-
const tanstackColumns =
|
|
4649
|
+
const tanstackColumns = React34.useMemo(
|
|
4599
4650
|
() => convertColumns(columns, checkboxSelection),
|
|
4600
4651
|
[columns, checkboxSelection]
|
|
4601
4652
|
);
|
|
4602
|
-
|
|
4653
|
+
React34.useEffect(() => {
|
|
4603
4654
|
if (paginationModel) {
|
|
4604
4655
|
setPagination({
|
|
4605
4656
|
pageIndex: paginationModel.page,
|
|
@@ -4607,12 +4658,12 @@ function DataGrid({
|
|
|
4607
4658
|
});
|
|
4608
4659
|
}
|
|
4609
4660
|
}, [paginationModel?.page, paginationModel?.pageSize]);
|
|
4610
|
-
|
|
4661
|
+
React34.useEffect(() => {
|
|
4611
4662
|
if (rowSelectionModel) {
|
|
4612
4663
|
setRowSelection(rowSelectionModel);
|
|
4613
4664
|
}
|
|
4614
4665
|
}, [rowSelectionModel]);
|
|
4615
|
-
|
|
4666
|
+
React34.useEffect(() => {
|
|
4616
4667
|
if (columnVisibilityModel) {
|
|
4617
4668
|
setColumnVisibility(columnVisibilityModel);
|
|
4618
4669
|
}
|
|
@@ -4685,7 +4736,7 @@ function DataGrid({
|
|
|
4685
4736
|
if (minHeight) containerStyle.minHeight = minHeight;
|
|
4686
4737
|
if (maxHeight) containerStyle.maxHeight = maxHeight;
|
|
4687
4738
|
}
|
|
4688
|
-
return /* @__PURE__ */
|
|
4739
|
+
return /* @__PURE__ */ jsxs19(
|
|
4689
4740
|
"div",
|
|
4690
4741
|
{
|
|
4691
4742
|
className: cn(
|
|
@@ -4694,7 +4745,7 @@ function DataGrid({
|
|
|
4694
4745
|
),
|
|
4695
4746
|
style: containerStyle,
|
|
4696
4747
|
children: [
|
|
4697
|
-
toolBar && /* @__PURE__ */
|
|
4748
|
+
toolBar && /* @__PURE__ */ jsx34(
|
|
4698
4749
|
DataGridToolbar,
|
|
4699
4750
|
{
|
|
4700
4751
|
title,
|
|
@@ -4712,17 +4763,17 @@ function DataGrid({
|
|
|
4712
4763
|
moreOptions
|
|
4713
4764
|
}
|
|
4714
4765
|
),
|
|
4715
|
-
/* @__PURE__ */
|
|
4766
|
+
/* @__PURE__ */ jsxs19(
|
|
4716
4767
|
"div",
|
|
4717
4768
|
{
|
|
4718
4769
|
ref: tableContainerRef,
|
|
4719
4770
|
className: "relative flex-1 overflow-auto",
|
|
4720
4771
|
children: [
|
|
4721
|
-
loading && /* @__PURE__ */
|
|
4722
|
-
/* @__PURE__ */
|
|
4723
|
-
/* @__PURE__ */
|
|
4772
|
+
loading && /* @__PURE__ */ jsx34("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center z-10", children: /* @__PURE__ */ jsx34(Spinner, { size: "lg" }) }),
|
|
4773
|
+
/* @__PURE__ */ jsxs19("table", { className: "w-full border-collapse table-fixed", children: [
|
|
4774
|
+
/* @__PURE__ */ jsx34("colgroup", { children: table.getVisibleLeafColumns().map((column) => {
|
|
4724
4775
|
const colWidth = columnWidths.get(column.id);
|
|
4725
|
-
return /* @__PURE__ */
|
|
4776
|
+
return /* @__PURE__ */ jsx34(
|
|
4726
4777
|
"col",
|
|
4727
4778
|
{
|
|
4728
4779
|
style: {
|
|
@@ -4734,12 +4785,12 @@ function DataGrid({
|
|
|
4734
4785
|
column.id
|
|
4735
4786
|
);
|
|
4736
4787
|
}) }),
|
|
4737
|
-
/* @__PURE__ */
|
|
4788
|
+
/* @__PURE__ */ jsx34("thead", { className: "sticky top-0 z-[1]", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx34("tr", { className: "bg-muted", children: headerGroup.headers.map((header) => {
|
|
4738
4789
|
const meta = header.column.columnDef.meta;
|
|
4739
4790
|
const align = meta?.headerAlign || meta?.align || "left";
|
|
4740
4791
|
const colWidth = columnWidths.get(header.column.id);
|
|
4741
4792
|
const effectiveWidth = colWidth?.width || header.getSize();
|
|
4742
|
-
return /* @__PURE__ */
|
|
4793
|
+
return /* @__PURE__ */ jsxs19(
|
|
4743
4794
|
"th",
|
|
4744
4795
|
{
|
|
4745
4796
|
className: cn(
|
|
@@ -4758,15 +4809,15 @@ function DataGrid({
|
|
|
4758
4809
|
},
|
|
4759
4810
|
onClick: header.column.getToggleSortingHandler(),
|
|
4760
4811
|
children: [
|
|
4761
|
-
/* @__PURE__ */
|
|
4812
|
+
/* @__PURE__ */ jsxs19("div", { className: cn(
|
|
4762
4813
|
"flex items-center gap-1 truncate",
|
|
4763
4814
|
align === "center" && "justify-center",
|
|
4764
4815
|
align === "right" && "justify-end"
|
|
4765
4816
|
), children: [
|
|
4766
4817
|
header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()),
|
|
4767
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
4818
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx34(SortIcon, { direction: header.column.getIsSorted() })
|
|
4768
4819
|
] }),
|
|
4769
|
-
resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */
|
|
4820
|
+
resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */ jsx34(
|
|
4770
4821
|
ColumnResizeHandle,
|
|
4771
4822
|
{
|
|
4772
4823
|
header,
|
|
@@ -4778,7 +4829,7 @@ function DataGrid({
|
|
|
4778
4829
|
header.id
|
|
4779
4830
|
);
|
|
4780
4831
|
}) }, headerGroup.id)) }),
|
|
4781
|
-
virtualized ? /* @__PURE__ */
|
|
4832
|
+
virtualized ? /* @__PURE__ */ jsx34(
|
|
4782
4833
|
VirtualizedTableBody,
|
|
4783
4834
|
{
|
|
4784
4835
|
table,
|
|
@@ -4792,7 +4843,7 @@ function DataGrid({
|
|
|
4792
4843
|
globalWrapText: wrapText,
|
|
4793
4844
|
columnWidths
|
|
4794
4845
|
}
|
|
4795
|
-
) : /* @__PURE__ */
|
|
4846
|
+
) : /* @__PURE__ */ jsx34(
|
|
4796
4847
|
StandardTableBody,
|
|
4797
4848
|
{
|
|
4798
4849
|
table,
|
|
@@ -4809,7 +4860,7 @@ function DataGrid({
|
|
|
4809
4860
|
]
|
|
4810
4861
|
}
|
|
4811
4862
|
),
|
|
4812
|
-
!virtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */
|
|
4863
|
+
!virtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */ jsx34(
|
|
4813
4864
|
DataGridPagination,
|
|
4814
4865
|
{
|
|
4815
4866
|
table,
|
|
@@ -4818,7 +4869,7 @@ function DataGrid({
|
|
|
4818
4869
|
paginationMode
|
|
4819
4870
|
}
|
|
4820
4871
|
),
|
|
4821
|
-
virtualized && !hideFooter && /* @__PURE__ */
|
|
4872
|
+
virtualized && !hideFooter && /* @__PURE__ */ jsx34("div", { className: "flex items-center justify-end gap-4 px-4 py-3 border-t border-border bg-background", children: /* @__PURE__ */ jsxs19("span", { className: "text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
4822
4873
|
table.getFilteredRowModel().rows.length,
|
|
4823
4874
|
" total rows (virtualized)"
|
|
4824
4875
|
] }) })
|
|
@@ -4829,10 +4880,10 @@ function DataGrid({
|
|
|
4829
4880
|
DataGrid.displayName = "DataGrid";
|
|
4830
4881
|
|
|
4831
4882
|
// src/components/list.tsx
|
|
4832
|
-
import * as
|
|
4833
|
-
import { jsx as
|
|
4834
|
-
var List2 =
|
|
4835
|
-
({ dividers = false, dense = false, clickable = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4883
|
+
import * as React35 from "react";
|
|
4884
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4885
|
+
var List2 = React35.forwardRef(
|
|
4886
|
+
({ dividers = false, dense = false, clickable = false, className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4836
4887
|
"ul",
|
|
4837
4888
|
{
|
|
4838
4889
|
ref,
|
|
@@ -4846,7 +4897,7 @@ var List2 = React34.forwardRef(
|
|
|
4846
4897
|
)
|
|
4847
4898
|
);
|
|
4848
4899
|
List2.displayName = "List";
|
|
4849
|
-
var ListItem =
|
|
4900
|
+
var ListItem = React35.forwardRef(
|
|
4850
4901
|
({
|
|
4851
4902
|
selected = false,
|
|
4852
4903
|
disabled = false,
|
|
@@ -4857,7 +4908,7 @@ var ListItem = React34.forwardRef(
|
|
|
4857
4908
|
className,
|
|
4858
4909
|
children,
|
|
4859
4910
|
...props
|
|
4860
|
-
}, ref) => /* @__PURE__ */
|
|
4911
|
+
}, ref) => /* @__PURE__ */ jsxs20(
|
|
4861
4912
|
"li",
|
|
4862
4913
|
{
|
|
4863
4914
|
ref,
|
|
@@ -4882,18 +4933,18 @@ var ListItem = React34.forwardRef(
|
|
|
4882
4933
|
),
|
|
4883
4934
|
...props,
|
|
4884
4935
|
children: [
|
|
4885
|
-
leading && /* @__PURE__ */
|
|
4886
|
-
/* @__PURE__ */
|
|
4887
|
-
trailing && /* @__PURE__ */
|
|
4888
|
-
secondaryAction && /* @__PURE__ */
|
|
4936
|
+
leading && /* @__PURE__ */ jsx35("div", { className: "shrink-0", children: leading }),
|
|
4937
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", children }),
|
|
4938
|
+
trailing && /* @__PURE__ */ jsx35("div", { className: "shrink-0", children: trailing }),
|
|
4939
|
+
secondaryAction && /* @__PURE__ */ jsx35("div", { className: "shrink-0 ml-2", children: secondaryAction })
|
|
4889
4940
|
]
|
|
4890
4941
|
}
|
|
4891
4942
|
)
|
|
4892
4943
|
);
|
|
4893
4944
|
ListItem.displayName = "ListItem";
|
|
4894
|
-
var ListItemText =
|
|
4895
|
-
({ primary, secondary, noWrap = false, className, children, ...props }, ref) => /* @__PURE__ */
|
|
4896
|
-
primary && /* @__PURE__ */
|
|
4945
|
+
var ListItemText = React35.forwardRef(
|
|
4946
|
+
({ primary, secondary, noWrap = false, className, children, ...props }, ref) => /* @__PURE__ */ jsxs20("div", { ref, className: cn("min-w-0", className), ...props, children: [
|
|
4947
|
+
primary && /* @__PURE__ */ jsx35(
|
|
4897
4948
|
"div",
|
|
4898
4949
|
{
|
|
4899
4950
|
className: cn(
|
|
@@ -4903,7 +4954,7 @@ var ListItemText = React34.forwardRef(
|
|
|
4903
4954
|
children: primary
|
|
4904
4955
|
}
|
|
4905
4956
|
),
|
|
4906
|
-
secondary && /* @__PURE__ */
|
|
4957
|
+
secondary && /* @__PURE__ */ jsx35(
|
|
4907
4958
|
"div",
|
|
4908
4959
|
{
|
|
4909
4960
|
className: cn(
|
|
@@ -4917,8 +4968,8 @@ var ListItemText = React34.forwardRef(
|
|
|
4917
4968
|
] })
|
|
4918
4969
|
);
|
|
4919
4970
|
ListItemText.displayName = "ListItemText";
|
|
4920
|
-
var ListItemIcon =
|
|
4921
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4971
|
+
var ListItemIcon = React35.forwardRef(
|
|
4972
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4922
4973
|
"div",
|
|
4923
4974
|
{
|
|
4924
4975
|
ref,
|
|
@@ -4928,12 +4979,12 @@ var ListItemIcon = React34.forwardRef(
|
|
|
4928
4979
|
)
|
|
4929
4980
|
);
|
|
4930
4981
|
ListItemIcon.displayName = "ListItemIcon";
|
|
4931
|
-
var ListItemAvatar =
|
|
4932
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4982
|
+
var ListItemAvatar = React35.forwardRef(
|
|
4983
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx35("div", { ref, className: cn("shrink-0", className), ...props })
|
|
4933
4984
|
);
|
|
4934
4985
|
ListItemAvatar.displayName = "ListItemAvatar";
|
|
4935
|
-
var ListSubheader =
|
|
4936
|
-
({ sticky = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4986
|
+
var ListSubheader = React35.forwardRef(
|
|
4987
|
+
({ sticky = false, className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4937
4988
|
"li",
|
|
4938
4989
|
{
|
|
4939
4990
|
ref,
|
|
@@ -4948,8 +4999,8 @@ var ListSubheader = React34.forwardRef(
|
|
|
4948
4999
|
)
|
|
4949
5000
|
);
|
|
4950
5001
|
ListSubheader.displayName = "ListSubheader";
|
|
4951
|
-
var ListDivider =
|
|
4952
|
-
({ inset = false, className, ...props }, ref) => /* @__PURE__ */
|
|
5002
|
+
var ListDivider = React35.forwardRef(
|
|
5003
|
+
({ inset = false, className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4953
5004
|
"li",
|
|
4954
5005
|
{
|
|
4955
5006
|
ref,
|
|
@@ -4992,7 +5043,7 @@ import {
|
|
|
4992
5043
|
LabelList
|
|
4993
5044
|
} from "recharts";
|
|
4994
5045
|
import { accentColors as accentColors2 } from "@onesaz/tokens";
|
|
4995
|
-
import { Fragment as Fragment5, jsx as
|
|
5046
|
+
import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4996
5047
|
var BarChart = ({
|
|
4997
5048
|
data,
|
|
4998
5049
|
dataKey,
|
|
@@ -5025,7 +5076,7 @@ var BarChart = ({
|
|
|
5025
5076
|
accentColors2[accentColor][1]
|
|
5026
5077
|
];
|
|
5027
5078
|
const chartColors = colors || defaultColors;
|
|
5028
|
-
const bars = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */
|
|
5079
|
+
const bars = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */ jsx36(
|
|
5029
5080
|
Bar,
|
|
5030
5081
|
{
|
|
5031
5082
|
dataKey: keyConfig.dataKey,
|
|
@@ -5034,7 +5085,7 @@ var BarChart = ({
|
|
|
5034
5085
|
radius: barProps.radius,
|
|
5035
5086
|
maxBarSize: barProps.maxBarSize,
|
|
5036
5087
|
minPointSize: barProps.minPointSize,
|
|
5037
|
-
children: labelList && /* @__PURE__ */
|
|
5088
|
+
children: labelList && /* @__PURE__ */ jsx36(
|
|
5038
5089
|
LabelList,
|
|
5039
5090
|
{
|
|
5040
5091
|
dataKey: labelList.dataKey || keyConfig.dataKey,
|
|
@@ -5045,7 +5096,7 @@ var BarChart = ({
|
|
|
5045
5096
|
)
|
|
5046
5097
|
},
|
|
5047
5098
|
keyConfig.dataKey
|
|
5048
|
-
)) : /* @__PURE__ */
|
|
5099
|
+
)) : /* @__PURE__ */ jsxs21(
|
|
5049
5100
|
Bar,
|
|
5050
5101
|
{
|
|
5051
5102
|
dataKey,
|
|
@@ -5055,7 +5106,7 @@ var BarChart = ({
|
|
|
5055
5106
|
maxBarSize: barProps.maxBarSize,
|
|
5056
5107
|
minPointSize: barProps.minPointSize,
|
|
5057
5108
|
children: [
|
|
5058
|
-
labelList && /* @__PURE__ */
|
|
5109
|
+
labelList && /* @__PURE__ */ jsx36(
|
|
5059
5110
|
LabelList,
|
|
5060
5111
|
{
|
|
5061
5112
|
dataKey: labelList.dataKey || dataKey,
|
|
@@ -5064,7 +5115,7 @@ var BarChart = ({
|
|
|
5064
5115
|
formatter: labelList.formatter
|
|
5065
5116
|
}
|
|
5066
5117
|
),
|
|
5067
|
-
data.map((_entry, index) => /* @__PURE__ */
|
|
5118
|
+
data.map((_entry, index) => /* @__PURE__ */ jsx36(
|
|
5068
5119
|
Cell,
|
|
5069
5120
|
{
|
|
5070
5121
|
fill: chartColors[index % chartColors.length]
|
|
@@ -5074,7 +5125,7 @@ var BarChart = ({
|
|
|
5074
5125
|
]
|
|
5075
5126
|
}
|
|
5076
5127
|
);
|
|
5077
|
-
const customTooltip = tooltip ? /* @__PURE__ */
|
|
5128
|
+
const customTooltip = tooltip ? /* @__PURE__ */ jsx36(
|
|
5078
5129
|
Tooltip2,
|
|
5079
5130
|
{
|
|
5080
5131
|
formatter: tooltip.formatter,
|
|
@@ -5082,8 +5133,8 @@ var BarChart = ({
|
|
|
5082
5133
|
labelStyle: tooltip.labelStyle,
|
|
5083
5134
|
contentStyle: tooltip.contentStyle
|
|
5084
5135
|
}
|
|
5085
|
-
) : showTooltip ? /* @__PURE__ */
|
|
5086
|
-
return /* @__PURE__ */
|
|
5136
|
+
) : showTooltip ? /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }) : null;
|
|
5137
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(
|
|
5087
5138
|
RechartsBarChart,
|
|
5088
5139
|
{
|
|
5089
5140
|
data,
|
|
@@ -5091,8 +5142,8 @@ var BarChart = ({
|
|
|
5091
5142
|
barCategoryGap: barProps.barCategoryGap,
|
|
5092
5143
|
barGap: barProps.barGap,
|
|
5093
5144
|
children: [
|
|
5094
|
-
showGrid && /* @__PURE__ */
|
|
5095
|
-
xAxis && !xAxis.hide && /* @__PURE__ */
|
|
5145
|
+
showGrid && /* @__PURE__ */ jsx36(CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--muted-foreground))", opacity: 0.3 }),
|
|
5146
|
+
xAxis && !xAxis.hide && /* @__PURE__ */ jsx36(
|
|
5096
5147
|
XAxis,
|
|
5097
5148
|
{
|
|
5098
5149
|
dataKey: xAxis.dataKey,
|
|
@@ -5106,7 +5157,7 @@ var BarChart = ({
|
|
|
5106
5157
|
label: xAxis.label ? { value: xAxis.label, position: "insideBottom", offset: -5 } : void 0
|
|
5107
5158
|
}
|
|
5108
5159
|
),
|
|
5109
|
-
yAxis && !yAxis.hide && /* @__PURE__ */
|
|
5160
|
+
yAxis && !yAxis.hide && /* @__PURE__ */ jsx36(
|
|
5110
5161
|
YAxis,
|
|
5111
5162
|
{
|
|
5112
5163
|
type: yAxis.type,
|
|
@@ -5117,7 +5168,7 @@ var BarChart = ({
|
|
|
5117
5168
|
}
|
|
5118
5169
|
),
|
|
5119
5170
|
customTooltip,
|
|
5120
|
-
showLegend && /* @__PURE__ */
|
|
5171
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {}),
|
|
5121
5172
|
bars
|
|
5122
5173
|
]
|
|
5123
5174
|
}
|
|
@@ -5150,7 +5201,7 @@ var LineChart = ({
|
|
|
5150
5201
|
accentColors2[accentColor][12],
|
|
5151
5202
|
accentColors2[accentColor][1]
|
|
5152
5203
|
];
|
|
5153
|
-
const lines = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */
|
|
5204
|
+
const lines = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */ jsx36(
|
|
5154
5205
|
Line,
|
|
5155
5206
|
{
|
|
5156
5207
|
type: "monotone",
|
|
@@ -5160,7 +5211,7 @@ var LineChart = ({
|
|
|
5160
5211
|
name: keyConfig.name || keyConfig.dataKey
|
|
5161
5212
|
},
|
|
5162
5213
|
keyConfig.dataKey
|
|
5163
|
-
)) : /* @__PURE__ */
|
|
5214
|
+
)) : /* @__PURE__ */ jsx36(
|
|
5164
5215
|
Line,
|
|
5165
5216
|
{
|
|
5166
5217
|
type: "monotone",
|
|
@@ -5170,9 +5221,9 @@ var LineChart = ({
|
|
|
5170
5221
|
name: name || dataKey
|
|
5171
5222
|
}
|
|
5172
5223
|
);
|
|
5173
|
-
return /* @__PURE__ */
|
|
5174
|
-
showGrid && /* @__PURE__ */
|
|
5175
|
-
xAxis && !xAxis.hide && /* @__PURE__ */
|
|
5224
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsLineChart, { data, margin, children: [
|
|
5225
|
+
showGrid && /* @__PURE__ */ jsx36(CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--muted-foreground))", opacity: 0.3 }),
|
|
5226
|
+
xAxis && !xAxis.hide && /* @__PURE__ */ jsx36(
|
|
5176
5227
|
XAxis,
|
|
5177
5228
|
{
|
|
5178
5229
|
dataKey: xAxis.dataKey,
|
|
@@ -5182,7 +5233,7 @@ var LineChart = ({
|
|
|
5182
5233
|
label: xAxis.label ? { value: xAxis.label, position: "insideBottom", offset: -5 } : void 0
|
|
5183
5234
|
}
|
|
5184
5235
|
),
|
|
5185
|
-
yAxis && !yAxis.hide && /* @__PURE__ */
|
|
5236
|
+
yAxis && !yAxis.hide && /* @__PURE__ */ jsx36(
|
|
5186
5237
|
YAxis,
|
|
5187
5238
|
{
|
|
5188
5239
|
type: yAxis.type,
|
|
@@ -5191,8 +5242,8 @@ var LineChart = ({
|
|
|
5191
5242
|
label: yAxis.label ? { value: yAxis.label, angle: -90, position: "insideLeft" } : void 0
|
|
5192
5243
|
}
|
|
5193
5244
|
),
|
|
5194
|
-
showTooltip && /* @__PURE__ */
|
|
5195
|
-
showLegend && /* @__PURE__ */
|
|
5245
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5246
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {}),
|
|
5196
5247
|
lines
|
|
5197
5248
|
] }) }) });
|
|
5198
5249
|
};
|
|
@@ -5223,8 +5274,8 @@ var PieChart = ({
|
|
|
5223
5274
|
accentColors2[accentColor][1]
|
|
5224
5275
|
];
|
|
5225
5276
|
const chartColors = colors || defaultColors;
|
|
5226
|
-
return /* @__PURE__ */
|
|
5227
|
-
/* @__PURE__ */
|
|
5277
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsPieChart, { children: [
|
|
5278
|
+
/* @__PURE__ */ jsx36(
|
|
5228
5279
|
Pie,
|
|
5229
5280
|
{
|
|
5230
5281
|
data,
|
|
@@ -5235,11 +5286,11 @@ var PieChart = ({
|
|
|
5235
5286
|
fill: "#8884d8",
|
|
5236
5287
|
dataKey,
|
|
5237
5288
|
nameKey,
|
|
5238
|
-
children: data.map((_entry, index) => /* @__PURE__ */
|
|
5289
|
+
children: data.map((_entry, index) => /* @__PURE__ */ jsx36(Cell, { fill: chartColors[index % chartColors.length] }, `cell-${index}`))
|
|
5239
5290
|
}
|
|
5240
5291
|
),
|
|
5241
|
-
showTooltip && /* @__PURE__ */
|
|
5242
|
-
showLegend && /* @__PURE__ */
|
|
5292
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5293
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {})
|
|
5243
5294
|
] }) }) });
|
|
5244
5295
|
};
|
|
5245
5296
|
var AreaChart = ({
|
|
@@ -5271,7 +5322,7 @@ var AreaChart = ({
|
|
|
5271
5322
|
accentColors2[accentColor][12],
|
|
5272
5323
|
accentColors2[accentColor][1]
|
|
5273
5324
|
];
|
|
5274
|
-
const areas = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */
|
|
5325
|
+
const areas = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */ jsx36(
|
|
5275
5326
|
Area,
|
|
5276
5327
|
{
|
|
5277
5328
|
type: "monotone",
|
|
@@ -5282,7 +5333,7 @@ var AreaChart = ({
|
|
|
5282
5333
|
name: keyConfig.name || keyConfig.dataKey
|
|
5283
5334
|
},
|
|
5284
5335
|
keyConfig.dataKey
|
|
5285
|
-
)) : /* @__PURE__ */
|
|
5336
|
+
)) : /* @__PURE__ */ jsx36(
|
|
5286
5337
|
Area,
|
|
5287
5338
|
{
|
|
5288
5339
|
type: "monotone",
|
|
@@ -5292,9 +5343,9 @@ var AreaChart = ({
|
|
|
5292
5343
|
name: name || dataKey
|
|
5293
5344
|
}
|
|
5294
5345
|
);
|
|
5295
|
-
return /* @__PURE__ */
|
|
5296
|
-
showGrid && /* @__PURE__ */
|
|
5297
|
-
xAxis && !xAxis.hide && /* @__PURE__ */
|
|
5346
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsAreaChart, { data, margin, children: [
|
|
5347
|
+
showGrid && /* @__PURE__ */ jsx36(CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--muted-foreground))", opacity: 0.3 }),
|
|
5348
|
+
xAxis && !xAxis.hide && /* @__PURE__ */ jsx36(
|
|
5298
5349
|
XAxis,
|
|
5299
5350
|
{
|
|
5300
5351
|
dataKey: xAxis.dataKey,
|
|
@@ -5304,7 +5355,7 @@ var AreaChart = ({
|
|
|
5304
5355
|
label: xAxis.label ? { value: xAxis.label, position: "insideBottom", offset: -5 } : void 0
|
|
5305
5356
|
}
|
|
5306
5357
|
),
|
|
5307
|
-
yAxis && !yAxis.hide && /* @__PURE__ */
|
|
5358
|
+
yAxis && !yAxis.hide && /* @__PURE__ */ jsx36(
|
|
5308
5359
|
YAxis,
|
|
5309
5360
|
{
|
|
5310
5361
|
type: yAxis.type,
|
|
@@ -5313,8 +5364,8 @@ var AreaChart = ({
|
|
|
5313
5364
|
label: yAxis.label ? { value: yAxis.label, angle: -90, position: "insideLeft" } : void 0
|
|
5314
5365
|
}
|
|
5315
5366
|
),
|
|
5316
|
-
showTooltip && /* @__PURE__ */
|
|
5317
|
-
showLegend && /* @__PURE__ */
|
|
5367
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5368
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {}),
|
|
5318
5369
|
areas
|
|
5319
5370
|
] }) }) });
|
|
5320
5371
|
};
|
|
@@ -5335,9 +5386,9 @@ var ScatterChart = ({
|
|
|
5335
5386
|
className
|
|
5336
5387
|
}) => {
|
|
5337
5388
|
const { accentColor } = useTheme();
|
|
5338
|
-
return /* @__PURE__ */
|
|
5339
|
-
showGrid && /* @__PURE__ */
|
|
5340
|
-
xAxis && !xAxis.hide && /* @__PURE__ */
|
|
5389
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsScatterChart, { data, margin, children: [
|
|
5390
|
+
showGrid && /* @__PURE__ */ jsx36(CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--muted-foreground))", opacity: 0.3 }),
|
|
5391
|
+
xAxis && !xAxis.hide && /* @__PURE__ */ jsx36(
|
|
5341
5392
|
XAxis,
|
|
5342
5393
|
{
|
|
5343
5394
|
dataKey: xDataKey,
|
|
@@ -5347,7 +5398,7 @@ var ScatterChart = ({
|
|
|
5347
5398
|
label: xAxis.label ? { value: xAxis.label, position: "insideBottom", offset: -5 } : void 0
|
|
5348
5399
|
}
|
|
5349
5400
|
),
|
|
5350
|
-
yAxis && !yAxis.hide && /* @__PURE__ */
|
|
5401
|
+
yAxis && !yAxis.hide && /* @__PURE__ */ jsx36(
|
|
5351
5402
|
YAxis,
|
|
5352
5403
|
{
|
|
5353
5404
|
dataKey: yDataKey,
|
|
@@ -5357,9 +5408,9 @@ var ScatterChart = ({
|
|
|
5357
5408
|
label: yAxis.label ? { value: yAxis.label, angle: -90, position: "insideLeft" } : void 0
|
|
5358
5409
|
}
|
|
5359
5410
|
),
|
|
5360
|
-
showTooltip && /* @__PURE__ */
|
|
5361
|
-
showLegend && /* @__PURE__ */
|
|
5362
|
-
/* @__PURE__ */
|
|
5411
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5412
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {}),
|
|
5413
|
+
/* @__PURE__ */ jsx36(Scatter, { name, dataKey: yDataKey, fill: fill || accentColors2[accentColor][6] })
|
|
5363
5414
|
] }) }) });
|
|
5364
5415
|
};
|
|
5365
5416
|
var RadarChart = ({
|
|
@@ -5376,11 +5427,11 @@ var RadarChart = ({
|
|
|
5376
5427
|
className
|
|
5377
5428
|
}) => {
|
|
5378
5429
|
const { accentColor } = useTheme();
|
|
5379
|
-
return /* @__PURE__ */
|
|
5380
|
-
/* @__PURE__ */
|
|
5381
|
-
/* @__PURE__ */
|
|
5382
|
-
/* @__PURE__ */
|
|
5383
|
-
/* @__PURE__ */
|
|
5430
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsRadarChart, { data, children: [
|
|
5431
|
+
/* @__PURE__ */ jsx36(PolarGrid, {}),
|
|
5432
|
+
/* @__PURE__ */ jsx36(PolarAngleAxis, { dataKey: nameKey }),
|
|
5433
|
+
/* @__PURE__ */ jsx36(PolarRadiusAxis, {}),
|
|
5434
|
+
/* @__PURE__ */ jsx36(
|
|
5384
5435
|
Radar,
|
|
5385
5436
|
{
|
|
5386
5437
|
name: name || dataKey,
|
|
@@ -5390,8 +5441,8 @@ var RadarChart = ({
|
|
|
5390
5441
|
fillOpacity: 0.6
|
|
5391
5442
|
}
|
|
5392
5443
|
),
|
|
5393
|
-
showTooltip && /* @__PURE__ */
|
|
5394
|
-
showLegend && /* @__PURE__ */
|
|
5444
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5445
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {})
|
|
5395
5446
|
] }) }) });
|
|
5396
5447
|
};
|
|
5397
5448
|
var DonutChart = ({
|
|
@@ -5438,8 +5489,8 @@ var DonutChart = ({
|
|
|
5438
5489
|
}
|
|
5439
5490
|
};
|
|
5440
5491
|
const styling = { ...defaultAdvancedStyling, ...advancedStyling };
|
|
5441
|
-
const gradientDefs = styling.enableGradients ? /* @__PURE__ */
|
|
5442
|
-
styling.enableShadows && /* @__PURE__ */
|
|
5492
|
+
const gradientDefs = styling.enableGradients ? /* @__PURE__ */ jsxs21("defs", { children: [
|
|
5493
|
+
styling.enableShadows && /* @__PURE__ */ jsxs21(
|
|
5443
5494
|
"filter",
|
|
5444
5495
|
{
|
|
5445
5496
|
id: "deepInsetShadow",
|
|
@@ -5448,9 +5499,9 @@ var DonutChart = ({
|
|
|
5448
5499
|
width: "200%",
|
|
5449
5500
|
height: "200%",
|
|
5450
5501
|
children: [
|
|
5451
|
-
/* @__PURE__ */
|
|
5452
|
-
/* @__PURE__ */
|
|
5453
|
-
/* @__PURE__ */
|
|
5502
|
+
/* @__PURE__ */ jsx36("feOffset", { dx: "0", dy: "2" }),
|
|
5503
|
+
/* @__PURE__ */ jsx36("feGaussianBlur", { stdDeviation: "2", result: "offsetBlur" }),
|
|
5504
|
+
/* @__PURE__ */ jsx36(
|
|
5454
5505
|
"feComposite",
|
|
5455
5506
|
{
|
|
5456
5507
|
in: "SourceAlpha",
|
|
@@ -5459,8 +5510,8 @@ var DonutChart = ({
|
|
|
5459
5510
|
result: "innerShadow"
|
|
5460
5511
|
}
|
|
5461
5512
|
),
|
|
5462
|
-
/* @__PURE__ */
|
|
5463
|
-
/* @__PURE__ */
|
|
5513
|
+
/* @__PURE__ */ jsx36("feFlood", { floodColor: "hsl(var(--muted))", floodOpacity: "0.9", result: "color" }),
|
|
5514
|
+
/* @__PURE__ */ jsx36(
|
|
5464
5515
|
"feComposite",
|
|
5465
5516
|
{
|
|
5466
5517
|
in: "color",
|
|
@@ -5469,7 +5520,7 @@ var DonutChart = ({
|
|
|
5469
5520
|
result: "shadow"
|
|
5470
5521
|
}
|
|
5471
5522
|
),
|
|
5472
|
-
/* @__PURE__ */
|
|
5523
|
+
/* @__PURE__ */ jsx36(
|
|
5473
5524
|
"feComposite",
|
|
5474
5525
|
{
|
|
5475
5526
|
in: "shadow",
|
|
@@ -5480,7 +5531,7 @@ var DonutChart = ({
|
|
|
5480
5531
|
]
|
|
5481
5532
|
}
|
|
5482
5533
|
),
|
|
5483
|
-
styling.enableShadows && /* @__PURE__ */
|
|
5534
|
+
styling.enableShadows && /* @__PURE__ */ jsx36(
|
|
5484
5535
|
"filter",
|
|
5485
5536
|
{
|
|
5486
5537
|
id: "dropShadow",
|
|
@@ -5488,7 +5539,7 @@ var DonutChart = ({
|
|
|
5488
5539
|
y: "-10%",
|
|
5489
5540
|
width: "120%",
|
|
5490
5541
|
height: "120%",
|
|
5491
|
-
children: /* @__PURE__ */
|
|
5542
|
+
children: /* @__PURE__ */ jsx36(
|
|
5492
5543
|
"feDropShadow",
|
|
5493
5544
|
{
|
|
5494
5545
|
dx: "0",
|
|
@@ -5500,7 +5551,7 @@ var DonutChart = ({
|
|
|
5500
5551
|
)
|
|
5501
5552
|
}
|
|
5502
5553
|
),
|
|
5503
|
-
styling.gradients?.map((gradient) => /* @__PURE__ */
|
|
5554
|
+
styling.gradients?.map((gradient) => /* @__PURE__ */ jsxs21(
|
|
5504
5555
|
"linearGradient",
|
|
5505
5556
|
{
|
|
5506
5557
|
id: gradient.id,
|
|
@@ -5509,14 +5560,14 @@ var DonutChart = ({
|
|
|
5509
5560
|
x2: gradient.x2 || "100%",
|
|
5510
5561
|
y2: gradient.y2 || "100%",
|
|
5511
5562
|
children: [
|
|
5512
|
-
/* @__PURE__ */
|
|
5513
|
-
/* @__PURE__ */
|
|
5563
|
+
/* @__PURE__ */ jsx36("stop", { offset: "0%", stopColor: gradient.colors[0] }),
|
|
5564
|
+
/* @__PURE__ */ jsx36("stop", { offset: "100%", stopColor: gradient.colors[1] })
|
|
5514
5565
|
]
|
|
5515
5566
|
},
|
|
5516
5567
|
gradient.id
|
|
5517
5568
|
))
|
|
5518
5569
|
] }) : null;
|
|
5519
|
-
const customTooltip = tooltip ? /* @__PURE__ */
|
|
5570
|
+
const customTooltip = tooltip ? /* @__PURE__ */ jsx36(
|
|
5520
5571
|
Tooltip2,
|
|
5521
5572
|
{
|
|
5522
5573
|
formatter: tooltip.formatter,
|
|
@@ -5524,10 +5575,10 @@ var DonutChart = ({
|
|
|
5524
5575
|
labelStyle: tooltip.labelStyle,
|
|
5525
5576
|
contentStyle: tooltip.contentStyle
|
|
5526
5577
|
}
|
|
5527
|
-
) : showTooltip ? /* @__PURE__ */
|
|
5528
|
-
return /* @__PURE__ */
|
|
5578
|
+
) : showTooltip ? /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }) : null;
|
|
5579
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsPieChart, { children: [
|
|
5529
5580
|
gradientDefs,
|
|
5530
|
-
/* @__PURE__ */
|
|
5581
|
+
/* @__PURE__ */ jsx36(
|
|
5531
5582
|
Pie,
|
|
5532
5583
|
{
|
|
5533
5584
|
data,
|
|
@@ -5540,7 +5591,7 @@ var DonutChart = ({
|
|
|
5540
5591
|
nameKey,
|
|
5541
5592
|
strokeLinecap: styling.progressArc.strokeLinecap,
|
|
5542
5593
|
filter: styling.progressArc.filter,
|
|
5543
|
-
children: data.map((_entry, index) => /* @__PURE__ */
|
|
5594
|
+
children: data.map((_entry, index) => /* @__PURE__ */ jsx36(
|
|
5544
5595
|
Cell,
|
|
5545
5596
|
{
|
|
5546
5597
|
fill: chartColors[index % chartColors.length]
|
|
@@ -5550,7 +5601,7 @@ var DonutChart = ({
|
|
|
5550
5601
|
}
|
|
5551
5602
|
),
|
|
5552
5603
|
customTooltip,
|
|
5553
|
-
showLegend && /* @__PURE__ */
|
|
5604
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {})
|
|
5554
5605
|
] }) }) });
|
|
5555
5606
|
};
|
|
5556
5607
|
var ProgressCard = ({
|
|
@@ -5587,7 +5638,7 @@ var ProgressCard = ({
|
|
|
5587
5638
|
const bgShadowId = `progress-bg-shadow-${Math.random().toString(36).substr(2, 9)}`;
|
|
5588
5639
|
const [startColor, endColor] = colorFn(normalizedPercentage);
|
|
5589
5640
|
const percentageTextColor = typography.percentageColorAuto ? normalizedPercentage <= 30 ? "text-green-600" : normalizedPercentage <= 50 ? "text-blue-600" : "text-red-600" : "text-gray-900 dark:text-gray-100";
|
|
5590
|
-
return /* @__PURE__ */
|
|
5641
|
+
return /* @__PURE__ */ jsxs21(
|
|
5591
5642
|
"div",
|
|
5592
5643
|
{
|
|
5593
5644
|
className: cn(
|
|
@@ -5597,16 +5648,16 @@ var ProgressCard = ({
|
|
|
5597
5648
|
),
|
|
5598
5649
|
onClick: () => onClick?.(questionNum),
|
|
5599
5650
|
children: [
|
|
5600
|
-
/* @__PURE__ */
|
|
5601
|
-
/* @__PURE__ */
|
|
5602
|
-
/* @__PURE__ */
|
|
5651
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center", children: [
|
|
5652
|
+
/* @__PURE__ */ jsx36("span", { className: cn("font-bold", typography.questionFontSize, typography.questionColor), children: questionNum }),
|
|
5653
|
+
/* @__PURE__ */ jsxs21("span", { className: cn("font-bold", typography.percentageFontSize, percentageTextColor), children: [
|
|
5603
5654
|
normalizedPercentage.toFixed(1),
|
|
5604
5655
|
"%"
|
|
5605
5656
|
] })
|
|
5606
5657
|
] }),
|
|
5607
|
-
/* @__PURE__ */
|
|
5608
|
-
/* @__PURE__ */
|
|
5609
|
-
enableGradients && /* @__PURE__ */
|
|
5658
|
+
/* @__PURE__ */ jsx36("div", { className: "flex items-center", style: { width: `${donutSize + 10}px`, height: `${donutSize + 10}px` }, children: /* @__PURE__ */ jsxs21("svg", { width: donutSize + 10, height: donutSize + 10, viewBox: "0 0 100 100", children: [
|
|
5659
|
+
/* @__PURE__ */ jsxs21("defs", { children: [
|
|
5660
|
+
enableGradients && /* @__PURE__ */ jsxs21(
|
|
5610
5661
|
"linearGradient",
|
|
5611
5662
|
{
|
|
5612
5663
|
id: gradientId,
|
|
@@ -5615,13 +5666,13 @@ var ProgressCard = ({
|
|
|
5615
5666
|
x2: "100%",
|
|
5616
5667
|
y2: "100%",
|
|
5617
5668
|
children: [
|
|
5618
|
-
/* @__PURE__ */
|
|
5619
|
-
/* @__PURE__ */
|
|
5669
|
+
/* @__PURE__ */ jsx36("stop", { offset: "0%", stopColor: startColor }),
|
|
5670
|
+
/* @__PURE__ */ jsx36("stop", { offset: "100%", stopColor: endColor })
|
|
5620
5671
|
]
|
|
5621
5672
|
}
|
|
5622
5673
|
),
|
|
5623
|
-
enableShadows && /* @__PURE__ */
|
|
5624
|
-
/* @__PURE__ */
|
|
5674
|
+
enableShadows && /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
5675
|
+
/* @__PURE__ */ jsxs21(
|
|
5625
5676
|
"filter",
|
|
5626
5677
|
{
|
|
5627
5678
|
id: bgShadowId,
|
|
@@ -5630,9 +5681,9 @@ var ProgressCard = ({
|
|
|
5630
5681
|
width: "200%",
|
|
5631
5682
|
height: "200%",
|
|
5632
5683
|
children: [
|
|
5633
|
-
/* @__PURE__ */
|
|
5634
|
-
/* @__PURE__ */
|
|
5635
|
-
/* @__PURE__ */
|
|
5684
|
+
/* @__PURE__ */ jsx36("feOffset", { dx: "0", dy: "2" }),
|
|
5685
|
+
/* @__PURE__ */ jsx36("feGaussianBlur", { stdDeviation: "2", result: "offsetBlur" }),
|
|
5686
|
+
/* @__PURE__ */ jsx36(
|
|
5636
5687
|
"feComposite",
|
|
5637
5688
|
{
|
|
5638
5689
|
in: "SourceAlpha",
|
|
@@ -5641,8 +5692,8 @@ var ProgressCard = ({
|
|
|
5641
5692
|
result: "innerShadow"
|
|
5642
5693
|
}
|
|
5643
5694
|
),
|
|
5644
|
-
/* @__PURE__ */
|
|
5645
|
-
/* @__PURE__ */
|
|
5695
|
+
/* @__PURE__ */ jsx36("feFlood", { floodColor: "#c0c0c0", floodOpacity: "0.9", result: "color" }),
|
|
5696
|
+
/* @__PURE__ */ jsx36(
|
|
5646
5697
|
"feComposite",
|
|
5647
5698
|
{
|
|
5648
5699
|
in: "color",
|
|
@@ -5651,7 +5702,7 @@ var ProgressCard = ({
|
|
|
5651
5702
|
result: "shadow"
|
|
5652
5703
|
}
|
|
5653
5704
|
),
|
|
5654
|
-
/* @__PURE__ */
|
|
5705
|
+
/* @__PURE__ */ jsx36(
|
|
5655
5706
|
"feComposite",
|
|
5656
5707
|
{
|
|
5657
5708
|
in: "shadow",
|
|
@@ -5662,7 +5713,7 @@ var ProgressCard = ({
|
|
|
5662
5713
|
]
|
|
5663
5714
|
}
|
|
5664
5715
|
),
|
|
5665
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsx36(
|
|
5666
5717
|
"filter",
|
|
5667
5718
|
{
|
|
5668
5719
|
id: shadowId,
|
|
@@ -5670,7 +5721,7 @@ var ProgressCard = ({
|
|
|
5670
5721
|
y: "-10%",
|
|
5671
5722
|
width: "120%",
|
|
5672
5723
|
height: "120%",
|
|
5673
|
-
children: /* @__PURE__ */
|
|
5724
|
+
children: /* @__PURE__ */ jsx36(
|
|
5674
5725
|
"feDropShadow",
|
|
5675
5726
|
{
|
|
5676
5727
|
dx: "0",
|
|
@@ -5684,7 +5735,7 @@ var ProgressCard = ({
|
|
|
5684
5735
|
)
|
|
5685
5736
|
] })
|
|
5686
5737
|
] }),
|
|
5687
|
-
/* @__PURE__ */
|
|
5738
|
+
/* @__PURE__ */ jsx36(
|
|
5688
5739
|
"circle",
|
|
5689
5740
|
{
|
|
5690
5741
|
cx: "50",
|
|
@@ -5696,7 +5747,7 @@ var ProgressCard = ({
|
|
|
5696
5747
|
filter: enableShadows ? `url(#${bgShadowId})` : void 0
|
|
5697
5748
|
}
|
|
5698
5749
|
),
|
|
5699
|
-
/* @__PURE__ */
|
|
5750
|
+
/* @__PURE__ */ jsx36(
|
|
5700
5751
|
"circle",
|
|
5701
5752
|
{
|
|
5702
5753
|
cx: "50",
|
|
@@ -5750,10 +5801,10 @@ var ProgressDonut = ({
|
|
|
5750
5801
|
accentColors2[accentColor][1]
|
|
5751
5802
|
];
|
|
5752
5803
|
if (!data || data.length === 0) {
|
|
5753
|
-
return /* @__PURE__ */
|
|
5804
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("text-gray-500", className), children: "No data provided" });
|
|
5754
5805
|
}
|
|
5755
|
-
return /* @__PURE__ */
|
|
5756
|
-
/* @__PURE__ */
|
|
5806
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsPieChart, { children: [
|
|
5807
|
+
/* @__PURE__ */ jsx36(
|
|
5757
5808
|
Pie,
|
|
5758
5809
|
{
|
|
5759
5810
|
data,
|
|
@@ -5767,12 +5818,12 @@ var ProgressDonut = ({
|
|
|
5767
5818
|
children: data.map((_entry, index) => {
|
|
5768
5819
|
const percentage = Math.min(100, Math.max(0, _entry.value));
|
|
5769
5820
|
const fillColor = colorFn(percentage) || defaultColors[index % defaultColors.length];
|
|
5770
|
-
return /* @__PURE__ */
|
|
5821
|
+
return /* @__PURE__ */ jsx36(Cell, { fill: fillColor }, `cell-${index}`);
|
|
5771
5822
|
})
|
|
5772
5823
|
}
|
|
5773
5824
|
),
|
|
5774
|
-
showTooltip && /* @__PURE__ */
|
|
5775
|
-
showLegend && /* @__PURE__ */
|
|
5825
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5826
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {})
|
|
5776
5827
|
] }) }) });
|
|
5777
5828
|
};
|
|
5778
5829
|
var MultiProgressDonut = ({
|
|
@@ -5799,20 +5850,20 @@ var MultiProgressDonut = ({
|
|
|
5799
5850
|
};
|
|
5800
5851
|
const colorFn = getColor || defaultGetColor;
|
|
5801
5852
|
if (!data || data.length === 0) {
|
|
5802
|
-
return /* @__PURE__ */
|
|
5853
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("text-gray-500", className), children: "No data provided" });
|
|
5803
5854
|
}
|
|
5804
|
-
return /* @__PURE__ */
|
|
5855
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("flex flex-wrap gap-4", className), children: data.map((item, index) => {
|
|
5805
5856
|
const percentage = Math.min(100, Math.max(0, item.value));
|
|
5806
5857
|
const gradientId = `progress-gradient-${index}`;
|
|
5807
5858
|
const shadowId = `progress-shadow-${index}`;
|
|
5808
5859
|
const bgShadowId = `progress-bg-shadow-${index}`;
|
|
5809
5860
|
const [startColor, endColor] = colorFn(percentage);
|
|
5810
|
-
return /* @__PURE__ */
|
|
5811
|
-
item.label && /* @__PURE__ */
|
|
5812
|
-
/* @__PURE__ */
|
|
5813
|
-
/* @__PURE__ */
|
|
5814
|
-
/* @__PURE__ */
|
|
5815
|
-
enableGradients && /* @__PURE__ */
|
|
5861
|
+
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-2", children: [
|
|
5862
|
+
item.label && /* @__PURE__ */ jsx36("div", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: item.label }),
|
|
5863
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative", children: [
|
|
5864
|
+
/* @__PURE__ */ jsxs21("svg", { width: size, height: size, viewBox: "0 0 100 100", children: [
|
|
5865
|
+
/* @__PURE__ */ jsxs21("defs", { children: [
|
|
5866
|
+
enableGradients && /* @__PURE__ */ jsxs21(
|
|
5816
5867
|
"linearGradient",
|
|
5817
5868
|
{
|
|
5818
5869
|
id: gradientId,
|
|
@@ -5821,13 +5872,13 @@ var MultiProgressDonut = ({
|
|
|
5821
5872
|
x2: "100%",
|
|
5822
5873
|
y2: "100%",
|
|
5823
5874
|
children: [
|
|
5824
|
-
/* @__PURE__ */
|
|
5825
|
-
/* @__PURE__ */
|
|
5875
|
+
/* @__PURE__ */ jsx36("stop", { offset: "0%", stopColor: startColor }),
|
|
5876
|
+
/* @__PURE__ */ jsx36("stop", { offset: "100%", stopColor: endColor })
|
|
5826
5877
|
]
|
|
5827
5878
|
}
|
|
5828
5879
|
),
|
|
5829
|
-
enableShadows && /* @__PURE__ */
|
|
5830
|
-
/* @__PURE__ */
|
|
5880
|
+
enableShadows && /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
5881
|
+
/* @__PURE__ */ jsxs21(
|
|
5831
5882
|
"filter",
|
|
5832
5883
|
{
|
|
5833
5884
|
id: bgShadowId,
|
|
@@ -5836,9 +5887,9 @@ var MultiProgressDonut = ({
|
|
|
5836
5887
|
width: "200%",
|
|
5837
5888
|
height: "200%",
|
|
5838
5889
|
children: [
|
|
5839
|
-
/* @__PURE__ */
|
|
5840
|
-
/* @__PURE__ */
|
|
5841
|
-
/* @__PURE__ */
|
|
5890
|
+
/* @__PURE__ */ jsx36("feOffset", { dx: "0", dy: "2" }),
|
|
5891
|
+
/* @__PURE__ */ jsx36("feGaussianBlur", { stdDeviation: "2", result: "offsetBlur" }),
|
|
5892
|
+
/* @__PURE__ */ jsx36(
|
|
5842
5893
|
"feComposite",
|
|
5843
5894
|
{
|
|
5844
5895
|
in: "SourceAlpha",
|
|
@@ -5847,8 +5898,8 @@ var MultiProgressDonut = ({
|
|
|
5847
5898
|
result: "innerShadow"
|
|
5848
5899
|
}
|
|
5849
5900
|
),
|
|
5850
|
-
/* @__PURE__ */
|
|
5851
|
-
/* @__PURE__ */
|
|
5901
|
+
/* @__PURE__ */ jsx36("feFlood", { floodColor: "#c0c0c0", floodOpacity: "0.9", result: "color" }),
|
|
5902
|
+
/* @__PURE__ */ jsx36(
|
|
5852
5903
|
"feComposite",
|
|
5853
5904
|
{
|
|
5854
5905
|
in: "color",
|
|
@@ -5857,7 +5908,7 @@ var MultiProgressDonut = ({
|
|
|
5857
5908
|
result: "shadow"
|
|
5858
5909
|
}
|
|
5859
5910
|
),
|
|
5860
|
-
/* @__PURE__ */
|
|
5911
|
+
/* @__PURE__ */ jsx36(
|
|
5861
5912
|
"feComposite",
|
|
5862
5913
|
{
|
|
5863
5914
|
in: "shadow",
|
|
@@ -5868,7 +5919,7 @@ var MultiProgressDonut = ({
|
|
|
5868
5919
|
]
|
|
5869
5920
|
}
|
|
5870
5921
|
),
|
|
5871
|
-
/* @__PURE__ */
|
|
5922
|
+
/* @__PURE__ */ jsx36(
|
|
5872
5923
|
"filter",
|
|
5873
5924
|
{
|
|
5874
5925
|
id: shadowId,
|
|
@@ -5876,7 +5927,7 @@ var MultiProgressDonut = ({
|
|
|
5876
5927
|
y: "-10%",
|
|
5877
5928
|
width: "120%",
|
|
5878
5929
|
height: "120%",
|
|
5879
|
-
children: /* @__PURE__ */
|
|
5930
|
+
children: /* @__PURE__ */ jsx36(
|
|
5880
5931
|
"feDropShadow",
|
|
5881
5932
|
{
|
|
5882
5933
|
dx: "0",
|
|
@@ -5890,7 +5941,7 @@ var MultiProgressDonut = ({
|
|
|
5890
5941
|
)
|
|
5891
5942
|
] })
|
|
5892
5943
|
] }),
|
|
5893
|
-
/* @__PURE__ */
|
|
5944
|
+
/* @__PURE__ */ jsx36(
|
|
5894
5945
|
"circle",
|
|
5895
5946
|
{
|
|
5896
5947
|
cx: "50",
|
|
@@ -5902,7 +5953,7 @@ var MultiProgressDonut = ({
|
|
|
5902
5953
|
filter: enableShadows ? `url(#${bgShadowId})` : void 0
|
|
5903
5954
|
}
|
|
5904
5955
|
),
|
|
5905
|
-
/* @__PURE__ */
|
|
5956
|
+
/* @__PURE__ */ jsx36(
|
|
5906
5957
|
"circle",
|
|
5907
5958
|
{
|
|
5908
5959
|
cx: "50",
|
|
@@ -5919,7 +5970,7 @@ var MultiProgressDonut = ({
|
|
|
5919
5970
|
}
|
|
5920
5971
|
)
|
|
5921
5972
|
] }),
|
|
5922
|
-
showPercentage && /* @__PURE__ */
|
|
5973
|
+
showPercentage && /* @__PURE__ */ jsx36("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxs21("span", { className: "text-xs font-bold text-gray-700 dark:text-gray-300", children: [
|
|
5923
5974
|
percentage.toFixed(1),
|
|
5924
5975
|
"%"
|
|
5925
5976
|
] }) })
|
|
@@ -5929,9 +5980,9 @@ var MultiProgressDonut = ({
|
|
|
5929
5980
|
};
|
|
5930
5981
|
|
|
5931
5982
|
// src/components/breadcrumbs.tsx
|
|
5932
|
-
import * as
|
|
5933
|
-
import { jsx as
|
|
5934
|
-
var Breadcrumbs =
|
|
5983
|
+
import * as React36 from "react";
|
|
5984
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5985
|
+
var Breadcrumbs = React36.forwardRef(
|
|
5935
5986
|
({
|
|
5936
5987
|
separator,
|
|
5937
5988
|
maxItems,
|
|
@@ -5941,9 +5992,9 @@ var Breadcrumbs = React35.forwardRef(
|
|
|
5941
5992
|
children,
|
|
5942
5993
|
...props
|
|
5943
5994
|
}, ref) => {
|
|
5944
|
-
const childArray =
|
|
5995
|
+
const childArray = React36.Children.toArray(children);
|
|
5945
5996
|
const totalItems = childArray.length;
|
|
5946
|
-
const separatorElement = separator ?? /* @__PURE__ */
|
|
5997
|
+
const separatorElement = separator ?? /* @__PURE__ */ jsx37(
|
|
5947
5998
|
"svg",
|
|
5948
5999
|
{
|
|
5949
6000
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5956,7 +6007,7 @@ var Breadcrumbs = React35.forwardRef(
|
|
|
5956
6007
|
strokeLinecap: "round",
|
|
5957
6008
|
strokeLinejoin: "round",
|
|
5958
6009
|
className: "text-muted-foreground",
|
|
5959
|
-
children: /* @__PURE__ */
|
|
6010
|
+
children: /* @__PURE__ */ jsx37("path", { d: "m9 18 6-6-6-6" })
|
|
5960
6011
|
}
|
|
5961
6012
|
);
|
|
5962
6013
|
const shouldCollapse = maxItems && totalItems > maxItems;
|
|
@@ -5966,20 +6017,20 @@ var Breadcrumbs = React35.forwardRef(
|
|
|
5966
6017
|
const endItems = childArray.slice(-itemsAfterCollapse);
|
|
5967
6018
|
displayedItems = [
|
|
5968
6019
|
...startItems,
|
|
5969
|
-
/* @__PURE__ */
|
|
6020
|
+
/* @__PURE__ */ jsx37(BreadcrumbEllipsis, {}, "ellipsis"),
|
|
5970
6021
|
...endItems
|
|
5971
6022
|
];
|
|
5972
6023
|
} else {
|
|
5973
6024
|
displayedItems = childArray;
|
|
5974
6025
|
}
|
|
5975
|
-
return /* @__PURE__ */
|
|
5976
|
-
index > 0 && /* @__PURE__ */
|
|
6026
|
+
return /* @__PURE__ */ jsx37("nav", { ref, "aria-label": "Breadcrumb", className, ...props, children: /* @__PURE__ */ jsx37("ol", { className: "flex items-center gap-1.5 flex-wrap", children: displayedItems.map((child, index) => /* @__PURE__ */ jsxs22("li", { className: "flex items-center gap-1.5", children: [
|
|
6027
|
+
index > 0 && /* @__PURE__ */ jsx37("span", { className: "flex items-center", "aria-hidden": "true", children: separatorElement }),
|
|
5977
6028
|
child
|
|
5978
6029
|
] }, index)) }) });
|
|
5979
6030
|
}
|
|
5980
6031
|
);
|
|
5981
6032
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
5982
|
-
var BreadcrumbItem =
|
|
6033
|
+
var BreadcrumbItem = React36.forwardRef(
|
|
5983
6034
|
({ current = false, href, onClick, className, children, ...props }, ref) => {
|
|
5984
6035
|
const baseClasses = cn(
|
|
5985
6036
|
"text-sm transition-colors",
|
|
@@ -5988,7 +6039,7 @@ var BreadcrumbItem = React35.forwardRef(
|
|
|
5988
6039
|
className
|
|
5989
6040
|
);
|
|
5990
6041
|
if (current) {
|
|
5991
|
-
return /* @__PURE__ */
|
|
6042
|
+
return /* @__PURE__ */ jsx37(
|
|
5992
6043
|
"span",
|
|
5993
6044
|
{
|
|
5994
6045
|
ref,
|
|
@@ -6000,7 +6051,7 @@ var BreadcrumbItem = React35.forwardRef(
|
|
|
6000
6051
|
);
|
|
6001
6052
|
}
|
|
6002
6053
|
if (href) {
|
|
6003
|
-
return /* @__PURE__ */
|
|
6054
|
+
return /* @__PURE__ */ jsx37(
|
|
6004
6055
|
"a",
|
|
6005
6056
|
{
|
|
6006
6057
|
href,
|
|
@@ -6010,7 +6061,7 @@ var BreadcrumbItem = React35.forwardRef(
|
|
|
6010
6061
|
}
|
|
6011
6062
|
);
|
|
6012
6063
|
}
|
|
6013
|
-
return /* @__PURE__ */
|
|
6064
|
+
return /* @__PURE__ */ jsx37(
|
|
6014
6065
|
"span",
|
|
6015
6066
|
{
|
|
6016
6067
|
ref,
|
|
@@ -6031,8 +6082,8 @@ var BreadcrumbItem = React35.forwardRef(
|
|
|
6031
6082
|
}
|
|
6032
6083
|
);
|
|
6033
6084
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
6034
|
-
var BreadcrumbLink =
|
|
6035
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6085
|
+
var BreadcrumbLink = React36.forwardRef(
|
|
6086
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
6036
6087
|
"a",
|
|
6037
6088
|
{
|
|
6038
6089
|
ref,
|
|
@@ -6045,8 +6096,8 @@ var BreadcrumbLink = React35.forwardRef(
|
|
|
6045
6096
|
)
|
|
6046
6097
|
);
|
|
6047
6098
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
6048
|
-
var BreadcrumbSeparator =
|
|
6049
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
6099
|
+
var BreadcrumbSeparator = React36.forwardRef(
|
|
6100
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
6050
6101
|
"span",
|
|
6051
6102
|
{
|
|
6052
6103
|
ref,
|
|
@@ -6054,7 +6105,7 @@ var BreadcrumbSeparator = React35.forwardRef(
|
|
|
6054
6105
|
"aria-hidden": "true",
|
|
6055
6106
|
className: cn("text-muted-foreground", className),
|
|
6056
6107
|
...props,
|
|
6057
|
-
children: children ?? /* @__PURE__ */
|
|
6108
|
+
children: children ?? /* @__PURE__ */ jsx37(
|
|
6058
6109
|
"svg",
|
|
6059
6110
|
{
|
|
6060
6111
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6066,15 +6117,15 @@ var BreadcrumbSeparator = React35.forwardRef(
|
|
|
6066
6117
|
strokeWidth: "2",
|
|
6067
6118
|
strokeLinecap: "round",
|
|
6068
6119
|
strokeLinejoin: "round",
|
|
6069
|
-
children: /* @__PURE__ */
|
|
6120
|
+
children: /* @__PURE__ */ jsx37("path", { d: "m9 18 6-6-6-6" })
|
|
6070
6121
|
}
|
|
6071
6122
|
)
|
|
6072
6123
|
}
|
|
6073
6124
|
)
|
|
6074
6125
|
);
|
|
6075
6126
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
6076
|
-
var BreadcrumbEllipsis =
|
|
6077
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6127
|
+
var BreadcrumbEllipsis = React36.forwardRef(
|
|
6128
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
6078
6129
|
"span",
|
|
6079
6130
|
{
|
|
6080
6131
|
ref,
|
|
@@ -6082,7 +6133,7 @@ var BreadcrumbEllipsis = React35.forwardRef(
|
|
|
6082
6133
|
"aria-hidden": "true",
|
|
6083
6134
|
className: cn("text-sm text-muted-foreground", className),
|
|
6084
6135
|
...props,
|
|
6085
|
-
children: /* @__PURE__ */
|
|
6136
|
+
children: /* @__PURE__ */ jsxs22(
|
|
6086
6137
|
"svg",
|
|
6087
6138
|
{
|
|
6088
6139
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6095,9 +6146,9 @@ var BreadcrumbEllipsis = React35.forwardRef(
|
|
|
6095
6146
|
strokeLinecap: "round",
|
|
6096
6147
|
strokeLinejoin: "round",
|
|
6097
6148
|
children: [
|
|
6098
|
-
/* @__PURE__ */
|
|
6099
|
-
/* @__PURE__ */
|
|
6100
|
-
/* @__PURE__ */
|
|
6149
|
+
/* @__PURE__ */ jsx37("circle", { cx: "12", cy: "12", r: "1" }),
|
|
6150
|
+
/* @__PURE__ */ jsx37("circle", { cx: "19", cy: "12", r: "1" }),
|
|
6151
|
+
/* @__PURE__ */ jsx37("circle", { cx: "5", cy: "12", r: "1" })
|
|
6101
6152
|
]
|
|
6102
6153
|
}
|
|
6103
6154
|
)
|
|
@@ -6105,8 +6156,8 @@ var BreadcrumbEllipsis = React35.forwardRef(
|
|
|
6105
6156
|
)
|
|
6106
6157
|
);
|
|
6107
6158
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
6108
|
-
var BreadcrumbPage =
|
|
6109
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6159
|
+
var BreadcrumbPage = React36.forwardRef(
|
|
6160
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
6110
6161
|
"span",
|
|
6111
6162
|
{
|
|
6112
6163
|
ref,
|
|
@@ -6119,16 +6170,16 @@ var BreadcrumbPage = React35.forwardRef(
|
|
|
6119
6170
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
6120
6171
|
|
|
6121
6172
|
// src/components/dropdown-menu.tsx
|
|
6122
|
-
import * as
|
|
6173
|
+
import * as React37 from "react";
|
|
6123
6174
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6124
|
-
import { jsx as
|
|
6175
|
+
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6125
6176
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
6126
6177
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
6127
6178
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
6128
6179
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
6129
6180
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
6130
6181
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
6131
|
-
var DropdownMenuSubTrigger =
|
|
6182
|
+
var DropdownMenuSubTrigger = React37.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
6132
6183
|
DropdownMenuPrimitive.SubTrigger,
|
|
6133
6184
|
{
|
|
6134
6185
|
ref,
|
|
@@ -6142,7 +6193,7 @@ var DropdownMenuSubTrigger = React36.forwardRef(({ className, inset, children, .
|
|
|
6142
6193
|
...props,
|
|
6143
6194
|
children: [
|
|
6144
6195
|
children,
|
|
6145
|
-
/* @__PURE__ */
|
|
6196
|
+
/* @__PURE__ */ jsx38(
|
|
6146
6197
|
"svg",
|
|
6147
6198
|
{
|
|
6148
6199
|
className: "ml-auto h-4 w-4",
|
|
@@ -6153,14 +6204,14 @@ var DropdownMenuSubTrigger = React36.forwardRef(({ className, inset, children, .
|
|
|
6153
6204
|
strokeWidth: "2",
|
|
6154
6205
|
strokeLinecap: "round",
|
|
6155
6206
|
strokeLinejoin: "round",
|
|
6156
|
-
children: /* @__PURE__ */
|
|
6207
|
+
children: /* @__PURE__ */ jsx38("path", { d: "m9 18 6-6-6-6" })
|
|
6157
6208
|
}
|
|
6158
6209
|
)
|
|
6159
6210
|
]
|
|
6160
6211
|
}
|
|
6161
6212
|
));
|
|
6162
6213
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
6163
|
-
var DropdownMenuSubContent =
|
|
6214
|
+
var DropdownMenuSubContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6164
6215
|
DropdownMenuPrimitive.SubContent,
|
|
6165
6216
|
{
|
|
6166
6217
|
ref,
|
|
@@ -6177,7 +6228,7 @@ var DropdownMenuSubContent = React36.forwardRef(({ className, ...props }, ref) =
|
|
|
6177
6228
|
}
|
|
6178
6229
|
));
|
|
6179
6230
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
6180
|
-
var DropdownMenuContent =
|
|
6231
|
+
var DropdownMenuContent = React37.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx38(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx38(
|
|
6181
6232
|
DropdownMenuPrimitive.Content,
|
|
6182
6233
|
{
|
|
6183
6234
|
ref,
|
|
@@ -6195,7 +6246,7 @@ var DropdownMenuContent = React36.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
6195
6246
|
}
|
|
6196
6247
|
) }));
|
|
6197
6248
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
6198
|
-
var DropdownMenuItem =
|
|
6249
|
+
var DropdownMenuItem = React37.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6199
6250
|
DropdownMenuPrimitive.Item,
|
|
6200
6251
|
{
|
|
6201
6252
|
ref,
|
|
@@ -6211,7 +6262,7 @@ var DropdownMenuItem = React36.forwardRef(({ className, inset, ...props }, ref)
|
|
|
6211
6262
|
}
|
|
6212
6263
|
));
|
|
6213
6264
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
6214
|
-
var DropdownMenuCheckboxItem =
|
|
6265
|
+
var DropdownMenuCheckboxItem = React37.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
6215
6266
|
DropdownMenuPrimitive.CheckboxItem,
|
|
6216
6267
|
{
|
|
6217
6268
|
ref,
|
|
@@ -6224,7 +6275,7 @@ var DropdownMenuCheckboxItem = React36.forwardRef(({ className, children, checke
|
|
|
6224
6275
|
checked,
|
|
6225
6276
|
...props,
|
|
6226
6277
|
children: [
|
|
6227
|
-
/* @__PURE__ */
|
|
6278
|
+
/* @__PURE__ */ jsx38("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx38(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx38(
|
|
6228
6279
|
"svg",
|
|
6229
6280
|
{
|
|
6230
6281
|
className: "h-4 w-4",
|
|
@@ -6235,7 +6286,7 @@ var DropdownMenuCheckboxItem = React36.forwardRef(({ className, children, checke
|
|
|
6235
6286
|
strokeWidth: "2",
|
|
6236
6287
|
strokeLinecap: "round",
|
|
6237
6288
|
strokeLinejoin: "round",
|
|
6238
|
-
children: /* @__PURE__ */
|
|
6289
|
+
children: /* @__PURE__ */ jsx38("path", { d: "M20 6 9 17l-5-5" })
|
|
6239
6290
|
}
|
|
6240
6291
|
) }) }),
|
|
6241
6292
|
children
|
|
@@ -6243,7 +6294,7 @@ var DropdownMenuCheckboxItem = React36.forwardRef(({ className, children, checke
|
|
|
6243
6294
|
}
|
|
6244
6295
|
));
|
|
6245
6296
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
6246
|
-
var DropdownMenuRadioItem =
|
|
6297
|
+
var DropdownMenuRadioItem = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
6247
6298
|
DropdownMenuPrimitive.RadioItem,
|
|
6248
6299
|
{
|
|
6249
6300
|
ref,
|
|
@@ -6255,13 +6306,13 @@ var DropdownMenuRadioItem = React36.forwardRef(({ className, children, ...props
|
|
|
6255
6306
|
),
|
|
6256
6307
|
...props,
|
|
6257
6308
|
children: [
|
|
6258
|
-
/* @__PURE__ */
|
|
6309
|
+
/* @__PURE__ */ jsx38("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx38(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx38(
|
|
6259
6310
|
"svg",
|
|
6260
6311
|
{
|
|
6261
6312
|
className: "h-2 w-2 fill-current",
|
|
6262
6313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6263
6314
|
viewBox: "0 0 24 24",
|
|
6264
|
-
children: /* @__PURE__ */
|
|
6315
|
+
children: /* @__PURE__ */ jsx38("circle", { cx: "12", cy: "12", r: "10" })
|
|
6265
6316
|
}
|
|
6266
6317
|
) }) }),
|
|
6267
6318
|
children
|
|
@@ -6269,7 +6320,7 @@ var DropdownMenuRadioItem = React36.forwardRef(({ className, children, ...props
|
|
|
6269
6320
|
}
|
|
6270
6321
|
));
|
|
6271
6322
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
6272
|
-
var DropdownMenuLabel =
|
|
6323
|
+
var DropdownMenuLabel = React37.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6273
6324
|
DropdownMenuPrimitive.Label,
|
|
6274
6325
|
{
|
|
6275
6326
|
ref,
|
|
@@ -6282,7 +6333,7 @@ var DropdownMenuLabel = React36.forwardRef(({ className, inset, ...props }, ref)
|
|
|
6282
6333
|
}
|
|
6283
6334
|
));
|
|
6284
6335
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
6285
|
-
var DropdownMenuSeparator =
|
|
6336
|
+
var DropdownMenuSeparator = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6286
6337
|
DropdownMenuPrimitive.Separator,
|
|
6287
6338
|
{
|
|
6288
6339
|
ref,
|
|
@@ -6295,7 +6346,7 @@ var DropdownMenuShortcut = ({
|
|
|
6295
6346
|
className,
|
|
6296
6347
|
...props
|
|
6297
6348
|
}) => {
|
|
6298
|
-
return /* @__PURE__ */
|
|
6349
|
+
return /* @__PURE__ */ jsx38(
|
|
6299
6350
|
"span",
|
|
6300
6351
|
{
|
|
6301
6352
|
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
@@ -6306,14 +6357,14 @@ var DropdownMenuShortcut = ({
|
|
|
6306
6357
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
6307
6358
|
|
|
6308
6359
|
// src/components/drawer.tsx
|
|
6309
|
-
import * as
|
|
6360
|
+
import * as React38 from "react";
|
|
6310
6361
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
6311
|
-
import { jsx as
|
|
6362
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6312
6363
|
var Drawer = DialogPrimitive2.Root;
|
|
6313
6364
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
6314
6365
|
var DrawerClose = DialogPrimitive2.Close;
|
|
6315
6366
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
6316
|
-
var DrawerOverlay =
|
|
6367
|
+
var DrawerOverlay = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6317
6368
|
DialogPrimitive2.Overlay,
|
|
6318
6369
|
{
|
|
6319
6370
|
ref,
|
|
@@ -6333,9 +6384,9 @@ var slideVariants = {
|
|
|
6333
6384
|
top: "inset-x-0 top-0 w-full data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
6334
6385
|
bottom: "inset-x-0 bottom-0 w-full data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom"
|
|
6335
6386
|
};
|
|
6336
|
-
var DrawerContent =
|
|
6337
|
-
/* @__PURE__ */
|
|
6338
|
-
/* @__PURE__ */
|
|
6387
|
+
var DrawerContent = React38.forwardRef(({ side = "right", showClose = true, className, children, ...props }, ref) => /* @__PURE__ */ jsxs24(DrawerPortal, { children: [
|
|
6388
|
+
/* @__PURE__ */ jsx39(DrawerOverlay, {}),
|
|
6389
|
+
/* @__PURE__ */ jsxs24(
|
|
6339
6390
|
DialogPrimitive2.Content,
|
|
6340
6391
|
{
|
|
6341
6392
|
ref,
|
|
@@ -6349,7 +6400,7 @@ var DrawerContent = React37.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6349
6400
|
...props,
|
|
6350
6401
|
children: [
|
|
6351
6402
|
children,
|
|
6352
|
-
showClose && /* @__PURE__ */
|
|
6403
|
+
showClose && /* @__PURE__ */ jsxs24(
|
|
6353
6404
|
DrawerClose,
|
|
6354
6405
|
{
|
|
6355
6406
|
className: cn(
|
|
@@ -6359,7 +6410,7 @@ var DrawerContent = React37.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6359
6410
|
"disabled:pointer-events-none"
|
|
6360
6411
|
),
|
|
6361
6412
|
children: [
|
|
6362
|
-
/* @__PURE__ */
|
|
6413
|
+
/* @__PURE__ */ jsx39(
|
|
6363
6414
|
"svg",
|
|
6364
6415
|
{
|
|
6365
6416
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6372,10 +6423,10 @@ var DrawerContent = React37.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6372
6423
|
strokeLinecap: "round",
|
|
6373
6424
|
strokeLinejoin: "round",
|
|
6374
6425
|
className: "h-4 w-4",
|
|
6375
|
-
children: /* @__PURE__ */
|
|
6426
|
+
children: /* @__PURE__ */ jsx39("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
6376
6427
|
}
|
|
6377
6428
|
),
|
|
6378
|
-
/* @__PURE__ */
|
|
6429
|
+
/* @__PURE__ */ jsx39("span", { className: "sr-only", children: "Close" })
|
|
6379
6430
|
]
|
|
6380
6431
|
}
|
|
6381
6432
|
)
|
|
@@ -6384,8 +6435,8 @@ var DrawerContent = React37.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6384
6435
|
)
|
|
6385
6436
|
] }));
|
|
6386
6437
|
DrawerContent.displayName = "DrawerContent";
|
|
6387
|
-
var DrawerHeader =
|
|
6388
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6438
|
+
var DrawerHeader = React38.forwardRef(
|
|
6439
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6389
6440
|
"div",
|
|
6390
6441
|
{
|
|
6391
6442
|
ref,
|
|
@@ -6395,7 +6446,7 @@ var DrawerHeader = React37.forwardRef(
|
|
|
6395
6446
|
)
|
|
6396
6447
|
);
|
|
6397
6448
|
DrawerHeader.displayName = "DrawerHeader";
|
|
6398
|
-
var DrawerTitle =
|
|
6449
|
+
var DrawerTitle = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6399
6450
|
DialogPrimitive2.Title,
|
|
6400
6451
|
{
|
|
6401
6452
|
ref,
|
|
@@ -6404,7 +6455,7 @@ var DrawerTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6404
6455
|
}
|
|
6405
6456
|
));
|
|
6406
6457
|
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
6407
|
-
var DrawerDescription =
|
|
6458
|
+
var DrawerDescription = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6408
6459
|
DialogPrimitive2.Description,
|
|
6409
6460
|
{
|
|
6410
6461
|
ref,
|
|
@@ -6413,8 +6464,8 @@ var DrawerDescription = React37.forwardRef(({ className, ...props }, ref) => /*
|
|
|
6413
6464
|
}
|
|
6414
6465
|
));
|
|
6415
6466
|
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
6416
|
-
var DrawerBody =
|
|
6417
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6467
|
+
var DrawerBody = React38.forwardRef(
|
|
6468
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6418
6469
|
"div",
|
|
6419
6470
|
{
|
|
6420
6471
|
ref,
|
|
@@ -6424,8 +6475,8 @@ var DrawerBody = React37.forwardRef(
|
|
|
6424
6475
|
)
|
|
6425
6476
|
);
|
|
6426
6477
|
DrawerBody.displayName = "DrawerBody";
|
|
6427
|
-
var DrawerFooter =
|
|
6428
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6478
|
+
var DrawerFooter = React38.forwardRef(
|
|
6479
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6429
6480
|
"div",
|
|
6430
6481
|
{
|
|
6431
6482
|
ref,
|
|
@@ -6451,16 +6502,16 @@ var SheetBody = DrawerBody;
|
|
|
6451
6502
|
var SheetFooter = DrawerFooter;
|
|
6452
6503
|
|
|
6453
6504
|
// src/components/topbar.tsx
|
|
6454
|
-
import * as
|
|
6455
|
-
import { Fragment as Fragment6, jsx as
|
|
6505
|
+
import * as React39 from "react";
|
|
6506
|
+
import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6456
6507
|
var sizeClasses4 = {
|
|
6457
6508
|
sm: "h-12",
|
|
6458
6509
|
md: "h-14",
|
|
6459
6510
|
lg: "h-16"
|
|
6460
6511
|
};
|
|
6461
|
-
var TopBar =
|
|
6512
|
+
var TopBar = React39.forwardRef(
|
|
6462
6513
|
({ className, bordered = true, sticky = false, size = "md", children, ...props }, ref) => {
|
|
6463
|
-
return /* @__PURE__ */
|
|
6514
|
+
return /* @__PURE__ */ jsx40(
|
|
6464
6515
|
"header",
|
|
6465
6516
|
{
|
|
6466
6517
|
ref,
|
|
@@ -6478,23 +6529,23 @@ var TopBar = React38.forwardRef(
|
|
|
6478
6529
|
}
|
|
6479
6530
|
);
|
|
6480
6531
|
TopBar.displayName = "TopBar";
|
|
6481
|
-
var TopBarBrand =
|
|
6532
|
+
var TopBarBrand = React39.forwardRef(
|
|
6482
6533
|
({ className, logo, name, href, children, ...props }, ref) => {
|
|
6483
|
-
const content = /* @__PURE__ */
|
|
6484
|
-
logo && /* @__PURE__ */
|
|
6485
|
-
name && /* @__PURE__ */
|
|
6534
|
+
const content = /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
6535
|
+
logo && /* @__PURE__ */ jsx40("span", { className: "shrink-0", children: logo }),
|
|
6536
|
+
name && /* @__PURE__ */ jsx40("span", { className: "font-semibold text-lg", children: name }),
|
|
6486
6537
|
children
|
|
6487
6538
|
] });
|
|
6488
6539
|
if (href) {
|
|
6489
|
-
return /* @__PURE__ */
|
|
6540
|
+
return /* @__PURE__ */ jsx40("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: /* @__PURE__ */ jsx40("a", { href, className: "flex items-center gap-2 hover:opacity-80 transition-opacity", children: content }) });
|
|
6490
6541
|
}
|
|
6491
|
-
return /* @__PURE__ */
|
|
6542
|
+
return /* @__PURE__ */ jsx40("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: content });
|
|
6492
6543
|
}
|
|
6493
6544
|
);
|
|
6494
6545
|
TopBarBrand.displayName = "TopBarBrand";
|
|
6495
|
-
var TopBarNav =
|
|
6546
|
+
var TopBarNav = React39.forwardRef(
|
|
6496
6547
|
({ className, children, ...props }, ref) => {
|
|
6497
|
-
return /* @__PURE__ */
|
|
6548
|
+
return /* @__PURE__ */ jsx40(
|
|
6498
6549
|
"nav",
|
|
6499
6550
|
{
|
|
6500
6551
|
ref,
|
|
@@ -6506,9 +6557,9 @@ var TopBarNav = React38.forwardRef(
|
|
|
6506
6557
|
}
|
|
6507
6558
|
);
|
|
6508
6559
|
TopBarNav.displayName = "TopBarNav";
|
|
6509
|
-
var TopBarNavItem =
|
|
6560
|
+
var TopBarNavItem = React39.forwardRef(
|
|
6510
6561
|
({ className, active, children, ...props }, ref) => {
|
|
6511
|
-
return /* @__PURE__ */
|
|
6562
|
+
return /* @__PURE__ */ jsx40(
|
|
6512
6563
|
"a",
|
|
6513
6564
|
{
|
|
6514
6565
|
ref,
|
|
@@ -6524,9 +6575,9 @@ var TopBarNavItem = React38.forwardRef(
|
|
|
6524
6575
|
}
|
|
6525
6576
|
);
|
|
6526
6577
|
TopBarNavItem.displayName = "TopBarNavItem";
|
|
6527
|
-
var TopBarSection =
|
|
6578
|
+
var TopBarSection = React39.forwardRef(
|
|
6528
6579
|
({ className, align = "left", children, ...props }, ref) => {
|
|
6529
|
-
return /* @__PURE__ */
|
|
6580
|
+
return /* @__PURE__ */ jsx40(
|
|
6530
6581
|
"div",
|
|
6531
6582
|
{
|
|
6532
6583
|
ref,
|
|
@@ -6546,9 +6597,9 @@ var TopBarSection = React38.forwardRef(
|
|
|
6546
6597
|
}
|
|
6547
6598
|
);
|
|
6548
6599
|
TopBarSection.displayName = "TopBarSection";
|
|
6549
|
-
var TopBarDivider =
|
|
6600
|
+
var TopBarDivider = React39.forwardRef(
|
|
6550
6601
|
({ className, ...props }, ref) => {
|
|
6551
|
-
return /* @__PURE__ */
|
|
6602
|
+
return /* @__PURE__ */ jsx40(
|
|
6552
6603
|
"div",
|
|
6553
6604
|
{
|
|
6554
6605
|
ref,
|
|
@@ -6561,17 +6612,17 @@ var TopBarDivider = React38.forwardRef(
|
|
|
6561
6612
|
TopBarDivider.displayName = "TopBarDivider";
|
|
6562
6613
|
|
|
6563
6614
|
// src/components/sidebar.tsx
|
|
6564
|
-
import * as
|
|
6565
|
-
import { Fragment as Fragment7, jsx as
|
|
6566
|
-
var SidebarContext =
|
|
6615
|
+
import * as React40 from "react";
|
|
6616
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6617
|
+
var SidebarContext = React40.createContext(void 0);
|
|
6567
6618
|
var useSidebar = () => {
|
|
6568
|
-
const context =
|
|
6619
|
+
const context = React40.useContext(SidebarContext);
|
|
6569
6620
|
if (!context) {
|
|
6570
6621
|
throw new Error("useSidebar must be used within a Sidebar");
|
|
6571
6622
|
}
|
|
6572
6623
|
return context;
|
|
6573
6624
|
};
|
|
6574
|
-
var Sidebar =
|
|
6625
|
+
var Sidebar = React40.forwardRef(
|
|
6575
6626
|
({
|
|
6576
6627
|
className,
|
|
6577
6628
|
collapsed: controlledCollapsed,
|
|
@@ -6583,10 +6634,10 @@ var Sidebar = React39.forwardRef(
|
|
|
6583
6634
|
children,
|
|
6584
6635
|
...props
|
|
6585
6636
|
}, ref) => {
|
|
6586
|
-
const [uncontrolledCollapsed, setUncontrolledCollapsed] =
|
|
6637
|
+
const [uncontrolledCollapsed, setUncontrolledCollapsed] = React40.useState(defaultCollapsed);
|
|
6587
6638
|
const isControlled = controlledCollapsed !== void 0;
|
|
6588
6639
|
const collapsed = isControlled ? controlledCollapsed : uncontrolledCollapsed;
|
|
6589
|
-
const setCollapsed =
|
|
6640
|
+
const setCollapsed = React40.useCallback(
|
|
6590
6641
|
(value) => {
|
|
6591
6642
|
if (!isControlled) {
|
|
6592
6643
|
setUncontrolledCollapsed(value);
|
|
@@ -6595,7 +6646,7 @@ var Sidebar = React39.forwardRef(
|
|
|
6595
6646
|
},
|
|
6596
6647
|
[isControlled, onCollapsedChange]
|
|
6597
6648
|
);
|
|
6598
|
-
return /* @__PURE__ */
|
|
6649
|
+
return /* @__PURE__ */ jsx41(SidebarContext.Provider, { value: { collapsed, setCollapsed }, children: /* @__PURE__ */ jsx41(
|
|
6599
6650
|
"aside",
|
|
6600
6651
|
{
|
|
6601
6652
|
ref,
|
|
@@ -6615,9 +6666,9 @@ var Sidebar = React39.forwardRef(
|
|
|
6615
6666
|
}
|
|
6616
6667
|
);
|
|
6617
6668
|
Sidebar.displayName = "Sidebar";
|
|
6618
|
-
var SidebarHeader =
|
|
6669
|
+
var SidebarHeader = React40.forwardRef(
|
|
6619
6670
|
({ className, children, ...props }, ref) => {
|
|
6620
|
-
return /* @__PURE__ */
|
|
6671
|
+
return /* @__PURE__ */ jsx41(
|
|
6621
6672
|
"div",
|
|
6622
6673
|
{
|
|
6623
6674
|
ref,
|
|
@@ -6629,9 +6680,9 @@ var SidebarHeader = React39.forwardRef(
|
|
|
6629
6680
|
}
|
|
6630
6681
|
);
|
|
6631
6682
|
SidebarHeader.displayName = "SidebarHeader";
|
|
6632
|
-
var SidebarContent =
|
|
6683
|
+
var SidebarContent = React40.forwardRef(
|
|
6633
6684
|
({ className, children, ...props }, ref) => {
|
|
6634
|
-
return /* @__PURE__ */
|
|
6685
|
+
return /* @__PURE__ */ jsx41(
|
|
6635
6686
|
"div",
|
|
6636
6687
|
{
|
|
6637
6688
|
ref,
|
|
@@ -6643,9 +6694,9 @@ var SidebarContent = React39.forwardRef(
|
|
|
6643
6694
|
}
|
|
6644
6695
|
);
|
|
6645
6696
|
SidebarContent.displayName = "SidebarContent";
|
|
6646
|
-
var SidebarFooter =
|
|
6697
|
+
var SidebarFooter = React40.forwardRef(
|
|
6647
6698
|
({ className, children, ...props }, ref) => {
|
|
6648
|
-
return /* @__PURE__ */
|
|
6699
|
+
return /* @__PURE__ */ jsx41(
|
|
6649
6700
|
"div",
|
|
6650
6701
|
{
|
|
6651
6702
|
ref,
|
|
@@ -6657,25 +6708,25 @@ var SidebarFooter = React39.forwardRef(
|
|
|
6657
6708
|
}
|
|
6658
6709
|
);
|
|
6659
6710
|
SidebarFooter.displayName = "SidebarFooter";
|
|
6660
|
-
var SidebarGroup =
|
|
6711
|
+
var SidebarGroup = React40.forwardRef(
|
|
6661
6712
|
({ className, label, children, ...props }, ref) => {
|
|
6662
6713
|
const { collapsed } = useSidebar();
|
|
6663
|
-
return /* @__PURE__ */
|
|
6664
|
-
label && !collapsed && /* @__PURE__ */
|
|
6665
|
-
label && collapsed && /* @__PURE__ */
|
|
6666
|
-
/* @__PURE__ */
|
|
6714
|
+
return /* @__PURE__ */ jsxs26("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
6715
|
+
label && !collapsed && /* @__PURE__ */ jsx41("div", { className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
6716
|
+
label && collapsed && /* @__PURE__ */ jsx41("div", { className: "flex justify-center py-1.5", children: /* @__PURE__ */ jsx41("div", { className: "h-px w-4 bg-border" }) }),
|
|
6717
|
+
/* @__PURE__ */ jsx41("div", { className: "space-y-1", children })
|
|
6667
6718
|
] });
|
|
6668
6719
|
}
|
|
6669
6720
|
);
|
|
6670
6721
|
SidebarGroup.displayName = "SidebarGroup";
|
|
6671
|
-
var SidebarItem =
|
|
6722
|
+
var SidebarItem = React40.forwardRef(
|
|
6672
6723
|
({ className, icon, active, disabled, badge, onClick, href, children, ...props }, ref) => {
|
|
6673
6724
|
const { collapsed } = useSidebar();
|
|
6674
|
-
const content = /* @__PURE__ */
|
|
6675
|
-
icon && /* @__PURE__ */
|
|
6676
|
-
!collapsed && /* @__PURE__ */
|
|
6677
|
-
/* @__PURE__ */
|
|
6678
|
-
badge && /* @__PURE__ */
|
|
6725
|
+
const content = /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
6726
|
+
icon && /* @__PURE__ */ jsx41("span", { className: cn("shrink-0", collapsed ? "mx-auto" : ""), children: icon }),
|
|
6727
|
+
!collapsed && /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
6728
|
+
/* @__PURE__ */ jsx41("span", { className: "flex-1 truncate", children }),
|
|
6729
|
+
badge && /* @__PURE__ */ jsx41("span", { className: "shrink-0", children: badge })
|
|
6679
6730
|
] })
|
|
6680
6731
|
] });
|
|
6681
6732
|
const itemClasses = cn(
|
|
@@ -6686,9 +6737,9 @@ var SidebarItem = React39.forwardRef(
|
|
|
6686
6737
|
className
|
|
6687
6738
|
);
|
|
6688
6739
|
if (href) {
|
|
6689
|
-
return /* @__PURE__ */
|
|
6740
|
+
return /* @__PURE__ */ jsx41("div", { ref, ...props, children: /* @__PURE__ */ jsx41("a", { href, className: itemClasses, children: content }) });
|
|
6690
6741
|
}
|
|
6691
|
-
return /* @__PURE__ */
|
|
6742
|
+
return /* @__PURE__ */ jsx41(
|
|
6692
6743
|
"div",
|
|
6693
6744
|
{
|
|
6694
6745
|
ref,
|
|
@@ -6703,20 +6754,20 @@ var SidebarItem = React39.forwardRef(
|
|
|
6703
6754
|
}
|
|
6704
6755
|
);
|
|
6705
6756
|
SidebarItem.displayName = "SidebarItem";
|
|
6706
|
-
var SidebarSubMenu =
|
|
6757
|
+
var SidebarSubMenu = React40.forwardRef(
|
|
6707
6758
|
({ className, icon, label, defaultOpen = false, children, ...props }, ref) => {
|
|
6708
|
-
const [open, setOpen] =
|
|
6759
|
+
const [open, setOpen] = React40.useState(defaultOpen);
|
|
6709
6760
|
const { collapsed } = useSidebar();
|
|
6710
|
-
|
|
6761
|
+
React40.useEffect(() => {
|
|
6711
6762
|
if (collapsed) {
|
|
6712
6763
|
setOpen(false);
|
|
6713
6764
|
}
|
|
6714
6765
|
}, [collapsed]);
|
|
6715
6766
|
if (collapsed) {
|
|
6716
|
-
return /* @__PURE__ */
|
|
6767
|
+
return /* @__PURE__ */ jsx41(SidebarItem, { icon, className, children: label });
|
|
6717
6768
|
}
|
|
6718
|
-
return /* @__PURE__ */
|
|
6719
|
-
/* @__PURE__ */
|
|
6769
|
+
return /* @__PURE__ */ jsxs26("div", { ref, className, ...props, children: [
|
|
6770
|
+
/* @__PURE__ */ jsxs26(
|
|
6720
6771
|
"div",
|
|
6721
6772
|
{
|
|
6722
6773
|
className: cn(
|
|
@@ -6727,9 +6778,9 @@ var SidebarSubMenu = React39.forwardRef(
|
|
|
6727
6778
|
role: "button",
|
|
6728
6779
|
tabIndex: 0,
|
|
6729
6780
|
children: [
|
|
6730
|
-
icon && /* @__PURE__ */
|
|
6731
|
-
/* @__PURE__ */
|
|
6732
|
-
/* @__PURE__ */
|
|
6781
|
+
icon && /* @__PURE__ */ jsx41("span", { className: "shrink-0", children: icon }),
|
|
6782
|
+
/* @__PURE__ */ jsx41("span", { className: "flex-1 truncate", children: label }),
|
|
6783
|
+
/* @__PURE__ */ jsx41(
|
|
6733
6784
|
"svg",
|
|
6734
6785
|
{
|
|
6735
6786
|
className: cn("h-4 w-4 shrink-0 transition-transform", open && "rotate-90"),
|
|
@@ -6740,21 +6791,21 @@ var SidebarSubMenu = React39.forwardRef(
|
|
|
6740
6791
|
strokeWidth: "2",
|
|
6741
6792
|
strokeLinecap: "round",
|
|
6742
6793
|
strokeLinejoin: "round",
|
|
6743
|
-
children: /* @__PURE__ */
|
|
6794
|
+
children: /* @__PURE__ */ jsx41("path", { d: "m9 18 6-6-6-6" })
|
|
6744
6795
|
}
|
|
6745
6796
|
)
|
|
6746
6797
|
]
|
|
6747
6798
|
}
|
|
6748
6799
|
),
|
|
6749
|
-
open && /* @__PURE__ */
|
|
6800
|
+
open && /* @__PURE__ */ jsx41("div", { className: "ml-4 pl-3 border-l border-border space-y-1 mt-1", children })
|
|
6750
6801
|
] });
|
|
6751
6802
|
}
|
|
6752
6803
|
);
|
|
6753
6804
|
SidebarSubMenu.displayName = "SidebarSubMenu";
|
|
6754
|
-
var SidebarToggle =
|
|
6805
|
+
var SidebarToggle = React40.forwardRef(
|
|
6755
6806
|
({ className, children, ...props }, ref) => {
|
|
6756
6807
|
const { collapsed, setCollapsed } = useSidebar();
|
|
6757
|
-
return /* @__PURE__ */
|
|
6808
|
+
return /* @__PURE__ */ jsx41(
|
|
6758
6809
|
"button",
|
|
6759
6810
|
{
|
|
6760
6811
|
ref,
|
|
@@ -6768,7 +6819,7 @@ var SidebarToggle = React39.forwardRef(
|
|
|
6768
6819
|
),
|
|
6769
6820
|
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
6770
6821
|
...props,
|
|
6771
|
-
children: children || /* @__PURE__ */
|
|
6822
|
+
children: children || /* @__PURE__ */ jsxs26(
|
|
6772
6823
|
"svg",
|
|
6773
6824
|
{
|
|
6774
6825
|
className: cn("h-5 w-5 transition-transform", collapsed && "rotate-180"),
|
|
@@ -6780,9 +6831,9 @@ var SidebarToggle = React39.forwardRef(
|
|
|
6780
6831
|
strokeLinecap: "round",
|
|
6781
6832
|
strokeLinejoin: "round",
|
|
6782
6833
|
children: [
|
|
6783
|
-
/* @__PURE__ */
|
|
6784
|
-
/* @__PURE__ */
|
|
6785
|
-
/* @__PURE__ */
|
|
6834
|
+
/* @__PURE__ */ jsx41("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
6835
|
+
/* @__PURE__ */ jsx41("path", { d: "M9 3v18" }),
|
|
6836
|
+
/* @__PURE__ */ jsx41("path", { d: "m14 9 3 3-3 3" })
|
|
6786
6837
|
]
|
|
6787
6838
|
}
|
|
6788
6839
|
)
|
|
@@ -6793,17 +6844,17 @@ var SidebarToggle = React39.forwardRef(
|
|
|
6793
6844
|
SidebarToggle.displayName = "SidebarToggle";
|
|
6794
6845
|
|
|
6795
6846
|
// src/components/sidebar-rail.tsx
|
|
6796
|
-
import * as
|
|
6797
|
-
import { Fragment as Fragment8, jsx as
|
|
6798
|
-
var SidebarRailContext =
|
|
6847
|
+
import * as React41 from "react";
|
|
6848
|
+
import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6849
|
+
var SidebarRailContext = React41.createContext(void 0);
|
|
6799
6850
|
var useSidebarRail = () => {
|
|
6800
|
-
const context =
|
|
6851
|
+
const context = React41.useContext(SidebarRailContext);
|
|
6801
6852
|
if (!context) {
|
|
6802
6853
|
throw new Error("useSidebarRail must be used within a SidebarRail");
|
|
6803
6854
|
}
|
|
6804
6855
|
return context;
|
|
6805
6856
|
};
|
|
6806
|
-
var SidebarRail =
|
|
6857
|
+
var SidebarRail = React41.forwardRef(
|
|
6807
6858
|
({
|
|
6808
6859
|
className,
|
|
6809
6860
|
defaultActiveRail = null,
|
|
@@ -6821,14 +6872,14 @@ var SidebarRail = React40.forwardRef(
|
|
|
6821
6872
|
children,
|
|
6822
6873
|
...props
|
|
6823
6874
|
}, ref) => {
|
|
6824
|
-
const [uncontrolledActiveRail, setUncontrolledActiveRail] =
|
|
6825
|
-
const [expanded, setExpanded] =
|
|
6826
|
-
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] =
|
|
6875
|
+
const [uncontrolledActiveRail, setUncontrolledActiveRail] = React41.useState(defaultActiveRail);
|
|
6876
|
+
const [expanded, setExpanded] = React41.useState(!!defaultActiveRail);
|
|
6877
|
+
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] = React41.useState(defaultRailExpanded);
|
|
6827
6878
|
const isControlled = controlledActiveRail !== void 0;
|
|
6828
6879
|
const activeRail = isControlled ? controlledActiveRail : uncontrolledActiveRail;
|
|
6829
6880
|
const isRailControlled = controlledRailExpanded !== void 0;
|
|
6830
6881
|
const railExpanded = isRailControlled ? controlledRailExpanded : uncontrolledRailExpanded;
|
|
6831
|
-
const setActiveRail =
|
|
6882
|
+
const setActiveRail = React41.useCallback(
|
|
6832
6883
|
(rail) => {
|
|
6833
6884
|
if (!isControlled) {
|
|
6834
6885
|
setUncontrolledActiveRail(rail);
|
|
@@ -6838,7 +6889,7 @@ var SidebarRail = React40.forwardRef(
|
|
|
6838
6889
|
},
|
|
6839
6890
|
[isControlled, onActiveRailChange]
|
|
6840
6891
|
);
|
|
6841
|
-
const setRailExpanded =
|
|
6892
|
+
const setRailExpanded = React41.useCallback(
|
|
6842
6893
|
(value) => {
|
|
6843
6894
|
if (!isRailControlled) {
|
|
6844
6895
|
setUncontrolledRailExpanded(value);
|
|
@@ -6847,7 +6898,7 @@ var SidebarRail = React40.forwardRef(
|
|
|
6847
6898
|
},
|
|
6848
6899
|
[isRailControlled, onRailExpandedChange]
|
|
6849
6900
|
);
|
|
6850
|
-
return /* @__PURE__ */
|
|
6901
|
+
return /* @__PURE__ */ jsx42(
|
|
6851
6902
|
SidebarRailContext.Provider,
|
|
6852
6903
|
{
|
|
6853
6904
|
value: {
|
|
@@ -6861,7 +6912,7 @@ var SidebarRail = React40.forwardRef(
|
|
|
6861
6912
|
overlayRail: overlayRail && expandableRail,
|
|
6862
6913
|
expandableRail
|
|
6863
6914
|
},
|
|
6864
|
-
children: /* @__PURE__ */
|
|
6915
|
+
children: /* @__PURE__ */ jsx42(
|
|
6865
6916
|
"div",
|
|
6866
6917
|
{
|
|
6867
6918
|
ref,
|
|
@@ -6884,11 +6935,11 @@ var SidebarRail = React40.forwardRef(
|
|
|
6884
6935
|
}
|
|
6885
6936
|
);
|
|
6886
6937
|
SidebarRail.displayName = "SidebarRail";
|
|
6887
|
-
var IconRail =
|
|
6938
|
+
var IconRail = React41.forwardRef(
|
|
6888
6939
|
({ className, children, ...props }, ref) => {
|
|
6889
6940
|
const { railExpanded, overlayRail, expandableRail } = useSidebarRail();
|
|
6890
6941
|
const isExpanded = expandableRail && railExpanded;
|
|
6891
|
-
return /* @__PURE__ */
|
|
6942
|
+
return /* @__PURE__ */ jsx42(
|
|
6892
6943
|
"div",
|
|
6893
6944
|
{
|
|
6894
6945
|
ref,
|
|
@@ -6897,7 +6948,7 @@ var IconRail = React40.forwardRef(
|
|
|
6897
6948
|
isExpanded && !overlayRail ? "w-[var(--rail-expanded-width)]" : "w-[var(--rail-width)]"
|
|
6898
6949
|
),
|
|
6899
6950
|
...props,
|
|
6900
|
-
children: /* @__PURE__ */
|
|
6951
|
+
children: /* @__PURE__ */ jsx42(
|
|
6901
6952
|
"div",
|
|
6902
6953
|
{
|
|
6903
6954
|
className: cn(
|
|
@@ -6914,9 +6965,9 @@ var IconRail = React40.forwardRef(
|
|
|
6914
6965
|
}
|
|
6915
6966
|
);
|
|
6916
6967
|
IconRail.displayName = "IconRail";
|
|
6917
|
-
var IconRailHeader =
|
|
6968
|
+
var IconRailHeader = React41.forwardRef(
|
|
6918
6969
|
({ className, children, ...props }, ref) => {
|
|
6919
|
-
return /* @__PURE__ */
|
|
6970
|
+
return /* @__PURE__ */ jsx42(
|
|
6920
6971
|
"div",
|
|
6921
6972
|
{
|
|
6922
6973
|
ref,
|
|
@@ -6931,9 +6982,9 @@ var IconRailHeader = React40.forwardRef(
|
|
|
6931
6982
|
}
|
|
6932
6983
|
);
|
|
6933
6984
|
IconRailHeader.displayName = "IconRailHeader";
|
|
6934
|
-
var IconRailContent =
|
|
6985
|
+
var IconRailContent = React41.forwardRef(
|
|
6935
6986
|
({ className, children, ...props }, ref) => {
|
|
6936
|
-
return /* @__PURE__ */
|
|
6987
|
+
return /* @__PURE__ */ jsx42(
|
|
6937
6988
|
"div",
|
|
6938
6989
|
{
|
|
6939
6990
|
ref,
|
|
@@ -6945,9 +6996,9 @@ var IconRailContent = React40.forwardRef(
|
|
|
6945
6996
|
}
|
|
6946
6997
|
);
|
|
6947
6998
|
IconRailContent.displayName = "IconRailContent";
|
|
6948
|
-
var IconRailFooter =
|
|
6999
|
+
var IconRailFooter = React41.forwardRef(
|
|
6949
7000
|
({ className, children, ...props }, ref) => {
|
|
6950
|
-
return /* @__PURE__ */
|
|
7001
|
+
return /* @__PURE__ */ jsx42(
|
|
6951
7002
|
"div",
|
|
6952
7003
|
{
|
|
6953
7004
|
ref,
|
|
@@ -6962,7 +7013,7 @@ var IconRailFooter = React40.forwardRef(
|
|
|
6962
7013
|
}
|
|
6963
7014
|
);
|
|
6964
7015
|
IconRailFooter.displayName = "IconRailFooter";
|
|
6965
|
-
var IconRailItem =
|
|
7016
|
+
var IconRailItem = React41.forwardRef(
|
|
6966
7017
|
({ className, railId, icon, label, asButton = false, toggleRail = false, onClick, ...props }, ref) => {
|
|
6967
7018
|
const {
|
|
6968
7019
|
activeRail,
|
|
@@ -6988,7 +7039,7 @@ var IconRailItem = React40.forwardRef(
|
|
|
6988
7039
|
setActiveRail(railId);
|
|
6989
7040
|
}
|
|
6990
7041
|
};
|
|
6991
|
-
return /* @__PURE__ */
|
|
7042
|
+
return /* @__PURE__ */ jsxs27(
|
|
6992
7043
|
"button",
|
|
6993
7044
|
{
|
|
6994
7045
|
ref,
|
|
@@ -7007,14 +7058,14 @@ var IconRailItem = React40.forwardRef(
|
|
|
7007
7058
|
...props,
|
|
7008
7059
|
children: [
|
|
7009
7060
|
icon,
|
|
7010
|
-
isRailExpanded && label && /* @__PURE__ */
|
|
7061
|
+
isRailExpanded && label && /* @__PURE__ */ jsx42("span", { className: "text-sm font-medium truncate", children: label })
|
|
7011
7062
|
]
|
|
7012
7063
|
}
|
|
7013
7064
|
);
|
|
7014
7065
|
}
|
|
7015
7066
|
);
|
|
7016
7067
|
IconRailItem.displayName = "IconRailItem";
|
|
7017
|
-
var RailPanel =
|
|
7068
|
+
var RailPanel = React41.forwardRef(
|
|
7018
7069
|
({ className, railId, title, children, ...props }, ref) => {
|
|
7019
7070
|
const { activeRail, setActiveRail, hoverExpand } = useSidebarRail();
|
|
7020
7071
|
const isVisible = activeRail === railId;
|
|
@@ -7024,7 +7075,7 @@ var RailPanel = React40.forwardRef(
|
|
|
7024
7075
|
}
|
|
7025
7076
|
};
|
|
7026
7077
|
if (!isVisible) return null;
|
|
7027
|
-
return /* @__PURE__ */
|
|
7078
|
+
return /* @__PURE__ */ jsxs27(
|
|
7028
7079
|
"div",
|
|
7029
7080
|
{
|
|
7030
7081
|
ref,
|
|
@@ -7037,16 +7088,16 @@ var RailPanel = React40.forwardRef(
|
|
|
7037
7088
|
onMouseLeave: handleMouseLeave,
|
|
7038
7089
|
...props,
|
|
7039
7090
|
children: [
|
|
7040
|
-
title && /* @__PURE__ */
|
|
7041
|
-
/* @__PURE__ */
|
|
7042
|
-
/* @__PURE__ */
|
|
7091
|
+
title && /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between h-14 px-4 border-b border-border shrink-0", children: [
|
|
7092
|
+
/* @__PURE__ */ jsx42("span", { className: "font-semibold text-sm", children: title }),
|
|
7093
|
+
/* @__PURE__ */ jsx42(
|
|
7043
7094
|
"button",
|
|
7044
7095
|
{
|
|
7045
7096
|
type: "button",
|
|
7046
7097
|
onClick: () => setActiveRail(null),
|
|
7047
7098
|
className: "p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",
|
|
7048
7099
|
"aria-label": "Close panel",
|
|
7049
|
-
children: /* @__PURE__ */
|
|
7100
|
+
children: /* @__PURE__ */ jsxs27(
|
|
7050
7101
|
"svg",
|
|
7051
7102
|
{
|
|
7052
7103
|
className: "h-4 w-4",
|
|
@@ -7058,36 +7109,36 @@ var RailPanel = React40.forwardRef(
|
|
|
7058
7109
|
strokeLinecap: "round",
|
|
7059
7110
|
strokeLinejoin: "round",
|
|
7060
7111
|
children: [
|
|
7061
|
-
/* @__PURE__ */
|
|
7062
|
-
/* @__PURE__ */
|
|
7112
|
+
/* @__PURE__ */ jsx42("path", { d: "M18 6 6 18" }),
|
|
7113
|
+
/* @__PURE__ */ jsx42("path", { d: "m6 6 12 12" })
|
|
7063
7114
|
]
|
|
7064
7115
|
}
|
|
7065
7116
|
)
|
|
7066
7117
|
}
|
|
7067
7118
|
)
|
|
7068
7119
|
] }),
|
|
7069
|
-
/* @__PURE__ */
|
|
7120
|
+
/* @__PURE__ */ jsx42("div", { className: "flex-1 overflow-y-auto", children })
|
|
7070
7121
|
]
|
|
7071
7122
|
}
|
|
7072
7123
|
);
|
|
7073
7124
|
}
|
|
7074
7125
|
);
|
|
7075
7126
|
RailPanel.displayName = "RailPanel";
|
|
7076
|
-
var RailPanelGroup =
|
|
7127
|
+
var RailPanelGroup = React41.forwardRef(
|
|
7077
7128
|
({ className, label, children, ...props }, ref) => {
|
|
7078
|
-
return /* @__PURE__ */
|
|
7079
|
-
label && /* @__PURE__ */
|
|
7080
|
-
/* @__PURE__ */
|
|
7129
|
+
return /* @__PURE__ */ jsxs27("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
7130
|
+
label && /* @__PURE__ */ jsx42("div", { className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
7131
|
+
/* @__PURE__ */ jsx42("div", { className: "space-y-1", children })
|
|
7081
7132
|
] });
|
|
7082
7133
|
}
|
|
7083
7134
|
);
|
|
7084
7135
|
RailPanelGroup.displayName = "RailPanelGroup";
|
|
7085
|
-
var RailPanelItem =
|
|
7136
|
+
var RailPanelItem = React41.forwardRef(
|
|
7086
7137
|
({ className, icon, active, disabled, badge, href, children, onClick, ...props }, ref) => {
|
|
7087
|
-
const content = /* @__PURE__ */
|
|
7088
|
-
icon && /* @__PURE__ */
|
|
7089
|
-
/* @__PURE__ */
|
|
7090
|
-
badge && /* @__PURE__ */
|
|
7138
|
+
const content = /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
7139
|
+
icon && /* @__PURE__ */ jsx42("span", { className: "shrink-0", children: icon }),
|
|
7140
|
+
/* @__PURE__ */ jsx42("span", { className: "flex-1 truncate", children }),
|
|
7141
|
+
badge && /* @__PURE__ */ jsx42("span", { className: "shrink-0", children: badge })
|
|
7091
7142
|
] });
|
|
7092
7143
|
const itemClasses = cn(
|
|
7093
7144
|
"flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors cursor-pointer",
|
|
@@ -7096,9 +7147,9 @@ var RailPanelItem = React40.forwardRef(
|
|
|
7096
7147
|
className
|
|
7097
7148
|
);
|
|
7098
7149
|
if (href) {
|
|
7099
|
-
return /* @__PURE__ */
|
|
7150
|
+
return /* @__PURE__ */ jsx42("div", { ref, ...props, children: /* @__PURE__ */ jsx42("a", { href, className: itemClasses, children: content }) });
|
|
7100
7151
|
}
|
|
7101
|
-
return /* @__PURE__ */
|
|
7152
|
+
return /* @__PURE__ */ jsx42(
|
|
7102
7153
|
"div",
|
|
7103
7154
|
{
|
|
7104
7155
|
ref,
|
|
@@ -7115,34 +7166,34 @@ var RailPanelItem = React40.forwardRef(
|
|
|
7115
7166
|
RailPanelItem.displayName = "RailPanelItem";
|
|
7116
7167
|
|
|
7117
7168
|
// src/playground.tsx
|
|
7118
|
-
import * as
|
|
7119
|
-
import { jsx as
|
|
7120
|
-
var Section = ({ title, children }) => /* @__PURE__ */
|
|
7121
|
-
/* @__PURE__ */
|
|
7122
|
-
/* @__PURE__ */
|
|
7169
|
+
import * as React42 from "react";
|
|
7170
|
+
import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7171
|
+
var Section = ({ title, children }) => /* @__PURE__ */ jsxs28("div", { className: "mb-8", children: [
|
|
7172
|
+
/* @__PURE__ */ jsx43("h2", { className: "text-xl font-semibold mb-4 text-foreground", children: title }),
|
|
7173
|
+
/* @__PURE__ */ jsx43("div", { className: "p-4 border border-border rounded-lg bg-background", children })
|
|
7123
7174
|
] });
|
|
7124
7175
|
var ThemeToggle = () => {
|
|
7125
7176
|
const { theme, setTheme } = useTheme();
|
|
7126
|
-
return /* @__PURE__ */
|
|
7127
|
-
/* @__PURE__ */
|
|
7128
|
-
/* @__PURE__ */
|
|
7129
|
-
/* @__PURE__ */
|
|
7130
|
-
/* @__PURE__ */
|
|
7131
|
-
/* @__PURE__ */
|
|
7132
|
-
/* @__PURE__ */
|
|
7133
|
-
/* @__PURE__ */
|
|
7177
|
+
return /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7178
|
+
/* @__PURE__ */ jsx43(Label, { children: "Theme:" }),
|
|
7179
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { value: theme, onValueChange: (value) => setTheme(value), children: [
|
|
7180
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-32", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select theme" }) }),
|
|
7181
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7182
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "light", children: "Light" }),
|
|
7183
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "dark", children: "Dark" }),
|
|
7184
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "system", children: "System" })
|
|
7134
7185
|
] })
|
|
7135
7186
|
] })
|
|
7136
7187
|
] });
|
|
7137
7188
|
};
|
|
7138
7189
|
var PlaygroundContent = () => {
|
|
7139
|
-
const [dialogOpen, setDialogOpen] =
|
|
7140
|
-
const [checkboxChecked, setCheckboxChecked] =
|
|
7141
|
-
const [switchChecked, setSwitchChecked] =
|
|
7142
|
-
const [inputValue, setInputValue] =
|
|
7143
|
-
const [textareaValue, setTextareaValue] =
|
|
7144
|
-
const [selectValue, setSelectValue] =
|
|
7145
|
-
const [comboboxValue, setComboboxValue] =
|
|
7190
|
+
const [dialogOpen, setDialogOpen] = React42.useState(false);
|
|
7191
|
+
const [checkboxChecked, setCheckboxChecked] = React42.useState(false);
|
|
7192
|
+
const [switchChecked, setSwitchChecked] = React42.useState(false);
|
|
7193
|
+
const [inputValue, setInputValue] = React42.useState("");
|
|
7194
|
+
const [textareaValue, setTextareaValue] = React42.useState("");
|
|
7195
|
+
const [selectValue, setSelectValue] = React42.useState("");
|
|
7196
|
+
const [comboboxValue, setComboboxValue] = React42.useState(null);
|
|
7146
7197
|
const comboboxOptions = [
|
|
7147
7198
|
{ value: "react", label: "React" },
|
|
7148
7199
|
{ value: "vue", label: "Vue" },
|
|
@@ -7150,35 +7201,35 @@ var PlaygroundContent = () => {
|
|
|
7150
7201
|
{ value: "svelte", label: "Svelte" },
|
|
7151
7202
|
{ value: "solid", label: "SolidJS" }
|
|
7152
7203
|
];
|
|
7153
|
-
return /* @__PURE__ */
|
|
7154
|
-
/* @__PURE__ */
|
|
7155
|
-
/* @__PURE__ */
|
|
7156
|
-
/* @__PURE__ */
|
|
7204
|
+
return /* @__PURE__ */ jsx43("div", { className: "min-h-screen bg-background p-8", children: /* @__PURE__ */ jsxs28("div", { className: "max-w-4xl mx-auto", children: [
|
|
7205
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between mb-8", children: [
|
|
7206
|
+
/* @__PURE__ */ jsx43("h1", { className: "text-3xl font-bold text-foreground", children: "@onesaz/ui Playground" }),
|
|
7207
|
+
/* @__PURE__ */ jsx43(ThemeToggle, {})
|
|
7157
7208
|
] }),
|
|
7158
|
-
/* @__PURE__ */
|
|
7159
|
-
/* @__PURE__ */
|
|
7160
|
-
/* @__PURE__ */
|
|
7161
|
-
/* @__PURE__ */
|
|
7162
|
-
/* @__PURE__ */
|
|
7163
|
-
/* @__PURE__ */
|
|
7164
|
-
/* @__PURE__ */
|
|
7165
|
-
/* @__PURE__ */
|
|
7209
|
+
/* @__PURE__ */ jsxs28(Section, { title: "Button", children: [
|
|
7210
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-4", children: [
|
|
7211
|
+
/* @__PURE__ */ jsx43(Button, { variant: "default", children: "Default" }),
|
|
7212
|
+
/* @__PURE__ */ jsx43(Button, { variant: "destructive", children: "Destructive" }),
|
|
7213
|
+
/* @__PURE__ */ jsx43(Button, { variant: "outline", children: "Outline" }),
|
|
7214
|
+
/* @__PURE__ */ jsx43(Button, { variant: "secondary", children: "Secondary" }),
|
|
7215
|
+
/* @__PURE__ */ jsx43(Button, { variant: "ghost", children: "Ghost" }),
|
|
7216
|
+
/* @__PURE__ */ jsx43(Button, { variant: "link", children: "Link" })
|
|
7166
7217
|
] }),
|
|
7167
|
-
/* @__PURE__ */
|
|
7168
|
-
/* @__PURE__ */
|
|
7169
|
-
/* @__PURE__ */
|
|
7170
|
-
/* @__PURE__ */
|
|
7171
|
-
/* @__PURE__ */
|
|
7218
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-4 mt-4", children: [
|
|
7219
|
+
/* @__PURE__ */ jsx43(Button, { size: "sm", children: "Small" }),
|
|
7220
|
+
/* @__PURE__ */ jsx43(Button, { size: "default", children: "Default" }),
|
|
7221
|
+
/* @__PURE__ */ jsx43(Button, { size: "lg", children: "Large" }),
|
|
7222
|
+
/* @__PURE__ */ jsx43(Button, { size: "icon", children: "\u{1F514}" })
|
|
7172
7223
|
] }),
|
|
7173
|
-
/* @__PURE__ */
|
|
7174
|
-
/* @__PURE__ */
|
|
7175
|
-
/* @__PURE__ */
|
|
7224
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-4 mt-4", children: [
|
|
7225
|
+
/* @__PURE__ */ jsx43(Button, { disabled: true, children: "Disabled" }),
|
|
7226
|
+
/* @__PURE__ */ jsx43(Button, { variant: "outline", disabled: true, children: "Disabled Outline" })
|
|
7176
7227
|
] })
|
|
7177
7228
|
] }),
|
|
7178
|
-
/* @__PURE__ */
|
|
7179
|
-
/* @__PURE__ */
|
|
7180
|
-
/* @__PURE__ */
|
|
7181
|
-
/* @__PURE__ */
|
|
7229
|
+
/* @__PURE__ */ jsx43(Section, { title: "Input", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4 max-w-md", children: [
|
|
7230
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7231
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "input-default", children: "Default Input" }),
|
|
7232
|
+
/* @__PURE__ */ jsx43(
|
|
7182
7233
|
Input,
|
|
7183
7234
|
{
|
|
7184
7235
|
id: "input-default",
|
|
@@ -7188,19 +7239,19 @@ var PlaygroundContent = () => {
|
|
|
7188
7239
|
}
|
|
7189
7240
|
)
|
|
7190
7241
|
] }),
|
|
7191
|
-
/* @__PURE__ */
|
|
7192
|
-
/* @__PURE__ */
|
|
7193
|
-
/* @__PURE__ */
|
|
7242
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7243
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "input-disabled", children: "Disabled Input" }),
|
|
7244
|
+
/* @__PURE__ */ jsx43(Input, { id: "input-disabled", placeholder: "Disabled...", disabled: true })
|
|
7194
7245
|
] }),
|
|
7195
|
-
/* @__PURE__ */
|
|
7196
|
-
/* @__PURE__ */
|
|
7197
|
-
/* @__PURE__ */
|
|
7246
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7247
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "input-type", children: "Email Input" }),
|
|
7248
|
+
/* @__PURE__ */ jsx43(Input, { id: "input-type", type: "email", placeholder: "email@example.com" })
|
|
7198
7249
|
] })
|
|
7199
7250
|
] }) }),
|
|
7200
|
-
/* @__PURE__ */
|
|
7201
|
-
/* @__PURE__ */
|
|
7202
|
-
/* @__PURE__ */
|
|
7203
|
-
/* @__PURE__ */
|
|
7251
|
+
/* @__PURE__ */ jsx43(Section, { title: "Textarea", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4 max-w-md", children: [
|
|
7252
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7253
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "textarea-default", children: "Default Textarea" }),
|
|
7254
|
+
/* @__PURE__ */ jsx43(
|
|
7204
7255
|
Textarea,
|
|
7205
7256
|
{
|
|
7206
7257
|
id: "textarea-default",
|
|
@@ -7210,52 +7261,52 @@ var PlaygroundContent = () => {
|
|
|
7210
7261
|
}
|
|
7211
7262
|
)
|
|
7212
7263
|
] }),
|
|
7213
|
-
/* @__PURE__ */
|
|
7214
|
-
/* @__PURE__ */
|
|
7215
|
-
/* @__PURE__ */
|
|
7264
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7265
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "textarea-disabled", children: "Disabled Textarea" }),
|
|
7266
|
+
/* @__PURE__ */ jsx43(Textarea, { id: "textarea-disabled", placeholder: "Disabled...", disabled: true })
|
|
7216
7267
|
] })
|
|
7217
7268
|
] }) }),
|
|
7218
|
-
/* @__PURE__ */
|
|
7219
|
-
/* @__PURE__ */
|
|
7220
|
-
/* @__PURE__ */
|
|
7221
|
-
/* @__PURE__ */
|
|
7222
|
-
/* @__PURE__ */
|
|
7223
|
-
/* @__PURE__ */
|
|
7224
|
-
/* @__PURE__ */
|
|
7225
|
-
/* @__PURE__ */
|
|
7226
|
-
/* @__PURE__ */
|
|
7269
|
+
/* @__PURE__ */ jsx43(Section, { title: "Select", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4 max-w-md", children: [
|
|
7270
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7271
|
+
/* @__PURE__ */ jsx43(Label, { children: "Default Select" }),
|
|
7272
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { value: selectValue, onValueChange: setSelectValue, children: [
|
|
7273
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select an option..." }) }),
|
|
7274
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7275
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "option1", children: "Option 1" }),
|
|
7276
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "option2", children: "Option 2" }),
|
|
7277
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "option3", children: "Option 3" })
|
|
7227
7278
|
] })
|
|
7228
7279
|
] })
|
|
7229
7280
|
] }),
|
|
7230
|
-
/* @__PURE__ */
|
|
7231
|
-
/* @__PURE__ */
|
|
7232
|
-
/* @__PURE__ */
|
|
7233
|
-
/* @__PURE__ */
|
|
7234
|
-
/* @__PURE__ */
|
|
7235
|
-
/* @__PURE__ */
|
|
7236
|
-
/* @__PURE__ */
|
|
7237
|
-
/* @__PURE__ */
|
|
7238
|
-
/* @__PURE__ */
|
|
7281
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7282
|
+
/* @__PURE__ */ jsx43(Label, { children: "Grouped Select" }),
|
|
7283
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { children: [
|
|
7284
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select a food..." }) }),
|
|
7285
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7286
|
+
/* @__PURE__ */ jsxs28(SelectGroup, { children: [
|
|
7287
|
+
/* @__PURE__ */ jsx43(SelectLabel, { children: "Fruits" }),
|
|
7288
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "apple", children: "Apple" }),
|
|
7289
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "banana", children: "Banana" })
|
|
7239
7290
|
] }),
|
|
7240
|
-
/* @__PURE__ */
|
|
7241
|
-
/* @__PURE__ */
|
|
7242
|
-
/* @__PURE__ */
|
|
7243
|
-
/* @__PURE__ */
|
|
7291
|
+
/* @__PURE__ */ jsxs28(SelectGroup, { children: [
|
|
7292
|
+
/* @__PURE__ */ jsx43(SelectLabel, { children: "Vegetables" }),
|
|
7293
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "carrot", children: "Carrot" }),
|
|
7294
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "potato", children: "Potato" })
|
|
7244
7295
|
] })
|
|
7245
7296
|
] })
|
|
7246
7297
|
] })
|
|
7247
7298
|
] }),
|
|
7248
|
-
/* @__PURE__ */
|
|
7249
|
-
/* @__PURE__ */
|
|
7250
|
-
/* @__PURE__ */
|
|
7251
|
-
/* @__PURE__ */
|
|
7252
|
-
/* @__PURE__ */
|
|
7299
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7300
|
+
/* @__PURE__ */ jsx43(Label, { children: "Disabled Select" }),
|
|
7301
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { disabled: true, children: [
|
|
7302
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Disabled..." }) }),
|
|
7303
|
+
/* @__PURE__ */ jsx43(SelectContent, { children: /* @__PURE__ */ jsx43(SelectItem, { value: "none", children: "None" }) })
|
|
7253
7304
|
] })
|
|
7254
7305
|
] })
|
|
7255
7306
|
] }) }),
|
|
7256
|
-
/* @__PURE__ */
|
|
7257
|
-
/* @__PURE__ */
|
|
7258
|
-
/* @__PURE__ */
|
|
7307
|
+
/* @__PURE__ */ jsx43(Section, { title: "Combobox (Searchable Select)", children: /* @__PURE__ */ jsx43("div", { className: "space-y-4 max-w-md", children: /* @__PURE__ */ jsxs28("div", { children: [
|
|
7308
|
+
/* @__PURE__ */ jsx43(Label, { children: "Framework" }),
|
|
7309
|
+
/* @__PURE__ */ jsx43(
|
|
7259
7310
|
Combobox,
|
|
7260
7311
|
{
|
|
7261
7312
|
options: comboboxOptions,
|
|
@@ -7267,9 +7318,9 @@ var PlaygroundContent = () => {
|
|
|
7267
7318
|
}
|
|
7268
7319
|
)
|
|
7269
7320
|
] }) }) }),
|
|
7270
|
-
/* @__PURE__ */
|
|
7271
|
-
/* @__PURE__ */
|
|
7272
|
-
/* @__PURE__ */
|
|
7321
|
+
/* @__PURE__ */ jsx43(Section, { title: "Checkbox & Switch", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4", children: [
|
|
7322
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7323
|
+
/* @__PURE__ */ jsx43(
|
|
7273
7324
|
Checkbox,
|
|
7274
7325
|
{
|
|
7275
7326
|
id: "checkbox",
|
|
@@ -7277,15 +7328,15 @@ var PlaygroundContent = () => {
|
|
|
7277
7328
|
onChange: (e) => setCheckboxChecked(e.target.checked)
|
|
7278
7329
|
}
|
|
7279
7330
|
),
|
|
7280
|
-
/* @__PURE__ */
|
|
7331
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "checkbox", children: "Accept terms and conditions" })
|
|
7281
7332
|
] }),
|
|
7282
|
-
/* @__PURE__ */
|
|
7283
|
-
/* @__PURE__ */
|
|
7284
|
-
/* @__PURE__ */
|
|
7333
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7334
|
+
/* @__PURE__ */ jsx43(Checkbox, { id: "checkbox-disabled", disabled: true }),
|
|
7335
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "checkbox-disabled", children: "Disabled checkbox" })
|
|
7285
7336
|
] }),
|
|
7286
|
-
/* @__PURE__ */
|
|
7287
|
-
/* @__PURE__ */
|
|
7288
|
-
/* @__PURE__ */
|
|
7337
|
+
/* @__PURE__ */ jsx43(Separator, {}),
|
|
7338
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7339
|
+
/* @__PURE__ */ jsx43(
|
|
7289
7340
|
Switch,
|
|
7290
7341
|
{
|
|
7291
7342
|
id: "switch",
|
|
@@ -7293,161 +7344,165 @@ var PlaygroundContent = () => {
|
|
|
7293
7344
|
onChange: (e) => setSwitchChecked(e.target.checked)
|
|
7294
7345
|
}
|
|
7295
7346
|
),
|
|
7296
|
-
/* @__PURE__ */
|
|
7347
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "switch", children: "Enable notifications" })
|
|
7297
7348
|
] }),
|
|
7298
|
-
/* @__PURE__ */
|
|
7299
|
-
/* @__PURE__ */
|
|
7300
|
-
/* @__PURE__ */
|
|
7349
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7350
|
+
/* @__PURE__ */ jsx43(Switch, { id: "switch-disabled", disabled: true }),
|
|
7351
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "switch-disabled", children: "Disabled switch" })
|
|
7301
7352
|
] })
|
|
7302
7353
|
] }) }),
|
|
7303
|
-
/* @__PURE__ */
|
|
7304
|
-
/* @__PURE__ */
|
|
7305
|
-
/* @__PURE__ */
|
|
7306
|
-
/* @__PURE__ */
|
|
7307
|
-
/* @__PURE__ */
|
|
7354
|
+
/* @__PURE__ */ jsx43(Section, { title: "Badge", children: /* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-4", children: [
|
|
7355
|
+
/* @__PURE__ */ jsx43(Badge, { children: "Default" }),
|
|
7356
|
+
/* @__PURE__ */ jsx43(Badge, { variant: "secondary", children: "Secondary" }),
|
|
7357
|
+
/* @__PURE__ */ jsx43(Badge, { variant: "destructive", children: "Destructive" }),
|
|
7358
|
+
/* @__PURE__ */ jsx43(Badge, { variant: "outline", children: "Outline" })
|
|
7308
7359
|
] }) }),
|
|
7309
|
-
/* @__PURE__ */
|
|
7310
|
-
/* @__PURE__ */
|
|
7311
|
-
/* @__PURE__ */
|
|
7312
|
-
/* @__PURE__ */
|
|
7313
|
-
/* @__PURE__ */
|
|
7360
|
+
/* @__PURE__ */ jsx43(Section, { title: "Card", children: /* @__PURE__ */ jsxs28("div", { className: "grid gap-4 md:grid-cols-2", children: [
|
|
7361
|
+
/* @__PURE__ */ jsxs28(Card, { children: [
|
|
7362
|
+
/* @__PURE__ */ jsxs28(CardHeader, { children: [
|
|
7363
|
+
/* @__PURE__ */ jsx43(CardTitle, { children: "Card Title" }),
|
|
7364
|
+
/* @__PURE__ */ jsx43(CardDescription, { children: "Card description goes here" })
|
|
7314
7365
|
] }),
|
|
7315
|
-
/* @__PURE__ */
|
|
7316
|
-
/* @__PURE__ */
|
|
7317
|
-
/* @__PURE__ */
|
|
7318
|
-
/* @__PURE__ */
|
|
7366
|
+
/* @__PURE__ */ jsx43(CardContent, { children: /* @__PURE__ */ jsx43("p", { className: "text-foreground", children: "This is the card content area." }) }),
|
|
7367
|
+
/* @__PURE__ */ jsxs28(CardFooter, { children: [
|
|
7368
|
+
/* @__PURE__ */ jsx43(Button, { variant: "outline", className: "mr-2", children: "Cancel" }),
|
|
7369
|
+
/* @__PURE__ */ jsx43(Button, { children: "Submit" })
|
|
7319
7370
|
] })
|
|
7320
7371
|
] }),
|
|
7321
|
-
/* @__PURE__ */
|
|
7322
|
-
/* @__PURE__ */
|
|
7323
|
-
/* @__PURE__ */
|
|
7324
|
-
/* @__PURE__ */
|
|
7372
|
+
/* @__PURE__ */ jsxs28(Card, { children: [
|
|
7373
|
+
/* @__PURE__ */ jsxs28(CardHeader, { children: [
|
|
7374
|
+
/* @__PURE__ */ jsx43(CardTitle, { children: "Another Card" }),
|
|
7375
|
+
/* @__PURE__ */ jsx43(CardDescription, { children: "With different content" })
|
|
7325
7376
|
] }),
|
|
7326
|
-
/* @__PURE__ */
|
|
7327
|
-
/* @__PURE__ */
|
|
7328
|
-
/* @__PURE__ */
|
|
7377
|
+
/* @__PURE__ */ jsx43(CardContent, { children: /* @__PURE__ */ jsxs28("div", { className: "space-y-2", children: [
|
|
7378
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "card-input", children: "Name" }),
|
|
7379
|
+
/* @__PURE__ */ jsx43(Input, { id: "card-input", placeholder: "Enter name..." })
|
|
7329
7380
|
] }) }),
|
|
7330
|
-
/* @__PURE__ */
|
|
7381
|
+
/* @__PURE__ */ jsx43(CardFooter, { children: /* @__PURE__ */ jsx43(Button, { className: "w-full", children: "Save" }) })
|
|
7331
7382
|
] })
|
|
7332
7383
|
] }) }),
|
|
7333
|
-
/* @__PURE__ */
|
|
7334
|
-
/* @__PURE__ */
|
|
7335
|
-
/* @__PURE__ */
|
|
7336
|
-
/* @__PURE__ */
|
|
7337
|
-
/* @__PURE__ */
|
|
7338
|
-
/* @__PURE__ */
|
|
7384
|
+
/* @__PURE__ */ jsxs28(Section, { title: "Dialog", children: [
|
|
7385
|
+
/* @__PURE__ */ jsx43(Button, { onClick: () => setDialogOpen(true), children: "Open Dialog" }),
|
|
7386
|
+
/* @__PURE__ */ jsx43(DialogNamespace, { open: dialogOpen, onOpenChange: setDialogOpen, children: /* @__PURE__ */ jsxs28(DialogContent, { children: [
|
|
7387
|
+
/* @__PURE__ */ jsxs28(DialogHeader, { children: [
|
|
7388
|
+
/* @__PURE__ */ jsx43(DialogTitle, { children: "Create New Zone" }),
|
|
7389
|
+
/* @__PURE__ */ jsx43(DialogDescription, { children: "Fill in the details below to create a new zone." })
|
|
7339
7390
|
] }),
|
|
7340
|
-
/* @__PURE__ */
|
|
7341
|
-
/* @__PURE__ */
|
|
7342
|
-
/* @__PURE__ */
|
|
7343
|
-
/* @__PURE__ */
|
|
7344
|
-
/* @__PURE__ */
|
|
7391
|
+
/* @__PURE__ */ jsxs28("div", { className: "space-y-4 py-4", children: [
|
|
7392
|
+
/* @__PURE__ */ jsxs28("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7393
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7394
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "zone-name", children: "Zone Name *" }),
|
|
7395
|
+
/* @__PURE__ */ jsx43(Input, { id: "zone-name", placeholder: "eg:hyderabad" })
|
|
7345
7396
|
] }),
|
|
7346
|
-
/* @__PURE__ */
|
|
7347
|
-
/* @__PURE__ */
|
|
7348
|
-
/* @__PURE__ */
|
|
7397
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7398
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "zone-code", children: "Zone Code *" }),
|
|
7399
|
+
/* @__PURE__ */ jsx43(Input, { id: "zone-code", placeholder: "eg :hyd022" })
|
|
7349
7400
|
] })
|
|
7350
7401
|
] }),
|
|
7351
|
-
/* @__PURE__ */
|
|
7352
|
-
/* @__PURE__ */
|
|
7353
|
-
/* @__PURE__ */
|
|
7354
|
-
/* @__PURE__ */
|
|
7355
|
-
/* @__PURE__ */
|
|
7356
|
-
/* @__PURE__ */
|
|
7357
|
-
/* @__PURE__ */
|
|
7358
|
-
/* @__PURE__ */
|
|
7402
|
+
/* @__PURE__ */ jsxs28("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7403
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7404
|
+
/* @__PURE__ */ jsx43(Label, { children: "State *" }),
|
|
7405
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { children: [
|
|
7406
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select state" }) }),
|
|
7407
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7408
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "telangana", children: "TELANGANA" }),
|
|
7409
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "andhra", children: "ANDHRA PRADESH" })
|
|
7359
7410
|
] })
|
|
7360
7411
|
] })
|
|
7361
7412
|
] }),
|
|
7362
|
-
/* @__PURE__ */
|
|
7363
|
-
/* @__PURE__ */
|
|
7364
|
-
/* @__PURE__ */
|
|
7365
|
-
/* @__PURE__ */
|
|
7366
|
-
/* @__PURE__ */
|
|
7367
|
-
/* @__PURE__ */
|
|
7368
|
-
/* @__PURE__ */
|
|
7413
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7414
|
+
/* @__PURE__ */ jsx43(Label, { children: "District *" }),
|
|
7415
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { children: [
|
|
7416
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select District" }) }),
|
|
7417
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7418
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "hyderabad", children: "HYDERABAD" }),
|
|
7419
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "rangareddy", children: "RANGAREDDY" })
|
|
7369
7420
|
] })
|
|
7370
7421
|
] })
|
|
7371
7422
|
] })
|
|
7372
7423
|
] })
|
|
7373
7424
|
] }),
|
|
7374
|
-
/* @__PURE__ */
|
|
7375
|
-
/* @__PURE__ */
|
|
7376
|
-
/* @__PURE__ */
|
|
7425
|
+
/* @__PURE__ */ jsxs28(DialogFooter, { children: [
|
|
7426
|
+
/* @__PURE__ */ jsx43(Button, { variant: "outline", onClick: () => setDialogOpen(false), children: "CANCEL" }),
|
|
7427
|
+
/* @__PURE__ */ jsx43(Button, { onClick: () => setDialogOpen(false), children: "Create" })
|
|
7377
7428
|
] })
|
|
7378
7429
|
] }) })
|
|
7379
7430
|
] }),
|
|
7380
|
-
/* @__PURE__ */
|
|
7381
|
-
/* @__PURE__ */
|
|
7382
|
-
/* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7384
|
-
/* @__PURE__ */
|
|
7385
|
-
/* @__PURE__ */
|
|
7386
|
-
/* @__PURE__ */
|
|
7431
|
+
/* @__PURE__ */ jsx43(Section, { title: "Table", children: /* @__PURE__ */ jsxs28(TableNamespace, { children: [
|
|
7432
|
+
/* @__PURE__ */ jsx43(TableCaption, { children: "A list of recent invoices" }),
|
|
7433
|
+
/* @__PURE__ */ jsx43(TableHeader, { children: /* @__PURE__ */ jsxs28(TableRow, { children: [
|
|
7434
|
+
/* @__PURE__ */ jsx43(TableHead, { children: "Invoice" }),
|
|
7435
|
+
/* @__PURE__ */ jsx43(TableHead, { children: "Status" }),
|
|
7436
|
+
/* @__PURE__ */ jsx43(TableHead, { children: "Method" }),
|
|
7437
|
+
/* @__PURE__ */ jsx43(TableHead, { className: "text-right", children: "Amount" })
|
|
7387
7438
|
] }) }),
|
|
7388
|
-
/* @__PURE__ */
|
|
7389
|
-
/* @__PURE__ */
|
|
7390
|
-
/* @__PURE__ */
|
|
7391
|
-
/* @__PURE__ */
|
|
7392
|
-
/* @__PURE__ */
|
|
7393
|
-
/* @__PURE__ */
|
|
7439
|
+
/* @__PURE__ */ jsxs28(TableBody, { children: [
|
|
7440
|
+
/* @__PURE__ */ jsxs28(TableRow, { children: [
|
|
7441
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "INV001" }),
|
|
7442
|
+
/* @__PURE__ */ jsx43(TableCell, { children: /* @__PURE__ */ jsx43(Badge, { children: "Paid" }) }),
|
|
7443
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "Credit Card" }),
|
|
7444
|
+
/* @__PURE__ */ jsx43(TableCell, { className: "text-right", children: "$250.00" })
|
|
7394
7445
|
] }),
|
|
7395
|
-
/* @__PURE__ */
|
|
7396
|
-
/* @__PURE__ */
|
|
7397
|
-
/* @__PURE__ */
|
|
7398
|
-
/* @__PURE__ */
|
|
7399
|
-
/* @__PURE__ */
|
|
7446
|
+
/* @__PURE__ */ jsxs28(TableRow, { children: [
|
|
7447
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "INV002" }),
|
|
7448
|
+
/* @__PURE__ */ jsx43(TableCell, { children: /* @__PURE__ */ jsx43(Badge, { variant: "secondary", children: "Pending" }) }),
|
|
7449
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "PayPal" }),
|
|
7450
|
+
/* @__PURE__ */ jsx43(TableCell, { className: "text-right", children: "$150.00" })
|
|
7400
7451
|
] }),
|
|
7401
|
-
/* @__PURE__ */
|
|
7402
|
-
/* @__PURE__ */
|
|
7403
|
-
/* @__PURE__ */
|
|
7404
|
-
/* @__PURE__ */
|
|
7405
|
-
/* @__PURE__ */
|
|
7452
|
+
/* @__PURE__ */ jsxs28(TableRow, { children: [
|
|
7453
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "INV003" }),
|
|
7454
|
+
/* @__PURE__ */ jsx43(TableCell, { children: /* @__PURE__ */ jsx43(Badge, { variant: "destructive", children: "Failed" }) }),
|
|
7455
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "Bank Transfer" }),
|
|
7456
|
+
/* @__PURE__ */ jsx43(TableCell, { className: "text-right", children: "$350.00" })
|
|
7406
7457
|
] })
|
|
7407
7458
|
] })
|
|
7408
7459
|
] }) }),
|
|
7409
|
-
/* @__PURE__ */
|
|
7410
|
-
/* @__PURE__ */
|
|
7411
|
-
/* @__PURE__ */
|
|
7412
|
-
/* @__PURE__ */
|
|
7413
|
-
/* @__PURE__ */
|
|
7414
|
-
/* @__PURE__ */
|
|
7415
|
-
/* @__PURE__ */
|
|
7460
|
+
/* @__PURE__ */ jsx43(Section, { title: "Pagination", children: /* @__PURE__ */ jsx43(PaginationNamespace, { children: /* @__PURE__ */ jsxs28(PaginationContent, { children: [
|
|
7461
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationPrevious, { onClick: () => console.log("Previous") }) }),
|
|
7462
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationLink, { isActive: true, children: "1" }) }),
|
|
7463
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationLink, { children: "2" }) }),
|
|
7464
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationLink, { children: "3" }) }),
|
|
7465
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationEllipsis, {}) }),
|
|
7466
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationNext, { onClick: () => console.log("Next") }) })
|
|
7416
7467
|
] }) }) }),
|
|
7417
|
-
/* @__PURE__ */
|
|
7418
|
-
/* @__PURE__ */
|
|
7419
|
-
/* @__PURE__ */
|
|
7420
|
-
/* @__PURE__ */
|
|
7468
|
+
/* @__PURE__ */ jsx43(Section, { title: "Spinner", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-8", children: [
|
|
7469
|
+
/* @__PURE__ */ jsxs28("div", { className: "text-center", children: [
|
|
7470
|
+
/* @__PURE__ */ jsx43(Spinner, { size: "sm" }),
|
|
7471
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm text-muted-foreground mt-2", children: "Small" })
|
|
7421
7472
|
] }),
|
|
7422
|
-
/* @__PURE__ */
|
|
7423
|
-
/* @__PURE__ */
|
|
7424
|
-
/* @__PURE__ */
|
|
7473
|
+
/* @__PURE__ */ jsxs28("div", { className: "text-center", children: [
|
|
7474
|
+
/* @__PURE__ */ jsx43(Spinner, { size: "default" }),
|
|
7475
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm text-muted-foreground mt-2", children: "Default" })
|
|
7425
7476
|
] }),
|
|
7426
|
-
/* @__PURE__ */
|
|
7427
|
-
/* @__PURE__ */
|
|
7428
|
-
/* @__PURE__ */
|
|
7477
|
+
/* @__PURE__ */ jsxs28("div", { className: "text-center", children: [
|
|
7478
|
+
/* @__PURE__ */ jsx43(Spinner, { size: "lg" }),
|
|
7479
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm text-muted-foreground mt-2", children: "Large" })
|
|
7429
7480
|
] })
|
|
7430
7481
|
] }) }),
|
|
7431
|
-
/* @__PURE__ */
|
|
7432
|
-
/* @__PURE__ */
|
|
7433
|
-
/* @__PURE__ */
|
|
7434
|
-
/* @__PURE__ */
|
|
7435
|
-
/* @__PURE__ */
|
|
7436
|
-
/* @__PURE__ */
|
|
7437
|
-
/* @__PURE__ */
|
|
7438
|
-
/* @__PURE__ */
|
|
7482
|
+
/* @__PURE__ */ jsx43(Section, { title: "Separator", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4", children: [
|
|
7483
|
+
/* @__PURE__ */ jsx43("p", { className: "text-foreground", children: "Content above separator" }),
|
|
7484
|
+
/* @__PURE__ */ jsx43(Separator, {}),
|
|
7485
|
+
/* @__PURE__ */ jsx43("p", { className: "text-foreground", children: "Content below separator" }),
|
|
7486
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center h-10", children: [
|
|
7487
|
+
/* @__PURE__ */ jsx43("span", { className: "text-foreground", children: "Left" }),
|
|
7488
|
+
/* @__PURE__ */ jsx43(Separator, { orientation: "vertical", className: "mx-4" }),
|
|
7489
|
+
/* @__PURE__ */ jsx43("span", { className: "text-foreground", children: "Right" })
|
|
7439
7490
|
] })
|
|
7440
7491
|
] }) }),
|
|
7441
|
-
/* @__PURE__ */
|
|
7442
|
-
/* @__PURE__ */
|
|
7443
|
-
/* @__PURE__ */
|
|
7444
|
-
/* @__PURE__ */
|
|
7445
|
-
/* @__PURE__ */
|
|
7492
|
+
/* @__PURE__ */ jsx43(Section, { title: "Typography & Colors", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-2", children: [
|
|
7493
|
+
/* @__PURE__ */ jsx43("p", { className: "text-foreground", children: "text-foreground - Primary text color" }),
|
|
7494
|
+
/* @__PURE__ */ jsx43("p", { className: "text-muted-foreground", children: "text-muted-foreground - Muted text color" }),
|
|
7495
|
+
/* @__PURE__ */ jsx43("p", { className: "text-accent", children: "text-accent - Accent color" }),
|
|
7496
|
+
/* @__PURE__ */ jsx43("p", { className: "text-destructive", children: "text-destructive - Destructive color" })
|
|
7446
7497
|
] }) })
|
|
7447
7498
|
] }) });
|
|
7448
7499
|
};
|
|
7449
|
-
var Playground = () => /* @__PURE__ */
|
|
7500
|
+
var Playground = () => /* @__PURE__ */ jsx43(ThemeProvider, { defaultTheme: "light", children: /* @__PURE__ */ jsx43(PlaygroundContent, {}) });
|
|
7450
7501
|
export {
|
|
7502
|
+
Accordion,
|
|
7503
|
+
AccordionContent,
|
|
7504
|
+
AccordionItem,
|
|
7505
|
+
AccordionTrigger,
|
|
7451
7506
|
Alert,
|
|
7452
7507
|
AlertDescription,
|
|
7453
7508
|
AlertDialog,
|