@prediktif/ui 0.1.21 → 0.1.23

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.js CHANGED
@@ -61,6 +61,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
61
61
  var index_exports = {};
62
62
  __export(index_exports, {
63
63
  AppSidebar: () => AppSidebar,
64
+ AvatarUser: () => AvatarUser,
64
65
  DataTable: () => DataTable,
65
66
  DataTableContentBody: () => DataTableContentBody,
66
67
  DataTableContentHeader: () => DataTableContentHeader,
@@ -73,16 +74,24 @@ __export(index_exports, {
73
74
  DataTableHeaderSearch: () => DataTableHeaderSearch,
74
75
  DataTableHeaderSort: () => DataTableHeaderSort,
75
76
  DataTableHeaderToggle: () => DataTableHeaderToggle,
77
+ EmailLabel: () => EmailLabel,
78
+ EmailVerified: () => EmailVerified,
79
+ GoogleIcon: () => GoogleIcon,
76
80
  HeaderTabs: () => HeaderTabs,
77
81
  HeaderTitle: () => HeaderTitle,
82
+ JoinedLabel: () => JoinedLabel,
83
+ LoginServer: () => LoginServer,
78
84
  RowActions: () => RowActions,
79
85
  StateEmpty: () => StateEmpty,
86
+ UserRole: () => UserRole,
87
+ UserStatus: () => UserStatus,
80
88
  exportToCSV: () => exportToCSV,
81
89
  exportToPDF: () => exportToPDF,
82
90
  exportToXLSX: () => exportToXLSX,
83
91
  features: () => features,
84
92
  flexRender: () => import_react_table4.flexRender,
85
93
  getTableExportData: () => getTableExportData,
94
+ loginSchema: () => loginSchema,
86
95
  printTable: () => printTable,
87
96
  smartFilterFn: () => smartFilterFn,
88
97
  useTable: () => import_react_table4.useTable
@@ -1530,26 +1539,167 @@ var AppSidebar = (0, import_react.memo)(function AppSidebar2({
1530
1539
  ] });
1531
1540
  });
1532
1541
 
1542
+ // src/components/composed/columns/avatar-user.tsx
1543
+ var import_react2 = require("react");
1544
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1545
+ function getInitials(name) {
1546
+ if (name) {
1547
+ return name.split(" ").map((w) => w[0]).join("").slice(0, 2).toUpperCase();
1548
+ }
1549
+ return "U";
1550
+ }
1551
+ var AvatarUser = (0, import_react2.memo)(function AvatarUser2({
1552
+ name,
1553
+ image
1554
+ }) {
1555
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-2", children: [
1556
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(Avatar, { size: "sm", children: [
1557
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarImage, { src: image != null ? image : void 0, alt: name != null ? name : void 0 }),
1558
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AvatarFallback, { children: getInitials(name) })
1559
+ ] }),
1560
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-xs font-medium", children: name })
1561
+ ] });
1562
+ });
1563
+
1564
+ // src/components/composed/columns/email-label.tsx
1565
+ var import_react3 = require("react");
1566
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1567
+ var EmailLabel = (0, import_react3.memo)(function EmailLabel2({ email }) {
1568
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-xs font-mono", children: email });
1569
+ });
1570
+
1571
+ // src/components/composed/columns/email-verified.tsx
1572
+ var import_lucide_react6 = require("lucide-react");
1573
+ var import_react4 = require("react");
1574
+
1575
+ // src/components/ui/badge.tsx
1576
+ var import_merge_props3 = require("@base-ui/react/merge-props");
1577
+ var import_use_render3 = require("@base-ui/react/use-render");
1578
+ var import_class_variance_authority3 = require("class-variance-authority");
1579
+ var import_cn12 = require("cn");
1580
+ var badgeVariants = (0, import_class_variance_authority3.cva)(
1581
+ "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!",
1582
+ {
1583
+ variants: {
1584
+ variant: {
1585
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
1586
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
1587
+ destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
1588
+ outline: "border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground",
1589
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
1590
+ link: "text-primary underline-offset-4 hover:underline"
1591
+ }
1592
+ },
1593
+ defaultVariants: {
1594
+ variant: "default"
1595
+ }
1596
+ }
1597
+ );
1598
+ function Badge(_a) {
1599
+ var _b = _a, {
1600
+ className,
1601
+ variant = "default",
1602
+ render
1603
+ } = _b, props = __objRest(_b, [
1604
+ "className",
1605
+ "variant",
1606
+ "render"
1607
+ ]);
1608
+ return (0, import_use_render3.useRender)({
1609
+ defaultTagName: "span",
1610
+ props: (0, import_merge_props3.mergeProps)(
1611
+ {
1612
+ className: (0, import_cn12.cn)(badgeVariants({ variant }), className)
1613
+ },
1614
+ props
1615
+ ),
1616
+ render,
1617
+ state: {
1618
+ slot: "badge",
1619
+ variant
1620
+ }
1621
+ });
1622
+ }
1623
+
1624
+ // src/components/composed/columns/email-verified.tsx
1625
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1626
+ var EmailVerified = (0, import_react4.memo)(function EmailVerified2({
1627
+ verified
1628
+ }) {
1629
+ return verified ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Badge, { variant: "default", children: [
1630
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.BadgeCheck, { "data-icon": "inline-start" }),
1631
+ "Verified"
1632
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Badge, { variant: "destructive", children: [
1633
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.BadgeCheck, { "data-icon": "inline-start" }),
1634
+ "Unverified"
1635
+ ] });
1636
+ });
1637
+
1638
+ // src/components/composed/columns/joined-label.tsx
1639
+ var import_react5 = require("react");
1640
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1641
+ var JoinedLabel = (0, import_react5.memo)(function JoinedLabel2({
1642
+ joined,
1643
+ locale = "id-ID"
1644
+ }) {
1645
+ if (!joined) return null;
1646
+ const date = typeof joined === "string" ? new Date(joined) : joined;
1647
+ if (Number.isNaN(date.getTime())) return null;
1648
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-xs font-mono", children: new Intl.DateTimeFormat(locale, {
1649
+ day: "numeric",
1650
+ month: "long",
1651
+ year: "numeric"
1652
+ }).format(date) });
1653
+ });
1654
+
1655
+ // src/components/composed/columns/user-role.tsx
1656
+ var import_lucide_react7 = require("lucide-react");
1657
+ var import_react6 = require("react");
1658
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1659
+ var UserRole = (0, import_react6.memo)(function UserRole2({ role }) {
1660
+ const isAdmin = role === "admin";
1661
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Badge, { variant: "outline", className: "capitalize", children: [
1662
+ isAdmin ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react7.UserStarIcon, { "data-icon": "inline-start" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react7.UserIcon, { "data-icon": "inline-start" }),
1663
+ role
1664
+ ] });
1665
+ });
1666
+
1667
+ // src/components/composed/columns/user-status.tsx
1668
+ var import_lucide_react8 = require("lucide-react");
1669
+ var import_react7 = require("react");
1670
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1671
+ var UserStatus = (0, import_react7.memo)(function UserStatus2({
1672
+ status
1673
+ }) {
1674
+ return status ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Badge, { variant: "destructive", children: [
1675
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.BadgeCheck, { "data-icon": "inline-start" }),
1676
+ "Inactive"
1677
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Badge, { variant: "default", children: [
1678
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react8.BadgeCheck, { "data-icon": "inline-start" }),
1679
+ "Active"
1680
+ ] });
1681
+ });
1682
+
1533
1683
  // src/components/composed/data-table/data-table.tsx
1534
1684
  var import_react_table4 = require("@tanstack/react-table");
1535
- var import_lucide_react18 = require("lucide-react");
1685
+ var import_lucide_react21 = require("lucide-react");
1536
1686
  var import_navigation3 = require("next/navigation");
1537
- var import_react6 = require("react");
1687
+ var import_react12 = require("react");
1538
1688
 
1539
1689
  // src/components/composed/state-empty.tsx
1540
- var import_react2 = require("react");
1690
+ var import_react8 = require("react");
1541
1691
 
1542
1692
  // src/components/ui/empty.tsx
