@axzydev/axzy_ui_system 1.0.167 → 1.0.168

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -259,17 +259,17 @@ var components = {
259
259
  }
260
260
  },
261
261
  card: {
262
- backgroundColor: "#ffffff",
262
+ backgroundColor: "var(--card-bg, #ffffff)",
263
263
  borderRadius: "1rem",
264
- borderColor: semanticColors.gray[200],
264
+ borderColor: `var(--card-border, ${semanticColors.gray[200]})`,
265
265
  borderWidth: "1px",
266
- shadow: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
266
+ shadow: "var(--card-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1))",
267
267
  hover: {
268
- shadow: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
268
+ shadow: "var(--card-shadow-hover, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1))"
269
269
  },
270
270
  header: {
271
- backgroundColor: semanticColors.gray[50],
272
- borderBottom: `1px solid var(--color-secondary-200)`,
271
+ backgroundColor: `var(--card-header-bg, ${semanticColors.gray[50]})`,
272
+ borderBottom: `1px solid var(--card-header-border, var(--color-secondary-200))`,
273
273
  padding: "1rem 1.5rem",
274
274
  borderTopLeftRadius: "1rem",
275
275
  borderTopRightRadius: "1rem"
@@ -279,23 +279,23 @@ var components = {
279
279
  }
280
280
  },
281
281
  input: {
282
- backgroundColor: "#ffffff",
283
- borderColor: semanticColors.gray[300],
282
+ backgroundColor: "var(--input-bg, #ffffff)",
283
+ borderColor: `var(--input-border, ${semanticColors.gray[300]})`,
284
284
  borderRadius: "0.5rem",
285
285
  padding: "0.5rem 0.75rem",
286
286
  fontSize: "0.875rem",
287
287
  focus: {
288
- borderColor: semanticColors.primary[500],
289
- ring: `0 0 0 3px ${semanticColors.primary[100]}`
288
+ borderColor: `var(--input-focus-border, ${semanticColors.primary[500]})`,
289
+ ring: `var(--input-focus-ring, 0 0 0 3px ${semanticColors.primary[100]})`
290
290
  },
291
- placeholder: semanticColors.gray[400],
291
+ placeholder: `var(--input-placeholder, ${semanticColors.gray[400]})`,
292
292
  disabled: {
293
- backgroundColor: semanticColors.gray[100],
294
- borderColor: semanticColors.gray[200]
293
+ backgroundColor: `var(--input-disabled-bg, ${semanticColors.gray[100]})`,
294
+ borderColor: `var(--input-disabled-border, ${semanticColors.gray[200]})`
295
295
  },
296
296
  error: {
297
- borderColor: semanticColors.danger[500],
298
- ring: `0 0 0 3px ${semanticColors.danger[100]}`
297
+ borderColor: `var(--input-error-border, ${semanticColors.danger[500]})`,
298
+ ring: `var(--input-error-ring, 0 0 0 3px ${semanticColors.danger[100]})`
299
299
  }
300
300
  },
301
301
  table: {
@@ -343,24 +343,24 @@ var components = {
343
343
  },
344
344
  modal: {
345
345
  overlay: {
346
- backgroundColor: "rgba(15, 23, 42, 0.75)"
346
+ backgroundColor: "var(--modal-overlay, rgba(15, 23, 42, 0.75))"
347
347
  },
348
348
  content: {
349
- backgroundColor: "#ffffff",
349
+ backgroundColor: "var(--modal-bg, #ffffff)",
350
350
  borderRadius: "1rem",
351
- shadow: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
351
+ shadow: "var(--modal-shadow, 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1))"
352
352
  },
353
353
  header: {
354
354
  padding: "1.5rem 1.5rem 0.5rem 1.5rem",
355
- borderBottom: `1px solid var(--color-secondary-200)`
355
+ borderBottom: `1px solid var(--modal-header-border, var(--color-secondary-200))`
356
356
  },
357
357
  body: {
358
358
  padding: "1.5rem"
359
359
  },
360
360
  footer: {
361
361
  padding: "1rem 1.5rem",
362
- borderTop: `1px solid var(--color-secondary-200)`,
363
- backgroundColor: semanticColors.gray[50]
362
+ borderTop: `1px solid var(--modal-footer-border, var(--color-secondary-200))`,
363
+ backgroundColor: `var(--modal-footer-bg, ${semanticColors.gray[50]})`
364
364
  }
365
365
  },
366
366
  calendar: {
@@ -627,11 +627,21 @@ var ITCalendar = ({
627
627
  endDate,
628
628
  minDate,
629
629
  maxDate,
630
- className
630
+ className,
631
+ variant = "primary"
631
632
  }) => {
632
633
  const mode = modeProp || (onChange ? "month" : "week");
633
634
  const [currentDate, setCurrentDate] = useState2(value || /* @__PURE__ */ new Date());
634
635
  const [view, setView] = useState2("calendar");
636
+ const getVariantStyles = () => {
637
+ const v = variant || "primary";
638
+ return {
639
+ "--calendar-selected-bg": `var(--color-${v})`,
640
+ "--calendar-range-bg": `var(--color-${v}-50)`,
641
+ "--calendar-today-bg": `var(--color-${v}-100)`,
642
+ "--calendar-today-text": `var(--color-${v})`
643
+ };
644
+ };
635
645
  useEffect(() => {
636
646
  if (value) setCurrentDate(value);
637
647
  }, [value]);
@@ -749,7 +759,8 @@ var ITCalendar = ({
749
759
  className: cn("flex flex-col h-full rounded-lg shadow-sm overflow-hidden select-none", className),
750
760
  style: {
751
761
  backgroundColor: "var(--calendar-bg, #ffffff)",
752
- border: "1px solid var(--calendar-border, #e2e8f0)"
762
+ border: "1px solid var(--calendar-border, #e2e8f0)",
763
+ ...getVariantStyles()
753
764
  },
754
765
  onMouseUp: handleMouseUp,
755
766
  onMouseLeave: () => {
@@ -757,218 +768,326 @@ var ITCalendar = ({
757
768
  setDragCurrent(null);
758
769
  },
759
770
  children: [
760
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2 py-2 border-b border-gray-200", style: { backgroundColor: "var(--calendar-bg, #ffffff)" }, children: [
761
- /* @__PURE__ */ jsx3(
762
- "h2",
763
- {
764
- className: "text-sm font-bold capitalize cursor-pointer transition-colors select-none px-2 py-1 rounded",
765
- style: {
766
- color: "var(--calendar-header-text, #1e293b)"
767
- },
768
- onClick: () => setView(view === "calendar" ? "years" : "calendar"),
769
- onMouseEnter: (e) => {
770
- e.currentTarget.style.backgroundColor = "var(--calendar-header-hover, #f1f5f9)";
771
- },
772
- onMouseLeave: (e) => {
773
- e.currentTarget.style.backgroundColor = "transparent";
774
- },
775
- children: view === "years" ? `${years[0]} - ${years[years.length - 1]}` : format(currentDate, "MMMM yyyy", { locale: es })
776
- }
777
- ),
778
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
779
- /* @__PURE__ */ jsx3("button", { onClick: handlePrev, type: "button", className: "p-1.5 hover:bg-gray-100 rounded-md transition-colors text-gray-600", children: /* @__PURE__ */ jsx3(FaChevronLeft, { size: 14 }) }),
780
- /* @__PURE__ */ jsx3("button", { onClick: handleToday, type: "button", className: "text-sm font-medium text-gray-700 hover:bg-gray-100 px-3 py-1.5 rounded-md transition-colors", children: "Hoy" }),
781
- /* @__PURE__ */ jsx3("button", { onClick: handleNext, type: "button", className: "p-1.5 hover:bg-gray-100 rounded-md transition-colors text-gray-600", children: /* @__PURE__ */ jsx3(FaChevronRight, { size: 14 }) })
782
- ] })
783
- ] }),
784
- /* @__PURE__ */ jsx3("div", { className: "flex-1 overflow-auto relative bg-white", children: view === "years" ? /* @__PURE__ */ jsx3("div", { className: "p-4 grid grid-cols-4 gap-2", children: years.map((year) => /* @__PURE__ */ jsx3(
785
- "button",
771
+ /* @__PURE__ */ jsxs(
772
+ "div",
786
773
  {
787
- type: "button",
788
- className: cn(
789
- "h-10 rounded-md text-sm font-medium transition-colors border border-transparent",
790
- year === currentDate.getFullYear() ? "bg-primary-600 text-white" : "hover:bg-primary-50 text-gray-700 hover:text-primary-700"
791
- ),
792
- onClick: () => {
793
- setCurrentDate((d) => {
794
- const newDate = new Date(d);
795
- newDate.setFullYear(year);
796
- return newDate;
797
- });
798
- setView("calendar");
774
+ className: "flex items-center justify-between px-2 py-2 border-b",
775
+ style: {
776
+ backgroundColor: "var(--calendar-bg, #ffffff)",
777
+ borderBottomColor: "var(--calendar-border, #e2e8f0)"
799
778
  },
800
- children: year
801
- },
802
- year
803
- )) }) : mode === "month" ? /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
804
- /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-7 mb-2", children: ["Lun", "Mar", "Mi\xE9", "Jue", "Vie", "S\xE1b", "Dom"].map((day) => /* @__PURE__ */ jsx3("div", { className: "text-center text-xs font-semibold text-gray-400 uppercase py-1", children: day }, day)) }),
805
- /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-7 gap-1", children: monthDays.map((day) => {
806
- const isDisabled = isDateDisabled(day);
807
- const isCurrentMonth = isSameMonth(day, currentDate);
808
- const isSelected = selectionMode === "single" && value && isSameDay(day, value);
809
- const isRangeStart = selectionMode === "range" && startDate && isSameDay(day, startDate);
810
- const isRangeEnd = selectionMode === "range" && endDate && isSameDay(day, endDate);
811
- const isInRange = selectionMode === "range" && startDate && endDate && isAfter(day, startDate) && isBefore(day, endDate);
812
- return /* @__PURE__ */ jsxs(
779
+ children: [
780
+ /* @__PURE__ */ jsx3(
781
+ "h2",
782
+ {
783
+ className: "text-sm font-bold capitalize cursor-pointer transition-colors select-none px-2 py-1 rounded",
784
+ style: {
785
+ color: "var(--calendar-header-text, #1e293b)"
786
+ },
787
+ onClick: () => setView(view === "calendar" ? "years" : "calendar"),
788
+ onMouseEnter: (e) => {
789
+ e.currentTarget.style.backgroundColor = "var(--calendar-header-hover, #f1f5f9)";
790
+ },
791
+ onMouseLeave: (e) => {
792
+ e.currentTarget.style.backgroundColor = "transparent";
793
+ },
794
+ children: view === "years" ? `${years[0]} - ${years[years.length - 1]}` : format(currentDate, "MMMM yyyy", { locale: es })
795
+ }
796
+ ),
797
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
798
+ /* @__PURE__ */ jsx3(
799
+ "button",
800
+ {
801
+ onClick: handlePrev,
802
+ type: "button",
803
+ className: "p-1.5 rounded-md transition-colors",
804
+ style: { color: "var(--calendar-days-text, #334155)" },
805
+ onMouseEnter: (e) => {
806
+ e.currentTarget.style.backgroundColor = "var(--calendar-header-hover, #f1f5f9)";
807
+ },
808
+ onMouseLeave: (e) => {
809
+ e.currentTarget.style.backgroundColor = "transparent";
810
+ },
811
+ children: /* @__PURE__ */ jsx3(FaChevronLeft, { size: 14 })
812
+ }
813
+ ),
814
+ /* @__PURE__ */ jsx3(
815
+ "button",
816
+ {
817
+ onClick: handleToday,
818
+ type: "button",
819
+ className: "text-sm font-medium px-3 py-1.5 rounded-md transition-colors",
820
+ style: { color: "var(--calendar-days-text, #334155)" },
821
+ onMouseEnter: (e) => {
822
+ e.currentTarget.style.backgroundColor = "var(--calendar-header-hover, #f1f5f9)";
823
+ },
824
+ onMouseLeave: (e) => {
825
+ e.currentTarget.style.backgroundColor = "transparent";
826
+ },
827
+ children: "Hoy"
828
+ }
829
+ ),
830
+ /* @__PURE__ */ jsx3(
831
+ "button",
832
+ {
833
+ onClick: handleNext,
834
+ type: "button",
835
+ className: "p-1.5 rounded-md transition-colors",
836
+ style: { color: "var(--calendar-days-text, #334155)" },
837
+ onMouseEnter: (e) => {
838
+ e.currentTarget.style.backgroundColor = "var(--calendar-header-hover, #f1f5f9)";
839
+ },
840
+ onMouseLeave: (e) => {
841
+ e.currentTarget.style.backgroundColor = "transparent";
842
+ },
843
+ children: /* @__PURE__ */ jsx3(FaChevronRight, { size: 14 })
844
+ }
845
+ )
846
+ ] })
847
+ ]
848
+ }
849
+ ),
850
+ /* @__PURE__ */ jsx3(
851
+ "div",
852
+ {
853
+ className: "flex-1 overflow-auto relative",
854
+ style: { backgroundColor: "var(--calendar-bg, #ffffff)" },
855
+ children: view === "years" ? /* @__PURE__ */ jsx3("div", { className: "p-4 grid grid-cols-4 gap-2", children: years.map((year) => /* @__PURE__ */ jsx3(
813
856
  "button",
814
857
  {
815
858
  type: "button",
816
- disabled: isDisabled,
817
- onClick: () => onChange && onChange(day),
818
859
  className: cn(
819
- "h-10 w-full flex items-center justify-center rounded-md text-sm transition-colors relative",
820
- !isCurrentMonth && "opacity-40",
821
- isDisabled && "opacity-20 cursor-not-allowed"
860
+ "h-10 rounded-md text-sm font-medium transition-colors border border-transparent",
861
+ year === currentDate.getFullYear() ? "bg-[var(--calendar-selected-bg)] text-[var(--calendar-selected-text)]" : "hover:bg-[var(--calendar-today-bg)] hover:text-[var(--calendar-today-text)]"
822
862
  ),
823
863
  style: {
824
- backgroundColor: isSelected || isRangeStart || isRangeEnd ? "var(--calendar-selected-bg, #2563eb)" : isInRange ? "var(--calendar-range-bg, #eff6ff)" : isToday(day) ? "var(--calendar-today-bg, #eff6ff)" : "transparent",
825
- color: isSelected || isRangeStart || isRangeEnd ? "var(--calendar-selected-text, #ffffff)" : isToday(day) ? "var(--calendar-today-text, #2563eb)" : "var(--calendar-days-text, #334155)",
826
- fontWeight: isSelected || isRangeStart || isRangeEnd || isToday(day) ? "700" : "400"
864
+ color: year === currentDate.getFullYear() ? "var(--calendar-selected-text, #ffffff)" : "var(--calendar-days-text, #334155)"
827
865
  },
828
- children: [
829
- format(day, "d"),
830
- selectionMode === "range" && isRangeStart && endDate && /* @__PURE__ */ jsx3("div", { className: "absolute right-0 top-0 bottom-0 w-2 bg-primary-50 -z-10" }),
831
- selectionMode === "range" && isRangeEnd && startDate && /* @__PURE__ */ jsx3("div", { className: "absolute left-0 top-0 bottom-0 w-2 bg-primary-50 -z-10" })
832
- ]
866
+ onClick: () => {
867
+ setCurrentDate((d) => {
868
+ const newDate = new Date(d);
869
+ newDate.setFullYear(year);
870
+ return newDate;
871
+ });
872
+ setView("calendar");
873
+ },
874
+ children: year
833
875
  },
834
- day.toISOString()
835
- );
836
- }) })
837
- ] }) : (
838
- /* Week/Day View (Scheduler) */
839
- /* @__PURE__ */ jsxs("div", { className: cn("flex h-full", mode === "week" ? "min-w-[800px]" : "w-full"), children: [
840
- /* @__PURE__ */ jsx3("div", { className: "flex-none w-16 border-r border-gray-100 bg-gray-50 pt-10 select-none", children: TIME_SLOTS.map((hour) => hour < END_HOUR && /* @__PURE__ */ jsx3("div", { className: "h-20 relative text-right pr-2", children: /* @__PURE__ */ jsx3("span", { className: "text-xs text-gray-400 -mt-2 inline-block transform -translate-y-1/2", children: format((/* @__PURE__ */ new Date()).setHours(hour, 0), "HH:mm") }) }, hour)) }),
841
- /* @__PURE__ */ jsx3("div", { className: "flex flex-1", children: viewDays.map((day) => /* @__PURE__ */ jsxs("div", { className: "flex-1 border-r border-gray-100 min-w-[120px] relative", children: [
842
- /* @__PURE__ */ jsxs("div", { className: cn(
843
- "h-10 border-b border-gray-200 flex flex-col items-center justify-center sticky top-0 bg-white z-10",
844
- isToday(day) && "bg-primary-50"
845
- ), children: [
846
- /* @__PURE__ */ jsx3("span", { className: cn("text-xs font-semibold uppercase", isToday(day) ? "text-primary-600" : "text-gray-500"), children: format(day, "EEE", { locale: es }) }),
847
- /* @__PURE__ */ jsx3("span", { className: cn(
848
- "text-sm font-bold w-6 h-6 flex items-center justify-center rounded-full mt-0.5",
849
- isToday(day) ? "bg-primary-600 text-white" : "text-gray-800"
850
- ), children: format(day, "d") })
851
- ] }),
852
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
853
- TIME_SLOTS.map((hour) => hour < END_HOUR && /* @__PURE__ */ jsxs(
876
+ year
877
+ )) }) : mode === "month" ? /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
878
+ /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-7 mb-2", children: ["Lun", "Mar", "Mi\xE9", "Jue", "Vie", "S\xE1b", "Dom"].map((day) => /* @__PURE__ */ jsx3("div", { className: "text-center text-xs font-semibold text-gray-400 uppercase py-1", children: day }, day)) }),
879
+ /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-7 gap-1", children: monthDays.map((day) => {
880
+ const isDisabled = isDateDisabled(day);
881
+ const isCurrentMonth = isSameMonth(day, currentDate);
882
+ const isSelected = selectionMode === "single" && value && isSameDay(day, value);
883
+ const isRangeStart = selectionMode === "range" && startDate && isSameDay(day, startDate);
884
+ const isRangeEnd = selectionMode === "range" && endDate && isSameDay(day, endDate);
885
+ const isInRange = selectionMode === "range" && startDate && endDate && isAfter(day, startDate) && isBefore(day, endDate);
886
+ return /* @__PURE__ */ jsxs(
887
+ "button",
888
+ {
889
+ type: "button",
890
+ disabled: isDisabled,
891
+ onClick: () => onChange && onChange(day),
892
+ className: cn(
893
+ "h-10 w-full flex items-center justify-center rounded-md text-sm transition-colors relative",
894
+ !isCurrentMonth && "opacity-40",
895
+ isDisabled && "opacity-20 cursor-not-allowed"
896
+ ),
897
+ style: {
898
+ backgroundColor: isSelected || isRangeStart || isRangeEnd ? "var(--calendar-selected-bg, #2563eb)" : isInRange ? "var(--calendar-range-bg, #eff6ff)" : isToday(day) ? "var(--calendar-today-bg, #eff6ff)" : "transparent",
899
+ color: isSelected || isRangeStart || isRangeEnd ? "var(--calendar-selected-text, #ffffff)" : isToday(day) ? "var(--calendar-today-text, #2563eb)" : "var(--calendar-days-text, #334155)",
900
+ fontWeight: isSelected || isRangeStart || isRangeEnd || isToday(day) ? "700" : "400"
901
+ },
902
+ children: [
903
+ format(day, "d"),
904
+ selectionMode === "range" && isRangeStart && endDate && /* @__PURE__ */ jsx3("div", { className: "absolute right-0 top-0 bottom-0 w-2 bg-[var(--calendar-range-bg)] -z-10" }),
905
+ selectionMode === "range" && isRangeEnd && startDate && /* @__PURE__ */ jsx3("div", { className: "absolute left-0 top-0 bottom-0 w-2 bg-[var(--calendar-range-bg)] -z-10" })
906
+ ]
907
+ },
908
+ day.toISOString()
909
+ );
910
+ }) })
911
+ ] }) : (
912
+ /* Week/Day View (Scheduler) */
913
+ /* @__PURE__ */ jsxs("div", { className: cn("flex h-full", mode === "week" ? "min-w-[800px]" : "w-full"), children: [
914
+ /* @__PURE__ */ jsx3(
915
+ "div",
916
+ {
917
+ className: "flex-none w-16 pt-10 select-none",
918
+ style: {
919
+ backgroundColor: "var(--calendar-header-hover, #f1f5f9)",
920
+ borderRight: "1px solid var(--calendar-border, #e2e8f0)"
921
+ },
922
+ children: TIME_SLOTS.map((hour) => hour < END_HOUR && /* @__PURE__ */ jsx3("div", { className: "h-20 relative text-right pr-2", children: /* @__PURE__ */ jsx3("span", { className: "text-xs text-slate-400 dark:text-slate-500 -mt-2 inline-block transform -translate-y-1/2", children: format((/* @__PURE__ */ new Date()).setHours(hour, 0), "HH:mm") }) }, hour))
923
+ }
924
+ ),
925
+ /* @__PURE__ */ jsx3("div", { className: "flex flex-1", children: viewDays.map((day) => /* @__PURE__ */ jsxs(
854
926
  "div",
855
927
  {
856
- className: "h-20 border-b border-gray-100 border-dashed relative group",
928
+ className: "flex-1 min-w-[120px] relative",
929
+ style: { borderRight: "1px solid var(--calendar-border, #e2e8f0)" },
857
930
  children: [
858
- /* @__PURE__ */ jsx3(
931
+ /* @__PURE__ */ jsxs(
859
932
  "div",
860
933
  {
861
- className: "absolute inset-x-0 top-0 h-10 border-b border-transparent hover:border-primary-100 hover:bg-primary-50/30 transition-colors cursor-pointer z-0",
862
- onMouseDown: (e) => {
863
- const d = new Date(day);
864
- d.setHours(hour, 0, 0, 0);
865
- handleMouseDown(d, e);
866
- },
867
- onMouseEnter: () => {
868
- const d = new Date(day);
869
- d.setHours(hour, 0, 0, 0);
870
- handleMouseEnter(d);
934
+ className: "h-10 flex flex-col items-center justify-center sticky top-0 z-10",
935
+ style: {
936
+ backgroundColor: isToday(day) ? "var(--calendar-today-bg, #eff6ff)" : "var(--calendar-bg, #ffffff)",
937
+ borderBottom: "1px solid var(--calendar-border, #e2e8f0)"
871
938
  },
872
- onClick: () => {
873
- if (!isDraggingRef.current) {
874
- const d = new Date(day);
875
- d.setHours(hour, 0, 0, 0);
876
- onSlotClick && onSlotClick(d);
877
- }
878
- }
939
+ children: [
940
+ /* @__PURE__ */ jsx3(
941
+ "span",
942
+ {
943
+ className: "text-xs font-semibold uppercase",
944
+ style: {
945
+ color: isToday(day) ? "var(--calendar-today-text, #2563eb)" : "var(--calendar-days-text, #334155)",
946
+ opacity: isToday(day) ? 1 : 0.6
947
+ },
948
+ children: format(day, "EEE", { locale: es })
949
+ }
950
+ ),
951
+ /* @__PURE__ */ jsx3(
952
+ "span",
953
+ {
954
+ className: "text-sm font-bold w-6 h-6 flex items-center justify-center rounded-full mt-0.5",
955
+ style: {
956
+ color: isToday(day) ? "var(--calendar-selected-text, #ffffff)" : "var(--calendar-days-text, #334155)",
957
+ backgroundColor: isToday(day) ? "var(--calendar-selected-bg, #2563eb)" : "transparent"
958
+ },
959
+ children: format(day, "d")
960
+ }
961
+ )
962
+ ]
879
963
  }
880
964
  ),
881
- /* @__PURE__ */ jsx3(
965
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
966
+ TIME_SLOTS.map((hour) => hour < END_HOUR && /* @__PURE__ */ jsxs(
967
+ "div",
968
+ {
969
+ className: "h-20 relative group",
970
+ style: { borderBottom: "1px dashed var(--calendar-border, #e2e8f0)" },
971
+ children: [
972
+ /* @__PURE__ */ jsx3(
973
+ "div",
974
+ {
975
+ className: "absolute inset-x-0 top-0 h-10 border-b border-transparent hover:border-[var(--calendar-today-bg)] hover:bg-[var(--calendar-today-bg)] transition-colors cursor-pointer z-0",
976
+ onMouseDown: (e) => {
977
+ const d = new Date(day);
978
+ d.setHours(hour, 0, 0, 0);
979
+ handleMouseDown(d, e);
980
+ },
981
+ onMouseEnter: () => {
982
+ const d = new Date(day);
983
+ d.setHours(hour, 0, 0, 0);
984
+ handleMouseEnter(d);
985
+ },
986
+ onClick: () => {
987
+ if (!isDraggingRef.current) {
988
+ const d = new Date(day);
989
+ d.setHours(hour, 0, 0, 0);
990
+ onSlotClick && onSlotClick(d);
991
+ }
992
+ }
993
+ }
994
+ ),
995
+ /* @__PURE__ */ jsx3(
996
+ "div",
997
+ {
998
+ className: "absolute inset-x-0 bottom-0 h-10 hover:border-[var(--calendar-today-bg)] hover:bg-[var(--calendar-today-bg)] transition-colors cursor-pointer z-0",
999
+ onMouseDown: (e) => {
1000
+ const d = new Date(day);
1001
+ d.setHours(hour, 30, 0, 0);
1002
+ handleMouseDown(d, e);
1003
+ },
1004
+ onMouseEnter: () => {
1005
+ const d = new Date(day);
1006
+ d.setHours(hour, 30, 0, 0);
1007
+ handleMouseEnter(d);
1008
+ },
1009
+ onClick: () => {
1010
+ if (!isDraggingRef.current) {
1011
+ const d = new Date(day);
1012
+ d.setHours(hour, 30, 0, 0);
1013
+ onSlotClick && onSlotClick(d);
1014
+ }
1015
+ }
1016
+ }
1017
+ )
1018
+ ]
1019
+ },
1020
+ hour
1021
+ )),
1022
+ dragStart && dragCurrent && isSameDay(dragStart, day) && (() => {
1023
+ let start = dragStart;
1024
+ let end = dragCurrent;
1025
+ if (isBefore(end, start)) [start, end] = [end, start];
1026
+ const finalEnd = addMinutes(end, 30);
1027
+ const startMinutes = start.getHours() * 60 + start.getMinutes();
1028
+ const dayStartMinutes = START_HOUR * 60;
1029
+ const duration = differenceInMinutes(finalEnd, start);
1030
+ const top = (startMinutes - dayStartMinutes) / 60 * 80;
1031
+ const height = duration / 60 * 80;
1032
+ return /* @__PURE__ */ jsx3(
1033
+ "div",
1034
+ {
1035
+ className: "absolute left-1 right-1 bg-[var(--calendar-selected-bg)]/30 border border-[var(--calendar-selected-bg)] rounded z-10 pointer-events-none",
1036
+ style: { top: `${top}px`, height: `${height}px` }
1037
+ }
1038
+ );
1039
+ })(),
1040
+ weekEvents.filter((event) => isSameDay(typeof event.start === "string" ? parseISO(event.start) : event.start, day)).map((event) => {
1041
+ const style = getEventStyle(event);
1042
+ return /* @__PURE__ */ jsxs(
1043
+ "div",
1044
+ {
1045
+ className: cn(
1046
+ "absolute left-1 right-1 rounded px-2 py-1 text-xs cursor-pointer hover:brightness-95 transition-all shadow-sm overflow-hidden z-20 border-l-4",
1047
+ !event.color && "bg-[var(--calendar-today-bg)] text-[var(--calendar-today-text)] border-[var(--calendar-selected-bg)]"
1048
+ ),
1049
+ style: {
1050
+ top: style.top,
1051
+ height: style.height,
1052
+ backgroundColor: event.color ? `${event.color}20` : void 0,
1053
+ borderColor: event.color,
1054
+ color: event.color ? event.color : void 0
1055
+ },
1056
+ onClick: (e) => {
1057
+ e.stopPropagation();
1058
+ onEventClick && onEventClick(event);
1059
+ },
1060
+ children: [
1061
+ /* @__PURE__ */ jsx3("div", { className: "font-semibold truncate", children: event.title }),
1062
+ /* @__PURE__ */ jsxs("div", { className: "opacity-80 truncate", children: [
1063
+ format(typeof event.start === "string" ? parseISO(event.start) : event.start, "HH:mm"),
1064
+ " -",
1065
+ format(typeof event.end === "string" ? parseISO(event.end) : event.end, "HH:mm")
1066
+ ] })
1067
+ ]
1068
+ },
1069
+ event.id
1070
+ );
1071
+ })
1072
+ ] }),
1073
+ isToday(day) && /* @__PURE__ */ jsx3(
882
1074
  "div",
883
1075
  {
884
- className: "absolute inset-x-0 bottom-0 h-10 hover:border-primary-100 hover:bg-primary-50/30 transition-colors cursor-pointer z-0",
885
- onMouseDown: (e) => {
886
- const d = new Date(day);
887
- d.setHours(hour, 30, 0, 0);
888
- handleMouseDown(d, e);
889
- },
890
- onMouseEnter: () => {
891
- const d = new Date(day);
892
- d.setHours(hour, 30, 0, 0);
893
- handleMouseEnter(d);
1076
+ className: "absolute left-0 right-0 border-t-2 border-danger-500 z-30 pointer-events-none",
1077
+ style: {
1078
+ top: `${((/* @__PURE__ */ new Date()).getHours() * 60 + (/* @__PURE__ */ new Date()).getMinutes() - START_HOUR * 60) / 60 * 80}px`
894
1079
  },
895
- onClick: () => {
896
- if (!isDraggingRef.current) {
897
- const d = new Date(day);
898
- d.setHours(hour, 30, 0, 0);
899
- onSlotClick && onSlotClick(d);
900
- }
901
- }
1080
+ children: /* @__PURE__ */ jsx3("div", { className: "absolute -left-1.5 -top-1.5 w-3 h-3 bg-danger-500 rounded-full" })
902
1081
  }
903
1082
  )
904
1083
  ]
905
1084
  },
906
- hour
907
- )),
908
- dragStart && dragCurrent && isSameDay(dragStart, day) && (() => {
909
- let start = dragStart;
910
- let end = dragCurrent;
911
- if (isBefore(end, start)) [start, end] = [end, start];
912
- const finalEnd = addMinutes(end, 30);
913
- const startMinutes = start.getHours() * 60 + start.getMinutes();
914
- const dayStartMinutes = START_HOUR * 60;
915
- const duration = differenceInMinutes(finalEnd, start);
916
- const top = (startMinutes - dayStartMinutes) / 60 * 80;
917
- const height = duration / 60 * 80;
918
- return /* @__PURE__ */ jsx3(
919
- "div",
920
- {
921
- className: "absolute left-1 right-1 bg-primary-500/30 border border-primary-500 rounded z-10 pointer-events-none",
922
- style: { top: `${top}px`, height: `${height}px` }
923
- }
924
- );
925
- })(),
926
- weekEvents.filter((event) => isSameDay(typeof event.start === "string" ? parseISO(event.start) : event.start, day)).map((event) => {
927
- const style = getEventStyle(event);
928
- return /* @__PURE__ */ jsxs(
929
- "div",
930
- {
931
- className: cn(
932
- "absolute left-1 right-1 rounded px-2 py-1 text-xs cursor-pointer hover:brightness-95 transition-all shadow-sm overflow-hidden z-20 border-l-4",
933
- !event.color && "bg-primary-100 text-primary-700 border-primary-500"
934
- ),
935
- style: {
936
- top: style.top,
937
- height: style.height,
938
- backgroundColor: event.color ? `${event.color}20` : void 0,
939
- borderColor: event.color,
940
- color: event.color ? event.color : void 0
941
- },
942
- onClick: (e) => {
943
- e.stopPropagation();
944
- onEventClick && onEventClick(event);
945
- },
946
- children: [
947
- /* @__PURE__ */ jsx3("div", { className: "font-semibold truncate", children: event.title }),
948
- /* @__PURE__ */ jsxs("div", { className: "opacity-80 truncate", children: [
949
- format(typeof event.start === "string" ? parseISO(event.start) : event.start, "HH:mm"),
950
- " -",
951
- format(typeof event.end === "string" ? parseISO(event.end) : event.end, "HH:mm")
952
- ] })
953
- ]
954
- },
955
- event.id
956
- );
957
- })
958
- ] }),
959
- isToday(day) && /* @__PURE__ */ jsx3(
960
- "div",
961
- {
962
- className: "absolute left-0 right-0 border-t-2 border-danger-500 z-30 pointer-events-none",
963
- style: {
964
- top: `${((/* @__PURE__ */ new Date()).getHours() * 60 + (/* @__PURE__ */ new Date()).getMinutes() - START_HOUR * 60) / 60 * 80}px`
965
- },
966
- children: /* @__PURE__ */ jsx3("div", { className: "absolute -left-1.5 -top-1.5 w-3 h-3 bg-danger-500 rounded-full" })
967
- }
968
- )
969
- ] }, day.toISOString())) })
970
- ] })
971
- ) })
1085
+ day.toISOString()
1086
+ )) })
1087
+ ] })
1088
+ )
1089
+ }
1090
+ )
972
1091
  ]
