warqadui 0.0.24 → 0.0.26

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.mjs CHANGED
@@ -1013,19 +1013,33 @@ var PageHeader = ({
1013
1013
 
1014
1014
  // src/hooks/useModal.tsx
1015
1015
  import { useState as useState6, useCallback } from "react";
1016
+ import { jsx as jsx16 } from "react/jsx-runtime";
1017
+ var defaultState = {
1018
+ type: null,
1019
+ title: "Untitled",
1020
+ content: null,
1021
+ width: 600,
1022
+ data: null
1023
+ };
1016
1024
  var useModal = (initialState = false) => {
1017
1025
  const [isOpen, setIsOpen] = useState6(initialState);
1018
- const [state, setState] = useState6(null);
1026
+ const [state, setState] = useState6(defaultState);
1027
+ const resetState = useCallback(() => {
1028
+ setState(defaultState);
1029
+ }, []);
1019
1030
  const open = useCallback(() => setIsOpen(true), []);
1020
1031
  const close = useCallback(() => {
1021
1032
  setIsOpen(false);
1022
- setState(null);
1033
+ resetState();
1023
1034
  }, []);
1024
1035
  const toggle = useCallback(() => setIsOpen((prev) => !prev), []);
1025
1036
  const openState = useCallback((data) => {
1026
1037
  setState(data);
1027
1038
  open();
1028
1039
  }, []);
1040
+ const ModalComponent = (props) => {
1041
+ return /* @__PURE__ */ jsx16(Modal, { isOpen: true, onClose: close, title: state?.title, children: state?.content });
1042
+ };
1029
1043
  return {
1030
1044
  isOpen,
1031
1045
  open,
@@ -1033,7 +1047,9 @@ var useModal = (initialState = false) => {
1033
1047
  toggle,
1034
1048
  openState,
1035
1049
  state,
1036
- Modal
1050
+ resetState,
1051
+ defaultState,
1052
+ Modal: ModalComponent
1037
1053
  };
1038
1054
  };
1039
1055
 
@@ -1043,7 +1059,7 @@ import { Eye, EyeOff } from "lucide-react";
1043
1059
  import {
1044
1060
  Controller
1045
1061
  } from "react-hook-form";
1046
- import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
1062
+ import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
1047
1063
  var Input = forwardRef(
1048
1064
  ({
1049
1065
  label,
@@ -1089,12 +1105,12 @@ var Input = forwardRef(
1089
1105
  style: { color: isFocused ? primaryColor : void 0 },
1090
1106
  children: [
1091
1107
  label,
1092
- props.required && /* @__PURE__ */ jsx16("span", { className: "text-red-500 ml-1", children: "*" })
1108
+ props.required && /* @__PURE__ */ jsx17("span", { className: "text-red-500 ml-1", children: "*" })
1093
1109
  ]
1094
1110
  }
1095
1111
  ),
1096
1112
  /* @__PURE__ */ jsxs11("div", { className: "relative", children: [
1097
- icon && /* @__PURE__ */ jsx16("div", { className: "absolute inset-y-0 left-0 pl-2.5 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx16(
1113
+ icon && /* @__PURE__ */ jsx17("div", { className: "absolute inset-y-0 left-0 pl-2.5 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx17(
1098
1114
  "div",
1099
1115
  {
1100
1116
  className: `transition-colors duration-200`,
@@ -1102,7 +1118,7 @@ var Input = forwardRef(
1102
1118
  children: icon
1103
1119
  }
1104
1120
  ) }),
1105
- /* @__PURE__ */ jsx16(
1121
+ /* @__PURE__ */ jsx17(
1106
1122
  "input",
1107
1123
  {
1108
1124
  ref,
@@ -1124,23 +1140,23 @@ var Input = forwardRef(
1124
1140
  type: localType === "password" ? showPassword ? "text" : "password" : localType
1125
1141
  }
1126
1142
  ),
1127
- type === "password" && /* @__PURE__ */ jsx16(
1143
+ type === "password" && /* @__PURE__ */ jsx17(
1128
1144
  "button",
1129
1145
  {
1130
1146
  type: "button",
1131
1147
  onClick: () => setShowPassword(!showPassword),
1132
1148
  className: "absolute inset-y-0 right-0 pr-2.5 flex items-center text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors focus:outline-none cursor-pointer",
1133
1149
  tabIndex: -1,
1134
- children: showPassword ? /* @__PURE__ */ jsx16(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx16(Eye, { className: "h-5 w-5" })
1150
+ children: showPassword ? /* @__PURE__ */ jsx17(EyeOff, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx17(Eye, { className: "h-5 w-5" })
1135
1151
  }
1136
1152
  )
1137
1153
  ] }),
1138
- message && /* @__PURE__ */ jsx16("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1154
+ message && /* @__PURE__ */ jsx17("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1139
1155
  ]
1140
1156
  }
1141
1157
  );
1142
1158
  if (form && name && type === "number") {
1143
- return /* @__PURE__ */ jsx16(
1159
+ return /* @__PURE__ */ jsx17(
1144
1160
  Controller,
1145
1161
  {
1146
1162
  control: form.control,
@@ -1212,7 +1228,7 @@ import PhoneInputOriginal, {
1212
1228
  } from "react-phone-number-input";
1213
1229
  import "react-phone-number-input/style.css";
1214
1230
  import { Controller as Controller2 } from "react-hook-form";
1215
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1231
+ import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
1216
1232
  var PhoneInput = forwardRef2(
1217
1233
  ({
1218
1234
  label,
@@ -1251,12 +1267,12 @@ var PhoneInput = forwardRef2(
1251
1267
  },
1252
1268
  children: [
1253
1269
  label,
1254
- props.required && /* @__PURE__ */ jsx17("span", { className: "text-red-500 ml-1", children: "*" })
1270
+ props.required && /* @__PURE__ */ jsx18("span", { className: "text-red-500 ml-1", children: "*" })
1255
1271
  ]
1256
1272
  }
1257
1273
  ),
1258
1274
  /* @__PURE__ */ jsxs12("div", { className: "relative", children: [
1259
- icon && /* @__PURE__ */ jsx17("div", { className: "absolute inset-y-0 left-0 pl-2.5 flex items-center pointer-events-none z-10", children: /* @__PURE__ */ jsx17(
1275
+ icon && /* @__PURE__ */ jsx18("div", { className: "absolute inset-y-0 left-0 pl-2.5 flex items-center pointer-events-none z-10", children: /* @__PURE__ */ jsx18(
1260
1276
  "div",
1261
1277
  {
1262
1278
  className: `transition-colors duration-200`,
@@ -1264,7 +1280,7 @@ var PhoneInput = forwardRef2(
1264
1280
  children: icon
1265
1281
  }
1266
1282
  ) }),
1267
- /* @__PURE__ */ jsx17(
1283
+ /* @__PURE__ */ jsx18(
1268
1284
  PhoneInputOriginal,
1269
1285
  {
1270
1286
  ref,
@@ -1284,10 +1300,10 @@ var PhoneInput = forwardRef2(
1284
1300
  }
1285
1301
  )
1286
1302
  ] }),
1287
- message && /* @__PURE__ */ jsx17("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1303
+ message && /* @__PURE__ */ jsx18("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1288
1304
  ] });
1289
1305
  if (form && name) {
1290
- return /* @__PURE__ */ jsx17(
1306
+ return /* @__PURE__ */ jsx18(
1291
1307
  Controller2,
1292
1308
  {
1293
1309
  name,
@@ -1317,7 +1333,7 @@ import React6, {
1317
1333
  import { createPortal } from "react-dom";
1318
1334
  import { ChevronDown as ChevronDown2, Check as Check2 } from "lucide-react";
1319
1335
  import { Controller as Controller3 } from "react-hook-form";
1320
- import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
1336
+ import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
1321
1337
  var SelectContext = createContext3(void 0);
1322
1338
  var useSelectContext = () => {
1323
1339
  const context = useContext3(SelectContext);
@@ -1328,7 +1344,7 @@ var useSelectContext = () => {
1328
1344
  var Select = forwardRef3((props, ref) => {
1329
1345
  const { form, name, onChange, value, children, options = [] } = props;
1330
1346
  if (form && name) {
1331
- return /* @__PURE__ */ jsx18(
1347
+ return /* @__PURE__ */ jsx19(
1332
1348
  Controller3,
1333
1349
  {
1334
1350
  name,
@@ -1340,7 +1356,7 @@ var Select = forwardRef3((props, ref) => {
1340
1356
  ref: fieldRef,
1341
1357
  onBlur
1342
1358
  }
1343
- }) => /* @__PURE__ */ jsx18(
1359
+ }) => /* @__PURE__ */ jsx19(
1344
1360
  SelectRoot,
1345
1361
  {
1346
1362
  ...props,
@@ -1357,7 +1373,7 @@ var Select = forwardRef3((props, ref) => {
1357
1373
  }
1358
1374
  );
1359
1375
  }
1360
- return /* @__PURE__ */ jsx18(
1376
+ return /* @__PURE__ */ jsx19(
1361
1377
  SelectRoot,
1362
1378
  {
1363
1379
  ...props,
@@ -1464,7 +1480,7 @@ var SelectRoot = ({
1464
1480
  disabled
1465
1481
  };
1466
1482
  const hasChildren = React6.Children.count(children) > 0;
1467
- return /* @__PURE__ */ jsx18(SelectContext.Provider, { value: valueCtx, children: /* @__PURE__ */ jsxs13(
1483
+ return /* @__PURE__ */ jsx19(SelectContext.Provider, { value: valueCtx, children: /* @__PURE__ */ jsxs13(
1468
1484
  "div",
1469
1485
  {
1470
1486
  ref: containerRef,
@@ -1477,12 +1493,12 @@ var SelectRoot = ({
1477
1493
  style: { color: isFocused || isOpen ? primaryColor : void 0 },
1478
1494
  children: [
1479
1495
  label,
1480
- required && /* @__PURE__ */ jsx18("span", { className: "text-red-500 ml-1", children: "*" })
1496
+ required && /* @__PURE__ */ jsx19("span", { className: "text-red-500 ml-1", children: "*" })
1481
1497
  ]
1482
1498
  }
1483
1499
  ),
1484
1500
  hasChildren ? children : /* @__PURE__ */ jsxs13(Fragment3, { children: [
1485
- /* @__PURE__ */ jsx18(
1501
+ /* @__PURE__ */ jsx19(
1486
1502
  SelectTrigger,
1487
1503
  {
1488
1504
  id,
@@ -1493,7 +1509,7 @@ var SelectRoot = ({
1493
1509
  ...props
1494
1510
  }
1495
1511
  ),
1496
- allOptions && allOptions.length > 0 && /* @__PURE__ */ jsx18(SelectContent, { children: allOptions.map((opt, index) => /* @__PURE__ */ jsx18(
1512
+ allOptions && allOptions.length > 0 && /* @__PURE__ */ jsx19(SelectContent, { children: allOptions.map((opt, index) => /* @__PURE__ */ jsx19(
1497
1513
  SelectItem,
1498
1514
  {
1499
1515
  value: opt.value,
@@ -1503,7 +1519,7 @@ var SelectRoot = ({
1503
1519
  String(opt.value) || index
1504
1520
  )) })
1505
1521
  ] }),
1506
- message && /* @__PURE__ */ jsx18("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1522
+ message && /* @__PURE__ */ jsx19("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1507
1523
  ]
1508
1524
  }
1509
1525
  ) });
@@ -1535,7 +1551,7 @@ var SelectTrigger = forwardRef3(
1535
1551
  const lastFocusTime = useRef3(0);
1536
1552
  const displayOption = options.find((o) => o.value === selectedValue);
1537
1553
  const displayValue = displayOption ? displayOption.label : selectedValue != null && selectedValue !== "" ? String(selectedValue) : placeholder;
1538
- return /* @__PURE__ */ jsx18("div", { className: "relative", ref: dropdownAnchorRef, children: /* @__PURE__ */ jsx18(
1554
+ return /* @__PURE__ */ jsx19("div", { className: "relative", ref: dropdownAnchorRef, children: /* @__PURE__ */ jsx19(
1539
1555
  "div",
1540
1556
  {
1541
1557
  id,
@@ -1585,7 +1601,7 @@ var SelectTrigger = forwardRef3(
1585
1601
  },
1586
1602
  ...props,
1587
1603
  children: children ? children : /* @__PURE__ */ jsxs13(Fragment3, { children: [
1588
- icon && /* @__PURE__ */ jsx18(
1604
+ icon && /* @__PURE__ */ jsx19(
1589
1605
  "div",
1590
1606
  {
1591
1607
  className: `pl-2.5 pr-2 flex items-center transition-colors duration-200`,
@@ -1595,14 +1611,14 @@ var SelectTrigger = forwardRef3(
1595
1611
  children: icon
1596
1612
  }
1597
1613
  ),
1598
- /* @__PURE__ */ jsx18(
1614
+ /* @__PURE__ */ jsx19(
1599
1615
  "div",
1600
1616
  {
1601
1617
  className: `flex-1 truncate text-sm ${icon ? "" : "pl-2.5"} ${!selectedValue && selectedValue !== 0 && selectedValue !== false ? "text-gray-400 dark:text-zinc-500" : ""}`,
1602
1618
  children: displayValue
1603
1619
  }
1604
1620
  ),
1605
- /* @__PURE__ */ jsx18("div", { className: "pr-2.5 flex items-center gap-1 shrink-0", children: /* @__PURE__ */ jsx18(
1621
+ /* @__PURE__ */ jsx19("div", { className: "pr-2.5 flex items-center gap-1 shrink-0", children: /* @__PURE__ */ jsx19(
1606
1622
  ChevronDown2,
1607
1623
  {
1608
1624
  className: `h-4 w-4 text-gray-400 transition-transform ${isOpen ? "rotate-180" : ""}`
@@ -1648,7 +1664,7 @@ var SelectContent = forwardRef3(
1648
1664
  }, [isOpen]);
1649
1665
  if (!isOpen || typeof document === "undefined") return null;
1650
1666
  return createPortal(
1651
- /* @__PURE__ */ jsx18(
1667
+ /* @__PURE__ */ jsx19(
1652
1668
  "div",
1653
1669
  {
1654
1670
  ref: dropdownContentRef,
@@ -1656,7 +1672,7 @@ var SelectContent = forwardRef3(
1656
1672
  style: { ...dropdownStyle, ...style },
1657
1673
  onMouseDown: (e) => e.stopPropagation(),
1658
1674
  ...props,
1659
- children: /* @__PURE__ */ jsx18("div", { className: "flex flex-col gap-0.5", children: React6.Children.count(children) === 0 ? /* @__PURE__ */ jsx18("div", { className: "p-3 text-center text-sm text-gray-500", children: "No options available" }) : children })
1675
+ children: /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-0.5", children: React6.Children.count(children) === 0 ? /* @__PURE__ */ jsx19("div", { className: "p-3 text-center text-sm text-gray-500", children: "No options available" }) : children })
1660
1676
  }
1661
1677
  ),
1662
1678
  document.body
@@ -1703,8 +1719,8 @@ var SelectItem = forwardRef3(
1703
1719
  },
1704
1720
  ...props,
1705
1721
  children: [
1706
- /* @__PURE__ */ jsx18("span", { className: "whitespace-nowrap truncate flex-1", children: children || label }),
1707
- isSelected && /* @__PURE__ */ jsx18(
1722
+ /* @__PURE__ */ jsx19("span", { className: "whitespace-nowrap truncate flex-1", children: children || label }),
1723
+ isSelected && /* @__PURE__ */ jsx19(
1708
1724
  Check2,
1709
1725
  {
1710
1726
  className: "h-4 w-4 shrink-0 ml-2",
@@ -1723,7 +1739,7 @@ import { forwardRef as forwardRef4, useState as useState10 } from "react";
1723
1739
  import {
1724
1740
  Controller as Controller4
1725
1741
  } from "react-hook-form";
1726
- import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
1742
+ import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
1727
1743
  var Textarea = forwardRef4(
1728
1744
  ({
1729
1745
  label,
@@ -1756,11 +1772,11 @@ var Textarea = forwardRef4(
1756
1772
  style: { color: isFocused ? primaryColor : void 0 },
1757
1773
  children: [
1758
1774
  label,
1759
- props.required && /* @__PURE__ */ jsx19("span", { className: "text-red-500 ml-1", children: "*" })
1775
+ props.required && /* @__PURE__ */ jsx20("span", { className: "text-red-500 ml-1", children: "*" })
1760
1776
  ]
1761
1777
  }
1762
1778
  ),
1763
- /* @__PURE__ */ jsx19("div", { className: "relative", children: /* @__PURE__ */ jsx19(
1779
+ /* @__PURE__ */ jsx20("div", { className: "relative", children: /* @__PURE__ */ jsx20(
1764
1780
  "textarea",
1765
1781
  {
1766
1782
  ref: ref2,
@@ -1781,10 +1797,10 @@ var Textarea = forwardRef4(
1781
1797
  ...inputProps
1782
1798
  }
1783
1799
  ) }),
1784
- message && /* @__PURE__ */ jsx19("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1800
+ message && /* @__PURE__ */ jsx20("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
1785
1801
  ] });
1786
1802
  if (form && name) {
1787
- return /* @__PURE__ */ jsx19(
1803
+ return /* @__PURE__ */ jsx20(
1788
1804
  Controller4,
1789
1805
  {
1790
1806
  control: form.control,
@@ -1990,7 +2006,7 @@ var useApis_default = useApi;
1990
2006
 
1991
2007
  // src/components/Fields/searchApi.tsx
1992
2008
  import { Controller as Controller5 } from "react-hook-form";
1993
- import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
2009
+ import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
1994
2010
  var SearchApiContext = createContext4(
1995
2011
  void 0
1996
2012
  );
@@ -2006,12 +2022,12 @@ var SearchApi = forwardRef5(
2006
2022
  (props, _) => {
2007
2023
  const { form, name, onChange, value, children, ...restProps } = props;
2008
2024
  if (form && name) {
2009
- return /* @__PURE__ */ jsx20(
2025
+ return /* @__PURE__ */ jsx21(
2010
2026
  Controller5,
2011
2027
  {
2012
2028
  name,
2013
2029
  control: form.control,
2014
- render: ({ field }) => /* @__PURE__ */ jsx20(
2030
+ render: ({ field }) => /* @__PURE__ */ jsx21(
2015
2031
  SearchApiRoot,
2016
2032
  {
2017
2033
  ...restProps,
@@ -2029,7 +2045,7 @@ var SearchApi = forwardRef5(
2029
2045
  }
2030
2046
  );
2031
2047
  }
2032
- return /* @__PURE__ */ jsx20(
2048
+ return /* @__PURE__ */ jsx21(
2033
2049
  SearchApiRoot,
2034
2050
  {
2035
2051
  ...restProps,
@@ -2058,7 +2074,7 @@ var SearchApiRoot = ({
2058
2074
  valueKey = "_id",
2059
2075
  filter = [],
2060
2076
  required,
2061
- v = 2,
2077
+ v = 1,
2062
2078
  variant = "default",
2063
2079
  fieldInternalProps,
2064
2080
  label,
@@ -2289,7 +2305,7 @@ var SearchApiRoot = ({
2289
2305
  error: message
2290
2306
  };
2291
2307
  const hasChildren = !!children;
2292
- return /* @__PURE__ */ jsx20(SearchApiContext.Provider, { value: valueCtx, children: /* @__PURE__ */ jsxs15(
2308
+ return /* @__PURE__ */ jsx21(SearchApiContext.Provider, { value: valueCtx, children: /* @__PURE__ */ jsxs15(
2293
2309
  "div",
2294
2310
  {
2295
2311
  ref: containerRef,
@@ -2302,13 +2318,13 @@ var SearchApiRoot = ({
2302
2318
  style: { color: isFocused || isOpen ? primaryColor : void 0 },
2303
2319
  children: [
2304
2320
  label,
2305
- required && /* @__PURE__ */ jsx20("span", { className: "text-red-500 ml-1", children: "*" })
2321
+ required && /* @__PURE__ */ jsx21("span", { className: "text-red-500 ml-1", children: "*" })
2306
2322
  ]
2307
2323
  }
2308
2324
  ),
2309
2325
  hasChildren ? children : /* @__PURE__ */ jsxs15(Fragment4, { children: [
2310
- /* @__PURE__ */ jsx20(SearchApiTrigger, { className, children: /* @__PURE__ */ jsx20(SearchApiInput, { ...props }) }),
2311
- /* @__PURE__ */ jsx20(SearchApiContent, { children: filteredOptions.map((opt, index) => /* @__PURE__ */ jsx20(
2326
+ /* @__PURE__ */ jsx21(SearchApiTrigger, { className, children: /* @__PURE__ */ jsx21(SearchApiInput, { ...props }) }),
2327
+ /* @__PURE__ */ jsx21(SearchApiContent, { children: filteredOptions.map((opt, index) => /* @__PURE__ */ jsx21(
2312
2328
  SearchApiItem,
2313
2329
  {
2314
2330
  option: opt,
@@ -2338,7 +2354,7 @@ var SearchApiTrigger = forwardRef5(
2338
2354
  inputRef,
2339
2355
  searchTerm
2340
2356
  } = useSearchApiContext();
2341
- return /* @__PURE__ */ jsx20("div", { className: "relative", ref: dropdownAnchorRef, children: /* @__PURE__ */ jsxs15(
2357
+ return /* @__PURE__ */ jsx21("div", { className: "relative", ref: dropdownAnchorRef, children: /* @__PURE__ */ jsxs15(
2342
2358
  "div",
2343
2359
  {
2344
2360
  className: `flex items-center w-full px-0 text-gray-900 dark:text-white transition-all duration-200 cursor-text py-1 ${variant === "ghost" ? "bg-transparent border-transparent shadow-none px-0 h-full" : isFocused || isOpen ? "ring-2 bg-white dark:bg-zinc-900 border rounded-xl h-9" : "border-gray-200 dark:border-zinc-800 border rounded-xl bg-white dark:bg-zinc-900/50 h-9"} ${className}`,
@@ -2355,25 +2371,25 @@ var SearchApiTrigger = forwardRef5(
2355
2371
  },
2356
2372
  ...props,
2357
2373
  children: [
2358
- /* @__PURE__ */ jsx20(
2374
+ /* @__PURE__ */ jsx21(
2359
2375
  "div",
2360
2376
  {
2361
2377
  className: `${variant === "ghost" ? "pl-0" : "pl-2.5"} text-gray-400`,
2362
- children: /* @__PURE__ */ jsx20(Search, { className: "h-4 w-4" })
2378
+ children: /* @__PURE__ */ jsx21(Search, { className: "h-4 w-4" })
2363
2379
  }
2364
2380
  ),
2365
- /* @__PURE__ */ jsx20("div", { className: "flex-1 relative ms-2", children }),
2366
- /* @__PURE__ */ jsx20("div", { className: "pr-2.5 w-16! flex items-center gap-1 shrink-0 min-w-10 justify-end", children: isLoading ? /* @__PURE__ */ jsx20(Loader22, { className: "h-4 w-4 animate-spin text-blue-500 shrink-0" }) : /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1", children: [
2367
- selectedValue && !disabled && /* @__PURE__ */ jsx20(
2381
+ /* @__PURE__ */ jsx21("div", { className: "flex-1 relative ms-2", children }),
2382
+ /* @__PURE__ */ jsx21("div", { className: "pr-2.5 w-16! flex items-center gap-1 shrink-0 min-w-10 justify-end", children: isLoading ? /* @__PURE__ */ jsx21(Loader22, { className: "h-4 w-4 animate-spin text-blue-500 shrink-0" }) : /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1", children: [
2383
+ selectedValue && !disabled && /* @__PURE__ */ jsx21(
2368
2384
  "button",
2369
2385
  {
2370
2386
  onClick: clearSelection,
2371
2387
  type: "button",
2372
2388
  className: "p-0.5 hover:bg-gray-200 dark:hover:bg-zinc-700 rounded-full text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",
2373
- children: /* @__PURE__ */ jsx20(X2, { className: "h-3 w-3" })
2389
+ children: /* @__PURE__ */ jsx21(X2, { className: "h-3 w-3" })
2374
2390
  }
2375
2391
  ),
2376
- /* @__PURE__ */ jsx20(
2392
+ /* @__PURE__ */ jsx21(
2377
2393
  ChevronDown3,
2378
2394
  {
2379
2395
  className: `h-4 w-4 text-gray-400 transition-transform ${isOpen ? "rotate-180" : ""}`
@@ -2405,7 +2421,10 @@ var SearchApiInput = forwardRef5(
2405
2421
  options,
2406
2422
  handleSelect,
2407
2423
  inputRef,
2408
- fieldInternalProps
2424
+ fieldInternalProps,
2425
+ form,
2426
+ name,
2427
+ obj
2409
2428
  } = useSearchApiContext();
2410
2429
  const setInternalInputRef = (element) => {
2411
2430
  inputRef.current = element;
@@ -2450,8 +2469,8 @@ var SearchApiInput = forwardRef5(
2450
2469
  }
2451
2470
  };
2452
2471
  return /* @__PURE__ */ jsxs15(Fragment4, { children: [
2453
- !isOpen && selectedValue && /* @__PURE__ */ jsx20("div", { className: "absolute inset-0 flex items-center ms-1 truncate select-none", children: getDisplayValue() }),
2454
- /* @__PURE__ */ jsx20(
2472
+ !isOpen && selectedValue && /* @__PURE__ */ jsx21("div", { className: "absolute inset-0 flex items-center ms-1 truncate select-none", children: getDisplayValue() }),
2473
+ /* @__PURE__ */ jsx21(
2455
2474
  "input",
2456
2475
  {
2457
2476
  ref: setInternalInputRef,
@@ -2467,6 +2486,10 @@ var SearchApiInput = forwardRef5(
2467
2486
  } else {
2468
2487
  setIsOpen(false);
2469
2488
  }
2489
+ if (form) {
2490
+ if (name) form.clearErrors(name);
2491
+ if (obj) form.clearErrors(obj);
2492
+ }
2470
2493
  },
2471
2494
  onFocus: () => {
2472
2495
  setIsFocused(true);
@@ -2535,11 +2558,11 @@ var SearchApiContent = forwardRef5(
2535
2558
  onMouseDown: (e) => e.stopPropagation(),
2536
2559
  ...props,
2537
2560
  children: [
2538
- error && /* @__PURE__ */ jsx20("div", { className: "px-3 py-2 text-sm text-red-600 dark:text-red-400 border-b border-gray-100 dark:border-zinc-800", children: error }),
2561
+ error && /* @__PURE__ */ jsx21("div", { className: "px-3 py-2 text-sm text-red-600 dark:text-red-400 border-b border-gray-100 dark:border-zinc-800", children: error }),
2539
2562
  isLoading && options.length === 0 ? /* @__PURE__ */ jsxs15("div", { className: "p-4 text-center text-sm text-gray-500", children: [
2540
- /* @__PURE__ */ jsx20(Loader22, { className: "h-5 w-5 animate-spin mx-auto mb-2" }),
2563
+ /* @__PURE__ */ jsx21(Loader22, { className: "h-5 w-5 animate-spin mx-auto mb-2" }),
2541
2564
  "Loading options..."
2542
- ] }) : children ? /* @__PURE__ */ jsx20("div", { className: "py-1", children }) : /* @__PURE__ */ jsx20("div", { className: "p-4 text-center text-sm text-gray-500", children: searchTerm ? `No results for "${searchTerm}"` : "No options available" })
2565
+ ] }) : children ? /* @__PURE__ */ jsx21("div", { className: "py-1", children }) : /* @__PURE__ */ jsx21("div", { className: "p-4 text-center text-sm text-gray-500", children: searchTerm ? `No results for "${searchTerm}"` : "No options available" })
2543
2566
  ]
2544
2567
  }
2545
2568
  ),
@@ -2587,8 +2610,8 @@ var SearchApiItem = forwardRef5(
2587
2610
  onMouseEnter: () => setActiveIndex(index),
2588
2611
  ...props,
2589
2612
  children: [
2590
- /* @__PURE__ */ jsx20("span", { className: "truncate", children: option[labelKey] }),
2591
- isSelected && /* @__PURE__ */ jsx20(Check3, { className: "h-4 w-4", style: { color: primaryColor } })
2613
+ /* @__PURE__ */ jsx21("span", { className: "truncate", children: option[labelKey] }),
2614
+ isSelected && /* @__PURE__ */ jsx21(Check3, { className: "h-4 w-4", style: { color: primaryColor } })
2592
2615
  ]
2593
2616
  },
2594
2617
  optValue || index
@@ -2606,7 +2629,7 @@ import {
2606
2629
  import dayjs from "dayjs";
2607
2630
  import customParseFormat from "dayjs/plugin/customParseFormat";
2608
2631
  import { Calendar } from "lucide-react";
2609
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
2632
+ import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
2610
2633
  dayjs.extend(customParseFormat);
2611
2634
  var DateInput = forwardRef6(
2612
2635
  ({
@@ -2643,7 +2666,7 @@ var DateInput = forwardRef6(
2643
2666
  ${className}`;
2644
2667
  const renderDatePicker = (val, changeHandler, blurHandler, refProps) => {
2645
2668
  const dateValue = val && typeof val === "string" ? dayjs(val, "DD/MM/YYYY", true) : dayjs.isDayjs(val) ? val : null;
2646
- return /* @__PURE__ */ jsx21(
2669
+ return /* @__PURE__ */ jsx22(
2647
2670
  DatePicker,
2648
2671
  {
2649
2672
  ref: refProps,
@@ -2670,7 +2693,7 @@ var DateInput = forwardRef6(
2670
2693
  boxShadow: isFocused && !message ? `${primaryColor}33 0px 0px 0px 2px` : void 0
2671
2694
  },
2672
2695
  classNames: { popup: { root: "z-50" } },
2673
- suffixIcon: /* @__PURE__ */ jsx21(
2696
+ suffixIcon: /* @__PURE__ */ jsx22(
2674
2697
  Calendar,
2675
2698
  {
2676
2699
  className: "h-5 w-5 text-gray-400",
@@ -2692,11 +2715,11 @@ var DateInput = forwardRef6(
2692
2715
  },
2693
2716
  children: [
2694
2717
  label,
2695
- props.required && /* @__PURE__ */ jsx21("span", { className: "text-red-500 ml-1", children: "*" })
2718
+ props.required && /* @__PURE__ */ jsx22("span", { className: "text-red-500 ml-1", children: "*" })
2696
2719
  ]
2697
2720
  }
2698
2721
  ),
2699
- form && name ? /* @__PURE__ */ jsx21(
2722
+ form && name ? /* @__PURE__ */ jsx22(
2700
2723
  Controller6,
2701
2724
  {
2702
2725
  control: form.control,
@@ -2709,7 +2732,7 @@ var DateInput = forwardRef6(
2709
2732
  )
2710
2733
  }
2711
2734
  ) : renderDatePicker(value, onChange, onBlur, ref),
2712
- message && /* @__PURE__ */ jsx21("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
2735
+ message && /* @__PURE__ */ jsx22("p", { className: "text-sm text-red-600 dark:text-red-400", children: message })
2713
2736
  ] });
2714
2737
  }
2715
2738
  );
@@ -2744,7 +2767,7 @@ import {
2744
2767
  flexRender
2745
2768
  } from "@tanstack/react-table";
2746
2769
  import { ChevronDown as ChevronDown4, Search as Search2 } from "lucide-react";
2747
- import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
2770
+ import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
2748
2771
  function DataTable({
2749
2772
  columns: userColumns,
2750
2773
  data,
@@ -2819,7 +2842,7 @@ function DataTable({
2819
2842
  {
2820
2843
  id: "_index",
2821
2844
  header: "#",
2822
- cell: ({ row }) => /* @__PURE__ */ jsx22("span", { className: "text-gray-500 font-medium ml-1", children: row.index + 1 }),
2845
+ cell: ({ row }) => /* @__PURE__ */ jsx23("span", { className: "text-gray-500 font-medium ml-1", children: row.index + 1 }),
2823
2846
  enableSorting: false
2824
2847
  },
2825
2848
  ...mappedColumns
@@ -2880,27 +2903,27 @@ function DataTable({
2880
2903
  ]);
2881
2904
  return /* @__PURE__ */ jsxs17("div", { className: `space-y-4 w-full ${className}`, children: [
2882
2905
  filterables && /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between gap-4", children: [
2883
- /* @__PURE__ */ jsx22("div", { className: "flex-1 max-w-sm", children: /* @__PURE__ */ jsx22(
2906
+ /* @__PURE__ */ jsx23("div", { className: "flex-1 max-w-sm", children: /* @__PURE__ */ jsx23(
2884
2907
  Fields_default.Input,
2885
2908
  {
2886
2909
  placeholder: searchPlaceholder,
2887
2910
  value: globalFilter,
2888
2911
  onChange: (e) => setGlobalFilter(e.target.value),
2889
- icon: /* @__PURE__ */ jsx22(Search2, { size: 16 }),
2912
+ icon: /* @__PURE__ */ jsx23(Search2, { size: 16 }),
2890
2913
  className: "h-9!"
2891
2914
  }
2892
2915
  ) }),
2893
- /* @__PURE__ */ jsx22("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs17("div", { className: "relative group", children: [
2916
+ /* @__PURE__ */ jsx23("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs17("div", { className: "relative group", children: [
2894
2917
  /* @__PURE__ */ jsxs17("button", { className: "flex items-center gap-2 px-3 h-9 rounded-lg border border-gray-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-zinc-800 transition-colors", children: [
2895
2918
  "Columns",
2896
- /* @__PURE__ */ jsx22(ChevronDown4, { size: 14, className: "text-gray-400" })
2919
+ /* @__PURE__ */ jsx23(ChevronDown4, { size: 14, className: "text-gray-400" })
2897
2920
  ] }),
2898
- /* @__PURE__ */ jsx22("div", { className: "absolute right-0 top-full mt-2 w-48 py-1 bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 rounded-lg shadow-xl opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-50", children: table.getAllColumns().filter((column) => column.getCanHide()).map((column) => /* @__PURE__ */ jsxs17(
2921
+ /* @__PURE__ */ jsx23("div", { className: "absolute right-0 top-full mt-2 w-48 py-1 bg-white dark:bg-zinc-900 border border-gray-200 dark:border-zinc-800 rounded-lg shadow-xl opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-50", children: table.getAllColumns().filter((column) => column.getCanHide()).map((column) => /* @__PURE__ */ jsxs17(
2899
2922
  "label",
2900
2923
  {
2901
2924
  className: "flex items-center gap-2 px-3 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-zinc-800 cursor-pointer capitalize",
2902
2925
  children: [
2903
- /* @__PURE__ */ jsx22(
2926
+ /* @__PURE__ */ jsx23(
2904
2927
  "input",
2905
2928
  {
2906
2929
  type: "checkbox",
@@ -2917,13 +2940,13 @@ function DataTable({
2917
2940
  )) })
2918
2941
  ] }) })
2919
2942
  ] }),
2920
- /* @__PURE__ */ jsx22("div", { className: "rounded-lg border border-gray-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 overflow-hidden relative", children: /* @__PURE__ */ jsx22("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs17(
2943
+ /* @__PURE__ */ jsx23("div", { className: "rounded-lg border border-gray-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 overflow-hidden relative", children: /* @__PURE__ */ jsx23("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs17(
2921
2944
  "table",
2922
2945
  {
2923
2946
  className: "w-full text-left border-collapse",
2924
2947
  style: { accentColor: primaryColor },
2925
2948
  children: [
2926
- /* @__PURE__ */ jsx22("thead", { className: "bg-gray-50/50 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-zinc-800", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx22("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx22(
2949
+ /* @__PURE__ */ jsx23("thead", { className: "bg-gray-50/50 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-zinc-800", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx23("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx23(
2927
2950
  "th",
2928
2951
  {
2929
2952
  className: `${rowPadding} text-sm font-semibold text-gray-900 dark:text-zinc-100 text-left ${verticalLines ? "border-x border-gray-200 dark:border-zinc-800" : ""} ${header.id === "_index" || header.id === "select" || header.id === "_select" ? "w-px whitespace-nowrap" : ""}`,
@@ -2934,22 +2957,22 @@ function DataTable({
2934
2957
  },
2935
2958
  header.id
2936
2959
  )) }, headerGroup.id)) }),
2937
- /* @__PURE__ */ jsx22("tbody", { className: "", children: isLoading ? Array.from({ length: pageRows || 5 }).map((_, i) => /* @__PURE__ */ jsx22(
2960
+ /* @__PURE__ */ jsx23("tbody", { className: "", children: isLoading ? Array.from({ length: pageRows || 5 }).map((_, i) => /* @__PURE__ */ jsx23(
2938
2961
  "tr",
2939
2962
  {
2940
2963
  className: "border-b border-gray-100 dark:border-zinc-800/50",
2941
- children: columns.map((_2, j) => /* @__PURE__ */ jsx22(
2964
+ children: columns.map((_2, j) => /* @__PURE__ */ jsx23(
2942
2965
  "td",
2943
2966
  {
2944
2967
  className: `${rowPadding} ${verticalLines ? "border-x border-gray-200 dark:border-zinc-800/50" : ""}`,
2945
- children: /* @__PURE__ */ jsx22("div", { className: "h-4 bg-gray-100 dark:bg-zinc-800 rounded animate-pulse w-full" })
2968
+ children: /* @__PURE__ */ jsx23("div", { className: "h-4 bg-gray-100 dark:bg-zinc-800 rounded animate-pulse w-full" })
2946
2969
  },
2947
2970
  `skeleton-cell-${j}`
2948
2971
  ))
2949
2972
  },
2950
2973
  `skeleton-${i}`
2951
2974
  )) : table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxs17(React8.Fragment, { children: [
2952
- /* @__PURE__ */ jsx22(
2975
+ /* @__PURE__ */ jsx23(
2953
2976
  "tr",
2954
2977
  {
2955
2978
  className: `border-b border-gray-200 dark:border-zinc-800 hover:bg-gray-50/50 dark:hover:bg-zinc-900/50 transition-colors last:border-b-0 ${renderSubComponent && hasSubComponent(row.original) ? "cursor-pointer" : ""}`,
@@ -2964,7 +2987,7 @@ function DataTable({
2964
2987
  }
2965
2988
  }
2966
2989
  },
2967
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx22(
2990
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx23(
2968
2991
  "td",
2969
2992
  {
2970
2993
  className: `${rowPadding} text-sm text-gray-700 dark:text-gray-200 ${verticalLines ? "border-x border-gray-200 dark:border-zinc-800" : ""} ${cell.column.id === "_index" || cell.column.id === "select" || cell.column.id === "_select" ? "w-px whitespace-nowrap" : ""}`,
@@ -2977,14 +3000,14 @@ function DataTable({
2977
3000
  ))
2978
3001
  }
2979
3002
  ),
2980
- renderSubComponent && row.getIsExpanded() && hasSubComponent(row.original) && /* @__PURE__ */ jsx22("tr", { className: "border-b border-gray-200 dark:border-zinc-800 bg-gray-50/20 dark:bg-zinc-900/20", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, className: "px-2 py-0", children: /* @__PURE__ */ jsxs17("div", { className: "relative pl-6 pb-2 pr-2 pt-2 h-full", children: [
2981
- /* @__PURE__ */ jsx22("div", { className: "absolute left-2 top-0 bottom-2 w-6 border-l-2 border-b-2 rounded-bl-xl border-(--theme-primary) dark:border-(--theme-primary) pointer-events-none" }),
3003
+ renderSubComponent && row.getIsExpanded() && hasSubComponent(row.original) && /* @__PURE__ */ jsx23("tr", { className: "border-b border-gray-200 dark:border-zinc-800 bg-gray-50/20 dark:bg-zinc-900/20", children: /* @__PURE__ */ jsx23("td", { colSpan: columns.length, className: "px-2 py-0", children: /* @__PURE__ */ jsxs17("div", { className: "relative pl-6 pb-2 pr-2 pt-2 h-full", children: [
3004
+ /* @__PURE__ */ jsx23("div", { className: "absolute left-2 top-0 bottom-2 w-6 border-l-2 border-b-2 rounded-bl-xl border-(--theme-primary) dark:border-(--theme-primary) pointer-events-none" }),
2982
3005
  renderSubComponent({
2983
3006
  row: row.original,
2984
3007
  index: row.index
2985
3008
  })
2986
3009
  ] }) }) })
2987
- ] }, row.id)) : /* @__PURE__ */ jsx22("tr", { children: /* @__PURE__ */ jsx22(
3010
+ ] }, row.id)) : /* @__PURE__ */ jsx23("tr", { children: /* @__PURE__ */ jsx23(
2988
3011
  "td",
2989
3012
  {
2990
3013
  colSpan: columns.length,
@@ -2996,7 +3019,7 @@ function DataTable({
2996
3019
  (group) => group.headers.some(
2997
3020
  (header) => header.column.columnDef.footer
2998
3021
  )
2999
- ) && /* @__PURE__ */ jsx22("tfoot", { className: "bg-gray-50/50 dark:bg-zinc-900/50 border-t border-gray-200 dark:border-zinc-800", children: table.getFooterGroups().map((footerGroup) => /* @__PURE__ */ jsx22("tr", { children: footerGroup.headers.map((header) => /* @__PURE__ */ jsx22(
3022
+ ) && /* @__PURE__ */ jsx23("tfoot", { className: "bg-gray-50/50 dark:bg-zinc-900/50 border-t border-gray-200 dark:border-zinc-800", children: table.getFooterGroups().map((footerGroup) => /* @__PURE__ */ jsx23("tr", { children: footerGroup.headers.map((header) => /* @__PURE__ */ jsx23(
3000
3023
  "td",
3001
3024
  {
3002
3025
  className: `${rowPadding} text-sm font-semibold text-gray-900 dark:text-zinc-100 text-left ${verticalLines ? "border-x border-gray-200 dark:border-zinc-800" : ""} ${header.id === "_index" || header.id === "select" || header.id === "_select" ? "w-px whitespace-nowrap" : ""}`,
@@ -3011,7 +3034,7 @@ function DataTable({
3011
3034
  }
3012
3035
  ) }) }),
3013
3036
  /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between px-2", children: [
3014
- /* @__PURE__ */ jsx22("div", { className: "flex-1 text-xs text-gray-500", children: selectable && /* @__PURE__ */ jsxs17(Fragment5, { children: [
3037
+ /* @__PURE__ */ jsx23("div", { className: "flex-1 text-xs text-gray-500", children: selectable && /* @__PURE__ */ jsxs17(Fragment5, { children: [
3015
3038
  table.getFilteredSelectedRowModel().rows.length,
3016
3039
  " of",
3017
3040
  " ",
@@ -3022,12 +3045,12 @@ function DataTable({
3022
3045
  /* @__PURE__ */ jsxs17("span", { className: "text-sm text-gray-700 dark:text-gray-300 mr-2 select-none", children: [
3023
3046
  "Page",
3024
3047
  " ",
3025
- /* @__PURE__ */ jsx22("span", { className: "font-semibold", children: table.getState().pagination.pageIndex + 1 }),
3048
+ /* @__PURE__ */ jsx23("span", { className: "font-semibold", children: table.getState().pagination.pageIndex + 1 }),
3026
3049
  " ",
3027
3050
  "of ",
3028
- /* @__PURE__ */ jsx22("span", { className: "font-semibold", children: table.getPageCount() })
3051
+ /* @__PURE__ */ jsx23("span", { className: "font-semibold", children: table.getPageCount() })
3029
3052
  ] }),
3030
- /* @__PURE__ */ jsx22(
3053
+ /* @__PURE__ */ jsx23(
3031
3054
  "button",
3032
3055
  {
3033
3056
  onClick: () => table.previousPage(),
@@ -3036,7 +3059,7 @@ function DataTable({
3036
3059
  children: "Previous"
3037
3060
  }
3038
3061
  ),
3039
- /* @__PURE__ */ jsx22(
3062
+ /* @__PURE__ */ jsx23(
3040
3063
  "button",
3041
3064
  {
3042
3065
  onClick: () => table.nextPage(),
@@ -3061,7 +3084,7 @@ import {
3061
3084
  flexRender as flexRender2
3062
3085
  } from "@tanstack/react-table";
3063
3086
  import { Plus, Edit2, Trash2, Check as Check4, X as X3, ChevronDown as ChevronDown5 } from "lucide-react";
3064
- import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
3087
+ import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
3065
3088
  function PostTable({
3066
3089
  columns: userColumns,
3067
3090
  data: controlledData,
@@ -3234,22 +3257,22 @@ function PostTable({
3234
3257
  header: "Actions",
3235
3258
  cell: ({ row }) => {
3236
3259
  return /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
3237
- /* @__PURE__ */ jsx23(
3260
+ /* @__PURE__ */ jsx24(
3238
3261
  "button",
3239
3262
  {
3240
3263
  onClick: () => handleEdit(row.index, row.original),
3241
3264
  className: "p-1 px-2 rounded-md hover:bg-gray-100 dark:hover:bg-zinc-800 text-gray-500 hover:text-(--theme-primary) dark:hover:text-(--theme-primary) transition-colors",
3242
3265
  title: "Edit",
3243
- children: /* @__PURE__ */ jsx23(Edit2, { size: 16 })
3266
+ children: /* @__PURE__ */ jsx24(Edit2, { size: 16 })
3244
3267
  }
3245
3268
  ),
3246
- /* @__PURE__ */ jsx23(
3269
+ /* @__PURE__ */ jsx24(
3247
3270
  "button",
3248
3271
  {
3249
3272
  onClick: () => handleDelete(row.index),
3250
3273
  className: "p-1 px-2 rounded-md hover:bg-gray-100 dark:hover:bg-zinc-800 text-gray-500 hover:text-red-600 dark:hover:text-red-400 transition-colors",
3251
3274
  title: "Delete",
3252
- children: /* @__PURE__ */ jsx23(Trash2, { size: 16 })
3275
+ children: /* @__PURE__ */ jsx24(Trash2, { size: 16 })
3253
3276
  }
3254
3277
  )
3255
3278
  ] });
@@ -3267,8 +3290,8 @@ function PostTable({
3267
3290
  id: "_index",
3268
3291
  header: "#",
3269
3292
  cell: ({ row }) => /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
3270
- /* @__PURE__ */ jsx23("span", { className: "text-gray-500 font-medium ml-1", children: row.index + 1 }),
3271
- renderSubComponent && hasSubComponent(row.original) && /* @__PURE__ */ jsx23(
3293
+ /* @__PURE__ */ jsx24("span", { className: "text-gray-500 font-medium ml-1", children: row.index + 1 }),
3294
+ renderSubComponent && hasSubComponent(row.original) && /* @__PURE__ */ jsx24(
3272
3295
  ChevronDown5,
3273
3296
  {
3274
3297
  size: 16,
@@ -3278,7 +3301,7 @@ function PostTable({
3278
3301
  ] }),
3279
3302
  enableSorting: false,
3280
3303
  meta: {
3281
- field: () => /* @__PURE__ */ jsx23("span", { className: "text-gray-400 font-medium px-2 block select-none", children: "#" })
3304
+ field: () => /* @__PURE__ */ jsx24("span", { className: "text-gray-400 font-medium px-2 block select-none", children: "#" })
3282
3305
  }
3283
3306
  });
3284
3307
  }
@@ -3302,13 +3325,13 @@ function PostTable({
3302
3325
  expanded
3303
3326
  }
3304
3327
  });
3305
- return /* @__PURE__ */ jsx23(
3328
+ return /* @__PURE__ */ jsx24(
3306
3329
  "div",
3307
3330
  {
3308
3331
  className: `space-y-4 w-full ${className}`,
3309
3332
  style: { "--theme-primary": primaryColor || "#3b82f6" },
3310
- children: /* @__PURE__ */ jsx23("div", { className: "rounded-lg border border-gray-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 relative", children: /* @__PURE__ */ jsx23("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs18("table", { className: "w-full text-left border-collapse", children: [
3311
- /* @__PURE__ */ jsx23("thead", { className: "bg-gray-50/50 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-zinc-800", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx23("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx23(
3333
+ children: /* @__PURE__ */ jsx24("div", { className: "rounded-lg border border-gray-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 relative", children: /* @__PURE__ */ jsx24("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs18("table", { className: "w-full text-left border-collapse", children: [
3334
+ /* @__PURE__ */ jsx24("thead", { className: "bg-gray-50/50 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-zinc-800", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx24("tr", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx24(
3312
3335
  "th",
3313
3336
  {
3314
3337
  className: `${rowPadding} text-sm font-semibold text-gray-900 dark:text-zinc-100 text-left ${verticalLines ? "border-x border-gray-200 dark:border-zinc-800" : ""} ${header.id === "_index" ? "w-px whitespace-nowrap" : ""}`,
@@ -3320,22 +3343,22 @@ function PostTable({
3320
3343
  header.id
3321
3344
  )) }, headerGroup.id)) }),
3322
3345
  /* @__PURE__ */ jsxs18("tbody", { className: "", children: [
3323
- isLoading ? Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx23(
3346
+ isLoading ? Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx24(
3324
3347
  "tr",
3325
3348
  {
3326
3349
  className: "border-b border-gray-100 dark:border-zinc-800/50",
3327
- children: columns.map((_2, j) => /* @__PURE__ */ jsx23(
3350
+ children: columns.map((_2, j) => /* @__PURE__ */ jsx24(
3328
3351
  "td",
3329
3352
  {
3330
3353
  className: `${rowPadding} ${verticalLines ? "border-x border-gray-200 dark:border-zinc-800/50" : ""}`,
3331
- children: /* @__PURE__ */ jsx23("div", { className: "h-4 bg-gray-100 dark:bg-zinc-800 rounded animate-pulse w-full" })
3354
+ children: /* @__PURE__ */ jsx24("div", { className: "h-4 bg-gray-100 dark:bg-zinc-800 rounded animate-pulse w-full" })
3332
3355
  },
3333
3356
  `skeleton-cell-${j}`
3334
3357
  ))
3335
3358
  },
3336
3359
  `skeleton-${i}`
3337
3360
  )) : table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsxs18(React9.Fragment, { children: [
3338
- /* @__PURE__ */ jsx23(
3361
+ /* @__PURE__ */ jsx24(
3339
3362
  "tr",
3340
3363
  {
3341
3364
  className: `border-b border-gray-200 dark:border-zinc-800 hover:bg-gray-50/50 dark:hover:bg-zinc-900/50 transition-colors last:border-b-0 ${renderSubComponent && hasSubComponent(row.original) ? "cursor-pointer" : ""}`,
@@ -3350,7 +3373,7 @@ function PostTable({
3350
3373
  }
3351
3374
  }
3352
3375
  },
3353
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx23(
3376
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx24(
3354
3377
  "td",
3355
3378
  {
3356
3379
  className: `${rowPadding} text-sm text-gray-700 dark:text-gray-200 ${verticalLines ? "border-x border-gray-200 dark:border-zinc-800" : ""} ${cell.column.id === "_index" ? "w-px whitespace-nowrap" : ""}`,
@@ -3363,14 +3386,14 @@ function PostTable({
3363
3386
  ))
3364
3387
  }
3365
3388
  ),
3366
- renderSubComponent && row.getIsExpanded() && hasSubComponent(row.original) && /* @__PURE__ */ jsx23("tr", { className: "border-b border-gray-200 dark:border-zinc-800 bg-gray-50/20 dark:bg-zinc-900/20", children: /* @__PURE__ */ jsx23("td", { colSpan: columns.length, className: "px-2 py-0", children: /* @__PURE__ */ jsxs18("div", { className: "relative pl-6 pb-2 pr-2 pt-2 h-full", children: [
3367
- /* @__PURE__ */ jsx23("div", { className: "absolute left-2 top-0 bottom-2 w-6 border-l-2 border-b-2 rounded-bl-xl border-(--theme-primary) dark:border-(--theme-primary) pointer-events-none" }),
3389
+ renderSubComponent && row.getIsExpanded() && hasSubComponent(row.original) && /* @__PURE__ */ jsx24("tr", { className: "border-b border-gray-200 dark:border-zinc-800 bg-gray-50/20 dark:bg-zinc-900/20", children: /* @__PURE__ */ jsx24("td", { colSpan: columns.length, className: "px-2 py-0", children: /* @__PURE__ */ jsxs18("div", { className: "relative pl-6 pb-2 pr-2 pt-2 h-full", children: [
3390
+ /* @__PURE__ */ jsx24("div", { className: "absolute left-2 top-0 bottom-2 w-6 border-l-2 border-b-2 rounded-bl-xl border-(--theme-primary) dark:border-(--theme-primary) pointer-events-none" }),
3368
3391
  renderSubComponent({
3369
3392
  row: row.original,
3370
3393
  index: row.index
3371
3394
  })
3372
3395
  ] }) }) })
3373
- ] }, row.id)) : /* @__PURE__ */ jsx23("tr", { children: /* @__PURE__ */ jsx23(
3396
+ ] }, row.id)) : /* @__PURE__ */ jsx24("tr", { children: /* @__PURE__ */ jsx24(
3374
3397
  "td",
3375
3398
  {
3376
3399
  colSpan: columns.length,
@@ -3378,7 +3401,7 @@ function PostTable({
3378
3401
  children: "No results found."
3379
3402
  }
3380
3403
  ) }),
3381
- /* @__PURE__ */ jsx23(
3404
+ /* @__PURE__ */ jsx24(
3382
3405
  "tr",
3383
3406
  {
3384
3407
  ref: entryRowRef,
@@ -3393,7 +3416,7 @@ function PostTable({
3393
3416
  return visibleColumns.map((column) => {
3394
3417
  const currentId = column.id || column.columnDef.accessorKey;
3395
3418
  if (column.id === "actions") {
3396
- return /* @__PURE__ */ jsx23(
3419
+ return /* @__PURE__ */ jsx24(
3397
3420
  "td",
3398
3421
  {
3399
3422
  className: cn(
@@ -3401,28 +3424,28 @@ function PostTable({
3401
3424
  "py-1! text-sm align-middle transition-colors duration-200",
3402
3425
  verticalLines ? "border-x border-gray-200 dark:border-zinc-800" : ""
3403
3426
  ),
3404
- children: /* @__PURE__ */ jsx23("div", { className: "flex items-center gap-2", children: editingIndex !== null ? /* @__PURE__ */ jsxs18(Fragment6, { children: [
3405
- /* @__PURE__ */ jsx23(
3427
+ children: /* @__PURE__ */ jsx24("div", { className: "flex items-center gap-2", children: editingIndex !== null ? /* @__PURE__ */ jsxs18(Fragment6, { children: [
3428
+ /* @__PURE__ */ jsx24(
3406
3429
  "button",
3407
3430
  {
3408
3431
  onClick: handleSaveField,
3409
3432
  disabled: isSavingAsync,
3410
3433
  className: "flex-1 h-8 flex items-center justify-center rounded-lg bg-green-500/10 text-green-600 dark:bg-emerald-500/20 dark:text-emerald-400 hover:bg-green-500 hover:text-white dark:hover:bg-emerald-500 transition-colors shadow-sm active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",
3411
3434
  title: "Update",
3412
- children: isSavingAsync ? /* @__PURE__ */ jsx23("div", { className: "w-3.5 h-3.5 rounded-full border-2 border-emerald-500/30 border-t-emerald-500 animate-spin" }) : /* @__PURE__ */ jsx23(Check4, { size: 16, strokeWidth: 2.5 })
3435
+ children: isSavingAsync ? /* @__PURE__ */ jsx24("div", { className: "w-3.5 h-3.5 rounded-full border-2 border-emerald-500/30 border-t-emerald-500 animate-spin" }) : /* @__PURE__ */ jsx24(Check4, { size: 16, strokeWidth: 2.5 })
3413
3436
  }
3414
3437
  ),
3415
- /* @__PURE__ */ jsx23(
3438
+ /* @__PURE__ */ jsx24(
3416
3439
  "button",
3417
3440
  {
3418
3441
  onClick: handleCancelEdit,
3419
3442
  disabled: isSavingAsync,
3420
3443
  className: "flex-1 h-8 flex items-center justify-center rounded-lg bg-red-500/10 text-red-600 dark:bg-red-500/20 dark:text-red-400 hover:bg-red-500 hover:text-white dark:hover:bg-red-500 transition-colors shadow-sm active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",
3421
3444
  title: "Cancel",
3422
- children: /* @__PURE__ */ jsx23(X3, { size: 16, strokeWidth: 2.5 })
3445
+ children: /* @__PURE__ */ jsx24(X3, { size: 16, strokeWidth: 2.5 })
3423
3446
  }
3424
3447
  )
3425
- ] }) : /* @__PURE__ */ jsx23(Fragment6, { children: renderAddButton ? renderAddButton(
3448
+ ] }) : /* @__PURE__ */ jsx24(Fragment6, { children: renderAddButton ? renderAddButton(
3426
3449
  entryData,
3427
3450
  handleSaveField,
3428
3451
  isSavingAsync
@@ -3437,8 +3460,8 @@ function PostTable({
3437
3460
  },
3438
3461
  title: "Add Row",
3439
3462
  children: [
3440
- isSavingAsync ? /* @__PURE__ */ jsx23("div", { className: "w-3.5 h-3.5 rounded-full border-2 border-white/30 border-t-white animate-spin" }) : /* @__PURE__ */ jsx23(Plus, { size: 14, strokeWidth: 2.5 }),
3441
- /* @__PURE__ */ jsx23("span", { children: isSavingAsync ? "Adding..." : "Add" })
3463
+ isSavingAsync ? /* @__PURE__ */ jsx24("div", { className: "w-3.5 h-3.5 rounded-full border-2 border-white/30 border-t-white animate-spin" }) : /* @__PURE__ */ jsx24(Plus, { size: 14, strokeWidth: 2.5 }),
3464
+ /* @__PURE__ */ jsx24("span", { children: isSavingAsync ? "Adding..." : "Add" })
3442
3465
  ]
3443
3466
  }
3444
3467
  ) }) })
@@ -3464,7 +3487,7 @@ function PostTable({
3464
3487
  });
3465
3488
  }
3466
3489
  };
3467
- return /* @__PURE__ */ jsx23(
3490
+ return /* @__PURE__ */ jsx24(
3468
3491
  "td",
3469
3492
  {
3470
3493
  "data-column-id": column.id,
@@ -3497,13 +3520,22 @@ function PostTable({
3497
3520
  handleSaveField();
3498
3521
  }
3499
3522
  },
3523
+ onInput: () => {
3524
+ if (fieldErrors[accessor]) {
3525
+ setFieldErrors((prev) => {
3526
+ const next = { ...prev };
3527
+ delete next[accessor];
3528
+ return next;
3529
+ });
3530
+ }
3531
+ },
3500
3532
  children: [
3501
3533
  fieldRenderer ? fieldRenderer({
3502
3534
  value,
3503
3535
  onChange: onChangeValue,
3504
3536
  rowData: entryData,
3505
3537
  setRowData: setEntryData
3506
- }) : /* @__PURE__ */ jsx23(
3538
+ }) : /* @__PURE__ */ jsx24(
3507
3539
  Fields_default.Input,
3508
3540
  {
3509
3541
  id: `pti-${accessor}`,
@@ -3515,7 +3547,7 @@ function PostTable({
3515
3547
  placeholder: `${typeof column.columnDef.header === "string" ? column.columnDef.header : column.id}`
3516
3548
  }
3517
3549
  ),
3518
- typeof error === "string" && /* @__PURE__ */ jsx23("div", { className: "absolute left-1/2 -translate-x-1/2 bottom-[100%] mb-2 z-[9999] pointer-events-none opacity-0 group-hover:opacity-100 focus-within:opacity-100 group-focus-within:opacity-100 transition-opacity whitespace-nowrap bg-red-500 text-white text-xs px-2.5 py-1.5 rounded shadow-lg before:content-[''] before:absolute before:top-full before:left-1/2 before:-translate-x-1/2 before:border-4 before:border-transparent before:border-t-red-500", children: error })
3550
+ typeof error === "string" && /* @__PURE__ */ jsx24("div", { className: "absolute left-1/2 -translate-x-1/2 bottom-full mb-2 z-9999 pointer-events-none opacity-0 group-hover:opacity-100 focus-within:opacity-100 group-focus-within:opacity-100 transition-opacity whitespace-nowrap bg-red-500 text-white text-xs px-2.5 py-1.5 rounded shadow-lg before:content-[''] before:absolute before:top-full before:left-1/2 before:-translate-x-1/2 before:border-4 before:border-transparent before:border-t-red-500", children: error })
3519
3551
  ]
3520
3552
  }
3521
3553
  )
@@ -3531,7 +3563,7 @@ function PostTable({
3531
3563
  (group) => group.headers.some(
3532
3564
  (header) => header.column.columnDef.footer
3533
3565
  )
3534
- ) && /* @__PURE__ */ jsx23("tfoot", { className: "bg-gray-50/50 dark:bg-zinc-900/50 border-t border-gray-200 dark:border-zinc-800", children: table.getFooterGroups().map((footerGroup) => /* @__PURE__ */ jsx23("tr", { children: footerGroup.headers.map((header) => /* @__PURE__ */ jsx23(
3566
+ ) && /* @__PURE__ */ jsx24("tfoot", { className: "bg-gray-50/50 dark:bg-zinc-900/50 border-t border-gray-200 dark:border-zinc-800", children: table.getFooterGroups().map((footerGroup) => /* @__PURE__ */ jsx24("tr", { children: footerGroup.headers.map((header) => /* @__PURE__ */ jsx24(
3535
3567
  "td",
3536
3568
  {
3537
3569
  className: `${rowPadding} text-sm font-semibold text-gray-900 dark:text-zinc-100 text-left ${verticalLines ? "border-x border-gray-200 dark:border-zinc-800" : ""} ${header.id === "_index" ? "w-px whitespace-nowrap" : ""}`,
@@ -3554,7 +3586,7 @@ import {
3554
3586
  getCoreRowModel as getCoreRowModel3,
3555
3587
  flexRender as flexRender3
3556
3588
  } from "@tanstack/react-table";
3557
- import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
3589
+ import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
3558
3590
  function SimpleTable({
3559
3591
  columns: userColumns,
3560
3592
  data,
@@ -3607,11 +3639,11 @@ function SimpleTable({
3607
3639
  {
3608
3640
  className: `w-full max-w-full text-left border-collapse table-fixed ${verticalLines ? "border border-black dark:border-white" : ""}`,
3609
3641
  children: [
3610
- /* @__PURE__ */ jsx24("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx24(
3642
+ /* @__PURE__ */ jsx25("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx25(
3611
3643
  "tr",
3612
3644
  {
3613
3645
  className: `border-b ${verticalLines ? "border-black dark:border-white" : "border-gray-200 dark:border-zinc-800"}`,
3614
- children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx24(
3646
+ children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx25(
3615
3647
  "th",
3616
3648
  {
3617
3649
  className: `${rowPadding} font-semibold text-gray-900 dark:text-zinc-100 text-sm align-top ${verticalLines ? "border-x border-black dark:border-white" : ""} ${header.column.columnDef.className || "wrap-break-word"}`,
@@ -3630,32 +3662,32 @@ function SimpleTable({
3630
3662
  },
3631
3663
  headerGroup.id
3632
3664
  )) }),
3633
- /* @__PURE__ */ jsx24("tbody", { className: "text-black dark:text-white font-semibold font-sans tabular-nums", children: isLoading ? Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx24(
3665
+ /* @__PURE__ */ jsx25("tbody", { className: "text-black dark:text-white font-semibold font-sans tabular-nums", children: isLoading ? Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx25(
3634
3666
  "tr",
3635
3667
  {
3636
3668
  className: `border-b ${verticalLines ? "border-black dark:border-white" : "border-gray-100 dark:border-zinc-800/60 last:border-0"}`,
3637
- children: columns.map((col, colIdx) => /* @__PURE__ */ jsx24(
3669
+ children: columns.map((col, colIdx) => /* @__PURE__ */ jsx25(
3638
3670
  "td",
3639
3671
  {
3640
3672
  className: `text-sm ${rowPadding} align-top ${verticalLines ? "border-x border-black dark:border-white" : ""}`,
3641
- children: /* @__PURE__ */ jsx24("div", { className: "h-4 bg-gray-200 dark:bg-zinc-800 rounded-sm animate-pulse w-full" })
3673
+ children: /* @__PURE__ */ jsx25("div", { className: "h-4 bg-gray-200 dark:bg-zinc-800 rounded-sm animate-pulse w-full" })
3642
3674
  },
3643
3675
  `skeleton-col-${colIdx}`
3644
3676
  ))
3645
3677
  },
3646
3678
  `skeleton-row-${i}`
3647
- )) : data.length === 0 ? /* @__PURE__ */ jsx24("tr", { children: /* @__PURE__ */ jsx24(
3679
+ )) : data.length === 0 ? /* @__PURE__ */ jsx25("tr", { children: /* @__PURE__ */ jsx25(
3648
3680
  "td",
3649
3681
  {
3650
3682
  colSpan: columns.length,
3651
3683
  className: "text-center py-8 text-gray-500 font-medium",
3652
3684
  children: "No transactions found."
3653
3685
  }
3654
- ) }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx24(
3686
+ ) }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx25(
3655
3687
  "tr",
3656
3688
  {
3657
3689
  className: `border-b ${verticalLines ? "border-black dark:border-white" : "border-gray-100 dark:border-zinc-800/60 last:border-0"} hover:bg-gray-50/50 dark:hover:bg-zinc-900/30 transition-colors`,
3658
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx24(
3690
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx25(
3659
3691
  "td",
3660
3692
  {
3661
3693
  className: `text-sm ${rowPadding} align-top ${verticalLines ? "border-x border-black dark:border-white" : ""} ${cell.column.columnDef.className || "wrap-break-word"}`,
@@ -3666,11 +3698,11 @@ function SimpleTable({
3666
3698
  },
3667
3699
  row.id
3668
3700
  )) }),
3669
- hasFooters && !isLoading && /* @__PURE__ */ jsx24("tfoot", { className: "text-black dark:text-white font-bold font-sans tabular-nums", children: table.getFooterGroups().map((footerGroup) => /* @__PURE__ */ jsx24(
3701
+ hasFooters && !isLoading && /* @__PURE__ */ jsx25("tfoot", { className: "text-black dark:text-white font-bold font-sans tabular-nums", children: table.getFooterGroups().map((footerGroup) => /* @__PURE__ */ jsx25(
3670
3702
  "tr",
3671
3703
  {
3672
3704
  className: `${verticalLines ? "border-t border-black dark:border-white" : "bg-gray-50/30 dark:bg-zinc-900/10"}`,
3673
- children: footerGroup.headers.map((header) => /* @__PURE__ */ jsx24(
3705
+ children: footerGroup.headers.map((header) => /* @__PURE__ */ jsx25(
3674
3706
  "td",
3675
3707
  {
3676
3708
  className: `text-sm ${rowPadding} ${verticalLines ? "border-x border-black dark:border-white" : ""} ${header.column.columnDef.className || "wrap-break-word"}`,
@@ -3687,13 +3719,13 @@ function SimpleTable({
3687
3719
  ]
3688
3720
  }
3689
3721
  ),
3690
- componentFooter && /* @__PURE__ */ jsx24("div", { className: "mt-2 pt-3 border-t border-gray-200 dark:border-zinc-800", children: componentFooter() })
3722
+ componentFooter && /* @__PURE__ */ jsx25("div", { className: "mt-2 pt-3 border-t border-gray-200 dark:border-zinc-800", children: componentFooter() })
3691
3723
  ] });
3692
3724
  }
3693
3725
 
3694
3726
  // src/components/Badge.tsx
3695
3727
  import React11 from "react";
3696
- import { jsx as jsx25 } from "react/jsx-runtime";
3728
+ import { jsx as jsx26 } from "react/jsx-runtime";
3697
3729
  var Badge = React11.forwardRef(
3698
3730
  ({
3699
3731
  children,
@@ -3715,7 +3747,7 @@ var Badge = React11.forwardRef(
3715
3747
  md: "px-2.5 py-1 text-xs leading-tight font-semibold",
3716
3748
  lg: "px-3 py-1.5 text-sm leading-tight font-semibold"
3717
3749
  };
3718
- return /* @__PURE__ */ jsx25(
3750
+ return /* @__PURE__ */ jsx26(
3719
3751
  "span",
3720
3752
  {
3721
3753
  ref,
@@ -3729,13 +3761,13 @@ var Badge = React11.forwardRef(
3729
3761
  Badge.displayName = "Badge";
3730
3762
 
3731
3763
  // src/components/Branding.tsx
3732
- import { jsx as jsx26 } from "react/jsx-runtime";
3764
+ import { jsx as jsx27 } from "react/jsx-runtime";
3733
3765
  var Branding = ({
3734
3766
  text,
3735
3767
  disabled = false,
3736
3768
  className
3737
3769
  }) => {
3738
- return /* @__PURE__ */ jsx26(
3770
+ return /* @__PURE__ */ jsx27(
3739
3771
  "p",
3740
3772
  {
3741
3773
  className: cn(
@@ -3752,7 +3784,7 @@ var Branding = ({
3752
3784
  import { useEffect as useEffect10, useRef as useRef6, useState as useState16 } from "react";
3753
3785
  import { useReactToPrint } from "react-to-print";
3754
3786
  import { RefreshCw, Printer, AlertCircle, FileX } from "lucide-react";
3755
- import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
3787
+ import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
3756
3788
  var useA4StatementView = ({
3757
3789
  url,
3758
3790
  v = 1,
@@ -3781,7 +3813,7 @@ var useA4StatementView = ({
3781
3813
  renderFooter: (value) => value.reduce((acc, item) => acc + item.amount, 0)
3782
3814
  }
3783
3815
  ],
3784
- data = apiData || [],
3816
+ data = [],
3785
3817
  error = apiError,
3786
3818
  info,
3787
3819
  index,
@@ -3818,14 +3850,14 @@ var useA4StatementView = ({
3818
3850
  id: "a4-final-total",
3819
3851
  className: "mt-6 flex flex-wrap justify-end items-center pt-4 border-t border-black dark:border-zinc-700 print:border-black gap-4",
3820
3852
  children: [
3821
- /* @__PURE__ */ jsx27("div", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-xs mr-auto", children: "Grand Totals" }),
3853
+ /* @__PURE__ */ jsx28("div", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-xs mr-auto", children: "Grand Totals" }),
3822
3854
  columnsWithFooters.map((col, idx) => /* @__PURE__ */ jsxs20(
3823
3855
  "div",
3824
3856
  {
3825
3857
  className: "flex items-center gap-3 px-4 py-2 rounded-md border border-black dark:border-zinc-700 print:border-black",
3826
3858
  children: [
3827
- /* @__PURE__ */ jsx27("span", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-xs", children: typeof col.header === "string" ? col.header : typeof col.key === "string" ? col.key : "Total" }),
3828
- /* @__PURE__ */ jsx27("div", { className: "text-base font-bold font-sans tabular-nums text-black dark:text-white print:text-black", children: col.renderFooter(filteredDisplayData) })
3859
+ /* @__PURE__ */ jsx28("span", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-xs", children: typeof col.header === "string" ? col.header : typeof col.key === "string" ? col.key : "Total" }),
3860
+ /* @__PURE__ */ jsx28("div", { className: "text-base font-bold font-sans tabular-nums text-black dark:text-white print:text-black", children: col.renderFooter(filteredDisplayData) })
3829
3861
  ]
3830
3862
  },
3831
3863
  col.key || idx
@@ -3906,34 +3938,34 @@ var useA4StatementView = ({
3906
3938
  className: "flex justify-between items-start mb-5 px-8 pt-8",
3907
3939
  id: "a4-header-section",
3908
3940
  children: [
3909
- /* @__PURE__ */ jsx27("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsx27("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ jsxs20("section", { children: [
3910
- /* @__PURE__ */ jsx27("h1", { className: "text-4xl font-bold text-blue-600 dark:text-blue-500 print:text-blue-600 tracking-tight uppercase", children: title }),
3911
- /* @__PURE__ */ jsx27("p", { className: "text-gray-500 dark:text-gray-400 print:text-gray-500 mt-1 uppercase text-xs font-semibold tracking-wider", children: subtitle })
3941
+ /* @__PURE__ */ jsx28("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsx28("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ jsxs20("section", { children: [
3942
+ /* @__PURE__ */ jsx28("h1", { className: "text-4xl font-bold text-blue-600 dark:text-blue-500 print:text-blue-600 tracking-tight uppercase", children: title }),
3943
+ /* @__PURE__ */ jsx28("p", { className: "text-gray-500 dark:text-gray-400 print:text-gray-500 mt-1 uppercase text-xs font-semibold tracking-wider", children: subtitle })
3912
3944
  ] }) }) }),
3913
3945
  /* @__PURE__ */ jsxs20("div", { className: "text-right", children: [
3914
- /* @__PURE__ */ jsx27("h2", { className: "text-lg font-bold text-gray-800 dark:text-gray-100 print:text-gray-800", children: store?.name }),
3946
+ /* @__PURE__ */ jsx28("h2", { className: "text-lg font-bold text-gray-800 dark:text-gray-100 print:text-gray-800", children: store?.name }),
3915
3947
  /* @__PURE__ */ jsxs20("div", { className: "text-sm text-gray-500 dark:text-gray-400 print:text-gray-500 leading-relaxed text-right flex flex-col items-end", children: [
3916
- store?.address && /* @__PURE__ */ jsx27("span", { className: "whitespace-pre-line", children: store.address }),
3917
- store?.phone && /* @__PURE__ */ jsx27("span", { children: store.phone }),
3918
- store?.email && /* @__PURE__ */ jsx27("span", { children: store.email })
3948
+ store?.address && /* @__PURE__ */ jsx28("span", { className: "whitespace-pre-line", children: store.address }),
3949
+ store?.phone && /* @__PURE__ */ jsx28("span", { children: store.phone }),
3950
+ store?.email && /* @__PURE__ */ jsx28("span", { children: store.email })
3919
3951
  ] })
3920
3952
  ] })
3921
3953
  ]
3922
3954
  }
3923
3955
  );
3924
- const DisplayInfoGridEl = Array.isArray(info) && info.length > 0 ? /* @__PURE__ */ jsx27("div", { id: "a4-info-grid", className: "px-8", children: /* @__PURE__ */ jsx27(InfoGrid, { className: "mb-4", items: info, isLoading }) }) : null;
3956
+ const DisplayInfoGridEl = Array.isArray(info) && info.length > 0 ? /* @__PURE__ */ jsx28("div", { id: "a4-info-grid", className: "px-8", children: /* @__PURE__ */ jsx28(InfoGrid, { className: "mb-4", items: info, isLoading }) }) : null;
3925
3957
  if (!isLoading && (error || !data || data.length === 0)) {
3926
- return /* @__PURE__ */ jsx27("div", { className: "flex flex-col relative w-full items-center justify-center p-8 min-h-96", children: /* @__PURE__ */ jsxs20("div", { className: "flex flex-col items-center justify-center p-12 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-xl text-center shadow-sm", children: [
3927
- error ? /* @__PURE__ */ jsx27("div", { className: "w-16 h-16 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-6", children: /* @__PURE__ */ jsx27(AlertCircle, { className: "w-8 h-8 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ jsx27("div", { className: "w-16 h-16 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-6", children: /* @__PURE__ */ jsx27(FileX, { className: "w-8 h-8 text-gray-500 dark:text-gray-400" }) }),
3928
- /* @__PURE__ */ jsx27("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-2", children: error ? "Failed to Load Statement" : "No Records Found" }),
3929
- /* @__PURE__ */ jsx27("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-8 leading-relaxed", children: error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the statement data." : "There are no transactions or records available in this requested statement." }),
3958
+ return /* @__PURE__ */ jsx28("div", { className: "flex flex-col relative w-full items-center justify-center p-8 min-h-96", children: /* @__PURE__ */ jsxs20("div", { className: "flex flex-col items-center justify-center p-12 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-xl text-center shadow-sm", children: [
3959
+ error ? /* @__PURE__ */ jsx28("div", { className: "w-16 h-16 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-6", children: /* @__PURE__ */ jsx28(AlertCircle, { className: "w-8 h-8 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ jsx28("div", { className: "w-16 h-16 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-6", children: /* @__PURE__ */ jsx28(FileX, { className: "w-8 h-8 text-gray-500 dark:text-gray-400" }) }),
3960
+ /* @__PURE__ */ jsx28("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-2", children: error ? "Failed to Load Statement" : "No Records Found" }),
3961
+ /* @__PURE__ */ jsx28("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-8 leading-relaxed", children: error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the statement data." : "There are no transactions or records available in this requested statement." }),
3930
3962
  url && /* @__PURE__ */ jsxs20(
3931
3963
  "button",
3932
3964
  {
3933
3965
  onClick: () => get({ url, v, params, delay }),
3934
3966
  className: "flex items-center gap-2 px-6 py-2.5 bg-black dark:bg-white text-white dark:text-black font-semibold rounded-lg shadow-md hover:bg-gray-800 dark:hover:bg-gray-100 transition-all active:scale-95",
3935
3967
  children: [
3936
- /* @__PURE__ */ jsx27(RefreshCw, { size: 16 }),
3968
+ /* @__PURE__ */ jsx28(RefreshCw, { size: 16 }),
3937
3969
  "Try Again"
3938
3970
  ]
3939
3971
  }
@@ -3941,7 +3973,7 @@ var useA4StatementView = ({
3941
3973
  ] }) });
3942
3974
  }
3943
3975
  return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col relative w-full items-center", children: [
3944
- isMeasuring && filteredDisplayData.length > 0 && /* @__PURE__ */ jsx27("div", { className: "absolute top-0 opacity-0 pointer-events-none -left-full", children: /* @__PURE__ */ jsx27(
3976
+ isMeasuring && filteredDisplayData.length > 0 && /* @__PURE__ */ jsx28("div", { className: "absolute top-0 opacity-0 pointer-events-none -left-full", children: /* @__PURE__ */ jsx28(
3945
3977
  "div",
3946
3978
  {
3947
3979
  style: { width: "210mm", boxSizing: "border-box" },
@@ -3955,8 +3987,8 @@ var useA4StatementView = ({
3955
3987
  HeaderEl,
3956
3988
  DisplayInfoGridEl,
3957
3989
  /* @__PURE__ */ jsxs20("div", { className: "grow w-full px-8 pb-8", children: [
3958
- /* @__PURE__ */ jsx27("div", { className: "mb-4 border-b border-gray-200 dark:border-zinc-800 print:border-gray-200 pb-2 flex items-center gap-2 justify-between px-2 mt-2", children: /* @__PURE__ */ jsx27("h3", { className: "text-sm font-bold text-gray-800 dark:text-gray-100 print:text-gray-800 uppercase tracking-wide shrink-0", children: "Recent Transactions" }) }),
3959
- /* @__PURE__ */ jsx27(
3990
+ /* @__PURE__ */ jsx28("div", { className: "mb-4 border-b border-gray-200 dark:border-zinc-800 print:border-gray-200 pb-2 flex items-center gap-2 justify-between px-2 mt-2", children: /* @__PURE__ */ jsx28("h3", { className: "text-sm font-bold text-gray-800 dark:text-gray-100 print:text-gray-800 uppercase tracking-wide shrink-0", children: "Recent Transactions" }) }),
3991
+ /* @__PURE__ */ jsx28(
3960
3992
  SimpleTable,
3961
3993
  {
3962
3994
  columns,
@@ -3974,7 +4006,7 @@ var useA4StatementView = ({
3974
4006
  )
3975
4007
  }
3976
4008
  ) }),
3977
- /* @__PURE__ */ jsx27("div", { className: "py-2 px-0 md:px-4 w-full", ref: contentRef, children: /* @__PURE__ */ jsx27("div", { className: "flex flex-col gap-8 print:block print:gap-0 w-full items-center", children: pages.map((pageData, pageIndex) => /* @__PURE__ */ jsx27(
4009
+ /* @__PURE__ */ jsx28("div", { className: "py-2 px-0 md:px-4 w-full", ref: contentRef, children: /* @__PURE__ */ jsx28("div", { className: "flex flex-col gap-8 print:block print:gap-0 w-full items-center", children: pages.map((pageData, pageIndex) => /* @__PURE__ */ jsx28(
3978
4010
  PageA4,
3979
4011
  {
3980
4012
  className: "w-full",
@@ -3984,7 +4016,7 @@ var useA4StatementView = ({
3984
4016
  children: /* @__PURE__ */ jsxs20("div", { className: "flex flex-col h-full grow w-full", children: [
3985
4017
  /* @__PURE__ */ jsxs20("header", { className: "flex justify-between gap-2 items-center px-8 pt-4 print:hidden", children: [
3986
4018
  headers,
3987
- printable && pageIndex === 0 && /* @__PURE__ */ jsx27("div", { className: "flex items-center justify-end ", children: /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
4019
+ printable && pageIndex === 0 && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-end ", children: /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
3988
4020
  /* @__PURE__ */ jsxs20(
3989
4021
  "button",
3990
4022
  {
@@ -3992,14 +4024,14 @@ var useA4StatementView = ({
3992
4024
  disabled: isLoading,
3993
4025
  className: "flex items-center gap-2 px-3 py-1.5 text-gray-600 dark:text-gray-300 hover:text-black dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-all disabled:opacity-50",
3994
4026
  children: [
3995
- /* @__PURE__ */ jsx27(
4027
+ /* @__PURE__ */ jsx28(
3996
4028
  RefreshCw,
3997
4029
  {
3998
4030
  size: 16,
3999
4031
  className: isLoading ? "animate-spin" : ""
4000
4032
  }
4001
4033
  ),
4002
- /* @__PURE__ */ jsx27("span", { className: "text-xs font-semibold", children: "Reload" })
4034
+ /* @__PURE__ */ jsx28("span", { className: "text-xs font-semibold", children: "Reload" })
4003
4035
  ]
4004
4036
  }
4005
4037
  ),
@@ -4009,7 +4041,7 @@ var useA4StatementView = ({
4009
4041
  onClick: () => reactToPrintFn(),
4010
4042
  className: "flex items-center gap-2 px-4 py-1.5 bg-black dark:bg-zinc-800 text-white rounded-md text-xs font-bold shadow-sm hover:bg-zinc-800 dark:hover:bg-zinc-700 transition-all active:scale-95",
4011
4043
  children: [
4012
- /* @__PURE__ */ jsx27(Printer, { size: 16 }),
4044
+ /* @__PURE__ */ jsx28(Printer, { size: 16 }),
4013
4045
  "Print"
4014
4046
  ]
4015
4047
  }
@@ -4020,8 +4052,8 @@ var useA4StatementView = ({
4020
4052
  pageIndex === 0 && DisplayInfoGridEl,
4021
4053
  /* @__PURE__ */ jsxs20("div", { className: "grow w-full px-8 pb-8", children: [
4022
4054
  pageIndex === 0 && /* @__PURE__ */ jsxs20("div", { className: "mb-4 border-b border-gray-200 dark:border-zinc-800 print:border-gray-200 pb-2 flex items-center gap-2 justify-between px-2 mt-2 print:hidden", children: [
4023
- /* @__PURE__ */ jsx27("h3", { className: "text-sm font-bold text-gray-800 dark:text-gray-100 print:text-gray-800 uppercase tracking-wide shrink-0", children: "Recent Transactions" }),
4024
- /* @__PURE__ */ jsx27(
4055
+ /* @__PURE__ */ jsx28("h3", { className: "text-sm font-bold text-gray-800 dark:text-gray-100 print:text-gray-800 uppercase tracking-wide shrink-0", children: "Recent Transactions" }),
4056
+ /* @__PURE__ */ jsx28(
4025
4057
  "input",
4026
4058
  {
4027
4059
  type: "text",
@@ -4032,9 +4064,9 @@ var useA4StatementView = ({
4032
4064
  }
4033
4065
  )
4034
4066
  ] }),
4035
- pageIndex === 0 && /* @__PURE__ */ jsx27("div", { className: "hidden print:flex mb-4 border-b border-gray-200 print:border-gray-200 pb-2 items-center gap-2 justify-between px-2 mt-2", children: /* @__PURE__ */ jsx27("h3", { className: "text-sm font-bold text-gray-800 print:text-gray-800 uppercase tracking-wide shrink-0", children: "Recent Transactions" }) }),
4036
- pageIndex > 0 && /* @__PURE__ */ jsx27("div", { className: "h-5 print:h-0" }),
4037
- (pageData.length > 0 || isLoading) && /* @__PURE__ */ jsx27(
4067
+ pageIndex === 0 && /* @__PURE__ */ jsx28("div", { className: "hidden print:flex mb-4 border-b border-gray-200 print:border-gray-200 pb-2 items-center gap-2 justify-between px-2 mt-2", children: /* @__PURE__ */ jsx28("h3", { className: "text-sm font-bold text-gray-800 print:text-gray-800 uppercase tracking-wide shrink-0", children: "Recent Transactions" }) }),
4068
+ pageIndex > 0 && /* @__PURE__ */ jsx28("div", { className: "h-5 print:h-0" }),
4069
+ (pageData.length > 0 || isLoading) && /* @__PURE__ */ jsx28(
4038
4070
  SimpleTable,
4039
4071
  {
4040
4072
  columns,
@@ -4066,7 +4098,7 @@ var useA4StatementView = ({
4066
4098
  var A4DataView = (props) => {
4067
4099
  const { url, v, delay, params, ...rest } = props;
4068
4100
  const { A4DataView: View } = useA4StatementView({ url, v, delay, params });
4069
- return /* @__PURE__ */ jsx27(View, { ...rest });
4101
+ return /* @__PURE__ */ jsx28(View, { ...rest });
4070
4102
  };
4071
4103
  var useA4DataView_default = useA4StatementView;
4072
4104
 
@@ -4074,7 +4106,7 @@ var useA4DataView_default = useA4StatementView;
4074
4106
  import { useEffect as useEffect11, useState as useState17 } from "react";
4075
4107
  import { AlertCircle as AlertCircle2, FileX as FileX2, Plus as Plus2, RefreshCw as RefreshCw2 } from "lucide-react";
4076
4108
  import moment from "moment";
4077
- import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
4109
+ import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
4078
4110
  var useTransaction = ({
4079
4111
  url,
4080
4112
  v = 1,
@@ -4109,7 +4141,7 @@ var useTransaction = ({
4109
4141
  hide: true
4110
4142
  }
4111
4143
  ],
4112
- data = apiData || [],
4144
+ data = [],
4113
4145
  error = apiError,
4114
4146
  pageRows,
4115
4147
  searchPlaceholder = "Search transactions...",
@@ -4126,21 +4158,21 @@ var useTransaction = ({
4126
4158
  ...rest
4127
4159
  }) => {
4128
4160
  if (!isLoading && (error || !data || data.length === 0)) {
4129
- return /* @__PURE__ */ jsx28(
4161
+ return /* @__PURE__ */ jsx29(
4130
4162
  "div",
4131
4163
  {
4132
4164
  className: `flex flex-col relative w-full items-center justify-center p-8 min-h-96 ${className}`,
4133
4165
  children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center justify-center p-12 bg-gray-50/50 dark:bg-zinc-900/30 rounded-2xl border border-dashed border-gray-300 dark:border-zinc-700 w-full max-w-xl text-center shadow-sm", children: [
4134
- error ? /* @__PURE__ */ jsx28("div", { className: "w-16 h-16 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-6", children: /* @__PURE__ */ jsx28(AlertCircle2, { className: "w-8 h-8 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ jsx28("div", { className: "w-16 h-16 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-6", children: /* @__PURE__ */ jsx28(FileX2, { className: "w-8 h-8 text-gray-500 dark:text-gray-400" }) }),
4135
- /* @__PURE__ */ jsx28("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-2", children: error ? "Failed to Load Data" : "No Records Found" }),
4136
- /* @__PURE__ */ jsx28("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-8 leading-relaxed", children: error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the data." : "There are no transactions or records available to display here." }),
4166
+ error ? /* @__PURE__ */ jsx29("div", { className: "w-16 h-16 bg-red-100 dark:bg-red-500/10 rounded-full flex items-center justify-center mb-6", children: /* @__PURE__ */ jsx29(AlertCircle2, { className: "w-8 h-8 text-red-600 dark:text-red-500" }) }) : /* @__PURE__ */ jsx29("div", { className: "w-16 h-16 bg-gray-200 dark:bg-zinc-800 rounded-full flex items-center justify-center mb-6", children: /* @__PURE__ */ jsx29(FileX2, { className: "w-8 h-8 text-gray-500 dark:text-gray-400" }) }),
4167
+ /* @__PURE__ */ jsx29("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-2", children: error ? "Failed to Load Data" : "No Records Found" }),
4168
+ /* @__PURE__ */ jsx29("p", { className: "text-sm text-gray-500 dark:text-gray-400 max-w-xs mb-8 leading-relaxed", children: error ? typeof error === "string" ? error : "An unexpected error occurred while fetching the data." : "There are no transactions or records available to display here." }),
4137
4169
  url && /* @__PURE__ */ jsxs21(
4138
4170
  "button",
4139
4171
  {
4140
4172
  onClick: () => get({ url, v, params, delay }),
4141
4173
  className: "flex items-center gap-2 px-6 py-2.5 bg-black dark:bg-white text-white dark:text-black font-semibold rounded-lg shadow-md hover:bg-gray-800 dark:hover:bg-gray-100 transition-all active:scale-95",
4142
4174
  children: [
4143
- /* @__PURE__ */ jsx28(RefreshCw2, { size: 16 }),
4175
+ /* @__PURE__ */ jsx29(RefreshCw2, { size: 16 }),
4144
4176
  "Try Again"
4145
4177
  ]
4146
4178
  }
@@ -4150,13 +4182,13 @@ var useTransaction = ({
4150
4182
  );
4151
4183
  }
4152
4184
  return /* @__PURE__ */ jsxs21(Card, { children: [
4153
- /* @__PURE__ */ jsx28(Card.Header, { children: /* @__PURE__ */ jsxs21("header", { className: "flex items-center justify-between gap-4 py-2", children: [
4185
+ /* @__PURE__ */ jsx29(Card.Header, { children: /* @__PURE__ */ jsxs21("header", { className: "flex items-center justify-between gap-4 py-2", children: [
4154
4186
  /* @__PURE__ */ jsxs21("div", { className: "space-y-1", children: [
4155
- /* @__PURE__ */ jsx28(Card.Title, { children: title }),
4156
- /* @__PURE__ */ jsx28(Card.Description, { children: description })
4187
+ /* @__PURE__ */ jsx29(Card.Title, { children: title }),
4188
+ /* @__PURE__ */ jsx29(Card.Description, { children: description })
4157
4189
  ] }),
4158
4190
  /* @__PURE__ */ jsxs21("section", { className: "flex gap-2 items-center", children: [
4159
- /* @__PURE__ */ jsx28(
4191
+ /* @__PURE__ */ jsx29(
4160
4192
  Fields_default.DateInput,
4161
4193
  {
4162
4194
  value: date,
@@ -4166,20 +4198,20 @@ var useTransaction = ({
4166
4198
  }
4167
4199
  }
4168
4200
  ),
4169
- /* @__PURE__ */ jsx28(
4201
+ /* @__PURE__ */ jsx29(
4170
4202
  Button,
4171
4203
  {
4172
4204
  size: "sm",
4173
4205
  className: "rounded-md!",
4174
4206
  onClick: onCreate,
4175
4207
  variant: "primary",
4176
- icon: /* @__PURE__ */ jsx28(Plus2, {}),
4208
+ icon: /* @__PURE__ */ jsx29(Plus2, {}),
4177
4209
  children: createTitle
4178
4210
  }
4179
4211
  )
4180
4212
  ] })
4181
4213
  ] }) }),
4182
- /* @__PURE__ */ jsx28(Card.Content, { className: "space-y-6", children: /* @__PURE__ */ jsx28("div", { className: `w-full ${className}`, children: /* @__PURE__ */ jsx28(
4214
+ /* @__PURE__ */ jsx29(Card.Content, { className: "space-y-6", children: /* @__PURE__ */ jsx29("div", { className: `w-full ${className}`, children: /* @__PURE__ */ jsx29(
4183
4215
  DataTable,
4184
4216
  {
4185
4217
  columns,