@axzydev/axzy_ui_system 1.3.4 → 1.3.6
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 +1 -1
- package/dist/index.cjs +754 -613
- 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 +148 -5
- package/dist/index.d.ts +148 -5
- package/dist/index.js +628 -488
- package/dist/index.js.map +1 -1
- package/package.json +9 -3
- package/src/App.tsx +6 -0
- package/src/components/atoms/input/input.props.ts +5 -0
- package/src/components/atoms/input/input.tsx +24 -17
- package/src/components/atoms/input-number/input-number.doc.mdx +74 -0
- package/src/components/atoms/input-number/input-number.props.ts +66 -0
- package/src/components/atoms/input-number/input-number.stories.tsx +111 -0
- package/src/components/atoms/input-number/input-number.tsx +86 -0
- package/src/components/molecules/table/table.doc.mdx +12 -1
- package/src/components/molecules/table/table.props.ts +17 -0
- package/src/components/molecules/table/table.stories.tsx +45 -0
- package/src/components/molecules/table/table.tsx +37 -8
- package/src/components/organisms/data-table/ITDataTable.doc.mdx +14 -1
- package/src/components/organisms/data-table/ITDataTable.stories.tsx +25 -0
- package/src/components/organisms/data-table/dataTable.tsx +37 -8
- package/src/components/organisms/sidebar/sidebar.doc.mdx +50 -12
- package/src/components/organisms/sidebar/sidebar.props.ts +28 -2
- package/src/components/organisms/sidebar/sidebar.stories.tsx +61 -1
- package/src/components/organisms/sidebar/sidebar.tsx +111 -57
- package/src/index.css +10 -0
- package/src/index.ts +6 -3
- package/src/sandbox/navigation.ts +2 -0
- package/src/showcases/DataShowcases.tsx +61 -0
- package/src/showcases/FormShowcases.tsx +287 -1
- package/src/showcases/StructureShowcases.tsx +34 -6
- package/src/utils/table.utils.ts +83 -0
package/dist/index.js
CHANGED
|
@@ -2557,11 +2557,13 @@ function ITInput({
|
|
|
2557
2557
|
max,
|
|
2558
2558
|
readOnly = false,
|
|
2559
2559
|
focusContent,
|
|
2560
|
-
size = "md"
|
|
2560
|
+
size = "md",
|
|
2561
|
+
decimals
|
|
2561
2562
|
}) {
|
|
2562
2563
|
const isCheckboxOrRadio = type === "checkbox" || type === "radio";
|
|
2563
2564
|
const isNumberType = type === "number";
|
|
2564
2565
|
const isTextArea = type === "textarea";
|
|
2566
|
+
const decimalPlaces = decimals ?? (currencyFormat ? 2 : 0);
|
|
2565
2567
|
const [displayValue, setDisplayValue] = useState11("");
|
|
2566
2568
|
const [isFocused, setIsFocused] = useState11(false);
|
|
2567
2569
|
const [hasSelectedAll, setHasSelectedAll] = useState11(false);
|
|
@@ -2614,13 +2616,16 @@ function ITInput({
|
|
|
2614
2616
|
}
|
|
2615
2617
|
if (currencyFormat) {
|
|
2616
2618
|
return num.toLocaleString("es-MX", {
|
|
2617
|
-
minimumFractionDigits:
|
|
2618
|
-
maximumFractionDigits:
|
|
2619
|
+
minimumFractionDigits: decimalPlaces,
|
|
2620
|
+
maximumFractionDigits: decimalPlaces
|
|
2619
2621
|
});
|
|
2620
2622
|
}
|
|
2623
|
+
if (decimalPlaces > 0) {
|
|
2624
|
+
return num.toFixed(decimalPlaces);
|
|
2625
|
+
}
|
|
2621
2626
|
return num.toString();
|
|
2622
2627
|
},
|
|
2623
|
-
[currencyFormat]
|
|
2628
|
+
[currencyFormat, decimalPlaces]
|
|
2624
2629
|
);
|
|
2625
2630
|
const unformatValue = useCallback5(
|
|
2626
2631
|
(val) => {
|
|
@@ -2666,11 +2671,11 @@ function ITInput({
|
|
|
2666
2671
|
if (allowedKeys.includes(key) || ctrlKey || metaKey) {
|
|
2667
2672
|
return;
|
|
2668
2673
|
}
|
|
2669
|
-
if (
|
|
2674
|
+
if (decimalPlaces === 0 && (key === "." || key === ",")) {
|
|
2670
2675
|
e.preventDefault();
|
|
2671
2676
|
return;
|
|
2672
2677
|
}
|
|
2673
|
-
if (
|
|
2678
|
+
if (decimalPlaces > 0 && (key === "." || key === ",") && currentValue.includes(".")) {
|
|
2674
2679
|
const dotIndex = currentValue.indexOf(".");
|
|
2675
2680
|
const replacingDot = selectionStart !== null && selectionEnd !== null && selectionStart <= dotIndex && dotIndex < selectionEnd;
|
|
2676
2681
|
if (!replacingDot) {
|
|
@@ -2678,7 +2683,7 @@ function ITInput({
|
|
|
2678
2683
|
return;
|
|
2679
2684
|
}
|
|
2680
2685
|
}
|
|
2681
|
-
const allowedCharsRegex =
|
|
2686
|
+
const allowedCharsRegex = decimalPlaces > 0 ? /^[0-9.,]$/ : /^[0-9]$/;
|
|
2682
2687
|
if (key !== "Unidentified" && !allowedCharsRegex.test(key)) {
|
|
2683
2688
|
e.preventDefault();
|
|
2684
2689
|
return;
|
|
@@ -2696,7 +2701,7 @@ function ITInput({
|
|
|
2696
2701
|
if (readOnly) return;
|
|
2697
2702
|
let rawValue = e.target.value;
|
|
2698
2703
|
let cleanedValue = "";
|
|
2699
|
-
if (
|
|
2704
|
+
if (decimalPlaces > 0) {
|
|
2700
2705
|
if (rawValue.includes(",") && rawValue.includes(".")) {
|
|
2701
2706
|
rawValue = rawValue.replace(/,/g, "");
|
|
2702
2707
|
} else if (rawValue.includes(",")) {
|
|
@@ -2705,8 +2710,8 @@ function ITInput({
|
|
|
2705
2710
|
cleanedValue = rawValue.replace(/[^0-9.]/g, "");
|
|
2706
2711
|
const parts = cleanedValue.split(".");
|
|
2707
2712
|
if (parts.length > 1) {
|
|
2708
|
-
const
|
|
2709
|
-
cleanedValue = parts[0] + "." +
|
|
2713
|
+
const decimalPart = parts.slice(1).join("").substring(0, decimalPlaces);
|
|
2714
|
+
cleanedValue = parts[0] + "." + decimalPart;
|
|
2710
2715
|
}
|
|
2711
2716
|
} else {
|
|
2712
2717
|
cleanedValue = rawValue.replace(/[^0-9]/g, "");
|
|
@@ -2717,7 +2722,7 @@ function ITInput({
|
|
|
2717
2722
|
if (!formatNumber) {
|
|
2718
2723
|
valueToSend = cleanedValue;
|
|
2719
2724
|
} else if (cleanedValue !== "") {
|
|
2720
|
-
if (
|
|
2725
|
+
if (decimalPlaces > 0) {
|
|
2721
2726
|
const numericValue = parseFloat(cleanedValue);
|
|
2722
2727
|
if (!isNaN(numericValue)) {
|
|
2723
2728
|
valueToSend = cleanedValue;
|
|
@@ -2794,7 +2799,7 @@ function ITInput({
|
|
|
2794
2799
|
let numericValue = void 0;
|
|
2795
2800
|
let valueToSend = void 0;
|
|
2796
2801
|
let cleanedValue = "";
|
|
2797
|
-
if (
|
|
2802
|
+
if (decimalPlaces > 0) {
|
|
2798
2803
|
cleanedValue = currentValue.replace(/[^0-9.]/g, "");
|
|
2799
2804
|
const parts = cleanedValue.split(".");
|
|
2800
2805
|
if (parts.length > 2) {
|
|
@@ -2804,7 +2809,7 @@ function ITInput({
|
|
|
2804
2809
|
} else {
|
|
2805
2810
|
cleanedValue = currentValue.replace(/[^0-9]/g, "");
|
|
2806
2811
|
}
|
|
2807
|
-
const parsed =
|
|
2812
|
+
const parsed = decimalPlaces > 0 ? parseFloat(cleanedValue) : parseInt(cleanedValue, 10);
|
|
2808
2813
|
if (!isNaN(parsed)) {
|
|
2809
2814
|
numericValue = parsed;
|
|
2810
2815
|
if (min !== void 0 && numericValue < min) {
|
|
@@ -2837,7 +2842,7 @@ function ITInput({
|
|
|
2837
2842
|
}
|
|
2838
2843
|
onBlur?.(e);
|
|
2839
2844
|
};
|
|
2840
|
-
const currentLength = isNumberType ? (
|
|
2845
|
+
const currentLength = isNumberType ? (decimalPlaces > 0 ? displayValue.replace(/[.,]/g, "") : displayValue).length : typeof value === "string" ? value.length : String(value ?? "").length;
|
|
2841
2846
|
return /* @__PURE__ */ jsxs13("div", { className: clsx15("w-full", containerClassName), children: [
|
|
2842
2847
|
isCheckboxOrRadio ? (
|
|
2843
2848
|
// CHECKBOX / RADIO LAYOUT (Row)
|
|
@@ -2934,7 +2939,7 @@ function ITInput({
|
|
|
2934
2939
|
name,
|
|
2935
2940
|
id: name,
|
|
2936
2941
|
type: isNumberType ? "text" : type === "password" ? showPassword ? "text" : "password" : type,
|
|
2937
|
-
inputMode: isNumberType ?
|
|
2942
|
+
inputMode: isNumberType ? decimalPlaces > 0 ? "decimal" : "numeric" : void 0,
|
|
2938
2943
|
placeholder,
|
|
2939
2944
|
value: isNumberType ? displayValue : String(value ?? ""),
|
|
2940
2945
|
onChange: isNumberType ? handleNumberChange : handleTextChange,
|
|
@@ -2946,7 +2951,7 @@ function ITInput({
|
|
|
2946
2951
|
},
|
|
2947
2952
|
onKeyDown: isNumberType ? handleKeyDown : onKeyDown,
|
|
2948
2953
|
readOnly,
|
|
2949
|
-
maxLength: isNumberType &&
|
|
2954
|
+
maxLength: isNumberType && decimalPlaces === 0 ? maxLength : void 0,
|
|
2950
2955
|
minLength,
|
|
2951
2956
|
min,
|
|
2952
2957
|
max,
|
|
@@ -3601,7 +3606,7 @@ function useVirtualRows({
|
|
|
3601
3606
|
|
|
3602
3607
|
// src/components/organisms/data-table/dataTable.tsx
|
|
3603
3608
|
import clsx23 from "clsx";
|
|
3604
|
-
import { useState as useState19, useEffect as useEffect9, useCallback as useCallback7, useRef as useRef13 } from "react";
|
|
3609
|
+
import React6, { useState as useState19, useEffect as useEffect9, useCallback as useCallback7, useRef as useRef13 } from "react";
|
|
3605
3610
|
import { FaCheck as FaCheck2, FaSpinner, FaTimes as FaTimes5, FaTable, FaThLarge } from "react-icons/fa";
|
|
3606
3611
|
import { MdOutlineSwapVert } from "react-icons/md";
|
|
3607
3612
|
|
|
@@ -4396,6 +4401,32 @@ function isInteractiveTarget(target, boundary = null) {
|
|
|
4396
4401
|
if (boundary instanceof Node && interactive === boundary) return false;
|
|
4397
4402
|
return true;
|
|
4398
4403
|
}
|
|
4404
|
+
function pinnedColumnWidth(col) {
|
|
4405
|
+
if (typeof col.width === "number") return col.width;
|
|
4406
|
+
if (typeof col.width === "string" && /^\d+(\.\d+)?px$/.test(col.width.trim())) {
|
|
4407
|
+
return parseFloat(col.width);
|
|
4408
|
+
}
|
|
4409
|
+
return col.minWidth ?? 0;
|
|
4410
|
+
}
|
|
4411
|
+
function getPinnedColumnMeta(columns) {
|
|
4412
|
+
const meta = {};
|
|
4413
|
+
let leftOffset = 0;
|
|
4414
|
+
for (const col of columns) {
|
|
4415
|
+
if (col.pinned === "left") {
|
|
4416
|
+
meta[col.key] = { side: "left", offset: leftOffset };
|
|
4417
|
+
leftOffset += pinnedColumnWidth(col);
|
|
4418
|
+
}
|
|
4419
|
+
}
|
|
4420
|
+
let rightOffset = 0;
|
|
4421
|
+
for (let i = columns.length - 1; i >= 0; i--) {
|
|
4422
|
+
const col = columns[i];
|
|
4423
|
+
if (col.pinned === "right") {
|
|
4424
|
+
meta[col.key] = { side: "right", offset: rightOffset };
|
|
4425
|
+
rightOffset += pinnedColumnWidth(col);
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
return meta;
|
|
4429
|
+
}
|
|
4399
4430
|
|
|
4400
4431
|
// src/components/organisms/data-table/dataTable.tsx
|
|
4401
4432
|
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
@@ -4446,6 +4477,7 @@ function ITDataTable({
|
|
|
4446
4477
|
const isStickyHeader = stickyHeader && isTableVirtual;
|
|
4447
4478
|
const resolvedRowHeight = rowHeight ?? getRowHeight(size, density);
|
|
4448
4479
|
const columnCount = columns.length;
|
|
4480
|
+
const pinnedMeta = React6.useMemo(() => getPinnedColumnMeta(columns), [columns]);
|
|
4449
4481
|
const scrollOuterClass = isTableVirtual ? "relative min-h-[200px]" : "overflow-x-auto relative min-h-[200px]";
|
|
4450
4482
|
const {
|
|
4451
4483
|
currentPage,
|
|
@@ -4725,38 +4757,46 @@ function ITDataTable({
|
|
|
4725
4757
|
{
|
|
4726
4758
|
className: clsx23(tableHeaderRow, "dark:text-slate-200"),
|
|
4727
4759
|
"aria-rowindex": isTableVirtual ? 1 : void 0,
|
|
4728
|
-
children: columns.map((col) =>
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
col.
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
+
children: columns.map((col) => {
|
|
4761
|
+
const pin = pinnedMeta[col.key];
|
|
4762
|
+
const isPinned = pin != null;
|
|
4763
|
+
return /* @__PURE__ */ jsx23(
|
|
4764
|
+
"th",
|
|
4765
|
+
{
|
|
4766
|
+
scope: "col",
|
|
4767
|
+
className: clsx23(
|
|
4768
|
+
tableHeaderCell(col.className, density),
|
|
4769
|
+
col.align && tableAlignClasses[col.align],
|
|
4770
|
+
isPinned && "sticky",
|
|
4771
|
+
isStickyHeader && "sticky top-0 bg-secondary-50",
|
|
4772
|
+
isPinned ? "z-[15]" : isStickyHeader && "z-10",
|
|
4773
|
+
isPinned && (col.pinned === "left" ? "it-table-pinned-left" : "it-table-pinned-right")
|
|
4774
|
+
),
|
|
4775
|
+
style: col.minWidth != null || isStickyHeader || isPinned ? {
|
|
4776
|
+
...col.minWidth != null ? { minWidth: `${col.minWidth}px` } : {},
|
|
4777
|
+
...isStickyHeader || isPinned ? { backgroundColor: "var(--color-table-headerBg, #f8fafc)" } : {},
|
|
4778
|
+
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
4779
|
+
} : void 0,
|
|
4780
|
+
children: /* @__PURE__ */ jsxs20("div", { className: isFixed ? "flex flex-col gap-3" : "flex flex-col gap-3 min-w-[150px]", children: [
|
|
4781
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between gap-2", children: [
|
|
4782
|
+
/* @__PURE__ */ jsx23(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
|
|
4783
|
+
col.sortable && col.type !== "actions" && /* @__PURE__ */ jsx23(
|
|
4784
|
+
"button",
|
|
4785
|
+
{
|
|
4786
|
+
onClick: () => handleSort(col.key),
|
|
4787
|
+
disabled: isLoading,
|
|
4788
|
+
className: `p-1 rounded-md transition-colors ${sortConfig?.key === col.key ? "bg-secondary-200 text-secondary-900" : "hover:bg-secondary-200 text-secondary-400 hover:text-secondary-700"} disabled:opacity-50`,
|
|
4789
|
+
title: `Ordenar por ${col.label}`,
|
|
4790
|
+
children: /* @__PURE__ */ jsx23(MdOutlineSwapVert, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
4791
|
+
}
|
|
4792
|
+
)
|
|
4793
|
+
] }),
|
|
4794
|
+
/* @__PURE__ */ jsx23("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
|
|
4795
|
+
] })
|
|
4796
|
+
},
|
|
4797
|
+
col.key
|
|
4798
|
+
);
|
|
4799
|
+
})
|
|
4760
4800
|
}
|
|
4761
4801
|
) }),
|
|
4762
4802
|
/* @__PURE__ */ jsx23("tbody", { className: clsx23(tableBody, "dark:divide-slate-700/30"), children: data.length > 0 ? /* @__PURE__ */ jsxs20(Fragment4, { children: [
|
|
@@ -4778,14 +4818,22 @@ function ITDataTable({
|
|
|
4778
4818
|
children: columns.map((col) => {
|
|
4779
4819
|
const rawValue = getNestedValue2(row, col.key);
|
|
4780
4820
|
const truncateTitle = col.truncate && (typeof rawValue === "string" || typeof rawValue === "number") ? String(rawValue) : void 0;
|
|
4821
|
+
const pin = pinnedMeta[col.key];
|
|
4822
|
+
const isPinned = pin != null;
|
|
4781
4823
|
return /* @__PURE__ */ jsx23(
|
|
4782
4824
|
"td",
|
|
4783
4825
|
{
|
|
4784
4826
|
className: clsx23(
|
|
4785
4827
|
tableCell(col.className, density),
|
|
4786
|
-
col.align && tableAlignClasses[col.align]
|
|
4828
|
+
col.align && tableAlignClasses[col.align],
|
|
4829
|
+
isPinned && "sticky bg-[var(--color-table-rowBg,white)] group-hover:bg-[var(--color-table-rowHover,var(--color-secondary-50))]",
|
|
4830
|
+
isPinned && (col.pinned === "left" ? "it-table-pinned-left" : "it-table-pinned-right"),
|
|
4831
|
+
isPinned && "z-[1]"
|
|
4787
4832
|
),
|
|
4788
|
-
style: col.minWidth != null
|
|
4833
|
+
style: col.minWidth != null || isPinned ? {
|
|
4834
|
+
...col.minWidth != null ? { minWidth: `${col.minWidth}px` } : {},
|
|
4835
|
+
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
4836
|
+
} : void 0,
|
|
4789
4837
|
title: truncateTitle,
|
|
4790
4838
|
children: col.type === "actions" ? /* @__PURE__ */ jsx23("div", { className: tableActionsCell, children: renderCellContent(col, row) }) : /* @__PURE__ */ jsx23("div", { className: clsx23(tableCellText, col.truncate && "truncate"), children: renderCellContent(col, row) })
|
|
4791
4839
|
},
|
|
@@ -6155,10 +6203,52 @@ var ITImage = ({
|
|
|
6155
6203
|
};
|
|
6156
6204
|
var image_default = ITImage;
|
|
6157
6205
|
|
|
6206
|
+
// src/components/atoms/input-number/input-number.tsx
|
|
6207
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6208
|
+
function parseNumber(raw) {
|
|
6209
|
+
if (raw === void 0 || raw === null) return void 0;
|
|
6210
|
+
if (typeof raw === "number") return Number.isFinite(raw) ? raw : void 0;
|
|
6211
|
+
const cleaned = String(raw).replace(/,/g, "").trim();
|
|
6212
|
+
if (cleaned === "" || cleaned === "-" || cleaned === ".") return void 0;
|
|
6213
|
+
const parsed = Number(cleaned);
|
|
6214
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
6215
|
+
}
|
|
6216
|
+
function ITInputNumber({
|
|
6217
|
+
value,
|
|
6218
|
+
onChange,
|
|
6219
|
+
onBlur,
|
|
6220
|
+
decimals = 2,
|
|
6221
|
+
prefix,
|
|
6222
|
+
iconLeft,
|
|
6223
|
+
...rest
|
|
6224
|
+
}) {
|
|
6225
|
+
const resolvedIconLeft = iconLeft ?? (prefix ? /* @__PURE__ */ jsx36(ITText, { as: "span", className: "text-secondary-500 text-xs font-semibold", children: prefix }) : void 0);
|
|
6226
|
+
const handleChange = (event) => {
|
|
6227
|
+
onChange(parseNumber(event.target.value), event);
|
|
6228
|
+
};
|
|
6229
|
+
return /* @__PURE__ */ jsx36(
|
|
6230
|
+
ITInput,
|
|
6231
|
+
{
|
|
6232
|
+
...rest,
|
|
6233
|
+
type: "number",
|
|
6234
|
+
currencyFormat: true,
|
|
6235
|
+
formatNumber: true,
|
|
6236
|
+
decimals,
|
|
6237
|
+
iconLeft: resolvedIconLeft,
|
|
6238
|
+
value: value ?? "",
|
|
6239
|
+
onChange: handleChange,
|
|
6240
|
+
onBlur: (event) => {
|
|
6241
|
+
const input = event.target;
|
|
6242
|
+
onBlur?.(parseNumber(input.value), event);
|
|
6243
|
+
}
|
|
6244
|
+
}
|
|
6245
|
+
);
|
|
6246
|
+
}
|
|
6247
|
+
|
|
6158
6248
|
// src/components/organisms/navbar/navbar.tsx
|
|
6159
6249
|
import { useRef as useRef18, useState as useState24 } from "react";
|
|
6160
6250
|
import { FaChevronDown as FaChevronDown3, FaChevronRight as FaChevronRight4, FaUserCircle } from "react-icons/fa";
|
|
6161
|
-
import { jsx as
|
|
6251
|
+
import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6162
6252
|
function ITNavbar({
|
|
6163
6253
|
logo,
|
|
6164
6254
|
logoText,
|
|
@@ -6197,28 +6287,28 @@ function ITNavbar({
|
|
|
6197
6287
|
const shouldUseLegacy = !navigationItems.length && (navItems || sidebarItems);
|
|
6198
6288
|
if (shouldUseLegacy) {
|
|
6199
6289
|
return /* @__PURE__ */ jsxs28("div", { className: "flex flex-col h-screen", children: [
|
|
6200
|
-
/* @__PURE__ */
|
|
6290
|
+
/* @__PURE__ */ jsx37("nav", { className: "bg-white border-b border-secondary-200", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between mx-auto p-4", children: [
|
|
6201
6291
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
|
|
6202
|
-
logo && /* @__PURE__ */
|
|
6203
|
-
logoText && /* @__PURE__ */
|
|
6292
|
+
logo && /* @__PURE__ */ jsx37("div", { className: "h-8", children: logo }),
|
|
6293
|
+
logoText && /* @__PURE__ */ jsx37(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-secondary-900", children: logoText })
|
|
6204
6294
|
] }),
|
|
6205
|
-
/* @__PURE__ */
|
|
6206
|
-
/* @__PURE__ */
|
|
6295
|
+
/* @__PURE__ */ jsx37("div", { className: "flex items-center justify-end w-full md:w-auto md:order-2", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center space-x-4 md:order-2", children: [
|
|
6296
|
+
/* @__PURE__ */ jsx37("ul", { className: "hidden md:flex space-x-4", children: navItems }),
|
|
6207
6297
|
userMenu && /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
6208
|
-
/* @__PURE__ */
|
|
6298
|
+
/* @__PURE__ */ jsx37(
|
|
6209
6299
|
"button",
|
|
6210
6300
|
{
|
|
6211
6301
|
type: "button",
|
|
6212
6302
|
className: "flex text-sm bg-secondary-200 rounded-full md:me-0 focus:ring-4 focus:ring-secondary-300",
|
|
6213
6303
|
onClick: toggleUserMenu,
|
|
6214
|
-
children: userMenu.userImage ? /* @__PURE__ */
|
|
6304
|
+
children: userMenu.userImage ? /* @__PURE__ */ jsx37(
|
|
6215
6305
|
"img",
|
|
6216
6306
|
{
|
|
6217
6307
|
className: "w-8 h-8 rounded-full",
|
|
6218
6308
|
src: userMenu.userImage,
|
|
6219
6309
|
alt: "user photo"
|
|
6220
6310
|
}
|
|
6221
|
-
) : /* @__PURE__ */
|
|
6311
|
+
) : /* @__PURE__ */ jsx37(FaUserCircle, { className: "w-8 h-8 text-secondary-500" })
|
|
6222
6312
|
}
|
|
6223
6313
|
),
|
|
6224
6314
|
isUserMenuOpen && /* @__PURE__ */ jsxs28(
|
|
@@ -6228,10 +6318,10 @@ function ITNavbar({
|
|
|
6228
6318
|
className: "z-[70] absolute right-0 mt-2 text-base list-none bg-white divide-y divide-secondary-100 rounded-lg shadow-sm",
|
|
6229
6319
|
children: [
|
|
6230
6320
|
/* @__PURE__ */ jsxs28("div", { className: "px-4 py-3", children: [
|
|
6231
|
-
/* @__PURE__ */
|
|
6232
|
-
/* @__PURE__ */
|
|
6321
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm text-secondary-900", children: userMenu.userName }),
|
|
6322
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm text-secondary-500 truncate", children: userMenu.userEmail })
|
|
6233
6323
|
] }),
|
|
6234
|
-
/* @__PURE__ */
|
|
6324
|
+
/* @__PURE__ */ jsx37("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
6235
6325
|
"button",
|
|
6236
6326
|
{
|
|
6237
6327
|
onClick: () => {
|
|
@@ -6239,7 +6329,7 @@ function ITNavbar({
|
|
|
6239
6329
|
setIsUserMenuOpen(false);
|
|
6240
6330
|
},
|
|
6241
6331
|
className: "block px-4 py-2 text-sm text-secondary-700 hover:bg-secondary-100 w-full text-left",
|
|
6242
|
-
children: /* @__PURE__ */
|
|
6332
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: item.label })
|
|
6243
6333
|
}
|
|
6244
6334
|
) }, index)) })
|
|
6245
6335
|
]
|
|
@@ -6249,8 +6339,8 @@ function ITNavbar({
|
|
|
6249
6339
|
] }) })
|
|
6250
6340
|
] }) }),
|
|
6251
6341
|
/* @__PURE__ */ jsxs28("div", { className: "flex-1 flex overflow-hidden relative", children: [
|
|
6252
|
-
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */
|
|
6253
|
-
/* @__PURE__ */
|
|
6342
|
+
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */ jsx37("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__ */ jsx37("div", { className: "h-full overflow-y-auto py-4 px-3", children: /* @__PURE__ */ jsx37("ul", { className: "space-y-2 font-medium", children: sidebarItems }) }) }),
|
|
6343
|
+
/* @__PURE__ */ jsx37("main", { className: "flex-1 bg-secondary-100 overflow-y-auto", children })
|
|
6254
6344
|
] })
|
|
6255
6345
|
] });
|
|
6256
6346
|
}
|
|
@@ -6264,10 +6354,10 @@ function ITNavbar({
|
|
|
6264
6354
|
style: { backgroundColor: sidebar.backgroundColor, borderRight: `1px solid ${sidebar.borderColor}` },
|
|
6265
6355
|
children: [
|
|
6266
6356
|
/* @__PURE__ */ jsxs28("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: `1px solid ${sidebar.borderColor}` }, children: [
|
|
6267
|
-
logo && /* @__PURE__ */
|
|
6268
|
-
logoText && /* @__PURE__ */
|
|
6357
|
+
logo && /* @__PURE__ */ jsx37("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
|
|
6358
|
+
logoText && /* @__PURE__ */ jsx37(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: sidebar.active.color }, children: logoText })
|
|
6269
6359
|
] }),
|
|
6270
|
-
/* @__PURE__ */
|
|
6360
|
+
/* @__PURE__ */ jsx37("nav", { className: "flex-1 px-4 py-6 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ jsx37("ul", { className: "flex flex-col gap-1.5", children: navigationItems.map((item) => /* @__PURE__ */ jsxs28("li", { children: [
|
|
6271
6361
|
/* @__PURE__ */ jsxs28(
|
|
6272
6362
|
"div",
|
|
6273
6363
|
{
|
|
@@ -6292,16 +6382,16 @@ function ITNavbar({
|
|
|
6292
6382
|
},
|
|
6293
6383
|
children: [
|
|
6294
6384
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-3", children: [
|
|
6295
|
-
item.icon && /* @__PURE__ */
|
|
6385
|
+
item.icon && /* @__PURE__ */ jsx37("div", { className: "text-xl transition-colors", style: {
|
|
6296
6386
|
color: item.isActive ? sidebar.active.iconColor : sidebar.icon.color
|
|
6297
6387
|
}, children: item.icon }),
|
|
6298
|
-
/* @__PURE__ */
|
|
6388
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
|
|
6299
6389
|
] }),
|
|
6300
|
-
item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
6390
|
+
item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx37("div", { className: "transition-transform", style: { color: sidebar.icon.color }, children: expandedItems.has(item.id) ? /* @__PURE__ */ jsx37(FaChevronDown3, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx37(FaChevronRight4, { className: "w-3 h-3" }) })
|
|
6301
6391
|
]
|
|
6302
6392
|
}
|
|
6303
6393
|
),
|
|
6304
|
-
item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */
|
|
6394
|
+
item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ jsx37("ul", { className: "mt-1 ml-4 pl-4 space-y-1", style: { borderLeft: `1px solid ${sidebar.borderColor}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
6305
6395
|
"button",
|
|
6306
6396
|
{
|
|
6307
6397
|
onClick: subitem.action,
|
|
@@ -6320,11 +6410,11 @@ function ITNavbar({
|
|
|
6320
6410
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
6321
6411
|
}
|
|
6322
6412
|
},
|
|
6323
|
-
children: /* @__PURE__ */
|
|
6413
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: subitem.label })
|
|
6324
6414
|
}
|
|
6325
6415
|
) }, subitem.id)) })
|
|
6326
6416
|
] }, item.id)) }) }),
|
|
6327
|
-
userMenu && /* @__PURE__ */
|
|
6417
|
+
userMenu && /* @__PURE__ */ jsx37("div", { className: "p-4", style: { borderTop: `1px solid ${sidebar.borderColor}` }, children: /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
6328
6418
|
/* @__PURE__ */ jsxs28(
|
|
6329
6419
|
"button",
|
|
6330
6420
|
{
|
|
@@ -6341,7 +6431,7 @@ function ITNavbar({
|
|
|
6341
6431
|
},
|
|
6342
6432
|
onClick: toggleUserMenu,
|
|
6343
6433
|
children: [
|
|
6344
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
6434
|
+
userMenu.userImage ? /* @__PURE__ */ jsx37(
|
|
6345
6435
|
"img",
|
|
6346
6436
|
{
|
|
6347
6437
|
className: "w-10 h-10 rounded-full border-2 transition-colors",
|
|
@@ -6349,19 +6439,19 @@ function ITNavbar({
|
|
|
6349
6439
|
alt: "user photo",
|
|
6350
6440
|
style: { borderColor: sidebar.borderColor }
|
|
6351
6441
|
}
|
|
6352
|
-
) : /* @__PURE__ */
|
|
6442
|
+
) : /* @__PURE__ */ jsx37(
|
|
6353
6443
|
"div",
|
|
6354
6444
|
{
|
|
6355
6445
|
className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors",
|
|
6356
6446
|
style: { backgroundColor: sidebar.hover.backgroundColor, color: sidebar.icon.color },
|
|
6357
|
-
children: /* @__PURE__ */
|
|
6447
|
+
children: /* @__PURE__ */ jsx37(FaUserCircle, { className: "w-6 h-6" })
|
|
6358
6448
|
}
|
|
6359
6449
|
),
|
|
6360
6450
|
/* @__PURE__ */ jsxs28("div", { className: "flex-1 text-left overflow-hidden", children: [
|
|
6361
|
-
/* @__PURE__ */
|
|
6362
|
-
/* @__PURE__ */
|
|
6451
|
+
/* @__PURE__ */ jsx37(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: sidebar.active.color }, children: userMenu.userName }),
|
|
6452
|
+
/* @__PURE__ */ jsx37(ITText, { as: "div", className: "text-xs truncate", style: { color: sidebar.label.color }, children: userMenu.userEmail })
|
|
6363
6453
|
] }),
|
|
6364
|
-
/* @__PURE__ */
|
|
6454
|
+
/* @__PURE__ */ jsx37(FaChevronRight4, { className: "w-3 h-3", style: { color: sidebar.icon.color } })
|
|
6365
6455
|
]
|
|
6366
6456
|
}
|
|
6367
6457
|
),
|
|
@@ -6373,10 +6463,10 @@ function ITNavbar({
|
|
|
6373
6463
|
style: { backgroundColor: topbar.userMenu.dropdown.backgroundColor, border: `1px solid ${topbar.userMenu.dropdown.borderColor}` },
|
|
6374
6464
|
children: [
|
|
6375
6465
|
/* @__PURE__ */ jsxs28("div", { className: "px-4 py-3", style: { backgroundColor: topbar.userMenu.backgroundColor, borderBottom: `1px solid ${topbar.userMenu.dropdown.borderColor}` }, children: [
|
|
6376
|
-
/* @__PURE__ */
|
|
6377
|
-
/* @__PURE__ */
|
|
6466
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: topbar.userMenu.textColor }, children: userMenu.userName }),
|
|
6467
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-xs truncate", style: { color: topbar.userMenu.subtitleColor }, children: userMenu.userEmail })
|
|
6378
6468
|
] }),
|
|
6379
|
-
/* @__PURE__ */
|
|
6469
|
+
/* @__PURE__ */ jsx37("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
6380
6470
|
"button",
|
|
6381
6471
|
{
|
|
6382
6472
|
onClick: () => {
|
|
@@ -6391,7 +6481,7 @@ function ITNavbar({
|
|
|
6391
6481
|
onMouseLeave: (e) => {
|
|
6392
6482
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
6393
6483
|
},
|
|
6394
|
-
children: /* @__PURE__ */
|
|
6484
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: item.label })
|
|
6395
6485
|
}
|
|
6396
6486
|
) }, index)) })
|
|
6397
6487
|
]
|
|
@@ -6401,7 +6491,7 @@ function ITNavbar({
|
|
|
6401
6491
|
]
|
|
6402
6492
|
}
|
|
6403
6493
|
),
|
|
6404
|
-
/* @__PURE__ */
|
|
6494
|
+
/* @__PURE__ */ jsx37("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: theme.layout.backgroundColor }, children })
|
|
6405
6495
|
] });
|
|
6406
6496
|
}
|
|
6407
6497
|
|
|
@@ -6410,7 +6500,7 @@ import clsx33 from "clsx";
|
|
|
6410
6500
|
|
|
6411
6501
|
// src/components/organisms/page-header/page-header.tsx
|
|
6412
6502
|
import { FaChevronLeft as FaChevronLeft3 } from "react-icons/fa";
|
|
6413
|
-
import { jsx as
|
|
6503
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6414
6504
|
function ITPageHeader({
|
|
6415
6505
|
title,
|
|
6416
6506
|
description,
|
|
@@ -6425,22 +6515,22 @@ function ITPageHeader({
|
|
|
6425
6515
|
return /* @__PURE__ */ jsxs29("div", { className: `${className} space-y-3`, children: [
|
|
6426
6516
|
showTopRow && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between gap-4", children: [
|
|
6427
6517
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
6428
|
-
backAction && /* @__PURE__ */
|
|
6518
|
+
backAction && /* @__PURE__ */ jsx38(
|
|
6429
6519
|
"button",
|
|
6430
6520
|
{
|
|
6431
6521
|
onClick: backAction,
|
|
6432
6522
|
className: "flex items-center justify-center w-9 h-9 rounded-full border border-slate-200 dark:border-slate-700 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50 dark:hover:bg-slate-800/60 transition-all duration-200 flex-shrink-0",
|
|
6433
6523
|
"aria-label": "Volver",
|
|
6434
|
-
children: /* @__PURE__ */
|
|
6524
|
+
children: /* @__PURE__ */ jsx38(FaChevronLeft3, { size: 14 })
|
|
6435
6525
|
}
|
|
6436
6526
|
),
|
|
6437
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */
|
|
6527
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx38(ITBreadcrumbs, { items: breadcrumbs })
|
|
6438
6528
|
] }),
|
|
6439
|
-
actions && /* @__PURE__ */
|
|
6529
|
+
actions && /* @__PURE__ */ jsx38("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6440
6530
|
] }),
|
|
6441
6531
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-start justify-between gap-6", children: [
|
|
6442
6532
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-start gap-4 min-w-0", children: [
|
|
6443
|
-
icon && /* @__PURE__ */
|
|
6533
|
+
icon && /* @__PURE__ */ jsx38(
|
|
6444
6534
|
"div",
|
|
6445
6535
|
{
|
|
6446
6536
|
className: "flex items-center justify-center w-12 h-12 rounded-full border border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50 text-slate-600 dark:text-slate-300 flex-shrink-0 transition-all duration-200 hover:border-slate-300 dark:hover:border-slate-500 hover:shadow-sm",
|
|
@@ -6449,7 +6539,7 @@ function ITPageHeader({
|
|
|
6449
6539
|
}
|
|
6450
6540
|
),
|
|
6451
6541
|
/* @__PURE__ */ jsxs29("div", { className: "min-w-0", children: [
|
|
6452
|
-
/* @__PURE__ */
|
|
6542
|
+
/* @__PURE__ */ jsx38(
|
|
6453
6543
|
ITText,
|
|
6454
6544
|
{
|
|
6455
6545
|
as: "h1",
|
|
@@ -6457,7 +6547,7 @@ function ITPageHeader({
|
|
|
6457
6547
|
children: title
|
|
6458
6548
|
}
|
|
6459
6549
|
),
|
|
6460
|
-
description && /* @__PURE__ */
|
|
6550
|
+
description && /* @__PURE__ */ jsx38(
|
|
6461
6551
|
ITText,
|
|
6462
6552
|
{
|
|
6463
6553
|
as: "p",
|
|
@@ -6467,14 +6557,14 @@ function ITPageHeader({
|
|
|
6467
6557
|
)
|
|
6468
6558
|
] })
|
|
6469
6559
|
] }),
|
|
6470
|
-
!showTopRow && actions && /* @__PURE__ */
|
|
6560
|
+
!showTopRow && actions && /* @__PURE__ */ jsx38("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6471
6561
|
] })
|
|
6472
6562
|
] });
|
|
6473
6563
|
}
|
|
6474
6564
|
|
|
6475
6565
|
// src/components/atoms/skeleton/skeleton.tsx
|
|
6476
6566
|
import clsx31 from "clsx";
|
|
6477
|
-
import { Fragment as Fragment7, jsx as
|
|
6567
|
+
import { Fragment as Fragment7, jsx as jsx39 } from "react/jsx-runtime";
|
|
6478
6568
|
var variantClasses = {
|
|
6479
6569
|
text: "rounded-md h-4 w-full",
|
|
6480
6570
|
circular: "rounded-full",
|
|
@@ -6494,7 +6584,7 @@ function ITSkeleton({
|
|
|
6494
6584
|
...style
|
|
6495
6585
|
};
|
|
6496
6586
|
const items = Array.from({ length: count }, (_, i) => i);
|
|
6497
|
-
return /* @__PURE__ */
|
|
6587
|
+
return /* @__PURE__ */ jsx39(Fragment7, { children: items.map((i) => /* @__PURE__ */ jsx39(
|
|
6498
6588
|
"div",
|
|
6499
6589
|
{
|
|
6500
6590
|
className: clsx31(
|
|
@@ -6515,7 +6605,7 @@ function ITSkeleton({
|
|
|
6515
6605
|
// src/components/atoms/stack/stack.tsx
|
|
6516
6606
|
import clsx32 from "clsx";
|
|
6517
6607
|
import { Children, cloneElement, isValidElement, Fragment as Fragment8 } from "react";
|
|
6518
|
-
import { jsx as
|
|
6608
|
+
import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6519
6609
|
var directionMap2 = {
|
|
6520
6610
|
row: "flex-row",
|
|
6521
6611
|
column: "flex-col",
|
|
@@ -6560,7 +6650,7 @@ function ITStack({
|
|
|
6560
6650
|
gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
|
|
6561
6651
|
...style
|
|
6562
6652
|
};
|
|
6563
|
-
return /* @__PURE__ */
|
|
6653
|
+
return /* @__PURE__ */ jsx40(
|
|
6564
6654
|
Component,
|
|
6565
6655
|
{
|
|
6566
6656
|
className: clsx32(
|
|
@@ -6581,11 +6671,11 @@ function ITStack({
|
|
|
6581
6671
|
}
|
|
6582
6672
|
|
|
6583
6673
|
// src/components/templates/page/page.tsx
|
|
6584
|
-
import { jsx as
|
|
6674
|
+
import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6585
6675
|
var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction || props.icon);
|
|
6586
6676
|
var renderHeader = (props) => {
|
|
6587
6677
|
if (!hasHeader(props)) return null;
|
|
6588
|
-
return /* @__PURE__ */
|
|
6678
|
+
return /* @__PURE__ */ jsx41(
|
|
6589
6679
|
ITPageHeader,
|
|
6590
6680
|
{
|
|
6591
6681
|
title: props.title || "",
|
|
@@ -6627,21 +6717,21 @@ function ITPage(props) {
|
|
|
6627
6717
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6628
6718
|
renderHeader(props),
|
|
6629
6719
|
/* @__PURE__ */ jsxs31(ITStack, { spacing: 6, children: [
|
|
6630
|
-
/* @__PURE__ */
|
|
6631
|
-
/* @__PURE__ */
|
|
6632
|
-
/* @__PURE__ */
|
|
6720
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 40, width: "40%", className: "rounded-lg" }),
|
|
6721
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" }),
|
|
6722
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" })
|
|
6633
6723
|
] })
|
|
6634
6724
|
] });
|
|
6635
6725
|
}
|
|
6636
6726
|
if (error) {
|
|
6637
6727
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6638
6728
|
renderHeader(props),
|
|
6639
|
-
/* @__PURE__ */
|
|
6729
|
+
/* @__PURE__ */ jsx41(
|
|
6640
6730
|
ITEmptyState,
|
|
6641
6731
|
{
|
|
6642
6732
|
title: errorTitle || "Error",
|
|
6643
6733
|
description: error,
|
|
6644
|
-
action: onRetry ? /* @__PURE__ */
|
|
6734
|
+
action: onRetry ? /* @__PURE__ */ jsx41(
|
|
6645
6735
|
ITButton,
|
|
6646
6736
|
{
|
|
6647
6737
|
label: errorActionLabel || "Reintentar",
|
|
@@ -6656,7 +6746,7 @@ function ITPage(props) {
|
|
|
6656
6746
|
if (empty) {
|
|
6657
6747
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6658
6748
|
renderHeader(props),
|
|
6659
|
-
/* @__PURE__ */
|
|
6749
|
+
/* @__PURE__ */ jsx41(
|
|
6660
6750
|
ITEmptyState,
|
|
6661
6751
|
{
|
|
6662
6752
|
title: emptyTitle || "Sin datos",
|
|
@@ -6675,7 +6765,7 @@ function ITPage(props) {
|
|
|
6675
6765
|
// src/components/atoms/popover/popover.tsx
|
|
6676
6766
|
import { useState as useState25, useRef as useRef19 } from "react";
|
|
6677
6767
|
import clsx34 from "clsx";
|
|
6678
|
-
import { jsx as
|
|
6768
|
+
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6679
6769
|
var positionClasses = {
|
|
6680
6770
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
6681
6771
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -6699,14 +6789,14 @@ function ITPopover({
|
|
|
6699
6789
|
else setInternalOpen(false);
|
|
6700
6790
|
});
|
|
6701
6791
|
return /* @__PURE__ */ jsxs32("div", { ref, className: clsx34("relative inline-flex", className), children: [
|
|
6702
|
-
/* @__PURE__ */
|
|
6703
|
-
open && /* @__PURE__ */
|
|
6792
|
+
/* @__PURE__ */ jsx42("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
|
|
6793
|
+
open && /* @__PURE__ */ jsx42("div", { className: clsx34("absolute z-[70]", positionClasses[position]), children: /* @__PURE__ */ jsx42("div", { className: "bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 p-3 min-w-[160px]", children }) })
|
|
6704
6794
|
] });
|
|
6705
6795
|
}
|
|
6706
6796
|
|
|
6707
6797
|
// src/components/atoms/progress/progress.tsx
|
|
6708
6798
|
import clsx35 from "clsx";
|
|
6709
|
-
import { jsx as
|
|
6799
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
6710
6800
|
var colorMap = {
|
|
6711
6801
|
primary: "bg-primary-500",
|
|
6712
6802
|
secondary: "bg-secondary-500",
|
|
@@ -6733,7 +6823,7 @@ function ITProgress({
|
|
|
6733
6823
|
style
|
|
6734
6824
|
}) {
|
|
6735
6825
|
const pct = Math.min(Math.max(value / max * 100, 0), 100);
|
|
6736
|
-
return /* @__PURE__ */
|
|
6826
|
+
return /* @__PURE__ */ jsx43(
|
|
6737
6827
|
"div",
|
|
6738
6828
|
{
|
|
6739
6829
|
className: clsx35("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap2[size], className),
|
|
@@ -6741,7 +6831,7 @@ function ITProgress({
|
|
|
6741
6831
|
role: "progressbar",
|
|
6742
6832
|
"aria-valuenow": variant === "determinate" ? value : void 0,
|
|
6743
6833
|
"aria-valuemax": max,
|
|
6744
|
-
children: /* @__PURE__ */
|
|
6834
|
+
children: /* @__PURE__ */ jsx43(
|
|
6745
6835
|
"div",
|
|
6746
6836
|
{
|
|
6747
6837
|
className: clsx35(
|
|
@@ -6758,7 +6848,7 @@ function ITProgress({
|
|
|
6758
6848
|
|
|
6759
6849
|
// src/components/atoms/radio/radio.tsx
|
|
6760
6850
|
import clsx36 from "clsx";
|
|
6761
|
-
import { jsx as
|
|
6851
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6762
6852
|
function ITRadioGroup({
|
|
6763
6853
|
name,
|
|
6764
6854
|
value,
|
|
@@ -6768,7 +6858,7 @@ function ITRadioGroup({
|
|
|
6768
6858
|
direction = "column",
|
|
6769
6859
|
className
|
|
6770
6860
|
}) {
|
|
6771
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ jsx44(
|
|
6772
6862
|
"div",
|
|
6773
6863
|
{
|
|
6774
6864
|
className: clsx36(
|
|
@@ -6786,7 +6876,7 @@ function ITRadioGroup({
|
|
|
6786
6876
|
disabled && "opacity-50 cursor-not-allowed"
|
|
6787
6877
|
),
|
|
6788
6878
|
children: [
|
|
6789
|
-
/* @__PURE__ */
|
|
6879
|
+
/* @__PURE__ */ jsx44(
|
|
6790
6880
|
"input",
|
|
6791
6881
|
{
|
|
6792
6882
|
type: "radio",
|
|
@@ -6798,7 +6888,7 @@ function ITRadioGroup({
|
|
|
6798
6888
|
className: "peer sr-only"
|
|
6799
6889
|
}
|
|
6800
6890
|
),
|
|
6801
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ jsx44(
|
|
6802
6892
|
"div",
|
|
6803
6893
|
{
|
|
6804
6894
|
className: clsx36(
|
|
@@ -6806,10 +6896,10 @@ function ITRadioGroup({
|
|
|
6806
6896
|
isSelected ? "border-primary-500" : "border-slate-300 dark:border-slate-600",
|
|
6807
6897
|
!disabled && "peer-focus:ring-2 peer-focus:ring-primary-200"
|
|
6808
6898
|
),
|
|
6809
|
-
children: isSelected && /* @__PURE__ */
|
|
6899
|
+
children: isSelected && /* @__PURE__ */ jsx44("div", { className: "w-2 h-2 rounded-full bg-primary-500" })
|
|
6810
6900
|
}
|
|
6811
6901
|
),
|
|
6812
|
-
/* @__PURE__ */
|
|
6902
|
+
/* @__PURE__ */ jsx44(ITText, { as: "span", className: "text-sm text-slate-700 dark:text-slate-300", children: opt.label })
|
|
6813
6903
|
]
|
|
6814
6904
|
},
|
|
6815
6905
|
opt.value
|
|
@@ -6825,7 +6915,7 @@ import { useState as useState26 } from "react";
|
|
|
6825
6915
|
|
|
6826
6916
|
// src/components/organisms/searchTable/components/SearchInput.tsx
|
|
6827
6917
|
import { FaSearch as FaSearch3 } from "react-icons/fa";
|
|
6828
|
-
import { jsx as
|
|
6918
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6829
6919
|
function SearchInput({
|
|
6830
6920
|
placeholder = "Buscar en todos los campos...",
|
|
6831
6921
|
value,
|
|
@@ -6833,8 +6923,8 @@ function SearchInput({
|
|
|
6833
6923
|
className = ""
|
|
6834
6924
|
}) {
|
|
6835
6925
|
return /* @__PURE__ */ jsxs34("div", { className: `relative flex-1 ${className}`, children: [
|
|
6836
|
-
/* @__PURE__ */
|
|
6837
|
-
/* @__PURE__ */
|
|
6926
|
+
/* @__PURE__ */ jsx45("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx45(FaSearch3, { className: "h-5 w-5 text-secondary-400" }) }),
|
|
6927
|
+
/* @__PURE__ */ jsx45(
|
|
6838
6928
|
ITInput,
|
|
6839
6929
|
{
|
|
6840
6930
|
name: "global-search",
|
|
@@ -6851,7 +6941,7 @@ function SearchInput({
|
|
|
6851
6941
|
|
|
6852
6942
|
// src/components/organisms/searchTable/components/SortButton.tsx
|
|
6853
6943
|
import { FaSort, FaSortUp, FaSortDown } from "react-icons/fa";
|
|
6854
|
-
import { jsx as
|
|
6944
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6855
6945
|
function SortButton({
|
|
6856
6946
|
sortConfig,
|
|
6857
6947
|
onClick,
|
|
@@ -6865,15 +6955,15 @@ function SortButton({
|
|
|
6865
6955
|
"aria-label": `Ordenar tabla ${sortConfig ? sortConfig.direction === "asc" ? "descendente" : "ascendente" : "ascendente"}`,
|
|
6866
6956
|
title: "Ordenar tabla",
|
|
6867
6957
|
children: [
|
|
6868
|
-
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */
|
|
6869
|
-
/* @__PURE__ */
|
|
6958
|
+
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */ jsx46(FaSortUp, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ jsx46(FaSortDown, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ jsx46(FaSort, { className: "w-4 h-4 text-secondary-500" }),
|
|
6959
|
+
/* @__PURE__ */ jsx46(ITText, { as: "span", className: "text-sm font-medium text-secondary-700", children: sortConfig ? sortConfig.direction === "asc" ? "Asc \u2191" : "Desc \u2193" : "Ordenar" })
|
|
6870
6960
|
]
|
|
6871
6961
|
}
|
|
6872
6962
|
);
|
|
6873
6963
|
}
|
|
6874
6964
|
|
|
6875
6965
|
// src/components/organisms/searchTable/components/SearchAndSortBar.tsx
|
|
6876
|
-
import { jsx as
|
|
6966
|
+
import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6877
6967
|
function SearchAndSortBar({
|
|
6878
6968
|
searchTerm,
|
|
6879
6969
|
onSearchChange,
|
|
@@ -6882,8 +6972,8 @@ function SearchAndSortBar({
|
|
|
6882
6972
|
sortConfig,
|
|
6883
6973
|
searchInputPlaceholder = "Buscar en todos los campos..."
|
|
6884
6974
|
}) {
|
|
6885
|
-
return /* @__PURE__ */
|
|
6886
|
-
/* @__PURE__ */
|
|
6975
|
+
return /* @__PURE__ */ jsx47("div", { className: "bg-secondary-50 px-6 py-4 border-b border-secondary-200", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-4", children: [
|
|
6976
|
+
/* @__PURE__ */ jsx47(
|
|
6887
6977
|
SearchInput,
|
|
6888
6978
|
{
|
|
6889
6979
|
placeholder: searchInputPlaceholder,
|
|
@@ -6891,8 +6981,8 @@ function SearchAndSortBar({
|
|
|
6891
6981
|
onChange: onSearchChange
|
|
6892
6982
|
}
|
|
6893
6983
|
),
|
|
6894
|
-
/* @__PURE__ */
|
|
6895
|
-
searchTerm && /* @__PURE__ */
|
|
6984
|
+
/* @__PURE__ */ jsx47(SortButton, { sortConfig, onClick: onGlobalSort }),
|
|
6985
|
+
searchTerm && /* @__PURE__ */ jsx47(
|
|
6896
6986
|
ITButton,
|
|
6897
6987
|
{
|
|
6898
6988
|
size: "sm",
|
|
@@ -6901,14 +6991,14 @@ function SearchAndSortBar({
|
|
|
6901
6991
|
onClick: onClearSearch,
|
|
6902
6992
|
ariaLabel: "Limpiar b\xFAsqueda",
|
|
6903
6993
|
title: "Limpiar b\xFAsqueda",
|
|
6904
|
-
children: /* @__PURE__ */
|
|
6994
|
+
children: /* @__PURE__ */ jsx47(ITText, { as: "span", children: "Limpiar" })
|
|
6905
6995
|
}
|
|
6906
6996
|
)
|
|
6907
6997
|
] }) });
|
|
6908
6998
|
}
|
|
6909
6999
|
|
|
6910
7000
|
// src/components/organisms/searchTable/components/TableHeaderCell.tsx
|
|
6911
|
-
import { jsx as
|
|
7001
|
+
import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6912
7002
|
function TableHeaderCell({
|
|
6913
7003
|
label,
|
|
6914
7004
|
sortable = false,
|
|
@@ -6916,8 +7006,8 @@ function TableHeaderCell({
|
|
|
6916
7006
|
sortConfig,
|
|
6917
7007
|
className = ""
|
|
6918
7008
|
}) {
|
|
6919
|
-
return /* @__PURE__ */
|
|
6920
|
-
/* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ jsx48("th", { className, children: /* @__PURE__ */ jsx48("div", { className: "flex flex-col items-center gap-2 w-full", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-center gap-2 w-full", children: [
|
|
7010
|
+
/* @__PURE__ */ jsx48(
|
|
6921
7011
|
ITText,
|
|
6922
7012
|
{
|
|
6923
7013
|
as: "span",
|
|
@@ -6931,18 +7021,18 @@ function TableHeaderCell({
|
|
|
6931
7021
|
children: label
|
|
6932
7022
|
}
|
|
6933
7023
|
),
|
|
6934
|
-
sortable && /* @__PURE__ */
|
|
7024
|
+
sortable && /* @__PURE__ */ jsx48(SortButton, { sortConfig, onClick: onSort })
|
|
6935
7025
|
] }) }) });
|
|
6936
7026
|
}
|
|
6937
7027
|
|
|
6938
7028
|
// src/components/organisms/searchTable/components/TableHeader.tsx
|
|
6939
|
-
import { jsx as
|
|
7029
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
6940
7030
|
function TableHeader({
|
|
6941
7031
|
columns,
|
|
6942
7032
|
onSort,
|
|
6943
7033
|
sortConfig
|
|
6944
7034
|
}) {
|
|
6945
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ jsx49("thead", { children: /* @__PURE__ */ jsx49("tr", { className: "bg-white border-b border-secondary-200", children: columns.map((col) => /* @__PURE__ */ jsx49(
|
|
6946
7036
|
TableHeaderCell,
|
|
6947
7037
|
{
|
|
6948
7038
|
label: col.label,
|
|
@@ -6960,7 +7050,7 @@ import clsx37 from "clsx";
|
|
|
6960
7050
|
import { FaCheck as FaCheck3, FaTimes as FaTimes8 } from "react-icons/fa";
|
|
6961
7051
|
|
|
6962
7052
|
// src/components/organisms/searchTable/components/EditableCell.tsx
|
|
6963
|
-
import { jsx as
|
|
7053
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
6964
7054
|
function EditableCell({
|
|
6965
7055
|
column,
|
|
6966
7056
|
value,
|
|
@@ -6989,7 +7079,7 @@ function EditableCell({
|
|
|
6989
7079
|
onChange(value, errorMsg);
|
|
6990
7080
|
};
|
|
6991
7081
|
const renderITInput = (type) => {
|
|
6992
|
-
return /* @__PURE__ */
|
|
7082
|
+
return /* @__PURE__ */ jsx50(
|
|
6993
7083
|
ITInput,
|
|
6994
7084
|
{
|
|
6995
7085
|
type,
|
|
@@ -7003,7 +7093,7 @@ function EditableCell({
|
|
|
7003
7093
|
);
|
|
7004
7094
|
};
|
|
7005
7095
|
const renderITDatePicker = () => {
|
|
7006
|
-
return /* @__PURE__ */
|
|
7096
|
+
return /* @__PURE__ */ jsx50(
|
|
7007
7097
|
ITDatePicker,
|
|
7008
7098
|
{
|
|
7009
7099
|
name: column.key,
|
|
@@ -7016,7 +7106,7 @@ function EditableCell({
|
|
|
7016
7106
|
);
|
|
7017
7107
|
};
|
|
7018
7108
|
const renderITSelect = (options) => {
|
|
7019
|
-
return /* @__PURE__ */
|
|
7109
|
+
return /* @__PURE__ */ jsx50(
|
|
7020
7110
|
ITSelect,
|
|
7021
7111
|
{
|
|
7022
7112
|
name: column.key,
|
|
@@ -7030,7 +7120,7 @@ function EditableCell({
|
|
|
7030
7120
|
);
|
|
7031
7121
|
};
|
|
7032
7122
|
const renderBooleanInput = () => {
|
|
7033
|
-
return /* @__PURE__ */
|
|
7123
|
+
return /* @__PURE__ */ jsx50(
|
|
7034
7124
|
ITInput,
|
|
7035
7125
|
{
|
|
7036
7126
|
type: "checkbox",
|
|
@@ -7073,12 +7163,12 @@ function EditableCell({
|
|
|
7073
7163
|
};
|
|
7074
7164
|
return /* @__PURE__ */ jsxs38("div", { className: "w-full", children: [
|
|
7075
7165
|
renderInput(),
|
|
7076
|
-
error && /* @__PURE__ */
|
|
7166
|
+
error && /* @__PURE__ */ jsx50("div", { className: "text-danger-500 text-xs mt-1", children: /* @__PURE__ */ jsx50(ITText, { as: "span", children: error }) })
|
|
7077
7167
|
] });
|
|
7078
7168
|
}
|
|
7079
7169
|
|
|
7080
7170
|
// src/components/organisms/searchTable/components/TableRow.tsx
|
|
7081
|
-
import { jsx as
|
|
7171
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
7082
7172
|
function TableRow({
|
|
7083
7173
|
row,
|
|
7084
7174
|
rowIndex,
|
|
@@ -7111,14 +7201,14 @@ function TableRow({
|
|
|
7111
7201
|
case "number":
|
|
7112
7202
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
7113
7203
|
case "boolean":
|
|
7114
|
-
return value ? /* @__PURE__ */
|
|
7204
|
+
return value ? /* @__PURE__ */ jsx51(
|
|
7115
7205
|
FaCheck3,
|
|
7116
7206
|
{
|
|
7117
7207
|
className: "text-green-500",
|
|
7118
7208
|
"aria-label": "Verdadero",
|
|
7119
7209
|
title: "Verdadero"
|
|
7120
7210
|
}
|
|
7121
|
-
) : /* @__PURE__ */
|
|
7211
|
+
) : /* @__PURE__ */ jsx51(FaTimes8, { className: "text-danger-500", "aria-label": "Falso", title: "Falso" });
|
|
7122
7212
|
case "actions":
|
|
7123
7213
|
if (isEditing && col.saveActions) {
|
|
7124
7214
|
return col.saveActions(rowData, {
|
|
@@ -7142,19 +7232,19 @@ function TableRow({
|
|
|
7142
7232
|
return value;
|
|
7143
7233
|
}
|
|
7144
7234
|
};
|
|
7145
|
-
return /* @__PURE__ */
|
|
7235
|
+
return /* @__PURE__ */ jsx51(
|
|
7146
7236
|
"tr",
|
|
7147
7237
|
{
|
|
7148
7238
|
onMouseEnter: () => setIsHovered(true),
|
|
7149
7239
|
onMouseLeave: () => setIsHovered(false),
|
|
7150
7240
|
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" : ""}`,
|
|
7151
|
-
children: columns.map((col) => /* @__PURE__ */
|
|
7241
|
+
children: columns.map((col) => /* @__PURE__ */ jsx51(
|
|
7152
7242
|
"td",
|
|
7153
7243
|
{
|
|
7154
7244
|
className: clsx37("pl-5 py-2", col.className, {
|
|
7155
7245
|
"text-center": col.type === "actions" || col.type === "boolean"
|
|
7156
7246
|
}),
|
|
7157
|
-
children: isEditing && col.editable ? /* @__PURE__ */
|
|
7247
|
+
children: isEditing && col.editable ? /* @__PURE__ */ jsx51(
|
|
7158
7248
|
EditableCell,
|
|
7159
7249
|
{
|
|
7160
7250
|
column: col,
|
|
@@ -7163,7 +7253,7 @@ function TableRow({
|
|
|
7163
7253
|
error: errors[col.key],
|
|
7164
7254
|
row: editedRow
|
|
7165
7255
|
}
|
|
7166
|
-
) : /* @__PURE__ */
|
|
7256
|
+
) : /* @__PURE__ */ jsx51(
|
|
7167
7257
|
"div",
|
|
7168
7258
|
{
|
|
7169
7259
|
className: clsx37({
|
|
@@ -7183,12 +7273,12 @@ function TableRow({
|
|
|
7183
7273
|
}
|
|
7184
7274
|
|
|
7185
7275
|
// src/components/organisms/searchTable/components/TableEmptyState.tsx
|
|
7186
|
-
import { jsx as
|
|
7276
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
7187
7277
|
function TableEmptyState({
|
|
7188
7278
|
colSpan,
|
|
7189
7279
|
searchTerm
|
|
7190
7280
|
}) {
|
|
7191
|
-
return /* @__PURE__ */
|
|
7281
|
+
return /* @__PURE__ */ jsx52("tr", { children: /* @__PURE__ */ jsx52("td", { colSpan, className: "px-6 py-4 text-center", children: searchTerm ? /* @__PURE__ */ jsx52(ITText, { as: "span", children: "No se encontraron resultados para tu b\xFAsqueda" }) : /* @__PURE__ */ jsx52(ITText, { as: "span", children: "No se encontraron resultados" }) }) });
|
|
7192
7282
|
}
|
|
7193
7283
|
|
|
7194
7284
|
// src/components/organisms/searchTable/components/PaginationControls.tsx
|
|
@@ -7211,7 +7301,7 @@ function PaginationInfo({
|
|
|
7211
7301
|
}
|
|
7212
7302
|
|
|
7213
7303
|
// src/components/organisms/searchTable/components/PaginationControls.tsx
|
|
7214
|
-
import { jsx as
|
|
7304
|
+
import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7215
7305
|
function PaginationControls({
|
|
7216
7306
|
pageIndex,
|
|
7217
7307
|
totalPages,
|
|
@@ -7226,10 +7316,10 @@ function PaginationControls({
|
|
|
7226
7316
|
}) {
|
|
7227
7317
|
return /* @__PURE__ */ jsxs40("div", { className: "flex flex-col sm:flex-row justify-between items-center gap-4", children: [
|
|
7228
7318
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-4", children: [
|
|
7229
|
-
/* @__PURE__ */
|
|
7319
|
+
/* @__PURE__ */ jsx53(PaginationInfo, { currentCount, totalCount }),
|
|
7230
7320
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-2", children: [
|
|
7231
|
-
/* @__PURE__ */
|
|
7232
|
-
/* @__PURE__ */
|
|
7321
|
+
/* @__PURE__ */ jsx53(ITText, { as: "span", className: "text-sm text-secondary-700", children: "Mostrar:" }),
|
|
7322
|
+
/* @__PURE__ */ jsx53(
|
|
7233
7323
|
ITSelect,
|
|
7234
7324
|
{
|
|
7235
7325
|
name: "itemsPerPage",
|
|
@@ -7248,7 +7338,7 @@ function PaginationControls({
|
|
|
7248
7338
|
] })
|
|
7249
7339
|
] }),
|
|
7250
7340
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-2", children: [
|
|
7251
|
-
/* @__PURE__ */
|
|
7341
|
+
/* @__PURE__ */ jsx53(
|
|
7252
7342
|
ITButton,
|
|
7253
7343
|
{
|
|
7254
7344
|
color: "secondary",
|
|
@@ -7258,7 +7348,7 @@ function PaginationControls({
|
|
|
7258
7348
|
className: "min-w-[32px]",
|
|
7259
7349
|
ariaLabel: "P\xE1gina anterior",
|
|
7260
7350
|
title: "Ir a la p\xE1gina anterior",
|
|
7261
|
-
children: /* @__PURE__ */
|
|
7351
|
+
children: /* @__PURE__ */ jsx53(FaArrowLeft, { "aria-hidden": "true" })
|
|
7262
7352
|
}
|
|
7263
7353
|
),
|
|
7264
7354
|
/* @__PURE__ */ jsxs40(ITText, { as: "span", className: "px-4 py-2 text-sm text-secondary-700", "aria-live": "polite", children: [
|
|
@@ -7267,7 +7357,7 @@ function PaginationControls({
|
|
|
7267
7357
|
" de ",
|
|
7268
7358
|
totalPages
|
|
7269
7359
|
] }),
|
|
7270
|
-
/* @__PURE__ */
|
|
7360
|
+
/* @__PURE__ */ jsx53(
|
|
7271
7361
|
ITButton,
|
|
7272
7362
|
{
|
|
7273
7363
|
size: "sm",
|
|
@@ -7277,7 +7367,7 @@ function PaginationControls({
|
|
|
7277
7367
|
className: "min-w-[32px]",
|
|
7278
7368
|
ariaLabel: "P\xE1gina siguiente",
|
|
7279
7369
|
title: "Ir a la p\xE1gina siguiente",
|
|
7280
|
-
children: /* @__PURE__ */
|
|
7370
|
+
children: /* @__PURE__ */ jsx53(FaArrowRight, { "aria-hidden": "true" })
|
|
7281
7371
|
}
|
|
7282
7372
|
)
|
|
7283
7373
|
] })
|
|
@@ -7285,7 +7375,7 @@ function PaginationControls({
|
|
|
7285
7375
|
}
|
|
7286
7376
|
|
|
7287
7377
|
// src/components/organisms/searchTable/searchTable.tsx
|
|
7288
|
-
import { jsx as
|
|
7378
|
+
import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7289
7379
|
function ITSearchTable({
|
|
7290
7380
|
columns,
|
|
7291
7381
|
data,
|
|
@@ -7352,9 +7442,9 @@ function ITSearchTable({
|
|
|
7352
7442
|
};
|
|
7353
7443
|
return /* @__PURE__ */ jsxs41("div", { className: clsx38("space-y-4 w-full", containerClassName), children: [
|
|
7354
7444
|
/* @__PURE__ */ jsxs41("div", { className: "shadow-md sm:rounded-lg overflow-hidden", children: [
|
|
7355
|
-
title && /* @__PURE__ */
|
|
7445
|
+
title && /* @__PURE__ */ jsx54("div", { className: "bg-teal-500 text-white px-6 py-4", children: /* @__PURE__ */ jsx54(ITText, { as: "h2", className: "text-xl font-bold text-center whitespace-nowrap", children: title }) }),
|
|
7356
7446
|
/* @__PURE__ */ jsxs41("div", { className: "bg-white", children: [
|
|
7357
|
-
/* @__PURE__ */
|
|
7447
|
+
/* @__PURE__ */ jsx54("div", { className: "p-4 border-b border-secondary-200", children: /* @__PURE__ */ jsx54(
|
|
7358
7448
|
SearchAndSortBar,
|
|
7359
7449
|
{
|
|
7360
7450
|
searchTerm,
|
|
@@ -7365,7 +7455,7 @@ function ITSearchTable({
|
|
|
7365
7455
|
searchInputPlaceholder
|
|
7366
7456
|
}
|
|
7367
7457
|
) }),
|
|
7368
|
-
/* @__PURE__ */
|
|
7458
|
+
/* @__PURE__ */ jsx54("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs41(
|
|
7369
7459
|
"table",
|
|
7370
7460
|
{
|
|
7371
7461
|
className: clsx38(
|
|
@@ -7374,7 +7464,7 @@ function ITSearchTable({
|
|
|
7374
7464
|
sizeStyles[size]
|
|
7375
7465
|
),
|
|
7376
7466
|
children: [
|
|
7377
|
-
/* @__PURE__ */
|
|
7467
|
+
/* @__PURE__ */ jsx54(
|
|
7378
7468
|
TableHeader,
|
|
7379
7469
|
{
|
|
7380
7470
|
columns,
|
|
@@ -7382,7 +7472,7 @@ function ITSearchTable({
|
|
|
7382
7472
|
sortConfig
|
|
7383
7473
|
}
|
|
7384
7474
|
),
|
|
7385
|
-
/* @__PURE__ */
|
|
7475
|
+
/* @__PURE__ */ jsx54("tbody", { children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ jsx54(
|
|
7386
7476
|
TableRow,
|
|
7387
7477
|
{
|
|
7388
7478
|
row,
|
|
@@ -7396,7 +7486,7 @@ function ITSearchTable({
|
|
|
7396
7486
|
onCancel: handleCancelEdit
|
|
7397
7487
|
},
|
|
7398
7488
|
rowIndex
|
|
7399
|
-
)) : /* @__PURE__ */
|
|
7489
|
+
)) : /* @__PURE__ */ jsx54(
|
|
7400
7490
|
TableEmptyState,
|
|
7401
7491
|
{
|
|
7402
7492
|
colSpan: columns.length + 1,
|
|
@@ -7408,7 +7498,7 @@ function ITSearchTable({
|
|
|
7408
7498
|
) })
|
|
7409
7499
|
] })
|
|
7410
7500
|
] }),
|
|
7411
|
-
/* @__PURE__ */
|
|
7501
|
+
/* @__PURE__ */ jsx54(
|
|
7412
7502
|
PaginationControls,
|
|
7413
7503
|
{
|
|
7414
7504
|
pageIndex,
|
|
@@ -7428,7 +7518,7 @@ function ITSearchTable({
|
|
|
7428
7518
|
|
|
7429
7519
|
// src/components/atoms/segmented-control/segmented-control.tsx
|
|
7430
7520
|
import clsx39 from "clsx";
|
|
7431
|
-
import { jsx as
|
|
7521
|
+
import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
7432
7522
|
var sizeMap3 = {
|
|
7433
7523
|
sm: { button: "px-2.5 py-1.5 text-[11px]", container: "p-0.5" },
|
|
7434
7524
|
md: { button: "px-3 py-2 text-xs", container: "p-1" }
|
|
@@ -7442,7 +7532,7 @@ function ITSegmentedControl({
|
|
|
7442
7532
|
disabled = false
|
|
7443
7533
|
}) {
|
|
7444
7534
|
const { button, container } = sizeMap3[size];
|
|
7445
|
-
return /* @__PURE__ */
|
|
7535
|
+
return /* @__PURE__ */ jsx55(
|
|
7446
7536
|
"div",
|
|
7447
7537
|
{
|
|
7448
7538
|
className: clsx39(
|
|
@@ -7465,8 +7555,8 @@ function ITSegmentedControl({
|
|
|
7465
7555
|
disabled && "pointer-events-none"
|
|
7466
7556
|
),
|
|
7467
7557
|
children: [
|
|
7468
|
-
opt.icon && /* @__PURE__ */
|
|
7469
|
-
/* @__PURE__ */
|
|
7558
|
+
opt.icon && /* @__PURE__ */ jsx55("span", { children: opt.icon }),
|
|
7559
|
+
/* @__PURE__ */ jsx55(ITText, { as: "span", children: opt.label })
|
|
7470
7560
|
]
|
|
7471
7561
|
},
|
|
7472
7562
|
opt.value
|
|
@@ -7479,7 +7569,15 @@ function ITSegmentedControl({
|
|
|
7479
7569
|
// src/components/organisms/sidebar/sidebar.tsx
|
|
7480
7570
|
import { useEffect as useEffect13, useRef as useRef20, useState as useState27 } from "react";
|
|
7481
7571
|
import { FaChevronDown as FaChevronDown4 } from "react-icons/fa";
|
|
7482
|
-
import { jsx as
|
|
7572
|
+
import { jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
7573
|
+
function isSubItemGroup(entry) {
|
|
7574
|
+
return "items" in entry;
|
|
7575
|
+
}
|
|
7576
|
+
function flattenSubItems(entries) {
|
|
7577
|
+
return entries.flatMap(
|
|
7578
|
+
(entry) => isSubItemGroup(entry) ? entry.items : [entry]
|
|
7579
|
+
);
|
|
7580
|
+
}
|
|
7483
7581
|
function ITSidebar({
|
|
7484
7582
|
navigationItems = [],
|
|
7485
7583
|
isCollapsed = false,
|
|
@@ -7525,7 +7623,7 @@ function ITSidebar({
|
|
|
7525
7623
|
useEffect13(() => {
|
|
7526
7624
|
const activeParents = /* @__PURE__ */ new Set();
|
|
7527
7625
|
navigationItems.forEach((item) => {
|
|
7528
|
-
if (item.subitems && item.subitems.some((sub) => sub.isActive)) {
|
|
7626
|
+
if (item.subitems && flattenSubItems(item.subitems).some((sub) => sub.isActive)) {
|
|
7529
7627
|
activeParents.add(item.id);
|
|
7530
7628
|
}
|
|
7531
7629
|
});
|
|
@@ -7559,6 +7657,80 @@ function ITSidebar({
|
|
|
7559
7657
|
};
|
|
7560
7658
|
const isSidebarCollapsed = visibleOnMobile ? false : !isHovering && isCollapsed;
|
|
7561
7659
|
const sidebarWidth = isSidebarCollapsed ? "w-[88px]" : "w-[280px]";
|
|
7660
|
+
const renderSubItem = (subitem) => /* @__PURE__ */ jsx56("li", { className: "relative", children: /* @__PURE__ */ jsxs43(
|
|
7661
|
+
"button",
|
|
7662
|
+
{
|
|
7663
|
+
"aria-current": subitem.isActive ? "page" : void 0,
|
|
7664
|
+
onClick: () => {
|
|
7665
|
+
if (subitem.action) subitem.action();
|
|
7666
|
+
if (onSubItemClick) onSubItemClick(subitem);
|
|
7667
|
+
},
|
|
7668
|
+
className: `flex items-center gap-2 w-full text-left px-3 py-1.5 rounded-xl transition-all duration-300`,
|
|
7669
|
+
style: {
|
|
7670
|
+
color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))",
|
|
7671
|
+
backgroundColor: subitem.isActive ? "var(--it-sidebar-active-bg, var(--color-secondary-50))" : "transparent",
|
|
7672
|
+
fontSize: "0.78rem",
|
|
7673
|
+
fontWeight: subitem.isActive ? 600 : 500,
|
|
7674
|
+
letterSpacing: "0.01em",
|
|
7675
|
+
marginLeft: subitemConnector === "|" ? "-1px" : "0"
|
|
7676
|
+
},
|
|
7677
|
+
onMouseEnter: (e) => {
|
|
7678
|
+
if (!subitem.isActive) {
|
|
7679
|
+
e.currentTarget.style.backgroundColor = "var(--it-sidebar-hover-bg, var(--color-secondary-100))";
|
|
7680
|
+
e.currentTarget.style.transform = "translateX(3px)";
|
|
7681
|
+
}
|
|
7682
|
+
},
|
|
7683
|
+
onMouseLeave: (e) => {
|
|
7684
|
+
if (!subitem.isActive) {
|
|
7685
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
7686
|
+
e.currentTarget.style.transform = "translateX(0)";
|
|
7687
|
+
}
|
|
7688
|
+
},
|
|
7689
|
+
children: [
|
|
7690
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx56(
|
|
7691
|
+
"div",
|
|
7692
|
+
{
|
|
7693
|
+
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full transition-all",
|
|
7694
|
+
style: {
|
|
7695
|
+
backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))",
|
|
7696
|
+
boxShadow: "0 0 6px color-mix(in srgb, var(--it-sidebar-active-icon, var(--color-primary-500)) 25%, transparent)"
|
|
7697
|
+
}
|
|
7698
|
+
}
|
|
7699
|
+
),
|
|
7700
|
+
subitemConnector === "dot" && /* @__PURE__ */ jsx56(
|
|
7701
|
+
"span",
|
|
7702
|
+
{
|
|
7703
|
+
className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 ${subitem.isActive ? "scale-125" : ""}`,
|
|
7704
|
+
style: {
|
|
7705
|
+
backgroundColor: subitem.isActive ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, var(--color-secondary-400))"
|
|
7706
|
+
}
|
|
7707
|
+
}
|
|
7708
|
+
),
|
|
7709
|
+
/* @__PURE__ */ jsx56(ITText, { as: "span", className: "truncate", children: subitem.label })
|
|
7710
|
+
]
|
|
7711
|
+
}
|
|
7712
|
+
) }, subitem.id);
|
|
7713
|
+
const renderSubItemGroup = (group, itemId) => {
|
|
7714
|
+
const headingId = `it-sidebar-subgroup-${itemId}-${group.id}`;
|
|
7715
|
+
return /* @__PURE__ */ jsxs43("li", { className: "relative", children: [
|
|
7716
|
+
/* @__PURE__ */ jsx56("div", { id: headingId, className: "px-3 pt-2.5 pb-1 mt-1", children: /* @__PURE__ */ jsx56(
|
|
7717
|
+
ITText,
|
|
7718
|
+
{
|
|
7719
|
+
as: "span",
|
|
7720
|
+
className: "block",
|
|
7721
|
+
style: {
|
|
7722
|
+
color: "var(--it-sidebar-icon-color, var(--color-secondary-400))",
|
|
7723
|
+
fontSize: "0.68rem",
|
|
7724
|
+
fontWeight: 700,
|
|
7725
|
+
letterSpacing: "0.08em",
|
|
7726
|
+
textTransform: "uppercase"
|
|
7727
|
+
},
|
|
7728
|
+
children: group.label
|
|
7729
|
+
}
|
|
7730
|
+
) }),
|
|
7731
|
+
/* @__PURE__ */ jsx56("ul", { "aria-labelledby": headingId, className: "flex flex-col gap-0", children: group.items.map(renderSubItem) })
|
|
7732
|
+
] }, group.id);
|
|
7733
|
+
};
|
|
7562
7734
|
return /* @__PURE__ */ jsxs43(
|
|
7563
7735
|
"aside",
|
|
7564
7736
|
{
|
|
@@ -7579,8 +7751,8 @@ function ITSidebar({
|
|
|
7579
7751
|
backdropFilter: "blur(12px)"
|
|
7580
7752
|
},
|
|
7581
7753
|
children: [
|
|
7582
|
-
header && !isSidebarCollapsed && /* @__PURE__ */
|
|
7583
|
-
/* @__PURE__ */
|
|
7754
|
+
header && !isSidebarCollapsed && /* @__PURE__ */ jsx56("div", { className: "px-4 pt-4 pb-1 flex-shrink-0", children: header }),
|
|
7755
|
+
/* @__PURE__ */ jsx56("nav", { "aria-label": "Componentes de la librer\xEDa", className: "flex-1 py-4 overflow-y-auto overflow-x-hidden custom-scrollbar px-4", children: /* @__PURE__ */ jsx56("ul", { className: "space-y-1", children: navigationItems.map((item) => {
|
|
7584
7756
|
const hasSubmenu = !!item.subitems && item.subitems.length > 0;
|
|
7585
7757
|
const submenuId = `it-sidebar-submenu-${item.id}`;
|
|
7586
7758
|
return /* @__PURE__ */ jsxs43("li", { className: "relative group/navitem", children: [
|
|
@@ -7616,7 +7788,7 @@ function ITSidebar({
|
|
|
7616
7788
|
}
|
|
7617
7789
|
},
|
|
7618
7790
|
children: [
|
|
7619
|
-
item.isActive && !isSidebarCollapsed && /* @__PURE__ */
|
|
7791
|
+
item.isActive && !isSidebarCollapsed && /* @__PURE__ */ jsx56(
|
|
7620
7792
|
"div",
|
|
7621
7793
|
{
|
|
7622
7794
|
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
@@ -7624,7 +7796,7 @@ function ITSidebar({
|
|
|
7624
7796
|
}
|
|
7625
7797
|
),
|
|
7626
7798
|
/* @__PURE__ */ jsxs43("div", { className: `flex items-center ${!isSidebarCollapsed ? "gap-2.5" : "justify-center"} relative z-10 w-full`, children: [
|
|
7627
|
-
item.icon && /* @__PURE__ */
|
|
7799
|
+
item.icon && /* @__PURE__ */ jsx56(
|
|
7628
7800
|
"div",
|
|
7629
7801
|
{
|
|
7630
7802
|
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
@@ -7637,7 +7809,7 @@ function ITSidebar({
|
|
|
7637
7809
|
children: item.icon
|
|
7638
7810
|
}
|
|
7639
7811
|
),
|
|
7640
|
-
!isSidebarCollapsed && /* @__PURE__ */
|
|
7812
|
+
!isSidebarCollapsed && /* @__PURE__ */ jsx56(
|
|
7641
7813
|
ITText,
|
|
7642
7814
|
{
|
|
7643
7815
|
as: "span",
|
|
@@ -7651,15 +7823,15 @@ function ITSidebar({
|
|
|
7651
7823
|
}
|
|
7652
7824
|
)
|
|
7653
7825
|
] }),
|
|
7654
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
7826
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx56(
|
|
7655
7827
|
"div",
|
|
7656
7828
|
{
|
|
7657
7829
|
className: `flex-shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "rotate-180" : ""}`,
|
|
7658
7830
|
style: { color: item.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-icon-color, var(--color-secondary-500))", opacity: 0.7 },
|
|
7659
|
-
children: /* @__PURE__ */
|
|
7831
|
+
children: /* @__PURE__ */ jsx56(FaChevronDown4, { className: "w-3 h-3" })
|
|
7660
7832
|
}
|
|
7661
7833
|
),
|
|
7662
|
-
item.badge && /* @__PURE__ */
|
|
7834
|
+
item.badge && /* @__PURE__ */ jsx56(
|
|
7663
7835
|
"span",
|
|
7664
7836
|
{
|
|
7665
7837
|
className: `
|
|
@@ -7689,15 +7861,15 @@ function ITSidebar({
|
|
|
7689
7861
|
},
|
|
7690
7862
|
children: [
|
|
7691
7863
|
/* @__PURE__ */ jsxs43("div", { className: "px-5 py-4 flex items-center gap-3 font-semibold border-b", style: { borderColor: "var(--it-sidebar-border, var(--color-secondary-200))", color: "var(--it-sidebar-active-color, var(--color-secondary-900))" }, children: [
|
|
7692
|
-
item.icon && /* @__PURE__ */
|
|
7693
|
-
/* @__PURE__ */
|
|
7864
|
+
item.icon && /* @__PURE__ */ jsx56("span", { style: { color: "var(--it-sidebar-active-icon, var(--color-primary-500))" }, className: "text-xl drop-shadow-sm", children: item.icon }),
|
|
7865
|
+
/* @__PURE__ */ jsx56(ITText, { as: "span", className: "tracking-wide text-[15px]", children: item.label })
|
|
7694
7866
|
] }),
|
|
7695
|
-
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */
|
|
7867
|
+
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ jsx56("div", { className: "py-2", children: flattenSubItems(item.subitems).map((subitem) => /* @__PURE__ */ jsxs43(
|
|
7696
7868
|
"div",
|
|
7697
7869
|
{
|
|
7698
7870
|
className: `px-5 py-2.5 text-sm flex items-center gap-3 transition-colors relative`,
|
|
7699
7871
|
children: [
|
|
7700
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */
|
|
7872
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx56(
|
|
7701
7873
|
"div",
|
|
7702
7874
|
{
|
|
7703
7875
|
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full",
|
|
@@ -7707,75 +7879,25 @@ function ITSidebar({
|
|
|
7707
7879
|
}
|
|
7708
7880
|
}
|
|
7709
7881
|
),
|
|
7710
|
-
/* @__PURE__ */
|
|
7711
|
-
/* @__PURE__ */
|
|
7882
|
+
/* @__PURE__ */ jsx56("span", { className: `w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`, style: { backgroundColor: subitem.isActive ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, var(--color-secondary-400))" } }),
|
|
7883
|
+
/* @__PURE__ */ jsx56(ITText, { as: "span", style: { color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))", fontWeight: subitem.isActive ? 600 : 500 }, children: subitem.label })
|
|
7712
7884
|
]
|
|
7713
7885
|
},
|
|
7714
7886
|
subitem.id
|
|
7715
|
-
)) }) : /* @__PURE__ */
|
|
7887
|
+
)) }) : /* @__PURE__ */ jsx56(ITText, { as: "div", className: "px-5 py-3 text-sm italic", style: { color: "var(--it-sidebar-label-color, var(--color-secondary-400))" }, children: "No hay submen\xFA" })
|
|
7716
7888
|
]
|
|
7717
7889
|
}
|
|
7718
7890
|
),
|
|
7719
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
7891
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx56("div", { id: submenuId, role: "group", "aria-label": item.label, className: `overflow-hidden transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "max-h-[1000px] opacity-100 mt-1" : "max-h-0 opacity-0"}`, children: /* @__PURE__ */ jsx56(
|
|
7720
7892
|
"ul",
|
|
7721
7893
|
{
|
|
7722
7894
|
className: "ml-4 flex flex-col gap-0 py-0.5",
|
|
7723
7895
|
style: {
|
|
7724
7896
|
borderLeft: subitemConnector === "|" ? "1px solid var(--it-sidebar-border, var(--color-secondary-200))" : "none"
|
|
7725
7897
|
},
|
|
7726
|
-
children: item.subitems.map(
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
"aria-current": subitem.isActive ? "page" : void 0,
|
|
7730
|
-
onClick: () => {
|
|
7731
|
-
if (subitem.action) subitem.action();
|
|
7732
|
-
if (onSubItemClick) onSubItemClick(subitem);
|
|
7733
|
-
},
|
|
7734
|
-
className: `flex items-center gap-2 w-full text-left px-3 py-1.5 rounded-xl transition-all duration-300`,
|
|
7735
|
-
style: {
|
|
7736
|
-
color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))",
|
|
7737
|
-
backgroundColor: subitem.isActive ? "var(--it-sidebar-active-bg, var(--color-secondary-50))" : "transparent",
|
|
7738
|
-
fontSize: "0.78rem",
|
|
7739
|
-
fontWeight: subitem.isActive ? 600 : 500,
|
|
7740
|
-
letterSpacing: "0.01em",
|
|
7741
|
-
marginLeft: subitemConnector === "|" ? "-1px" : "0"
|
|
7742
|
-
},
|
|
7743
|
-
onMouseEnter: (e) => {
|
|
7744
|
-
if (!subitem.isActive) {
|
|
7745
|
-
e.currentTarget.style.backgroundColor = "var(--it-sidebar-hover-bg, var(--color-secondary-100))";
|
|
7746
|
-
e.currentTarget.style.transform = "translateX(3px)";
|
|
7747
|
-
}
|
|
7748
|
-
},
|
|
7749
|
-
onMouseLeave: (e) => {
|
|
7750
|
-
if (!subitem.isActive) {
|
|
7751
|
-
e.currentTarget.style.backgroundColor = "transparent";
|
|
7752
|
-
e.currentTarget.style.transform = "translateX(0)";
|
|
7753
|
-
}
|
|
7754
|
-
},
|
|
7755
|
-
children: [
|
|
7756
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx55(
|
|
7757
|
-
"div",
|
|
7758
|
-
{
|
|
7759
|
-
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full transition-all",
|
|
7760
|
-
style: {
|
|
7761
|
-
backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))",
|
|
7762
|
-
boxShadow: "0 0 6px color-mix(in srgb, var(--it-sidebar-active-icon, var(--color-primary-500)) 25%, transparent)"
|
|
7763
|
-
}
|
|
7764
|
-
}
|
|
7765
|
-
),
|
|
7766
|
-
subitemConnector === "dot" && /* @__PURE__ */ jsx55(
|
|
7767
|
-
"span",
|
|
7768
|
-
{
|
|
7769
|
-
className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 ${subitem.isActive ? "scale-125" : ""}`,
|
|
7770
|
-
style: {
|
|
7771
|
-
backgroundColor: subitem.isActive ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, var(--color-secondary-400))"
|
|
7772
|
-
}
|
|
7773
|
-
}
|
|
7774
|
-
),
|
|
7775
|
-
/* @__PURE__ */ jsx55(ITText, { as: "span", className: "truncate", children: subitem.label })
|
|
7776
|
-
]
|
|
7777
|
-
}
|
|
7778
|
-
) }, subitem.id))
|
|
7898
|
+
children: item.subitems.map(
|
|
7899
|
+
(entry) => isSubItemGroup(entry) ? renderSubItemGroup(entry, item.id) : renderSubItem(entry)
|
|
7900
|
+
)
|
|
7779
7901
|
}
|
|
7780
7902
|
) })
|
|
7781
7903
|
] }, item.id);
|
|
@@ -7788,7 +7910,7 @@ function ITSidebar({
|
|
|
7788
7910
|
// src/components/atoms/slide/slide.tsx
|
|
7789
7911
|
import { useState as useState28, useEffect as useEffect14 } from "react";
|
|
7790
7912
|
import clsx40 from "clsx";
|
|
7791
|
-
import { jsx as
|
|
7913
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
7792
7914
|
function ITSlideToggle({
|
|
7793
7915
|
onToggle,
|
|
7794
7916
|
isOn: controlledIsOn,
|
|
@@ -7841,7 +7963,7 @@ function ITSlideToggle({
|
|
|
7841
7963
|
}
|
|
7842
7964
|
};
|
|
7843
7965
|
const { container, knob, translate } = sizeClasses2[size];
|
|
7844
|
-
return /* @__PURE__ */
|
|
7966
|
+
return /* @__PURE__ */ jsx57(
|
|
7845
7967
|
"div",
|
|
7846
7968
|
{
|
|
7847
7969
|
onClick: toggleSwitch,
|
|
@@ -7861,7 +7983,7 @@ function ITSlideToggle({
|
|
|
7861
7983
|
toggleSwitch();
|
|
7862
7984
|
}
|
|
7863
7985
|
},
|
|
7864
|
-
children: /* @__PURE__ */
|
|
7986
|
+
children: /* @__PURE__ */ jsx57(
|
|
7865
7987
|
"div",
|
|
7866
7988
|
{
|
|
7867
7989
|
className: clsx40(
|
|
@@ -7877,7 +7999,7 @@ function ITSlideToggle({
|
|
|
7877
7999
|
|
|
7878
8000
|
// src/components/atoms/slider/slider.tsx
|
|
7879
8001
|
import clsx41 from "clsx";
|
|
7880
|
-
import { jsx as
|
|
8002
|
+
import { jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7881
8003
|
function ITSlider({
|
|
7882
8004
|
value,
|
|
7883
8005
|
onChange,
|
|
@@ -7894,7 +8016,7 @@ function ITSlider({
|
|
|
7894
8016
|
": ",
|
|
7895
8017
|
value
|
|
7896
8018
|
] }),
|
|
7897
|
-
/* @__PURE__ */
|
|
8019
|
+
/* @__PURE__ */ jsx58("div", { className: "relative w-full h-5 flex items-center", children: /* @__PURE__ */ jsx58(
|
|
7898
8020
|
"input",
|
|
7899
8021
|
{
|
|
7900
8022
|
type: "range",
|
|
@@ -7925,7 +8047,7 @@ function ITSlider({
|
|
|
7925
8047
|
|
|
7926
8048
|
// src/components/molecules/stat-card/stat-card.tsx
|
|
7927
8049
|
import clsx42 from "clsx";
|
|
7928
|
-
import { jsx as
|
|
8050
|
+
import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
7929
8051
|
var trendColors = {
|
|
7930
8052
|
up: "text-emerald-600 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/30",
|
|
7931
8053
|
down: "text-rose-600 bg-rose-50 dark:text-rose-400 dark:bg-rose-950/30",
|
|
@@ -7952,12 +8074,12 @@ function ITStatCard({
|
|
|
7952
8074
|
tabIndex: onClick ? 0 : void 0,
|
|
7953
8075
|
children: [
|
|
7954
8076
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-start justify-between mb-1", children: [
|
|
7955
|
-
/* @__PURE__ */
|
|
7956
|
-
icon && /* @__PURE__ */
|
|
8077
|
+
/* @__PURE__ */ jsx59(ITText, { as: "span", className: "text-xs font-medium text-slate-400 dark:text-slate-500", children: label }),
|
|
8078
|
+
icon && /* @__PURE__ */ jsx59("span", { className: "text-slate-400", children: icon })
|
|
7957
8079
|
] }),
|
|
7958
8080
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-baseline gap-2", children: [
|
|
7959
|
-
/* @__PURE__ */
|
|
7960
|
-
trend && /* @__PURE__ */
|
|
8081
|
+
/* @__PURE__ */ jsx59(ITText, { as: "span", className: "text-2xl font-bold text-slate-800 dark:text-white", children: value }),
|
|
8082
|
+
trend && /* @__PURE__ */ jsx59(ITText, { as: "span", className: clsx42("text-[11px] font-semibold px-1.5 py-0.5 rounded-md", trendColors[trendDirection]), children: trend })
|
|
7961
8083
|
] })
|
|
7962
8084
|
]
|
|
7963
8085
|
}
|
|
@@ -7976,7 +8098,7 @@ import {
|
|
|
7976
8098
|
} from "react-icons/fa";
|
|
7977
8099
|
import { MdOutlineSwapVert as MdOutlineSwapVert2 } from "react-icons/md";
|
|
7978
8100
|
import { isSameDay as isSameDay2, startOfDay as startOfDay2, endOfDay } from "date-fns";
|
|
7979
|
-
import { Fragment as Fragment9, jsx as
|
|
8101
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7980
8102
|
function ITTable({
|
|
7981
8103
|
columns,
|
|
7982
8104
|
data = [],
|
|
@@ -8107,6 +8229,7 @@ function ITTable({
|
|
|
8107
8229
|
const isStickyHeader = stickyHeader && isTableVirtual;
|
|
8108
8230
|
const resolvedRowHeight = rowHeight ?? getRowHeight(size, density);
|
|
8109
8231
|
const columnCount = columns.length;
|
|
8232
|
+
const pinnedMeta = React11.useMemo(() => getPinnedColumnMeta(columns), [columns]);
|
|
8110
8233
|
const {
|
|
8111
8234
|
scrollRef,
|
|
8112
8235
|
startIndex,
|
|
@@ -8131,14 +8254,14 @@ function ITTable({
|
|
|
8131
8254
|
if (currentValue === true) return "Filtrar solo verdaderos";
|
|
8132
8255
|
return "Filtrar solo falsos";
|
|
8133
8256
|
};
|
|
8134
|
-
return /* @__PURE__ */
|
|
8257
|
+
return /* @__PURE__ */ jsx60(
|
|
8135
8258
|
"button",
|
|
8136
8259
|
{
|
|
8137
8260
|
className: "flex items-center justify-center cursor-pointer focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 rounded-full p-1 transition-all duration-200",
|
|
8138
8261
|
onClick: () => handleFilterChange(col.key, nextValue),
|
|
8139
8262
|
"aria-label": `${getToggleLabel()} para ${col.label}`,
|
|
8140
8263
|
title: `${getToggleLabel()} para ${col.label}`,
|
|
8141
|
-
children: /* @__PURE__ */
|
|
8264
|
+
children: /* @__PURE__ */ jsx60("div", { className: "relative w-10 h-5 bg-secondary-300 rounded-full", children: /* @__PURE__ */ jsx60(
|
|
8142
8265
|
"div",
|
|
8143
8266
|
{
|
|
8144
8267
|
className: clsx43(
|
|
@@ -8156,7 +8279,7 @@ function ITTable({
|
|
|
8156
8279
|
}
|
|
8157
8280
|
if (col.filter === "catalog" && col.catalogOptions) {
|
|
8158
8281
|
if (col.catalogOptions.loading) {
|
|
8159
|
-
return /* @__PURE__ */
|
|
8282
|
+
return /* @__PURE__ */ jsx60(
|
|
8160
8283
|
FaSpinner3,
|
|
8161
8284
|
{
|
|
8162
8285
|
className: "animate-spin",
|
|
@@ -8166,9 +8289,9 @@ function ITTable({
|
|
|
8166
8289
|
);
|
|
8167
8290
|
}
|
|
8168
8291
|
if (col.catalogOptions.error) {
|
|
8169
|
-
return /* @__PURE__ */
|
|
8292
|
+
return /* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8170
8293
|
}
|
|
8171
|
-
return /* @__PURE__ */
|
|
8294
|
+
return /* @__PURE__ */ jsx60(
|
|
8172
8295
|
ITSelect,
|
|
8173
8296
|
{
|
|
8174
8297
|
name: `filter-${col.key}`,
|
|
@@ -8192,7 +8315,7 @@ function ITTable({
|
|
|
8192
8315
|
}
|
|
8193
8316
|
if (col.filter === "search" && col.catalogOptions) {
|
|
8194
8317
|
if (col.catalogOptions.loading) {
|
|
8195
|
-
return /* @__PURE__ */
|
|
8318
|
+
return /* @__PURE__ */ jsx60(
|
|
8196
8319
|
FaSpinner3,
|
|
8197
8320
|
{
|
|
8198
8321
|
className: "animate-spin",
|
|
@@ -8202,10 +8325,10 @@ function ITTable({
|
|
|
8202
8325
|
);
|
|
8203
8326
|
}
|
|
8204
8327
|
if (col.catalogOptions.error) {
|
|
8205
|
-
return /* @__PURE__ */
|
|
8328
|
+
return /* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8206
8329
|
}
|
|
8207
8330
|
const searchValue = filters[col.key];
|
|
8208
|
-
return /* @__PURE__ */
|
|
8331
|
+
return /* @__PURE__ */ jsx60(
|
|
8209
8332
|
ITSearchSelect,
|
|
8210
8333
|
{
|
|
8211
8334
|
name: `filter-${col.key}`,
|
|
@@ -8228,7 +8351,7 @@ function ITTable({
|
|
|
8228
8351
|
}
|
|
8229
8352
|
if (col.filter === "date") {
|
|
8230
8353
|
const dateValue = filters[col.key];
|
|
8231
|
-
return /* @__PURE__ */
|
|
8354
|
+
return /* @__PURE__ */ jsx60(
|
|
8232
8355
|
ITDatePicker,
|
|
8233
8356
|
{
|
|
8234
8357
|
name: `filter-${col.key}`,
|
|
@@ -8244,7 +8367,7 @@ function ITTable({
|
|
|
8244
8367
|
}
|
|
8245
8368
|
if (col.filter === "date-range") {
|
|
8246
8369
|
const rangeValue = filters[col.key];
|
|
8247
|
-
return /* @__PURE__ */
|
|
8370
|
+
return /* @__PURE__ */ jsx60(
|
|
8248
8371
|
ITDatePicker,
|
|
8249
8372
|
{
|
|
8250
8373
|
name: `filter-${col.key}`,
|
|
@@ -8259,7 +8382,7 @@ function ITTable({
|
|
|
8259
8382
|
}
|
|
8260
8383
|
);
|
|
8261
8384
|
}
|
|
8262
|
-
return /* @__PURE__ */
|
|
8385
|
+
return /* @__PURE__ */ jsx60(
|
|
8263
8386
|
ITInput,
|
|
8264
8387
|
{
|
|
8265
8388
|
name: `filter-${col.key}`,
|
|
@@ -8281,14 +8404,14 @@ function ITTable({
|
|
|
8281
8404
|
case "number":
|
|
8282
8405
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
8283
8406
|
case "boolean":
|
|
8284
|
-
return value ? /* @__PURE__ */
|
|
8407
|
+
return value ? /* @__PURE__ */ jsx60(
|
|
8285
8408
|
FaCheck4,
|
|
8286
8409
|
{
|
|
8287
8410
|
className: "text-success-500",
|
|
8288
8411
|
"aria-label": "Verdadero",
|
|
8289
8412
|
title: "Verdadero"
|
|
8290
8413
|
}
|
|
8291
|
-
) : /* @__PURE__ */
|
|
8414
|
+
) : /* @__PURE__ */ jsx60(
|
|
8292
8415
|
FaTimes9,
|
|
8293
8416
|
{
|
|
8294
8417
|
className: "text-danger-500",
|
|
@@ -8315,10 +8438,10 @@ function ITTable({
|
|
|
8315
8438
|
const actionCol = columns.find((c) => c.type === "actions");
|
|
8316
8439
|
return /* @__PURE__ */ jsxs46("div", { className: "bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 p-3 space-y-2 shadow-sm", children: [
|
|
8317
8440
|
dataCols.map((col) => /* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8318
|
-
/* @__PURE__ */
|
|
8319
|
-
/* @__PURE__ */
|
|
8441
|
+
/* @__PURE__ */ jsx60("span", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 whitespace-nowrap flex-shrink-0 min-w-[70px]", children: col.label }),
|
|
8442
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
|
|
8320
8443
|
] }, col.key)),
|
|
8321
|
-
actionCol?.actions && /* @__PURE__ */
|
|
8444
|
+
actionCol?.actions && /* @__PURE__ */ jsx60("div", { className: "flex items-center justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-700", children: actionCol.actions(row) })
|
|
8322
8445
|
] });
|
|
8323
8446
|
};
|
|
8324
8447
|
const handleRowClick = (row) => (event) => {
|
|
@@ -8332,9 +8455,9 @@ function ITTable({
|
|
|
8332
8455
|
event.preventDefault();
|
|
8333
8456
|
onRowClick(row, event);
|
|
8334
8457
|
};
|
|
8335
|
-
return /* @__PURE__ */
|
|
8458
|
+
return /* @__PURE__ */ jsx60("div", { ref: rootRef, className: clsx43("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ jsxs46("div", { className: tableContainer, style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8336
8459
|
title && /* @__PURE__ */ jsxs46("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8337
|
-
/* @__PURE__ */
|
|
8460
|
+
/* @__PURE__ */ jsx60(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
|
|
8338
8461
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
|
|
8339
8462
|
/* @__PURE__ */ jsxs46(
|
|
8340
8463
|
"button",
|
|
@@ -8343,7 +8466,7 @@ function ITTable({
|
|
|
8343
8466
|
disabled: forcedCards,
|
|
8344
8467
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${effectiveView === "table" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
|
|
8345
8468
|
children: [
|
|
8346
|
-
/* @__PURE__ */
|
|
8469
|
+
/* @__PURE__ */ jsx60(FaTable2, { size: 11 }),
|
|
8347
8470
|
"Table"
|
|
8348
8471
|
]
|
|
8349
8472
|
}
|
|
@@ -8354,14 +8477,14 @@ function ITTable({
|
|
|
8354
8477
|
onClick: () => setViewMode("cards"),
|
|
8355
8478
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${effectiveView === "cards" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
|
|
8356
8479
|
children: [
|
|
8357
|
-
/* @__PURE__ */
|
|
8480
|
+
/* @__PURE__ */ jsx60(FaThLarge2, { size: 11 }),
|
|
8358
8481
|
"Cards"
|
|
8359
8482
|
]
|
|
8360
8483
|
}
|
|
8361
8484
|
)
|
|
8362
8485
|
] })
|
|
8363
8486
|
] }),
|
|
8364
|
-
!title && /* @__PURE__ */
|
|
8487
|
+
!title && /* @__PURE__ */ jsx60("div", { className: "flex justify-end px-4 pt-3", children: /* @__PURE__ */ jsxs46("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
|
|
8365
8488
|
/* @__PURE__ */ jsxs46(
|
|
8366
8489
|
"button",
|
|
8367
8490
|
{
|
|
@@ -8369,7 +8492,7 @@ function ITTable({
|
|
|
8369
8492
|
disabled: forcedCards,
|
|
8370
8493
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${effectiveView === "table" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
|
|
8371
8494
|
children: [
|
|
8372
|
-
/* @__PURE__ */
|
|
8495
|
+
/* @__PURE__ */ jsx60(FaTable2, { size: 11 }),
|
|
8373
8496
|
"Table"
|
|
8374
8497
|
]
|
|
8375
8498
|
}
|
|
@@ -8380,13 +8503,13 @@ function ITTable({
|
|
|
8380
8503
|
onClick: () => setViewMode("cards"),
|
|
8381
8504
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${effectiveView === "cards" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
|
|
8382
8505
|
children: [
|
|
8383
|
-
/* @__PURE__ */
|
|
8506
|
+
/* @__PURE__ */ jsx60(FaThLarge2, { size: 11 }),
|
|
8384
8507
|
"Cards"
|
|
8385
8508
|
]
|
|
8386
8509
|
}
|
|
8387
8510
|
)
|
|
8388
8511
|
] }) }),
|
|
8389
|
-
effectiveView === "cards" ? /* @__PURE__ */
|
|
8512
|
+
effectiveView === "cards" ? /* @__PURE__ */ jsx60("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: currentData.length > 0 ? currentData.map((row, i) => /* @__PURE__ */ jsx60(
|
|
8390
8513
|
"div",
|
|
8391
8514
|
{
|
|
8392
8515
|
className: clsx43(tableCardHover, onRowClick && tableCardClickable),
|
|
@@ -8398,9 +8521,9 @@ function ITTable({
|
|
|
8398
8521
|
},
|
|
8399
8522
|
i
|
|
8400
8523
|
)) : /* @__PURE__ */ jsxs46("div", { className: clsx43(tableEmptyContent, "py-12"), children: [
|
|
8401
|
-
/* @__PURE__ */
|
|
8402
|
-
/* @__PURE__ */
|
|
8403
|
-
] }) }) : /* @__PURE__ */
|
|
8524
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8525
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8526
|
+
] }) }) : /* @__PURE__ */ jsx60(
|
|
8404
8527
|
"div",
|
|
8405
8528
|
{
|
|
8406
8529
|
ref: isTableVirtual ? scrollRef : void 0,
|
|
@@ -8419,56 +8542,64 @@ function ITTable({
|
|
|
8419
8542
|
style: isFixed ? { tableLayout: "fixed" } : void 0,
|
|
8420
8543
|
"aria-rowcount": isTableVirtual ? currentData.length + 1 : void 0,
|
|
8421
8544
|
children: [
|
|
8422
|
-
hasColumnWidths && /* @__PURE__ */
|
|
8545
|
+
hasColumnWidths && /* @__PURE__ */ jsx60("colgroup", { children: columns.map((col) => /* @__PURE__ */ jsx60(
|
|
8423
8546
|
"col",
|
|
8424
8547
|
{
|
|
8425
8548
|
style: col.width != null ? { width: typeof col.width === "number" ? `${col.width}px` : col.width } : void 0
|
|
8426
8549
|
},
|
|
8427
8550
|
col.key
|
|
8428
8551
|
)) }),
|
|
8429
|
-
/* @__PURE__ */
|
|
8552
|
+
/* @__PURE__ */ jsx60("thead", { children: /* @__PURE__ */ jsx60(
|
|
8430
8553
|
"tr",
|
|
8431
8554
|
{
|
|
8432
8555
|
className: clsx43(tableHeaderRow, "dark:text-slate-200"),
|
|
8433
8556
|
"aria-rowindex": isTableVirtual ? 1 : void 0,
|
|
8434
|
-
children: columns.map((col) =>
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
col.
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8557
|
+
children: columns.map((col) => {
|
|
8558
|
+
const pin = pinnedMeta[col.key];
|
|
8559
|
+
const isPinned = pin != null;
|
|
8560
|
+
return /* @__PURE__ */ jsx60(
|
|
8561
|
+
"th",
|
|
8562
|
+
{
|
|
8563
|
+
scope: "col",
|
|
8564
|
+
className: clsx43(
|
|
8565
|
+
tableHeaderCell(col.className, density),
|
|
8566
|
+
col.align && tableAlignClasses[col.align],
|
|
8567
|
+
isPinned && "sticky",
|
|
8568
|
+
isStickyHeader && "sticky top-0 bg-secondary-50",
|
|
8569
|
+
isPinned ? "z-[15]" : isStickyHeader && "z-10",
|
|
8570
|
+
isPinned && (col.pinned === "left" ? "it-table-pinned-left" : "it-table-pinned-right")
|
|
8571
|
+
),
|
|
8572
|
+
style: col.minWidth != null || isStickyHeader || isPinned ? {
|
|
8573
|
+
...col.minWidth != null ? { minWidth: `${col.minWidth}px` } : {},
|
|
8574
|
+
...isStickyHeader || isPinned ? { backgroundColor: "var(--color-table-headerBg, #f8fafc)" } : {},
|
|
8575
|
+
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8576
|
+
} : void 0,
|
|
8577
|
+
children: /* @__PURE__ */ jsxs46("div", { className: isFixed ? "flex flex-col gap-3" : "flex flex-col gap-3 min-w-[150px]", children: [
|
|
8578
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8579
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
|
|
8580
|
+
col.sortable && col.type !== "actions" && /* @__PURE__ */ jsx60(
|
|
8581
|
+
"button",
|
|
8582
|
+
{
|
|
8583
|
+
onClick: () => handleSort(col.key),
|
|
8584
|
+
className: `p-1 rounded-md transition-colors ${sortConfig?.key === col.key ? "bg-secondary-200 text-secondary-900" : "hover:bg-secondary-200 text-secondary-400 hover:text-secondary-700"}`,
|
|
8585
|
+
title: `Ordenar por ${col.label}`,
|
|
8586
|
+
children: /* @__PURE__ */ jsx60(MdOutlineSwapVert2, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
8587
|
+
}
|
|
8588
|
+
)
|
|
8589
|
+
] }),
|
|
8590
|
+
/* @__PURE__ */ jsx60("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
|
|
8591
|
+
] })
|
|
8592
|
+
},
|
|
8593
|
+
col.key
|
|
8594
|
+
);
|
|
8595
|
+
})
|
|
8465
8596
|
}
|
|
8466
8597
|
) }),
|
|
8467
|
-
/* @__PURE__ */
|
|
8468
|
-
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */
|
|
8598
|
+
/* @__PURE__ */ jsx60("tbody", { className: clsx43(tableBody, "dark:divide-slate-700/30"), children: currentData.length > 0 ? /* @__PURE__ */ jsxs46(Fragment9, { children: [
|
|
8599
|
+
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */ jsx60("tr", { "aria-hidden": "true", style: { height: topSpacerHeight }, children: /* @__PURE__ */ jsx60("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) }),
|
|
8469
8600
|
windowData.map((row, windowIndex) => {
|
|
8470
8601
|
const absoluteIndex = isTableVirtual ? startIndex + windowIndex : windowIndex;
|
|
8471
|
-
return /* @__PURE__ */
|
|
8602
|
+
return /* @__PURE__ */ jsx60(
|
|
8472
8603
|
"tr",
|
|
8473
8604
|
{
|
|
8474
8605
|
"aria-rowindex": isTableVirtual ? absoluteIndex + 2 : void 0,
|
|
@@ -8483,16 +8614,24 @@ function ITTable({
|
|
|
8483
8614
|
children: columns.map((col) => {
|
|
8484
8615
|
const rawValue = getNestedValue(row, col.key);
|
|
8485
8616
|
const truncateTitle = col.truncate && (typeof rawValue === "string" || typeof rawValue === "number") ? String(rawValue) : void 0;
|
|
8486
|
-
|
|
8617
|
+
const pin = pinnedMeta[col.key];
|
|
8618
|
+
const isPinned = pin != null;
|
|
8619
|
+
return /* @__PURE__ */ jsx60(
|
|
8487
8620
|
"td",
|
|
8488
8621
|
{
|
|
8489
8622
|
className: clsx43(
|
|
8490
8623
|
tableCell(col.className, density),
|
|
8491
|
-
col.align && tableAlignClasses[col.align]
|
|
8624
|
+
col.align && tableAlignClasses[col.align],
|
|
8625
|
+
isPinned && "sticky bg-[var(--color-table-rowBg,white)] group-hover:bg-[var(--color-table-rowHover,var(--color-secondary-50))]",
|
|
8626
|
+
isPinned && (col.pinned === "left" ? "it-table-pinned-left" : "it-table-pinned-right"),
|
|
8627
|
+
isPinned && "z-[1]"
|
|
8492
8628
|
),
|
|
8493
|
-
style: col.minWidth != null
|
|
8629
|
+
style: col.minWidth != null || isPinned ? {
|
|
8630
|
+
...col.minWidth != null ? { minWidth: `${col.minWidth}px` } : {},
|
|
8631
|
+
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8632
|
+
} : void 0,
|
|
8494
8633
|
title: truncateTitle,
|
|
8495
|
-
children: col.type === "actions" ? /* @__PURE__ */
|
|
8634
|
+
children: col.type === "actions" ? /* @__PURE__ */ jsx60("div", { className: tableActionsCell, children: renderCellContent(col, row) }) : /* @__PURE__ */ jsx60("div", { className: clsx43(tableCellText, col.truncate && "truncate"), children: renderCellContent(col, row) })
|
|
8496
8635
|
},
|
|
8497
8636
|
`${absoluteIndex}-${col.key}`
|
|
8498
8637
|
);
|
|
@@ -8501,17 +8640,17 @@ function ITTable({
|
|
|
8501
8640
|
absoluteIndex
|
|
8502
8641
|
);
|
|
8503
8642
|
}),
|
|
8504
|
-
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */
|
|
8505
|
-
] }) : /* @__PURE__ */
|
|
8506
|
-
/* @__PURE__ */
|
|
8507
|
-
/* @__PURE__ */
|
|
8643
|
+
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */ jsx60("tr", { "aria-hidden": "true", style: { height: bottomSpacerHeight }, children: /* @__PURE__ */ jsx60("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) })
|
|
8644
|
+
] }) : /* @__PURE__ */ jsx60("tr", { children: /* @__PURE__ */ jsx60("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ jsxs46("div", { className: tableEmptyContent, children: [
|
|
8645
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8646
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8508
8647
|
] }) }) }) })
|
|
8509
8648
|
]
|
|
8510
8649
|
}
|
|
8511
8650
|
)
|
|
8512
8651
|
}
|
|
8513
8652
|
),
|
|
8514
|
-
/* @__PURE__ */
|
|
8653
|
+
/* @__PURE__ */ jsx60("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx60(
|
|
8515
8654
|
ITPagination,
|
|
8516
8655
|
{
|
|
8517
8656
|
currentPage,
|
|
@@ -8529,7 +8668,7 @@ function ITTable({
|
|
|
8529
8668
|
|
|
8530
8669
|
// src/components/atoms/textarea/textarea.tsx
|
|
8531
8670
|
import clsx44 from "clsx";
|
|
8532
|
-
import { jsx as
|
|
8671
|
+
import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
8533
8672
|
var resizeMap = {
|
|
8534
8673
|
none: "resize-none",
|
|
8535
8674
|
vertical: "resize-y",
|
|
@@ -8550,8 +8689,8 @@ function ITTextarea({
|
|
|
8550
8689
|
resize = "vertical"
|
|
8551
8690
|
}) {
|
|
8552
8691
|
return /* @__PURE__ */ jsxs47("div", { className: clsx44("flex flex-col gap-1.5", className), children: [
|
|
8553
|
-
label && /* @__PURE__ */
|
|
8554
|
-
/* @__PURE__ */
|
|
8692
|
+
label && /* @__PURE__ */ jsx61(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
8693
|
+
/* @__PURE__ */ jsx61(
|
|
8555
8694
|
"textarea",
|
|
8556
8695
|
{
|
|
8557
8696
|
id: name,
|
|
@@ -8571,14 +8710,14 @@ function ITTextarea({
|
|
|
8571
8710
|
)
|
|
8572
8711
|
}
|
|
8573
8712
|
),
|
|
8574
|
-
error && /* @__PURE__ */
|
|
8713
|
+
error && /* @__PURE__ */ jsx61(ITText, { as: "span", className: inputError, children: error })
|
|
8575
8714
|
] });
|
|
8576
8715
|
}
|
|
8577
8716
|
|
|
8578
8717
|
// src/components/molecules/tabs/tabs.tsx
|
|
8579
8718
|
import { useState as useState30 } from "react";
|
|
8580
8719
|
import { clsx as clsx45 } from "clsx";
|
|
8581
|
-
import { jsx as
|
|
8720
|
+
import { jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
8582
8721
|
var ITTabs = ({
|
|
8583
8722
|
items,
|
|
8584
8723
|
defaultActiveId,
|
|
@@ -8595,7 +8734,7 @@ var ITTabs = ({
|
|
|
8595
8734
|
};
|
|
8596
8735
|
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
8597
8736
|
return /* @__PURE__ */ jsxs48("div", { className: clsx45("w-full", containerClassName), children: [
|
|
8598
|
-
/* @__PURE__ */
|
|
8737
|
+
/* @__PURE__ */ jsx62("div", { className: clsx45(
|
|
8599
8738
|
"flex border-secondary-200 mb-4",
|
|
8600
8739
|
variant === "line" ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
|
|
8601
8740
|
className
|
|
@@ -8621,21 +8760,21 @@ var ITTabs = ({
|
|
|
8621
8760
|
item.disabled && "opacity-50 cursor-not-allowed"
|
|
8622
8761
|
),
|
|
8623
8762
|
children: [
|
|
8624
|
-
item.icon && /* @__PURE__ */
|
|
8625
|
-
/* @__PURE__ */
|
|
8763
|
+
item.icon && /* @__PURE__ */ jsx62("span", { className: "w-4 h-4", children: item.icon }),
|
|
8764
|
+
/* @__PURE__ */ jsx62(ITText, { as: "span", children: item.label })
|
|
8626
8765
|
]
|
|
8627
8766
|
},
|
|
8628
8767
|
item.id
|
|
8629
8768
|
);
|
|
8630
8769
|
}) }),
|
|
8631
|
-
/* @__PURE__ */
|
|
8770
|
+
/* @__PURE__ */ jsx62("div", { className: "tab-content animate-fadeIn", children: activeContent })
|
|
8632
8771
|
] });
|
|
8633
8772
|
};
|
|
8634
8773
|
var tabs_default = ITTabs;
|
|
8635
8774
|
|
|
8636
8775
|
// src/components/organisms/triple-filter/tripleFilter.tsx
|
|
8637
8776
|
import clsx46 from "clsx";
|
|
8638
|
-
import { jsx as
|
|
8777
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
8639
8778
|
var colorMap2 = {
|
|
8640
8779
|
primary: "text-primary-600",
|
|
8641
8780
|
secondary: "text-secondary-600",
|
|
@@ -8654,11 +8793,11 @@ var ITTripleFilter = ({
|
|
|
8654
8793
|
color = "primary",
|
|
8655
8794
|
className
|
|
8656
8795
|
}) => {
|
|
8657
|
-
return /* @__PURE__ */
|
|
8796
|
+
return /* @__PURE__ */ jsx63(
|
|
8658
8797
|
"div",
|
|
8659
8798
|
{
|
|
8660
8799
|
className: clsx46("flex bg-slate-100 p-1 rounded-xl gap-1 w-fit", className),
|
|
8661
|
-
children: options.map((option) => /* @__PURE__ */
|
|
8800
|
+
children: options.map((option) => /* @__PURE__ */ jsx63(
|
|
8662
8801
|
"button",
|
|
8663
8802
|
{
|
|
8664
8803
|
onClick: () => onChange(option.value),
|
|
@@ -8666,7 +8805,7 @@ var ITTripleFilter = ({
|
|
|
8666
8805
|
"px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap",
|
|
8667
8806
|
value === option.value ? clsx46("bg-white shadow-sm", colorMap2[color]) : "text-slate-400 hover:text-slate-600"
|
|
8668
8807
|
),
|
|
8669
|
-
children: /* @__PURE__ */
|
|
8808
|
+
children: /* @__PURE__ */ jsx63(ITText, { as: "span", children: option.label })
|
|
8670
8809
|
},
|
|
8671
8810
|
String(option.value)
|
|
8672
8811
|
))
|
|
@@ -8689,7 +8828,7 @@ var positionStyles = {
|
|
|
8689
8828
|
import clsx47 from "clsx";
|
|
8690
8829
|
import { useEffect as useEffect15, useState as useState31 } from "react";
|
|
8691
8830
|
import { FaTimesCircle as FaTimesCircle2, FaCheckCircle as FaCheckCircle2, FaExclamationTriangle as FaExclamationTriangle3, FaInfoCircle as FaInfoCircle2, FaTimes as FaTimes10 } from "react-icons/fa";
|
|
8692
|
-
import { jsx as
|
|
8831
|
+
import { jsx as jsx64, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
8693
8832
|
function ITToast({
|
|
8694
8833
|
message,
|
|
8695
8834
|
type = "info",
|
|
@@ -8718,15 +8857,15 @@ function ITToast({
|
|
|
8718
8857
|
const TypeIcon = () => {
|
|
8719
8858
|
switch (type) {
|
|
8720
8859
|
case "success":
|
|
8721
|
-
return /* @__PURE__ */
|
|
8860
|
+
return /* @__PURE__ */ jsx64(FaCheckCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8722
8861
|
case "error":
|
|
8723
8862
|
case "danger":
|
|
8724
|
-
return /* @__PURE__ */
|
|
8863
|
+
return /* @__PURE__ */ jsx64(FaTimesCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8725
8864
|
case "warning":
|
|
8726
|
-
return /* @__PURE__ */
|
|
8865
|
+
return /* @__PURE__ */ jsx64(FaExclamationTriangle3, { className: "w-5 h-5 flex-shrink-0" });
|
|
8727
8866
|
case "info":
|
|
8728
8867
|
default:
|
|
8729
|
-
return /* @__PURE__ */
|
|
8868
|
+
return /* @__PURE__ */ jsx64(FaInfoCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8730
8869
|
}
|
|
8731
8870
|
};
|
|
8732
8871
|
return /* @__PURE__ */ jsxs49(
|
|
@@ -8746,16 +8885,16 @@ function ITToast({
|
|
|
8746
8885
|
role: "alert",
|
|
8747
8886
|
children: [
|
|
8748
8887
|
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-3", children: [
|
|
8749
|
-
/* @__PURE__ */
|
|
8750
|
-
/* @__PURE__ */
|
|
8888
|
+
/* @__PURE__ */ jsx64(TypeIcon, {}),
|
|
8889
|
+
/* @__PURE__ */ jsx64(ITText, { as: "span", className: "font-medium text-sm sm:text-base leading-snug", children: message })
|
|
8751
8890
|
] }),
|
|
8752
|
-
/* @__PURE__ */
|
|
8891
|
+
/* @__PURE__ */ jsx64(
|
|
8753
8892
|
"button",
|
|
8754
8893
|
{
|
|
8755
8894
|
onClick: handleClose,
|
|
8756
8895
|
className: "p-1.5 rounded-full hover:bg-black/15 transition-colors focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
8757
8896
|
"aria-label": "Close notification",
|
|
8758
|
-
children: /* @__PURE__ */
|
|
8897
|
+
children: /* @__PURE__ */ jsx64(FaTimes10, { className: "w-4 h-4" })
|
|
8759
8898
|
}
|
|
8760
8899
|
)
|
|
8761
8900
|
]
|
|
@@ -8795,7 +8934,7 @@ var toolbarActions = [
|
|
|
8795
8934
|
// src/components/atoms/tooltip/tooltip.tsx
|
|
8796
8935
|
import { useState as useState32 } from "react";
|
|
8797
8936
|
import clsx48 from "clsx";
|
|
8798
|
-
import { jsx as
|
|
8937
|
+
import { jsx as jsx65, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
8799
8938
|
var positionClasses2 = {
|
|
8800
8939
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
8801
8940
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -8833,8 +8972,8 @@ function ITTooltip({
|
|
|
8833
8972
|
children: [
|
|
8834
8973
|
children,
|
|
8835
8974
|
visible && /* @__PURE__ */ jsxs50("div", { className: clsx48("absolute z-[70] pointer-events-none", positionClasses2[position]), children: [
|
|
8836
|
-
/* @__PURE__ */
|
|
8837
|
-
/* @__PURE__ */
|
|
8975
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-slate-800 dark:bg-slate-700 text-white text-xs rounded-lg px-2.5 py-1.5 whitespace-nowrap shadow-lg", children: /* @__PURE__ */ jsx65(ITText, { as: "span", children: content }) }),
|
|
8976
|
+
/* @__PURE__ */ jsx65("div", { className: clsx48("absolute", arrowClasses[position]) })
|
|
8838
8977
|
] })
|
|
8839
8978
|
]
|
|
8840
8979
|
}
|
|
@@ -8842,16 +8981,16 @@ function ITTooltip({
|
|
|
8842
8981
|
}
|
|
8843
8982
|
|
|
8844
8983
|
// src/components/molecules/wysiwyg/wysiwyg.tsx
|
|
8845
|
-
import { jsx as
|
|
8984
|
+
import { jsx as jsx66, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8846
8985
|
var INLINE_TAGS = /* @__PURE__ */ new Set(["STRONG", "B", "EM", "I", "U", "MARK"]);
|
|
8847
8986
|
var ACTION_META = {
|
|
8848
|
-
bold: { label: "Negrita", icon: /* @__PURE__ */
|
|
8849
|
-
italic: { label: "It\xE1lica", icon: /* @__PURE__ */
|
|
8850
|
-
underline: { label: "Subrayado", icon: /* @__PURE__ */
|
|
8851
|
-
highlight: { label: "Marcador", icon: /* @__PURE__ */
|
|
8852
|
-
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */
|
|
8853
|
-
ol: { label: "Lista numerada", icon: /* @__PURE__ */
|
|
8854
|
-
clear: { label: "Limpiar formato", icon: /* @__PURE__ */
|
|
8987
|
+
bold: { label: "Negrita", icon: /* @__PURE__ */ jsx66(FaBold, {}) },
|
|
8988
|
+
italic: { label: "It\xE1lica", icon: /* @__PURE__ */ jsx66(FaItalic, {}) },
|
|
8989
|
+
underline: { label: "Subrayado", icon: /* @__PURE__ */ jsx66(FaUnderline, {}) },
|
|
8990
|
+
highlight: { label: "Marcador", icon: /* @__PURE__ */ jsx66(FaHighlighter, {}) },
|
|
8991
|
+
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */ jsx66(FaListUl, {}) },
|
|
8992
|
+
ol: { label: "Lista numerada", icon: /* @__PURE__ */ jsx66(FaListOl, {}) },
|
|
8993
|
+
clear: { label: "Limpiar formato", icon: /* @__PURE__ */ jsx66(FaEraser, {}) }
|
|
8855
8994
|
};
|
|
8856
8995
|
function ITWysiwyg({
|
|
8857
8996
|
value,
|
|
@@ -9267,7 +9406,7 @@ function ITWysiwyg({
|
|
|
9267
9406
|
}) => {
|
|
9268
9407
|
const meta = ACTION_META[action];
|
|
9269
9408
|
const isActive = !!active[action];
|
|
9270
|
-
return /* @__PURE__ */
|
|
9409
|
+
return /* @__PURE__ */ jsx66(ITTooltip, { content: meta.label, children: /* @__PURE__ */ jsx66(
|
|
9271
9410
|
"button",
|
|
9272
9411
|
{
|
|
9273
9412
|
type: "button",
|
|
@@ -9288,7 +9427,7 @@ function ITWysiwyg({
|
|
|
9288
9427
|
) });
|
|
9289
9428
|
};
|
|
9290
9429
|
return /* @__PURE__ */ jsxs51("div", { className: inputWrapper(className), children: [
|
|
9291
|
-
label && /* @__PURE__ */
|
|
9430
|
+
label && /* @__PURE__ */ jsx66(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
9292
9431
|
/* @__PURE__ */ jsxs51(
|
|
9293
9432
|
"div",
|
|
9294
9433
|
{
|
|
@@ -9298,7 +9437,7 @@ function ITWysiwyg({
|
|
|
9298
9437
|
isLocked && "opacity-50 cursor-not-allowed bg-secondary-100 dark:bg-slate-800"
|
|
9299
9438
|
),
|
|
9300
9439
|
children: [
|
|
9301
|
-
/* @__PURE__ */
|
|
9440
|
+
/* @__PURE__ */ jsx66(
|
|
9302
9441
|
"div",
|
|
9303
9442
|
{
|
|
9304
9443
|
className: clsx49(
|
|
@@ -9306,12 +9445,12 @@ function ITWysiwyg({
|
|
|
9306
9445
|
isLocked && "bg-secondary-100 dark:bg-slate-900"
|
|
9307
9446
|
),
|
|
9308
9447
|
children: toolbar.map((action, i) => /* @__PURE__ */ jsxs51("span", { className: "flex items-center", children: [
|
|
9309
|
-
i > 0 && (action === "ul" || action === "ol" || action === "clear") && /* @__PURE__ */
|
|
9310
|
-
/* @__PURE__ */
|
|
9448
|
+
i > 0 && (action === "ul" || action === "ol" || action === "clear") && /* @__PURE__ */ jsx66("span", { className: "mx-1 h-4 w-px bg-secondary-200 dark:bg-slate-600" }),
|
|
9449
|
+
/* @__PURE__ */ jsx66(ToolbarButton, { action })
|
|
9311
9450
|
] }, action))
|
|
9312
9451
|
}
|
|
9313
9452
|
),
|
|
9314
|
-
/* @__PURE__ */
|
|
9453
|
+
/* @__PURE__ */ jsx66(
|
|
9315
9454
|
"div",
|
|
9316
9455
|
{
|
|
9317
9456
|
id: name,
|
|
@@ -9345,7 +9484,7 @@ function ITWysiwyg({
|
|
|
9345
9484
|
]
|
|
9346
9485
|
}
|
|
9347
9486
|
),
|
|
9348
|
-
error && /* @__PURE__ */
|
|
9487
|
+
error && /* @__PURE__ */ jsx66(ITText, { as: "span", className: inputError, children: error })
|
|
9349
9488
|
] });
|
|
9350
9489
|
}
|
|
9351
9490
|
|
|
@@ -9380,7 +9519,7 @@ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
|
|
|
9380
9519
|
})(UploadStatus || {});
|
|
9381
9520
|
|
|
9382
9521
|
// src/components/organisms/dropfile/dropfile.tsx
|
|
9383
|
-
import { Fragment as Fragment10, jsx as
|
|
9522
|
+
import { Fragment as Fragment10, jsx as jsx67, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
9384
9523
|
var ITDropfile = ({
|
|
9385
9524
|
onFileSelect,
|
|
9386
9525
|
onCancel,
|
|
@@ -9520,8 +9659,8 @@ var ITDropfile = ({
|
|
|
9520
9659
|
};
|
|
9521
9660
|
const { label, color, dotColor } = config2[status];
|
|
9522
9661
|
return /* @__PURE__ */ jsxs52("div", { className: `inline-flex items-center gap-2 px-2.5 py-1 rounded-full border ${color}`, children: [
|
|
9523
|
-
/* @__PURE__ */
|
|
9524
|
-
/* @__PURE__ */
|
|
9662
|
+
/* @__PURE__ */ jsx67("div", { className: `w-2 h-2 rounded-full ${dotColor}` }),
|
|
9663
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", className: "text-xs font-medium flex items-center gap-1.5", children: label })
|
|
9525
9664
|
] });
|
|
9526
9665
|
};
|
|
9527
9666
|
const onDrop = (acceptedFiles) => {
|
|
@@ -9614,16 +9753,16 @@ var ITDropfile = ({
|
|
|
9614
9753
|
}, [view, isConfirmed, uploadStatus, externalStatus, onStatusChange]);
|
|
9615
9754
|
const headerRow = /* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between mb-2", children: [
|
|
9616
9755
|
/* @__PURE__ */ jsxs52("label", { className: "block text-sm font-semibold text-secondary-700", children: [
|
|
9617
|
-
/* @__PURE__ */
|
|
9756
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", children: "Subir archivo " }),
|
|
9618
9757
|
/* @__PURE__ */ jsxs52(ITText, { as: "span", className: "text-secondary-400 font-normal text-xs", children: [
|
|
9619
9758
|
"(",
|
|
9620
9759
|
getFileExtensions(),
|
|
9621
9760
|
")"
|
|
9622
9761
|
] })
|
|
9623
9762
|
] }),
|
|
9624
|
-
showStatusBadge && selectedFile && /* @__PURE__ */
|
|
9763
|
+
showStatusBadge && selectedFile && /* @__PURE__ */ jsx67(StatusBadge, { status: uploadStatus })
|
|
9625
9764
|
] });
|
|
9626
|
-
const dropZoneOrPreview = /* @__PURE__ */
|
|
9765
|
+
const dropZoneOrPreview = /* @__PURE__ */ jsx67(Fragment10, { children: !selectedFile && !imagePreview ? /* @__PURE__ */ jsxs52(
|
|
9627
9766
|
"div",
|
|
9628
9767
|
{
|
|
9629
9768
|
...getRootProps(),
|
|
@@ -9633,29 +9772,29 @@ var ITDropfile = ({
|
|
|
9633
9772
|
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-secondary-300 bg-white hover:border-primary-400 hover:bg-secondary-50"}
|
|
9634
9773
|
`,
|
|
9635
9774
|
children: [
|
|
9636
|
-
/* @__PURE__ */
|
|
9637
|
-
/* @__PURE__ */
|
|
9775
|
+
/* @__PURE__ */ jsx67("input", { ...getInputProps() }),
|
|
9776
|
+
/* @__PURE__ */ jsx67("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__ */ jsx67(
|
|
9638
9777
|
"svg",
|
|
9639
9778
|
{
|
|
9640
9779
|
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-secondary-400 group-hover:text-primary-500"}`,
|
|
9641
9780
|
fill: "none",
|
|
9642
9781
|
viewBox: "0 0 24 24",
|
|
9643
9782
|
stroke: "currentColor",
|
|
9644
|
-
children: /* @__PURE__ */
|
|
9783
|
+
children: /* @__PURE__ */ jsx67("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" })
|
|
9645
9784
|
}
|
|
9646
9785
|
) }),
|
|
9647
|
-
/* @__PURE__ */
|
|
9786
|
+
/* @__PURE__ */ jsx67("div", { className: "text-center space-y-1", children: /* @__PURE__ */ jsx67(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" }) })
|
|
9648
9787
|
]
|
|
9649
9788
|
}
|
|
9650
9789
|
) : /* @__PURE__ */ jsxs52("div", { className: "w-full bg-white border border-secondary-200 rounded-xl shadow-sm overflow-hidden animate-fade-in", children: [
|
|
9651
|
-
/* @__PURE__ */
|
|
9652
|
-
/* @__PURE__ */
|
|
9790
|
+
/* @__PURE__ */ jsx67("div", { className: "flex items-center justify-between p-3 bg-secondary-50 border-b border-secondary-100", children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
9791
|
+
/* @__PURE__ */ jsx67("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__ */ jsx67("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("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__ */ jsx67("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("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" }) }) }),
|
|
9653
9792
|
/* @__PURE__ */ jsxs52("div", { className: "min-w-0", children: [
|
|
9654
|
-
/* @__PURE__ */
|
|
9655
|
-
/* @__PURE__ */
|
|
9793
|
+
/* @__PURE__ */ jsx67(ITText, { as: "p", className: "text-xs font-medium text-secondary-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
9794
|
+
/* @__PURE__ */ jsx67(ITText, { as: "p", className: "text-[10px] text-secondary-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
9656
9795
|
] })
|
|
9657
9796
|
] }) }),
|
|
9658
|
-
/* @__PURE__ */
|
|
9797
|
+
/* @__PURE__ */ jsx67("div", { className: clsx50("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__ */ jsx67(
|
|
9659
9798
|
"img",
|
|
9660
9799
|
{
|
|
9661
9800
|
src: imagePreview,
|
|
@@ -9663,11 +9802,11 @@ var ITDropfile = ({
|
|
|
9663
9802
|
className: "w-full h-full object-contain max-h-[200px]"
|
|
9664
9803
|
}
|
|
9665
9804
|
) : /* @__PURE__ */ jsxs52("div", { className: "py-8 flex flex-col items-center text-secondary-400", children: [
|
|
9666
|
-
/* @__PURE__ */
|
|
9667
|
-
/* @__PURE__ */
|
|
9805
|
+
/* @__PURE__ */ jsx67("svg", { className: "w-10 h-10 mb-2 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("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" }) }),
|
|
9806
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", className: "text-xs", children: "Sin vista previa" })
|
|
9668
9807
|
] }) }),
|
|
9669
|
-
/* @__PURE__ */
|
|
9670
|
-
/* @__PURE__ */
|
|
9808
|
+
/* @__PURE__ */ jsx67("div", { className: "px-3 py-2 bg-white border-t border-secondary-100 flex justify-end gap-2", children: !isConfirmed ? /* @__PURE__ */ jsxs52(Fragment10, { children: [
|
|
9809
|
+
/* @__PURE__ */ jsx67(
|
|
9671
9810
|
ITButton,
|
|
9672
9811
|
{
|
|
9673
9812
|
type: "button",
|
|
@@ -9675,10 +9814,10 @@ var ITDropfile = ({
|
|
|
9675
9814
|
color: "secondary",
|
|
9676
9815
|
size: "sm",
|
|
9677
9816
|
onClick: handleCancel,
|
|
9678
|
-
children: /* @__PURE__ */
|
|
9817
|
+
children: /* @__PURE__ */ jsx67(ITText, { children: "Cancelar" })
|
|
9679
9818
|
}
|
|
9680
9819
|
),
|
|
9681
|
-
/* @__PURE__ */
|
|
9820
|
+
/* @__PURE__ */ jsx67(
|
|
9682
9821
|
ITButton,
|
|
9683
9822
|
{
|
|
9684
9823
|
type: "button",
|
|
@@ -9687,8 +9826,8 @@ var ITDropfile = ({
|
|
|
9687
9826
|
size: "sm",
|
|
9688
9827
|
onClick: handleConfirm,
|
|
9689
9828
|
children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2", children: [
|
|
9690
|
-
/* @__PURE__ */
|
|
9691
|
-
/* @__PURE__ */
|
|
9829
|
+
/* @__PURE__ */ jsx67(ITText, { children: "Confirmar" }),
|
|
9830
|
+
/* @__PURE__ */ jsx67("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
9692
9831
|
] })
|
|
9693
9832
|
}
|
|
9694
9833
|
)
|
|
@@ -9701,12 +9840,12 @@ var ITDropfile = ({
|
|
|
9701
9840
|
size: "sm",
|
|
9702
9841
|
onClick: handleDelete,
|
|
9703
9842
|
children: [
|
|
9704
|
-
/* @__PURE__ */
|
|
9705
|
-
/* @__PURE__ */
|
|
9843
|
+
/* @__PURE__ */ jsx67("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("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" }) }),
|
|
9844
|
+
/* @__PURE__ */ jsx67(ITText, { children: "Eliminar" })
|
|
9706
9845
|
]
|
|
9707
9846
|
}
|
|
9708
9847
|
) }),
|
|
9709
|
-
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */
|
|
9848
|
+
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */ jsx67("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsx67("div", { className: "w-full bg-secondary-200 rounded-full h-1.5", children: /* @__PURE__ */ jsx67(
|
|
9710
9849
|
"div",
|
|
9711
9850
|
{
|
|
9712
9851
|
className: "bg-primary-600 h-1.5 rounded-full transition-all duration-1000 ease-out",
|
|
@@ -9720,7 +9859,7 @@ var ITDropfile = ({
|
|
|
9720
9859
|
if (view === "button") {
|
|
9721
9860
|
const hasFile = Boolean(selectedFile || imagePreview);
|
|
9722
9861
|
return /* @__PURE__ */ jsxs52("div", { className: clsx50("inline-block", containerClassName), children: [
|
|
9723
|
-
/* @__PURE__ */
|
|
9862
|
+
/* @__PURE__ */ jsx67(
|
|
9724
9863
|
ITButton,
|
|
9725
9864
|
{
|
|
9726
9865
|
type: "button",
|
|
@@ -9729,13 +9868,13 @@ var ITDropfile = ({
|
|
|
9729
9868
|
size: "sm",
|
|
9730
9869
|
onClick: () => setIsModalOpen(true),
|
|
9731
9870
|
children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2 max-w-[220px]", children: [
|
|
9732
|
-
/* @__PURE__ */
|
|
9733
|
-
/* @__PURE__ */
|
|
9734
|
-
showStatusBadge && hasFile && /* @__PURE__ */
|
|
9871
|
+
/* @__PURE__ */ jsx67("svg", { className: "w-4 h-4 flex-shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("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" }) }),
|
|
9872
|
+
/* @__PURE__ */ jsx67(ITText, { className: "truncate", children: selectedFile?.name || (hasFile ? "Archivo cargado" : buttonLabel) }),
|
|
9873
|
+
showStatusBadge && hasFile && /* @__PURE__ */ jsx67(StatusBadge, { status: uploadStatus })
|
|
9735
9874
|
] })
|
|
9736
9875
|
}
|
|
9737
9876
|
),
|
|
9738
|
-
/* @__PURE__ */
|
|
9877
|
+
/* @__PURE__ */ jsx67(ITDialog, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), title: modalTitle ?? buttonLabel, children: /* @__PURE__ */ jsxs52("div", { className: "w-full transition-all duration-300", children: [
|
|
9739
9878
|
headerRow,
|
|
9740
9879
|
dropZoneOrPreview
|
|
9741
9880
|
] }) })
|
|
@@ -9755,7 +9894,7 @@ import clsx51 from "clsx";
|
|
|
9755
9894
|
// src/components/organisms/topbar/topbar.tsx
|
|
9756
9895
|
import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
|
|
9757
9896
|
import { useRef as useRef22, useState as useState35 } from "react";
|
|
9758
|
-
import { jsx as
|
|
9897
|
+
import { jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9759
9898
|
function ITTopBar({
|
|
9760
9899
|
logo,
|
|
9761
9900
|
logoText,
|
|
@@ -9770,7 +9909,7 @@ function ITTopBar({
|
|
|
9770
9909
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState35(false);
|
|
9771
9910
|
const userMenuRef = useRef22(null);
|
|
9772
9911
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
9773
|
-
return /* @__PURE__ */
|
|
9912
|
+
return /* @__PURE__ */ jsx68(
|
|
9774
9913
|
"header",
|
|
9775
9914
|
{
|
|
9776
9915
|
className: "sticky top-0 z-40 backdrop-blur-md transition-all duration-300",
|
|
@@ -9781,7 +9920,7 @@ function ITTopBar({
|
|
|
9781
9920
|
},
|
|
9782
9921
|
children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-between h-[72px] px-6 lg:px-8", children: [
|
|
9783
9922
|
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-5", children: [
|
|
9784
|
-
showMobileMenuButton && /* @__PURE__ */
|
|
9923
|
+
showMobileMenuButton && /* @__PURE__ */ jsx68(
|
|
9785
9924
|
"button",
|
|
9786
9925
|
{
|
|
9787
9926
|
className: "lg:hidden p-2.5 rounded-xl transition-colors duration-200",
|
|
@@ -9791,12 +9930,12 @@ function ITTopBar({
|
|
|
9791
9930
|
onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)",
|
|
9792
9931
|
onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
|
|
9793
9932
|
onClick: onToggleMobileMenu,
|
|
9794
|
-
children: /* @__PURE__ */
|
|
9933
|
+
children: /* @__PURE__ */ jsx68(FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
|
|
9795
9934
|
}
|
|
9796
9935
|
),
|
|
9797
9936
|
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-3", children: [
|
|
9798
|
-
logo && /* @__PURE__ */
|
|
9799
|
-
logoText && /* @__PURE__ */
|
|
9937
|
+
logo && /* @__PURE__ */ jsx68("div", { className: "flex-shrink-0 drop-shadow-sm", children: logo }),
|
|
9938
|
+
logoText && /* @__PURE__ */ jsx68(
|
|
9800
9939
|
ITText,
|
|
9801
9940
|
{
|
|
9802
9941
|
as: "span",
|
|
@@ -9806,7 +9945,7 @@ function ITTopBar({
|
|
|
9806
9945
|
}
|
|
9807
9946
|
)
|
|
9808
9947
|
] }),
|
|
9809
|
-
navItems && navItems.length > 0 && /* @__PURE__ */
|
|
9948
|
+
navItems && navItems.length > 0 && /* @__PURE__ */ jsx68("nav", { className: "hidden md:flex ml-8 space-x-1 border-l pl-8", style: { borderColor: "var(--it-topbar-border, rgba(15, 23, 42, 0.06))" }, children: navItems.map((item) => /* @__PURE__ */ jsx68(
|
|
9810
9949
|
"button",
|
|
9811
9950
|
{
|
|
9812
9951
|
onClick: () => onNavItemClick?.(item.id),
|
|
@@ -9821,14 +9960,14 @@ function ITTopBar({
|
|
|
9821
9960
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
9822
9961
|
},
|
|
9823
9962
|
children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
9824
|
-
item.icon && /* @__PURE__ */
|
|
9825
|
-
/* @__PURE__ */
|
|
9963
|
+
item.icon && /* @__PURE__ */ jsx68("span", { className: "opacity-70", children: item.icon }),
|
|
9964
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", children: item.label })
|
|
9826
9965
|
] })
|
|
9827
9966
|
},
|
|
9828
9967
|
item.id
|
|
9829
9968
|
)) })
|
|
9830
9969
|
] }),
|
|
9831
|
-
centerContent && /* @__PURE__ */
|
|
9970
|
+
centerContent && /* @__PURE__ */ jsx68("div", { className: "hidden lg:flex flex-1 min-w-0 items-center justify-center px-4", children: /* @__PURE__ */ jsx68("div", { className: "w-full max-w-[420px]", children: centerContent }) }),
|
|
9832
9971
|
(children || userMenu) && /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
9833
9972
|
children,
|
|
9834
9973
|
userMenu && /* @__PURE__ */ jsxs53("div", { className: "relative", children: [
|
|
@@ -9849,18 +9988,18 @@ function ITTopBar({
|
|
|
9849
9988
|
onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
|
|
9850
9989
|
children: [
|
|
9851
9990
|
/* @__PURE__ */ jsxs53("div", { className: "relative", children: [
|
|
9852
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
9991
|
+
userMenu.userImage ? /* @__PURE__ */ jsx68(
|
|
9853
9992
|
"img",
|
|
9854
9993
|
{
|
|
9855
9994
|
className: "w-9 h-9 rounded-full object-cover ring-2 ring-white shadow-sm",
|
|
9856
9995
|
src: userMenu.userImage,
|
|
9857
9996
|
alt: "Current user"
|
|
9858
9997
|
}
|
|
9859
|
-
) : /* @__PURE__ */
|
|
9860
|
-
/* @__PURE__ */
|
|
9998
|
+
) : /* @__PURE__ */ jsx68("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ jsx68(FaUserCircle2, { className: "w-6 h-6", style: { color: "var(--it-topbar-icon, #94a3b8)" } }) }),
|
|
9999
|
+
/* @__PURE__ */ jsx68("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
|
|
9861
10000
|
] }),
|
|
9862
10001
|
/* @__PURE__ */ jsxs53("div", { className: "hidden sm:flex flex-col text-left py-0.5", children: [
|
|
9863
|
-
/* @__PURE__ */
|
|
10002
|
+
/* @__PURE__ */ jsx68(
|
|
9864
10003
|
ITText,
|
|
9865
10004
|
{
|
|
9866
10005
|
as: "span",
|
|
@@ -9869,7 +10008,7 @@ function ITTopBar({
|
|
|
9869
10008
|
children: userMenu.userName
|
|
9870
10009
|
}
|
|
9871
10010
|
),
|
|
9872
|
-
/* @__PURE__ */
|
|
10011
|
+
/* @__PURE__ */ jsx68(
|
|
9873
10012
|
ITText,
|
|
9874
10013
|
{
|
|
9875
10014
|
as: "span",
|
|
@@ -9896,14 +10035,14 @@ function ITTopBar({
|
|
|
9896
10035
|
},
|
|
9897
10036
|
children: [
|
|
9898
10037
|
/* @__PURE__ */ jsxs53("div", { className: "px-5 py-4 border-b", style: { borderColor: "var(--it-topbar-user-dropdown-border, #f1f5f9)", backgroundColor: "var(--it-topbar-user-bg, #f8fafc)" }, children: [
|
|
9899
|
-
/* @__PURE__ */
|
|
9900
|
-
/* @__PURE__ */
|
|
10038
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", className: "block font-bold text-[0.9rem]", style: { color: "var(--it-topbar-user-text, #0f172a)" }, children: userMenu.userName }),
|
|
10039
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", className: "block text-xs font-medium truncate mt-0.5", style: { color: "var(--it-topbar-user-subtitle, #64748b)" }, children: userMenu.userEmail })
|
|
9901
10040
|
] }),
|
|
9902
|
-
/* @__PURE__ */
|
|
10041
|
+
/* @__PURE__ */ jsx68("ul", { className: "py-2", children: userMenu.menuItems.map((m, i) => {
|
|
9903
10042
|
const isDestructive = m.label.toLowerCase().includes("salir") || m.label.toLowerCase().includes("cerrar") || m.label.toLowerCase().includes("logout");
|
|
9904
10043
|
return /* @__PURE__ */ jsxs53("li", { className: "px-2", children: [
|
|
9905
|
-
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */
|
|
9906
|
-
/* @__PURE__ */
|
|
10044
|
+
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */ jsx68("div", { className: "h-px bg-slate-100 my-1 mx-2" }),
|
|
10045
|
+
/* @__PURE__ */ jsx68(
|
|
9907
10046
|
"button",
|
|
9908
10047
|
{
|
|
9909
10048
|
onClick: () => {
|
|
@@ -9918,7 +10057,7 @@ function ITTopBar({
|
|
|
9918
10057
|
onMouseLeave: (e) => {
|
|
9919
10058
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
9920
10059
|
},
|
|
9921
|
-
children: /* @__PURE__ */
|
|
10060
|
+
children: /* @__PURE__ */ jsx68(ITText, { as: "span", children: m.label })
|
|
9922
10061
|
}
|
|
9923
10062
|
)
|
|
9924
10063
|
] }, i);
|
|
@@ -9934,7 +10073,7 @@ function ITTopBar({
|
|
|
9934
10073
|
}
|
|
9935
10074
|
|
|
9936
10075
|
// src/components/templates/layout/layout.tsx
|
|
9937
|
-
import { jsx as
|
|
10076
|
+
import { jsx as jsx69, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
9938
10077
|
function ITLayout({
|
|
9939
10078
|
topBar,
|
|
9940
10079
|
sidebar,
|
|
@@ -9950,7 +10089,7 @@ function ITLayout({
|
|
|
9950
10089
|
}) : () => setInternalCollapsed((v) => !v);
|
|
9951
10090
|
const layoutTokens = theme.layout;
|
|
9952
10091
|
return /* @__PURE__ */ jsxs54("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
9953
|
-
/* @__PURE__ */
|
|
10092
|
+
/* @__PURE__ */ jsx69(
|
|
9954
10093
|
ITTopBar,
|
|
9955
10094
|
{
|
|
9956
10095
|
...topBar,
|
|
@@ -9965,13 +10104,13 @@ function ITLayout({
|
|
|
9965
10104
|
style: { backgroundColor: layoutTokens.backgroundColor },
|
|
9966
10105
|
children: [
|
|
9967
10106
|
/* @__PURE__ */ jsxs54("div", { className: "hidden lg:block relative z-40 h-full", children: [
|
|
9968
|
-
/* @__PURE__ */
|
|
10107
|
+
/* @__PURE__ */ jsx69(
|
|
9969
10108
|
"div",
|
|
9970
10109
|
{
|
|
9971
10110
|
className: `${desktopCollapsed ? "w-[88px]" : "w-[280px]"} h-full flex-shrink-0`
|
|
9972
10111
|
}
|
|
9973
10112
|
),
|
|
9974
|
-
/* @__PURE__ */
|
|
10113
|
+
/* @__PURE__ */ jsx69("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx69(
|
|
9975
10114
|
ITSidebar,
|
|
9976
10115
|
{
|
|
9977
10116
|
...sidebar,
|
|
@@ -9982,17 +10121,17 @@ function ITLayout({
|
|
|
9982
10121
|
}
|
|
9983
10122
|
) })
|
|
9984
10123
|
] }),
|
|
9985
|
-
mobileSidebarOpen && /* @__PURE__ */
|
|
10124
|
+
mobileSidebarOpen && /* @__PURE__ */ jsx69(
|
|
9986
10125
|
"div",
|
|
9987
10126
|
{
|
|
9988
10127
|
className: "lg:hidden fixed inset-0 z-[40] transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
9989
10128
|
onClick: () => setMobileSidebarOpen(false),
|
|
9990
|
-
children: /* @__PURE__ */
|
|
10129
|
+
children: /* @__PURE__ */ jsx69(
|
|
9991
10130
|
"div",
|
|
9992
10131
|
{
|
|
9993
10132
|
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
9994
10133
|
onClick: (e) => e.stopPropagation(),
|
|
9995
|
-
children: /* @__PURE__ */
|
|
10134
|
+
children: /* @__PURE__ */ jsx69(
|
|
9996
10135
|
ITSidebar,
|
|
9997
10136
|
{
|
|
9998
10137
|
...sidebar,
|
|
@@ -10008,7 +10147,7 @@ function ITLayout({
|
|
|
10008
10147
|
)
|
|
10009
10148
|
}
|
|
10010
10149
|
),
|
|
10011
|
-
/* @__PURE__ */
|
|
10150
|
+
/* @__PURE__ */ jsx69("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx69("div", { className: clsx51("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) })
|
|
10012
10151
|
]
|
|
10013
10152
|
}
|
|
10014
10153
|
)
|
|
@@ -10024,7 +10163,7 @@ var sizeClasses = {
|
|
|
10024
10163
|
};
|
|
10025
10164
|
|
|
10026
10165
|
// src/components/atoms/loader/loader.tsx
|
|
10027
|
-
import { jsx as
|
|
10166
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
10028
10167
|
function ITLoader({
|
|
10029
10168
|
size = "md",
|
|
10030
10169
|
variant = "spinner",
|
|
@@ -10039,22 +10178,22 @@ function ITLoader({
|
|
|
10039
10178
|
const bgStyle = isCssValue ? { backgroundColor: resolvedColor } : {};
|
|
10040
10179
|
const colorClass = !isCssValue ? color : "";
|
|
10041
10180
|
if (variant === "spinner") {
|
|
10042
|
-
return /* @__PURE__ */
|
|
10181
|
+
return /* @__PURE__ */ jsx70(
|
|
10043
10182
|
"div",
|
|
10044
10183
|
{
|
|
10045
10184
|
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}`,
|
|
10046
10185
|
role: "status",
|
|
10047
10186
|
style,
|
|
10048
|
-
children: /* @__PURE__ */
|
|
10187
|
+
children: /* @__PURE__ */ jsx70(ITText, { as: "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..." })
|
|
10049
10188
|
}
|
|
10050
10189
|
);
|
|
10051
10190
|
}
|
|
10052
10191
|
if (variant === "dots") {
|
|
10053
|
-
return /* @__PURE__ */
|
|
10192
|
+
return /* @__PURE__ */ jsx70(
|
|
10054
10193
|
"div",
|
|
10055
10194
|
{
|
|
10056
10195
|
className: `flex items-center justify-center space-x-2 ${className}`,
|
|
10057
|
-
children: [...Array(3)].map((_, i) => /* @__PURE__ */
|
|
10196
|
+
children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsx70(
|
|
10058
10197
|
"div",
|
|
10059
10198
|
{
|
|
10060
10199
|
className: `${sizeClasses[size.replace(/l|g/, "")]} animate-bounce rounded-full ${colorClass}`,
|
|
@@ -10069,11 +10208,11 @@ function ITLoader({
|
|
|
10069
10208
|
);
|
|
10070
10209
|
}
|
|
10071
10210
|
if (variant === "bar") {
|
|
10072
|
-
return /* @__PURE__ */
|
|
10211
|
+
return /* @__PURE__ */ jsx70(
|
|
10073
10212
|
"div",
|
|
10074
10213
|
{
|
|
10075
10214
|
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}`,
|
|
10076
|
-
children: /* @__PURE__ */
|
|
10215
|
+
children: /* @__PURE__ */ jsx70(
|
|
10077
10216
|
"div",
|
|
10078
10217
|
{
|
|
10079
10218
|
className: `h-full animate-progress ${colorClass}`,
|
|
@@ -10089,7 +10228,7 @@ function ITLoader({
|
|
|
10089
10228
|
);
|
|
10090
10229
|
}
|
|
10091
10230
|
if (variant === "pulse") {
|
|
10092
|
-
return /* @__PURE__ */
|
|
10231
|
+
return /* @__PURE__ */ jsx70(
|
|
10093
10232
|
"div",
|
|
10094
10233
|
{
|
|
10095
10234
|
className: `rounded-full ${sizeClasses[size]} animate-pulse ${colorClass} ${className}`,
|
|
@@ -10104,7 +10243,7 @@ function ITLoader({
|
|
|
10104
10243
|
import clsx52 from "clsx";
|
|
10105
10244
|
import { useEffect as useEffect18, useRef as useRef23, useState as useState37 } from "react";
|
|
10106
10245
|
import { FaChevronLeft as FaChevronLeft4, FaChevronRight as FaChevronRight5, FaCheck as FaCheck5 } from "react-icons/fa";
|
|
10107
|
-
import { jsx as
|
|
10246
|
+
import { jsx as jsx71, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
10108
10247
|
function ITStepper({
|
|
10109
10248
|
steps,
|
|
10110
10249
|
currentStep,
|
|
@@ -10171,23 +10310,23 @@ function ITStepper({
|
|
|
10171
10310
|
const renderStepContent = (index, isCompleted) => {
|
|
10172
10311
|
const step = steps[index];
|
|
10173
10312
|
if (isCompleted) {
|
|
10174
|
-
return /* @__PURE__ */
|
|
10313
|
+
return /* @__PURE__ */ jsx71(FaCheck5, { className: "w-4 h-4" });
|
|
10175
10314
|
}
|
|
10176
10315
|
if (step.icon && useIcons) {
|
|
10177
|
-
return /* @__PURE__ */
|
|
10316
|
+
return /* @__PURE__ */ jsx71("div", { className: "flex items-center justify-center w-5 h-5", children: step.icon });
|
|
10178
10317
|
}
|
|
10179
|
-
return /* @__PURE__ */
|
|
10318
|
+
return /* @__PURE__ */ jsx71(ITText, { as: "span", className: "text-sm font-semibold", children: index + 1 });
|
|
10180
10319
|
};
|
|
10181
10320
|
return /* @__PURE__ */ jsxs55("div", { className: clsx52("w-full max-w-5xl mx-auto px-4", containerClassName), children: [
|
|
10182
10321
|
/* @__PURE__ */ jsxs55("div", { className: "relative mb-8", children: [
|
|
10183
|
-
/* @__PURE__ */
|
|
10322
|
+
/* @__PURE__ */ jsx71(
|
|
10184
10323
|
"div",
|
|
10185
10324
|
{
|
|
10186
10325
|
className: "absolute left-6 right-6 top-5 h-1 bg-secondary-200 rounded-full z-0",
|
|
10187
10326
|
"aria-hidden": true
|
|
10188
10327
|
}
|
|
10189
10328
|
),
|
|
10190
|
-
/* @__PURE__ */
|
|
10329
|
+
/* @__PURE__ */ jsx71(
|
|
10191
10330
|
"div",
|
|
10192
10331
|
{
|
|
10193
10332
|
ref: progressRef,
|
|
@@ -10195,11 +10334,11 @@ function ITStepper({
|
|
|
10195
10334
|
"aria-hidden": true
|
|
10196
10335
|
}
|
|
10197
10336
|
),
|
|
10198
|
-
/* @__PURE__ */
|
|
10337
|
+
/* @__PURE__ */ jsx71("div", { className: "flex items-start justify-between space-x-2 relative z-20", children: steps.map((step, idx) => {
|
|
10199
10338
|
const isActive = idx === currentStep;
|
|
10200
10339
|
const isCompleted = idx < currentStep;
|
|
10201
10340
|
const hasIcon = step.icon && useIcons;
|
|
10202
|
-
return /* @__PURE__ */
|
|
10341
|
+
return /* @__PURE__ */ jsx71(
|
|
10203
10342
|
"button",
|
|
10204
10343
|
{
|
|
10205
10344
|
type: "button",
|
|
@@ -10210,7 +10349,7 @@ function ITStepper({
|
|
|
10210
10349
|
className: "flex-1 group",
|
|
10211
10350
|
title: step.label,
|
|
10212
10351
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex flex-col items-center", children: [
|
|
10213
|
-
/* @__PURE__ */
|
|
10352
|
+
/* @__PURE__ */ jsx71(
|
|
10214
10353
|
"div",
|
|
10215
10354
|
{
|
|
10216
10355
|
className: clsx52(
|
|
@@ -10224,7 +10363,7 @@ function ITStepper({
|
|
|
10224
10363
|
children: renderStepContent(idx, isCompleted)
|
|
10225
10364
|
}
|
|
10226
10365
|
),
|
|
10227
|
-
/* @__PURE__ */
|
|
10366
|
+
/* @__PURE__ */ jsx71(
|
|
10228
10367
|
ITText,
|
|
10229
10368
|
{
|
|
10230
10369
|
as: "span",
|
|
@@ -10242,7 +10381,7 @@ function ITStepper({
|
|
|
10242
10381
|
);
|
|
10243
10382
|
}) })
|
|
10244
10383
|
] }),
|
|
10245
|
-
/* @__PURE__ */
|
|
10384
|
+
/* @__PURE__ */ jsx71(
|
|
10246
10385
|
"div",
|
|
10247
10386
|
{
|
|
10248
10387
|
ref: contentRef,
|
|
@@ -10259,7 +10398,7 @@ function ITStepper({
|
|
|
10259
10398
|
}
|
|
10260
10399
|
),
|
|
10261
10400
|
/* @__PURE__ */ jsxs55("div", { className: "flex justify-between items-center mt-6", children: [
|
|
10262
|
-
/* @__PURE__ */
|
|
10401
|
+
/* @__PURE__ */ jsx71(
|
|
10263
10402
|
ITButton,
|
|
10264
10403
|
{
|
|
10265
10404
|
variant: "outlined",
|
|
@@ -10267,8 +10406,8 @@ function ITStepper({
|
|
|
10267
10406
|
disabled: currentStep === 0,
|
|
10268
10407
|
onClick: prevStep,
|
|
10269
10408
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2", children: [
|
|
10270
|
-
/* @__PURE__ */
|
|
10271
|
-
/* @__PURE__ */
|
|
10409
|
+
/* @__PURE__ */ jsx71(FaChevronLeft4, {}),
|
|
10410
|
+
/* @__PURE__ */ jsx71(ITText, { as: "span", children: "Atr\xE1s" })
|
|
10272
10411
|
] })
|
|
10273
10412
|
}
|
|
10274
10413
|
),
|
|
@@ -10279,7 +10418,7 @@ function ITStepper({
|
|
|
10279
10418
|
" de ",
|
|
10280
10419
|
steps.length
|
|
10281
10420
|
] }),
|
|
10282
|
-
/* @__PURE__ */
|
|
10421
|
+
/* @__PURE__ */ jsx71(
|
|
10283
10422
|
ITButton,
|
|
10284
10423
|
{
|
|
10285
10424
|
variant: "solid",
|
|
@@ -10287,8 +10426,8 @@ function ITStepper({
|
|
|
10287
10426
|
disabled: disableNext,
|
|
10288
10427
|
onClick: nextStep,
|
|
10289
10428
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2", children: [
|
|
10290
|
-
/* @__PURE__ */
|
|
10291
|
-
currentStep === steps.length - 1 ? /* @__PURE__ */
|
|
10429
|
+
/* @__PURE__ */ jsx71(ITText, { as: "span", children: currentStep === steps.length - 1 ? "Finalizar" : "Siguiente" }),
|
|
10430
|
+
currentStep === steps.length - 1 ? /* @__PURE__ */ jsx71(FaCheck5, {}) : /* @__PURE__ */ jsx71(FaChevronRight5, {})
|
|
10292
10431
|
] })
|
|
10293
10432
|
}
|
|
10294
10433
|
)
|
|
@@ -10476,7 +10615,7 @@ var PRESETS = [
|
|
|
10476
10615
|
];
|
|
10477
10616
|
|
|
10478
10617
|
// src/components/theme-provider/themeProvider.tsx
|
|
10479
|
-
import { jsx as
|
|
10618
|
+
import { jsx as jsx72, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
10480
10619
|
var STORAGE_KEY = "it-theme-palette";
|
|
10481
10620
|
var SHADOW_LEVELS = {
|
|
10482
10621
|
0: {
|
|
@@ -11874,7 +12013,7 @@ function ITThemeProvider({
|
|
|
11874
12013
|
children: [
|
|
11875
12014
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
11876
12015
|
/* @__PURE__ */ jsxs56("div", { className: "relative w-10 h-10 rounded-xl border-2 border-slate-200 dark:border-slate-700 overflow-hidden cursor-pointer flex-shrink-0 shadow-sm hover:scale-105 transition-transform", children: [
|
|
11877
|
-
/* @__PURE__ */
|
|
12016
|
+
/* @__PURE__ */ jsx72(
|
|
11878
12017
|
"input",
|
|
11879
12018
|
{
|
|
11880
12019
|
type: "color",
|
|
@@ -11883,23 +12022,23 @@ function ITThemeProvider({
|
|
|
11883
12022
|
className: "absolute inset-0 opacity-0 cursor-pointer w-full h-full"
|
|
11884
12023
|
}
|
|
11885
12024
|
),
|
|
11886
|
-
/* @__PURE__ */
|
|
12025
|
+
/* @__PURE__ */ jsx72("div", { className: "w-full h-full", style: { backgroundColor: value } })
|
|
11887
12026
|
] }),
|
|
11888
12027
|
/* @__PURE__ */ jsxs56("div", { className: "flex flex-col min-w-0", children: [
|
|
11889
|
-
/* @__PURE__ */
|
|
12028
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-xs font-bold text-slate-700 dark:text-slate-300 truncate capitalize", children: label.replace(/([A-Z])/g, " $1").trim() }),
|
|
11890
12029
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
11891
|
-
/* @__PURE__ */
|
|
12030
|
+
/* @__PURE__ */ jsx72(
|
|
11892
12031
|
"span",
|
|
11893
12032
|
{
|
|
11894
12033
|
className: "w-3 h-3 rounded-full border border-slate-200 dark:border-slate-600",
|
|
11895
12034
|
style: { backgroundColor: value }
|
|
11896
12035
|
}
|
|
11897
12036
|
),
|
|
11898
|
-
/* @__PURE__ */
|
|
12037
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "font-mono text-[11px] text-slate-400", children: value })
|
|
11899
12038
|
] })
|
|
11900
12039
|
] })
|
|
11901
12040
|
] }),
|
|
11902
|
-
/* @__PURE__ */
|
|
12041
|
+
/* @__PURE__ */ jsx72(
|
|
11903
12042
|
"input",
|
|
11904
12043
|
{
|
|
11905
12044
|
type: "text",
|
|
@@ -11925,7 +12064,7 @@ function ITThemeProvider({
|
|
|
11925
12064
|
onClick: () => applyPreset(preset.colors),
|
|
11926
12065
|
className: `relative flex flex-col items-start p-2.5 rounded-xl border text-left transition-all group ${isSelected ? "border-primary-500 bg-primary-500/5 shadow-sm ring-1 ring-primary-500/20" : "border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900/50 hover:border-slate-300 dark:hover:border-slate-600"}`,
|
|
11927
12066
|
children: [
|
|
11928
|
-
isCustom && /* @__PURE__ */
|
|
12067
|
+
isCustom && /* @__PURE__ */ jsx72(
|
|
11929
12068
|
"span",
|
|
11930
12069
|
{
|
|
11931
12070
|
onClick: (e) => {
|
|
@@ -11934,11 +12073,11 @@ function ITThemeProvider({
|
|
|
11934
12073
|
},
|
|
11935
12074
|
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",
|
|
11936
12075
|
title: "Eliminar",
|
|
11937
|
-
children: /* @__PURE__ */
|
|
12076
|
+
children: /* @__PURE__ */ jsx72(MdClose, { size: 12 })
|
|
11938
12077
|
}
|
|
11939
12078
|
),
|
|
11940
|
-
/* @__PURE__ */
|
|
11941
|
-
/* @__PURE__ */
|
|
12079
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-xs font-semibold truncate w-full mb-1.5 pr-4 text-slate-700 dark:text-slate-300", children: preset.name }),
|
|
12080
|
+
/* @__PURE__ */ jsx72("div", { className: "flex gap-1", children: ["primary", "secondary", "ternary", "success"].map((c) => /* @__PURE__ */ jsx72(
|
|
11942
12081
|
"span",
|
|
11943
12082
|
{
|
|
11944
12083
|
className: "w-3 h-3 rounded-full border border-black/10",
|
|
@@ -11966,17 +12105,17 @@ function ITThemeProvider({
|
|
|
11966
12105
|
},
|
|
11967
12106
|
children: [
|
|
11968
12107
|
children,
|
|
11969
|
-
showFab && /* @__PURE__ */
|
|
12108
|
+
showFab && /* @__PURE__ */ jsx72(
|
|
11970
12109
|
"button",
|
|
11971
12110
|
{
|
|
11972
12111
|
onClick: () => setIsOpen((prev) => !prev),
|
|
11973
12112
|
className: "it-theme-fab it-theme-bounce",
|
|
11974
12113
|
style: { backgroundColor: "var(--color-primary)" },
|
|
11975
12114
|
"aria-label": "Configurar Paleta de Colores",
|
|
11976
|
-
children: /* @__PURE__ */
|
|
12115
|
+
children: /* @__PURE__ */ jsx72(MdPalette, { size: 28 })
|
|
11977
12116
|
}
|
|
11978
12117
|
),
|
|
11979
|
-
showFab && /* @__PURE__ */
|
|
12118
|
+
showFab && /* @__PURE__ */ jsx72(
|
|
11980
12119
|
ITDialog,
|
|
11981
12120
|
{
|
|
11982
12121
|
isOpen,
|
|
@@ -11986,8 +12125,8 @@ function ITThemeProvider({
|
|
|
11986
12125
|
children: /* @__PURE__ */ jsxs56("div", { className: "flex gap-6 h-[580px]", children: [
|
|
11987
12126
|
/* @__PURE__ */ jsxs56("div", { className: "w-64 flex-shrink-0 flex flex-col gap-5 overflow-y-auto pr-1", children: [
|
|
11988
12127
|
/* @__PURE__ */ jsxs56("div", { children: [
|
|
11989
|
-
/* @__PURE__ */
|
|
11990
|
-
/* @__PURE__ */
|
|
12128
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500 mb-2.5 block", children: "Apariencia" }),
|
|
12129
|
+
/* @__PURE__ */ jsx72(
|
|
11991
12130
|
ITSegmentedControl,
|
|
11992
12131
|
{
|
|
11993
12132
|
options: [
|
|
@@ -12002,15 +12141,15 @@ function ITThemeProvider({
|
|
|
12002
12141
|
)
|
|
12003
12142
|
] }),
|
|
12004
12143
|
/* @__PURE__ */ jsxs56("div", { children: [
|
|
12005
|
-
/* @__PURE__ */
|
|
12006
|
-
/* @__PURE__ */
|
|
12144
|
+
/* @__PURE__ */ jsx72("div", { className: "flex items-center justify-between mb-2.5", children: /* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500", children: "Presets" }) }),
|
|
12145
|
+
/* @__PURE__ */ jsx72("div", { className: "grid grid-cols-2 gap-2", children: PRESETS.map((preset) => /* @__PURE__ */ jsx72(PresetCard, { preset }, preset.name)) })
|
|
12007
12146
|
] }),
|
|
12008
12147
|
customPresets.length > 0 && /* @__PURE__ */ jsxs56("div", { children: [
|
|
12009
|
-
/* @__PURE__ */
|
|
12010
|
-
/* @__PURE__ */
|
|
12148
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500 mb-2.5 block", children: "Mis Temas" }),
|
|
12149
|
+
/* @__PURE__ */ jsx72("div", { className: "flex flex-col gap-1.5", children: customPresets.map((preset) => /* @__PURE__ */ jsx72(PresetCard, { preset, isCustom: true }, preset.name)) })
|
|
12011
12150
|
] }),
|
|
12012
12151
|
isSavingPreset && /* @__PURE__ */ jsxs56("div", { className: "flex flex-col gap-2 p-3 rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900/50", children: [
|
|
12013
|
-
/* @__PURE__ */
|
|
12152
|
+
/* @__PURE__ */ jsx72(
|
|
12014
12153
|
ITInput,
|
|
12015
12154
|
{
|
|
12016
12155
|
name: "presetName",
|
|
@@ -12029,7 +12168,7 @@ function ITThemeProvider({
|
|
|
12029
12168
|
}
|
|
12030
12169
|
),
|
|
12031
12170
|
/* @__PURE__ */ jsxs56("div", { className: "flex gap-2", children: [
|
|
12032
|
-
/* @__PURE__ */
|
|
12171
|
+
/* @__PURE__ */ jsx72(
|
|
12033
12172
|
ITButton,
|
|
12034
12173
|
{
|
|
12035
12174
|
label: "Guardar",
|
|
@@ -12040,7 +12179,7 @@ function ITThemeProvider({
|
|
|
12040
12179
|
className: "flex-1"
|
|
12041
12180
|
}
|
|
12042
12181
|
),
|
|
12043
|
-
/* @__PURE__ */
|
|
12182
|
+
/* @__PURE__ */ jsx72(
|
|
12044
12183
|
ITButton,
|
|
12045
12184
|
{
|
|
12046
12185
|
label: "X",
|
|
@@ -12054,31 +12193,31 @@ function ITThemeProvider({
|
|
|
12054
12193
|
)
|
|
12055
12194
|
] })
|
|
12056
12195
|
] }),
|
|
12057
|
-
!isSavingPreset && /* @__PURE__ */
|
|
12196
|
+
!isSavingPreset && /* @__PURE__ */ jsx72(
|
|
12058
12197
|
ITButton,
|
|
12059
12198
|
{
|
|
12060
12199
|
variant: "outlined",
|
|
12061
|
-
icon: /* @__PURE__ */
|
|
12200
|
+
icon: /* @__PURE__ */ jsx72(MdPalette, { size: 14 }),
|
|
12062
12201
|
label: "Guardar actual",
|
|
12063
12202
|
onClick: () => setIsSavingPreset(true),
|
|
12064
12203
|
size: "sm"
|
|
12065
12204
|
}
|
|
12066
12205
|
),
|
|
12067
|
-
/* @__PURE__ */
|
|
12206
|
+
/* @__PURE__ */ jsx72(
|
|
12068
12207
|
ITButton,
|
|
12069
12208
|
{
|
|
12070
12209
|
variant: "outlined",
|
|
12071
12210
|
color: "danger",
|
|
12072
|
-
icon: /* @__PURE__ */
|
|
12211
|
+
icon: /* @__PURE__ */ jsx72(MdRefresh, { size: 14 }),
|
|
12073
12212
|
label: "Restaurar default",
|
|
12074
12213
|
onClick: resetTheme,
|
|
12075
12214
|
size: "sm"
|
|
12076
12215
|
}
|
|
12077
12216
|
)
|
|
12078
12217
|
] }),
|
|
12079
|
-
/* @__PURE__ */
|
|
12218
|
+
/* @__PURE__ */ jsx72(ITDivider, { orientation: "vertical" }),
|
|
12080
12219
|
/* @__PURE__ */ jsxs56("div", { className: "flex-1 flex flex-col min-w-0", children: [
|
|
12081
|
-
/* @__PURE__ */
|
|
12220
|
+
/* @__PURE__ */ jsx72(
|
|
12082
12221
|
tabs_default,
|
|
12083
12222
|
{
|
|
12084
12223
|
variant: "pill",
|
|
@@ -12086,7 +12225,7 @@ function ITThemeProvider({
|
|
|
12086
12225
|
{
|
|
12087
12226
|
id: "brand",
|
|
12088
12227
|
label: "Marca",
|
|
12089
|
-
content: /* @__PURE__ */
|
|
12228
|
+
content: /* @__PURE__ */ jsx72("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12090
12229
|
"primary",
|
|
12091
12230
|
"secondary",
|
|
12092
12231
|
"ternary",
|
|
@@ -12095,35 +12234,35 @@ function ITThemeProvider({
|
|
|
12095
12234
|
"info",
|
|
12096
12235
|
"alert",
|
|
12097
12236
|
"warning"
|
|
12098
|
-
].map((key) => /* @__PURE__ */
|
|
12237
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12099
12238
|
},
|
|
12100
12239
|
{
|
|
12101
12240
|
id: "layout",
|
|
12102
12241
|
label: "Nav & Sidebar",
|
|
12103
|
-
content: /* @__PURE__ */
|
|
12242
|
+
content: /* @__PURE__ */ jsx72("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12104
12243
|
"layout.sidebarBg",
|
|
12105
12244
|
"layout.sidebarText",
|
|
12106
12245
|
"layout.navbarBg",
|
|
12107
12246
|
"layout.navbarText"
|
|
12108
|
-
].map((key) => /* @__PURE__ */
|
|
12247
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12109
12248
|
},
|
|
12110
12249
|
{
|
|
12111
12250
|
id: "tables",
|
|
12112
12251
|
label: "Tablas",
|
|
12113
|
-
content: /* @__PURE__ */
|
|
12252
|
+
content: /* @__PURE__ */ jsx72("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12114
12253
|
"table.headerBg",
|
|
12115
12254
|
"table.headerText",
|
|
12116
12255
|
"table.rowBg",
|
|
12117
12256
|
"table.rowText",
|
|
12118
12257
|
"table.rowHover"
|
|
12119
|
-
].map((key) => /* @__PURE__ */
|
|
12258
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12120
12259
|
}
|
|
12121
12260
|
]
|
|
12122
12261
|
}
|
|
12123
12262
|
),
|
|
12124
12263
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center justify-end gap-3 mt-auto pt-4 border-t border-slate-100 dark:border-slate-800", children: [
|
|
12125
|
-
/* @__PURE__ */
|
|
12126
|
-
/* @__PURE__ */
|
|
12264
|
+
/* @__PURE__ */ jsx72(ITText, { as: "p", className: "text-[11px] text-slate-400 mr-auto", children: "Los cambios se guardan autom\xE1ticamente" }),
|
|
12265
|
+
/* @__PURE__ */ jsx72(
|
|
12127
12266
|
ITButton,
|
|
12128
12267
|
{
|
|
12129
12268
|
label: "Cerrar",
|
|
@@ -12181,6 +12320,7 @@ export {
|
|
|
12181
12320
|
ITGrid,
|
|
12182
12321
|
image_default as ITImage,
|
|
12183
12322
|
ITInput,
|
|
12323
|
+
ITInputNumber,
|
|
12184
12324
|
ITLayout,
|
|
12185
12325
|
ITLoader,
|
|
12186
12326
|
ITMaskedInput,
|