@axzydev/axzy_ui_system 1.2.7 → 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 (184) hide show
  1. package/dist/index.cjs +576 -398
  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 +1463 -86
  6. package/dist/index.d.ts +1463 -86
  7. package/dist/index.js +597 -417
  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 +19 -0
  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 +29 -2
  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 +27 -0
  90. package/src/components/page/page.doc.mdx +80 -0
  91. package/src/components/page/page.props.ts +21 -0
  92. package/src/components/page/page.tsx +18 -0
  93. package/src/components/page-header/page-header.doc.mdx +54 -0
  94. package/src/components/page-header/page-header.props.ts +9 -0
  95. package/src/components/page-header/page-header.tsx +15 -0
  96. package/src/components/pagination/pagination.doc.mdx +62 -0
  97. package/src/components/pagination/pagination.props.ts +11 -32
  98. package/src/components/pagination/pagination.tsx +17 -0
  99. package/src/components/popover/popover.doc.mdx +53 -0
  100. package/src/components/popover/popover.props.ts +8 -0
  101. package/src/components/popover/popover.tsx +13 -0
  102. package/src/components/progress/progress.doc.mdx +48 -0
  103. package/src/components/progress/progress.props.ts +8 -0
  104. package/src/components/progress/progress.tsx +9 -0
  105. package/src/components/radio/radio.doc.mdx +62 -0
  106. package/src/components/radio/radio.props.ts +11 -0
  107. package/src/components/radio/radio.tsx +18 -0
  108. package/src/components/search-select/search-select.doc.mdx +72 -0
  109. package/src/components/search-select/search-select.props.ts +23 -18
  110. package/src/components/search-select/search-select.tsx +27 -2
  111. package/src/components/searchTable/searchTable.doc.mdx +79 -0
  112. package/src/components/searchTable/searchTable.props.ts +42 -3
  113. package/src/components/searchTable/searchTable.stories.tsx +74 -0
  114. package/src/components/searchTable/searchTable.tsx +23 -0
  115. package/src/components/segmented-control/segmented-control.doc.mdx +60 -0
  116. package/src/components/segmented-control/segmented-control.props.ts +12 -0
  117. package/src/components/segmented-control/segmented-control.tsx +15 -0
  118. package/src/components/select/select.doc.mdx +75 -0
  119. package/src/components/select/select.props.ts +22 -0
  120. package/src/components/select/select.tsx +2 -5
  121. package/src/components/sidebar/sidebar.doc.mdx +86 -0
  122. package/src/components/sidebar/sidebar.props.ts +22 -0
  123. package/src/components/sidebar/sidebar.tsx +22 -0
  124. package/src/components/skeleton/skeleton.doc.mdx +43 -0
  125. package/src/components/skeleton/skeleton.props.ts +8 -0
  126. package/src/components/skeleton/skeleton.tsx +10 -0
  127. package/src/components/slide/slide.doc.mdx +46 -0
  128. package/src/components/slide/slide.props.ts +11 -24
  129. package/src/components/slide/slide.tsx +10 -1
  130. package/src/components/slider/slider.doc.mdx +49 -0
  131. package/src/components/slider/slider.props.ts +9 -0
  132. package/src/components/slider/slider.tsx +15 -0
  133. package/src/components/stack/stack.doc.mdx +126 -0
  134. package/src/components/stack/stack.props.ts +18 -0
  135. package/src/components/stack/stack.stories.tsx +221 -16
  136. package/src/components/stack/stack.tsx +21 -0
  137. package/src/components/stat-card/stat-card.doc.mdx +48 -0
  138. package/src/components/stat-card/stat-card.props.ts +9 -0
  139. package/src/components/stat-card/stat-card.tsx +10 -0
  140. package/src/components/stepper/stepper.doc.mdx +54 -0
  141. package/src/components/stepper/stepper.props.ts +11 -1
  142. package/src/components/stepper/stepper.tsx +15 -0
  143. package/src/components/table/table.doc.mdx +58 -0
  144. package/src/components/table/table.props.ts +17 -0
  145. package/src/components/table/table.tsx +199 -84
  146. package/src/components/tabs/tabs.doc.mdx +52 -0
  147. package/src/components/tabs/tabs.props.ts +11 -0
  148. package/src/components/tabs/tabs.tsx +14 -0
  149. package/src/components/text/text.doc.mdx +41 -0
  150. package/src/components/text/text.props.ts +5 -0
  151. package/src/components/text/text.stories.tsx +67 -0
  152. package/src/components/text/text.tsx +10 -0
  153. package/src/components/textarea/textarea.doc.mdx +64 -0
  154. package/src/components/textarea/textarea.props.ts +11 -0
  155. package/src/components/textarea/textarea.tsx +16 -0
  156. package/src/components/theme-provider/themeProvider.doc.mdx +75 -0
  157. package/src/components/theme-provider/themeProvider.props.ts +3 -0
  158. package/src/components/theme-provider/themeProvider.stories.tsx +59 -0
  159. package/src/components/theme-provider/themeProvider.tsx +14 -0
  160. package/src/components/time-picker/timePicker.doc.mdx +68 -0
  161. package/src/components/time-picker/timePicker.props.ts +14 -0
  162. package/src/components/time-picker/timePicker.tsx +22 -1
  163. package/src/components/toast/toast.doc.mdx +50 -0
  164. package/src/components/toast/toast.props.ts +5 -0
  165. package/src/components/toast/toast.tsx +21 -0
  166. package/src/components/tooltip/tooltip.doc.mdx +47 -0
  167. package/src/components/tooltip/tooltip.props.ts +6 -0
  168. package/src/components/tooltip/tooltip.tsx +19 -0
  169. package/src/components/topbar/topbar.doc.mdx +69 -0
  170. package/src/components/topbar/topbar.props.ts +15 -0
  171. package/src/components/topbar/topbar.tsx +38 -0
  172. package/src/components/triple-filter/tripleFilter.doc.mdx +62 -0
  173. package/src/components/triple-filter/tripleFilter.props.ts +7 -0
  174. package/src/components/triple-filter/tripleFilter.tsx +32 -0
  175. package/src/index.css +2 -0
  176. package/src/showcases/DataShowcases.tsx +529 -45
  177. package/src/showcases/FormShowcases.tsx +399 -29
  178. package/src/showcases/HomeShowcase.tsx +252 -272
  179. package/src/showcases/LayoutPrimitivesShowcases.tsx +1224 -248
  180. package/src/showcases/PageShowcases.tsx +688 -391
  181. package/src/showcases/ShowcaseLayout.tsx +237 -73
  182. package/src/showcases/StructureShowcases.tsx +846 -73
  183. package/src/types/table.types.ts +1 -1
  184. package/src/utils/styles.ts +2 -1
package/dist/index.cjs CHANGED
@@ -440,21 +440,31 @@ var sizeMap = {
440
440
  lg: { container: "w-12 h-12", text: "text-base" },
441
441
  xl: { container: "w-16 h-16", text: "text-xl" }
442
442
  };
443
+ var DEFAULT_COLOR = "bg-primary-600";
444
+ var DEFAULT_BG = "var(--color-primary-600)";
445
+ var DEFAULT_SHADOW = "0 4px 14px 0 rgba(37, 99, 235, 0.35)";
443
446
  function ITAvatar({
444
447
  src,
445
448
  alt = "",
446
449
  initials,
447
450
  size = "md",
448
- color = "bg-primary-500",
451
+ color = DEFAULT_COLOR,
449
452
  className,
450
453
  badge,
451
454
  onClick
452
455
  }) {
453
456
  const { container, text } = sizeMap[size];
457
+ const useInlineStyle = !color || color === DEFAULT_COLOR;
454
458
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
455
459
  "div",
456
460
  {
457
- className: (0, import_clsx2.default)("relative inline-flex items-center justify-center rounded-full flex-shrink-0", container, className),
461
+ className: (0, import_clsx2.default)(
462
+ "relative inline-flex items-center justify-center rounded-full flex-shrink-0 overflow-hidden text-white font-bold tracking-wide",
463
+ container,
464
+ !useInlineStyle && color,
465
+ className
466
+ ),
467
+ style: useInlineStyle ? { backgroundColor: DEFAULT_BG, boxShadow: DEFAULT_SHADOW } : void 0,
458
468
  onClick,
459
469
  role: onClick ? "button" : void 0,
460
470
  tabIndex: onClick ? 0 : void 0,
@@ -469,7 +479,7 @@ function ITAvatar({
469
479
  e.currentTarget.style.display = "none";
470
480
  }
471
481
  }
472
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_clsx2.default)("w-full h-full rounded-full flex items-center justify-center text-white font-semibold", text, color), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ITText, { as: "span", children: initials || alt.charAt(0).toUpperCase() || "?" }) }),
482
+ ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx2.default)("flex items-center justify-center w-full h-full", text), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ITText, { as: "span", className: "text-white", children: initials || alt.charAt(0).toUpperCase() || "?" }) }),
473
483
  badge && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "absolute -bottom-0.5 -right-0.5", children: badge })
474
484
  ]
475
485
  }
@@ -1812,7 +1822,7 @@ function ITConfirmDialog({
1812
1822
  // src/types/table.types.ts
1813
1823
  var variantStyles = {
1814
1824
  default: "",
1815
- striped: "divide-y divide-gray-200",
1825
+ striped: "",
1816
1826
  bordered: "border border-gray-200"
1817
1827
  };
1818
1828
  var sizeStyles = {
@@ -1855,6 +1865,7 @@ function getGridColsClass(columns) {
1855
1865
  return gridColsClasses[columns] || "grid-cols-12";
1856
1866
  }
1857
1867
  function getColSpanClass(span, maxCols) {
1868
+ if (span == null) return `col-span-${maxCols}`;
1858
1869
  if (typeof span === "number") {
1859
1870
  return `col-span-${Math.min(span, maxCols)}`;
1860
1871
  }
@@ -2405,8 +2416,8 @@ function ITSelect({
2405
2416
  borderStyle: "solid",
2406
2417
  transition: "all 0.2s",
2407
2418
  color: "var(--input-text-color, var(--color-secondary-900))",
2408
- appearance: "none"
2409
- // Important for custom styling
2419
+ appearance: "none",
2420
+ colorScheme: "light dark"
2410
2421
  };
2411
2422
  if (disabled) {
2412
2423
  style.backgroundColor = inputTheme.disabled?.backgroundColor || style.backgroundColor;
@@ -2684,8 +2695,13 @@ function ITTable({
2684
2695
  size = "md",
2685
2696
  itemsPerPageOptions = [5, 10, 20],
2686
2697
  defaultItemsPerPage = 10,
2687
- title
2698
+ title,
2699
+ renderCard,
2700
+ defaultView = "table",
2701
+ showVerticalBorder = true,
2702
+ verticalBorderClassname
2688
2703
  }) {
2704
+ const [viewMode, setViewMode] = (0, import_react11.useState)(defaultView);
2689
2705
  const {
2690
2706
  currentPage,
2691
2707
  itemsPerPage,
@@ -2885,25 +2901,91 @@ function ITTable({
2885
2901
  return value;
2886
2902
  }
2887
2903
  };
2904
+ const renderDefaultCard = (row) => {
2905
+ const dataCols = columns.filter((c) => c.type !== "actions");
2906
+ const actionCol = columns.find((c) => c.type === "actions");
2907
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("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: [
2908
+ dataCols.map((col) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
2909
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 whitespace-nowrap flex-shrink-0 min-w-[70px]", children: col.label }),
2910
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
2911
+ ] }, col.key)),
2912
+ actionCol?.actions && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex items-center justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-700", children: actionCol.actions(row) })
2913
+ ] });
2914
+ };
2888
2915
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: (0, import_clsx14.default)("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "rounded-xl shadow-sm overflow-hidden", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
2889
- title && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-6 py-5 border-b border-secondary-100", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }) }),
2890
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2916
+ title && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
2917
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
2918
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("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: [
2919
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2920
+ "button",
2921
+ {
2922
+ onClick: () => setViewMode("table"),
2923
+ 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"}`,
2924
+ children: [
2925
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_fa7.FaTable, { size: 11 }),
2926
+ "Table"
2927
+ ]
2928
+ }
2929
+ ),
2930
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2931
+ "button",
2932
+ {
2933
+ onClick: () => setViewMode("cards"),
2934
+ 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"}`,
2935
+ children: [
2936
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_fa7.FaThLarge, { size: 11 }),
2937
+ "Cards"
2938
+ ]
2939
+ }
2940
+ )
2941
+ ] })
2942
+ ] }),
2943
+ !title && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex justify-end px-4 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("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: [
2944
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2945
+ "button",
2946
+ {
2947
+ onClick: () => setViewMode("table"),
2948
+ 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"}`,
2949
+ children: [
2950
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_fa7.FaTable, { size: 11 }),
2951
+ "Table"
2952
+ ]
2953
+ }
2954
+ ),
2955
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2956
+ "button",
2957
+ {
2958
+ onClick: () => setViewMode("cards"),
2959
+ 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"}`,
2960
+ children: [
2961
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_fa7.FaThLarge, { size: 11 }),
2962
+ "Cards"
2963
+ ]
2964
+ }
2965
+ )
2966
+ ] }) }),
2967
+ viewMode === "cards" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: currentData.length > 0 ? currentData.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { children: renderCard ? renderCard(row) : renderDefaultCard(row) }, i)) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 text-secondary-400", children: [
2968
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
2969
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
2970
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
2891
2971
  "table",
