@axzydev/axzy_ui_system 1.2.6 → 1.2.8

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.
Files changed (185) hide show
  1. package/dist/index.cjs +777 -535
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.css.map +1 -1
  5. package/dist/index.d.cts +1470 -87
  6. package/dist/index.d.ts +1470 -87
  7. package/dist/index.js +799 -555
  8. package/dist/index.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/App.tsx +19 -54
  11. package/src/components/alert/alert.doc.mdx +48 -0
  12. package/src/components/alert/alert.props.ts +7 -0
  13. package/src/components/alert/alert.tsx +8 -0
  14. package/src/components/avatar/avatar.doc.mdx +48 -0
  15. package/src/components/avatar/avatar.props.ts +8 -0
  16. package/src/components/avatar/avatar.tsx +25 -5
  17. package/src/components/badget/badget.doc.mdx +46 -0
  18. package/src/components/badget/badget.props.ts +6 -0
  19. package/src/components/badget/badget.tsx +11 -0
  20. package/src/components/breadcrumbs/breadcrumbs.doc.mdx +57 -0
  21. package/src/components/breadcrumbs/breadcrumbs.props.ts +6 -0
  22. package/src/components/breadcrumbs/breadcrumbs.tsx +12 -0
  23. package/src/components/button/button.doc.mdx +59 -0
  24. package/src/components/button/button.props.ts +12 -0
  25. package/src/components/button/button.tsx +11 -0
  26. package/src/components/calendar/calendar.doc.mdx +75 -0
  27. package/src/components/calendar/calendar.props.ts +27 -7
  28. package/src/components/calendar/calendar.tsx +13 -0
  29. package/src/components/card/card.doc.mdx +54 -0
  30. package/src/components/card/card.props.ts +11 -0
  31. package/src/components/card/card.tsx +13 -0
  32. package/src/components/checkbox/checkbox.doc.mdx +54 -0
  33. package/src/components/checkbox/checkbox.props.ts +7 -0
  34. package/src/components/checkbox/checkbox.tsx +9 -0
  35. package/src/components/confirm-dialog/confirm-dialog.doc.mdx +60 -0
  36. package/src/components/confirm-dialog/confirm-dialog.props.ts +9 -0
  37. package/src/components/confirm-dialog/confirm-dialog.tsx +19 -0
  38. package/src/components/data-table/ITDataTable.doc.mdx +59 -0
  39. package/src/components/data-table/dataTable.props.ts +15 -0
  40. package/src/components/data-table/dataTable.tsx +178 -73
  41. package/src/components/date-picker/date-picker.doc.mdx +65 -0
  42. package/src/components/date-picker/date-picker.props.ts +17 -0
  43. package/src/components/date-picker/datePicker.tsx +31 -1
  44. package/src/components/dialog/dialog.doc.mdx +54 -0
  45. package/src/components/dialog/dialog.props.ts +7 -0
  46. package/src/components/dialog/dialog.tsx +26 -0
  47. package/src/components/divider/divider.doc.mdx +42 -0
  48. package/src/components/divider/divider.props.ts +5 -0
  49. package/src/components/divider/divider.tsx +16 -0
  50. package/src/components/drawer/drawer.doc.mdx +59 -0
  51. package/src/components/drawer/drawer.props.ts +9 -0
  52. package/src/components/drawer/drawer.tsx +20 -0
  53. package/src/components/dropfile/dropfile.doc.mdx +59 -0
  54. package/src/components/dropfile/dropfile.props.ts +41 -0
  55. package/src/components/dropfile/dropfile.tsx +21 -33
  56. package/src/components/empty-state/empty-state.doc.mdx +50 -0
  57. package/src/components/empty-state/empty-state.props.ts +5 -0
  58. package/src/components/empty-state/empty-state.tsx +16 -0
  59. package/src/components/flex/flex.doc.mdx +59 -0
  60. package/src/components/flex/flex.props.ts +13 -0
  61. package/src/components/flex/flex.tsx +15 -0
  62. package/src/components/form-builder/fieldRenderer.tsx +52 -2
  63. package/src/components/form-builder/formBuilder.doc.mdx +124 -0
  64. package/src/components/form-builder/formBuilder.props.ts +12 -2
  65. package/src/components/form-builder/formBuilder.tsx +31 -0
  66. package/src/components/form-header/form-header.doc.mdx +38 -0
  67. package/src/components/form-header/form-header.props.ts +3 -0
  68. package/src/components/form-header/form-header.stories.tsx +53 -0
  69. package/src/components/form-header/form-header.tsx +11 -0
  70. package/src/components/grid/grid.doc.mdx +54 -0
  71. package/src/components/grid/grid.props.ts +13 -0
  72. package/src/components/grid/grid.tsx +26 -2
  73. package/src/components/image/image.doc.mdx +44 -0
  74. package/src/components/image/image.props.ts +5 -0
  75. package/src/components/image/image.stories.tsx +49 -0
  76. package/src/components/image/image.tsx +19 -0
  77. package/src/components/input/input.doc.mdx +70 -0
  78. package/src/components/input/input.props.ts +34 -2
  79. package/src/components/input/input.tsx +29 -0
  80. package/src/components/layout/layout.doc.mdx +51 -0
  81. package/src/components/layout/layout.props.ts +5 -0
  82. package/src/components/layout/layout.tsx +41 -17
  83. package/src/components/loader/loader.doc.mdx +43 -0
  84. package/src/components/loader/loader.props.ts +4 -0
  85. package/src/components/loader/loader.tsx +17 -0
  86. package/src/components/navbar/navbar.doc.mdx +77 -0
  87. package/src/components/navbar/navbar.props.ts +37 -1
  88. package/src/components/navbar/navbar.stories.tsx +84 -0
  89. package/src/components/navbar/navbar.tsx +78 -46
  90. package/src/components/page/page.doc.mdx +80 -0
  91. package/src/components/page/page.props.ts +25 -0
  92. package/src/components/page/page.tsx +35 -7
  93. package/src/components/page-header/page-header.doc.mdx +54 -0
  94. package/src/components/page-header/page-header.props.ts +11 -0
  95. package/src/components/page-header/page-header.stories.tsx +14 -0
  96. package/src/components/page-header/page-header.tsx +50 -15
  97. package/src/components/pagination/pagination.doc.mdx +62 -0
  98. package/src/components/pagination/pagination.props.ts +11 -32
  99. package/src/components/pagination/pagination.tsx +17 -0
  100. package/src/components/popover/popover.doc.mdx +53 -0
  101. package/src/components/popover/popover.props.ts +8 -0
  102. package/src/components/popover/popover.tsx +13 -0
  103. package/src/components/progress/progress.doc.mdx +48 -0
  104. package/src/components/progress/progress.props.ts +8 -0
  105. package/src/components/progress/progress.tsx +9 -0
  106. package/src/components/radio/radio.doc.mdx +62 -0
  107. package/src/components/radio/radio.props.ts +11 -0
  108. package/src/components/radio/radio.tsx +18 -0
  109. package/src/components/search-select/search-select.doc.mdx +72 -0
  110. package/src/components/search-select/search-select.props.ts +23 -18
  111. package/src/components/search-select/search-select.tsx +27 -2
  112. package/src/components/searchTable/searchTable.doc.mdx +79 -0
  113. package/src/components/searchTable/searchTable.props.ts +42 -3
  114. package/src/components/searchTable/searchTable.stories.tsx +74 -0
  115. package/src/components/searchTable/searchTable.tsx +23 -0
  116. package/src/components/segmented-control/segmented-control.doc.mdx +60 -0
  117. package/src/components/segmented-control/segmented-control.props.ts +12 -0
  118. package/src/components/segmented-control/segmented-control.tsx +15 -0
  119. package/src/components/select/select.doc.mdx +75 -0
  120. package/src/components/select/select.props.ts +22 -0
  121. package/src/components/select/select.tsx +2 -5
  122. package/src/components/sidebar/sidebar.doc.mdx +86 -0
  123. package/src/components/sidebar/sidebar.props.ts +22 -0
  124. package/src/components/sidebar/sidebar.tsx +22 -0
  125. package/src/components/skeleton/skeleton.doc.mdx +43 -0
  126. package/src/components/skeleton/skeleton.props.ts +8 -0
  127. package/src/components/skeleton/skeleton.tsx +10 -0
  128. package/src/components/slide/slide.doc.mdx +46 -0
  129. package/src/components/slide/slide.props.ts +11 -24
  130. package/src/components/slide/slide.tsx +10 -1
  131. package/src/components/slider/slider.doc.mdx +49 -0
  132. package/src/components/slider/slider.props.ts +9 -0
  133. package/src/components/slider/slider.tsx +15 -0
  134. package/src/components/stack/stack.doc.mdx +126 -0
  135. package/src/components/stack/stack.props.ts +18 -0
  136. package/src/components/stack/stack.stories.tsx +221 -16
  137. package/src/components/stack/stack.tsx +21 -0
  138. package/src/components/stat-card/stat-card.doc.mdx +48 -0
  139. package/src/components/stat-card/stat-card.props.ts +9 -0
  140. package/src/components/stat-card/stat-card.tsx +10 -0
  141. package/src/components/stepper/stepper.doc.mdx +54 -0
  142. package/src/components/stepper/stepper.props.ts +11 -1
  143. package/src/components/stepper/stepper.tsx +15 -0
  144. package/src/components/table/table.doc.mdx +58 -0
  145. package/src/components/table/table.props.ts +17 -0
  146. package/src/components/table/table.tsx +199 -84
  147. package/src/components/tabs/tabs.doc.mdx +52 -0
  148. package/src/components/tabs/tabs.props.ts +11 -0
  149. package/src/components/tabs/tabs.tsx +14 -0
  150. package/src/components/text/text.doc.mdx +41 -0
  151. package/src/components/text/text.props.ts +5 -0
  152. package/src/components/text/text.stories.tsx +67 -0
  153. package/src/components/text/text.tsx +10 -0
  154. package/src/components/textarea/textarea.doc.mdx +64 -0
  155. package/src/components/textarea/textarea.props.ts +11 -0
  156. package/src/components/textarea/textarea.tsx +16 -0
  157. package/src/components/theme-provider/themeProvider.doc.mdx +75 -0
  158. package/src/components/theme-provider/themeProvider.props.ts +3 -0
  159. package/src/components/theme-provider/themeProvider.stories.tsx +59 -0
  160. package/src/components/theme-provider/themeProvider.tsx +14 -0
  161. package/src/components/time-picker/timePicker.doc.mdx +68 -0
  162. package/src/components/time-picker/timePicker.props.ts +14 -0
  163. package/src/components/time-picker/timePicker.tsx +22 -1
  164. package/src/components/toast/toast.doc.mdx +50 -0
  165. package/src/components/toast/toast.props.ts +5 -0
  166. package/src/components/toast/toast.tsx +21 -0
  167. package/src/components/tooltip/tooltip.doc.mdx +47 -0
  168. package/src/components/tooltip/tooltip.props.ts +6 -0
  169. package/src/components/tooltip/tooltip.tsx +19 -0
  170. package/src/components/topbar/topbar.doc.mdx +69 -0
  171. package/src/components/topbar/topbar.props.ts +15 -0
  172. package/src/components/topbar/topbar.tsx +38 -0
  173. package/src/components/triple-filter/tripleFilter.doc.mdx +62 -0
  174. package/src/components/triple-filter/tripleFilter.props.ts +7 -0
  175. package/src/components/triple-filter/tripleFilter.tsx +32 -0
  176. package/src/index.css +17 -0
  177. package/src/showcases/DataShowcases.tsx +529 -45
  178. package/src/showcases/FormShowcases.tsx +399 -29
  179. package/src/showcases/HomeShowcase.tsx +252 -272
  180. package/src/showcases/LayoutPrimitivesShowcases.tsx +1224 -248
  181. package/src/showcases/PageShowcases.tsx +868 -151
  182. package/src/showcases/ShowcaseLayout.tsx +237 -73
  183. package/src/showcases/StructureShowcases.tsx +1039 -97
  184. package/src/types/table.types.ts +1 -1
  185. package/src/utils/styles.ts +2 -1
package/dist/index.js CHANGED
@@ -344,21 +344,31 @@ var sizeMap = {
344
344
  lg: { container: "w-12 h-12", text: "text-base" },
345
345
  xl: { container: "w-16 h-16", text: "text-xl" }
346
346
  };
347
+ var DEFAULT_COLOR = "bg-primary-600";
348
+ var DEFAULT_BG = "var(--color-primary-600)";
349
+ var DEFAULT_SHADOW = "0 4px 14px 0 rgba(37, 99, 235, 0.35)";
347
350
  function ITAvatar({
348
351
  src,
349
352
  alt = "",
350
353
  initials,
351
354
  size = "md",
352
- color = "bg-primary-500",
355
+ color = DEFAULT_COLOR,
353
356
  className,
354
357
  badge,
355
358
  onClick
356
359
  }) {
357
360
  const { container, text } = sizeMap[size];
361
+ const useInlineStyle = !color || color === DEFAULT_COLOR;
358
362
  return /* @__PURE__ */ jsxs2(
359
363
  "div",
360
364
  {
361
- className: clsx2("relative inline-flex items-center justify-center rounded-full flex-shrink-0", container, className),
365
+ className: clsx2(
366
+ "relative inline-flex items-center justify-center rounded-full flex-shrink-0 overflow-hidden text-white font-bold tracking-wide",
367
+ container,
368
+ !useInlineStyle && color,
369
+ className
370
+ ),
371
+ style: useInlineStyle ? { backgroundColor: DEFAULT_BG, boxShadow: DEFAULT_SHADOW } : void 0,
362
372
  onClick,
363
373
  role: onClick ? "button" : void 0,
364
374
  tabIndex: onClick ? 0 : void 0,
@@ -373,7 +383,7 @@ function ITAvatar({
373
383
  e.currentTarget.style.display = "none";
374
384
  }
375
385
  }
376
- ) : /* @__PURE__ */ jsx3("div", { className: clsx2("w-full h-full rounded-full flex items-center justify-center text-white font-semibold", text, color), children: /* @__PURE__ */ jsx3(ITText, { as: "span", children: initials || alt.charAt(0).toUpperCase() || "?" }) }),
386
+ ) : /* @__PURE__ */ jsx3("span", { className: clsx2("flex items-center justify-center w-full h-full", text), children: /* @__PURE__ */ jsx3(ITText, { as: "span", className: "text-white", children: initials || alt.charAt(0).toUpperCase() || "?" }) }),
377
387
  badge && /* @__PURE__ */ jsx3("div", { className: "absolute -bottom-0.5 -right-0.5", children: badge })
378
388
  ]
379
389
  }
