@axzydev/axzy_ui_system 1.2.11 → 1.2.13
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/README.md +21 -9
- package/dist/index.cjs +294 -257
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +300 -263
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/avatar/avatar.tsx +1 -1
- package/src/components/calendar/calendar.tsx +1 -1
- package/src/components/card/card.tsx +11 -8
- package/src/components/data-table/dataTable.tsx +3 -3
- package/src/components/dialog/dialog.tsx +2 -2
- package/src/components/divider/divider.tsx +1 -1
- package/src/components/dropfile/dropfile.doc.mdx +15 -0
- package/src/components/dropfile/dropfile.props.ts +13 -0
- package/src/components/dropfile/dropfile.stories.tsx +21 -0
- package/src/components/dropfile/dropfile.tsx +90 -27
- package/src/components/form-builder/fieldRenderer.tsx +3 -3
- package/src/components/input/input.tsx +7 -7
- package/src/components/loader/loader.tsx +1 -1
- package/src/components/navbar/navbar.tsx +10 -10
- package/src/components/pagination/pagination.tsx +11 -11
- package/src/components/search-select/search-select.tsx +8 -8
- package/src/components/searchTable/components/EditableCell.tsx +1 -1
- package/src/components/searchTable/components/PaginationControls.tsx +2 -2
- package/src/components/searchTable/components/PaginationInfo.tsx +1 -1
- package/src/components/searchTable/components/SearchAndSortBar.tsx +1 -1
- package/src/components/searchTable/components/SearchInput.tsx +1 -1
- package/src/components/searchTable/components/SortButton.tsx +3 -3
- package/src/components/searchTable/components/TableHeader.tsx +1 -1
- package/src/components/searchTable/components/TableRow.tsx +4 -4
- package/src/components/searchTable/searchTable.tsx +2 -2
- package/src/components/select/select.tsx +2 -2
- package/src/components/sidebar/sidebar.tsx +15 -15
- package/src/components/slider/slider.tsx +3 -3
- package/src/components/stepper/stepper.tsx +5 -5
- package/src/components/table/table.tsx +3 -3
- package/src/components/tabs/tabs.tsx +4 -4
- package/src/components/textarea/textarea.tsx +3 -3
- package/src/components/theme-provider/themeProvider.tsx +32 -32
- package/src/components/time-picker/timePicker.tsx +5 -5
- package/src/components/topbar/topbar.tsx +6 -6
- package/src/index.css +23 -0
- package/src/theme/theme.ts +17 -17
- package/src/utils/styles.ts +5 -5
package/dist/index.js
CHANGED
|
@@ -350,7 +350,7 @@ var sizeMap = {
|
|
|
350
350
|
};
|
|
351
351
|
var DEFAULT_COLOR = "bg-primary-600";
|
|
352
352
|
var DEFAULT_BG = "var(--color-primary-600)";
|
|
353
|
-
var DEFAULT_SHADOW = "0
|
|
353
|
+
var DEFAULT_SHADOW = "0 6px 16px -2px rgba(37, 99, 235, 0.25)";
|
|
354
354
|
var isRawColorValue = (value) => /^#|^rgb|^hsl|^var\(/i.test(value.trim());
|
|
355
355
|
function ITAvatar({
|
|
356
356
|
src,
|
|
@@ -596,7 +596,7 @@ var components = {
|
|
|
596
596
|
hover: semanticColors.primary[600],
|
|
597
597
|
active: semanticColors.primary[700],
|
|
598
598
|
focus: `0 0 0 2px ${semanticColors.primary[200]}`,
|
|
599
|
-
borderRadius: "
|
|
599
|
+
borderRadius: "var(--radius-md)",
|
|
600
600
|
padding: "0.5rem 1rem",
|
|
601
601
|
fontSize: "0.875rem",
|
|
602
602
|
fontWeight: "600",
|
|
@@ -607,7 +607,7 @@ var components = {
|
|
|
607
607
|
color: "#ffffff",
|
|
608
608
|
hover: semanticColors.secondary[600],
|
|
609
609
|
focus: `0 0 0 2px ${semanticColors.secondary[200]}`,
|
|
610
|
-
borderRadius: "
|
|
610
|
+
borderRadius: "var(--radius-md)",
|
|
611
611
|
padding: "0.5rem 1rem",
|
|
612
612
|
fontSize: "0.875rem",
|
|
613
613
|
fontWeight: "600"
|
|
@@ -617,41 +617,41 @@ var components = {
|
|
|
617
617
|
color: "#ffffff",
|
|
618
618
|
hover: semanticColors.success[600],
|
|
619
619
|
focus: `0 0 0 2px ${semanticColors.success[200]}`,
|
|
620
|
-
borderRadius: "
|
|
620
|
+
borderRadius: "var(--radius-md)"
|
|
621
621
|
},
|
|
622
622
|
danger: {
|
|
623
623
|
backgroundColor: semanticColors.danger[500],
|
|
624
624
|
color: "#ffffff",
|
|
625
625
|
hover: semanticColors.danger[600],
|
|
626
626
|
focus: `0 0 0 2px ${semanticColors.danger[200]}`,
|
|
627
|
-
borderRadius: "
|
|
627
|
+
borderRadius: "var(--radius-md)"
|
|
628
628
|
},
|
|
629
629
|
error: {
|
|
630
630
|
backgroundColor: semanticColors.danger[500],
|
|
631
631
|
color: "#ffffff",
|
|
632
632
|
hover: semanticColors.danger[600],
|
|
633
|
-
borderRadius: "
|
|
633
|
+
borderRadius: "var(--radius-md)"
|
|
634
634
|
},
|
|
635
635
|
warning: {
|
|
636
636
|
backgroundColor: semanticColors.warning[500],
|
|
637
637
|
color: "#ffffff",
|
|
638
638
|
hover: semanticColors.warning[600],
|
|
639
639
|
focus: `0 0 0 2px ${semanticColors.warning[200]}`,
|
|
640
|
-
borderRadius: "
|
|
640
|
+
borderRadius: "var(--radius-md)"
|
|
641
641
|
},
|
|
642
642
|
info: {
|
|
643
643
|
backgroundColor: semanticColors.info[500],
|
|
644
644
|
color: "#ffffff",
|
|
645
645
|
hover: semanticColors.info[600],
|
|
646
646
|
focus: `0 0 0 2px ${semanticColors.info[200]}`,
|
|
647
|
-
borderRadius: "
|
|
647
|
+
borderRadius: "var(--radius-md)"
|
|
648
648
|
},
|
|
649
649
|
purple: {
|
|
650
650
|
backgroundColor: semanticColors.purple[500],
|
|
651
651
|
color: "#ffffff",
|
|
652
652
|
hover: semanticColors.purple[600],
|
|
653
653
|
focus: `0 0 0 2px ${semanticColors.purple[200]}`,
|
|
654
|
-
borderRadius: "
|
|
654
|
+
borderRadius: "var(--radius-md)"
|
|
655
655
|
},
|
|
656
656
|
outline: {
|
|
657
657
|
backgroundColor: "transparent",
|
|
@@ -659,7 +659,7 @@ var components = {
|
|
|
659
659
|
borderColor: semanticColors.primary[600],
|
|
660
660
|
borderWidth: "2px",
|
|
661
661
|
hover: semanticColors.primary[50],
|
|
662
|
-
borderRadius: "
|
|
662
|
+
borderRadius: "var(--radius-md)"
|
|
663
663
|
}
|
|
664
664
|
},
|
|
665
665
|
badge: {
|
|
@@ -717,19 +717,19 @@ var components = {
|
|
|
717
717
|
},
|
|
718
718
|
card: {
|
|
719
719
|
backgroundColor: "var(--card-bg, #ffffff)",
|
|
720
|
-
borderRadius: "
|
|
720
|
+
borderRadius: "var(--radius-2xl)",
|
|
721
721
|
borderColor: `var(--card-border, ${semanticColors.gray[200]})`,
|
|
722
722
|
borderWidth: "1px",
|
|
723
|
-
shadow: "var(--card-shadow,
|
|
723
|
+
shadow: "var(--card-shadow, var(--shadow-md))",
|
|
724
724
|
hover: {
|
|
725
|
-
shadow: "var(--card-shadow-hover,
|
|
725
|
+
shadow: "var(--card-shadow-hover, var(--shadow-lg))"
|
|
726
726
|
},
|
|
727
727
|
header: {
|
|
728
728
|
backgroundColor: `var(--card-header-bg, ${semanticColors.gray[50]})`,
|
|
729
729
|
borderBottom: `1px solid var(--card-header-border, var(--color-secondary-200))`,
|
|
730
730
|
padding: "1rem 1.5rem",
|
|
731
|
-
borderTopLeftRadius: "
|
|
732
|
-
borderTopRightRadius: "
|
|
731
|
+
borderTopLeftRadius: "var(--radius-2xl)",
|
|
732
|
+
borderTopRightRadius: "var(--radius-2xl)"
|
|
733
733
|
},
|
|
734
734
|
body: {
|
|
735
735
|
padding: "1.5rem"
|
|
@@ -738,7 +738,7 @@ var components = {
|
|
|
738
738
|
input: {
|
|
739
739
|
backgroundColor: "var(--input-bg, #ffffff)",
|
|
740
740
|
borderColor: `var(--input-border, ${semanticColors.gray[300]})`,
|
|
741
|
-
borderRadius: "
|
|
741
|
+
borderRadius: "var(--radius-md)",
|
|
742
742
|
padding: "0.5rem 0.75rem",
|
|
743
743
|
fontSize: "0.875rem",
|
|
744
744
|
focus: {
|
|
@@ -804,8 +804,8 @@ var components = {
|
|
|
804
804
|
},
|
|
805
805
|
content: {
|
|
806
806
|
backgroundColor: "var(--modal-bg, #ffffff)",
|
|
807
|
-
borderRadius: "
|
|
808
|
-
shadow: "var(--modal-shadow,
|
|
807
|
+
borderRadius: "var(--radius-2xl)",
|
|
808
|
+
shadow: "var(--modal-shadow, var(--shadow-xl))"
|
|
809
809
|
},
|
|
810
810
|
header: {
|
|
811
811
|
padding: "1.5rem 1.5rem 0.5rem 1.5rem",
|
|
@@ -1368,7 +1368,7 @@ var ITCalendar = ({
|
|
|
1368
1368
|
},
|
|
1369
1369
|
year
|
|
1370
1370
|
)) }) : mode === "month" ? /* @__PURE__ */ jsxs5("div", { className: "p-4", children: [
|
|
1371
|
-
/* @__PURE__ */ jsx7("div", { className: "grid grid-cols-7 mb-2", children: ["Lun", "Mar", "Mi\xE9", "Jue", "Vie", "S\xE1b", "Dom"].map((day) => /* @__PURE__ */ jsx7(ITText, { as: "div", className: "text-center text-xs font-semibold text-
|
|
1371
|
+
/* @__PURE__ */ jsx7("div", { className: "grid grid-cols-7 mb-2", children: ["Lun", "Mar", "Mi\xE9", "Jue", "Vie", "S\xE1b", "Dom"].map((day) => /* @__PURE__ */ jsx7(ITText, { as: "div", className: "text-center text-xs font-semibold text-secondary-400 uppercase py-1", children: day }, day)) }),
|
|
1372
1372
|
/* @__PURE__ */ jsx7("div", { className: "grid grid-cols-7 gap-1", children: monthDays.map((day) => {
|
|
1373
1373
|
const isDisabled = isDateDisabled(day);
|
|
1374
1374
|
const isCurrentMonth = isSameMonth(day, currentDate);
|
|
@@ -1609,11 +1609,14 @@ function ITCard({
|
|
|
1609
1609
|
const [isHovered, setIsHovered] = useState6(false);
|
|
1610
1610
|
const containerStyle = {
|
|
1611
1611
|
backgroundColor: "var(--card-bg, #ffffff)",
|
|
1612
|
-
borderColor: "var(--card-border,
|
|
1612
|
+
borderColor: "var(--card-border, rgba(15, 23, 42, 0.06))",
|
|
1613
1613
|
borderWidth: "1px",
|
|
1614
|
-
borderRadius: "var(--card-radius,
|
|
1615
|
-
|
|
1616
|
-
|
|
1614
|
+
borderRadius: "var(--card-radius, var(--radius-2xl))",
|
|
1615
|
+
// Soft depth: every card floats a little at rest; interactive cards
|
|
1616
|
+
// gain visual weight on hover instead of appearing flat until clicked.
|
|
1617
|
+
boxShadow: onClick ? isHovered ? "var(--shadow-lg)" : "var(--shadow-sm)" : "var(--shadow-sm)",
|
|
1618
|
+
transition: onClick ? "box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out" : "none",
|
|
1619
|
+
transform: onClick && isHovered ? "translateY(-2px)" : "translateY(0)",
|
|
1617
1620
|
cursor: onClick ? "pointer" : "default"
|
|
1618
1621
|
};
|
|
1619
1622
|
const bodyStyle = {
|
|
@@ -1645,13 +1648,13 @@ function ITCard({
|
|
|
1645
1648
|
children: title
|
|
1646
1649
|
}
|
|
1647
1650
|
),
|
|
1648
|
-
/* @__PURE__ */ jsx8(ITText, { as: "div", className: "text-
|
|
1651
|
+
/* @__PURE__ */ jsx8(ITText, { as: "div", className: "text-secondary-600", children })
|
|
1649
1652
|
] }),
|
|
1650
1653
|
actions && /* @__PURE__ */ jsx8(
|
|
1651
1654
|
"div",
|
|
1652
1655
|
{
|
|
1653
1656
|
className: clsx7(
|
|
1654
|
-
"p-4 border-t border-
|
|
1657
|
+
"p-4 border-t border-secondary-100 mt-auto",
|
|
1655
1658
|
actionClassName
|
|
1656
1659
|
),
|
|
1657
1660
|
children: actions
|
|
@@ -1787,10 +1790,10 @@ import clsx10 from "clsx";
|
|
|
1787
1790
|
function inputLabel(error) {
|
|
1788
1791
|
return clsx10(
|
|
1789
1792
|
"text-sm font-medium",
|
|
1790
|
-
error ? "text-
|
|
1793
|
+
error ? "text-danger-500" : "text-secondary-700 dark:text-secondary-300"
|
|
1791
1794
|
);
|
|
1792
1795
|
}
|
|
1793
|
-
var inputError = "text-
|
|
1796
|
+
var inputError = "text-danger-500 text-xs mt-1";
|
|
1794
1797
|
var iconAbsoluteLeft = "absolute inset-y-0 left-0 flex items-center pl-3 z-10";
|
|
1795
1798
|
var iconAbsoluteRight = "absolute inset-y-0 right-0 flex items-center pr-3 z-10";
|
|
1796
1799
|
var tableContainer = "rounded-xl shadow-sm border border-secondary-200 overflow-hidden";
|
|
@@ -2194,14 +2197,14 @@ function ITInput({
|
|
|
2194
2197
|
type === "checkbox" && "form-checkbox rounded",
|
|
2195
2198
|
className,
|
|
2196
2199
|
{ [disabledOverlay]: disabled },
|
|
2197
|
-
{ "border-
|
|
2200
|
+
{ "border-danger-500": hasError }
|
|
2198
2201
|
)
|
|
2199
2202
|
}
|
|
2200
2203
|
),
|
|
2201
|
-
label && /* @__PURE__ */ jsxs9("label", { htmlFor: name, className: "text-sm text-
|
|
2204
|
+
label && /* @__PURE__ */ jsxs9("label", { htmlFor: name, className: "text-sm text-secondary-700 dark:text-slate-300 select-none", children: [
|
|
2202
2205
|
label,
|
|
2203
2206
|
" ",
|
|
2204
|
-
required && /* @__PURE__ */ jsx11(ITText, { as: "span", className: "text-
|
|
2207
|
+
required && /* @__PURE__ */ jsx11(ITText, { as: "span", className: "text-danger-500", children: "*" })
|
|
2205
2208
|
] })
|
|
2206
2209
|
] })
|
|
2207
2210
|
) : (
|
|
@@ -2217,7 +2220,7 @@ function ITInput({
|
|
|
2217
2220
|
),
|
|
2218
2221
|
children: [
|
|
2219
2222
|
label,
|
|
2220
|
-
required && /* @__PURE__ */ jsx11(ITText, { as: "span", className: "text-
|
|
2223
|
+
required && /* @__PURE__ */ jsx11(ITText, { as: "span", className: "text-danger-500 ml-1", children: "*" })
|
|
2221
2224
|
]
|
|
2222
2225
|
}
|
|
2223
2226
|
),
|
|
@@ -2296,7 +2299,7 @@ function ITInput({
|
|
|
2296
2299
|
"button",
|
|
2297
2300
|
{
|
|
2298
2301
|
type: "button",
|
|
2299
|
-
className: "absolute inset-y-0 right-0 flex items-center pr-3 z-10 text-
|
|
2302
|
+
className: "absolute inset-y-0 right-0 flex items-center pr-3 z-10 text-secondary-400 hover:text-secondary-600 focus:outline-none",
|
|
2300
2303
|
onClick: () => setShowPassword(!showPassword),
|
|
2301
2304
|
tabIndex: -1,
|
|
2302
2305
|
children: showPassword ? /* @__PURE__ */ jsxs9("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
@@ -2316,11 +2319,11 @@ function ITInput({
|
|
|
2316
2319
|
] })
|
|
2317
2320
|
),
|
|
2318
2321
|
hasError && !isCheckboxOrRadio && /* @__PURE__ */ jsx11("div", { className: "flex-shrink-0 min-w-[140px] flex items-center pt-3", children: /* @__PURE__ */ jsx11(ITText, { as: "p", className: inputError, children: errorMessage }) }),
|
|
2319
|
-
showHintLength && (minLength || maxLength) && !isCheckboxOrRadio && /* @__PURE__ */ jsx11("div", { className: "mt-1 text-xs", children: /* @__PURE__ */ jsxs9(ITText, { as: "p", className: "text-
|
|
2322
|
+
showHintLength && (minLength || maxLength) && !isCheckboxOrRadio && /* @__PURE__ */ jsx11("div", { className: "mt-1 text-xs", children: /* @__PURE__ */ jsxs9(ITText, { as: "p", className: "text-secondary-500", children: [
|
|
2320
2323
|
currentLength,
|
|
2321
2324
|
maxLength && `/${maxLength}`
|
|
2322
2325
|
] }) }),
|
|
2323
|
-
isCheckboxOrRadio && hasError && /* @__PURE__ */ jsx11("div", { className: "mt-1 text-xs", children: /* @__PURE__ */ jsx11(ITText, { as: "p", className: "text-
|
|
2326
|
+
isCheckboxOrRadio && hasError && /* @__PURE__ */ jsx11("div", { className: "mt-1 text-xs", children: /* @__PURE__ */ jsx11(ITText, { as: "p", className: "text-danger-500", children: errorMessage }) })
|
|
2324
2327
|
] });
|
|
2325
2328
|
}
|
|
2326
2329
|
|
|
@@ -2399,7 +2402,7 @@ function ITSelect({
|
|
|
2399
2402
|
className: inputLabel(hasError),
|
|
2400
2403
|
children: [
|
|
2401
2404
|
/* @__PURE__ */ jsx12(ITText, { as: "span", children: label }),
|
|
2402
|
-
required && /* @__PURE__ */ jsx12(ITText, { as: "span", className: "text-
|
|
2405
|
+
required && /* @__PURE__ */ jsx12(ITText, { as: "span", className: "text-danger-500 ml-1", children: "*" })
|
|
2403
2406
|
]
|
|
2404
2407
|
}
|
|
2405
2408
|
),
|
|
@@ -2440,7 +2443,7 @@ function ITSelect({
|
|
|
2440
2443
|
]
|
|
2441
2444
|
}
|
|
2442
2445
|
),
|
|
2443
|
-
/* @__PURE__ */ jsx12("div", { className: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-
|
|
2446
|
+
/* @__PURE__ */ jsx12("div", { className: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-secondary-500", children: /* @__PURE__ */ jsx12(FaAngleDown, {}) })
|
|
2444
2447
|
] }),
|
|
2445
2448
|
hasError && /* @__PURE__ */ jsx12("div", { className: "flex-shrink-0 min-w-[140px] flex items-center pt-3", children: /* @__PURE__ */ jsx12(ITText, { as: "p", className: inputError, children: errorMessage }) })
|
|
2446
2449
|
] })
|
|
@@ -2528,7 +2531,7 @@ function ITPagination({
|
|
|
2528
2531
|
{
|
|
2529
2532
|
className: clsx13(
|
|
2530
2533
|
baseItemClass,
|
|
2531
|
-
currentPage === 1 ? "text-
|
|
2534
|
+
currentPage === 1 ? "text-secondary-300 cursor-not-allowed" : "text-secondary-500 hover:bg-secondary-100"
|
|
2532
2535
|
),
|
|
2533
2536
|
onClick: handlePrevious,
|
|
2534
2537
|
"aria-disabled": currentPage === 1,
|
|
@@ -2541,7 +2544,7 @@ function ITPagination({
|
|
|
2541
2544
|
ITText,
|
|
2542
2545
|
{
|
|
2543
2546
|
as: "div",
|
|
2544
|
-
className: "flex items-center justify-center w-8 h-8 select-none text-
|
|
2547
|
+
className: "flex items-center justify-center w-8 h-8 select-none text-secondary-400",
|
|
2545
2548
|
children: "\u2026"
|
|
2546
2549
|
},
|
|
2547
2550
|
`dots-${idx}`
|
|
@@ -2554,7 +2557,7 @@ function ITPagination({
|
|
|
2554
2557
|
as: "div",
|
|
2555
2558
|
className: clsx13(
|
|
2556
2559
|
baseItemClass,
|
|
2557
|
-
isActive ? "text-white" : "text-
|
|
2560
|
+
isActive ? "text-white" : "text-secondary-600 hover:bg-secondary-100"
|
|
2558
2561
|
),
|
|
2559
2562
|
style: {
|
|
2560
2563
|
backgroundColor: isActive ? resolvedBgColor : void 0,
|
|
@@ -2572,7 +2575,7 @@ function ITPagination({
|
|
|
2572
2575
|
{
|
|
2573
2576
|
className: clsx13(
|
|
2574
2577
|
baseItemClass,
|
|
2575
|
-
currentPage === totalPages ? "text-
|
|
2578
|
+
currentPage === totalPages ? "text-secondary-300 cursor-not-allowed" : "text-secondary-500 hover:bg-secondary-100"
|
|
2576
2579
|
),
|
|
2577
2580
|
onClick: handleNext,
|
|
2578
2581
|
"aria-disabled": currentPage === totalPages,
|
|
@@ -2584,8 +2587,8 @@ function ITPagination({
|
|
|
2584
2587
|
const startItem = Math.min((currentPage - 1) * itemsPerPage + 1, totalItems || 0);
|
|
2585
2588
|
const endItem = Math.min(currentPage * itemsPerPage, totalItems || 0);
|
|
2586
2589
|
return /* @__PURE__ */ jsxs11("div", { className: clsx13("flex flex-col sm:flex-row justify-between items-center gap-4 w-full", className), children: [
|
|
2587
|
-
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-4 text-sm text-
|
|
2588
|
-
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 bg-
|
|
2590
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-4 text-sm text-secondary-500", children: [
|
|
2591
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2 bg-secondary-50 px-3 py-1 rounded-lg border border-secondary-200", children: [
|
|
2589
2592
|
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "text-xs font-medium", children: "Mostrar" }),
|
|
2590
2593
|
/* @__PURE__ */ jsx13(
|
|
2591
2594
|
ITSelect,
|
|
@@ -2600,19 +2603,19 @@ function ITPagination({
|
|
|
2600
2603
|
onBlur: () => {
|
|
2601
2604
|
},
|
|
2602
2605
|
size: "small",
|
|
2603
|
-
className: "!w-14 !h-6 !text-xs !py-0 !px-1! !border-none !bg-transparent !ring-0 focus:!ring-0 cursor-pointer font-bold text-
|
|
2606
|
+
className: "!w-14 !h-6 !text-xs !py-0 !px-1! !border-none !bg-transparent !ring-0 focus:!ring-0 cursor-pointer font-bold text-secondary-700",
|
|
2604
2607
|
placeholder: ""
|
|
2605
2608
|
}
|
|
2606
2609
|
)
|
|
2607
2610
|
] }),
|
|
2608
2611
|
totalItems !== void 0 && /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
2609
|
-
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "text-
|
|
2612
|
+
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "text-secondary-300", children: "|" }),
|
|
2610
2613
|
/* @__PURE__ */ jsxs11(ITText, { as: "span", className: "text-xs", children: [
|
|
2611
|
-
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "font-semibold text-
|
|
2614
|
+
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "font-semibold text-secondary-700", children: startItem }),
|
|
2612
2615
|
/* @__PURE__ */ jsx13(ITText, { as: "span", children: " - " }),
|
|
2613
|
-
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "font-semibold text-
|
|
2616
|
+
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "font-semibold text-secondary-700", children: endItem }),
|
|
2614
2617
|
/* @__PURE__ */ jsx13(ITText, { as: "span", children: " de " }),
|
|
2615
|
-
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "font-semibold text-
|
|
2618
|
+
/* @__PURE__ */ jsx13(ITText, { as: "span", className: "font-semibold text-secondary-900", children: totalItems })
|
|
2616
2619
|
] })
|
|
2617
2620
|
] })
|
|
2618
2621
|
] }),
|
|
@@ -2755,15 +2758,15 @@ function ITTable({
|
|
|
2755
2758
|
onClick: () => handleFilterChange(col.key, nextValue),
|
|
2756
2759
|
"aria-label": `${getToggleLabel()} para ${col.label}`,
|
|
2757
2760
|
title: `${getToggleLabel()} para ${col.label}`,
|
|
2758
|
-
children: /* @__PURE__ */ jsx14("div", { className: "relative w-10 h-5 bg-
|
|
2761
|
+
children: /* @__PURE__ */ jsx14("div", { className: "relative w-10 h-5 bg-secondary-300 rounded-full", children: /* @__PURE__ */ jsx14(
|
|
2759
2762
|
"div",
|
|
2760
2763
|
{
|
|
2761
2764
|
className: clsx14(
|
|
2762
2765
|
"absolute top-0.5 w-4 h-4 rounded-full transition-all duration-300 shadow-sm",
|
|
2763
2766
|
{
|
|
2764
|
-
"left-0.5 bg-
|
|
2767
|
+
"left-0.5 bg-secondary-400": currentValue === void 0,
|
|
2765
2768
|
"left-5 bg-slate-500": currentValue === true,
|
|
2766
|
-
"left-0.5 bg-
|
|
2769
|
+
"left-0.5 bg-secondary-500": currentValue === false
|
|
2767
2770
|
}
|
|
2768
2771
|
)
|
|
2769
2772
|
}
|
|
@@ -3085,15 +3088,15 @@ function ITDataTable({
|
|
|
3085
3088
|
"aria-label": `${getToggleLabel()} para ${col.label}`,
|
|
3086
3089
|
title: `${getToggleLabel()} para ${col.label}`,
|
|
3087
3090
|
disabled: isLoading,
|
|
3088
|
-
children: /* @__PURE__ */ jsx15("div", { className: "relative w-10 h-5 bg-
|
|
3091
|
+
children: /* @__PURE__ */ jsx15("div", { className: "relative w-10 h-5 bg-secondary-300 rounded-full", children: /* @__PURE__ */ jsx15(
|
|
3089
3092
|
"div",
|
|
3090
3093
|
{
|
|
3091
3094
|
className: clsx15(
|
|
3092
3095
|
"absolute top-0.5 w-4 h-4 rounded-full transition-all duration-300 shadow-sm",
|
|
3093
3096
|
{
|
|
3094
|
-
"left-0.5 bg-
|
|
3097
|
+
"left-0.5 bg-secondary-400": currentValue === void 0,
|
|
3095
3098
|
"left-5 bg-slate-500": currentValue === true,
|
|
3096
|
-
"left-0.5 bg-
|
|
3099
|
+
"left-0.5 bg-secondary-500": currentValue === false
|
|
3097
3100
|
}
|
|
3098
3101
|
)
|
|
3099
3102
|
}
|
|
@@ -3560,8 +3563,8 @@ var ITTabs = ({
|
|
|
3560
3563
|
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
3561
3564
|
return /* @__PURE__ */ jsxs15("div", { className: clsx17("w-full", containerClassName), children: [
|
|
3562
3565
|
/* @__PURE__ */ jsx17("div", { className: clsx17(
|
|
3563
|
-
"flex border-
|
|
3564
|
-
variant === "line" ? "border-b" : "gap-2 p-1 bg-
|
|
3566
|
+
"flex border-secondary-200 mb-4",
|
|
3567
|
+
variant === "line" ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
|
|
3565
3568
|
className
|
|
3566
3569
|
), children: items.map((item) => {
|
|
3567
3570
|
const isActive = item.id === activeId;
|
|
@@ -3575,12 +3578,12 @@ var ITTabs = ({
|
|
|
3575
3578
|
// LINE VARIANT
|
|
3576
3579
|
variant === "line" && [
|
|
3577
3580
|
"border-b-2 -mb-[2px]",
|
|
3578
|
-
isActive ? "border-primary-500 text-primary-600" : "border-transparent text-
|
|
3581
|
+
isActive ? "border-primary-500 text-primary-600" : "border-transparent text-secondary-500 hover:text-secondary-700 hover:border-secondary-300"
|
|
3579
3582
|
],
|
|
3580
3583
|
// PILL VARIANT
|
|
3581
3584
|
variant === "pill" && [
|
|
3582
3585
|
"rounded-md",
|
|
3583
|
-
isActive ? "bg-white text-primary-600 shadow-sm" : "text-
|
|
3586
|
+
isActive ? "bg-white text-primary-600 shadow-sm" : "text-secondary-500 hover:text-secondary-700"
|
|
3584
3587
|
],
|
|
3585
3588
|
item.disabled && "opacity-50 cursor-not-allowed"
|
|
3586
3589
|
),
|
|
@@ -4386,23 +4389,23 @@ function ITThemeProvider({
|
|
|
4386
4389
|
color: #cbd5e1;
|
|
4387
4390
|
}
|
|
4388
4391
|
.dark .text-slate-800, [data-theme="dark"] .text-slate-800,
|
|
4389
|
-
.dark .text-
|
|
4392
|
+
.dark .text-secondary-800, [data-theme="dark"] .text-secondary-800 {
|
|
4390
4393
|
color: #f8fafc !important;
|
|
4391
4394
|
}
|
|
4392
4395
|
.dark .text-slate-700, [data-theme="dark"] .text-slate-700,
|
|
4393
|
-
.dark .text-
|
|
4396
|
+
.dark .text-secondary-700, [data-theme="dark"] .text-secondary-700 {
|
|
4394
4397
|
color: #cbd5e1 !important;
|
|
4395
4398
|
}
|
|
4396
4399
|
.dark .text-slate-600, [data-theme="dark"] .text-slate-600,
|
|
4397
|
-
.dark .text-
|
|
4400
|
+
.dark .text-secondary-600, [data-theme="dark"] .text-secondary-600 {
|
|
4398
4401
|
color: #cbd5e1 !important;
|
|
4399
4402
|
}
|
|
4400
4403
|
.dark .text-slate-500, [data-theme="dark"] .text-slate-500,
|
|
4401
|
-
.dark .text-
|
|
4404
|
+
.dark .text-secondary-500, [data-theme="dark"] .text-secondary-500 {
|
|
4402
4405
|
color: #94a3b8 !important;
|
|
4403
4406
|
}
|
|
4404
4407
|
.dark .text-slate-400, [data-theme="dark"] .text-slate-400,
|
|
4405
|
-
.dark .text-
|
|
4408
|
+
.dark .text-secondary-400, [data-theme="dark"] .text-secondary-400 {
|
|
4406
4409
|
color: #64748b !important;
|
|
4407
4410
|
}
|
|
4408
4411
|
|
|
@@ -4410,25 +4413,25 @@ function ITThemeProvider({
|
|
|
4410
4413
|
background-color: var(--card-bg, #111827) !important;
|
|
4411
4414
|
}
|
|
4412
4415
|
.dark .bg-slate-50, [data-theme="dark"] .bg-slate-50,
|
|
4413
|
-
.dark .bg-
|
|
4416
|
+
.dark .bg-secondary-50, [data-theme="dark"] .bg-secondary-50 {
|
|
4414
4417
|
background-color: #1f2937 !important;
|
|
4415
4418
|
}
|
|
4416
4419
|
.dark .border-slate-100, [data-theme="dark"] .border-slate-100,
|
|
4417
|
-
.dark .border-
|
|
4420
|
+
.dark .border-secondary-100, [data-theme="dark"] .border-secondary-100,
|
|
4418
4421
|
.dark .border-slate-200, [data-theme="dark"] .border-slate-200,
|
|
4419
|
-
.dark .border-
|
|
4422
|
+
.dark .border-secondary-200, [data-theme="dark"] .border-secondary-200 {
|
|
4420
4423
|
border-color: #374151 !important;
|
|
4421
4424
|
}
|
|
4422
4425
|
|
|
4423
|
-
.dark .bg-
|
|
4426
|
+
.dark .bg-secondary-100, [data-theme="dark"] .bg-secondary-100,
|
|
4424
4427
|
.dark .bg-slate-100, [data-theme="dark"] .bg-slate-100 {
|
|
4425
4428
|
background-color: #1f2937 !important;
|
|
4426
4429
|
}
|
|
4427
|
-
.dark .border-
|
|
4430
|
+
.dark .border-secondary-300, [data-theme="dark"] .border-secondary-300,
|
|
4428
4431
|
.dark .border-slate-300, [data-theme="dark"] .border-slate-300 {
|
|
4429
4432
|
border-color: #4b5563 !important;
|
|
4430
4433
|
}
|
|
4431
|
-
.dark .bg-
|
|
4434
|
+
.dark .bg-secondary-200, [data-theme="dark"] .bg-secondary-200,
|
|
4432
4435
|
.dark .bg-slate-200, [data-theme="dark"] .bg-slate-200 {
|
|
4433
4436
|
background-color: #374151 !important;
|
|
4434
4437
|
}
|
|
@@ -4496,23 +4499,23 @@ function ITThemeProvider({
|
|
|
4496
4499
|
}
|
|
4497
4500
|
|
|
4498
4501
|
[data-theme="light"] .text-slate-800,
|
|
4499
|
-
[data-theme="light"] .text-
|
|
4502
|
+
[data-theme="light"] .text-secondary-800 {
|
|
4500
4503
|
color: #1e293b !important;
|
|
4501
4504
|
}
|
|
4502
4505
|
[data-theme="light"] .text-slate-700,
|
|
4503
|
-
[data-theme="light"] .text-
|
|
4506
|
+
[data-theme="light"] .text-secondary-700 {
|
|
4504
4507
|
color: #334155 !important;
|
|
4505
4508
|
}
|
|
4506
4509
|
[data-theme="light"] .text-slate-600,
|
|
4507
|
-
[data-theme="light"] .text-
|
|
4510
|
+
[data-theme="light"] .text-secondary-600 {
|
|
4508
4511
|
color: #475569 !important;
|
|
4509
4512
|
}
|
|
4510
4513
|
[data-theme="light"] .text-slate-500,
|
|
4511
|
-
[data-theme="light"] .text-
|
|
4514
|
+
[data-theme="light"] .text-secondary-500 {
|
|
4512
4515
|
color: #64748b !important;
|
|
4513
4516
|
}
|
|
4514
4517
|
[data-theme="light"] .text-slate-400,
|
|
4515
|
-
[data-theme="light"] .text-
|
|
4518
|
+
[data-theme="light"] .text-secondary-400 {
|
|
4516
4519
|
color: #94a3b8 !important;
|
|
4517
4520
|
}
|
|
4518
4521
|
|
|
@@ -4520,24 +4523,24 @@ function ITThemeProvider({
|
|
|
4520
4523
|
background-color: #ffffff !important;
|
|
4521
4524
|
}
|
|
4522
4525
|
[data-theme="light"] .bg-slate-50,
|
|
4523
|
-
[data-theme="light"] .bg-
|
|
4526
|
+
[data-theme="light"] .bg-secondary-50 {
|
|
4524
4527
|
background-color: #f8fafc !important;
|
|
4525
4528
|
}
|
|
4526
4529
|
[data-theme="light"] .border-slate-100,
|
|
4527
|
-
[data-theme="light"] .border-
|
|
4530
|
+
[data-theme="light"] .border-secondary-100,
|
|
4528
4531
|
[data-theme="light"] .border-slate-200,
|
|
4529
|
-
[data-theme="light"] .border-
|
|
4532
|
+
[data-theme="light"] .border-secondary-200 {
|
|
4530
4533
|
border-color: #e2e8f0 !important;
|
|
4531
4534
|
}
|
|
4532
|
-
[data-theme="light"] .bg-
|
|
4535
|
+
[data-theme="light"] .bg-secondary-100,
|
|
4533
4536
|
[data-theme="light"] .bg-slate-100 {
|
|
4534
4537
|
background-color: #f1f5f9 !important;
|
|
4535
4538
|
}
|
|
4536
|
-
[data-theme="light"] .border-
|
|
4539
|
+
[data-theme="light"] .border-secondary-300,
|
|
4537
4540
|
[data-theme="light"] .border-slate-300 {
|
|
4538
4541
|
border-color: #cbd5e1 !important;
|
|
4539
4542
|
}
|
|
4540
|
-
[data-theme="light"] .bg-
|
|
4543
|
+
[data-theme="light"] .bg-secondary-200,
|
|
4541
4544
|
[data-theme="light"] .bg-slate-200 {
|
|
4542
4545
|
background-color: #e2e8f0 !important;
|
|
4543
4546
|
}
|
|
@@ -4565,13 +4568,13 @@ function ITThemeProvider({
|
|
|
4565
4568
|
.hover\\:bg-green-600:hover { background-color: var(--color-success-hover) !important; }
|
|
4566
4569
|
|
|
4567
4570
|
/* Danger overrides (red mappings in UI library) */
|
|
4568
|
-
.bg-
|
|
4569
|
-
.hover\\:bg-
|
|
4570
|
-
.focus\\:ring-
|
|
4571
|
-
.text-
|
|
4572
|
-
.border-
|
|
4573
|
-
.bg-
|
|
4574
|
-
.hover\\:bg-
|
|
4571
|
+
.bg-danger-700 { background-color: var(--color-danger) !important; }
|
|
4572
|
+
.hover\\:bg-danger-800:hover { background-color: var(--color-danger-hover) !important; }
|
|
4573
|
+
.focus\\:ring-danger-300:focus { --tw-ring-color: var(--color-danger-ring) !important; }
|
|
4574
|
+
.text-danger-700 { color: var(--color-danger) !important; }
|
|
4575
|
+
.border-danger-700 { border-color: var(--color-danger) !important; }
|
|
4576
|
+
.bg-danger-500 { background-color: var(--color-danger) !important; }
|
|
4577
|
+
.hover\\:bg-danger-600:hover { background-color: var(--color-danger-hover) !important; }
|
|
4575
4578
|
|
|
4576
4579
|
/* Warning overrides (yellow mappings in UI library) */
|
|
4577
4580
|
.bg-yellow-400 { background-color: var(--color-warning) !important; }
|
|
@@ -4601,12 +4604,12 @@ function ITThemeProvider({
|
|
|
4601
4604
|
.border-blue-500 { border-color: var(--color-info) !important; }
|
|
4602
4605
|
|
|
4603
4606
|
/* Secondary elements overrides */
|
|
4604
|
-
button[class*="bg-white"][class*="hover:bg-
|
|
4607
|
+
button[class*="bg-white"][class*="hover:bg-secondary-100"] {
|
|
4605
4608
|
background-color: var(--color-secondary) !important;
|
|
4606
4609
|
border-color: var(--color-secondary-soft-border) !important;
|
|
4607
4610
|
color: #111827 !important;
|
|
4608
4611
|
}
|
|
4609
|
-
button[class*="bg-white"][class*="hover:bg-
|
|
4612
|
+
button[class*="bg-white"][class*="hover:bg-secondary-100"]:hover {
|
|
4610
4613
|
background-color: var(--color-secondary-hover) !important;
|
|
4611
4614
|
}
|
|
4612
4615
|
|
|
@@ -5205,7 +5208,7 @@ function ITThemeProvider({
|
|
|
5205
5208
|
e.stopPropagation();
|
|
5206
5209
|
handleDeletePreset(preset.name, e);
|
|
5207
5210
|
},
|
|
5208
|
-
className: "absolute top-1.5 right-1.5 opacity-0 group-hover:opacity-100 p-0.5 rounded-md hover:bg-
|
|
5211
|
+
className: "absolute top-1.5 right-1.5 opacity-0 group-hover:opacity-100 p-0.5 rounded-md hover:bg-danger-500/10 hover:text-danger-500 text-slate-400 dark:text-slate-500 cursor-pointer transition-all z-10",
|
|
5209
5212
|
title: "Eliminar",
|
|
5210
5213
|
children: /* @__PURE__ */ jsx20(MdClose, { size: 12 })
|
|
5211
5214
|
}
|
|
@@ -5552,7 +5555,7 @@ function ITDialog({
|
|
|
5552
5555
|
"div",
|
|
5553
5556
|
{
|
|
5554
5557
|
"data-it-dialog": "true",
|
|
5555
|
-
className: `fixed inset-0 flex ${fullScreen ? "items-stretch" : "items-center justify-center"} bg-
|
|
5558
|
+
className: `fixed inset-0 flex ${fullScreen ? "items-stretch" : "items-center justify-center"} bg-slate-900/50 z-[60]`,
|
|
5556
5559
|
children: /* @__PURE__ */ jsx22(
|
|
5557
5560
|
"div",
|
|
5558
5561
|
{
|
|
@@ -5573,7 +5576,7 @@ function ITDialog({
|
|
|
5573
5576
|
/* @__PURE__ */ jsx22(
|
|
5574
5577
|
"button",
|
|
5575
5578
|
{
|
|
5576
|
-
className: "absolute top-2 right-2 text-
|
|
5579
|
+
className: "absolute top-2 right-2 text-secondary-600 hover:text-secondary-900",
|
|
5577
5580
|
onClick: onClose,
|
|
5578
5581
|
children: /* @__PURE__ */ jsx22(FaRegTimesCircle, {})
|
|
5579
5582
|
}
|
|
@@ -5943,14 +5946,14 @@ function ITTimePicker({
|
|
|
5943
5946
|
"div",
|
|
5944
5947
|
{
|
|
5945
5948
|
ref: dropdownRef,
|
|
5946
|
-
className: "fixed z-[70] bg-white border border-
|
|
5949
|
+
className: "fixed z-[70] bg-white border border-secondary-100 shadow-xl rounded-xl w-64 overflow-hidden flex flex-col animate-in fade-in zoom-in-95 duration-200 origin-top it-timepicker-dropdown",
|
|
5947
5950
|
style: {
|
|
5948
5951
|
top: `${dropdownPosition.top}px`,
|
|
5949
5952
|
left: `${dropdownPosition.left}px`
|
|
5950
5953
|
},
|
|
5951
5954
|
children: [
|
|
5952
|
-
/* @__PURE__ */ jsxs22("div", { className: "flex bg-
|
|
5953
|
-
/* @__PURE__ */ jsx27(ITText, { as: "div", className: "flex-1 text-center py-2 border-r border-
|
|
5955
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex bg-secondary-50 border-b border-secondary-100 text-xs font-semibold text-secondary-500 uppercase tracking-wider", children: [
|
|
5956
|
+
/* @__PURE__ */ jsx27(ITText, { as: "div", className: "flex-1 text-center py-2 border-r border-secondary-100", children: "Horas" }),
|
|
5954
5957
|
/* @__PURE__ */ jsx27(ITText, { as: "div", className: "flex-1 text-center py-2", children: "Minutos" })
|
|
5955
5958
|
] }),
|
|
5956
5959
|
/* @__PURE__ */ jsxs22("div", { className: "flex h-56 relative bg-white", children: [
|
|
@@ -5958,7 +5961,7 @@ function ITTimePicker({
|
|
|
5958
5961
|
"div",
|
|
5959
5962
|
{
|
|
5960
5963
|
ref: hoursRef,
|
|
5961
|
-
className: "flex-1 overflow-y-auto no-scrollbar border-r border-
|
|
5964
|
+
className: "flex-1 overflow-y-auto no-scrollbar border-r border-secondary-50 scroll-smooth relative",
|
|
5962
5965
|
children: /* @__PURE__ */ jsx27("div", { className: "py-2", children: hoursList.map((h) => {
|
|
5963
5966
|
const isSelected = currentHour === h;
|
|
5964
5967
|
return /* @__PURE__ */ jsx27(
|
|
@@ -6024,7 +6027,7 @@ function ITTimePicker({
|
|
|
6024
6027
|
),
|
|
6025
6028
|
/* @__PURE__ */ jsx27("div", { className: "absolute top-1/2 left-0 right-0 h-10 -mt-5 bg-black/5 pointer-events-none border-y border-black/10 z-10" })
|
|
6026
6029
|
] }),
|
|
6027
|
-
/* @__PURE__ */ jsx27("div", { className: "p-3 bg-
|
|
6030
|
+
/* @__PURE__ */ jsx27("div", { className: "p-3 bg-secondary-50 border-t border-secondary-100 flex justify-end", children: /* @__PURE__ */ jsx27(
|
|
6028
6031
|
ITButton,
|
|
6029
6032
|
{
|
|
6030
6033
|
variant: "solid",
|
|
@@ -6166,12 +6169,12 @@ function ITSearchSelect({
|
|
|
6166
6169
|
ITText,
|
|
6167
6170
|
{
|
|
6168
6171
|
as: "label",
|
|
6169
|
-
className: clsx24("text-sm font-medium text-
|
|
6170
|
-
"text-
|
|
6172
|
+
className: clsx24("text-sm font-medium text-secondary-700 dark:text-slate-300", {
|
|
6173
|
+
"text-danger-500": hasError
|
|
6171
6174
|
}),
|
|
6172
6175
|
children: [
|
|
6173
6176
|
/* @__PURE__ */ jsx28(ITText, { as: "span", children: label }),
|
|
6174
|
-
required && /* @__PURE__ */ jsx28(ITText, { as: "span", className: "text-
|
|
6177
|
+
required && /* @__PURE__ */ jsx28(ITText, { as: "span", className: "text-danger-500 ml-1", children: "*" })
|
|
6175
6178
|
]
|
|
6176
6179
|
}
|
|
6177
6180
|
),
|
|
@@ -6194,26 +6197,26 @@ function ITSearchSelect({
|
|
|
6194
6197
|
autoComplete: "off"
|
|
6195
6198
|
}
|
|
6196
6199
|
),
|
|
6197
|
-
/* @__PURE__ */ jsxs23("div", { className: "absolute right-3 flex items-center gap-2 text-
|
|
6200
|
+
/* @__PURE__ */ jsxs23("div", { className: "absolute right-3 flex items-center gap-2 text-secondary-400 pointer-events-none", children: [
|
|
6198
6201
|
isLoading && /* @__PURE__ */ jsx28("div", { className: "animate-spin h-4 w-4 border-2 border-primary-500 border-t-transparent rounded-full" }),
|
|
6199
6202
|
!isLoading && /* @__PURE__ */ jsx28(FaSearch, { size: 14, className: clsx24({ "text-primary-500": isFocused }) })
|
|
6200
6203
|
] })
|
|
6201
6204
|
] }),
|
|
6202
|
-
isOpen && /* @__PURE__ */ jsx28("div", { className: "absolute z-[70] w-full mt-1 bg-white dark:bg-slate-900 border border-
|
|
6205
|
+
isOpen && /* @__PURE__ */ jsx28("div", { className: "absolute z-[70] w-full mt-1 bg-white dark:bg-slate-900 border border-secondary-200 dark:border-slate-800 rounded-lg shadow-xl overflow-hidden animate-in fade-in zoom-in duration-200 origin-top", children: /* @__PURE__ */ jsx28("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => /* @__PURE__ */ jsx28(
|
|
6203
6206
|
ITText,
|
|
6204
6207
|
{
|
|
6205
6208
|
as: "div",
|
|
6206
6209
|
onClick: () => handleSelect(option),
|
|
6207
6210
|
className: clsx24(
|
|
6208
6211
|
"px-4 py-2 text-sm cursor-pointer transition-colors",
|
|
6209
|
-
value === option[valueField] ? "bg-primary-50 dark:bg-primary-950/40 text-primary-700 dark:text-primary-300 font-medium" : "hover:bg-
|
|
6212
|
+
value === option[valueField] ? "bg-primary-50 dark:bg-primary-950/40 text-primary-700 dark:text-primary-300 font-medium" : "hover:bg-secondary-50 dark:hover:bg-slate-800 text-secondary-700 dark:text-slate-300"
|
|
6210
6213
|
),
|
|
6211
6214
|
children: /* @__PURE__ */ jsx28(ITText, { as: "span", children: option[labelField] })
|
|
6212
6215
|
},
|
|
6213
6216
|
option[valueField]
|
|
6214
|
-
)) : /* @__PURE__ */ jsx28(ITText, { as: "div", className: "px-4 py-6 text-sm text-center text-
|
|
6217
|
+
)) : /* @__PURE__ */ jsx28(ITText, { as: "div", className: "px-4 py-6 text-sm text-center text-secondary-500 italic", children: isLoading ? "Cargando..." : noResultsMessage }) }) })
|
|
6215
6218
|
] }),
|
|
6216
|
-
hasError && /* @__PURE__ */ jsx28(ITText, { as: "p", className: "text-
|
|
6219
|
+
hasError && /* @__PURE__ */ jsx28(ITText, { as: "p", className: "text-danger-500 text-xs mt-1", children: errorMessage })
|
|
6217
6220
|
] });
|
|
6218
6221
|
}
|
|
6219
6222
|
|
|
@@ -6442,7 +6445,7 @@ var ITFieldRenderer = ({
|
|
|
6442
6445
|
return null;
|
|
6443
6446
|
case "section":
|
|
6444
6447
|
return /* @__PURE__ */ jsxs24("div", { className: clsx25("w-full col-span-full", activeConfig.className), children: [
|
|
6445
|
-
label && /* @__PURE__ */ jsx29(ITText, { as: "h4", className: "text-lg font-semibold text-
|
|
6448
|
+
label && /* @__PURE__ */ jsx29(ITText, { as: "h4", className: "text-lg font-semibold text-secondary-800 mb-4", children: label }),
|
|
6446
6449
|
/* @__PURE__ */ jsx29("div", { className: clsx25("grid gap-y-6 gap-x-5", getGridColsClass(columns)), children: activeConfig.fields?.map((childConfig) => /* @__PURE__ */ jsx29(
|
|
6447
6450
|
ITFieldRenderer,
|
|
6448
6451
|
{
|
|
@@ -6453,7 +6456,7 @@ var ITFieldRenderer = ({
|
|
|
6453
6456
|
)) })
|
|
6454
6457
|
] });
|
|
6455
6458
|
case "array":
|
|
6456
|
-
return /* @__PURE__ */ jsx29("div", { className: "p-4 border-2 border-dashed border-
|
|
6459
|
+
return /* @__PURE__ */ jsx29("div", { className: "p-4 border-2 border-dashed border-secondary-200 rounded-xl", children: /* @__PURE__ */ jsxs24(ITText, { as: "p", className: "text-sm text-secondary-500 text-center", children: [
|
|
6457
6460
|
"Array Field: ",
|
|
6458
6461
|
label
|
|
6459
6462
|
] }) });
|
|
@@ -6769,10 +6772,10 @@ function ITNavbar({
|
|
|
6769
6772
|
const shouldUseLegacy = !navigationItems.length && (navItems || sidebarItems);
|
|
6770
6773
|
if (shouldUseLegacy) {
|
|
6771
6774
|
return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col h-screen", children: [
|
|
6772
|
-
/* @__PURE__ */ jsx33("nav", { className: "bg-white border-b border-
|
|
6775
|
+
/* @__PURE__ */ jsx33("nav", { className: "bg-white border-b border-secondary-200", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between mx-auto p-4", children: [
|
|
6773
6776
|
/* @__PURE__ */ jsxs25("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
|
|
6774
6777
|
logo && /* @__PURE__ */ jsx33("div", { className: "h-8", children: logo }),
|
|
6775
|
-
logoText && /* @__PURE__ */ jsx33(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-
|
|
6778
|
+
logoText && /* @__PURE__ */ jsx33(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-secondary-900", children: logoText })
|
|
6776
6779
|
] }),
|
|
6777
6780
|
/* @__PURE__ */ jsx33("div", { className: "flex items-center justify-end w-full md:w-auto md:order-2", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center space-x-4 md:order-2", children: [
|
|
6778
6781
|
/* @__PURE__ */ jsx33("ul", { className: "hidden md:flex space-x-4", children: navItems }),
|
|
@@ -6781,7 +6784,7 @@ function ITNavbar({
|
|
|
6781
6784
|
"button",
|
|
6782
6785
|
{
|
|
6783
6786
|
type: "button",
|
|
6784
|
-
className: "flex text-sm bg-
|
|
6787
|
+
className: "flex text-sm bg-secondary-200 rounded-full md:me-0 focus:ring-4 focus:ring-secondary-300",
|
|
6785
6788
|
onClick: toggleUserMenu,
|
|
6786
6789
|
children: userMenu.userImage ? /* @__PURE__ */ jsx33(
|
|
6787
6790
|
"img",
|
|
@@ -6790,18 +6793,18 @@ function ITNavbar({
|
|
|
6790
6793
|
src: userMenu.userImage,
|
|
6791
6794
|
alt: "user photo"
|
|
6792
6795
|
}
|
|
6793
|
-
) : /* @__PURE__ */ jsx33(FaUserCircle, { className: "w-8 h-8 text-
|
|
6796
|
+
) : /* @__PURE__ */ jsx33(FaUserCircle, { className: "w-8 h-8 text-secondary-500" })
|
|
6794
6797
|
}
|
|
6795
6798
|
),
|
|
6796
6799
|
isUserMenuOpen && /* @__PURE__ */ jsxs25(
|
|
6797
6800
|
"div",
|
|
6798
6801
|
{
|
|
6799
6802
|
ref: userMenuRef,
|
|
6800
|
-
className: "z-[70] absolute right-0 mt-2 text-base list-none bg-white divide-y divide-
|
|
6803
|
+
className: "z-[70] absolute right-0 mt-2 text-base list-none bg-white divide-y divide-secondary-100 rounded-lg shadow-sm",
|
|
6801
6804
|
children: [
|
|
6802
6805
|
/* @__PURE__ */ jsxs25("div", { className: "px-4 py-3", children: [
|
|
6803
|
-
/* @__PURE__ */ jsx33(ITText, { as: "span", className: "block text-sm text-
|
|
6804
|
-
/* @__PURE__ */ jsx33(ITText, { as: "span", className: "block text-sm text-
|
|
6806
|
+
/* @__PURE__ */ jsx33(ITText, { as: "span", className: "block text-sm text-secondary-900", children: userMenu.userName }),
|
|
6807
|
+
/* @__PURE__ */ jsx33(ITText, { as: "span", className: "block text-sm text-secondary-500 truncate", children: userMenu.userEmail })
|
|
6805
6808
|
] }),
|
|
6806
6809
|
/* @__PURE__ */ jsx33("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx33("li", { children: /* @__PURE__ */ jsx33(
|
|
6807
6810
|
"button",
|
|
@@ -6810,7 +6813,7 @@ function ITNavbar({
|
|
|
6810
6813
|
item.onClick();
|
|
6811
6814
|
setIsUserMenuOpen(false);
|
|
6812
6815
|
},
|
|
6813
|
-
className: "block px-4 py-2 text-sm text-
|
|
6816
|
+
className: "block px-4 py-2 text-sm text-secondary-700 hover:bg-secondary-100 w-full text-left",
|
|
6814
6817
|
children: /* @__PURE__ */ jsx33(ITText, { as: "span", children: item.label })
|
|
6815
6818
|
}
|
|
6816
6819
|
) }, index)) })
|
|
@@ -6821,8 +6824,8 @@ function ITNavbar({
|
|
|
6821
6824
|
] }) })
|
|
6822
6825
|
] }) }),
|
|
6823
6826
|
/* @__PURE__ */ jsxs25("div", { className: "flex-1 flex overflow-hidden relative", children: [
|
|
6824
|
-
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */ jsx33("aside", { className: "fixed inset-y-0 left-0 w-64 bg-
|
|
6825
|
-
/* @__PURE__ */ jsx33("main", { className: "flex-1 bg-
|
|
6827
|
+
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */ jsx33("aside", { className: "fixed inset-y-0 left-0 w-64 bg-secondary-50 transform transition-transform duration-300 ease-in-out z-[40] shadow-lg md:static md:transform-none md:shadow-none md:border-r md:border-secondary-200", children: /* @__PURE__ */ jsx33("div", { className: "h-full overflow-y-auto py-4 px-3", children: /* @__PURE__ */ jsx33("ul", { className: "space-y-2 font-medium", children: sidebarItems }) }) }),
|
|
6828
|
+
/* @__PURE__ */ jsx33("main", { className: "flex-1 bg-secondary-100 overflow-y-auto", children })
|
|
6826
6829
|
] })
|
|
6827
6830
|
] });
|
|
6828
6831
|
}
|
|
@@ -7403,7 +7406,7 @@ function SearchInput({
|
|
|
7403
7406
|
className = ""
|
|
7404
7407
|
}) {
|
|
7405
7408
|
return /* @__PURE__ */ jsxs31("div", { className: `relative flex-1 ${className}`, children: [
|
|
7406
|
-
/* @__PURE__ */ jsx41("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx41(FaSearch2, { className: "h-5 w-5 text-
|
|
7409
|
+
/* @__PURE__ */ jsx41("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx41(FaSearch2, { className: "h-5 w-5 text-secondary-400" }) }),
|
|
7407
7410
|
/* @__PURE__ */ jsx41(
|
|
7408
7411
|
ITInput,
|
|
7409
7412
|
{
|
|
@@ -7431,12 +7434,12 @@ function SortButton({
|
|
|
7431
7434
|
"button",
|
|
7432
7435
|
{
|
|
7433
7436
|
onClick,
|
|
7434
|
-
className: `p-3 rounded-lg bg-white border border-
|
|
7437
|
+
className: `p-3 rounded-lg bg-white border border-secondary-300 hover:bg-secondary-50 transition-colors duration-200 flex items-center gap-2 min-w-[120px] ${className}`,
|
|
7435
7438
|
"aria-label": `Ordenar tabla ${sortConfig ? sortConfig.direction === "asc" ? "descendente" : "ascendente" : "ascendente"}`,
|
|
7436
7439
|
title: "Ordenar tabla",
|
|
7437
7440
|
children: [
|
|
7438
|
-
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */ jsx42(FaSortUp, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ jsx42(FaSortDown, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ jsx42(FaSort, { className: "w-4 h-4 text-
|
|
7439
|
-
/* @__PURE__ */ jsx42(ITText, { as: "span", className: "text-sm font-medium text-
|
|
7441
|
+
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */ jsx42(FaSortUp, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ jsx42(FaSortDown, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ jsx42(FaSort, { className: "w-4 h-4 text-secondary-500" }),
|
|
7442
|
+
/* @__PURE__ */ jsx42(ITText, { as: "span", className: "text-sm font-medium text-secondary-700", children: sortConfig ? sortConfig.direction === "asc" ? "Asc \u2191" : "Desc \u2193" : "Ordenar" })
|
|
7440
7443
|
]
|
|
7441
7444
|
}
|
|
7442
7445
|
);
|
|
@@ -7452,7 +7455,7 @@ function SearchAndSortBar({
|
|
|
7452
7455
|
sortConfig,
|
|
7453
7456
|
searchInputPlaceholder = "Buscar en todos los campos..."
|
|
7454
7457
|
}) {
|
|
7455
|
-
return /* @__PURE__ */ jsx43("div", { className: "bg-
|
|
7458
|
+
return /* @__PURE__ */ jsx43("div", { className: "bg-secondary-50 px-6 py-4 border-b border-secondary-200", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-4", children: [
|
|
7456
7459
|
/* @__PURE__ */ jsx43(
|
|
7457
7460
|
SearchInput,
|
|
7458
7461
|
{
|
|
@@ -7512,7 +7515,7 @@ function TableHeader({
|
|
|
7512
7515
|
onSort,
|
|
7513
7516
|
sortConfig
|
|
7514
7517
|
}) {
|
|
7515
|
-
return /* @__PURE__ */ jsx45("thead", { children: /* @__PURE__ */ jsx45("tr", { className: "bg-white border-b border-
|
|
7518
|
+
return /* @__PURE__ */ jsx45("thead", { children: /* @__PURE__ */ jsx45("tr", { className: "bg-white border-b border-secondary-200", children: columns.map((col) => /* @__PURE__ */ jsx45(
|
|
7516
7519
|
TableHeaderCell,
|
|
7517
7520
|
{
|
|
7518
7521
|
label: col.label,
|
|
@@ -7655,7 +7658,7 @@ function EditableCell({
|
|
|
7655
7658
|
};
|
|
7656
7659
|
return /* @__PURE__ */ jsxs35("div", { className: "w-full", children: [
|
|
7657
7660
|
renderInput(),
|
|
7658
|
-
error && /* @__PURE__ */ jsx46("div", { className: "text-
|
|
7661
|
+
error && /* @__PURE__ */ jsx46("div", { className: "text-danger-500 text-xs mt-1", children: /* @__PURE__ */ jsx46(ITText, { as: "span", children: error }) })
|
|
7659
7662
|
] });
|
|
7660
7663
|
}
|
|
7661
7664
|
|
|
@@ -7700,7 +7703,7 @@ function TableRow({
|
|
|
7700
7703
|
"aria-label": "Verdadero",
|
|
7701
7704
|
title: "Verdadero"
|
|
7702
7705
|
}
|
|
7703
|
-
) : /* @__PURE__ */ jsx47(FaTimes7, { className: "text-
|
|
7706
|
+
) : /* @__PURE__ */ jsx47(FaTimes7, { className: "text-danger-500", "aria-label": "Falso", title: "Falso" });
|
|
7704
7707
|
case "actions":
|
|
7705
7708
|
if (isEditing && col.saveActions) {
|
|
7706
7709
|
return col.saveActions(rowData, {
|
|
@@ -7729,7 +7732,7 @@ function TableRow({
|
|
|
7729
7732
|
{
|
|
7730
7733
|
onMouseEnter: () => setIsHovered(true),
|
|
7731
7734
|
onMouseLeave: () => setIsHovered(false),
|
|
7732
|
-
className: `border-b border-
|
|
7735
|
+
className: `border-b border-secondary-200 transition-colors duration-150 ${isEditing ? "bg-slate-50" : rowIndex % 2 === 0 ? "bg-white" : "bg-secondary-50"} ${isHovered && !isEditing ? "bg-secondary-100" : ""}`,
|
|
7733
7736
|
children: columns.map((col) => /* @__PURE__ */ jsx47(
|
|
7734
7737
|
"td",
|
|
7735
7738
|
{
|
|
@@ -7783,7 +7786,7 @@ function PaginationInfo({
|
|
|
7783
7786
|
totalCount,
|
|
7784
7787
|
className = ""
|
|
7785
7788
|
}) {
|
|
7786
|
-
return /* @__PURE__ */ jsxs36(ITText, { as: "span", className: `text-sm text-
|
|
7789
|
+
return /* @__PURE__ */ jsxs36(ITText, { as: "span", className: `text-sm text-secondary-700 ${className}`, children: [
|
|
7787
7790
|
"Mostrando ",
|
|
7788
7791
|
currentCount,
|
|
7789
7792
|
" de ",
|
|
@@ -7810,7 +7813,7 @@ function PaginationControls({
|
|
|
7810
7813
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center space-x-4", children: [
|
|
7811
7814
|
/* @__PURE__ */ jsx49(PaginationInfo, { currentCount, totalCount }),
|
|
7812
7815
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center space-x-2", children: [
|
|
7813
|
-
/* @__PURE__ */ jsx49(ITText, { as: "span", className: "text-sm text-
|
|
7816
|
+
/* @__PURE__ */ jsx49(ITText, { as: "span", className: "text-sm text-secondary-700", children: "Mostrar:" }),
|
|
7814
7817
|
/* @__PURE__ */ jsx49(
|
|
7815
7818
|
ITSelect,
|
|
7816
7819
|
{
|
|
@@ -7843,7 +7846,7 @@ function PaginationControls({
|
|
|
7843
7846
|
children: /* @__PURE__ */ jsx49(FaArrowLeft, { "aria-hidden": "true" })
|
|
7844
7847
|
}
|
|
7845
7848
|
),
|
|
7846
|
-
/* @__PURE__ */ jsxs37(ITText, { as: "span", className: "px-4 py-2 text-sm text-
|
|
7849
|
+
/* @__PURE__ */ jsxs37(ITText, { as: "span", className: "px-4 py-2 text-sm text-secondary-700", "aria-live": "polite", children: [
|
|
7847
7850
|
"P\xE1gina ",
|
|
7848
7851
|
pageIndex,
|
|
7849
7852
|
" de ",
|
|
@@ -7937,7 +7940,7 @@ function ITSearchTable({
|
|
|
7937
7940
|
/* @__PURE__ */ jsxs38("div", { className: "shadow-md sm:rounded-lg overflow-hidden", children: [
|
|
7938
7941
|
title && /* @__PURE__ */ jsx50("div", { className: "bg-teal-500 text-white px-6 py-4", children: /* @__PURE__ */ jsx50(ITText, { as: "h2", className: "text-xl font-bold text-center whitespace-nowrap", children: title }) }),
|
|
7939
7942
|
/* @__PURE__ */ jsxs38("div", { className: "bg-white", children: [
|
|
7940
|
-
/* @__PURE__ */ jsx50("div", { className: "p-4 border-b border-
|
|
7943
|
+
/* @__PURE__ */ jsx50("div", { className: "p-4 border-b border-secondary-200", children: /* @__PURE__ */ jsx50(
|
|
7941
7944
|
SearchAndSortBar,
|
|
7942
7945
|
{
|
|
7943
7946
|
searchTerm,
|
|
@@ -7952,7 +7955,7 @@ function ITSearchTable({
|
|
|
7952
7955
|
"table",
|
|
7953
7956
|
{
|
|
7954
7957
|
className: clsx34(
|
|
7955
|
-
"min-w-full text-sm text-left bg-white text-
|
|
7958
|
+
"min-w-full text-sm text-left bg-white text-secondary-900 table-auto",
|
|
7956
7959
|
variantStyles[variant],
|
|
7957
7960
|
sizeStyles[size]
|
|
7958
7961
|
),
|
|
@@ -8100,7 +8103,7 @@ function ITSidebar({
|
|
|
8100
8103
|
${sidebarWidth}
|
|
8101
8104
|
${className}
|
|
8102
8105
|
${!visibleOnMobile ? "hidden lg:flex" : "flex"}
|
|
8103
|
-
shadow-[
|
|
8106
|
+
shadow-[4px_0_32px_rgba(15,23,42,0.04)]
|
|
8104
8107
|
`,
|
|
8105
8108
|
style: {
|
|
8106
8109
|
zIndex: 50,
|
|
@@ -8120,7 +8123,7 @@ function ITSidebar({
|
|
|
8120
8123
|
`,
|
|
8121
8124
|
style: {
|
|
8122
8125
|
backgroundColor: item.isActive ? "var(--sidebar-active-bg, var(--color-secondary-50))" : "transparent",
|
|
8123
|
-
boxShadow: item.isActive ? "
|
|
8126
|
+
boxShadow: item.isActive ? "var(--shadow-xs)" : "none",
|
|
8124
8127
|
border: item.isActive ? "1px solid var(--sidebar-border, var(--color-secondary-200))" : "1px solid transparent"
|
|
8125
8128
|
},
|
|
8126
8129
|
onMouseEnter: (e) => {
|
|
@@ -8135,7 +8138,7 @@ function ITSidebar({
|
|
|
8135
8138
|
"div",
|
|
8136
8139
|
{
|
|
8137
8140
|
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
8138
|
-
style: { backgroundColor: "var(--sidebar-active-icon,
|
|
8141
|
+
style: { backgroundColor: "var(--sidebar-active-icon, var(--color-primary-500))", boxShadow: "0 0 10px var(--sidebar-active-icon, var(--color-primary-500))" }
|
|
8139
8142
|
}
|
|
8140
8143
|
),
|
|
8141
8144
|
/* @__PURE__ */ jsxs39("div", { className: `flex items-center ${!isSidebarCollapsed ? "gap-3.5" : "justify-center"} relative z-10 w-full`, children: [
|
|
@@ -8144,7 +8147,7 @@ function ITSidebar({
|
|
|
8144
8147
|
{
|
|
8145
8148
|
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
8146
8149
|
style: {
|
|
8147
|
-
color: item.isActive ? "var(--sidebar-active-icon,
|
|
8150
|
+
color: item.isActive ? "var(--sidebar-active-icon, var(--color-primary-500))" : "var(--sidebar-icon-color, #9ca3af)",
|
|
8148
8151
|
opacity: item.isActive ? 1 : 0.8,
|
|
8149
8152
|
fontSize: item.isActive ? "1.35rem" : "1.25rem",
|
|
8150
8153
|
filter: item.isActive ? "drop-shadow(0 0 8px rgba(255,255,255,0.2))" : "none"
|
|
@@ -8158,7 +8161,7 @@ function ITSidebar({
|
|
|
8158
8161
|
as: "span",
|
|
8159
8162
|
className: `transition-all duration-300 truncate tracking-wide`,
|
|
8160
8163
|
style: {
|
|
8161
|
-
color: item.isActive ? "var(--sidebar-active-color, #ffffff)" : "var(--sidebar-label-color,
|
|
8164
|
+
color: item.isActive ? "var(--sidebar-active-color, #ffffff)" : "var(--sidebar-label-color, var(--color-secondary-300))",
|
|
8162
8165
|
fontSize: "0.9rem",
|
|
8163
8166
|
fontWeight: item.isActive ? "600" : "500"
|
|
8164
8167
|
},
|
|
@@ -8182,9 +8185,9 @@ function ITSidebar({
|
|
|
8182
8185
|
${isSidebarCollapsed ? "top-1 right-1 w-2.5 h-2.5 rounded-full ring-2 ring-white" : "right-3 top-1/2 transform -translate-y-1/2 px-2 py-0.5 text-[10px] rounded-full backdrop-blur-sm"}
|
|
8183
8186
|
`,
|
|
8184
8187
|
style: {
|
|
8185
|
-
backgroundColor: "var(--sidebar-badge-bg,
|
|
8188
|
+
backgroundColor: "var(--sidebar-badge-bg, var(--color-primary-500))",
|
|
8186
8189
|
color: "var(--sidebar-badge-color, #ffffff)",
|
|
8187
|
-
boxShadow: isSidebarCollapsed ? "0 0 0 2px var(--sidebar-bg,
|
|
8190
|
+
boxShadow: isSidebarCollapsed ? "0 0 0 2px var(--sidebar-bg, var(--color-secondary-900))" : "none"
|
|
8188
8191
|
},
|
|
8189
8192
|
children: isSidebarCollapsed ? "" : item.badge
|
|
8190
8193
|
}
|
|
@@ -8204,7 +8207,7 @@ function ITSidebar({
|
|
|
8204
8207
|
},
|
|
8205
8208
|
children: [
|
|
8206
8209
|
/* @__PURE__ */ jsxs39("div", { className: "px-5 py-4 flex items-center gap-3 font-semibold border-b", style: { borderColor: "var(--sidebar-border, var(--color-secondary-200))", color: "var(--sidebar-active-color, var(--color-secondary-900))" }, children: [
|
|
8207
|
-
item.icon && /* @__PURE__ */ jsx51("span", { style: { color: "var(--sidebar-active-icon,
|
|
8210
|
+
item.icon && /* @__PURE__ */ jsx51("span", { style: { color: "var(--sidebar-active-icon, var(--color-primary-500))" }, className: "text-xl drop-shadow-sm", children: item.icon }),
|
|
8208
8211
|
/* @__PURE__ */ jsx51(ITText, { as: "span", className: "tracking-wide text-[15px]", children: item.label })
|
|
8209
8212
|
] }),
|
|
8210
8213
|
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ jsx51("div", { className: "py-2", children: item.subitems.map((subitem) => /* @__PURE__ */ jsxs39(
|
|
@@ -8217,17 +8220,17 @@ function ITSidebar({
|
|
|
8217
8220
|
{
|
|
8218
8221
|
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full",
|
|
8219
8222
|
style: {
|
|
8220
|
-
backgroundColor: "var(--sidebar-active-icon,
|
|
8221
|
-
boxShadow: "0 0 6px color-mix(in srgb, var(--sidebar-active-icon,
|
|
8223
|
+
backgroundColor: "var(--sidebar-active-icon, var(--color-primary-500))",
|
|
8224
|
+
boxShadow: "0 0 6px color-mix(in srgb, var(--sidebar-active-icon, var(--color-primary-500)) 25%, transparent)"
|
|
8222
8225
|
}
|
|
8223
8226
|
}
|
|
8224
8227
|
),
|
|
8225
|
-
/* @__PURE__ */ jsx51("span", { className: `w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`, style: { backgroundColor: subitem.isActive ? "var(--sidebar-active-icon,
|
|
8228
|
+
/* @__PURE__ */ jsx51("span", { className: `w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`, style: { backgroundColor: subitem.isActive ? "var(--sidebar-active-icon, var(--color-primary-500))" : "var(--sidebar-icon-color, var(--color-secondary-400))" } }),
|
|
8226
8229
|
/* @__PURE__ */ jsx51(ITText, { as: "span", style: { color: subitem.isActive ? "var(--sidebar-active-color, var(--color-secondary-900))" : "var(--sidebar-label-color, var(--color-secondary-600))", fontWeight: subitem.isActive ? 600 : 500 }, children: subitem.label })
|
|
8227
8230
|
]
|
|
8228
8231
|
},
|
|
8229
8232
|
subitem.id
|
|
8230
|
-
)) }) : /* @__PURE__ */ jsx51(ITText, { as: "div", className: "px-5 py-3 text-sm italic", style: { color: "var(--sidebar-label-color,
|
|
8233
|
+
)) }) : /* @__PURE__ */ jsx51(ITText, { as: "div", className: "px-5 py-3 text-sm italic", style: { color: "var(--sidebar-label-color, var(--color-secondary-400))" }, children: "No hay submen\xFA" })
|
|
8231
8234
|
]
|
|
8232
8235
|
}
|
|
8233
8236
|
),
|
|
@@ -8272,8 +8275,8 @@ function ITSidebar({
|
|
|
8272
8275
|
{
|
|
8273
8276
|
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full transition-all",
|
|
8274
8277
|
style: {
|
|
8275
|
-
backgroundColor: "var(--sidebar-active-icon,
|
|
8276
|
-
boxShadow: "0 0 6px color-mix(in srgb, var(--sidebar-active-icon,
|
|
8278
|
+
backgroundColor: "var(--sidebar-active-icon, var(--color-primary-500))",
|
|
8279
|
+
boxShadow: "0 0 6px color-mix(in srgb, var(--sidebar-active-icon, var(--color-primary-500)) 25%, transparent)"
|
|
8277
8280
|
}
|
|
8278
8281
|
}
|
|
8279
8282
|
),
|
|
@@ -8282,7 +8285,7 @@ function ITSidebar({
|
|
|
8282
8285
|
{
|
|
8283
8286
|
className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 ${subitem.isActive ? "scale-125" : ""}`,
|
|
8284
8287
|
style: {
|
|
8285
|
-
backgroundColor: subitem.isActive ? "var(--sidebar-active-icon,
|
|
8288
|
+
backgroundColor: subitem.isActive ? "var(--sidebar-active-icon, var(--color-primary-500))" : "var(--sidebar-icon-color, var(--color-secondary-400))"
|
|
8286
8289
|
}
|
|
8287
8290
|
}
|
|
8288
8291
|
),
|
|
@@ -8401,7 +8404,7 @@ function ITSlider({
|
|
|
8401
8404
|
className
|
|
8402
8405
|
}) {
|
|
8403
8406
|
return /* @__PURE__ */ jsxs40("div", { className: clsx36("flex flex-col gap-1.5", className), children: [
|
|
8404
|
-
label && /* @__PURE__ */ jsxs40(ITText, { as: "label", className: "text-xs font-semibold text-
|
|
8407
|
+
label && /* @__PURE__ */ jsxs40(ITText, { as: "label", className: "text-xs font-semibold text-secondary-600 dark:text-secondary-400", children: [
|
|
8405
8408
|
label,
|
|
8406
8409
|
": ",
|
|
8407
8410
|
value
|
|
@@ -8418,7 +8421,7 @@ function ITSlider({
|
|
|
8418
8421
|
disabled,
|
|
8419
8422
|
className: clsx36(
|
|
8420
8423
|
"w-full h-1.5 appearance-none rounded-full outline-none cursor-pointer",
|
|
8421
|
-
"bg-
|
|
8424
|
+
"bg-secondary-200 dark:bg-secondary-700",
|
|
8422
8425
|
"accent-primary-500",
|
|
8423
8426
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
8424
8427
|
"[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4",
|
|
@@ -8427,7 +8430,7 @@ function ITSlider({
|
|
|
8427
8430
|
"[&::-webkit-slider-thumb]:hover:bg-primary-600 [&::-webkit-slider-thumb]:transition-colors",
|
|
8428
8431
|
"[&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:rounded-full",
|
|
8429
8432
|
"[&::-moz-range-thumb]:bg-primary-500 [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-white",
|
|
8430
|
-
"[&::-moz-range-track]:bg-
|
|
8433
|
+
"[&::-moz-range-track]:bg-secondary-200 dark:[&::-moz-range-track]:bg-secondary-700",
|
|
8431
8434
|
"[&::-moz-range-track]:rounded-full [&::-moz-range-track]:h-1.5"
|
|
8432
8435
|
)
|
|
8433
8436
|
}
|
|
@@ -8515,8 +8518,8 @@ function ITTextarea({
|
|
|
8515
8518
|
"w-full border border-solid transition-all duration-200 rounded-lg px-3 py-2 text-sm outline-none",
|
|
8516
8519
|
"focus:ring-2",
|
|
8517
8520
|
resizeMap[resize],
|
|
8518
|
-
error ? "border-
|
|
8519
|
-
disabled && "opacity-50 cursor-not-allowed bg-
|
|
8521
|
+
error ? "border-danger-500 ring-danger-100 focus:border-danger-500 focus:ring-danger-100" : "border-secondary-300 focus:border-primary-500 focus:ring-primary-100",
|
|
8522
|
+
disabled && "opacity-50 cursor-not-allowed bg-secondary-100 dark:bg-slate-800"
|
|
8520
8523
|
)
|
|
8521
8524
|
}
|
|
8522
8525
|
),
|
|
@@ -8655,7 +8658,7 @@ function ITToast({
|
|
|
8655
8658
|
}
|
|
8656
8659
|
|
|
8657
8660
|
// src/components/dropfile/dropfile.tsx
|
|
8658
|
-
import { useState as useState26, useEffect as useEffect17
|
|
8661
|
+
import { useState as useState26, useEffect as useEffect17 } from "react";
|
|
8659
8662
|
import { useDropzone } from "react-dropzone";
|
|
8660
8663
|
import clsx41 from "clsx";
|
|
8661
8664
|
|
|
@@ -8696,8 +8699,12 @@ var ITDropfile = ({
|
|
|
8696
8699
|
showStatusBadge = true,
|
|
8697
8700
|
uploadStatus: externalStatus,
|
|
8698
8701
|
onStatusChange,
|
|
8699
|
-
initialPreviewUrl
|
|
8702
|
+
initialPreviewUrl,
|
|
8703
|
+
view = "drop",
|
|
8704
|
+
buttonLabel = "Subir archivo",
|
|
8705
|
+
modalTitle
|
|
8700
8706
|
}) => {
|
|
8707
|
+
const [isModalOpen, setIsModalOpen] = useState26(false);
|
|
8701
8708
|
const [selectedFile, setSelectedFile] = useState26(null);
|
|
8702
8709
|
const [fileType, setFileType] = useState26(null);
|
|
8703
8710
|
const [imagePreview, setImagePreview] = useState26(initialPreviewUrl || null);
|
|
@@ -8705,7 +8712,6 @@ var ITDropfile = ({
|
|
|
8705
8712
|
const [internalUploadStatus, setInternalUploadStatus] = useState26(
|
|
8706
8713
|
initialPreviewUrl ? "subido" /* UPLOADED */ : "pendiente" /* PENDING */
|
|
8707
8714
|
);
|
|
8708
|
-
const canvasRef = useRef13(null);
|
|
8709
8715
|
useEffect17(() => {
|
|
8710
8716
|
if (initialPreviewUrl && !selectedFile) {
|
|
8711
8717
|
setImagePreview(initialPreviewUrl);
|
|
@@ -8897,113 +8903,144 @@ var ITDropfile = ({
|
|
|
8897
8903
|
const handleDelete = () => {
|
|
8898
8904
|
handleCancel();
|
|
8899
8905
|
};
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8906
|
+
useEffect17(() => {
|
|
8907
|
+
if (view === "button" && isConfirmed && uploadStatus === "subido" /* UPLOADED */) {
|
|
8908
|
+
const timeout = setTimeout(() => setIsModalOpen(false), 900);
|
|
8909
|
+
return () => clearTimeout(timeout);
|
|
8910
|
+
}
|
|
8911
|
+
}, [view, isConfirmed, uploadStatus]);
|
|
8912
|
+
const headerRow = /* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-between mb-2", children: [
|
|
8913
|
+
/* @__PURE__ */ jsxs44("label", { className: "block text-sm font-semibold text-secondary-700", children: [
|
|
8914
|
+
/* @__PURE__ */ jsx58(ITText, { as: "span", children: "Subir archivo " }),
|
|
8915
|
+
/* @__PURE__ */ jsxs44(ITText, { as: "span", className: "text-secondary-400 font-normal text-xs", children: [
|
|
8916
|
+
"(",
|
|
8917
|
+
getFileExtensions(),
|
|
8918
|
+
")"
|
|
8919
|
+
] })
|
|
8912
8920
|
] }),
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8921
|
+
showStatusBadge && selectedFile && /* @__PURE__ */ jsx58(StatusBadge, { status: uploadStatus })
|
|
8922
|
+
] });
|
|
8923
|
+
const dropZoneOrPreview = /* @__PURE__ */ jsx58(Fragment8, { children: !selectedFile && !imagePreview ? /* @__PURE__ */ jsxs44(
|
|
8924
|
+
"div",
|
|
8925
|
+
{
|
|
8926
|
+
...getRootProps(),
|
|
8927
|
+
className: `
|
|
8918
8928
|
relative group flex flex-col items-center justify-center w-full p-6
|
|
8919
8929
|
border-2 border-dashed rounded-xl cursor-pointer transition-all duration-300 ease-in-out
|
|
8920
|
-
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-
|
|
8930
|
+
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-secondary-300 bg-white hover:border-primary-400 hover:bg-secondary-50"}
|
|
8921
8931
|
`,
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
{
|
|
8927
|
-
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-gray-400 group-hover:text-primary-500"}`,
|
|
8928
|
-
fill: "none",
|
|
8929
|
-
viewBox: "0 0 24 24",
|
|
8930
|
-
stroke: "currentColor",
|
|
8931
|
-
children: /* @__PURE__ */ jsx58("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" })
|
|
8932
|
-
}
|
|
8933
|
-
) }),
|
|
8934
|
-
/* @__PURE__ */ jsx58("div", { className: "text-center space-y-1", children: /* @__PURE__ */ jsx58(ITText, { as: "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" }) })
|
|
8935
|
-
]
|
|
8936
|
-
}
|
|
8937
|
-
) : /* @__PURE__ */ jsxs44("div", { className: "w-full bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden animate-fade-in", children: [
|
|
8938
|
-
/* @__PURE__ */ jsx58("div", { className: "flex items-center justify-between p-3 bg-gray-50 border-b border-gray-100", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
8939
|
-
/* @__PURE__ */ jsx58("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__ */ jsx58("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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__ */ jsx58("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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" }) }) }),
|
|
8940
|
-
/* @__PURE__ */ jsxs44("div", { className: "min-w-0", children: [
|
|
8941
|
-
/* @__PURE__ */ jsx58(ITText, { as: "p", className: "text-xs font-medium text-gray-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
8942
|
-
/* @__PURE__ */ jsx58(ITText, { as: "p", className: "text-[10px] text-gray-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
8943
|
-
] })
|
|
8944
|
-
] }) }),
|
|
8945
|
-
/* @__PURE__ */ jsx58("div", { className: clsx41("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__ */ jsx58(
|
|
8946
|
-
"img",
|
|
8947
|
-
{
|
|
8948
|
-
src: imagePreview,
|
|
8949
|
-
alt: "Vista previa",
|
|
8950
|
-
className: "w-full h-full object-contain max-h-[200px]"
|
|
8951
|
-
}
|
|
8952
|
-
) : /* @__PURE__ */ jsxs44("div", { className: "py-8 flex flex-col items-center text-gray-400", children: [
|
|
8953
|
-
/* @__PURE__ */ jsx58("svg", { className: "w-10 h-10 mb-2 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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" }) }),
|
|
8954
|
-
/* @__PURE__ */ jsx58(ITText, { as: "span", className: "text-xs", children: "Sin vista previa" })
|
|
8955
|
-
] }) }),
|
|
8956
|
-
/* @__PURE__ */ jsx58("div", { className: "px-3 py-2 bg-white border-t border-gray-100 flex justify-end gap-2", children: !isConfirmed ? /* @__PURE__ */ jsxs44(Fragment8, { children: [
|
|
8957
|
-
/* @__PURE__ */ jsx58(
|
|
8958
|
-
ITButton,
|
|
8959
|
-
{
|
|
8960
|
-
type: "button",
|
|
8961
|
-
variant: "outlined",
|
|
8962
|
-
color: "secondary",
|
|
8963
|
-
size: "small",
|
|
8964
|
-
onClick: handleCancel,
|
|
8965
|
-
children: /* @__PURE__ */ jsx58(ITText, { children: "Cancelar" })
|
|
8966
|
-
}
|
|
8967
|
-
),
|
|
8968
|
-
/* @__PURE__ */ jsx58(
|
|
8969
|
-
ITButton,
|
|
8932
|
+
children: [
|
|
8933
|
+
/* @__PURE__ */ jsx58("input", { ...getInputProps() }),
|
|
8934
|
+
/* @__PURE__ */ jsx58("div", { className: `mb-3 p-3 rounded-full transition-colors duration-300 ${isDragActive ? "bg-primary-100" : "bg-secondary-100 group-hover:bg-primary-50"}`, children: /* @__PURE__ */ jsx58(
|
|
8935
|
+
"svg",
|
|
8970
8936
|
{
|
|
8971
|
-
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
|
|
8977
|
-
/* @__PURE__ */ jsx58(ITText, { children: "Confirmar" }),
|
|
8978
|
-
/* @__PURE__ */ jsx58("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
8979
|
-
] })
|
|
8937
|
+
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-secondary-400 group-hover:text-primary-500"}`,
|
|
8938
|
+
fill: "none",
|
|
8939
|
+
viewBox: "0 0 24 24",
|
|
8940
|
+
stroke: "currentColor",
|
|
8941
|
+
children: /* @__PURE__ */ jsx58("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" })
|
|
8980
8942
|
}
|
|
8981
|
-
)
|
|
8982
|
-
|
|
8943
|
+
) }),
|
|
8944
|
+
/* @__PURE__ */ jsx58("div", { className: "text-center space-y-1", children: /* @__PURE__ */ jsx58(ITText, { as: "p", className: `text-sm font-medium transition-colors duration-300 ${isDragActive ? "text-primary-700" : "text-secondary-700"}`, children: isDragActive ? "\xA1Suelta aqu\xED!" : "Haz clic o arrastra" }) })
|
|
8945
|
+
]
|
|
8946
|
+
}
|
|
8947
|
+
) : /* @__PURE__ */ jsxs44("div", { className: "w-full bg-white border border-secondary-200 rounded-xl shadow-sm overflow-hidden animate-fade-in", children: [
|
|
8948
|
+
/* @__PURE__ */ jsx58("div", { className: "flex items-center justify-between p-3 bg-secondary-50 border-b border-secondary-100", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
8949
|
+
/* @__PURE__ */ jsx58("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__ */ jsx58("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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__ */ jsx58("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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" }) }) }),
|
|
8950
|
+
/* @__PURE__ */ jsxs44("div", { className: "min-w-0", children: [
|
|
8951
|
+
/* @__PURE__ */ jsx58(ITText, { as: "p", className: "text-xs font-medium text-secondary-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
8952
|
+
/* @__PURE__ */ jsx58(ITText, { as: "p", className: "text-[10px] text-secondary-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
8953
|
+
] })
|
|
8954
|
+
] }) }),
|
|
8955
|
+
/* @__PURE__ */ jsx58("div", { className: clsx41("relative bg-secondary-100 flex items-center justify-center", !contentClassName ? "max-h-[200px] min-h-[100px] overflow-auto" : contentClassName), children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ jsx58(
|
|
8956
|
+
"img",
|
|
8957
|
+
{
|
|
8958
|
+
src: imagePreview,
|
|
8959
|
+
alt: "Vista previa",
|
|
8960
|
+
className: "w-full h-full object-contain max-h-[200px]"
|
|
8961
|
+
}
|
|
8962
|
+
) : /* @__PURE__ */ jsxs44("div", { className: "py-8 flex flex-col items-center text-secondary-400", children: [
|
|
8963
|
+
/* @__PURE__ */ jsx58("svg", { className: "w-10 h-10 mb-2 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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" }) }),
|
|
8964
|
+
/* @__PURE__ */ jsx58(ITText, { as: "span", className: "text-xs", children: "Sin vista previa" })
|
|
8965
|
+
] }) }),
|
|
8966
|
+
/* @__PURE__ */ jsx58("div", { className: "px-3 py-2 bg-white border-t border-secondary-100 flex justify-end gap-2", children: !isConfirmed ? /* @__PURE__ */ jsxs44(Fragment8, { children: [
|
|
8967
|
+
/* @__PURE__ */ jsx58(
|
|
8983
8968
|
ITButton,
|
|
8984
8969
|
{
|
|
8985
8970
|
type: "button",
|
|
8986
8971
|
variant: "outlined",
|
|
8987
|
-
color: "
|
|
8972
|
+
color: "secondary",
|
|
8988
8973
|
size: "small",
|
|
8989
|
-
onClick:
|
|
8990
|
-
children:
|
|
8991
|
-
/* @__PURE__ */ jsx58("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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" }) }),
|
|
8992
|
-
/* @__PURE__ */ jsx58(ITText, { children: "Eliminar" })
|
|
8993
|
-
]
|
|
8974
|
+
onClick: handleCancel,
|
|
8975
|
+
children: /* @__PURE__ */ jsx58(ITText, { children: "Cancelar" })
|
|
8994
8976
|
}
|
|
8995
|
-
)
|
|
8996
|
-
|
|
8997
|
-
|
|
8977
|
+
),
|
|
8978
|
+
/* @__PURE__ */ jsx58(
|
|
8979
|
+
ITButton,
|
|
8998
8980
|
{
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
8981
|
+
type: "button",
|
|
8982
|
+
variant: "filled",
|
|
8983
|
+
color: "primary",
|
|
8984
|
+
size: "small",
|
|
8985
|
+
onClick: handleConfirm,
|
|
8986
|
+
children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
|
|
8987
|
+
/* @__PURE__ */ jsx58(ITText, { children: "Confirmar" }),
|
|
8988
|
+
/* @__PURE__ */ jsx58("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
8989
|
+
] })
|
|
9004
8990
|
}
|
|
9005
|
-
)
|
|
9006
|
-
] })
|
|
8991
|
+
)
|
|
8992
|
+
] }) : /* @__PURE__ */ jsxs44(
|
|
8993
|
+
ITButton,
|
|
8994
|
+
{
|
|
8995
|
+
type: "button",
|
|
8996
|
+
variant: "outlined",
|
|
8997
|
+
color: "danger",
|
|
8998
|
+
size: "small",
|
|
8999
|
+
onClick: handleDelete,
|
|
9000
|
+
children: [
|
|
9001
|
+
/* @__PURE__ */ jsx58("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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" }) }),
|
|
9002
|
+
/* @__PURE__ */ jsx58(ITText, { children: "Eliminar" })
|
|
9003
|
+
]
|
|
9004
|
+
}
|
|
9005
|
+
) }),
|
|
9006
|
+
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */ jsx58("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsx58("div", { className: "w-full bg-secondary-200 rounded-full h-1.5", children: /* @__PURE__ */ jsx58(
|
|
9007
|
+
"div",
|
|
9008
|
+
{
|
|
9009
|
+
className: "bg-primary-600 h-1.5 rounded-full transition-all duration-1000 ease-out",
|
|
9010
|
+
style: {
|
|
9011
|
+
width: "100%",
|
|
9012
|
+
animation: "pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite"
|
|
9013
|
+
}
|
|
9014
|
+
}
|
|
9015
|
+
) }) })
|
|
9016
|
+
] }) });
|
|
9017
|
+
if (view === "button") {
|
|
9018
|
+
const hasFile = Boolean(selectedFile || imagePreview);
|
|
9019
|
+
return /* @__PURE__ */ jsxs44("div", { className: clsx41("inline-block", containerClassName), children: [
|
|
9020
|
+
/* @__PURE__ */ jsx58(
|
|
9021
|
+
ITButton,
|
|
9022
|
+
{
|
|
9023
|
+
type: "button",
|
|
9024
|
+
variant: "outlined",
|
|
9025
|
+
color: hasFile ? "primary" : "secondary",
|
|
9026
|
+
size: "small",
|
|
9027
|
+
onClick: () => setIsModalOpen(true),
|
|
9028
|
+
children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2 max-w-[220px]", children: [
|
|
9029
|
+
/* @__PURE__ */ jsx58("svg", { className: "w-4 h-4 flex-shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx58("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" }) }),
|
|
9030
|
+
/* @__PURE__ */ jsx58(ITText, { className: "truncate", children: selectedFile?.name || (hasFile ? "Archivo cargado" : buttonLabel) }),
|
|
9031
|
+
showStatusBadge && hasFile && /* @__PURE__ */ jsx58(StatusBadge, { status: uploadStatus })
|
|
9032
|
+
] })
|
|
9033
|
+
}
|
|
9034
|
+
),
|
|
9035
|
+
/* @__PURE__ */ jsx58(ITDialog, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), title: modalTitle ?? buttonLabel, children: /* @__PURE__ */ jsxs44("div", { className: "w-full transition-all duration-300", children: [
|
|
9036
|
+
headerRow,
|
|
9037
|
+
dropZoneOrPreview
|
|
9038
|
+
] }) })
|
|
9039
|
+
] });
|
|
9040
|
+
}
|
|
9041
|
+
return /* @__PURE__ */ jsxs44("div", { className: clsx41("w-full transition-all duration-300", containerClassName), children: [
|
|
9042
|
+
headerRow,
|
|
9043
|
+
dropZoneOrPreview
|
|
9007
9044
|
] });
|
|
9008
9045
|
};
|
|
9009
9046
|
var dropfile_default = ITDropfile;
|
|
@@ -9014,7 +9051,7 @@ import clsx42 from "clsx";
|
|
|
9014
9051
|
|
|
9015
9052
|
// src/components/topbar/topbar.tsx
|
|
9016
9053
|
import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
|
|
9017
|
-
import { useRef as
|
|
9054
|
+
import { useRef as useRef13, useState as useState27 } from "react";
|
|
9018
9055
|
import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9019
9056
|
function ITTopBar({
|
|
9020
9057
|
logo,
|
|
@@ -9026,7 +9063,7 @@ function ITTopBar({
|
|
|
9026
9063
|
onNavItemClick
|
|
9027
9064
|
}) {
|
|
9028
9065
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState27(false);
|
|
9029
|
-
const userMenuRef =
|
|
9066
|
+
const userMenuRef = useRef13(null);
|
|
9030
9067
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
9031
9068
|
return /* @__PURE__ */ jsx59(
|
|
9032
9069
|
"header",
|
|
@@ -9034,8 +9071,8 @@ function ITTopBar({
|
|
|
9034
9071
|
className: "sticky top-0 z-40 backdrop-blur-md transition-all duration-300",
|
|
9035
9072
|
style: {
|
|
9036
9073
|
backgroundColor: "var(--topbar-bg, rgba(255, 255, 255, 0.9))",
|
|
9037
|
-
borderBottom: "1px solid var(--topbar-border,
|
|
9038
|
-
boxShadow: "
|
|
9074
|
+
borderBottom: "1px solid var(--topbar-border, rgba(15, 23, 42, 0.06))",
|
|
9075
|
+
boxShadow: "var(--shadow-xs)"
|
|
9039
9076
|
},
|
|
9040
9077
|
children: /* @__PURE__ */ jsxs45("div", { className: "flex items-center justify-between h-[72px] px-6 lg:px-8", children: [
|
|
9041
9078
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-5", children: [
|
|
@@ -9064,7 +9101,7 @@ function ITTopBar({
|
|
|
9064
9101
|
}
|
|
9065
9102
|
)
|
|
9066
9103
|
] }),
|
|
9067
|
-
navItems && navItems.length > 0 && /* @__PURE__ */ jsx59("nav", { className: "hidden md:flex ml-8 space-x-1 border-l pl-8", style: { borderColor: "var(--topbar-border,
|
|
9104
|
+
navItems && navItems.length > 0 && /* @__PURE__ */ jsx59("nav", { className: "hidden md:flex ml-8 space-x-1 border-l pl-8", style: { borderColor: "var(--topbar-border, rgba(15, 23, 42, 0.06))" }, children: navItems.map((item) => /* @__PURE__ */ jsx59(
|
|
9068
9105
|
"button",
|
|
9069
9106
|
{
|
|
9070
9107
|
onClick: () => onNavItemClick?.(item.id),
|
|
@@ -9091,7 +9128,7 @@ function ITTopBar({
|
|
|
9091
9128
|
"button",
|
|
9092
9129
|
{
|
|
9093
9130
|
type: "button",
|
|
9094
|
-
className: "flex items-center gap-3 rounded-full pl-2 pr-4 py-1.5 transition-all duration-200 ease-[cubic-bezier(0.2,0,0,1)] border border-transparent hover:border-
|
|
9131
|
+
className: "flex items-center gap-3 rounded-full pl-2 pr-4 py-1.5 transition-all duration-200 ease-[cubic-bezier(0.2,0,0,1)] border border-transparent hover:border-secondary-200",
|
|
9095
9132
|
style: {
|
|
9096
9133
|
backgroundColor: isUserMenuOpen ? "var(--topbar-user-hover, #f1f5f9)" : "transparent"
|
|
9097
9134
|
},
|
|
@@ -9166,9 +9203,9 @@ function ITTopBar({
|
|
|
9166
9203
|
setIsUserMenuOpen(false);
|
|
9167
9204
|
},
|
|
9168
9205
|
className: "block w-full text-left px-3 py-2.5 rounded-xl text-[0.875rem] font-medium transition-colors duration-150",
|
|
9169
|
-
style: { color: isDestructive ? "
|
|
9206
|
+
style: { color: isDestructive ? "var(--color-danger-500)" : "var(--topbar-user-text, #334155)" },
|
|
9170
9207
|
onMouseEnter: (e) => {
|
|
9171
|
-
e.currentTarget.style.backgroundColor = isDestructive ? "
|
|
9208
|
+
e.currentTarget.style.backgroundColor = isDestructive ? "var(--color-danger-50)" : "var(--topbar-user-item-hover, #f8fafc)";
|
|
9172
9209
|
},
|
|
9173
9210
|
onMouseLeave: (e) => {
|
|
9174
9211
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -9321,7 +9358,7 @@ function ITLoader({
|
|
|
9321
9358
|
return /* @__PURE__ */ jsx61(
|
|
9322
9359
|
"div",
|
|
9323
9360
|
{
|
|
9324
|
-
className: `w-full ${size === "sm" ? "h-1" : size === "md" ? "h-1.5" : size === "lg" ? "h-2" : "h-2.5"} bg-
|
|
9361
|
+
className: `w-full ${size === "sm" ? "h-1" : size === "md" ? "h-1.5" : size === "lg" ? "h-2" : "h-2.5"} bg-secondary-200 rounded-full overflow-hidden ${className}`,
|
|
9325
9362
|
children: /* @__PURE__ */ jsx61(
|
|
9326
9363
|
"div",
|
|
9327
9364
|
{
|
|
@@ -9351,7 +9388,7 @@ function ITLoader({
|
|
|
9351
9388
|
|
|
9352
9389
|
// src/components/stepper/stepper.tsx
|
|
9353
9390
|
import clsx43 from "clsx";
|
|
9354
|
-
import { useEffect as useEffect18, useRef as
|
|
9391
|
+
import { useEffect as useEffect18, useRef as useRef14, useState as useState29 } from "react";
|
|
9355
9392
|
import { FaChevronLeft as FaChevronLeft4, FaChevronRight as FaChevronRight5, FaCheck as FaCheck4 } from "react-icons/fa";
|
|
9356
9393
|
import { jsx as jsx62, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9357
9394
|
function ITStepper({
|
|
@@ -9369,8 +9406,8 @@ function ITStepper({
|
|
|
9369
9406
|
color = "primary"
|
|
9370
9407
|
}) {
|
|
9371
9408
|
const [direction, setDirection] = useState29("next");
|
|
9372
|
-
const contentRef =
|
|
9373
|
-
const progressRef =
|
|
9409
|
+
const contentRef = useRef14(null);
|
|
9410
|
+
const progressRef = useRef14(null);
|
|
9374
9411
|
const isThemeColor = color in theme.colors;
|
|
9375
9412
|
const resolvedColor = isThemeColor ? theme.colors[color][500] : color;
|
|
9376
9413
|
useEffect18(() => {
|
|
@@ -9432,7 +9469,7 @@ function ITStepper({
|
|
|
9432
9469
|
/* @__PURE__ */ jsx62(
|
|
9433
9470
|
"div",
|
|
9434
9471
|
{
|
|
9435
|
-
className: "absolute left-6 right-6 top-5 h-1 bg-
|
|
9472
|
+
className: "absolute left-6 right-6 top-5 h-1 bg-secondary-200 rounded-full z-0",
|
|
9436
9473
|
"aria-hidden": true
|
|
9437
9474
|
}
|
|
9438
9475
|
),
|
|
@@ -9467,7 +9504,7 @@ function ITStepper({
|
|
|
9467
9504
|
hasIcon && "p-2",
|
|
9468
9505
|
isCompleted && "bg-slate-400 border-slate-400 text-white scale-100 shadow",
|
|
9469
9506
|
isActive && "text-white scale-110 shadow-lg",
|
|
9470
|
-
!isActive && !isCompleted && "bg-white border-
|
|
9507
|
+
!isActive && !isCompleted && "bg-white border-secondary-300 text-secondary-400"
|
|
9471
9508
|
),
|
|
9472
9509
|
style: isActive ? { backgroundColor: resolvedColor, borderColor: resolvedColor } : void 0,
|
|
9473
9510
|
children: renderStepContent(idx, isCompleted, isActive)
|
|
@@ -9479,7 +9516,7 @@ function ITStepper({
|
|
|
9479
9516
|
as: "span",
|
|
9480
9517
|
className: clsx43(
|
|
9481
9518
|
"mt-2 text-xs sm:text-sm font-medium transition-colors text-center",
|
|
9482
|
-
isCompleted ? "text-slate-400" : !isActive && "text-
|
|
9519
|
+
isCompleted ? "text-slate-400" : !isActive && "text-secondary-400"
|
|
9483
9520
|
),
|
|
9484
9521
|
style: isActive ? { color: resolvedColor } : void 0,
|
|
9485
9522
|
children: step.label
|
|
@@ -9500,7 +9537,7 @@ function ITStepper({
|
|
|
9500
9537
|
"aria-labelledby": `step-${currentStep}`,
|
|
9501
9538
|
className: clsx43(
|
|
9502
9539
|
stepClassName,
|
|
9503
|
-
"bg-white border border-
|
|
9540
|
+
"bg-white border border-secondary-100 rounded-2xl shadow-lg min-h-[280px] transition-transform duration-400 no-scrollbar p-6",
|
|
9504
9541
|
scrollableContent && "overflow-y-auto hide-scrollbar"
|
|
9505
9542
|
),
|
|
9506
9543
|
style: scrollableContent && maxContentHeight ? { maxHeight: maxContentHeight } : void 0,
|
|
@@ -9522,7 +9559,7 @@ function ITStepper({
|
|
|
9522
9559
|
}
|
|
9523
9560
|
),
|
|
9524
9561
|
/* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-3", children: [
|
|
9525
|
-
/* @__PURE__ */ jsxs47(ITText, { as: "div", className: "text-sm text-
|
|
9562
|
+
/* @__PURE__ */ jsxs47(ITText, { as: "div", className: "text-sm text-secondary-500 mr-2 hidden sm:block", children: [
|
|
9526
9563
|
"Paso ",
|
|
9527
9564
|
currentStep + 1,
|
|
9528
9565
|
" de ",
|