2892
2972
  {
2893
2973
  className: (0, import_clsx14.default)(
2894
2974
  "min-w-max w-full text-sm text-left text-secondary-600",
2975
+ showVerticalBorder && "[&_th]:border-r [&_th:last-child]:border-r-0 [&_td]:border-r [&_td:last-child]:border-r-0",
2976
+ showVerticalBorder && (verticalBorderClassname || "[&_th]:border-slate-100 dark:[&_th]:border-slate-700/30 [&_td]:border-slate-100 dark:[&_td]:border-slate-700/30"),
2895
2977
  variantStyles[variant],
2896
2978
  sizeStyles[size]
2897
2979
  ),
2898
2980
  children: [
2899
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("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__ */ (0, import_jsx_runtime14.jsx)(
2981
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tr", { className: "bg-secondary-50 text-xs uppercase tracking-wider font-semibold text-slate-700 dark:text-slate-200", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2900
2982
  "th",
2901
2983
  {
2902
2984
  scope: "col",
2903
2985
  className: (0, import_clsx14.default)("px-4 py-4 align-top", col.className),
2904
2986
  children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-3 min-w-[150px]", children: [
2905
2987
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
2906
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ITText, { as: "span", className: "text-secondary-700 font-bold", children: col.label }),
2988
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
2907
2989
  col.sortable && col.type !== "actions" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2908
2990
  "button",
2909
2991
  {
@@ -2919,10 +3001,10 @@ function ITTable({
2919
3001
  },
2920
3002
  col.key
2921
3003
  )) }) }),
2922
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tbody", { className: "divide-y divide-secondary-100", children: currentData.length > 0 ? currentData.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3004
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tbody", { className: "divide-y divide-slate-100 dark:divide-slate-700/30", children: currentData.length > 0 ? currentData.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2923
3005
  "tr",
2924
3006
  {
2925
- className: "hover:bg-secondary-50/50 transition-colors duration-150 group",
3007
+ className: (0, import_clsx14.default)("hover:bg-secondary-50/50 transition-colors duration-150 group", variant === "striped" && "odd:bg-secondary-50/40 dark:odd:bg-slate-800/20"),
2926
3008
  children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2927
3009
  "td",
2928
3010
  {
@@ -2940,7 +3022,7 @@ function ITTable({
2940
3022
  ]
2941
3023
  }
2942
3024
  ) }),
2943
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "rounded-b-xl border-t border-secondary-200 px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3025
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2944
3026
  ITPagination,
2945
3027
  {
2946
3028
  currentPage,
@@ -2976,8 +3058,13 @@ function ITDataTable({
2976
3058
  size = "md",
2977
3059
  itemsPerPageOptions = [5, 10, 20],
2978
3060
  defaultItemsPerPage = 10,
2979
- title
3061
+ title,
3062
+ renderCard,
3063
+ defaultView,
3064
+ showVerticalBorder = true,
3065
+ verticalBorderClassname
2980
3066
  }) {
3067
+ const [viewMode, setViewMode] = (0, import_react12.useState)(defaultView || "table");
2981
3068
  const [data, setData] = (0, import_react12.useState)([]);
2982
3069
  const [totalItems, setTotalItems] = (0, import_react12.useState)(0);
2983
3070
  const [isLoading, setIsLoading] = (0, import_react12.useState)(fetchOnMount);
@@ -3121,31 +3208,70 @@ function ITDataTable({
3121
3208
  return value;
3122
3209
  }
3123
3210
  };
3211
+ const renderDefaultCard = (row) => {
3212
+ const dataCols = columns.filter((c) => c.type !== "actions");
3213
+ const actionCol = columns.find((c) => c.type === "actions");
3214
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("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: [
3215
+ dataCols.map((col) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
3216
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 whitespace-nowrap flex-shrink-0 min-w-[70px]", children: col.label }),
3217
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
3218
+ ] }, col.key)),
3219
+ actionCol?.actions && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-700", children: actionCol.actions(row) })
3220
+ ] });
3221
+ };
3222
+ 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"}`;
3124
3223
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_clsx15.default)("space-y-4 w-full relative", containerClassName), children: [
3125
3224
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-xl shadow-sm overflow-hidden", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
3126
- title && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "px-6 py-5 border-b border-secondary-100 flex justify-between items-center", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
3225
+ title && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
3127
3226
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
3128
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-secondary-400", children: loadingIndicator || /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fa8.FaSpinner, { className: "animate-spin text-primary-500 text-xl" }) })
3227
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-3", children: [
3228
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-secondary-400", children: loadingIndicator || /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fa8.FaSpinner, { className: "animate-spin text-primary-500 text-xl" }) }),
3229
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("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: [
3230
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { onClick: () => setViewMode("table"), className: segCtrlClass("table"), children: [
3231
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fa8.FaTable, { size: 11 }),
3232
+ "Table"
3233
+ ] }),
3234
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { onClick: () => setViewMode("cards"), className: segCtrlClass("cards"), children: [
3235
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fa8.FaThLarge, { size: 11 }),
3236
+ "Cards"
3237
+ ] })
3238
+ ] })
3239
+ ] })
3129
3240
  ] }),
3241
+ !title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex justify-end px-4 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("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: [
3242
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { onClick: () => setViewMode("table"), className: segCtrlClass("table"), children: [
3243
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fa8.FaTable, { size: 11 }),
3244
+ "Table"
3245
+ ] }),
3246
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("button", { onClick: () => setViewMode("cards"), className: segCtrlClass("cards"), children: [
3247
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fa8.FaThLarge, { size: 11 }),
3248
+ "Cards"
3249
+ ] })
3250
+ ] }) }),
3130
3251
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "overflow-x-auto relative min-h-[200px]", children: [
3131
3252
  isLoading && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "absolute inset-0 z-20 flex items-center justify-center bg-white/40 backdrop-blur-[2px] transition-all duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("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__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
3132
3253
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_fa8.FaSpinner, { className: "animate-spin text-primary-500 text-4xl" }),
3133
3254
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ITText, { as: "span", className: "text-sm font-semibold text-secondary-600 animate-pulse", children: "Cargando datos..." })
3134
3255
  ] }) }) }),
3135
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3256
+ viewMode === "cards" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: data.length > 0 ? data.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: renderCard ? renderCard(row) : renderDefaultCard(row) }, i)) : !isLoading && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 text-secondary-400", children: [
3257
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
3258
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
3259
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3136
3260
  "table",
3137
3261
  {
3138
3262
  className: (0, import_clsx15.default)(
3139
3263
  "min-w-max w-full text-sm text-left text-secondary-600 transition-opacity duration-300",
3264
+ showVerticalBorder && "[&_th]:border-r [&_th:last-child]:border-r-0 [&_td]:border-r [&_td:last-child]:border-r-0",
3265
+ showVerticalBorder && (verticalBorderClassname || "[&_th]:border-slate-100 dark:[&_th]:border-slate-700/30 [&_td]:border-slate-100 dark:[&_td]:border-slate-700/30"),
3140
3266
  isLoading ? "opacity-50" : "opacity-100",
3141
3267
  variantStyles[variant],
3142
3268
  sizeStyles[size],
3143
3269
  className
3144
3270
  ),
3145
3271
  children: [
3146
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: "bg-white border-b border-secondary-200 text-xs uppercase tracking-wider font-semibold text-secondary-500", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { scope: "col", className: (0, import_clsx15.default)("px-4 py-4 align-top", col.className), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-3 min-w-[150px]", children: [
3272
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: "bg-secondary-50 text-xs uppercase tracking-wider font-semibold text-slate-700 dark:text-slate-200", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { scope: "col", className: (0, import_clsx15.default)("px-4 py-4 align-top", col.className), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-3 min-w-[150px]", children: [
3147
3273
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
3148
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ITText, { as: "span", className: "text-secondary-700 font-bold", children: col.label }),
3274
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
3149
3275
  col.sortable && col.type !== "actions" && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3150
3276
  "button",
3151
3277
  {
@@ -3159,7 +3285,7 @@ function ITDataTable({
3159
3285
  ] }),
3160
3286
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
3161
3287
  ] }) }, col.key)) }) }),
3162
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { className: "divide-y divide-secondary-100", children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: "hover:bg-secondary-50/50 transition-colors duration-150 group", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: (0, import_clsx15.default)("px-4 py-3 align-middle", col.className), children: col.type === "actions" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center gap-2", children: renderCellContent(col, row) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-secondary-700 font-medium", children: renderCellContent(col, row) }) }, `${rowIndex}-${col.key}`)) }, rowIndex)) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { colSpan: columns.length, className: "px-6 py-20 text-center", children: !isLoading && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col items-center justify-center text-secondary-400", children: [
3288
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { className: "divide-y divide-slate-100 dark:divide-slate-700/30", children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: (0, import_clsx15.default)("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__ */ (0, import_jsx_runtime15.jsx)("td", { className: (0, import_clsx15.default)("px-4 py-3 align-middle", col.className), children: col.type === "actions" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center gap-2", children: renderCellContent(col, row) }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-secondary-700 font-medium", children: renderCellContent(col, row) }) }, `${rowIndex}-${col.key}`)) }, rowIndex)) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: !isLoading && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col items-center justify-center text-secondary-400", children: [
3163
3289
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
3164
3290
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
3165
3291
  ] }) }) }) })
@@ -3168,7 +3294,7 @@ function ITDataTable({
3168
3294
  )
3169
3295
  ] })
3170
3296
  ] }),
3171
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "rounded-b-xl border-t border-secondary-200 px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3297
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3172
3298
  ITPagination,
3173
3299
  {
3174
3300
  currentPage,
@@ -3394,7 +3520,7 @@ function ITDatePicker({
3394
3520
  import_fa9.FaCalendarAlt,
3395
3521
  {
3396
3522
  onClick: handleIconClick,
3397
- className: "text-slate-900 cursor-pointer"
3523
+ className: "text-slate-500 dark:text-slate-400 cursor-pointer"
3398
3524
  }
3399
3525
  ) }),
3400
3526
  variant,
@@ -5642,7 +5768,7 @@ function ITFlex({
5642
5768
  }
5643
5769
 
5644
5770
  // src/components/form-builder/formBuilder.tsx
5645
- var import_react22 = require("react");
5771
+ var import_react23 = require("react");
5646
5772
 
5647
5773
  // src/components/form-builder/formBuilder.context.tsx
5648
5774
  var import_react18 = __toESM(require("react"), 1);
@@ -5686,8 +5812,8 @@ var useITFormBuilderContext = () => {
5686
5812
  };
5687
5813
 
5688
5814
  // src/components/form-builder/fieldRenderer.tsx
5689
- var import_react21 = require("react");
5690
- var import_clsx24 = __toESM(require("clsx"), 1);
5815
+ var import_react22 = require("react");
5816
+ var import_clsx25 = __toESM(require("clsx"), 1);
5691
5817
 
5692
5818
  // src/components/time-picker/timePicker.tsx
5693
5819
  var import_clsx23 = __toESM(require("clsx"), 1);
@@ -5849,7 +5975,7 @@ function ITTimePicker({
5849
5975
  },
5850
5976
  className: (0, import_clsx23.default)(
5851
5977
  "cursor-pointer transition-colors",
5852
- disabled ? "text-slate-400 cursor-not-allowed" : "text-slate-900 hover:text-slate-600"
5978
+ disabled ? "text-slate-400 cursor-not-allowed" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"
5853
5979
  )
5854
5980
  }
5855
5981
  )