973
1092
  }
974
1093
  );
@@ -1105,6 +1224,7 @@ function ITInput({
1105
1224
  const [isFocused, setIsFocused] = useState4(false);
1106
1225
  const [hasSelectedAll, setHasSelectedAll] = useState4(false);
1107
1226
  const [showPassword, setShowPassword] = useState4(false);
1227
+ const [localTouched, setLocalTouched] = useState4(false);
1108
1228
  const inputRef = useRef(null);
1109
1229
  const inputTheme = theme.input || {};
1110
1230
  const getStyle = () => {
@@ -1117,8 +1237,8 @@ function ITInput({
1117
1237
  borderWidth: "1px",
1118
1238
  borderStyle: "solid",
1119
1239
  transition: "all 0.2s",
1120
- color: theme.colors.gray[900]
1121
- // Default text color
1240
+ color: "var(--input-text-color, var(--color-secondary-900))"
1241
+ // Theme-aware text color
1122
1242
  };
1123
1243
  if (disabled) {
1124
1244
  style.backgroundColor = inputTheme.disabled?.backgroundColor || style.backgroundColor;
@@ -1141,7 +1261,11 @@ function ITInput({
1141
1261
  }
1142
1262
  return style;
1143
1263
  };
1144
- const hasError = touched && error;
1264
+ const isTouched = touched !== void 0 ? touched : localTouched;
1265
+ const isEmpty = isCheckboxOrRadio ? !checked : value === void 0 || value === null || String(value).trim() === "";
1266
+ const effectiveError = error !== void 0 && error !== false ? error === true ? "Este campo es requerido" : error : required && isEmpty ? "Este campo es requerido" : void 0;
1267
+ const hasError = isTouched && !!effectiveError;
1268
+ const errorMessage = typeof effectiveError === "string" ? effectiveError : "Este campo es requerido";
1145
1269
  const handleClick = (e) => {
1146
1270
  if (onClick) {
1147
1271
  onClick();
@@ -1311,6 +1435,7 @@ function ITInput({
1311
1435
  e.currentTarget.select();
1312
1436
  };
1313
1437
  const handleBlur = (e) => {
1438
+ setLocalTouched(true);
1314
1439
  setHasSelectedAll(false);
1315
1440
  setIsFocused(false);
1316
1441
  if (readOnly) {
@@ -1394,7 +1519,14 @@ function ITInput({
1394
1519
  id: name,
1395
1520
  type,
1396
1521
  checked,
1397
- onChange: handleTextChange,
1522
+ onChange: (e) => {
1523
+ setLocalTouched(true);
1524
+ handleTextChange(e);
1525
+ },
1526
+ onBlur: (e) => {
1527
+ setLocalTouched(true);
1528
+ onBlur?.(e);
1529
+ },
1398
1530
  disabled,
1399
1531
  required,
1400
1532
  className: clsx5(
@@ -1403,11 +1535,11 @@ function ITInput({
1403
1535
  type === "checkbox" && "form-checkbox rounded",
1404
1536
  className,
1405
1537
  { "opacity-50 cursor-not-allowed": disabled },
1406
- { "border-red-500": touched && error }
1538
+ { "border-red-500": hasError }
1407
1539
  )
1408
1540
  }
1409
1541
  ),
1410
- label && /* @__PURE__ */ jsxs3("label", { htmlFor: name, className: "text-sm text-gray-700 select-none", children: [
1542
+ label && /* @__PURE__ */ jsxs3("label", { htmlFor: name, className: "text-sm text-gray-700 dark:text-slate-300 select-none", children: [
1411
1543
  label,
1412
1544
  " ",
1413
1545
  required && /* @__PURE__ */ jsx5("span", { className: "text-red-500", children: "*" })
@@ -1421,8 +1553,8 @@ function ITInput({
1421
1553
  {
1422
1554
  htmlFor: name,
1423
1555
  className: clsx5(
1424
- "text-sm font-medium text-gray-700",
1425
- { "text-red-500": touched && error },
1556
+ "text-sm font-medium text-gray-700 dark:text-slate-300",
1557
+ { "text-red-500": hasError },
1426
1558
  labelClassName
1427
1559
  ),
1428
1560
  children: [
@@ -1441,7 +1573,11 @@ function ITInput({
1441
1573
  placeholder,
1442
1574
  value: value ?? "",
1443
1575
  onChange: readOnly ? void 0 : onChange,
1444
- onBlur: readOnly ? void 0 : onBlur,
1576
+ onBlur: (e) => {
1577
+ if (readOnly) return;
1578
+ setLocalTouched(true);
1579
+ onBlur?.(e);
1580
+ },
1445
1581
  readOnly,
1446
1582
  maxLength,
1447
1583
  minLength,
@@ -1473,6 +1609,7 @@ function ITInput({
1473
1609
  onFocus: isNumberType ? handleFocus : () => setIsFocused(true),
1474
1610
  onBlur: isNumberType ? handleBlur : (e) => {
1475
1611
  setIsFocused(false);
1612
+ setLocalTouched(true);
1476
1613
  onBlur?.(e);
1477
1614
  },
1478
1615
  onKeyDown: isNumberType ? handleKeyDown : void 0,
@@ -1519,12 +1656,12 @@ function ITInput({
1519
1656
  ] })
1520
1657
  ] })
1521
1658
  ),
1522
- touched && error && !isCheckboxOrRadio && /* @__PURE__ */ jsx5("div", { className: "flex-shrink-0 min-w-[140px] flex items-center pt-3", children: /* @__PURE__ */ jsx5("p", { className: "text-red-500 text-xs", children: error }) }),
1659
+ hasError && !isCheckboxOrRadio && /* @__PURE__ */ jsx5("div", { className: "flex-shrink-0 min-w-[140px] flex items-center pt-3", children: /* @__PURE__ */ jsx5("p", { className: "text-red-500 text-xs", children: errorMessage }) }),
1523
1660
  showHintLength && (minLength || maxLength) && !isCheckboxOrRadio && /* @__PURE__ */ jsx5("div", { className: "mt-1 text-xs", children: /* @__PURE__ */ jsxs3("p", { className: "text-gray-500", children: [
1524
1661
  currentLength,
1525
1662
  maxLength && `/${maxLength}`
1526
1663
  ] }) }),
1527
- isCheckboxOrRadio && touched && error && /* @__PURE__ */ jsx5("div", { className: "mt-1 text-xs", children: /* @__PURE__ */ jsx5("p", { className: "text-red-500", children: error }) })
1664
+ isCheckboxOrRadio && hasError && /* @__PURE__ */ jsx5("div", { className: "mt-1 text-xs", children: /* @__PURE__ */ jsx5("p", { className: "text-red-500", children: errorMessage }) })
1528
1665
  ] });
1529
1666
  }
1530
1667
 
@@ -1535,8 +1672,8 @@ import { FaChevronLeft as FaChevronLeft2, FaChevronRight as FaChevronRight2 } fr
1535
1672
 
1536
1673
  // src/components/select/select.tsx
1537
1674
  import clsx6 from "clsx";
1538
- import { FaAngleDown } from "react-icons/fa";
1539
1675
  import { useState as useState5 } from "react";
1676
+ import { FaAngleDown } from "react-icons/fa";
1540
1677
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1541
1678
  function ITSelect({
1542
1679
  name,
@@ -1556,7 +1693,13 @@ function ITSelect({
1556
1693
  readOnly = false
1557
1694
  }) {
1558
1695
  const [isFocused, setIsFocused] = useState5(false);
1696
+ const [localTouched, setLocalTouched] = useState5(false);
1559
1697
  const inputTheme = theme.input || {};
1698
+ const isTouched = touched !== void 0 ? touched : localTouched;
1699
+ const isEmpty = value === void 0 || value === null || String(value).trim() === "";
1700
+ const effectiveError = error !== void 0 && error !== false ? error === true ? "Este campo es requerido" : error : required && isEmpty ? "Este campo es requerido" : void 0;
1701
+ const hasError = isTouched && !!effectiveError;
1702
+ const errorMessage = typeof effectiveError === "string" ? effectiveError : "Este campo es requerido";
1560
1703
  const getStyle = () => {
1561
1704
  const style = {
1562
1705
  backgroundColor: inputTheme.backgroundColor,
@@ -1567,7 +1710,7 @@ function ITSelect({
1567
1710
  borderWidth: "1px",
1568
1711
  borderStyle: "solid",
1569
1712
  transition: "all 0.2s",
1570
- color: theme.colors.gray[900],
1713
+ color: "var(--input-text-color, var(--color-secondary-900))",
1571
1714
  appearance: "none"
1572
1715
  // Important for custom styling
1573
1716
  };
@@ -1576,7 +1719,7 @@ function ITSelect({
1576
1719
  style.borderColor = inputTheme.disabled?.borderColor || style.borderColor;
1577
1720
  style.opacity = 0.7;
1578
1721
  }
1579
- if (touched && error) {
1722
+ if (hasError) {
1580
1723
  style.borderColor = inputTheme.error?.borderColor || "red";
1581
1724
  if (isFocused) {
1582
1725
  style.boxShadow = inputTheme.error?.ring;
@@ -1594,8 +1737,8 @@ function ITSelect({
1594
1737
  {
1595
1738
  htmlFor: name,
1596
1739
  className: clsx6(
1597
- "text-sm font-medium text-gray-700 pt-0",
1598
- { "text-red-500": touched && error }
1740
+ "text-sm font-medium text-gray-700 dark:text-slate-300 pt-0",
1741
+ { "text-red-500": hasError }
1599
1742
  ),
1600
1743
  children: [
1601
1744
  label,
@@ -1614,6 +1757,7 @@ function ITSelect({
1614
1757
  onChange: readOnly ? void 0 : onChange,
1615
1758
  onBlur: (e) => {
1616
1759
  setIsFocused(false);
1760
+ setLocalTouched(true);
1617
1761
  readOnly ? void 0 : onBlur?.(e);
1618
1762
  },
1619
1763
  onFocus: () => setIsFocused(true),
@@ -1641,7 +1785,7 @@ function ITSelect({
1641
1785
  ),
1642
1786
  /* @__PURE__ */ jsx6("div", { className: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-gray-500", children: /* @__PURE__ */ jsx6(FaAngleDown, {}) })
1643
1787
  ] }),
1644
- touched && error && /* @__PURE__ */ jsx6("div", { className: "flex-shrink-0 min-w-[140px] flex items-center pt-3", children: /* @__PURE__ */ jsx6("p", { className: "text-red-500 text-xs", children: error }) })
1788
+ hasError && /* @__PURE__ */ jsx6("div", { className: "flex-shrink-0 min-w-[140px] flex items-center pt-3", children: /* @__PURE__ */ jsx6("p", { className: "text-red-500 text-xs", children: errorMessage }) })
1645
1789
  ] })
1646
1790
  ] }) });
1647
1791
  }
@@ -2648,6 +2792,7 @@ function ITDatePicker({
2648
2792
  onChange: handleDateChange,
2649
2793
  minDate,
2650
2794
  maxDate,
2795
+ variant,
2651
2796
  className: "h-auto border-none shadow-none w-full"
2652
2797
  }
2653
2798
  )
@@ -2909,11 +3054,11 @@ function ITTimePicker({
2909
3054
  const handleBlurInput = () => {
2910
3055
  if (!validateTime(inputValue)) {
2911
3056
  setIsValidTime(false);
2912
- onBlur({ target: { name, value } });
3057
+ onBlur?.({ target: { name, value } });
2913
3058
  return;
2914
3059
  }
2915
3060
  setIsValidTime(true);
2916
- onBlur({ target: { name, value: inputValue } });
3061
+ onBlur?.({ target: { name, value: inputValue } });
2917
3062
  };
2918
3063
  const handleHourSelect = (h) => {
2919
3064
  const min = currentMinute || "00";
@@ -3752,6 +3897,7 @@ function ITSearchSelect({
3752
3897
  const [isOpen, setIsOpen] = useState15(false);
3753
3898
  const [searchTerm, setSearchTerm] = useState15("");
3754
3899
  const [isFocused, setIsFocused] = useState15(false);
3900
+ const [localTouched, setLocalTouched] = useState15(false);
3755
3901
  const containerRef = useRef7(null);
3756
3902
  const timeoutRef = useRef7(null);
3757
3903
  const selectedOption = useMemo4(() => {
@@ -3804,10 +3950,16 @@ function ITSearchSelect({
3804
3950
  const handleInputBlur = (e) => {
3805
3951
  setTimeout(() => {
3806
3952
  setIsFocused(false);
3953
+ setLocalTouched(true);
3807
3954
  onBlur?.(e);
3808
3955
  }, 200);
3809
3956
  };
3810
3957
  const inputTheme = theme.input || {};
3958
+ const isTouched = touched !== void 0 ? touched : localTouched;
3959
+ const isEmpty = value === void 0 || value === null || String(value).trim() === "";
3960
+ const effectiveError = error !== void 0 && error !== false ? error === true ? "Este campo es requerido" : error : required && isEmpty ? "Este campo es requerido" : void 0;
3961
+ const hasError = isTouched && !!effectiveError;
3962
+ const errorMessage = typeof effectiveError === "string" ? effectiveError : "Este campo es requerido";
3811
3963
  const getInputStyle = () => {
3812
3964
  const style = {
3813
3965
  backgroundColor: inputTheme.backgroundColor || "#ffffff",
@@ -3818,7 +3970,7 @@ function ITSearchSelect({
3818
3970
  borderWidth: "1px",
3819
3971
  borderStyle: "solid",
3820
3972
  transition: "all 0.2s",
3821
- color: theme.colors.gray[900],
3973
+ color: "var(--input-text-color, var(--color-secondary-900))",
3822
3974
  width: "100%"
3823
3975
  };
3824
3976
  if (disabled) {
@@ -3827,7 +3979,7 @@ function ITSearchSelect({
3827
3979
  style.opacity = 0.7;
3828
3980
  style.cursor = "not-allowed";
3829
3981
  }
3830
- if (touched && error) {
3982
+ if (hasError) {
3831
3983
  style.borderColor = inputTheme.error?.borderColor || "red";
3832
3984
  if (isFocused) {
3833
3985
  style.boxShadow = inputTheme.error?.ring;
@@ -3838,12 +3990,12 @@ function ITSearchSelect({
3838
3990
  }
3839
3991
  return style;
3840
3992
  };
3841
- return /* @__PURE__ */ jsxs14("div", { className: clsx14("w-full flex flex-col gap-1.5", className), ref: containerRef, children: [
3993
+ return /* @__PURE__ */ jsxs14("div", { className: clsx14("w-full flex flex-col gap-1.5", className, isOpen && "relative z-30"), ref: containerRef, children: [
3842
3994
  label && /* @__PURE__ */ jsxs14(
3843
3995
  "label",
3844
3996
  {
3845
- className: clsx14("text-sm font-medium text-gray-700", {
3846
- "text-red-500": touched && error
3997
+ className: clsx14("text-sm font-medium text-gray-700 dark:text-slate-300", {
3998
+ "text-red-500": hasError
3847
3999
  }),
3848
4000
  children: [
3849
4001
  label,
@@ -3875,20 +4027,20 @@ function ITSearchSelect({
3875
4027
  !isLoading && /* @__PURE__ */ jsx19(FaSearch, { size: 14, className: clsx14({ "text-primary-500": isFocused }) })
3876
4028
  ] })
3877
4029
  ] }),
3878
- isOpen && /* @__PURE__ */ jsx19("div", { className: "absolute z-50 w-full mt-1 bg-white border border-gray-200 rounded-lg shadow-xl overflow-hidden animate-in fade-in zoom-in duration-200 origin-top", children: /* @__PURE__ */ jsx19("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx19(
4030
+ isOpen && /* @__PURE__ */ jsx19("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__ */ jsx19("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx19(
3879
4031
  "div",
3880
4032
  {
3881
4033
  onClick: () => handleSelect(option),
3882
4034
  className: clsx14(
3883
4035
  "px-4 py-2 text-sm cursor-pointer transition-colors",
3884
- value === option[valueField] ? "bg-primary-50 text-primary-700 font-medium" : "hover:bg-gray-50 text-gray-700"
4036
+ 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"
3885
4037
  ),
3886
4038
  children: option[labelField]
3887
4039
  },
3888
4040
  option[valueField]
3889
4041
  )) : /* @__PURE__ */ jsx19("div", { className: "px-4 py-6 text-sm text-center text-gray-500 italic", children: isLoading ? "Cargando..." : noResultsMessage }) }) })
3890
4042
  ] }),
3891
- touched && error && /* @__PURE__ */ jsx19("p", { className: "text-red-500 text-xs mt-1", children: error })
4043
+ hasError && /* @__PURE__ */ jsx19("p", { className: "text-red-500 text-xs mt-1", children: errorMessage })
3892
4044
  ] });
3893
4045
  }
3894
4046
 
@@ -4165,6 +4317,23 @@ import { useState as useState19, useEffect as useEffect15, useRef as useRef8 } f
4165
4317
  import { useDropzone } from "react-dropzone";
4166
4318
  import clsx18 from "clsx";
4167
4319
  import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
4320
+ var FileTypeEnum = /* @__PURE__ */ ((FileTypeEnum2) => {
4321
+ FileTypeEnum2["PDF"] = "application/pdf";
4322
+ FileTypeEnum2["XLS"] = "application/vnd.ms-excel";
4323
+ FileTypeEnum2["XLSX"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
4324
+ FileTypeEnum2["CSV"] = "text/csv";
4325
+ FileTypeEnum2["PNG"] = "image/png";
4326
+ FileTypeEnum2["JPG"] = "image/jpg";
4327
+ FileTypeEnum2["JPEG"] = "image/jpeg";
4328
+ return FileTypeEnum2;
4329
+ })(FileTypeEnum || {});
4330
+ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
4331
+ UploadStatus2["PENDING"] = "pendiente";
4332
+ UploadStatus2["UPLOADING"] = "subiendo";
4333
+ UploadStatus2["UPLOADED"] = "subido";
4334
+ UploadStatus2["ERROR"] = "error";
4335
+ return UploadStatus2;
4336
+ })(UploadStatus || {});
4168
4337
  var ITDropfile = ({
4169
4338
  onFileSelect,
4170
4339
  onCancel,
@@ -4641,7 +4810,8 @@ function ITSidebar({
4641
4810
  className = "",
4642
4811
  visibleOnMobile = false,
4643
4812
  onItemClick,
4644
- onSubItemClick
4813
+ onSubItemClick,
4814
+ subitemConnector = "|"
4645
4815
  }) {
4646
4816
  const [expandedItems, setExpandedItems] = useState21(/* @__PURE__ */ new Set());
4647
4817
  const [isHovering, setIsHovering] = useState21(false);
@@ -4673,6 +4843,27 @@ function ITSidebar({
4673
4843
  if (leaveTimeoutRef.current) clearTimeout(leaveTimeoutRef.current);
4674
4844
  };
4675
4845
  }, [isCollapsed]);
4846
+ useEffect16(() => {
4847
+ const activeParents = /* @__PURE__ */ new Set();
4848
+ navigationItems.forEach((item) => {
4849
+ if (item.subitems && item.subitems.some((sub) => sub.isActive)) {
4850
+ activeParents.add(item.id);
4851
+ }
4852
+ });
4853
+ if (activeParents.size > 0) {
4854
+ setExpandedItems((prev) => {
4855
+ const next = new Set(prev);
4856
+ let changed = false;
4857
+ activeParents.forEach((id) => {
4858
+ if (!next.has(id)) {
4859
+ next.add(id);
4860
+ changed = true;
4861
+ }
4862
+ });
4863
+ return changed ? next : prev;
4864
+ });
4865
+ }
4866
+ }, [navigationItems]);
4676
4867
  const toggleExpanded = (itemId) => {
4677
4868
  const newExpanded = new Set(expandedItems);
4678
4869
  if (newExpanded.has(itemId)) newExpanded.delete(itemId);
@@ -4819,39 +5010,48 @@ function ITSidebar({
4819
5010
  ]
4820
5011
  }
4821
5012
  ),
4822
- !isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx27("div", { className: `overflow-hidden transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "max-h-[500px] opacity-100 mt-1" : "max-h-0 opacity-0"}`, children: /* @__PURE__ */ jsx27("ul", { className: "ml-5 pl-4 space-y-1 py-1", style: { borderLeft: `2px solid ${theme.sidebar?.borderColor || "#e2e8f0"}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ jsxs19("li", { className: "relative", children: [
4823
- subitem.isActive && /* @__PURE__ */ jsx27("div", { className: "absolute -left-[18px] top-1/2 -translate-y-1/2 w-4 h-[2px] rounded-r-full", style: { backgroundColor: theme.sidebar?.active?.iconColor || "#10b981" } }),
4824
- /* @__PURE__ */ jsx27(
4825
- "button",
4826
- {
4827
- onClick: () => {
4828
- if (subitem.action) subitem.action();
4829
- if (onSubItemClick) onSubItemClick(subitem);
4830
- },
4831
- className: `block w-full text-left px-4 py-2 rounded-xl transition-all duration-300`,
4832
- style: {
4833
- color: subitem.isActive ? theme.sidebar?.active?.color || "#0f172a" : theme.sidebar?.label?.color || "#475569",
4834
- backgroundColor: subitem.isActive ? theme.sidebar?.active?.backgroundColor || "#f8fafc" : "transparent",
4835
- fontSize: "0.85rem",
4836
- fontWeight: subitem.isActive ? 600 : 500,
4837
- letterSpacing: "0.01em"
4838
- },
4839
- onMouseEnter: (e) => {
4840
- if (!subitem.isActive) {
4841
- e.currentTarget.style.backgroundColor = theme.sidebar?.hover?.backgroundColor || "#f1f5f9";
4842
- e.currentTarget.style.transform = "translateX(4px)";
4843
- }
4844
- },
4845
- onMouseLeave: (e) => {
4846
- if (!subitem.isActive) {
4847
- e.currentTarget.style.backgroundColor = "transparent";
4848
- e.currentTarget.style.transform = "translateX(0)";
5013
+ !isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx27("div", { className: `overflow-hidden transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "max-h-[500px] opacity-100 mt-1" : "max-h-0 opacity-0"}`, children: /* @__PURE__ */ jsx27(
5014
+ "ul",
5015
+ {
5016
+ className: "ml-5 pl-4 space-y-1 py-1",
5017
+ style: {
5018
+ borderLeft: subitemConnector === "none" ? "none" : `2px ${subitemConnector === "dots" ? "dotted" : "solid"} ${theme.sidebar?.borderColor || "#e2e8f0"}`
5019
+ },
5020
+ children: item.subitems.map((subitem) => /* @__PURE__ */ jsxs19("li", { className: "relative", children: [
5021
+ subitem.isActive && (subitemConnector === "lines" || subitemConnector === "dots") && /* @__PURE__ */ jsx27("div", { className: "absolute -left-[18px] top-1/2 -translate-y-1/2 w-4 h-[2px] rounded-r-full", style: { backgroundColor: theme.sidebar?.active?.iconColor || "#10b981" } }),
5022
+ /* @__PURE__ */ jsx27(
5023
+ "button",
5024
+ {
5025
+ onClick: () => {
5026
+ if (subitem.action) subitem.action();
5027
+ if (onSubItemClick) onSubItemClick(subitem);
5028
+ },
5029
+ className: `block w-full text-left px-4 py-2 rounded-xl transition-all duration-300`,
5030
+ style: {
5031
+ color: subitem.isActive ? theme.sidebar?.active?.color || "#0f172a" : theme.sidebar?.label?.color || "#475569",
5032
+ backgroundColor: subitem.isActive ? theme.sidebar?.active?.backgroundColor || "#f8fafc" : "transparent",
5033
+ fontSize: "0.85rem",
5034
+ fontWeight: subitem.isActive ? 600 : 500,
5035
+ letterSpacing: "0.01em"
5036
+ },
5037
+ onMouseEnter: (e) => {
5038
+ if (!subitem.isActive) {
5039
+ e.currentTarget.style.backgroundColor = theme.sidebar?.hover?.backgroundColor || "#f1f5f9";
5040
+ e.currentTarget.style.transform = "translateX(4px)";
5041
+ }
5042
+ },
5043
+ onMouseLeave: (e) => {
5044
+ if (!subitem.isActive) {
5045
+ e.currentTarget.style.backgroundColor = "transparent";
5046
+ e.currentTarget.style.transform = "translateX(0)";
5047
+ }
5048
+ },
5049
+ children: subitem.label
4849
5050
  }
4850
- },
4851
- children: subitem.label
4852
- }
4853
- )
4854
- ] }, subitem.id)) }) })
5051
+ )
5052
+ ] }, subitem.id))
5053
+ }
5054
+ ) })
4855
5055
  ] }, item.id)) }) })
4856
5056
  }
4857
5057
  );
@@ -5211,153 +5411,1756 @@ function ITStepper({
5211
5411
  }
5212
5412
 
5213
5413
  // src/components/theme-provider/themeProvider.tsx
5214
- import { useMemo as useMemo5 } from "react";
5414
+ import { createContext as createContext2, useContext as useContext2, useState as useState24, useEffect as useEffect18 } from "react";
5415
+ import { MdPalette, MdClose, MdRefresh, MdCheck } from "react-icons/md";
5215
5416
  import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
5216
- function ITThemeProvider({ theme: theme2, children }) {
5217
- const activeThemeContext = useMemo5(() => {
5218
- const baseColors = {
5219
- primary: palette.blue,
5220
- secondary: palette.gray,
5221
- success: palette.success,
5222
- danger: palette.danger,
5223
- warning: palette.warning,
5224
- info: palette.cyan,
5225
- purple: palette.purple
5226
- };
5227
- return {
5228
- colors: {
5229
- ...baseColors,
5230
- ...theme2?.colors
5417
+ var STORAGE_KEY = "it-theme-palette";
5418
+ var DEFAULT_PALETTE = {
5419
+ primary: "#06b6d4",
5420
+ // Cyan
5421
+ secondary: "#6b7280",
5422
+ // Gray
5423
+ ternary: "#8b5cf6",
5424
+ // Purple/Violet
5425
+ danger: "#ef4444",
5426
+ // Red
5427
+ success: "#22c55e",
5428
+ // Green
5429
+ info: "#3b82f6",
5430
+ // Blue
5431
+ alert: "#f97316",
5432
+ // Orange
5433
+ warning: "#eab308",
5434
+ // Yellow
5435
+ layout: {
5436
+ sidebarBg: "#0f172a",
5437
+ // Dark slate-900
5438
+ sidebarText: "#94a3b8",
5439
+ // Slate-400
5440
+ navbarBg: "#ffffff",
5441
+ // White
5442
+ navbarText: "#1e293b"
5443
+ // Slate-800
5444
+ },
5445
+ table: {
5446
+ headerBg: "#f8fafc",
5447
+ // Slate-50
5448
+ headerText: "#334155",
5449
+ // Slate-700
5450
+ rowBg: "#ffffff",
5451
+ // White
5452
+ rowText: "#1e293b"
5453
+ // Slate-800
5454
+ }
5455
+ };
5456
+ var PRESETS = [
5457
+ {
5458
+ name: "Midnight Nova \u{1F30C}",
5459
+ colors: {
5460
+ primary: "#6366f1",
5461
+ // Indigo
5462
+ secondary: "#475569",
5463
+ // Slate
5464
+ ternary: "#a855f7",
5465
+ // Purple
5466
+ danger: "#ef4444",
5467
+ success: "#22c55e",
5468
+ info: "#38bdf8",
5469
+ alert: "#f97316",
5470
+ warning: "#eab308",
5471
+ layout: {
5472
+ sidebarBg: "#020617",
5473
+ // Slate-950
5474
+ sidebarText: "#cbd5e1",
5475
+ navbarBg: "#0f172a",
5476
+ navbarText: "#f8fafc"
5477
+ },
5478
+ table: {
5479
+ headerBg: "#1e293b",
5480
+ headerText: "#e2e8f0",
5481
+ rowBg: "#0f172a",
5482
+ rowText: "#cbd5e1"
5483
+ }
5484
+ }
5485
+ },
5486
+ {
5487
+ name: "Tokyo Drift \u{1F3CE}\uFE0F",
5488
+ colors: {
5489
+ primary: "#f43f5e",
5490
+ // Rose
5491
+ secondary: "#64748b",
5492
+ ternary: "#fb923c",
5493
+ // Orange
5494
+ danger: "#dc2626",
5495
+ success: "#16a34a",
5496
+ info: "#0ea5e9",
5497
+ alert: "#f97316",
5498
+ warning: "#facc15",
5499
+ layout: {
5500
+ sidebarBg: "#0f050b",
5501
+ // Deep rose-slate
5502
+ sidebarText: "#fda4af",
5503
+ navbarBg: "#1c0a15",
5504
+ navbarText: "#ffe4e6"
5505
+ },
5506
+ table: {
5507
+ headerBg: "#2e1022",
5508
+ headerText: "#fecdd3",
5509
+ rowBg: "#1c0a15",
5510
+ rowText: "#ffe4e6"
5511
+ }
5512
+ }
5513
+ },
5514
+ {
5515
+ name: "Ocean Core \u{1F30A}",
5516
+ colors: {
5517
+ primary: "#0ea5e9",
5518
+ // Sky
5519
+ secondary: "#64748b",
5520
+ ternary: "#14b8a6",
5521
+ // Teal
5522
+ danger: "#ef4444",
5523
+ success: "#10b981",
5524
+ info: "#3b82f6",
5525
+ alert: "#f97316",
5526
+ warning: "#eab308",
5527
+ layout: {
5528
+ sidebarBg: "#031b2f",
5529
+ // Deep ocean blue
5530
+ sidebarText: "#7dd3fc",
5531
+ navbarBg: "#0b253c",
5532
+ navbarText: "#e0f2fe"
5533
+ },
5534
+ table: {
5535
+ headerBg: "#0c2e4b",
5536
+ headerText: "#bae6fd",
5537
+ rowBg: "#0b253c",
5538
+ rowText: "#e0f2fe"
5539
+ }
5540
+ }
5541
+ },
5542
+ {
5543
+ name: "Matrix Pulse \u{1F49A}",
5544
+ colors: {
5545
+ primary: "#10b981",
5546
+ // Emerald
5547
+ secondary: "#64748b",
5548
+ ternary: "#84cc16",
5549
+ // Lime
5550
+ danger: "#ef4444",
5551
+ success: "#16a34a",
5552
+ info: "#06b6d4",
5553
+ alert: "#f59e0b",
5554
+ warning: "#eab308",
5555
+ layout: {
5556
+ sidebarBg: "#022c1b",
5557
+ // Deep forest green
5558
+ sidebarText: "#6ee7b7",
5559
+ navbarBg: "#043e26",
5560
+ navbarText: "#d1fae5"
5231
5561
  },
5562
+ table: {
5563
+ headerBg: "#064e3b",
5564
+ headerText: "#a7f3d0",
5565
+ rowBg: "#043e26",
5566
+ rowText: "#d1fae5"
5567
+ }
5568
+ }
5569
+ },
5570
+ {
5571
+ name: "Royal Velvet \u{1F451}",
5572
+ colors: {
5573
+ primary: "#8b5cf6",
5574
+ // Violet
5575
+ secondary: "#64748b",
5576
+ ternary: "#ec4899",
5577
+ // Pink
5578
+ danger: "#e11d48",
5579
+ success: "#22c55e",
5580
+ info: "#3b82f6",
5581
+ alert: "#f97316",
5582
+ warning: "#facc15",
5232
5583
  layout: {
5233
- ...theme.layout,
5234
- ...theme2?.layout
5584
+ sidebarBg: "#1e0b36",
5585
+ // Deep royal purple
5586
+ sidebarText: "#c084fc",
5587
+ navbarBg: "#291048",
5588
+ navbarText: "#f3e8ff"
5589
+ },
5590
+ table: {
5591
+ headerBg: "#3b1764",
5592
+ headerText: "#e9d5ff",
5593
+ rowBg: "#291048",
5594
+ rowText: "#f3e8ff"
5235
5595
  }
5596
+ }
5597
+ }
5598
+ ];
5599
+ var ITThemeContext = createContext2(void 0);
5600
+ var useITTheme = () => {
5601
+ const context = useContext2(ITThemeContext);
5602
+ if (!context) {
5603
+ throw new Error("useITTheme must be used within an ITThemeProvider");
5604
+ }
5605
+ return context;
5606
+ };
5607
+ var getNestedValue3 = (obj, path) => {
5608
+ return path.split(".").reduce((acc, part) => acc && acc[part], obj);
5609
+ };
5610
+ var isLightColor = (hex) => {
5611
+ if (!hex || typeof hex !== "string") return false;
5612
+ const color = hex.replace("#", "");
5613
+ let r = 0, g = 0, b = 0;
5614
+ if (color.length === 3) {
5615
+ r = parseInt(color[0] + color[0], 16);
5616
+ g = parseInt(color[1] + color[1], 16);
5617
+ b = parseInt(color[2] + color[2], 16);
5618
+ } else if (color.length === 6) {
5619
+ r = parseInt(color.substring(0, 2), 16);
5620
+ g = parseInt(color.substring(2, 4), 16);
5621
+ b = parseInt(color.substring(4, 6), 16);
5622
+ } else {
5623
+ return false;
5624
+ }
5625
+ const brightness = (r * 299 + g * 587 + b * 114) / 1e3;
5626
+ return brightness > 140;
5627
+ };
5628
+ function ITThemeProvider({ children, theme: theme2 }) {
5629
+ const [palette2, setPaletteState] = useState24(() => {
5630
+ const basePalette = {
5631
+ ...DEFAULT_PALETTE,
5632
+ ...theme2,
5633
+ layout: { ...DEFAULT_PALETTE.layout, ...theme2?.layout },
5634
+ table: { ...DEFAULT_PALETTE.table, ...theme2?.table }
5236
5635
  };
5237
- }, [theme2]);
5238
- const cssVariables = useMemo5(() => {
5239
- let variablesString = "";
5240
- Object.entries(activeThemeContext.colors).forEach(([colorName, scale]) => {
5241
- Object.entries(scale).forEach(([shade, hexValue]) => {
5242
- variablesString += `--color-${colorName}-${shade}: ${hexValue};
5243
- `;
5244
- });
5245
- });
5246
- if (theme2?.layout) {
5247
- if (theme2.layout.backgroundColor) variablesString += `--layout-bg: ${theme2.layout.backgroundColor};
5248
- `;
5249
- if (theme2.layout.contentPadding) variablesString += `--layout-padding: ${theme2.layout.contentPadding};
5250
- `;
5251
- }
5252
- if (theme2?.topbar) {
5253
- if (theme2.topbar.backgroundColor) variablesString += `--topbar-bg: ${theme2.topbar.backgroundColor};
5254
- `;
5255
- if (theme2.topbar.borderColor) variablesString += `--topbar-border: ${theme2.topbar.borderColor};
5256
- `;
5257
- if (theme2.topbar.iconColor) variablesString += `--topbar-icon: ${theme2.topbar.iconColor};
5258
- `;
5259
- if (theme2.topbar.iconHoverColor) variablesString += `--topbar-icon-hover: ${theme2.topbar.iconHoverColor};
5260
- `;
5261
- if (theme2.topbar.shadow) variablesString += `--topbar-shadow: ${theme2.topbar.shadow};
5262
- `;
5263
- if (theme2.topbar.textColor) variablesString += `--topbar-text: ${theme2.topbar.textColor};
5264
- `;
5265
- if (theme2.topbar.textHoverColor) variablesString += `--topbar-text-hover: ${theme2.topbar.textHoverColor};
5266
- `;
5267
- if (theme2.topbar.userMenu) {
5268
- if (theme2.topbar.userMenu.backgroundColor) variablesString += `--topbar-user-bg: ${theme2.topbar.userMenu.backgroundColor};
5269
- `;
5270
- if (theme2.topbar.userMenu.hoverBackground) variablesString += `--topbar-user-hover: ${theme2.topbar.userMenu.hoverBackground};
5271
- `;
5272
- if (theme2.topbar.userMenu.textColor) variablesString += `--topbar-user-text: ${theme2.topbar.userMenu.textColor};
5273
- `;
5274
- if (theme2.topbar.userMenu.subtitleColor) variablesString += `--topbar-user-subtitle: ${theme2.topbar.userMenu.subtitleColor};
5275
- `;
5276
- if (theme2.topbar.userMenu.dropdown) {
5277
- if (theme2.topbar.userMenu.dropdown.backgroundColor) variablesString += `--topbar-user-dropdown-bg: ${theme2.topbar.userMenu.dropdown.backgroundColor};
5278
- `;
5279
- if (theme2.topbar.userMenu.dropdown.borderColor) variablesString += `--topbar-user-dropdown-border: ${theme2.topbar.userMenu.dropdown.borderColor};
5280
- `;
5281
- if (theme2.topbar.userMenu.dropdown.itemHoverBackground) variablesString += `--topbar-user-item-hover: ${theme2.topbar.userMenu.dropdown.itemHoverBackground};
5282
- `;
5636
+ try {
5637
+ const saved = localStorage.getItem(STORAGE_KEY);
5638
+ if (saved) {
5639
+ const parsed = JSON.parse(saved);
5640
+ return {
5641
+ ...basePalette,
5642
+ ...parsed,
5643
+ layout: { ...basePalette.layout, ...parsed.layout },
5644
+ table: { ...basePalette.table, ...parsed.table }
5645
+ };
5646
+ }
5647
+ } catch (e) {
5648
+ console.error("Failed to load theme from localStorage", e);
5649
+ }
5650
+ return basePalette;
5651
+ });
5652
+ const [isOpen, setIsOpen] = useState24(false);
5653
+ const [showSavedToast, setShowSavedToast] = useState24(false);
5654
+ const [resolvedTheme, setResolvedTheme] = useState24("light");
5655
+ const [darkModeMode, setDarkModeMode] = useState24(() => {
5656
+ const saved = localStorage.getItem("it-theme-dark-mode");
5657
+ if (saved === "light" || saved === "dark" || saved === "system") {
5658
+ return saved;
5659
+ }
5660
+ return "system";
5661
+ });
5662
+ useEffect18(() => {
5663
+ localStorage.setItem("it-theme-dark-mode", darkModeMode);
5664
+ const applyDarkMode = (isDark) => {
5665
+ if (isDark) {
5666
+ document.documentElement.classList.add("dark");
5667
+ document.documentElement.setAttribute("data-theme", "dark");
5668
+ setResolvedTheme("dark");
5669
+ } else {
5670
+ document.documentElement.classList.remove("dark");
5671
+ document.documentElement.setAttribute("data-theme", "light");
5672
+ setResolvedTheme("light");
5673
+ }
5674
+ };
5675
+ if (darkModeMode === "system") {
5676
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
5677
+ applyDarkMode(mediaQuery.matches);
5678
+ const listener = (e) => {
5679
+ applyDarkMode(e.matches);
5680
+ };
5681
+ mediaQuery.addEventListener("change", listener);
5682
+ return () => mediaQuery.removeEventListener("change", listener);
5683
+ } else {
5684
+ applyDarkMode(darkModeMode === "dark");
5685
+ }
5686
+ }, [darkModeMode]);
5687
+ useEffect18(() => {
5688
+ const injectStyles = (obj, prefix = "") => {
5689
+ Object.entries(obj).forEach(([key, val]) => {
5690
+ if (typeof val === "object" && val !== null) {
5691
+ injectStyles(val, prefix + key + "-");
5692
+ } else {
5693
+ document.documentElement.style.setProperty(`--color-${prefix}${key}`, val);
5694
+ if (prefix === "layout-") {
5695
+ document.documentElement.style.setProperty(`--color-${key}`, val);
5696
+ }
5283
5697
  }
5698
+ });
5699
+ };
5700
+ injectStyles(palette2);
5701
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(palette2));
5702
+ let styleTag = document.getElementById("it-theme-dynamic-overrides");
5703
+ if (!styleTag) {
5704
+ styleTag = document.createElement("style");
5705
+ styleTag.id = "it-theme-dynamic-overrides";
5706
+ document.head.appendChild(styleTag);
5707
+ }
5708
+ const isDark = resolvedTheme === "dark";
5709
+ let tableRowBg = palette2.table.rowBg;
5710
+ let tableRowText = palette2.table.rowText;
5711
+ let tableHeaderBg = palette2.table.headerBg;
5712
+ let tableHeaderText = palette2.table.headerText;
5713
+ let navbarBg = palette2.layout.navbarBg;
5714
+ let navbarText = palette2.layout.navbarText;
5715
+ let sidebarBg = palette2.layout.sidebarBg;
5716
+ let sidebarText = palette2.layout.sidebarText;
5717
+ if (isDark) {
5718
+ if (isLightColor(tableRowBg)) {
5719
+ tableRowBg = `color-mix(in srgb, ${palette2.table.rowBg} 8%, #111827)`;
5720
+ }
5721
+ if (!isLightColor(tableRowText)) {
5722
+ tableRowText = `color-mix(in srgb, ${palette2.table.rowText} 20%, #f3f4f6)`;
5723
+ }
5724
+ if (isLightColor(tableHeaderBg)) {
5725
+ tableHeaderBg = `color-mix(in srgb, ${palette2.table.headerBg} 12%, #1f2937)`;
5726
+ }
5727
+ if (!isLightColor(tableHeaderText)) {
5728
+ tableHeaderText = `color-mix(in srgb, ${palette2.table.headerText} 20%, #f9fafb)`;
5729
+ }
5730
+ if (isLightColor(navbarBg)) {
5731
+ navbarBg = `color-mix(in srgb, ${palette2.layout.navbarBg} 8%, #111827)`;
5732
+ }
5733
+ if (!isLightColor(navbarText)) {
5734
+ navbarText = `color-mix(in srgb, ${palette2.layout.navbarText} 20%, #f3f4f6)`;
5735
+ }
5736
+ if (isLightColor(sidebarBg)) {
5737
+ sidebarBg = `color-mix(in srgb, ${palette2.layout.sidebarBg} 8%, #0f172a)`;
5738
+ }
5739
+ if (!isLightColor(sidebarText)) {
5740
+ sidebarText = `color-mix(in srgb, ${palette2.layout.sidebarText} 20%, #cbd5e1)`;
5741
+ }
5742
+ } else {
5743
+ if (!isLightColor(tableRowBg)) {
5744
+ tableRowBg = `color-mix(in srgb, ${palette2.table.rowBg} 8%, #ffffff)`;
5745
+ }
5746
+ if (isLightColor(tableRowText)) {
5747
+ tableRowText = `color-mix(in srgb, ${palette2.table.rowText} 30%, #1e293b)`;
5748
+ }
5749
+ if (!isLightColor(tableHeaderBg)) {
5750
+ tableHeaderBg = `color-mix(in srgb, ${palette2.table.headerBg} 12%, #f8fafc)`;
5751
+ }
5752
+ if (isLightColor(tableHeaderText)) {
5753
+ tableHeaderText = `color-mix(in srgb, ${palette2.table.headerText} 30%, #334155)`;
5754
+ }
5755
+ if (!isLightColor(navbarBg)) {
5756
+ navbarBg = `color-mix(in srgb, ${palette2.layout.navbarBg} 8%, #ffffff)`;
5757
+ }
5758
+ if (isLightColor(navbarText)) {
5759
+ navbarText = `color-mix(in srgb, ${palette2.layout.navbarText} 30%, #1e293b)`;
5760
+ }
5761
+ if (!isLightColor(sidebarBg)) {
5762
+ sidebarBg = `color-mix(in srgb, ${palette2.layout.sidebarBg} 8%, #ffffff)`;
5763
+ }
5764
+ if (isLightColor(sidebarText)) {
5765
+ sidebarText = `color-mix(in srgb, ${palette2.layout.sidebarText} 30%, #1e293b)`;
5284
5766
  }
5285
5767
  }
5286
- if (theme2?.sidebar) {
5287
- if (theme2.sidebar.backgroundColor) variablesString += `--sidebar-bg: ${theme2.sidebar.backgroundColor};
5288
- `;
5289
- if (theme2.sidebar.borderColor) variablesString += `--sidebar-border: ${theme2.sidebar.borderColor};
5290
- `;
5291
- if (theme2.sidebar.label) {
5292
- if (theme2.sidebar.label.color) variablesString += `--sidebar-label-color: ${theme2.sidebar.label.color};
5293
- `;
5294
- if (theme2.sidebar.label.size) variablesString += `--sidebar-label-size: ${theme2.sidebar.label.size};
5295
- `;
5296
- if (theme2.sidebar.label.weight) variablesString += `--sidebar-label-weight: ${theme2.sidebar.label.weight};
5297
- `;
5298
- }
5299
- if (theme2.sidebar.icon) {
5300
- if (theme2.sidebar.icon.color) variablesString += `--sidebar-icon-color: ${theme2.sidebar.icon.color};
5301
- `;
5302
- if (theme2.sidebar.icon.size) variablesString += `--sidebar-icon-size: ${theme2.sidebar.icon.size};
5303
- `;
5304
- }
5305
- if (theme2.sidebar.hover?.backgroundColor) variablesString += `--sidebar-hover-bg: ${theme2.sidebar.hover.backgroundColor};
5306
- `;
5307
- if (theme2.sidebar.active) {
5308
- if (theme2.sidebar.active.backgroundColor) variablesString += `--sidebar-active-bg: ${theme2.sidebar.active.backgroundColor};
5309
- `;
5310
- if (theme2.sidebar.active.color) variablesString += `--sidebar-active-color: ${theme2.sidebar.active.color};
5311
- `;
5312
- if (theme2.sidebar.active.iconColor) variablesString += `--sidebar-active-icon: ${theme2.sidebar.active.iconColor};
5313
- `;
5314
- }
5315
- if (theme2.sidebar.badge) {
5316
- if (theme2.sidebar.badge.backgroundColor) variablesString += `--sidebar-badge-bg: ${theme2.sidebar.badge.backgroundColor};
5317
- `;
5318
- if (theme2.sidebar.badge.color) variablesString += `--sidebar-badge-color: ${theme2.sidebar.badge.color};
5319
- `;
5320
- }
5321
- }
5322
- if (theme2?.calendar) {
5323
- if (theme2.calendar.backgroundColor) variablesString += `--calendar-bg: ${theme2.calendar.backgroundColor};
5324
- `;
5325
- if (theme2.calendar.borderColor) variablesString += `--calendar-border: ${theme2.calendar.borderColor};
5326
- `;
5327
- if (theme2.calendar.header) {
5328
- if (theme2.calendar.header.textColor) variablesString += `--calendar-header-text: ${theme2.calendar.header.textColor};
5329
- `;
5330
- if (theme2.calendar.header.hoverBackground) variablesString += `--calendar-header-hover: ${theme2.calendar.header.hoverBackground};
5331
- `;
5332
- }
5333
- if (theme2.calendar.days) {
5334
- if (theme2.calendar.days.textColor) variablesString += `--calendar-days-text: ${theme2.calendar.days.textColor};
5335
- `;
5336
- if (theme2.calendar.days.weekendColor) variablesString += `--calendar-days-weekend: ${theme2.calendar.days.weekendColor};
5337
- `;
5338
- if (theme2.calendar.days.outsideMonthColor) variablesString += `--calendar-days-outside: ${theme2.calendar.days.outsideMonthColor};
5339
- `;
5340
- }
5341
- if (theme2.calendar.selection) {
5342
- if (theme2.calendar.selection.selectedColor) variablesString += `--calendar-selected-text: ${theme2.calendar.selection.selectedColor};
5343
- `;
5344
- if (theme2.calendar.selection.selectedBackground) variablesString += `--calendar-selected-bg: ${theme2.calendar.selection.selectedBackground};
5345
- `;
5346
- if (theme2.calendar.selection.rangeBackground) variablesString += `--calendar-range-bg: ${theme2.calendar.selection.rangeBackground};
5347
- `;
5348
- if (theme2.calendar.selection.todayBackground) variablesString += `--calendar-today-bg: ${theme2.calendar.selection.todayBackground};
5349
- `;
5350
- if (theme2.calendar.selection.todayColor) variablesString += `--calendar-today-text: ${theme2.calendar.selection.todayColor};
5351
- `;
5352
- }
5353
- }
5354
- return `:root {
5355
- ${variablesString}}`;
5356
- }, [activeThemeContext]);
5357
- return /* @__PURE__ */ jsxs22(Fragment6, { children: [
5358
- /* @__PURE__ */ jsx31("style", { suppressHydrationWarning: true, children: cssVariables }),
5359
- children
5360
- ] });
5768
+ styleTag.innerHTML = `
5769
+ :root {
5770
+ --color-primary: ${palette2.primary};
5771
+ --color-secondary: ${palette2.secondary};
5772
+ --color-ternary: ${palette2.ternary};
5773
+ --color-danger: ${palette2.danger};
5774
+ --color-success: ${palette2.success};
5775
+ --color-info: ${palette2.info};
5776
+ --color-alert: ${palette2.alert};
5777
+ --color-warning: ${palette2.warning};
5778
+
5779
+ /* Generated scales for primary */
5780
+ --color-primary-50: color-mix(in srgb, var(--color-primary) 5%, #ffffff);
5781
+ --color-primary-100: color-mix(in srgb, var(--color-primary) 10%, #ffffff);
5782
+ --color-primary-200: color-mix(in srgb, var(--color-primary) 30%, #ffffff);
5783
+ --color-primary-300: color-mix(in srgb, var(--color-primary) 50%, #ffffff);
5784
+ --color-primary-400: color-mix(in srgb, var(--color-primary) 70%, #ffffff);
5785
+ --color-primary-500: var(--color-primary);
5786
+ --color-primary-600: color-mix(in srgb, var(--color-primary) 85%, #000000);
5787
+ --color-primary-700: color-mix(in srgb, var(--color-primary) 70%, #000000);
5788
+ --color-primary-800: color-mix(in srgb, var(--color-primary) 55%, #000000);
5789
+ --color-primary-900: color-mix(in srgb, var(--color-primary) 40%, #000000);
5790
+ --color-primary-950: color-mix(in srgb, var(--color-primary) 25%, #000000);
5791
+
5792
+ /* Generated scales for secondary */
5793
+ --color-secondary-50: color-mix(in srgb, var(--color-secondary) 5%, #ffffff);
5794
+ --color-secondary-100: color-mix(in srgb, var(--color-secondary) 10%, #ffffff);
5795
+ --color-secondary-200: color-mix(in srgb, var(--color-secondary) 30%, #ffffff);
5796
+ --color-secondary-300: color-mix(in srgb, var(--color-secondary) 50%, #ffffff);
5797
+ --color-secondary-400: color-mix(in srgb, var(--color-secondary) 70%, #ffffff);
5798
+ --color-secondary-500: var(--color-secondary);
5799
+ --color-secondary-600: color-mix(in srgb, var(--color-secondary) 85%, #000000);
5800
+ --color-secondary-700: color-mix(in srgb, var(--color-secondary) 70%, #000000);
5801
+ --color-secondary-800: color-mix(in srgb, var(--color-secondary) 55%, #000000);
5802
+ --color-secondary-900: color-mix(in srgb, var(--color-secondary) 40%, #000000);
5803
+ --color-secondary-950: color-mix(in srgb, var(--color-secondary) 25%, #000000);
5804
+
5805
+ /* Generated scales for ternary */
5806
+ --color-ternary-50: color-mix(in srgb, var(--color-ternary) 5%, #ffffff);
5807
+ --color-ternary-100: color-mix(in srgb, var(--color-ternary) 10%, #ffffff);
5808
+ --color-ternary-200: color-mix(in srgb, var(--color-ternary) 30%, #ffffff);
5809
+ --color-ternary-300: color-mix(in srgb, var(--color-ternary) 50%, #ffffff);
5810
+ --color-ternary-400: color-mix(in srgb, var(--color-ternary) 70%, #ffffff);
5811
+ --color-ternary-500: var(--color-ternary);
5812
+ --color-ternary-600: color-mix(in srgb, var(--color-ternary) 85%, #000000);
5813
+ --color-ternary-700: color-mix(in srgb, var(--color-ternary) 70%, #000000);
5814
+ --color-ternary-800: color-mix(in srgb, var(--color-ternary) 55%, #000000);
5815
+ --color-ternary-900: color-mix(in srgb, var(--color-ternary) 40%, #000000);
5816
+ --color-ternary-950: color-mix(in srgb, var(--color-ternary) 25%, #000000);
5817
+
5818
+ /* Purple scales mapped as aliases to ternary */
5819
+ --color-purple-50: var(--color-ternary-50);
5820
+ --color-purple-100: var(--color-ternary-100);
5821
+ --color-purple-200: var(--color-ternary-200);
5822
+ --color-purple-300: var(--color-ternary-300);
5823
+ --color-purple-400: var(--color-ternary-400);
5824
+ --color-purple-500: var(--color-ternary-500);
5825
+ --color-purple-600: var(--color-ternary-600);
5826
+ --color-purple-700: var(--color-ternary-700);
5827
+ --color-purple-800: var(--color-ternary-800);
5828
+ --color-purple-900: var(--color-ternary-900);
5829
+ --color-purple-950: var(--color-ternary-950);
5830
+
5831
+ /* Generated scales for danger */
5832
+ --color-danger-50: color-mix(in srgb, var(--color-danger) 5%, #ffffff);
5833
+ --color-danger-100: color-mix(in srgb, var(--color-danger) 10%, #ffffff);
5834
+ --color-danger-200: color-mix(in srgb, var(--color-danger) 30%, #ffffff);
5835
+ --color-danger-300: color-mix(in srgb, var(--color-danger) 50%, #ffffff);
5836
+ --color-danger-400: color-mix(in srgb, var(--color-danger) 70%, #ffffff);
5837
+ --color-danger-500: var(--color-danger);
5838
+ --color-danger-600: color-mix(in srgb, var(--color-danger) 85%, #000000);
5839
+ --color-danger-700: color-mix(in srgb, var(--color-danger) 70%, #000000);
5840
+ --color-danger-800: color-mix(in srgb, var(--color-danger) 55%, #000000);
5841
+ --color-danger-900: color-mix(in srgb, var(--color-danger) 40%, #000000);
5842
+ --color-danger-950: color-mix(in srgb, var(--color-danger) 25%, #000000);
5843
+
5844
+ /* Generated scales for success */
5845
+ --color-success-50: color-mix(in srgb, var(--color-success) 5%, #ffffff);
5846
+ --color-success-100: color-mix(in srgb, var(--color-success) 10%, #ffffff);
5847
+ --color-success-200: color-mix(in srgb, var(--color-success) 30%, #ffffff);
5848
+ --color-success-300: color-mix(in srgb, var(--color-success) 50%, #ffffff);
5849
+ --color-success-400: color-mix(in srgb, var(--color-success) 70%, #ffffff);
5850
+ --color-success-500: var(--color-success);
5851
+ --color-success-600: color-mix(in srgb, var(--color-success) 85%, #000000);
5852
+ --color-success-700: color-mix(in srgb, var(--color-success) 70%, #000000);
5853
+ --color-success-800: color-mix(in srgb, var(--color-success) 55%, #000000);
5854
+ --color-success-900: color-mix(in srgb, var(--color-success) 40%, #000000);
5855
+ --color-success-950: color-mix(in srgb, var(--color-success) 25%, #000000);
5856
+
5857
+ /* Generated scales for info */
5858
+ --color-info-50: color-mix(in srgb, var(--color-info) 5%, #ffffff);
5859
+ --color-info-100: color-mix(in srgb, var(--color-info) 10%, #ffffff);
5860
+ --color-info-200: color-mix(in srgb, var(--color-info) 30%, #ffffff);
5861
+ --color-info-300: color-mix(in srgb, var(--color-info) 50%, #ffffff);
5862
+ --color-info-400: color-mix(in srgb, var(--color-info) 70%, #ffffff);
5863
+ --color-info-500: var(--color-info);
5864
+ --color-info-600: color-mix(in srgb, var(--color-info) 85%, #000000);
5865
+ --color-info-700: color-mix(in srgb, var(--color-info) 70%, #000000);
5866
+ --color-info-800: color-mix(in srgb, var(--color-info) 55%, #000000);
5867
+ --color-info-900: color-mix(in srgb, var(--color-info) 40%, #000000);
5868
+ --color-info-950: color-mix(in srgb, var(--color-info) 25%, #000000);
5869
+
5870
+ /* Generated scales for alert */
5871
+ --color-alert-50: color-mix(in srgb, var(--color-alert) 5%, #ffffff);
5872
+ --color-alert-100: color-mix(in srgb, var(--color-alert) 10%, #ffffff);
5873
+ --color-alert-200: color-mix(in srgb, var(--color-alert) 30%, #ffffff);
5874
+ --color-alert-300: color-mix(in srgb, var(--color-alert) 50%, #ffffff);
5875
+ --color-alert-400: color-mix(in srgb, var(--color-alert) 70%, #ffffff);
5876
+ --color-alert-500: var(--color-alert);
5877
+ --color-alert-600: color-mix(in srgb, var(--color-alert) 85%, #000000);
5878
+ --color-alert-700: color-mix(in srgb, var(--color-alert) 70%, #000000);
5879
+ --color-alert-800: color-mix(in srgb, var(--color-alert) 55%, #000000);
5880
+ --color-alert-900: color-mix(in srgb, var(--color-alert) 40%, #000000);
5881
+ --color-alert-950: color-mix(in srgb, var(--color-alert) 25%, #000000);
5882
+
5883
+ /* Generated scales for warning */
5884
+ --color-warning-50: color-mix(in srgb, var(--color-warning) 5%, #ffffff);
5885
+ --color-warning-100: color-mix(in srgb, var(--color-warning) 10%, #ffffff);
5886
+ --color-warning-200: color-mix(in srgb, var(--color-warning) 30%, #ffffff);
5887
+ --color-warning-300: color-mix(in srgb, var(--color-warning) 50%, #ffffff);
5888
+ --color-warning-400: color-mix(in srgb, var(--color-warning) 70%, #ffffff);
5889
+ --color-warning-500: var(--color-warning);
5890
+ --color-warning-600: color-mix(in srgb, var(--color-warning) 85%, #000000);
5891
+ --color-warning-700: color-mix(in srgb, var(--color-warning) 70%, #000000);
5892
+ --color-warning-800: color-mix(in srgb, var(--color-warning) 55%, #000000);
5893
+ --color-warning-900: color-mix(in srgb, var(--color-warning) 40%, #000000);
5894
+ --color-warning-950: color-mix(in srgb, var(--color-warning) 25%, #000000);
5895
+
5896
+ /* Support legacy client app variables */
5897
+ --color-primary-focus: color-mix(in srgb, var(--color-primary) 30%, transparent);
5898
+ --color-primary-light: color-mix(in srgb, var(--color-primary) 10%, #ffffff);
5899
+ --color-secondary-border: color-mix(in srgb, var(--color-secondary) 30%, #000000);
5900
+ --color-ternary-light: color-mix(in srgb, var(--color-ternary) 15%, #ffffff);
5901
+ --color-danger-focus: color-mix(in srgb, var(--color-danger) 30%, transparent);
5902
+ --color-success-focus: color-mix(in srgb, var(--color-success) 30%, transparent);
5903
+ --color-info-focus: color-mix(in srgb, var(--color-info) 30%, transparent);
5904
+ --color-alert-focus: color-mix(in srgb, var(--color-alert) 30%, transparent);
5905
+ --color-warning-focus: color-mix(in srgb, var(--color-warning) 30%, transparent);
5906
+
5907
+ /* Map library properties for complete safety */
5908
+ --color-primary-hover: color-mix(in srgb, var(--color-primary) 85%, #000000);
5909
+ --color-primary-ring: color-mix(in srgb, var(--color-primary) 40%, transparent);
5910
+ --color-primary-soft: color-mix(in srgb, var(--color-primary) 12%, transparent);
5911
+ --color-primary-soft-border: color-mix(in srgb, var(--color-primary) 24%, transparent);
5912
+
5913
+ --color-secondary-hover: color-mix(in srgb, var(--color-secondary) 85%, #000000);
5914
+ --color-secondary-ring: color-mix(in srgb, var(--color-secondary) 40%, transparent);
5915
+ --color-secondary-soft: color-mix(in srgb, var(--color-secondary) 12%, transparent);
5916
+ --color-secondary-soft-border: color-mix(in srgb, var(--color-secondary) 24%, transparent);
5917
+
5918
+ --color-ternary-hover: color-mix(in srgb, var(--color-ternary) 85%, #000000);
5919
+ --color-ternary-ring: color-mix(in srgb, var(--color-ternary) 40%, transparent);
5920
+ --color-ternary-soft: color-mix(in srgb, var(--color-ternary) 12%, transparent);
5921
+ --color-ternary-soft-border: color-mix(in srgb, var(--color-ternary) 24%, transparent);
5922
+
5923
+ --color-danger-hover: color-mix(in srgb, var(--color-danger) 85%, #000000);
5924
+ --color-danger-ring: color-mix(in srgb, var(--color-danger) 40%, transparent);
5925
+ --color-danger-soft: color-mix(in srgb, var(--color-danger) 12%, transparent);
5926
+ --color-danger-soft-border: color-mix(in srgb, var(--color-danger) 24%, transparent);
5927
+
5928
+ --color-success-hover: color-mix(in srgb, var(--color-success) 85%, #000000);
5929
+ --color-success-ring: color-mix(in srgb, var(--color-success) 40%, transparent);
5930
+ --color-success-soft: color-mix(in srgb, var(--color-success) 12%, transparent);
5931
+ --color-success-soft-border: color-mix(in srgb, var(--color-success) 24%, transparent);
5932
+
5933
+ --color-info-hover: color-mix(in srgb, var(--color-info) 85%, #000000);
5934
+ --color-info-ring: color-mix(in srgb, var(--color-info) 40%, transparent);
5935
+ --color-info-soft: color-mix(in srgb, var(--color-info) 12%, transparent);
5936
+ --color-info-soft-border: color-mix(in srgb, var(--color-info) 24%, transparent);
5937
+
5938
+ --color-alert-hover: color-mix(in srgb, var(--color-alert) 85%, #000000);
5939
+ --color-alert-ring: color-mix(in srgb, var(--color-alert) 40%, transparent);
5940
+ --color-alert-soft: color-mix(in srgb, var(--color-alert) 12%, transparent);
5941
+ --color-alert-soft-border: color-mix(in srgb, var(--color-alert) 24%, transparent);
5942
+
5943
+ --color-warning-hover: color-mix(in srgb, var(--color-warning) 85%, #000000);
5944
+ --color-warning-ring: color-mix(in srgb, var(--color-warning) 40%, transparent);
5945
+ --color-warning-soft: color-mix(in srgb, var(--color-warning) 12%, transparent);
5946
+ --color-warning-soft-border: color-mix(in srgb, var(--color-warning) 24%, transparent);
5947
+
5948
+ --color-sidebarBg: ${sidebarBg} !important;
5949
+ --color-sidebarText: ${sidebarText} !important;
5950
+ --color-navbarBg: ${navbarBg} !important;
5951
+ --color-navbarText: ${navbarText} !important;
5952
+
5953
+ --color-table-headerBg: ${tableHeaderBg} !important;
5954
+ --color-table-headerText: ${tableHeaderText} !important;
5955
+ --color-table-rowBg: ${tableRowBg} !important;
5956
+ --color-table-rowText: ${tableRowText} !important;
5957
+
5958
+ /* Native library variables integration */
5959
+ --sidebar-bg: var(--color-sidebarBg);
5960
+ --sidebar-border: color-mix(in srgb, var(--color-sidebarBg) 85%, #000000);
5961
+ --sidebar-label-color: var(--color-sidebarText);
5962
+ --sidebar-icon-color: color-mix(in srgb, var(--color-sidebarText) 80%, transparent);
5963
+ --sidebar-hover-bg: color-mix(in srgb, var(--color-sidebarText) 10%, transparent);
5964
+ --sidebar-active-bg: color-mix(in srgb, var(--color-primary) 12%, transparent);
5965
+ --sidebar-active-color: var(--color-primary);
5966
+ --sidebar-active-icon: var(--color-primary);
5967
+ --sidebar-badge-bg: var(--color-primary);
5968
+ --sidebar-badge-color: #ffffff;
5969
+
5970
+ --topbar-bg: var(--color-navbarBg);
5971
+ --topbar-text: var(--color-navbarText);
5972
+ --topbar-border: color-mix(in srgb, var(--color-navbarBg) 85%, #000000);
5973
+ --topbar-icon: color-mix(in srgb, var(--color-navbarText) 80%, transparent);
5974
+ --topbar-icon-hover: var(--color-navbarText);
5975
+
5976
+ --layout-bg: var(--color-secondary-50);
5977
+ --input-text-color: var(--color-secondary-900);
5978
+
5979
+ --calendar-selected-bg: var(--color-primary);
5980
+ --calendar-selected-text: #ffffff;
5981
+ --calendar-range-bg: var(--color-primary-50);
5982
+ --calendar-today-bg: var(--color-primary-100);
5983
+ --calendar-today-text: var(--color-primary);
5984
+ }
5985
+
5986
+ /* Dark mode overrides */
5987
+ .dark, [data-theme="dark"] {
5988
+ --layout-bg: #090f1d;
5989
+ --card-bg: #111827;
5990
+ --card-border: #1f2937;
5991
+ --card-header-bg: #1f2937;
5992
+ --card-header-border: #374151;
5993
+ --input-bg: #1f2937;
5994
+ --input-border: #374151;
5995
+ --input-placeholder: #6b7280;
5996
+ --input-text-color: #cbd5e1;
5997
+ --modal-bg: #111827;
5998
+ --modal-footer-bg: #1f2937;
5999
+ --modal-header-border: #374151;
6000
+ --modal-footer-border: #374151;
6001
+ --calendar-bg: #111827;
6002
+ --calendar-border: #1f2937;
6003
+ --calendar-header-text: #f3f4f6;
6004
+ --calendar-header-hover: #1f2937;
6005
+ --calendar-days-text: #e5e7eb;
6006
+ --calendar-selected-bg: var(--color-primary);
6007
+ --calendar-selected-text: #ffffff;
6008
+ --calendar-range-bg: var(--color-primary-50);
6009
+ --calendar-today-bg: var(--color-primary-100);
6010
+ --calendar-today-text: var(--color-primary);
6011
+
6012
+ /* Override dynamic color-mix scales to blend with dark instead of white */
6013
+ --color-primary-50: color-mix(in srgb, var(--color-primary) 10%, #0b1329);
6014
+ --color-primary-100: color-mix(in srgb, var(--color-primary) 20%, #0b1329);
6015
+ --color-primary-200: color-mix(in srgb, var(--color-primary) 35%, #0b1329);
6016
+ --color-primary-300: color-mix(in srgb, var(--color-primary) 50%, #0b1329);
6017
+ --color-primary-400: color-mix(in srgb, var(--color-primary) 70%, #0b1329);
6018
+
6019
+ --color-secondary-50: color-mix(in srgb, var(--color-secondary) 10%, #090f1d);
6020
+ --color-secondary-100: color-mix(in srgb, var(--color-secondary) 18%, #090f1d);
6021
+ --color-secondary-200: color-mix(in srgb, var(--color-secondary) 30%, #090f1d);
6022
+ --color-secondary-300: color-mix(in srgb, var(--color-secondary) 45%, #090f1d);
6023
+ --color-secondary-400: color-mix(in srgb, var(--color-secondary) 60%, #090f1d);
6024
+
6025
+ --color-success-50: color-mix(in srgb, var(--color-success) 10%, #061f14);
6026
+ --color-success-100: color-mix(in srgb, var(--color-success) 20%, #061f14);
6027
+ --color-success-200: color-mix(in srgb, var(--color-success) 35%, #061f14);
6028
+
6029
+ --color-danger-50: color-mix(in srgb, var(--color-danger) 10%, #1f0808);
6030
+ --color-danger-100: color-mix(in srgb, var(--color-danger) 20%, #1f0808);
6031
+ --color-danger-200: color-mix(in srgb, var(--color-danger) 35%, #1f0808);
6032
+
6033
+ --color-warning-50: color-mix(in srgb, var(--color-warning) 10%, #1f1b05);
6034
+ --color-warning-100: color-mix(in srgb, var(--color-warning) 20%, #1f1b05);
6035
+ --color-warning-200: color-mix(in srgb, var(--color-warning) 35%, #1f1b05);
6036
+
6037
+ --color-ternary-50: color-mix(in srgb, var(--color-ternary) 10%, #14081f);
6038
+ --color-ternary-100: color-mix(in srgb, var(--color-ternary) 20%, #14081f);
6039
+ --color-ternary-200: color-mix(in srgb, var(--color-ternary) 35%, #14081f);
6040
+
6041
+ --color-info-50: color-mix(in srgb, var(--color-info) 10%, #08141f);
6042
+ --color-info-100: color-mix(in srgb, var(--color-info) 20%, #08141f);
6043
+ --color-info-200: color-mix(in srgb, var(--color-info) 35%, #08141f);
6044
+ }
6045
+
6046
+ /* Force dark mode class overrides for common backgrounds, borders, and texts */
6047
+ .dark, [data-theme="dark"] {
6048
+ color: #cbd5e1;
6049
+ }
6050
+ .dark .text-slate-800, [data-theme="dark"] .text-slate-800,
6051
+ .dark .text-gray-800, [data-theme="dark"] .text-gray-800,
6052
+ .dark h1, [data-theme="dark"] h1,
6053
+ .dark h2, [data-theme="dark"] h2,
6054
+ .dark h3, [data-theme="dark"] h3 {
6055
+ color: #f8fafc !important;
6056
+ }
6057
+ .dark .text-slate-700, [data-theme="dark"] .text-slate-700,
6058
+ .dark .text-gray-700, [data-theme="dark"] .text-gray-700 {
6059
+ color: #cbd5e1 !important;
6060
+ }
6061
+ .dark .text-slate-600, [data-theme="dark"] .text-slate-600,
6062
+ .dark .text-gray-600, [data-theme="dark"] .text-gray-600 {
6063
+ color: #cbd5e1 !important;
6064
+ }
6065
+ .dark .text-slate-500, [data-theme="dark"] .text-slate-500,
6066
+ .dark .text-gray-500, [data-theme="dark"] .text-gray-500 {
6067
+ color: #94a3b8 !important;
6068
+ }
6069
+ .dark .text-slate-400, [data-theme="dark"] .text-slate-400,
6070
+ .dark .text-gray-400, [data-theme="dark"] .text-gray-400 {
6071
+ color: #64748b !important;
6072
+ }
6073
+
6074
+ .dark .bg-white, [data-theme="dark"] .bg-white {
6075
+ background-color: var(--card-bg, #111827) !important;
6076
+ }
6077
+ .dark .bg-slate-50, [data-theme="dark"] .bg-slate-50,
6078
+ .dark .bg-gray-50, [data-theme="dark"] .bg-gray-50 {
6079
+ background-color: #1f2937 !important;
6080
+ }
6081
+ .dark .border-slate-100, [data-theme="dark"] .border-slate-100,
6082
+ .dark .border-gray-100, [data-theme="dark"] .border-gray-100,
6083
+ .dark .border-slate-200, [data-theme="dark"] .border-slate-200,
6084
+ .dark .border-gray-200, [data-theme="dark"] .border-gray-200 {
6085
+ border-color: #374151 !important;
6086
+ }
6087
+
6088
+ .dark .bg-gray-100, [data-theme="dark"] .bg-gray-100,
6089
+ .dark .bg-slate-100, [data-theme="dark"] .bg-slate-100 {
6090
+ background-color: #1f2937 !important;
6091
+ }
6092
+ .dark .border-gray-300, [data-theme="dark"] .border-gray-300,
6093
+ .dark .border-slate-300, [data-theme="dark"] .border-slate-300 {
6094
+ border-color: #4b5563 !important;
6095
+ }
6096
+ .dark .bg-gray-200, [data-theme="dark"] .bg-gray-200,
6097
+ .dark .bg-slate-200, [data-theme="dark"] .bg-slate-200 {
6098
+ background-color: #374151 !important;
6099
+ }
6100
+
6101
+ /* Light mode overrides inside forced light subtree */
6102
+ [data-theme="light"] {
6103
+ color: #334155;
6104
+ --layout-bg: var(--color-secondary-50);
6105
+ --card-bg: #ffffff;
6106
+ --card-border: #f1f5f9;
6107
+ --card-header-bg: #f8fafc;
6108
+ --card-header-border: #e2e8f0;
6109
+ --input-bg: #ffffff;
6110
+ --input-border: #cbd5e1;
6111
+ --input-placeholder: #94a3b8;
6112
+ --input-text-color: #1e293b;
6113
+ --modal-bg: #ffffff;
6114
+ --modal-footer-bg: #f8fafc;
6115
+ --modal-header-border: #e2e8f0;
6116
+ --modal-footer-border: #e2e8f0;
6117
+ --calendar-bg: #ffffff;
6118
+ --calendar-border: #e2e8f0;
6119
+ --calendar-header-text: #1e293b;
6120
+ --calendar-header-hover: #f1f5f9;
6121
+ --calendar-days-text: #334155;
6122
+ --calendar-selected-bg: var(--color-primary);
6123
+ --calendar-selected-text: #ffffff;
6124
+ --calendar-range-bg: var(--color-primary-50);
6125
+ --calendar-today-bg: var(--color-primary-100);
6126
+ --calendar-today-text: var(--color-primary);
6127
+
6128
+ --color-primary-50: color-mix(in srgb, var(--color-primary) 5%, #ffffff);
6129
+ --color-primary-100: color-mix(in srgb, var(--color-primary) 10%, #ffffff);
6130
+ --color-primary-200: color-mix(in srgb, var(--color-primary) 30%, #ffffff);
6131
+ --color-primary-300: color-mix(in srgb, var(--color-primary) 50%, #ffffff);
6132
+ --color-primary-400: color-mix(in srgb, var(--color-primary) 70%, #ffffff);
6133
+
6134
+ --color-secondary-50: color-mix(in srgb, var(--color-secondary) 5%, #ffffff);
6135
+ --color-secondary-100: color-mix(in srgb, var(--color-secondary) 10%, #ffffff);
6136
+ --color-secondary-200: color-mix(in srgb, var(--color-secondary) 30%, #ffffff);
6137
+ --color-secondary-300: color-mix(in srgb, var(--color-secondary) 50%, #ffffff);
6138
+ --color-secondary-400: color-mix(in srgb, var(--color-secondary) 70%, #ffffff);
6139
+
6140
+ --color-success-50: color-mix(in srgb, var(--color-success) 5%, #ffffff);
6141
+ --color-success-100: color-mix(in srgb, var(--color-success) 10%, #ffffff);
6142
+ --color-success-200: color-mix(in srgb, var(--color-success) 30%, #ffffff);
6143
+
6144
+ --color-danger-50: color-mix(in srgb, var(--color-danger) 5%, #ffffff);
6145
+ --color-danger-100: color-mix(in srgb, var(--color-danger) 10%, #ffffff);
6146
+ --color-danger-200: color-mix(in srgb, var(--color-danger) 30%, #ffffff);
6147
+
6148
+ --color-warning-50: color-mix(in srgb, var(--color-warning) 5%, #ffffff);
6149
+ --color-warning-100: color-mix(in srgb, var(--color-warning) 10%, #ffffff);
6150
+ --color-warning-200: color-mix(in srgb, var(--color-warning) 30%, #ffffff);
6151
+
6152
+ --color-ternary-50: color-mix(in srgb, var(--color-ternary) 5%, #ffffff);
6153
+ --color-ternary-100: color-mix(in srgb, var(--color-ternary) 10%, #ffffff);
6154
+ --color-ternary-200: color-mix(in srgb, var(--color-ternary) 30%, #ffffff);
6155
+
6156
+ --color-info-50: color-mix(in srgb, var(--color-info) 5%, #ffffff);
6157
+ --color-info-100: color-mix(in srgb, var(--color-info) 10%, #ffffff);
6158
+ --color-info-200: color-mix(in srgb, var(--color-info) 30%, #ffffff);
6159
+ }
6160
+
6161
+ [data-theme="light"] .text-slate-800,
6162
+ [data-theme="light"] .text-gray-800,
6163
+ [data-theme="light"] h1,
6164
+ [data-theme="light"] h2,
6165
+ [data-theme="light"] h3 {
6166
+ color: #1e293b !important;
6167
+ }
6168
+ [data-theme="light"] .text-slate-700,
6169
+ [data-theme="light"] .text-gray-700 {
6170
+ color: #334155 !important;
6171
+ }
6172
+ [data-theme="light"] .text-slate-600,
6173
+ [data-theme="light"] .text-gray-600 {
6174
+ color: #475569 !important;
6175
+ }
6176
+ [data-theme="light"] .text-slate-500,
6177
+ [data-theme="light"] .text-gray-500 {
6178
+ color: #64748b !important;
6179
+ }
6180
+ [data-theme="light"] .text-slate-400,
6181
+ [data-theme="light"] .text-gray-400 {
6182
+ color: #94a3b8 !important;
6183
+ }
6184
+
6185
+ [data-theme="light"] .bg-white {
6186
+ background-color: #ffffff !important;
6187
+ }
6188
+ [data-theme="light"] .bg-slate-50,
6189
+ [data-theme="light"] .bg-gray-50 {
6190
+ background-color: #f8fafc !important;
6191
+ }
6192
+ [data-theme="light"] .border-slate-100,
6193
+ [data-theme="light"] .border-gray-100,
6194
+ [data-theme="light"] .border-slate-200,
6195
+ [data-theme="light"] .border-gray-200 {
6196
+ border-color: #e2e8f0 !important;
6197
+ }
6198
+ [data-theme="light"] .bg-gray-100,
6199
+ [data-theme="light"] .bg-slate-100 {
6200
+ background-color: #f1f5f9 !important;
6201
+ }
6202
+ [data-theme="light"] .border-gray-300,
6203
+ [data-theme="light"] .border-slate-300 {
6204
+ border-color: #cbd5e1 !important;
6205
+ }
6206
+ [data-theme="light"] .bg-gray-200,
6207
+ [data-theme="light"] .bg-slate-200 {
6208
+ background-color: #e2e8f0 !important;
6209
+ }
6210
+
6211
+
6212
+ /* Primary overrides (cyan mappings in UI library) */
6213
+ .bg-cyan-400 { background-color: var(--color-primary) !important; }
6214
+ .hover\\:bg-cyan-500:hover { background-color: var(--color-primary-hover) !important; }
6215
+ .focus\\:ring-cyan-300:focus { --tw-ring-color: var(--color-primary-ring) !important; }
6216
+ .text-cyan-600 { color: var(--color-primary) !important; }
6217
+ .text-cyan-500 { color: var(--color-primary) !important; }
6218
+ .border-cyan-400 { border-color: var(--color-primary) !important; }
6219
+ .focus\\:border-cyan-500:focus { border-color: var(--color-primary-hover) !important; }
6220
+ .focus\\:ring-cyan-500:focus { --tw-ring-color: var(--color-primary-hover) !important; }
6221
+ .text-cyan-100 { color: var(--color-primary-soft) !important; }
6222
+ .hover\\:bg-cyan-50:hover { background-color: var(--color-primary-soft) !important; }
6223
+
6224
+ /* Success overrides (green mappings in UI library) */
6225
+ .bg-green-700 { background-color: var(--color-success) !important; }
6226
+ .hover\\:bg-green-800:hover { background-color: var(--color-success-hover) !important; }
6227
+ .focus\\:ring-green-300:focus { --tw-ring-color: var(--color-success-ring) !important; }
6228
+ .text-green-700 { color: var(--color-success) !important; }
6229
+ .border-green-700 { border-color: var(--color-success) !important; }
6230
+ .bg-green-500 { background-color: var(--color-success) !important; }
6231
+ .hover\\:bg-green-600:hover { background-color: var(--color-success-hover) !important; }
6232
+
6233
+ /* Danger overrides (red mappings in UI library) */
6234
+ .bg-red-700 { background-color: var(--color-danger) !important; }
6235
+ .hover\\:bg-red-800:hover { background-color: var(--color-danger-hover) !important; }
6236
+ .focus\\:ring-red-300:focus { --tw-ring-color: var(--color-danger-ring) !important; }
6237
+ .text-red-700 { color: var(--color-danger) !important; }
6238
+ .border-red-700 { border-color: var(--color-danger) !important; }
6239
+ .bg-red-500 { background-color: var(--color-danger) !important; }
6240
+ .hover\\:bg-red-600:hover { background-color: var(--color-danger-hover) !important; }
6241
+
6242
+ /* Warning overrides (yellow mappings in UI library) */
6243
+ .bg-yellow-400 { background-color: var(--color-warning) !important; }
6244
+ .hover\\:bg-yellow-500:hover { background-color: var(--color-warning-hover) !important; }
6245
+ .focus\\:ring-yellow-300:focus { --tw-ring-color: var(--color-warning-ring) !important; }
6246
+ .text-yellow-600 { color: var(--color-warning-hover) !important; }
6247
+ .border-yellow-400 { border-color: var(--color-warning) !important; }
6248
+ .bg-yellow-500 { background-color: var(--color-warning) !important; }
6249
+ .hover\\:bg-yellow-600:hover { background-color: var(--color-warning-hover) !important; }
6250
+
6251
+ /* Ternary / Orange overrides */
6252
+ .bg-orange-500 { background-color: var(--color-ternary) !important; }
6253
+ .hover\\:bg-orange-500:hover { background-color: var(--color-ternary-hover) !important; }
6254
+ .hover\\:bg-orange-600:hover { background-color: var(--color-ternary-hover) !important; }
6255
+ .text-orange-500 { color: var(--color-ternary) !important; }
6256
+ .text-orange-800 { color: var(--color-ternary-hover) !important; }
6257
+ .bg-orange-200 { background-color: var(--color-ternary-soft) !important; }
6258
+ .border-orange-400 { border-color: var(--color-ternary) !important; }
6259
+ .border-orange-500 { border-color: var(--color-ternary) !important; }
6260
+ .hover\\:bg-orange-50\\/30:hover { background-color: var(--color-ternary-soft) !important; }
6261
+
6262
+ /* Info / Blue overrides */
6263
+ .bg-blue-500 { background-color: var(--color-info) !important; }
6264
+ .hover\\:bg-blue-600:hover { background-color: var(--color-info-hover) !important; }
6265
+ .text-blue-500 { color: var(--color-info) !important; }
6266
+ .text-blue-600 { color: var(--color-info-hover) !important; }
6267
+ .border-blue-500 { border-color: var(--color-info) !important; }
6268
+
6269
+ /* Secondary elements overrides */
6270
+ button[class*="bg-white"][class*="hover:bg-gray-100"] {
6271
+ background-color: var(--color-secondary) !important;
6272
+ border-color: var(--color-secondary-soft-border) !important;
6273
+ color: #111827 !important;
6274
+ }
6275
+ button[class*="bg-white"][class*="hover:bg-gray-100"]:hover {
6276
+ background-color: var(--color-secondary-hover) !important;
6277
+ }
6278
+
6279
+ /* Custom Table styling overrides */
6280
+ thead tr, tr.bg-secondary-50, tr[class*="bg-secondary-50"] {
6281
+ background-color: var(--color-table-headerBg) !important;
6282
+ border-bottom-color: color-mix(in srgb, var(--color-table-headerBg) 85%, #000000) !important;
6283
+ }
6284
+ th span, th div span {
6285
+ color: var(--color-table-headerText) !important;
6286
+ }
6287
+ tbody tr {
6288
+ background-color: var(--color-table-rowBg) !important;
6289
+ }
6290
+ tbody tr td, tbody tr td div {
6291
+ color: var(--color-table-rowText) !important;
6292
+ }
6293
+ tbody tr:hover {
6294
+ background-color: color-mix(in srgb, var(--color-primary) 8%, var(--color-table-rowBg)) !important;
6295
+ }
6296
+
6297
+ /* Animation for Saved Indicator */
6298
+ @keyframes fadeInOut {
6299
+ 0%, 100% { opacity: 0; transform: translateY(-4px); }
6300
+ 15%, 85% { opacity: 1; transform: translateY(0); }
6301
+ }
6302
+ .animate-fade-in-out {
6303
+ animation: fadeInOut 1.5s ease-in-out forwards;
6304
+ }
6305
+
6306
+ /* Fallback utility classes for blurs */
6307
+ .backdrop-blur-xs {
6308
+ backdrop-filter: blur(2px);
6309
+ -webkit-backdrop-filter: blur(2px);
6310
+ }
6311
+ .backdrop-blur-xl {
6312
+ backdrop-filter: blur(24px);
6313
+ -webkit-backdrop-filter: blur(24px);
6314
+ }
6315
+
6316
+ /* =======================================================================
6317
+ AUTONOMOUS THEME DESIGNER STYLES (No Tailwind dependencies)
6318
+ ======================================================================= */
6319
+
6320
+ @keyframes itBounce {
6321
+ 0%, 100% { transform: translateY(0); }
6322
+ 50% { transform: translateY(-8px); }
6323
+ }
6324
+ .it-theme-bounce {
6325
+ animation: itBounce 3s infinite ease-in-out !important;
6326
+ }
6327
+
6328
+ /* FAB styles */
6329
+ .it-theme-fab {
6330
+ position: fixed !important;
6331
+ bottom: 24px !important;
6332
+ right: 24px !important;
6333
+ width: 56px !important;
6334
+ height: 56px !important;
6335
+ border-radius: 50% !important;
6336
+ border: none !important;
6337
+ color: #ffffff !important;
6338
+ box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.15) !important;
6339
+ display: flex !important;
6340
+ align-items: center !important;
6341
+ justify-content: center !important;
6342
+ cursor: pointer !important;
6343
+ z-index: 99999 !important;
6344
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease !important;
6345
+ outline: none !important;
6346
+ }
6347
+ .it-theme-fab:hover {
6348
+ transform: scale(1.1) !important;
6349
+ box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.2) !important;
6350
+ }
6351
+ .it-theme-fab:active {
6352
+ transform: scale(0.95) !important;
6353
+ }
6354
+
6355
+ /* Backdrop styles */
6356
+ .it-theme-backdrop {
6357
+ position: fixed !important;
6358
+ top: 0 !important;
6359
+ left: 0 !important;
6360
+ right: 0 !important;
6361
+ bottom: 0 !important;
6362
+ background-color: rgba(15, 23, 42, 0.3) !important;
6363
+ backdrop-filter: blur(4px) !important;
6364
+ -webkit-backdrop-filter: blur(4px) !important;
6365
+ z-index: 99997 !important;
6366
+ transition: opacity 0.3s ease !important;
6367
+ }
6368
+
6369
+ /* Drawer container */
6370
+ .it-theme-drawer {
6371
+ position: fixed !important;
6372
+ top: 0 !important;
6373
+ right: 0 !important;
6374
+ bottom: 0 !important;
6375
+ width: 100% !important;
6376
+ max-width: 420px !important;
6377
+ background-color: #ffffff !important;
6378
+ box-shadow: -10px 0 25px -5px rgba(0, 0, 0, 0.08), -8px 0 10px -6px rgba(0, 0, 0, 0.08) !important;
6379
+ z-index: 99998 !important;
6380
+ display: flex !important;
6381
+ flex-direction: column !important;
6382
+ justify-content: space-between !important;
6383
+ padding: 24px !important;
6384
+ box-sizing: border-box !important;
6385
+ border-left: 1px solid rgba(226, 232, 240, 0.8) !important;
6386
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
6387
+ font-family: Inter, system-ui, -apple-system, sans-serif !important;
6388
+ color: #1e293b !important;
6389
+ }
6390
+
6391
+ .dark .it-theme-drawer, [data-theme="dark"] .it-theme-drawer {
6392
+ background-color: #0f172a !important;
6393
+ border-left-color: rgba(30, 41, 59, 0.8) !important;
6394
+ color: #f1f5f9 !important;
6395
+ }
6396
+
6397
+ /* Drawer Header */
6398
+ .it-theme-drawer-header {
6399
+ display: flex !important;
6400
+ align-items: center !important;
6401
+ justify-content: space-between !important;
6402
+ padding-bottom: 16px !important;
6403
+ border-bottom: 1px solid #e2e8f0 !important;
6404
+ }
6405
+ .dark .it-theme-drawer-header, [data-theme="dark"] .it-theme-drawer-header {
6406
+ border-bottom-color: #1e293b !important;
6407
+ }
6408
+
6409
+ .it-theme-drawer-title-group {
6410
+ display: flex !important;
6411
+ align-items: center !important;
6412
+ gap: 12px !important;
6413
+ }
6414
+
6415
+ .it-theme-icon-container {
6416
+ width: 36px !important;
6417
+ height: 36px !important;
6418
+ border-radius: 8px !important;
6419
+ display: flex !important;
6420
+ align-items: center !important;
6421
+ justify-content: center !important;
6422
+ color: #ffffff !important;
6423
+ }
6424
+
6425
+ .it-theme-drawer-title {
6426
+ font-size: 16px !important;
6427
+ font-weight: 700 !important;
6428
+ margin: 0 !important;
6429
+ color: #1e293b !important;
6430
+ line-height: 1.2 !important;
6431
+ }
6432
+ .dark .it-theme-drawer-title, [data-theme="dark"] .it-theme-drawer-title {
6433
+ color: #f8fafc !important;
6434
+ }
6435
+
6436
+ .it-theme-drawer-subtitle {
6437
+ font-size: 11px !important;
6438
+ color: #64748b !important;
6439
+ margin: 2px 0 0 0 !important;
6440
+ font-weight: 400 !important;
6441
+ }
6442
+ .dark .it-theme-drawer-subtitle, [data-theme="dark"] .it-theme-drawer-subtitle {
6443
+ color: #94a3b8 !important;
6444
+ }
6445
+
6446
+ .it-theme-close-btn {
6447
+ background: none !important;
6448
+ border: none !important;
6449
+ color: #94a3b8 !important;
6450
+ cursor: pointer !important;
6451
+ padding: 6px !important;
6452
+ border-radius: 6px !important;
6453
+ display: flex !important;
6454
+ align-items: center !important;
6455
+ justify-content: center !important;
6456
+ transition: background-color 0.2s, color 0.2s !important;
6457
+ }
6458
+ .it-theme-close-btn:hover {
6459
+ background-color: #f1f5f9 !important;
6460
+ color: #334155 !important;
6461
+ }
6462
+ .dark .it-theme-close-btn:hover, [data-theme="dark"] .it-theme-close-btn:hover {
6463
+ background-color: #1e293b !important;
6464
+ color: #f1f5f9 !important;
6465
+ }
6466
+
6467
+ /* Sections inside Drawer */
6468
+ .it-theme-section {
6469
+ margin-top: 18px !important;
6470
+ }
6471
+
6472
+ .it-theme-section-title {
6473
+ font-size: 10px !important;
6474
+ font-weight: 700 !important;
6475
+ text-transform: uppercase !important;
6476
+ letter-spacing: 0.05em !important;
6477
+ color: #94a3b8 !important;
6478
+ margin-bottom: 8px !important;
6479
+ margin-top: 0 !important;
6480
+ }
6481
+
6482
+ /* Preset Grid */
6483
+ .it-theme-presets-grid {
6484
+ display: grid !important;
6485
+ grid-template-columns: repeat(2, 1fr) !important;
6486
+ gap: 8px !important;
6487
+ }
6488
+
6489
+ .it-theme-preset-card {
6490
+ display: flex !important;
6491
+ flex-direction: column !important;
6492
+ align-items: flex-start !important;
6493
+ padding: 10px !important;
6494
+ border-radius: 10px !important;
6495
+ border: 1px solid #e2e8f0 !important;
6496
+ background-color: rgba(255, 255, 255, 0.6) !important;
6497
+ cursor: pointer !important;
6498
+ text-align: left !important;
6499
+ transition: all 0.2s ease !important;
6500
+ width: 100% !important;
6501
+ box-sizing: border-box !important;
6502
+ }
6503
+ .dark .it-theme-preset-card, [data-theme="dark"] .it-theme-preset-card {
6504
+ border-color: #1e293b !important;
6505
+ background-color: rgba(15, 23, 42, 0.4) !important;
6506
+ }
6507
+
6508
+ .it-theme-preset-card:hover {
6509
+ border-color: #cbd5e1 !important;
6510
+ transform: translateY(-1px) !important;
6511
+ }
6512
+ .dark .it-theme-preset-card:hover, [data-theme="dark"] .it-theme-preset-card:hover {
6513
+ border-color: #334155 !important;
6514
+ }
6515
+
6516
+ .it-theme-preset-name {
6517
+ font-size: 11px !important;
6518
+ font-weight: 600 !important;
6519
+ color: #334155 !important;
6520
+ margin-bottom: 6px !important;
6521
+ margin-top: 0 !important;
6522
+ white-space: nowrap !important;
6523
+ overflow: hidden !important;
6524
+ text-overflow: ellipsis !important;
6525
+ width: 100% !important;
6526
+ }
6527
+ .dark .it-theme-preset-name, [data-theme="dark"] .it-theme-preset-name {
6528
+ color: #cbd5e1 !important;
6529
+ }
6530
+
6531
+ .it-theme-preset-colors {
6532
+ display: flex !important;
6533
+ gap: 4px !important;
6534
+ }
6535
+
6536
+ .it-theme-preset-dot {
6537
+ width: 12px !important;
6538
+ height: 12px !important;
6539
+ border-radius: 50% !important;
6540
+ border: 1px solid rgba(0,0,0,0.08) !important;
6541
+ }
6542
+
6543
+ /* Color controls list */
6544
+ .it-theme-color-list {
6545
+ display: flex !important;
6546
+ flex-direction: column !important;
6547
+ gap: 6px !important;
6548
+ max-height: 250px !important;
6549
+ overflow-y: auto !important;
6550
+ padding-right: 4px !important;
6551
+ }
6552
+
6553
+ .it-theme-color-row {
6554
+ display: flex !important;
6555
+ align-items: center !important;
6556
+ justify-content: space-between !important;
6557
+ padding: 6px 10px !important;
6558
+ border-radius: 10px !important;
6559
+ border: 1px solid #f1f5f9 !important;
6560
+ background-color: rgba(248, 250, 252, 0.5) !important;
6561
+ }
6562
+ .dark .it-theme-color-row, [data-theme="dark"] .it-theme-color-row {
6563
+ border-color: #1e293b !important;
6564
+ background-color: rgba(9, 15, 29, 0.5) !important;
6565
+ }
6566
+
6567
+ .it-theme-color-left {
6568
+ display: flex !important;
6569
+ align-items: center !important;
6570
+ gap: 12px !important;
6571
+ }
6572
+
6573
+ .it-theme-color-picker-btn {
6574
+ position: relative !important;
6575
+ width: 28px !important;
6576
+ height: 28px !important;
6577
+ border-radius: 50% !important;
6578
+ overflow: hidden !important;
6579
+ border: 1px solid #cbd5e1 !important;
6580
+ box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.06) !important;
6581
+ cursor: pointer !important;
6582
+ display: flex !important;
6583
+ align-items: center !important;
6584
+ justify-content: center !important;
6585
+ }
6586
+ .dark .it-theme-color-picker-btn, [data-theme="dark"] .it-theme-color-picker-btn {
6587
+ border-color: #475569 !important;
6588
+ }
6589
+
6590
+ .it-theme-color-picker-input {
6591
+ position: absolute !important;
6592
+ top: 0 !important;
6593
+ left: 0 !important;
6594
+ width: 100% !important;
6595
+ height: 100% !important;
6596
+ opacity: 0 !important;
6597
+ cursor: pointer !important;
6598
+ margin: 0 !important;
6599
+ padding: 0 !important;
6600
+ }
6601
+
6602
+ .it-theme-color-picker-preview {
6603
+ width: 100% !important;
6604
+ height: 100% !important;
6605
+ border-radius: 50% !important;
6606
+ }
6607
+
6608
+ .it-theme-color-meta {
6609
+ display: flex !important;
6610
+ flex-direction: column !important;
6611
+ }
6612
+
6613
+ .it-theme-color-label {
6614
+ font-size: 10px !important;
6615
+ font-weight: 700 !important;
6616
+ text-transform: uppercase !important;
6617
+ color: #475569 !important;
6618
+ }
6619
+ .dark .it-theme-color-label, [data-theme="dark"] .it-theme-color-label {
6620
+ color: #cbd5e1 !important;
6621
+ }
6622
+
6623
+ .it-theme-color-hex-text {
6624
+ font-family: monospace !important;
6625
+ font-size: 9px !important;
6626
+ color: #94a3b8 !important;
6627
+ margin-top: 1px !important;
6628
+ }
6629
+
6630
+ .it-theme-color-text-input {
6631
+ width: 80px !important;
6632
+ padding: 4px 6px !important;
6633
+ font-size: 11px !important;
6634
+ font-family: monospace !important;
6635
+ text-align: center !important;
6636
+ border-radius: 6px !important;
6637
+ border: 1px solid #cbd5e1 !important;
6638
+ background-color: #ffffff !important;
6639
+ color: #334155 !important;
6640
+ outline: none !important;
6641
+ transition: border-color 0.2s !important;
6642
+ box-sizing: border-box !important;
6643
+ }
6644
+ .dark .it-theme-color-text-input, [data-theme="dark"] .it-theme-color-text-input {
6645
+ border-color: #475569 !important;
6646
+ background-color: #1e293b !important;
6647
+ color: #cbd5e1 !important;
6648
+ }
6649
+
6650
+ /* Mode Selector Segmented Control */
6651
+ .it-theme-mode-selector {
6652
+ display: grid !important;
6653
+ grid-template-columns: repeat(3, 1fr) !important;
6654
+ gap: 2px !important;
6655
+ background-color: #f1f5f9 !important;
6656
+ padding: 2px !important;
6657
+ border-radius: 8px !important;
6658
+ width: 180px !important;
6659
+ }
6660
+ .dark .it-theme-mode-selector, [data-theme="dark"] .it-theme-mode-selector {
6661
+ background-color: #1e293b !important;
6662
+ }
6663
+
6664
+ .it-theme-mode-btn {
6665
+ background: none !important;
6666
+ border: none !important;
6667
+ padding: 6px 8px !important;
6668
+ font-size: 11px !important;
6669
+ font-weight: 600 !important;
6670
+ color: #475569 !important;
6671
+ border-radius: 6px !important;
6672
+ cursor: pointer !important;
6673
+ text-align: center !important;
6674
+ transition: all 0.2s ease !important;
6675
+ }
6676
+ .dark .it-theme-mode-btn, [data-theme="dark"] .it-theme-mode-btn {
6677
+ color: #94a3b8 !important;
6678
+ }
6679
+
6680
+ .it-theme-mode-btn-active {
6681
+ background-color: #ffffff !important;
6682
+ color: var(--color-primary) !important;
6683
+ box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
6684
+ }
6685
+ .dark .it-theme-mode-btn-active, [data-theme="dark"] .it-theme-mode-btn-active {
6686
+ background-color: #0f172a !important;
6687
+ color: var(--color-primary) !important;
6688
+ }
6689
+
6690
+ /* Saved notification toast */
6691
+ .it-theme-toast-container {
6692
+ height: 20px !important;
6693
+ margin: 6px 0 !important;
6694
+ position: relative !important;
6695
+ }
6696
+
6697
+ .it-theme-toast {
6698
+ position: absolute !important;
6699
+ top: 0 !important;
6700
+ left: 0 !important;
6701
+ right: 0 !important;
6702
+ display: flex !important;
6703
+ justify-content: center !important;
6704
+ }
6705
+
6706
+ .it-theme-toast-badge {
6707
+ display: inline-flex !important;
6708
+ align-items: center !important;
6709
+ gap: 4px !important;
6710
+ font-size: 10px !important;
6711
+ font-weight: 600 !important;
6712
+ background-color: rgba(34, 197, 94, 0.1) !important;
6713
+ color: #16a34a !important;
6714
+ padding: 3px 10px !important;
6715
+ border-radius: 9999px !important;
6716
+ border: 1px solid rgba(34, 197, 94, 0.2) !important;
6717
+ }
6718
+
6719
+ /* Drawer Footer */
6720
+ .it-theme-drawer-footer {
6721
+ padding-top: 12px !important;
6722
+ margin-top: 12px !important;
6723
+ border-top: 1px solid #e2e8f0 !important;
6724
+ display: flex !important;
6725
+ align-items: center !important;
6726
+ justify-content: space-between !important;
6727
+ }
6728
+ .dark .it-theme-drawer-footer, [data-theme="dark"] .it-theme-drawer-footer {
6729
+ border-top-color: #1e293b !important;
6730
+ }
6731
+
6732
+ .it-theme-reset-btn {
6733
+ display: flex !important;
6734
+ align-items: center !important;
6735
+ gap: 6px !important;
6736
+ padding: 6px 12px !important;
6737
+ font-size: 11px !important;
6738
+ font-weight: 600 !important;
6739
+ background: none !important;
6740
+ border: none !important;
6741
+ border-radius: 6px !important;
6742
+ color: #64748b !important;
6743
+ cursor: pointer !important;
6744
+ transition: background-color 0.2s, color 0.2s !important;
6745
+ }
6746
+ .it-theme-reset-btn:hover {
6747
+ background-color: #f1f5f9 !important;
6748
+ color: #1e293b !important;
6749
+ }
6750
+ .dark .it-theme-reset-btn:hover, [data-theme="dark"] .it-theme-reset-btn:hover {
6751
+ background-color: #1e293b !important;
6752
+ color: #f8fafc !important;
6753
+ }
6754
+
6755
+ .it-theme-done-btn {
6756
+ padding: 6px 16px !important;
6757
+ font-size: 11px !important;
6758
+ font-weight: 700 !important;
6759
+ border: none !important;
6760
+ border-radius: 6px !important;
6761
+ color: #ffffff !important;
6762
+ cursor: pointer !important;
6763
+ box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
6764
+ transition: transform 0.2s, background-color 0.2s !important;
6765
+ }
6766
+ .it-theme-done-btn:hover {
6767
+ transform: translateY(-1px) !important;
6768
+ }
6769
+ `;
6770
+ setShowSavedToast(true);
6771
+ const timer = setTimeout(() => setShowSavedToast(false), 1500);
6772
+ return () => clearTimeout(timer);
6773
+ }, [palette2, resolvedTheme]);
6774
+ const updateColor = (key, value) => {
6775
+ setPaletteState((prev) => {
6776
+ if (key.includes(".")) {
6777
+ const [section, subKey] = key.split(".");
6778
+ return {
6779
+ ...prev,
6780
+ [section]: {
6781
+ ...prev[section],
6782
+ [subKey]: value
6783
+ }
6784
+ };
6785
+ }
6786
+ return {
6787
+ ...prev,
6788
+ [key]: value
6789
+ };
6790
+ });
6791
+ };
6792
+ const applyPreset = (colors2) => {
6793
+ setPaletteState(colors2);
6794
+ };
6795
+ const resetTheme = () => {
6796
+ const basePalette = {
6797
+ ...DEFAULT_PALETTE,
6798
+ ...theme2,
6799
+ layout: { ...DEFAULT_PALETTE.layout, ...theme2?.layout },
6800
+ table: { ...DEFAULT_PALETTE.table, ...theme2?.table }
6801
+ };
6802
+ setPaletteState(basePalette);
6803
+ };
6804
+ return /* @__PURE__ */ jsxs22(
6805
+ ITThemeContext.Provider,
6806
+ {
6807
+ value: {
6808
+ palette: palette2,
6809
+ colors: palette2,
6810
+ setPalette: setPaletteState,
6811
+ updateColor,
6812
+ resetTheme,
6813
+ applyPreset,
6814
+ resolvedTheme,
6815
+ darkModeMode,
6816
+ setDarkModeMode
6817
+ },
6818
+ children: [
6819
+ children,
6820
+ /* @__PURE__ */ jsx31(
6821
+ "button",
6822
+ {
6823
+ onClick: () => setIsOpen((prev) => !prev),
6824
+ className: "it-theme-fab it-theme-bounce",
6825
+ style: {
6826
+ backgroundColor: "var(--color-primary)"
6827
+ },
6828
+ onMouseEnter: (e) => {
6829
+ e.currentTarget.style.backgroundColor = "var(--color-primary-hover)";
6830
+ },
6831
+ onMouseLeave: (e) => {
6832
+ e.currentTarget.style.backgroundColor = "var(--color-primary)";
6833
+ },
6834
+ "aria-label": "Configurar Paleta de Colores",
6835
+ title: "Configurar Paleta de Colores",
6836
+ children: /* @__PURE__ */ jsx31(MdPalette, { style: { width: "28px", height: "28px" } })
6837
+ }
6838
+ ),
6839
+ isOpen && /* @__PURE__ */ jsxs22(Fragment6, { children: [
6840
+ /* @__PURE__ */ jsx31(
6841
+ "div",
6842
+ {
6843
+ onClick: () => setIsOpen(false),
6844
+ className: "it-theme-backdrop"
6845
+ }
6846
+ ),
6847
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-drawer", children: [
6848
+ /* @__PURE__ */ jsxs22("div", { children: [
6849
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-drawer-header", children: [
6850
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-drawer-title-group", children: [
6851
+ /* @__PURE__ */ jsx31(
6852
+ "div",
6853
+ {
6854
+ className: "it-theme-icon-container",
6855
+ style: { backgroundColor: "var(--color-primary)" },
6856
+ children: /* @__PURE__ */ jsx31(MdPalette, { style: { width: "20px", height: "20px" } })
6857
+ }
6858
+ ),
6859
+ /* @__PURE__ */ jsxs22("div", { children: [
6860
+ /* @__PURE__ */ jsx31("h3", { className: "it-theme-drawer-title", children: "ITTheme Designer" }),
6861
+ /* @__PURE__ */ jsx31("p", { className: "it-theme-drawer-subtitle", children: "Configure color tokens in real-time" })
6862
+ ] })
6863
+ ] }),
6864
+ /* @__PURE__ */ jsx31(
6865
+ "button",
6866
+ {
6867
+ onClick: () => setIsOpen(false),
6868
+ className: "it-theme-close-btn",
6869
+ children: /* @__PURE__ */ jsx31(MdClose, { style: { width: "20px", height: "20px" } })
6870
+ }
6871
+ )
6872
+ ] }),
6873
+ /* @__PURE__ */ jsx31("div", { className: "it-theme-toast-container", children: showSavedToast && /* @__PURE__ */ jsx31("div", { className: "it-theme-toast", children: /* @__PURE__ */ jsxs22("span", { className: "it-theme-toast-badge", children: [
6874
+ /* @__PURE__ */ jsx31(MdCheck, { style: { width: "14px", height: "14px" } }),
6875
+ "Auto-saved to LocalStorage"
6876
+ ] }) }) }),
6877
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-section", style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "16px" }, children: [
6878
+ /* @__PURE__ */ jsx31("h4", { className: "it-theme-section-title", style: { margin: 0 }, children: "Apariencia" }),
6879
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-mode-selector", children: [
6880
+ /* @__PURE__ */ jsx31(
6881
+ "button",
6882
+ {
6883
+ type: "button",
6884
+ onClick: () => setDarkModeMode("light"),
6885
+ className: `it-theme-mode-btn ${darkModeMode === "light" ? "it-theme-mode-btn-active" : ""}`,
6886
+ children: "Claro"
6887
+ }
6888
+ ),
6889
+ /* @__PURE__ */ jsx31(
6890
+ "button",
6891
+ {
6892
+ type: "button",
6893
+ onClick: () => setDarkModeMode("dark"),
6894
+ className: `it-theme-mode-btn ${darkModeMode === "dark" ? "it-theme-mode-btn-active" : ""}`,
6895
+ children: "Oscuro"
6896
+ }
6897
+ ),
6898
+ /* @__PURE__ */ jsx31(
6899
+ "button",
6900
+ {
6901
+ type: "button",
6902
+ onClick: () => setDarkModeMode("system"),
6903
+ className: `it-theme-mode-btn ${darkModeMode === "system" ? "it-theme-mode-btn-active" : ""}`,
6904
+ children: "Local"
6905
+ }
6906
+ )
6907
+ ] })
6908
+ ] }),
6909
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-section", children: [
6910
+ /* @__PURE__ */ jsx31("h4", { className: "it-theme-section-title", children: "Presets" }),
6911
+ /* @__PURE__ */ jsx31("div", { className: "it-theme-presets-grid", children: PRESETS.map((preset) => {
6912
+ const isSelected = JSON.stringify(preset.colors) === JSON.stringify(palette2);
6913
+ return /* @__PURE__ */ jsxs22(
6914
+ "button",
6915
+ {
6916
+ onClick: () => applyPreset(preset.colors),
6917
+ className: "it-theme-preset-card",
6918
+ style: isSelected ? {
6919
+ borderColor: "var(--color-primary)",
6920
+ backgroundColor: "color-mix(in srgb, var(--color-primary) 5%, transparent)",
6921
+ boxShadow: "0 0 0 1px var(--color-primary)"
6922
+ } : {},
6923
+ children: [
6924
+ /* @__PURE__ */ jsx31("span", { className: "it-theme-preset-name", children: preset.name }),
6925
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-preset-colors", children: [
6926
+ /* @__PURE__ */ jsx31(
6927
+ "span",
6928
+ {
6929
+ className: "it-theme-preset-dot",
6930
+ style: { backgroundColor: preset.colors.primary }
6931
+ }
6932
+ ),
6933
+ /* @__PURE__ */ jsx31(
6934
+ "span",
6935
+ {
6936
+ className: "it-theme-preset-dot",
6937
+ style: { backgroundColor: preset.colors.secondary }
6938
+ }
6939
+ ),
6940
+ /* @__PURE__ */ jsx31(
6941
+ "span",
6942
+ {
6943
+ className: "it-theme-preset-dot",
6944
+ style: { backgroundColor: preset.colors.ternary }
6945
+ }
6946
+ ),
6947
+ /* @__PURE__ */ jsx31(
6948
+ "span",
6949
+ {
6950
+ className: "it-theme-preset-dot",
6951
+ style: { backgroundColor: preset.colors.success }
6952
+ }
6953
+ )
6954
+ ] })
6955
+ ]
6956
+ },
6957
+ preset.name
6958
+ );
6959
+ }) })
6960
+ ] }),
6961
+ /* @__PURE__ */ jsxs22("div", { children: [
6962
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-section", children: [
6963
+ /* @__PURE__ */ jsx31("h4", { className: "it-theme-section-title", children: "Base Brand Colors" }),
6964
+ /* @__PURE__ */ jsx31("div", { className: "it-theme-color-list", children: [
6965
+ "primary",
6966
+ "secondary",
6967
+ "ternary",
6968
+ "danger",
6969
+ "success",
6970
+ "info",
6971
+ "alert",
6972
+ "warning"
6973
+ ].map((key) => {
6974
+ return /* @__PURE__ */ jsxs22(
6975
+ "div",
6976
+ {
6977
+ className: "it-theme-color-row",
6978
+ children: [
6979
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-left", children: [
6980
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-picker-btn", children: [
6981
+ /* @__PURE__ */ jsx31(
6982
+ "input",
6983
+ {
6984
+ type: "color",
6985
+ value: getNestedValue3(palette2, key),
6986
+ onChange: (e) => updateColor(key, e.target.value),
6987
+ className: "it-theme-color-picker-input"
6988
+ }
6989
+ ),
6990
+ /* @__PURE__ */ jsx31(
6991
+ "div",
6992
+ {
6993
+ className: "it-theme-color-picker-preview",
6994
+ style: { backgroundColor: getNestedValue3(palette2, key) }
6995
+ }
6996
+ )
6997
+ ] }),
6998
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-meta", children: [
6999
+ /* @__PURE__ */ jsx31("span", { className: "it-theme-color-label", children: key }),
7000
+ /* @__PURE__ */ jsx31("div", { className: "it-theme-color-hex-text", children: getNestedValue3(palette2, key) })
7001
+ ] })
7002
+ ] }),
7003
+ /* @__PURE__ */ jsx31(
7004
+ "input",
7005
+ {
7006
+ type: "text",
7007
+ value: getNestedValue3(palette2, key),
7008
+ onChange: (e) => updateColor(key, e.target.value),
7009
+ placeholder: "#000000",
7010
+ className: "it-theme-color-text-input"
7011
+ }
7012
+ )
7013
+ ]
7014
+ },
7015
+ key
7016
+ );
7017
+ }) })
7018
+ ] }),
7019
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-section", children: [
7020
+ /* @__PURE__ */ jsx31("h4", { className: "it-theme-section-title", children: "Sidebar & Navbar Styles" }),
7021
+ /* @__PURE__ */ jsx31("div", { className: "it-theme-color-list", children: [
7022
+ "layout.sidebarBg",
7023
+ "layout.sidebarText",
7024
+ "layout.navbarBg",
7025
+ "layout.navbarText"
7026
+ ].map((key) => {
7027
+ const displayLabel = key.split(".")[1];
7028
+ return /* @__PURE__ */ jsxs22(
7029
+ "div",
7030
+ {
7031
+ className: "it-theme-color-row",
7032
+ children: [
7033
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-left", children: [
7034
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-picker-btn", children: [
7035
+ /* @__PURE__ */ jsx31(
7036
+ "input",
7037
+ {
7038
+ type: "color",
7039
+ value: getNestedValue3(palette2, key),
7040
+ onChange: (e) => updateColor(key, e.target.value),
7041
+ className: "it-theme-color-picker-input"
7042
+ }
7043
+ ),
7044
+ /* @__PURE__ */ jsx31(
7045
+ "div",
7046
+ {
7047
+ className: "it-theme-color-picker-preview",
7048
+ style: { backgroundColor: getNestedValue3(palette2, key) }
7049
+ }
7050
+ )
7051
+ ] }),
7052
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-meta", children: [
7053
+ /* @__PURE__ */ jsx31("span", { className: "it-theme-color-label", children: displayLabel }),
7054
+ /* @__PURE__ */ jsx31("div", { className: "it-theme-color-hex-text", children: getNestedValue3(palette2, key) })
7055
+ ] })
7056
+ ] }),
7057
+ /* @__PURE__ */ jsx31(
7058
+ "input",
7059
+ {
7060
+ type: "text",
7061
+ value: getNestedValue3(palette2, key),
7062
+ onChange: (e) => updateColor(key, e.target.value),
7063
+ placeholder: "#000000",
7064
+ className: "it-theme-color-text-input"
7065
+ }
7066
+ )
7067
+ ]
7068
+ },
7069
+ key
7070
+ );
7071
+ }) })
7072
+ ] }),
7073
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-section", style: { paddingBottom: "24px" }, children: [
7074
+ /* @__PURE__ */ jsx31("h4", { className: "it-theme-section-title", children: "Table Styles" }),
7075
+ /* @__PURE__ */ jsx31("div", { className: "it-theme-color-list", children: [
7076
+ "table.headerBg",
7077
+ "table.headerText",
7078
+ "table.rowBg",
7079
+ "table.rowText"
7080
+ ].map((key) => {
7081
+ const displayLabel = key.split(".")[1];
7082
+ return /* @__PURE__ */ jsxs22(
7083
+ "div",
7084
+ {
7085
+ className: "it-theme-color-row",
7086
+ children: [
7087
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-left", children: [
7088
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-picker-btn", children: [
7089
+ /* @__PURE__ */ jsx31(
7090
+ "input",
7091
+ {
7092
+ type: "color",
7093
+ value: getNestedValue3(palette2, key),
7094
+ onChange: (e) => updateColor(key, e.target.value),
7095
+ className: "it-theme-color-picker-input"
7096
+ }
7097
+ ),
7098
+ /* @__PURE__ */ jsx31(
7099
+ "div",
7100
+ {
7101
+ className: "it-theme-color-picker-preview",
7102
+ style: { backgroundColor: getNestedValue3(palette2, key) }
7103
+ }
7104
+ )
7105
+ ] }),
7106
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-color-meta", children: [
7107
+ /* @__PURE__ */ jsx31("span", { className: "it-theme-color-label", children: displayLabel }),
7108
+ /* @__PURE__ */ jsx31("div", { className: "it-theme-color-hex-text", children: getNestedValue3(palette2, key) })
7109
+ ] })
7110
+ ] }),
7111
+ /* @__PURE__ */ jsx31(
7112
+ "input",
7113
+ {
7114
+ type: "text",
7115
+ value: getNestedValue3(palette2, key),
7116
+ onChange: (e) => updateColor(key, e.target.value),
7117
+ placeholder: "#000000",
7118
+ className: "it-theme-color-text-input"
7119
+ }
7120
+ )
7121
+ ]
7122
+ },
7123
+ key
7124
+ );
7125
+ }) })
7126
+ ] })
7127
+ ] })
7128
+ ] }),
7129
+ /* @__PURE__ */ jsxs22("div", { className: "it-theme-drawer-footer", children: [
7130
+ /* @__PURE__ */ jsxs22(
7131
+ "button",
7132
+ {
7133
+ onClick: resetTheme,
7134
+ className: "it-theme-reset-btn",
7135
+ children: [
7136
+ /* @__PURE__ */ jsx31(MdRefresh, { style: { width: "16px", height: "16px" } }),
7137
+ "Reset Defaults"
7138
+ ]
7139
+ }
7140
+ ),
7141
+ /* @__PURE__ */ jsx31(
7142
+ "button",
7143
+ {
7144
+ onClick: () => setIsOpen(false),
7145
+ className: "it-theme-done-btn",
7146
+ style: {
7147
+ backgroundColor: "var(--color-primary)"
7148
+ },
7149
+ onMouseEnter: (e) => {
7150
+ e.currentTarget.style.backgroundColor = "var(--color-primary-hover)";
7151
+ },
7152
+ onMouseLeave: (e) => {
7153
+ e.currentTarget.style.backgroundColor = "var(--color-primary)";
7154
+ },
7155
+ children: "Done"
7156
+ }
7157
+ )
7158
+ ] })
7159
+ ] })
7160
+ ] })
7161
+ ]
7162
+ }
7163
+ );
5361
7164
  }
5362
7165
 
5363
7166
  // src/types/yup.types.ts
@@ -5371,6 +7174,7 @@ var createValidationSchema = (fields) => Yup.object().shape(
5371
7174
  }, {})
5372
7175
  );
5373
7176
  export {
7177
+ FileTypeEnum,
5374
7178
  ITBadget,
5375
7179
  ITButton,
5376
7180
  calendar_default as ITCalendar,
@@ -5397,6 +7201,8 @@ export {
5397
7201
  ITTimePicker,
5398
7202
  ITToast,
5399
7203
  tripleFilter_default as ITTripleFilter,
5400
- createValidationSchema
7204
+ UploadStatus,
7205
+ createValidationSchema,
7206
+ useITTheme
5401
7207
  };
5402
7208
  //# sourceMappingURL=index.js.map