@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.cjs
CHANGED
|
@@ -57,6 +57,7 @@ __export(index_exports, {
|
|
|
57
57
|
ITGrid: () => ITGrid,
|
|
58
58
|
ITImage: () => image_default,
|
|
59
59
|
ITInput: () => ITInput,
|
|
60
|
+
ITInputNumber: () => ITInputNumber,
|
|
60
61
|
ITLayout: () => ITLayout,
|
|
61
62
|
ITLoader: () => ITLoader,
|
|
62
63
|
ITMaskedInput: () => ITMaskedInput,
|
|
@@ -2644,11 +2645,13 @@ function ITInput({
|
|
|
2644
2645
|
max,
|
|
2645
2646
|
readOnly = false,
|
|
2646
2647
|
focusContent,
|
|
2647
|
-
size = "md"
|
|
2648
|
+
size = "md",
|
|
2649
|
+
decimals
|
|
2648
2650
|
}) {
|
|
2649
2651
|
const isCheckboxOrRadio = type === "checkbox" || type === "radio";
|
|
2650
2652
|
const isNumberType = type === "number";
|
|
2651
2653
|
const isTextArea = type === "textarea";
|
|
2654
|
+
const decimalPlaces = decimals ?? (currencyFormat ? 2 : 0);
|
|
2652
2655
|
const [displayValue, setDisplayValue] = (0, import_react12.useState)("");
|
|
2653
2656
|
const [isFocused, setIsFocused] = (0, import_react12.useState)(false);
|
|
2654
2657
|
const [hasSelectedAll, setHasSelectedAll] = (0, import_react12.useState)(false);
|
|
@@ -2701,13 +2704,16 @@ function ITInput({
|
|
|
2701
2704
|
}
|
|
2702
2705
|
if (currencyFormat) {
|
|
2703
2706
|
return num.toLocaleString("es-MX", {
|
|
2704
|
-
minimumFractionDigits:
|
|
2705
|
-
maximumFractionDigits:
|
|
2707
|
+
minimumFractionDigits: decimalPlaces,
|
|
2708
|
+
maximumFractionDigits: decimalPlaces
|
|
2706
2709
|
});
|
|
2707
2710
|
}
|
|
2711
|
+
if (decimalPlaces > 0) {
|
|
2712
|
+
return num.toFixed(decimalPlaces);
|
|
2713
|
+
}
|
|
2708
2714
|
return num.toString();
|
|
2709
2715
|
},
|
|
2710
|
-
[currencyFormat]
|
|
2716
|
+
[currencyFormat, decimalPlaces]
|
|
2711
2717
|
);
|
|
2712
2718
|
const unformatValue = (0, import_react12.useCallback)(
|
|
2713
2719
|
(val) => {
|
|
@@ -2753,11 +2759,11 @@ function ITInput({
|
|
|
2753
2759
|
if (allowedKeys.includes(key) || ctrlKey || metaKey) {
|
|
2754
2760
|
return;
|
|
2755
2761
|
}
|
|
2756
|
-
if (
|
|
2762
|
+
if (decimalPlaces === 0 && (key === "." || key === ",")) {
|
|
2757
2763
|
e.preventDefault();
|
|
2758
2764
|
return;
|
|
2759
2765
|
}
|
|
2760
|
-
if (
|
|
2766
|
+
if (decimalPlaces > 0 && (key === "." || key === ",") && currentValue.includes(".")) {
|
|
2761
2767
|
const dotIndex = currentValue.indexOf(".");
|
|
2762
2768
|
const replacingDot = selectionStart !== null && selectionEnd !== null && selectionStart <= dotIndex && dotIndex < selectionEnd;
|
|
2763
2769
|
if (!replacingDot) {
|
|
@@ -2765,7 +2771,7 @@ function ITInput({
|
|
|
2765
2771
|
return;
|
|
2766
2772
|
}
|
|
2767
2773
|
}
|
|
2768
|
-
const allowedCharsRegex =
|
|
2774
|
+
const allowedCharsRegex = decimalPlaces > 0 ? /^[0-9.,]$/ : /^[0-9]$/;
|
|
2769
2775
|
if (key !== "Unidentified" && !allowedCharsRegex.test(key)) {
|
|
2770
2776
|
e.preventDefault();
|
|
2771
2777
|
return;
|
|
@@ -2783,7 +2789,7 @@ function ITInput({
|
|
|
2783
2789
|
if (readOnly) return;
|
|
2784
2790
|
let rawValue = e.target.value;
|
|
2785
2791
|
let cleanedValue = "";
|
|
2786
|
-
if (
|
|
2792
|
+
if (decimalPlaces > 0) {
|
|
2787
2793
|
if (rawValue.includes(",") && rawValue.includes(".")) {
|
|
2788
2794
|
rawValue = rawValue.replace(/,/g, "");
|
|
2789
2795
|
} else if (rawValue.includes(",")) {
|
|
@@ -2792,8 +2798,8 @@ function ITInput({
|
|
|
2792
2798
|
cleanedValue = rawValue.replace(/[^0-9.]/g, "");
|
|
2793
2799
|
const parts = cleanedValue.split(".");
|
|
2794
2800
|
if (parts.length > 1) {
|
|
2795
|
-
const
|
|
2796
|
-
cleanedValue = parts[0] + "." +
|
|
2801
|
+
const decimalPart = parts.slice(1).join("").substring(0, decimalPlaces);
|
|
2802
|
+
cleanedValue = parts[0] + "." + decimalPart;
|
|
2797
2803
|
}
|
|
2798
2804
|
} else {
|
|
2799
2805
|
cleanedValue = rawValue.replace(/[^0-9]/g, "");
|
|
@@ -2804,7 +2810,7 @@ function ITInput({
|
|
|
2804
2810
|
if (!formatNumber) {
|
|
2805
2811
|
valueToSend = cleanedValue;
|
|
2806
2812
|
} else if (cleanedValue !== "") {
|
|
2807
|
-
if (
|
|
2813
|
+
if (decimalPlaces > 0) {
|
|
2808
2814
|
const numericValue = parseFloat(cleanedValue);
|
|
2809
2815
|
if (!isNaN(numericValue)) {
|
|
2810
2816
|
valueToSend = cleanedValue;
|
|
@@ -2881,7 +2887,7 @@ function ITInput({
|
|
|
2881
2887
|
let numericValue = void 0;
|
|
2882
2888
|
let valueToSend = void 0;
|
|
2883
2889
|
let cleanedValue = "";
|
|
2884
|
-
if (
|
|
2890
|
+
if (decimalPlaces > 0) {
|
|
2885
2891
|
cleanedValue = currentValue.replace(/[^0-9.]/g, "");
|
|
2886
2892
|
const parts = cleanedValue.split(".");
|
|
2887
2893
|
if (parts.length > 2) {
|
|
@@ -2891,7 +2897,7 @@ function ITInput({
|
|
|
2891
2897
|
} else {
|
|
2892
2898
|
cleanedValue = currentValue.replace(/[^0-9]/g, "");
|
|
2893
2899
|
}
|
|
2894
|
-
const parsed =
|
|
2900
|
+
const parsed = decimalPlaces > 0 ? parseFloat(cleanedValue) : parseInt(cleanedValue, 10);
|
|
2895
2901
|
if (!isNaN(parsed)) {
|
|
2896
2902
|
numericValue = parsed;
|
|
2897
2903
|
if (min !== void 0 && numericValue < min) {
|
|
@@ -2924,7 +2930,7 @@ function ITInput({
|
|
|
2924
2930
|
}
|
|
2925
2931
|
onBlur?.(e);
|
|
2926
2932
|
};
|
|
2927
|
-
const currentLength = isNumberType ? (
|
|
2933
|
+
const currentLength = isNumberType ? (decimalPlaces > 0 ? displayValue.replace(/[.,]/g, "") : displayValue).length : typeof value === "string" ? value.length : String(value ?? "").length;
|
|
2928
2934
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: (0, import_clsx15.default)("w-full", containerClassName), children: [
|
|
2929
2935
|
isCheckboxOrRadio ? (
|
|
2930
2936
|
// CHECKBOX / RADIO LAYOUT (Row)
|
|
@@ -3021,7 +3027,7 @@ function ITInput({
|
|
|
3021
3027
|
name,
|
|
3022
3028
|
id: name,
|
|
3023
3029
|
type: isNumberType ? "text" : type === "password" ? showPassword ? "text" : "password" : type,
|
|
3024
|
-
inputMode: isNumberType ?
|
|
3030
|
+
inputMode: isNumberType ? decimalPlaces > 0 ? "decimal" : "numeric" : void 0,
|
|
3025
3031
|
placeholder,
|
|
3026
3032
|
value: isNumberType ? displayValue : String(value ?? ""),
|
|
3027
3033
|
onChange: isNumberType ? handleNumberChange : handleTextChange,
|
|
@@ -3033,7 +3039,7 @@ function ITInput({
|
|
|
3033
3039
|
},
|
|
3034
3040
|
onKeyDown: isNumberType ? handleKeyDown : onKeyDown,
|
|
3035
3041
|
readOnly,
|
|
3036
|
-
maxLength: isNumberType &&
|
|
3042
|
+
maxLength: isNumberType && decimalPlaces === 0 ? maxLength : void 0,
|
|
3037
3043
|
minLength,
|
|
3038
3044
|
min,
|
|
3039
3045
|
max,
|
|
@@ -3688,7 +3694,7 @@ function useVirtualRows({
|
|
|
3688
3694
|
|
|
3689
3695
|
// src/components/organisms/data-table/dataTable.tsx
|
|
3690
3696
|
var import_clsx23 = __toESM(require("clsx"), 1);
|
|
3691
|
-
var import_react21 = require("react");
|
|
3697
|
+
var import_react21 = __toESM(require("react"), 1);
|
|
3692
3698
|
var import_fa13 = require("react-icons/fa");
|
|
3693
3699
|
var import_md = require("react-icons/md");
|
|
3694
3700
|
|
|
@@ -4483,6 +4489,32 @@ function isInteractiveTarget(target, boundary = null) {
|
|
|
4483
4489
|
if (boundary instanceof Node && interactive === boundary) return false;
|
|
4484
4490
|
return true;
|
|
4485
4491
|
}
|
|
4492
|
+
function pinnedColumnWidth(col) {
|
|
4493
|
+
if (typeof col.width === "number") return col.width;
|
|
4494
|
+
if (typeof col.width === "string" && /^\d+(\.\d+)?px$/.test(col.width.trim())) {
|
|
4495
|
+
return parseFloat(col.width);
|
|
4496
|
+
}
|
|
4497
|
+
return col.minWidth ?? 0;
|
|
4498
|
+
}
|
|
4499
|
+
function getPinnedColumnMeta(columns) {
|
|
4500
|
+
const meta = {};
|
|
4501
|
+
let leftOffset = 0;
|
|
4502
|
+
for (const col of columns) {
|
|
4503
|
+
if (col.pinned === "left") {
|
|
4504
|
+
meta[col.key] = { side: "left", offset: leftOffset };
|
|
4505
|
+
leftOffset += pinnedColumnWidth(col);
|
|
4506
|
+
}
|
|
4507
|
+
}
|
|
4508
|
+
let rightOffset = 0;
|
|
4509
|
+
for (let i = columns.length - 1; i >= 0; i--) {
|
|
4510
|
+
const col = columns[i];
|
|
4511
|
+
if (col.pinned === "right") {
|
|
4512
|
+
meta[col.key] = { side: "right", offset: rightOffset };
|
|
4513
|
+
rightOffset += pinnedColumnWidth(col);
|
|
4514
|
+
}
|
|
4515
|
+
}
|
|
4516
|
+
return meta;
|
|
4517
|
+
}
|
|
4486
4518
|
|
|
4487
4519
|
// src/components/organisms/data-table/dataTable.tsx
|
|
4488
4520
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
@@ -4533,6 +4565,7 @@ function ITDataTable({
|
|
|
4533
4565
|
const isStickyHeader = stickyHeader && isTableVirtual;
|
|
4534
4566
|
const resolvedRowHeight = rowHeight ?? getRowHeight(size, density);
|
|
4535
4567
|
const columnCount = columns.length;
|
|
4568
|
+
const pinnedMeta = import_react21.default.useMemo(() => getPinnedColumnMeta(columns), [columns]);
|
|
4536
4569
|
const scrollOuterClass = isTableVirtual ? "relative min-h-[200px]" : "overflow-x-auto relative min-h-[200px]";
|
|
4537
4570
|
const {
|
|
4538
4571
|
currentPage,
|
|
@@ -4812,38 +4845,46 @@ function ITDataTable({
|
|
|
4812
4845
|
{
|
|
4813
4846
|
className: (0, import_clsx23.default)(tableHeaderRow, "dark:text-slate-200"),
|
|
4814
4847
|
"aria-rowindex": isTableVirtual ? 1 : void 0,
|
|
4815
|
-
children: columns.map((col) =>
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
col.
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4848
|
+
children: columns.map((col) => {
|
|
4849
|
+
const pin = pinnedMeta[col.key];
|
|
4850
|
+
const isPinned = pin != null;
|
|
4851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4852
|
+
"th",
|
|
4853
|
+
{
|
|
4854
|
+
scope: "col",
|
|
4855
|
+
className: (0, import_clsx23.default)(
|
|
4856
|
+
tableHeaderCell(col.className, density),
|
|
4857
|
+
col.align && tableAlignClasses[col.align],
|
|
4858
|
+
isPinned && "sticky",
|
|
4859
|
+
isStickyHeader && "sticky top-0 bg-secondary-50",
|
|
4860
|
+
isPinned ? "z-[15]" : isStickyHeader && "z-10",
|
|
4861
|
+
isPinned && (col.pinned === "left" ? "it-table-pinned-left" : "it-table-pinned-right")
|
|
4862
|
+
),
|
|
4863
|
+
style: col.minWidth != null || isStickyHeader || isPinned ? {
|
|
4864
|
+
...col.minWidth != null ? { minWidth: `${col.minWidth}px` } : {},
|
|
4865
|
+
...isStickyHeader || isPinned ? { backgroundColor: "var(--color-table-headerBg, #f8fafc)" } : {},
|
|
4866
|
+
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
4867
|
+
} : void 0,
|
|
4868
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: isFixed ? "flex flex-col gap-3" : "flex flex-col gap-3 min-w-[150px]", children: [
|
|
4869
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
4870
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
|
|
4871
|
+
col.sortable && col.type !== "actions" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4872
|
+
"button",
|
|
4873
|
+
{
|
|
4874
|
+
onClick: () => handleSort(col.key),
|
|
4875
|
+
disabled: isLoading,
|
|
4876
|
+
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`,
|
|
4877
|
+
title: `Ordenar por ${col.label}`,
|
|
4878
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_md.MdOutlineSwapVert, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
4879
|
+
}
|
|
4880
|
+
)
|
|
4881
|
+
] }),
|
|
4882
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
|
|
4883
|
+
] })
|
|
4884
|
+
},
|
|
4885
|
+
col.key
|
|
4886
|
+
);
|
|
4887
|
+
})
|
|
4847
4888
|
}
|
|
4848
4889
|
) }),
|
|
4849
4890
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("tbody", { className: (0, import_clsx23.default)(tableBody, "dark:divide-slate-700/30"), children: data.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
@@ -4865,14 +4906,22 @@ function ITDataTable({
|
|
|
4865
4906
|
children: columns.map((col) => {
|
|
4866
4907
|
const rawValue = getNestedValue2(row, col.key);
|
|
4867
4908
|
const truncateTitle = col.truncate && (typeof rawValue === "string" || typeof rawValue === "number") ? String(rawValue) : void 0;
|
|
4909
|
+
const pin = pinnedMeta[col.key];
|
|
4910
|
+
const isPinned = pin != null;
|
|
4868
4911
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4869
4912
|
"td",
|
|
4870
4913
|
{
|
|
4871
4914
|
className: (0, import_clsx23.default)(
|
|
4872
4915
|
tableCell(col.className, density),
|
|
4873
|
-
col.align && tableAlignClasses[col.align]
|
|
4916
|
+
col.align && tableAlignClasses[col.align],
|
|
4917
|
+
isPinned && "sticky bg-[var(--color-table-rowBg,white)] group-hover:bg-[var(--color-table-rowHover,var(--color-secondary-50))]",
|
|
4918
|
+
isPinned && (col.pinned === "left" ? "it-table-pinned-left" : "it-table-pinned-right"),
|
|
4919
|
+
isPinned && "z-[1]"
|
|
4874
4920
|
),
|
|
4875
|
-
style: col.minWidth != null
|
|
4921
|
+
style: col.minWidth != null || isPinned ? {
|
|
4922
|
+
...col.minWidth != null ? { minWidth: `${col.minWidth}px` } : {},
|
|
4923
|
+
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
4924
|
+
} : void 0,
|
|
4876
4925
|
title: truncateTitle,
|
|
4877
4926
|
children: col.type === "actions" ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: tableActionsCell, children: renderCellContent(col, row) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: (0, import_clsx23.default)(tableCellText, col.truncate && "truncate"), children: renderCellContent(col, row) })
|
|
4878
4927
|
},
|
|
@@ -6242,10 +6291,52 @@ var ITImage = ({
|
|
|
6242
6291
|
};
|
|
6243
6292
|
var image_default = ITImage;
|
|
6244
6293
|
|
|
6294
|
+
// src/components/atoms/input-number/input-number.tsx
|
|
6295
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
6296
|
+
function parseNumber(raw) {
|
|
6297
|
+
if (raw === void 0 || raw === null) return void 0;
|
|
6298
|
+
if (typeof raw === "number") return Number.isFinite(raw) ? raw : void 0;
|
|
6299
|
+
const cleaned = String(raw).replace(/,/g, "").trim();
|
|
6300
|
+
if (cleaned === "" || cleaned === "-" || cleaned === ".") return void 0;
|
|
6301
|
+
const parsed = Number(cleaned);
|
|
6302
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
6303
|
+
}
|
|
6304
|
+
function ITInputNumber({
|
|
6305
|
+
value,
|
|
6306
|
+
onChange,
|
|
6307
|
+
onBlur,
|
|
6308
|
+
decimals = 2,
|
|
6309
|
+
prefix,
|
|
6310
|
+
iconLeft,
|
|
6311
|
+
...rest
|
|
6312
|
+
}) {
|
|
6313
|
+
const resolvedIconLeft = iconLeft ?? (prefix ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ITText, { as: "span", className: "text-secondary-500 text-xs font-semibold", children: prefix }) : void 0);
|
|
6314
|
+
const handleChange = (event) => {
|
|
6315
|
+
onChange(parseNumber(event.target.value), event);
|
|
6316
|
+
};
|
|
6317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6318
|
+
ITInput,
|
|
6319
|
+
{
|
|
6320
|
+
...rest,
|
|
6321
|
+
type: "number",
|
|
6322
|
+
currencyFormat: true,
|
|
6323
|
+
formatNumber: true,
|
|
6324
|
+
decimals,
|
|
6325
|
+
iconLeft: resolvedIconLeft,
|
|
6326
|
+
value: value ?? "",
|
|
6327
|
+
onChange: handleChange,
|
|
6328
|
+
onBlur: (event) => {
|
|
6329
|
+
const input = event.target;
|
|
6330
|
+
onBlur?.(parseNumber(input.value), event);
|
|
6331
|
+
}
|
|
6332
|
+
}
|
|
6333
|
+
);
|
|
6334
|
+
}
|
|
6335
|
+
|
|
6245
6336
|
// src/components/organisms/navbar/navbar.tsx
|
|
6246
6337
|
var import_react31 = require("react");
|
|
6247
6338
|
var import_fa20 = require("react-icons/fa");
|
|
6248
|
-
var
|
|
6339
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
6249
6340
|
function ITNavbar({
|
|
6250
6341
|
logo,
|
|
6251
6342
|
logoText,
|
|
@@ -6283,42 +6374,42 @@ function ITNavbar({
|
|
|
6283
6374
|
};
|
|
6284
6375
|
const shouldUseLegacy = !navigationItems.length && (navItems || sidebarItems);
|
|
6285
6376
|
if (shouldUseLegacy) {
|
|
6286
|
-
return /* @__PURE__ */ (0,
|
|
6287
|
-
/* @__PURE__ */ (0,
|
|
6288
|
-
/* @__PURE__ */ (0,
|
|
6289
|
-
logo && /* @__PURE__ */ (0,
|
|
6290
|
-
logoText && /* @__PURE__ */ (0,
|
|
6377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col h-screen", children: [
|
|
6378
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("nav", { className: "bg-white border-b border-secondary-200", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between mx-auto p-4", children: [
|
|
6379
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
|
|
6380
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "h-8", children: logo }),
|
|
6381
|
+
logoText && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-secondary-900", children: logoText })
|
|
6291
6382
|
] }),
|
|
6292
|
-
/* @__PURE__ */ (0,
|
|
6293
|
-
/* @__PURE__ */ (0,
|
|
6294
|
-
userMenu && /* @__PURE__ */ (0,
|
|
6295
|
-
/* @__PURE__ */ (0,
|
|
6383
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center justify-end w-full md:w-auto md:order-2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center space-x-4 md:order-2", children: [
|
|
6384
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { className: "hidden md:flex space-x-4", children: navItems }),
|
|
6385
|
+
userMenu && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative", children: [
|
|
6386
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6296
6387
|
"button",
|
|
6297
6388
|
{
|
|
6298
6389
|
type: "button",
|
|
6299
6390
|
className: "flex text-sm bg-secondary-200 rounded-full md:me-0 focus:ring-4 focus:ring-secondary-300",
|
|
6300
6391
|
onClick: toggleUserMenu,
|
|
6301
|
-
children: userMenu.userImage ? /* @__PURE__ */ (0,
|
|
6392
|
+
children: userMenu.userImage ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6302
6393
|
"img",
|
|
6303
6394
|
{
|
|
6304
6395
|
className: "w-8 h-8 rounded-full",
|
|
6305
6396
|
src: userMenu.userImage,
|
|
6306
6397
|
alt: "user photo"
|
|
6307
6398
|
}
|
|
6308
|
-
) : /* @__PURE__ */ (0,
|
|
6399
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_fa20.FaUserCircle, { className: "w-8 h-8 text-secondary-500" })
|
|
6309
6400
|
}
|
|
6310
6401
|
),
|
|
6311
|
-
isUserMenuOpen && /* @__PURE__ */ (0,
|
|
6402
|
+
isUserMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6312
6403
|
"div",
|
|
6313
6404
|
{
|
|
6314
6405
|
ref: userMenuRef,
|
|
6315
6406
|
className: "z-[70] absolute right-0 mt-2 text-base list-none bg-white divide-y divide-secondary-100 rounded-lg shadow-sm",
|
|
6316
6407
|
children: [
|
|
6317
|
-
/* @__PURE__ */ (0,
|
|
6318
|
-
/* @__PURE__ */ (0,
|
|
6319
|
-
/* @__PURE__ */ (0,
|
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "px-4 py-3", children: [
|
|
6409
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", className: "block text-sm text-secondary-900", children: userMenu.userName }),
|
|
6410
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", className: "block text-sm text-secondary-500 truncate", children: userMenu.userEmail })
|
|
6320
6411
|
] }),
|
|
6321
|
-
/* @__PURE__ */ (0,
|
|
6412
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6322
6413
|
"button",
|
|
6323
6414
|
{
|
|
6324
6415
|
onClick: () => {
|
|
@@ -6326,7 +6417,7 @@ function ITNavbar({
|
|
|
6326
6417
|
setIsUserMenuOpen(false);
|
|
6327
6418
|
},
|
|
6328
6419
|
className: "block px-4 py-2 text-sm text-secondary-700 hover:bg-secondary-100 w-full text-left",
|
|
6329
|
-
children: /* @__PURE__ */ (0,
|
|
6420
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", children: item.label })
|
|
6330
6421
|
}
|
|
6331
6422
|
) }, index)) })
|
|
6332
6423
|
]
|
|
@@ -6335,27 +6426,27 @@ function ITNavbar({
|
|
|
6335
6426
|
] })
|
|
6336
6427
|
] }) })
|
|
6337
6428
|
] }) }),
|
|
6338
|
-
/* @__PURE__ */ (0,
|
|
6339
|
-
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */ (0,
|
|
6340
|
-
/* @__PURE__ */ (0,
|
|
6429
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex-1 flex overflow-hidden relative", children: [
|
|
6430
|
+
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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__ */ (0, import_jsx_runtime37.jsx)("div", { className: "h-full overflow-y-auto py-4 px-3", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { className: "space-y-2 font-medium", children: sidebarItems }) }) }),
|
|
6431
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("main", { className: "flex-1 bg-secondary-100 overflow-y-auto", children })
|
|
6341
6432
|
] })
|
|
6342
6433
|
] });
|
|
6343
6434
|
}
|
|
6344
6435
|
const sidebar = theme.sidebar;
|
|
6345
6436
|
const topbar = theme.topbar;
|
|
6346
|
-
return /* @__PURE__ */ (0,
|
|
6347
|
-
/* @__PURE__ */ (0,
|
|
6437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex h-screen font-sans", style: { backgroundColor: theme.layout.backgroundColor }, children: [
|
|
6438
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6348
6439
|
"aside",
|
|
6349
6440
|
{
|
|
6350
6441
|
className: "w-72 shadow-xl flex flex-col transition-all duration-300 ease-in-out",
|
|
6351
6442
|
style: { backgroundColor: sidebar.backgroundColor, borderRight: `1px solid ${sidebar.borderColor}` },
|
|
6352
6443
|
children: [
|
|
6353
|
-
/* @__PURE__ */ (0,
|
|
6354
|
-
logo && /* @__PURE__ */ (0,
|
|
6355
|
-
logoText && /* @__PURE__ */ (0,
|
|
6444
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: `1px solid ${sidebar.borderColor}` }, children: [
|
|
6445
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
|
|
6446
|
+
logoText && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: sidebar.active.color }, children: logoText })
|
|
6356
6447
|
] }),
|
|
6357
|
-
/* @__PURE__ */ (0,
|
|
6358
|
-
/* @__PURE__ */ (0,
|
|
6448
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("nav", { className: "flex-1 px-4 py-6 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { className: "flex flex-col gap-1.5", children: navigationItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("li", { children: [
|
|
6449
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6359
6450
|
"div",
|
|
6360
6451
|
{
|
|
6361
6452
|
className: `group flex items-center justify-between px-4 py-3 rounded-xl cursor-pointer transition-all duration-200 border-l-4 ${item.isActive ? "shadow-sm" : "hover:shadow-sm"}`,
|
|
@@ -6378,17 +6469,17 @@ function ITNavbar({
|
|
|
6378
6469
|
}
|
|
6379
6470
|
},
|
|
6380
6471
|
children: [
|
|
6381
|
-
/* @__PURE__ */ (0,
|
|
6382
|
-
item.icon && /* @__PURE__ */ (0,
|
|
6472
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6473
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "text-xl transition-colors", style: {
|
|
6383
6474
|
color: item.isActive ? sidebar.active.iconColor : sidebar.icon.color
|
|
6384
6475
|
}, children: item.icon }),
|
|
6385
|
-
/* @__PURE__ */ (0,
|
|
6476
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
|
|
6386
6477
|
] }),
|
|
6387
|
-
item.subitems && item.subitems.length > 0 && /* @__PURE__ */ (0,
|
|
6478
|
+
item.subitems && item.subitems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "transition-transform", style: { color: sidebar.icon.color }, children: expandedItems.has(item.id) ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_fa20.FaChevronDown, { className: "w-3 h-3" }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_fa20.FaChevronRight, { className: "w-3 h-3" }) })
|
|
6388
6479
|
]
|
|
6389
6480
|
}
|
|
6390
6481
|
),
|
|
6391
|
-
item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ (0,
|
|
6482
|
+
item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { className: "mt-1 ml-4 pl-4 space-y-1", style: { borderLeft: `1px solid ${sidebar.borderColor}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6392
6483
|
"button",
|
|
6393
6484
|
{
|
|
6394
6485
|
onClick: subitem.action,
|
|
@@ -6407,12 +6498,12 @@ function ITNavbar({
|
|
|
6407
6498
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
6408
6499
|
}
|
|
6409
6500
|
},
|
|
6410
|
-
children: /* @__PURE__ */ (0,
|
|
6501
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", children: subitem.label })
|
|
6411
6502
|
}
|
|
6412
6503
|
) }, subitem.id)) })
|
|
6413
6504
|
] }, item.id)) }) }),
|
|
6414
|
-
userMenu && /* @__PURE__ */ (0,
|
|
6415
|
-
/* @__PURE__ */ (0,
|
|
6505
|
+
userMenu && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "p-4", style: { borderTop: `1px solid ${sidebar.borderColor}` }, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative", children: [
|
|
6506
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6416
6507
|
"button",
|
|
6417
6508
|
{
|
|
6418
6509
|
type: "button",
|
|
@@ -6428,7 +6519,7 @@ function ITNavbar({
|
|
|
6428
6519
|
},
|
|
6429
6520
|
onClick: toggleUserMenu,
|
|
6430
6521
|
children: [
|
|
6431
|
-
userMenu.userImage ? /* @__PURE__ */ (0,
|
|
6522
|
+
userMenu.userImage ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6432
6523
|
"img",
|
|
6433
6524
|
{
|
|
6434
6525
|
className: "w-10 h-10 rounded-full border-2 transition-colors",
|
|
@@ -6436,34 +6527,34 @@ function ITNavbar({
|
|
|
6436
6527
|
alt: "user photo",
|
|
6437
6528
|
style: { borderColor: sidebar.borderColor }
|
|
6438
6529
|
}
|
|
6439
|
-
) : /* @__PURE__ */ (0,
|
|
6530
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6440
6531
|
"div",
|
|
6441
6532
|
{
|
|
6442
6533
|
className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors",
|
|
6443
6534
|
style: { backgroundColor: sidebar.hover.backgroundColor, color: sidebar.icon.color },
|
|
6444
|
-
children: /* @__PURE__ */ (0,
|
|
6535
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_fa20.FaUserCircle, { className: "w-6 h-6" })
|
|
6445
6536
|
}
|
|
6446
6537
|
),
|
|
6447
|
-
/* @__PURE__ */ (0,
|
|
6448
|
-
/* @__PURE__ */ (0,
|
|
6449
|
-
/* @__PURE__ */ (0,
|
|
6538
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex-1 text-left overflow-hidden", children: [
|
|
6539
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: sidebar.active.color }, children: userMenu.userName }),
|
|
6540
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "div", className: "text-xs truncate", style: { color: sidebar.label.color }, children: userMenu.userEmail })
|
|
6450
6541
|
] }),
|
|
6451
|
-
/* @__PURE__ */ (0,
|
|
6542
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_fa20.FaChevronRight, { className: "w-3 h-3", style: { color: sidebar.icon.color } })
|
|
6452
6543
|
]
|
|
6453
6544
|
}
|
|
6454
6545
|
),
|
|
6455
|
-
isUserMenuOpen && /* @__PURE__ */ (0,
|
|
6546
|
+
isUserMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
6456
6547
|
"div",
|
|
6457
6548
|
{
|
|
6458
6549
|
ref: userMenuRef,
|
|
6459
6550
|
className: "absolute bottom-full left-0 mb-3 w-full rounded-xl shadow-2xl overflow-hidden transform transition-all duration-200 origin-bottom",
|
|
6460
6551
|
style: { backgroundColor: topbar.userMenu.dropdown.backgroundColor, border: `1px solid ${topbar.userMenu.dropdown.borderColor}` },
|
|
6461
6552
|
children: [
|
|
6462
|
-
/* @__PURE__ */ (0,
|
|
6463
|
-
/* @__PURE__ */ (0,
|
|
6464
|
-
/* @__PURE__ */ (0,
|
|
6553
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "px-4 py-3", style: { backgroundColor: topbar.userMenu.backgroundColor, borderBottom: `1px solid ${topbar.userMenu.dropdown.borderColor}` }, children: [
|
|
6554
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: topbar.userMenu.textColor }, children: userMenu.userName }),
|
|
6555
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", className: "block text-xs truncate", style: { color: topbar.userMenu.subtitleColor }, children: userMenu.userEmail })
|
|
6465
6556
|
] }),
|
|
6466
|
-
/* @__PURE__ */ (0,
|
|
6557
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
6467
6558
|
"button",
|
|
6468
6559
|
{
|
|
6469
6560
|
onClick: () => {
|
|
@@ -6478,7 +6569,7 @@ function ITNavbar({
|
|
|
6478
6569
|
onMouseLeave: (e) => {
|
|
6479
6570
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
6480
6571
|
},
|
|
6481
|
-
children: /* @__PURE__ */ (0,
|
|
6572
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ITText, { as: "span", children: item.label })
|
|
6482
6573
|
}
|
|
6483
6574
|
) }, index)) })
|
|
6484
6575
|
]
|
|
@@ -6488,7 +6579,7 @@ function ITNavbar({
|
|
|
6488
6579
|
]
|
|
6489
6580
|
}
|
|
6490
6581
|
),
|
|
6491
|
-
/* @__PURE__ */ (0,
|
|
6582
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: theme.layout.backgroundColor }, children })
|
|
6492
6583
|
] });
|
|
6493
6584
|
}
|
|
6494
6585
|
|
|
@@ -6497,7 +6588,7 @@ var import_clsx33 = __toESM(require("clsx"), 1);
|
|
|
6497
6588
|
|
|
6498
6589
|
// src/components/organisms/page-header/page-header.tsx
|
|
6499
6590
|
var import_fa21 = require("react-icons/fa");
|
|
6500
|
-
var
|
|
6591
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6501
6592
|
function ITPageHeader({
|
|
6502
6593
|
title,
|
|
6503
6594
|
description,
|
|
@@ -6509,25 +6600,25 @@ function ITPageHeader({
|
|
|
6509
6600
|
className
|
|
6510
6601
|
}) {
|
|
6511
6602
|
const showTopRow = breadcrumbs?.length || backAction;
|
|
6512
|
-
return /* @__PURE__ */ (0,
|
|
6513
|
-
showTopRow && /* @__PURE__ */ (0,
|
|
6514
|
-
/* @__PURE__ */ (0,
|
|
6515
|
-
backAction && /* @__PURE__ */ (0,
|
|
6603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: `${className} space-y-3`, children: [
|
|
6604
|
+
showTopRow && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
6605
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
6606
|
+
backAction && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6516
6607
|
"button",
|
|
6517
6608
|
{
|
|
6518
6609
|
onClick: backAction,
|
|
6519
6610
|
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",
|
|
6520
6611
|
"aria-label": "Volver",
|
|
6521
|
-
children: /* @__PURE__ */ (0,
|
|
6612
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_fa21.FaChevronLeft, { size: 14 })
|
|
6522
6613
|
}
|
|
6523
6614
|
),
|
|
6524
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ (0,
|
|
6615
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ITBreadcrumbs, { items: breadcrumbs })
|
|
6525
6616
|
] }),
|
|
6526
|
-
actions && /* @__PURE__ */ (0,
|
|
6617
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6527
6618
|
] }),
|
|
6528
|
-
/* @__PURE__ */ (0,
|
|
6529
|
-
/* @__PURE__ */ (0,
|
|
6530
|
-
icon && /* @__PURE__ */ (0,
|
|
6619
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-start justify-between gap-6", children: [
|
|
6620
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-start gap-4 min-w-0", children: [
|
|
6621
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6531
6622
|
"div",
|
|
6532
6623
|
{
|
|
6533
6624
|
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",
|
|
@@ -6535,8 +6626,8 @@ function ITPageHeader({
|
|
|
6535
6626
|
children: icon
|
|
6536
6627
|
}
|
|
6537
6628
|
),
|
|
6538
|
-
/* @__PURE__ */ (0,
|
|
6539
|
-
/* @__PURE__ */ (0,
|
|
6629
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "min-w-0", children: [
|
|
6630
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6540
6631
|
ITText,
|
|
6541
6632
|
{
|
|
6542
6633
|
as: "h1",
|
|
@@ -6544,7 +6635,7 @@ function ITPageHeader({
|
|
|
6544
6635
|
children: title
|
|
6545
6636
|
}
|
|
6546
6637
|
),
|
|
6547
|
-
description && /* @__PURE__ */ (0,
|
|
6638
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6548
6639
|
ITText,
|
|
6549
6640
|
{
|
|
6550
6641
|
as: "p",
|
|
@@ -6554,14 +6645,14 @@ function ITPageHeader({
|
|
|
6554
6645
|
)
|
|
6555
6646
|
] })
|
|
6556
6647
|
] }),
|
|
6557
|
-
!showTopRow && actions && /* @__PURE__ */ (0,
|
|
6648
|
+
!showTopRow && actions && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6558
6649
|
] })
|
|
6559
6650
|
] });
|
|
6560
6651
|
}
|
|
6561
6652
|
|
|
6562
6653
|
// src/components/atoms/skeleton/skeleton.tsx
|
|
6563
6654
|
var import_clsx31 = __toESM(require("clsx"), 1);
|
|
6564
|
-
var
|
|
6655
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6565
6656
|
var variantClasses = {
|
|
6566
6657
|
text: "rounded-md h-4 w-full",
|
|
6567
6658
|
circular: "rounded-full",
|
|
@@ -6581,7 +6672,7 @@ function ITSkeleton({
|
|
|
6581
6672
|
...style
|
|
6582
6673
|
};
|
|
6583
6674
|
const items = Array.from({ length: count }, (_, i) => i);
|
|
6584
|
-
return /* @__PURE__ */ (0,
|
|
6675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: items.map((i) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6585
6676
|
"div",
|
|
6586
6677
|
{
|
|
6587
6678
|
className: (0, import_clsx31.default)(
|
|
@@ -6602,7 +6693,7 @@ function ITSkeleton({
|
|
|
6602
6693
|
// src/components/atoms/stack/stack.tsx
|
|
6603
6694
|
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
6604
6695
|
var import_react32 = require("react");
|
|
6605
|
-
var
|
|
6696
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6606
6697
|
var directionMap2 = {
|
|
6607
6698
|
row: "flex-row",
|
|
6608
6699
|
column: "flex-col",
|
|
@@ -6647,7 +6738,7 @@ function ITStack({
|
|
|
6647
6738
|
gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
|
|
6648
6739
|
...style
|
|
6649
6740
|
};
|
|
6650
|
-
return /* @__PURE__ */ (0,
|
|
6741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6651
6742
|
Component,
|
|
6652
6743
|
{
|
|
6653
6744
|
className: (0, import_clsx32.default)(
|
|
@@ -6659,7 +6750,7 @@ function ITStack({
|
|
|
6659
6750
|
className
|
|
6660
6751
|
),
|
|
6661
6752
|
style: resolvedStyle,
|
|
6662
|
-
children: hasDivider ? items.map((child, index) => /* @__PURE__ */ (0,
|
|
6753
|
+
children: hasDivider ? items.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react32.Fragment, { children: [
|
|
6663
6754
|
child,
|
|
6664
6755
|
index < items.length - 1 && (0, import_react32.isValidElement)(divider) ? (0, import_react32.cloneElement)(divider, { key: `divider-${index}` }) : null
|
|
6665
6756
|
] }, index)) : children
|
|
@@ -6668,11 +6759,11 @@ function ITStack({
|
|
|
6668
6759
|
}
|
|
6669
6760
|
|
|
6670
6761
|
// src/components/templates/page/page.tsx
|
|
6671
|
-
var
|
|
6762
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6672
6763
|
var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction || props.icon);
|
|
6673
6764
|
var renderHeader = (props) => {
|
|
6674
6765
|
if (!hasHeader(props)) return null;
|
|
6675
|
-
return /* @__PURE__ */ (0,
|
|
6766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6676
6767
|
ITPageHeader,
|
|
6677
6768
|
{
|
|
6678
6769
|
title: props.title || "",
|
|
@@ -6711,24 +6802,24 @@ function ITPage(props) {
|
|
|
6711
6802
|
className
|
|
6712
6803
|
);
|
|
6713
6804
|
if (loading) {
|
|
6714
|
-
return /* @__PURE__ */ (0,
|
|
6805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: wrapperClass, children: [
|
|
6715
6806
|
renderHeader(props),
|
|
6716
|
-
/* @__PURE__ */ (0,
|
|
6717
|
-
/* @__PURE__ */ (0,
|
|
6718
|
-
/* @__PURE__ */ (0,
|
|
6719
|
-
/* @__PURE__ */ (0,
|
|
6807
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(ITStack, { spacing: 6, children: [
|
|
6808
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ITSkeleton, { variant: "rectangular", height: 40, width: "40%", className: "rounded-lg" }),
|
|
6809
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" }),
|
|
6810
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" })
|
|
6720
6811
|
] })
|
|
6721
6812
|
] });
|
|
6722
6813
|
}
|
|
6723
6814
|
if (error) {
|
|
6724
|
-
return /* @__PURE__ */ (0,
|
|
6815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: wrapperClass, children: [
|
|
6725
6816
|
renderHeader(props),
|
|
6726
|
-
/* @__PURE__ */ (0,
|
|
6817
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6727
6818
|
ITEmptyState,
|
|
6728
6819
|
{
|
|
6729
6820
|
title: errorTitle || "Error",
|
|
6730
6821
|
description: error,
|
|
6731
|
-
action: onRetry ? /* @__PURE__ */ (0,
|
|
6822
|
+
action: onRetry ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6732
6823
|
ITButton,
|
|
6733
6824
|
{
|
|
6734
6825
|
label: errorActionLabel || "Reintentar",
|
|
@@ -6741,9 +6832,9 @@ function ITPage(props) {
|
|
|
6741
6832
|
] });
|
|
6742
6833
|
}
|
|
6743
6834
|
if (empty) {
|
|
6744
|
-
return /* @__PURE__ */ (0,
|
|
6835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: wrapperClass, children: [
|
|
6745
6836
|
renderHeader(props),
|
|
6746
|
-
/* @__PURE__ */ (0,
|
|
6837
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6747
6838
|
ITEmptyState,
|
|
6748
6839
|
{
|
|
6749
6840
|
title: emptyTitle || "Sin datos",
|
|
@@ -6753,7 +6844,7 @@ function ITPage(props) {
|
|
|
6753
6844
|
)
|
|
6754
6845
|
] });
|
|
6755
6846
|
}
|
|
6756
|
-
return /* @__PURE__ */ (0,
|
|
6847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: wrapperClass, children: [
|
|
6757
6848
|
renderHeader(props),
|
|
6758
6849
|
children
|
|
6759
6850
|
] });
|
|
@@ -6762,7 +6853,7 @@ function ITPage(props) {
|
|
|
6762
6853
|
// src/components/atoms/popover/popover.tsx
|
|
6763
6854
|
var import_react33 = require("react");
|
|
6764
6855
|
var import_clsx34 = __toESM(require("clsx"), 1);
|
|
6765
|
-
var
|
|
6856
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6766
6857
|
var positionClasses = {
|
|
6767
6858
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
6768
6859
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -6785,15 +6876,15 @@ function ITPopover({
|
|
|
6785
6876
|
if (isControlled) onClose?.();
|
|
6786
6877
|
else setInternalOpen(false);
|
|
6787
6878
|
});
|
|
6788
|
-
return /* @__PURE__ */ (0,
|
|
6789
|
-
/* @__PURE__ */ (0,
|
|
6790
|
-
open && /* @__PURE__ */ (0,
|
|
6879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { ref, className: (0, import_clsx34.default)("relative inline-flex", className), children: [
|
|
6880
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
|
|
6881
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: (0, import_clsx34.default)("absolute z-[70]", positionClasses[position]), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 p-3 min-w-[160px]", children }) })
|
|
6791
6882
|
] });
|
|
6792
6883
|
}
|
|
6793
6884
|
|
|
6794
6885
|
// src/components/atoms/progress/progress.tsx
|
|
6795
6886
|
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
6796
|
-
var
|
|
6887
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
6797
6888
|
var colorMap = {
|
|
6798
6889
|
primary: "bg-primary-500",
|
|
6799
6890
|
secondary: "bg-secondary-500",
|
|
@@ -6820,7 +6911,7 @@ function ITProgress({
|
|
|
6820
6911
|
style
|
|
6821
6912
|
}) {
|
|
6822
6913
|
const pct = Math.min(Math.max(value / max * 100, 0), 100);
|
|
6823
|
-
return /* @__PURE__ */ (0,
|
|
6914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6824
6915
|
"div",
|
|
6825
6916
|
{
|
|
6826
6917
|
className: (0, import_clsx35.default)("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap2[size], className),
|
|
@@ -6828,7 +6919,7 @@ function ITProgress({
|
|
|
6828
6919
|
role: "progressbar",
|
|
6829
6920
|
"aria-valuenow": variant === "determinate" ? value : void 0,
|
|
6830
6921
|
"aria-valuemax": max,
|
|
6831
|
-
children: /* @__PURE__ */ (0,
|
|
6922
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6832
6923
|
"div",
|
|
6833
6924
|
{
|
|
6834
6925
|
className: (0, import_clsx35.default)(
|
|
@@ -6845,7 +6936,7 @@ function ITProgress({
|
|
|
6845
6936
|
|
|
6846
6937
|
// src/components/atoms/radio/radio.tsx
|
|
6847
6938
|
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
6848
|
-
var
|
|
6939
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6849
6940
|
function ITRadioGroup({
|
|
6850
6941
|
name,
|
|
6851
6942
|
value,
|
|
@@ -6855,7 +6946,7 @@ function ITRadioGroup({
|
|
|
6855
6946
|
direction = "column",
|
|
6856
6947
|
className
|
|
6857
6948
|
}) {
|
|
6858
|
-
return /* @__PURE__ */ (0,
|
|
6949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6859
6950
|
"div",
|
|
6860
6951
|
{
|
|
6861
6952
|
className: (0, import_clsx36.default)(
|
|
@@ -6865,7 +6956,7 @@ function ITRadioGroup({
|
|
|
6865
6956
|
),
|
|
6866
6957
|
children: options.map((opt) => {
|
|
6867
6958
|
const isSelected = opt.value === value;
|
|
6868
|
-
return /* @__PURE__ */ (0,
|
|
6959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6869
6960
|
"label",
|
|
6870
6961
|
{
|
|
6871
6962
|
className: (0, import_clsx36.default)(
|
|
@@ -6873,7 +6964,7 @@ function ITRadioGroup({
|
|
|
6873
6964
|
disabled && "opacity-50 cursor-not-allowed"
|
|
6874
6965
|
),
|
|
6875
6966
|
children: [
|
|
6876
|
-
/* @__PURE__ */ (0,
|
|
6967
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6877
6968
|
"input",
|
|
6878
6969
|
{
|
|
6879
6970
|
type: "radio",
|
|
@@ -6885,7 +6976,7 @@ function ITRadioGroup({
|
|
|
6885
6976
|
className: "peer sr-only"
|
|
6886
6977
|
}
|
|
6887
6978
|
),
|
|
6888
|
-
/* @__PURE__ */ (0,
|
|
6979
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6889
6980
|
"div",
|
|
6890
6981
|
{
|
|
6891
6982
|
className: (0, import_clsx36.default)(
|
|
@@ -6893,10 +6984,10 @@ function ITRadioGroup({
|
|
|
6893
6984
|
isSelected ? "border-primary-500" : "border-slate-300 dark:border-slate-600",
|
|
6894
6985
|
!disabled && "peer-focus:ring-2 peer-focus:ring-primary-200"
|
|
6895
6986
|
),
|
|
6896
|
-
children: isSelected && /* @__PURE__ */ (0,
|
|
6987
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-2 h-2 rounded-full bg-primary-500" })
|
|
6897
6988
|
}
|
|
6898
6989
|
),
|
|
6899
|
-
/* @__PURE__ */ (0,
|
|
6990
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ITText, { as: "span", className: "text-sm text-slate-700 dark:text-slate-300", children: opt.label })
|
|
6900
6991
|
]
|
|
6901
6992
|
},
|
|
6902
6993
|
opt.value
|
|
@@ -6912,16 +7003,16 @@ var import_react34 = require("react");
|
|
|
6912
7003
|
|
|
6913
7004
|
// src/components/organisms/searchTable/components/SearchInput.tsx
|
|
6914
7005
|
var import_fa22 = require("react-icons/fa");
|
|
6915
|
-
var
|
|
7006
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6916
7007
|
function SearchInput({
|
|
6917
7008
|
placeholder = "Buscar en todos los campos...",
|
|
6918
7009
|
value,
|
|
6919
7010
|
onChange,
|
|
6920
7011
|
className = ""
|
|
6921
7012
|
}) {
|
|
6922
|
-
return /* @__PURE__ */ (0,
|
|
6923
|
-
/* @__PURE__ */ (0,
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
7013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: `relative flex-1 ${className}`, children: [
|
|
7014
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_fa22.FaSearch, { className: "h-5 w-5 text-secondary-400" }) }),
|
|
7015
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6925
7016
|
ITInput,
|
|
6926
7017
|
{
|
|
6927
7018
|
name: "global-search",
|
|
@@ -6938,13 +7029,13 @@ function SearchInput({
|
|
|
6938
7029
|
|
|
6939
7030
|
// src/components/organisms/searchTable/components/SortButton.tsx
|
|
6940
7031
|
var import_fa23 = require("react-icons/fa");
|
|
6941
|
-
var
|
|
7032
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6942
7033
|
function SortButton({
|
|
6943
7034
|
sortConfig,
|
|
6944
7035
|
onClick,
|
|
6945
7036
|
className = ""
|
|
6946
7037
|
}) {
|
|
6947
|
-
return /* @__PURE__ */ (0,
|
|
7038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
6948
7039
|
"button",
|
|
6949
7040
|
{
|
|
6950
7041
|
onClick,
|
|
@@ -6952,15 +7043,15 @@ function SortButton({
|
|
|
6952
7043
|
"aria-label": `Ordenar tabla ${sortConfig ? sortConfig.direction === "asc" ? "descendente" : "ascendente" : "ascendente"}`,
|
|
6953
7044
|
title: "Ordenar tabla",
|
|
6954
7045
|
children: [
|
|
6955
|
-
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */ (0,
|
|
6956
|
-
/* @__PURE__ */ (0,
|
|
7046
|
+
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_fa23.FaSortUp, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_fa23.FaSortDown, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_fa23.FaSort, { className: "w-4 h-4 text-secondary-500" }),
|
|
7047
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ITText, { as: "span", className: "text-sm font-medium text-secondary-700", children: sortConfig ? sortConfig.direction === "asc" ? "Asc \u2191" : "Desc \u2193" : "Ordenar" })
|
|
6957
7048
|
]
|
|
6958
7049
|
}
|
|
6959
7050
|
);
|
|
6960
7051
|
}
|
|
6961
7052
|
|
|
6962
7053
|
// src/components/organisms/searchTable/components/SearchAndSortBar.tsx
|
|
6963
|
-
var
|
|
7054
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6964
7055
|
function SearchAndSortBar({
|
|
6965
7056
|
searchTerm,
|
|
6966
7057
|
onSearchChange,
|
|
@@ -6969,8 +7060,8 @@ function SearchAndSortBar({
|
|
|
6969
7060
|
sortConfig,
|
|
6970
7061
|
searchInputPlaceholder = "Buscar en todos los campos..."
|
|
6971
7062
|
}) {
|
|
6972
|
-
return /* @__PURE__ */ (0,
|
|
6973
|
-
/* @__PURE__ */ (0,
|
|
7063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "bg-secondary-50 px-6 py-4 border-b border-secondary-200", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
7064
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6974
7065
|
SearchInput,
|
|
6975
7066
|
{
|
|
6976
7067
|
placeholder: searchInputPlaceholder,
|
|
@@ -6978,8 +7069,8 @@ function SearchAndSortBar({
|
|
|
6978
7069
|
onChange: onSearchChange
|
|
6979
7070
|
}
|
|
6980
7071
|
),
|
|
6981
|
-
/* @__PURE__ */ (0,
|
|
6982
|
-
searchTerm && /* @__PURE__ */ (0,
|
|
7072
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SortButton, { sortConfig, onClick: onGlobalSort }),
|
|
7073
|
+
searchTerm && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6983
7074
|
ITButton,
|
|
6984
7075
|
{
|
|
6985
7076
|
size: "sm",
|
|
@@ -6988,14 +7079,14 @@ function SearchAndSortBar({
|
|
|
6988
7079
|
onClick: onClearSearch,
|
|
6989
7080
|
ariaLabel: "Limpiar b\xFAsqueda",
|
|
6990
7081
|
title: "Limpiar b\xFAsqueda",
|
|
6991
|
-
children: /* @__PURE__ */ (0,
|
|
7082
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ITText, { as: "span", children: "Limpiar" })
|
|
6992
7083
|
}
|
|
6993
7084
|
)
|
|
6994
7085
|
] }) });
|
|
6995
7086
|
}
|
|
6996
7087
|
|
|
6997
7088
|
// src/components/organisms/searchTable/components/TableHeaderCell.tsx
|
|
6998
|
-
var
|
|
7089
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6999
7090
|
function TableHeaderCell({
|
|
7000
7091
|
label,
|
|
7001
7092
|
sortable = false,
|
|
@@ -7003,8 +7094,8 @@ function TableHeaderCell({
|
|
|
7003
7094
|
sortConfig,
|
|
7004
7095
|
className = ""
|
|
7005
7096
|
}) {
|
|
7006
|
-
return /* @__PURE__ */ (0,
|
|
7007
|
-
/* @__PURE__ */ (0,
|
|
7097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { className, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex flex-col items-center gap-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-center gap-2 w-full", children: [
|
|
7098
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7008
7099
|
ITText,
|
|
7009
7100
|
{
|
|
7010
7101
|
as: "span",
|
|
@@ -7018,18 +7109,18 @@ function TableHeaderCell({
|
|
|
7018
7109
|
children: label
|
|
7019
7110
|
}
|
|
7020
7111
|
),
|
|
7021
|
-
sortable && /* @__PURE__ */ (0,
|
|
7112
|
+
sortable && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SortButton, { sortConfig, onClick: onSort })
|
|
7022
7113
|
] }) }) });
|
|
7023
7114
|
}
|
|
7024
7115
|
|
|
7025
7116
|
// src/components/organisms/searchTable/components/TableHeader.tsx
|
|
7026
|
-
var
|
|
7117
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7027
7118
|
function TableHeader({
|
|
7028
7119
|
columns,
|
|
7029
7120
|
onSort,
|
|
7030
7121
|
sortConfig
|
|
7031
7122
|
}) {
|
|
7032
|
-
return /* @__PURE__ */ (0,
|
|
7123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("tr", { className: "bg-white border-b border-secondary-200", children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7033
7124
|
TableHeaderCell,
|
|
7034
7125
|
{
|
|
7035
7126
|
label: col.label,
|
|
@@ -7047,7 +7138,7 @@ var import_clsx37 = __toESM(require("clsx"), 1);
|
|
|
7047
7138
|
var import_fa24 = require("react-icons/fa");
|
|
7048
7139
|
|
|
7049
7140
|
// src/components/organisms/searchTable/components/EditableCell.tsx
|
|
7050
|
-
var
|
|
7141
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7051
7142
|
function EditableCell({
|
|
7052
7143
|
column,
|
|
7053
7144
|
value,
|
|
@@ -7076,7 +7167,7 @@ function EditableCell({
|
|
|
7076
7167
|
onChange(value, errorMsg);
|
|
7077
7168
|
};
|
|
7078
7169
|
const renderITInput = (type) => {
|
|
7079
|
-
return /* @__PURE__ */ (0,
|
|
7170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7080
7171
|
ITInput,
|
|
7081
7172
|
{
|
|
7082
7173
|
type,
|
|
@@ -7090,7 +7181,7 @@ function EditableCell({
|
|
|
7090
7181
|
);
|
|
7091
7182
|
};
|
|
7092
7183
|
const renderITDatePicker = () => {
|
|
7093
|
-
return /* @__PURE__ */ (0,
|
|
7184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7094
7185
|
ITDatePicker,
|
|
7095
7186
|
{
|
|
7096
7187
|
name: column.key,
|
|
@@ -7103,7 +7194,7 @@ function EditableCell({
|
|
|
7103
7194
|
);
|
|
7104
7195
|
};
|
|
7105
7196
|
const renderITSelect = (options) => {
|
|
7106
|
-
return /* @__PURE__ */ (0,
|
|
7197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7107
7198
|
ITSelect,
|
|
7108
7199
|
{
|
|
7109
7200
|
name: column.key,
|
|
@@ -7117,7 +7208,7 @@ function EditableCell({
|
|
|
7117
7208
|
);
|
|
7118
7209
|
};
|
|
7119
7210
|
const renderBooleanInput = () => {
|
|
7120
|
-
return /* @__PURE__ */ (0,
|
|
7211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7121
7212
|
ITInput,
|
|
7122
7213
|
{
|
|
7123
7214
|
type: "checkbox",
|
|
@@ -7158,14 +7249,14 @@ function EditableCell({
|
|
|
7158
7249
|
return renderITInput("text");
|
|
7159
7250
|
}
|
|
7160
7251
|
};
|
|
7161
|
-
return /* @__PURE__ */ (0,
|
|
7252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "w-full", children: [
|
|
7162
7253
|
renderInput(),
|
|
7163
|
-
error && /* @__PURE__ */ (0,
|
|
7254
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "text-danger-500 text-xs mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ITText, { as: "span", children: error }) })
|
|
7164
7255
|
] });
|
|
7165
7256
|
}
|
|
7166
7257
|
|
|
7167
7258
|
// src/components/organisms/searchTable/components/TableRow.tsx
|
|
7168
|
-
var
|
|
7259
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7169
7260
|
function TableRow({
|
|
7170
7261
|
row,
|
|
7171
7262
|
rowIndex,
|
|
@@ -7198,14 +7289,14 @@ function TableRow({
|
|
|
7198
7289
|
case "number":
|
|
7199
7290
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
7200
7291
|
case "boolean":
|
|
7201
|
-
return value ? /* @__PURE__ */ (0,
|
|
7292
|
+
return value ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7202
7293
|
import_fa24.FaCheck,
|
|
7203
7294
|
{
|
|
7204
7295
|
className: "text-green-500",
|
|
7205
7296
|
"aria-label": "Verdadero",
|
|
7206
7297
|
title: "Verdadero"
|
|
7207
7298
|
}
|
|
7208
|
-
) : /* @__PURE__ */ (0,
|
|
7299
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_fa24.FaTimes, { className: "text-danger-500", "aria-label": "Falso", title: "Falso" });
|
|
7209
7300
|
case "actions":
|
|
7210
7301
|
if (isEditing && col.saveActions) {
|
|
7211
7302
|
return col.saveActions(rowData, {
|
|
@@ -7229,19 +7320,19 @@ function TableRow({
|
|
|
7229
7320
|
return value;
|
|
7230
7321
|
}
|
|
7231
7322
|
};
|
|
7232
|
-
return /* @__PURE__ */ (0,
|
|
7323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7233
7324
|
"tr",
|
|
7234
7325
|
{
|
|
7235
7326
|
onMouseEnter: () => setIsHovered(true),
|
|
7236
7327
|
onMouseLeave: () => setIsHovered(false),
|
|
7237
7328
|
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" : ""}`,
|
|
7238
|
-
children: columns.map((col) => /* @__PURE__ */ (0,
|
|
7329
|
+
children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7239
7330
|
"td",
|
|
7240
7331
|
{
|
|
7241
7332
|
className: (0, import_clsx37.default)("pl-5 py-2", col.className, {
|
|
7242
7333
|
"text-center": col.type === "actions" || col.type === "boolean"
|
|
7243
7334
|
}),
|
|
7244
|
-
children: isEditing && col.editable ? /* @__PURE__ */ (0,
|
|
7335
|
+
children: isEditing && col.editable ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7245
7336
|
EditableCell,
|
|
7246
7337
|
{
|
|
7247
7338
|
column: col,
|
|
@@ -7250,7 +7341,7 @@ function TableRow({
|
|
|
7250
7341
|
error: errors[col.key],
|
|
7251
7342
|
row: editedRow
|
|
7252
7343
|
}
|
|
7253
|
-
) : /* @__PURE__ */ (0,
|
|
7344
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7254
7345
|
"div",
|
|
7255
7346
|
{
|
|
7256
7347
|
className: (0, import_clsx37.default)({
|
|
@@ -7270,25 +7361,25 @@ function TableRow({
|
|
|
7270
7361
|
}
|
|
7271
7362
|
|
|
7272
7363
|
// src/components/organisms/searchTable/components/TableEmptyState.tsx
|
|
7273
|
-
var
|
|
7364
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7274
7365
|
function TableEmptyState({
|
|
7275
7366
|
colSpan,
|
|
7276
7367
|
searchTerm
|
|
7277
7368
|
}) {
|
|
7278
|
-
return /* @__PURE__ */ (0,
|
|
7369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("td", { colSpan, className: "px-6 py-4 text-center", children: searchTerm ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ITText, { as: "span", children: "No se encontraron resultados para tu b\xFAsqueda" }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ITText, { as: "span", children: "No se encontraron resultados" }) }) });
|
|
7279
7370
|
}
|
|
7280
7371
|
|
|
7281
7372
|
// src/components/organisms/searchTable/components/PaginationControls.tsx
|
|
7282
7373
|
var import_fa25 = require("react-icons/fa");
|
|
7283
7374
|
|
|
7284
7375
|
// src/components/organisms/searchTable/components/PaginationInfo.tsx
|
|
7285
|
-
var
|
|
7376
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7286
7377
|
function PaginationInfo({
|
|
7287
7378
|
currentCount,
|
|
7288
7379
|
totalCount,
|
|
7289
7380
|
className = ""
|
|
7290
7381
|
}) {
|
|
7291
|
-
return /* @__PURE__ */ (0,
|
|
7382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(ITText, { as: "span", className: `text-sm text-secondary-700 ${className}`, children: [
|
|
7292
7383
|
"Mostrando ",
|
|
7293
7384
|
currentCount,
|
|
7294
7385
|
" de ",
|
|
@@ -7298,7 +7389,7 @@ function PaginationInfo({
|
|
|
7298
7389
|
}
|
|
7299
7390
|
|
|
7300
7391
|
// src/components/organisms/searchTable/components/PaginationControls.tsx
|
|
7301
|
-
var
|
|
7392
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7302
7393
|
function PaginationControls({
|
|
7303
7394
|
pageIndex,
|
|
7304
7395
|
totalPages,
|
|
@@ -7311,12 +7402,12 @@ function PaginationControls({
|
|
|
7311
7402
|
currentCount,
|
|
7312
7403
|
totalCount
|
|
7313
7404
|
}) {
|
|
7314
|
-
return /* @__PURE__ */ (0,
|
|
7315
|
-
/* @__PURE__ */ (0,
|
|
7316
|
-
/* @__PURE__ */ (0,
|
|
7317
|
-
/* @__PURE__ */ (0,
|
|
7318
|
-
/* @__PURE__ */ (0,
|
|
7319
|
-
/* @__PURE__ */ (0,
|
|
7405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col sm:flex-row justify-between items-center gap-4", children: [
|
|
7406
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
7407
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(PaginationInfo, { currentCount, totalCount }),
|
|
7408
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
7409
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ITText, { as: "span", className: "text-sm text-secondary-700", children: "Mostrar:" }),
|
|
7410
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7320
7411
|
ITSelect,
|
|
7321
7412
|
{
|
|
7322
7413
|
name: "itemsPerPage",
|
|
@@ -7334,8 +7425,8 @@ function PaginationControls({
|
|
|
7334
7425
|
)
|
|
7335
7426
|
] })
|
|
7336
7427
|
] }),
|
|
7337
|
-
/* @__PURE__ */ (0,
|
|
7338
|
-
/* @__PURE__ */ (0,
|
|
7428
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
7429
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7339
7430
|
ITButton,
|
|
7340
7431
|
{
|
|
7341
7432
|
color: "secondary",
|
|
@@ -7345,16 +7436,16 @@ function PaginationControls({
|
|
|
7345
7436
|
className: "min-w-[32px]",
|
|
7346
7437
|
ariaLabel: "P\xE1gina anterior",
|
|
7347
7438
|
title: "Ir a la p\xE1gina anterior",
|
|
7348
|
-
children: /* @__PURE__ */ (0,
|
|
7439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_fa25.FaArrowLeft, { "aria-hidden": "true" })
|
|
7349
7440
|
}
|
|
7350
7441
|
),
|
|
7351
|
-
/* @__PURE__ */ (0,
|
|
7442
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(ITText, { as: "span", className: "px-4 py-2 text-sm text-secondary-700", "aria-live": "polite", children: [
|
|
7352
7443
|
"P\xE1gina ",
|
|
7353
7444
|
pageIndex,
|
|
7354
7445
|
" de ",
|
|
7355
7446
|
totalPages
|
|
7356
7447
|
] }),
|
|
7357
|
-
/* @__PURE__ */ (0,
|
|
7448
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7358
7449
|
ITButton,
|
|
7359
7450
|
{
|
|
7360
7451
|
size: "sm",
|
|
@@ -7364,7 +7455,7 @@ function PaginationControls({
|
|
|
7364
7455
|
className: "min-w-[32px]",
|
|
7365
7456
|
ariaLabel: "P\xE1gina siguiente",
|
|
7366
7457
|
title: "Ir a la p\xE1gina siguiente",
|
|
7367
|
-
children: /* @__PURE__ */ (0,
|
|
7458
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_fa25.FaArrowRight, { "aria-hidden": "true" })
|
|
7368
7459
|
}
|
|
7369
7460
|
)
|
|
7370
7461
|
] })
|
|
@@ -7372,7 +7463,7 @@ function PaginationControls({
|
|
|
7372
7463
|
}
|
|
7373
7464
|
|
|
7374
7465
|
// src/components/organisms/searchTable/searchTable.tsx
|
|
7375
|
-
var
|
|
7466
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7376
7467
|
function ITSearchTable({
|
|
7377
7468
|
columns,
|
|
7378
7469
|
data,
|
|
@@ -7437,11 +7528,11 @@ function ITSearchTable({
|
|
|
7437
7528
|
handleClearSearch();
|
|
7438
7529
|
onClearSearch?.();
|
|
7439
7530
|
};
|
|
7440
|
-
return /* @__PURE__ */ (0,
|
|
7441
|
-
/* @__PURE__ */ (0,
|
|
7442
|
-
title && /* @__PURE__ */ (0,
|
|
7443
|
-
/* @__PURE__ */ (0,
|
|
7444
|
-
/* @__PURE__ */ (0,
|
|
7531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: (0, import_clsx38.default)("space-y-4 w-full", containerClassName), children: [
|
|
7532
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "shadow-md sm:rounded-lg overflow-hidden", children: [
|
|
7533
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "bg-teal-500 text-white px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ITText, { as: "h2", className: "text-xl font-bold text-center whitespace-nowrap", children: title }) }),
|
|
7534
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "bg-white", children: [
|
|
7535
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "p-4 border-b border-secondary-200", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7445
7536
|
SearchAndSortBar,
|
|
7446
7537
|
{
|
|
7447
7538
|
searchTerm,
|
|
@@ -7452,7 +7543,7 @@ function ITSearchTable({
|
|
|
7452
7543
|
searchInputPlaceholder
|
|
7453
7544
|
}
|
|
7454
7545
|
) }),
|
|
7455
|
-
/* @__PURE__ */ (0,
|
|
7546
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
7456
7547
|
"table",
|
|
7457
7548
|
{
|
|
7458
7549
|
className: (0, import_clsx38.default)(
|
|
@@ -7461,7 +7552,7 @@ function ITSearchTable({
|
|
|
7461
7552
|
sizeStyles[size]
|
|
7462
7553
|
),
|
|
7463
7554
|
children: [
|
|
7464
|
-
/* @__PURE__ */ (0,
|
|
7555
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7465
7556
|
TableHeader,
|
|
7466
7557
|
{
|
|
7467
7558
|
columns,
|
|
@@ -7469,7 +7560,7 @@ function ITSearchTable({
|
|
|
7469
7560
|
sortConfig
|
|
7470
7561
|
}
|
|
7471
7562
|
),
|
|
7472
|
-
/* @__PURE__ */ (0,
|
|
7563
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tbody", { children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7473
7564
|
TableRow,
|
|
7474
7565
|
{
|
|
7475
7566
|
row,
|
|
@@ -7483,7 +7574,7 @@ function ITSearchTable({
|
|
|
7483
7574
|
onCancel: handleCancelEdit
|
|
7484
7575
|
},
|
|
7485
7576
|
rowIndex
|
|
7486
|
-
)) : /* @__PURE__ */ (0,
|
|
7577
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7487
7578
|
TableEmptyState,
|
|
7488
7579
|
{
|
|
7489
7580
|
colSpan: columns.length + 1,
|
|
@@ -7495,7 +7586,7 @@ function ITSearchTable({
|
|
|
7495
7586
|
) })
|
|
7496
7587
|
] })
|
|
7497
7588
|
] }),
|
|
7498
|
-
/* @__PURE__ */ (0,
|
|
7589
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7499
7590
|
PaginationControls,
|
|
7500
7591
|
{
|
|
7501
7592
|
pageIndex,
|
|
@@ -7515,7 +7606,7 @@ function ITSearchTable({
|
|
|
7515
7606
|
|
|
7516
7607
|
// src/components/atoms/segmented-control/segmented-control.tsx
|
|
7517
7608
|
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
7518
|
-
var
|
|
7609
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7519
7610
|
var sizeMap3 = {
|
|
7520
7611
|
sm: { button: "px-2.5 py-1.5 text-[11px]", container: "p-0.5" },
|
|
7521
7612
|
md: { button: "px-3 py-2 text-xs", container: "p-1" }
|
|
@@ -7529,7 +7620,7 @@ function ITSegmentedControl({
|
|
|
7529
7620
|
disabled = false
|
|
7530
7621
|
}) {
|
|
7531
7622
|
const { button, container } = sizeMap3[size];
|
|
7532
|
-
return /* @__PURE__ */ (0,
|
|
7623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7533
7624
|
"div",
|
|
7534
7625
|
{
|
|
7535
7626
|
className: (0, import_clsx39.default)(
|
|
@@ -7540,7 +7631,7 @@ function ITSegmentedControl({
|
|
|
7540
7631
|
),
|
|
7541
7632
|
children: options.map((opt) => {
|
|
7542
7633
|
const isActive = opt.value === value;
|
|
7543
|
-
return /* @__PURE__ */ (0,
|
|
7634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
7544
7635
|
"button",
|
|
7545
7636
|
{
|
|
7546
7637
|
onClick: () => !disabled && onChange(opt.value),
|
|
@@ -7552,8 +7643,8 @@ function ITSegmentedControl({
|
|
|
7552
7643
|
disabled && "pointer-events-none"
|
|
7553
7644
|
),
|
|
7554
7645
|
children: [
|
|
7555
|
-
opt.icon && /* @__PURE__ */ (0,
|
|
7556
|
-
/* @__PURE__ */ (0,
|
|
7646
|
+
opt.icon && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: opt.icon }),
|
|
7647
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ITText, { as: "span", children: opt.label })
|
|
7557
7648
|
]
|
|
7558
7649
|
},
|
|
7559
7650
|
opt.value
|
|
@@ -7566,7 +7657,15 @@ function ITSegmentedControl({
|
|
|
7566
7657
|
// src/components/organisms/sidebar/sidebar.tsx
|
|
7567
7658
|
var import_react35 = require("react");
|
|
7568
7659
|
var import_fa26 = require("react-icons/fa");
|
|
7569
|
-
var
|
|
7660
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7661
|
+
function isSubItemGroup(entry) {
|
|
7662
|
+
return "items" in entry;
|
|
7663
|
+
}
|
|
7664
|
+
function flattenSubItems(entries) {
|
|
7665
|
+
return entries.flatMap(
|
|
7666
|
+
(entry) => isSubItemGroup(entry) ? entry.items : [entry]
|
|
7667
|
+
);
|
|
7668
|
+
}
|
|
7570
7669
|
function ITSidebar({
|
|
7571
7670
|
navigationItems = [],
|
|
7572
7671
|
isCollapsed = false,
|
|
@@ -7612,7 +7711,7 @@ function ITSidebar({
|
|
|
7612
7711
|
(0, import_react35.useEffect)(() => {
|
|
7613
7712
|
const activeParents = /* @__PURE__ */ new Set();
|
|
7614
7713
|
navigationItems.forEach((item) => {
|
|
7615
|
-
if (item.subitems && item.subitems.some((sub) => sub.isActive)) {
|
|
7714
|
+
if (item.subitems && flattenSubItems(item.subitems).some((sub) => sub.isActive)) {
|
|
7616
7715
|
activeParents.add(item.id);
|
|
7617
7716
|
}
|
|
7618
7717
|
});
|
|
@@ -7646,7 +7745,81 @@ function ITSidebar({
|
|
|
7646
7745
|
};
|
|
7647
7746
|
const isSidebarCollapsed = visibleOnMobile ? false : !isHovering && isCollapsed;
|
|
7648
7747
|
const sidebarWidth = isSidebarCollapsed ? "w-[88px]" : "w-[280px]";
|
|
7649
|
-
|
|
7748
|
+
const renderSubItem = (subitem) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7749
|
+
"button",
|
|
7750
|
+
{
|
|
7751
|
+
"aria-current": subitem.isActive ? "page" : void 0,
|
|
7752
|
+
onClick: () => {
|
|
7753
|
+
if (subitem.action) subitem.action();
|
|
7754
|
+
if (onSubItemClick) onSubItemClick(subitem);
|
|
7755
|
+
},
|
|
7756
|
+
className: `flex items-center gap-2 w-full text-left px-3 py-1.5 rounded-xl transition-all duration-300`,
|
|
7757
|
+
style: {
|
|
7758
|
+
color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))",
|
|
7759
|
+
backgroundColor: subitem.isActive ? "var(--it-sidebar-active-bg, var(--color-secondary-50))" : "transparent",
|
|
7760
|
+
fontSize: "0.78rem",
|
|
7761
|
+
fontWeight: subitem.isActive ? 600 : 500,
|
|
7762
|
+
letterSpacing: "0.01em",
|
|
7763
|
+
marginLeft: subitemConnector === "|" ? "-1px" : "0"
|
|
7764
|
+
},
|
|
7765
|
+
onMouseEnter: (e) => {
|
|
7766
|
+
if (!subitem.isActive) {
|
|
7767
|
+
e.currentTarget.style.backgroundColor = "var(--it-sidebar-hover-bg, var(--color-secondary-100))";
|
|
7768
|
+
e.currentTarget.style.transform = "translateX(3px)";
|
|
7769
|
+
}
|
|
7770
|
+
},
|
|
7771
|
+
onMouseLeave: (e) => {
|
|
7772
|
+
if (!subitem.isActive) {
|
|
7773
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
7774
|
+
e.currentTarget.style.transform = "translateX(0)";
|
|
7775
|
+
}
|
|
7776
|
+
},
|
|
7777
|
+
children: [
|
|
7778
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7779
|
+
"div",
|
|
7780
|
+
{
|
|
7781
|
+
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full transition-all",
|
|
7782
|
+
style: {
|
|
7783
|
+
backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))",
|
|
7784
|
+
boxShadow: "0 0 6px color-mix(in srgb, var(--it-sidebar-active-icon, var(--color-primary-500)) 25%, transparent)"
|
|
7785
|
+
}
|
|
7786
|
+
}
|
|
7787
|
+
),
|
|
7788
|
+
subitemConnector === "dot" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7789
|
+
"span",
|
|
7790
|
+
{
|
|
7791
|
+
className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 ${subitem.isActive ? "scale-125" : ""}`,
|
|
7792
|
+
style: {
|
|
7793
|
+
backgroundColor: subitem.isActive ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, var(--color-secondary-400))"
|
|
7794
|
+
}
|
|
7795
|
+
}
|
|
7796
|
+
),
|
|
7797
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ITText, { as: "span", className: "truncate", children: subitem.label })
|
|
7798
|
+
]
|
|
7799
|
+
}
|
|
7800
|
+
) }, subitem.id);
|
|
7801
|
+
const renderSubItemGroup = (group, itemId) => {
|
|
7802
|
+
const headingId = `it-sidebar-subgroup-${itemId}-${group.id}`;
|
|
7803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("li", { className: "relative", children: [
|
|
7804
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { id: headingId, className: "px-3 pt-2.5 pb-1 mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7805
|
+
ITText,
|
|
7806
|
+
{
|
|
7807
|
+
as: "span",
|
|
7808
|
+
className: "block",
|
|
7809
|
+
style: {
|
|
7810
|
+
color: "var(--it-sidebar-icon-color, var(--color-secondary-400))",
|
|
7811
|
+
fontSize: "0.68rem",
|
|
7812
|
+
fontWeight: 700,
|
|
7813
|
+
letterSpacing: "0.08em",
|
|
7814
|
+
textTransform: "uppercase"
|
|
7815
|
+
},
|
|
7816
|
+
children: group.label
|
|
7817
|
+
}
|
|
7818
|
+
) }),
|
|
7819
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { "aria-labelledby": headingId, className: "flex flex-col gap-0", children: group.items.map(renderSubItem) })
|
|
7820
|
+
] }, group.id);
|
|
7821
|
+
};
|
|
7822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7650
7823
|
"aside",
|
|
7651
7824
|
{
|
|
7652
7825
|
ref: sidebarRef,
|
|
@@ -7666,12 +7839,12 @@ function ITSidebar({
|
|
|
7666
7839
|
backdropFilter: "blur(12px)"
|
|
7667
7840
|
},
|
|
7668
7841
|
children: [
|
|
7669
|
-
header && !isSidebarCollapsed && /* @__PURE__ */ (0,
|
|
7670
|
-
/* @__PURE__ */ (0,
|
|
7842
|
+
header && !isSidebarCollapsed && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "px-4 pt-4 pb-1 flex-shrink-0", children: header }),
|
|
7843
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("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__ */ (0, import_jsx_runtime57.jsx)("ul", { className: "space-y-1", children: navigationItems.map((item) => {
|
|
7671
7844
|
const hasSubmenu = !!item.subitems && item.subitems.length > 0;
|
|
7672
7845
|
const submenuId = `it-sidebar-submenu-${item.id}`;
|
|
7673
|
-
return /* @__PURE__ */ (0,
|
|
7674
|
-
/* @__PURE__ */ (0,
|
|
7846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("li", { className: "relative group/navitem", children: [
|
|
7847
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7675
7848
|
"div",
|
|
7676
7849
|
{
|
|
7677
7850
|
role: "button",
|
|
@@ -7703,15 +7876,15 @@ function ITSidebar({
|
|
|
7703
7876
|
}
|
|
7704
7877
|
},
|
|
7705
7878
|
children: [
|
|
7706
|
-
item.isActive && !isSidebarCollapsed && /* @__PURE__ */ (0,
|
|
7879
|
+
item.isActive && !isSidebarCollapsed && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7707
7880
|
"div",
|
|
7708
7881
|
{
|
|
7709
7882
|
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
7710
7883
|
style: { backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))", boxShadow: "0 0 10px var(--it-sidebar-active-icon, var(--color-primary-500))" }
|
|
7711
7884
|
}
|
|
7712
7885
|
),
|
|
7713
|
-
/* @__PURE__ */ (0,
|
|
7714
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7886
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `flex items-center ${!isSidebarCollapsed ? "gap-2.5" : "justify-center"} relative z-10 w-full`, children: [
|
|
7887
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7715
7888
|
"div",
|
|
7716
7889
|
{
|
|
7717
7890
|
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
@@ -7724,7 +7897,7 @@ function ITSidebar({
|
|
|
7724
7897
|
children: item.icon
|
|
7725
7898
|
}
|
|
7726
7899
|
),
|
|
7727
|
-
!isSidebarCollapsed && /* @__PURE__ */ (0,
|
|
7900
|
+
!isSidebarCollapsed && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7728
7901
|
ITText,
|
|
7729
7902
|
{
|
|
7730
7903
|
as: "span",
|
|
@@ -7738,15 +7911,15 @@ function ITSidebar({
|
|
|
7738
7911
|
}
|
|
7739
7912
|
)
|
|
7740
7913
|
] }),
|
|
7741
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ (0,
|
|
7914
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7742
7915
|
"div",
|
|
7743
7916
|
{
|
|
7744
7917
|
className: `flex-shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "rotate-180" : ""}`,
|
|
7745
7918
|
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 },
|
|
7746
|
-
children: /* @__PURE__ */ (0,
|
|
7919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_fa26.FaChevronDown, { className: "w-3 h-3" })
|
|
7747
7920
|
}
|
|
7748
7921
|
),
|
|
7749
|
-
item.badge && /* @__PURE__ */ (0,
|
|
7922
|
+
item.badge && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7750
7923
|
"span",
|
|
7751
7924
|
{
|
|
7752
7925
|
className: `
|
|
@@ -7764,7 +7937,7 @@ function ITSidebar({
|
|
|
7764
7937
|
]
|
|
7765
7938
|
}
|
|
7766
7939
|
),
|
|
7767
|
-
isSidebarCollapsed && /* @__PURE__ */ (0,
|
|
7940
|
+
isSidebarCollapsed && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7768
7941
|
"div",
|
|
7769
7942
|
{
|
|
7770
7943
|
className: "absolute left-full top-0 ml-4 rounded-2xl opacity-0 invisible group-hover/navitem:opacity-100 group-hover/navitem:visible transition-all duration-300 pointer-events-none z-[70] min-w-[220px] overflow-hidden -translate-x-2 group-hover/navitem:translate-x-0 shadow-[0_10px_40px_-10px_rgba(0,0,0,0.15)]",
|
|
@@ -7775,16 +7948,16 @@ function ITSidebar({
|
|
|
7775
7948
|
backdropFilter: "blur(16px)"
|
|
7776
7949
|
},
|
|
7777
7950
|
children: [
|
|
7778
|
-
/* @__PURE__ */ (0,
|
|
7779
|
-
item.icon && /* @__PURE__ */ (0,
|
|
7780
|
-
/* @__PURE__ */ (0,
|
|
7951
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("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: [
|
|
7952
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { style: { color: "var(--it-sidebar-active-icon, var(--color-primary-500))" }, className: "text-xl drop-shadow-sm", children: item.icon }),
|
|
7953
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ITText, { as: "span", className: "tracking-wide text-[15px]", children: item.label })
|
|
7781
7954
|
] }),
|
|
7782
|
-
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ (0,
|
|
7955
|
+
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "py-2", children: flattenSubItems(item.subitems).map((subitem) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7783
7956
|
"div",
|
|
7784
7957
|
{
|
|
7785
7958
|
className: `px-5 py-2.5 text-sm flex items-center gap-3 transition-colors relative`,
|
|
7786
7959
|
children: [
|
|
7787
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ (0,
|
|
7960
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7788
7961
|
"div",
|
|
7789
7962
|
{
|
|
7790
7963
|
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full",
|
|
@@ -7794,75 +7967,25 @@ function ITSidebar({
|
|
|
7794
7967
|
}
|
|
7795
7968
|
}
|
|
7796
7969
|
),
|
|
7797
|
-
/* @__PURE__ */ (0,
|
|
7798
|
-
/* @__PURE__ */ (0,
|
|
7970
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("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))" } }),
|
|
7971
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(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 })
|
|
7799
7972
|
]
|
|
7800
7973
|
},
|
|
7801
7974
|
subitem.id
|
|
7802
|
-
)) }) : /* @__PURE__ */ (0,
|
|
7975
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(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" })
|
|
7803
7976
|
]
|
|
7804
7977
|
}
|
|
7805
7978
|
),
|
|
7806
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ (0,
|
|
7979
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("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__ */ (0, import_jsx_runtime57.jsx)(
|
|
7807
7980
|
"ul",
|
|
7808
7981
|
{
|
|
7809
7982
|
className: "ml-4 flex flex-col gap-0 py-0.5",
|
|
7810
7983
|
style: {
|
|
7811
7984
|
borderLeft: subitemConnector === "|" ? "1px solid var(--it-sidebar-border, var(--color-secondary-200))" : "none"
|
|
7812
7985
|
},
|
|
7813
|
-
children: item.subitems.map(
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
"aria-current": subitem.isActive ? "page" : void 0,
|
|
7817
|
-
onClick: () => {
|
|
7818
|
-
if (subitem.action) subitem.action();
|
|
7819
|
-
if (onSubItemClick) onSubItemClick(subitem);
|
|
7820
|
-
},
|
|
7821
|
-
className: `flex items-center gap-2 w-full text-left px-3 py-1.5 rounded-xl transition-all duration-300`,
|
|
7822
|
-
style: {
|
|
7823
|
-
color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))",
|
|
7824
|
-
backgroundColor: subitem.isActive ? "var(--it-sidebar-active-bg, var(--color-secondary-50))" : "transparent",
|
|
7825
|
-
fontSize: "0.78rem",
|
|
7826
|
-
fontWeight: subitem.isActive ? 600 : 500,
|
|
7827
|
-
letterSpacing: "0.01em",
|
|
7828
|
-
marginLeft: subitemConnector === "|" ? "-1px" : "0"
|
|
7829
|
-
},
|
|
7830
|
-
onMouseEnter: (e) => {
|
|
7831
|
-
if (!subitem.isActive) {
|
|
7832
|
-
e.currentTarget.style.backgroundColor = "var(--it-sidebar-hover-bg, var(--color-secondary-100))";
|
|
7833
|
-
e.currentTarget.style.transform = "translateX(3px)";
|
|
7834
|
-
}
|
|
7835
|
-
},
|
|
7836
|
-
onMouseLeave: (e) => {
|
|
7837
|
-
if (!subitem.isActive) {
|
|
7838
|
-
e.currentTarget.style.backgroundColor = "transparent";
|
|
7839
|
-
e.currentTarget.style.transform = "translateX(0)";
|
|
7840
|
-
}
|
|
7841
|
-
},
|
|
7842
|
-
children: [
|
|
7843
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7844
|
-
"div",
|
|
7845
|
-
{
|
|
7846
|
-
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full transition-all",
|
|
7847
|
-
style: {
|
|
7848
|
-
backgroundColor: "var(--it-sidebar-active-icon, var(--color-primary-500))",
|
|
7849
|
-
boxShadow: "0 0 6px color-mix(in srgb, var(--it-sidebar-active-icon, var(--color-primary-500)) 25%, transparent)"
|
|
7850
|
-
}
|
|
7851
|
-
}
|
|
7852
|
-
),
|
|
7853
|
-
subitemConnector === "dot" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7854
|
-
"span",
|
|
7855
|
-
{
|
|
7856
|
-
className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 ${subitem.isActive ? "scale-125" : ""}`,
|
|
7857
|
-
style: {
|
|
7858
|
-
backgroundColor: subitem.isActive ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, var(--color-secondary-400))"
|
|
7859
|
-
}
|
|
7860
|
-
}
|
|
7861
|
-
),
|
|
7862
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ITText, { as: "span", className: "truncate", children: subitem.label })
|
|
7863
|
-
]
|
|
7864
|
-
}
|
|
7865
|
-
) }, subitem.id))
|
|
7986
|
+
children: item.subitems.map(
|
|
7987
|
+
(entry) => isSubItemGroup(entry) ? renderSubItemGroup(entry, item.id) : renderSubItem(entry)
|
|
7988
|
+
)
|
|
7866
7989
|
}
|
|
7867
7990
|
) })
|
|
7868
7991
|
] }, item.id);
|
|
@@ -7875,7 +7998,7 @@ function ITSidebar({
|
|
|
7875
7998
|
// src/components/atoms/slide/slide.tsx
|
|
7876
7999
|
var import_react36 = require("react");
|
|
7877
8000
|
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
7878
|
-
var
|
|
8001
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7879
8002
|
function ITSlideToggle({
|
|
7880
8003
|
onToggle,
|
|
7881
8004
|
isOn: controlledIsOn,
|
|
@@ -7928,7 +8051,7 @@ function ITSlideToggle({
|
|
|
7928
8051
|
}
|
|
7929
8052
|
};
|
|
7930
8053
|
const { container, knob, translate } = sizeClasses2[size];
|
|
7931
|
-
return /* @__PURE__ */ (0,
|
|
8054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7932
8055
|
"div",
|
|
7933
8056
|
{
|
|
7934
8057
|
onClick: toggleSwitch,
|
|
@@ -7948,7 +8071,7 @@ function ITSlideToggle({
|
|
|
7948
8071
|
toggleSwitch();
|
|
7949
8072
|
}
|
|
7950
8073
|
},
|
|
7951
|
-
children: /* @__PURE__ */ (0,
|
|
8074
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7952
8075
|
"div",
|
|
7953
8076
|
{
|
|
7954
8077
|
className: (0, import_clsx40.default)(
|
|
@@ -7964,7 +8087,7 @@ function ITSlideToggle({
|
|
|
7964
8087
|
|
|
7965
8088
|
// src/components/atoms/slider/slider.tsx
|
|
7966
8089
|
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
7967
|
-
var
|
|
8090
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7968
8091
|
function ITSlider({
|
|
7969
8092
|
value,
|
|
7970
8093
|
onChange,
|
|
@@ -7975,13 +8098,13 @@ function ITSlider({
|
|
|
7975
8098
|
disabled = false,
|
|
7976
8099
|
className
|
|
7977
8100
|
}) {
|
|
7978
|
-
return /* @__PURE__ */ (0,
|
|
7979
|
-
label && /* @__PURE__ */ (0,
|
|
8101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: (0, import_clsx41.default)("flex flex-col gap-1.5", className), children: [
|
|
8102
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(ITText, { as: "label", className: "text-xs font-semibold text-secondary-600 dark:text-secondary-400", children: [
|
|
7980
8103
|
label,
|
|
7981
8104
|
": ",
|
|
7982
8105
|
value
|
|
7983
8106
|
] }),
|
|
7984
|
-
/* @__PURE__ */ (0,
|
|
8107
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "relative w-full h-5 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7985
8108
|
"input",
|
|
7986
8109
|
{
|
|
7987
8110
|
type: "range",
|
|
@@ -8012,7 +8135,7 @@ function ITSlider({
|
|
|
8012
8135
|
|
|
8013
8136
|
// src/components/molecules/stat-card/stat-card.tsx
|
|
8014
8137
|
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
8015
|
-
var
|
|
8138
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
8016
8139
|
var trendColors = {
|
|
8017
8140
|
up: "text-emerald-600 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/30",
|
|
8018
8141
|
down: "text-rose-600 bg-rose-50 dark:text-rose-400 dark:bg-rose-950/30",
|
|
@@ -8029,7 +8152,7 @@ function ITStatCard({
|
|
|
8029
8152
|
style,
|
|
8030
8153
|
onClick
|
|
8031
8154
|
}) {
|
|
8032
|
-
return /* @__PURE__ */ (0,
|
|
8155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
8033
8156
|
"div",
|
|
8034
8157
|
{
|
|
8035
8158
|
className: (0, import_clsx42.default)("rounded-xl p-4 border border-slate-100 dark:border-slate-800", color, className),
|
|
@@ -8038,13 +8161,13 @@ function ITStatCard({
|
|
|
8038
8161
|
role: onClick ? "button" : void 0,
|
|
8039
8162
|
tabIndex: onClick ? 0 : void 0,
|
|
8040
8163
|
children: [
|
|
8041
|
-
/* @__PURE__ */ (0,
|
|
8042
|
-
/* @__PURE__ */ (0,
|
|
8043
|
-
icon && /* @__PURE__ */ (0,
|
|
8164
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-start justify-between mb-1", children: [
|
|
8165
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ITText, { as: "span", className: "text-xs font-medium text-slate-400 dark:text-slate-500", children: label }),
|
|
8166
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-slate-400", children: icon })
|
|
8044
8167
|
] }),
|
|
8045
|
-
/* @__PURE__ */ (0,
|
|
8046
|
-
/* @__PURE__ */ (0,
|
|
8047
|
-
trend && /* @__PURE__ */ (0,
|
|
8168
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-baseline gap-2", children: [
|
|
8169
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ITText, { as: "span", className: "text-2xl font-bold text-slate-800 dark:text-white", children: value }),
|
|
8170
|
+
trend && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ITText, { as: "span", className: (0, import_clsx42.default)("text-[11px] font-semibold px-1.5 py-0.5 rounded-md", trendColors[trendDirection]), children: trend })
|
|
8048
8171
|
] })
|
|
8049
8172
|
]
|
|
8050
8173
|
}
|
|
@@ -8057,7 +8180,7 @@ var import_react37 = __toESM(require("react"), 1);
|
|
|
8057
8180
|
var import_fa27 = require("react-icons/fa");
|
|
8058
8181
|
var import_md2 = require("react-icons/md");
|
|
8059
8182
|
var import_date_fns3 = require("date-fns");
|
|
8060
|
-
var
|
|
8183
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
8061
8184
|
function ITTable({
|
|
8062
8185
|
columns,
|
|
8063
8186
|
data = [],
|
|
@@ -8188,6 +8311,7 @@ function ITTable({
|
|
|
8188
8311
|
const isStickyHeader = stickyHeader && isTableVirtual;
|
|
8189
8312
|
const resolvedRowHeight = rowHeight ?? getRowHeight(size, density);
|
|
8190
8313
|
const columnCount = columns.length;
|
|
8314
|
+
const pinnedMeta = import_react37.default.useMemo(() => getPinnedColumnMeta(columns), [columns]);
|
|
8191
8315
|
const {
|
|
8192
8316
|
scrollRef,
|
|
8193
8317
|
startIndex,
|
|
@@ -8212,14 +8336,14 @@ function ITTable({
|
|
|
8212
8336
|
if (currentValue === true) return "Filtrar solo verdaderos";
|
|
8213
8337
|
return "Filtrar solo falsos";
|
|
8214
8338
|
};
|
|
8215
|
-
return /* @__PURE__ */ (0,
|
|
8339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8216
8340
|
"button",
|
|
8217
8341
|
{
|
|
8218
8342
|
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",
|
|
8219
8343
|
onClick: () => handleFilterChange(col.key, nextValue),
|
|
8220
8344
|
"aria-label": `${getToggleLabel()} para ${col.label}`,
|
|
8221
8345
|
title: `${getToggleLabel()} para ${col.label}`,
|
|
8222
|
-
children: /* @__PURE__ */ (0,
|
|
8346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "relative w-10 h-5 bg-secondary-300 rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8223
8347
|
"div",
|
|
8224
8348
|
{
|
|
8225
8349
|
className: (0, import_clsx43.default)(
|
|
@@ -8237,7 +8361,7 @@ function ITTable({
|
|
|
8237
8361
|
}
|
|
8238
8362
|
if (col.filter === "catalog" && col.catalogOptions) {
|
|
8239
8363
|
if (col.catalogOptions.loading) {
|
|
8240
|
-
return /* @__PURE__ */ (0,
|
|
8364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8241
8365
|
import_fa27.FaSpinner,
|
|
8242
8366
|
{
|
|
8243
8367
|
className: "animate-spin",
|
|
@@ -8247,9 +8371,9 @@ function ITTable({
|
|
|
8247
8371
|
);
|
|
8248
8372
|
}
|
|
8249
8373
|
if (col.catalogOptions.error) {
|
|
8250
|
-
return /* @__PURE__ */ (0,
|
|
8374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8251
8375
|
}
|
|
8252
|
-
return /* @__PURE__ */ (0,
|
|
8376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8253
8377
|
ITSelect,
|
|
8254
8378
|
{
|
|
8255
8379
|
name: `filter-${col.key}`,
|
|
@@ -8273,7 +8397,7 @@ function ITTable({
|
|
|
8273
8397
|
}
|
|
8274
8398
|
if (col.filter === "search" && col.catalogOptions) {
|
|
8275
8399
|
if (col.catalogOptions.loading) {
|
|
8276
|
-
return /* @__PURE__ */ (0,
|
|
8400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8277
8401
|
import_fa27.FaSpinner,
|
|
8278
8402
|
{
|
|
8279
8403
|
className: "animate-spin",
|
|
@@ -8283,10 +8407,10 @@ function ITTable({
|
|
|
8283
8407
|
);
|
|
8284
8408
|
}
|
|
8285
8409
|
if (col.catalogOptions.error) {
|
|
8286
|
-
return /* @__PURE__ */ (0,
|
|
8410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8287
8411
|
}
|
|
8288
8412
|
const searchValue = filters[col.key];
|
|
8289
|
-
return /* @__PURE__ */ (0,
|
|
8413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8290
8414
|
ITSearchSelect,
|
|
8291
8415
|
{
|
|
8292
8416
|
name: `filter-${col.key}`,
|
|
@@ -8309,7 +8433,7 @@ function ITTable({
|
|
|
8309
8433
|
}
|
|
8310
8434
|
if (col.filter === "date") {
|
|
8311
8435
|
const dateValue = filters[col.key];
|
|
8312
|
-
return /* @__PURE__ */ (0,
|
|
8436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8313
8437
|
ITDatePicker,
|
|
8314
8438
|
{
|
|
8315
8439
|
name: `filter-${col.key}`,
|
|
@@ -8325,7 +8449,7 @@ function ITTable({
|
|
|
8325
8449
|
}
|
|
8326
8450
|
if (col.filter === "date-range") {
|
|
8327
8451
|
const rangeValue = filters[col.key];
|
|
8328
|
-
return /* @__PURE__ */ (0,
|
|
8452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8329
8453
|
ITDatePicker,
|
|
8330
8454
|
{
|
|
8331
8455
|
name: `filter-${col.key}`,
|
|
@@ -8340,7 +8464,7 @@ function ITTable({
|
|
|
8340
8464
|
}
|
|
8341
8465
|
);
|
|
8342
8466
|
}
|
|
8343
|
-
return /* @__PURE__ */ (0,
|
|
8467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8344
8468
|
ITInput,
|
|
8345
8469
|
{
|
|
8346
8470
|
name: `filter-${col.key}`,
|
|
@@ -8362,14 +8486,14 @@ function ITTable({
|
|
|
8362
8486
|
case "number":
|
|
8363
8487
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
8364
8488
|
case "boolean":
|
|
8365
|
-
return value ? /* @__PURE__ */ (0,
|
|
8489
|
+
return value ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8366
8490
|
import_fa27.FaCheck,
|
|
8367
8491
|
{
|
|
8368
8492
|
className: "text-success-500",
|
|
8369
8493
|
"aria-label": "Verdadero",
|
|
8370
8494
|
title: "Verdadero"
|
|
8371
8495
|
}
|
|
8372
|
-
) : /* @__PURE__ */ (0,
|
|
8496
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8373
8497
|
import_fa27.FaTimes,
|
|
8374
8498
|
{
|
|
8375
8499
|
className: "text-danger-500",
|
|
@@ -8394,12 +8518,12 @@ function ITTable({
|
|
|
8394
8518
|
const renderDefaultCard = (row) => {
|
|
8395
8519
|
const dataCols = columns.filter((c) => c.type !== "actions");
|
|
8396
8520
|
const actionCol = columns.find((c) => c.type === "actions");
|
|
8397
|
-
return /* @__PURE__ */ (0,
|
|
8398
|
-
dataCols.map((col) => /* @__PURE__ */ (0,
|
|
8399
|
-
/* @__PURE__ */ (0,
|
|
8400
|
-
/* @__PURE__ */ (0,
|
|
8521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 p-3 space-y-2 shadow-sm", children: [
|
|
8522
|
+
dataCols.map((col) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8523
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 whitespace-nowrap flex-shrink-0 min-w-[70px]", children: col.label }),
|
|
8524
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
|
|
8401
8525
|
] }, col.key)),
|
|
8402
|
-
actionCol?.actions && /* @__PURE__ */ (0,
|
|
8526
|
+
actionCol?.actions && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex items-center justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-700", children: actionCol.actions(row) })
|
|
8403
8527
|
] });
|
|
8404
8528
|
};
|
|
8405
8529
|
const handleRowClick = (row) => (event) => {
|
|
@@ -8413,61 +8537,61 @@ function ITTable({
|
|
|
8413
8537
|
event.preventDefault();
|
|
8414
8538
|
onRowClick(row, event);
|
|
8415
8539
|
};
|
|
8416
|
-
return /* @__PURE__ */ (0,
|
|
8417
|
-
title && /* @__PURE__ */ (0,
|
|
8418
|
-
/* @__PURE__ */ (0,
|
|
8419
|
-
/* @__PURE__ */ (0,
|
|
8420
|
-
/* @__PURE__ */ (0,
|
|
8540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { ref: rootRef, className: (0, import_clsx43.default)("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: tableContainer, style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8541
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8542
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
|
|
8543
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
|
|
8544
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8421
8545
|
"button",
|
|
8422
8546
|
{
|
|
8423
8547
|
onClick: () => setViewMode("table"),
|
|
8424
8548
|
disabled: forcedCards,
|
|
8425
8549
|
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"}`,
|
|
8426
8550
|
children: [
|
|
8427
|
-
/* @__PURE__ */ (0,
|
|
8551
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_fa27.FaTable, { size: 11 }),
|
|
8428
8552
|
"Table"
|
|
8429
8553
|
]
|
|
8430
8554
|
}
|
|
8431
8555
|
),
|
|
8432
|
-
/* @__PURE__ */ (0,
|
|
8556
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8433
8557
|
"button",
|
|
8434
8558
|
{
|
|
8435
8559
|
onClick: () => setViewMode("cards"),
|
|
8436
8560
|
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"}`,
|
|
8437
8561
|
children: [
|
|
8438
|
-
/* @__PURE__ */ (0,
|
|
8562
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_fa27.FaThLarge, { size: 11 }),
|
|
8439
8563
|
"Cards"
|
|
8440
8564
|
]
|
|
8441
8565
|
}
|
|
8442
8566
|
)
|
|
8443
8567
|
] })
|
|
8444
8568
|
] }),
|
|
8445
|
-
!title && /* @__PURE__ */ (0,
|
|
8446
|
-
/* @__PURE__ */ (0,
|
|
8569
|
+
!title && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex justify-end px-4 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
|
|
8570
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8447
8571
|
"button",
|
|
8448
8572
|
{
|
|
8449
8573
|
onClick: () => setViewMode("table"),
|
|
8450
8574
|
disabled: forcedCards,
|
|
8451
8575
|
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"}`,
|
|
8452
8576
|
children: [
|
|
8453
|
-
/* @__PURE__ */ (0,
|
|
8577
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_fa27.FaTable, { size: 11 }),
|
|
8454
8578
|
"Table"
|
|
8455
8579
|
]
|
|
8456
8580
|
}
|
|
8457
8581
|
),
|
|
8458
|
-
/* @__PURE__ */ (0,
|
|
8582
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8459
8583
|
"button",
|
|
8460
8584
|
{
|
|
8461
8585
|
onClick: () => setViewMode("cards"),
|
|
8462
8586
|
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"}`,
|
|
8463
8587
|
children: [
|
|
8464
|
-
/* @__PURE__ */ (0,
|
|
8588
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_fa27.FaThLarge, { size: 11 }),
|
|
8465
8589
|
"Cards"
|
|
8466
8590
|
]
|
|
8467
8591
|
}
|
|
8468
8592
|
)
|
|
8469
8593
|
] }) }),
|
|
8470
|
-
effectiveView === "cards" ? /* @__PURE__ */ (0,
|
|
8594
|
+
effectiveView === "cards" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: currentData.length > 0 ? currentData.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8471
8595
|
"div",
|
|
8472
8596
|
{
|
|
8473
8597
|
className: (0, import_clsx43.default)(tableCardHover, onRowClick && tableCardClickable),
|
|
@@ -8478,16 +8602,16 @@ function ITTable({
|
|
|
8478
8602
|
children: renderCard ? renderCard(row) : renderDefaultCard(row)
|
|
8479
8603
|
},
|
|
8480
8604
|
i
|
|
8481
|
-
)) : /* @__PURE__ */ (0,
|
|
8482
|
-
/* @__PURE__ */ (0,
|
|
8483
|
-
/* @__PURE__ */ (0,
|
|
8484
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
8605
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: (0, import_clsx43.default)(tableEmptyContent, "py-12"), children: [
|
|
8606
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8607
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8608
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8485
8609
|
"div",
|
|
8486
8610
|
{
|
|
8487
8611
|
ref: isTableVirtual ? scrollRef : void 0,
|
|
8488
8612
|
className: isTableVirtual ? "overflow-x-auto overflow-y-auto" : "overflow-x-auto",
|
|
8489
8613
|
style: isTableVirtual ? { maxHeight: virtualizedMaxHeight } : void 0,
|
|
8490
|
-
children: /* @__PURE__ */ (0,
|
|
8614
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8491
8615
|
"table",
|
|
8492
8616
|
{
|
|
8493
8617
|
className: (0, import_clsx43.default)(
|
|
@@ -8500,56 +8624,64 @@ function ITTable({
|
|
|
8500
8624
|
style: isFixed ? { tableLayout: "fixed" } : void 0,
|
|
8501
8625
|
"aria-rowcount": isTableVirtual ? currentData.length + 1 : void 0,
|
|
8502
8626
|
children: [
|
|
8503
|
-
hasColumnWidths && /* @__PURE__ */ (0,
|
|
8627
|
+
hasColumnWidths && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("colgroup", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8504
8628
|
"col",
|
|
8505
8629
|
{
|
|
8506
8630
|
style: col.width != null ? { width: typeof col.width === "number" ? `${col.width}px` : col.width } : void 0
|
|
8507
8631
|
},
|
|
8508
8632
|
col.key
|
|
8509
8633
|
)) }),
|
|
8510
|
-
/* @__PURE__ */ (0,
|
|
8634
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8511
8635
|
"tr",
|
|
8512
8636
|
{
|
|
8513
8637
|
className: (0, import_clsx43.default)(tableHeaderRow, "dark:text-slate-200"),
|
|
8514
8638
|
"aria-rowindex": isTableVirtual ? 1 : void 0,
|
|
8515
|
-
children: columns.map((col) =>
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
col.
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8639
|
+
children: columns.map((col) => {
|
|
8640
|
+
const pin = pinnedMeta[col.key];
|
|
8641
|
+
const isPinned = pin != null;
|
|
8642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8643
|
+
"th",
|
|
8644
|
+
{
|
|
8645
|
+
scope: "col",
|
|
8646
|
+
className: (0, import_clsx43.default)(
|
|
8647
|
+
tableHeaderCell(col.className, density),
|
|
8648
|
+
col.align && tableAlignClasses[col.align],
|
|
8649
|
+
isPinned && "sticky",
|
|
8650
|
+
isStickyHeader && "sticky top-0 bg-secondary-50",
|
|
8651
|
+
isPinned ? "z-[15]" : isStickyHeader && "z-10",
|
|
8652
|
+
isPinned && (col.pinned === "left" ? "it-table-pinned-left" : "it-table-pinned-right")
|
|
8653
|
+
),
|
|
8654
|
+
style: col.minWidth != null || isStickyHeader || isPinned ? {
|
|
8655
|
+
...col.minWidth != null ? { minWidth: `${col.minWidth}px` } : {},
|
|
8656
|
+
...isStickyHeader || isPinned ? { backgroundColor: "var(--color-table-headerBg, #f8fafc)" } : {},
|
|
8657
|
+
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8658
|
+
} : void 0,
|
|
8659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: isFixed ? "flex flex-col gap-3" : "flex flex-col gap-3 min-w-[150px]", children: [
|
|
8660
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8661
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
|
|
8662
|
+
col.sortable && col.type !== "actions" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8663
|
+
"button",
|
|
8664
|
+
{
|
|
8665
|
+
onClick: () => handleSort(col.key),
|
|
8666
|
+
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"}`,
|
|
8667
|
+
title: `Ordenar por ${col.label}`,
|
|
8668
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_md2.MdOutlineSwapVert, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
8669
|
+
}
|
|
8670
|
+
)
|
|
8671
|
+
] }),
|
|
8672
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
|
|
8673
|
+
] })
|
|
8674
|
+
},
|
|
8675
|
+
col.key
|
|
8676
|
+
);
|
|
8677
|
+
})
|
|
8546
8678
|
}
|
|
8547
8679
|
) }),
|
|
8548
|
-
/* @__PURE__ */ (0,
|
|
8549
|
-
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */ (0,
|
|
8680
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tbody", { className: (0, import_clsx43.default)(tableBody, "dark:divide-slate-700/30"), children: currentData.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
8681
|
+
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { "aria-hidden": "true", style: { height: topSpacerHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) }),
|
|
8550
8682
|
windowData.map((row, windowIndex) => {
|
|
8551
8683
|
const absoluteIndex = isTableVirtual ? startIndex + windowIndex : windowIndex;
|
|
8552
|
-
return /* @__PURE__ */ (0,
|
|
8684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8553
8685
|
"tr",
|
|
8554
8686
|
{
|
|
8555
8687
|
"aria-rowindex": isTableVirtual ? absoluteIndex + 2 : void 0,
|
|
@@ -8564,16 +8696,24 @@ function ITTable({
|
|
|
8564
8696
|
children: columns.map((col) => {
|
|
8565
8697
|
const rawValue = getNestedValue(row, col.key);
|
|
8566
8698
|
const truncateTitle = col.truncate && (typeof rawValue === "string" || typeof rawValue === "number") ? String(rawValue) : void 0;
|
|
8567
|
-
|
|
8699
|
+
const pin = pinnedMeta[col.key];
|
|
8700
|
+
const isPinned = pin != null;
|
|
8701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8568
8702
|
"td",
|
|
8569
8703
|
{
|
|
8570
8704
|
className: (0, import_clsx43.default)(
|
|
8571
8705
|
tableCell(col.className, density),
|
|
8572
|
-
col.align && tableAlignClasses[col.align]
|
|
8706
|
+
col.align && tableAlignClasses[col.align],
|
|
8707
|
+
isPinned && "sticky bg-[var(--color-table-rowBg,white)] group-hover:bg-[var(--color-table-rowHover,var(--color-secondary-50))]",
|
|
8708
|
+
isPinned && (col.pinned === "left" ? "it-table-pinned-left" : "it-table-pinned-right"),
|
|
8709
|
+
isPinned && "z-[1]"
|
|
8573
8710
|
),
|
|
8574
|
-
style: col.minWidth != null
|
|
8711
|
+
style: col.minWidth != null || isPinned ? {
|
|
8712
|
+
...col.minWidth != null ? { minWidth: `${col.minWidth}px` } : {},
|
|
8713
|
+
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8714
|
+
} : void 0,
|
|
8575
8715
|
title: truncateTitle,
|
|
8576
|
-
children: col.type === "actions" ? /* @__PURE__ */ (0,
|
|
8716
|
+
children: col.type === "actions" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: tableActionsCell, children: renderCellContent(col, row) }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_clsx43.default)(tableCellText, col.truncate && "truncate"), children: renderCellContent(col, row) })
|
|
8577
8717
|
},
|
|
8578
8718
|
`${absoluteIndex}-${col.key}`
|
|
8579
8719
|
);
|
|
@@ -8582,17 +8722,17 @@ function ITTable({
|
|
|
8582
8722
|
absoluteIndex
|
|
8583
8723
|
);
|
|
8584
8724
|
}),
|
|
8585
|
-
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */ (0,
|
|
8586
|
-
] }) : /* @__PURE__ */ (0,
|
|
8587
|
-
/* @__PURE__ */ (0,
|
|
8588
|
-
/* @__PURE__ */ (0,
|
|
8725
|
+
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { "aria-hidden": "true", style: { height: bottomSpacerHeight }, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) })
|
|
8726
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: tableEmptyContent, children: [
|
|
8727
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8728
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8589
8729
|
] }) }) }) })
|
|
8590
8730
|
]
|
|
8591
8731
|
}
|
|
8592
8732
|
)
|
|
8593
8733
|
}
|
|
8594
8734
|
),
|
|
8595
|
-
/* @__PURE__ */ (0,
|
|
8735
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8596
8736
|
ITPagination,
|
|
8597
8737
|
{
|
|
8598
8738
|
currentPage,
|
|
@@ -8610,7 +8750,7 @@ function ITTable({
|
|
|
8610
8750
|
|
|
8611
8751
|
// src/components/atoms/textarea/textarea.tsx
|
|
8612
8752
|
var import_clsx44 = __toESM(require("clsx"), 1);
|
|
8613
|
-
var
|
|
8753
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8614
8754
|
var resizeMap = {
|
|
8615
8755
|
none: "resize-none",
|
|
8616
8756
|
vertical: "resize-y",
|
|
@@ -8630,9 +8770,9 @@ function ITTextarea({
|
|
|
8630
8770
|
maxLength,
|
|
8631
8771
|
resize = "vertical"
|
|
8632
8772
|
}) {
|
|
8633
|
-
return /* @__PURE__ */ (0,
|
|
8634
|
-
label && /* @__PURE__ */ (0,
|
|
8635
|
-
/* @__PURE__ */ (0,
|
|
8773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: (0, import_clsx44.default)("flex flex-col gap-1.5", className), children: [
|
|
8774
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
8775
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8636
8776
|
"textarea",
|
|
8637
8777
|
{
|
|
8638
8778
|
id: name,
|
|
@@ -8652,14 +8792,14 @@ function ITTextarea({
|
|
|
8652
8792
|
)
|
|
8653
8793
|
}
|
|
8654
8794
|
),
|
|
8655
|
-
error && /* @__PURE__ */ (0,
|
|
8795
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ITText, { as: "span", className: inputError, children: error })
|
|
8656
8796
|
] });
|
|
8657
8797
|
}
|
|
8658
8798
|
|
|
8659
8799
|
// src/components/molecules/tabs/tabs.tsx
|
|
8660
8800
|
var import_react38 = require("react");
|
|
8661
8801
|
var import_clsx45 = require("clsx");
|
|
8662
|
-
var
|
|
8802
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8663
8803
|
var ITTabs = ({
|
|
8664
8804
|
items,
|
|
8665
8805
|
defaultActiveId,
|
|
@@ -8675,14 +8815,14 @@ var ITTabs = ({
|
|
|
8675
8815
|
if (onChange) onChange(id);
|
|
8676
8816
|
};
|
|
8677
8817
|
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
8678
|
-
return /* @__PURE__ */ (0,
|
|
8679
|
-
/* @__PURE__ */ (0,
|
|
8818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: (0, import_clsx45.clsx)("w-full", containerClassName), children: [
|
|
8819
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: (0, import_clsx45.clsx)(
|
|
8680
8820
|
"flex border-secondary-200 mb-4",
|
|
8681
8821
|
variant === "line" ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
|
|
8682
8822
|
className
|
|
8683
8823
|
), children: items.map((item) => {
|
|
8684
8824
|
const isActive = item.id === activeId;
|
|
8685
|
-
return /* @__PURE__ */ (0,
|
|
8825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
8686
8826
|
"button",
|
|
8687
8827
|
{
|
|
8688
8828
|
onClick: () => handleTabClick(item.id, item.disabled),
|
|
@@ -8702,21 +8842,21 @@ var ITTabs = ({
|
|
|
8702
8842
|
item.disabled && "opacity-50 cursor-not-allowed"
|
|
8703
8843
|
),
|
|
8704
8844
|
children: [
|
|
8705
|
-
item.icon && /* @__PURE__ */ (0,
|
|
8706
|
-
/* @__PURE__ */ (0,
|
|
8845
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "w-4 h-4", children: item.icon }),
|
|
8846
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(ITText, { as: "span", children: item.label })
|
|
8707
8847
|
]
|
|
8708
8848
|
},
|
|
8709
8849
|
item.id
|
|
8710
8850
|
);
|
|
8711
8851
|
}) }),
|
|
8712
|
-
/* @__PURE__ */ (0,
|
|
8852
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "tab-content animate-fadeIn", children: activeContent })
|
|
8713
8853
|
] });
|
|
8714
8854
|
};
|
|
8715
8855
|
var tabs_default = ITTabs;
|
|
8716
8856
|
|
|
8717
8857
|
// src/components/organisms/triple-filter/tripleFilter.tsx
|
|
8718
8858
|
var import_clsx46 = __toESM(require("clsx"), 1);
|
|
8719
|
-
var
|
|
8859
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
8720
8860
|
var colorMap2 = {
|
|
8721
8861
|
primary: "text-primary-600",
|
|
8722
8862
|
secondary: "text-secondary-600",
|
|
@@ -8735,11 +8875,11 @@ var ITTripleFilter = ({
|
|
|
8735
8875
|
color = "primary",
|
|
8736
8876
|
className
|
|
8737
8877
|
}) => {
|
|
8738
|
-
return /* @__PURE__ */ (0,
|
|
8878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8739
8879
|
"div",
|
|
8740
8880
|
{
|
|
8741
8881
|
className: (0, import_clsx46.default)("flex bg-slate-100 p-1 rounded-xl gap-1 w-fit", className),
|
|
8742
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
8882
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8743
8883
|
"button",
|
|
8744
8884
|
{
|
|
8745
8885
|
onClick: () => onChange(option.value),
|
|
@@ -8747,7 +8887,7 @@ var ITTripleFilter = ({
|
|
|
8747
8887
|
"px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap",
|
|
8748
8888
|
value === option.value ? (0, import_clsx46.default)("bg-white shadow-sm", colorMap2[color]) : "text-slate-400 hover:text-slate-600"
|
|
8749
8889
|
),
|
|
8750
|
-
children: /* @__PURE__ */ (0,
|
|
8890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ITText, { as: "span", children: option.label })
|
|
8751
8891
|
},
|
|
8752
8892
|
String(option.value)
|
|
8753
8893
|
))
|
|
@@ -8770,7 +8910,7 @@ var positionStyles = {
|
|
|
8770
8910
|
var import_clsx47 = __toESM(require("clsx"), 1);
|
|
8771
8911
|
var import_react39 = require("react");
|
|
8772
8912
|
var import_fa28 = require("react-icons/fa");
|
|
8773
|
-
var
|
|
8913
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
8774
8914
|
function ITToast({
|
|
8775
8915
|
message,
|
|
8776
8916
|
type = "info",
|
|
@@ -8799,18 +8939,18 @@ function ITToast({
|
|
|
8799
8939
|
const TypeIcon = () => {
|
|
8800
8940
|
switch (type) {
|
|
8801
8941
|
case "success":
|
|
8802
|
-
return /* @__PURE__ */ (0,
|
|
8942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_fa28.FaCheckCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
8803
8943
|
case "error":
|
|
8804
8944
|
case "danger":
|
|
8805
|
-
return /* @__PURE__ */ (0,
|
|
8945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_fa28.FaTimesCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
8806
8946
|
case "warning":
|
|
8807
|
-
return /* @__PURE__ */ (0,
|
|
8947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_fa28.FaExclamationTriangle, { className: "w-5 h-5 flex-shrink-0" });
|
|
8808
8948
|
case "info":
|
|
8809
8949
|
default:
|
|
8810
|
-
return /* @__PURE__ */ (0,
|
|
8950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_fa28.FaInfoCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
8811
8951
|
}
|
|
8812
8952
|
};
|
|
8813
|
-
return /* @__PURE__ */ (0,
|
|
8953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
8814
8954
|
"div",
|
|
8815
8955
|
{
|
|
8816
8956
|
className: (0, import_clsx47.default)(
|
|
@@ -8826,17 +8966,17 @@ function ITToast({
|
|
|
8826
8966
|
style: { backgroundColor },
|
|
8827
8967
|
role: "alert",
|
|
8828
8968
|
children: [
|
|
8829
|
-
/* @__PURE__ */ (0,
|
|
8830
|
-
/* @__PURE__ */ (0,
|
|
8831
|
-
/* @__PURE__ */ (0,
|
|
8969
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
8970
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TypeIcon, {}),
|
|
8971
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ITText, { as: "span", className: "font-medium text-sm sm:text-base leading-snug", children: message })
|
|
8832
8972
|
] }),
|
|
8833
|
-
/* @__PURE__ */ (0,
|
|
8973
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8834
8974
|
"button",
|
|
8835
8975
|
{
|
|
8836
8976
|
onClick: handleClose,
|
|
8837
8977
|
className: "p-1.5 rounded-full hover:bg-black/15 transition-colors focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
8838
8978
|
"aria-label": "Close notification",
|
|
8839
|
-
children: /* @__PURE__ */ (0,
|
|
8979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_fa28.FaTimes, { className: "w-4 h-4" })
|
|
8840
8980
|
}
|
|
8841
8981
|
)
|
|
8842
8982
|
]
|
|
@@ -8863,7 +9003,7 @@ var toolbarActions = [
|
|
|
8863
9003
|
// src/components/atoms/tooltip/tooltip.tsx
|
|
8864
9004
|
var import_react40 = require("react");
|
|
8865
9005
|
var import_clsx48 = __toESM(require("clsx"), 1);
|
|
8866
|
-
var
|
|
9006
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
8867
9007
|
var positionClasses2 = {
|
|
8868
9008
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
8869
9009
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -8892,7 +9032,7 @@ function ITTooltip({
|
|
|
8892
9032
|
clearTimeout(timeout);
|
|
8893
9033
|
setVisible(false);
|
|
8894
9034
|
};
|
|
8895
|
-
return /* @__PURE__ */ (0,
|
|
9035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
8896
9036
|
"div",
|
|
8897
9037
|
{
|
|
8898
9038
|
className: (0, import_clsx48.default)("relative inline-flex", className),
|
|
@@ -8900,9 +9040,9 @@ function ITTooltip({
|
|
|
8900
9040
|
onMouseLeave: handleMouseLeave,
|
|
8901
9041
|
children: [
|
|
8902
9042
|
children,
|
|
8903
|
-
visible && /* @__PURE__ */ (0,
|
|
8904
|
-
/* @__PURE__ */ (0,
|
|
8905
|
-
/* @__PURE__ */ (0,
|
|
9043
|
+
visible && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: (0, import_clsx48.default)("absolute z-[70] pointer-events-none", positionClasses2[position]), children: [
|
|
9044
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("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__ */ (0, import_jsx_runtime66.jsx)(ITText, { as: "span", children: content }) }),
|
|
9045
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: (0, import_clsx48.default)("absolute", arrowClasses[position]) })
|
|
8906
9046
|
] })
|
|
8907
9047
|
]
|
|
8908
9048
|
}
|
|
@@ -8910,16 +9050,16 @@ function ITTooltip({
|
|
|
8910
9050
|
}
|
|
8911
9051
|
|
|
8912
9052
|
// src/components/molecules/wysiwyg/wysiwyg.tsx
|
|
8913
|
-
var
|
|
9053
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
8914
9054
|
var INLINE_TAGS = /* @__PURE__ */ new Set(["STRONG", "B", "EM", "I", "U", "MARK"]);
|
|
8915
9055
|
var ACTION_META = {
|
|
8916
|
-
bold: { label: "Negrita", icon: /* @__PURE__ */ (0,
|
|
8917
|
-
italic: { label: "It\xE1lica", icon: /* @__PURE__ */ (0,
|
|
8918
|
-
underline: { label: "Subrayado", icon: /* @__PURE__ */ (0,
|
|
8919
|
-
highlight: { label: "Marcador", icon: /* @__PURE__ */ (0,
|
|
8920
|
-
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */ (0,
|
|
8921
|
-
ol: { label: "Lista numerada", icon: /* @__PURE__ */ (0,
|
|
8922
|
-
clear: { label: "Limpiar formato", icon: /* @__PURE__ */ (0,
|
|
9056
|
+
bold: { label: "Negrita", icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_fa29.FaBold, {}) },
|
|
9057
|
+
italic: { label: "It\xE1lica", icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_fa29.FaItalic, {}) },
|
|
9058
|
+
underline: { label: "Subrayado", icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_fa29.FaUnderline, {}) },
|
|
9059
|
+
highlight: { label: "Marcador", icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_fa29.FaHighlighter, {}) },
|
|
9060
|
+
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_fa29.FaListUl, {}) },
|
|
9061
|
+
ol: { label: "Lista numerada", icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_fa29.FaListOl, {}) },
|
|
9062
|
+
clear: { label: "Limpiar formato", icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_fa29.FaEraser, {}) }
|
|
8923
9063
|
};
|
|
8924
9064
|
function ITWysiwyg({
|
|
8925
9065
|
value,
|
|
@@ -9335,7 +9475,7 @@ function ITWysiwyg({
|
|
|
9335
9475
|
}) => {
|
|
9336
9476
|
const meta = ACTION_META[action];
|
|
9337
9477
|
const isActive = !!active[action];
|
|
9338
|
-
return /* @__PURE__ */ (0,
|
|
9478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ITTooltip, { content: meta.label, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
9339
9479
|
"button",
|
|
9340
9480
|
{
|
|
9341
9481
|
type: "button",
|
|
@@ -9355,9 +9495,9 @@ function ITWysiwyg({
|
|
|
9355
9495
|
}
|
|
9356
9496
|
) });
|
|
9357
9497
|
};
|
|
9358
|
-
return /* @__PURE__ */ (0,
|
|
9359
|
-
label && /* @__PURE__ */ (0,
|
|
9360
|
-
/* @__PURE__ */ (0,
|
|
9498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: inputWrapper(className), children: [
|
|
9499
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
9500
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
9361
9501
|
"div",
|
|
9362
9502
|
{
|
|
9363
9503
|
className: (0, import_clsx49.default)(
|
|
@@ -9366,20 +9506,20 @@ function ITWysiwyg({
|
|
|
9366
9506
|
isLocked && "opacity-50 cursor-not-allowed bg-secondary-100 dark:bg-slate-800"
|
|
9367
9507
|
),
|
|
9368
9508
|
children: [
|
|
9369
|
-
/* @__PURE__ */ (0,
|
|
9509
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
9370
9510
|
"div",
|
|
9371
9511
|
{
|
|
9372
9512
|
className: (0, import_clsx49.default)(
|
|
9373
9513
|
"flex flex-wrap items-center gap-0.5 px-1.5 py-1 border-b border-secondary-200 bg-secondary-50 dark:bg-slate-800",
|
|
9374
9514
|
isLocked && "bg-secondary-100 dark:bg-slate-900"
|
|
9375
9515
|
),
|
|
9376
|
-
children: toolbar.map((action, i) => /* @__PURE__ */ (0,
|
|
9377
|
-
i > 0 && (action === "ul" || action === "ol" || action === "clear") && /* @__PURE__ */ (0,
|
|
9378
|
-
/* @__PURE__ */ (0,
|
|
9516
|
+
children: toolbar.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "flex items-center", children: [
|
|
9517
|
+
i > 0 && (action === "ul" || action === "ol" || action === "clear") && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "mx-1 h-4 w-px bg-secondary-200 dark:bg-slate-600" }),
|
|
9518
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ToolbarButton, { action })
|
|
9379
9519
|
] }, action))
|
|
9380
9520
|
}
|
|
9381
9521
|
),
|
|
9382
|
-
/* @__PURE__ */ (0,
|
|
9522
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
9383
9523
|
"div",
|
|
9384
9524
|
{
|
|
9385
9525
|
id: name,
|
|
@@ -9413,7 +9553,7 @@ function ITWysiwyg({
|
|
|
9413
9553
|
]
|
|
9414
9554
|
}
|
|
9415
9555
|
),
|
|
9416
|
-
error && /* @__PURE__ */ (0,
|
|
9556
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ITText, { as: "span", className: inputError, children: error })
|
|
9417
9557
|
] });
|
|
9418
9558
|
}
|
|
9419
9559
|
|
|
@@ -9448,7 +9588,7 @@ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
|
|
|
9448
9588
|
})(UploadStatus || {});
|
|
9449
9589
|
|
|
9450
9590
|
// src/components/organisms/dropfile/dropfile.tsx
|
|
9451
|
-
var
|
|
9591
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
9452
9592
|
var ITDropfile = ({
|
|
9453
9593
|
onFileSelect,
|
|
9454
9594
|
onCancel,
|
|
@@ -9587,9 +9727,9 @@ var ITDropfile = ({
|
|
|
9587
9727
|
}
|
|
9588
9728
|
};
|
|
9589
9729
|
const { label, color, dotColor } = config2[status];
|
|
9590
|
-
return /* @__PURE__ */ (0,
|
|
9591
|
-
/* @__PURE__ */ (0,
|
|
9592
|
-
/* @__PURE__ */ (0,
|
|
9730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: `inline-flex items-center gap-2 px-2.5 py-1 rounded-full border ${color}`, children: [
|
|
9731
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: `w-2 h-2 rounded-full ${dotColor}` }),
|
|
9732
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { as: "span", className: "text-xs font-medium flex items-center gap-1.5", children: label })
|
|
9593
9733
|
] });
|
|
9594
9734
|
};
|
|
9595
9735
|
const onDrop = (acceptedFiles) => {
|
|
@@ -9680,18 +9820,18 @@ var ITDropfile = ({
|
|
|
9680
9820
|
return () => clearTimeout(timeout);
|
|
9681
9821
|
}
|
|
9682
9822
|
}, [view, isConfirmed, uploadStatus, externalStatus, onStatusChange]);
|
|
9683
|
-
const headerRow = /* @__PURE__ */ (0,
|
|
9684
|
-
/* @__PURE__ */ (0,
|
|
9685
|
-
/* @__PURE__ */ (0,
|
|
9686
|
-
/* @__PURE__ */ (0,
|
|
9823
|
+
const headerRow = /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [
|
|
9824
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("label", { className: "block text-sm font-semibold text-secondary-700", children: [
|
|
9825
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { as: "span", children: "Subir archivo " }),
|
|
9826
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(ITText, { as: "span", className: "text-secondary-400 font-normal text-xs", children: [
|
|
9687
9827
|
"(",
|
|
9688
9828
|
getFileExtensions(),
|
|
9689
9829
|
")"
|
|
9690
9830
|
] })
|
|
9691
9831
|
] }),
|
|
9692
|
-
showStatusBadge && selectedFile && /* @__PURE__ */ (0,
|
|
9832
|
+
showStatusBadge && selectedFile && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(StatusBadge, { status: uploadStatus })
|
|
9693
9833
|
] });
|
|
9694
|
-
const dropZoneOrPreview = /* @__PURE__ */ (0,
|
|
9834
|
+
const dropZoneOrPreview = /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: !selectedFile && !imagePreview ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
9695
9835
|
"div",
|
|
9696
9836
|
{
|
|
9697
9837
|
...getRootProps(),
|
|
@@ -9701,41 +9841,41 @@ var ITDropfile = ({
|
|
|
9701
9841
|
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-secondary-300 bg-white hover:border-primary-400 hover:bg-secondary-50"}
|
|
9702
9842
|
`,
|
|
9703
9843
|
children: [
|
|
9704
|
-
/* @__PURE__ */ (0,
|
|
9705
|
-
/* @__PURE__ */ (0,
|
|
9844
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("input", { ...getInputProps() }),
|
|
9845
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("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__ */ (0, import_jsx_runtime68.jsx)(
|
|
9706
9846
|
"svg",
|
|
9707
9847
|
{
|
|
9708
9848
|
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-secondary-400 group-hover:text-primary-500"}`,
|
|
9709
9849
|
fill: "none",
|
|
9710
9850
|
viewBox: "0 0 24 24",
|
|
9711
9851
|
stroke: "currentColor",
|
|
9712
|
-
children: /* @__PURE__ */ (0,
|
|
9852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("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" })
|
|
9713
9853
|
}
|
|
9714
9854
|
) }),
|
|
9715
|
-
/* @__PURE__ */ (0,
|
|
9855
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "text-center space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(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" }) })
|
|
9716
9856
|
]
|
|
9717
9857
|
}
|
|
9718
|
-
) : /* @__PURE__ */ (0,
|
|
9719
|
-
/* @__PURE__ */ (0,
|
|
9720
|
-
/* @__PURE__ */ (0,
|
|
9721
|
-
/* @__PURE__ */ (0,
|
|
9722
|
-
/* @__PURE__ */ (0,
|
|
9723
|
-
/* @__PURE__ */ (0,
|
|
9858
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "w-full bg-white border border-secondary-200 rounded-xl shadow-sm overflow-hidden animate-fade-in", children: [
|
|
9859
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex items-center justify-between p-3 bg-secondary-50 border-b border-secondary-100", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
9860
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("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__ */ (0, import_jsx_runtime68.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("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__ */ (0, import_jsx_runtime68.jsx)("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("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" }) }) }),
|
|
9861
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "min-w-0", children: [
|
|
9862
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { as: "p", className: "text-xs font-medium text-secondary-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
9863
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { as: "p", className: "text-[10px] text-secondary-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
9724
9864
|
] })
|
|
9725
9865
|
] }) }),
|
|
9726
|
-
/* @__PURE__ */ (0,
|
|
9866
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: (0, import_clsx50.default)("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__ */ (0, import_jsx_runtime68.jsx)(
|
|
9727
9867
|
"img",
|
|
9728
9868
|
{
|
|
9729
9869
|
src: imagePreview,
|
|
9730
9870
|
alt: "Vista previa",
|
|
9731
9871
|
className: "w-full h-full object-contain max-h-[200px]"
|
|
9732
9872
|
}
|
|
9733
|
-
) : /* @__PURE__ */ (0,
|
|
9734
|
-
/* @__PURE__ */ (0,
|
|
9735
|
-
/* @__PURE__ */ (0,
|
|
9873
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "py-8 flex flex-col items-center text-secondary-400", children: [
|
|
9874
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("svg", { className: "w-10 h-10 mb-2 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("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" }) }),
|
|
9875
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { as: "span", className: "text-xs", children: "Sin vista previa" })
|
|
9736
9876
|
] }) }),
|
|
9737
|
-
/* @__PURE__ */ (0,
|
|
9738
|
-
/* @__PURE__ */ (0,
|
|
9877
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "px-3 py-2 bg-white border-t border-secondary-100 flex justify-end gap-2", children: !isConfirmed ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
9878
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
9739
9879
|
ITButton,
|
|
9740
9880
|
{
|
|
9741
9881
|
type: "button",
|
|
@@ -9743,10 +9883,10 @@ var ITDropfile = ({
|
|
|
9743
9883
|
color: "secondary",
|
|
9744
9884
|
size: "sm",
|
|
9745
9885
|
onClick: handleCancel,
|
|
9746
|
-
children: /* @__PURE__ */ (0,
|
|
9886
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { children: "Cancelar" })
|
|
9747
9887
|
}
|
|
9748
9888
|
),
|
|
9749
|
-
/* @__PURE__ */ (0,
|
|
9889
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
9750
9890
|
ITButton,
|
|
9751
9891
|
{
|
|
9752
9892
|
type: "button",
|
|
@@ -9754,13 +9894,13 @@ var ITDropfile = ({
|
|
|
9754
9894
|
color: "primary",
|
|
9755
9895
|
size: "sm",
|
|
9756
9896
|
onClick: handleConfirm,
|
|
9757
|
-
children: /* @__PURE__ */ (0,
|
|
9758
|
-
/* @__PURE__ */ (0,
|
|
9759
|
-
/* @__PURE__ */ (0,
|
|
9897
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9898
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { children: "Confirmar" }),
|
|
9899
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
9760
9900
|
] })
|
|
9761
9901
|
}
|
|
9762
9902
|
)
|
|
9763
|
-
] }) : /* @__PURE__ */ (0,
|
|
9903
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
9764
9904
|
ITButton,
|
|
9765
9905
|
{
|
|
9766
9906
|
type: "button",
|
|
@@ -9769,12 +9909,12 @@ var ITDropfile = ({
|
|
|
9769
9909
|
size: "sm",
|
|
9770
9910
|
onClick: handleDelete,
|
|
9771
9911
|
children: [
|
|
9772
|
-
/* @__PURE__ */ (0,
|
|
9773
|
-
/* @__PURE__ */ (0,
|
|
9912
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("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" }) }),
|
|
9913
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { children: "Eliminar" })
|
|
9774
9914
|
]
|
|
9775
9915
|
}
|
|
9776
9916
|
) }),
|
|
9777
|
-
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */ (0,
|
|
9917
|
+
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "px-4 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "w-full bg-secondary-200 rounded-full h-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
9778
9918
|
"div",
|
|
9779
9919
|
{
|
|
9780
9920
|
className: "bg-primary-600 h-1.5 rounded-full transition-all duration-1000 ease-out",
|
|
@@ -9787,8 +9927,8 @@ var ITDropfile = ({
|
|
|
9787
9927
|
] }) });
|
|
9788
9928
|
if (view === "button") {
|
|
9789
9929
|
const hasFile = Boolean(selectedFile || imagePreview);
|
|
9790
|
-
return /* @__PURE__ */ (0,
|
|
9791
|
-
/* @__PURE__ */ (0,
|
|
9930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0, import_clsx50.default)("inline-block", containerClassName), children: [
|
|
9931
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
9792
9932
|
ITButton,
|
|
9793
9933
|
{
|
|
9794
9934
|
type: "button",
|
|
@@ -9796,20 +9936,20 @@ var ITDropfile = ({
|
|
|
9796
9936
|
color: hasFile ? "primary" : "secondary",
|
|
9797
9937
|
size: "sm",
|
|
9798
9938
|
onClick: () => setIsModalOpen(true),
|
|
9799
|
-
children: /* @__PURE__ */ (0,
|
|
9800
|
-
/* @__PURE__ */ (0,
|
|
9801
|
-
/* @__PURE__ */ (0,
|
|
9802
|
-
showStatusBadge && hasFile && /* @__PURE__ */ (0,
|
|
9939
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center gap-2 max-w-[220px]", children: [
|
|
9940
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("svg", { className: "w-4 h-4 flex-shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("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" }) }),
|
|
9941
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITText, { className: "truncate", children: selectedFile?.name || (hasFile ? "Archivo cargado" : buttonLabel) }),
|
|
9942
|
+
showStatusBadge && hasFile && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(StatusBadge, { status: uploadStatus })
|
|
9803
9943
|
] })
|
|
9804
9944
|
}
|
|
9805
9945
|
),
|
|
9806
|
-
/* @__PURE__ */ (0,
|
|
9946
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ITDialog, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), title: modalTitle ?? buttonLabel, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "w-full transition-all duration-300", children: [
|
|
9807
9947
|
headerRow,
|
|
9808
9948
|
dropZoneOrPreview
|
|
9809
9949
|
] }) })
|
|
9810
9950
|
] });
|
|
9811
9951
|
}
|
|
9812
|
-
return /* @__PURE__ */ (0,
|
|
9952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: (0, import_clsx50.default)("w-full transition-all duration-300", containerClassName), children: [
|
|
9813
9953
|
headerRow,
|
|
9814
9954
|
dropZoneOrPreview
|
|
9815
9955
|
] });
|
|
@@ -9823,7 +9963,7 @@ var import_clsx51 = __toESM(require("clsx"), 1);
|
|
|
9823
9963
|
// src/components/organisms/topbar/topbar.tsx
|
|
9824
9964
|
var import_fa30 = require("react-icons/fa");
|
|
9825
9965
|
var import_react43 = require("react");
|
|
9826
|
-
var
|
|
9966
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
9827
9967
|
function ITTopBar({
|
|
9828
9968
|
logo,
|
|
9829
9969
|
logoText,
|
|
@@ -9838,7 +9978,7 @@ function ITTopBar({
|
|
|
9838
9978
|
const [isUserMenuOpen, setIsUserMenuOpen] = (0, import_react43.useState)(false);
|
|
9839
9979
|
const userMenuRef = (0, import_react43.useRef)(null);
|
|
9840
9980
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
9841
|
-
return /* @__PURE__ */ (0,
|
|
9981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
9842
9982
|
"header",
|
|
9843
9983
|
{
|
|
9844
9984
|
className: "sticky top-0 z-40 backdrop-blur-md transition-all duration-300",
|
|
@@ -9847,9 +9987,9 @@ function ITTopBar({
|
|
|
9847
9987
|
borderBottom: "1px solid var(--it-topbar-border, rgba(15, 23, 42, 0.06))",
|
|
9848
9988
|
boxShadow: "var(--shadow-xs)"
|
|
9849
9989
|
},
|
|
9850
|
-
children: /* @__PURE__ */ (0,
|
|
9851
|
-
/* @__PURE__ */ (0,
|
|
9852
|
-
showMobileMenuButton && /* @__PURE__ */ (0,
|
|
9990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center justify-between h-[72px] px-6 lg:px-8", children: [
|
|
9991
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-5", children: [
|
|
9992
|
+
showMobileMenuButton && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
9853
9993
|
"button",
|
|
9854
9994
|
{
|
|
9855
9995
|
className: "lg:hidden p-2.5 rounded-xl transition-colors duration-200",
|
|
@@ -9859,12 +9999,12 @@ function ITTopBar({
|
|
|
9859
9999
|
onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)",
|
|
9860
10000
|
onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
|
|
9861
10001
|
onClick: onToggleMobileMenu,
|
|
9862
|
-
children: /* @__PURE__ */ (0,
|
|
10002
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_fa30.FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
|
|
9863
10003
|
}
|
|
9864
10004
|
),
|
|
9865
|
-
/* @__PURE__ */ (0,
|
|
9866
|
-
logo && /* @__PURE__ */ (0,
|
|
9867
|
-
logoText && /* @__PURE__ */ (0,
|
|
10005
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
10006
|
+
logo && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex-shrink-0 drop-shadow-sm", children: logo }),
|
|
10007
|
+
logoText && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
9868
10008
|
ITText,
|
|
9869
10009
|
{
|
|
9870
10010
|
as: "span",
|
|
@@ -9874,7 +10014,7 @@ function ITTopBar({
|
|
|
9874
10014
|
}
|
|
9875
10015
|
)
|
|
9876
10016
|
] }),
|
|
9877
|
-
navItems && navItems.length > 0 && /* @__PURE__ */ (0,
|
|
10017
|
+
navItems && navItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("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__ */ (0, import_jsx_runtime69.jsx)(
|
|
9878
10018
|
"button",
|
|
9879
10019
|
{
|
|
9880
10020
|
onClick: () => onNavItemClick?.(item.id),
|
|
@@ -9888,19 +10028,19 @@ function ITTopBar({
|
|
|
9888
10028
|
e.currentTarget.style.color = "var(--it-topbar-text, #475569)";
|
|
9889
10029
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
9890
10030
|
},
|
|
9891
|
-
children: /* @__PURE__ */ (0,
|
|
9892
|
-
item.icon && /* @__PURE__ */ (0,
|
|
9893
|
-
/* @__PURE__ */ (0,
|
|
10031
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10032
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "opacity-70", children: item.icon }),
|
|
10033
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ITText, { as: "span", children: item.label })
|
|
9894
10034
|
] })
|
|
9895
10035
|
},
|
|
9896
10036
|
item.id
|
|
9897
10037
|
)) })
|
|
9898
10038
|
] }),
|
|
9899
|
-
centerContent && /* @__PURE__ */ (0,
|
|
9900
|
-
(children || userMenu) && /* @__PURE__ */ (0,
|
|
10039
|
+
centerContent && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "hidden lg:flex flex-1 min-w-0 items-center justify-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "w-full max-w-[420px]", children: centerContent }) }),
|
|
10040
|
+
(children || userMenu) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9901
10041
|
children,
|
|
9902
|
-
userMenu && /* @__PURE__ */ (0,
|
|
9903
|
-
/* @__PURE__ */ (0,
|
|
10042
|
+
userMenu && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "relative", children: [
|
|
10043
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
9904
10044
|
"button",
|
|
9905
10045
|
{
|
|
9906
10046
|
type: "button",
|
|
@@ -9916,19 +10056,19 @@ function ITTopBar({
|
|
|
9916
10056
|
},
|
|
9917
10057
|
onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
|
|
9918
10058
|
children: [
|
|
9919
|
-
/* @__PURE__ */ (0,
|
|
9920
|
-
userMenu.userImage ? /* @__PURE__ */ (0,
|
|
10059
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "relative", children: [
|
|
10060
|
+
userMenu.userImage ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
9921
10061
|
"img",
|
|
9922
10062
|
{
|
|
9923
10063
|
className: "w-9 h-9 rounded-full object-cover ring-2 ring-white shadow-sm",
|
|
9924
10064
|
src: userMenu.userImage,
|
|
9925
10065
|
alt: "Current user"
|
|
9926
10066
|
}
|
|
9927
|
-
) : /* @__PURE__ */ (0,
|
|
9928
|
-
/* @__PURE__ */ (0,
|
|
10067
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_fa30.FaUserCircle, { className: "w-6 h-6", style: { color: "var(--it-topbar-icon, #94a3b8)" } }) }),
|
|
10068
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
|
|
9929
10069
|
] }),
|
|
9930
|
-
/* @__PURE__ */ (0,
|
|
9931
|
-
/* @__PURE__ */ (0,
|
|
10070
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "hidden sm:flex flex-col text-left py-0.5", children: [
|
|
10071
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
9932
10072
|
ITText,
|
|
9933
10073
|
{
|
|
9934
10074
|
as: "span",
|
|
@@ -9937,7 +10077,7 @@ function ITTopBar({
|
|
|
9937
10077
|
children: userMenu.userName
|
|
9938
10078
|
}
|
|
9939
10079
|
),
|
|
9940
|
-
/* @__PURE__ */ (0,
|
|
10080
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
9941
10081
|
ITText,
|
|
9942
10082
|
{
|
|
9943
10083
|
as: "span",
|
|
@@ -9950,7 +10090,7 @@ function ITTopBar({
|
|
|
9950
10090
|
]
|
|
9951
10091
|
}
|
|
9952
10092
|
),
|
|
9953
|
-
/* @__PURE__ */ (0,
|
|
10093
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
9954
10094
|
"div",
|
|
9955
10095
|
{
|
|
9956
10096
|
ref: userMenuRef,
|
|
@@ -9963,15 +10103,15 @@ function ITTopBar({
|
|
|
9963
10103
|
border: "1px solid var(--it-topbar-user-dropdown-border, #f1f5f9)"
|
|
9964
10104
|
},
|
|
9965
10105
|
children: [
|
|
9966
|
-
/* @__PURE__ */ (0,
|
|
9967
|
-
/* @__PURE__ */ (0,
|
|
9968
|
-
/* @__PURE__ */ (0,
|
|
10106
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("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: [
|
|
10107
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ITText, { as: "span", className: "block font-bold text-[0.9rem]", style: { color: "var(--it-topbar-user-text, #0f172a)" }, children: userMenu.userName }),
|
|
10108
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ITText, { as: "span", className: "block text-xs font-medium truncate mt-0.5", style: { color: "var(--it-topbar-user-subtitle, #64748b)" }, children: userMenu.userEmail })
|
|
9969
10109
|
] }),
|
|
9970
|
-
/* @__PURE__ */ (0,
|
|
10110
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("ul", { className: "py-2", children: userMenu.menuItems.map((m, i) => {
|
|
9971
10111
|
const isDestructive = m.label.toLowerCase().includes("salir") || m.label.toLowerCase().includes("cerrar") || m.label.toLowerCase().includes("logout");
|
|
9972
|
-
return /* @__PURE__ */ (0,
|
|
9973
|
-
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */ (0,
|
|
9974
|
-
/* @__PURE__ */ (0,
|
|
10112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("li", { className: "px-2", children: [
|
|
10113
|
+
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "h-px bg-slate-100 my-1 mx-2" }),
|
|
10114
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
9975
10115
|
"button",
|
|
9976
10116
|
{
|
|
9977
10117
|
onClick: () => {
|
|
@@ -9986,7 +10126,7 @@ function ITTopBar({
|
|
|
9986
10126
|
onMouseLeave: (e) => {
|
|
9987
10127
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
9988
10128
|
},
|
|
9989
|
-
children: /* @__PURE__ */ (0,
|
|
10129
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ITText, { as: "span", children: m.label })
|
|
9990
10130
|
}
|
|
9991
10131
|
)
|
|
9992
10132
|
] }, i);
|
|
@@ -10002,7 +10142,7 @@ function ITTopBar({
|
|
|
10002
10142
|
}
|
|
10003
10143
|
|
|
10004
10144
|
// src/components/templates/layout/layout.tsx
|
|
10005
|
-
var
|
|
10145
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
10006
10146
|
function ITLayout({
|
|
10007
10147
|
topBar,
|
|
10008
10148
|
sidebar,
|
|
@@ -10017,8 +10157,8 @@ function ITLayout({
|
|
|
10017
10157
|
const handleToggleCollapse = isControlled ? sidebar.onToggleCollapse ?? (() => {
|
|
10018
10158
|
}) : () => setInternalCollapsed((v) => !v);
|
|
10019
10159
|
const layoutTokens = theme.layout;
|
|
10020
|
-
return /* @__PURE__ */ (0,
|
|
10021
|
-
/* @__PURE__ */ (0,
|
|
10160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
10161
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10022
10162
|
ITTopBar,
|
|
10023
10163
|
{
|
|
10024
10164
|
...topBar,
|
|
@@ -10026,20 +10166,20 @@ function ITLayout({
|
|
|
10026
10166
|
onToggleMobileMenu: () => setMobileSidebarOpen((v) => !v)
|
|
10027
10167
|
}
|
|
10028
10168
|
),
|
|
10029
|
-
/* @__PURE__ */ (0,
|
|
10169
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
10030
10170
|
"div",
|
|
10031
10171
|
{
|
|
10032
10172
|
className: "flex flex-1 overflow-hidden relative",
|
|
10033
10173
|
style: { backgroundColor: layoutTokens.backgroundColor },
|
|
10034
10174
|
children: [
|
|
10035
|
-
/* @__PURE__ */ (0,
|
|
10036
|
-
/* @__PURE__ */ (0,
|
|
10175
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "hidden lg:block relative z-40 h-full", children: [
|
|
10176
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10037
10177
|
"div",
|
|
10038
10178
|
{
|
|
10039
10179
|
className: `${desktopCollapsed ? "w-[88px]" : "w-[280px]"} h-full flex-shrink-0`
|
|
10040
10180
|
}
|
|
10041
10181
|
),
|
|
10042
|
-
/* @__PURE__ */ (0,
|
|
10182
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10043
10183
|
ITSidebar,
|
|
10044
10184
|
{
|
|
10045
10185
|
...sidebar,
|
|
@@ -10050,17 +10190,17 @@ function ITLayout({
|
|
|
10050
10190
|
}
|
|
10051
10191
|
) })
|
|
10052
10192
|
] }),
|
|
10053
|
-
mobileSidebarOpen && /* @__PURE__ */ (0,
|
|
10193
|
+
mobileSidebarOpen && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10054
10194
|
"div",
|
|
10055
10195
|
{
|
|
10056
10196
|
className: "lg:hidden fixed inset-0 z-[40] transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
10057
10197
|
onClick: () => setMobileSidebarOpen(false),
|
|
10058
|
-
children: /* @__PURE__ */ (0,
|
|
10198
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10059
10199
|
"div",
|
|
10060
10200
|
{
|
|
10061
10201
|
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
10062
10202
|
onClick: (e) => e.stopPropagation(),
|
|
10063
|
-
children: /* @__PURE__ */ (0,
|
|
10203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
10064
10204
|
ITSidebar,
|
|
10065
10205
|
{
|
|
10066
10206
|
...sidebar,
|
|
@@ -10076,7 +10216,7 @@ function ITLayout({
|
|
|
10076
10216
|
)
|
|
10077
10217
|
}
|
|
10078
10218
|
),
|
|
10079
|
-
/* @__PURE__ */ (0,
|
|
10219
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: (0, import_clsx51.default)("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) })
|
|
10080
10220
|
]
|
|
10081
10221
|
}
|
|
10082
10222
|
)
|
|
@@ -10092,7 +10232,7 @@ var sizeClasses = {
|
|
|
10092
10232
|
};
|
|
10093
10233
|
|
|
10094
10234
|
// src/components/atoms/loader/loader.tsx
|
|
10095
|
-
var
|
|
10235
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
10096
10236
|
function ITLoader({
|
|
10097
10237
|
size = "md",
|
|
10098
10238
|
variant = "spinner",
|
|
@@ -10107,22 +10247,22 @@ function ITLoader({
|
|
|
10107
10247
|
const bgStyle = isCssValue ? { backgroundColor: resolvedColor } : {};
|
|
10108
10248
|
const colorClass = !isCssValue ? color : "";
|
|
10109
10249
|
if (variant === "spinner") {
|
|
10110
|
-
return /* @__PURE__ */ (0,
|
|
10250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
10111
10251
|
"div",
|
|
10112
10252
|
{
|
|
10113
10253
|
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}`,
|
|
10114
10254
|
role: "status",
|
|
10115
10255
|
style,
|
|
10116
|
-
children: /* @__PURE__ */ (0,
|
|
10256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(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..." })
|
|
10117
10257
|
}
|
|
10118
10258
|
);
|
|
10119
10259
|
}
|
|
10120
10260
|
if (variant === "dots") {
|
|
10121
|
-
return /* @__PURE__ */ (0,
|
|
10261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
10122
10262
|
"div",
|
|
10123
10263
|
{
|
|
10124
10264
|
className: `flex items-center justify-center space-x-2 ${className}`,
|
|
10125
|
-
children: [...Array(3)].map((_, i) => /* @__PURE__ */ (0,
|
|
10265
|
+
children: [...Array(3)].map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
10126
10266
|
"div",
|
|
10127
10267
|
{
|
|
10128
10268
|
className: `${sizeClasses[size.replace(/l|g/, "")]} animate-bounce rounded-full ${colorClass}`,
|
|
@@ -10137,11 +10277,11 @@ function ITLoader({
|
|
|
10137
10277
|
);
|
|
10138
10278
|
}
|
|
10139
10279
|
if (variant === "bar") {
|
|
10140
|
-
return /* @__PURE__ */ (0,
|
|
10280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
10141
10281
|
"div",
|
|
10142
10282
|
{
|
|
10143
10283
|
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}`,
|
|
10144
|
-
children: /* @__PURE__ */ (0,
|
|
10284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
10145
10285
|
"div",
|
|
10146
10286
|
{
|
|
10147
10287
|
className: `h-full animate-progress ${colorClass}`,
|
|
@@ -10157,7 +10297,7 @@ function ITLoader({
|
|
|
10157
10297
|
);
|
|
10158
10298
|
}
|
|
10159
10299
|
if (variant === "pulse") {
|
|
10160
|
-
return /* @__PURE__ */ (0,
|
|
10300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
10161
10301
|
"div",
|
|
10162
10302
|
{
|
|
10163
10303
|
className: `rounded-full ${sizeClasses[size]} animate-pulse ${colorClass} ${className}`,
|
|
@@ -10172,7 +10312,7 @@ function ITLoader({
|
|
|
10172
10312
|
var import_clsx52 = __toESM(require("clsx"), 1);
|
|
10173
10313
|
var import_react45 = require("react");
|
|
10174
10314
|
var import_fa31 = require("react-icons/fa");
|
|
10175
|
-
var
|
|
10315
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
10176
10316
|
function ITStepper({
|
|
10177
10317
|
steps,
|
|
10178
10318
|
currentStep,
|
|
@@ -10239,23 +10379,23 @@ function ITStepper({
|
|
|
10239
10379
|
const renderStepContent = (index, isCompleted) => {
|
|
10240
10380
|
const step = steps[index];
|
|
10241
10381
|
if (isCompleted) {
|
|
10242
|
-
return /* @__PURE__ */ (0,
|
|
10382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_fa31.FaCheck, { className: "w-4 h-4" });
|
|
10243
10383
|
}
|
|
10244
10384
|
if (step.icon && useIcons) {
|
|
10245
|
-
return /* @__PURE__ */ (0,
|
|
10385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-center justify-center w-5 h-5", children: step.icon });
|
|
10246
10386
|
}
|
|
10247
|
-
return /* @__PURE__ */ (0,
|
|
10387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ITText, { as: "span", className: "text-sm font-semibold", children: index + 1 });
|
|
10248
10388
|
};
|
|
10249
|
-
return /* @__PURE__ */ (0,
|
|
10250
|
-
/* @__PURE__ */ (0,
|
|
10251
|
-
/* @__PURE__ */ (0,
|
|
10389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: (0, import_clsx52.default)("w-full max-w-5xl mx-auto px-4", containerClassName), children: [
|
|
10390
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "relative mb-8", children: [
|
|
10391
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10252
10392
|
"div",
|
|
10253
10393
|
{
|
|
10254
10394
|
className: "absolute left-6 right-6 top-5 h-1 bg-secondary-200 rounded-full z-0",
|
|
10255
10395
|
"aria-hidden": true
|
|
10256
10396
|
}
|
|
10257
10397
|
),
|
|
10258
|
-
/* @__PURE__ */ (0,
|
|
10398
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10259
10399
|
"div",
|
|
10260
10400
|
{
|
|
10261
10401
|
ref: progressRef,
|
|
@@ -10263,11 +10403,11 @@ function ITStepper({
|
|
|
10263
10403
|
"aria-hidden": true
|
|
10264
10404
|
}
|
|
10265
10405
|
),
|
|
10266
|
-
/* @__PURE__ */ (0,
|
|
10406
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-start justify-between space-x-2 relative z-20", children: steps.map((step, idx) => {
|
|
10267
10407
|
const isActive = idx === currentStep;
|
|
10268
10408
|
const isCompleted = idx < currentStep;
|
|
10269
10409
|
const hasIcon = step.icon && useIcons;
|
|
10270
|
-
return /* @__PURE__ */ (0,
|
|
10410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10271
10411
|
"button",
|
|
10272
10412
|
{
|
|
10273
10413
|
type: "button",
|
|
@@ -10277,8 +10417,8 @@ function ITStepper({
|
|
|
10277
10417
|
"aria-label": `Paso ${idx + 1} ${step.label}`,
|
|
10278
10418
|
className: "flex-1 group",
|
|
10279
10419
|
title: step.label,
|
|
10280
|
-
children: /* @__PURE__ */ (0,
|
|
10281
|
-
/* @__PURE__ */ (0,
|
|
10420
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
10421
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10282
10422
|
"div",
|
|
10283
10423
|
{
|
|
10284
10424
|
className: (0, import_clsx52.default)(
|
|
@@ -10292,7 +10432,7 @@ function ITStepper({
|
|
|
10292
10432
|
children: renderStepContent(idx, isCompleted)
|
|
10293
10433
|
}
|
|
10294
10434
|
),
|
|
10295
|
-
/* @__PURE__ */ (0,
|
|
10435
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10296
10436
|
ITText,
|
|
10297
10437
|
{
|
|
10298
10438
|
as: "span",
|
|
@@ -10310,7 +10450,7 @@ function ITStepper({
|
|
|
10310
10450
|
);
|
|
10311
10451
|
}) })
|
|
10312
10452
|
] }),
|
|
10313
|
-
/* @__PURE__ */ (0,
|
|
10453
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10314
10454
|
"div",
|
|
10315
10455
|
{
|
|
10316
10456
|
ref: contentRef,
|
|
@@ -10326,37 +10466,37 @@ function ITStepper({
|
|
|
10326
10466
|
children: steps[currentStep].content
|
|
10327
10467
|
}
|
|
10328
10468
|
),
|
|
10329
|
-
/* @__PURE__ */ (0,
|
|
10330
|
-
/* @__PURE__ */ (0,
|
|
10469
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex justify-between items-center mt-6", children: [
|
|
10470
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10331
10471
|
ITButton,
|
|
10332
10472
|
{
|
|
10333
10473
|
variant: "outlined",
|
|
10334
10474
|
color: "secondary",
|
|
10335
10475
|
disabled: currentStep === 0,
|
|
10336
10476
|
onClick: prevStep,
|
|
10337
|
-
children: /* @__PURE__ */ (0,
|
|
10338
|
-
/* @__PURE__ */ (0,
|
|
10339
|
-
/* @__PURE__ */ (0,
|
|
10477
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10478
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_fa31.FaChevronLeft, {}),
|
|
10479
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ITText, { as: "span", children: "Atr\xE1s" })
|
|
10340
10480
|
] })
|
|
10341
10481
|
}
|
|
10342
10482
|
),
|
|
10343
|
-
/* @__PURE__ */ (0,
|
|
10344
|
-
/* @__PURE__ */ (0,
|
|
10483
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
10484
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(ITText, { as: "div", className: "text-sm text-secondary-500 mr-2 hidden sm:block", children: [
|
|
10345
10485
|
"Paso ",
|
|
10346
10486
|
currentStep + 1,
|
|
10347
10487
|
" de ",
|
|
10348
10488
|
steps.length
|
|
10349
10489
|
] }),
|
|
10350
|
-
/* @__PURE__ */ (0,
|
|
10490
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
10351
10491
|
ITButton,
|
|
10352
10492
|
{
|
|
10353
10493
|
variant: "solid",
|
|
10354
10494
|
color,
|
|
10355
10495
|
disabled: disableNext,
|
|
10356
10496
|
onClick: nextStep,
|
|
10357
|
-
children: /* @__PURE__ */ (0,
|
|
10358
|
-
/* @__PURE__ */ (0,
|
|
10359
|
-
currentStep === steps.length - 1 ? /* @__PURE__ */ (0,
|
|
10497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10498
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(ITText, { as: "span", children: currentStep === steps.length - 1 ? "Finalizar" : "Siguiente" }),
|
|
10499
|
+
currentStep === steps.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_fa31.FaCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_fa31.FaChevronRight, {})
|
|
10360
10500
|
] })
|
|
10361
10501
|
}
|
|
10362
10502
|
)
|
|
@@ -10544,7 +10684,7 @@ var PRESETS = [
|
|
|
10544
10684
|
];
|
|
10545
10685
|
|
|
10546
10686
|
// src/components/theme-provider/themeProvider.tsx
|
|
10547
|
-
var
|
|
10687
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
10548
10688
|
var STORAGE_KEY = "it-theme-palette";
|
|
10549
10689
|
var SHADOW_LEVELS = {
|
|
10550
10690
|
0: {
|
|
@@ -11935,14 +12075,14 @@ function ITThemeProvider({
|
|
|
11935
12075
|
const isNested = colorKey.includes(".");
|
|
11936
12076
|
const label = isNested ? colorKey.split(".")[1] : colorKey;
|
|
11937
12077
|
const value = getNestedValue3(palette2, colorKey);
|
|
11938
|
-
return /* @__PURE__ */ (0,
|
|
12078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
11939
12079
|
"div",
|
|
11940
12080
|
{
|
|
11941
12081
|
className: "flex items-center justify-between p-3 rounded-xl border border-slate-100 dark:border-slate-800 bg-white dark:bg-slate-900/50 gap-3 hover:border-slate-200 dark:hover:border-slate-700 transition-colors",
|
|
11942
12082
|
children: [
|
|
11943
|
-
/* @__PURE__ */ (0,
|
|
11944
|
-
/* @__PURE__ */ (0,
|
|
11945
|
-
/* @__PURE__ */ (0,
|
|
12083
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
12084
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("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: [
|
|
12085
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
11946
12086
|
"input",
|
|
11947
12087
|
{
|
|
11948
12088
|
type: "color",
|
|
@@ -11951,23 +12091,23 @@ function ITThemeProvider({
|
|
|
11951
12091
|
className: "absolute inset-0 opacity-0 cursor-pointer w-full h-full"
|
|
11952
12092
|
}
|
|
11953
12093
|
),
|
|
11954
|
-
/* @__PURE__ */ (0,
|
|
12094
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "w-full h-full", style: { backgroundColor: value } })
|
|
11955
12095
|
] }),
|
|
11956
|
-
/* @__PURE__ */ (0,
|
|
11957
|
-
/* @__PURE__ */ (0,
|
|
11958
|
-
/* @__PURE__ */ (0,
|
|
11959
|
-
/* @__PURE__ */ (0,
|
|
12096
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col min-w-0", children: [
|
|
12097
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(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() }),
|
|
12098
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
12099
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
11960
12100
|
"span",
|
|
11961
12101
|
{
|
|
11962
12102
|
className: "w-3 h-3 rounded-full border border-slate-200 dark:border-slate-600",
|
|
11963
12103
|
style: { backgroundColor: value }
|
|
11964
12104
|
}
|
|
11965
12105
|
),
|
|
11966
|
-
/* @__PURE__ */ (0,
|
|
12106
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ITText, { as: "span", className: "font-mono text-[11px] text-slate-400", children: value })
|
|
11967
12107
|
] })
|
|
11968
12108
|
] })
|
|
11969
12109
|
] }),
|
|
11970
|
-
/* @__PURE__ */ (0,
|
|
12110
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
11971
12111
|
"input",
|
|
11972
12112
|
{
|
|
11973
12113
|
type: "text",
|
|
@@ -11986,14 +12126,14 @@ function ITThemeProvider({
|
|
|
11986
12126
|
isCustom
|
|
11987
12127
|
}) => {
|
|
11988
12128
|
const isSelected = JSON.stringify(preset.colors) === JSON.stringify(palette2);
|
|
11989
|
-
return /* @__PURE__ */ (0,
|
|
12129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
11990
12130
|
"button",
|
|
11991
12131
|
{
|
|
11992
12132
|
type: "button",
|
|
11993
12133
|
onClick: () => applyPreset(preset.colors),
|
|
11994
12134
|
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"}`,
|
|
11995
12135
|
children: [
|
|
11996
|
-
isCustom && /* @__PURE__ */ (0,
|
|
12136
|
+
isCustom && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
11997
12137
|
"span",
|
|
11998
12138
|
{
|
|
11999
12139
|
onClick: (e) => {
|
|
@@ -12002,11 +12142,11 @@ function ITThemeProvider({
|
|
|
12002
12142
|
},
|
|
12003
12143
|
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",
|
|
12004
12144
|
title: "Eliminar",
|
|
12005
|
-
children: /* @__PURE__ */ (0,
|
|
12145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_md3.MdClose, { size: 12 })
|
|
12006
12146
|
}
|
|
12007
12147
|
),
|
|
12008
|
-
/* @__PURE__ */ (0,
|
|
12009
|
-
/* @__PURE__ */ (0,
|
|
12148
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(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 }),
|
|
12149
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex gap-1", children: ["primary", "secondary", "ternary", "success"].map((c) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12010
12150
|
"span",
|
|
12011
12151
|
{
|
|
12012
12152
|
className: "w-3 h-3 rounded-full border border-black/10",
|
|
@@ -12018,7 +12158,7 @@ function ITThemeProvider({
|
|
|
12018
12158
|
}
|
|
12019
12159
|
);
|
|
12020
12160
|
};
|
|
12021
|
-
return /* @__PURE__ */ (0,
|
|
12161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
12022
12162
|
ITThemeContext.Provider,
|
|
12023
12163
|
{
|
|
12024
12164
|
value: {
|
|
@@ -12034,28 +12174,28 @@ function ITThemeProvider({
|
|
|
12034
12174
|
},
|
|
12035
12175
|
children: [
|
|
12036
12176
|
children,
|
|
12037
|
-
showFab && /* @__PURE__ */ (0,
|
|
12177
|
+
showFab && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12038
12178
|
"button",
|
|
12039
12179
|
{
|
|
12040
12180
|
onClick: () => setIsOpen((prev) => !prev),
|
|
12041
12181
|
className: "it-theme-fab it-theme-bounce",
|
|
12042
12182
|
style: { backgroundColor: "var(--color-primary)" },
|
|
12043
12183
|
"aria-label": "Configurar Paleta de Colores",
|
|
12044
|
-
children: /* @__PURE__ */ (0,
|
|
12184
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_md3.MdPalette, { size: 28 })
|
|
12045
12185
|
}
|
|
12046
12186
|
),
|
|
12047
|
-
showFab && /* @__PURE__ */ (0,
|
|
12187
|
+
showFab && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12048
12188
|
ITDialog,
|
|
12049
12189
|
{
|
|
12050
12190
|
isOpen,
|
|
12051
12191
|
onClose: () => setIsOpen(false),
|
|
12052
12192
|
title: "Dise\xF1ador de Temas",
|
|
12053
12193
|
useFormHeader: true,
|
|
12054
|
-
children: /* @__PURE__ */ (0,
|
|
12055
|
-
/* @__PURE__ */ (0,
|
|
12056
|
-
/* @__PURE__ */ (0,
|
|
12057
|
-
/* @__PURE__ */ (0,
|
|
12058
|
-
/* @__PURE__ */ (0,
|
|
12194
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex gap-6 h-[580px]", children: [
|
|
12195
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "w-64 flex-shrink-0 flex flex-col gap-5 overflow-y-auto pr-1", children: [
|
|
12196
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { children: [
|
|
12197
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500 mb-2.5 block", children: "Apariencia" }),
|
|
12198
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12059
12199
|
ITSegmentedControl,
|
|
12060
12200
|
{
|
|
12061
12201
|
options: [
|
|
@@ -12069,16 +12209,16 @@ function ITThemeProvider({
|
|
|
12069
12209
|
}
|
|
12070
12210
|
)
|
|
12071
12211
|
] }),
|
|
12072
|
-
/* @__PURE__ */ (0,
|
|
12073
|
-
/* @__PURE__ */ (0,
|
|
12074
|
-
/* @__PURE__ */ (0,
|
|
12212
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { children: [
|
|
12213
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex items-center justify-between mb-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500", children: "Presets" }) }),
|
|
12214
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "grid grid-cols-2 gap-2", children: PRESETS.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PresetCard, { preset }, preset.name)) })
|
|
12075
12215
|
] }),
|
|
12076
|
-
customPresets.length > 0 && /* @__PURE__ */ (0,
|
|
12077
|
-
/* @__PURE__ */ (0,
|
|
12078
|
-
/* @__PURE__ */ (0,
|
|
12216
|
+
customPresets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { children: [
|
|
12217
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(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" }),
|
|
12218
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex flex-col gap-1.5", children: customPresets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PresetCard, { preset, isCustom: true }, preset.name)) })
|
|
12079
12219
|
] }),
|
|
12080
|
-
isSavingPreset && /* @__PURE__ */ (0,
|
|
12081
|
-
/* @__PURE__ */ (0,
|
|
12220
|
+
isSavingPreset && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("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: [
|
|
12221
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12082
12222
|
ITInput,
|
|
12083
12223
|
{
|
|
12084
12224
|
name: "presetName",
|
|
@@ -12096,8 +12236,8 @@ function ITThemeProvider({
|
|
|
12096
12236
|
}
|
|
12097
12237
|
}
|
|
12098
12238
|
),
|
|
12099
|
-
/* @__PURE__ */ (0,
|
|
12100
|
-
/* @__PURE__ */ (0,
|
|
12239
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex gap-2", children: [
|
|
12240
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12101
12241
|
ITButton,
|
|
12102
12242
|
{
|
|
12103
12243
|
label: "Guardar",
|
|
@@ -12108,7 +12248,7 @@ function ITThemeProvider({
|
|
|
12108
12248
|
className: "flex-1"
|
|
12109
12249
|
}
|
|
12110
12250
|
),
|
|
12111
|
-
/* @__PURE__ */ (0,
|
|
12251
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12112
12252
|
ITButton,
|
|
12113
12253
|
{
|
|
12114
12254
|
label: "X",
|
|
@@ -12122,31 +12262,31 @@ function ITThemeProvider({
|
|
|
12122
12262
|
)
|
|
12123
12263
|
] })
|
|
12124
12264
|
] }),
|
|
12125
|
-
!isSavingPreset && /* @__PURE__ */ (0,
|
|
12265
|
+
!isSavingPreset && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12126
12266
|
ITButton,
|
|
12127
12267
|
{
|
|
12128
12268
|
variant: "outlined",
|
|
12129
|
-
icon: /* @__PURE__ */ (0,
|
|
12269
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_md3.MdPalette, { size: 14 }),
|
|
12130
12270
|
label: "Guardar actual",
|
|
12131
12271
|
onClick: () => setIsSavingPreset(true),
|
|
12132
12272
|
size: "sm"
|
|
12133
12273
|
}
|
|
12134
12274
|
),
|
|
12135
|
-
/* @__PURE__ */ (0,
|
|
12275
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12136
12276
|
ITButton,
|
|
12137
12277
|
{
|
|
12138
12278
|
variant: "outlined",
|
|
12139
12279
|
color: "danger",
|
|
12140
|
-
icon: /* @__PURE__ */ (0,
|
|
12280
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_md3.MdRefresh, { size: 14 }),
|
|
12141
12281
|
label: "Restaurar default",
|
|
12142
12282
|
onClick: resetTheme,
|
|
12143
12283
|
size: "sm"
|
|
12144
12284
|
}
|
|
12145
12285
|
)
|
|
12146
12286
|
] }),
|
|
12147
|
-
/* @__PURE__ */ (0,
|
|
12148
|
-
/* @__PURE__ */ (0,
|
|
12149
|
-
/* @__PURE__ */ (0,
|
|
12287
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ITDivider, { orientation: "vertical" }),
|
|
12288
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex-1 flex flex-col min-w-0", children: [
|
|
12289
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12150
12290
|
tabs_default,
|
|
12151
12291
|
{
|
|
12152
12292
|
variant: "pill",
|
|
@@ -12154,7 +12294,7 @@ function ITThemeProvider({
|
|
|
12154
12294
|
{
|
|
12155
12295
|
id: "brand",
|
|
12156
12296
|
label: "Marca",
|
|
12157
|
-
content: /* @__PURE__ */ (0,
|
|
12297
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12158
12298
|
"primary",
|
|
12159
12299
|
"secondary",
|
|
12160
12300
|
"ternary",
|
|
@@ -12163,35 +12303,35 @@ function ITThemeProvider({
|
|
|
12163
12303
|
"info",
|
|
12164
12304
|
"alert",
|
|
12165
12305
|
"warning"
|
|
12166
|
-
].map((key) => /* @__PURE__ */ (0,
|
|
12306
|
+
].map((key) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ColorRow, { colorKey: key }, key)) })
|
|
12167
12307
|
},
|
|
12168
12308
|
{
|
|
12169
12309
|
id: "layout",
|
|
12170
12310
|
label: "Nav & Sidebar",
|
|
12171
|
-
content: /* @__PURE__ */ (0,
|
|
12311
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12172
12312
|
"layout.sidebarBg",
|
|
12173
12313
|
"layout.sidebarText",
|
|
12174
12314
|
"layout.navbarBg",
|
|
12175
12315
|
"layout.navbarText"
|
|
12176
|
-
].map((key) => /* @__PURE__ */ (0,
|
|
12316
|
+
].map((key) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ColorRow, { colorKey: key }, key)) })
|
|
12177
12317
|
},
|
|
12178
12318
|
{
|
|
12179
12319
|
id: "tables",
|
|
12180
12320
|
label: "Tablas",
|
|
12181
|
-
content: /* @__PURE__ */ (0,
|
|
12321
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12182
12322
|
"table.headerBg",
|
|
12183
12323
|
"table.headerText",
|
|
12184
12324
|
"table.rowBg",
|
|
12185
12325
|
"table.rowText",
|
|
12186
12326
|
"table.rowHover"
|
|
12187
|
-
].map((key) => /* @__PURE__ */ (0,
|
|
12327
|
+
].map((key) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ColorRow, { colorKey: key }, key)) })
|
|
12188
12328
|
}
|
|
12189
12329
|
]
|
|
12190
12330
|
}
|
|
12191
12331
|
),
|
|
12192
|
-
/* @__PURE__ */ (0,
|
|
12193
|
-
/* @__PURE__ */ (0,
|
|
12194
|
-
/* @__PURE__ */ (0,
|
|
12332
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center justify-end gap-3 mt-auto pt-4 border-t border-slate-100 dark:border-slate-800", children: [
|
|
12333
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ITText, { as: "p", className: "text-[11px] text-slate-400 mr-auto", children: "Los cambios se guardan autom\xE1ticamente" }),
|
|
12334
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
12195
12335
|
ITButton,
|
|
12196
12336
|
{
|
|
12197
12337
|
label: "Cerrar",
|
|
@@ -12250,6 +12390,7 @@ var createValidationSchema = (fields) => Yup.object().shape(
|
|
|
12250
12390
|
ITGrid,
|
|
12251
12391
|
ITImage,
|
|
12252
12392
|
ITInput,
|
|
12393
|
+
ITInputNumber,
|
|
12253
12394
|
ITLayout,
|
|
12254
12395
|
ITLoader,
|
|
12255
12396
|
ITMaskedInput,
|