@@ -5956,27 +6082,204 @@ function ITTimePicker({
5956
6082
  ] });
5957
6083
  }
5958
6084
 
5959
- // src/components/form-builder/useFormBuilder.ts
6085
+ // src/components/search-select/search-select.tsx
5960
6086
  var import_react20 = require("react");
6087
+ var import_clsx24 = __toESM(require("clsx"), 1);
6088
+ var import_fa15 = require("react-icons/fa");
6089
+ var import_jsx_runtime28 = require("react/jsx-runtime");
6090
+ function ITSearchSelect({
6091
+ name,
6092
+ options = [],
6093
+ label,
6094
+ placeholder = "Selecciona una opci\xF3n",
6095
+ valueField = "value",
6096
+ labelField = "label",
6097
+ value,
6098
+ onChange,
6099
+ onBlur,
6100
+ disabled = false,
6101
+ className,
6102
+ touched,
6103
+ required,
6104
+ error,
6105
+ readOnly = false,
6106
+ onSearch,
6107
+ isLoading = false,
6108
+ noResultsMessage = "No se encontraron resultados"
6109
+ }) {
6110
+ const [isOpen, setIsOpen] = (0, import_react20.useState)(false);
6111
+ const [searchTerm, setSearchTerm] = (0, import_react20.useState)("");
6112
+ const [isFocused, setIsFocused] = (0, import_react20.useState)(false);
6113
+ const [localTouched, setLocalTouched] = (0, import_react20.useState)(false);
6114
+ const containerRef = (0, import_react20.useRef)(null);
6115
+ const timeoutRef = (0, import_react20.useRef)(null);
6116
+ const selectedOption = (0, import_react20.useMemo)(() => {
6117
+ return options.find((opt) => opt[valueField] === value);
6118
+ }, [options, value, valueField]);
6119
+ (0, import_react20.useEffect)(() => {
6120
+ if (!isFocused) {
6121
+ setSearchTerm(selectedOption ? String(selectedOption[labelField]) : "");
6122
+ }
6123
+ }, [selectedOption, isFocused, labelField]);
6124
+ (0, import_react20.useEffect)(() => {
6125
+ function handleClickOutside(event) {
6126
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
6127
+ setIsOpen(false);
6128
+ }
6129
+ }
6130
+ document.addEventListener("mousedown", handleClickOutside);
6131
+ return () => document.removeEventListener("mousedown", handleClickOutside);
6132
+ }, []);
6133
+ const filteredOptions = (0, import_react20.useMemo)(() => {
6134
+ if (onSearch) return options;
6135
+ if (!searchTerm || !isFocused) return options;
6136
+ return options.filter(
6137
+ (opt) => String(opt[labelField]).toLowerCase().includes(searchTerm.toLowerCase())
6138
+ );
6139
+ }, [options, searchTerm, onSearch, labelField, isFocused]);
6140
+ const handleInputChange = (e) => {
6141
+ const query = e.target.value;
6142
+ setSearchTerm(query);
6143
+ setIsOpen(true);
6144
+ if (onSearch) {
6145
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
6146
+ timeoutRef.current = setTimeout(() => {
6147
+ onSearch(query);
6148
+ }, 500);
6149
+ }
6150
+ };
6151
+ const handleSelect = (option) => {
6152
+ if (onChange) {
6153
+ onChange(option[valueField], option);
6154
+ }
6155
+ setSearchTerm(String(option[labelField]));
6156
+ setIsOpen(false);
6157
+ };
6158
+ const handleFocus = () => {
6159
+ if (disabled || readOnly) return;
6160
+ setIsFocused(true);
6161
+ setIsOpen(true);
6162
+ };
6163
+ const handleInputBlur = (e) => {
6164
+ setTimeout(() => {
6165
+ setIsFocused(false);
6166
+ setLocalTouched(true);
6167
+ onBlur?.(e);
6168
+ }, 200);
6169
+ };
6170
+ const inputTheme = theme.input || {};
6171
+ const isTouched = touched !== void 0 ? touched : localTouched;
6172
+ const isEmpty = value === void 0 || value === null || String(value).trim() === "";
6173
+ const effectiveError = error !== void 0 && error !== false ? error === true ? "Este campo es requerido" : error : required && isEmpty ? "Este campo es requerido" : void 0;
6174
+ const hasError = isTouched && !!effectiveError;
6175
+ const errorMessage = typeof effectiveError === "string" ? effectiveError : "Este campo es requerido";
6176
+ const getInputStyle = () => {
6177
+ const style = {
6178
+ backgroundColor: inputTheme.backgroundColor || "#ffffff",
6179
+ borderColor: inputTheme.borderColor || "#e2e8f0",
6180
+ borderRadius: inputTheme.borderRadius || "0.5rem",
6181
+ padding: inputTheme.padding || "0.5rem 0.75rem",
6182
+ fontSize: inputTheme.fontSize || "0.875rem",
6183
+ borderWidth: "1px",
6184
+ borderStyle: "solid",
6185
+ transition: "all 0.2s",
6186
+ color: "var(--input-text-color, var(--color-secondary-900))",
6187
+ width: "100%"
6188
+ };
6189
+ if (disabled) {
6190
+ style.backgroundColor = inputTheme.disabled?.backgroundColor || "#f1f5f9";
6191
+ style.borderColor = inputTheme.disabled?.borderColor || "#e2e8f0";
6192
+ style.opacity = 0.7;
6193
+ style.cursor = "not-allowed";
6194
+ }
6195
+ if (hasError) {
6196
+ style.borderColor = inputTheme.error?.borderColor || "red";
6197
+ if (isFocused) {
6198
+ style.boxShadow = inputTheme.error?.ring;
6199
+ }
6200
+ } else if (isFocused && !readOnly) {
6201
+ style.boxShadow = inputTheme.focus?.ring;
6202
+ style.borderColor = inputTheme.focus?.borderColor;
6203
+ }
6204
+ return style;
6205
+ };
6206
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import_clsx24.default)("w-full flex flex-col gap-1.5", className, isOpen && "relative z-30"), ref: containerRef, children: [
6207
+ label && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
6208
+ ITText,
6209
+ {
6210
+ as: "label",
6211
+ className: (0, import_clsx24.default)("text-sm font-medium text-gray-700 dark:text-slate-300", {
6212
+ "text-red-500": hasError
6213
+ }),
6214
+ children: [
6215
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ITText, { as: "span", children: label }),
6216
+ required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ITText, { as: "span", className: "text-red-500 ml-1", children: "*" })
6217
+ ]
6218
+ }
6219
+ ),
6220
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative", children: [
6221
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative flex items-center", children: [
6222
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6223
+ "input",
6224
+ {
6225
+ type: "text",
6226
+ name,
6227
+ value: searchTerm,
6228
+ onChange: handleInputChange,
6229
+ onFocus: handleFocus,
6230
+ onBlur: handleInputBlur,
6231
+ disabled,
6232
+ readOnly,
6233
+ placeholder,
6234
+ className: "outline-none pr-10",
6235
+ style: getInputStyle(),
6236
+ autoComplete: "off"
6237
+ }
6238
+ ),
6239
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "absolute right-3 flex items-center gap-2 text-gray-400 pointer-events-none", children: [
6240
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "animate-spin h-4 w-4 border-2 border-primary-500 border-t-transparent rounded-full" }),
6241
+ !isLoading && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_fa15.FaSearch, { size: 14, className: (0, import_clsx24.default)({ "text-primary-500": isFocused }) })
6242
+ ] })
6243
+ ] }),
6244
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("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__ */ (0, import_jsx_runtime28.jsx)("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6245
+ ITText,
6246
+ {
6247
+ as: "div",
6248
+ onClick: () => handleSelect(option),
6249
+ className: (0, import_clsx24.default)(
6250
+ "px-4 py-2 text-sm cursor-pointer transition-colors",
6251
+ 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"
6252
+ ),
6253
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ITText, { as: "span", children: option[labelField] })
6254
+ },
6255
+ option[valueField]
6256
+ )) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ITText, { as: "div", className: "px-4 py-6 text-sm text-center text-gray-500 italic", children: isLoading ? "Cargando..." : noResultsMessage }) }) })
6257
+ ] }),
6258
+ hasError && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ITText, { as: "p", className: "text-red-500 text-xs mt-1", children: errorMessage })
6259
+ ] });
6260
+ }
6261
+
6262
+ // src/components/form-builder/useFormBuilder.ts
6263
+ var import_react21 = require("react");
5961
6264
  var useFieldRules = (config2, dependentValues) => {
5962
6265
  const { getFieldConfig } = useITFormBuilderContext();
5963
6266
  const fieldConfig = getFieldConfig(config2.name) || config2;
5964
- const isVisible = (0, import_react20.useMemo)(() => {
6267
+ const isVisible = (0, import_react21.useMemo)(() => {
5965
6268
  if (!fieldConfig.renderWhen) return true;
5966
6269
  return fieldConfig.renderWhen(dependentValues);
5967
6270
  }, [fieldConfig.renderWhen, dependentValues]);
5968
- const dynamicProps = (0, import_react20.useMemo)(() => {
6271
+ const dynamicProps = (0, import_react21.useMemo)(() => {
5969
6272
  if (!fieldConfig.dynamicProps) return {};
5970
6273
  return fieldConfig.dynamicProps(dependentValues);
5971
6274
  }, [fieldConfig.dynamicProps, dependentValues]);
5972
- const isRequired = (0, import_react20.useMemo)(() => {
6275
+ const isRequired = (0, import_react21.useMemo)(() => {
5973
6276
  if (typeof dynamicProps.required !== "undefined") return dynamicProps.required;
5974
6277
  if (typeof fieldConfig.required === "function") {
5975
6278
  return fieldConfig.required(dependentValues);
5976
6279
  }
5977
6280
  return fieldConfig.required || false;
5978
6281
  }, [fieldConfig.required, dynamicProps.required, dependentValues]);
5979
- const isDisabled = (0, import_react20.useMemo)(() => {
6282
+ const isDisabled = (0, import_react21.useMemo)(() => {
5980
6283
  if (typeof dynamicProps.disabled !== "undefined") return dynamicProps.disabled;
5981
6284
  if (typeof fieldConfig.disabled === "function") {
5982
6285
  return fieldConfig.disabled(dependentValues);
@@ -5987,7 +6290,24 @@ var useFieldRules = (config2, dependentValues) => {
5987
6290
  };
5988
6291
 
5989
6292
  // src/components/form-builder/fieldRenderer.tsx
5990
- var import_jsx_runtime28 = require("react/jsx-runtime");
6293
+ var import_fa16 = require("react-icons/fa");
6294
+ var import_jsx_runtime29 = require("react/jsx-runtime");
6295
+ function useAsyncOptions(options, depends) {
6296
+ const [resolved, setResolved] = (0, import_react22.useState)([]);
6297
+ const [loading, setLoading] = (0, import_react22.useState)(false);
6298
+ (0, import_react22.useEffect)(() => {
6299
+ if (typeof options === "function") {
6300
+ setLoading(true);
6301
+ options().then((result) => {
6302
+ setResolved(result.map((o) => ({ value: String(o.value), label: o.label })));
6303
+ setLoading(false);
6304
+ });
6305
+ } else if (Array.isArray(options)) {
6306
+ setResolved(options.map((o) => ({ value: String(o.value), label: o.label })));
6307
+ }
6308
+ }, depends);
6309
+ return { options: resolved, loading };
6310
+ }
5991
6311
  var ITFieldRenderer = ({
5992
6312
  config: config2,
5993
6313
  columns = 12,
@@ -6001,7 +6321,7 @@ var ITFieldRenderer = ({
6001
6321
  config2,
6002
6322
  dependentValues
6003
6323
  );
6004
- (0, import_react21.useEffect)(() => {
6324
+ (0, import_react22.useEffect)(() => {
6005
6325
  context.registerField(config2.name, config2);
6006
6326
  return () => {
6007
6327
  context.unregisterField(config2.name);
@@ -6027,7 +6347,8 @@ var ITFieldRenderer = ({
6027
6347
  leftIcon,
6028
6348
  rightIcon
6029
6349
  } = activeConfig;
6030
- const handleChangeWrapper = (0, import_react21.useCallback)(
6350
+ const { options: resolvedOptions, loading: optionsLoading } = useAsyncOptions(options, [options, dependentValues]);
6351
+ const handleChangeWrapper = (0, import_react22.useCallback)(
6031
6352
  async (val) => {
6032
6353
  const finalValue = val?.target ? val.target.value : val;
6033
6354
  await context.setFieldValue(name, finalValue);
@@ -6043,7 +6364,7 @@ var ITFieldRenderer = ({
6043
6364
  case "password":
6044
6365
  case "number":
6045
6366
  case "email":
6046
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6367
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6047
6368
  ITInput,
6048
6369
  {
6049
6370
  type: type === "email" ? "text" : type,
@@ -6068,10 +6389,36 @@ var ITFieldRenderer = ({
6068
6389
  }
6069
6390
  );
6070
6391
  case "select":
6071
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6392
+ if (optionsLoading) {
6393
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2 py-3", children: [
6394
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_fa16.FaSpinner, { className: "animate-spin text-primary-500" }),
6395
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ITText, { as: "span", className: "text-sm text-slate-500", children: "Cargando opciones..." })
6396
+ ] });
6397
+ }
6398
+ if (typeof options === "function") {
6399
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6400
+ ITSearchSelect,
6401
+ {
6402
+ options: resolvedOptions,
6403
+ name,
6404
+ disabled: isDisabled,
6405
+ label: label || "",
6406
+ placeholder,
6407
+ value: value !== void 0 ? value : activeConfig.defaultValue || "",
6408
+ valueField: valueField || "value",
6409
+ labelField: labelField || "label",
6410
+ onChange: (val) => handleChangeWrapper(val),
6411
+ onBlur: context.handleBlur,
6412
+ touched,
6413
+ error,
6414
+ required: isRequired
6415
+ }
6416
+ );
6417
+ }
6418
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6072
6419
  ITSelect,
6073
6420
  {
6074
- options: Array.isArray(options) ? options : [],
6421
+ options: resolvedOptions,
6075
6422
  name,
6076
6423
  disabled: isDisabled,
6077
6424
  label: label || "",
@@ -6087,7 +6434,7 @@ var ITFieldRenderer = ({
6087
6434
  }
6088
6435
  );
6089
6436
  case "date":
6090
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6437
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6091
6438
  ITDatePicker,
6092
6439
  {
6093
6440
  name,
@@ -6103,7 +6450,7 @@ var ITFieldRenderer = ({
6103
6450
  }
6104
6451
  );
6105
6452
  case "time":
6106
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6453
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6107
6454
  ITTimePicker,
6108
6455
  {
6109
6456
  name,
@@ -6121,7 +6468,7 @@ var ITFieldRenderer = ({
6121
6468
  case "custom":
6122
6469
  if (activeConfig.component) {
6123
6470
  const CustomComponent = activeConfig.component;
6124
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6471
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6125
6472
  CustomComponent,
6126
6473
  {
6127
6474
  ...activeConfig,
@@ -6136,9 +6483,9 @@ var ITFieldRenderer = ({
6136
6483
  }
6137
6484
  return null;
6138
6485
  case "section":
6139
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import_clsx24.default)("w-full col-span-full", activeConfig.className), children: [
6140
- label && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ITText, { as: "h4", className: "text-lg font-semibold text-gray-800 mb-4", children: label }),
6141
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx24.default)("grid gap-y-6 gap-x-5", getGridColsClass(columns)), children: activeConfig.fields?.map((childConfig) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6486
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: (0, import_clsx25.default)("w-full col-span-full", activeConfig.className), children: [
6487
+ label && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ITText, { as: "h4", className: "text-lg font-semibold text-gray-800 mb-4", children: label }),
6488
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: (0, import_clsx25.default)("grid gap-y-6 gap-x-5", getGridColsClass(columns)), children: activeConfig.fields?.map((childConfig) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6142
6489
  ITFieldRenderer,
6143
6490
  {
6144
6491
  config: childConfig,
@@ -6148,7 +6495,7 @@ var ITFieldRenderer = ({
6148
6495
  )) })
6149
6496
  ] });
6150
6497
  case "array":
6151
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "p-4 border-2 border-dashed border-gray-200 rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ITText, { as: "p", className: "text-sm text-gray-500 text-center", children: [
6498
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "p-4 border-2 border-dashed border-gray-200 rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(ITText, { as: "p", className: "text-sm text-gray-500 text-center", children: [
6152
6499
  "Array Field: ",
6153
6500
  label
6154
6501
  ] }) });
@@ -6156,12 +6503,12 @@ var ITFieldRenderer = ({
6156
6503
  return null;
6157
6504
  }
6158
6505
  };
6159
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: (0, import_clsx24.default)(getColSpanClass(activeConfig.column, columns), activeConfig.className), children: renderField() });
6506
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: (0, import_clsx25.default)(getColSpanClass(activeConfig.column, columns), activeConfig.className), children: renderField() });
6160
6507
  };
6161
- var fieldRenderer_default = (0, import_react21.memo)(ITFieldRenderer);
6508
+ var fieldRenderer_default = (0, import_react22.memo)(ITFieldRenderer);
6162
6509
 
6163
6510
  // src/components/form-builder/formBuilder.tsx
6164
- var import_jsx_runtime29 = require("react/jsx-runtime");
6511
+ var import_jsx_runtime30 = require("react/jsx-runtime");
6165
6512
  function buildDependentValues(dependsOn, values) {
6166
6513
  if (!dependsOn || dependsOn.length === 0) return {};
6167
6514
  const deps = {};
@@ -6185,11 +6532,11 @@ function ITFormBuilder({
6185
6532
  },
6186
6533
  isSubmitting = false
6187
6534
  }) {
6188
- const [mounted, setMounted] = (0, import_react22.useState)(false);
6189
- (0, import_react22.useEffect)(() => {
6535
+ const [mounted, setMounted] = (0, import_react23.useState)(false);
6536
+ (0, import_react23.useEffect)(() => {
6190
6537
  setMounted(true);
6191
6538
  }, []);
6192
- const providerValue = (0, import_react22.useMemo)(() => ({
6539
+ const providerValue = (0, import_react23.useMemo)(() => ({
6193
6540
  config: config2 || [],
6194
6541
  values: values || {},
6195
6542
  errors: errors || {},
@@ -6205,7 +6552,7 @@ function ITFormBuilder({
6205
6552
  submitCount: 0
6206
6553
  }), [config2, values, errors, touched, handleChange, handleBlur, setFieldValue, setFieldTouched, setFieldError, isSubmitting]);
6207
6554
  if (config2) {
6208
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ITFormBuilderProvider, { value: providerValue, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: formGrid(columns), children: config2.map((fieldConfig) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6555
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ITFormBuilderProvider, { value: providerValue, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: formGrid(columns), children: config2.map((fieldConfig) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6209
6556
  fieldRenderer_default,
6210
6557
  {
6211
6558
  config: fieldConfig,
@@ -6218,7 +6565,7 @@ function ITFormBuilder({
6218
6565
  fieldConfig.name
6219
6566
  )) }) });
6220
6567
  }
6221
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: formGrid(columns), children: fields?.map(({
6568
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: formGrid(columns), children: fields?.map(({
6222
6569
  name,
6223
6570
  label,
6224
6571
  type = "text",
@@ -6233,12 +6580,12 @@ function ITFormBuilder({
6233
6580
  formatNumber = true,
6234
6581
  onChangeAction,
6235
6582
  ...props
6236
- }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: getColSpanClass(column, columns), children: (() => {
6583
+ }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: getColSpanClass(column, columns), children: (() => {
6237
6584
  switch (type) {
6238
6585
  case "text":
6239
6586
  case "number":
6240
6587
  case "password":
6241
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6588
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6242
6589
  ITInput,
6243
6590
  {
6244
6591
  type,
@@ -6268,7 +6615,7 @@ function ITFormBuilder({
6268
6615
  }
6269
6616
  );
6270
6617
  case "select":
6271
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6618
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6272
6619
  ITSelect,
6273
6620
  {
6274
6621
  options: options || [],
@@ -6292,7 +6639,7 @@ function ITFormBuilder({
6292
6639
  }
6293
6640
  );
6294
6641
  case "date":
6295
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6642
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6296
6643
  ITDatePicker,
6297
6644
  {
6298
6645
  name,
@@ -6319,8 +6666,8 @@ function ITFormBuilder({
6319
6666
  }
6320
6667
 
6321
6668
  // src/components/grid/grid.tsx
6322
- var import_clsx25 = __toESM(require("clsx"), 1);
6323
- var import_jsx_runtime30 = require("react/jsx-runtime");
6669
+ var import_clsx26 = __toESM(require("clsx"), 1);
6670
+ var import_jsx_runtime31 = require("react/jsx-runtime");
6324
6671
  function colSpanClass(span, cols) {
6325
6672
  if (span === void 0) return void 0;
6326
6673
  const clamped = Math.min(Math.max(Math.round(span), 1), cols);
@@ -6351,10 +6698,10 @@ function ITGrid({
6351
6698
  as: Component = "div"
6352
6699
  }) {
6353
6700
  if (container) {
6354
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6701
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
6355
6702
  Component,
6356
6703
  {
6357
- className: (0, import_clsx25.default)("grid", gridColsClass(columns), className),
6704
+ className: (0, import_clsx26.default)("grid", gridColsClass(columns), className),
6358
6705
  style: {
6359
6706
  gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
6360
6707
  ...style
@@ -6364,10 +6711,10 @@ function ITGrid({
6364
6711
  );
6365
6712
  }
6366
6713
  if (item) {
6367
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6714
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
6368
6715
  Component,
6369
6716
  {
6370
- className: (0, import_clsx25.default)(
6717
+ className: (0, import_clsx26.default)(
6371
6718
  "col-span-full",
6372
6719
  colSpanClass(xs ?? sm, columns),
6373
6720
  sm !== void 0 && breakpointSpan(sm, "sm", columns),
@@ -6381,34 +6728,34 @@ function ITGrid({
6381
6728
  }
6382
6729
  );
6383
6730
  }
6384
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Component, { className, style, children });
6731
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Component, { className, style, children });
6385
6732
  }
6386
6733
 
6387
6734
  // src/components/image/image.tsx
6388
- var import_react23 = require("react");
6389
- var import_jsx_runtime31 = require("react/jsx-runtime");
6735
+ var import_react24 = require("react");
6736
+ var import_jsx_runtime32 = require("react/jsx-runtime");
6390
6737
  var ITImage = ({
6391
6738
  src,
6392
6739
  alt,
6393
6740
  className = "",
6394
6741
  fallback = ""
6395
6742
  }) => {
6396
- const [imageError, setImageError] = (0, import_react23.useState)(false);
6743
+ const [imageError, setImageError] = (0, import_react24.useState)(false);
6397
6744
  const handleImageError = () => {
6398
6745
  setImageError(true);
6399
6746
  };
6400
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
6747
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6401
6748
  "div",
6402
6749
  {
6403
6750
  className: `${className} flex items-center justify-center bg-transparent`,
6404
- children: imageError ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
6751
+ children: imageError ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6405
6752
  "img",
6406
6753
  {
6407
6754
  src: fallback,
6408
6755
  alt: "Fallback",
6409
6756
  className: "w-full h-full object-cover"
6410
6757
  }
6411
- ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
6758
+ ) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6412
6759
  "img",
6413
6760
  {
6414
6761
  src,
@@ -6423,9 +6770,9 @@ var ITImage = ({
6423
6770
  var image_default = ITImage;
6424
6771
 
6425
6772
  // src/components/navbar/navbar.tsx
6426
- var import_react24 = require("react");
6427
- var import_fa15 = require("react-icons/fa");
6428
- var import_jsx_runtime32 = require("react/jsx-runtime");
6773
+ var import_react25 = require("react");
6774
+ var import_fa17 = require("react-icons/fa");
6775
+ var import_jsx_runtime33 = require("react/jsx-runtime");
6429
6776
  function ITNavbar({
6430
6777
  logo,
6431
6778
  logoText,
@@ -6438,9 +6785,9 @@ function ITNavbar({
6438
6785
  showSidebarOnMobile = false,
6439
6786
  sidebarItems
6440
6787
  }) {
6441
- const [isUserMenuOpen, setIsUserMenuOpen] = (0, import_react24.useState)(false);
6442
- const [expandedItems, setExpandedItems] = (0, import_react24.useState)(/* @__PURE__ */ new Set());
6443
- const userMenuRef = (0, import_react24.useRef)(null);
6788
+ const [isUserMenuOpen, setIsUserMenuOpen] = (0, import_react25.useState)(false);
6789
+ const [expandedItems, setExpandedItems] = (0, import_react25.useState)(/* @__PURE__ */ new Set());
6790
+ const userMenuRef = (0, import_react25.useRef)(null);
6444
6791
  useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
6445
6792
  const toggleUserMenu = () => {
6446
6793
  setIsUserMenuOpen(!isUserMenuOpen);
@@ -6463,42 +6810,42 @@ function ITNavbar({
6463
6810
  };
6464
6811
  const shouldUseLegacy = !navigationItems.length && (navItems || sidebarItems);
6465
6812
  if (shouldUseLegacy) {
6466
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col h-screen", children: [
6467
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("nav", { className: "bg-white border-b border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center justify-between mx-auto p-4", children: [
6468
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
6469
- logo && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-8", children: logo }),
6470
- logoText && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-gray-900", children: logoText })
6813
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col h-screen", children: [
6814
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("nav", { className: "bg-white border-b border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between mx-auto p-4", children: [
6815
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
6816
+ logo && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-8", children: logo }),
6817
+ logoText && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-gray-900", children: logoText })
6471
6818
  ] }),
6472
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex items-center justify-end w-full md:w-auto md:order-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center space-x-4 md:order-2", children: [
6473
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "hidden md:flex space-x-4", children: navItems }),
6474
- userMenu && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative", children: [
6475
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6819
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center justify-end w-full md:w-auto md:order-2", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center space-x-4 md:order-2", children: [
6820
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "hidden md:flex space-x-4", children: navItems }),
6821
+ userMenu && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
6822
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
6476
6823
  "button",
6477
6824
  {
6478
6825
  type: "button",
6479
6826
  className: "flex text-sm bg-gray-200 rounded-full md:me-0 focus:ring-4 focus:ring-gray-300",
6480
6827
  onClick: toggleUserMenu,
6481
- children: userMenu.userImage ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6828
+ children: userMenu.userImage ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
6482
6829
  "img",
6483
6830
  {
6484
6831
  className: "w-8 h-8 rounded-full",
6485
6832
  src: userMenu.userImage,
6486
6833
  alt: "user photo"
6487
6834
  }
6488
- ) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_fa15.FaUserCircle, { className: "w-8 h-8 text-gray-500" })
6835
+ ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_fa17.FaUserCircle, { className: "w-8 h-8 text-gray-500" })
6489
6836
  }
6490
6837
  ),
6491
- isUserMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
6838
+ isUserMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
6492
6839
  "div",
6493
6840
  {
6494
6841
  ref: userMenuRef,
6495
6842
  className: "z-50 absolute right-0 mt-2 text-base list-none bg-white divide-y divide-gray-100 rounded-lg shadow-sm",
6496
6843
  children: [
6497
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "px-4 py-3", children: [
6498
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", className: "block text-sm text-gray-900", children: userMenu.userName }),
6499
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", className: "block text-sm text-gray-500 truncate", children: userMenu.userEmail })
6844
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "px-4 py-3", children: [
6845
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", className: "block text-sm text-gray-900", children: userMenu.userName }),
6846
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", className: "block text-sm text-gray-500 truncate", children: userMenu.userEmail })
6500
6847
  ] }),
6501
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6848
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
6502
6849
  "button",
6503
6850
  {
6504
6851
  onClick: () => {
@@ -6506,7 +6853,7 @@ function ITNavbar({
6506
6853
  setIsUserMenuOpen(false);
6507
6854
  },
6508
6855
  className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full text-left",
6509
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", children: item.label })
6856
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", children: item.label })
6510
6857
  }
6511
6858
  ) }, index)) })
6512
6859
  ]
@@ -6515,27 +6862,27 @@ function ITNavbar({
6515
6862
  ] })
6516
6863
  ] }) })
6517
6864
  ] }) }),
6518
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex-1 flex overflow-hidden relative", children: [
6519
- (showSidebar || showSidebarOnMobile) && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("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__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-full overflow-y-auto py-4 px-3", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "space-y-2 font-medium", children: sidebarItems }) }) }),
6520
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("main", { className: "flex-1 bg-gray-100 overflow-y-auto", children })
6865
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex-1 flex overflow-hidden relative", children: [
6866
+ (showSidebar || showSidebarOnMobile) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("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__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-full overflow-y-auto py-4 px-3", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "space-y-2 font-medium", children: sidebarItems }) }) }),
6867
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("main", { className: "flex-1 bg-gray-100 overflow-y-auto", children })
6521
6868
  ] })
6522
6869
  ] });
6523
6870
  }
6524
6871
  const sidebar = theme.sidebar;
6525
6872
  const topbar = theme.topbar;
6526
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex h-screen font-sans", style: { backgroundColor: theme.layout.backgroundColor }, children: [
6527
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
6873
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex h-screen font-sans", style: { backgroundColor: theme.layout.backgroundColor }, children: [
6874
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
6528
6875
  "aside",
6529
6876
  {
6530
6877
  className: "w-72 shadow-xl flex flex-col transition-all duration-300 ease-in-out",
6531
6878
  style: { backgroundColor: sidebar.backgroundColor, borderRight: `1px solid ${sidebar.borderColor}` },
6532
6879
  children: [
6533
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: `1px solid ${sidebar.borderColor}` }, children: [
6534
- logo && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
6535
- logoText && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: sidebar.active.color }, children: logoText })
6880
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: `1px solid ${sidebar.borderColor}` }, children: [
6881
+ logo && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
6882
+ logoText && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: sidebar.active.color }, children: logoText })
6536
6883
  ] }),
6537
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("nav", { className: "flex-1 px-4 py-6 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "flex flex-col gap-1.5", children: navigationItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("li", { children: [
6538
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
6884
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("nav", { className: "flex-1 px-4 py-6 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "flex flex-col gap-1.5", children: navigationItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("li", { children: [
6885
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
6539
6886
  "div",
6540
6887
  {
6541
6888
  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"}`,
@@ -6558,17 +6905,17 @@ function ITNavbar({
6558
6905
  }
6559
6906
  },
6560
6907
  children: [
6561
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-3", children: [
6562
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "text-xl transition-colors", style: {
6908
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-3", children: [
6909
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-xl transition-colors", style: {
6563
6910
  color: item.isActive ? sidebar.active.iconColor : sidebar.icon.color
6564
6911
  }, children: item.icon }),
6565
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
6912
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
6566
6913
  ] }),
6567
- item.subitems && item.subitems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "transition-transform", style: { color: sidebar.icon.color }, children: expandedItems.has(item.id) ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_fa15.FaChevronDown, { className: "w-3 h-3" }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_fa15.FaChevronRight, { className: "w-3 h-3" }) })
6914
+ item.subitems && item.subitems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "transition-transform", style: { color: sidebar.icon.color }, children: expandedItems.has(item.id) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_fa17.FaChevronDown, { className: "w-3 h-3" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_fa17.FaChevronRight, { className: "w-3 h-3" }) })
6568
6915
  ]
6569
6916
  }
6570
6917
  ),
6571
- item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "mt-1 ml-4 pl-4 space-y-1", style: { borderLeft: `1px solid ${sidebar.borderColor}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6918
+ item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "mt-1 ml-4 pl-4 space-y-1", style: { borderLeft: `1px solid ${sidebar.borderColor}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
6572
6919
  "button",
6573
6920
  {
6574
6921
  onClick: subitem.action,
@@ -6587,12 +6934,12 @@ function ITNavbar({
6587
6934
  e.currentTarget.style.backgroundColor = "transparent";
6588
6935
  }
6589
6936
  },
6590
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", children: subitem.label })
6937
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", children: subitem.label })
6591
6938
  }
6592
6939
  ) }, subitem.id)) })
