@iaclinical/components 1.0.12 → 1.0.14
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 +786 -644
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const le = { class: "flex items-center gap-
|
|
1
|
+
import { defineComponent as O, computed as d, createElementBlock as o, openBlock as s, normalizeClass as p, createElementVNode as l, createCommentVNode as g, renderSlot as B, toDisplayString as w, createBlock as q, Teleport as J, createVNode as G, Transition as Q, withCtx as U, withModifiers as F, createTextVNode as E, ref as P, normalizeStyle as R, onMounted as ee, onUnmounted as te, watch as X, nextTick as Z, Fragment as A, renderList as W, resolveDynamicComponent as Y, withDirectives as se, vModelText as oe } from "vue";
|
|
2
|
+
const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
3
3
|
key: 1,
|
|
4
|
-
class: "text-lg font-bold text-primary-50 font-poppins"
|
|
5
|
-
},
|
|
4
|
+
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
5
|
+
}, ne = { class: "flex flex-1 justify-center items-center min-w-0" }, re = {
|
|
6
6
|
key: 0,
|
|
7
|
-
class: "text-lg font-bold text-primary-50 font-poppins"
|
|
8
|
-
}, ie = { class: "flex items-center gap-3" }, de = {
|
|
7
|
+
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins truncate"
|
|
8
|
+
}, ie = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, de = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "text-lg font-bold text-primary-50 font-poppins"
|
|
11
|
-
}, ue = /* @__PURE__ */
|
|
10
|
+
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
11
|
+
}, ue = /* @__PURE__ */ O({
|
|
12
12
|
__name: "AppBar",
|
|
13
13
|
props: {
|
|
14
14
|
title: { default: "" },
|
|
@@ -21,36 +21,36 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
21
21
|
},
|
|
22
22
|
emits: ["toggle-menu"],
|
|
23
23
|
setup(t, { emit: b }) {
|
|
24
|
-
const e = t, i = b,
|
|
25
|
-
const
|
|
24
|
+
const e = t, i = b, n = d(() => {
|
|
25
|
+
const r = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", f = {
|
|
26
26
|
default: "bg-primary-700 text-primary-50",
|
|
27
27
|
dark: "bg-secondary-900 text-white",
|
|
28
28
|
light: "bg-white text-secondary-900 border-b border-secondary-200"
|
|
29
|
-
},
|
|
29
|
+
}, u = {
|
|
30
30
|
sm: "h-12",
|
|
31
31
|
md: "h-14",
|
|
32
32
|
lg: "h-16"
|
|
33
|
-
},
|
|
33
|
+
}, v = e.sticky ? "sticky top-0" : "", x = e.shadow ? "shadow-md" : "";
|
|
34
34
|
return [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
r,
|
|
36
|
+
f[e.variant],
|
|
37
|
+
u[e.height],
|
|
38
|
+
v,
|
|
39
|
+
x
|
|
40
40
|
].join(" ");
|
|
41
41
|
});
|
|
42
|
-
return (
|
|
43
|
-
class:
|
|
42
|
+
return (r, f) => (s(), o("header", {
|
|
43
|
+
class: p(n.value)
|
|
44
44
|
}, [
|
|
45
45
|
l("div", le, [
|
|
46
46
|
t.showMenuButton ? (s(), o("button", {
|
|
47
47
|
key: 0,
|
|
48
|
-
onClick:
|
|
49
|
-
class: "p-2 hover:bg-primary-600 rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
48
|
+
onClick: f[0] || (f[0] = (u) => i("toggle-menu")),
|
|
49
|
+
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",
|
|
50
50
|
"aria-label": "Toggle menu"
|
|
51
|
-
}, [...
|
|
51
|
+
}, [...f[1] || (f[1] = [
|
|
52
52
|
l("svg", {
|
|
53
|
-
class: "w-6 h-6 text-primary-50",
|
|
53
|
+
class: "w-5 h-5 sm:w-6 sm:h-6 text-primary-50",
|
|
54
54
|
fill: "none",
|
|
55
55
|
stroke: "currentColor",
|
|
56
56
|
viewBox: "0 0 24 24",
|
|
@@ -63,29 +63,29 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
63
63
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
64
64
|
})
|
|
65
65
|
], -1)
|
|
66
|
-
])])) :
|
|
67
|
-
t.title && t.titlePosition === "left" ? (s(), o("div",
|
|
68
|
-
|
|
66
|
+
])])) : g("", !0),
|
|
67
|
+
t.title && t.titlePosition === "left" ? (s(), o("div", ae, w(t.title), 1)) : g("", !0),
|
|
68
|
+
B(r.$slots, "left", {}, void 0, !0)
|
|
69
69
|
]),
|
|
70
|
-
l("div",
|
|
71
|
-
t.title && t.titlePosition === "center" ? (s(), o("div", re, w(t.title), 1)) :
|
|
72
|
-
|
|
70
|
+
l("div", ne, [
|
|
71
|
+
t.title && t.titlePosition === "center" ? (s(), o("div", re, w(t.title), 1)) : g("", !0),
|
|
72
|
+
B(r.$slots, "center", {}, void 0, !0)
|
|
73
73
|
]),
|
|
74
74
|
l("div", ie, [
|
|
75
|
-
t.title && t.titlePosition === "right" ? (s(), o("div", de, w(t.title), 1)) :
|
|
76
|
-
|
|
75
|
+
t.title && t.titlePosition === "right" ? (s(), o("div", de, w(t.title), 1)) : g("", !0),
|
|
76
|
+
B(r.$slots, "right", {}, void 0, !0)
|
|
77
77
|
])
|
|
78
78
|
], 2));
|
|
79
79
|
}
|
|
80
|
-
}),
|
|
80
|
+
}), N = (t, b) => {
|
|
81
81
|
const e = t.__vccOpts || t;
|
|
82
|
-
for (const [i,
|
|
83
|
-
e[i] =
|
|
82
|
+
for (const [i, n] of b)
|
|
83
|
+
e[i] = n;
|
|
84
84
|
return e;
|
|
85
|
-
},
|
|
85
|
+
}, ts = /* @__PURE__ */ N(ue, [["__scopeId", "data-v-c5861315"]]), ce = ["type", "disabled", "aria-label"], fe = {
|
|
86
86
|
key: 0,
|
|
87
87
|
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]"
|
|
88
|
-
},
|
|
88
|
+
}, ss = /* @__PURE__ */ O({
|
|
89
89
|
__name: "Button",
|
|
90
90
|
props: {
|
|
91
91
|
variant: { default: "primary" },
|
|
@@ -100,8 +100,8 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
100
100
|
},
|
|
101
101
|
emits: ["click"],
|
|
102
102
|
setup(t, { emit: b }) {
|
|
103
|
-
const e = t, i = b,
|
|
104
|
-
const
|
|
103
|
+
const e = t, i = b, n = d(() => e.variant === "icon"), r = d(() => e.badge > 99 ? "99+" : e.badge.toString()), f = d(() => {
|
|
104
|
+
const v = "inline-flex items-center justify-center font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", x = {
|
|
105
105
|
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
|
|
106
106
|
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 focus-visible:ring-secondary-500",
|
|
107
107
|
outline: "border border-secondary-300 bg-transparent hover:bg-secondary-100 focus-visible:ring-secondary-500",
|
|
@@ -109,34 +109,34 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
109
109
|
danger: "bg-danger-600 text-white hover:bg-danger-700 focus-visible:ring-danger-600",
|
|
110
110
|
icon: "hover:bg-secondary-100 focus-visible:ring-secondary-500 relative",
|
|
111
111
|
text: "bg-transparent border-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
|
112
|
-
},
|
|
113
|
-
sm:
|
|
114
|
-
md:
|
|
115
|
-
lg:
|
|
116
|
-
},
|
|
112
|
+
}, y = {
|
|
113
|
+
sm: n.value ? "p-1.5" : "h-8 px-3 text-sm",
|
|
114
|
+
md: n.value ? "p-2" : "h-10 px-4 text-base",
|
|
115
|
+
lg: n.value ? "p-3" : "h-12 px-6 text-lg"
|
|
116
|
+
}, c = {
|
|
117
117
|
full: "rounded-full",
|
|
118
118
|
xl: "rounded-2xl",
|
|
119
119
|
lg: "rounded-xl",
|
|
120
120
|
md: "rounded-lg",
|
|
121
121
|
sm: "rounded-md",
|
|
122
122
|
none: "rounded-none"
|
|
123
|
-
},
|
|
124
|
-
var
|
|
125
|
-
return e.textColorHover ? e.textColorHover : (
|
|
123
|
+
}, _ = e.textColor ? e.textColor : "", C = d(() => {
|
|
124
|
+
var S, V;
|
|
125
|
+
return e.textColorHover ? e.textColorHover : (S = e.textColor) != null && S.includes("white") || (V = e.textColor) != null && V.includes("50") ? "hover:text-black" : "";
|
|
126
126
|
});
|
|
127
|
-
return `${
|
|
128
|
-
}),
|
|
129
|
-
e.disabled || i("click",
|
|
127
|
+
return `${v} ${x[e.variant]} ${y[e.size]} ${c[e.radius]} ${_} ${C.value}`;
|
|
128
|
+
}), u = (v) => {
|
|
129
|
+
e.disabled || i("click", v);
|
|
130
130
|
};
|
|
131
|
-
return (
|
|
132
|
-
class:
|
|
131
|
+
return (v, x) => (s(), o("button", {
|
|
132
|
+
class: p(f.value),
|
|
133
133
|
type: t.type,
|
|
134
134
|
disabled: t.disabled,
|
|
135
|
-
onClick:
|
|
135
|
+
onClick: u,
|
|
136
136
|
"aria-label": t.ariaLabel
|
|
137
137
|
}, [
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
B(v.$slots, "default"),
|
|
139
|
+
n.value && t.badge && t.badge > 0 ? (s(), o("span", fe, w(r.value), 1)) : g("", !0)
|
|
140
140
|
], 10, ce));
|
|
141
141
|
}
|
|
142
142
|
}), pe = {
|
|
@@ -145,7 +145,7 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
145
145
|
}, ge = { class: "px-6 py-4" }, ve = {
|
|
146
146
|
key: 1,
|
|
147
147
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
148
|
-
},
|
|
148
|
+
}, os = /* @__PURE__ */ O({
|
|
149
149
|
__name: "Card",
|
|
150
150
|
props: {
|
|
151
151
|
shadow: { default: "md" },
|
|
@@ -166,30 +166,30 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
166
166
|
lg: "rounded-lg",
|
|
167
167
|
xl: "rounded-xl",
|
|
168
168
|
full: "rounded-full"
|
|
169
|
-
},
|
|
169
|
+
}, n = d(() => [
|
|
170
170
|
"w-full bg-white",
|
|
171
171
|
e[b.shadow],
|
|
172
172
|
i[b.rounded],
|
|
173
173
|
b.bordered ? "border border-gray-200" : ""
|
|
174
174
|
]);
|
|
175
|
-
return (
|
|
176
|
-
class:
|
|
175
|
+
return (r, f) => (s(), o("div", {
|
|
176
|
+
class: p(n.value)
|
|
177
177
|
}, [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
])) :
|
|
178
|
+
r.$slots.header ? (s(), o("div", pe, [
|
|
179
|
+
B(r.$slots, "header")
|
|
180
|
+
])) : g("", !0),
|
|
181
181
|
l("div", ge, [
|
|
182
|
-
|
|
182
|
+
B(r.$slots, "default")
|
|
183
183
|
]),
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
])) :
|
|
184
|
+
r.$slots.footer ? (s(), o("div", ve, [
|
|
185
|
+
B(r.$slots, "footer")
|
|
186
|
+
])) : g("", !0)
|
|
187
187
|
], 2));
|
|
188
188
|
}
|
|
189
|
-
}),
|
|
189
|
+
}), xe = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, be = { class: "text-xl font-semibold text-gray-900" }, he = { class: "px-8 py-6" }, ye = {
|
|
190
190
|
key: 0,
|
|
191
191
|
class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
|
|
192
|
-
}, me = /* @__PURE__ */
|
|
192
|
+
}, me = /* @__PURE__ */ O({
|
|
193
193
|
__name: "Dialog",
|
|
194
194
|
props: {
|
|
195
195
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -198,30 +198,30 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
198
198
|
},
|
|
199
199
|
emits: ["update:modelValue", "close"],
|
|
200
200
|
setup(t, { emit: b }) {
|
|
201
|
-
const e = t, i = b,
|
|
201
|
+
const e = t, i = b, n = d({
|
|
202
202
|
get: () => e.modelValue,
|
|
203
|
-
set: (
|
|
204
|
-
}),
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
e.closeOnBackdrop &&
|
|
203
|
+
set: (u) => i("update:modelValue", u)
|
|
204
|
+
}), r = () => {
|
|
205
|
+
n.value = !1, i("close");
|
|
206
|
+
}, f = () => {
|
|
207
|
+
e.closeOnBackdrop && r();
|
|
208
208
|
};
|
|
209
|
-
return (
|
|
209
|
+
return (u, v) => (s(), q(J, { to: "body" }, [
|
|
210
210
|
G(Q, { name: "dialog" }, {
|
|
211
211
|
default: U(() => [
|
|
212
|
-
|
|
212
|
+
n.value ? (s(), o("div", {
|
|
213
213
|
key: 0,
|
|
214
|
-
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
215
|
-
onClick:
|
|
214
|
+
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4",
|
|
215
|
+
onClick: f
|
|
216
216
|
}, [
|
|
217
217
|
l("div", {
|
|
218
|
-
class: "relative w-full
|
|
219
|
-
onClick:
|
|
218
|
+
class: "relative w-full rounded-lg bg-white shadow-xl sm:max-w-lg md:max-w-2xl",
|
|
219
|
+
onClick: v[0] || (v[0] = F(() => {
|
|
220
220
|
}, ["stop"]))
|
|
221
221
|
}, [
|
|
222
|
-
l("div",
|
|
223
|
-
l("h2",
|
|
224
|
-
|
|
222
|
+
l("div", xe, [
|
|
223
|
+
l("h2", be, [
|
|
224
|
+
B(u.$slots, "title", {}, () => [
|
|
225
225
|
E(w(t.title), 1)
|
|
226
226
|
], !0)
|
|
227
227
|
]),
|
|
@@ -229,8 +229,8 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
229
229
|
type: "button",
|
|
230
230
|
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",
|
|
231
231
|
"aria-label": "Cerrar diálogo",
|
|
232
|
-
onClick:
|
|
233
|
-
}, [...
|
|
232
|
+
onClick: r
|
|
233
|
+
}, [...v[1] || (v[1] = [
|
|
234
234
|
l("svg", {
|
|
235
235
|
class: "h-6 w-6",
|
|
236
236
|
fill: "none",
|
|
@@ -247,31 +247,31 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
247
247
|
])])
|
|
248
248
|
]),
|
|
249
249
|
l("div", he, [
|
|
250
|
-
|
|
250
|
+
B(u.$slots, "default", {}, void 0, !0)
|
|
251
251
|
]),
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
])) :
|
|
252
|
+
u.$slots.footer ? (s(), o("div", ye, [
|
|
253
|
+
B(u.$slots, "footer", {}, void 0, !0)
|
|
254
|
+
])) : g("", !0)
|
|
255
255
|
])
|
|
256
|
-
])) :
|
|
256
|
+
])) : g("", !0)
|
|
257
257
|
]),
|
|
258
258
|
_: 3
|
|
259
259
|
})
|
|
260
260
|
]));
|
|
261
261
|
}
|
|
262
|
-
}),
|
|
262
|
+
}), ls = /* @__PURE__ */ N(me, [["__scopeId", "data-v-37e19754"]]), we = ["accept", "multiple", "disabled"], ke = { class: "flex flex-col items-center justify-center gap-4 text-center" }, $e = ["src", "alt"], Ce = {
|
|
263
263
|
key: 1,
|
|
264
264
|
class: "w-full h-full text-gray-400",
|
|
265
265
|
fill: "none",
|
|
266
266
|
stroke: "currentColor",
|
|
267
267
|
viewBox: "0 0 24 24"
|
|
268
|
-
}, Be = { class: "text-center" },
|
|
268
|
+
}, Be = { class: "text-center" }, Me = { class: "text-base font-medium text-gray-700" }, Te = { class: "text-primary-700" }, _e = { class: "flex items-center gap-3 flex-1 min-w-0" }, ze = { class: "flex-1 min-w-0" }, je = { class: "text-sm font-medium text-gray-900 truncate" }, Ve = { class: "text-xs text-gray-500" }, Se = {
|
|
269
269
|
key: 1,
|
|
270
270
|
class: "text-xs text-gray-500 mt-2"
|
|
271
|
-
},
|
|
271
|
+
}, Le = {
|
|
272
272
|
key: 2,
|
|
273
273
|
class: "text-sm text-danger-500 mt-2"
|
|
274
|
-
},
|
|
274
|
+
}, as = /* @__PURE__ */ O({
|
|
275
275
|
__name: "FileUpload",
|
|
276
276
|
props: {
|
|
277
277
|
modelValue: { default: null },
|
|
@@ -288,72 +288,72 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
288
288
|
},
|
|
289
289
|
emits: ["update:modelValue", "change", "error"],
|
|
290
290
|
setup(t, { emit: b }) {
|
|
291
|
-
const e = t, i = b,
|
|
291
|
+
const e = t, i = b, n = P(null), r = P(!1), f = P(e.modelValue), u = P(""), v = d(() => ({
|
|
292
292
|
sm: "w-20 h-20",
|
|
293
293
|
md: "w-32 h-32",
|
|
294
294
|
lg: "w-48 h-48",
|
|
295
295
|
xl: "w-64 h-64"
|
|
296
|
-
})[e.illustrationSize]),
|
|
297
|
-
var
|
|
298
|
-
(
|
|
299
|
-
},
|
|
300
|
-
e.disabled ||
|
|
301
|
-
},
|
|
302
|
-
e.disabled || (
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
},
|
|
306
|
-
if (
|
|
307
|
-
const
|
|
308
|
-
return
|
|
296
|
+
})[e.illustrationSize]), x = () => {
|
|
297
|
+
var k;
|
|
298
|
+
(k = n.value) == null || k.click();
|
|
299
|
+
}, y = () => {
|
|
300
|
+
e.disabled || x();
|
|
301
|
+
}, c = (k) => {
|
|
302
|
+
e.disabled || (r.value = !0);
|
|
303
|
+
}, _ = () => {
|
|
304
|
+
r.value = !1;
|
|
305
|
+
}, C = (k) => {
|
|
306
|
+
if (u.value = "", e.maxSize && k.size > e.maxSize) {
|
|
307
|
+
const j = (e.maxSize / 1048576).toFixed(2);
|
|
308
|
+
return u.value = `El archivo excede el tamaño máximo de ${j}MB`, i("error", u.value), !1;
|
|
309
309
|
}
|
|
310
310
|
return !0;
|
|
311
|
-
},
|
|
312
|
-
var
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
},
|
|
316
|
-
var
|
|
317
|
-
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
},
|
|
323
|
-
if (
|
|
324
|
-
const
|
|
325
|
-
return Math.round(
|
|
311
|
+
}, S = (k) => {
|
|
312
|
+
var H;
|
|
313
|
+
const I = (H = k.target.files) == null ? void 0 : H[0];
|
|
314
|
+
I && C(I) && (f.value = I, i("update:modelValue", I), i("change", I));
|
|
315
|
+
}, V = (k) => {
|
|
316
|
+
var I;
|
|
317
|
+
r.value = !1;
|
|
318
|
+
const j = (I = k.dataTransfer) == null ? void 0 : I.files[0];
|
|
319
|
+
j && C(j) && (f.value = j, i("update:modelValue", j), i("change", j));
|
|
320
|
+
}, z = () => {
|
|
321
|
+
f.value = null, u.value = "", n.value && (n.value.value = ""), i("update:modelValue", null), i("change", null);
|
|
322
|
+
}, h = (k) => {
|
|
323
|
+
if (k === 0) return "0 Bytes";
|
|
324
|
+
const j = 1024, I = ["Bytes", "KB", "MB", "GB"], H = Math.floor(Math.log(k) / Math.log(j));
|
|
325
|
+
return Math.round(k / Math.pow(j, H) * 100) / 100 + " " + I[H];
|
|
326
326
|
};
|
|
327
|
-
return (
|
|
328
|
-
class:
|
|
329
|
-
|
|
327
|
+
return (k, j) => (s(), o("div", {
|
|
328
|
+
class: p(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
329
|
+
r.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
330
330
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
331
331
|
]]),
|
|
332
|
-
onClick:
|
|
333
|
-
onDragover:
|
|
334
|
-
onDragleave:
|
|
335
|
-
onDrop:
|
|
332
|
+
onClick: y,
|
|
333
|
+
onDragover: F(c, ["prevent"]),
|
|
334
|
+
onDragleave: F(_, ["prevent"]),
|
|
335
|
+
onDrop: F(V, ["prevent"])
|
|
336
336
|
}, [
|
|
337
337
|
l("input", {
|
|
338
338
|
ref_key: "fileInput",
|
|
339
|
-
ref:
|
|
339
|
+
ref: n,
|
|
340
340
|
type: "file",
|
|
341
341
|
accept: t.accept,
|
|
342
342
|
multiple: t.multiple,
|
|
343
343
|
disabled: t.disabled,
|
|
344
344
|
class: "hidden",
|
|
345
|
-
onChange:
|
|
345
|
+
onChange: S
|
|
346
346
|
}, null, 40, we),
|
|
347
347
|
l("div", ke, [
|
|
348
348
|
l("div", {
|
|
349
|
-
class:
|
|
349
|
+
class: p([v.value, "flex items-center justify-center"])
|
|
350
350
|
}, [
|
|
351
351
|
t.illustration ? (s(), o("img", {
|
|
352
352
|
key: 0,
|
|
353
353
|
src: t.illustration,
|
|
354
354
|
alt: t.illustrationAlt,
|
|
355
355
|
class: "max-w-full max-h-full object-contain"
|
|
356
|
-
}, null, 8,
|
|
356
|
+
}, null, 8, $e)) : (s(), o("svg", Ce, [...j[1] || (j[1] = [
|
|
357
357
|
l("path", {
|
|
358
358
|
"stroke-linecap": "round",
|
|
359
359
|
"stroke-linejoin": "round",
|
|
@@ -363,19 +363,19 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
363
363
|
])]))
|
|
364
364
|
], 2),
|
|
365
365
|
l("div", Be, [
|
|
366
|
-
l("p",
|
|
366
|
+
l("p", Me, [
|
|
367
367
|
E(w(t.mainText) + " ", 1),
|
|
368
|
-
l("span",
|
|
368
|
+
l("span", Te, w(t.linkText), 1)
|
|
369
369
|
])
|
|
370
370
|
]),
|
|
371
|
-
|
|
371
|
+
f.value ? (s(), o("div", {
|
|
372
372
|
key: 0,
|
|
373
373
|
class: "w-full max-w-md bg-gray-50 rounded-lg p-4 flex items-center justify-between",
|
|
374
|
-
onClick:
|
|
374
|
+
onClick: j[0] || (j[0] = F(() => {
|
|
375
375
|
}, ["stop"]))
|
|
376
376
|
}, [
|
|
377
|
-
l("div",
|
|
378
|
-
|
|
377
|
+
l("div", _e, [
|
|
378
|
+
j[2] || (j[2] = l("svg", {
|
|
379
379
|
class: "w-6 h-6 text-gray-600 flex-shrink-0",
|
|
380
380
|
fill: "none",
|
|
381
381
|
stroke: "currentColor",
|
|
@@ -388,16 +388,16 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
388
388
|
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"
|
|
389
389
|
})
|
|
390
390
|
], -1)),
|
|
391
|
-
l("div",
|
|
392
|
-
l("p", je, w(
|
|
393
|
-
l("p", Ve, w(
|
|
391
|
+
l("div", ze, [
|
|
392
|
+
l("p", je, w(f.value.name), 1),
|
|
393
|
+
l("p", Ve, w(h(f.value.size)), 1)
|
|
394
394
|
])
|
|
395
395
|
]),
|
|
396
|
-
t.disabled ?
|
|
396
|
+
t.disabled ? g("", !0) : (s(), o("button", {
|
|
397
397
|
key: 0,
|
|
398
|
-
onClick:
|
|
398
|
+
onClick: F(z, ["stop"]),
|
|
399
399
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
400
|
-
}, [...
|
|
400
|
+
}, [...j[3] || (j[3] = [
|
|
401
401
|
l("svg", {
|
|
402
402
|
class: "w-5 h-5",
|
|
403
403
|
fill: "currentColor",
|
|
@@ -410,16 +410,16 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
410
410
|
})
|
|
411
411
|
], -1)
|
|
412
412
|
])]))
|
|
413
|
-
])) :
|
|
414
|
-
t.helperText ? (s(), o("p",
|
|
415
|
-
|
|
413
|
+
])) : g("", !0),
|
|
414
|
+
t.helperText ? (s(), o("p", Se, w(t.helperText), 1)) : g("", !0),
|
|
415
|
+
u.value ? (s(), o("p", Le, w(u.value), 1)) : g("", !0)
|
|
416
416
|
])
|
|
417
417
|
], 34));
|
|
418
418
|
}
|
|
419
|
-
}), Ie = ["stroke-width"],
|
|
419
|
+
}), Ie = ["stroke-width"], Oe = {
|
|
420
420
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
421
421
|
style: { "background-color": "#f7f7f7" }
|
|
422
|
-
},
|
|
422
|
+
}, De = /* @__PURE__ */ O({
|
|
423
423
|
__name: "Loader",
|
|
424
424
|
props: {
|
|
425
425
|
type: { default: "circular" },
|
|
@@ -444,14 +444,14 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
444
444
|
warning: "bg-warning-500",
|
|
445
445
|
danger: "bg-danger-500",
|
|
446
446
|
info: "bg-info-500"
|
|
447
|
-
},
|
|
448
|
-
return (
|
|
447
|
+
}, n = d(() => [e[b.color]]), r = d(() => [i[b.color]]);
|
|
448
|
+
return (f, u) => t.type === "circular" ? (s(), o("div", {
|
|
449
449
|
key: 0,
|
|
450
|
-
class:
|
|
450
|
+
class: p(n.value)
|
|
451
451
|
}, [
|
|
452
452
|
(s(), o("svg", {
|
|
453
453
|
class: "animate-spin",
|
|
454
|
-
style:
|
|
454
|
+
style: R({ width: t.size, height: t.size }),
|
|
455
455
|
viewBox: "0 0 24 24"
|
|
456
456
|
}, [
|
|
457
457
|
l("circle", {
|
|
@@ -463,7 +463,7 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
463
463
|
"stroke-width": t.strokeWidth,
|
|
464
464
|
fill: "none"
|
|
465
465
|
}, null, 8, Ie),
|
|
466
|
-
|
|
466
|
+
u[0] || (u[0] = l("path", {
|
|
467
467
|
class: "opacity-75",
|
|
468
468
|
fill: "currentColor",
|
|
469
469
|
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"
|
|
@@ -472,20 +472,20 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
472
472
|
], 2)) : t.type === "linear" ? (s(), o("div", {
|
|
473
473
|
key: 1,
|
|
474
474
|
class: "w-full",
|
|
475
|
-
style:
|
|
475
|
+
style: R({ height: t.height })
|
|
476
476
|
}, [
|
|
477
|
-
l("div",
|
|
477
|
+
l("div", Oe, [
|
|
478
478
|
l("div", {
|
|
479
|
-
class:
|
|
480
|
-
style:
|
|
479
|
+
class: p([r.value, "h-full rounded-lg animate-linear-loader"]),
|
|
480
|
+
style: R({ width: t.progress ? `${t.progress}%` : void 0 })
|
|
481
481
|
}, null, 6)
|
|
482
482
|
])
|
|
483
|
-
], 4)) :
|
|
483
|
+
], 4)) : g("", !0);
|
|
484
484
|
}
|
|
485
|
-
}),
|
|
485
|
+
}), ns = /* @__PURE__ */ N(De, [["__scopeId", "data-v-8df4ec38"]]), Ae = ["disabled", "aria-expanded"], Ee = ["disabled", "onClick"], Pe = {
|
|
486
486
|
key: 0,
|
|
487
487
|
class: "flex-shrink-0"
|
|
488
|
-
},
|
|
488
|
+
}, He = ["innerHTML"], We = { class: "flex-1 min-w-0 mr-2" }, Fe = { class: "flex flex-col items-start" }, Ne = ["title"], Re = ["title"], Ke = {
|
|
489
489
|
key: 1,
|
|
490
490
|
class: "flex-shrink-0"
|
|
491
491
|
}, qe = {
|
|
@@ -497,7 +497,7 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
497
497
|
fill: "none",
|
|
498
498
|
stroke: "currentColor",
|
|
499
499
|
viewBox: "0 0 24 24"
|
|
500
|
-
}, Qe = /* @__PURE__ */
|
|
500
|
+
}, Qe = /* @__PURE__ */ O({
|
|
501
501
|
__name: "Menu",
|
|
502
502
|
props: {
|
|
503
503
|
items: { default: () => [] },
|
|
@@ -517,234 +517,234 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
517
517
|
},
|
|
518
518
|
emits: ["open", "close", "select"],
|
|
519
519
|
setup(t, { emit: b }) {
|
|
520
|
-
const e = t, i = b,
|
|
520
|
+
const e = t, i = b, n = P(!1), r = P(null), f = P(null), u = P({}), v = d(() => [
|
|
521
521
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
522
522
|
"bg-white border border-secondary-300 rounded-md",
|
|
523
523
|
"hover:bg-secondary-50 focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
524
524
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
525
525
|
"transition-colors"
|
|
526
|
-
].join(" ")),
|
|
526
|
+
].join(" ")), x = d(() => [...[
|
|
527
527
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
528
528
|
"flex flex-col",
|
|
529
529
|
"focus:outline-none"
|
|
530
|
-
], `z-${e.zIndex}`].join(" ")),
|
|
531
|
-
const
|
|
530
|
+
], `z-${e.zIndex}`].join(" ")), y = d(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), c = d(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), _ = d(() => "py-1 overflow-y-auto flex-1 min-h-0"), C = d(() => "my-1 border-t border-secondary-200"), S = d(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), V = (a) => {
|
|
531
|
+
const T = [
|
|
532
532
|
"w-full flex items-center gap-3 px-4 py-2 text-sm text-left",
|
|
533
533
|
"transition-colors focus:outline-none",
|
|
534
534
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
535
|
-
],
|
|
535
|
+
], m = a.variant || "default", K = {
|
|
536
536
|
default: "text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50",
|
|
537
537
|
danger: "text-danger-600 hover:bg-danger-50 focus:bg-danger-50",
|
|
538
538
|
success: "text-success-600 hover:bg-success-50 focus:bg-success-50",
|
|
539
539
|
warning: "text-warning-600 hover:bg-warning-50 focus:bg-warning-50"
|
|
540
540
|
};
|
|
541
|
-
let
|
|
542
|
-
return
|
|
543
|
-
},
|
|
544
|
-
e.disabled || (
|
|
545
|
-
},
|
|
546
|
-
|
|
547
|
-
|
|
541
|
+
let L = "";
|
|
542
|
+
return a.color && (L = a.color, (a.color.includes("white") || a.color.includes("50")) && (L += " hover:text-black")), [...T, L || K[m]].join(" ");
|
|
543
|
+
}, z = () => {
|
|
544
|
+
e.disabled || (n.value ? k() : h());
|
|
545
|
+
}, h = () => {
|
|
546
|
+
n.value = !0, i("open"), Z(() => {
|
|
547
|
+
M(), document.addEventListener("click", I), document.addEventListener("keydown", H);
|
|
548
548
|
});
|
|
549
|
-
}, B = () => {
|
|
550
|
-
a.value = !1, i("close"), document.removeEventListener("click", j), document.removeEventListener("keydown", O);
|
|
551
|
-
}, M = (n) => {
|
|
552
|
-
n.disabled || (n.action && n.action(), i("select", n), e.closeOnClick && !n.children && B());
|
|
553
|
-
}, j = (n) => {
|
|
554
|
-
const $ = n.target;
|
|
555
|
-
d.value && !d.value.contains($) && r.value && !r.value.contains($) && B();
|
|
556
|
-
}, O = (n) => {
|
|
557
|
-
n.key === "Escape" && B();
|
|
558
|
-
}, x = (n) => {
|
|
559
|
-
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), P());
|
|
560
549
|
}, k = () => {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
550
|
+
n.value = !1, i("close"), document.removeEventListener("click", I), document.removeEventListener("keydown", H);
|
|
551
|
+
}, j = (a) => {
|
|
552
|
+
a.disabled || (a.action && a.action(), i("select", a), e.closeOnClick && !a.children && k());
|
|
553
|
+
}, I = (a) => {
|
|
554
|
+
const T = a.target;
|
|
555
|
+
r.value && !r.value.contains(T) && f.value && !f.value.contains(T) && k();
|
|
556
|
+
}, H = (a) => {
|
|
557
|
+
a.key === "Escape" && k();
|
|
558
|
+
}, $ = (a) => {
|
|
559
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), z());
|
|
560
|
+
}, M = () => {
|
|
561
|
+
if (!r.value || !f.value) return;
|
|
562
|
+
const a = r.value.getBoundingClientRect(), T = f.value.getBoundingClientRect(), m = window.innerWidth, K = window.innerHeight;
|
|
563
|
+
let L = 0, D = 0;
|
|
564
564
|
switch (e.position) {
|
|
565
565
|
case "bottom-start":
|
|
566
|
-
|
|
566
|
+
L = a.bottom + e.offset.y, D = a.left + e.offset.x;
|
|
567
567
|
break;
|
|
568
568
|
case "bottom-end":
|
|
569
|
-
|
|
569
|
+
L = a.bottom + e.offset.y, D = a.right - T.width + e.offset.x;
|
|
570
570
|
break;
|
|
571
571
|
case "top-start":
|
|
572
|
-
|
|
572
|
+
L = a.top - T.height - e.offset.y, D = a.left + e.offset.x;
|
|
573
573
|
break;
|
|
574
574
|
case "top-end":
|
|
575
|
-
|
|
575
|
+
L = a.top - T.height - e.offset.y, D = a.right - T.width + e.offset.x;
|
|
576
576
|
break;
|
|
577
577
|
case "right-start":
|
|
578
|
-
|
|
578
|
+
L = a.top + e.offset.y, D = a.right + e.offset.x;
|
|
579
579
|
break;
|
|
580
580
|
case "right-end":
|
|
581
|
-
|
|
581
|
+
L = a.bottom - T.height + e.offset.y, D = a.right + e.offset.x;
|
|
582
582
|
break;
|
|
583
583
|
case "left-start":
|
|
584
|
-
|
|
584
|
+
L = a.top + e.offset.y, D = a.left - T.width - e.offset.x;
|
|
585
585
|
break;
|
|
586
586
|
case "left-end":
|
|
587
|
-
|
|
587
|
+
L = a.bottom - T.height + e.offset.y, D = a.left - T.width - e.offset.x;
|
|
588
588
|
break;
|
|
589
589
|
}
|
|
590
|
-
|
|
591
|
-
top: `${
|
|
592
|
-
left: `${
|
|
593
|
-
width: e.width === "auto" ? `${Math.max(
|
|
590
|
+
D + T.width > m && (D = m - T.width - 8), D < 8 && (D = 8), L + T.height > K && (L = K - T.height - 8), L < 8 && (L = 8), u.value = {
|
|
591
|
+
top: `${L}px`,
|
|
592
|
+
left: `${D}px`,
|
|
593
|
+
width: e.width === "auto" ? `${Math.max(a.width, 240)}px` : e.width,
|
|
594
594
|
maxHeight: e.maxHeight,
|
|
595
595
|
minWidth: "240px"
|
|
596
596
|
};
|
|
597
597
|
};
|
|
598
598
|
return ee(() => {
|
|
599
|
-
window.addEventListener("scroll",
|
|
599
|
+
window.addEventListener("scroll", M, !0), window.addEventListener("resize", M);
|
|
600
600
|
}), te(() => {
|
|
601
|
-
window.removeEventListener("scroll",
|
|
601
|
+
window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M), document.removeEventListener("click", I), document.removeEventListener("keydown", H);
|
|
602
602
|
}), X(() => e.items, () => {
|
|
603
|
-
|
|
604
|
-
}, { deep: !0 }), (
|
|
605
|
-
class:
|
|
603
|
+
n.value && Z(M);
|
|
604
|
+
}, { deep: !0 }), (a, T) => (s(), o("div", {
|
|
605
|
+
class: p(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
606
606
|
}, [
|
|
607
607
|
l("div", {
|
|
608
608
|
ref_key: "triggerRef",
|
|
609
|
-
ref:
|
|
609
|
+
ref: r
|
|
610
610
|
}, [
|
|
611
|
-
|
|
612
|
-
isOpen:
|
|
613
|
-
toggle:
|
|
611
|
+
B(a.$slots, "trigger", {
|
|
612
|
+
isOpen: n.value,
|
|
613
|
+
toggle: z
|
|
614
614
|
}, () => [
|
|
615
615
|
l("button", {
|
|
616
616
|
type: "button",
|
|
617
|
-
class:
|
|
617
|
+
class: p(v.value),
|
|
618
618
|
disabled: t.disabled,
|
|
619
|
-
onClick:
|
|
620
|
-
onKeydown:
|
|
619
|
+
onClick: z,
|
|
620
|
+
onKeydown: $,
|
|
621
621
|
tabindex: 0,
|
|
622
622
|
role: "button",
|
|
623
|
-
"aria-expanded":
|
|
623
|
+
"aria-expanded": n.value,
|
|
624
624
|
"aria-haspopup": !0
|
|
625
625
|
}, [
|
|
626
|
-
|
|
626
|
+
B(a.$slots, "trigger-content", {}, () => [
|
|
627
627
|
E(w(t.triggerText), 1)
|
|
628
628
|
], !0),
|
|
629
629
|
t.showChevron ? (s(), o("svg", {
|
|
630
630
|
key: 0,
|
|
631
|
-
class:
|
|
631
|
+
class: p(["w-4 h-4 ml-2 transition-transform", n.value ? "rotate-180" : ""]),
|
|
632
632
|
fill: "none",
|
|
633
633
|
stroke: "currentColor",
|
|
634
634
|
viewBox: "0 0 24 24"
|
|
635
|
-
}, [
|
|
635
|
+
}, [...T[1] || (T[1] = [
|
|
636
636
|
l("path", {
|
|
637
637
|
"stroke-linecap": "round",
|
|
638
638
|
"stroke-linejoin": "round",
|
|
639
639
|
"stroke-width": "2",
|
|
640
640
|
d: "M19 9l-7 7-7-7"
|
|
641
641
|
}, null, -1)
|
|
642
|
-
])], 2)) :
|
|
643
|
-
], 42,
|
|
642
|
+
])], 2)) : g("", !0)
|
|
643
|
+
], 42, Ae)
|
|
644
644
|
], !0)
|
|
645
645
|
], 512),
|
|
646
646
|
(s(), q(J, { to: "body" }, [
|
|
647
|
-
|
|
647
|
+
n.value ? (s(), o("div", {
|
|
648
648
|
key: 0,
|
|
649
649
|
ref_key: "menuRef",
|
|
650
|
-
ref:
|
|
651
|
-
class:
|
|
652
|
-
style:
|
|
653
|
-
onClick:
|
|
650
|
+
ref: f,
|
|
651
|
+
class: p(x.value),
|
|
652
|
+
style: R(u.value),
|
|
653
|
+
onClick: T[0] || (T[0] = F(() => {
|
|
654
654
|
}, ["stop"]))
|
|
655
655
|
}, [
|
|
656
|
-
|
|
656
|
+
a.$slots.header ? (s(), o("div", {
|
|
657
657
|
key: 0,
|
|
658
|
-
class:
|
|
658
|
+
class: p(y.value)
|
|
659
659
|
}, [
|
|
660
|
-
|
|
661
|
-
], 2)) :
|
|
660
|
+
B(a.$slots, "header", { close: k }, void 0, !0)
|
|
661
|
+
], 2)) : g("", !0),
|
|
662
662
|
l("div", {
|
|
663
|
-
class:
|
|
663
|
+
class: p(_.value)
|
|
664
664
|
}, [
|
|
665
|
-
|
|
666
|
-
close:
|
|
667
|
-
isOpen:
|
|
665
|
+
B(a.$slots, "default", {
|
|
666
|
+
close: k,
|
|
667
|
+
isOpen: n.value
|
|
668
668
|
}, () => [
|
|
669
|
-
(s(!0), o(
|
|
670
|
-
key:
|
|
669
|
+
(s(!0), o(A, null, W(t.items, (m, K) => (s(), o(A, {
|
|
670
|
+
key: m.id || K
|
|
671
671
|
}, [
|
|
672
|
-
|
|
672
|
+
m.type === "divider" ? (s(), o("div", {
|
|
673
673
|
key: 0,
|
|
674
|
-
class:
|
|
675
|
-
}, null, 2)) :
|
|
674
|
+
class: p(C.value)
|
|
675
|
+
}, null, 2)) : m.type === "header" ? (s(), o("div", {
|
|
676
676
|
key: 1,
|
|
677
|
-
class:
|
|
678
|
-
}, w(
|
|
677
|
+
class: p(S.value)
|
|
678
|
+
}, w(m.label), 3)) : (s(), o("button", {
|
|
679
679
|
key: 2,
|
|
680
680
|
type: "button",
|
|
681
|
-
class:
|
|
682
|
-
disabled:
|
|
683
|
-
onClick: (
|
|
681
|
+
class: p(V(m)),
|
|
682
|
+
disabled: m.disabled,
|
|
683
|
+
onClick: (L) => j(m)
|
|
684
684
|
}, [
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
typeof
|
|
685
|
+
m.icon || a.$slots[`icon-${m.id}`] ? (s(), o("span", Pe, [
|
|
686
|
+
B(a.$slots, `icon-${m.id}`, { item: m }, () => [
|
|
687
|
+
typeof m.icon != "string" ? (s(), q(Y(m.icon), {
|
|
688
688
|
key: 0,
|
|
689
689
|
class: "w-5 h-5"
|
|
690
690
|
})) : (s(), o("span", {
|
|
691
691
|
key: 1,
|
|
692
|
-
innerHTML:
|
|
692
|
+
innerHTML: m.icon,
|
|
693
693
|
class: "w-5 h-5 inline-block"
|
|
694
|
-
}, null, 8,
|
|
694
|
+
}, null, 8, He))
|
|
695
695
|
], !0)
|
|
696
|
-
])) :
|
|
697
|
-
l("div",
|
|
698
|
-
|
|
699
|
-
item:
|
|
700
|
-
close:
|
|
696
|
+
])) : g("", !0),
|
|
697
|
+
l("div", We, [
|
|
698
|
+
B(a.$slots, `item-${m.id}`, {
|
|
699
|
+
item: m,
|
|
700
|
+
close: k
|
|
701
701
|
}, () => [
|
|
702
|
-
l("div",
|
|
702
|
+
l("div", Fe, [
|
|
703
703
|
l("span", {
|
|
704
704
|
class: "truncate w-full",
|
|
705
|
-
title:
|
|
706
|
-
}, w(
|
|
707
|
-
|
|
705
|
+
title: m.label
|
|
706
|
+
}, w(m.label), 9, Ne),
|
|
707
|
+
m.description ? (s(), o("span", {
|
|
708
708
|
key: 0,
|
|
709
709
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
710
|
-
title:
|
|
711
|
-
}, w(
|
|
710
|
+
title: m.description
|
|
711
|
+
}, w(m.description), 9, Re)) : g("", !0)
|
|
712
712
|
])
|
|
713
713
|
], !0)
|
|
714
714
|
]),
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
715
|
+
m.suffix || m.shortcut || a.$slots[`suffix-${m.id}`] ? (s(), o("span", Ke, [
|
|
716
|
+
B(a.$slots, `suffix-${m.id}`, { item: m }, () => [
|
|
717
|
+
m.shortcut ? (s(), o("span", qe, w(m.shortcut), 1)) : m.suffix ? (s(), o("span", Ue, w(m.suffix), 1)) : g("", !0)
|
|
718
718
|
], !0)
|
|
719
|
-
])) :
|
|
720
|
-
|
|
719
|
+
])) : g("", !0),
|
|
720
|
+
m.children && m.children.length > 0 ? (s(), o("svg", Ge, [...T[2] || (T[2] = [
|
|
721
721
|
l("path", {
|
|
722
722
|
"stroke-linecap": "round",
|
|
723
723
|
"stroke-linejoin": "round",
|
|
724
724
|
"stroke-width": "2",
|
|
725
725
|
d: "M9 5l7 7-7 7"
|
|
726
726
|
}, null, -1)
|
|
727
|
-
])])) :
|
|
728
|
-
], 10,
|
|
727
|
+
])])) : g("", !0)
|
|
728
|
+
], 10, Ee))
|
|
729
729
|
], 64))), 128))
|
|
730
730
|
], !0)
|
|
731
731
|
], 2),
|
|
732
|
-
|
|
732
|
+
a.$slots.footer ? (s(), o("div", {
|
|
733
733
|
key: 1,
|
|
734
|
-
class:
|
|
734
|
+
class: p(c.value)
|
|
735
735
|
}, [
|
|
736
|
-
|
|
737
|
-
], 2)) :
|
|
738
|
-
], 6)) :
|
|
739
|
-
|
|
736
|
+
B(a.$slots, "footer", { close: k }, void 0, !0)
|
|
737
|
+
], 2)) : g("", !0)
|
|
738
|
+
], 6)) : g("", !0),
|
|
739
|
+
n.value && t.overlay ? (s(), o("div", {
|
|
740
740
|
key: 1,
|
|
741
741
|
class: "fixed inset-0 bg-black/20 z-40",
|
|
742
|
-
onClick:
|
|
743
|
-
})) :
|
|
742
|
+
onClick: k
|
|
743
|
+
})) : g("", !0)
|
|
744
744
|
]))
|
|
745
745
|
], 2));
|
|
746
746
|
}
|
|
747
|
-
}),
|
|
747
|
+
}), rs = /* @__PURE__ */ N(Qe, [["__scopeId", "data-v-335f2699"]]), Ze = ["for"], Je = {
|
|
748
748
|
key: 0,
|
|
749
749
|
class: "text-danger-600"
|
|
750
750
|
}, Xe = { class: "relative" }, Ye = ["id", "disabled", "aria-expanded"], et = { class: "flex-1 text-left truncate" }, tt = {
|
|
@@ -753,7 +753,7 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
753
753
|
}, st = ["placeholder"], ot = { class: "max-h-64 overflow-y-auto" }, lt = {
|
|
754
754
|
key: 0,
|
|
755
755
|
class: "px-4 py-3 text-sm text-secondary-500 text-center"
|
|
756
|
-
},
|
|
756
|
+
}, at = ["onClick"], nt = { class: "flex items-center justify-between w-full" }, rt = { class: "truncate" }, it = {
|
|
757
757
|
key: 0,
|
|
758
758
|
class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
|
|
759
759
|
fill: "none",
|
|
@@ -769,7 +769,7 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
769
769
|
}, pt = {
|
|
770
770
|
key: 2,
|
|
771
771
|
class: "mt-1 text-sm text-secondary-600"
|
|
772
|
-
}, gt = /* @__PURE__ */
|
|
772
|
+
}, gt = /* @__PURE__ */ O({
|
|
773
773
|
__name: "Select",
|
|
774
774
|
props: {
|
|
775
775
|
modelValue: { default: null },
|
|
@@ -791,87 +791,87 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
791
791
|
},
|
|
792
792
|
emits: ["update:modelValue", "change", "action"],
|
|
793
793
|
setup(t, { emit: b }) {
|
|
794
|
-
const e = t, i = b,
|
|
794
|
+
const e = t, i = b, n = P(!1), r = P(""), f = P(null), u = d(
|
|
795
795
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
796
|
-
),
|
|
797
|
-
if (!e.searchable || !
|
|
796
|
+
), v = d(() => e.options.find(($) => $.value === e.modelValue) || null), x = d(() => {
|
|
797
|
+
if (!e.searchable || !r.value)
|
|
798
798
|
return e.options;
|
|
799
|
-
const
|
|
800
|
-
return e.options.filter((
|
|
801
|
-
}),
|
|
802
|
-
const
|
|
799
|
+
const $ = r.value.toLowerCase();
|
|
800
|
+
return e.options.filter((M) => M.label.toLowerCase().includes($));
|
|
801
|
+
}), y = d(() => "block text-sm font-semibold text-secondary-700 mb-1"), c = d(() => {
|
|
802
|
+
const $ = "w-full flex items-center justify-between gap-2 border rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", M = {
|
|
803
803
|
sm: "px-3 py-1.5 text-sm",
|
|
804
804
|
md: "px-4 py-2 text-base",
|
|
805
805
|
lg: "px-5 py-3 text-lg"
|
|
806
|
-
},
|
|
806
|
+
}, a = {
|
|
807
807
|
default: "bg-white border-secondary-300 hover:border-secondary-400",
|
|
808
808
|
outline: "bg-transparent border-secondary-300 hover:border-primary-500",
|
|
809
809
|
filled: "bg-secondary-100 border-transparent hover:bg-secondary-200"
|
|
810
|
-
},
|
|
810
|
+
}, T = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
811
811
|
return [
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
812
|
+
$,
|
|
813
|
+
M[e.size],
|
|
814
|
+
a[e.variant],
|
|
815
|
+
T
|
|
816
816
|
].join(" ");
|
|
817
|
-
}),
|
|
818
|
-
const
|
|
819
|
-
return [
|
|
820
|
-
},
|
|
821
|
-
const
|
|
822
|
-
return
|
|
823
|
-
},
|
|
824
|
-
e.disabled || (
|
|
825
|
-
var
|
|
826
|
-
(
|
|
817
|
+
}), _ = d(() => `absolute ${e.menuPosition === "top" ? "bottom-full mb-1" : "top-full mt-1"} left-0 right-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden`), C = ($) => {
|
|
818
|
+
const M = "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", a = V($) ? "bg-primary-50" : "";
|
|
819
|
+
return [M, a].join(" ");
|
|
820
|
+
}, S = ($) => {
|
|
821
|
+
const M = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
|
|
822
|
+
return $.variant === "danger" ? `${M} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${M} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
|
|
823
|
+
}, V = ($) => $.value === e.modelValue, z = () => {
|
|
824
|
+
e.disabled || (n.value = !n.value, n.value && e.searchable && Z(() => {
|
|
825
|
+
var $;
|
|
826
|
+
($ = f.value) == null || $.focus();
|
|
827
827
|
}));
|
|
828
|
-
},
|
|
829
|
-
|
|
830
|
-
},
|
|
831
|
-
|
|
832
|
-
},
|
|
833
|
-
|
|
834
|
-
},
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
|
|
828
|
+
}, h = () => {
|
|
829
|
+
n.value = !1, r.value = "";
|
|
830
|
+
}, k = ($) => {
|
|
831
|
+
$.disabled || (i("update:modelValue", $.value), i("change", $), h());
|
|
832
|
+
}, j = ($) => {
|
|
833
|
+
$.action && $.action(), i("action", $), h();
|
|
834
|
+
}, I = ($) => {
|
|
835
|
+
const M = $.relatedTarget;
|
|
836
|
+
M && M.closest(".select-wrapper") || setTimeout(() => {
|
|
837
|
+
h();
|
|
838
838
|
}, 200);
|
|
839
|
-
},
|
|
840
|
-
|
|
839
|
+
}, H = ($) => {
|
|
840
|
+
$.key === "Escape" ? h() : ($.key === "Enter" || $.key === " ") && ($.preventDefault(), z());
|
|
841
841
|
};
|
|
842
|
-
return X(
|
|
843
|
-
|
|
844
|
-
}), (
|
|
845
|
-
class:
|
|
842
|
+
return X(n, ($) => {
|
|
843
|
+
$ && (r.value = "");
|
|
844
|
+
}), ($, M) => (s(), o("div", {
|
|
845
|
+
class: p(["select-wrapper", { "w-full": t.fullWidth }])
|
|
846
846
|
}, [
|
|
847
847
|
t.label ? (s(), o("label", {
|
|
848
848
|
key: 0,
|
|
849
|
-
for:
|
|
850
|
-
class:
|
|
849
|
+
for: u.value,
|
|
850
|
+
class: p(y.value)
|
|
851
851
|
}, [
|
|
852
852
|
E(w(t.label) + " ", 1),
|
|
853
|
-
t.required ? (s(), o("span", Je, "*")) :
|
|
854
|
-
], 10, Ze)) :
|
|
853
|
+
t.required ? (s(), o("span", Je, "*")) : g("", !0)
|
|
854
|
+
], 10, Ze)) : g("", !0),
|
|
855
855
|
l("div", Xe, [
|
|
856
856
|
l("button", {
|
|
857
|
-
id:
|
|
857
|
+
id: u.value,
|
|
858
858
|
type: "button",
|
|
859
|
-
class:
|
|
859
|
+
class: p(c.value),
|
|
860
860
|
disabled: t.disabled,
|
|
861
|
-
"aria-expanded":
|
|
861
|
+
"aria-expanded": n.value,
|
|
862
862
|
"aria-haspopup": !0,
|
|
863
|
-
onClick:
|
|
864
|
-
onBlur:
|
|
865
|
-
onKeydown:
|
|
863
|
+
onClick: z,
|
|
864
|
+
onBlur: I,
|
|
865
|
+
onKeydown: H
|
|
866
866
|
}, [
|
|
867
|
-
l("span", et, w(
|
|
867
|
+
l("span", et, w(v.value ? v.value.label : t.placeholder), 1),
|
|
868
868
|
(s(), o("svg", {
|
|
869
|
-
class:
|
|
869
|
+
class: p(["w-5 h-5 flex-shrink-0 transition-transform text-secondary-600", n.value ? "rotate-180" : ""]),
|
|
870
870
|
fill: "none",
|
|
871
871
|
stroke: "currentColor",
|
|
872
872
|
viewBox: "0 0 24 24",
|
|
873
873
|
xmlns: "http://www.w3.org/2000/svg"
|
|
874
|
-
}, [...
|
|
874
|
+
}, [...M[3] || (M[3] = [
|
|
875
875
|
l("path", {
|
|
876
876
|
"stroke-linecap": "round",
|
|
877
877
|
"stroke-linejoin": "round",
|
|
@@ -880,77 +880,77 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
880
880
|
}, null, -1)
|
|
881
881
|
])], 2))
|
|
882
882
|
], 42, Ye),
|
|
883
|
-
|
|
883
|
+
n.value ? (s(), o("div", {
|
|
884
884
|
key: 0,
|
|
885
|
-
class:
|
|
886
|
-
onClick:
|
|
885
|
+
class: p(_.value),
|
|
886
|
+
onClick: M[2] || (M[2] = F(() => {
|
|
887
887
|
}, ["stop"]))
|
|
888
888
|
}, [
|
|
889
889
|
t.searchable ? (s(), o("div", tt, [
|
|
890
890
|
se(l("input", {
|
|
891
891
|
ref_key: "searchInput",
|
|
892
|
-
ref:
|
|
893
|
-
"onUpdate:modelValue":
|
|
892
|
+
ref: f,
|
|
893
|
+
"onUpdate:modelValue": M[0] || (M[0] = (a) => r.value = a),
|
|
894
894
|
type: "text",
|
|
895
895
|
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",
|
|
896
896
|
placeholder: t.searchPlaceholder,
|
|
897
|
-
onKeydown:
|
|
897
|
+
onKeydown: M[1] || (M[1] = F(() => {
|
|
898
898
|
}, ["stop"]))
|
|
899
899
|
}, null, 40, st), [
|
|
900
|
-
[oe,
|
|
900
|
+
[oe, r.value]
|
|
901
901
|
])
|
|
902
|
-
])) :
|
|
902
|
+
])) : g("", !0),
|
|
903
903
|
l("div", ot, [
|
|
904
|
-
|
|
905
|
-
(s(!0), o(
|
|
906
|
-
key:
|
|
904
|
+
x.value.length === 0 ? (s(), o("div", lt, w(t.emptyText), 1)) : (s(), o(A, { key: 1 }, [
|
|
905
|
+
(s(!0), o(A, null, W(x.value, (a) => (s(), o("button", {
|
|
906
|
+
key: a.value,
|
|
907
907
|
type: "button",
|
|
908
|
-
class:
|
|
909
|
-
onClick: (
|
|
908
|
+
class: p(C(a)),
|
|
909
|
+
onClick: (T) => k(a)
|
|
910
910
|
}, [
|
|
911
|
-
l("div",
|
|
912
|
-
l("span", rt, w(
|
|
913
|
-
|
|
911
|
+
l("div", nt, [
|
|
912
|
+
l("span", rt, w(a.label), 1),
|
|
913
|
+
V(a) ? (s(), o("svg", it, [...M[4] || (M[4] = [
|
|
914
914
|
l("path", {
|
|
915
915
|
"stroke-linecap": "round",
|
|
916
916
|
"stroke-linejoin": "round",
|
|
917
917
|
"stroke-width": "2",
|
|
918
918
|
d: "M5 13l4 4L19 7"
|
|
919
919
|
}, null, -1)
|
|
920
|
-
])])) :
|
|
920
|
+
])])) : g("", !0)
|
|
921
921
|
])
|
|
922
|
-
], 10,
|
|
923
|
-
t.actionItems.length > 0 ? (s(), o("div", dt)) :
|
|
924
|
-
(s(!0), o(
|
|
925
|
-
key:
|
|
922
|
+
], 10, at))), 128)),
|
|
923
|
+
t.actionItems.length > 0 ? (s(), o("div", dt)) : g("", !0),
|
|
924
|
+
(s(!0), o(A, null, W(t.actionItems, (a) => (s(), o("button", {
|
|
925
|
+
key: a.id,
|
|
926
926
|
type: "button",
|
|
927
|
-
class:
|
|
928
|
-
onClick: (
|
|
927
|
+
class: p(S(a)),
|
|
928
|
+
onClick: (T) => j(a)
|
|
929
929
|
}, [
|
|
930
|
-
|
|
930
|
+
a.icon ? (s(), o("svg", {
|
|
931
931
|
key: 0,
|
|
932
932
|
class: "w-4 h-4 flex-shrink-0",
|
|
933
933
|
fill: "none",
|
|
934
934
|
stroke: "currentColor",
|
|
935
935
|
viewBox: "0 0 24 24",
|
|
936
936
|
xmlns: "http://www.w3.org/2000/svg",
|
|
937
|
-
innerHTML:
|
|
938
|
-
}, null, 8, ct)) :
|
|
939
|
-
E(" " + w(
|
|
937
|
+
innerHTML: a.icon
|
|
938
|
+
}, null, 8, ct)) : g("", !0),
|
|
939
|
+
E(" " + w(a.label), 1)
|
|
940
940
|
], 10, ut))), 128))
|
|
941
941
|
], 64))
|
|
942
942
|
])
|
|
943
|
-
], 2)) :
|
|
943
|
+
], 2)) : g("", !0)
|
|
944
944
|
]),
|
|
945
|
-
t.error ? (s(), o("p", ft, w(t.error), 1)) : t.helperText ? (s(), o("p", pt, w(t.helperText), 1)) :
|
|
946
|
-
|
|
945
|
+
t.error ? (s(), o("p", ft, w(t.error), 1)) : t.helperText ? (s(), o("p", pt, w(t.helperText), 1)) : g("", !0),
|
|
946
|
+
n.value ? (s(), o("div", {
|
|
947
947
|
key: 3,
|
|
948
|
-
onClick:
|
|
948
|
+
onClick: h,
|
|
949
949
|
class: "fixed inset-0 z-40"
|
|
950
|
-
})) :
|
|
950
|
+
})) : g("", !0)
|
|
951
951
|
], 2));
|
|
952
952
|
}
|
|
953
|
-
}),
|
|
953
|
+
}), is = /* @__PURE__ */ N(gt, [["__scopeId", "data-v-f016a03c"]]), vt = /* @__PURE__ */ O({
|
|
954
954
|
__name: "Sidebar",
|
|
955
955
|
props: {
|
|
956
956
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -966,55 +966,57 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
966
966
|
},
|
|
967
967
|
emits: ["update:modelValue", "close", "open"],
|
|
968
968
|
setup(t, { emit: b }) {
|
|
969
|
-
const e = t, i = b,
|
|
969
|
+
const e = t, i = b, n = d({
|
|
970
970
|
get: () => e.modelValue,
|
|
971
|
-
set: (
|
|
972
|
-
}),
|
|
973
|
-
e.persistent || (
|
|
974
|
-
},
|
|
975
|
-
const
|
|
976
|
-
return [
|
|
977
|
-
}),
|
|
978
|
-
width
|
|
971
|
+
set: (C) => i("update:modelValue", C)
|
|
972
|
+
}), r = () => {
|
|
973
|
+
e.persistent || (n.value = !1, i("close"));
|
|
974
|
+
}, f = d(() => e.position === "left" ? "slide-right" : "slide-left"), u = d(() => {
|
|
975
|
+
const C = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none", S = e.position === "left" ? "left-0" : "right-0", V = 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)]" : "";
|
|
976
|
+
return [C, S, V].filter(Boolean).join(" ");
|
|
977
|
+
}), v = d(() => ({
|
|
978
|
+
// Base fluid width; respect custom width as max constraint
|
|
979
|
+
width: "100%",
|
|
980
|
+
maxWidth: e.width,
|
|
979
981
|
backgroundColor: e.backgroundColor,
|
|
980
982
|
top: e.overlayTop,
|
|
981
983
|
height: e.overlayTop !== "0" ? `calc(100vh - ${e.overlayTop})` : "100vh"
|
|
982
|
-
})),
|
|
984
|
+
})), x = {
|
|
983
985
|
none: "",
|
|
984
986
|
sm: "p-2",
|
|
985
987
|
md: "p-4",
|
|
986
988
|
lg: "p-6"
|
|
987
|
-
},
|
|
988
|
-
return (
|
|
989
|
+
}, y = d(() => `flex items-center justify-between border-b border-gray-200 ${x[e.padding]}`), c = d(() => `flex-1 overflow-y-auto ${x[e.padding]}`), _ = d(() => `border-t border-gray-200 ${x[e.padding]}`);
|
|
990
|
+
return (C, S) => (s(), q(J, { to: "body" }, [
|
|
989
991
|
G(Q, { name: "fade" }, {
|
|
990
992
|
default: U(() => [
|
|
991
|
-
|
|
993
|
+
n.value && t.overlay ? (s(), o("div", {
|
|
992
994
|
key: 0,
|
|
993
|
-
onClick:
|
|
995
|
+
onClick: r,
|
|
994
996
|
class: "fixed inset-0 bg-black/50 z-40",
|
|
995
|
-
style:
|
|
996
|
-
}, null, 4)) :
|
|
997
|
+
style: R({ top: t.overlayTop })
|
|
998
|
+
}, null, 4)) : g("", !0)
|
|
997
999
|
]),
|
|
998
1000
|
_: 1
|
|
999
1001
|
}),
|
|
1000
|
-
G(Q, { name:
|
|
1002
|
+
G(Q, { name: f.value }, {
|
|
1001
1003
|
default: U(() => [
|
|
1002
|
-
|
|
1004
|
+
n.value ? (s(), o("aside", {
|
|
1003
1005
|
key: 0,
|
|
1004
|
-
class:
|
|
1005
|
-
style:
|
|
1006
|
+
class: p(u.value),
|
|
1007
|
+
style: R(v.value)
|
|
1006
1008
|
}, [
|
|
1007
|
-
|
|
1009
|
+
C.$slots.header ? (s(), o("div", {
|
|
1008
1010
|
key: 0,
|
|
1009
|
-
class:
|
|
1011
|
+
class: p(y.value)
|
|
1010
1012
|
}, [
|
|
1011
|
-
C
|
|
1013
|
+
B(C.$slots, "header", {}, void 0, !0),
|
|
1012
1014
|
t.closable ? (s(), o("button", {
|
|
1013
1015
|
key: 0,
|
|
1014
|
-
onClick:
|
|
1016
|
+
onClick: r,
|
|
1015
1017
|
class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
|
|
1016
1018
|
"aria-label": "Cerrar menú"
|
|
1017
|
-
}, [...
|
|
1019
|
+
}, [...S[0] || (S[0] = [
|
|
1018
1020
|
l("svg", {
|
|
1019
1021
|
class: "w-5 h-5",
|
|
1020
1022
|
fill: "none",
|
|
@@ -1028,35 +1030,38 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1028
1030
|
d: "M6 18L18 6M6 6l12 12"
|
|
1029
1031
|
})
|
|
1030
1032
|
], -1)
|
|
1031
|
-
])])) :
|
|
1032
|
-
], 2)) :
|
|
1033
|
+
])])) : g("", !0)
|
|
1034
|
+
], 2)) : g("", !0),
|
|
1033
1035
|
l("div", {
|
|
1034
|
-
class:
|
|
1036
|
+
class: p(c.value)
|
|
1035
1037
|
}, [
|
|
1036
|
-
C
|
|
1038
|
+
B(C.$slots, "default", {}, void 0, !0)
|
|
1037
1039
|
], 2),
|
|
1038
|
-
|
|
1040
|
+
C.$slots.footer ? (s(), o("div", {
|
|
1039
1041
|
key: 1,
|
|
1040
|
-
class:
|
|
1042
|
+
class: p(_.value)
|
|
1041
1043
|
}, [
|
|
1042
|
-
C
|
|
1043
|
-
], 2)) :
|
|
1044
|
-
], 6)) :
|
|
1044
|
+
B(C.$slots, "footer", {}, void 0, !0)
|
|
1045
|
+
], 2)) : g("", !0)
|
|
1046
|
+
], 6)) : g("", !0)
|
|
1045
1047
|
]),
|
|
1046
1048
|
_: 3
|
|
1047
1049
|
}, 8, ["name"])
|
|
1048
1050
|
]));
|
|
1049
1051
|
}
|
|
1050
|
-
}),
|
|
1052
|
+
}), ds = /* @__PURE__ */ N(vt, [["__scopeId", "data-v-b208234c"]]), xt = { class: "w-full space-y-4" }, bt = { class: "flex flex-col gap-3 md:hidden" }, ht = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, yt = { class: "text-sm text-gray-700" }, mt = {
|
|
1053
|
+
key: 0,
|
|
1054
|
+
class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
|
|
1055
|
+
}, wt = { class: "hidden md:block w-full overflow-x-auto" }, kt = { class: "w-full border-collapse" }, $t = { class: "w-full" }, Ct = ["onClick"], Bt = { class: "flex items-center gap-2" }, Mt = {
|
|
1051
1056
|
key: 0,
|
|
1052
1057
|
class: "text-xs text-gray-400"
|
|
1053
|
-
},
|
|
1058
|
+
}, Tt = { key: 0 }, _t = { key: 1 }, zt = { class: "w-full" }, jt = {
|
|
1054
1059
|
key: 0,
|
|
1055
1060
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
1056
|
-
},
|
|
1057
|
-
key:
|
|
1061
|
+
}, Vt = {
|
|
1062
|
+
key: 0,
|
|
1058
1063
|
class: "w-full px-6 py-4 bg-white"
|
|
1059
|
-
},
|
|
1064
|
+
}, St = /* @__PURE__ */ O({
|
|
1060
1065
|
__name: "Table",
|
|
1061
1066
|
props: {
|
|
1062
1067
|
columns: {},
|
|
@@ -1067,84 +1072,112 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1067
1072
|
rowClass: { default: void 0 }
|
|
1068
1073
|
},
|
|
1069
1074
|
setup(t) {
|
|
1070
|
-
const b = t, e =
|
|
1071
|
-
e.value ===
|
|
1072
|
-
},
|
|
1075
|
+
const b = t, e = P(null), i = P("asc"), n = (u) => {
|
|
1076
|
+
e.value === u ? i.value = i.value === "asc" ? "desc" : "asc" : (e.value = u, i.value = "asc");
|
|
1077
|
+
}, r = d(() => {
|
|
1073
1078
|
if (!e.value)
|
|
1074
1079
|
return b.data;
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
1077
|
-
const y =
|
|
1078
|
-
return typeof y == "string" && typeof
|
|
1079
|
-
}),
|
|
1080
|
-
});
|
|
1081
|
-
return (
|
|
1082
|
-
l("
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1080
|
+
const u = [...b.data];
|
|
1081
|
+
return u.sort((v, x) => {
|
|
1082
|
+
const y = v[e.value], c = x[e.value];
|
|
1083
|
+
return typeof y == "string" && typeof c == "string" ? i.value === "asc" ? y.localeCompare(c) : c.localeCompare(y) : typeof y == "number" && typeof c == "number" ? i.value === "asc" ? y - c : c - y : 0;
|
|
1084
|
+
}), u;
|
|
1085
|
+
}), f = d(() => b.columns.filter((u) => !u.hideOnMobile));
|
|
1086
|
+
return (u, v) => (s(), o("div", xt, [
|
|
1087
|
+
l("div", bt, [
|
|
1088
|
+
(s(!0), o(A, null, W(r.value, (x, y) => (s(), o("div", {
|
|
1089
|
+
key: `card-${y}`,
|
|
1090
|
+
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
1091
|
+
}, [
|
|
1092
|
+
(s(!0), o(A, null, W(f.value, (c) => (s(), o("div", {
|
|
1093
|
+
key: `card-${y}-${c.key}`,
|
|
1094
|
+
class: "flex flex-col gap-1 py-1"
|
|
1089
1095
|
}, [
|
|
1090
|
-
(
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
])
|
|
1098
|
-
onClick: (y) => u.sortable && a(u.key)
|
|
1099
|
-
}, [
|
|
1100
|
-
l("div", mt, [
|
|
1101
|
-
l("span", null, w(u.label), 1),
|
|
1102
|
-
u.sortable ? (s(), o("span", wt, [
|
|
1103
|
-
e.value !== u.key ? (s(), o("span", kt, "⇅")) : (s(), o("span", Ct, w(i.value === "asc" ? "↑" : "↓"), 1))
|
|
1104
|
-
])) : f("", !0)
|
|
1105
|
-
])
|
|
1106
|
-
], 14, yt))), 128))
|
|
1107
|
-
], 2)
|
|
1108
|
-
]),
|
|
1109
|
-
l("tbody", $t, [
|
|
1110
|
-
(s(!0), o(F, null, K(d.value, (u, y) => (s(), o("tr", {
|
|
1111
|
-
key: y,
|
|
1112
|
-
class: g([
|
|
1113
|
-
"w-full border-b border-gray-200 hover:bg-gray-50 transition-colors",
|
|
1114
|
-
b.rowClass
|
|
1096
|
+
l("span", ht, w(c.label), 1),
|
|
1097
|
+
l("span", yt, [
|
|
1098
|
+
B(u.$slots, `cell-${c.key}`, {
|
|
1099
|
+
value: x[c.key],
|
|
1100
|
+
row: x
|
|
1101
|
+
}, () => [
|
|
1102
|
+
E(w(x[c.key]), 1)
|
|
1103
|
+
], !0)
|
|
1115
1104
|
])
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1105
|
+
]))), 128))
|
|
1106
|
+
]))), 128)),
|
|
1107
|
+
r.value.length === 0 ? (s(), o("div", mt, [
|
|
1108
|
+
B(u.$slots, "empty", {}, () => [
|
|
1109
|
+
v[0] || (v[0] = E("No hay datos disponibles", -1))
|
|
1110
|
+
], !0)
|
|
1111
|
+
])) : g("", !0)
|
|
1112
|
+
]),
|
|
1113
|
+
l("div", wt, [
|
|
1114
|
+
l("table", kt, [
|
|
1115
|
+
l("thead", $t, [
|
|
1116
|
+
l("tr", {
|
|
1117
|
+
class: p([
|
|
1118
|
+
"w-full",
|
|
1119
|
+
b.headerClass || "bg-neutral-50 border-b border-gray-100"
|
|
1122
1120
|
])
|
|
1123
1121
|
}, [
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1122
|
+
(s(!0), o(A, null, W(t.columns, (x) => (s(), o("th", {
|
|
1123
|
+
key: x.key,
|
|
1124
|
+
style: R(x.width ? { width: x.width } : {}),
|
|
1125
|
+
class: p([
|
|
1126
|
+
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
1127
|
+
x.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
1128
|
+
b.headerCellClass
|
|
1129
|
+
]),
|
|
1130
|
+
onClick: (y) => x.sortable && n(x.key)
|
|
1131
|
+
}, [
|
|
1132
|
+
l("div", Bt, [
|
|
1133
|
+
l("span", null, w(x.label), 1),
|
|
1134
|
+
x.sortable ? (s(), o("span", Mt, [
|
|
1135
|
+
e.value !== x.key ? (s(), o("span", Tt, "⇅")) : (s(), o("span", _t, w(i.value === "asc" ? "↑" : "↓"), 1))
|
|
1136
|
+
])) : g("", !0)
|
|
1137
|
+
])
|
|
1138
|
+
], 14, Ct))), 128))
|
|
1139
|
+
], 2)
|
|
1140
|
+
]),
|
|
1141
|
+
l("tbody", zt, [
|
|
1142
|
+
(s(!0), o(A, null, W(r.value, (x, y) => (s(), o("tr", {
|
|
1143
|
+
key: y,
|
|
1144
|
+
class: p([
|
|
1145
|
+
"w-full border-b border-gray-200 hover:bg-gray-50 transition-colors",
|
|
1146
|
+
b.rowClass
|
|
1147
|
+
])
|
|
1148
|
+
}, [
|
|
1149
|
+
(s(!0), o(A, null, W(t.columns, (c) => (s(), o("td", {
|
|
1150
|
+
key: `${y}-${c.key}`,
|
|
1151
|
+
class: p([
|
|
1152
|
+
"px-4 py-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
|
|
1153
|
+
b.cellClass
|
|
1154
|
+
])
|
|
1155
|
+
}, [
|
|
1156
|
+
B(u.$slots, `cell-${c.key}`, {
|
|
1157
|
+
value: x[c.key],
|
|
1158
|
+
row: x
|
|
1159
|
+
}, () => [
|
|
1160
|
+
E(w(x[c.key]), 1)
|
|
1161
|
+
], !0)
|
|
1162
|
+
], 2))), 128))
|
|
1130
1163
|
], 2))), 128))
|
|
1131
|
-
]
|
|
1132
|
-
])
|
|
1164
|
+
])
|
|
1165
|
+
]),
|
|
1166
|
+
r.value.length === 0 ? (s(), o("div", jt, [
|
|
1167
|
+
B(u.$slots, "empty", {}, () => [
|
|
1168
|
+
v[1] || (v[1] = E("No hay datos disponibles", -1))
|
|
1169
|
+
], !0)
|
|
1170
|
+
])) : g("", !0)
|
|
1133
1171
|
]),
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
], !0)
|
|
1138
|
-
])) : f("", !0),
|
|
1139
|
-
r.$slots.footer ? (s(), o("div", Tt, [
|
|
1140
|
-
C(r.$slots, "footer", {}, void 0, !0)
|
|
1141
|
-
])) : f("", !0)
|
|
1172
|
+
u.$slots.footer ? (s(), o("div", Vt, [
|
|
1173
|
+
B(u.$slots, "footer", {}, void 0, !0)
|
|
1174
|
+
])) : g("", !0)
|
|
1142
1175
|
]));
|
|
1143
1176
|
}
|
|
1144
|
-
}),
|
|
1145
|
-
class: "flex
|
|
1177
|
+
}), us = /* @__PURE__ */ N(St, [["__scopeId", "data-v-8e7ce66d"]]), Lt = { class: "w-full" }, It = {
|
|
1178
|
+
class: "tabs-container flex flex-col sm:flex-row",
|
|
1146
1179
|
role: "tablist"
|
|
1147
|
-
},
|
|
1180
|
+
}, Ot = ["aria-selected", "onClick"], Dt = { role: "tabpanel" }, At = "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", Et = "text-primary-600 border-primary-600", Pt = "hover:text-secondary-700 border-gray-100", Ht = /* @__PURE__ */ O({
|
|
1148
1181
|
__name: "Tabs",
|
|
1149
1182
|
props: {
|
|
1150
1183
|
modelValue: {},
|
|
@@ -1152,34 +1185,34 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1152
1185
|
},
|
|
1153
1186
|
emits: ["update:modelValue"],
|
|
1154
1187
|
setup(t, { emit: b }) {
|
|
1155
|
-
const e = t, i = b,
|
|
1156
|
-
|
|
1157
|
-
},
|
|
1158
|
-
() => e.tabs.find((
|
|
1188
|
+
const e = t, i = b, n = (v) => e.modelValue === v, r = (v) => {
|
|
1189
|
+
n(v) || i("update:modelValue", v);
|
|
1190
|
+
}, f = d(() => e.modelValue), u = d(
|
|
1191
|
+
() => e.tabs.find((v) => v.value === f.value)
|
|
1159
1192
|
);
|
|
1160
|
-
return (
|
|
1161
|
-
l("div",
|
|
1162
|
-
(s(!0), o(
|
|
1163
|
-
key:
|
|
1193
|
+
return (v, x) => (s(), o("div", Lt, [
|
|
1194
|
+
l("div", It, [
|
|
1195
|
+
(s(!0), o(A, null, W(t.tabs, (y) => (s(), o("button", {
|
|
1196
|
+
key: y.value,
|
|
1164
1197
|
type: "button",
|
|
1165
|
-
class:
|
|
1166
|
-
|
|
1167
|
-
|
|
1198
|
+
class: p([
|
|
1199
|
+
At,
|
|
1200
|
+
n(y.value) ? Et : Pt
|
|
1168
1201
|
]),
|
|
1169
|
-
"aria-selected":
|
|
1202
|
+
"aria-selected": n(y.value),
|
|
1170
1203
|
role: "tab",
|
|
1171
|
-
onClick: (
|
|
1172
|
-
}, w(
|
|
1204
|
+
onClick: (c) => r(y.value)
|
|
1205
|
+
}, w(y.label), 11, Ot))), 128))
|
|
1173
1206
|
]),
|
|
1174
|
-
l("div",
|
|
1175
|
-
|
|
1176
|
-
active:
|
|
1177
|
-
tab:
|
|
1178
|
-
})
|
|
1207
|
+
l("div", Dt, [
|
|
1208
|
+
B(v.$slots, f.value, {
|
|
1209
|
+
active: f.value,
|
|
1210
|
+
tab: u.value
|
|
1211
|
+
}, void 0, !0)
|
|
1179
1212
|
])
|
|
1180
1213
|
]));
|
|
1181
1214
|
}
|
|
1182
|
-
}),
|
|
1215
|
+
}), cs = /* @__PURE__ */ N(Ht, [["__scopeId", "data-v-b5a754bd"]]), Wt = "font-sans", fs = /* @__PURE__ */ O({
|
|
1183
1216
|
__name: "Text",
|
|
1184
1217
|
props: {
|
|
1185
1218
|
variant: { default: "body1" },
|
|
@@ -1236,7 +1269,7 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1236
1269
|
center: "text-center",
|
|
1237
1270
|
right: "text-right",
|
|
1238
1271
|
justify: "text-justify"
|
|
1239
|
-
},
|
|
1272
|
+
}, n = {
|
|
1240
1273
|
default: "text-secondary-900",
|
|
1241
1274
|
muted: "text-secondary-600",
|
|
1242
1275
|
primary: "text-primary-600",
|
|
@@ -1244,37 +1277,127 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1244
1277
|
danger: "text-danger-600",
|
|
1245
1278
|
success: "text-success-600",
|
|
1246
1279
|
warning: "text-warning-600"
|
|
1247
|
-
},
|
|
1280
|
+
}, r = {
|
|
1248
1281
|
light: "font-light",
|
|
1249
1282
|
normal: "font-normal",
|
|
1250
1283
|
medium: "font-medium",
|
|
1251
1284
|
semibold: "font-semibold",
|
|
1252
1285
|
bold: "font-bold",
|
|
1253
1286
|
extrabold: "font-extrabold"
|
|
1254
|
-
},
|
|
1255
|
-
return (
|
|
1256
|
-
class:
|
|
1257
|
-
|
|
1258
|
-
b[
|
|
1259
|
-
|
|
1260
|
-
i[
|
|
1261
|
-
|
|
1287
|
+
}, f = t, u = d(() => f.variant), v = d(() => f.color), x = d(() => f.align), y = d(() => f.as || e[u.value] || "span"), c = d(() => f.weight ? r[f.weight] : "");
|
|
1288
|
+
return (_, C) => (s(), q(Y(y.value), {
|
|
1289
|
+
class: p([
|
|
1290
|
+
Wt,
|
|
1291
|
+
b[u.value],
|
|
1292
|
+
n[v.value],
|
|
1293
|
+
i[x.value],
|
|
1294
|
+
c.value,
|
|
1262
1295
|
{
|
|
1263
|
-
uppercase: t.uppercase ||
|
|
1296
|
+
uppercase: t.uppercase || u.value === "overline",
|
|
1264
1297
|
truncate: t.truncate
|
|
1265
1298
|
}
|
|
1266
1299
|
])
|
|
1267
1300
|
}, {
|
|
1268
1301
|
default: U(() => [
|
|
1269
|
-
|
|
1302
|
+
B(_.$slots, "default")
|
|
1270
1303
|
]),
|
|
1271
1304
|
_: 3
|
|
1272
1305
|
}, 8, ["class"]));
|
|
1273
1306
|
}
|
|
1274
|
-
}),
|
|
1307
|
+
}), Ft = { class: "w-full flex items-center justify-between gap-3 py-2" }, Nt = {
|
|
1308
|
+
key: 0,
|
|
1309
|
+
class: "text-xs text-secondary-600"
|
|
1310
|
+
}, Rt = { key: 0 }, Kt = {
|
|
1311
|
+
class: "ml-auto inline-flex items-center gap-1",
|
|
1312
|
+
role: "navigation",
|
|
1313
|
+
"aria-label": "Pagination"
|
|
1314
|
+
}, qt = ["disabled"], Ut = {
|
|
1315
|
+
key: 0,
|
|
1316
|
+
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text-secondary-500"
|
|
1317
|
+
}, Gt = ["aria-label", "onClick"], Qt = ["disabled"], Zt = /* @__PURE__ */ O({
|
|
1318
|
+
__name: "Pagination",
|
|
1319
|
+
props: {
|
|
1320
|
+
modelValue: { default: 1 },
|
|
1321
|
+
totalItems: { default: 0 },
|
|
1322
|
+
pageSize: { default: 10 },
|
|
1323
|
+
maxPages: { default: 5 },
|
|
1324
|
+
previousText: { default: "Anterior" },
|
|
1325
|
+
nextText: { default: "Siguiente" },
|
|
1326
|
+
showSummary: { type: Boolean, default: !0 },
|
|
1327
|
+
itemLabel: { default: "" }
|
|
1328
|
+
},
|
|
1329
|
+
emits: ["update:modelValue", "change"],
|
|
1330
|
+
setup(t, { emit: b }) {
|
|
1331
|
+
const e = t, i = b, n = d(() => {
|
|
1332
|
+
const c = Math.ceil(e.totalItems / e.pageSize);
|
|
1333
|
+
return c > 0 ? c : 1;
|
|
1334
|
+
}), r = d(() => {
|
|
1335
|
+
const c = Number(e.modelValue || 1);
|
|
1336
|
+
return c < 1 ? 1 : c > n.value ? n.value : c;
|
|
1337
|
+
}), f = d(() => e.totalItems === 0 ? 0 : (r.value - 1) * e.pageSize + 1), u = d(() => Math.min(r.value * e.pageSize, e.totalItems)), v = d(() => `Mostrando ${f.value} a ${u.value} de ${e.totalItems}`), x = d(() => {
|
|
1338
|
+
const c = n.value, _ = Math.max(3, e.maxPages), C = r.value;
|
|
1339
|
+
if (c <= _)
|
|
1340
|
+
return Array.from({ length: c }, (k, j) => j + 1);
|
|
1341
|
+
const S = Math.floor(_ / 2);
|
|
1342
|
+
let V = Math.max(1, C - S), z = Math.min(c, V + _ - 1);
|
|
1343
|
+
V = Math.max(1, Math.min(V, z - _ + 1));
|
|
1344
|
+
const h = [];
|
|
1345
|
+
V > 1 && (h.push(1), V > 2 && h.push("…"));
|
|
1346
|
+
for (let k = V; k <= z; k++)
|
|
1347
|
+
h.push(k);
|
|
1348
|
+
return z < c && (z < c - 1 && h.push("…"), h.push(c)), h;
|
|
1349
|
+
});
|
|
1350
|
+
function y(c) {
|
|
1351
|
+
const _ = Math.max(1, Math.min(c, n.value));
|
|
1352
|
+
_ !== r.value && (i("update:modelValue", _), i("change", _));
|
|
1353
|
+
}
|
|
1354
|
+
return (c, _) => (s(), o("div", Ft, [
|
|
1355
|
+
t.showSummary ? (s(), o("div", Nt, [
|
|
1356
|
+
B(c.$slots, "summary", {
|
|
1357
|
+
start: f.value,
|
|
1358
|
+
end: u.value,
|
|
1359
|
+
total: t.totalItems
|
|
1360
|
+
}, () => [
|
|
1361
|
+
E(w(v.value), 1),
|
|
1362
|
+
t.itemLabel ? (s(), o("span", Rt, w(t.itemLabel), 1)) : g("", !0)
|
|
1363
|
+
], !0)
|
|
1364
|
+
])) : g("", !0),
|
|
1365
|
+
l("nav", Kt, [
|
|
1366
|
+
l("button", {
|
|
1367
|
+
type: "button",
|
|
1368
|
+
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",
|
|
1369
|
+
disabled: r.value <= 1,
|
|
1370
|
+
onClick: _[0] || (_[0] = (C) => y(r.value - 1)),
|
|
1371
|
+
"aria-label": "Anterior"
|
|
1372
|
+
}, w(t.previousText), 9, qt),
|
|
1373
|
+
(s(!0), o(A, null, W(x.value, (C, S) => (s(), o(A, {
|
|
1374
|
+
key: `page-${S}-${C}`
|
|
1375
|
+
}, [
|
|
1376
|
+
C === "…" ? (s(), o("span", Ut, " … ")) : (s(), o("button", {
|
|
1377
|
+
key: 1,
|
|
1378
|
+
type: "button",
|
|
1379
|
+
"aria-label": `Página ${C}`,
|
|
1380
|
+
class: p([
|
|
1381
|
+
"h-8 min-w-8 px-3 rounded-full text-sm font-semibold transition-colors",
|
|
1382
|
+
C === r.value ? "bg-primary-500 text-white" : "text-secondary-700 hover:bg-secondary-100"
|
|
1383
|
+
]),
|
|
1384
|
+
onClick: (V) => y(C)
|
|
1385
|
+
}, w(C), 11, Gt))
|
|
1386
|
+
], 64))), 128)),
|
|
1387
|
+
l("button", {
|
|
1388
|
+
type: "button",
|
|
1389
|
+
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",
|
|
1390
|
+
disabled: r.value >= n.value,
|
|
1391
|
+
onClick: _[1] || (_[1] = (C) => y(r.value + 1)),
|
|
1392
|
+
"aria-label": "Siguiente"
|
|
1393
|
+
}, w(t.nextText), 9, Qt)
|
|
1394
|
+
])
|
|
1395
|
+
]));
|
|
1396
|
+
}
|
|
1397
|
+
}), ps = /* @__PURE__ */ N(Zt, [["__scopeId", "data-v-87417cc4"]]), Jt = ["data-node-id"], Xt = { class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center" }, Yt = {
|
|
1275
1398
|
key: 1,
|
|
1276
|
-
class: "flex justify-end gap-1 px-
|
|
1277
|
-
},
|
|
1399
|
+
class: "flex justify-end gap-1 px-6 pb-6 pt-4"
|
|
1400
|
+
}, gs = /* @__PURE__ */ O({
|
|
1278
1401
|
__name: "Alert",
|
|
1279
1402
|
props: {
|
|
1280
1403
|
variant: {},
|
|
@@ -1283,13 +1406,14 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1283
1406
|
closable: { type: Boolean },
|
|
1284
1407
|
multiline: { type: Boolean },
|
|
1285
1408
|
actions: { type: Boolean },
|
|
1286
|
-
nodeId: {}
|
|
1409
|
+
nodeId: {},
|
|
1410
|
+
stackOn: {}
|
|
1287
1411
|
},
|
|
1288
1412
|
emits: ["close", "accept", "cancel"],
|
|
1289
1413
|
setup(t, { emit: b }) {
|
|
1290
|
-
const e = b, i = t,
|
|
1414
|
+
const e = b, i = t, n = d(() => i.variant ?? "info"), r = d(() => i.multiline ?? !1), f = d(() => i.actions ?? !1), u = d(() => i.nodeId ?? void 0), v = () => e("close"), x = d(() => {
|
|
1291
1415
|
if (i.title) return i.title;
|
|
1292
|
-
switch (
|
|
1416
|
+
switch (n.value) {
|
|
1293
1417
|
case "info":
|
|
1294
1418
|
return "Alerta de información";
|
|
1295
1419
|
case "warning":
|
|
@@ -1299,8 +1423,8 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1299
1423
|
case "error":
|
|
1300
1424
|
return "Alerta de error";
|
|
1301
1425
|
}
|
|
1302
|
-
}),
|
|
1303
|
-
switch (
|
|
1426
|
+
}), y = d(() => i.description ?? ""), c = d(() => {
|
|
1427
|
+
switch (n.value) {
|
|
1304
1428
|
case "info":
|
|
1305
1429
|
return {
|
|
1306
1430
|
border: "border-[var(--semantica/info,#0064ff)]",
|
|
@@ -1326,21 +1450,30 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1326
1450
|
icon: "text-[#ff4235]"
|
|
1327
1451
|
};
|
|
1328
1452
|
}
|
|
1329
|
-
}),
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1453
|
+
}), _ = d(() => "bg-[var(--color-primario/700,#269ea4)]"), C = d(() => {
|
|
1454
|
+
const z = "flex w-full items-start gap-4 flex-col";
|
|
1455
|
+
if (!i.stackOn) return `${z} sm:flex-row sm:items-center`;
|
|
1456
|
+
const h = i.stackOn, k = `${h}:flex-row ${h}:items-center`;
|
|
1457
|
+
return `${z} ${k}`;
|
|
1458
|
+
}), S = d(() => {
|
|
1459
|
+
if (!i.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
|
|
1460
|
+
const z = i.stackOn;
|
|
1461
|
+
return `flex-col ${z}:flex-row items-start ${z}:items-center`;
|
|
1462
|
+
}), V = d(() => i.stackOn ? `self-start ${i.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
1463
|
+
return (z, h) => (s(), o("div", {
|
|
1464
|
+
class: p(["relative w-full rounded-xl border", [
|
|
1465
|
+
c.value.border,
|
|
1466
|
+
c.value.bg
|
|
1334
1467
|
]]),
|
|
1335
1468
|
role: "alert",
|
|
1336
|
-
"data-node-id":
|
|
1469
|
+
"data-node-id": u.value
|
|
1337
1470
|
}, [
|
|
1338
1471
|
t.closable ? (s(), o("button", {
|
|
1339
1472
|
key: 0,
|
|
1340
1473
|
type: "button",
|
|
1341
1474
|
class: "absolute top-3 right-3 text-[color:var(--neutrales/texto-principal,#565656)]/70 hover:opacity-100 opacity-70",
|
|
1342
1475
|
"aria-label": "Cerrar",
|
|
1343
|
-
onClick:
|
|
1476
|
+
onClick: v
|
|
1344
1477
|
}, [...h[2] || (h[2] = [
|
|
1345
1478
|
l("svg", {
|
|
1346
1479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1366,156 +1499,165 @@ const le = { class: "flex items-center gap-4" }, ne = {
|
|
|
1366
1499
|
y2: "18"
|
|
1367
1500
|
})
|
|
1368
1501
|
], -1)
|
|
1369
|
-
])])) :
|
|
1370
|
-
l("div",
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
key: 0,
|
|
1374
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1375
|
-
width: "24",
|
|
1376
|
-
height: "24",
|
|
1377
|
-
viewBox: "0 0 24 24",
|
|
1378
|
-
fill: "none",
|
|
1379
|
-
class: g(z.value.icon),
|
|
1380
|
-
stroke: "currentColor",
|
|
1381
|
-
"stroke-width": "2",
|
|
1382
|
-
"stroke-linecap": "round",
|
|
1383
|
-
"stroke-linejoin": "round"
|
|
1384
|
-
}, [...h[3] || (h[3] = [
|
|
1385
|
-
l("circle", {
|
|
1386
|
-
cx: "12",
|
|
1387
|
-
cy: "12",
|
|
1388
|
-
r: "10"
|
|
1389
|
-
}, null, -1),
|
|
1390
|
-
l("line", {
|
|
1391
|
-
x1: "12",
|
|
1392
|
-
y1: "16",
|
|
1393
|
-
x2: "12",
|
|
1394
|
-
y2: "12"
|
|
1395
|
-
}, null, -1),
|
|
1396
|
-
l("line", {
|
|
1397
|
-
x1: "12",
|
|
1398
|
-
y1: "8",
|
|
1399
|
-
x2: "12",
|
|
1400
|
-
y2: "8"
|
|
1401
|
-
}, null, -1)
|
|
1402
|
-
])], 2)) : a.value === "warning" ? (s(), o("svg", {
|
|
1403
|
-
key: 1,
|
|
1404
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1405
|
-
width: "24",
|
|
1406
|
-
height: "24",
|
|
1407
|
-
viewBox: "0 0 24 24",
|
|
1408
|
-
fill: "none",
|
|
1409
|
-
class: g(z.value.icon),
|
|
1410
|
-
stroke: "currentColor",
|
|
1411
|
-
"stroke-width": "2",
|
|
1412
|
-
"stroke-linecap": "round",
|
|
1413
|
-
"stroke-linejoin": "round"
|
|
1414
|
-
}, [...h[4] || (h[4] = [
|
|
1415
|
-
l("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }, null, -1),
|
|
1416
|
-
l("line", {
|
|
1417
|
-
x1: "12",
|
|
1418
|
-
y1: "9",
|
|
1419
|
-
x2: "12",
|
|
1420
|
-
y2: "13"
|
|
1421
|
-
}, null, -1),
|
|
1422
|
-
l("line", {
|
|
1423
|
-
x1: "12",
|
|
1424
|
-
y1: "17",
|
|
1425
|
-
x2: "12",
|
|
1426
|
-
y2: "17"
|
|
1427
|
-
}, null, -1)
|
|
1428
|
-
])], 2)) : a.value === "success" ? (s(), o("svg", {
|
|
1429
|
-
key: 2,
|
|
1430
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1431
|
-
width: "24",
|
|
1432
|
-
height: "24",
|
|
1433
|
-
viewBox: "0 0 24 24",
|
|
1434
|
-
fill: "none",
|
|
1435
|
-
class: g(z.value.icon),
|
|
1436
|
-
stroke: "currentColor",
|
|
1437
|
-
"stroke-width": "2",
|
|
1438
|
-
"stroke-linecap": "round",
|
|
1439
|
-
"stroke-linejoin": "round"
|
|
1440
|
-
}, [...h[5] || (h[5] = [
|
|
1441
|
-
l("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
1442
|
-
l("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
1443
|
-
])], 2)) : (s(), o("svg", {
|
|
1444
|
-
key: 3,
|
|
1445
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1446
|
-
width: "24",
|
|
1447
|
-
height: "24",
|
|
1448
|
-
viewBox: "0 0 24 24",
|
|
1449
|
-
fill: "none",
|
|
1450
|
-
class: g(z.value.icon),
|
|
1451
|
-
stroke: "currentColor",
|
|
1452
|
-
"stroke-width": "2",
|
|
1453
|
-
"stroke-linecap": "round",
|
|
1454
|
-
"stroke-linejoin": "round"
|
|
1455
|
-
}, [...h[6] || (h[6] = [
|
|
1456
|
-
l("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }, null, -1),
|
|
1457
|
-
l("line", {
|
|
1458
|
-
x1: "12",
|
|
1459
|
-
y1: "8",
|
|
1460
|
-
x2: "12",
|
|
1461
|
-
y2: "12"
|
|
1462
|
-
}, null, -1),
|
|
1463
|
-
l("line", {
|
|
1464
|
-
x1: "12",
|
|
1465
|
-
y1: "16",
|
|
1466
|
-
x2: "12",
|
|
1467
|
-
y2: "16"
|
|
1468
|
-
}, null, -1)
|
|
1469
|
-
])], 2))
|
|
1470
|
-
]),
|
|
1502
|
+
])])) : g("", !0),
|
|
1503
|
+
l("div", {
|
|
1504
|
+
class: p(["p-6", { "pb-0": f.value }])
|
|
1505
|
+
}, [
|
|
1471
1506
|
l("div", {
|
|
1472
|
-
class:
|
|
1507
|
+
class: p(C.value)
|
|
1473
1508
|
}, [
|
|
1474
|
-
l("div",
|
|
1509
|
+
l("div", Xt, [
|
|
1510
|
+
n.value === "info" ? (s(), o("svg", {
|
|
1511
|
+
key: 0,
|
|
1512
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1513
|
+
width: "24",
|
|
1514
|
+
height: "24",
|
|
1515
|
+
viewBox: "0 0 24 24",
|
|
1516
|
+
fill: "none",
|
|
1517
|
+
class: p(c.value.icon),
|
|
1518
|
+
stroke: "currentColor",
|
|
1519
|
+
"stroke-width": "2",
|
|
1520
|
+
"stroke-linecap": "round",
|
|
1521
|
+
"stroke-linejoin": "round"
|
|
1522
|
+
}, [...h[3] || (h[3] = [
|
|
1523
|
+
l("circle", {
|
|
1524
|
+
cx: "12",
|
|
1525
|
+
cy: "12",
|
|
1526
|
+
r: "10"
|
|
1527
|
+
}, null, -1),
|
|
1528
|
+
l("line", {
|
|
1529
|
+
x1: "12",
|
|
1530
|
+
y1: "16",
|
|
1531
|
+
x2: "12",
|
|
1532
|
+
y2: "12"
|
|
1533
|
+
}, null, -1),
|
|
1534
|
+
l("line", {
|
|
1535
|
+
x1: "12",
|
|
1536
|
+
y1: "8",
|
|
1537
|
+
x2: "12",
|
|
1538
|
+
y2: "8"
|
|
1539
|
+
}, null, -1)
|
|
1540
|
+
])], 2)) : n.value === "warning" ? (s(), o("svg", {
|
|
1541
|
+
key: 1,
|
|
1542
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1543
|
+
width: "24",
|
|
1544
|
+
height: "24",
|
|
1545
|
+
viewBox: "0 0 24 24",
|
|
1546
|
+
fill: "none",
|
|
1547
|
+
class: p(c.value.icon),
|
|
1548
|
+
stroke: "currentColor",
|
|
1549
|
+
"stroke-width": "2",
|
|
1550
|
+
"stroke-linecap": "round",
|
|
1551
|
+
"stroke-linejoin": "round"
|
|
1552
|
+
}, [...h[4] || (h[4] = [
|
|
1553
|
+
l("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }, null, -1),
|
|
1554
|
+
l("line", {
|
|
1555
|
+
x1: "12",
|
|
1556
|
+
y1: "9",
|
|
1557
|
+
x2: "12",
|
|
1558
|
+
y2: "13"
|
|
1559
|
+
}, null, -1),
|
|
1560
|
+
l("line", {
|
|
1561
|
+
x1: "12",
|
|
1562
|
+
y1: "17",
|
|
1563
|
+
x2: "12",
|
|
1564
|
+
y2: "17"
|
|
1565
|
+
}, null, -1)
|
|
1566
|
+
])], 2)) : n.value === "success" ? (s(), o("svg", {
|
|
1567
|
+
key: 2,
|
|
1568
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1569
|
+
width: "24",
|
|
1570
|
+
height: "24",
|
|
1571
|
+
viewBox: "0 0 24 24",
|
|
1572
|
+
fill: "none",
|
|
1573
|
+
class: p(c.value.icon),
|
|
1574
|
+
stroke: "currentColor",
|
|
1575
|
+
"stroke-width": "2",
|
|
1576
|
+
"stroke-linecap": "round",
|
|
1577
|
+
"stroke-linejoin": "round"
|
|
1578
|
+
}, [...h[5] || (h[5] = [
|
|
1579
|
+
l("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
1580
|
+
l("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
1581
|
+
])], 2)) : (s(), o("svg", {
|
|
1582
|
+
key: 3,
|
|
1583
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1584
|
+
width: "24",
|
|
1585
|
+
height: "24",
|
|
1586
|
+
viewBox: "0 0 24 24",
|
|
1587
|
+
fill: "none",
|
|
1588
|
+
class: p(c.value.icon),
|
|
1589
|
+
stroke: "currentColor",
|
|
1590
|
+
"stroke-width": "2",
|
|
1591
|
+
"stroke-linecap": "round",
|
|
1592
|
+
"stroke-linejoin": "round"
|
|
1593
|
+
}, [...h[6] || (h[6] = [
|
|
1594
|
+
l("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }, null, -1),
|
|
1595
|
+
l("line", {
|
|
1596
|
+
x1: "12",
|
|
1597
|
+
y1: "8",
|
|
1598
|
+
x2: "12",
|
|
1599
|
+
y2: "12"
|
|
1600
|
+
}, null, -1),
|
|
1601
|
+
l("line", {
|
|
1602
|
+
x1: "12",
|
|
1603
|
+
y1: "16",
|
|
1604
|
+
x2: "12",
|
|
1605
|
+
y2: "16"
|
|
1606
|
+
}, null, -1)
|
|
1607
|
+
])], 2))
|
|
1608
|
+
]),
|
|
1475
1609
|
l("div", {
|
|
1476
|
-
class:
|
|
1610
|
+
class: p(["flex-1 flex gap-4 text-[14px]", [S.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !r.value, "whitespace-pre-wrap": r.value }]])
|
|
1477
1611
|
}, [
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1612
|
+
l("div", {
|
|
1613
|
+
class: p(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", V.value])
|
|
1614
|
+
}, w(x.value), 3),
|
|
1615
|
+
l("div", {
|
|
1616
|
+
class: p(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !r.value }])
|
|
1617
|
+
}, [
|
|
1618
|
+
B(z.$slots, "description", {}, () => [
|
|
1619
|
+
E(w(y.value), 1)
|
|
1620
|
+
])
|
|
1621
|
+
], 2)
|
|
1481
1622
|
], 2)
|
|
1482
1623
|
], 2)
|
|
1483
|
-
]),
|
|
1484
|
-
|
|
1624
|
+
], 2),
|
|
1625
|
+
f.value ? (s(), o("div", Yt, [
|
|
1485
1626
|
l("button", {
|
|
1486
1627
|
type: "button",
|
|
1487
1628
|
class: "px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
1488
|
-
onClick: h[0] || (h[0] = (
|
|
1629
|
+
onClick: h[0] || (h[0] = (k) => z.$emit("cancel"))
|
|
1489
1630
|
}, [
|
|
1490
|
-
|
|
1631
|
+
B(z.$slots, "cancel", {}, () => [
|
|
1491
1632
|
h[7] || (h[7] = E("Cancelar", -1))
|
|
1492
1633
|
])
|
|
1493
1634
|
]),
|
|
1494
1635
|
l("button", {
|
|
1495
1636
|
type: "button",
|
|
1496
|
-
class:
|
|
1497
|
-
onClick: h[1] || (h[1] = (
|
|
1637
|
+
class: p(["px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-white", _.value]),
|
|
1638
|
+
onClick: h[1] || (h[1] = (k) => z.$emit("accept"))
|
|
1498
1639
|
}, [
|
|
1499
|
-
|
|
1640
|
+
B(z.$slots, "accept", {}, () => [
|
|
1500
1641
|
h[8] || (h[8] = E("Aceptar", -1))
|
|
1501
1642
|
])
|
|
1502
1643
|
], 2)
|
|
1503
|
-
])) :
|
|
1504
|
-
], 10,
|
|
1644
|
+
])) : g("", !0)
|
|
1645
|
+
], 10, Jt));
|
|
1505
1646
|
}
|
|
1506
1647
|
});
|
|
1507
1648
|
export {
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1649
|
+
gs as Alert,
|
|
1650
|
+
ts as AppBar,
|
|
1651
|
+
ss as Button,
|
|
1652
|
+
os as Card,
|
|
1653
|
+
ls as Dialog,
|
|
1654
|
+
as as FileUpload,
|
|
1655
|
+
ns as Loader,
|
|
1656
|
+
rs as Menu,
|
|
1657
|
+
ps as Pagination,
|
|
1658
|
+
is as Select,
|
|
1659
|
+
ds as Sidebar,
|
|
1660
|
+
us as Table,
|
|
1661
|
+
cs as Tabs,
|
|
1662
|
+
fs as Text
|
|
1521
1663
|
};
|