@axzydev/axzy_ui_system 1.0.166 → 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.cjs +2494 -589
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +659 -8
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +105 -33
- package/dist/index.d.ts +105 -33
- package/dist/index.js +2473 -573
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/theme/theme.ts +21 -21
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(
|
|
761
|
-
|
|
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
|
-
|
|
788
|
-
|
|
789
|
-
"
|
|
790
|
-
|
|
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:
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
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
|
|
820
|
-
|
|
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
|
-
|
|
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
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
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
|
-
|
|
835
|
-
)
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
"
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
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: "
|
|
928
|
+
className: "flex-1 min-w-[120px] relative",
|
|
929
|
+
style: { borderRight: "1px solid var(--calendar-border, #e2e8f0)" },
|
|
857
930
|
children: [
|
|
858
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ jsxs(
|
|
859
932
|
"div",
|
|
860
933
|
{
|
|
861
|
-
className: "
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
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
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
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__ */
|
|
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
|
|
885
|
-
|
|
886
|
-
|
|
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
|
-
|
|
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
|
-
|
|
907
|
-
))
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
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:
|
|
1121
|
-
//
|
|
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
|
|
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:
|
|
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":
|
|
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":
|
|
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:
|
|
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
|
-
|
|
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 &&
|
|
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:
|
|
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 (
|
|
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":
|
|
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
|
-
|
|
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:
|
|
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 (
|
|
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":
|
|
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
|
-
|
|
4043
|
+
hasError && /* @__PURE__ */ jsx19("p", { className: "text-red-500 text-xs mt-1", children: errorMessage })
|
|
3892
4044
|
] });
|
|
3893
4045
|
}
|
|
3894
4046
|
|
|
@@ -3988,6 +4140,90 @@ function ITText({ children, className = "" }) {
|
|
|
3988
4140
|
return /* @__PURE__ */ jsx21("p", { className: `${className} text-gray-900 `, children });
|
|
3989
4141
|
}
|
|
3990
4142
|
|
|
4143
|
+
// src/components/tabs/tabs.tsx
|
|
4144
|
+
import { useState as useState17 } from "react";
|
|
4145
|
+
import { clsx as clsx16 } from "clsx";
|
|
4146
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4147
|
+
var ITTabs = ({
|
|
4148
|
+
items,
|
|
4149
|
+
defaultActiveId,
|
|
4150
|
+
onChange,
|
|
4151
|
+
variant = "line",
|
|
4152
|
+
className = "",
|
|
4153
|
+
containerClassName = ""
|
|
4154
|
+
}) => {
|
|
4155
|
+
const [activeId, setActiveId] = useState17(defaultActiveId || items[0]?.id);
|
|
4156
|
+
const handleTabClick = (id, disabled) => {
|
|
4157
|
+
if (disabled) return;
|
|
4158
|
+
setActiveId(id);
|
|
4159
|
+
if (onChange) onChange(id);
|
|
4160
|
+
};
|
|
4161
|
+
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
4162
|
+
return /* @__PURE__ */ jsxs15("div", { className: clsx16("w-full", containerClassName), children: [
|
|
4163
|
+
/* @__PURE__ */ jsx22("div", { className: clsx16(
|
|
4164
|
+
"flex border-gray-200 mb-4",
|
|
4165
|
+
variant === "line" ? "border-b" : "gap-2 p-1 bg-gray-100 rounded-lg w-fit",
|
|
4166
|
+
className
|
|
4167
|
+
), children: items.map((item) => {
|
|
4168
|
+
const isActive = item.id === activeId;
|
|
4169
|
+
return /* @__PURE__ */ jsxs15(
|
|
4170
|
+
"button",
|
|
4171
|
+
{
|
|
4172
|
+
onClick: () => handleTabClick(item.id, item.disabled),
|
|
4173
|
+
disabled: item.disabled,
|
|
4174
|
+
className: clsx16(
|
|
4175
|
+
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all duration-200 outline-none",
|
|
4176
|
+
// LINE VARIANT
|
|
4177
|
+
variant === "line" && [
|
|
4178
|
+
"border-b-2 -mb-[2px]",
|
|
4179
|
+
isActive ? "border-primary-500 text-primary-600" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"
|
|
4180
|
+
],
|
|
4181
|
+
// PILL VARIANT
|
|
4182
|
+
variant === "pill" && [
|
|
4183
|
+
"rounded-md",
|
|
4184
|
+
isActive ? "bg-white text-primary-600 shadow-sm" : "text-gray-500 hover:text-gray-700"
|
|
4185
|
+
],
|
|
4186
|
+
item.disabled && "opacity-50 cursor-not-allowed"
|
|
4187
|
+
),
|
|
4188
|
+
children: [
|
|
4189
|
+
item.icon && /* @__PURE__ */ jsx22("span", { className: "w-4 h-4", children: item.icon }),
|
|
4190
|
+
item.label
|
|
4191
|
+
]
|
|
4192
|
+
},
|
|
4193
|
+
item.id
|
|
4194
|
+
);
|
|
4195
|
+
}) }),
|
|
4196
|
+
/* @__PURE__ */ jsx22("div", { className: "tab-content animate-fadeIn", children: activeContent })
|
|
4197
|
+
] });
|
|
4198
|
+
};
|
|
4199
|
+
var tabs_default = ITTabs;
|
|
4200
|
+
|
|
4201
|
+
// src/components/triple-filter/tripleFilter.tsx
|
|
4202
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
4203
|
+
var ITTripleFilter = ({
|
|
4204
|
+
value,
|
|
4205
|
+
onChange,
|
|
4206
|
+
options,
|
|
4207
|
+
className = ""
|
|
4208
|
+
}) => {
|
|
4209
|
+
return /* @__PURE__ */ jsx23(
|
|
4210
|
+
"div",
|
|
4211
|
+
{
|
|
4212
|
+
className: `flex bg-slate-100 p-1 rounded-xl gap-1 w-fit ${className}`,
|
|
4213
|
+
children: options.map((option) => /* @__PURE__ */ jsx23(
|
|
4214
|
+
"button",
|
|
4215
|
+
{
|
|
4216
|
+
onClick: () => onChange(option.value),
|
|
4217
|
+
className: `px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap ${value === option.value ? "bg-white text-emerald-600 shadow-sm" : "text-slate-400 hover:text-slate-600"}`,
|
|
4218
|
+
children: option.label
|
|
4219
|
+
},
|
|
4220
|
+
String(option.value)
|
|
4221
|
+
))
|
|
4222
|
+
}
|
|
4223
|
+
);
|
|
4224
|
+
};
|
|
4225
|
+
var tripleFilter_default = ITTripleFilter;
|
|
4226
|
+
|
|
3991
4227
|
// src/types/toast.types.ts
|
|
3992
4228
|
var positionStyles = {
|
|
3993
4229
|
"top-right": "top-4 right-4",
|
|
@@ -3999,10 +4235,10 @@ var positionStyles = {
|
|
|
3999
4235
|
};
|
|
4000
4236
|
|
|
4001
4237
|
// src/components/toast/toast.tsx
|
|
4002
|
-
import
|
|
4003
|
-
import { useEffect as useEffect14, useState as
|
|
4238
|
+
import clsx17 from "clsx";
|
|
4239
|
+
import { useEffect as useEffect14, useState as useState18 } from "react";
|
|
4004
4240
|
import { FaTimesCircle, FaCheckCircle, FaExclamationTriangle, FaInfoCircle, FaTimes as FaTimes5 } from "react-icons/fa";
|
|
4005
|
-
import { jsx as
|
|
4241
|
+
import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4006
4242
|
function ITToast({
|
|
4007
4243
|
message,
|
|
4008
4244
|
type = "info",
|
|
@@ -4010,7 +4246,7 @@ function ITToast({
|
|
|
4010
4246
|
position = "top-right",
|
|
4011
4247
|
onClose
|
|
4012
4248
|
}) {
|
|
4013
|
-
const [isVisible, setIsVisible] =
|
|
4249
|
+
const [isVisible, setIsVisible] = useState18(true);
|
|
4014
4250
|
useEffect14(() => {
|
|
4015
4251
|
const timer = setTimeout(() => {
|
|
4016
4252
|
setIsVisible(false);
|
|
@@ -4031,21 +4267,21 @@ function ITToast({
|
|
|
4031
4267
|
const TypeIcon = () => {
|
|
4032
4268
|
switch (type) {
|
|
4033
4269
|
case "success":
|
|
4034
|
-
return /* @__PURE__ */
|
|
4270
|
+
return /* @__PURE__ */ jsx24(FaCheckCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
4035
4271
|
case "error":
|
|
4036
4272
|
case "danger":
|
|
4037
|
-
return /* @__PURE__ */
|
|
4273
|
+
return /* @__PURE__ */ jsx24(FaTimesCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
4038
4274
|
case "warning":
|
|
4039
|
-
return /* @__PURE__ */
|
|
4275
|
+
return /* @__PURE__ */ jsx24(FaExclamationTriangle, { className: "w-5 h-5 flex-shrink-0" });
|
|
4040
4276
|
case "info":
|
|
4041
4277
|
default:
|
|
4042
|
-
return /* @__PURE__ */
|
|
4278
|
+
return /* @__PURE__ */ jsx24(FaInfoCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
4043
4279
|
}
|
|
4044
4280
|
};
|
|
4045
|
-
return /* @__PURE__ */
|
|
4281
|
+
return /* @__PURE__ */ jsxs16(
|
|
4046
4282
|
"div",
|
|
4047
4283
|
{
|
|
4048
|
-
className:
|
|
4284
|
+
className: clsx17(
|
|
4049
4285
|
"fixed z-50 p-4 rounded-xl shadow-xl flex items-center justify-between gap-4 transition-all duration-300 text-white min-w-[300px]",
|
|
4050
4286
|
positionStyles[position],
|
|
4051
4287
|
{
|
|
@@ -4058,17 +4294,17 @@ function ITToast({
|
|
|
4058
4294
|
style: { backgroundColor },
|
|
4059
4295
|
role: "alert",
|
|
4060
4296
|
children: [
|
|
4061
|
-
/* @__PURE__ */
|
|
4062
|
-
/* @__PURE__ */
|
|
4063
|
-
/* @__PURE__ */
|
|
4297
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3", children: [
|
|
4298
|
+
/* @__PURE__ */ jsx24(TypeIcon, {}),
|
|
4299
|
+
/* @__PURE__ */ jsx24("span", { className: "font-medium text-sm sm:text-base leading-snug", children: message })
|
|
4064
4300
|
] }),
|
|
4065
|
-
/* @__PURE__ */
|
|
4301
|
+
/* @__PURE__ */ jsx24(
|
|
4066
4302
|
"button",
|
|
4067
4303
|
{
|
|
4068
4304
|
onClick: handleClose,
|
|
4069
4305
|
className: "p-1.5 rounded-full hover:bg-black/15 transition-colors focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
4070
4306
|
"aria-label": "Close notification",
|
|
4071
|
-
children: /* @__PURE__ */
|
|
4307
|
+
children: /* @__PURE__ */ jsx24(FaTimes5, { className: "w-4 h-4" })
|
|
4072
4308
|
}
|
|
4073
4309
|
)
|
|
4074
4310
|
]
|
|
@@ -4077,10 +4313,27 @@ function ITToast({
|
|
|
4077
4313
|
}
|
|
4078
4314
|
|
|
4079
4315
|
// src/components/dropfile/dropfile.tsx
|
|
4080
|
-
import { useState as
|
|
4316
|
+
import { useState as useState19, useEffect as useEffect15, useRef as useRef8 } from "react";
|
|
4081
4317
|
import { useDropzone } from "react-dropzone";
|
|
4082
|
-
import
|
|
4083
|
-
import { Fragment as Fragment5, jsx as
|
|
4318
|
+
import clsx18 from "clsx";
|
|
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 || {});
|
|
4084
4337
|
var ITDropfile = ({
|
|
4085
4338
|
onFileSelect,
|
|
4086
4339
|
onCancel,
|
|
@@ -4093,11 +4346,11 @@ var ITDropfile = ({
|
|
|
4093
4346
|
onStatusChange,
|
|
4094
4347
|
initialPreviewUrl
|
|
4095
4348
|
}) => {
|
|
4096
|
-
const [selectedFile, setSelectedFile] =
|
|
4097
|
-
const [fileType, setFileType] =
|
|
4098
|
-
const [imagePreview, setImagePreview] =
|
|
4099
|
-
const [isConfirmed, setIsConfirmed] =
|
|
4100
|
-
const [internalUploadStatus, setInternalUploadStatus] =
|
|
4349
|
+
const [selectedFile, setSelectedFile] = useState19(null);
|
|
4350
|
+
const [fileType, setFileType] = useState19(null);
|
|
4351
|
+
const [imagePreview, setImagePreview] = useState19(initialPreviewUrl || null);
|
|
4352
|
+
const [isConfirmed, setIsConfirmed] = useState19(false);
|
|
4353
|
+
const [internalUploadStatus, setInternalUploadStatus] = useState19(
|
|
4101
4354
|
initialPreviewUrl ? "subido" /* UPLOADED */ : "pendiente" /* PENDING */
|
|
4102
4355
|
);
|
|
4103
4356
|
const canvasRef = useRef8(null);
|
|
@@ -4190,9 +4443,9 @@ var ITDropfile = ({
|
|
|
4190
4443
|
}
|
|
4191
4444
|
};
|
|
4192
4445
|
const { label, color, dotColor } = config[status];
|
|
4193
|
-
return /* @__PURE__ */
|
|
4194
|
-
/* @__PURE__ */
|
|
4195
|
-
/* @__PURE__ */
|
|
4446
|
+
return /* @__PURE__ */ jsxs17("div", { className: `inline-flex items-center gap-2 px-2.5 py-1 rounded-full border ${color}`, children: [
|
|
4447
|
+
/* @__PURE__ */ jsx25("div", { className: `w-2 h-2 rounded-full ${dotColor}` }),
|
|
4448
|
+
/* @__PURE__ */ jsx25("span", { className: "text-xs font-medium flex items-center gap-1.5", children: label })
|
|
4196
4449
|
] });
|
|
4197
4450
|
};
|
|
4198
4451
|
const onDrop = (acceptedFiles) => {
|
|
@@ -4267,19 +4520,19 @@ var ITDropfile = ({
|
|
|
4267
4520
|
handleCancel();
|
|
4268
4521
|
};
|
|
4269
4522
|
const isImage = fileType && fileType.startsWith("image/");
|
|
4270
|
-
return /* @__PURE__ */
|
|
4271
|
-
/* @__PURE__ */
|
|
4272
|
-
/* @__PURE__ */
|
|
4523
|
+
return /* @__PURE__ */ jsxs17("div", { className: clsx18("w-full transition-all duration-300", containerClassName), children: [
|
|
4524
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between mb-2", children: [
|
|
4525
|
+
/* @__PURE__ */ jsxs17("label", { className: "block text-sm font-semibold text-gray-700", children: [
|
|
4273
4526
|
"Subir archivo ",
|
|
4274
|
-
/* @__PURE__ */
|
|
4527
|
+
/* @__PURE__ */ jsxs17("span", { className: "text-gray-400 font-normal text-xs", children: [
|
|
4275
4528
|
"(",
|
|
4276
4529
|
getFileExtensions(),
|
|
4277
4530
|
")"
|
|
4278
4531
|
] })
|
|
4279
4532
|
] }),
|
|
4280
|
-
showStatusBadge && selectedFile && /* @__PURE__ */
|
|
4533
|
+
showStatusBadge && selectedFile && /* @__PURE__ */ jsx25(StatusBadge, { status: uploadStatus })
|
|
4281
4534
|
] }),
|
|
4282
|
-
!selectedFile && !imagePreview ? /* @__PURE__ */
|
|
4535
|
+
!selectedFile && !imagePreview ? /* @__PURE__ */ jsxs17(
|
|
4283
4536
|
"div",
|
|
4284
4537
|
{
|
|
4285
4538
|
...getRootProps(),
|
|
@@ -4289,41 +4542,41 @@ var ITDropfile = ({
|
|
|
4289
4542
|
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-gray-300 bg-white hover:border-primary-400 hover:bg-gray-50"}
|
|
4290
4543
|
`,
|
|
4291
4544
|
children: [
|
|
4292
|
-
/* @__PURE__ */
|
|
4293
|
-
/* @__PURE__ */
|
|
4545
|
+
/* @__PURE__ */ jsx25("input", { ...getInputProps() }),
|
|
4546
|
+
/* @__PURE__ */ jsx25("div", { className: `mb-3 p-3 rounded-full transition-colors duration-300 ${isDragActive ? "bg-primary-100" : "bg-gray-100 group-hover:bg-primary-50"}`, children: /* @__PURE__ */ jsx25(
|
|
4294
4547
|
"svg",
|
|
4295
4548
|
{
|
|
4296
4549
|
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-gray-400 group-hover:text-primary-500"}`,
|
|
4297
4550
|
fill: "none",
|
|
4298
4551
|
viewBox: "0 0 24 24",
|
|
4299
4552
|
stroke: "currentColor",
|
|
4300
|
-
children: /* @__PURE__ */
|
|
4553
|
+
children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" })
|
|
4301
4554
|
}
|
|
4302
4555
|
) }),
|
|
4303
|
-
/* @__PURE__ */
|
|
4556
|
+
/* @__PURE__ */ jsx25("div", { className: "text-center space-y-1", children: /* @__PURE__ */ jsx25("p", { className: `text-sm font-medium transition-colors duration-300 ${isDragActive ? "text-primary-700" : "text-gray-700"}`, children: isDragActive ? "\xA1Suelta aqu\xED!" : "Haz clic o arrastra" }) })
|
|
4304
4557
|
]
|
|
4305
4558
|
}
|
|
4306
|
-
) : /* @__PURE__ */
|
|
4307
|
-
/* @__PURE__ */
|
|
4308
|
-
/* @__PURE__ */
|
|
4309
|
-
/* @__PURE__ */
|
|
4310
|
-
/* @__PURE__ */
|
|
4311
|
-
/* @__PURE__ */
|
|
4559
|
+
) : /* @__PURE__ */ jsxs17("div", { className: "w-full bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden animate-fade-in", children: [
|
|
4560
|
+
/* @__PURE__ */ jsx25("div", { className: "flex items-center justify-between p-3 bg-gray-50 border-b border-gray-100", children: /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
4561
|
+
/* @__PURE__ */ jsx25("div", { className: "flex-shrink-0 w-8 h-8 rounded-lg bg-primary-100 flex items-center justify-center text-primary-600", children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ jsx25("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) : /* @__PURE__ */ jsx25("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }) }),
|
|
4562
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
|
|
4563
|
+
/* @__PURE__ */ jsx25("p", { className: "text-xs font-medium text-gray-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
4564
|
+
/* @__PURE__ */ jsx25("p", { className: "text-[10px] text-gray-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
4312
4565
|
] })
|
|
4313
4566
|
] }) }),
|
|
4314
|
-
/* @__PURE__ */
|
|
4567
|
+
/* @__PURE__ */ jsx25("div", { className: clsx18("relative bg-gray-100 flex items-center justify-center", !contentClassName ? "max-h-[200px] min-h-[100px] overflow-auto" : contentClassName), children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ jsx25(
|
|
4315
4568
|
"img",
|
|
4316
4569
|
{
|
|
4317
4570
|
src: imagePreview,
|
|
4318
4571
|
alt: "Vista previa",
|
|
4319
4572
|
className: "w-full h-full object-contain max-h-[200px]"
|
|
4320
4573
|
}
|
|
4321
|
-
) : /* @__PURE__ */
|
|
4322
|
-
/* @__PURE__ */
|
|
4323
|
-
/* @__PURE__ */
|
|
4574
|
+
) : /* @__PURE__ */ jsxs17("div", { className: "py-8 flex flex-col items-center text-gray-400", children: [
|
|
4575
|
+
/* @__PURE__ */ jsx25("svg", { className: "w-10 h-10 mb-2 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z" }) }),
|
|
4576
|
+
/* @__PURE__ */ jsx25("span", { className: "text-xs", children: "Sin vista previa" })
|
|
4324
4577
|
] }) }),
|
|
4325
|
-
/* @__PURE__ */
|
|
4326
|
-
/* @__PURE__ */
|
|
4578
|
+
/* @__PURE__ */ jsx25("div", { className: "px-3 py-2 bg-white border-t border-gray-100 flex justify-end gap-2", children: !isConfirmed ? /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
4579
|
+
/* @__PURE__ */ jsx25(
|
|
4327
4580
|
"button",
|
|
4328
4581
|
{
|
|
4329
4582
|
type: "button",
|
|
@@ -4332,31 +4585,31 @@ var ITDropfile = ({
|
|
|
4332
4585
|
children: "Cancelar"
|
|
4333
4586
|
}
|
|
4334
4587
|
),
|
|
4335
|
-
/* @__PURE__ */
|
|
4588
|
+
/* @__PURE__ */ jsxs17(
|
|
4336
4589
|
"button",
|
|
4337
4590
|
{
|
|
4338
4591
|
type: "button",
|
|
4339
4592
|
onClick: handleConfirm,
|
|
4340
4593
|
className: "px-3 py-1.5 text-xs font-medium text-white bg-primary-600 rounded-lg hover:bg-primary-700 shadow-sm transition-colors flex items-center gap-1",
|
|
4341
4594
|
children: [
|
|
4342
|
-
/* @__PURE__ */
|
|
4343
|
-
/* @__PURE__ */
|
|
4595
|
+
/* @__PURE__ */ jsx25("span", { children: "Confirmar" }),
|
|
4596
|
+
/* @__PURE__ */ jsx25("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
4344
4597
|
]
|
|
4345
4598
|
}
|
|
4346
4599
|
)
|
|
4347
|
-
] }) : /* @__PURE__ */
|
|
4600
|
+
] }) : /* @__PURE__ */ jsxs17(
|
|
4348
4601
|
"button",
|
|
4349
4602
|
{
|
|
4350
4603
|
type: "button",
|
|
4351
4604
|
onClick: handleDelete,
|
|
4352
4605
|
className: "px-3 py-1.5 text-xs font-medium text-danger-600 bg-danger-50 border border-danger-100 rounded-lg hover:bg-danger-100 transition-colors flex items-center gap-1",
|
|
4353
4606
|
children: [
|
|
4354
|
-
/* @__PURE__ */
|
|
4355
|
-
/* @__PURE__ */
|
|
4607
|
+
/* @__PURE__ */ jsx25("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) }),
|
|
4608
|
+
/* @__PURE__ */ jsx25("span", { children: "Eliminar" })
|
|
4356
4609
|
]
|
|
4357
4610
|
}
|
|
4358
4611
|
) }),
|
|
4359
|
-
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */
|
|
4612
|
+
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */ jsx25("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsx25("div", { className: "w-full bg-gray-200 rounded-full h-1.5", children: /* @__PURE__ */ jsx25(
|
|
4360
4613
|
"div",
|
|
4361
4614
|
{
|
|
4362
4615
|
className: "bg-primary-600 h-1.5 rounded-full transition-all duration-1000 ease-out",
|
|
@@ -4372,12 +4625,12 @@ var ITDropfile = ({
|
|
|
4372
4625
|
var dropfile_default = ITDropfile;
|
|
4373
4626
|
|
|
4374
4627
|
// src/components/layout/layout.tsx
|
|
4375
|
-
import { useState as
|
|
4628
|
+
import { useState as useState22 } from "react";
|
|
4376
4629
|
|
|
4377
4630
|
// src/components/topbar/topbar.tsx
|
|
4378
4631
|
import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
|
|
4379
|
-
import { useRef as useRef9, useState as
|
|
4380
|
-
import { jsx as
|
|
4632
|
+
import { useRef as useRef9, useState as useState20 } from "react";
|
|
4633
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4381
4634
|
function ITTopBar({
|
|
4382
4635
|
logo,
|
|
4383
4636
|
logoText,
|
|
@@ -4387,10 +4640,10 @@ function ITTopBar({
|
|
|
4387
4640
|
navItems,
|
|
4388
4641
|
onNavItemClick
|
|
4389
4642
|
}) {
|
|
4390
|
-
const [isUserMenuOpen, setIsUserMenuOpen] =
|
|
4643
|
+
const [isUserMenuOpen, setIsUserMenuOpen] = useState20(false);
|
|
4391
4644
|
const userMenuRef = useRef9(null);
|
|
4392
4645
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
4393
|
-
return /* @__PURE__ */
|
|
4646
|
+
return /* @__PURE__ */ jsx26(
|
|
4394
4647
|
"header",
|
|
4395
4648
|
{
|
|
4396
4649
|
className: "sticky top-0 z-40 backdrop-blur-md transition-all duration-300",
|
|
@@ -4399,9 +4652,9 @@ function ITTopBar({
|
|
|
4399
4652
|
borderBottom: `1px solid ${theme.topbar?.borderColor || "#e2e8f0"}`,
|
|
4400
4653
|
boxShadow: theme.topbar?.shadow || "none"
|
|
4401
4654
|
},
|
|
4402
|
-
children: /* @__PURE__ */
|
|
4403
|
-
/* @__PURE__ */
|
|
4404
|
-
showMobileMenuButton && /* @__PURE__ */
|
|
4655
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between h-[72px] px-6 lg:px-8", children: [
|
|
4656
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-5", children: [
|
|
4657
|
+
showMobileMenuButton && /* @__PURE__ */ jsx26(
|
|
4405
4658
|
"button",
|
|
4406
4659
|
{
|
|
4407
4660
|
className: "lg:hidden p-2.5 rounded-xl transition-colors duration-200",
|
|
@@ -4411,12 +4664,12 @@ function ITTopBar({
|
|
|
4411
4664
|
onMouseEnter: (e) => e.currentTarget.style.backgroundColor = theme.topbar?.userMenu?.hoverBackground || "#f1f5f9",
|
|
4412
4665
|
onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
|
|
4413
4666
|
onClick: onToggleMobileMenu,
|
|
4414
|
-
children: /* @__PURE__ */
|
|
4667
|
+
children: /* @__PURE__ */ jsx26(FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
|
|
4415
4668
|
}
|
|
4416
4669
|
),
|
|
4417
|
-
/* @__PURE__ */
|
|
4418
|
-
logo && /* @__PURE__ */
|
|
4419
|
-
logoText && /* @__PURE__ */
|
|
4670
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3", children: [
|
|
4671
|
+
logo && /* @__PURE__ */ jsx26("div", { className: "flex-shrink-0 drop-shadow-sm", children: logo }),
|
|
4672
|
+
logoText && /* @__PURE__ */ jsx26(
|
|
4420
4673
|
"span",
|
|
4421
4674
|
{
|
|
4422
4675
|
className: "text-[1.15rem] font-bold tracking-tight",
|
|
@@ -4425,7 +4678,7 @@ function ITTopBar({
|
|
|
4425
4678
|
}
|
|
4426
4679
|
)
|
|
4427
4680
|
] }),
|
|
4428
|
-
navItems && navItems.length > 0 && /* @__PURE__ */
|
|
4681
|
+
navItems && navItems.length > 0 && /* @__PURE__ */ jsx26("nav", { className: "hidden md:flex ml-8 space-x-1 border-l pl-8", style: { borderColor: theme.topbar?.borderColor || "#e2e8f0" }, children: navItems.map((item) => /* @__PURE__ */ jsx26(
|
|
4429
4682
|
"button",
|
|
4430
4683
|
{
|
|
4431
4684
|
onClick: () => onNavItemClick?.(item.id),
|
|
@@ -4439,16 +4692,16 @@ function ITTopBar({
|
|
|
4439
4692
|
e.currentTarget.style.color = theme.topbar?.textColor || "#475569";
|
|
4440
4693
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
4441
4694
|
},
|
|
4442
|
-
children: /* @__PURE__ */
|
|
4443
|
-
item.icon && /* @__PURE__ */
|
|
4695
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
4696
|
+
item.icon && /* @__PURE__ */ jsx26("span", { className: "opacity-70", children: item.icon }),
|
|
4444
4697
|
item.label
|
|
4445
4698
|
] })
|
|
4446
4699
|
},
|
|
4447
4700
|
item.id
|
|
4448
4701
|
)) })
|
|
4449
4702
|
] }),
|
|
4450
|
-
userMenu && /* @__PURE__ */
|
|
4451
|
-
/* @__PURE__ */
|
|
4703
|
+
userMenu && /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
4704
|
+
/* @__PURE__ */ jsxs18(
|
|
4452
4705
|
"button",
|
|
4453
4706
|
{
|
|
4454
4707
|
type: "button",
|
|
@@ -4464,19 +4717,19 @@ function ITTopBar({
|
|
|
4464
4717
|
},
|
|
4465
4718
|
onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
|
|
4466
4719
|
children: [
|
|
4467
|
-
/* @__PURE__ */
|
|
4468
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
4720
|
+
/* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
4721
|
+
userMenu.userImage ? /* @__PURE__ */ jsx26(
|
|
4469
4722
|
"img",
|
|
4470
4723
|
{
|
|
4471
4724
|
className: "w-9 h-9 rounded-full object-cover ring-2 ring-white shadow-sm",
|
|
4472
4725
|
src: userMenu.userImage,
|
|
4473
4726
|
alt: "Current user"
|
|
4474
4727
|
}
|
|
4475
|
-
) : /* @__PURE__ */
|
|
4476
|
-
/* @__PURE__ */
|
|
4728
|
+
) : /* @__PURE__ */ jsx26("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ jsx26(FaUserCircle2, { className: "w-6 h-6", style: { color: theme.topbar?.iconColor || "#94a3b8" } }) }),
|
|
4729
|
+
/* @__PURE__ */ jsx26("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
|
|
4477
4730
|
] }),
|
|
4478
|
-
/* @__PURE__ */
|
|
4479
|
-
/* @__PURE__ */
|
|
4731
|
+
/* @__PURE__ */ jsxs18("div", { className: "hidden sm:flex flex-col text-left py-0.5", children: [
|
|
4732
|
+
/* @__PURE__ */ jsx26(
|
|
4480
4733
|
"span",
|
|
4481
4734
|
{
|
|
4482
4735
|
className: "font-semibold text-[0.85rem] leading-tight",
|
|
@@ -4484,7 +4737,7 @@ function ITTopBar({
|
|
|
4484
4737
|
children: userMenu.userName
|
|
4485
4738
|
}
|
|
4486
4739
|
),
|
|
4487
|
-
/* @__PURE__ */
|
|
4740
|
+
/* @__PURE__ */ jsx26(
|
|
4488
4741
|
"span",
|
|
4489
4742
|
{
|
|
4490
4743
|
className: "text-[0.7rem] font-medium",
|
|
@@ -4496,7 +4749,7 @@ function ITTopBar({
|
|
|
4496
4749
|
]
|
|
4497
4750
|
}
|
|
4498
4751
|
),
|
|
4499
|
-
/* @__PURE__ */
|
|
4752
|
+
/* @__PURE__ */ jsxs18(
|
|
4500
4753
|
"div",
|
|
4501
4754
|
{
|
|
4502
4755
|
ref: userMenuRef,
|
|
@@ -4509,15 +4762,15 @@ function ITTopBar({
|
|
|
4509
4762
|
border: `1px solid ${theme.topbar?.userMenu?.dropdown?.borderColor || "#f1f5f9"}`
|
|
4510
4763
|
},
|
|
4511
4764
|
children: [
|
|
4512
|
-
/* @__PURE__ */
|
|
4513
|
-
/* @__PURE__ */
|
|
4514
|
-
/* @__PURE__ */
|
|
4765
|
+
/* @__PURE__ */ jsxs18("div", { className: "px-5 py-4 border-b bg-slate-50/50", style: { borderColor: theme.topbar?.userMenu?.dropdown?.borderColor || "#f1f5f9" }, children: [
|
|
4766
|
+
/* @__PURE__ */ jsx26("span", { className: "block font-bold text-[0.9rem]", style: { color: theme.topbar?.userMenu?.textColor || "#0f172a" }, children: userMenu.userName }),
|
|
4767
|
+
/* @__PURE__ */ jsx26("span", { className: "block text-xs font-medium truncate mt-0.5", style: { color: theme.topbar?.userMenu?.subtitleColor || "#64748b" }, children: userMenu.userEmail })
|
|
4515
4768
|
] }),
|
|
4516
|
-
/* @__PURE__ */
|
|
4769
|
+
/* @__PURE__ */ jsx26("ul", { className: "py-2", children: userMenu.menuItems.map((m, i) => {
|
|
4517
4770
|
const isDestructive = m.label.toLowerCase().includes("salir") || m.label.toLowerCase().includes("cerrar") || m.label.toLowerCase().includes("logout");
|
|
4518
|
-
return /* @__PURE__ */
|
|
4519
|
-
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */
|
|
4520
|
-
/* @__PURE__ */
|
|
4771
|
+
return /* @__PURE__ */ jsxs18("li", { className: "px-2", children: [
|
|
4772
|
+
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */ jsx26("div", { className: "h-px bg-slate-100 my-1 mx-2" }),
|
|
4773
|
+
/* @__PURE__ */ jsx26(
|
|
4521
4774
|
"button",
|
|
4522
4775
|
{
|
|
4523
4776
|
onClick: (e) => {
|
|
@@ -4547,18 +4800,21 @@ function ITTopBar({
|
|
|
4547
4800
|
}
|
|
4548
4801
|
|
|
4549
4802
|
// src/components/sidebar/sidebar.tsx
|
|
4550
|
-
import { useEffect as useEffect16, useRef as useRef10, useState as
|
|
4803
|
+
import { useEffect as useEffect16, useRef as useRef10, useState as useState21 } from "react";
|
|
4551
4804
|
import { FaChevronDown as FaChevronDown2 } from "react-icons/fa";
|
|
4552
|
-
import { jsx as
|
|
4805
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4553
4806
|
function ITSidebar({
|
|
4554
4807
|
navigationItems = [],
|
|
4555
4808
|
isCollapsed = false,
|
|
4556
4809
|
onToggleCollapse,
|
|
4557
4810
|
className = "",
|
|
4558
|
-
visibleOnMobile = false
|
|
4811
|
+
visibleOnMobile = false,
|
|
4812
|
+
onItemClick,
|
|
4813
|
+
onSubItemClick,
|
|
4814
|
+
subitemConnector = "|"
|
|
4559
4815
|
}) {
|
|
4560
|
-
const [expandedItems, setExpandedItems] =
|
|
4561
|
-
const [isHovering, setIsHovering] =
|
|
4816
|
+
const [expandedItems, setExpandedItems] = useState21(/* @__PURE__ */ new Set());
|
|
4817
|
+
const [isHovering, setIsHovering] = useState21(false);
|
|
4562
4818
|
const sidebarRef = useRef10(null);
|
|
4563
4819
|
const hoverTimeoutRef = useRef10(null);
|
|
4564
4820
|
const leaveTimeoutRef = useRef10(null);
|
|
@@ -4587,6 +4843,27 @@ function ITSidebar({
|
|
|
4587
4843
|
if (leaveTimeoutRef.current) clearTimeout(leaveTimeoutRef.current);
|
|
4588
4844
|
};
|
|
4589
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]);
|
|
4590
4867
|
const toggleExpanded = (itemId) => {
|
|
4591
4868
|
const newExpanded = new Set(expandedItems);
|
|
4592
4869
|
if (newExpanded.has(itemId)) newExpanded.delete(itemId);
|
|
@@ -4596,13 +4873,14 @@ function ITSidebar({
|
|
|
4596
4873
|
const handleItemClick = (item) => {
|
|
4597
4874
|
if (item.subitems && item.subitems.length > 0) {
|
|
4598
4875
|
toggleExpanded(item.id);
|
|
4599
|
-
} else
|
|
4600
|
-
item.action();
|
|
4876
|
+
} else {
|
|
4877
|
+
if (item.action) item.action();
|
|
4878
|
+
if (onItemClick) onItemClick(item);
|
|
4601
4879
|
}
|
|
4602
4880
|
};
|
|
4603
4881
|
const isSidebarCollapsed = visibleOnMobile ? false : !isHovering && isCollapsed;
|
|
4604
4882
|
const sidebarWidth = isSidebarCollapsed ? "w-[88px]" : "w-[280px]";
|
|
4605
|
-
return /* @__PURE__ */
|
|
4883
|
+
return /* @__PURE__ */ jsx27(
|
|
4606
4884
|
"aside",
|
|
4607
4885
|
{
|
|
4608
4886
|
ref: sidebarRef,
|
|
@@ -4621,8 +4899,8 @@ function ITSidebar({
|
|
|
4621
4899
|
WebkitBackdropFilter: "blur(12px)",
|
|
4622
4900
|
backdropFilter: "blur(12px)"
|
|
4623
4901
|
},
|
|
4624
|
-
children: /* @__PURE__ */
|
|
4625
|
-
/* @__PURE__ */
|
|
4902
|
+
children: /* @__PURE__ */ jsx27("nav", { className: "flex-1 py-6 overflow-y-auto overflow-x-hidden custom-scrollbar px-4", children: /* @__PURE__ */ jsx27("ul", { className: "space-y-2", children: navigationItems.map((item) => /* @__PURE__ */ jsxs19("li", { className: "relative group/navitem", children: [
|
|
4903
|
+
/* @__PURE__ */ jsxs19(
|
|
4626
4904
|
"div",
|
|
4627
4905
|
{
|
|
4628
4906
|
className: `flex items-center cursor-pointer
|
|
@@ -4643,15 +4921,15 @@ function ITSidebar({
|
|
|
4643
4921
|
},
|
|
4644
4922
|
onClick: () => handleItemClick(item),
|
|
4645
4923
|
children: [
|
|
4646
|
-
item.isActive && !isSidebarCollapsed && /* @__PURE__ */
|
|
4924
|
+
item.isActive && !isSidebarCollapsed && /* @__PURE__ */ jsx27(
|
|
4647
4925
|
"div",
|
|
4648
4926
|
{
|
|
4649
4927
|
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
4650
4928
|
style: { backgroundColor: theme.sidebar?.active?.iconColor || "#10b981", boxShadow: `0 0 10px ${theme.sidebar?.active?.iconColor || "#10b981"}` }
|
|
4651
4929
|
}
|
|
4652
4930
|
),
|
|
4653
|
-
/* @__PURE__ */
|
|
4654
|
-
item.icon && /* @__PURE__ */
|
|
4931
|
+
/* @__PURE__ */ jsxs19("div", { className: `flex items-center ${!isSidebarCollapsed ? "gap-3.5" : "justify-center"} relative z-10 w-full`, children: [
|
|
4932
|
+
item.icon && /* @__PURE__ */ jsx27(
|
|
4655
4933
|
"div",
|
|
4656
4934
|
{
|
|
4657
4935
|
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
@@ -4664,7 +4942,7 @@ function ITSidebar({
|
|
|
4664
4942
|
children: item.icon
|
|
4665
4943
|
}
|
|
4666
4944
|
),
|
|
4667
|
-
!isSidebarCollapsed && /* @__PURE__ */
|
|
4945
|
+
!isSidebarCollapsed && /* @__PURE__ */ jsx27(
|
|
4668
4946
|
"span",
|
|
4669
4947
|
{
|
|
4670
4948
|
className: `transition-all duration-300 truncate tracking-wide`,
|
|
@@ -4677,15 +4955,15 @@ function ITSidebar({
|
|
|
4677
4955
|
}
|
|
4678
4956
|
)
|
|
4679
4957
|
] }),
|
|
4680
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
4958
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx27(
|
|
4681
4959
|
"div",
|
|
4682
4960
|
{
|
|
4683
4961
|
className: `flex-shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "rotate-180" : ""}`,
|
|
4684
4962
|
style: { color: item.isActive ? theme.sidebar?.active?.color || "#0f172a" : theme.sidebar?.icon?.color || "#64748b", opacity: 0.7 },
|
|
4685
|
-
children: /* @__PURE__ */
|
|
4963
|
+
children: /* @__PURE__ */ jsx27(FaChevronDown2, { className: "w-3 h-3" })
|
|
4686
4964
|
}
|
|
4687
4965
|
),
|
|
4688
|
-
item.badge && /* @__PURE__ */
|
|
4966
|
+
item.badge && /* @__PURE__ */ jsx27(
|
|
4689
4967
|
"span",
|
|
4690
4968
|
{
|
|
4691
4969
|
className: `
|
|
@@ -4703,7 +4981,7 @@ function ITSidebar({
|
|
|
4703
4981
|
]
|
|
4704
4982
|
}
|
|
4705
4983
|
),
|
|
4706
|
-
isSidebarCollapsed && /* @__PURE__ */
|
|
4984
|
+
isSidebarCollapsed && /* @__PURE__ */ jsxs19(
|
|
4707
4985
|
"div",
|
|
4708
4986
|
{
|
|
4709
4987
|
className: "absolute left-full top-0 ml-4 rounded-2xl opacity-0 invisible group-hover/navitem:opacity-100 group-hover/navitem:visible transition-all duration-300 pointer-events-none z-50 min-w-[220px] overflow-hidden -translate-x-2 group-hover/navitem:translate-x-0 shadow-[0_10px_40px_-10px_rgba(0,0,0,0.15)]",
|
|
@@ -4714,61 +4992,73 @@ function ITSidebar({
|
|
|
4714
4992
|
backdropFilter: "blur(16px)"
|
|
4715
4993
|
},
|
|
4716
4994
|
children: [
|
|
4717
|
-
/* @__PURE__ */
|
|
4718
|
-
item.icon && /* @__PURE__ */
|
|
4719
|
-
/* @__PURE__ */
|
|
4995
|
+
/* @__PURE__ */ jsxs19("div", { className: "px-5 py-4 flex items-center gap-3 font-semibold border-b", style: { borderColor: theme.sidebar?.borderColor || "#e2e8f0", color: theme.sidebar?.active?.color || "#0f172a" }, children: [
|
|
4996
|
+
item.icon && /* @__PURE__ */ jsx27("span", { style: { color: theme.sidebar?.active?.iconColor || "#10b981" }, className: "text-xl drop-shadow-sm", children: item.icon }),
|
|
4997
|
+
/* @__PURE__ */ jsx27("span", { className: "tracking-wide text-[15px]", children: item.label })
|
|
4720
4998
|
] }),
|
|
4721
|
-
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */
|
|
4999
|
+
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "py-2", children: item.subitems.map((subitem) => /* @__PURE__ */ jsxs19(
|
|
4722
5000
|
"div",
|
|
4723
5001
|
{
|
|
4724
5002
|
className: `px-5 py-2.5 text-sm flex items-center gap-3 transition-colors`,
|
|
4725
5003
|
children: [
|
|
4726
|
-
/* @__PURE__ */
|
|
4727
|
-
/* @__PURE__ */
|
|
5004
|
+
/* @__PURE__ */ jsx27("span", { className: `w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`, style: { backgroundColor: subitem.isActive ? theme.sidebar?.active?.iconColor || "#10b981" : theme.sidebar?.icon?.color || "#94a3b8" } }),
|
|
5005
|
+
/* @__PURE__ */ jsx27("span", { style: { color: subitem.isActive ? theme.sidebar?.active?.color || "#0f172a" : theme.sidebar?.label?.color || "#475569", fontWeight: subitem.isActive ? 600 : 500 }, children: subitem.label })
|
|
4728
5006
|
]
|
|
4729
5007
|
},
|
|
4730
5008
|
subitem.id
|
|
4731
|
-
)) }) : /* @__PURE__ */
|
|
5009
|
+
)) }) : /* @__PURE__ */ jsx27("div", { className: "px-5 py-3 text-sm text-zinc-500 italic", children: "No hay submen\xFA" })
|
|
4732
5010
|
]
|
|
4733
5011
|
}
|
|
4734
5012
|
),
|
|
4735
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
"
|
|
4739
|
-
{
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
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
|
|
4759
5050
|
}
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
] }, subitem.id)) }) })
|
|
5051
|
+
)
|
|
5052
|
+
] }, subitem.id))
|
|
5053
|
+
}
|
|
5054
|
+
) })
|
|
4765
5055
|
] }, item.id)) }) })
|
|
4766
5056
|
}
|
|
4767
5057
|
);
|
|
4768
5058
|
}
|
|
4769
5059
|
|
|
4770
5060
|
// src/components/layout/layout.tsx
|
|
4771
|
-
import { jsx as
|
|
5061
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4772
5062
|
function ITLayout({
|
|
4773
5063
|
topBar,
|
|
4774
5064
|
sidebar,
|
|
@@ -4776,10 +5066,10 @@ function ITLayout({
|
|
|
4776
5066
|
className = "",
|
|
4777
5067
|
contentClassName = ""
|
|
4778
5068
|
}) {
|
|
4779
|
-
const [desktopCollapsed, setDesktopCollapsed] =
|
|
4780
|
-
const [mobileSidebarOpen, setMobileSidebarOpen] =
|
|
4781
|
-
return /* @__PURE__ */
|
|
4782
|
-
/* @__PURE__ */
|
|
5069
|
+
const [desktopCollapsed, setDesktopCollapsed] = useState22(true);
|
|
5070
|
+
const [mobileSidebarOpen, setMobileSidebarOpen] = useState22(false);
|
|
5071
|
+
return /* @__PURE__ */ jsxs20("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
5072
|
+
/* @__PURE__ */ jsx28(
|
|
4783
5073
|
ITTopBar,
|
|
4784
5074
|
{
|
|
4785
5075
|
...topBar,
|
|
@@ -4787,10 +5077,10 @@ function ITLayout({
|
|
|
4787
5077
|
onToggleMobileMenu: () => setMobileSidebarOpen((v) => !v)
|
|
4788
5078
|
}
|
|
4789
5079
|
),
|
|
4790
|
-
/* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
/* @__PURE__ */
|
|
5080
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-1 overflow-hidden relative", style: { backgroundColor: theme.layout?.backgroundColor || "#f8fafc" }, children: [
|
|
5081
|
+
/* @__PURE__ */ jsxs20("div", { className: "hidden lg:block relative z-40 h-full", children: [
|
|
5082
|
+
/* @__PURE__ */ jsx28("div", { className: "w-[88px] h-full flex-shrink-0" }),
|
|
5083
|
+
/* @__PURE__ */ jsx28("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx28(
|
|
4794
5084
|
ITSidebar,
|
|
4795
5085
|
{
|
|
4796
5086
|
...sidebar,
|
|
@@ -4801,31 +5091,33 @@ function ITLayout({
|
|
|
4801
5091
|
}
|
|
4802
5092
|
) })
|
|
4803
5093
|
] }),
|
|
4804
|
-
mobileSidebarOpen && /* @__PURE__ */
|
|
5094
|
+
mobileSidebarOpen && /* @__PURE__ */ jsx28(
|
|
4805
5095
|
"div",
|
|
4806
5096
|
{
|
|
4807
5097
|
className: "lg:hidden fixed inset-0 z-50 transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
4808
5098
|
onClick: () => setMobileSidebarOpen(false),
|
|
4809
|
-
children: /* @__PURE__ */
|
|
5099
|
+
children: /* @__PURE__ */ jsx28(
|
|
4810
5100
|
"div",
|
|
4811
5101
|
{
|
|
4812
|
-
className: "h-full w-
|
|
5102
|
+
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
4813
5103
|
onClick: (e) => e.stopPropagation(),
|
|
4814
|
-
children: /* @__PURE__ */
|
|
5104
|
+
children: /* @__PURE__ */ jsx28(
|
|
4815
5105
|
ITSidebar,
|
|
4816
5106
|
{
|
|
4817
5107
|
...sidebar,
|
|
4818
5108
|
isCollapsed: false,
|
|
4819
5109
|
visibleOnMobile: true,
|
|
4820
|
-
className: "h-full shadow-2xl",
|
|
4821
|
-
onToggleCollapse: () => setMobileSidebarOpen(false)
|
|
5110
|
+
className: "h-full shadow-2xl relative z-[60]",
|
|
5111
|
+
onToggleCollapse: () => setMobileSidebarOpen(false),
|
|
5112
|
+
onItemClick: () => setMobileSidebarOpen(false),
|
|
5113
|
+
onSubItemClick: () => setMobileSidebarOpen(false)
|
|
4822
5114
|
}
|
|
4823
5115
|
)
|
|
4824
5116
|
}
|
|
4825
5117
|
)
|
|
4826
5118
|
}
|
|
4827
5119
|
),
|
|
4828
|
-
/* @__PURE__ */
|
|
5120
|
+
/* @__PURE__ */ jsx28("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx28(
|
|
4829
5121
|
"div",
|
|
4830
5122
|
{
|
|
4831
5123
|
className: `mx-auto w-full h-full ${contentClassName}`,
|
|
@@ -4846,7 +5138,7 @@ var sizeClasses = {
|
|
|
4846
5138
|
};
|
|
4847
5139
|
|
|
4848
5140
|
// src/components/loader/loader.tsx
|
|
4849
|
-
import { jsx as
|
|
5141
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4850
5142
|
function ITLoader({
|
|
4851
5143
|
size = "md",
|
|
4852
5144
|
variant = "spinner",
|
|
@@ -4861,22 +5153,22 @@ function ITLoader({
|
|
|
4861
5153
|
const bgStyle = isCssValue ? { backgroundColor: resolvedColor } : {};
|
|
4862
5154
|
const colorClass = !isCssValue ? color : "";
|
|
4863
5155
|
if (variant === "spinner") {
|
|
4864
|
-
return /* @__PURE__ */
|
|
5156
|
+
return /* @__PURE__ */ jsx29(
|
|
4865
5157
|
"div",
|
|
4866
5158
|
{
|
|
4867
5159
|
className: `inline-block ${sizeClasses[size]} animate-spin rounded-full border-2 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${colorClass} ${className}`,
|
|
4868
5160
|
role: "status",
|
|
4869
5161
|
style,
|
|
4870
|
-
children: /* @__PURE__ */
|
|
5162
|
+
children: /* @__PURE__ */ jsx29("span", { className: "!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]", children: "Loading..." })
|
|
4871
5163
|
}
|
|
4872
5164
|
);
|
|
4873
5165
|
}
|
|
4874
5166
|
if (variant === "dots") {
|
|
4875
|
-
return /* @__PURE__ */
|
|
5167
|
+
return /* @__PURE__ */ jsx29(
|
|
4876
5168
|
"div",
|
|
4877
5169
|
{
|
|
4878
5170
|
className: `flex items-center justify-center space-x-2 ${className}`,
|
|
4879
|
-
children: [...Array(3)].map((_, i) => /* @__PURE__ */
|
|
5171
|
+
children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsx29(
|
|
4880
5172
|
"div",
|
|
4881
5173
|
{
|
|
4882
5174
|
className: `${sizeClasses[size.replace(/l|g/, "")]} animate-bounce rounded-full ${colorClass}`,
|
|
@@ -4891,11 +5183,11 @@ function ITLoader({
|
|
|
4891
5183
|
);
|
|
4892
5184
|
}
|
|
4893
5185
|
if (variant === "bar") {
|
|
4894
|
-
return /* @__PURE__ */
|
|
5186
|
+
return /* @__PURE__ */ jsx29(
|
|
4895
5187
|
"div",
|
|
4896
5188
|
{
|
|
4897
5189
|
className: `w-full ${size === "sm" ? "h-1" : size === "md" ? "h-1.5" : size === "lg" ? "h-2" : "h-2.5"} bg-gray-200 rounded-full overflow-hidden ${className}`,
|
|
4898
|
-
children: /* @__PURE__ */
|
|
5190
|
+
children: /* @__PURE__ */ jsx29(
|
|
4899
5191
|
"div",
|
|
4900
5192
|
{
|
|
4901
5193
|
className: `h-full animate-progress ${colorClass}`,
|
|
@@ -4911,7 +5203,7 @@ function ITLoader({
|
|
|
4911
5203
|
);
|
|
4912
5204
|
}
|
|
4913
5205
|
if (variant === "pulse") {
|
|
4914
|
-
return /* @__PURE__ */
|
|
5206
|
+
return /* @__PURE__ */ jsx29(
|
|
4915
5207
|
"div",
|
|
4916
5208
|
{
|
|
4917
5209
|
className: `rounded-full ${sizeClasses[size]} animate-pulse ${colorClass} ${className}`,
|
|
@@ -4923,10 +5215,10 @@ function ITLoader({
|
|
|
4923
5215
|
}
|
|
4924
5216
|
|
|
4925
5217
|
// src/components/stepper/stepper.tsx
|
|
4926
|
-
import
|
|
4927
|
-
import { useEffect as useEffect17, useRef as useRef11, useState as
|
|
5218
|
+
import clsx19 from "clsx";
|
|
5219
|
+
import { useEffect as useEffect17, useRef as useRef11, useState as useState23 } from "react";
|
|
4928
5220
|
import { FaChevronLeft as FaChevronLeft4, FaChevronRight as FaChevronRight5, FaCheck as FaCheck3 } from "react-icons/fa";
|
|
4929
|
-
import { jsx as
|
|
5221
|
+
import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4930
5222
|
function ITStepper({
|
|
4931
5223
|
steps,
|
|
4932
5224
|
currentStep,
|
|
@@ -4941,7 +5233,7 @@ function ITStepper({
|
|
|
4941
5233
|
maxContentHeight = "400px",
|
|
4942
5234
|
color = "primary"
|
|
4943
5235
|
}) {
|
|
4944
|
-
const [direction, setDirection] =
|
|
5236
|
+
const [direction, setDirection] = useState23("next");
|
|
4945
5237
|
const contentRef = useRef11(null);
|
|
4946
5238
|
const progressRef = useRef11(null);
|
|
4947
5239
|
const isThemeColor = color in theme.colors;
|
|
@@ -4993,23 +5285,23 @@ function ITStepper({
|
|
|
4993
5285
|
const renderStepContent = (index, isCompleted, isActive) => {
|
|
4994
5286
|
const step = steps[index];
|
|
4995
5287
|
if (isCompleted) {
|
|
4996
|
-
return /* @__PURE__ */
|
|
5288
|
+
return /* @__PURE__ */ jsx30(FaCheck3, { className: "w-4 h-4" });
|
|
4997
5289
|
}
|
|
4998
5290
|
if (step.icon && useIcons) {
|
|
4999
|
-
return /* @__PURE__ */
|
|
5291
|
+
return /* @__PURE__ */ jsx30("div", { className: "flex items-center justify-center w-5 h-5", children: step.icon });
|
|
5000
5292
|
}
|
|
5001
|
-
return /* @__PURE__ */
|
|
5293
|
+
return /* @__PURE__ */ jsx30("span", { className: "text-sm font-semibold", children: index + 1 });
|
|
5002
5294
|
};
|
|
5003
|
-
return /* @__PURE__ */
|
|
5004
|
-
/* @__PURE__ */
|
|
5005
|
-
/* @__PURE__ */
|
|
5295
|
+
return /* @__PURE__ */ jsxs21("div", { className: clsx19("w-full max-w-5xl mx-auto px-4", containerClassName), children: [
|
|
5296
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative mb-8", children: [
|
|
5297
|
+
/* @__PURE__ */ jsx30(
|
|
5006
5298
|
"div",
|
|
5007
5299
|
{
|
|
5008
5300
|
className: "absolute left-6 right-6 top-5 h-1 bg-gray-200 rounded-full z-0",
|
|
5009
5301
|
"aria-hidden": true
|
|
5010
5302
|
}
|
|
5011
5303
|
),
|
|
5012
|
-
/* @__PURE__ */
|
|
5304
|
+
/* @__PURE__ */ jsx30(
|
|
5013
5305
|
"div",
|
|
5014
5306
|
{
|
|
5015
5307
|
ref: progressRef,
|
|
@@ -5017,11 +5309,11 @@ function ITStepper({
|
|
|
5017
5309
|
"aria-hidden": true
|
|
5018
5310
|
}
|
|
5019
5311
|
),
|
|
5020
|
-
/* @__PURE__ */
|
|
5312
|
+
/* @__PURE__ */ jsx30("div", { className: "flex items-start justify-between space-x-2 relative z-20", children: steps.map((step, idx) => {
|
|
5021
5313
|
const isActive = idx === currentStep;
|
|
5022
5314
|
const isCompleted = idx < currentStep;
|
|
5023
5315
|
const hasIcon = step.icon && useIcons;
|
|
5024
|
-
return /* @__PURE__ */
|
|
5316
|
+
return /* @__PURE__ */ jsx30(
|
|
5025
5317
|
"button",
|
|
5026
5318
|
{
|
|
5027
5319
|
type: "button",
|
|
@@ -5031,11 +5323,11 @@ function ITStepper({
|
|
|
5031
5323
|
"aria-label": `Paso ${idx + 1} ${step.label}`,
|
|
5032
5324
|
className: "flex-1 group",
|
|
5033
5325
|
title: step.label,
|
|
5034
|
-
children: /* @__PURE__ */
|
|
5035
|
-
/* @__PURE__ */
|
|
5326
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center", children: [
|
|
5327
|
+
/* @__PURE__ */ jsx30(
|
|
5036
5328
|
"div",
|
|
5037
5329
|
{
|
|
5038
|
-
className:
|
|
5330
|
+
className: clsx19(
|
|
5039
5331
|
"flex items-center justify-center w-11 h-11 rounded-full border-2 transition-all duration-300 transform",
|
|
5040
5332
|
hasIcon && "p-2",
|
|
5041
5333
|
isCompleted && "bg-slate-400 border-slate-400 text-white scale-100 shadow",
|
|
@@ -5046,10 +5338,10 @@ function ITStepper({
|
|
|
5046
5338
|
children: renderStepContent(idx, isCompleted, isActive)
|
|
5047
5339
|
}
|
|
5048
5340
|
),
|
|
5049
|
-
/* @__PURE__ */
|
|
5341
|
+
/* @__PURE__ */ jsx30(
|
|
5050
5342
|
"span",
|
|
5051
5343
|
{
|
|
5052
|
-
className:
|
|
5344
|
+
className: clsx19(
|
|
5053
5345
|
"mt-2 text-xs sm:text-sm font-medium transition-colors text-center",
|
|
5054
5346
|
isCompleted ? "text-slate-400" : !isActive && "text-gray-400"
|
|
5055
5347
|
),
|
|
@@ -5063,14 +5355,14 @@ function ITStepper({
|
|
|
5063
5355
|
);
|
|
5064
5356
|
}) })
|
|
5065
5357
|
] }),
|
|
5066
|
-
/* @__PURE__ */
|
|
5358
|
+
/* @__PURE__ */ jsx30(
|
|
5067
5359
|
"div",
|
|
5068
5360
|
{
|
|
5069
5361
|
ref: contentRef,
|
|
5070
5362
|
tabIndex: -1,
|
|
5071
5363
|
role: "region",
|
|
5072
5364
|
"aria-labelledby": `step-${currentStep}`,
|
|
5073
|
-
className:
|
|
5365
|
+
className: clsx19(
|
|
5074
5366
|
stepClassName,
|
|
5075
5367
|
"bg-white border border-gray-100 rounded-2xl shadow-lg min-h-[280px] transition-transform duration-400 no-scrollbar p-6",
|
|
5076
5368
|
scrollableContent && "overflow-y-auto hide-scrollbar"
|
|
@@ -5079,37 +5371,37 @@ function ITStepper({
|
|
|
5079
5371
|
children: steps[currentStep].content
|
|
5080
5372
|
}
|
|
5081
5373
|
),
|
|
5082
|
-
/* @__PURE__ */
|
|
5083
|
-
/* @__PURE__ */
|
|
5374
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-center mt-6", children: [
|
|
5375
|
+
/* @__PURE__ */ jsx30(
|
|
5084
5376
|
ITButton,
|
|
5085
5377
|
{
|
|
5086
5378
|
variant: "outlined",
|
|
5087
5379
|
color: "secondary",
|
|
5088
5380
|
disabled: currentStep === 0,
|
|
5089
5381
|
onClick: prevStep,
|
|
5090
|
-
children: /* @__PURE__ */
|
|
5091
|
-
/* @__PURE__ */
|
|
5382
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
5383
|
+
/* @__PURE__ */ jsx30(FaChevronLeft4, {}),
|
|
5092
5384
|
"Atr\xE1s"
|
|
5093
5385
|
] })
|
|
5094
5386
|
}
|
|
5095
5387
|
),
|
|
5096
|
-
/* @__PURE__ */
|
|
5097
|
-
/* @__PURE__ */
|
|
5388
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-3", children: [
|
|
5389
|
+
/* @__PURE__ */ jsxs21("div", { className: "text-sm text-gray-500 mr-2 hidden sm:block", children: [
|
|
5098
5390
|
"Paso ",
|
|
5099
5391
|
currentStep + 1,
|
|
5100
5392
|
" de ",
|
|
5101
5393
|
steps.length
|
|
5102
5394
|
] }),
|
|
5103
|
-
/* @__PURE__ */
|
|
5395
|
+
/* @__PURE__ */ jsx30(
|
|
5104
5396
|
ITButton,
|
|
5105
5397
|
{
|
|
5106
5398
|
variant: "solid",
|
|
5107
5399
|
color,
|
|
5108
5400
|
disabled: disableNext,
|
|
5109
5401
|
onClick: nextStep,
|
|
5110
|
-
children: /* @__PURE__ */
|
|
5402
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
5111
5403
|
currentStep === steps.length - 1 ? "Finalizar" : "Siguiente",
|
|
5112
|
-
currentStep === steps.length - 1 ? /* @__PURE__ */
|
|
5404
|
+
currentStep === steps.length - 1 ? /* @__PURE__ */ jsx30(FaCheck3, {}) : /* @__PURE__ */ jsx30(FaChevronRight5, {})
|
|
5113
5405
|
] })
|
|
5114
5406
|
}
|
|
5115
5407
|
)
|
|
@@ -5119,153 +5411,1756 @@ function ITStepper({
|
|
|
5119
5411
|
}
|
|
5120
5412
|
|
|
5121
5413
|
// src/components/theme-provider/themeProvider.tsx
|
|
5122
|
-
import {
|
|
5123
|
-
import {
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
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";
|
|
5416
|
+
import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
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"
|
|
5139
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",
|
|
5140
5583
|
layout: {
|
|
5141
|
-
|
|
5142
|
-
|
|
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"
|
|
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 }
|
|
5635
|
+
};
|
|
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");
|
|
5143
5673
|
}
|
|
5144
5674
|
};
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
}
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
if (theme2.topbar.iconHoverColor) variablesString += `--topbar-icon-hover: ${theme2.topbar.iconHoverColor};
|
|
5168
|
-
`;
|
|
5169
|
-
if (theme2.topbar.shadow) variablesString += `--topbar-shadow: ${theme2.topbar.shadow};
|
|
5170
|
-
`;
|
|
5171
|
-
if (theme2.topbar.textColor) variablesString += `--topbar-text: ${theme2.topbar.textColor};
|
|
5172
|
-
`;
|
|
5173
|
-
if (theme2.topbar.textHoverColor) variablesString += `--topbar-text-hover: ${theme2.topbar.textHoverColor};
|
|
5174
|
-
`;
|
|
5175
|
-
if (theme2.topbar.userMenu) {
|
|
5176
|
-
if (theme2.topbar.userMenu.backgroundColor) variablesString += `--topbar-user-bg: ${theme2.topbar.userMenu.backgroundColor};
|
|
5177
|
-
`;
|
|
5178
|
-
if (theme2.topbar.userMenu.hoverBackground) variablesString += `--topbar-user-hover: ${theme2.topbar.userMenu.hoverBackground};
|
|
5179
|
-
`;
|
|
5180
|
-
if (theme2.topbar.userMenu.textColor) variablesString += `--topbar-user-text: ${theme2.topbar.userMenu.textColor};
|
|
5181
|
-
`;
|
|
5182
|
-
if (theme2.topbar.userMenu.subtitleColor) variablesString += `--topbar-user-subtitle: ${theme2.topbar.userMenu.subtitleColor};
|
|
5183
|
-
`;
|
|
5184
|
-
if (theme2.topbar.userMenu.dropdown) {
|
|
5185
|
-
if (theme2.topbar.userMenu.dropdown.backgroundColor) variablesString += `--topbar-user-dropdown-bg: ${theme2.topbar.userMenu.dropdown.backgroundColor};
|
|
5186
|
-
`;
|
|
5187
|
-
if (theme2.topbar.userMenu.dropdown.borderColor) variablesString += `--topbar-user-dropdown-border: ${theme2.topbar.userMenu.dropdown.borderColor};
|
|
5188
|
-
`;
|
|
5189
|
-
if (theme2.topbar.userMenu.dropdown.itemHoverBackground) variablesString += `--topbar-user-item-hover: ${theme2.topbar.userMenu.dropdown.itemHoverBackground};
|
|
5190
|
-
`;
|
|
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
|
+
}
|
|
5191
5697
|
}
|
|
5192
|
-
}
|
|
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);
|
|
5193
5707
|
}
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
`;
|
|
5206
|
-
}
|
|
5207
|
-
if (
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
`;
|
|
5212
|
-
}
|
|
5213
|
-
if (
|
|
5214
|
-
`;
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
`;
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
if (
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
`;
|
|
5240
|
-
}
|
|
5241
|
-
if (
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
`;
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
`;
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
${
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
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)`;
|
|
5766
|
+
}
|
|
5767
|
+
}
|
|
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
|
+
);
|
|
5269
7164
|
}
|
|
5270
7165
|
|
|
5271
7166
|
// src/types/yup.types.ts
|
|
@@ -5279,6 +7174,7 @@ var createValidationSchema = (fields) => Yup.object().shape(
|
|
|
5279
7174
|
}, {})
|
|
5280
7175
|
);
|
|
5281
7176
|
export {
|
|
7177
|
+
FileTypeEnum,
|
|
5282
7178
|
ITBadget,
|
|
5283
7179
|
ITButton,
|
|
5284
7180
|
calendar_default as ITCalendar,
|
|
@@ -5299,10 +7195,14 @@ export {
|
|
|
5299
7195
|
ITSlideToggle,
|
|
5300
7196
|
ITStepper,
|
|
5301
7197
|
ITTable,
|
|
7198
|
+
tabs_default as ITTabs,
|
|
5302
7199
|
ITText,
|
|
5303
7200
|
ITThemeProvider,
|
|
5304
7201
|
ITTimePicker,
|
|
5305
7202
|
ITToast,
|
|
5306
|
-
|
|
7203
|
+
tripleFilter_default as ITTripleFilter,
|
|
7204
|
+
UploadStatus,
|
|
7205
|
+
createValidationSchema,
|
|
7206
|
+
useITTheme
|
|
5307
7207
|
};
|
|
5308
7208
|
//# sourceMappingURL=index.js.map
|