@iaclinical/components 1.0.33 → 1.0.35
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/iaclinical-components.cjs +1 -1
- package/dist/iaclinical-components.js +843 -828
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as N, computed as
|
|
1
|
+
import { defineComponent as N, computed as r, createElementBlock as a, openBlock as l, normalizeClass as u, createElementVNode as s, createCommentVNode as c, renderSlot as L, toDisplayString as B, createBlock as te, unref as Re, normalizeStyle as X, ref as P, onMounted as me, onUnmounted as ge, watch as de, createTextVNode as Y, withModifiers as J, createVNode as Q, withDirectives as ve, Fragment as K, renderList as G, vModelSelect as Te, withKeys as Se, Teleport as ye, Transition as ie, withCtx as re, nextTick as be, resolveDynamicComponent as he, vModelText as Ee } from "vue";
|
|
2
2
|
import { Icon as Ye } from "@iconify/vue";
|
|
3
3
|
const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
4
4
|
key: 1,
|
|
@@ -24,17 +24,17 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
24
24
|
density: { default: "normal" }
|
|
25
25
|
},
|
|
26
26
|
emits: ["toggle-menu"],
|
|
27
|
-
setup(t, { emit:
|
|
28
|
-
const e = t,
|
|
29
|
-
const
|
|
30
|
-
default: "bg-primary-
|
|
27
|
+
setup(t, { emit: m }) {
|
|
28
|
+
const e = t, b = m, o = r(() => {
|
|
29
|
+
const f = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", p = {
|
|
30
|
+
default: "bg-primary-500 text-primary-50",
|
|
31
31
|
dark: "bg-secondary-900 text-white",
|
|
32
32
|
light: "bg-white text-secondary-900 border-b border-secondary-200"
|
|
33
33
|
}, n = {
|
|
34
34
|
sm: "h-12",
|
|
35
35
|
md: "h-14",
|
|
36
36
|
lg: "h-16"
|
|
37
|
-
},
|
|
37
|
+
}, v = {
|
|
38
38
|
0: "",
|
|
39
39
|
1: "shadow-sm",
|
|
40
40
|
2: "shadow",
|
|
@@ -45,25 +45,25 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
45
45
|
compact: "gap-1",
|
|
46
46
|
normal: "gap-2 sm:gap-4",
|
|
47
47
|
prominent: "gap-3 sm:gap-6 px-6 sm:px-8"
|
|
48
|
-
}, k = e.sticky ? e.mode === "fixed" ? "fixed top-0 inset-x-0" : "sticky top-0 inset-x-0" : "",
|
|
48
|
+
}, k = e.sticky ? e.mode === "fixed" ? "fixed top-0 inset-x-0" : "sticky top-0 inset-x-0" : "", y = e.shadow ? "shadow-md" : v[Math.min(e.elevation, 5)];
|
|
49
49
|
return [
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
f.replace("gap-2 sm:gap-4", z[e.density]),
|
|
51
|
+
p[e.variant],
|
|
52
52
|
n[e.height],
|
|
53
53
|
k,
|
|
54
|
-
|
|
54
|
+
y
|
|
55
55
|
].join(" ");
|
|
56
56
|
});
|
|
57
|
-
return (
|
|
58
|
-
class:
|
|
57
|
+
return (f, p) => (l(), a("header", {
|
|
58
|
+
class: u(o.value)
|
|
59
59
|
}, [
|
|
60
60
|
s("div", Ne, [
|
|
61
61
|
t.showMenuButton ? (l(), a("button", {
|
|
62
62
|
key: 0,
|
|
63
|
-
onClick:
|
|
63
|
+
onClick: p[0] || (p[0] = (n) => b("toggle-menu")),
|
|
64
64
|
class: "p-1.5 sm:p-2 hover:bg-primary-600 rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
65
65
|
"aria-label": "Toggle menu"
|
|
66
|
-
}, [...
|
|
66
|
+
}, [...p[1] || (p[1] = [
|
|
67
67
|
s("svg", {
|
|
68
68
|
class: "w-5 h-5 sm:w-6 sm:h-6 text-primary-50",
|
|
69
69
|
fill: "none",
|
|
@@ -78,26 +78,26 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
78
78
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
79
79
|
})
|
|
80
80
|
], -1)
|
|
81
|
-
])])) :
|
|
82
|
-
t.title && t.titlePosition === "left" ? (l(), a("div", He,
|
|
83
|
-
|
|
81
|
+
])])) : c("", !0),
|
|
82
|
+
t.title && t.titlePosition === "left" ? (l(), a("div", He, B(t.title), 1)) : c("", !0),
|
|
83
|
+
L(f.$slots, "left", {}, void 0, !0)
|
|
84
84
|
]),
|
|
85
85
|
s("div", Ke, [
|
|
86
|
-
t.title && t.titlePosition === "center" ? (l(), a("div", Ue,
|
|
87
|
-
|
|
86
|
+
t.title && t.titlePosition === "center" ? (l(), a("div", Ue, B(t.title), 1)) : c("", !0),
|
|
87
|
+
L(f.$slots, "center", {}, void 0, !0)
|
|
88
88
|
]),
|
|
89
89
|
s("div", Je, [
|
|
90
|
-
t.title && t.titlePosition === "right" ? (l(), a("div", Ge,
|
|
91
|
-
|
|
90
|
+
t.title && t.titlePosition === "right" ? (l(), a("div", Ge, B(t.title), 1)) : c("", !0),
|
|
91
|
+
L(f.$slots, "right", {}, void 0, !0)
|
|
92
92
|
])
|
|
93
93
|
], 2));
|
|
94
94
|
}
|
|
95
|
-
}), Z = (t,
|
|
95
|
+
}), Z = (t, m) => {
|
|
96
96
|
const e = t.__vccOpts || t;
|
|
97
|
-
for (const [
|
|
98
|
-
e[
|
|
97
|
+
for (const [b, o] of m)
|
|
98
|
+
e[b] = o;
|
|
99
99
|
return e;
|
|
100
|
-
}, Ka = /* @__PURE__ */ Z(Qe, [["__scopeId", "data-v-
|
|
100
|
+
}, Ka = /* @__PURE__ */ Z(Qe, [["__scopeId", "data-v-b7ffd034"]]), Ze = ["type", "disabled", "aria-label"], Xe = {
|
|
101
101
|
key: 0,
|
|
102
102
|
class: "w-4 h-4 animate-spin mr-2",
|
|
103
103
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -121,37 +121,37 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
121
121
|
textColorHover: { default: void 0 }
|
|
122
122
|
},
|
|
123
123
|
emits: ["click"],
|
|
124
|
-
setup(t, { emit:
|
|
125
|
-
const e = t,
|
|
126
|
-
const
|
|
127
|
-
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-
|
|
124
|
+
setup(t, { emit: m }) {
|
|
125
|
+
const e = t, b = m, o = r(() => e.variant === "icon"), f = r(() => e.badge > 99 ? "99+" : e.badge.toString()), p = r(() => {
|
|
126
|
+
const v = "inline-flex items-center justify-center font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", z = {
|
|
127
|
+
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-500 focus-visible:ring-primary-500",
|
|
128
128
|
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 hover:text-secondary-800 focus-visible:ring-secondary-500",
|
|
129
|
-
outline: "border border-secondary-300 bg-transparent hover:bg-
|
|
130
|
-
ghost: "hover:bg-
|
|
129
|
+
outline: "border border-secondary-300 bg-transparent hover:bg-primary-100 focus-visible:ring-secondary-500",
|
|
130
|
+
ghost: "hover:bg-primary-100 focus-visible:ring-secondary-500",
|
|
131
131
|
danger: "bg-danger-600 text-white hover:bg-danger-700 focus-visible:ring-danger-600",
|
|
132
|
-
icon: "hover:bg-
|
|
132
|
+
icon: "hover:bg-primary-100 hover:text-black focus-visible:ring-secondary-500 relative",
|
|
133
133
|
text: "bg-transparent border-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
|
134
134
|
}, k = {
|
|
135
|
-
sm:
|
|
136
|
-
md:
|
|
137
|
-
lg:
|
|
138
|
-
},
|
|
135
|
+
sm: o.value ? "p-1.5" : "h-8 px-3 text-sm",
|
|
136
|
+
md: o.value ? "p-2" : "h-10 px-4 text-base",
|
|
137
|
+
lg: o.value ? "p-3" : "h-12 px-6 text-lg"
|
|
138
|
+
}, y = {
|
|
139
139
|
full: "rounded-full",
|
|
140
140
|
xl: "rounded-2xl",
|
|
141
141
|
lg: "rounded-xl",
|
|
142
142
|
md: "rounded-lg",
|
|
143
143
|
sm: "rounded-md",
|
|
144
144
|
none: "rounded-none"
|
|
145
|
-
},
|
|
146
|
-
var
|
|
147
|
-
return e.textColorHover ? e.textColorHover : (
|
|
145
|
+
}, h = e.textColor ? e.textColor : "", V = r(() => {
|
|
146
|
+
var j, O;
|
|
147
|
+
return e.textColorHover ? e.textColorHover : (j = e.textColor) != null && j.includes("white") || (O = e.textColor) != null && O.includes("50") ? "hover:text-black" : "";
|
|
148
148
|
});
|
|
149
|
-
return `${
|
|
150
|
-
}), n = (
|
|
151
|
-
e.disabled ||
|
|
149
|
+
return `${v} ${z[e.variant]} ${k[e.size]} ${y[e.radius]} ${h} ${V.value}`;
|
|
150
|
+
}), n = (v) => {
|
|
151
|
+
e.disabled || b("click", v);
|
|
152
152
|
};
|
|
153
|
-
return (
|
|
154
|
-
class:
|
|
153
|
+
return (v, z) => (l(), a("button", {
|
|
154
|
+
class: u(p.value),
|
|
155
155
|
type: t.type,
|
|
156
156
|
disabled: t.disabled || t.loading,
|
|
157
157
|
onClick: n,
|
|
@@ -171,9 +171,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
171
171
|
fill: "currentColor",
|
|
172
172
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
173
173
|
}, null, -1)
|
|
174
|
-
])])) :
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
])])) : c("", !0),
|
|
175
|
+
L(v.$slots, "default"),
|
|
176
|
+
o.value && t.badge && t.badge > 0 ? (l(), a("span", _e, B(f.value), 1)) : c("", !0)
|
|
177
177
|
], 10, Ze));
|
|
178
178
|
}
|
|
179
179
|
}), et = /* @__PURE__ */ N({
|
|
@@ -188,16 +188,16 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
188
188
|
ariaLabel: {}
|
|
189
189
|
},
|
|
190
190
|
setup(t) {
|
|
191
|
-
const
|
|
191
|
+
const m = t, e = {
|
|
192
192
|
xs: "16px",
|
|
193
193
|
sm: "18px",
|
|
194
194
|
md: "20px",
|
|
195
195
|
lg: "24px",
|
|
196
196
|
xl: "30px",
|
|
197
197
|
"2xl": "36px"
|
|
198
|
-
},
|
|
198
|
+
}, b = (n, v) => {
|
|
199
199
|
const z = n.replace(/_/g, "-");
|
|
200
|
-
switch (
|
|
200
|
+
switch (v) {
|
|
201
201
|
case "filled":
|
|
202
202
|
return `material-symbols:${z}`;
|
|
203
203
|
case "outlined":
|
|
@@ -211,24 +211,24 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
211
211
|
default:
|
|
212
212
|
return `material-symbols:${z}`;
|
|
213
213
|
}
|
|
214
|
-
},
|
|
214
|
+
}, o = r(() => b(m.name, m.variant)), f = r(() => {
|
|
215
215
|
const n = [
|
|
216
216
|
"inline-flex items-center justify-center select-none",
|
|
217
217
|
"transition-transform duration-200"
|
|
218
218
|
];
|
|
219
|
-
return
|
|
220
|
-
}),
|
|
219
|
+
return m.color && (m.color.startsWith("text-") || m.color.startsWith("fill-")) && n.push(m.color), m.spin && n.push("animate-spin"), n.join(" ");
|
|
220
|
+
}), p = r(() => {
|
|
221
221
|
const n = {};
|
|
222
|
-
if (e[
|
|
223
|
-
const
|
|
224
|
-
n.transform =
|
|
222
|
+
if (e[m.size] ? (n.fontSize = e[m.size], n.width = e[m.size], n.height = e[m.size]) : (n.fontSize = m.size, n.width = m.size, n.height = m.size), m.color && !m.color.startsWith("text-") && !m.color.startsWith("fill-") && (n.color = m.color), m.rotate !== 0) {
|
|
223
|
+
const v = `rotate(${m.rotate}deg)`;
|
|
224
|
+
n.transform = v;
|
|
225
225
|
}
|
|
226
226
|
return n;
|
|
227
227
|
});
|
|
228
|
-
return (n,
|
|
229
|
-
icon:
|
|
230
|
-
class:
|
|
231
|
-
style: X(
|
|
228
|
+
return (n, v) => (l(), te(Re(Ye), {
|
|
229
|
+
icon: o.value,
|
|
230
|
+
class: u(f.value),
|
|
231
|
+
style: X(p.value),
|
|
232
232
|
"aria-label": t.ariaLabel,
|
|
233
233
|
role: t.ariaLabel ? "img" : void 0
|
|
234
234
|
}, null, 8, ["icon", "class", "style", "aria-label", "role"]));
|
|
@@ -251,7 +251,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
251
251
|
}, ft = {
|
|
252
252
|
key: 0,
|
|
253
253
|
class: "text-danger-600"
|
|
254
|
-
}, pt = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, vt = ["disabled", "placeholder", "value", "required"], bt = ["disabled"],
|
|
254
|
+
}, pt = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, vt = ["disabled", "placeholder", "value", "required"], bt = ["disabled"], mt = ["disabled", "placeholder", "value", "required"], gt = ["disabled"], yt = {
|
|
255
255
|
key: 3,
|
|
256
256
|
class: "mt-1 text-sm text-danger-600"
|
|
257
257
|
}, ht = {
|
|
@@ -288,8 +288,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
288
288
|
yearsPerRow: { default: 4 }
|
|
289
289
|
},
|
|
290
290
|
emits: ["update:modelValue", "date-select", "range-select", "multiple-select"],
|
|
291
|
-
setup(t, { emit:
|
|
292
|
-
const e = t,
|
|
291
|
+
setup(t, { emit: m }) {
|
|
292
|
+
const e = t, b = P([]), o = m, f = P(!1), p = P(null), n = P((/* @__PURE__ */ new Date()).getMonth()), v = P((/* @__PURE__ */ new Date()).getFullYear()), z = P(`calendar-${Math.random().toString(36).substr(2, 9)}`), k = P(null), y = P(null), h = [
|
|
293
293
|
"Enero",
|
|
294
294
|
"Febrero",
|
|
295
295
|
"Marzo",
|
|
@@ -302,17 +302,17 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
302
302
|
"Octubre",
|
|
303
303
|
"Noviembre",
|
|
304
304
|
"Diciembre"
|
|
305
|
-
],
|
|
305
|
+
], V = ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], j = r(() => ({ sm: "xs", md: "sm", lg: "md" })[e.size] || "sm"), O = r(() => {
|
|
306
306
|
const w = (/* @__PURE__ */ new Date()).getFullYear(), D = [];
|
|
307
|
-
for (let
|
|
308
|
-
D.push(
|
|
307
|
+
for (let T = w - 100; T <= w + 10; T++)
|
|
308
|
+
D.push(T);
|
|
309
309
|
return D;
|
|
310
|
-
}), F =
|
|
310
|
+
}), F = r(() => "ds-label"), q = r(() => e.bordered ? "border border-neutral-300" : ""), S = r(() => {
|
|
311
311
|
const w = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", D = {
|
|
312
312
|
sm: "px-3 py-1.5 pr-10 text-sm",
|
|
313
313
|
md: "px-4 py-2 pr-10 text-base",
|
|
314
314
|
lg: "px-5 py-3 pr-12 text-lg"
|
|
315
|
-
},
|
|
315
|
+
}, T = {
|
|
316
316
|
primary: "focus:ring-primary-500",
|
|
317
317
|
secondary: "focus:ring-secondary-500"
|
|
318
318
|
}, E = {
|
|
@@ -320,25 +320,25 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
320
320
|
filled: "bg-secondary-100",
|
|
321
321
|
outlined: "bg-transparent"
|
|
322
322
|
}, ee = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
323
|
-
return `${w} ${D[e.size]} ${E[e.variant]} ${
|
|
324
|
-
}),
|
|
323
|
+
return `${w} ${D[e.size]} ${E[e.variant]} ${T[e.color]} ${ee}`;
|
|
324
|
+
}), I = r(() => `transition-colors text-[#565656] hover:text-[#565656] opacity-80 hover:opacity-100 ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), W = r(() => "min-w-80 max-w-sm"), A = r(() => `p-2 rounded-md transition-colors ${{
|
|
325
325
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
326
326
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
327
|
-
}[e.color]}`),
|
|
327
|
+
}[e.color]}`), C = r(() => `px-2 py-1 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-1 ${{
|
|
328
328
|
primary: "focus:border-primary-500 focus:ring-primary-500",
|
|
329
329
|
secondary: "focus:border-secondary-500 focus:ring-secondary-500"
|
|
330
|
-
}[e.color]}`),
|
|
331
|
-
primary: "bg-primary-
|
|
330
|
+
}[e.color]}`), g = r(() => `px-3 py-1.5 text-sm text-white rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-not-allowed ${{
|
|
331
|
+
primary: "bg-primary-500 hover:bg-primary-600 focus:ring-primary-500",
|
|
332
332
|
secondary: "bg-secondary-600 hover:bg-secondary-700 focus:ring-secondary-500"
|
|
333
|
-
}[e.color]}`), d =
|
|
333
|
+
}[e.color]}`), d = r(() => `px-3 py-1.5 text-sm border border-secondary-300 rounded-md transition-colors focus:outline-none ${{
|
|
334
334
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
335
335
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
336
|
-
}[e.color]}`),
|
|
337
|
-
|
|
338
|
-
const R =
|
|
339
|
-
const w = new Date(
|
|
340
|
-
for (let U =
|
|
341
|
-
const se = new Date(
|
|
336
|
+
}[e.color]}`), $ = r(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? H(e.modelValue) : ""), i = r(() => e.mode === "multiple" && Array.isArray(e.modelValue) && e.modelValue.length > 0 ? e.modelValue.length === 1 ? H(e.modelValue[0]) : `${e.modelValue.length} fechas seleccionadas` : ""), M = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? H(e.modelValue.start) : ""), x = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? H(e.modelValue.end) : ""), le = r(() => e.mode === "single" ? k.value !== null : e.mode === "multiple" ? b.value.length > 0 : k.value !== null && y.value !== null && y.value >= k.value);
|
|
337
|
+
r(() => e.mode === "range" && k.value && y.value ? y.value < k.value : !1);
|
|
338
|
+
const R = r(() => {
|
|
339
|
+
const w = new Date(v.value, n.value, 1), D = new Date(v.value, n.value + 1, 0), T = w.getDay(), E = D.getDate(), ee = [], ae = new Date(v.value, n.value - 1, 0);
|
|
340
|
+
for (let U = T - 1; U >= 0; U--) {
|
|
341
|
+
const se = new Date(v.value, n.value - 1, ae.getDate() - U);
|
|
342
342
|
ee.push({
|
|
343
343
|
day: se.getDate(),
|
|
344
344
|
date: se,
|
|
@@ -348,7 +348,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
350
|
for (let U = 1; U <= E; U++) {
|
|
351
|
-
const se = new Date(
|
|
351
|
+
const se = new Date(v.value, n.value, U);
|
|
352
352
|
ee.push({
|
|
353
353
|
day: U,
|
|
354
354
|
date: se,
|
|
@@ -359,7 +359,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
359
359
|
}
|
|
360
360
|
const Pe = 42 - ee.length;
|
|
361
361
|
for (let U = 1; U <= Pe; U++) {
|
|
362
|
-
const se = new Date(
|
|
362
|
+
const se = new Date(v.value, n.value + 1, U);
|
|
363
363
|
ee.push({
|
|
364
364
|
day: U,
|
|
365
365
|
date: se,
|
|
@@ -370,18 +370,18 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
370
370
|
}
|
|
371
371
|
return ee;
|
|
372
372
|
}), H = (w) => {
|
|
373
|
-
const D = w.getDate().toString().padStart(2, "0"),
|
|
373
|
+
const D = w.getDate().toString().padStart(2, "0"), T = (w.getMonth() + 1).toString().padStart(2, "0"), E = w.getFullYear();
|
|
374
374
|
switch (e.dateFormat) {
|
|
375
375
|
case "MM/DD/YYYY":
|
|
376
|
-
return `${
|
|
376
|
+
return `${T}/${D}/${E}`;
|
|
377
377
|
case "YYYY-MM-DD":
|
|
378
|
-
return `${E}-${
|
|
378
|
+
return `${E}-${T}-${D}`;
|
|
379
379
|
case "DD/MM/YYYY":
|
|
380
380
|
default:
|
|
381
|
-
return `${D}/${
|
|
381
|
+
return `${D}/${T}/${E}`;
|
|
382
382
|
}
|
|
383
|
-
},
|
|
384
|
-
var
|
|
383
|
+
}, xe = (w) => {
|
|
384
|
+
var T;
|
|
385
385
|
const D = new Date(w.getFullYear(), w.getMonth(), w.getDate());
|
|
386
386
|
if (e.minDate) {
|
|
387
387
|
const E = new Date(e.minDate.getFullYear(), e.minDate.getMonth(), e.minDate.getDate());
|
|
@@ -391,19 +391,19 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
391
391
|
const E = new Date(e.maxDate.getFullYear(), e.maxDate.getMonth(), e.maxDate.getDate());
|
|
392
392
|
if (D > E) return !0;
|
|
393
393
|
}
|
|
394
|
-
return !!((
|
|
394
|
+
return !!((T = e.disabledDates) != null && T.some(
|
|
395
395
|
(E) => E.toDateString() === w.toDateString()
|
|
396
396
|
));
|
|
397
397
|
}, Ie = (w) => {
|
|
398
398
|
const D = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
|
|
399
|
-
if (w.disabled ||
|
|
399
|
+
if (w.disabled || xe(w.date))
|
|
400
400
|
return `${D} text-secondary-400 cursor-not-allowed`;
|
|
401
|
-
const
|
|
401
|
+
const T = je(w.date), E = Le(w.date), ee = Oe(w.date), ae = {
|
|
402
402
|
primary: {
|
|
403
403
|
selected: "bg-primary-600 text-white",
|
|
404
404
|
inRange: "bg-primary-100 text-primary-900",
|
|
405
|
-
today: "bg-primary-50 text-primary-
|
|
406
|
-
default: "text-secondary-700 hover:bg-primary-50 hover:text-primary-
|
|
405
|
+
today: "bg-primary-50 text-primary-500 border border-primary-300",
|
|
406
|
+
default: "text-secondary-700 hover:bg-primary-50 hover:text-primary-500",
|
|
407
407
|
otherMonth: "text-secondary-400 hover:bg-primary-50 hover:text-primary-600"
|
|
408
408
|
},
|
|
409
409
|
secondary: {
|
|
@@ -414,67 +414,67 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
414
414
|
otherMonth: "text-secondary-400 hover:bg-secondary-50 hover:text-secondary-600"
|
|
415
415
|
}
|
|
416
416
|
};
|
|
417
|
-
return
|
|
418
|
-
}, je = (w) => e.mode === "single" ? k.value ? oe(w, k.value) : !1 : e.mode === "multiple" ?
|
|
419
|
-
if (e.mode !== "range" || !k.value || !
|
|
417
|
+
return T ? `${D} ${ae[e.color].selected}` : E ? `${D} ${ae[e.color].inRange}` : ee ? `${D} ${ae[e.color].today}` : w.isCurrentMonth ? `${D} ${ae[e.color].default}` : `${D} ${ae[e.color].otherMonth}`;
|
|
418
|
+
}, je = (w) => e.mode === "single" ? k.value ? oe(w, k.value) : !1 : e.mode === "multiple" ? b.value.some((D) => oe(w, D)) : !!(k.value && oe(w, k.value)) || !!(y.value && oe(w, y.value)), Le = (w) => {
|
|
419
|
+
if (e.mode !== "range" || !k.value || !y.value)
|
|
420
420
|
return !1;
|
|
421
|
-
const D = k.value,
|
|
422
|
-
return w > D && w <
|
|
423
|
-
}, Oe = (w) => oe(w, /* @__PURE__ */ new Date()), oe = (w, D) => w.toDateString() === D.toDateString(),
|
|
424
|
-
e.disabled ||
|
|
425
|
-
},
|
|
426
|
-
e.disabled ||
|
|
427
|
-
},
|
|
428
|
-
e.disabled ||
|
|
429
|
-
}, ke = (w) => {
|
|
430
|
-
e.disabled || (ue(w), p.value || ne());
|
|
431
|
-
}, Ce = (w) => {
|
|
432
|
-
e.disabled || (ue(w), p.value || ne());
|
|
421
|
+
const D = k.value, T = y.value;
|
|
422
|
+
return w > D && w < T;
|
|
423
|
+
}, Oe = (w) => oe(w, /* @__PURE__ */ new Date()), oe = (w, D) => w.toDateString() === D.toDateString(), we = () => {
|
|
424
|
+
e.disabled || f.value || ne();
|
|
425
|
+
}, ke = () => {
|
|
426
|
+
e.disabled || f.value || ne();
|
|
427
|
+
}, Ce = () => {
|
|
428
|
+
e.disabled || Me();
|
|
433
429
|
}, $e = (w) => {
|
|
434
|
-
e.disabled || (ue(w),
|
|
430
|
+
e.disabled || (ue(w), f.value || ne());
|
|
431
|
+
}, Be = (w) => {
|
|
432
|
+
e.disabled || (ue(w), f.value || ne());
|
|
433
|
+
}, ze = (w) => {
|
|
434
|
+
e.disabled || (ue(w), Me());
|
|
435
435
|
}, ue = (w) => {
|
|
436
|
-
|
|
437
|
-
},
|
|
438
|
-
e.disabled || (
|
|
436
|
+
p.value = w;
|
|
437
|
+
}, Me = () => {
|
|
438
|
+
e.disabled || (f.value = !f.value, f.value && fe());
|
|
439
439
|
}, ne = () => {
|
|
440
|
-
e.disabled || (
|
|
440
|
+
e.disabled || (f.value = !0, fe());
|
|
441
441
|
}, ce = () => {
|
|
442
|
-
|
|
442
|
+
f.value = !1, p.value = null;
|
|
443
443
|
}, fe = () => {
|
|
444
|
-
e.mode === "single" ? (k.value = e.modelValue instanceof Date ? e.modelValue : null,
|
|
444
|
+
e.mode === "single" ? (k.value = e.modelValue instanceof Date ? e.modelValue : null, y.value = null) : e.mode === "multiple" ? b.value = Array.isArray(e.modelValue) ? [...e.modelValue] : [] : e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue ? (k.value = e.modelValue.start, y.value = e.modelValue.end) : (k.value = null, y.value = null);
|
|
445
445
|
}, Ae = (w) => {
|
|
446
446
|
if (e.mode === "single")
|
|
447
|
-
k.value = w,
|
|
447
|
+
k.value = w, y.value = null;
|
|
448
448
|
else if (e.mode === "multiple") {
|
|
449
|
-
const D =
|
|
450
|
-
D >= 0 ?
|
|
449
|
+
const D = b.value.findIndex((T) => oe(T, w));
|
|
450
|
+
D >= 0 ? b.value.splice(D, 1) : b.value.push(w);
|
|
451
451
|
} else
|
|
452
|
-
|
|
452
|
+
p.value === "start" || !k.value ? (k.value = w, y.value = null, p.value = "end") : (p.value === "end" || !y.value) && (w < k.value ? (y.value = k.value, k.value = w) : y.value = w, p.value = null);
|
|
453
453
|
}, Fe = () => {
|
|
454
454
|
if (e.mode === "single")
|
|
455
|
-
|
|
455
|
+
o("update:modelValue", k.value), k.value && o("date-select", k.value);
|
|
456
456
|
else if (e.mode === "multiple") {
|
|
457
|
-
const w = [...
|
|
458
|
-
|
|
457
|
+
const w = [...b.value].sort((D, T) => D.getTime() - T.getTime());
|
|
458
|
+
o("update:modelValue", w), o("multiple-select", w);
|
|
459
459
|
} else {
|
|
460
|
-
const w = { start: k.value, end:
|
|
461
|
-
|
|
460
|
+
const w = { start: k.value, end: y.value };
|
|
461
|
+
o("update:modelValue", w), o("range-select", w);
|
|
462
462
|
}
|
|
463
463
|
ce();
|
|
464
464
|
}, We = () => {
|
|
465
|
-
n.value === 0 ? (n.value = 11,
|
|
465
|
+
n.value === 0 ? (n.value = 11, v.value--) : n.value--;
|
|
466
466
|
}, qe = () => {
|
|
467
|
-
n.value === 11 ? (n.value = 0,
|
|
468
|
-
},
|
|
469
|
-
}, pe =
|
|
467
|
+
n.value === 11 ? (n.value = 0, v.value++) : n.value++;
|
|
468
|
+
}, De = () => {
|
|
469
|
+
}, pe = P(), Ve = (w) => {
|
|
470
470
|
pe.value && !pe.value.contains(w.target) && ce();
|
|
471
471
|
};
|
|
472
|
-
return
|
|
473
|
-
document.addEventListener("click",
|
|
474
|
-
}),
|
|
475
|
-
document.removeEventListener("click",
|
|
472
|
+
return me(() => {
|
|
473
|
+
document.addEventListener("click", Ve);
|
|
474
|
+
}), ge(() => {
|
|
475
|
+
document.removeEventListener("click", Ve);
|
|
476
476
|
}), de(() => e.modelValue, (w) => {
|
|
477
|
-
|
|
477
|
+
f.value || fe();
|
|
478
478
|
}, { deep: !0 }), (w, D) => (l(), a("div", {
|
|
479
479
|
ref_key: "calendarWrapperRef",
|
|
480
480
|
ref: pe,
|
|
@@ -484,35 +484,35 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
484
484
|
t.label && t.showLabel ? (l(), a("label", {
|
|
485
485
|
key: 0,
|
|
486
486
|
for: z.value,
|
|
487
|
-
class:
|
|
487
|
+
class: u(F.value)
|
|
488
488
|
}, [
|
|
489
|
-
Y(
|
|
490
|
-
t.required ? (l(), a("span", at, "*")) :
|
|
491
|
-
], 10, lt)) :
|
|
489
|
+
Y(B(t.label) + " ", 1),
|
|
490
|
+
t.required ? (l(), a("span", at, "*")) : c("", !0)
|
|
491
|
+
], 10, lt)) : c("", !0),
|
|
492
492
|
s("div", {
|
|
493
|
-
class:
|
|
493
|
+
class: u(["relative rounded-md", q.value])
|
|
494
494
|
}, [
|
|
495
495
|
s("input", {
|
|
496
496
|
id: z.value,
|
|
497
|
-
class:
|
|
497
|
+
class: u(S.value),
|
|
498
498
|
type: "text",
|
|
499
499
|
disabled: t.disabled,
|
|
500
500
|
placeholder: t.placeholder || "Seleccionar fecha",
|
|
501
|
-
value:
|
|
501
|
+
value: $.value,
|
|
502
502
|
required: t.required,
|
|
503
503
|
readonly: !0,
|
|
504
|
-
onClick:
|
|
505
|
-
onFocus:
|
|
504
|
+
onClick: we,
|
|
505
|
+
onFocus: ke
|
|
506
506
|
}, null, 42, st),
|
|
507
507
|
s("button", {
|
|
508
508
|
type: "button",
|
|
509
|
-
class:
|
|
510
|
-
onClick: J(
|
|
509
|
+
class: u(["absolute right-3 top-1/2 -translate-y-1/2", I.value]),
|
|
510
|
+
onClick: J(Ce, ["stop"]),
|
|
511
511
|
disabled: t.disabled
|
|
512
512
|
}, [
|
|
513
513
|
Q(_, {
|
|
514
514
|
name: t.iconName,
|
|
515
|
-
size:
|
|
515
|
+
size: j.value
|
|
516
516
|
}, null, 8, ["name", "size"])
|
|
517
517
|
], 10, ot)
|
|
518
518
|
], 2)
|
|
@@ -520,105 +520,105 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
520
520
|
t.label && t.showLabel ? (l(), a("label", {
|
|
521
521
|
key: 0,
|
|
522
522
|
for: z.value,
|
|
523
|
-
class:
|
|
523
|
+
class: u(F.value)
|
|
524
524
|
}, [
|
|
525
|
-
Y(
|
|
526
|
-
t.required ? (l(), a("span", it, "*")) :
|
|
527
|
-
], 10, nt)) :
|
|
525
|
+
Y(B(t.label) + " ", 1),
|
|
526
|
+
t.required ? (l(), a("span", it, "*")) : c("", !0)
|
|
527
|
+
], 10, nt)) : c("", !0),
|
|
528
528
|
s("div", {
|
|
529
|
-
class:
|
|
529
|
+
class: u(["relative rounded-md", q.value])
|
|
530
530
|
}, [
|
|
531
531
|
s("input", {
|
|
532
532
|
id: z.value,
|
|
533
|
-
class:
|
|
533
|
+
class: u(S.value),
|
|
534
534
|
type: "text",
|
|
535
535
|
disabled: t.disabled,
|
|
536
536
|
placeholder: t.placeholder || "Seleccionar fechas",
|
|
537
537
|
value: i.value,
|
|
538
538
|
required: t.required,
|
|
539
539
|
readonly: !0,
|
|
540
|
-
onClick:
|
|
541
|
-
onFocus:
|
|
540
|
+
onClick: we,
|
|
541
|
+
onFocus: ke
|
|
542
542
|
}, null, 42, dt),
|
|
543
543
|
s("button", {
|
|
544
544
|
type: "button",
|
|
545
|
-
class:
|
|
546
|
-
onClick: J(
|
|
545
|
+
class: u(["absolute right-3 top-1/2 -translate-y-1/2", I.value]),
|
|
546
|
+
onClick: J(Ce, ["stop"]),
|
|
547
547
|
disabled: t.disabled
|
|
548
548
|
}, [
|
|
549
549
|
Q(_, {
|
|
550
550
|
name: t.iconName,
|
|
551
|
-
size:
|
|
551
|
+
size: j.value
|
|
552
552
|
}, null, 8, ["name", "size"])
|
|
553
553
|
], 10, ut)
|
|
554
554
|
], 2)
|
|
555
555
|
])) : (l(), a("div", ct, [
|
|
556
556
|
t.label && t.showLabel ? (l(), a("label", {
|
|
557
557
|
key: 0,
|
|
558
|
-
class:
|
|
558
|
+
class: u(F.value)
|
|
559
559
|
}, [
|
|
560
|
-
Y(
|
|
561
|
-
t.required ? (l(), a("span", ft, "*")) :
|
|
562
|
-
], 2)) :
|
|
560
|
+
Y(B(t.label) + " ", 1),
|
|
561
|
+
t.required ? (l(), a("span", ft, "*")) : c("", !0)
|
|
562
|
+
], 2)) : c("", !0),
|
|
563
563
|
s("div", pt, [
|
|
564
564
|
s("div", {
|
|
565
|
-
class:
|
|
565
|
+
class: u(["relative rounded-md", q.value])
|
|
566
566
|
}, [
|
|
567
567
|
s("input", {
|
|
568
|
-
class:
|
|
568
|
+
class: u(S.value),
|
|
569
569
|
type: "text",
|
|
570
570
|
disabled: t.disabled,
|
|
571
571
|
placeholder: t.startPlaceholder || "Fecha desde",
|
|
572
572
|
value: M.value,
|
|
573
573
|
required: t.required,
|
|
574
574
|
readonly: !0,
|
|
575
|
-
onClick: D[0] || (D[0] = () =>
|
|
576
|
-
onFocus: D[1] || (D[1] = () =>
|
|
575
|
+
onClick: D[0] || (D[0] = () => $e("start")),
|
|
576
|
+
onFocus: D[1] || (D[1] = () => Be("start"))
|
|
577
577
|
}, null, 42, vt),
|
|
578
578
|
s("button", {
|
|
579
579
|
type: "button",
|
|
580
|
-
class:
|
|
581
|
-
onClick: D[2] || (D[2] = J(() =>
|
|
580
|
+
class: u(["absolute right-3 top-1/2 -translate-y-1/2", I.value]),
|
|
581
|
+
onClick: D[2] || (D[2] = J(() => ze("start"), ["stop"])),
|
|
582
582
|
disabled: t.disabled
|
|
583
583
|
}, [
|
|
584
584
|
Q(_, {
|
|
585
585
|
name: t.startIconName,
|
|
586
|
-
size:
|
|
586
|
+
size: j.value
|
|
587
587
|
}, null, 8, ["name", "size"])
|
|
588
588
|
], 10, bt)
|
|
589
589
|
], 2),
|
|
590
590
|
s("div", {
|
|
591
|
-
class:
|
|
591
|
+
class: u(["relative rounded-md", q.value])
|
|
592
592
|
}, [
|
|
593
593
|
s("input", {
|
|
594
|
-
class:
|
|
594
|
+
class: u(S.value),
|
|
595
595
|
type: "text",
|
|
596
596
|
disabled: t.disabled,
|
|
597
597
|
placeholder: t.endPlaceholder || "Fecha hasta",
|
|
598
598
|
value: x.value,
|
|
599
599
|
required: t.required,
|
|
600
600
|
readonly: !0,
|
|
601
|
-
onClick: D[3] || (D[3] = () =>
|
|
602
|
-
onFocus: D[4] || (D[4] = () =>
|
|
603
|
-
}, null, 42,
|
|
601
|
+
onClick: D[3] || (D[3] = () => $e("end")),
|
|
602
|
+
onFocus: D[4] || (D[4] = () => Be("end"))
|
|
603
|
+
}, null, 42, mt),
|
|
604
604
|
s("button", {
|
|
605
605
|
type: "button",
|
|
606
|
-
class:
|
|
607
|
-
onClick: D[5] || (D[5] = J(() =>
|
|
606
|
+
class: u(["absolute right-3 top-1/2 -translate-y-1/2", I.value]),
|
|
607
|
+
onClick: D[5] || (D[5] = J(() => ze("end"), ["stop"])),
|
|
608
608
|
disabled: t.disabled
|
|
609
609
|
}, [
|
|
610
610
|
Q(_, {
|
|
611
611
|
name: t.endIconName,
|
|
612
|
-
size:
|
|
612
|
+
size: j.value
|
|
613
613
|
}, null, 8, ["name", "size"])
|
|
614
|
-
], 10,
|
|
614
|
+
], 10, gt)
|
|
615
615
|
], 2)
|
|
616
616
|
])
|
|
617
617
|
])),
|
|
618
|
-
t.error ? (l(), a("p", yt,
|
|
619
|
-
|
|
618
|
+
t.error ? (l(), a("p", yt, B(t.error), 1)) : t.helperText ? (l(), a("p", ht, B(t.helperText), 1)) : c("", !0),
|
|
619
|
+
f.value ? (l(), a("div", {
|
|
620
620
|
key: 5,
|
|
621
|
-
class:
|
|
621
|
+
class: u(["absolute top-full mt-1 left-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden p-4", W.value]),
|
|
622
622
|
onClick: D[8] || (D[8] = J(() => {
|
|
623
623
|
}, ["stop"]))
|
|
624
624
|
}, [
|
|
@@ -626,7 +626,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
626
626
|
s("button", {
|
|
627
627
|
type: "button",
|
|
628
628
|
onClick: We,
|
|
629
|
-
class:
|
|
629
|
+
class: u(A.value)
|
|
630
630
|
}, [
|
|
631
631
|
Q(_, {
|
|
632
632
|
name: "chevron-left",
|
|
@@ -635,34 +635,34 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
635
635
|
], 2),
|
|
636
636
|
s("div", wt, [
|
|
637
637
|
ve(s("select", {
|
|
638
|
-
"onUpdate:modelValue": D[6] || (D[6] = (
|
|
639
|
-
class:
|
|
640
|
-
onChange:
|
|
638
|
+
"onUpdate:modelValue": D[6] || (D[6] = (T) => n.value = T),
|
|
639
|
+
class: u(C.value),
|
|
640
|
+
onChange: De
|
|
641
641
|
}, [
|
|
642
|
-
(l(), a(K, null, G(
|
|
642
|
+
(l(), a(K, null, G(h, (T, E) => s("option", {
|
|
643
643
|
key: E,
|
|
644
644
|
value: E
|
|
645
|
-
},
|
|
645
|
+
}, B(T), 9, kt)), 64))
|
|
646
646
|
], 34), [
|
|
647
|
-
[
|
|
647
|
+
[Te, n.value]
|
|
648
648
|
]),
|
|
649
649
|
ve(s("select", {
|
|
650
|
-
"onUpdate:modelValue": D[7] || (D[7] = (
|
|
651
|
-
class:
|
|
652
|
-
onChange:
|
|
650
|
+
"onUpdate:modelValue": D[7] || (D[7] = (T) => v.value = T),
|
|
651
|
+
class: u(C.value),
|
|
652
|
+
onChange: De
|
|
653
653
|
}, [
|
|
654
|
-
(l(!0), a(K, null, G(
|
|
655
|
-
key:
|
|
656
|
-
value:
|
|
657
|
-
},
|
|
654
|
+
(l(!0), a(K, null, G(O.value, (T) => (l(), a("option", {
|
|
655
|
+
key: T,
|
|
656
|
+
value: T
|
|
657
|
+
}, B(T), 9, Ct))), 128))
|
|
658
658
|
], 34), [
|
|
659
|
-
[
|
|
659
|
+
[Te, v.value]
|
|
660
660
|
])
|
|
661
661
|
]),
|
|
662
662
|
s("button", {
|
|
663
663
|
type: "button",
|
|
664
664
|
onClick: qe,
|
|
665
|
-
class:
|
|
665
|
+
class: u(A.value)
|
|
666
666
|
}, [
|
|
667
667
|
Q(_, {
|
|
668
668
|
name: "chevron-right",
|
|
@@ -671,37 +671,37 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
671
671
|
], 2)
|
|
672
672
|
]),
|
|
673
673
|
s("div", $t, [
|
|
674
|
-
(l(), a(K, null, G(
|
|
675
|
-
key:
|
|
674
|
+
(l(), a(K, null, G(V, (T) => s("div", {
|
|
675
|
+
key: T,
|
|
676
676
|
class: "text-center text-sm font-medium text-secondary-600 py-2"
|
|
677
|
-
},
|
|
677
|
+
}, B(T), 1)), 64))
|
|
678
678
|
]),
|
|
679
679
|
s("div", Bt, [
|
|
680
|
-
(l(!0), a(K, null, G(R.value, (
|
|
681
|
-
key:
|
|
680
|
+
(l(!0), a(K, null, G(R.value, (T) => (l(), a("button", {
|
|
681
|
+
key: T.key,
|
|
682
682
|
type: "button",
|
|
683
|
-
class:
|
|
684
|
-
disabled:
|
|
685
|
-
onClick: (E) => Ae(
|
|
686
|
-
},
|
|
683
|
+
class: u(Ie(T)),
|
|
684
|
+
disabled: T.disabled || xe(T.date),
|
|
685
|
+
onClick: (E) => Ae(T.date)
|
|
686
|
+
}, B(T.day), 11, zt))), 128))
|
|
687
687
|
]),
|
|
688
688
|
s("div", Mt, [
|
|
689
689
|
s("button", {
|
|
690
690
|
type: "button",
|
|
691
|
-
class:
|
|
691
|
+
class: u(d.value),
|
|
692
692
|
onClick: ce
|
|
693
693
|
}, " Cancelar ", 2),
|
|
694
694
|
s("button", {
|
|
695
695
|
type: "button",
|
|
696
|
-
class:
|
|
696
|
+
class: u(g.value),
|
|
697
697
|
onClick: Fe,
|
|
698
698
|
disabled: !le.value
|
|
699
699
|
}, " Confirmar ", 10, Dt)
|
|
700
700
|
])
|
|
701
|
-
], 2)) :
|
|
701
|
+
], 2)) : c("", !0)
|
|
702
702
|
], 512));
|
|
703
703
|
}
|
|
704
|
-
}), Ja = /* @__PURE__ */ Z(Vt, [["__scopeId", "data-v-
|
|
704
|
+
}), Ja = /* @__PURE__ */ Z(Vt, [["__scopeId", "data-v-ea1b0e14"]]), Tt = ["role", "tabindex"], St = {
|
|
705
705
|
key: 0,
|
|
706
706
|
class: "border-b border-gray-100 px-6 py-4"
|
|
707
707
|
}, It = { class: "px-6 py-4" }, jt = {
|
|
@@ -718,51 +718,51 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
718
718
|
disabled: { type: Boolean, default: !1 }
|
|
719
719
|
},
|
|
720
720
|
emits: ["click"],
|
|
721
|
-
setup(t, { emit:
|
|
722
|
-
const e = t,
|
|
721
|
+
setup(t, { emit: m }) {
|
|
722
|
+
const e = t, b = m, o = {
|
|
723
723
|
none: "",
|
|
724
724
|
sm: "shadow-sm",
|
|
725
725
|
md: "shadow",
|
|
726
726
|
lg: "shadow-lg",
|
|
727
727
|
xl: "shadow-xl"
|
|
728
|
-
},
|
|
728
|
+
}, f = {
|
|
729
729
|
none: "rounded-none",
|
|
730
730
|
sm: "rounded-sm",
|
|
731
731
|
md: "rounded-md",
|
|
732
732
|
lg: "rounded-lg",
|
|
733
733
|
xl: "rounded-xl",
|
|
734
734
|
full: "rounded-full"
|
|
735
|
-
},
|
|
735
|
+
}, p = r(() => [
|
|
736
736
|
"w-full bg-white",
|
|
737
|
-
|
|
738
|
-
|
|
737
|
+
o[e.shadow],
|
|
738
|
+
f[e.rounded],
|
|
739
739
|
e.bordered ? "border border-gray-200" : "",
|
|
740
740
|
e.hoverable || e.clickable ? "transition-all duration-200" : "",
|
|
741
741
|
e.hoverable ? "hover:shadow-lg" : "",
|
|
742
742
|
e.clickable && !e.disabled ? "cursor-pointer hover:shadow-lg" : "",
|
|
743
743
|
e.clickable && e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
744
|
-
]), n = (
|
|
745
|
-
!e.disabled && e.clickable &&
|
|
744
|
+
]), n = (v) => {
|
|
745
|
+
!e.disabled && e.clickable && b("click", v);
|
|
746
746
|
};
|
|
747
|
-
return (
|
|
748
|
-
class:
|
|
747
|
+
return (v, z) => (l(), a("div", {
|
|
748
|
+
class: u(p.value),
|
|
749
749
|
role: t.clickable ? "button" : void 0,
|
|
750
750
|
tabindex: t.clickable ? 0 : void 0,
|
|
751
751
|
onClick: n,
|
|
752
752
|
onKeydown: [
|
|
753
|
-
|
|
754
|
-
|
|
753
|
+
Se(n, ["enter"]),
|
|
754
|
+
Se(n, ["space"])
|
|
755
755
|
]
|
|
756
756
|
}, [
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
])) :
|
|
757
|
+
v.$slots.header ? (l(), a("div", St, [
|
|
758
|
+
L(v.$slots, "header")
|
|
759
|
+
])) : c("", !0),
|
|
760
760
|
s("div", It, [
|
|
761
|
-
|
|
761
|
+
L(v.$slots, "default")
|
|
762
762
|
]),
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
])) :
|
|
763
|
+
v.$slots.footer ? (l(), a("div", jt, [
|
|
764
|
+
L(v.$slots, "footer")
|
|
765
|
+
])) : c("", !0)
|
|
766
766
|
], 42, Tt));
|
|
767
767
|
}
|
|
768
768
|
}), Lt = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, Ot = { class: "text-xl font-semibold text-gray-900" }, At = ["disabled"], Ft = { class: "px-8 py-6" }, Wt = {
|
|
@@ -778,37 +778,37 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
778
778
|
loading: { type: Boolean, default: !1 }
|
|
779
779
|
},
|
|
780
780
|
emits: ["update:modelValue", "close"],
|
|
781
|
-
setup(t, { emit:
|
|
782
|
-
const e = t,
|
|
781
|
+
setup(t, { emit: m }) {
|
|
782
|
+
const e = t, b = m, o = r({
|
|
783
783
|
get: () => e.modelValue,
|
|
784
|
-
set: (
|
|
785
|
-
}),
|
|
784
|
+
set: (v) => b("update:modelValue", v)
|
|
785
|
+
}), f = r(() => ({
|
|
786
786
|
sm: "sm:max-w-sm",
|
|
787
787
|
md: "sm:max-w-lg md:max-w-2xl",
|
|
788
788
|
lg: "sm:max-w-2xl md:max-w-4xl",
|
|
789
789
|
xl: "sm:max-w-4xl md:max-w-6xl"
|
|
790
|
-
})[e.size]),
|
|
791
|
-
e.loading || (
|
|
790
|
+
})[e.size]), p = () => {
|
|
791
|
+
e.loading || (o.value = !1, b("close"));
|
|
792
792
|
}, n = () => {
|
|
793
|
-
e.closeOnBackdrop && !e.loading &&
|
|
793
|
+
e.closeOnBackdrop && !e.loading && p();
|
|
794
794
|
};
|
|
795
|
-
return (
|
|
795
|
+
return (v, z) => (l(), te(ye, { to: "body" }, [
|
|
796
796
|
Q(ie, { name: "dialog" }, {
|
|
797
797
|
default: re(() => [
|
|
798
|
-
|
|
798
|
+
o.value ? (l(), a("div", {
|
|
799
799
|
key: 0,
|
|
800
800
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4",
|
|
801
801
|
onClick: n
|
|
802
802
|
}, [
|
|
803
803
|
s("div", {
|
|
804
|
-
class:
|
|
804
|
+
class: u(["relative w-full rounded-lg bg-white shadow-xl", f.value]),
|
|
805
805
|
onClick: z[0] || (z[0] = J(() => {
|
|
806
806
|
}, ["stop"]))
|
|
807
807
|
}, [
|
|
808
808
|
s("div", Lt, [
|
|
809
809
|
s("h2", Ot, [
|
|
810
|
-
|
|
811
|
-
Y(
|
|
810
|
+
L(v.$slots, "title", {}, () => [
|
|
811
|
+
Y(B(t.title), 1)
|
|
812
812
|
], !0)
|
|
813
813
|
]),
|
|
814
814
|
s("button", {
|
|
@@ -816,7 +816,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
816
816
|
class: "inline-flex items-center justify-center rounded-md p-1 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
817
817
|
"aria-label": "Cerrar diálogo",
|
|
818
818
|
disabled: t.loading,
|
|
819
|
-
onClick:
|
|
819
|
+
onClick: p
|
|
820
820
|
}, [...z[1] || (z[1] = [
|
|
821
821
|
s("svg", {
|
|
822
822
|
class: "h-6 w-6",
|
|
@@ -834,7 +834,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
834
834
|
])], 8, At)
|
|
835
835
|
]),
|
|
836
836
|
s("div", Ft, [
|
|
837
|
-
|
|
837
|
+
L(v.$slots, "default", {}, void 0, !0)
|
|
838
838
|
]),
|
|
839
839
|
t.loading ? (l(), a("div", Wt, [...z[2] || (z[2] = [
|
|
840
840
|
s("div", { class: "flex items-center gap-2 text-primary-600" }, [
|
|
@@ -860,27 +860,27 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
860
860
|
]),
|
|
861
861
|
s("span", { class: "text-sm font-medium" }, "Cargando...")
|
|
862
862
|
], -1)
|
|
863
|
-
])])) :
|
|
864
|
-
|
|
863
|
+
])])) : c("", !0),
|
|
864
|
+
v.$slots.footer ? (l(), a("div", {
|
|
865
865
|
key: 1,
|
|
866
|
-
class:
|
|
866
|
+
class: u(["border-t border-gray-100 px-8 py-6 bg-gray-50", { "opacity-50 pointer-events-none": t.loading }])
|
|
867
867
|
}, [
|
|
868
|
-
|
|
869
|
-
], 2)) :
|
|
868
|
+
L(v.$slots, "footer", {}, void 0, !0)
|
|
869
|
+
], 2)) : c("", !0)
|
|
870
870
|
], 2)
|
|
871
|
-
])) :
|
|
871
|
+
])) : c("", !0)
|
|
872
872
|
]),
|
|
873
873
|
_: 3
|
|
874
874
|
})
|
|
875
875
|
]));
|
|
876
876
|
}
|
|
877
|
-
}), Qa = /* @__PURE__ */ Z(qt, [["__scopeId", "data-v-
|
|
877
|
+
}), Qa = /* @__PURE__ */ Z(qt, [["__scopeId", "data-v-ea6db288"]]), Pt = ["accept", "multiple", "disabled"], Rt = { class: "flex flex-col items-center justify-center gap-4 text-center" }, Et = ["src", "alt"], Yt = {
|
|
878
878
|
key: 1,
|
|
879
879
|
class: "w-full h-full text-gray-400",
|
|
880
880
|
fill: "none",
|
|
881
881
|
stroke: "currentColor",
|
|
882
882
|
viewBox: "0 0 24 24"
|
|
883
|
-
}, Nt = { class: "text-center" }, Ht = { class: "text-base font-medium text-gray-700" }, Kt = { class: "text-primary-
|
|
883
|
+
}, Nt = { class: "text-center" }, Ht = { class: "text-base font-medium text-gray-700" }, Kt = { class: "text-primary-500" }, Ut = { class: "flex items-center gap-3 flex-1 min-w-0" }, Jt = { class: "flex-1 min-w-0" }, Gt = { class: "text-sm font-medium text-gray-900 truncate" }, Qt = { class: "text-xs text-gray-500" }, Zt = {
|
|
884
884
|
key: 1,
|
|
885
885
|
class: "text-xs text-gray-500 mt-2"
|
|
886
886
|
}, Xt = {
|
|
@@ -908,73 +908,73 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
908
908
|
progress: { default: 0 }
|
|
909
909
|
},
|
|
910
910
|
emits: ["update:modelValue", "change", "error"],
|
|
911
|
-
setup(t, { emit:
|
|
912
|
-
const e = t,
|
|
911
|
+
setup(t, { emit: m }) {
|
|
912
|
+
const e = t, b = m, o = P(null), f = P(!1), p = P(e.modelValue), n = P(""), v = r(() => ({
|
|
913
913
|
sm: "w-20 h-20",
|
|
914
914
|
md: "w-32 h-32",
|
|
915
915
|
lg: "w-48 h-48",
|
|
916
916
|
xl: "w-64 h-64"
|
|
917
917
|
})[e.illustrationSize]), z = () => {
|
|
918
|
-
var
|
|
919
|
-
(
|
|
918
|
+
var S;
|
|
919
|
+
(S = o.value) == null || S.click();
|
|
920
920
|
}, k = () => {
|
|
921
921
|
e.disabled || z();
|
|
922
|
-
},
|
|
923
|
-
e.disabled || (
|
|
924
|
-
},
|
|
925
|
-
|
|
926
|
-
},
|
|
927
|
-
if (n.value = "", e.maxSize &&
|
|
928
|
-
const
|
|
929
|
-
return n.value = `El archivo excede el tamaño máximo de ${
|
|
922
|
+
}, y = (S) => {
|
|
923
|
+
e.disabled || (f.value = !0);
|
|
924
|
+
}, h = () => {
|
|
925
|
+
f.value = !1;
|
|
926
|
+
}, V = (S) => {
|
|
927
|
+
if (n.value = "", e.maxSize && S.size > e.maxSize) {
|
|
928
|
+
const I = (e.maxSize / 1048576).toFixed(2);
|
|
929
|
+
return n.value = `El archivo excede el tamaño máximo de ${I}MB`, b("error", n.value), !1;
|
|
930
930
|
}
|
|
931
931
|
return !0;
|
|
932
|
-
},
|
|
933
|
-
var
|
|
934
|
-
const
|
|
935
|
-
|
|
936
|
-
},
|
|
937
|
-
var
|
|
938
|
-
|
|
939
|
-
const
|
|
940
|
-
|
|
932
|
+
}, j = (S) => {
|
|
933
|
+
var A;
|
|
934
|
+
const W = (A = S.target.files) == null ? void 0 : A[0];
|
|
935
|
+
W && V(W) && (p.value = W, b("update:modelValue", W), b("change", W));
|
|
936
|
+
}, O = (S) => {
|
|
937
|
+
var W;
|
|
938
|
+
f.value = !1;
|
|
939
|
+
const I = (W = S.dataTransfer) == null ? void 0 : W.files[0];
|
|
940
|
+
I && V(I) && (p.value = I, b("update:modelValue", I), b("change", I));
|
|
941
941
|
}, F = () => {
|
|
942
|
-
|
|
943
|
-
},
|
|
944
|
-
if (
|
|
945
|
-
const
|
|
946
|
-
return Math.round(
|
|
942
|
+
p.value = null, n.value = "", o.value && (o.value.value = ""), b("update:modelValue", null), b("change", null);
|
|
943
|
+
}, q = (S) => {
|
|
944
|
+
if (S === 0) return "0 Bytes";
|
|
945
|
+
const I = 1024, W = ["Bytes", "KB", "MB", "GB"], A = Math.floor(Math.log(S) / Math.log(I));
|
|
946
|
+
return Math.round(S / Math.pow(I, A) * 100) / 100 + " " + W[A];
|
|
947
947
|
};
|
|
948
|
-
return (
|
|
949
|
-
class:
|
|
950
|
-
|
|
948
|
+
return (S, I) => (l(), a("div", {
|
|
949
|
+
class: u(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
950
|
+
f.value ? "border-primary-500 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
951
951
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
952
952
|
]]),
|
|
953
953
|
onClick: k,
|
|
954
|
-
onDragover: J(
|
|
955
|
-
onDragleave: J(
|
|
956
|
-
onDrop: J(
|
|
954
|
+
onDragover: J(y, ["prevent"]),
|
|
955
|
+
onDragleave: J(h, ["prevent"]),
|
|
956
|
+
onDrop: J(O, ["prevent"])
|
|
957
957
|
}, [
|
|
958
958
|
s("input", {
|
|
959
959
|
ref_key: "fileInput",
|
|
960
|
-
ref:
|
|
960
|
+
ref: o,
|
|
961
961
|
type: "file",
|
|
962
962
|
accept: t.accept,
|
|
963
963
|
multiple: t.multiple,
|
|
964
964
|
disabled: t.disabled,
|
|
965
965
|
class: "hidden",
|
|
966
|
-
onChange:
|
|
966
|
+
onChange: j
|
|
967
967
|
}, null, 40, Pt),
|
|
968
968
|
s("div", Rt, [
|
|
969
969
|
s("div", {
|
|
970
|
-
class:
|
|
970
|
+
class: u([v.value, "flex items-center justify-center"])
|
|
971
971
|
}, [
|
|
972
972
|
t.illustration ? (l(), a("img", {
|
|
973
973
|
key: 0,
|
|
974
974
|
src: t.illustration,
|
|
975
975
|
alt: t.illustrationAlt,
|
|
976
976
|
class: "max-w-full max-h-full object-contain"
|
|
977
|
-
}, null, 8, Et)) : (l(), a("svg", Yt, [...
|
|
977
|
+
}, null, 8, Et)) : (l(), a("svg", Yt, [...I[1] || (I[1] = [
|
|
978
978
|
s("path", {
|
|
979
979
|
"stroke-linecap": "round",
|
|
980
980
|
"stroke-linejoin": "round",
|
|
@@ -985,18 +985,18 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
985
985
|
], 2),
|
|
986
986
|
s("div", Nt, [
|
|
987
987
|
s("p", Ht, [
|
|
988
|
-
Y(
|
|
989
|
-
s("span", Kt,
|
|
988
|
+
Y(B(t.mainText) + " ", 1),
|
|
989
|
+
s("span", Kt, B(t.linkText), 1)
|
|
990
990
|
])
|
|
991
991
|
]),
|
|
992
|
-
|
|
992
|
+
p.value ? (l(), a("div", {
|
|
993
993
|
key: 0,
|
|
994
994
|
class: "w-full max-w-md bg-gray-50 rounded-lg p-4 flex items-center justify-between",
|
|
995
|
-
onClick:
|
|
995
|
+
onClick: I[0] || (I[0] = J(() => {
|
|
996
996
|
}, ["stop"]))
|
|
997
997
|
}, [
|
|
998
998
|
s("div", Ut, [
|
|
999
|
-
|
|
999
|
+
I[2] || (I[2] = s("svg", {
|
|
1000
1000
|
class: "w-6 h-6 text-gray-600 flex-shrink-0",
|
|
1001
1001
|
fill: "none",
|
|
1002
1002
|
stroke: "currentColor",
|
|
@@ -1010,15 +1010,15 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1010
1010
|
})
|
|
1011
1011
|
], -1)),
|
|
1012
1012
|
s("div", Jt, [
|
|
1013
|
-
s("p", Gt,
|
|
1014
|
-
s("p", Qt,
|
|
1013
|
+
s("p", Gt, B(p.value.name), 1),
|
|
1014
|
+
s("p", Qt, B(q(p.value.size)), 1)
|
|
1015
1015
|
])
|
|
1016
1016
|
]),
|
|
1017
|
-
t.disabled ?
|
|
1017
|
+
t.disabled ? c("", !0) : (l(), a("button", {
|
|
1018
1018
|
key: 0,
|
|
1019
1019
|
onClick: J(F, ["stop"]),
|
|
1020
1020
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
1021
|
-
}, [...
|
|
1021
|
+
}, [...I[3] || (I[3] = [
|
|
1022
1022
|
s("svg", {
|
|
1023
1023
|
class: "w-5 h-5",
|
|
1024
1024
|
fill: "currentColor",
|
|
@@ -1031,9 +1031,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1031
1031
|
})
|
|
1032
1032
|
], -1)
|
|
1033
1033
|
])]))
|
|
1034
|
-
])) :
|
|
1035
|
-
t.helperText ? (l(), a("p", Zt,
|
|
1036
|
-
n.value ? (l(), a("p", Xt,
|
|
1034
|
+
])) : c("", !0),
|
|
1035
|
+
t.helperText ? (l(), a("p", Zt, B(t.helperText), 1)) : c("", !0),
|
|
1036
|
+
n.value ? (l(), a("p", Xt, B(n.value), 1)) : c("", !0)
|
|
1037
1037
|
])
|
|
1038
1038
|
], 34));
|
|
1039
1039
|
}
|
|
@@ -1077,42 +1077,42 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1077
1077
|
suffix: { default: void 0 }
|
|
1078
1078
|
},
|
|
1079
1079
|
emits: ["update:modelValue", "blur", "focus", "clear"],
|
|
1080
|
-
setup(t, { emit:
|
|
1081
|
-
const e = t,
|
|
1082
|
-
const
|
|
1080
|
+
setup(t, { emit: m }) {
|
|
1081
|
+
const e = t, b = m, o = P(`input-${Math.random().toString(36).substr(2, 9)}`), f = r(() => "ds-label"), p = r(() => {
|
|
1082
|
+
const y = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", h = {
|
|
1083
1083
|
sm: "h-8 px-3 text-sm",
|
|
1084
1084
|
md: "h-10 px-4 text-base",
|
|
1085
1085
|
lg: "h-12 px-5 text-lg"
|
|
1086
|
-
},
|
|
1086
|
+
}, V = {
|
|
1087
1087
|
default: "border border-secondary-300 bg-white focus:border-primary-500 focus:ring-primary-500",
|
|
1088
1088
|
filled: "border-0 bg-secondary-100 focus:bg-white focus:ring-primary-500",
|
|
1089
1089
|
outlined: "border-2 border-secondary-300 bg-transparent focus:border-primary-500 focus:ring-primary-500"
|
|
1090
|
-
},
|
|
1091
|
-
return `${
|
|
1092
|
-
}), n = (
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
},
|
|
1096
|
-
|
|
1097
|
-
}, z = (
|
|
1098
|
-
|
|
1090
|
+
}, j = e.error ? "border-danger-500 focus:border-danger-500 focus:ring-danger-500 pr-10" : "";
|
|
1091
|
+
return `${y} ${h[e.size]} ${V[e.variant]} ${j}`;
|
|
1092
|
+
}), n = (y) => {
|
|
1093
|
+
const h = y.target;
|
|
1094
|
+
b("update:modelValue", h.value);
|
|
1095
|
+
}, v = (y) => {
|
|
1096
|
+
b("blur", y);
|
|
1097
|
+
}, z = (y) => {
|
|
1098
|
+
b("focus", y);
|
|
1099
1099
|
}, k = () => {
|
|
1100
|
-
|
|
1100
|
+
b("update:modelValue", ""), b("clear");
|
|
1101
1101
|
};
|
|
1102
|
-
return (
|
|
1102
|
+
return (y, h) => (l(), a("div", _t, [
|
|
1103
1103
|
t.label ? (l(), a("label", {
|
|
1104
1104
|
key: 0,
|
|
1105
|
-
for:
|
|
1106
|
-
class:
|
|
1105
|
+
for: o.value,
|
|
1106
|
+
class: u(f.value)
|
|
1107
1107
|
}, [
|
|
1108
|
-
Y(
|
|
1109
|
-
t.required ? (l(), a("span", tl, "*")) :
|
|
1110
|
-
], 10, el)) :
|
|
1108
|
+
Y(B(t.label) + " ", 1),
|
|
1109
|
+
t.required ? (l(), a("span", tl, "*")) : c("", !0)
|
|
1110
|
+
], 10, el)) : c("", !0),
|
|
1111
1111
|
s("div", ll, [
|
|
1112
|
-
t.prefix ? (l(), a("span", al,
|
|
1112
|
+
t.prefix ? (l(), a("span", al, B(t.prefix), 1)) : c("", !0),
|
|
1113
1113
|
s("input", {
|
|
1114
|
-
id:
|
|
1115
|
-
class:
|
|
1114
|
+
id: o.value,
|
|
1115
|
+
class: u([p.value, t.prefix ? "pl-9" : ""]),
|
|
1116
1116
|
type: t.type,
|
|
1117
1117
|
disabled: t.disabled,
|
|
1118
1118
|
placeholder: t.placeholder,
|
|
@@ -1120,7 +1120,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1120
1120
|
required: t.required,
|
|
1121
1121
|
readonly: t.readonly,
|
|
1122
1122
|
onInput: n,
|
|
1123
|
-
onBlur:
|
|
1123
|
+
onBlur: v,
|
|
1124
1124
|
onFocus: z
|
|
1125
1125
|
}, null, 42, sl),
|
|
1126
1126
|
t.clearable || t.suffix ? (l(), a("div", ol, [
|
|
@@ -1130,7 +1130,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1130
1130
|
class: "text-secondary-400 hover:text-secondary-600 transition-colors",
|
|
1131
1131
|
"aria-label": "Limpiar",
|
|
1132
1132
|
onClick: k
|
|
1133
|
-
}, [...
|
|
1133
|
+
}, [...h[0] || (h[0] = [
|
|
1134
1134
|
s("svg", {
|
|
1135
1135
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1136
1136
|
class: "h-4 w-4",
|
|
@@ -1143,10 +1143,10 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1143
1143
|
"clip-rule": "evenodd"
|
|
1144
1144
|
})
|
|
1145
1145
|
], -1)
|
|
1146
|
-
])])) :
|
|
1147
|
-
t.suffix && !t.clearable ? (l(), a("span", rl,
|
|
1148
|
-
])) :
|
|
1149
|
-
t.error && !t.suffix && !t.clearable ? (l(), a("span", nl, [...
|
|
1146
|
+
])])) : c("", !0),
|
|
1147
|
+
t.suffix && !t.clearable ? (l(), a("span", rl, B(t.suffix), 1)) : c("", !0)
|
|
1148
|
+
])) : c("", !0),
|
|
1149
|
+
t.error && !t.suffix && !t.clearable ? (l(), a("span", nl, [...h[1] || (h[1] = [
|
|
1150
1150
|
s("svg", {
|
|
1151
1151
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1152
1152
|
class: "h-5 w-5",
|
|
@@ -1159,9 +1159,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1159
1159
|
"clip-rule": "evenodd"
|
|
1160
1160
|
})
|
|
1161
1161
|
], -1)
|
|
1162
|
-
])])) :
|
|
1162
|
+
])])) : c("", !0)
|
|
1163
1163
|
]),
|
|
1164
|
-
t.error ? (l(), a("p", il,
|
|
1164
|
+
t.error ? (l(), a("p", il, B(t.error), 1)) : t.helperText ? (l(), a("p", dl, B(t.helperText), 1)) : c("", !0)
|
|
1165
1165
|
]));
|
|
1166
1166
|
}
|
|
1167
1167
|
}), Xa = /* @__PURE__ */ Z(ul, [["__scopeId", "data-v-b46f9fad"]]), cl = ["stroke-width"], fl = {
|
|
@@ -1178,24 +1178,24 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1178
1178
|
progress: { default: void 0 }
|
|
1179
1179
|
},
|
|
1180
1180
|
setup(t) {
|
|
1181
|
-
const
|
|
1181
|
+
const m = t, e = {
|
|
1182
1182
|
primary: "text-primary-700",
|
|
1183
1183
|
secondary: "text-secondary-500",
|
|
1184
1184
|
success: "text-success-500",
|
|
1185
1185
|
warning: "text-warning-500",
|
|
1186
1186
|
danger: "text-danger-500",
|
|
1187
1187
|
info: "text-info-500"
|
|
1188
|
-
},
|
|
1188
|
+
}, b = {
|
|
1189
1189
|
primary: "bg-primary-700",
|
|
1190
1190
|
secondary: "bg-secondary-500",
|
|
1191
1191
|
success: "bg-success-500",
|
|
1192
1192
|
warning: "bg-warning-500",
|
|
1193
1193
|
danger: "bg-danger-500",
|
|
1194
1194
|
info: "bg-info-500"
|
|
1195
|
-
},
|
|
1196
|
-
return (
|
|
1195
|
+
}, o = r(() => [e[m.color]]), f = r(() => [b[m.color]]);
|
|
1196
|
+
return (p, n) => t.type === "circular" ? (l(), a("div", {
|
|
1197
1197
|
key: 0,
|
|
1198
|
-
class:
|
|
1198
|
+
class: u(o.value)
|
|
1199
1199
|
}, [
|
|
1200
1200
|
(l(), a("svg", {
|
|
1201
1201
|
class: "animate-spin",
|
|
@@ -1224,16 +1224,16 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1224
1224
|
}, [
|
|
1225
1225
|
s("div", fl, [
|
|
1226
1226
|
s("div", {
|
|
1227
|
-
class:
|
|
1227
|
+
class: u([[f.value, { "animate-linear-loader": t.progress === void 0 }], "h-full rounded-lg"]),
|
|
1228
1228
|
style: X({ width: t.progress !== void 0 ? `${Math.min(Math.max(t.progress, 0), 100)}%` : "100%" })
|
|
1229
1229
|
}, null, 6)
|
|
1230
1230
|
])
|
|
1231
|
-
], 4)) :
|
|
1231
|
+
], 4)) : c("", !0);
|
|
1232
1232
|
}
|
|
1233
|
-
}), _a = /* @__PURE__ */ Z(pl, [["__scopeId", "data-v-f369fb46"]]), vl = ["disabled", "aria-expanded"], bl = ["disabled", "onClick"],
|
|
1233
|
+
}), _a = /* @__PURE__ */ Z(pl, [["__scopeId", "data-v-f369fb46"]]), vl = ["disabled", "aria-expanded"], bl = ["disabled", "onClick"], ml = {
|
|
1234
1234
|
key: 0,
|
|
1235
1235
|
class: "flex-shrink-0"
|
|
1236
|
-
},
|
|
1236
|
+
}, gl = { class: "flex-1 min-w-0 mr-2" }, yl = { class: "flex flex-col items-start" }, hl = ["title"], xl = ["title"], wl = {
|
|
1237
1237
|
key: 1,
|
|
1238
1238
|
class: "flex-shrink-0"
|
|
1239
1239
|
}, kl = {
|
|
@@ -1268,20 +1268,20 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1268
1268
|
closeDelay: { default: 100 }
|
|
1269
1269
|
},
|
|
1270
1270
|
emits: ["open", "close", "select"],
|
|
1271
|
-
setup(t, { emit:
|
|
1272
|
-
let e = null,
|
|
1273
|
-
const
|
|
1271
|
+
setup(t, { emit: m }) {
|
|
1272
|
+
let e = null, b = null;
|
|
1273
|
+
const o = t, f = m, p = P(!1), n = P(null), v = P(null), z = P({}), k = r(() => [
|
|
1274
1274
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
1275
1275
|
"bg-white border border-secondary-300 rounded-md text-secondary-700",
|
|
1276
1276
|
"hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
|
|
1277
1277
|
"focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
1278
1278
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1279
1279
|
"transition-all duration-200"
|
|
1280
|
-
].join(" ")),
|
|
1280
|
+
].join(" ")), y = r(() => [...[
|
|
1281
1281
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
1282
1282
|
"flex flex-col",
|
|
1283
1283
|
"focus:outline-none"
|
|
1284
|
-
], `z-${
|
|
1284
|
+
], `z-${o.zIndex}`].join(" ")), h = r(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), V = r(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), j = r(() => "py-1 overflow-y-auto flex-1 min-h-0"), O = r(() => "my-1 border-t border-secondary-200"), F = r(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), q = (i) => {
|
|
1285
1285
|
const M = [
|
|
1286
1286
|
"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left",
|
|
1287
1287
|
"transition-all duration-150 focus:outline-none cursor-pointer",
|
|
@@ -1294,99 +1294,99 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1294
1294
|
};
|
|
1295
1295
|
let R = "";
|
|
1296
1296
|
return i.color && (R = i.color, (i.color.includes("white") || i.color.includes("50")) && (R += " hover:text-black")), [...M, R || le[x]].join(" ");
|
|
1297
|
+
}, S = () => {
|
|
1298
|
+
o.disabled || (p.value ? W() : (b && clearTimeout(b), e = setTimeout(() => {
|
|
1299
|
+
I();
|
|
1300
|
+
}, o.openDelay)));
|
|
1297
1301
|
}, I = () => {
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
}, r.openDelay)));
|
|
1301
|
-
}, B = () => {
|
|
1302
|
-
v.value = !0, p("open"), be(() => {
|
|
1303
|
-
C(), document.addEventListener("click", j), document.addEventListener("keydown", h);
|
|
1302
|
+
p.value = !0, f("open"), be(() => {
|
|
1303
|
+
$(), document.addEventListener("click", C), document.addEventListener("keydown", g);
|
|
1304
1304
|
});
|
|
1305
|
-
},
|
|
1306
|
-
e && clearTimeout(e),
|
|
1307
|
-
|
|
1308
|
-
},
|
|
1309
|
-
},
|
|
1310
|
-
i.disabled || (i.action && i.action(),
|
|
1311
|
-
},
|
|
1305
|
+
}, W = () => {
|
|
1306
|
+
e && clearTimeout(e), b = setTimeout(() => {
|
|
1307
|
+
p.value = !1, f("close"), document.removeEventListener("click", C), document.removeEventListener("keydown", g);
|
|
1308
|
+
}, o.closeDelay);
|
|
1309
|
+
}, A = (i) => {
|
|
1310
|
+
i.disabled || (i.action && i.action(), f("select", i), (o.closeOnClick || o.closeOnSelect) && !i.children && W());
|
|
1311
|
+
}, C = (i) => {
|
|
1312
1312
|
const M = i.target;
|
|
1313
|
-
n.value && !n.value.contains(M) &&
|
|
1314
|
-
},
|
|
1315
|
-
i.key === "Escape" &&
|
|
1313
|
+
n.value && !n.value.contains(M) && v.value && !v.value.contains(M) && W();
|
|
1314
|
+
}, g = (i) => {
|
|
1315
|
+
i.key === "Escape" && W();
|
|
1316
1316
|
}, d = (i) => {
|
|
1317
|
-
(i.key === "Enter" || i.key === " ") && (i.preventDefault(),
|
|
1318
|
-
},
|
|
1319
|
-
if (!n.value || !
|
|
1320
|
-
const i = n.value.getBoundingClientRect(), M =
|
|
1317
|
+
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), S());
|
|
1318
|
+
}, $ = () => {
|
|
1319
|
+
if (!n.value || !v.value) return;
|
|
1320
|
+
const i = n.value.getBoundingClientRect(), M = v.value.getBoundingClientRect(), x = window.innerWidth, le = window.innerHeight;
|
|
1321
1321
|
let R = 0, H = 0;
|
|
1322
|
-
switch (
|
|
1322
|
+
switch (o.position) {
|
|
1323
1323
|
case "bottom-start":
|
|
1324
|
-
R = i.bottom +
|
|
1324
|
+
R = i.bottom + o.offset.y, H = i.left + o.offset.x;
|
|
1325
1325
|
break;
|
|
1326
1326
|
case "bottom-end":
|
|
1327
|
-
R = i.bottom +
|
|
1327
|
+
R = i.bottom + o.offset.y, H = i.right - M.width + o.offset.x;
|
|
1328
1328
|
break;
|
|
1329
1329
|
case "top-start":
|
|
1330
|
-
R = i.top - M.height -
|
|
1330
|
+
R = i.top - M.height - o.offset.y, H = i.left + o.offset.x;
|
|
1331
1331
|
break;
|
|
1332
1332
|
case "top-end":
|
|
1333
|
-
R = i.top - M.height -
|
|
1333
|
+
R = i.top - M.height - o.offset.y, H = i.right - M.width + o.offset.x;
|
|
1334
1334
|
break;
|
|
1335
1335
|
case "right-start":
|
|
1336
|
-
R = i.top +
|
|
1336
|
+
R = i.top + o.offset.y, H = i.right + o.offset.x;
|
|
1337
1337
|
break;
|
|
1338
1338
|
case "right-end":
|
|
1339
|
-
R = i.bottom - M.height +
|
|
1339
|
+
R = i.bottom - M.height + o.offset.y, H = i.right + o.offset.x;
|
|
1340
1340
|
break;
|
|
1341
1341
|
case "left-start":
|
|
1342
|
-
R = i.top +
|
|
1342
|
+
R = i.top + o.offset.y, H = i.left - M.width - o.offset.x;
|
|
1343
1343
|
break;
|
|
1344
1344
|
case "left-end":
|
|
1345
|
-
R = i.bottom - M.height +
|
|
1345
|
+
R = i.bottom - M.height + o.offset.y, H = i.left - M.width - o.offset.x;
|
|
1346
1346
|
break;
|
|
1347
1347
|
}
|
|
1348
1348
|
H + M.width > x && (H = x - M.width - 8), H < 8 && (H = 8), R + M.height > le && (R = le - M.height - 8), R < 8 && (R = 8), z.value = {
|
|
1349
1349
|
top: `${R}px`,
|
|
1350
1350
|
left: `${H}px`,
|
|
1351
|
-
width:
|
|
1352
|
-
maxHeight:
|
|
1351
|
+
width: o.width === "auto" ? `${Math.max(i.width, 240)}px` : o.width,
|
|
1352
|
+
maxHeight: o.maxHeight,
|
|
1353
1353
|
minWidth: "240px"
|
|
1354
1354
|
};
|
|
1355
1355
|
};
|
|
1356
|
-
return
|
|
1357
|
-
window.addEventListener("scroll",
|
|
1358
|
-
}),
|
|
1359
|
-
window.removeEventListener("scroll",
|
|
1360
|
-
}), de(() =>
|
|
1361
|
-
|
|
1356
|
+
return me(() => {
|
|
1357
|
+
window.addEventListener("scroll", $, !0), window.addEventListener("resize", $);
|
|
1358
|
+
}), ge(() => {
|
|
1359
|
+
window.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $), document.removeEventListener("click", C), document.removeEventListener("keydown", g);
|
|
1360
|
+
}), de(() => o.items, () => {
|
|
1361
|
+
p.value && be($);
|
|
1362
1362
|
}, { deep: !0 }), (i, M) => (l(), a("div", {
|
|
1363
|
-
class:
|
|
1363
|
+
class: u(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
1364
1364
|
}, [
|
|
1365
1365
|
s("div", {
|
|
1366
1366
|
ref_key: "triggerRef",
|
|
1367
1367
|
ref: n
|
|
1368
1368
|
}, [
|
|
1369
|
-
|
|
1370
|
-
isOpen:
|
|
1371
|
-
toggle:
|
|
1369
|
+
L(i.$slots, "trigger", {
|
|
1370
|
+
isOpen: p.value,
|
|
1371
|
+
toggle: S
|
|
1372
1372
|
}, () => [
|
|
1373
1373
|
s("button", {
|
|
1374
1374
|
type: "button",
|
|
1375
|
-
class:
|
|
1375
|
+
class: u(k.value),
|
|
1376
1376
|
disabled: t.disabled,
|
|
1377
|
-
onClick:
|
|
1377
|
+
onClick: S,
|
|
1378
1378
|
onKeydown: d,
|
|
1379
1379
|
tabindex: 0,
|
|
1380
1380
|
role: "button",
|
|
1381
|
-
"aria-expanded":
|
|
1381
|
+
"aria-expanded": p.value,
|
|
1382
1382
|
"aria-haspopup": !0
|
|
1383
1383
|
}, [
|
|
1384
|
-
|
|
1385
|
-
Y(
|
|
1384
|
+
L(i.$slots, "trigger-content", {}, () => [
|
|
1385
|
+
Y(B(t.triggerText), 1)
|
|
1386
1386
|
], !0),
|
|
1387
1387
|
t.showChevron ? (l(), a("svg", {
|
|
1388
1388
|
key: 0,
|
|
1389
|
-
class:
|
|
1389
|
+
class: u(["w-4 h-4 ml-2 transition-transform", p.value ? "rotate-180" : ""]),
|
|
1390
1390
|
fill: "none",
|
|
1391
1391
|
stroke: "currentColor",
|
|
1392
1392
|
viewBox: "0 0 24 24"
|
|
@@ -1397,84 +1397,84 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1397
1397
|
"stroke-width": "2",
|
|
1398
1398
|
d: "M19 9l-7 7-7-7"
|
|
1399
1399
|
}, null, -1)
|
|
1400
|
-
])], 2)) :
|
|
1400
|
+
])], 2)) : c("", !0)
|
|
1401
1401
|
], 42, vl)
|
|
1402
1402
|
], !0)
|
|
1403
1403
|
], 512),
|
|
1404
|
-
(l(), te(
|
|
1405
|
-
|
|
1404
|
+
(l(), te(ye, { to: "body" }, [
|
|
1405
|
+
p.value ? (l(), a("div", {
|
|
1406
1406
|
key: 0,
|
|
1407
1407
|
ref_key: "menuRef",
|
|
1408
|
-
ref:
|
|
1409
|
-
class:
|
|
1408
|
+
ref: v,
|
|
1409
|
+
class: u(y.value),
|
|
1410
1410
|
style: X(z.value),
|
|
1411
1411
|
onClick: M[0] || (M[0] = J(() => {
|
|
1412
1412
|
}, ["stop"]))
|
|
1413
1413
|
}, [
|
|
1414
1414
|
i.$slots.header ? (l(), a("div", {
|
|
1415
1415
|
key: 0,
|
|
1416
|
-
class:
|
|
1416
|
+
class: u(h.value)
|
|
1417
1417
|
}, [
|
|
1418
|
-
|
|
1419
|
-
], 2)) :
|
|
1418
|
+
L(i.$slots, "header", { close: W }, void 0, !0)
|
|
1419
|
+
], 2)) : c("", !0),
|
|
1420
1420
|
s("div", {
|
|
1421
|
-
class:
|
|
1421
|
+
class: u(j.value)
|
|
1422
1422
|
}, [
|
|
1423
|
-
|
|
1424
|
-
close:
|
|
1425
|
-
isOpen:
|
|
1423
|
+
L(i.$slots, "default", {
|
|
1424
|
+
close: W,
|
|
1425
|
+
isOpen: p.value
|
|
1426
1426
|
}, () => [
|
|
1427
1427
|
(l(!0), a(K, null, G(t.items, (x, le) => (l(), a(K, {
|
|
1428
1428
|
key: x.id || le
|
|
1429
1429
|
}, [
|
|
1430
1430
|
x.type === "divider" ? (l(), a("div", {
|
|
1431
1431
|
key: 0,
|
|
1432
|
-
class:
|
|
1432
|
+
class: u(O.value)
|
|
1433
1433
|
}, null, 2)) : x.type === "header" ? (l(), a("div", {
|
|
1434
1434
|
key: 1,
|
|
1435
|
-
class:
|
|
1436
|
-
},
|
|
1435
|
+
class: u(F.value)
|
|
1436
|
+
}, B(x.label), 3)) : (l(), a("button", {
|
|
1437
1437
|
key: 2,
|
|
1438
1438
|
type: "button",
|
|
1439
|
-
class:
|
|
1439
|
+
class: u(q(x)),
|
|
1440
1440
|
disabled: x.disabled,
|
|
1441
|
-
onClick: (R) =>
|
|
1441
|
+
onClick: (R) => A(x)
|
|
1442
1442
|
}, [
|
|
1443
|
-
x.icon || i.$slots[`icon-${x.id}`] ? (l(), a("span",
|
|
1444
|
-
|
|
1443
|
+
x.icon || i.$slots[`icon-${x.id}`] ? (l(), a("span", ml, [
|
|
1444
|
+
L(i.$slots, `icon-${x.id}`, { item: x }, () => [
|
|
1445
1445
|
typeof x.icon == "string" ? (l(), te(_, {
|
|
1446
1446
|
key: 0,
|
|
1447
1447
|
name: x.icon,
|
|
1448
1448
|
size: "sm"
|
|
1449
|
-
}, null, 8, ["name"])) : (l(), te(
|
|
1449
|
+
}, null, 8, ["name"])) : (l(), te(he(x.icon), {
|
|
1450
1450
|
key: 1,
|
|
1451
1451
|
class: "w-5 h-5"
|
|
1452
1452
|
}))
|
|
1453
1453
|
], !0)
|
|
1454
|
-
])) :
|
|
1455
|
-
s("div",
|
|
1456
|
-
|
|
1454
|
+
])) : c("", !0),
|
|
1455
|
+
s("div", gl, [
|
|
1456
|
+
L(i.$slots, `item-${x.id}`, {
|
|
1457
1457
|
item: x,
|
|
1458
|
-
close:
|
|
1458
|
+
close: W
|
|
1459
1459
|
}, () => [
|
|
1460
1460
|
s("div", yl, [
|
|
1461
1461
|
s("span", {
|
|
1462
1462
|
class: "truncate w-full",
|
|
1463
1463
|
title: x.label
|
|
1464
|
-
},
|
|
1464
|
+
}, B(x.label), 9, hl),
|
|
1465
1465
|
x.description ? (l(), a("span", {
|
|
1466
1466
|
key: 0,
|
|
1467
1467
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
1468
1468
|
title: x.description
|
|
1469
|
-
},
|
|
1469
|
+
}, B(x.description), 9, xl)) : c("", !0)
|
|
1470
1470
|
])
|
|
1471
1471
|
], !0)
|
|
1472
1472
|
]),
|
|
1473
1473
|
x.suffix || x.shortcut || i.$slots[`suffix-${x.id}`] ? (l(), a("span", wl, [
|
|
1474
|
-
|
|
1475
|
-
x.shortcut ? (l(), a("span", kl,
|
|
1474
|
+
L(i.$slots, `suffix-${x.id}`, { item: x }, () => [
|
|
1475
|
+
x.shortcut ? (l(), a("span", kl, B(x.shortcut), 1)) : x.suffix ? (l(), a("span", Cl, B(x.suffix), 1)) : c("", !0)
|
|
1476
1476
|
], !0)
|
|
1477
|
-
])) :
|
|
1477
|
+
])) : c("", !0),
|
|
1478
1478
|
x.children && x.children.length > 0 ? (l(), a("svg", $l, [...M[2] || (M[2] = [
|
|
1479
1479
|
s("path", {
|
|
1480
1480
|
"stroke-linecap": "round",
|
|
@@ -1482,27 +1482,27 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1482
1482
|
"stroke-width": "2",
|
|
1483
1483
|
d: "M9 5l7 7-7 7"
|
|
1484
1484
|
}, null, -1)
|
|
1485
|
-
])])) :
|
|
1485
|
+
])])) : c("", !0)
|
|
1486
1486
|
], 10, bl))
|
|
1487
1487
|
], 64))), 128))
|
|
1488
1488
|
], !0)
|
|
1489
1489
|
], 2),
|
|
1490
1490
|
i.$slots.footer ? (l(), a("div", {
|
|
1491
1491
|
key: 1,
|
|
1492
|
-
class:
|
|
1492
|
+
class: u(V.value)
|
|
1493
1493
|
}, [
|
|
1494
|
-
|
|
1495
|
-
], 2)) :
|
|
1496
|
-
], 6)) :
|
|
1497
|
-
|
|
1494
|
+
L(i.$slots, "footer", { close: W }, void 0, !0)
|
|
1495
|
+
], 2)) : c("", !0)
|
|
1496
|
+
], 6)) : c("", !0),
|
|
1497
|
+
p.value && t.overlay ? (l(), a("div", {
|
|
1498
1498
|
key: 1,
|
|
1499
1499
|
class: "fixed inset-0 bg-black/20 z-40",
|
|
1500
|
-
onClick:
|
|
1501
|
-
})) :
|
|
1500
|
+
onClick: W
|
|
1501
|
+
})) : c("", !0)
|
|
1502
1502
|
]))
|
|
1503
1503
|
], 2));
|
|
1504
1504
|
}
|
|
1505
|
-
}), es = /* @__PURE__ */ Z(Bl, [["__scopeId", "data-v-
|
|
1505
|
+
}), es = /* @__PURE__ */ Z(Bl, [["__scopeId", "data-v-ad88f878"]]), zl = ["for"], Ml = {
|
|
1506
1506
|
key: 0,
|
|
1507
1507
|
class: "text-danger-600"
|
|
1508
1508
|
}, Dl = ["id", "disabled", "aria-expanded"], Vl = { class: "flex-1 text-left truncate" }, Tl = {
|
|
@@ -1556,85 +1556,85 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1556
1556
|
bordered: { type: Boolean, default: !0 }
|
|
1557
1557
|
},
|
|
1558
1558
|
emits: ["update:modelValue", "change", "action"],
|
|
1559
|
-
setup(t, { emit:
|
|
1560
|
-
const e = t,
|
|
1559
|
+
setup(t, { emit: m }) {
|
|
1560
|
+
const e = t, b = m, o = P(!1), f = P(""), p = P(null), n = r(
|
|
1561
1561
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
1562
|
-
),
|
|
1563
|
-
if (!e.searchable || !
|
|
1562
|
+
), v = r(() => e.options.find((g) => g.value === e.modelValue) || null), z = r(() => {
|
|
1563
|
+
if (!e.searchable || !f.value)
|
|
1564
1564
|
return e.options;
|
|
1565
|
-
const
|
|
1566
|
-
return e.options.filter((d) => d.label.toLowerCase().includes(
|
|
1567
|
-
}), k =
|
|
1568
|
-
const
|
|
1565
|
+
const g = f.value.toLowerCase();
|
|
1566
|
+
return e.options.filter((d) => d.label.toLowerCase().includes(g));
|
|
1567
|
+
}), k = r(() => "ds-label"), y = r(() => e.bordered ? "border border-neutral-300 rounded-md" : "rounded-md"), h = r(() => {
|
|
1568
|
+
const g = "w-full rounded-md flex items-center justify-between gap-2 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", d = {
|
|
1569
1569
|
sm: "px-3 py-1.5 text-sm",
|
|
1570
1570
|
md: "px-4 py-2 text-base",
|
|
1571
1571
|
lg: "px-5 py-3 text-lg"
|
|
1572
|
-
},
|
|
1572
|
+
}, $ = {
|
|
1573
1573
|
default: "bg-white",
|
|
1574
1574
|
outline: "bg-transparent",
|
|
1575
1575
|
filled: "bg-secondary-100"
|
|
1576
1576
|
}, i = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
1577
1577
|
return [
|
|
1578
|
-
|
|
1578
|
+
g,
|
|
1579
1579
|
d[e.size],
|
|
1580
|
-
|
|
1580
|
+
$[e.variant],
|
|
1581
1581
|
i
|
|
1582
1582
|
].join(" ");
|
|
1583
|
-
}),
|
|
1584
|
-
const d = "w-full px-4 py-2 text-left hover:bg-primary-50 transition-colors focus:outline-none focus:bg-primary-50 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1585
|
-
return [d,
|
|
1586
|
-
},
|
|
1583
|
+
}), V = r(() => `absolute ${e.menuPosition === "top" ? "bottom-full mb-1" : "top-full mt-1"} left-0 right-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden`), j = (g) => {
|
|
1584
|
+
const d = "w-full px-4 py-2 text-left hover:bg-primary-50 transition-colors focus:outline-none focus:bg-primary-50 disabled:opacity-50 disabled:cursor-not-allowed", $ = F(g) ? "bg-primary-50" : "";
|
|
1585
|
+
return [d, $].join(" ");
|
|
1586
|
+
}, O = (g) => {
|
|
1587
1587
|
const d = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
|
|
1588
|
-
return
|
|
1589
|
-
}, F = (
|
|
1590
|
-
e.disabled || e.loading || (
|
|
1591
|
-
var
|
|
1592
|
-
(
|
|
1588
|
+
return g.variant === "danger" ? `${d} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${d} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
|
|
1589
|
+
}, F = (g) => g.value === e.modelValue, q = () => {
|
|
1590
|
+
e.disabled || e.loading || (o.value = !o.value, o.value && e.searchable && be(() => {
|
|
1591
|
+
var g;
|
|
1592
|
+
(g = p.value) == null || g.focus();
|
|
1593
1593
|
}));
|
|
1594
|
-
},
|
|
1595
|
-
|
|
1596
|
-
},
|
|
1597
|
-
|
|
1598
|
-
},
|
|
1599
|
-
|
|
1600
|
-
},
|
|
1601
|
-
const d =
|
|
1594
|
+
}, S = () => {
|
|
1595
|
+
o.value = !1, f.value = "";
|
|
1596
|
+
}, I = (g) => {
|
|
1597
|
+
g.disabled || (b("update:modelValue", g.value), b("change", g), S());
|
|
1598
|
+
}, W = (g) => {
|
|
1599
|
+
g.action && g.action(), b("action", g), S();
|
|
1600
|
+
}, A = (g) => {
|
|
1601
|
+
const d = g.relatedTarget;
|
|
1602
1602
|
d && d.closest(".select-wrapper") || setTimeout(() => {
|
|
1603
|
-
|
|
1603
|
+
S();
|
|
1604
1604
|
}, 200);
|
|
1605
|
-
},
|
|
1606
|
-
|
|
1605
|
+
}, C = (g) => {
|
|
1606
|
+
g.key === "Escape" ? S() : (g.key === "Enter" || g.key === " ") && (g.preventDefault(), q());
|
|
1607
1607
|
};
|
|
1608
|
-
return de(
|
|
1609
|
-
|
|
1610
|
-
}), (
|
|
1611
|
-
class:
|
|
1608
|
+
return de(o, (g) => {
|
|
1609
|
+
g && (f.value = "");
|
|
1610
|
+
}), (g, d) => (l(), a("div", {
|
|
1611
|
+
class: u(["select-wrapper", { "w-full": t.fullWidth }])
|
|
1612
1612
|
}, [
|
|
1613
1613
|
t.label ? (l(), a("label", {
|
|
1614
1614
|
key: 0,
|
|
1615
1615
|
for: n.value,
|
|
1616
|
-
class:
|
|
1616
|
+
class: u(k.value)
|
|
1617
1617
|
}, [
|
|
1618
|
-
Y(
|
|
1619
|
-
t.required ? (l(), a("span", Ml, "*")) :
|
|
1620
|
-
], 10, zl)) :
|
|
1618
|
+
Y(B(t.label) + " ", 1),
|
|
1619
|
+
t.required ? (l(), a("span", Ml, "*")) : c("", !0)
|
|
1620
|
+
], 10, zl)) : c("", !0),
|
|
1621
1621
|
s("div", {
|
|
1622
|
-
class:
|
|
1622
|
+
class: u(["relative", y.value])
|
|
1623
1623
|
}, [
|
|
1624
1624
|
s("button", {
|
|
1625
1625
|
id: n.value,
|
|
1626
1626
|
type: "button",
|
|
1627
|
-
class:
|
|
1627
|
+
class: u(h.value),
|
|
1628
1628
|
disabled: t.disabled,
|
|
1629
|
-
"aria-expanded":
|
|
1629
|
+
"aria-expanded": o.value,
|
|
1630
1630
|
"aria-haspopup": !0,
|
|
1631
|
-
onClick:
|
|
1632
|
-
onBlur:
|
|
1633
|
-
onKeydown:
|
|
1631
|
+
onClick: q,
|
|
1632
|
+
onBlur: A,
|
|
1633
|
+
onKeydown: C
|
|
1634
1634
|
}, [
|
|
1635
|
-
s("span", Vl,
|
|
1635
|
+
s("span", Vl, B(v.value ? v.value.label : t.placeholder), 1),
|
|
1636
1636
|
(l(), a("svg", {
|
|
1637
|
-
class:
|
|
1637
|
+
class: u(["w-5 h-5 flex-shrink-0 transition-transform text-[#565656] opacity-80", o.value ? "rotate-180" : ""]),
|
|
1638
1638
|
fill: "none",
|
|
1639
1639
|
stroke: "currentColor",
|
|
1640
1640
|
viewBox: "0 0 24 24",
|
|
@@ -1648,9 +1648,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1648
1648
|
}, null, -1)
|
|
1649
1649
|
])], 2))
|
|
1650
1650
|
], 42, Dl),
|
|
1651
|
-
|
|
1651
|
+
o.value ? (l(), a("div", {
|
|
1652
1652
|
key: 0,
|
|
1653
|
-
class:
|
|
1653
|
+
class: u(V.value),
|
|
1654
1654
|
onClick: d[2] || (d[2] = J(() => {
|
|
1655
1655
|
}, ["stop"]))
|
|
1656
1656
|
}, [
|
|
@@ -1679,65 +1679,65 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1679
1679
|
])])) : t.searchable ? (l(), a("div", Sl, [
|
|
1680
1680
|
ve(s("input", {
|
|
1681
1681
|
ref_key: "searchInput",
|
|
1682
|
-
ref:
|
|
1683
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
1682
|
+
ref: p,
|
|
1683
|
+
"onUpdate:modelValue": d[0] || (d[0] = ($) => f.value = $),
|
|
1684
1684
|
type: "text",
|
|
1685
1685
|
class: "w-full px-3 py-2 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
1686
1686
|
placeholder: t.searchPlaceholder,
|
|
1687
1687
|
onKeydown: d[1] || (d[1] = J(() => {
|
|
1688
1688
|
}, ["stop"]))
|
|
1689
1689
|
}, null, 40, Il), [
|
|
1690
|
-
[Ee,
|
|
1690
|
+
[Ee, f.value]
|
|
1691
1691
|
])
|
|
1692
|
-
])) :
|
|
1693
|
-
t.loading ?
|
|
1694
|
-
z.value.length === 0 ? (l(), a("div", Ll,
|
|
1695
|
-
(l(!0), a(K, null, G(z.value, (
|
|
1696
|
-
key:
|
|
1692
|
+
])) : c("", !0),
|
|
1693
|
+
t.loading ? c("", !0) : (l(), a("div", jl, [
|
|
1694
|
+
z.value.length === 0 ? (l(), a("div", Ll, B(t.emptyText), 1)) : (l(), a(K, { key: 1 }, [
|
|
1695
|
+
(l(!0), a(K, null, G(z.value, ($) => (l(), a("button", {
|
|
1696
|
+
key: $.value,
|
|
1697
1697
|
type: "button",
|
|
1698
|
-
class:
|
|
1699
|
-
onClick: (i) =>
|
|
1698
|
+
class: u(j($)),
|
|
1699
|
+
onClick: (i) => I($)
|
|
1700
1700
|
}, [
|
|
1701
1701
|
s("div", Al, [
|
|
1702
|
-
s("span", Fl,
|
|
1703
|
-
F(
|
|
1702
|
+
s("span", Fl, B($.label), 1),
|
|
1703
|
+
F($) ? (l(), a("svg", Wl, [...d[5] || (d[5] = [
|
|
1704
1704
|
s("path", {
|
|
1705
1705
|
"stroke-linecap": "round",
|
|
1706
1706
|
"stroke-linejoin": "round",
|
|
1707
1707
|
"stroke-width": "2",
|
|
1708
1708
|
d: "M5 13l4 4L19 7"
|
|
1709
1709
|
}, null, -1)
|
|
1710
|
-
])])) :
|
|
1710
|
+
])])) : c("", !0)
|
|
1711
1711
|
])
|
|
1712
1712
|
], 10, Ol))), 128)),
|
|
1713
|
-
t.actionItems.length > 0 ? (l(), a("div", ql)) :
|
|
1714
|
-
(l(!0), a(K, null, G(t.actionItems, (
|
|
1715
|
-
key:
|
|
1713
|
+
t.actionItems.length > 0 ? (l(), a("div", ql)) : c("", !0),
|
|
1714
|
+
(l(!0), a(K, null, G(t.actionItems, ($) => (l(), a("button", {
|
|
1715
|
+
key: $.id,
|
|
1716
1716
|
type: "button",
|
|
1717
|
-
class:
|
|
1718
|
-
onClick: (i) =>
|
|
1717
|
+
class: u(O($)),
|
|
1718
|
+
onClick: (i) => W($)
|
|
1719
1719
|
}, [
|
|
1720
|
-
|
|
1720
|
+
$.icon ? (l(), a("svg", {
|
|
1721
1721
|
key: 0,
|
|
1722
1722
|
class: "w-4 h-4 flex-shrink-0",
|
|
1723
1723
|
fill: "none",
|
|
1724
1724
|
stroke: "currentColor",
|
|
1725
1725
|
viewBox: "0 0 24 24",
|
|
1726
1726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1727
|
-
innerHTML:
|
|
1728
|
-
}, null, 8, Rl)) :
|
|
1729
|
-
Y(" " +
|
|
1727
|
+
innerHTML: $.icon
|
|
1728
|
+
}, null, 8, Rl)) : c("", !0),
|
|
1729
|
+
Y(" " + B($.label), 1)
|
|
1730
1730
|
], 10, Pl))), 128))
|
|
1731
1731
|
], 64))
|
|
1732
1732
|
]))
|
|
1733
|
-
], 2)) :
|
|
1733
|
+
], 2)) : c("", !0)
|
|
1734
1734
|
], 2),
|
|
1735
|
-
t.error ? (l(), a("p", El,
|
|
1736
|
-
|
|
1735
|
+
t.error ? (l(), a("p", El, B(t.error), 1)) : t.helperText ? (l(), a("p", Yl, B(t.helperText), 1)) : c("", !0),
|
|
1736
|
+
o.value ? (l(), a("div", {
|
|
1737
1737
|
key: 3,
|
|
1738
|
-
onClick:
|
|
1738
|
+
onClick: S,
|
|
1739
1739
|
class: "fixed inset-0 z-40"
|
|
1740
|
-
})) :
|
|
1740
|
+
})) : c("", !0)
|
|
1741
1741
|
], 2));
|
|
1742
1742
|
}
|
|
1743
1743
|
}), ts = /* @__PURE__ */ Z(Nl, [["__scopeId", "data-v-9886e097"]]), Hl = ["title"], Kl = {
|
|
@@ -1767,37 +1767,37 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1767
1767
|
scrimOpacity: { default: 0.5 }
|
|
1768
1768
|
},
|
|
1769
1769
|
emits: ["update:modelValue", "update:activeItem", "update:collapsed", "close", "open", "itemClick", "toggleCollapse"],
|
|
1770
|
-
setup(t, { emit:
|
|
1771
|
-
const e = t,
|
|
1770
|
+
setup(t, { emit: m }) {
|
|
1771
|
+
const e = t, b = P(e.collapsed), o = r(() => e.mini || b.value), f = m, p = r({
|
|
1772
1772
|
get: () => e.modelValue,
|
|
1773
|
-
set: (
|
|
1774
|
-
}), n = (
|
|
1775
|
-
const
|
|
1776
|
-
!e.persistent && !
|
|
1777
|
-
},
|
|
1778
|
-
|
|
1773
|
+
set: (C) => f("update:modelValue", C)
|
|
1774
|
+
}), n = (C = !1) => {
|
|
1775
|
+
const g = e.keepOpen && !C;
|
|
1776
|
+
!e.persistent && !g && (p.value = !1, f("close"));
|
|
1777
|
+
}, v = () => {
|
|
1778
|
+
b.value = !b.value, f("update:collapsed", b.value), f("toggleCollapse");
|
|
1779
1779
|
};
|
|
1780
1780
|
de(
|
|
1781
1781
|
() => e.collapsed,
|
|
1782
|
-
(
|
|
1783
|
-
|
|
1782
|
+
(C) => {
|
|
1783
|
+
b.value = C;
|
|
1784
1784
|
},
|
|
1785
1785
|
{ immediate: !0 }
|
|
1786
1786
|
);
|
|
1787
|
-
const z = (
|
|
1788
|
-
|
|
1789
|
-
}, k = (
|
|
1790
|
-
const
|
|
1791
|
-
return `${
|
|
1792
|
-
},
|
|
1793
|
-
const
|
|
1794
|
-
return `${
|
|
1795
|
-
},
|
|
1796
|
-
const
|
|
1797
|
-
return [
|
|
1798
|
-
}),
|
|
1787
|
+
const z = (C, g) => {
|
|
1788
|
+
g.id && f("update:activeItem", g.id), g.onClick && (C.preventDefault(), g.onClick(g)), f("itemClick", g), !e.keepOpen && !e.persistent && n();
|
|
1789
|
+
}, k = (C) => C.active !== void 0 ? C.active : e.activeItem && C.id ? e.activeItem === C.id : !1, y = (C) => {
|
|
1790
|
+
const g = o.value ? "flex items-center justify-center p-3 rounded-lg transition-all duration-200" : "flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 text-sm font-medium", d = k(C) ? o.value ? "bg-primary-100 text-primary-700" : "bg-primary-100 text-primary-700 border-l-4 border-primary-600" : "text-gray-700 hover:bg-gray-100 hover:text-gray-900";
|
|
1791
|
+
return `${g} ${d}`;
|
|
1792
|
+
}, h = (C) => {
|
|
1793
|
+
const g = "w-5 h-5 flex-shrink-0", d = k(C) ? "text-primary-600" : "text-gray-500";
|
|
1794
|
+
return `${g} ${d}`;
|
|
1795
|
+
}, V = r(() => e.position === "left" ? "slide-right" : "slide-left"), j = r(() => {
|
|
1796
|
+
const C = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none transition-all duration-300", g = e.position === "left" ? "left-0" : "right-0", d = e.shadow ? e.position === "left" ? "shadow-[2px_0_8px_rgba(0,0,0,0.1)]" : "shadow-[-2px_0_8px_rgba(0,0,0,0.1)]" : "", $ = e.bordered ? "border-r border-gray-200" : "";
|
|
1797
|
+
return [C, g, d, $].filter(Boolean).join(" ");
|
|
1798
|
+
}), O = r(() => ({
|
|
1799
1799
|
width: "100%",
|
|
1800
|
-
maxWidth: e.mini ||
|
|
1800
|
+
maxWidth: e.mini || b.value ? e.miniWidth : e.width,
|
|
1801
1801
|
backgroundColor: e.backgroundColor,
|
|
1802
1802
|
top: e.overlayTop,
|
|
1803
1803
|
height: e.overlayTop !== "0" ? `calc(100vh - ${e.overlayTop})` : "100vh"
|
|
@@ -1806,41 +1806,41 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1806
1806
|
sm: "p-2",
|
|
1807
1807
|
md: "p-4",
|
|
1808
1808
|
lg: "p-6"
|
|
1809
|
-
},
|
|
1810
|
-
return (
|
|
1809
|
+
}, q = r(() => `flex items-center justify-between border-b border-gray-200 ${o.value ? "p-2" : F[e.padding]}`), S = r(() => o.value ? "flex gap-1 items-center" : "flex gap-2 items-center"), I = r(() => o.value ? "p-1.5 hover:bg-gray-100 rounded-md transition-colors" : "p-2 hover:bg-gray-100 rounded-md transition-colors"), W = r(() => `flex-1 overflow-y-auto ${F[e.padding]}`), A = r(() => `border-t border-gray-200 ${F[e.padding]}`);
|
|
1810
|
+
return (C, g) => (l(), te(ye, { to: "body" }, [
|
|
1811
1811
|
Q(ie, { name: "fade" }, {
|
|
1812
1812
|
default: re(() => [
|
|
1813
|
-
|
|
1813
|
+
p.value && t.overlay && !t.keepOpen ? (l(), a("div", {
|
|
1814
1814
|
key: 0,
|
|
1815
|
-
onClick:
|
|
1815
|
+
onClick: g[0] || (g[0] = (d) => n()),
|
|
1816
1816
|
class: "fixed inset-0 z-40",
|
|
1817
1817
|
style: X({ top: t.overlayTop, backgroundColor: `rgba(0, 0, 0, ${t.scrimOpacity || 0.5})` })
|
|
1818
|
-
}, null, 4)) :
|
|
1818
|
+
}, null, 4)) : c("", !0)
|
|
1819
1819
|
]),
|
|
1820
1820
|
_: 1
|
|
1821
1821
|
}),
|
|
1822
|
-
Q(ie, { name:
|
|
1822
|
+
Q(ie, { name: V.value }, {
|
|
1823
1823
|
default: re(() => [
|
|
1824
|
-
|
|
1824
|
+
p.value ? (l(), a("aside", {
|
|
1825
1825
|
key: 0,
|
|
1826
|
-
class:
|
|
1827
|
-
style: X(
|
|
1826
|
+
class: u(j.value),
|
|
1827
|
+
style: X(O.value)
|
|
1828
1828
|
}, [
|
|
1829
|
-
|
|
1829
|
+
C.$slots.header ? (l(), a("div", {
|
|
1830
1830
|
key: 0,
|
|
1831
|
-
class:
|
|
1831
|
+
class: u(q.value)
|
|
1832
1832
|
}, [
|
|
1833
|
-
|
|
1833
|
+
L(C.$slots, "header", {}, void 0, !0),
|
|
1834
1834
|
s("div", {
|
|
1835
|
-
class:
|
|
1835
|
+
class: u(S.value)
|
|
1836
1836
|
}, [
|
|
1837
1837
|
t.collapsible ? (l(), a("button", {
|
|
1838
1838
|
key: 0,
|
|
1839
|
-
onClick:
|
|
1840
|
-
class:
|
|
1841
|
-
title:
|
|
1839
|
+
onClick: v,
|
|
1840
|
+
class: u(I.value),
|
|
1841
|
+
title: b.value ? "Expandir" : "Contraer",
|
|
1842
1842
|
"aria-label": "Toggle sidebar collapse"
|
|
1843
|
-
}, [...
|
|
1843
|
+
}, [...g[2] || (g[2] = [
|
|
1844
1844
|
s("svg", {
|
|
1845
1845
|
class: "w-5 h-5",
|
|
1846
1846
|
fill: "none",
|
|
@@ -1854,13 +1854,13 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1854
1854
|
d: "M15 19l-7-7 7-7"
|
|
1855
1855
|
})
|
|
1856
1856
|
], -1)
|
|
1857
|
-
])], 10, Hl)) :
|
|
1857
|
+
])], 10, Hl)) : c("", !0),
|
|
1858
1858
|
t.closable ? (l(), a("button", {
|
|
1859
1859
|
key: 1,
|
|
1860
|
-
onClick:
|
|
1861
|
-
class:
|
|
1860
|
+
onClick: g[1] || (g[1] = (d) => n(!0)),
|
|
1861
|
+
class: u(I.value),
|
|
1862
1862
|
"aria-label": "Cerrar menú"
|
|
1863
|
-
}, [...
|
|
1863
|
+
}, [...g[3] || (g[3] = [
|
|
1864
1864
|
s("svg", {
|
|
1865
1865
|
class: "w-5 h-5",
|
|
1866
1866
|
fill: "none",
|
|
@@ -1874,47 +1874,47 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1874
1874
|
d: "M6 18L18 6M6 6l12 12"
|
|
1875
1875
|
})
|
|
1876
1876
|
], -1)
|
|
1877
|
-
])], 2)) :
|
|
1877
|
+
])], 2)) : c("", !0)
|
|
1878
1878
|
], 2)
|
|
1879
|
-
], 2)) :
|
|
1879
|
+
], 2)) : c("", !0),
|
|
1880
1880
|
s("div", {
|
|
1881
|
-
class:
|
|
1881
|
+
class: u(W.value)
|
|
1882
1882
|
}, [
|
|
1883
1883
|
t.items && t.items.length ? (l(), a("nav", Kl, [
|
|
1884
1884
|
(l(!0), a(K, null, G(t.items, (d) => (l(), a("a", {
|
|
1885
1885
|
key: d.id || d.label,
|
|
1886
1886
|
href: d.href,
|
|
1887
|
-
onClick: (
|
|
1888
|
-
class:
|
|
1887
|
+
onClick: ($) => z($, d),
|
|
1888
|
+
class: u(y(d)),
|
|
1889
1889
|
"aria-current": k(d) ? "page" : void 0
|
|
1890
1890
|
}, [
|
|
1891
1891
|
d.icon && typeof d.icon == "string" ? (l(), te(_, {
|
|
1892
1892
|
key: 0,
|
|
1893
1893
|
name: d.icon,
|
|
1894
1894
|
size: "md",
|
|
1895
|
-
class:
|
|
1896
|
-
}, null, 8, ["name", "class"])) : d.icon ? (l(), te(
|
|
1895
|
+
class: u(h(d))
|
|
1896
|
+
}, null, 8, ["name", "class"])) : d.icon ? (l(), te(he(d.icon), {
|
|
1897
1897
|
key: 1,
|
|
1898
|
-
class:
|
|
1899
|
-
}, null, 8, ["class"])) :
|
|
1900
|
-
|
|
1898
|
+
class: u(h(d))
|
|
1899
|
+
}, null, 8, ["class"])) : c("", !0),
|
|
1900
|
+
o.value ? c("", !0) : (l(), a("span", Jl, B(d.label), 1))
|
|
1901
1901
|
], 10, Ul))), 128))
|
|
1902
|
-
])) :
|
|
1903
|
-
|
|
1902
|
+
])) : c("", !0),
|
|
1903
|
+
L(C.$slots, "default", {}, void 0, !0)
|
|
1904
1904
|
], 2),
|
|
1905
|
-
|
|
1905
|
+
C.$slots.footer ? (l(), a("div", {
|
|
1906
1906
|
key: 1,
|
|
1907
|
-
class:
|
|
1907
|
+
class: u(A.value)
|
|
1908
1908
|
}, [
|
|
1909
|
-
|
|
1910
|
-
], 2)) :
|
|
1911
|
-
], 6)) :
|
|
1909
|
+
L(C.$slots, "footer", {}, void 0, !0)
|
|
1910
|
+
], 2)) : c("", !0)
|
|
1911
|
+
], 6)) : c("", !0)
|
|
1912
1912
|
]),
|
|
1913
1913
|
_: 3
|
|
1914
1914
|
}, 8, ["name"])
|
|
1915
1915
|
]));
|
|
1916
1916
|
}
|
|
1917
|
-
}), ls = /* @__PURE__ */ Z(Gl, [["__scopeId", "data-v-
|
|
1917
|
+
}), ls = /* @__PURE__ */ Z(Gl, [["__scopeId", "data-v-1431a87b"]]), Ql = { class: "w-full space-y-4" }, Zl = { class: "flex flex-col gap-3 md:hidden" }, Xl = {
|
|
1918
1918
|
key: 0,
|
|
1919
1919
|
class: "flex items-center gap-2 px-1 text-sm text-gray-600"
|
|
1920
1920
|
}, _l = ["checked", "indeterminate"], ea = {
|
|
@@ -1929,7 +1929,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1929
1929
|
}, da = ["checked", "indeterminate"], ua = ["onClick"], ca = { class: "flex items-center gap-2" }, fa = {
|
|
1930
1930
|
key: 0,
|
|
1931
1931
|
class: "text-xs text-gray-400"
|
|
1932
|
-
}, pa = { key: 0 }, va = { key: 1 }, ba = { class: "w-full" },
|
|
1932
|
+
}, pa = { key: 0 }, va = { key: 1 }, ba = { class: "w-full" }, ma = ["checked", "onChange", "aria-label"], ga = {
|
|
1933
1933
|
key: 0,
|
|
1934
1934
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
1935
1935
|
}, ya = {
|
|
@@ -1952,115 +1952,115 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1952
1952
|
hover: { type: Boolean, default: !0 }
|
|
1953
1953
|
},
|
|
1954
1954
|
emits: ["update:selectedKeys"],
|
|
1955
|
-
setup(t, { emit:
|
|
1956
|
-
const e = t,
|
|
1955
|
+
setup(t, { emit: m }) {
|
|
1956
|
+
const e = t, b = r(() => ({
|
|
1957
1957
|
compact: "py-1.5",
|
|
1958
1958
|
normal: "py-3",
|
|
1959
1959
|
spacious: "py-5"
|
|
1960
|
-
})[e.density]),
|
|
1961
|
-
n.value === d ?
|
|
1962
|
-
}, k =
|
|
1960
|
+
})[e.density]), o = r(() => e.striped), f = r(() => e.hover), p = m, n = P(null), v = P("asc"), z = (d) => {
|
|
1961
|
+
n.value === d ? v.value = v.value === "asc" ? "desc" : "asc" : (n.value = d, v.value = "asc");
|
|
1962
|
+
}, k = r(() => {
|
|
1963
1963
|
if (!n.value)
|
|
1964
1964
|
return e.data;
|
|
1965
1965
|
const d = [...e.data];
|
|
1966
|
-
return d.sort((
|
|
1967
|
-
const M =
|
|
1968
|
-
return typeof M == "string" && typeof x == "string" ?
|
|
1966
|
+
return d.sort(($, i) => {
|
|
1967
|
+
const M = $[n.value], x = i[n.value];
|
|
1968
|
+
return typeof M == "string" && typeof x == "string" ? v.value === "asc" ? M.localeCompare(x) : x.localeCompare(M) : typeof M == "number" && typeof x == "number" ? v.value === "asc" ? M - x : x - M : 0;
|
|
1969
1969
|
}), d;
|
|
1970
|
-
}),
|
|
1970
|
+
}), y = r(() => e.columns.filter((d) => !d.hideOnMobile)), h = r(() => e.selectable), V = r({
|
|
1971
1971
|
get: () => e.selectedKeys || [],
|
|
1972
|
-
set: (d) =>
|
|
1973
|
-
}),
|
|
1972
|
+
set: (d) => p("update:selectedKeys", d)
|
|
1973
|
+
}), j = (d, $) => {
|
|
1974
1974
|
const i = e.rowKey;
|
|
1975
|
-
return (i && d ? d[i] : void 0) ??
|
|
1976
|
-
},
|
|
1977
|
-
|
|
1978
|
-
},
|
|
1979
|
-
const i =
|
|
1980
|
-
return
|
|
1981
|
-
},
|
|
1982
|
-
if (!
|
|
1983
|
-
const M =
|
|
1984
|
-
i ? x.add(M) : x.delete(M),
|
|
1985
|
-
},
|
|
1986
|
-
const
|
|
1987
|
-
return !!(
|
|
1988
|
-
},
|
|
1989
|
-
|
|
1990
|
-
},
|
|
1991
|
-
|
|
1975
|
+
return (i && d ? d[i] : void 0) ?? $;
|
|
1976
|
+
}, O = r(() => k.value.map((d, $) => j(d, $))), F = r(() => O.value.length > 0 && O.value.every((d) => V.value.includes(d))), q = r(() => !F.value && V.value.length > 0), S = (d) => {
|
|
1977
|
+
h.value && (V.value = d ? [...O.value] : []);
|
|
1978
|
+
}, I = (d, $) => {
|
|
1979
|
+
const i = j(d, $);
|
|
1980
|
+
return V.value.includes(i);
|
|
1981
|
+
}, W = (d, $, i) => {
|
|
1982
|
+
if (!h.value) return;
|
|
1983
|
+
const M = j(d, $), x = new Set(V.value);
|
|
1984
|
+
i ? x.add(M) : x.delete(M), V.value = Array.from(x);
|
|
1985
|
+
}, A = (d) => {
|
|
1986
|
+
const $ = d.target;
|
|
1987
|
+
return !!($ != null && $.checked);
|
|
1988
|
+
}, C = (d) => {
|
|
1989
|
+
S(A(d));
|
|
1990
|
+
}, g = (d, $, i) => {
|
|
1991
|
+
W(d, $, A(i));
|
|
1992
1992
|
};
|
|
1993
|
-
return (d,
|
|
1993
|
+
return (d, $) => (l(), a("div", Ql, [
|
|
1994
1994
|
s("div", Zl, [
|
|
1995
|
-
|
|
1995
|
+
h.value ? (l(), a("div", Xl, [
|
|
1996
1996
|
s("input", {
|
|
1997
1997
|
type: "checkbox",
|
|
1998
1998
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
1999
1999
|
checked: F.value,
|
|
2000
|
-
indeterminate:
|
|
2001
|
-
onChange:
|
|
2000
|
+
indeterminate: q.value,
|
|
2001
|
+
onChange: C,
|
|
2002
2002
|
"aria-label": "Seleccionar todas las filas"
|
|
2003
2003
|
}, null, 40, _l),
|
|
2004
|
-
|
|
2005
|
-
])) :
|
|
2004
|
+
$[0] || ($[0] = s("span", null, "Seleccionar todas", -1))
|
|
2005
|
+
])) : c("", !0),
|
|
2006
2006
|
(l(!0), a(K, null, G(k.value, (i, M) => (l(), a("div", {
|
|
2007
2007
|
key: `card-${M}`,
|
|
2008
2008
|
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
2009
2009
|
}, [
|
|
2010
|
-
|
|
2010
|
+
h.value ? (l(), a("div", ea, [
|
|
2011
2011
|
s("input", {
|
|
2012
2012
|
type: "checkbox",
|
|
2013
2013
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2014
|
-
checked:
|
|
2015
|
-
onChange: (x) =>
|
|
2014
|
+
checked: I(i, M),
|
|
2015
|
+
onChange: (x) => g(i, M, x),
|
|
2016
2016
|
"aria-label": `Seleccionar fila ${M + 1}`
|
|
2017
2017
|
}, null, 40, ta),
|
|
2018
|
-
|
|
2019
|
-
])) :
|
|
2020
|
-
(l(!0), a(K, null, G(
|
|
2018
|
+
$[1] || ($[1] = s("span", { class: "text-sm text-gray-700" }, "Seleccionar fila", -1))
|
|
2019
|
+
])) : c("", !0),
|
|
2020
|
+
(l(!0), a(K, null, G(y.value, (x) => (l(), a("div", {
|
|
2021
2021
|
key: `card-${M}-${x.key}`,
|
|
2022
2022
|
class: "flex flex-col gap-1 py-1"
|
|
2023
2023
|
}, [
|
|
2024
|
-
s("span", la,
|
|
2024
|
+
s("span", la, B(x.label), 1),
|
|
2025
2025
|
s("span", aa, [
|
|
2026
|
-
|
|
2026
|
+
L(d.$slots, `cell-${x.key}`, {
|
|
2027
2027
|
value: i[x.key],
|
|
2028
2028
|
row: i
|
|
2029
2029
|
}, () => [
|
|
2030
|
-
Y(
|
|
2030
|
+
Y(B(i[x.key]), 1)
|
|
2031
2031
|
], !0)
|
|
2032
2032
|
])
|
|
2033
2033
|
]))), 128))
|
|
2034
2034
|
]))), 128)),
|
|
2035
2035
|
k.value.length === 0 ? (l(), a("div", sa, [
|
|
2036
|
-
|
|
2037
|
-
|
|
2036
|
+
L(d.$slots, "empty", {}, () => [
|
|
2037
|
+
$[2] || ($[2] = Y("No hay datos disponibles", -1))
|
|
2038
2038
|
], !0)
|
|
2039
|
-
])) :
|
|
2039
|
+
])) : c("", !0)
|
|
2040
2040
|
]),
|
|
2041
2041
|
s("div", oa, [
|
|
2042
2042
|
s("table", ra, [
|
|
2043
2043
|
s("thead", na, [
|
|
2044
2044
|
s("tr", {
|
|
2045
|
-
class:
|
|
2045
|
+
class: u([
|
|
2046
2046
|
"w-full bg-neutral-50 border-b border-gray-100",
|
|
2047
2047
|
e.headerClass || ""
|
|
2048
2048
|
])
|
|
2049
2049
|
}, [
|
|
2050
|
-
|
|
2050
|
+
h.value ? (l(), a("th", ia, [
|
|
2051
2051
|
s("input", {
|
|
2052
2052
|
type: "checkbox",
|
|
2053
2053
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2054
2054
|
checked: F.value,
|
|
2055
|
-
indeterminate:
|
|
2056
|
-
onChange:
|
|
2055
|
+
indeterminate: q.value,
|
|
2056
|
+
onChange: C,
|
|
2057
2057
|
"aria-label": "Seleccionar todas las filas"
|
|
2058
2058
|
}, null, 40, da)
|
|
2059
|
-
])) :
|
|
2059
|
+
])) : c("", !0),
|
|
2060
2060
|
(l(!0), a(K, null, G(t.columns, (i) => (l(), a("th", {
|
|
2061
2061
|
key: i.key,
|
|
2062
2062
|
style: X(i.width ? { width: i.width } : {}),
|
|
2063
|
-
class:
|
|
2063
|
+
class: u([
|
|
2064
2064
|
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
2065
2065
|
i.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
2066
2066
|
e.headerClass,
|
|
@@ -2069,10 +2069,10 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2069
2069
|
onClick: (M) => i.sortable && z(i.key)
|
|
2070
2070
|
}, [
|
|
2071
2071
|
s("div", ca, [
|
|
2072
|
-
s("span", null,
|
|
2072
|
+
s("span", null, B(i.label), 1),
|
|
2073
2073
|
i.sortable ? (l(), a("span", fa, [
|
|
2074
|
-
n.value !== i.key ? (l(), a("span", pa, "⇅")) : (l(), a("span", va,
|
|
2075
|
-
])) :
|
|
2074
|
+
n.value !== i.key ? (l(), a("span", pa, "⇅")) : (l(), a("span", va, B(v.value === "asc" ? "↑" : "↓"), 1))
|
|
2075
|
+
])) : c("", !0)
|
|
2076
2076
|
])
|
|
2077
2077
|
], 14, ua))), 128))
|
|
2078
2078
|
], 2)
|
|
@@ -2080,57 +2080,57 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2080
2080
|
s("tbody", ba, [
|
|
2081
2081
|
(l(!0), a(K, null, G(k.value, (i, M) => (l(), a("tr", {
|
|
2082
2082
|
key: M,
|
|
2083
|
-
class:
|
|
2083
|
+
class: u([
|
|
2084
2084
|
"w-full border-b border-gray-200 transition-colors bg-white",
|
|
2085
|
-
|
|
2086
|
-
|
|
2085
|
+
o.value && M % 2 === 1 ? "bg-gray-50" : "",
|
|
2086
|
+
f.value ? "hover:bg-blue-50" : "",
|
|
2087
2087
|
e.rowClass,
|
|
2088
|
-
|
|
2088
|
+
b.value
|
|
2089
2089
|
])
|
|
2090
2090
|
}, [
|
|
2091
|
-
|
|
2091
|
+
h.value ? (l(), a("td", {
|
|
2092
2092
|
key: 0,
|
|
2093
|
-
class:
|
|
2093
|
+
class: u(["px-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0 w-10", b.value])
|
|
2094
2094
|
}, [
|
|
2095
2095
|
s("input", {
|
|
2096
2096
|
type: "checkbox",
|
|
2097
2097
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2098
|
-
checked:
|
|
2099
|
-
onChange: (x) =>
|
|
2098
|
+
checked: I(i, M),
|
|
2099
|
+
onChange: (x) => g(i, M, x),
|
|
2100
2100
|
"aria-label": `Seleccionar fila ${M + 1}`
|
|
2101
|
-
}, null, 40,
|
|
2102
|
-
], 2)) :
|
|
2101
|
+
}, null, 40, ma)
|
|
2102
|
+
], 2)) : c("", !0),
|
|
2103
2103
|
(l(!0), a(K, null, G(t.columns, (x) => (l(), a("td", {
|
|
2104
2104
|
key: `${M}-${x.key}`,
|
|
2105
|
-
class:
|
|
2105
|
+
class: u([
|
|
2106
2106
|
"px-4 text-xs text-gray-600 border-l border-gray-100 first:border-l-0 bg-white",
|
|
2107
2107
|
e.rowClass,
|
|
2108
2108
|
e.cellClass,
|
|
2109
|
-
|
|
2109
|
+
b.value
|
|
2110
2110
|
])
|
|
2111
2111
|
}, [
|
|
2112
|
-
|
|
2112
|
+
L(d.$slots, `cell-${x.key}`, {
|
|
2113
2113
|
value: i[x.key],
|
|
2114
2114
|
row: i
|
|
2115
2115
|
}, () => [
|
|
2116
|
-
Y(
|
|
2116
|
+
Y(B(i[x.key]), 1)
|
|
2117
2117
|
], !0)
|
|
2118
2118
|
], 2))), 128))
|
|
2119
2119
|
], 2))), 128))
|
|
2120
2120
|
])
|
|
2121
2121
|
]),
|
|
2122
|
-
k.value.length === 0 ? (l(), a("div",
|
|
2123
|
-
|
|
2124
|
-
|
|
2122
|
+
k.value.length === 0 ? (l(), a("div", ga, [
|
|
2123
|
+
L(d.$slots, "empty", {}, () => [
|
|
2124
|
+
$[3] || ($[3] = Y("No hay datos disponibles", -1))
|
|
2125
2125
|
], !0)
|
|
2126
|
-
])) :
|
|
2126
|
+
])) : c("", !0)
|
|
2127
2127
|
]),
|
|
2128
2128
|
d.$slots.footer ? (l(), a("div", ya, [
|
|
2129
|
-
|
|
2130
|
-
])) :
|
|
2129
|
+
L(d.$slots, "footer", {}, void 0, !0)
|
|
2130
|
+
])) : c("", !0)
|
|
2131
2131
|
]));
|
|
2132
2132
|
}
|
|
2133
|
-
}), as = /* @__PURE__ */ Z(ha, [["__scopeId", "data-v-
|
|
2133
|
+
}), as = /* @__PURE__ */ Z(ha, [["__scopeId", "data-v-9020135c"]]), xa = { class: "tabs-wrapper" }, wa = ["aria-selected", "onClick"], ka = "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500", Ca = /* @__PURE__ */ N({
|
|
2134
2134
|
__name: "Tabs",
|
|
2135
2135
|
props: {
|
|
2136
2136
|
modelValue: {},
|
|
@@ -2140,57 +2140,57 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2140
2140
|
variant: { default: "default" }
|
|
2141
2141
|
},
|
|
2142
2142
|
emits: ["update:modelValue"],
|
|
2143
|
-
setup(t, { emit:
|
|
2144
|
-
const e = t,
|
|
2143
|
+
setup(t, { emit: m }) {
|
|
2144
|
+
const e = t, b = m, o = r(() => ({
|
|
2145
2145
|
default: "border-b-3",
|
|
2146
2146
|
bordered: "border border-secondary-200 rounded-t-lg",
|
|
2147
2147
|
pill: "rounded-full bg-secondary-100 mx-1"
|
|
2148
|
-
})[e.variant]),
|
|
2148
|
+
})[e.variant]), f = r(() => ({
|
|
2149
2149
|
default: "border-b border-gray-200",
|
|
2150
2150
|
bordered: "gap-0",
|
|
2151
2151
|
pill: "gap-2 bg-white p-1 rounded-full border border-secondary-200"
|
|
2152
|
-
})[e.variant]),
|
|
2152
|
+
})[e.variant]), p = r(() => ({
|
|
2153
2153
|
default: "text-primary-600 border-primary-600 font-semibold",
|
|
2154
2154
|
bordered: "text-primary-600 border-primary-600 bg-primary-50 font-semibold",
|
|
2155
2155
|
pill: "text-white bg-primary-600 font-semibold"
|
|
2156
|
-
})[e.variant]), n =
|
|
2156
|
+
})[e.variant]), n = r(() => ({
|
|
2157
2157
|
default: "hover:text-secondary-700 border-transparent font-normal",
|
|
2158
2158
|
bordered: "text-secondary-600 hover:text-primary-600 font-normal",
|
|
2159
2159
|
pill: "text-secondary-600 hover:text-secondary-900 font-normal"
|
|
2160
|
-
})[e.variant]),
|
|
2161
|
-
|
|
2162
|
-
}, k =
|
|
2163
|
-
() => e.tabs.find((
|
|
2160
|
+
})[e.variant]), v = (h) => e.modelValue === h, z = (h) => {
|
|
2161
|
+
v(h) || b("update:modelValue", h);
|
|
2162
|
+
}, k = r(() => e.modelValue), y = r(
|
|
2163
|
+
() => e.tabs.find((h) => h.value === k.value)
|
|
2164
2164
|
);
|
|
2165
|
-
return (
|
|
2165
|
+
return (h, V) => (l(), a("div", xa, [
|
|
2166
2166
|
s("div", {
|
|
2167
|
-
class:
|
|
2167
|
+
class: u(["tabs-header", t.headerClass])
|
|
2168
2168
|
}, [
|
|
2169
2169
|
s("div", {
|
|
2170
|
-
class:
|
|
2170
|
+
class: u(["tabs-container", f.value]),
|
|
2171
2171
|
role: "tablist"
|
|
2172
2172
|
}, [
|
|
2173
|
-
(l(!0), a(K, null, G(t.tabs, (
|
|
2174
|
-
key:
|
|
2173
|
+
(l(!0), a(K, null, G(t.tabs, (j) => (l(), a("button", {
|
|
2174
|
+
key: j.value,
|
|
2175
2175
|
type: "button",
|
|
2176
|
-
class:
|
|
2176
|
+
class: u([
|
|
2177
2177
|
ka,
|
|
2178
|
-
|
|
2179
|
-
|
|
2178
|
+
o.value,
|
|
2179
|
+
v(j.value) ? p.value : n.value
|
|
2180
2180
|
]),
|
|
2181
|
-
"aria-selected":
|
|
2181
|
+
"aria-selected": v(j.value),
|
|
2182
2182
|
role: "tab",
|
|
2183
|
-
onClick: (
|
|
2184
|
-
},
|
|
2183
|
+
onClick: (O) => z(j.value)
|
|
2184
|
+
}, B(j.label), 11, wa))), 128))
|
|
2185
2185
|
], 2)
|
|
2186
2186
|
], 2),
|
|
2187
2187
|
s("div", {
|
|
2188
|
-
class:
|
|
2188
|
+
class: u(["tabs-content", t.contentClass]),
|
|
2189
2189
|
role: "tabpanel"
|
|
2190
2190
|
}, [
|
|
2191
|
-
|
|
2191
|
+
L(h.$slots, k.value, {
|
|
2192
2192
|
active: k.value,
|
|
2193
|
-
tab:
|
|
2193
|
+
tab: y.value
|
|
2194
2194
|
}, void 0, !0)
|
|
2195
2195
|
], 2)
|
|
2196
2196
|
]));
|
|
@@ -2207,7 +2207,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2207
2207
|
weight: {}
|
|
2208
2208
|
},
|
|
2209
2209
|
setup(t) {
|
|
2210
|
-
const
|
|
2210
|
+
const m = {
|
|
2211
2211
|
h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
|
|
2212
2212
|
h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
|
|
2213
2213
|
h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
|
|
@@ -2247,12 +2247,12 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2247
2247
|
button3: "span",
|
|
2248
2248
|
caption: "span",
|
|
2249
2249
|
overline: "span"
|
|
2250
|
-
},
|
|
2250
|
+
}, b = {
|
|
2251
2251
|
left: "text-left",
|
|
2252
2252
|
center: "text-center",
|
|
2253
2253
|
right: "text-right",
|
|
2254
2254
|
justify: "text-justify"
|
|
2255
|
-
},
|
|
2255
|
+
}, o = {
|
|
2256
2256
|
default: "text-secondary-900",
|
|
2257
2257
|
muted: "text-secondary-600",
|
|
2258
2258
|
primary: "text-primary-600",
|
|
@@ -2260,37 +2260,37 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2260
2260
|
danger: "text-danger-600",
|
|
2261
2261
|
success: "text-success-600",
|
|
2262
2262
|
warning: "text-warning-600"
|
|
2263
|
-
},
|
|
2263
|
+
}, f = {
|
|
2264
2264
|
light: "font-light",
|
|
2265
2265
|
normal: "font-normal",
|
|
2266
2266
|
medium: "font-medium",
|
|
2267
2267
|
semibold: "font-semibold",
|
|
2268
2268
|
bold: "font-bold",
|
|
2269
2269
|
extrabold: "font-extrabold"
|
|
2270
|
-
},
|
|
2270
|
+
}, p = t, n = r(() => p.variant), v = r(() => p.align), z = r(() => p.as || e[n.value] || "span"), k = r(() => p.color && p.color.startsWith("#")), y = r(() => k.value ? "" : o[p.color] || o.default), h = r(() => k.value ? { color: p.color } : {}), V = r(() => p.weight ? { fontWeight: {
|
|
2271
2271
|
light: 300,
|
|
2272
2272
|
normal: 400,
|
|
2273
2273
|
medium: 500,
|
|
2274
2274
|
semibold: 600,
|
|
2275
2275
|
bold: 700,
|
|
2276
2276
|
extrabold: 800
|
|
2277
|
-
}[
|
|
2278
|
-
return (
|
|
2279
|
-
class:
|
|
2277
|
+
}[p.weight] } : {}), j = r(() => p.weight ? f[p.weight] : "");
|
|
2278
|
+
return (O, F) => (l(), te(he(z.value), {
|
|
2279
|
+
class: u([
|
|
2280
2280
|
$a,
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2281
|
+
m[n.value],
|
|
2282
|
+
y.value,
|
|
2283
|
+
b[v.value],
|
|
2284
|
+
j.value,
|
|
2285
2285
|
{
|
|
2286
2286
|
uppercase: t.uppercase || n.value === "overline",
|
|
2287
2287
|
truncate: t.truncate
|
|
2288
2288
|
}
|
|
2289
2289
|
]),
|
|
2290
|
-
style: X([
|
|
2290
|
+
style: X([h.value, V.value])
|
|
2291
2291
|
}, {
|
|
2292
2292
|
default: re(() => [
|
|
2293
|
-
O
|
|
2293
|
+
L(O.$slots, "default")
|
|
2294
2294
|
]),
|
|
2295
2295
|
_: 3
|
|
2296
2296
|
}, 8, ["class", "style"]));
|
|
@@ -2318,74 +2318,74 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2318
2318
|
itemLabel: { default: "" }
|
|
2319
2319
|
},
|
|
2320
2320
|
emits: ["update:modelValue", "change"],
|
|
2321
|
-
setup(t, { emit:
|
|
2322
|
-
const e = t,
|
|
2323
|
-
const
|
|
2324
|
-
return
|
|
2325
|
-
}),
|
|
2326
|
-
const
|
|
2327
|
-
return
|
|
2328
|
-
}),
|
|
2329
|
-
const
|
|
2330
|
-
if (
|
|
2331
|
-
return Array.from({ length:
|
|
2332
|
-
const
|
|
2333
|
-
let
|
|
2334
|
-
|
|
2335
|
-
const
|
|
2336
|
-
|
|
2337
|
-
for (let
|
|
2338
|
-
|
|
2339
|
-
return F <
|
|
2321
|
+
setup(t, { emit: m }) {
|
|
2322
|
+
const e = t, b = m, o = r(() => {
|
|
2323
|
+
const y = Math.ceil(e.totalItems / e.pageSize);
|
|
2324
|
+
return y > 0 ? y : 1;
|
|
2325
|
+
}), f = r(() => {
|
|
2326
|
+
const y = Number(e.modelValue || 1);
|
|
2327
|
+
return y < 1 ? 1 : y > o.value ? o.value : y;
|
|
2328
|
+
}), p = r(() => e.totalItems === 0 ? 0 : (f.value - 1) * e.pageSize + 1), n = r(() => Math.min(f.value * e.pageSize, e.totalItems)), v = r(() => `Mostrando ${p.value} a ${n.value} de ${e.totalItems}`), z = r(() => {
|
|
2329
|
+
const y = o.value, h = Math.max(3, e.maxPages), V = f.value;
|
|
2330
|
+
if (y <= h)
|
|
2331
|
+
return Array.from({ length: y }, (S, I) => I + 1);
|
|
2332
|
+
const j = Math.floor(h / 2);
|
|
2333
|
+
let O = Math.max(1, V - j), F = Math.min(y, O + h - 1);
|
|
2334
|
+
O = Math.max(1, Math.min(O, F - h + 1));
|
|
2335
|
+
const q = [];
|
|
2336
|
+
O > 1 && (q.push(1), O > 2 && q.push("…"));
|
|
2337
|
+
for (let S = O; S <= F; S++)
|
|
2338
|
+
q.push(S);
|
|
2339
|
+
return F < y && (F < y - 1 && q.push("…"), q.push(y)), q;
|
|
2340
2340
|
});
|
|
2341
|
-
function k(
|
|
2342
|
-
const
|
|
2343
|
-
|
|
2341
|
+
function k(y) {
|
|
2342
|
+
const h = Math.max(1, Math.min(y, o.value));
|
|
2343
|
+
h !== f.value && (b("update:modelValue", h), b("change", h));
|
|
2344
2344
|
}
|
|
2345
|
-
return (
|
|
2345
|
+
return (y, h) => (l(), a("div", Ba, [
|
|
2346
2346
|
t.showSummary ? (l(), a("div", za, [
|
|
2347
|
-
|
|
2348
|
-
start:
|
|
2347
|
+
L(y.$slots, "summary", {
|
|
2348
|
+
start: p.value,
|
|
2349
2349
|
end: n.value,
|
|
2350
2350
|
total: t.totalItems
|
|
2351
2351
|
}, () => [
|
|
2352
|
-
Y(
|
|
2353
|
-
t.itemLabel ? (l(), a("span", Ma,
|
|
2352
|
+
Y(B(v.value) + " ", 1),
|
|
2353
|
+
t.itemLabel ? (l(), a("span", Ma, B(t.itemLabel), 1)) : c("", !0)
|
|
2354
2354
|
], !0)
|
|
2355
|
-
])) :
|
|
2355
|
+
])) : c("", !0),
|
|
2356
2356
|
s("nav", Da, [
|
|
2357
2357
|
s("button", {
|
|
2358
2358
|
type: "button",
|
|
2359
2359
|
class: "h-8 px-3 rounded-full pagination-text hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2360
|
-
disabled:
|
|
2361
|
-
onClick:
|
|
2360
|
+
disabled: f.value <= 1,
|
|
2361
|
+
onClick: h[0] || (h[0] = (V) => k(f.value - 1)),
|
|
2362
2362
|
"aria-label": "Anterior"
|
|
2363
|
-
},
|
|
2364
|
-
(l(!0), a(K, null, G(z.value, (
|
|
2365
|
-
key: `page-${
|
|
2363
|
+
}, B(t.previousText), 9, Va),
|
|
2364
|
+
(l(!0), a(K, null, G(z.value, (V, j) => (l(), a(K, {
|
|
2365
|
+
key: `page-${j}-${V}`
|
|
2366
2366
|
}, [
|
|
2367
|
-
|
|
2367
|
+
V === "…" ? (l(), a("span", Ta, " … ")) : (l(), a("button", {
|
|
2368
2368
|
key: 1,
|
|
2369
2369
|
type: "button",
|
|
2370
|
-
"aria-label": `Página ${
|
|
2371
|
-
class:
|
|
2370
|
+
"aria-label": `Página ${V}`,
|
|
2371
|
+
class: u([
|
|
2372
2372
|
"h-8 min-w-8 px-3 rounded-full transition-colors",
|
|
2373
|
-
|
|
2373
|
+
V === f.value ? "bg-primary-500 text-white font-semibold" : "pagination-text hover:bg-secondary-100"
|
|
2374
2374
|
]),
|
|
2375
|
-
onClick: (
|
|
2376
|
-
},
|
|
2375
|
+
onClick: (O) => k(V)
|
|
2376
|
+
}, B(V), 11, Sa))
|
|
2377
2377
|
], 64))), 128)),
|
|
2378
2378
|
s("button", {
|
|
2379
2379
|
type: "button",
|
|
2380
2380
|
class: "h-8 px-3 rounded-full pagination-text hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2381
|
-
disabled:
|
|
2382
|
-
onClick:
|
|
2381
|
+
disabled: f.value >= o.value,
|
|
2382
|
+
onClick: h[1] || (h[1] = (V) => k(f.value + 1)),
|
|
2383
2383
|
"aria-label": "Siguiente"
|
|
2384
|
-
},
|
|
2384
|
+
}, B(t.nextText), 9, Ia)
|
|
2385
2385
|
])
|
|
2386
2386
|
]));
|
|
2387
2387
|
}
|
|
2388
|
-
}), rs = /* @__PURE__ */ Z(ja, [["__scopeId", "data-v-
|
|
2388
|
+
}), rs = /* @__PURE__ */ Z(ja, [["__scopeId", "data-v-57203ae8"]]), ns = /* @__PURE__ */ N({
|
|
2389
2389
|
__name: "Tooltip",
|
|
2390
2390
|
props: {
|
|
2391
2391
|
content: { default: "" },
|
|
@@ -2398,63 +2398,63 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2398
2398
|
closeDelay: { default: 100 }
|
|
2399
2399
|
},
|
|
2400
2400
|
setup(t) {
|
|
2401
|
-
const
|
|
2402
|
-
let
|
|
2403
|
-
const
|
|
2404
|
-
|
|
2401
|
+
const m = t, e = P(!1);
|
|
2402
|
+
let b = null, o = null;
|
|
2403
|
+
const f = () => {
|
|
2404
|
+
m.trigger === "hover" && (clearTimeout(o), b = setTimeout(() => {
|
|
2405
2405
|
e.value = !0;
|
|
2406
|
-
},
|
|
2407
|
-
},
|
|
2408
|
-
|
|
2406
|
+
}, m.openDelay));
|
|
2407
|
+
}, p = () => {
|
|
2408
|
+
m.trigger === "hover" && (clearTimeout(b), o = setTimeout(() => {
|
|
2409
2409
|
e.value = !1;
|
|
2410
|
-
},
|
|
2410
|
+
}, m.closeDelay));
|
|
2411
2411
|
}, n = () => {
|
|
2412
|
-
|
|
2413
|
-
},
|
|
2414
|
-
|
|
2412
|
+
m.trigger === "click" && (e.value = !e.value);
|
|
2413
|
+
}, v = () => {
|
|
2414
|
+
m.trigger === "focus" && (e.value = !0);
|
|
2415
2415
|
}, z = () => {
|
|
2416
|
-
|
|
2416
|
+
m.trigger === "focus" && (e.value = !1);
|
|
2417
2417
|
}, k = {
|
|
2418
2418
|
sm: "px-2 py-1 text-xs",
|
|
2419
2419
|
md: "px-3 py-2 text-sm",
|
|
2420
2420
|
lg: "px-4 py-3 text-base"
|
|
2421
|
-
},
|
|
2421
|
+
}, y = {
|
|
2422
2422
|
// Deja un pequeño espacio entre el activador y el tooltip
|
|
2423
2423
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
2424
2424
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
2425
2425
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
2426
2426
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
2427
|
-
},
|
|
2427
|
+
}, h = r(() => `absolute w-0 h-0 border-solid border-4 border-transparent ${{
|
|
2428
2428
|
top: "bottom-[-8px] rotate-180 left-1/2 -translate-x-1/2",
|
|
2429
2429
|
bottom: "top-[-8px] rotate-180 left-1/2 -translate-x-1/2",
|
|
2430
2430
|
left: "right-[-8px] rotate-180 top-1/2 -translate-y-1/2",
|
|
2431
2431
|
right: "left-[-8px] rotate-180 top-1/2 -translate-y-1/2"
|
|
2432
|
-
}[
|
|
2432
|
+
}[m.position]}`), V = r(() => ({
|
|
2433
2433
|
"bg-gray-900": "#111827",
|
|
2434
2434
|
"bg-primary-500": "#0ea5e9",
|
|
2435
2435
|
"bg-green-600": "#16a34a",
|
|
2436
2436
|
"bg-yellow-600": "#ca8a04",
|
|
2437
2437
|
"bg-danger-600": "#dc2626"
|
|
2438
|
-
})[
|
|
2438
|
+
})[m.backgroundColor] || "#111827"), j = r(() => ({
|
|
2439
2439
|
// Orden: top, right, bottom, left
|
|
2440
|
-
top: `transparent transparent ${
|
|
2440
|
+
top: `transparent transparent ${V.value} transparent`,
|
|
2441
2441
|
// tooltip arriba → flecha apunta hacia abajo (borde inferior coloreado)
|
|
2442
|
-
bottom: `${
|
|
2442
|
+
bottom: `${V.value} transparent transparent transparent`,
|
|
2443
2443
|
// tooltip abajo → flecha apunta hacia arriba (borde superior coloreado)
|
|
2444
|
-
left: `transparent ${
|
|
2444
|
+
left: `transparent ${V.value} transparent transparent`,
|
|
2445
2445
|
// tooltip a la izquierda → flecha apunta hacia la derecha (borde derecho coloreado)
|
|
2446
|
-
right: `transparent transparent transparent ${
|
|
2446
|
+
right: `transparent transparent transparent ${V.value}`
|
|
2447
2447
|
// tooltip a la derecha → flecha apunta hacia la izquierda (borde izquierdo coloreado)
|
|
2448
|
-
})[
|
|
2449
|
-
return (F,
|
|
2448
|
+
})[m.position]), O = r(() => `absolute ${y[m.position]} ${m.textColor} ${k[m.size]} rounded-md shadow-lg whitespace-nowrap z-50`);
|
|
2449
|
+
return (F, q) => (l(), a("div", {
|
|
2450
2450
|
class: "relative inline-flex",
|
|
2451
|
-
onMouseenter:
|
|
2452
|
-
onMouseleave:
|
|
2451
|
+
onMouseenter: f,
|
|
2452
|
+
onMouseleave: p,
|
|
2453
2453
|
onClick: n,
|
|
2454
|
-
onFocus:
|
|
2454
|
+
onFocus: v,
|
|
2455
2455
|
onBlur: z
|
|
2456
2456
|
}, [
|
|
2457
|
-
|
|
2457
|
+
L(F.$slots, "default"),
|
|
2458
2458
|
Q(ie, {
|
|
2459
2459
|
"enter-active-class": "transition-opacity duration-200",
|
|
2460
2460
|
"enter-from-class": "opacity-0",
|
|
@@ -2466,18 +2466,18 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2466
2466
|
default: re(() => [
|
|
2467
2467
|
e.value ? (l(), a("div", {
|
|
2468
2468
|
key: 0,
|
|
2469
|
-
class:
|
|
2470
|
-
style: X({ backgroundColor:
|
|
2469
|
+
class: u(O.value),
|
|
2470
|
+
style: X({ backgroundColor: V.value }),
|
|
2471
2471
|
role: "tooltip"
|
|
2472
2472
|
}, [
|
|
2473
|
-
|
|
2474
|
-
Y(
|
|
2473
|
+
L(F.$slots, "content", {}, () => [
|
|
2474
|
+
Y(B(t.content), 1)
|
|
2475
2475
|
]),
|
|
2476
2476
|
s("div", {
|
|
2477
|
-
class:
|
|
2478
|
-
style: X({ borderColor:
|
|
2477
|
+
class: u(h.value),
|
|
2478
|
+
style: X({ borderColor: j.value })
|
|
2479
2479
|
}, null, 6)
|
|
2480
|
-
], 6)) :
|
|
2480
|
+
], 6)) : c("", !0)
|
|
2481
2481
|
]),
|
|
2482
2482
|
_: 3
|
|
2483
2483
|
})
|
|
@@ -2496,8 +2496,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2496
2496
|
closeAriaLabel: { default: "Cerrar" }
|
|
2497
2497
|
},
|
|
2498
2498
|
emits: ["click", "close"],
|
|
2499
|
-
setup(t, { emit:
|
|
2500
|
-
const e = t,
|
|
2499
|
+
setup(t, { emit: m }) {
|
|
2500
|
+
const e = t, b = m, o = r(() => !!e.icon), f = r(() => e.icon || ""), p = {
|
|
2501
2501
|
sm: "h-7 text-xs px-3 gap-1.5 font-semibold leading-none",
|
|
2502
2502
|
md: "h-8 text-sm px-3.5 gap-2 font-semibold leading-none"
|
|
2503
2503
|
}, n = {
|
|
@@ -2508,8 +2508,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2508
2508
|
},
|
|
2509
2509
|
primary: {
|
|
2510
2510
|
filled: "bg-primary-600 text-white border border-primary-600",
|
|
2511
|
-
outlined: "bg-white text-primary-
|
|
2512
|
-
tonal: "bg-primary-50 text-primary-
|
|
2511
|
+
outlined: "bg-white text-primary-500 border border-primary-300",
|
|
2512
|
+
tonal: "bg-primary-50 text-primary-500 border border-primary-100"
|
|
2513
2513
|
},
|
|
2514
2514
|
secondary: {
|
|
2515
2515
|
filled: "bg-secondary-600 text-white border border-secondary-600",
|
|
@@ -2536,39 +2536,39 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2536
2536
|
outlined: "bg-white text-sky-700 border border-sky-300",
|
|
2537
2537
|
tonal: "bg-sky-50 text-sky-700 border border-sky-100"
|
|
2538
2538
|
}
|
|
2539
|
-
},
|
|
2540
|
-
const
|
|
2539
|
+
}, v = r(() => {
|
|
2540
|
+
const h = n[e.color] ?? n.default, V = h[e.variant] ?? h.filled;
|
|
2541
2541
|
return [
|
|
2542
2542
|
"inline-flex items-center select-none",
|
|
2543
2543
|
"transition-colors duration-150",
|
|
2544
2544
|
"max-w-full",
|
|
2545
|
-
|
|
2545
|
+
p[e.size],
|
|
2546
2546
|
"rounded-full",
|
|
2547
2547
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-default",
|
|
2548
|
-
|
|
2548
|
+
V
|
|
2549
2549
|
].join(" ");
|
|
2550
|
-
}), z =
|
|
2551
|
-
e.disabled ||
|
|
2552
|
-
},
|
|
2553
|
-
e.disabled ||
|
|
2550
|
+
}), z = r(() => "text-current flex items-center"), k = () => {
|
|
2551
|
+
e.disabled || b("close");
|
|
2552
|
+
}, y = () => {
|
|
2553
|
+
e.disabled || b("click");
|
|
2554
2554
|
};
|
|
2555
|
-
return (
|
|
2556
|
-
class:
|
|
2555
|
+
return (h, V) => (l(), a("div", {
|
|
2556
|
+
class: u(v.value),
|
|
2557
2557
|
role: "status",
|
|
2558
|
-
onClick:
|
|
2558
|
+
onClick: y
|
|
2559
2559
|
}, [
|
|
2560
|
-
|
|
2560
|
+
o.value ? (l(), a("span", {
|
|
2561
2561
|
key: 0,
|
|
2562
|
-
class:
|
|
2562
|
+
class: u(z.value)
|
|
2563
2563
|
}, [
|
|
2564
2564
|
Q(_, {
|
|
2565
|
-
name:
|
|
2565
|
+
name: f.value,
|
|
2566
2566
|
size: "sm"
|
|
2567
2567
|
}, null, 8, ["name"])
|
|
2568
|
-
], 2)) :
|
|
2568
|
+
], 2)) : c("", !0),
|
|
2569
2569
|
s("span", La, [
|
|
2570
|
-
|
|
2571
|
-
Y(
|
|
2570
|
+
L(h.$slots, "default", {}, () => [
|
|
2571
|
+
Y(B(t.label), 1)
|
|
2572
2572
|
])
|
|
2573
2573
|
]),
|
|
2574
2574
|
t.closable ? (l(), a("button", {
|
|
@@ -2583,7 +2583,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2583
2583
|
name: "close",
|
|
2584
2584
|
size: "sm"
|
|
2585
2585
|
})
|
|
2586
|
-
], 8, Oa)) :
|
|
2586
|
+
], 8, Oa)) : c("", !0)
|
|
2587
2587
|
], 2));
|
|
2588
2588
|
}
|
|
2589
2589
|
}), Aa = ["data-node-id"], Fa = {
|
|
@@ -2647,12 +2647,27 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2647
2647
|
actions: { type: Boolean, default: !1 },
|
|
2648
2648
|
showIcon: { type: Boolean, default: !0 },
|
|
2649
2649
|
nodeId: { default: void 0 },
|
|
2650
|
-
stackOn: { default: void 0 }
|
|
2650
|
+
stackOn: { default: void 0 },
|
|
2651
|
+
autoClose: { default: void 0 }
|
|
2651
2652
|
},
|
|
2652
2653
|
emits: ["close", "accept", "cancel"],
|
|
2653
|
-
setup(t, { emit:
|
|
2654
|
-
const e =
|
|
2655
|
-
|
|
2654
|
+
setup(t, { emit: m }) {
|
|
2655
|
+
const e = m;
|
|
2656
|
+
let b = null;
|
|
2657
|
+
const o = t, f = r(() => o.variant), p = r(() => o.multiline), n = r(() => o.actions), v = r(() => o.nodeId), z = r(() => o.showIcon), k = () => {
|
|
2658
|
+
y(), e("close");
|
|
2659
|
+
}, y = () => {
|
|
2660
|
+
b !== null && (clearTimeout(b), b = null);
|
|
2661
|
+
};
|
|
2662
|
+
me(() => {
|
|
2663
|
+
o.autoClose && o.autoClose > 0 && (b = setTimeout(() => {
|
|
2664
|
+
e("close");
|
|
2665
|
+
}, o.autoClose));
|
|
2666
|
+
}), ge(() => {
|
|
2667
|
+
y();
|
|
2668
|
+
});
|
|
2669
|
+
const h = r(() => !!o.title), V = r(() => o.title ?? ""), j = r(() => o.description ?? ""), O = r(() => {
|
|
2670
|
+
switch (f.value) {
|
|
2656
2671
|
case "info":
|
|
2657
2672
|
return {
|
|
2658
2673
|
border: "border-[var(--semantica/info,#0064ff)]",
|
|
@@ -2674,35 +2689,35 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2674
2689
|
bg: "bg-[#fdf7f9] outline outline-1 outline-[rgba(214,0,64,0.5)]"
|
|
2675
2690
|
};
|
|
2676
2691
|
}
|
|
2677
|
-
}),
|
|
2678
|
-
const
|
|
2679
|
-
if (!
|
|
2680
|
-
const
|
|
2681
|
-
return `${
|
|
2682
|
-
}),
|
|
2683
|
-
if (!
|
|
2684
|
-
const
|
|
2685
|
-
return `flex-col ${
|
|
2686
|
-
}),
|
|
2687
|
-
if (!
|
|
2688
|
-
const
|
|
2689
|
-
return `flex-col ${
|
|
2690
|
-
}),
|
|
2691
|
-
return (
|
|
2692
|
-
class:
|
|
2693
|
-
|
|
2694
|
-
|
|
2692
|
+
}), F = r(() => "bg-[var(--color-primario/500,#56ced4)]"), q = r(() => {
|
|
2693
|
+
const A = "flex w-full items-start gap-4 flex-col";
|
|
2694
|
+
if (!o.stackOn) return `${A} sm:flex-row sm:items-center`;
|
|
2695
|
+
const C = o.stackOn, g = `${C}:flex-row ${C}:items-center`;
|
|
2696
|
+
return `${A} ${g}`;
|
|
2697
|
+
}), S = r(() => {
|
|
2698
|
+
if (!o.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
|
|
2699
|
+
const A = o.stackOn;
|
|
2700
|
+
return `flex-col ${A}:flex-row items-start ${A}:items-center`;
|
|
2701
|
+
}), I = r(() => {
|
|
2702
|
+
if (!o.stackOn) return "flex-col sm:flex-row sm:items-center w-full";
|
|
2703
|
+
const A = o.stackOn;
|
|
2704
|
+
return `flex-col ${A}:flex-row ${A}:items-center w-full`;
|
|
2705
|
+
}), W = r(() => o.stackOn ? `self-start ${o.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
2706
|
+
return (A, C) => (l(), a("div", {
|
|
2707
|
+
class: u(["relative w-full rounded-xl border", [
|
|
2708
|
+
O.value.border,
|
|
2709
|
+
O.value.bg
|
|
2695
2710
|
]]),
|
|
2696
2711
|
role: "alert",
|
|
2697
|
-
"data-node-id":
|
|
2712
|
+
"data-node-id": v.value
|
|
2698
2713
|
}, [
|
|
2699
2714
|
t.closable ? (l(), a("button", {
|
|
2700
2715
|
key: 0,
|
|
2701
2716
|
type: "button",
|
|
2702
2717
|
class: "absolute top-3 right-3 text-[color:var(--neutrales/texto-principal,#565656)]/70 hover:opacity-100 opacity-70",
|
|
2703
2718
|
"aria-label": "Cerrar",
|
|
2704
|
-
onClick:
|
|
2705
|
-
}, [...
|
|
2719
|
+
onClick: k
|
|
2720
|
+
}, [...C[2] || (C[2] = [
|
|
2706
2721
|
s("svg", {
|
|
2707
2722
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2708
2723
|
width: "18",
|
|
@@ -2727,15 +2742,15 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2727
2742
|
y2: "18"
|
|
2728
2743
|
})
|
|
2729
2744
|
], -1)
|
|
2730
|
-
])])) :
|
|
2745
|
+
])])) : c("", !0),
|
|
2731
2746
|
s("div", {
|
|
2732
|
-
class:
|
|
2747
|
+
class: u(["p-6", { "pb-0": n.value }])
|
|
2733
2748
|
}, [
|
|
2734
2749
|
s("div", {
|
|
2735
|
-
class:
|
|
2750
|
+
class: u(q.value)
|
|
2736
2751
|
}, [
|
|
2737
|
-
|
|
2738
|
-
|
|
2752
|
+
z.value ? (l(), a("div", Fa, [
|
|
2753
|
+
f.value === "info" ? (l(), a("svg", Wa, [...C[3] || (C[3] = [
|
|
2739
2754
|
s("circle", {
|
|
2740
2755
|
cx: "12",
|
|
2741
2756
|
cy: "12",
|
|
@@ -2753,7 +2768,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2753
2768
|
x2: "12",
|
|
2754
2769
|
y2: "8"
|
|
2755
2770
|
}, null, -1)
|
|
2756
|
-
])])) :
|
|
2771
|
+
])])) : f.value === "warning" ? (l(), a("svg", qa, [...C[4] || (C[4] = [
|
|
2757
2772
|
s("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }, null, -1),
|
|
2758
2773
|
s("line", {
|
|
2759
2774
|
x1: "12",
|
|
@@ -2767,10 +2782,10 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2767
2782
|
x2: "12",
|
|
2768
2783
|
y2: "17"
|
|
2769
2784
|
}, null, -1)
|
|
2770
|
-
])])) :
|
|
2785
|
+
])])) : f.value === "success" ? (l(), a("svg", Pa, [...C[5] || (C[5] = [
|
|
2771
2786
|
s("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
2772
2787
|
s("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
2773
|
-
])])) : (l(), a("svg", Ra, [...
|
|
2788
|
+
])])) : (l(), a("svg", Ra, [...C[6] || (C[6] = [
|
|
2774
2789
|
s("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }, null, -1),
|
|
2775
2790
|
s("line", {
|
|
2776
2791
|
x1: "12",
|
|
@@ -2785,48 +2800,48 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2785
2800
|
y2: "16"
|
|
2786
2801
|
}, null, -1)
|
|
2787
2802
|
])]))
|
|
2788
|
-
])) :
|
|
2803
|
+
])) : c("", !0),
|
|
2789
2804
|
s("div", {
|
|
2790
|
-
class:
|
|
2805
|
+
class: u(["flex-1 flex gap-4 text-[14px]", [S.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !p.value, "whitespace-pre-wrap": p.value }]])
|
|
2791
2806
|
}, [
|
|
2792
2807
|
s("div", {
|
|
2793
|
-
class:
|
|
2808
|
+
class: u(["flex flex-1 gap-3 items-start", I.value])
|
|
2794
2809
|
}, [
|
|
2795
|
-
|
|
2810
|
+
h.value ? (l(), a("div", {
|
|
2796
2811
|
key: 0,
|
|
2797
|
-
class:
|
|
2798
|
-
},
|
|
2812
|
+
class: u(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", W.value])
|
|
2813
|
+
}, B(V.value), 3)) : c("", !0),
|
|
2799
2814
|
s("div", {
|
|
2800
|
-
class:
|
|
2815
|
+
class: u(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !p.value }])
|
|
2801
2816
|
}, [
|
|
2802
|
-
|
|
2803
|
-
Y(
|
|
2817
|
+
L(A.$slots, "description", {}, () => [
|
|
2818
|
+
Y(B(j.value), 1)
|
|
2804
2819
|
])
|
|
2805
2820
|
], 2)
|
|
2806
2821
|
], 2)
|
|
2807
2822
|
], 2)
|
|
2808
2823
|
], 2)
|
|
2809
2824
|
], 2),
|
|
2810
|
-
|
|
2825
|
+
n.value ? (l(), a("div", Ea, [
|
|
2811
2826
|
s("button", {
|
|
2812
2827
|
type: "button",
|
|
2813
2828
|
class: "px-3 py-1.5 rounded-lg text-sm tracking-[0.25px] font-semibold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
2814
|
-
onClick:
|
|
2829
|
+
onClick: C[0] || (C[0] = (g) => A.$emit("cancel"))
|
|
2815
2830
|
}, [
|
|
2816
|
-
|
|
2817
|
-
|
|
2831
|
+
L(A.$slots, "cancel", {}, () => [
|
|
2832
|
+
C[7] || (C[7] = Y("Cancelar", -1))
|
|
2818
2833
|
])
|
|
2819
2834
|
]),
|
|
2820
2835
|
s("button", {
|
|
2821
2836
|
type: "button",
|
|
2822
|
-
class:
|
|
2823
|
-
onClick:
|
|
2837
|
+
class: u(["px-3 py-1.5 rounded-lg text-sm tracking-[0.25px] font-semibold text-white", F.value]),
|
|
2838
|
+
onClick: C[1] || (C[1] = (g) => A.$emit("accept"))
|
|
2824
2839
|
}, [
|
|
2825
|
-
|
|
2826
|
-
|
|
2840
|
+
L(A.$slots, "accept", {}, () => [
|
|
2841
|
+
C[8] || (C[8] = Y("Aceptar", -1))
|
|
2827
2842
|
])
|
|
2828
2843
|
], 2)
|
|
2829
|
-
])) :
|
|
2844
|
+
])) : c("", !0)
|
|
2830
2845
|
], 10, Aa));
|
|
2831
2846
|
}
|
|
2832
2847
|
});
|