6593
6940
  ] }, item.id)) }) }),
6594
- userMenu && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "p-4", style: { borderTop: `1px solid ${sidebar.borderColor}` }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative", children: [
6595
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
6941
+ userMenu && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "p-4", style: { borderTop: `1px solid ${sidebar.borderColor}` }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
6942
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
6596
6943
  "button",
6597
6944
  {
6598
6945
  type: "button",
@@ -6608,7 +6955,7 @@ function ITNavbar({
6608
6955
  },
6609
6956
  onClick: toggleUserMenu,
6610
6957
  children: [
6611
- userMenu.userImage ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6958
+ userMenu.userImage ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
6612
6959
  "img",
6613
6960
  {
6614
6961
  className: "w-10 h-10 rounded-full border-2 transition-colors",
@@ -6616,34 +6963,34 @@ function ITNavbar({
6616
6963
  alt: "user photo",
6617
6964
  style: { borderColor: sidebar.borderColor }
6618
6965
  }
6619
- ) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6966
+ ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
6620
6967
  "div",
6621
6968
  {
6622
6969
  className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors",
6623
6970
  style: { backgroundColor: sidebar.hover.backgroundColor, color: sidebar.icon.color },
6624
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_fa15.FaUserCircle, { className: "w-6 h-6" })
6971
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_fa17.FaUserCircle, { className: "w-6 h-6" })
6625
6972
  }
6626
6973
  ),
6627
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex-1 text-left overflow-hidden", children: [
6628
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: sidebar.active.color }, children: userMenu.userName }),
6629
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "div", className: "text-xs truncate", style: { color: sidebar.label.color }, children: userMenu.userEmail })
6974
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex-1 text-left overflow-hidden", children: [
6975
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: sidebar.active.color }, children: userMenu.userName }),
6976
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "div", className: "text-xs truncate", style: { color: sidebar.label.color }, children: userMenu.userEmail })
6630
6977
  ] }),