1543
- var import_class_variance_authority3 = require("class-variance-authority");
1544
- var import_cn12 = require("cn");
1545
- var import_jsx_runtime13 = require("react/jsx-runtime");
1693
+ var import_class_variance_authority4 = require("class-variance-authority");
1694
+ var import_cn13 = require("cn");
1695
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1546
1696
  function Empty(_a) {
1547
1697
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1548
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1698
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1549
1699
  "div",
1550
1700
  __spreadValues({
1551
1701
  "data-slot": "empty",
1552
- className: (0, import_cn12.cn)(
1702
+ className: (0, import_cn13.cn)(
1553
1703
  "flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
1554
1704
  className
1555
1705
  )
@@ -1558,15 +1708,15 @@ function Empty(_a) {
1558
1708
  }
1559
1709
  function EmptyHeader(_a) {
1560
1710
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1561
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1711
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1562
1712
  "div",
1563
1713
  __spreadValues({
1564
1714
  "data-slot": "empty-header",
1565
- className: (0, import_cn12.cn)("flex max-w-sm flex-col items-center gap-1", className)
1715
+ className: (0, import_cn13.cn)("flex max-w-sm flex-col items-center gap-1", className)
1566
1716
  }, props)
1567
1717
  );
1568
1718
  }
1569
- var emptyMediaVariants = (0, import_class_variance_authority3.cva)(
1719
+ var emptyMediaVariants = (0, import_class_variance_authority4.cva)(
1570
1720
  "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
1571
1721
  {
1572
1722
  variants: {
@@ -1588,22 +1738,22 @@ function EmptyMedia(_a) {
1588
1738
  "className",
1589
1739
  "variant"
1590
1740
  ]);
1591
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1741
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1592
1742
  "div",
1593
1743
  __spreadValues({
1594
1744
  "data-slot": "empty-icon",
1595
1745
  "data-variant": variant,
1596
- className: (0, import_cn12.cn)(emptyMediaVariants({ variant, className }))
1746
+ className: (0, import_cn13.cn)(emptyMediaVariants({ variant, className }))
1597
1747
  }, props)
1598
1748
  );
1599
1749
  }
1600
1750
  function EmptyTitle(_a) {
1601
1751
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1602
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1752
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1603
1753
  "div",
1604
1754
  __spreadValues({
1605
1755
  "data-slot": "empty-title",
1606
- className: (0, import_cn12.cn)(
1756
+ className: (0, import_cn13.cn)(
1607
1757
  "font-heading text-sm font-medium tracking-tight",
1608
1758
  className
1609
1759
  )
@@ -1612,11 +1762,11 @@ function EmptyTitle(_a) {
1612
1762
  }
1613
1763
  function EmptyDescription(_a) {
1614
1764
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1615
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1765
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1616
1766
  "div",
1617
1767
  __spreadValues({
1618
1768
  "data-slot": "empty-description",
1619
- className: (0, import_cn12.cn)(
1769
+ className: (0, import_cn13.cn)(
1620
1770
  "text-xs/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
1621
1771
  className
1622
1772
  )
@@ -1625,11 +1775,11 @@ function EmptyDescription(_a) {
1625
1775
  }
1626
1776
  function EmptyContent(_a) {
1627
1777
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1628
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1778
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1629
1779
  "div",
1630
1780
  __spreadValues({
1631
1781
  "data-slot": "empty-content",
1632
- className: (0, import_cn12.cn)(
1782
+ className: (0, import_cn13.cn)(
1633
1783
  "flex w-full max-w-sm min-w-0 flex-col items-center gap-2 text-xs/relaxed text-balance",
1634
1784
  className
1635
1785
  )
@@ -1638,18 +1788,18 @@ function EmptyContent(_a) {
1638
1788
  }
1639
1789
 
1640
1790
  // src/lib/utils.ts
1641
- var import_cn13 = require("cn");
1791
+ var import_cn14 = require("cn");
1642
1792
 
1643
1793
  // src/components/composed/state-empty.tsx
1644
- var import_jsx_runtime14 = require("react/jsx-runtime");
1794
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1645
1795
  function renderStateIcon(icon) {
1646
1796
  if (typeof icon === "function" || typeof icon === "object" && icon !== null && "render" in icon) {
1647
1797
  const IconComp = icon;
1648
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconComp, {});
1798
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconComp, {});
1649
1799
  }
1650
1800
  return icon;
1651
1801
  }
1652
- var StateEmpty = (0, import_react2.memo)(function StateEmpty2({
1802
+ var StateEmpty = (0, import_react8.memo)(function StateEmpty2({
1653
1803
  icon,
1654
1804
  title,
1655
1805
  description,
@@ -1662,17 +1812,17 @@ var StateEmpty = (0, import_react2.memo)(function StateEmpty2({
1662
1812
  const actionHandler = isFunctionAction ? render : onClick;
1663
1813
  const buttonRender = isFunctionAction ? void 0 : render;
1664
1814
  const hasAction = Boolean(buttonText || render || onClick);
1665
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1815
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1666
1816
  Empty,
1667
1817
  {
1668
- className: (0, import_cn13.cn)("w-full", state === "outline" && "border border-dashed"),
1818
+ className: (0, import_cn14.cn)("w-full", state === "outline" && "border border-dashed"),
1669
1819
  children: [
1670
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(EmptyHeader, { children: [
1671
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmptyMedia, { variant: "icon", children: renderStateIcon(icon) }),
1672
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmptyTitle, { children: title }),
1673
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmptyDescription, { children: description })
1820
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(EmptyHeader, { children: [
1821
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EmptyMedia, { variant: "icon", children: renderStateIcon(icon) }),
1822
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EmptyTitle, { children: title }),
1823
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EmptyDescription, { children: description })
1674
1824
  ] }),
1675
- hasAction && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(EmptyContent, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1825
+ hasAction && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(EmptyContent, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1676
1826
  Button,
1677
1827
  {
1678
1828
  variant: "outline",
@@ -1689,20 +1839,20 @@ var StateEmpty = (0, import_react2.memo)(function StateEmpty2({
1689
1839
  });
1690
1840
 
1691
1841
  // src/components/ui/table.tsx
1692
- var import_cn14 = require("cn");
1693
- var import_jsx_runtime15 = require("react/jsx-runtime");
1842
+ var import_cn15 = require("cn");
1843
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1694
1844
  function Table(_a) {
1695
1845
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1696
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1846
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1697
1847
  "div",
1698
1848
  {
1699
1849
  "data-slot": "table-container",
1700
1850
  className: "relative w-full overflow-x-auto",
1701
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1851
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1702
1852
  "table",
1703
1853
  __spreadValues({
1704
1854
  "data-slot": "table",
1705
- className: (0, import_cn14.cn)("w-full caption-bottom text-xs", className)
1855
+ className: (0, import_cn15.cn)("w-full caption-bottom text-xs", className)
1706
1856
  }, props)
1707
1857
  )
1708
1858
  }
@@ -1710,31 +1860,31 @@ function Table(_a) {
1710
1860
  }
1711
1861
  function TableHeader(_a) {
1712
1862
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1713
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1863
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1714
1864
  "thead",
1715
1865
  __spreadValues({
1716
1866
  "data-slot": "table-header",
1717
- className: (0, import_cn14.cn)("[&_tr]:border-b", className)
1867
+ className: (0, import_cn15.cn)("[&_tr]:border-b", className)
1718
1868
  }, props)
1719
1869
  );
1720
1870
  }
1721
1871
  function TableBody(_a) {
1722
1872
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1723
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1873
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1724
1874
  "tbody",
1725
1875
  __spreadValues({
1726
1876
  "data-slot": "table-body",
1727
- className: (0, import_cn14.cn)("[&_tr:last-child]:border-0", className)
1877
+ className: (0, import_cn15.cn)("[&_tr:last-child]:border-0", className)
1728
1878
  }, props)
1729
1879
  );
1730
1880
  }
1731
1881
  function TableRow(_a) {
1732
1882
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1733
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1883
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1734
1884
  "tr",
1735
1885
  __spreadValues({
1736
1886
  "data-slot": "table-row",
1737
- className: (0, import_cn14.cn)(
1887
+ className: (0, import_cn15.cn)(
1738
1888
  "border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
1739
1889
  className
1740
1890
  )
@@ -1743,11 +1893,11 @@ function TableRow(_a) {
1743
1893
  }
1744
1894
  function TableHead(_a) {
1745
1895
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1746
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1896
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1747
1897
  "th",
1748
1898
  __spreadValues({
1749
1899
  "data-slot": "table-head",
1750
- className: (0, import_cn14.cn)(
1900
+ className: (0, import_cn15.cn)(
1751
1901
  "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
1752
1902
  className
1753
1903
  )
@@ -1756,11 +1906,11 @@ function TableHead(_a) {
1756
1906
  }
1757
1907
  function TableCell(_a) {
1758
1908
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1759
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1909
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1760
1910
  "td",
1761
1911
  __spreadValues({
1762
1912
  "data-slot": "table-cell",
1763
- className: (0, import_cn14.cn)(
1913
+ className: (0, import_cn15.cn)(
1764
1914
  "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
1765
1915
  className
1766
1916
  )
@@ -1796,20 +1946,20 @@ var features = (0, import_react_table.tableFeatures)({
1796
1946
 
1797
1947
  // src/components/composed/data-table/table-content-body.tsx
1798
1948
  var import_react_table2 = require("@tanstack/react-table");
1799
- var import_lucide_react6 = require("lucide-react");
1800
- var import_jsx_runtime16 = require("react/jsx-runtime");
1949
+ var import_lucide_react9 = require("lucide-react");
1950
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1801
1951
  function DataTableContentBody({
1802
1952
  table,
1803
1953
  columns
1804
1954
  }) {
1805
1955
  const rows = table.getRowModel().rows;
1806
1956
  if (rows == null ? void 0 : rows.length) {
1807
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TableBody, { children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TableCell, { children: (0, import_react_table2.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) });
1957
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableBody, { children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableCell, { children: (0, import_react_table2.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) });
1808
1958
  }
1809
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TableBody, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TableCell, { colSpan: columns.length, className: "h-48 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1959
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableBody, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableCell, { colSpan: columns.length, className: "h-48 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1810
1960
  StateEmpty,
1811
1961
  {
1812
- icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react6.SearchXIcon, {}),
1962
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.SearchXIcon, {}),
1813
1963
  title: "No matching results",
1814
1964
  description: "No records matched your search query or filter criteria.",
1815
1965
  buttonText: "Clear search & filters",
@@ -1823,18 +1973,18 @@ function DataTableContentBody({
1823
1973
 
1824
1974
  // src/components/composed/data-table/table-content-header.tsx
1825
1975
  var import_react_table3 = require("@tanstack/react-table");
1826
- var import_jsx_runtime17 = require("react/jsx-runtime");
1976
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1827
1977
  function DataTableContentHeader({
1828
1978
  table
1829
1979
  }) {
1830
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table3.flexRender)(
1980
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableHead, { children: header.isPlaceholder ? null : (0, import_react_table3.flexRender)(
1831
1981
  header.column.columnDef.header,
1832
1982
  header.getContext()
1833
1983
  ) }, header.id)) }, headerGroup.id)) });
1834
1984
  }
1835
1985
 
1836
1986
  // src/components/composed/data-table/table-footer-entries.tsx
1837
- var import_jsx_runtime18 = require("react/jsx-runtime");
1987
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1838
1988
  function DataTableFooterEntries({
1839
1989
  table
1840
1990
  }) {
@@ -1845,131 +1995,131 @@ function DataTableFooterEntries({
1845
1995
  const totalRows = table.getFilteredRowModel().rows.length;
1846
1996
  const startRow = totalRows === 0 ? 0 : pageIndex * pageSize + 1;
1847
1997
  const endRow = Math.min((pageIndex + 1) * pageSize, totalRows);
1848
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex-1 text-xs text-muted-foreground", children: [
1998
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex-1 text-xs text-muted-foreground", children: [
1849
1999
  "Showing",
1850
2000
  " ",
1851
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "font-medium text-foreground", children: [
2001
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "font-medium text-foreground", children: [
1852
2002
  startRow,
1853
2003
  "-",
1854
2004
  endRow
1855
2005
  ] }),
1856
2006
  " ",
1857
2007
  "of ",
1858
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-medium text-foreground", children: totalRows }),
2008
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "font-medium text-foreground", children: totalRows }),
1859
2009
  " ",
1860
2010
  "entries."
1861
2011
  ] });
1862
2012
  }
1863
2013
 
1864
2014
  // src/components/composed/data-table/table-footer-pagination.tsx
1865
- var import_lucide_react7 = require("lucide-react");
1866
- var import_jsx_runtime19 = require("react/jsx-runtime");
2015
+ var import_lucide_react10 = require("lucide-react");
2016
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1867
2017
  function DataTableFooterPagination({
1868
2018
  table
1869
2019
  }) {
1870
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-1", children: [
1871
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Tooltip, { children: [
1872
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2020
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-1", children: [
2021
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Tooltip, { children: [
2022
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1873
2023
  TooltipTrigger,
1874
2024
  {
1875
- render: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2025
+ render: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1876
2026
  Button,
1877
2027
  {
1878
2028
  variant: "outline",
1879
2029
  size: "icon-xs",
1880
2030
  onClick: () => table.firstPage(),
1881
2031
  disabled: !table.getCanPreviousPage(),
1882
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ChevronsLeftIcon, {})
2032
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react10.ChevronsLeftIcon, {})
1883
2033
  }
1884
2034
  )
1885
2035
  }
1886
2036
  ),
1887
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipContent, { children: "Go to first page" })
2037
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipContent, { children: "Go to first page" })
1888
2038
  ] }),
1889
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Tooltip, { children: [
1890
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2039
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Tooltip, { children: [
2040
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1891
2041
  TooltipTrigger,
1892
2042
  {
1893
- render: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2043
+ render: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1894
2044
  Button,
1895
2045
  {
1896
2046
  variant: "outline",
1897
2047
  size: "icon-xs",
1898
2048
  onClick: () => table.previousPage(),
1899
2049
  disabled: !table.getCanPreviousPage(),
1900
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ChevronLeftIcon, {})
2050
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react10.ChevronLeftIcon, {})
1901
2051
  }
1902
2052
  )
1903
2053
  }
1904
2054
  ),
1905
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipContent, { children: "Go to previous page" })
2055
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipContent, { children: "Go to previous page" })
1906
2056
  ] }),
1907
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Tooltip, { children: [
1908
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2057
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Tooltip, { children: [
2058
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1909
2059
  TooltipTrigger,
1910
2060
  {
1911
- render: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2061
+ render: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1912
2062
  Button,
1913
2063
  {
1914
2064
  variant: "outline",
1915
2065
  size: "icon-xs",
1916
2066
  onClick: () => table.nextPage(),
1917
2067
  disabled: !table.getCanNextPage(),
1918
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ChevronRightIcon, {})
2068
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react10.ChevronRightIcon, {})
1919
2069
  }
1920
2070
  )
1921
2071
  }
1922
2072
  ),
1923
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipContent, { children: "Go to next page" })
2073
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipContent, { children: "Go to next page" })
1924
2074
  ] }),
1925
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Tooltip, { children: [
1926
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2075
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Tooltip, { children: [
2076
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1927
2077
  TooltipTrigger,
1928
2078
  {
1929
- render: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2079
+ render: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1930
2080
  Button,
1931
2081
  {
1932
2082
  variant: "outline",
1933
2083
  size: "icon-xs",
1934
2084
  onClick: () => table.lastPage(),
1935
2085
  disabled: !table.getCanNextPage(),
1936
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ChevronsRightIcon, {})
2086
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react10.ChevronsRightIcon, {})
1937
2087
  }
1938
2088
  )
1939
2089
  }
1940
2090
  ),
1941
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipContent, { children: "Go to last page" })
2091
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipContent, { children: "Go to last page" })
1942
2092
  ] })
1943
2093
  ] });
1944
2094
  }
1945
2095
 
1946
2096
  // src/components/composed/data-table/table-header-add.tsx
1947
- var import_lucide_react8 = require("lucide-react");
1948
- var import_jsx_runtime20 = require("react/jsx-runtime");
2097
+ var import_lucide_react11 = require("lucide-react");
2098
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1949
2099
  function DataTableHeaderAdd({
1950
2100
  onAdd,
1951
2101
  addLabel
1952
2102
  }) {
1953
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
1954
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Tooltip, { children: [
1955
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2103
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
2104
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Tooltip, { children: [
2105
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1956
2106
  TooltipTrigger,
1957
2107
  {
1958
2108
  className: "flex sm:hidden",
1959
- render: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Button, { variant: "default", size: "icon", onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.PlusIcon, {}) })
2109
+ render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Button, { variant: "default", size: "icon", onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react11.PlusIcon, {}) })
1960
2110
  }
1961
2111
  ),
1962
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TooltipContent, { children: addLabel != null ? addLabel : "Add" })
2112
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TooltipContent, { children: addLabel != null ? addLabel : "Add" })
1963
2113
  ] }),
1964
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Button, { variant: "default", onClick: onAdd, className: "hidden sm:flex", children: [
1965
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.PlusIcon, {}),
2114
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Button, { variant: "default", onClick: onAdd, className: "hidden sm:flex", children: [
2115
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react11.PlusIcon, {}),
1966
2116
  addLabel != null ? addLabel : "Add"
1967
2117
  ] })
1968
2118
  ] });
