@axzydev/axzy_ui_system 1.0.166 → 1.0.167
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 +285 -189
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +56 -10
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +266 -172
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3988,6 +3988,90 @@ function ITText({ children, className = "" }) {
|
|
|
3988
3988
|
return /* @__PURE__ */ jsx21("p", { className: `${className} text-gray-900 `, children });
|
|
3989
3989
|
}
|
|
3990
3990
|
|
|
3991
|
+
// src/components/tabs/tabs.tsx
|
|
3992
|
+
import { useState as useState17 } from "react";
|
|
3993
|
+
import { clsx as clsx16 } from "clsx";
|
|
3994
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3995
|
+
var ITTabs = ({
|
|
3996
|
+
items,
|
|
3997
|
+
defaultActiveId,
|
|
3998
|
+
onChange,
|
|
3999
|
+
variant = "line",
|
|
4000
|
+
className = "",
|
|
4001
|
+
containerClassName = ""
|
|
4002
|
+
}) => {
|
|
4003
|
+
const [activeId, setActiveId] = useState17(defaultActiveId || items[0]?.id);
|
|
4004
|
+
const handleTabClick = (id, disabled) => {
|
|
4005
|
+
if (disabled) return;
|
|
4006
|
+
setActiveId(id);
|
|
4007
|
+
if (onChange) onChange(id);
|
|
4008
|
+
};
|
|
4009
|
+
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
4010
|
+
return /* @__PURE__ */ jsxs15("div", { className: clsx16("w-full", containerClassName), children: [
|
|
4011
|
+
/* @__PURE__ */ jsx22("div", { className: clsx16(
|
|
4012
|
+
"flex border-gray-200 mb-4",
|
|
4013
|
+
variant === "line" ? "border-b" : "gap-2 p-1 bg-gray-100 rounded-lg w-fit",
|
|
4014
|
+
className
|
|
4015
|
+
), children: items.map((item) => {
|
|
4016
|
+
const isActive = item.id === activeId;
|
|
4017
|
+
return /* @__PURE__ */ jsxs15(
|
|
4018
|
+
"button",
|
|
4019
|
+
{
|
|
4020
|
+
onClick: () => handleTabClick(item.id, item.disabled),
|
|
4021
|
+
disabled: item.disabled,
|
|
4022
|
+
className: clsx16(
|
|
4023
|
+
"flex items-center gap-2 px-4 py-2 text-sm font-medium transition-all duration-200 outline-none",
|
|
4024
|
+
// LINE VARIANT
|
|
4025
|
+
variant === "line" && [
|
|
4026
|
+
"border-b-2 -mb-[2px]",
|
|
4027
|
+
isActive ? "border-primary-500 text-primary-600" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"
|
|
4028
|
+
],
|
|
4029
|
+
// PILL VARIANT
|
|
4030
|
+
variant === "pill" && [
|
|
4031
|
+
"rounded-md",
|
|
4032
|
+
isActive ? "bg-white text-primary-600 shadow-sm" : "text-gray-500 hover:text-gray-700"
|
|
4033
|
+
],
|
|
4034
|
+
item.disabled && "opacity-50 cursor-not-allowed"
|
|
4035
|
+
),
|
|
4036
|
+
children: [
|
|
4037
|
+
item.icon && /* @__PURE__ */ jsx22("span", { className: "w-4 h-4", children: item.icon }),
|
|
4038
|
+
item.label
|
|
4039
|
+
]
|
|
4040
|
+
},
|
|
4041
|
+
item.id
|
|
4042
|
+
);
|
|
4043
|
+
}) }),
|
|
4044
|
+
/* @__PURE__ */ jsx22("div", { className: "tab-content animate-fadeIn", children: activeContent })
|
|
4045
|
+
] });
|
|
4046
|
+
};
|
|
4047
|
+
var tabs_default = ITTabs;
|
|
4048
|
+
|
|
4049
|
+
// src/components/triple-filter/tripleFilter.tsx
|
|
4050
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
4051
|
+
var ITTripleFilter = ({
|
|
4052
|
+
value,
|
|
4053
|
+
onChange,
|
|
4054
|
+
options,
|
|
4055
|
+
className = ""
|
|
4056
|
+
}) => {
|
|
4057
|
+
return /* @__PURE__ */ jsx23(
|
|
4058
|
+
"div",
|
|
4059
|
+
{
|
|
4060
|
+
className: `flex bg-slate-100 p-1 rounded-xl gap-1 w-fit ${className}`,
|
|
4061
|
+
children: options.map((option) => /* @__PURE__ */ jsx23(
|
|
4062
|
+
"button",
|
|
4063
|
+
{
|
|
4064
|
+
onClick: () => onChange(option.value),
|
|
4065
|
+
className: `px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap ${value === option.value ? "bg-white text-emerald-600 shadow-sm" : "text-slate-400 hover:text-slate-600"}`,
|
|
4066
|
+
children: option.label
|
|
4067
|
+
},
|
|
4068
|
+
String(option.value)
|
|
4069
|
+
))
|
|
4070
|
+
}
|
|
4071
|
+
);
|
|
4072
|
+
};
|
|
4073
|
+
var tripleFilter_default = ITTripleFilter;
|
|
4074
|
+
|
|
3991
4075
|
// src/types/toast.types.ts
|
|
3992
4076
|
var positionStyles = {
|
|
3993
4077
|
"top-right": "top-4 right-4",
|
|
@@ -3999,10 +4083,10 @@ var positionStyles = {
|
|
|
3999
4083
|
};
|
|
4000
4084
|
|
|
4001
4085
|
// src/components/toast/toast.tsx
|
|
4002
|
-
import
|
|
4003
|
-
import { useEffect as useEffect14, useState as
|
|
4086
|
+
import clsx17 from "clsx";
|
|
4087
|
+
import { useEffect as useEffect14, useState as useState18 } from "react";
|
|
4004
4088
|
import { FaTimesCircle, FaCheckCircle, FaExclamationTriangle, FaInfoCircle, FaTimes as FaTimes5 } from "react-icons/fa";
|
|
4005
|
-
import { jsx as
|
|
4089
|
+
import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4006
4090
|
function ITToast({
|
|
4007
4091
|
message,
|
|
4008
4092
|
type = "info",
|
|
@@ -4010,7 +4094,7 @@ function ITToast({
|
|
|
4010
4094
|
position = "top-right",
|
|
4011
4095
|
onClose
|
|
4012
4096
|
}) {
|
|
4013
|
-
const [isVisible, setIsVisible] =
|
|
4097
|
+
const [isVisible, setIsVisible] = useState18(true);
|
|
4014
4098
|
useEffect14(() => {
|
|
4015
4099
|
const timer = setTimeout(() => {
|
|
4016
4100
|
setIsVisible(false);
|
|
@@ -4031,21 +4115,21 @@ function ITToast({
|
|
|
4031
4115
|
const TypeIcon = () => {
|
|
4032
4116
|
switch (type) {
|
|
4033
4117
|
case "success":
|
|
4034
|
-
return /* @__PURE__ */
|
|
4118
|
+
return /* @__PURE__ */ jsx24(FaCheckCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
4035
4119
|
case "error":
|
|
4036
4120
|
case "danger":
|
|
4037
|
-
return /* @__PURE__ */
|
|
4121
|
+
return /* @__PURE__ */ jsx24(FaTimesCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
4038
4122
|
case "warning":
|
|
4039
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ jsx24(FaExclamationTriangle, { className: "w-5 h-5 flex-shrink-0" });
|
|
4040
4124
|
case "info":
|
|
4041
4125
|
default:
|
|
4042
|
-
return /* @__PURE__ */
|
|
4126
|
+
return /* @__PURE__ */ jsx24(FaInfoCircle, { className: "w-5 h-5 flex-shrink-0" });
|
|
4043
4127
|
}
|
|
4044
4128
|
};
|
|
4045
|
-
return /* @__PURE__ */
|
|
4129
|
+
return /* @__PURE__ */ jsxs16(
|
|
4046
4130
|
"div",
|
|
4047
4131
|
{
|
|
4048
|
-
className:
|
|
4132
|
+
className: clsx17(
|
|
4049
4133
|
"fixed z-50 p-4 rounded-xl shadow-xl flex items-center justify-between gap-4 transition-all duration-300 text-white min-w-[300px]",
|
|
4050
4134
|
positionStyles[position],
|
|
4051
4135
|
{
|
|
@@ -4058,17 +4142,17 @@ function ITToast({
|
|
|
4058
4142
|
style: { backgroundColor },
|
|
4059
4143
|
role: "alert",
|
|
4060
4144
|
children: [
|
|
4061
|
-
/* @__PURE__ */
|
|
4062
|
-
/* @__PURE__ */
|
|
4063
|
-
/* @__PURE__ */
|
|
4145
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-3", children: [
|
|
4146
|
+
/* @__PURE__ */ jsx24(TypeIcon, {}),
|
|
4147
|
+
/* @__PURE__ */ jsx24("span", { className: "font-medium text-sm sm:text-base leading-snug", children: message })
|
|
4064
4148
|
] }),
|
|
4065
|
-
/* @__PURE__ */
|
|
4149
|
+
/* @__PURE__ */ jsx24(
|
|
4066
4150
|
"button",
|
|
4067
4151
|
{
|
|
4068
4152
|
onClick: handleClose,
|
|
4069
4153
|
className: "p-1.5 rounded-full hover:bg-black/15 transition-colors focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
4070
4154
|
"aria-label": "Close notification",
|
|
4071
|
-
children: /* @__PURE__ */
|
|
4155
|
+
children: /* @__PURE__ */ jsx24(FaTimes5, { className: "w-4 h-4" })
|
|
4072
4156
|
}
|
|
4073
4157
|
)
|
|
4074
4158
|
]
|
|
@@ -4077,10 +4161,10 @@ function ITToast({
|
|
|
4077
4161
|
}
|
|
4078
4162
|
|
|
4079
4163
|
// src/components/dropfile/dropfile.tsx
|
|
4080
|
-
import { useState as
|
|
4164
|
+
import { useState as useState19, useEffect as useEffect15, useRef as useRef8 } from "react";
|
|
4081
4165
|
import { useDropzone } from "react-dropzone";
|
|
4082
|
-
import
|
|
4083
|
-
import { Fragment as Fragment5, jsx as
|
|
4166
|
+
import clsx18 from "clsx";
|
|
4167
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4084
4168
|
var ITDropfile = ({
|
|
4085
4169
|
onFileSelect,
|
|
4086
4170
|
onCancel,
|
|
@@ -4093,11 +4177,11 @@ var ITDropfile = ({
|
|
|
4093
4177
|
onStatusChange,
|
|
4094
4178
|
initialPreviewUrl
|
|
4095
4179
|
}) => {
|
|
4096
|
-
const [selectedFile, setSelectedFile] =
|
|
4097
|
-
const [fileType, setFileType] =
|
|
4098
|
-
const [imagePreview, setImagePreview] =
|
|
4099
|
-
const [isConfirmed, setIsConfirmed] =
|
|
4100
|
-
const [internalUploadStatus, setInternalUploadStatus] =
|
|
4180
|
+
const [selectedFile, setSelectedFile] = useState19(null);
|
|
4181
|
+
const [fileType, setFileType] = useState19(null);
|
|
4182
|
+
const [imagePreview, setImagePreview] = useState19(initialPreviewUrl || null);
|
|
4183
|
+
const [isConfirmed, setIsConfirmed] = useState19(false);
|
|
4184
|
+
const [internalUploadStatus, setInternalUploadStatus] = useState19(
|
|
4101
4185
|
initialPreviewUrl ? "subido" /* UPLOADED */ : "pendiente" /* PENDING */
|
|
4102
4186
|
);
|
|
4103
4187
|
const canvasRef = useRef8(null);
|
|
@@ -4190,9 +4274,9 @@ var ITDropfile = ({
|
|
|
4190
4274
|
}
|
|
4191
4275
|
};
|
|
4192
4276
|
const { label, color, dotColor } = config[status];
|
|
4193
|
-
return /* @__PURE__ */
|
|
4194
|
-
/* @__PURE__ */
|
|
4195
|
-
/* @__PURE__ */
|
|
4277
|
+
return /* @__PURE__ */ jsxs17("div", { className: `inline-flex items-center gap-2 px-2.5 py-1 rounded-full border ${color}`, children: [
|
|
4278
|
+
/* @__PURE__ */ jsx25("div", { className: `w-2 h-2 rounded-full ${dotColor}` }),
|
|
4279
|
+
/* @__PURE__ */ jsx25("span", { className: "text-xs font-medium flex items-center gap-1.5", children: label })
|
|
4196
4280
|
] });
|
|
4197
4281
|
};
|
|
4198
4282
|
const onDrop = (acceptedFiles) => {
|
|
@@ -4267,19 +4351,19 @@ var ITDropfile = ({
|
|
|
4267
4351
|
handleCancel();
|
|
4268
4352
|
};
|
|
4269
4353
|
const isImage = fileType && fileType.startsWith("image/");
|
|
4270
|
-
return /* @__PURE__ */
|
|
4271
|
-
/* @__PURE__ */
|
|
4272
|
-
/* @__PURE__ */
|
|
4354
|
+
return /* @__PURE__ */ jsxs17("div", { className: clsx18("w-full transition-all duration-300", containerClassName), children: [
|
|
4355
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between mb-2", children: [
|
|
4356
|
+
/* @__PURE__ */ jsxs17("label", { className: "block text-sm font-semibold text-gray-700", children: [
|
|
4273
4357
|
"Subir archivo ",
|
|
4274
|
-
/* @__PURE__ */
|
|
4358
|
+
/* @__PURE__ */ jsxs17("span", { className: "text-gray-400 font-normal text-xs", children: [
|
|
4275
4359
|
"(",
|
|
4276
4360
|
getFileExtensions(),
|
|
4277
4361
|
")"
|
|
4278
4362
|
] })
|
|
4279
4363
|
] }),
|
|
4280
|
-
showStatusBadge && selectedFile && /* @__PURE__ */
|
|
4364
|
+
showStatusBadge && selectedFile && /* @__PURE__ */ jsx25(StatusBadge, { status: uploadStatus })
|
|
4281
4365
|
] }),
|
|
4282
|
-
!selectedFile && !imagePreview ? /* @__PURE__ */
|
|
4366
|
+
!selectedFile && !imagePreview ? /* @__PURE__ */ jsxs17(
|
|
4283
4367
|
"div",
|
|
4284
4368
|
{
|
|
4285
4369
|
...getRootProps(),
|
|
@@ -4289,41 +4373,41 @@ var ITDropfile = ({
|
|
|
4289
4373
|
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-gray-300 bg-white hover:border-primary-400 hover:bg-gray-50"}
|
|
4290
4374
|
`,
|
|
4291
4375
|
children: [
|
|
4292
|
-
/* @__PURE__ */
|
|
4293
|
-
/* @__PURE__ */
|
|
4376
|
+
/* @__PURE__ */ jsx25("input", { ...getInputProps() }),
|
|
4377
|
+
/* @__PURE__ */ jsx25("div", { className: `mb-3 p-3 rounded-full transition-colors duration-300 ${isDragActive ? "bg-primary-100" : "bg-gray-100 group-hover:bg-primary-50"}`, children: /* @__PURE__ */ jsx25(
|
|
4294
4378
|
"svg",
|
|
4295
4379
|
{
|
|
4296
4380
|
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-gray-400 group-hover:text-primary-500"}`,
|
|
4297
4381
|
fill: "none",
|
|
4298
4382
|
viewBox: "0 0 24 24",
|
|
4299
4383
|
stroke: "currentColor",
|
|
4300
|
-
children: /* @__PURE__ */
|
|
4384
|
+
children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" })
|
|
4301
4385
|
}
|
|
4302
4386
|
) }),
|
|
4303
|
-
/* @__PURE__ */
|
|
4387
|
+
/* @__PURE__ */ jsx25("div", { className: "text-center space-y-1", children: /* @__PURE__ */ jsx25("p", { className: `text-sm font-medium transition-colors duration-300 ${isDragActive ? "text-primary-700" : "text-gray-700"}`, children: isDragActive ? "\xA1Suelta aqu\xED!" : "Haz clic o arrastra" }) })
|
|
4304
4388
|
]
|
|
4305
4389
|
}
|
|
4306
|
-
) : /* @__PURE__ */
|
|
4307
|
-
/* @__PURE__ */
|
|
4308
|
-
/* @__PURE__ */
|
|
4309
|
-
/* @__PURE__ */
|
|
4310
|
-
/* @__PURE__ */
|
|
4311
|
-
/* @__PURE__ */
|
|
4390
|
+
) : /* @__PURE__ */ jsxs17("div", { className: "w-full bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden animate-fade-in", children: [
|
|
4391
|
+
/* @__PURE__ */ jsx25("div", { className: "flex items-center justify-between p-3 bg-gray-50 border-b border-gray-100", children: /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
4392
|
+
/* @__PURE__ */ jsx25("div", { className: "flex-shrink-0 w-8 h-8 rounded-lg bg-primary-100 flex items-center justify-center text-primary-600", children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ jsx25("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" }) }) : /* @__PURE__ */ jsx25("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" }) }) }),
|
|
4393
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
|
|
4394
|
+
/* @__PURE__ */ jsx25("p", { className: "text-xs font-medium text-gray-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
4395
|
+
/* @__PURE__ */ jsx25("p", { className: "text-[10px] text-gray-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
4312
4396
|
] })
|
|
4313
4397
|
] }) }),
|
|
4314
|
-
/* @__PURE__ */
|
|
4398
|
+
/* @__PURE__ */ jsx25("div", { className: clsx18("relative bg-gray-100 flex items-center justify-center", !contentClassName ? "max-h-[200px] min-h-[100px] overflow-auto" : contentClassName), children: selectedFile && fileType?.startsWith("image/") || !selectedFile && imagePreview ? /* @__PURE__ */ jsx25(
|
|
4315
4399
|
"img",
|
|
4316
4400
|
{
|
|
4317
4401
|
src: imagePreview,
|
|
4318
4402
|
alt: "Vista previa",
|
|
4319
4403
|
className: "w-full h-full object-contain max-h-[200px]"
|
|
4320
4404
|
}
|
|
4321
|
-
) : /* @__PURE__ */
|
|
4322
|
-
/* @__PURE__ */
|
|
4323
|
-
/* @__PURE__ */
|
|
4405
|
+
) : /* @__PURE__ */ jsxs17("div", { className: "py-8 flex flex-col items-center text-gray-400", children: [
|
|
4406
|
+
/* @__PURE__ */ jsx25("svg", { className: "w-10 h-10 mb-2 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z" }) }),
|
|
4407
|
+
/* @__PURE__ */ jsx25("span", { className: "text-xs", children: "Sin vista previa" })
|
|
4324
4408
|
] }) }),
|
|
4325
|
-
/* @__PURE__ */
|
|
4326
|
-
/* @__PURE__ */
|
|
4409
|
+
/* @__PURE__ */ jsx25("div", { className: "px-3 py-2 bg-white border-t border-gray-100 flex justify-end gap-2", children: !isConfirmed ? /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
4410
|
+
/* @__PURE__ */ jsx25(
|
|
4327
4411
|
"button",
|
|
4328
4412
|
{
|
|
4329
4413
|
type: "button",
|
|
@@ -4332,31 +4416,31 @@ var ITDropfile = ({
|
|
|
4332
4416
|
children: "Cancelar"
|
|
4333
4417
|
}
|
|
4334
4418
|
),
|
|
4335
|
-
/* @__PURE__ */
|
|
4419
|
+
/* @__PURE__ */ jsxs17(
|
|
4336
4420
|
"button",
|
|
4337
4421
|
{
|
|
4338
4422
|
type: "button",
|
|
4339
4423
|
onClick: handleConfirm,
|
|
4340
4424
|
className: "px-3 py-1.5 text-xs font-medium text-white bg-primary-600 rounded-lg hover:bg-primary-700 shadow-sm transition-colors flex items-center gap-1",
|
|
4341
4425
|
children: [
|
|
4342
|
-
/* @__PURE__ */
|
|
4343
|
-
/* @__PURE__ */
|
|
4426
|
+
/* @__PURE__ */ jsx25("span", { children: "Confirmar" }),
|
|
4427
|
+
/* @__PURE__ */ jsx25("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
4344
4428
|
]
|
|
4345
4429
|
}
|
|
4346
4430
|
)
|
|
4347
|
-
] }) : /* @__PURE__ */
|
|
4431
|
+
] }) : /* @__PURE__ */ jsxs17(
|
|
4348
4432
|
"button",
|
|
4349
4433
|
{
|
|
4350
4434
|
type: "button",
|
|
4351
4435
|
onClick: handleDelete,
|
|
4352
4436
|
className: "px-3 py-1.5 text-xs font-medium text-danger-600 bg-danger-50 border border-danger-100 rounded-lg hover:bg-danger-100 transition-colors flex items-center gap-1",
|
|
4353
4437
|
children: [
|
|
4354
|
-
/* @__PURE__ */
|
|
4355
|
-
/* @__PURE__ */
|
|
4438
|
+
/* @__PURE__ */ jsx25("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx25("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) }),
|
|
4439
|
+
/* @__PURE__ */ jsx25("span", { children: "Eliminar" })
|
|
4356
4440
|
]
|
|
4357
4441
|
}
|
|
4358
4442
|
) }),
|
|
4359
|
-
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */
|
|
4443
|
+
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */ jsx25("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsx25("div", { className: "w-full bg-gray-200 rounded-full h-1.5", children: /* @__PURE__ */ jsx25(
|
|
4360
4444
|
"div",
|
|
4361
4445
|
{
|
|
4362
4446
|
className: "bg-primary-600 h-1.5 rounded-full transition-all duration-1000 ease-out",
|
|
@@ -4372,12 +4456,12 @@ var ITDropfile = ({
|
|
|
4372
4456
|
var dropfile_default = ITDropfile;
|
|
4373
4457
|
|
|
4374
4458
|
// src/components/layout/layout.tsx
|
|
4375
|
-
import { useState as
|
|
4459
|
+
import { useState as useState22 } from "react";
|
|
4376
4460
|
|
|
4377
4461
|
// src/components/topbar/topbar.tsx
|
|
4378
4462
|
import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
|
|
4379
|
-
import { useRef as useRef9, useState as
|
|
4380
|
-
import { jsx as
|
|
4463
|
+
import { useRef as useRef9, useState as useState20 } from "react";
|
|
4464
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4381
4465
|
function ITTopBar({
|
|
4382
4466
|
logo,
|
|
4383
4467
|
logoText,
|
|
@@ -4387,10 +4471,10 @@ function ITTopBar({
|
|
|
4387
4471
|
navItems,
|
|
4388
4472
|
onNavItemClick
|
|
4389
4473
|
}) {
|
|
4390
|
-
const [isUserMenuOpen, setIsUserMenuOpen] =
|
|
4474
|
+
const [isUserMenuOpen, setIsUserMenuOpen] = useState20(false);
|
|
4391
4475
|
const userMenuRef = useRef9(null);
|
|
4392
4476
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
4393
|
-
return /* @__PURE__ */
|
|
4477
|
+
return /* @__PURE__ */ jsx26(
|
|
4394
4478
|
"header",
|
|
4395
4479
|
{
|
|
4396
4480
|
className: "sticky top-0 z-40 backdrop-blur-md transition-all duration-300",
|
|
@@ -4399,9 +4483,9 @@ function ITTopBar({
|
|
|
4399
4483
|
borderBottom: `1px solid ${theme.topbar?.borderColor || "#e2e8f0"}`,
|
|
4400
4484
|
boxShadow: theme.topbar?.shadow || "none"
|
|
4401
4485
|
},
|
|
4402
|
-
children: /* @__PURE__ */
|
|
4403
|
-
/* @__PURE__ */
|
|
4404
|
-
showMobileMenuButton && /* @__PURE__ */
|
|
4486
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between h-[72px] px-6 lg:px-8", children: [
|
|
4487
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-5", children: [
|
|
4488
|
+
showMobileMenuButton && /* @__PURE__ */ jsx26(
|
|
4405
4489
|
"button",
|
|
4406
4490
|
{
|
|
4407
4491
|
className: "lg:hidden p-2.5 rounded-xl transition-colors duration-200",
|
|
@@ -4411,12 +4495,12 @@ function ITTopBar({
|
|
|
4411
4495
|
onMouseEnter: (e) => e.currentTarget.style.backgroundColor = theme.topbar?.userMenu?.hoverBackground || "#f1f5f9",
|
|
4412
4496
|
onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
|
|
4413
4497
|
onClick: onToggleMobileMenu,
|
|
4414
|
-
children: /* @__PURE__ */
|
|
4498
|
+
children: /* @__PURE__ */ jsx26(FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
|
|
4415
4499
|
}
|
|
4416
4500
|
),
|
|
4417
|
-
/* @__PURE__ */
|
|
4418
|
-
logo && /* @__PURE__ */
|
|
4419
|
-
logoText && /* @__PURE__ */
|
|
4501
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3", children: [
|
|
4502
|
+
logo && /* @__PURE__ */ jsx26("div", { className: "flex-shrink-0 drop-shadow-sm", children: logo }),
|
|
4503
|
+
logoText && /* @__PURE__ */ jsx26(
|
|
4420
4504
|
"span",
|
|
4421
4505
|
{
|
|
4422
4506
|
className: "text-[1.15rem] font-bold tracking-tight",
|
|
@@ -4425,7 +4509,7 @@ function ITTopBar({
|
|
|
4425
4509
|
}
|
|
4426
4510
|
)
|
|
4427
4511
|
] }),
|
|
4428
|
-
navItems && navItems.length > 0 && /* @__PURE__ */
|
|
4512
|
+
navItems && navItems.length > 0 && /* @__PURE__ */ jsx26("nav", { className: "hidden md:flex ml-8 space-x-1 border-l pl-8", style: { borderColor: theme.topbar?.borderColor || "#e2e8f0" }, children: navItems.map((item) => /* @__PURE__ */ jsx26(
|
|
4429
4513
|
"button",
|
|
4430
4514
|
{
|
|
4431
4515
|
onClick: () => onNavItemClick?.(item.id),
|
|
@@ -4439,16 +4523,16 @@ function ITTopBar({
|
|
|
4439
4523
|
e.currentTarget.style.color = theme.topbar?.textColor || "#475569";
|
|
4440
4524
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
4441
4525
|
},
|
|
4442
|
-
children: /* @__PURE__ */
|
|
4443
|
-
item.icon && /* @__PURE__ */
|
|
4526
|
+
children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
4527
|
+
item.icon && /* @__PURE__ */ jsx26("span", { className: "opacity-70", children: item.icon }),
|
|
4444
4528
|
item.label
|
|
4445
4529
|
] })
|
|
4446
4530
|
},
|
|
4447
4531
|
item.id
|
|
4448
4532
|
)) })
|
|
4449
4533
|
] }),
|
|
4450
|
-
userMenu && /* @__PURE__ */
|
|
4451
|
-
/* @__PURE__ */
|
|
4534
|
+
userMenu && /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
4535
|
+
/* @__PURE__ */ jsxs18(
|
|
4452
4536
|
"button",
|
|
4453
4537
|
{
|
|
4454
4538
|
type: "button",
|
|
@@ -4464,19 +4548,19 @@ function ITTopBar({
|
|
|
4464
4548
|
},
|
|
4465
4549
|
onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
|
|
4466
4550
|
children: [
|
|
4467
|
-
/* @__PURE__ */
|
|
4468
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
4551
|
+
/* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
4552
|
+
userMenu.userImage ? /* @__PURE__ */ jsx26(
|
|
4469
4553
|
"img",
|
|
4470
4554
|
{
|
|
4471
4555
|
className: "w-9 h-9 rounded-full object-cover ring-2 ring-white shadow-sm",
|
|
4472
4556
|
src: userMenu.userImage,
|
|
4473
4557
|
alt: "Current user"
|
|
4474
4558
|
}
|
|
4475
|
-
) : /* @__PURE__ */
|
|
4476
|
-
/* @__PURE__ */
|
|
4559
|
+
) : /* @__PURE__ */ jsx26("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ jsx26(FaUserCircle2, { className: "w-6 h-6", style: { color: theme.topbar?.iconColor || "#94a3b8" } }) }),
|
|
4560
|
+
/* @__PURE__ */ jsx26("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
|
|
4477
4561
|
] }),
|
|
4478
|
-
/* @__PURE__ */
|
|
4479
|
-
/* @__PURE__ */
|
|
4562
|
+
/* @__PURE__ */ jsxs18("div", { className: "hidden sm:flex flex-col text-left py-0.5", children: [
|
|
4563
|
+
/* @__PURE__ */ jsx26(
|
|
4480
4564
|
"span",
|
|
4481
4565
|
{
|
|
4482
4566
|
className: "font-semibold text-[0.85rem] leading-tight",
|
|
@@ -4484,7 +4568,7 @@ function ITTopBar({
|
|
|
4484
4568
|
children: userMenu.userName
|
|
4485
4569
|
}
|
|
4486
4570
|
),
|
|
4487
|
-
/* @__PURE__ */
|
|
4571
|
+
/* @__PURE__ */ jsx26(
|
|
4488
4572
|
"span",
|
|
4489
4573
|
{
|
|
4490
4574
|
className: "text-[0.7rem] font-medium",
|
|
@@ -4496,7 +4580,7 @@ function ITTopBar({
|
|
|
4496
4580
|
]
|
|
4497
4581
|
}
|
|
4498
4582
|
),
|
|
4499
|
-
/* @__PURE__ */
|
|
4583
|
+
/* @__PURE__ */ jsxs18(
|
|
4500
4584
|
"div",
|
|
4501
4585
|
{
|
|
4502
4586
|
ref: userMenuRef,
|
|
@@ -4509,15 +4593,15 @@ function ITTopBar({
|
|
|
4509
4593
|
border: `1px solid ${theme.topbar?.userMenu?.dropdown?.borderColor || "#f1f5f9"}`
|
|
4510
4594
|
},
|
|
4511
4595
|
children: [
|
|
4512
|
-
/* @__PURE__ */
|
|
4513
|
-
/* @__PURE__ */
|
|
4514
|
-
/* @__PURE__ */
|
|
4596
|
+
/* @__PURE__ */ jsxs18("div", { className: "px-5 py-4 border-b bg-slate-50/50", style: { borderColor: theme.topbar?.userMenu?.dropdown?.borderColor || "#f1f5f9" }, children: [
|
|
4597
|
+
/* @__PURE__ */ jsx26("span", { className: "block font-bold text-[0.9rem]", style: { color: theme.topbar?.userMenu?.textColor || "#0f172a" }, children: userMenu.userName }),
|
|
4598
|
+
/* @__PURE__ */ jsx26("span", { className: "block text-xs font-medium truncate mt-0.5", style: { color: theme.topbar?.userMenu?.subtitleColor || "#64748b" }, children: userMenu.userEmail })
|
|
4515
4599
|
] }),
|
|
4516
|
-
/* @__PURE__ */
|
|
4600
|
+
/* @__PURE__ */ jsx26("ul", { className: "py-2", children: userMenu.menuItems.map((m, i) => {
|
|
4517
4601
|
const isDestructive = m.label.toLowerCase().includes("salir") || m.label.toLowerCase().includes("cerrar") || m.label.toLowerCase().includes("logout");
|
|
4518
|
-
return /* @__PURE__ */
|
|
4519
|
-
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */
|
|
4520
|
-
/* @__PURE__ */
|
|
4602
|
+
return /* @__PURE__ */ jsxs18("li", { className: "px-2", children: [
|
|
4603
|
+
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */ jsx26("div", { className: "h-px bg-slate-100 my-1 mx-2" }),
|
|
4604
|
+
/* @__PURE__ */ jsx26(
|
|
4521
4605
|
"button",
|
|
4522
4606
|
{
|
|
4523
4607
|
onClick: (e) => {
|
|
@@ -4547,18 +4631,20 @@ function ITTopBar({
|
|
|
4547
4631
|
}
|
|
4548
4632
|
|
|
4549
4633
|
// src/components/sidebar/sidebar.tsx
|
|
4550
|
-
import { useEffect as useEffect16, useRef as useRef10, useState as
|
|
4634
|
+
import { useEffect as useEffect16, useRef as useRef10, useState as useState21 } from "react";
|
|
4551
4635
|
import { FaChevronDown as FaChevronDown2 } from "react-icons/fa";
|
|
4552
|
-
import { jsx as
|
|
4636
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4553
4637
|
function ITSidebar({
|
|
4554
4638
|
navigationItems = [],
|
|
4555
4639
|
isCollapsed = false,
|
|
4556
4640
|
onToggleCollapse,
|
|
4557
4641
|
className = "",
|
|
4558
|
-
visibleOnMobile = false
|
|
4642
|
+
visibleOnMobile = false,
|
|
4643
|
+
onItemClick,
|
|
4644
|
+
onSubItemClick
|
|
4559
4645
|
}) {
|
|
4560
|
-
const [expandedItems, setExpandedItems] =
|
|
4561
|
-
const [isHovering, setIsHovering] =
|
|
4646
|
+
const [expandedItems, setExpandedItems] = useState21(/* @__PURE__ */ new Set());
|
|
4647
|
+
const [isHovering, setIsHovering] = useState21(false);
|
|
4562
4648
|
const sidebarRef = useRef10(null);
|
|
4563
4649
|
const hoverTimeoutRef = useRef10(null);
|
|
4564
4650
|
const leaveTimeoutRef = useRef10(null);
|
|
@@ -4596,13 +4682,14 @@ function ITSidebar({
|
|
|
4596
4682
|
const handleItemClick = (item) => {
|
|
4597
4683
|
if (item.subitems && item.subitems.length > 0) {
|
|
4598
4684
|
toggleExpanded(item.id);
|
|
4599
|
-
} else
|
|
4600
|
-
item.action();
|
|
4685
|
+
} else {
|
|
4686
|
+
if (item.action) item.action();
|
|
4687
|
+
if (onItemClick) onItemClick(item);
|
|
4601
4688
|
}
|
|
4602
4689
|
};
|
|
4603
4690
|
const isSidebarCollapsed = visibleOnMobile ? false : !isHovering && isCollapsed;
|
|
4604
4691
|
const sidebarWidth = isSidebarCollapsed ? "w-[88px]" : "w-[280px]";
|
|
4605
|
-
return /* @__PURE__ */
|
|
4692
|
+
return /* @__PURE__ */ jsx27(
|
|
4606
4693
|
"aside",
|
|
4607
4694
|
{
|
|
4608
4695
|
ref: sidebarRef,
|
|
@@ -4621,8 +4708,8 @@ function ITSidebar({
|
|
|
4621
4708
|
WebkitBackdropFilter: "blur(12px)",
|
|
4622
4709
|
backdropFilter: "blur(12px)"
|
|
4623
4710
|
},
|
|
4624
|
-
children: /* @__PURE__ */
|
|
4625
|
-
/* @__PURE__ */
|
|
4711
|
+
children: /* @__PURE__ */ jsx27("nav", { className: "flex-1 py-6 overflow-y-auto overflow-x-hidden custom-scrollbar px-4", children: /* @__PURE__ */ jsx27("ul", { className: "space-y-2", children: navigationItems.map((item) => /* @__PURE__ */ jsxs19("li", { className: "relative group/navitem", children: [
|
|
4712
|
+
/* @__PURE__ */ jsxs19(
|
|
4626
4713
|
"div",
|
|
4627
4714
|
{
|
|
4628
4715
|
className: `flex items-center cursor-pointer
|
|
@@ -4643,15 +4730,15 @@ function ITSidebar({
|
|
|
4643
4730
|
},
|
|
4644
4731
|
onClick: () => handleItemClick(item),
|
|
4645
4732
|
children: [
|
|
4646
|
-
item.isActive && !isSidebarCollapsed && /* @__PURE__ */
|
|
4733
|
+
item.isActive && !isSidebarCollapsed && /* @__PURE__ */ jsx27(
|
|
4647
4734
|
"div",
|
|
4648
4735
|
{
|
|
4649
4736
|
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
4650
4737
|
style: { backgroundColor: theme.sidebar?.active?.iconColor || "#10b981", boxShadow: `0 0 10px ${theme.sidebar?.active?.iconColor || "#10b981"}` }
|
|
4651
4738
|
}
|
|
4652
4739
|
),
|
|
4653
|
-
/* @__PURE__ */
|
|
4654
|
-
item.icon && /* @__PURE__ */
|
|
4740
|
+
/* @__PURE__ */ jsxs19("div", { className: `flex items-center ${!isSidebarCollapsed ? "gap-3.5" : "justify-center"} relative z-10 w-full`, children: [
|
|
4741
|
+
item.icon && /* @__PURE__ */ jsx27(
|
|
4655
4742
|
"div",
|
|
4656
4743
|
{
|
|
4657
4744
|
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
@@ -4664,7 +4751,7 @@ function ITSidebar({
|
|
|
4664
4751
|
children: item.icon
|
|
4665
4752
|
}
|
|
4666
4753
|
),
|
|
4667
|
-
!isSidebarCollapsed && /* @__PURE__ */
|
|
4754
|
+
!isSidebarCollapsed && /* @__PURE__ */ jsx27(
|
|
4668
4755
|
"span",
|
|
4669
4756
|
{
|
|
4670
4757
|
className: `transition-all duration-300 truncate tracking-wide`,
|
|
@@ -4677,15 +4764,15 @@ function ITSidebar({
|
|
|
4677
4764
|
}
|
|
4678
4765
|
)
|
|
4679
4766
|
] }),
|
|
4680
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
4767
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx27(
|
|
4681
4768
|
"div",
|
|
4682
4769
|
{
|
|
4683
4770
|
className: `flex-shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "rotate-180" : ""}`,
|
|
4684
4771
|
style: { color: item.isActive ? theme.sidebar?.active?.color || "#0f172a" : theme.sidebar?.icon?.color || "#64748b", opacity: 0.7 },
|
|
4685
|
-
children: /* @__PURE__ */
|
|
4772
|
+
children: /* @__PURE__ */ jsx27(FaChevronDown2, { className: "w-3 h-3" })
|
|
4686
4773
|
}
|
|
4687
4774
|
),
|
|
4688
|
-
item.badge && /* @__PURE__ */
|
|
4775
|
+
item.badge && /* @__PURE__ */ jsx27(
|
|
4689
4776
|
"span",
|
|
4690
4777
|
{
|
|
4691
4778
|
className: `
|
|
@@ -4703,7 +4790,7 @@ function ITSidebar({
|
|
|
4703
4790
|
]
|
|
4704
4791
|
}
|
|
4705
4792
|
),
|
|
4706
|
-
isSidebarCollapsed && /* @__PURE__ */
|
|
4793
|
+
isSidebarCollapsed && /* @__PURE__ */ jsxs19(
|
|
4707
4794
|
"div",
|
|
4708
4795
|
{
|
|
4709
4796
|
className: "absolute left-full top-0 ml-4 rounded-2xl opacity-0 invisible group-hover/navitem:opacity-100 group-hover/navitem:visible transition-all duration-300 pointer-events-none z-50 min-w-[220px] overflow-hidden -translate-x-2 group-hover/navitem:translate-x-0 shadow-[0_10px_40px_-10px_rgba(0,0,0,0.15)]",
|
|
@@ -4714,30 +4801,33 @@ function ITSidebar({
|
|
|
4714
4801
|
backdropFilter: "blur(16px)"
|
|
4715
4802
|
},
|
|
4716
4803
|
children: [
|
|
4717
|
-
/* @__PURE__ */
|
|
4718
|
-
item.icon && /* @__PURE__ */
|
|
4719
|
-
/* @__PURE__ */
|
|
4804
|
+
/* @__PURE__ */ jsxs19("div", { className: "px-5 py-4 flex items-center gap-3 font-semibold border-b", style: { borderColor: theme.sidebar?.borderColor || "#e2e8f0", color: theme.sidebar?.active?.color || "#0f172a" }, children: [
|
|
4805
|
+
item.icon && /* @__PURE__ */ jsx27("span", { style: { color: theme.sidebar?.active?.iconColor || "#10b981" }, className: "text-xl drop-shadow-sm", children: item.icon }),
|
|
4806
|
+
/* @__PURE__ */ jsx27("span", { className: "tracking-wide text-[15px]", children: item.label })
|
|
4720
4807
|
] }),
|
|
4721
|
-
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */
|
|
4808
|
+
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "py-2", children: item.subitems.map((subitem) => /* @__PURE__ */ jsxs19(
|
|
4722
4809
|
"div",
|
|
4723
4810
|
{
|
|
4724
4811
|
className: `px-5 py-2.5 text-sm flex items-center gap-3 transition-colors`,
|
|
4725
4812
|
children: [
|
|
4726
|
-
/* @__PURE__ */
|
|
4727
|
-
/* @__PURE__ */
|
|
4813
|
+
/* @__PURE__ */ jsx27("span", { className: `w-1.5 h-1.5 rounded-full transition-all ${subitem.isActive ? "scale-125" : ""}`, style: { backgroundColor: subitem.isActive ? theme.sidebar?.active?.iconColor || "#10b981" : theme.sidebar?.icon?.color || "#94a3b8" } }),
|
|
4814
|
+
/* @__PURE__ */ jsx27("span", { style: { color: subitem.isActive ? theme.sidebar?.active?.color || "#0f172a" : theme.sidebar?.label?.color || "#475569", fontWeight: subitem.isActive ? 600 : 500 }, children: subitem.label })
|
|
4728
4815
|
]
|
|
4729
4816
|
},
|
|
4730
4817
|
subitem.id
|
|
4731
|
-
)) }) : /* @__PURE__ */
|
|
4818
|
+
)) }) : /* @__PURE__ */ jsx27("div", { className: "px-5 py-3 text-sm text-zinc-500 italic", children: "No hay submen\xFA" })
|
|
4732
4819
|
]
|
|
4733
4820
|
}
|
|
4734
4821
|
),
|
|
4735
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
4736
|
-
subitem.isActive && /* @__PURE__ */
|
|
4737
|
-
/* @__PURE__ */
|
|
4822
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx27("div", { className: `overflow-hidden transition-all duration-400 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "max-h-[500px] opacity-100 mt-1" : "max-h-0 opacity-0"}`, children: /* @__PURE__ */ jsx27("ul", { className: "ml-5 pl-4 space-y-1 py-1", style: { borderLeft: `2px solid ${theme.sidebar?.borderColor || "#e2e8f0"}` }, children: item.subitems.map((subitem) => /* @__PURE__ */ jsxs19("li", { className: "relative", children: [
|
|
4823
|
+
subitem.isActive && /* @__PURE__ */ jsx27("div", { className: "absolute -left-[18px] top-1/2 -translate-y-1/2 w-4 h-[2px] rounded-r-full", style: { backgroundColor: theme.sidebar?.active?.iconColor || "#10b981" } }),
|
|
4824
|
+
/* @__PURE__ */ jsx27(
|
|
4738
4825
|
"button",
|
|
4739
4826
|
{
|
|
4740
|
-
onClick:
|
|
4827
|
+
onClick: () => {
|
|
4828
|
+
if (subitem.action) subitem.action();
|
|
4829
|
+
if (onSubItemClick) onSubItemClick(subitem);
|
|
4830
|
+
},
|
|
4741
4831
|
className: `block w-full text-left px-4 py-2 rounded-xl transition-all duration-300`,
|
|
4742
4832
|
style: {
|
|
4743
4833
|
color: subitem.isActive ? theme.sidebar?.active?.color || "#0f172a" : theme.sidebar?.label?.color || "#475569",
|
|
@@ -4768,7 +4858,7 @@ function ITSidebar({
|
|
|
4768
4858
|
}
|
|
4769
4859
|
|
|
4770
4860
|
// src/components/layout/layout.tsx
|
|
4771
|
-
import { jsx as
|
|
4861
|
+
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4772
4862
|
function ITLayout({
|
|
4773
4863
|
topBar,
|
|
4774
4864
|
sidebar,
|
|
@@ -4776,10 +4866,10 @@ function ITLayout({
|
|
|
4776
4866
|
className = "",
|
|
4777
4867
|
contentClassName = ""
|
|
4778
4868
|
}) {
|
|
4779
|
-
const [desktopCollapsed, setDesktopCollapsed] =
|
|
4780
|
-
const [mobileSidebarOpen, setMobileSidebarOpen] =
|
|
4781
|
-
return /* @__PURE__ */
|
|
4782
|
-
/* @__PURE__ */
|
|
4869
|
+
const [desktopCollapsed, setDesktopCollapsed] = useState22(true);
|
|
4870
|
+
const [mobileSidebarOpen, setMobileSidebarOpen] = useState22(false);
|
|
4871
|
+
return /* @__PURE__ */ jsxs20("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
4872
|
+
/* @__PURE__ */ jsx28(
|
|
4783
4873
|
ITTopBar,
|
|
4784
4874
|
{
|
|
4785
4875
|
...topBar,
|
|
@@ -4787,10 +4877,10 @@ function ITLayout({
|
|
|
4787
4877
|
onToggleMobileMenu: () => setMobileSidebarOpen((v) => !v)
|
|
4788
4878
|
}
|
|
4789
4879
|
),
|
|
4790
|
-
/* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
/* @__PURE__ */
|
|
4880
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-1 overflow-hidden relative", style: { backgroundColor: theme.layout?.backgroundColor || "#f8fafc" }, children: [
|
|
4881
|
+
/* @__PURE__ */ jsxs20("div", { className: "hidden lg:block relative z-40 h-full", children: [
|
|
4882
|
+
/* @__PURE__ */ jsx28("div", { className: "w-[88px] h-full flex-shrink-0" }),
|
|
4883
|
+
/* @__PURE__ */ jsx28("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx28(
|
|
4794
4884
|
ITSidebar,
|
|
4795
4885
|
{
|
|
4796
4886
|
...sidebar,
|
|
@@ -4801,31 +4891,33 @@ function ITLayout({
|
|
|
4801
4891
|
}
|
|
4802
4892
|
) })
|
|
4803
4893
|
] }),
|
|
4804
|
-
mobileSidebarOpen && /* @__PURE__ */
|
|
4894
|
+
mobileSidebarOpen && /* @__PURE__ */ jsx28(
|
|
4805
4895
|
"div",
|
|
4806
4896
|
{
|
|
4807
4897
|
className: "lg:hidden fixed inset-0 z-50 transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
4808
4898
|
onClick: () => setMobileSidebarOpen(false),
|
|
4809
|
-
children: /* @__PURE__ */
|
|
4899
|
+
children: /* @__PURE__ */ jsx28(
|
|
4810
4900
|
"div",
|
|
4811
4901
|
{
|
|
4812
|
-
className: "h-full w-
|
|
4902
|
+
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
4813
4903
|
onClick: (e) => e.stopPropagation(),
|
|
4814
|
-
children: /* @__PURE__ */
|
|
4904
|
+
children: /* @__PURE__ */ jsx28(
|
|
4815
4905
|
ITSidebar,
|
|
4816
4906
|
{
|
|
4817
4907
|
...sidebar,
|
|
4818
4908
|
isCollapsed: false,
|
|
4819
4909
|
visibleOnMobile: true,
|
|
4820
|
-
className: "h-full shadow-2xl",
|
|
4821
|
-
onToggleCollapse: () => setMobileSidebarOpen(false)
|
|
4910
|
+
className: "h-full shadow-2xl relative z-[60]",
|
|
4911
|
+
onToggleCollapse: () => setMobileSidebarOpen(false),
|
|
4912
|
+
onItemClick: () => setMobileSidebarOpen(false),
|
|
4913
|
+
onSubItemClick: () => setMobileSidebarOpen(false)
|
|
4822
4914
|
}
|
|
4823
4915
|
)
|
|
4824
4916
|
}
|
|
4825
4917
|
)
|
|
4826
4918
|
}
|
|
4827
4919
|
),
|
|
4828
|
-
/* @__PURE__ */
|
|
4920
|
+
/* @__PURE__ */ jsx28("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx28(
|
|
4829
4921
|
"div",
|
|
4830
4922
|
{
|
|
4831
4923
|
className: `mx-auto w-full h-full ${contentClassName}`,
|
|
@@ -4846,7 +4938,7 @@ var sizeClasses = {
|
|
|
4846
4938
|
};
|
|
4847
4939
|
|
|
4848
4940
|
// src/components/loader/loader.tsx
|
|
4849
|
-
import { jsx as
|
|
4941
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4850
4942
|
function ITLoader({
|
|
4851
4943
|
size = "md",
|
|
4852
4944
|
variant = "spinner",
|
|
@@ -4861,22 +4953,22 @@ function ITLoader({
|
|
|
4861
4953
|
const bgStyle = isCssValue ? { backgroundColor: resolvedColor } : {};
|
|
4862
4954
|
const colorClass = !isCssValue ? color : "";
|
|
4863
4955
|
if (variant === "spinner") {
|
|
4864
|
-
return /* @__PURE__ */
|
|
4956
|
+
return /* @__PURE__ */ jsx29(
|
|
4865
4957
|
"div",
|
|
4866
4958
|
{
|
|
4867
4959
|
className: `inline-block ${sizeClasses[size]} animate-spin rounded-full border-2 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${colorClass} ${className}`,
|
|
4868
4960
|
role: "status",
|
|
4869
4961
|
style,
|
|
4870
|
-
children: /* @__PURE__ */
|
|
4962
|
+
children: /* @__PURE__ */ jsx29("span", { className: "!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]", children: "Loading..." })
|
|
4871
4963
|
}
|
|
4872
4964
|
);
|
|
4873
4965
|
}
|
|
4874
4966
|
if (variant === "dots") {
|
|
4875
|
-
return /* @__PURE__ */
|
|
4967
|
+
return /* @__PURE__ */ jsx29(
|
|
4876
4968
|
"div",
|
|
4877
4969
|
{
|
|
4878
4970
|
className: `flex items-center justify-center space-x-2 ${className}`,
|
|
4879
|
-
children: [...Array(3)].map((_, i) => /* @__PURE__ */
|
|
4971
|
+
children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsx29(
|
|
4880
4972
|
"div",
|
|
4881
4973
|
{
|
|
4882
4974
|
className: `${sizeClasses[size.replace(/l|g/, "")]} animate-bounce rounded-full ${colorClass}`,
|
|
@@ -4891,11 +4983,11 @@ function ITLoader({
|
|
|
4891
4983
|
);
|
|
4892
4984
|
}
|
|
4893
4985
|
if (variant === "bar") {
|
|
4894
|
-
return /* @__PURE__ */
|
|
4986
|
+
return /* @__PURE__ */ jsx29(
|
|
4895
4987
|
"div",
|
|
4896
4988
|
{
|
|
4897
4989
|
className: `w-full ${size === "sm" ? "h-1" : size === "md" ? "h-1.5" : size === "lg" ? "h-2" : "h-2.5"} bg-gray-200 rounded-full overflow-hidden ${className}`,
|
|
4898
|
-
children: /* @__PURE__ */
|
|
4990
|
+
children: /* @__PURE__ */ jsx29(
|
|
4899
4991
|
"div",
|
|
4900
4992
|
{
|
|
4901
4993
|
className: `h-full animate-progress ${colorClass}`,
|
|
@@ -4911,7 +5003,7 @@ function ITLoader({
|
|
|
4911
5003
|
);
|
|
4912
5004
|
}
|
|
4913
5005
|
if (variant === "pulse") {
|
|
4914
|
-
return /* @__PURE__ */
|
|
5006
|
+
return /* @__PURE__ */ jsx29(
|
|
4915
5007
|
"div",
|
|
4916
5008
|
{
|
|
4917
5009
|
className: `rounded-full ${sizeClasses[size]} animate-pulse ${colorClass} ${className}`,
|
|
@@ -4923,10 +5015,10 @@ function ITLoader({
|
|
|
4923
5015
|
}
|
|
4924
5016
|
|
|
4925
5017
|
// src/components/stepper/stepper.tsx
|
|
4926
|
-
import
|
|
4927
|
-
import { useEffect as useEffect17, useRef as useRef11, useState as
|
|
5018
|
+
import clsx19 from "clsx";
|
|
5019
|
+
import { useEffect as useEffect17, useRef as useRef11, useState as useState23 } from "react";
|
|
4928
5020
|
import { FaChevronLeft as FaChevronLeft4, FaChevronRight as FaChevronRight5, FaCheck as FaCheck3 } from "react-icons/fa";
|
|
4929
|
-
import { jsx as
|
|
5021
|
+
import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4930
5022
|
function ITStepper({
|
|
4931
5023
|
steps,
|
|
4932
5024
|
currentStep,
|
|
@@ -4941,7 +5033,7 @@ function ITStepper({
|
|
|
4941
5033
|
maxContentHeight = "400px",
|
|
4942
5034
|
color = "primary"
|
|
4943
5035
|
}) {
|
|
4944
|
-
const [direction, setDirection] =
|
|
5036
|
+
const [direction, setDirection] = useState23("next");
|
|
4945
5037
|
const contentRef = useRef11(null);
|
|
4946
5038
|
const progressRef = useRef11(null);
|
|
4947
5039
|
const isThemeColor = color in theme.colors;
|
|
@@ -4993,23 +5085,23 @@ function ITStepper({
|
|
|
4993
5085
|
const renderStepContent = (index, isCompleted, isActive) => {
|
|
4994
5086
|
const step = steps[index];
|
|
4995
5087
|
if (isCompleted) {
|
|
4996
|
-
return /* @__PURE__ */
|
|
5088
|
+
return /* @__PURE__ */ jsx30(FaCheck3, { className: "w-4 h-4" });
|
|
4997
5089
|
}
|
|
4998
5090
|
if (step.icon && useIcons) {
|
|
4999
|
-
return /* @__PURE__ */
|
|
5091
|
+
return /* @__PURE__ */ jsx30("div", { className: "flex items-center justify-center w-5 h-5", children: step.icon });
|
|
5000
5092
|
}
|
|
5001
|
-
return /* @__PURE__ */
|
|
5093
|
+
return /* @__PURE__ */ jsx30("span", { className: "text-sm font-semibold", children: index + 1 });
|
|
5002
5094
|
};
|
|
5003
|
-
return /* @__PURE__ */
|
|
5004
|
-
/* @__PURE__ */
|
|
5005
|
-
/* @__PURE__ */
|
|
5095
|
+
return /* @__PURE__ */ jsxs21("div", { className: clsx19("w-full max-w-5xl mx-auto px-4", containerClassName), children: [
|
|
5096
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative mb-8", children: [
|
|
5097
|
+
/* @__PURE__ */ jsx30(
|
|
5006
5098
|
"div",
|
|
5007
5099
|
{
|
|
5008
5100
|
className: "absolute left-6 right-6 top-5 h-1 bg-gray-200 rounded-full z-0",
|
|
5009
5101
|
"aria-hidden": true
|
|
5010
5102
|
}
|
|
5011
5103
|
),
|
|
5012
|
-
/* @__PURE__ */
|
|
5104
|
+
/* @__PURE__ */ jsx30(
|
|
5013
5105
|
"div",
|
|
5014
5106
|
{
|
|
5015
5107
|
ref: progressRef,
|
|
@@ -5017,11 +5109,11 @@ function ITStepper({
|
|
|
5017
5109
|
"aria-hidden": true
|
|
5018
5110
|
}
|
|
5019
5111
|
),
|
|
5020
|
-
/* @__PURE__ */
|
|
5112
|
+
/* @__PURE__ */ jsx30("div", { className: "flex items-start justify-between space-x-2 relative z-20", children: steps.map((step, idx) => {
|
|
5021
5113
|
const isActive = idx === currentStep;
|
|
5022
5114
|
const isCompleted = idx < currentStep;
|
|
5023
5115
|
const hasIcon = step.icon && useIcons;
|
|
5024
|
-
return /* @__PURE__ */
|
|
5116
|
+
return /* @__PURE__ */ jsx30(
|
|
5025
5117
|
"button",
|
|
5026
5118
|
{
|
|
5027
5119
|
type: "button",
|
|
@@ -5031,11 +5123,11 @@ function ITStepper({
|
|
|
5031
5123
|
"aria-label": `Paso ${idx + 1} ${step.label}`,
|
|
5032
5124
|
className: "flex-1 group",
|
|
5033
5125
|
title: step.label,
|
|
5034
|
-
children: /* @__PURE__ */
|
|
5035
|
-
/* @__PURE__ */
|
|
5126
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center", children: [
|
|
5127
|
+
/* @__PURE__ */ jsx30(
|
|
5036
5128
|
"div",
|
|
5037
5129
|
{
|
|
5038
|
-
className:
|
|
5130
|
+
className: clsx19(
|
|
5039
5131
|
"flex items-center justify-center w-11 h-11 rounded-full border-2 transition-all duration-300 transform",
|
|
5040
5132
|
hasIcon && "p-2",
|
|
5041
5133
|
isCompleted && "bg-slate-400 border-slate-400 text-white scale-100 shadow",
|
|
@@ -5046,10 +5138,10 @@ function ITStepper({
|
|
|
5046
5138
|
children: renderStepContent(idx, isCompleted, isActive)
|
|
5047
5139
|
}
|
|
5048
5140
|
),
|
|
5049
|
-
/* @__PURE__ */
|
|
5141
|
+
/* @__PURE__ */ jsx30(
|
|
5050
5142
|
"span",
|
|
5051
5143
|
{
|
|
5052
|
-
className:
|
|
5144
|
+
className: clsx19(
|
|
5053
5145
|
"mt-2 text-xs sm:text-sm font-medium transition-colors text-center",
|
|
5054
5146
|
isCompleted ? "text-slate-400" : !isActive && "text-gray-400"
|
|
5055
5147
|
),
|
|
@@ -5063,14 +5155,14 @@ function ITStepper({
|
|
|
5063
5155
|
);
|
|
5064
5156
|
}) })
|
|
5065
5157
|
] }),
|
|
5066
|
-
/* @__PURE__ */
|
|
5158
|
+
/* @__PURE__ */ jsx30(
|
|
5067
5159
|
"div",
|
|
5068
5160
|
{
|
|
5069
5161
|
ref: contentRef,
|
|
5070
5162
|
tabIndex: -1,
|
|
5071
5163
|
role: "region",
|
|
5072
5164
|
"aria-labelledby": `step-${currentStep}`,
|
|
5073
|
-
className:
|
|
5165
|
+
className: clsx19(
|
|
5074
5166
|
stepClassName,
|
|
5075
5167
|
"bg-white border border-gray-100 rounded-2xl shadow-lg min-h-[280px] transition-transform duration-400 no-scrollbar p-6",
|
|
5076
5168
|
scrollableContent && "overflow-y-auto hide-scrollbar"
|
|
@@ -5079,37 +5171,37 @@ function ITStepper({
|
|
|
5079
5171
|
children: steps[currentStep].content
|
|
5080
5172
|
}
|
|
5081
5173
|
),
|
|
5082
|
-
/* @__PURE__ */
|
|
5083
|
-
/* @__PURE__ */
|
|
5174
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-center mt-6", children: [
|
|
5175
|
+
/* @__PURE__ */ jsx30(
|
|
5084
5176
|
ITButton,
|
|
5085
5177
|
{
|
|
5086
5178
|
variant: "outlined",
|
|
5087
5179
|
color: "secondary",
|
|
5088
5180
|
disabled: currentStep === 0,
|
|
5089
5181
|
onClick: prevStep,
|
|
5090
|
-
children: /* @__PURE__ */
|
|
5091
|
-
/* @__PURE__ */
|
|
5182
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
5183
|
+
/* @__PURE__ */ jsx30(FaChevronLeft4, {}),
|
|
5092
5184
|
"Atr\xE1s"
|
|
5093
5185
|
] })
|
|
5094
5186
|
}
|
|
5095
5187
|
),
|
|
5096
|
-
/* @__PURE__ */
|
|
5097
|
-
/* @__PURE__ */
|
|
5188
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-3", children: [
|
|
5189
|
+
/* @__PURE__ */ jsxs21("div", { className: "text-sm text-gray-500 mr-2 hidden sm:block", children: [
|
|
5098
5190
|
"Paso ",
|
|
5099
5191
|
currentStep + 1,
|
|
5100
5192
|
" de ",
|
|
5101
5193
|
steps.length
|
|
5102
5194
|
] }),
|
|
5103
|
-
/* @__PURE__ */
|
|
5195
|
+
/* @__PURE__ */ jsx30(
|
|
5104
5196
|
ITButton,
|
|
5105
5197
|
{
|
|
5106
5198
|
variant: "solid",
|
|
5107
5199
|
color,
|
|
5108
5200
|
disabled: disableNext,
|
|
5109
5201
|
onClick: nextStep,
|
|
5110
|
-
children: /* @__PURE__ */
|
|
5202
|
+
children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
5111
5203
|
currentStep === steps.length - 1 ? "Finalizar" : "Siguiente",
|
|
5112
|
-
currentStep === steps.length - 1 ? /* @__PURE__ */
|
|
5204
|
+
currentStep === steps.length - 1 ? /* @__PURE__ */ jsx30(FaCheck3, {}) : /* @__PURE__ */ jsx30(FaChevronRight5, {})
|
|
5113
5205
|
] })
|
|
5114
5206
|
}
|
|
5115
5207
|
)
|
|
@@ -5120,7 +5212,7 @@ function ITStepper({
|
|
|
5120
5212
|
|
|
5121
5213
|
// src/components/theme-provider/themeProvider.tsx
|
|
5122
5214
|
import { useMemo as useMemo5 } from "react";
|
|
5123
|
-
import { Fragment as Fragment6, jsx as
|
|
5215
|
+
import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5124
5216
|
function ITThemeProvider({ theme: theme2, children }) {
|
|
5125
5217
|
const activeThemeContext = useMemo5(() => {
|
|
5126
5218
|
const baseColors = {
|
|
@@ -5262,8 +5354,8 @@ function ITThemeProvider({ theme: theme2, children }) {
|
|
|
5262
5354
|
return `:root {
|
|
5263
5355
|
${variablesString}}`;
|
|
5264
5356
|
}, [activeThemeContext]);
|
|
5265
|
-
return /* @__PURE__ */
|
|
5266
|
-
/* @__PURE__ */
|
|
5357
|
+
return /* @__PURE__ */ jsxs22(Fragment6, { children: [
|
|
5358
|
+
/* @__PURE__ */ jsx31("style", { suppressHydrationWarning: true, children: cssVariables }),
|
|
5267
5359
|
children
|
|
5268
5360
|
] });
|
|
5269
5361
|
}
|
|
@@ -5299,10 +5391,12 @@ export {
|
|
|
5299
5391
|
ITSlideToggle,
|
|
5300
5392
|
ITStepper,
|
|
5301
5393
|
ITTable,
|
|
5394
|
+
tabs_default as ITTabs,
|
|
5302
5395
|
ITText,
|
|
5303
5396
|
ITThemeProvider,
|
|
5304
5397
|
ITTimePicker,
|
|
5305
5398
|
ITToast,
|
|
5399
|
+
tripleFilter_default as ITTripleFilter,
|
|
5306
5400
|
createValidationSchema
|
|
5307
5401
|
};
|
|
5308
5402
|
//# sourceMappingURL=index.js.map
|