6631
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_fa15.FaChevronRight, { className: "w-3 h-3", style: { color: sidebar.icon.color } })
6978
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_fa17.FaChevronRight, { className: "w-3 h-3", style: { color: sidebar.icon.color } })
6632
6979
  ]
6633
6980
  }
6634
6981
  ),
6635
- isUserMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
6982
+ isUserMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
6636
6983
  "div",
6637
6984
  {
6638
6985
  ref: userMenuRef,
6639
6986
  className: "absolute bottom-full left-0 mb-3 w-full rounded-xl shadow-2xl overflow-hidden transform transition-all duration-200 origin-bottom",
6640
6987
  style: { backgroundColor: topbar.userMenu.dropdown.backgroundColor, border: `1px solid ${topbar.userMenu.dropdown.borderColor}` },
6641
6988
  children: [
6642
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "px-4 py-3", style: { backgroundColor: topbar.userMenu.backgroundColor, borderBottom: `1px solid ${topbar.userMenu.dropdown.borderColor}` }, children: [
6643
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: topbar.userMenu.textColor }, children: userMenu.userName }),
6644
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", className: "block text-xs truncate", style: { color: topbar.userMenu.subtitleColor }, children: userMenu.userEmail })
6989
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "px-4 py-3", style: { backgroundColor: topbar.userMenu.backgroundColor, borderBottom: `1px solid ${topbar.userMenu.dropdown.borderColor}` }, children: [
6990
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: topbar.userMenu.textColor }, children: userMenu.userName }),
6991
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", className: "block text-xs truncate", style: { color: topbar.userMenu.subtitleColor }, children: userMenu.userEmail })
6645
6992
  ] }),
6646
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
6993
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
6647
6994
  "button",
6648
6995
  {
6649
6996
  onClick: () => {
@@ -6658,7 +7005,7 @@ function ITNavbar({
6658
7005
  onMouseLeave: (e) => {
6659
7006
  e.currentTarget.style.backgroundColor = "transparent";
6660
7007
  },
6661
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ITText, { as: "span", children: item.label })
7008
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITText, { as: "span", children: item.label })
6662
7009
  }
6663
7010
  ) }, index)) })
6664
7011
  ]
@@ -6668,16 +7015,16 @@ function ITNavbar({
6668
7015
  ]
6669
7016
  }
6670
7017
  ),
6671
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: theme.layout.backgroundColor }, children })
7018
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: theme.layout.backgroundColor }, children })
6672
7019
  ] });
6673
7020
  }
6674
7021
 
6675
7022
  // src/components/page/page.tsx
6676
- var import_clsx28 = __toESM(require("clsx"), 1);
7023
+ var import_clsx29 = __toESM(require("clsx"), 1);
6677
7024
 
6678
7025
  // src/components/page-header/page-header.tsx
