adminium 1.0.2 → 1.0.3

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.cjs CHANGED
@@ -10,12 +10,20 @@ var jsxRuntime = require('react/jsx-runtime');
10
10
  var radixUi = require('radix-ui');
11
11
  var vaul = require('vaul');
12
12
  var HoverCardPrimitive = require('@radix-ui/react-hover-card');
13
- var React = require('react');
13
+ var cmdk = require('cmdk');
14
+ var React4 = require('react');
14
15
  var react = require('motion/react');
16
+ var RechartsPrimitive = require('recharts');
15
17
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
16
18
  var reactTable = require('@tanstack/react-table');
17
19
  var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
20
+ var core = require('@dnd-kit/core');
21
+ var sortable = require('@dnd-kit/sortable');
22
+ var utilities = require('@dnd-kit/utilities');
23
+ var reactDayPicker = require('react-day-picker');
24
+ var reactAriaComponents = require('react-aria-components');
18
25
  var SeparatorPrimitive = require('@radix-ui/react-separator');
26
+ var inputOtp = require('input-otp');
19
27
 
20
28
  function _interopNamespace(e) {
21
29
  if (e && e.__esModule) return e;
@@ -37,7 +45,8 @@ function _interopNamespace(e) {
37
45
 
38
46
  var SlotPrimitive2__namespace = /*#__PURE__*/_interopNamespace(SlotPrimitive2);
39
47
  var HoverCardPrimitive__namespace = /*#__PURE__*/_interopNamespace(HoverCardPrimitive);
40
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
48
+ var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
49
+ var RechartsPrimitive__namespace = /*#__PURE__*/_interopNamespace(RechartsPrimitive);
41
50
  var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
42
51
  var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
43
52
  var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
@@ -1223,6 +1232,156 @@ function SheetDescription({ className, ...props }) {
1223
1232
  }
1224
1233
  );
1225
1234
  }
