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