6679
- var import_fa16 = require("react-icons/fa");
6680
- var import_jsx_runtime33 = require("react/jsx-runtime");
7026
+ var import_fa18 = require("react-icons/fa");
7027
+ var import_jsx_runtime34 = require("react/jsx-runtime");
6681
7028
  function ITPageHeader({
6682
7029
  title,
6683
7030
  description,
@@ -6689,25 +7036,25 @@ function ITPageHeader({
6689
7036
  className
6690
7037
  }) {
6691
7038
  const showTopRow = breadcrumbs?.length || backAction;
6692
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: `${className} space-y-3`, children: [
6693
- showTopRow && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
6694
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
6695
- backAction && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7039
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: `${className} space-y-3`, children: [
7040
+ showTopRow && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7041
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
7042
+ backAction && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6696
7043
  "button",
6697
7044
  {
6698
7045
  onClick: backAction,
6699
7046
  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",
6700
7047
  "aria-label": "Volver",
6701
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_fa16.FaChevronLeft, { size: 14 })
7048
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_fa18.FaChevronLeft, { size: 14 })
6702
7049
  }
6703
7050
  ),
6704
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ITBreadcrumbs, { items: breadcrumbs })
7051
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ITBreadcrumbs, { items: breadcrumbs })
6705
7052
  ] }),
6706
- actions && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
7053
+ actions && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
6707
7054
  ] }),
6708
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-start justify-between gap-6", children: [
6709
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-start gap-4 min-w-0", children: [
6710
- icon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7055
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start justify-between gap-6", children: [
7056
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start gap-4 min-w-0", children: [
7057
+ icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6711
7058
  "div",
6712
7059
  {
6713
7060
  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",
@@ -6715,8 +7062,8 @@ function ITPageHeader({
6715
7062
  children: icon
6716
7063
  }
6717
7064
  ),
6718
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "min-w-0", children: [
6719
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7065
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0", children: [
7066
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6720
7067
  ITText,
6721
7068
  {
6722
7069
  as: "h1",
@@ -6724,7 +7071,7 @@ function ITPageHeader({
6724
7071
  children: title
6725
7072
  }
6726
7073
  ),
6727
- description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
7074
+ description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
6728
7075
  ITText,
6729
7076
  {
6730
7077
  as: "p",
@@ -6734,14 +7081,14 @@ function ITPageHeader({
6734
7081
  )
6735
7082
  ] })
6736
7083
  ] }),
6737
- !showTopRow && actions && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
7084
+ !showTopRow && actions && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
6738
7085
  ] })
6739
7086
  ] });
6740
7087
  }
6741
7088
 
6742
7089
  // src/components/skeleton/skeleton.tsx