1235
+ function Command({
1236
+ className,
1237
+ ...props
1238
+ }) {
1239
+ return /* @__PURE__ */ jsxRuntime.jsx(
1240
+ cmdk.Command,
1241
+ {
1242
+ "data-slot": "command",
1243
+ className: cn(
1244
+ "flex size-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
1245
+ className
1246
+ ),
1247
+ ...props
1248
+ }
1249
+ );
1250
+ }
1251
+ function CommandDialog({ children, className, ...props }) {
1252
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: cn("overflow-hidden p-0 shadow-lg", className), children: [
1253
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "hidden" }),
1254
+ /* @__PURE__ */ jsxRuntime.jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5", children })
1255
+ ] }) });
1256
+ }
1257
+ function CommandInput({
1258
+ className,
1259
+ ...props
1260
+ }) {
1261
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1262
+ "div",
1263
+ {
1264
+ className: "flex items-center border-b border-border px-3",
1265
+ "cmdk-input-wrapper": "",
1266
+ "data-slot": "command-input-wrapper",
1267
+ children: [
1268
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "me-2 size-4 shrink-0 opacity-50" }),
1269
+ /* @__PURE__ */ jsxRuntime.jsx(
1270
+ cmdk.Command.Input,
1271
+ {
1272
+ "data-slot": "command-input",
1273
+ className: cn(
1274
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden text-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
1275
+ className
1276
+ ),
1277
+ ...props
1278
+ }
1279
+ )
1280
+ ]
1281
+ }
1282
+ );
1283
+ }
1284
+ function CommandList({
1285
+ className,
1286
+ ...props
1287
+ }) {
1288
+ return /* @__PURE__ */ jsxRuntime.jsx(
1289
+ cmdk.Command.List,
1290
+ {
1291
+ "data-slot": "command-list",
1292
+ className: cn("max-h-75 overflow-y-auto overflow-x-hidden", className),
1293
+ ...props
1294
+ }
1295
+ );
1296
+ }
1297
+ function CommandEmpty({
1298
+ ...props
1299
+ }) {
1300
+ return /* @__PURE__ */ jsxRuntime.jsx(
1301
+ cmdk.Command.Empty,
1302
+ {
1303
+ "data-slot": "command-empty",
1304
+ className: "py-6 text-center text-sm",
1305
+ ...props
1306
+ }
1307
+ );
1308
+ }
1309
+ function CommandGroup({
1310
+ className,
1311
+ ...props
1312
+ }) {
1313
+ return /* @__PURE__ */ jsxRuntime.jsx(
1314
+ cmdk.Command.Group,
1315
+ {
1316
+ "data-slot": "command-group",
1317
+ className: cn(
1318
+ "overflow-hidden p-1.5 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
1319
+ className
1320
+ ),
1321
+ ...props
1322
+ }
1323
+ );
1324
+ }
1325
+ function CommandSeparator({
1326
+ className,
1327
+ ...props
1328
+ }) {
1329
+ return /* @__PURE__ */ jsxRuntime.jsx(
1330
+ cmdk.Command.Separator,
1331
+ {
1332
+ "data-slot": "command-separator",
1333
+ className: cn("-mx-1.5 h-px bg-border", className),
1334
+ ...props
1335
+ }
1336
+ );
1337
+ }
1338
+ function CommandItem({
1339
+ className,
1340
+ ...props
1341
+ }) {
1342
+ return /* @__PURE__ */ jsxRuntime.jsx(
1343
+ cmdk.Command.Item,
1344
+ {
1345
+ "data-slot": "command-item",
1346
+ className: cn(
1347
+ "relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm text-foreground outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1348
+ className
1349
+ ),
1350
+ ...props
1351
+ }
1352
+ );
1353
+ }
1354
+ function CommandShortcut({
1355
+ className,
1356
+ ...props
1357
+ }) {
1358
+ return /* @__PURE__ */ jsxRuntime.jsx(
1359
+ "span",
1360
+ {
1361
+ "data-slot": "command-shortcut",
1362
+ className: cn(
1363
+ "ms-auto text-xs tracking-widest text-muted-foreground",
1364
+ className
1365
+ ),
1366
+ ...props
1367
+ }
1368
+ );
1369
+ }
1370
+ function CommandCheck({
1371
+ icon: Icon = lucideReact.Check,
1372
+ className,
1373
+ ...props
1374
+ }) {
1375
+ return /* @__PURE__ */ jsxRuntime.jsx(
1376
+ Icon,
1377
+ {
1378
+ "data-slot": "command-check",
1379
+ "data-check": "true",
1380
+ className: cn("ms-auto size-4 text-primary", className),
1381
+ ...props
1382
+ }
1383
+ );
1384
+ }
1226
1385
  var avatarStatusVariants = classVarianceAuthority.cva(
1227
1386
  "flex items-center rounded-full size-2 border-2 border-background",
1228
1387
  {
@@ -1311,11 +1470,11 @@ function AvatarStatus({
1311
1470
  }
1312
1471
  );
1313
1472
  }
1314
- var AvatarGroupContext = React__namespace.createContext(
1473
+ var AvatarGroupContext = React4__namespace.createContext(
1315
1474
  null
1316
1475
  );
1317
1476
  var StaggeredContent = ({ content }) => {
1318
- const children = React__namespace.Children.toArray(content);
1477
+ const children = React4__namespace.Children.toArray(content);
1319
1478
  return /* @__PURE__ */ jsxRuntime.jsx(
1320
1479
  react.motion.div,
1321
1480
  {
@@ -1358,7 +1517,14 @@ function AvatarGroup({
1358
1517
  tooltipClassName,
1359
1518
  animation
1360
1519
  };
1361
- return /* @__PURE__ */ jsxRuntime.jsx(AvatarGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex -space-x-2.5", className), children }) });
1520
+ return /* @__PURE__ */ jsxRuntime.jsx(AvatarGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
1521
+ "div",
1522
+ {
1523
+ "data-slot": "avatar-group",
1524
+ className: cn("flex -space-x-2.5", className),
1525
+ children
1526
+ }
1527
+ ) });
1362
1528
  }
1363
1529
  function AvatarGroupItem({
1364
1530
  children,
@@ -1366,8 +1532,8 @@ function AvatarGroupItem({
1366
1532
  tooltipClassName,
1367
1533
  animation: itemAnimation
1368
1534
  }) {
1369
- const context = React__namespace.useContext(AvatarGroupContext);
1370
- const [hoveredIndex, setHoveredIndex] = React__namespace.useState(false);
1535
+ const context = React4__namespace.useContext(AvatarGroupContext);
1536
+ const [hoveredIndex, setHoveredIndex] = React4__namespace.useState(false);
1371
1537
  const springConfig = { stiffness: 100, damping: 5 };
1372
1538
  const x = react.useMotionValue(0);
1373
1539
  const animation = itemAnimation || context?.animation || "default";
@@ -1380,13 +1546,13 @@ function AvatarGroupItem({
1380
1546
  react.useTransform(x, [-100, 100], [-50, 50]),
1381
1547
  springConfig
1382
1548
  );
1383
- const tooltipChild = React__namespace.Children.toArray(children).find(
1384
- (child) => React__namespace.isValidElement(child) && child.type === AvatarGroupTooltip
1549
+ const tooltipChild = React4__namespace.Children.toArray(children).find(
1550
+ (child) => React4__namespace.isValidElement(child) && child.type === AvatarGroupTooltip
1385
1551
  );
1386
- const otherChildren = React__namespace.Children.toArray(children).filter(
1387
- (child) => !(React__namespace.isValidElement(child) && child.type === AvatarGroupTooltip)
1552
+ const otherChildren = React4__namespace.Children.toArray(children).filter(
1553
+ (child) => !(React4__namespace.isValidElement(child) && child.type === AvatarGroupTooltip)
1388
1554
  );
1389
- const tooltipContent = tooltipChild && React__namespace.isValidElement(tooltipChild) ? tooltipChild.props.children : null;
1555
+ const tooltipContent = tooltipChild && React4__namespace.isValidElement(tooltipChild) ? tooltipChild.props.children : null;
1390
1556
  const handleMouseMove = (event) => {
1391
1557
  const halfWidth = event.target.offsetWidth / 2;
1392
1558
  x.set(event.nativeEvent.offsetX - halfWidth);
@@ -1532,9 +1698,251 @@ function AvatarGroupTooltip({
1532
1698
  }
1533
1699
  );
1534
1700
  }
1535
- var DataGridContext = React.createContext(void 0);
1701
+ var THEMES = { light: "", dark: ".dark" };
1702
+ var ChartContext = React4__namespace.createContext(null);
1703
+ var chartContainerClasses = [
1704
+ "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground",
1705
+ "[&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50",
1706
+ "[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border",
1707
+ "[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border",
1708
+ "[&_.recharts-radial-bar-background-sector]:fill-muted",
1709
+ "[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted",
1710
+ "[&_.recharts-reference-line_[stroke='#ccc']]:stroke-border",
1711
+ "flex aspect-video justify-center text-xs",
1712
+ "[&_.recharts-dot[stroke='#fff']]:stroke-transparent",
1713
+ "[&_.recharts-layer]:outline-hidden",
1714
+ "[&_.recharts-sector]:outline-hidden",
1715
+ "[&_.recharts-sector[stroke='#fff']]:stroke-transparent",
1716
+ "[&_.recharts-surface]:outline-hidden"
1717
+ ].join(" ");
1718
+ function useChart() {
1719
+ const context = React4__namespace.useContext(ChartContext);
1720
+ if (!context) {
1721
+ throw new Error("useChart must be used within a <ChartContainer />");
1722
+ }
1723
+ return context;
1724
+ }
1725
+ function ChartContainer({
1726
+ id,
1727
+ className,
1728
+ children,
1729
+ config,
1730
+ ...props
1731
+ }) {
1732
+ const uniqueId = React4__namespace.useId();
1733
+ const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
1734
+ return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
1735
+ "div",
1736
+ {
1737
+ "data-slot": "chart",
1738
+ "data-chart": chartId,
1739
+ className: cn(chartContainerClasses, className),
1740
+ ...props,
1741
+ children: [
1742
+ /* @__PURE__ */ jsxRuntime.jsx(ChartStyle, { id: chartId, config }),
1743
+ /* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive__namespace.ResponsiveContainer, { children })
1744
+ ]
1745
+ }
1746
+ ) });
1747
+ }
1748
+ function ChartStyle({ id, config }) {
1749
+ const colorConfig = Object.entries(config).filter(
1750
+ ([, itemConfig]) => itemConfig.theme || itemConfig.color
1751
+ );
1752
+ if (!colorConfig.length) {
1753
+ return null;
1754
+ }
1755
+ return /* @__PURE__ */ jsxRuntime.jsx(
1756
+ "style",
1757
+ {
1758
+ dangerouslySetInnerHTML: {
1759
+ __html: Object.entries(THEMES).map(
1760
+ ([theme, prefix]) => `
1761
+ ${prefix} [data-chart=${id}] {
1762
+ ${colorConfig.map(([key, itemConfig]) => {
1763
+ const color = itemConfig.theme?.[theme] || itemConfig.color;
1764
+ return color ? ` --color-${key}: ${color};` : null;
1765
+ }).join("\n")}
1766
+ }
1767
+ `
1768
+ ).join("\n")
1769
+ }
1770
+ }
1771
+ );
1772
+ }
1773
+ var ChartTooltip = RechartsPrimitive__namespace.Tooltip;
1774
+ function ChartTooltipContent({
1775
+ active,
1776
+ payload,
1777
+ className,
1778
+ indicator = "dot",
1779
+ hideLabel = false,
1780
+ hideIndicator = false,
1781
+ label,
1782
+ labelFormatter,
1783
+ labelClassName,
1784
+ formatter,
1785
+ color,
1786
+ nameKey,
1787
+ labelKey
1788
+ }) {
1789
+ const { config } = useChart();
1790
+ const tooltipLabel = React4__namespace.useMemo(() => {
1791
+ if (hideLabel || !payload?.length) {
1792
+ return null;
1793
+ }
1794
+ const [item] = payload;
1795
+ const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
1796
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
1797
+ const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
1798
+ if (labelFormatter) {
1799
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
1800
+ }
1801
+ if (!value) {
1802
+ return null;
1803
+ }
1804
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("font-medium", labelClassName), children: value });
1805
+ }, [
1806
+ label,
1807
+ labelFormatter,
1808
+ payload,
1809
+ hideLabel,
1810
+ labelClassName,
1811
+ config,
1812
+ labelKey
1813
+ ]);
1814
+ if (!active || !payload?.length) {
1815
+ return null;
1816
+ }
1817
+ const nestLabel = payload.length === 1 && indicator !== "dot";
1818
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1819
+ "div",
1820
+ {
1821
+ className: cn(
1822
+ "border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
1823
+ className
1824
+ ),
1825
+ children: [
1826
+ !nestLabel ? tooltipLabel : null,
1827
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-1.5", children: payload.map((item, index) => {
1828
+ const key = `${nameKey || item.name || item.dataKey || "value"}`;
1829
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
1830
+ const indicatorColor = color || item.payload.fill || item.color;
1831
+ return /* @__PURE__ */ jsxRuntime.jsx(
1832
+ "div",
1833
+ {
1834
+ className: cn(
1835
+ "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:size-2.5",
1836
+ indicator === "dot" && "items-center"
1837
+ ),
1838
+ children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1839
+ itemConfig?.icon ? /* @__PURE__ */ jsxRuntime.jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsxRuntime.jsx(
1840
+ "div",
1841
+ {
1842
+ className: cn(
1843
+ "shrink-0 rounded-sm border-(--color-border) bg-(--color-bg)",
1844
+ {
1845
+ "size-2.5": indicator === "dot",
1846
+ "w-1": indicator === "line",
1847
+ "w-0 border-2 border-dashed bg-transparent": indicator === "dashed",
1848
+ "my-0.5": nestLabel && indicator === "dashed"
1849
+ }
1850
+ ),
1851
+ style: {
1852
+ "--color-bg": indicatorColor,
1853
+ "--color-border": indicatorColor
1854
+ }
1855
+ }
1856
+ ),
1857
+ /* @__PURE__ */ jsxRuntime.jsxs(
1858
+ "div",
1859
+ {
1860
+ className: cn(
1861
+ "flex flex-1 justify-between leading-none",
1862
+ nestLabel ? "items-end" : "items-center"
1863
+ ),
1864
+ children: [
1865
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1.5", children: [
1866
+ nestLabel ? tooltipLabel : null,
1867
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
1868
+ ] }),
1869
+ item.value != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
1870
+ ]
1871
+ }
1872
+ )
1873
+ ] })
1874
+ },
1875
+ item.dataKey
1876
+ );
1877
+ }) })
1878
+ ]
1879
+ }
1880
+ );
1881
+ }
1882
+ var ChartLegend = RechartsPrimitive__namespace.Legend;
1883
+ function ChartLegendContent({
1884
+ className,
1885
+ hideIcon = false,
1886
+ payload,
1887
+ verticalAlign = "bottom",
1888
+ nameKey
1889
+ }) {
1890
+ const { config } = useChart();
1891
+ if (!payload?.length) {
1892
+ return null;
1893
+ }
1894
+ return /* @__PURE__ */ jsxRuntime.jsx(
1895
+ "div",
1896
+ {
1897
+ className: cn(
1898
+ "flex items-center justify-center gap-4",
1899
+ verticalAlign === "top" ? "pb-3" : "pt-3",
1900
+ className
1901
+ ),
1902
+ children: payload.map((item) => {
1903
+ const key = `${nameKey || item.dataKey || "value"}`;
1904
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
1905
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1906
+ "div",
1907
+ {
1908
+ className: cn(
1909
+ "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:size-3"
1910
+ ),
1911
+ children: [
1912
+ itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsxRuntime.jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsxRuntime.jsx(
1913
+ "div",
1914
+ {
1915
+ className: "size-2 shrink-0 rounded-sm",
1916
+ style: {
1917
+ backgroundColor: item.color
1918
+ }
1919
+ }
1920
+ ),
1921
+ itemConfig?.label
1922
+ ]
1923
+ },
1924
+ item.value
1925
+ );
1926
+ })
1927
+ }
1928
+ );
1929
+ }
1930
+ function getPayloadConfigFromPayload(config, payload, key) {
1931
+ if (typeof payload !== "object" || payload === null) {
1932
+ return void 0;
1933
+ }
1934
+ const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
1935
+ let configLabelKey = key;
1936
+ if (key in payload && typeof payload[key] === "string") {
1937
+ configLabelKey = payload[key];
1938
+ } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
1939
+ configLabelKey = payloadPayload[key];
1940
+ }
1941
+ return configLabelKey in config ? config[configLabelKey] : config[key];
1942
+ }
1943
+ var DataGridContext = React4.createContext(void 0);
1536
1944
  function useDataGrid() {
1537
- const context = React.useContext(DataGridContext);
1945
+ const context = React4.useContext(DataGridContext);
1538
1946
  if (!context) {
1539
1947
  throw new Error("useDataGrid must be used within a DataGridProvider");
1540
1948
  }
@@ -2064,7 +2472,7 @@ function DataGridTable() {
2064
2472
  colIndex
2065
2473
  );
2066
2474
  }) }, rowIndex)) : table.getRowModel().rows.length ? table.getRowModel().rows.map((row, index) => {
2067
- return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
2475
+ return /* @__PURE__ */ jsxRuntime.jsxs(React4.Fragment, { children: [
2068
2476
  /* @__PURE__ */ jsxRuntime.jsx(DataGridTableBodyRow, { row, children: row.getVisibleCells().map((cell, colIndex) => {
2069
2477
  return /* @__PURE__ */ jsxRuntime.jsx(DataGridTableBodyRowCell, { cell, children: reactTable.flexRender(
2070
2478
  cell.column.columnDef.cell,
@@ -2520,7 +2928,7 @@ function DataGridColumnHeader({
2520
2928
  }
2521
2929
  return headerLabel();
2522
2930
  }
2523
- var SelectContext = React__namespace.createContext({ indicatorPosition: "left", indicator: null, indicatorVisibility: true });
2931
+ var SelectContext = React4__namespace.createContext({ indicatorPosition: "left", indicator: null, indicatorVisibility: true });
2524
2932
  var Select = ({
2525
2933
  indicatorPosition = "left",
2526
2934
  indicatorVisibility = true,
@@ -2674,7 +3082,7 @@ function SelectItem({
2674
3082
  children,
2675
3083
  ...props
2676
3084
  }) {
2677
- const { indicatorPosition, indicatorVisibility, indicator } = React__namespace.useContext(SelectContext);
3085
+ const { indicatorPosition, indicatorVisibility, indicator } = React4__namespace.useContext(SelectContext);
2678
3086
  return /* @__PURE__ */ jsxRuntime.jsxs(
2679
3087
  radixUi.Select.Item,
2680
3088
  {
@@ -2686,7 +3094,7 @@ function SelectItem({
2686
3094
  ),
2687
3095
  ...props,
2688
3096
  children: [
2689
- indicatorVisibility && (indicator && React.isValidElement(indicator) ? indicator : /* @__PURE__ */ jsxRuntime.jsx(
3097
+ indicatorVisibility && (indicator && React4.isValidElement(indicator) ? indicator : /* @__PURE__ */ jsxRuntime.jsx(
2690
3098
  "span",
2691
3099
  {
2692
3100
  className: cn(
@@ -2706,7 +3114,7 @@ function SelectIndicator({
2706
3114
  className,
2707
3115
  ...props
2708
3116
  }) {
2709
- const { indicatorPosition } = React__namespace.useContext(SelectContext);
3117
+ const { indicatorPosition } = React4__namespace.useContext(SelectContext);
2710
3118
  return /* @__PURE__ */ jsxRuntime.jsx(
2711
3119
  "span",
2712
3120
  {
@@ -2930,61 +3338,492 @@ function DataGridColumnVisibility({
2930
3338
  ] })
2931
3339
  ] });
2932
3340
  }
2933
- var badgeVariants = classVarianceAuthority.cva(
2934
- "inline-flex items-center justify-center border border-transparent font-medium focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:-ms-px [&_svg]:shrink-0",
2935
- {
2936
- variants: {
2937
- variant: {
2938
- primary: "bg-primary text-primary-foreground",
2939
- secondary: "bg-secondary text-secondary-foreground",
2940
- success: "bg-[var(--color-success-accent,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]",
2941
- warning: "bg-[var(--color-warning-accent,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]",
2942
- info: "bg-[var(--color-info-accent,var(--color-violet-500))] text-[var(--color-info-foreground,var(--color-white))]",
2943
- outline: "bg-transparent border border-border text-secondary-foreground",
2944
- destructive: "bg-destructive text-destructive-foreground"
2945
- },
2946
- appearance: {
2947
- default: "",
2948
- light: "",
2949
- outline: "",
2950
- ghost: "border-transparent bg-transparent"
2951
- },
2952
- disabled: {
2953
- true: "opacity-50 pointer-events-none"
2954
- },
2955
- size: {
2956
- lg: "rounded-md px-[0.5rem] h-7 min-w-7 gap-1.5 text-xs [&_svg]:size-3.5",
2957
- md: "rounded-md px-[0.45rem] h-6 min-w-6 gap-1.5 text-xs [&_svg]:size-3.5 ",
2958
- sm: "rounded-sm px-[0.325rem] h-5 min-w-5 gap-1 text-[0.6875rem] leading-[0.75rem] [&_svg]:size-3",
2959
- xs: "rounded-sm px-[0.25rem] h-4 min-w-4 gap-1 text-[0.625rem] leading-[0.5rem] [&_svg]:size-3"
2960
- },
2961
- shape: {
2962
- default: "",
2963
- circle: "rounded-full"
3341
+ var KanbanContext = React4__namespace.createContext({
3342
+ columns: {},
3343
+ setColumns: () => {
3344
+ },
3345
+ getItemId: () => "",
3346
+ columnIds: [],
3347
+ activeId: null,
3348
+ setActiveId: () => {
3349
+ },
3350
+ findContainer: () => void 0,
3351
+ isColumn: () => false
3352
+ });
3353
+ var ColumnContext = React4__namespace.createContext({
3354
+ attributes: {},
3355
+ listeners: void 0,
3356
+ isDragging: false,
3357
+ disabled: false
3358
+ });
3359
+ var ItemContext = React4__namespace.createContext({
3360
+ listeners: void 0,
3361
+ isDragging: false,
3362
+ disabled: false
3363
+ });
3364
+ var dropAnimationConfig = {
3365
+ ...core.defaultDropAnimation,
3366
+ sideEffects: core.defaultDropAnimationSideEffects({
3367
+ styles: {
3368
+ active: {
3369
+ opacity: "0.4"
3370
+ }
3371
+ }
3372
+ })
3373
+ };
3374
+ function Kanban({
3375
+ value,
3376
+ onValueChange,
3377
+ getItemValue,
3378
+ children,
3379
+ className,
3380
+ onMove
3381
+ }) {
3382
+ const columns = value;
3383
+ const setColumns = onValueChange;
3384
+ const [activeId, setActiveId] = React4__namespace.useState(null);
3385
+ const sensors = core.useSensors(
3386
+ core.useSensor(core.PointerSensor, {
3387
+ activationConstraint: {
3388
+ distance: 10
2964
3389
  }
3390
+ }),
3391
+ core.useSensor(core.KeyboardSensor, {
3392
+ coordinateGetter: sortable.sortableKeyboardCoordinates
3393
+ })
3394
+ );
3395
+ const columnIds = React4__namespace.useMemo(() => Object.keys(columns), [columns]);
3396
+ const isColumn = React4__namespace.useCallback(
3397
+ (id) => columnIds.includes(id),
3398
+ [columnIds]
3399
+ );
3400
+ const findContainer = React4__namespace.useCallback(
3401
+ (id) => {
3402
+ if (isColumn(id)) return id;
3403
+ return columnIds.find(
3404
+ (key) => columns[key].some((item) => getItemValue(item) === id)
3405
+ );
2965
3406
  },
2966
- compoundVariants: [
2967
- /* Light */
2968
- {
2969
- variant: "primary",
2970
- appearance: "light",
2971
- className: "text-[var(--color-primary-accent,var(--color-blue-700))] bg-[var(--color-primary-soft,var(--color-blue-50))] dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:text-[var(--color-primary-soft,var(--color-blue-600))]"
2972
- },
2973
- {
2974
- variant: "secondary",
2975
- appearance: "light",
2976
- className: "bg-secondary dark:bg-secondary/50 text-secondary-foreground"
2977
- },
2978
- {
2979
- variant: "success",
2980
- appearance: "light",
2981
- className: "text-[var(--color-success-accent,var(--color-green-800))] bg-[var(--color-success-soft,var(--color-green-100))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:text-[var(--color-success-soft,var(--color-green-600))]"
2982
- },
2983
- {
2984
- variant: "warning",
2985
- appearance: "light",
2986
- className: "text-[var(--color-warning-accent,var(--color-yellow-700))] bg-[var(--color-warning-soft,var(--color-yellow-100))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:text-[var(--color-warning-soft,var(--color-yellow-600))]"
2987
- },
3407
+ [columns, columnIds, getItemValue, isColumn]
3408
+ );
3409
+ const handleDragStart = React4__namespace.useCallback((event) => {
3410
+ setActiveId(event.active.id);
3411
+ }, []);
3412
+ const handleDragOver = React4__namespace.useCallback(
3413
+ (event) => {
3414
+ if (onMove) {
3415
+ return;
3416
+ }
3417
+ const { active, over } = event;
3418
+ if (!over) return;
3419
+ if (isColumn(active.id)) return;
3420
+ const activeContainer = findContainer(active.id);
3421
+ const overContainer = findContainer(over.id);
3422
+ if (!activeContainer || !overContainer || activeContainer === overContainer) {
3423
+ return;
3424
+ }
3425
+ const activeItems = [...columns[activeContainer]];
3426
+ const overItems = [...columns[overContainer]];
3427
+ const activeIndex = activeItems.findIndex(
3428
+ (item) => getItemValue(item) === active.id
3429
+ );
3430
+ const overIndex = isColumn(over.id) ? overItems.length : overItems.findIndex((item) => getItemValue(item) === over.id);
3431
+ const [movedItem] = activeItems.splice(activeIndex, 1);
3432
+ overItems.splice(overIndex, 0, movedItem);
3433
+ setColumns({
3434
+ ...columns,
3435
+ [activeContainer]: activeItems,
3436
+ [overContainer]: overItems
3437
+ });
3438
+ },
3439
+ [findContainer, getItemValue, isColumn, setColumns, columns, onMove]
3440
+ );
3441
+ const handleDragEnd = React4__namespace.useCallback(
3442
+ (event) => {
3443
+ const { active, over } = event;
3444
+ setActiveId(null);
3445
+ if (!over) return;
3446
+ if (onMove && !isColumn(active.id)) {
3447
+ const activeContainer2 = findContainer(active.id);
3448
+ const overContainer2 = findContainer(over.id);
3449
+ if (activeContainer2 && overContainer2) {
3450
+ const activeIndex = columns[activeContainer2].findIndex(
3451
+ (item) => getItemValue(item) === active.id
3452
+ );
3453
+ const overIndex = isColumn(over.id) ? columns[overContainer2].length : columns[overContainer2].findIndex(
3454
+ (item) => getItemValue(item) === over.id
3455
+ );
3456
+ onMove({
3457
+ event,
3458
+ activeContainer: activeContainer2,
3459
+ activeIndex,
3460
+ overContainer: overContainer2,
3461
+ overIndex
3462
+ });
3463
+ }
3464
+ return;
3465
+ }
3466
+ if (isColumn(active.id) && isColumn(over.id)) {
3467
+ const activeIndex = columnIds.indexOf(active.id);
3468
+ const overIndex = columnIds.indexOf(over.id);
3469
+ if (activeIndex !== overIndex) {
3470
+ const newOrder = sortable.arrayMove(
3471
+ Object.keys(columns),
3472
+ activeIndex,
3473
+ overIndex
3474
+ );
3475
+ const newColumns = {};
3476
+ newOrder.forEach((key) => {
3477
+ newColumns[key] = columns[key];
3478
+ });
3479
+ setColumns(newColumns);
3480
+ }
3481
+ return;
3482
+ }
3483
+ const activeContainer = findContainer(active.id);
3484
+ const overContainer = findContainer(over.id);
3485
+ if (activeContainer && overContainer && activeContainer === overContainer) {
3486
+ const container = activeContainer;
3487
+ const activeIndex = columns[container].findIndex(
3488
+ (item) => getItemValue(item) === active.id
3489
+ );
3490
+ const overIndex = columns[container].findIndex(
3491
+ (item) => getItemValue(item) === over.id
3492
+ );
3493
+ if (activeIndex !== overIndex) {
3494
+ setColumns({
3495
+ ...columns,
3496
+ [container]: sortable.arrayMove(columns[container], activeIndex, overIndex)
3497
+ });
3498
+ }
3499
+ }
3500
+ },
3501
+ [
3502
+ columnIds,
3503
+ columns,
3504
+ findContainer,
3505
+ getItemValue,
3506
+ isColumn,
3507
+ setColumns,
3508
+ onMove
3509
+ ]
3510
+ );
3511
+ const contextValue = React4__namespace.useMemo(
3512
+ () => ({
3513
+ columns,
3514
+ setColumns,
3515
+ getItemId: getItemValue,
3516
+ columnIds,
3517
+ activeId,
3518
+ setActiveId,
3519
+ findContainer,
3520
+ isColumn
3521
+ }),
3522
+ [
3523
+ columns,
3524
+ setColumns,
3525
+ getItemValue,
3526
+ columnIds,
3527
+ activeId,
3528
+ findContainer,
3529
+ isColumn
3530
+ ]
3531
+ );
3532
+ return /* @__PURE__ */ jsxRuntime.jsx(KanbanContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
3533
+ core.DndContext,
3534
+ {
3535
+ sensors,
3536
+ onDragStart: handleDragStart,
3537
+ onDragOver: handleDragOver,
3538
+ onDragEnd: handleDragEnd,
3539
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3540
+ "div",
3541
+ {
3542
+ "data-slot": "kanban",
3543
+ "data-dragging": activeId !== null,
3544
+ className: cn(className),
3545
+ children
3546
+ }
3547
+ )
3548
+ }
3549
+ ) });
3550
+ }
3551
+ function KanbanBoard({ children, className }) {
3552
+ const { columnIds } = React4__namespace.useContext(KanbanContext);
3553
+ return /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: columnIds, strategy: sortable.rectSortingStrategy, children: /* @__PURE__ */ jsxRuntime.jsx(
3554
+ "div",
3555
+ {
3556
+ "data-slot": "kanban-board",
3557
+ className: cn("grid auto-rows-fr gap-4", className),
3558
+ children
3559
+ }
3560
+ ) });
3561
+ }
3562
+ function KanbanColumn({
3563
+ value,
3564
+ className,
3565
+ children,
3566
+ disabled
3567
+ }) {
3568
+ const {
3569
+ setNodeRef,
3570
+ transform,
3571
+ transition,
3572
+ attributes,
3573
+ listeners,
3574
+ isDragging: isSortableDragging
3575
+ } = sortable.useSortable({
3576
+ id: value,
3577
+ disabled
3578
+ });
3579
+ const { activeId, isColumn } = React4__namespace.useContext(KanbanContext);
3580
+ const isColumnDragging = activeId ? isColumn(activeId) : false;
3581
+ const style = {
3582
+ transition,
3583
+ transform: utilities.CSS.Translate.toString(transform)
3584
+ };
3585
+ return /* @__PURE__ */ jsxRuntime.jsx(
3586
+ ColumnContext.Provider,
3587
+ {
3588
+ value: { attributes, listeners, isDragging: isColumnDragging, disabled },
3589
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3590
+ "div",
3591
+ {
3592
+ "data-slot": "kanban-column",
3593
+ "data-value": value,
3594
+ "data-dragging": isSortableDragging,
3595
+ "data-disabled": disabled,
3596
+ ref: setNodeRef,
3597
+ style,
3598
+ className: cn(
3599
+ "group/kanban-column flex flex-col",
3600
+ isSortableDragging && "opacity-50",
3601
+ disabled && "opacity-50",
3602
+ className
3603
+ ),
3604
+ children
3605
+ }
3606
+ )
3607
+ }
3608
+ );
3609
+ }
3610
+ function KanbanColumnHandle({
3611
+ asChild,
3612
+ className,
3613
+ children,
3614
+ cursor = true
3615
+ }) {
3616
+ const { attributes, listeners, isDragging, disabled } = React4__namespace.useContext(ColumnContext);
3617
+ const Comp = asChild ? SlotPrimitive2.Slot : "div";
3618
+ return /* @__PURE__ */ jsxRuntime.jsx(
3619
+ Comp,
3620
+ {
3621
+ "data-slot": "kanban-column-handle",
3622
+ "data-dragging": isDragging,
3623
+ "data-disabled": disabled,
3624
+ ...attributes,
3625
+ ...listeners,
3626
+ className: cn(
3627
+ "opacity-0 transition-opacity group-hover/kanban-column:opacity-100",
3628
+ cursor && (isDragging ? "cursor-grabbing!" : "cursor-grab!"),
3629
+ className
3630
+ ),
3631
+ children
3632
+ }
3633
+ );
3634
+ }
3635
+ function KanbanItem({
3636
+ value,
3637
+ asChild = false,
3638
+ className,
3639
+ children,
3640
+ disabled
3641
+ }) {
3642
+ const {
3643
+ setNodeRef,
3644
+ transform,
3645
+ transition,
3646
+ attributes,
3647
+ listeners,
3648
+ isDragging: isSortableDragging
3649
+ } = sortable.useSortable({
3650
+ id: value,
3651
+ disabled
3652
+ });
3653
+ const { activeId, isColumn } = React4__namespace.useContext(KanbanContext);
3654
+ const isItemDragging = activeId ? !isColumn(activeId) : false;
3655
+ const style = {
3656
+ transition,
3657
+ transform: utilities.CSS.Translate.toString(transform)
3658
+ };
3659
+ const Comp = asChild ? SlotPrimitive2.Slot : "div";
3660
+ return /* @__PURE__ */ jsxRuntime.jsx(
3661
+ ItemContext.Provider,
3662
+ {
3663
+ value: { listeners, isDragging: isItemDragging, disabled },
3664
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3665
+ Comp,
3666
+ {
3667
+ "data-slot": "kanban-item",
3668
+ "data-value": value,
3669
+ "data-dragging": isSortableDragging,
3670
+ "data-disabled": disabled,
3671
+ ref: setNodeRef,
3672
+ style,
3673
+ ...attributes,
3674
+ className: cn(
3675
+ isSortableDragging && "opacity-50",
3676
+ disabled && "opacity-50",
3677
+ className
3678
+ ),
3679
+ children
3680
+ }
3681
+ )
3682
+ }
3683
+ );
3684
+ }
3685
+ function KanbanItemHandle({
3686
+ asChild,
3687
+ className,
3688
+ children,
3689
+ cursor = true
3690
+ }) {
3691
+ const { listeners, isDragging, disabled } = React4__namespace.useContext(ItemContext);
3692
+ const Comp = asChild ? SlotPrimitive2.Slot : "div";
3693
+ return /* @__PURE__ */ jsxRuntime.jsx(
3694
+ Comp,
3695
+ {
3696
+ "data-slot": "kanban-item-handle",
3697
+ "data-dragging": isDragging,
3698
+ "data-disabled": disabled,
3699
+ ...listeners,
3700
+ className: cn(
3701
+ cursor && (isDragging ? "cursor-grabbing!" : "cursor-grab!"),
3702
+ className
3703
+ ),
3704
+ children
3705
+ }
3706
+ );
3707
+ }
3708
+ function KanbanColumnContent({
3709
+ value,
3710
+ className,
3711
+ children
3712
+ }) {
3713
+ const { columns, getItemId } = React4__namespace.useContext(KanbanContext);
3714
+ const itemIds = React4__namespace.useMemo(
3715
+ () => columns[value].map(getItemId),
3716
+ [columns, getItemId, value]
3717
+ );
3718
+ return /* @__PURE__ */ jsxRuntime.jsx(sortable.SortableContext, { items: itemIds, strategy: sortable.verticalListSortingStrategy, children: /* @__PURE__ */ jsxRuntime.jsx(
3719
+ "div",
3720
+ {
3721
+ "data-slot": "kanban-column-content",
3722
+ className: cn("flex flex-col gap-2", className),
3723
+ children
3724
+ }
3725
+ ) });
3726
+ }
3727
+ function KanbanOverlay({ children, className }) {
3728
+ const { activeId, isColumn } = React4__namespace.useContext(KanbanContext);
3729
+ const [dimensions, setDimensions] = React4__namespace.useState(null);
3730
+ React4__namespace.useEffect(() => {
3731
+ if (activeId) {
3732
+ const element = document.querySelector(
3733
+ `[data-slot="kanban-${isColumn(activeId) ? "column" : "item"}"][data-value="${activeId}"]`
3734
+ );
3735
+ if (element) {
3736
+ const rect = element.getBoundingClientRect();
3737
+ setDimensions({ width: rect.width, height: rect.height });
3738
+ }
3739
+ } else {
3740
+ setDimensions(null);
3741
+ }
3742
+ }, [activeId, isColumn]);
3743
+ const style = {
3744
+ width: dimensions?.width,
3745
+ height: dimensions?.height
3746
+ };
3747
+ const content = React4__namespace.useMemo(() => {
3748
+ if (!activeId) return null;
3749
+ if (typeof children === "function") {
3750
+ return children({
3751
+ value: activeId,
3752
+ variant: isColumn(activeId) ? "column" : "item"
3753
+ });
3754
+ }
3755
+ return children;
3756
+ }, [activeId, children, isColumn]);
3757
+ return /* @__PURE__ */ jsxRuntime.jsx(core.DragOverlay, { dropAnimation: dropAnimationConfig, children: /* @__PURE__ */ jsxRuntime.jsx(
3758
+ "div",
3759
+ {
3760
+ "data-slot": "kanban-overlay",
3761
+ "data-dragging": true,
3762
+ style,
3763
+ className: cn(
3764
+ "pointer-events-none",
3765
+ className,
3766
+ activeId ? "cursor-grabbing!" : ""
3767
+ ),
3768
+ children: content
3769
+ }
3770
+ ) });
3771
+ }
3772
+ var badgeVariants = classVarianceAuthority.cva(
3773
+ "inline-flex items-center justify-center border border-transparent font-medium focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:-ms-px [&_svg]:shrink-0",
3774
+ {
3775
+ variants: {
3776
+ variant: {
3777
+ primary: "bg-primary text-primary-foreground",
3778
+ secondary: "bg-secondary text-secondary-foreground",
3779
+ success: "bg-[var(--color-success-accent,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]",
3780
+ warning: "bg-[var(--color-warning-accent,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]",
3781
+ info: "bg-[var(--color-info-accent,var(--color-violet-500))] text-[var(--color-info-foreground,var(--color-white))]",
3782
+ outline: "bg-transparent border border-border text-secondary-foreground",
3783
+ destructive: "bg-destructive text-destructive-foreground"
3784
+ },
3785
+ appearance: {
3786
+ default: "",
3787
+ light: "",
3788
+ outline: "",
3789
+ ghost: "border-transparent bg-transparent"
3790
+ },
3791
+ disabled: {
3792
+ true: "opacity-50 pointer-events-none"
3793
+ },
3794
+ size: {
3795
+ lg: "rounded-md px-[0.5rem] h-7 min-w-7 gap-1.5 text-xs [&_svg]:size-3.5",
3796
+ md: "rounded-md px-[0.45rem] h-6 min-w-6 gap-1.5 text-xs [&_svg]:size-3.5 ",
3797
+ sm: "rounded-sm px-[0.325rem] h-5 min-w-5 gap-1 text-[0.6875rem] leading-[0.75rem] [&_svg]:size-3",
3798
+ xs: "rounded-sm px-[0.25rem] h-4 min-w-4 gap-1 text-[0.625rem] leading-[0.5rem] [&_svg]:size-3"
3799
+ },
3800
+ shape: {
3801
+ default: "",
3802
+ circle: "rounded-full"
3803
+ }
3804
+ },
3805
+ compoundVariants: [
3806
+ /* Light */
3807
+ {
3808
+ variant: "primary",
3809
+ appearance: "light",
3810
+ className: "text-[var(--color-primary-accent,var(--color-blue-700))] bg-[var(--color-primary-soft,var(--color-blue-50))] dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:text-[var(--color-primary-soft,var(--color-blue-600))]"
3811
+ },
3812
+ {
3813
+ variant: "secondary",
3814
+ appearance: "light",
3815
+ className: "bg-secondary dark:bg-secondary/50 text-secondary-foreground"
3816
+ },
3817
+ {
3818
+ variant: "success",
3819
+ appearance: "light",
3820
+ className: "text-[var(--color-success-accent,var(--color-green-800))] bg-[var(--color-success-soft,var(--color-green-100))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:text-[var(--color-success-soft,var(--color-green-600))]"
3821
+ },
3822
+ {
3823
+ variant: "warning",
3824
+ appearance: "light",
3825
+ className: "text-[var(--color-warning-accent,var(--color-yellow-700))] bg-[var(--color-warning-soft,var(--color-yellow-100))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:text-[var(--color-warning-soft,var(--color-yellow-600))]"
3826
+ },
2988
3827
  {
2989
3828
  variant: "info",
2990
3829
  appearance: "light",
@@ -3069,7 +3908,370 @@ var badgeButtonVariants = classVarianceAuthority.cva(
3069
3908
  {
3070
3909
  variants: {
3071
3910
  variant: {
3072
- default: ""
3911
+ default: ""
3912
+ }
3913
+ },
3914
+ defaultVariants: {
3915
+ variant: "default"
3916
+ }
3917
+ }
3918
+ );
3919
+ function Badge({
3920
+ className,
3921
+ variant,
3922
+ size,
3923
+ appearance,
3924
+ shape,
3925
+ asChild = false,
3926
+ disabled,
3927
+ ...props
3928
+ }) {
3929
+ const Comp = asChild ? SlotPrimitive2__namespace.Slot : "span";
3930
+ return /* @__PURE__ */ jsxRuntime.jsx(
3931
+ Comp,
3932
+ {
3933
+ "data-slot": "badge",
3934
+ className: cn(
3935
+ badgeVariants({ variant, size, appearance, shape, disabled }),
3936
+ className
3937
+ ),
3938
+ ...props
3939
+ }
3940
+ );
3941
+ }
3942
+ function BadgeButton({
3943
+ className,
3944
+ variant,
3945
+ asChild = false,
3946
+ ...props
3947
+ }) {
3948
+ const Comp = asChild ? SlotPrimitive2__namespace.Slot : "span";
3949
+ return /* @__PURE__ */ jsxRuntime.jsx(
3950
+ Comp,
3951
+ {
3952
+ "data-slot": "badge-button",
3953
+ className: cn(badgeButtonVariants({ variant, className })),
3954
+ role: "button",
3955
+ ...props
3956
+ }
3957
+ );
3958
+ }
3959
+ function BadgeDot({ className, ...props }) {
3960
+ return /* @__PURE__ */ jsxRuntime.jsx(
3961
+ "span",
3962
+ {
3963
+ "data-slot": "badge-dot",
3964
+ className: cn(
3965
+ "size-1.5 rounded-full bg-[currentColor] opacity-75",
3966
+ className
3967
+ ),
3968
+ ...props
3969
+ }
3970
+ );
3971
+ }
3972
+ var accordionRootVariants = classVarianceAuthority.cva("", {
3973
+ variants: {
3974
+ variant: {
3975
+ default: "",
3976
+ outline: "space-y-2",
3977
+ solid: "space-y-2"
3978
+ }
3979
+ },
3980
+ defaultVariants: {
3981
+ variant: "default"
3982
+ }
3983
+ });
3984
+ var accordionItemVariants = classVarianceAuthority.cva("", {
3985
+ variants: {
3986
+ variant: {
3987
+ default: "border-b border-border",
3988
+ outline: "border border-border rounded-lg px-4",
3989
+ solid: "rounded-lg bg-accent/70 px-4"
3990
+ }
3991
+ },
3992
+ defaultVariants: {
3993
+ variant: "default"
3994
+ }
3995
+ });
3996
+ var accordionTriggerVariants = classVarianceAuthority.cva(
3997
+ "flex flex-1 items-center justify-between py-4 gap-2.5 text-foreground font-medium transition-all [&[data-state=open]>svg]:rotate-180 cursor-pointer",
3998
+ {
3999
+ variants: {
4000
+ variant: {
4001
+ default: "",
4002
+ outline: "",
4003
+ solid: ""
4004
+ },
4005
+ indicator: {
4006
+ arrow: "",
4007
+ plus: "[&>svg>path:last-child]:origin-center [&>svg>path:last-child]:transition-all [&>svg>path:last-child]:duration-200 [&[data-state=open]>svg>path:last-child]:rotate-90 [&[data-state=open]>svg>path:last-child]:opacity-0 [&[data-state=open]>svg]:rotate-180",
4008
+ none: ""
4009
+ }
4010
+ },
4011
+ defaultVariants: {
4012
+ variant: "default",
4013
+ indicator: "arrow"
4014
+ }
4015
+ }
4016
+ );
4017
+ var accordionContentVariants = classVarianceAuthority.cva(
4018
+ "overflow-hidden text-sm text-accent-foreground transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
4019
+ {
4020
+ variants: {
4021
+ variant: {
4022
+ default: "",
4023
+ outline: "",
4024
+ solid: ""
4025
+ }
4026
+ },
4027
+ defaultVariants: {
4028
+ variant: "default"
4029
+ }
4030
+ }
4031
+ );
4032
+ var AccordionContext = React4__namespace.createContext({
4033
+ variant: "default",
4034
+ indicator: "arrow"
4035
+ });
4036
+ function Accordion(props) {
4037
+ const {
4038
+ className,
4039
+ variant = "default",
4040
+ indicator = "arrow",
4041
+ children,
4042
+ ...rest
4043
+ } = props;
4044
+ return /* @__PURE__ */ jsxRuntime.jsx(
4045
+ AccordionContext.Provider,
4046
+ {
4047
+ value: { variant: variant || "default", indicator },
4048
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4049
+ radixUi.Accordion.Root,
4050
+ {
4051
+ "data-slot": "accordion",
4052
+ className: cn(accordionRootVariants({ variant }), className),
4053
+ ...rest,
4054
+ children
4055
+ }
4056
+ )
4057
+ }
4058
+ );
4059
+ }
4060
+ function AccordionItem(props) {
4061
+ const { className, children, ...rest } = props;
4062
+ const { variant } = React4__namespace.useContext(AccordionContext);
4063
+ return /* @__PURE__ */ jsxRuntime.jsx(
4064
+ radixUi.Accordion.Item,
4065
+ {
4066
+ "data-slot": "accordion-item",
4067
+ className: cn(accordionItemVariants({ variant }), className),
4068
+ ...rest,
4069
+ children
4070
+ }
4071
+ );
4072
+ }
4073
+ function AccordionTrigger(props) {
4074
+ const { className, children, ...rest } = props;
4075
+ const { variant, indicator } = React4__namespace.useContext(AccordionContext);
4076
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
4077
+ radixUi.Accordion.Trigger,
4078
+ {
4079
+ "data-slot": "accordion-trigger",
4080
+ className: cn(
4081
+ accordionTriggerVariants({ variant, indicator }),
4082
+ className
4083
+ ),
4084
+ ...rest,
4085
+ children: [
4086
+ children,
4087
+ indicator === "plus" && /* @__PURE__ */ jsxRuntime.jsx(
4088
+ lucideReact.Plus,
4089
+ {
4090
+ className: "size-4 shrink-0 transition-transform duration-200",
4091
+ strokeWidth: 1
4092
+ }
4093
+ ),
4094
+ indicator === "arrow" && /* @__PURE__ */ jsxRuntime.jsx(
4095
+ lucideReact.ChevronDown,
4096
+ {
4097
+ className: "size-4 shrink-0 transition-transform duration-200",
4098
+ strokeWidth: 1
4099
+ }
4100
+ )
4101
+ ]
4102
+ }
4103
+ ) });
4104
+ }
4105
+ function AccordionContent(props) {
4106
+ const { className, children, ...rest } = props;
4107
+ const { variant } = React4__namespace.useContext(AccordionContext);
4108
+ return /* @__PURE__ */ jsxRuntime.jsx(
4109
+ radixUi.Accordion.Content,
4110
+ {
4111
+ "data-slot": "accordion-content",
4112
+ className: cn(accordionContentVariants({ variant }), className),
4113
+ ...rest,
4114
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-5 pt-0", children })
4115
+ }
4116
+ );
4117
+ }
4118
+ var AccordionMenuContext = React4__namespace.createContext({
4119
+ matchPath: () => false,
4120
+ selectedValue: "",
4121
+ setSelectedValue: () => {
4122
+ },
4123
+ nestedStates: {},
4124
+ setNestedStates: () => {
4125
+ }
4126
+ });
4127
+ function AccordionMenu({
4128
+ className,
4129
+ matchPath = () => false,
4130
+ classNames,
4131
+ children,
4132
+ selectedValue,
4133
+ onItemClick,
4134
+ ...props
4135
+ }) {
4136
+ const [internalSelectedValue, setInternalSelectedValue] = React4__namespace.useState(selectedValue);
4137
+ React4__namespace.useEffect(() => {
4138
+ setInternalSelectedValue(selectedValue);
4139
+ }, [selectedValue]);
4140
+ const [nestedStates, setNestedStates] = React4__namespace.useState({});
4141
+ React4__namespace.useEffect(() => {
4142
+ const getActiveChain = (nodes, chain2 = []) => {
4143
+ let result = [];
4144
+ React4__namespace.Children.forEach(nodes, (node) => {
4145
+ if (React4__namespace.isValidElement(node)) {
4146
+ const { value, children: nodeChildren } = node.props;
4147
+ const newChain = value ? [...chain2, value] : chain2;
4148
+ if (value && (value === selectedValue || matchPath(value))) {
4149
+ result = newChain;
4150
+ } else if (nodeChildren) {
4151
+ const childChain = getActiveChain(nodeChildren, newChain);
4152
+ if (childChain.length > 0) {
4153
+ result = childChain;
4154
+ }
4155
+ }
4156
+ }
4157
+ });
4158
+ return result;
4159
+ };
4160
+ const chain = getActiveChain(children);
4161
+ const trimmedChain = chain.length > 1 ? chain.slice(0, chain.length - 1) : chain;
4162
+ const mapping = {};
4163
+ if (trimmedChain.length > 0) {
4164
+ if (props.type === "multiple") {
4165
+ mapping["root"] = trimmedChain;
4166
+ } else {
4167
+ mapping["root"] = trimmedChain[0];
4168
+ for (let i = 0; i < trimmedChain.length - 1; i++) {
4169
+ mapping[trimmedChain[i]] = trimmedChain[i + 1];
4170
+ }
4171
+ }
4172
+ }
4173
+ setNestedStates(mapping);
4174
+ }, [selectedValue]);
4175
+ const multipleValue = Array.isArray(nestedStates["root"]) ? nestedStates["root"] : typeof nestedStates["root"] === "string" ? [nestedStates["root"]] : [];
4176
+ const singleValue = nestedStates["root"] ?? "";
4177
+ return /* @__PURE__ */ jsxRuntime.jsx(
4178
+ AccordionMenuContext.Provider,
4179
+ {
4180
+ value: {
4181
+ matchPath,
4182
+ selectedValue: internalSelectedValue,
4183
+ setSelectedValue: setInternalSelectedValue,
4184
+ classNames,
4185
+ onItemClick,
4186
+ nestedStates,
4187
+ setNestedStates
4188
+ },
4189
+ children: props.type === "single" ? /* @__PURE__ */ jsxRuntime.jsx(
4190
+ radixUi.Accordion.Root,
4191
+ {
4192
+ "data-slot": "accordion-menu",
4193
+ value: singleValue,
4194
+ className: cn("w-full", classNames?.root, className),
4195
+ onValueChange: (value) => setNestedStates((prev) => ({ ...prev, root: value })),
4196
+ ...props,
4197
+ role: "menu",
4198
+ children
4199
+ }
4200
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
4201
+ radixUi.Accordion.Root,
4202
+ {
4203
+ "data-slot": "accordion-menu",
4204
+ value: multipleValue,
4205
+ className: cn("w-full", classNames?.root, className),
4206
+ onValueChange: (value) => setNestedStates((prev) => ({ ...prev, root: value })),
4207
+ ...props,
4208
+ role: "menu",
4209
+ children
4210
+ }
4211
+ )
4212
+ }
4213
+ );
4214
+ }
4215
+ function AccordionMenuGroup({
4216
+ children,
4217
+ className,
4218
+ ...props
4219
+ }) {
4220
+ const { classNames } = React4__namespace.useContext(AccordionMenuContext);
4221
+ return /* @__PURE__ */ jsxRuntime.jsx(
4222
+ "div",
4223
+ {
4224
+ "data-slot": "accordion-menu-group",
4225
+ role: "group",
4226
+ className: cn("space-y-0.5", classNames?.group, className),
4227
+ ...props,
4228
+ children
4229
+ }
4230
+ );
4231
+ }
4232
+ function AccordionMenuLabel({
4233
+ children,
4234
+ className,
4235
+ ...props
4236
+ }) {
4237
+ const { classNames } = React4__namespace.useContext(AccordionMenuContext);
4238
+ return /* @__PURE__ */ jsxRuntime.jsx(
4239
+ "div",
4240
+ {
4241
+ "data-slot": "accordion-menu-label",
4242
+ role: "presentation",
4243
+ className: cn(
4244
+ "px-2 py-1.5 text-xs font-medium text-muted-foreground",
4245
+ classNames?.label,
4246
+ className
4247
+ ),
4248
+ ...props,
4249
+ children
4250
+ }
4251
+ );
4252
+ }
4253
+ function AccordionMenuSeparator({
4254
+ className,
4255
+ ...props
4256
+ }) {
4257
+ const { classNames } = React4__namespace.useContext(AccordionMenuContext);
4258
+ return /* @__PURE__ */ jsxRuntime.jsx(
4259
+ "div",
4260
+ {
4261
+ "data-slot": "accordion-menu-separator",
4262
+ role: "separator",
4263
+ className: cn("my-1 h-px bg-border", classNames?.separator, className),
4264
+ ...props
4265
+ }
4266
+ );
4267
+ }
4268
+ var itemVariants = classVarianceAuthority.cva(
4269
+ "relative cursor-pointer select-none flex w-full text-start items-center text-foreground rounded-lg gap-2 px-2 py-1.5 text-sm outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground disabled:opacity-50 disabled:bg-transparent focus-visible:bg-accent focus-visible:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0 [&_a]:flex [&>a]:w-full [&>a]:items-center [&>a]:gap-2",
4270
+ {
4271
+ variants: {
4272
+ variant: {
4273
+ default: "",
4274
+ destructive: "text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5"
3073
4275
  }
3074
4276
  },
3075
4277
  defaultVariants: {
@@ -3077,53 +4279,176 @@ var badgeButtonVariants = classVarianceAuthority.cva(
3077
4279
  }
3078
4280
  }
3079
4281
  );
3080
- function Badge({
4282
+ function AccordionMenuItem({
3081
4283
  className,
4284
+ children,
3082
4285
  variant,
3083
- size,
3084
- appearance,
3085
- shape,
3086
- asChild = false,
3087
- disabled,
4286
+ asChild,
4287
+ onClick,
3088
4288
  ...props
3089
4289
  }) {
3090
- const Comp = asChild ? SlotPrimitive2__namespace.Slot : "span";
3091
- return /* @__PURE__ */ jsxRuntime.jsx(
3092
- Comp,
4290
+ const { classNames, selectedValue, matchPath, onItemClick } = React4__namespace.useContext(AccordionMenuContext);
4291
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Accordion.Item, { className: "flex", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Accordion.Header, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full", children: /* @__PURE__ */ jsxRuntime.jsx(
4292
+ radixUi.Accordion.Trigger,
3093
4293
  {
3094
- "data-slot": "badge",
4294
+ role: "menuitem",
4295
+ asChild,
4296
+ "data-slot": "accordion-menu-item",
3095
4297
  className: cn(
3096
- badgeVariants({ variant, size, appearance, shape, disabled }),
4298
+ itemVariants({ variant }),
4299
+ classNames?.item,
3097
4300
  className
3098
4301
  ),
3099
- ...props
4302
+ onClick: (e) => {
4303
+ if (onItemClick) {
4304
+ onItemClick(props.value, e);
4305
+ }
4306
+ if (onClick) {
4307
+ onClick(e);
4308
+ }
4309
+ e.preventDefault();
4310
+ },
4311
+ onKeyDown: (e) => {
4312
+ if (e.key === "Enter") {
4313
+ e.preventDefault();
4314
+ const target = e.currentTarget;
4315
+ const firstChild = target.firstElementChild;
4316
+ if (firstChild) {
4317
+ firstChild.click();
4318
+ }
4319
+ }
4320
+ },
4321
+ "data-selected": matchPath(props.value) || selectedValue === props.value ? "true" : void 0,
4322
+ children
4323
+ }
4324
+ ) }) }) });
4325
+ }
4326
+ function AccordionMenuSub({
4327
+ className,
4328
+ children,
4329
+ ...props
4330
+ }) {
4331
+ const { classNames } = React4__namespace.useContext(AccordionMenuContext);
4332
+ return /* @__PURE__ */ jsxRuntime.jsx(
4333
+ radixUi.Accordion.Item,
4334
+ {
4335
+ "data-slot": "accordion-menu-sub",
4336
+ className: cn(classNames?.sub, className),
4337
+ ...props,
4338
+ children
3100
4339
  }
3101
4340
  );
3102
4341
  }
3103
- function BadgeButton({
4342
+ function AccordionMenuSubTrigger({
3104
4343
  className,
3105
- variant,
3106
- asChild = false,
4344
+ children
4345
+ }) {
4346
+ const { classNames } = React4__namespace.useContext(AccordionMenuContext);
4347
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Accordion.Header, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
4348
+ radixUi.Accordion.Trigger,
4349
+ {
4350
+ role: "menuitem",
4351
+ "aria-haspopup": "true",
4352
+ "data-slot": "accordion-menu-sub-trigger",
4353
+ className: cn(
4354
+ itemVariants({ variant: "default" }),
4355
+ classNames?.subTrigger,
4356
+ className
4357
+ ),
4358
+ children: [
4359
+ children,
4360
+ /* @__PURE__ */ jsxRuntime.jsx(
4361
+ lucideReact.ChevronDown,
4362
+ {
4363
+ "data-slot": "accordion-menu-sub-indicator",
4364
+ className: cn(
4365
+ "ms-auto size-3.5! shrink-0 text-muted-foreground transition-transform duration-200 [[data-state=open]>&]:-rotate-180"
4366
+ )
4367
+ }
4368
+ )
4369
+ ]
4370
+ }
4371
+ ) }) });
4372
+ }
4373
+ function AccordionMenuSubContent({
4374
+ className,
4375
+ children,
4376
+ type,
4377
+ collapsible,
4378
+ defaultValue,
4379
+ parentValue,
3107
4380
  ...props
3108
4381
  }) {
3109
- const Comp = asChild ? SlotPrimitive2__namespace.Slot : "span";
4382
+ const { nestedStates, setNestedStates, classNames } = React4__namespace.useContext(AccordionMenuContext);
4383
+ let currentValue;
4384
+ if (type === "multiple") {
4385
+ const stateValue = nestedStates[parentValue];
4386
+ if (Array.isArray(stateValue)) {
4387
+ currentValue = stateValue;
4388
+ } else if (typeof stateValue === "string") {
4389
+ currentValue = [stateValue];
4390
+ } else if (defaultValue) {
4391
+ currentValue = Array.isArray(defaultValue) ? defaultValue : [defaultValue];
4392
+ } else {
4393
+ currentValue = [];
4394
+ }
4395
+ } else {
4396
+ currentValue = nestedStates[parentValue] ?? defaultValue ?? "";
4397
+ }
3110
4398
  return /* @__PURE__ */ jsxRuntime.jsx(
3111
- Comp,
4399
+ radixUi.Accordion.Content,
3112
4400
  {
3113
- "data-slot": "badge-button",
3114
- className: cn(badgeButtonVariants({ variant, className })),
3115
- role: "button",
3116
- ...props
4401
+ "data-slot": "accordion-menu-sub-content",
4402
+ className: cn(
4403
+ "ps-5",
4404
+ "overflow-hidden transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
4405
+ classNames?.subContent,
4406
+ className
4407
+ ),
4408
+ ...props,
4409
+ children: type === "multiple" ? /* @__PURE__ */ jsxRuntime.jsx(
4410
+ radixUi.Accordion.Root,
4411
+ {
4412
+ className: cn("w-full py-0.5", classNames?.subWrapper),
4413
+ type: "multiple",
4414
+ value: currentValue,
4415
+ role: "menu",
4416
+ "data-slot": "accordion-menu-sub-wrapper",
4417
+ onValueChange: (value) => {
4418
+ const newValue = Array.isArray(value) ? value : [value];
4419
+ setNestedStates((prev) => ({ ...prev, [parentValue]: newValue }));
4420
+ },
4421
+ children
4422
+ }
4423
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
4424
+ radixUi.Accordion.Root,
4425
+ {
4426
+ className: cn("w-full py-0.5", classNames?.subWrapper),
4427
+ type: "single",
4428
+ collapsible,
4429
+ value: currentValue,
4430
+ role: "menu",
4431
+ "data-slot": "accordion-menu-sub-wrapper",
4432
+ onValueChange: (value) => setNestedStates((prev) => ({ ...prev, [parentValue]: value })),
4433
+ children
4434
+ }
4435
+ )
3117
4436
  }
3118
4437
  );
3119
4438
  }
3120
- function BadgeDot({ className, ...props }) {
4439
+ function AccordionMenuIndicator({
4440
+ className,
4441
+ ...props
4442
+ }) {
4443
+ const { classNames } = React4__namespace.useContext(AccordionMenuContext);
3121
4444
  return /* @__PURE__ */ jsxRuntime.jsx(
3122
4445
  "span",
3123
4446
  {
3124
- "data-slot": "badge-dot",
4447
+ "aria-hidden": "true",
4448
+ "data-slot": "accordion-menu-indicator",
3125
4449
  className: cn(
3126
- "size-1.5 rounded-full bg-[currentColor] opacity-75",
4450
+ "ms-auto flex items-center font-medium",
4451
+ classNames?.indicator,
3127
4452
  className
3128
4453
  ),
3129
4454
  ...props
@@ -3141,7 +4466,7 @@ function BreadcrumbList({ className, ...props }) {
3141
4466
  {
3142
4467
  "data-slot": "breadcrumb-list",
3143
4468
  className: cn(
3144
- "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground",
4469
+ "flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-muted-foreground",
3145
4470
  className
3146
4471
  ),
3147
4472
  ...props
@@ -3218,6 +4543,40 @@ var BreadcrumbEllipsis = ({
3218
4543
  ]
3219
4544
  }
3220
4545
  );
4546
+ function Collapsible({
4547
+ ...props
4548
+ }) {
4549
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Collapsible.Root, { "data-slot": "collapsible", ...props });
4550
+ }
4551
+ function CollapsibleTrigger({
4552
+ ...props
4553
+ }) {
4554
+ return /* @__PURE__ */ jsxRuntime.jsx(
4555
+ radixUi.Collapsible.CollapsibleTrigger,
4556
+ {
4557
+ "data-slot": "collapsible-trigger",
4558
+ ...props
4559
+ }
4560
+ );
4561
+ }
4562
+ function CollapsibleContent({
4563
+ className,
4564
+ children,
4565
+ ...props
4566
+ }) {
4567
+ return /* @__PURE__ */ jsxRuntime.jsx(
4568
+ radixUi.Collapsible.CollapsibleContent,
4569
+ {
4570
+ "data-slot": "collapsible-content",
4571
+ className: cn(
4572
+ "overflow-hidden transition-all data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",
4573
+ className
4574
+ ),
4575
+ ...props,
4576
+ children
4577
+ }
4578
+ );
4579
+ }
3221
4580
  var tabsListVariantConfig = {
3222
4581
  variant: {
3223
4582
  default: "bg-accent p-1",
@@ -3335,7 +4694,7 @@ var tabsContentVariants = classVarianceAuthority.cva(
3335
4694
  }
3336
4695
  }
3337
4696
  );
3338
- var TabsContext = React__namespace.createContext({
4697
+ var TabsContext = React4__namespace.createContext({
3339
4698
  variant: "default",
3340
4699
  size: "md"
3341
4700
  });
@@ -3371,7 +4730,7 @@ function TabsTrigger({
3371
4730
  className,
3372
4731
  ...props
3373
4732
  }) {
3374
- const { variant, size } = React__namespace.useContext(TabsContext);
4733
+ const { variant, size } = React4__namespace.useContext(TabsContext);
3375
4734
  return /* @__PURE__ */ jsxRuntime.jsx(
3376
4735
  radixUi.Tabs.Trigger,
3377
4736
  {
@@ -3395,12 +4754,12 @@ function TabsContent({
3395
4754
  }
3396
4755
  );
3397
4756
  }
3398
- var CardContext = React__namespace.createContext({
4757
+ var CardContext = React4__namespace.createContext({
3399
4758
  variant: "default"
3400
4759
  // Default value
3401
4760
  });
3402
4761
  var useCardContext = () => {
3403
- const context = React__namespace.useContext(CardContext);
4762
+ const context = React4__namespace.useContext(CardContext);
3404
4763
  return context;
3405
4764
  };
3406
4765
  var cardVariants = classVarianceAuthority.cva(
@@ -3944,70 +5303,416 @@ var inputWrapperVariants = classVarianceAuthority.cva(
3944
5303
  defaultVariants: {
3945
5304
  variant: "md"
3946
5305
  }
3947
- }
3948
- );
3949
- function Input({
5306
+ }
5307
+ );
5308
+ function Input({
5309
+ className,
5310
+ type,
5311
+ variant,
5312
+ ...props
5313
+ }) {
5314
+ return /* @__PURE__ */ jsxRuntime.jsx(
5315
+ "input",
5316
+ {
5317
+ "data-slot": "input",
5318
+ type,
5319
+ className: cn(inputVariants({ variant }), className),
5320
+ ...props
5321
+ }
5322
+ );
5323
+ }
5324
+ function InputAddon({
5325
+ className,
5326
+ variant,
5327
+ mode,
5328
+ ...props
5329
+ }) {
5330
+ return /* @__PURE__ */ jsxRuntime.jsx(
5331
+ "div",
5332
+ {
5333
+ "data-slot": "input-addon",
5334
+ className: cn(inputAddonVariants({ variant, mode }), className),
5335
+ ...props
5336
+ }
5337
+ );
5338
+ }
5339
+ function InputGroup({
5340
+ className,
5341
+ ...props
5342
+ }) {
5343
+ return /* @__PURE__ */ jsxRuntime.jsx(
5344
+ "div",
5345
+ {
5346
+ "data-slot": "input-group",
5347
+ className: cn(inputGroupVariants(), className),
5348
+ ...props
5349
+ }
5350
+ );
5351
+ }
5352
+ function InputWrapper({
5353
+ className,
5354
+ variant,
5355
+ ...props
5356
+ }) {
5357
+ return /* @__PURE__ */ jsxRuntime.jsx(
5358
+ "div",
5359
+ {
5360
+ "data-slot": "input-wrapper",
5361
+ className: cn(
5362
+ inputVariants({ variant }),
5363
+ inputWrapperVariants({ variant }),
5364
+ className
5365
+ ),
5366
+ ...props
5367
+ }
5368
+ );
5369
+ }
5370
+ function ContextMenu({
5371
+ ...props
5372
+ }) {
5373
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.ContextMenu.Root, { "data-slot": "context-menu", ...props });
5374
+ }
5375
+ function ContextMenuTrigger({
5376
+ ...props
5377
+ }) {
5378
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.ContextMenu.Trigger, { "data-slot": "context-menu-trigger", ...props });
5379
+ }
5380
+ function ContextMenuGroup({
5381
+ ...props
5382
+ }) {
5383
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.ContextMenu.Group, { "data-slot": "context-menu-group", ...props });
5384
+ }
5385
+ function ContextMenuPortal({
5386
+ ...props
5387
+ }) {
5388
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.ContextMenu.Portal, { "data-slot": "context-menu-portal", ...props });
5389
+ }
5390
+ function ContextMenuSub({
5391
+ ...props
5392
+ }) {
5393
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.ContextMenu.Sub, { "data-slot": "context-menu-sub", ...props });
5394
+ }
5395
+ function ContextMenuRadioGroup({
5396
+ ...props
5397
+ }) {
5398
+ return /* @__PURE__ */ jsxRuntime.jsx(
5399
+ radixUi.ContextMenu.RadioGroup,
5400
+ {
5401
+ "data-slot": "context-menu-radio-group",
5402
+ ...props
5403
+ }
5404
+ );
5405
+ }
5406
+ function ContextMenuSubTrigger({
5407
+ className,
5408
+ inset,
5409
+ children,
5410
+ ...props
5411
+ }) {
5412
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5413
+ radixUi.ContextMenu.SubTrigger,
5414
+ {
5415
+ "data-slot": "context-menu-sub-trigger",
5416
+ className: cn(
5417
+ "flex cursor-default gap-2 select-none items-center rounded-md px-2 py-1.5 text-sm outline-hidden",
5418
+ "focus:bg-accent focus:text-foreground",
5419
+ "data-[state=open]:bg-accent data-[state=open]:text-foreground",
5420
+ "[&>svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&>svg]:size-4 [&>svg]:shrink-0",
5421
+ inset && "ps-8",
5422
+ className
5423
+ ),
5424
+ ...props,
5425
+ children: [
5426
+ children,
5427
+ /* @__PURE__ */ jsxRuntime.jsx(
5428
+ lucideReact.ChevronRight,
5429
+ {
5430
+ "data-slot": "context-menu-sub-trigger-indicator",
5431
+ className: "ms-auto size-3.5! rtl:rotate-180"
5432
+ }
5433
+ )
5434
+ ]
5435
+ }
5436
+ );
5437
+ }
5438
+ function ContextMenuSubContent({
5439
+ className,
5440
+ ...props
5441
+ }) {
5442
+ return /* @__PURE__ */ jsxRuntime.jsx(
5443
+ radixUi.ContextMenu.SubContent,
5444
+ {
5445
+ "data-slot": "context-menu-sub-content",
5446
+ className: cn(
5447
+ "space-y-0.5 z-50 min-w-32 overflow-hidden shadow-md shadow-black/5 rounded-md border border-border bg-popover text-popover-foreground p-2 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",
5448
+ className
5449
+ ),
5450
+ ...props
5451
+ }
5452
+ );
5453
+ }
5454
+ function ContextMenuContent({
5455
+ className,
5456
+ ...props
5457
+ }) {
5458
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.ContextMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
5459
+ radixUi.ContextMenu.Content,
5460
+ {
5461
+ "data-slot": "context-menu-content",
5462
+ className: cn(
5463
+ "space-y-0.5 z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md shadow-black/5 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",
5464
+ className
5465
+ ),
5466
+ ...props
5467
+ }
5468
+ ) });
5469
+ }
5470
+ function ContextMenuItem({
5471
+ className,
5472
+ inset,
5473
+ variant,
5474
+ ...props
5475
+ }) {
5476
+ return /* @__PURE__ */ jsxRuntime.jsx(
5477
+ radixUi.ContextMenu.Item,
5478
+ {
5479
+ "data-slot": "context-menu-item",
5480
+ className: cn(
5481
+ "text-foreground relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0",
5482
+ "focus:bg-accent focus:text-foreground",
5483
+ "data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",
5484
+ inset && "ps-8",
5485
+ variant === "destructive" && "text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",
5486
+ className
5487
+ ),
5488
+ ...props
5489
+ }
5490
+ );
5491
+ }
5492
+ function ContextMenuCheckboxItem({
3950
5493
  className,
3951
- type,
3952
- variant,
5494
+ children,
5495
+ checked,
5496
+ ...props
5497
+ }) {
5498
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5499
+ radixUi.ContextMenu.CheckboxItem,
5500
+ {
5501
+ "data-slot": "context-menu-checkbox-item",
5502
+ className: cn(
5503
+ "relative flex cursor-default select-none items-center rounded-md py-1.5 ps-8 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
5504
+ className
5505
+ ),
5506
+ checked,
5507
+ ...props,
5508
+ children: [
5509
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-2 flex size-3.5 items-center text-muted-foreground justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4 text-primary" }) }) }),
5510
+ children
5511
+ ]
5512
+ }
5513
+ );
5514
+ }
5515
+ function ContextMenuRadioItem({
5516
+ className,
5517
+ children,
5518
+ ...props
5519
+ }) {
5520
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5521
+ radixUi.ContextMenu.RadioItem,
5522
+ {
5523
+ "data-slot": "context-menu-radio-item",
5524
+ className: cn(
5525
+ "relative flex cursor-default select-none items-center rounded-md py-1.5 ps-6 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
5526
+ className
5527
+ ),
5528
+ ...props,
5529
+ children: [
5530
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-1.5 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.ContextMenu.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "size-1.5 fill-primary stroke-primary" }) }) }),
5531
+ children
5532
+ ]
5533
+ }
5534
+ );
5535
+ }
5536
+ function ContextMenuLabel({
5537
+ className,
5538
+ inset,
3953
5539
  ...props
3954
5540
  }) {
3955
5541
  return /* @__PURE__ */ jsxRuntime.jsx(
3956
- "input",
5542
+ radixUi.ContextMenu.Label,
3957
5543
  {
3958
- "data-slot": "input",
3959
- type,
3960
- className: cn(inputVariants({ variant }), className),
5544
+ "data-slot": "context-menu-label",
5545
+ className: cn(
5546
+ "px-2 py-1.5 text-xs text-muted-foreground font-medium",
5547
+ inset && "ps-8",
5548
+ className
5549
+ ),
3961
5550
  ...props
3962
5551
  }
3963
5552
  );
3964
5553
  }
3965
- function InputAddon({
5554
+ function ContextMenuSeparator({
3966
5555
  className,
3967
- variant,
3968
- mode,
3969
5556
  ...props
3970
5557
  }) {
3971
5558
  return /* @__PURE__ */ jsxRuntime.jsx(
3972
- "div",
5559
+ radixUi.ContextMenu.Separator,
3973
5560
  {
3974
- "data-slot": "input-addon",
3975
- className: cn(inputAddonVariants({ variant, mode }), className),
5561
+ "data-slot": "context-menu-separator",
5562
+ className: cn("-mx-2 my-1.5 h-px bg-muted", className),
3976
5563
  ...props
3977
5564
  }
3978
5565
  );
3979
5566
  }
3980
- function InputGroup({
5567
+ function ContextMenuShortcut({
3981
5568
  className,
3982
5569
  ...props
3983
5570
  }) {
3984
5571
  return /* @__PURE__ */ jsxRuntime.jsx(
3985
- "div",
5572
+ "span",
3986
5573
  {
3987
- "data-slot": "input-group",
3988
- className: cn(inputGroupVariants(), className),
5574
+ "data-slot": "context-menu-shortcut",
5575
+ className: cn("ms-auto text-xs tracking-widest opacity-60", className),
3989
5576
  ...props
3990
5577
  }
3991
5578
  );
3992
5579
  }
3993
- function InputWrapper({
5580
+ var dayButtonClasses = [
5581
+ "cursor-pointer relative flex size-8 items-center justify-center",
5582
+ "whitespace-nowrap rounded-md p-0 text-foreground",
5583
+ "transition-colors duration-200",
5584
+ "group-[[data-selected]:not(.range-middle)]:[transition-property:color,background-color,border-radius,box-shadow]",
5585
+ "group-[[data-selected]:not(.range-middle)]:duration-150",
5586
+ "group-data-disabled:pointer-events-none",
5587
+ "focus-visible:z-10",
5588
+ "hover:not-in-data-selected:bg-accent",
5589
+ "group-data-selected:bg-primary",
5590
+ "hover:not-in-data-selected:text-foreground",
5591
+ "group-data-selected:text-primary-foreground",
5592
+ "group-data-disabled:text-foreground/30 group-data-disabled:line-through",
5593
+ "group-data-outside:text-foreground/30",
5594
+ "group-data-selected:group-data-outside:text-primary-foreground",
5595
+ "outline-none focus-visible:ring-ring/50 focus-visible:ring",
5596
+ "group-[.range-start:not(.range-end)]:rounded-e-none",
5597
+ "group-[.range-end:not(.range-start)]:rounded-s-none",
5598
+ "group-[.range-middle]:rounded-none",
5599
+ "group-[.range-middle]:group-data-selected:bg-accent",
5600
+ "group-[.range-middle]:group-data-selected:text-foreground"
5601
+ ].join(" ");
5602
+ function Calendar({
3994
5603
  className,
3995
- variant,
5604
+ classNames,
5605
+ showOutsideDays = true,
3996
5606
  ...props
3997
5607
  }) {
3998
5608
  return /* @__PURE__ */ jsxRuntime.jsx(
3999
- "div",
5609
+ reactDayPicker.DayPicker,
5610
+ {
5611
+ "data-slot": "calendar",
5612
+ showOutsideDays,
5613
+ className: cn("p-3", className),
5614
+ classNames: {
5615
+ months: "relative flex flex-col sm:flex-row gap-4",
5616
+ month: "w-full",
5617
+ month_caption: "relative mx-10 mb-1 flex h-8 items-center justify-center z-20",
5618
+ caption_label: "text-sm font-medium",
5619
+ nav: "absolute top-0 flex w-full justify-between z-10",
5620
+ button_previous: cn(
5621
+ buttonVariants({ variant: "ghost" }),
5622
+ "size-8 text-muted-foreground/80 hover:text-foreground p-0"
5623
+ ),
5624
+ button_next: cn(
5625
+ buttonVariants({ variant: "ghost" }),
5626
+ "size-8 text-muted-foreground/80 hover:text-foreground p-0"
5627
+ ),
5628
+ weekday: "size-8 p-0 text-xs font-medium text-muted-foreground/80",
5629
+ day_button: dayButtonClasses,
5630
+ day: "group size-8 px-0 py-px text-sm",
5631
+ range_start: "range-start",
5632
+ range_end: "range-end",
5633
+ range_middle: "range-middle",
5634
+ today: "*:after:pointer-events-none *:after:absolute *:after:bottom-1 *:after:start-1/2 *:after:z-10 *:after:size-0.75 *:after:-translate-x-1/2 rtl:*:after:translate-x-1/2 *:after:rounded-full *:after:bg-primary [&[data-selected]:not(.range-middle)>*]:after:bg-background [&[data-disabled]>*]:after:bg-foreground/30 *:after:transition-colors",
5635
+ outside: "text-muted-foreground data-selected:bg-accent/50 data-selected:text-muted-foreground",
5636
+ hidden: "invisible",
5637
+ week_number: "size-8 p-0 text-xs font-medium text-muted-foreground/80",
5638
+ ...classNames
5639
+ },
5640
+ components: {
5641
+ Chevron: (chevronProps) => {
5642
+ if (chevronProps.orientation === "left") {
5643
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "size-4 rtl:rotate-180" });
5644
+ }
5645
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-4 rtl:rotate-180" });
5646
+ }
5647
+ },
5648
+ ...props
5649
+ }
5650
+ );
5651
+ }
5652
+ function DateField({
5653
+ className,
5654
+ children,
5655
+ ...props
5656
+ }) {
5657
+ return /* @__PURE__ */ jsxRuntime.jsx(
5658
+ reactAriaComponents.DateField,
4000
5659
  {
4001
- "data-slot": "input-wrapper",
4002
- className: cn(
4003
- inputVariants({ variant }),
4004
- inputWrapperVariants({ variant }),
4005
- className
5660
+ className: reactAriaComponents.composeRenderProps(className, (className2) => cn(className2)),
5661
+ "data-slot": "datefield",
5662
+ ...props,
5663
+ children
5664
+ }
5665
+ );
5666
+ }
5667
+ function TimeField({
5668
+ className,
5669
+ children,
5670
+ ...props
5671
+ }) {
5672
+ return /* @__PURE__ */ jsxRuntime.jsx(
5673
+ reactAriaComponents.TimeField,
5674
+ {
5675
+ className: reactAriaComponents.composeRenderProps(className, (className2) => cn(className2)),
5676
+ "data-slot": "datefield",
5677
+ ...props,
5678
+ children
5679
+ }
5680
+ );
5681
+ }
5682
+ function DateSegment({ className, ...props }) {
5683
+ return /* @__PURE__ */ jsxRuntime.jsx(
5684
+ reactAriaComponents.DateSegment,
5685
+ {
5686
+ className: reactAriaComponents.composeRenderProps(
5687
+ className,
5688
+ (className2) => cn(
5689
+ "text-foreground inline-flex rounded px-0.5 caret-transparent outline-hidden data-[type=literal]:text-muted-foreground/70 data-[type=literal]:px-0 data-placeholder:text-muted-foreground/70 data-invalid:data-focused:bg-destructive data-invalid:data-placeholder:text-destructive data-invalid:text-destructive data-invalid:data-focused:data-placeholder:text-destructive-foreground data-invalid:data-focused:text-destructive-foreground data-focused:bg-accent data-focused:data-placeholder:text-foreground data-focused:text-foreground data-disabled:cursor-not-allowed data-disabled:opacity-50",
5690
+ className2
5691
+ )
4006
5692
  ),
4007
5693
  ...props
4008
5694
  }
4009
5695
  );
4010
5696
  }
5697
+ var dateInputStyles = "relative inline-flex items-center overflow-hidden whitespace-nowrap data-focus-within:ring-ring/30 data-focus-within:border-ring data-focus-within:outline-none data-focus-within:ring-[3px] data-focus-within:has-aria-invalid:ring-destructive/20 dark:data-focus-within:has-aria-invalid:ring-destructive/40 data-focus-within:has-aria-invalid:border-destructive";
5698
+ function DateInput({
5699
+ className,
5700
+ variant = "md",
5701
+ ...props
5702
+ }) {
5703
+ return /* @__PURE__ */ jsxRuntime.jsx(
5704
+ reactAriaComponents.DateInput,
5705
+ {
5706
+ "data-slot": "input",
5707
+ className: reactAriaComponents.composeRenderProps(
5708
+ className,
5709
+ (className2) => cn(inputVariants({ variant }), dateInputStyles, className2)
5710
+ ),
5711
+ ...props,
5712
+ children: (segment) => /* @__PURE__ */ jsxRuntime.jsx(DateSegment, { segment })
5713
+ }
5714
+ );
5715
+ }
4011
5716
  var labelVariants = classVarianceAuthority.cva(
4012
5717
  "text-sm leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
4013
5718
  {
@@ -4036,11 +5741,12 @@ function Label2({
4036
5741
  }
4037
5742
  );
4038
5743
  }
4039
- var Separator2 = React__namespace.forwardRef(
5744
+ var Separator2 = React4__namespace.forwardRef(
4040
5745
  ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
4041
5746
  SeparatorPrimitive__namespace.Root,
4042
5747
  {
4043
5748
  ref,
5749
+ "data-slot": "separator",
4044
5750
  decorative,
4045
5751
  orientation,
4046
5752
  className: cn(
@@ -4233,45 +5939,215 @@ function FieldSeparator({
4233
5939
  }
4234
5940
  );
4235
5941
  }
4236
- function FieldError({
5942
+ function FieldError({
5943
+ className,
5944
+ children,
5945
+ errors,
5946
+ ...props
5947
+ }) {
5948
+ const content = React4.useMemo(() => {
5949
+ if (children) {
5950
+ return children;
5951
+ }
5952
+ if (!errors) {
5953
+ return null;
5954
+ }
5955
+ if (errors?.length === 1 && errors[0]?.message) {
5956
+ return errors[0].message;
5957
+ }
5958
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
5959
+ (error, index) => error?.message && /* @__PURE__ */ jsxRuntime.jsx("li", { children: error.message }, index)
5960
+ ) });
5961
+ }, [children, errors]);
5962
+ if (!content) {
5963
+ return null;
5964
+ }
5965
+ return /* @__PURE__ */ jsxRuntime.jsx(
5966
+ "div",
5967
+ {
5968
+ role: "alert",
5969
+ "data-slot": "field-error",
5970
+ className: cn("text-destructive text-sm font-normal", className),
5971
+ ...props,
5972
+ children: content
5973
+ }
5974
+ );
5975
+ }
5976
+ function InputOTP({
5977
+ className,
5978
+ containerClassName,
5979
+ ...props
5980
+ }) {
5981
+ return /* @__PURE__ */ jsxRuntime.jsx(
5982
+ inputOtp.OTPInput,
5983
+ {
5984
+ "data-slot": "input-otp",
5985
+ containerClassName: cn(
5986
+ "flex items-center gap-2 has-disabled:opacity-50",
5987
+ containerClassName
5988
+ ),
5989
+ className: cn("disabled:cursor-not-allowed", className),
5990
+ ...props
5991
+ }
5992
+ );
5993
+ }
5994
+ function InputOTPGroup({ className, ...props }) {
5995
+ return /* @__PURE__ */ jsxRuntime.jsx(
5996
+ "div",
5997
+ {
5998
+ "data-slot": "input-otp-group",
5999
+ className: cn("flex items-center", className),
6000
+ ...props
6001
+ }
6002
+ );
6003
+ }
6004
+ function InputOTPSlot({
6005
+ index,
6006
+ className,
6007
+ ...props
6008
+ }) {
6009
+ const inputOTPContext = React4__namespace.useContext(inputOtp.OTPInputContext);
6010
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
6011
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6012
+ "div",
6013
+ {
6014
+ "data-slot": "input-otp-slot",
6015
+ "data-active": isActive,
6016
+ className: cn(
6017
+ "data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex size-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
6018
+ className
6019
+ ),
6020
+ ...props,
6021
+ children: [
6022
+ char,
6023
+ hasFakeCaret && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
6024
+ ]
6025
+ }
6026
+ );
6027
+ }
6028
+ function InputOTPSeparator({ ...props }) {
6029
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, {}) });
6030
+ }
6031
+ var radioGroupVariants = classVarianceAuthority.cva("grid gap-2.5", {
6032
+ variants: {
6033
+ variant: {
6034
+ primary: "",
6035
+ mono: ""
6036
+ },
6037
+ size: {
6038
+ sm: "",
6039
+ md: "",
6040
+ lg: ""
6041
+ }
6042
+ },
6043
+ defaultVariants: {
6044
+ variant: "primary",
6045
+ size: "md"
6046
+ }
6047
+ });
6048
+ var RadioGroupContext = React4__namespace.createContext({ variant: "primary", size: "md" });
6049
+ function RadioGroup2({
6050
+ className,
6051
+ variant,
6052
+ size,
6053
+ ...props
6054
+ }) {
6055
+ return /* @__PURE__ */ jsxRuntime.jsx(
6056
+ RadioGroupContext.Provider,
6057
+ {
6058
+ value: { variant: variant ?? "primary", size: size ?? "md" },
6059
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6060
+ radixUi.RadioGroup.Root,
6061
+ {
6062
+ "data-slot": "radio-group",
6063
+ className: cn(radioGroupVariants({ variant, size }), className),
6064
+ ...props
6065
+ }
6066
+ )
6067
+ }
6068
+ );
6069
+ }
6070
+ var radioItemVariants = classVarianceAuthority.cva(
6071
+ "peer aspect-square rounded-full border outline-hidden ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20 [[data-invalid=true]_&]:border-destructive/60 [[data-invalid=true]_&]:ring-destructive/10 dark:[[data-invalid=true]_&]:border-destructive dark:[[data-invalid=true]_&]:ring-destructive/20 border-input text-primary data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",
6072
+ {
6073
+ variants: {
6074
+ size: {
6075
+ sm: "size-4.5 [&_svg]:size-2",
6076
+ md: "size-5 [&_svg]:size-2.5",
6077
+ lg: "size-5.5 [&_svg]:size-3"
6078
+ }
6079
+ },
6080
+ defaultVariants: {
6081
+ size: "md"
6082
+ }
6083
+ }
6084
+ );
6085
+ function RadioGroupItem({
6086
+ className,
6087
+ size,
6088
+ ...props
6089
+ }) {
6090
+ const { size: contextSize } = React4__namespace.useContext(RadioGroupContext);
6091
+ const effectiveSize = size ?? contextSize;
6092
+ return /* @__PURE__ */ jsxRuntime.jsx(
6093
+ radixUi.RadioGroup.Item,
6094
+ {
6095
+ "data-slot": "radio-group-item",
6096
+ className: cn(radioItemVariants({ size: effectiveSize }), className),
6097
+ ...props,
6098
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6099
+ radixUi.RadioGroup.Indicator,
6100
+ {
6101
+ "data-slot": "radio-group-indicator",
6102
+ className: "flex items-center justify-center",
6103
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "fill-current text-current" })
6104
+ }
6105
+ )
6106
+ }
6107
+ );
6108
+ }
6109
+ function Slider({
6110
+ className,
6111
+ children,
6112
+ ...props
6113
+ }) {
6114
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6115
+ radixUi.Slider.Root,
6116
+ {
6117
+ "data-slot": "slider",
6118
+ className: cn(
6119
+ "relative flex h-4 w-full touch-none select-none items-center data-disabled:cursor-not-allowed data-disabled:opacity-50",
6120
+ className
6121
+ ),
6122
+ ...props,
6123
+ children: [
6124
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.Slider.Track, { className: "relative h-1.5 w-full overflow-hidden rounded-full bg-accent", children: /* @__PURE__ */ jsxRuntime.jsx(radixUi.Slider.Range, { className: "absolute h-full bg-primary" }) }),
6125
+ children
6126
+ ]
6127
+ }
6128
+ );
6129
+ }
6130
+ function SliderThumb({
4237
6131
  className,
4238
- children,
4239
- errors,
4240
6132
  ...props
4241
6133
  }) {
4242
- const content = React.useMemo(() => {
4243
- if (children) {
4244
- return children;
4245
- }
4246
- if (!errors) {
4247
- return null;
4248
- }
4249
- if (errors?.length === 1 && errors[0]?.message) {
4250
- return errors[0].message;
4251
- }
4252
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
4253
- (error, index) => error?.message && /* @__PURE__ */ jsxRuntime.jsx("li", { children: error.message }, index)
4254
- ) });
4255
- }, [children, errors]);
4256
- if (!content) {
4257
- return null;
4258
- }
4259
6134
  return /* @__PURE__ */ jsxRuntime.jsx(
4260
- "div",
6135
+ radixUi.Slider.Thumb,
4261
6136
  {
4262
- role: "alert",
4263
- "data-slot": "field-error",
4264
- className: cn("text-destructive text-sm font-normal", className),
4265
- ...props,
4266
- children: content
6137
+ "data-slot": "slider-thumb",
6138
+ className: cn(
6139
+ "box-content block size-4 shrink-0 cursor-pointer rounded-full border-2 border-primary bg-primary-foreground shadow-xs shadow-black/5 outline-hidden",
6140
+ className
6141
+ ),
6142
+ ...props
4267
6143
  }
4268
6144
  );
4269
6145
  }
4270
- var SwitchContext = React__namespace.createContext({
6146
+ var SwitchContext = React4__namespace.createContext({
4271
6147
  permanent: false
4272
6148
  });
4273
6149
  var useSwitchContext = () => {
4274
- const context = React__namespace.useContext(SwitchContext);
6150
+ const context = React4__namespace.useContext(SwitchContext);
4275
6151
  if (!context) {
4276
6152
  throw new Error("SwitchIndicator must be used within a Switch component");
4277
6153
  }
@@ -4438,6 +6314,43 @@ function SwitchIndicator({
4438
6314
  }
4439
6315
  );
4440
6316
  }
6317
+ var textareaVariants = classVarianceAuthority.cva(
6318
+ `
6319
+ w-full bg-background border border-input shadow-xs shadow-black/5 transition-[color,box-shadow]
6320
+ text-foreground placeholder:text-muted-foreground/80
6321
+ focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/30
6322
+ disabled:cursor-not-allowed disabled:opacity-50
6323
+ [&[readonly]]:bg-muted/80 [&[readonly]]:cursor-not-allowed
6324
+ aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10
6325
+ dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
6326
+ `,
6327
+ {
6328
+ variants: {
6329
+ variant: {
6330
+ sm: "px-2.5 py-2.5 text-xs rounded-md",
6331
+ md: "px-3 py-3 text-[0.8125rem] leading-[var(--text-sm--line-height)] rounded-md",
6332
+ lg: "px-4 py-4 text-sm rounded-md"
6333
+ }
6334
+ },
6335
+ defaultVariants: {
6336
+ variant: "md"
6337
+ }
6338
+ }
6339
+ );
6340
+ function Textarea({
6341
+ className,
6342
+ variant,
6343
+ ...props
6344
+ }) {
6345
+ return /* @__PURE__ */ jsxRuntime.jsx(
6346
+ "textarea",
6347
+ {
6348
+ "data-slot": "textarea",
6349
+ className: cn(textareaVariants({ variant }), className),
6350
+ ...props
6351
+ }
6352
+ );
6353
+ }
4441
6354
  function ScrollArea({
4442
6355
  className,
4443
6356
  viewportClassName,
@@ -4497,10 +6410,10 @@ function Scrollspy({
4497
6410
  dataAttribute = "scrollspy",
4498
6411
  history = true
4499
6412
  }) {
4500
- const selfRef = React.useRef(null);
4501
- const anchorElementsRef = React.useRef(null);
4502
- const prevIdTracker = React.useRef(null);
4503
- const setActiveSection = React.useCallback(
6413
+ const selfRef = React4.useRef(null);
6414
+ const anchorElementsRef = React4.useRef(null);
6415
+ const prevIdTracker = React4.useRef(null);
6416
+ const setActiveSection = React4.useCallback(
4504
6417
  (sectionId, force = false) => {
4505
6418
  if (!sectionId) return;
4506
6419
  anchorElementsRef.current?.forEach((item) => {
@@ -4519,7 +6432,7 @@ function Scrollspy({
4519
6432
  },
4520
6433
  [anchorElementsRef, dataAttribute, history, onUpdate]
4521
6434
  );
4522
- const handleScroll = React.useCallback(() => {
6435
+ const handleScroll = React4.useCallback(() => {
4523
6436
  if (!anchorElementsRef.current || anchorElementsRef.current.length === 0)
4524
6437
  return;
4525
6438
  const scrollElement = targetRef?.current === document ? window : targetRef?.current;
@@ -4557,7 +6470,7 @@ function Scrollspy({
4557
6470
  }
4558
6471
  });
4559
6472
  }, [anchorElementsRef, targetRef, dataAttribute, offset, setActiveSection]);
4560
- const scrollTo = React.useCallback(
6473
+ const scrollTo = React4.useCallback(
4561
6474
  (anchorElement) => (event) => {
4562
6475
  if (event) event.preventDefault();
4563
6476
  const sectionId = anchorElement.getAttribute(`data-${dataAttribute}-anchor`)?.replace("#", "") || null;
@@ -4584,7 +6497,7 @@ function Scrollspy({
4584
6497
  },
4585
6498
  [dataAttribute, offset, smooth, targetRef, setActiveSection]
4586
6499
  );
4587
- const scrollToHashSection = React.useCallback(() => {
6500
+ const scrollToHashSection = React4.useCallback(() => {
4588
6501
  const hash = CSS.escape(window.location.hash.replace("#", ""));
4589
6502
  if (hash) {
4590
6503
  const targetElement = document.querySelector(
@@ -4595,7 +6508,7 @@ function Scrollspy({
4595
6508
  }
4596
6509
  }
4597
6510
  }, [dataAttribute, scrollTo]);
4598
- React.useEffect(() => {
6511
+ React4.useEffect(() => {
4599
6512
  if (selfRef.current) {
4600
6513
  anchorElementsRef.current = Array.from(
4601
6514
  selfRef.current.querySelectorAll(`[data-${dataAttribute}-anchor]`)
@@ -4714,27 +6627,320 @@ function ToolbarActions({
4714
6627
  }
4715
6628
  );
4716
6629
  }
4717
- var MOBILE_BREAKPOINT = 992;
4718
- function useIsMobile() {
4719
- const [isMobile, setIsMobile] = React__namespace.useState(
4720
- void 0
6630
+ function Progress({
6631
+ className,
6632
+ indicatorClassName,
6633
+ value,
6634
+ ...props
6635
+ }) {
6636
+ return /* @__PURE__ */ jsxRuntime.jsx(
6637
+ radixUi.Progress.Root,
6638
+ {
6639
+ "data-slot": "progress",
6640
+ className: cn(
6641
+ "relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",
6642
+ className
6643
+ ),
6644
+ ...props,
6645
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6646
+ radixUi.Progress.Indicator,
6647
+ {
6648
+ "data-slot": "progress-indicator",
6649
+ className: cn(
6650
+ "h-full w-full flex-1 bg-primary transition-all",
6651
+ indicatorClassName
6652
+ ),
6653
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
6654
+ }
6655
+ )
6656
+ }
6657
+ );
6658
+ }
6659
+ function ProgressCircle({
6660
+ className,
6661
+ indicatorClassName,
6662
+ trackClassName,
6663
+ value = 0,
6664
+ size = 48,
6665
+ strokeWidth = 4,
6666
+ children,
6667
+ ...props
6668
+ }) {
6669
+ const radius = (size - strokeWidth) / 2;
6670
+ const circumference = radius * 2 * Math.PI;
6671
+ const offset = circumference - value / 100 * circumference;
6672
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6673
+ "div",
6674
+ {
6675
+ "data-slot": "progress-circle",
6676
+ role: "progressbar",
6677
+ "aria-valuenow": value,
6678
+ "aria-valuemin": 0,
6679
+ "aria-valuemax": 100,
6680
+ className: cn(
6681
+ "relative inline-flex items-center justify-center",
6682
+ className
6683
+ ),
6684
+ style: { width: size, height: size },
6685
+ ...props,
6686
+ children: [
6687
+ /* @__PURE__ */ jsxRuntime.jsxs(
6688
+ "svg",
6689
+ {
6690
+ className: "absolute inset-0 -rotate-90",
6691
+ width: size,
6692
+ height: size,
6693
+ viewBox: `0 0 ${size} ${size}`,
6694
+ children: [
6695
+ /* @__PURE__ */ jsxRuntime.jsx(
6696
+ "circle",
6697
+ {
6698
+ "data-slot": "progress-circle-track",
6699
+ cx: size / 2,
6700
+ cy: size / 2,
6701
+ r: radius,
6702
+ stroke: "currentColor",
6703
+ strokeWidth,
6704
+ fill: "none",
6705
+ className: cn("text-secondary", trackClassName)
6706
+ }
6707
+ ),
6708
+ /* @__PURE__ */ jsxRuntime.jsx(
6709
+ "circle",
6710
+ {
6711
+ "data-slot": "progress-circle-indicator",
6712
+ cx: size / 2,
6713
+ cy: size / 2,
6714
+ r: radius,
6715
+ stroke: "currentColor",
6716
+ strokeWidth,
6717
+ fill: "none",
6718
+ strokeDasharray: circumference,
6719
+ strokeDashoffset: offset,
6720
+ strokeLinecap: "round",
6721
+ className: cn(
6722
+ "text-primary transition-all duration-300 ease-in-out",
6723
+ indicatorClassName
6724
+ )
6725
+ }
6726
+ )
6727
+ ]
6728
+ }
6729
+ ),
6730
+ children && /* @__PURE__ */ jsxRuntime.jsx(
6731
+ "div",
6732
+ {
6733
+ "data-slot": "progress-circle-content",
6734
+ className: "relative z-10 flex items-center justify-center text-sm font-medium",
6735
+ children
6736
+ }
6737
+ )
6738
+ ]
6739
+ }
6740
+ );
6741
+ }
6742
+ function ProgressRadial({
6743
+ className,
6744
+ value = 0,
6745
+ size = 120,
6746
+ strokeWidth = 8,
6747
+ startAngle = -90,
6748
+ endAngle = 90,
6749
+ showLabel = false,
6750
+ trackClassName,
6751
+ indicatorClassName,
6752
+ children,
6753
+ ...props
6754
+ }) {
6755
+ const radius = (size - strokeWidth) / 2;
6756
+ const angleRange = endAngle - startAngle;
6757
+ const progressAngle = value / 100 * angleRange;
6758
+ const toRadians = (degrees) => degrees * Math.PI / 180;
6759
+ const startX = size / 2 + radius * Math.cos(toRadians(startAngle));
6760
+ const startY = size / 2 + radius * Math.sin(toRadians(startAngle));
6761
+ const endX = size / 2 + radius * Math.cos(toRadians(startAngle + progressAngle));
6762
+ const endY = size / 2 + radius * Math.sin(toRadians(startAngle + progressAngle));
6763
+ const largeArc = progressAngle > 180 ? 1 : 0;
6764
+ const pathData = [
6765
+ "M",
6766
+ startX,
6767
+ startY,
6768
+ "A",
6769
+ radius,
6770
+ radius,
6771
+ 0,
6772
+ largeArc,
6773
+ 1,
6774
+ endX,
6775
+ endY
6776
+ ].join(" ");
6777
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6778
+ "div",
6779
+ {
6780
+ "data-slot": "progress-radial",
6781
+ role: "progressbar",
6782
+ "aria-valuenow": value,
6783
+ "aria-valuemin": 0,
6784
+ "aria-valuemax": 100,
6785
+ className: cn(
6786
+ "relative inline-flex items-center justify-center",
6787
+ className
6788
+ ),
6789
+ style: { width: size, height: size },
6790
+ ...props,
6791
+ children: [
6792
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
6793
+ /* @__PURE__ */ jsxRuntime.jsx(
6794
+ "path",
6795
+ {
6796
+ d: [
6797
+ "M",
6798
+ size / 2 + radius * Math.cos(toRadians(startAngle)),
6799
+ size / 2 + radius * Math.sin(toRadians(startAngle)),
6800
+ "A",
6801
+ radius,
6802
+ radius,
6803
+ 0,
6804
+ angleRange > 180 ? 1 : 0,
6805
+ 1,
6806
+ size / 2 + radius * Math.cos(toRadians(endAngle)),
6807
+ size / 2 + radius * Math.sin(toRadians(endAngle))
6808
+ ].join(" "),
6809
+ stroke: "currentColor",
6810
+ strokeWidth,
6811
+ fill: "none",
6812
+ strokeLinecap: "round",
6813
+ className: cn("text-secondary", trackClassName)
6814
+ }
6815
+ ),
6816
+ /* @__PURE__ */ jsxRuntime.jsx(
6817
+ "path",
6818
+ {
6819
+ d: pathData,
6820
+ stroke: "currentColor",
6821
+ strokeWidth,
6822
+ fill: "none",
6823
+ strokeLinecap: "round",
6824
+ className: cn(
6825
+ "text-primary transition-all duration-300 ease-in-out",
6826
+ indicatorClassName
6827
+ )
6828
+ }
6829
+ )
6830
+ ] }),
6831
+ (showLabel || children) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: children || /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-lg font-bold", children: [
6832
+ value,
6833
+ "%"
6834
+ ] }) })
6835
+ ]
6836
+ }
6837
+ );
6838
+ }
6839
+ function Pagination({ className, ...props }) {
6840
+ return /* @__PURE__ */ jsxRuntime.jsx(
6841
+ "nav",
6842
+ {
6843
+ "data-slot": "pagination",
6844
+ role: "navigation",
6845
+ "aria-label": "pagination",
6846
+ className: cn("mx-auto flex w-full justify-center", className),
6847
+ ...props
6848
+ }
6849
+ );
6850
+ }
6851
+ function PaginationContent({
6852
+ className,
6853
+ ...props
6854
+ }) {
6855
+ return /* @__PURE__ */ jsxRuntime.jsx(
6856
+ "ul",
6857
+ {
6858
+ "data-slot": "pagination-content",
6859
+ className: cn("flex flex-row items-center gap-1", className),
6860
+ ...props
6861
+ }
6862
+ );
6863
+ }
6864
+ function PaginationItem({ className, ...props }) {
6865
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-slot": "pagination-item", className, ...props });
6866
+ }
6867
+ function PaginationEllipsis({
6868
+ className,
6869
+ ...props
6870
+ }) {
6871
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6872
+ "span",
6873
+ {
6874
+ "data-slot": "pagination-ellipsis",
6875
+ "aria-hidden": true,
6876
+ className: cn("flex size-9 items-center justify-center", className),
6877
+ ...props,
6878
+ children: [
6879
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "size-4" }),
6880
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "More pages" })
6881
+ ]
6882
+ }
6883
+ );
6884
+ }
6885
+ var TimelineItem = React4__namespace.forwardRef(
6886
+ ({ line, icon: Icon, children, removeSpace, className }, ref) => {
6887
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex items-start relative", className), children: [
6888
+ line && /* @__PURE__ */ jsxRuntime.jsx(
6889
+ "div",
6890
+ {
6891
+ className: cn(
6892
+ "w-9 start-0 top-9 absolute bottom-0",
6893
+ "translate-x-1/2 rtl:-translate-x-1/2",
6894
+ "border-s border-s-input"
6895
+ )
6896
+ }
6897
+ ),
6898
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center shrink-0 rounded-full bg-accent/60 border border-input size-9 text-secondary-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 16, className: "text-base" }) }),
6899
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("ps-2.5 text-base grow", !removeSpace && "mb-7"), children })
6900
+ ] });
6901
+ }
6902
+ );
6903
+ TimelineItem.displayName = "TimelineItem";
6904
+ var kbdVariants = classVarianceAuthority.cva(
6905
+ "inline-flex items-center justify-center font-mono rounded-md",
6906
+ {
6907
+ variants: {
6908
+ variant: {
6909
+ default: "bg-accent border border-border text-accent-foreground",
6910
+ outline: "text-accent-foreground border border-input"
6911
+ },
6912
+ size: {
6913
+ md: "h-7 min-w-7 px-1.5 text-xs [&_svg]:size-3.5",
6914
+ sm: "h-6 min-w-6 px-1 text-xs leading-3 [&_svg]:size-3",
6915
+ xs: "h-5 min-w-5 px-1 text-xs leading-3 [&_svg]:size-3"
6916
+ }
6917
+ },
6918
+ defaultVariants: {
6919
+ variant: "default",
6920
+ size: "md"
6921
+ }
6922
+ }
6923
+ );
6924
+ function Kbd({
6925
+ className,
6926
+ variant,
6927
+ size,
6928
+ ...props
6929
+ }) {
6930
+ return /* @__PURE__ */ jsxRuntime.jsx(
6931
+ "kbd",
6932
+ {
6933
+ "data-slot": "kbd",
6934
+ className: cn(kbdVariants({ variant, size }), className),
6935
+ ...props
6936
+ }
4721
6937
  );
4722
- React__namespace.useEffect(() => {
4723
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
4724
- const onChange = () => {
4725
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4726
- };
4727
- mql.addEventListener("change", onChange);
4728
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
4729
- return () => mql.removeEventListener("change", onChange);
4730
- }, []);
4731
- return !!isMobile;
4732
6938
  }
4733
6939
  function useCopyToClipboard({
4734
6940
  timeout = 2e3,
4735
6941
  onCopy
4736
6942
  } = {}) {
4737
- const [isCopied, setIsCopied] = React__namespace.useState(false);
6943
+ const [isCopied, setIsCopied] = React4__namespace.useState(false);
4738
6944
  const copyToClipboard = (value) => {
4739
6945
  if (typeof window === "undefined" || !navigator.clipboard.writeText) {
4740
6946
  return;
@@ -4752,14 +6958,105 @@ function useCopyToClipboard({
4752
6958
  };
4753
6959
  return { isCopied, copyToClipboard };
4754
6960
  }
6961
+ var codeVariants = classVarianceAuthority.cva("relative rounded-md font-mono font-medium", {
6962
+ variants: {
6963
+ variant: {
6964
+ default: "bg-muted text-muted-foreground",
6965
+ destructive: "bg-destructive/10 text-destructive",
6966
+ outline: "border border-border bg-background text-foreground"
6967
+ },
6968
+ size: {
6969
+ default: "text-sm px-2.5 py-1.5",
6970
+ sm: "text-xs px-2 py-1.5",
6971
+ lg: "text-base px-3 py-1.5"
6972
+ }
6973
+ },
6974
+ defaultVariants: {
6975
+ variant: "default",
6976
+ size: "default"
6977
+ }
6978
+ });
6979
+ function Code({
6980
+ className,
6981
+ variant,
6982
+ size,
6983
+ asChild = false,
6984
+ showCopyButton = false,
6985
+ copyText,
6986
+ children,
6987
+ ...props
6988
+ }) {
6989
+ const { isCopied, copyToClipboard } = useCopyToClipboard();
6990
+ const Comp = asChild ? SlotPrimitive2.Slot : "code";
6991
+ const textToCopy = copyText || (typeof children === "string" ? children : "");
6992
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6993
+ "span",
6994
+ {
6995
+ className: cn("inline-flex items-center gap-2", className),
6996
+ "data-slot": "code",
6997
+ children: [
6998
+ /* @__PURE__ */ jsxRuntime.jsx(
6999
+ Comp,
7000
+ {
7001
+ "data-slot": "code-panel",
7002
+ className: cn(codeVariants({ variant, size })),
7003
+ ...props,
7004
+ children
7005
+ }
7006
+ ),
7007
+ showCopyButton && textToCopy && /* @__PURE__ */ jsxRuntime.jsx(
7008
+ Button,
7009
+ {
7010
+ mode: "icon",
7011
+ size: "sm",
7012
+ variant: "ghost",
7013
+ "aria-label": isCopied ? "Copied" : "Copy to clipboard",
7014
+ className: "size-4 p-0 opacity-60 hover:opacity-100",
7015
+ onClick: () => copyToClipboard(textToCopy),
7016
+ children: isCopied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-3" })
7017
+ }
7018
+ )
7019
+ ]
7020
+ }
7021
+ );
7022
+ }
7023
+ var MOBILE_BREAKPOINT = 992;
7024
+ function useIsMobile() {
7025
+ const [isMobile, setIsMobile] = React4__namespace.useState(
7026
+ void 0
7027
+ );
7028
+ React4__namespace.useEffect(() => {
7029
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
7030
+ const onChange = () => {
7031
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
7032
+ };
7033
+ mql.addEventListener("change", onChange);
7034
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
7035
+ return () => mql.removeEventListener("change", onChange);
7036
+ }, []);
7037
+ return !!isMobile;
7038
+ }
4755
7039
  function useMounted() {
4756
- const [mounted, setMounted] = React__namespace.useState(false);
4757
- React__namespace.useEffect(() => {
7040
+ const [mounted, setMounted] = React4__namespace.useState(false);
7041
+ React4__namespace.useEffect(() => {
4758
7042
  setMounted(true);
4759
7043
  }, []);
4760
7044
  return mounted;
4761
7045
  }
4762
7046
 
7047
+ exports.Accordion = Accordion;
7048
+ exports.AccordionContent = AccordionContent;
7049
+ exports.AccordionItem = AccordionItem;
7050
+ exports.AccordionMenu = AccordionMenu;
7051
+ exports.AccordionMenuGroup = AccordionMenuGroup;
7052
+ exports.AccordionMenuIndicator = AccordionMenuIndicator;
7053
+ exports.AccordionMenuItem = AccordionMenuItem;
7054
+ exports.AccordionMenuLabel = AccordionMenuLabel;
7055
+ exports.AccordionMenuSeparator = AccordionMenuSeparator;
7056
+ exports.AccordionMenuSub = AccordionMenuSub;
7057
+ exports.AccordionMenuSubContent = AccordionMenuSubContent;
7058
+ exports.AccordionMenuSubTrigger = AccordionMenuSubTrigger;
7059
+ exports.AccordionTrigger = AccordionTrigger;
4763
7060
  exports.Alert = Alert;
4764
7061
  exports.AlertContent = AlertContent;
4765
7062
  exports.AlertDescription = AlertDescription;
@@ -4798,6 +7095,7 @@ exports.BreadcrumbPage = BreadcrumbPage;
4798
7095
  exports.BreadcrumbSeparator = BreadcrumbSeparator;
4799
7096
  exports.Button = Button;
4800
7097
  exports.ButtonArrow = ButtonArrow;
7098
+ exports.Calendar = Calendar;
4801
7099
  exports.Card = Card;
4802
7100
  exports.CardContent = CardContent;
4803
7101
  exports.CardDescription = CardDescription;
@@ -4807,7 +7105,42 @@ exports.CardHeading = CardHeading;
4807
7105
  exports.CardTable = CardTable;
4808
7106
  exports.CardTitle = CardTitle;
4809
7107
  exports.CardToolbar = CardToolbar;
7108
+ exports.ChartContainer = ChartContainer;
7109
+ exports.ChartLegend = ChartLegend;
7110
+ exports.ChartLegendContent = ChartLegendContent;
7111
+ exports.ChartStyle = ChartStyle;
7112
+ exports.ChartTooltip = ChartTooltip;
7113
+ exports.ChartTooltipContent = ChartTooltipContent;
4810
7114
  exports.Checkbox = Checkbox;
7115
+ exports.Code = Code;
7116
+ exports.Collapsible = Collapsible;
7117
+ exports.CollapsibleContent = CollapsibleContent;
7118
+ exports.CollapsibleTrigger = CollapsibleTrigger;
7119
+ exports.Command = Command;
7120
+ exports.CommandCheck = CommandCheck;
7121
+ exports.CommandDialog = CommandDialog;
7122
+ exports.CommandEmpty = CommandEmpty;
7123
+ exports.CommandGroup = CommandGroup;
7124
+ exports.CommandInput = CommandInput;
7125
+ exports.CommandItem = CommandItem;
7126
+ exports.CommandList = CommandList;
7127
+ exports.CommandSeparator = CommandSeparator;
7128
+ exports.CommandShortcut = CommandShortcut;
7129
+ exports.ContextMenu = ContextMenu;
7130
+ exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
7131
+ exports.ContextMenuContent = ContextMenuContent;
7132
+ exports.ContextMenuGroup = ContextMenuGroup;
7133
+ exports.ContextMenuItem = ContextMenuItem;
7134
+ exports.ContextMenuLabel = ContextMenuLabel;
7135
+ exports.ContextMenuPortal = ContextMenuPortal;
7136
+ exports.ContextMenuRadioGroup = ContextMenuRadioGroup;
7137
+ exports.ContextMenuRadioItem = ContextMenuRadioItem;
7138
+ exports.ContextMenuSeparator = ContextMenuSeparator;
7139
+ exports.ContextMenuShortcut = ContextMenuShortcut;
7140
+ exports.ContextMenuSub = ContextMenuSub;
7141
+ exports.ContextMenuSubContent = ContextMenuSubContent;
7142
+ exports.ContextMenuSubTrigger = ContextMenuSubTrigger;
7143
+ exports.ContextMenuTrigger = ContextMenuTrigger;
4811
7144
  exports.DataGrid = DataGrid;
4812
7145
  exports.DataGridColumnHeader = DataGridColumnHeader;
4813
7146
  exports.DataGridColumnVisibility = DataGridColumnVisibility;
@@ -4831,6 +7164,9 @@ exports.DataGridTableLoader = DataGridTableLoader;
4831
7164
  exports.DataGridTableRowSelect = DataGridTableRowSelect;
4832
7165
  exports.DataGridTableRowSelectAll = DataGridTableRowSelectAll;
4833
7166
  exports.DataGridTableRowSpacer = DataGridTableRowSpacer;
7167
+ exports.DateField = DateField;
7168
+ exports.DateInput = DateInput;
7169
+ exports.DateSegment = DateSegment;
4834
7170
  exports.Dialog = Dialog;
4835
7171
  exports.DialogBody = DialogBody;
4836
7172
  exports.DialogClose = DialogClose;
@@ -4884,11 +7220,33 @@ exports.Icons = Icons;
4884
7220
  exports.Input = Input;
4885
7221
  exports.InputAddon = InputAddon;
4886
7222
  exports.InputGroup = InputGroup;
7223
+ exports.InputOTP = InputOTP;
7224
+ exports.InputOTPGroup = InputOTPGroup;
7225
+ exports.InputOTPSeparator = InputOTPSeparator;
7226
+ exports.InputOTPSlot = InputOTPSlot;
4887
7227
  exports.InputWrapper = InputWrapper;
7228
+ exports.Kanban = Kanban;
7229
+ exports.KanbanBoard = KanbanBoard;
7230
+ exports.KanbanColumn = KanbanColumn;
7231
+ exports.KanbanColumnContent = KanbanColumnContent;
7232
+ exports.KanbanColumnHandle = KanbanColumnHandle;
7233
+ exports.KanbanItem = KanbanItem;
7234
+ exports.KanbanItemHandle = KanbanItemHandle;
7235
+ exports.KanbanOverlay = KanbanOverlay;
7236
+ exports.Kbd = Kbd;
4888
7237
  exports.Label = Label2;
7238
+ exports.Pagination = Pagination;
7239
+ exports.PaginationContent = PaginationContent;
7240
+ exports.PaginationEllipsis = PaginationEllipsis;
7241
+ exports.PaginationItem = PaginationItem;
4889
7242
  exports.Popover = Popover;
4890
7243
  exports.PopoverContent = PopoverContent;
4891
7244
  exports.PopoverTrigger = PopoverTrigger;
7245
+ exports.Progress = Progress;
7246
+ exports.ProgressCircle = ProgressCircle;
7247
+ exports.ProgressRadial = ProgressRadial;
7248
+ exports.RadioGroup = RadioGroup2;
7249
+ exports.RadioGroupItem = RadioGroupItem;
4892
7250
  exports.ScrollArea = ScrollArea;
4893
7251
  exports.ScrollBar = ScrollBar;
4894
7252
  exports.Scrollspy = Scrollspy;
@@ -4916,6 +7274,8 @@ exports.SheetPortal = SheetPortal;
4916
7274
  exports.SheetTitle = SheetTitle;
4917
7275
  exports.SheetTrigger = SheetTrigger;
4918
7276
  exports.Skeleton = Skeleton;
7277
+ exports.Slider = Slider;
7278
+ exports.SliderThumb = SliderThumb;
4919
7279
  exports.Spinner = Spinner;
4920
7280
  exports.Switch = Switch;
4921
7281
  exports.SwitchIndicator = SwitchIndicator;
@@ -4924,6 +7284,9 @@ exports.Tabs = Tabs;
4924
7284
  exports.TabsContent = TabsContent;
4925
7285
  exports.TabsList = TabsList;
4926
7286
  exports.TabsTrigger = TabsTrigger;
7287
+ exports.Textarea = Textarea;
7288
+ exports.TimeField = TimeField;
7289
+ exports.TimelineItem = TimelineItem;
4927
7290
  exports.Toolbar = Toolbar;
4928
7291
  exports.ToolbarActions = ToolbarActions;
4929
7292
  exports.ToolbarDescription = ToolbarDescription;
@@ -4934,14 +7297,21 @@ exports.badgeVariants = badgeVariants;
4934
7297
  exports.buttonVariantConfig = buttonVariantConfig;
4935
7298
  exports.buttonVariants = buttonVariants;
4936
7299
  exports.cn = cn;
7300
+ exports.codeVariants = codeVariants;
7301
+ exports.dateInputStyles = dateInputStyles;
4937
7302
  exports.headings = headings;
4938
7303
  exports.inputAddonVariants = inputAddonVariants;
4939
7304
  exports.inputVariants = inputVariants;
7305
+ exports.kbdVariants = kbdVariants;
4940
7306
  exports.labelVariants = labelVariants;
7307
+ exports.radioGroupVariants = radioGroupVariants;
7308
+ exports.radioItemVariants = radioItemVariants;
4941
7309
  exports.selectTriggerVariants = selectTriggerVariants;
4942
7310
  exports.switchShapes = switchShapes;
4943
7311
  exports.switchSizes = switchSizes;
4944
7312
  exports.tabsListVariantConfig = tabsListVariantConfig;
7313
+ exports.textareaVariants = textareaVariants;
7314
+ exports.useChart = useChart;
4945
7315
  exports.useCopyToClipboard = useCopyToClipboard;
4946
7316
  exports.useDataGrid = useDataGrid;
4947
7317
  exports.useIsMobile = useIsMobile;