1969
2119
  }
1970
2120
 
1971
2121
  // src/components/composed/data-table/table-header-download.tsx
1972
- var import_lucide_react9 = require("lucide-react");
2122
+ var import_lucide_react12 = require("lucide-react");
1973
2123
 
1974
2124
  // src/components/composed/data-table/export.ts
1975
2125
  var XLSX = __toESM(require("xlsx"));
@@ -2109,7 +2259,7 @@ function printTable(headers, rows, title = "Data Export") {
2109
2259
  }
2110
2260
 
2111
2261
  // src/components/composed/data-table/table-header-download.tsx
2112
- var import_jsx_runtime21 = require("react/jsx-runtime");
2262
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2113
2263
  function getTableExportData(table) {
2114
2264
  const columns = table.getAllColumns().filter(
2115
2265
  (col) => typeof col.accessorFn !== "undefined" && col.getIsVisible()
@@ -2152,25 +2302,25 @@ function DataTableHeaderDownload({
2152
2302
  exportFilename,
2153
2303
  onDownload
2154
2304
  }) {
2155
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DropdownMenu, { children: [
2156
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Tooltip, { children: [
2157
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2305
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DropdownMenu, { children: [
2306
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Tooltip, { children: [
2307
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2158
2308
  DropdownMenuTrigger,
2159
2309
  {
2160
- render: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2310
+ render: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2161
2311
  TooltipTrigger,
2162
2312
  {
2163
- render: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.DownloadIcon, {}) })
2313
+ render: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react12.DownloadIcon, {}) })
2164
2314
  }
2165
2315
  )
2166
2316
  }
2167
2317
  ),
2168
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TooltipContent, { children: "Download options" })
2318
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TooltipContent, { children: "Download options" })
2169
2319
  ] }),
2170
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DropdownMenuGroup, { children: [
2171
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenuLabel, { children: "Download data" }),
2172
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenuSeparator, {}),
2173
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2320
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DropdownMenuGroup, { children: [
2321
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenuLabel, { children: "Download data" }),
2322
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenuSeparator, {}),
2323
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2174
2324
  DropdownMenuItem,
2175
2325
  {
2176
2326
  className: "hover:cursor-pointer",
@@ -2180,12 +2330,12 @@ function DataTableHeaderDownload({
2180
2330
  onDownload == null ? void 0 : onDownload();
2181
2331
  },
2182
2332
  children: [
2183
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.FileTextIcon, {}),
2333
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react12.FileTextIcon, {}),
2184
2334
  "Download PDF"
2185
2335
  ]
2186
2336
  }
2187
2337
  ),
2188
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2338
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2189
2339
  DropdownMenuItem,
2190
2340
  {
2191
2341
  className: "hover:cursor-pointer",
@@ -2195,12 +2345,12 @@ function DataTableHeaderDownload({
2195
2345
  onDownload == null ? void 0 : onDownload();
2196
2346
  },
2197
2347
  children: [
2198
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.FileSpreadsheetIcon, {}),
2348
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react12.FileSpreadsheetIcon, {}),
2199
2349
  "Download Excel"
2200
2350
  ]
2201
2351
  }
2202
2352
  ),
2203
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2353
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2204
2354
  DropdownMenuItem,
2205
2355
  {
2206
2356
  className: "hover:cursor-pointer",
@@ -2210,13 +2360,13 @@ function DataTableHeaderDownload({
2210
2360
  onDownload == null ? void 0 : onDownload();
2211
2361
  },
2212
2362
  children: [
2213
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.FileCodeIcon, {}),
2363
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react12.FileCodeIcon, {}),
2214
2364
  "Download CSV"
2215
2365
  ]
2216
2366
  }
2217
2367
  ),
2218
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropdownMenuSeparator, {}),
2219
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
2368
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenuSeparator, {}),
2369
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2220
2370
  DropdownMenuItem,
2221
2371
  {
2222
2372
  className: "hover:cursor-pointer",
@@ -2225,7 +2375,7 @@ function DataTableHeaderDownload({
2225
2375
  printTable(headers, rows, exportFilename);
2226
2376
  },
2227
2377
  children: [
2228
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react9.PrinterIcon, {}),
2378
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react12.PrinterIcon, {}),
2229
2379
  "Print Table"
2230
2380
  ]
2231
2381
  }
