@axzydev/axzy_ui_system 1.3.5 → 1.4.0
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 +562 -506
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +107 -3
- package/dist/index.d.ts +107 -3
- package/dist/index.js +433 -378
- 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/molecules/date-picker/datePicker.tsx +1 -0
- package/src/components/molecules/dropdown-menu/dropdown-menu.tsx +1 -0
- package/src/components/molecules/multi-select/multi-select.tsx +1 -0
- package/src/components/molecules/search-select/search-select.tsx +1 -0
- package/src/components/molecules/time-picker/timePicker.tsx +1 -0
- package/src/components/organisms/dialog/dialog.stories.tsx +48 -0
- package/src/components/organisms/sidebar/sidebar.doc.mdx +12 -12
- package/src/hooks/useClickOutside.ts +6 -0
- package/src/hooks/useFloatingPanel.ts +4 -1
- package/src/index.ts +4 -2
- package/src/sandbox/navigation.ts +2 -0
- package/src/showcases/FeedbackShowcases.tsx +16 -1
- package/src/showcases/FormShowcases.tsx +287 -1
- package/src/showcases/HomeShowcase.tsx +552 -331
- package/src/showcases/ProductoDetalle.tsx +181 -0
- package/src/showcases/ProductoIcono.tsx +25 -0
- package/src/showcases/StructureShowcases.tsx +2 -2
- package/src/showcases/productos.ts +179 -0
- package/src/showcases/techIcons.ts +67 -0
package/dist/index.js
CHANGED
|
@@ -7,6 +7,8 @@ var useClickOutside = (ref, callback) => {
|
|
|
7
7
|
const clickedDialog = target?.closest("[data-it-dialog]");
|
|
8
8
|
const currentDialog = ref.current?.closest("[data-it-dialog]");
|
|
9
9
|
if (clickedDialog && clickedDialog !== currentDialog) return;
|
|
10
|
+
const clickedFloating = target?.closest("[data-it-floating]");
|
|
11
|
+
if (clickedFloating && !ref.current?.contains(clickedFloating)) return;
|
|
10
12
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
11
13
|
callback();
|
|
12
14
|
}
|
|
@@ -202,7 +204,7 @@ function useFloatingPanel(anchorRef, isOpen, {
|
|
|
202
204
|
const spaceAbove = rect.top;
|
|
203
205
|
const flipAbove = spaceBelow < panelHeight + offset && spaceAbove > spaceBelow;
|
|
204
206
|
const width = matchWidth ? rect.width : void 0;
|
|
205
|
-
const panelWidth = panelRef.current?.offsetWidth ??
|
|
207
|
+
const panelWidth = width ?? panelRef.current?.offsetWidth ?? 0;
|
|
206
208
|
let left = align === "end" && panelWidth ? rect.right - panelWidth : rect.left;
|
|
207
209
|
if (panelWidth) {
|
|
208
210
|
left = Math.max(8, Math.min(left, viewportWidth - panelWidth - 8));
|
|
@@ -2449,6 +2451,7 @@ function ITDropdownMenu({
|
|
|
2449
2451
|
"div",
|
|
2450
2452
|
{
|
|
2451
2453
|
ref: panelRef,
|
|
2454
|
+
"data-it-floating": "true",
|
|
2452
2455
|
role: "menu",
|
|
2453
2456
|
"aria-label": triggerLabel,
|
|
2454
2457
|
style: panelStyle,
|
|
@@ -2557,11 +2560,13 @@ function ITInput({
|
|
|
2557
2560
|
max,
|
|
2558
2561
|
readOnly = false,
|
|
2559
2562
|
focusContent,
|
|
2560
|
-
size = "md"
|
|
2563
|
+
size = "md",
|
|
2564
|
+
decimals
|
|
2561
2565
|
}) {
|
|
2562
2566
|
const isCheckboxOrRadio = type === "checkbox" || type === "radio";
|
|
2563
2567
|
const isNumberType = type === "number";
|
|
2564
2568
|
const isTextArea = type === "textarea";
|
|
2569
|
+
const decimalPlaces = decimals ?? (currencyFormat ? 2 : 0);
|
|
2565
2570
|
const [displayValue, setDisplayValue] = useState11("");
|
|
2566
2571
|
const [isFocused, setIsFocused] = useState11(false);
|
|
2567
2572
|
const [hasSelectedAll, setHasSelectedAll] = useState11(false);
|
|
@@ -2614,13 +2619,16 @@ function ITInput({
|
|
|
2614
2619
|
}
|
|
2615
2620
|
if (currencyFormat) {
|
|
2616
2621
|
return num.toLocaleString("es-MX", {
|
|
2617
|
-
minimumFractionDigits:
|
|
2618
|
-
maximumFractionDigits:
|
|
2622
|
+
minimumFractionDigits: decimalPlaces,
|
|
2623
|
+
maximumFractionDigits: decimalPlaces
|
|
2619
2624
|
});
|
|
2620
2625
|
}
|
|
2626
|
+
if (decimalPlaces > 0) {
|
|
2627
|
+
return num.toFixed(decimalPlaces);
|
|
2628
|
+
}
|
|
2621
2629
|
return num.toString();
|
|
2622
2630
|
},
|
|
2623
|
-
[currencyFormat]
|
|
2631
|
+
[currencyFormat, decimalPlaces]
|
|
2624
2632
|
);
|
|
2625
2633
|
const unformatValue = useCallback5(
|
|
2626
2634
|
(val) => {
|
|
@@ -2666,11 +2674,11 @@ function ITInput({
|
|
|
2666
2674
|
if (allowedKeys.includes(key) || ctrlKey || metaKey) {
|
|
2667
2675
|
return;
|
|
2668
2676
|
}
|
|
2669
|
-
if (
|
|
2677
|
+
if (decimalPlaces === 0 && (key === "." || key === ",")) {
|
|
2670
2678
|
e.preventDefault();
|
|
2671
2679
|
return;
|
|
2672
2680
|
}
|
|
2673
|
-
if (
|
|
2681
|
+
if (decimalPlaces > 0 && (key === "." || key === ",") && currentValue.includes(".")) {
|
|
2674
2682
|
const dotIndex = currentValue.indexOf(".");
|
|
2675
2683
|
const replacingDot = selectionStart !== null && selectionEnd !== null && selectionStart <= dotIndex && dotIndex < selectionEnd;
|
|
2676
2684
|
if (!replacingDot) {
|
|
@@ -2678,7 +2686,7 @@ function ITInput({
|
|
|
2678
2686
|
return;
|
|
2679
2687
|
}
|
|
2680
2688
|
}
|
|
2681
|
-
const allowedCharsRegex =
|
|
2689
|
+
const allowedCharsRegex = decimalPlaces > 0 ? /^[0-9.,]$/ : /^[0-9]$/;
|
|
2682
2690
|
if (key !== "Unidentified" && !allowedCharsRegex.test(key)) {
|
|
2683
2691
|
e.preventDefault();
|
|
2684
2692
|
return;
|
|
@@ -2696,7 +2704,7 @@ function ITInput({
|
|
|
2696
2704
|
if (readOnly) return;
|
|
2697
2705
|
let rawValue = e.target.value;
|
|
2698
2706
|
let cleanedValue = "";
|
|
2699
|
-
if (
|
|
2707
|
+
if (decimalPlaces > 0) {
|
|
2700
2708
|
if (rawValue.includes(",") && rawValue.includes(".")) {
|
|
2701
2709
|
rawValue = rawValue.replace(/,/g, "");
|
|
2702
2710
|
} else if (rawValue.includes(",")) {
|
|
@@ -2705,8 +2713,8 @@ function ITInput({
|
|
|
2705
2713
|
cleanedValue = rawValue.replace(/[^0-9.]/g, "");
|
|
2706
2714
|
const parts = cleanedValue.split(".");
|
|
2707
2715
|
if (parts.length > 1) {
|
|
2708
|
-
const
|
|
2709
|
-
cleanedValue = parts[0] + "." +
|
|
2716
|
+
const decimalPart = parts.slice(1).join("").substring(0, decimalPlaces);
|
|
2717
|
+
cleanedValue = parts[0] + "." + decimalPart;
|
|
2710
2718
|
}
|
|
2711
2719
|
} else {
|
|
2712
2720
|
cleanedValue = rawValue.replace(/[^0-9]/g, "");
|
|
@@ -2717,7 +2725,7 @@ function ITInput({
|
|
|
2717
2725
|
if (!formatNumber) {
|
|
2718
2726
|
valueToSend = cleanedValue;
|
|
2719
2727
|
} else if (cleanedValue !== "") {
|
|
2720
|
-
if (
|
|
2728
|
+
if (decimalPlaces > 0) {
|
|
2721
2729
|
const numericValue = parseFloat(cleanedValue);
|
|
2722
2730
|
if (!isNaN(numericValue)) {
|
|
2723
2731
|
valueToSend = cleanedValue;
|
|
@@ -2794,7 +2802,7 @@ function ITInput({
|
|
|
2794
2802
|
let numericValue = void 0;
|
|
2795
2803
|
let valueToSend = void 0;
|
|
2796
2804
|
let cleanedValue = "";
|
|
2797
|
-
if (
|
|
2805
|
+
if (decimalPlaces > 0) {
|
|
2798
2806
|
cleanedValue = currentValue.replace(/[^0-9.]/g, "");
|
|
2799
2807
|
const parts = cleanedValue.split(".");
|
|
2800
2808
|
if (parts.length > 2) {
|
|
@@ -2804,7 +2812,7 @@ function ITInput({
|
|
|
2804
2812
|
} else {
|
|
2805
2813
|
cleanedValue = currentValue.replace(/[^0-9]/g, "");
|
|
2806
2814
|
}
|
|
2807
|
-
const parsed =
|
|
2815
|
+
const parsed = decimalPlaces > 0 ? parseFloat(cleanedValue) : parseInt(cleanedValue, 10);
|
|
2808
2816
|
if (!isNaN(parsed)) {
|
|
2809
2817
|
numericValue = parsed;
|
|
2810
2818
|
if (min !== void 0 && numericValue < min) {
|
|
@@ -2837,7 +2845,7 @@ function ITInput({
|
|
|
2837
2845
|
}
|
|
2838
2846
|
onBlur?.(e);
|
|
2839
2847
|
};
|
|
2840
|
-
const currentLength = isNumberType ? (
|
|
2848
|
+
const currentLength = isNumberType ? (decimalPlaces > 0 ? displayValue.replace(/[.,]/g, "") : displayValue).length : typeof value === "string" ? value.length : String(value ?? "").length;
|
|
2841
2849
|
return /* @__PURE__ */ jsxs13("div", { className: clsx15("w-full", containerClassName), children: [
|
|
2842
2850
|
isCheckboxOrRadio ? (
|
|
2843
2851
|
// CHECKBOX / RADIO LAYOUT (Row)
|
|
@@ -2934,7 +2942,7 @@ function ITInput({
|
|
|
2934
2942
|
name,
|
|
2935
2943
|
id: name,
|
|
2936
2944
|
type: isNumberType ? "text" : type === "password" ? showPassword ? "text" : "password" : type,
|
|
2937
|
-
inputMode: isNumberType ?
|
|
2945
|
+
inputMode: isNumberType ? decimalPlaces > 0 ? "decimal" : "numeric" : void 0,
|
|
2938
2946
|
placeholder,
|
|
2939
2947
|
value: isNumberType ? displayValue : String(value ?? ""),
|
|
2940
2948
|
onChange: isNumberType ? handleNumberChange : handleTextChange,
|
|
@@ -2946,7 +2954,7 @@ function ITInput({
|
|
|
2946
2954
|
},
|
|
2947
2955
|
onKeyDown: isNumberType ? handleKeyDown : onKeyDown,
|
|
2948
2956
|
readOnly,
|
|
2949
|
-
maxLength: isNumberType &&
|
|
2957
|
+
maxLength: isNumberType && decimalPlaces === 0 ? maxLength : void 0,
|
|
2950
2958
|
minLength,
|
|
2951
2959
|
min,
|
|
2952
2960
|
max,
|
|
@@ -3429,6 +3437,7 @@ function ITMultiSelect({
|
|
|
3429
3437
|
"div",
|
|
3430
3438
|
{
|
|
3431
3439
|
ref: panelRef,
|
|
3440
|
+
"data-it-floating": "true",
|
|
3432
3441
|
role: "listbox",
|
|
3433
3442
|
"aria-multiselectable": "true",
|
|
3434
3443
|
style: panelStyle,
|
|
@@ -4098,6 +4107,7 @@ function ITSearchSelect({
|
|
|
4098
4107
|
"div",
|
|
4099
4108
|
{
|
|
4100
4109
|
ref: panelRef,
|
|
4110
|
+
"data-it-floating": "true",
|
|
4101
4111
|
style: panelStyle,
|
|
4102
4112
|
className: "bg-white dark:bg-slate-900 border border-secondary-200 dark:border-slate-800 rounded-lg shadow-xl overflow-hidden animate-in fade-in zoom-in duration-200 origin-top",
|
|
4103
4113
|
children: /* @__PURE__ */ jsx21("div", { className: "max-h-60 overflow-y-auto", children: filteredOptions.length > 0 ? filteredOptions.map((option) => {
|
|
@@ -4343,6 +4353,7 @@ function ITDatePicker({
|
|
|
4343
4353
|
"div",
|
|
4344
4354
|
{
|
|
4345
4355
|
ref: panelRef,
|
|
4356
|
+
"data-it-floating": "true",
|
|
4346
4357
|
className: clsx22(
|
|
4347
4358
|
calendarClassName,
|
|
4348
4359
|
range ? "w-[320px]" : "w-[280px]"
|
|
@@ -5490,6 +5501,7 @@ function ITTimePicker({
|
|
|
5490
5501
|
"div",
|
|
5491
5502
|
{
|
|
5492
5503
|
ref: dropdownRef,
|
|
5504
|
+
"data-it-floating": "true",
|
|
5493
5505
|
className: "bg-white border border-secondary-100 shadow-xl rounded-xl w-64 overflow-hidden flex flex-col animate-in fade-in zoom-in-95 duration-200 origin-top it-timepicker-dropdown",
|
|
5494
5506
|
style: panelStyle,
|
|
5495
5507
|
children: [
|
|
@@ -6198,10 +6210,52 @@ var ITImage = ({
|
|
|
6198
6210
|
};
|
|
6199
6211
|
var image_default = ITImage;
|
|
6200
6212
|
|
|
6213
|
+
// src/components/atoms/input-number/input-number.tsx
|
|
6214
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6215
|
+
function parseNumber(raw) {
|
|
6216
|
+
if (raw === void 0 || raw === null) return void 0;
|
|
6217
|
+
if (typeof raw === "number") return Number.isFinite(raw) ? raw : void 0;
|
|
6218
|
+
const cleaned = String(raw).replace(/,/g, "").trim();
|
|
6219
|
+
if (cleaned === "" || cleaned === "-" || cleaned === ".") return void 0;
|
|
6220
|
+
const parsed = Number(cleaned);
|
|
6221
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
6222
|
+
}
|
|
6223
|
+
function ITInputNumber({
|
|
6224
|
+
value,
|
|
6225
|
+
onChange,
|
|
6226
|
+
onBlur,
|
|
6227
|
+
decimals = 2,
|
|
6228
|
+
prefix,
|
|
6229
|
+
iconLeft,
|
|
6230
|
+
...rest
|
|
6231
|
+
}) {
|
|
6232
|
+
const resolvedIconLeft = iconLeft ?? (prefix ? /* @__PURE__ */ jsx36(ITText, { as: "span", className: "text-secondary-500 text-xs font-semibold", children: prefix }) : void 0);
|
|
6233
|
+
const handleChange = (event) => {
|
|
6234
|
+
onChange(parseNumber(event.target.value), event);
|
|
6235
|
+
};
|
|
6236
|
+
return /* @__PURE__ */ jsx36(
|
|
6237
|
+
ITInput,
|
|
6238
|
+
{
|
|
6239
|
+
...rest,
|
|
6240
|
+
type: "number",
|
|
6241
|
+
currencyFormat: true,
|
|
6242
|
+
formatNumber: true,
|
|
6243
|
+
decimals,
|
|
6244
|
+
iconLeft: resolvedIconLeft,
|
|
6245
|
+
value: value ?? "",
|
|
6246
|
+
onChange: handleChange,
|
|
6247
|
+
onBlur: (event) => {
|
|
6248
|
+
const input = event.target;
|
|
6249
|
+
onBlur?.(parseNumber(input.value), event);
|
|
6250
|
+
}
|
|
6251
|
+
}
|
|
6252
|
+
);
|
|
6253
|
+
}
|
|
6254
|
+
|
|
6201
6255
|
// src/components/organisms/navbar/navbar.tsx
|
|
6202
6256
|
import { useRef as useRef18, useState as useState24 } from "react";
|
|
6203
6257
|
import { FaChevronDown as FaChevronDown3, FaChevronRight as FaChevronRight4, FaUserCircle } from "react-icons/fa";
|
|
6204
|
-
import { jsx as
|
|
6258
|
+
import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6205
6259
|
function ITNavbar({
|
|
6206
6260
|
logo,
|
|
6207
6261
|
logoText,
|
|
@@ -6240,28 +6294,28 @@ function ITNavbar({
|
|
|
6240
6294
|
const shouldUseLegacy = !navigationItems.length && (navItems || sidebarItems);
|
|
6241
6295
|
if (shouldUseLegacy) {
|
|
6242
6296
|
return /* @__PURE__ */ jsxs28("div", { className: "flex flex-col h-screen", children: [
|
|
6243
|
-
/* @__PURE__ */
|
|
6297
|
+
/* @__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
6298
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center space-x-3 rtl:space-x-reverse", children: [
|
|
6245
|
-
logo && /* @__PURE__ */
|
|
6246
|
-
logoText && /* @__PURE__ */
|
|
6299
|
+
logo && /* @__PURE__ */ jsx37("div", { className: "h-8", children: logo }),
|
|
6300
|
+
logoText && /* @__PURE__ */ jsx37(ITText, { as: "span", className: "self-center text-2xl font-semibold whitespace-nowrap text-secondary-900", children: logoText })
|
|
6247
6301
|
] }),
|
|
6248
|
-
/* @__PURE__ */
|
|
6249
|
-
/* @__PURE__ */
|
|
6302
|
+
/* @__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: [
|
|
6303
|
+
/* @__PURE__ */ jsx37("ul", { className: "hidden md:flex space-x-4", children: navItems }),
|
|
6250
6304
|
userMenu && /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
6251
|
-
/* @__PURE__ */
|
|
6305
|
+
/* @__PURE__ */ jsx37(
|
|
6252
6306
|
"button",
|
|
6253
6307
|
{
|
|
6254
6308
|
type: "button",
|
|
6255
6309
|
className: "flex text-sm bg-secondary-200 rounded-full md:me-0 focus:ring-4 focus:ring-secondary-300",
|
|
6256
6310
|
onClick: toggleUserMenu,
|
|
6257
|
-
children: userMenu.userImage ? /* @__PURE__ */
|
|
6311
|
+
children: userMenu.userImage ? /* @__PURE__ */ jsx37(
|
|
6258
6312
|
"img",
|
|
6259
6313
|
{
|
|
6260
6314
|
className: "w-8 h-8 rounded-full",
|
|
6261
6315
|
src: userMenu.userImage,
|
|
6262
6316
|
alt: "user photo"
|
|
6263
6317
|
}
|
|
6264
|
-
) : /* @__PURE__ */
|
|
6318
|
+
) : /* @__PURE__ */ jsx37(FaUserCircle, { className: "w-8 h-8 text-secondary-500" })
|
|
6265
6319
|
}
|
|
6266
6320
|
),
|
|
6267
6321
|
isUserMenuOpen && /* @__PURE__ */ jsxs28(
|
|
@@ -6271,10 +6325,10 @@ function ITNavbar({
|
|
|
6271
6325
|
className: "z-[70] absolute right-0 mt-2 text-base list-none bg-white divide-y divide-secondary-100 rounded-lg shadow-sm",
|
|
6272
6326
|
children: [
|
|
6273
6327
|
/* @__PURE__ */ jsxs28("div", { className: "px-4 py-3", children: [
|
|
6274
|
-
/* @__PURE__ */
|
|
6275
|
-
/* @__PURE__ */
|
|
6328
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm text-secondary-900", children: userMenu.userName }),
|
|
6329
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm text-secondary-500 truncate", children: userMenu.userEmail })
|
|
6276
6330
|
] }),
|
|
6277
|
-
/* @__PURE__ */
|
|
6331
|
+
/* @__PURE__ */ jsx37("ul", { className: "py-2", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
6278
6332
|
"button",
|
|
6279
6333
|
{
|
|
6280
6334
|
onClick: () => {
|
|
@@ -6282,7 +6336,7 @@ function ITNavbar({
|
|
|
6282
6336
|
setIsUserMenuOpen(false);
|
|
6283
6337
|
},
|
|
6284
6338
|
className: "block px-4 py-2 text-sm text-secondary-700 hover:bg-secondary-100 w-full text-left",
|
|
6285
|
-
children: /* @__PURE__ */
|
|
6339
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: item.label })
|
|
6286
6340
|
}
|
|
6287
6341
|
) }, index)) })
|
|
6288
6342
|
]
|
|
@@ -6292,8 +6346,8 @@ function ITNavbar({
|
|
|
6292
6346
|
] }) })
|
|
6293
6347
|
] }) }),
|
|
6294
6348
|
/* @__PURE__ */ jsxs28("div", { className: "flex-1 flex overflow-hidden relative", children: [
|
|
6295
|
-
(showSidebar || showSidebarOnMobile) && /* @__PURE__ */
|
|
6296
|
-
/* @__PURE__ */
|
|
6349
|
+
(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 }) }) }),
|
|
6350
|
+
/* @__PURE__ */ jsx37("main", { className: "flex-1 bg-secondary-100 overflow-y-auto", children })
|
|
6297
6351
|
] })
|
|
6298
6352
|
] });
|
|
6299
6353
|
}
|
|
@@ -6307,10 +6361,10 @@ function ITNavbar({
|
|
|
6307
6361
|
style: { backgroundColor: sidebar.backgroundColor, borderRight: `1px solid ${sidebar.borderColor}` },
|
|
6308
6362
|
children: [
|
|
6309
6363
|
/* @__PURE__ */ jsxs28("div", { className: "p-6 flex items-center gap-3", style: { borderBottom: `1px solid ${sidebar.borderColor}` }, children: [
|
|
6310
|
-
logo && /* @__PURE__ */
|
|
6311
|
-
logoText && /* @__PURE__ */
|
|
6364
|
+
logo && /* @__PURE__ */ jsx37("div", { className: "h-8 w-auto object-contain transition-transform hover:scale-105", children: logo }),
|
|
6365
|
+
logoText && /* @__PURE__ */ jsx37(ITText, { as: "span", className: "text-lg font-bold tracking-wide", style: { color: sidebar.active.color }, children: logoText })
|
|
6312
6366
|
] }),
|
|
6313
|
-
/* @__PURE__ */
|
|
6367
|
+
/* @__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
6368
|
/* @__PURE__ */ jsxs28(
|
|
6315
6369
|
"div",
|
|
6316
6370
|
{
|
|
@@ -6335,16 +6389,16 @@ function ITNavbar({
|
|
|
6335
6389
|
},
|
|
6336
6390
|
children: [
|
|
6337
6391
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-3", children: [
|
|
6338
|
-
item.icon && /* @__PURE__ */
|
|
6392
|
+
item.icon && /* @__PURE__ */ jsx37("div", { className: "text-xl transition-colors", style: {
|
|
6339
6393
|
color: item.isActive ? sidebar.active.iconColor : sidebar.icon.color
|
|
6340
6394
|
}, children: item.icon }),
|
|
6341
|
-
/* @__PURE__ */
|
|
6395
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: `font-medium text-sm ${item.isActive ? "font-semibold" : ""}`, children: item.label })
|
|
6342
6396
|
] }),
|
|
6343
|
-
item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
6397
|
+
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
6398
|
]
|
|
6345
6399
|
}
|
|
6346
6400
|
),
|
|
6347
|
-
item.subitems && item.subitems.length > 0 && expandedItems.has(item.id) && /* @__PURE__ */
|
|
6401
|
+
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
6402
|
"button",
|
|
6349
6403
|
{
|
|
6350
6404
|
onClick: subitem.action,
|
|
@@ -6363,11 +6417,11 @@ function ITNavbar({
|
|
|
6363
6417
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
6364
6418
|
}
|
|
6365
6419
|
},
|
|
6366
|
-
children: /* @__PURE__ */
|
|
6420
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: subitem.label })
|
|
6367
6421
|
}
|
|
6368
6422
|
) }, subitem.id)) })
|
|
6369
6423
|
] }, item.id)) }) }),
|
|
6370
|
-
userMenu && /* @__PURE__ */
|
|
6424
|
+
userMenu && /* @__PURE__ */ jsx37("div", { className: "p-4", style: { borderTop: `1px solid ${sidebar.borderColor}` }, children: /* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
6371
6425
|
/* @__PURE__ */ jsxs28(
|
|
6372
6426
|
"button",
|
|
6373
6427
|
{
|
|
@@ -6384,7 +6438,7 @@ function ITNavbar({
|
|
|
6384
6438
|
},
|
|
6385
6439
|
onClick: toggleUserMenu,
|
|
6386
6440
|
children: [
|
|
6387
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
6441
|
+
userMenu.userImage ? /* @__PURE__ */ jsx37(
|
|
6388
6442
|
"img",
|
|
6389
6443
|
{
|
|
6390
6444
|
className: "w-10 h-10 rounded-full border-2 transition-colors",
|
|
@@ -6392,19 +6446,19 @@ function ITNavbar({
|
|
|
6392
6446
|
alt: "user photo",
|
|
6393
6447
|
style: { borderColor: sidebar.borderColor }
|
|
6394
6448
|
}
|
|
6395
|
-
) : /* @__PURE__ */
|
|
6449
|
+
) : /* @__PURE__ */ jsx37(
|
|
6396
6450
|
"div",
|
|
6397
6451
|
{
|
|
6398
6452
|
className: "w-10 h-10 rounded-full flex items-center justify-center transition-colors",
|
|
6399
6453
|
style: { backgroundColor: sidebar.hover.backgroundColor, color: sidebar.icon.color },
|
|
6400
|
-
children: /* @__PURE__ */
|
|
6454
|
+
children: /* @__PURE__ */ jsx37(FaUserCircle, { className: "w-6 h-6" })
|
|
6401
6455
|
}
|
|
6402
6456
|
),
|
|
6403
6457
|
/* @__PURE__ */ jsxs28("div", { className: "flex-1 text-left overflow-hidden", children: [
|
|
6404
|
-
/* @__PURE__ */
|
|
6405
|
-
/* @__PURE__ */
|
|
6458
|
+
/* @__PURE__ */ jsx37(ITText, { as: "div", className: "font-medium text-sm truncate", style: { color: sidebar.active.color }, children: userMenu.userName }),
|
|
6459
|
+
/* @__PURE__ */ jsx37(ITText, { as: "div", className: "text-xs truncate", style: { color: sidebar.label.color }, children: userMenu.userEmail })
|
|
6406
6460
|
] }),
|
|
6407
|
-
/* @__PURE__ */
|
|
6461
|
+
/* @__PURE__ */ jsx37(FaChevronRight4, { className: "w-3 h-3", style: { color: sidebar.icon.color } })
|
|
6408
6462
|
]
|
|
6409
6463
|
}
|
|
6410
6464
|
),
|
|
@@ -6416,10 +6470,10 @@ function ITNavbar({
|
|
|
6416
6470
|
style: { backgroundColor: topbar.userMenu.dropdown.backgroundColor, border: `1px solid ${topbar.userMenu.dropdown.borderColor}` },
|
|
6417
6471
|
children: [
|
|
6418
6472
|
/* @__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__ */
|
|
6473
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-sm font-semibold", style: { color: topbar.userMenu.textColor }, children: userMenu.userName }),
|
|
6474
|
+
/* @__PURE__ */ jsx37(ITText, { as: "span", className: "block text-xs truncate", style: { color: topbar.userMenu.subtitleColor }, children: userMenu.userEmail })
|
|
6421
6475
|
] }),
|
|
6422
|
-
/* @__PURE__ */
|
|
6476
|
+
/* @__PURE__ */ jsx37("ul", { className: "py-1", children: userMenu.menuItems.map((item, index) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
6423
6477
|
"button",
|
|
6424
6478
|
{
|
|
6425
6479
|
onClick: () => {
|
|
@@ -6434,7 +6488,7 @@ function ITNavbar({
|
|
|
6434
6488
|
onMouseLeave: (e) => {
|
|
6435
6489
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
6436
6490
|
},
|
|
6437
|
-
children: /* @__PURE__ */
|
|
6491
|
+
children: /* @__PURE__ */ jsx37(ITText, { as: "span", children: item.label })
|
|
6438
6492
|
}
|
|
6439
6493
|
) }, index)) })
|
|
6440
6494
|
]
|
|
@@ -6444,7 +6498,7 @@ function ITNavbar({
|
|
|
6444
6498
|
]
|
|
6445
6499
|
}
|
|
6446
6500
|
),
|
|
6447
|
-
/* @__PURE__ */
|
|
6501
|
+
/* @__PURE__ */ jsx37("main", { className: "flex-1 overflow-y-auto relative", style: { backgroundColor: theme.layout.backgroundColor }, children })
|
|
6448
6502
|
] });
|
|
6449
6503
|
}
|
|
6450
6504
|
|
|
@@ -6453,7 +6507,7 @@ import clsx33 from "clsx";
|
|
|
6453
6507
|
|
|
6454
6508
|
// src/components/organisms/page-header/page-header.tsx
|
|
6455
6509
|
import { FaChevronLeft as FaChevronLeft3 } from "react-icons/fa";
|
|
6456
|
-
import { jsx as
|
|
6510
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6457
6511
|
function ITPageHeader({
|
|
6458
6512
|
title,
|
|
6459
6513
|
description,
|
|
@@ -6468,22 +6522,22 @@ function ITPageHeader({
|
|
|
6468
6522
|
return /* @__PURE__ */ jsxs29("div", { className: `${className} space-y-3`, children: [
|
|
6469
6523
|
showTopRow && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between gap-4", children: [
|
|
6470
6524
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
6471
|
-
backAction && /* @__PURE__ */
|
|
6525
|
+
backAction && /* @__PURE__ */ jsx38(
|
|
6472
6526
|
"button",
|
|
6473
6527
|
{
|
|
6474
6528
|
onClick: backAction,
|
|
6475
6529
|
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
6530
|
"aria-label": "Volver",
|
|
6477
|
-
children: /* @__PURE__ */
|
|
6531
|
+
children: /* @__PURE__ */ jsx38(FaChevronLeft3, { size: 14 })
|
|
6478
6532
|
}
|
|
6479
6533
|
),
|
|
6480
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */
|
|
6534
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx38(ITBreadcrumbs, { items: breadcrumbs })
|
|
6481
6535
|
] }),
|
|
6482
|
-
actions && /* @__PURE__ */
|
|
6536
|
+
actions && /* @__PURE__ */ jsx38("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6483
6537
|
] }),
|
|
6484
6538
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-start justify-between gap-6", children: [
|
|
6485
6539
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-start gap-4 min-w-0", children: [
|
|
6486
|
-
icon && /* @__PURE__ */
|
|
6540
|
+
icon && /* @__PURE__ */ jsx38(
|
|
6487
6541
|
"div",
|
|
6488
6542
|
{
|
|
6489
6543
|
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 +6546,7 @@ function ITPageHeader({
|
|
|
6492
6546
|
}
|
|
6493
6547
|
),
|
|
6494
6548
|
/* @__PURE__ */ jsxs29("div", { className: "min-w-0", children: [
|
|
6495
|
-
/* @__PURE__ */
|
|
6549
|
+
/* @__PURE__ */ jsx38(
|
|
6496
6550
|
ITText,
|
|
6497
6551
|
{
|
|
6498
6552
|
as: "h1",
|
|
@@ -6500,7 +6554,7 @@ function ITPageHeader({
|
|
|
6500
6554
|
children: title
|
|
6501
6555
|
}
|
|
6502
6556
|
),
|
|
6503
|
-
description && /* @__PURE__ */
|
|
6557
|
+
description && /* @__PURE__ */ jsx38(
|
|
6504
6558
|
ITText,
|
|
6505
6559
|
{
|
|
6506
6560
|
as: "p",
|
|
@@ -6510,14 +6564,14 @@ function ITPageHeader({
|
|
|
6510
6564
|
)
|
|
6511
6565
|
] })
|
|
6512
6566
|
] }),
|
|
6513
|
-
!showTopRow && actions && /* @__PURE__ */
|
|
6567
|
+
!showTopRow && actions && /* @__PURE__ */ jsx38("div", { className: "flex items-center gap-3 flex-shrink-0", children: actions })
|
|
6514
6568
|
] })
|
|
6515
6569
|
] });
|
|
6516
6570
|
}
|
|
6517
6571
|
|
|
6518
6572
|
// src/components/atoms/skeleton/skeleton.tsx
|
|
6519
6573
|
import clsx31 from "clsx";
|
|
6520
|
-
import { Fragment as Fragment7, jsx as
|
|
6574
|
+
import { Fragment as Fragment7, jsx as jsx39 } from "react/jsx-runtime";
|
|
6521
6575
|
var variantClasses = {
|
|
6522
6576
|
text: "rounded-md h-4 w-full",
|
|
6523
6577
|
circular: "rounded-full",
|
|
@@ -6537,7 +6591,7 @@ function ITSkeleton({
|
|
|
6537
6591
|
...style
|
|
6538
6592
|
};
|
|
6539
6593
|
const items = Array.from({ length: count }, (_, i) => i);
|
|
6540
|
-
return /* @__PURE__ */
|
|
6594
|
+
return /* @__PURE__ */ jsx39(Fragment7, { children: items.map((i) => /* @__PURE__ */ jsx39(
|
|
6541
6595
|
"div",
|
|
6542
6596
|
{
|
|
6543
6597
|
className: clsx31(
|
|
@@ -6558,7 +6612,7 @@ function ITSkeleton({
|
|
|
6558
6612
|
// src/components/atoms/stack/stack.tsx
|
|
6559
6613
|
import clsx32 from "clsx";
|
|
6560
6614
|
import { Children, cloneElement, isValidElement, Fragment as Fragment8 } from "react";
|
|
6561
|
-
import { jsx as
|
|
6615
|
+
import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6562
6616
|
var directionMap2 = {
|
|
6563
6617
|
row: "flex-row",
|
|
6564
6618
|
column: "flex-col",
|
|
@@ -6603,7 +6657,7 @@ function ITStack({
|
|
|
6603
6657
|
gap: spacing > 0 ? `${spacing * 0.25}rem` : void 0,
|
|
6604
6658
|
...style
|
|
6605
6659
|
};
|
|
6606
|
-
return /* @__PURE__ */
|
|
6660
|
+
return /* @__PURE__ */ jsx40(
|
|
6607
6661
|
Component,
|
|
6608
6662
|
{
|
|
6609
6663
|
className: clsx32(
|
|
@@ -6624,11 +6678,11 @@ function ITStack({
|
|
|
6624
6678
|
}
|
|
6625
6679
|
|
|
6626
6680
|
// src/components/templates/page/page.tsx
|
|
6627
|
-
import { jsx as
|
|
6681
|
+
import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6628
6682
|
var hasHeader = (props) => !!(props.title || props.description || props.breadcrumbs || props.actions || props.backAction || props.icon);
|
|
6629
6683
|
var renderHeader = (props) => {
|
|
6630
6684
|
if (!hasHeader(props)) return null;
|
|
6631
|
-
return /* @__PURE__ */
|
|
6685
|
+
return /* @__PURE__ */ jsx41(
|
|
6632
6686
|
ITPageHeader,
|
|
6633
6687
|
{
|
|
6634
6688
|
title: props.title || "",
|
|
@@ -6670,21 +6724,21 @@ function ITPage(props) {
|
|
|
6670
6724
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6671
6725
|
renderHeader(props),
|
|
6672
6726
|
/* @__PURE__ */ jsxs31(ITStack, { spacing: 6, children: [
|
|
6673
|
-
/* @__PURE__ */
|
|
6674
|
-
/* @__PURE__ */
|
|
6675
|
-
/* @__PURE__ */
|
|
6727
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 40, width: "40%", className: "rounded-lg" }),
|
|
6728
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" }),
|
|
6729
|
+
/* @__PURE__ */ jsx41(ITSkeleton, { variant: "rectangular", height: 200, className: "rounded-lg" })
|
|
6676
6730
|
] })
|
|
6677
6731
|
] });
|
|
6678
6732
|
}
|
|
6679
6733
|
if (error) {
|
|
6680
6734
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6681
6735
|
renderHeader(props),
|
|
6682
|
-
/* @__PURE__ */
|
|
6736
|
+
/* @__PURE__ */ jsx41(
|
|
6683
6737
|
ITEmptyState,
|
|
6684
6738
|
{
|
|
6685
6739
|
title: errorTitle || "Error",
|
|
6686
6740
|
description: error,
|
|
6687
|
-
action: onRetry ? /* @__PURE__ */
|
|
6741
|
+
action: onRetry ? /* @__PURE__ */ jsx41(
|
|
6688
6742
|
ITButton,
|
|
6689
6743
|
{
|
|
6690
6744
|
label: errorActionLabel || "Reintentar",
|
|
@@ -6699,7 +6753,7 @@ function ITPage(props) {
|
|
|
6699
6753
|
if (empty) {
|
|
6700
6754
|
return /* @__PURE__ */ jsxs31("div", { className: wrapperClass, children: [
|
|
6701
6755
|
renderHeader(props),
|
|
6702
|
-
/* @__PURE__ */
|
|
6756
|
+
/* @__PURE__ */ jsx41(
|
|
6703
6757
|
ITEmptyState,
|
|
6704
6758
|
{
|
|
6705
6759
|
title: emptyTitle || "Sin datos",
|
|
@@ -6718,7 +6772,7 @@ function ITPage(props) {
|
|
|
6718
6772
|
// src/components/atoms/popover/popover.tsx
|
|
6719
6773
|
import { useState as useState25, useRef as useRef19 } from "react";
|
|
6720
6774
|
import clsx34 from "clsx";
|
|
6721
|
-
import { jsx as
|
|
6775
|
+
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6722
6776
|
var positionClasses = {
|
|
6723
6777
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
6724
6778
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -6742,14 +6796,14 @@ function ITPopover({
|
|
|
6742
6796
|
else setInternalOpen(false);
|
|
6743
6797
|
});
|
|
6744
6798
|
return /* @__PURE__ */ jsxs32("div", { ref, className: clsx34("relative inline-flex", className), children: [
|
|
6745
|
-
/* @__PURE__ */
|
|
6746
|
-
open && /* @__PURE__ */
|
|
6799
|
+
/* @__PURE__ */ jsx42("div", { onClick: () => isControlled ? onClose?.() : setInternalOpen((p) => !p), className: "cursor-pointer", children: trigger }),
|
|
6800
|
+
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
6801
|
] });
|
|
6748
6802
|
}
|
|
6749
6803
|
|
|
6750
6804
|
// src/components/atoms/progress/progress.tsx
|
|
6751
6805
|
import clsx35 from "clsx";
|
|
6752
|
-
import { jsx as
|
|
6806
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
6753
6807
|
var colorMap = {
|
|
6754
6808
|
primary: "bg-primary-500",
|
|
6755
6809
|
secondary: "bg-secondary-500",
|
|
@@ -6776,7 +6830,7 @@ function ITProgress({
|
|
|
6776
6830
|
style
|
|
6777
6831
|
}) {
|
|
6778
6832
|
const pct = Math.min(Math.max(value / max * 100, 0), 100);
|
|
6779
|
-
return /* @__PURE__ */
|
|
6833
|
+
return /* @__PURE__ */ jsx43(
|
|
6780
6834
|
"div",
|
|
6781
6835
|
{
|
|
6782
6836
|
className: clsx35("w-full bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden", sizeMap2[size], className),
|
|
@@ -6784,7 +6838,7 @@ function ITProgress({
|
|
|
6784
6838
|
role: "progressbar",
|
|
6785
6839
|
"aria-valuenow": variant === "determinate" ? value : void 0,
|
|
6786
6840
|
"aria-valuemax": max,
|
|
6787
|
-
children: /* @__PURE__ */
|
|
6841
|
+
children: /* @__PURE__ */ jsx43(
|
|
6788
6842
|
"div",
|
|
6789
6843
|
{
|
|
6790
6844
|
className: clsx35(
|
|
@@ -6801,7 +6855,7 @@ function ITProgress({
|
|
|
6801
6855
|
|
|
6802
6856
|
// src/components/atoms/radio/radio.tsx
|
|
6803
6857
|
import clsx36 from "clsx";
|
|
6804
|
-
import { jsx as
|
|
6858
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6805
6859
|
function ITRadioGroup({
|
|
6806
6860
|
name,
|
|
6807
6861
|
value,
|
|
@@ -6811,7 +6865,7 @@ function ITRadioGroup({
|
|
|
6811
6865
|
direction = "column",
|
|
6812
6866
|
className
|
|
6813
6867
|
}) {
|
|
6814
|
-
return /* @__PURE__ */
|
|
6868
|
+
return /* @__PURE__ */ jsx44(
|
|
6815
6869
|
"div",
|
|
6816
6870
|
{
|
|
6817
6871
|
className: clsx36(
|
|
@@ -6829,7 +6883,7 @@ function ITRadioGroup({
|
|
|
6829
6883
|
disabled && "opacity-50 cursor-not-allowed"
|
|
6830
6884
|
),
|
|
6831
6885
|
children: [
|
|
6832
|
-
/* @__PURE__ */
|
|
6886
|
+
/* @__PURE__ */ jsx44(
|
|
6833
6887
|
"input",
|
|
6834
6888
|
{
|
|
6835
6889
|
type: "radio",
|
|
@@ -6841,7 +6895,7 @@ function ITRadioGroup({
|
|
|
6841
6895
|
className: "peer sr-only"
|
|
6842
6896
|
}
|
|
6843
6897
|
),
|
|
6844
|
-
/* @__PURE__ */
|
|
6898
|
+
/* @__PURE__ */ jsx44(
|
|
6845
6899
|
"div",
|
|
6846
6900
|
{
|
|
6847
6901
|
className: clsx36(
|
|
@@ -6849,10 +6903,10 @@ function ITRadioGroup({
|
|
|
6849
6903
|
isSelected ? "border-primary-500" : "border-slate-300 dark:border-slate-600",
|
|
6850
6904
|
!disabled && "peer-focus:ring-2 peer-focus:ring-primary-200"
|
|
6851
6905
|
),
|
|
6852
|
-
children: isSelected && /* @__PURE__ */
|
|
6906
|
+
children: isSelected && /* @__PURE__ */ jsx44("div", { className: "w-2 h-2 rounded-full bg-primary-500" })
|
|
6853
6907
|
}
|
|
6854
6908
|
),
|
|
6855
|
-
/* @__PURE__ */
|
|
6909
|
+
/* @__PURE__ */ jsx44(ITText, { as: "span", className: "text-sm text-slate-700 dark:text-slate-300", children: opt.label })
|
|
6856
6910
|
]
|
|
6857
6911
|
},
|
|
6858
6912
|
opt.value
|
|
@@ -6868,7 +6922,7 @@ import { useState as useState26 } from "react";
|
|
|
6868
6922
|
|
|
6869
6923
|
// src/components/organisms/searchTable/components/SearchInput.tsx
|
|
6870
6924
|
import { FaSearch as FaSearch3 } from "react-icons/fa";
|
|
6871
|
-
import { jsx as
|
|
6925
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6872
6926
|
function SearchInput({
|
|
6873
6927
|
placeholder = "Buscar en todos los campos...",
|
|
6874
6928
|
value,
|
|
@@ -6876,8 +6930,8 @@ function SearchInput({
|
|
|
6876
6930
|
className = ""
|
|
6877
6931
|
}) {
|
|
6878
6932
|
return /* @__PURE__ */ jsxs34("div", { className: `relative flex-1 ${className}`, children: [
|
|
6879
|
-
/* @__PURE__ */
|
|
6880
|
-
/* @__PURE__ */
|
|
6933
|
+
/* @__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" }) }),
|
|
6934
|
+
/* @__PURE__ */ jsx45(
|
|
6881
6935
|
ITInput,
|
|
6882
6936
|
{
|
|
6883
6937
|
name: "global-search",
|
|
@@ -6894,7 +6948,7 @@ function SearchInput({
|
|
|
6894
6948
|
|
|
6895
6949
|
// src/components/organisms/searchTable/components/SortButton.tsx
|
|
6896
6950
|
import { FaSort, FaSortUp, FaSortDown } from "react-icons/fa";
|
|
6897
|
-
import { jsx as
|
|
6951
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6898
6952
|
function SortButton({
|
|
6899
6953
|
sortConfig,
|
|
6900
6954
|
onClick,
|
|
@@ -6908,15 +6962,15 @@ function SortButton({
|
|
|
6908
6962
|
"aria-label": `Ordenar tabla ${sortConfig ? sortConfig.direction === "asc" ? "descendente" : "ascendente" : "ascendente"}`,
|
|
6909
6963
|
title: "Ordenar tabla",
|
|
6910
6964
|
children: [
|
|
6911
|
-
sortConfig ? sortConfig.direction === "asc" ? /* @__PURE__ */
|
|
6912
|
-
/* @__PURE__ */
|
|
6965
|
+
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" }),
|
|
6966
|
+
/* @__PURE__ */ jsx46(ITText, { as: "span", className: "text-sm font-medium text-secondary-700", children: sortConfig ? sortConfig.direction === "asc" ? "Asc \u2191" : "Desc \u2193" : "Ordenar" })
|
|
6913
6967
|
]
|
|
6914
6968
|
}
|
|
6915
6969
|
);
|
|
6916
6970
|
}
|
|
6917
6971
|
|
|
6918
6972
|
// src/components/organisms/searchTable/components/SearchAndSortBar.tsx
|
|
6919
|
-
import { jsx as
|
|
6973
|
+
import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
6920
6974
|
function SearchAndSortBar({
|
|
6921
6975
|
searchTerm,
|
|
6922
6976
|
onSearchChange,
|
|
@@ -6925,8 +6979,8 @@ function SearchAndSortBar({
|
|
|
6925
6979
|
sortConfig,
|
|
6926
6980
|
searchInputPlaceholder = "Buscar en todos los campos..."
|
|
6927
6981
|
}) {
|
|
6928
|
-
return /* @__PURE__ */
|
|
6929
|
-
/* @__PURE__ */
|
|
6982
|
+
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: [
|
|
6983
|
+
/* @__PURE__ */ jsx47(
|
|
6930
6984
|
SearchInput,
|
|
6931
6985
|
{
|
|
6932
6986
|
placeholder: searchInputPlaceholder,
|
|
@@ -6934,8 +6988,8 @@ function SearchAndSortBar({
|
|
|
6934
6988
|
onChange: onSearchChange
|
|
6935
6989
|
}
|
|
6936
6990
|
),
|
|
6937
|
-
/* @__PURE__ */
|
|
6938
|
-
searchTerm && /* @__PURE__ */
|
|
6991
|
+
/* @__PURE__ */ jsx47(SortButton, { sortConfig, onClick: onGlobalSort }),
|
|
6992
|
+
searchTerm && /* @__PURE__ */ jsx47(
|
|
6939
6993
|
ITButton,
|
|
6940
6994
|
{
|
|
6941
6995
|
size: "sm",
|
|
@@ -6944,14 +6998,14 @@ function SearchAndSortBar({
|
|
|
6944
6998
|
onClick: onClearSearch,
|
|
6945
6999
|
ariaLabel: "Limpiar b\xFAsqueda",
|
|
6946
7000
|
title: "Limpiar b\xFAsqueda",
|
|
6947
|
-
children: /* @__PURE__ */
|
|
7001
|
+
children: /* @__PURE__ */ jsx47(ITText, { as: "span", children: "Limpiar" })
|
|
6948
7002
|
}
|
|
6949
7003
|
)
|
|
6950
7004
|
] }) });
|
|
6951
7005
|
}
|
|
6952
7006
|
|
|
6953
7007
|
// src/components/organisms/searchTable/components/TableHeaderCell.tsx
|
|
6954
|
-
import { jsx as
|
|
7008
|
+
import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
6955
7009
|
function TableHeaderCell({
|
|
6956
7010
|
label,
|
|
6957
7011
|
sortable = false,
|
|
@@ -6959,8 +7013,8 @@ function TableHeaderCell({
|
|
|
6959
7013
|
sortConfig,
|
|
6960
7014
|
className = ""
|
|
6961
7015
|
}) {
|
|
6962
|
-
return /* @__PURE__ */
|
|
6963
|
-
/* @__PURE__ */
|
|
7016
|
+
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: [
|
|
7017
|
+
/* @__PURE__ */ jsx48(
|
|
6964
7018
|
ITText,
|
|
6965
7019
|
{
|
|
6966
7020
|
as: "span",
|
|
@@ -6974,18 +7028,18 @@ function TableHeaderCell({
|
|
|
6974
7028
|
children: label
|
|
6975
7029
|
}
|
|
6976
7030
|
),
|
|
6977
|
-
sortable && /* @__PURE__ */
|
|
7031
|
+
sortable && /* @__PURE__ */ jsx48(SortButton, { sortConfig, onClick: onSort })
|
|
6978
7032
|
] }) }) });
|
|
6979
7033
|
}
|
|
6980
7034
|
|
|
6981
7035
|
// src/components/organisms/searchTable/components/TableHeader.tsx
|
|
6982
|
-
import { jsx as
|
|
7036
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
6983
7037
|
function TableHeader({
|
|
6984
7038
|
columns,
|
|
6985
7039
|
onSort,
|
|
6986
7040
|
sortConfig
|
|
6987
7041
|
}) {
|
|
6988
|
-
return /* @__PURE__ */
|
|
7042
|
+
return /* @__PURE__ */ jsx49("thead", { children: /* @__PURE__ */ jsx49("tr", { className: "bg-white border-b border-secondary-200", children: columns.map((col) => /* @__PURE__ */ jsx49(
|
|
6989
7043
|
TableHeaderCell,
|
|
6990
7044
|
{
|
|
6991
7045
|
label: col.label,
|
|
@@ -7003,7 +7057,7 @@ import clsx37 from "clsx";
|
|
|
7003
7057
|
import { FaCheck as FaCheck3, FaTimes as FaTimes8 } from "react-icons/fa";
|
|
7004
7058
|
|
|
7005
7059
|
// src/components/organisms/searchTable/components/EditableCell.tsx
|
|
7006
|
-
import { jsx as
|
|
7060
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
7007
7061
|
function EditableCell({
|
|
7008
7062
|
column,
|
|
7009
7063
|
value,
|
|
@@ -7032,7 +7086,7 @@ function EditableCell({
|
|
|
7032
7086
|
onChange(value, errorMsg);
|
|
7033
7087
|
};
|
|
7034
7088
|
const renderITInput = (type) => {
|
|
7035
|
-
return /* @__PURE__ */
|
|
7089
|
+
return /* @__PURE__ */ jsx50(
|
|
7036
7090
|
ITInput,
|
|
7037
7091
|
{
|
|
7038
7092
|
type,
|
|
@@ -7046,7 +7100,7 @@ function EditableCell({
|
|
|
7046
7100
|
);
|
|
7047
7101
|
};
|
|
7048
7102
|
const renderITDatePicker = () => {
|
|
7049
|
-
return /* @__PURE__ */
|
|
7103
|
+
return /* @__PURE__ */ jsx50(
|
|
7050
7104
|
ITDatePicker,
|
|
7051
7105
|
{
|
|
7052
7106
|
name: column.key,
|
|
@@ -7059,7 +7113,7 @@ function EditableCell({
|
|
|
7059
7113
|
);
|
|
7060
7114
|
};
|
|
7061
7115
|
const renderITSelect = (options) => {
|
|
7062
|
-
return /* @__PURE__ */
|
|
7116
|
+
return /* @__PURE__ */ jsx50(
|
|
7063
7117
|
ITSelect,
|
|
7064
7118
|
{
|
|
7065
7119
|
name: column.key,
|
|
@@ -7073,7 +7127,7 @@ function EditableCell({
|
|
|
7073
7127
|
);
|
|
7074
7128
|
};
|
|
7075
7129
|
const renderBooleanInput = () => {
|
|
7076
|
-
return /* @__PURE__ */
|
|
7130
|
+
return /* @__PURE__ */ jsx50(
|
|
7077
7131
|
ITInput,
|
|
7078
7132
|
{
|
|
7079
7133
|
type: "checkbox",
|
|
@@ -7116,12 +7170,12 @@ function EditableCell({
|
|
|
7116
7170
|
};
|
|
7117
7171
|
return /* @__PURE__ */ jsxs38("div", { className: "w-full", children: [
|
|
7118
7172
|
renderInput(),
|
|
7119
|
-
error && /* @__PURE__ */
|
|
7173
|
+
error && /* @__PURE__ */ jsx50("div", { className: "text-danger-500 text-xs mt-1", children: /* @__PURE__ */ jsx50(ITText, { as: "span", children: error }) })
|
|
7120
7174
|
] });
|
|
7121
7175
|
}
|
|
7122
7176
|
|
|
7123
7177
|
// src/components/organisms/searchTable/components/TableRow.tsx
|
|
7124
|
-
import { jsx as
|
|
7178
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
7125
7179
|
function TableRow({
|
|
7126
7180
|
row,
|
|
7127
7181
|
rowIndex,
|
|
@@ -7154,14 +7208,14 @@ function TableRow({
|
|
|
7154
7208
|
case "number":
|
|
7155
7209
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
7156
7210
|
case "boolean":
|
|
7157
|
-
return value ? /* @__PURE__ */
|
|
7211
|
+
return value ? /* @__PURE__ */ jsx51(
|
|
7158
7212
|
FaCheck3,
|
|
7159
7213
|
{
|
|
7160
7214
|
className: "text-green-500",
|
|
7161
7215
|
"aria-label": "Verdadero",
|
|
7162
7216
|
title: "Verdadero"
|
|
7163
7217
|
}
|
|
7164
|
-
) : /* @__PURE__ */
|
|
7218
|
+
) : /* @__PURE__ */ jsx51(FaTimes8, { className: "text-danger-500", "aria-label": "Falso", title: "Falso" });
|
|
7165
7219
|
case "actions":
|
|
7166
7220
|
if (isEditing && col.saveActions) {
|
|
7167
7221
|
return col.saveActions(rowData, {
|
|
@@ -7185,19 +7239,19 @@ function TableRow({
|
|
|
7185
7239
|
return value;
|
|
7186
7240
|
}
|
|
7187
7241
|
};
|
|
7188
|
-
return /* @__PURE__ */
|
|
7242
|
+
return /* @__PURE__ */ jsx51(
|
|
7189
7243
|
"tr",
|
|
7190
7244
|
{
|
|
7191
7245
|
onMouseEnter: () => setIsHovered(true),
|
|
7192
7246
|
onMouseLeave: () => setIsHovered(false),
|
|
7193
7247
|
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__ */
|
|
7248
|
+
children: columns.map((col) => /* @__PURE__ */ jsx51(
|
|
7195
7249
|
"td",
|
|
7196
7250
|
{
|
|
7197
7251
|
className: clsx37("pl-5 py-2", col.className, {
|
|
7198
7252
|
"text-center": col.type === "actions" || col.type === "boolean"
|
|
7199
7253
|
}),
|
|
7200
|
-
children: isEditing && col.editable ? /* @__PURE__ */
|
|
7254
|
+
children: isEditing && col.editable ? /* @__PURE__ */ jsx51(
|
|
7201
7255
|
EditableCell,
|
|
7202
7256
|
{
|
|
7203
7257
|
column: col,
|
|
@@ -7206,7 +7260,7 @@ function TableRow({
|
|
|
7206
7260
|
error: errors[col.key],
|
|
7207
7261
|
row: editedRow
|
|
7208
7262
|
}
|
|
7209
|
-
) : /* @__PURE__ */
|
|
7263
|
+
) : /* @__PURE__ */ jsx51(
|
|
7210
7264
|
"div",
|
|
7211
7265
|
{
|
|
7212
7266
|
className: clsx37({
|
|
@@ -7226,12 +7280,12 @@ function TableRow({
|
|
|
7226
7280
|
}
|
|
7227
7281
|
|
|
7228
7282
|
// src/components/organisms/searchTable/components/TableEmptyState.tsx
|
|
7229
|
-
import { jsx as
|
|
7283
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
7230
7284
|
function TableEmptyState({
|
|
7231
7285
|
colSpan,
|
|
7232
7286
|
searchTerm
|
|
7233
7287
|
}) {
|
|
7234
|
-
return /* @__PURE__ */
|
|
7288
|
+
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
7289
|
}
|
|
7236
7290
|
|
|
7237
7291
|
// src/components/organisms/searchTable/components/PaginationControls.tsx
|
|
@@ -7254,7 +7308,7 @@ function PaginationInfo({
|
|
|
7254
7308
|
}
|
|
7255
7309
|
|
|
7256
7310
|
// src/components/organisms/searchTable/components/PaginationControls.tsx
|
|
7257
|
-
import { jsx as
|
|
7311
|
+
import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7258
7312
|
function PaginationControls({
|
|
7259
7313
|
pageIndex,
|
|
7260
7314
|
totalPages,
|
|
@@ -7269,10 +7323,10 @@ function PaginationControls({
|
|
|
7269
7323
|
}) {
|
|
7270
7324
|
return /* @__PURE__ */ jsxs40("div", { className: "flex flex-col sm:flex-row justify-between items-center gap-4", children: [
|
|
7271
7325
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-4", children: [
|
|
7272
|
-
/* @__PURE__ */
|
|
7326
|
+
/* @__PURE__ */ jsx53(PaginationInfo, { currentCount, totalCount }),
|
|
7273
7327
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-2", children: [
|
|
7274
|
-
/* @__PURE__ */
|
|
7275
|
-
/* @__PURE__ */
|
|
7328
|
+
/* @__PURE__ */ jsx53(ITText, { as: "span", className: "text-sm text-secondary-700", children: "Mostrar:" }),
|
|
7329
|
+
/* @__PURE__ */ jsx53(
|
|
7276
7330
|
ITSelect,
|
|
7277
7331
|
{
|
|
7278
7332
|
name: "itemsPerPage",
|
|
@@ -7291,7 +7345,7 @@ function PaginationControls({
|
|
|
7291
7345
|
] })
|
|
7292
7346
|
] }),
|
|
7293
7347
|
/* @__PURE__ */ jsxs40("div", { className: "flex items-center space-x-2", children: [
|
|
7294
|
-
/* @__PURE__ */
|
|
7348
|
+
/* @__PURE__ */ jsx53(
|
|
7295
7349
|
ITButton,
|
|
7296
7350
|
{
|
|
7297
7351
|
color: "secondary",
|
|
@@ -7301,7 +7355,7 @@ function PaginationControls({
|
|
|
7301
7355
|
className: "min-w-[32px]",
|
|
7302
7356
|
ariaLabel: "P\xE1gina anterior",
|
|
7303
7357
|
title: "Ir a la p\xE1gina anterior",
|
|
7304
|
-
children: /* @__PURE__ */
|
|
7358
|
+
children: /* @__PURE__ */ jsx53(FaArrowLeft, { "aria-hidden": "true" })
|
|
7305
7359
|
}
|
|
7306
7360
|
),
|
|
7307
7361
|
/* @__PURE__ */ jsxs40(ITText, { as: "span", className: "px-4 py-2 text-sm text-secondary-700", "aria-live": "polite", children: [
|
|
@@ -7310,7 +7364,7 @@ function PaginationControls({
|
|
|
7310
7364
|
" de ",
|
|
7311
7365
|
totalPages
|
|
7312
7366
|
] }),
|
|
7313
|
-
/* @__PURE__ */
|
|
7367
|
+
/* @__PURE__ */ jsx53(
|
|
7314
7368
|
ITButton,
|
|
7315
7369
|
{
|
|
7316
7370
|
size: "sm",
|
|
@@ -7320,7 +7374,7 @@ function PaginationControls({
|
|
|
7320
7374
|
className: "min-w-[32px]",
|
|
7321
7375
|
ariaLabel: "P\xE1gina siguiente",
|
|
7322
7376
|
title: "Ir a la p\xE1gina siguiente",
|
|
7323
|
-
children: /* @__PURE__ */
|
|
7377
|
+
children: /* @__PURE__ */ jsx53(FaArrowRight, { "aria-hidden": "true" })
|
|
7324
7378
|
}
|
|
7325
7379
|
)
|
|
7326
7380
|
] })
|
|
@@ -7328,7 +7382,7 @@ function PaginationControls({
|
|
|
7328
7382
|
}
|
|
7329
7383
|
|
|
7330
7384
|
// src/components/organisms/searchTable/searchTable.tsx
|
|
7331
|
-
import { jsx as
|
|
7385
|
+
import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7332
7386
|
function ITSearchTable({
|
|
7333
7387
|
columns,
|
|
7334
7388
|
data,
|
|
@@ -7395,9 +7449,9 @@ function ITSearchTable({
|
|
|
7395
7449
|
};
|
|
7396
7450
|
return /* @__PURE__ */ jsxs41("div", { className: clsx38("space-y-4 w-full", containerClassName), children: [
|
|
7397
7451
|
/* @__PURE__ */ jsxs41("div", { className: "shadow-md sm:rounded-lg overflow-hidden", children: [
|
|
7398
|
-
title && /* @__PURE__ */
|
|
7452
|
+
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
7453
|
/* @__PURE__ */ jsxs41("div", { className: "bg-white", children: [
|
|
7400
|
-
/* @__PURE__ */
|
|
7454
|
+
/* @__PURE__ */ jsx54("div", { className: "p-4 border-b border-secondary-200", children: /* @__PURE__ */ jsx54(
|
|
7401
7455
|
SearchAndSortBar,
|
|
7402
7456
|
{
|
|
7403
7457
|
searchTerm,
|
|
@@ -7408,7 +7462,7 @@ function ITSearchTable({
|
|
|
7408
7462
|
searchInputPlaceholder
|
|
7409
7463
|
}
|
|
7410
7464
|
) }),
|
|
7411
|
-
/* @__PURE__ */
|
|
7465
|
+
/* @__PURE__ */ jsx54("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs41(
|
|
7412
7466
|
"table",
|
|
7413
7467
|
{
|
|
7414
7468
|
className: clsx38(
|
|
@@ -7417,7 +7471,7 @@ function ITSearchTable({
|
|
|
7417
7471
|
sizeStyles[size]
|
|
7418
7472
|
),
|
|
7419
7473
|
children: [
|
|
7420
|
-
/* @__PURE__ */
|
|
7474
|
+
/* @__PURE__ */ jsx54(
|
|
7421
7475
|
TableHeader,
|
|
7422
7476
|
{
|
|
7423
7477
|
columns,
|
|
@@ -7425,7 +7479,7 @@ function ITSearchTable({
|
|
|
7425
7479
|
sortConfig
|
|
7426
7480
|
}
|
|
7427
7481
|
),
|
|
7428
|
-
/* @__PURE__ */
|
|
7482
|
+
/* @__PURE__ */ jsx54("tbody", { children: data.length > 0 ? data.map((row, rowIndex) => /* @__PURE__ */ jsx54(
|
|
7429
7483
|
TableRow,
|
|
7430
7484
|
{
|
|
7431
7485
|
row,
|
|
@@ -7439,7 +7493,7 @@ function ITSearchTable({
|
|
|
7439
7493
|
onCancel: handleCancelEdit
|
|
7440
7494
|
},
|
|
7441
7495
|
rowIndex
|
|
7442
|
-
)) : /* @__PURE__ */
|
|
7496
|
+
)) : /* @__PURE__ */ jsx54(
|
|
7443
7497
|
TableEmptyState,
|
|
7444
7498
|
{
|
|
7445
7499
|
colSpan: columns.length + 1,
|
|
@@ -7451,7 +7505,7 @@ function ITSearchTable({
|
|
|
7451
7505
|
) })
|
|
7452
7506
|
] })
|
|
7453
7507
|
] }),
|
|
7454
|
-
/* @__PURE__ */
|
|
7508
|
+
/* @__PURE__ */ jsx54(
|
|
7455
7509
|
PaginationControls,
|
|
7456
7510
|
{
|
|
7457
7511
|
pageIndex,
|
|
@@ -7471,7 +7525,7 @@ function ITSearchTable({
|
|
|
7471
7525
|
|
|
7472
7526
|
// src/components/atoms/segmented-control/segmented-control.tsx
|
|
7473
7527
|
import clsx39 from "clsx";
|
|
7474
|
-
import { jsx as
|
|
7528
|
+
import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
7475
7529
|
var sizeMap3 = {
|
|
7476
7530
|
sm: { button: "px-2.5 py-1.5 text-[11px]", container: "p-0.5" },
|
|
7477
7531
|
md: { button: "px-3 py-2 text-xs", container: "p-1" }
|
|
@@ -7485,7 +7539,7 @@ function ITSegmentedControl({
|
|
|
7485
7539
|
disabled = false
|
|
7486
7540
|
}) {
|
|
7487
7541
|
const { button, container } = sizeMap3[size];
|
|
7488
|
-
return /* @__PURE__ */
|
|
7542
|
+
return /* @__PURE__ */ jsx55(
|
|
7489
7543
|
"div",
|
|
7490
7544
|
{
|
|
7491
7545
|
className: clsx39(
|
|
@@ -7508,8 +7562,8 @@ function ITSegmentedControl({
|
|
|
7508
7562
|
disabled && "pointer-events-none"
|
|
7509
7563
|
),
|
|
7510
7564
|
children: [
|
|
7511
|
-
opt.icon && /* @__PURE__ */
|
|
7512
|
-
/* @__PURE__ */
|
|
7565
|
+
opt.icon && /* @__PURE__ */ jsx55("span", { children: opt.icon }),
|
|
7566
|
+
/* @__PURE__ */ jsx55(ITText, { as: "span", children: opt.label })
|
|
7513
7567
|
]
|
|
7514
7568
|
},
|
|
7515
7569
|
opt.value
|
|
@@ -7522,7 +7576,7 @@ function ITSegmentedControl({
|
|
|
7522
7576
|
// src/components/organisms/sidebar/sidebar.tsx
|
|
7523
7577
|
import { useEffect as useEffect13, useRef as useRef20, useState as useState27 } from "react";
|
|
7524
7578
|
import { FaChevronDown as FaChevronDown4 } from "react-icons/fa";
|
|
7525
|
-
import { jsx as
|
|
7579
|
+
import { jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
7526
7580
|
function isSubItemGroup(entry) {
|
|
7527
7581
|
return "items" in entry;
|
|
7528
7582
|
}
|
|
@@ -7610,7 +7664,7 @@ function ITSidebar({
|
|
|
7610
7664
|
};
|
|
7611
7665
|
const isSidebarCollapsed = visibleOnMobile ? false : !isHovering && isCollapsed;
|
|
7612
7666
|
const sidebarWidth = isSidebarCollapsed ? "w-[88px]" : "w-[280px]";
|
|
7613
|
-
const renderSubItem = (subitem) => /* @__PURE__ */
|
|
7667
|
+
const renderSubItem = (subitem) => /* @__PURE__ */ jsx56("li", { className: "relative", children: /* @__PURE__ */ jsxs43(
|
|
7614
7668
|
"button",
|
|
7615
7669
|
{
|
|
7616
7670
|
"aria-current": subitem.isActive ? "page" : void 0,
|
|
@@ -7640,7 +7694,7 @@ function ITSidebar({
|
|
|
7640
7694
|
}
|
|
7641
7695
|
},
|
|
7642
7696
|
children: [
|
|
7643
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */
|
|
7697
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx56(
|
|
7644
7698
|
"div",
|
|
7645
7699
|
{
|
|
7646
7700
|
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full transition-all",
|
|
@@ -7650,7 +7704,7 @@ function ITSidebar({
|
|
|
7650
7704
|
}
|
|
7651
7705
|
}
|
|
7652
7706
|
),
|
|
7653
|
-
subitemConnector === "dot" && /* @__PURE__ */
|
|
7707
|
+
subitemConnector === "dot" && /* @__PURE__ */ jsx56(
|
|
7654
7708
|
"span",
|
|
7655
7709
|
{
|
|
7656
7710
|
className: `w-1.5 h-1.5 rounded-full flex-shrink-0 transition-all duration-300 ${subitem.isActive ? "scale-125" : ""}`,
|
|
@@ -7659,14 +7713,14 @@ function ITSidebar({
|
|
|
7659
7713
|
}
|
|
7660
7714
|
}
|
|
7661
7715
|
),
|
|
7662
|
-
/* @__PURE__ */
|
|
7716
|
+
/* @__PURE__ */ jsx56(ITText, { as: "span", className: "truncate", children: subitem.label })
|
|
7663
7717
|
]
|
|
7664
7718
|
}
|
|
7665
7719
|
) }, subitem.id);
|
|
7666
7720
|
const renderSubItemGroup = (group, itemId) => {
|
|
7667
7721
|
const headingId = `it-sidebar-subgroup-${itemId}-${group.id}`;
|
|
7668
7722
|
return /* @__PURE__ */ jsxs43("li", { className: "relative", children: [
|
|
7669
|
-
/* @__PURE__ */
|
|
7723
|
+
/* @__PURE__ */ jsx56("div", { id: headingId, className: "px-3 pt-2.5 pb-1 mt-1", children: /* @__PURE__ */ jsx56(
|
|
7670
7724
|
ITText,
|
|
7671
7725
|
{
|
|
7672
7726
|
as: "span",
|
|
@@ -7681,7 +7735,7 @@ function ITSidebar({
|
|
|
7681
7735
|
children: group.label
|
|
7682
7736
|
}
|
|
7683
7737
|
) }),
|
|
7684
|
-
/* @__PURE__ */
|
|
7738
|
+
/* @__PURE__ */ jsx56("ul", { "aria-labelledby": headingId, className: "flex flex-col gap-0", children: group.items.map(renderSubItem) })
|
|
7685
7739
|
] }, group.id);
|
|
7686
7740
|
};
|
|
7687
7741
|
return /* @__PURE__ */ jsxs43(
|
|
@@ -7704,8 +7758,8 @@ function ITSidebar({
|
|
|
7704
7758
|
backdropFilter: "blur(12px)"
|
|
7705
7759
|
},
|
|
7706
7760
|
children: [
|
|
7707
|
-
header && !isSidebarCollapsed && /* @__PURE__ */
|
|
7708
|
-
/* @__PURE__ */
|
|
7761
|
+
header && !isSidebarCollapsed && /* @__PURE__ */ jsx56("div", { className: "px-4 pt-4 pb-1 flex-shrink-0", children: header }),
|
|
7762
|
+
/* @__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
7763
|
const hasSubmenu = !!item.subitems && item.subitems.length > 0;
|
|
7710
7764
|
const submenuId = `it-sidebar-submenu-${item.id}`;
|
|
7711
7765
|
return /* @__PURE__ */ jsxs43("li", { className: "relative group/navitem", children: [
|
|
@@ -7741,7 +7795,7 @@ function ITSidebar({
|
|
|
7741
7795
|
}
|
|
7742
7796
|
},
|
|
7743
7797
|
children: [
|
|
7744
|
-
item.isActive && !isSidebarCollapsed && /* @__PURE__ */
|
|
7798
|
+
item.isActive && !isSidebarCollapsed && /* @__PURE__ */ jsx56(
|
|
7745
7799
|
"div",
|
|
7746
7800
|
{
|
|
7747
7801
|
className: "absolute left-0 top-1/4 bottom-1/4 w-[3px] rounded-r-full transition-all",
|
|
@@ -7749,7 +7803,7 @@ function ITSidebar({
|
|
|
7749
7803
|
}
|
|
7750
7804
|
),
|
|
7751
7805
|
/* @__PURE__ */ jsxs43("div", { className: `flex items-center ${!isSidebarCollapsed ? "gap-2.5" : "justify-center"} relative z-10 w-full`, children: [
|
|
7752
|
-
item.icon && /* @__PURE__ */
|
|
7806
|
+
item.icon && /* @__PURE__ */ jsx56(
|
|
7753
7807
|
"div",
|
|
7754
7808
|
{
|
|
7755
7809
|
className: `transition-all duration-300 flex-shrink-0 flex items-center justify-center`,
|
|
@@ -7762,7 +7816,7 @@ function ITSidebar({
|
|
|
7762
7816
|
children: item.icon
|
|
7763
7817
|
}
|
|
7764
7818
|
),
|
|
7765
|
-
!isSidebarCollapsed && /* @__PURE__ */
|
|
7819
|
+
!isSidebarCollapsed && /* @__PURE__ */ jsx56(
|
|
7766
7820
|
ITText,
|
|
7767
7821
|
{
|
|
7768
7822
|
as: "span",
|
|
@@ -7776,15 +7830,15 @@ function ITSidebar({
|
|
|
7776
7830
|
}
|
|
7777
7831
|
)
|
|
7778
7832
|
] }),
|
|
7779
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
7833
|
+
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */ jsx56(
|
|
7780
7834
|
"div",
|
|
7781
7835
|
{
|
|
7782
7836
|
className: `flex-shrink-0 transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)] ${expandedItems.has(item.id) ? "rotate-180" : ""}`,
|
|
7783
7837
|
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__ */
|
|
7838
|
+
children: /* @__PURE__ */ jsx56(FaChevronDown4, { className: "w-3 h-3" })
|
|
7785
7839
|
}
|
|
7786
7840
|
),
|
|
7787
|
-
item.badge && /* @__PURE__ */
|
|
7841
|
+
item.badge && /* @__PURE__ */ jsx56(
|
|
7788
7842
|
"span",
|
|
7789
7843
|
{
|
|
7790
7844
|
className: `
|
|
@@ -7814,15 +7868,15 @@ function ITSidebar({
|
|
|
7814
7868
|
},
|
|
7815
7869
|
children: [
|
|
7816
7870
|
/* @__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__ */
|
|
7871
|
+
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 }),
|
|
7872
|
+
/* @__PURE__ */ jsx56(ITText, { as: "span", className: "tracking-wide text-[15px]", children: item.label })
|
|
7819
7873
|
] }),
|
|
7820
|
-
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */
|
|
7874
|
+
item.subitems && item.subitems.length > 0 ? /* @__PURE__ */ jsx56("div", { className: "py-2", children: flattenSubItems(item.subitems).map((subitem) => /* @__PURE__ */ jsxs43(
|
|
7821
7875
|
"div",
|
|
7822
7876
|
{
|
|
7823
7877
|
className: `px-5 py-2.5 text-sm flex items-center gap-3 transition-colors relative`,
|
|
7824
7878
|
children: [
|
|
7825
|
-
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */
|
|
7879
|
+
subitem.isActive && subitemConnector === "|" && /* @__PURE__ */ jsx56(
|
|
7826
7880
|
"div",
|
|
7827
7881
|
{
|
|
7828
7882
|
className: "absolute left-0 top-1/3 bottom-1/3 w-[2.5px] rounded-r-full",
|
|
@@ -7832,16 +7886,16 @@ function ITSidebar({
|
|
|
7832
7886
|
}
|
|
7833
7887
|
}
|
|
7834
7888
|
),
|
|
7835
|
-
/* @__PURE__ */
|
|
7836
|
-
/* @__PURE__ */
|
|
7889
|
+
/* @__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))" } }),
|
|
7890
|
+
/* @__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
7891
|
]
|
|
7838
7892
|
},
|
|
7839
7893
|
subitem.id
|
|
7840
|
-
)) }) : /* @__PURE__ */
|
|
7894
|
+
)) }) : /* @__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
7895
|
]
|
|
7842
7896
|
}
|
|
7843
7897
|
),
|
|
7844
|
-
!isSidebarCollapsed && item.subitems && item.subitems.length > 0 && /* @__PURE__ */
|
|
7898
|
+
!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
7899
|
"ul",
|
|
7846
7900
|
{
|
|
7847
7901
|
className: "ml-4 flex flex-col gap-0 py-0.5",
|
|
@@ -7863,7 +7917,7 @@ function ITSidebar({
|
|
|
7863
7917
|
// src/components/atoms/slide/slide.tsx
|
|
7864
7918
|
import { useState as useState28, useEffect as useEffect14 } from "react";
|
|
7865
7919
|
import clsx40 from "clsx";
|
|
7866
|
-
import { jsx as
|
|
7920
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
7867
7921
|
function ITSlideToggle({
|
|
7868
7922
|
onToggle,
|
|
7869
7923
|
isOn: controlledIsOn,
|
|
@@ -7916,7 +7970,7 @@ function ITSlideToggle({
|
|
|
7916
7970
|
}
|
|
7917
7971
|
};
|
|
7918
7972
|
const { container, knob, translate } = sizeClasses2[size];
|
|
7919
|
-
return /* @__PURE__ */
|
|
7973
|
+
return /* @__PURE__ */ jsx57(
|
|
7920
7974
|
"div",
|
|
7921
7975
|
{
|
|
7922
7976
|
onClick: toggleSwitch,
|
|
@@ -7936,7 +7990,7 @@ function ITSlideToggle({
|
|
|
7936
7990
|
toggleSwitch();
|
|
7937
7991
|
}
|
|
7938
7992
|
},
|
|
7939
|
-
children: /* @__PURE__ */
|
|
7993
|
+
children: /* @__PURE__ */ jsx57(
|
|
7940
7994
|
"div",
|
|
7941
7995
|
{
|
|
7942
7996
|
className: clsx40(
|
|
@@ -7952,7 +8006,7 @@ function ITSlideToggle({
|
|
|
7952
8006
|
|
|
7953
8007
|
// src/components/atoms/slider/slider.tsx
|
|
7954
8008
|
import clsx41 from "clsx";
|
|
7955
|
-
import { jsx as
|
|
8009
|
+
import { jsx as jsx58, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
7956
8010
|
function ITSlider({
|
|
7957
8011
|
value,
|
|
7958
8012
|
onChange,
|
|
@@ -7969,7 +8023,7 @@ function ITSlider({
|
|
|
7969
8023
|
": ",
|
|
7970
8024
|
value
|
|
7971
8025
|
] }),
|
|
7972
|
-
/* @__PURE__ */
|
|
8026
|
+
/* @__PURE__ */ jsx58("div", { className: "relative w-full h-5 flex items-center", children: /* @__PURE__ */ jsx58(
|
|
7973
8027
|
"input",
|
|
7974
8028
|
{
|
|
7975
8029
|
type: "range",
|
|
@@ -8000,7 +8054,7 @@ function ITSlider({
|
|
|
8000
8054
|
|
|
8001
8055
|
// src/components/molecules/stat-card/stat-card.tsx
|
|
8002
8056
|
import clsx42 from "clsx";
|
|
8003
|
-
import { jsx as
|
|
8057
|
+
import { jsx as jsx59, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
8004
8058
|
var trendColors = {
|
|
8005
8059
|
up: "text-emerald-600 bg-emerald-50 dark:text-emerald-400 dark:bg-emerald-950/30",
|
|
8006
8060
|
down: "text-rose-600 bg-rose-50 dark:text-rose-400 dark:bg-rose-950/30",
|
|
@@ -8027,12 +8081,12 @@ function ITStatCard({
|
|
|
8027
8081
|
tabIndex: onClick ? 0 : void 0,
|
|
8028
8082
|
children: [
|
|
8029
8083
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-start justify-between mb-1", children: [
|
|
8030
|
-
/* @__PURE__ */
|
|
8031
|
-
icon && /* @__PURE__ */
|
|
8084
|
+
/* @__PURE__ */ jsx59(ITText, { as: "span", className: "text-xs font-medium text-slate-400 dark:text-slate-500", children: label }),
|
|
8085
|
+
icon && /* @__PURE__ */ jsx59("span", { className: "text-slate-400", children: icon })
|
|
8032
8086
|
] }),
|
|
8033
8087
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-baseline gap-2", children: [
|
|
8034
|
-
/* @__PURE__ */
|
|
8035
|
-
trend && /* @__PURE__ */
|
|
8088
|
+
/* @__PURE__ */ jsx59(ITText, { as: "span", className: "text-2xl font-bold text-slate-800 dark:text-white", children: value }),
|
|
8089
|
+
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
8090
|
] })
|
|
8037
8091
|
]
|
|
8038
8092
|
}
|
|
@@ -8051,7 +8105,7 @@ import {
|
|
|
8051
8105
|
} from "react-icons/fa";
|
|
8052
8106
|
import { MdOutlineSwapVert as MdOutlineSwapVert2 } from "react-icons/md";
|
|
8053
8107
|
import { isSameDay as isSameDay2, startOfDay as startOfDay2, endOfDay } from "date-fns";
|
|
8054
|
-
import { Fragment as Fragment9, jsx as
|
|
8108
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
8055
8109
|
function ITTable({
|
|
8056
8110
|
columns,
|
|
8057
8111
|
data = [],
|
|
@@ -8207,14 +8261,14 @@ function ITTable({
|
|
|
8207
8261
|
if (currentValue === true) return "Filtrar solo verdaderos";
|
|
8208
8262
|
return "Filtrar solo falsos";
|
|
8209
8263
|
};
|
|
8210
|
-
return /* @__PURE__ */
|
|
8264
|
+
return /* @__PURE__ */ jsx60(
|
|
8211
8265
|
"button",
|
|
8212
8266
|
{
|
|
8213
8267
|
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
8268
|
onClick: () => handleFilterChange(col.key, nextValue),
|
|
8215
8269
|
"aria-label": `${getToggleLabel()} para ${col.label}`,
|
|
8216
8270
|
title: `${getToggleLabel()} para ${col.label}`,
|
|
8217
|
-
children: /* @__PURE__ */
|
|
8271
|
+
children: /* @__PURE__ */ jsx60("div", { className: "relative w-10 h-5 bg-secondary-300 rounded-full", children: /* @__PURE__ */ jsx60(
|
|
8218
8272
|
"div",
|
|
8219
8273
|
{
|
|
8220
8274
|
className: clsx43(
|
|
@@ -8232,7 +8286,7 @@ function ITTable({
|
|
|
8232
8286
|
}
|
|
8233
8287
|
if (col.filter === "catalog" && col.catalogOptions) {
|
|
8234
8288
|
if (col.catalogOptions.loading) {
|
|
8235
|
-
return /* @__PURE__ */
|
|
8289
|
+
return /* @__PURE__ */ jsx60(
|
|
8236
8290
|
FaSpinner3,
|
|
8237
8291
|
{
|
|
8238
8292
|
className: "animate-spin",
|
|
@@ -8242,9 +8296,9 @@ function ITTable({
|
|
|
8242
8296
|
);
|
|
8243
8297
|
}
|
|
8244
8298
|
if (col.catalogOptions.error) {
|
|
8245
|
-
return /* @__PURE__ */
|
|
8299
|
+
return /* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8246
8300
|
}
|
|
8247
|
-
return /* @__PURE__ */
|
|
8301
|
+
return /* @__PURE__ */ jsx60(
|
|
8248
8302
|
ITSelect,
|
|
8249
8303
|
{
|
|
8250
8304
|
name: `filter-${col.key}`,
|
|
@@ -8268,7 +8322,7 @@ function ITTable({
|
|
|
8268
8322
|
}
|
|
8269
8323
|
if (col.filter === "search" && col.catalogOptions) {
|
|
8270
8324
|
if (col.catalogOptions.loading) {
|
|
8271
|
-
return /* @__PURE__ */
|
|
8325
|
+
return /* @__PURE__ */ jsx60(
|
|
8272
8326
|
FaSpinner3,
|
|
8273
8327
|
{
|
|
8274
8328
|
className: "animate-spin",
|
|
@@ -8278,10 +8332,10 @@ function ITTable({
|
|
|
8278
8332
|
);
|
|
8279
8333
|
}
|
|
8280
8334
|
if (col.catalogOptions.error) {
|
|
8281
|
-
return /* @__PURE__ */
|
|
8335
|
+
return /* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8282
8336
|
}
|
|
8283
8337
|
const searchValue = filters[col.key];
|
|
8284
|
-
return /* @__PURE__ */
|
|
8338
|
+
return /* @__PURE__ */ jsx60(
|
|
8285
8339
|
ITSearchSelect,
|
|
8286
8340
|
{
|
|
8287
8341
|
name: `filter-${col.key}`,
|
|
@@ -8304,7 +8358,7 @@ function ITTable({
|
|
|
8304
8358
|
}
|
|
8305
8359
|
if (col.filter === "date") {
|
|
8306
8360
|
const dateValue = filters[col.key];
|
|
8307
|
-
return /* @__PURE__ */
|
|
8361
|
+
return /* @__PURE__ */ jsx60(
|
|
8308
8362
|
ITDatePicker,
|
|
8309
8363
|
{
|
|
8310
8364
|
name: `filter-${col.key}`,
|
|
@@ -8320,7 +8374,7 @@ function ITTable({
|
|
|
8320
8374
|
}
|
|
8321
8375
|
if (col.filter === "date-range") {
|
|
8322
8376
|
const rangeValue = filters[col.key];
|
|
8323
|
-
return /* @__PURE__ */
|
|
8377
|
+
return /* @__PURE__ */ jsx60(
|
|
8324
8378
|
ITDatePicker,
|
|
8325
8379
|
{
|
|
8326
8380
|
name: `filter-${col.key}`,
|
|
@@ -8335,7 +8389,7 @@ function ITTable({
|
|
|
8335
8389
|
}
|
|
8336
8390
|
);
|
|
8337
8391
|
}
|
|
8338
|
-
return /* @__PURE__ */
|
|
8392
|
+
return /* @__PURE__ */ jsx60(
|
|
8339
8393
|
ITInput,
|
|
8340
8394
|
{
|
|
8341
8395
|
name: `filter-${col.key}`,
|
|
@@ -8357,14 +8411,14 @@ function ITTable({
|
|
|
8357
8411
|
case "number":
|
|
8358
8412
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
8359
8413
|
case "boolean":
|
|
8360
|
-
return value ? /* @__PURE__ */
|
|
8414
|
+
return value ? /* @__PURE__ */ jsx60(
|
|
8361
8415
|
FaCheck4,
|
|
8362
8416
|
{
|
|
8363
8417
|
className: "text-success-500",
|
|
8364
8418
|
"aria-label": "Verdadero",
|
|
8365
8419
|
title: "Verdadero"
|
|
8366
8420
|
}
|
|
8367
|
-
) : /* @__PURE__ */
|
|
8421
|
+
) : /* @__PURE__ */ jsx60(
|
|
8368
8422
|
FaTimes9,
|
|
8369
8423
|
{
|
|
8370
8424
|
className: "text-danger-500",
|
|
@@ -8391,10 +8445,10 @@ function ITTable({
|
|
|
8391
8445
|
const actionCol = columns.find((c) => c.type === "actions");
|
|
8392
8446
|
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
8447
|
dataCols.map((col) => /* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8394
|
-
/* @__PURE__ */
|
|
8395
|
-
/* @__PURE__ */
|
|
8448
|
+
/* @__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 }),
|
|
8449
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
|
|
8396
8450
|
] }, col.key)),
|
|
8397
|
-
actionCol?.actions && /* @__PURE__ */
|
|
8451
|
+
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
8452
|
] });
|
|
8399
8453
|
};
|
|
8400
8454
|
const handleRowClick = (row) => (event) => {
|
|
@@ -8408,9 +8462,9 @@ function ITTable({
|
|
|
8408
8462
|
event.preventDefault();
|
|
8409
8463
|
onRowClick(row, event);
|
|
8410
8464
|
};
|
|
8411
|
-
return /* @__PURE__ */
|
|
8465
|
+
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
8466
|
title && /* @__PURE__ */ jsxs46("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8413
|
-
/* @__PURE__ */
|
|
8467
|
+
/* @__PURE__ */ jsx60(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
|
|
8414
8468
|
/* @__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
8469
|
/* @__PURE__ */ jsxs46(
|
|
8416
8470
|
"button",
|
|
@@ -8419,7 +8473,7 @@ function ITTable({
|
|
|
8419
8473
|
disabled: forcedCards,
|
|
8420
8474
|
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
8475
|
children: [
|
|
8422
|
-
/* @__PURE__ */
|
|
8476
|
+
/* @__PURE__ */ jsx60(FaTable2, { size: 11 }),
|
|
8423
8477
|
"Table"
|
|
8424
8478
|
]
|
|
8425
8479
|
}
|
|
@@ -8430,14 +8484,14 @@ function ITTable({
|
|
|
8430
8484
|
onClick: () => setViewMode("cards"),
|
|
8431
8485
|
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
8486
|
children: [
|
|
8433
|
-
/* @__PURE__ */
|
|
8487
|
+
/* @__PURE__ */ jsx60(FaThLarge2, { size: 11 }),
|
|
8434
8488
|
"Cards"
|
|
8435
8489
|
]
|
|
8436
8490
|
}
|
|
8437
8491
|
)
|
|
8438
8492
|
] })
|
|
8439
8493
|
] }),
|
|
8440
|
-
!title && /* @__PURE__ */
|
|
8494
|
+
!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
8495
|
/* @__PURE__ */ jsxs46(
|
|
8442
8496
|
"button",
|
|
8443
8497
|
{
|
|
@@ -8445,7 +8499,7 @@ function ITTable({
|
|
|
8445
8499
|
disabled: forcedCards,
|
|
8446
8500
|
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
8501
|
children: [
|
|
8448
|
-
/* @__PURE__ */
|
|
8502
|
+
/* @__PURE__ */ jsx60(FaTable2, { size: 11 }),
|
|
8449
8503
|
"Table"
|
|
8450
8504
|
]
|
|
8451
8505
|
}
|
|
@@ -8456,13 +8510,13 @@ function ITTable({
|
|
|
8456
8510
|
onClick: () => setViewMode("cards"),
|
|
8457
8511
|
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
8512
|
children: [
|
|
8459
|
-
/* @__PURE__ */
|
|
8513
|
+
/* @__PURE__ */ jsx60(FaThLarge2, { size: 11 }),
|
|
8460
8514
|
"Cards"
|
|
8461
8515
|
]
|
|
8462
8516
|
}
|
|
8463
8517
|
)
|
|
8464
8518
|
] }) }),
|
|
8465
|
-
effectiveView === "cards" ? /* @__PURE__ */
|
|
8519
|
+
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
8520
|
"div",
|
|
8467
8521
|
{
|
|
8468
8522
|
className: clsx43(tableCardHover, onRowClick && tableCardClickable),
|
|
@@ -8474,9 +8528,9 @@ function ITTable({
|
|
|
8474
8528
|
},
|
|
8475
8529
|
i
|
|
8476
8530
|
)) : /* @__PURE__ */ jsxs46("div", { className: clsx43(tableEmptyContent, "py-12"), children: [
|
|
8477
|
-
/* @__PURE__ */
|
|
8478
|
-
/* @__PURE__ */
|
|
8479
|
-
] }) }) : /* @__PURE__ */
|
|
8531
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8532
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8533
|
+
] }) }) : /* @__PURE__ */ jsx60(
|
|
8480
8534
|
"div",
|
|
8481
8535
|
{
|
|
8482
8536
|
ref: isTableVirtual ? scrollRef : void 0,
|
|
@@ -8495,14 +8549,14 @@ function ITTable({
|
|
|
8495
8549
|
style: isFixed ? { tableLayout: "fixed" } : void 0,
|
|
8496
8550
|
"aria-rowcount": isTableVirtual ? currentData.length + 1 : void 0,
|
|
8497
8551
|
children: [
|
|
8498
|
-
hasColumnWidths && /* @__PURE__ */
|
|
8552
|
+
hasColumnWidths && /* @__PURE__ */ jsx60("colgroup", { children: columns.map((col) => /* @__PURE__ */ jsx60(
|
|
8499
8553
|
"col",
|
|
8500
8554
|
{
|
|
8501
8555
|
style: col.width != null ? { width: typeof col.width === "number" ? `${col.width}px` : col.width } : void 0
|
|
8502
8556
|
},
|
|
8503
8557
|
col.key
|
|
8504
8558
|
)) }),
|
|
8505
|
-
/* @__PURE__ */
|
|
8559
|
+
/* @__PURE__ */ jsx60("thead", { children: /* @__PURE__ */ jsx60(
|
|
8506
8560
|
"tr",
|
|
8507
8561
|
{
|
|
8508
8562
|
className: clsx43(tableHeaderRow, "dark:text-slate-200"),
|
|
@@ -8510,7 +8564,7 @@ function ITTable({
|
|
|
8510
8564
|
children: columns.map((col) => {
|
|
8511
8565
|
const pin = pinnedMeta[col.key];
|
|
8512
8566
|
const isPinned = pin != null;
|
|
8513
|
-
return /* @__PURE__ */
|
|
8567
|
+
return /* @__PURE__ */ jsx60(
|
|
8514
8568
|
"th",
|
|
8515
8569
|
{
|
|
8516
8570
|
scope: "col",
|
|
@@ -8529,18 +8583,18 @@ function ITTable({
|
|
|
8529
8583
|
} : void 0,
|
|
8530
8584
|
children: /* @__PURE__ */ jsxs46("div", { className: isFixed ? "flex flex-col gap-3" : "flex flex-col gap-3 min-w-[150px]", children: [
|
|
8531
8585
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8532
|
-
/* @__PURE__ */
|
|
8533
|
-
col.sortable && col.type !== "actions" && /* @__PURE__ */
|
|
8586
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
|
|
8587
|
+
col.sortable && col.type !== "actions" && /* @__PURE__ */ jsx60(
|
|
8534
8588
|
"button",
|
|
8535
8589
|
{
|
|
8536
8590
|
onClick: () => handleSort(col.key),
|
|
8537
8591
|
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
8592
|
title: `Ordenar por ${col.label}`,
|
|
8539
|
-
children: /* @__PURE__ */
|
|
8593
|
+
children: /* @__PURE__ */ jsx60(MdOutlineSwapVert2, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
8540
8594
|
}
|
|
8541
8595
|
)
|
|
8542
8596
|
] }),
|
|
8543
|
-
/* @__PURE__ */
|
|
8597
|
+
/* @__PURE__ */ jsx60("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
|
|
8544
8598
|
] })
|
|
8545
8599
|
},
|
|
8546
8600
|
col.key
|
|
@@ -8548,11 +8602,11 @@ function ITTable({
|
|
|
8548
8602
|
})
|
|
8549
8603
|
}
|
|
8550
8604
|
) }),
|
|
8551
|
-
/* @__PURE__ */
|
|
8552
|
-
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */
|
|
8605
|
+
/* @__PURE__ */ jsx60("tbody", { className: clsx43(tableBody, "dark:divide-slate-700/30"), children: currentData.length > 0 ? /* @__PURE__ */ jsxs46(Fragment9, { children: [
|
|
8606
|
+
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */ jsx60("tr", { "aria-hidden": "true", style: { height: topSpacerHeight }, children: /* @__PURE__ */ jsx60("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) }),
|
|
8553
8607
|
windowData.map((row, windowIndex) => {
|
|
8554
8608
|
const absoluteIndex = isTableVirtual ? startIndex + windowIndex : windowIndex;
|
|
8555
|
-
return /* @__PURE__ */
|
|
8609
|
+
return /* @__PURE__ */ jsx60(
|
|
8556
8610
|
"tr",
|
|
8557
8611
|
{
|
|
8558
8612
|
"aria-rowindex": isTableVirtual ? absoluteIndex + 2 : void 0,
|
|
@@ -8569,7 +8623,7 @@ function ITTable({
|
|
|
8569
8623
|
const truncateTitle = col.truncate && (typeof rawValue === "string" || typeof rawValue === "number") ? String(rawValue) : void 0;
|
|
8570
8624
|
const pin = pinnedMeta[col.key];
|
|
8571
8625
|
const isPinned = pin != null;
|
|
8572
|
-
return /* @__PURE__ */
|
|
8626
|
+
return /* @__PURE__ */ jsx60(
|
|
8573
8627
|
"td",
|
|
8574
8628
|
{
|
|
8575
8629
|
className: clsx43(
|
|
@@ -8584,7 +8638,7 @@ function ITTable({
|
|
|
8584
8638
|
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8585
8639
|
} : void 0,
|
|
8586
8640
|
title: truncateTitle,
|
|
8587
|
-
children: col.type === "actions" ? /* @__PURE__ */
|
|
8641
|
+
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
8642
|
},
|
|
8589
8643
|
`${absoluteIndex}-${col.key}`
|
|
8590
8644
|
);
|
|
@@ -8593,17 +8647,17 @@ function ITTable({
|
|
|
8593
8647
|
absoluteIndex
|
|
8594
8648
|
);
|
|
8595
8649
|
}),
|
|
8596
|
-
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */
|
|
8597
|
-
] }) : /* @__PURE__ */
|
|
8598
|
-
/* @__PURE__ */
|
|
8599
|
-
/* @__PURE__ */
|
|
8650
|
+
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */ jsx60("tr", { "aria-hidden": "true", style: { height: bottomSpacerHeight }, children: /* @__PURE__ */ jsx60("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) })
|
|
8651
|
+
] }) : /* @__PURE__ */ jsx60("tr", { children: /* @__PURE__ */ jsx60("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ jsxs46("div", { className: tableEmptyContent, children: [
|
|
8652
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8653
|
+
/* @__PURE__ */ jsx60(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8600
8654
|
] }) }) }) })
|
|
8601
8655
|
]
|
|
8602
8656
|
}
|
|
8603
8657
|
)
|
|
8604
8658
|
}
|
|
8605
8659
|
),
|
|
8606
|
-
/* @__PURE__ */
|
|
8660
|
+
/* @__PURE__ */ jsx60("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx60(
|
|
8607
8661
|
ITPagination,
|
|
8608
8662
|
{
|
|
8609
8663
|
currentPage,
|
|
@@ -8621,7 +8675,7 @@ function ITTable({
|
|
|
8621
8675
|
|
|
8622
8676
|
// src/components/atoms/textarea/textarea.tsx
|
|
8623
8677
|
import clsx44 from "clsx";
|
|
8624
|
-
import { jsx as
|
|
8678
|
+
import { jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
8625
8679
|
var resizeMap = {
|
|
8626
8680
|
none: "resize-none",
|
|
8627
8681
|
vertical: "resize-y",
|
|
@@ -8642,8 +8696,8 @@ function ITTextarea({
|
|
|
8642
8696
|
resize = "vertical"
|
|
8643
8697
|
}) {
|
|
8644
8698
|
return /* @__PURE__ */ jsxs47("div", { className: clsx44("flex flex-col gap-1.5", className), children: [
|
|
8645
|
-
label && /* @__PURE__ */
|
|
8646
|
-
/* @__PURE__ */
|
|
8699
|
+
label && /* @__PURE__ */ jsx61(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
8700
|
+
/* @__PURE__ */ jsx61(
|
|
8647
8701
|
"textarea",
|
|
8648
8702
|
{
|
|
8649
8703
|
id: name,
|
|
@@ -8663,14 +8717,14 @@ function ITTextarea({
|
|
|
8663
8717
|
)
|
|
8664
8718
|
}
|
|
8665
8719
|
),
|
|
8666
|
-
error && /* @__PURE__ */
|
|
8720
|
+
error && /* @__PURE__ */ jsx61(ITText, { as: "span", className: inputError, children: error })
|
|
8667
8721
|
] });
|
|
8668
8722
|
}
|
|
8669
8723
|
|
|
8670
8724
|
// src/components/molecules/tabs/tabs.tsx
|
|
8671
8725
|
import { useState as useState30 } from "react";
|
|
8672
8726
|
import { clsx as clsx45 } from "clsx";
|
|
8673
|
-
import { jsx as
|
|
8727
|
+
import { jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
8674
8728
|
var ITTabs = ({
|
|
8675
8729
|
items,
|
|
8676
8730
|
defaultActiveId,
|
|
@@ -8687,7 +8741,7 @@ var ITTabs = ({
|
|
|
8687
8741
|
};
|
|
8688
8742
|
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
8689
8743
|
return /* @__PURE__ */ jsxs48("div", { className: clsx45("w-full", containerClassName), children: [
|
|
8690
|
-
/* @__PURE__ */
|
|
8744
|
+
/* @__PURE__ */ jsx62("div", { className: clsx45(
|
|
8691
8745
|
"flex border-secondary-200 mb-4",
|
|
8692
8746
|
variant === "line" ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
|
|
8693
8747
|
className
|
|
@@ -8713,21 +8767,21 @@ var ITTabs = ({
|
|
|
8713
8767
|
item.disabled && "opacity-50 cursor-not-allowed"
|
|
8714
8768
|
),
|
|
8715
8769
|
children: [
|
|
8716
|
-
item.icon && /* @__PURE__ */
|
|
8717
|
-
/* @__PURE__ */
|
|
8770
|
+
item.icon && /* @__PURE__ */ jsx62("span", { className: "w-4 h-4", children: item.icon }),
|
|
8771
|
+
/* @__PURE__ */ jsx62(ITText, { as: "span", children: item.label })
|
|
8718
8772
|
]
|
|
8719
8773
|
},
|
|
8720
8774
|
item.id
|
|
8721
8775
|
);
|
|
8722
8776
|
}) }),
|
|
8723
|
-
/* @__PURE__ */
|
|
8777
|
+
/* @__PURE__ */ jsx62("div", { className: "tab-content animate-fadeIn", children: activeContent })
|
|
8724
8778
|
] });
|
|
8725
8779
|
};
|
|
8726
8780
|
var tabs_default = ITTabs;
|
|
8727
8781
|
|
|
8728
8782
|
// src/components/organisms/triple-filter/tripleFilter.tsx
|
|
8729
8783
|
import clsx46 from "clsx";
|
|
8730
|
-
import { jsx as
|
|
8784
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
8731
8785
|
var colorMap2 = {
|
|
8732
8786
|
primary: "text-primary-600",
|
|
8733
8787
|
secondary: "text-secondary-600",
|
|
@@ -8746,11 +8800,11 @@ var ITTripleFilter = ({
|
|
|
8746
8800
|
color = "primary",
|
|
8747
8801
|
className
|
|
8748
8802
|
}) => {
|
|
8749
|
-
return /* @__PURE__ */
|
|
8803
|
+
return /* @__PURE__ */ jsx63(
|
|
8750
8804
|
"div",
|
|
8751
8805
|
{
|
|
8752
8806
|
className: clsx46("flex bg-slate-100 p-1 rounded-xl gap-1 w-fit", className),
|
|
8753
|
-
children: options.map((option) => /* @__PURE__ */
|
|
8807
|
+
children: options.map((option) => /* @__PURE__ */ jsx63(
|
|
8754
8808
|
"button",
|
|
8755
8809
|
{
|
|
8756
8810
|
onClick: () => onChange(option.value),
|
|
@@ -8758,7 +8812,7 @@ var ITTripleFilter = ({
|
|
|
8758
8812
|
"px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap",
|
|
8759
8813
|
value === option.value ? clsx46("bg-white shadow-sm", colorMap2[color]) : "text-slate-400 hover:text-slate-600"
|
|
8760
8814
|
),
|
|
8761
|
-
children: /* @__PURE__ */
|
|
8815
|
+
children: /* @__PURE__ */ jsx63(ITText, { as: "span", children: option.label })
|
|
8762
8816
|
},
|
|
8763
8817
|
String(option.value)
|
|
8764
8818
|
))
|
|
@@ -8781,7 +8835,7 @@ var positionStyles = {
|
|
|
8781
8835
|
import clsx47 from "clsx";
|
|
8782
8836
|
import { useEffect as useEffect15, useState as useState31 } from "react";
|
|
8783
8837
|
import { FaTimesCircle as FaTimesCircle2, FaCheckCircle as FaCheckCircle2, FaExclamationTriangle as FaExclamationTriangle3, FaInfoCircle as FaInfoCircle2, FaTimes as FaTimes10 } from "react-icons/fa";
|
|
8784
|
-
import { jsx as
|
|
8838
|
+
import { jsx as jsx64, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
8785
8839
|
function ITToast({
|
|
8786
8840
|
message,
|
|
8787
8841
|
type = "info",
|
|
@@ -8810,15 +8864,15 @@ function ITToast({
|
|
|
8810
8864
|
const TypeIcon = () => {
|
|
8811
8865
|
switch (type) {
|
|
8812
8866
|
case "success":
|
|
8813
|
-
return /* @__PURE__ */
|
|
8867
|
+
return /* @__PURE__ */ jsx64(FaCheckCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8814
8868
|
case "error":
|
|
8815
8869
|
case "danger":
|
|
8816
|
-
return /* @__PURE__ */
|
|
8870
|
+
return /* @__PURE__ */ jsx64(FaTimesCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8817
8871
|
case "warning":
|
|
8818
|
-
return /* @__PURE__ */
|
|
8872
|
+
return /* @__PURE__ */ jsx64(FaExclamationTriangle3, { className: "w-5 h-5 flex-shrink-0" });
|
|
8819
8873
|
case "info":
|
|
8820
8874
|
default:
|
|
8821
|
-
return /* @__PURE__ */
|
|
8875
|
+
return /* @__PURE__ */ jsx64(FaInfoCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
8822
8876
|
}
|
|
8823
8877
|
};
|
|
8824
8878
|
return /* @__PURE__ */ jsxs49(
|
|
@@ -8838,16 +8892,16 @@ function ITToast({
|
|
|
8838
8892
|
role: "alert",
|
|
8839
8893
|
children: [
|
|
8840
8894
|
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-3", children: [
|
|
8841
|
-
/* @__PURE__ */
|
|
8842
|
-
/* @__PURE__ */
|
|
8895
|
+
/* @__PURE__ */ jsx64(TypeIcon, {}),
|
|
8896
|
+
/* @__PURE__ */ jsx64(ITText, { as: "span", className: "font-medium text-sm sm:text-base leading-snug", children: message })
|
|
8843
8897
|
] }),
|
|
8844
|
-
/* @__PURE__ */
|
|
8898
|
+
/* @__PURE__ */ jsx64(
|
|
8845
8899
|
"button",
|
|
8846
8900
|
{
|
|
8847
8901
|
onClick: handleClose,
|
|
8848
8902
|
className: "p-1.5 rounded-full hover:bg-black/15 transition-colors focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
8849
8903
|
"aria-label": "Close notification",
|
|
8850
|
-
children: /* @__PURE__ */
|
|
8904
|
+
children: /* @__PURE__ */ jsx64(FaTimes10, { className: "w-4 h-4" })
|
|
8851
8905
|
}
|
|
8852
8906
|
)
|
|
8853
8907
|
]
|
|
@@ -8887,7 +8941,7 @@ var toolbarActions = [
|
|
|
8887
8941
|
// src/components/atoms/tooltip/tooltip.tsx
|
|
8888
8942
|
import { useState as useState32 } from "react";
|
|
8889
8943
|
import clsx48 from "clsx";
|
|
8890
|
-
import { jsx as
|
|
8944
|
+
import { jsx as jsx65, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
8891
8945
|
var positionClasses2 = {
|
|
8892
8946
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
8893
8947
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -8925,8 +8979,8 @@ function ITTooltip({
|
|
|
8925
8979
|
children: [
|
|
8926
8980
|
children,
|
|
8927
8981
|
visible && /* @__PURE__ */ jsxs50("div", { className: clsx48("absolute z-[70] pointer-events-none", positionClasses2[position]), children: [
|
|
8928
|
-
/* @__PURE__ */
|
|
8929
|
-
/* @__PURE__ */
|
|
8982
|
+
/* @__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 }) }),
|
|
8983
|
+
/* @__PURE__ */ jsx65("div", { className: clsx48("absolute", arrowClasses[position]) })
|
|
8930
8984
|
] })
|
|
8931
8985
|
]
|
|
8932
8986
|
}
|
|
@@ -8934,16 +8988,16 @@ function ITTooltip({
|
|
|
8934
8988
|
}
|
|
8935
8989
|
|
|
8936
8990
|
// src/components/molecules/wysiwyg/wysiwyg.tsx
|
|
8937
|
-
import { jsx as
|
|
8991
|
+
import { jsx as jsx66, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8938
8992
|
var INLINE_TAGS = /* @__PURE__ */ new Set(["STRONG", "B", "EM", "I", "U", "MARK"]);
|
|
8939
8993
|
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__ */
|
|
8994
|
+
bold: { label: "Negrita", icon: /* @__PURE__ */ jsx66(FaBold, {}) },
|
|
8995
|
+
italic: { label: "It\xE1lica", icon: /* @__PURE__ */ jsx66(FaItalic, {}) },
|
|
8996
|
+
underline: { label: "Subrayado", icon: /* @__PURE__ */ jsx66(FaUnderline, {}) },
|
|
8997
|
+
highlight: { label: "Marcador", icon: /* @__PURE__ */ jsx66(FaHighlighter, {}) },
|
|
8998
|
+
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */ jsx66(FaListUl, {}) },
|
|
8999
|
+
ol: { label: "Lista numerada", icon: /* @__PURE__ */ jsx66(FaListOl, {}) },
|
|
9000
|
+
clear: { label: "Limpiar formato", icon: /* @__PURE__ */ jsx66(FaEraser, {}) }
|
|
8947
9001
|
};
|
|
8948
9002
|
function ITWysiwyg({
|
|
8949
9003
|
value,
|
|
@@ -9359,7 +9413,7 @@ function ITWysiwyg({
|
|
|
9359
9413
|
}) => {
|
|
9360
9414
|
const meta = ACTION_META[action];
|
|
9361
9415
|
const isActive = !!active[action];
|
|
9362
|
-
return /* @__PURE__ */
|
|
9416
|
+
return /* @__PURE__ */ jsx66(ITTooltip, { content: meta.label, children: /* @__PURE__ */ jsx66(
|
|
9363
9417
|
"button",
|
|
9364
9418
|
{
|
|
9365
9419
|
type: "button",
|
|
@@ -9380,7 +9434,7 @@ function ITWysiwyg({
|
|
|
9380
9434
|
) });
|
|
9381
9435
|
};
|
|
9382
9436
|
return /* @__PURE__ */ jsxs51("div", { className: inputWrapper(className), children: [
|
|
9383
|
-
label && /* @__PURE__ */
|
|
9437
|
+
label && /* @__PURE__ */ jsx66(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
9384
9438
|
/* @__PURE__ */ jsxs51(
|
|
9385
9439
|
"div",
|
|
9386
9440
|
{
|
|
@@ -9390,7 +9444,7 @@ function ITWysiwyg({
|
|
|
9390
9444
|
isLocked && "opacity-50 cursor-not-allowed bg-secondary-100 dark:bg-slate-800"
|
|
9391
9445
|
),
|
|
9392
9446
|
children: [
|
|
9393
|
-
/* @__PURE__ */
|
|
9447
|
+
/* @__PURE__ */ jsx66(
|
|
9394
9448
|
"div",
|
|
9395
9449
|
{
|
|
9396
9450
|
className: clsx49(
|
|
@@ -9398,12 +9452,12 @@ function ITWysiwyg({
|
|
|
9398
9452
|
isLocked && "bg-secondary-100 dark:bg-slate-900"
|
|
9399
9453
|
),
|
|
9400
9454
|
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__ */
|
|
9455
|
+
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" }),
|
|
9456
|
+
/* @__PURE__ */ jsx66(ToolbarButton, { action })
|
|
9403
9457
|
] }, action))
|
|
9404
9458
|
}
|
|
9405
9459
|
),
|
|
9406
|
-
/* @__PURE__ */
|
|
9460
|
+
/* @__PURE__ */ jsx66(
|
|
9407
9461
|
"div",
|
|
9408
9462
|
{
|
|
9409
9463
|
id: name,
|
|
@@ -9437,7 +9491,7 @@ function ITWysiwyg({
|
|
|
9437
9491
|
]
|
|
9438
9492
|
}
|
|
9439
9493
|
),
|
|
9440
|
-
error && /* @__PURE__ */
|
|
9494
|
+
error && /* @__PURE__ */ jsx66(ITText, { as: "span", className: inputError, children: error })
|
|
9441
9495
|
] });
|
|
9442
9496
|
}
|
|
9443
9497
|
|
|
@@ -9472,7 +9526,7 @@ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
|
|
|
9472
9526
|
})(UploadStatus || {});
|
|
9473
9527
|
|
|
9474
9528
|
// src/components/organisms/dropfile/dropfile.tsx
|
|
9475
|
-
import { Fragment as Fragment10, jsx as
|
|
9529
|
+
import { Fragment as Fragment10, jsx as jsx67, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
9476
9530
|
var ITDropfile = ({
|
|
9477
9531
|
onFileSelect,
|
|
9478
9532
|
onCancel,
|
|
@@ -9612,8 +9666,8 @@ var ITDropfile = ({
|
|
|
9612
9666
|
};
|
|
9613
9667
|
const { label, color, dotColor } = config2[status];
|
|
9614
9668
|
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__ */
|
|
9669
|
+
/* @__PURE__ */ jsx67("div", { className: `w-2 h-2 rounded-full ${dotColor}` }),
|
|
9670
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", className: "text-xs font-medium flex items-center gap-1.5", children: label })
|
|
9617
9671
|
] });
|
|
9618
9672
|
};
|
|
9619
9673
|
const onDrop = (acceptedFiles) => {
|
|
@@ -9706,16 +9760,16 @@ var ITDropfile = ({
|
|
|
9706
9760
|
}, [view, isConfirmed, uploadStatus, externalStatus, onStatusChange]);
|
|
9707
9761
|
const headerRow = /* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between mb-2", children: [
|
|
9708
9762
|
/* @__PURE__ */ jsxs52("label", { className: "block text-sm font-semibold text-secondary-700", children: [
|
|
9709
|
-
/* @__PURE__ */
|
|
9763
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", children: "Subir archivo " }),
|
|
9710
9764
|
/* @__PURE__ */ jsxs52(ITText, { as: "span", className: "text-secondary-400 font-normal text-xs", children: [
|
|
9711
9765
|
"(",
|
|
9712
9766
|
getFileExtensions(),
|
|
9713
9767
|
")"
|
|
9714
9768
|
] })
|
|
9715
9769
|
] }),
|
|
9716
|
-
showStatusBadge && selectedFile && /* @__PURE__ */
|
|
9770
|
+
showStatusBadge && selectedFile && /* @__PURE__ */ jsx67(StatusBadge, { status: uploadStatus })
|
|
9717
9771
|
] });
|
|
9718
|
-
const dropZoneOrPreview = /* @__PURE__ */
|
|
9772
|
+
const dropZoneOrPreview = /* @__PURE__ */ jsx67(Fragment10, { children: !selectedFile && !imagePreview ? /* @__PURE__ */ jsxs52(
|
|
9719
9773
|
"div",
|
|
9720
9774
|
{
|
|
9721
9775
|
...getRootProps(),
|
|
@@ -9725,29 +9779,29 @@ var ITDropfile = ({
|
|
|
9725
9779
|
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-secondary-300 bg-white hover:border-primary-400 hover:bg-secondary-50"}
|
|
9726
9780
|
`,
|
|
9727
9781
|
children: [
|
|
9728
|
-
/* @__PURE__ */
|
|
9729
|
-
/* @__PURE__ */
|
|
9782
|
+
/* @__PURE__ */ jsx67("input", { ...getInputProps() }),
|
|
9783
|
+
/* @__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
9784
|
"svg",
|
|
9731
9785
|
{
|
|
9732
9786
|
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-secondary-400 group-hover:text-primary-500"}`,
|
|
9733
9787
|
fill: "none",
|
|
9734
9788
|
viewBox: "0 0 24 24",
|
|
9735
9789
|
stroke: "currentColor",
|
|
9736
|
-
children: /* @__PURE__ */
|
|
9790
|
+
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
9791
|
}
|
|
9738
9792
|
) }),
|
|
9739
|
-
/* @__PURE__ */
|
|
9793
|
+
/* @__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
9794
|
]
|
|
9741
9795
|
}
|
|
9742
9796
|
) : /* @__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__ */
|
|
9797
|
+
/* @__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: [
|
|
9798
|
+
/* @__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
9799
|
/* @__PURE__ */ jsxs52("div", { className: "min-w-0", children: [
|
|
9746
|
-
/* @__PURE__ */
|
|
9747
|
-
/* @__PURE__ */
|
|
9800
|
+
/* @__PURE__ */ jsx67(ITText, { as: "p", className: "text-xs font-medium text-secondary-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
9801
|
+
/* @__PURE__ */ jsx67(ITText, { as: "p", className: "text-[10px] text-secondary-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
9748
9802
|
] })
|
|
9749
9803
|
] }) }),
|
|
9750
|
-
/* @__PURE__ */
|
|
9804
|
+
/* @__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
9805
|
"img",
|
|
9752
9806
|
{
|
|
9753
9807
|
src: imagePreview,
|
|
@@ -9755,11 +9809,11 @@ var ITDropfile = ({
|
|
|
9755
9809
|
className: "w-full h-full object-contain max-h-[200px]"
|
|
9756
9810
|
}
|
|
9757
9811
|
) : /* @__PURE__ */ jsxs52("div", { className: "py-8 flex flex-col items-center text-secondary-400", children: [
|
|
9758
|
-
/* @__PURE__ */
|
|
9759
|
-
/* @__PURE__ */
|
|
9812
|
+
/* @__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" }) }),
|
|
9813
|
+
/* @__PURE__ */ jsx67(ITText, { as: "span", className: "text-xs", children: "Sin vista previa" })
|
|
9760
9814
|
] }) }),
|
|
9761
|
-
/* @__PURE__ */
|
|
9762
|
-
/* @__PURE__ */
|
|
9815
|
+
/* @__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: [
|
|
9816
|
+
/* @__PURE__ */ jsx67(
|
|
9763
9817
|
ITButton,
|
|
9764
9818
|
{
|
|
9765
9819
|
type: "button",
|
|
@@ -9767,10 +9821,10 @@ var ITDropfile = ({
|
|
|
9767
9821
|
color: "secondary",
|
|
9768
9822
|
size: "sm",
|
|
9769
9823
|
onClick: handleCancel,
|
|
9770
|
-
children: /* @__PURE__ */
|
|
9824
|
+
children: /* @__PURE__ */ jsx67(ITText, { children: "Cancelar" })
|
|
9771
9825
|
}
|
|
9772
9826
|
),
|
|
9773
|
-
/* @__PURE__ */
|
|
9827
|
+
/* @__PURE__ */ jsx67(
|
|
9774
9828
|
ITButton,
|
|
9775
9829
|
{
|
|
9776
9830
|
type: "button",
|
|
@@ -9779,8 +9833,8 @@ var ITDropfile = ({
|
|
|
9779
9833
|
size: "sm",
|
|
9780
9834
|
onClick: handleConfirm,
|
|
9781
9835
|
children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2", children: [
|
|
9782
|
-
/* @__PURE__ */
|
|
9783
|
-
/* @__PURE__ */
|
|
9836
|
+
/* @__PURE__ */ jsx67(ITText, { children: "Confirmar" }),
|
|
9837
|
+
/* @__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
9838
|
] })
|
|
9785
9839
|
}
|
|
9786
9840
|
)
|
|
@@ -9793,12 +9847,12 @@ var ITDropfile = ({
|
|
|
9793
9847
|
size: "sm",
|
|
9794
9848
|
onClick: handleDelete,
|
|
9795
9849
|
children: [
|
|
9796
|
-
/* @__PURE__ */
|
|
9797
|
-
/* @__PURE__ */
|
|
9850
|
+
/* @__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" }) }),
|
|
9851
|
+
/* @__PURE__ */ jsx67(ITText, { children: "Eliminar" })
|
|
9798
9852
|
]
|
|
9799
9853
|
}
|
|
9800
9854
|
) }),
|
|
9801
|
-
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */
|
|
9855
|
+
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
9856
|
"div",
|
|
9803
9857
|
{
|
|
9804
9858
|
className: "bg-primary-600 h-1.5 rounded-full transition-all duration-1000 ease-out",
|
|
@@ -9812,7 +9866,7 @@ var ITDropfile = ({
|
|
|
9812
9866
|
if (view === "button") {
|
|
9813
9867
|
const hasFile = Boolean(selectedFile || imagePreview);
|
|
9814
9868
|
return /* @__PURE__ */ jsxs52("div", { className: clsx50("inline-block", containerClassName), children: [
|
|
9815
|
-
/* @__PURE__ */
|
|
9869
|
+
/* @__PURE__ */ jsx67(
|
|
9816
9870
|
ITButton,
|
|
9817
9871
|
{
|
|
9818
9872
|
type: "button",
|
|
@@ -9821,13 +9875,13 @@ var ITDropfile = ({
|
|
|
9821
9875
|
size: "sm",
|
|
9822
9876
|
onClick: () => setIsModalOpen(true),
|
|
9823
9877
|
children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2 max-w-[220px]", children: [
|
|
9824
|
-
/* @__PURE__ */
|
|
9825
|
-
/* @__PURE__ */
|
|
9826
|
-
showStatusBadge && hasFile && /* @__PURE__ */
|
|
9878
|
+
/* @__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" }) }),
|
|
9879
|
+
/* @__PURE__ */ jsx67(ITText, { className: "truncate", children: selectedFile?.name || (hasFile ? "Archivo cargado" : buttonLabel) }),
|
|
9880
|
+
showStatusBadge && hasFile && /* @__PURE__ */ jsx67(StatusBadge, { status: uploadStatus })
|
|
9827
9881
|
] })
|
|
9828
9882
|
}
|
|
9829
9883
|
),
|
|
9830
|
-
/* @__PURE__ */
|
|
9884
|
+
/* @__PURE__ */ jsx67(ITDialog, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), title: modalTitle ?? buttonLabel, children: /* @__PURE__ */ jsxs52("div", { className: "w-full transition-all duration-300", children: [
|
|
9831
9885
|
headerRow,
|
|
9832
9886
|
dropZoneOrPreview
|
|
9833
9887
|
] }) })
|
|
@@ -9847,7 +9901,7 @@ import clsx51 from "clsx";
|
|
|
9847
9901
|
// src/components/organisms/topbar/topbar.tsx
|
|
9848
9902
|
import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
|
|
9849
9903
|
import { useRef as useRef22, useState as useState35 } from "react";
|
|
9850
|
-
import { jsx as
|
|
9904
|
+
import { jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9851
9905
|
function ITTopBar({
|
|
9852
9906
|
logo,
|
|
9853
9907
|
logoText,
|
|
@@ -9862,7 +9916,7 @@ function ITTopBar({
|
|
|
9862
9916
|
const [isUserMenuOpen, setIsUserMenuOpen] = useState35(false);
|
|
9863
9917
|
const userMenuRef = useRef22(null);
|
|
9864
9918
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
9865
|
-
return /* @__PURE__ */
|
|
9919
|
+
return /* @__PURE__ */ jsx68(
|
|
9866
9920
|
"header",
|
|
9867
9921
|
{
|
|
9868
9922
|
className: "sticky top-0 z-40 backdrop-blur-md transition-all duration-300",
|
|
@@ -9873,7 +9927,7 @@ function ITTopBar({
|
|
|
9873
9927
|
},
|
|
9874
9928
|
children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-between h-[72px] px-6 lg:px-8", children: [
|
|
9875
9929
|
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-5", children: [
|
|
9876
|
-
showMobileMenuButton && /* @__PURE__ */
|
|
9930
|
+
showMobileMenuButton && /* @__PURE__ */ jsx68(
|
|
9877
9931
|
"button",
|
|
9878
9932
|
{
|
|
9879
9933
|
className: "lg:hidden p-2.5 rounded-xl transition-colors duration-200",
|
|
@@ -9883,12 +9937,12 @@ function ITTopBar({
|
|
|
9883
9937
|
onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)",
|
|
9884
9938
|
onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
|
|
9885
9939
|
onClick: onToggleMobileMenu,
|
|
9886
|
-
children: /* @__PURE__ */
|
|
9940
|
+
children: /* @__PURE__ */ jsx68(FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
|
|
9887
9941
|
}
|
|
9888
9942
|
),
|
|
9889
9943
|
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-3", children: [
|
|
9890
|
-
logo && /* @__PURE__ */
|
|
9891
|
-
logoText && /* @__PURE__ */
|
|
9944
|
+
logo && /* @__PURE__ */ jsx68("div", { className: "flex-shrink-0 drop-shadow-sm", children: logo }),
|
|
9945
|
+
logoText && /* @__PURE__ */ jsx68(
|
|
9892
9946
|
ITText,
|
|
9893
9947
|
{
|
|
9894
9948
|
as: "span",
|
|
@@ -9898,7 +9952,7 @@ function ITTopBar({
|
|
|
9898
9952
|
}
|
|
9899
9953
|
)
|
|
9900
9954
|
] }),
|
|
9901
|
-
navItems && navItems.length > 0 && /* @__PURE__ */
|
|
9955
|
+
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
9956
|
"button",
|
|
9903
9957
|
{
|
|
9904
9958
|
onClick: () => onNavItemClick?.(item.id),
|
|
@@ -9913,14 +9967,14 @@ function ITTopBar({
|
|
|
9913
9967
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
9914
9968
|
},
|
|
9915
9969
|
children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
9916
|
-
item.icon && /* @__PURE__ */
|
|
9917
|
-
/* @__PURE__ */
|
|
9970
|
+
item.icon && /* @__PURE__ */ jsx68("span", { className: "opacity-70", children: item.icon }),
|
|
9971
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", children: item.label })
|
|
9918
9972
|
] })
|
|
9919
9973
|
},
|
|
9920
9974
|
item.id
|
|
9921
9975
|
)) })
|
|
9922
9976
|
] }),
|
|
9923
|
-
centerContent && /* @__PURE__ */
|
|
9977
|
+
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
9978
|
(children || userMenu) && /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
9925
9979
|
children,
|
|
9926
9980
|
userMenu && /* @__PURE__ */ jsxs53("div", { className: "relative", children: [
|
|
@@ -9941,18 +9995,18 @@ function ITTopBar({
|
|
|
9941
9995
|
onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
|
|
9942
9996
|
children: [
|
|
9943
9997
|
/* @__PURE__ */ jsxs53("div", { className: "relative", children: [
|
|
9944
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
9998
|
+
userMenu.userImage ? /* @__PURE__ */ jsx68(
|
|
9945
9999
|
"img",
|
|
9946
10000
|
{
|
|
9947
10001
|
className: "w-9 h-9 rounded-full object-cover ring-2 ring-white shadow-sm",
|
|
9948
10002
|
src: userMenu.userImage,
|
|
9949
10003
|
alt: "Current user"
|
|
9950
10004
|
}
|
|
9951
|
-
) : /* @__PURE__ */
|
|
9952
|
-
/* @__PURE__ */
|
|
10005
|
+
) : /* @__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)" } }) }),
|
|
10006
|
+
/* @__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
10007
|
] }),
|
|
9954
10008
|
/* @__PURE__ */ jsxs53("div", { className: "hidden sm:flex flex-col text-left py-0.5", children: [
|
|
9955
|
-
/* @__PURE__ */
|
|
10009
|
+
/* @__PURE__ */ jsx68(
|
|
9956
10010
|
ITText,
|
|
9957
10011
|
{
|
|
9958
10012
|
as: "span",
|
|
@@ -9961,7 +10015,7 @@ function ITTopBar({
|
|
|
9961
10015
|
children: userMenu.userName
|
|
9962
10016
|
}
|
|
9963
10017
|
),
|
|
9964
|
-
/* @__PURE__ */
|
|
10018
|
+
/* @__PURE__ */ jsx68(
|
|
9965
10019
|
ITText,
|
|
9966
10020
|
{
|
|
9967
10021
|
as: "span",
|
|
@@ -9988,14 +10042,14 @@ function ITTopBar({
|
|
|
9988
10042
|
},
|
|
9989
10043
|
children: [
|
|
9990
10044
|
/* @__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__ */
|
|
10045
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", className: "block font-bold text-[0.9rem]", style: { color: "var(--it-topbar-user-text, #0f172a)" }, children: userMenu.userName }),
|
|
10046
|
+
/* @__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
10047
|
] }),
|
|
9994
|
-
/* @__PURE__ */
|
|
10048
|
+
/* @__PURE__ */ jsx68("ul", { className: "py-2", children: userMenu.menuItems.map((m, i) => {
|
|
9995
10049
|
const isDestructive = m.label.toLowerCase().includes("salir") || m.label.toLowerCase().includes("cerrar") || m.label.toLowerCase().includes("logout");
|
|
9996
10050
|
return /* @__PURE__ */ jsxs53("li", { className: "px-2", children: [
|
|
9997
|
-
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */
|
|
9998
|
-
/* @__PURE__ */
|
|
10051
|
+
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */ jsx68("div", { className: "h-px bg-slate-100 my-1 mx-2" }),
|
|
10052
|
+
/* @__PURE__ */ jsx68(
|
|
9999
10053
|
"button",
|
|
10000
10054
|
{
|
|
10001
10055
|
onClick: () => {
|
|
@@ -10010,7 +10064,7 @@ function ITTopBar({
|
|
|
10010
10064
|
onMouseLeave: (e) => {
|
|
10011
10065
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
10012
10066
|
},
|
|
10013
|
-
children: /* @__PURE__ */
|
|
10067
|
+
children: /* @__PURE__ */ jsx68(ITText, { as: "span", children: m.label })
|
|
10014
10068
|
}
|
|
10015
10069
|
)
|
|
10016
10070
|
] }, i);
|
|
@@ -10026,7 +10080,7 @@ function ITTopBar({
|
|
|
10026
10080
|
}
|
|
10027
10081
|
|
|
10028
10082
|
// src/components/templates/layout/layout.tsx
|
|
10029
|
-
import { jsx as
|
|
10083
|
+
import { jsx as jsx69, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
10030
10084
|
function ITLayout({
|
|
10031
10085
|
topBar,
|
|
10032
10086
|
sidebar,
|
|
@@ -10042,7 +10096,7 @@ function ITLayout({
|
|
|
10042
10096
|
}) : () => setInternalCollapsed((v) => !v);
|
|
10043
10097
|
const layoutTokens = theme.layout;
|
|
10044
10098
|
return /* @__PURE__ */ jsxs54("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
10045
|
-
/* @__PURE__ */
|
|
10099
|
+
/* @__PURE__ */ jsx69(
|
|
10046
10100
|
ITTopBar,
|
|
10047
10101
|
{
|
|
10048
10102
|
...topBar,
|
|
@@ -10057,13 +10111,13 @@ function ITLayout({
|
|
|
10057
10111
|
style: { backgroundColor: layoutTokens.backgroundColor },
|
|
10058
10112
|
children: [
|
|
10059
10113
|
/* @__PURE__ */ jsxs54("div", { className: "hidden lg:block relative z-40 h-full", children: [
|
|
10060
|
-
/* @__PURE__ */
|
|
10114
|
+
/* @__PURE__ */ jsx69(
|
|
10061
10115
|
"div",
|
|
10062
10116
|
{
|
|
10063
10117
|
className: `${desktopCollapsed ? "w-[88px]" : "w-[280px]"} h-full flex-shrink-0`
|
|
10064
10118
|
}
|
|
10065
10119
|
),
|
|
10066
|
-
/* @__PURE__ */
|
|
10120
|
+
/* @__PURE__ */ jsx69("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx69(
|
|
10067
10121
|
ITSidebar,
|
|
10068
10122
|
{
|
|
10069
10123
|
...sidebar,
|
|
@@ -10074,17 +10128,17 @@ function ITLayout({
|
|
|
10074
10128
|
}
|
|
10075
10129
|
) })
|
|
10076
10130
|
] }),
|
|
10077
|
-
mobileSidebarOpen && /* @__PURE__ */
|
|
10131
|
+
mobileSidebarOpen && /* @__PURE__ */ jsx69(
|
|
10078
10132
|
"div",
|
|
10079
10133
|
{
|
|
10080
10134
|
className: "lg:hidden fixed inset-0 z-[40] transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
10081
10135
|
onClick: () => setMobileSidebarOpen(false),
|
|
10082
|
-
children: /* @__PURE__ */
|
|
10136
|
+
children: /* @__PURE__ */ jsx69(
|
|
10083
10137
|
"div",
|
|
10084
10138
|
{
|
|
10085
10139
|
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
10086
10140
|
onClick: (e) => e.stopPropagation(),
|
|
10087
|
-
children: /* @__PURE__ */
|
|
10141
|
+
children: /* @__PURE__ */ jsx69(
|
|
10088
10142
|
ITSidebar,
|
|
10089
10143
|
{
|
|
10090
10144
|
...sidebar,
|
|
@@ -10100,7 +10154,7 @@ function ITLayout({
|
|
|
10100
10154
|
)
|
|
10101
10155
|
}
|
|
10102
10156
|
),
|
|
10103
|
-
/* @__PURE__ */
|
|
10157
|
+
/* @__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
10158
|
]
|
|
10105
10159
|
}
|
|
10106
10160
|
)
|
|
@@ -10116,7 +10170,7 @@ var sizeClasses = {
|
|
|
10116
10170
|
};
|
|
10117
10171
|
|
|
10118
10172
|
// src/components/atoms/loader/loader.tsx
|
|
10119
|
-
import { jsx as
|
|
10173
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
10120
10174
|
function ITLoader({
|
|
10121
10175
|
size = "md",
|
|
10122
10176
|
variant = "spinner",
|
|
@@ -10131,22 +10185,22 @@ function ITLoader({
|
|
|
10131
10185
|
const bgStyle = isCssValue ? { backgroundColor: resolvedColor } : {};
|
|
10132
10186
|
const colorClass = !isCssValue ? color : "";
|
|
10133
10187
|
if (variant === "spinner") {
|
|
10134
|
-
return /* @__PURE__ */
|
|
10188
|
+
return /* @__PURE__ */ jsx70(
|
|
10135
10189
|
"div",
|
|
10136
10190
|
{
|
|
10137
10191
|
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
10192
|
role: "status",
|
|
10139
10193
|
style,
|
|
10140
|
-
children: /* @__PURE__ */
|
|
10194
|
+
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
10195
|
}
|
|
10142
10196
|
);
|
|
10143
10197
|
}
|
|
10144
10198
|
if (variant === "dots") {
|
|
10145
|
-
return /* @__PURE__ */
|
|
10199
|
+
return /* @__PURE__ */ jsx70(
|
|
10146
10200
|
"div",
|
|
10147
10201
|
{
|
|
10148
10202
|
className: `flex items-center justify-center space-x-2 ${className}`,
|
|
10149
|
-
children: [...Array(3)].map((_, i) => /* @__PURE__ */
|
|
10203
|
+
children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsx70(
|
|
10150
10204
|
"div",
|
|
10151
10205
|
{
|
|
10152
10206
|
className: `${sizeClasses[size.replace(/l|g/, "")]} animate-bounce rounded-full ${colorClass}`,
|
|
@@ -10161,11 +10215,11 @@ function ITLoader({
|
|
|
10161
10215
|
);
|
|
10162
10216
|
}
|
|
10163
10217
|
if (variant === "bar") {
|
|
10164
|
-
return /* @__PURE__ */
|
|
10218
|
+
return /* @__PURE__ */ jsx70(
|
|
10165
10219
|
"div",
|
|
10166
10220
|
{
|
|
10167
10221
|
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__ */
|
|
10222
|
+
children: /* @__PURE__ */ jsx70(
|
|
10169
10223
|
"div",
|
|
10170
10224
|
{
|
|
10171
10225
|
className: `h-full animate-progress ${colorClass}`,
|
|
@@ -10181,7 +10235,7 @@ function ITLoader({
|
|
|
10181
10235
|
);
|
|
10182
10236
|
}
|
|
10183
10237
|
if (variant === "pulse") {
|
|
10184
|
-
return /* @__PURE__ */
|
|
10238
|
+
return /* @__PURE__ */ jsx70(
|
|
10185
10239
|
"div",
|
|
10186
10240
|
{
|
|
10187
10241
|
className: `rounded-full ${sizeClasses[size]} animate-pulse ${colorClass} ${className}`,
|
|
@@ -10196,7 +10250,7 @@ function ITLoader({
|
|
|
10196
10250
|
import clsx52 from "clsx";
|
|
10197
10251
|
import { useEffect as useEffect18, useRef as useRef23, useState as useState37 } from "react";
|
|
10198
10252
|
import { FaChevronLeft as FaChevronLeft4, FaChevronRight as FaChevronRight5, FaCheck as FaCheck5 } from "react-icons/fa";
|
|
10199
|
-
import { jsx as
|
|
10253
|
+
import { jsx as jsx71, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
10200
10254
|
function ITStepper({
|
|
10201
10255
|
steps,
|
|
10202
10256
|
currentStep,
|
|
@@ -10263,23 +10317,23 @@ function ITStepper({
|
|
|
10263
10317
|
const renderStepContent = (index, isCompleted) => {
|
|
10264
10318
|
const step = steps[index];
|
|
10265
10319
|
if (isCompleted) {
|
|
10266
|
-
return /* @__PURE__ */
|
|
10320
|
+
return /* @__PURE__ */ jsx71(FaCheck5, { className: "w-4 h-4" });
|
|
10267
10321
|
}
|
|
10268
10322
|
if (step.icon && useIcons) {
|
|
10269
|
-
return /* @__PURE__ */
|
|
10323
|
+
return /* @__PURE__ */ jsx71("div", { className: "flex items-center justify-center w-5 h-5", children: step.icon });
|
|
10270
10324
|
}
|
|
10271
|
-
return /* @__PURE__ */
|
|
10325
|
+
return /* @__PURE__ */ jsx71(ITText, { as: "span", className: "text-sm font-semibold", children: index + 1 });
|
|
10272
10326
|
};
|
|
10273
10327
|
return /* @__PURE__ */ jsxs55("div", { className: clsx52("w-full max-w-5xl mx-auto px-4", containerClassName), children: [
|
|
10274
10328
|
/* @__PURE__ */ jsxs55("div", { className: "relative mb-8", children: [
|
|
10275
|
-
/* @__PURE__ */
|
|
10329
|
+
/* @__PURE__ */ jsx71(
|
|
10276
10330
|
"div",
|
|
10277
10331
|
{
|
|
10278
10332
|
className: "absolute left-6 right-6 top-5 h-1 bg-secondary-200 rounded-full z-0",
|
|
10279
10333
|
"aria-hidden": true
|
|
10280
10334
|
}
|
|
10281
10335
|
),
|
|
10282
|
-
/* @__PURE__ */
|
|
10336
|
+
/* @__PURE__ */ jsx71(
|
|
10283
10337
|
"div",
|
|
10284
10338
|
{
|
|
10285
10339
|
ref: progressRef,
|
|
@@ -10287,11 +10341,11 @@ function ITStepper({
|
|
|
10287
10341
|
"aria-hidden": true
|
|
10288
10342
|
}
|
|
10289
10343
|
),
|
|
10290
|
-
/* @__PURE__ */
|
|
10344
|
+
/* @__PURE__ */ jsx71("div", { className: "flex items-start justify-between space-x-2 relative z-20", children: steps.map((step, idx) => {
|
|
10291
10345
|
const isActive = idx === currentStep;
|
|
10292
10346
|
const isCompleted = idx < currentStep;
|
|
10293
10347
|
const hasIcon = step.icon && useIcons;
|
|
10294
|
-
return /* @__PURE__ */
|
|
10348
|
+
return /* @__PURE__ */ jsx71(
|
|
10295
10349
|
"button",
|
|
10296
10350
|
{
|
|
10297
10351
|
type: "button",
|
|
@@ -10302,7 +10356,7 @@ function ITStepper({
|
|
|
10302
10356
|
className: "flex-1 group",
|
|
10303
10357
|
title: step.label,
|
|
10304
10358
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex flex-col items-center", children: [
|
|
10305
|
-
/* @__PURE__ */
|
|
10359
|
+
/* @__PURE__ */ jsx71(
|
|
10306
10360
|
"div",
|
|
10307
10361
|
{
|
|
10308
10362
|
className: clsx52(
|
|
@@ -10316,7 +10370,7 @@ function ITStepper({
|
|
|
10316
10370
|
children: renderStepContent(idx, isCompleted)
|
|
10317
10371
|
}
|
|
10318
10372
|
),
|
|
10319
|
-
/* @__PURE__ */
|
|
10373
|
+
/* @__PURE__ */ jsx71(
|
|
10320
10374
|
ITText,
|
|
10321
10375
|
{
|
|
10322
10376
|
as: "span",
|
|
@@ -10334,7 +10388,7 @@ function ITStepper({
|
|
|
10334
10388
|
);
|
|
10335
10389
|
}) })
|
|
10336
10390
|
] }),
|
|
10337
|
-
/* @__PURE__ */
|
|
10391
|
+
/* @__PURE__ */ jsx71(
|
|
10338
10392
|
"div",
|
|
10339
10393
|
{
|
|
10340
10394
|
ref: contentRef,
|
|
@@ -10351,7 +10405,7 @@ function ITStepper({
|
|
|
10351
10405
|
}
|
|
10352
10406
|
),
|
|
10353
10407
|
/* @__PURE__ */ jsxs55("div", { className: "flex justify-between items-center mt-6", children: [
|
|
10354
|
-
/* @__PURE__ */
|
|
10408
|
+
/* @__PURE__ */ jsx71(
|
|
10355
10409
|
ITButton,
|
|
10356
10410
|
{
|
|
10357
10411
|
variant: "outlined",
|
|
@@ -10359,8 +10413,8 @@ function ITStepper({
|
|
|
10359
10413
|
disabled: currentStep === 0,
|
|
10360
10414
|
onClick: prevStep,
|
|
10361
10415
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2", children: [
|
|
10362
|
-
/* @__PURE__ */
|
|
10363
|
-
/* @__PURE__ */
|
|
10416
|
+
/* @__PURE__ */ jsx71(FaChevronLeft4, {}),
|
|
10417
|
+
/* @__PURE__ */ jsx71(ITText, { as: "span", children: "Atr\xE1s" })
|
|
10364
10418
|
] })
|
|
10365
10419
|
}
|
|
10366
10420
|
),
|
|
@@ -10371,7 +10425,7 @@ function ITStepper({
|
|
|
10371
10425
|
" de ",
|
|
10372
10426
|
steps.length
|
|
10373
10427
|
] }),
|
|
10374
|
-
/* @__PURE__ */
|
|
10428
|
+
/* @__PURE__ */ jsx71(
|
|
10375
10429
|
ITButton,
|
|
10376
10430
|
{
|
|
10377
10431
|
variant: "solid",
|
|
@@ -10379,8 +10433,8 @@ function ITStepper({
|
|
|
10379
10433
|
disabled: disableNext,
|
|
10380
10434
|
onClick: nextStep,
|
|
10381
10435
|
children: /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2", children: [
|
|
10382
|
-
/* @__PURE__ */
|
|
10383
|
-
currentStep === steps.length - 1 ? /* @__PURE__ */
|
|
10436
|
+
/* @__PURE__ */ jsx71(ITText, { as: "span", children: currentStep === steps.length - 1 ? "Finalizar" : "Siguiente" }),
|
|
10437
|
+
currentStep === steps.length - 1 ? /* @__PURE__ */ jsx71(FaCheck5, {}) : /* @__PURE__ */ jsx71(FaChevronRight5, {})
|
|
10384
10438
|
] })
|
|
10385
10439
|
}
|
|
10386
10440
|
)
|
|
@@ -10568,7 +10622,7 @@ var PRESETS = [
|
|
|
10568
10622
|
];
|
|
10569
10623
|
|
|
10570
10624
|
// src/components/theme-provider/themeProvider.tsx
|
|
10571
|
-
import { jsx as
|
|
10625
|
+
import { jsx as jsx72, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
10572
10626
|
var STORAGE_KEY = "it-theme-palette";
|
|
10573
10627
|
var SHADOW_LEVELS = {
|
|
10574
10628
|
0: {
|
|
@@ -11966,7 +12020,7 @@ function ITThemeProvider({
|
|
|
11966
12020
|
children: [
|
|
11967
12021
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
11968
12022
|
/* @__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__ */
|
|
12023
|
+
/* @__PURE__ */ jsx72(
|
|
11970
12024
|
"input",
|
|
11971
12025
|
{
|
|
11972
12026
|
type: "color",
|
|
@@ -11975,23 +12029,23 @@ function ITThemeProvider({
|
|
|
11975
12029
|
className: "absolute inset-0 opacity-0 cursor-pointer w-full h-full"
|
|
11976
12030
|
}
|
|
11977
12031
|
),
|
|
11978
|
-
/* @__PURE__ */
|
|
12032
|
+
/* @__PURE__ */ jsx72("div", { className: "w-full h-full", style: { backgroundColor: value } })
|
|
11979
12033
|
] }),
|
|
11980
12034
|
/* @__PURE__ */ jsxs56("div", { className: "flex flex-col min-w-0", children: [
|
|
11981
|
-
/* @__PURE__ */
|
|
12035
|
+
/* @__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
12036
|
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
11983
|
-
/* @__PURE__ */
|
|
12037
|
+
/* @__PURE__ */ jsx72(
|
|
11984
12038
|
"span",
|
|
11985
12039
|
{
|
|
11986
12040
|
className: "w-3 h-3 rounded-full border border-slate-200 dark:border-slate-600",
|
|
11987
12041
|
style: { backgroundColor: value }
|
|
11988
12042
|
}
|
|
11989
12043
|
),
|
|
11990
|
-
/* @__PURE__ */
|
|
12044
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", className: "font-mono text-[11px] text-slate-400", children: value })
|
|
11991
12045
|
] })
|
|
11992
12046
|
] })
|
|
11993
12047
|
] }),
|
|
11994
|
-
/* @__PURE__ */
|
|
12048
|
+
/* @__PURE__ */ jsx72(
|
|
11995
12049
|
"input",
|
|
11996
12050
|
{
|
|
11997
12051
|
type: "text",
|
|
@@ -12017,7 +12071,7 @@ function ITThemeProvider({
|
|
|
12017
12071
|
onClick: () => applyPreset(preset.colors),
|
|
12018
12072
|
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
12073
|
children: [
|
|
12020
|
-
isCustom && /* @__PURE__ */
|
|
12074
|
+
isCustom && /* @__PURE__ */ jsx72(
|
|
12021
12075
|
"span",
|
|
12022
12076
|
{
|
|
12023
12077
|
onClick: (e) => {
|
|
@@ -12026,11 +12080,11 @@ function ITThemeProvider({
|
|
|
12026
12080
|
},
|
|
12027
12081
|
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
12082
|
title: "Eliminar",
|
|
12029
|
-
children: /* @__PURE__ */
|
|
12083
|
+
children: /* @__PURE__ */ jsx72(MdClose, { size: 12 })
|
|
12030
12084
|
}
|
|
12031
12085
|
),
|
|
12032
|
-
/* @__PURE__ */
|
|
12033
|
-
/* @__PURE__ */
|
|
12086
|
+
/* @__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 }),
|
|
12087
|
+
/* @__PURE__ */ jsx72("div", { className: "flex gap-1", children: ["primary", "secondary", "ternary", "success"].map((c) => /* @__PURE__ */ jsx72(
|
|
12034
12088
|
"span",
|
|
12035
12089
|
{
|
|
12036
12090
|
className: "w-3 h-3 rounded-full border border-black/10",
|
|
@@ -12058,17 +12112,17 @@ function ITThemeProvider({
|
|
|
12058
12112
|
},
|
|
12059
12113
|
children: [
|
|
12060
12114
|
children,
|
|
12061
|
-
showFab && /* @__PURE__ */
|
|
12115
|
+
showFab && /* @__PURE__ */ jsx72(
|
|
12062
12116
|
"button",
|
|
12063
12117
|
{
|
|
12064
12118
|
onClick: () => setIsOpen((prev) => !prev),
|
|
12065
12119
|
className: "it-theme-fab it-theme-bounce",
|
|
12066
12120
|
style: { backgroundColor: "var(--color-primary)" },
|
|
12067
12121
|
"aria-label": "Configurar Paleta de Colores",
|
|
12068
|
-
children: /* @__PURE__ */
|
|
12122
|
+
children: /* @__PURE__ */ jsx72(MdPalette, { size: 28 })
|
|
12069
12123
|
}
|
|
12070
12124
|
),
|
|
12071
|
-
showFab && /* @__PURE__ */
|
|
12125
|
+
showFab && /* @__PURE__ */ jsx72(
|
|
12072
12126
|
ITDialog,
|
|
12073
12127
|
{
|
|
12074
12128
|
isOpen,
|
|
@@ -12078,8 +12132,8 @@ function ITThemeProvider({
|
|
|
12078
12132
|
children: /* @__PURE__ */ jsxs56("div", { className: "flex gap-6 h-[580px]", children: [
|
|
12079
12133
|
/* @__PURE__ */ jsxs56("div", { className: "w-64 flex-shrink-0 flex flex-col gap-5 overflow-y-auto pr-1", children: [
|
|
12080
12134
|
/* @__PURE__ */ jsxs56("div", { children: [
|
|
12081
|
-
/* @__PURE__ */
|
|
12082
|
-
/* @__PURE__ */
|
|
12135
|
+
/* @__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" }),
|
|
12136
|
+
/* @__PURE__ */ jsx72(
|
|
12083
12137
|
ITSegmentedControl,
|
|
12084
12138
|
{
|
|
12085
12139
|
options: [
|
|
@@ -12094,15 +12148,15 @@ function ITThemeProvider({
|
|
|
12094
12148
|
)
|
|
12095
12149
|
] }),
|
|
12096
12150
|
/* @__PURE__ */ jsxs56("div", { children: [
|
|
12097
|
-
/* @__PURE__ */
|
|
12098
|
-
/* @__PURE__ */
|
|
12151
|
+
/* @__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" }) }),
|
|
12152
|
+
/* @__PURE__ */ jsx72("div", { className: "grid grid-cols-2 gap-2", children: PRESETS.map((preset) => /* @__PURE__ */ jsx72(PresetCard, { preset }, preset.name)) })
|
|
12099
12153
|
] }),
|
|
12100
12154
|
customPresets.length > 0 && /* @__PURE__ */ jsxs56("div", { children: [
|
|
12101
|
-
/* @__PURE__ */
|
|
12102
|
-
/* @__PURE__ */
|
|
12155
|
+
/* @__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" }),
|
|
12156
|
+
/* @__PURE__ */ jsx72("div", { className: "flex flex-col gap-1.5", children: customPresets.map((preset) => /* @__PURE__ */ jsx72(PresetCard, { preset, isCustom: true }, preset.name)) })
|
|
12103
12157
|
] }),
|
|
12104
12158
|
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__ */
|
|
12159
|
+
/* @__PURE__ */ jsx72(
|
|
12106
12160
|
ITInput,
|
|
12107
12161
|
{
|
|
12108
12162
|
name: "presetName",
|
|
@@ -12121,7 +12175,7 @@ function ITThemeProvider({
|
|
|
12121
12175
|
}
|
|
12122
12176
|
),
|
|
12123
12177
|
/* @__PURE__ */ jsxs56("div", { className: "flex gap-2", children: [
|
|
12124
|
-
/* @__PURE__ */
|
|
12178
|
+
/* @__PURE__ */ jsx72(
|
|
12125
12179
|
ITButton,
|
|
12126
12180
|
{
|
|
12127
12181
|
label: "Guardar",
|
|
@@ -12132,7 +12186,7 @@ function ITThemeProvider({
|
|
|
12132
12186
|
className: "flex-1"
|
|
12133
12187
|
}
|
|
12134
12188
|
),
|
|
12135
|
-
/* @__PURE__ */
|
|
12189
|
+
/* @__PURE__ */ jsx72(
|
|
12136
12190
|
ITButton,
|
|
12137
12191
|
{
|
|
12138
12192
|
label: "X",
|
|
@@ -12146,31 +12200,31 @@ function ITThemeProvider({
|
|
|
12146
12200
|
)
|
|
12147
12201
|
] })
|
|
12148
12202
|
] }),
|
|
12149
|
-
!isSavingPreset && /* @__PURE__ */
|
|
12203
|
+
!isSavingPreset && /* @__PURE__ */ jsx72(
|
|
12150
12204
|
ITButton,
|
|
12151
12205
|
{
|
|
12152
12206
|
variant: "outlined",
|
|
12153
|
-
icon: /* @__PURE__ */
|
|
12207
|
+
icon: /* @__PURE__ */ jsx72(MdPalette, { size: 14 }),
|
|
12154
12208
|
label: "Guardar actual",
|
|
12155
12209
|
onClick: () => setIsSavingPreset(true),
|
|
12156
12210
|
size: "sm"
|
|
12157
12211
|
}
|
|
12158
12212
|
),
|
|
12159
|
-
/* @__PURE__ */
|
|
12213
|
+
/* @__PURE__ */ jsx72(
|
|
12160
12214
|
ITButton,
|
|
12161
12215
|
{
|
|
12162
12216
|
variant: "outlined",
|
|
12163
12217
|
color: "danger",
|
|
12164
|
-
icon: /* @__PURE__ */
|
|
12218
|
+
icon: /* @__PURE__ */ jsx72(MdRefresh, { size: 14 }),
|
|
12165
12219
|
label: "Restaurar default",
|
|
12166
12220
|
onClick: resetTheme,
|
|
12167
12221
|
size: "sm"
|
|
12168
12222
|
}
|
|
12169
12223
|
)
|
|
12170
12224
|
] }),
|
|
12171
|
-
/* @__PURE__ */
|
|
12225
|
+
/* @__PURE__ */ jsx72(ITDivider, { orientation: "vertical" }),
|
|
12172
12226
|
/* @__PURE__ */ jsxs56("div", { className: "flex-1 flex flex-col min-w-0", children: [
|
|
12173
|
-
/* @__PURE__ */
|
|
12227
|
+
/* @__PURE__ */ jsx72(
|
|
12174
12228
|
tabs_default,
|
|
12175
12229
|
{
|
|
12176
12230
|
variant: "pill",
|
|
@@ -12178,7 +12232,7 @@ function ITThemeProvider({
|
|
|
12178
12232
|
{
|
|
12179
12233
|
id: "brand",
|
|
12180
12234
|
label: "Marca",
|
|
12181
|
-
content: /* @__PURE__ */
|
|
12235
|
+
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
12236
|
"primary",
|
|
12183
12237
|
"secondary",
|
|
12184
12238
|
"ternary",
|
|
@@ -12187,35 +12241,35 @@ function ITThemeProvider({
|
|
|
12187
12241
|
"info",
|
|
12188
12242
|
"alert",
|
|
12189
12243
|
"warning"
|
|
12190
|
-
].map((key) => /* @__PURE__ */
|
|
12244
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12191
12245
|
},
|
|
12192
12246
|
{
|
|
12193
12247
|
id: "layout",
|
|
12194
12248
|
label: "Nav & Sidebar",
|
|
12195
|
-
content: /* @__PURE__ */
|
|
12249
|
+
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
12250
|
"layout.sidebarBg",
|
|
12197
12251
|
"layout.sidebarText",
|
|
12198
12252
|
"layout.navbarBg",
|
|
12199
12253
|
"layout.navbarText"
|
|
12200
|
-
].map((key) => /* @__PURE__ */
|
|
12254
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12201
12255
|
},
|
|
12202
12256
|
{
|
|
12203
12257
|
id: "tables",
|
|
12204
12258
|
label: "Tablas",
|
|
12205
|
-
content: /* @__PURE__ */
|
|
12259
|
+
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
12260
|
"table.headerBg",
|
|
12207
12261
|
"table.headerText",
|
|
12208
12262
|
"table.rowBg",
|
|
12209
12263
|
"table.rowText",
|
|
12210
12264
|
"table.rowHover"
|
|
12211
|
-
].map((key) => /* @__PURE__ */
|
|
12265
|
+
].map((key) => /* @__PURE__ */ jsx72(ColorRow, { colorKey: key }, key)) })
|
|
12212
12266
|
}
|
|
12213
12267
|
]
|
|
12214
12268
|
}
|
|
12215
12269
|
),
|
|
12216
12270
|
/* @__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__ */
|
|
12271
|
+
/* @__PURE__ */ jsx72(ITText, { as: "p", className: "text-[11px] text-slate-400 mr-auto", children: "Los cambios se guardan autom\xE1ticamente" }),
|
|
12272
|
+
/* @__PURE__ */ jsx72(
|
|
12219
12273
|
ITButton,
|
|
12220
12274
|
{
|
|
12221
12275
|
label: "Cerrar",
|
|
@@ -12273,6 +12327,7 @@ export {
|
|
|
12273
12327
|
ITGrid,
|
|
12274
12328
|
image_default as ITImage,
|
|
12275
12329
|
ITInput,
|
|
12330
|
+
ITInputNumber,
|
|
12276
12331
|
ITLayout,
|
|
12277
12332
|
ITLoader,
|
|
12278
12333
|
ITMaskedInput,
|