@inshorts/glint-ui 0.6.2 → 0.7.0
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/LICENSE +13 -0
- package/dist/chunk-UBJK4OEO.js +110 -0
- package/dist/chunk-UBJK4OEO.js.map +1 -0
- package/dist/chunk-YXKAUYDJ.js +158 -0
- package/dist/chunk-YXKAUYDJ.js.map +1 -0
- package/dist/dialog.cjs +160 -0
- package/dist/dialog.cjs.map +1 -0
- package/dist/dialog.d.cts +26 -0
- package/dist/dialog.d.ts +26 -0
- package/dist/dialog.js +27 -0
- package/dist/dialog.js.map +1 -0
- package/dist/dropdown-menu.cjs +213 -0
- package/dist/dropdown-menu.cjs.map +1 -0
- package/dist/dropdown-menu.d.cts +33 -0
- package/dist/dropdown-menu.d.ts +33 -0
- package/dist/dropdown-menu.js +37 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/index.cjs +447 -168
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +73 -19
- package/package.json +37 -8
package/dist/index.cjs
CHANGED
|
@@ -49,11 +49,36 @@ __export(index_exports, {
|
|
|
49
49
|
CopyButton: () => CopyButton,
|
|
50
50
|
DataTable: () => DataTable,
|
|
51
51
|
DateRangePicker: () => DateRangePicker,
|
|
52
|
+
Dialog: () => Dialog,
|
|
53
|
+
DialogClose: () => DialogClose,
|
|
54
|
+
DialogContent: () => DialogContent,
|
|
55
|
+
DialogDescription: () => DialogDescription,
|
|
56
|
+
DialogFooter: () => DialogFooter,
|
|
57
|
+
DialogHeader: () => DialogHeader,
|
|
58
|
+
DialogOverlay: () => DialogOverlay,
|
|
59
|
+
DialogPortal: () => DialogPortal,
|
|
60
|
+
DialogTitle: () => DialogTitle,
|
|
61
|
+
DialogTrigger: () => DialogTrigger,
|
|
62
|
+
DropdownMenu: () => DropdownMenu,
|
|
63
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
64
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
65
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
66
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
67
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
68
|
+
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
69
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
70
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
71
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
72
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
73
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
74
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
75
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
76
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
52
77
|
FeatureAccessGate: () => FeatureAccessGate,
|
|
53
78
|
Field: () => Field,
|
|
54
79
|
ImageUploader: () => ImageUploader,
|
|
55
80
|
Input: () => Input,
|
|
56
|
-
Label: () =>
|
|
81
|
+
Label: () => Label2,
|
|
57
82
|
Modal: () => Modal,
|
|
58
83
|
PageHeader: () => PageHeader,
|
|
59
84
|
Pagination: () => Pagination,
|
|
@@ -62,7 +87,7 @@ __export(index_exports, {
|
|
|
62
87
|
PanelSignInSkeleton: () => PanelSignInSkeleton,
|
|
63
88
|
SegmentedControl: () => SegmentedControl,
|
|
64
89
|
Select: () => Select,
|
|
65
|
-
Separator: () =>
|
|
90
|
+
Separator: () => Separator2,
|
|
66
91
|
SideDrawer: () => SideDrawer,
|
|
67
92
|
Spinner: () => Spinner,
|
|
68
93
|
SpreadsheetGrid: () => SpreadsheetGrid,
|
|
@@ -1779,15 +1804,244 @@ function DateRangePicker({
|
|
|
1779
1804
|
] });
|
|
1780
1805
|
}
|
|
1781
1806
|
|
|
1782
|
-
// src/
|
|
1807
|
+
// src/dialog.tsx
|
|
1808
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1809
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1810
|
+
var React13 = __toESM(require("react"), 1);
|
|
1783
1811
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1812
|
+
var Dialog = DialogPrimitive.Root;
|
|
1813
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1814
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
1815
|
+
var DialogClose = DialogPrimitive.Close;
|
|
1816
|
+
var DialogOverlay = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1817
|
+
DialogPrimitive.Overlay,
|
|
1818
|
+
{
|
|
1819
|
+
ref,
|
|
1820
|
+
className: cn(
|
|
1821
|
+
"bg-overlay/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50",
|
|
1822
|
+
className
|
|
1823
|
+
),
|
|
1824
|
+
...props
|
|
1825
|
+
}
|
|
1826
|
+
));
|
|
1827
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1828
|
+
var DialogContent = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPortal, { children: [
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogOverlay, {}),
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1831
|
+
DialogPrimitive.Content,
|
|
1832
|
+
{
|
|
1833
|
+
ref,
|
|
1834
|
+
className: cn(
|
|
1835
|
+
"border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",
|
|
1836
|
+
className
|
|
1837
|
+
),
|
|
1838
|
+
...props,
|
|
1839
|
+
children: [
|
|
1840
|
+
children,
|
|
1841
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [
|
|
1842
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react7.X, { className: "h-4 w-4" }),
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1844
|
+
] })
|
|
1845
|
+
]
|
|
1846
|
+
}
|
|
1847
|
+
)
|
|
1848
|
+
] }));
|
|
1849
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
1850
|
+
var DialogHeader = ({
|
|
1851
|
+
className,
|
|
1852
|
+
...props
|
|
1853
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1854
|
+
"div",
|
|
1855
|
+
{
|
|
1856
|
+
className: cn(
|
|
1857
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
1858
|
+
className
|
|
1859
|
+
),
|
|
1860
|
+
...props
|
|
1861
|
+
}
|
|
1862
|
+
);
|
|
1863
|
+
DialogHeader.displayName = "DialogHeader";
|
|
1864
|
+
var DialogFooter = ({
|
|
1865
|
+
className,
|
|
1866
|
+
...props
|
|
1867
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1868
|
+
"div",
|
|
1869
|
+
{
|
|
1870
|
+
className: cn(
|
|
1871
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1872
|
+
className
|
|
1873
|
+
),
|
|
1874
|
+
...props
|
|
1875
|
+
}
|
|
1876
|
+
);
|
|
1877
|
+
DialogFooter.displayName = "DialogFooter";
|
|
1878
|
+
var DialogTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1879
|
+
DialogPrimitive.Title,
|
|
1880
|
+
{
|
|
1881
|
+
ref,
|
|
1882
|
+
className: cn(
|
|
1883
|
+
"text-lg leading-none font-semibold tracking-tight",
|
|
1884
|
+
className
|
|
1885
|
+
),
|
|
1886
|
+
...props
|
|
1887
|
+
}
|
|
1888
|
+
));
|
|
1889
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1890
|
+
var DialogDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1891
|
+
DialogPrimitive.Description,
|
|
1892
|
+
{
|
|
1893
|
+
ref,
|
|
1894
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1895
|
+
...props
|
|
1896
|
+
}
|
|
1897
|
+
));
|
|
1898
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1899
|
+
|
|
1900
|
+
// src/dropdown-menu.tsx
|
|
1901
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1902
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1903
|
+
var React14 = __toESM(require("react"), 1);
|
|
1904
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1905
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1906
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1907
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
1908
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
1909
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1910
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1911
|
+
var DropdownMenuSubTrigger = React14.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1912
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1913
|
+
{
|
|
1914
|
+
ref,
|
|
1915
|
+
className: cn(
|
|
1916
|
+
"focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1917
|
+
inset && "pl-8",
|
|
1918
|
+
className
|
|
1919
|
+
),
|
|
1920
|
+
...props,
|
|
1921
|
+
children: [
|
|
1922
|
+
children,
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.ChevronRight, { className: "ml-auto" })
|
|
1924
|
+
]
|
|
1925
|
+
}
|
|
1926
|
+
));
|
|
1927
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1928
|
+
var DropdownMenuSubContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1929
|
+
DropdownMenuPrimitive.SubContent,
|
|
1930
|
+
{
|
|
1931
|
+
ref,
|
|
1932
|
+
className: cn(
|
|
1933
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",
|
|
1934
|
+
className
|
|
1935
|
+
),
|
|
1936
|
+
...props
|
|
1937
|
+
}
|
|
1938
|
+
));
|
|
1939
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1940
|
+
var DropdownMenuContent = React14.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1941
|
+
DropdownMenuPrimitive.Content,
|
|
1942
|
+
{
|
|
1943
|
+
ref,
|
|
1944
|
+
sideOffset,
|
|
1945
|
+
className: cn(
|
|
1946
|
+
"bg-popover text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
1947
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
1948
|
+
className
|
|
1949
|
+
),
|
|
1950
|
+
...props
|
|
1951
|
+
}
|
|
1952
|
+
) }));
|
|
1953
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1954
|
+
var DropdownMenuItem = React14.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1955
|
+
DropdownMenuPrimitive.Item,
|
|
1956
|
+
{
|
|
1957
|
+
ref,
|
|
1958
|
+
className: cn(
|
|
1959
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1960
|
+
inset && "pl-8",
|
|
1961
|
+
className
|
|
1962
|
+
),
|
|
1963
|
+
...props
|
|
1964
|
+
}
|
|
1965
|
+
));
|
|
1966
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1967
|
+
var DropdownMenuCheckboxItem = React14.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1968
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1969
|
+
{
|
|
1970
|
+
ref,
|
|
1971
|
+
className: cn(
|
|
1972
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1973
|
+
className
|
|
1974
|
+
),
|
|
1975
|
+
checked,
|
|
1976
|
+
...props,
|
|
1977
|
+
children: [
|
|
1978
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.Check, { className: "h-4 w-4" }) }) }),
|
|
1979
|
+
children
|
|
1980
|
+
]
|
|
1981
|
+
}
|
|
1982
|
+
));
|
|
1983
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1984
|
+
var DropdownMenuRadioItem = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1985
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1986
|
+
{
|
|
1987
|
+
ref,
|
|
1988
|
+
className: cn(
|
|
1989
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1990
|
+
className
|
|
1991
|
+
),
|
|
1992
|
+
...props,
|
|
1993
|
+
children: [
|
|
1994
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1995
|
+
children
|
|
1996
|
+
]
|
|
1997
|
+
}
|
|
1998
|
+
));
|
|
1999
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
2000
|
+
var DropdownMenuLabel = React14.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2001
|
+
DropdownMenuPrimitive.Label,
|
|
2002
|
+
{
|
|
2003
|
+
ref,
|
|
2004
|
+
className: cn(
|
|
2005
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
2006
|
+
inset && "pl-8",
|
|
2007
|
+
className
|
|
2008
|
+
),
|
|
2009
|
+
...props
|
|
2010
|
+
}
|
|
2011
|
+
));
|
|
2012
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2013
|
+
var DropdownMenuSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2014
|
+
DropdownMenuPrimitive.Separator,
|
|
2015
|
+
{
|
|
2016
|
+
ref,
|
|
2017
|
+
className: cn("bg-muted -mx-1 my-1 h-px", className),
|
|
2018
|
+
...props
|
|
2019
|
+
}
|
|
2020
|
+
));
|
|
2021
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
2022
|
+
var DropdownMenuShortcut = ({
|
|
2023
|
+
className,
|
|
2024
|
+
...props
|
|
2025
|
+
}) => {
|
|
2026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2027
|
+
"span",
|
|
2028
|
+
{
|
|
2029
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
2030
|
+
...props
|
|
2031
|
+
}
|
|
2032
|
+
);
|
|
2033
|
+
};
|
|
2034
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
2035
|
+
|
|
2036
|
+
// src/state-panel.tsx
|
|
2037
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1784
2038
|
function StatePanel({
|
|
1785
2039
|
loading,
|
|
1786
2040
|
className,
|
|
1787
2041
|
children,
|
|
1788
2042
|
...props
|
|
1789
2043
|
}) {
|
|
1790
|
-
return /* @__PURE__ */ (0,
|
|
2044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1791
2045
|
"div",
|
|
1792
2046
|
{
|
|
1793
2047
|
role: loading ? "status" : void 0,
|
|
@@ -1799,7 +2053,7 @@ function StatePanel({
|
|
|
1799
2053
|
),
|
|
1800
2054
|
...props,
|
|
1801
2055
|
children: [
|
|
1802
|
-
loading ? /* @__PURE__ */ (0,
|
|
2056
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { size: "md" }) : null,
|
|
1803
2057
|
children
|
|
1804
2058
|
]
|
|
1805
2059
|
}
|
|
@@ -1807,7 +2061,7 @@ function StatePanel({
|
|
|
1807
2061
|
}
|
|
1808
2062
|
|
|
1809
2063
|
// src/feature-access-gate.tsx
|
|
1810
|
-
var
|
|
2064
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1811
2065
|
function FeatureAccessGate({
|
|
1812
2066
|
isLoading,
|
|
1813
2067
|
allowed,
|
|
@@ -1815,16 +2069,16 @@ function FeatureAccessGate({
|
|
|
1815
2069
|
children
|
|
1816
2070
|
}) {
|
|
1817
2071
|
if (isLoading) {
|
|
1818
|
-
return /* @__PURE__ */ (0,
|
|
2072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StatePanel, { loading: true, className: "p-6", children: "Checking permissions\u2026" });
|
|
1819
2073
|
}
|
|
1820
2074
|
if (!allowed) {
|
|
1821
|
-
return /* @__PURE__ */ (0,
|
|
2075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Alert, { children: deniedMessage });
|
|
1822
2076
|
}
|
|
1823
|
-
return /* @__PURE__ */ (0,
|
|
2077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children });
|
|
1824
2078
|
}
|
|
1825
2079
|
|
|
1826
2080
|
// src/field.tsx
|
|
1827
|
-
var
|
|
2081
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1828
2082
|
function Field({
|
|
1829
2083
|
label,
|
|
1830
2084
|
required,
|
|
@@ -1834,31 +2088,31 @@ function Field({
|
|
|
1834
2088
|
children
|
|
1835
2089
|
}) {
|
|
1836
2090
|
const Wrapper = as;
|
|
1837
|
-
const labelNode = /* @__PURE__ */ (0,
|
|
2091
|
+
const labelNode = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1838
2092
|
label,
|
|
1839
|
-
required ? /* @__PURE__ */ (0,
|
|
2093
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-destructive ml-0.5", "aria-hidden": "true", children: "*" }) : null
|
|
1840
2094
|
] });
|
|
1841
|
-
return /* @__PURE__ */ (0,
|
|
1842
|
-
htmlFor && as === "div" ? /* @__PURE__ */ (0,
|
|
2095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Wrapper, { className: cn("space-y-1 text-sm", className), children: [
|
|
2096
|
+
htmlFor && as === "div" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor, className: "text-muted-foreground", children: labelNode }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-muted-foreground", children: labelNode }),
|
|
1843
2097
|
children
|
|
1844
2098
|
] });
|
|
1845
2099
|
}
|
|
1846
2100
|
|
|
1847
2101
|
// src/image-uploader.tsx
|
|
1848
|
-
var
|
|
1849
|
-
var
|
|
2102
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2103
|
+
var React16 = __toESM(require("react"), 1);
|
|
1850
2104
|
|
|
1851
2105
|
// src/input.tsx
|
|
1852
|
-
var
|
|
1853
|
-
var
|
|
2106
|
+
var React15 = __toESM(require("react"), 1);
|
|
2107
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1854
2108
|
var inputClass = "h-9 w-full rounded-md border border-border bg-background px-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
1855
|
-
var Input =
|
|
1856
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2109
|
+
var Input = React15.forwardRef(
|
|
2110
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("input", { ref, className: cn(inputClass, className), ...props })
|
|
1857
2111
|
);
|
|
1858
2112
|
Input.displayName = "Input";
|
|
1859
2113
|
|
|
1860
2114
|
// src/image-uploader.tsx
|
|
1861
|
-
var
|
|
2115
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1862
2116
|
function ImageUploader({
|
|
1863
2117
|
value = "",
|
|
1864
2118
|
onChange,
|
|
@@ -1870,9 +2124,9 @@ function ImageUploader({
|
|
|
1870
2124
|
uploadFile,
|
|
1871
2125
|
uploadFromUrl
|
|
1872
2126
|
}) {
|
|
1873
|
-
const inputRef =
|
|
1874
|
-
const [uploading, setUploading] =
|
|
1875
|
-
const [error, setError] =
|
|
2127
|
+
const inputRef = React16.useRef(null);
|
|
2128
|
+
const [uploading, setUploading] = React16.useState(false);
|
|
2129
|
+
const [error, setError] = React16.useState(null);
|
|
1876
2130
|
const busy = Boolean(disabled || uploading);
|
|
1877
2131
|
const handleFile = async (file) => {
|
|
1878
2132
|
if (!uploadFile) {
|
|
@@ -1912,10 +2166,10 @@ function ImageUploader({
|
|
|
1912
2166
|
setUploading(false);
|
|
1913
2167
|
}
|
|
1914
2168
|
};
|
|
1915
|
-
return /* @__PURE__ */ (0,
|
|
1916
|
-
label ? /* @__PURE__ */ (0,
|
|
1917
|
-
/* @__PURE__ */ (0,
|
|
1918
|
-
/* @__PURE__ */ (0,
|
|
2169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("space-y-2", className), children: [
|
|
2170
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "text-muted-foreground text-xs font-medium", children: label }) : null,
|
|
2171
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
2172
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1919
2173
|
"input",
|
|
1920
2174
|
{
|
|
1921
2175
|
ref: inputRef,
|
|
@@ -1929,7 +2183,7 @@ function ImageUploader({
|
|
|
1929
2183
|
}
|
|
1930
2184
|
}
|
|
1931
2185
|
),
|
|
1932
|
-
/* @__PURE__ */ (0,
|
|
2186
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1933
2187
|
Button,
|
|
1934
2188
|
{
|
|
1935
2189
|
type: "button",
|
|
@@ -1938,12 +2192,12 @@ function ImageUploader({
|
|
|
1938
2192
|
disabled: busy,
|
|
1939
2193
|
onClick: () => inputRef.current?.click(),
|
|
1940
2194
|
children: [
|
|
1941
|
-
uploading ? /* @__PURE__ */ (0,
|
|
2195
|
+
uploading ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.ImagePlus, { className: "h-4 w-4" }),
|
|
1942
2196
|
uploading ? "Uploading\u2026" : "Upload"
|
|
1943
2197
|
]
|
|
1944
2198
|
}
|
|
1945
2199
|
),
|
|
1946
|
-
value ? /* @__PURE__ */ (0,
|
|
2200
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1947
2201
|
Button,
|
|
1948
2202
|
{
|
|
1949
2203
|
type: "button",
|
|
@@ -1953,13 +2207,13 @@ function ImageUploader({
|
|
|
1953
2207
|
onClick: () => onChange(""),
|
|
1954
2208
|
"aria-label": "Clear image",
|
|
1955
2209
|
children: [
|
|
1956
|
-
/* @__PURE__ */ (0,
|
|
2210
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.X, { className: "h-4 w-4" }),
|
|
1957
2211
|
"Clear"
|
|
1958
2212
|
]
|
|
1959
2213
|
}
|
|
1960
2214
|
) : null
|
|
1961
2215
|
] }),
|
|
1962
|
-
allowUrlPaste ? /* @__PURE__ */ (0,
|
|
2216
|
+
allowUrlPaste ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1963
2217
|
Input,
|
|
1964
2218
|
{
|
|
1965
2219
|
defaultValue: value,
|
|
@@ -1979,7 +2233,7 @@ function ImageUploader({
|
|
|
1979
2233
|
) : null,
|
|
1980
2234
|
value ? (
|
|
1981
2235
|
// eslint-disable-next-line @next/next/no-img-element -- CDN URLs vary
|
|
1982
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1983
2237
|
"img",
|
|
1984
2238
|
{
|
|
1985
2239
|
src: value,
|
|
@@ -1988,15 +2242,15 @@ function ImageUploader({
|
|
|
1988
2242
|
}
|
|
1989
2243
|
)
|
|
1990
2244
|
) : null,
|
|
1991
|
-
error ? /* @__PURE__ */ (0,
|
|
2245
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "text-destructive text-xs", role: "alert", children: error }) : null
|
|
1992
2246
|
] });
|
|
1993
2247
|
}
|
|
1994
2248
|
|
|
1995
2249
|
// src/label.tsx
|
|
1996
|
-
var
|
|
1997
|
-
var
|
|
1998
|
-
var
|
|
1999
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2250
|
+
var React17 = __toESM(require("react"), 1);
|
|
2251
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2252
|
+
var Label2 = React17.forwardRef(
|
|
2253
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2000
2254
|
"label",
|
|
2001
2255
|
{
|
|
2002
2256
|
ref,
|
|
@@ -2008,10 +2262,10 @@ var Label = React15.forwardRef(
|
|
|
2008
2262
|
}
|
|
2009
2263
|
)
|
|
2010
2264
|
);
|
|
2011
|
-
|
|
2265
|
+
Label2.displayName = "Label";
|
|
2012
2266
|
|
|
2013
2267
|
// src/page-header.tsx
|
|
2014
|
-
var
|
|
2268
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2015
2269
|
function PageHeader({
|
|
2016
2270
|
title,
|
|
2017
2271
|
description,
|
|
@@ -2019,9 +2273,9 @@ function PageHeader({
|
|
|
2019
2273
|
actions,
|
|
2020
2274
|
className
|
|
2021
2275
|
}) {
|
|
2022
|
-
const heading = /* @__PURE__ */ (0,
|
|
2276
|
+
const heading = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "min-w-0", children: [
|
|
2023
2277
|
eyebrow,
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2278
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2025
2279
|
"h1",
|
|
2026
2280
|
{
|
|
2027
2281
|
className: cn(
|
|
@@ -2031,12 +2285,12 @@ function PageHeader({
|
|
|
2031
2285
|
children: title
|
|
2032
2286
|
}
|
|
2033
2287
|
),
|
|
2034
|
-
description != null ? /* @__PURE__ */ (0,
|
|
2288
|
+
description != null ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-muted-foreground mt-1 text-sm", children: description }) : null
|
|
2035
2289
|
] });
|
|
2036
2290
|
if (!actions) {
|
|
2037
|
-
return /* @__PURE__ */ (0,
|
|
2291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className, children: heading });
|
|
2038
2292
|
}
|
|
2039
|
-
return /* @__PURE__ */ (0,
|
|
2293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2040
2294
|
"div",
|
|
2041
2295
|
{
|
|
2042
2296
|
className: cn(
|
|
@@ -2052,14 +2306,14 @@ function PageHeader({
|
|
|
2052
2306
|
}
|
|
2053
2307
|
|
|
2054
2308
|
// src/panel-brand-mark.tsx
|
|
2055
|
-
var
|
|
2309
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2056
2310
|
function PanelBrandMark({
|
|
2057
2311
|
children,
|
|
2058
2312
|
size = "md",
|
|
2059
2313
|
className,
|
|
2060
2314
|
...props
|
|
2061
2315
|
}) {
|
|
2062
|
-
return /* @__PURE__ */ (0,
|
|
2316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2063
2317
|
"div",
|
|
2064
2318
|
{
|
|
2065
2319
|
className: cn(
|
|
@@ -2074,8 +2328,8 @@ function PanelBrandMark({
|
|
|
2074
2328
|
}
|
|
2075
2329
|
|
|
2076
2330
|
// src/panel-sign-in.tsx
|
|
2077
|
-
var
|
|
2078
|
-
var
|
|
2331
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2332
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2079
2333
|
function PanelSignIn({
|
|
2080
2334
|
appName,
|
|
2081
2335
|
eyebrow = "Secure Google sign-in",
|
|
@@ -2093,30 +2347,30 @@ function PanelSignIn({
|
|
|
2093
2347
|
className
|
|
2094
2348
|
}) {
|
|
2095
2349
|
const busy = isSessionLoading || isSigningIn;
|
|
2096
|
-
return /* @__PURE__ */ (0,
|
|
2350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2097
2351
|
"main",
|
|
2098
2352
|
{
|
|
2099
2353
|
className: cn(
|
|
2100
2354
|
"bg-background text-foreground grid min-h-screen place-items-center p-4 sm:p-8",
|
|
2101
2355
|
className
|
|
2102
2356
|
),
|
|
2103
|
-
children: /* @__PURE__ */ (0,
|
|
2104
|
-
/* @__PURE__ */ (0,
|
|
2105
|
-
/* @__PURE__ */ (0,
|
|
2106
|
-
/* @__PURE__ */ (0,
|
|
2107
|
-
/* @__PURE__ */ (0,
|
|
2108
|
-
/* @__PURE__ */ (0,
|
|
2357
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: "border-border bg-card w-full max-w-md space-y-6 rounded-lg border p-8 shadow-sm", children: [
|
|
2358
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
2359
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PanelBrandMark, { children: brandIcon ?? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm font-semibold", "aria-hidden": true, children: appName.slice(0, 1).toUpperCase() }) }),
|
|
2360
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-0", children: [
|
|
2361
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-title truncate font-semibold", children: appName }),
|
|
2362
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground text-meta", children: eyebrow })
|
|
2109
2363
|
] })
|
|
2110
2364
|
] }),
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
2113
|
-
/* @__PURE__ */ (0,
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "space-y-2", children: [
|
|
2366
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h1", { className: "text-display font-semibold tracking-tight", children: refused ? refusedTitle : "Sign in" }),
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground text-body", children: refused ? refusedMessage : description })
|
|
2114
2368
|
] }),
|
|
2115
|
-
features && features.length > 0 && !refused ? /* @__PURE__ */ (0,
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2117
|
-
/* @__PURE__ */ (0,
|
|
2369
|
+
features && features.length > 0 && !refused ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ul", { className: "text-muted-foreground text-body space-y-1.5", children: features.slice(0, 3).map((feature) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("li", { className: "flex gap-2", children: [
|
|
2370
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-foreground mt-1.5 h-1 w-1 shrink-0 rounded-full bg-current" }),
|
|
2371
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: feature })
|
|
2118
2372
|
] }, feature)) }) : null,
|
|
2119
|
-
error ? /* @__PURE__ */ (0,
|
|
2373
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2120
2374
|
"p",
|
|
2121
2375
|
{
|
|
2122
2376
|
role: "alert",
|
|
@@ -2124,7 +2378,7 @@ function PanelSignIn({
|
|
|
2124
2378
|
children: error
|
|
2125
2379
|
}
|
|
2126
2380
|
) : null,
|
|
2127
|
-
/* @__PURE__ */ (0,
|
|
2381
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2128
2382
|
Button,
|
|
2129
2383
|
{
|
|
2130
2384
|
className: "w-full",
|
|
@@ -2132,7 +2386,7 @@ function PanelSignIn({
|
|
|
2132
2386
|
onClick: onSignIn,
|
|
2133
2387
|
"aria-busy": busy,
|
|
2134
2388
|
children: [
|
|
2135
|
-
busy ? /* @__PURE__ */ (0,
|
|
2389
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react10.Loader2, { className: "mr-2 h-4 w-4 animate-spin", "aria-hidden": true }) : null,
|
|
2136
2390
|
isSigningIn ? "Redirecting\u2026" : signInLabel
|
|
2137
2391
|
]
|
|
2138
2392
|
}
|
|
@@ -2142,26 +2396,26 @@ function PanelSignIn({
|
|
|
2142
2396
|
);
|
|
2143
2397
|
}
|
|
2144
2398
|
function PanelSignInSkeleton({ className }) {
|
|
2145
|
-
return /* @__PURE__ */ (0,
|
|
2399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2146
2400
|
"main",
|
|
2147
2401
|
{
|
|
2148
2402
|
className: cn(
|
|
2149
2403
|
"bg-background grid min-h-screen place-items-center p-4 sm:p-8",
|
|
2150
2404
|
className
|
|
2151
2405
|
),
|
|
2152
|
-
children: /* @__PURE__ */ (0,
|
|
2153
|
-
/* @__PURE__ */ (0,
|
|
2154
|
-
/* @__PURE__ */ (0,
|
|
2155
|
-
/* @__PURE__ */ (0,
|
|
2406
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "border-border bg-card w-full max-w-md space-y-4 rounded-lg border p-8 shadow-sm", children: [
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "bg-muted h-3 w-24 animate-pulse rounded" }),
|
|
2408
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "bg-muted h-8 w-48 animate-pulse rounded" }),
|
|
2409
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "bg-muted mt-7 h-10 w-full animate-pulse rounded-md" })
|
|
2156
2410
|
] })
|
|
2157
2411
|
}
|
|
2158
2412
|
);
|
|
2159
2413
|
}
|
|
2160
2414
|
|
|
2161
2415
|
// src/pagination.tsx
|
|
2162
|
-
var
|
|
2163
|
-
var
|
|
2164
|
-
var
|
|
2416
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2417
|
+
var React18 = __toESM(require("react"), 1);
|
|
2418
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2165
2419
|
function Pagination({
|
|
2166
2420
|
currentPage,
|
|
2167
2421
|
totalPages,
|
|
@@ -2169,7 +2423,7 @@ function Pagination({
|
|
|
2169
2423
|
loading = false,
|
|
2170
2424
|
showPageInfo = true
|
|
2171
2425
|
}) {
|
|
2172
|
-
const visiblePages =
|
|
2426
|
+
const visiblePages = React18.useMemo(() => {
|
|
2173
2427
|
const delta = 2;
|
|
2174
2428
|
const range = [];
|
|
2175
2429
|
const rangeWithDots = [];
|
|
@@ -2190,15 +2444,15 @@ function Pagination({
|
|
|
2190
2444
|
return rangeWithDots;
|
|
2191
2445
|
}, [currentPage, totalPages]);
|
|
2192
2446
|
if (totalPages <= 1) return null;
|
|
2193
|
-
return /* @__PURE__ */ (0,
|
|
2194
|
-
showPageInfo ? /* @__PURE__ */ (0,
|
|
2447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col items-center justify-between gap-4 sm:flex-row", children: [
|
|
2448
|
+
showPageInfo ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "text-muted-foreground order-2 text-sm sm:order-1", children: [
|
|
2195
2449
|
"Page ",
|
|
2196
2450
|
currentPage,
|
|
2197
2451
|
" of ",
|
|
2198
2452
|
totalPages
|
|
2199
2453
|
] }) : null,
|
|
2200
|
-
/* @__PURE__ */ (0,
|
|
2201
|
-
/* @__PURE__ */ (0,
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "order-1 flex items-center space-x-1 sm:order-2 sm:space-x-2", children: [
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2202
2456
|
Button,
|
|
2203
2457
|
{
|
|
2204
2458
|
variant: "outline",
|
|
@@ -2207,18 +2461,18 @@ function Pagination({
|
|
|
2207
2461
|
disabled: currentPage <= 1 || loading,
|
|
2208
2462
|
className: "h-8 min-w-8 px-2",
|
|
2209
2463
|
"aria-label": "Previous page",
|
|
2210
|
-
children: /* @__PURE__ */ (0,
|
|
2464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react11.ChevronLeft, { className: "h-4 w-4" })
|
|
2211
2465
|
}
|
|
2212
2466
|
),
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2214
|
-
(page, index) => page === "..." ? /* @__PURE__ */ (0,
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex max-w-[200px] items-center space-x-1 overflow-x-auto sm:max-w-none", children: visiblePages.map(
|
|
2468
|
+
(page, index) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2215
2469
|
"div",
|
|
2216
2470
|
{
|
|
2217
2471
|
className: "flex h-8 w-8 shrink-0 items-center justify-center",
|
|
2218
|
-
children: /* @__PURE__ */ (0,
|
|
2472
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react11.MoreHorizontal, { className: "h-4 w-4" })
|
|
2219
2473
|
},
|
|
2220
2474
|
`dots-${index}`
|
|
2221
|
-
) : /* @__PURE__ */ (0,
|
|
2475
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2222
2476
|
Button,
|
|
2223
2477
|
{
|
|
2224
2478
|
variant: page === currentPage ? "default" : "outline",
|
|
@@ -2232,7 +2486,7 @@ function Pagination({
|
|
|
2232
2486
|
page
|
|
2233
2487
|
)
|
|
2234
2488
|
) }),
|
|
2235
|
-
/* @__PURE__ */ (0,
|
|
2489
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2236
2490
|
Button,
|
|
2237
2491
|
{
|
|
2238
2492
|
variant: "outline",
|
|
@@ -2241,7 +2495,7 @@ function Pagination({
|
|
|
2241
2495
|
disabled: currentPage >= totalPages || loading,
|
|
2242
2496
|
className: "h-8 min-w-8 px-2",
|
|
2243
2497
|
"aria-label": "Next page",
|
|
2244
|
-
children: /* @__PURE__ */ (0,
|
|
2498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react11.ChevronRight, { className: "h-4 w-4" })
|
|
2245
2499
|
}
|
|
2246
2500
|
)
|
|
2247
2501
|
] })
|
|
@@ -2249,8 +2503,8 @@ function Pagination({
|
|
|
2249
2503
|
}
|
|
2250
2504
|
|
|
2251
2505
|
// src/segmented-control.tsx
|
|
2252
|
-
var
|
|
2253
|
-
var
|
|
2506
|
+
var React19 = __toESM(require("react"), 1);
|
|
2507
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2254
2508
|
var TONE_ON = "bg-primary text-primary-foreground";
|
|
2255
2509
|
var TONE_OFF = "text-muted-foreground hover:bg-muted";
|
|
2256
2510
|
var TONES = {
|
|
@@ -2271,7 +2525,7 @@ function SegmentedControl({
|
|
|
2271
2525
|
fill = false,
|
|
2272
2526
|
className
|
|
2273
2527
|
}) {
|
|
2274
|
-
const refs =
|
|
2528
|
+
const refs = React19.useRef(/* @__PURE__ */ new Map());
|
|
2275
2529
|
function onKeyDown(event) {
|
|
2276
2530
|
const step = event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : event.key === "ArrowLeft" || event.key === "ArrowUp" ? -1 : 0;
|
|
2277
2531
|
if (step === 0) return;
|
|
@@ -2283,7 +2537,7 @@ function SegmentedControl({
|
|
|
2283
2537
|
onChange(next.value);
|
|
2284
2538
|
refs.current.get(next.value)?.focus();
|
|
2285
2539
|
}
|
|
2286
|
-
return /* @__PURE__ */ (0,
|
|
2540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2287
2541
|
"div",
|
|
2288
2542
|
{
|
|
2289
2543
|
role: "radiogroup",
|
|
@@ -2292,7 +2546,7 @@ function SegmentedControl({
|
|
|
2292
2546
|
className: cn(TRACKS[variant], className),
|
|
2293
2547
|
children: options.map((option) => {
|
|
2294
2548
|
const checked = option.value === value;
|
|
2295
|
-
return /* @__PURE__ */ (0,
|
|
2549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2296
2550
|
"button",
|
|
2297
2551
|
{
|
|
2298
2552
|
ref: (node) => {
|
|
@@ -2322,22 +2576,22 @@ function SegmentedControl({
|
|
|
2322
2576
|
}
|
|
2323
2577
|
|
|
2324
2578
|
// src/select.tsx
|
|
2325
|
-
var
|
|
2326
|
-
var
|
|
2579
|
+
var React20 = __toESM(require("react"), 1);
|
|
2580
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2327
2581
|
function optionText(node) {
|
|
2328
2582
|
if (node == null || typeof node === "boolean") return "";
|
|
2329
2583
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
2330
2584
|
if (Array.isArray(node)) return node.map(optionText).join("");
|
|
2331
|
-
if (
|
|
2585
|
+
if (React20.isValidElement(node)) {
|
|
2332
2586
|
return optionText(node.props.children);
|
|
2333
2587
|
}
|
|
2334
2588
|
return "";
|
|
2335
2589
|
}
|
|
2336
2590
|
function optionsFromChildren(children) {
|
|
2337
2591
|
const options = [];
|
|
2338
|
-
|
|
2339
|
-
if (!
|
|
2340
|
-
if (child.type ===
|
|
2592
|
+
React20.Children.forEach(children, (child) => {
|
|
2593
|
+
if (!React20.isValidElement(child)) return;
|
|
2594
|
+
if (child.type === React20.Fragment) {
|
|
2341
2595
|
options.push(
|
|
2342
2596
|
...optionsFromChildren(
|
|
2343
2597
|
child.props.children
|
|
@@ -2369,7 +2623,7 @@ function Select({
|
|
|
2369
2623
|
const options = optionsFromChildren(children);
|
|
2370
2624
|
const current = Array.isArray(value) ? String(value[0] ?? "") : value == null ? "" : String(value);
|
|
2371
2625
|
const blank = options.find((option) => option.value === "");
|
|
2372
|
-
return /* @__PURE__ */ (0,
|
|
2626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2373
2627
|
Autocomplete,
|
|
2374
2628
|
{
|
|
2375
2629
|
id,
|
|
@@ -2390,10 +2644,10 @@ function Select({
|
|
|
2390
2644
|
}
|
|
2391
2645
|
|
|
2392
2646
|
// src/separator.tsx
|
|
2393
|
-
var
|
|
2394
|
-
var
|
|
2395
|
-
var
|
|
2396
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2647
|
+
var React21 = __toESM(require("react"), 1);
|
|
2648
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2649
|
+
var Separator2 = React21.forwardRef(
|
|
2650
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2397
2651
|
"div",
|
|
2398
2652
|
{
|
|
2399
2653
|
ref,
|
|
@@ -2408,13 +2662,13 @@ var Separator = React19.forwardRef(
|
|
|
2408
2662
|
}
|
|
2409
2663
|
)
|
|
2410
2664
|
);
|
|
2411
|
-
|
|
2665
|
+
Separator2.displayName = "Separator";
|
|
2412
2666
|
|
|
2413
2667
|
// src/side-drawer.tsx
|
|
2414
|
-
var
|
|
2415
|
-
var
|
|
2668
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2669
|
+
var React22 = __toESM(require("react"), 1);
|
|
2416
2670
|
var import_react_dom3 = require("react-dom");
|
|
2417
|
-
var
|
|
2671
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2418
2672
|
function SideDrawer({
|
|
2419
2673
|
isOpen,
|
|
2420
2674
|
title,
|
|
@@ -2423,8 +2677,8 @@ function SideDrawer({
|
|
|
2423
2677
|
panelClassName
|
|
2424
2678
|
}) {
|
|
2425
2679
|
const mounted = useHasMounted();
|
|
2426
|
-
const headingId =
|
|
2427
|
-
const panelRef =
|
|
2680
|
+
const headingId = React22.useId();
|
|
2681
|
+
const panelRef = React22.useRef(null);
|
|
2428
2682
|
useDialogLayer({
|
|
2429
2683
|
// Gated on `mounted` too: before that the panel is not rendered, so there
|
|
2430
2684
|
// would be nothing to move focus into.
|
|
@@ -2434,8 +2688,8 @@ function SideDrawer({
|
|
|
2434
2688
|
});
|
|
2435
2689
|
if (!mounted || !isOpen) return null;
|
|
2436
2690
|
return (0, import_react_dom3.createPortal)(
|
|
2437
|
-
/* @__PURE__ */ (0,
|
|
2438
|
-
/* @__PURE__ */ (0,
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
2692
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2439
2693
|
"div",
|
|
2440
2694
|
{
|
|
2441
2695
|
"aria-hidden": true,
|
|
@@ -2443,7 +2697,7 @@ function SideDrawer({
|
|
|
2443
2697
|
className: "fixed inset-0 z-[90] bg-overlay/30"
|
|
2444
2698
|
}
|
|
2445
2699
|
),
|
|
2446
|
-
/* @__PURE__ */ (0,
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2447
2701
|
"aside",
|
|
2448
2702
|
{
|
|
2449
2703
|
ref: panelRef,
|
|
@@ -2456,20 +2710,20 @@ function SideDrawer({
|
|
|
2456
2710
|
panelClassName ?? "w-full max-w-md"
|
|
2457
2711
|
),
|
|
2458
2712
|
children: [
|
|
2459
|
-
/* @__PURE__ */ (0,
|
|
2460
|
-
/* @__PURE__ */ (0,
|
|
2461
|
-
/* @__PURE__ */ (0,
|
|
2713
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "border-border flex items-center justify-between gap-3 border-b px-4 py-3", children: [
|
|
2714
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h2", { id: headingId, className: "truncate text-base font-semibold", children: title }),
|
|
2715
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2462
2716
|
Button,
|
|
2463
2717
|
{
|
|
2464
2718
|
variant: "ghost",
|
|
2465
2719
|
size: "icon",
|
|
2466
2720
|
"aria-label": "Close panel",
|
|
2467
2721
|
onClick: onClose,
|
|
2468
|
-
children: /* @__PURE__ */ (0,
|
|
2722
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react12.X, { className: "h-4 w-4", "aria-hidden": true })
|
|
2469
2723
|
}
|
|
2470
2724
|
)
|
|
2471
2725
|
] }),
|
|
2472
|
-
/* @__PURE__ */ (0,
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto p-4", children })
|
|
2473
2727
|
]
|
|
2474
2728
|
}
|
|
2475
2729
|
)
|
|
@@ -2479,8 +2733,8 @@ function SideDrawer({
|
|
|
2479
2733
|
}
|
|
2480
2734
|
|
|
2481
2735
|
// src/spreadsheet-grid.tsx
|
|
2482
|
-
var
|
|
2483
|
-
var
|
|
2736
|
+
var React23 = __toESM(require("react"), 1);
|
|
2737
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2484
2738
|
function isInRange(range, r, c) {
|
|
2485
2739
|
if (!range) return false;
|
|
2486
2740
|
return r >= range.r1 && r <= range.r2 && c >= range.c1 && c <= range.c2;
|
|
@@ -2497,11 +2751,11 @@ function SpreadsheetGrid({
|
|
|
2497
2751
|
onRangeChange,
|
|
2498
2752
|
onCopy
|
|
2499
2753
|
}) {
|
|
2500
|
-
const gridRef =
|
|
2501
|
-
const anchorRef =
|
|
2502
|
-
const focusRef =
|
|
2503
|
-
const [dragging, setDragging] =
|
|
2504
|
-
const setSelection =
|
|
2754
|
+
const gridRef = React23.useRef(null);
|
|
2755
|
+
const anchorRef = React23.useRef(null);
|
|
2756
|
+
const focusRef = React23.useRef(null);
|
|
2757
|
+
const [dragging, setDragging] = React23.useState(false);
|
|
2758
|
+
const setSelection = React23.useCallback(
|
|
2505
2759
|
(anchor, focus) => {
|
|
2506
2760
|
anchorRef.current = anchor;
|
|
2507
2761
|
focusRef.current = focus;
|
|
@@ -2509,7 +2763,7 @@ function SpreadsheetGrid({
|
|
|
2509
2763
|
},
|
|
2510
2764
|
[onRangeChange]
|
|
2511
2765
|
);
|
|
2512
|
-
const selectCell =
|
|
2766
|
+
const selectCell = React23.useCallback(
|
|
2513
2767
|
(r, c, extend) => {
|
|
2514
2768
|
if (extend && anchorRef.current)
|
|
2515
2769
|
setSelection(anchorRef.current, { r, c });
|
|
@@ -2517,7 +2771,7 @@ function SpreadsheetGrid({
|
|
|
2517
2771
|
},
|
|
2518
2772
|
[setSelection]
|
|
2519
2773
|
);
|
|
2520
|
-
const selectColumn =
|
|
2774
|
+
const selectColumn = React23.useCallback(
|
|
2521
2775
|
(c, extend) => {
|
|
2522
2776
|
const lastRow = Math.max(rows.length - 1, 0);
|
|
2523
2777
|
const anchorCol = extend && anchorRef.current ? anchorRef.current.c : c;
|
|
@@ -2525,7 +2779,7 @@ function SpreadsheetGrid({
|
|
|
2525
2779
|
},
|
|
2526
2780
|
[rows.length, setSelection]
|
|
2527
2781
|
);
|
|
2528
|
-
const selectRow =
|
|
2782
|
+
const selectRow = React23.useCallback(
|
|
2529
2783
|
(r, extend) => {
|
|
2530
2784
|
const lastCol = columns.length - 1;
|
|
2531
2785
|
const anchorRow = extend && anchorRef.current ? anchorRef.current.r : r;
|
|
@@ -2533,15 +2787,15 @@ function SpreadsheetGrid({
|
|
|
2533
2787
|
},
|
|
2534
2788
|
[columns.length, setSelection]
|
|
2535
2789
|
);
|
|
2536
|
-
const selectAll =
|
|
2790
|
+
const selectAll = React23.useCallback(() => {
|
|
2537
2791
|
if (!rows.length || !columns.length) return;
|
|
2538
2792
|
setSelection({ r: 0, c: 0 }, { r: rows.length - 1, c: columns.length - 1 });
|
|
2539
2793
|
}, [rows.length, columns.length, setSelection]);
|
|
2540
|
-
const scrollCellIntoView =
|
|
2794
|
+
const scrollCellIntoView = React23.useCallback((r, c) => {
|
|
2541
2795
|
const cell = gridRef.current?.querySelector(`[data-cell="${r}-${c}"]`);
|
|
2542
2796
|
cell?.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
2543
2797
|
}, []);
|
|
2544
|
-
const moveFocus =
|
|
2798
|
+
const moveFocus = React23.useCallback(
|
|
2545
2799
|
(dr, dc, extend) => {
|
|
2546
2800
|
if (!rows.length || !columns.length) return;
|
|
2547
2801
|
const base = focusRef.current || { r: 0, c: 0 };
|
|
@@ -2552,7 +2806,7 @@ function SpreadsheetGrid({
|
|
|
2552
2806
|
},
|
|
2553
2807
|
[rows.length, columns.length, selectCell, scrollCellIntoView]
|
|
2554
2808
|
);
|
|
2555
|
-
|
|
2809
|
+
React23.useEffect(() => {
|
|
2556
2810
|
if (!dragging) return;
|
|
2557
2811
|
const stop = () => setDragging(false);
|
|
2558
2812
|
window.addEventListener("mouseup", stop);
|
|
@@ -2595,7 +2849,7 @@ function SpreadsheetGrid({
|
|
|
2595
2849
|
break;
|
|
2596
2850
|
}
|
|
2597
2851
|
};
|
|
2598
|
-
return /* @__PURE__ */ (0,
|
|
2852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2599
2853
|
"div",
|
|
2600
2854
|
{
|
|
2601
2855
|
ref: gridRef,
|
|
@@ -2604,9 +2858,9 @@ function SpreadsheetGrid({
|
|
|
2604
2858
|
"aria-label": ariaLabel,
|
|
2605
2859
|
onKeyDown: handleKeyDown,
|
|
2606
2860
|
className: "border-border bg-background/80 overflow-x-auto rounded-lg border outline-none",
|
|
2607
|
-
children: /* @__PURE__ */ (0,
|
|
2608
|
-
/* @__PURE__ */ (0,
|
|
2609
|
-
/* @__PURE__ */ (0,
|
|
2861
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("table", { className: "w-full text-sm whitespace-nowrap select-none", children: [
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("thead", { className: "text-muted-foreground border-border border-b text-left", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("tr", { children: [
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2610
2864
|
"th",
|
|
2611
2865
|
{
|
|
2612
2866
|
scope: "col",
|
|
@@ -2616,7 +2870,7 @@ function SpreadsheetGrid({
|
|
|
2616
2870
|
children: "#"
|
|
2617
2871
|
}
|
|
2618
2872
|
),
|
|
2619
|
-
columns.map((column, c) => /* @__PURE__ */ (0,
|
|
2873
|
+
columns.map((column, c) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2620
2874
|
"th",
|
|
2621
2875
|
{
|
|
2622
2876
|
scope: "col",
|
|
@@ -2628,19 +2882,19 @@ function SpreadsheetGrid({
|
|
|
2628
2882
|
column.key
|
|
2629
2883
|
))
|
|
2630
2884
|
] }) }),
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("tbody", { children: rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2632
2886
|
"td",
|
|
2633
2887
|
{
|
|
2634
2888
|
colSpan: columns.length + 1,
|
|
2635
2889
|
className: "text-muted-foreground px-3 py-6 text-center",
|
|
2636
2890
|
children: loading ? loadingMessage : emptyMessage
|
|
2637
2891
|
}
|
|
2638
|
-
) }) : rows.map((row, r) => /* @__PURE__ */ (0,
|
|
2892
|
+
) }) : rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2639
2893
|
"tr",
|
|
2640
2894
|
{
|
|
2641
2895
|
className: "border-border border-b",
|
|
2642
2896
|
children: [
|
|
2643
|
-
/* @__PURE__ */ (0,
|
|
2897
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2644
2898
|
"td",
|
|
2645
2899
|
{
|
|
2646
2900
|
className: "text-muted-foreground w-10 cursor-pointer px-2 py-2 text-center text-xs",
|
|
@@ -2649,7 +2903,7 @@ function SpreadsheetGrid({
|
|
|
2649
2903
|
children: r + 1
|
|
2650
2904
|
}
|
|
2651
2905
|
),
|
|
2652
|
-
columns.map((column, c) => /* @__PURE__ */ (0,
|
|
2906
|
+
columns.map((column, c) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2653
2907
|
"td",
|
|
2654
2908
|
{
|
|
2655
2909
|
"data-cell": `${r}-${c}`,
|
|
@@ -2677,10 +2931,10 @@ function SpreadsheetGrid({
|
|
|
2677
2931
|
}
|
|
2678
2932
|
|
|
2679
2933
|
// src/switch.tsx
|
|
2680
|
-
var
|
|
2681
|
-
var
|
|
2682
|
-
var Switch =
|
|
2683
|
-
({ checked, onCheckedChange, className, disabled, id, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2934
|
+
var React24 = __toESM(require("react"), 1);
|
|
2935
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2936
|
+
var Switch = React24.forwardRef(
|
|
2937
|
+
({ checked, onCheckedChange, className, disabled, id, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2684
2938
|
"button",
|
|
2685
2939
|
{
|
|
2686
2940
|
ref,
|
|
@@ -2699,7 +2953,7 @@ var Switch = React22.forwardRef(
|
|
|
2699
2953
|
className
|
|
2700
2954
|
),
|
|
2701
2955
|
...props,
|
|
2702
|
-
children: /* @__PURE__ */ (0,
|
|
2956
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2703
2957
|
"span",
|
|
2704
2958
|
{
|
|
2705
2959
|
"aria-hidden": true,
|
|
@@ -2715,9 +2969,9 @@ var Switch = React22.forwardRef(
|
|
|
2715
2969
|
Switch.displayName = "Switch";
|
|
2716
2970
|
|
|
2717
2971
|
// src/table.tsx
|
|
2718
|
-
var
|
|
2719
|
-
var
|
|
2720
|
-
var Table =
|
|
2972
|
+
var React25 = __toESM(require("react"), 1);
|
|
2973
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2974
|
+
var Table = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2721
2975
|
"table",
|
|
2722
2976
|
{
|
|
2723
2977
|
ref,
|
|
@@ -2726,9 +2980,9 @@ var Table = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2726
2980
|
}
|
|
2727
2981
|
) }));
|
|
2728
2982
|
Table.displayName = "Table";
|
|
2729
|
-
var TableHeader =
|
|
2983
|
+
var TableHeader = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2730
2984
|
TableHeader.displayName = "TableHeader";
|
|
2731
|
-
var TableBody =
|
|
2985
|
+
var TableBody = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2732
2986
|
"tbody",
|
|
2733
2987
|
{
|
|
2734
2988
|
ref,
|
|
@@ -2737,7 +2991,7 @@ var TableBody = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2737
2991
|
}
|
|
2738
2992
|
));
|
|
2739
2993
|
TableBody.displayName = "TableBody";
|
|
2740
|
-
var TableFooter =
|
|
2994
|
+
var TableFooter = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2741
2995
|
"tfoot",
|
|
2742
2996
|
{
|
|
2743
2997
|
ref,
|
|
@@ -2749,7 +3003,7 @@ var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2749
3003
|
}
|
|
2750
3004
|
));
|
|
2751
3005
|
TableFooter.displayName = "TableFooter";
|
|
2752
|
-
var TableRow =
|
|
3006
|
+
var TableRow = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2753
3007
|
"tr",
|
|
2754
3008
|
{
|
|
2755
3009
|
ref,
|
|
@@ -2761,7 +3015,7 @@ var TableRow = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2761
3015
|
}
|
|
2762
3016
|
));
|
|
2763
3017
|
TableRow.displayName = "TableRow";
|
|
2764
|
-
var TableHead =
|
|
3018
|
+
var TableHead = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2765
3019
|
"th",
|
|
2766
3020
|
{
|
|
2767
3021
|
ref,
|
|
@@ -2773,7 +3027,7 @@ var TableHead = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2773
3027
|
}
|
|
2774
3028
|
));
|
|
2775
3029
|
TableHead.displayName = "TableHead";
|
|
2776
|
-
var TableCell =
|
|
3030
|
+
var TableCell = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2777
3031
|
"td",
|
|
2778
3032
|
{
|
|
2779
3033
|
ref,
|
|
@@ -2782,7 +3036,7 @@ var TableCell = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2782
3036
|
}
|
|
2783
3037
|
));
|
|
2784
3038
|
TableCell.displayName = "TableCell";
|
|
2785
|
-
var TableCaption =
|
|
3039
|
+
var TableCaption = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2786
3040
|
"caption",
|
|
2787
3041
|
{
|
|
2788
3042
|
ref,
|
|
@@ -2793,8 +3047,8 @@ var TableCaption = React23.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2793
3047
|
TableCaption.displayName = "TableCaption";
|
|
2794
3048
|
|
|
2795
3049
|
// src/tabs.tsx
|
|
2796
|
-
var
|
|
2797
|
-
var
|
|
3050
|
+
var React26 = __toESM(require("react"), 1);
|
|
3051
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2798
3052
|
function TabPanel({
|
|
2799
3053
|
id,
|
|
2800
3054
|
labelledBy,
|
|
@@ -2802,7 +3056,7 @@ function TabPanel({
|
|
|
2802
3056
|
children,
|
|
2803
3057
|
className
|
|
2804
3058
|
}) {
|
|
2805
|
-
return /* @__PURE__ */ (0,
|
|
3059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2806
3060
|
"div",
|
|
2807
3061
|
{
|
|
2808
3062
|
role: "tabpanel",
|
|
@@ -2821,8 +3075,8 @@ function Tabs({
|
|
|
2821
3075
|
ariaLabel,
|
|
2822
3076
|
className
|
|
2823
3077
|
}) {
|
|
2824
|
-
const refs =
|
|
2825
|
-
const reactId =
|
|
3078
|
+
const refs = React26.useRef(/* @__PURE__ */ new Map());
|
|
3079
|
+
const reactId = React26.useId();
|
|
2826
3080
|
const hasInlinePanels = tabs.some((tab) => tab.panel != null);
|
|
2827
3081
|
function tabDomId(key) {
|
|
2828
3082
|
return `${reactId}-tab-${key}`;
|
|
@@ -2844,7 +3098,7 @@ function Tabs({
|
|
|
2844
3098
|
event.preventDefault();
|
|
2845
3099
|
focusTab(next.key);
|
|
2846
3100
|
}
|
|
2847
|
-
const tablist = /* @__PURE__ */ (0,
|
|
3101
|
+
const tablist = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2848
3102
|
"div",
|
|
2849
3103
|
{
|
|
2850
3104
|
role: "tablist",
|
|
@@ -2858,7 +3112,7 @@ function Tabs({
|
|
|
2858
3112
|
const active = tab.key === value;
|
|
2859
3113
|
const id = tabDomId(tab.key);
|
|
2860
3114
|
const controls = tab.panel != null || tab.panelId ? panelDomId(tab) : void 0;
|
|
2861
|
-
return /* @__PURE__ */ (0,
|
|
3115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2862
3116
|
"button",
|
|
2863
3117
|
{
|
|
2864
3118
|
id,
|
|
@@ -2883,7 +3137,7 @@ function Tabs({
|
|
|
2883
3137
|
),
|
|
2884
3138
|
children: [
|
|
2885
3139
|
tab.label,
|
|
2886
|
-
tab.badge != null ? /* @__PURE__ */ (0,
|
|
3140
|
+
tab.badge != null ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-muted-foreground ml-1.5 text-xs", children: tab.badge }) : null
|
|
2887
3141
|
]
|
|
2888
3142
|
},
|
|
2889
3143
|
tab.key
|
|
@@ -2892,10 +3146,10 @@ function Tabs({
|
|
|
2892
3146
|
}
|
|
2893
3147
|
);
|
|
2894
3148
|
if (!hasInlinePanels) return tablist;
|
|
2895
|
-
return /* @__PURE__ */ (0,
|
|
3149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn("space-y-3", className), children: [
|
|
2896
3150
|
tablist,
|
|
2897
3151
|
tabs.map(
|
|
2898
|
-
(tab) => tab.panel != null ? /* @__PURE__ */ (0,
|
|
3152
|
+
(tab) => tab.panel != null ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2899
3153
|
TabPanel,
|
|
2900
3154
|
{
|
|
2901
3155
|
id: panelDomId(tab),
|
|
@@ -2910,11 +3164,11 @@ function Tabs({
|
|
|
2910
3164
|
}
|
|
2911
3165
|
|
|
2912
3166
|
// src/textarea.tsx
|
|
2913
|
-
var
|
|
2914
|
-
var
|
|
3167
|
+
var React27 = __toESM(require("react"), 1);
|
|
3168
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2915
3169
|
var textareaClass = "border-border bg-background focus-visible:ring-ring w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50";
|
|
2916
|
-
var Textarea =
|
|
2917
|
-
({ className, rows = 3, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3170
|
+
var Textarea = React27.forwardRef(
|
|
3171
|
+
({ className, rows = 3, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2918
3172
|
"textarea",
|
|
2919
3173
|
{
|
|
2920
3174
|
ref,
|
|
@@ -2945,6 +3199,31 @@ Textarea.displayName = "Textarea";
|
|
|
2945
3199
|
CopyButton,
|
|
2946
3200
|
DataTable,
|
|
2947
3201
|
DateRangePicker,
|
|
3202
|
+
Dialog,
|
|
3203
|
+
DialogClose,
|
|
3204
|
+
DialogContent,
|
|
3205
|
+
DialogDescription,
|
|
3206
|
+
DialogFooter,
|
|
3207
|
+
DialogHeader,
|
|
3208
|
+
DialogOverlay,
|
|
3209
|
+
DialogPortal,
|
|
3210
|
+
DialogTitle,
|
|
3211
|
+
DialogTrigger,
|
|
3212
|
+
DropdownMenu,
|
|
3213
|
+
DropdownMenuCheckboxItem,
|
|
3214
|
+
DropdownMenuContent,
|
|
3215
|
+
DropdownMenuGroup,
|
|
3216
|
+
DropdownMenuItem,
|
|
3217
|
+
DropdownMenuLabel,
|
|
3218
|
+
DropdownMenuPortal,
|
|
3219
|
+
DropdownMenuRadioGroup,
|
|
3220
|
+
DropdownMenuRadioItem,
|
|
3221
|
+
DropdownMenuSeparator,
|
|
3222
|
+
DropdownMenuShortcut,
|
|
3223
|
+
DropdownMenuSub,
|
|
3224
|
+
DropdownMenuSubContent,
|
|
3225
|
+
DropdownMenuSubTrigger,
|
|
3226
|
+
DropdownMenuTrigger,
|
|
2948
3227
|
FeatureAccessGate,
|
|
2949
3228
|
Field,
|
|
2950
3229
|
ImageUploader,
|