@@ -1734,7 +1744,7 @@ function ITConfirmDialog({
1734
1744
  // src/types/table.types.ts
1735
1745
  var variantStyles = {
1736
1746
  default: "",
1737
- striped: "divide-y divide-gray-200",
1747
+ striped: "",
1738
1748
  bordered: "border border-gray-200"
1739
1749
  };
1740
1750
  var sizeStyles = {
@@ -1745,8 +1755,8 @@ var sizeStyles = {
1745
1755
 
1746
1756
  // src/components/data-table/dataTable.tsx
1747
1757
  import clsx15 from "clsx";
1748
- import { useState as useState9, useEffect as useEffect5, useCallback as useCallback5, useRef as useRef4 } from "react";
1749
- import { FaCheck as FaCheck2, FaSpinner as FaSpinner2, FaTimes as FaTimes3 } from "react-icons/fa";
1758
+ import { useState as useState10, useEffect as useEffect5, useCallback as useCallback5, useRef as useRef4 } from "react";
1759
+ import { FaCheck as FaCheck2, FaSpinner as FaSpinner2, FaTimes as FaTimes3, FaTable as FaTable2, FaThLarge as FaThLarge2 } from "react-icons/fa";
1750
1760
  import { MdOutlineSwapVert as MdOutlineSwapVert2 } from "react-icons/md";
1751
1761
 
1752
1762
  // src/components/input/input.tsx
@@ -1777,6 +1787,7 @@ function getGridColsClass(columns) {
1777
1787
  return gridColsClasses[columns] || "grid-cols-12";
1778
1788
  }
1779
1789
  function getColSpanClass(span, maxCols) {
1790
+ if (span == null) return `col-span-${maxCols}`;
1780
1791
  if (typeof span === "number") {
1781
1792
  return `col-span-${Math.min(span, maxCols)}`;
1782
1793
  }
@@ -2327,8 +2338,8 @@ function ITSelect({
2327
2338
  borderStyle: "solid",
2328
2339
  transition: "all 0.2s",
2329
2340
  color: "var(--input-text-color, var(--color-secondary-900))",
2330
- appearance: "none"
2331
- // Important for custom styling
2341
+ appearance: "none",
2342
+ colorScheme: "light dark"
2332
2343
  };
2333
2344
  if (disabled) {
2334
2345
  style.backgroundColor = inputTheme.disabled?.backgroundColor || style.backgroundColor;
@@ -2584,11 +2595,13 @@ function ITPagination({
2584
2595
 
2585
2596
  // src/components/table/table.tsx
2586
2597
  import clsx14 from "clsx";
2587
- import React3 from "react";
2598
+ import React3, { useState as useState9 } from "react";
2588
2599
  import {
2589
2600
  FaCheck,
2590
2601
  FaSpinner,
2591
- FaTimes as FaTimes2
2602
+ FaTimes as FaTimes2,
2603
+ FaTable,
2604
+ FaThLarge
2592
2605
  } from "react-icons/fa";
2593
2606
  import { MdOutlineSwapVert } from "react-icons/md";
2594
2607
  import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
@@ -2610,8 +2623,13 @@ function ITTable({
2610
2623
  size = "md",
2611
2624
  itemsPerPageOptions = [5, 10, 20],
2612
2625
  defaultItemsPerPage = 10,
2613
- title
2626
+ title,
2627
+ renderCard,
2628
+ defaultView = "table",
2629
+ showVerticalBorder = true,
2630
+ verticalBorderClassname
2614
2631
  }) {
2632
+ const [viewMode, setViewMode] = useState9(defaultView);
2615
2633
  const {
2616
2634
  currentPage,
2617
2635
  itemsPerPage,
@@ -2811,25 +2829,91 @@ function ITTable({
2811
2829
  return value;
2812
2830
  }
2813
2831
  };
2832
+ const renderDefaultCard = (row) => {
2833
+ const dataCols = columns.filter((c) => c.type !== "actions");
2834
+ const actionCol = columns.find((c) => c.type === "actions");
2835
+ return /* @__PURE__ */ jsxs12("div", { className: "bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 p-3 space-y-2 shadow-sm", children: [
2836
+ dataCols.map((col) => /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between gap-2", children: [
2837
+ /* @__PURE__ */ jsx14("span", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 whitespace-nowrap flex-shrink-0 min-w-[70px]", children: col.label }),
2838
+ /* @__PURE__ */ jsx14("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
2839
+ ] }, col.key)),
2840
+ actionCol?.actions && /* @__PURE__ */ jsx14("div", { className: "flex items-center justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-700", children: actionCol.actions(row) })
2841
+ ] });
2842
+ };
2814
2843
  return /* @__PURE__ */ jsx14("div", { className: clsx14("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ jsxs12("div", { className: "rounded-xl shadow-sm overflow-hidden", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
2815
- title && /* @__PURE__ */ jsx14("div", { className: "px-6 py-5 border-b border-secondary-100", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx14(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }) }),
2816
- /* @__PURE__ */ jsx14("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs12(
2844
+ title && /* @__PURE__ */ jsxs12("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
2845
+ /* @__PURE__ */ jsx14(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
2846
+ /* @__PURE__ */ jsxs12("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
2847
+ /* @__PURE__ */ jsxs12(
2848
+ "button",
2849
+ {
2850
+ onClick: () => setViewMode("table"),
2851
+ className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${viewMode === "table" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
2852
+ children: [
2853
+ /* @__PURE__ */ jsx14(FaTable, { size: 11 }),
2854
+ "Table"
2855
+ ]
2856
+ }
2857
+ ),
2858
+ /* @__PURE__ */ jsxs12(
2859
+ "button",
2860
+ {
2861
+ onClick: () => setViewMode("cards"),
2862
+ className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${viewMode === "cards" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
2863
+ children: [
2864
+ /* @__PURE__ */ jsx14(FaThLarge, { size: 11 }),
2865
+ "Cards"
2866
+ ]
2867
+ }
2868
+ )
2869
+ ] })
2870
+ ] }),
2871
+ !title && /* @__PURE__ */ jsx14("div", { className: "flex justify-end px-4 pt-3", children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
2872
+ /* @__PURE__ */ jsxs12(
2873
+ "button",
2874
+ {
2875
+ onClick: () => setViewMode("table"),
2876
+ className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${viewMode === "table" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
2877
+ children: [
2878
+ /* @__PURE__ */ jsx14(FaTable, { size: 11 }),
2879
+ "Table"
2880
+ ]
2881
+ }
2882
+ ),
2883
+ /* @__PURE__ */ jsxs12(
2884
+ "button",
2885
+ {
2886
+ onClick: () => setViewMode("cards"),
2887
+ className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${viewMode === "cards" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
2888
+ children: [
2889
+ /* @__PURE__ */ jsx14(FaThLarge, { size: 11 }),
2890
+ "Cards"
2891
+ ]
2892
+ }
2893
+ )
2894
+ ] }) }),
2895
+ viewMode === "cards" ? /* @__PURE__ */ jsx14("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: currentData.length > 0 ? currentData.map((row, i) => /* @__PURE__ */ jsx14("div", { children: renderCard ? renderCard(row) : renderDefaultCard(row) }, i)) : /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center py-12 text-secondary-400", children: [
2896
+ /* @__PURE__ */ jsx14(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
2897
+ /* @__PURE__ */ jsx14(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
2898
+ ] }) }) : /* @__PURE__ */ jsx14("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs12(
2817
2899
  "table",
2818
2900
  {
2819
2901
  className: clsx14(
2820
2902
  "min-w-max w-full text-sm text-left text-secondary-600",
2903
+ showVerticalBorder && "[&_th]:border-r [&_th:last-child]:border-r-0 [&_td]:border-r [&_td:last-child]:border-r-0",
2904
+ showVerticalBorder && (verticalBorderClassname || "[&_th]:border-slate-100 dark:[&_th]:border-slate-700/30 [&_td]:border-slate-100 dark:[&_td]:border-slate-700/30"),
2821
2905
  variantStyles[variant],
2822
2906
  sizeStyles[size]
2823
2907
  ),
2824
2908
  children: [
2825
- /* @__PURE__ */ jsx14("thead", { children: /* @__PURE__ */ jsx14("tr", { className: "bg-secondary-50 border-b border-secondary-200 text-xs uppercase tracking-wider font-semibold text-secondary-500", children: columns.map((col) => /* @__PURE__ */ jsx14(
2909
+ /* @__PURE__ */ jsx14("thead", { children: /* @__PURE__ */ jsx14("tr", { className: "bg-secondary-50 text-xs uppercase tracking-wider font-semibold text-slate-700 dark:text-slate-200", children: columns.map((col) => /* @__PURE__ */ jsx14(
2826
2910
  "th",
2827
2911
  {
2828
2912
  scope: "col",
2829
2913
  className: clsx14("px-4 py-4 align-top", col.className),
2830
2914
  children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-3 min-w-[150px]", children: [
2831
2915
  /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between gap-2", children: [
2832
- /* @__PURE__ */ jsx14(ITText, { as: "span", className: "text-secondary-700 font-bold", children: col.label }),
2916
+ /* @__PURE__ */ jsx14(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
2833
2917
  col.sortable && col.type !== "actions" && /* @__PURE__ */ jsx14(
2834
2918
  "button",
2835
2919
  {
@@ -2845,10 +2929,10 @@ function ITTable({
2845
2929
  },
2846
2930
  col.key
2847
2931
  )) }) }),
2848
- /* @__PURE__ */ jsx14("tbody", { className: "divide-y divide-secondary-100", children: currentData.length > 0 ? currentData.map((row, rowIndex) => /* @__PURE__ */ jsx14(
2932
+ /* @__PURE__ */ jsx14("tbody", { className: "divide-y divide-slate-100 dark:divide-slate-700/30", children: currentData.length > 0 ? currentData.map((row, rowIndex) => /* @__PURE__ */ jsx14(
2849
2933
  "tr",
2850
2934
  {
2851
- className: "hover:bg-secondary-50/50 transition-colors duration-150 group",
2935
+ className: clsx14("hover:bg-secondary-50/50 transition-colors duration-150 group", variant === "striped" && "odd:bg-secondary-50/40 dark:odd:bg-slate-800/20"),
2852
2936
  children: columns.map((col) => /* @__PURE__ */ jsx14(
2853
2937
  "td",
2854
2938
  {
@@ -2866,7 +2950,7 @@ function ITTable({
2866
2950
  ]
2867
2951
  }
2868
2952
  ) }),
2869
- /* @__PURE__ */ jsx14("div", { className: "rounded-b-xl border-t border-secondary-200 px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx14(
2953
+ /* @__PURE__ */ jsx14("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx14(
2870
2954
  ITPagination,
2871
2955
  {
2872
2956
  currentPage,
@@ -2902,11 +2986,16 @@ function ITDataTable({
2902
2986
  size = "md",
2903
2987
  itemsPerPageOptions = [5, 10, 20],
2904
2988
  defaultItemsPerPage = 10,
2905
- title
2989
+ title,
2990
+ renderCard,
2991
+ defaultView,
2992
+ showVerticalBorder = true,
2993
+ verticalBorderClassname
2906
2994
  }) {
2907
- const [data, setData] = useState9([]);
2908
- const [totalItems, setTotalItems] = useState9(0);
2909
- const [isLoading, setIsLoading] = useState9(fetchOnMount);
2995
+ const [viewMode, setViewMode] = useState10(defaultView || "table");
2996
+ const [data, setData] = useState10([]);
2997
+ const [totalItems, setTotalItems] = useState10(0);
2998
+ const [isLoading, setIsLoading] = useState10(fetchOnMount);
2910
2999
  const {
2911
3000
  currentPage,
2912
3001
  itemsPerPage,
@@ -3047,31 +3136,70 @@ function ITDataTable({
3047
3136
  return value;
3048
3137
  }
3049
3138
  };
3139
+ const renderDefaultCard = (row) => {
3140
+ const dataCols = columns.filter((c) => c.type !== "actions");
3141
+ const actionCol = columns.find((c) => c.type === "actions");
3142
+ return /* @__PURE__ */ jsxs13("div", { className: "bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 p-3 space-y-2 shadow-sm", children: [
3143
+ dataCols.map((col) => /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between gap-2", children: [
3144
+ /* @__PURE__ */ jsx15("span", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 whitespace-nowrap flex-shrink-0 min-w-[70px]", children: col.label }),
3145
+ /* @__PURE__ */ jsx15("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
3146
+ ] }, col.key)),
3147
+ actionCol?.actions && /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-700", children: actionCol.actions(row) })
3148
+ ] });
3149
+ };
3150
+ const segCtrlClass = (mode) => `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${viewMode === mode ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`;
3050
3151
  return /* @__PURE__ */ jsxs13("div", { className: clsx15("space-y-4 w-full relative", containerClassName), children: [
3051
3152
  /* @__PURE__ */ jsxs13("div", { className: "rounded-xl shadow-sm overflow-hidden", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
3052
- title && /* @__PURE__ */ jsxs13("div", { className: "px-6 py-5 border-b border-secondary-100 flex justify-between items-center", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
3153
+ title && /* @__PURE__ */ jsxs13("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
3053
3154
  /* @__PURE__ */ jsx15(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
3054
- isLoading && /* @__PURE__ */ jsx15("div", { className: "text-secondary-400", children: loadingIndicator || /* @__PURE__ */ jsx15(FaSpinner2, { className: "animate-spin text-primary-500 text-xl" }) })
3155
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-3", children: [
3156
+ isLoading && /* @__PURE__ */ jsx15("div", { className: "text-secondary-400", children: loadingIndicator || /* @__PURE__ */ jsx15(FaSpinner2, { className: "animate-spin text-primary-500 text-xl" }) }),
3157
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
3158
+ /* @__PURE__ */ jsxs13("button", { onClick: () => setViewMode("table"), className: segCtrlClass("table"), children: [
3159
+ /* @__PURE__ */ jsx15(FaTable2, { size: 11 }),
3160
+ "Table"
3161
+ ] }),
3162
+ /* @__PURE__ */ jsxs13("button", { onClick: () => setViewMode("cards"), className: segCtrlClass("cards"), children: [
3163
+ /* @__PURE__ */ jsx15(FaThLarge2, { size: 11 }),
3164
+ "Cards"
3165
+ ] })
3166
+ ] })
3167
+ ] })
3055
3168
  ] }),
3169
+ !title && /* @__PURE__ */ jsx15("div", { className: "flex justify-end px-4 pt-3", children: /* @__PURE__ */ jsxs13("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
3170
+ /* @__PURE__ */ jsxs13("button", { onClick: () => setViewMode("table"), className: segCtrlClass("table"), children: [
3171
+ /* @__PURE__ */ jsx15(FaTable2, { size: 11 }),
3172
+ "Table"
3173
+ ] }),
3174
+ /* @__PURE__ */ jsxs13("button", { onClick: () => setViewMode("cards"), className: segCtrlClass("cards"), children: [
3175
+ /* @__PURE__ */ jsx15(FaThLarge2, { size: 11 }),
3176
+ "Cards"
3177
+ ] })
3178
+ ] }) }),
3056
3179
  /* @__PURE__ */ jsxs13("div", { className: "overflow-x-auto relative min-h-[200px]", children: [
3057
3180
  isLoading && /* @__PURE__ */ jsx15("div", { className: "absolute inset-0 z-20 flex items-center justify-center bg-white/40 backdrop-blur-[2px] transition-all duration-300", children: /* @__PURE__ */ jsx15("div", { className: "flex flex-col items-center gap-3 p-6 rounded-2xl shadow-xl border border-secondary-100 animate-in fade-in zoom-in duration-300", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: loadingIndicator || /* @__PURE__ */ jsxs13(Fragment3, { children: [
3058
3181
  /* @__PURE__ */ jsx15(FaSpinner2, { className: "animate-spin text-primary-500 text-4xl" }),
3059
3182
  /* @__PURE__ */ jsx15(ITText, { as: "span", className: "text-sm font-semibold text-secondary-600 animate-pulse", children: "Cargando datos..." })
3060
3183
  ] }) }) }),
3061
- /* @__PURE__ */ jsxs13(
3184
+ viewMode === "cards" ? /* @__PURE__ */ jsx15("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: data.length > 0 ? data.map((row, i) => /* @__PURE__ */ jsx15("div", { children: renderCard ? renderCard(row) : renderDefaultCard(row) }, i)) : !isLoading && /* @__PURE__ */ jsxs13("div", { className: "flex flex-col items-center justify-center py-12 text-secondary-400", children: [
3185
+ /* @__PURE__ */ jsx15(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
3186
+ /* @__PURE__ */ jsx15(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
3187
+ ] }) }) : /* @__PURE__ */ jsxs13(
3062
3188
  "table",
3063
3189
  {
3064
3190
  className: clsx15(
3065
3191
  "min-w-max w-full text-sm text-left text-secondary-600 transition-opacity duration-300",
3192
+ showVerticalBorder && "[&_th]:border-r [&_th:last-child]:border-r-0 [&_td]:border-r [&_td:last-child]:border-r-0",
3193
+ showVerticalBorder && (verticalBorderClassname || "[&_th]:border-slate-100 dark:[&_th]:border-slate-700/30 [&_td]:border-slate-100 dark:[&_td]:border-slate-700/30"),
3066
3194
  isLoading ? "opacity-50" : "opacity-100",
3067
3195
  variantStyles[variant],
3068
3196
  sizeStyles[size],
3069
3197
  className
3070
3198
  ),
3071
3199
  children: [
3072
- /* @__PURE__ */ jsx15("thead", { children: /* @__PURE__ */ jsx15("tr", { className: "bg-white border-b border-secondary-200 text-xs uppercase tracking-wider font-semibold text-secondary-500", children: columns.map((col) => /* @__PURE__ */ jsx15("th", { scope: "col", className: clsx15("px-4 py-4 align-top", col.className), children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-3 min-w-[150px]", children: [
3200
+ /* @__PURE__ */ jsx15("thead", { children: /* @__PURE__ */ jsx15("tr", { className: "bg-secondary-50 text-xs uppercase tracking-wider font-semibold text-slate-700 dark:text-slate-200", children: columns.map((col) => /* @__PURE__ */ jsx15("th", { scope: "col", className: clsx15("px-4 py-4 align-top", col.className), children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-3 min-w-[150px]", children: [
3073
3201
  /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between gap-2", children: [
3074
- /* @__PURE__ */ jsx15(ITText, { as: "span", className: "text-secondary-700 font-bold", children: col.label }),
3202
+ /* @__PURE__ */ jsx15(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
3075
3203
  col.sortable && col.type !== "actions" && /* @__PURE__ */ jsx15(
3076
3204
  "button",
3077
3205
  {
@@ -3085,7 +3213,7 @@ function ITDataTable({
3085
3213
  ] }),
3086
3214
  /* @__PURE__ */ jsx15("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
3087
3215
  ] }) }, col.key)) }) }),
3088
- /* @__PURE__ */ jsx15("tbody", { className: "divide-y divide-secondary-100", children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ jsx15("tr", { className: "hover:bg-secondary-50/50 transition-colors duration-150 group", children: columns.map((col) => /* @__PURE__ */ jsx15("td", { className: clsx15("px-4 py-3 align-middle", col.className), children: col.type === "actions" ? /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-center gap-2", children: renderCellContent(col, row) }) : /* @__PURE__ */ jsx15("div", { className: "text-secondary-700 font-medium", children: renderCellContent(col, row) }) }, `${rowIndex}-${col.key}`)) }, rowIndex)) : /* @__PURE__ */ jsx15("tr", { children: /* @__PURE__ */ jsx15("td", { colSpan: columns.length, className: "px-6 py-20 text-center", children: !isLoading && /* @__PURE__ */ jsxs13("div", { className: "flex flex-col items-center justify-center text-secondary-400", children: [
3216
+ /* @__PURE__ */ jsx15("tbody", { className: "divide-y divide-slate-100 dark:divide-slate-700/30", children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ jsx15("tr", { className: clsx15("hover:bg-secondary-50/50 transition-colors duration-150 group", variant === "striped" && "odd:bg-secondary-50/40 dark:odd:bg-slate-800/20"), children: columns.map((col) => /* @__PURE__ */ jsx15("td", { className: clsx15("px-4 py-3 align-middle", col.className), children: col.type === "actions" ? /* @__PURE__ */ jsx15("div", { className: "flex items-center justify-center gap-2", children: renderCellContent(col, row) }) : /* @__PURE__ */ jsx15("div", { className: "text-secondary-700 font-medium", children: renderCellContent(col, row) }) }, `${rowIndex}-${col.key}`)) }, rowIndex)) : /* @__PURE__ */ jsx15("tr", { children: /* @__PURE__ */ jsx15("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: !isLoading && /* @__PURE__ */ jsxs13("div", { className: "flex flex-col items-center justify-center text-secondary-400", children: [
3089
3217
  /* @__PURE__ */ jsx15(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
3090
3218
  /* @__PURE__ */ jsx15(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
3091
3219
  ] }) }) }) })
@@ -3094,7 +3222,7 @@ function ITDataTable({
3094
3222
  )
3095
3223
  ] })
3096
3224
  ] }),
3097
- /* @__PURE__ */ jsx15("div", { className: "rounded-b-xl border-t border-secondary-200 px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx15(
3225
+ /* @__PURE__ */ jsx15("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx15(
3098
3226
  ITPagination,
3099
3227
  {
3100
3228
  currentPage,
@@ -3112,7 +3240,7 @@ function ITDataTable({
3112
3240
 
3113
3241
  // src/components/date-picker/datePicker.tsx
3114
3242
  import clsx16 from "clsx";
3115
- import React5, { useEffect as useEffect6, useRef as useRef5, useState as useState10 } from "react";
3243
+ import React5, { useEffect as useEffect6, useRef as useRef5, useState as useState11 } from "react";
3116
3244
  import { FaCalendarAlt } from "react-icons/fa";
3117
3245
  import { isBefore as isBefore2 } from "date-fns";
3118
3246
  import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
@@ -3135,12 +3263,12 @@ function ITDatePicker({
3135
3263
  maxDate,
3136
3264
  range = false
3137
3265
  }) {
3138
- const [isOpen, setIsOpen] = useState10(false);
3139
- const [inputValue, setInputValue] = useState10("");
3140
- const [isValidDate, setIsValidDate] = useState10(true);
3141
- const [internalRange, setInternalRange] = useState10([null, null]);
3266
+ const [isOpen, setIsOpen] = useState11(false);
3267
+ const [inputValue, setInputValue] = useState11("");
3268
+ const [isValidDate, setIsValidDate] = useState11(true);
3269
+ const [internalRange, setInternalRange] = useState11([null, null]);
3142
3270
  const wrapperRef = useRef5(null);
3143
- const [calendarPosition, setCalendarPosition] = useState10({ top: 0, left: 0 });
3271
+ const [calendarPosition, setCalendarPosition] = useState11({ top: 0, left: 0 });
3144
3272
  const dateRange = React5.useMemo(() => {
3145
3273
  if (range) {
3146
3274
  if (Array.isArray(value)) return value;
@@ -3320,7 +3448,7 @@ function ITDatePicker({
3320
3448
  FaCalendarAlt,
3321
3449
  {
3322
3450
  onClick: handleIconClick,
3323
- className: "text-slate-900 cursor-pointer"
3451
+ className: "text-slate-500 dark:text-slate-400 cursor-pointer"
3324
3452
  }
3325
3453
  ) }),
3326
3454
  variant,
@@ -3379,11 +3507,11 @@ import { FaRegTimesCircle } from "react-icons/fa";
3379
3507
  import { FaTimes as FaTimes4 } from "react-icons/fa";
3380
3508
 
3381
3509
  // src/components/theme-provider/themeProvider.tsx
3382
- import { createContext, useContext, useState as useState12, useEffect as useEffect7 } from "react";
3510
+ import { createContext, useContext, useState as useState13, useEffect as useEffect7 } from "react";
3383
3511
  import { MdPalette, MdClose, MdRefresh } from "react-icons/md";
3384
3512
 
3385
3513
  // src/components/tabs/tabs.tsx
3386
- import { useState as useState11 } from "react";
3514
+ import { useState as useState12 } from "react";
3387
3515
  import { clsx as clsx17 } from "clsx";
3388
3516
  import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
3389
3517
  var ITTabs = ({
@@ -3394,7 +3522,7 @@ var ITTabs = ({
3394
3522
  className = "",
3395
3523
  containerClassName = ""
3396
3524
  }) => {
3397
- const [activeId, setActiveId] = useState11(defaultActiveId || items[0]?.id);
3525
+ const [activeId, setActiveId] = useState12(defaultActiveId || items[0]?.id);
3398
3526
  const handleTabClick = (id, disabled) => {
3399
3527
  if (disabled) return;
3400
3528
  setActiveId(id);
@@ -3736,7 +3864,7 @@ function ITThemeProvider({
3736
3864
  theme: theme2,
3737
3865
  showFab = true
3738
3866
  }) {
3739
- const [palette2, setPaletteState] = useState12(() => {
3867
+ const [palette2, setPaletteState] = useState13(() => {
3740
3868
  const basePalette = {
3741
3869
  ...DEFAULT_PALETTE,
3742
3870
  ...theme2,
@@ -3762,8 +3890,8 @@ function ITThemeProvider({
3762
3890
  }
3763
3891
  return basePalette;
3764
3892
  });
3765
- const [isOpen, setIsOpen] = useState12(false);
3766
- const [customPresets, setCustomPresets] = useState12(() => {
3893
+ const [isOpen, setIsOpen] = useState13(false);
3894
+ const [customPresets, setCustomPresets] = useState13(() => {
3767
3895
  try {
3768
3896
  const saved = localStorage.getItem("it-theme-custom-presets");
3769
3897
  return saved ? JSON.parse(saved) : [];
@@ -3772,8 +3900,8 @@ function ITThemeProvider({
3772
3900
  return [];
3773
3901
  }
3774
3902
  });
3775
- const [newPresetName, setNewPresetName] = useState12("");
3776
- const [isSavingPreset, setIsSavingPreset] = useState12(false);
3903
+ const [newPresetName, setNewPresetName] = useState13("");
3904
+ const [isSavingPreset, setIsSavingPreset] = useState13(false);
3777
3905
  const handleSavePreset = () => {
3778
3906
  if (!newPresetName.trim()) return;
3779
3907
  const newPreset = {
@@ -3792,8 +3920,8 @@ function ITThemeProvider({
3792
3920
  setCustomPresets(updated);
3793
3921
  localStorage.setItem("it-theme-custom-presets", JSON.stringify(updated));
3794
3922
  };
3795
- const [resolvedTheme, setResolvedTheme] = useState12("light");
3796
- const [darkModeMode, setDarkModeMode] = useState12(
3923
+ const [resolvedTheme, setResolvedTheme] = useState13("light");
3924
+ const [darkModeMode, setDarkModeMode] = useState13(
3797
3925
  () => {
3798
3926
  const saved = localStorage.getItem("it-theme-dark-mode");
3799
3927
  if (saved === "light" || saved === "dark" || saved === "system") {
@@ -5568,17 +5696,17 @@ function ITFlex({
5568
5696
  }
5569
5697
 
5570
5698
  // src/components/form-builder/formBuilder.tsx
5571
- import { useEffect as useEffect12, useState as useState15, useMemo as useMemo5 } from "react";
5699
+ import { useEffect as useEffect13, useState as useState18, useMemo as useMemo6 } from "react";
5572
5700
 
5573
5701
  // src/components/form-builder/formBuilder.context.tsx
5574
- import React8, { createContext as createContext2, useContext as useContext2, useState as useState13 } from "react";
5702
+ import React8, { createContext as createContext2, useContext as useContext2, useState as useState14 } from "react";
5575
5703
  import { jsx as jsx26 } from "react/jsx-runtime";
5576
5704
  var ITFormBuilderContext = createContext2(void 0);
5577
5705
  var ITFormBuilderProvider = ({
5578
5706
  children,
5579
5707
  value
5580
5708
  }) => {
5581
- const [fieldRegistry, setFieldRegistry] = useState13({});
5709
+ const [fieldRegistry, setFieldRegistry] = useState14({});
5582
5710
  const registerField = React8.useCallback((name, config2) => {
5583
5711
  setFieldRegistry((prev) => ({ ...prev, [name]: config2 }));
5584
5712
  }, []);
@@ -5612,12 +5740,12 @@ var useITFormBuilderContext = () => {
5612
5740
  };
5613
5741
 
5614
5742
  // src/components/form-builder/fieldRenderer.tsx
5615
- import { memo, useCallback as useCallback6, useEffect as useEffect11 } from "react";
5616
- import clsx24 from "clsx";
5743
+ import { memo, useCallback as useCallback6, useEffect as useEffect12, useState as useState17 } from "react";
5744
+ import clsx25 from "clsx";
5617
5745
 
5618
5746
  // src/components/time-picker/timePicker.tsx
5619
5747
  import clsx23 from "clsx";
5620
- import { useEffect as useEffect10, useRef as useRef8, useState as useState14 } from "react";
5748
+ import { useEffect as useEffect10, useRef as useRef8, useState as useState15 } from "react";
5621
5749
  import { FaClock } from "react-icons/fa";
5622
5750
  import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
5623
5751
  function ITTimePicker({
@@ -5636,10 +5764,10 @@ function ITTimePicker({
5636
5764
  variant = "primary",
5637
5765
  color = "primary"
5638
5766
  }) {
5639
- const [isOpen, setIsOpen] = useState14(false);
5640
- const [inputValue, setInputValue] = useState14(value || "");
5641
- const [isValidTime, setIsValidTime] = useState14(true);
5642
- const [dropdownPosition, setDropdownPosition] = useState14({ top: 0, left: 0 });
5767
+ const [isOpen, setIsOpen] = useState15(false);
5768
+ const [inputValue, setInputValue] = useState15(value || "");
5769
+ const [isValidTime, setIsValidTime] = useState15(true);
5770
+ const [dropdownPosition, setDropdownPosition] = useState15({ top: 0, left: 0 });
5643
5771
  const wrapperRef = useRef8(null);
5644
5772
  const dropdownRef = useRef8(null);
5645
5773
  const hoursRef = useRef8(null);
@@ -5775,7 +5903,7 @@ function ITTimePicker({
5775
5903
  },
5776
5904
  className: clsx23(
5777
5905
  "cursor-pointer transition-colors",
5778
- disabled ? "text-slate-400 cursor-not-allowed" : "text-slate-900 hover:text-slate-600"
5906
+ disabled ? "text-slate-400 cursor-not-allowed" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"
5779
5907
  )
5780
5908
  }
5781
5909
  )
@@ -5882,27 +6010,204 @@ function ITTimePicker({
5882
6010
  ] });
5883
6011
  }
5884
6012
 
6013
+ // src/components/search-select/search-select.tsx
6014
+ import { useState as useState16, useEffect as useEffect11, useRef as useRef9, useMemo as useMemo4 } from "react";
6015
+ import clsx24 from "clsx";
6016
+ import { FaSearch } from "react-icons/fa";
6017
+ import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
6018
+ function ITSearchSelect({
6019
+ name,
6020
+ options = [],
6021
+ label,
6022
+ placeholder = "Selecciona una opci\xF3n",
6023
+ valueField = "value",
6024
+ labelField = "label",
6025
+ value,
6026
+ onChange,
6027
+ onBlur,
6028
+ disabled = false,
6029
+ className,
6030
+ touched,
6031
+ required,
6032
+ error,
6033
+ readOnly = false,
6034
+ onSearch,
6035
+ isLoading = false,
6036
+ noResultsMessage = "No se encontraron resultados"
6037
+ }) {
6038
+ const [isOpen, setIsOpen] = useState16(false);
6039
+ const [searchTerm, setSearchTerm] = useState16("");
6040
+ const [isFocused, setIsFocused] = useState16(false);
6041
+ const [localTouched, setLocalTouched] = useState16(false);
6042
+ const containerRef = useRef9(null);
6043
+ const timeoutRef = useRef9(null);
6044
+ const selectedOption = useMemo4(() => {
6045
+ return options.find((opt) => opt[valueField] === value);
6046
+ }, [options, value, valueField]);
6047
+ useEffect11(() => {
6048
+ if (!isFocused) {
6049
+ setSearchTerm(selectedOption ? String(selectedOption[labelField]) : "");
6050
+ }
6051
+ }, [selectedOption, isFocused, labelField]);
6052
+ useEffect11(() => {
6053
+ function handleClickOutside(event) {
6054
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
6055
+ setIsOpen(false);
6056
+ }
6057
+ }
6058
+ document.addEventListener("mousedown", handleClickOutside);
6059
+ return () => document.removeEventListener("mousedown", handleClickOutside);
6060
+ }, []);
6061
+ const filteredOptions = useMemo4(() => {
6062
+ if (onSearch) return options;
6063
+ if (!searchTerm || !isFocused) return options;
6064
+ return options.filter(
6065
+ (opt) => String(opt[labelField]).toLowerCase().includes(searchTerm.toLowerCase())
6066
+ );
6067
+ }, [options, searchTerm, onSearch, labelField, isFocused]);
6068
+ const handleInputChange = (e) => {
6069
+ const query = e.target.value;
6070
+ setSearchTerm(query);
6071
+ setIsOpen(true);
6072
+ if (onSearch) {
6073
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
6074
+ timeoutRef.current = setTimeout(() => {
6075
+ onSearch(query);
6076
+ }, 500);
6077
+ }
6078
+ };
6079
+ const handleSelect = (option) => {
6080
+ if (onChange) {
6081
+ onChange(option[valueField], option);
6082
+ }
6083
+ setSearchTerm(String(option[labelField]));
6084
+ setIsOpen(false);
6085
+ };
6086
+ const handleFocus = () => {
6087
+ if (disabled || readOnly) return;
6088
+ setIsFocused(true);
6089
+ setIsOpen(true);
6090
+ };
6091
+ const handleInputBlur = (e) => {
6092
+ setTimeout(() => {
6093
+ setIsFocused(false);
6094
+ setLocalTouched(true);
6095
+ onBlur?.(e);
6096
+ }, 200);
6097
+ };
6098
+ const inputTheme = theme.input || {};
6099
+ const isTouched = touched !== void 0 ? touched : localTouched;
6100
+ const isEmpty = value === void 0 || value === null || String(value).trim() === "";
6101
+ const effectiveError = error !== void 0 && error !== false ? error === true ? "Este campo es requerido" : error : required && isEmpty ? "Este campo es requerido" : void 0;
6102
+ const hasError = isTouched && !!effectiveError;
6103
+ const errorMessage = typeof effectiveError === "string" ? effectiveError : "Este campo es requerido";
6104
+ const getInputStyle = () => {
6105
+ const style = {
6106
+ backgroundColor: inputTheme.backgroundColor || "#ffffff",
6107
+ borderColor: inputTheme.borderColor || "#e2e8f0",
6108
+ borderRadius: inputTheme.borderRadius || "0.5rem",
6109
+ padding: inputTheme.padding || "0.5rem 0.75rem",
6110
+ fontSize: inputTheme.fontSize || "0.875rem",
6111
+ borderWidth: "1px",
6112
+ borderStyle: "solid",
6113
+ transition: "all 0.2s",
6114
+ color: "var(--input-text-color, var(--color-secondary-900))",
6115
+ width: "100%"
6116
+ };
6117
+ if (disabled) {
6118
+ style.backgroundColor = inputTheme.disabled?.backgroundColor || "#f1f5f9";
6119
+ style.borderColor = inputTheme.disabled?.borderColor || "#e2e8f0";
6120
+ style.opacity = 0.7;
6121
+ style.cursor = "not-allowed";
6122
+ }
6123
+ if (hasError) {
6124
+ style.borderColor = inputTheme.error?.borderColor || "red";
6125
+ if (isFocused) {
6126
+ style.boxShadow = inputTheme.error?.ring;
6127
+ }
6128
+ } else if (isFocused && !readOnly) {
6129
+ style.boxShadow = inputTheme.focus?.ring;
6130
+ style.borderColor = inputTheme.focus?.borderColor;
6131
+ }
6132
+ return style;
6133
+ };
6134
+ return /* @__PURE__ */ jsxs23("div", { className: clsx24("w-full flex flex-col gap-1.5", className, isOpen && "relative z-30"), ref: containerRef, children: [
6135
+ label && /* @__PURE__ */ jsxs23(
6136
+ ITText,
6137
+ {
6138
+ as: "label",
6139
+ className: clsx24("text-sm font-medium text-gray-700 dark:text-slate-300", {
6140
+ "text-red-500": hasError
6141
+ }),
6142
+ children: [
6143
+ /* @__PURE__ */ jsx28(ITText, { as: "span", children: label }),
6144
+ required && /* @__PURE__ */ jsx28(ITText, { as: "span", className: "text-red-500 ml-1", children: "*" })
6145
+ ]
6146
+ }
6147
+ ),
6148
+ /* @__PURE__ */ jsxs23("div", { className: "relative", children: [
6149
+ /* @__PURE__ */ jsxs23("div", { className: "relative flex items-center", children: [
6150
+ /* @__PURE__ */ jsx28(
6151
+ "input",
6152
+ {
6153
+ type: "text",
6154
+ name,
6155
+ value: searchTerm,
6156
+ onChange: handleInputChange,
6157
+ onFocus: handleFocus,
6158
+ onBlur: handleInputBlur,
6159
+ disabled,
6160
+ readOnly,
6161
+ placeholder,
6162
+ className: "outline-none pr-10",
6163
+ style: getInputStyle(),
6164
+ autoComplete: "off"
6165
+ }
6166
+ ),
6167
+ /* @__PURE__ */ jsxs23("div", { className: "absolute right-3 flex items-center gap-2 text-gray-400 pointer-events-none", children: [
6168
+ isLoading && /* @__PURE__ */ jsx28("div", { className: "animate-spin h-4 w-4 border-2 border-primary-500 border-t-transparent rounded-full" }),
6169
+ !isLoading && /* @__PURE__ */ jsx28(FaSearch, { size: 14, className: clsx24({ "text-primary-500": isFocused }) })
6170
+ ] })
6171
+ ] }),
6172
+ isOpen && /* @__PURE__ */ jsx28("div", { className: "absolute z-50 w-full mt-1 bg-white dark:bg-slate-900 border border-gray-200 dark:border-slate-800 rounded-lg shadow-xl overflow-hidden animate-in fade-in zoom-in duration-200 origin-top", children: /* @__PURE__ */ jsx28("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx28(
6173
+ ITText,
6174
+ {
6175
+ as: "div",
6176
+ onClick: () => handleSelect(option),
6177
+ className: clsx24(
6178
+ "px-4 py-2 text-sm cursor-pointer transition-colors",
6179
+ value === option[valueField] ? "bg-primary-50 dark:bg-primary-950/40 text-primary-700 dark:text-primary-300 font-medium" : "hover:bg-gray-50 dark:hover:bg-slate-800 text-gray-700 dark:text-slate-300"
6180
+ ),
6181
+ children: /* @__PURE__ */ jsx28(ITText, { as: "span", children: option[labelField] })
6182
+ },
6183
+ option[valueField]
6184
+ )) : /* @__PURE__ */ jsx28(ITText, { as: "div", className: "px-4 py-6 text-sm text-center text-gray-500 italic", children: isLoading ? "Cargando..." : noResultsMessage }) }) })
6185
+ ] }),
6186
+ hasError && /* @__PURE__ */ jsx28(ITText, { as: "p", className: "text-red-500 text-xs mt-1", children: errorMessage })
6187
+ ] });
6188
+ }
6189
+
5885
6190
  // src/components/form-builder/useFormBuilder.ts
5886
- import { useMemo as useMemo4 } from "react";
6191
+ import { useMemo as useMemo5 } from "react";
5887
6192
  var useFieldRules = (config2, dependentValues) => {
5888
6193
  const { getFieldConfig } = useITFormBuilderContext();
5889
6194
  const fieldConfig = getFieldConfig(config2.name) || config2;
5890
- const isVisible = useMemo4(() => {
6195
+ const isVisible = useMemo5(() => {
5891
6196
  if (!fieldConfig.renderWhen) return true;
5892
6197
  return fieldConfig.renderWhen(dependentValues);
5893
6198
  }, [fieldConfig.renderWhen, dependentValues]);
5894
- const dynamicProps = useMemo4(() => {
6199
+ const dynamicProps = useMemo5(() => {
5895
6200
  if (!fieldConfig.dynamicProps) return {};
5896
6201
  return fieldConfig.dynamicProps(dependentValues);
5897
6202
  }, [fieldConfig.dynamicProps, dependentValues]);
5898
- const isRequired = useMemo4(() => {
6203
+ const isRequired = useMemo5(() => {
5899
6204
  if (typeof dynamicProps.required !== "undefined") return dynamicProps.required;
5900
6205
  if (typeof fieldConfig.required === "function") {
5901
6206
  return fieldConfig.required(dependentValues);
5902
6207
  }
5903
6208
  return fieldConfig.required || false;
5904
6209
  }, [fieldConfig.required, dynamicProps.required, dependentValues]);
5905
- const isDisabled = useMemo4(() => {
6210
+ const isDisabled = useMemo5(() => {
5906
6211
  if (typeof dynamicProps.disabled !== "undefined") return dynamicProps.disabled;
5907
6212
  if (typeof fieldConfig.disabled === "function") {
5908
6213
  return fieldConfig.disabled(dependentValues);
@@ -5913,7 +6218,24 @@ var useFieldRules = (config2, dependentValues) => {
5913
6218
  };
5914
6219
 
5915
6220
  // src/components/form-builder/fieldRenderer.tsx
5916
- import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
6221
+ import { FaSpinner as FaSpinner3 } from "react-icons/fa";
6222
+ import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
6223
+ function useAsyncOptions(options, depends) {
6224
+ const [resolved, setResolved] = useState17([]);
6225
+ const [loading, setLoading] = useState17(false);
6226
+ useEffect12(() => {
6227
+ if (typeof options === "function") {
6228
+ setLoading(true);
6229
+ options().then((result) => {
6230
+ setResolved(result.map((o) => ({ value: String(o.value), label: o.label })));
6231
+ setLoading(false);
6232
+ });
6233
+ } else if (Array.isArray(options)) {
6234
+ setResolved(options.map((o) => ({ value: String(o.value), label: o.label })));
6235
+ }
6236
+ }, depends);
6237
+ return { options: resolved, loading };
6238
+ }
5917
6239
  var ITFieldRenderer = ({
5918
6240
  config: config2,
5919
6241
  columns = 12,
@@ -5927,7 +6249,7 @@ var ITFieldRenderer = ({
5927
6249
  config2,
5928
6250
  dependentValues
5929
6251
  );
5930
- useEffect11(() => {
6252
+ useEffect12(() => {
5931
6253
  context.registerField(config2.name, config2);
5932
6254
  return () => {
5933
6255
  context.unregisterField(config2.name);
@@ -5953,6 +6275,7 @@ var ITFieldRenderer = ({
5953
6275
  leftIcon,
5954
6276
  rightIcon
5955
6277
  } = activeConfig;
6278
+ const { options: resolvedOptions, loading: optionsLoading } = useAsyncOptions(options, [options, dependentValues]);
5956
6279
  const handleChangeWrapper = useCallback6(
5957
6280
  async (val) => {
5958
6281
  const finalValue = val?.target ? val.target.value : val;
@@ -5969,7 +6292,7 @@ var ITFieldRenderer = ({
5969
6292
  case "password":
5970
6293
  case "number":
5971
6294
  case "email":
5972
- return /* @__PURE__ */ jsx28(
6295
+ return /* @__PURE__ */ jsx29(
5973
6296
  ITInput,
5974
6297
  {
5975
6298
  type: type === "email" ? "text" : type,
@@ -5994,10 +6317,36 @@ var ITFieldRenderer = ({
5994
6317
  }
5995
6318
  );
5996
6319
  case "select":
5997
- return /* @__PURE__ */ jsx28(
6320
+ if (optionsLoading) {
6321
+ return /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 py-3", children: [
6322
+ /* @__PURE__ */ jsx29(FaSpinner3, { className: "animate-spin text-primary-500" }),
6323
+ /* @__PURE__ */ jsx29(ITText, { as: "span", className: "text-sm text-slate-500", children: "Cargando opciones..." })
6324
+ ] });
6325
+ }
6326
+ if (typeof options === "function") {
6327
+ return /* @__PURE__ */ jsx29(
6328
+ ITSearchSelect,
6329
+ {
6330
+ options: resolvedOptions,
6331
+ name,
6332
+ disabled: isDisabled,
6333
+ label: label || "",
6334
+ placeholder,
6335
+ value: value !== void 0 ? value : activeConfig.defaultValue || "",
6336
+ valueField: valueField || "value",
6337
+ labelField: labelField || "label",
6338
+ onChange: (val) => handleChangeWrapper(val),
6339
+ onBlur: context.handleBlur,
6340
+ touched,
6341
+ error,
6342
+ required: isRequired
6343
+ }
6344
+ );
6345
+ }
6346
+ return /* @__PURE__ */ jsx29(
5998
6347
  ITSelect,
5999
6348
  {
6000
- options: Array.isArray(options) ? options : [],
6349
+ options: resolvedOptions,
6001
6350
  name,
6002
6351
  disabled: isDisabled,
6003
6352
  label: label || "",
@@ -6013,7 +6362,7 @@ var ITFieldRenderer = ({
6013
6362
  }
6014
6363
  );
6015
6364
  case "date":
6016
- return /* @__PURE__ */ jsx28(
6365
+ return /* @__PURE__ */ jsx29(
6017
6366
  ITDatePicker,
6018
6367
  {
6019
6368
  name,
@@ -6029,7 +6378,7 @@ var ITFieldRenderer = ({
6029
6378
  }
6030
6379
  );
6031
6380
  case "time":
6032
- return /* @__PURE__ */ jsx28(
6381
+ return /* @__PURE__ */ jsx29(
6033
6382
  ITTimePicker,
6034
6383
  {
6035
6384
  name,
@@ -6047,7 +6396,7 @@ var ITFieldRenderer = ({
6047
6396
  case "custom":
6048
6397
  if (activeConfig.component) {
6049
6398
  const CustomComponent = activeConfig.component;
6050
- return /* @__PURE__ */ jsx28(
6399
+ return /* @__PURE__ */ jsx29(
6051
6400
  CustomComponent,
6052
6401
  {
6053
6402
  ...activeConfig,
@@ -6062,9 +6411,9 @@ var ITFieldRenderer = ({
6062
6411
  }
6063
6412
  return null;
6064
6413
  case "section":
6065
- return /* @__PURE__ */ jsxs23("div", { className: clsx24("w-full col-span-full", activeConfig.className), children: [
6066
- label && /* @__PURE__ */ jsx28(ITText, { as: "h4", className: "text-lg font-semibold text-gray-800 mb-4", children: label }),
6067
- /* @__PURE__ */ jsx28("div", { className: clsx24("grid gap-y-6 gap-x-5", getGridColsClass(columns)), children: activeConfig.fields?.map((childConfig) => /* @__PURE__ */ jsx28(
6414
+ return /* @__PURE__ */ jsxs24("div", { className: clsx25("w-full col-span-full", activeConfig.className), children: [
6415
+ label && /* @__PURE__ */ jsx29(ITText, { as: "h4", className: "text-lg font-semibold text-gray-800 mb-4", children: label }),
6416
+ /* @__PURE__ */ jsx29("div", { className: clsx25("grid gap-y-6 gap-x-5", getGridColsClass(columns)), children: activeConfig.fields?.map((childConfig) => /* @__PURE__ */ jsx29(
6068
6417
  ITFieldRenderer,
6069
6418
  {
6070
6419
  config: childConfig,
@@ -6074,7 +6423,7 @@ var ITFieldRenderer = ({
6074
6423
  )) })
6075
6424
  ] });
6076
6425
  case "array":
6077
- return /* @__PURE__ */ jsx28("div", { className: "p-4 border-2 border-dashed border-gray-200 rounded-xl", children: /* @__PURE__ */ jsxs23(ITText, { as: "p", className: "text-sm text-gray-500 text-center", children: [
6426
+ return /* @__PURE__ */ jsx29("div", { className: "p-4 border-2 border-dashed border-gray-200 rounded-xl", children: /* @__PURE__ */ jsxs24(ITText, { as: "p", className: "text-sm text-gray-500 text-center", children: [
6078
6427
  "Array Field: ",
6079
6428
  label
6080
6429
  ] }) });
@@ -6082,12 +6431,12 @@ var ITFieldRenderer = ({
6082
6431
  return null;
6083
6432
  }
6084
6433
  };
6085
- return /* @__PURE__ */ jsx28("div", { className: clsx24(getColSpanClass(activeConfig.column, columns), activeConfig.className), children: renderField() });
6434
+ return /* @__PURE__ */ jsx29("div", { className: clsx25(getColSpanClass(activeConfig.column, columns), activeConfig.className), children: renderField() });
6086
6435
  };
6087
6436
  var fieldRenderer_default = memo(ITFieldRenderer);
6088
6437
 
6089
6438
  // src/components/form-builder/formBuilder.tsx
6090
- import { jsx as jsx29 } from "react/jsx-runtime";
6439
+ import { jsx as jsx30 } from "react/jsx-runtime";
6091
6440
  function buildDependentValues(dependsOn, values) {
6092
6441
  if (!dependsOn || dependsOn.length === 0) return {};
6093
6442
  const deps = {};
@@ -6111,11 +6460,11 @@ function ITFormBuilder({
6111
6460
  },
6112
6461
  isSubmitting = false
6113
6462
  }) {
6114
- const [mounted, setMounted] = useState15(false);
6115
- useEffect12(() => {
6463
+ const [mounted, setMounted] = useState18(false);
6464
+ useEffect13(() => {
6116
6465
  setMounted(true);
6117
6466
  }, []);
6118
- const providerValue = useMemo5(() => ({
6467
+ const providerValue = useMemo6(() => ({
6119
6468
  config: config2 || [],
6120
6469
  values: values || {},
6121
6470
  errors: errors || {},
@@ -6131,7 +6480,7 @@ function ITFormBuilder({
6131
6480
  submitCount: 0
6132
6481
  }), [config2, values, errors, touched, handleChange, handleBlur, setFieldValue, setFieldTouched, setFieldError, isSubmitting]);
6133
6482
  if (config2) {
6134
- return /* @__PURE__ */ jsx29(ITFormBuilderProvider, { value: providerValue, children: /* @__PURE__ */ jsx29("div", { className: formGrid(columns), children: config2.map((fieldConfig) => /* @__PURE__ */ jsx29(
6483
+ return /* @__PURE__ */ jsx30(ITFormBuilderProvider, { value: providerValue, children: /* @__PURE__ */ jsx30("div", { className: formGrid(columns), children: config2.map((fieldConfig) => /* @__PURE__ */ jsx30(
6135
6484
  fieldRenderer_default,
6136
6485
  {
6137
6486
  config: fieldConfig,
@@ -6144,7 +6493,7 @@ function ITFormBuilder({
6144
6493
  fieldConfig.name
6145
6494
  )) }) });
6146
6495
  }
6147
- return /* @__PURE__ */ jsx29("div", { className: formGrid(columns), children: fields?.map(({
6496
+ return /* @__PURE__ */ jsx30("div", { className: formGrid(columns), children: fields?.map(({
6148
6497
  name,
6149
6498
  label,
6150
6499
  type = "text",
@@ -6159,12 +6508,12 @@ function ITFormBuilder({
6159
6508
  formatNumber = true,
6160
6509
  onChangeAction,
6161
6510
  ...props
6162
- }) => /* @__PURE__ */ jsx29("div", { className: getColSpanClass(column, columns), children: (() => {
6511
+ }) => /* @__PURE__ */ jsx30("div", { className: getColSpanClass(column, columns), children: (() => {
6163
6512
  switch (type) {
6164
6513
  case "text":
6165
6514
  case "number":
6166
6515
  case "password":
6167
- return /* @__PURE__ */ jsx29(
6516
+ return /* @__PURE__ */ jsx30(
6168
6517
  ITInput,
6169
6518
  {
6170
6519
  type,
@@ -6194,7 +6543,7 @@ function ITFormBuilder({
6194
6543
  }
6195
6544
  );
6196
6545
  case "select":
6197
- return /* @__PURE__ */ jsx29(
6546
+ return /* @__PURE__ */ jsx30(
6198
6547
  ITSelect,
6199
6548
  {
6200
6549
  options: options || [],
@@ -6218,7 +6567,7 @@ function ITFormBuilder({
6218
6567
  }
6219
6568
  );
6220
6569
  case "date":
6221
- return /* @__PURE__ */ jsx29(
6570
+ return /* @__PURE__ */ jsx30(
6222
6571
  ITDatePicker,
6223
6572
  {
6224
6573
  name,
@@ -6245,8 +6594,8 @@ function ITFormBuilder({
6245
6594
  }
6246
6595
 
6247
6596
  // src/components/grid/grid.tsx
6248
- import clsx25 from "clsx";
6249
- import { jsx as jsx30 } from "react/jsx-runtime";
6597
+ import clsx26 from "clsx";
6598
+ import { jsx as jsx31 } from "react/jsx-runtime";
6250
6599
  function colSpanClass(span, cols) {
6251
6600
  if (span === void 0) return void 0;
6252
6601
  const clamped = Math.min(Math.max(Math.round(span), 1), cols);
@@ -6257,6 +6606,10 @@ function breakpointSpan(span, bp, cols) {
6257
6606
  const clamped = Math.min(Math.max(Math.round(span), 1), cols);
6258
6607
  return `${bp}:col-span-${clamped}`;
6259
6608
  }
6609
+ function gridColsClass(cols) {
6610
+ const clamped = Math.min(Math.max(cols, 1), 12);
6611
+ return `grid-cols-${clamped}`;
6612
+ }
6260
6613
  function ITGrid({
6261
6614
  children,
6262
6615
  container,
@@ -6273,12 +6626,11 @@ function ITGrid({
6273
6626
  as: Component = "div"
6274
6627
  }) {
6275
6628
  if (container) {
6276
- return /* @__PURE__ */ jsx30(
6629
+ return /* @__PURE__ */ jsx31(
6277
6630
  Component,
6278
6631
  {
6279
- className: clsx25("grid", className),
6632
+ className: clsx26("grid", gridColsClass(columns), className),
6280
6633
  style: {
6281
- gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
6282
6634
  gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
6283
6635
  ...style
6284
6636
  },
@@ -6287,10 +6639,11 @@ function ITGrid({
6287
6639
  );
6288
6640
  }
6289
6641
  if (item) {
6290
- return /* @__PURE__ */ jsx30(
6642
+ return /* @__PURE__ */ jsx31(
6291
6643
  Component,
6292
6644
  {
6293
- className: clsx25(
6645
+ className: clsx26(
6646
+ "col-span-full",
6294
6647
  colSpanClass(xs ?? sm, columns),
6295
6648
  sm !== void 0 && breakpointSpan(sm, "sm", columns),
6296
6649
  md !== void 0 && breakpointSpan(md, "md", columns),
@@ -6303,34 +6656,34 @@ function ITGrid({
6303
6656
  }
6304
6657
  );
6305
6658
  }
6306
- return /* @__PURE__ */ jsx30(Component, { className, style, children });
6659
+ return /* @__PURE__ */ jsx31(Component, { className, style, children });
6307
6660
  }
6308
6661
 
6309
6662
  // src/components/image/image.tsx
6310
- import { useState as useState16 } from "react";
6311
- import { jsx as jsx31 } from "react/jsx-runtime";
6663
+ import { useState as useState19 } from "react";
6664
+ import { jsx as jsx32 } from "react/jsx-runtime";
6312
6665
  var ITImage = ({
6313
6666
  src,
6314
6667
  alt,
6315
6668
  className = "",
6316
6669
  fallback = ""
6317
6670
  }) => {
6318
- const [imageError, setImageError] = useState16(false);
6671
+ const [imageError, setImageError] = useState19(false);
6319
6672
  const handleImageError = () => {
6320
6673
  setImageError(true);
6321
6674
  };
6322
- return /* @__PURE__ */ jsx31(
6675
+ return /* @__PURE__ */ jsx32(
6323
6676
  "div",
6324
6677
  {
6325
6678
  className: `${className} flex items-center justify-center bg-transparent`,
6326
- children: imageError ? /* @__PURE__ */ jsx31(
6679
+ children: imageError ? /* @__PURE__ */ jsx32(
6327
6680
  "img",
6328
6681
  {
6329
6682
  src: fallback,
6330
6683
  alt: "Fallback",
6331
6684
  className: "w-full h-full object-cover"
6332
6685
  }
6333
- ) : /* @__PURE__ */ jsx31(
6686
+ ) : /* @__PURE__ */ jsx32(
6334
6687
  "img",
6335
6688
  {
6336
6689
  src,
@@ -6345,9 +6698,9 @@ var ITImage = ({
6345
6698
  var image_default = ITImage;
6346
6699
 
6347
6700
  // src/components/navbar/navbar.tsx
6348
- import { useRef as useRef9, useState as useState17 } from "react";
6701
+ import { useRef as useRef10, useState as useState20 } from "react";
6349
6702
  import { FaChevronDown, FaChevronRight as FaChevronRight4, FaUserCircle } from "react-icons/fa";
6350
- import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
6703
+ import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
6351
6704
  function ITNavbar({
6352
6705
  logo,
6353
6706
  logoText,
@@ -6360,9 +6713,9 @@ function ITNavbar({
6360
6713
  showSidebarOnMobile = false,
6361
6714
  sidebarItems
6362
6715
  }) {
6363
- const [isUserMenuOpen, setIsUserMenuOpen] = useState17(false);
6364
- const [expandedItems, setExpandedItems] = useState17(/* @__PURE__ */ new Set());
6365
- const userMenuRef = useRef9(null);
6716
+ const [isUserMenuOpen, setIsUserMenuOpen] = useState20(false);
6717
+ const [expandedItems, setExpandedItems] = useState20(/* @__PURE__ */ new Set());
6718
+ const userMenuRef = useRef10(null);
6366
6719
  useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
6367
6720
  const toggleUserMenu = () => {
6368
6721
  setIsUserMenuOpen(!isUserMenuOpen);
@@ -6385,42 +6738,42 @@ function ITNavbar({
6385
6738
  };
6386
6739
  const shouldUseLegacy = !navigationItems.length && (navItems || sidebarItems);
6387
6740
  if (shouldUseLegacy) {
6388
- return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col h-screen", children: [
6389
- /* @__PURE__ */ jsx32("nav", { className: "bg-white border-b border-gray-200", children: /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between mx-auto p-4", children: [
6390
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
6391
- logo && /* @__PURE__ */ jsx32("div", { className: "h-8", children: logo }),
6392
- logoText && /* @__PURE__ */ jsx32(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-gray-900", children: logoText })
6741
+ return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col h-screen", children: [
6742
+ /* @__PURE__ */ jsx33("nav", { className: "bg-white border-b border-gray-200", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between mx-auto p-4", children: [
6743
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
6744
+ logo && /* @__PURE__ */ jsx33("div", { className: "h-8", children: logo }),
6745
+ logoText && /* @__PURE__ */ jsx33(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-gray-900", children: logoText })
6393
6746
  ] }),
6394
- /* @__PURE__ */ jsx32("div", { className: "flex items-center justify-end w-full md:w-auto md:order-2", children: /* @__PURE__ */ jsxs24("div", { className: "flex items-center space-x-4 md:order-2", children: [
6395
- /* @__PURE__ */ jsx32("ul", { className: "hidden md:flex space-x-4", children: navItems }),
6396
- userMenu && /* @__PURE__ */ jsxs24("div", { className: "relative", children: [
6397
- /* @__PURE__ */ jsx32(
6747
+ /* @__PURE__ */ jsx33("div", { className: "flex items-center justify-end w-full md:w-auto md:order-2", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center space-x-4 md:order-2", children: [
6748
+ /* @__PURE__ */ jsx33("ul", { className: "hidden md:flex space-x-4", children: navItems }),
6749
+ userMenu && /* @__PURE__ */ jsxs25("div", { className: "relative", children: [
6750
+ /* @__PURE__ */ jsx33(
6398
6751
  "button",
6399
6752
  {
6400
6753
  type: "button",
6401
6754
  className: "flex text-sm bg-gray-200 rounded-full md:me-0 focus:ring-4 focus:ring-gray-300",
6402
6755
  onClick: toggleUserMenu,
6403
- children: userMenu.userImage ? /* @__PURE__ */ jsx32(
6756
+ children: userMenu.userImage ? /* @__PURE__ */ jsx33(
6404
6757
  "img",
6405
6758
  {
6406
6759
  className: "w-8 h-8 rounded-full",
6407
6760
  src: userMenu.userImage,
6408
6761
  alt: "user photo"
6409
6762
  }
6410
- ) : /* @__PURE__ */ jsx32(FaUserCircle, { className: "w-8 h-8 text-gray-500" })
6763
+ ) : /* @__PURE__ */ jsx33(FaUserCircle, { className: "w-8 h-8 text-gray-500" })
6411
6764
  }
6412
6765
  ),
6413
- isUserMenuOpen && /* @__PURE__ */ jsxs24(
6766
+ isUserMenuOpen && /* @__PURE__ */ jsxs25(
6414
6767
  "div",
6415
6768
  {
6416
6769
  ref: userMenuRef,
6417
6770
  className: "z-50 absolute right-0 mt-2 text-base list-none bg-white divide-y divide-gray-100 rounded-lg shadow-sm",
6418
6771
  children: [
6419
- /* @__PURE__ */ jsxs24("div", { className: "px-4 py-3", children: [
6420
- /* @__PURE__ */ jsx32(ITText, { as: "span", className: "block text-sm text-gray-900", children: userMenu.userName }),
6421
- /* @__PURE__ */ jsx32(ITText, { as: "span", className: "block text-sm text-gray-500 truncate", children: userMenu.userEmail })
6772
+ /* @__PURE__ */ jsxs25("div", { className: "px-4 py-3", children: [
6773
+ /* @__PURE__ */ jsx33(ITText, { as: "span", className: "block text-sm text-gray-900", children: userMenu.userName }),
6774
+ /* @__PURE__ */ jsx33(ITText, { as: "span", className: "block text-sm text-gray-500 truncate", children: userMenu.userEmail })
6422
6775
  ] }),
6423
- /* @__PURE__ */ jsx32("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx32("li", { children: /* @__PURE__ */ jsx32(
6776
+ /* @__PURE__ */ jsx33("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx33("li", { children: /* @__PURE__ */ jsx33(
6424
6777
  "button",
6425
6778
  {
6426
6779
  onClick: () => {
@@ -6428,7 +6781,7 @@ function ITNavbar({
6428
6781
  setIsUserMenuOpen(false);
6429
6782
  },
6430
6783
  className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left",
6431
- children: /* @__PURE__ */ jsx32(ITText, { as: "span", children: item.label })
6784
+ children: /* @__PURE__ */ jsx33(ITText, { as: "span", children: item.label })
6432
6785
  }
6433
6786
  ) }, index)) })
6434
6787
  ]
@@ -6437,191 +6790,233 @@ function ITNavbar({
6437
6790
  ] })
6438
6791
  ] }) })
6439
6792
  ] }) }),
6440
- /* @__PURE__ */ jsxs24("div", { className: "flex-1 flex overflow-hidden relative", children: [
6441
- (showSidebar || showSidebarOnMobile) && /* @__PURE__ */ jsx32("aside", { className: "fixed inset-y-0 left-0 w-64 bg-gray-50 transform transition-transform duration-300 ease-in-out z-50 shadow-lg md:static md:transform-none md:shadow-none md:border-r md:border-gray-200", children: /* @__PURE__ */ jsx32("div", { className: "h-full overflow-y-auto py-4 px-3", children: /* @__PURE__ */ jsx32("ul", { className: "space-y-2 font-medium", children: sidebarItems }) }) }),
6442
- /* @__PURE__ */ jsx32("main", { className: "flex-1 bg-gray-100 overflow-y-auto", children })
6793
+ /* @__PURE__ */ jsxs25("div", { className: "flex-1 flex overflow-hidden relative", children: [
6794
+ (showSidebar || showSidebarOnMobile) && /* @__PURE__ */ jsx33("aside", { className: "fixed inset-y-0 left-0 w-64 bg-gray-50 transform transition-transform duration-300 ease-in-out z-50 shadow-lg md:static md:transform-none md:shadow-none md:border-r md:border-gray-200", children: /* @__PURE__ */ jsx33("div", { className: "h-full overflow-y-auto py-4 px-3", children: /* @__PURE__ */ jsx33("ul", { className: "space-y-2 font-medium", children: sidebarItems }) }) }),
6795
+ /* @__PURE__ */ jsx33("main", { className: "flex-1 bg-gray-100 overflow-y-auto", children })
6443
6796
  ] })
6444
6797
  ] });
6445
6798
  }
6446
- return /* @__PURE__ */ jsxs24("div", { className: "flex h-screen font-sans", style: { backgroundColor: "var(--layout-bg, #f8fafc)" }, children: [
6447
- /* @__PURE__ */ jsxs24("aside", { className: "w-72 shadow-xl flex flex-col transition-all duration-300 ease-in-out", style: { backgroundColor: "var(--sidebar-bg, #0f172a)", borderRight: "1px solid var(--sidebar-border, #1e293b)" }, children: [
6448
- /* @__PURE__ */ jsxs24("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: "1px solid var(--sidebar-border, #1e293b)" }, children: [
6449
- logo && /* @__PURE__ */ jsx32("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
6450
- logoText && /* @__PURE__ */ jsx32(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: "var(--sidebar-active-color, #ffffff)" }, children: logoText })
6451
- ] }),
6452
- /* @__PURE__ */ jsx32("nav", { className: "flex-1 px-4 py-6 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ jsx32("ul", { className: "flex flex-col gap-1.5", children: navigationItems.map((item) => /* @__PURE__ */ jsxs24("li", { children: [
6453
- /* @__PURE__ */ jsxs24(
6454
- "div",
6455
- {
6456
- className: `group flex items-center justify-between px-4 py-3 rounded-xl cursor-pointer transition-all duration-200 border-l-4 ${item.isActive ? "shadow-sm" : "hover:shadow-sm"}`,
6457
- onClick: () => handleItemClick(item),
6458
- style: {
6459
- backgroundColor: item.isActive ? "var(--sidebar-active-bg, rgba(255,255,255,0.1))" : "transparent",
6460
- borderColor: item.isActive ? "var(--sidebar-active-icon, #3b82f6)" : "transparent",
6461
- color: item.isActive ? "var(--sidebar-active-color, #ffffff)" : "var(--sidebar-label-color, #94a3b8)"
6462
- },
6463
- onMouseEnter: (e) => {
6464
- if (!item.isActive) {
6465
- e.currentTarget.style.backgroundColor = "var(--sidebar-hover-bg, rgba(255,255,255,0.05))";
6466
- e.currentTarget.style.color = "var(--sidebar-active-color, #ffffff)";
6467
- }
6468
- },
6469
- onMouseLeave: (e) => {
6470
- if (!item.isActive) {
6471
- e.currentTarget.style.backgroundColor = "transparent";
6472
- e.currentTarget.style.color = "var(--sidebar-label-color, #94a3b8)";
6473
- }
6474
- },
6475
- children: [
6476
- /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
6477
- item.icon && /* @__PURE__ */ jsx32("div", { className: "text-xl transition-colors", style: {
6478
- color: item.isActive ? "var(--sidebar-active-icon, #3b82f6)" : "var(--sidebar-icon-color, #64748b)"
6479
- }, children: item.icon }),
6480
- /* @__PURE__ */ jsx32(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
6481
- ] }),
6482
- item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx32("div", { className: "transition-transform", style: { color: "var(--sidebar-icon-color, #64748b)" }, children: expandedItems.has(item.id) ? /* @__PURE__ */ jsx32(FaChevronDown, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx32(FaChevronRight4, { className: "w-3 h-3" }) })
6483
- ]
6484
- }
6485
- ),
6486
- item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ jsx32("ul", { className: "mt-1 ml-4 pl-4 space-y-1", style: { borderLeft: "1px solid var(--sidebar-border, #1e293b)" }, children: item.subitems.map((subitem) => /* @__PURE__ */ jsx32("li", { children: /* @__PURE__ */ jsx32(
6487
- "button",
6488
- {
6489
- onClick: subitem.action,
6490
- className: "block w-full text-left px-4 py-2.5 rounded-lg text-sm transition-all duration-200",
6491
- style: {
6492
- color: subitem.isActive ? "var(--sidebar-active-color, #ffffff)" : "var(--sidebar-label-color, #94a3b8)",
6493
- backgroundColor: subitem.isActive ? "var(--sidebar-active-bg, rgba(255,255,255,0.1))" : "transparent"
6494
- },
6495
- onMouseEnter: (e) => {
6496
- if (!subitem.isActive) {
6497
- e.currentTarget.style.backgroundColor = "var(--sidebar-hover-bg, rgba(255,255,255,0.05))";
6498
- }
6499
- },
6500
- onMouseLeave: (e) => {
6501
- if (!subitem.isActive) {
6502
- e.currentTarget.style.backgroundColor = "transparent";
6799
+ const sidebar = theme.sidebar;
6800
+ const topbar = theme.topbar;
6801
+ return /* @__PURE__ */ jsxs25("div", { className: "flex h-screen font-sans", style: { backgroundColor: theme.layout.backgroundColor }, children: [
6802
+ /* @__PURE__ */ jsxs25(
6803
+ "aside",
6804
+ {
6805
+ className: "w-72 shadow-xl flex flex-col transition-all duration-300 ease-in-out",
6806
+ style: { backgroundColor: sidebar.backgroundColor, borderRight: `1px solid ${sidebar.borderColor}` },
6807
+ children: [
6808
+ /* @__PURE__ */ jsxs25("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: `1px solid ${sidebar.borderColor}` }, children: [
6809
+ logo && /* @__PURE__ */ jsx33("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
6810
+ logoText && /* @__PURE__ */ jsx33(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: sidebar.active.color }, children: logoText })
6811
+ ] }),
6812
+ /* @__PURE__ */ jsx33("nav", { className: "flex-1 px-4 py-6 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ jsx33("ul", { className: "flex flex-col gap-1.5", children: navigationItems.map((item) => /* @__PURE__ */ jsxs25("li", { children: [
6813
+ /* @__PURE__ */ jsxs25(
6814
+ "div",
6815
+ {
6816
+ className: `group flex items-center justify-between px-4 py-3 rounded-xl cursor-pointer transition-all duration-200 border-l-4 ${item.isActive ? "shadow-sm" : "hover:shadow-sm"}`,
6817
+ onClick: () => handleItemClick(item),
6818
+ style: {
6819
+ backgroundColor: item.isActive ? sidebar.active.backgroundColor : "transparent",
6820
+ borderColor: item.isActive ? sidebar.active.iconColor : "transparent",
6821
+ color: item.isActive ? sidebar.active.color : sidebar.label.color
6822
+ },
6823
+ onMouseEnter: (e) => {
6824
+ if (!item.isActive) {
6825
+ e.currentTarget.style.backgroundColor = sidebar.hover.backgroundColor;
6826
+ e.currentTarget.style.color = sidebar.active.color;
6827
+ }
6828
+ },
6829
+ onMouseLeave: (e) => {
6830
+ if (!item.isActive) {
6831
+ e.currentTarget.style.backgroundColor = "transparent";
6832
+ e.currentTarget.style.color = sidebar.label.color;
6833
+ }
6834
+ },
6835
+ children: [
6836
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
6837
+ item.icon && /* @__PURE__ */ jsx33("div", { className: "text-xl transition-colors", style: {
6838
+ color: item.isActive ? sidebar.active.iconColor : sidebar.icon.color
6839
+ }, children: item.icon }),
6840
+ /* @__PURE__ */ jsx33(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
6841
+ ] }),
6842
+ item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx33("div", { className: "transition-transform", style: { color: sidebar.icon.color }, children: expandedItems.has(item.id) ? /* @__PURE__ */ jsx33(FaChevronDown, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx33(FaChevronRight4, { className: "w-3 h-3" }) })
6843
+ ]
6503
6844
  }
6504
- },
6505
- children: /* @__PURE__ */ jsx32(ITText, { as: "span", children: subitem.label })
6506
- }
6507
- ) }, subitem.id)) })
6508
- ] }, item.id)) }) }),
6509
- userMenu && /* @__PURE__ */ jsx32("div", { className: "p-4", style: { borderTop: "1px solid var(--sidebar-border, #1e293b)" }, children: /* @__PURE__ */ jsxs24("div", { className: "relative", children: [
6510
- /* @__PURE__ */ jsxs24(
6511
- "button",
6512
- {
6513
- type: "button",
6514
- className: "flex items-center gap-3 w-full p-3 rounded-xl transition-colors duration-200 group",
6515
- style: { color: "var(--sidebar-label-color, #94a3b8)" },
6516
- onMouseEnter: (e) => {
6517
- e.currentTarget.style.backgroundColor = "var(--sidebar-hover-bg, rgba(255,255,255,0.05))";
6518
- e.currentTarget.style.color = "var(--sidebar-active-color, #ffffff)";
6519
- },
6520
- onMouseLeave: (e) => {
6521
- e.currentTarget.style.backgroundColor = "transparent";
6522
- e.currentTarget.style.color = "var(--sidebar-label-color, #94a3b8)";
6523
- },
6524
- onClick: toggleUserMenu,
6525
- children: [
6526
- userMenu.userImage ? /* @__PURE__ */ jsx32(
6527
- "img",
6528
- {
6529
- className: "w-10 h-10 rounded-full border-2 transition-colors",
6530
- src: userMenu.userImage,
6531
- alt: "user photo",
6532
- style: { borderColor: "var(--sidebar-border, #1e293b)" }
6533
- }
6534
- ) : /* @__PURE__ */ jsx32("div", { className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors", style: { backgroundColor: "var(--sidebar-hover-bg, rgba(255,255,255,0.1))", color: "var(--sidebar-icon-color, #64748b)" }, children: /* @__PURE__ */ jsx32(FaUserCircle, { className: "w-6 h-6" }) }),
6535
- /* @__PURE__ */ jsxs24("div", { className: "flex-1 text-left overflow-hidden", children: [
6536
- /* @__PURE__ */ jsx32(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: "var(--sidebar-active-color, #ffffff)" }, children: userMenu.userName }),
6537
- /* @__PURE__ */ jsx32(ITText, { as: "div", className: "text-xs truncate", style: { color: "var(--sidebar-label-color, #94a3b8)" }, children: userMenu.userEmail })
6538
- ] }),
6539
- /* @__PURE__ */ jsx32(FaChevronRight4, { className: "w-3 h-3", style: { color: "var(--sidebar-icon-color, #64748b)" } })
6540
- ]
6541
- }
6542
- ),
6543
- isUserMenuOpen && /* @__PURE__ */ jsxs24(
6544
- "div",
6545
- {
6546
- ref: userMenuRef,
6547
- className: "absolute bottom-full left-0 mb-3 w-full rounded-xl shadow-2xl overflow-hidden transform transition-all duration-200 origin-bottom",
6548
- style: { backgroundColor: "var(--topbar-user-dropdown-bg, #ffffff)", border: "1px solid var(--topbar-user-dropdown-border, #e2e8f0)" },
6549
- children: [
6550
- /* @__PURE__ */ jsxs24("div", { className: "px-4 py-3", style: { backgroundColor: "var(--topbar-user-bg, #f8fafc)", borderBottom: "1px solid var(--topbar-user-dropdown-border, #e2e8f0)" }, children: [
6551
- /* @__PURE__ */ jsx32(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: "var(--topbar-user-text, #0f172a)" }, children: userMenu.userName }),
6552
- /* @__PURE__ */ jsx32(ITText, { as: "span", className: "block text-xs truncate", style: { color: "var(--topbar-user-subtitle, #64748b)" }, children: userMenu.userEmail })
6553
- ] }),
6554
- /* @__PURE__ */ jsx32("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx32("li", { children: /* @__PURE__ */ jsx32(
6555
- "button",
6556
- {
6557
- onClick: () => {
6558
- item.onClick();
6559
- setIsUserMenuOpen(false);
6560
- },
6561
- className: "flex items-center w-full px-4 py-2.5 text-sm transition-colors",
6562
- style: { color: "var(--topbar-user-text, #334155)" },
6563
- onMouseEnter: (e) => {
6564
- e.currentTarget.style.backgroundColor = "var(--topbar-user-item-hover, #f8fafc)";
6565
- },
6566
- onMouseLeave: (e) => {
6845
+ ),
6846
+ item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ jsx33("ul", { className: "mt-1 ml-4 pl-4 space-y-1", style: { borderLeft: `1px solid ${sidebar.borderColor}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ jsx33("li", { children: /* @__PURE__ */ jsx33(
6847
+ "button",
6848
+ {
6849
+ onClick: subitem.action,
6850
+ className: "block w-full text-left px-4 py-2.5 rounded-lg text-sm transition-all duration-200",
6851
+ style: {
6852
+ color: subitem.isActive ? sidebar.active.color : sidebar.label.color,
6853
+ backgroundColor: subitem.isActive ? sidebar.active.backgroundColor : "transparent"
6854
+ },
6855
+ onMouseEnter: (e) => {
6856
+ if (!subitem.isActive) {
6857
+ e.currentTarget.style.backgroundColor = sidebar.hover.backgroundColor;
6858
+ }
6859
+ },
6860
+ onMouseLeave: (e) => {
6861
+ if (!subitem.isActive) {
6567
6862
  e.currentTarget.style.backgroundColor = "transparent";
6568
- },
6569
- children: /* @__PURE__ */ jsx32(ITText, { as: "span", children: item.label })
6570
- }
6571
- ) }, index)) })
6572
- ]
6573
- }
6574
- )
6575
- ] }) })
6576
- ] }),
6577
- /* @__PURE__ */ jsx32("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: "var(--layout-bg, #f8fafc)" }, children })
6863
+ }
6864
+ },
6865
+ children: /* @__PURE__ */ jsx33(ITText, { as: "span", children: subitem.label })
6866
+ }
6867
+ ) }, subitem.id)) })
6868
+ ] }, item.id)) }) }),
6869
+ userMenu && /* @__PURE__ */ jsx33("div", { className: "p-4", style: { borderTop: `1px solid ${sidebar.borderColor}` }, children: /* @__PURE__ */ jsxs25("div", { className: "relative", children: [
6870
+ /* @__PURE__ */ jsxs25(
6871
+ "button",
6872
+ {
6873
+ type: "button",
6874
+ className: "flex items-center gap-3 w-full p-3 rounded-xl transition-colors duration-200 group",
6875
+ style: { color: sidebar.label.color },
6876
+ onMouseEnter: (e) => {
6877
+ e.currentTarget.style.backgroundColor = sidebar.hover.backgroundColor;
6878
+ e.currentTarget.style.color = sidebar.active.color;
6879
+ },
6880
+ onMouseLeave: (e) => {
6881
+ e.currentTarget.style.backgroundColor = "transparent";
6882
+ e.currentTarget.style.color = sidebar.label.color;
6883
+ },
6884
+ onClick: toggleUserMenu,
6885
+ children: [
6886
+ userMenu.userImage ? /* @__PURE__ */ jsx33(
6887
+ "img",
6888
+ {
6889
+ className: "w-10 h-10 rounded-full border-2 transition-colors",
6890
+ src: userMenu.userImage,
6891
+ alt: "user photo",
6892
+ style: { borderColor: sidebar.borderColor }
6893
+ }
6894
+ ) : /* @__PURE__ */ jsx33(
6895
+ "div",
6896
+ {
6897
+ className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors",
6898
+ style: { backgroundColor: sidebar.hover.backgroundColor, color: sidebar.icon.color },
6899
+ children: /* @__PURE__ */ jsx33(FaUserCircle, { className: "w-6 h-6" })
6900
+ }
6901
+ ),
6902
+ /* @__PURE__ */ jsxs25("div", { className: "flex-1 text-left overflow-hidden", children: [
6903
+ /* @__PURE__ */ jsx33(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: sidebar.active.color }, children: userMenu.userName }),
6904
+ /* @__PURE__ */ jsx33(ITText, { as: "div", className: "text-xs truncate", style: { color: sidebar.label.color }, children: userMenu.userEmail })
6905
+ ] }),
6906
+ /* @__PURE__ */ jsx33(FaChevronRight4, { className: "w-3 h-3", style: { color: sidebar.icon.color } })
6907
+ ]
6908
+ }
6909
+ ),
6910
+ isUserMenuOpen && /* @__PURE__ */ jsxs25(
6911
+ "div",
6912
+ {
6913
+ ref: userMenuRef,
6914
+ className: "absolute bottom-full left-0 mb-3 w-full rounded-xl shadow-2xl overflow-hidden transform transition-all duration-200 origin-bottom",
6915
+ style: { backgroundColor: topbar.userMenu.dropdown.backgroundColor, border: `1px solid ${topbar.userMenu.dropdown.borderColor}` },
6916
+ children: [
6917
+ /* @__PURE__ */ jsxs25("div", { className: "px-4 py-3", style: { backgroundColor: topbar.userMenu.backgroundColor, borderBottom: `1px solid ${topbar.userMenu.dropdown.borderColor}` }, children: [
6918
+ /* @__PURE__ */ jsx33(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: topbar.userMenu.textColor }, children: userMenu.userName }),
6919
+ /* @__PURE__ */ jsx33(ITText, { as: "span", className: "block text-xs truncate", style: { color: topbar.userMenu.subtitleColor }, children: userMenu.userEmail })
6920
+ ] }),
6921
+ /* @__PURE__ */ jsx33("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx33("li", { children: /* @__PURE__ */ jsx33(
6922
+ "button",
6923
+ {
6924
+ onClick: () => {
6925
+ item.onClick();
6926
+ setIsUserMenuOpen(false);
6927
+ },
6928
+ className: "flex items-center w-full px-4 py-2.5 text-sm transition-colors",
6929
+ style: { color: topbar.userMenu.textColor },
6930
+ onMouseEnter: (e) => {
6931
+ e.currentTarget.style.backgroundColor = topbar.userMenu.dropdown.itemHoverBackground;
6932
+ },
6933
+ onMouseLeave: (e) => {
6934
+ e.currentTarget.style.backgroundColor = "transparent";
6935
+ },
6936
+ children: /* @__PURE__ */ jsx33(ITText, { as: "span", children: item.label })
6937
+ }
6938
+ ) }, index)) })
6939
+ ]
6940
+ }
6941
+ )
6942
+ ] }) })
6943
+ ]
6944
+ }
6945
+ ),
6946
+ /* @__PURE__ */ jsx33("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: theme.layout.backgroundColor }, children })
6578
6947
  ] });
6579
6948
  }
6580
6949
 
6581
6950
  // src/components/page/page.tsx
6582
- import clsx28 from "clsx";
6951
+ import clsx29 from "clsx";
6583
6952
 
6584
6953
  // src/components/page-header/page-header.tsx
6585
6954
  import { FaChevronLeft as FaChevronLeft3 } from "react-icons/fa";
6586
- import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
6955
+ import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
6587
6956
  function ITPageHeader({
6588
6957
  title,
6589
6958
  description,
6590
6959
  breadcrumbs,
6591
6960
  actions,
6592
6961
  backAction,
6962
+ icon,
6963
+ iconColor,
6593
6964
  className
6594
6965
  }) {
6595
6966
  const showTopRow = breadcrumbs?.length || backAction;
6596
- return /* @__PURE__ */ jsxs25("div", { className, children: [
6597
- showTopRow && /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between gap-4 mb-1", children: [
6598
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 min-w-0", children: [
6599
- backAction && /* @__PURE__ */ jsx33(
6967
+ return /* @__PURE__ */ jsxs26("div", { className: `${className} space-y-3`, children: [
6968
+ showTopRow && /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between gap-4", children: [
6969
+ /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 min-w-0", children: [
6970
+ backAction && /* @__PURE__ */ jsx34(
6600
6971
  "button",
6601
6972
  {
6602
6973
  onClick: backAction,
6603
- className: "p-1.5 rounded-lg text-slate-400 hover:text-slate-600 hover:bg-slate-100 dark:text-slate-500 dark:hover:text-slate-200 dark:hover:bg-slate-800 transition-colors flex-shrink-0",
6974
+ className: "flex items-center justify-center w-9 h-9 rounded-full border border-slate-200 dark:border-slate-700 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50 dark:hover:bg-slate-800/60 transition-all duration-200 flex-shrink-0",
6604
6975
  "aria-label": "Volver",
6605
- children: /* @__PURE__ */ jsx33(FaChevronLeft3, { size: 14 })
6976
+ children: /* @__PURE__ */ jsx34(FaChevronLeft3, { size: 14 })
6606
6977
  }
6607
6978
  ),
6608
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx33(ITBreadcrumbs, { items: breadcrumbs })
6979
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx34(ITBreadcrumbs, { items: breadcrumbs })
6609
6980
  ] }),
6610
- actions && /* @__PURE__ */ jsx33("div", { className: "flex items-center gap-2 flex-shrink-0", children: actions })
6981
+ actions && /* @__PURE__ */ jsx34("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
6611
6982
  ] }),
6612
- /* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-4", children: [
6613
- /* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
6614
- /* @__PURE__ */ jsx33(ITText, { as: "h1", className: "text-2xl font-extrabold text-slate-800 dark:text-white tracking-tight", children: title }),
6615
- description && /* @__PURE__ */ jsx33(ITText, { as: "p", className: "text-sm text-slate-500 dark:text-slate-400 mt-0.5", children: description })
6983
+ /* @__PURE__ */ jsxs26("div", { className: "flex items-start justify-between gap-6", children: [
6984
+ /* @__PURE__ */ jsxs26("div", { className: "flex items-start gap-4 min-w-0", children: [
6985
+ icon && /* @__PURE__ */ jsx34(
6986
+ "div",
6987
+ {
6988
+ className: "flex items-center justify-center w-12 h-12 rounded-full border border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50 text-slate-600 dark:text-slate-300 flex-shrink-0 transition-all duration-200 hover:border-slate-300 dark:hover:border-slate-500 hover:shadow-sm",
6989
+ style: iconColor ? { color: iconColor } : void 0,
6990
+ children: icon
6991
+ }
6992
+ ),
6993
+ /* @__PURE__ */ jsxs26("div", { className: "min-w-0", children: [
6994
+ /* @__PURE__ */ jsx34(
6995
+ ITText,
6996
+ {
6997
+ as: "h1",
6998
+ className: "text-3xl font-bold text-slate-800 dark:text-white tracking-tight leading-tight",
6999
+ children: title
7000
+ }
7001
+ ),
7002
+ description && /* @__PURE__ */ jsx34(
7003
+ ITText,
7004
+ {
7005
+ as: "p",
7006
+ className: "text-sm font-light text-slate-500 dark:text-slate-400 mt-1 leading-relaxed",
7007
+ children: description
7008
+ }
7009
+ )
7010
+ ] })
6616
7011
  ] }),
6617
- !showTopRow && actions && /* @__PURE__ */ jsx33("div", { className: "flex items-center gap-2 flex-shrink-0", children: actions })
7012
+ !showTopRow && actions && /* @__PURE__ */ jsx34("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
6618
7013
  ] })
6619
7014
  ] });
6620
7015
  }
6621
7016
 
6622
7017
  // src/components/skeleton/skeleton.tsx
6623
- import clsx26 from "clsx";
6624
- import { Fragment as Fragment6, jsx as jsx34 } from "react/jsx-runtime";
7018
+ import clsx27 from "clsx";
7019
+ import { Fragment as Fragment6, jsx as jsx35 } from "react/jsx-runtime";
6625
7020
  var variantClasses = {
6626
7021
  text: "rounded-md h-4 w-full",
6627
7022
  circular: "rounded-full",
@@ -6641,10 +7036,10 @@ function ITSkeleton({
6641
7036
  ...style
6642
7037
  };
6643
7038
  const items = Array.from({ length: count }, (_, i) => i);
6644
- return /* @__PURE__ */ jsx34(Fragment6, { children: items.map((i) => /* @__PURE__ */ jsx34(
7039
+ return /* @__PURE__ */ jsx35(Fragment6, { children: items.map((i) => /* @__PURE__ */ jsx35(
6645
7040
  "div",
6646
7041
  {
6647
- className: clsx26(
7042
+ className: clsx27(
6648
7043
  "animate-pulse bg-slate-200 dark:bg-slate-700",
6649
7044
  variantClasses[variant],
6650
7045
  variant === "text" && count > 1 && i < count - 1 && "mb-2",
@@ -6660,9 +7055,9 @@ function ITSkeleton({
6660
7055
  }
6661
7056
 
6662
7057
  // src/components/stack/stack.tsx
6663
- import clsx27 from "clsx";
7058
+ import clsx28 from "clsx";
6664
7059
  import { Children, cloneElement, isValidElement, Fragment as Fragment7 } from "react";
6665
- import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
7060
+ import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
6666
7061
  var directionMap2 = {
6667
7062
  row: "flex-row",
6668
7063
  column: "flex-col",
@@ -6707,10 +7102,10 @@ function ITStack({
6707
7102
  gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
6708
7103
  ...style
6709
7104
  };
6710
- return /* @__PURE__ */ jsx35(
7105
+ return /* @__PURE__ */ jsx36(
6711
7106
  Component,
6712
7107
  {
6713
- className: clsx27(
7108
+ className: clsx28(
6714
7109
  "flex",
6715
7110
  directionMap2[direction],
6716
7111
  alignItems && alignMap2[alignItems],
@@ -6719,7 +7114,7 @@ function ITStack({
6719
7114
  className
6720
7115
  ),
6721
7116
  style: resolvedStyle,
6722
- children: hasDivider ? items.map((child, index) => /* @__PURE__ */ jsxs26(Fragment7, { children: [
7117
+ children: hasDivider ? items.map((child, index) => /* @__PURE__ */ jsxs27(Fragment7, { children: [
6723
7118
  child,
6724
7119
  index < items.length - 1 && isValidElement(divider) ? cloneElement(divider, { key: `divider-${index}` }) : null
6725
7120
  ] }, index)) : children
@@ -6728,18 +7123,20 @@ function ITStack({
6728
7123
  }
6729
7124
 
6730
7125
  // src/components/page/page.tsx
6731
- import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
6732
- var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction);
7126
+ import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
7127
+ var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction || props.icon);
6733
7128
  var renderHeader = (props) => {
6734
7129
  if (!hasHeader(props)) return null;
6735
- return /* @__PURE__ */ jsx36(
7130
+ return /* @__PURE__ */ jsx37(
6736
7131
  ITPageHeader,
6737
7132
  {
6738
7133
  title: props.title || "",
6739
7134
  description: props.description,
6740
7135
  breadcrumbs: props.breadcrumbs,
6741
7136
  actions: props.actions,
6742
- backAction: props.backAction
7137
+ backAction: props.backAction,
7138
+ icon: props.icon,
7139
+ iconColor: props.iconColor
6743
7140
  }
6744
7141
  );
6745
7142
  };
@@ -6755,28 +7152,36 @@ function ITPage(props) {
6755
7152
  emptyDescription,
6756
7153
  emptyAction,
6757
7154
  className,
6758
- children
7155
+ children,
7156
+ maxWidth = "7xl",
7157
+ noPadding = false
6759
7158
  } = props;
6760
- const wrapperClass = clsx28("space-y-6", className);
7159
+ const wrapperClass = clsx29(
7160
+ "mx-auto w-full",
7161
+ !noPadding && "px-4 sm:px-6 lg:px-8 py-6",
7162
+ `max-w-${maxWidth}`,
7163
+ "space-y-8",
7164
+ className
7165
+ );
6761
7166
  if (loading) {
6762
- return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
7167
+ return /* @__PURE__ */ jsxs28("div", { className: wrapperClass, children: [
6763
7168
  renderHeader(props),
6764
- /* @__PURE__ */ jsxs27(ITStack, { spacing: 4, children: [
6765
- /* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 40, width: "40%" }),
6766
- /* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 200 }),
6767
- /* @__PURE__ */ jsx36(ITSkeleton, { variant: "rectangular", height: 200 })
7169
+ /* @__PURE__ */ jsxs28(ITStack, { spacing: 6, children: [
7170
+ /* @__PURE__ */ jsx37(ITSkeleton, { variant: "rectangular", height: 40, width: "40%", className: "rounded-lg" }),
7171
+ /* @__PURE__ */ jsx37(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" }),
7172
+ /* @__PURE__ */ jsx37(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" })
6768
7173
  ] })
6769
7174
  ] });
6770
7175
  }
6771
7176
  if (error) {
6772
- return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
7177
+ return /* @__PURE__ */ jsxs28("div", { className: wrapperClass, children: [
6773
7178
  renderHeader(props),
6774
- /* @__PURE__ */ jsx36(
7179
+ /* @__PURE__ */ jsx37(
6775
7180
  ITEmptyState,
6776
7181
  {
6777
7182
  title: errorTitle || "Error",
6778
7183
  description: error,
6779
- action: onRetry ? /* @__PURE__ */ jsx36(
7184
+ action: onRetry ? /* @__PURE__ */ jsx37(
6780
7185
  ITButton,
6781
7186
  {
6782
7187
  label: errorActionLabel || "Reintentar",
@@ -6789,9 +7194,9 @@ function ITPage(props) {
6789
7194
  ] });
6790
7195
  }
6791
7196
  if (empty) {
6792
- return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
7197
+ return /* @__PURE__ */ jsxs28("div", { className: wrapperClass, children: [
6793
7198
  renderHeader(props),
6794
- /* @__PURE__ */ jsx36(
7199
+ /* @__PURE__ */ jsx37(
6795
7200
  ITEmptyState,
6796
7201
  {
6797
7202
  title: emptyTitle || "Sin datos",
@@ -6801,16 +7206,16 @@ function ITPage(props) {
6801
7206
  )
6802
7207
  ] });
6803
7208
  }
6804
- return /* @__PURE__ */ jsxs27("div", { className: wrapperClass, children: [
7209
+ return /* @__PURE__ */ jsxs28("div", { className: wrapperClass, children: [
6805
7210
  renderHeader(props),
6806
7211
  children
6807
7212
  ] });
6808
7213
  }
6809
7214
 
6810
7215
  // src/components/popover/popover.tsx
6811
- import { useState as useState18, useRef as useRef10 } from "react";
6812
- import clsx29 from "clsx";
6813
- import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
7216
+ import { useState as useState21, useRef as useRef11 } from "react";
7217
+ import clsx30 from "clsx";
7218
+ import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
6814
7219
  var positionClasses = {
6815
7220
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
6816
7221
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
@@ -6825,23 +7230,23 @@ function ITPopover({
6825
7230
  onClose,
6826
7231
  className
6827
7232
  }) {
6828
- const [internalOpen, setInternalOpen] = useState18(false);
7233
+ const [internalOpen, setInternalOpen] = useState21(false);
6829
7234
  const isControlled = controlledOpen !== void 0;
6830
7235
  const open = isControlled ? controlledOpen : internalOpen;
6831
- const ref = useRef10(null);
7236
+ const ref = useRef11(null);
6832
7237
  useClickOutside_default(ref, () => {
6833
7238
  if (isControlled) onClose?.();
6834
7239
  else setInternalOpen(false);
6835
7240
  });
6836
- return /* @__PURE__ */ jsxs28("div", { ref, className: clsx29("relative inline-flex", className), children: [
6837
- /* @__PURE__ */ jsx37("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
6838
- open && /* @__PURE__ */ jsx37("div", { className: clsx29("absolute z-[200]", positionClasses[position]), children: /* @__PURE__ */ jsx37("div", { className: "bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 p-3 min-w-[160px]", children }) })
7241
+ return /* @__PURE__ */ jsxs29("div", { ref, className: clsx30("relative inline-flex", className), children: [
7242
+ /* @__PURE__ */ jsx38("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
7243
+ open && /* @__PURE__ */ jsx38("div", { className: clsx30("absolute z-[200]", positionClasses[position]), children: /* @__PURE__ */ jsx38("div", { className: "bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 p-3 min-w-[160px]", children }) })
6839
7244
  ] });
6840
7245
  }
6841
7246
 
6842
7247
  // src/components/progress/progress.tsx
6843
- import clsx30 from "clsx";
6844
- import { jsx as jsx38 } from "react/jsx-runtime";
7248
+ import clsx31 from "clsx";
7249
+ import { jsx as jsx39 } from "react/jsx-runtime";
6845
7250
  var colorMap = {
6846
7251
  primary: "bg-primary-500",
6847
7252
  secondary: "bg-secondary-500",
@@ -6868,18 +7273,18 @@ function ITProgress({
6868
7273
  style
6869
7274
  }) {
6870
7275
  const pct = Math.min(Math.max(value / max * 100, 0), 100);
6871
- return /* @__PURE__ */ jsx38(
7276
+ return /* @__PURE__ */ jsx39(
6872
7277
  "div",
6873
7278
  {
6874
- className: clsx30("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap3[size], className),
7279
+ className: clsx31("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap3[size], className),
6875
7280
  style,
6876
7281
  role: "progressbar",
6877
7282
  "aria-valuenow": variant === "determinate" ? value : void 0,
6878
7283
  "aria-valuemax": max,
6879
- children: /* @__PURE__ */ jsx38(
7284
+ children: /* @__PURE__ */ jsx39(
6880
7285
  "div",
6881
7286
  {
6882
- className: clsx30(
7287
+ className: clsx31(
6883
7288
  "h-full rounded-full transition-all duration-500",
6884
7289
  colorMap[color],
6885
7290
  variant === "indeterminate" && "animate-pulse w-1/2"
@@ -6892,8 +7297,8 @@ function ITProgress({
6892
7297
  }
6893
7298
 
6894
7299
  // src/components/radio/radio.tsx
6895
- import clsx31 from "clsx";
6896
- import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
7300
+ import clsx32 from "clsx";
7301
+ import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
6897
7302
  function ITRadioGroup({
6898
7303
  name,
6899
7304
  value,
@@ -6903,25 +7308,25 @@ function ITRadioGroup({
6903
7308
  direction = "column",
6904
7309
  className
6905
7310
  }) {
6906
- return /* @__PURE__ */ jsx39(
7311
+ return /* @__PURE__ */ jsx40(
6907
7312
  "div",
6908
7313
  {
6909
- className: clsx31(
7314
+ className: clsx32(
6910
7315
  "flex gap-3",
6911
7316
  direction === "row" ? "flex-row flex-wrap" : "flex-col",
6912
7317
  className
6913
7318
  ),
6914
7319
  children: options.map((opt) => {
6915
7320
  const isSelected = opt.value === value;
6916
- return /* @__PURE__ */ jsxs29(
7321
+ return /* @__PURE__ */ jsxs30(
6917
7322
  "label",
6918
7323
  {
6919
- className: clsx31(
7324
+ className: clsx32(
6920
7325
  "inline-flex items-center gap-2 cursor-pointer select-none",
6921
7326
  disabled && "opacity-50 cursor-not-allowed"
6922
7327
  ),
6923
7328
  children: [
6924
- /* @__PURE__ */ jsx39(
7329
+ /* @__PURE__ */ jsx40(
6925
7330
  "input",
6926
7331
  {
6927
7332
  type: "radio",
@@ -6933,18 +7338,18 @@ function ITRadioGroup({
6933
7338
  className: "peer sr-only"
6934
7339
  }
6935
7340
  ),
6936
- /* @__PURE__ */ jsx39(
7341
+ /* @__PURE__ */ jsx40(
6937
7342
  "div",
6938
7343
  {
6939
- className: clsx31(
7344
+ className: clsx32(
6940
7345
  "w-4 h-4 rounded-full border-2 flex items-center justify-center transition-all",
6941
7346
  isSelected ? "border-primary-500" : "border-slate-300 dark:border-slate-600",
6942
7347
  !disabled && "peer-focus:ring-2 peer-focus:ring-primary-200"
6943
7348
  ),
6944
- children: isSelected && /* @__PURE__ */ jsx39("div", { className: "w-2 h-2 rounded-full bg-primary-500" })
7349
+ children: isSelected && /* @__PURE__ */ jsx40("div", { className: "w-2 h-2 rounded-full bg-primary-500" })
6945
7350
  }
6946
7351
  ),
6947
- /* @__PURE__ */ jsx39(ITText, { as: "span", className: "text-sm text-slate-700 dark:text-slate-300", children: opt.label })
7352
+ /* @__PURE__ */ jsx40(ITText, { as: "span", className: "text-sm text-slate-700 dark:text-slate-300", children: opt.label })
6948
7353
  ]
6949
7354
  },
6950
7355
  opt.value
@@ -6954,186 +7359,9 @@ function ITRadioGroup({
6954
7359
  );
6955
7360
  }
6956
7361
 
6957
- // src/components/search-select/search-select.tsx
6958
- import { useState as useState19, useEffect as useEffect13, useRef as useRef11, useMemo as useMemo6 } from "react";
6959
- import clsx32 from "clsx";
6960
- import { FaSearch } from "react-icons/fa";
6961
- import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
6962
- function ITSearchSelect({
6963
- name,
6964
- options = [],
6965
- label,
6966
- placeholder = "Selecciona una opci\xF3n",
6967
- valueField = "value",
6968
- labelField = "label",
6969
- value,
6970
- onChange,
6971
- onBlur,
6972
- disabled = false,
6973
- className,
6974
- touched,
6975
- required,
6976
- error,
6977
- readOnly = false,
6978
- onSearch,
6979
- isLoading = false,
6980
- noResultsMessage = "No se encontraron resultados"
6981
- }) {
6982
- const [isOpen, setIsOpen] = useState19(false);
6983
- const [searchTerm, setSearchTerm] = useState19("");
6984
- const [isFocused, setIsFocused] = useState19(false);
6985
- const [localTouched, setLocalTouched] = useState19(false);
6986
- const containerRef = useRef11(null);
6987
- const timeoutRef = useRef11(null);
6988
- const selectedOption = useMemo6(() => {
6989
- return options.find((opt) => opt[valueField] === value);
6990
- }, [options, value, valueField]);
6991
- useEffect13(() => {
6992
- if (!isFocused) {
6993
- setSearchTerm(selectedOption ? String(selectedOption[labelField]) : "");
6994
- }
6995
- }, [selectedOption, isFocused, labelField]);
6996
- useEffect13(() => {
6997
- function handleClickOutside(event) {
6998
- if (containerRef.current && !containerRef.current.contains(event.target)) {
6999
- setIsOpen(false);
7000
- }
7001
- }
7002
- document.addEventListener("mousedown", handleClickOutside);
7003
- return () => document.removeEventListener("mousedown", handleClickOutside);
7004
- }, []);
7005
- const filteredOptions = useMemo6(() => {
7006
- if (onSearch) return options;
7007
- if (!searchTerm || !isFocused) return options;
7008
- return options.filter(
7009
- (opt) => String(opt[labelField]).toLowerCase().includes(searchTerm.toLowerCase())
7010
- );
7011
- }, [options, searchTerm, onSearch, labelField, isFocused]);
7012
- const handleInputChange = (e) => {
7013
- const query = e.target.value;
7014
- setSearchTerm(query);
7015
- setIsOpen(true);
7016
- if (onSearch) {
7017
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
7018
- timeoutRef.current = setTimeout(() => {
7019
- onSearch(query);
7020
- }, 500);
7021
- }
7022
- };
7023
- const handleSelect = (option) => {
7024
- if (onChange) {
7025
- onChange(option[valueField], option);
7026
- }
7027
- setSearchTerm(String(option[labelField]));
7028
- setIsOpen(false);
7029
- };
7030
- const handleFocus = () => {
7031
- if (disabled || readOnly) return;
7032
- setIsFocused(true);
7033
- setIsOpen(true);
7034
- };
7035
- const handleInputBlur = (e) => {
7036
- setTimeout(() => {
7037
- setIsFocused(false);
7038
- setLocalTouched(true);
7039
- onBlur?.(e);
7040
- }, 200);
7041
- };
7042
- const inputTheme = theme.input || {};
7043
- const isTouched = touched !== void 0 ? touched : localTouched;
7044
- const isEmpty = value === void 0 || value === null || String(value).trim() === "";
7045
- const effectiveError = error !== void 0 && error !== false ? error === true ? "Este campo es requerido" : error : required && isEmpty ? "Este campo es requerido" : void 0;
7046
- const hasError = isTouched && !!effectiveError;
7047
- const errorMessage = typeof effectiveError === "string" ? effectiveError : "Este campo es requerido";
7048
- const getInputStyle = () => {
7049
- const style = {
7050
- backgroundColor: inputTheme.backgroundColor || "#ffffff",
7051
- borderColor: inputTheme.borderColor || "#e2e8f0",
7052
- borderRadius: inputTheme.borderRadius || "0.5rem",
7053
- padding: inputTheme.padding || "0.5rem 0.75rem",
7054
- fontSize: inputTheme.fontSize || "0.875rem",
7055
- borderWidth: "1px",
7056
- borderStyle: "solid",
7057
- transition: "all 0.2s",
7058
- color: "var(--input-text-color, var(--color-secondary-900))",
7059
- width: "100%"
7060
- };
7061
- if (disabled) {
7062
- style.backgroundColor = inputTheme.disabled?.backgroundColor || "#f1f5f9";
7063
- style.borderColor = inputTheme.disabled?.borderColor || "#e2e8f0";
7064
- style.opacity = 0.7;
7065
- style.cursor = "not-allowed";
7066
- }
7067
- if (hasError) {
7068
- style.borderColor = inputTheme.error?.borderColor || "red";
7069
- if (isFocused) {
7070
- style.boxShadow = inputTheme.error?.ring;
7071
- }
7072
- } else if (isFocused && !readOnly) {
7073
- style.boxShadow = inputTheme.focus?.ring;
7074
- style.borderColor = inputTheme.focus?.borderColor;
7075
- }
7076
- return style;
7077
- };
7078
- return /* @__PURE__ */ jsxs30("div", { className: clsx32("w-full flex flex-col gap-1.5", className, isOpen && "relative z-30"), ref: containerRef, children: [
7079
- label && /* @__PURE__ */ jsxs30(
7080
- ITText,
7081
- {
7082
- as: "label",
7083
- className: clsx32("text-sm font-medium text-gray-700 dark:text-slate-300", {
7084
- "text-red-500": hasError
7085
- }),
7086
- children: [
7087
- /* @__PURE__ */ jsx40(ITText, { as: "span", children: label }),
7088
- required && /* @__PURE__ */ jsx40(ITText, { as: "span", className: "text-red-500 ml-1", children: "*" })
7089
- ]
7090
- }
7091
- ),
7092
- /* @__PURE__ */ jsxs30("div", { className: "relative", children: [
7093
- /* @__PURE__ */ jsxs30("div", { className: "relative flex items-center", children: [
7094
- /* @__PURE__ */ jsx40(
7095
- "input",
7096
- {
7097
- type: "text",
7098
- name,
7099
- value: searchTerm,
7100
- onChange: handleInputChange,
7101
- onFocus: handleFocus,
7102
- onBlur: handleInputBlur,
7103
- disabled,
7104
- readOnly,
7105
- placeholder,
7106
- className: "outline-none pr-10",
7107
- style: getInputStyle(),
7108
- autoComplete: "off"
7109
- }
7110
- ),
7111
- /* @__PURE__ */ jsxs30("div", { className: "absolute right-3 flex items-center gap-2 text-gray-400 pointer-events-none", children: [
7112
- isLoading && /* @__PURE__ */ jsx40("div", { className: "animate-spin h-4 w-4 border-2 border-primary-500 border-t-transparent rounded-full" }),
7113
- !isLoading && /* @__PURE__ */ jsx40(FaSearch, { size: 14, className: clsx32({ "text-primary-500": isFocused }) })
7114
- ] })
7115
- ] }),
7116
- isOpen && /* @__PURE__ */ jsx40("div", { className: "absolute z-50 w-full mt-1 bg-white dark:bg-slate-900 border border-gray-200 dark:border-slate-800 rounded-lg shadow-xl overflow-hidden animate-in fade-in zoom-in duration-200 origin-top", children: /* @__PURE__ */ jsx40("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx40(
7117
- ITText,
7118
- {
7119
- as: "div",
7120
- onClick: () => handleSelect(option),
7121
- className: clsx32(
7122
- "px-4 py-2 text-sm cursor-pointer transition-colors",
7123
- value === option[valueField] ? "bg-primary-50 dark:bg-primary-950/40 text-primary-700 dark:text-primary-300 font-medium" : "hover:bg-gray-50 dark:hover:bg-slate-800 text-gray-700 dark:text-slate-300"
7124
- ),
7125
- children: /* @__PURE__ */ jsx40(ITText, { as: "span", children: option[labelField] })
7126
- },
7127
- option[valueField]
7128
- )) : /* @__PURE__ */ jsx40(ITText, { as: "div", className: "px-4 py-6 text-sm text-center text-gray-500 italic", children: isLoading ? "Cargando..." : noResultsMessage }) }) })
7129
- ] }),
7130
- hasError && /* @__PURE__ */ jsx40(ITText, { as: "p", className: "text-red-500 text-xs mt-1", children: errorMessage })
7131
- ] });
7132
- }
7133
-
7134
7362
  // src/components/searchTable/searchTable.tsx
7135
7363
  import clsx34 from "clsx";
7136
- import { useState as useState20 } from "react";
7364
+ import { useState as useState22 } from "react";
7137
7365
 
7138
7366
  // src/components/searchTable/components/SearchInput.tsx
7139
7367
  import { FaSearch as FaSearch2 } from "react-icons/fa";
@@ -7639,7 +7867,7 @@ function ITSearchTable({
7639
7867
  onSave,
7640
7868
  onCancel
7641
7869
  }) {
7642
- const [itemsPerPage, setItemsPerPage] = useState20(defaultItemsPerPage);
7870
+ const [itemsPerPage, setItemsPerPage] = useState22(defaultItemsPerPage);
7643
7871
  const { searchTerm, handleSearchChange, handleClearSearch } = useDebouncedSearch({
7644
7872
  initialValue: searchTermInitial,
7645
7873
  onSearch: (value) => {
@@ -7752,7 +7980,7 @@ function ITSearchTable({
7752
7980
  }
7753
7981
 
7754
7982
  // src/components/sidebar/sidebar.tsx
7755
- import { useEffect as useEffect14, useRef as useRef12, useState as useState21 } from "react";
7983
+ import { useEffect as useEffect14, useRef as useRef12, useState as useState23 } from "react";
7756
7984
  import { FaChevronDown as FaChevronDown2 } from "react-icons/fa";
7757
7985
  import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
7758
7986
  function ITSidebar({
@@ -7765,8 +7993,8 @@ function ITSidebar({
7765
7993
  onSubItemClick,
7766
7994
  subitemConnector = "dot"
7767
7995
  }) {
7768
- const [expandedItems, setExpandedItems] = useState21(/* @__PURE__ */ new Set());
7769
- const [isHovering, setIsHovering] = useState21(false);
7996
+ const [expandedItems, setExpandedItems] = useState23(/* @__PURE__ */ new Set());
7997
+ const [isHovering, setIsHovering] = useState23(false);
7770
7998
  const sidebarRef = useRef12(null);
7771
7999
  const hoverTimeoutRef = useRef12(null);
7772
8000
  const leaveTimeoutRef = useRef12(null);
@@ -8040,7 +8268,7 @@ function ITSidebar({
8040
8268
  }
8041
8269
 
8042
8270
  // src/components/slide/slide.tsx
8043
- import { useState as useState22, useEffect as useEffect15 } from "react";
8271
+ import { useState as useState24, useEffect as useEffect15 } from "react";
8044
8272
  import clsx35 from "clsx";
8045
8273
  import { jsx as jsx52 } from "react/jsx-runtime";
8046
8274
  function ITSlideToggle({
@@ -8055,7 +8283,7 @@ function ITSlideToggle({
8055
8283
  className = ""
8056
8284
  }) {
8057
8285
  const isControlled = controlledIsOn !== void 0;
8058
- const [internalIsOn, setInternalIsOn] = useState22(initialState);
8286
+ const [internalIsOn, setInternalIsOn] = useState24(initialState);
8059
8287
  useEffect15(() => {
8060
8288
  if (isControlled) {
8061
8289
  setInternalIsOn(controlledIsOn);
@@ -8320,7 +8548,7 @@ var positionStyles = {
8320
8548
 
8321
8549
  // src/components/toast/toast.tsx
8322
8550
  import clsx40 from "clsx";
8323
- import { useEffect as useEffect16, useState as useState23 } from "react";
8551
+ import { useEffect as useEffect16, useState as useState25 } from "react";
8324
8552
  import { FaTimesCircle as FaTimesCircle2, FaCheckCircle as FaCheckCircle2, FaExclamationTriangle as FaExclamationTriangle3, FaInfoCircle as FaInfoCircle2, FaTimes as FaTimes8 } from "react-icons/fa";
8325
8553
  import { jsx as jsx57, jsxs as jsxs43 } from "react/jsx-runtime";
8326
8554
  function ITToast({
@@ -8330,7 +8558,7 @@ function ITToast({
8330
8558
  position = "top-right",
8331
8559
  onClose
8332
8560
  }) {
8333
- const [isVisible, setIsVisible] = useState23(true);
8561
+ const [isVisible, setIsVisible] = useState25(true);
8334
8562
  useEffect16(() => {
8335
8563
  const timer = setTimeout(() => {
8336
8564
  setIsVisible(false);
@@ -8397,10 +8625,11 @@ function ITToast({
8397
8625
  }
8398
8626
 
8399
8627
  // src/components/dropfile/dropfile.tsx
8400
- import { useState as useState24, useEffect as useEffect17, useRef as useRef13 } from "react";
8628
+ import { useState as useState26, useEffect as useEffect17, useRef as useRef13 } from "react";
8401
8629
  import { useDropzone } from "react-dropzone";
8402
8630
  import clsx41 from "clsx";
8403
- import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
8631
+
8632
+ // src/components/dropfile/dropfile.props.ts
8404
8633
  var FileTypeEnum = /* @__PURE__ */ ((FileTypeEnum2) => {
8405
8634
  FileTypeEnum2["PDF"] = "application/pdf";
8406
8635
  FileTypeEnum2["XLS"] = "application/vnd.ms-excel";
@@ -8418,6 +8647,9 @@ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
8418
8647
  UploadStatus2["ERROR"] = "error";
8419
8648
  return UploadStatus2;
8420
8649
  })(UploadStatus || {});
8650
+
8651
+ // src/components/dropfile/dropfile.tsx
8652
+ import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
8421
8653
  var ITDropfile = ({
8422
8654
  onFileSelect,
8423
8655
  onCancel,
@@ -8430,11 +8662,11 @@ var ITDropfile = ({
8430
8662
  onStatusChange,
8431
8663
  initialPreviewUrl
8432
8664
  }) => {
8433
- const [selectedFile, setSelectedFile] = useState24(null);
8434
- const [fileType, setFileType] = useState24(null);
8435
- const [imagePreview, setImagePreview] = useState24(initialPreviewUrl || null);
8436
- const [isConfirmed, setIsConfirmed] = useState24(false);
8437
- const [internalUploadStatus, setInternalUploadStatus] = useState24(
8665
+ const [selectedFile, setSelectedFile] = useState26(null);
8666
+ const [fileType, setFileType] = useState26(null);
8667
+ const [imagePreview, setImagePreview] = useState26(initialPreviewUrl || null);
8668
+ const [isConfirmed, setIsConfirmed] = useState26(false);
8669
+ const [internalUploadStatus, setInternalUploadStatus] = useState26(
8438
8670
  initialPreviewUrl ? "subido" /* UPLOADED */ : "pendiente" /* PENDING */
8439
8671
  );
8440
8672
  const canvasRef = useRef13(null);
@@ -8709,12 +8941,12 @@ var ITDropfile = ({
8709
8941
  var dropfile_default = ITDropfile;
8710
8942
 
8711
8943
  // src/components/layout/layout.tsx
8712
- import { useState as useState26 } from "react";
8944
+ import { useState as useState28 } from "react";
8713
8945
  import clsx42 from "clsx";
8714
8946
 
8715
8947
  // src/components/topbar/topbar.tsx
8716
8948
  import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
8717
- import { useRef as useRef14, useState as useState25 } from "react";
8949
+ import { useRef as useRef14, useState as useState27 } from "react";
8718
8950
  import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
8719
8951
  function ITTopBar({
8720
8952
  logo,
@@ -8725,7 +8957,7 @@ function ITTopBar({
8725
8957
  navItems,
8726
8958
  onNavItemClick
8727
8959
  }) {
8728
- const [isUserMenuOpen, setIsUserMenuOpen] = useState25(false);
8960
+ const [isUserMenuOpen, setIsUserMenuOpen] = useState27(false);
8729
8961
  const userMenuRef = useRef14(null);
8730
8962
  useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
8731
8963
  return /* @__PURE__ */ jsx59(
@@ -8896,8 +9128,13 @@ function ITLayout({
8896
9128
  className = "",
8897
9129
  contentClassName = ""
8898
9130
  }) {
8899
- const [desktopCollapsed, setDesktopCollapsed] = useState26(true);
8900
- const [mobileSidebarOpen, setMobileSidebarOpen] = useState26(false);
9131
+ const [internalCollapsed, setInternalCollapsed] = useState28(true);
9132
+ const [mobileSidebarOpen, setMobileSidebarOpen] = useState28(false);
9133
+ const isControlled = sidebar.isCollapsed !== void 0;
9134
+ const desktopCollapsed = isControlled ? sidebar.isCollapsed : internalCollapsed;
9135
+ const handleToggleCollapse = isControlled ? sidebar.onToggleCollapse ?? (() => {
9136
+ }) : () => setInternalCollapsed((v) => !v);
9137
+ const layoutTokens = theme.layout;
8901
9138
  return /* @__PURE__ */ jsxs46("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
8902
9139
  /* @__PURE__ */ jsx60(
8903
9140
  ITTopBar,
@@ -8907,48 +9144,55 @@ function ITLayout({
8907
9144
  onToggleMobileMenu: () => setMobileSidebarOpen((v) => !v)
8908
9145
  }
8909
9146
  ),
8910
- /* @__PURE__ */ jsxs46("div", { className: "flex flex-1 overflow-hidden relative", style: { backgroundColor: "var(--layout-bg, #f8fafc)" }, children: [
8911
- /* @__PURE__ */ jsxs46("div", { className: "hidden lg:block relative z-40 h-full", children: [
8912
- /* @__PURE__ */ jsx60("div", { className: "w-[88px] h-full flex-shrink-0" }),
8913
- /* @__PURE__ */ jsx60("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx60(
8914
- ITSidebar,
8915
- {
8916
- ...sidebar,
8917
- isCollapsed: desktopCollapsed,
8918
- onToggleCollapse: () => setDesktopCollapsed((v) => !v),
8919
- visibleOnMobile: false,
8920
- className: `h-full drop-shadow-2xl transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] flex-shrink-0`
8921
- }
8922
- ) })
8923
- ] }),
8924
- mobileSidebarOpen && /* @__PURE__ */ jsx60(
8925
- "div",
8926
- {
8927
- className: "lg:hidden fixed inset-0 z-50 transition-opacity duration-300 backdrop-blur-sm bg-black/40",
8928
- onClick: () => setMobileSidebarOpen(false),
8929
- children: /* @__PURE__ */ jsx60(
9147
+ /* @__PURE__ */ jsxs46(
9148
+ "div",
9149
+ {
9150
+ className: "flex flex-1 overflow-hidden relative",
9151
+ style: { backgroundColor: layoutTokens.backgroundColor },
9152
+ children: [
9153
+ /* @__PURE__ */ jsxs46("div", { className: "hidden lg:block relative z-40 h-full", children: [
9154
+ /* @__PURE__ */ jsx60("div", { className: "w-[88px] h-full flex-shrink-0" }),
9155
+ /* @__PURE__ */ jsx60("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx60(
9156
+ ITSidebar,
9157
+ {
9158
+ ...sidebar,
9159
+ isCollapsed: desktopCollapsed,
9160
+ onToggleCollapse: handleToggleCollapse,
9161
+ visibleOnMobile: false,
9162
+ className: "h-full drop-shadow-2xl transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] flex-shrink-0"
9163
+ }
9164
+ ) })
9165
+ ] }),
9166
+ mobileSidebarOpen && /* @__PURE__ */ jsx60(
8930
9167
  "div",
8931
9168
  {
8932
- className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
8933
- onClick: (e) => e.stopPropagation(),
9169
+ className: "lg:hidden fixed inset-0 z-50 transition-opacity duration-300 backdrop-blur-sm bg-black/40",
9170
+ onClick: () => setMobileSidebarOpen(false),
8934
9171
  children: /* @__PURE__ */ jsx60(
8935
- ITSidebar,
9172
+ "div",
8936
9173
  {
8937
- ...sidebar,
8938
- isCollapsed: false,
8939
- visibleOnMobile: true,
8940
- className: "h-full shadow-2xl relative z-[60]",
8941
- onToggleCollapse: () => setMobileSidebarOpen(false),
8942
- onItemClick: () => setMobileSidebarOpen(false),
8943
- onSubItemClick: () => setMobileSidebarOpen(false)
9174
+ className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
9175
+ onClick: (e) => e.stopPropagation(),
9176
+ children: /* @__PURE__ */ jsx60(
9177
+ ITSidebar,
9178
+ {
9179
+ ...sidebar,
9180
+ isCollapsed: false,
9181
+ visibleOnMobile: true,
9182
+ className: "h-full shadow-2xl relative z-[60]",
9183
+ onToggleCollapse: () => setMobileSidebarOpen(false),
9184
+ onItemClick: () => setMobileSidebarOpen(false),
9185
+ onSubItemClick: () => setMobileSidebarOpen(false)
9186
+ }
9187
+ )
8944
9188
  }
8945
9189
  )
8946
9190
  }
8947
- )
8948
- }
8949
- ),
8950
- /* @__PURE__ */ jsx60("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx60("div", { className: clsx42("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) })
8951
- ] })
9191
+ ),
9192
+ /* @__PURE__ */ jsx60("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx60("div", { className: clsx42("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) })
9193
+ ]
9194
+ }
9195
+ )
8952
9196
  ] });
8953
9197
  }
8954
9198
 
@@ -9039,7 +9283,7 @@ function ITLoader({
9039
9283
 
9040
9284
  // src/components/stepper/stepper.tsx
9041
9285
  import clsx43 from "clsx";
9042
- import { useEffect as useEffect18, useRef as useRef15, useState as useState27 } from "react";
9286
+ import { useEffect as useEffect18, useRef as useRef15, useState as useState29 } from "react";
9043
9287
  import { FaChevronLeft as FaChevronLeft4, FaChevronRight as FaChevronRight5, FaCheck as FaCheck4 } from "react-icons/fa";
9044
9288
  import { jsx as jsx62, jsxs as jsxs47 } from "react/jsx-runtime";
9045
9289
  function ITStepper({
@@ -9056,7 +9300,7 @@ function ITStepper({
9056
9300
  maxContentHeight = "400px",
9057
9301
  color = "primary"
9058
9302
  }) {
9059
- const [direction, setDirection] = useState27("next");
9303
+ const [direction, setDirection] = useState29("next");
9060
9304
  const contentRef = useRef15(null);
9061
9305
  const progressRef = useRef15(null);
9062
9306
  const isThemeColor = color in theme.colors;