6743
- var import_clsx26 = __toESM(require("clsx"), 1);
6744
- var import_jsx_runtime34 = require("react/jsx-runtime");
7090
+ var import_clsx27 = __toESM(require("clsx"), 1);
7091
+ var import_jsx_runtime35 = require("react/jsx-runtime");
6745
7092
  var variantClasses = {
6746
7093
  text: "rounded-md h-4 w-full",
6747
7094
  circular: "rounded-full",
@@ -6761,10 +7108,10 @@ function ITSkeleton({
6761
7108
  ...style
6762
7109
  };
6763
7110
  const items = Array.from({ length: count }, (_, i) => i);
6764
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: items.map((i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
7111
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: items.map((i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
6765
7112
  "div",
6766
7113
  {
6767
- className: (0, import_clsx26.default)(
7114
+ className: (0, import_clsx27.default)(
6768
7115
  "animate-pulse bg-slate-200 dark:bg-slate-700",
6769
7116
  variantClasses[variant],
6770
7117
  variant === "text" && count > 1 && i < count - 1 && "mb-2",
@@ -6780,9 +7127,9 @@ function ITSkeleton({
6780
7127
  }
6781
7128
 
6782
7129
  // src/components/stack/stack.tsx
6783
- var import_clsx27 = __toESM(require("clsx"), 1);
6784
- var import_react25 = require("react");
6785
- var import_jsx_runtime35 = require("react/jsx-runtime");
7130
+ var import_clsx28 = __toESM(require("clsx"), 1);
7131
+ var import_react26 = require("react");
7132
+ var import_jsx_runtime36 = require("react/jsx-runtime");
6786
7133
  var directionMap2 = {
6787
7134
  row: "flex-row",
6788
7135
  column: "flex-col",
@@ -6822,15 +7169,15 @@ function ITStack({
6822
7169
  as: Component = "div"
6823
7170
  }) {
6824
7171
  const hasDivider = divider !== void 0;
6825
- const items = import_react25.Children.toArray(children);
7172
+ const items = import_react26.Children.toArray(children);
6826
7173
  const resolvedStyle = {
6827
7174
  gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
6828
7175
  ...style
6829
7176
  };
6830
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
7177
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
6831
7178
  Component,
6832
7179
  {
6833
- className: (0, import_clsx27.default)(
7180
+ className: (0, import_clsx28.default)(
6834
7181
  "flex",
6835
7182
  directionMap2[direction],
6836
7183
  alignItems && alignMap2[alignItems],
@@ -6839,20 +7186,20 @@ function ITStack({
6839
7186
  className
6840
7187
  ),
6841
7188
  style: resolvedStyle,
6842
- children: hasDivider ? items.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react25.Fragment, { children: [
7189
+ children: hasDivider ? items.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react26.Fragment, { children: [
6843
7190
  child,
6844
- index < items.length - 1 && (0, import_react25.isValidElement)(divider) ? (0, import_react25.cloneElement)(divider, { key: `divider-${index}` }) : null
7191
+ index < items.length - 1 && (0, import_react26.isValidElement)(divider) ? (0, import_react26.cloneElement)(divider, { key: `divider-${index}` }) : null
6845
7192
  ] }, index)) : children
6846
7193
  }
6847
7194
  );
6848
7195
  }
6849
7196
 
6850
7197
  // src/components/page/page.tsx
6851
- var import_jsx_runtime36 = require("react/jsx-runtime");
7198
+ var import_jsx_runtime37 = require("react/jsx-runtime");
6852
7199
  var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction || props.icon);
6853
7200
  var renderHeader = (props) => {
6854
7201
  if (!hasHeader(props)) return null;
6855
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7202
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6856
7203
  ITPageHeader,
6857
7204
  {
6858
7205
  title: props.title || "",
@@ -6881,7 +7228,7 @@ function ITPage(props) {
6881
7228
  maxWidth = "7xl",
6882
7229
  noPadding = false
6883
7230
  } = props;
6884
- const wrapperClass = (0, import_clsx28.default)(
7231
+ const wrapperClass = (0, import_clsx29.default)(
6885
7232
  "mx-auto w-full",
6886
7233
  !noPadding && "px-4 sm:px-6 lg:px-8 py-6",
6887
7234
  `max-w-${maxWidth}`,
@@ -6889,24 +7236,24 @@ function ITPage(props) {
6889
7236
  className
6890
7237
  );
6891
7238
  if (loading) {
6892
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: wrapperClass, children: [
7239
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: wrapperClass, children: [
6893
7240
  renderHeader(props),
6894
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(ITStack, { spacing: 6, children: [
6895
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ITSkeleton, { variant: "rectangular", height: 40, width: "40%", className: "rounded-lg" }),
6896
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" }),
6897
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" })
7241
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(ITStack, { spacing: 6, children: [
7242
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITSkeleton, { variant: "rectangular", height: 40, width: "40%", className: "rounded-lg" }),
7243
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" }),
7244
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" })
6898
7245
  ] })
6899
7246
  ] });
6900
7247
  }
6901
7248
  if (error) {
6902
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: wrapperClass, children: [
7249
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: wrapperClass, children: [
6903
7250
  renderHeader(props),
6904
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7251
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6905
7252
  ITEmptyState,
6906
7253
  {
6907
7254
  title: errorTitle || "Error",
6908
7255
  description: error,
6909
- action: onRetry ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7256
+ action: onRetry ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6910
7257
  ITButton,
6911
7258
  {
6912
7259
  label: errorActionLabel || "Reintentar",
@@ -6919,9 +7266,9 @@ function ITPage(props) {
6919
7266
  ] });
6920
7267
  }
6921
7268
  if (empty) {
6922
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: wrapperClass, children: [
7269
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: wrapperClass, children: [
6923
7270
  renderHeader(props),
6924
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
7271
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6925
7272
  ITEmptyState,
6926
7273
  {
6927
7274
  title: emptyTitle || "Sin datos",
@@ -6931,16 +7278,16 @@ function ITPage(props) {
6931
7278
  )
6932
7279
  ] });
6933
7280
  }
6934
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: wrapperClass, children: [
7281
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: wrapperClass, children: [
6935
7282
  renderHeader(props),
6936
7283
  children
6937
7284
  ] });
6938
7285
  }
6939
7286
 
6940
7287
  // src/components/popover/popover.tsx
6941
- var import_react26 = require("react");
6942
- var import_clsx29 = __toESM(require("clsx"), 1);
6943
- var import_jsx_runtime37 = require("react/jsx-runtime");
7288
+ var import_react27 = require("react");
7289
+ var import_clsx30 = __toESM(require("clsx"), 1);
7290
+ var import_jsx_runtime38 = require("react/jsx-runtime");
6944
7291
  var positionClasses = {
6945
7292
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
6946
7293
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
@@ -6955,23 +7302,23 @@ function ITPopover({
6955
7302
  onClose,
6956
7303
  className
6957
7304
  }) {
6958
- const [internalOpen, setInternalOpen] = (0, import_react26.useState)(false);
7305
+ const [internalOpen, setInternalOpen] = (0, import_react27.useState)(false);
6959
7306
  const isControlled = controlledOpen !== void 0;
6960
7307
  const open = isControlled ? controlledOpen : internalOpen;
6961
- const ref = (0, import_react26.useRef)(null);
7308
+ const ref = (0, import_react27.useRef)(null);
6962
7309
  useClickOutside_default(ref, () => {
6963
7310
  if (isControlled) onClose?.();
6964
7311
  else setInternalOpen(false);
6965
7312
  });
6966
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { ref, className: (0, import_clsx29.default)("relative inline-flex", className), children: [
6967
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
6968
- open && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: (0, import_clsx29.default)("absolute z-[200]", positionClasses[position]), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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 }) })
7313
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { ref, className: (0, import_clsx30.default)("relative inline-flex", className), children: [
7314
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
7315
+ open && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: (0, import_clsx30.default)("absolute z-[200]", positionClasses[position]), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("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 }) })
6969
7316
  ] });
6970
7317
  }
6971
7318
 
6972
7319
  // src/components/progress/progress.tsx
6973
- var import_clsx30 = __toESM(require("clsx"), 1);
6974
- var import_jsx_runtime38 = require("react/jsx-runtime");
7320
+ var import_clsx31 = __toESM(require("clsx"), 1);
7321
+ var import_jsx_runtime39 = require("react/jsx-runtime");
6975
7322
  var colorMap = {
6976
7323
  primary: "bg-primary-500",
6977
7324
  secondary: "bg-secondary-500",
@@ -6998,18 +7345,18 @@ function ITProgress({
6998
7345
  style
6999
7346
  }) {
7000
7347
  const pct = Math.min(Math.max(value / max * 100, 0), 100);
7001
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7348
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7002
7349
  "div",
7003
7350
  {
7004
- className: (0, import_clsx30.default)("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap3[size], className),
7351
+ className: (0, import_clsx31.default)("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap3[size], className),
7005
7352
  style,
7006
7353
  role: "progressbar",
7007
7354
  "aria-valuenow": variant === "determinate" ? value : void 0,
7008
7355
  "aria-valuemax": max,
7009
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
7356
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7010
7357
  "div",
7011
7358
  {
7012
- className: (0, import_clsx30.default)(
7359
+ className: (0, import_clsx31.default)(
7013
7360
  "h-full rounded-full transition-all duration-500",
7014
7361
  colorMap[color],
7015
7362
  variant === "indeterminate" && "animate-pulse w-1/2"
@@ -7022,8 +7369,8 @@ function ITProgress({
7022
7369
  }
7023
7370
 
7024
7371
  // src/components/radio/radio.tsx
7025
- var import_clsx31 = __toESM(require("clsx"), 1);
7026
- var import_jsx_runtime39 = require("react/jsx-runtime");
7372
+ var import_clsx32 = __toESM(require("clsx"), 1);
7373
+ var import_jsx_runtime40 = require("react/jsx-runtime");
7027
7374
  function ITRadioGroup({
7028
7375
  name,
7029
7376
  value,
@@ -7033,25 +7380,25 @@ function ITRadioGroup({
7033
7380
  direction = "column",
7034
7381
  className
7035
7382
  }) {
7036
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7383
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7037
7384
  "div",
7038
7385
  {
7039
- className: (0, import_clsx31.default)(
7386
+ className: (0, import_clsx32.default)(
7040
7387
  "flex gap-3",
7041
7388
  direction === "row" ? "flex-row flex-wrap" : "flex-col",
7042
7389
  className
7043
7390
  ),
7044
7391
  children: options.map((opt) => {
7045
7392
  const isSelected = opt.value === value;
7046
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
7393
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
7047
7394
  "label",
7048
7395
  {
7049
- className: (0, import_clsx31.default)(
7396
+ className: (0, import_clsx32.default)(
7050
7397
  "inline-flex items-center gap-2 cursor-pointer select-none",
7051
7398
  disabled && "opacity-50 cursor-not-allowed"
7052
7399
  ),
7053
7400
  children: [
7054
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7401
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7055
7402
  "input",
7056
7403
  {
7057
7404
  type: "radio",
@@ -7063,18 +7410,18 @@ function ITRadioGroup({
7063
7410
  className: "peer sr-only"
7064
7411
  }
7065
7412
  ),
7066
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
7413
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7067
7414
  "div",
7068
7415
  {
7069
- className: (0, import_clsx31.default)(
7416
+ className: (0, import_clsx32.default)(
7070
7417
  "w-4 h-4 rounded-full border-2 flex items-center justify-center transition-all",
7071
7418
  isSelected ? "border-primary-500" : "border-slate-300 dark:border-slate-600",
7072
7419
  !disabled && "peer-focus:ring-2 peer-focus:ring-primary-200"
7073
7420
  ),
7074
- children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-2 h-2 rounded-full bg-primary-500" })
7421
+ children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-2 h-2 rounded-full bg-primary-500" })
7075
7422
  }
7076
7423
  ),
7077
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ITText, { as: "span", className: "text-sm text-slate-700 dark:text-slate-300", children: opt.label })
7424
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ITText, { as: "span", className: "text-sm text-slate-700 dark:text-slate-300", children: opt.label })
7078
7425
  ]
7079
7426
  },
7080
7427
  opt.value
@@ -7084,189 +7431,12 @@ function ITRadioGroup({
7084
7431
  );
7085
7432
  }
7086
7433
 
7087
- // src/components/search-select/search-select.tsx
7088
- var import_react27 = require("react");
7089
- var import_clsx32 = __toESM(require("clsx"), 1);
7090
- var import_fa17 = require("react-icons/fa");
7091
- var import_jsx_runtime40 = require("react/jsx-runtime");
7092
- function ITSearchSelect({
7093
- name,
7094
- options = [],
7095
- label,
7096
- placeholder = "Selecciona una opci\xF3n",
7097
- valueField = "value",
7098
- labelField = "label",
7099
- value,
7100
- onChange,
7101
- onBlur,
7102
- disabled = false,
7103
- className,
7104
- touched,
7105
- required,
7106
- error,
7107
- readOnly = false,
7108
- onSearch,
7109
- isLoading = false,
7110
- noResultsMessage = "No se encontraron resultados"
7111
- }) {
7112
- const [isOpen, setIsOpen] = (0, import_react27.useState)(false);
7113
- const [searchTerm, setSearchTerm] = (0, import_react27.useState)("");
7114
- const [isFocused, setIsFocused] = (0, import_react27.useState)(false);
7115
- const [localTouched, setLocalTouched] = (0, import_react27.useState)(false);
7116
- const containerRef = (0, import_react27.useRef)(null);
7117
- const timeoutRef = (0, import_react27.useRef)(null);
7118
- const selectedOption = (0, import_react27.useMemo)(() => {
7119
- return options.find((opt) => opt[valueField] === value);
7120
- }, [options, value, valueField]);
7121
- (0, import_react27.useEffect)(() => {
7122
- if (!isFocused) {
7123
- setSearchTerm(selectedOption ? String(selectedOption[labelField]) : "");
7124
- }
7125
- }, [selectedOption, isFocused, labelField]);
7126
- (0, import_react27.useEffect)(() => {
7127
- function handleClickOutside(event) {
7128
- if (containerRef.current && !containerRef.current.contains(event.target)) {
7129
- setIsOpen(false);
7130
- }
7131
- }
7132
- document.addEventListener("mousedown", handleClickOutside);
7133
- return () => document.removeEventListener("mousedown", handleClickOutside);
7134
- }, []);
7135
- const filteredOptions = (0, import_react27.useMemo)(() => {
7136
- if (onSearch) return options;
7137
- if (!searchTerm || !isFocused) return options;
7138
- return options.filter(
7139
- (opt) => String(opt[labelField]).toLowerCase().includes(searchTerm.toLowerCase())
7140
- );
7141
- }, [options, searchTerm, onSearch, labelField, isFocused]);
7142
- const handleInputChange = (e) => {
7143
- const query = e.target.value;
7144
- setSearchTerm(query);
7145
- setIsOpen(true);
7146
- if (onSearch) {
7147
- if (timeoutRef.current) clearTimeout(timeoutRef.current);
7148
- timeoutRef.current = setTimeout(() => {
7149
- onSearch(query);
7150
- }, 500);
7151
- }
7152
- };
7153
- const handleSelect = (option) => {
7154
- if (onChange) {
7155
- onChange(option[valueField], option);
7156
- }
7157
- setSearchTerm(String(option[labelField]));
7158
- setIsOpen(false);
7159
- };
7160
- const handleFocus = () => {
7161
- if (disabled || readOnly) return;
7162
- setIsFocused(true);
7163
- setIsOpen(true);
7164
- };
7165
- const handleInputBlur = (e) => {
7166
- setTimeout(() => {
7167
- setIsFocused(false);
7168
- setLocalTouched(true);
7169
- onBlur?.(e);
7170
- }, 200);
7171
- };
7172
- const inputTheme = theme.input || {};
7173
- const isTouched = touched !== void 0 ? touched : localTouched;
7174
- const isEmpty = value === void 0 || value === null || String(value).trim() === "";
7175
- const effectiveError = error !== void 0 && error !== false ? error === true ? "Este campo es requerido" : error : required && isEmpty ? "Este campo es requerido" : void 0;
7176
- const hasError = isTouched && !!effectiveError;
7177
- const errorMessage = typeof effectiveError === "string" ? effectiveError : "Este campo es requerido";
7178
- const getInputStyle = () => {
7179
- const style = {
7180
- backgroundColor: inputTheme.backgroundColor || "#ffffff",
7181
- borderColor: inputTheme.borderColor || "#e2e8f0",
7182
- borderRadius: inputTheme.borderRadius || "0.5rem",
7183
- padding: inputTheme.padding || "0.5rem 0.75rem",
7184
- fontSize: inputTheme.fontSize || "0.875rem",
7185
- borderWidth: "1px",
7186
- borderStyle: "solid",
7187
- transition: "all 0.2s",
7188
- color: "var(--input-text-color, var(--color-secondary-900))",
7189
- width: "100%"
7190
- };
7191
- if (disabled) {
7192
- style.backgroundColor = inputTheme.disabled?.backgroundColor || "#f1f5f9";
7193
- style.borderColor = inputTheme.disabled?.borderColor || "#e2e8f0";
7194
- style.opacity = 0.7;
7195
- style.cursor = "not-allowed";
7196
- }
7197
- if (hasError) {
7198
- style.borderColor = inputTheme.error?.borderColor || "red";
7199
- if (isFocused) {
7200
- style.boxShadow = inputTheme.error?.ring;
7201
- }
7202
- } else if (isFocused && !readOnly) {
7203
- style.boxShadow = inputTheme.focus?.ring;
7204
- style.borderColor = inputTheme.focus?.borderColor;
7205
- }
7206
- return style;
7207
- };
7208
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: (0, import_clsx32.default)("w-full flex flex-col gap-1.5", className, isOpen && "relative z-30"), ref: containerRef, children: [
7209
- label && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
7210
- ITText,
7211
- {
7212
- as: "label",
7213
- className: (0, import_clsx32.default)("text-sm font-medium text-gray-700 dark:text-slate-300", {
7214
- "text-red-500": hasError
7215
- }),
7216
- children: [
7217
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ITText, { as: "span", children: label }),
7218
- required && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ITText, { as: "span", className: "text-red-500 ml-1", children: "*" })
7219
- ]
7220
- }
7221
- ),
7222
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "relative", children: [
7223
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "relative flex items-center", children: [
7224
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7225
- "input",
7226
- {
7227
- type: "text",
7228
- name,
7229
- value: searchTerm,
7230
- onChange: handleInputChange,
7231
- onFocus: handleFocus,
7232
- onBlur: handleInputBlur,
7233
- disabled,
7234
- readOnly,
7235
- placeholder,
7236
- className: "outline-none pr-10",
7237
- style: getInputStyle(),
7238
- autoComplete: "off"
7239
- }
7240
- ),
7241
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "absolute right-3 flex items-center gap-2 text-gray-400 pointer-events-none", children: [
7242
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "animate-spin h-4 w-4 border-2 border-primary-500 border-t-transparent rounded-full" }),
7243
- !isLoading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_fa17.FaSearch, { size: 14, className: (0, import_clsx32.default)({ "text-primary-500": isFocused }) })
7244
- ] })
7245
- ] }),
7246
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("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__ */ (0, import_jsx_runtime40.jsx)("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
7247
- ITText,
7248
- {
7249
- as: "div",
7250
- onClick: () => handleSelect(option),
7251
- className: (0, import_clsx32.default)(
7252
- "px-4 py-2 text-sm cursor-pointer transition-colors",
7253
- 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"
7254
- ),
7255
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ITText, { as: "span", children: option[labelField] })
7256
- },
7257
- option[valueField]
7258
- )) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ITText, { as: "div", className: "px-4 py-6 text-sm text-center text-gray-500 italic", children: isLoading ? "Cargando..." : noResultsMessage }) }) })
7259
- ] }),
7260
- hasError && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ITText, { as: "p", className: "text-red-500 text-xs mt-1", children: errorMessage })
7261
- ] });
7262
- }
7263
-
7264
7434
  // src/components/searchTable/searchTable.tsx
7265
7435
  var import_clsx34 = __toESM(require("clsx"), 1);
7266
7436
  var import_react28 = require("react");
7267
7437
 
7268
7438
  // src/components/searchTable/components/SearchInput.tsx
7269
- var import_fa18 = require("react-icons/fa");
7439
+ var import_fa19 = require("react-icons/fa");
7270
7440
  var import_jsx_runtime41 = require("react/jsx-runtime");
7271
7441
  function SearchInput({
7272
7442
  placeholder = "Buscar en todos los campos...",
@@ -7275,7 +7445,7 @@ function SearchInput({
7275
7445
  className = ""
7276
7446
  }) {
7277
7447
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: `relative flex-1 ${className}`, children: [
7278
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_fa18.FaSearch, { className: "h-5 w-5 text-gray-400" }) }),
7448
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_fa19.FaSearch, { className: "h-5 w-5 text-gray-400" }) }),
7279
7449
  /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7280
7450
  ITInput,
7281
7451
  {
@@ -7292,7 +7462,7 @@ function SearchInput({
7292
7462
  }
7293
7463
 
7294
7464
  // src/components/searchTable/components/SortButton.tsx
7295
- var import_fa19 = require("react-icons/fa");
7465
+ var import_fa20 = require("react-icons/fa");
7296
7466
  var import_jsx_runtime42 = require("react/jsx-runtime");
7297
7467
  function SortButton({
7298
7468
  sortConfig,
@@ -7307,7 +7477,7 @@ function SortButton({
7307
7477
  "aria-label": `Ordenar tabla ${sortConfig ? sortConfig.direction === "asc" ? "descendente" : "ascendente" : "ascendente"}`,
7308
7478
  title: "Ordenar tabla",
7309
7479
  children: [
7310
- sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_fa19.FaSortUp, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_fa19.FaSortDown, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_fa19.FaSort, { className: "w-4 h-4 text-gray-500" }),
7480
+ sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_fa20.FaSortUp, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_fa20.FaSortDown, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_fa20.FaSort, { className: "w-4 h-4 text-gray-500" }),
7311
7481
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ITText, { as: "span", className: "text-sm font-medium text-gray-700", children: sortConfig ? sortConfig.direction === "asc" ? "Asc \u2191" : "Desc \u2193" : "Ordenar" })
7312
7482
  ]
7313
7483
  }
@@ -7410,7 +7580,7 @@ var getNestedValue4 = (obj, path) => {
7410
7580
 
7411
7581
  // src/components/searchTable/components/TableRow.tsx
7412
7582
  var import_clsx33 = __toESM(require("clsx"), 1);
7413
- var import_fa20 = require("react-icons/fa");
7583
+ var import_fa21 = require("react-icons/fa");
7414
7584
 
7415
7585
  // src/components/searchTable/components/EditableCell.tsx
7416
7586
  var import_jsx_runtime46 = require("react/jsx-runtime");
@@ -7566,13 +7736,13 @@ function TableRow({
7566
7736
  return typeof value === "number" && col.currencyMX ? formatCurrencyMX2(value) : value;
7567
7737
  case "boolean":
7568
7738
  return value ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
7569
- import_fa20.FaCheck,
7739
+ import_fa21.FaCheck,
7570
7740
  {
7571
7741
  className: "text-green-500",
7572
7742
  "aria-label": "Verdadero",
7573
7743
  title: "Verdadero"
7574
7744
  }
7575
- ) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_fa20.FaTimes, { className: "text-red-500", "aria-label": "Falso", title: "Falso" });
7745
+ ) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_fa21.FaTimes, { className: "text-red-500", "aria-label": "Falso", title: "Falso" });
7576
7746
  case "actions":
7577
7747
  if (isEditing && col.saveActions) {
7578
7748
  return col.saveActions(rowData, {
@@ -7646,7 +7816,7 @@ function TableEmptyState({
7646
7816
  }
7647
7817
 
7648
7818
  // src/components/searchTable/components/PaginationControls.tsx
7649
- var import_fa21 = require("react-icons/fa");
7819
+ var import_fa22 = require("react-icons/fa");
7650
7820
 
7651
7821
  // src/components/searchTable/components/PaginationInfo.tsx
7652
7822
  var import_jsx_runtime49 = require("react/jsx-runtime");
@@ -7712,7 +7882,7 @@ function PaginationControls({
7712
7882
  className: "min-w-[32px]",
7713
7883
  ariaLabel: "P\xE1gina anterior",
7714
7884
  title: "Ir a la p\xE1gina anterior",
7715
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_fa21.FaArrowLeft, { "aria-hidden": "true" })
7885
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_fa22.FaArrowLeft, { "aria-hidden": "true" })
7716
7886
  }
7717
7887
  ),
7718
7888
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(ITText, { as: "span", className: "px-4 py-2 text-sm text-gray-700", "aria-live": "polite", children: [
@@ -7731,7 +7901,7 @@ function PaginationControls({
7731
7901
  className: "min-w-[32px]",
7732
7902
  ariaLabel: "P\xE1gina siguiente",
7733
7903
  title: "Ir a la p\xE1gina siguiente",
7734
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_fa21.FaArrowRight, { "aria-hidden": "true" })
7904
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_fa22.FaArrowRight, { "aria-hidden": "true" })
7735
7905
  }
7736
7906
  )
7737
7907
  ] })
@@ -7883,7 +8053,7 @@ function ITSearchTable({
7883
8053
 
7884
8054
  // src/components/sidebar/sidebar.tsx
7885
8055
  var import_react29 = require("react");
7886
- var import_fa22 = require("react-icons/fa");
8056
+ var import_fa23 = require("react-icons/fa");
7887
8057
  var import_jsx_runtime52 = require("react/jsx-runtime");
7888
8058
  function ITSidebar({
7889
8059
  navigationItems = [],
@@ -8043,7 +8213,7 @@ function ITSidebar({
8043
8213
  {
8044
8214
  className: `flex-shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "rotate-180" : ""}`,
8045
8215
  style: { color: item.isActive ? "var(--sidebar-active-color, #0f172a)" : "var(--sidebar-icon-color, #64748b)", opacity: 0.7 },
8046
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_fa22.FaChevronDown, { className: "w-3 h-3" })
8216
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_fa23.FaChevronDown, { className: "w-3 h-3" })
8047
8217
  }
8048
8218
  ),
8049
8219
  item.badge && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
@@ -8451,7 +8621,7 @@ var positionStyles = {
8451
8621
  // src/components/toast/toast.tsx
8452
8622
  var import_clsx40 = __toESM(require("clsx"), 1);
8453
8623
  var import_react31 = require("react");
8454
- var import_fa23 = require("react-icons/fa");
8624
+ var import_fa24 = require("react-icons/fa");
8455
8625
  var import_jsx_runtime58 = require("react/jsx-runtime");
8456
8626
  function ITToast({
8457
8627
  message,
@@ -8481,15 +8651,15 @@ function ITToast({
8481
8651
  const TypeIcon = () => {
8482
8652
  switch (type) {
8483
8653
  case "success":
8484
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa23.FaCheckCircle, { className: "w-5 h-5 flex-shrink-0" });
8654
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa24.FaCheckCircle, { className: "w-5 h-5 flex-shrink-0" });
8485
8655
  case "error":
8486
8656
  case "danger":
8487
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa23.FaTimesCircle, { className: "w-5 h-5 flex-shrink-0" });
8657
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa24.FaTimesCircle, { className: "w-5 h-5 flex-shrink-0" });
8488
8658
  case "warning":
8489
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa23.FaExclamationTriangle, { className: "w-5 h-5 flex-shrink-0" });
8659
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa24.FaExclamationTriangle, { className: "w-5 h-5 flex-shrink-0" });
8490
8660
  case "info":
8491
8661
  default:
8492
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa23.FaInfoCircle, { className: "w-5 h-5 flex-shrink-0" });
8662
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa24.FaInfoCircle, { className: "w-5 h-5 flex-shrink-0" });
8493
8663
  }
8494
8664
  };
8495
8665
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
@@ -8518,7 +8688,7 @@ function ITToast({
8518
8688
  onClick: handleClose,
8519
8689
  className: "p-1.5 rounded-full hover:bg-black/15 transition-colors focus:outline-none focus:ring-2 focus:ring-white/50",
8520
8690
  "aria-label": "Close notification",
8521
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa23.FaTimes, { className: "w-4 h-4" })
8691
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_fa24.FaTimes, { className: "w-4 h-4" })
8522
8692
  }
8523
8693
  )
8524
8694
  ]
@@ -8530,7 +8700,8 @@ function ITToast({
8530
8700
  var import_react32 = require("react");
8531
8701
  var import_react_dropzone = require("react-dropzone");
8532
8702
  var import_clsx41 = __toESM(require("clsx"), 1);
8533
- var import_jsx_runtime59 = require("react/jsx-runtime");
8703
+
8704
+ // src/components/dropfile/dropfile.props.ts
8534
8705
  var FileTypeEnum = /* @__PURE__ */ ((FileTypeEnum2) => {
8535
8706
  FileTypeEnum2["PDF"] = "application/pdf";
8536
8707
  FileTypeEnum2["XLS"] = "application/vnd.ms-excel";
@@ -8548,6 +8719,9 @@ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
8548
8719
  UploadStatus2["ERROR"] = "error";
8549
8720
  return UploadStatus2;
8550
8721
  })(UploadStatus || {});
8722
+
8723
+ // src/components/dropfile/dropfile.tsx
8724
+ var import_jsx_runtime59 = require("react/jsx-runtime");
8551
8725
  var ITDropfile = ({
8552
8726
  onFileSelect,
8553
8727
  onCancel,
@@ -8843,7 +9017,7 @@ var import_react34 = require("react");
8843
9017
  var import_clsx42 = __toESM(require("clsx"), 1);
8844
9018
 
8845
9019
  // src/components/topbar/topbar.tsx
8846
- var import_fa24 = require("react-icons/fa");
9020
+ var import_fa25 = require("react-icons/fa");
8847
9021
  var import_react33 = require("react");
8848
9022
  var import_jsx_runtime60 = require("react/jsx-runtime");
8849
9023
  function ITTopBar({
@@ -8879,7 +9053,7 @@ function ITTopBar({
8879
9053
  onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--topbar-user-hover, #f1f5f9)",
8880
9054
  onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
8881
9055
  onClick: onToggleMobileMenu,
8882
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_fa24.FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
9056
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_fa25.FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
8883
9057
  }
8884
9058
  ),
8885
9059
  /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-center gap-3", children: [
@@ -8941,7 +9115,7 @@ function ITTopBar({
8941
9115
  src: userMenu.userImage,
8942
9116
  alt: "Current user"
8943
9117
  }
8944
- ) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_fa24.FaUserCircle, { className: "w-6 h-6", style: { color: "var(--topbar-icon, #94a3b8)" } }) }),
9118
+ ) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_fa25.FaUserCircle, { className: "w-6 h-6", style: { color: "var(--topbar-icon, #94a3b8)" } }) }),
8945
9119
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
8946
9120
  ] }),