@@ -2236,15 +2386,15 @@ function DataTableHeaderDownload({
2236
2386
 
2237
2387
  // src/components/composed/data-table/table-header-filter.tsx
2238
2388
  var import_date_fns = require("date-fns");
2239
- var import_lucide_react12 = require("lucide-react");
2240
- var import_react3 = require("react");
2389
+ var import_lucide_react15 = require("lucide-react");
2390
+ var import_react9 = require("react");
2241
2391
 
2242
2392
  // src/components/ui/calendar.tsx
2243
- var import_cn15 = require("cn");
2244
- var import_lucide_react10 = require("lucide-react");
2393
+ var import_cn16 = require("cn");
2394
+ var import_lucide_react13 = require("lucide-react");
2245
2395
  var React3 = __toESM(require("react"));
2246
2396
  var import_react_day_picker = require("react-day-picker");
2247
- var import_jsx_runtime22 = require("react/jsx-runtime");
2397
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2248
2398
  function Calendar(_a) {
2249
2399
  var _b = _a, {
2250
2400
  className,
@@ -2266,11 +2416,11 @@ function Calendar(_a) {
2266
2416
  "components"
2267
2417
  ]);
2268
2418
  const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
2269
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2419
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2270
2420
  import_react_day_picker.DayPicker,
2271
2421
  __spreadValues({
2272
2422
  showOutsideDays,
2273
- className: (0, import_cn15.cn)(
2423
+ className: (0, import_cn16.cn)(
2274
2424
  "group/calendar bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(6)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
2275
2425
  String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
2276
2426
  String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
@@ -2282,124 +2432,124 @@ function Calendar(_a) {
2282
2432
  formatMonthDropdown: (date) => date.toLocaleString(locale == null ? void 0 : locale.code, { month: "short" })
2283
2433
  }, formatters),
2284
2434
  classNames: __spreadValues({
2285
- root: (0, import_cn15.cn)("w-fit", defaultClassNames.root),
2286
- months: (0, import_cn15.cn)(
2435
+ root: (0, import_cn16.cn)("w-fit", defaultClassNames.root),
2436
+ months: (0, import_cn16.cn)(
2287
2437
  "relative flex flex-col gap-4 md:flex-row",
2288
2438
  defaultClassNames.months
2289
2439
  ),
2290
- month: (0, import_cn15.cn)("flex w-full flex-col gap-4", defaultClassNames.month),
2291
- nav: (0, import_cn15.cn)(
2440
+ month: (0, import_cn16.cn)("flex w-full flex-col gap-4", defaultClassNames.month),
2441
+ nav: (0, import_cn16.cn)(
2292
2442
  "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
2293
2443
  defaultClassNames.nav
2294
2444
  ),
2295
- button_previous: (0, import_cn15.cn)(
2445
+ button_previous: (0, import_cn16.cn)(
2296
2446
  buttonVariants({ variant: buttonVariant }),
2297
2447
  "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
2298
2448
  defaultClassNames.button_previous
2299
2449
  ),
2300
- button_next: (0, import_cn15.cn)(
2450
+ button_next: (0, import_cn16.cn)(
2301
2451
  buttonVariants({ variant: buttonVariant }),
2302
2452
  "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
2303
2453
  defaultClassNames.button_next
2304
2454
  ),
2305
- month_caption: (0, import_cn15.cn)(
2455
+ month_caption: (0, import_cn16.cn)(
2306
2456
  "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
2307
2457
  defaultClassNames.month_caption
2308
2458
  ),
2309
- dropdowns: (0, import_cn15.cn)(
2459
+ dropdowns: (0, import_cn16.cn)(
2310
2460
  "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
2311
2461
  defaultClassNames.dropdowns
2312
2462
  ),
2313
- dropdown_root: (0, import_cn15.cn)(
2463
+ dropdown_root: (0, import_cn16.cn)(
2314
2464
  "relative rounded-(--cell-radius)",
2315
2465
  defaultClassNames.dropdown_root
2316
2466
  ),
2317
- dropdown: (0, import_cn15.cn)(
2467
+ dropdown: (0, import_cn16.cn)(
2318
2468
  "absolute inset-0 bg-popover opacity-0",
2319
2469
  defaultClassNames.dropdown
2320
2470
  ),
2321
- caption_label: (0, import_cn15.cn)(
2471
+ caption_label: (0, import_cn16.cn)(
2322
2472
  "font-medium select-none",
2323
2473
  captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
2324
2474
  defaultClassNames.caption_label
2325
2475
  ),
2326
- month_grid: (0, import_cn15.cn)("w-full border-collapse", defaultClassNames.month_grid),
2327
- weekdays: (0, import_cn15.cn)("flex", defaultClassNames.weekdays),
2328
- weekday: (0, import_cn15.cn)(
2476
+ month_grid: (0, import_cn16.cn)("w-full border-collapse", defaultClassNames.month_grid),
2477
+ weekdays: (0, import_cn16.cn)("flex", defaultClassNames.weekdays),
2478
+ weekday: (0, import_cn16.cn)(
2329
2479
  "flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
2330
2480
  defaultClassNames.weekday
2331
2481
  ),
2332
- week: (0, import_cn15.cn)("mt-2 flex w-full", defaultClassNames.week),
2333
- week_number_header: (0, import_cn15.cn)(
2482
+ week: (0, import_cn16.cn)("mt-2 flex w-full", defaultClassNames.week),
2483
+ week_number_header: (0, import_cn16.cn)(
2334
2484
  "w-(--cell-size) select-none",
2335
2485
  defaultClassNames.week_number_header
2336
2486
  ),
2337
- week_number: (0, import_cn15.cn)(
2487
+ week_number: (0, import_cn16.cn)(
2338
2488
  "text-[0.8rem] text-muted-foreground select-none",
2339
2489
  defaultClassNames.week_number
2340
2490
  ),
2341
- day: (0, import_cn15.cn)(
2491
+ day: (0, import_cn16.cn)(
2342
2492
  "group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
2343
2493
  props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
2344
2494
  defaultClassNames.day
2345
2495
  ),
2346
- range_start: (0, import_cn15.cn)(
2496
+ range_start: (0, import_cn16.cn)(
2347
2497
  "relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",
2348
2498
  defaultClassNames.range_start
2349
2499
  ),
2350
- range_middle: (0, import_cn15.cn)("rounded-none", defaultClassNames.range_middle),
2351
- range_end: (0, import_cn15.cn)(
2500
+ range_middle: (0, import_cn16.cn)("rounded-none", defaultClassNames.range_middle),
2501
+ range_end: (0, import_cn16.cn)(
2352
2502
  "relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",
2353
2503
  defaultClassNames.range_end
2354
2504
  ),
2355
- today: (0, import_cn15.cn)(
2505
+ today: (0, import_cn16.cn)(
2356
2506
  "rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
2357
2507
  defaultClassNames.today
2358
2508
  ),
2359
- outside: (0, import_cn15.cn)(
2509
+ outside: (0, import_cn16.cn)(
2360
2510
  "text-muted-foreground aria-selected:text-muted-foreground",
2361
2511
  defaultClassNames.outside
2362
2512
  ),
2363
- disabled: (0, import_cn15.cn)(
2513
+ disabled: (0, import_cn16.cn)(
2364
2514
  "text-muted-foreground opacity-50",
2365
2515
  defaultClassNames.disabled
2366
2516
  ),
2367
- hidden: (0, import_cn15.cn)("invisible", defaultClassNames.hidden)
2517
+ hidden: (0, import_cn16.cn)("invisible", defaultClassNames.hidden)
2368
2518
  }, classNames),
2369
2519
  components: __spreadValues({
2370
2520
  Root: (_a2) => {
2371
2521
  var _b2 = _a2, { className: className2, rootRef } = _b2, props2 = __objRest(_b2, ["className", "rootRef"]);
2372
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2522
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2373
2523
  "div",
2374
2524
  __spreadValues({
2375
2525
  "data-slot": "calendar",
2376
2526
  ref: rootRef,
2377
- className: (0, import_cn15.cn)(className2)
2527
+ className: (0, import_cn16.cn)(className2)
2378
2528
  }, props2)
2379
2529
  );
2380
2530
  },
2381
2531
  Chevron: (_c) => {
2382
2532
  var _d = _c, { className: className2, orientation } = _d, props2 = __objRest(_d, ["className", "orientation"]);
2383
2533
  if (orientation === "left") {
2384
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react10.ChevronLeftIcon, __spreadValues({ className: (0, import_cn15.cn)("size-4", className2) }, props2));
2534
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.ChevronLeftIcon, __spreadValues({ className: (0, import_cn16.cn)("size-4", className2) }, props2));
2385
2535
  }
2386
2536
  if (orientation === "right") {
2387
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2388
- import_lucide_react10.ChevronRightIcon,
2537
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2538
+ import_lucide_react13.ChevronRightIcon,
2389
2539
  __spreadValues({
2390
- className: (0, import_cn15.cn)("size-4", className2)
2540
+ className: (0, import_cn16.cn)("size-4", className2)
2391
2541
  }, props2)
2392
2542
  );
2393
2543
  }
2394
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react10.ChevronDownIcon, __spreadValues({ className: (0, import_cn15.cn)("size-4", className2) }, props2));
2544
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.ChevronDownIcon, __spreadValues({ className: (0, import_cn16.cn)("size-4", className2) }, props2));
2395
2545
  },
2396
2546
  DayButton: (_e) => {
2397
2547
  var props2 = __objRest(_e, []);
2398
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CalendarDayButton, __spreadValues({ locale }, props2));
2548
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CalendarDayButton, __spreadValues({ locale }, props2));
2399
2549
  },
2400
2550
  WeekNumber: (_f) => {
2401
2551
  var _g = _f, { children } = _g, props2 = __objRest(_g, ["children"]);
2402
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", __spreadProps(__spreadValues({}, props2), { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
2552
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("td", __spreadProps(__spreadValues({}, props2), { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
2403
2553
  }
2404
2554
  }, components)
2405
2555
  }, props)
@@ -2423,7 +2573,7 @@ function CalendarDayButton(_a) {
2423
2573
  var _a2;
2424
2574
  if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
2425
2575
  }, [modifiers.focused]);
2426
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2576
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2427
2577
  Button,
2428
2578
  __spreadValues({
2429
2579
  variant: "ghost",
@@ -2433,7 +2583,7 @@ function CalendarDayButton(_a) {
2433
2583
  "data-range-start": modifiers.range_start,
2434
2584
  "data-range-end": modifiers.range_end,
2435
2585
  "data-range-middle": modifiers.range_middle,
2436
- className: (0, import_cn15.cn)(
2586
+ className: (0, import_cn16.cn)(
2437
2587
  "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
2438
2588
  defaultClassNames.day,
2439
2589
  className
@@ -2444,15 +2594,15 @@ function CalendarDayButton(_a) {
2444
2594
 
2445
2595
  // src/components/ui/popover.tsx
2446
2596
  var import_popover = require("@base-ui/react/popover");
2447
- var import_cn16 = require("cn");
2448
- var import_jsx_runtime23 = require("react/jsx-runtime");
2597
+ var import_cn17 = require("cn");
2598
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2449
2599
  function Popover(_a) {
2450
2600
  var props = __objRest(_a, []);
2451
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
2601
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
2452
2602
  }
2453
2603
  function PopoverTrigger(_a) {
2454
2604
  var props = __objRest(_a, []);
2455
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
2605
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
2456
2606
  }
2457
2607
  function PopoverContent(_a) {
2458
2608
  var _b = _a, {
@@ -2468,7 +2618,7 @@ function PopoverContent(_a) {
2468
2618
  "side",
2469
2619
  "sideOffset"
2470
2620
  ]);
2471
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2621
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2472
2622
  import_popover.Popover.Positioner,
2473
2623
  {
2474
2624
  align,
@@ -2476,11 +2626,11 @@ function PopoverContent(_a) {
2476
2626
  side,
2477
2627
  sideOffset,
2478
2628
  className: "isolate z-50",
2479
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2629
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2480
2630
  import_popover.Popover.Popup,
2481
2631
  __spreadValues({
2482
2632
  "data-slot": "popover-content",
2483
- className: (0, import_cn16.cn)(
2633
+ className: (0, import_cn17.cn)(
2484
2634
  "z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-lg bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2485
2635
  className
2486
2636
  )
@@ -2492,17 +2642,17 @@ function PopoverContent(_a) {
2492
2642
 
2493
2643
  // src/components/ui/select.tsx
2494
2644
  var import_select = require("@base-ui/react/select");
2495
- var import_cn17 = require("cn");
2496
- var import_lucide_react11 = require("lucide-react");
2497
- var import_jsx_runtime24 = require("react/jsx-runtime");
2645
+ var import_cn18 = require("cn");
2646
+ var import_lucide_react14 = require("lucide-react");
2647
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2498
2648
  var Select = import_select.Select.Root;
2499
2649
  function SelectValue(_a) {
2500
2650
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2501
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2651
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2502
2652
  import_select.Select.Value,
2503
2653
  __spreadValues({
2504
2654
  "data-slot": "select-value",
2505
- className: (0, import_cn17.cn)("flex flex-1 text-left", className)
2655
+ className: (0, import_cn18.cn)("flex flex-1 text-left", className)
2506
2656
  }, props)
2507
2657
  );
2508
2658
  }
@@ -2516,22 +2666,22 @@ function SelectTrigger(_a) {
2516
2666
  "size",
2517
2667
  "children"
2518
2668
  ]);
2519
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2669
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2520
2670
  import_select.Select.Trigger,
2521
2671
  __spreadProps(__spreadValues({
2522
2672
  "data-slot": "select-trigger",
2523
2673
  "data-size": size,
2524
- className: (0, import_cn17.cn)(
2674
+ className: (0, import_cn18.cn)(
2525
2675
  "flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
2526
2676
  className
2527
2677
  )
2528
2678
  }, props), {
2529
2679
  children: [
2530
2680
  children,
2531
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2681
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2532
2682
  import_select.Select.Icon,
2533
2683
  {
2534
- render: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.ChevronDownIcon, { className: "pointer-events-none size-3.5 text-muted-foreground" })
2684
+ render: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ChevronDownIcon, { className: "pointer-events-none size-3.5 text-muted-foreground" })
2535
2685
  }
2536
2686
  )
2537
2687
  ]
@@ -2556,7 +2706,7 @@ function SelectContent(_a) {
2556
2706
  "alignOffset",
2557
2707
  "alignItemWithTrigger"
2558
2708
  ]);
2559
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2709
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2560
2710
  import_select.Select.Positioner,
2561
2711
  {
2562
2712
  side,
@@ -2565,20 +2715,20 @@ function SelectContent(_a) {
2565
2715
  alignOffset,
2566
2716
  alignItemWithTrigger,
2567
2717
  className: "isolate z-50",
2568
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2718
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2569
2719
  import_select.Select.Popup,
2570
2720
  __spreadProps(__spreadValues({
2571
2721
  "data-slot": "select-content",
2572
2722
  "data-align-trigger": alignItemWithTrigger,
2573
- className: (0, import_cn17.cn)(
2723
+ className: (0, import_cn18.cn)(
2574
2724
  "relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2575
2725
  className
2576
2726
  )
2577
2727
  }, props), {
2578
2728
  children: [
2579
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectScrollUpButton, {}),
2580
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_select.Select.List, { children }),
2581
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SelectScrollDownButton, {})
2729
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectScrollUpButton, {}),
2730
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_select.Select.List, { children }),
2731
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectScrollDownButton, {})
2582
2732
  ]
2583
2733
  })
2584
2734
  )
@@ -2593,22 +2743,22 @@ function SelectItem(_a) {
2593
2743
  "className",
2594
2744
  "children"
2595
2745
  ]);
2596
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2746
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2597
2747
  import_select.Select.Item,
2598
2748
  __spreadProps(__spreadValues({
2599
2749
  "data-slot": "select-item",
2600
- className: (0, import_cn17.cn)(
2750
+ className: (0, import_cn18.cn)(
2601
2751
  "relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
2602
2752
  className
2603
2753
  )
2604
2754
  }, props), {
2605
2755
  children: [
2606
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_select.Select.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
2607
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2756
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_select.Select.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
2757
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2608
2758
  import_select.Select.ItemIndicator,
2609
2759
  {
2610
- render: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center" }),
2611
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.CheckIcon, { className: "pointer-events-none" })
2760
+ render: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center" }),
2761
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.CheckIcon, { className: "pointer-events-none" })
2612
2762
  }
2613
2763
  )
2614
2764
  ]
@@ -2621,16 +2771,16 @@ function SelectScrollUpButton(_a) {
2621
2771
  } = _b, props = __objRest(_b, [
2622
2772
  "className"
2623
2773
  ]);
2624
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2774
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2625
2775
  import_select.Select.ScrollUpArrow,
2626
2776
  __spreadProps(__spreadValues({
2627
2777
  "data-slot": "select-scroll-up-button",
2628
- className: (0, import_cn17.cn)(
2778
+ className: (0, import_cn18.cn)(
2629
2779
  "top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
2630
2780
  className
2631
2781
  )
2632
2782
  }, props), {
2633
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.ChevronUpIcon, {})
2783
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ChevronUpIcon, {})
2634
2784
  })
2635
2785
  );
2636
2786
  }
@@ -2640,22 +2790,22 @@ function SelectScrollDownButton(_a) {
2640
2790
  } = _b, props = __objRest(_b, [
2641
2791
  "className"
2642
2792
  ]);
2643
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2793
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2644
2794
  import_select.Select.ScrollDownArrow,
2645
2795
  __spreadProps(__spreadValues({
2646
2796
  "data-slot": "select-scroll-down-button",
2647
- className: (0, import_cn17.cn)(
2797
+ className: (0, import_cn18.cn)(
2648
2798
  "bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5",
2649
2799
  className
2650
2800
  )
2651
2801
  }, props), {
2652
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.ChevronDownIcon, {})
2802
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react14.ChevronDownIcon, {})
2653
2803
  })
2654
2804
  );
2655
2805
  }
2656
2806
 
2657
2807
  // src/components/composed/data-table/table-header-filter.tsx
2658
- var import_jsx_runtime25 = require("react/jsx-runtime");
2808
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2659
2809
  function smartFilterFn(row, columnId, filterValue) {
2660
2810
  var _a, _b, _c;
2661
2811
  if (filterValue === void 0 || filterValue === null || filterValue === "" || filterValue === "all") {
@@ -2796,13 +2946,13 @@ function ColumnFilterInput({
2796
2946
  table,
2797
2947
  headerText
2798
2948
  }) {
2799
- const [calendarOpen, setCalendarOpen] = (0, import_react3.useState)(false);
2949
+ const [calendarOpen, setCalendarOpen] = (0, import_react9.useState)(false);
2800
2950
  const filterValue = column.getFilterValue();
2801
- const variant = (0, import_react3.useMemo)(
2951
+ const variant = (0, import_react9.useMemo)(
2802
2952
  () => getFilterVariant(column, table),
2803
2953
  [column, table]
2804
2954
  );
2805
- const options = (0, import_react3.useMemo)(() => {
2955
+ const options = (0, import_react9.useMemo)(() => {
2806
2956
  if (variant === "boolean") {
2807
2957
  return [
2808
2958
  { label: "True / Yes", value: "true" },
@@ -2816,7 +2966,7 @@ function ColumnFilterInput({
2816
2966
  }, [column, table, variant]);
2817
2967
  if (variant === "boolean" || variant === "select") {
2818
2968
  const currentValue = filterValue === void 0 || filterValue === null || filterValue === "" ? "all" : String(filterValue);
2819
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2969
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2820
2970
  Select,
2821
2971
  {
2822
2972
  value: currentValue,
@@ -2828,13 +2978,13 @@ function ColumnFilterInput({
2828
2978
  }
2829
2979
  },
2830
2980
  children: [
2831
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2981
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2832
2982
  SelectTrigger,
2833
2983
  {
2834
2984
  className: "w-full",
2835
2985
  onKeyDown: (e) => e.stopPropagation(),
2836
2986
  onPointerDown: (e) => e.stopPropagation(),
2837
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2987
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2838
2988
  SelectValue,
2839
2989
  {
2840
2990
  placeholder: `Select ${headerText.toLowerCase()}...`,
@@ -2843,9 +2993,9 @@ function ColumnFilterInput({
2843
2993
  )
2844
2994
  }
2845
2995
  ),
2846
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(SelectContent, { align: "start", children: [
2847
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectItem, { value: "all", children: "All" }),
2848
- options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2996
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(SelectContent, { align: "start", children: [
2997
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectItem, { value: "all", children: "All" }),
2998
+ options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2849
2999
  SelectItem,
2850
3000
  {
2851
3001
  value: opt.value,
@@ -2872,36 +3022,36 @@ function ColumnFilterInput({
2872
3022
  }
2873
3023
  }
2874
3024
  const formattedDateLabel = dateObj ? (0, import_date_fns.format)(dateObj, "yyyy-MM-dd") : "";
2875
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Popover, { open: calendarOpen, onOpenChange: setCalendarOpen, children: [
2876
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3025
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Popover, { open: calendarOpen, onOpenChange: setCalendarOpen, children: [
3026
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2877
3027
  PopoverTrigger,
2878
3028
  {
2879
- render: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3029
+ render: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2880
3030
  Button,
2881
3031
  {
2882
3032
  variant: "outline",
2883
- className: (0, import_cn13.cn)(
3033
+ className: (0, import_cn14.cn)(
2884
3034
  "w-full justify-start",
2885
3035
  !formattedDateLabel && "text-muted-foreground"
2886
3036
  ),
2887
3037
  onKeyDown: (e) => e.stopPropagation(),
2888
3038
  onPointerDown: (e) => e.stopPropagation(),
2889
3039
  children: [
2890
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.CalendarIcon, { className: "mr-1 size-3 shrink-0" }),
2891
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "truncate", children: formattedDateLabel || `Pick ${headerText.toLowerCase()}...` })
3040
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.CalendarIcon, { className: "mr-1 size-3 shrink-0" }),
3041
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "truncate", children: formattedDateLabel || `Pick ${headerText.toLowerCase()}...` })
2892
3042
  ]
2893
3043
  }
2894
3044
  )
2895
3045
  }
2896
3046
  ),
2897
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3047
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2898
3048
  PopoverContent,
2899
3049
  {
2900
3050
  className: "w-auto p-0",
2901
3051
  align: "start",
2902
3052
  onPointerDown: (e) => e.stopPropagation(),
2903
3053
  onKeyDown: (e) => e.stopPropagation(),
2904
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3054
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2905
3055
  Calendar,
2906
3056
  {
2907
3057
  mode: "single",
@@ -2920,7 +3070,7 @@ function ColumnFilterInput({
2920
3070
  )
2921
3071
  ] }) });
2922
3072
  }
2923
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3073
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "relative flex items-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2924
3074
  Input,
2925
3075
  {
2926
3076
  id: `filter-${column.id}`,
@@ -2937,46 +3087,46 @@ function DataTableHeaderFilter({
2937
3087
  table,
2938
3088
  columnFilters
2939
3089
  }) {
2940
- const filterableColumns = (0, import_react3.useMemo)(
3090
+ const filterableColumns = (0, import_react9.useMemo)(
2941
3091
  () => table.getAllColumns().filter(
2942
3092
  (column) => typeof column.accessorFn !== "undefined" && column.getCanFilter()
2943
3093
  ),
2944
3094
  [table]
2945
3095
  );
2946
3096
  if (filterableColumns.length === 0) return null;
2947
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(DropdownMenu, { children: [
2948
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Tooltip, { children: [
2949
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3097
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(DropdownMenu, { children: [
3098
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Tooltip, { children: [
3099
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2950
3100
  DropdownMenuTrigger,
2951
3101
  {
2952
- render: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3102
+ render: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2953
3103
  TooltipTrigger,
2954
3104
  {
2955
- render: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3105
+ render: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2956
3106
  Button,
2957
3107
  {
2958
3108
  variant: columnFilters.length > 0 ? "secondary" : "outline",
2959
3109
  size: "icon",
2960
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.ListFilterIcon, {})
3110
+ children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.ListFilterIcon, {})
2961
3111
  }
2962
3112
  )
2963
3113
  }
2964
3114
  )
2965
3115
  }
2966
3116
  ),
2967
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipContent, { children: "Filter options" })
3117
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TooltipContent, { children: "Filter options" })
2968
3118
  ] }),
2969
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuContent, { align: "end", className: "w-80", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(DropdownMenuGroup, { children: [
2970
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuLabel, { children: "Filter by column" }),
2971
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuSeparator, {}),
2972
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "max-h-64 overflow-y-auto space-y-2.5 p-1", children: filterableColumns.map((column) => {
3119
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DropdownMenuContent, { align: "end", className: "w-80", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(DropdownMenuGroup, { children: [
3120
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DropdownMenuLabel, { children: "Filter by column" }),
3121
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DropdownMenuSeparator, {}),
3122
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "max-h-64 overflow-y-auto space-y-2.5 p-1", children: filterableColumns.map((column) => {
2973
3123
  const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
2974
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3124
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2975
3125
  "div",
2976
3126
  {
2977
3127
  className: "flex items-center justify-between px-1",
2978
3128
  children: [
2979
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3129
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2980
3130
  "label",
2981
3131
  {
2982
3132
  htmlFor: `filter-${column.id}`,
@@ -2984,7 +3134,7 @@ function DataTableHeaderFilter({
2984
3134
  children: headerText
2985
3135
  }
2986
3136
  ),
2987
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3137
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2988
3138
  ColumnFilterInput,
2989
3139
  {
2990
3140
  column,
@@ -2997,9 +3147,9 @@ function DataTableHeaderFilter({
2997
3147
  column.id
2998
3148
  );
2999
3149
  }) }),
3000
- columnFilters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
3001
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DropdownMenuSeparator, {}),
3002
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3150
+ columnFilters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
3151
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DropdownMenuSeparator, {}),
3152
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3003
3153
  DropdownMenuItem,
3004
3154
  {
3005
3155
  className: "hover:cursor-pointer text-destructive focus:text-destructive",
@@ -3013,13 +3163,13 @@ function DataTableHeaderFilter({
3013
3163
  }
3014
3164
 
3015
3165
  // src/components/composed/data-table/table-header-refresh.tsx
3016
- var import_lucide_react13 = require("lucide-react");
3166
+ var import_lucide_react16 = require("lucide-react");
3017
3167
  var import_navigation2 = require("next/navigation");
3018
- var import_react4 = require("react");
3019
- var import_jsx_runtime26 = require("react/jsx-runtime");
3168
+ var import_react10 = require("react");
3169
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3020
3170
  function DataTableHeaderRefresh() {
3021
3171
  const router = (0, import_navigation2.useRouter)();
3022
- const [isRefreshing, setIsRefreshing] = (0, import_react4.useState)(false);
3172
+ const [isRefreshing, setIsRefreshing] = (0, import_react10.useState)(false);
3023
3173
  const handleRefresh = () => {
3024
3174
  setIsRefreshing(true);
3025
3175
  router.refresh();
@@ -3027,21 +3177,21 @@ function DataTableHeaderRefresh() {
3027
3177
  setIsRefreshing(false);
3028
3178
  }, 750);
3029
3179
  };
3030
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Tooltip, { children: [
3031
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3180
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Tooltip, { children: [
3181
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3032
3182
  TooltipTrigger,
3033
3183
  {
3034
- render: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3184
+ render: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3035
3185
  Button,
3036
3186
  {
3037
3187
  variant: "outline",
3038
3188
  size: "icon",
3039
3189
  onClick: handleRefresh,
3040
3190
  disabled: isRefreshing,
3041
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3042
- import_lucide_react13.RotateCwIcon,
3191
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3192
+ import_lucide_react16.RotateCwIcon,
3043
3193
  {
3044
- className: (0, import_cn13.cn)(
3194
+ className: (0, import_cn14.cn)(
3045
3195
  "transition-transform duration-750",
3046
3196
  isRefreshing && "animate-spin"
3047
3197
  )
@@ -3051,19 +3201,19 @@ function DataTableHeaderRefresh() {
3051
3201
  )
3052
3202
  }
3053
3203
  ),
3054
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TooltipContent, { children: "Refresh data" })
3204
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TooltipContent, { children: "Refresh data" })
3055
3205
  ] });
3056
3206
  }
3057
3207
 
3058
3208
  // src/components/composed/data-table/table-header-search.tsx
3059
- var import_lucide_react14 = require("lucide-react");
3060
- var import_jsx_runtime27 = require("react/jsx-runtime");
3209
+ var import_lucide_react17 = require("lucide-react");
3210
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3061
3211
  function DataTableHeaderSearch({
3062
3212
  value = "",
3063
3213
  onChange
3064
3214
  }) {
3065
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "relative flex items-center max-w-sm w-full", children: [
3066
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3215
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative flex items-center max-w-sm w-full", children: [
3216
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3067
3217
  Input,
3068
3218
  {
3069
3219
  placeholder: "Search...",
@@ -3072,56 +3222,56 @@ function DataTableHeaderSearch({
3072
3222
  className: "pr-7"
3073
3223
  }
3074
3224
  ),
3075
- Boolean(value) && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3225
+ Boolean(value) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3076
3226
  "button",
3077
3227
  {
3078
3228
  type: "button",
3079
3229
  onClick: () => onChange(""),
3080
3230
  className: "absolute right-2 text-muted-foreground hover:text-foreground p-0.5 rounded cursor-pointer",
3081
3231
  "aria-label": "Clear search text",
3082
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react14.XIcon, { className: "size-3.5" })
3232
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react17.XIcon, { className: "size-3.5" })
3083
3233
  }
3084
3234
  )
3085
3235
  ] });
3086
3236
  }
3087
3237
 
3088
3238
  // src/components/composed/data-table/table-header-sort.tsx
3089
- var import_lucide_react15 = require("lucide-react");
3090
- var import_jsx_runtime28 = require("react/jsx-runtime");
3239
+ var import_lucide_react18 = require("lucide-react");
3240
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3091
3241
  function DataTableHeaderSort({
3092
3242
  table,
3093
3243
  sorting
3094
3244
  }) {
3095
3245
  const sortableColumns = table.getAllColumns().filter((column) => column.getCanSort());
3096
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DropdownMenu, { children: [
3097
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Tooltip, { children: [
3098
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3246
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DropdownMenu, { children: [
3247
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Tooltip, { children: [
3248
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3099
3249
  DropdownMenuTrigger,
3100
3250
  {
3101
- render: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3251
+ render: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3102
3252
  TooltipTrigger,
3103
3253
  {
3104
- render: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3254
+ render: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3105
3255
  Button,
3106
3256
  {
3107
3257
  variant: sorting.length > 0 ? "secondary" : "outline",
3108
3258
  size: "icon",
3109
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.ArrowUpDownIcon, {})
3259
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.ArrowUpDownIcon, {})
3110
3260
  }
3111
3261
  )
3112
3262
  }
3113
3263
  )
3114
3264
  }
3115
3265
  ),
3116
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TooltipContent, { children: "Sort options" })
3266
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipContent, { children: "Sort options" })
3117
3267
  ] }),
3118
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DropdownMenuGroup, { children: [
3119
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DropdownMenuLabel, { children: "Sort by column" }),
3120
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DropdownMenuSeparator, {}),
3268
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DropdownMenuGroup, { children: [
3269
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenuLabel, { children: "Sort by column" }),
3270
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenuSeparator, {}),
3121
3271
  sortableColumns.map((column) => {
3122
3272
  const isSorted = column.getIsSorted();
3123
3273
  const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
3124
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3274
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3125
3275
  DropdownMenuItem,
3126
3276
  {
3127
3277
  className: "flex items-center justify-between hover:cursor-pointer capitalize",
@@ -3136,16 +3286,16 @@ function DataTableHeaderSort({
3136
3286
  },
3137
3287
  children: [
3138
3288
  headerText,
3139
- isSorted === "asc" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.ArrowUpIcon, { className: "size-3.5" }),
3140
- isSorted === "desc" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react15.ArrowDownIcon, { className: "size-3.5" })
3289
+ isSorted === "asc" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.ArrowUpIcon, { className: "size-3.5" }),
3290
+ isSorted === "desc" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.ArrowDownIcon, { className: "size-3.5" })
3141
3291
  ]
3142
3292
  },
3143
3293
  column.id
3144
3294
  );
3145
3295
  }),
3146
- sorting.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
3147
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DropdownMenuSeparator, {}),
3148
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3296
+ sorting.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
3297
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenuSeparator, {}),
3298
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3149
3299
  DropdownMenuItem,
3150
3300
  {
3151
3301
  className: "hover:cursor-pointer text-destructive focus:text-destructive",
@@ -3159,34 +3309,34 @@ function DataTableHeaderSort({
3159
3309
  }
3160
3310
 
3161
3311
  // src/components/composed/data-table/table-header-toggle.tsx
3162
- var import_lucide_react16 = require("lucide-react");
3163
- var import_jsx_runtime29 = require("react/jsx-runtime");
3312
+ var import_lucide_react19 = require("lucide-react");
3313
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3164
3314
  function DataTableHeaderToggle({
3165
3315
  table
3166
3316
  }) {
3167
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(DropdownMenu, { children: [
3168
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip, { children: [
3169
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3317
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(DropdownMenu, { children: [
3318
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { children: [
3319
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3170
3320
  DropdownMenuTrigger,
3171
3321
  {
3172
- render: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3322
+ render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3173
3323
  TooltipTrigger,
3174
3324
  {
3175
- render: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react16.Columns3CogIcon, {}) })
3325
+ render: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Columns3CogIcon, {}) })
3176
3326
  }
3177
3327
  )
3178
3328
  }
3179
3329
  ),
3180
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipContent, { children: "Toggle columns" })
3330
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { children: "Toggle columns" })
3181
3331
  ] }),
3182
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(DropdownMenuGroup, { children: [
3183
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropdownMenuLabel, { children: "Toggle columns" }),
3184
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropdownMenuSeparator, {}),
3332
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuContent, { align: "end", className: "w-48", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(DropdownMenuGroup, { children: [
3333
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuLabel, { children: "Toggle columns" }),
3334
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuSeparator, {}),
3185
3335
  table.getAllColumns().filter(
3186
3336
  (column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
3187
3337
  ).map((column) => {
3188
3338
  const headerText = typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
3189
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3339
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3190
3340
  DropdownMenuCheckboxItem,
3191
3341
  {
3192
3342
  className: "capitalize hover:cursor-pointer",
@@ -3202,9 +3352,9 @@ function DataTableHeaderToggle({
3202
3352
  }
3203
3353
 
3204
3354
  // src/components/composed/data-table/data-row-actions.tsx
3205
- var import_lucide_react17 = require("lucide-react");
3206
- var import_react5 = require("react");
3207
- var import_jsx_runtime30 = require("react/jsx-runtime");
3355
+ var import_lucide_react20 = require("lucide-react");
3356
+ var import_react11 = require("react");
3357
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3208
3358
  function RowActions({
3209
3359
  label = "Actions",
3210
3360
  items = [],
@@ -3218,50 +3368,50 @@ function RowActions({
3218
3368
  if (visibleItems.length === 0) {
3219
3369
  return null;
3220
3370
  }
3221
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3371
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3222
3372
  "div",
3223
3373
  {
3224
- className: (0, import_cn13.cn)("flex items-center justify-end w-full", containerClassName),
3225
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DropdownMenu, { children: [
3226
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3374
+ className: (0, import_cn14.cn)("flex items-center justify-end w-full", containerClassName),
3375
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(DropdownMenu, { children: [
3376
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3227
3377
  DropdownMenuTrigger,
3228
3378
  {
3229
- render: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { variant: "ghost", size: "icon-xs", "aria-label": triggerLabel, children: triggerIcon != null ? triggerIcon : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react17.MoreHorizontal, { className: "size-4" }) })
3379
+ render: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { variant: "ghost", size: "icon-xs", "aria-label": triggerLabel, children: triggerIcon != null ? triggerIcon : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.MoreHorizontal, { className: "size-4" }) })
3230
3380
  }
3231
3381
  ),
3232
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3382
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3233
3383
  DropdownMenuContent,
3234
3384
  {
3235
3385
  align,
3236
- className: (0, import_cn13.cn)("w-40", contentClassName),
3237
- children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DropdownMenuGroup, { children: [
3238
- label && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
3239
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuLabel, { children: label }),
3240
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuSeparator, {})
3386
+ className: (0, import_cn14.cn)("w-40", contentClassName),
3387
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(DropdownMenuGroup, { children: [
3388
+ label && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
3389
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuLabel, { children: label }),
3390
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuSeparator, {})
3241
3391
  ] }),
3242
3392
  visibleItems.map((item, index) => {
3243
3393
  var _a;
3244
3394
  const itemKey = (_a = item.id) != null ? _a : `${item.label}-${index}`;
3245
3395
  const isDestructive = item.variant === "destructive";
3246
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_react5.Fragment, { children: [
3247
- item.separatorBefore && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuSeparator, {}),
3248
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
3396
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react11.Fragment, { children: [
3397
+ item.separatorBefore && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuSeparator, {}),
3398
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3249
3399
  DropdownMenuItem,
3250
3400
  {
3251
3401
  onClick: item.onClick,
3252
3402
  disabled: item.disabled,
3253
- className: (0, import_cn13.cn)(
3403
+ className: (0, import_cn14.cn)(
3254
3404
  "hover:cursor-pointer flex items-center gap-2",
3255
3405
  isDestructive && "text-destructive focus:text-destructive",
3256
3406
  item.className
3257
3407
  ),
3258
3408
  children: [
3259
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "size-4 shrink-0 flex items-center justify-center", children: item.icon }),
3260
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: item.label })
3409
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "size-4 shrink-0 flex items-center justify-center", children: item.icon }),
3410
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: item.label })
3261
3411
  ]
3262
3412
  }
3263
3413
  ),
3264
- item.separatorAfter && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DropdownMenuSeparator, {})
3414
+ item.separatorAfter && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuSeparator, {})
3265
3415
  ] }, itemKey);
3266
3416
  })
3267
3417
  ] })
@@ -3273,7 +3423,7 @@ function RowActions({
3273
3423
  }
3274
3424
 
3275
3425
  // src/components/composed/data-table/data-table.tsx
3276
- var import_jsx_runtime31 = require("react/jsx-runtime");
3426
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3277
3427
  function DataTable({
3278
3428
  columns,
3279
3429
  data,
@@ -3291,12 +3441,12 @@ function DataTable({
3291
3441
  showAddButton = true
3292
3442
  }) {
3293
3443
  const router = (0, import_navigation3.useRouter)();
3294
- const [createOpen, setCreateOpen] = (0, import_react6.useState)(false);
3295
- const [sorting, setSorting] = (0, import_react6.useState)([]);
3296
- const [columnFilters, setColumnFilters] = (0, import_react6.useState)([]);
3297
- const [columnVisibility, setColumnVisibility] = (0, import_react6.useState)(initialColumnVisibility != null ? initialColumnVisibility : {});
3298
- const [globalFilter, setGlobalFilter] = (0, import_react6.useState)("");
3299
- const columnsWithSmartFilters = (0, import_react6.useMemo)(() => {
3444
+ const [createOpen, setCreateOpen] = (0, import_react12.useState)(false);
3445
+ const [sorting, setSorting] = (0, import_react12.useState)([]);
3446
+ const [columnFilters, setColumnFilters] = (0, import_react12.useState)([]);
3447
+ const [columnVisibility, setColumnVisibility] = (0, import_react12.useState)(initialColumnVisibility != null ? initialColumnVisibility : {});
3448
+ const [globalFilter, setGlobalFilter] = (0, import_react12.useState)("");
3449
+ const columnsWithSmartFilters = (0, import_react12.useMemo)(() => {
3300
3450
  return columns.map((col) => __spreadValues({
3301
3451
  filterFn: smartFilterFn
3302
3452
  }, col));
@@ -3326,12 +3476,12 @@ function DataTable({
3326
3476
  });
3327
3477
  if (data.length === 0) {
3328
3478
  const hasCreateAction = Boolean(renderCreateDialog);
3329
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-2", children: [
3330
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3479
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "space-y-2", children: [
3480
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3331
3481
  StateEmpty,
3332
3482
  {
3333
3483
  state: "outline",
3334
- icon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react18.FolderOpenIcon, { className: "size-6 text-muted-foreground" }),
3484
+ icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react21.FolderOpenIcon, { className: "size-6 text-muted-foreground" }),
3335
3485
  title: "No Data Available",
3336
3486
  description: "There are currently no records to display. Create a new record to get started.",
3337
3487
  buttonText: hasCreateAction ? addLabel != null ? addLabel : "Add Record" : "Refresh",
@@ -3341,26 +3491,26 @@ function DataTable({
3341
3491
  renderCreateDialog == null ? void 0 : renderCreateDialog(createOpen, setCreateOpen)
3342
3492
  ] });
3343
3493
  }
3344
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-2", children: [
3345
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row items-center justify-between gap-1", children: [
3346
- showSearchInput ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3494
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "space-y-2", children: [
3495
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-row items-center justify-between gap-1", children: [
3496
+ showSearchInput ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3347
3497
  DataTableHeaderSearch,
3348
3498
  {
3349
3499
  value: globalFilter,
3350
3500
  onChange: setGlobalFilter
3351
3501
  }
3352
- ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", {}),
3353
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
3354
- showRefreshButton && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DataTableHeaderRefresh, {}),
3355
- showSortButton && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DataTableHeaderSort, { table, sorting }),
3356
- showFilterButton && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3502
+ ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", {}),
3503
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
3504
+ showRefreshButton && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataTableHeaderRefresh, {}),
3505
+ showSortButton && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataTableHeaderSort, { table, sorting }),
3506
+ showFilterButton && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3357
3507
  DataTableHeaderFilter,
3358
3508
  {
3359
3509
  table,
3360
3510
  columnFilters
3361
3511
  }
3362
3512
  ),
3363
- showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3513
+ showDownloadButton && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3364
3514
  DataTableHeaderDownload,
3365
3515
  {
3366
3516
  table,
@@ -3368,8 +3518,8 @@ function DataTable({
3368
3518
  onDownload
3369
3519
  }
3370
3520
  ),
3371
- showColumnToggleButton && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DataTableHeaderToggle, { table }),
3372
- showAddButton && renderCreateDialog && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3521
+ showColumnToggleButton && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataTableHeaderToggle, { table }),
3522
+ showAddButton && renderCreateDialog && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3373
3523
  DataTableHeaderAdd,
3374
3524
  {
3375
3525
  onAdd: () => setCreateOpen(true),
@@ -3379,13 +3529,13 @@ function DataTable({
3379
3529
  ] })
3380
3530
  ] }),
3381
3531
  renderCreateDialog == null ? void 0 : renderCreateDialog(createOpen, setCreateOpen),
3382
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "overflow-hidden rounded-md border [&_[data-slot=table-container]]:no-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Table, { children: [
3383
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DataTableContentHeader, { table }),
3384
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DataTableContentBody, { table, columns })
3532
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "overflow-hidden rounded-md border [&_[data-slot=table-container]]:no-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Table, { children: [
3533
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataTableContentHeader, { table }),
3534
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataTableContentBody, { table, columns })
3385
3535
  ] }) }),
3386
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center justify-between px-2", children: [
3387
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DataTableFooterEntries, { table }),
3388
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DataTableFooterPagination, { table })
3536
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between px-2", children: [
3537
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataTableFooterEntries, { table }),
3538
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DataTableFooterPagination, { table })
3389
3539
  ] })
3390
3540
  ] });
3391
3541
  }
@@ -3393,13 +3543,13 @@ function DataTable({
3393
3543
  // src/components/composed/header-tabs.tsx
3394
3544
  var import_link2 = __toESM(require("next/link"));
3395
3545
  var import_navigation4 = require("next/navigation");
3396
- var import_react7 = require("react");
3546
+ var import_react13 = require("react");
3397
3547
 
3398
3548
  // src/components/ui/tabs.tsx
3399
3549
  var import_tabs = require("@base-ui/react/tabs");
3400
- var import_class_variance_authority4 = require("class-variance-authority");
3401
- var import_cn18 = require("cn");
3402
- var import_jsx_runtime32 = require("react/jsx-runtime");
3550
+ var import_class_variance_authority5 = require("class-variance-authority");
3551
+ var import_cn19 = require("cn");
3552
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3403
3553
  function Tabs(_a) {
3404
3554
  var _b = _a, {
3405
3555
  className,
@@ -3408,19 +3558,19 @@ function Tabs(_a) {
3408
3558
  "className",
3409
3559
  "orientation"
3410
3560
  ]);
3411
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3561
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3412
3562
  import_tabs.Tabs.Root,
3413
3563
  __spreadValues({
3414
3564
  "data-slot": "tabs",
3415
3565
  "data-orientation": orientation,
3416
- className: (0, import_cn18.cn)(
3566
+ className: (0, import_cn19.cn)(
3417
3567
  "group/tabs flex gap-2 data-horizontal:flex-col",
3418
3568
  className
3419
3569
  )
3420
3570
  }, props)
3421
3571
  );
3422
3572
  }
3423
- var tabsListVariants = (0, import_class_variance_authority4.cva)(
3573
+ var tabsListVariants = (0, import_class_variance_authority5.cva)(
3424
3574
  "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
3425
3575
  {
3426
3576
  variants: {
@@ -3442,22 +3592,22 @@ function TabsList(_a) {
3442
3592
  "className",
3443
3593
  "variant"
3444
3594
  ]);
3445
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3595
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3446
3596
  import_tabs.Tabs.List,
3447
3597
  __spreadValues({
3448
3598
  "data-slot": "tabs-list",
3449
3599
  "data-variant": variant,
3450
- className: (0, import_cn18.cn)(tabsListVariants({ variant }), className)
3600
+ className: (0, import_cn19.cn)(tabsListVariants({ variant }), className)
3451
3601
  }, props)
3452
3602
  );
3453
3603
  }
3454
3604
  function TabsTrigger(_a) {
3455
3605
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3456
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3606
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3457
3607
  import_tabs.Tabs.Tab,
3458
3608
  __spreadValues({
3459
3609
  "data-slot": "tabs-trigger",
3460
- className: (0, import_cn18.cn)(
3610
+ className: (0, import_cn19.cn)(
3461
3611
  "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
3462
3612
  "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
3463
3613
  "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
@@ -3469,16 +3619,16 @@ function TabsTrigger(_a) {
3469
3619
  }
3470
3620
 
3471
3621
  // src/components/composed/header-tabs.tsx
3472
- var import_jsx_runtime33 = require("react/jsx-runtime");
3622
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3473
3623
  function renderTabIcon(icon) {
3474
3624
  if (!icon) return null;
3475
3625
  if (typeof icon === "function" || typeof icon === "object" && icon !== null && "render" in icon) {
3476
3626
  const IconComp = icon;
3477
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconComp, {});
3627
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(IconComp, {});
3478
3628
  }
3479
3629
  return icon;
3480
3630
  }
3481
- var HeaderTabs = (0, import_react7.memo)(function HeaderTabs2({
3631
+ var HeaderTabs = (0, import_react13.memo)(function HeaderTabs2({
3482
3632
  items,
3483
3633
  value,
3484
3634
  onValueChange,
@@ -3490,12 +3640,12 @@ var HeaderTabs = (0, import_react7.memo)(function HeaderTabs2({
3490
3640
  (item) => item.url === pathname || pathname.endsWith(item.url) || pathname.split("/").includes(item.value)
3491
3641
  ) : void 0;
3492
3642
  const activeTab = (_b = value != null ? value : matchedItem == null ? void 0 : matchedItem.value) != null ? _b : (_a = items[0]) == null ? void 0 : _a.value;
3493
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Tabs, { value: activeTab, onValueChange, className: "space-y-4", children: [
3494
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-full overflow-x-auto overflow-y-hidden border-b no-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TabsList, { variant: "line", className: "inline-flex w-max justify-start", children: items.map(({ title, value: tabValue, url, icon }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3643
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Tabs, { value: activeTab, onValueChange, className: "space-y-4", children: [
3644
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-full overflow-x-auto overflow-y-hidden border-b no-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TabsList, { variant: "line", className: "inline-flex w-max justify-start", children: items.map(({ title, value: tabValue, url, icon }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3495
3645
  TabsTrigger,
3496
3646
  {
3497
3647
  nativeButton: false,
3498
- render: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_link2.default, { href: url }),
3648
+ render: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_link2.default, { href: url }),
3499
3649
  value: tabValue,
3500
3650
  children: [
3501
3651
  renderTabIcon(icon),
@@ -3509,24 +3659,532 @@ var HeaderTabs = (0, import_react7.memo)(function HeaderTabs2({
3509
3659
  });
3510
3660
 
3511
3661
  // src/components/composed/header-title.tsx
3512
- var import_react8 = require("react");
3513
- var import_jsx_runtime34 = require("react/jsx-runtime");
3514
- var HeaderTitle = (0, import_react8.memo)(function HeaderTitle2({
3662
+ var import_react14 = require("react");
3663
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3664
+ var HeaderTitle = (0, import_react14.memo)(function HeaderTitle2({
3515
3665
  title,
3516
3666
  subtitle,
3517
3667
  children
3518
3668
  }) {
3519
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full space-y-4", children: [
3520
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
3521
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h1", { className: "font-semibold", children: title }),
3522
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-xs text-muted-foreground", children: subtitle })
3669
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "w-full space-y-4", children: [
3670
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
3671
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h1", { className: "font-semibold", children: title }),
3672
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-xs text-muted-foreground", children: subtitle })
3523
3673
  ] }),
3524
3674
  children
3525
3675
  ] });
3526
3676
  });
3677
+
3678
+ // src/components/composed/icons/google.tsx
3679
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3680
+ function GoogleIcon(_a) {
3681
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3682
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3683
+ "svg",
3684
+ __spreadProps(__spreadValues({
3685
+ role: "img",
3686
+ viewBox: "0 0 24 24",
3687
+ "aria-label": "Google logo",
3688
+ className,
3689
+ xmlns: "http://www.w3.org/2000/svg"
3690
+ }, props), {
3691
+ children: [
3692
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3693
+ "path",
3694
+ {
3695
+ fill: "#4285F4",
3696
+ d: "M23.745 12.27c0-.7-.06-1.4-.19-2.07H12v4.51h6.6c-.29 1.52-1.14 2.82-2.4 3.68v3.05h3.88c2.27-2.09 3.665-5.17 3.665-9.17z"
3697
+ }
3698
+ ),
3699
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3700
+ "path",
3701
+ {
3702
+ fill: "#34A853",
3703
+ d: "M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.88-3.05c-1.08.72-2.45 1.16-4.05 1.16-3.12 0-5.77-2.1-6.72-4.93H1.24v3.15C3.26 21.36 7.33 24 12 24z"
3704
+ }
3705
+ ),
3706
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3707
+ "path",
3708
+ {
3709
+ fill: "#FBBC05",
3710
+ d: "M5.28 14.27c-.25-.72-.38-1.49-.38-2.27s.13-1.55.38-2.27V6.58H1.24C.45 8.16 0 9.97 0 12s.45 3.84 1.24 5.42l4.04-3.15z"
3711
+ }
3712
+ ),
3713
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3714
+ "path",
3715
+ {
3716
+ fill: "#EA4335",
3717
+ d: "M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.33 0 3.26 2.64 1.24 6.58l4.04 3.15c.95-2.83 3.6-4.98 6.72-4.98z"
3718
+ }
3719
+ )
3720
+ ]
3721
+ })
3722
+ );
3723
+ }
3724
+
3725
+ // src/components/composed/login-server.tsx
3726
+ var import_zod = require("@hookform/resolvers/zod");
3727
+ var import_cn24 = require("cn");
3728
+ var import_lucide_react23 = require("lucide-react");
3729
+ var import_link3 = __toESM(require("next/link"));
3730
+ var import_react16 = require("react");
3731
+ var import_react_hook_form = require("react-hook-form");
3732
+ var import_zod2 = require("zod");
3733
+
3734
+ // src/components/ui/card.tsx
3735
+ var import_cn20 = require("cn");
3736
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3737
+ function Card(_a) {
3738
+ var _b = _a, {
3739
+ className,
3740
+ size = "default"
3741
+ } = _b, props = __objRest(_b, [
3742
+ "className",
3743
+ "size"
3744
+ ]);
3745
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3746
+ "div",
3747
+ __spreadValues({
3748
+ "data-slot": "card",
3749
+ "data-size": size,
3750
+ className: (0, import_cn20.cn)(
3751
+ "group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",
3752
+ className
3753
+ )
3754
+ }, props)
3755
+ );
3756
+ }
3757
+ function CardHeader(_a) {
3758
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3759
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3760
+ "div",
3761
+ __spreadValues({
3762
+ "data-slot": "card-header",
3763
+ className: (0, import_cn20.cn)(
3764
+ "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
3765
+ className
3766
+ )
3767
+ }, props)
3768
+ );
3769
+ }
3770
+ function CardTitle(_a) {
3771
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3772
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3773
+ "div",
3774
+ __spreadValues({
3775
+ "data-slot": "card-title",
3776
+ className: (0, import_cn20.cn)("font-heading text-sm font-medium", className)
3777
+ }, props)
3778
+ );
3779
+ }
3780
+ function CardDescription(_a) {
3781
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3782
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3783
+ "div",
3784
+ __spreadValues({
3785
+ "data-slot": "card-description",
3786
+ className: (0, import_cn20.cn)("text-xs/relaxed text-muted-foreground", className)
3787
+ }, props)
3788
+ );
3789
+ }
3790
+ function CardContent(_a) {
3791
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3792
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3793
+ "div",
3794
+ __spreadValues({
3795
+ "data-slot": "card-content",
3796
+ className: (0, import_cn20.cn)("px-(--card-spacing)", className)
3797
+ }, props)
3798
+ );
3799
+ }
3800
+
3801
+ // src/components/ui/field.tsx
3802
+ var import_class_variance_authority6 = require("class-variance-authority");
3803
+ var import_cn22 = require("cn");
3804
+ var import_react15 = require("react");
3805
+
3806
+ // src/components/ui/label.tsx
3807
+ var import_cn21 = require("cn");
3808
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3809
+ function Label(_a) {
3810
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3811
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3812
+ "label",
3813
+ __spreadValues({
3814
+ "data-slot": "label",
3815
+ className: (0, import_cn21.cn)(
3816
+ "flex items-center gap-2 text-xs/relaxed leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
3817
+ className
3818
+ )
3819
+ }, props)
3820
+ );
3821
+ }
3822
+
3823
+ // src/components/ui/field.tsx
3824
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3825
+ function FieldGroup(_a) {
3826
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3827
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3828
+ "div",
3829
+ __spreadValues({
3830
+ "data-slot": "field-group",
3831
+ className: (0, import_cn22.cn)(
3832
+ "group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
3833
+ className
3834
+ )
3835
+ }, props)
3836
+ );
3837
+ }
3838
+ var fieldVariants = (0, import_class_variance_authority6.cva)(
3839
+ "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
3840
+ {
3841
+ variants: {
3842
+ orientation: {
3843
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
3844
+ horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
3845
+ responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
3846
+ }
3847
+ },
3848
+ defaultVariants: {
3849
+ orientation: "vertical"
3850
+ }
3851
+ }
3852
+ );
3853
+ function Field(_a) {
3854
+ var _b = _a, {
3855
+ className,
3856
+ orientation = "vertical"
3857
+ } = _b, props = __objRest(_b, [
3858
+ "className",
3859
+ "orientation"
3860
+ ]);
3861
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3862
+ "div",
3863
+ __spreadValues({
3864
+ role: "group",
3865
+ "data-slot": "field",
3866
+ "data-orientation": orientation,
3867
+ className: (0, import_cn22.cn)(fieldVariants({ orientation }), className)
3868
+ }, props)
3869
+ );
3870
+ }
3871
+ function FieldLabel(_a) {
3872
+ var _b = _a, {
3873
+ className
3874
+ } = _b, props = __objRest(_b, [
3875
+ "className"
3876
+ ]);
3877
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3878
+ Label,
3879
+ __spreadValues({
3880
+ "data-slot": "field-label",
3881
+ className: (0, import_cn22.cn)(
3882
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-input/40 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-2 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/30 *:data-[slot=field]:p-2 dark:has-data-checked:bg-primary/10",
3883
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
3884
+ className
3885
+ )
3886
+ }, props)
3887
+ );
3888
+ }
3889
+ function FieldDescription(_a) {
3890
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3891
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3892
+ "p",
3893
+ __spreadValues({
3894
+ "data-slot": "field-description",
3895
+ className: (0, import_cn22.cn)(
3896
+ "text-left text-xs/relaxed leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
3897
+ "last:mt-0 nth-last-2:-mt-1",
3898
+ "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
3899
+ className
3900
+ )
3901
+ }, props)
3902
+ );
3903
+ }
3904
+ function FieldSeparator(_a) {
3905
+ var _b = _a, {
3906
+ children,
3907
+ className
3908
+ } = _b, props = __objRest(_b, [
3909
+ "children",
3910
+ "className"
3911
+ ]);
3912
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3913
+ "div",
3914
+ __spreadProps(__spreadValues({
3915
+ "data-slot": "field-separator",
3916
+ "data-content": !!children,
3917
+ className: (0, import_cn22.cn)(
3918
+ "relative -my-2 h-5 text-xs/relaxed group-data-[variant=outline]/field-group:-mb-2",
3919
+ className
3920
+ )
3921
+ }, props), {
3922
+ children: [
3923
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
3924
+ children && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3925
+ "span",
3926
+ {
3927
+ className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
3928
+ "data-slot": "field-separator-content",
3929
+ children
3930
+ }
3931
+ )
3932
+ ]
3933
+ })
3934
+ );
3935
+ }
3936
+ function FieldError(_a) {
3937
+ var _b = _a, {
3938
+ className,
3939
+ children,
3940
+ errors
3941
+ } = _b, props = __objRest(_b, [
3942
+ "className",
3943
+ "children",
3944
+ "errors"
3945
+ ]);
3946
+ const content = (0, import_react15.useMemo)(() => {
3947
+ var _a2;
3948
+ if (children) {
3949
+ return children;
3950
+ }
3951
+ if (!(errors == null ? void 0 : errors.length)) {
3952
+ return null;
3953
+ }
3954
+ const uniqueErrors = [
3955
+ ...new Map(errors.map((error) => [error == null ? void 0 : error.message, error])).values()
3956
+ ];
3957
+ if ((uniqueErrors == null ? void 0 : uniqueErrors.length) === 1) {
3958
+ return (_a2 = uniqueErrors[0]) == null ? void 0 : _a2.message;
3959
+ }
3960
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
3961
+ (error, index) => (error == null ? void 0 : error.message) && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("li", { children: error.message }, index)
3962
+ ) });
3963
+ }, [children, errors]);
3964
+ if (!content) {
3965
+ return null;
3966
+ }
3967
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3968
+ "div",
3969
+ __spreadProps(__spreadValues({
3970
+ role: "alert",
3971
+ "data-slot": "field-error",
3972
+ className: (0, import_cn22.cn)("text-xs/relaxed font-normal text-destructive", className)
3973
+ }, props), {
3974
+ children: content
3975
+ })
3976
+ );
3977
+ }
3978
+
3979
+ // src/components/ui/toast.tsx
3980
+ var import_toast = require("@base-ui/react/toast");
3981
+ var import_cn23 = require("cn");
3982
+ var import_lucide_react22 = require("lucide-react");
3983
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3984
+ var toast = import_toast.Toast.createToastManager();
3985
+ var createToastManager = import_toast.Toast.createToastManager;
3986
+ var useToastManager = import_toast.Toast.useToastManager;
3987
+
3988
+ // src/components/composed/login-server.tsx
3989
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3990
+ var loginSchema = import_zod2.z.object({
3991
+ email: import_zod2.z.string().trim().toLowerCase().min(1, "Email is required").max(254, "Email is too long").pipe(import_zod2.z.email("Invalid email format")),
3992
+ password: import_zod2.z.string().min(1, "Password is required").min(8, "Password must be at least 8 characters").max(128, "Password must not exceed 128 characters")
3993
+ });
3994
+ function LoginServer({
3995
+ onSubmit,
3996
+ onGoogleSignIn,
3997
+ isSubmitting: externalIsSubmitting
3998
+ }) {
3999
+ const [isRedirecting, setIsRedirecting] = (0, import_react16.useState)(false);
4000
+ const [isGoogleLoading, setIsGoogleLoading] = (0, import_react16.useState)(false);
4001
+ const form = (0, import_react_hook_form.useForm)({
4002
+ resolver: (0, import_zod.zodResolver)(loginSchema),
4003
+ defaultValues: {
4004
+ email: "",
4005
+ password: ""
4006
+ }
4007
+ });
4008
+ const isPending = externalIsSubmitting != null ? externalIsSubmitting : form.formState.isSubmitting || isRedirecting || isGoogleLoading;
4009
+ const handleFormSubmit = async (values) => {
4010
+ try {
4011
+ if (!onSubmit) {
4012
+ toast.add({
4013
+ description: "Login action handler is not configured."
4014
+ });
4015
+ return;
4016
+ }
4017
+ const res = await onSubmit(values);
4018
+ if (res && typeof res === "object" && "error" in res && typeof res.error === "string" && res.error) {
4019
+ setIsRedirecting(false);
4020
+ toast.add({ description: res.error });
4021
+ return;
4022
+ }
4023
+ setIsRedirecting(true);
4024
+ } catch (e) {
4025
+ setIsRedirecting(false);
4026
+ toast.add({ description: "Unable to process your login request." });
4027
+ }
4028
+ };
4029
+ const handleGoogleSignIn = async () => {
4030
+ if (isPending) return;
4031
+ if (!onGoogleSignIn) {
4032
+ toast.add({
4033
+ description: "Google Sign-In is not currently available."
4034
+ });
4035
+ return;
4036
+ }
4037
+ try {
4038
+ setIsGoogleLoading(true);
4039
+ await onGoogleSignIn();
4040
+ } catch (e) {
4041
+ setIsGoogleLoading(false);
4042
+ toast.add({ description: "Google Sign-In failed to initialize." });
4043
+ }
4044
+ };
4045
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex w-full max-w-sm flex-col gap-6", children: [
4046
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2 self-center font-medium", children: [
4047
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex size-6 items-center justify-center rounded-md bg-primary text-primary-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react23.GalleryVerticalEndIcon, { className: "size-4" }) }),
4048
+ "Prediktif"
4049
+ ] }),
4050
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-6", children: [
4051
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Card, { children: [
4052
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(CardHeader, { className: "text-center", children: [
4053
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CardTitle, { children: "Welcome back" }),
4054
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CardDescription, { children: "Login with your Google account" })
4055
+ ] }),
4056
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("form", { onSubmit: form.handleSubmit(handleFormSubmit), noValidate: true, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(FieldGroup, { children: [
4057
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Field, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
4058
+ Button,
4059
+ {
4060
+ type: "button",
4061
+ variant: "outline",
4062
+ disabled: isPending,
4063
+ onClick: handleGoogleSignIn,
4064
+ children: [
4065
+ isGoogleLoading ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4066
+ import_lucide_react23.LoaderCircleIcon,
4067
+ {
4068
+ className: "animate-spin",
4069
+ "data-icon": "inline-start"
4070
+ }
4071
+ ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(GoogleIcon, { className: "size-4 shrink-0" }),
4072
+ "Login with Google"
4073
+ ]
4074
+ }
4075
+ ) }),
4076
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldSeparator, { className: "*:data-[slot=field-separator-content]:bg-card", children: "Or continue with" }),
4077
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4078
+ import_react_hook_form.Controller,
4079
+ {
4080
+ name: "email",
4081
+ control: form.control,
4082
+ render: ({ field, fieldState }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Field, { "data-invalid": fieldState.invalid, children: [
4083
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldLabel, { htmlFor: field.name, children: "Email" }),
4084
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4085
+ Input,
4086
+ __spreadProps(__spreadValues({}, field), {
4087
+ id: field.name,
4088
+ "aria-invalid": fieldState.invalid,
4089
+ disabled: isPending,
4090
+ placeholder: "m@example.com",
4091
+ type: "email",
4092
+ autoComplete: "email"
4093
+ })
4094
+ ),
4095
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldDescription, { children: "Enter the email address associated with your account." }),
4096
+ fieldState.invalid && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldError, { errors: [fieldState.error] })
4097
+ ] })
4098
+ }
4099
+ ),
4100
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4101
+ import_react_hook_form.Controller,
4102
+ {
4103
+ name: "password",
4104
+ control: form.control,
4105
+ render: ({ field, fieldState }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Field, { "data-invalid": fieldState.invalid, children: [
4106
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center", children: [
4107
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldLabel, { htmlFor: field.name, children: "Password" }),
4108
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4109
+ import_link3.default,
4110
+ {
4111
+ href: "/forgot-password",
4112
+ className: "ml-auto inline-block underline-offset-4 hover:underline",
4113
+ children: "Forgot your password?"
4114
+ }
4115
+ )
4116
+ ] }),
4117
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4118
+ Input,
4119
+ __spreadProps(__spreadValues({}, field), {
4120
+ id: field.name,
4121
+ "aria-invalid": fieldState.invalid,
4122
+ disabled: isPending,
4123
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
4124
+ type: "password",
4125
+ autoComplete: "current-password"
4126
+ })
4127
+ ),
4128
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldDescription, { children: "Enter your account password." }),
4129
+ fieldState.invalid && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldError, { errors: [fieldState.error] })
4130
+ ] })
4131
+ }
4132
+ ),
4133
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Field, { children: [
4134
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
4135
+ Button,
4136
+ {
4137
+ type: "submit",
4138
+ disabled: isPending,
4139
+ className: "w-full",
4140
+ children: [
4141
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4142
+ import_lucide_react23.LoaderCircleIcon,
4143
+ {
4144
+ className: (0, import_cn24.cn)(
4145
+ "animate-spin",
4146
+ isPending && !isGoogleLoading ? "block" : "hidden"
4147
+ ),
4148
+ "data-icon": "inline-start"
4149
+ }
4150
+ ),
4151
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4152
+ import_lucide_react23.LogInIcon,
4153
+ {
4154
+ className: (0, import_cn24.cn)(
4155
+ !isPending || isGoogleLoading ? "block" : "hidden"
4156
+ ),
4157
+ "data-icon": "inline-start"
4158
+ }
4159
+ ),
4160
+ isRedirecting ? "Redirecting to application..." : form.formState.isSubmitting ? "Signing in..." : "Login"
4161
+ ]
4162
+ }
4163
+ ),
4164
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(FieldDescription, { className: "text-center", children: [
4165
+ "Don't have an account?",
4166
+ " ",
4167
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_link3.default, { href: "/register", children: "Sign up" })
4168
+ ] })
4169
+ ] })
4170
+ ] }) }) })
4171
+ ] }),
4172
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(FieldDescription, { className: "px-6 text-center", children: [
4173
+ "By clicking continue, you agree to our",
4174
+ " ",
4175
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_link3.default, { href: "/terms", children: "Terms of Service" }),
4176
+ " and",
4177
+ " ",
4178
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_link3.default, { href: "/privacy", children: "Privacy Policy" }),
4179
+ "."
4180
+ ] })
4181
+ ] })
4182
+ ] }) });
4183
+ }
3527
4184
  // Annotate the CommonJS export names for ESM import in node:
3528
4185
  0 && (module.exports = {
3529
4186
  AppSidebar,
4187
+ AvatarUser,
3530
4188
  DataTable,
3531
4189
  DataTableContentBody,
3532
4190
  DataTableContentHeader,
@@ -3539,16 +4197,24 @@ var HeaderTitle = (0, import_react8.memo)(function HeaderTitle2({
3539
4197
  DataTableHeaderSearch,
3540
4198
  DataTableHeaderSort,
3541
4199
  DataTableHeaderToggle,
4200
+ EmailLabel,
4201
+ EmailVerified,
4202
+ GoogleIcon,
3542
4203
  HeaderTabs,
3543
4204
  HeaderTitle,
4205
+ JoinedLabel,
4206
+ LoginServer,
3544
4207
  RowActions,
3545
4208
  StateEmpty,
4209
+ UserRole,
4210
+ UserStatus,
3546
4211
  exportToCSV,
3547
4212
  exportToPDF,
3548
4213
  exportToXLSX,
3549
4214
  features,
3550
4215
  flexRender,
3551
4216
  getTableExportData,
4217
+ loginSchema,
3552
4218
  printTable,
3553
4219
  smartFilterFn,
3554
4220
  useTable