warqadui 0.0.16 → 0.0.18

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
@@ -17,17 +17,17 @@ var Button = ({
17
17
  ...props
18
18
  }) => {
19
19
  const variants = {
20
- primary: "bg-[#007AFF] text-white hover:bg-[#0071e3] active:scale-[0.98] active:opacity-90 shadow-[0_1px_2px_rgba(0,0,0,0.1)] focus:ring-[#007AFF]",
21
- secondary: "bg-[#F5F5F7] text-[#1D1D1F] hover:bg-[#E8E8ED] dark:bg-[#FFFFFF]/10 dark:text-[#F5F5F7] dark:hover:bg-[#FFFFFF]/15 active:scale-[0.98] focus:ring-gray-400",
22
- outline: "border border-gray-200 dark:border-gray-800 bg-white/50 dark:bg-black/50 backdrop-blur-md text-[#1D1D1F] dark:text-white hover:bg-gray-50 dark:hover:bg-gray-900 active:scale-[0.98] focus:ring-gray-400",
23
- ghost: "bg-transparent text-[#007AFF] hover:bg-[#007AFF]/10 active:scale-[0.98] focus:ring-[#007AFF]",
24
- danger: "bg-[#FF3B30] text-white hover:bg-[#E03126] active:scale-[0.98] active:opacity-90 shadow-[0_1px_2px_rgba(0,0,0,0.1)] focus:ring-[#FF3B30]",
25
- warning: "bg-[#FF9500] text-white hover:bg-[#E68600] active:scale-[0.98] active:opacity-90 shadow-[0_1px_2px_rgba(0,0,0,0.1)] focus:ring-[#FF9500]"
20
+ primary: "bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600 active:scale-95 active:opacity-90 shadow-sm focus:ring-blue-500",
21
+ secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-white/10 dark:text-gray-100 dark:hover:bg-white/20 active:scale-95 focus:ring-gray-400",
22
+ outline: "border border-gray-200 dark:border-gray-800 bg-white/50 dark:bg-black/50 backdrop-blur-md text-gray-900 dark:text-white hover:bg-gray-50 dark:hover:bg-gray-900 active:scale-95 focus:ring-gray-400",
23
+ ghost: "bg-transparent text-blue-600 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/30 active:scale-95 focus:ring-blue-500",
24
+ danger: "bg-red-600 text-white hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600 active:scale-95 active:opacity-90 shadow-sm focus:ring-red-500",
25
+ warning: "bg-yellow-500 text-white hover:bg-yellow-600 dark:bg-yellow-400 dark:hover:bg-yellow-500 active:scale-95 active:opacity-90 shadow-sm focus:ring-yellow-500"
26
26
  };
27
27
  const sizes = {
28
- sm: "px-3 py-1.5 text-sm rounded-[10px] gap-1.5 font-medium",
29
- md: "px-5 py-2.5 rounded-[12px] gap-2 font-medium tracking-tight",
30
- lg: "px-7 py-3.5 text-lg rounded-[16px] font-semibold tracking-tight gap-2.5"
28
+ sm: "px-3 py-1.5 text-sm rounded-lg gap-1.5 font-medium",
29
+ md: "px-5 py-2.5 rounded-xl gap-2 font-medium tracking-tight",
30
+ lg: "px-7 py-3.5 text-lg rounded-2xl font-semibold tracking-tight gap-2.5"
31
31
  };
32
32
  return /* @__PURE__ */ jsxs(
33
33
  "button",
@@ -96,7 +96,7 @@ var InfoGrid = ({
96
96
  {
97
97
  className: `grid ${colClasses[cols] || "grid-cols-3"} gap-4 p-4 bg-gray-50 rounded-lg border border-gray-100 ${className}`,
98
98
  children: items.map((item, index) => /* @__PURE__ */ jsxs2("div", { children: [
99
- /* @__PURE__ */ jsx2("span", { className: "block text-[10px] uppercase font-bold text-gray-400 mb-1 tracking-wider text-left", children: item.label }),
99
+ /* @__PURE__ */ jsx2("span", { className: "block text-xs uppercase font-bold text-gray-400 mb-1 tracking-wider text-left", children: item.label }),
100
100
  /* @__PURE__ */ jsx2(
101
101
  "span",
102
102
  {
@@ -158,7 +158,7 @@ var PageA4 = ({
158
158
  width: `${A4_WIDTH_PX * scale}px`,
159
159
  height: `${A4_HEIGHT_PX * scale}px`
160
160
  },
161
- className: "relative print:w-full! print:h-auto! print:min-h-[297mm]!",
161
+ className: "relative a4-paper-wrapper print:w-full! print:h-auto!",
162
162
  children: /* @__PURE__ */ jsxs3(
163
163
  "div",
164
164
  {
@@ -173,7 +173,7 @@ var PageA4 = ({
173
173
  },
174
174
  children: [
175
175
  /* @__PURE__ */ jsx3("div", { className: "w-full flex-1 overflow-hidden pb-4", children }),
176
- pageNumber !== void 0 && totalPages !== void 0 && /* @__PURE__ */ jsxs3("div", { className: "w-full h-[15mm] flex items-center justify-center text-xs font-medium text-gray-500 print:text-black mt-auto shrink-0 border-t border-gray-100 dark:border-zinc-800/10 dark:text-gray-400", children: [
176
+ pageNumber !== void 0 && totalPages !== void 0 && /* @__PURE__ */ jsxs3("div", { className: "w-full h-14 flex items-center justify-center text-xs font-medium text-gray-500 print:text-black mt-auto shrink-0 border-t border-gray-100 dark:border-zinc-800/10 dark:text-gray-400", children: [
177
177
  "Page ",
178
178
  pageNumber,
179
179
  " / ",
@@ -223,6 +223,10 @@ var PageA4 = ({
223
223
  overflow: hidden !important; /* Prevent micro-spillover from text rounding! */
224
224
  }
225
225
 
226
+ .a4-paper-wrapper {
227
+ min-height: 297mm !important;
228
+ }
229
+
226
230
  .print-page-break {
227
231
  page-break-after: always !important;
228
232
  break-after: page !important;
@@ -387,7 +391,7 @@ var SidebarItem = ({
387
391
  "w-full flex items-center py-2.5 rounded-xl text-sm font-medium transition-all duration-200",
388
392
  isSidebarCollapsed ? "justify-center px-2" : "justify-between px-3",
389
393
  !shouldHighlight || item.disabled ? "text-gray-600 hover:bg-gray-100 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200" : "",
390
- item.disabled && "opacity-50 cursor-not-allowed grayscale-[0.5]"
394
+ item.disabled && "opacity-50 cursor-not-allowed grayscale"
391
395
  ),
392
396
  style: shouldHighlight && !item.disabled ? {
393
397
  backgroundColor: isDarkMode ? `${primaryColor}33` : `${primaryColor}1A`,
@@ -484,7 +488,7 @@ var SubItem = ({
484
488
  className: cn(
485
489
  "relative w-full flex items-center px-3 py-2 pl-6 rounded-lg text-sm transition-colors duration-200",
486
490
  isActive && !isDisabled ? "font-medium" : "text-gray-500 hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-200",
487
- isDisabled && "opacity-50 cursor-not-allowed grayscale-[0.5]"
491
+ isDisabled && "opacity-50 cursor-not-allowed grayscale"
488
492
  ),
489
493
  style: isActive && !isDisabled ? {
490
494
  backgroundColor: isDarkMode ? `${primaryColor}4D` : `${primaryColor}1A`,
@@ -627,7 +631,7 @@ var DashboardLayout = ({
627
631
  return /* @__PURE__ */ jsxs4(
628
632
  "div",
629
633
  {
630
- className: "min-h-screen bg-gray-50 dark:bg-[#0B0F1A] text-slate-900 dark:text-slate-100 flex transition-colors duration-500 font-sans overflow-hidden",
634
+ className: "min-h-screen bg-gray-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 flex transition-colors duration-500 font-sans overflow-hidden",
631
635
  style: { fontFamily },
632
636
  children: [
633
637
  /* @__PURE__ */ jsx6(AnimatePresence, { children: !isDesktop && isSidebarOpen && /* @__PURE__ */ jsx6(
@@ -767,7 +771,7 @@ var LoadingBox = () => {
767
771
  import { Loader2 } from "lucide-react";
768
772
  import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
769
773
  var ClassicSpin = ({ msg = "Please wait..." }) => {
770
- return /* @__PURE__ */ jsx9("div", { className: "absolute inset-0 z-50 flex flex-col items-center justify-center bg-white/30 dark:bg-zinc-900/30 backdrop-blur-[0.5px] transition-all duration-200", children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center justify-center p-6 bg-white dark:bg-zinc-800 rounded-2xl shadow-2xl border border-gray-100 dark:border-zinc-700 animate-in zoom-in-95 duration-200", children: [
774
+ return /* @__PURE__ */ jsx9("div", { className: "absolute inset-0 z-50 flex flex-col items-center justify-center bg-white/30 dark:bg-zinc-900/30 backdrop-blur-sm transition-all duration-200", children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col items-center justify-center p-6 bg-white dark:bg-zinc-800 rounded-2xl shadow-2xl border border-gray-100 dark:border-zinc-700 animate-in zoom-in-95 duration-200", children: [
771
775
  /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
772
776
  /* @__PURE__ */ jsx9("div", { className: "absolute inset-0 bg-indigo-500 blur-lg opacity-20 animate-pulse" }),
773
777
  /* @__PURE__ */ jsx9(Loader2, { className: "h-8 w-8 animate-spin text-indigo-600 dark:text-indigo-400 relative z-10" })
@@ -778,7 +782,7 @@ var ClassicSpin = ({ msg = "Please wait..." }) => {
778
782
 
779
783
  // src/components/spins/OverlaySpin.tsx
780
784
  import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
781
- var OverlaySpin = ({ msg = "Processing..." }) => /* @__PURE__ */ jsx10("div", { className: "absolute inset-0 bg-white/50 dark:bg-black/50 backdrop-blur-[1px] z-50 flex items-center justify-center rounded-xl transition-all duration-300", children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center gap-2 bg-white dark:bg-zinc-800 p-4 rounded-xl shadow-xl border border-gray-100 dark:border-zinc-700", children: [
785
+ var OverlaySpin = ({ msg = "Processing..." }) => /* @__PURE__ */ jsx10("div", { className: "absolute inset-0 bg-white/50 dark:bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center rounded-xl transition-all duration-300", children: /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center gap-2 bg-white dark:bg-zinc-800 p-4 rounded-xl shadow-xl border border-gray-100 dark:border-zinc-700", children: [
782
786
  /* @__PURE__ */ jsx10("div", { className: "w-6 h-6 border-2 border-blue-600 border-t-transparent rounded-full animate-spin" }),
783
787
  /* @__PURE__ */ jsx10("span", { className: "text-xs font-medium text-gray-500 animate-pulse", children: msg })
784
788
  ] }) });
@@ -851,7 +855,7 @@ var CodeBlock = ({
851
855
  ),
852
856
  children: [
853
857
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between px-4 py-2 bg-gray-100 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-gray-800", children: [
854
- /* @__PURE__ */ jsx12("span", { className: "text-[10px] font-bold uppercase tracking-widest text-gray-400", children: language }),
858
+ /* @__PURE__ */ jsx12("span", { className: "text-xs font-bold uppercase tracking-widest text-gray-400", children: language }),
855
859
  /* @__PURE__ */ jsx12(
856
860
  "button",
857
861
  {
@@ -940,7 +944,7 @@ var Modal = ({
940
944
  isLoading = false,
941
945
  width = 500
942
946
  }) => {
943
- return /* @__PURE__ */ jsx14(AnimatePresence2, { children: isOpen && /* @__PURE__ */ jsxs9("div", { className: "fixed inset-0 z-[1000] flex items-center justify-center p-4 sm:p-6", children: [
947
+ return /* @__PURE__ */ jsx14(AnimatePresence2, { children: isOpen && /* @__PURE__ */ jsxs9("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6", children: [
944
948
  /* @__PURE__ */ jsx14(
945
949
  motion2.div,
946
950
  {
@@ -958,8 +962,8 @@ var Modal = ({
958
962
  animate: { opacity: 1, scale: 1, y: 0 },
959
963
  exit: { opacity: 0, scale: 0.95, y: 10 },
960
964
  transition: { type: "spring", duration: 0.3 },
961
- style: { maxWidth: width },
962
- className: "w-full bg-white dark:bg-zinc-900 rounded-[2rem] shadow-2xl border border-gray-200 dark:border-white/5 overflow-hidden relative z-10 flex flex-col max-h-[90vh]",
965
+ style: { maxWidth: width, maxHeight: "90vh" },
966
+ className: "w-full bg-white dark:bg-zinc-900 rounded-3xl shadow-2xl border border-gray-200 dark:border-white/5 overflow-hidden relative z-10 flex flex-col",
963
967
  children: [
964
968
  /* @__PURE__ */ jsxs9("div", { className: "px-8 py-5 border-b border-gray-100 dark:border-white/5 flex items-center justify-between bg-white/50 dark:bg-zinc-900/50 backdrop-blur-xl sticky top-0 z-20", children: [
965
969
  /* @__PURE__ */ jsx14("h3", { className: "text-xl font-bold text-gray-900 dark:text-white tracking-tight", children: title }),
@@ -1633,7 +1637,7 @@ var Textarea = forwardRef4(
1633
1637
  setIsFocused(false);
1634
1638
  onBlur?.(e);
1635
1639
  },
1636
- className: `block w-full px-2.5 py-1 rounded-xl border-gray-200 dark:border-zinc-800 bg-white dark:bg-zinc-900/50 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-zinc-500 focus:bg-white dark:focus:bg-zinc-900 outline-none transition-all duration-200 border min-h-[100px] resize-none text-sm ${className}`,
1640
+ className: `block w-full px-2.5 py-1 rounded-xl border-gray-200 dark:border-zinc-800 bg-white dark:bg-zinc-900/50 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-zinc-500 focus:bg-white dark:focus:bg-zinc-900 outline-none transition-all duration-200 border min-h-24 resize-none text-sm ${className}`,
1637
1641
  style: {
1638
1642
  borderColor: isFocused ? primaryColor : void 0,
1639
1643
  boxShadow: isFocused ? `${primaryColor}33 0px 0px 0px 2px` : void 0
@@ -2176,7 +2180,7 @@ var SearchApiContent = ({
2176
2180
  }
2177
2181
  )
2178
2182
  ] }),
2179
- /* @__PURE__ */ jsx20("div", { className: "pr-2.5 w-[60px]! flex items-center gap-1 shrink-0 min-w-[40px] 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: [
2183
+ /* @__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: [
2180
2184
  currentValue && !disabled && /* @__PURE__ */ jsx20(
2181
2185
  "button",
2182
2186
  {
@@ -2600,7 +2604,7 @@ function DataTable({
2600
2604
  /* @__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(
2601
2605
  "th",
2602
2606
  {
2603
- className: `${rowPadding} text-[13px] 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-[1%] whitespace-nowrap" : ""}`,
2607
+ 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" : ""}`,
2604
2608
  children: header.isPlaceholder ? null : flexRender(
2605
2609
  header.column.columnDef.header,
2606
2610
  header.getContext()
@@ -2641,7 +2645,7 @@ function DataTable({
2641
2645
  children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx22(
2642
2646
  "td",
2643
2647
  {
2644
- 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-[1%] whitespace-nowrap" : ""}`,
2648
+ 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" : ""}`,
2645
2649
  children: flexRender(
2646
2650
  cell.column.columnDef.cell,
2647
2651
  cell.getContext()
@@ -2673,7 +2677,7 @@ function DataTable({
2673
2677
  ) && /* @__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(
2674
2678
  "td",
2675
2679
  {
2676
- className: `${rowPadding} text-[13px] 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-[1%] whitespace-nowrap" : ""}`,
2680
+ 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" : ""}`,
2677
2681
  children: header.isPlaceholder ? null : flexRender(
2678
2682
  header.column.columnDef.footer,
2679
2683
  header.getContext()
@@ -2902,7 +2906,7 @@ function PostTable({
2902
2906
  "button",
2903
2907
  {
2904
2908
  onClick: () => handleEdit(row.index, row.original),
2905
- className: "p-1 px-2 rounded-md hover:bg-gray-100 dark:hover:bg-zinc-800 text-gray-500 hover:text-[var(--theme-primary)] dark:hover:text-[var(--theme-primary)] transition-colors",
2909
+ 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",
2906
2910
  title: "Edit",
2907
2911
  children: /* @__PURE__ */ jsx23(Edit2, { size: 16 })
2908
2912
  }
@@ -2975,7 +2979,7 @@ function PostTable({
2975
2979
  /* @__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(
2976
2980
  "th",
2977
2981
  {
2978
- className: `${rowPadding} text-[13px] 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-[1%] whitespace-nowrap" : ""}`,
2982
+ 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" : ""}`,
2979
2983
  children: header.isPlaceholder ? null : flexRender2(
2980
2984
  header.column.columnDef.header,
2981
2985
  header.getContext()
@@ -3017,7 +3021,7 @@ function PostTable({
3017
3021
  children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx23(
3018
3022
  "td",
3019
3023
  {
3020
- 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-[1%] whitespace-nowrap" : ""}`,
3024
+ 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" : ""}`,
3021
3025
  children: flexRender2(
3022
3026
  cell.column.columnDef.cell,
3023
3027
  cell.getContext()
@@ -3095,7 +3099,10 @@ function PostTable({
3095
3099
  {
3096
3100
  onClick: handleSaveField,
3097
3101
  disabled: isSavingAsync,
3098
- className: "w-full cursor-pointer h-8 flex items-center justify-center gap-1.5 rounded-lg text-white text-xs font-medium transition-all shadow-[0_1px_2px_rgba(0,0,0,0.05)] hover:shadow-md hover:-translate-y-px active:scale-[0.98] active:translate-y-0 bg-[var(--theme-primary)] hover:brightness-110 disabled:opacity-50 disabled:cursor-not-allowed",
3102
+ className: "w-full cursor-pointer h-8 flex items-center justify-center gap-1.5 rounded-lg text-white text-xs font-medium transition-all shadow-sm hover:shadow-md hover:-translate-y-px active:scale-95 active:translate-y-0 hover:brightness-110 disabled:opacity-50 disabled:cursor-not-allowed",
3103
+ style: {
3104
+ backgroundColor: "var(--theme-primary)"
3105
+ },
3099
3106
  title: "Add Row",
3100
3107
  children: [
3101
3108
  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 }),
@@ -3141,7 +3148,7 @@ function PostTable({
3141
3148
  "py-1! text-sm align-middle transition-colors duration-200",
3142
3149
  column.id !== "_index" ? "cursor-text" : "",
3143
3150
  verticalLines ? "border-x border-gray-200 dark:border-zinc-800" : "",
3144
- column.id === "_index" ? "w-[1%] whitespace-nowrap" : "",
3151
+ column.id === "_index" ? "w-px whitespace-nowrap" : "",
3145
3152
  hasError && "ring-1 ring-inset ring-red-500"
3146
3153
  ),
3147
3154
  children: /* @__PURE__ */ jsx23(
@@ -3149,7 +3156,7 @@ function PostTable({
3149
3156
  {
3150
3157
  className: cn(
3151
3158
  "flex items-center",
3152
- column.id === "_index" ? "" : "w-full min-w-[120px] h-9"
3159
+ column.id === "_index" ? "" : "w-full min-w-32 h-9"
3153
3160
  ),
3154
3161
  onKeyDown: (e) => {
3155
3162
  if (e.key === "Enter") {
@@ -3191,7 +3198,7 @@ function PostTable({
3191
3198
  ) && /* @__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(
3192
3199
  "td",
3193
3200
  {
3194
- className: `${rowPadding} text-[13px] 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-[1%] whitespace-nowrap" : ""}`,
3201
+ 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" : ""}`,
3195
3202
  children: header.isPlaceholder ? null : flexRender2(
3196
3203
  header.column.columnDef.footer,
3197
3204
  header.getContext()
@@ -3271,7 +3278,7 @@ function SimpleTable({
3271
3278
  children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx24(
3272
3279
  "th",
3273
3280
  {
3274
- className: `${rowPadding} font-semibold text-gray-900 dark:text-zinc-100 text-[13px] align-top ${verticalLines ? "border-x border-black dark:border-white" : ""} ${header.column.columnDef.className || "wrap-break-word"}`,
3281
+ 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"}`,
3275
3282
  style: {
3276
3283
  width: header.column.columnDef.width !== void 0 ? header.column.columnDef.width : header.column.columnDef.flex !== void 0 ? "auto" : "1%",
3277
3284
  minWidth: header.column.columnDef.minWidth,
@@ -3294,7 +3301,7 @@ function SimpleTable({
3294
3301
  children: columns.map((col, colIdx) => /* @__PURE__ */ jsx24(
3295
3302
  "td",
3296
3303
  {
3297
- className: `text-[13px] ${rowPadding} align-top ${verticalLines ? "border-x border-black dark:border-white" : ""}`,
3304
+ className: `text-sm ${rowPadding} align-top ${verticalLines ? "border-x border-black dark:border-white" : ""}`,
3298
3305
  children: /* @__PURE__ */ jsx24("div", { className: "h-4 bg-gray-200 dark:bg-zinc-800 rounded-sm animate-pulse w-full" })
3299
3306
  },
3300
3307
  `skeleton-col-${colIdx}`
@@ -3315,7 +3322,7 @@ function SimpleTable({
3315
3322
  children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx24(
3316
3323
  "td",
3317
3324
  {
3318
- className: `text-[13px] ${rowPadding} align-top ${verticalLines ? "border-x border-black dark:border-white" : ""} ${cell.column.columnDef.className || "wrap-break-word"}`,
3325
+ className: `text-sm ${rowPadding} align-top ${verticalLines ? "border-x border-black dark:border-white" : ""} ${cell.column.columnDef.className || "wrap-break-word"}`,
3319
3326
  children: flexRender3(cell.column.columnDef.cell, cell.getContext())
3320
3327
  },
3321
3328
  cell.id
@@ -3330,7 +3337,7 @@ function SimpleTable({
3330
3337
  children: footerGroup.headers.map((header) => /* @__PURE__ */ jsx24(
3331
3338
  "td",
3332
3339
  {
3333
- className: `text-[13px] ${rowPadding} ${verticalLines ? "border-x border-black dark:border-white" : ""} ${header.column.columnDef.className || "wrap-break-word"}`,
3340
+ className: `text-sm ${rowPadding} ${verticalLines ? "border-x border-black dark:border-white" : ""} ${header.column.columnDef.className || "wrap-break-word"}`,
3334
3341
  children: header.isPlaceholder ? null : flexRender3(
3335
3342
  header.column.columnDef.footer,
3336
3343
  header.getContext()
@@ -3368,7 +3375,7 @@ var Badge = React11.forwardRef(
3368
3375
  success: outline ? "border border-green-600 text-green-600 dark:border-green-400 dark:text-green-400 bg-transparent" : "bg-green-600 text-white dark:bg-green-500 border border-transparent"
3369
3376
  };
3370
3377
  const sizes = {
3371
- sm: "px-2 py-0.5 text-[0.65rem] leading-none uppercase tracking-wider font-semibold",
3378
+ sm: "px-2 py-0.5 text-xs leading-none uppercase tracking-wider font-semibold",
3372
3379
  md: "px-2.5 py-1 text-xs leading-tight font-semibold",
3373
3380
  lg: "px-3 py-1.5 text-sm leading-tight font-semibold"
3374
3381
  };
@@ -3396,7 +3403,7 @@ var Branding = ({
3396
3403
  "p",
3397
3404
  {
3398
3405
  className: cn(
3399
- "text-center text-[10px] font-bold uppercase tracking-widest transition-all duration-300 font-bona",
3406
+ "text-center text-xs font-bold uppercase tracking-widest transition-all duration-300 font-bona",
3400
3407
  disabled ? "opacity-40 cursor-not-allowed" : "text-slate-900 dark:text-slate-50",
3401
3408
  className
3402
3409
  ),
@@ -3446,6 +3453,7 @@ var useA4StatementView = ({
3446
3453
  subtitle = "Official Account Statement",
3447
3454
  printable = true,
3448
3455
  rowPadding = "p-3",
3456
+ verticalLines = true,
3449
3457
  headers
3450
3458
  }) => {
3451
3459
  const { store } = useWarqadConfig();
@@ -3480,7 +3488,7 @@ var useA4StatementView = ({
3480
3488
  {
3481
3489
  className: "flex items-center gap-3 px-4 py-2 rounded-md border border-black dark:border-zinc-700 print:border-black",
3482
3490
  children: [
3483
- /* @__PURE__ */ jsx27("span", { className: "text-black dark:text-white print:text-black font-bold uppercase tracking-widest text-[11px]", children: typeof col.header === "string" ? col.header : typeof col.key === "string" ? col.key : "Total" }),
3491
+ /* @__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" }),
3484
3492
  /* @__PURE__ */ jsx27("div", { className: "text-base font-bold font-sans tabular-nums text-black dark:text-white print:text-black", children: col.renderFooter(filteredDisplayData) })
3485
3493
  ]
3486
3494
  },
@@ -3579,7 +3587,7 @@ var useA4StatementView = ({
3579
3587
  );
3580
3588
  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;
3581
3589
  if (!isLoading && (error || !data || data.length === 0)) {
3582
- return /* @__PURE__ */ jsx27("div", { className: "flex flex-col relative w-full items-center justify-center p-8 min-h-[400px]", 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: [
3590
+ 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: [
3583
3591
  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" }) }),
3584
3592
  /* @__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" }),
3585
3593
  /* @__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." }),
@@ -3597,7 +3605,7 @@ var useA4StatementView = ({
3597
3605
  ] }) });
3598
3606
  }
3599
3607
  return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col relative w-full items-center", children: [
3600
- isMeasuring && filteredDisplayData.length > 0 && /* @__PURE__ */ jsx27("div", { className: "absolute top-0 opacity-0 pointer-events-none -left-[9999px]", children: /* @__PURE__ */ jsx27(
3608
+ isMeasuring && filteredDisplayData.length > 0 && /* @__PURE__ */ jsx27("div", { className: "absolute top-0 opacity-0 pointer-events-none -left-full", children: /* @__PURE__ */ jsx27(
3601
3609
  "div",
3602
3610
  {
3603
3611
  style: { width: "210mm", boxSizing: "border-box" },
@@ -3684,12 +3692,12 @@ var useA4StatementView = ({
3684
3692
  value: globalFilter,
3685
3693
  onChange: (e) => setGlobalFilter(e.target.value),
3686
3694
  placeholder: "Search...",
3687
- className: "block w-full max-w-[300px] px-3 py-2 border border-gray-300 rounded-md text-sm shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-900 dark:border-zinc-700 dark:text-white"
3695
+ className: "block w-full max-w-xs px-3 py-2 border border-gray-300 rounded-md text-sm shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-zinc-900 dark:border-zinc-700 dark:text-white"
3688
3696
  }
3689
3697
  )
3690
3698
  ] }),
3691
3699
  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" }) }),
3692
- pageIndex > 0 && /* @__PURE__ */ jsx27("div", { className: "h-[20px] print:h-0" }),
3700
+ pageIndex > 0 && /* @__PURE__ */ jsx27("div", { className: "h-5 print:h-0" }),
3693
3701
  (pageData.length > 0 || isLoading) && /* @__PURE__ */ jsx27(
3694
3702
  SimpleTable,
3695
3703
  {
@@ -3699,7 +3707,7 @@ var useA4StatementView = ({
3699
3707
  rowPadding,
3700
3708
  index,
3701
3709
  startIndex: pages.slice(0, pageIndex).reduce((acc, curr) => acc + curr.length, 0),
3702
- verticalLines: true,
3710
+ verticalLines,
3703
3711
  isLoading: isLoading || isMeasuring && pages.length === 1 && pages[0].length === 0
3704
3712
  }
3705
3713
  ),
@@ -3729,6 +3737,7 @@ var useA4DataView_default = useA4StatementView;
3729
3737
  // src/hooks/Fetches/useTransaction.tsx
3730
3738
  import { useEffect as useEffect11, useState as useState17 } from "react";
3731
3739
  import { AlertCircle as AlertCircle2, FileX as FileX2, Plus as Plus2, RefreshCw as RefreshCw2 } from "lucide-react";
3740
+ import moment from "moment";
3732
3741
  import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
3733
3742
  var useTransaction = ({
3734
3743
  url,
@@ -3736,7 +3745,9 @@ var useTransaction = ({
3736
3745
  delay,
3737
3746
  params = {}
3738
3747
  }) => {
3739
- const [date, setDate] = useState17(void 0);
3748
+ const [date, setDate] = useState17(
3749
+ moment().format("DD/MM/YYYY")
3750
+ );
3740
3751
  const dateObj = {};
3741
3752
  if (date) dateObj.date = date;
3742
3753
  const { data: apiData, isLoading, get, error: apiError } = useApis_default();
@@ -3782,7 +3793,7 @@ var useTransaction = ({
3782
3793
  return /* @__PURE__ */ jsx28(
3783
3794
  "div",
3784
3795
  {
3785
- className: `flex flex-col relative w-full items-center justify-center p-8 min-h-[400px] ${className}`,
3796
+ className: `flex flex-col relative w-full items-center justify-center p-8 min-h-96 ${className}`,
3786
3797
  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: [
3787
3798
  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" }) }),
3788
3799
  /* @__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" }),