@axzydev/axzy_ui_system 1.3.5 → 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/dist/index.cjs +554 -505
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +107 -3
- package/dist/index.d.ts +107 -3
- package/dist/index.js +425 -377
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- 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/organisms/sidebar/sidebar.doc.mdx +12 -12
- package/src/index.ts +4 -2
- package/src/sandbox/navigation.ts +2 -0
- package/src/showcases/FormShowcases.tsx +287 -1
- package/src/showcases/StructureShowcases.tsx +2 -2
package/dist/index.js
CHANGED
|
@@ -2557,11 +2557,13 @@ function ITInput({
|
|
|
2557
2557
|
max,
|
|
2558
2558
|
readOnly = false,
|
|
2559
2559
|
focusContent,
|
|
2560
|
-
size = "md"
|
|
2560
|
+
size = "md",
|
|
2561
|
+
decimals
|
|
2561
2562
|
}) {
|
|
2562
2563
|
const isCheckboxOrRadio = type === "checkbox" || type === "radio";
|
|
2563
2564
|
const isNumberType = type === "number";
|
|
2564
2565
|
const isTextArea = type === "textarea";
|
|
2566
|
+
const decimalPlaces = decimals ?? (currencyFormat ? 2 : 0);
|
|
2565
2567
|
const [displayValue, setDisplayValue] = useState11("");
|
|
2566
2568
|
const [isFocused, setIsFocused] = useState11(false);
|
|
2567
2569
|
const [hasSelectedAll, setHasSelectedAll] = useState11(false);
|
|
@@ -2614,13 +2616,16 @@ function ITInput({
|
|
|
2614
2616
|
}
|
|
2615
2617
|
if (currencyFormat) {
|
|
2616
2618
|
return num.toLocaleString("es-MX", {
|
|
2617
|
-
minimumFractionDigits:
|
|
2618
|
-
maximumFractionDigits:
|
|
2619
|
+
minimumFractionDigits: decimalPlaces,
|
|
2620
|
+
maximumFractionDigits: decimalPlaces
|
|
2619
2621
|
});
|
|
2620
2622
|
}
|
|
2623
|
+
if (decimalPlaces > 0) {
|
|
2624
|
+
return num.toFixed(decimalPlaces);
|
|
2625
|
+
}
|
|
2621
2626
|
return num.toString();
|
|
2622
2627
|
},
|
|
2623
|
-
[currencyFormat]
|
|
2628
|
+
[currencyFormat, decimalPlaces]
|
|
2624
2629
|
);
|
|
2625
2630
|
const unformatValue = useCallback5(
|
|
2626
2631
|
(val) => {
|
|
@@ -2666,11 +2671,11 @@ function ITInput({
|
|
|
2666
2671
|
if (allowedKeys.includes(key) || ctrlKey || metaKey) {
|
|
2667
2672
|
return;
|
|
2668
2673
|
}
|
|
2669
|
-
if (
|
|
2674
|
+
if (decimalPlaces === 0 && (key === "." || key === ",")) {
|
|
2670
2675
|
e.preventDefault();
|
|
2671
2676
|
return;
|
|
2672
2677
|
}
|
|
2673
|
-
if (
|
|
2678
|
+
if (decimalPlaces > 0 && (key === "." || key === ",") && currentValue.includes(".")) {
|
|
2674
2679
|
const dotIndex = currentValue.indexOf(".");
|
|
2675
2680
|
const replacingDot = selectionStart !== null && selectionEnd !== null && selectionStart <= dotIndex && dotIndex < selectionEnd;
|
|
2676
2681
|
if (!replacingDot) {
|
|
@@ -2678,7 +2683,7 @@ function ITInput({
|
|
|
2678
2683
|
return;
|
|
2679
2684
|
}
|
|
2680
2685
|
}
|
|
2681
|
-
const allowedCharsRegex =
|
|
2686
|
+
const allowedCharsRegex = decimalPlaces > 0 ? /^[0-9.,]$/ : /^[0-9]$/;
|
|
2682
2687
|
if (key !== "Unidentified" && !allowedCharsRegex.test(key)) {
|
|
2683
2688
|
e.preventDefault();
|
|
2684
2689
|
return;
|
|
@@ -2696,7 +2701,7 @@ function ITInput({
|
|
|
2696
2701
|
if (readOnly) return;
|
|
2697
2702
|
let rawValue = e.target.value;
|
|
2698
2703
|
let cleanedValue = "";
|
|
2699
|
-
if (
|
|
2704
|
+
if (decimalPlaces > 0) {
|
|
2700
2705
|
if (rawValue.includes(",") && rawValue.includes(".")) {
|
|
2701
2706
|
rawValue = rawValue.replace(/,/g, "");
|
|
2702
2707
|
} else if (rawValue.includes(",")) {
|
|
@@ -2705,8 +2710,8 @@ function ITInput({
|
|
|
2705
2710
|
cleanedValue = rawValue.replace(/[^0-9.]/g, "");
|
|
2706
2711
|
const parts = cleanedValue.split(".");
|
|
2707
2712
|
if (parts.length > 1) {
|
|
2708
|
-
const
|
|
2709
|
-
cleanedValue = parts[0] + "." +
|
|
2713
|
+
const decimalPart = parts.slice(1).join("").substring(0, decimalPlaces);
|
|
2714
|
+
cleanedValue = parts[0] + "." + decimalPart;
|
|
2710
2715
|
}
|
|
2711
2716
|
} else {
|
|
2712
2717
|
cleanedValue = rawValue.replace(/[^0-9]/g, "");
|
|
@@ -2717,7 +2722,7 @@ function ITInput({
|
|
|
2717
2722
|
if (!formatNumber) {
|
|
2718
2723
|
valueToSend = cleanedValue;
|
|
2719
2724
|
} else if (cleanedValue !== "") {
|
|
2720
|
-
if (
|
|
2725
|
+
if (decimalPlaces > 0) {
|
|
2721
2726
|
const numericValue = parseFloat(cleanedValue);
|
|
2722
2727
|
if (!isNaN(numericValue)) {
|
|
2723
2728
|
valueToSend = cleanedValue;
|
|
@@ -2794,7 +2799,7 @@ function ITInput({
|
|
|
2794
2799
|
let numericValue = void 0;
|
|
2795
2800
|
let valueToSend = void 0;
|
|
2796
2801
|
let cleanedValue = "";
|
|
2797
|
-
if (
|
|
2802
|
+
if (decimalPlaces > 0) {
|
|
2798
2803
|
cleanedValue = currentValue.replace(/[^0-9.]/g, "");
|
|
2799
2804
|
const parts = cleanedValue.split(".");
|
|
2800
2805
|
if (parts.length > 2) {
|
|
@@ -2804,7 +2809,7 @@ function ITInput({
|
|
|
2804
2809
|
} else {
|
|
2805
2810
|
cleanedValue = currentValue.replace(/[^0-9]/g, "");
|
|
2806
2811
|
}
|
|
2807
|
-
const parsed =
|
|
2812
|
+
const parsed = decimalPlaces > 0 ? parseFloat(cleanedValue) : parseInt(cleanedValue, 10);
|
|
2808
2813
|
if (!isNaN(parsed)) {
|
|
2809
2814
|
numericValue = parsed;
|
|
2810
2815
|
if (min !== void 0 && numericValue < min) {
|
|
@@ -2837,7 +2842,7 @@ function ITInput({
|
|
|
2837
2842
|
}
|
|
2838
2843
|
onBlur?.(e);
|
|
2839
2844
|
};
|
|
2840
|
-
const currentLength = isNumberType ? (
|
|
2845
|
+
const currentLength = isNumberType ? (decimalPlaces > 0 ? displayValue.replace(/[.,]/g, "") : displayValue).length : typeof value === "string" ? value.length : String(value ?? "").length;
|
|
2841
2846
|
return /* @__PURE__ */ jsxs13("div", { className: clsx15("w-full", containerClassName), children: [
|
|
2842
2847
|
isCheckboxOrRadio ? (
|
|
2843
2848
|
// CHECKBOX / RADIO LAYOUT (Row)
|
|
@@ -2934,7 +2939,7 @@ function ITInput({
|
|
|
2934
2939
|
name,
|
|
2935
2940
|
id: name,
|
|
2936
2941
|
type: isNumberType ? "text" : type === "password" ? showPassword ? "text" : "password" : type,
|
|
2937
|
-
inputMode: isNumberType ?
|
|
2942
|
+
inputMode: isNumberType ? decimalPlaces > 0 ? "decimal" : "numeric" : void 0,
|
|
2938
2943
|
placeholder,
|
|
2939
2944
|
value: isNumberType ? displayValue : String(value ?? ""),
|
|
2940
2945
|
onChange: isNumberType ? handleNumberChange : handleTextChange,
|
|
@@ -2946,7 +2951,7 @@ function ITInput({
|
|
|
2946
2951
|
},
|
|
2947
2952
|
onKeyDown: isNumberType ? handleKeyDown : onKeyDown,
|
|
2948
2953
|
readOnly,
|
|
2949
|
-
maxLength: isNumberType &&
|
|
2954
|
+
maxLength: isNumberType && decimalPlaces === 0 ? maxLength : void 0,
|
|
2950
2955
|
minLength,
|
|
2951
2956
|
min,
|
|
2952
2957
|
max,
|
|
@@ -6198,10 +6203,52 @@ var ITImage = ({
|
|
|
6198
6203
|
};
|
|
6199
6204
|
var image_default = ITImage;
|
|
6200
6205
|
|
|
6206
|
+
// src/components/atoms/input-number/input-number.tsx
|
|
6207
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6208
|
+
function parseNumber(raw) {
|
|
6209
|
+
if (raw === void 0 || raw === null) return void 0;
|
|
6210
|
+
if (typeof raw === "number") return Number.isFinite(raw) ? raw : void 0;
|
|
6211
|
+
const cleaned = String(raw).replace(/,/g, "").trim();
|
|
6212
|
+
if (cleaned === "" || cleaned === "-" || cleaned === ".") return void 0;
|
|
6213
|
+
const parsed = Number(cleaned);
|
|
6214
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
6215
|
+
}
|
|
6216
|
+
function ITInputNumber({
|
|
6217
|
+
value,
|
|
6218
|
+
onChange,
|
|
6219
|
+
onBlur,
|
|
6220
|
+
decimals = 2,
|
|
6221
|
+
prefix,
|
|
6222
|
+
iconLeft,
|
|
6223
|
+
...rest
|
|
6224
|
+
}) {
|
|
6225
|
+
const resolvedIconLeft = iconLeft ?? (prefix ? /* @__PURE__ */ jsx36(ITText, { as: "span", className: "text-secondary-500 text-xs font-semibold", children: prefix }) : void 0);
|
|
6226
|
+
const handleChange = (event) => {
|
|
6227
|
+
onChange(parseNumber(event.target.value), event);
|
|
6228
|
+
};
|
|
6229
|
+
return /* @__PURE__ */ jsx36(
|
|
6230
|
+
ITInput,
|
|
6231
|
+
{
|
|
6232
|
+
...rest,
|
|
6233
|
+
type: "number",
|
|
6234
|
+
currencyFormat: true,
|
|
6235
|
+
formatNumber: true,
|
|
6236
|
+
decimals,
|
|
6237
|
+
iconLeft: resolvedIconLeft,
|
|
6238
|
+
value: value ?? "",
|
|
6239
|
+
onChange: handleChange,
|
|
6240
|
+
onBlur: (event) => {
|
|
6241
|
+
const input = event.target;
|
|
6242
|
+
onBlur?.(parseNumber(input.value), event);
|
|
6243
|
+
}
|
|
6244
|
+
}
|
|
6245
|
+
);
|
|
6246
|
+
}
|
|
6247
|
+
|
|
6201
6248
|
// src/components/organisms/navbar/navbar.tsx
|
|
6202
6249
|
import { useRef as useRef18, useState as useState24 } from "react";
|
|
6203
6250
|
import { FaChevronDown as FaChevronDown3, FaChevronRight as FaChevronRight4, FaUserCircle } from "react-icons/fa";
|
|
6204
|
-
import { jsx as
|
|
6251
|
+
import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6205
6252
|
function ITNavbar({
|
|
6206
6253
|
logo,
|
|
6207
6254
|
logoText,
|
|
@@ -6240,28 +6287,28 @@ function ITNavbar({
|
|
|
6240
6287
|
const shouldUseLegacy = !navigationItems.length && (navItems || sidebarItems);
|
|
6241
6288
|
if (shouldUseLegacy) {
|
|
6242
6289
|
return /* @__PURE__ */ jsxs28("div", { className: "flex flex-col h-screen", children: [
|
|
6243
|
-
/* @__PURE__ */
|
|
6290
|
+
/* @__PURE__ */ jsx37("nav", { className: "bg-white border-b border-secondary-200", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between mx-auto p-4", children: [
|
|
6244
6291
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
|
|
6245
|
-
logo && /* @__PURE__ */
|
|
6246
|
-
logoText && /* @__PURE__ */
|
|
6292
|
+
logo && /* @__PURE__ */ jsx37("div", { className: "h-8", children: logo }),
|
|
6293
|
+
logoText && /* @__PURE__ */ jsx37(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-secondary-900", children: logoText })
|
|
6247
6294
|
] }),
|
|
6248
|
-
/* @__PURE__ */
|
|
6249
|
-
/* @__PURE__ */
|
|
6295
|
+
/* @__PURE__ */ jsx37("div", { className: "flex items-center justify-end w-full md:w-auto md:order-2", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center space-x-4 md:order-2", children: [
|
|
6296
|
+
/* @__PURE__ */ jsx37("ul", { className: "hidden md:flex space-x-4", children: navItems }),
|
|
6250
6297
|
userMenu && /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
6251
|
-
/* @__PURE__ */
|
|
6298
|
+
/* @__PURE__ */ jsx37(
|
|
6252
6299
|
"button",
|
|
6253
6300
|
{
|
|
6254
6301
|
type: "button",
|
|
6255
6302
|
className: "flex text-sm bg-secondary-200 rounded-full md:me-0 focus:ring-4 focus:ring-secondary-300",
|
|
6256
6303
|
onClick: toggleUserMenu,
|
|
6257
|
-
children: userMenu.userImage ? /* @__PURE__ */
|
|
6304
|
+
children: userMenu.userImage ? /* @__PURE__ */ jsx37(
|
|
6258
6305
|
"img",
|
|
6259
6306
|
{
|
|
6260
6307
|
className: "w-8 h-8 rounded-full",
|
|
6261
6308
|
src: userMenu.userImage,
|
|
6262
6309
|
alt: "user photo"
|
|
6263
6310
|
}
|
|
6264
|
-
) : /* @__PURE__ */
|
|
6311
|
+
) : /* @__PURE__ */ jsx37(FaUserCircle, { className: "w-8 h-8 text-secondary-500" })
|
|
6265
6312
|
}
|
|
6266
6313
|
),
|
|
6267
6314
|
isUserMenuOpen && /* @__PURE__ */ jsxs28(
|
|
@@ -6271,10 +6318,10 @@ function ITNavbar({
|
|
|
6271
6318
|
className: "z-[70] absolute right-0 mt-2 text-base list-none bg-white divide-y divide-secondary-100 rounded-lg shadow-sm",
|
|
6272
6319
|
children: [
|
|
6273
6320
|
/* @__PURE__ */ jsxs28("div", { className: "px-4 py-3", children: [
|
|
6274
|
-
/* @__PURE__ */
|
|
6275
|
-
/* @__PURE__ */
|
|
6321
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm text-secondary-900", children: userMenu.userName }),
|
|
6322
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm text-secondary-500 truncate", children: userMenu.userEmail })
|
|
6276
6323
|
] }),
|
|
6277
|
-
/* @__PURE__ */
|
|
6324
|
+
/* @__PURE__ */ jsx37("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
6278
6325
|
"button",
|
|
6279
6326
|
{
|
|
6280
6327
|
onClick: () => {
|
|
@@ -6282,7 +6329,7 @@ function ITNavbar({
|
|
|
6282
6329
|
setIsUserMenuOpen(false);
|
|
6283
6330
|
},
|
|
6284
6331
|
className: "block px-4 py-2 text-sm text-secondary-700 hover:bg-secondary-100 w-full text-left",
|
|
6285
|
-
children: /* @__PURE__ */
|
|
6332
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: item.label })
|
|
6286
6333
|
}
|
|
6287
6334
|
) }, index)) })
|
|
6288
6335
|
]
|
|
@@ -6292,8 +6339,8 @@ function ITNavbar({
|
|
|
6292
6339
|
] }) })
|
|
6293
6340
|
] }) }),
|
|
6294
6341
|
/* @__PURE__ */ jsxs28("div", { className: "flex-1 flex overflow-hidden relative", children: [
|
|
6295
|
-
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */
|
|
6296
|
-
/* @__PURE__ */
|
|
6342
|
+
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */ jsx37("aside", { className: "fixed inset-y-0 left-0 w-64 bg-secondary-50 transform transition-transform duration-300 ease-in-out z-[40] shadow-lg md:static md:transform-none md:shadow-none md:border-r md:border-secondary-200", children: /* @__PURE__ */ jsx37("div", { className: "h-full overflow-y-auto py-4 px-3", children: /* @__PURE__ */ jsx37("ul", { className: "space-y-2 font-medium", children: sidebarItems }) }) }),
|
|
6343
|
+
/* @__PURE__ */ jsx37("main", { className: "flex-1 bg-secondary-100 overflow-y-auto", children })
|
|
6297
6344
|
] })
|
|
6298
6345
|
] });
|
|
6299
6346
|
}
|
|
@@ -6307,10 +6354,10 @@ function ITNavbar({
|
|
|
6307
6354
|
style: { backgroundColor: sidebar.backgroundColor, borderRight: `1px solid ${sidebar.borderColor}` },
|
|
6308
6355
|
children: [
|
|
6309
6356
|
/* @__PURE__ */ jsxs28("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: `1px solid ${sidebar.borderColor}` }, children: [
|
|
6310
|
-
logo && /* @__PURE__ */
|
|
6311
|
-
logoText && /* @__PURE__ */
|
|
6357
|
+
logo && /* @__PURE__ */ jsx37("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
|
|
6358
|
+
logoText && /* @__PURE__ */ jsx37(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: sidebar.active.color }, children: logoText })
|
|
6312
6359
|
] }),
|
|
6313
|
-
/* @__PURE__ */
|
|
6360
|
+
/* @__PURE__ */ jsx37("nav", { className: "flex-1 px-4 py-6 overflow-y-auto custom-scrollbar", children: /* @__PURE__ */ jsx37("ul", { className: "flex flex-col gap-1.5", children: navigationItems.map((item) => /* @__PURE__ */ jsxs28("li", { children: [
|
|
6314
6361
|
/* @__PURE__ */ jsxs28(
|
|
6315
6362
|
"div",
|
|
6316
6363
|
{
|
|
@@ -6335,16 +6382,16 @@ function ITNavbar({
|
|
|
6335
6382
|
},
|
|
6336
6383
|
children: [
|
|
6337
6384
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-3", children: [
|
|
6338
|
-
item.icon && /* @__PURE__ */
|
|
6385
|
+
item.icon && /* @__PURE__ */ jsx37("div", { className: "text-xl transition-colors", style: {
|
|
6339
6386
|
color: item.isActive ? sidebar.active.iconColor : sidebar.icon.color
|
|
6340
6387
|
}, children: item.icon }),
|
|
6341
|
-
/* @__PURE__ */
|
|
6388
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
|
|
6342
6389
|
] }),
|
|
6343
|
-
item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
6390
|
+
item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx37("div", { className: "transition-transform", style: { color: sidebar.icon.color }, children: expandedItems.has(item.id) ? /* @__PURE__ */ jsx37(FaChevronDown3, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx37(FaChevronRight4, { className: "w-3 h-3" }) })
|
|
6344
6391
|
]
|
|
6345
6392
|
}
|
|
6346
6393
|
),
|
|
6347
|
-
item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */
|
|
6394
|
+
item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */ jsx37("ul", { className: "mt-1 ml-4 pl-4 space-y-1", style: { borderLeft: `1px solid ${sidebar.borderColor}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
6348
6395
|
"button",
|
|
6349
6396
|
{
|
|
6350
6397
|
onClick: subitem.action,
|
|
@@ -6363,11 +6410,11 @@ function ITNavbar({
|
|
|
6363
6410
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
6364
6411
|
}
|
|
6365
6412
|
},
|
|
6366
|
-
children: /* @__PURE__ */
|
|
6413
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: subitem.label })
|
|
6367
6414
|
}
|
|
6368
6415
|
) }, subitem.id)) })
|
|
6369
6416
|
] }, item.id)) }) }),
|
|
6370
|
-
userMenu && /* @__PURE__ */
|
|
6417
|
+
userMenu && /* @__PURE__ */ jsx37("div", { className: "p-4", style: { borderTop: `1px solid ${sidebar.borderColor}` }, children: /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
6371
6418
|
/* @__PURE__ */ jsxs28(
|
|
6372
6419
|
"button",
|
|
6373
6420
|
{
|
|
@@ -6384,7 +6431,7 @@ function ITNavbar({
|
|
|
6384
6431
|
},
|
|
6385
6432
|
onClick: toggleUserMenu,
|
|
6386
6433
|
children: [
|
|
6387
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
6434
|
+
userMenu.userImage ? /* @__PURE__ */ jsx37(
|
|
6388
6435
|
"img",
|
|
6389
6436
|
{
|
|
6390
6437
|
className: "w-10 h-10 rounded-full border-2 transition-colors",
|
|
@@ -6392,19 +6439,19 @@ function ITNavbar({
|
|
|
6392
6439
|
alt: "user photo",
|
|
6393
6440
|
style: { borderColor: sidebar.borderColor }
|
|
6394
6441
|
}
|
|
6395
|
-
) : /* @__PURE__ */
|
|
6442
|
+
) : /* @__PURE__ */ jsx37(
|
|
6396
6443
|
"div",
|
|
6397
6444
|
{
|
|
6398
6445
|
className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors",
|
|
6399
6446
|
style: { backgroundColor: sidebar.hover.backgroundColor, color: sidebar.icon.color },
|
|
6400
|
-
children: /* @__PURE__ */
|
|
6447
|
+
children: /* @__PURE__ */ jsx37(FaUserCircle, { className: "w-6 h-6" })
|
|
6401
6448
|
}
|
|
6402
6449
|
),
|
|
6403
6450
|
/* @__PURE__ */ jsxs28("div", { className: "flex-1 text-left overflow-hidden", children: [
|
|
6404
|
-
/* @__PURE__ */
|
|
6405
|
-
/* @__PURE__ */
|
|
6451
|
+
/* @__PURE__ */ jsx37(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: sidebar.active.color }, children: userMenu.userName }),
|
|
6452
|
+
/* @__PURE__ */ jsx37(ITText, { as: "div", className: "text-xs truncate", style: { color: sidebar.label.color }, children: userMenu.userEmail })
|
|
6406
6453
|
] }),
|
|
6407
|
-
/* @__PURE__ */
|
|
6454
|
+
/* @__PURE__ */ jsx37(FaChevronRight4, { className: "w-3 h-3", style: { color: sidebar.icon.color } })
|
|
6408
6455
|
]
|
|
6409
6456
|
}
|
|
6410
6457
|
),
|
|
@@ -6416,10 +6463,10 @@ function ITNavbar({
|
|
|
6416
6463
|
style: { backgroundColor: topbar.userMenu.dropdown.backgroundColor, border: `1px solid ${topbar.userMenu.dropdown.borderColor}` },
|
|
6417
6464
|
children: [
|
|
6418
6465
|
/* @__PURE__ */ jsxs28("div", { className: "px-4 py-3", style: { backgroundColor: topbar.userMenu.backgroundColor, borderBottom: `1px solid ${topbar.userMenu.dropdown.borderColor}` }, children: [
|
|
6419
|
-
/* @__PURE__ */
|
|
6420
|
-
/* @__PURE__ */
|
|
6466
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: topbar.userMenu.textColor }, children: userMenu.userName }),
|
|
6467
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-xs truncate", style: { color: topbar.userMenu.subtitleColor }, children: userMenu.userEmail })
|
|
6421
6468
|
] }),
|
|
6422
|
-
/* @__PURE__ */
|
|
6469
|
+
/* @__PURE__ */ jsx37("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
6423
6470
|
"button",
|
|
6424
6471
|
{
|
|
6425
6472
|
onClick: () => {
|
|
@@ -6434,7 +6481,7 @@ function ITNavbar({
|
|
|
6434
6481
|
onMouseLeave: (e) => {
|
|
6435
6482
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
6436
6483
|
},
|
|
6437
|
-
children: /* @__PURE__ */
|
|
6484
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: item.label })
|
|
6438
6485
|
}
|
|
6439
6486
|
) }, index)) })
|
|
6440
6487
|
]
|
|
@@ -6444,7 +6491,7 @@ function ITNavbar({
|
|
|
6444
6491
|
]
|
|
6445
6492
|
}
|
|
6446
6493
|
),
|
|
6447
|
-
/* @__PURE__ */
|
|
6494
|
+
/* @__PURE__ */ jsx37("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: theme.layout.backgroundColor }, children })
|
|
6448
6495
|
] });
|
|
6449
6496
|
}
|
|
6450
6497
|
|
|
@@ -6453,7 +6500,7 @@ import clsx33 from "clsx";
|
|
|
6453
6500
|
|
|
6454
6501
|
// src/components/organisms/page-header/page-header.tsx
|
|
6455
6502
|
import { FaChevronLeft as FaChevronLeft3 } from "react-icons/fa";
|
|
6456
|
-
import { jsx as
|
|
6503
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6457
6504
|
function ITPageHeader({
|
|
6458
6505
|
title,
|
|
6459
6506
|
description,
|
|
@@ -6468,22 +6515,22 @@ function ITPageHeader({
|
|
|
6468
6515
|
return /* @__PURE__ */ jsxs29("div", { className: `${className} space-y-3`, children: [
|
|
6469
6516
|
showTopRow && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between gap-4", children: [
|
|
6470
6517
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
6471
|
-
backAction && /* @__PURE__ */
|
|
6518
|
+
backAction && /* @__PURE__ */ jsx38(
|
|
6472
6519
|
"button",
|
|
6473
6520
|
{
|
|
6474
6521
|
onClick: backAction,
|
|
6475
6522
|
className: "flex items-center justify-center w-9 h-9 rounded-full border border-slate-200 dark:border-slate-700 text-slate-400 hover:text-slate-700 dark:hover:text-slate-200 hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50 dark:hover:bg-slate-800/60 transition-all duration-200 flex-shrink-0",
|
|
6476
6523
|
"aria-label": "Volver",
|
|
6477
|
-
children: /* @__PURE__ */
|
|
6524
|
+
children: /* @__PURE__ */ jsx38(FaChevronLeft3, { size: 14 })
|
|
6478
6525
|
}
|
|
6479
6526
|
),
|
|
6480
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */
|
|
6527
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx38(ITBreadcrumbs, { items: breadcrumbs })
|
|
6481
6528
|
] }),
|
|
6482
|
-
actions && /* @__PURE__ */
|
|
6529
|
+
actions && /* @__PURE__ */ jsx38("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6483
6530
|
] }),
|
|
6484
6531
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-start justify-between gap-6", children: [
|
|
6485
6532
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-start gap-4 min-w-0", children: [
|
|
6486
|
-
icon && /* @__PURE__ */
|
|
6533
|
+
icon && /* @__PURE__ */ jsx38(
|
|
6487
6534
|
"div",
|
|
6488
6535
|
{
|
|
6489
6536
|
className: "flex items-center justify-center w-12 h-12 rounded-full border border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50 text-slate-600 dark:text-slate-300 flex-shrink-0 transition-all duration-200 hover:border-slate-300 dark:hover:border-slate-500 hover:shadow-sm",
|
|
@@ -6492,7 +6539,7 @@ function ITPageHeader({
|
|
|
6492
6539
|
}
|
|
6493
6540
|
),
|
|
6494
6541
|
/* @__PURE__ */ jsxs29("div", { className: "min-w-0", children: [
|
|
6495
|
-
/* @__PURE__ */
|
|
6542
|
+
/* @__PURE__ */ jsx38(
|
|
6496
6543
|
ITText,
|
|
6497
6544
|
{
|
|
6498
6545
|
as: "h1",
|
|
@@ -6500,7 +6547,7 @@ function ITPageHeader({
|
|
|
6500
6547
|
children: title
|
|
6501
6548
|
}
|
|
6502
6549
|
),
|
|
6503
|
-
description && /* @__PURE__ */
|
|
6550
|
+
description && /* @__PURE__ */ jsx38(
|
|
6504
6551
|
ITText,
|
|
6505
6552
|
{
|
|
6506
6553
|
as: "p",
|
|
@@ -6510,14 +6557,14 @@ function ITPageHeader({
|
|
|
6510
6557
|
)
|
|
6511
6558
|
] })
|
|
6512
6559
|
] }),
|
|
6513
|
-
!showTopRow && actions && /* @__PURE__ */
|
|
6560
|
+
!showTopRow && actions && /* @__PURE__ */ jsx38("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6514
6561
|
] })
|
|
6515
6562
|
] });
|
|
6516
6563
|
}
|
|
6517
6564
|
|
|
6518
6565
|
// src/components/atoms/skeleton/skeleton.tsx
|
|
6519
6566
|
import clsx31 from "clsx";
|
|
6520
|
-
import { Fragment as Fragment7, jsx as
|
|
6567
|
+
import { Fragment as Fragment7, jsx as jsx39 } from "react/jsx-runtime";
|
|
6521
6568
|
var variantClasses = {
|
|
6522
6569
|
text: "rounded-md h-4 w-full",
|
|
6523
6570
|
circular: "rounded-full",
|
|
@@ -6537,7 +6584,7 @@ function ITSkeleton({
|
|
|
6537
6584
|
...style
|
|
6538
6585
|
};
|
|
6539
6586
|
const items = Array.from({ length: count }, (_, i) => i);
|
|
6540
|
-
return /* @__PURE__ */
|
|
6587
|
+
return /* @__PURE__ */ jsx39(Fragment7, { children: items.map((i) => /* @__PURE__ */ jsx39(
|
|
6541
6588
|
"div",
|
|
6542
6589
|
{
|
|
6543
6590
|
className: clsx31(
|
|
@@ -6558,7 +6605,7 @@ function ITSkeleton({
|
|
|
6558
6605
|
// src/components/atoms/stack/stack.tsx
|
|
6559
6606
|
import clsx32 from "clsx";
|
|
6560
6607
|
import { Children, cloneElement, isValidElement, Fragment as Fragment8 } from "react";
|
|
6561
|
-
import { jsx as
|
|
6608
|
+
import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6562
6609
|
var directionMap2 = {
|
|
6563
6610
|
row: "flex-row",
|
|
6564
6611
|
column: "flex-col",
|
|
@@ -6603,7 +6650,7 @@ function ITStack({
|
|
|
6603
6650
|
gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
|
|
6604
6651
|
...style
|
|
6605
6652
|
};
|
|
6606
|
-
return /* @__PURE__ */
|
|
6653
|
+
return /* @__PURE__ */ jsx40(
|
|
6607
6654
|
Component,
|
|
6608
6655
|
{
|
|
6609
6656
|
className: clsx32(
|
|
@@ -6624,11 +6671,11 @@ function ITStack({
|
|
|
6624
6671
|
}
|
|
6625
6672
|
|
|
6626
6673
|
// src/components/templates/page/page.tsx
|
|
6627
|
-
import { jsx as
|
|
6674
|
+
import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6628
6675
|
var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction || props.icon);
|
|
6629
6676
|
var renderHeader = (props) => {
|
|
6630
6677
|
if (!hasHeader(props)) return null;
|
|
6631
|
-
return /* @__PURE__ */
|
|
6678
|
+
return /* @__PURE__ */ jsx41(
|
|
6632
6679
|
ITPageHeader,
|
|
6633
6680
|
{
|
|
6634
6681
|
title: props.title || "",
|
|
@@ -6670,21 +6717,21 @@ function ITPage(props) {
|
|
|
6670
6717
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6671
6718
|
renderHeader(props),
|
|
6672
6719
|
/* @__PURE__ */ jsxs31(ITStack, { spacing: 6, children: [
|
|
6673
|
-
/* @__PURE__ */
|
|
6674
|
-
/* @__PURE__ */
|
|
6675
|
-
/* @__PURE__ */
|
|
6720
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 40, width: "40%", className: "rounded-lg" }),
|
|
6721
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" }),
|
|
6722
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" })
|
|
6676
6723
|
] })
|
|
6677
6724
|
] });
|
|
6678
6725
|
}
|
|
6679
6726
|
if (error) {
|
|
6680
6727
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6681
6728
|
renderHeader(props),
|
|
6682
|
-
/* @__PURE__ */
|
|
6729
|
+
/* @__PURE__ */ jsx41(
|
|
6683
6730
|
ITEmptyState,
|
|
6684
6731
|
{
|
|
6685
6732
|
title: errorTitle || "Error",
|
|
6686
6733
|
description: error,
|
|
6687
|
-
action: onRetry ? /* @__PURE__ */
|
|
6734
|
+
action: onRetry ? /* @__PURE__ */ jsx41(
|
|
6688
6735
|
ITButton,
|
|
6689
6736
|
{
|
|
6690
6737
|
label: errorActionLabel || "Reintentar",
|
|
@@ -6699,7 +6746,7 @@ function ITPage(props) {
|
|
|
6699
6746
|
if (empty) {
|
|
6700
6747
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6701
6748
|
renderHeader(props),
|
|
6702
|
-
/* @__PURE__ */
|
|
6749
|
+
/* @__PURE__ */ jsx41(
|
|
6703
6750
|
ITEmptyState,
|
|
6704
6751
|
{
|
|
6705
6752
|
title: emptyTitle || "Sin datos",
|
|
@@ -6718,7 +6765,7 @@ function ITPage(props) {
|
|
|
6718
6765
|
// src/components/atoms/popover/popover.tsx
|
|
6719
6766
|
import { useState as useState25, useRef as useRef19 } from "react";
|
|
6720
6767
|
import clsx34 from "clsx";
|
|
6721
|
-
import { jsx as
|
|
6768
|
+
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6722
6769
|
var positionClasses = {
|
|
6723
6770
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
6724
6771
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -6742,14 +6789,14 @@ function ITPopover({
|
|
|
6742
6789
|
else setInternalOpen(false);
|
|
6743
6790
|
});
|
|
6744
6791
|
return /* @__PURE__ */ jsxs32("div", { ref, className: clsx34("relative inline-flex", className), children: [
|
|
6745
|
-
/* @__PURE__ */
|
|
6746
|
-
open && /* @__PURE__ */
|
|
6792
|
+
/* @__PURE__ */ jsx42("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
|
|
6793
|
+
open && /* @__PURE__ */ jsx42("div", { className: clsx34("absolute z-[70]", positionClasses[position]), children: /* @__PURE__ */ jsx42("div", { className: "bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 p-3 min-w-[160px]", children }) })
|
|
6747
6794
|
] });
|
|
6748
6795
|
}
|
|
6749
6796
|
|
|
6750
6797
|
// src/components/atoms/progress/progress.tsx
|
|
6751
6798
|
import clsx35 from "clsx";
|
|
6752
|
-
import { jsx as
|
|
6799
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
6753
6800
|
var colorMap = {
|
|
6754
6801
|
primary: "bg-primary-500",
|
|
6755
6802
|
secondary: "bg-secondary-500",
|
|
@@ -6776,7 +6823,7 @@ function ITProgress({
|
|
|
6776
6823
|
style
|
|
6777
6824
|
}) {
|
|
6778
6825
|
const pct = Math.min(Math.max(value / max * 100, 0), 100);
|
|
6779
|
-
return /* @__PURE__ */
|
|
6826
|
+
return /* @__PURE__ */ jsx43(
|
|
6780
6827
|
"div",
|
|
6781
6828
|
{
|
|
6782
6829
|
className: clsx35("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap2[size], className),
|
|
@@ -6784,7 +6831,7 @@ function ITProgress({
|
|
|
6784
6831
|
role: "progressbar",
|
|
6785
6832
|
"aria-valuenow": variant === "determinate" ? value : void 0,
|
|
6786
6833
|
"aria-valuemax": max,
|
|
6787
|
-
children: /* @__PURE__ */
|
|
6834
|
+
children: /* @__PURE__ */ jsx43(
|
|
6788
6835
|
"div",
|
|
6789
6836
|
{
|
|
6790
6837
|
className: clsx35(
|
|
@@ -6801,7 +6848,7 @@ function ITProgress({
|
|
|
6801
6848
|
|
|
6802
6849
|
// src/components/atoms/radio/radio.tsx
|
|
6803
6850
|
import clsx36 from "clsx";
|
|
6804
|
-
import { jsx as
|
|
6851
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6805
6852
|
function ITRadioGroup({
|
|
6806
6853
|
name,
|
|
6807
6854
|
value,
|
|
@@ -6811,7 +6858,7 @@ function ITRadioGroup({
|
|
|
6811
6858
|
direction = "column",
|
|
6812
6859
|
className
|
|
6813
6860
|
}) {
|
|
6814
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ jsx44(
|
|
6815
6862
|
"div",
|
|
6816
6863
|
{
|
|
6817
6864
|
className: clsx36(
|
|
@@ -6829,7 +6876,7 @@ function ITRadioGroup({
|
|
|
6829
6876
|
disabled && "opacity-50 cursor-not-allowed"
|
|
6830
6877
|
),
|
|
6831
6878
|
children: [
|
|
6832
|
-
/* @__PURE__ */
|
|
6879
|
+
/* @__PURE__ */ jsx44(
|
|
6833
6880
|
"input",
|
|
6834
6881
|
{
|
|
6835
6882
|
type: "radio",
|
|
@@ -6841,7 +6888,7 @@ function ITRadioGroup({
|
|
|
6841
6888
|
className: "peer sr-only"
|
|
6842
6889
|
}
|
|
6843
6890
|
),
|
|
6844
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ jsx44(
|
|
6845
6892
|
"div",
|
|
6846
6893
|
{
|
|
6847
6894
|
className: clsx36(
|
|
@@ -6849,10 +6896,10 @@ function ITRadioGroup({
|
|
|
6849
6896
|
isSelected ? "border-primary-500" : "border-slate-300 dark:border-slate-600",
|
|
6850
6897
|
!disabled && "peer-focus:ring-2 peer-focus:ring-primary-200"
|
|
6851
6898
|
),
|
|
6852
|
-
children: isSelected && /* @__PURE__ */
|
|
6899
|
+
children: isSelected && /* @__PURE__ */ jsx44("div", { className: "w-2 h-2 rounded-full bg-primary-500" })
|
|
6853
6900
|
}
|
|
6854
6901
|
),
|
|
6855
|
-
/* @__PURE__ */
|
|
6902
|
+
/* @__PURE__ */ jsx44(ITText, { as: "span", className: "text-sm text-slate-700 dark:text-slate-300", children: opt.label })
|
|
6856
6903
|
]
|
|
6857
6904
|
},
|
|
6858
6905
|
opt.value
|
|
@@ -6868,7 +6915,7 @@ import { useState as useState26 } from "react";
|
|
|
6868
6915
|
|
|
6869
6916
|
// src/components/organisms/searchTable/components/SearchInput.tsx
|
|
6870
6917
|
import { FaSearch as FaSearch3 } from "react-icons/fa";
|
|
6871
|
-
import { jsx as
|
|
6918
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6872
6919
|
function SearchInput({
|
|
6873
6920
|
placeholder = "Buscar en todos los campos...",
|
|
6874
6921
|
value,
|
|
@@ -6876,8 +6923,8 @@ function SearchInput({
|
|
|
6876
6923
|
className = ""
|
|
6877
6924
|
}) {
|
|
6878
6925
|
return /* @__PURE__ */ jsxs34("div", { className: `relative flex-1 ${className}`, children: [
|
|
6879
|
-
/* @__PURE__ */
|
|
6880
|
-
/* @__PURE__ */
|
|
6926
|
+
/* @__PURE__ */ jsx45("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx45(FaSearch3, { className: "h-5 w-5 text-secondary-400" }) }),
|
|
6927
|
+
/* @__PURE__ */ jsx45(
|
|
6881
6928
|
ITInput,
|
|
6882
6929
|
{
|
|
6883
6930
|
name: "global-search",
|
|
@@ -6894,7 +6941,7 @@ function SearchInput({
|
|
|
6894
6941
|
|
|
6895
6942
|
// src/components/organisms/searchTable/components/SortButton.tsx
|
|
6896
6943
|
import { FaSort, FaSortUp, FaSortDown } from "react-icons/fa";
|
|
6897
|
-
import { jsx as
|
|
6944
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6898
6945
|
function SortButton({
|
|
6899
6946
|
sortConfig,
|
|
6900
6947
|
onClick,
|
|
@@ -6908,15 +6955,15 @@ function SortButton({
|
|
|
6908
6955
|
"aria-label": `Ordenar tabla ${sortConfig ? sortConfig.direction === "asc" ? "descendente" : "ascendente" : "ascendente"}`,
|
|
6909
6956
|
title: "Ordenar tabla",
|
|
6910
6957
|
children: [
|
|
6911
|
-
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */
|
|
6912
|
-
/* @__PURE__ */
|
|
6958
|
+
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */ jsx46(FaSortUp, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ jsx46(FaSortDown, { className: "w-4 h-4 text-slate-500" }) : /* @__PURE__ */ jsx46(FaSort, { className: "w-4 h-4 text-secondary-500" }),
|
|
6959
|
+
/* @__PURE__ */ jsx46(ITText, { as: "span", className: "text-sm font-medium text-secondary-700", children: sortConfig ? sortConfig.direction === "asc" ? "Asc \u2191" : "Desc \u2193" : "Ordenar" })
|
|
6913
6960
|
]
|
|
6914
6961
|
}
|
|
6915
6962
|
);
|
|
6916
6963
|
}
|
|
6917
6964
|
|
|
6918
6965
|
// src/components/organisms/searchTable/components/SearchAndSortBar.tsx
|
|
6919
|
-
import { jsx as
|
|
6966
|
+
import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6920
6967
|
function SearchAndSortBar({
|
|
6921
6968
|
searchTerm,
|
|
6922
6969
|
onSearchChange,
|
|
@@ -6925,8 +6972,8 @@ function SearchAndSortBar({
|
|
|
6925
6972
|
sortConfig,
|
|
6926
6973
|
searchInputPlaceholder = "Buscar en todos los campos..."
|
|
6927
6974
|
}) {
|
|
6928
|
-
return /* @__PURE__ */
|
|
6929
|
-
/* @__PURE__ */
|
|
6975
|
+
return /* @__PURE__ */ jsx47("div", { className: "bg-secondary-50 px-6 py-4 border-b border-secondary-200", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-4", children: [
|
|
6976
|
+
/* @__PURE__ */ jsx47(
|
|
6930
6977
|
SearchInput,
|
|
6931
6978
|
{
|
|
6932
6979
|
placeholder: searchInputPlaceholder,
|
|
@@ -6934,8 +6981,8 @@ function SearchAndSortBar({
|
|
|
6934
6981
|
onChange: onSearchChange
|
|
6935
6982
|
}
|
|
6936
6983
|
),
|
|
6937
|
-
/* @__PURE__ */
|
|
6938
|
-
searchTerm && /* @__PURE__ */
|
|
6984
|
+
/* @__PURE__ */ jsx47(SortButton, { sortConfig, onClick: onGlobalSort }),
|
|
6985
|
+
searchTerm && /* @__PURE__ */ jsx47(
|
|
6939
6986
|
ITButton,
|
|
6940
6987
|
{
|
|
6941
6988
|
size: "sm",
|
|
@@ -6944,14 +6991,14 @@ function SearchAndSortBar({
|
|
|
6944
6991
|
onClick: onClearSearch,
|
|
6945
6992
|
ariaLabel: "Limpiar b\xFAsqueda",
|
|
6946
6993
|
title: "Limpiar b\xFAsqueda",
|
|
6947
|
-
children: /* @__PURE__ */
|
|
6994
|
+
children: /* @__PURE__ */ jsx47(ITText, { as: "span", children: "Limpiar" })
|
|
6948
6995
|
}
|
|
6949
6996
|
)
|
|
6950
6997
|
] }) });
|
|
6951
6998
|
}
|
|
6952
6999
|
|
|
6953
7000
|
// src/components/organisms/searchTable/components/TableHeaderCell.tsx
|
|
6954
|
-
import { jsx as
|
|
7001
|
+
import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6955
7002
|
function TableHeaderCell({
|
|
6956
7003
|
label,
|
|
6957
7004
|
sortable = false,
|
|
@@ -6959,8 +7006,8 @@ function TableHeaderCell({
|
|
|
6959
7006
|
sortConfig,
|
|
6960
7007
|
className = ""
|
|
6961
7008
|
}) {
|
|
6962
|
-
return /* @__PURE__ */
|
|
6963
|
-
/* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ jsx48("th", { className, children: /* @__PURE__ */ jsx48("div", { className: "flex flex-col items-center gap-2 w-full", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-center gap-2 w-full", children: [
|
|
7010
|
+
/* @__PURE__ */ jsx48(
|
|
6964
7011
|
ITText,
|
|
6965
7012
|
{
|
|
6966
7013
|
as: "span",
|
|
@@ -6974,18 +7021,18 @@ function TableHeaderCell({
|
|
|
6974
7021
|
children: label
|
|
6975
7022
|
}
|
|
6976
7023
|
),
|
|
6977
|
-
sortable && /* @__PURE__ */
|
|
7024
|
+
sortable && /* @__PURE__ */ jsx48(SortButton, { sortConfig, onClick: onSort })
|
|
6978
7025
|
] }) }) });
|
|
6979
7026
|
}
|
|
6980
7027
|
|
|
6981
7028
|
// src/components/organisms/searchTable/components/TableHeader.tsx
|
|
6982
|
-
import { jsx as
|
|
7029
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
6983
7030
|
function TableHeader({
|
|
6984
7031
|
columns,
|
|
6985
7032
|
onSort,
|
|
6986
7033
|
sortConfig
|
|
6987
7034
|
}) {
|
|
6988
|
-
return /* @__PURE__ */
|
|
7035
|
+
return /* @__PURE__ */ jsx49("thead", { children: /* @__PURE__ */ jsx49("tr", { className: "bg-white border-b border-secondary-200", children: columns.map((col) => /* @__PURE__ */ jsx49(
|
|
6989
7036
|
TableHeaderCell,
|
|
6990
7037
|
{
|
|
6991
7038
|
label: col.label,
|
|
@@ -7003,7 +7050,7 @@ import clsx37 from "clsx";
|
|
|
7003
7050
|
import { FaCheck as FaCheck3, FaTimes as FaTimes8 } from "react-icons/fa";
|
|
7004
7051
|
|
|
7005
7052
|
// src/components/organisms/searchTable/components/EditableCell.tsx
|
|
7006
|
-
import { jsx as
|
|
7053
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7007
7054
|
function EditableCell({
|
|
7008
7055
|
column,
|
|
7009
7056
|
value,
|
|
@@ -7032,7 +7079,7 @@ function EditableCell({
|
|
|
7032
7079
|
onChange(value, errorMsg);
|
|
7033
7080
|
};
|
|
7034
7081
|
const renderITInput = (type) => {
|
|
7035
|
-
return /* @__PURE__ */
|
|
7082
|
+
return /* @__PURE__ */ jsx50(
|
|
7036
7083
|
ITInput,
|
|
7037
7084
|
{
|
|
7038
7085
|
type,
|
|
@@ -7046,7 +7093,7 @@ function EditableCell({
|
|
|
7046
7093
|
);
|
|
7047
7094
|
};
|
|
7048
7095
|
const renderITDatePicker = () => {
|
|
7049
|
-
return /* @__PURE__ */
|
|
7096
|
+
return /* @__PURE__ */ jsx50(
|
|
7050
7097
|
ITDatePicker,
|
|
7051
7098
|
{
|
|
7052
7099
|
name: column.key,
|
|
@@ -7059,7 +7106,7 @@ function EditableCell({
|
|
|
7059
7106
|
);
|
|
7060
7107
|
};
|
|
7061
7108
|
const renderITSelect = (options) => {
|
|
7062
|
-
return /* @__PURE__ */
|
|
7109
|
+
return /* @__PURE__ */ jsx50(
|
|
7063
7110
|
ITSelect,
|
|
7064
7111
|
{
|
|
7065
7112
|
name: column.key,
|
|
@@ -7073,7 +7120,7 @@ function EditableCell({
|
|
|
7073
7120
|
);
|
|
7074
7121
|
};
|
|
7075
7122
|
const renderBooleanInput = () => {
|
|
7076
|
-
return /* @__PURE__ */
|
|
7123
|
+
return /* @__PURE__ */ jsx50(
|
|
7077
7124
|
ITInput,
|
|
7078
7125
|
{
|
|
7079
7126
|
type: "checkbox",
|
|
@@ -7116,12 +7163,12 @@ function EditableCell({
|
|
|
7116
7163
|
};
|
|
7117
7164
|
return /* @__PURE__ */ jsxs38("div", { className: "w-full", children: [
|
|
7118
7165
|
renderInput(),
|
|
7119
|
-
error && /* @__PURE__ */
|
|
7166
|
+
error && /* @__PURE__ */ jsx50("div", { className: "text-danger-500 text-xs mt-1", children: /* @__PURE__ */ jsx50(ITText, { as: "span", children: error }) })
|
|
7120
7167
|
] });
|
|
7121
7168
|
}
|
|
7122
7169
|
|
|
7123
7170
|
// src/components/organisms/searchTable/components/TableRow.tsx
|
|
7124
|
-
import { jsx as
|
|
7171
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
7125
7172
|
function TableRow({
|
|
7126
7173
|
row,
|
|
7127
7174
|
rowIndex,
|
|
@@ -7154,14 +7201,14 @@ function TableRow({
|
|
|
7154
7201
|
case "number":
|
|
7155
7202
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
7156
7203
|
case "boolean":
|
|
7157
|
-
return value ? /* @__PURE__ */
|
|
7204
|
+
return value ? /* @__PURE__ */ jsx51(
|
|
7158
7205
|
FaCheck3,
|
|
7159
7206
|
{
|
|
7160
7207
|
className: "text-green-500",
|
|
7161
7208
|
"aria-label": "Verdadero",
|
|
7162
7209
|
title: "Verdadero"
|
|
7163
7210
|
}
|
|
7164
|
-
) : /* @__PURE__ */
|
|
7211
|
+
) : /* @__PURE__ */ jsx51(FaTimes8, { className: "text-danger-500", "aria-label": "Falso", title: "Falso" });
|
|
7165
7212
|
case "actions":
|
|
7166
7213
|
if (isEditing && col.saveActions) {
|
|
7167
7214
|
return col.saveActions(rowData, {
|
|
@@ -7185,19 +7232,19 @@ function TableRow({
|
|
|
7185
7232
|
return value;
|
|
7186
7233
|
}
|
|
7187
7234
|
};
|
|
7188
|
-
return /* @__PURE__ */
|
|
7235
|
+
return /* @__PURE__ */ jsx51(
|
|
7189
7236
|
"tr",
|
|
7190
7237
|
{
|
|
7191
7238
|
onMouseEnter: () => setIsHovered(true),
|
|
7192
7239
|
onMouseLeave: () => setIsHovered(false),
|
|
7193
7240
|
className: `border-b border-secondary-200 transition-colors duration-150 ${isEditing ? "bg-slate-50" : rowIndex % 2 === 0 ? "bg-white" : "bg-secondary-50"} ${isHovered && !isEditing ? "bg-secondary-100" : ""}`,
|
|
7194
|
-
children: columns.map((col) => /* @__PURE__ */
|
|
7241
|
+
children: columns.map((col) => /* @__PURE__ */ jsx51(
|
|
7195
7242
|
"td",
|
|
7196
7243
|
{
|
|
7197
7244
|
className: clsx37("pl-5 py-2", col.className, {
|
|
7198
7245
|
"text-center": col.type === "actions" || col.type === "boolean"
|
|
7199
7246
|
}),
|
|
7200
|
-
children: isEditing && col.editable ? /* @__PURE__ */
|
|
7247
|
+
children: isEditing && col.editable ? /* @__PURE__ */ jsx51(
|
|
7201
7248
|
EditableCell,
|
|
7202
7249
|
{
|
|
7203
7250
|
column: col,
|
|
@@ -7206,7 +7253,7 @@ function TableRow({
|
|
|
7206
7253
|
error: errors[col.key],
|
|
7207
7254
|
row: editedRow
|
|
7208
7255
|
}
|
|
7209
|
-
) : /* @__PURE__ */
|
|
7256
|
+
) : /* @__PURE__ */ jsx51(
|
|
7210
7257
|
"div",
|
|
7211
7258
|
{
|
|
7212
7259
|
className: clsx37({
|
|
@@ -7226,12 +7273,12 @@ function TableRow({
|
|
|
7226
7273
|
}
|
|
7227
7274
|
|
|
7228
7275
|
// src/components/organisms/searchTable/components/TableEmptyState.tsx
|
|
7229
|
-
import { jsx as
|
|
7276
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
7230
7277
|
function TableEmptyState({
|
|
7231
7278
|
colSpan,
|
|
7232
7279
|
searchTerm
|
|
7233
7280
|
}) {
|
|
7234
|
-
return /* @__PURE__ */
|
|
7281
|
+
return /* @__PURE__ */ jsx52("tr", { children: /* @__PURE__ */ jsx52("td", { colSpan, className: "px-6 py-4 text-center", children: searchTerm ? /* @__PURE__ */ jsx52(ITText, { as: "span", children: "No se encontraron resultados para tu b\xFAsqueda" }) : /* @__PURE__ */ jsx52(ITText, { as: "span", children: "No se encontraron resultados" }) }) });
|
|
7235
7282
|
}
|
|
7236
7283
|
|
|
7237
7284
|
// src/components/organisms/searchTable/components/PaginationControls.tsx
|
|
@@ -7254,7 +7301,7 @@ function PaginationInfo({
|
|
|
7254
7301
|
}
|
|
7255
7302
|
|
|
7256
7303
|
// src/components/organisms/searchTable/components/PaginationControls.tsx
|
|
7257
|
-
import { jsx as
|
|
7304
|
+
import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7258
7305
|
function PaginationControls({
|
|
7259
7306
|
pageIndex,
|
|
7260
7307
|
totalPages,
|
|
@@ -7269,10 +7316,10 @@ function PaginationControls({
|
|
|
7269
7316
|
}) {
|
|
7270
7317
|
return /* @__PURE__ */ jsxs40("div", { className: "flex flex-col sm:flex-row justify-between items-center gap-4", children: [
|
|
7271
7318
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-4", children: [
|
|
7272
|
-
/* @__PURE__ */
|
|
7319
|
+
/* @__PURE__ */ jsx53(PaginationInfo, { currentCount, totalCount }),
|
|
7273
7320
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-2", children: [
|
|
7274
|
-
/* @__PURE__ */
|
|
7275
|
-
/* @__PURE__ */
|
|
7321
|
+
/* @__PURE__ */ jsx53(ITText, { as: "span", className: "text-sm text-secondary-700", children: "Mostrar:" }),
|
|
7322
|
+
/* @__PURE__ */ jsx53(
|
|
7276
7323
|
ITSelect,
|
|
7277
7324
|
{
|
|
7278
7325
|
name: "itemsPerPage",
|
|
@@ -7291,7 +7338,7 @@ function PaginationControls({
|
|
|
7291
7338
|
] })
|
|
7292
7339
|
] }),
|
|
7293
7340
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-2", children: [
|
|
7294
|
-
/* @__PURE__ */
|
|
7341
|
+
/* @__PURE__ */ jsx53(
|
|
7295
7342
|
ITButton,
|
|
7296
7343
|
{
|
|
7297
7344
|
color: "secondary",
|
|
@@ -7301,7 +7348,7 @@ function PaginationControls({
|
|
|
7301
7348
|
className: "min-w-[32px]",
|
|
7302
7349
|
ariaLabel: "P\xE1gina anterior",
|
|
7303
7350
|
title: "Ir a la p\xE1gina anterior",
|
|
7304
|
-
children: /* @__PURE__ */
|
|
7351
|
+
children: /* @__PURE__ */ jsx53(FaArrowLeft, { "aria-hidden": "true" })
|
|
7305
7352
|
}
|
|
7306
7353
|
),
|
|
7307
7354
|
/* @__PURE__ */ jsxs40(ITText, { as: "span", className: "px-4 py-2 text-sm text-secondary-700", "aria-live": "polite", children: [
|
|
@@ -7310,7 +7357,7 @@ function PaginationControls({
|
|
|
7310
7357
|
" de ",
|
|
7311
7358
|
totalPages
|
|
7312
7359
|
] }),
|
|
7313
|
-
/* @__PURE__ */
|
|
7360
|
+
/* @__PURE__ */ jsx53(
|
|
7314
7361
|
ITButton,
|
|
7315
7362
|
{
|
|
7316
7363
|
size: "sm",
|
|
@@ -7320,7 +7367,7 @@ function PaginationControls({
|
|
|
7320
7367
|
className: "min-w-[32px]",
|
|
7321
7368
|
ariaLabel: "P\xE1gina siguiente",
|
|
7322
7369
|
title: "Ir a la p\xE1gina siguiente",
|
|
7323
|
-
children: /* @__PURE__ */
|
|
7370
|
+
children: /* @__PURE__ */ jsx53(FaArrowRight, { "aria-hidden": "true" })
|
|
7324
7371
|
}
|
|
7325
7372
|
)
|
|
7326
7373
|
] })
|
|
@@ -7328,7 +7375,7 @@ function PaginationControls({
|
|
|
7328
7375
|
}
|
|
7329
7376
|
|
|
7330
7377
|
// src/components/organisms/searchTable/searchTable.tsx
|
|
7331
|
-
import { jsx as
|
|
7378
|
+
import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7332
7379
|
function ITSearchTable({
|
|
7333
7380
|
columns,
|
|
7334
7381
|
data,
|
|
@@ -7395,9 +7442,9 @@ function ITSearchTable({
|
|
|
7395
7442
|
};
|
|
7396
7443
|
return /* @__PURE__ */ jsxs41("div", { className: clsx38("space-y-4 w-full", containerClassName), children: [
|
|
7397
7444
|
/* @__PURE__ */ jsxs41("div", { className: "shadow-md sm:rounded-lg overflow-hidden", children: [
|
|
7398
|
-
title && /* @__PURE__ */
|
|
7445
|
+
title && /* @__PURE__ */ jsx54("div", { className: "bg-teal-500 text-white px-6 py-4", children: /* @__PURE__ */ jsx54(ITText, { as: "h2", className: "text-xl font-bold text-center whitespace-nowrap", children: title }) }),
|
|
7399
7446
|
/* @__PURE__ */ jsxs41("div", { className: "bg-white", children: [
|
|
7400
|
-
/* @__PURE__ */
|
|
7447
|
+
/* @__PURE__ */ jsx54("div", { className: "p-4 border-b border-secondary-200", children: /* @__PURE__ */ jsx54(
|
|
7401
7448
|
SearchAndSortBar,
|
|
7402
7449
|
{
|
|
7403
7450
|
searchTerm,
|
|
@@ -7408,7 +7455,7 @@ function ITSearchTable({
|
|
|
7408
7455
|
searchInputPlaceholder
|
|
7409
7456
|
}
|
|
7410
7457
|
) }),
|
|
7411
|
-
/* @__PURE__ */
|
|
7458
|
+
/* @__PURE__ */ jsx54("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs41(
|
|
7412
7459
|
"table",
|
|
7413
7460
|
{
|
|
7414
7461
|
className: clsx38(
|
|
@@ -7417,7 +7464,7 @@ function ITSearchTable({
|
|
|
7417
7464
|
sizeStyles[size]
|
|
7418
7465
|
),
|
|
7419
7466
|
children: [
|
|
7420
|
-
/* @__PURE__ */
|
|
7467
|
+
/* @__PURE__ */ jsx54(
|
|
7421
7468
|
TableHeader,
|
|
7422
7469
|
{
|
|
7423
7470
|
columns,
|
|
@@ -7425,7 +7472,7 @@ function ITSearchTable({
|
|
|
7425
7472
|
sortConfig
|
|
7426
7473
|
}
|
|
7427
7474
|
),
|
|
7428
|
-
/* @__PURE__ */
|
|
7475
|
+
/* @__PURE__ */ jsx54("tbody", { children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ jsx54(
|
|
7429
7476
|
TableRow,
|
|
7430
7477
|
{
|
|
7431
7478
|
row,
|
|
@@ -7439,7 +7486,7 @@ function ITSearchTable({
|
|
|
7439
7486
|
onCancel: handleCancelEdit
|
|
7440
7487
|
},
|
|
7441
7488
|
rowIndex
|
|
7442
|
-
)) : /* @__PURE__ */
|
|
7489
|
+
)) : /* @__PURE__ */ jsx54(
|
|
7443
7490
|
TableEmptyState,
|
|
7444
7491
|
{
|
|
7445
7492
|
colSpan: columns.length + 1,
|
|
@@ -7451,7 +7498,7 @@ function ITSearchTable({
|
|
|
7451
7498
|
) })
|
|
7452
7499
|
] })
|
|
7453
7500
|
] }),
|
|
7454
|
-
/* @__PURE__ */
|
|
7501
|
+
/* @__PURE__ */ jsx54(
|
|
7455
7502
|
PaginationControls,
|
|
7456
7503
|
{
|
|
7457
7504
|
pageIndex,
|
|
@@ -7471,7 +7518,7 @@ function ITSearchTable({
|
|
|
7471
7518
|
|
|
7472
7519
|
// src/components/atoms/segmented-control/segmented-control.tsx
|
|
7473
7520
|
import clsx39 from "clsx";
|
|
7474
|
-
import { jsx as
|
|
7521
|
+
import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
7475
7522
|
var sizeMap3 = {
|
|
7476
7523
|
sm: { button: "px-2.5 py-1.5 text-[11px]", container: "p-0.5" },
|
|
7477
7524
|
md: { button: "px-3 py-2 text-xs", container: "p-1" }
|
|
@@ -7485,7 +7532,7 @@ function ITSegmentedControl({
|
|
|
7485
7532
|
disabled = false
|
|
7486
7533
|
}) {
|
|
7487
7534
|
const { button, container } = sizeMap3[size];
|
|
7488
|
-
return /* @__PURE__ */
|
|
7535
|
+
return /* @__PURE__ */ jsx55(
|
|
7489
7536
|
"div",
|
|
7490
7537
|
{
|
|
7491
7538
|
className: clsx39(
|
|
@@ -7508,8 +7555,8 @@ function ITSegmentedControl({
|
|
|
7508
7555
|
disabled && "pointer-events-none"
|
|
7509
7556
|
),
|
|
7510
7557
|
children: [
|
|
7511
|
-
opt.icon && /* @__PURE__ */
|
|
7512
|
-
/* @__PURE__ */
|
|
7558
|
+
opt.icon && /* @__PURE__ */ jsx55("span", { children: opt.icon }),
|
|
7559
|
+
/* @__PURE__ */ jsx55(ITText, { as: "span", children: opt.label })
|
|
7513
7560
|
]
|
|
7514
7561
|
},
|
|
7515
7562
|
opt.value
|
|
@@ -7522,7 +7569,7 @@ function ITSegmentedControl({
|
|
|
7522
7569
|
// src/components/organisms/sidebar/sidebar.tsx
|
|
7523
7570
|
import { useEffect as useEffect13, useRef as useRef20, useState as useState27 } from "react";
|
|
7524
7571
|
import { FaChevronDown as FaChevronDown4 } from "react-icons/fa";
|
|
7525
|
-
import { jsx as
|
|
7572
|
+
import { jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
7526
7573
|
function isSubItemGroup(entry) {
|
|
7527
7574
|
return "items" in entry;
|
|
7528
7575
|
}
|
|
@@ -7610,7 +7657,7 @@ function ITSidebar({
|
|
|
7610
7657
|
};
|
|
7611
7658
|
const isSidebarCollapsed = visibleOnMobile ? false : !isHovering && isCollapsed;
|
|
7612
7659
|
const sidebarWidth = isSidebarCollapsed ? "w-[88px]" : "w-[280px]";
|
|
7613
|
-
const renderSubItem = (subitem) => /* @__PURE__ */
|
|
7660
|
+
const renderSubItem = (subitem) => /* @__PURE__ */ jsx56("li", { className: "relative", children: /* @__PURE__ */ jsxs43(
|
|
7614
7661
|
"button",
|
|
7615
7662
|
{
|
|
7616
7663
|
"aria-current": subitem.isActive ? "page" : void 0,
|
|
@@ -7640,7 +7687,7 @@ function ITSidebar({
|
|
|
7640
7687
|
}
|
|
7641
7688
|
},
|
|
7642
7689
|
children: [
|
|
7643
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */
|
|
7690
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx56(
|
|
7644
7691
|
"div",
|
|
7645
7692
|
{
|
|
7646
7693
|
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full transition-all",
|
|
@@ -7650,7 +7697,7 @@ function ITSidebar({
|
|
|
7650
7697
|
}
|
|
7651
7698
|
}
|
|
7652
7699
|
),
|
|
7653
|
-
subitemConnector === "dot" && /* @__PURE__ */
|
|
7700
|
+
subitemConnector === "dot" && /* @__PURE__ */ jsx56(
|
|
7654
7701
|
"span",
|
|
7655
7702
|
{
|
|
7656
7703
|
className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 ${subitem.isActive ? "scale-125" : ""}`,
|
|
@@ -7659,14 +7706,14 @@ function ITSidebar({
|
|
|
7659
7706
|
}
|
|
7660
7707
|
}
|
|
7661
7708
|
),
|
|
7662
|
-
/* @__PURE__ */
|
|
7709
|
+
/* @__PURE__ */ jsx56(ITText, { as: "span", className: "truncate", children: subitem.label })
|
|
7663
7710
|
]
|
|
7664
7711
|
}
|
|
7665
7712
|
) }, subitem.id);
|
|
7666
7713
|
const renderSubItemGroup = (group, itemId) => {
|
|
7667
7714
|
const headingId = `it-sidebar-subgroup-${itemId}-${group.id}`;
|
|
7668
7715
|
return /* @__PURE__ */ jsxs43("li", { className: "relative", children: [
|
|
7669
|
-
/* @__PURE__ */
|
|
7716
|
+
/* @__PURE__ */ jsx56("div", { id: headingId, className: "px-3 pt-2.5 pb-1 mt-1", children: /* @__PURE__ */ jsx56(
|
|
7670
7717
|
ITText,
|
|
7671
7718
|
{
|
|
7672
7719
|
as: "span",
|
|
@@ -7681,7 +7728,7 @@ function ITSidebar({
|
|
|
7681
7728
|
children: group.label
|
|
7682
7729
|
}
|
|
7683
7730
|
) }),
|
|
7684
|
-
/* @__PURE__ */
|
|
7731
|
+
/* @__PURE__ */ jsx56("ul", { "aria-labelledby": headingId, className: "flex flex-col gap-0", children: group.items.map(renderSubItem) })
|
|
7685
7732
|
] }, group.id);
|
|
7686
7733
|
};
|
|
7687
7734
|
return /* @__PURE__ */ jsxs43(
|
|
@@ -7704,8 +7751,8 @@ function ITSidebar({
|
|
|
7704
7751
|
backdropFilter: "blur(12px)"
|
|
7705
7752
|
},
|
|
7706
7753
|
children: [
|
|
7707
|
-
header && !isSidebarCollapsed && /* @__PURE__ */
|
|
7708
|
-
/* @__PURE__ */
|
|
7754
|
+
header && !isSidebarCollapsed && /* @__PURE__ */ jsx56("div", { className: "px-4 pt-4 pb-1 flex-shrink-0", children: header }),
|
|
7755
|
+
/* @__PURE__ */ jsx56("nav", { "aria-label": "Componentes de la librer\xEDa", className: "flex-1 py-4 overflow-y-auto overflow-x-hidden custom-scrollbar px-4", children: /* @__PURE__ */ jsx56("ul", { className: "space-y-1", children: navigationItems.map((item) => {
|
|
7709
7756
|
const hasSubmenu = !!item.subitems && item.subitems.length > 0;
|
|
7710
7757
|
const submenuId = `it-sidebar-submenu-${item.id}`;
|
|
7711
7758
|
return /* @__PURE__ */ jsxs43("li", { className: "relative group/navitem", children: [
|
|
@@ -7741,7 +7788,7 @@ function ITSidebar({
|
|
|
7741
7788
|
}
|
|
7742
7789
|
},
|
|
7743
7790
|
children: [
|
|
7744
|
-
item.isActive && !isSidebarCollapsed && /* @__PURE__ */
|
|
7791
|
+
item.isActive && !isSidebarCollapsed && /* @__PURE__ */ jsx56(
|
|
7745
7792
|
"div",
|
|
7746
7793
|
{
|
|
7747
7794
|
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
@@ -7749,7 +7796,7 @@ function ITSidebar({
|
|
|
7749
7796
|
}
|
|
7750
7797
|
),
|
|
7751
7798
|
/* @__PURE__ */ jsxs43("div", { className: `flex items-center ${!isSidebarCollapsed ? "gap-2.5" : "justify-center"} relative z-10 w-full`, children: [
|
|
7752
|
-
item.icon && /* @__PURE__ */
|
|
7799
|
+
item.icon && /* @__PURE__ */ jsx56(
|
|
7753
7800
|
"div",
|
|
7754
7801
|
{
|
|
7755
7802
|
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
@@ -7762,7 +7809,7 @@ function ITSidebar({
|
|
|
7762
7809
|
children: item.icon
|
|
7763
7810
|
}
|
|
7764
7811
|
),
|
|
7765
|
-
!isSidebarCollapsed && /* @__PURE__ */
|
|
7812
|
+
!isSidebarCollapsed && /* @__PURE__ */ jsx56(
|
|
7766
7813
|
ITText,
|
|
7767
7814
|
{
|
|
7768
7815
|
as: "span",
|
|
@@ -7776,15 +7823,15 @@ function ITSidebar({
|
|
|
7776
7823
|
}
|
|
7777
7824
|
)
|
|
7778
7825
|
] }),
|
|
7779
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
7826
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx56(
|
|
7780
7827
|
"div",
|
|
7781
7828
|
{
|
|
7782
7829
|
className: `flex-shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "rotate-180" : ""}`,
|
|
7783
7830
|
style: { color: item.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-icon-color, var(--color-secondary-500))", opacity: 0.7 },
|
|
7784
|
-
children: /* @__PURE__ */
|
|
7831
|
+
children: /* @__PURE__ */ jsx56(FaChevronDown4, { className: "w-3 h-3" })
|
|
7785
7832
|
}
|
|
7786
7833
|
),
|
|
7787
|
-
item.badge && /* @__PURE__ */
|
|
7834
|
+
item.badge && /* @__PURE__ */ jsx56(
|
|
7788
7835
|
"span",
|
|
7789
7836
|
{
|
|
7790
7837
|
className: `
|
|
@@ -7814,15 +7861,15 @@ function ITSidebar({
|
|
|
7814
7861
|
},
|
|
7815
7862
|
children: [
|
|
7816
7863
|
/* @__PURE__ */ jsxs43("div", { className: "px-5 py-4 flex items-center gap-3 font-semibold border-b", style: { borderColor: "var(--it-sidebar-border, var(--color-secondary-200))", color: "var(--it-sidebar-active-color, var(--color-secondary-900))" }, children: [
|
|
7817
|
-
item.icon && /* @__PURE__ */
|
|
7818
|
-
/* @__PURE__ */
|
|
7864
|
+
item.icon && /* @__PURE__ */ jsx56("span", { style: { color: "var(--it-sidebar-active-icon, var(--color-primary-500))" }, className: "text-xl drop-shadow-sm", children: item.icon }),
|
|
7865
|
+
/* @__PURE__ */ jsx56(ITText, { as: "span", className: "tracking-wide text-[15px]", children: item.label })
|
|
7819
7866
|
] }),
|
|
7820
|
-
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */
|
|
7867
|
+
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ jsx56("div", { className: "py-2", children: flattenSubItems(item.subitems).map((subitem) => /* @__PURE__ */ jsxs43(
|
|
7821
7868
|
"div",
|
|
7822
7869
|
{
|
|
7823
7870
|
className: `px-5 py-2.5 text-sm flex items-center gap-3 transition-colors relative`,
|
|
7824
7871
|
children: [
|
|
7825
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */
|
|
7872
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx56(
|
|
7826
7873
|
"div",
|
|
7827
7874
|
{
|
|
7828
7875
|
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full",
|
|
@@ -7832,16 +7879,16 @@ function ITSidebar({
|
|
|
7832
7879
|
}
|
|
7833
7880
|
}
|
|
7834
7881
|
),
|
|
7835
|
-
/* @__PURE__ */
|
|
7836
|
-
/* @__PURE__ */
|
|
7882
|
+
/* @__PURE__ */ jsx56("span", { className: `w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`, style: { backgroundColor: subitem.isActive ? "var(--it-sidebar-active-icon, var(--color-primary-500))" : "var(--it-sidebar-icon-color, var(--color-secondary-400))" } }),
|
|
7883
|
+
/* @__PURE__ */ jsx56(ITText, { as: "span", style: { color: subitem.isActive ? "var(--it-sidebar-active-color, var(--color-secondary-900))" : "var(--it-sidebar-label-color, var(--color-secondary-600))", fontWeight: subitem.isActive ? 600 : 500 }, children: subitem.label })
|
|
7837
7884
|
]
|
|
7838
7885
|
},
|
|
7839
7886
|
subitem.id
|
|
7840
|
-
)) }) : /* @__PURE__ */
|
|
7887
|
+
)) }) : /* @__PURE__ */ jsx56(ITText, { as: "div", className: "px-5 py-3 text-sm italic", style: { color: "var(--it-sidebar-label-color, var(--color-secondary-400))" }, children: "No hay submen\xFA" })
|
|
7841
7888
|
]
|
|
7842
7889
|
}
|
|
7843
7890
|
),
|
|
7844
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
7891
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx56("div", { id: submenuId, role: "group", "aria-label": item.label, className: `overflow-hidden transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "max-h-[1000px] opacity-100 mt-1" : "max-h-0 opacity-0"}`, children: /* @__PURE__ */ jsx56(
|
|
7845
7892
|
"ul",
|
|
7846
7893
|
{
|
|
7847
7894
|
className: "ml-4 flex flex-col gap-0 py-0.5",
|
|
@@ -7863,7 +7910,7 @@ function ITSidebar({
|
|
|
7863
7910
|
// src/components/atoms/slide/slide.tsx
|
|
7864
7911
|
import { useState as useState28, useEffect as useEffect14 } from "react";
|
|
7865
7912
|
import clsx40 from "clsx";
|
|
7866
|
-
import { jsx as
|
|
7913
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
7867
7914
|
function ITSlideToggle({
|
|
7868
7915
|
onToggle,
|
|
7869
7916
|
isOn: controlledIsOn,
|
|
@@ -7916,7 +7963,7 @@ function ITSlideToggle({
|
|
|
7916
7963
|
}
|
|
7917
7964
|
};
|
|
7918
7965
|
const { container, knob, translate } = sizeClasses2[size];
|
|
7919
|
-
return /* @__PURE__ */
|
|
7966
|
+
return /* @__PURE__ */ jsx57(
|
|
7920
7967
|
"div",
|
|
7921
7968
|
{
|
|
7922
7969
|
onClick: toggleSwitch,
|
|
@@ -7936,7 +7983,7 @@ function ITSlideToggle({
|
|
|
7936
7983
|
toggleSwitch();
|
|
7937
7984
|
}
|
|
7938
7985
|
},
|
|
7939
|
-
children: /* @__PURE__ */
|
|
7986
|
+
children: /* @__PURE__ */ jsx57(
|
|
7940
7987
|
"div",
|
|
7941
7988
|
{
|
|
7942
7989
|
className: clsx40(
|
|
@@ -7952,7 +7999,7 @@ function ITSlideToggle({
|
|
|
7952
7999
|
|
|
7953
8000
|
// src/components/atoms/slider/slider.tsx
|
|
7954
8001
|
import clsx41 from "clsx";
|
|
7955
|
-
import { jsx as
|
|
8002
|
+
import { jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7956
8003
|
function ITSlider({
|
|
7957
8004
|
value,
|
|
7958
8005
|
onChange,
|
|
@@ -7969,7 +8016,7 @@ function ITSlider({
|
|
|
7969
8016
|
": ",
|
|
7970
8017
|
value
|
|
7971
8018
|
] }),
|
|
7972
|
-
/* @__PURE__ */
|
|
8019
|
+
/* @__PURE__ */ jsx58("div", { className: "relative w-full h-5 flex items-center", children: /* @__PURE__ */ jsx58(
|
|
7973
8020
|
"input",
|
|
7974
8021
|
{
|
|
7975
8022
|
type: "range",
|
|
@@ -8000,7 +8047,7 @@ function ITSlider({
|
|
|
8000
8047
|
|
|
8001
8048
|
// src/components/molecules/stat-card/stat-card.tsx
|
|
8002
8049
|
import clsx42 from "clsx";
|
|
8003
|
-
import { jsx as
|
|
8050
|
+
import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
8004
8051
|
var trendColors = {
|
|
8005
8052
|
up: "text-emerald-600 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/30",
|
|
8006
8053
|
down: "text-rose-600 bg-rose-50 dark:text-rose-400 dark:bg-rose-950/30",
|
|
@@ -8027,12 +8074,12 @@ function ITStatCard({
|
|
|
8027
8074
|
tabIndex: onClick ? 0 : void 0,
|
|
8028
8075
|
children: [
|
|
8029
8076
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-start justify-between mb-1", children: [
|
|
8030
|
-
/* @__PURE__ */
|
|
8031
|
-
icon && /* @__PURE__ */
|
|
8077
|
+
/* @__PURE__ */ jsx59(ITText, { as: "span", className: "text-xs font-medium text-slate-400 dark:text-slate-500", children: label }),
|
|
8078
|
+
icon && /* @__PURE__ */ jsx59("span", { className: "text-slate-400", children: icon })
|
|
8032
8079
|
] }),
|
|
8033
8080
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-baseline gap-2", children: [
|
|
8034
|
-
/* @__PURE__ */
|
|
8035
|
-
trend && /* @__PURE__ */
|
|
8081
|
+
/* @__PURE__ */ jsx59(ITText, { as: "span", className: "text-2xl font-bold text-slate-800 dark:text-white", children: value }),
|
|
8082
|
+
trend && /* @__PURE__ */ jsx59(ITText, { as: "span", className: clsx42("text-[11px] font-semibold px-1.5 py-0.5 rounded-md", trendColors[trendDirection]), children: trend })
|
|
8036
8083
|
] })
|
|
8037
8084
|
]
|
|
8038
8085
|
}
|
|
@@ -8051,7 +8098,7 @@ import {
|
|
|
8051
8098
|
} from "react-icons/fa";
|
|
8052
8099
|
import { MdOutlineSwapVert as MdOutlineSwapVert2 } from "react-icons/md";
|
|
8053
8100
|
import { isSameDay as isSameDay2, startOfDay as startOfDay2, endOfDay } from "date-fns";
|
|
8054
|
-
import { Fragment as Fragment9, jsx as
|
|
8101
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
8055
8102
|
function ITTable({
|
|
8056
8103
|
columns,
|
|
8057
8104
|
data = [],
|
|
@@ -8207,14 +8254,14 @@ function ITTable({
|
|
|
8207
8254
|
if (currentValue === true) return "Filtrar solo verdaderos";
|
|
8208
8255
|
return "Filtrar solo falsos";
|
|
8209
8256
|
};
|
|
8210
|
-
return /* @__PURE__ */
|
|
8257
|
+
return /* @__PURE__ */ jsx60(
|
|
8211
8258
|
"button",
|
|
8212
8259
|
{
|
|
8213
8260
|
className: "flex items-center justify-center cursor-pointer focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 rounded-full p-1 transition-all duration-200",
|
|
8214
8261
|
onClick: () => handleFilterChange(col.key, nextValue),
|
|
8215
8262
|
"aria-label": `${getToggleLabel()} para ${col.label}`,
|
|
8216
8263
|
title: `${getToggleLabel()} para ${col.label}`,
|
|
8217
|
-
children: /* @__PURE__ */
|
|
8264
|
+
children: /* @__PURE__ */ jsx60("div", { className: "relative w-10 h-5 bg-secondary-300 rounded-full", children: /* @__PURE__ */ jsx60(
|
|
8218
8265
|
"div",
|
|
8219
8266
|
{
|
|
8220
8267
|
className: clsx43(
|
|
@@ -8232,7 +8279,7 @@ function ITTable({
|
|
|
8232
8279
|
}
|
|
8233
8280
|
if (col.filter === "catalog" && col.catalogOptions) {
|
|
8234
8281
|
if (col.catalogOptions.loading) {
|
|
8235
|
-
return /* @__PURE__ */
|
|
8282
|
+
return /* @__PURE__ */ jsx60(
|
|
8236
8283
|
FaSpinner3,
|
|
8237
8284
|
{
|
|
8238
8285
|
className: "animate-spin",
|
|
@@ -8242,9 +8289,9 @@ function ITTable({
|
|
|
8242
8289
|
);
|
|
8243
8290
|
}
|
|
8244
8291
|
if (col.catalogOptions.error) {
|
|
8245
|
-
return /* @__PURE__ */
|
|
8292
|
+
return /* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8246
8293
|
}
|
|
8247
|
-
return /* @__PURE__ */
|
|
8294
|
+
return /* @__PURE__ */ jsx60(
|
|
8248
8295
|
ITSelect,
|
|
8249
8296
|
{
|
|
8250
8297
|
name: `filter-${col.key}`,
|
|
@@ -8268,7 +8315,7 @@ function ITTable({
|
|
|
8268
8315
|
}
|
|
8269
8316
|
if (col.filter === "search" && col.catalogOptions) {
|
|
8270
8317
|
if (col.catalogOptions.loading) {
|
|
8271
|
-
return /* @__PURE__ */
|
|
8318
|
+
return /* @__PURE__ */ jsx60(
|
|
8272
8319
|
FaSpinner3,
|
|
8273
8320
|
{
|
|
8274
8321
|
className: "animate-spin",
|
|
@@ -8278,10 +8325,10 @@ function ITTable({
|
|
|
8278
8325
|
);
|
|
8279
8326
|
}
|
|
8280
8327
|
if (col.catalogOptions.error) {
|
|
8281
|
-
return /* @__PURE__ */
|
|
8328
|
+
return /* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8282
8329
|
}
|
|
8283
8330
|
const searchValue = filters[col.key];
|
|
8284
|
-
return /* @__PURE__ */
|
|
8331
|
+
return /* @__PURE__ */ jsx60(
|
|
8285
8332
|
ITSearchSelect,
|
|
8286
8333
|
{
|
|
8287
8334
|
name: `filter-${col.key}`,
|
|
@@ -8304,7 +8351,7 @@ function ITTable({
|
|
|
8304
8351
|
}
|
|
8305
8352
|
if (col.filter === "date") {
|
|
8306
8353
|
const dateValue = filters[col.key];
|
|
8307
|
-
return /* @__PURE__ */
|
|
8354
|
+
return /* @__PURE__ */ jsx60(
|
|
8308
8355
|
ITDatePicker,
|
|
8309
8356
|
{
|
|
8310
8357
|
name: `filter-${col.key}`,
|
|
@@ -8320,7 +8367,7 @@ function ITTable({
|
|
|
8320
8367
|
}
|
|
8321
8368
|
if (col.filter === "date-range") {
|
|
8322
8369
|
const rangeValue = filters[col.key];
|
|
8323
|
-
return /* @__PURE__ */
|
|
8370
|
+
return /* @__PURE__ */ jsx60(
|
|
8324
8371
|
ITDatePicker,
|
|
8325
8372
|
{
|
|
8326
8373
|
name: `filter-${col.key}`,
|
|
@@ -8335,7 +8382,7 @@ function ITTable({
|
|
|
8335
8382
|
}
|
|
8336
8383
|
);
|
|
8337
8384
|
}
|
|
8338
|
-
return /* @__PURE__ */
|
|
8385
|
+
return /* @__PURE__ */ jsx60(
|
|
8339
8386
|
ITInput,
|
|
8340
8387
|
{
|
|
8341
8388
|
name: `filter-${col.key}`,
|
|
@@ -8357,14 +8404,14 @@ function ITTable({
|
|
|
8357
8404
|
case "number":
|
|
8358
8405
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
8359
8406
|
case "boolean":
|
|
8360
|
-
return value ? /* @__PURE__ */
|
|
8407
|
+
return value ? /* @__PURE__ */ jsx60(
|
|
8361
8408
|
FaCheck4,
|
|
8362
8409
|
{
|
|
8363
8410
|
className: "text-success-500",
|
|
8364
8411
|
"aria-label": "Verdadero",
|
|
8365
8412
|
title: "Verdadero"
|
|
8366
8413
|
}
|
|
8367
|
-
) : /* @__PURE__ */
|
|
8414
|
+
) : /* @__PURE__ */ jsx60(
|
|
8368
8415
|
FaTimes9,
|
|
8369
8416
|
{
|
|
8370
8417
|
className: "text-danger-500",
|
|
@@ -8391,10 +8438,10 @@ function ITTable({
|
|
|
8391
8438
|
const actionCol = columns.find((c) => c.type === "actions");
|
|
8392
8439
|
return /* @__PURE__ */ jsxs46("div", { className: "bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 p-3 space-y-2 shadow-sm", children: [
|
|
8393
8440
|
dataCols.map((col) => /* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8394
|
-
/* @__PURE__ */
|
|
8395
|
-
/* @__PURE__ */
|
|
8441
|
+
/* @__PURE__ */ jsx60("span", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 whitespace-nowrap flex-shrink-0 min-w-[70px]", children: col.label }),
|
|
8442
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
|
|
8396
8443
|
] }, col.key)),
|
|
8397
|
-
actionCol?.actions && /* @__PURE__ */
|
|
8444
|
+
actionCol?.actions && /* @__PURE__ */ jsx60("div", { className: "flex items-center justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-700", children: actionCol.actions(row) })
|
|
8398
8445
|
] });
|
|
8399
8446
|
};
|
|
8400
8447
|
const handleRowClick = (row) => (event) => {
|
|
@@ -8408,9 +8455,9 @@ function ITTable({
|
|
|
8408
8455
|
event.preventDefault();
|
|
8409
8456
|
onRowClick(row, event);
|
|
8410
8457
|
};
|
|
8411
|
-
return /* @__PURE__ */
|
|
8458
|
+
return /* @__PURE__ */ jsx60("div", { ref: rootRef, className: clsx43("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ jsxs46("div", { className: tableContainer, style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8412
8459
|
title && /* @__PURE__ */ jsxs46("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8413
|
-
/* @__PURE__ */
|
|
8460
|
+
/* @__PURE__ */ jsx60(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
|
|
8414
8461
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
|
|
8415
8462
|
/* @__PURE__ */ jsxs46(
|
|
8416
8463
|
"button",
|
|
@@ -8419,7 +8466,7 @@ function ITTable({
|
|
|
8419
8466
|
disabled: forcedCards,
|
|
8420
8467
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${effectiveView === "table" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
|
|
8421
8468
|
children: [
|
|
8422
|
-
/* @__PURE__ */
|
|
8469
|
+
/* @__PURE__ */ jsx60(FaTable2, { size: 11 }),
|
|
8423
8470
|
"Table"
|
|
8424
8471
|
]
|
|
8425
8472
|
}
|
|
@@ -8430,14 +8477,14 @@ function ITTable({
|
|
|
8430
8477
|
onClick: () => setViewMode("cards"),
|
|
8431
8478
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${effectiveView === "cards" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
|
|
8432
8479
|
children: [
|
|
8433
|
-
/* @__PURE__ */
|
|
8480
|
+
/* @__PURE__ */ jsx60(FaThLarge2, { size: 11 }),
|
|
8434
8481
|
"Cards"
|
|
8435
8482
|
]
|
|
8436
8483
|
}
|
|
8437
8484
|
)
|
|
8438
8485
|
] })
|
|
8439
8486
|
] }),
|
|
8440
|
-
!title && /* @__PURE__ */
|
|
8487
|
+
!title && /* @__PURE__ */ jsx60("div", { className: "flex justify-end px-4 pt-3", children: /* @__PURE__ */ jsxs46("div", { className: "flex items-center bg-slate-100 dark:bg-slate-800/80 rounded-lg p-0.5 border border-slate-200 dark:border-slate-700/50", children: [
|
|
8441
8488
|
/* @__PURE__ */ jsxs46(
|
|
8442
8489
|
"button",
|
|
8443
8490
|
{
|
|
@@ -8445,7 +8492,7 @@ function ITTable({
|
|
|
8445
8492
|
disabled: forcedCards,
|
|
8446
8493
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${effectiveView === "table" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
|
|
8447
8494
|
children: [
|
|
8448
|
-
/* @__PURE__ */
|
|
8495
|
+
/* @__PURE__ */ jsx60(FaTable2, { size: 11 }),
|
|
8449
8496
|
"Table"
|
|
8450
8497
|
]
|
|
8451
8498
|
}
|
|
@@ -8456,13 +8503,13 @@ function ITTable({
|
|
|
8456
8503
|
onClick: () => setViewMode("cards"),
|
|
8457
8504
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-all ${effectiveView === "cards" ? "bg-white dark:bg-slate-900 text-slate-900 dark:text-white shadow-sm border border-slate-200/50 dark:border-slate-700" : "text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}`,
|
|
8458
8505
|
children: [
|
|
8459
|
-
/* @__PURE__ */
|
|
8506
|
+
/* @__PURE__ */ jsx60(FaThLarge2, { size: 11 }),
|
|
8460
8507
|
"Cards"
|
|
8461
8508
|
]
|
|
8462
8509
|
}
|
|
8463
8510
|
)
|
|
8464
8511
|
] }) }),
|
|
8465
|
-
effectiveView === "cards" ? /* @__PURE__ */
|
|
8512
|
+
effectiveView === "cards" ? /* @__PURE__ */ jsx60("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: currentData.length > 0 ? currentData.map((row, i) => /* @__PURE__ */ jsx60(
|
|
8466
8513
|
"div",
|
|
8467
8514
|
{
|
|
8468
8515
|
className: clsx43(tableCardHover, onRowClick && tableCardClickable),
|
|
@@ -8474,9 +8521,9 @@ function ITTable({
|
|
|
8474
8521
|
},
|
|
8475
8522
|
i
|
|
8476
8523
|
)) : /* @__PURE__ */ jsxs46("div", { className: clsx43(tableEmptyContent, "py-12"), children: [
|
|
8477
|
-
/* @__PURE__ */
|
|
8478
|
-
/* @__PURE__ */
|
|
8479
|
-
] }) }) : /* @__PURE__ */
|
|
8524
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8525
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8526
|
+
] }) }) : /* @__PURE__ */ jsx60(
|
|
8480
8527
|
"div",
|
|
8481
8528
|
{
|
|
8482
8529
|
ref: isTableVirtual ? scrollRef : void 0,
|
|
@@ -8495,14 +8542,14 @@ function ITTable({
|
|
|
8495
8542
|
style: isFixed ? { tableLayout: "fixed" } : void 0,
|
|
8496
8543
|
"aria-rowcount": isTableVirtual ? currentData.length + 1 : void 0,
|
|
8497
8544
|
children: [
|
|
8498
|
-
hasColumnWidths && /* @__PURE__ */
|
|
8545
|
+
hasColumnWidths && /* @__PURE__ */ jsx60("colgroup", { children: columns.map((col) => /* @__PURE__ */ jsx60(
|
|
8499
8546
|
"col",
|
|
8500
8547
|
{
|
|
8501
8548
|
style: col.width != null ? { width: typeof col.width === "number" ? `${col.width}px` : col.width } : void 0
|
|
8502
8549
|
},
|
|
8503
8550
|
col.key
|
|
8504
8551
|
)) }),
|
|
8505
|
-
/* @__PURE__ */
|
|
8552
|
+
/* @__PURE__ */ jsx60("thead", { children: /* @__PURE__ */ jsx60(
|
|
8506
8553
|
"tr",
|
|
8507
8554
|
{
|
|
8508
8555
|
className: clsx43(tableHeaderRow, "dark:text-slate-200"),
|
|
@@ -8510,7 +8557,7 @@ function ITTable({
|
|
|
8510
8557
|
children: columns.map((col) => {
|
|
8511
8558
|
const pin = pinnedMeta[col.key];
|
|
8512
8559
|
const isPinned = pin != null;
|
|
8513
|
-
return /* @__PURE__ */
|
|
8560
|
+
return /* @__PURE__ */ jsx60(
|
|
8514
8561
|
"th",
|
|
8515
8562
|
{
|
|
8516
8563
|
scope: "col",
|
|
@@ -8529,18 +8576,18 @@ function ITTable({
|
|
|
8529
8576
|
} : void 0,
|
|
8530
8577
|
children: /* @__PURE__ */ jsxs46("div", { className: isFixed ? "flex flex-col gap-3" : "flex flex-col gap-3 min-w-[150px]", children: [
|
|
8531
8578
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8532
|
-
/* @__PURE__ */
|
|
8533
|
-
col.sortable && col.type !== "actions" && /* @__PURE__ */
|
|
8579
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
|
|
8580
|
+
col.sortable && col.type !== "actions" && /* @__PURE__ */ jsx60(
|
|
8534
8581
|
"button",
|
|
8535
8582
|
{
|
|
8536
8583
|
onClick: () => handleSort(col.key),
|
|
8537
8584
|
className: `p-1 rounded-md transition-colors ${sortConfig?.key === col.key ? "bg-secondary-200 text-secondary-900" : "hover:bg-secondary-200 text-secondary-400 hover:text-secondary-700"}`,
|
|
8538
8585
|
title: `Ordenar por ${col.label}`,
|
|
8539
|
-
children: /* @__PURE__ */
|
|
8586
|
+
children: /* @__PURE__ */ jsx60(MdOutlineSwapVert2, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
8540
8587
|
}
|
|
8541
8588
|
)
|
|
8542
8589
|
] }),
|
|
8543
|
-
/* @__PURE__ */
|
|
8590
|
+
/* @__PURE__ */ jsx60("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
|
|
8544
8591
|
] })
|
|
8545
8592
|
},
|
|
8546
8593
|
col.key
|
|
@@ -8548,11 +8595,11 @@ function ITTable({
|
|
|
8548
8595
|
})
|
|
8549
8596
|
}
|
|
8550
8597
|
) }),
|
|
8551
|
-
/* @__PURE__ */
|
|
8552
|
-
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */
|
|
8598
|
+
/* @__PURE__ */ jsx60("tbody", { className: clsx43(tableBody, "dark:divide-slate-700/30"), children: currentData.length > 0 ? /* @__PURE__ */ jsxs46(Fragment9, { children: [
|
|
8599
|
+
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */ jsx60("tr", { "aria-hidden": "true", style: { height: topSpacerHeight }, children: /* @__PURE__ */ jsx60("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) }),
|
|
8553
8600
|
windowData.map((row, windowIndex) => {
|
|
8554
8601
|
const absoluteIndex = isTableVirtual ? startIndex + windowIndex : windowIndex;
|
|
8555
|
-
return /* @__PURE__ */
|
|
8602
|
+
return /* @__PURE__ */ jsx60(
|
|
8556
8603
|
"tr",
|
|
8557
8604
|
{
|
|
8558
8605
|
"aria-rowindex": isTableVirtual ? absoluteIndex + 2 : void 0,
|
|
@@ -8569,7 +8616,7 @@ function ITTable({
|
|
|
8569
8616
|
const truncateTitle = col.truncate && (typeof rawValue === "string" || typeof rawValue === "number") ? String(rawValue) : void 0;
|
|
8570
8617
|
const pin = pinnedMeta[col.key];
|
|
8571
8618
|
const isPinned = pin != null;
|
|
8572
|
-
return /* @__PURE__ */
|
|
8619
|
+
return /* @__PURE__ */ jsx60(
|
|
8573
8620
|
"td",
|
|
8574
8621
|
{
|
|
8575
8622
|
className: clsx43(
|
|
@@ -8584,7 +8631,7 @@ function ITTable({
|
|
|
8584
8631
|
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8585
8632
|
} : void 0,
|
|
8586
8633
|
title: truncateTitle,
|
|
8587
|
-
children: col.type === "actions" ? /* @__PURE__ */
|
|
8634
|
+
children: col.type === "actions" ? /* @__PURE__ */ jsx60("div", { className: tableActionsCell, children: renderCellContent(col, row) }) : /* @__PURE__ */ jsx60("div", { className: clsx43(tableCellText, col.truncate && "truncate"), children: renderCellContent(col, row) })
|
|
8588
8635
|
},
|
|
8589
8636
|
`${absoluteIndex}-${col.key}`
|
|
8590
8637
|
);
|
|
@@ -8593,17 +8640,17 @@ function ITTable({
|
|
|
8593
8640
|
absoluteIndex
|
|
8594
8641
|
);
|
|
8595
8642
|
}),
|
|
8596
|
-
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */
|
|
8597
|
-
] }) : /* @__PURE__ */
|
|
8598
|
-
/* @__PURE__ */
|
|
8599
|
-
/* @__PURE__ */
|
|
8643
|
+
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */ jsx60("tr", { "aria-hidden": "true", style: { height: bottomSpacerHeight }, children: /* @__PURE__ */ jsx60("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) })
|
|
8644
|
+
] }) : /* @__PURE__ */ jsx60("tr", { children: /* @__PURE__ */ jsx60("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ jsxs46("div", { className: tableEmptyContent, children: [
|
|
8645
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8646
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8600
8647
|
] }) }) }) })
|
|
8601
8648
|
]
|
|
8602
8649
|
}
|
|
8603
8650
|
)
|
|
8604
8651
|
}
|
|
8605
8652
|
),
|
|
8606
|
-
/* @__PURE__ */
|
|
8653
|
+
/* @__PURE__ */ jsx60("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx60(
|
|
8607
8654
|
ITPagination,
|
|
8608
8655
|
{
|
|
8609
8656
|
currentPage,
|
|
@@ -8621,7 +8668,7 @@ function ITTable({
|
|
|
8621
8668
|
|
|
8622
8669
|
// src/components/atoms/textarea/textarea.tsx
|
|
8623
8670
|
import clsx44 from "clsx";
|
|
8624
|
-
import { jsx as
|
|
8671
|
+
import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
8625
8672
|
var resizeMap = {
|
|
8626
8673
|
none: "resize-none",
|
|
8627
8674
|
vertical: "resize-y",
|
|
@@ -8642,8 +8689,8 @@ function ITTextarea({
|
|
|
8642
8689
|
resize = "vertical"
|
|
8643
8690
|
}) {
|
|
8644
8691
|
return /* @__PURE__ */ jsxs47("div", { className: clsx44("flex flex-col gap-1.5", className), children: [
|
|
8645
|
-
label && /* @__PURE__ */
|
|
8646
|
-
/* @__PURE__ */
|
|
8692
|
+
label && /* @__PURE__ */ jsx61(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
8693
|
+
/* @__PURE__ */ jsx61(
|
|
8647
8694
|
"textarea",
|
|
8648
8695
|
{
|
|
8649
8696
|
id: name,
|
|
@@ -8663,14 +8710,14 @@ function ITTextarea({
|
|
|
8663
8710
|
)
|
|
8664
8711
|
}
|
|
8665
8712
|
),
|
|
8666
|
-
error && /* @__PURE__ */
|
|
8713
|
+
error && /* @__PURE__ */ jsx61(ITText, { as: "span", className: inputError, children: error })
|
|
8667
8714
|
] });
|
|
8668
8715
|
}
|
|
8669
8716
|
|
|
8670
8717
|
// src/components/molecules/tabs/tabs.tsx
|
|
8671
8718
|
import { useState as useState30 } from "react";
|
|
8672
8719
|
import { clsx as clsx45 } from "clsx";
|
|
8673
|
-
import { jsx as
|
|
8720
|
+
import { jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
8674
8721
|
var ITTabs = ({
|
|
8675
8722
|
items,
|
|
8676
8723
|
defaultActiveId,
|
|
@@ -8687,7 +8734,7 @@ var ITTabs = ({
|
|
|
8687
8734
|
};
|
|
8688
8735
|
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
8689
8736
|
return /* @__PURE__ */ jsxs48("div", { className: clsx45("w-full", containerClassName), children: [
|
|
8690
|
-
/* @__PURE__ */
|
|
8737
|
+
/* @__PURE__ */ jsx62("div", { className: clsx45(
|
|
8691
8738
|
"flex border-secondary-200 mb-4",
|
|
8692
8739
|
variant === "line" ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
|
|
8693
8740
|
className
|
|
@@ -8713,21 +8760,21 @@ var ITTabs = ({
|
|
|
8713
8760
|
item.disabled && "opacity-50 cursor-not-allowed"
|
|
8714
8761
|
),
|
|
8715
8762
|
children: [
|
|
8716
|
-
item.icon && /* @__PURE__ */
|
|
8717
|
-
/* @__PURE__ */
|
|
8763
|
+
item.icon && /* @__PURE__ */ jsx62("span", { className: "w-4 h-4", children: item.icon }),
|
|
8764
|
+
/* @__PURE__ */ jsx62(ITText, { as: "span", children: item.label })
|
|
8718
8765
|
]
|
|
8719
8766
|
},
|
|
8720
8767
|
item.id
|
|
8721
8768
|
);
|
|
8722
8769
|
}) }),
|
|
8723
|
-
/* @__PURE__ */
|
|
8770
|
+
/* @__PURE__ */ jsx62("div", { className: "tab-content animate-fadeIn", children: activeContent })
|
|
8724
8771
|
] });
|
|
8725
8772
|
};
|
|
8726
8773
|
var tabs_default = ITTabs;
|
|
8727
8774
|
|
|
8728
8775
|
// src/components/organisms/triple-filter/tripleFilter.tsx
|
|
8729
8776
|
import clsx46 from "clsx";
|
|
8730
|
-
import { jsx as
|
|
8777
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
8731
8778
|
var colorMap2 = {
|
|
8732
8779
|
primary: "text-primary-600",
|
|
8733
8780
|
secondary: "text-secondary-600",
|
|
@@ -8746,11 +8793,11 @@ var ITTripleFilter = ({
|
|
|
8746
8793
|
color = "primary",
|
|
8747
8794
|
className
|
|
8748
8795
|
}) => {
|
|
8749
|
-
return /* @__PURE__ */
|
|
8796
|
+
return /* @__PURE__ */ jsx63(
|
|
8750
8797
|
"div",
|
|
8751
8798
|
{
|
|
8752
8799
|
className: clsx46("flex bg-slate-100 p-1 rounded-xl gap-1 w-fit", className),
|
|
8753
|
-
children: options.map((option) => /* @__PURE__ */
|
|
8800
|
+
children: options.map((option) => /* @__PURE__ */ jsx63(
|
|
8754
8801
|
"button",
|
|
8755
8802
|
{
|
|
8756
8803
|
onClick: () => onChange(option.value),
|
|
@@ -8758,7 +8805,7 @@ var ITTripleFilter = ({
|
|
|
8758
8805
|
"px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap",
|
|
8759
8806
|
value === option.value ? clsx46("bg-white shadow-sm", colorMap2[color]) : "text-slate-400 hover:text-slate-600"
|
|
8760
8807
|
),
|
|
8761
|
-
children: /* @__PURE__ */
|
|
8808
|
+
children: /* @__PURE__ */ jsx63(ITText, { as: "span", children: option.label })
|
|
8762
8809
|
},
|
|
8763
8810
|
String(option.value)
|
|
8764
8811
|
))
|
|
@@ -8781,7 +8828,7 @@ var positionStyles = {
|
|
|
8781
8828
|
import clsx47 from "clsx";
|
|
8782
8829
|
import { useEffect as useEffect15, useState as useState31 } from "react";
|
|
8783
8830
|
import { FaTimesCircle as FaTimesCircle2, FaCheckCircle as FaCheckCircle2, FaExclamationTriangle as FaExclamationTriangle3, FaInfoCircle as FaInfoCircle2, FaTimes as FaTimes10 } from "react-icons/fa";
|
|
8784
|
-
import { jsx as
|
|
8831
|
+
import { jsx as jsx64, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
8785
8832
|
function ITToast({
|
|
8786
8833
|
message,
|
|
8787
8834
|
type = "info",
|
|
@@ -8810,15 +8857,15 @@ function ITToast({
|
|
|
8810
8857
|
const TypeIcon = () => {
|
|
8811
8858
|
switch (type) {
|
|
8812
8859
|
case "success":
|
|
8813
|
-
return /* @__PURE__ */
|
|
8860
|
+
return /* @__PURE__ */ jsx64(FaCheckCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8814
8861
|
case "error":
|
|
8815
8862
|
case "danger":
|
|
8816
|
-
return /* @__PURE__ */
|
|
8863
|
+
return /* @__PURE__ */ jsx64(FaTimesCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8817
8864
|
case "warning":
|
|
8818
|
-
return /* @__PURE__ */
|
|
8865
|
+
return /* @__PURE__ */ jsx64(FaExclamationTriangle3, { className: "w-5 h-5 flex-shrink-0" });
|
|
8819
8866
|
case "info":
|
|
8820
8867
|
default:
|
|
8821
|
-
return /* @__PURE__ */
|
|
8868
|
+
return /* @__PURE__ */ jsx64(FaInfoCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8822
8869
|
}
|
|
8823
8870
|
};
|
|
8824
8871
|
return /* @__PURE__ */ jsxs49(
|
|
@@ -8838,16 +8885,16 @@ function ITToast({
|
|
|
8838
8885
|
role: "alert",
|
|
8839
8886
|
children: [
|
|
8840
8887
|
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-3", children: [
|
|
8841
|
-
/* @__PURE__ */
|
|
8842
|
-
/* @__PURE__ */
|
|
8888
|
+
/* @__PURE__ */ jsx64(TypeIcon, {}),
|
|
8889
|
+
/* @__PURE__ */ jsx64(ITText, { as: "span", className: "font-medium text-sm sm:text-base leading-snug", children: message })
|
|
8843
8890
|
] }),
|
|
8844
|
-
/* @__PURE__ */
|
|
8891
|
+
/* @__PURE__ */ jsx64(
|
|
8845
8892
|
"button",
|
|
8846
8893
|
{
|
|
8847
8894
|
onClick: handleClose,
|
|
8848
8895
|
className: "p-1.5 rounded-full hover:bg-black/15 transition-colors focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
8849
8896
|
"aria-label": "Close notification",
|
|
8850
|
-
children: /* @__PURE__ */
|
|
8897
|
+
children: /* @__PURE__ */ jsx64(FaTimes10, { className: "w-4 h-4" })
|
|
8851
8898
|
}
|
|
8852
8899
|
)
|
|
8853
8900
|
]
|
|
@@ -8887,7 +8934,7 @@ var toolbarActions = [
|
|
|
8887
8934
|
// src/components/atoms/tooltip/tooltip.tsx
|
|
8888
8935
|
import { useState as useState32 } from "react";
|
|
8889
8936
|
import clsx48 from "clsx";
|
|
8890
|
-
import { jsx as
|
|
8937
|
+
import { jsx as jsx65, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
8891
8938
|
var positionClasses2 = {
|
|
8892
8939
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
8893
8940
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -8925,8 +8972,8 @@ function ITTooltip({
|
|
|
8925
8972
|
children: [
|
|
8926
8973
|
children,
|
|
8927
8974
|
visible && /* @__PURE__ */ jsxs50("div", { className: clsx48("absolute z-[70] pointer-events-none", positionClasses2[position]), children: [
|
|
8928
|
-
/* @__PURE__ */
|
|
8929
|
-
/* @__PURE__ */
|
|
8975
|
+
/* @__PURE__ */ jsx65("div", { className: "bg-slate-800 dark:bg-slate-700 text-white text-xs rounded-lg px-2.5 py-1.5 whitespace-nowrap shadow-lg", children: /* @__PURE__ */ jsx65(ITText, { as: "span", children: content }) }),
|
|
8976
|
+
/* @__PURE__ */ jsx65("div", { className: clsx48("absolute", arrowClasses[position]) })
|
|
8930
8977
|
] })
|
|
8931
8978
|
]
|
|
8932
8979
|
}
|
|
@@ -8934,16 +8981,16 @@ function ITTooltip({
|
|
|
8934
8981
|
}
|
|
8935
8982
|
|
|
8936
8983
|
// src/components/molecules/wysiwyg/wysiwyg.tsx
|
|
8937
|
-
import { jsx as
|
|
8984
|
+
import { jsx as jsx66, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8938
8985
|
var INLINE_TAGS = /* @__PURE__ */ new Set(["STRONG", "B", "EM", "I", "U", "MARK"]);
|
|
8939
8986
|
var ACTION_META = {
|
|
8940
|
-
bold: { label: "Negrita", icon: /* @__PURE__ */
|
|
8941
|
-
italic: { label: "It\xE1lica", icon: /* @__PURE__ */
|
|
8942
|
-
underline: { label: "Subrayado", icon: /* @__PURE__ */
|
|
8943
|
-
highlight: { label: "Marcador", icon: /* @__PURE__ */
|
|
8944
|
-
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */
|
|
8945
|
-
ol: { label: "Lista numerada", icon: /* @__PURE__ */
|
|
8946
|
-
clear: { label: "Limpiar formato", icon: /* @__PURE__ */
|
|
8987
|
+
bold: { label: "Negrita", icon: /* @__PURE__ */ jsx66(FaBold, {}) },
|
|
8988
|
+
italic: { label: "It\xE1lica", icon: /* @__PURE__ */ jsx66(FaItalic, {}) },
|
|
8989
|
+
underline: { label: "Subrayado", icon: /* @__PURE__ */ jsx66(FaUnderline, {}) },
|
|
8990
|
+
highlight: { label: "Marcador", icon: /* @__PURE__ */ jsx66(FaHighlighter, {}) },
|
|
8991
|
+
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */ jsx66(FaListUl, {}) },
|
|
8992
|
+
ol: { label: "Lista numerada", icon: /* @__PURE__ */ jsx66(FaListOl, {}) },
|
|
8993
|
+
clear: { label: "Limpiar formato", icon: /* @__PURE__ */ jsx66(FaEraser, {}) }
|
|
8947
8994
|
};
|
|
8948
8995
|
function ITWysiwyg({
|
|
8949
8996
|
value,
|
|
@@ -9359,7 +9406,7 @@ function ITWysiwyg({
|
|
|
9359
9406
|
}) => {
|
|
9360
9407
|
const meta = ACTION_META[action];
|
|
9361
9408
|
const isActive = !!active[action];
|
|
9362
|
-
return /* @__PURE__ */
|
|
9409
|
+
return /* @__PURE__ */ jsx66(ITTooltip, { content: meta.label, children: /* @__PURE__ */ jsx66(
|
|
9363
9410
|
"button",
|
|
9364
9411
|
{
|
|
9365
9412
|
type: "button",
|
|
@@ -9380,7 +9427,7 @@ function ITWysiwyg({
|
|
|
9380
9427
|
) });
|
|
9381
9428
|
};
|
|
9382
9429
|
return /* @__PURE__ */ jsxs51("div", { className: inputWrapper(className), children: [
|
|
9383
|
-
label && /* @__PURE__ */
|
|
9430
|
+
label && /* @__PURE__ */ jsx66(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
9384
9431
|
/* @__PURE__ */ jsxs51(
|
|
9385
9432
|
"div",
|
|
9386
9433
|
{
|
|
@@ -9390,7 +9437,7 @@ function ITWysiwyg({
|
|
|
9390
9437
|
isLocked && "opacity-50 cursor-not-allowed bg-secondary-100 dark:bg-slate-800"
|
|
9391
9438
|
),
|
|
9392
9439
|
children: [
|
|
9393
|
-
/* @__PURE__ */
|
|
9440
|
+
/* @__PURE__ */ jsx66(
|
|
9394
9441
|
"div",
|
|
9395
9442
|
{
|
|
9396
9443
|
className: clsx49(
|
|
@@ -9398,12 +9445,12 @@ function ITWysiwyg({
|
|
|
9398
9445
|
isLocked && "bg-secondary-100 dark:bg-slate-900"
|
|
9399
9446
|
),
|
|
9400
9447
|
children: toolbar.map((action, i) => /* @__PURE__ */ jsxs51("span", { className: "flex items-center", children: [
|
|
9401
|
-
i > 0 && (action === "ul" || action === "ol" || action === "clear") && /* @__PURE__ */
|
|
9402
|
-
/* @__PURE__ */
|
|
9448
|
+
i > 0 && (action === "ul" || action === "ol" || action === "clear") && /* @__PURE__ */ jsx66("span", { className: "mx-1 h-4 w-px bg-secondary-200 dark:bg-slate-600" }),
|
|
9449
|
+
/* @__PURE__ */ jsx66(ToolbarButton, { action })
|
|
9403
9450
|
] }, action))
|
|
9404
9451
|
}
|
|
9405
9452
|
),
|
|
9406
|
-
/* @__PURE__ */
|
|
9453
|
+
/* @__PURE__ */ jsx66(
|
|
9407
9454
|
"div",
|
|
9408
9455
|
{
|
|
9409
9456
|
id: name,
|
|
@@ -9437,7 +9484,7 @@ function ITWysiwyg({
|
|
|
9437
9484
|
]
|
|
9438
9485
|
}
|
|
9439
9486
|
),
|
|
9440
|
-
error && /* @__PURE__ */
|
|
9487
|
+
error && /* @__PURE__ */ jsx66(ITText, { as: "span", className: inputError, children: error })
|
|
9441
9488
|
] });
|
|
9442
9489
|
}
|
|
9443
9490
|
|
|
@@ -9472,7 +9519,7 @@ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
|
|
|
9472
9519
|
})(UploadStatus || {});
|
|
9473
9520
|
|
|
9474
9521
|
// src/components/organisms/dropfile/dropfile.tsx
|
|
9475
|
-
import { Fragment as Fragment10, jsx as
|
|
9522
|
+
import { Fragment as Fragment10, jsx as jsx67, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
9476
9523
|
var ITDropfile = ({
|
|
9477
9524
|
onFileSelect,
|
|
9478
9525
|
onCancel,
|
|
@@ -9612,8 +9659,8 @@ var ITDropfile = ({
|
|
|
9612
9659
|
};
|
|
9613
9660
|
const { label, color, dotColor } = config2[status];
|
|
9614
9661
|
return /* @__PURE__ */ jsxs52("div", { className: `inline-flex items-center gap-2 px-2.5 py-1 rounded-full border ${color}`, children: [
|
|
9615
|
-
/* @__PURE__ */
|
|
9616
|
-
/* @__PURE__ */
|
|
9662
|
+
/* @__PURE__ */ jsx67("div", { className: `w-2 h-2 rounded-full ${dotColor}` }),
|
|
9663
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", className: "text-xs font-medium flex items-center gap-1.5", children: label })
|
|
9617
9664
|
] });
|
|
9618
9665
|
};
|
|
9619
9666
|
const onDrop = (acceptedFiles) => {
|
|
@@ -9706,16 +9753,16 @@ var ITDropfile = ({
|
|
|
9706
9753
|
}, [view, isConfirmed, uploadStatus, externalStatus, onStatusChange]);
|
|
9707
9754
|
const headerRow = /* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between mb-2", children: [
|
|
9708
9755
|
/* @__PURE__ */ jsxs52("label", { className: "block text-sm font-semibold text-secondary-700", children: [
|
|
9709
|
-
/* @__PURE__ */
|
|
9756
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", children: "Subir archivo " }),
|
|
9710
9757
|
/* @__PURE__ */ jsxs52(ITText, { as: "span", className: "text-secondary-400 font-normal text-xs", children: [
|
|
9711
9758
|
"(",
|
|
9712
9759
|
getFileExtensions(),
|
|
9713
9760
|
")"
|
|
9714
9761
|
] })
|
|
9715
9762
|
] }),
|
|
9716
|
-
showStatusBadge && selectedFile && /* @__PURE__ */
|
|
9763
|
+
showStatusBadge && selectedFile && /* @__PURE__ */ jsx67(StatusBadge, { status: uploadStatus })
|
|
9717
9764
|
] });
|
|
9718
|
-
const dropZoneOrPreview = /* @__PURE__ */
|
|
9765
|
+
const dropZoneOrPreview = /* @__PURE__ */ jsx67(Fragment10, { children: !selectedFile && !imagePreview ? /* @__PURE__ */ jsxs52(
|
|
9719
9766
|
"div",
|
|
9720
9767
|
{
|
|
9721
9768
|
...getRootProps(),
|
|
@@ -9725,29 +9772,29 @@ var ITDropfile = ({
|
|
|
9725
9772
|
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-secondary-300 bg-white hover:border-primary-400 hover:bg-secondary-50"}
|
|
9726
9773
|
`,
|
|
9727
9774
|
children: [
|
|
9728
|
-
/* @__PURE__ */
|
|
9729
|
-
/* @__PURE__ */
|
|
9775
|
+
/* @__PURE__ */ jsx67("input", { ...getInputProps() }),
|
|
9776
|
+
/* @__PURE__ */ jsx67("div", { className: `mb-3 p-3 rounded-full transition-colors duration-300 ${isDragActive ? "bg-primary-100" : "bg-secondary-100 group-hover:bg-primary-50"}`, children: /* @__PURE__ */ jsx67(
|
|
9730
9777
|
"svg",
|
|
9731
9778
|
{
|
|
9732
9779
|
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-secondary-400 group-hover:text-primary-500"}`,
|
|
9733
9780
|
fill: "none",
|
|
9734
9781
|
viewBox: "0 0 24 24",
|
|
9735
9782
|
stroke: "currentColor",
|
|
9736
|
-
children: /* @__PURE__ */
|
|
9783
|
+
children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" })
|
|
9737
9784
|
}
|
|
9738
9785
|
) }),
|
|
9739
|
-
/* @__PURE__ */
|
|
9786
|
+
/* @__PURE__ */ jsx67("div", { className: "text-center space-y-1", children: /* @__PURE__ */ jsx67(ITText, { as: "p", className: `text-sm font-medium transition-colors duration-300 ${isDragActive ? "text-primary-700" : "text-secondary-700"}`, children: isDragActive ? "\xA1Suelta aqu\xED!" : "Haz clic o arrastra" }) })
|
|
9740
9787
|
]
|
|
9741
9788
|
}
|
|
9742
9789
|
) : /* @__PURE__ */ jsxs52("div", { className: "w-full bg-white border border-secondary-200 rounded-xl shadow-sm overflow-hidden animate-fade-in", children: [
|
|
9743
|
-
/* @__PURE__ */
|
|
9744
|
-
/* @__PURE__ */
|
|
9790
|
+
/* @__PURE__ */ jsx67("div", { className: "flex items-center justify-between p-3 bg-secondary-50 border-b border-secondary-100", children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
9791
|
+
/* @__PURE__ */ jsx67("div", { className: "flex-shrink-0 w-8 h-8 rounded-lg bg-primary-100 flex items-center justify-center text-primary-600", children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ jsx67("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) : /* @__PURE__ */ jsx67("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }) }),
|
|
9745
9792
|
/* @__PURE__ */ jsxs52("div", { className: "min-w-0", children: [
|
|
9746
|
-
/* @__PURE__ */
|
|
9747
|
-
/* @__PURE__ */
|
|
9793
|
+
/* @__PURE__ */ jsx67(ITText, { as: "p", className: "text-xs font-medium text-secondary-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
9794
|
+
/* @__PURE__ */ jsx67(ITText, { as: "p", className: "text-[10px] text-secondary-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
9748
9795
|
] })
|
|
9749
9796
|
] }) }),
|
|
9750
|
-
/* @__PURE__ */
|
|
9797
|
+
/* @__PURE__ */ jsx67("div", { className: clsx50("relative bg-secondary-100 flex items-center justify-center", !contentClassName ? "max-h-[200px] min-h-[100px] overflow-auto" : contentClassName), children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ jsx67(
|
|
9751
9798
|
"img",
|
|
9752
9799
|
{
|
|
9753
9800
|
src: imagePreview,
|
|
@@ -9755,11 +9802,11 @@ var ITDropfile = ({
|
|
|
9755
9802
|
className: "w-full h-full object-contain max-h-[200px]"
|
|
9756
9803
|
}
|
|
9757
9804
|
) : /* @__PURE__ */ jsxs52("div", { className: "py-8 flex flex-col items-center text-secondary-400", children: [
|
|
9758
|
-
/* @__PURE__ */
|
|
9759
|
-
/* @__PURE__ */
|
|
9805
|
+
/* @__PURE__ */ jsx67("svg", { className: "w-10 h-10 mb-2 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z" }) }),
|
|
9806
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", className: "text-xs", children: "Sin vista previa" })
|
|
9760
9807
|
] }) }),
|
|
9761
|
-
/* @__PURE__ */
|
|
9762
|
-
/* @__PURE__ */
|
|
9808
|
+
/* @__PURE__ */ jsx67("div", { className: "px-3 py-2 bg-white border-t border-secondary-100 flex justify-end gap-2", children: !isConfirmed ? /* @__PURE__ */ jsxs52(Fragment10, { children: [
|
|
9809
|
+
/* @__PURE__ */ jsx67(
|
|
9763
9810
|
ITButton,
|
|
9764
9811
|
{
|
|
9765
9812
|
type: "button",
|
|
@@ -9767,10 +9814,10 @@ var ITDropfile = ({
|
|
|
9767
9814
|
color: "secondary",
|
|
9768
9815
|
size: "sm",
|
|
9769
9816
|
onClick: handleCancel,
|
|
9770
|
-
children: /* @__PURE__ */
|
|
9817
|
+
children: /* @__PURE__ */ jsx67(ITText, { children: "Cancelar" })
|
|
9771
9818
|
}
|
|
9772
9819
|
),
|
|
9773
|
-
/* @__PURE__ */
|
|
9820
|
+
/* @__PURE__ */ jsx67(
|
|
9774
9821
|
ITButton,
|
|
9775
9822
|
{
|
|
9776
9823
|
type: "button",
|
|
@@ -9779,8 +9826,8 @@ var ITDropfile = ({
|
|
|
9779
9826
|
size: "sm",
|
|
9780
9827
|
onClick: handleConfirm,
|
|
9781
9828
|
children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2", children: [
|
|
9782
|
-
/* @__PURE__ */
|
|
9783
|
-
/* @__PURE__ */
|
|
9829
|
+
/* @__PURE__ */ jsx67(ITText, { children: "Confirmar" }),
|
|
9830
|
+
/* @__PURE__ */ jsx67("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
9784
9831
|
] })
|
|
9785
9832
|
}
|
|
9786
9833
|
)
|
|
@@ -9793,12 +9840,12 @@ var ITDropfile = ({
|
|
|
9793
9840
|
size: "sm",
|
|
9794
9841
|
onClick: handleDelete,
|
|
9795
9842
|
children: [
|
|
9796
|
-
/* @__PURE__ */
|
|
9797
|
-
/* @__PURE__ */
|
|
9843
|
+
/* @__PURE__ */ jsx67("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) }),
|
|
9844
|
+
/* @__PURE__ */ jsx67(ITText, { children: "Eliminar" })
|
|
9798
9845
|
]
|
|
9799
9846
|
}
|
|
9800
9847
|
) }),
|
|
9801
|
-
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */
|
|
9848
|
+
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */ jsx67("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsx67("div", { className: "w-full bg-secondary-200 rounded-full h-1.5", children: /* @__PURE__ */ jsx67(
|
|
9802
9849
|
"div",
|
|
9803
9850
|
{
|
|
9804
9851
|
className: "bg-primary-600 h-1.5 rounded-full transition-all duration-1000 ease-out",
|
|
@@ -9812,7 +9859,7 @@ var ITDropfile = ({
|
|
|
9812
9859
|
if (view === "button") {
|
|
9813
9860
|
const hasFile = Boolean(selectedFile || imagePreview);
|
|
9814
9861
|
return /* @__PURE__ */ jsxs52("div", { className: clsx50("inline-block", containerClassName), children: [
|
|
9815
|
-
/* @__PURE__ */
|
|
9862
|
+
/* @__PURE__ */ jsx67(
|
|
9816
9863
|
ITButton,
|
|
9817
9864
|
{
|
|
9818
9865
|
type: "button",
|
|
@@ -9821,13 +9868,13 @@ var ITDropfile = ({
|
|
|
9821
9868
|
size: "sm",
|
|
9822
9869
|
onClick: () => setIsModalOpen(true),
|
|
9823
9870
|
children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2 max-w-[220px]", children: [
|
|
9824
|
-
/* @__PURE__ */
|
|
9825
|
-
/* @__PURE__ */
|
|
9826
|
-
showStatusBadge && hasFile && /* @__PURE__ */
|
|
9871
|
+
/* @__PURE__ */ jsx67("svg", { className: "w-4 h-4 flex-shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx67("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) }),
|
|
9872
|
+
/* @__PURE__ */ jsx67(ITText, { className: "truncate", children: selectedFile?.name || (hasFile ? "Archivo cargado" : buttonLabel) }),
|
|
9873
|
+
showStatusBadge && hasFile && /* @__PURE__ */ jsx67(StatusBadge, { status: uploadStatus })
|
|
9827
9874
|
] })
|
|
9828
9875
|
}
|
|
9829
9876
|
),
|
|
9830
|
-
/* @__PURE__ */
|
|
9877
|
+
/* @__PURE__ */ jsx67(ITDialog, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), title: modalTitle ?? buttonLabel, children: /* @__PURE__ */ jsxs52("div", { className: "w-full transition-all duration-300", children: [
|
|
9831
9878
|
headerRow,
|
|
9832
9879
|
dropZoneOrPreview
|
|
9833
9880
|
] }) })
|
|
@@ -9847,7 +9894,7 @@ import clsx51 from "clsx";
|
|
|
9847
9894
|
// src/components/organisms/topbar/topbar.tsx
|
|
9848
9895
|
import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
|
|
9849
9896
|
import { useRef as useRef22, useState as useState35 } from "react";
|
|
9850
|
-
import { jsx as
|
|
9897
|
+
import { jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9851
9898
|
function ITTopBar({
|
|
9852
9899
|
logo,
|
|
9853
9900
|
logoText,
|
|
@@ -9862,7 +9909,7 @@ function ITTopBar({
|
|
|
9862
9909
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState35(false);
|
|
9863
9910
|
const userMenuRef = useRef22(null);
|
|
9864
9911
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
9865
|
-
return /* @__PURE__ */
|
|
9912
|
+
return /* @__PURE__ */ jsx68(
|
|
9866
9913
|
"header",
|
|
9867
9914
|
{
|
|
9868
9915
|
className: "sticky top-0 z-40 backdrop-blur-md transition-all duration-300",
|
|
@@ -9873,7 +9920,7 @@ function ITTopBar({
|
|
|
9873
9920
|
},
|
|
9874
9921
|
children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-between h-[72px] px-6 lg:px-8", children: [
|
|
9875
9922
|
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-5", children: [
|
|
9876
|
-
showMobileMenuButton && /* @__PURE__ */
|
|
9923
|
+
showMobileMenuButton && /* @__PURE__ */ jsx68(
|
|
9877
9924
|
"button",
|
|
9878
9925
|
{
|
|
9879
9926
|
className: "lg:hidden p-2.5 rounded-xl transition-colors duration-200",
|
|
@@ -9883,12 +9930,12 @@ function ITTopBar({
|
|
|
9883
9930
|
onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)",
|
|
9884
9931
|
onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
|
|
9885
9932
|
onClick: onToggleMobileMenu,
|
|
9886
|
-
children: /* @__PURE__ */
|
|
9933
|
+
children: /* @__PURE__ */ jsx68(FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
|
|
9887
9934
|
}
|
|
9888
9935
|
),
|
|
9889
9936
|
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-3", children: [
|
|
9890
|
-
logo && /* @__PURE__ */
|
|
9891
|
-
logoText && /* @__PURE__ */
|
|
9937
|
+
logo && /* @__PURE__ */ jsx68("div", { className: "flex-shrink-0 drop-shadow-sm", children: logo }),
|
|
9938
|
+
logoText && /* @__PURE__ */ jsx68(
|
|
9892
9939
|
ITText,
|
|
9893
9940
|
{
|
|
9894
9941
|
as: "span",
|
|
@@ -9898,7 +9945,7 @@ function ITTopBar({
|
|
|
9898
9945
|
}
|
|
9899
9946
|
)
|
|
9900
9947
|
] }),
|
|
9901
|
-
navItems && navItems.length > 0 && /* @__PURE__ */
|
|
9948
|
+
navItems && navItems.length > 0 && /* @__PURE__ */ jsx68("nav", { className: "hidden md:flex ml-8 space-x-1 border-l pl-8", style: { borderColor: "var(--it-topbar-border, rgba(15, 23, 42, 0.06))" }, children: navItems.map((item) => /* @__PURE__ */ jsx68(
|
|
9902
9949
|
"button",
|
|
9903
9950
|
{
|
|
9904
9951
|
onClick: () => onNavItemClick?.(item.id),
|
|
@@ -9913,14 +9960,14 @@ function ITTopBar({
|
|
|
9913
9960
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
9914
9961
|
},
|
|
9915
9962
|
children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
9916
|
-
item.icon && /* @__PURE__ */
|
|
9917
|
-
/* @__PURE__ */
|
|
9963
|
+
item.icon && /* @__PURE__ */ jsx68("span", { className: "opacity-70", children: item.icon }),
|
|
9964
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", children: item.label })
|
|
9918
9965
|
] })
|
|
9919
9966
|
},
|
|
9920
9967
|
item.id
|
|
9921
9968
|
)) })
|
|
9922
9969
|
] }),
|
|
9923
|
-
centerContent && /* @__PURE__ */
|
|
9970
|
+
centerContent && /* @__PURE__ */ jsx68("div", { className: "hidden lg:flex flex-1 min-w-0 items-center justify-center px-4", children: /* @__PURE__ */ jsx68("div", { className: "w-full max-w-[420px]", children: centerContent }) }),
|
|
9924
9971
|
(children || userMenu) && /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
9925
9972
|
children,
|
|
9926
9973
|
userMenu && /* @__PURE__ */ jsxs53("div", { className: "relative", children: [
|
|
@@ -9941,18 +9988,18 @@ function ITTopBar({
|
|
|
9941
9988
|
onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
|
|
9942
9989
|
children: [
|
|
9943
9990
|
/* @__PURE__ */ jsxs53("div", { className: "relative", children: [
|
|
9944
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
9991
|
+
userMenu.userImage ? /* @__PURE__ */ jsx68(
|
|
9945
9992
|
"img",
|
|
9946
9993
|
{
|
|
9947
9994
|
className: "w-9 h-9 rounded-full object-cover ring-2 ring-white shadow-sm",
|
|
9948
9995
|
src: userMenu.userImage,
|
|
9949
9996
|
alt: "Current user"
|
|
9950
9997
|
}
|
|
9951
|
-
) : /* @__PURE__ */
|
|
9952
|
-
/* @__PURE__ */
|
|
9998
|
+
) : /* @__PURE__ */ jsx68("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ jsx68(FaUserCircle2, { className: "w-6 h-6", style: { color: "var(--it-topbar-icon, #94a3b8)" } }) }),
|
|
9999
|
+
/* @__PURE__ */ jsx68("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
|
|
9953
10000
|
] }),
|
|
9954
10001
|
/* @__PURE__ */ jsxs53("div", { className: "hidden sm:flex flex-col text-left py-0.5", children: [
|
|
9955
|
-
/* @__PURE__ */
|
|
10002
|
+
/* @__PURE__ */ jsx68(
|
|
9956
10003
|
ITText,
|
|
9957
10004
|
{
|
|
9958
10005
|
as: "span",
|
|
@@ -9961,7 +10008,7 @@ function ITTopBar({
|
|
|
9961
10008
|
children: userMenu.userName
|
|
9962
10009
|
}
|
|
9963
10010
|
),
|
|
9964
|
-
/* @__PURE__ */
|
|
10011
|
+
/* @__PURE__ */ jsx68(
|
|
9965
10012
|
ITText,
|
|
9966
10013
|
{
|
|
9967
10014
|
as: "span",
|
|
@@ -9988,14 +10035,14 @@ function ITTopBar({
|
|
|
9988
10035
|
},
|
|
9989
10036
|
children: [
|
|
9990
10037
|
/* @__PURE__ */ jsxs53("div", { className: "px-5 py-4 border-b", style: { borderColor: "var(--it-topbar-user-dropdown-border, #f1f5f9)", backgroundColor: "var(--it-topbar-user-bg, #f8fafc)" }, children: [
|
|
9991
|
-
/* @__PURE__ */
|
|
9992
|
-
/* @__PURE__ */
|
|
10038
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", className: "block font-bold text-[0.9rem]", style: { color: "var(--it-topbar-user-text, #0f172a)" }, children: userMenu.userName }),
|
|
10039
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", className: "block text-xs font-medium truncate mt-0.5", style: { color: "var(--it-topbar-user-subtitle, #64748b)" }, children: userMenu.userEmail })
|
|
9993
10040
|
] }),
|
|
9994
|
-
/* @__PURE__ */
|
|
10041
|
+
/* @__PURE__ */ jsx68("ul", { className: "py-2", children: userMenu.menuItems.map((m, i) => {
|
|
9995
10042
|
const isDestructive = m.label.toLowerCase().includes("salir") || m.label.toLowerCase().includes("cerrar") || m.label.toLowerCase().includes("logout");
|
|
9996
10043
|
return /* @__PURE__ */ jsxs53("li", { className: "px-2", children: [
|
|
9997
|
-
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */
|
|
9998
|
-
/* @__PURE__ */
|
|
10044
|
+
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */ jsx68("div", { className: "h-px bg-slate-100 my-1 mx-2" }),
|
|
10045
|
+
/* @__PURE__ */ jsx68(
|
|
9999
10046
|
"button",
|
|
10000
10047
|
{
|
|
10001
10048
|
onClick: () => {
|
|
@@ -10010,7 +10057,7 @@ function ITTopBar({
|
|
|
10010
10057
|
onMouseLeave: (e) => {
|
|
10011
10058
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
10012
10059
|
},
|
|
10013
|
-
children: /* @__PURE__ */
|
|
10060
|
+
children: /* @__PURE__ */ jsx68(ITText, { as: "span", children: m.label })
|
|
10014
10061
|
}
|
|
10015
10062
|
)
|
|
10016
10063
|
] }, i);
|
|
@@ -10026,7 +10073,7 @@ function ITTopBar({
|
|
|
10026
10073
|
}
|
|
10027
10074
|
|
|
10028
10075
|
// src/components/templates/layout/layout.tsx
|
|
10029
|
-
import { jsx as
|
|
10076
|
+
import { jsx as jsx69, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
10030
10077
|
function ITLayout({
|
|
10031
10078
|
topBar,
|
|
10032
10079
|
sidebar,
|
|
@@ -10042,7 +10089,7 @@ function ITLayout({
|
|
|
10042
10089
|
}) : () => setInternalCollapsed((v) => !v);
|
|
10043
10090
|
const layoutTokens = theme.layout;
|
|
10044
10091
|
return /* @__PURE__ */ jsxs54("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
10045
|
-
/* @__PURE__ */
|
|
10092
|
+
/* @__PURE__ */ jsx69(
|
|
10046
10093
|
ITTopBar,
|
|
10047
10094
|
{
|
|
10048
10095
|
...topBar,
|
|
@@ -10057,13 +10104,13 @@ function ITLayout({
|
|
|
10057
10104
|
style: { backgroundColor: layoutTokens.backgroundColor },
|
|
10058
10105
|
children: [
|
|
10059
10106
|
/* @__PURE__ */ jsxs54("div", { className: "hidden lg:block relative z-40 h-full", children: [
|
|
10060
|
-
/* @__PURE__ */
|
|
10107
|
+
/* @__PURE__ */ jsx69(
|
|
10061
10108
|
"div",
|
|
10062
10109
|
{
|
|
10063
10110
|
className: `${desktopCollapsed ? "w-[88px]" : "w-[280px]"} h-full flex-shrink-0`
|
|
10064
10111
|
}
|
|
10065
10112
|
),
|
|
10066
|
-
/* @__PURE__ */
|
|
10113
|
+
/* @__PURE__ */ jsx69("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx69(
|
|
10067
10114
|
ITSidebar,
|
|
10068
10115
|
{
|
|
10069
10116
|
...sidebar,
|
|
@@ -10074,17 +10121,17 @@ function ITLayout({
|
|
|
10074
10121
|
}
|
|
10075
10122
|
) })
|
|
10076
10123
|
] }),
|
|
10077
|
-
mobileSidebarOpen && /* @__PURE__ */
|
|
10124
|
+
mobileSidebarOpen && /* @__PURE__ */ jsx69(
|
|
10078
10125
|
"div",
|
|
10079
10126
|
{
|
|
10080
10127
|
className: "lg:hidden fixed inset-0 z-[40] transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
10081
10128
|
onClick: () => setMobileSidebarOpen(false),
|
|
10082
|
-
children: /* @__PURE__ */
|
|
10129
|
+
children: /* @__PURE__ */ jsx69(
|
|
10083
10130
|
"div",
|
|
10084
10131
|
{
|
|
10085
10132
|
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
10086
10133
|
onClick: (e) => e.stopPropagation(),
|
|
10087
|
-
children: /* @__PURE__ */
|
|
10134
|
+
children: /* @__PURE__ */ jsx69(
|
|
10088
10135
|
ITSidebar,
|
|
10089
10136
|
{
|
|
10090
10137
|
...sidebar,
|
|
@@ -10100,7 +10147,7 @@ function ITLayout({
|
|
|
10100
10147
|
)
|
|
10101
10148
|
}
|
|
10102
10149
|
),
|
|
10103
|
-
/* @__PURE__ */
|
|
10150
|
+
/* @__PURE__ */ jsx69("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx69("div", { className: clsx51("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) })
|
|
10104
10151
|
]
|
|
10105
10152
|
}
|
|
10106
10153
|
)
|
|
@@ -10116,7 +10163,7 @@ var sizeClasses = {
|
|
|
10116
10163
|
};
|
|
10117
10164
|
|
|
10118
10165
|
// src/components/atoms/loader/loader.tsx
|
|
10119
|
-
import { jsx as
|
|
10166
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
10120
10167
|
function ITLoader({
|
|
10121
10168
|
size = "md",
|
|
10122
10169
|
variant = "spinner",
|
|
@@ -10131,22 +10178,22 @@ function ITLoader({
|
|
|
10131
10178
|
const bgStyle = isCssValue ? { backgroundColor: resolvedColor } : {};
|
|
10132
10179
|
const colorClass = !isCssValue ? color : "";
|
|
10133
10180
|
if (variant === "spinner") {
|
|
10134
|
-
return /* @__PURE__ */
|
|
10181
|
+
return /* @__PURE__ */ jsx70(
|
|
10135
10182
|
"div",
|
|
10136
10183
|
{
|
|
10137
10184
|
className: `inline-block ${sizeClasses[size]} animate-spin rounded-full border-2 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${colorClass} ${className}`,
|
|
10138
10185
|
role: "status",
|
|
10139
10186
|
style,
|
|
10140
|
-
children: /* @__PURE__ */
|
|
10187
|
+
children: /* @__PURE__ */ jsx70(ITText, { as: "span", className: "!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]", children: "Loading..." })
|
|
10141
10188
|
}
|
|
10142
10189
|
);
|
|
10143
10190
|
}
|
|
10144
10191
|
if (variant === "dots") {
|
|
10145
|
-
return /* @__PURE__ */
|
|
10192
|
+
return /* @__PURE__ */ jsx70(
|
|
10146
10193
|
"div",
|
|
10147
10194
|
{
|
|
10148
10195
|
className: `flex items-center justify-center space-x-2 ${className}`,
|
|
10149
|
-
children: [...Array(3)].map((_, i) => /* @__PURE__ */
|
|
10196
|
+
children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsx70(
|
|
10150
10197
|
"div",
|
|
10151
10198
|
{
|
|
10152
10199
|
className: `${sizeClasses[size.replace(/l|g/, "")]} animate-bounce rounded-full ${colorClass}`,
|
|
@@ -10161,11 +10208,11 @@ function ITLoader({
|
|
|
10161
10208
|
);
|
|
10162
10209
|
}
|
|
10163
10210
|
if (variant === "bar") {
|
|
10164
|
-
return /* @__PURE__ */
|
|
10211
|
+
return /* @__PURE__ */ jsx70(
|
|
10165
10212
|
"div",
|
|
10166
10213
|
{
|
|
10167
10214
|
className: `w-full ${size === "sm" ? "h-1" : size === "md" ? "h-1.5" : size === "lg" ? "h-2" : "h-2.5"} bg-secondary-200 rounded-full overflow-hidden ${className}`,
|
|
10168
|
-
children: /* @__PURE__ */
|
|
10215
|
+
children: /* @__PURE__ */ jsx70(
|
|
10169
10216
|
"div",
|
|
10170
10217
|
{
|
|
10171
10218
|
className: `h-full animate-progress ${colorClass}`,
|
|
@@ -10181,7 +10228,7 @@ function ITLoader({
|
|
|
10181
10228
|
);
|
|
10182
10229
|
}
|
|
10183
10230
|
if (variant === "pulse") {
|
|
10184
|
-
return /* @__PURE__ */
|
|
10231
|
+
return /* @__PURE__ */ jsx70(
|
|
10185
10232
|
"div",
|
|
10186
10233
|
{
|
|
10187
10234
|
className: `rounded-full ${sizeClasses[size]} animate-pulse ${colorClass} ${className}`,
|
|
@@ -10196,7 +10243,7 @@ function ITLoader({
|
|
|
10196
10243
|
import clsx52 from "clsx";
|
|
10197
10244
|
import { useEffect as useEffect18, useRef as useRef23, useState as useState37 } from "react";
|
|
10198
10245
|
import { FaChevronLeft as FaChevronLeft4, FaChevronRight as FaChevronRight5, FaCheck as FaCheck5 } from "react-icons/fa";
|
|
10199
|
-
import { jsx as
|
|
10246
|
+
import { jsx as jsx71, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
10200
10247
|
function ITStepper({
|
|
10201
10248
|
steps,
|
|
10202
10249
|
currentStep,
|
|
@@ -10263,23 +10310,23 @@ function ITStepper({
|
|
|
10263
10310
|
const renderStepContent = (index, isCompleted) => {
|
|
10264
10311
|
const step = steps[index];
|
|
10265
10312
|
if (isCompleted) {
|
|
10266
|
-
return /* @__PURE__ */
|
|
10313
|
+
return /* @__PURE__ */ jsx71(FaCheck5, { className: "w-4 h-4" });
|
|
10267
10314
|
}
|
|
10268
10315
|
if (step.icon && useIcons) {
|
|
10269
|
-
return /* @__PURE__ */
|
|
10316
|
+
return /* @__PURE__ */ jsx71("div", { className: "flex items-center justify-center w-5 h-5", children: step.icon });
|
|
10270
10317
|
}
|
|
10271
|
-
return /* @__PURE__ */
|
|
10318
|
+
return /* @__PURE__ */ jsx71(ITText, { as: "span", className: "text-sm font-semibold", children: index + 1 });
|
|
10272
10319
|
};
|
|
10273
10320
|
return /* @__PURE__ */ jsxs55("div", { className: clsx52("w-full max-w-5xl mx-auto px-4", containerClassName), children: [
|
|
10274
10321
|
/* @__PURE__ */ jsxs55("div", { className: "relative mb-8", children: [
|
|
10275
|
-
/* @__PURE__ */
|
|
10322
|
+
/* @__PURE__ */ jsx71(
|
|
10276
10323
|
"div",
|
|
10277
10324
|
{
|
|
10278
10325
|
className: "absolute left-6 right-6 top-5 h-1 bg-secondary-200 rounded-full z-0",
|
|
10279
10326
|
"aria-hidden": true
|
|
10280
10327
|
}
|
|
10281
10328
|
),
|
|
10282
|
-
/* @__PURE__ */
|
|
10329
|
+
/* @__PURE__ */ jsx71(
|
|
10283
10330
|
"div",
|
|
10284
10331
|
{
|
|
10285
10332
|
ref: progressRef,
|
|
@@ -10287,11 +10334,11 @@ function ITStepper({
|
|
|
10287
10334
|
"aria-hidden": true
|
|
10288
10335
|
}
|
|
10289
10336
|
),
|
|
10290
|
-
/* @__PURE__ */
|
|
10337
|
+
/* @__PURE__ */ jsx71("div", { className: "flex items-start justify-between space-x-2 relative z-20", children: steps.map((step, idx) => {
|
|
10291
10338
|
const isActive = idx === currentStep;
|
|
10292
10339
|
const isCompleted = idx < currentStep;
|
|
10293
10340
|
const hasIcon = step.icon && useIcons;
|
|
10294
|
-
return /* @__PURE__ */
|
|
10341
|
+
return /* @__PURE__ */ jsx71(
|
|
10295
10342
|
"button",
|
|
10296
10343
|
{
|
|
10297
10344
|
type: "button",
|
|
@@ -10302,7 +10349,7 @@ function ITStepper({
|
|
|
10302
10349
|
className: "flex-1 group",
|
|
10303
10350
|
title: step.label,
|
|
10304
10351
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex flex-col items-center", children: [
|
|
10305
|
-
/* @__PURE__ */
|
|
10352
|
+
/* @__PURE__ */ jsx71(
|
|
10306
10353
|
"div",
|
|
10307
10354
|
{
|
|
10308
10355
|
className: clsx52(
|
|
@@ -10316,7 +10363,7 @@ function ITStepper({
|
|
|
10316
10363
|
children: renderStepContent(idx, isCompleted)
|
|
10317
10364
|
}
|
|
10318
10365
|
),
|
|
10319
|
-
/* @__PURE__ */
|
|
10366
|
+
/* @__PURE__ */ jsx71(
|
|
10320
10367
|
ITText,
|
|
10321
10368
|
{
|
|
10322
10369
|
as: "span",
|
|
@@ -10334,7 +10381,7 @@ function ITStepper({
|
|
|
10334
10381
|
);
|
|
10335
10382
|
}) })
|
|
10336
10383
|
] }),
|
|
10337
|
-
/* @__PURE__ */
|
|
10384
|
+
/* @__PURE__ */ jsx71(
|
|
10338
10385
|
"div",
|
|
10339
10386
|
{
|
|
10340
10387
|
ref: contentRef,
|
|
@@ -10351,7 +10398,7 @@ function ITStepper({
|
|
|
10351
10398
|
}
|
|
10352
10399
|
),
|
|
10353
10400
|
/* @__PURE__ */ jsxs55("div", { className: "flex justify-between items-center mt-6", children: [
|
|
10354
|
-
/* @__PURE__ */
|
|
10401
|
+
/* @__PURE__ */ jsx71(
|
|
10355
10402
|
ITButton,
|
|
10356
10403
|
{
|
|
10357
10404
|
variant: "outlined",
|
|
@@ -10359,8 +10406,8 @@ function ITStepper({
|
|
|
10359
10406
|
disabled: currentStep === 0,
|
|
10360
10407
|
onClick: prevStep,
|
|
10361
10408
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2", children: [
|
|
10362
|
-
/* @__PURE__ */
|
|
10363
|
-
/* @__PURE__ */
|
|
10409
|
+
/* @__PURE__ */ jsx71(FaChevronLeft4, {}),
|
|
10410
|
+
/* @__PURE__ */ jsx71(ITText, { as: "span", children: "Atr\xE1s" })
|
|
10364
10411
|
] })
|
|
10365
10412
|
}
|
|
10366
10413
|
),
|
|
@@ -10371,7 +10418,7 @@ function ITStepper({
|
|
|
10371
10418
|
" de ",
|
|
10372
10419
|
steps.length
|
|
10373
10420
|
] }),
|
|
10374
|
-
/* @__PURE__ */
|
|
10421
|
+
/* @__PURE__ */ jsx71(
|
|
10375
10422
|
ITButton,
|
|
10376
10423
|
{
|
|
10377
10424
|
variant: "solid",
|
|
@@ -10379,8 +10426,8 @@ function ITStepper({
|
|
|
10379
10426
|
disabled: disableNext,
|
|
10380
10427
|
onClick: nextStep,
|
|
10381
10428
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2", children: [
|
|
10382
|
-
/* @__PURE__ */
|
|
10383
|
-
currentStep === steps.length - 1 ? /* @__PURE__ */
|
|
10429
|
+
/* @__PURE__ */ jsx71(ITText, { as: "span", children: currentStep === steps.length - 1 ? "Finalizar" : "Siguiente" }),
|
|
10430
|
+
currentStep === steps.length - 1 ? /* @__PURE__ */ jsx71(FaCheck5, {}) : /* @__PURE__ */ jsx71(FaChevronRight5, {})
|
|
10384
10431
|
] })
|
|
10385
10432
|
}
|
|
10386
10433
|
)
|
|
@@ -10568,7 +10615,7 @@ var PRESETS = [
|
|
|
10568
10615
|
];
|
|
10569
10616
|
|
|
10570
10617
|
// src/components/theme-provider/themeProvider.tsx
|
|
10571
|
-
import { jsx as
|
|
10618
|
+
import { jsx as jsx72, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
10572
10619
|
var STORAGE_KEY = "it-theme-palette";
|
|
10573
10620
|
var SHADOW_LEVELS = {
|
|
10574
10621
|
0: {
|
|
@@ -11966,7 +12013,7 @@ function ITThemeProvider({
|
|
|
11966
12013
|
children: [
|
|
11967
12014
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
11968
12015
|
/* @__PURE__ */ jsxs56("div", { className: "relative w-10 h-10 rounded-xl border-2 border-slate-200 dark:border-slate-700 overflow-hidden cursor-pointer flex-shrink-0 shadow-sm hover:scale-105 transition-transform", children: [
|
|
11969
|
-
/* @__PURE__ */
|
|
12016
|
+
/* @__PURE__ */ jsx72(
|
|
11970
12017
|
"input",
|
|
11971
12018
|
{
|
|
11972
12019
|
type: "color",
|
|
@@ -11975,23 +12022,23 @@ function ITThemeProvider({
|
|
|
11975
12022
|
className: "absolute inset-0 opacity-0 cursor-pointer w-full h-full"
|
|
11976
12023
|
}
|
|
11977
12024
|
),
|
|
11978
|
-
/* @__PURE__ */
|
|
12025
|
+
/* @__PURE__ */ jsx72("div", { className: "w-full h-full", style: { backgroundColor: value } })
|
|
11979
12026
|
] }),
|
|
11980
12027
|
/* @__PURE__ */ jsxs56("div", { className: "flex flex-col min-w-0", children: [
|
|
11981
|
-
/* @__PURE__ */
|
|
12028
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-xs font-bold text-slate-700 dark:text-slate-300 truncate capitalize", children: label.replace(/([A-Z])/g, " $1").trim() }),
|
|
11982
12029
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
11983
|
-
/* @__PURE__ */
|
|
12030
|
+
/* @__PURE__ */ jsx72(
|
|
11984
12031
|
"span",
|
|
11985
12032
|
{
|
|
11986
12033
|
className: "w-3 h-3 rounded-full border border-slate-200 dark:border-slate-600",
|
|
11987
12034
|
style: { backgroundColor: value }
|
|
11988
12035
|
}
|
|
11989
12036
|
),
|
|
11990
|
-
/* @__PURE__ */
|
|
12037
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "font-mono text-[11px] text-slate-400", children: value })
|
|
11991
12038
|
] })
|
|
11992
12039
|
] })
|
|
11993
12040
|
] }),
|
|
11994
|
-
/* @__PURE__ */
|
|
12041
|
+
/* @__PURE__ */ jsx72(
|
|
11995
12042
|
"input",
|
|
11996
12043
|
{
|
|
11997
12044
|
type: "text",
|
|
@@ -12017,7 +12064,7 @@ function ITThemeProvider({
|
|
|
12017
12064
|
onClick: () => applyPreset(preset.colors),
|
|
12018
12065
|
className: `relative flex flex-col items-start p-2.5 rounded-xl border text-left transition-all group ${isSelected ? "border-primary-500 bg-primary-500/5 shadow-sm ring-1 ring-primary-500/20" : "border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900/50 hover:border-slate-300 dark:hover:border-slate-600"}`,
|
|
12019
12066
|
children: [
|
|
12020
|
-
isCustom && /* @__PURE__ */
|
|
12067
|
+
isCustom && /* @__PURE__ */ jsx72(
|
|
12021
12068
|
"span",
|
|
12022
12069
|
{
|
|
12023
12070
|
onClick: (e) => {
|
|
@@ -12026,11 +12073,11 @@ function ITThemeProvider({
|
|
|
12026
12073
|
},
|
|
12027
12074
|
className: "absolute top-1.5 right-1.5 opacity-0 group-hover:opacity-100 p-0.5 rounded-md hover:bg-danger-500/10 hover:text-danger-500 text-slate-400 dark:text-slate-500 cursor-pointer transition-all z-10",
|
|
12028
12075
|
title: "Eliminar",
|
|
12029
|
-
children: /* @__PURE__ */
|
|
12076
|
+
children: /* @__PURE__ */ jsx72(MdClose, { size: 12 })
|
|
12030
12077
|
}
|
|
12031
12078
|
),
|
|
12032
|
-
/* @__PURE__ */
|
|
12033
|
-
/* @__PURE__ */
|
|
12079
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-xs font-semibold truncate w-full mb-1.5 pr-4 text-slate-700 dark:text-slate-300", children: preset.name }),
|
|
12080
|
+
/* @__PURE__ */ jsx72("div", { className: "flex gap-1", children: ["primary", "secondary", "ternary", "success"].map((c) => /* @__PURE__ */ jsx72(
|
|
12034
12081
|
"span",
|
|
12035
12082
|
{
|
|
12036
12083
|
className: "w-3 h-3 rounded-full border border-black/10",
|
|
@@ -12058,17 +12105,17 @@ function ITThemeProvider({
|
|
|
12058
12105
|
},
|
|
12059
12106
|
children: [
|
|
12060
12107
|
children,
|
|
12061
|
-
showFab && /* @__PURE__ */
|
|
12108
|
+
showFab && /* @__PURE__ */ jsx72(
|
|
12062
12109
|
"button",
|
|
12063
12110
|
{
|
|
12064
12111
|
onClick: () => setIsOpen((prev) => !prev),
|
|
12065
12112
|
className: "it-theme-fab it-theme-bounce",
|
|
12066
12113
|
style: { backgroundColor: "var(--color-primary)" },
|
|
12067
12114
|
"aria-label": "Configurar Paleta de Colores",
|
|
12068
|
-
children: /* @__PURE__ */
|
|
12115
|
+
children: /* @__PURE__ */ jsx72(MdPalette, { size: 28 })
|
|
12069
12116
|
}
|
|
12070
12117
|
),
|
|
12071
|
-
showFab && /* @__PURE__ */
|
|
12118
|
+
showFab && /* @__PURE__ */ jsx72(
|
|
12072
12119
|
ITDialog,
|
|
12073
12120
|
{
|
|
12074
12121
|
isOpen,
|
|
@@ -12078,8 +12125,8 @@ function ITThemeProvider({
|
|
|
12078
12125
|
children: /* @__PURE__ */ jsxs56("div", { className: "flex gap-6 h-[580px]", children: [
|
|
12079
12126
|
/* @__PURE__ */ jsxs56("div", { className: "w-64 flex-shrink-0 flex flex-col gap-5 overflow-y-auto pr-1", children: [
|
|
12080
12127
|
/* @__PURE__ */ jsxs56("div", { children: [
|
|
12081
|
-
/* @__PURE__ */
|
|
12082
|
-
/* @__PURE__ */
|
|
12128
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500 mb-2.5 block", children: "Apariencia" }),
|
|
12129
|
+
/* @__PURE__ */ jsx72(
|
|
12083
12130
|
ITSegmentedControl,
|
|
12084
12131
|
{
|
|
12085
12132
|
options: [
|
|
@@ -12094,15 +12141,15 @@ function ITThemeProvider({
|
|
|
12094
12141
|
)
|
|
12095
12142
|
] }),
|
|
12096
12143
|
/* @__PURE__ */ jsxs56("div", { children: [
|
|
12097
|
-
/* @__PURE__ */
|
|
12098
|
-
/* @__PURE__ */
|
|
12144
|
+
/* @__PURE__ */ jsx72("div", { className: "flex items-center justify-between mb-2.5", children: /* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500", children: "Presets" }) }),
|
|
12145
|
+
/* @__PURE__ */ jsx72("div", { className: "grid grid-cols-2 gap-2", children: PRESETS.map((preset) => /* @__PURE__ */ jsx72(PresetCard, { preset }, preset.name)) })
|
|
12099
12146
|
] }),
|
|
12100
12147
|
customPresets.length > 0 && /* @__PURE__ */ jsxs56("div", { children: [
|
|
12101
|
-
/* @__PURE__ */
|
|
12102
|
-
/* @__PURE__ */
|
|
12148
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500 mb-2.5 block", children: "Mis Temas" }),
|
|
12149
|
+
/* @__PURE__ */ jsx72("div", { className: "flex flex-col gap-1.5", children: customPresets.map((preset) => /* @__PURE__ */ jsx72(PresetCard, { preset, isCustom: true }, preset.name)) })
|
|
12103
12150
|
] }),
|
|
12104
12151
|
isSavingPreset && /* @__PURE__ */ jsxs56("div", { className: "flex flex-col gap-2 p-3 rounded-xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900/50", children: [
|
|
12105
|
-
/* @__PURE__ */
|
|
12152
|
+
/* @__PURE__ */ jsx72(
|
|
12106
12153
|
ITInput,
|
|
12107
12154
|
{
|
|
12108
12155
|
name: "presetName",
|
|
@@ -12121,7 +12168,7 @@ function ITThemeProvider({
|
|
|
12121
12168
|
}
|
|
12122
12169
|
),
|
|
12123
12170
|
/* @__PURE__ */ jsxs56("div", { className: "flex gap-2", children: [
|
|
12124
|
-
/* @__PURE__ */
|
|
12171
|
+
/* @__PURE__ */ jsx72(
|
|
12125
12172
|
ITButton,
|
|
12126
12173
|
{
|
|
12127
12174
|
label: "Guardar",
|
|
@@ -12132,7 +12179,7 @@ function ITThemeProvider({
|
|
|
12132
12179
|
className: "flex-1"
|
|
12133
12180
|
}
|
|
12134
12181
|
),
|
|
12135
|
-
/* @__PURE__ */
|
|
12182
|
+
/* @__PURE__ */ jsx72(
|
|
12136
12183
|
ITButton,
|
|
12137
12184
|
{
|
|
12138
12185
|
label: "X",
|
|
@@ -12146,31 +12193,31 @@ function ITThemeProvider({
|
|
|
12146
12193
|
)
|
|
12147
12194
|
] })
|
|
12148
12195
|
] }),
|
|
12149
|
-
!isSavingPreset && /* @__PURE__ */
|
|
12196
|
+
!isSavingPreset && /* @__PURE__ */ jsx72(
|
|
12150
12197
|
ITButton,
|
|
12151
12198
|
{
|
|
12152
12199
|
variant: "outlined",
|
|
12153
|
-
icon: /* @__PURE__ */
|
|
12200
|
+
icon: /* @__PURE__ */ jsx72(MdPalette, { size: 14 }),
|
|
12154
12201
|
label: "Guardar actual",
|
|
12155
12202
|
onClick: () => setIsSavingPreset(true),
|
|
12156
12203
|
size: "sm"
|
|
12157
12204
|
}
|
|
12158
12205
|
),
|
|
12159
|
-
/* @__PURE__ */
|
|
12206
|
+
/* @__PURE__ */ jsx72(
|
|
12160
12207
|
ITButton,
|
|
12161
12208
|
{
|
|
12162
12209
|
variant: "outlined",
|
|
12163
12210
|
color: "danger",
|
|
12164
|
-
icon: /* @__PURE__ */
|
|
12211
|
+
icon: /* @__PURE__ */ jsx72(MdRefresh, { size: 14 }),
|
|
12165
12212
|
label: "Restaurar default",
|
|
12166
12213
|
onClick: resetTheme,
|
|
12167
12214
|
size: "sm"
|
|
12168
12215
|
}
|
|
12169
12216
|
)
|
|
12170
12217
|
] }),
|
|
12171
|
-
/* @__PURE__ */
|
|
12218
|
+
/* @__PURE__ */ jsx72(ITDivider, { orientation: "vertical" }),
|
|
12172
12219
|
/* @__PURE__ */ jsxs56("div", { className: "flex-1 flex flex-col min-w-0", children: [
|
|
12173
|
-
/* @__PURE__ */
|
|
12220
|
+
/* @__PURE__ */ jsx72(
|
|
12174
12221
|
tabs_default,
|
|
12175
12222
|
{
|
|
12176
12223
|
variant: "pill",
|
|
@@ -12178,7 +12225,7 @@ function ITThemeProvider({
|
|
|
12178
12225
|
{
|
|
12179
12226
|
id: "brand",
|
|
12180
12227
|
label: "Marca",
|
|
12181
|
-
content: /* @__PURE__ */
|
|
12228
|
+
content: /* @__PURE__ */ jsx72("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12182
12229
|
"primary",
|
|
12183
12230
|
"secondary",
|
|
12184
12231
|
"ternary",
|
|
@@ -12187,35 +12234,35 @@ function ITThemeProvider({
|
|
|
12187
12234
|
"info",
|
|
12188
12235
|
"alert",
|
|
12189
12236
|
"warning"
|
|
12190
|
-
].map((key) => /* @__PURE__ */
|
|
12237
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12191
12238
|
},
|
|
12192
12239
|
{
|
|
12193
12240
|
id: "layout",
|
|
12194
12241
|
label: "Nav & Sidebar",
|
|
12195
|
-
content: /* @__PURE__ */
|
|
12242
|
+
content: /* @__PURE__ */ jsx72("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12196
12243
|
"layout.sidebarBg",
|
|
12197
12244
|
"layout.sidebarText",
|
|
12198
12245
|
"layout.navbarBg",
|
|
12199
12246
|
"layout.navbarText"
|
|
12200
|
-
].map((key) => /* @__PURE__ */
|
|
12247
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12201
12248
|
},
|
|
12202
12249
|
{
|
|
12203
12250
|
id: "tables",
|
|
12204
12251
|
label: "Tablas",
|
|
12205
|
-
content: /* @__PURE__ */
|
|
12252
|
+
content: /* @__PURE__ */ jsx72("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12206
12253
|
"table.headerBg",
|
|
12207
12254
|
"table.headerText",
|
|
12208
12255
|
"table.rowBg",
|
|
12209
12256
|
"table.rowText",
|
|
12210
12257
|
"table.rowHover"
|
|
12211
|
-
].map((key) => /* @__PURE__ */
|
|
12258
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12212
12259
|
}
|
|
12213
12260
|
]
|
|
12214
12261
|
}
|
|
12215
12262
|
),
|
|
12216
12263
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center justify-end gap-3 mt-auto pt-4 border-t border-slate-100 dark:border-slate-800", children: [
|
|
12217
|
-
/* @__PURE__ */
|
|
12218
|
-
/* @__PURE__ */
|
|
12264
|
+
/* @__PURE__ */ jsx72(ITText, { as: "p", className: "text-[11px] text-slate-400 mr-auto", children: "Los cambios se guardan autom\xE1ticamente" }),
|
|
12265
|
+
/* @__PURE__ */ jsx72(
|
|
12219
12266
|
ITButton,
|
|
12220
12267
|
{
|
|
12221
12268
|
label: "Cerrar",
|
|
@@ -12273,6 +12320,7 @@ export {
|
|
|
12273
12320
|
ITGrid,
|
|
12274
12321
|
image_default as ITImage,
|
|
12275
12322
|
ITInput,
|
|
12323
|
+
ITInputNumber,
|
|
12276
12324
|
ITLayout,
|
|
12277
12325
|
ITLoader,
|
|
12278
12326
|
ITMaskedInput,
|