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