@axzydev/axzy_ui_system 1.4.4 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +489 -351
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +38 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +452 -315
- package/dist/index.js.map +1 -1
- package/dist/layered.css +3 -0
- package/package.json +2 -1
- package/src/components/molecules/line-bar-chart/line-bar-chart.props.ts +28 -0
- package/src/components/molecules/line-bar-chart/line-bar-chart.tsx +169 -0
- package/src/index.ts +4 -2
package/dist/index.js
CHANGED
|
@@ -8229,9 +8229,145 @@ function ITStatCard({
|
|
|
8229
8229
|
);
|
|
8230
8230
|
}
|
|
8231
8231
|
|
|
8232
|
+
// src/components/molecules/line-bar-chart/line-bar-chart.tsx
|
|
8233
|
+
import { useId, useMemo as useMemo11, useState as useState29 } from "react";
|
|
8234
|
+
import { jsx as jsx60, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
8235
|
+
var compact = (value) => new Intl.NumberFormat("es-MX", { notation: "compact", maximumFractionDigits: 1 }).format(value);
|
|
8236
|
+
var plain = (value) => new Intl.NumberFormat("es-MX").format(value);
|
|
8237
|
+
function ITLineBarChart({
|
|
8238
|
+
data,
|
|
8239
|
+
ariaLabel,
|
|
8240
|
+
lineLabel = "Serie A",
|
|
8241
|
+
barLabel = "Serie B",
|
|
8242
|
+
lineColor = "#10b981",
|
|
8243
|
+
barColor = "#3b82f6",
|
|
8244
|
+
height = 240,
|
|
8245
|
+
formatValue = plain,
|
|
8246
|
+
formatAxis = compact,
|
|
8247
|
+
className = ""
|
|
8248
|
+
}) {
|
|
8249
|
+
const gradientId = useId().replace(/[:]/g, "");
|
|
8250
|
+
const [hover, setHover] = useState29(null);
|
|
8251
|
+
const width = 720;
|
|
8252
|
+
const padding = { top: 16, right: 16, bottom: 28, left: 52 };
|
|
8253
|
+
const plotWidth = width - padding.left - padding.right;
|
|
8254
|
+
const plotHeight = height - padding.top - padding.bottom;
|
|
8255
|
+
const max = useMemo11(
|
|
8256
|
+
() => Math.max(...data.flatMap((d) => [d.line, d.bar]), 1),
|
|
8257
|
+
[data]
|
|
8258
|
+
);
|
|
8259
|
+
const gridValues = [0, 0.25, 0.5, 0.75, 1].map((f) => max * f);
|
|
8260
|
+
const step = data.length > 0 ? plotWidth / data.length : plotWidth;
|
|
8261
|
+
const barWidth = Math.max(Math.min(step * 0.42, 26), 4);
|
|
8262
|
+
const x = (index) => padding.left + step * index + step / 2;
|
|
8263
|
+
const y = (value) => padding.top + plotHeight - value / max * plotHeight;
|
|
8264
|
+
const linePoints = data.map((d, i) => `${x(i)},${y(d.line)}`).join(" ");
|
|
8265
|
+
const areaPath = data.length > 0 ? `M ${x(0)} ${y(data[0].line)} ` + data.slice(1).map((d, i) => `L ${x(i + 1)} ${y(d.line)}`).join(" ") + ` L ${x(data.length - 1)} ${padding.top + plotHeight} L ${x(0)} ${padding.top + plotHeight} Z` : "";
|
|
8266
|
+
const active = hover !== null ? data[hover] : null;
|
|
8267
|
+
return /* @__PURE__ */ jsxs46("div", { className: `flex flex-col gap-3 ${className}`.trim(), children: [
|
|
8268
|
+
/* @__PURE__ */ jsxs46(
|
|
8269
|
+
"svg",
|
|
8270
|
+
{
|
|
8271
|
+
role: "img",
|
|
8272
|
+
"aria-label": ariaLabel,
|
|
8273
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
8274
|
+
style: { height, width: "100%" },
|
|
8275
|
+
onMouseLeave: () => setHover(null),
|
|
8276
|
+
children: [
|
|
8277
|
+
/* @__PURE__ */ jsx60("defs", { children: /* @__PURE__ */ jsxs46("linearGradient", { id: `area-${gradientId}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
8278
|
+
/* @__PURE__ */ jsx60("stop", { offset: "0%", stopColor: lineColor, stopOpacity: "0.22" }),
|
|
8279
|
+
/* @__PURE__ */ jsx60("stop", { offset: "100%", stopColor: lineColor, stopOpacity: "0.02" })
|
|
8280
|
+
] }) }),
|
|
8281
|
+
gridValues.map((value, i) => /* @__PURE__ */ jsxs46("g", { children: [
|
|
8282
|
+
/* @__PURE__ */ jsx60(
|
|
8283
|
+
"line",
|
|
8284
|
+
{
|
|
8285
|
+
x1: padding.left,
|
|
8286
|
+
x2: width - padding.right,
|
|
8287
|
+
y1: y(value),
|
|
8288
|
+
y2: y(value),
|
|
8289
|
+
stroke: "#e2e8f0",
|
|
8290
|
+
strokeWidth: 1,
|
|
8291
|
+
strokeDasharray: i === 0 ? void 0 : "3 4"
|
|
8292
|
+
}
|
|
8293
|
+
),
|
|
8294
|
+
/* @__PURE__ */ jsx60("text", { x: padding.left - 8, y: y(value) + 3, textAnchor: "end", fontSize: 10, fill: "#94a3b8", children: formatAxis(Math.round(value)) })
|
|
8295
|
+
] }, i)),
|
|
8296
|
+
data.map((d, i) => /* @__PURE__ */ jsx60(
|
|
8297
|
+
"rect",
|
|
8298
|
+
{
|
|
8299
|
+
x: x(i) - barWidth / 2,
|
|
8300
|
+
y: y(d.bar),
|
|
8301
|
+
width: barWidth,
|
|
8302
|
+
height: Math.max(padding.top + plotHeight - y(d.bar), 1),
|
|
8303
|
+
rx: 3,
|
|
8304
|
+
fill: barColor,
|
|
8305
|
+
opacity: hover === null || hover === i ? 0.85 : 0.35
|
|
8306
|
+
},
|
|
8307
|
+
`bar-${d.label}`
|
|
8308
|
+
)),
|
|
8309
|
+
areaPath && /* @__PURE__ */ jsx60("path", { d: areaPath, fill: `url(#area-${gradientId})` }),
|
|
8310
|
+
data.length > 0 && /* @__PURE__ */ jsx60(
|
|
8311
|
+
"polyline",
|
|
8312
|
+
{
|
|
8313
|
+
points: linePoints,
|
|
8314
|
+
fill: "none",
|
|
8315
|
+
stroke: lineColor,
|
|
8316
|
+
strokeWidth: 2.5,
|
|
8317
|
+
strokeLinecap: "round",
|
|
8318
|
+
strokeLinejoin: "round"
|
|
8319
|
+
}
|
|
8320
|
+
),
|
|
8321
|
+
data.map((d, i) => /* @__PURE__ */ jsx60(
|
|
8322
|
+
"circle",
|
|
8323
|
+
{
|
|
8324
|
+
cx: x(i),
|
|
8325
|
+
cy: y(d.line),
|
|
8326
|
+
r: hover === i ? 4.5 : 3,
|
|
8327
|
+
fill: "#ffffff",
|
|
8328
|
+
stroke: lineColor,
|
|
8329
|
+
strokeWidth: 2
|
|
8330
|
+
},
|
|
8331
|
+
`dot-${d.label}`
|
|
8332
|
+
)),
|
|
8333
|
+
data.map((d, i) => /* @__PURE__ */ jsxs46("g", { onMouseEnter: () => setHover(i), children: [
|
|
8334
|
+
/* @__PURE__ */ jsx60("rect", { x: padding.left + step * i, y: padding.top, width: step, height: plotHeight, fill: "transparent" }),
|
|
8335
|
+
/* @__PURE__ */ jsx60("text", { x: x(i), y: height - 8, textAnchor: "middle", fontSize: 10, fill: "#64748b", children: d.label })
|
|
8336
|
+
] }, `hit-${d.label}`)),
|
|
8337
|
+
active && hover !== null && /* @__PURE__ */ jsxs46("g", { transform: `translate(${Math.min(Math.max(x(hover) - 62, 4), width - 132)}, ${padding.top + 4})`, children: [
|
|
8338
|
+
/* @__PURE__ */ jsx60("rect", { width: 128, height: 46, rx: 6, fill: "#0f172a", opacity: 0.9 }),
|
|
8339
|
+
/* @__PURE__ */ jsx60("text", { x: 10, y: 18, fontSize: 10, fill: "#e2e8f0", children: active.label }),
|
|
8340
|
+
/* @__PURE__ */ jsxs46("text", { x: 10, y: 32, fontSize: 10, fill: lineColor, children: [
|
|
8341
|
+
lineLabel,
|
|
8342
|
+
": ",
|
|
8343
|
+
formatValue(active.line)
|
|
8344
|
+
] }),
|
|
8345
|
+
/* @__PURE__ */ jsxs46("text", { x: 10, y: 44, fontSize: 10, fill: "#93c5fd", children: [
|
|
8346
|
+
barLabel,
|
|
8347
|
+
": ",
|
|
8348
|
+
formatValue(active.bar)
|
|
8349
|
+
] })
|
|
8350
|
+
] })
|
|
8351
|
+
]
|
|
8352
|
+
}
|
|
8353
|
+
),
|
|
8354
|
+
/* @__PURE__ */ jsxs46("ul", { className: "flex flex-wrap items-center gap-4 text-[11px]", style: { color: "#475569" }, children: [
|
|
8355
|
+
/* @__PURE__ */ jsxs46("li", { children: [
|
|
8356
|
+
/* @__PURE__ */ jsx60("span", { className: "h-2.5 w-2.5 rounded-sm", style: { background: lineColor }, "aria-hidden": true }),
|
|
8357
|
+
lineLabel
|
|
8358
|
+
] }),
|
|
8359
|
+
/* @__PURE__ */ jsxs46("li", { children: [
|
|
8360
|
+
/* @__PURE__ */ jsx60("span", { className: "h-2.5 w-2.5 rounded-sm", style: { background: barColor }, "aria-hidden": true }),
|
|
8361
|
+
barLabel
|
|
8362
|
+
] })
|
|
8363
|
+
] })
|
|
8364
|
+
] });
|
|
8365
|
+
}
|
|
8366
|
+
var line_bar_chart_default = ITLineBarChart;
|
|
8367
|
+
|
|
8232
8368
|
// src/components/molecules/table/table.tsx
|
|
8233
8369
|
import clsx44 from "clsx";
|
|
8234
|
-
import React11, { useState as
|
|
8370
|
+
import React11, { useState as useState30 } from "react";
|
|
8235
8371
|
import {
|
|
8236
8372
|
FaCheck as FaCheck4,
|
|
8237
8373
|
FaSpinner as FaSpinner3,
|
|
@@ -8241,7 +8377,7 @@ import {
|
|
|
8241
8377
|
} from "react-icons/fa";
|
|
8242
8378
|
import { MdOutlineSwapVert as MdOutlineSwapVert2 } from "react-icons/md";
|
|
8243
8379
|
import { isSameDay as isSameDay2, startOfDay as startOfDay2, endOfDay } from "date-fns";
|
|
8244
|
-
import { Fragment as Fragment9, jsx as
|
|
8380
|
+
import { Fragment as Fragment9, jsx as jsx61, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
8245
8381
|
function ITTable({
|
|
8246
8382
|
columns,
|
|
8247
8383
|
data = [],
|
|
@@ -8265,7 +8401,7 @@ function ITTable({
|
|
|
8265
8401
|
overscan = 5,
|
|
8266
8402
|
stickyHeader = false
|
|
8267
8403
|
}) {
|
|
8268
|
-
const [viewMode, setViewMode] =
|
|
8404
|
+
const [viewMode, setViewMode] = useState30(defaultView);
|
|
8269
8405
|
const { ref: rootRef, width: containerWidth } = useElementSize();
|
|
8270
8406
|
const isFixed = layout === "fixed";
|
|
8271
8407
|
const forcedCards = autoCardBreakpoint > 0 && containerWidth > 0 && containerWidth < autoCardBreakpoint;
|
|
@@ -8397,14 +8533,14 @@ function ITTable({
|
|
|
8397
8533
|
if (currentValue === true) return "Filtrar solo verdaderos";
|
|
8398
8534
|
return "Filtrar solo falsos";
|
|
8399
8535
|
};
|
|
8400
|
-
return /* @__PURE__ */
|
|
8536
|
+
return /* @__PURE__ */ jsx61(
|
|
8401
8537
|
"button",
|
|
8402
8538
|
{
|
|
8403
8539
|
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",
|
|
8404
8540
|
onClick: () => handleFilterChange(col.key, nextValue),
|
|
8405
8541
|
"aria-label": `${getToggleLabel()} para ${col.label}`,
|
|
8406
8542
|
title: `${getToggleLabel()} para ${col.label}`,
|
|
8407
|
-
children: /* @__PURE__ */
|
|
8543
|
+
children: /* @__PURE__ */ jsx61("div", { className: "relative w-10 h-5 bg-secondary-300 rounded-full", children: /* @__PURE__ */ jsx61(
|
|
8408
8544
|
"div",
|
|
8409
8545
|
{
|
|
8410
8546
|
className: clsx44(
|
|
@@ -8422,7 +8558,7 @@ function ITTable({
|
|
|
8422
8558
|
}
|
|
8423
8559
|
if (col.filter === "catalog" && col.catalogOptions) {
|
|
8424
8560
|
if (col.catalogOptions.loading) {
|
|
8425
|
-
return /* @__PURE__ */
|
|
8561
|
+
return /* @__PURE__ */ jsx61(
|
|
8426
8562
|
FaSpinner3,
|
|
8427
8563
|
{
|
|
8428
8564
|
className: "animate-spin",
|
|
@@ -8432,9 +8568,9 @@ function ITTable({
|
|
|
8432
8568
|
);
|
|
8433
8569
|
}
|
|
8434
8570
|
if (col.catalogOptions.error) {
|
|
8435
|
-
return /* @__PURE__ */
|
|
8571
|
+
return /* @__PURE__ */ jsx61(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8436
8572
|
}
|
|
8437
|
-
return /* @__PURE__ */
|
|
8573
|
+
return /* @__PURE__ */ jsx61(
|
|
8438
8574
|
ITSelect,
|
|
8439
8575
|
{
|
|
8440
8576
|
name: `filter-${col.key}`,
|
|
@@ -8458,7 +8594,7 @@ function ITTable({
|
|
|
8458
8594
|
}
|
|
8459
8595
|
if (col.filter === "search" && col.catalogOptions) {
|
|
8460
8596
|
if (col.catalogOptions.loading) {
|
|
8461
|
-
return /* @__PURE__ */
|
|
8597
|
+
return /* @__PURE__ */ jsx61(
|
|
8462
8598
|
FaSpinner3,
|
|
8463
8599
|
{
|
|
8464
8600
|
className: "animate-spin",
|
|
@@ -8468,10 +8604,10 @@ function ITTable({
|
|
|
8468
8604
|
);
|
|
8469
8605
|
}
|
|
8470
8606
|
if (col.catalogOptions.error) {
|
|
8471
|
-
return /* @__PURE__ */
|
|
8607
|
+
return /* @__PURE__ */ jsx61(ITText, { as: "span", className: "text-danger-500 text-xs", children: "Error cargando" });
|
|
8472
8608
|
}
|
|
8473
8609
|
const searchValue = filters[col.key];
|
|
8474
|
-
return /* @__PURE__ */
|
|
8610
|
+
return /* @__PURE__ */ jsx61(
|
|
8475
8611
|
ITSearchSelect,
|
|
8476
8612
|
{
|
|
8477
8613
|
name: `filter-${col.key}`,
|
|
@@ -8494,7 +8630,7 @@ function ITTable({
|
|
|
8494
8630
|
}
|
|
8495
8631
|
if (col.filter === "date") {
|
|
8496
8632
|
const dateValue = filters[col.key];
|
|
8497
|
-
return /* @__PURE__ */
|
|
8633
|
+
return /* @__PURE__ */ jsx61(
|
|
8498
8634
|
ITDatePicker,
|
|
8499
8635
|
{
|
|
8500
8636
|
name: `filter-${col.key}`,
|
|
@@ -8510,7 +8646,7 @@ function ITTable({
|
|
|
8510
8646
|
}
|
|
8511
8647
|
if (col.filter === "date-range") {
|
|
8512
8648
|
const rangeValue = filters[col.key];
|
|
8513
|
-
return /* @__PURE__ */
|
|
8649
|
+
return /* @__PURE__ */ jsx61(
|
|
8514
8650
|
ITDatePicker,
|
|
8515
8651
|
{
|
|
8516
8652
|
name: `filter-${col.key}`,
|
|
@@ -8525,7 +8661,7 @@ function ITTable({
|
|
|
8525
8661
|
}
|
|
8526
8662
|
);
|
|
8527
8663
|
}
|
|
8528
|
-
return /* @__PURE__ */
|
|
8664
|
+
return /* @__PURE__ */ jsx61(
|
|
8529
8665
|
ITInput,
|
|
8530
8666
|
{
|
|
8531
8667
|
name: `filter-${col.key}`,
|
|
@@ -8547,14 +8683,14 @@ function ITTable({
|
|
|
8547
8683
|
case "number":
|
|
8548
8684
|
return typeof value === "number" && col.currencyMX ? formatCurrencyMX(value) : value;
|
|
8549
8685
|
case "boolean":
|
|
8550
|
-
return value ? /* @__PURE__ */
|
|
8686
|
+
return value ? /* @__PURE__ */ jsx61(
|
|
8551
8687
|
FaCheck4,
|
|
8552
8688
|
{
|
|
8553
8689
|
className: "text-success-500",
|
|
8554
8690
|
"aria-label": "Verdadero",
|
|
8555
8691
|
title: "Verdadero"
|
|
8556
8692
|
}
|
|
8557
|
-
) : /* @__PURE__ */
|
|
8693
|
+
) : /* @__PURE__ */ jsx61(
|
|
8558
8694
|
FaTimes9,
|
|
8559
8695
|
{
|
|
8560
8696
|
className: "text-danger-500",
|
|
@@ -8579,12 +8715,12 @@ function ITTable({
|
|
|
8579
8715
|
const renderDefaultCard = (row) => {
|
|
8580
8716
|
const dataCols = columns.filter((c) => c.type !== "actions");
|
|
8581
8717
|
const actionCol = columns.find((c) => c.type === "actions");
|
|
8582
|
-
return /* @__PURE__ */
|
|
8583
|
-
dataCols.map((col) => /* @__PURE__ */
|
|
8584
|
-
/* @__PURE__ */
|
|
8585
|
-
/* @__PURE__ */
|
|
8718
|
+
return /* @__PURE__ */ jsxs47("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: [
|
|
8719
|
+
dataCols.map((col) => /* @__PURE__ */ jsxs47("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8720
|
+
/* @__PURE__ */ jsx61("span", { className: "text-[10px] font-bold uppercase tracking-wider text-slate-400 whitespace-nowrap flex-shrink-0 min-w-[70px]", children: col.label }),
|
|
8721
|
+
/* @__PURE__ */ jsx61("span", { className: "text-sm font-medium text-slate-800 dark:text-white text-right truncate", children: renderCellContent(col, row) })
|
|
8586
8722
|
] }, col.key)),
|
|
8587
|
-
actionCol?.actions && /* @__PURE__ */
|
|
8723
|
+
actionCol?.actions && /* @__PURE__ */ jsx61("div", { className: "flex items-center justify-end gap-2 pt-2 border-t border-slate-100 dark:border-slate-700", children: actionCol.actions(row) })
|
|
8588
8724
|
] });
|
|
8589
8725
|
};
|
|
8590
8726
|
const handleRowClick = (row) => (event) => {
|
|
@@ -8598,61 +8734,61 @@ function ITTable({
|
|
|
8598
8734
|
event.preventDefault();
|
|
8599
8735
|
onRowClick(row, event);
|
|
8600
8736
|
};
|
|
8601
|
-
return /* @__PURE__ */
|
|
8602
|
-
title && /* @__PURE__ */
|
|
8603
|
-
/* @__PURE__ */
|
|
8604
|
-
/* @__PURE__ */
|
|
8605
|
-
/* @__PURE__ */
|
|
8737
|
+
return /* @__PURE__ */ jsx61("div", { ref: rootRef, className: clsx44("space-y-4 w-full", containerClassName), children: /* @__PURE__ */ jsxs47("div", { className: tableContainer, style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8738
|
+
title && /* @__PURE__ */ jsxs47("div", { className: "px-6 py-5 flex items-center justify-between", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: [
|
|
8739
|
+
/* @__PURE__ */ jsx61(ITText, { as: "h2", className: "text-xl font-bold text-secondary-900 leading-tight", children: title }),
|
|
8740
|
+
/* @__PURE__ */ jsxs47("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: [
|
|
8741
|
+
/* @__PURE__ */ jsxs47(
|
|
8606
8742
|
"button",
|
|
8607
8743
|
{
|
|
8608
8744
|
onClick: () => setViewMode("table"),
|
|
8609
8745
|
disabled: forcedCards,
|
|
8610
8746
|
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"}`,
|
|
8611
8747
|
children: [
|
|
8612
|
-
/* @__PURE__ */
|
|
8748
|
+
/* @__PURE__ */ jsx61(FaTable2, { size: 11 }),
|
|
8613
8749
|
"Table"
|
|
8614
8750
|
]
|
|
8615
8751
|
}
|
|
8616
8752
|
),
|
|
8617
|
-
/* @__PURE__ */
|
|
8753
|
+
/* @__PURE__ */ jsxs47(
|
|
8618
8754
|
"button",
|
|
8619
8755
|
{
|
|
8620
8756
|
onClick: () => setViewMode("cards"),
|
|
8621
8757
|
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"}`,
|
|
8622
8758
|
children: [
|
|
8623
|
-
/* @__PURE__ */
|
|
8759
|
+
/* @__PURE__ */ jsx61(FaThLarge2, { size: 11 }),
|
|
8624
8760
|
"Cards"
|
|
8625
8761
|
]
|
|
8626
8762
|
}
|
|
8627
8763
|
)
|
|
8628
8764
|
] })
|
|
8629
8765
|
] }),
|
|
8630
|
-
!title && /* @__PURE__ */
|
|
8631
|
-
/* @__PURE__ */
|
|
8766
|
+
!title && /* @__PURE__ */ jsx61("div", { className: "flex justify-end px-4 pt-3", children: /* @__PURE__ */ jsxs47("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: [
|
|
8767
|
+
/* @__PURE__ */ jsxs47(
|
|
8632
8768
|
"button",
|
|
8633
8769
|
{
|
|
8634
8770
|
onClick: () => setViewMode("table"),
|
|
8635
8771
|
disabled: forcedCards,
|
|
8636
8772
|
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"}`,
|
|
8637
8773
|
children: [
|
|
8638
|
-
/* @__PURE__ */
|
|
8774
|
+
/* @__PURE__ */ jsx61(FaTable2, { size: 11 }),
|
|
8639
8775
|
"Table"
|
|
8640
8776
|
]
|
|
8641
8777
|
}
|
|
8642
8778
|
),
|
|
8643
|
-
/* @__PURE__ */
|
|
8779
|
+
/* @__PURE__ */ jsxs47(
|
|
8644
8780
|
"button",
|
|
8645
8781
|
{
|
|
8646
8782
|
onClick: () => setViewMode("cards"),
|
|
8647
8783
|
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"}`,
|
|
8648
8784
|
children: [
|
|
8649
|
-
/* @__PURE__ */
|
|
8785
|
+
/* @__PURE__ */ jsx61(FaThLarge2, { size: 11 }),
|
|
8650
8786
|
"Cards"
|
|
8651
8787
|
]
|
|
8652
8788
|
}
|
|
8653
8789
|
)
|
|
8654
8790
|
] }) }),
|
|
8655
|
-
effectiveView === "cards" ? /* @__PURE__ */
|
|
8791
|
+
effectiveView === "cards" ? /* @__PURE__ */ jsx61("div", { className: "p-4 space-y-3 max-h-[400px] overflow-y-auto", children: currentData.length > 0 ? currentData.map((row, i) => /* @__PURE__ */ jsx61(
|
|
8656
8792
|
"div",
|
|
8657
8793
|
{
|
|
8658
8794
|
className: clsx44(tableCardHover, onRowClick && tableCardClickable),
|
|
@@ -8663,16 +8799,16 @@ function ITTable({
|
|
|
8663
8799
|
children: renderCard ? renderCard(row) : renderDefaultCard(row)
|
|
8664
8800
|
},
|
|
8665
8801
|
i
|
|
8666
|
-
)) : /* @__PURE__ */
|
|
8667
|
-
/* @__PURE__ */
|
|
8668
|
-
/* @__PURE__ */
|
|
8669
|
-
] }) }) : /* @__PURE__ */
|
|
8802
|
+
)) : /* @__PURE__ */ jsxs47("div", { className: clsx44(tableEmptyContent, "py-12"), children: [
|
|
8803
|
+
/* @__PURE__ */ jsx61(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8804
|
+
/* @__PURE__ */ jsx61(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8805
|
+
] }) }) : /* @__PURE__ */ jsx61(
|
|
8670
8806
|
"div",
|
|
8671
8807
|
{
|
|
8672
8808
|
ref: isTableVirtual ? scrollRef : void 0,
|
|
8673
8809
|
className: isTableVirtual ? "overflow-x-auto overflow-y-auto" : "overflow-x-auto",
|
|
8674
8810
|
style: isTableVirtual ? { maxHeight: virtualizedMaxHeight } : void 0,
|
|
8675
|
-
children: /* @__PURE__ */
|
|
8811
|
+
children: /* @__PURE__ */ jsxs47(
|
|
8676
8812
|
"table",
|
|
8677
8813
|
{
|
|
8678
8814
|
className: clsx44(
|
|
@@ -8685,14 +8821,14 @@ function ITTable({
|
|
|
8685
8821
|
style: isFixed ? { tableLayout: "fixed" } : void 0,
|
|
8686
8822
|
"aria-rowcount": isTableVirtual ? currentData.length + 1 : void 0,
|
|
8687
8823
|
children: [
|
|
8688
|
-
hasColumnWidths && /* @__PURE__ */
|
|
8824
|
+
hasColumnWidths && /* @__PURE__ */ jsx61("colgroup", { children: columns.map((col) => /* @__PURE__ */ jsx61(
|
|
8689
8825
|
"col",
|
|
8690
8826
|
{
|
|
8691
8827
|
style: col.width != null ? { width: typeof col.width === "number" ? `${col.width}px` : col.width } : void 0
|
|
8692
8828
|
},
|
|
8693
8829
|
col.key
|
|
8694
8830
|
)) }),
|
|
8695
|
-
/* @__PURE__ */
|
|
8831
|
+
/* @__PURE__ */ jsx61("thead", { children: /* @__PURE__ */ jsx61(
|
|
8696
8832
|
"tr",
|
|
8697
8833
|
{
|
|
8698
8834
|
className: clsx44(tableHeaderRow, "dark:text-slate-200"),
|
|
@@ -8700,7 +8836,7 @@ function ITTable({
|
|
|
8700
8836
|
children: columns.map((col) => {
|
|
8701
8837
|
const pin = pinnedMeta[col.key];
|
|
8702
8838
|
const isPinned = pin != null;
|
|
8703
|
-
return /* @__PURE__ */
|
|
8839
|
+
return /* @__PURE__ */ jsx61(
|
|
8704
8840
|
"th",
|
|
8705
8841
|
{
|
|
8706
8842
|
scope: "col",
|
|
@@ -8717,20 +8853,20 @@ function ITTable({
|
|
|
8717
8853
|
...isStickyHeader || isPinned ? { backgroundColor: "var(--color-table-headerBg, #f8fafc)" } : {},
|
|
8718
8854
|
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8719
8855
|
} : void 0,
|
|
8720
|
-
children: /* @__PURE__ */
|
|
8721
|
-
/* @__PURE__ */
|
|
8722
|
-
/* @__PURE__ */
|
|
8723
|
-
col.sortable && col.type !== "actions" && /* @__PURE__ */
|
|
8856
|
+
children: /* @__PURE__ */ jsxs47("div", { className: isFixed ? "flex flex-col gap-3" : "flex flex-col gap-3 min-w-[150px]", children: [
|
|
8857
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center justify-between gap-2", children: [
|
|
8858
|
+
/* @__PURE__ */ jsx61(ITText, { as: "span", className: "text-slate-900 dark:text-white font-bold", children: col.label }),
|
|
8859
|
+
col.sortable && col.type !== "actions" && /* @__PURE__ */ jsx61(
|
|
8724
8860
|
"button",
|
|
8725
8861
|
{
|
|
8726
8862
|
onClick: () => handleSort(col.key),
|
|
8727
8863
|
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"}`,
|
|
8728
8864
|
title: `Ordenar por ${col.label}`,
|
|
8729
|
-
children: /* @__PURE__ */
|
|
8865
|
+
children: /* @__PURE__ */ jsx61(MdOutlineSwapVert2, { className: "w-4 h-4", "aria-hidden": "true" })
|
|
8730
8866
|
}
|
|
8731
8867
|
)
|
|
8732
8868
|
] }),
|
|
8733
|
-
/* @__PURE__ */
|
|
8869
|
+
/* @__PURE__ */ jsx61("div", { className: "w-full", children: col.filter ? renderFilterInput(col) : null })
|
|
8734
8870
|
] })
|
|
8735
8871
|
},
|
|
8736
8872
|
col.key
|
|
@@ -8738,11 +8874,11 @@ function ITTable({
|
|
|
8738
8874
|
})
|
|
8739
8875
|
}
|
|
8740
8876
|
) }),
|
|
8741
|
-
/* @__PURE__ */
|
|
8742
|
-
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */
|
|
8877
|
+
/* @__PURE__ */ jsx61("tbody", { className: clsx44(tableBody, "dark:divide-slate-700/30"), children: currentData.length > 0 ? /* @__PURE__ */ jsxs47(Fragment9, { children: [
|
|
8878
|
+
isTableVirtual && topSpacerHeight > 0 && /* @__PURE__ */ jsx61("tr", { "aria-hidden": "true", style: { height: topSpacerHeight }, children: /* @__PURE__ */ jsx61("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) }),
|
|
8743
8879
|
windowData.map((row, windowIndex) => {
|
|
8744
8880
|
const absoluteIndex = isTableVirtual ? startIndex + windowIndex : windowIndex;
|
|
8745
|
-
return /* @__PURE__ */
|
|
8881
|
+
return /* @__PURE__ */ jsx61(
|
|
8746
8882
|
"tr",
|
|
8747
8883
|
{
|
|
8748
8884
|
"aria-rowindex": isTableVirtual ? absoluteIndex + 2 : void 0,
|
|
@@ -8759,7 +8895,7 @@ function ITTable({
|
|
|
8759
8895
|
const truncateTitle = col.truncate && (typeof rawValue === "string" || typeof rawValue === "number") ? String(rawValue) : void 0;
|
|
8760
8896
|
const pin = pinnedMeta[col.key];
|
|
8761
8897
|
const isPinned = pin != null;
|
|
8762
|
-
return /* @__PURE__ */
|
|
8898
|
+
return /* @__PURE__ */ jsx61(
|
|
8763
8899
|
"td",
|
|
8764
8900
|
{
|
|
8765
8901
|
className: clsx44(
|
|
@@ -8774,7 +8910,7 @@ function ITTable({
|
|
|
8774
8910
|
...isPinned ? pin.side === "left" ? { left: pin.offset } : { right: pin.offset } : {}
|
|
8775
8911
|
} : void 0,
|
|
8776
8912
|
title: truncateTitle,
|
|
8777
|
-
children: col.type === "actions" ? /* @__PURE__ */
|
|
8913
|
+
children: col.type === "actions" ? /* @__PURE__ */ jsx61("div", { className: tableActionsCell, children: renderCellContent(col, row) }) : /* @__PURE__ */ jsx61("div", { className: clsx44(tableCellText, col.truncate && "truncate"), children: renderCellContent(col, row) })
|
|
8778
8914
|
},
|
|
8779
8915
|
`${absoluteIndex}-${col.key}`
|
|
8780
8916
|
);
|
|
@@ -8783,17 +8919,17 @@ function ITTable({
|
|
|
8783
8919
|
absoluteIndex
|
|
8784
8920
|
);
|
|
8785
8921
|
}),
|
|
8786
|
-
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */
|
|
8787
|
-
] }) : /* @__PURE__ */
|
|
8788
|
-
/* @__PURE__ */
|
|
8789
|
-
/* @__PURE__ */
|
|
8922
|
+
isTableVirtual && bottomSpacerHeight > 0 && /* @__PURE__ */ jsx61("tr", { "aria-hidden": "true", style: { height: bottomSpacerHeight }, children: /* @__PURE__ */ jsx61("td", { colSpan: columnCount, style: { padding: 0, border: 0 } }) })
|
|
8923
|
+
] }) : /* @__PURE__ */ jsx61("tr", { children: /* @__PURE__ */ jsx61("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ jsxs47("div", { className: tableEmptyContent, children: [
|
|
8924
|
+
/* @__PURE__ */ jsx61(ITText, { as: "span", className: "text-lg", children: "No se encontraron resultados" }),
|
|
8925
|
+
/* @__PURE__ */ jsx61(ITText, { as: "span", className: "text-sm mt-1", children: "Intenta ajustar los filtros" })
|
|
8790
8926
|
] }) }) }) })
|
|
8791
8927
|
]
|
|
8792
8928
|
}
|
|
8793
8929
|
)
|
|
8794
8930
|
}
|
|
8795
8931
|
),
|
|
8796
|
-
/* @__PURE__ */
|
|
8932
|
+
/* @__PURE__ */ jsx61("div", { className: "rounded-b-xl px-6 py-4", style: { backgroundColor: "var(--color-table-rowBg, #ffffff)" }, children: /* @__PURE__ */ jsx61(
|
|
8797
8933
|
ITPagination,
|
|
8798
8934
|
{
|
|
8799
8935
|
currentPage,
|
|
@@ -8811,7 +8947,7 @@ function ITTable({
|
|
|
8811
8947
|
|
|
8812
8948
|
// src/components/atoms/textarea/textarea.tsx
|
|
8813
8949
|
import clsx45 from "clsx";
|
|
8814
|
-
import { jsx as
|
|
8950
|
+
import { jsx as jsx62, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
8815
8951
|
var resizeMap = {
|
|
8816
8952
|
none: "resize-none",
|
|
8817
8953
|
vertical: "resize-y",
|
|
@@ -8831,9 +8967,9 @@ function ITTextarea({
|
|
|
8831
8967
|
maxLength,
|
|
8832
8968
|
resize = "vertical"
|
|
8833
8969
|
}) {
|
|
8834
|
-
return /* @__PURE__ */
|
|
8835
|
-
label && /* @__PURE__ */
|
|
8836
|
-
/* @__PURE__ */
|
|
8970
|
+
return /* @__PURE__ */ jsxs48("div", { className: clsx45("flex flex-col gap-1.5", className), children: [
|
|
8971
|
+
label && /* @__PURE__ */ jsx62(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
8972
|
+
/* @__PURE__ */ jsx62(
|
|
8837
8973
|
"textarea",
|
|
8838
8974
|
{
|
|
8839
8975
|
id: name,
|
|
@@ -8853,14 +8989,14 @@ function ITTextarea({
|
|
|
8853
8989
|
)
|
|
8854
8990
|
}
|
|
8855
8991
|
),
|
|
8856
|
-
error && /* @__PURE__ */
|
|
8992
|
+
error && /* @__PURE__ */ jsx62(ITText, { as: "span", className: inputError, children: error })
|
|
8857
8993
|
] });
|
|
8858
8994
|
}
|
|
8859
8995
|
|
|
8860
8996
|
// src/components/molecules/tabs/tabs.tsx
|
|
8861
|
-
import { useState as
|
|
8997
|
+
import { useState as useState31 } from "react";
|
|
8862
8998
|
import { clsx as clsx46 } from "clsx";
|
|
8863
|
-
import { jsx as
|
|
8999
|
+
import { jsx as jsx63, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
8864
9000
|
var ITTabs = ({
|
|
8865
9001
|
items,
|
|
8866
9002
|
defaultActiveId,
|
|
@@ -8869,21 +9005,21 @@ var ITTabs = ({
|
|
|
8869
9005
|
className = "",
|
|
8870
9006
|
containerClassName = ""
|
|
8871
9007
|
}) => {
|
|
8872
|
-
const [activeId, setActiveId] =
|
|
9008
|
+
const [activeId, setActiveId] = useState31(defaultActiveId || items[0]?.id);
|
|
8873
9009
|
const handleTabClick = (id, disabled) => {
|
|
8874
9010
|
if (disabled) return;
|
|
8875
9011
|
setActiveId(id);
|
|
8876
9012
|
if (onChange) onChange(id);
|
|
8877
9013
|
};
|
|
8878
9014
|
const activeContent = items.find((item) => item.id === activeId)?.content;
|
|
8879
|
-
return /* @__PURE__ */
|
|
8880
|
-
/* @__PURE__ */
|
|
9015
|
+
return /* @__PURE__ */ jsxs49("div", { className: clsx46("w-full", containerClassName), children: [
|
|
9016
|
+
/* @__PURE__ */ jsx63("div", { className: clsx46(
|
|
8881
9017
|
"flex border-secondary-200 mb-4",
|
|
8882
9018
|
variant === "line" ? "border-b" : "gap-2 p-1 bg-secondary-100 rounded-lg w-fit",
|
|
8883
9019
|
className
|
|
8884
9020
|
), children: items.map((item) => {
|
|
8885
9021
|
const isActive = item.id === activeId;
|
|
8886
|
-
return /* @__PURE__ */
|
|
9022
|
+
return /* @__PURE__ */ jsxs49(
|
|
8887
9023
|
"button",
|
|
8888
9024
|
{
|
|
8889
9025
|
onClick: () => handleTabClick(item.id, item.disabled),
|
|
@@ -8903,21 +9039,21 @@ var ITTabs = ({
|
|
|
8903
9039
|
item.disabled && "opacity-50 cursor-not-allowed"
|
|
8904
9040
|
),
|
|
8905
9041
|
children: [
|
|
8906
|
-
item.icon && /* @__PURE__ */
|
|
8907
|
-
/* @__PURE__ */
|
|
9042
|
+
item.icon && /* @__PURE__ */ jsx63("span", { className: "w-4 h-4", children: item.icon }),
|
|
9043
|
+
/* @__PURE__ */ jsx63(ITText, { as: "span", children: item.label })
|
|
8908
9044
|
]
|
|
8909
9045
|
},
|
|
8910
9046
|
item.id
|
|
8911
9047
|
);
|
|
8912
9048
|
}) }),
|
|
8913
|
-
/* @__PURE__ */
|
|
9049
|
+
/* @__PURE__ */ jsx63("div", { className: "tab-content animate-fadeIn", children: activeContent })
|
|
8914
9050
|
] });
|
|
8915
9051
|
};
|
|
8916
9052
|
var tabs_default = ITTabs;
|
|
8917
9053
|
|
|
8918
9054
|
// src/components/organisms/triple-filter/tripleFilter.tsx
|
|
8919
9055
|
import clsx47 from "clsx";
|
|
8920
|
-
import { jsx as
|
|
9056
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
8921
9057
|
var colorMap2 = {
|
|
8922
9058
|
primary: "text-primary-600",
|
|
8923
9059
|
secondary: "text-secondary-600",
|
|
@@ -8936,11 +9072,11 @@ var ITTripleFilter = ({
|
|
|
8936
9072
|
color = "primary",
|
|
8937
9073
|
className
|
|
8938
9074
|
}) => {
|
|
8939
|
-
return /* @__PURE__ */
|
|
9075
|
+
return /* @__PURE__ */ jsx64(
|
|
8940
9076
|
"div",
|
|
8941
9077
|
{
|
|
8942
9078
|
className: clsx47("flex bg-slate-100 p-1 rounded-xl gap-1 w-fit", className),
|
|
8943
|
-
children: options.map((option) => /* @__PURE__ */
|
|
9079
|
+
children: options.map((option) => /* @__PURE__ */ jsx64(
|
|
8944
9080
|
"button",
|
|
8945
9081
|
{
|
|
8946
9082
|
onClick: () => onChange(option.value),
|
|
@@ -8948,7 +9084,7 @@ var ITTripleFilter = ({
|
|
|
8948
9084
|
"px-4 py-1.5 rounded-lg text-[10px] font-bold uppercase tracking-wider transition-all duration-200 whitespace-nowrap",
|
|
8949
9085
|
value === option.value ? clsx47("bg-white shadow-sm", colorMap2[color]) : "text-slate-400 hover:text-slate-600"
|
|
8950
9086
|
),
|
|
8951
|
-
children: /* @__PURE__ */
|
|
9087
|
+
children: /* @__PURE__ */ jsx64(ITText, { as: "span", children: option.label })
|
|
8952
9088
|
},
|
|
8953
9089
|
String(option.value)
|
|
8954
9090
|
))
|
|
@@ -8969,9 +9105,9 @@ var positionStyles = {
|
|
|
8969
9105
|
|
|
8970
9106
|
// src/components/organisms/toast/toast.tsx
|
|
8971
9107
|
import clsx48 from "clsx";
|
|
8972
|
-
import { useEffect as useEffect15, useState as
|
|
9108
|
+
import { useEffect as useEffect15, useState as useState32 } from "react";
|
|
8973
9109
|
import { FaTimesCircle as FaTimesCircle2, FaCheckCircle as FaCheckCircle2, FaExclamationTriangle as FaExclamationTriangle3, FaInfoCircle as FaInfoCircle2, FaTimes as FaTimes10 } from "react-icons/fa";
|
|
8974
|
-
import { jsx as
|
|
9110
|
+
import { jsx as jsx65, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
8975
9111
|
function ITToast({
|
|
8976
9112
|
message,
|
|
8977
9113
|
type = "info",
|
|
@@ -8979,7 +9115,7 @@ function ITToast({
|
|
|
8979
9115
|
position = "top-right",
|
|
8980
9116
|
onClose
|
|
8981
9117
|
}) {
|
|
8982
|
-
const [isVisible, setIsVisible] =
|
|
9118
|
+
const [isVisible, setIsVisible] = useState32(true);
|
|
8983
9119
|
useEffect15(() => {
|
|
8984
9120
|
const timer = setTimeout(() => {
|
|
8985
9121
|
setIsVisible(false);
|
|
@@ -9000,18 +9136,18 @@ function ITToast({
|
|
|
9000
9136
|
const TypeIcon = () => {
|
|
9001
9137
|
switch (type) {
|
|
9002
9138
|
case "success":
|
|
9003
|
-
return /* @__PURE__ */
|
|
9139
|
+
return /* @__PURE__ */ jsx65(FaCheckCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
9004
9140
|
case "error":
|
|
9005
9141
|
case "danger":
|
|
9006
|
-
return /* @__PURE__ */
|
|
9142
|
+
return /* @__PURE__ */ jsx65(FaTimesCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
9007
9143
|
case "warning":
|
|
9008
|
-
return /* @__PURE__ */
|
|
9144
|
+
return /* @__PURE__ */ jsx65(FaExclamationTriangle3, { className: "w-5 h-5 flex-shrink-0" });
|
|
9009
9145
|
case "info":
|
|
9010
9146
|
default:
|
|
9011
|
-
return /* @__PURE__ */
|
|
9147
|
+
return /* @__PURE__ */ jsx65(FaInfoCircle2, { className: "w-5 h-5 flex-shrink-0" });
|
|
9012
9148
|
}
|
|
9013
9149
|
};
|
|
9014
|
-
return /* @__PURE__ */
|
|
9150
|
+
return /* @__PURE__ */ jsxs50(
|
|
9015
9151
|
"div",
|
|
9016
9152
|
{
|
|
9017
9153
|
className: clsx48(
|
|
@@ -9027,17 +9163,17 @@ function ITToast({
|
|
|
9027
9163
|
style: { backgroundColor },
|
|
9028
9164
|
role: "alert",
|
|
9029
9165
|
children: [
|
|
9030
|
-
/* @__PURE__ */
|
|
9031
|
-
/* @__PURE__ */
|
|
9032
|
-
/* @__PURE__ */
|
|
9166
|
+
/* @__PURE__ */ jsxs50("div", { className: "flex items-center gap-3", children: [
|
|
9167
|
+
/* @__PURE__ */ jsx65(TypeIcon, {}),
|
|
9168
|
+
/* @__PURE__ */ jsx65(ITText, { as: "span", className: "font-medium text-sm sm:text-base leading-snug", children: message })
|
|
9033
9169
|
] }),
|
|
9034
|
-
/* @__PURE__ */
|
|
9170
|
+
/* @__PURE__ */ jsx65(
|
|
9035
9171
|
"button",
|
|
9036
9172
|
{
|
|
9037
9173
|
onClick: handleClose,
|
|
9038
9174
|
className: "p-1.5 rounded-full hover:bg-black/15 transition-colors focus:outline-none focus:ring-2 focus:ring-white/50",
|
|
9039
9175
|
"aria-label": "Close notification",
|
|
9040
|
-
children: /* @__PURE__ */
|
|
9176
|
+
children: /* @__PURE__ */ jsx65(FaTimes10, { className: "w-4 h-4" })
|
|
9041
9177
|
}
|
|
9042
9178
|
)
|
|
9043
9179
|
]
|
|
@@ -9050,7 +9186,7 @@ import {
|
|
|
9050
9186
|
useCallback as useCallback9,
|
|
9051
9187
|
useEffect as useEffect16,
|
|
9052
9188
|
useRef as useRef21,
|
|
9053
|
-
useState as
|
|
9189
|
+
useState as useState34
|
|
9054
9190
|
} from "react";
|
|
9055
9191
|
import clsx50 from "clsx";
|
|
9056
9192
|
import {
|
|
@@ -9075,9 +9211,9 @@ var toolbarActions = [
|
|
|
9075
9211
|
];
|
|
9076
9212
|
|
|
9077
9213
|
// src/components/atoms/tooltip/tooltip.tsx
|
|
9078
|
-
import { useState as
|
|
9214
|
+
import { useState as useState33 } from "react";
|
|
9079
9215
|
import clsx49 from "clsx";
|
|
9080
|
-
import { jsx as
|
|
9216
|
+
import { jsx as jsx66, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
9081
9217
|
var positionClasses2 = {
|
|
9082
9218
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
9083
9219
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -9097,7 +9233,7 @@ function ITTooltip({
|
|
|
9097
9233
|
delay = 200,
|
|
9098
9234
|
className
|
|
9099
9235
|
}) {
|
|
9100
|
-
const [visible, setVisible] =
|
|
9236
|
+
const [visible, setVisible] = useState33(false);
|
|
9101
9237
|
let timeout;
|
|
9102
9238
|
const handleMouseEnter = () => {
|
|
9103
9239
|
timeout = setTimeout(() => setVisible(true), delay);
|
|
@@ -9106,7 +9242,7 @@ function ITTooltip({
|
|
|
9106
9242
|
clearTimeout(timeout);
|
|
9107
9243
|
setVisible(false);
|
|
9108
9244
|
};
|
|
9109
|
-
return /* @__PURE__ */
|
|
9245
|
+
return /* @__PURE__ */ jsxs51(
|
|
9110
9246
|
"div",
|
|
9111
9247
|
{
|
|
9112
9248
|
className: clsx49("relative inline-flex", className),
|
|
@@ -9114,9 +9250,9 @@ function ITTooltip({
|
|
|
9114
9250
|
onMouseLeave: handleMouseLeave,
|
|
9115
9251
|
children: [
|
|
9116
9252
|
children,
|
|
9117
|
-
visible && /* @__PURE__ */
|
|
9118
|
-
/* @__PURE__ */
|
|
9119
|
-
/* @__PURE__ */
|
|
9253
|
+
visible && /* @__PURE__ */ jsxs51("div", { className: clsx49("absolute z-[70] pointer-events-none", positionClasses2[position]), children: [
|
|
9254
|
+
/* @__PURE__ */ jsx66("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__ */ jsx66(ITText, { as: "span", children: content }) }),
|
|
9255
|
+
/* @__PURE__ */ jsx66("div", { className: clsx49("absolute", arrowClasses[position]) })
|
|
9120
9256
|
] })
|
|
9121
9257
|
]
|
|
9122
9258
|
}
|
|
@@ -9124,16 +9260,16 @@ function ITTooltip({
|
|
|
9124
9260
|
}
|
|
9125
9261
|
|
|
9126
9262
|
// src/components/molecules/wysiwyg/wysiwyg.tsx
|
|
9127
|
-
import { jsx as
|
|
9263
|
+
import { jsx as jsx67, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
9128
9264
|
var INLINE_TAGS = /* @__PURE__ */ new Set(["STRONG", "B", "EM", "I", "U", "MARK"]);
|
|
9129
9265
|
var ACTION_META = {
|
|
9130
|
-
bold: { label: "Negrita", icon: /* @__PURE__ */
|
|
9131
|
-
italic: { label: "It\xE1lica", icon: /* @__PURE__ */
|
|
9132
|
-
underline: { label: "Subrayado", icon: /* @__PURE__ */
|
|
9133
|
-
highlight: { label: "Marcador", icon: /* @__PURE__ */
|
|
9134
|
-
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */
|
|
9135
|
-
ol: { label: "Lista numerada", icon: /* @__PURE__ */
|
|
9136
|
-
clear: { label: "Limpiar formato", icon: /* @__PURE__ */
|
|
9266
|
+
bold: { label: "Negrita", icon: /* @__PURE__ */ jsx67(FaBold, {}) },
|
|
9267
|
+
italic: { label: "It\xE1lica", icon: /* @__PURE__ */ jsx67(FaItalic, {}) },
|
|
9268
|
+
underline: { label: "Subrayado", icon: /* @__PURE__ */ jsx67(FaUnderline, {}) },
|
|
9269
|
+
highlight: { label: "Marcador", icon: /* @__PURE__ */ jsx67(FaHighlighter, {}) },
|
|
9270
|
+
ul: { label: "Lista con vi\xF1etas", icon: /* @__PURE__ */ jsx67(FaListUl, {}) },
|
|
9271
|
+
ol: { label: "Lista numerada", icon: /* @__PURE__ */ jsx67(FaListOl, {}) },
|
|
9272
|
+
clear: { label: "Limpiar formato", icon: /* @__PURE__ */ jsx67(FaEraser, {}) }
|
|
9137
9273
|
};
|
|
9138
9274
|
function ITWysiwyg({
|
|
9139
9275
|
value,
|
|
@@ -9152,7 +9288,7 @@ function ITWysiwyg({
|
|
|
9152
9288
|
}) {
|
|
9153
9289
|
const editorRef = useRef21(null);
|
|
9154
9290
|
const focusedRef = useRef21(false);
|
|
9155
|
-
const [active, setActive] =
|
|
9291
|
+
const [active, setActive] = useState34({});
|
|
9156
9292
|
const isLocked = disabled || readOnly;
|
|
9157
9293
|
const sizeConfig = inputSizeTokens[size] ?? inputSizeTokens.md;
|
|
9158
9294
|
const findAncestor = useCallback9(
|
|
@@ -9549,7 +9685,7 @@ function ITWysiwyg({
|
|
|
9549
9685
|
}) => {
|
|
9550
9686
|
const meta = ACTION_META[action];
|
|
9551
9687
|
const isActive = !!active[action];
|
|
9552
|
-
return /* @__PURE__ */
|
|
9688
|
+
return /* @__PURE__ */ jsx67(ITTooltip, { content: meta.label, children: /* @__PURE__ */ jsx67(
|
|
9553
9689
|
"button",
|
|
9554
9690
|
{
|
|
9555
9691
|
type: "button",
|
|
@@ -9569,9 +9705,9 @@ function ITWysiwyg({
|
|
|
9569
9705
|
}
|
|
9570
9706
|
) });
|
|
9571
9707
|
};
|
|
9572
|
-
return /* @__PURE__ */
|
|
9573
|
-
label && /* @__PURE__ */
|
|
9574
|
-
/* @__PURE__ */
|
|
9708
|
+
return /* @__PURE__ */ jsxs52("div", { className: inputWrapper(className), children: [
|
|
9709
|
+
label && /* @__PURE__ */ jsx67(ITText, { as: "label", className: inputLabel(!!error), htmlFor: name, children: label }),
|
|
9710
|
+
/* @__PURE__ */ jsxs52(
|
|
9575
9711
|
"div",
|
|
9576
9712
|
{
|
|
9577
9713
|
className: clsx50(
|
|
@@ -9580,20 +9716,20 @@ function ITWysiwyg({
|
|
|
9580
9716
|
isLocked && "opacity-50 cursor-not-allowed bg-secondary-100 dark:bg-slate-800"
|
|
9581
9717
|
),
|
|
9582
9718
|
children: [
|
|
9583
|
-
/* @__PURE__ */
|
|
9719
|
+
/* @__PURE__ */ jsx67(
|
|
9584
9720
|
"div",
|
|
9585
9721
|
{
|
|
9586
9722
|
className: clsx50(
|
|
9587
9723
|
"flex flex-wrap items-center gap-0.5 px-1.5 py-1 border-b border-secondary-200 bg-secondary-50 dark:bg-slate-800",
|
|
9588
9724
|
isLocked && "bg-secondary-100 dark:bg-slate-900"
|
|
9589
9725
|
),
|
|
9590
|
-
children: toolbar.map((action, i) => /* @__PURE__ */
|
|
9591
|
-
i > 0 && (action === "ul" || action === "ol" || action === "clear") && /* @__PURE__ */
|
|
9592
|
-
/* @__PURE__ */
|
|
9726
|
+
children: toolbar.map((action, i) => /* @__PURE__ */ jsxs52("span", { className: "flex items-center", children: [
|
|
9727
|
+
i > 0 && (action === "ul" || action === "ol" || action === "clear") && /* @__PURE__ */ jsx67("span", { className: "mx-1 h-4 w-px bg-secondary-200 dark:bg-slate-600" }),
|
|
9728
|
+
/* @__PURE__ */ jsx67(ToolbarButton, { action })
|
|
9593
9729
|
] }, action))
|
|
9594
9730
|
}
|
|
9595
9731
|
),
|
|
9596
|
-
/* @__PURE__ */
|
|
9732
|
+
/* @__PURE__ */ jsx67(
|
|
9597
9733
|
"div",
|
|
9598
9734
|
{
|
|
9599
9735
|
id: name,
|
|
@@ -9627,12 +9763,12 @@ function ITWysiwyg({
|
|
|
9627
9763
|
]
|
|
9628
9764
|
}
|
|
9629
9765
|
),
|
|
9630
|
-
error && /* @__PURE__ */
|
|
9766
|
+
error && /* @__PURE__ */ jsx67(ITText, { as: "span", className: inputError, children: error })
|
|
9631
9767
|
] });
|
|
9632
9768
|
}
|
|
9633
9769
|
|
|
9634
9770
|
// src/components/organisms/dropfile/dropfile.tsx
|
|
9635
|
-
import { useState as
|
|
9771
|
+
import { useState as useState35, useEffect as useEffect17 } from "react";
|
|
9636
9772
|
import { useDropzone } from "react-dropzone";
|
|
9637
9773
|
import clsx51 from "clsx";
|
|
9638
9774
|
|
|
@@ -9662,7 +9798,7 @@ var UploadStatus = /* @__PURE__ */ ((UploadStatus2) => {
|
|
|
9662
9798
|
})(UploadStatus || {});
|
|
9663
9799
|
|
|
9664
9800
|
// src/components/organisms/dropfile/dropfile.tsx
|
|
9665
|
-
import { Fragment as Fragment10, jsx as
|
|
9801
|
+
import { Fragment as Fragment10, jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9666
9802
|
var ITDropfile = ({
|
|
9667
9803
|
onFileSelect,
|
|
9668
9804
|
onCancel,
|
|
@@ -9678,12 +9814,12 @@ var ITDropfile = ({
|
|
|
9678
9814
|
buttonLabel = "Subir archivo",
|
|
9679
9815
|
modalTitle
|
|
9680
9816
|
}) => {
|
|
9681
|
-
const [isModalOpen, setIsModalOpen] =
|
|
9682
|
-
const [selectedFile, setSelectedFile] =
|
|
9683
|
-
const [fileType, setFileType] =
|
|
9684
|
-
const [imagePreview, setImagePreview] =
|
|
9685
|
-
const [isConfirmed, setIsConfirmed] =
|
|
9686
|
-
const [internalUploadStatus, setInternalUploadStatus] =
|
|
9817
|
+
const [isModalOpen, setIsModalOpen] = useState35(false);
|
|
9818
|
+
const [selectedFile, setSelectedFile] = useState35(null);
|
|
9819
|
+
const [fileType, setFileType] = useState35(null);
|
|
9820
|
+
const [imagePreview, setImagePreview] = useState35(initialPreviewUrl || null);
|
|
9821
|
+
const [isConfirmed, setIsConfirmed] = useState35(false);
|
|
9822
|
+
const [internalUploadStatus, setInternalUploadStatus] = useState35(
|
|
9687
9823
|
initialPreviewUrl ? "subido" /* UPLOADED */ : "pendiente" /* PENDING */
|
|
9688
9824
|
);
|
|
9689
9825
|
useEffect17(() => {
|
|
@@ -9801,9 +9937,9 @@ var ITDropfile = ({
|
|
|
9801
9937
|
}
|
|
9802
9938
|
};
|
|
9803
9939
|
const { label, color, dotColor } = config2[status];
|
|
9804
|
-
return /* @__PURE__ */
|
|
9805
|
-
/* @__PURE__ */
|
|
9806
|
-
/* @__PURE__ */
|
|
9940
|
+
return /* @__PURE__ */ jsxs53("div", { className: `inline-flex items-center gap-2 px-2.5 py-1 rounded-full border ${color}`, children: [
|
|
9941
|
+
/* @__PURE__ */ jsx68("div", { className: `w-2 h-2 rounded-full ${dotColor}` }),
|
|
9942
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", className: "text-xs font-medium flex items-center gap-1.5", children: label })
|
|
9807
9943
|
] });
|
|
9808
9944
|
};
|
|
9809
9945
|
const onDrop = (acceptedFiles) => {
|
|
@@ -9894,18 +10030,18 @@ var ITDropfile = ({
|
|
|
9894
10030
|
return () => clearTimeout(timeout);
|
|
9895
10031
|
}
|
|
9896
10032
|
}, [view, isConfirmed, uploadStatus, externalStatus, onStatusChange]);
|
|
9897
|
-
const headerRow = /* @__PURE__ */
|
|
9898
|
-
/* @__PURE__ */
|
|
9899
|
-
/* @__PURE__ */
|
|
9900
|
-
/* @__PURE__ */
|
|
10033
|
+
const headerRow = /* @__PURE__ */ jsxs53("div", { className: "flex items-center justify-between mb-2", children: [
|
|
10034
|
+
/* @__PURE__ */ jsxs53("label", { className: "block text-sm font-semibold text-secondary-700", children: [
|
|
10035
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", children: "Subir archivo " }),
|
|
10036
|
+
/* @__PURE__ */ jsxs53(ITText, { as: "span", className: "text-secondary-400 font-normal text-xs", children: [
|
|
9901
10037
|
"(",
|
|
9902
10038
|
getFileExtensions(),
|
|
9903
10039
|
")"
|
|
9904
10040
|
] })
|
|
9905
10041
|
] }),
|
|
9906
|
-
showStatusBadge && selectedFile && /* @__PURE__ */
|
|
10042
|
+
showStatusBadge && selectedFile && /* @__PURE__ */ jsx68(StatusBadge, { status: uploadStatus })
|
|
9907
10043
|
] });
|
|
9908
|
-
const dropZoneOrPreview = /* @__PURE__ */
|
|
10044
|
+
const dropZoneOrPreview = /* @__PURE__ */ jsx68(Fragment10, { children: !selectedFile && !imagePreview ? /* @__PURE__ */ jsxs53(
|
|
9909
10045
|
"div",
|
|
9910
10046
|
{
|
|
9911
10047
|
...getRootProps(),
|
|
@@ -9915,41 +10051,41 @@ var ITDropfile = ({
|
|
|
9915
10051
|
${isDragActive ? "border-primary-500 bg-primary-50 scale-[1.01]" : "border-secondary-300 bg-white hover:border-primary-400 hover:bg-secondary-50"}
|
|
9916
10052
|
`,
|
|
9917
10053
|
children: [
|
|
9918
|
-
/* @__PURE__ */
|
|
9919
|
-
/* @__PURE__ */
|
|
10054
|
+
/* @__PURE__ */ jsx68("input", { ...getInputProps() }),
|
|
10055
|
+
/* @__PURE__ */ jsx68("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__ */ jsx68(
|
|
9920
10056
|
"svg",
|
|
9921
10057
|
{
|
|
9922
10058
|
className: `w-6 h-6 transition-colors duration-300 ${isDragActive ? "text-primary-600" : "text-secondary-400 group-hover:text-primary-500"}`,
|
|
9923
10059
|
fill: "none",
|
|
9924
10060
|
viewBox: "0 0 24 24",
|
|
9925
10061
|
stroke: "currentColor",
|
|
9926
|
-
children: /* @__PURE__ */
|
|
10062
|
+
children: /* @__PURE__ */ jsx68("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" })
|
|
9927
10063
|
}
|
|
9928
10064
|
) }),
|
|
9929
|
-
/* @__PURE__ */
|
|
10065
|
+
/* @__PURE__ */ jsx68("div", { className: "text-center space-y-1", children: /* @__PURE__ */ jsx68(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" }) })
|
|
9930
10066
|
]
|
|
9931
10067
|
}
|
|
9932
|
-
) : /* @__PURE__ */
|
|
9933
|
-
/* @__PURE__ */
|
|
9934
|
-
/* @__PURE__ */
|
|
9935
|
-
/* @__PURE__ */
|
|
9936
|
-
/* @__PURE__ */
|
|
9937
|
-
/* @__PURE__ */
|
|
10068
|
+
) : /* @__PURE__ */ jsxs53("div", { className: "w-full bg-white border border-secondary-200 rounded-xl shadow-sm overflow-hidden animate-fade-in", children: [
|
|
10069
|
+
/* @__PURE__ */ jsx68("div", { className: "flex items-center justify-between p-3 bg-secondary-50 border-b border-secondary-100", children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
10070
|
+
/* @__PURE__ */ jsx68("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__ */ jsx68("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx68("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__ */ jsx68("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx68("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" }) }) }),
|
|
10071
|
+
/* @__PURE__ */ jsxs53("div", { className: "min-w-0", children: [
|
|
10072
|
+
/* @__PURE__ */ jsx68(ITText, { as: "p", className: "text-xs font-medium text-secondary-900 truncate", title: selectedFile?.name || "Imagen cargada", children: selectedFile?.name || "Imagen cargada" }),
|
|
10073
|
+
/* @__PURE__ */ jsx68(ITText, { as: "p", className: "text-[10px] text-secondary-500", children: selectedFile ? (selectedFile.size / 1024 / 1024).toFixed(2) + " MB" : "" })
|
|
9938
10074
|
] })
|
|
9939
10075
|
] }) }),
|
|
9940
|
-
/* @__PURE__ */
|
|
10076
|
+
/* @__PURE__ */ jsx68("div", { className: clsx51("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__ */ jsx68(
|
|
9941
10077
|
"img",
|
|
9942
10078
|
{
|
|
9943
10079
|
src: imagePreview,
|
|
9944
10080
|
alt: "Vista previa",
|
|
9945
10081
|
className: "w-full h-full object-contain max-h-[200px]"
|
|
9946
10082
|
}
|
|
9947
|
-
) : /* @__PURE__ */
|
|
9948
|
-
/* @__PURE__ */
|
|
9949
|
-
/* @__PURE__ */
|
|
10083
|
+
) : /* @__PURE__ */ jsxs53("div", { className: "py-8 flex flex-col items-center text-secondary-400", children: [
|
|
10084
|
+
/* @__PURE__ */ jsx68("svg", { className: "w-10 h-10 mb-2 opacity-50", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx68("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" }) }),
|
|
10085
|
+
/* @__PURE__ */ jsx68(ITText, { as: "span", className: "text-xs", children: "Sin vista previa" })
|
|
9950
10086
|
] }) }),
|
|
9951
|
-
/* @__PURE__ */
|
|
9952
|
-
/* @__PURE__ */
|
|
10087
|
+
/* @__PURE__ */ jsx68("div", { className: "px-3 py-2 bg-white border-t border-secondary-100 flex justify-end gap-2", children: !isConfirmed ? /* @__PURE__ */ jsxs53(Fragment10, { children: [
|
|
10088
|
+
/* @__PURE__ */ jsx68(
|
|
9953
10089
|
ITButton,
|
|
9954
10090
|
{
|
|
9955
10091
|
type: "button",
|
|
@@ -9957,10 +10093,10 @@ var ITDropfile = ({
|
|
|
9957
10093
|
color: "secondary",
|
|
9958
10094
|
size: "sm",
|
|
9959
10095
|
onClick: handleCancel,
|
|
9960
|
-
children: /* @__PURE__ */
|
|
10096
|
+
children: /* @__PURE__ */ jsx68(ITText, { children: "Cancelar" })
|
|
9961
10097
|
}
|
|
9962
10098
|
),
|
|
9963
|
-
/* @__PURE__ */
|
|
10099
|
+
/* @__PURE__ */ jsx68(
|
|
9964
10100
|
ITButton,
|
|
9965
10101
|
{
|
|
9966
10102
|
type: "button",
|
|
@@ -9968,13 +10104,13 @@ var ITDropfile = ({
|
|
|
9968
10104
|
color: "primary",
|
|
9969
10105
|
size: "sm",
|
|
9970
10106
|
onClick: handleConfirm,
|
|
9971
|
-
children: /* @__PURE__ */
|
|
9972
|
-
/* @__PURE__ */
|
|
9973
|
-
/* @__PURE__ */
|
|
10107
|
+
children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
10108
|
+
/* @__PURE__ */ jsx68(ITText, { children: "Confirmar" }),
|
|
10109
|
+
/* @__PURE__ */ jsx68("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx68("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) })
|
|
9974
10110
|
] })
|
|
9975
10111
|
}
|
|
9976
10112
|
)
|
|
9977
|
-
] }) : /* @__PURE__ */
|
|
10113
|
+
] }) : /* @__PURE__ */ jsxs53(
|
|
9978
10114
|
ITButton,
|
|
9979
10115
|
{
|
|
9980
10116
|
type: "button",
|
|
@@ -9983,12 +10119,12 @@ var ITDropfile = ({
|
|
|
9983
10119
|
size: "sm",
|
|
9984
10120
|
onClick: handleDelete,
|
|
9985
10121
|
children: [
|
|
9986
|
-
/* @__PURE__ */
|
|
9987
|
-
/* @__PURE__ */
|
|
10122
|
+
/* @__PURE__ */ jsx68("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx68("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" }) }),
|
|
10123
|
+
/* @__PURE__ */ jsx68(ITText, { children: "Eliminar" })
|
|
9988
10124
|
]
|
|
9989
10125
|
}
|
|
9990
10126
|
) }),
|
|
9991
|
-
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */
|
|
10127
|
+
uploadStatus === "subiendo" /* UPLOADING */ && /* @__PURE__ */ jsx68("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsx68("div", { className: "w-full bg-secondary-200 rounded-full h-1.5", children: /* @__PURE__ */ jsx68(
|
|
9992
10128
|
"div",
|
|
9993
10129
|
{
|
|
9994
10130
|
className: "bg-primary-600 h-1.5 rounded-full transition-all duration-1000 ease-out",
|
|
@@ -10001,8 +10137,8 @@ var ITDropfile = ({
|
|
|
10001
10137
|
] }) });
|
|
10002
10138
|
if (view === "button") {
|
|
10003
10139
|
const hasFile = Boolean(selectedFile || imagePreview);
|
|
10004
|
-
return /* @__PURE__ */
|
|
10005
|
-
/* @__PURE__ */
|
|
10140
|
+
return /* @__PURE__ */ jsxs53("div", { className: clsx51("inline-block", containerClassName), children: [
|
|
10141
|
+
/* @__PURE__ */ jsx68(
|
|
10006
10142
|
ITButton,
|
|
10007
10143
|
{
|
|
10008
10144
|
type: "button",
|
|
@@ -10010,20 +10146,20 @@ var ITDropfile = ({
|
|
|
10010
10146
|
color: hasFile ? "primary" : "secondary",
|
|
10011
10147
|
size: "sm",
|
|
10012
10148
|
onClick: () => setIsModalOpen(true),
|
|
10013
|
-
children: /* @__PURE__ */
|
|
10014
|
-
/* @__PURE__ */
|
|
10015
|
-
/* @__PURE__ */
|
|
10016
|
-
showStatusBadge && hasFile && /* @__PURE__ */
|
|
10149
|
+
children: /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2 max-w-[220px]", children: [
|
|
10150
|
+
/* @__PURE__ */ jsx68("svg", { className: "w-4 h-4 flex-shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx68("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" }) }),
|
|
10151
|
+
/* @__PURE__ */ jsx68(ITText, { className: "truncate", children: selectedFile?.name || (hasFile ? "Archivo cargado" : buttonLabel) }),
|
|
10152
|
+
showStatusBadge && hasFile && /* @__PURE__ */ jsx68(StatusBadge, { status: uploadStatus })
|
|
10017
10153
|
] })
|
|
10018
10154
|
}
|
|
10019
10155
|
),
|
|
10020
|
-
/* @__PURE__ */
|
|
10156
|
+
/* @__PURE__ */ jsx68(ITDialog, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), title: modalTitle ?? buttonLabel, children: /* @__PURE__ */ jsxs53("div", { className: "w-full transition-all duration-300", children: [
|
|
10021
10157
|
headerRow,
|
|
10022
10158
|
dropZoneOrPreview
|
|
10023
10159
|
] }) })
|
|
10024
10160
|
] });
|
|
10025
10161
|
}
|
|
10026
|
-
return /* @__PURE__ */
|
|
10162
|
+
return /* @__PURE__ */ jsxs53("div", { className: clsx51("w-full transition-all duration-300", containerClassName), children: [
|
|
10027
10163
|
headerRow,
|
|
10028
10164
|
dropZoneOrPreview
|
|
10029
10165
|
] });
|
|
@@ -10031,13 +10167,13 @@ var ITDropfile = ({
|
|
|
10031
10167
|
var dropfile_default = ITDropfile;
|
|
10032
10168
|
|
|
10033
10169
|
// src/components/templates/layout/layout.tsx
|
|
10034
|
-
import { useState as
|
|
10170
|
+
import { useState as useState37 } from "react";
|
|
10035
10171
|
import clsx52 from "clsx";
|
|
10036
10172
|
|
|
10037
10173
|
// src/components/organisms/topbar/topbar.tsx
|
|
10038
10174
|
import { FaUserCircle as FaUserCircle2, FaBars } from "react-icons/fa";
|
|
10039
|
-
import { useRef as useRef22, useState as
|
|
10040
|
-
import { jsx as
|
|
10175
|
+
import { useRef as useRef22, useState as useState36 } from "react";
|
|
10176
|
+
import { jsx as jsx69, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
10041
10177
|
function ITTopBar({
|
|
10042
10178
|
logo,
|
|
10043
10179
|
logoText,
|
|
@@ -10053,10 +10189,10 @@ function ITTopBar({
|
|
|
10053
10189
|
}) {
|
|
10054
10190
|
const flat = useITFlatAppearance();
|
|
10055
10191
|
const initials = (userMenu?.userName ?? "").trim().split(/\s+/).slice(0, 2).map((word) => word.charAt(0).toUpperCase()).join("");
|
|
10056
|
-
const [isUserMenuOpen, setIsUserMenuOpen] =
|
|
10192
|
+
const [isUserMenuOpen, setIsUserMenuOpen] = useState36(false);
|
|
10057
10193
|
const userMenuRef = useRef22(null);
|
|
10058
10194
|
useClickOutside_default(userMenuRef, () => setIsUserMenuOpen(false));
|
|
10059
|
-
return /* @__PURE__ */
|
|
10195
|
+
return /* @__PURE__ */ jsx69(
|
|
10060
10196
|
"header",
|
|
10061
10197
|
{
|
|
10062
10198
|
className: `sticky top-0 z-40 transition-all duration-300 ${flat ? "" : "backdrop-blur-md"}`,
|
|
@@ -10065,9 +10201,9 @@ function ITTopBar({
|
|
|
10065
10201
|
borderBottom: "1px solid var(--it-topbar-border, rgba(15, 23, 42, 0.06))",
|
|
10066
10202
|
boxShadow: flat ? "none" : "var(--shadow-xs)"
|
|
10067
10203
|
},
|
|
10068
|
-
children: /* @__PURE__ */
|
|
10069
|
-
/* @__PURE__ */
|
|
10070
|
-
showMobileMenuButton && /* @__PURE__ */
|
|
10204
|
+
children: /* @__PURE__ */ jsxs54("div", { className: `flex items-center justify-between px-6 lg:px-8 ${flat ? "h-[64px]" : "h-[72px]"}`, children: [
|
|
10205
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-5", children: [
|
|
10206
|
+
showMobileMenuButton && /* @__PURE__ */ jsx69(
|
|
10071
10207
|
"button",
|
|
10072
10208
|
{
|
|
10073
10209
|
type: "button",
|
|
@@ -10079,12 +10215,12 @@ function ITTopBar({
|
|
|
10079
10215
|
onMouseEnter: (e) => e.currentTarget.style.backgroundColor = "var(--it-topbar-user-hover, #f1f5f9)",
|
|
10080
10216
|
onMouseLeave: (e) => e.currentTarget.style.backgroundColor = "transparent",
|
|
10081
10217
|
onClick: onToggleMobileMenu,
|
|
10082
|
-
children: /* @__PURE__ */
|
|
10218
|
+
children: /* @__PURE__ */ jsx69(FaBars, { className: "w-[1.125rem] h-[1.125rem]" })
|
|
10083
10219
|
}
|
|
10084
10220
|
),
|
|
10085
|
-
/* @__PURE__ */
|
|
10086
|
-
logo && /* @__PURE__ */
|
|
10087
|
-
logoText && /* @__PURE__ */
|
|
10221
|
+
/* @__PURE__ */ jsxs54("div", { className: `items-center gap-3 ${hideBrandOnDesktop ? "flex lg:hidden" : "flex"}`, children: [
|
|
10222
|
+
logo && /* @__PURE__ */ jsx69("div", { className: "flex-shrink-0 drop-shadow-sm", children: logo }),
|
|
10223
|
+
logoText && /* @__PURE__ */ jsx69(
|
|
10088
10224
|
ITText,
|
|
10089
10225
|
{
|
|
10090
10226
|
as: "span",
|
|
@@ -10094,7 +10230,7 @@ function ITTopBar({
|
|
|
10094
10230
|
}
|
|
10095
10231
|
)
|
|
10096
10232
|
] }),
|
|
10097
|
-
navItems && navItems.length > 0 && /* @__PURE__ */
|
|
10233
|
+
navItems && navItems.length > 0 && /* @__PURE__ */ jsx69("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__ */ jsx69(
|
|
10098
10234
|
"button",
|
|
10099
10235
|
{
|
|
10100
10236
|
onClick: () => onNavItemClick?.(item.id),
|
|
@@ -10108,19 +10244,19 @@ function ITTopBar({
|
|
|
10108
10244
|
e.currentTarget.style.color = "var(--it-topbar-text, #475569)";
|
|
10109
10245
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
10110
10246
|
},
|
|
10111
|
-
children: /* @__PURE__ */
|
|
10112
|
-
item.icon && /* @__PURE__ */
|
|
10113
|
-
/* @__PURE__ */
|
|
10247
|
+
children: /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
|
|
10248
|
+
item.icon && /* @__PURE__ */ jsx69("span", { className: "opacity-70", children: item.icon }),
|
|
10249
|
+
/* @__PURE__ */ jsx69(ITText, { as: "span", children: item.label })
|
|
10114
10250
|
] })
|
|
10115
10251
|
},
|
|
10116
10252
|
item.id
|
|
10117
10253
|
)) })
|
|
10118
10254
|
] }),
|
|
10119
|
-
centerContent && /* @__PURE__ */
|
|
10120
|
-
(children || userMenu) && /* @__PURE__ */
|
|
10255
|
+
centerContent && /* @__PURE__ */ jsx69("div", { className: `hidden lg:flex flex-1 min-w-0 items-center ${hideBrandOnDesktop ? "justify-start pr-4" : "justify-center px-4"}`, children: /* @__PURE__ */ jsx69("div", { className: "w-full max-w-[420px]", children: centerContent }) }),
|
|
10256
|
+
(children || userMenu) && /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
|
|
10121
10257
|
children,
|
|
10122
|
-
userMenu && /* @__PURE__ */
|
|
10123
|
-
/* @__PURE__ */
|
|
10258
|
+
userMenu && /* @__PURE__ */ jsxs54("div", { className: "relative", children: [
|
|
10259
|
+
/* @__PURE__ */ jsxs54(
|
|
10124
10260
|
"button",
|
|
10125
10261
|
{
|
|
10126
10262
|
type: "button",
|
|
@@ -10136,15 +10272,15 @@ function ITTopBar({
|
|
|
10136
10272
|
},
|
|
10137
10273
|
onClick: () => setIsUserMenuOpen(!isUserMenuOpen),
|
|
10138
10274
|
children: [
|
|
10139
|
-
/* @__PURE__ */
|
|
10140
|
-
userMenu.userImage ? /* @__PURE__ */
|
|
10275
|
+
/* @__PURE__ */ jsxs54("div", { className: "relative", children: [
|
|
10276
|
+
userMenu.userImage ? /* @__PURE__ */ jsx69(
|
|
10141
10277
|
"img",
|
|
10142
10278
|
{
|
|
10143
10279
|
className: "w-9 h-9 rounded-full object-cover ring-2 ring-white shadow-sm",
|
|
10144
10280
|
src: userMenu.userImage,
|
|
10145
10281
|
alt: "Current user"
|
|
10146
10282
|
}
|
|
10147
|
-
) : flat && initials ? /* @__PURE__ */
|
|
10283
|
+
) : flat && initials ? /* @__PURE__ */ jsx69(
|
|
10148
10284
|
"div",
|
|
10149
10285
|
{
|
|
10150
10286
|
"aria-hidden": "true",
|
|
@@ -10155,11 +10291,11 @@ function ITTopBar({
|
|
|
10155
10291
|
},
|
|
10156
10292
|
children: initials
|
|
10157
10293
|
}
|
|
10158
|
-
) : /* @__PURE__ */
|
|
10159
|
-
!flat && /* @__PURE__ */
|
|
10294
|
+
) : /* @__PURE__ */ jsx69("div", { className: "w-9 h-9 rounded-full bg-slate-100 flex items-center justify-center ring-2 ring-white shadow-sm", children: /* @__PURE__ */ jsx69(FaUserCircle2, { className: "w-6 h-6", style: { color: "var(--it-topbar-icon, #94a3b8)" } }) }),
|
|
10295
|
+
!flat && /* @__PURE__ */ jsx69("div", { className: "absolute bottom-0 right-0 w-2.5 h-2.5 bg-green-500 border-2 border-white rounded-full" })
|
|
10160
10296
|
] }),
|
|
10161
|
-
/* @__PURE__ */
|
|
10162
|
-
/* @__PURE__ */
|
|
10297
|
+
/* @__PURE__ */ jsxs54("div", { className: `hidden sm:flex flex-col py-0.5 ${flat ? "text-right" : "text-left"}`, children: [
|
|
10298
|
+
/* @__PURE__ */ jsx69(
|
|
10163
10299
|
ITText,
|
|
10164
10300
|
{
|
|
10165
10301
|
as: "span",
|
|
@@ -10168,7 +10304,7 @@ function ITTopBar({
|
|
|
10168
10304
|
children: userMenu.userName
|
|
10169
10305
|
}
|
|
10170
10306
|
),
|
|
10171
|
-
/* @__PURE__ */
|
|
10307
|
+
/* @__PURE__ */ jsx69(
|
|
10172
10308
|
ITText,
|
|
10173
10309
|
{
|
|
10174
10310
|
as: "span",
|
|
@@ -10181,7 +10317,7 @@ function ITTopBar({
|
|
|
10181
10317
|
]
|
|
10182
10318
|
}
|
|
10183
10319
|
),
|
|
10184
|
-
/* @__PURE__ */
|
|
10320
|
+
/* @__PURE__ */ jsxs54(
|
|
10185
10321
|
"div",
|
|
10186
10322
|
{
|
|
10187
10323
|
ref: userMenuRef,
|
|
@@ -10194,15 +10330,15 @@ function ITTopBar({
|
|
|
10194
10330
|
border: "1px solid var(--it-topbar-user-dropdown-border, #f1f5f9)"
|
|
10195
10331
|
},
|
|
10196
10332
|
children: [
|
|
10197
|
-
/* @__PURE__ */
|
|
10198
|
-
/* @__PURE__ */
|
|
10199
|
-
/* @__PURE__ */
|
|
10333
|
+
/* @__PURE__ */ jsxs54("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: [
|
|
10334
|
+
/* @__PURE__ */ jsx69(ITText, { as: "span", className: "block font-bold text-[0.9rem]", style: { color: "var(--it-topbar-user-text, #0f172a)" }, children: userMenu.userName }),
|
|
10335
|
+
/* @__PURE__ */ jsx69(ITText, { as: "span", className: "block text-xs font-medium truncate mt-0.5", style: { color: "var(--it-topbar-user-subtitle, #64748b)" }, children: userMenu.userEmail })
|
|
10200
10336
|
] }),
|
|
10201
|
-
/* @__PURE__ */
|
|
10337
|
+
/* @__PURE__ */ jsx69("ul", { className: "py-2", children: userMenu.menuItems.map((m, i) => {
|
|
10202
10338
|
const isDestructive = m.label.toLowerCase().includes("salir") || m.label.toLowerCase().includes("cerrar") || m.label.toLowerCase().includes("logout");
|
|
10203
|
-
return /* @__PURE__ */
|
|
10204
|
-
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */
|
|
10205
|
-
/* @__PURE__ */
|
|
10339
|
+
return /* @__PURE__ */ jsxs54("li", { className: "px-2", children: [
|
|
10340
|
+
i === userMenu.menuItems.length - 1 && isDestructive && i > 0 && /* @__PURE__ */ jsx69("div", { className: "h-px bg-slate-100 my-1 mx-2" }),
|
|
10341
|
+
/* @__PURE__ */ jsx69(
|
|
10206
10342
|
"button",
|
|
10207
10343
|
{
|
|
10208
10344
|
onClick: () => {
|
|
@@ -10217,7 +10353,7 @@ function ITTopBar({
|
|
|
10217
10353
|
onMouseLeave: (e) => {
|
|
10218
10354
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
10219
10355
|
},
|
|
10220
|
-
children: /* @__PURE__ */
|
|
10356
|
+
children: /* @__PURE__ */ jsx69(ITText, { as: "span", children: m.label })
|
|
10221
10357
|
}
|
|
10222
10358
|
)
|
|
10223
10359
|
] }, i);
|
|
@@ -10233,7 +10369,7 @@ function ITTopBar({
|
|
|
10233
10369
|
}
|
|
10234
10370
|
|
|
10235
10371
|
// src/components/templates/layout/layout.tsx
|
|
10236
|
-
import { jsx as
|
|
10372
|
+
import { jsx as jsx70, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
10237
10373
|
function ITLayout({
|
|
10238
10374
|
topBar,
|
|
10239
10375
|
sidebar,
|
|
@@ -10242,8 +10378,8 @@ function ITLayout({
|
|
|
10242
10378
|
contentClassName = "",
|
|
10243
10379
|
sidebarFullHeight = false
|
|
10244
10380
|
}) {
|
|
10245
|
-
const [internalCollapsed, setInternalCollapsed] =
|
|
10246
|
-
const [mobileSidebarOpen, setMobileSidebarOpen] =
|
|
10381
|
+
const [internalCollapsed, setInternalCollapsed] = useState37(true);
|
|
10382
|
+
const [mobileSidebarOpen, setMobileSidebarOpen] = useState37(false);
|
|
10247
10383
|
const flat = useITFlatAppearance();
|
|
10248
10384
|
const isControlled = sidebar.isCollapsed !== void 0;
|
|
10249
10385
|
const desktopCollapsed = isControlled ? sidebar.isCollapsed : internalCollapsed;
|
|
@@ -10257,7 +10393,7 @@ function ITLayout({
|
|
|
10257
10393
|
else setMobileSidebarOpen((v) => !v);
|
|
10258
10394
|
};
|
|
10259
10395
|
const brand = sidebarFullHeight ? sidebar.brand ?? { logo: topBar.logo, text: topBar.logoText } : sidebar.brand;
|
|
10260
|
-
const topBarNode = /* @__PURE__ */
|
|
10396
|
+
const topBarNode = /* @__PURE__ */ jsx70(
|
|
10261
10397
|
ITTopBar,
|
|
10262
10398
|
{
|
|
10263
10399
|
...topBar,
|
|
@@ -10270,9 +10406,9 @@ function ITLayout({
|
|
|
10270
10406
|
const desktopSidebar = (
|
|
10271
10407
|
// Full-height: the sidebar sits beside the top bar, so it needs to win the
|
|
10272
10408
|
// stacking order when the collapsed rail expands over the content on hover.
|
|
10273
|
-
/* @__PURE__ */
|
|
10274
|
-
/* @__PURE__ */
|
|
10275
|
-
/* @__PURE__ */
|
|
10409
|
+
/* @__PURE__ */ jsxs55("div", { className: `hidden lg:block relative h-full ${sidebarFullHeight ? "z-50" : "z-40"}`, children: [
|
|
10410
|
+
/* @__PURE__ */ jsx70("div", { className: `${reservedWidth} h-full flex-shrink-0` }),
|
|
10411
|
+
/* @__PURE__ */ jsx70("div", { className: "absolute top-0 left-0 h-full", children: /* @__PURE__ */ jsx70(
|
|
10276
10412
|
ITSidebar,
|
|
10277
10413
|
{
|
|
10278
10414
|
...sidebar,
|
|
@@ -10285,17 +10421,17 @@ function ITLayout({
|
|
|
10285
10421
|
) })
|
|
10286
10422
|
] })
|
|
10287
10423
|
);
|
|
10288
|
-
const mobileSidebar = mobileSidebarOpen && /* @__PURE__ */
|
|
10424
|
+
const mobileSidebar = mobileSidebarOpen && /* @__PURE__ */ jsx70(
|
|
10289
10425
|
"div",
|
|
10290
10426
|
{
|
|
10291
10427
|
className: "lg:hidden fixed inset-0 z-[40] transition-opacity duration-300 backdrop-blur-sm bg-black/40",
|
|
10292
10428
|
onClick: () => setMobileSidebarOpen(false),
|
|
10293
|
-
children: /* @__PURE__ */
|
|
10429
|
+
children: /* @__PURE__ */ jsx70(
|
|
10294
10430
|
"div",
|
|
10295
10431
|
{
|
|
10296
10432
|
className: "h-full w-fit flex transform transition-transform duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
|
|
10297
10433
|
onClick: (e) => e.stopPropagation(),
|
|
10298
|
-
children: /* @__PURE__ */
|
|
10434
|
+
children: /* @__PURE__ */ jsx70(
|
|
10299
10435
|
ITSidebar,
|
|
10300
10436
|
{
|
|
10301
10437
|
...sidebar,
|
|
@@ -10312,16 +10448,16 @@ function ITLayout({
|
|
|
10312
10448
|
)
|
|
10313
10449
|
}
|
|
10314
10450
|
);
|
|
10315
|
-
const main = /* @__PURE__ */
|
|
10451
|
+
const main = /* @__PURE__ */ jsx70("main", { className: "flex-1 overflow-y-auto w-full custom-scrollbar relative z-0", children: /* @__PURE__ */ jsx70("div", { className: clsx52("mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 py-6 h-full", contentClassName), children }) });
|
|
10316
10452
|
if (sidebarFullHeight) {
|
|
10317
|
-
return /* @__PURE__ */
|
|
10453
|
+
return /* @__PURE__ */ jsxs55(
|
|
10318
10454
|
"div",
|
|
10319
10455
|
{
|
|
10320
10456
|
className: `flex h-screen overflow-hidden w-full relative ${className}`,
|
|
10321
10457
|
style: { backgroundColor: layoutTokens.backgroundColor },
|
|
10322
10458
|
children: [
|
|
10323
10459
|
desktopSidebar,
|
|
10324
|
-
/* @__PURE__ */
|
|
10460
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex flex-col flex-1 min-w-0 overflow-hidden", children: [
|
|
10325
10461
|
topBarNode,
|
|
10326
10462
|
main
|
|
10327
10463
|
] }),
|
|
@@ -10330,9 +10466,9 @@ function ITLayout({
|
|
|
10330
10466
|
}
|
|
10331
10467
|
);
|
|
10332
10468
|
}
|
|
10333
|
-
return /* @__PURE__ */
|
|
10469
|
+
return /* @__PURE__ */ jsxs55("div", { className: `flex flex-col h-screen overflow-hidden w-full ${className}`, children: [
|
|
10334
10470
|
topBarNode,
|
|
10335
|
-
/* @__PURE__ */
|
|
10471
|
+
/* @__PURE__ */ jsxs55(
|
|
10336
10472
|
"div",
|
|
10337
10473
|
{
|
|
10338
10474
|
className: "flex flex-1 overflow-hidden relative",
|
|
@@ -10356,7 +10492,7 @@ var sizeClasses = {
|
|
|
10356
10492
|
};
|
|
10357
10493
|
|
|
10358
10494
|
// src/components/atoms/loader/loader.tsx
|
|
10359
|
-
import { jsx as
|
|
10495
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
10360
10496
|
function ITLoader({
|
|
10361
10497
|
size = "md",
|
|
10362
10498
|
variant = "spinner",
|
|
@@ -10371,22 +10507,22 @@ function ITLoader({
|
|
|
10371
10507
|
const bgStyle = isCssValue ? { backgroundColor: resolvedColor } : {};
|
|
10372
10508
|
const colorClass = !isCssValue ? color : "";
|
|
10373
10509
|
if (variant === "spinner") {
|
|
10374
|
-
return /* @__PURE__ */
|
|
10510
|
+
return /* @__PURE__ */ jsx71(
|
|
10375
10511
|
"div",
|
|
10376
10512
|
{
|
|
10377
10513
|
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}`,
|
|
10378
10514
|
role: "status",
|
|
10379
10515
|
style,
|
|
10380
|
-
children: /* @__PURE__ */
|
|
10516
|
+
children: /* @__PURE__ */ jsx71(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..." })
|
|
10381
10517
|
}
|
|
10382
10518
|
);
|
|
10383
10519
|
}
|
|
10384
10520
|
if (variant === "dots") {
|
|
10385
|
-
return /* @__PURE__ */
|
|
10521
|
+
return /* @__PURE__ */ jsx71(
|
|
10386
10522
|
"div",
|
|
10387
10523
|
{
|
|
10388
10524
|
className: `flex items-center justify-center space-x-2 ${className}`,
|
|
10389
|
-
children: [...Array(3)].map((_, i) => /* @__PURE__ */
|
|
10525
|
+
children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsx71(
|
|
10390
10526
|
"div",
|
|
10391
10527
|
{
|
|
10392
10528
|
className: `${sizeClasses[size.replace(/l|g/, "")]} animate-bounce rounded-full ${colorClass}`,
|
|
@@ -10401,11 +10537,11 @@ function ITLoader({
|
|
|
10401
10537
|
);
|
|
10402
10538
|
}
|
|
10403
10539
|
if (variant === "bar") {
|
|
10404
|
-
return /* @__PURE__ */
|
|
10540
|
+
return /* @__PURE__ */ jsx71(
|
|
10405
10541
|
"div",
|
|
10406
10542
|
{
|
|
10407
10543
|
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}`,
|
|
10408
|
-
children: /* @__PURE__ */
|
|
10544
|
+
children: /* @__PURE__ */ jsx71(
|
|
10409
10545
|
"div",
|
|
10410
10546
|
{
|
|
10411
10547
|
className: `h-full animate-progress ${colorClass}`,
|
|
@@ -10421,7 +10557,7 @@ function ITLoader({
|
|
|
10421
10557
|
);
|
|
10422
10558
|
}
|
|
10423
10559
|
if (variant === "pulse") {
|
|
10424
|
-
return /* @__PURE__ */
|
|
10560
|
+
return /* @__PURE__ */ jsx71(
|
|
10425
10561
|
"div",
|
|
10426
10562
|
{
|
|
10427
10563
|
className: `rounded-full ${sizeClasses[size]} animate-pulse ${colorClass} ${className}`,
|
|
@@ -10434,9 +10570,9 @@ function ITLoader({
|
|
|
10434
10570
|
|
|
10435
10571
|
// src/components/molecules/stepper/stepper.tsx
|
|
10436
10572
|
import clsx53 from "clsx";
|
|
10437
|
-
import { useEffect as useEffect18, useRef as useRef23, useState as
|
|
10573
|
+
import { useEffect as useEffect18, useRef as useRef23, useState as useState38 } from "react";
|
|
10438
10574
|
import { FaChevronLeft as FaChevronLeft4, FaChevronRight as FaChevronRight5, FaCheck as FaCheck5 } from "react-icons/fa";
|
|
10439
|
-
import { jsx as
|
|
10575
|
+
import { jsx as jsx72, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
10440
10576
|
function ITStepper({
|
|
10441
10577
|
steps,
|
|
10442
10578
|
currentStep,
|
|
@@ -10451,7 +10587,7 @@ function ITStepper({
|
|
|
10451
10587
|
maxContentHeight = "400px",
|
|
10452
10588
|
color = "primary"
|
|
10453
10589
|
}) {
|
|
10454
|
-
const [direction, setDirection] =
|
|
10590
|
+
const [direction, setDirection] = useState38("next");
|
|
10455
10591
|
const contentRef = useRef23(null);
|
|
10456
10592
|
const progressRef = useRef23(null);
|
|
10457
10593
|
const isThemeColor = color in theme.colors;
|
|
@@ -10503,23 +10639,23 @@ function ITStepper({
|
|
|
10503
10639
|
const renderStepContent = (index, isCompleted) => {
|
|
10504
10640
|
const step = steps[index];
|
|
10505
10641
|
if (isCompleted) {
|
|
10506
|
-
return /* @__PURE__ */
|
|
10642
|
+
return /* @__PURE__ */ jsx72(FaCheck5, { className: "w-4 h-4" });
|
|
10507
10643
|
}
|
|
10508
10644
|
if (step.icon && useIcons) {
|
|
10509
|
-
return /* @__PURE__ */
|
|
10645
|
+
return /* @__PURE__ */ jsx72("div", { className: "flex items-center justify-center w-5 h-5", children: step.icon });
|
|
10510
10646
|
}
|
|
10511
|
-
return /* @__PURE__ */
|
|
10647
|
+
return /* @__PURE__ */ jsx72(ITText, { as: "span", className: "text-sm font-semibold", children: index + 1 });
|
|
10512
10648
|
};
|
|
10513
|
-
return /* @__PURE__ */
|
|
10514
|
-
/* @__PURE__ */
|
|
10515
|
-
/* @__PURE__ */
|
|
10649
|
+
return /* @__PURE__ */ jsxs56("div", { className: clsx53("w-full max-w-5xl mx-auto px-4", containerClassName), children: [
|
|
10650
|
+
/* @__PURE__ */ jsxs56("div", { className: "relative mb-8", children: [
|
|
10651
|
+
/* @__PURE__ */ jsx72(
|
|
10516
10652
|
"div",
|
|
10517
10653
|
{
|
|
10518
10654
|
className: "absolute left-6 right-6 top-5 h-1 bg-secondary-200 rounded-full z-0",
|
|
10519
10655
|
"aria-hidden": true
|
|
10520
10656
|
}
|
|
10521
10657
|
),
|
|
10522
|
-
/* @__PURE__ */
|
|
10658
|
+
/* @__PURE__ */ jsx72(
|
|
10523
10659
|
"div",
|
|
10524
10660
|
{
|
|
10525
10661
|
ref: progressRef,
|
|
@@ -10527,11 +10663,11 @@ function ITStepper({
|
|
|
10527
10663
|
"aria-hidden": true
|
|
10528
10664
|
}
|
|
10529
10665
|
),
|
|
10530
|
-
/* @__PURE__ */
|
|
10666
|
+
/* @__PURE__ */ jsx72("div", { className: "flex items-start justify-between space-x-2 relative z-20", children: steps.map((step, idx) => {
|
|
10531
10667
|
const isActive = idx === currentStep;
|
|
10532
10668
|
const isCompleted = idx < currentStep;
|
|
10533
10669
|
const hasIcon = step.icon && useIcons;
|
|
10534
|
-
return /* @__PURE__ */
|
|
10670
|
+
return /* @__PURE__ */ jsx72(
|
|
10535
10671
|
"button",
|
|
10536
10672
|
{
|
|
10537
10673
|
type: "button",
|
|
@@ -10541,8 +10677,8 @@ function ITStepper({
|
|
|
10541
10677
|
"aria-label": `Paso ${idx + 1} ${step.label}`,
|
|
10542
10678
|
className: "flex-1 group",
|
|
10543
10679
|
title: step.label,
|
|
10544
|
-
children: /* @__PURE__ */
|
|
10545
|
-
/* @__PURE__ */
|
|
10680
|
+
children: /* @__PURE__ */ jsxs56("div", { className: "flex flex-col items-center", children: [
|
|
10681
|
+
/* @__PURE__ */ jsx72(
|
|
10546
10682
|
"div",
|
|
10547
10683
|
{
|
|
10548
10684
|
className: clsx53(
|
|
@@ -10556,7 +10692,7 @@ function ITStepper({
|
|
|
10556
10692
|
children: renderStepContent(idx, isCompleted)
|
|
10557
10693
|
}
|
|
10558
10694
|
),
|
|
10559
|
-
/* @__PURE__ */
|
|
10695
|
+
/* @__PURE__ */ jsx72(
|
|
10560
10696
|
ITText,
|
|
10561
10697
|
{
|
|
10562
10698
|
as: "span",
|
|
@@ -10574,7 +10710,7 @@ function ITStepper({
|
|
|
10574
10710
|
);
|
|
10575
10711
|
}) })
|
|
10576
10712
|
] }),
|
|
10577
|
-
/* @__PURE__ */
|
|
10713
|
+
/* @__PURE__ */ jsx72(
|
|
10578
10714
|
"div",
|
|
10579
10715
|
{
|
|
10580
10716
|
ref: contentRef,
|
|
@@ -10590,37 +10726,37 @@ function ITStepper({
|
|
|
10590
10726
|
children: steps[currentStep].content
|
|
10591
10727
|
}
|
|
10592
10728
|
),
|
|
10593
|
-
/* @__PURE__ */
|
|
10594
|
-
/* @__PURE__ */
|
|
10729
|
+
/* @__PURE__ */ jsxs56("div", { className: "flex justify-between items-center mt-6", children: [
|
|
10730
|
+
/* @__PURE__ */ jsx72(
|
|
10595
10731
|
ITButton,
|
|
10596
10732
|
{
|
|
10597
10733
|
variant: "outlined",
|
|
10598
10734
|
color: "secondary",
|
|
10599
10735
|
disabled: currentStep === 0,
|
|
10600
10736
|
onClick: prevStep,
|
|
10601
|
-
children: /* @__PURE__ */
|
|
10602
|
-
/* @__PURE__ */
|
|
10603
|
-
/* @__PURE__ */
|
|
10737
|
+
children: /* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2", children: [
|
|
10738
|
+
/* @__PURE__ */ jsx72(FaChevronLeft4, {}),
|
|
10739
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", children: "Atr\xE1s" })
|
|
10604
10740
|
] })
|
|
10605
10741
|
}
|
|
10606
10742
|
),
|
|
10607
|
-
/* @__PURE__ */
|
|
10608
|
-
/* @__PURE__ */
|
|
10743
|
+
/* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-3", children: [
|
|
10744
|
+
/* @__PURE__ */ jsxs56(ITText, { as: "div", className: "text-sm text-secondary-500 mr-2 hidden sm:block", children: [
|
|
10609
10745
|
"Paso ",
|
|
10610
10746
|
currentStep + 1,
|
|
10611
10747
|
" de ",
|
|
10612
10748
|
steps.length
|
|
10613
10749
|
] }),
|
|
10614
|
-
/* @__PURE__ */
|
|
10750
|
+
/* @__PURE__ */ jsx72(
|
|
10615
10751
|
ITButton,
|
|
10616
10752
|
{
|
|
10617
10753
|
variant: "solid",
|
|
10618
10754
|
color,
|
|
10619
10755
|
disabled: disableNext,
|
|
10620
10756
|
onClick: nextStep,
|
|
10621
|
-
children: /* @__PURE__ */
|
|
10622
|
-
/* @__PURE__ */
|
|
10623
|
-
currentStep === steps.length - 1 ? /* @__PURE__ */
|
|
10757
|
+
children: /* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-2", children: [
|
|
10758
|
+
/* @__PURE__ */ jsx72(ITText, { as: "span", children: currentStep === steps.length - 1 ? "Finalizar" : "Siguiente" }),
|
|
10759
|
+
currentStep === steps.length - 1 ? /* @__PURE__ */ jsx72(FaCheck5, {}) : /* @__PURE__ */ jsx72(FaChevronRight5, {})
|
|
10624
10760
|
] })
|
|
10625
10761
|
}
|
|
10626
10762
|
)
|
|
@@ -10630,7 +10766,7 @@ function ITStepper({
|
|
|
10630
10766
|
}
|
|
10631
10767
|
|
|
10632
10768
|
// src/components/theme-provider/themeProvider.tsx
|
|
10633
|
-
import { useState as
|
|
10769
|
+
import { useState as useState39, useEffect as useEffect19, useLayoutEffect as useLayoutEffect4 } from "react";
|
|
10634
10770
|
import { MdPalette, MdClose, MdRefresh } from "react-icons/md";
|
|
10635
10771
|
|
|
10636
10772
|
// src/components/theme-provider/themePresets.ts
|
|
@@ -10808,7 +10944,7 @@ var PRESETS = [
|
|
|
10808
10944
|
];
|
|
10809
10945
|
|
|
10810
10946
|
// src/components/theme-provider/themeProvider.tsx
|
|
10811
|
-
import { jsx as
|
|
10947
|
+
import { jsx as jsx73, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
10812
10948
|
var STORAGE_KEY = "it-theme-palette";
|
|
10813
10949
|
var SHADOW_LEVELS = {
|
|
10814
10950
|
0: {
|
|
@@ -10903,7 +11039,7 @@ function ITThemeProvider({
|
|
|
10903
11039
|
shadow,
|
|
10904
11040
|
appearance = "soft"
|
|
10905
11041
|
}) {
|
|
10906
|
-
const [palette2, setPaletteState] =
|
|
11042
|
+
const [palette2, setPaletteState] = useState39(() => {
|
|
10907
11043
|
const basePalette = {
|
|
10908
11044
|
...DEFAULT_PALETTE,
|
|
10909
11045
|
...theme2,
|
|
@@ -10929,8 +11065,8 @@ function ITThemeProvider({
|
|
|
10929
11065
|
}
|
|
10930
11066
|
return basePalette;
|
|
10931
11067
|
});
|
|
10932
|
-
const [isOpen, setIsOpen] =
|
|
10933
|
-
const [customPresets, setCustomPresets] =
|
|
11068
|
+
const [isOpen, setIsOpen] = useState39(false);
|
|
11069
|
+
const [customPresets, setCustomPresets] = useState39(() => {
|
|
10934
11070
|
try {
|
|
10935
11071
|
const saved = localStorage.getItem("it-theme-custom-presets");
|
|
10936
11072
|
return saved ? JSON.parse(saved) : [];
|
|
@@ -10939,8 +11075,8 @@ function ITThemeProvider({
|
|
|
10939
11075
|
return [];
|
|
10940
11076
|
}
|
|
10941
11077
|
});
|
|
10942
|
-
const [newPresetName, setNewPresetName] =
|
|
10943
|
-
const [isSavingPreset, setIsSavingPreset] =
|
|
11078
|
+
const [newPresetName, setNewPresetName] = useState39("");
|
|
11079
|
+
const [isSavingPreset, setIsSavingPreset] = useState39(false);
|
|
10944
11080
|
const handleSavePreset = () => {
|
|
10945
11081
|
if (!newPresetName.trim()) return;
|
|
10946
11082
|
const newPreset = {
|
|
@@ -10959,8 +11095,8 @@ function ITThemeProvider({
|
|
|
10959
11095
|
setCustomPresets(updated);
|
|
10960
11096
|
localStorage.setItem("it-theme-custom-presets", JSON.stringify(updated));
|
|
10961
11097
|
};
|
|
10962
|
-
const [resolvedTheme, setResolvedTheme] =
|
|
10963
|
-
const [darkModeMode, setDarkModeMode] =
|
|
11098
|
+
const [resolvedTheme, setResolvedTheme] = useState39("light");
|
|
11099
|
+
const [darkModeMode, setDarkModeMode] = useState39(
|
|
10964
11100
|
() => {
|
|
10965
11101
|
const saved = localStorage.getItem("it-theme-dark-mode");
|
|
10966
11102
|
if (saved === "light" || saved === "dark" || saved === "system") {
|
|
@@ -12205,14 +12341,14 @@ function ITThemeProvider({
|
|
|
12205
12341
|
const isNested = colorKey.includes(".");
|
|
12206
12342
|
const label = isNested ? colorKey.split(".")[1] : colorKey;
|
|
12207
12343
|
const value = getNestedValue3(palette2, colorKey);
|
|
12208
|
-
return /* @__PURE__ */
|
|
12344
|
+
return /* @__PURE__ */ jsxs57(
|
|
12209
12345
|
"div",
|
|
12210
12346
|
{
|
|
12211
12347
|
className: "flex items-center justify-between p-3 rounded-xl border border-slate-100 dark:border-slate-800 bg-white dark:bg-slate-900/50 gap-3 hover:border-slate-200 dark:hover:border-slate-700 transition-colors",
|
|
12212
12348
|
children: [
|
|
12213
|
-
/* @__PURE__ */
|
|
12214
|
-
/* @__PURE__ */
|
|
12215
|
-
/* @__PURE__ */
|
|
12349
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
12350
|
+
/* @__PURE__ */ jsxs57("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: [
|
|
12351
|
+
/* @__PURE__ */ jsx73(
|
|
12216
12352
|
"input",
|
|
12217
12353
|
{
|
|
12218
12354
|
type: "color",
|
|
@@ -12221,23 +12357,23 @@ function ITThemeProvider({
|
|
|
12221
12357
|
className: "absolute inset-0 opacity-0 cursor-pointer w-full h-full"
|
|
12222
12358
|
}
|
|
12223
12359
|
),
|
|
12224
|
-
/* @__PURE__ */
|
|
12360
|
+
/* @__PURE__ */ jsx73("div", { className: "w-full h-full", style: { backgroundColor: value } })
|
|
12225
12361
|
] }),
|
|
12226
|
-
/* @__PURE__ */
|
|
12227
|
-
/* @__PURE__ */
|
|
12228
|
-
/* @__PURE__ */
|
|
12229
|
-
/* @__PURE__ */
|
|
12362
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex flex-col min-w-0", children: [
|
|
12363
|
+
/* @__PURE__ */ jsx73(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() }),
|
|
12364
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-2 mt-0.5", children: [
|
|
12365
|
+
/* @__PURE__ */ jsx73(
|
|
12230
12366
|
"span",
|
|
12231
12367
|
{
|
|
12232
12368
|
className: "w-3 h-3 rounded-full border border-slate-200 dark:border-slate-600",
|
|
12233
12369
|
style: { backgroundColor: value }
|
|
12234
12370
|
}
|
|
12235
12371
|
),
|
|
12236
|
-
/* @__PURE__ */
|
|
12372
|
+
/* @__PURE__ */ jsx73(ITText, { as: "span", className: "font-mono text-[11px] text-slate-400", children: value })
|
|
12237
12373
|
] })
|
|
12238
12374
|
] })
|
|
12239
12375
|
] }),
|
|
12240
|
-
/* @__PURE__ */
|
|
12376
|
+
/* @__PURE__ */ jsx73(
|
|
12241
12377
|
"input",
|
|
12242
12378
|
{
|
|
12243
12379
|
type: "text",
|
|
@@ -12256,14 +12392,14 @@ function ITThemeProvider({
|
|
|
12256
12392
|
isCustom
|
|
12257
12393
|
}) => {
|
|
12258
12394
|
const isSelected = JSON.stringify(preset.colors) === JSON.stringify(palette2);
|
|
12259
|
-
return /* @__PURE__ */
|
|
12395
|
+
return /* @__PURE__ */ jsxs57(
|
|
12260
12396
|
"button",
|
|
12261
12397
|
{
|
|
12262
12398
|
type: "button",
|
|
12263
12399
|
onClick: () => applyPreset(preset.colors),
|
|
12264
12400
|
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"}`,
|
|
12265
12401
|
children: [
|
|
12266
|
-
isCustom && /* @__PURE__ */
|
|
12402
|
+
isCustom && /* @__PURE__ */ jsx73(
|
|
12267
12403
|
"span",
|
|
12268
12404
|
{
|
|
12269
12405
|
onClick: (e) => {
|
|
@@ -12272,11 +12408,11 @@ function ITThemeProvider({
|
|
|
12272
12408
|
},
|
|
12273
12409
|
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",
|
|
12274
12410
|
title: "Eliminar",
|
|
12275
|
-
children: /* @__PURE__ */
|
|
12411
|
+
children: /* @__PURE__ */ jsx73(MdClose, { size: 12 })
|
|
12276
12412
|
}
|
|
12277
12413
|
),
|
|
12278
|
-
/* @__PURE__ */
|
|
12279
|
-
/* @__PURE__ */
|
|
12414
|
+
/* @__PURE__ */ jsx73(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 }),
|
|
12415
|
+
/* @__PURE__ */ jsx73("div", { className: "flex gap-1", children: ["primary", "secondary", "ternary", "success"].map((c) => /* @__PURE__ */ jsx73(
|
|
12280
12416
|
"span",
|
|
12281
12417
|
{
|
|
12282
12418
|
className: "w-3 h-3 rounded-full border border-black/10",
|
|
@@ -12288,7 +12424,7 @@ function ITThemeProvider({
|
|
|
12288
12424
|
}
|
|
12289
12425
|
);
|
|
12290
12426
|
};
|
|
12291
|
-
return /* @__PURE__ */
|
|
12427
|
+
return /* @__PURE__ */ jsxs57(
|
|
12292
12428
|
ITThemeContext.Provider,
|
|
12293
12429
|
{
|
|
12294
12430
|
value: {
|
|
@@ -12305,28 +12441,28 @@ function ITThemeProvider({
|
|
|
12305
12441
|
},
|
|
12306
12442
|
children: [
|
|
12307
12443
|
children,
|
|
12308
|
-
showFab && /* @__PURE__ */
|
|
12444
|
+
showFab && /* @__PURE__ */ jsx73(
|
|
12309
12445
|
"button",
|
|
12310
12446
|
{
|
|
12311
12447
|
onClick: () => setIsOpen((prev) => !prev),
|
|
12312
12448
|
className: "it-theme-fab it-theme-bounce",
|
|
12313
12449
|
style: { backgroundColor: "var(--color-primary)" },
|
|
12314
12450
|
"aria-label": "Configurar Paleta de Colores",
|
|
12315
|
-
children: /* @__PURE__ */
|
|
12451
|
+
children: /* @__PURE__ */ jsx73(MdPalette, { size: 28 })
|
|
12316
12452
|
}
|
|
12317
12453
|
),
|
|
12318
|
-
showFab && /* @__PURE__ */
|
|
12454
|
+
showFab && /* @__PURE__ */ jsx73(
|
|
12319
12455
|
ITDialog,
|
|
12320
12456
|
{
|
|
12321
12457
|
isOpen,
|
|
12322
12458
|
onClose: () => setIsOpen(false),
|
|
12323
12459
|
title: "Dise\xF1ador de Temas",
|
|
12324
12460
|
useFormHeader: true,
|
|
12325
|
-
children: /* @__PURE__ */
|
|
12326
|
-
/* @__PURE__ */
|
|
12327
|
-
/* @__PURE__ */
|
|
12328
|
-
/* @__PURE__ */
|
|
12329
|
-
/* @__PURE__ */
|
|
12461
|
+
children: /* @__PURE__ */ jsxs57("div", { className: "flex gap-6 h-[580px]", children: [
|
|
12462
|
+
/* @__PURE__ */ jsxs57("div", { className: "w-64 flex-shrink-0 flex flex-col gap-5 overflow-y-auto pr-1", children: [
|
|
12463
|
+
/* @__PURE__ */ jsxs57("div", { children: [
|
|
12464
|
+
/* @__PURE__ */ jsx73(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500 mb-2.5 block", children: "Apariencia" }),
|
|
12465
|
+
/* @__PURE__ */ jsx73(
|
|
12330
12466
|
ITSegmentedControl,
|
|
12331
12467
|
{
|
|
12332
12468
|
options: [
|
|
@@ -12340,16 +12476,16 @@ function ITThemeProvider({
|
|
|
12340
12476
|
}
|
|
12341
12477
|
)
|
|
12342
12478
|
] }),
|
|
12343
|
-
/* @__PURE__ */
|
|
12344
|
-
/* @__PURE__ */
|
|
12345
|
-
/* @__PURE__ */
|
|
12479
|
+
/* @__PURE__ */ jsxs57("div", { children: [
|
|
12480
|
+
/* @__PURE__ */ jsx73("div", { className: "flex items-center justify-between mb-2.5", children: /* @__PURE__ */ jsx73(ITText, { as: "span", className: "text-[11px] font-bold uppercase tracking-wider text-slate-400 dark:text-slate-500", children: "Presets" }) }),
|
|
12481
|
+
/* @__PURE__ */ jsx73("div", { className: "grid grid-cols-2 gap-2", children: PRESETS.map((preset) => /* @__PURE__ */ jsx73(PresetCard, { preset }, preset.name)) })
|
|
12346
12482
|
] }),
|
|
12347
|
-
customPresets.length > 0 && /* @__PURE__ */
|
|
12348
|
-
/* @__PURE__ */
|
|
12349
|
-
/* @__PURE__ */
|
|
12483
|
+
customPresets.length > 0 && /* @__PURE__ */ jsxs57("div", { children: [
|
|
12484
|
+
/* @__PURE__ */ jsx73(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" }),
|
|
12485
|
+
/* @__PURE__ */ jsx73("div", { className: "flex flex-col gap-1.5", children: customPresets.map((preset) => /* @__PURE__ */ jsx73(PresetCard, { preset, isCustom: true }, preset.name)) })
|
|
12350
12486
|
] }),
|
|
12351
|
-
isSavingPreset && /* @__PURE__ */
|
|
12352
|
-
/* @__PURE__ */
|
|
12487
|
+
isSavingPreset && /* @__PURE__ */ jsxs57("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: [
|
|
12488
|
+
/* @__PURE__ */ jsx73(
|
|
12353
12489
|
ITInput,
|
|
12354
12490
|
{
|
|
12355
12491
|
name: "presetName",
|
|
@@ -12367,8 +12503,8 @@ function ITThemeProvider({
|
|
|
12367
12503
|
}
|
|
12368
12504
|
}
|
|
12369
12505
|
),
|
|
12370
|
-
/* @__PURE__ */
|
|
12371
|
-
/* @__PURE__ */
|
|
12506
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex gap-2", children: [
|
|
12507
|
+
/* @__PURE__ */ jsx73(
|
|
12372
12508
|
ITButton,
|
|
12373
12509
|
{
|
|
12374
12510
|
label: "Guardar",
|
|
@@ -12379,7 +12515,7 @@ function ITThemeProvider({
|
|
|
12379
12515
|
className: "flex-1"
|
|
12380
12516
|
}
|
|
12381
12517
|
),
|
|
12382
|
-
/* @__PURE__ */
|
|
12518
|
+
/* @__PURE__ */ jsx73(
|
|
12383
12519
|
ITButton,
|
|
12384
12520
|
{
|
|
12385
12521
|
label: "X",
|
|
@@ -12393,31 +12529,31 @@ function ITThemeProvider({
|
|
|
12393
12529
|
)
|
|
12394
12530
|
] })
|
|
12395
12531
|
] }),
|
|
12396
|
-
!isSavingPreset && /* @__PURE__ */
|
|
12532
|
+
!isSavingPreset && /* @__PURE__ */ jsx73(
|
|
12397
12533
|
ITButton,
|
|
12398
12534
|
{
|
|
12399
12535
|
variant: "outlined",
|
|
12400
|
-
icon: /* @__PURE__ */
|
|
12536
|
+
icon: /* @__PURE__ */ jsx73(MdPalette, { size: 14 }),
|
|
12401
12537
|
label: "Guardar actual",
|
|
12402
12538
|
onClick: () => setIsSavingPreset(true),
|
|
12403
12539
|
size: "sm"
|
|
12404
12540
|
}
|
|
12405
12541
|
),
|
|
12406
|
-
/* @__PURE__ */
|
|
12542
|
+
/* @__PURE__ */ jsx73(
|
|
12407
12543
|
ITButton,
|
|
12408
12544
|
{
|
|
12409
12545
|
variant: "outlined",
|
|
12410
12546
|
color: "danger",
|
|
12411
|
-
icon: /* @__PURE__ */
|
|
12547
|
+
icon: /* @__PURE__ */ jsx73(MdRefresh, { size: 14 }),
|
|
12412
12548
|
label: "Restaurar default",
|
|
12413
12549
|
onClick: resetTheme,
|
|
12414
12550
|
size: "sm"
|
|
12415
12551
|
}
|
|
12416
12552
|
)
|
|
12417
12553
|
] }),
|
|
12418
|
-
/* @__PURE__ */
|
|
12419
|
-
/* @__PURE__ */
|
|
12420
|
-
/* @__PURE__ */
|
|
12554
|
+
/* @__PURE__ */ jsx73(ITDivider, { orientation: "vertical" }),
|
|
12555
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex-1 flex flex-col min-w-0", children: [
|
|
12556
|
+
/* @__PURE__ */ jsx73(
|
|
12421
12557
|
tabs_default,
|
|
12422
12558
|
{
|
|
12423
12559
|
variant: "pill",
|
|
@@ -12425,7 +12561,7 @@ function ITThemeProvider({
|
|
|
12425
12561
|
{
|
|
12426
12562
|
id: "brand",
|
|
12427
12563
|
label: "Marca",
|
|
12428
|
-
content: /* @__PURE__ */
|
|
12564
|
+
content: /* @__PURE__ */ jsx73("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12429
12565
|
"primary",
|
|
12430
12566
|
"secondary",
|
|
12431
12567
|
"ternary",
|
|
@@ -12434,35 +12570,35 @@ function ITThemeProvider({
|
|
|
12434
12570
|
"info",
|
|
12435
12571
|
"alert",
|
|
12436
12572
|
"warning"
|
|
12437
|
-
].map((key) => /* @__PURE__ */
|
|
12573
|
+
].map((key) => /* @__PURE__ */ jsx73(ColorRow, { colorKey: key }, key)) })
|
|
12438
12574
|
},
|
|
12439
12575
|
{
|
|
12440
12576
|
id: "layout",
|
|
12441
12577
|
label: "Nav & Sidebar",
|
|
12442
|
-
content: /* @__PURE__ */
|
|
12578
|
+
content: /* @__PURE__ */ jsx73("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12443
12579
|
"layout.sidebarBg",
|
|
12444
12580
|
"layout.sidebarText",
|
|
12445
12581
|
"layout.navbarBg",
|
|
12446
12582
|
"layout.navbarText"
|
|
12447
|
-
].map((key) => /* @__PURE__ */
|
|
12583
|
+
].map((key) => /* @__PURE__ */ jsx73(ColorRow, { colorKey: key }, key)) })
|
|
12448
12584
|
},
|
|
12449
12585
|
{
|
|
12450
12586
|
id: "tables",
|
|
12451
12587
|
label: "Tablas",
|
|
12452
|
-
content: /* @__PURE__ */
|
|
12588
|
+
content: /* @__PURE__ */ jsx73("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[480px] overflow-y-auto pr-2 mt-3", children: [
|
|
12453
12589
|
"table.headerBg",
|
|
12454
12590
|
"table.headerText",
|
|
12455
12591
|
"table.rowBg",
|
|
12456
12592
|
"table.rowText",
|
|
12457
12593
|
"table.rowHover"
|
|
12458
|
-
].map((key) => /* @__PURE__ */
|
|
12594
|
+
].map((key) => /* @__PURE__ */ jsx73(ColorRow, { colorKey: key }, key)) })
|
|
12459
12595
|
}
|
|
12460
12596
|
]
|
|
12461
12597
|
}
|
|
12462
12598
|
),
|
|
12463
|
-
/* @__PURE__ */
|
|
12464
|
-
/* @__PURE__ */
|
|
12465
|
-
/* @__PURE__ */
|
|
12599
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center justify-end gap-3 mt-auto pt-4 border-t border-slate-100 dark:border-slate-800", children: [
|
|
12600
|
+
/* @__PURE__ */ jsx73(ITText, { as: "p", className: "text-[11px] text-slate-400 mr-auto", children: "Los cambios se guardan autom\xE1ticamente" }),
|
|
12601
|
+
/* @__PURE__ */ jsx73(
|
|
12466
12602
|
ITButton,
|
|
12467
12603
|
{
|
|
12468
12604
|
label: "Cerrar",
|
|
@@ -12522,6 +12658,7 @@ export {
|
|
|
12522
12658
|
ITInput,
|
|
12523
12659
|
ITInputNumber,
|
|
12524
12660
|
ITLayout,
|
|
12661
|
+
line_bar_chart_default as ITLineBarChart,
|
|
12525
12662
|
ITLoader,
|
|
12526
12663
|
ITMaskedInput,
|
|
12527
12664
|
ITMultiSelect,
|