@onesaz/ui 0.3.9 → 0.3.11
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 +10 -2
- package/dist/index.js +995 -916
- 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,31 +1928,31 @@ 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,
|
|
1870
1937
|
className: cn(
|
|
1871
|
-
"fixed
|
|
1938
|
+
"fixed z-50 grid w-full gap-4 p-6 shadow-lg",
|
|
1872
1939
|
"bg-popover border border-border text-popover-foreground",
|
|
1873
1940
|
"rounded-lg",
|
|
1874
1941
|
"data-[state=open]:animate-zoom-in data-[state=closed]:animate-zoom-out",
|
|
1875
1942
|
"duration-200",
|
|
1876
|
-
size === "sm" && "max-w-sm",
|
|
1877
|
-
size === "md" && "max-w-md",
|
|
1878
|
-
size === "lg" && "max-w-lg",
|
|
1879
|
-
size === "xl" && "max-w-xl",
|
|
1880
|
-
size === "2xl" && "max-w-2xl",
|
|
1881
|
-
size === "full" && "max-w-full",
|
|
1943
|
+
size === "sm" && "left-1/2 top-1/2 max-w-sm -translate-x-1/2 -translate-y-1/2",
|
|
1944
|
+
size === "md" && "left-1/2 top-1/2 max-w-md -translate-x-1/2 -translate-y-1/2",
|
|
1945
|
+
size === "lg" && "left-1/2 top-1/2 max-w-lg -translate-x-1/2 -translate-y-1/2",
|
|
1946
|
+
size === "xl" && "left-1/2 top-1/2 max-w-xl -translate-x-1/2 -translate-y-1/2",
|
|
1947
|
+
size === "2xl" && "left-1/2 top-1/2 max-w-2xl -translate-x-1/2 -translate-y-1/2",
|
|
1948
|
+
size === "full" && "inset-0 h-full w-full max-w-full rounded-none",
|
|
1882
1949
|
className
|
|
1883
1950
|
),
|
|
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(),
|
|
@@ -3833,6 +3900,8 @@ function convertColumns(columns, checkboxSelection) {
|
|
|
3833
3900
|
flex: col.flex,
|
|
3834
3901
|
headerName: col.headerName || col.field,
|
|
3835
3902
|
wrapText: col.wrapText,
|
|
3903
|
+
scrollable: col.scrollable,
|
|
3904
|
+
maxCellHeight: col.maxCellHeight,
|
|
3836
3905
|
cellClassName: col.cellClassName
|
|
3837
3906
|
}
|
|
3838
3907
|
};
|
|
@@ -3904,7 +3973,7 @@ function calculateInitialColumnWidths(columns, containerWidth, checkboxSelection
|
|
|
3904
3973
|
return widthMap;
|
|
3905
3974
|
}
|
|
3906
3975
|
function useColumnWidths(columns, containerWidth, checkboxSelection, columnSizing) {
|
|
3907
|
-
return
|
|
3976
|
+
return React34.useMemo(
|
|
3908
3977
|
() => calculateInitialColumnWidths(columns, containerWidth, checkboxSelection, columnSizing),
|
|
3909
3978
|
[columns, containerWidth, checkboxSelection, columnSizing]
|
|
3910
3979
|
);
|
|
@@ -3913,7 +3982,7 @@ var ColumnResizeHandle = ({
|
|
|
3913
3982
|
header,
|
|
3914
3983
|
isResizing
|
|
3915
3984
|
}) => {
|
|
3916
|
-
return /* @__PURE__ */
|
|
3985
|
+
return /* @__PURE__ */ jsx34(
|
|
3917
3986
|
"div",
|
|
3918
3987
|
{
|
|
3919
3988
|
className: cn(
|
|
@@ -3932,16 +4001,16 @@ var ColumnResizeHandle = ({
|
|
|
3932
4001
|
};
|
|
3933
4002
|
var SortIcon = ({ direction }) => {
|
|
3934
4003
|
if (!direction) {
|
|
3935
|
-
return /* @__PURE__ */
|
|
4004
|
+
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
4005
|
}
|
|
3937
|
-
return /* @__PURE__ */
|
|
4006
|
+
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
4007
|
};
|
|
3939
4008
|
var ColumnVisibilityDropdown = ({
|
|
3940
4009
|
table
|
|
3941
4010
|
}) => {
|
|
3942
|
-
const [open, setOpen] =
|
|
3943
|
-
const dropdownRef =
|
|
3944
|
-
|
|
4011
|
+
const [open, setOpen] = React34.useState(false);
|
|
4012
|
+
const dropdownRef = React34.useRef(null);
|
|
4013
|
+
React34.useEffect(() => {
|
|
3945
4014
|
const handleClickOutside = (event) => {
|
|
3946
4015
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
3947
4016
|
setOpen(false);
|
|
@@ -3951,8 +4020,8 @@ var ColumnVisibilityDropdown = ({
|
|
|
3951
4020
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3952
4021
|
}, []);
|
|
3953
4022
|
const allColumns = table.getAllLeafColumns().filter((col) => col.id !== "__select__");
|
|
3954
|
-
return /* @__PURE__ */
|
|
3955
|
-
/* @__PURE__ */
|
|
4023
|
+
return /* @__PURE__ */ jsxs19("div", { className: "relative", ref: dropdownRef, children: [
|
|
4024
|
+
/* @__PURE__ */ jsxs19(
|
|
3956
4025
|
Button,
|
|
3957
4026
|
{
|
|
3958
4027
|
variant: "outline",
|
|
@@ -3960,40 +4029,40 @@ var ColumnVisibilityDropdown = ({
|
|
|
3960
4029
|
onClick: () => setOpen(!open),
|
|
3961
4030
|
className: "h-9 gap-2",
|
|
3962
4031
|
children: [
|
|
3963
|
-
/* @__PURE__ */
|
|
3964
|
-
/* @__PURE__ */
|
|
3965
|
-
/* @__PURE__ */
|
|
3966
|
-
/* @__PURE__ */
|
|
4032
|
+
/* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4033
|
+
/* @__PURE__ */ jsx34("path", { d: "M12 3v18M3 12h18" }),
|
|
4034
|
+
/* @__PURE__ */ jsx34("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
4035
|
+
/* @__PURE__ */ jsx34("path", { d: "M3 9h18M3 15h18M9 3v18M15 3v18" })
|
|
3967
4036
|
] }),
|
|
3968
4037
|
"Columns"
|
|
3969
4038
|
]
|
|
3970
4039
|
}
|
|
3971
4040
|
),
|
|
3972
|
-
open && /* @__PURE__ */
|
|
3973
|
-
/* @__PURE__ */
|
|
3974
|
-
/* @__PURE__ */
|
|
4041
|
+
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: [
|
|
4042
|
+
/* @__PURE__ */ jsx34("div", { className: "text-sm font-medium text-foreground mb-2 px-2", children: "Show/Hide Columns" }),
|
|
4043
|
+
/* @__PURE__ */ jsx34("div", { className: "max-h-[300px] overflow-auto", children: allColumns.map((column) => {
|
|
3975
4044
|
const meta = column.columnDef.meta;
|
|
3976
4045
|
const headerName = meta?.headerName || column.id;
|
|
3977
|
-
return /* @__PURE__ */
|
|
4046
|
+
return /* @__PURE__ */ jsxs19(
|
|
3978
4047
|
"label",
|
|
3979
4048
|
{
|
|
3980
4049
|
className: "flex items-center gap-2 px-2 py-1.5 hover:bg-muted rounded cursor-pointer",
|
|
3981
4050
|
children: [
|
|
3982
|
-
/* @__PURE__ */
|
|
4051
|
+
/* @__PURE__ */ jsx34(
|
|
3983
4052
|
Checkbox,
|
|
3984
4053
|
{
|
|
3985
4054
|
checked: column.getIsVisible(),
|
|
3986
4055
|
onChange: (e) => column.toggleVisibility(e.target.checked)
|
|
3987
4056
|
}
|
|
3988
4057
|
),
|
|
3989
|
-
/* @__PURE__ */
|
|
4058
|
+
/* @__PURE__ */ jsx34("span", { className: "text-sm", children: headerName })
|
|
3990
4059
|
]
|
|
3991
4060
|
},
|
|
3992
4061
|
column.id
|
|
3993
4062
|
);
|
|
3994
4063
|
}) }),
|
|
3995
|
-
/* @__PURE__ */
|
|
3996
|
-
/* @__PURE__ */
|
|
4064
|
+
/* @__PURE__ */ jsxs19("div", { className: "border-t border-border mt-2 pt-2 flex gap-2 px-2", children: [
|
|
4065
|
+
/* @__PURE__ */ jsx34(
|
|
3997
4066
|
Button,
|
|
3998
4067
|
{
|
|
3999
4068
|
variant: "ghost",
|
|
@@ -4003,7 +4072,7 @@ var ColumnVisibilityDropdown = ({
|
|
|
4003
4072
|
children: "Show All"
|
|
4004
4073
|
}
|
|
4005
4074
|
),
|
|
4006
|
-
/* @__PURE__ */
|
|
4075
|
+
/* @__PURE__ */ jsx34(
|
|
4007
4076
|
Button,
|
|
4008
4077
|
{
|
|
4009
4078
|
variant: "ghost",
|
|
@@ -4053,28 +4122,28 @@ var DataGridPagination = ({
|
|
|
4053
4122
|
};
|
|
4054
4123
|
const startRow = currentPage * pageSize + 1;
|
|
4055
4124
|
const endRow = Math.min((currentPage + 1) * pageSize, totalRows);
|
|
4056
|
-
return /* @__PURE__ */
|
|
4057
|
-
/* @__PURE__ */
|
|
4058
|
-
/* @__PURE__ */
|
|
4059
|
-
/* @__PURE__ */
|
|
4125
|
+
return /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-end gap-4 px-4 py-3 border-t border-border bg-background", children: [
|
|
4126
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
4127
|
+
/* @__PURE__ */ jsx34("span", { children: "Rows per page:" }),
|
|
4128
|
+
/* @__PURE__ */ jsx34(
|
|
4060
4129
|
"select",
|
|
4061
4130
|
{
|
|
4062
4131
|
value: pageSize,
|
|
4063
4132
|
onChange: (e) => table.setPageSize(Number(e.target.value)),
|
|
4064
4133
|
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__ */
|
|
4134
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx34("option", { value: size, children: size }, size))
|
|
4066
4135
|
}
|
|
4067
4136
|
)
|
|
4068
4137
|
] }),
|
|
4069
|
-
/* @__PURE__ */
|
|
4138
|
+
/* @__PURE__ */ jsxs19("span", { className: "text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
4070
4139
|
startRow,
|
|
4071
4140
|
"-",
|
|
4072
4141
|
endRow,
|
|
4073
4142
|
" of ",
|
|
4074
4143
|
totalRows
|
|
4075
4144
|
] }),
|
|
4076
|
-
/* @__PURE__ */
|
|
4077
|
-
/* @__PURE__ */
|
|
4145
|
+
/* @__PURE__ */ jsx34(PaginationNamespace, { className: "mx-0 w-auto", children: /* @__PURE__ */ jsxs19(PaginationContent, { children: [
|
|
4146
|
+
/* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4078
4147
|
Button,
|
|
4079
4148
|
{
|
|
4080
4149
|
variant: "outline",
|
|
@@ -4082,10 +4151,10 @@ var DataGridPagination = ({
|
|
|
4082
4151
|
className: "h-8 w-8",
|
|
4083
4152
|
onClick: () => table.setPageIndex(0),
|
|
4084
4153
|
disabled: !table.getCanPreviousPage(),
|
|
4085
|
-
children: /* @__PURE__ */
|
|
4154
|
+
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
4155
|
}
|
|
4087
4156
|
) }),
|
|
4088
|
-
/* @__PURE__ */
|
|
4157
|
+
/* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4089
4158
|
Button,
|
|
4090
4159
|
{
|
|
4091
4160
|
variant: "outline",
|
|
@@ -4093,11 +4162,11 @@ var DataGridPagination = ({
|
|
|
4093
4162
|
className: "h-8 w-8",
|
|
4094
4163
|
onClick: () => table.previousPage(),
|
|
4095
4164
|
disabled: !table.getCanPreviousPage(),
|
|
4096
|
-
children: /* @__PURE__ */
|
|
4165
|
+
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
4166
|
}
|
|
4098
4167
|
) }),
|
|
4099
4168
|
getPageNumbers().map(
|
|
4100
|
-
(page, idx) => page === "ellipsis" ? /* @__PURE__ */
|
|
4169
|
+
(page, idx) => page === "ellipsis" ? /* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(PaginationEllipsis, {}) }, `ellipsis-${idx}`) : /* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4101
4170
|
PaginationLink,
|
|
4102
4171
|
{
|
|
4103
4172
|
isActive: page === currentPage,
|
|
@@ -4106,7 +4175,7 @@ var DataGridPagination = ({
|
|
|
4106
4175
|
}
|
|
4107
4176
|
) }, page)
|
|
4108
4177
|
),
|
|
4109
|
-
/* @__PURE__ */
|
|
4178
|
+
/* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4110
4179
|
Button,
|
|
4111
4180
|
{
|
|
4112
4181
|
variant: "outline",
|
|
@@ -4114,10 +4183,10 @@ var DataGridPagination = ({
|
|
|
4114
4183
|
className: "h-8 w-8",
|
|
4115
4184
|
onClick: () => table.nextPage(),
|
|
4116
4185
|
disabled: !table.getCanNextPage(),
|
|
4117
|
-
children: /* @__PURE__ */
|
|
4186
|
+
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
4187
|
}
|
|
4119
4188
|
) }),
|
|
4120
|
-
/* @__PURE__ */
|
|
4189
|
+
/* @__PURE__ */ jsx34(PaginationItem, { children: /* @__PURE__ */ jsx34(
|
|
4121
4190
|
Button,
|
|
4122
4191
|
{
|
|
4123
4192
|
variant: "outline",
|
|
@@ -4125,7 +4194,7 @@ var DataGridPagination = ({
|
|
|
4125
4194
|
className: "h-8 w-8",
|
|
4126
4195
|
onClick: () => table.setPageIndex(pageCount - 1),
|
|
4127
4196
|
disabled: !table.getCanNextPage(),
|
|
4128
|
-
children: /* @__PURE__ */
|
|
4197
|
+
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
4198
|
}
|
|
4130
4199
|
) })
|
|
4131
4200
|
] }) })
|
|
@@ -4137,9 +4206,9 @@ var ExportDropdown = ({
|
|
|
4137
4206
|
columns,
|
|
4138
4207
|
fileName = "data-export"
|
|
4139
4208
|
}) => {
|
|
4140
|
-
const [open, setOpen] =
|
|
4141
|
-
const dropdownRef =
|
|
4142
|
-
|
|
4209
|
+
const [open, setOpen] = React34.useState(false);
|
|
4210
|
+
const dropdownRef = React34.useRef(null);
|
|
4211
|
+
React34.useEffect(() => {
|
|
4143
4212
|
const handleClickOutside = (event) => {
|
|
4144
4213
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
4145
4214
|
setOpen(false);
|
|
@@ -4183,8 +4252,8 @@ var ExportDropdown = ({
|
|
|
4183
4252
|
}
|
|
4184
4253
|
setOpen(false);
|
|
4185
4254
|
};
|
|
4186
|
-
return /* @__PURE__ */
|
|
4187
|
-
/* @__PURE__ */
|
|
4255
|
+
return /* @__PURE__ */ jsxs19("div", { className: "relative", ref: dropdownRef, children: [
|
|
4256
|
+
/* @__PURE__ */ jsxs19(
|
|
4188
4257
|
Button,
|
|
4189
4258
|
{
|
|
4190
4259
|
variant: "outline",
|
|
@@ -4192,39 +4261,39 @@ var ExportDropdown = ({
|
|
|
4192
4261
|
onClick: () => setOpen(!open),
|
|
4193
4262
|
className: "h-9 gap-2",
|
|
4194
4263
|
children: [
|
|
4195
|
-
/* @__PURE__ */
|
|
4196
|
-
/* @__PURE__ */
|
|
4197
|
-
/* @__PURE__ */
|
|
4198
|
-
/* @__PURE__ */
|
|
4264
|
+
/* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4265
|
+
/* @__PURE__ */ jsx34("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
4266
|
+
/* @__PURE__ */ jsx34("polyline", { points: "7 10 12 15 17 10" }),
|
|
4267
|
+
/* @__PURE__ */ jsx34("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
4199
4268
|
] }),
|
|
4200
4269
|
"Export"
|
|
4201
4270
|
]
|
|
4202
4271
|
}
|
|
4203
4272
|
),
|
|
4204
|
-
open && /* @__PURE__ */
|
|
4205
|
-
/* @__PURE__ */
|
|
4273
|
+
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: [
|
|
4274
|
+
/* @__PURE__ */ jsxs19(
|
|
4206
4275
|
"button",
|
|
4207
4276
|
{
|
|
4208
4277
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
4209
4278
|
onClick: exportToCSV,
|
|
4210
4279
|
children: [
|
|
4211
|
-
/* @__PURE__ */
|
|
4212
|
-
/* @__PURE__ */
|
|
4213
|
-
/* @__PURE__ */
|
|
4280
|
+
/* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4281
|
+
/* @__PURE__ */ jsx34("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
4282
|
+
/* @__PURE__ */ jsx34("polyline", { points: "14 2 14 8 20 8" })
|
|
4214
4283
|
] }),
|
|
4215
4284
|
"Export CSV"
|
|
4216
4285
|
]
|
|
4217
4286
|
}
|
|
4218
4287
|
),
|
|
4219
|
-
onExport && /* @__PURE__ */
|
|
4288
|
+
onExport && /* @__PURE__ */ jsxs19(
|
|
4220
4289
|
"button",
|
|
4221
4290
|
{
|
|
4222
4291
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
4223
4292
|
onClick: handleCustomExport,
|
|
4224
4293
|
children: [
|
|
4225
|
-
/* @__PURE__ */
|
|
4226
|
-
/* @__PURE__ */
|
|
4227
|
-
/* @__PURE__ */
|
|
4294
|
+
/* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4295
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "12", r: "3" }),
|
|
4296
|
+
/* @__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" })
|
|
4228
4297
|
] }),
|
|
4229
4298
|
"Custom Export"
|
|
4230
4299
|
]
|
|
@@ -4236,9 +4305,9 @@ var ExportDropdown = ({
|
|
|
4236
4305
|
var MoreOptionsDropdown = ({
|
|
4237
4306
|
options
|
|
4238
4307
|
}) => {
|
|
4239
|
-
const [open, setOpen] =
|
|
4240
|
-
const dropdownRef =
|
|
4241
|
-
|
|
4308
|
+
const [open, setOpen] = React34.useState(false);
|
|
4309
|
+
const dropdownRef = React34.useRef(null);
|
|
4310
|
+
React34.useEffect(() => {
|
|
4242
4311
|
const handleClickOutside = (event) => {
|
|
4243
4312
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
4244
4313
|
setOpen(false);
|
|
@@ -4248,22 +4317,22 @@ var MoreOptionsDropdown = ({
|
|
|
4248
4317
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
4249
4318
|
}, []);
|
|
4250
4319
|
if (options.length === 0) return null;
|
|
4251
|
-
return /* @__PURE__ */
|
|
4252
|
-
/* @__PURE__ */
|
|
4320
|
+
return /* @__PURE__ */ jsxs19("div", { className: "relative", ref: dropdownRef, children: [
|
|
4321
|
+
/* @__PURE__ */ jsx34(
|
|
4253
4322
|
Button,
|
|
4254
4323
|
{
|
|
4255
4324
|
variant: "outline",
|
|
4256
4325
|
size: "icon",
|
|
4257
4326
|
onClick: () => setOpen(!open),
|
|
4258
4327
|
className: "h-9 w-9",
|
|
4259
|
-
children: /* @__PURE__ */
|
|
4260
|
-
/* @__PURE__ */
|
|
4261
|
-
/* @__PURE__ */
|
|
4262
|
-
/* @__PURE__ */
|
|
4328
|
+
children: /* @__PURE__ */ jsxs19("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
4329
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "12", r: "1" }),
|
|
4330
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "5", r: "1" }),
|
|
4331
|
+
/* @__PURE__ */ jsx34("circle", { cx: "12", cy: "19", r: "1" })
|
|
4263
4332
|
] })
|
|
4264
4333
|
}
|
|
4265
4334
|
),
|
|
4266
|
-
open && /* @__PURE__ */
|
|
4335
|
+
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(
|
|
4267
4336
|
"button",
|
|
4268
4337
|
{
|
|
4269
4338
|
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-sm hover:bg-muted",
|
|
@@ -4295,10 +4364,10 @@ var DataGridToolbar = ({
|
|
|
4295
4364
|
customButtons,
|
|
4296
4365
|
moreOptions = []
|
|
4297
4366
|
}) => {
|
|
4298
|
-
return /* @__PURE__ */
|
|
4299
|
-
title && /* @__PURE__ */
|
|
4300
|
-
/* @__PURE__ */
|
|
4301
|
-
showQuickFilter && /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between px-4 py-3 border-b border-border bg-background", children: [
|
|
4368
|
+
title && /* @__PURE__ */ jsx34("h3", { className: "text-lg font-semibold text-foreground", children: title }),
|
|
4369
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
4370
|
+
showQuickFilter && /* @__PURE__ */ jsx34(
|
|
4302
4371
|
Input,
|
|
4303
4372
|
{
|
|
4304
4373
|
placeholder: "Search...",
|
|
@@ -4307,8 +4376,8 @@ var DataGridToolbar = ({
|
|
|
4307
4376
|
className: "h-9 w-64"
|
|
4308
4377
|
}
|
|
4309
4378
|
),
|
|
4310
|
-
showColumnSelector && /* @__PURE__ */
|
|
4311
|
-
showExport && /* @__PURE__ */
|
|
4379
|
+
showColumnSelector && /* @__PURE__ */ jsx34(ColumnVisibilityDropdown, { table }),
|
|
4380
|
+
showExport && /* @__PURE__ */ jsx34(
|
|
4312
4381
|
ExportDropdown,
|
|
4313
4382
|
{
|
|
4314
4383
|
onExport,
|
|
@@ -4318,7 +4387,7 @@ var DataGridToolbar = ({
|
|
|
4318
4387
|
}
|
|
4319
4388
|
),
|
|
4320
4389
|
customButtons,
|
|
4321
|
-
moreOptions.length > 0 && /* @__PURE__ */
|
|
4390
|
+
moreOptions.length > 0 && /* @__PURE__ */ jsx34(MoreOptionsDropdown, { options: moreOptions })
|
|
4322
4391
|
] })
|
|
4323
4392
|
] });
|
|
4324
4393
|
};
|
|
@@ -4335,7 +4404,7 @@ var RowRenderer = ({
|
|
|
4335
4404
|
columnWidths
|
|
4336
4405
|
}) => {
|
|
4337
4406
|
const customClassName = getRowClassName?.({ row: row.original, rowIndex });
|
|
4338
|
-
return /* @__PURE__ */
|
|
4407
|
+
return /* @__PURE__ */ jsx34(
|
|
4339
4408
|
"tr",
|
|
4340
4409
|
{
|
|
4341
4410
|
className: cn(
|
|
@@ -4354,10 +4423,12 @@ var RowRenderer = ({
|
|
|
4354
4423
|
const meta = cell.column.columnDef.meta;
|
|
4355
4424
|
const align = meta?.align || "left";
|
|
4356
4425
|
const wrapText = meta?.wrapText !== void 0 ? meta.wrapText : globalWrapText;
|
|
4426
|
+
const scrollable = meta?.scrollable || false;
|
|
4427
|
+
const maxCellHeight = meta?.maxCellHeight || 100;
|
|
4357
4428
|
const cellClassName = meta?.cellClassName;
|
|
4358
4429
|
const colWidth = columnWidths.get(cell.column.id);
|
|
4359
4430
|
const width = colWidth?.width || cell.column.getSize();
|
|
4360
|
-
return /* @__PURE__ */
|
|
4431
|
+
return /* @__PURE__ */ jsx34(
|
|
4361
4432
|
"td",
|
|
4362
4433
|
{
|
|
4363
4434
|
className: cn(
|
|
@@ -4365,23 +4436,27 @@ var RowRenderer = ({
|
|
|
4365
4436
|
showCellVerticalBorder && "border-r last:border-r-0 border-border"
|
|
4366
4437
|
),
|
|
4367
4438
|
style: {
|
|
4368
|
-
height: wrapText ? "auto" : rowHeight,
|
|
4439
|
+
height: wrapText || scrollable ? "auto" : rowHeight,
|
|
4369
4440
|
minHeight: rowHeight,
|
|
4370
4441
|
textAlign: align,
|
|
4371
4442
|
width,
|
|
4372
4443
|
maxWidth: colWidth?.maxWidth || width,
|
|
4373
4444
|
minWidth: colWidth?.minWidth || cell.column.columnDef.minSize
|
|
4374
4445
|
},
|
|
4375
|
-
children: /* @__PURE__ */
|
|
4446
|
+
children: /* @__PURE__ */ jsx34(
|
|
4376
4447
|
"div",
|
|
4377
4448
|
{
|
|
4378
4449
|
className: cn(
|
|
4379
|
-
wrapText ? "whitespace-normal break-words" : "truncate",
|
|
4450
|
+
wrapText ? "whitespace-normal break-words" : scrollable ? "overflow-auto" : "truncate",
|
|
4451
|
+
scrollable && "max-h-[100px]",
|
|
4380
4452
|
cellClassName
|
|
4381
4453
|
),
|
|
4454
|
+
style: {
|
|
4455
|
+
maxHeight: scrollable ? `${maxCellHeight}px` : void 0
|
|
4456
|
+
},
|
|
4382
4457
|
title: (
|
|
4383
|
-
// Show tooltip for truncated simple text values
|
|
4384
|
-
!wrapText && (typeof cell.getValue() === "string" || typeof cell.getValue() === "number") ? String(cell.getValue()) : void 0
|
|
4458
|
+
// Show tooltip for truncated simple text values (not for scrollable or wrapped content)
|
|
4459
|
+
!wrapText && !scrollable && (typeof cell.getValue() === "string" || typeof cell.getValue() === "number") ? String(cell.getValue()) : void 0
|
|
4385
4460
|
),
|
|
4386
4461
|
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
4387
4462
|
}
|
|
@@ -4415,7 +4490,7 @@ var VirtualizedTableBody = ({
|
|
|
4415
4490
|
});
|
|
4416
4491
|
const virtualRows = virtualizer.getVirtualItems();
|
|
4417
4492
|
if (rows.length === 0) {
|
|
4418
|
-
return /* @__PURE__ */
|
|
4493
|
+
return /* @__PURE__ */ jsx34("tbody", { children: /* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34(
|
|
4419
4494
|
"td",
|
|
4420
4495
|
{
|
|
4421
4496
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4426,8 +4501,8 @@ var VirtualizedTableBody = ({
|
|
|
4426
4501
|
}
|
|
4427
4502
|
const paddingTop = virtualRows.length > 0 ? virtualRows[0].start : 0;
|
|
4428
4503
|
const paddingBottom = virtualRows.length > 0 ? virtualizer.getTotalSize() - virtualRows[virtualRows.length - 1].end : 0;
|
|
4429
|
-
return /* @__PURE__ */
|
|
4430
|
-
paddingTop > 0 && /* @__PURE__ */
|
|
4504
|
+
return /* @__PURE__ */ jsxs19("tbody", { children: [
|
|
4505
|
+
paddingTop > 0 && /* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34(
|
|
4431
4506
|
"td",
|
|
4432
4507
|
{
|
|
4433
4508
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4436,7 +4511,7 @@ var VirtualizedTableBody = ({
|
|
|
4436
4511
|
) }),
|
|
4437
4512
|
virtualRows.map((virtualRow) => {
|
|
4438
4513
|
const row = rows[virtualRow.index];
|
|
4439
|
-
return /* @__PURE__ */
|
|
4514
|
+
return /* @__PURE__ */ jsx34(
|
|
4440
4515
|
RowRenderer,
|
|
4441
4516
|
{
|
|
4442
4517
|
row,
|
|
@@ -4452,7 +4527,7 @@ var VirtualizedTableBody = ({
|
|
|
4452
4527
|
row.id
|
|
4453
4528
|
);
|
|
4454
4529
|
}),
|
|
4455
|
-
paddingBottom > 0 && /* @__PURE__ */
|
|
4530
|
+
paddingBottom > 0 && /* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34(
|
|
4456
4531
|
"td",
|
|
4457
4532
|
{
|
|
4458
4533
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4473,7 +4548,7 @@ var StandardTableBody = ({
|
|
|
4473
4548
|
}) => {
|
|
4474
4549
|
const rows = table.getRowModel().rows;
|
|
4475
4550
|
if (rows.length === 0) {
|
|
4476
|
-
return /* @__PURE__ */
|
|
4551
|
+
return /* @__PURE__ */ jsx34("tbody", { children: /* @__PURE__ */ jsx34("tr", { children: /* @__PURE__ */ jsx34(
|
|
4477
4552
|
"td",
|
|
4478
4553
|
{
|
|
4479
4554
|
colSpan: table.getVisibleLeafColumns().length,
|
|
@@ -4482,7 +4557,7 @@ var StandardTableBody = ({
|
|
|
4482
4557
|
}
|
|
4483
4558
|
) }) });
|
|
4484
4559
|
}
|
|
4485
|
-
return /* @__PURE__ */
|
|
4560
|
+
return /* @__PURE__ */ jsx34("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx34(
|
|
4486
4561
|
RowRenderer,
|
|
4487
4562
|
{
|
|
4488
4563
|
row,
|
|
@@ -4542,8 +4617,8 @@ function DataGrid({
|
|
|
4542
4617
|
resizableColumns = false,
|
|
4543
4618
|
onColumnResize
|
|
4544
4619
|
}) {
|
|
4545
|
-
const tableContainerRef =
|
|
4546
|
-
const computedInitialSort =
|
|
4620
|
+
const tableContainerRef = React34.useRef(null);
|
|
4621
|
+
const computedInitialSort = React34.useMemo(() => {
|
|
4547
4622
|
if (initialSortModel && initialSortModel.length > 0) {
|
|
4548
4623
|
return initialSortModel.map((s) => ({ id: s.field, desc: s.sort === "desc" }));
|
|
4549
4624
|
}
|
|
@@ -4552,21 +4627,21 @@ function DataGrid({
|
|
|
4552
4627
|
}
|
|
4553
4628
|
return [];
|
|
4554
4629
|
}, []);
|
|
4555
|
-
const [sorting, setSorting] =
|
|
4556
|
-
const [globalFilter, setGlobalFilter] =
|
|
4557
|
-
const [rowSelection, setRowSelection] =
|
|
4630
|
+
const [sorting, setSorting] = React34.useState(computedInitialSort);
|
|
4631
|
+
const [globalFilter, setGlobalFilter] = React34.useState("");
|
|
4632
|
+
const [rowSelection, setRowSelection] = React34.useState(
|
|
4558
4633
|
rowSelectionModel || {}
|
|
4559
4634
|
);
|
|
4560
|
-
const [pagination, setPagination] =
|
|
4635
|
+
const [pagination, setPagination] = React34.useState({
|
|
4561
4636
|
pageIndex: paginationModel?.page || 0,
|
|
4562
4637
|
pageSize: paginationModel?.pageSize || 10
|
|
4563
4638
|
});
|
|
4564
|
-
const [columnVisibility, setColumnVisibility] =
|
|
4639
|
+
const [columnVisibility, setColumnVisibility] = React34.useState(
|
|
4565
4640
|
columnVisibilityModel || {}
|
|
4566
4641
|
);
|
|
4567
|
-
const [containerWidth, setContainerWidth] =
|
|
4568
|
-
const [columnSizing, setColumnSizing] =
|
|
4569
|
-
|
|
4642
|
+
const [containerWidth, setContainerWidth] = React34.useState(0);
|
|
4643
|
+
const [columnSizing, setColumnSizing] = React34.useState({});
|
|
4644
|
+
React34.useEffect(() => {
|
|
4570
4645
|
const container = tableContainerRef.current;
|
|
4571
4646
|
if (!container) return;
|
|
4572
4647
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -4579,11 +4654,11 @@ function DataGrid({
|
|
|
4579
4654
|
return () => resizeObserver.disconnect();
|
|
4580
4655
|
}, []);
|
|
4581
4656
|
const columnWidths = useColumnWidths(columns, containerWidth, checkboxSelection, columnSizing);
|
|
4582
|
-
const tanstackColumns =
|
|
4657
|
+
const tanstackColumns = React34.useMemo(
|
|
4583
4658
|
() => convertColumns(columns, checkboxSelection),
|
|
4584
4659
|
[columns, checkboxSelection]
|
|
4585
4660
|
);
|
|
4586
|
-
|
|
4661
|
+
React34.useEffect(() => {
|
|
4587
4662
|
if (paginationModel) {
|
|
4588
4663
|
setPagination({
|
|
4589
4664
|
pageIndex: paginationModel.page,
|
|
@@ -4591,12 +4666,12 @@ function DataGrid({
|
|
|
4591
4666
|
});
|
|
4592
4667
|
}
|
|
4593
4668
|
}, [paginationModel?.page, paginationModel?.pageSize]);
|
|
4594
|
-
|
|
4669
|
+
React34.useEffect(() => {
|
|
4595
4670
|
if (rowSelectionModel) {
|
|
4596
4671
|
setRowSelection(rowSelectionModel);
|
|
4597
4672
|
}
|
|
4598
4673
|
}, [rowSelectionModel]);
|
|
4599
|
-
|
|
4674
|
+
React34.useEffect(() => {
|
|
4600
4675
|
if (columnVisibilityModel) {
|
|
4601
4676
|
setColumnVisibility(columnVisibilityModel);
|
|
4602
4677
|
}
|
|
@@ -4669,7 +4744,7 @@ function DataGrid({
|
|
|
4669
4744
|
if (minHeight) containerStyle.minHeight = minHeight;
|
|
4670
4745
|
if (maxHeight) containerStyle.maxHeight = maxHeight;
|
|
4671
4746
|
}
|
|
4672
|
-
return /* @__PURE__ */
|
|
4747
|
+
return /* @__PURE__ */ jsxs19(
|
|
4673
4748
|
"div",
|
|
4674
4749
|
{
|
|
4675
4750
|
className: cn(
|
|
@@ -4678,7 +4753,7 @@ function DataGrid({
|
|
|
4678
4753
|
),
|
|
4679
4754
|
style: containerStyle,
|
|
4680
4755
|
children: [
|
|
4681
|
-
toolBar && /* @__PURE__ */
|
|
4756
|
+
toolBar && /* @__PURE__ */ jsx34(
|
|
4682
4757
|
DataGridToolbar,
|
|
4683
4758
|
{
|
|
4684
4759
|
title,
|
|
@@ -4696,17 +4771,17 @@ function DataGrid({
|
|
|
4696
4771
|
moreOptions
|
|
4697
4772
|
}
|
|
4698
4773
|
),
|
|
4699
|
-
/* @__PURE__ */
|
|
4774
|
+
/* @__PURE__ */ jsxs19(
|
|
4700
4775
|
"div",
|
|
4701
4776
|
{
|
|
4702
4777
|
ref: tableContainerRef,
|
|
4703
4778
|
className: "relative flex-1 overflow-auto",
|
|
4704
4779
|
children: [
|
|
4705
|
-
loading && /* @__PURE__ */
|
|
4706
|
-
/* @__PURE__ */
|
|
4707
|
-
/* @__PURE__ */
|
|
4780
|
+
loading && /* @__PURE__ */ jsx34("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center z-10", children: /* @__PURE__ */ jsx34(Spinner, { size: "lg" }) }),
|
|
4781
|
+
/* @__PURE__ */ jsxs19("table", { className: "w-full border-collapse table-fixed", children: [
|
|
4782
|
+
/* @__PURE__ */ jsx34("colgroup", { children: table.getVisibleLeafColumns().map((column) => {
|
|
4708
4783
|
const colWidth = columnWidths.get(column.id);
|
|
4709
|
-
return /* @__PURE__ */
|
|
4784
|
+
return /* @__PURE__ */ jsx34(
|
|
4710
4785
|
"col",
|
|
4711
4786
|
{
|
|
4712
4787
|
style: {
|
|
@@ -4718,12 +4793,12 @@ function DataGrid({
|
|
|
4718
4793
|
column.id
|
|
4719
4794
|
);
|
|
4720
4795
|
}) }),
|
|
4721
|
-
/* @__PURE__ */
|
|
4796
|
+
/* @__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) => {
|
|
4722
4797
|
const meta = header.column.columnDef.meta;
|
|
4723
4798
|
const align = meta?.headerAlign || meta?.align || "left";
|
|
4724
4799
|
const colWidth = columnWidths.get(header.column.id);
|
|
4725
4800
|
const effectiveWidth = colWidth?.width || header.getSize();
|
|
4726
|
-
return /* @__PURE__ */
|
|
4801
|
+
return /* @__PURE__ */ jsxs19(
|
|
4727
4802
|
"th",
|
|
4728
4803
|
{
|
|
4729
4804
|
className: cn(
|
|
@@ -4742,15 +4817,15 @@ function DataGrid({
|
|
|
4742
4817
|
},
|
|
4743
4818
|
onClick: header.column.getToggleSortingHandler(),
|
|
4744
4819
|
children: [
|
|
4745
|
-
/* @__PURE__ */
|
|
4820
|
+
/* @__PURE__ */ jsxs19("div", { className: cn(
|
|
4746
4821
|
"flex items-center gap-1 truncate",
|
|
4747
4822
|
align === "center" && "justify-center",
|
|
4748
4823
|
align === "right" && "justify-end"
|
|
4749
4824
|
), children: [
|
|
4750
4825
|
header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()),
|
|
4751
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
4826
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx34(SortIcon, { direction: header.column.getIsSorted() })
|
|
4752
4827
|
] }),
|
|
4753
|
-
resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */
|
|
4828
|
+
resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */ jsx34(
|
|
4754
4829
|
ColumnResizeHandle,
|
|
4755
4830
|
{
|
|
4756
4831
|
header,
|
|
@@ -4762,7 +4837,7 @@ function DataGrid({
|
|
|
4762
4837
|
header.id
|
|
4763
4838
|
);
|
|
4764
4839
|
}) }, headerGroup.id)) }),
|
|
4765
|
-
virtualized ? /* @__PURE__ */
|
|
4840
|
+
virtualized ? /* @__PURE__ */ jsx34(
|
|
4766
4841
|
VirtualizedTableBody,
|
|
4767
4842
|
{
|
|
4768
4843
|
table,
|
|
@@ -4776,7 +4851,7 @@ function DataGrid({
|
|
|
4776
4851
|
globalWrapText: wrapText,
|
|
4777
4852
|
columnWidths
|
|
4778
4853
|
}
|
|
4779
|
-
) : /* @__PURE__ */
|
|
4854
|
+
) : /* @__PURE__ */ jsx34(
|
|
4780
4855
|
StandardTableBody,
|
|
4781
4856
|
{
|
|
4782
4857
|
table,
|
|
@@ -4793,7 +4868,7 @@ function DataGrid({
|
|
|
4793
4868
|
]
|
|
4794
4869
|
}
|
|
4795
4870
|
),
|
|
4796
|
-
!virtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */
|
|
4871
|
+
!virtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */ jsx34(
|
|
4797
4872
|
DataGridPagination,
|
|
4798
4873
|
{
|
|
4799
4874
|
table,
|
|
@@ -4802,7 +4877,7 @@ function DataGrid({
|
|
|
4802
4877
|
paginationMode
|
|
4803
4878
|
}
|
|
4804
4879
|
),
|
|
4805
|
-
virtualized && !hideFooter && /* @__PURE__ */
|
|
4880
|
+
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: [
|
|
4806
4881
|
table.getFilteredRowModel().rows.length,
|
|
4807
4882
|
" total rows (virtualized)"
|
|
4808
4883
|
] }) })
|
|
@@ -4813,10 +4888,10 @@ function DataGrid({
|
|
|
4813
4888
|
DataGrid.displayName = "DataGrid";
|
|
4814
4889
|
|
|
4815
4890
|
// src/components/list.tsx
|
|
4816
|
-
import * as
|
|
4817
|
-
import { jsx as
|
|
4818
|
-
var List2 =
|
|
4819
|
-
({ dividers = false, dense = false, clickable = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4891
|
+
import * as React35 from "react";
|
|
4892
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4893
|
+
var List2 = React35.forwardRef(
|
|
4894
|
+
({ dividers = false, dense = false, clickable = false, className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4820
4895
|
"ul",
|
|
4821
4896
|
{
|
|
4822
4897
|
ref,
|
|
@@ -4830,7 +4905,7 @@ var List2 = React34.forwardRef(
|
|
|
4830
4905
|
)
|
|
4831
4906
|
);
|
|
4832
4907
|
List2.displayName = "List";
|
|
4833
|
-
var ListItem =
|
|
4908
|
+
var ListItem = React35.forwardRef(
|
|
4834
4909
|
({
|
|
4835
4910
|
selected = false,
|
|
4836
4911
|
disabled = false,
|
|
@@ -4841,7 +4916,7 @@ var ListItem = React34.forwardRef(
|
|
|
4841
4916
|
className,
|
|
4842
4917
|
children,
|
|
4843
4918
|
...props
|
|
4844
|
-
}, ref) => /* @__PURE__ */
|
|
4919
|
+
}, ref) => /* @__PURE__ */ jsxs20(
|
|
4845
4920
|
"li",
|
|
4846
4921
|
{
|
|
4847
4922
|
ref,
|
|
@@ -4866,18 +4941,18 @@ var ListItem = React34.forwardRef(
|
|
|
4866
4941
|
),
|
|
4867
4942
|
...props,
|
|
4868
4943
|
children: [
|
|
4869
|
-
leading && /* @__PURE__ */
|
|
4870
|
-
/* @__PURE__ */
|
|
4871
|
-
trailing && /* @__PURE__ */
|
|
4872
|
-
secondaryAction && /* @__PURE__ */
|
|
4944
|
+
leading && /* @__PURE__ */ jsx35("div", { className: "shrink-0", children: leading }),
|
|
4945
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 min-w-0", children }),
|
|
4946
|
+
trailing && /* @__PURE__ */ jsx35("div", { className: "shrink-0", children: trailing }),
|
|
4947
|
+
secondaryAction && /* @__PURE__ */ jsx35("div", { className: "shrink-0 ml-2", children: secondaryAction })
|
|
4873
4948
|
]
|
|
4874
4949
|
}
|
|
4875
4950
|
)
|
|
4876
4951
|
);
|
|
4877
4952
|
ListItem.displayName = "ListItem";
|
|
4878
|
-
var ListItemText =
|
|
4879
|
-
({ primary, secondary, noWrap = false, className, children, ...props }, ref) => /* @__PURE__ */
|
|
4880
|
-
primary && /* @__PURE__ */
|
|
4953
|
+
var ListItemText = React35.forwardRef(
|
|
4954
|
+
({ primary, secondary, noWrap = false, className, children, ...props }, ref) => /* @__PURE__ */ jsxs20("div", { ref, className: cn("min-w-0", className), ...props, children: [
|
|
4955
|
+
primary && /* @__PURE__ */ jsx35(
|
|
4881
4956
|
"div",
|
|
4882
4957
|
{
|
|
4883
4958
|
className: cn(
|
|
@@ -4887,7 +4962,7 @@ var ListItemText = React34.forwardRef(
|
|
|
4887
4962
|
children: primary
|
|
4888
4963
|
}
|
|
4889
4964
|
),
|
|
4890
|
-
secondary && /* @__PURE__ */
|
|
4965
|
+
secondary && /* @__PURE__ */ jsx35(
|
|
4891
4966
|
"div",
|
|
4892
4967
|
{
|
|
4893
4968
|
className: cn(
|
|
@@ -4901,8 +4976,8 @@ var ListItemText = React34.forwardRef(
|
|
|
4901
4976
|
] })
|
|
4902
4977
|
);
|
|
4903
4978
|
ListItemText.displayName = "ListItemText";
|
|
4904
|
-
var ListItemIcon =
|
|
4905
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4979
|
+
var ListItemIcon = React35.forwardRef(
|
|
4980
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4906
4981
|
"div",
|
|
4907
4982
|
{
|
|
4908
4983
|
ref,
|
|
@@ -4912,12 +4987,12 @@ var ListItemIcon = React34.forwardRef(
|
|
|
4912
4987
|
)
|
|
4913
4988
|
);
|
|
4914
4989
|
ListItemIcon.displayName = "ListItemIcon";
|
|
4915
|
-
var ListItemAvatar =
|
|
4916
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4990
|
+
var ListItemAvatar = React35.forwardRef(
|
|
4991
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx35("div", { ref, className: cn("shrink-0", className), ...props })
|
|
4917
4992
|
);
|
|
4918
4993
|
ListItemAvatar.displayName = "ListItemAvatar";
|
|
4919
|
-
var ListSubheader =
|
|
4920
|
-
({ sticky = false, className, ...props }, ref) => /* @__PURE__ */
|
|
4994
|
+
var ListSubheader = React35.forwardRef(
|
|
4995
|
+
({ sticky = false, className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4921
4996
|
"li",
|
|
4922
4997
|
{
|
|
4923
4998
|
ref,
|
|
@@ -4932,8 +5007,8 @@ var ListSubheader = React34.forwardRef(
|
|
|
4932
5007
|
)
|
|
4933
5008
|
);
|
|
4934
5009
|
ListSubheader.displayName = "ListSubheader";
|
|
4935
|
-
var ListDivider =
|
|
4936
|
-
({ inset = false, className, ...props }, ref) => /* @__PURE__ */
|
|
5010
|
+
var ListDivider = React35.forwardRef(
|
|
5011
|
+
({ inset = false, className, ...props }, ref) => /* @__PURE__ */ jsx35(
|
|
4937
5012
|
"li",
|
|
4938
5013
|
{
|
|
4939
5014
|
ref,
|
|
@@ -4976,7 +5051,7 @@ import {
|
|
|
4976
5051
|
LabelList
|
|
4977
5052
|
} from "recharts";
|
|
4978
5053
|
import { accentColors as accentColors2 } from "@onesaz/tokens";
|
|
4979
|
-
import { Fragment as Fragment5, jsx as
|
|
5054
|
+
import { Fragment as Fragment5, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4980
5055
|
var BarChart = ({
|
|
4981
5056
|
data,
|
|
4982
5057
|
dataKey,
|
|
@@ -5009,7 +5084,7 @@ var BarChart = ({
|
|
|
5009
5084
|
accentColors2[accentColor][1]
|
|
5010
5085
|
];
|
|
5011
5086
|
const chartColors = colors || defaultColors;
|
|
5012
|
-
const bars = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */
|
|
5087
|
+
const bars = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */ jsx36(
|
|
5013
5088
|
Bar,
|
|
5014
5089
|
{
|
|
5015
5090
|
dataKey: keyConfig.dataKey,
|
|
@@ -5018,7 +5093,7 @@ var BarChart = ({
|
|
|
5018
5093
|
radius: barProps.radius,
|
|
5019
5094
|
maxBarSize: barProps.maxBarSize,
|
|
5020
5095
|
minPointSize: barProps.minPointSize,
|
|
5021
|
-
children: labelList && /* @__PURE__ */
|
|
5096
|
+
children: labelList && /* @__PURE__ */ jsx36(
|
|
5022
5097
|
LabelList,
|
|
5023
5098
|
{
|
|
5024
5099
|
dataKey: labelList.dataKey || keyConfig.dataKey,
|
|
@@ -5029,7 +5104,7 @@ var BarChart = ({
|
|
|
5029
5104
|
)
|
|
5030
5105
|
},
|
|
5031
5106
|
keyConfig.dataKey
|
|
5032
|
-
)) : /* @__PURE__ */
|
|
5107
|
+
)) : /* @__PURE__ */ jsxs21(
|
|
5033
5108
|
Bar,
|
|
5034
5109
|
{
|
|
5035
5110
|
dataKey,
|
|
@@ -5039,7 +5114,7 @@ var BarChart = ({
|
|
|
5039
5114
|
maxBarSize: barProps.maxBarSize,
|
|
5040
5115
|
minPointSize: barProps.minPointSize,
|
|
5041
5116
|
children: [
|
|
5042
|
-
labelList && /* @__PURE__ */
|
|
5117
|
+
labelList && /* @__PURE__ */ jsx36(
|
|
5043
5118
|
LabelList,
|
|
5044
5119
|
{
|
|
5045
5120
|
dataKey: labelList.dataKey || dataKey,
|
|
@@ -5048,7 +5123,7 @@ var BarChart = ({
|
|
|
5048
5123
|
formatter: labelList.formatter
|
|
5049
5124
|
}
|
|
5050
5125
|
),
|
|
5051
|
-
data.map((_entry, index) => /* @__PURE__ */
|
|
5126
|
+
data.map((_entry, index) => /* @__PURE__ */ jsx36(
|
|
5052
5127
|
Cell,
|
|
5053
5128
|
{
|
|
5054
5129
|
fill: chartColors[index % chartColors.length]
|
|
@@ -5058,7 +5133,7 @@ var BarChart = ({
|
|
|
5058
5133
|
]
|
|
5059
5134
|
}
|
|
5060
5135
|
);
|
|
5061
|
-
const customTooltip = tooltip ? /* @__PURE__ */
|
|
5136
|
+
const customTooltip = tooltip ? /* @__PURE__ */ jsx36(
|
|
5062
5137
|
Tooltip2,
|
|
5063
5138
|
{
|
|
5064
5139
|
formatter: tooltip.formatter,
|
|
@@ -5066,8 +5141,8 @@ var BarChart = ({
|
|
|
5066
5141
|
labelStyle: tooltip.labelStyle,
|
|
5067
5142
|
contentStyle: tooltip.contentStyle
|
|
5068
5143
|
}
|
|
5069
|
-
) : showTooltip ? /* @__PURE__ */
|
|
5070
|
-
return /* @__PURE__ */
|
|
5144
|
+
) : showTooltip ? /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }) : null;
|
|
5145
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(
|
|
5071
5146
|
RechartsBarChart,
|
|
5072
5147
|
{
|
|
5073
5148
|
data,
|
|
@@ -5075,8 +5150,8 @@ var BarChart = ({
|
|
|
5075
5150
|
barCategoryGap: barProps.barCategoryGap,
|
|
5076
5151
|
barGap: barProps.barGap,
|
|
5077
5152
|
children: [
|
|
5078
|
-
showGrid && /* @__PURE__ */
|
|
5079
|
-
xAxis && !xAxis.hide && /* @__PURE__ */
|
|
5153
|
+
showGrid && /* @__PURE__ */ jsx36(CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--muted-foreground))", opacity: 0.3 }),
|
|
5154
|
+
xAxis && !xAxis.hide && /* @__PURE__ */ jsx36(
|
|
5080
5155
|
XAxis,
|
|
5081
5156
|
{
|
|
5082
5157
|
dataKey: xAxis.dataKey,
|
|
@@ -5090,7 +5165,7 @@ var BarChart = ({
|
|
|
5090
5165
|
label: xAxis.label ? { value: xAxis.label, position: "insideBottom", offset: -5 } : void 0
|
|
5091
5166
|
}
|
|
5092
5167
|
),
|
|
5093
|
-
yAxis && !yAxis.hide && /* @__PURE__ */
|
|
5168
|
+
yAxis && !yAxis.hide && /* @__PURE__ */ jsx36(
|
|
5094
5169
|
YAxis,
|
|
5095
5170
|
{
|
|
5096
5171
|
type: yAxis.type,
|
|
@@ -5101,7 +5176,7 @@ var BarChart = ({
|
|
|
5101
5176
|
}
|
|
5102
5177
|
),
|
|
5103
5178
|
customTooltip,
|
|
5104
|
-
showLegend && /* @__PURE__ */
|
|
5179
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {}),
|
|
5105
5180
|
bars
|
|
5106
5181
|
]
|
|
5107
5182
|
}
|
|
@@ -5134,7 +5209,7 @@ var LineChart = ({
|
|
|
5134
5209
|
accentColors2[accentColor][12],
|
|
5135
5210
|
accentColors2[accentColor][1]
|
|
5136
5211
|
];
|
|
5137
|
-
const lines = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */
|
|
5212
|
+
const lines = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */ jsx36(
|
|
5138
5213
|
Line,
|
|
5139
5214
|
{
|
|
5140
5215
|
type: "monotone",
|
|
@@ -5144,7 +5219,7 @@ var LineChart = ({
|
|
|
5144
5219
|
name: keyConfig.name || keyConfig.dataKey
|
|
5145
5220
|
},
|
|
5146
5221
|
keyConfig.dataKey
|
|
5147
|
-
)) : /* @__PURE__ */
|
|
5222
|
+
)) : /* @__PURE__ */ jsx36(
|
|
5148
5223
|
Line,
|
|
5149
5224
|
{
|
|
5150
5225
|
type: "monotone",
|
|
@@ -5154,9 +5229,9 @@ var LineChart = ({
|
|
|
5154
5229
|
name: name || dataKey
|
|
5155
5230
|
}
|
|
5156
5231
|
);
|
|
5157
|
-
return /* @__PURE__ */
|
|
5158
|
-
showGrid && /* @__PURE__ */
|
|
5159
|
-
xAxis && !xAxis.hide && /* @__PURE__ */
|
|
5232
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsLineChart, { data, margin, children: [
|
|
5233
|
+
showGrid && /* @__PURE__ */ jsx36(CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--muted-foreground))", opacity: 0.3 }),
|
|
5234
|
+
xAxis && !xAxis.hide && /* @__PURE__ */ jsx36(
|
|
5160
5235
|
XAxis,
|
|
5161
5236
|
{
|
|
5162
5237
|
dataKey: xAxis.dataKey,
|
|
@@ -5166,7 +5241,7 @@ var LineChart = ({
|
|
|
5166
5241
|
label: xAxis.label ? { value: xAxis.label, position: "insideBottom", offset: -5 } : void 0
|
|
5167
5242
|
}
|
|
5168
5243
|
),
|
|
5169
|
-
yAxis && !yAxis.hide && /* @__PURE__ */
|
|
5244
|
+
yAxis && !yAxis.hide && /* @__PURE__ */ jsx36(
|
|
5170
5245
|
YAxis,
|
|
5171
5246
|
{
|
|
5172
5247
|
type: yAxis.type,
|
|
@@ -5175,8 +5250,8 @@ var LineChart = ({
|
|
|
5175
5250
|
label: yAxis.label ? { value: yAxis.label, angle: -90, position: "insideLeft" } : void 0
|
|
5176
5251
|
}
|
|
5177
5252
|
),
|
|
5178
|
-
showTooltip && /* @__PURE__ */
|
|
5179
|
-
showLegend && /* @__PURE__ */
|
|
5253
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5254
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {}),
|
|
5180
5255
|
lines
|
|
5181
5256
|
] }) }) });
|
|
5182
5257
|
};
|
|
@@ -5207,8 +5282,8 @@ var PieChart = ({
|
|
|
5207
5282
|
accentColors2[accentColor][1]
|
|
5208
5283
|
];
|
|
5209
5284
|
const chartColors = colors || defaultColors;
|
|
5210
|
-
return /* @__PURE__ */
|
|
5211
|
-
/* @__PURE__ */
|
|
5285
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsPieChart, { children: [
|
|
5286
|
+
/* @__PURE__ */ jsx36(
|
|
5212
5287
|
Pie,
|
|
5213
5288
|
{
|
|
5214
5289
|
data,
|
|
@@ -5219,11 +5294,11 @@ var PieChart = ({
|
|
|
5219
5294
|
fill: "#8884d8",
|
|
5220
5295
|
dataKey,
|
|
5221
5296
|
nameKey,
|
|
5222
|
-
children: data.map((_entry, index) => /* @__PURE__ */
|
|
5297
|
+
children: data.map((_entry, index) => /* @__PURE__ */ jsx36(Cell, { fill: chartColors[index % chartColors.length] }, `cell-${index}`))
|
|
5223
5298
|
}
|
|
5224
5299
|
),
|
|
5225
|
-
showTooltip && /* @__PURE__ */
|
|
5226
|
-
showLegend && /* @__PURE__ */
|
|
5300
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5301
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {})
|
|
5227
5302
|
] }) }) });
|
|
5228
5303
|
};
|
|
5229
5304
|
var AreaChart = ({
|
|
@@ -5255,7 +5330,7 @@ var AreaChart = ({
|
|
|
5255
5330
|
accentColors2[accentColor][12],
|
|
5256
5331
|
accentColors2[accentColor][1]
|
|
5257
5332
|
];
|
|
5258
|
-
const areas = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */
|
|
5333
|
+
const areas = dataKeys ? dataKeys.map((keyConfig, index) => /* @__PURE__ */ jsx36(
|
|
5259
5334
|
Area,
|
|
5260
5335
|
{
|
|
5261
5336
|
type: "monotone",
|
|
@@ -5266,7 +5341,7 @@ var AreaChart = ({
|
|
|
5266
5341
|
name: keyConfig.name || keyConfig.dataKey
|
|
5267
5342
|
},
|
|
5268
5343
|
keyConfig.dataKey
|
|
5269
|
-
)) : /* @__PURE__ */
|
|
5344
|
+
)) : /* @__PURE__ */ jsx36(
|
|
5270
5345
|
Area,
|
|
5271
5346
|
{
|
|
5272
5347
|
type: "monotone",
|
|
@@ -5276,9 +5351,9 @@ var AreaChart = ({
|
|
|
5276
5351
|
name: name || dataKey
|
|
5277
5352
|
}
|
|
5278
5353
|
);
|
|
5279
|
-
return /* @__PURE__ */
|
|
5280
|
-
showGrid && /* @__PURE__ */
|
|
5281
|
-
xAxis && !xAxis.hide && /* @__PURE__ */
|
|
5354
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsAreaChart, { data, margin, children: [
|
|
5355
|
+
showGrid && /* @__PURE__ */ jsx36(CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--muted-foreground))", opacity: 0.3 }),
|
|
5356
|
+
xAxis && !xAxis.hide && /* @__PURE__ */ jsx36(
|
|
5282
5357
|
XAxis,
|
|
5283
5358
|
{
|
|
5284
5359
|
dataKey: xAxis.dataKey,
|
|
@@ -5288,7 +5363,7 @@ var AreaChart = ({
|
|
|
5288
5363
|
label: xAxis.label ? { value: xAxis.label, position: "insideBottom", offset: -5 } : void 0
|
|
5289
5364
|
}
|
|
5290
5365
|
),
|
|
5291
|
-
yAxis && !yAxis.hide && /* @__PURE__ */
|
|
5366
|
+
yAxis && !yAxis.hide && /* @__PURE__ */ jsx36(
|
|
5292
5367
|
YAxis,
|
|
5293
5368
|
{
|
|
5294
5369
|
type: yAxis.type,
|
|
@@ -5297,8 +5372,8 @@ var AreaChart = ({
|
|
|
5297
5372
|
label: yAxis.label ? { value: yAxis.label, angle: -90, position: "insideLeft" } : void 0
|
|
5298
5373
|
}
|
|
5299
5374
|
),
|
|
5300
|
-
showTooltip && /* @__PURE__ */
|
|
5301
|
-
showLegend && /* @__PURE__ */
|
|
5375
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5376
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {}),
|
|
5302
5377
|
areas
|
|
5303
5378
|
] }) }) });
|
|
5304
5379
|
};
|
|
@@ -5319,9 +5394,9 @@ var ScatterChart = ({
|
|
|
5319
5394
|
className
|
|
5320
5395
|
}) => {
|
|
5321
5396
|
const { accentColor } = useTheme();
|
|
5322
|
-
return /* @__PURE__ */
|
|
5323
|
-
showGrid && /* @__PURE__ */
|
|
5324
|
-
xAxis && !xAxis.hide && /* @__PURE__ */
|
|
5397
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsScatterChart, { data, margin, children: [
|
|
5398
|
+
showGrid && /* @__PURE__ */ jsx36(CartesianGrid, { strokeDasharray: "3 3", stroke: "hsl(var(--muted-foreground))", opacity: 0.3 }),
|
|
5399
|
+
xAxis && !xAxis.hide && /* @__PURE__ */ jsx36(
|
|
5325
5400
|
XAxis,
|
|
5326
5401
|
{
|
|
5327
5402
|
dataKey: xDataKey,
|
|
@@ -5331,7 +5406,7 @@ var ScatterChart = ({
|
|
|
5331
5406
|
label: xAxis.label ? { value: xAxis.label, position: "insideBottom", offset: -5 } : void 0
|
|
5332
5407
|
}
|
|
5333
5408
|
),
|
|
5334
|
-
yAxis && !yAxis.hide && /* @__PURE__ */
|
|
5409
|
+
yAxis && !yAxis.hide && /* @__PURE__ */ jsx36(
|
|
5335
5410
|
YAxis,
|
|
5336
5411
|
{
|
|
5337
5412
|
dataKey: yDataKey,
|
|
@@ -5341,9 +5416,9 @@ var ScatterChart = ({
|
|
|
5341
5416
|
label: yAxis.label ? { value: yAxis.label, angle: -90, position: "insideLeft" } : void 0
|
|
5342
5417
|
}
|
|
5343
5418
|
),
|
|
5344
|
-
showTooltip && /* @__PURE__ */
|
|
5345
|
-
showLegend && /* @__PURE__ */
|
|
5346
|
-
/* @__PURE__ */
|
|
5419
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5420
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {}),
|
|
5421
|
+
/* @__PURE__ */ jsx36(Scatter, { name, dataKey: yDataKey, fill: fill || accentColors2[accentColor][6] })
|
|
5347
5422
|
] }) }) });
|
|
5348
5423
|
};
|
|
5349
5424
|
var RadarChart = ({
|
|
@@ -5360,11 +5435,11 @@ var RadarChart = ({
|
|
|
5360
5435
|
className
|
|
5361
5436
|
}) => {
|
|
5362
5437
|
const { accentColor } = useTheme();
|
|
5363
|
-
return /* @__PURE__ */
|
|
5364
|
-
/* @__PURE__ */
|
|
5365
|
-
/* @__PURE__ */
|
|
5366
|
-
/* @__PURE__ */
|
|
5367
|
-
/* @__PURE__ */
|
|
5438
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsRadarChart, { data, children: [
|
|
5439
|
+
/* @__PURE__ */ jsx36(PolarGrid, {}),
|
|
5440
|
+
/* @__PURE__ */ jsx36(PolarAngleAxis, { dataKey: nameKey }),
|
|
5441
|
+
/* @__PURE__ */ jsx36(PolarRadiusAxis, {}),
|
|
5442
|
+
/* @__PURE__ */ jsx36(
|
|
5368
5443
|
Radar,
|
|
5369
5444
|
{
|
|
5370
5445
|
name: name || dataKey,
|
|
@@ -5374,8 +5449,8 @@ var RadarChart = ({
|
|
|
5374
5449
|
fillOpacity: 0.6
|
|
5375
5450
|
}
|
|
5376
5451
|
),
|
|
5377
|
-
showTooltip && /* @__PURE__ */
|
|
5378
|
-
showLegend && /* @__PURE__ */
|
|
5452
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5453
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {})
|
|
5379
5454
|
] }) }) });
|
|
5380
5455
|
};
|
|
5381
5456
|
var DonutChart = ({
|
|
@@ -5422,8 +5497,8 @@ var DonutChart = ({
|
|
|
5422
5497
|
}
|
|
5423
5498
|
};
|
|
5424
5499
|
const styling = { ...defaultAdvancedStyling, ...advancedStyling };
|
|
5425
|
-
const gradientDefs = styling.enableGradients ? /* @__PURE__ */
|
|
5426
|
-
styling.enableShadows && /* @__PURE__ */
|
|
5500
|
+
const gradientDefs = styling.enableGradients ? /* @__PURE__ */ jsxs21("defs", { children: [
|
|
5501
|
+
styling.enableShadows && /* @__PURE__ */ jsxs21(
|
|
5427
5502
|
"filter",
|
|
5428
5503
|
{
|
|
5429
5504
|
id: "deepInsetShadow",
|
|
@@ -5432,9 +5507,9 @@ var DonutChart = ({
|
|
|
5432
5507
|
width: "200%",
|
|
5433
5508
|
height: "200%",
|
|
5434
5509
|
children: [
|
|
5435
|
-
/* @__PURE__ */
|
|
5436
|
-
/* @__PURE__ */
|
|
5437
|
-
/* @__PURE__ */
|
|
5510
|
+
/* @__PURE__ */ jsx36("feOffset", { dx: "0", dy: "2" }),
|
|
5511
|
+
/* @__PURE__ */ jsx36("feGaussianBlur", { stdDeviation: "2", result: "offsetBlur" }),
|
|
5512
|
+
/* @__PURE__ */ jsx36(
|
|
5438
5513
|
"feComposite",
|
|
5439
5514
|
{
|
|
5440
5515
|
in: "SourceAlpha",
|
|
@@ -5443,8 +5518,8 @@ var DonutChart = ({
|
|
|
5443
5518
|
result: "innerShadow"
|
|
5444
5519
|
}
|
|
5445
5520
|
),
|
|
5446
|
-
/* @__PURE__ */
|
|
5447
|
-
/* @__PURE__ */
|
|
5521
|
+
/* @__PURE__ */ jsx36("feFlood", { floodColor: "hsl(var(--muted))", floodOpacity: "0.9", result: "color" }),
|
|
5522
|
+
/* @__PURE__ */ jsx36(
|
|
5448
5523
|
"feComposite",
|
|
5449
5524
|
{
|
|
5450
5525
|
in: "color",
|
|
@@ -5453,7 +5528,7 @@ var DonutChart = ({
|
|
|
5453
5528
|
result: "shadow"
|
|
5454
5529
|
}
|
|
5455
5530
|
),
|
|
5456
|
-
/* @__PURE__ */
|
|
5531
|
+
/* @__PURE__ */ jsx36(
|
|
5457
5532
|
"feComposite",
|
|
5458
5533
|
{
|
|
5459
5534
|
in: "shadow",
|
|
@@ -5464,7 +5539,7 @@ var DonutChart = ({
|
|
|
5464
5539
|
]
|
|
5465
5540
|
}
|
|
5466
5541
|
),
|
|
5467
|
-
styling.enableShadows && /* @__PURE__ */
|
|
5542
|
+
styling.enableShadows && /* @__PURE__ */ jsx36(
|
|
5468
5543
|
"filter",
|
|
5469
5544
|
{
|
|
5470
5545
|
id: "dropShadow",
|
|
@@ -5472,7 +5547,7 @@ var DonutChart = ({
|
|
|
5472
5547
|
y: "-10%",
|
|
5473
5548
|
width: "120%",
|
|
5474
5549
|
height: "120%",
|
|
5475
|
-
children: /* @__PURE__ */
|
|
5550
|
+
children: /* @__PURE__ */ jsx36(
|
|
5476
5551
|
"feDropShadow",
|
|
5477
5552
|
{
|
|
5478
5553
|
dx: "0",
|
|
@@ -5484,7 +5559,7 @@ var DonutChart = ({
|
|
|
5484
5559
|
)
|
|
5485
5560
|
}
|
|
5486
5561
|
),
|
|
5487
|
-
styling.gradients?.map((gradient) => /* @__PURE__ */
|
|
5562
|
+
styling.gradients?.map((gradient) => /* @__PURE__ */ jsxs21(
|
|
5488
5563
|
"linearGradient",
|
|
5489
5564
|
{
|
|
5490
5565
|
id: gradient.id,
|
|
@@ -5493,14 +5568,14 @@ var DonutChart = ({
|
|
|
5493
5568
|
x2: gradient.x2 || "100%",
|
|
5494
5569
|
y2: gradient.y2 || "100%",
|
|
5495
5570
|
children: [
|
|
5496
|
-
/* @__PURE__ */
|
|
5497
|
-
/* @__PURE__ */
|
|
5571
|
+
/* @__PURE__ */ jsx36("stop", { offset: "0%", stopColor: gradient.colors[0] }),
|
|
5572
|
+
/* @__PURE__ */ jsx36("stop", { offset: "100%", stopColor: gradient.colors[1] })
|
|
5498
5573
|
]
|
|
5499
5574
|
},
|
|
5500
5575
|
gradient.id
|
|
5501
5576
|
))
|
|
5502
5577
|
] }) : null;
|
|
5503
|
-
const customTooltip = tooltip ? /* @__PURE__ */
|
|
5578
|
+
const customTooltip = tooltip ? /* @__PURE__ */ jsx36(
|
|
5504
5579
|
Tooltip2,
|
|
5505
5580
|
{
|
|
5506
5581
|
formatter: tooltip.formatter,
|
|
@@ -5508,10 +5583,10 @@ var DonutChart = ({
|
|
|
5508
5583
|
labelStyle: tooltip.labelStyle,
|
|
5509
5584
|
contentStyle: tooltip.contentStyle
|
|
5510
5585
|
}
|
|
5511
|
-
) : showTooltip ? /* @__PURE__ */
|
|
5512
|
-
return /* @__PURE__ */
|
|
5586
|
+
) : showTooltip ? /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }) : null;
|
|
5587
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsPieChart, { children: [
|
|
5513
5588
|
gradientDefs,
|
|
5514
|
-
/* @__PURE__ */
|
|
5589
|
+
/* @__PURE__ */ jsx36(
|
|
5515
5590
|
Pie,
|
|
5516
5591
|
{
|
|
5517
5592
|
data,
|
|
@@ -5524,7 +5599,7 @@ var DonutChart = ({
|
|
|
5524
5599
|
nameKey,
|
|
5525
5600
|
strokeLinecap: styling.progressArc.strokeLinecap,
|
|
5526
5601
|
filter: styling.progressArc.filter,
|
|
5527
|
-
children: data.map((_entry, index) => /* @__PURE__ */
|
|
5602
|
+
children: data.map((_entry, index) => /* @__PURE__ */ jsx36(
|
|
5528
5603
|
Cell,
|
|
5529
5604
|
{
|
|
5530
5605
|
fill: chartColors[index % chartColors.length]
|
|
@@ -5534,7 +5609,7 @@ var DonutChart = ({
|
|
|
5534
5609
|
}
|
|
5535
5610
|
),
|
|
5536
5611
|
customTooltip,
|
|
5537
|
-
showLegend && /* @__PURE__ */
|
|
5612
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {})
|
|
5538
5613
|
] }) }) });
|
|
5539
5614
|
};
|
|
5540
5615
|
var ProgressCard = ({
|
|
@@ -5571,7 +5646,7 @@ var ProgressCard = ({
|
|
|
5571
5646
|
const bgShadowId = `progress-bg-shadow-${Math.random().toString(36).substr(2, 9)}`;
|
|
5572
5647
|
const [startColor, endColor] = colorFn(normalizedPercentage);
|
|
5573
5648
|
const percentageTextColor = typography.percentageColorAuto ? normalizedPercentage <= 30 ? "text-green-600" : normalizedPercentage <= 50 ? "text-blue-600" : "text-red-600" : "text-gray-900 dark:text-gray-100";
|
|
5574
|
-
return /* @__PURE__ */
|
|
5649
|
+
return /* @__PURE__ */ jsxs21(
|
|
5575
5650
|
"div",
|
|
5576
5651
|
{
|
|
5577
5652
|
className: cn(
|
|
@@ -5581,16 +5656,16 @@ var ProgressCard = ({
|
|
|
5581
5656
|
),
|
|
5582
5657
|
onClick: () => onClick?.(questionNum),
|
|
5583
5658
|
children: [
|
|
5584
|
-
/* @__PURE__ */
|
|
5585
|
-
/* @__PURE__ */
|
|
5586
|
-
/* @__PURE__ */
|
|
5659
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center", children: [
|
|
5660
|
+
/* @__PURE__ */ jsx36("span", { className: cn("font-bold", typography.questionFontSize, typography.questionColor), children: questionNum }),
|
|
5661
|
+
/* @__PURE__ */ jsxs21("span", { className: cn("font-bold", typography.percentageFontSize, percentageTextColor), children: [
|
|
5587
5662
|
normalizedPercentage.toFixed(1),
|
|
5588
5663
|
"%"
|
|
5589
5664
|
] })
|
|
5590
5665
|
] }),
|
|
5591
|
-
/* @__PURE__ */
|
|
5592
|
-
/* @__PURE__ */
|
|
5593
|
-
enableGradients && /* @__PURE__ */
|
|
5666
|
+
/* @__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: [
|
|
5667
|
+
/* @__PURE__ */ jsxs21("defs", { children: [
|
|
5668
|
+
enableGradients && /* @__PURE__ */ jsxs21(
|
|
5594
5669
|
"linearGradient",
|
|
5595
5670
|
{
|
|
5596
5671
|
id: gradientId,
|
|
@@ -5599,13 +5674,13 @@ var ProgressCard = ({
|
|
|
5599
5674
|
x2: "100%",
|
|
5600
5675
|
y2: "100%",
|
|
5601
5676
|
children: [
|
|
5602
|
-
/* @__PURE__ */
|
|
5603
|
-
/* @__PURE__ */
|
|
5677
|
+
/* @__PURE__ */ jsx36("stop", { offset: "0%", stopColor: startColor }),
|
|
5678
|
+
/* @__PURE__ */ jsx36("stop", { offset: "100%", stopColor: endColor })
|
|
5604
5679
|
]
|
|
5605
5680
|
}
|
|
5606
5681
|
),
|
|
5607
|
-
enableShadows && /* @__PURE__ */
|
|
5608
|
-
/* @__PURE__ */
|
|
5682
|
+
enableShadows && /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
5683
|
+
/* @__PURE__ */ jsxs21(
|
|
5609
5684
|
"filter",
|
|
5610
5685
|
{
|
|
5611
5686
|
id: bgShadowId,
|
|
@@ -5614,9 +5689,9 @@ var ProgressCard = ({
|
|
|
5614
5689
|
width: "200%",
|
|
5615
5690
|
height: "200%",
|
|
5616
5691
|
children: [
|
|
5617
|
-
/* @__PURE__ */
|
|
5618
|
-
/* @__PURE__ */
|
|
5619
|
-
/* @__PURE__ */
|
|
5692
|
+
/* @__PURE__ */ jsx36("feOffset", { dx: "0", dy: "2" }),
|
|
5693
|
+
/* @__PURE__ */ jsx36("feGaussianBlur", { stdDeviation: "2", result: "offsetBlur" }),
|
|
5694
|
+
/* @__PURE__ */ jsx36(
|
|
5620
5695
|
"feComposite",
|
|
5621
5696
|
{
|
|
5622
5697
|
in: "SourceAlpha",
|
|
@@ -5625,8 +5700,8 @@ var ProgressCard = ({
|
|
|
5625
5700
|
result: "innerShadow"
|
|
5626
5701
|
}
|
|
5627
5702
|
),
|
|
5628
|
-
/* @__PURE__ */
|
|
5629
|
-
/* @__PURE__ */
|
|
5703
|
+
/* @__PURE__ */ jsx36("feFlood", { floodColor: "#c0c0c0", floodOpacity: "0.9", result: "color" }),
|
|
5704
|
+
/* @__PURE__ */ jsx36(
|
|
5630
5705
|
"feComposite",
|
|
5631
5706
|
{
|
|
5632
5707
|
in: "color",
|
|
@@ -5635,7 +5710,7 @@ var ProgressCard = ({
|
|
|
5635
5710
|
result: "shadow"
|
|
5636
5711
|
}
|
|
5637
5712
|
),
|
|
5638
|
-
/* @__PURE__ */
|
|
5713
|
+
/* @__PURE__ */ jsx36(
|
|
5639
5714
|
"feComposite",
|
|
5640
5715
|
{
|
|
5641
5716
|
in: "shadow",
|
|
@@ -5646,7 +5721,7 @@ var ProgressCard = ({
|
|
|
5646
5721
|
]
|
|
5647
5722
|
}
|
|
5648
5723
|
),
|
|
5649
|
-
/* @__PURE__ */
|
|
5724
|
+
/* @__PURE__ */ jsx36(
|
|
5650
5725
|
"filter",
|
|
5651
5726
|
{
|
|
5652
5727
|
id: shadowId,
|
|
@@ -5654,7 +5729,7 @@ var ProgressCard = ({
|
|
|
5654
5729
|
y: "-10%",
|
|
5655
5730
|
width: "120%",
|
|
5656
5731
|
height: "120%",
|
|
5657
|
-
children: /* @__PURE__ */
|
|
5732
|
+
children: /* @__PURE__ */ jsx36(
|
|
5658
5733
|
"feDropShadow",
|
|
5659
5734
|
{
|
|
5660
5735
|
dx: "0",
|
|
@@ -5668,7 +5743,7 @@ var ProgressCard = ({
|
|
|
5668
5743
|
)
|
|
5669
5744
|
] })
|
|
5670
5745
|
] }),
|
|
5671
|
-
/* @__PURE__ */
|
|
5746
|
+
/* @__PURE__ */ jsx36(
|
|
5672
5747
|
"circle",
|
|
5673
5748
|
{
|
|
5674
5749
|
cx: "50",
|
|
@@ -5680,7 +5755,7 @@ var ProgressCard = ({
|
|
|
5680
5755
|
filter: enableShadows ? `url(#${bgShadowId})` : void 0
|
|
5681
5756
|
}
|
|
5682
5757
|
),
|
|
5683
|
-
/* @__PURE__ */
|
|
5758
|
+
/* @__PURE__ */ jsx36(
|
|
5684
5759
|
"circle",
|
|
5685
5760
|
{
|
|
5686
5761
|
cx: "50",
|
|
@@ -5734,10 +5809,10 @@ var ProgressDonut = ({
|
|
|
5734
5809
|
accentColors2[accentColor][1]
|
|
5735
5810
|
];
|
|
5736
5811
|
if (!data || data.length === 0) {
|
|
5737
|
-
return /* @__PURE__ */
|
|
5812
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("text-gray-500", className), children: "No data provided" });
|
|
5738
5813
|
}
|
|
5739
|
-
return /* @__PURE__ */
|
|
5740
|
-
/* @__PURE__ */
|
|
5814
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsx36(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs21(RechartsPieChart, { children: [
|
|
5815
|
+
/* @__PURE__ */ jsx36(
|
|
5741
5816
|
Pie,
|
|
5742
5817
|
{
|
|
5743
5818
|
data,
|
|
@@ -5751,12 +5826,12 @@ var ProgressDonut = ({
|
|
|
5751
5826
|
children: data.map((_entry, index) => {
|
|
5752
5827
|
const percentage = Math.min(100, Math.max(0, _entry.value));
|
|
5753
5828
|
const fillColor = colorFn(percentage) || defaultColors[index % defaultColors.length];
|
|
5754
|
-
return /* @__PURE__ */
|
|
5829
|
+
return /* @__PURE__ */ jsx36(Cell, { fill: fillColor }, `cell-${index}`);
|
|
5755
5830
|
})
|
|
5756
5831
|
}
|
|
5757
5832
|
),
|
|
5758
|
-
showTooltip && /* @__PURE__ */
|
|
5759
|
-
showLegend && /* @__PURE__ */
|
|
5833
|
+
showTooltip && /* @__PURE__ */ jsx36(Tooltip2, { contentStyle: { backgroundColor: "hsl(var(--background))", border: "1px solid hsl(var(--border))", borderRadius: "6px", color: "hsl(var(--foreground))" } }),
|
|
5834
|
+
showLegend && /* @__PURE__ */ jsx36(Legend, {})
|
|
5760
5835
|
] }) }) });
|
|
5761
5836
|
};
|
|
5762
5837
|
var MultiProgressDonut = ({
|
|
@@ -5783,20 +5858,20 @@ var MultiProgressDonut = ({
|
|
|
5783
5858
|
};
|
|
5784
5859
|
const colorFn = getColor || defaultGetColor;
|
|
5785
5860
|
if (!data || data.length === 0) {
|
|
5786
|
-
return /* @__PURE__ */
|
|
5861
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("text-gray-500", className), children: "No data provided" });
|
|
5787
5862
|
}
|
|
5788
|
-
return /* @__PURE__ */
|
|
5863
|
+
return /* @__PURE__ */ jsx36("div", { className: cn("flex flex-wrap gap-4", className), children: data.map((item, index) => {
|
|
5789
5864
|
const percentage = Math.min(100, Math.max(0, item.value));
|
|
5790
5865
|
const gradientId = `progress-gradient-${index}`;
|
|
5791
5866
|
const shadowId = `progress-shadow-${index}`;
|
|
5792
5867
|
const bgShadowId = `progress-bg-shadow-${index}`;
|
|
5793
5868
|
const [startColor, endColor] = colorFn(percentage);
|
|
5794
|
-
return /* @__PURE__ */
|
|
5795
|
-
item.label && /* @__PURE__ */
|
|
5796
|
-
/* @__PURE__ */
|
|
5797
|
-
/* @__PURE__ */
|
|
5798
|
-
/* @__PURE__ */
|
|
5799
|
-
enableGradients && /* @__PURE__ */
|
|
5869
|
+
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-2", children: [
|
|
5870
|
+
item.label && /* @__PURE__ */ jsx36("div", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: item.label }),
|
|
5871
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative", children: [
|
|
5872
|
+
/* @__PURE__ */ jsxs21("svg", { width: size, height: size, viewBox: "0 0 100 100", children: [
|
|
5873
|
+
/* @__PURE__ */ jsxs21("defs", { children: [
|
|
5874
|
+
enableGradients && /* @__PURE__ */ jsxs21(
|
|
5800
5875
|
"linearGradient",
|
|
5801
5876
|
{
|
|
5802
5877
|
id: gradientId,
|
|
@@ -5805,13 +5880,13 @@ var MultiProgressDonut = ({
|
|
|
5805
5880
|
x2: "100%",
|
|
5806
5881
|
y2: "100%",
|
|
5807
5882
|
children: [
|
|
5808
|
-
/* @__PURE__ */
|
|
5809
|
-
/* @__PURE__ */
|
|
5883
|
+
/* @__PURE__ */ jsx36("stop", { offset: "0%", stopColor: startColor }),
|
|
5884
|
+
/* @__PURE__ */ jsx36("stop", { offset: "100%", stopColor: endColor })
|
|
5810
5885
|
]
|
|
5811
5886
|
}
|
|
5812
5887
|
),
|
|
5813
|
-
enableShadows && /* @__PURE__ */
|
|
5814
|
-
/* @__PURE__ */
|
|
5888
|
+
enableShadows && /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
5889
|
+
/* @__PURE__ */ jsxs21(
|
|
5815
5890
|
"filter",
|
|
5816
5891
|
{
|
|
5817
5892
|
id: bgShadowId,
|
|
@@ -5820,9 +5895,9 @@ var MultiProgressDonut = ({
|
|
|
5820
5895
|
width: "200%",
|
|
5821
5896
|
height: "200%",
|
|
5822
5897
|
children: [
|
|
5823
|
-
/* @__PURE__ */
|
|
5824
|
-
/* @__PURE__ */
|
|
5825
|
-
/* @__PURE__ */
|
|
5898
|
+
/* @__PURE__ */ jsx36("feOffset", { dx: "0", dy: "2" }),
|
|
5899
|
+
/* @__PURE__ */ jsx36("feGaussianBlur", { stdDeviation: "2", result: "offsetBlur" }),
|
|
5900
|
+
/* @__PURE__ */ jsx36(
|
|
5826
5901
|
"feComposite",
|
|
5827
5902
|
{
|
|
5828
5903
|
in: "SourceAlpha",
|
|
@@ -5831,8 +5906,8 @@ var MultiProgressDonut = ({
|
|
|
5831
5906
|
result: "innerShadow"
|
|
5832
5907
|
}
|
|
5833
5908
|
),
|
|
5834
|
-
/* @__PURE__ */
|
|
5835
|
-
/* @__PURE__ */
|
|
5909
|
+
/* @__PURE__ */ jsx36("feFlood", { floodColor: "#c0c0c0", floodOpacity: "0.9", result: "color" }),
|
|
5910
|
+
/* @__PURE__ */ jsx36(
|
|
5836
5911
|
"feComposite",
|
|
5837
5912
|
{
|
|
5838
5913
|
in: "color",
|
|
@@ -5841,7 +5916,7 @@ var MultiProgressDonut = ({
|
|
|
5841
5916
|
result: "shadow"
|
|
5842
5917
|
}
|
|
5843
5918
|
),
|
|
5844
|
-
/* @__PURE__ */
|
|
5919
|
+
/* @__PURE__ */ jsx36(
|
|
5845
5920
|
"feComposite",
|
|
5846
5921
|
{
|
|
5847
5922
|
in: "shadow",
|
|
@@ -5852,7 +5927,7 @@ var MultiProgressDonut = ({
|
|
|
5852
5927
|
]
|
|
5853
5928
|
}
|
|
5854
5929
|
),
|
|
5855
|
-
/* @__PURE__ */
|
|
5930
|
+
/* @__PURE__ */ jsx36(
|
|
5856
5931
|
"filter",
|
|
5857
5932
|
{
|
|
5858
5933
|
id: shadowId,
|
|
@@ -5860,7 +5935,7 @@ var MultiProgressDonut = ({
|
|
|
5860
5935
|
y: "-10%",
|
|
5861
5936
|
width: "120%",
|
|
5862
5937
|
height: "120%",
|
|
5863
|
-
children: /* @__PURE__ */
|
|
5938
|
+
children: /* @__PURE__ */ jsx36(
|
|
5864
5939
|
"feDropShadow",
|
|
5865
5940
|
{
|
|
5866
5941
|
dx: "0",
|
|
@@ -5874,7 +5949,7 @@ var MultiProgressDonut = ({
|
|
|
5874
5949
|
)
|
|
5875
5950
|
] })
|
|
5876
5951
|
] }),
|
|
5877
|
-
/* @__PURE__ */
|
|
5952
|
+
/* @__PURE__ */ jsx36(
|
|
5878
5953
|
"circle",
|
|
5879
5954
|
{
|
|
5880
5955
|
cx: "50",
|
|
@@ -5886,7 +5961,7 @@ var MultiProgressDonut = ({
|
|
|
5886
5961
|
filter: enableShadows ? `url(#${bgShadowId})` : void 0
|
|
5887
5962
|
}
|
|
5888
5963
|
),
|
|
5889
|
-
/* @__PURE__ */
|
|
5964
|
+
/* @__PURE__ */ jsx36(
|
|
5890
5965
|
"circle",
|
|
5891
5966
|
{
|
|
5892
5967
|
cx: "50",
|
|
@@ -5903,7 +5978,7 @@ var MultiProgressDonut = ({
|
|
|
5903
5978
|
}
|
|
5904
5979
|
)
|
|
5905
5980
|
] }),
|
|
5906
|
-
showPercentage && /* @__PURE__ */
|
|
5981
|
+
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: [
|
|
5907
5982
|
percentage.toFixed(1),
|
|
5908
5983
|
"%"
|
|
5909
5984
|
] }) })
|
|
@@ -5913,9 +5988,9 @@ var MultiProgressDonut = ({
|
|
|
5913
5988
|
};
|
|
5914
5989
|
|
|
5915
5990
|
// src/components/breadcrumbs.tsx
|
|
5916
|
-
import * as
|
|
5917
|
-
import { jsx as
|
|
5918
|
-
var Breadcrumbs =
|
|
5991
|
+
import * as React36 from "react";
|
|
5992
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5993
|
+
var Breadcrumbs = React36.forwardRef(
|
|
5919
5994
|
({
|
|
5920
5995
|
separator,
|
|
5921
5996
|
maxItems,
|
|
@@ -5925,9 +6000,9 @@ var Breadcrumbs = React35.forwardRef(
|
|
|
5925
6000
|
children,
|
|
5926
6001
|
...props
|
|
5927
6002
|
}, ref) => {
|
|
5928
|
-
const childArray =
|
|
6003
|
+
const childArray = React36.Children.toArray(children);
|
|
5929
6004
|
const totalItems = childArray.length;
|
|
5930
|
-
const separatorElement = separator ?? /* @__PURE__ */
|
|
6005
|
+
const separatorElement = separator ?? /* @__PURE__ */ jsx37(
|
|
5931
6006
|
"svg",
|
|
5932
6007
|
{
|
|
5933
6008
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5940,7 +6015,7 @@ var Breadcrumbs = React35.forwardRef(
|
|
|
5940
6015
|
strokeLinecap: "round",
|
|
5941
6016
|
strokeLinejoin: "round",
|
|
5942
6017
|
className: "text-muted-foreground",
|
|
5943
|
-
children: /* @__PURE__ */
|
|
6018
|
+
children: /* @__PURE__ */ jsx37("path", { d: "m9 18 6-6-6-6" })
|
|
5944
6019
|
}
|
|
5945
6020
|
);
|
|
5946
6021
|
const shouldCollapse = maxItems && totalItems > maxItems;
|
|
@@ -5950,20 +6025,20 @@ var Breadcrumbs = React35.forwardRef(
|
|
|
5950
6025
|
const endItems = childArray.slice(-itemsAfterCollapse);
|
|
5951
6026
|
displayedItems = [
|
|
5952
6027
|
...startItems,
|
|
5953
|
-
/* @__PURE__ */
|
|
6028
|
+
/* @__PURE__ */ jsx37(BreadcrumbEllipsis, {}, "ellipsis"),
|
|
5954
6029
|
...endItems
|
|
5955
6030
|
];
|
|
5956
6031
|
} else {
|
|
5957
6032
|
displayedItems = childArray;
|
|
5958
6033
|
}
|
|
5959
|
-
return /* @__PURE__ */
|
|
5960
|
-
index > 0 && /* @__PURE__ */
|
|
6034
|
+
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: [
|
|
6035
|
+
index > 0 && /* @__PURE__ */ jsx37("span", { className: "flex items-center", "aria-hidden": "true", children: separatorElement }),
|
|
5961
6036
|
child
|
|
5962
6037
|
] }, index)) }) });
|
|
5963
6038
|
}
|
|
5964
6039
|
);
|
|
5965
6040
|
Breadcrumbs.displayName = "Breadcrumbs";
|
|
5966
|
-
var BreadcrumbItem =
|
|
6041
|
+
var BreadcrumbItem = React36.forwardRef(
|
|
5967
6042
|
({ current = false, href, onClick, className, children, ...props }, ref) => {
|
|
5968
6043
|
const baseClasses = cn(
|
|
5969
6044
|
"text-sm transition-colors",
|
|
@@ -5972,7 +6047,7 @@ var BreadcrumbItem = React35.forwardRef(
|
|
|
5972
6047
|
className
|
|
5973
6048
|
);
|
|
5974
6049
|
if (current) {
|
|
5975
|
-
return /* @__PURE__ */
|
|
6050
|
+
return /* @__PURE__ */ jsx37(
|
|
5976
6051
|
"span",
|
|
5977
6052
|
{
|
|
5978
6053
|
ref,
|
|
@@ -5984,7 +6059,7 @@ var BreadcrumbItem = React35.forwardRef(
|
|
|
5984
6059
|
);
|
|
5985
6060
|
}
|
|
5986
6061
|
if (href) {
|
|
5987
|
-
return /* @__PURE__ */
|
|
6062
|
+
return /* @__PURE__ */ jsx37(
|
|
5988
6063
|
"a",
|
|
5989
6064
|
{
|
|
5990
6065
|
href,
|
|
@@ -5994,7 +6069,7 @@ var BreadcrumbItem = React35.forwardRef(
|
|
|
5994
6069
|
}
|
|
5995
6070
|
);
|
|
5996
6071
|
}
|
|
5997
|
-
return /* @__PURE__ */
|
|
6072
|
+
return /* @__PURE__ */ jsx37(
|
|
5998
6073
|
"span",
|
|
5999
6074
|
{
|
|
6000
6075
|
ref,
|
|
@@ -6015,8 +6090,8 @@ var BreadcrumbItem = React35.forwardRef(
|
|
|
6015
6090
|
}
|
|
6016
6091
|
);
|
|
6017
6092
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
6018
|
-
var BreadcrumbLink =
|
|
6019
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6093
|
+
var BreadcrumbLink = React36.forwardRef(
|
|
6094
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
6020
6095
|
"a",
|
|
6021
6096
|
{
|
|
6022
6097
|
ref,
|
|
@@ -6029,8 +6104,8 @@ var BreadcrumbLink = React35.forwardRef(
|
|
|
6029
6104
|
)
|
|
6030
6105
|
);
|
|
6031
6106
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
6032
|
-
var BreadcrumbSeparator =
|
|
6033
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
6107
|
+
var BreadcrumbSeparator = React36.forwardRef(
|
|
6108
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
6034
6109
|
"span",
|
|
6035
6110
|
{
|
|
6036
6111
|
ref,
|
|
@@ -6038,7 +6113,7 @@ var BreadcrumbSeparator = React35.forwardRef(
|
|
|
6038
6113
|
"aria-hidden": "true",
|
|
6039
6114
|
className: cn("text-muted-foreground", className),
|
|
6040
6115
|
...props,
|
|
6041
|
-
children: children ?? /* @__PURE__ */
|
|
6116
|
+
children: children ?? /* @__PURE__ */ jsx37(
|
|
6042
6117
|
"svg",
|
|
6043
6118
|
{
|
|
6044
6119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6050,15 +6125,15 @@ var BreadcrumbSeparator = React35.forwardRef(
|
|
|
6050
6125
|
strokeWidth: "2",
|
|
6051
6126
|
strokeLinecap: "round",
|
|
6052
6127
|
strokeLinejoin: "round",
|
|
6053
|
-
children: /* @__PURE__ */
|
|
6128
|
+
children: /* @__PURE__ */ jsx37("path", { d: "m9 18 6-6-6-6" })
|
|
6054
6129
|
}
|
|
6055
6130
|
)
|
|
6056
6131
|
}
|
|
6057
6132
|
)
|
|
6058
6133
|
);
|
|
6059
6134
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
6060
|
-
var BreadcrumbEllipsis =
|
|
6061
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6135
|
+
var BreadcrumbEllipsis = React36.forwardRef(
|
|
6136
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
6062
6137
|
"span",
|
|
6063
6138
|
{
|
|
6064
6139
|
ref,
|
|
@@ -6066,7 +6141,7 @@ var BreadcrumbEllipsis = React35.forwardRef(
|
|
|
6066
6141
|
"aria-hidden": "true",
|
|
6067
6142
|
className: cn("text-sm text-muted-foreground", className),
|
|
6068
6143
|
...props,
|
|
6069
|
-
children: /* @__PURE__ */
|
|
6144
|
+
children: /* @__PURE__ */ jsxs22(
|
|
6070
6145
|
"svg",
|
|
6071
6146
|
{
|
|
6072
6147
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6079,9 +6154,9 @@ var BreadcrumbEllipsis = React35.forwardRef(
|
|
|
6079
6154
|
strokeLinecap: "round",
|
|
6080
6155
|
strokeLinejoin: "round",
|
|
6081
6156
|
children: [
|
|
6082
|
-
/* @__PURE__ */
|
|
6083
|
-
/* @__PURE__ */
|
|
6084
|
-
/* @__PURE__ */
|
|
6157
|
+
/* @__PURE__ */ jsx37("circle", { cx: "12", cy: "12", r: "1" }),
|
|
6158
|
+
/* @__PURE__ */ jsx37("circle", { cx: "19", cy: "12", r: "1" }),
|
|
6159
|
+
/* @__PURE__ */ jsx37("circle", { cx: "5", cy: "12", r: "1" })
|
|
6085
6160
|
]
|
|
6086
6161
|
}
|
|
6087
6162
|
)
|
|
@@ -6089,8 +6164,8 @@ var BreadcrumbEllipsis = React35.forwardRef(
|
|
|
6089
6164
|
)
|
|
6090
6165
|
);
|
|
6091
6166
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
6092
|
-
var BreadcrumbPage =
|
|
6093
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6167
|
+
var BreadcrumbPage = React36.forwardRef(
|
|
6168
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
6094
6169
|
"span",
|
|
6095
6170
|
{
|
|
6096
6171
|
ref,
|
|
@@ -6103,16 +6178,16 @@ var BreadcrumbPage = React35.forwardRef(
|
|
|
6103
6178
|
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
6104
6179
|
|
|
6105
6180
|
// src/components/dropdown-menu.tsx
|
|
6106
|
-
import * as
|
|
6181
|
+
import * as React37 from "react";
|
|
6107
6182
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6108
|
-
import { jsx as
|
|
6183
|
+
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6109
6184
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
6110
6185
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
6111
6186
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
6112
6187
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
6113
6188
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
6114
6189
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
6115
|
-
var DropdownMenuSubTrigger =
|
|
6190
|
+
var DropdownMenuSubTrigger = React37.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
6116
6191
|
DropdownMenuPrimitive.SubTrigger,
|
|
6117
6192
|
{
|
|
6118
6193
|
ref,
|
|
@@ -6126,7 +6201,7 @@ var DropdownMenuSubTrigger = React36.forwardRef(({ className, inset, children, .
|
|
|
6126
6201
|
...props,
|
|
6127
6202
|
children: [
|
|
6128
6203
|
children,
|
|
6129
|
-
/* @__PURE__ */
|
|
6204
|
+
/* @__PURE__ */ jsx38(
|
|
6130
6205
|
"svg",
|
|
6131
6206
|
{
|
|
6132
6207
|
className: "ml-auto h-4 w-4",
|
|
@@ -6137,14 +6212,14 @@ var DropdownMenuSubTrigger = React36.forwardRef(({ className, inset, children, .
|
|
|
6137
6212
|
strokeWidth: "2",
|
|
6138
6213
|
strokeLinecap: "round",
|
|
6139
6214
|
strokeLinejoin: "round",
|
|
6140
|
-
children: /* @__PURE__ */
|
|
6215
|
+
children: /* @__PURE__ */ jsx38("path", { d: "m9 18 6-6-6-6" })
|
|
6141
6216
|
}
|
|
6142
6217
|
)
|
|
6143
6218
|
]
|
|
6144
6219
|
}
|
|
6145
6220
|
));
|
|
6146
6221
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
6147
|
-
var DropdownMenuSubContent =
|
|
6222
|
+
var DropdownMenuSubContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6148
6223
|
DropdownMenuPrimitive.SubContent,
|
|
6149
6224
|
{
|
|
6150
6225
|
ref,
|
|
@@ -6161,7 +6236,7 @@ var DropdownMenuSubContent = React36.forwardRef(({ className, ...props }, ref) =
|
|
|
6161
6236
|
}
|
|
6162
6237
|
));
|
|
6163
6238
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
6164
|
-
var DropdownMenuContent =
|
|
6239
|
+
var DropdownMenuContent = React37.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx38(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx38(
|
|
6165
6240
|
DropdownMenuPrimitive.Content,
|
|
6166
6241
|
{
|
|
6167
6242
|
ref,
|
|
@@ -6179,7 +6254,7 @@ var DropdownMenuContent = React36.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
6179
6254
|
}
|
|
6180
6255
|
) }));
|
|
6181
6256
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
6182
|
-
var DropdownMenuItem =
|
|
6257
|
+
var DropdownMenuItem = React37.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6183
6258
|
DropdownMenuPrimitive.Item,
|
|
6184
6259
|
{
|
|
6185
6260
|
ref,
|
|
@@ -6195,7 +6270,7 @@ var DropdownMenuItem = React36.forwardRef(({ className, inset, ...props }, ref)
|
|
|
6195
6270
|
}
|
|
6196
6271
|
));
|
|
6197
6272
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
6198
|
-
var DropdownMenuCheckboxItem =
|
|
6273
|
+
var DropdownMenuCheckboxItem = React37.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
6199
6274
|
DropdownMenuPrimitive.CheckboxItem,
|
|
6200
6275
|
{
|
|
6201
6276
|
ref,
|
|
@@ -6208,7 +6283,7 @@ var DropdownMenuCheckboxItem = React36.forwardRef(({ className, children, checke
|
|
|
6208
6283
|
checked,
|
|
6209
6284
|
...props,
|
|
6210
6285
|
children: [
|
|
6211
|
-
/* @__PURE__ */
|
|
6286
|
+
/* @__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(
|
|
6212
6287
|
"svg",
|
|
6213
6288
|
{
|
|
6214
6289
|
className: "h-4 w-4",
|
|
@@ -6219,7 +6294,7 @@ var DropdownMenuCheckboxItem = React36.forwardRef(({ className, children, checke
|
|
|
6219
6294
|
strokeWidth: "2",
|
|
6220
6295
|
strokeLinecap: "round",
|
|
6221
6296
|
strokeLinejoin: "round",
|
|
6222
|
-
children: /* @__PURE__ */
|
|
6297
|
+
children: /* @__PURE__ */ jsx38("path", { d: "M20 6 9 17l-5-5" })
|
|
6223
6298
|
}
|
|
6224
6299
|
) }) }),
|
|
6225
6300
|
children
|
|
@@ -6227,7 +6302,7 @@ var DropdownMenuCheckboxItem = React36.forwardRef(({ className, children, checke
|
|
|
6227
6302
|
}
|
|
6228
6303
|
));
|
|
6229
6304
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
6230
|
-
var DropdownMenuRadioItem =
|
|
6305
|
+
var DropdownMenuRadioItem = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs23(
|
|
6231
6306
|
DropdownMenuPrimitive.RadioItem,
|
|
6232
6307
|
{
|
|
6233
6308
|
ref,
|
|
@@ -6239,13 +6314,13 @@ var DropdownMenuRadioItem = React36.forwardRef(({ className, children, ...props
|
|
|
6239
6314
|
),
|
|
6240
6315
|
...props,
|
|
6241
6316
|
children: [
|
|
6242
|
-
/* @__PURE__ */
|
|
6317
|
+
/* @__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(
|
|
6243
6318
|
"svg",
|
|
6244
6319
|
{
|
|
6245
6320
|
className: "h-2 w-2 fill-current",
|
|
6246
6321
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6247
6322
|
viewBox: "0 0 24 24",
|
|
6248
|
-
children: /* @__PURE__ */
|
|
6323
|
+
children: /* @__PURE__ */ jsx38("circle", { cx: "12", cy: "12", r: "10" })
|
|
6249
6324
|
}
|
|
6250
6325
|
) }) }),
|
|
6251
6326
|
children
|
|
@@ -6253,7 +6328,7 @@ var DropdownMenuRadioItem = React36.forwardRef(({ className, children, ...props
|
|
|
6253
6328
|
}
|
|
6254
6329
|
));
|
|
6255
6330
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
6256
|
-
var DropdownMenuLabel =
|
|
6331
|
+
var DropdownMenuLabel = React37.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6257
6332
|
DropdownMenuPrimitive.Label,
|
|
6258
6333
|
{
|
|
6259
6334
|
ref,
|
|
@@ -6266,7 +6341,7 @@ var DropdownMenuLabel = React36.forwardRef(({ className, inset, ...props }, ref)
|
|
|
6266
6341
|
}
|
|
6267
6342
|
));
|
|
6268
6343
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
6269
|
-
var DropdownMenuSeparator =
|
|
6344
|
+
var DropdownMenuSeparator = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
6270
6345
|
DropdownMenuPrimitive.Separator,
|
|
6271
6346
|
{
|
|
6272
6347
|
ref,
|
|
@@ -6279,7 +6354,7 @@ var DropdownMenuShortcut = ({
|
|
|
6279
6354
|
className,
|
|
6280
6355
|
...props
|
|
6281
6356
|
}) => {
|
|
6282
|
-
return /* @__PURE__ */
|
|
6357
|
+
return /* @__PURE__ */ jsx38(
|
|
6283
6358
|
"span",
|
|
6284
6359
|
{
|
|
6285
6360
|
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
@@ -6290,14 +6365,14 @@ var DropdownMenuShortcut = ({
|
|
|
6290
6365
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
6291
6366
|
|
|
6292
6367
|
// src/components/drawer.tsx
|
|
6293
|
-
import * as
|
|
6368
|
+
import * as React38 from "react";
|
|
6294
6369
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
6295
|
-
import { jsx as
|
|
6370
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6296
6371
|
var Drawer = DialogPrimitive2.Root;
|
|
6297
6372
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
6298
6373
|
var DrawerClose = DialogPrimitive2.Close;
|
|
6299
6374
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
6300
|
-
var DrawerOverlay =
|
|
6375
|
+
var DrawerOverlay = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6301
6376
|
DialogPrimitive2.Overlay,
|
|
6302
6377
|
{
|
|
6303
6378
|
ref,
|
|
@@ -6317,9 +6392,9 @@ var slideVariants = {
|
|
|
6317
6392
|
top: "inset-x-0 top-0 w-full data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
6318
6393
|
bottom: "inset-x-0 bottom-0 w-full data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom"
|
|
6319
6394
|
};
|
|
6320
|
-
var DrawerContent =
|
|
6321
|
-
/* @__PURE__ */
|
|
6322
|
-
/* @__PURE__ */
|
|
6395
|
+
var DrawerContent = React38.forwardRef(({ side = "right", showClose = true, className, children, ...props }, ref) => /* @__PURE__ */ jsxs24(DrawerPortal, { children: [
|
|
6396
|
+
/* @__PURE__ */ jsx39(DrawerOverlay, {}),
|
|
6397
|
+
/* @__PURE__ */ jsxs24(
|
|
6323
6398
|
DialogPrimitive2.Content,
|
|
6324
6399
|
{
|
|
6325
6400
|
ref,
|
|
@@ -6333,7 +6408,7 @@ var DrawerContent = React37.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6333
6408
|
...props,
|
|
6334
6409
|
children: [
|
|
6335
6410
|
children,
|
|
6336
|
-
showClose && /* @__PURE__ */
|
|
6411
|
+
showClose && /* @__PURE__ */ jsxs24(
|
|
6337
6412
|
DrawerClose,
|
|
6338
6413
|
{
|
|
6339
6414
|
className: cn(
|
|
@@ -6343,7 +6418,7 @@ var DrawerContent = React37.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6343
6418
|
"disabled:pointer-events-none"
|
|
6344
6419
|
),
|
|
6345
6420
|
children: [
|
|
6346
|
-
/* @__PURE__ */
|
|
6421
|
+
/* @__PURE__ */ jsx39(
|
|
6347
6422
|
"svg",
|
|
6348
6423
|
{
|
|
6349
6424
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6356,10 +6431,10 @@ var DrawerContent = React37.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6356
6431
|
strokeLinecap: "round",
|
|
6357
6432
|
strokeLinejoin: "round",
|
|
6358
6433
|
className: "h-4 w-4",
|
|
6359
|
-
children: /* @__PURE__ */
|
|
6434
|
+
children: /* @__PURE__ */ jsx39("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
6360
6435
|
}
|
|
6361
6436
|
),
|
|
6362
|
-
/* @__PURE__ */
|
|
6437
|
+
/* @__PURE__ */ jsx39("span", { className: "sr-only", children: "Close" })
|
|
6363
6438
|
]
|
|
6364
6439
|
}
|
|
6365
6440
|
)
|
|
@@ -6368,8 +6443,8 @@ var DrawerContent = React37.forwardRef(({ side = "right", showClose = true, clas
|
|
|
6368
6443
|
)
|
|
6369
6444
|
] }));
|
|
6370
6445
|
DrawerContent.displayName = "DrawerContent";
|
|
6371
|
-
var DrawerHeader =
|
|
6372
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6446
|
+
var DrawerHeader = React38.forwardRef(
|
|
6447
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6373
6448
|
"div",
|
|
6374
6449
|
{
|
|
6375
6450
|
ref,
|
|
@@ -6379,7 +6454,7 @@ var DrawerHeader = React37.forwardRef(
|
|
|
6379
6454
|
)
|
|
6380
6455
|
);
|
|
6381
6456
|
DrawerHeader.displayName = "DrawerHeader";
|
|
6382
|
-
var DrawerTitle =
|
|
6457
|
+
var DrawerTitle = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6383
6458
|
DialogPrimitive2.Title,
|
|
6384
6459
|
{
|
|
6385
6460
|
ref,
|
|
@@ -6388,7 +6463,7 @@ var DrawerTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6388
6463
|
}
|
|
6389
6464
|
));
|
|
6390
6465
|
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
6391
|
-
var DrawerDescription =
|
|
6466
|
+
var DrawerDescription = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6392
6467
|
DialogPrimitive2.Description,
|
|
6393
6468
|
{
|
|
6394
6469
|
ref,
|
|
@@ -6397,8 +6472,8 @@ var DrawerDescription = React37.forwardRef(({ className, ...props }, ref) => /*
|
|
|
6397
6472
|
}
|
|
6398
6473
|
));
|
|
6399
6474
|
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
6400
|
-
var DrawerBody =
|
|
6401
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6475
|
+
var DrawerBody = React38.forwardRef(
|
|
6476
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6402
6477
|
"div",
|
|
6403
6478
|
{
|
|
6404
6479
|
ref,
|
|
@@ -6408,8 +6483,8 @@ var DrawerBody = React37.forwardRef(
|
|
|
6408
6483
|
)
|
|
6409
6484
|
);
|
|
6410
6485
|
DrawerBody.displayName = "DrawerBody";
|
|
6411
|
-
var DrawerFooter =
|
|
6412
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
6486
|
+
var DrawerFooter = React38.forwardRef(
|
|
6487
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
|
|
6413
6488
|
"div",
|
|
6414
6489
|
{
|
|
6415
6490
|
ref,
|
|
@@ -6435,16 +6510,16 @@ var SheetBody = DrawerBody;
|
|
|
6435
6510
|
var SheetFooter = DrawerFooter;
|
|
6436
6511
|
|
|
6437
6512
|
// src/components/topbar.tsx
|
|
6438
|
-
import * as
|
|
6439
|
-
import { Fragment as Fragment6, jsx as
|
|
6513
|
+
import * as React39 from "react";
|
|
6514
|
+
import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6440
6515
|
var sizeClasses4 = {
|
|
6441
6516
|
sm: "h-12",
|
|
6442
6517
|
md: "h-14",
|
|
6443
6518
|
lg: "h-16"
|
|
6444
6519
|
};
|
|
6445
|
-
var TopBar =
|
|
6520
|
+
var TopBar = React39.forwardRef(
|
|
6446
6521
|
({ className, bordered = true, sticky = false, size = "md", children, ...props }, ref) => {
|
|
6447
|
-
return /* @__PURE__ */
|
|
6522
|
+
return /* @__PURE__ */ jsx40(
|
|
6448
6523
|
"header",
|
|
6449
6524
|
{
|
|
6450
6525
|
ref,
|
|
@@ -6462,23 +6537,23 @@ var TopBar = React38.forwardRef(
|
|
|
6462
6537
|
}
|
|
6463
6538
|
);
|
|
6464
6539
|
TopBar.displayName = "TopBar";
|
|
6465
|
-
var TopBarBrand =
|
|
6540
|
+
var TopBarBrand = React39.forwardRef(
|
|
6466
6541
|
({ className, logo, name, href, children, ...props }, ref) => {
|
|
6467
|
-
const content = /* @__PURE__ */
|
|
6468
|
-
logo && /* @__PURE__ */
|
|
6469
|
-
name && /* @__PURE__ */
|
|
6542
|
+
const content = /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
6543
|
+
logo && /* @__PURE__ */ jsx40("span", { className: "shrink-0", children: logo }),
|
|
6544
|
+
name && /* @__PURE__ */ jsx40("span", { className: "font-semibold text-lg", children: name }),
|
|
6470
6545
|
children
|
|
6471
6546
|
] });
|
|
6472
6547
|
if (href) {
|
|
6473
|
-
return /* @__PURE__ */
|
|
6548
|
+
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 }) });
|
|
6474
6549
|
}
|
|
6475
|
-
return /* @__PURE__ */
|
|
6550
|
+
return /* @__PURE__ */ jsx40("div", { ref, className: cn("flex items-center gap-2", className), ...props, children: content });
|
|
6476
6551
|
}
|
|
6477
6552
|
);
|
|
6478
6553
|
TopBarBrand.displayName = "TopBarBrand";
|
|
6479
|
-
var TopBarNav =
|
|
6554
|
+
var TopBarNav = React39.forwardRef(
|
|
6480
6555
|
({ className, children, ...props }, ref) => {
|
|
6481
|
-
return /* @__PURE__ */
|
|
6556
|
+
return /* @__PURE__ */ jsx40(
|
|
6482
6557
|
"nav",
|
|
6483
6558
|
{
|
|
6484
6559
|
ref,
|
|
@@ -6490,9 +6565,9 @@ var TopBarNav = React38.forwardRef(
|
|
|
6490
6565
|
}
|
|
6491
6566
|
);
|
|
6492
6567
|
TopBarNav.displayName = "TopBarNav";
|
|
6493
|
-
var TopBarNavItem =
|
|
6568
|
+
var TopBarNavItem = React39.forwardRef(
|
|
6494
6569
|
({ className, active, children, ...props }, ref) => {
|
|
6495
|
-
return /* @__PURE__ */
|
|
6570
|
+
return /* @__PURE__ */ jsx40(
|
|
6496
6571
|
"a",
|
|
6497
6572
|
{
|
|
6498
6573
|
ref,
|
|
@@ -6508,9 +6583,9 @@ var TopBarNavItem = React38.forwardRef(
|
|
|
6508
6583
|
}
|
|
6509
6584
|
);
|
|
6510
6585
|
TopBarNavItem.displayName = "TopBarNavItem";
|
|
6511
|
-
var TopBarSection =
|
|
6586
|
+
var TopBarSection = React39.forwardRef(
|
|
6512
6587
|
({ className, align = "left", children, ...props }, ref) => {
|
|
6513
|
-
return /* @__PURE__ */
|
|
6588
|
+
return /* @__PURE__ */ jsx40(
|
|
6514
6589
|
"div",
|
|
6515
6590
|
{
|
|
6516
6591
|
ref,
|
|
@@ -6530,9 +6605,9 @@ var TopBarSection = React38.forwardRef(
|
|
|
6530
6605
|
}
|
|
6531
6606
|
);
|
|
6532
6607
|
TopBarSection.displayName = "TopBarSection";
|
|
6533
|
-
var TopBarDivider =
|
|
6608
|
+
var TopBarDivider = React39.forwardRef(
|
|
6534
6609
|
({ className, ...props }, ref) => {
|
|
6535
|
-
return /* @__PURE__ */
|
|
6610
|
+
return /* @__PURE__ */ jsx40(
|
|
6536
6611
|
"div",
|
|
6537
6612
|
{
|
|
6538
6613
|
ref,
|
|
@@ -6545,17 +6620,17 @@ var TopBarDivider = React38.forwardRef(
|
|
|
6545
6620
|
TopBarDivider.displayName = "TopBarDivider";
|
|
6546
6621
|
|
|
6547
6622
|
// src/components/sidebar.tsx
|
|
6548
|
-
import * as
|
|
6549
|
-
import { Fragment as Fragment7, jsx as
|
|
6550
|
-
var SidebarContext =
|
|
6623
|
+
import * as React40 from "react";
|
|
6624
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6625
|
+
var SidebarContext = React40.createContext(void 0);
|
|
6551
6626
|
var useSidebar = () => {
|
|
6552
|
-
const context =
|
|
6627
|
+
const context = React40.useContext(SidebarContext);
|
|
6553
6628
|
if (!context) {
|
|
6554
6629
|
throw new Error("useSidebar must be used within a Sidebar");
|
|
6555
6630
|
}
|
|
6556
6631
|
return context;
|
|
6557
6632
|
};
|
|
6558
|
-
var Sidebar =
|
|
6633
|
+
var Sidebar = React40.forwardRef(
|
|
6559
6634
|
({
|
|
6560
6635
|
className,
|
|
6561
6636
|
collapsed: controlledCollapsed,
|
|
@@ -6567,10 +6642,10 @@ var Sidebar = React39.forwardRef(
|
|
|
6567
6642
|
children,
|
|
6568
6643
|
...props
|
|
6569
6644
|
}, ref) => {
|
|
6570
|
-
const [uncontrolledCollapsed, setUncontrolledCollapsed] =
|
|
6645
|
+
const [uncontrolledCollapsed, setUncontrolledCollapsed] = React40.useState(defaultCollapsed);
|
|
6571
6646
|
const isControlled = controlledCollapsed !== void 0;
|
|
6572
6647
|
const collapsed = isControlled ? controlledCollapsed : uncontrolledCollapsed;
|
|
6573
|
-
const setCollapsed =
|
|
6648
|
+
const setCollapsed = React40.useCallback(
|
|
6574
6649
|
(value) => {
|
|
6575
6650
|
if (!isControlled) {
|
|
6576
6651
|
setUncontrolledCollapsed(value);
|
|
@@ -6579,7 +6654,7 @@ var Sidebar = React39.forwardRef(
|
|
|
6579
6654
|
},
|
|
6580
6655
|
[isControlled, onCollapsedChange]
|
|
6581
6656
|
);
|
|
6582
|
-
return /* @__PURE__ */
|
|
6657
|
+
return /* @__PURE__ */ jsx41(SidebarContext.Provider, { value: { collapsed, setCollapsed }, children: /* @__PURE__ */ jsx41(
|
|
6583
6658
|
"aside",
|
|
6584
6659
|
{
|
|
6585
6660
|
ref,
|
|
@@ -6599,9 +6674,9 @@ var Sidebar = React39.forwardRef(
|
|
|
6599
6674
|
}
|
|
6600
6675
|
);
|
|
6601
6676
|
Sidebar.displayName = "Sidebar";
|
|
6602
|
-
var SidebarHeader =
|
|
6677
|
+
var SidebarHeader = React40.forwardRef(
|
|
6603
6678
|
({ className, children, ...props }, ref) => {
|
|
6604
|
-
return /* @__PURE__ */
|
|
6679
|
+
return /* @__PURE__ */ jsx41(
|
|
6605
6680
|
"div",
|
|
6606
6681
|
{
|
|
6607
6682
|
ref,
|
|
@@ -6613,9 +6688,9 @@ var SidebarHeader = React39.forwardRef(
|
|
|
6613
6688
|
}
|
|
6614
6689
|
);
|
|
6615
6690
|
SidebarHeader.displayName = "SidebarHeader";
|
|
6616
|
-
var SidebarContent =
|
|
6691
|
+
var SidebarContent = React40.forwardRef(
|
|
6617
6692
|
({ className, children, ...props }, ref) => {
|
|
6618
|
-
return /* @__PURE__ */
|
|
6693
|
+
return /* @__PURE__ */ jsx41(
|
|
6619
6694
|
"div",
|
|
6620
6695
|
{
|
|
6621
6696
|
ref,
|
|
@@ -6627,9 +6702,9 @@ var SidebarContent = React39.forwardRef(
|
|
|
6627
6702
|
}
|
|
6628
6703
|
);
|
|
6629
6704
|
SidebarContent.displayName = "SidebarContent";
|
|
6630
|
-
var SidebarFooter =
|
|
6705
|
+
var SidebarFooter = React40.forwardRef(
|
|
6631
6706
|
({ className, children, ...props }, ref) => {
|
|
6632
|
-
return /* @__PURE__ */
|
|
6707
|
+
return /* @__PURE__ */ jsx41(
|
|
6633
6708
|
"div",
|
|
6634
6709
|
{
|
|
6635
6710
|
ref,
|
|
@@ -6641,25 +6716,25 @@ var SidebarFooter = React39.forwardRef(
|
|
|
6641
6716
|
}
|
|
6642
6717
|
);
|
|
6643
6718
|
SidebarFooter.displayName = "SidebarFooter";
|
|
6644
|
-
var SidebarGroup =
|
|
6719
|
+
var SidebarGroup = React40.forwardRef(
|
|
6645
6720
|
({ className, label, children, ...props }, ref) => {
|
|
6646
6721
|
const { collapsed } = useSidebar();
|
|
6647
|
-
return /* @__PURE__ */
|
|
6648
|
-
label && !collapsed && /* @__PURE__ */
|
|
6649
|
-
label && collapsed && /* @__PURE__ */
|
|
6650
|
-
/* @__PURE__ */
|
|
6722
|
+
return /* @__PURE__ */ jsxs26("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
6723
|
+
label && !collapsed && /* @__PURE__ */ jsx41("div", { className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
6724
|
+
label && collapsed && /* @__PURE__ */ jsx41("div", { className: "flex justify-center py-1.5", children: /* @__PURE__ */ jsx41("div", { className: "h-px w-4 bg-border" }) }),
|
|
6725
|
+
/* @__PURE__ */ jsx41("div", { className: "space-y-1", children })
|
|
6651
6726
|
] });
|
|
6652
6727
|
}
|
|
6653
6728
|
);
|
|
6654
6729
|
SidebarGroup.displayName = "SidebarGroup";
|
|
6655
|
-
var SidebarItem =
|
|
6730
|
+
var SidebarItem = React40.forwardRef(
|
|
6656
6731
|
({ className, icon, active, disabled, badge, onClick, href, children, ...props }, ref) => {
|
|
6657
6732
|
const { collapsed } = useSidebar();
|
|
6658
|
-
const content = /* @__PURE__ */
|
|
6659
|
-
icon && /* @__PURE__ */
|
|
6660
|
-
!collapsed && /* @__PURE__ */
|
|
6661
|
-
/* @__PURE__ */
|
|
6662
|
-
badge && /* @__PURE__ */
|
|
6733
|
+
const content = /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
6734
|
+
icon && /* @__PURE__ */ jsx41("span", { className: cn("shrink-0", collapsed ? "mx-auto" : ""), children: icon }),
|
|
6735
|
+
!collapsed && /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
6736
|
+
/* @__PURE__ */ jsx41("span", { className: "flex-1 truncate", children }),
|
|
6737
|
+
badge && /* @__PURE__ */ jsx41("span", { className: "shrink-0", children: badge })
|
|
6663
6738
|
] })
|
|
6664
6739
|
] });
|
|
6665
6740
|
const itemClasses = cn(
|
|
@@ -6670,9 +6745,9 @@ var SidebarItem = React39.forwardRef(
|
|
|
6670
6745
|
className
|
|
6671
6746
|
);
|
|
6672
6747
|
if (href) {
|
|
6673
|
-
return /* @__PURE__ */
|
|
6748
|
+
return /* @__PURE__ */ jsx41("div", { ref, ...props, children: /* @__PURE__ */ jsx41("a", { href, className: itemClasses, children: content }) });
|
|
6674
6749
|
}
|
|
6675
|
-
return /* @__PURE__ */
|
|
6750
|
+
return /* @__PURE__ */ jsx41(
|
|
6676
6751
|
"div",
|
|
6677
6752
|
{
|
|
6678
6753
|
ref,
|
|
@@ -6687,20 +6762,20 @@ var SidebarItem = React39.forwardRef(
|
|
|
6687
6762
|
}
|
|
6688
6763
|
);
|
|
6689
6764
|
SidebarItem.displayName = "SidebarItem";
|
|
6690
|
-
var SidebarSubMenu =
|
|
6765
|
+
var SidebarSubMenu = React40.forwardRef(
|
|
6691
6766
|
({ className, icon, label, defaultOpen = false, children, ...props }, ref) => {
|
|
6692
|
-
const [open, setOpen] =
|
|
6767
|
+
const [open, setOpen] = React40.useState(defaultOpen);
|
|
6693
6768
|
const { collapsed } = useSidebar();
|
|
6694
|
-
|
|
6769
|
+
React40.useEffect(() => {
|
|
6695
6770
|
if (collapsed) {
|
|
6696
6771
|
setOpen(false);
|
|
6697
6772
|
}
|
|
6698
6773
|
}, [collapsed]);
|
|
6699
6774
|
if (collapsed) {
|
|
6700
|
-
return /* @__PURE__ */
|
|
6775
|
+
return /* @__PURE__ */ jsx41(SidebarItem, { icon, className, children: label });
|
|
6701
6776
|
}
|
|
6702
|
-
return /* @__PURE__ */
|
|
6703
|
-
/* @__PURE__ */
|
|
6777
|
+
return /* @__PURE__ */ jsxs26("div", { ref, className, ...props, children: [
|
|
6778
|
+
/* @__PURE__ */ jsxs26(
|
|
6704
6779
|
"div",
|
|
6705
6780
|
{
|
|
6706
6781
|
className: cn(
|
|
@@ -6711,9 +6786,9 @@ var SidebarSubMenu = React39.forwardRef(
|
|
|
6711
6786
|
role: "button",
|
|
6712
6787
|
tabIndex: 0,
|
|
6713
6788
|
children: [
|
|
6714
|
-
icon && /* @__PURE__ */
|
|
6715
|
-
/* @__PURE__ */
|
|
6716
|
-
/* @__PURE__ */
|
|
6789
|
+
icon && /* @__PURE__ */ jsx41("span", { className: "shrink-0", children: icon }),
|
|
6790
|
+
/* @__PURE__ */ jsx41("span", { className: "flex-1 truncate", children: label }),
|
|
6791
|
+
/* @__PURE__ */ jsx41(
|
|
6717
6792
|
"svg",
|
|
6718
6793
|
{
|
|
6719
6794
|
className: cn("h-4 w-4 shrink-0 transition-transform", open && "rotate-90"),
|
|
@@ -6724,21 +6799,21 @@ var SidebarSubMenu = React39.forwardRef(
|
|
|
6724
6799
|
strokeWidth: "2",
|
|
6725
6800
|
strokeLinecap: "round",
|
|
6726
6801
|
strokeLinejoin: "round",
|
|
6727
|
-
children: /* @__PURE__ */
|
|
6802
|
+
children: /* @__PURE__ */ jsx41("path", { d: "m9 18 6-6-6-6" })
|
|
6728
6803
|
}
|
|
6729
6804
|
)
|
|
6730
6805
|
]
|
|
6731
6806
|
}
|
|
6732
6807
|
),
|
|
6733
|
-
open && /* @__PURE__ */
|
|
6808
|
+
open && /* @__PURE__ */ jsx41("div", { className: "ml-4 pl-3 border-l border-border space-y-1 mt-1", children })
|
|
6734
6809
|
] });
|
|
6735
6810
|
}
|
|
6736
6811
|
);
|
|
6737
6812
|
SidebarSubMenu.displayName = "SidebarSubMenu";
|
|
6738
|
-
var SidebarToggle =
|
|
6813
|
+
var SidebarToggle = React40.forwardRef(
|
|
6739
6814
|
({ className, children, ...props }, ref) => {
|
|
6740
6815
|
const { collapsed, setCollapsed } = useSidebar();
|
|
6741
|
-
return /* @__PURE__ */
|
|
6816
|
+
return /* @__PURE__ */ jsx41(
|
|
6742
6817
|
"button",
|
|
6743
6818
|
{
|
|
6744
6819
|
ref,
|
|
@@ -6752,7 +6827,7 @@ var SidebarToggle = React39.forwardRef(
|
|
|
6752
6827
|
),
|
|
6753
6828
|
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
6754
6829
|
...props,
|
|
6755
|
-
children: children || /* @__PURE__ */
|
|
6830
|
+
children: children || /* @__PURE__ */ jsxs26(
|
|
6756
6831
|
"svg",
|
|
6757
6832
|
{
|
|
6758
6833
|
className: cn("h-5 w-5 transition-transform", collapsed && "rotate-180"),
|
|
@@ -6764,9 +6839,9 @@ var SidebarToggle = React39.forwardRef(
|
|
|
6764
6839
|
strokeLinecap: "round",
|
|
6765
6840
|
strokeLinejoin: "round",
|
|
6766
6841
|
children: [
|
|
6767
|
-
/* @__PURE__ */
|
|
6768
|
-
/* @__PURE__ */
|
|
6769
|
-
/* @__PURE__ */
|
|
6842
|
+
/* @__PURE__ */ jsx41("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
6843
|
+
/* @__PURE__ */ jsx41("path", { d: "M9 3v18" }),
|
|
6844
|
+
/* @__PURE__ */ jsx41("path", { d: "m14 9 3 3-3 3" })
|
|
6770
6845
|
]
|
|
6771
6846
|
}
|
|
6772
6847
|
)
|
|
@@ -6777,17 +6852,17 @@ var SidebarToggle = React39.forwardRef(
|
|
|
6777
6852
|
SidebarToggle.displayName = "SidebarToggle";
|
|
6778
6853
|
|
|
6779
6854
|
// src/components/sidebar-rail.tsx
|
|
6780
|
-
import * as
|
|
6781
|
-
import { Fragment as Fragment8, jsx as
|
|
6782
|
-
var SidebarRailContext =
|
|
6855
|
+
import * as React41 from "react";
|
|
6856
|
+
import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6857
|
+
var SidebarRailContext = React41.createContext(void 0);
|
|
6783
6858
|
var useSidebarRail = () => {
|
|
6784
|
-
const context =
|
|
6859
|
+
const context = React41.useContext(SidebarRailContext);
|
|
6785
6860
|
if (!context) {
|
|
6786
6861
|
throw new Error("useSidebarRail must be used within a SidebarRail");
|
|
6787
6862
|
}
|
|
6788
6863
|
return context;
|
|
6789
6864
|
};
|
|
6790
|
-
var SidebarRail =
|
|
6865
|
+
var SidebarRail = React41.forwardRef(
|
|
6791
6866
|
({
|
|
6792
6867
|
className,
|
|
6793
6868
|
defaultActiveRail = null,
|
|
@@ -6805,14 +6880,14 @@ var SidebarRail = React40.forwardRef(
|
|
|
6805
6880
|
children,
|
|
6806
6881
|
...props
|
|
6807
6882
|
}, ref) => {
|
|
6808
|
-
const [uncontrolledActiveRail, setUncontrolledActiveRail] =
|
|
6809
|
-
const [expanded, setExpanded] =
|
|
6810
|
-
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] =
|
|
6883
|
+
const [uncontrolledActiveRail, setUncontrolledActiveRail] = React41.useState(defaultActiveRail);
|
|
6884
|
+
const [expanded, setExpanded] = React41.useState(!!defaultActiveRail);
|
|
6885
|
+
const [uncontrolledRailExpanded, setUncontrolledRailExpanded] = React41.useState(defaultRailExpanded);
|
|
6811
6886
|
const isControlled = controlledActiveRail !== void 0;
|
|
6812
6887
|
const activeRail = isControlled ? controlledActiveRail : uncontrolledActiveRail;
|
|
6813
6888
|
const isRailControlled = controlledRailExpanded !== void 0;
|
|
6814
6889
|
const railExpanded = isRailControlled ? controlledRailExpanded : uncontrolledRailExpanded;
|
|
6815
|
-
const setActiveRail =
|
|
6890
|
+
const setActiveRail = React41.useCallback(
|
|
6816
6891
|
(rail) => {
|
|
6817
6892
|
if (!isControlled) {
|
|
6818
6893
|
setUncontrolledActiveRail(rail);
|
|
@@ -6822,7 +6897,7 @@ var SidebarRail = React40.forwardRef(
|
|
|
6822
6897
|
},
|
|
6823
6898
|
[isControlled, onActiveRailChange]
|
|
6824
6899
|
);
|
|
6825
|
-
const setRailExpanded =
|
|
6900
|
+
const setRailExpanded = React41.useCallback(
|
|
6826
6901
|
(value) => {
|
|
6827
6902
|
if (!isRailControlled) {
|
|
6828
6903
|
setUncontrolledRailExpanded(value);
|
|
@@ -6831,7 +6906,7 @@ var SidebarRail = React40.forwardRef(
|
|
|
6831
6906
|
},
|
|
6832
6907
|
[isRailControlled, onRailExpandedChange]
|
|
6833
6908
|
);
|
|
6834
|
-
return /* @__PURE__ */
|
|
6909
|
+
return /* @__PURE__ */ jsx42(
|
|
6835
6910
|
SidebarRailContext.Provider,
|
|
6836
6911
|
{
|
|
6837
6912
|
value: {
|
|
@@ -6845,7 +6920,7 @@ var SidebarRail = React40.forwardRef(
|
|
|
6845
6920
|
overlayRail: overlayRail && expandableRail,
|
|
6846
6921
|
expandableRail
|
|
6847
6922
|
},
|
|
6848
|
-
children: /* @__PURE__ */
|
|
6923
|
+
children: /* @__PURE__ */ jsx42(
|
|
6849
6924
|
"div",
|
|
6850
6925
|
{
|
|
6851
6926
|
ref,
|
|
@@ -6868,11 +6943,11 @@ var SidebarRail = React40.forwardRef(
|
|
|
6868
6943
|
}
|
|
6869
6944
|
);
|
|
6870
6945
|
SidebarRail.displayName = "SidebarRail";
|
|
6871
|
-
var IconRail =
|
|
6946
|
+
var IconRail = React41.forwardRef(
|
|
6872
6947
|
({ className, children, ...props }, ref) => {
|
|
6873
6948
|
const { railExpanded, overlayRail, expandableRail } = useSidebarRail();
|
|
6874
6949
|
const isExpanded = expandableRail && railExpanded;
|
|
6875
|
-
return /* @__PURE__ */
|
|
6950
|
+
return /* @__PURE__ */ jsx42(
|
|
6876
6951
|
"div",
|
|
6877
6952
|
{
|
|
6878
6953
|
ref,
|
|
@@ -6881,7 +6956,7 @@ var IconRail = React40.forwardRef(
|
|
|
6881
6956
|
isExpanded && !overlayRail ? "w-[var(--rail-expanded-width)]" : "w-[var(--rail-width)]"
|
|
6882
6957
|
),
|
|
6883
6958
|
...props,
|
|
6884
|
-
children: /* @__PURE__ */
|
|
6959
|
+
children: /* @__PURE__ */ jsx42(
|
|
6885
6960
|
"div",
|
|
6886
6961
|
{
|
|
6887
6962
|
className: cn(
|
|
@@ -6898,9 +6973,9 @@ var IconRail = React40.forwardRef(
|
|
|
6898
6973
|
}
|
|
6899
6974
|
);
|
|
6900
6975
|
IconRail.displayName = "IconRail";
|
|
6901
|
-
var IconRailHeader =
|
|
6976
|
+
var IconRailHeader = React41.forwardRef(
|
|
6902
6977
|
({ className, children, ...props }, ref) => {
|
|
6903
|
-
return /* @__PURE__ */
|
|
6978
|
+
return /* @__PURE__ */ jsx42(
|
|
6904
6979
|
"div",
|
|
6905
6980
|
{
|
|
6906
6981
|
ref,
|
|
@@ -6915,9 +6990,9 @@ var IconRailHeader = React40.forwardRef(
|
|
|
6915
6990
|
}
|
|
6916
6991
|
);
|
|
6917
6992
|
IconRailHeader.displayName = "IconRailHeader";
|
|
6918
|
-
var IconRailContent =
|
|
6993
|
+
var IconRailContent = React41.forwardRef(
|
|
6919
6994
|
({ className, children, ...props }, ref) => {
|
|
6920
|
-
return /* @__PURE__ */
|
|
6995
|
+
return /* @__PURE__ */ jsx42(
|
|
6921
6996
|
"div",
|
|
6922
6997
|
{
|
|
6923
6998
|
ref,
|
|
@@ -6929,9 +7004,9 @@ var IconRailContent = React40.forwardRef(
|
|
|
6929
7004
|
}
|
|
6930
7005
|
);
|
|
6931
7006
|
IconRailContent.displayName = "IconRailContent";
|
|
6932
|
-
var IconRailFooter =
|
|
7007
|
+
var IconRailFooter = React41.forwardRef(
|
|
6933
7008
|
({ className, children, ...props }, ref) => {
|
|
6934
|
-
return /* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ jsx42(
|
|
6935
7010
|
"div",
|
|
6936
7011
|
{
|
|
6937
7012
|
ref,
|
|
@@ -6946,7 +7021,7 @@ var IconRailFooter = React40.forwardRef(
|
|
|
6946
7021
|
}
|
|
6947
7022
|
);
|
|
6948
7023
|
IconRailFooter.displayName = "IconRailFooter";
|
|
6949
|
-
var IconRailItem =
|
|
7024
|
+
var IconRailItem = React41.forwardRef(
|
|
6950
7025
|
({ className, railId, icon, label, asButton = false, toggleRail = false, onClick, ...props }, ref) => {
|
|
6951
7026
|
const {
|
|
6952
7027
|
activeRail,
|
|
@@ -6972,7 +7047,7 @@ var IconRailItem = React40.forwardRef(
|
|
|
6972
7047
|
setActiveRail(railId);
|
|
6973
7048
|
}
|
|
6974
7049
|
};
|
|
6975
|
-
return /* @__PURE__ */
|
|
7050
|
+
return /* @__PURE__ */ jsxs27(
|
|
6976
7051
|
"button",
|
|
6977
7052
|
{
|
|
6978
7053
|
ref,
|
|
@@ -6991,14 +7066,14 @@ var IconRailItem = React40.forwardRef(
|
|
|
6991
7066
|
...props,
|
|
6992
7067
|
children: [
|
|
6993
7068
|
icon,
|
|
6994
|
-
isRailExpanded && label && /* @__PURE__ */
|
|
7069
|
+
isRailExpanded && label && /* @__PURE__ */ jsx42("span", { className: "text-sm font-medium truncate", children: label })
|
|
6995
7070
|
]
|
|
6996
7071
|
}
|
|
6997
7072
|
);
|
|
6998
7073
|
}
|
|
6999
7074
|
);
|
|
7000
7075
|
IconRailItem.displayName = "IconRailItem";
|
|
7001
|
-
var RailPanel =
|
|
7076
|
+
var RailPanel = React41.forwardRef(
|
|
7002
7077
|
({ className, railId, title, children, ...props }, ref) => {
|
|
7003
7078
|
const { activeRail, setActiveRail, hoverExpand } = useSidebarRail();
|
|
7004
7079
|
const isVisible = activeRail === railId;
|
|
@@ -7008,7 +7083,7 @@ var RailPanel = React40.forwardRef(
|
|
|
7008
7083
|
}
|
|
7009
7084
|
};
|
|
7010
7085
|
if (!isVisible) return null;
|
|
7011
|
-
return /* @__PURE__ */
|
|
7086
|
+
return /* @__PURE__ */ jsxs27(
|
|
7012
7087
|
"div",
|
|
7013
7088
|
{
|
|
7014
7089
|
ref,
|
|
@@ -7021,16 +7096,16 @@ var RailPanel = React40.forwardRef(
|
|
|
7021
7096
|
onMouseLeave: handleMouseLeave,
|
|
7022
7097
|
...props,
|
|
7023
7098
|
children: [
|
|
7024
|
-
title && /* @__PURE__ */
|
|
7025
|
-
/* @__PURE__ */
|
|
7026
|
-
/* @__PURE__ */
|
|
7099
|
+
title && /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between h-14 px-4 border-b border-border shrink-0", children: [
|
|
7100
|
+
/* @__PURE__ */ jsx42("span", { className: "font-semibold text-sm", children: title }),
|
|
7101
|
+
/* @__PURE__ */ jsx42(
|
|
7027
7102
|
"button",
|
|
7028
7103
|
{
|
|
7029
7104
|
type: "button",
|
|
7030
7105
|
onClick: () => setActiveRail(null),
|
|
7031
7106
|
className: "p-1 rounded hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",
|
|
7032
7107
|
"aria-label": "Close panel",
|
|
7033
|
-
children: /* @__PURE__ */
|
|
7108
|
+
children: /* @__PURE__ */ jsxs27(
|
|
7034
7109
|
"svg",
|
|
7035
7110
|
{
|
|
7036
7111
|
className: "h-4 w-4",
|
|
@@ -7042,36 +7117,36 @@ var RailPanel = React40.forwardRef(
|
|
|
7042
7117
|
strokeLinecap: "round",
|
|
7043
7118
|
strokeLinejoin: "round",
|
|
7044
7119
|
children: [
|
|
7045
|
-
/* @__PURE__ */
|
|
7046
|
-
/* @__PURE__ */
|
|
7120
|
+
/* @__PURE__ */ jsx42("path", { d: "M18 6 6 18" }),
|
|
7121
|
+
/* @__PURE__ */ jsx42("path", { d: "m6 6 12 12" })
|
|
7047
7122
|
]
|
|
7048
7123
|
}
|
|
7049
7124
|
)
|
|
7050
7125
|
}
|
|
7051
7126
|
)
|
|
7052
7127
|
] }),
|
|
7053
|
-
/* @__PURE__ */
|
|
7128
|
+
/* @__PURE__ */ jsx42("div", { className: "flex-1 overflow-y-auto", children })
|
|
7054
7129
|
]
|
|
7055
7130
|
}
|
|
7056
7131
|
);
|
|
7057
7132
|
}
|
|
7058
7133
|
);
|
|
7059
7134
|
RailPanel.displayName = "RailPanel";
|
|
7060
|
-
var RailPanelGroup =
|
|
7135
|
+
var RailPanelGroup = React41.forwardRef(
|
|
7061
7136
|
({ className, label, children, ...props }, ref) => {
|
|
7062
|
-
return /* @__PURE__ */
|
|
7063
|
-
label && /* @__PURE__ */
|
|
7064
|
-
/* @__PURE__ */
|
|
7137
|
+
return /* @__PURE__ */ jsxs27("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
7138
|
+
label && /* @__PURE__ */ jsx42("div", { className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: label }),
|
|
7139
|
+
/* @__PURE__ */ jsx42("div", { className: "space-y-1", children })
|
|
7065
7140
|
] });
|
|
7066
7141
|
}
|
|
7067
7142
|
);
|
|
7068
7143
|
RailPanelGroup.displayName = "RailPanelGroup";
|
|
7069
|
-
var RailPanelItem =
|
|
7144
|
+
var RailPanelItem = React41.forwardRef(
|
|
7070
7145
|
({ className, icon, active, disabled, badge, href, children, onClick, ...props }, ref) => {
|
|
7071
|
-
const content = /* @__PURE__ */
|
|
7072
|
-
icon && /* @__PURE__ */
|
|
7073
|
-
/* @__PURE__ */
|
|
7074
|
-
badge && /* @__PURE__ */
|
|
7146
|
+
const content = /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
7147
|
+
icon && /* @__PURE__ */ jsx42("span", { className: "shrink-0", children: icon }),
|
|
7148
|
+
/* @__PURE__ */ jsx42("span", { className: "flex-1 truncate", children }),
|
|
7149
|
+
badge && /* @__PURE__ */ jsx42("span", { className: "shrink-0", children: badge })
|
|
7075
7150
|
] });
|
|
7076
7151
|
const itemClasses = cn(
|
|
7077
7152
|
"flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors cursor-pointer",
|
|
@@ -7080,9 +7155,9 @@ var RailPanelItem = React40.forwardRef(
|
|
|
7080
7155
|
className
|
|
7081
7156
|
);
|
|
7082
7157
|
if (href) {
|
|
7083
|
-
return /* @__PURE__ */
|
|
7158
|
+
return /* @__PURE__ */ jsx42("div", { ref, ...props, children: /* @__PURE__ */ jsx42("a", { href, className: itemClasses, children: content }) });
|
|
7084
7159
|
}
|
|
7085
|
-
return /* @__PURE__ */
|
|
7160
|
+
return /* @__PURE__ */ jsx42(
|
|
7086
7161
|
"div",
|
|
7087
7162
|
{
|
|
7088
7163
|
ref,
|
|
@@ -7099,34 +7174,34 @@ var RailPanelItem = React40.forwardRef(
|
|
|
7099
7174
|
RailPanelItem.displayName = "RailPanelItem";
|
|
7100
7175
|
|
|
7101
7176
|
// src/playground.tsx
|
|
7102
|
-
import * as
|
|
7103
|
-
import { jsx as
|
|
7104
|
-
var Section = ({ title, children }) => /* @__PURE__ */
|
|
7105
|
-
/* @__PURE__ */
|
|
7106
|
-
/* @__PURE__ */
|
|
7177
|
+
import * as React42 from "react";
|
|
7178
|
+
import { jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7179
|
+
var Section = ({ title, children }) => /* @__PURE__ */ jsxs28("div", { className: "mb-8", children: [
|
|
7180
|
+
/* @__PURE__ */ jsx43("h2", { className: "text-xl font-semibold mb-4 text-foreground", children: title }),
|
|
7181
|
+
/* @__PURE__ */ jsx43("div", { className: "p-4 border border-border rounded-lg bg-background", children })
|
|
7107
7182
|
] });
|
|
7108
7183
|
var ThemeToggle = () => {
|
|
7109
7184
|
const { theme, setTheme } = useTheme();
|
|
7110
|
-
return /* @__PURE__ */
|
|
7111
|
-
/* @__PURE__ */
|
|
7112
|
-
/* @__PURE__ */
|
|
7113
|
-
/* @__PURE__ */
|
|
7114
|
-
/* @__PURE__ */
|
|
7115
|
-
/* @__PURE__ */
|
|
7116
|
-
/* @__PURE__ */
|
|
7117
|
-
/* @__PURE__ */
|
|
7185
|
+
return /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7186
|
+
/* @__PURE__ */ jsx43(Label, { children: "Theme:" }),
|
|
7187
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { value: theme, onValueChange: (value) => setTheme(value), children: [
|
|
7188
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-32", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select theme" }) }),
|
|
7189
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7190
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "light", children: "Light" }),
|
|
7191
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "dark", children: "Dark" }),
|
|
7192
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "system", children: "System" })
|
|
7118
7193
|
] })
|
|
7119
7194
|
] })
|
|
7120
7195
|
] });
|
|
7121
7196
|
};
|
|
7122
7197
|
var PlaygroundContent = () => {
|
|
7123
|
-
const [dialogOpen, setDialogOpen] =
|
|
7124
|
-
const [checkboxChecked, setCheckboxChecked] =
|
|
7125
|
-
const [switchChecked, setSwitchChecked] =
|
|
7126
|
-
const [inputValue, setInputValue] =
|
|
7127
|
-
const [textareaValue, setTextareaValue] =
|
|
7128
|
-
const [selectValue, setSelectValue] =
|
|
7129
|
-
const [comboboxValue, setComboboxValue] =
|
|
7198
|
+
const [dialogOpen, setDialogOpen] = React42.useState(false);
|
|
7199
|
+
const [checkboxChecked, setCheckboxChecked] = React42.useState(false);
|
|
7200
|
+
const [switchChecked, setSwitchChecked] = React42.useState(false);
|
|
7201
|
+
const [inputValue, setInputValue] = React42.useState("");
|
|
7202
|
+
const [textareaValue, setTextareaValue] = React42.useState("");
|
|
7203
|
+
const [selectValue, setSelectValue] = React42.useState("");
|
|
7204
|
+
const [comboboxValue, setComboboxValue] = React42.useState(null);
|
|
7130
7205
|
const comboboxOptions = [
|
|
7131
7206
|
{ value: "react", label: "React" },
|
|
7132
7207
|
{ value: "vue", label: "Vue" },
|
|
@@ -7134,35 +7209,35 @@ var PlaygroundContent = () => {
|
|
|
7134
7209
|
{ value: "svelte", label: "Svelte" },
|
|
7135
7210
|
{ value: "solid", label: "SolidJS" }
|
|
7136
7211
|
];
|
|
7137
|
-
return /* @__PURE__ */
|
|
7138
|
-
/* @__PURE__ */
|
|
7139
|
-
/* @__PURE__ */
|
|
7140
|
-
/* @__PURE__ */
|
|
7212
|
+
return /* @__PURE__ */ jsx43("div", { className: "min-h-screen bg-background p-8", children: /* @__PURE__ */ jsxs28("div", { className: "max-w-4xl mx-auto", children: [
|
|
7213
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between mb-8", children: [
|
|
7214
|
+
/* @__PURE__ */ jsx43("h1", { className: "text-3xl font-bold text-foreground", children: "@onesaz/ui Playground" }),
|
|
7215
|
+
/* @__PURE__ */ jsx43(ThemeToggle, {})
|
|
7141
7216
|
] }),
|
|
7142
|
-
/* @__PURE__ */
|
|
7143
|
-
/* @__PURE__ */
|
|
7144
|
-
/* @__PURE__ */
|
|
7145
|
-
/* @__PURE__ */
|
|
7146
|
-
/* @__PURE__ */
|
|
7147
|
-
/* @__PURE__ */
|
|
7148
|
-
/* @__PURE__ */
|
|
7149
|
-
/* @__PURE__ */
|
|
7217
|
+
/* @__PURE__ */ jsxs28(Section, { title: "Button", children: [
|
|
7218
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-4", children: [
|
|
7219
|
+
/* @__PURE__ */ jsx43(Button, { variant: "default", children: "Default" }),
|
|
7220
|
+
/* @__PURE__ */ jsx43(Button, { variant: "destructive", children: "Destructive" }),
|
|
7221
|
+
/* @__PURE__ */ jsx43(Button, { variant: "outline", children: "Outline" }),
|
|
7222
|
+
/* @__PURE__ */ jsx43(Button, { variant: "secondary", children: "Secondary" }),
|
|
7223
|
+
/* @__PURE__ */ jsx43(Button, { variant: "ghost", children: "Ghost" }),
|
|
7224
|
+
/* @__PURE__ */ jsx43(Button, { variant: "link", children: "Link" })
|
|
7150
7225
|
] }),
|
|
7151
|
-
/* @__PURE__ */
|
|
7152
|
-
/* @__PURE__ */
|
|
7153
|
-
/* @__PURE__ */
|
|
7154
|
-
/* @__PURE__ */
|
|
7155
|
-
/* @__PURE__ */
|
|
7226
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-4 mt-4", children: [
|
|
7227
|
+
/* @__PURE__ */ jsx43(Button, { size: "sm", children: "Small" }),
|
|
7228
|
+
/* @__PURE__ */ jsx43(Button, { size: "default", children: "Default" }),
|
|
7229
|
+
/* @__PURE__ */ jsx43(Button, { size: "lg", children: "Large" }),
|
|
7230
|
+
/* @__PURE__ */ jsx43(Button, { size: "icon", children: "\u{1F514}" })
|
|
7156
7231
|
] }),
|
|
7157
|
-
/* @__PURE__ */
|
|
7158
|
-
/* @__PURE__ */
|
|
7159
|
-
/* @__PURE__ */
|
|
7232
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-4 mt-4", children: [
|
|
7233
|
+
/* @__PURE__ */ jsx43(Button, { disabled: true, children: "Disabled" }),
|
|
7234
|
+
/* @__PURE__ */ jsx43(Button, { variant: "outline", disabled: true, children: "Disabled Outline" })
|
|
7160
7235
|
] })
|
|
7161
7236
|
] }),
|
|
7162
|
-
/* @__PURE__ */
|
|
7163
|
-
/* @__PURE__ */
|
|
7164
|
-
/* @__PURE__ */
|
|
7165
|
-
/* @__PURE__ */
|
|
7237
|
+
/* @__PURE__ */ jsx43(Section, { title: "Input", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4 max-w-md", children: [
|
|
7238
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7239
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "input-default", children: "Default Input" }),
|
|
7240
|
+
/* @__PURE__ */ jsx43(
|
|
7166
7241
|
Input,
|
|
7167
7242
|
{
|
|
7168
7243
|
id: "input-default",
|
|
@@ -7172,19 +7247,19 @@ var PlaygroundContent = () => {
|
|
|
7172
7247
|
}
|
|
7173
7248
|
)
|
|
7174
7249
|
] }),
|
|
7175
|
-
/* @__PURE__ */
|
|
7176
|
-
/* @__PURE__ */
|
|
7177
|
-
/* @__PURE__ */
|
|
7250
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7251
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "input-disabled", children: "Disabled Input" }),
|
|
7252
|
+
/* @__PURE__ */ jsx43(Input, { id: "input-disabled", placeholder: "Disabled...", disabled: true })
|
|
7178
7253
|
] }),
|
|
7179
|
-
/* @__PURE__ */
|
|
7180
|
-
/* @__PURE__ */
|
|
7181
|
-
/* @__PURE__ */
|
|
7254
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7255
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "input-type", children: "Email Input" }),
|
|
7256
|
+
/* @__PURE__ */ jsx43(Input, { id: "input-type", type: "email", placeholder: "email@example.com" })
|
|
7182
7257
|
] })
|
|
7183
7258
|
] }) }),
|
|
7184
|
-
/* @__PURE__ */
|
|
7185
|
-
/* @__PURE__ */
|
|
7186
|
-
/* @__PURE__ */
|
|
7187
|
-
/* @__PURE__ */
|
|
7259
|
+
/* @__PURE__ */ jsx43(Section, { title: "Textarea", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4 max-w-md", children: [
|
|
7260
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7261
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "textarea-default", children: "Default Textarea" }),
|
|
7262
|
+
/* @__PURE__ */ jsx43(
|
|
7188
7263
|
Textarea,
|
|
7189
7264
|
{
|
|
7190
7265
|
id: "textarea-default",
|
|
@@ -7194,52 +7269,52 @@ var PlaygroundContent = () => {
|
|
|
7194
7269
|
}
|
|
7195
7270
|
)
|
|
7196
7271
|
] }),
|
|
7197
|
-
/* @__PURE__ */
|
|
7198
|
-
/* @__PURE__ */
|
|
7199
|
-
/* @__PURE__ */
|
|
7272
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7273
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "textarea-disabled", children: "Disabled Textarea" }),
|
|
7274
|
+
/* @__PURE__ */ jsx43(Textarea, { id: "textarea-disabled", placeholder: "Disabled...", disabled: true })
|
|
7200
7275
|
] })
|
|
7201
7276
|
] }) }),
|
|
7202
|
-
/* @__PURE__ */
|
|
7203
|
-
/* @__PURE__ */
|
|
7204
|
-
/* @__PURE__ */
|
|
7205
|
-
/* @__PURE__ */
|
|
7206
|
-
/* @__PURE__ */
|
|
7207
|
-
/* @__PURE__ */
|
|
7208
|
-
/* @__PURE__ */
|
|
7209
|
-
/* @__PURE__ */
|
|
7210
|
-
/* @__PURE__ */
|
|
7277
|
+
/* @__PURE__ */ jsx43(Section, { title: "Select", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4 max-w-md", children: [
|
|
7278
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7279
|
+
/* @__PURE__ */ jsx43(Label, { children: "Default Select" }),
|
|
7280
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { value: selectValue, onValueChange: setSelectValue, children: [
|
|
7281
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select an option..." }) }),
|
|
7282
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7283
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "option1", children: "Option 1" }),
|
|
7284
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "option2", children: "Option 2" }),
|
|
7285
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "option3", children: "Option 3" })
|
|
7211
7286
|
] })
|
|
7212
7287
|
] })
|
|
7213
7288
|
] }),
|
|
7214
|
-
/* @__PURE__ */
|
|
7215
|
-
/* @__PURE__ */
|
|
7216
|
-
/* @__PURE__ */
|
|
7217
|
-
/* @__PURE__ */
|
|
7218
|
-
/* @__PURE__ */
|
|
7219
|
-
/* @__PURE__ */
|
|
7220
|
-
/* @__PURE__ */
|
|
7221
|
-
/* @__PURE__ */
|
|
7222
|
-
/* @__PURE__ */
|
|
7289
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7290
|
+
/* @__PURE__ */ jsx43(Label, { children: "Grouped Select" }),
|
|
7291
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { children: [
|
|
7292
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select a food..." }) }),
|
|
7293
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7294
|
+
/* @__PURE__ */ jsxs28(SelectGroup, { children: [
|
|
7295
|
+
/* @__PURE__ */ jsx43(SelectLabel, { children: "Fruits" }),
|
|
7296
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "apple", children: "Apple" }),
|
|
7297
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "banana", children: "Banana" })
|
|
7223
7298
|
] }),
|
|
7224
|
-
/* @__PURE__ */
|
|
7225
|
-
/* @__PURE__ */
|
|
7226
|
-
/* @__PURE__ */
|
|
7227
|
-
/* @__PURE__ */
|
|
7299
|
+
/* @__PURE__ */ jsxs28(SelectGroup, { children: [
|
|
7300
|
+
/* @__PURE__ */ jsx43(SelectLabel, { children: "Vegetables" }),
|
|
7301
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "carrot", children: "Carrot" }),
|
|
7302
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "potato", children: "Potato" })
|
|
7228
7303
|
] })
|
|
7229
7304
|
] })
|
|
7230
7305
|
] })
|
|
7231
7306
|
] }),
|
|
7232
|
-
/* @__PURE__ */
|
|
7233
|
-
/* @__PURE__ */
|
|
7234
|
-
/* @__PURE__ */
|
|
7235
|
-
/* @__PURE__ */
|
|
7236
|
-
/* @__PURE__ */
|
|
7307
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7308
|
+
/* @__PURE__ */ jsx43(Label, { children: "Disabled Select" }),
|
|
7309
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { disabled: true, children: [
|
|
7310
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Disabled..." }) }),
|
|
7311
|
+
/* @__PURE__ */ jsx43(SelectContent, { children: /* @__PURE__ */ jsx43(SelectItem, { value: "none", children: "None" }) })
|
|
7237
7312
|
] })
|
|
7238
7313
|
] })
|
|
7239
7314
|
] }) }),
|
|
7240
|
-
/* @__PURE__ */
|
|
7241
|
-
/* @__PURE__ */
|
|
7242
|
-
/* @__PURE__ */
|
|
7315
|
+
/* @__PURE__ */ jsx43(Section, { title: "Combobox (Searchable Select)", children: /* @__PURE__ */ jsx43("div", { className: "space-y-4 max-w-md", children: /* @__PURE__ */ jsxs28("div", { children: [
|
|
7316
|
+
/* @__PURE__ */ jsx43(Label, { children: "Framework" }),
|
|
7317
|
+
/* @__PURE__ */ jsx43(
|
|
7243
7318
|
Combobox,
|
|
7244
7319
|
{
|
|
7245
7320
|
options: comboboxOptions,
|
|
@@ -7251,9 +7326,9 @@ var PlaygroundContent = () => {
|
|
|
7251
7326
|
}
|
|
7252
7327
|
)
|
|
7253
7328
|
] }) }) }),
|
|
7254
|
-
/* @__PURE__ */
|
|
7255
|
-
/* @__PURE__ */
|
|
7256
|
-
/* @__PURE__ */
|
|
7329
|
+
/* @__PURE__ */ jsx43(Section, { title: "Checkbox & Switch", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4", children: [
|
|
7330
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7331
|
+
/* @__PURE__ */ jsx43(
|
|
7257
7332
|
Checkbox,
|
|
7258
7333
|
{
|
|
7259
7334
|
id: "checkbox",
|
|
@@ -7261,15 +7336,15 @@ var PlaygroundContent = () => {
|
|
|
7261
7336
|
onChange: (e) => setCheckboxChecked(e.target.checked)
|
|
7262
7337
|
}
|
|
7263
7338
|
),
|
|
7264
|
-
/* @__PURE__ */
|
|
7339
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "checkbox", children: "Accept terms and conditions" })
|
|
7265
7340
|
] }),
|
|
7266
|
-
/* @__PURE__ */
|
|
7267
|
-
/* @__PURE__ */
|
|
7268
|
-
/* @__PURE__ */
|
|
7341
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7342
|
+
/* @__PURE__ */ jsx43(Checkbox, { id: "checkbox-disabled", disabled: true }),
|
|
7343
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "checkbox-disabled", children: "Disabled checkbox" })
|
|
7269
7344
|
] }),
|
|
7270
|
-
/* @__PURE__ */
|
|
7271
|
-
/* @__PURE__ */
|
|
7272
|
-
/* @__PURE__ */
|
|
7345
|
+
/* @__PURE__ */ jsx43(Separator, {}),
|
|
7346
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7347
|
+
/* @__PURE__ */ jsx43(
|
|
7273
7348
|
Switch,
|
|
7274
7349
|
{
|
|
7275
7350
|
id: "switch",
|
|
@@ -7277,161 +7352,165 @@ var PlaygroundContent = () => {
|
|
|
7277
7352
|
onChange: (e) => setSwitchChecked(e.target.checked)
|
|
7278
7353
|
}
|
|
7279
7354
|
),
|
|
7280
|
-
/* @__PURE__ */
|
|
7355
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "switch", children: "Enable notifications" })
|
|
7281
7356
|
] }),
|
|
7282
|
-
/* @__PURE__ */
|
|
7283
|
-
/* @__PURE__ */
|
|
7284
|
-
/* @__PURE__ */
|
|
7357
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
7358
|
+
/* @__PURE__ */ jsx43(Switch, { id: "switch-disabled", disabled: true }),
|
|
7359
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "switch-disabled", children: "Disabled switch" })
|
|
7285
7360
|
] })
|
|
7286
7361
|
] }) }),
|
|
7287
|
-
/* @__PURE__ */
|
|
7288
|
-
/* @__PURE__ */
|
|
7289
|
-
/* @__PURE__ */
|
|
7290
|
-
/* @__PURE__ */
|
|
7291
|
-
/* @__PURE__ */
|
|
7362
|
+
/* @__PURE__ */ jsx43(Section, { title: "Badge", children: /* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap gap-4", children: [
|
|
7363
|
+
/* @__PURE__ */ jsx43(Badge, { children: "Default" }),
|
|
7364
|
+
/* @__PURE__ */ jsx43(Badge, { variant: "secondary", children: "Secondary" }),
|
|
7365
|
+
/* @__PURE__ */ jsx43(Badge, { variant: "destructive", children: "Destructive" }),
|
|
7366
|
+
/* @__PURE__ */ jsx43(Badge, { variant: "outline", children: "Outline" })
|
|
7292
7367
|
] }) }),
|
|
7293
|
-
/* @__PURE__ */
|
|
7294
|
-
/* @__PURE__ */
|
|
7295
|
-
/* @__PURE__ */
|
|
7296
|
-
/* @__PURE__ */
|
|
7297
|
-
/* @__PURE__ */
|
|
7368
|
+
/* @__PURE__ */ jsx43(Section, { title: "Card", children: /* @__PURE__ */ jsxs28("div", { className: "grid gap-4 md:grid-cols-2", children: [
|
|
7369
|
+
/* @__PURE__ */ jsxs28(Card, { children: [
|
|
7370
|
+
/* @__PURE__ */ jsxs28(CardHeader, { children: [
|
|
7371
|
+
/* @__PURE__ */ jsx43(CardTitle, { children: "Card Title" }),
|
|
7372
|
+
/* @__PURE__ */ jsx43(CardDescription, { children: "Card description goes here" })
|
|
7298
7373
|
] }),
|
|
7299
|
-
/* @__PURE__ */
|
|
7300
|
-
/* @__PURE__ */
|
|
7301
|
-
/* @__PURE__ */
|
|
7302
|
-
/* @__PURE__ */
|
|
7374
|
+
/* @__PURE__ */ jsx43(CardContent, { children: /* @__PURE__ */ jsx43("p", { className: "text-foreground", children: "This is the card content area." }) }),
|
|
7375
|
+
/* @__PURE__ */ jsxs28(CardFooter, { children: [
|
|
7376
|
+
/* @__PURE__ */ jsx43(Button, { variant: "outline", className: "mr-2", children: "Cancel" }),
|
|
7377
|
+
/* @__PURE__ */ jsx43(Button, { children: "Submit" })
|
|
7303
7378
|
] })
|
|
7304
7379
|
] }),
|
|
7305
|
-
/* @__PURE__ */
|
|
7306
|
-
/* @__PURE__ */
|
|
7307
|
-
/* @__PURE__ */
|
|
7308
|
-
/* @__PURE__ */
|
|
7380
|
+
/* @__PURE__ */ jsxs28(Card, { children: [
|
|
7381
|
+
/* @__PURE__ */ jsxs28(CardHeader, { children: [
|
|
7382
|
+
/* @__PURE__ */ jsx43(CardTitle, { children: "Another Card" }),
|
|
7383
|
+
/* @__PURE__ */ jsx43(CardDescription, { children: "With different content" })
|
|
7309
7384
|
] }),
|
|
7310
|
-
/* @__PURE__ */
|
|
7311
|
-
/* @__PURE__ */
|
|
7312
|
-
/* @__PURE__ */
|
|
7385
|
+
/* @__PURE__ */ jsx43(CardContent, { children: /* @__PURE__ */ jsxs28("div", { className: "space-y-2", children: [
|
|
7386
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "card-input", children: "Name" }),
|
|
7387
|
+
/* @__PURE__ */ jsx43(Input, { id: "card-input", placeholder: "Enter name..." })
|
|
7313
7388
|
] }) }),
|
|
7314
|
-
/* @__PURE__ */
|
|
7389
|
+
/* @__PURE__ */ jsx43(CardFooter, { children: /* @__PURE__ */ jsx43(Button, { className: "w-full", children: "Save" }) })
|
|
7315
7390
|
] })
|
|
7316
7391
|
] }) }),
|
|
7317
|
-
/* @__PURE__ */
|
|
7318
|
-
/* @__PURE__ */
|
|
7319
|
-
/* @__PURE__ */
|
|
7320
|
-
/* @__PURE__ */
|
|
7321
|
-
/* @__PURE__ */
|
|
7322
|
-
/* @__PURE__ */
|
|
7392
|
+
/* @__PURE__ */ jsxs28(Section, { title: "Dialog", children: [
|
|
7393
|
+
/* @__PURE__ */ jsx43(Button, { onClick: () => setDialogOpen(true), children: "Open Dialog" }),
|
|
7394
|
+
/* @__PURE__ */ jsx43(DialogNamespace, { open: dialogOpen, onOpenChange: setDialogOpen, children: /* @__PURE__ */ jsxs28(DialogContent, { children: [
|
|
7395
|
+
/* @__PURE__ */ jsxs28(DialogHeader, { children: [
|
|
7396
|
+
/* @__PURE__ */ jsx43(DialogTitle, { children: "Create New Zone" }),
|
|
7397
|
+
/* @__PURE__ */ jsx43(DialogDescription, { children: "Fill in the details below to create a new zone." })
|
|
7323
7398
|
] }),
|
|
7324
|
-
/* @__PURE__ */
|
|
7325
|
-
/* @__PURE__ */
|
|
7326
|
-
/* @__PURE__ */
|
|
7327
|
-
/* @__PURE__ */
|
|
7328
|
-
/* @__PURE__ */
|
|
7399
|
+
/* @__PURE__ */ jsxs28("div", { className: "space-y-4 py-4", children: [
|
|
7400
|
+
/* @__PURE__ */ jsxs28("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7401
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7402
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "zone-name", children: "Zone Name *" }),
|
|
7403
|
+
/* @__PURE__ */ jsx43(Input, { id: "zone-name", placeholder: "eg:hyderabad" })
|
|
7329
7404
|
] }),
|
|
7330
|
-
/* @__PURE__ */
|
|
7331
|
-
/* @__PURE__ */
|
|
7332
|
-
/* @__PURE__ */
|
|
7405
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7406
|
+
/* @__PURE__ */ jsx43(Label, { htmlFor: "zone-code", children: "Zone Code *" }),
|
|
7407
|
+
/* @__PURE__ */ jsx43(Input, { id: "zone-code", placeholder: "eg :hyd022" })
|
|
7333
7408
|
] })
|
|
7334
7409
|
] }),
|
|
7335
|
-
/* @__PURE__ */
|
|
7336
|
-
/* @__PURE__ */
|
|
7337
|
-
/* @__PURE__ */
|
|
7338
|
-
/* @__PURE__ */
|
|
7339
|
-
/* @__PURE__ */
|
|
7340
|
-
/* @__PURE__ */
|
|
7341
|
-
/* @__PURE__ */
|
|
7342
|
-
/* @__PURE__ */
|
|
7410
|
+
/* @__PURE__ */ jsxs28("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
7411
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7412
|
+
/* @__PURE__ */ jsx43(Label, { children: "State *" }),
|
|
7413
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { children: [
|
|
7414
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select state" }) }),
|
|
7415
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7416
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "telangana", children: "TELANGANA" }),
|
|
7417
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "andhra", children: "ANDHRA PRADESH" })
|
|
7343
7418
|
] })
|
|
7344
7419
|
] })
|
|
7345
7420
|
] }),
|
|
7346
|
-
/* @__PURE__ */
|
|
7347
|
-
/* @__PURE__ */
|
|
7348
|
-
/* @__PURE__ */
|
|
7349
|
-
/* @__PURE__ */
|
|
7350
|
-
/* @__PURE__ */
|
|
7351
|
-
/* @__PURE__ */
|
|
7352
|
-
/* @__PURE__ */
|
|
7421
|
+
/* @__PURE__ */ jsxs28("div", { children: [
|
|
7422
|
+
/* @__PURE__ */ jsx43(Label, { children: "District *" }),
|
|
7423
|
+
/* @__PURE__ */ jsxs28(SelectNamespace, { children: [
|
|
7424
|
+
/* @__PURE__ */ jsx43(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx43(SelectValue, { placeholder: "Select District" }) }),
|
|
7425
|
+
/* @__PURE__ */ jsxs28(SelectContent, { children: [
|
|
7426
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "hyderabad", children: "HYDERABAD" }),
|
|
7427
|
+
/* @__PURE__ */ jsx43(SelectItem, { value: "rangareddy", children: "RANGAREDDY" })
|
|
7353
7428
|
] })
|
|
7354
7429
|
] })
|
|
7355
7430
|
] })
|
|
7356
7431
|
] })
|
|
7357
7432
|
] }),
|
|
7358
|
-
/* @__PURE__ */
|
|
7359
|
-
/* @__PURE__ */
|
|
7360
|
-
/* @__PURE__ */
|
|
7433
|
+
/* @__PURE__ */ jsxs28(DialogFooter, { children: [
|
|
7434
|
+
/* @__PURE__ */ jsx43(Button, { variant: "outline", onClick: () => setDialogOpen(false), children: "CANCEL" }),
|
|
7435
|
+
/* @__PURE__ */ jsx43(Button, { onClick: () => setDialogOpen(false), children: "Create" })
|
|
7361
7436
|
] })
|
|
7362
7437
|
] }) })
|
|
7363
7438
|
] }),
|
|
7364
|
-
/* @__PURE__ */
|
|
7365
|
-
/* @__PURE__ */
|
|
7366
|
-
/* @__PURE__ */
|
|
7367
|
-
/* @__PURE__ */
|
|
7368
|
-
/* @__PURE__ */
|
|
7369
|
-
/* @__PURE__ */
|
|
7370
|
-
/* @__PURE__ */
|
|
7439
|
+
/* @__PURE__ */ jsx43(Section, { title: "Table", children: /* @__PURE__ */ jsxs28(TableNamespace, { children: [
|
|
7440
|
+
/* @__PURE__ */ jsx43(TableCaption, { children: "A list of recent invoices" }),
|
|
7441
|
+
/* @__PURE__ */ jsx43(TableHeader, { children: /* @__PURE__ */ jsxs28(TableRow, { children: [
|
|
7442
|
+
/* @__PURE__ */ jsx43(TableHead, { children: "Invoice" }),
|
|
7443
|
+
/* @__PURE__ */ jsx43(TableHead, { children: "Status" }),
|
|
7444
|
+
/* @__PURE__ */ jsx43(TableHead, { children: "Method" }),
|
|
7445
|
+
/* @__PURE__ */ jsx43(TableHead, { className: "text-right", children: "Amount" })
|
|
7371
7446
|
] }) }),
|
|
7372
|
-
/* @__PURE__ */
|
|
7373
|
-
/* @__PURE__ */
|
|
7374
|
-
/* @__PURE__ */
|
|
7375
|
-
/* @__PURE__ */
|
|
7376
|
-
/* @__PURE__ */
|
|
7377
|
-
/* @__PURE__ */
|
|
7447
|
+
/* @__PURE__ */ jsxs28(TableBody, { children: [
|
|
7448
|
+
/* @__PURE__ */ jsxs28(TableRow, { children: [
|
|
7449
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "INV001" }),
|
|
7450
|
+
/* @__PURE__ */ jsx43(TableCell, { children: /* @__PURE__ */ jsx43(Badge, { children: "Paid" }) }),
|
|
7451
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "Credit Card" }),
|
|
7452
|
+
/* @__PURE__ */ jsx43(TableCell, { className: "text-right", children: "$250.00" })
|
|
7378
7453
|
] }),
|
|
7379
|
-
/* @__PURE__ */
|
|
7380
|
-
/* @__PURE__ */
|
|
7381
|
-
/* @__PURE__ */
|
|
7382
|
-
/* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7454
|
+
/* @__PURE__ */ jsxs28(TableRow, { children: [
|
|
7455
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "INV002" }),
|
|
7456
|
+
/* @__PURE__ */ jsx43(TableCell, { children: /* @__PURE__ */ jsx43(Badge, { variant: "secondary", children: "Pending" }) }),
|
|
7457
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "PayPal" }),
|
|
7458
|
+
/* @__PURE__ */ jsx43(TableCell, { className: "text-right", children: "$150.00" })
|
|
7384
7459
|
] }),
|
|
7385
|
-
/* @__PURE__ */
|
|
7386
|
-
/* @__PURE__ */
|
|
7387
|
-
/* @__PURE__ */
|
|
7388
|
-
/* @__PURE__ */
|
|
7389
|
-
/* @__PURE__ */
|
|
7460
|
+
/* @__PURE__ */ jsxs28(TableRow, { children: [
|
|
7461
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "INV003" }),
|
|
7462
|
+
/* @__PURE__ */ jsx43(TableCell, { children: /* @__PURE__ */ jsx43(Badge, { variant: "destructive", children: "Failed" }) }),
|
|
7463
|
+
/* @__PURE__ */ jsx43(TableCell, { children: "Bank Transfer" }),
|
|
7464
|
+
/* @__PURE__ */ jsx43(TableCell, { className: "text-right", children: "$350.00" })
|
|
7390
7465
|
] })
|
|
7391
7466
|
] })
|
|
7392
7467
|
] }) }),
|
|
7393
|
-
/* @__PURE__ */
|
|
7394
|
-
/* @__PURE__ */
|
|
7395
|
-
/* @__PURE__ */
|
|
7396
|
-
/* @__PURE__ */
|
|
7397
|
-
/* @__PURE__ */
|
|
7398
|
-
/* @__PURE__ */
|
|
7399
|
-
/* @__PURE__ */
|
|
7468
|
+
/* @__PURE__ */ jsx43(Section, { title: "Pagination", children: /* @__PURE__ */ jsx43(PaginationNamespace, { children: /* @__PURE__ */ jsxs28(PaginationContent, { children: [
|
|
7469
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationPrevious, { onClick: () => console.log("Previous") }) }),
|
|
7470
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationLink, { isActive: true, children: "1" }) }),
|
|
7471
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationLink, { children: "2" }) }),
|
|
7472
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationLink, { children: "3" }) }),
|
|
7473
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationEllipsis, {}) }),
|
|
7474
|
+
/* @__PURE__ */ jsx43(PaginationItem, { children: /* @__PURE__ */ jsx43(PaginationNext, { onClick: () => console.log("Next") }) })
|
|
7400
7475
|
] }) }) }),
|
|
7401
|
-
/* @__PURE__ */
|
|
7402
|
-
/* @__PURE__ */
|
|
7403
|
-
/* @__PURE__ */
|
|
7404
|
-
/* @__PURE__ */
|
|
7476
|
+
/* @__PURE__ */ jsx43(Section, { title: "Spinner", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-8", children: [
|
|
7477
|
+
/* @__PURE__ */ jsxs28("div", { className: "text-center", children: [
|
|
7478
|
+
/* @__PURE__ */ jsx43(Spinner, { size: "sm" }),
|
|
7479
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm text-muted-foreground mt-2", children: "Small" })
|
|
7405
7480
|
] }),
|
|
7406
|
-
/* @__PURE__ */
|
|
7407
|
-
/* @__PURE__ */
|
|
7408
|
-
/* @__PURE__ */
|
|
7481
|
+
/* @__PURE__ */ jsxs28("div", { className: "text-center", children: [
|
|
7482
|
+
/* @__PURE__ */ jsx43(Spinner, { size: "default" }),
|
|
7483
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm text-muted-foreground mt-2", children: "Default" })
|
|
7409
7484
|
] }),
|
|
7410
|
-
/* @__PURE__ */
|
|
7411
|
-
/* @__PURE__ */
|
|
7412
|
-
/* @__PURE__ */
|
|
7485
|
+
/* @__PURE__ */ jsxs28("div", { className: "text-center", children: [
|
|
7486
|
+
/* @__PURE__ */ jsx43(Spinner, { size: "lg" }),
|
|
7487
|
+
/* @__PURE__ */ jsx43("p", { className: "text-sm text-muted-foreground mt-2", children: "Large" })
|
|
7413
7488
|
] })
|
|
7414
7489
|
] }) }),
|
|
7415
|
-
/* @__PURE__ */
|
|
7416
|
-
/* @__PURE__ */
|
|
7417
|
-
/* @__PURE__ */
|
|
7418
|
-
/* @__PURE__ */
|
|
7419
|
-
/* @__PURE__ */
|
|
7420
|
-
/* @__PURE__ */
|
|
7421
|
-
/* @__PURE__ */
|
|
7422
|
-
/* @__PURE__ */
|
|
7490
|
+
/* @__PURE__ */ jsx43(Section, { title: "Separator", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-4", children: [
|
|
7491
|
+
/* @__PURE__ */ jsx43("p", { className: "text-foreground", children: "Content above separator" }),
|
|
7492
|
+
/* @__PURE__ */ jsx43(Separator, {}),
|
|
7493
|
+
/* @__PURE__ */ jsx43("p", { className: "text-foreground", children: "Content below separator" }),
|
|
7494
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center h-10", children: [
|
|
7495
|
+
/* @__PURE__ */ jsx43("span", { className: "text-foreground", children: "Left" }),
|
|
7496
|
+
/* @__PURE__ */ jsx43(Separator, { orientation: "vertical", className: "mx-4" }),
|
|
7497
|
+
/* @__PURE__ */ jsx43("span", { className: "text-foreground", children: "Right" })
|
|
7423
7498
|
] })
|
|
7424
7499
|
] }) }),
|
|
7425
|
-
/* @__PURE__ */
|
|
7426
|
-
/* @__PURE__ */
|
|
7427
|
-
/* @__PURE__ */
|
|
7428
|
-
/* @__PURE__ */
|
|
7429
|
-
/* @__PURE__ */
|
|
7500
|
+
/* @__PURE__ */ jsx43(Section, { title: "Typography & Colors", children: /* @__PURE__ */ jsxs28("div", { className: "space-y-2", children: [
|
|
7501
|
+
/* @__PURE__ */ jsx43("p", { className: "text-foreground", children: "text-foreground - Primary text color" }),
|
|
7502
|
+
/* @__PURE__ */ jsx43("p", { className: "text-muted-foreground", children: "text-muted-foreground - Muted text color" }),
|
|
7503
|
+
/* @__PURE__ */ jsx43("p", { className: "text-accent", children: "text-accent - Accent color" }),
|
|
7504
|
+
/* @__PURE__ */ jsx43("p", { className: "text-destructive", children: "text-destructive - Destructive color" })
|
|
7430
7505
|
] }) })
|
|
7431
7506
|
] }) });
|
|
7432
7507
|
};
|
|
7433
|
-
var Playground = () => /* @__PURE__ */
|
|
7508
|
+
var Playground = () => /* @__PURE__ */ jsx43(ThemeProvider, { defaultTheme: "light", children: /* @__PURE__ */ jsx43(PlaygroundContent, {}) });
|
|
7434
7509
|
export {
|
|
7510
|
+
Accordion,
|
|
7511
|
+
AccordionContent,
|
|
7512
|
+
AccordionItem,
|
|
7513
|
+
AccordionTrigger,
|
|
7435
7514
|
Alert,
|
|
7436
7515
|
AlertDescription,
|
|
7437
7516
|
AlertDialog,
|