8947
9121
  /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "hidden sm:flex flex-col text-left py-0.5", children: [
@@ -9026,8 +9200,12 @@ function ITLayout({
9026
9200
  className = "",
9027
9201
  contentClassName = ""
9028
9202
  }) {
9029
- const [desktopCollapsed, setDesktopCollapsed] = (0, import_react34.useState)(true);
9203
+ const [internalCollapsed, setInternalCollapsed] = (0, import_react34.useState)(true);
9030
9204
  const [mobileSidebarOpen, setMobileSidebarOpen] = (0, import_react34.useState)(false);
9205
+ const isControlled = sidebar.isCollapsed !== void 0;
9206
+ const desktopCollapsed = isControlled ? sidebar.isCollapsed : internalCollapsed;
9207
+ const handleToggleCollapse = isControlled ? sidebar.onToggleCollapse ?? (() => {
9208
+ }) : () => setInternalCollapsed((v) => !v);
9031
9209
  const layoutTokens = theme.layout;
9032
9210
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
9033
9211
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
@@ -9051,7 +9229,7 @@ function ITLayout({
9051
9229
  {
9052
9230
  ...sidebar,
9053
9231
  isCollapsed: desktopCollapsed,
9054
- onToggleCollapse: () => setDesktopCollapsed((v) => !v),
9232
+ onToggleCollapse: handleToggleCollapse,
9055
9233
  visibleOnMobile: false,
9056
9234
  className: "h-full drop-shadow-2xl transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] flex-shrink-0"
9057
9235
  }
@@ -9178,7 +9356,7 @@ function ITLoader({
9178
9356
  // src/components/stepper/stepper.tsx
9179
9357
  var import_clsx43 = __toESM(require("clsx"), 1);
9180
9358
  var import_react35 = require("react");
9181
- var import_fa25 = require("react-icons/fa");
9359
+ var import_fa26 = require("react-icons/fa");
9182
9360
  var import_jsx_runtime63 = require("react/jsx-runtime");
9183
9361
  function ITStepper({
9184
9362
  steps,
@@ -9246,7 +9424,7 @@ function ITStepper({
9246
9424
  const renderStepContent = (index, isCompleted, isActive) => {
9247
9425
  const step = steps[index];
9248
9426
  if (isCompleted) {
9249
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_fa25.FaCheck, { className: "w-4 h-4" });
9427
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_fa26.FaCheck, { className: "w-4 h-4" });
9250
9428
  }
9251
9429
  if (step.icon && useIcons) {
9252
9430
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex items-center justify-center w-5 h-5", children: step.icon });
@@ -9342,7 +9520,7 @@ function ITStepper({
9342
9520
  disabled: currentStep === 0,
9343
9521
  onClick: prevStep,
9344
9522
  children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-center gap-2", children: [
9345
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_fa25.FaChevronLeft, {}),
9523
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_fa26.FaChevronLeft, {}),
9346
9524
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ITText, { as: "span", children: "Atr\xE1s" })
9347
9525
  ] })
9348
9526
  }
@@ -9363,7 +9541,7 @@ function ITStepper({
9363
9541
  onClick: nextStep,
9364
9542
  children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-center gap-2", children: [
9365
9543
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ITText, { as: "span", children: currentStep === steps.length - 1 ? "Finalizar" : "Siguiente" }),
9366
- currentStep === steps.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_fa25.FaCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_fa25.FaChevronRight, {})
9544
+ currentStep === steps.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_fa26.FaCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_fa26.FaChevronRight, {})
9367
9545
  ] })
9368
9546
  }
9369
9547
  )