@iaclinical/components 1.0.20 → 1.0.21
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 +861 -851
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as P, computed as r, createElementBlock as
|
|
2
|
-
import { Icon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as P, computed as r, createElementBlock as l, openBlock as s, normalizeClass as f, createElementVNode as o, createCommentVNode as y, renderSlot as V, toDisplayString as x, createBlock as ee, unref as Ye, normalizeStyle as Q, ref as L, onMounted as $e, onUnmounted as Ce, watch as ve, createTextVNode as q, withModifiers as H, createVNode as G, withDirectives as ue, Fragment as E, renderList as W, vModelSelect as ke, Teleport as pe, Transition as ce, withCtx as ae, nextTick as fe, resolveDynamicComponent as Me, vModelText as Ae } from "vue";
|
|
2
|
+
import { Icon as Ee } from "@iconify/vue";
|
|
3
|
+
const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
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 = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins truncate"
|
|
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
|
-
},
|
|
12
|
+
}, Ke = /* @__PURE__ */ P({
|
|
13
13
|
__name: "AppBar",
|
|
14
14
|
props: {
|
|
15
15
|
title: { default: "" },
|
|
@@ -23,7 +23,7 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
23
23
|
emits: ["toggle-menu"],
|
|
24
24
|
setup(t, { emit: g }) {
|
|
25
25
|
const e = t, c = g, n = r(() => {
|
|
26
|
-
const
|
|
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",
|
|
29
29
|
light: "bg-white text-secondary-900 border-b border-secondary-200"
|
|
@@ -33,60 +33,60 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
33
33
|
lg: "h-16"
|
|
34
34
|
}, h = e.sticky ? "sticky top-0" : "", i = e.shadow ? "shadow-md" : "";
|
|
35
35
|
return [
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
u,
|
|
37
|
+
v[e.variant],
|
|
38
38
|
a[e.height],
|
|
39
39
|
h,
|
|
40
40
|
i
|
|
41
41
|
].join(" ");
|
|
42
42
|
});
|
|
43
|
-
return (
|
|
44
|
-
class:
|
|
43
|
+
return (u, v) => (s(), l("header", {
|
|
44
|
+
class: f(n.value)
|
|
45
45
|
}, [
|
|
46
|
-
|
|
47
|
-
t.showMenuButton ? (s(),
|
|
46
|
+
o("div", Pe, [
|
|
47
|
+
t.showMenuButton ? (s(), l("button", {
|
|
48
48
|
key: 0,
|
|
49
|
-
onClick:
|
|
49
|
+
onClick: v[0] || (v[0] = (a) => c("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
|
-
}, [...
|
|
53
|
-
|
|
52
|
+
}, [...v[1] || (v[1] = [
|
|
53
|
+
o("svg", {
|
|
54
54
|
class: "w-5 h-5 sm:w-6 sm:h-6 text-primary-50",
|
|
55
55
|
fill: "none",
|
|
56
56
|
stroke: "currentColor",
|
|
57
57
|
viewBox: "0 0 24 24",
|
|
58
58
|
xmlns: "http://www.w3.org/2000/svg"
|
|
59
59
|
}, [
|
|
60
|
-
|
|
60
|
+
o("path", {
|
|
61
61
|
"stroke-linecap": "round",
|
|
62
62
|
"stroke-linejoin": "round",
|
|
63
63
|
"stroke-width": "2",
|
|
64
64
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
65
65
|
})
|
|
66
66
|
], -1)
|
|
67
|
-
])])) :
|
|
68
|
-
t.title && t.titlePosition === "left" ? (s(),
|
|
69
|
-
|
|
67
|
+
])])) : y("", !0),
|
|
68
|
+
t.title && t.titlePosition === "left" ? (s(), l("div", qe, x(t.title), 1)) : y("", !0),
|
|
69
|
+
V(u.$slots, "left", {}, void 0, !0)
|
|
70
70
|
]),
|
|
71
|
-
|
|
72
|
-
t.title && t.titlePosition === "center" ? (s(),
|
|
73
|
-
|
|
71
|
+
o("div", Re, [
|
|
72
|
+
t.title && t.titlePosition === "center" ? (s(), l("div", Ne, x(t.title), 1)) : y("", !0),
|
|
73
|
+
V(u.$slots, "center", {}, void 0, !0)
|
|
74
74
|
]),
|
|
75
|
-
|
|
76
|
-
t.title && t.titlePosition === "right" ? (s(),
|
|
77
|
-
|
|
75
|
+
o("div", We, [
|
|
76
|
+
t.title && t.titlePosition === "right" ? (s(), l("div", He, x(t.title), 1)) : y("", !0),
|
|
77
|
+
V(u.$slots, "right", {}, void 0, !0)
|
|
78
78
|
])
|
|
79
79
|
], 2));
|
|
80
80
|
}
|
|
81
|
-
}),
|
|
81
|
+
}), K = (t, g) => {
|
|
82
82
|
const e = t.__vccOpts || t;
|
|
83
83
|
for (const [c, n] of g)
|
|
84
84
|
e[c] = n;
|
|
85
85
|
return e;
|
|
86
|
-
},
|
|
86
|
+
}, hl = /* @__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
|
+
}, xl = /* @__PURE__ */ P({
|
|
90
90
|
__name: "Button",
|
|
91
91
|
props: {
|
|
92
92
|
variant: { default: "primary" },
|
|
@@ -101,7 +101,7 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
101
101
|
},
|
|
102
102
|
emits: ["click"],
|
|
103
103
|
setup(t, { emit: g }) {
|
|
104
|
-
const e = t, c = g, n = r(() => e.variant === "icon"),
|
|
104
|
+
const e = t, c = 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",
|
|
@@ -121,26 +121,26 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
121
121
|
md: "rounded-lg",
|
|
122
122
|
sm: "rounded-md",
|
|
123
123
|
none: "rounded-none"
|
|
124
|
-
},
|
|
125
|
-
var
|
|
126
|
-
return e.textColorHover ? e.textColorHover : (
|
|
124
|
+
}, T = e.textColor ? e.textColor : "", B = r(() => {
|
|
125
|
+
var O, j;
|
|
126
|
+
return e.textColorHover ? e.textColorHover : (O = e.textColor) != null && O.includes("white") || (j = e.textColor) != null && j.includes("50") ? "hover:text-black" : "";
|
|
127
127
|
});
|
|
128
|
-
return `${h} ${i[e.variant]} ${p[e.size]} ${b[e.radius]} ${
|
|
128
|
+
return `${h} ${i[e.variant]} ${p[e.size]} ${b[e.radius]} ${T} ${B.value}`;
|
|
129
129
|
}), a = (h) => {
|
|
130
130
|
e.disabled || c("click", h);
|
|
131
131
|
};
|
|
132
|
-
return (h, i) => (s(),
|
|
133
|
-
class: v
|
|
132
|
+
return (h, i) => (s(), l("button", {
|
|
133
|
+
class: f(v.value),
|
|
134
134
|
type: t.type,
|
|
135
135
|
disabled: t.disabled,
|
|
136
136
|
onClick: a,
|
|
137
137
|
"aria-label": t.ariaLabel
|
|
138
138
|
}, [
|
|
139
|
-
|
|
140
|
-
n.value && t.badge && t.badge > 0 ? (s(),
|
|
141
|
-
], 10,
|
|
139
|
+
V(h.$slots, "default"),
|
|
140
|
+
n.value && t.badge && t.badge > 0 ? (s(), l("span", Je, x(u.value), 1)) : y("", !0)
|
|
141
|
+
], 10, Ue));
|
|
142
142
|
}
|
|
143
|
-
}),
|
|
143
|
+
}), Ge = /* @__PURE__ */ P({
|
|
144
144
|
__name: "Icon",
|
|
145
145
|
props: {
|
|
146
146
|
name: {},
|
|
@@ -175,13 +175,13 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
175
175
|
default:
|
|
176
176
|
return `material-symbols:${i}`;
|
|
177
177
|
}
|
|
178
|
-
}, n = r(() => c(g.name, g.variant)),
|
|
178
|
+
}, n = r(() => c(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"
|
|
182
182
|
];
|
|
183
183
|
return g.color && (g.color.startsWith("text-") || g.color.startsWith("fill-")) && a.push(g.color), g.spin && a.push("animate-spin"), a.join(" ");
|
|
184
|
-
}),
|
|
184
|
+
}), v = r(() => {
|
|
185
185
|
const a = {};
|
|
186
186
|
if (e[g.size] ? (a.fontSize = e[g.size], a.width = e[g.size], a.height = e[g.size]) : (a.fontSize = g.size, a.width = g.size, a.height = g.size), g.color && !g.color.startsWith("text-") && !g.color.startsWith("fill-") && (a.color = g.color), g.rotate !== 0) {
|
|
187
187
|
const h = `rotate(${g.rotate}deg)`;
|
|
@@ -189,33 +189,33 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
189
189
|
}
|
|
190
190
|
return a;
|
|
191
191
|
});
|
|
192
|
-
return (a, h) => (s(),
|
|
192
|
+
return (a, h) => (s(), ee(Ye(Ee), {
|
|
193
193
|
icon: n.value,
|
|
194
|
-
class:
|
|
195
|
-
style:
|
|
194
|
+
class: f(u.value),
|
|
195
|
+
style: Q(v.value),
|
|
196
196
|
"aria-label": t.ariaLabel,
|
|
197
197
|
role: t.ariaLabel ? "img" : void 0
|
|
198
198
|
}, null, 8, ["icon", "class", "style", "aria-label", "role"]));
|
|
199
199
|
}
|
|
200
|
-
}), se = /* @__PURE__ */
|
|
200
|
+
}), se = /* @__PURE__ */ K(Ge, [["__scopeId", "data-v-5f982e5c"]]), Qe = {
|
|
201
201
|
key: 0,
|
|
202
202
|
class: "relative"
|
|
203
|
-
},
|
|
203
|
+
}, Ze = ["for"], Xe = {
|
|
204
204
|
key: 0,
|
|
205
205
|
class: "text-danger-600"
|
|
206
|
-
},
|
|
206
|
+
}, et = ["id", "disabled", "placeholder", "value", "required"], tt = ["disabled"], st = {
|
|
207
207
|
key: 1,
|
|
208
208
|
class: "space-y-2"
|
|
209
|
-
},
|
|
209
|
+
}, lt = {
|
|
210
210
|
key: 0,
|
|
211
211
|
class: "text-danger-600"
|
|
212
|
-
},
|
|
212
|
+
}, ot = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, at = ["disabled", "placeholder", "value", "required"], nt = ["disabled"], rt = ["disabled", "placeholder", "value", "required"], it = ["disabled"], dt = {
|
|
213
213
|
key: 2,
|
|
214
214
|
class: "mt-1 text-sm text-danger-600"
|
|
215
|
-
},
|
|
215
|
+
}, ut = {
|
|
216
216
|
key: 3,
|
|
217
217
|
class: "mt-1 text-sm text-secondary-600"
|
|
218
|
-
},
|
|
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__ */ P({
|
|
219
219
|
__name: "Calendar",
|
|
220
220
|
props: {
|
|
221
221
|
modelValue: {},
|
|
@@ -239,11 +239,12 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
239
239
|
minDate: {},
|
|
240
240
|
maxDate: {},
|
|
241
241
|
disabledDates: {},
|
|
242
|
-
dateFormat: { default: "DD/MM/YYYY" }
|
|
242
|
+
dateFormat: { default: "DD/MM/YYYY" },
|
|
243
|
+
bordered: { type: Boolean, default: !0 }
|
|
243
244
|
},
|
|
244
245
|
emits: ["update:modelValue", "date-select", "range-select"],
|
|
245
246
|
setup(t, { emit: g }) {
|
|
246
|
-
const e = t, c = g, n =
|
|
247
|
+
const e = t, c = 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 = [
|
|
247
248
|
"Enero",
|
|
248
249
|
"Febrero",
|
|
249
250
|
"Marzo",
|
|
@@ -256,106 +257,106 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
256
257
|
"Octubre",
|
|
257
258
|
"Noviembre",
|
|
258
259
|
"Diciembre"
|
|
259
|
-
],
|
|
260
|
-
const
|
|
261
|
-
for (let
|
|
262
|
-
|
|
263
|
-
return
|
|
264
|
-
}),
|
|
265
|
-
const
|
|
266
|
-
sm: "
|
|
267
|
-
md: "
|
|
268
|
-
lg: "
|
|
269
|
-
},
|
|
270
|
-
primary: "focus:
|
|
271
|
-
secondary: "focus:
|
|
272
|
-
},
|
|
273
|
-
default: "
|
|
274
|
-
filled: "
|
|
275
|
-
outlined: "
|
|
276
|
-
},
|
|
277
|
-
return `${
|
|
260
|
+
], T = ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], B = r(() => ({ sm: "xs", md: "sm", lg: "md" })[e.size] || "sm"), O = r(() => {
|
|
261
|
+
const m = (/* @__PURE__ */ new Date()).getFullYear(), C = [];
|
|
262
|
+
for (let z = m - 100; z <= m + 10; z++)
|
|
263
|
+
C.push(z);
|
|
264
|
+
return C;
|
|
265
|
+
}), j = r(() => `block text-sm font-medium ${e.labelColor} mb-1`), S = r(() => e.bordered ? "border border-neutral-300" : ""), D = r(() => {
|
|
266
|
+
const m = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", C = {
|
|
267
|
+
sm: "px-3 py-1.5 pr-10 text-sm",
|
|
268
|
+
md: "px-4 py-2 pr-10 text-base",
|
|
269
|
+
lg: "px-5 py-3 pr-12 text-lg"
|
|
270
|
+
}, z = {
|
|
271
|
+
primary: "focus:ring-primary-500",
|
|
272
|
+
secondary: "focus:ring-secondary-500"
|
|
273
|
+
}, Y = {
|
|
274
|
+
default: "bg-white",
|
|
275
|
+
filled: "bg-secondary-100",
|
|
276
|
+
outlined: "bg-transparent"
|
|
277
|
+
}, U = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
278
|
+
return `${m} ${C[e.size]} ${Y[e.variant]} ${z[e.color]} ${U}`;
|
|
278
279
|
}), k = r(() => `transition-colors ${{
|
|
279
280
|
primary: "text-primary-600 hover:text-primary-700",
|
|
280
281
|
secondary: "text-secondary-600 hover:text-secondary-700"
|
|
281
|
-
}[e.color]} ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`),
|
|
282
|
+
}[e.color]} ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), I = r(() => "min-w-80 max-w-sm"), _ = r(() => `p-2 rounded-md transition-colors ${{
|
|
282
283
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
283
284
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
284
|
-
}[e.color]}`),
|
|
285
|
+
}[e.color]}`), N = r(() => `px-2 py-1 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-1 ${{
|
|
285
286
|
primary: "focus:border-primary-500 focus:ring-primary-500",
|
|
286
287
|
secondary: "focus:border-secondary-500 focus:ring-secondary-500"
|
|
287
|
-
}[e.color]}`),
|
|
288
|
+
}[e.color]}`), te = 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 ${{
|
|
288
289
|
primary: "bg-primary-600 hover:bg-primary-700 focus:ring-primary-500",
|
|
289
290
|
secondary: "bg-secondary-600 hover:bg-secondary-700 focus:ring-secondary-500"
|
|
290
|
-
}[e.color]}`),
|
|
291
|
+
}[e.color]}`), M = r(() => `px-3 py-1.5 text-sm border border-secondary-300 rounded-md transition-colors focus:outline-none ${{
|
|
291
292
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
292
293
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
293
|
-
}[e.color]}`),
|
|
294
|
+
}[e.color]}`), d = r(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? A(e.modelValue) : ""), w = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? A(e.modelValue.start) : ""), $ = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? A(e.modelValue.end) : ""), J = r(() => e.mode === "single" ? i.value !== null : i.value !== null && p.value !== null && p.value >= i.value);
|
|
294
295
|
r(() => e.mode === "range" && i.value && p.value ? p.value < i.value : !1);
|
|
295
|
-
const
|
|
296
|
-
const
|
|
297
|
-
for (let
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
day:
|
|
301
|
-
date:
|
|
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(), Y = C.getDate(), U = [], X = new Date(a.value, v.value - 1, 0);
|
|
298
|
+
for (let R = z - 1; R >= 0; R--) {
|
|
299
|
+
const Z = new Date(a.value, v.value - 1, X.getDate() - R);
|
|
300
|
+
U.push({
|
|
301
|
+
day: Z.getDate(),
|
|
302
|
+
date: Z,
|
|
302
303
|
isCurrentMonth: !1,
|
|
303
304
|
disabled: !0,
|
|
304
|
-
key: `prev-${
|
|
305
|
+
key: `prev-${Z.getDate()}`
|
|
305
306
|
});
|
|
306
307
|
}
|
|
307
|
-
for (let
|
|
308
|
-
const
|
|
309
|
-
|
|
310
|
-
day:
|
|
311
|
-
date:
|
|
308
|
+
for (let R = 1; R <= Y; R++) {
|
|
309
|
+
const Z = new Date(a.value, v.value, R);
|
|
310
|
+
U.push({
|
|
311
|
+
day: R,
|
|
312
|
+
date: Z,
|
|
312
313
|
isCurrentMonth: !0,
|
|
313
314
|
disabled: !1,
|
|
314
|
-
key: `current-${
|
|
315
|
+
key: `current-${R}`
|
|
315
316
|
});
|
|
316
317
|
}
|
|
317
|
-
const
|
|
318
|
-
for (let
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
day:
|
|
322
|
-
date:
|
|
318
|
+
const _e = 42 - U.length;
|
|
319
|
+
for (let R = 1; R <= _e; R++) {
|
|
320
|
+
const Z = new Date(a.value, v.value + 1, R);
|
|
321
|
+
U.push({
|
|
322
|
+
day: R,
|
|
323
|
+
date: Z,
|
|
323
324
|
isCurrentMonth: !1,
|
|
324
325
|
disabled: !0,
|
|
325
|
-
key: `next-${
|
|
326
|
+
key: `next-${R}`
|
|
326
327
|
});
|
|
327
328
|
}
|
|
328
|
-
return
|
|
329
|
-
}),
|
|
330
|
-
const
|
|
329
|
+
return U;
|
|
330
|
+
}), A = (m) => {
|
|
331
|
+
const C = m.getDate().toString().padStart(2, "0"), z = (m.getMonth() + 1).toString().padStart(2, "0"), Y = m.getFullYear();
|
|
331
332
|
switch (e.dateFormat) {
|
|
332
333
|
case "MM/DD/YYYY":
|
|
333
|
-
return `${
|
|
334
|
+
return `${z}/${C}/${Y}`;
|
|
334
335
|
case "YYYY-MM-DD":
|
|
335
|
-
return `${
|
|
336
|
+
return `${Y}-${z}-${C}`;
|
|
336
337
|
case "DD/MM/YYYY":
|
|
337
338
|
default:
|
|
338
|
-
return `${
|
|
339
|
+
return `${C}/${z}/${Y}`;
|
|
339
340
|
}
|
|
340
|
-
},
|
|
341
|
-
var
|
|
342
|
-
const
|
|
341
|
+
}, be = (m) => {
|
|
342
|
+
var z;
|
|
343
|
+
const C = new Date(m.getFullYear(), m.getMonth(), m.getDate());
|
|
343
344
|
if (e.minDate) {
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
345
|
+
const Y = new Date(e.minDate.getFullYear(), e.minDate.getMonth(), e.minDate.getDate());
|
|
346
|
+
if (C < Y) return !0;
|
|
346
347
|
}
|
|
347
348
|
if (e.maxDate) {
|
|
348
|
-
const
|
|
349
|
-
if (
|
|
349
|
+
const Y = new Date(e.maxDate.getFullYear(), e.maxDate.getMonth(), e.maxDate.getDate());
|
|
350
|
+
if (C > Y) return !0;
|
|
350
351
|
}
|
|
351
|
-
return !!((
|
|
352
|
-
(
|
|
352
|
+
return !!((z = e.disabledDates) != null && z.some(
|
|
353
|
+
(Y) => Y.toDateString() === m.toDateString()
|
|
353
354
|
));
|
|
354
|
-
},
|
|
355
|
-
const
|
|
356
|
-
if (!
|
|
357
|
-
return `${
|
|
358
|
-
const
|
|
355
|
+
}, De = (m) => {
|
|
356
|
+
const C = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
|
|
357
|
+
if (!m.isCurrentMonth || m.disabled || be(m.date))
|
|
358
|
+
return `${C} text-secondary-400 cursor-not-allowed`;
|
|
359
|
+
const z = Be(m.date), Y = ze(m.date), U = Ve(m.date), X = {
|
|
359
360
|
primary: {
|
|
360
361
|
selected: "bg-primary-600 text-white",
|
|
361
362
|
inRange: "bg-primary-100 text-primary-900",
|
|
@@ -369,249 +370,255 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
369
370
|
default: "text-secondary-700 hover:bg-secondary-50 hover:text-secondary-700"
|
|
370
371
|
}
|
|
371
372
|
};
|
|
372
|
-
return
|
|
373
|
-
},
|
|
373
|
+
return z ? `${C} ${X[e.color].selected}` : Y ? `${C} ${X[e.color].inRange}` : U ? `${C} ${X[e.color].today}` : `${C} ${X[e.color].default}`;
|
|
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) => {
|
|
374
375
|
if (e.mode !== "range" || !i.value || !p.value)
|
|
375
376
|
return !1;
|
|
376
|
-
const
|
|
377
|
-
return
|
|
378
|
-
},
|
|
379
|
-
e.disabled || n.value ||
|
|
380
|
-
}, Te = () => {
|
|
381
|
-
e.disabled || n.value || le();
|
|
377
|
+
const C = i.value, z = p.value;
|
|
378
|
+
return m > C && m < z;
|
|
379
|
+
}, Ve = (m) => le(m, /* @__PURE__ */ new Date()), le = (m, C) => m.toDateString() === C.toDateString(), Te = () => {
|
|
380
|
+
e.disabled || n.value || oe();
|
|
382
381
|
}, Se = () => {
|
|
383
|
-
e.disabled ||
|
|
384
|
-
},
|
|
385
|
-
e.disabled || (
|
|
386
|
-
}, ge = (
|
|
387
|
-
e.disabled || (ne(
|
|
388
|
-
},
|
|
389
|
-
e.disabled || (ne(
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
},
|
|
382
|
+
e.disabled || n.value || oe();
|
|
383
|
+
}, Ie = () => {
|
|
384
|
+
e.disabled || he();
|
|
385
|
+
}, ge = (m) => {
|
|
386
|
+
e.disabled || (ne(m), n.value || oe());
|
|
387
|
+
}, me = (m) => {
|
|
388
|
+
e.disabled || (ne(m), n.value || oe());
|
|
389
|
+
}, ye = (m) => {
|
|
390
|
+
e.disabled || (ne(m), he());
|
|
391
|
+
}, ne = (m) => {
|
|
392
|
+
u.value = m;
|
|
393
|
+
}, he = () => {
|
|
393
394
|
e.disabled || (n.value = !n.value, n.value && ie());
|
|
394
|
-
},
|
|
395
|
+
}, oe = () => {
|
|
395
396
|
e.disabled || (n.value = !0, ie());
|
|
396
397
|
}, re = () => {
|
|
397
|
-
n.value = !1,
|
|
398
|
+
n.value = !1, u.value = null;
|
|
398
399
|
}, ie = () => {
|
|
399
400
|
e.mode === "single" ? (i.value = e.modelValue instanceof Date ? e.modelValue : null, p.value = null) : e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue ? (i.value = e.modelValue.start, p.value = e.modelValue.end) : (i.value = null, p.value = null);
|
|
400
|
-
},
|
|
401
|
-
e.mode === "single" ? (i.value =
|
|
402
|
-
},
|
|
401
|
+
}, je = (m) => {
|
|
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
|
+
}, Le = () => {
|
|
403
404
|
if (e.mode === "single")
|
|
404
405
|
c("update:modelValue", i.value), i.value && c("date-select", i.value);
|
|
405
406
|
else {
|
|
406
|
-
const
|
|
407
|
-
c("update:modelValue",
|
|
407
|
+
const m = { start: i.value, end: p.value };
|
|
408
|
+
c("update:modelValue", m), c("range-select", m);
|
|
408
409
|
}
|
|
409
410
|
re();
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
},
|
|
413
|
-
|
|
414
|
-
},
|
|
415
|
-
}, de =
|
|
416
|
-
de.value && !de.value.contains(
|
|
411
|
+
}, Oe = () => {
|
|
412
|
+
v.value === 0 ? (v.value = 11, a.value--) : v.value--;
|
|
413
|
+
}, Fe = () => {
|
|
414
|
+
v.value === 11 ? (v.value = 0, a.value++) : v.value++;
|
|
415
|
+
}, xe = () => {
|
|
416
|
+
}, de = L(), we = (m) => {
|
|
417
|
+
de.value && !de.value.contains(m.target) && re();
|
|
417
418
|
};
|
|
418
|
-
return
|
|
419
|
-
document.addEventListener("click",
|
|
420
|
-
}),
|
|
421
|
-
document.removeEventListener("click",
|
|
422
|
-
}), ve(() => e.modelValue, (
|
|
419
|
+
return $e(() => {
|
|
420
|
+
document.addEventListener("click", we);
|
|
421
|
+
}), Ce(() => {
|
|
422
|
+
document.removeEventListener("click", we);
|
|
423
|
+
}), ve(() => e.modelValue, (m) => {
|
|
423
424
|
n.value || ie();
|
|
424
|
-
}, { deep: !0 }), (
|
|
425
|
+
}, { deep: !0 }), (m, C) => (s(), l("div", {
|
|
425
426
|
ref_key: "calendarWrapperRef",
|
|
426
427
|
ref: de,
|
|
427
428
|
class: "calendar-wrapper"
|
|
428
429
|
}, [
|
|
429
|
-
t.mode === "single" ? (s(),
|
|
430
|
-
t.label && t.showLabel ? (s(),
|
|
430
|
+
t.mode === "single" ? (s(), l("div", Qe, [
|
|
431
|
+
t.label && t.showLabel ? (s(), l("label", {
|
|
431
432
|
key: 0,
|
|
432
433
|
for: h.value,
|
|
433
|
-
class:
|
|
434
|
+
class: f(j.value)
|
|
435
|
+
}, [
|
|
436
|
+
q(x(t.label) + " ", 1),
|
|
437
|
+
t.required ? (s(), l("span", Xe, "*")) : y("", !0)
|
|
438
|
+
], 10, Ze)) : y("", !0),
|
|
439
|
+
o("div", {
|
|
440
|
+
class: f(["relative rounded-md", S.value])
|
|
434
441
|
}, [
|
|
435
|
-
|
|
436
|
-
t.required ? (s(), o("span", Ze, "*")) : m("", !0)
|
|
437
|
-
], 10, Qe)) : m("", !0),
|
|
438
|
-
l("div", Xe, [
|
|
439
|
-
l("input", {
|
|
442
|
+
o("input", {
|
|
440
443
|
id: h.value,
|
|
441
|
-
class:
|
|
444
|
+
class: f(D.value),
|
|
442
445
|
type: "text",
|
|
443
446
|
disabled: t.disabled,
|
|
444
447
|
placeholder: t.placeholder || "Seleccionar fecha",
|
|
445
|
-
value:
|
|
448
|
+
value: d.value,
|
|
446
449
|
required: t.required,
|
|
447
450
|
readonly: !0,
|
|
448
|
-
onClick:
|
|
449
|
-
onFocus:
|
|
451
|
+
onClick: Te,
|
|
452
|
+
onFocus: Se
|
|
450
453
|
}, null, 42, et),
|
|
451
|
-
|
|
454
|
+
o("button", {
|
|
452
455
|
type: "button",
|
|
453
|
-
class:
|
|
454
|
-
onClick:
|
|
456
|
+
class: f(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
457
|
+
onClick: H(Ie, ["stop"]),
|
|
455
458
|
disabled: t.disabled
|
|
456
459
|
}, [
|
|
457
|
-
|
|
460
|
+
G(se, {
|
|
458
461
|
name: t.iconName,
|
|
459
|
-
size:
|
|
462
|
+
size: B.value
|
|
460
463
|
}, null, 8, ["name", "size"])
|
|
461
464
|
], 10, tt)
|
|
462
|
-
])
|
|
463
|
-
])) : (s(),
|
|
464
|
-
t.label && t.showLabel ? (s(),
|
|
465
|
+
], 2)
|
|
466
|
+
])) : (s(), l("div", st, [
|
|
467
|
+
t.label && t.showLabel ? (s(), l("label", {
|
|
465
468
|
key: 0,
|
|
466
|
-
class:
|
|
469
|
+
class: f(j.value)
|
|
467
470
|
}, [
|
|
468
|
-
|
|
469
|
-
t.required ? (s(),
|
|
470
|
-
], 2)) :
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
471
|
+
q(x(t.label) + " ", 1),
|
|
472
|
+
t.required ? (s(), l("span", lt, "*")) : y("", !0)
|
|
473
|
+
], 2)) : y("", !0),
|
|
474
|
+
o("div", ot, [
|
|
475
|
+
o("div", {
|
|
476
|
+
class: f(["relative rounded-md", S.value])
|
|
477
|
+
}, [
|
|
478
|
+
o("input", {
|
|
479
|
+
class: f(D.value),
|
|
475
480
|
type: "text",
|
|
476
481
|
disabled: t.disabled,
|
|
477
482
|
placeholder: t.startPlaceholder || "Fecha desde",
|
|
478
|
-
value:
|
|
483
|
+
value: w.value,
|
|
479
484
|
required: t.required,
|
|
480
485
|
readonly: !0,
|
|
481
|
-
onClick:
|
|
482
|
-
onFocus:
|
|
483
|
-
}, null, 42,
|
|
484
|
-
|
|
486
|
+
onClick: C[0] || (C[0] = () => ge("start")),
|
|
487
|
+
onFocus: C[1] || (C[1] = () => me("start"))
|
|
488
|
+
}, null, 42, at),
|
|
489
|
+
o("button", {
|
|
485
490
|
type: "button",
|
|
486
|
-
class:
|
|
487
|
-
onClick:
|
|
491
|
+
class: f(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
492
|
+
onClick: C[2] || (C[2] = H(() => ye("start"), ["stop"])),
|
|
488
493
|
disabled: t.disabled
|
|
489
494
|
}, [
|
|
490
|
-
|
|
495
|
+
G(se, {
|
|
491
496
|
name: t.startIconName,
|
|
492
|
-
size:
|
|
497
|
+
size: B.value
|
|
493
498
|
}, null, 8, ["name", "size"])
|
|
494
|
-
], 10,
|
|
495
|
-
]),
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
+
], 10, nt)
|
|
500
|
+
], 2),
|
|
501
|
+
o("div", {
|
|
502
|
+
class: f(["relative rounded-md", S.value])
|
|
503
|
+
}, [
|
|
504
|
+
o("input", {
|
|
505
|
+
class: f(D.value),
|
|
499
506
|
type: "text",
|
|
500
507
|
disabled: t.disabled,
|
|
501
508
|
placeholder: t.endPlaceholder || "Fecha hasta",
|
|
502
|
-
value:
|
|
509
|
+
value: $.value,
|
|
503
510
|
required: t.required,
|
|
504
511
|
readonly: !0,
|
|
505
|
-
onClick:
|
|
506
|
-
onFocus:
|
|
507
|
-
}, null, 42,
|
|
508
|
-
|
|
512
|
+
onClick: C[3] || (C[3] = () => ge("end")),
|
|
513
|
+
onFocus: C[4] || (C[4] = () => me("end"))
|
|
514
|
+
}, null, 42, rt),
|
|
515
|
+
o("button", {
|
|
509
516
|
type: "button",
|
|
510
|
-
class:
|
|
511
|
-
onClick:
|
|
517
|
+
class: f(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
518
|
+
onClick: C[5] || (C[5] = H(() => ye("end"), ["stop"])),
|
|
512
519
|
disabled: t.disabled
|
|
513
520
|
}, [
|
|
514
|
-
|
|
521
|
+
G(se, {
|
|
515
522
|
name: t.endIconName,
|
|
516
|
-
size:
|
|
523
|
+
size: B.value
|
|
517
524
|
}, null, 8, ["name", "size"])
|
|
518
|
-
], 10,
|
|
519
|
-
])
|
|
525
|
+
], 10, it)
|
|
526
|
+
], 2)
|
|
520
527
|
])
|
|
521
528
|
])),
|
|
522
|
-
t.error ? (s(),
|
|
523
|
-
n.value ? (s(),
|
|
529
|
+
t.error ? (s(), l("p", dt, x(t.error), 1)) : t.helperText ? (s(), l("p", ut, x(t.helperText), 1)) : y("", !0),
|
|
530
|
+
n.value ? (s(), l("div", {
|
|
524
531
|
key: 4,
|
|
525
|
-
class:
|
|
526
|
-
onClick:
|
|
532
|
+
class: f(["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
|
+
onClick: C[8] || (C[8] = H(() => {
|
|
527
534
|
}, ["stop"]))
|
|
528
535
|
}, [
|
|
529
|
-
|
|
530
|
-
|
|
536
|
+
o("div", ct, [
|
|
537
|
+
o("button", {
|
|
531
538
|
type: "button",
|
|
532
|
-
onClick:
|
|
533
|
-
class:
|
|
539
|
+
onClick: Oe,
|
|
540
|
+
class: f(_.value)
|
|
534
541
|
}, [
|
|
535
|
-
|
|
542
|
+
G(se, {
|
|
536
543
|
name: "chevron-left",
|
|
537
544
|
size: "sm"
|
|
538
545
|
})
|
|
539
546
|
], 2),
|
|
540
|
-
|
|
541
|
-
ue(
|
|
542
|
-
"onUpdate:modelValue":
|
|
543
|
-
class:
|
|
544
|
-
onChange:
|
|
547
|
+
o("div", ft, [
|
|
548
|
+
ue(o("select", {
|
|
549
|
+
"onUpdate:modelValue": C[6] || (C[6] = (z) => v.value = z),
|
|
550
|
+
class: f(N.value),
|
|
551
|
+
onChange: xe
|
|
545
552
|
}, [
|
|
546
|
-
(s(),
|
|
547
|
-
key:
|
|
548
|
-
value:
|
|
549
|
-
}, x(
|
|
553
|
+
(s(), l(E, null, W(b, (z, Y) => o("option", {
|
|
554
|
+
key: Y,
|
|
555
|
+
value: Y
|
|
556
|
+
}, x(z), 9, vt)), 64))
|
|
550
557
|
], 34), [
|
|
551
|
-
[
|
|
558
|
+
[ke, v.value]
|
|
552
559
|
]),
|
|
553
|
-
ue(
|
|
554
|
-
"onUpdate:modelValue":
|
|
555
|
-
class:
|
|
556
|
-
onChange:
|
|
560
|
+
ue(o("select", {
|
|
561
|
+
"onUpdate:modelValue": C[7] || (C[7] = (z) => a.value = z),
|
|
562
|
+
class: f(N.value),
|
|
563
|
+
onChange: xe
|
|
557
564
|
}, [
|
|
558
|
-
(s(!0),
|
|
559
|
-
key:
|
|
560
|
-
value:
|
|
561
|
-
}, x(
|
|
565
|
+
(s(!0), l(E, null, W(O.value, (z) => (s(), l("option", {
|
|
566
|
+
key: z,
|
|
567
|
+
value: z
|
|
568
|
+
}, x(z), 9, pt))), 128))
|
|
562
569
|
], 34), [
|
|
563
|
-
[
|
|
570
|
+
[ke, a.value]
|
|
564
571
|
])
|
|
565
572
|
]),
|
|
566
|
-
|
|
573
|
+
o("button", {
|
|
567
574
|
type: "button",
|
|
568
|
-
onClick:
|
|
569
|
-
class:
|
|
575
|
+
onClick: Fe,
|
|
576
|
+
class: f(_.value)
|
|
570
577
|
}, [
|
|
571
|
-
|
|
578
|
+
G(se, {
|
|
572
579
|
name: "chevron-right",
|
|
573
580
|
size: "sm"
|
|
574
581
|
})
|
|
575
582
|
], 2)
|
|
576
583
|
]),
|
|
577
|
-
|
|
578
|
-
(s(),
|
|
579
|
-
key:
|
|
584
|
+
o("div", bt, [
|
|
585
|
+
(s(), l(E, null, W(T, (z) => o("div", {
|
|
586
|
+
key: z,
|
|
580
587
|
class: "text-center text-sm font-medium text-secondary-600 py-2"
|
|
581
|
-
}, x(
|
|
588
|
+
}, x(z), 1)), 64))
|
|
582
589
|
]),
|
|
583
|
-
|
|
584
|
-
(s(!0),
|
|
585
|
-
key:
|
|
590
|
+
o("div", gt, [
|
|
591
|
+
(s(!0), l(E, null, W(F.value, (z) => (s(), l("button", {
|
|
592
|
+
key: z.key,
|
|
586
593
|
type: "button",
|
|
587
|
-
class:
|
|
588
|
-
disabled:
|
|
589
|
-
onClick: (
|
|
590
|
-
}, x(
|
|
594
|
+
class: f(De(z)),
|
|
595
|
+
disabled: z.disabled || be(z.date),
|
|
596
|
+
onClick: (Y) => je(z.date)
|
|
597
|
+
}, x(z.day), 11, mt))), 128))
|
|
591
598
|
]),
|
|
592
|
-
|
|
593
|
-
|
|
599
|
+
o("div", yt, [
|
|
600
|
+
o("button", {
|
|
594
601
|
type: "button",
|
|
595
|
-
class:
|
|
602
|
+
class: f(M.value),
|
|
596
603
|
onClick: re
|
|
597
604
|
}, " Cancelar ", 2),
|
|
598
|
-
|
|
605
|
+
o("button", {
|
|
599
606
|
type: "button",
|
|
600
|
-
class:
|
|
601
|
-
onClick:
|
|
602
|
-
disabled:
|
|
603
|
-
}, " Confirmar ", 10,
|
|
607
|
+
class: f(te.value),
|
|
608
|
+
onClick: Le,
|
|
609
|
+
disabled: !J.value
|
|
610
|
+
}, " Confirmar ", 10, ht)
|
|
604
611
|
])
|
|
605
|
-
], 2)) :
|
|
612
|
+
], 2)) : y("", !0)
|
|
606
613
|
], 512));
|
|
607
614
|
}
|
|
608
|
-
}),
|
|
615
|
+
}), wl = /* @__PURE__ */ K(xt, [["__scopeId", "data-v-38b6f181"]]), wt = {
|
|
609
616
|
key: 0,
|
|
610
617
|
class: "border-b border-gray-100 px-6 py-4"
|
|
611
|
-
},
|
|
618
|
+
}, kt = { class: "px-6 py-4" }, $t = {
|
|
612
619
|
key: 1,
|
|
613
620
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
614
|
-
},
|
|
621
|
+
}, kl = /* @__PURE__ */ P({
|
|
615
622
|
__name: "Card",
|
|
616
623
|
props: {
|
|
617
624
|
shadow: { default: "md" },
|
|
@@ -638,24 +645,24 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
638
645
|
c[g.rounded],
|
|
639
646
|
g.bordered ? "border border-gray-200" : ""
|
|
640
647
|
]);
|
|
641
|
-
return (
|
|
642
|
-
class:
|
|
648
|
+
return (u, v) => (s(), l("div", {
|
|
649
|
+
class: f(n.value)
|
|
643
650
|
}, [
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
])) :
|
|
647
|
-
|
|
648
|
-
|
|
651
|
+
u.$slots.header ? (s(), l("div", wt, [
|
|
652
|
+
V(u.$slots, "header")
|
|
653
|
+
])) : y("", !0),
|
|
654
|
+
o("div", kt, [
|
|
655
|
+
V(u.$slots, "default")
|
|
649
656
|
]),
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
])) :
|
|
657
|
+
u.$slots.footer ? (s(), l("div", $t, [
|
|
658
|
+
V(u.$slots, "footer")
|
|
659
|
+
])) : y("", !0)
|
|
653
660
|
], 2));
|
|
654
661
|
}
|
|
655
|
-
}),
|
|
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 = {
|
|
656
663
|
key: 0,
|
|
657
664
|
class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
|
|
658
|
-
},
|
|
665
|
+
}, zt = /* @__PURE__ */ P({
|
|
659
666
|
__name: "Dialog",
|
|
660
667
|
props: {
|
|
661
668
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -667,43 +674,43 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
667
674
|
const e = t, c = g, n = r({
|
|
668
675
|
get: () => e.modelValue,
|
|
669
676
|
set: (a) => c("update:modelValue", a)
|
|
670
|
-
}),
|
|
677
|
+
}), u = () => {
|
|
671
678
|
n.value = !1, c("close");
|
|
672
|
-
},
|
|
673
|
-
e.closeOnBackdrop &&
|
|
679
|
+
}, v = () => {
|
|
680
|
+
e.closeOnBackdrop && u();
|
|
674
681
|
};
|
|
675
|
-
return (a, h) => (s(),
|
|
676
|
-
|
|
682
|
+
return (a, h) => (s(), ee(pe, { to: "body" }, [
|
|
683
|
+
G(ce, { name: "dialog" }, {
|
|
677
684
|
default: ae(() => [
|
|
678
|
-
n.value ? (s(),
|
|
685
|
+
n.value ? (s(), l("div", {
|
|
679
686
|
key: 0,
|
|
680
687
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4",
|
|
681
|
-
onClick:
|
|
688
|
+
onClick: v
|
|
682
689
|
}, [
|
|
683
|
-
|
|
690
|
+
o("div", {
|
|
684
691
|
class: "relative w-full rounded-lg bg-white shadow-xl sm:max-w-lg md:max-w-2xl",
|
|
685
|
-
onClick: h[0] || (h[0] =
|
|
692
|
+
onClick: h[0] || (h[0] = H(() => {
|
|
686
693
|
}, ["stop"]))
|
|
687
694
|
}, [
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
695
|
+
o("div", Ct, [
|
|
696
|
+
o("h2", Mt, [
|
|
697
|
+
V(a.$slots, "title", {}, () => [
|
|
698
|
+
q(x(t.title), 1)
|
|
692
699
|
], !0)
|
|
693
700
|
]),
|
|
694
|
-
|
|
701
|
+
o("button", {
|
|
695
702
|
type: "button",
|
|
696
703
|
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",
|
|
697
704
|
"aria-label": "Cerrar diálogo",
|
|
698
|
-
onClick:
|
|
705
|
+
onClick: u
|
|
699
706
|
}, [...h[1] || (h[1] = [
|
|
700
|
-
|
|
707
|
+
o("svg", {
|
|
701
708
|
class: "h-6 w-6",
|
|
702
709
|
fill: "none",
|
|
703
710
|
stroke: "currentColor",
|
|
704
711
|
viewBox: "0 0 24 24"
|
|
705
712
|
}, [
|
|
706
|
-
|
|
713
|
+
o("path", {
|
|
707
714
|
"stroke-linecap": "round",
|
|
708
715
|
"stroke-linejoin": "round",
|
|
709
716
|
"stroke-width": "2",
|
|
@@ -712,32 +719,32 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
712
719
|
], -1)
|
|
713
720
|
])])
|
|
714
721
|
]),
|
|
715
|
-
|
|
716
|
-
|
|
722
|
+
o("div", Dt, [
|
|
723
|
+
V(a.$slots, "default", {}, void 0, !0)
|
|
717
724
|
]),
|
|
718
|
-
a.$slots.footer ? (s(),
|
|
719
|
-
|
|
720
|
-
])) :
|
|
725
|
+
a.$slots.footer ? (s(), l("div", Bt, [
|
|
726
|
+
V(a.$slots, "footer", {}, void 0, !0)
|
|
727
|
+
])) : y("", !0)
|
|
721
728
|
])
|
|
722
|
-
])) :
|
|
729
|
+
])) : y("", !0)
|
|
723
730
|
]),
|
|
724
731
|
_: 3
|
|
725
732
|
})
|
|
726
733
|
]));
|
|
727
734
|
}
|
|
728
|
-
}),
|
|
735
|
+
}), $l = /* @__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 = {
|
|
729
736
|
key: 1,
|
|
730
737
|
class: "w-full h-full text-gray-400",
|
|
731
738
|
fill: "none",
|
|
732
739
|
stroke: "currentColor",
|
|
733
740
|
viewBox: "0 0 24 24"
|
|
734
|
-
},
|
|
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" }, _t = { class: "flex-1 min-w-0" }, Yt = { class: "text-sm font-medium text-gray-900 truncate" }, At = { class: "text-xs text-gray-500" }, Et = {
|
|
735
742
|
key: 1,
|
|
736
743
|
class: "text-xs text-gray-500 mt-2"
|
|
737
|
-
},
|
|
744
|
+
}, Pt = {
|
|
738
745
|
key: 2,
|
|
739
746
|
class: "text-sm text-danger-500 mt-2"
|
|
740
|
-
},
|
|
747
|
+
}, Cl = /* @__PURE__ */ P({
|
|
741
748
|
__name: "FileUpload",
|
|
742
749
|
props: {
|
|
743
750
|
modelValue: { default: null },
|
|
@@ -754,53 +761,53 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
754
761
|
},
|
|
755
762
|
emits: ["update:modelValue", "change", "error"],
|
|
756
763
|
setup(t, { emit: g }) {
|
|
757
|
-
const e = t, c = g, n =
|
|
764
|
+
const e = t, c = g, n = L(null), u = L(!1), v = L(e.modelValue), a = L(""), h = r(() => ({
|
|
758
765
|
sm: "w-20 h-20",
|
|
759
766
|
md: "w-32 h-32",
|
|
760
767
|
lg: "w-48 h-48",
|
|
761
768
|
xl: "w-64 h-64"
|
|
762
769
|
})[e.illustrationSize]), i = () => {
|
|
763
|
-
var
|
|
764
|
-
(
|
|
770
|
+
var k;
|
|
771
|
+
(k = n.value) == null || k.click();
|
|
765
772
|
}, p = () => {
|
|
766
773
|
e.disabled || i();
|
|
767
|
-
}, b = (
|
|
768
|
-
e.disabled || (
|
|
769
|
-
},
|
|
770
|
-
|
|
771
|
-
},
|
|
772
|
-
if (a.value = "", e.maxSize &&
|
|
773
|
-
const
|
|
774
|
-
return a.value = `El archivo excede el tamaño máximo de ${
|
|
774
|
+
}, b = (k) => {
|
|
775
|
+
e.disabled || (u.value = !0);
|
|
776
|
+
}, T = () => {
|
|
777
|
+
u.value = !1;
|
|
778
|
+
}, B = (k) => {
|
|
779
|
+
if (a.value = "", e.maxSize && k.size > e.maxSize) {
|
|
780
|
+
const I = (e.maxSize / 1048576).toFixed(2);
|
|
781
|
+
return a.value = `El archivo excede el tamaño máximo de ${I}MB`, c("error", a.value), !1;
|
|
775
782
|
}
|
|
776
783
|
return !0;
|
|
777
|
-
},
|
|
778
|
-
var
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
},
|
|
782
|
-
var
|
|
783
|
-
|
|
784
|
-
const
|
|
785
|
-
|
|
784
|
+
}, O = (k) => {
|
|
785
|
+
var N;
|
|
786
|
+
const _ = (N = k.target.files) == null ? void 0 : N[0];
|
|
787
|
+
_ && B(_) && (v.value = _, c("update:modelValue", _), c("change", _));
|
|
788
|
+
}, j = (k) => {
|
|
789
|
+
var _;
|
|
790
|
+
u.value = !1;
|
|
791
|
+
const I = (_ = k.dataTransfer) == null ? void 0 : _.files[0];
|
|
792
|
+
I && B(I) && (v.value = I, c("update:modelValue", I), c("change", I));
|
|
786
793
|
}, S = () => {
|
|
787
|
-
|
|
788
|
-
},
|
|
789
|
-
if (
|
|
790
|
-
const
|
|
791
|
-
return Math.round(
|
|
794
|
+
v.value = null, a.value = "", n.value && (n.value.value = ""), c("update:modelValue", null), c("change", null);
|
|
795
|
+
}, D = (k) => {
|
|
796
|
+
if (k === 0) return "0 Bytes";
|
|
797
|
+
const I = 1024, _ = ["Bytes", "KB", "MB", "GB"], N = Math.floor(Math.log(k) / Math.log(I));
|
|
798
|
+
return Math.round(k / Math.pow(I, N) * 100) / 100 + " " + _[N];
|
|
792
799
|
};
|
|
793
|
-
return (
|
|
794
|
-
class:
|
|
795
|
-
|
|
800
|
+
return (k, I) => (s(), l("div", {
|
|
801
|
+
class: f(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
802
|
+
u.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
796
803
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
797
804
|
]]),
|
|
798
805
|
onClick: p,
|
|
799
|
-
onDragover:
|
|
800
|
-
onDragleave:
|
|
801
|
-
onDrop:
|
|
806
|
+
onDragover: H(b, ["prevent"]),
|
|
807
|
+
onDragleave: H(T, ["prevent"]),
|
|
808
|
+
onDrop: H(j, ["prevent"])
|
|
802
809
|
}, [
|
|
803
|
-
|
|
810
|
+
o("input", {
|
|
804
811
|
ref_key: "fileInput",
|
|
805
812
|
ref: n,
|
|
806
813
|
type: "file",
|
|
@@ -808,19 +815,19 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
808
815
|
multiple: t.multiple,
|
|
809
816
|
disabled: t.disabled,
|
|
810
817
|
class: "hidden",
|
|
811
|
-
onChange:
|
|
812
|
-
}, null, 40,
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
class:
|
|
818
|
+
onChange: O
|
|
819
|
+
}, null, 40, Vt),
|
|
820
|
+
o("div", Tt, [
|
|
821
|
+
o("div", {
|
|
822
|
+
class: f([h.value, "flex items-center justify-center"])
|
|
816
823
|
}, [
|
|
817
|
-
t.illustration ? (s(),
|
|
824
|
+
t.illustration ? (s(), l("img", {
|
|
818
825
|
key: 0,
|
|
819
826
|
src: t.illustration,
|
|
820
827
|
alt: t.illustrationAlt,
|
|
821
828
|
class: "max-w-full max-h-full object-contain"
|
|
822
|
-
}, null, 8,
|
|
823
|
-
|
|
829
|
+
}, null, 8, St)) : (s(), l("svg", It, [...I[1] || (I[1] = [
|
|
830
|
+
o("path", {
|
|
824
831
|
"stroke-linecap": "round",
|
|
825
832
|
"stroke-linejoin": "round",
|
|
826
833
|
"stroke-width": "1.5",
|
|
@@ -828,73 +835,73 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
828
835
|
}, null, -1)
|
|
829
836
|
])]))
|
|
830
837
|
], 2),
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
838
|
+
o("div", jt, [
|
|
839
|
+
o("p", Lt, [
|
|
840
|
+
q(x(t.mainText) + " ", 1),
|
|
841
|
+
o("span", Ot, x(t.linkText), 1)
|
|
835
842
|
])
|
|
836
843
|
]),
|
|
837
|
-
|
|
844
|
+
v.value ? (s(), l("div", {
|
|
838
845
|
key: 0,
|
|
839
846
|
class: "w-full max-w-md bg-gray-50 rounded-lg p-4 flex items-center justify-between",
|
|
840
|
-
onClick:
|
|
847
|
+
onClick: I[0] || (I[0] = H(() => {
|
|
841
848
|
}, ["stop"]))
|
|
842
849
|
}, [
|
|
843
|
-
|
|
844
|
-
|
|
850
|
+
o("div", Ft, [
|
|
851
|
+
I[2] || (I[2] = o("svg", {
|
|
845
852
|
class: "w-6 h-6 text-gray-600 flex-shrink-0",
|
|
846
853
|
fill: "none",
|
|
847
854
|
stroke: "currentColor",
|
|
848
855
|
viewBox: "0 0 24 24"
|
|
849
856
|
}, [
|
|
850
|
-
|
|
857
|
+
o("path", {
|
|
851
858
|
"stroke-linecap": "round",
|
|
852
859
|
"stroke-linejoin": "round",
|
|
853
860
|
"stroke-width": "2",
|
|
854
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"
|
|
855
862
|
})
|
|
856
863
|
], -1)),
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
864
|
+
o("div", _t, [
|
|
865
|
+
o("p", Yt, x(v.value.name), 1),
|
|
866
|
+
o("p", At, x(D(v.value.size)), 1)
|
|
860
867
|
])
|
|
861
868
|
]),
|
|
862
|
-
t.disabled ?
|
|
869
|
+
t.disabled ? y("", !0) : (s(), l("button", {
|
|
863
870
|
key: 0,
|
|
864
|
-
onClick:
|
|
871
|
+
onClick: H(S, ["stop"]),
|
|
865
872
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
866
|
-
}, [...
|
|
867
|
-
|
|
873
|
+
}, [...I[3] || (I[3] = [
|
|
874
|
+
o("svg", {
|
|
868
875
|
class: "w-5 h-5",
|
|
869
876
|
fill: "currentColor",
|
|
870
877
|
viewBox: "0 0 20 20"
|
|
871
878
|
}, [
|
|
872
|
-
|
|
879
|
+
o("path", {
|
|
873
880
|
"fill-rule": "evenodd",
|
|
874
881
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
875
882
|
"clip-rule": "evenodd"
|
|
876
883
|
})
|
|
877
884
|
], -1)
|
|
878
885
|
])]))
|
|
879
|
-
])) :
|
|
880
|
-
t.helperText ? (s(),
|
|
881
|
-
a.value ? (s(),
|
|
886
|
+
])) : y("", !0),
|
|
887
|
+
t.helperText ? (s(), l("p", Et, x(t.helperText), 1)) : y("", !0),
|
|
888
|
+
a.value ? (s(), l("p", Pt, x(a.value), 1)) : y("", !0)
|
|
882
889
|
])
|
|
883
890
|
], 34));
|
|
884
891
|
}
|
|
885
|
-
}),
|
|
892
|
+
}), qt = { class: "input-wrapper" }, Rt = ["for"], Nt = {
|
|
886
893
|
key: 0,
|
|
887
894
|
class: "text-danger-600"
|
|
888
|
-
},
|
|
895
|
+
}, Wt = { class: "relative" }, Ht = ["id", "type", "disabled", "placeholder", "value", "required", "readonly"], Kt = {
|
|
889
896
|
key: 0,
|
|
890
897
|
class: "absolute right-3 top-1/2 -translate-y-1/2 text-danger-600"
|
|
891
|
-
},
|
|
898
|
+
}, Ut = {
|
|
892
899
|
key: 1,
|
|
893
900
|
class: "mt-1 text-sm text-danger-600"
|
|
894
|
-
},
|
|
901
|
+
}, Jt = {
|
|
895
902
|
key: 2,
|
|
896
903
|
class: "mt-1 text-sm text-secondary-600"
|
|
897
|
-
},
|
|
904
|
+
}, Gt = /* @__PURE__ */ P({
|
|
898
905
|
__name: "Input",
|
|
899
906
|
props: {
|
|
900
907
|
modelValue: { default: "" },
|
|
@@ -911,17 +918,17 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
911
918
|
},
|
|
912
919
|
emits: ["update:modelValue", "blur", "focus"],
|
|
913
920
|
setup(t, { emit: g }) {
|
|
914
|
-
const e = t, c = g, n =
|
|
921
|
+
const e = t, c = 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(() => {
|
|
915
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 = {
|
|
916
923
|
sm: "h-8 px-3 text-sm",
|
|
917
924
|
md: "h-10 px-4 text-base",
|
|
918
925
|
lg: "h-12 px-5 text-lg"
|
|
919
|
-
},
|
|
926
|
+
}, T = {
|
|
920
927
|
default: "border border-secondary-300 bg-white focus:border-primary-500 focus:ring-primary-500",
|
|
921
928
|
filled: "border-0 bg-secondary-100 focus:bg-white focus:ring-primary-500",
|
|
922
929
|
outlined: "border-2 border-secondary-300 bg-transparent focus:border-primary-500 focus:ring-primary-500"
|
|
923
|
-
},
|
|
924
|
-
return `${p} ${b[e.size]} ${
|
|
930
|
+
}, B = e.error ? "border-danger-500 focus:border-danger-500 focus:ring-danger-500 pr-10" : "";
|
|
931
|
+
return `${p} ${b[e.size]} ${T[e.variant]} ${B}`;
|
|
925
932
|
}), a = (p) => {
|
|
926
933
|
const b = p.target;
|
|
927
934
|
c("update:modelValue", b.value);
|
|
@@ -930,19 +937,19 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
930
937
|
}, i = (p) => {
|
|
931
938
|
c("focus", p);
|
|
932
939
|
};
|
|
933
|
-
return (p, b) => (s(),
|
|
934
|
-
t.label ? (s(),
|
|
940
|
+
return (p, b) => (s(), l("div", qt, [
|
|
941
|
+
t.label ? (s(), l("label", {
|
|
935
942
|
key: 0,
|
|
936
943
|
for: n.value,
|
|
937
|
-
class:
|
|
944
|
+
class: f(u.value)
|
|
938
945
|
}, [
|
|
939
|
-
|
|
940
|
-
t.required ? (s(),
|
|
941
|
-
], 10,
|
|
942
|
-
|
|
943
|
-
|
|
946
|
+
q(x(t.label) + " ", 1),
|
|
947
|
+
t.required ? (s(), l("span", Nt, "*")) : y("", !0)
|
|
948
|
+
], 10, Rt)) : y("", !0),
|
|
949
|
+
o("div", Wt, [
|
|
950
|
+
o("input", {
|
|
944
951
|
id: n.value,
|
|
945
|
-
class: v
|
|
952
|
+
class: f(v.value),
|
|
946
953
|
type: t.type,
|
|
947
954
|
disabled: t.disabled,
|
|
948
955
|
placeholder: t.placeholder,
|
|
@@ -952,29 +959,29 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
952
959
|
onInput: a,
|
|
953
960
|
onBlur: h,
|
|
954
961
|
onFocus: i
|
|
955
|
-
}, null, 42,
|
|
956
|
-
t.error ? (s(),
|
|
957
|
-
|
|
962
|
+
}, null, 42, Ht),
|
|
963
|
+
t.error ? (s(), l("span", Kt, [...b[0] || (b[0] = [
|
|
964
|
+
o("svg", {
|
|
958
965
|
xmlns: "http://www.w3.org/2000/svg",
|
|
959
966
|
class: "h-5 w-5",
|
|
960
967
|
viewBox: "0 0 20 20",
|
|
961
968
|
fill: "currentColor"
|
|
962
969
|
}, [
|
|
963
|
-
|
|
970
|
+
o("path", {
|
|
964
971
|
"fill-rule": "evenodd",
|
|
965
972
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
|
|
966
973
|
"clip-rule": "evenodd"
|
|
967
974
|
})
|
|
968
975
|
], -1)
|
|
969
|
-
])])) :
|
|
976
|
+
])])) : y("", !0)
|
|
970
977
|
]),
|
|
971
|
-
t.error ? (s(),
|
|
978
|
+
t.error ? (s(), l("p", Ut, x(t.error), 1)) : t.helperText ? (s(), l("p", Jt, x(t.helperText), 1)) : y("", !0)
|
|
972
979
|
]));
|
|
973
980
|
}
|
|
974
|
-
}),
|
|
981
|
+
}), Ml = /* @__PURE__ */ K(Gt, [["__scopeId", "data-v-e3a37613"]]), Qt = ["stroke-width"], Zt = {
|
|
975
982
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
976
983
|
style: { "background-color": "#f7f7f7" }
|
|
977
|
-
},
|
|
984
|
+
}, Xt = /* @__PURE__ */ P({
|
|
978
985
|
__name: "Loader",
|
|
979
986
|
props: {
|
|
980
987
|
type: { default: "circular" },
|
|
@@ -999,17 +1006,17 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
999
1006
|
warning: "bg-warning-500",
|
|
1000
1007
|
danger: "bg-danger-500",
|
|
1001
1008
|
info: "bg-info-500"
|
|
1002
|
-
}, n = r(() => [e[g.color]]),
|
|
1003
|
-
return (
|
|
1009
|
+
}, n = r(() => [e[g.color]]), u = r(() => [c[g.color]]);
|
|
1010
|
+
return (v, a) => t.type === "circular" ? (s(), l("div", {
|
|
1004
1011
|
key: 0,
|
|
1005
|
-
class:
|
|
1012
|
+
class: f(n.value)
|
|
1006
1013
|
}, [
|
|
1007
|
-
(s(),
|
|
1014
|
+
(s(), l("svg", {
|
|
1008
1015
|
class: "animate-spin",
|
|
1009
|
-
style:
|
|
1016
|
+
style: Q({ width: t.size, height: t.size }),
|
|
1010
1017
|
viewBox: "0 0 24 24"
|
|
1011
1018
|
}, [
|
|
1012
|
-
|
|
1019
|
+
o("circle", {
|
|
1013
1020
|
class: "opacity-25",
|
|
1014
1021
|
cx: "12",
|
|
1015
1022
|
cy: "12",
|
|
@@ -1017,42 +1024,42 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1017
1024
|
stroke: "currentColor",
|
|
1018
1025
|
"stroke-width": t.strokeWidth,
|
|
1019
1026
|
fill: "none"
|
|
1020
|
-
}, null, 8,
|
|
1021
|
-
a[0] || (a[0] =
|
|
1027
|
+
}, null, 8, Qt),
|
|
1028
|
+
a[0] || (a[0] = o("path", {
|
|
1022
1029
|
class: "opacity-75",
|
|
1023
1030
|
fill: "currentColor",
|
|
1024
1031
|
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"
|
|
1025
1032
|
}, null, -1))
|
|
1026
1033
|
], 4))
|
|
1027
|
-
], 2)) : t.type === "linear" ? (s(),
|
|
1034
|
+
], 2)) : t.type === "linear" ? (s(), l("div", {
|
|
1028
1035
|
key: 1,
|
|
1029
1036
|
class: "w-full",
|
|
1030
|
-
style:
|
|
1037
|
+
style: Q({ height: t.height })
|
|
1031
1038
|
}, [
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
class:
|
|
1035
|
-
style:
|
|
1039
|
+
o("div", Zt, [
|
|
1040
|
+
o("div", {
|
|
1041
|
+
class: f([[u.value, { "animate-linear-loader": t.progress === void 0 }], "h-full rounded-lg"]),
|
|
1042
|
+
style: Q({ width: t.progress !== void 0 ? `${Math.min(Math.max(t.progress, 0), 100)}%` : "100%" })
|
|
1036
1043
|
}, null, 6)
|
|
1037
1044
|
])
|
|
1038
|
-
], 4)) :
|
|
1045
|
+
], 4)) : y("", !0);
|
|
1039
1046
|
}
|
|
1040
|
-
}),
|
|
1047
|
+
}), Dl = /* @__PURE__ */ K(Xt, [["__scopeId", "data-v-f369fb46"]]), es = ["disabled", "aria-expanded"], ts = ["disabled", "onClick"], ss = {
|
|
1041
1048
|
key: 0,
|
|
1042
1049
|
class: "flex-shrink-0"
|
|
1043
|
-
},
|
|
1050
|
+
}, ls = ["innerHTML"], os = { class: "flex-1 min-w-0 mr-2" }, as = { class: "flex flex-col items-start" }, ns = ["title"], rs = ["title"], is = {
|
|
1044
1051
|
key: 1,
|
|
1045
1052
|
class: "flex-shrink-0"
|
|
1046
|
-
},
|
|
1053
|
+
}, ds = {
|
|
1047
1054
|
key: 0,
|
|
1048
1055
|
class: "text-xs text-secondary-400 font-mono whitespace-nowrap"
|
|
1049
|
-
},
|
|
1056
|
+
}, us = { key: 1 }, cs = {
|
|
1050
1057
|
key: 2,
|
|
1051
1058
|
class: "w-4 h-4 ml-2 flex-shrink-0",
|
|
1052
1059
|
fill: "none",
|
|
1053
1060
|
stroke: "currentColor",
|
|
1054
1061
|
viewBox: "0 0 24 24"
|
|
1055
|
-
},
|
|
1062
|
+
}, fs = /* @__PURE__ */ P({
|
|
1056
1063
|
__name: "Menu",
|
|
1057
1064
|
props: {
|
|
1058
1065
|
items: { default: () => [] },
|
|
@@ -1072,7 +1079,7 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1072
1079
|
},
|
|
1073
1080
|
emits: ["open", "close", "select"],
|
|
1074
1081
|
setup(t, { emit: g }) {
|
|
1075
|
-
const e = t, c = g, n =
|
|
1082
|
+
const e = t, c = g, n = L(!1), u = L(null), v = L(null), a = L({}), h = r(() => [
|
|
1076
1083
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
1077
1084
|
"bg-white border border-secondary-300 rounded-md text-secondary-700",
|
|
1078
1085
|
"hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
|
|
@@ -1083,249 +1090,249 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1083
1090
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
1084
1091
|
"flex flex-col",
|
|
1085
1092
|
"focus:outline-none"
|
|
1086
|
-
], `z-${e.zIndex}`].join(" ")), p = r(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), b = r(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"),
|
|
1087
|
-
const
|
|
1093
|
+
], `z-${e.zIndex}`].join(" ")), p = r(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), b = r(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), T = r(() => "py-1 overflow-y-auto flex-1 min-h-0"), B = r(() => "my-1 border-t border-secondary-200"), O = r(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), j = (d) => {
|
|
1094
|
+
const w = [
|
|
1088
1095
|
"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left",
|
|
1089
1096
|
"transition-all duration-150 focus:outline-none cursor-pointer",
|
|
1090
1097
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1091
|
-
], $ =
|
|
1098
|
+
], $ = d.variant || "default", J = {
|
|
1092
1099
|
default: "text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100",
|
|
1093
1100
|
danger: "text-danger-600 hover:bg-danger-100 hover:text-danger-700 focus:bg-danger-100",
|
|
1094
1101
|
success: "text-success-600 hover:bg-success-100 hover:text-success-700 focus:bg-success-100",
|
|
1095
1102
|
warning: "text-warning-600 hover:bg-warning-100 hover:text-warning-700 focus:bg-warning-100"
|
|
1096
1103
|
};
|
|
1097
|
-
let
|
|
1098
|
-
return
|
|
1104
|
+
let F = "";
|
|
1105
|
+
return d.color && (F = d.color, (d.color.includes("white") || d.color.includes("50")) && (F += " hover:text-black")), [...w, F || J[$]].join(" ");
|
|
1099
1106
|
}, S = () => {
|
|
1100
|
-
e.disabled || (n.value ?
|
|
1101
|
-
},
|
|
1107
|
+
e.disabled || (n.value ? k() : D());
|
|
1108
|
+
}, D = () => {
|
|
1102
1109
|
n.value = !0, c("open"), fe(() => {
|
|
1103
|
-
|
|
1110
|
+
M(), document.addEventListener("click", _), document.addEventListener("keydown", N);
|
|
1104
1111
|
});
|
|
1112
|
+
}, k = () => {
|
|
1113
|
+
n.value = !1, c("close"), document.removeEventListener("click", _), document.removeEventListener("keydown", N);
|
|
1114
|
+
}, I = (d) => {
|
|
1115
|
+
d.disabled || (d.action && d.action(), c("select", d), e.closeOnClick && !d.children && k());
|
|
1116
|
+
}, _ = (d) => {
|
|
1117
|
+
const w = d.target;
|
|
1118
|
+
u.value && !u.value.contains(w) && v.value && !v.value.contains(w) && k();
|
|
1119
|
+
}, N = (d) => {
|
|
1120
|
+
d.key === "Escape" && k();
|
|
1121
|
+
}, te = (d) => {
|
|
1122
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), S());
|
|
1105
1123
|
}, M = () => {
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
}, Y = (u) => {
|
|
1110
|
-
const I = u.target;
|
|
1111
|
-
d.value && !d.value.contains(I) && f.value && !f.value.contains(I) && M();
|
|
1112
|
-
}, H = (u) => {
|
|
1113
|
-
u.key === "Escape" && M();
|
|
1114
|
-
}, B = (u) => {
|
|
1115
|
-
(u.key === "Enter" || u.key === " ") && (u.preventDefault(), S());
|
|
1116
|
-
}, T = () => {
|
|
1117
|
-
if (!d.value || !f.value) return;
|
|
1118
|
-
const u = d.value.getBoundingClientRect(), I = f.value.getBoundingClientRect(), $ = window.innerWidth, G = window.innerHeight;
|
|
1119
|
-
let _ = 0, q = 0;
|
|
1124
|
+
if (!u.value || !v.value) return;
|
|
1125
|
+
const d = u.value.getBoundingClientRect(), w = v.value.getBoundingClientRect(), $ = window.innerWidth, J = window.innerHeight;
|
|
1126
|
+
let F = 0, A = 0;
|
|
1120
1127
|
switch (e.position) {
|
|
1121
1128
|
case "bottom-start":
|
|
1122
|
-
|
|
1129
|
+
F = d.bottom + e.offset.y, A = d.left + e.offset.x;
|
|
1123
1130
|
break;
|
|
1124
1131
|
case "bottom-end":
|
|
1125
|
-
|
|
1132
|
+
F = d.bottom + e.offset.y, A = d.right - w.width + e.offset.x;
|
|
1126
1133
|
break;
|
|
1127
1134
|
case "top-start":
|
|
1128
|
-
|
|
1135
|
+
F = d.top - w.height - e.offset.y, A = d.left + e.offset.x;
|
|
1129
1136
|
break;
|
|
1130
1137
|
case "top-end":
|
|
1131
|
-
|
|
1138
|
+
F = d.top - w.height - e.offset.y, A = d.right - w.width + e.offset.x;
|
|
1132
1139
|
break;
|
|
1133
1140
|
case "right-start":
|
|
1134
|
-
|
|
1141
|
+
F = d.top + e.offset.y, A = d.right + e.offset.x;
|
|
1135
1142
|
break;
|
|
1136
1143
|
case "right-end":
|
|
1137
|
-
|
|
1144
|
+
F = d.bottom - w.height + e.offset.y, A = d.right + e.offset.x;
|
|
1138
1145
|
break;
|
|
1139
1146
|
case "left-start":
|
|
1140
|
-
|
|
1147
|
+
F = d.top + e.offset.y, A = d.left - w.width - e.offset.x;
|
|
1141
1148
|
break;
|
|
1142
1149
|
case "left-end":
|
|
1143
|
-
|
|
1150
|
+
F = d.bottom - w.height + e.offset.y, A = d.left - w.width - e.offset.x;
|
|
1144
1151
|
break;
|
|
1145
1152
|
}
|
|
1146
|
-
|
|
1147
|
-
top: `${
|
|
1148
|
-
left: `${
|
|
1149
|
-
width: e.width === "auto" ? `${Math.max(
|
|
1153
|
+
A + w.width > $ && (A = $ - w.width - 8), A < 8 && (A = 8), F + w.height > J && (F = J - w.height - 8), F < 8 && (F = 8), a.value = {
|
|
1154
|
+
top: `${F}px`,
|
|
1155
|
+
left: `${A}px`,
|
|
1156
|
+
width: e.width === "auto" ? `${Math.max(d.width, 240)}px` : e.width,
|
|
1150
1157
|
maxHeight: e.maxHeight,
|
|
1151
1158
|
minWidth: "240px"
|
|
1152
1159
|
};
|
|
1153
1160
|
};
|
|
1154
|
-
return
|
|
1155
|
-
window.addEventListener("scroll",
|
|
1156
|
-
}),
|
|
1157
|
-
window.removeEventListener("scroll",
|
|
1161
|
+
return $e(() => {
|
|
1162
|
+
window.addEventListener("scroll", M, !0), window.addEventListener("resize", M);
|
|
1163
|
+
}), Ce(() => {
|
|
1164
|
+
window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M), document.removeEventListener("click", _), document.removeEventListener("keydown", N);
|
|
1158
1165
|
}), ve(() => e.items, () => {
|
|
1159
|
-
n.value && fe(
|
|
1160
|
-
}, { deep: !0 }), (
|
|
1161
|
-
class:
|
|
1166
|
+
n.value && fe(M);
|
|
1167
|
+
}, { deep: !0 }), (d, w) => (s(), l("div", {
|
|
1168
|
+
class: f(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
1162
1169
|
}, [
|
|
1163
|
-
|
|
1170
|
+
o("div", {
|
|
1164
1171
|
ref_key: "triggerRef",
|
|
1165
|
-
ref:
|
|
1172
|
+
ref: u
|
|
1166
1173
|
}, [
|
|
1167
|
-
|
|
1174
|
+
V(d.$slots, "trigger", {
|
|
1168
1175
|
isOpen: n.value,
|
|
1169
1176
|
toggle: S
|
|
1170
1177
|
}, () => [
|
|
1171
|
-
|
|
1178
|
+
o("button", {
|
|
1172
1179
|
type: "button",
|
|
1173
|
-
class:
|
|
1180
|
+
class: f(h.value),
|
|
1174
1181
|
disabled: t.disabled,
|
|
1175
1182
|
onClick: S,
|
|
1176
|
-
onKeydown:
|
|
1183
|
+
onKeydown: te,
|
|
1177
1184
|
tabindex: 0,
|
|
1178
1185
|
role: "button",
|
|
1179
1186
|
"aria-expanded": n.value,
|
|
1180
1187
|
"aria-haspopup": !0
|
|
1181
1188
|
}, [
|
|
1182
|
-
|
|
1183
|
-
|
|
1189
|
+
V(d.$slots, "trigger-content", {}, () => [
|
|
1190
|
+
q(x(t.triggerText), 1)
|
|
1184
1191
|
], !0),
|
|
1185
|
-
t.showChevron ? (s(),
|
|
1192
|
+
t.showChevron ? (s(), l("svg", {
|
|
1186
1193
|
key: 0,
|
|
1187
|
-
class:
|
|
1194
|
+
class: f(["w-4 h-4 ml-2 transition-transform", n.value ? "rotate-180" : ""]),
|
|
1188
1195
|
fill: "none",
|
|
1189
1196
|
stroke: "currentColor",
|
|
1190
1197
|
viewBox: "0 0 24 24"
|
|
1191
|
-
}, [...
|
|
1192
|
-
|
|
1198
|
+
}, [...w[1] || (w[1] = [
|
|
1199
|
+
o("path", {
|
|
1193
1200
|
"stroke-linecap": "round",
|
|
1194
1201
|
"stroke-linejoin": "round",
|
|
1195
1202
|
"stroke-width": "2",
|
|
1196
1203
|
d: "M19 9l-7 7-7-7"
|
|
1197
1204
|
}, null, -1)
|
|
1198
|
-
])], 2)) :
|
|
1199
|
-
], 42,
|
|
1205
|
+
])], 2)) : y("", !0)
|
|
1206
|
+
], 42, es)
|
|
1200
1207
|
], !0)
|
|
1201
1208
|
], 512),
|
|
1202
|
-
(s(),
|
|
1203
|
-
n.value ? (s(),
|
|
1209
|
+
(s(), ee(pe, { to: "body" }, [
|
|
1210
|
+
n.value ? (s(), l("div", {
|
|
1204
1211
|
key: 0,
|
|
1205
1212
|
ref_key: "menuRef",
|
|
1206
|
-
ref:
|
|
1207
|
-
class:
|
|
1208
|
-
style:
|
|
1209
|
-
onClick:
|
|
1213
|
+
ref: v,
|
|
1214
|
+
class: f(i.value),
|
|
1215
|
+
style: Q(a.value),
|
|
1216
|
+
onClick: w[0] || (w[0] = H(() => {
|
|
1210
1217
|
}, ["stop"]))
|
|
1211
1218
|
}, [
|
|
1212
|
-
|
|
1219
|
+
d.$slots.header ? (s(), l("div", {
|
|
1213
1220
|
key: 0,
|
|
1214
|
-
class:
|
|
1221
|
+
class: f(p.value)
|
|
1215
1222
|
}, [
|
|
1216
|
-
|
|
1217
|
-
], 2)) :
|
|
1218
|
-
|
|
1219
|
-
class:
|
|
1223
|
+
V(d.$slots, "header", { close: k }, void 0, !0)
|
|
1224
|
+
], 2)) : y("", !0),
|
|
1225
|
+
o("div", {
|
|
1226
|
+
class: f(T.value)
|
|
1220
1227
|
}, [
|
|
1221
|
-
|
|
1222
|
-
close:
|
|
1228
|
+
V(d.$slots, "default", {
|
|
1229
|
+
close: k,
|
|
1223
1230
|
isOpen: n.value
|
|
1224
1231
|
}, () => [
|
|
1225
|
-
(s(!0),
|
|
1226
|
-
key: $.id ||
|
|
1232
|
+
(s(!0), l(E, null, W(t.items, ($, J) => (s(), l(E, {
|
|
1233
|
+
key: $.id || J
|
|
1227
1234
|
}, [
|
|
1228
|
-
$.type === "divider" ? (s(),
|
|
1235
|
+
$.type === "divider" ? (s(), l("div", {
|
|
1229
1236
|
key: 0,
|
|
1230
|
-
class:
|
|
1231
|
-
}, null, 2)) : $.type === "header" ? (s(),
|
|
1237
|
+
class: f(B.value)
|
|
1238
|
+
}, null, 2)) : $.type === "header" ? (s(), l("div", {
|
|
1232
1239
|
key: 1,
|
|
1233
|
-
class:
|
|
1234
|
-
}, x($.label), 3)) : (s(),
|
|
1240
|
+
class: f(O.value)
|
|
1241
|
+
}, x($.label), 3)) : (s(), l("button", {
|
|
1235
1242
|
key: 2,
|
|
1236
1243
|
type: "button",
|
|
1237
|
-
class:
|
|
1244
|
+
class: f(j($)),
|
|
1238
1245
|
disabled: $.disabled,
|
|
1239
|
-
onClick: (
|
|
1246
|
+
onClick: (F) => I($)
|
|
1240
1247
|
}, [
|
|
1241
|
-
$.icon ||
|
|
1242
|
-
|
|
1243
|
-
typeof $.icon != "string" ? (s(),
|
|
1248
|
+
$.icon || d.$slots[`icon-${$.id}`] ? (s(), l("span", ss, [
|
|
1249
|
+
V(d.$slots, `icon-${$.id}`, { item: $ }, () => [
|
|
1250
|
+
typeof $.icon != "string" ? (s(), ee(Me($.icon), {
|
|
1244
1251
|
key: 0,
|
|
1245
1252
|
class: "w-5 h-5"
|
|
1246
|
-
})) : (s(),
|
|
1253
|
+
})) : (s(), l("span", {
|
|
1247
1254
|
key: 1,
|
|
1248
1255
|
innerHTML: $.icon,
|
|
1249
1256
|
class: "w-5 h-5 inline-block"
|
|
1250
|
-
}, null, 8,
|
|
1257
|
+
}, null, 8, ls))
|
|
1251
1258
|
], !0)
|
|
1252
|
-
])) :
|
|
1253
|
-
|
|
1254
|
-
|
|
1259
|
+
])) : y("", !0),
|
|
1260
|
+
o("div", os, [
|
|
1261
|
+
V(d.$slots, `item-${$.id}`, {
|
|
1255
1262
|
item: $,
|
|
1256
|
-
close:
|
|
1263
|
+
close: k
|
|
1257
1264
|
}, () => [
|
|
1258
|
-
|
|
1259
|
-
|
|
1265
|
+
o("div", as, [
|
|
1266
|
+
o("span", {
|
|
1260
1267
|
class: "truncate w-full",
|
|
1261
1268
|
title: $.label
|
|
1262
|
-
}, x($.label), 9,
|
|
1263
|
-
$.description ? (s(),
|
|
1269
|
+
}, x($.label), 9, ns),
|
|
1270
|
+
$.description ? (s(), l("span", {
|
|
1264
1271
|
key: 0,
|
|
1265
1272
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
1266
1273
|
title: $.description
|
|
1267
|
-
}, x($.description), 9,
|
|
1274
|
+
}, x($.description), 9, rs)) : y("", !0)
|
|
1268
1275
|
])
|
|
1269
1276
|
], !0)
|
|
1270
1277
|
]),
|
|
1271
|
-
$.suffix || $.shortcut ||
|
|
1272
|
-
|
|
1273
|
-
$.shortcut ? (s(),
|
|
1278
|
+
$.suffix || $.shortcut || d.$slots[`suffix-${$.id}`] ? (s(), l("span", is, [
|
|
1279
|
+
V(d.$slots, `suffix-${$.id}`, { item: $ }, () => [
|
|
1280
|
+
$.shortcut ? (s(), l("span", ds, x($.shortcut), 1)) : $.suffix ? (s(), l("span", us, x($.suffix), 1)) : y("", !0)
|
|
1274
1281
|
], !0)
|
|
1275
|
-
])) :
|
|
1276
|
-
$.children && $.children.length > 0 ? (s(),
|
|
1277
|
-
|
|
1282
|
+
])) : y("", !0),
|
|
1283
|
+
$.children && $.children.length > 0 ? (s(), l("svg", cs, [...w[2] || (w[2] = [
|
|
1284
|
+
o("path", {
|
|
1278
1285
|
"stroke-linecap": "round",
|
|
1279
1286
|
"stroke-linejoin": "round",
|
|
1280
1287
|
"stroke-width": "2",
|
|
1281
1288
|
d: "M9 5l7 7-7 7"
|
|
1282
1289
|
}, null, -1)
|
|
1283
|
-
])])) :
|
|
1284
|
-
], 10,
|
|
1290
|
+
])])) : y("", !0)
|
|
1291
|
+
], 10, ts))
|
|
1285
1292
|
], 64))), 128))
|
|
1286
1293
|
], !0)
|
|
1287
1294
|
], 2),
|
|
1288
|
-
|
|
1295
|
+
d.$slots.footer ? (s(), l("div", {
|
|
1289
1296
|
key: 1,
|
|
1290
|
-
class:
|
|
1297
|
+
class: f(b.value)
|
|
1291
1298
|
}, [
|
|
1292
|
-
|
|
1293
|
-
], 2)) :
|
|
1294
|
-
], 6)) :
|
|
1295
|
-
n.value && t.overlay ? (s(),
|
|
1299
|
+
V(d.$slots, "footer", { close: k }, void 0, !0)
|
|
1300
|
+
], 2)) : y("", !0)
|
|
1301
|
+
], 6)) : y("", !0),
|
|
1302
|
+
n.value && t.overlay ? (s(), l("div", {
|
|
1296
1303
|
key: 1,
|
|
1297
1304
|
class: "fixed inset-0 bg-black/20 z-40",
|
|
1298
|
-
onClick:
|
|
1299
|
-
})) :
|
|
1305
|
+
onClick: k
|
|
1306
|
+
})) : y("", !0)
|
|
1300
1307
|
]))
|
|
1301
1308
|
], 2));
|
|
1302
1309
|
}
|
|
1303
|
-
}),
|
|
1310
|
+
}), Bl = /* @__PURE__ */ K(fs, [["__scopeId", "data-v-61176297"]]), vs = ["for"], ps = {
|
|
1304
1311
|
key: 0,
|
|
1305
1312
|
class: "text-danger-600"
|
|
1306
|
-
},
|
|
1313
|
+
}, bs = ["id", "disabled", "aria-expanded"], gs = { class: "flex-1 text-left truncate" }, ms = {
|
|
1307
1314
|
key: 0,
|
|
1308
1315
|
class: "p-2 border-b border-secondary-200"
|
|
1309
|
-
},
|
|
1316
|
+
}, ys = ["placeholder"], hs = { class: "max-h-64 overflow-y-auto" }, xs = {
|
|
1310
1317
|
key: 0,
|
|
1311
1318
|
class: "px-4 py-3 text-sm text-secondary-500 text-center"
|
|
1312
|
-
},
|
|
1319
|
+
}, ws = ["onClick"], ks = { class: "flex items-center justify-between w-full" }, $s = { class: "truncate" }, Cs = {
|
|
1313
1320
|
key: 0,
|
|
1314
1321
|
class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
|
|
1315
1322
|
fill: "none",
|
|
1316
1323
|
stroke: "currentColor",
|
|
1317
1324
|
viewBox: "0 0 24 24",
|
|
1318
1325
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1319
|
-
},
|
|
1326
|
+
}, Ms = {
|
|
1320
1327
|
key: 0,
|
|
1321
1328
|
class: "border-t border-secondary-200 my-1"
|
|
1322
|
-
},
|
|
1329
|
+
}, Ds = ["onClick"], Bs = ["innerHTML"], zs = {
|
|
1323
1330
|
key: 1,
|
|
1324
1331
|
class: "mt-1 text-sm text-danger-600"
|
|
1325
|
-
},
|
|
1332
|
+
}, Vs = {
|
|
1326
1333
|
key: 2,
|
|
1327
1334
|
class: "mt-1 text-sm text-secondary-600"
|
|
1328
|
-
},
|
|
1335
|
+
}, Ts = /* @__PURE__ */ P({
|
|
1329
1336
|
__name: "Select",
|
|
1330
1337
|
props: {
|
|
1331
1338
|
modelValue: { default: null },
|
|
@@ -1343,170 +1350,173 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1343
1350
|
error: { default: "" },
|
|
1344
1351
|
helperText: { default: "" },
|
|
1345
1352
|
fullWidth: { type: Boolean, default: !1 },
|
|
1346
|
-
menuPosition: { default: "bottom" }
|
|
1353
|
+
menuPosition: { default: "bottom" },
|
|
1354
|
+
bordered: { type: Boolean, default: !0 }
|
|
1347
1355
|
},
|
|
1348
1356
|
emits: ["update:modelValue", "change", "action"],
|
|
1349
1357
|
setup(t, { emit: g }) {
|
|
1350
|
-
const e = t, c = g, n =
|
|
1358
|
+
const e = t, c = g, n = L(!1), u = L(""), v = L(null), a = r(
|
|
1351
1359
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
1352
|
-
), h = r(() => e.options.find((
|
|
1353
|
-
if (!e.searchable || !
|
|
1360
|
+
), h = r(() => e.options.find((M) => M.value === e.modelValue) || null), i = r(() => {
|
|
1361
|
+
if (!e.searchable || !u.value)
|
|
1354
1362
|
return e.options;
|
|
1355
|
-
const
|
|
1356
|
-
return e.options.filter((
|
|
1357
|
-
}), p = r(() => "block text-sm font-semibold text-secondary-700 mb-1"), b = r(() => {
|
|
1358
|
-
const
|
|
1363
|
+
const M = u.value.toLowerCase();
|
|
1364
|
+
return e.options.filter((d) => d.label.toLowerCase().includes(M));
|
|
1365
|
+
}), p = r(() => "block text-sm font-semibold text-secondary-700 mb-1"), b = r(() => e.bordered ? "border border-neutral-300 rounded-md" : "rounded-md"), T = r(() => {
|
|
1366
|
+
const M = "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 = {
|
|
1359
1367
|
sm: "px-3 py-1.5 text-sm",
|
|
1360
1368
|
md: "px-4 py-2 text-base",
|
|
1361
1369
|
lg: "px-5 py-3 text-lg"
|
|
1362
|
-
},
|
|
1363
|
-
default: "bg-white
|
|
1364
|
-
outline: "bg-transparent
|
|
1365
|
-
filled: "bg-secondary-100
|
|
1366
|
-
},
|
|
1370
|
+
}, w = {
|
|
1371
|
+
default: "bg-white",
|
|
1372
|
+
outline: "bg-transparent",
|
|
1373
|
+
filled: "bg-secondary-100"
|
|
1374
|
+
}, $ = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
1367
1375
|
return [
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1376
|
+
M,
|
|
1377
|
+
d[e.size],
|
|
1378
|
+
w[e.variant],
|
|
1379
|
+
$
|
|
1372
1380
|
].join(" ");
|
|
1373
|
-
}),
|
|
1374
|
-
const
|
|
1375
|
-
return [
|
|
1376
|
-
},
|
|
1377
|
-
const
|
|
1378
|
-
return
|
|
1379
|
-
},
|
|
1381
|
+
}), B = 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`), O = (M) => {
|
|
1382
|
+
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", w = S(M) ? "bg-primary-50" : "";
|
|
1383
|
+
return [d, w].join(" ");
|
|
1384
|
+
}, j = (M) => {
|
|
1385
|
+
const d = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
|
|
1386
|
+
return M.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`;
|
|
1387
|
+
}, S = (M) => M.value === e.modelValue, D = () => {
|
|
1380
1388
|
e.disabled || (n.value = !n.value, n.value && e.searchable && fe(() => {
|
|
1381
|
-
var
|
|
1382
|
-
(
|
|
1389
|
+
var M;
|
|
1390
|
+
(M = v.value) == null || M.focus();
|
|
1383
1391
|
}));
|
|
1384
1392
|
}, k = () => {
|
|
1385
|
-
n.value = !1,
|
|
1386
|
-
},
|
|
1387
|
-
|
|
1388
|
-
},
|
|
1389
|
-
|
|
1390
|
-
},
|
|
1391
|
-
const
|
|
1392
|
-
|
|
1393
|
+
n.value = !1, u.value = "";
|
|
1394
|
+
}, I = (M) => {
|
|
1395
|
+
M.disabled || (c("update:modelValue", M.value), c("change", M), k());
|
|
1396
|
+
}, _ = (M) => {
|
|
1397
|
+
M.action && M.action(), c("action", M), k();
|
|
1398
|
+
}, N = (M) => {
|
|
1399
|
+
const d = M.relatedTarget;
|
|
1400
|
+
d && d.closest(".select-wrapper") || setTimeout(() => {
|
|
1393
1401
|
k();
|
|
1394
1402
|
}, 200);
|
|
1395
|
-
},
|
|
1396
|
-
|
|
1403
|
+
}, te = (M) => {
|
|
1404
|
+
M.key === "Escape" ? k() : (M.key === "Enter" || M.key === " ") && (M.preventDefault(), D());
|
|
1397
1405
|
};
|
|
1398
|
-
return ve(n, (
|
|
1399
|
-
|
|
1400
|
-
}), (
|
|
1401
|
-
class:
|
|
1406
|
+
return ve(n, (M) => {
|
|
1407
|
+
M && (u.value = "");
|
|
1408
|
+
}), (M, d) => (s(), l("div", {
|
|
1409
|
+
class: f(["select-wrapper", { "w-full": t.fullWidth }])
|
|
1402
1410
|
}, [
|
|
1403
|
-
t.label ? (s(),
|
|
1411
|
+
t.label ? (s(), l("label", {
|
|
1404
1412
|
key: 0,
|
|
1405
1413
|
for: a.value,
|
|
1406
|
-
class:
|
|
1414
|
+
class: f(p.value)
|
|
1415
|
+
}, [
|
|
1416
|
+
q(x(t.label) + " ", 1),
|
|
1417
|
+
t.required ? (s(), l("span", ps, "*")) : y("", !0)
|
|
1418
|
+
], 10, vs)) : y("", !0),
|
|
1419
|
+
o("div", {
|
|
1420
|
+
class: f(["relative", b.value])
|
|
1407
1421
|
}, [
|
|
1408
|
-
|
|
1409
|
-
t.required ? (s(), o("span", gs, "*")) : m("", !0)
|
|
1410
|
-
], 10, bs)) : m("", !0),
|
|
1411
|
-
l("div", ys, [
|
|
1412
|
-
l("button", {
|
|
1422
|
+
o("button", {
|
|
1413
1423
|
id: a.value,
|
|
1414
1424
|
type: "button",
|
|
1415
|
-
class:
|
|
1425
|
+
class: f(T.value),
|
|
1416
1426
|
disabled: t.disabled,
|
|
1417
1427
|
"aria-expanded": n.value,
|
|
1418
1428
|
"aria-haspopup": !0,
|
|
1419
|
-
onClick:
|
|
1420
|
-
onBlur:
|
|
1421
|
-
onKeydown:
|
|
1429
|
+
onClick: D,
|
|
1430
|
+
onBlur: N,
|
|
1431
|
+
onKeydown: te
|
|
1422
1432
|
}, [
|
|
1423
|
-
|
|
1424
|
-
(s(),
|
|
1425
|
-
class:
|
|
1433
|
+
o("span", gs, x(h.value ? h.value.label : t.placeholder), 1),
|
|
1434
|
+
(s(), l("svg", {
|
|
1435
|
+
class: f(["w-5 h-5 flex-shrink-0 transition-transform text-secondary-600", n.value ? "rotate-180" : ""]),
|
|
1426
1436
|
fill: "none",
|
|
1427
1437
|
stroke: "currentColor",
|
|
1428
1438
|
viewBox: "0 0 24 24",
|
|
1429
1439
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1430
|
-
}, [...
|
|
1431
|
-
|
|
1440
|
+
}, [...d[3] || (d[3] = [
|
|
1441
|
+
o("path", {
|
|
1432
1442
|
"stroke-linecap": "round",
|
|
1433
1443
|
"stroke-linejoin": "round",
|
|
1434
1444
|
"stroke-width": "2",
|
|
1435
1445
|
d: "M19 9l-7 7-7-7"
|
|
1436
1446
|
}, null, -1)
|
|
1437
1447
|
])], 2))
|
|
1438
|
-
], 42,
|
|
1439
|
-
n.value ? (s(),
|
|
1448
|
+
], 42, bs),
|
|
1449
|
+
n.value ? (s(), l("div", {
|
|
1440
1450
|
key: 0,
|
|
1441
|
-
class:
|
|
1442
|
-
onClick:
|
|
1451
|
+
class: f(B.value),
|
|
1452
|
+
onClick: d[2] || (d[2] = H(() => {
|
|
1443
1453
|
}, ["stop"]))
|
|
1444
1454
|
}, [
|
|
1445
|
-
t.searchable ? (s(),
|
|
1446
|
-
ue(
|
|
1455
|
+
t.searchable ? (s(), l("div", ms, [
|
|
1456
|
+
ue(o("input", {
|
|
1447
1457
|
ref_key: "searchInput",
|
|
1448
|
-
ref:
|
|
1449
|
-
"onUpdate:modelValue":
|
|
1458
|
+
ref: v,
|
|
1459
|
+
"onUpdate:modelValue": d[0] || (d[0] = (w) => u.value = w),
|
|
1450
1460
|
type: "text",
|
|
1451
1461
|
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",
|
|
1452
1462
|
placeholder: t.searchPlaceholder,
|
|
1453
|
-
onKeydown:
|
|
1463
|
+
onKeydown: d[1] || (d[1] = H(() => {
|
|
1454
1464
|
}, ["stop"]))
|
|
1455
|
-
}, null, 40,
|
|
1456
|
-
[
|
|
1465
|
+
}, null, 40, ys), [
|
|
1466
|
+
[Ae, u.value]
|
|
1457
1467
|
])
|
|
1458
|
-
])) :
|
|
1459
|
-
|
|
1460
|
-
i.value.length === 0 ? (s(),
|
|
1461
|
-
(s(!0),
|
|
1462
|
-
key:
|
|
1468
|
+
])) : y("", !0),
|
|
1469
|
+
o("div", hs, [
|
|
1470
|
+
i.value.length === 0 ? (s(), l("div", xs, x(t.emptyText), 1)) : (s(), l(E, { key: 1 }, [
|
|
1471
|
+
(s(!0), l(E, null, W(i.value, (w) => (s(), l("button", {
|
|
1472
|
+
key: w.value,
|
|
1463
1473
|
type: "button",
|
|
1464
|
-
class:
|
|
1465
|
-
onClick: (
|
|
1474
|
+
class: f(O(w)),
|
|
1475
|
+
onClick: ($) => I(w)
|
|
1466
1476
|
}, [
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1477
|
+
o("div", ks, [
|
|
1478
|
+
o("span", $s, x(w.label), 1),
|
|
1479
|
+
S(w) ? (s(), l("svg", Cs, [...d[4] || (d[4] = [
|
|
1480
|
+
o("path", {
|
|
1471
1481
|
"stroke-linecap": "round",
|
|
1472
1482
|
"stroke-linejoin": "round",
|
|
1473
1483
|
"stroke-width": "2",
|
|
1474
1484
|
d: "M5 13l4 4L19 7"
|
|
1475
1485
|
}, null, -1)
|
|
1476
|
-
])])) :
|
|
1486
|
+
])])) : y("", !0)
|
|
1477
1487
|
])
|
|
1478
|
-
], 10,
|
|
1479
|
-
t.actionItems.length > 0 ? (s(),
|
|
1480
|
-
(s(!0),
|
|
1481
|
-
key:
|
|
1488
|
+
], 10, ws))), 128)),
|
|
1489
|
+
t.actionItems.length > 0 ? (s(), l("div", Ms)) : y("", !0),
|
|
1490
|
+
(s(!0), l(E, null, W(t.actionItems, (w) => (s(), l("button", {
|
|
1491
|
+
key: w.id,
|
|
1482
1492
|
type: "button",
|
|
1483
|
-
class:
|
|
1484
|
-
onClick: (
|
|
1493
|
+
class: f(j(w)),
|
|
1494
|
+
onClick: ($) => _(w)
|
|
1485
1495
|
}, [
|
|
1486
|
-
|
|
1496
|
+
w.icon ? (s(), l("svg", {
|
|
1487
1497
|
key: 0,
|
|
1488
1498
|
class: "w-4 h-4 flex-shrink-0",
|
|
1489
1499
|
fill: "none",
|
|
1490
1500
|
stroke: "currentColor",
|
|
1491
1501
|
viewBox: "0 0 24 24",
|
|
1492
1502
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1493
|
-
innerHTML:
|
|
1494
|
-
}, null, 8,
|
|
1495
|
-
|
|
1496
|
-
], 10,
|
|
1503
|
+
innerHTML: w.icon
|
|
1504
|
+
}, null, 8, Bs)) : y("", !0),
|
|
1505
|
+
q(" " + x(w.label), 1)
|
|
1506
|
+
], 10, Ds))), 128))
|
|
1497
1507
|
], 64))
|
|
1498
1508
|
])
|
|
1499
|
-
], 2)) :
|
|
1500
|
-
]),
|
|
1501
|
-
t.error ? (s(),
|
|
1502
|
-
n.value ? (s(),
|
|
1509
|
+
], 2)) : y("", !0)
|
|
1510
|
+
], 2),
|
|
1511
|
+
t.error ? (s(), l("p", zs, x(t.error), 1)) : t.helperText ? (s(), l("p", Vs, x(t.helperText), 1)) : y("", !0),
|
|
1512
|
+
n.value ? (s(), l("div", {
|
|
1503
1513
|
key: 3,
|
|
1504
1514
|
onClick: k,
|
|
1505
1515
|
class: "fixed inset-0 z-40"
|
|
1506
|
-
})) :
|
|
1516
|
+
})) : y("", !0)
|
|
1507
1517
|
], 2));
|
|
1508
1518
|
}
|
|
1509
|
-
}),
|
|
1519
|
+
}), zl = /* @__PURE__ */ K(Ts, [["__scopeId", "data-v-edef6efe"]]), Ss = /* @__PURE__ */ P({
|
|
1510
1520
|
__name: "Sidebar",
|
|
1511
1521
|
props: {
|
|
1512
1522
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1524,12 +1534,12 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1524
1534
|
setup(t, { emit: g }) {
|
|
1525
1535
|
const e = t, c = g, n = r({
|
|
1526
1536
|
get: () => e.modelValue,
|
|
1527
|
-
set: (
|
|
1528
|
-
}),
|
|
1537
|
+
set: (B) => c("update:modelValue", B)
|
|
1538
|
+
}), u = () => {
|
|
1529
1539
|
e.persistent || (n.value = !1, c("close"));
|
|
1530
|
-
},
|
|
1531
|
-
const
|
|
1532
|
-
return [
|
|
1540
|
+
}, v = r(() => e.position === "left" ? "slide-right" : "slide-left"), a = r(() => {
|
|
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
|
+
return [B, O, j].filter(Boolean).join(" ");
|
|
1533
1543
|
}), h = r(() => ({
|
|
1534
1544
|
// Base fluid width; respect custom width as max constraint
|
|
1535
1545
|
width: "100%",
|
|
@@ -1542,82 +1552,82 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1542
1552
|
sm: "p-2",
|
|
1543
1553
|
md: "p-4",
|
|
1544
1554
|
lg: "p-6"
|
|
1545
|
-
}, p = r(() => `flex items-center justify-between border-b border-gray-200 ${i[e.padding]}`), b = r(() => `flex-1 overflow-y-auto ${i[e.padding]}`),
|
|
1546
|
-
return (
|
|
1547
|
-
|
|
1555
|
+
}, p = r(() => `flex items-center justify-between border-b border-gray-200 ${i[e.padding]}`), b = r(() => `flex-1 overflow-y-auto ${i[e.padding]}`), T = r(() => `border-t border-gray-200 ${i[e.padding]}`);
|
|
1556
|
+
return (B, O) => (s(), ee(pe, { to: "body" }, [
|
|
1557
|
+
G(ce, { name: "fade" }, {
|
|
1548
1558
|
default: ae(() => [
|
|
1549
|
-
n.value && t.overlay ? (s(),
|
|
1559
|
+
n.value && t.overlay ? (s(), l("div", {
|
|
1550
1560
|
key: 0,
|
|
1551
|
-
onClick:
|
|
1561
|
+
onClick: u,
|
|
1552
1562
|
class: "fixed inset-0 bg-black/50 z-40",
|
|
1553
|
-
style:
|
|
1554
|
-
}, null, 4)) :
|
|
1563
|
+
style: Q({ top: t.overlayTop })
|
|
1564
|
+
}, null, 4)) : y("", !0)
|
|
1555
1565
|
]),
|
|
1556
1566
|
_: 1
|
|
1557
1567
|
}),
|
|
1558
|
-
|
|
1568
|
+
G(ce, { name: v.value }, {
|
|
1559
1569
|
default: ae(() => [
|
|
1560
|
-
n.value ? (s(),
|
|
1570
|
+
n.value ? (s(), l("aside", {
|
|
1561
1571
|
key: 0,
|
|
1562
|
-
class:
|
|
1563
|
-
style:
|
|
1572
|
+
class: f(a.value),
|
|
1573
|
+
style: Q(h.value)
|
|
1564
1574
|
}, [
|
|
1565
|
-
|
|
1575
|
+
B.$slots.header ? (s(), l("div", {
|
|
1566
1576
|
key: 0,
|
|
1567
|
-
class:
|
|
1577
|
+
class: f(p.value)
|
|
1568
1578
|
}, [
|
|
1569
|
-
|
|
1570
|
-
t.closable ? (s(),
|
|
1579
|
+
V(B.$slots, "header", {}, void 0, !0),
|
|
1580
|
+
t.closable ? (s(), l("button", {
|
|
1571
1581
|
key: 0,
|
|
1572
|
-
onClick:
|
|
1582
|
+
onClick: u,
|
|
1573
1583
|
class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
|
|
1574
1584
|
"aria-label": "Cerrar menú"
|
|
1575
|
-
}, [...
|
|
1576
|
-
|
|
1585
|
+
}, [...O[0] || (O[0] = [
|
|
1586
|
+
o("svg", {
|
|
1577
1587
|
class: "w-5 h-5",
|
|
1578
1588
|
fill: "none",
|
|
1579
1589
|
stroke: "currentColor",
|
|
1580
1590
|
viewBox: "0 0 24 24"
|
|
1581
1591
|
}, [
|
|
1582
|
-
|
|
1592
|
+
o("path", {
|
|
1583
1593
|
"stroke-linecap": "round",
|
|
1584
1594
|
"stroke-linejoin": "round",
|
|
1585
1595
|
"stroke-width": "2",
|
|
1586
1596
|
d: "M6 18L18 6M6 6l12 12"
|
|
1587
1597
|
})
|
|
1588
1598
|
], -1)
|
|
1589
|
-
])])) :
|
|
1590
|
-
], 2)) :
|
|
1591
|
-
|
|
1592
|
-
class:
|
|
1599
|
+
])])) : y("", !0)
|
|
1600
|
+
], 2)) : y("", !0),
|
|
1601
|
+
o("div", {
|
|
1602
|
+
class: f(b.value)
|
|
1593
1603
|
}, [
|
|
1594
|
-
|
|
1604
|
+
V(B.$slots, "default", {}, void 0, !0)
|
|
1595
1605
|
], 2),
|
|
1596
|
-
|
|
1606
|
+
B.$slots.footer ? (s(), l("div", {
|
|
1597
1607
|
key: 1,
|
|
1598
|
-
class:
|
|
1608
|
+
class: f(T.value)
|
|
1599
1609
|
}, [
|
|
1600
|
-
|
|
1601
|
-
], 2)) :
|
|
1602
|
-
], 6)) :
|
|
1610
|
+
V(B.$slots, "footer", {}, void 0, !0)
|
|
1611
|
+
], 2)) : y("", !0)
|
|
1612
|
+
], 6)) : y("", !0)
|
|
1603
1613
|
]),
|
|
1604
1614
|
_: 3
|
|
1605
1615
|
}, 8, ["name"])
|
|
1606
1616
|
]));
|
|
1607
1617
|
}
|
|
1608
|
-
}),
|
|
1618
|
+
}), Vl = /* @__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 = {
|
|
1609
1619
|
key: 0,
|
|
1610
1620
|
class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
|
|
1611
|
-
},
|
|
1621
|
+
}, _s = { class: "hidden md:block w-full overflow-x-auto" }, Ys = { class: "w-full border-collapse" }, As = { class: "w-full" }, Es = ["onClick"], Ps = { class: "flex items-center gap-2" }, qs = {
|
|
1612
1622
|
key: 0,
|
|
1613
1623
|
class: "text-xs text-gray-400"
|
|
1614
|
-
},
|
|
1624
|
+
}, Rs = { key: 0 }, Ns = { key: 1 }, Ws = { class: "w-full" }, Hs = {
|
|
1615
1625
|
key: 0,
|
|
1616
1626
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
1617
|
-
},
|
|
1627
|
+
}, Ks = {
|
|
1618
1628
|
key: 0,
|
|
1619
1629
|
class: "w-full px-6 py-4 bg-white"
|
|
1620
|
-
},
|
|
1630
|
+
}, Us = /* @__PURE__ */ P({
|
|
1621
1631
|
__name: "Table",
|
|
1622
1632
|
props: {
|
|
1623
1633
|
columns: {},
|
|
@@ -1628,9 +1638,9 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1628
1638
|
rowClass: { default: void 0 }
|
|
1629
1639
|
},
|
|
1630
1640
|
setup(t) {
|
|
1631
|
-
const g = t, e =
|
|
1641
|
+
const g = t, e = L(null), c = L("asc"), n = (a) => {
|
|
1632
1642
|
e.value === a ? c.value = c.value === "asc" ? "desc" : "asc" : (e.value = a, c.value = "asc");
|
|
1633
|
-
},
|
|
1643
|
+
}, u = r(() => {
|
|
1634
1644
|
if (!e.value)
|
|
1635
1645
|
return g.data;
|
|
1636
1646
|
const a = [...g.data];
|
|
@@ -1638,102 +1648,102 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1638
1648
|
const p = h[e.value], b = i[e.value];
|
|
1639
1649
|
return typeof p == "string" && typeof b == "string" ? c.value === "asc" ? p.localeCompare(b) : b.localeCompare(p) : typeof p == "number" && typeof b == "number" ? c.value === "asc" ? p - b : b - p : 0;
|
|
1640
1650
|
}), a;
|
|
1641
|
-
}),
|
|
1642
|
-
return (a, h) => (s(),
|
|
1643
|
-
|
|
1644
|
-
(s(!0),
|
|
1651
|
+
}), v = r(() => g.columns.filter((a) => !a.hideOnMobile));
|
|
1652
|
+
return (a, h) => (s(), l("div", Is, [
|
|
1653
|
+
o("div", js, [
|
|
1654
|
+
(s(!0), l(E, null, W(u.value, (i, p) => (s(), l("div", {
|
|
1645
1655
|
key: `card-${p}`,
|
|
1646
1656
|
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
1647
1657
|
}, [
|
|
1648
|
-
(s(!0),
|
|
1658
|
+
(s(!0), l(E, null, W(v.value, (b) => (s(), l("div", {
|
|
1649
1659
|
key: `card-${p}-${b.key}`,
|
|
1650
1660
|
class: "flex flex-col gap-1 py-1"
|
|
1651
1661
|
}, [
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1662
|
+
o("span", Ls, x(b.label), 1),
|
|
1663
|
+
o("span", Os, [
|
|
1664
|
+
V(a.$slots, `cell-${b.key}`, {
|
|
1655
1665
|
value: i[b.key],
|
|
1656
1666
|
row: i
|
|
1657
1667
|
}, () => [
|
|
1658
|
-
|
|
1668
|
+
q(x(i[b.key]), 1)
|
|
1659
1669
|
], !0)
|
|
1660
1670
|
])
|
|
1661
1671
|
]))), 128))
|
|
1662
1672
|
]))), 128)),
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
h[0] || (h[0] =
|
|
1673
|
+
u.value.length === 0 ? (s(), l("div", Fs, [
|
|
1674
|
+
V(a.$slots, "empty", {}, () => [
|
|
1675
|
+
h[0] || (h[0] = q("No hay datos disponibles", -1))
|
|
1666
1676
|
], !0)
|
|
1667
|
-
])) :
|
|
1677
|
+
])) : y("", !0)
|
|
1668
1678
|
]),
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
class:
|
|
1679
|
+
o("div", _s, [
|
|
1680
|
+
o("table", Ys, [
|
|
1681
|
+
o("thead", As, [
|
|
1682
|
+
o("tr", {
|
|
1683
|
+
class: f([
|
|
1674
1684
|
"w-full",
|
|
1675
1685
|
g.headerClass || "bg-neutral-50 border-b border-gray-100"
|
|
1676
1686
|
])
|
|
1677
1687
|
}, [
|
|
1678
|
-
(s(!0),
|
|
1688
|
+
(s(!0), l(E, null, W(t.columns, (i) => (s(), l("th", {
|
|
1679
1689
|
key: i.key,
|
|
1680
|
-
style:
|
|
1681
|
-
class:
|
|
1690
|
+
style: Q(i.width ? { width: i.width } : {}),
|
|
1691
|
+
class: f([
|
|
1682
1692
|
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
1683
1693
|
i.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
1684
1694
|
g.headerCellClass
|
|
1685
1695
|
]),
|
|
1686
1696
|
onClick: (p) => i.sortable && n(i.key)
|
|
1687
1697
|
}, [
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
i.sortable ? (s(),
|
|
1691
|
-
e.value !== i.key ? (s(),
|
|
1692
|
-
])) :
|
|
1698
|
+
o("div", Ps, [
|
|
1699
|
+
o("span", null, x(i.label), 1),
|
|
1700
|
+
i.sortable ? (s(), l("span", qs, [
|
|
1701
|
+
e.value !== i.key ? (s(), l("span", Rs, "⇅")) : (s(), l("span", Ns, x(c.value === "asc" ? "↑" : "↓"), 1))
|
|
1702
|
+
])) : y("", !0)
|
|
1693
1703
|
])
|
|
1694
|
-
], 14,
|
|
1704
|
+
], 14, Es))), 128))
|
|
1695
1705
|
], 2)
|
|
1696
1706
|
]),
|
|
1697
|
-
|
|
1698
|
-
(s(!0),
|
|
1707
|
+
o("tbody", Ws, [
|
|
1708
|
+
(s(!0), l(E, null, W(u.value, (i, p) => (s(), l("tr", {
|
|
1699
1709
|
key: p,
|
|
1700
|
-
class:
|
|
1710
|
+
class: f([
|
|
1701
1711
|
"w-full border-b border-gray-200 hover:bg-gray-50 transition-colors",
|
|
1702
1712
|
g.rowClass
|
|
1703
1713
|
])
|
|
1704
1714
|
}, [
|
|
1705
|
-
(s(!0),
|
|
1715
|
+
(s(!0), l(E, null, W(t.columns, (b) => (s(), l("td", {
|
|
1706
1716
|
key: `${p}-${b.key}`,
|
|
1707
|
-
class:
|
|
1717
|
+
class: f([
|
|
1708
1718
|
"px-4 py-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
|
|
1709
1719
|
g.cellClass
|
|
1710
1720
|
])
|
|
1711
1721
|
}, [
|
|
1712
|
-
|
|
1722
|
+
V(a.$slots, `cell-${b.key}`, {
|
|
1713
1723
|
value: i[b.key],
|
|
1714
1724
|
row: i
|
|
1715
1725
|
}, () => [
|
|
1716
|
-
|
|
1726
|
+
q(x(i[b.key]), 1)
|
|
1717
1727
|
], !0)
|
|
1718
1728
|
], 2))), 128))
|
|
1719
1729
|
], 2))), 128))
|
|
1720
1730
|
])
|
|
1721
1731
|
]),
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
h[1] || (h[1] =
|
|
1732
|
+
u.value.length === 0 ? (s(), l("div", Hs, [
|
|
1733
|
+
V(a.$slots, "empty", {}, () => [
|
|
1734
|
+
h[1] || (h[1] = q("No hay datos disponibles", -1))
|
|
1725
1735
|
], !0)
|
|
1726
|
-
])) :
|
|
1736
|
+
])) : y("", !0)
|
|
1727
1737
|
]),
|
|
1728
|
-
a.$slots.footer ? (s(),
|
|
1729
|
-
|
|
1730
|
-
])) :
|
|
1738
|
+
a.$slots.footer ? (s(), l("div", Ks, [
|
|
1739
|
+
V(a.$slots, "footer", {}, void 0, !0)
|
|
1740
|
+
])) : y("", !0)
|
|
1731
1741
|
]));
|
|
1732
1742
|
}
|
|
1733
|
-
}),
|
|
1743
|
+
}), Tl = /* @__PURE__ */ K(Us, [["__scopeId", "data-v-8e7ce66d"]]), Js = { class: "w-full" }, Gs = {
|
|
1734
1744
|
class: "tabs-container flex flex-col sm:flex-row",
|
|
1735
1745
|
role: "tablist"
|
|
1736
|
-
},
|
|
1746
|
+
}, Qs = ["aria-selected", "onClick"], Zs = { role: "tabpanel" }, Xs = "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", el = "text-primary-600 border-primary-600", tl = "hover:text-secondary-700 border-gray-100", sl = /* @__PURE__ */ P({
|
|
1737
1747
|
__name: "Tabs",
|
|
1738
1748
|
props: {
|
|
1739
1749
|
modelValue: {},
|
|
@@ -1741,34 +1751,34 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1741
1751
|
},
|
|
1742
1752
|
emits: ["update:modelValue"],
|
|
1743
1753
|
setup(t, { emit: g }) {
|
|
1744
|
-
const e = t, c = g, n = (h) => e.modelValue === h,
|
|
1754
|
+
const e = t, c = g, n = (h) => e.modelValue === h, u = (h) => {
|
|
1745
1755
|
n(h) || c("update:modelValue", h);
|
|
1746
|
-
},
|
|
1747
|
-
() => e.tabs.find((h) => h.value ===
|
|
1756
|
+
}, v = r(() => e.modelValue), a = r(
|
|
1757
|
+
() => e.tabs.find((h) => h.value === v.value)
|
|
1748
1758
|
);
|
|
1749
|
-
return (h, i) => (s(),
|
|
1750
|
-
|
|
1751
|
-
(s(!0),
|
|
1759
|
+
return (h, i) => (s(), l("div", Js, [
|
|
1760
|
+
o("div", Gs, [
|
|
1761
|
+
(s(!0), l(E, null, W(t.tabs, (p) => (s(), l("button", {
|
|
1752
1762
|
key: p.value,
|
|
1753
1763
|
type: "button",
|
|
1754
|
-
class:
|
|
1755
|
-
|
|
1756
|
-
n(p.value) ?
|
|
1764
|
+
class: f([
|
|
1765
|
+
Xs,
|
|
1766
|
+
n(p.value) ? el : tl
|
|
1757
1767
|
]),
|
|
1758
1768
|
"aria-selected": n(p.value),
|
|
1759
1769
|
role: "tab",
|
|
1760
|
-
onClick: (b) =>
|
|
1761
|
-
}, x(p.label), 11,
|
|
1770
|
+
onClick: (b) => u(p.value)
|
|
1771
|
+
}, x(p.label), 11, Qs))), 128))
|
|
1762
1772
|
]),
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
active:
|
|
1773
|
+
o("div", Zs, [
|
|
1774
|
+
V(h.$slots, v.value, {
|
|
1775
|
+
active: v.value,
|
|
1766
1776
|
tab: a.value
|
|
1767
1777
|
}, void 0, !0)
|
|
1768
1778
|
])
|
|
1769
1779
|
]));
|
|
1770
1780
|
}
|
|
1771
|
-
}),
|
|
1781
|
+
}), Sl = /* @__PURE__ */ K(sl, [["__scopeId", "data-v-b5a754bd"]]), ll = "font-sans", Il = /* @__PURE__ */ P({
|
|
1772
1782
|
__name: "Text",
|
|
1773
1783
|
props: {
|
|
1774
1784
|
variant: { default: "body1" },
|
|
@@ -1833,17 +1843,17 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1833
1843
|
danger: "text-danger-600",
|
|
1834
1844
|
success: "text-success-600",
|
|
1835
1845
|
warning: "text-warning-600"
|
|
1836
|
-
},
|
|
1846
|
+
}, u = {
|
|
1837
1847
|
light: "font-light",
|
|
1838
1848
|
normal: "font-normal",
|
|
1839
1849
|
medium: "font-medium",
|
|
1840
1850
|
semibold: "font-semibold",
|
|
1841
1851
|
bold: "font-bold",
|
|
1842
1852
|
extrabold: "font-extrabold"
|
|
1843
|
-
},
|
|
1844
|
-
return (
|
|
1845
|
-
class:
|
|
1846
|
-
|
|
1853
|
+
}, 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
|
+
return (T, B) => (s(), ee(Me(p.value), {
|
|
1855
|
+
class: f([
|
|
1856
|
+
ll,
|
|
1847
1857
|
g[a.value],
|
|
1848
1858
|
n[h.value],
|
|
1849
1859
|
c[i.value],
|
|
@@ -1855,22 +1865,22 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1855
1865
|
])
|
|
1856
1866
|
}, {
|
|
1857
1867
|
default: ae(() => [
|
|
1858
|
-
|
|
1868
|
+
V(T.$slots, "default")
|
|
1859
1869
|
]),
|
|
1860
1870
|
_: 3
|
|
1861
1871
|
}, 8, ["class"]));
|
|
1862
1872
|
}
|
|
1863
|
-
}),
|
|
1873
|
+
}), ol = { class: "w-full flex items-center justify-between gap-3 py-2" }, al = {
|
|
1864
1874
|
key: 0,
|
|
1865
1875
|
class: "text-xs text-secondary-600"
|
|
1866
|
-
},
|
|
1876
|
+
}, nl = { key: 0 }, rl = {
|
|
1867
1877
|
class: "ml-auto inline-flex items-center gap-1",
|
|
1868
1878
|
role: "navigation",
|
|
1869
1879
|
"aria-label": "Pagination"
|
|
1870
|
-
},
|
|
1880
|
+
}, il = ["disabled"], dl = {
|
|
1871
1881
|
key: 0,
|
|
1872
1882
|
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text-secondary-500"
|
|
1873
|
-
},
|
|
1883
|
+
}, ul = ["aria-label", "onClick"], cl = ["disabled"], fl = /* @__PURE__ */ P({
|
|
1874
1884
|
__name: "Pagination",
|
|
1875
1885
|
props: {
|
|
1876
1886
|
modelValue: { default: 1 },
|
|
@@ -1887,73 +1897,73 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1887
1897
|
const e = t, c = g, n = r(() => {
|
|
1888
1898
|
const b = Math.ceil(e.totalItems / e.pageSize);
|
|
1889
1899
|
return b > 0 ? b : 1;
|
|
1890
|
-
}),
|
|
1900
|
+
}), u = r(() => {
|
|
1891
1901
|
const b = Number(e.modelValue || 1);
|
|
1892
1902
|
return b < 1 ? 1 : b > n.value ? n.value : b;
|
|
1893
|
-
}),
|
|
1894
|
-
const b = n.value,
|
|
1895
|
-
if (b <=
|
|
1896
|
-
return Array.from({ length: b }, (
|
|
1897
|
-
const
|
|
1898
|
-
let
|
|
1899
|
-
|
|
1900
|
-
const
|
|
1901
|
-
|
|
1902
|
-
for (let
|
|
1903
|
-
|
|
1904
|
-
return S < b && (S < b - 1 &&
|
|
1903
|
+
}), v = r(() => e.totalItems === 0 ? 0 : (u.value - 1) * e.pageSize + 1), a = r(() => Math.min(u.value * e.pageSize, e.totalItems)), h = r(() => `Mostrando ${v.value} a ${a.value} de ${e.totalItems}`), i = r(() => {
|
|
1904
|
+
const b = n.value, T = Math.max(3, e.maxPages), B = u.value;
|
|
1905
|
+
if (b <= T)
|
|
1906
|
+
return Array.from({ length: b }, (k, I) => I + 1);
|
|
1907
|
+
const O = Math.floor(T / 2);
|
|
1908
|
+
let j = Math.max(1, B - O), S = Math.min(b, j + T - 1);
|
|
1909
|
+
j = Math.max(1, Math.min(j, S - T + 1));
|
|
1910
|
+
const D = [];
|
|
1911
|
+
j > 1 && (D.push(1), j > 2 && D.push("…"));
|
|
1912
|
+
for (let k = j; k <= S; k++)
|
|
1913
|
+
D.push(k);
|
|
1914
|
+
return S < b && (S < b - 1 && D.push("…"), D.push(b)), D;
|
|
1905
1915
|
});
|
|
1906
1916
|
function p(b) {
|
|
1907
|
-
const
|
|
1908
|
-
|
|
1917
|
+
const T = Math.max(1, Math.min(b, n.value));
|
|
1918
|
+
T !== u.value && (c("update:modelValue", T), c("change", T));
|
|
1909
1919
|
}
|
|
1910
|
-
return (b,
|
|
1911
|
-
t.showSummary ? (s(),
|
|
1912
|
-
|
|
1913
|
-
start:
|
|
1920
|
+
return (b, T) => (s(), l("div", ol, [
|
|
1921
|
+
t.showSummary ? (s(), l("div", al, [
|
|
1922
|
+
V(b.$slots, "summary", {
|
|
1923
|
+
start: v.value,
|
|
1914
1924
|
end: a.value,
|
|
1915
1925
|
total: t.totalItems
|
|
1916
1926
|
}, () => [
|
|
1917
|
-
|
|
1918
|
-
t.itemLabel ? (s(),
|
|
1927
|
+
q(x(h.value), 1),
|
|
1928
|
+
t.itemLabel ? (s(), l("span", nl, x(t.itemLabel), 1)) : y("", !0)
|
|
1919
1929
|
], !0)
|
|
1920
|
-
])) :
|
|
1921
|
-
|
|
1922
|
-
|
|
1930
|
+
])) : y("", !0),
|
|
1931
|
+
o("nav", rl, [
|
|
1932
|
+
o("button", {
|
|
1923
1933
|
type: "button",
|
|
1924
1934
|
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",
|
|
1925
|
-
disabled:
|
|
1926
|
-
onClick:
|
|
1935
|
+
disabled: u.value <= 1,
|
|
1936
|
+
onClick: T[0] || (T[0] = (B) => p(u.value - 1)),
|
|
1927
1937
|
"aria-label": "Anterior"
|
|
1928
|
-
}, x(t.previousText), 9,
|
|
1929
|
-
(s(!0),
|
|
1930
|
-
key: `page-${
|
|
1938
|
+
}, x(t.previousText), 9, il),
|
|
1939
|
+
(s(!0), l(E, null, W(i.value, (B, O) => (s(), l(E, {
|
|
1940
|
+
key: `page-${O}-${B}`
|
|
1931
1941
|
}, [
|
|
1932
|
-
|
|
1942
|
+
B === "…" ? (s(), l("span", dl, " … ")) : (s(), l("button", {
|
|
1933
1943
|
key: 1,
|
|
1934
1944
|
type: "button",
|
|
1935
|
-
"aria-label": `Página ${
|
|
1936
|
-
class:
|
|
1945
|
+
"aria-label": `Página ${B}`,
|
|
1946
|
+
class: f([
|
|
1937
1947
|
"h-8 min-w-8 px-3 rounded-full text-sm font-semibold transition-colors",
|
|
1938
|
-
|
|
1948
|
+
B === u.value ? "bg-primary-500 text-white" : "text-secondary-700 hover:bg-secondary-100"
|
|
1939
1949
|
]),
|
|
1940
|
-
onClick: (
|
|
1941
|
-
}, x(
|
|
1950
|
+
onClick: (j) => p(B)
|
|
1951
|
+
}, x(B), 11, ul))
|
|
1942
1952
|
], 64))), 128)),
|
|
1943
|
-
|
|
1953
|
+
o("button", {
|
|
1944
1954
|
type: "button",
|
|
1945
1955
|
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",
|
|
1946
|
-
disabled:
|
|
1947
|
-
onClick:
|
|
1956
|
+
disabled: u.value >= n.value,
|
|
1957
|
+
onClick: T[1] || (T[1] = (B) => p(u.value + 1)),
|
|
1948
1958
|
"aria-label": "Siguiente"
|
|
1949
|
-
}, x(t.nextText), 9,
|
|
1959
|
+
}, x(t.nextText), 9, cl)
|
|
1950
1960
|
])
|
|
1951
1961
|
]));
|
|
1952
1962
|
}
|
|
1953
|
-
}),
|
|
1963
|
+
}), jl = /* @__PURE__ */ K(fl, [["__scopeId", "data-v-87417cc4"]]), vl = ["data-node-id"], pl = { class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center" }, bl = {
|
|
1954
1964
|
key: 1,
|
|
1955
1965
|
class: "flex justify-end gap-1 px-6 pb-6 pt-4"
|
|
1956
|
-
},
|
|
1966
|
+
}, Ll = /* @__PURE__ */ P({
|
|
1957
1967
|
__name: "Alert",
|
|
1958
1968
|
props: {
|
|
1959
1969
|
variant: {},
|
|
@@ -1967,7 +1977,7 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
1967
1977
|
},
|
|
1968
1978
|
emits: ["close", "accept", "cancel"],
|
|
1969
1979
|
setup(t, { emit: g }) {
|
|
1970
|
-
const e = g, c = t, n = r(() => c.variant ?? "info"),
|
|
1980
|
+
const e = g, c = t, n = r(() => c.variant ?? "info"), u = r(() => c.multiline ?? !1), v = r(() => c.actions ?? !1), a = r(() => c.nodeId ?? void 0), h = () => e("close"), i = r(() => {
|
|
1971
1981
|
if (c.title) return c.title;
|
|
1972
1982
|
switch (n.value) {
|
|
1973
1983
|
case "info":
|
|
@@ -2006,32 +2016,32 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
2006
2016
|
icon: "text-[#ff4235]"
|
|
2007
2017
|
};
|
|
2008
2018
|
}
|
|
2009
|
-
}),
|
|
2019
|
+
}), T = r(() => "bg-[var(--color-primario/700,#269ea4)]"), B = r(() => {
|
|
2010
2020
|
const S = "flex w-full items-start gap-4 flex-col";
|
|
2011
2021
|
if (!c.stackOn) return `${S} sm:flex-row sm:items-center`;
|
|
2012
|
-
const
|
|
2013
|
-
return `${S} ${
|
|
2014
|
-
}),
|
|
2022
|
+
const D = c.stackOn, k = `${D}:flex-row ${D}:items-center`;
|
|
2023
|
+
return `${S} ${k}`;
|
|
2024
|
+
}), O = r(() => {
|
|
2015
2025
|
if (!c.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
|
|
2016
2026
|
const S = c.stackOn;
|
|
2017
2027
|
return `flex-col ${S}:flex-row items-start ${S}:items-center`;
|
|
2018
|
-
}),
|
|
2019
|
-
return (S,
|
|
2020
|
-
class:
|
|
2028
|
+
}), j = r(() => c.stackOn ? `self-start ${c.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
2029
|
+
return (S, D) => (s(), l("div", {
|
|
2030
|
+
class: f(["relative w-full rounded-xl border", [
|
|
2021
2031
|
b.value.border,
|
|
2022
2032
|
b.value.bg
|
|
2023
2033
|
]]),
|
|
2024
2034
|
role: "alert",
|
|
2025
2035
|
"data-node-id": a.value
|
|
2026
2036
|
}, [
|
|
2027
|
-
t.closable ? (s(),
|
|
2037
|
+
t.closable ? (s(), l("button", {
|
|
2028
2038
|
key: 0,
|
|
2029
2039
|
type: "button",
|
|
2030
2040
|
class: "absolute top-3 right-3 text-[color:var(--neutrales/texto-principal,#565656)]/70 hover:opacity-100 opacity-70",
|
|
2031
2041
|
"aria-label": "Cerrar",
|
|
2032
2042
|
onClick: h
|
|
2033
|
-
}, [...
|
|
2034
|
-
|
|
2043
|
+
}, [...D[2] || (D[2] = [
|
|
2044
|
+
o("svg", {
|
|
2035
2045
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2036
2046
|
width: "18",
|
|
2037
2047
|
height: "18",
|
|
@@ -2042,119 +2052,119 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
2042
2052
|
"stroke-linecap": "round",
|
|
2043
2053
|
"stroke-linejoin": "round"
|
|
2044
2054
|
}, [
|
|
2045
|
-
|
|
2055
|
+
o("line", {
|
|
2046
2056
|
x1: "18",
|
|
2047
2057
|
y1: "6",
|
|
2048
2058
|
x2: "6",
|
|
2049
2059
|
y2: "18"
|
|
2050
2060
|
}),
|
|
2051
|
-
|
|
2061
|
+
o("line", {
|
|
2052
2062
|
x1: "6",
|
|
2053
2063
|
y1: "6",
|
|
2054
2064
|
x2: "18",
|
|
2055
2065
|
y2: "18"
|
|
2056
2066
|
})
|
|
2057
2067
|
], -1)
|
|
2058
|
-
])])) :
|
|
2059
|
-
|
|
2060
|
-
class:
|
|
2068
|
+
])])) : y("", !0),
|
|
2069
|
+
o("div", {
|
|
2070
|
+
class: f(["p-6", { "pb-0": v.value }])
|
|
2061
2071
|
}, [
|
|
2062
|
-
|
|
2063
|
-
class:
|
|
2072
|
+
o("div", {
|
|
2073
|
+
class: f(B.value)
|
|
2064
2074
|
}, [
|
|
2065
|
-
|
|
2066
|
-
n.value === "info" ? (s(),
|
|
2075
|
+
o("div", pl, [
|
|
2076
|
+
n.value === "info" ? (s(), l("svg", {
|
|
2067
2077
|
key: 0,
|
|
2068
2078
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2069
2079
|
width: "24",
|
|
2070
2080
|
height: "24",
|
|
2071
2081
|
viewBox: "0 0 24 24",
|
|
2072
2082
|
fill: "none",
|
|
2073
|
-
class:
|
|
2083
|
+
class: f(b.value.icon),
|
|
2074
2084
|
stroke: "currentColor",
|
|
2075
2085
|
"stroke-width": "2",
|
|
2076
2086
|
"stroke-linecap": "round",
|
|
2077
2087
|
"stroke-linejoin": "round"
|
|
2078
|
-
}, [...
|
|
2079
|
-
|
|
2088
|
+
}, [...D[3] || (D[3] = [
|
|
2089
|
+
o("circle", {
|
|
2080
2090
|
cx: "12",
|
|
2081
2091
|
cy: "12",
|
|
2082
2092
|
r: "10"
|
|
2083
2093
|
}, null, -1),
|
|
2084
|
-
|
|
2094
|
+
o("line", {
|
|
2085
2095
|
x1: "12",
|
|
2086
2096
|
y1: "16",
|
|
2087
2097
|
x2: "12",
|
|
2088
2098
|
y2: "12"
|
|
2089
2099
|
}, null, -1),
|
|
2090
|
-
|
|
2100
|
+
o("line", {
|
|
2091
2101
|
x1: "12",
|
|
2092
2102
|
y1: "8",
|
|
2093
2103
|
x2: "12",
|
|
2094
2104
|
y2: "8"
|
|
2095
2105
|
}, null, -1)
|
|
2096
|
-
])], 2)) : n.value === "warning" ? (s(),
|
|
2106
|
+
])], 2)) : n.value === "warning" ? (s(), l("svg", {
|
|
2097
2107
|
key: 1,
|
|
2098
2108
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2099
2109
|
width: "24",
|
|
2100
2110
|
height: "24",
|
|
2101
2111
|
viewBox: "0 0 24 24",
|
|
2102
2112
|
fill: "none",
|
|
2103
|
-
class:
|
|
2113
|
+
class: f(b.value.icon),
|
|
2104
2114
|
stroke: "currentColor",
|
|
2105
2115
|
"stroke-width": "2",
|
|
2106
2116
|
"stroke-linecap": "round",
|
|
2107
2117
|
"stroke-linejoin": "round"
|
|
2108
|
-
}, [...
|
|
2109
|
-
|
|
2110
|
-
|
|
2118
|
+
}, [...D[4] || (D[4] = [
|
|
2119
|
+
o("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),
|
|
2120
|
+
o("line", {
|
|
2111
2121
|
x1: "12",
|
|
2112
2122
|
y1: "9",
|
|
2113
2123
|
x2: "12",
|
|
2114
2124
|
y2: "13"
|
|
2115
2125
|
}, null, -1),
|
|
2116
|
-
|
|
2126
|
+
o("line", {
|
|
2117
2127
|
x1: "12",
|
|
2118
2128
|
y1: "17",
|
|
2119
2129
|
x2: "12",
|
|
2120
2130
|
y2: "17"
|
|
2121
2131
|
}, null, -1)
|
|
2122
|
-
])], 2)) : n.value === "success" ? (s(),
|
|
2132
|
+
])], 2)) : n.value === "success" ? (s(), l("svg", {
|
|
2123
2133
|
key: 2,
|
|
2124
2134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2125
2135
|
width: "24",
|
|
2126
2136
|
height: "24",
|
|
2127
2137
|
viewBox: "0 0 24 24",
|
|
2128
2138
|
fill: "none",
|
|
2129
|
-
class:
|
|
2139
|
+
class: f(b.value.icon),
|
|
2130
2140
|
stroke: "currentColor",
|
|
2131
2141
|
"stroke-width": "2",
|
|
2132
2142
|
"stroke-linecap": "round",
|
|
2133
2143
|
"stroke-linejoin": "round"
|
|
2134
|
-
}, [...
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
])], 2)) : (s(),
|
|
2144
|
+
}, [...D[5] || (D[5] = [
|
|
2145
|
+
o("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
2146
|
+
o("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
2147
|
+
])], 2)) : (s(), l("svg", {
|
|
2138
2148
|
key: 3,
|
|
2139
2149
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2140
2150
|
width: "24",
|
|
2141
2151
|
height: "24",
|
|
2142
2152
|
viewBox: "0 0 24 24",
|
|
2143
2153
|
fill: "none",
|
|
2144
|
-
class:
|
|
2154
|
+
class: f(b.value.icon),
|
|
2145
2155
|
stroke: "currentColor",
|
|
2146
2156
|
"stroke-width": "2",
|
|
2147
2157
|
"stroke-linecap": "round",
|
|
2148
2158
|
"stroke-linejoin": "round"
|
|
2149
|
-
}, [...
|
|
2150
|
-
|
|
2151
|
-
|
|
2159
|
+
}, [...D[6] || (D[6] = [
|
|
2160
|
+
o("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),
|
|
2161
|
+
o("line", {
|
|
2152
2162
|
x1: "12",
|
|
2153
2163
|
y1: "8",
|
|
2154
2164
|
x2: "12",
|
|
2155
2165
|
y2: "12"
|
|
2156
2166
|
}, null, -1),
|
|
2157
|
-
|
|
2167
|
+
o("line", {
|
|
2158
2168
|
x1: "12",
|
|
2159
2169
|
y1: "16",
|
|
2160
2170
|
x2: "12",
|
|
@@ -2162,61 +2172,61 @@ const Ee = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Pe = {
|
|
|
2162
2172
|
}, null, -1)
|
|
2163
2173
|
])], 2))
|
|
2164
2174
|
]),
|
|
2165
|
-
|
|
2166
|
-
class:
|
|
2175
|
+
o("div", {
|
|
2176
|
+
class: f(["flex-1 flex gap-4 text-[14px]", [O.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !u.value, "whitespace-pre-wrap": u.value }]])
|
|
2167
2177
|
}, [
|
|
2168
|
-
|
|
2169
|
-
class:
|
|
2178
|
+
o("div", {
|
|
2179
|
+
class: f(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", j.value])
|
|
2170
2180
|
}, x(i.value), 3),
|
|
2171
|
-
|
|
2172
|
-
class:
|
|
2181
|
+
o("div", {
|
|
2182
|
+
class: f(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !u.value }])
|
|
2173
2183
|
}, [
|
|
2174
|
-
|
|
2175
|
-
|
|
2184
|
+
V(S.$slots, "description", {}, () => [
|
|
2185
|
+
q(x(p.value), 1)
|
|
2176
2186
|
])
|
|
2177
2187
|
], 2)
|
|
2178
2188
|
], 2)
|
|
2179
2189
|
], 2)
|
|
2180
2190
|
], 2),
|
|
2181
|
-
|
|
2182
|
-
|
|
2191
|
+
v.value ? (s(), l("div", bl, [
|
|
2192
|
+
o("button", {
|
|
2183
2193
|
type: "button",
|
|
2184
2194
|
class: "px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
2185
|
-
onClick:
|
|
2195
|
+
onClick: D[0] || (D[0] = (k) => S.$emit("cancel"))
|
|
2186
2196
|
}, [
|
|
2187
|
-
|
|
2188
|
-
|
|
2197
|
+
V(S.$slots, "cancel", {}, () => [
|
|
2198
|
+
D[7] || (D[7] = q("Cancelar", -1))
|
|
2189
2199
|
])
|
|
2190
2200
|
]),
|
|
2191
|
-
|
|
2201
|
+
o("button", {
|
|
2192
2202
|
type: "button",
|
|
2193
|
-
class:
|
|
2194
|
-
onClick:
|
|
2203
|
+
class: f(["px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-white", T.value]),
|
|
2204
|
+
onClick: D[1] || (D[1] = (k) => S.$emit("accept"))
|
|
2195
2205
|
}, [
|
|
2196
|
-
|
|
2197
|
-
|
|
2206
|
+
V(S.$slots, "accept", {}, () => [
|
|
2207
|
+
D[8] || (D[8] = q("Aceptar", -1))
|
|
2198
2208
|
])
|
|
2199
2209
|
], 2)
|
|
2200
|
-
])) :
|
|
2201
|
-
], 10,
|
|
2210
|
+
])) : y("", !0)
|
|
2211
|
+
], 10, vl));
|
|
2202
2212
|
}
|
|
2203
2213
|
});
|
|
2204
2214
|
export {
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2215
|
+
Ll as Alert,
|
|
2216
|
+
hl as AppBar,
|
|
2217
|
+
xl as Button,
|
|
2218
|
+
wl as Calendar,
|
|
2219
|
+
kl as Card,
|
|
2220
|
+
$l as Dialog,
|
|
2221
|
+
Cl as FileUpload,
|
|
2212
2222
|
se as Icon,
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2223
|
+
Ml as Input,
|
|
2224
|
+
Dl as Loader,
|
|
2225
|
+
Bl as Menu,
|
|
2226
|
+
jl as Pagination,
|
|
2227
|
+
zl as Select,
|
|
2228
|
+
Vl as Sidebar,
|
|
2229
|
+
Tl as Table,
|
|
2230
|
+
Sl as Tabs,
|
|
2231
|
+
Il as Text
|
|
2222
2232
|
};
|