@iaclinical/components 1.0.22 → 1.0.24
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 +303 -294
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Icon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as q, computed as r, createElementBlock as l, openBlock as s, normalizeClass as c, createElementVNode as o, createCommentVNode as y, renderSlot as V, toDisplayString as x, createBlock as ee, unref as Ae, normalizeStyle as Q, ref as L, onMounted as $e, onUnmounted as Ce, watch as ve, createTextVNode as _, withModifiers as H, createVNode as G, withDirectives as ue, Fragment as P, renderList as W, vModelSelect as ke, Teleport as pe, Transition as ce, withCtx as ae, nextTick as fe, resolveDynamicComponent as Me, vModelText as Ee } from "vue";
|
|
2
|
+
import { Icon as Pe } from "@iconify/vue";
|
|
3
|
+
const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
6
6
|
}, Re = { class: "flex flex-1 justify-center items-center min-w-0" }, Ne = {
|
|
@@ -9,7 +9,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
9
9
|
}, We = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
12
|
-
}, Ke = /* @__PURE__ */
|
|
12
|
+
}, Ke = /* @__PURE__ */ q({
|
|
13
13
|
__name: "AppBar",
|
|
14
14
|
props: {
|
|
15
15
|
title: { default: "" },
|
|
@@ -22,7 +22,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
22
22
|
},
|
|
23
23
|
emits: ["toggle-menu"],
|
|
24
24
|
setup(t, { emit: g }) {
|
|
25
|
-
const e = t,
|
|
25
|
+
const e = t, f = g, n = r(() => {
|
|
26
26
|
const u = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", v = {
|
|
27
27
|
default: "bg-primary-700 text-primary-50",
|
|
28
28
|
dark: "bg-secondary-900 text-white",
|
|
@@ -41,12 +41,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
41
41
|
].join(" ");
|
|
42
42
|
});
|
|
43
43
|
return (u, v) => (s(), l("header", {
|
|
44
|
-
class:
|
|
44
|
+
class: c(n.value)
|
|
45
45
|
}, [
|
|
46
|
-
o("div",
|
|
46
|
+
o("div", qe, [
|
|
47
47
|
t.showMenuButton ? (s(), l("button", {
|
|
48
48
|
key: 0,
|
|
49
|
-
onClick: v[0] || (v[0] = (a) =>
|
|
49
|
+
onClick: v[0] || (v[0] = (a) => f("toggle-menu")),
|
|
50
50
|
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",
|
|
51
51
|
"aria-label": "Toggle menu"
|
|
52
52
|
}, [...v[1] || (v[1] = [
|
|
@@ -65,7 +65,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
65
65
|
})
|
|
66
66
|
], -1)
|
|
67
67
|
])])) : y("", !0),
|
|
68
|
-
t.title && t.titlePosition === "left" ? (s(), l("div",
|
|
68
|
+
t.title && t.titlePosition === "left" ? (s(), l("div", _e, x(t.title), 1)) : y("", !0),
|
|
69
69
|
V(u.$slots, "left", {}, void 0, !0)
|
|
70
70
|
]),
|
|
71
71
|
o("div", Re, [
|
|
@@ -80,13 +80,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
80
80
|
}
|
|
81
81
|
}), K = (t, g) => {
|
|
82
82
|
const e = t.__vccOpts || t;
|
|
83
|
-
for (const [
|
|
84
|
-
e[
|
|
83
|
+
for (const [f, n] of g)
|
|
84
|
+
e[f] = n;
|
|
85
85
|
return e;
|
|
86
|
-
},
|
|
86
|
+
}, yl = /* @__PURE__ */ K(Ke, [["__scopeId", "data-v-c5861315"]]), Ue = ["type", "disabled", "aria-label"], Je = {
|
|
87
87
|
key: 0,
|
|
88
88
|
class: "absolute top-0 right-0 inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-bold leading-none text-white transform translate-x-1/2 -translate-y-1/2 bg-danger-600 rounded-full min-w-[1.25rem]"
|
|
89
|
-
},
|
|
89
|
+
}, hl = /* @__PURE__ */ q({
|
|
90
90
|
__name: "Button",
|
|
91
91
|
props: {
|
|
92
92
|
variant: { default: "primary" },
|
|
@@ -101,7 +101,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
101
101
|
},
|
|
102
102
|
emits: ["click"],
|
|
103
103
|
setup(t, { emit: g }) {
|
|
104
|
-
const e = t,
|
|
104
|
+
const e = t, f = g, n = r(() => e.variant === "icon"), u = r(() => e.badge > 99 ? "99+" : e.badge.toString()), v = r(() => {
|
|
105
105
|
const h = "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", i = {
|
|
106
106
|
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
|
|
107
107
|
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 hover:text-secondary-800 focus-visible:ring-secondary-500",
|
|
@@ -127,10 +127,10 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
127
127
|
});
|
|
128
128
|
return `${h} ${i[e.variant]} ${p[e.size]} ${b[e.radius]} ${T} ${B.value}`;
|
|
129
129
|
}), a = (h) => {
|
|
130
|
-
e.disabled ||
|
|
130
|
+
e.disabled || f("click", h);
|
|
131
131
|
};
|
|
132
132
|
return (h, i) => (s(), l("button", {
|
|
133
|
-
class:
|
|
133
|
+
class: c(v.value),
|
|
134
134
|
type: t.type,
|
|
135
135
|
disabled: t.disabled,
|
|
136
136
|
onClick: a,
|
|
@@ -140,7 +140,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
140
140
|
n.value && t.badge && t.badge > 0 ? (s(), l("span", Je, x(u.value), 1)) : y("", !0)
|
|
141
141
|
], 10, Ue));
|
|
142
142
|
}
|
|
143
|
-
}), Ge = /* @__PURE__ */
|
|
143
|
+
}), Ge = /* @__PURE__ */ q({
|
|
144
144
|
__name: "Icon",
|
|
145
145
|
props: {
|
|
146
146
|
name: {},
|
|
@@ -159,7 +159,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
159
159
|
lg: "24px",
|
|
160
160
|
xl: "30px",
|
|
161
161
|
"2xl": "36px"
|
|
162
|
-
},
|
|
162
|
+
}, f = (a, h) => {
|
|
163
163
|
const i = a.replace(/_/g, "-");
|
|
164
164
|
switch (h) {
|
|
165
165
|
case "filled":
|
|
@@ -175,7 +175,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
175
175
|
default:
|
|
176
176
|
return `material-symbols:${i}`;
|
|
177
177
|
}
|
|
178
|
-
}, n = r(() =>
|
|
178
|
+
}, n = r(() => f(g.name, g.variant)), u = r(() => {
|
|
179
179
|
const a = [
|
|
180
180
|
"inline-flex items-center justify-center select-none",
|
|
181
181
|
"transition-transform duration-200"
|
|
@@ -189,9 +189,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
189
189
|
}
|
|
190
190
|
return a;
|
|
191
191
|
});
|
|
192
|
-
return (a, h) => (s(), ee(
|
|
192
|
+
return (a, h) => (s(), ee(Ae(Pe), {
|
|
193
193
|
icon: n.value,
|
|
194
|
-
class:
|
|
194
|
+
class: c(u.value),
|
|
195
195
|
style: Q(v.value),
|
|
196
196
|
"aria-label": t.ariaLabel,
|
|
197
197
|
role: t.ariaLabel ? "img" : void 0
|
|
@@ -215,7 +215,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
215
215
|
}, ut = {
|
|
216
216
|
key: 3,
|
|
217
217
|
class: "mt-1 text-sm text-secondary-600"
|
|
218
|
-
}, ct = { class: "flex items-center justify-between mb-4" }, ft = { class: "flex items-center space-x-2" }, vt = ["value"], pt = ["value"], bt = { class: "grid grid-cols-7 gap-1 mb-2" }, gt = { class: "grid grid-cols-7 gap-1" }, mt = ["disabled", "onClick"], yt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, ht = ["disabled"], xt = /* @__PURE__ */
|
|
218
|
+
}, ct = { class: "flex items-center justify-between mb-4" }, ft = { class: "flex items-center space-x-2" }, vt = ["value"], pt = ["value"], bt = { class: "grid grid-cols-7 gap-1 mb-2" }, gt = { class: "grid grid-cols-7 gap-1" }, mt = ["disabled", "onClick"], yt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, ht = ["disabled"], xt = /* @__PURE__ */ q({
|
|
219
219
|
__name: "Calendar",
|
|
220
220
|
props: {
|
|
221
221
|
modelValue: {},
|
|
@@ -244,7 +244,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
244
244
|
},
|
|
245
245
|
emits: ["update:modelValue", "date-select", "range-select"],
|
|
246
246
|
setup(t, { emit: g }) {
|
|
247
|
-
const e = t,
|
|
247
|
+
const e = t, f = g, n = L(!1), u = L(null), v = L((/* @__PURE__ */ new Date()).getMonth()), a = L((/* @__PURE__ */ new Date()).getFullYear()), h = L(`calendar-${Math.random().toString(36).substr(2, 9)}`), i = L(null), p = L(null), b = [
|
|
248
248
|
"Enero",
|
|
249
249
|
"Febrero",
|
|
250
250
|
"Marzo",
|
|
@@ -270,16 +270,16 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
270
270
|
}, z = {
|
|
271
271
|
primary: "focus:ring-primary-500",
|
|
272
272
|
secondary: "focus:ring-secondary-500"
|
|
273
|
-
},
|
|
273
|
+
}, A = {
|
|
274
274
|
default: "bg-white",
|
|
275
275
|
filled: "bg-secondary-100",
|
|
276
276
|
outlined: "bg-transparent"
|
|
277
277
|
}, U = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
278
|
-
return `${m} ${C[e.size]} ${
|
|
278
|
+
return `${m} ${C[e.size]} ${A[e.variant]} ${z[e.color]} ${U}`;
|
|
279
279
|
}), k = r(() => `transition-colors ${{
|
|
280
280
|
primary: "text-primary-600 hover:text-primary-700",
|
|
281
281
|
secondary: "text-secondary-600 hover:text-secondary-700"
|
|
282
|
-
}[e.color]} ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), I = r(() => "min-w-80 max-w-sm"),
|
|
282
|
+
}[e.color]} ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), I = r(() => "min-w-80 max-w-sm"), Y = r(() => `p-2 rounded-md transition-colors ${{
|
|
283
283
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
284
284
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
285
285
|
}[e.color]}`), N = r(() => `px-2 py-1 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-1 ${{
|
|
@@ -291,10 +291,10 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
291
291
|
}[e.color]}`), M = r(() => `px-3 py-1.5 text-sm border border-secondary-300 rounded-md transition-colors focus:outline-none ${{
|
|
292
292
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
293
293
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
294
|
-
}[e.color]}`), d = r(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ?
|
|
294
|
+
}[e.color]}`), d = r(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? E(e.modelValue) : ""), w = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? E(e.modelValue.start) : ""), $ = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? E(e.modelValue.end) : ""), J = r(() => e.mode === "single" ? i.value !== null : i.value !== null && p.value !== null && p.value >= i.value);
|
|
295
295
|
r(() => e.mode === "range" && i.value && p.value ? p.value < i.value : !1);
|
|
296
296
|
const F = r(() => {
|
|
297
|
-
const m = new Date(a.value, v.value, 1), C = new Date(a.value, v.value + 1, 0), z = m.getDay(),
|
|
297
|
+
const m = new Date(a.value, v.value, 1), C = new Date(a.value, v.value + 1, 0), z = m.getDay(), A = C.getDate(), U = [], X = new Date(a.value, v.value - 1, 0);
|
|
298
298
|
for (let R = z - 1; R >= 0; R--) {
|
|
299
299
|
const Z = new Date(a.value, v.value - 1, X.getDate() - R);
|
|
300
300
|
U.push({
|
|
@@ -305,7 +305,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
305
305
|
key: `prev-${Z.getDate()}`
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
for (let R = 1; R <=
|
|
308
|
+
for (let R = 1; R <= A; R++) {
|
|
309
309
|
const Z = new Date(a.value, v.value, R);
|
|
310
310
|
U.push({
|
|
311
311
|
day: R,
|
|
@@ -315,8 +315,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
315
315
|
key: `current-${R}`
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
const
|
|
319
|
-
for (let R = 1; R <=
|
|
318
|
+
const Ye = 42 - U.length;
|
|
319
|
+
for (let R = 1; R <= Ye; R++) {
|
|
320
320
|
const Z = new Date(a.value, v.value + 1, R);
|
|
321
321
|
U.push({
|
|
322
322
|
day: R,
|
|
@@ -327,36 +327,36 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
return U;
|
|
330
|
-
}),
|
|
331
|
-
const C = m.getDate().toString().padStart(2, "0"), z = (m.getMonth() + 1).toString().padStart(2, "0"),
|
|
330
|
+
}), E = (m) => {
|
|
331
|
+
const C = m.getDate().toString().padStart(2, "0"), z = (m.getMonth() + 1).toString().padStart(2, "0"), A = m.getFullYear();
|
|
332
332
|
switch (e.dateFormat) {
|
|
333
333
|
case "MM/DD/YYYY":
|
|
334
|
-
return `${z}/${C}/${
|
|
334
|
+
return `${z}/${C}/${A}`;
|
|
335
335
|
case "YYYY-MM-DD":
|
|
336
|
-
return `${
|
|
336
|
+
return `${A}-${z}-${C}`;
|
|
337
337
|
case "DD/MM/YYYY":
|
|
338
338
|
default:
|
|
339
|
-
return `${C}/${z}/${
|
|
339
|
+
return `${C}/${z}/${A}`;
|
|
340
340
|
}
|
|
341
341
|
}, be = (m) => {
|
|
342
342
|
var z;
|
|
343
343
|
const C = new Date(m.getFullYear(), m.getMonth(), m.getDate());
|
|
344
344
|
if (e.minDate) {
|
|
345
|
-
const
|
|
346
|
-
if (C <
|
|
345
|
+
const A = new Date(e.minDate.getFullYear(), e.minDate.getMonth(), e.minDate.getDate());
|
|
346
|
+
if (C < A) return !0;
|
|
347
347
|
}
|
|
348
348
|
if (e.maxDate) {
|
|
349
|
-
const
|
|
350
|
-
if (C >
|
|
349
|
+
const A = new Date(e.maxDate.getFullYear(), e.maxDate.getMonth(), e.maxDate.getDate());
|
|
350
|
+
if (C > A) return !0;
|
|
351
351
|
}
|
|
352
352
|
return !!((z = e.disabledDates) != null && z.some(
|
|
353
|
-
(
|
|
353
|
+
(A) => A.toDateString() === m.toDateString()
|
|
354
354
|
));
|
|
355
355
|
}, De = (m) => {
|
|
356
356
|
const C = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
|
|
357
357
|
if (!m.isCurrentMonth || m.disabled || be(m.date))
|
|
358
358
|
return `${C} text-secondary-400 cursor-not-allowed`;
|
|
359
|
-
const z = Be(m.date),
|
|
359
|
+
const z = Be(m.date), A = ze(m.date), U = Ve(m.date), X = {
|
|
360
360
|
primary: {
|
|
361
361
|
selected: "bg-primary-600 text-white",
|
|
362
362
|
inRange: "bg-primary-100 text-primary-900",
|
|
@@ -370,7 +370,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
370
370
|
default: "text-secondary-700 hover:bg-secondary-50 hover:text-secondary-700"
|
|
371
371
|
}
|
|
372
372
|
};
|
|
373
|
-
return z ? `${C} ${X[e.color].selected}` :
|
|
373
|
+
return z ? `${C} ${X[e.color].selected}` : A ? `${C} ${X[e.color].inRange}` : U ? `${C} ${X[e.color].today}` : `${C} ${X[e.color].default}`;
|
|
374
374
|
}, Be = (m) => e.mode === "single" ? i.value ? le(m, i.value) : !1 : !!(i.value && le(m, i.value)) || !!(p.value && le(m, p.value)), ze = (m) => {
|
|
375
375
|
if (e.mode !== "range" || !i.value || !p.value)
|
|
376
376
|
return !1;
|
|
@@ -402,10 +402,10 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
402
402
|
e.mode === "single" ? (i.value = m, p.value = null) : u.value === "start" || !i.value ? (i.value = m, p.value = null, u.value = "end") : (u.value === "end" || !p.value) && (m < i.value ? (p.value = i.value, i.value = m) : p.value = m, u.value = null);
|
|
403
403
|
}, Le = () => {
|
|
404
404
|
if (e.mode === "single")
|
|
405
|
-
|
|
405
|
+
f("update:modelValue", i.value), i.value && f("date-select", i.value);
|
|
406
406
|
else {
|
|
407
407
|
const m = { start: i.value, end: p.value };
|
|
408
|
-
|
|
408
|
+
f("update:modelValue", m), f("range-select", m);
|
|
409
409
|
}
|
|
410
410
|
re();
|
|
411
411
|
}, Oe = () => {
|
|
@@ -431,17 +431,17 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
431
431
|
t.label && t.showLabel ? (s(), l("label", {
|
|
432
432
|
key: 0,
|
|
433
433
|
for: h.value,
|
|
434
|
-
class:
|
|
434
|
+
class: c(j.value)
|
|
435
435
|
}, [
|
|
436
|
-
|
|
436
|
+
_(x(t.label) + " ", 1),
|
|
437
437
|
t.required ? (s(), l("span", Xe, "*")) : y("", !0)
|
|
438
438
|
], 10, Ze)) : y("", !0),
|
|
439
439
|
o("div", {
|
|
440
|
-
class:
|
|
440
|
+
class: c(["relative rounded-md", S.value])
|
|
441
441
|
}, [
|
|
442
442
|
o("input", {
|
|
443
443
|
id: h.value,
|
|
444
|
-
class:
|
|
444
|
+
class: c(D.value),
|
|
445
445
|
type: "text",
|
|
446
446
|
disabled: t.disabled,
|
|
447
447
|
placeholder: t.placeholder || "Seleccionar fecha",
|
|
@@ -453,7 +453,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
453
453
|
}, null, 42, et),
|
|
454
454
|
o("button", {
|
|
455
455
|
type: "button",
|
|
456
|
-
class:
|
|
456
|
+
class: c(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
457
457
|
onClick: H(Ie, ["stop"]),
|
|
458
458
|
disabled: t.disabled
|
|
459
459
|
}, [
|
|
@@ -466,17 +466,17 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
466
466
|
])) : (s(), l("div", st, [
|
|
467
467
|
t.label && t.showLabel ? (s(), l("label", {
|
|
468
468
|
key: 0,
|
|
469
|
-
class:
|
|
469
|
+
class: c(j.value)
|
|
470
470
|
}, [
|
|
471
|
-
|
|
471
|
+
_(x(t.label) + " ", 1),
|
|
472
472
|
t.required ? (s(), l("span", lt, "*")) : y("", !0)
|
|
473
473
|
], 2)) : y("", !0),
|
|
474
474
|
o("div", ot, [
|
|
475
475
|
o("div", {
|
|
476
|
-
class:
|
|
476
|
+
class: c(["relative rounded-md", S.value])
|
|
477
477
|
}, [
|
|
478
478
|
o("input", {
|
|
479
|
-
class:
|
|
479
|
+
class: c(D.value),
|
|
480
480
|
type: "text",
|
|
481
481
|
disabled: t.disabled,
|
|
482
482
|
placeholder: t.startPlaceholder || "Fecha desde",
|
|
@@ -488,7 +488,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
488
488
|
}, null, 42, at),
|
|
489
489
|
o("button", {
|
|
490
490
|
type: "button",
|
|
491
|
-
class:
|
|
491
|
+
class: c(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
492
492
|
onClick: C[2] || (C[2] = H(() => ye("start"), ["stop"])),
|
|
493
493
|
disabled: t.disabled
|
|
494
494
|
}, [
|
|
@@ -499,10 +499,10 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
499
499
|
], 10, nt)
|
|
500
500
|
], 2),
|
|
501
501
|
o("div", {
|
|
502
|
-
class:
|
|
502
|
+
class: c(["relative rounded-md", S.value])
|
|
503
503
|
}, [
|
|
504
504
|
o("input", {
|
|
505
|
-
class:
|
|
505
|
+
class: c(D.value),
|
|
506
506
|
type: "text",
|
|
507
507
|
disabled: t.disabled,
|
|
508
508
|
placeholder: t.endPlaceholder || "Fecha hasta",
|
|
@@ -514,7 +514,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
514
514
|
}, null, 42, rt),
|
|
515
515
|
o("button", {
|
|
516
516
|
type: "button",
|
|
517
|
-
class:
|
|
517
|
+
class: c(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
518
518
|
onClick: C[5] || (C[5] = H(() => ye("end"), ["stop"])),
|
|
519
519
|
disabled: t.disabled
|
|
520
520
|
}, [
|
|
@@ -529,7 +529,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
529
529
|
t.error ? (s(), l("p", dt, x(t.error), 1)) : t.helperText ? (s(), l("p", ut, x(t.helperText), 1)) : y("", !0),
|
|
530
530
|
n.value ? (s(), l("div", {
|
|
531
531
|
key: 4,
|
|
532
|
-
class:
|
|
532
|
+
class: c(["absolute top-full mt-1 left-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden p-4", I.value]),
|
|
533
533
|
onClick: C[8] || (C[8] = H(() => {
|
|
534
534
|
}, ["stop"]))
|
|
535
535
|
}, [
|
|
@@ -537,7 +537,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
537
537
|
o("button", {
|
|
538
538
|
type: "button",
|
|
539
539
|
onClick: Oe,
|
|
540
|
-
class:
|
|
540
|
+
class: c(Y.value)
|
|
541
541
|
}, [
|
|
542
542
|
G(se, {
|
|
543
543
|
name: "chevron-left",
|
|
@@ -547,22 +547,22 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
547
547
|
o("div", ft, [
|
|
548
548
|
ue(o("select", {
|
|
549
549
|
"onUpdate:modelValue": C[6] || (C[6] = (z) => v.value = z),
|
|
550
|
-
class:
|
|
550
|
+
class: c(N.value),
|
|
551
551
|
onChange: xe
|
|
552
552
|
}, [
|
|
553
|
-
(s(), l(
|
|
554
|
-
key:
|
|
555
|
-
value:
|
|
553
|
+
(s(), l(P, null, W(b, (z, A) => o("option", {
|
|
554
|
+
key: A,
|
|
555
|
+
value: A
|
|
556
556
|
}, x(z), 9, vt)), 64))
|
|
557
557
|
], 34), [
|
|
558
558
|
[ke, v.value]
|
|
559
559
|
]),
|
|
560
560
|
ue(o("select", {
|
|
561
561
|
"onUpdate:modelValue": C[7] || (C[7] = (z) => a.value = z),
|
|
562
|
-
class:
|
|
562
|
+
class: c(N.value),
|
|
563
563
|
onChange: xe
|
|
564
564
|
}, [
|
|
565
|
-
(s(!0), l(
|
|
565
|
+
(s(!0), l(P, null, W(O.value, (z) => (s(), l("option", {
|
|
566
566
|
key: z,
|
|
567
567
|
value: z
|
|
568
568
|
}, x(z), 9, pt))), 128))
|
|
@@ -573,7 +573,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
573
573
|
o("button", {
|
|
574
574
|
type: "button",
|
|
575
575
|
onClick: Fe,
|
|
576
|
-
class:
|
|
576
|
+
class: c(Y.value)
|
|
577
577
|
}, [
|
|
578
578
|
G(se, {
|
|
579
579
|
name: "chevron-right",
|
|
@@ -582,29 +582,29 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
582
582
|
], 2)
|
|
583
583
|
]),
|
|
584
584
|
o("div", bt, [
|
|
585
|
-
(s(), l(
|
|
585
|
+
(s(), l(P, null, W(T, (z) => o("div", {
|
|
586
586
|
key: z,
|
|
587
587
|
class: "text-center text-sm font-medium text-secondary-600 py-2"
|
|
588
588
|
}, x(z), 1)), 64))
|
|
589
589
|
]),
|
|
590
590
|
o("div", gt, [
|
|
591
|
-
(s(!0), l(
|
|
591
|
+
(s(!0), l(P, null, W(F.value, (z) => (s(), l("button", {
|
|
592
592
|
key: z.key,
|
|
593
593
|
type: "button",
|
|
594
|
-
class:
|
|
594
|
+
class: c(De(z)),
|
|
595
595
|
disabled: z.disabled || be(z.date),
|
|
596
|
-
onClick: (
|
|
596
|
+
onClick: (A) => je(z.date)
|
|
597
597
|
}, x(z.day), 11, mt))), 128))
|
|
598
598
|
]),
|
|
599
599
|
o("div", yt, [
|
|
600
600
|
o("button", {
|
|
601
601
|
type: "button",
|
|
602
|
-
class:
|
|
602
|
+
class: c(M.value),
|
|
603
603
|
onClick: re
|
|
604
604
|
}, " Cancelar ", 2),
|
|
605
605
|
o("button", {
|
|
606
606
|
type: "button",
|
|
607
|
-
class:
|
|
607
|
+
class: c(te.value),
|
|
608
608
|
onClick: Le,
|
|
609
609
|
disabled: !J.value
|
|
610
610
|
}, " Confirmar ", 10, ht)
|
|
@@ -612,13 +612,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
612
612
|
], 2)) : y("", !0)
|
|
613
613
|
], 512));
|
|
614
614
|
}
|
|
615
|
-
}),
|
|
615
|
+
}), xl = /* @__PURE__ */ K(xt, [["__scopeId", "data-v-38b6f181"]]), wt = {
|
|
616
616
|
key: 0,
|
|
617
617
|
class: "border-b border-gray-100 px-6 py-4"
|
|
618
618
|
}, kt = { class: "px-6 py-4" }, $t = {
|
|
619
619
|
key: 1,
|
|
620
620
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
621
|
-
},
|
|
621
|
+
}, wl = /* @__PURE__ */ q({
|
|
622
622
|
__name: "Card",
|
|
623
623
|
props: {
|
|
624
624
|
shadow: { default: "md" },
|
|
@@ -632,7 +632,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
632
632
|
md: "shadow",
|
|
633
633
|
lg: "shadow-lg",
|
|
634
634
|
xl: "shadow-xl"
|
|
635
|
-
},
|
|
635
|
+
}, f = {
|
|
636
636
|
none: "rounded-none",
|
|
637
637
|
sm: "rounded-sm",
|
|
638
638
|
md: "rounded-md",
|
|
@@ -642,11 +642,11 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
642
642
|
}, n = r(() => [
|
|
643
643
|
"w-full bg-white",
|
|
644
644
|
e[g.shadow],
|
|
645
|
-
|
|
645
|
+
f[g.rounded],
|
|
646
646
|
g.bordered ? "border border-gray-200" : ""
|
|
647
647
|
]);
|
|
648
648
|
return (u, v) => (s(), l("div", {
|
|
649
|
-
class:
|
|
649
|
+
class: c(n.value)
|
|
650
650
|
}, [
|
|
651
651
|
u.$slots.header ? (s(), l("div", wt, [
|
|
652
652
|
V(u.$slots, "header")
|
|
@@ -662,7 +662,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
662
662
|
}), Ct = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, Mt = { class: "text-xl font-semibold text-gray-900" }, Dt = { class: "px-8 py-6" }, Bt = {
|
|
663
663
|
key: 0,
|
|
664
664
|
class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
|
|
665
|
-
}, zt = /* @__PURE__ */
|
|
665
|
+
}, zt = /* @__PURE__ */ q({
|
|
666
666
|
__name: "Dialog",
|
|
667
667
|
props: {
|
|
668
668
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -671,11 +671,11 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
671
671
|
},
|
|
672
672
|
emits: ["update:modelValue", "close"],
|
|
673
673
|
setup(t, { emit: g }) {
|
|
674
|
-
const e = t,
|
|
674
|
+
const e = t, f = g, n = r({
|
|
675
675
|
get: () => e.modelValue,
|
|
676
|
-
set: (a) =>
|
|
676
|
+
set: (a) => f("update:modelValue", a)
|
|
677
677
|
}), u = () => {
|
|
678
|
-
n.value = !1,
|
|
678
|
+
n.value = !1, f("close");
|
|
679
679
|
}, v = () => {
|
|
680
680
|
e.closeOnBackdrop && u();
|
|
681
681
|
};
|
|
@@ -695,7 +695,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
695
695
|
o("div", Ct, [
|
|
696
696
|
o("h2", Mt, [
|
|
697
697
|
V(a.$slots, "title", {}, () => [
|
|
698
|
-
|
|
698
|
+
_(x(t.title), 1)
|
|
699
699
|
], !0)
|
|
700
700
|
]),
|
|
701
701
|
o("button", {
|
|
@@ -732,19 +732,19 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
732
732
|
})
|
|
733
733
|
]));
|
|
734
734
|
}
|
|
735
|
-
}),
|
|
735
|
+
}), kl = /* @__PURE__ */ K(zt, [["__scopeId", "data-v-37e19754"]]), Vt = ["accept", "multiple", "disabled"], Tt = { class: "flex flex-col items-center justify-center gap-4 text-center" }, St = ["src", "alt"], It = {
|
|
736
736
|
key: 1,
|
|
737
737
|
class: "w-full h-full text-gray-400",
|
|
738
738
|
fill: "none",
|
|
739
739
|
stroke: "currentColor",
|
|
740
740
|
viewBox: "0 0 24 24"
|
|
741
|
-
}, jt = { class: "text-center" }, Lt = { class: "text-base font-medium text-gray-700" }, Ot = { class: "text-primary-700" }, Ft = { class: "flex items-center gap-3 flex-1 min-w-0" },
|
|
741
|
+
}, jt = { class: "text-center" }, Lt = { class: "text-base font-medium text-gray-700" }, Ot = { class: "text-primary-700" }, Ft = { class: "flex items-center gap-3 flex-1 min-w-0" }, Yt = { class: "flex-1 min-w-0" }, At = { class: "text-sm font-medium text-gray-900 truncate" }, Et = { class: "text-xs text-gray-500" }, Pt = {
|
|
742
742
|
key: 1,
|
|
743
743
|
class: "text-xs text-gray-500 mt-2"
|
|
744
|
-
},
|
|
744
|
+
}, qt = {
|
|
745
745
|
key: 2,
|
|
746
746
|
class: "text-sm text-danger-500 mt-2"
|
|
747
|
-
},
|
|
747
|
+
}, $l = /* @__PURE__ */ q({
|
|
748
748
|
__name: "FileUpload",
|
|
749
749
|
props: {
|
|
750
750
|
modelValue: { default: null },
|
|
@@ -761,7 +761,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
761
761
|
},
|
|
762
762
|
emits: ["update:modelValue", "change", "error"],
|
|
763
763
|
setup(t, { emit: g }) {
|
|
764
|
-
const e = t,
|
|
764
|
+
const e = t, f = g, n = L(null), u = L(!1), v = L(e.modelValue), a = L(""), h = r(() => ({
|
|
765
765
|
sm: "w-20 h-20",
|
|
766
766
|
md: "w-32 h-32",
|
|
767
767
|
lg: "w-48 h-48",
|
|
@@ -778,27 +778,27 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
778
778
|
}, B = (k) => {
|
|
779
779
|
if (a.value = "", e.maxSize && k.size > e.maxSize) {
|
|
780
780
|
const I = (e.maxSize / 1048576).toFixed(2);
|
|
781
|
-
return a.value = `El archivo excede el tamaño máximo de ${I}MB`,
|
|
781
|
+
return a.value = `El archivo excede el tamaño máximo de ${I}MB`, f("error", a.value), !1;
|
|
782
782
|
}
|
|
783
783
|
return !0;
|
|
784
784
|
}, O = (k) => {
|
|
785
785
|
var N;
|
|
786
|
-
const
|
|
787
|
-
|
|
786
|
+
const Y = (N = k.target.files) == null ? void 0 : N[0];
|
|
787
|
+
Y && B(Y) && (v.value = Y, f("update:modelValue", Y), f("change", Y));
|
|
788
788
|
}, j = (k) => {
|
|
789
|
-
var
|
|
789
|
+
var Y;
|
|
790
790
|
u.value = !1;
|
|
791
|
-
const I = (
|
|
792
|
-
I && B(I) && (v.value = I,
|
|
791
|
+
const I = (Y = k.dataTransfer) == null ? void 0 : Y.files[0];
|
|
792
|
+
I && B(I) && (v.value = I, f("update:modelValue", I), f("change", I));
|
|
793
793
|
}, S = () => {
|
|
794
|
-
v.value = null, a.value = "", n.value && (n.value.value = ""),
|
|
794
|
+
v.value = null, a.value = "", n.value && (n.value.value = ""), f("update:modelValue", null), f("change", null);
|
|
795
795
|
}, D = (k) => {
|
|
796
796
|
if (k === 0) return "0 Bytes";
|
|
797
|
-
const I = 1024,
|
|
798
|
-
return Math.round(k / Math.pow(I, N) * 100) / 100 + " " +
|
|
797
|
+
const I = 1024, Y = ["Bytes", "KB", "MB", "GB"], N = Math.floor(Math.log(k) / Math.log(I));
|
|
798
|
+
return Math.round(k / Math.pow(I, N) * 100) / 100 + " " + Y[N];
|
|
799
799
|
};
|
|
800
800
|
return (k, I) => (s(), l("div", {
|
|
801
|
-
class:
|
|
801
|
+
class: c(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
802
802
|
u.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
803
803
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
804
804
|
]]),
|
|
@@ -819,7 +819,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
819
819
|
}, null, 40, Vt),
|
|
820
820
|
o("div", Tt, [
|
|
821
821
|
o("div", {
|
|
822
|
-
class:
|
|
822
|
+
class: c([h.value, "flex items-center justify-center"])
|
|
823
823
|
}, [
|
|
824
824
|
t.illustration ? (s(), l("img", {
|
|
825
825
|
key: 0,
|
|
@@ -837,7 +837,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
837
837
|
], 2),
|
|
838
838
|
o("div", jt, [
|
|
839
839
|
o("p", Lt, [
|
|
840
|
-
|
|
840
|
+
_(x(t.mainText) + " ", 1),
|
|
841
841
|
o("span", Ot, x(t.linkText), 1)
|
|
842
842
|
])
|
|
843
843
|
]),
|
|
@@ -861,9 +861,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
861
861
|
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
862
862
|
})
|
|
863
863
|
], -1)),
|
|
864
|
-
o("div",
|
|
865
|
-
o("p",
|
|
866
|
-
o("p",
|
|
864
|
+
o("div", Yt, [
|
|
865
|
+
o("p", At, x(v.value.name), 1),
|
|
866
|
+
o("p", Et, x(D(v.value.size)), 1)
|
|
867
867
|
])
|
|
868
868
|
]),
|
|
869
869
|
t.disabled ? y("", !0) : (s(), l("button", {
|
|
@@ -884,12 +884,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
884
884
|
], -1)
|
|
885
885
|
])]))
|
|
886
886
|
])) : y("", !0),
|
|
887
|
-
t.helperText ? (s(), l("p",
|
|
888
|
-
a.value ? (s(), l("p",
|
|
887
|
+
t.helperText ? (s(), l("p", Pt, x(t.helperText), 1)) : y("", !0),
|
|
888
|
+
a.value ? (s(), l("p", qt, x(a.value), 1)) : y("", !0)
|
|
889
889
|
])
|
|
890
890
|
], 34));
|
|
891
891
|
}
|
|
892
|
-
}),
|
|
892
|
+
}), _t = { class: "input-wrapper" }, Rt = ["for"], Nt = {
|
|
893
893
|
key: 0,
|
|
894
894
|
class: "text-danger-600"
|
|
895
895
|
}, Wt = { class: "relative" }, Ht = ["id", "type", "disabled", "placeholder", "value", "required", "readonly"], Kt = {
|
|
@@ -901,7 +901,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
901
901
|
}, Jt = {
|
|
902
902
|
key: 2,
|
|
903
903
|
class: "mt-1 text-sm text-secondary-600"
|
|
904
|
-
}, Gt = /* @__PURE__ */
|
|
904
|
+
}, Gt = /* @__PURE__ */ q({
|
|
905
905
|
__name: "Input",
|
|
906
906
|
props: {
|
|
907
907
|
modelValue: { default: "" },
|
|
@@ -918,7 +918,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
918
918
|
},
|
|
919
919
|
emits: ["update:modelValue", "blur", "focus"],
|
|
920
920
|
setup(t, { emit: g }) {
|
|
921
|
-
const e = t,
|
|
921
|
+
const e = t, f = g, n = L(`input-${Math.random().toString(36).substr(2, 9)}`), u = r(() => "block text-sm font-medium text-secondary-700 mb-1"), v = r(() => {
|
|
922
922
|
const p = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", b = {
|
|
923
923
|
sm: "h-8 px-3 text-sm",
|
|
924
924
|
md: "h-10 px-4 text-base",
|
|
@@ -931,25 +931,25 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
931
931
|
return `${p} ${b[e.size]} ${T[e.variant]} ${B}`;
|
|
932
932
|
}), a = (p) => {
|
|
933
933
|
const b = p.target;
|
|
934
|
-
|
|
934
|
+
f("update:modelValue", b.value);
|
|
935
935
|
}, h = (p) => {
|
|
936
|
-
|
|
936
|
+
f("blur", p);
|
|
937
937
|
}, i = (p) => {
|
|
938
|
-
|
|
938
|
+
f("focus", p);
|
|
939
939
|
};
|
|
940
|
-
return (p, b) => (s(), l("div",
|
|
940
|
+
return (p, b) => (s(), l("div", _t, [
|
|
941
941
|
t.label ? (s(), l("label", {
|
|
942
942
|
key: 0,
|
|
943
943
|
for: n.value,
|
|
944
|
-
class:
|
|
944
|
+
class: c(u.value)
|
|
945
945
|
}, [
|
|
946
|
-
|
|
946
|
+
_(x(t.label) + " ", 1),
|
|
947
947
|
t.required ? (s(), l("span", Nt, "*")) : y("", !0)
|
|
948
948
|
], 10, Rt)) : y("", !0),
|
|
949
949
|
o("div", Wt, [
|
|
950
950
|
o("input", {
|
|
951
951
|
id: n.value,
|
|
952
|
-
class:
|
|
952
|
+
class: c(v.value),
|
|
953
953
|
type: t.type,
|
|
954
954
|
disabled: t.disabled,
|
|
955
955
|
placeholder: t.placeholder,
|
|
@@ -978,10 +978,10 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
978
978
|
t.error ? (s(), l("p", Ut, x(t.error), 1)) : t.helperText ? (s(), l("p", Jt, x(t.helperText), 1)) : y("", !0)
|
|
979
979
|
]));
|
|
980
980
|
}
|
|
981
|
-
}),
|
|
981
|
+
}), Cl = /* @__PURE__ */ K(Gt, [["__scopeId", "data-v-e3a37613"]]), Qt = ["stroke-width"], Zt = {
|
|
982
982
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
983
983
|
style: { "background-color": "#f7f7f7" }
|
|
984
|
-
}, Xt = /* @__PURE__ */
|
|
984
|
+
}, Xt = /* @__PURE__ */ q({
|
|
985
985
|
__name: "Loader",
|
|
986
986
|
props: {
|
|
987
987
|
type: { default: "circular" },
|
|
@@ -999,17 +999,17 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
999
999
|
warning: "text-warning-500",
|
|
1000
1000
|
danger: "text-danger-500",
|
|
1001
1001
|
info: "text-info-500"
|
|
1002
|
-
},
|
|
1002
|
+
}, f = {
|
|
1003
1003
|
primary: "bg-primary-700",
|
|
1004
1004
|
secondary: "bg-secondary-500",
|
|
1005
1005
|
success: "bg-success-500",
|
|
1006
1006
|
warning: "bg-warning-500",
|
|
1007
1007
|
danger: "bg-danger-500",
|
|
1008
1008
|
info: "bg-info-500"
|
|
1009
|
-
}, n = r(() => [e[g.color]]), u = r(() => [
|
|
1009
|
+
}, n = r(() => [e[g.color]]), u = r(() => [f[g.color]]);
|
|
1010
1010
|
return (v, a) => t.type === "circular" ? (s(), l("div", {
|
|
1011
1011
|
key: 0,
|
|
1012
|
-
class:
|
|
1012
|
+
class: c(n.value)
|
|
1013
1013
|
}, [
|
|
1014
1014
|
(s(), l("svg", {
|
|
1015
1015
|
class: "animate-spin",
|
|
@@ -1038,13 +1038,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1038
1038
|
}, [
|
|
1039
1039
|
o("div", Zt, [
|
|
1040
1040
|
o("div", {
|
|
1041
|
-
class:
|
|
1041
|
+
class: c([[u.value, { "animate-linear-loader": t.progress === void 0 }], "h-full rounded-lg"]),
|
|
1042
1042
|
style: Q({ width: t.progress !== void 0 ? `${Math.min(Math.max(t.progress, 0), 100)}%` : "100%" })
|
|
1043
1043
|
}, null, 6)
|
|
1044
1044
|
])
|
|
1045
1045
|
], 4)) : y("", !0);
|
|
1046
1046
|
}
|
|
1047
|
-
}),
|
|
1047
|
+
}), Ml = /* @__PURE__ */ K(Xt, [["__scopeId", "data-v-f369fb46"]]), es = ["disabled", "aria-expanded"], ts = ["disabled", "onClick"], ss = {
|
|
1048
1048
|
key: 0,
|
|
1049
1049
|
class: "flex-shrink-0"
|
|
1050
1050
|
}, ls = ["innerHTML"], os = { class: "flex-1 min-w-0 mr-2" }, as = { class: "flex flex-col items-start" }, ns = ["title"], rs = ["title"], is = {
|
|
@@ -1059,7 +1059,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1059
1059
|
fill: "none",
|
|
1060
1060
|
stroke: "currentColor",
|
|
1061
1061
|
viewBox: "0 0 24 24"
|
|
1062
|
-
}, fs = /* @__PURE__ */
|
|
1062
|
+
}, fs = /* @__PURE__ */ q({
|
|
1063
1063
|
__name: "Menu",
|
|
1064
1064
|
props: {
|
|
1065
1065
|
items: { default: () => [] },
|
|
@@ -1079,7 +1079,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1079
1079
|
},
|
|
1080
1080
|
emits: ["open", "close", "select"],
|
|
1081
1081
|
setup(t, { emit: g }) {
|
|
1082
|
-
const e = t,
|
|
1082
|
+
const e = t, f = g, n = L(!1), u = L(null), v = L(null), a = L({}), h = r(() => [
|
|
1083
1083
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
1084
1084
|
"bg-white border border-secondary-300 rounded-md text-secondary-700",
|
|
1085
1085
|
"hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
|
|
@@ -1106,14 +1106,14 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1106
1106
|
}, S = () => {
|
|
1107
1107
|
e.disabled || (n.value ? k() : D());
|
|
1108
1108
|
}, D = () => {
|
|
1109
|
-
n.value = !0,
|
|
1110
|
-
M(), document.addEventListener("click",
|
|
1109
|
+
n.value = !0, f("open"), fe(() => {
|
|
1110
|
+
M(), document.addEventListener("click", Y), document.addEventListener("keydown", N);
|
|
1111
1111
|
});
|
|
1112
1112
|
}, k = () => {
|
|
1113
|
-
n.value = !1,
|
|
1113
|
+
n.value = !1, f("close"), document.removeEventListener("click", Y), document.removeEventListener("keydown", N);
|
|
1114
1114
|
}, I = (d) => {
|
|
1115
|
-
d.disabled || (d.action && d.action(),
|
|
1116
|
-
},
|
|
1115
|
+
d.disabled || (d.action && d.action(), f("select", d), e.closeOnClick && !d.children && k());
|
|
1116
|
+
}, Y = (d) => {
|
|
1117
1117
|
const w = d.target;
|
|
1118
1118
|
u.value && !u.value.contains(w) && v.value && !v.value.contains(w) && k();
|
|
1119
1119
|
}, N = (d) => {
|
|
@@ -1123,36 +1123,36 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1123
1123
|
}, M = () => {
|
|
1124
1124
|
if (!u.value || !v.value) return;
|
|
1125
1125
|
const d = u.value.getBoundingClientRect(), w = v.value.getBoundingClientRect(), $ = window.innerWidth, J = window.innerHeight;
|
|
1126
|
-
let F = 0,
|
|
1126
|
+
let F = 0, E = 0;
|
|
1127
1127
|
switch (e.position) {
|
|
1128
1128
|
case "bottom-start":
|
|
1129
|
-
F = d.bottom + e.offset.y,
|
|
1129
|
+
F = d.bottom + e.offset.y, E = d.left + e.offset.x;
|
|
1130
1130
|
break;
|
|
1131
1131
|
case "bottom-end":
|
|
1132
|
-
F = d.bottom + e.offset.y,
|
|
1132
|
+
F = d.bottom + e.offset.y, E = d.right - w.width + e.offset.x;
|
|
1133
1133
|
break;
|
|
1134
1134
|
case "top-start":
|
|
1135
|
-
F = d.top - w.height - e.offset.y,
|
|
1135
|
+
F = d.top - w.height - e.offset.y, E = d.left + e.offset.x;
|
|
1136
1136
|
break;
|
|
1137
1137
|
case "top-end":
|
|
1138
|
-
F = d.top - w.height - e.offset.y,
|
|
1138
|
+
F = d.top - w.height - e.offset.y, E = d.right - w.width + e.offset.x;
|
|
1139
1139
|
break;
|
|
1140
1140
|
case "right-start":
|
|
1141
|
-
F = d.top + e.offset.y,
|
|
1141
|
+
F = d.top + e.offset.y, E = d.right + e.offset.x;
|
|
1142
1142
|
break;
|
|
1143
1143
|
case "right-end":
|
|
1144
|
-
F = d.bottom - w.height + e.offset.y,
|
|
1144
|
+
F = d.bottom - w.height + e.offset.y, E = d.right + e.offset.x;
|
|
1145
1145
|
break;
|
|
1146
1146
|
case "left-start":
|
|
1147
|
-
F = d.top + e.offset.y,
|
|
1147
|
+
F = d.top + e.offset.y, E = d.left - w.width - e.offset.x;
|
|
1148
1148
|
break;
|
|
1149
1149
|
case "left-end":
|
|
1150
|
-
F = d.bottom - w.height + e.offset.y,
|
|
1150
|
+
F = d.bottom - w.height + e.offset.y, E = d.left - w.width - e.offset.x;
|
|
1151
1151
|
break;
|
|
1152
1152
|
}
|
|
1153
|
-
|
|
1153
|
+
E + w.width > $ && (E = $ - w.width - 8), E < 8 && (E = 8), F + w.height > J && (F = J - w.height - 8), F < 8 && (F = 8), a.value = {
|
|
1154
1154
|
top: `${F}px`,
|
|
1155
|
-
left: `${
|
|
1155
|
+
left: `${E}px`,
|
|
1156
1156
|
width: e.width === "auto" ? `${Math.max(d.width, 240)}px` : e.width,
|
|
1157
1157
|
maxHeight: e.maxHeight,
|
|
1158
1158
|
minWidth: "240px"
|
|
@@ -1161,11 +1161,11 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1161
1161
|
return $e(() => {
|
|
1162
1162
|
window.addEventListener("scroll", M, !0), window.addEventListener("resize", M);
|
|
1163
1163
|
}), Ce(() => {
|
|
1164
|
-
window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M), document.removeEventListener("click",
|
|
1164
|
+
window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M), document.removeEventListener("click", Y), document.removeEventListener("keydown", N);
|
|
1165
1165
|
}), ve(() => e.items, () => {
|
|
1166
1166
|
n.value && fe(M);
|
|
1167
1167
|
}, { deep: !0 }), (d, w) => (s(), l("div", {
|
|
1168
|
-
class:
|
|
1168
|
+
class: c(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
1169
1169
|
}, [
|
|
1170
1170
|
o("div", {
|
|
1171
1171
|
ref_key: "triggerRef",
|
|
@@ -1177,7 +1177,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1177
1177
|
}, () => [
|
|
1178
1178
|
o("button", {
|
|
1179
1179
|
type: "button",
|
|
1180
|
-
class:
|
|
1180
|
+
class: c(h.value),
|
|
1181
1181
|
disabled: t.disabled,
|
|
1182
1182
|
onClick: S,
|
|
1183
1183
|
onKeydown: te,
|
|
@@ -1187,11 +1187,11 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1187
1187
|
"aria-haspopup": !0
|
|
1188
1188
|
}, [
|
|
1189
1189
|
V(d.$slots, "trigger-content", {}, () => [
|
|
1190
|
-
|
|
1190
|
+
_(x(t.triggerText), 1)
|
|
1191
1191
|
], !0),
|
|
1192
1192
|
t.showChevron ? (s(), l("svg", {
|
|
1193
1193
|
key: 0,
|
|
1194
|
-
class:
|
|
1194
|
+
class: c(["w-4 h-4 ml-2 transition-transform", n.value ? "rotate-180" : ""]),
|
|
1195
1195
|
fill: "none",
|
|
1196
1196
|
stroke: "currentColor",
|
|
1197
1197
|
viewBox: "0 0 24 24"
|
|
@@ -1211,37 +1211,37 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1211
1211
|
key: 0,
|
|
1212
1212
|
ref_key: "menuRef",
|
|
1213
1213
|
ref: v,
|
|
1214
|
-
class:
|
|
1214
|
+
class: c(i.value),
|
|
1215
1215
|
style: Q(a.value),
|
|
1216
1216
|
onClick: w[0] || (w[0] = H(() => {
|
|
1217
1217
|
}, ["stop"]))
|
|
1218
1218
|
}, [
|
|
1219
1219
|
d.$slots.header ? (s(), l("div", {
|
|
1220
1220
|
key: 0,
|
|
1221
|
-
class:
|
|
1221
|
+
class: c(p.value)
|
|
1222
1222
|
}, [
|
|
1223
1223
|
V(d.$slots, "header", { close: k }, void 0, !0)
|
|
1224
1224
|
], 2)) : y("", !0),
|
|
1225
1225
|
o("div", {
|
|
1226
|
-
class:
|
|
1226
|
+
class: c(T.value)
|
|
1227
1227
|
}, [
|
|
1228
1228
|
V(d.$slots, "default", {
|
|
1229
1229
|
close: k,
|
|
1230
1230
|
isOpen: n.value
|
|
1231
1231
|
}, () => [
|
|
1232
|
-
(s(!0), l(
|
|
1232
|
+
(s(!0), l(P, null, W(t.items, ($, J) => (s(), l(P, {
|
|
1233
1233
|
key: $.id || J
|
|
1234
1234
|
}, [
|
|
1235
1235
|
$.type === "divider" ? (s(), l("div", {
|
|
1236
1236
|
key: 0,
|
|
1237
|
-
class:
|
|
1237
|
+
class: c(B.value)
|
|
1238
1238
|
}, null, 2)) : $.type === "header" ? (s(), l("div", {
|
|
1239
1239
|
key: 1,
|
|
1240
|
-
class:
|
|
1240
|
+
class: c(O.value)
|
|
1241
1241
|
}, x($.label), 3)) : (s(), l("button", {
|
|
1242
1242
|
key: 2,
|
|
1243
1243
|
type: "button",
|
|
1244
|
-
class:
|
|
1244
|
+
class: c(j($)),
|
|
1245
1245
|
disabled: $.disabled,
|
|
1246
1246
|
onClick: (F) => I($)
|
|
1247
1247
|
}, [
|
|
@@ -1294,7 +1294,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1294
1294
|
], 2),
|
|
1295
1295
|
d.$slots.footer ? (s(), l("div", {
|
|
1296
1296
|
key: 1,
|
|
1297
|
-
class:
|
|
1297
|
+
class: c(b.value)
|
|
1298
1298
|
}, [
|
|
1299
1299
|
V(d.$slots, "footer", { close: k }, void 0, !0)
|
|
1300
1300
|
], 2)) : y("", !0)
|
|
@@ -1307,7 +1307,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1307
1307
|
]))
|
|
1308
1308
|
], 2));
|
|
1309
1309
|
}
|
|
1310
|
-
}),
|
|
1310
|
+
}), Dl = /* @__PURE__ */ K(fs, [["__scopeId", "data-v-61176297"]]), vs = ["for"], ps = {
|
|
1311
1311
|
key: 0,
|
|
1312
1312
|
class: "text-danger-600"
|
|
1313
1313
|
}, bs = ["id", "disabled", "aria-expanded"], gs = { class: "flex-1 text-left truncate" }, ms = {
|
|
@@ -1332,7 +1332,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1332
1332
|
}, Vs = {
|
|
1333
1333
|
key: 2,
|
|
1334
1334
|
class: "mt-1 text-sm text-secondary-600"
|
|
1335
|
-
}, Ts = /* @__PURE__ */
|
|
1335
|
+
}, Ts = /* @__PURE__ */ q({
|
|
1336
1336
|
__name: "Select",
|
|
1337
1337
|
props: {
|
|
1338
1338
|
modelValue: { default: null },
|
|
@@ -1355,7 +1355,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1355
1355
|
},
|
|
1356
1356
|
emits: ["update:modelValue", "change", "action"],
|
|
1357
1357
|
setup(t, { emit: g }) {
|
|
1358
|
-
const e = t,
|
|
1358
|
+
const e = t, f = g, n = L(!1), u = L(""), v = L(null), a = r(
|
|
1359
1359
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
1360
1360
|
), h = r(() => e.options.find((M) => M.value === e.modelValue) || null), i = r(() => {
|
|
1361
1361
|
if (!e.searchable || !u.value)
|
|
@@ -1392,9 +1392,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1392
1392
|
}, k = () => {
|
|
1393
1393
|
n.value = !1, u.value = "";
|
|
1394
1394
|
}, I = (M) => {
|
|
1395
|
-
M.disabled || (
|
|
1396
|
-
},
|
|
1397
|
-
M.action && M.action(),
|
|
1395
|
+
M.disabled || (f("update:modelValue", M.value), f("change", M), k());
|
|
1396
|
+
}, Y = (M) => {
|
|
1397
|
+
M.action && M.action(), f("action", M), k();
|
|
1398
1398
|
}, N = (M) => {
|
|
1399
1399
|
const d = M.relatedTarget;
|
|
1400
1400
|
d && d.closest(".select-wrapper") || setTimeout(() => {
|
|
@@ -1406,23 +1406,23 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1406
1406
|
return ve(n, (M) => {
|
|
1407
1407
|
M && (u.value = "");
|
|
1408
1408
|
}), (M, d) => (s(), l("div", {
|
|
1409
|
-
class:
|
|
1409
|
+
class: c(["select-wrapper", { "w-full": t.fullWidth }])
|
|
1410
1410
|
}, [
|
|
1411
1411
|
t.label ? (s(), l("label", {
|
|
1412
1412
|
key: 0,
|
|
1413
1413
|
for: a.value,
|
|
1414
|
-
class:
|
|
1414
|
+
class: c(p.value)
|
|
1415
1415
|
}, [
|
|
1416
|
-
|
|
1416
|
+
_(x(t.label) + " ", 1),
|
|
1417
1417
|
t.required ? (s(), l("span", ps, "*")) : y("", !0)
|
|
1418
1418
|
], 10, vs)) : y("", !0),
|
|
1419
1419
|
o("div", {
|
|
1420
|
-
class:
|
|
1420
|
+
class: c(["relative", b.value])
|
|
1421
1421
|
}, [
|
|
1422
1422
|
o("button", {
|
|
1423
1423
|
id: a.value,
|
|
1424
1424
|
type: "button",
|
|
1425
|
-
class:
|
|
1425
|
+
class: c(T.value),
|
|
1426
1426
|
disabled: t.disabled,
|
|
1427
1427
|
"aria-expanded": n.value,
|
|
1428
1428
|
"aria-haspopup": !0,
|
|
@@ -1432,7 +1432,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1432
1432
|
}, [
|
|
1433
1433
|
o("span", gs, x(h.value ? h.value.label : t.placeholder), 1),
|
|
1434
1434
|
(s(), l("svg", {
|
|
1435
|
-
class:
|
|
1435
|
+
class: c(["w-5 h-5 flex-shrink-0 transition-transform text-secondary-600", n.value ? "rotate-180" : ""]),
|
|
1436
1436
|
fill: "none",
|
|
1437
1437
|
stroke: "currentColor",
|
|
1438
1438
|
viewBox: "0 0 24 24",
|
|
@@ -1448,7 +1448,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1448
1448
|
], 42, bs),
|
|
1449
1449
|
n.value ? (s(), l("div", {
|
|
1450
1450
|
key: 0,
|
|
1451
|
-
class:
|
|
1451
|
+
class: c(B.value),
|
|
1452
1452
|
onClick: d[2] || (d[2] = H(() => {
|
|
1453
1453
|
}, ["stop"]))
|
|
1454
1454
|
}, [
|
|
@@ -1463,15 +1463,15 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1463
1463
|
onKeydown: d[1] || (d[1] = H(() => {
|
|
1464
1464
|
}, ["stop"]))
|
|
1465
1465
|
}, null, 40, ys), [
|
|
1466
|
-
[
|
|
1466
|
+
[Ee, u.value]
|
|
1467
1467
|
])
|
|
1468
1468
|
])) : y("", !0),
|
|
1469
1469
|
o("div", hs, [
|
|
1470
|
-
i.value.length === 0 ? (s(), l("div", xs, x(t.emptyText), 1)) : (s(), l(
|
|
1471
|
-
(s(!0), l(
|
|
1470
|
+
i.value.length === 0 ? (s(), l("div", xs, x(t.emptyText), 1)) : (s(), l(P, { key: 1 }, [
|
|
1471
|
+
(s(!0), l(P, null, W(i.value, (w) => (s(), l("button", {
|
|
1472
1472
|
key: w.value,
|
|
1473
1473
|
type: "button",
|
|
1474
|
-
class:
|
|
1474
|
+
class: c(O(w)),
|
|
1475
1475
|
onClick: ($) => I(w)
|
|
1476
1476
|
}, [
|
|
1477
1477
|
o("div", ks, [
|
|
@@ -1487,11 +1487,11 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1487
1487
|
])
|
|
1488
1488
|
], 10, ws))), 128)),
|
|
1489
1489
|
t.actionItems.length > 0 ? (s(), l("div", Ms)) : y("", !0),
|
|
1490
|
-
(s(!0), l(
|
|
1490
|
+
(s(!0), l(P, null, W(t.actionItems, (w) => (s(), l("button", {
|
|
1491
1491
|
key: w.id,
|
|
1492
1492
|
type: "button",
|
|
1493
|
-
class:
|
|
1494
|
-
onClick: ($) =>
|
|
1493
|
+
class: c(j(w)),
|
|
1494
|
+
onClick: ($) => Y(w)
|
|
1495
1495
|
}, [
|
|
1496
1496
|
w.icon ? (s(), l("svg", {
|
|
1497
1497
|
key: 0,
|
|
@@ -1502,7 +1502,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1502
1502
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1503
1503
|
innerHTML: w.icon
|
|
1504
1504
|
}, null, 8, Bs)) : y("", !0),
|
|
1505
|
-
|
|
1505
|
+
_(" " + x(w.label), 1)
|
|
1506
1506
|
], 10, Ds))), 128))
|
|
1507
1507
|
], 64))
|
|
1508
1508
|
])
|
|
@@ -1516,7 +1516,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1516
1516
|
})) : y("", !0)
|
|
1517
1517
|
], 2));
|
|
1518
1518
|
}
|
|
1519
|
-
}),
|
|
1519
|
+
}), Bl = /* @__PURE__ */ K(Ts, [["__scopeId", "data-v-edef6efe"]]), Ss = /* @__PURE__ */ q({
|
|
1520
1520
|
__name: "Sidebar",
|
|
1521
1521
|
props: {
|
|
1522
1522
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1532,11 +1532,11 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1532
1532
|
},
|
|
1533
1533
|
emits: ["update:modelValue", "close", "open"],
|
|
1534
1534
|
setup(t, { emit: g }) {
|
|
1535
|
-
const e = t,
|
|
1535
|
+
const e = t, f = g, n = r({
|
|
1536
1536
|
get: () => e.modelValue,
|
|
1537
|
-
set: (B) =>
|
|
1537
|
+
set: (B) => f("update:modelValue", B)
|
|
1538
1538
|
}), u = () => {
|
|
1539
|
-
e.persistent || (n.value = !1,
|
|
1539
|
+
e.persistent || (n.value = !1, f("close"));
|
|
1540
1540
|
}, v = r(() => e.position === "left" ? "slide-right" : "slide-left"), a = r(() => {
|
|
1541
1541
|
const B = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none", O = e.position === "left" ? "left-0" : "right-0", j = 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)]" : "";
|
|
1542
1542
|
return [B, O, j].filter(Boolean).join(" ");
|
|
@@ -1569,12 +1569,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1569
1569
|
default: ae(() => [
|
|
1570
1570
|
n.value ? (s(), l("aside", {
|
|
1571
1571
|
key: 0,
|
|
1572
|
-
class:
|
|
1572
|
+
class: c(a.value),
|
|
1573
1573
|
style: Q(h.value)
|
|
1574
1574
|
}, [
|
|
1575
1575
|
B.$slots.header ? (s(), l("div", {
|
|
1576
1576
|
key: 0,
|
|
1577
|
-
class:
|
|
1577
|
+
class: c(p.value)
|
|
1578
1578
|
}, [
|
|
1579
1579
|
V(B.$slots, "header", {}, void 0, !0),
|
|
1580
1580
|
t.closable ? (s(), l("button", {
|
|
@@ -1599,13 +1599,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1599
1599
|
])])) : y("", !0)
|
|
1600
1600
|
], 2)) : y("", !0),
|
|
1601
1601
|
o("div", {
|
|
1602
|
-
class:
|
|
1602
|
+
class: c(b.value)
|
|
1603
1603
|
}, [
|
|
1604
1604
|
V(B.$slots, "default", {}, void 0, !0)
|
|
1605
1605
|
], 2),
|
|
1606
1606
|
B.$slots.footer ? (s(), l("div", {
|
|
1607
1607
|
key: 1,
|
|
1608
|
-
class:
|
|
1608
|
+
class: c(T.value)
|
|
1609
1609
|
}, [
|
|
1610
1610
|
V(B.$slots, "footer", {}, void 0, !0)
|
|
1611
1611
|
], 2)) : y("", !0)
|
|
@@ -1615,10 +1615,10 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1615
1615
|
}, 8, ["name"])
|
|
1616
1616
|
]));
|
|
1617
1617
|
}
|
|
1618
|
-
}),
|
|
1618
|
+
}), zl = /* @__PURE__ */ K(Ss, [["__scopeId", "data-v-b208234c"]]), Is = { class: "w-full space-y-4" }, js = { class: "flex flex-col gap-3 md:hidden" }, Ls = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, Os = { class: "text-sm text-gray-700" }, Fs = {
|
|
1619
1619
|
key: 0,
|
|
1620
1620
|
class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
|
|
1621
|
-
},
|
|
1621
|
+
}, Ys = { class: "hidden md:block w-full overflow-x-auto" }, As = { class: "w-full border-collapse" }, Es = { class: "w-full" }, Ps = ["onClick"], qs = { class: "flex items-center gap-2" }, _s = {
|
|
1622
1622
|
key: 0,
|
|
1623
1623
|
class: "text-xs text-gray-400"
|
|
1624
1624
|
}, Rs = { key: 0 }, Ns = { key: 1 }, Ws = { class: "w-full" }, Hs = {
|
|
@@ -1627,7 +1627,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1627
1627
|
}, Ks = {
|
|
1628
1628
|
key: 0,
|
|
1629
1629
|
class: "w-full px-6 py-4 bg-white"
|
|
1630
|
-
}, Us = /* @__PURE__ */
|
|
1630
|
+
}, Us = /* @__PURE__ */ q({
|
|
1631
1631
|
__name: "Table",
|
|
1632
1632
|
props: {
|
|
1633
1633
|
columns: {},
|
|
@@ -1638,24 +1638,24 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1638
1638
|
rowClass: { default: void 0 }
|
|
1639
1639
|
},
|
|
1640
1640
|
setup(t) {
|
|
1641
|
-
const g = t, e = L(null),
|
|
1642
|
-
e.value === a ?
|
|
1641
|
+
const g = t, e = L(null), f = L("asc"), n = (a) => {
|
|
1642
|
+
e.value === a ? f.value = f.value === "asc" ? "desc" : "asc" : (e.value = a, f.value = "asc");
|
|
1643
1643
|
}, u = r(() => {
|
|
1644
1644
|
if (!e.value)
|
|
1645
1645
|
return g.data;
|
|
1646
1646
|
const a = [...g.data];
|
|
1647
1647
|
return a.sort((h, i) => {
|
|
1648
1648
|
const p = h[e.value], b = i[e.value];
|
|
1649
|
-
return typeof p == "string" && typeof b == "string" ?
|
|
1649
|
+
return typeof p == "string" && typeof b == "string" ? f.value === "asc" ? p.localeCompare(b) : b.localeCompare(p) : typeof p == "number" && typeof b == "number" ? f.value === "asc" ? p - b : b - p : 0;
|
|
1650
1650
|
}), a;
|
|
1651
1651
|
}), v = r(() => g.columns.filter((a) => !a.hideOnMobile));
|
|
1652
1652
|
return (a, h) => (s(), l("div", Is, [
|
|
1653
1653
|
o("div", js, [
|
|
1654
|
-
(s(!0), l(
|
|
1654
|
+
(s(!0), l(P, null, W(u.value, (i, p) => (s(), l("div", {
|
|
1655
1655
|
key: `card-${p}`,
|
|
1656
1656
|
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
1657
1657
|
}, [
|
|
1658
|
-
(s(!0), l(
|
|
1658
|
+
(s(!0), l(P, null, W(v.value, (b) => (s(), l("div", {
|
|
1659
1659
|
key: `card-${p}-${b.key}`,
|
|
1660
1660
|
class: "flex flex-col gap-1 py-1"
|
|
1661
1661
|
}, [
|
|
@@ -1665,56 +1665,56 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1665
1665
|
value: i[b.key],
|
|
1666
1666
|
row: i
|
|
1667
1667
|
}, () => [
|
|
1668
|
-
|
|
1668
|
+
_(x(i[b.key]), 1)
|
|
1669
1669
|
], !0)
|
|
1670
1670
|
])
|
|
1671
1671
|
]))), 128))
|
|
1672
1672
|
]))), 128)),
|
|
1673
1673
|
u.value.length === 0 ? (s(), l("div", Fs, [
|
|
1674
1674
|
V(a.$slots, "empty", {}, () => [
|
|
1675
|
-
h[0] || (h[0] =
|
|
1675
|
+
h[0] || (h[0] = _("No hay datos disponibles", -1))
|
|
1676
1676
|
], !0)
|
|
1677
1677
|
])) : y("", !0)
|
|
1678
1678
|
]),
|
|
1679
|
-
o("div",
|
|
1680
|
-
o("table",
|
|
1681
|
-
o("thead",
|
|
1679
|
+
o("div", Ys, [
|
|
1680
|
+
o("table", As, [
|
|
1681
|
+
o("thead", Es, [
|
|
1682
1682
|
o("tr", {
|
|
1683
|
-
class:
|
|
1683
|
+
class: c([
|
|
1684
1684
|
"w-full",
|
|
1685
1685
|
g.headerClass || "bg-neutral-50 border-b border-gray-100"
|
|
1686
1686
|
])
|
|
1687
1687
|
}, [
|
|
1688
|
-
(s(!0), l(
|
|
1688
|
+
(s(!0), l(P, null, W(t.columns, (i) => (s(), l("th", {
|
|
1689
1689
|
key: i.key,
|
|
1690
1690
|
style: Q(i.width ? { width: i.width } : {}),
|
|
1691
|
-
class:
|
|
1691
|
+
class: c([
|
|
1692
1692
|
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
1693
1693
|
i.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
1694
1694
|
g.headerCellClass
|
|
1695
1695
|
]),
|
|
1696
1696
|
onClick: (p) => i.sortable && n(i.key)
|
|
1697
1697
|
}, [
|
|
1698
|
-
o("div",
|
|
1698
|
+
o("div", qs, [
|
|
1699
1699
|
o("span", null, x(i.label), 1),
|
|
1700
|
-
i.sortable ? (s(), l("span",
|
|
1701
|
-
e.value !== i.key ? (s(), l("span", Rs, "⇅")) : (s(), l("span", Ns, x(
|
|
1700
|
+
i.sortable ? (s(), l("span", _s, [
|
|
1701
|
+
e.value !== i.key ? (s(), l("span", Rs, "⇅")) : (s(), l("span", Ns, x(f.value === "asc" ? "↑" : "↓"), 1))
|
|
1702
1702
|
])) : y("", !0)
|
|
1703
1703
|
])
|
|
1704
|
-
], 14,
|
|
1704
|
+
], 14, Ps))), 128))
|
|
1705
1705
|
], 2)
|
|
1706
1706
|
]),
|
|
1707
1707
|
o("tbody", Ws, [
|
|
1708
|
-
(s(!0), l(
|
|
1708
|
+
(s(!0), l(P, null, W(u.value, (i, p) => (s(), l("tr", {
|
|
1709
1709
|
key: p,
|
|
1710
|
-
class:
|
|
1710
|
+
class: c([
|
|
1711
1711
|
"w-full border-b border-gray-200 hover:bg-gray-50 transition-colors",
|
|
1712
1712
|
g.rowClass
|
|
1713
1713
|
])
|
|
1714
1714
|
}, [
|
|
1715
|
-
(s(!0), l(
|
|
1715
|
+
(s(!0), l(P, null, W(t.columns, (b) => (s(), l("td", {
|
|
1716
1716
|
key: `${p}-${b.key}`,
|
|
1717
|
-
class:
|
|
1717
|
+
class: c([
|
|
1718
1718
|
"px-4 py-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
|
|
1719
1719
|
g.cellClass
|
|
1720
1720
|
])
|
|
@@ -1723,7 +1723,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1723
1723
|
value: i[b.key],
|
|
1724
1724
|
row: i
|
|
1725
1725
|
}, () => [
|
|
1726
|
-
|
|
1726
|
+
_(x(i[b.key]), 1)
|
|
1727
1727
|
], !0)
|
|
1728
1728
|
], 2))), 128))
|
|
1729
1729
|
], 2))), 128))
|
|
@@ -1731,7 +1731,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1731
1731
|
]),
|
|
1732
1732
|
u.value.length === 0 ? (s(), l("div", Hs, [
|
|
1733
1733
|
V(a.$slots, "empty", {}, () => [
|
|
1734
|
-
h[1] || (h[1] =
|
|
1734
|
+
h[1] || (h[1] = _("No hay datos disponibles", -1))
|
|
1735
1735
|
], !0)
|
|
1736
1736
|
])) : y("", !0)
|
|
1737
1737
|
]),
|
|
@@ -1740,45 +1740,54 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1740
1740
|
])) : y("", !0)
|
|
1741
1741
|
]));
|
|
1742
1742
|
}
|
|
1743
|
-
}),
|
|
1744
|
-
class: "tabs-container
|
|
1743
|
+
}), Vl = /* @__PURE__ */ K(Us, [["__scopeId", "data-v-8e7ce66d"]]), Js = { class: "tabs-wrapper" }, Gs = {
|
|
1744
|
+
class: "tabs-container",
|
|
1745
1745
|
role: "tablist"
|
|
1746
|
-
}, Qs = ["aria-selected", "onClick"], Zs =
|
|
1746
|
+
}, Qs = ["aria-selected", "onClick"], Zs = "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base font-semibold tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500 border-b-2", Xs = "text-primary-600 border-primary-600", el = "hover:text-secondary-700 border-gray-100", tl = /* @__PURE__ */ q({
|
|
1747
1747
|
__name: "Tabs",
|
|
1748
1748
|
props: {
|
|
1749
1749
|
modelValue: {},
|
|
1750
|
-
tabs: {}
|
|
1750
|
+
tabs: {},
|
|
1751
|
+
headerClass: {},
|
|
1752
|
+
contentClass: {}
|
|
1751
1753
|
},
|
|
1752
1754
|
emits: ["update:modelValue"],
|
|
1753
1755
|
setup(t, { emit: g }) {
|
|
1754
|
-
const e = t,
|
|
1755
|
-
n(h) ||
|
|
1756
|
+
const e = t, f = g, n = (h) => e.modelValue === h, u = (h) => {
|
|
1757
|
+
n(h) || f("update:modelValue", h);
|
|
1756
1758
|
}, v = r(() => e.modelValue), a = r(
|
|
1757
1759
|
() => e.tabs.find((h) => h.value === v.value)
|
|
1758
1760
|
);
|
|
1759
1761
|
return (h, i) => (s(), l("div", Js, [
|
|
1760
|
-
o("div",
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1762
|
+
o("div", {
|
|
1763
|
+
class: c(["tabs-header", t.headerClass])
|
|
1764
|
+
}, [
|
|
1765
|
+
o("div", Gs, [
|
|
1766
|
+
(s(!0), l(P, null, W(t.tabs, (p) => (s(), l("button", {
|
|
1767
|
+
key: p.value,
|
|
1768
|
+
type: "button",
|
|
1769
|
+
class: c([
|
|
1770
|
+
Zs,
|
|
1771
|
+
n(p.value) ? Xs : el
|
|
1772
|
+
]),
|
|
1773
|
+
"aria-selected": n(p.value),
|
|
1774
|
+
role: "tab",
|
|
1775
|
+
onClick: (b) => u(p.value)
|
|
1776
|
+
}, x(p.label), 11, Qs))), 128))
|
|
1777
|
+
])
|
|
1778
|
+
], 2),
|
|
1779
|
+
o("div", {
|
|
1780
|
+
class: c(["tabs-content", t.contentClass]),
|
|
1781
|
+
role: "tabpanel"
|
|
1782
|
+
}, [
|
|
1774
1783
|
V(h.$slots, v.value, {
|
|
1775
1784
|
active: v.value,
|
|
1776
1785
|
tab: a.value
|
|
1777
1786
|
}, void 0, !0)
|
|
1778
|
-
])
|
|
1787
|
+
], 2)
|
|
1779
1788
|
]));
|
|
1780
1789
|
}
|
|
1781
|
-
}),
|
|
1790
|
+
}), Tl = /* @__PURE__ */ K(tl, [["__scopeId", "data-v-8cf75dcf"]]), sl = "font-sans", Sl = /* @__PURE__ */ q({
|
|
1782
1791
|
__name: "Text",
|
|
1783
1792
|
props: {
|
|
1784
1793
|
variant: { default: "body1" },
|
|
@@ -1830,7 +1839,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1830
1839
|
button3: "span",
|
|
1831
1840
|
caption: "span",
|
|
1832
1841
|
overline: "span"
|
|
1833
|
-
},
|
|
1842
|
+
}, f = {
|
|
1834
1843
|
left: "text-left",
|
|
1835
1844
|
center: "text-center",
|
|
1836
1845
|
right: "text-right",
|
|
@@ -1852,11 +1861,11 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1852
1861
|
extrabold: "font-extrabold"
|
|
1853
1862
|
}, v = t, a = r(() => v.variant), h = r(() => v.color), i = r(() => v.align), p = r(() => v.as || e[a.value] || "span"), b = r(() => v.weight ? u[v.weight] : "");
|
|
1854
1863
|
return (T, B) => (s(), ee(Me(p.value), {
|
|
1855
|
-
class:
|
|
1856
|
-
|
|
1864
|
+
class: c([
|
|
1865
|
+
sl,
|
|
1857
1866
|
g[a.value],
|
|
1858
1867
|
n[h.value],
|
|
1859
|
-
|
|
1868
|
+
f[i.value],
|
|
1860
1869
|
b.value,
|
|
1861
1870
|
{
|
|
1862
1871
|
uppercase: t.uppercase || a.value === "overline",
|
|
@@ -1870,17 +1879,17 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1870
1879
|
_: 3
|
|
1871
1880
|
}, 8, ["class"]));
|
|
1872
1881
|
}
|
|
1873
|
-
}),
|
|
1882
|
+
}), ll = { class: "w-full flex items-center justify-between gap-3 py-2" }, ol = {
|
|
1874
1883
|
key: 0,
|
|
1875
1884
|
class: "text-xs text-secondary-600"
|
|
1876
|
-
},
|
|
1885
|
+
}, al = { key: 0 }, nl = {
|
|
1877
1886
|
class: "ml-auto inline-flex items-center gap-1",
|
|
1878
1887
|
role: "navigation",
|
|
1879
1888
|
"aria-label": "Pagination"
|
|
1880
|
-
},
|
|
1889
|
+
}, rl = ["disabled"], il = {
|
|
1881
1890
|
key: 0,
|
|
1882
1891
|
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text-secondary-500"
|
|
1883
|
-
},
|
|
1892
|
+
}, dl = ["aria-label", "onClick"], ul = ["disabled"], cl = /* @__PURE__ */ q({
|
|
1884
1893
|
__name: "Pagination",
|
|
1885
1894
|
props: {
|
|
1886
1895
|
modelValue: { default: 1 },
|
|
@@ -1894,7 +1903,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1894
1903
|
},
|
|
1895
1904
|
emits: ["update:modelValue", "change"],
|
|
1896
1905
|
setup(t, { emit: g }) {
|
|
1897
|
-
const e = t,
|
|
1906
|
+
const e = t, f = g, n = r(() => {
|
|
1898
1907
|
const b = Math.ceil(e.totalItems / e.pageSize);
|
|
1899
1908
|
return b > 0 ? b : 1;
|
|
1900
1909
|
}), u = r(() => {
|
|
@@ -1915,40 +1924,40 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1915
1924
|
});
|
|
1916
1925
|
function p(b) {
|
|
1917
1926
|
const T = Math.max(1, Math.min(b, n.value));
|
|
1918
|
-
T !== u.value && (
|
|
1927
|
+
T !== u.value && (f("update:modelValue", T), f("change", T));
|
|
1919
1928
|
}
|
|
1920
|
-
return (b, T) => (s(), l("div",
|
|
1921
|
-
t.showSummary ? (s(), l("div",
|
|
1929
|
+
return (b, T) => (s(), l("div", ll, [
|
|
1930
|
+
t.showSummary ? (s(), l("div", ol, [
|
|
1922
1931
|
V(b.$slots, "summary", {
|
|
1923
1932
|
start: v.value,
|
|
1924
1933
|
end: a.value,
|
|
1925
1934
|
total: t.totalItems
|
|
1926
1935
|
}, () => [
|
|
1927
|
-
|
|
1928
|
-
t.itemLabel ? (s(), l("span",
|
|
1936
|
+
_(x(h.value), 1),
|
|
1937
|
+
t.itemLabel ? (s(), l("span", al, x(t.itemLabel), 1)) : y("", !0)
|
|
1929
1938
|
], !0)
|
|
1930
1939
|
])) : y("", !0),
|
|
1931
|
-
o("nav",
|
|
1940
|
+
o("nav", nl, [
|
|
1932
1941
|
o("button", {
|
|
1933
1942
|
type: "button",
|
|
1934
1943
|
class: "h-8 px-3 rounded-full text-sm font-semibold text-secondary-700 hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1935
1944
|
disabled: u.value <= 1,
|
|
1936
1945
|
onClick: T[0] || (T[0] = (B) => p(u.value - 1)),
|
|
1937
1946
|
"aria-label": "Anterior"
|
|
1938
|
-
}, x(t.previousText), 9,
|
|
1939
|
-
(s(!0), l(
|
|
1947
|
+
}, x(t.previousText), 9, rl),
|
|
1948
|
+
(s(!0), l(P, null, W(i.value, (B, O) => (s(), l(P, {
|
|
1940
1949
|
key: `page-${O}-${B}`
|
|
1941
1950
|
}, [
|
|
1942
|
-
B === "…" ? (s(), l("span",
|
|
1951
|
+
B === "…" ? (s(), l("span", il, " … ")) : (s(), l("button", {
|
|
1943
1952
|
key: 1,
|
|
1944
1953
|
type: "button",
|
|
1945
1954
|
"aria-label": `Página ${B}`,
|
|
1946
|
-
class:
|
|
1955
|
+
class: c([
|
|
1947
1956
|
"h-8 min-w-8 px-3 rounded-full text-sm font-semibold transition-colors",
|
|
1948
1957
|
B === u.value ? "bg-primary-500 text-white" : "text-secondary-700 hover:bg-secondary-100"
|
|
1949
1958
|
]),
|
|
1950
1959
|
onClick: (j) => p(B)
|
|
1951
|
-
}, x(B), 11,
|
|
1960
|
+
}, x(B), 11, dl))
|
|
1952
1961
|
], 64))), 128)),
|
|
1953
1962
|
o("button", {
|
|
1954
1963
|
type: "button",
|
|
@@ -1956,14 +1965,14 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1956
1965
|
disabled: u.value >= n.value,
|
|
1957
1966
|
onClick: T[1] || (T[1] = (B) => p(u.value + 1)),
|
|
1958
1967
|
"aria-label": "Siguiente"
|
|
1959
|
-
}, x(t.nextText), 9,
|
|
1968
|
+
}, x(t.nextText), 9, ul)
|
|
1960
1969
|
])
|
|
1961
1970
|
]));
|
|
1962
1971
|
}
|
|
1963
|
-
}),
|
|
1972
|
+
}), Il = /* @__PURE__ */ K(cl, [["__scopeId", "data-v-87417cc4"]]), fl = ["data-node-id"], vl = { class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center" }, pl = {
|
|
1964
1973
|
key: 1,
|
|
1965
1974
|
class: "flex justify-end gap-1 px-6 pb-6 pt-4"
|
|
1966
|
-
},
|
|
1975
|
+
}, jl = /* @__PURE__ */ q({
|
|
1967
1976
|
__name: "Alert",
|
|
1968
1977
|
props: {
|
|
1969
1978
|
variant: {},
|
|
@@ -1977,8 +1986,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1977
1986
|
},
|
|
1978
1987
|
emits: ["close", "accept", "cancel"],
|
|
1979
1988
|
setup(t, { emit: g }) {
|
|
1980
|
-
const e = g,
|
|
1981
|
-
if (
|
|
1989
|
+
const e = g, f = t, n = r(() => f.variant ?? "info"), u = r(() => f.multiline ?? !1), v = r(() => f.actions ?? !1), a = r(() => f.nodeId ?? void 0), h = () => e("close"), i = r(() => {
|
|
1990
|
+
if (f.title) return f.title;
|
|
1982
1991
|
switch (n.value) {
|
|
1983
1992
|
case "info":
|
|
1984
1993
|
return "Alerta de información";
|
|
@@ -1989,7 +1998,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1989
1998
|
case "error":
|
|
1990
1999
|
return "Alerta de error";
|
|
1991
2000
|
}
|
|
1992
|
-
}), p = r(() =>
|
|
2001
|
+
}), p = r(() => f.description ?? ""), b = r(() => {
|
|
1993
2002
|
switch (n.value) {
|
|
1994
2003
|
case "info":
|
|
1995
2004
|
return {
|
|
@@ -2018,16 +2027,16 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2018
2027
|
}
|
|
2019
2028
|
}), T = r(() => "bg-[var(--color-primario/700,#269ea4)]"), B = r(() => {
|
|
2020
2029
|
const S = "flex w-full items-start gap-4 flex-col";
|
|
2021
|
-
if (!
|
|
2022
|
-
const D =
|
|
2030
|
+
if (!f.stackOn) return `${S} sm:flex-row sm:items-center`;
|
|
2031
|
+
const D = f.stackOn, k = `${D}:flex-row ${D}:items-center`;
|
|
2023
2032
|
return `${S} ${k}`;
|
|
2024
2033
|
}), O = r(() => {
|
|
2025
|
-
if (!
|
|
2026
|
-
const S =
|
|
2034
|
+
if (!f.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
|
|
2035
|
+
const S = f.stackOn;
|
|
2027
2036
|
return `flex-col ${S}:flex-row items-start ${S}:items-center`;
|
|
2028
|
-
}), j = r(() =>
|
|
2037
|
+
}), j = r(() => f.stackOn ? `self-start ${f.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
2029
2038
|
return (S, D) => (s(), l("div", {
|
|
2030
|
-
class:
|
|
2039
|
+
class: c(["relative w-full rounded-xl border", [
|
|
2031
2040
|
b.value.border,
|
|
2032
2041
|
b.value.bg
|
|
2033
2042
|
]]),
|
|
@@ -2067,12 +2076,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2067
2076
|
], -1)
|
|
2068
2077
|
])])) : y("", !0),
|
|
2069
2078
|
o("div", {
|
|
2070
|
-
class:
|
|
2079
|
+
class: c(["p-6", { "pb-0": v.value }])
|
|
2071
2080
|
}, [
|
|
2072
2081
|
o("div", {
|
|
2073
|
-
class:
|
|
2082
|
+
class: c(B.value)
|
|
2074
2083
|
}, [
|
|
2075
|
-
o("div",
|
|
2084
|
+
o("div", vl, [
|
|
2076
2085
|
n.value === "info" ? (s(), l("svg", {
|
|
2077
2086
|
key: 0,
|
|
2078
2087
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2080,7 +2089,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2080
2089
|
height: "24",
|
|
2081
2090
|
viewBox: "0 0 24 24",
|
|
2082
2091
|
fill: "none",
|
|
2083
|
-
class:
|
|
2092
|
+
class: c(b.value.icon),
|
|
2084
2093
|
stroke: "currentColor",
|
|
2085
2094
|
"stroke-width": "2",
|
|
2086
2095
|
"stroke-linecap": "round",
|
|
@@ -2110,7 +2119,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2110
2119
|
height: "24",
|
|
2111
2120
|
viewBox: "0 0 24 24",
|
|
2112
2121
|
fill: "none",
|
|
2113
|
-
class:
|
|
2122
|
+
class: c(b.value.icon),
|
|
2114
2123
|
stroke: "currentColor",
|
|
2115
2124
|
"stroke-width": "2",
|
|
2116
2125
|
"stroke-linecap": "round",
|
|
@@ -2136,7 +2145,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2136
2145
|
height: "24",
|
|
2137
2146
|
viewBox: "0 0 24 24",
|
|
2138
2147
|
fill: "none",
|
|
2139
|
-
class:
|
|
2148
|
+
class: c(b.value.icon),
|
|
2140
2149
|
stroke: "currentColor",
|
|
2141
2150
|
"stroke-width": "2",
|
|
2142
2151
|
"stroke-linecap": "round",
|
|
@@ -2151,7 +2160,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2151
2160
|
height: "24",
|
|
2152
2161
|
viewBox: "0 0 24 24",
|
|
2153
2162
|
fill: "none",
|
|
2154
|
-
class:
|
|
2163
|
+
class: c(b.value.icon),
|
|
2155
2164
|
stroke: "currentColor",
|
|
2156
2165
|
"stroke-width": "2",
|
|
2157
2166
|
"stroke-linecap": "round",
|
|
@@ -2173,60 +2182,60 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2173
2182
|
])], 2))
|
|
2174
2183
|
]),
|
|
2175
2184
|
o("div", {
|
|
2176
|
-
class:
|
|
2185
|
+
class: c(["flex-1 flex gap-4 text-[14px]", [O.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !u.value, "whitespace-pre-wrap": u.value }]])
|
|
2177
2186
|
}, [
|
|
2178
2187
|
o("div", {
|
|
2179
|
-
class:
|
|
2188
|
+
class: c(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", j.value])
|
|
2180
2189
|
}, x(i.value), 3),
|
|
2181
2190
|
o("div", {
|
|
2182
|
-
class:
|
|
2191
|
+
class: c(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !u.value }])
|
|
2183
2192
|
}, [
|
|
2184
2193
|
V(S.$slots, "description", {}, () => [
|
|
2185
|
-
|
|
2194
|
+
_(x(p.value), 1)
|
|
2186
2195
|
])
|
|
2187
2196
|
], 2)
|
|
2188
2197
|
], 2)
|
|
2189
2198
|
], 2)
|
|
2190
2199
|
], 2),
|
|
2191
|
-
v.value ? (s(), l("div",
|
|
2200
|
+
v.value ? (s(), l("div", pl, [
|
|
2192
2201
|
o("button", {
|
|
2193
2202
|
type: "button",
|
|
2194
2203
|
class: "px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
2195
2204
|
onClick: D[0] || (D[0] = (k) => S.$emit("cancel"))
|
|
2196
2205
|
}, [
|
|
2197
2206
|
V(S.$slots, "cancel", {}, () => [
|
|
2198
|
-
D[7] || (D[7] =
|
|
2207
|
+
D[7] || (D[7] = _("Cancelar", -1))
|
|
2199
2208
|
])
|
|
2200
2209
|
]),
|
|
2201
2210
|
o("button", {
|
|
2202
2211
|
type: "button",
|
|
2203
|
-
class:
|
|
2212
|
+
class: c(["px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-white", T.value]),
|
|
2204
2213
|
onClick: D[1] || (D[1] = (k) => S.$emit("accept"))
|
|
2205
2214
|
}, [
|
|
2206
2215
|
V(S.$slots, "accept", {}, () => [
|
|
2207
|
-
D[8] || (D[8] =
|
|
2216
|
+
D[8] || (D[8] = _("Aceptar", -1))
|
|
2208
2217
|
])
|
|
2209
2218
|
], 2)
|
|
2210
2219
|
])) : y("", !0)
|
|
2211
|
-
], 10,
|
|
2220
|
+
], 10, fl));
|
|
2212
2221
|
}
|
|
2213
2222
|
});
|
|
2214
2223
|
export {
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2224
|
+
jl as Alert,
|
|
2225
|
+
yl as AppBar,
|
|
2226
|
+
hl as Button,
|
|
2227
|
+
xl as Calendar,
|
|
2228
|
+
wl as Card,
|
|
2229
|
+
kl as Dialog,
|
|
2230
|
+
$l as FileUpload,
|
|
2222
2231
|
se as Icon,
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
+
Cl as Input,
|
|
2233
|
+
Ml as Loader,
|
|
2234
|
+
Dl as Menu,
|
|
2235
|
+
Il as Pagination,
|
|
2236
|
+
Bl as Select,
|
|
2237
|
+
zl as Sidebar,
|
|
2238
|
+
Vl as Table,
|
|
2239
|
+
Tl as Tabs,
|
|
2240
|
+
Sl as Text
|
|
2232
2241
|
};
|