@iaclinical/components 1.0.6 → 1.0.8
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 +347 -334
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as S, computed as p, createElementBlock as o, openBlock as s, normalizeClass as v, createElementVNode as a, createCommentVNode as c, renderSlot as C, toDisplayString as w, createBlock as q, Teleport as X, createVNode as G, Transition as Q, withCtx as U, withModifiers as H, createTextVNode as K, ref as j, normalizeStyle as W, onMounted as ee, onUnmounted as te, watch as Y, nextTick as J, Fragment as F, renderList as A, resolveDynamicComponent as Z, withDirectives as se, vModelText as oe } from "vue";
|
|
2
2
|
const le = { class: "flex items-center gap-4" }, ae = {
|
|
3
3
|
key: 1,
|
|
4
4
|
class: "text-lg font-bold text-primary-50 font-poppins"
|
|
@@ -8,7 +8,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
8
8
|
}, ie = { class: "flex items-center gap-3" }, de = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "text-lg font-bold text-primary-50 font-poppins"
|
|
11
|
-
}, ue = /* @__PURE__ */
|
|
11
|
+
}, ue = /* @__PURE__ */ S({
|
|
12
12
|
__name: "AppBar",
|
|
13
13
|
props: {
|
|
14
14
|
title: { default: "" },
|
|
@@ -20,8 +20,8 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
20
20
|
height: { default: "md" }
|
|
21
21
|
},
|
|
22
22
|
emits: ["toggle-menu"],
|
|
23
|
-
setup(t, { emit:
|
|
24
|
-
const e = t, u =
|
|
23
|
+
setup(t, { emit: b }) {
|
|
24
|
+
const e = t, u = b, n = p(() => {
|
|
25
25
|
const d = "flex items-center justify-between px-6 z-50", r = {
|
|
26
26
|
default: "bg-primary-700 text-primary-50",
|
|
27
27
|
dark: "bg-secondary-900 text-white",
|
|
@@ -30,13 +30,13 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
30
30
|
sm: "h-12",
|
|
31
31
|
md: "h-14",
|
|
32
32
|
lg: "h-16"
|
|
33
|
-
}, i = e.sticky ? "sticky top-0" : "",
|
|
33
|
+
}, i = e.sticky ? "sticky top-0" : "", y = e.shadow ? "shadow-md" : "";
|
|
34
34
|
return [
|
|
35
35
|
d,
|
|
36
36
|
r[e.variant],
|
|
37
37
|
f[e.height],
|
|
38
38
|
i,
|
|
39
|
-
|
|
39
|
+
y
|
|
40
40
|
].join(" ");
|
|
41
41
|
});
|
|
42
42
|
return (d, r) => (s(), o("header", {
|
|
@@ -64,28 +64,28 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
64
64
|
})
|
|
65
65
|
], -1)
|
|
66
66
|
])])) : c("", !0),
|
|
67
|
-
t.title && t.titlePosition === "left" ? (s(), o("div", ae,
|
|
67
|
+
t.title && t.titlePosition === "left" ? (s(), o("div", ae, w(t.title), 1)) : c("", !0),
|
|
68
68
|
C(d.$slots, "left", {}, void 0, !0)
|
|
69
69
|
]),
|
|
70
70
|
a("div", ne, [
|
|
71
|
-
t.title && t.titlePosition === "center" ? (s(), o("div", re,
|
|
71
|
+
t.title && t.titlePosition === "center" ? (s(), o("div", re, w(t.title), 1)) : c("", !0),
|
|
72
72
|
C(d.$slots, "center", {}, void 0, !0)
|
|
73
73
|
]),
|
|
74
74
|
a("div", ie, [
|
|
75
|
-
t.title && t.titlePosition === "right" ? (s(), o("div", de,
|
|
75
|
+
t.title && t.titlePosition === "right" ? (s(), o("div", de, w(t.title), 1)) : c("", !0),
|
|
76
76
|
C(d.$slots, "right", {}, void 0, !0)
|
|
77
77
|
])
|
|
78
78
|
], 2));
|
|
79
79
|
}
|
|
80
|
-
}),
|
|
80
|
+
}), R = (t, b) => {
|
|
81
81
|
const e = t.__vccOpts || t;
|
|
82
|
-
for (const [u, n] of
|
|
82
|
+
for (const [u, n] of b)
|
|
83
83
|
e[u] = n;
|
|
84
84
|
return e;
|
|
85
|
-
},
|
|
85
|
+
}, Ht = /* @__PURE__ */ R(ue, [["__scopeId", "data-v-883474b5"]]), 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
|
+
}, Ft = /* @__PURE__ */ S({
|
|
89
89
|
__name: "Button",
|
|
90
90
|
props: {
|
|
91
91
|
variant: { default: "primary" },
|
|
@@ -94,12 +94,14 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
94
94
|
type: { default: "button" },
|
|
95
95
|
disabled: { type: Boolean, default: !1 },
|
|
96
96
|
badge: { default: 0 },
|
|
97
|
-
ariaLabel: { default: "" }
|
|
97
|
+
ariaLabel: { default: "" },
|
|
98
|
+
textColor: { default: void 0 },
|
|
99
|
+
textColorHover: { default: void 0 }
|
|
98
100
|
},
|
|
99
101
|
emits: ["click"],
|
|
100
|
-
setup(t, { emit:
|
|
101
|
-
const e = t, u =
|
|
102
|
-
const i = "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",
|
|
102
|
+
setup(t, { emit: b }) {
|
|
103
|
+
const e = t, u = b, n = p(() => e.variant === "icon"), d = p(() => e.badge > 99 ? "99+" : e.badge.toString()), r = p(() => {
|
|
104
|
+
const i = "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", y = {
|
|
103
105
|
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
|
|
104
106
|
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 focus-visible:ring-secondary-500",
|
|
105
107
|
outline: "border border-secondary-300 bg-transparent hover:bg-secondary-100 focus-visible:ring-secondary-500",
|
|
@@ -107,23 +109,26 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
107
109
|
danger: "bg-danger-600 text-white hover:bg-danger-700 focus-visible:ring-danger-600",
|
|
108
110
|
icon: "hover:bg-secondary-100 focus-visible:ring-secondary-500 relative",
|
|
109
111
|
text: "bg-transparent border-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
|
110
|
-
},
|
|
112
|
+
}, x = {
|
|
111
113
|
sm: n.value ? "p-1.5" : "h-8 px-3 text-sm",
|
|
112
114
|
md: n.value ? "p-2" : "h-10 px-4 text-base",
|
|
113
115
|
lg: n.value ? "p-3" : "h-12 px-6 text-lg"
|
|
114
|
-
},
|
|
116
|
+
}, L = {
|
|
115
117
|
full: "rounded-full",
|
|
116
118
|
xl: "rounded-2xl",
|
|
117
119
|
lg: "rounded-xl",
|
|
118
120
|
md: "rounded-lg",
|
|
119
121
|
sm: "rounded-md",
|
|
120
122
|
none: "rounded-none"
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
+
}, D = e.textColor ? e.textColor : "", _ = p(() => {
|
|
124
|
+
var M, O;
|
|
125
|
+
return e.textColorHover ? e.textColorHover : (M = e.textColor) != null && M.includes("white") || (O = e.textColor) != null && O.includes("50") ? "hover:text-black" : "";
|
|
126
|
+
});
|
|
127
|
+
return `${i} ${y[e.variant]} ${x[e.size]} ${L[e.radius]} ${D} ${_.value}`;
|
|
123
128
|
}), f = (i) => {
|
|
124
129
|
e.disabled || u("click", i);
|
|
125
130
|
};
|
|
126
|
-
return (i,
|
|
131
|
+
return (i, y) => (s(), o("button", {
|
|
127
132
|
class: v(r.value),
|
|
128
133
|
type: t.type,
|
|
129
134
|
disabled: t.disabled,
|
|
@@ -131,7 +136,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
131
136
|
"aria-label": t.ariaLabel
|
|
132
137
|
}, [
|
|
133
138
|
C(i.$slots, "default"),
|
|
134
|
-
n.value && t.badge && t.badge > 0 ? (s(), o("span", fe,
|
|
139
|
+
n.value && t.badge && t.badge > 0 ? (s(), o("span", fe, w(d.value), 1)) : c("", !0)
|
|
135
140
|
], 10, ce));
|
|
136
141
|
}
|
|
137
142
|
}), pe = {
|
|
@@ -140,7 +145,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
140
145
|
}, ge = { class: "px-6 py-4" }, he = {
|
|
141
146
|
key: 1,
|
|
142
147
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
143
|
-
},
|
|
148
|
+
}, Pt = /* @__PURE__ */ S({
|
|
144
149
|
__name: "Card",
|
|
145
150
|
props: {
|
|
146
151
|
shadow: { default: "md" },
|
|
@@ -148,7 +153,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
148
153
|
bordered: { type: Boolean, default: !1 }
|
|
149
154
|
},
|
|
150
155
|
setup(t) {
|
|
151
|
-
const
|
|
156
|
+
const b = t, e = {
|
|
152
157
|
none: "",
|
|
153
158
|
sm: "shadow-sm",
|
|
154
159
|
md: "shadow",
|
|
@@ -161,11 +166,11 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
161
166
|
lg: "rounded-lg",
|
|
162
167
|
xl: "rounded-xl",
|
|
163
168
|
full: "rounded-full"
|
|
164
|
-
}, n =
|
|
169
|
+
}, n = p(() => [
|
|
165
170
|
"w-full bg-white",
|
|
166
|
-
e[
|
|
167
|
-
u[
|
|
168
|
-
|
|
171
|
+
e[b.shadow],
|
|
172
|
+
u[b.rounded],
|
|
173
|
+
b.bordered ? "border border-gray-200" : ""
|
|
169
174
|
]);
|
|
170
175
|
return (d, r) => (s(), o("div", {
|
|
171
176
|
class: v(n.value)
|
|
@@ -181,10 +186,10 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
181
186
|
])) : c("", !0)
|
|
182
187
|
], 2));
|
|
183
188
|
}
|
|
184
|
-
}),
|
|
189
|
+
}), ve = { class: "flex items-center justify-between border-b border-gray-100 px-8 py-6" }, be = { class: "text-xl font-semibold text-gray-900" }, ye = { class: "px-8 py-6" }, xe = {
|
|
185
190
|
key: 0,
|
|
186
191
|
class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
|
|
187
|
-
}, me = /* @__PURE__ */
|
|
192
|
+
}, me = /* @__PURE__ */ S({
|
|
188
193
|
__name: "Dialog",
|
|
189
194
|
props: {
|
|
190
195
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -192,8 +197,8 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
192
197
|
closeOnBackdrop: { type: Boolean, default: !0 }
|
|
193
198
|
},
|
|
194
199
|
emits: ["update:modelValue"],
|
|
195
|
-
setup(t, { emit:
|
|
196
|
-
const e = t, u =
|
|
200
|
+
setup(t, { emit: b }) {
|
|
201
|
+
const e = t, u = b, n = p({
|
|
197
202
|
get: () => e.modelValue,
|
|
198
203
|
set: (f) => u("update:modelValue", f)
|
|
199
204
|
}), d = () => {
|
|
@@ -211,13 +216,13 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
211
216
|
}, [
|
|
212
217
|
a("div", {
|
|
213
218
|
class: "relative w-full max-w-2xl rounded-lg bg-white shadow-xl",
|
|
214
|
-
onClick: i[0] || (i[0] =
|
|
219
|
+
onClick: i[0] || (i[0] = H(() => {
|
|
215
220
|
}, ["stop"]))
|
|
216
221
|
}, [
|
|
217
|
-
a("div",
|
|
218
|
-
a("h2",
|
|
222
|
+
a("div", ve, [
|
|
223
|
+
a("h2", be, [
|
|
219
224
|
C(f.$slots, "title", {}, () => [
|
|
220
|
-
|
|
225
|
+
K(w(t.title), 1)
|
|
221
226
|
], !0)
|
|
222
227
|
]),
|
|
223
228
|
a("button", {
|
|
@@ -254,19 +259,19 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
254
259
|
})
|
|
255
260
|
]));
|
|
256
261
|
}
|
|
257
|
-
}),
|
|
262
|
+
}), Wt = /* @__PURE__ */ R(me, [["__scopeId", "data-v-091e8739"]]), ke = ["accept", "multiple", "disabled"], we = { class: "flex flex-col items-center justify-center gap-4 text-center" }, $e = ["src", "alt"], Ce = {
|
|
258
263
|
key: 1,
|
|
259
264
|
class: "w-full h-full text-gray-400",
|
|
260
265
|
fill: "none",
|
|
261
266
|
stroke: "currentColor",
|
|
262
267
|
viewBox: "0 0 24 24"
|
|
263
|
-
},
|
|
268
|
+
}, Be = { class: "text-center" }, _e = { class: "text-base font-medium text-gray-700" }, Te = { class: "text-primary-700" }, ze = { class: "flex items-center gap-3 flex-1 min-w-0" }, Me = { class: "flex-1 min-w-0" }, Ve = { class: "text-sm font-medium text-gray-900 truncate" }, je = { class: "text-xs text-gray-500" }, Le = {
|
|
264
269
|
key: 1,
|
|
265
270
|
class: "text-xs text-gray-500 mt-2"
|
|
266
|
-
},
|
|
271
|
+
}, Se = {
|
|
267
272
|
key: 2,
|
|
268
273
|
class: "text-sm text-danger-500 mt-2"
|
|
269
|
-
},
|
|
274
|
+
}, At = /* @__PURE__ */ S({
|
|
270
275
|
__name: "FileUpload",
|
|
271
276
|
props: {
|
|
272
277
|
modelValue: { default: null },
|
|
@@ -275,53 +280,58 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
275
280
|
disabled: { type: Boolean, default: !1 },
|
|
276
281
|
illustration: { default: void 0 },
|
|
277
282
|
illustrationAlt: { default: "Subir archivo" },
|
|
283
|
+
illustrationSize: { default: "md" },
|
|
278
284
|
mainText: { default: "Suelta aquí un archivo o" },
|
|
279
285
|
linkText: { default: "selecciónalo desde tu equipo" },
|
|
280
286
|
helperText: { default: "" },
|
|
281
287
|
maxSize: { default: void 0 }
|
|
282
288
|
},
|
|
283
289
|
emits: ["update:modelValue", "change", "error"],
|
|
284
|
-
setup(t, { emit:
|
|
285
|
-
const e = t, u =
|
|
286
|
-
|
|
287
|
-
|
|
290
|
+
setup(t, { emit: b }) {
|
|
291
|
+
const e = t, u = b, n = j(null), d = j(!1), r = j(e.modelValue), f = j(""), i = p(() => ({
|
|
292
|
+
sm: "w-20 h-20",
|
|
293
|
+
md: "w-32 h-32",
|
|
294
|
+
lg: "w-48 h-48"
|
|
295
|
+
})[e.illustrationSize]), y = () => {
|
|
296
|
+
var $;
|
|
297
|
+
($ = n.value) == null || $.click();
|
|
288
298
|
}, x = () => {
|
|
289
|
-
e.disabled ||
|
|
290
|
-
},
|
|
299
|
+
e.disabled || y();
|
|
300
|
+
}, L = ($) => {
|
|
291
301
|
e.disabled || (d.value = !0);
|
|
292
|
-
},
|
|
302
|
+
}, D = () => {
|
|
293
303
|
d.value = !1;
|
|
294
|
-
},
|
|
295
|
-
if (f.value = "", e.maxSize &&
|
|
296
|
-
const
|
|
297
|
-
return f.value = `El archivo excede el tamaño máximo de ${
|
|
304
|
+
}, _ = ($) => {
|
|
305
|
+
if (f.value = "", e.maxSize && $.size > e.maxSize) {
|
|
306
|
+
const B = (e.maxSize / 1048576).toFixed(2);
|
|
307
|
+
return f.value = `El archivo excede el tamaño máximo de ${B}MB`, u("error", f.value), !1;
|
|
298
308
|
}
|
|
299
309
|
return !0;
|
|
300
|
-
},
|
|
301
|
-
var
|
|
302
|
-
const
|
|
303
|
-
|
|
304
|
-
}, O = (
|
|
305
|
-
var
|
|
310
|
+
}, M = ($) => {
|
|
311
|
+
var I;
|
|
312
|
+
const z = (I = $.target.files) == null ? void 0 : I[0];
|
|
313
|
+
z && _(z) && (r.value = z, u("update:modelValue", z), u("change", z));
|
|
314
|
+
}, O = ($) => {
|
|
315
|
+
var z;
|
|
306
316
|
d.value = !1;
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
},
|
|
317
|
+
const B = (z = $.dataTransfer) == null ? void 0 : z.files[0];
|
|
318
|
+
B && _(B) && (r.value = B, u("update:modelValue", B), u("change", B));
|
|
319
|
+
}, P = () => {
|
|
310
320
|
r.value = null, f.value = "", n.value && (n.value.value = ""), u("update:modelValue", null), u("change", null);
|
|
311
|
-
},
|
|
312
|
-
if (
|
|
313
|
-
const
|
|
314
|
-
return Math.round(
|
|
321
|
+
}, E = ($) => {
|
|
322
|
+
if ($ === 0) return "0 Bytes";
|
|
323
|
+
const B = 1024, z = ["Bytes", "KB", "MB", "GB"], I = Math.floor(Math.log($) / Math.log(B));
|
|
324
|
+
return Math.round($ / Math.pow(B, I) * 100) / 100 + " " + z[I];
|
|
315
325
|
};
|
|
316
|
-
return (B
|
|
326
|
+
return ($, B) => (s(), o("div", {
|
|
317
327
|
class: v(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
318
328
|
d.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
319
329
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
320
330
|
]]),
|
|
321
331
|
onClick: x,
|
|
322
|
-
onDragover:
|
|
323
|
-
onDragleave:
|
|
324
|
-
onDrop:
|
|
332
|
+
onDragover: H(L, ["prevent"]),
|
|
333
|
+
onDragleave: H(D, ["prevent"]),
|
|
334
|
+
onDrop: H(O, ["prevent"])
|
|
325
335
|
}, [
|
|
326
336
|
a("input", {
|
|
327
337
|
ref_key: "fileInput",
|
|
@@ -331,16 +341,18 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
331
341
|
multiple: t.multiple,
|
|
332
342
|
disabled: t.disabled,
|
|
333
343
|
class: "hidden",
|
|
334
|
-
onChange:
|
|
344
|
+
onChange: M
|
|
335
345
|
}, null, 40, ke),
|
|
336
346
|
a("div", we, [
|
|
337
|
-
a("div",
|
|
347
|
+
a("div", {
|
|
348
|
+
class: v([i.value, "flex items-center justify-center"])
|
|
349
|
+
}, [
|
|
338
350
|
t.illustration ? (s(), o("img", {
|
|
339
351
|
key: 0,
|
|
340
352
|
src: t.illustration,
|
|
341
353
|
alt: t.illustrationAlt,
|
|
342
354
|
class: "max-w-full max-h-full object-contain"
|
|
343
|
-
}, null, 8,
|
|
355
|
+
}, null, 8, $e)) : (s(), o("svg", Ce, [...B[1] || (B[1] = [
|
|
344
356
|
a("path", {
|
|
345
357
|
"stroke-linecap": "round",
|
|
346
358
|
"stroke-linejoin": "round",
|
|
@@ -348,21 +360,21 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
348
360
|
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"
|
|
349
361
|
}, null, -1)
|
|
350
362
|
])]))
|
|
351
|
-
]),
|
|
352
|
-
a("div",
|
|
353
|
-
a("p",
|
|
354
|
-
|
|
355
|
-
a("span",
|
|
363
|
+
], 2),
|
|
364
|
+
a("div", Be, [
|
|
365
|
+
a("p", _e, [
|
|
366
|
+
K(w(t.mainText) + " ", 1),
|
|
367
|
+
a("span", Te, w(t.linkText), 1)
|
|
356
368
|
])
|
|
357
369
|
]),
|
|
358
370
|
r.value ? (s(), o("div", {
|
|
359
371
|
key: 0,
|
|
360
372
|
class: "w-full max-w-md bg-gray-50 rounded-lg p-4 flex items-center justify-between",
|
|
361
|
-
onClick:
|
|
373
|
+
onClick: B[0] || (B[0] = H(() => {
|
|
362
374
|
}, ["stop"]))
|
|
363
375
|
}, [
|
|
364
376
|
a("div", ze, [
|
|
365
|
-
|
|
377
|
+
B[2] || (B[2] = a("svg", {
|
|
366
378
|
class: "w-6 h-6 text-gray-600 flex-shrink-0",
|
|
367
379
|
fill: "none",
|
|
368
380
|
stroke: "currentColor",
|
|
@@ -375,16 +387,16 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
375
387
|
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"
|
|
376
388
|
})
|
|
377
389
|
], -1)),
|
|
378
|
-
a("div",
|
|
379
|
-
a("p",
|
|
380
|
-
a("p",
|
|
390
|
+
a("div", Me, [
|
|
391
|
+
a("p", Ve, w(r.value.name), 1),
|
|
392
|
+
a("p", je, w(E(r.value.size)), 1)
|
|
381
393
|
])
|
|
382
394
|
]),
|
|
383
395
|
t.disabled ? c("", !0) : (s(), o("button", {
|
|
384
396
|
key: 0,
|
|
385
|
-
onClick:
|
|
397
|
+
onClick: H(P, ["stop"]),
|
|
386
398
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
387
|
-
}, [...
|
|
399
|
+
}, [...B[3] || (B[3] = [
|
|
388
400
|
a("svg", {
|
|
389
401
|
class: "w-5 h-5",
|
|
390
402
|
fill: "currentColor",
|
|
@@ -398,15 +410,15 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
398
410
|
], -1)
|
|
399
411
|
])]))
|
|
400
412
|
])) : c("", !0),
|
|
401
|
-
t.helperText ? (s(), o("p",
|
|
402
|
-
f.value ? (s(), o("p",
|
|
413
|
+
t.helperText ? (s(), o("p", Le, w(t.helperText), 1)) : c("", !0),
|
|
414
|
+
f.value ? (s(), o("p", Se, w(f.value), 1)) : c("", !0)
|
|
403
415
|
])
|
|
404
416
|
], 34));
|
|
405
417
|
}
|
|
406
|
-
}),
|
|
418
|
+
}), De = ["stroke-width"], Oe = {
|
|
407
419
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
408
420
|
style: { "background-color": "#f7f7f7" }
|
|
409
|
-
},
|
|
421
|
+
}, Ie = /* @__PURE__ */ S({
|
|
410
422
|
__name: "Loader",
|
|
411
423
|
props: {
|
|
412
424
|
type: { default: "circular" },
|
|
@@ -417,7 +429,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
417
429
|
progress: { default: void 0 }
|
|
418
430
|
},
|
|
419
431
|
setup(t) {
|
|
420
|
-
const
|
|
432
|
+
const b = t, e = {
|
|
421
433
|
primary: "text-primary-700",
|
|
422
434
|
secondary: "text-secondary-500",
|
|
423
435
|
success: "text-success-500",
|
|
@@ -431,14 +443,14 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
431
443
|
warning: "bg-warning-500",
|
|
432
444
|
danger: "bg-danger-500",
|
|
433
445
|
info: "bg-info-500"
|
|
434
|
-
}, n =
|
|
446
|
+
}, n = p(() => [e[b.color]]), d = p(() => [u[b.color]]);
|
|
435
447
|
return (r, f) => t.type === "circular" ? (s(), o("div", {
|
|
436
448
|
key: 0,
|
|
437
449
|
class: v(n.value)
|
|
438
450
|
}, [
|
|
439
451
|
(s(), o("svg", {
|
|
440
452
|
class: "animate-spin",
|
|
441
|
-
style:
|
|
453
|
+
style: W({ width: t.size, height: t.size }),
|
|
442
454
|
viewBox: "0 0 24 24"
|
|
443
455
|
}, [
|
|
444
456
|
a("circle", {
|
|
@@ -449,7 +461,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
449
461
|
stroke: "currentColor",
|
|
450
462
|
"stroke-width": t.strokeWidth,
|
|
451
463
|
fill: "none"
|
|
452
|
-
}, null, 8,
|
|
464
|
+
}, null, 8, De),
|
|
453
465
|
f[0] || (f[0] = a("path", {
|
|
454
466
|
class: "opacity-75",
|
|
455
467
|
fill: "currentColor",
|
|
@@ -459,32 +471,32 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
459
471
|
], 2)) : t.type === "linear" ? (s(), o("div", {
|
|
460
472
|
key: 1,
|
|
461
473
|
class: "w-full",
|
|
462
|
-
style:
|
|
474
|
+
style: W({ height: t.height })
|
|
463
475
|
}, [
|
|
464
|
-
a("div",
|
|
476
|
+
a("div", Oe, [
|
|
465
477
|
a("div", {
|
|
466
478
|
class: v([d.value, "h-full rounded-lg animate-linear-loader"]),
|
|
467
|
-
style:
|
|
479
|
+
style: W({ width: t.progress ? `${t.progress}%` : void 0 })
|
|
468
480
|
}, null, 6)
|
|
469
481
|
])
|
|
470
482
|
], 4)) : c("", !0);
|
|
471
483
|
}
|
|
472
|
-
}),
|
|
484
|
+
}), Kt = /* @__PURE__ */ R(Ie, [["__scopeId", "data-v-8df4ec38"]]), Ee = ["disabled", "aria-expanded"], He = ["disabled", "onClick"], Fe = {
|
|
473
485
|
key: 0,
|
|
474
486
|
class: "flex-shrink-0"
|
|
475
|
-
},
|
|
487
|
+
}, Pe = ["innerHTML"], We = { class: "flex-1 min-w-0 mr-2" }, Ae = { class: "flex flex-col items-start" }, Ke = ["title"], Re = ["title"], Ne = {
|
|
476
488
|
key: 1,
|
|
477
489
|
class: "flex-shrink-0"
|
|
478
|
-
},
|
|
490
|
+
}, qe = {
|
|
479
491
|
key: 0,
|
|
480
492
|
class: "text-xs text-secondary-400 font-mono whitespace-nowrap"
|
|
481
|
-
},
|
|
493
|
+
}, Ue = { key: 1 }, Ge = {
|
|
482
494
|
key: 2,
|
|
483
495
|
class: "w-4 h-4 ml-2 flex-shrink-0",
|
|
484
496
|
fill: "none",
|
|
485
497
|
stroke: "currentColor",
|
|
486
498
|
viewBox: "0 0 24 24"
|
|
487
|
-
},
|
|
499
|
+
}, Qe = /* @__PURE__ */ S({
|
|
488
500
|
__name: "Menu",
|
|
489
501
|
props: {
|
|
490
502
|
items: { default: () => [] },
|
|
@@ -503,91 +515,92 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
503
515
|
zIndex: { default: 50 }
|
|
504
516
|
},
|
|
505
517
|
emits: ["open", "close", "select"],
|
|
506
|
-
setup(t, { emit:
|
|
507
|
-
const e = t, u =
|
|
518
|
+
setup(t, { emit: b }) {
|
|
519
|
+
const e = t, u = b, n = j(!1), d = j(null), r = j(null), f = j({}), i = p(() => [
|
|
508
520
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
509
521
|
"bg-white border border-secondary-300 rounded-md",
|
|
510
522
|
"hover:bg-secondary-50 focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
511
523
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
512
524
|
"transition-colors"
|
|
513
|
-
].join(" ")),
|
|
525
|
+
].join(" ")), y = p(() => [...[
|
|
514
526
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
515
527
|
"flex flex-col",
|
|
516
528
|
"focus:outline-none"
|
|
517
|
-
], `z-${e.zIndex}`].join(" ")),
|
|
518
|
-
const
|
|
529
|
+
], `z-${e.zIndex}`].join(" ")), x = p(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), L = p(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), D = p(() => "py-1 overflow-y-auto flex-1 min-h-0"), _ = p(() => "my-1 border-t border-secondary-200"), M = p(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), O = (l) => {
|
|
530
|
+
const k = [
|
|
519
531
|
"w-full flex items-center gap-3 px-4 py-2 text-sm text-left",
|
|
520
532
|
"transition-colors focus:outline-none",
|
|
521
533
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
522
|
-
],
|
|
534
|
+
], g = l.variant || "default", N = {
|
|
523
535
|
default: "text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50",
|
|
524
536
|
danger: "text-danger-600 hover:bg-danger-50 focus:bg-danger-50",
|
|
525
537
|
success: "text-success-600 hover:bg-success-50 focus:bg-success-50",
|
|
526
538
|
warning: "text-warning-600 hover:bg-warning-50 focus:bg-warning-50"
|
|
527
539
|
};
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
540
|
+
let T = "";
|
|
541
|
+
return l.color && (T = l.color, (l.color.includes("white") || l.color.includes("50")) && (T += " hover:text-black")), [...k, T || N[g]].join(" ");
|
|
542
|
+
}, P = () => {
|
|
543
|
+
e.disabled || (n.value ? $() : E());
|
|
544
|
+
}, E = () => {
|
|
532
545
|
n.value = !0, u("open"), J(() => {
|
|
533
|
-
|
|
546
|
+
m(), document.addEventListener("click", z), document.addEventListener("keydown", I);
|
|
534
547
|
});
|
|
535
|
-
},
|
|
536
|
-
n.value = !1, u("close"), document.removeEventListener("click",
|
|
537
|
-
},
|
|
538
|
-
l.disabled || (l.action && l.action(), u("select", l), e.closeOnClick && !l.children &&
|
|
539
|
-
},
|
|
540
|
-
const
|
|
541
|
-
d.value && !d.value.contains(
|
|
542
|
-
},
|
|
543
|
-
l.key === "Escape" &&
|
|
548
|
+
}, $ = () => {
|
|
549
|
+
n.value = !1, u("close"), document.removeEventListener("click", z), document.removeEventListener("keydown", I);
|
|
550
|
+
}, B = (l) => {
|
|
551
|
+
l.disabled || (l.action && l.action(), u("select", l), e.closeOnClick && !l.children && $());
|
|
552
|
+
}, z = (l) => {
|
|
553
|
+
const k = l.target;
|
|
554
|
+
d.value && !d.value.contains(k) && r.value && !r.value.contains(k) && $();
|
|
555
|
+
}, I = (l) => {
|
|
556
|
+
l.key === "Escape" && $();
|
|
544
557
|
}, h = (l) => {
|
|
545
|
-
(l.key === "Enter" || l.key === " ") && (l.preventDefault(),
|
|
546
|
-
},
|
|
558
|
+
(l.key === "Enter" || l.key === " ") && (l.preventDefault(), P());
|
|
559
|
+
}, m = () => {
|
|
547
560
|
if (!d.value || !r.value) return;
|
|
548
|
-
const l = d.value.getBoundingClientRect(),
|
|
549
|
-
let
|
|
561
|
+
const l = d.value.getBoundingClientRect(), k = r.value.getBoundingClientRect(), g = window.innerWidth, N = window.innerHeight;
|
|
562
|
+
let T = 0, V = 0;
|
|
550
563
|
switch (e.position) {
|
|
551
564
|
case "bottom-start":
|
|
552
|
-
|
|
565
|
+
T = l.bottom + e.offset.y, V = l.left + e.offset.x;
|
|
553
566
|
break;
|
|
554
567
|
case "bottom-end":
|
|
555
|
-
|
|
568
|
+
T = l.bottom + e.offset.y, V = l.right - k.width + e.offset.x;
|
|
556
569
|
break;
|
|
557
570
|
case "top-start":
|
|
558
|
-
|
|
571
|
+
T = l.top - k.height - e.offset.y, V = l.left + e.offset.x;
|
|
559
572
|
break;
|
|
560
573
|
case "top-end":
|
|
561
|
-
|
|
574
|
+
T = l.top - k.height - e.offset.y, V = l.right - k.width + e.offset.x;
|
|
562
575
|
break;
|
|
563
576
|
case "right-start":
|
|
564
|
-
|
|
577
|
+
T = l.top + e.offset.y, V = l.right + e.offset.x;
|
|
565
578
|
break;
|
|
566
579
|
case "right-end":
|
|
567
|
-
|
|
580
|
+
T = l.bottom - k.height + e.offset.y, V = l.right + e.offset.x;
|
|
568
581
|
break;
|
|
569
582
|
case "left-start":
|
|
570
|
-
|
|
583
|
+
T = l.top + e.offset.y, V = l.left - k.width - e.offset.x;
|
|
571
584
|
break;
|
|
572
585
|
case "left-end":
|
|
573
|
-
|
|
586
|
+
T = l.bottom - k.height + e.offset.y, V = l.left - k.width - e.offset.x;
|
|
574
587
|
break;
|
|
575
588
|
}
|
|
576
|
-
|
|
577
|
-
top: `${
|
|
578
|
-
left: `${
|
|
589
|
+
V + k.width > g && (V = g - k.width - 8), V < 8 && (V = 8), T + k.height > N && (T = N - k.height - 8), T < 8 && (T = 8), f.value = {
|
|
590
|
+
top: `${T}px`,
|
|
591
|
+
left: `${V}px`,
|
|
579
592
|
width: e.width === "auto" ? `${Math.max(l.width, 240)}px` : e.width,
|
|
580
593
|
maxHeight: e.maxHeight,
|
|
581
594
|
minWidth: "240px"
|
|
582
595
|
};
|
|
583
596
|
};
|
|
584
597
|
return ee(() => {
|
|
585
|
-
window.addEventListener("scroll",
|
|
598
|
+
window.addEventListener("scroll", m, !0), window.addEventListener("resize", m);
|
|
586
599
|
}), te(() => {
|
|
587
|
-
window.removeEventListener("scroll",
|
|
600
|
+
window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m), document.removeEventListener("click", z), document.removeEventListener("keydown", I);
|
|
588
601
|
}), Y(() => e.items, () => {
|
|
589
|
-
n.value && J(
|
|
590
|
-
}, { deep: !0 }), (l,
|
|
602
|
+
n.value && J(m);
|
|
603
|
+
}, { deep: !0 }), (l, k) => (s(), o("div", {
|
|
591
604
|
class: v(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
592
605
|
}, [
|
|
593
606
|
a("div", {
|
|
@@ -596,13 +609,13 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
596
609
|
}, [
|
|
597
610
|
C(l.$slots, "trigger", {
|
|
598
611
|
isOpen: n.value,
|
|
599
|
-
toggle:
|
|
612
|
+
toggle: P
|
|
600
613
|
}, () => [
|
|
601
614
|
a("button", {
|
|
602
615
|
type: "button",
|
|
603
616
|
class: v(i.value),
|
|
604
617
|
disabled: t.disabled,
|
|
605
|
-
onClick:
|
|
618
|
+
onClick: P,
|
|
606
619
|
onKeydown: h,
|
|
607
620
|
tabindex: 0,
|
|
608
621
|
role: "button",
|
|
@@ -610,7 +623,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
610
623
|
"aria-haspopup": !0
|
|
611
624
|
}, [
|
|
612
625
|
C(l.$slots, "trigger-content", {}, () => [
|
|
613
|
-
|
|
626
|
+
K(w(t.triggerText), 1)
|
|
614
627
|
], !0),
|
|
615
628
|
t.showChevron ? (s(), o("svg", {
|
|
616
629
|
key: 0,
|
|
@@ -618,7 +631,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
618
631
|
fill: "none",
|
|
619
632
|
stroke: "currentColor",
|
|
620
633
|
viewBox: "0 0 24 24"
|
|
621
|
-
}, [...
|
|
634
|
+
}, [...k[1] || (k[1] = [
|
|
622
635
|
a("path", {
|
|
623
636
|
"stroke-linecap": "round",
|
|
624
637
|
"stroke-linejoin": "round",
|
|
@@ -626,7 +639,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
626
639
|
d: "M19 9l-7 7-7-7"
|
|
627
640
|
}, null, -1)
|
|
628
641
|
])], 2)) : c("", !0)
|
|
629
|
-
], 42,
|
|
642
|
+
], 42, Ee)
|
|
630
643
|
], !0)
|
|
631
644
|
], 512),
|
|
632
645
|
(s(), q(X, { to: "body" }, [
|
|
@@ -634,76 +647,76 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
634
647
|
key: 0,
|
|
635
648
|
ref_key: "menuRef",
|
|
636
649
|
ref: r,
|
|
637
|
-
class: v(
|
|
638
|
-
style:
|
|
639
|
-
onClick:
|
|
650
|
+
class: v(y.value),
|
|
651
|
+
style: W(f.value),
|
|
652
|
+
onClick: k[0] || (k[0] = H(() => {
|
|
640
653
|
}, ["stop"]))
|
|
641
654
|
}, [
|
|
642
655
|
l.$slots.header ? (s(), o("div", {
|
|
643
656
|
key: 0,
|
|
644
|
-
class: v(
|
|
657
|
+
class: v(x.value)
|
|
645
658
|
}, [
|
|
646
|
-
C(l.$slots, "header", { close:
|
|
659
|
+
C(l.$slots, "header", { close: $ }, void 0, !0)
|
|
647
660
|
], 2)) : c("", !0),
|
|
648
661
|
a("div", {
|
|
649
662
|
class: v(D.value)
|
|
650
663
|
}, [
|
|
651
664
|
C(l.$slots, "default", {
|
|
652
|
-
close:
|
|
665
|
+
close: $,
|
|
653
666
|
isOpen: n.value
|
|
654
667
|
}, () => [
|
|
655
|
-
(s(!0), o(
|
|
656
|
-
key:
|
|
668
|
+
(s(!0), o(F, null, A(t.items, (g, N) => (s(), o(F, {
|
|
669
|
+
key: g.id || N
|
|
657
670
|
}, [
|
|
658
|
-
|
|
671
|
+
g.type === "divider" ? (s(), o("div", {
|
|
659
672
|
key: 0,
|
|
660
673
|
class: v(_.value)
|
|
661
|
-
}, null, 2)) :
|
|
674
|
+
}, null, 2)) : g.type === "header" ? (s(), o("div", {
|
|
662
675
|
key: 1,
|
|
663
|
-
class: v(
|
|
664
|
-
},
|
|
676
|
+
class: v(M.value)
|
|
677
|
+
}, w(g.label), 3)) : (s(), o("button", {
|
|
665
678
|
key: 2,
|
|
666
679
|
type: "button",
|
|
667
|
-
class: v(
|
|
668
|
-
disabled:
|
|
669
|
-
onClick: (
|
|
680
|
+
class: v(O(g)),
|
|
681
|
+
disabled: g.disabled,
|
|
682
|
+
onClick: (T) => B(g)
|
|
670
683
|
}, [
|
|
671
|
-
|
|
672
|
-
C(l.$slots, `icon-${
|
|
673
|
-
typeof
|
|
684
|
+
g.icon || l.$slots[`icon-${g.id}`] ? (s(), o("span", Fe, [
|
|
685
|
+
C(l.$slots, `icon-${g.id}`, { item: g }, () => [
|
|
686
|
+
typeof g.icon != "string" ? (s(), q(Z(g.icon), {
|
|
674
687
|
key: 0,
|
|
675
688
|
class: "w-5 h-5"
|
|
676
689
|
})) : (s(), o("span", {
|
|
677
690
|
key: 1,
|
|
678
|
-
innerHTML:
|
|
691
|
+
innerHTML: g.icon,
|
|
679
692
|
class: "w-5 h-5 inline-block"
|
|
680
|
-
}, null, 8,
|
|
693
|
+
}, null, 8, Pe))
|
|
681
694
|
], !0)
|
|
682
695
|
])) : c("", !0),
|
|
683
|
-
a("div",
|
|
684
|
-
C(l.$slots, `item-${
|
|
685
|
-
item:
|
|
686
|
-
close:
|
|
696
|
+
a("div", We, [
|
|
697
|
+
C(l.$slots, `item-${g.id}`, {
|
|
698
|
+
item: g,
|
|
699
|
+
close: $
|
|
687
700
|
}, () => [
|
|
688
|
-
a("div",
|
|
701
|
+
a("div", Ae, [
|
|
689
702
|
a("span", {
|
|
690
703
|
class: "truncate w-full",
|
|
691
|
-
title:
|
|
692
|
-
},
|
|
693
|
-
|
|
704
|
+
title: g.label
|
|
705
|
+
}, w(g.label), 9, Ke),
|
|
706
|
+
g.description ? (s(), o("span", {
|
|
694
707
|
key: 0,
|
|
695
708
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
696
|
-
title:
|
|
697
|
-
},
|
|
709
|
+
title: g.description
|
|
710
|
+
}, w(g.description), 9, Re)) : c("", !0)
|
|
698
711
|
])
|
|
699
712
|
], !0)
|
|
700
713
|
]),
|
|
701
|
-
|
|
702
|
-
C(l.$slots, `suffix-${
|
|
703
|
-
|
|
714
|
+
g.suffix || g.shortcut || l.$slots[`suffix-${g.id}`] ? (s(), o("span", Ne, [
|
|
715
|
+
C(l.$slots, `suffix-${g.id}`, { item: g }, () => [
|
|
716
|
+
g.shortcut ? (s(), o("span", qe, w(g.shortcut), 1)) : g.suffix ? (s(), o("span", Ue, w(g.suffix), 1)) : c("", !0)
|
|
704
717
|
], !0)
|
|
705
718
|
])) : c("", !0),
|
|
706
|
-
|
|
719
|
+
g.children && g.children.length > 0 ? (s(), o("svg", Ge, [...k[2] || (k[2] = [
|
|
707
720
|
a("path", {
|
|
708
721
|
"stroke-linecap": "round",
|
|
709
722
|
"stroke-linejoin": "round",
|
|
@@ -711,51 +724,51 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
711
724
|
d: "M9 5l7 7-7 7"
|
|
712
725
|
}, null, -1)
|
|
713
726
|
])])) : c("", !0)
|
|
714
|
-
], 10,
|
|
727
|
+
], 10, He))
|
|
715
728
|
], 64))), 128))
|
|
716
729
|
], !0)
|
|
717
730
|
], 2),
|
|
718
731
|
l.$slots.footer ? (s(), o("div", {
|
|
719
732
|
key: 1,
|
|
720
|
-
class: v(
|
|
733
|
+
class: v(L.value)
|
|
721
734
|
}, [
|
|
722
|
-
C(l.$slots, "footer", { close:
|
|
735
|
+
C(l.$slots, "footer", { close: $ }, void 0, !0)
|
|
723
736
|
], 2)) : c("", !0)
|
|
724
737
|
], 6)) : c("", !0),
|
|
725
738
|
n.value && t.overlay ? (s(), o("div", {
|
|
726
739
|
key: 1,
|
|
727
740
|
class: "fixed inset-0 bg-black/20 z-40",
|
|
728
|
-
onClick:
|
|
741
|
+
onClick: $
|
|
729
742
|
})) : c("", !0)
|
|
730
743
|
]))
|
|
731
744
|
], 2));
|
|
732
745
|
}
|
|
733
|
-
}),
|
|
746
|
+
}), Rt = /* @__PURE__ */ R(Qe, [["__scopeId", "data-v-335f2699"]]), Je = ["for"], Xe = {
|
|
734
747
|
key: 0,
|
|
735
748
|
class: "text-danger-600"
|
|
736
|
-
},
|
|
749
|
+
}, Ye = { class: "relative" }, Ze = ["id", "disabled", "aria-expanded"], et = { class: "flex-1 text-left truncate" }, tt = {
|
|
737
750
|
key: 0,
|
|
738
751
|
class: "p-2 border-b border-secondary-200"
|
|
739
|
-
},
|
|
752
|
+
}, st = ["placeholder"], ot = { class: "max-h-64 overflow-y-auto" }, lt = {
|
|
740
753
|
key: 0,
|
|
741
754
|
class: "px-4 py-3 text-sm text-secondary-500 text-center"
|
|
742
|
-
},
|
|
755
|
+
}, at = ["onClick"], nt = { class: "flex items-center justify-between w-full" }, rt = { class: "truncate" }, it = {
|
|
743
756
|
key: 0,
|
|
744
757
|
class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
|
|
745
758
|
fill: "none",
|
|
746
759
|
stroke: "currentColor",
|
|
747
760
|
viewBox: "0 0 24 24",
|
|
748
761
|
xmlns: "http://www.w3.org/2000/svg"
|
|
749
|
-
},
|
|
762
|
+
}, dt = {
|
|
750
763
|
key: 0,
|
|
751
764
|
class: "border-t border-secondary-200 my-1"
|
|
752
|
-
},
|
|
765
|
+
}, ut = ["onClick"], ct = ["innerHTML"], ft = {
|
|
753
766
|
key: 1,
|
|
754
767
|
class: "mt-1 text-sm text-danger-600"
|
|
755
|
-
},
|
|
768
|
+
}, pt = {
|
|
756
769
|
key: 2,
|
|
757
770
|
class: "mt-1 text-sm text-secondary-600"
|
|
758
|
-
},
|
|
771
|
+
}, gt = /* @__PURE__ */ S({
|
|
759
772
|
__name: "Select",
|
|
760
773
|
props: {
|
|
761
774
|
modelValue: { default: null },
|
|
@@ -776,16 +789,16 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
776
789
|
menuPosition: { default: "bottom" }
|
|
777
790
|
},
|
|
778
791
|
emits: ["update:modelValue", "change", "action"],
|
|
779
|
-
setup(t, { emit:
|
|
780
|
-
const e = t, u =
|
|
792
|
+
setup(t, { emit: b }) {
|
|
793
|
+
const e = t, u = b, n = j(!1), d = j(""), r = j(null), f = p(
|
|
781
794
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
782
|
-
), i =
|
|
795
|
+
), i = p(() => e.options.find((h) => h.value === e.modelValue) || null), y = p(() => {
|
|
783
796
|
if (!e.searchable || !d.value)
|
|
784
797
|
return e.options;
|
|
785
798
|
const h = d.value.toLowerCase();
|
|
786
|
-
return e.options.filter((
|
|
787
|
-
}),
|
|
788
|
-
const h = "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",
|
|
799
|
+
return e.options.filter((m) => m.label.toLowerCase().includes(h));
|
|
800
|
+
}), x = p(() => "block text-sm font-semibold text-secondary-700 mb-1"), L = p(() => {
|
|
801
|
+
const h = "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 = {
|
|
789
802
|
sm: "px-3 py-1.5 text-sm",
|
|
790
803
|
md: "px-4 py-2 text-base",
|
|
791
804
|
lg: "px-5 py-3 text-lg"
|
|
@@ -793,71 +806,71 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
793
806
|
default: "bg-white border-secondary-300 hover:border-secondary-400",
|
|
794
807
|
outline: "bg-transparent border-secondary-300 hover:border-primary-500",
|
|
795
808
|
filled: "bg-secondary-100 border-transparent hover:bg-secondary-200"
|
|
796
|
-
},
|
|
809
|
+
}, k = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
797
810
|
return [
|
|
798
811
|
h,
|
|
799
|
-
|
|
812
|
+
m[e.size],
|
|
800
813
|
l[e.variant],
|
|
801
|
-
|
|
814
|
+
k
|
|
802
815
|
].join(" ");
|
|
803
|
-
}), D =
|
|
804
|
-
const
|
|
805
|
-
return [
|
|
806
|
-
},
|
|
807
|
-
const
|
|
808
|
-
return h.variant === "danger" ? `${
|
|
809
|
-
},
|
|
816
|
+
}), D = p(() => `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`), _ = (h) => {
|
|
817
|
+
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", l = O(h) ? "bg-primary-50" : "";
|
|
818
|
+
return [m, l].join(" ");
|
|
819
|
+
}, M = (h) => {
|
|
820
|
+
const m = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
|
|
821
|
+
return h.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`;
|
|
822
|
+
}, O = (h) => h.value === e.modelValue, P = () => {
|
|
810
823
|
e.disabled || (n.value = !n.value, n.value && e.searchable && J(() => {
|
|
811
824
|
var h;
|
|
812
825
|
(h = r.value) == null || h.focus();
|
|
813
826
|
}));
|
|
814
|
-
},
|
|
827
|
+
}, E = () => {
|
|
815
828
|
n.value = !1, d.value = "";
|
|
816
|
-
},
|
|
817
|
-
h.disabled || (u("update:modelValue", h.value), u("change", h),
|
|
818
|
-
},
|
|
819
|
-
h.action && h.action(), u("action", h),
|
|
820
|
-
},
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
|
|
829
|
+
}, $ = (h) => {
|
|
830
|
+
h.disabled || (u("update:modelValue", h.value), u("change", h), E());
|
|
831
|
+
}, B = (h) => {
|
|
832
|
+
h.action && h.action(), u("action", h), E();
|
|
833
|
+
}, z = (h) => {
|
|
834
|
+
const m = h.relatedTarget;
|
|
835
|
+
m && m.closest(".select-wrapper") || setTimeout(() => {
|
|
836
|
+
E();
|
|
824
837
|
}, 200);
|
|
825
|
-
},
|
|
826
|
-
h.key === "Escape" ?
|
|
838
|
+
}, I = (h) => {
|
|
839
|
+
h.key === "Escape" ? E() : (h.key === "Enter" || h.key === " ") && (h.preventDefault(), P());
|
|
827
840
|
};
|
|
828
841
|
return Y(n, (h) => {
|
|
829
842
|
h && (d.value = "");
|
|
830
|
-
}), (h,
|
|
843
|
+
}), (h, m) => (s(), o("div", {
|
|
831
844
|
class: v(["select-wrapper", { "w-full": t.fullWidth }])
|
|
832
845
|
}, [
|
|
833
846
|
t.label ? (s(), o("label", {
|
|
834
847
|
key: 0,
|
|
835
848
|
for: f.value,
|
|
836
|
-
class: v(
|
|
849
|
+
class: v(x.value)
|
|
837
850
|
}, [
|
|
838
|
-
|
|
839
|
-
t.required ? (s(), o("span",
|
|
840
|
-
], 10,
|
|
841
|
-
a("div",
|
|
851
|
+
K(w(t.label) + " ", 1),
|
|
852
|
+
t.required ? (s(), o("span", Xe, "*")) : c("", !0)
|
|
853
|
+
], 10, Je)) : c("", !0),
|
|
854
|
+
a("div", Ye, [
|
|
842
855
|
a("button", {
|
|
843
856
|
id: f.value,
|
|
844
857
|
type: "button",
|
|
845
|
-
class: v(
|
|
858
|
+
class: v(L.value),
|
|
846
859
|
disabled: t.disabled,
|
|
847
860
|
"aria-expanded": n.value,
|
|
848
861
|
"aria-haspopup": !0,
|
|
849
|
-
onClick:
|
|
850
|
-
onBlur:
|
|
851
|
-
onKeydown:
|
|
862
|
+
onClick: P,
|
|
863
|
+
onBlur: z,
|
|
864
|
+
onKeydown: I
|
|
852
865
|
}, [
|
|
853
|
-
a("span",
|
|
866
|
+
a("span", et, w(i.value ? i.value.label : t.placeholder), 1),
|
|
854
867
|
(s(), o("svg", {
|
|
855
868
|
class: v(["w-5 h-5 flex-shrink-0 transition-transform text-secondary-600", n.value ? "rotate-180" : ""]),
|
|
856
869
|
fill: "none",
|
|
857
870
|
stroke: "currentColor",
|
|
858
871
|
viewBox: "0 0 24 24",
|
|
859
872
|
xmlns: "http://www.w3.org/2000/svg"
|
|
860
|
-
}, [...
|
|
873
|
+
}, [...m[3] || (m[3] = [
|
|
861
874
|
a("path", {
|
|
862
875
|
"stroke-linecap": "round",
|
|
863
876
|
"stroke-linejoin": "round",
|
|
@@ -865,38 +878,38 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
865
878
|
d: "M19 9l-7 7-7-7"
|
|
866
879
|
}, null, -1)
|
|
867
880
|
])], 2))
|
|
868
|
-
], 42,
|
|
881
|
+
], 42, Ze),
|
|
869
882
|
n.value ? (s(), o("div", {
|
|
870
883
|
key: 0,
|
|
871
884
|
class: v(D.value),
|
|
872
|
-
onClick:
|
|
885
|
+
onClick: m[2] || (m[2] = H(() => {
|
|
873
886
|
}, ["stop"]))
|
|
874
887
|
}, [
|
|
875
|
-
t.searchable ? (s(), o("div",
|
|
888
|
+
t.searchable ? (s(), o("div", tt, [
|
|
876
889
|
se(a("input", {
|
|
877
890
|
ref_key: "searchInput",
|
|
878
891
|
ref: r,
|
|
879
|
-
"onUpdate:modelValue":
|
|
892
|
+
"onUpdate:modelValue": m[0] || (m[0] = (l) => d.value = l),
|
|
880
893
|
type: "text",
|
|
881
894
|
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",
|
|
882
895
|
placeholder: t.searchPlaceholder,
|
|
883
|
-
onKeydown:
|
|
896
|
+
onKeydown: m[1] || (m[1] = H(() => {
|
|
884
897
|
}, ["stop"]))
|
|
885
|
-
}, null, 40,
|
|
898
|
+
}, null, 40, st), [
|
|
886
899
|
[oe, d.value]
|
|
887
900
|
])
|
|
888
901
|
])) : c("", !0),
|
|
889
|
-
a("div",
|
|
890
|
-
|
|
891
|
-
(s(!0), o(
|
|
902
|
+
a("div", ot, [
|
|
903
|
+
y.value.length === 0 ? (s(), o("div", lt, w(t.emptyText), 1)) : (s(), o(F, { key: 1 }, [
|
|
904
|
+
(s(!0), o(F, null, A(y.value, (l) => (s(), o("button", {
|
|
892
905
|
key: l.value,
|
|
893
906
|
type: "button",
|
|
894
907
|
class: v(_(l)),
|
|
895
|
-
onClick: (
|
|
908
|
+
onClick: (k) => $(l)
|
|
896
909
|
}, [
|
|
897
|
-
a("div",
|
|
898
|
-
a("span",
|
|
899
|
-
|
|
910
|
+
a("div", nt, [
|
|
911
|
+
a("span", rt, w(l.label), 1),
|
|
912
|
+
O(l) ? (s(), o("svg", it, [...m[4] || (m[4] = [
|
|
900
913
|
a("path", {
|
|
901
914
|
"stroke-linecap": "round",
|
|
902
915
|
"stroke-linejoin": "round",
|
|
@@ -905,13 +918,13 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
905
918
|
}, null, -1)
|
|
906
919
|
])])) : c("", !0)
|
|
907
920
|
])
|
|
908
|
-
], 10,
|
|
909
|
-
t.actionItems.length > 0 ? (s(), o("div",
|
|
910
|
-
(s(!0), o(
|
|
921
|
+
], 10, at))), 128)),
|
|
922
|
+
t.actionItems.length > 0 ? (s(), o("div", dt)) : c("", !0),
|
|
923
|
+
(s(!0), o(F, null, A(t.actionItems, (l) => (s(), o("button", {
|
|
911
924
|
key: l.id,
|
|
912
925
|
type: "button",
|
|
913
|
-
class: v(
|
|
914
|
-
onClick: (
|
|
926
|
+
class: v(M(l)),
|
|
927
|
+
onClick: (k) => B(l)
|
|
915
928
|
}, [
|
|
916
929
|
l.icon ? (s(), o("svg", {
|
|
917
930
|
key: 0,
|
|
@@ -921,22 +934,22 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
921
934
|
viewBox: "0 0 24 24",
|
|
922
935
|
xmlns: "http://www.w3.org/2000/svg",
|
|
923
936
|
innerHTML: l.icon
|
|
924
|
-
}, null, 8,
|
|
925
|
-
|
|
926
|
-
], 10,
|
|
937
|
+
}, null, 8, ct)) : c("", !0),
|
|
938
|
+
K(" " + w(l.label), 1)
|
|
939
|
+
], 10, ut))), 128))
|
|
927
940
|
], 64))
|
|
928
941
|
])
|
|
929
942
|
], 2)) : c("", !0)
|
|
930
943
|
]),
|
|
931
|
-
t.error ? (s(), o("p",
|
|
944
|
+
t.error ? (s(), o("p", ft, w(t.error), 1)) : t.helperText ? (s(), o("p", pt, w(t.helperText), 1)) : c("", !0),
|
|
932
945
|
n.value ? (s(), o("div", {
|
|
933
946
|
key: 3,
|
|
934
|
-
onClick:
|
|
947
|
+
onClick: E,
|
|
935
948
|
class: "fixed inset-0 z-40"
|
|
936
949
|
})) : c("", !0)
|
|
937
950
|
], 2));
|
|
938
951
|
}
|
|
939
|
-
}),
|
|
952
|
+
}), Nt = /* @__PURE__ */ R(gt, [["__scopeId", "data-v-f016a03c"]]), ht = /* @__PURE__ */ S({
|
|
940
953
|
__name: "Sidebar",
|
|
941
954
|
props: {
|
|
942
955
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -951,34 +964,34 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
951
964
|
padding: { default: "md" }
|
|
952
965
|
},
|
|
953
966
|
emits: ["update:modelValue", "close", "open"],
|
|
954
|
-
setup(t, { emit:
|
|
955
|
-
const e = t, u =
|
|
967
|
+
setup(t, { emit: b }) {
|
|
968
|
+
const e = t, u = b, n = p({
|
|
956
969
|
get: () => e.modelValue,
|
|
957
970
|
set: (_) => u("update:modelValue", _)
|
|
958
971
|
}), d = () => {
|
|
959
972
|
e.persistent || (n.value = !1, u("close"));
|
|
960
|
-
}, r =
|
|
961
|
-
const _ = "fixed top-0 h-full z-50 flex flex-col",
|
|
962
|
-
return [_,
|
|
963
|
-
}), i =
|
|
973
|
+
}, r = p(() => e.position === "left" ? "slide-right" : "slide-left"), f = p(() => {
|
|
974
|
+
const _ = "fixed top-0 h-full z-50 flex flex-col", M = e.position === "left" ? "left-0" : "right-0", O = 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)]" : "";
|
|
975
|
+
return [_, M, O].filter(Boolean).join(" ");
|
|
976
|
+
}), i = p(() => ({
|
|
964
977
|
width: e.width,
|
|
965
978
|
backgroundColor: e.backgroundColor,
|
|
966
979
|
top: e.overlayTop,
|
|
967
980
|
height: e.overlayTop !== "0" ? `calc(100vh - ${e.overlayTop})` : "100vh"
|
|
968
|
-
})),
|
|
981
|
+
})), y = {
|
|
969
982
|
none: "",
|
|
970
983
|
sm: "p-2",
|
|
971
984
|
md: "p-4",
|
|
972
985
|
lg: "p-6"
|
|
973
|
-
},
|
|
974
|
-
return (_,
|
|
986
|
+
}, x = p(() => `flex items-center justify-between border-b border-gray-200 ${y[e.padding]}`), L = p(() => `flex-1 overflow-y-auto ${y[e.padding]}`), D = p(() => `border-t border-gray-200 ${y[e.padding]}`);
|
|
987
|
+
return (_, M) => (s(), q(X, { to: "body" }, [
|
|
975
988
|
G(Q, { name: "fade" }, {
|
|
976
989
|
default: U(() => [
|
|
977
990
|
n.value && t.overlay ? (s(), o("div", {
|
|
978
991
|
key: 0,
|
|
979
992
|
onClick: d,
|
|
980
993
|
class: "fixed inset-0 bg-black/50 z-40",
|
|
981
|
-
style:
|
|
994
|
+
style: W({ top: t.overlayTop })
|
|
982
995
|
}, null, 4)) : c("", !0)
|
|
983
996
|
]),
|
|
984
997
|
_: 1
|
|
@@ -988,11 +1001,11 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
988
1001
|
n.value ? (s(), o("aside", {
|
|
989
1002
|
key: 0,
|
|
990
1003
|
class: v(f.value),
|
|
991
|
-
style:
|
|
1004
|
+
style: W(i.value)
|
|
992
1005
|
}, [
|
|
993
1006
|
_.$slots.header ? (s(), o("div", {
|
|
994
1007
|
key: 0,
|
|
995
|
-
class: v(
|
|
1008
|
+
class: v(x.value)
|
|
996
1009
|
}, [
|
|
997
1010
|
C(_.$slots, "header", {}, void 0, !0),
|
|
998
1011
|
t.closable ? (s(), o("button", {
|
|
@@ -1000,7 +1013,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
1000
1013
|
onClick: d,
|
|
1001
1014
|
class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
|
|
1002
1015
|
"aria-label": "Cerrar menú"
|
|
1003
|
-
}, [...
|
|
1016
|
+
}, [...M[0] || (M[0] = [
|
|
1004
1017
|
a("svg", {
|
|
1005
1018
|
class: "w-5 h-5",
|
|
1006
1019
|
fill: "none",
|
|
@@ -1017,7 +1030,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
1017
1030
|
])])) : c("", !0)
|
|
1018
1031
|
], 2)) : c("", !0),
|
|
1019
1032
|
a("div", {
|
|
1020
|
-
class: v(
|
|
1033
|
+
class: v(L.value)
|
|
1021
1034
|
}, [
|
|
1022
1035
|
C(_.$slots, "default", {}, void 0, !0)
|
|
1023
1036
|
], 2),
|
|
@@ -1033,115 +1046,115 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
1033
1046
|
}, 8, ["name"])
|
|
1034
1047
|
]));
|
|
1035
1048
|
}
|
|
1036
|
-
}),
|
|
1049
|
+
}), qt = /* @__PURE__ */ R(ht, [["__scopeId", "data-v-fffb0e44"]]), vt = { class: "w-full overflow-x-auto" }, bt = { class: "w-full border-collapse" }, yt = { class: "w-full" }, xt = { class: "bg-white border-b border-gray-100 w-full" }, mt = ["onClick"], kt = { class: "flex items-center gap-2" }, wt = {
|
|
1037
1050
|
key: 0,
|
|
1038
1051
|
class: "text-xs text-gray-400"
|
|
1039
|
-
},
|
|
1052
|
+
}, $t = { key: 0 }, Ct = { key: 1 }, Bt = { class: "w-full" }, _t = {
|
|
1040
1053
|
key: 0,
|
|
1041
1054
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
1042
|
-
},
|
|
1055
|
+
}, Tt = {
|
|
1043
1056
|
key: 1,
|
|
1044
1057
|
class: "w-full px-6 py-4 bg-white"
|
|
1045
|
-
}, zt = /* @__PURE__ */
|
|
1058
|
+
}, zt = /* @__PURE__ */ S({
|
|
1046
1059
|
__name: "Table",
|
|
1047
1060
|
props: {
|
|
1048
1061
|
columns: {},
|
|
1049
1062
|
data: {}
|
|
1050
1063
|
},
|
|
1051
1064
|
setup(t) {
|
|
1052
|
-
const
|
|
1065
|
+
const b = t, e = j(null), u = j("asc"), n = (r) => {
|
|
1053
1066
|
e.value === r ? u.value = u.value === "asc" ? "desc" : "asc" : (e.value = r, u.value = "asc");
|
|
1054
|
-
}, d =
|
|
1067
|
+
}, d = p(() => {
|
|
1055
1068
|
if (!e.value)
|
|
1056
|
-
return
|
|
1057
|
-
const r = [...
|
|
1069
|
+
return b.data;
|
|
1070
|
+
const r = [...b.data];
|
|
1058
1071
|
return r.sort((f, i) => {
|
|
1059
|
-
const
|
|
1060
|
-
return typeof
|
|
1072
|
+
const y = f[e.value], x = i[e.value];
|
|
1073
|
+
return typeof y == "string" && typeof x == "string" ? u.value === "asc" ? y.localeCompare(x) : x.localeCompare(y) : typeof y == "number" && typeof x == "number" ? u.value === "asc" ? y - x : x - y : 0;
|
|
1061
1074
|
}), r;
|
|
1062
1075
|
});
|
|
1063
1076
|
return (r, f) => (s(), o("div", vt, [
|
|
1064
|
-
a("table",
|
|
1065
|
-
a("thead",
|
|
1066
|
-
a("tr",
|
|
1067
|
-
(s(!0), o(
|
|
1077
|
+
a("table", bt, [
|
|
1078
|
+
a("thead", yt, [
|
|
1079
|
+
a("tr", xt, [
|
|
1080
|
+
(s(!0), o(F, null, A(t.columns, (i) => (s(), o("th", {
|
|
1068
1081
|
key: i.key,
|
|
1069
|
-
style:
|
|
1082
|
+
style: W(i.width ? { width: i.width } : {}),
|
|
1070
1083
|
class: v([
|
|
1071
1084
|
"px-8 py-4 text-left text-base font-semibold text-gray-900 border-0",
|
|
1072
1085
|
i.sortable ? "cursor-pointer hover:text-primary-700 select-none transition-colors" : ""
|
|
1073
1086
|
]),
|
|
1074
|
-
onClick: (
|
|
1087
|
+
onClick: (y) => i.sortable && n(i.key)
|
|
1075
1088
|
}, [
|
|
1076
|
-
a("div",
|
|
1077
|
-
a("span", null,
|
|
1078
|
-
i.sortable ? (s(), o("span",
|
|
1079
|
-
e.value !== i.key ? (s(), o("span",
|
|
1089
|
+
a("div", kt, [
|
|
1090
|
+
a("span", null, w(i.label), 1),
|
|
1091
|
+
i.sortable ? (s(), o("span", wt, [
|
|
1092
|
+
e.value !== i.key ? (s(), o("span", $t, "⇅")) : (s(), o("span", Ct, w(u.value === "asc" ? "↑" : "↓"), 1))
|
|
1080
1093
|
])) : c("", !0)
|
|
1081
1094
|
])
|
|
1082
|
-
], 14,
|
|
1095
|
+
], 14, mt))), 128))
|
|
1083
1096
|
])
|
|
1084
1097
|
]),
|
|
1085
|
-
a("tbody",
|
|
1086
|
-
(s(!0), o(
|
|
1087
|
-
key:
|
|
1098
|
+
a("tbody", Bt, [
|
|
1099
|
+
(s(!0), o(F, null, A(d.value, (i, y) => (s(), o("tr", {
|
|
1100
|
+
key: y,
|
|
1088
1101
|
class: "w-full hover:bg-gray-50 transition-colors"
|
|
1089
1102
|
}, [
|
|
1090
|
-
(s(!0), o(
|
|
1091
|
-
key: `${
|
|
1103
|
+
(s(!0), o(F, null, A(t.columns, (x) => (s(), o("td", {
|
|
1104
|
+
key: `${y}-${x.key}`,
|
|
1092
1105
|
class: "px-8 py-4 text-base text-gray-700 border-0"
|
|
1093
1106
|
}, [
|
|
1094
|
-
C(r.$slots, `cell-${
|
|
1095
|
-
value: i[
|
|
1107
|
+
C(r.$slots, `cell-${x.key}`, {
|
|
1108
|
+
value: i[x.key],
|
|
1096
1109
|
row: i
|
|
1097
1110
|
}, () => [
|
|
1098
|
-
|
|
1111
|
+
K(w(i[x.key]), 1)
|
|
1099
1112
|
], !0)
|
|
1100
1113
|
]))), 128))
|
|
1101
1114
|
]))), 128))
|
|
1102
1115
|
])
|
|
1103
1116
|
]),
|
|
1104
|
-
d.value.length === 0 ? (s(), o("div",
|
|
1117
|
+
d.value.length === 0 ? (s(), o("div", _t, [
|
|
1105
1118
|
C(r.$slots, "empty", {}, () => [
|
|
1106
|
-
f[0] || (f[0] =
|
|
1119
|
+
f[0] || (f[0] = K("No hay datos disponibles", -1))
|
|
1107
1120
|
], !0)
|
|
1108
1121
|
])) : c("", !0),
|
|
1109
|
-
r.$slots.footer ? (s(), o("div",
|
|
1122
|
+
r.$slots.footer ? (s(), o("div", Tt, [
|
|
1110
1123
|
C(r.$slots, "footer", {}, void 0, !0)
|
|
1111
1124
|
])) : c("", !0)
|
|
1112
1125
|
]));
|
|
1113
1126
|
}
|
|
1114
|
-
}),
|
|
1127
|
+
}), Ut = /* @__PURE__ */ R(zt, [["__scopeId", "data-v-6b3ff0a8"]]), Mt = { class: "w-full" }, Vt = {
|
|
1115
1128
|
class: "flex border-b border-gray-100",
|
|
1116
1129
|
role: "tablist"
|
|
1117
|
-
},
|
|
1130
|
+
}, jt = ["aria-selected", "onClick"], Lt = { role: "tabpanel" }, St = "relative px-6 py-3 text-base font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500", Dt = "text-primary-700 border-b-4 border-primary-700", Ot = "text-gray-600 border-b-4 border-transparent hover:text-gray-800", Gt = /* @__PURE__ */ S({
|
|
1118
1131
|
__name: "Tabs",
|
|
1119
1132
|
props: {
|
|
1120
1133
|
modelValue: {},
|
|
1121
1134
|
tabs: {}
|
|
1122
1135
|
},
|
|
1123
1136
|
emits: ["update:modelValue"],
|
|
1124
|
-
setup(t, { emit:
|
|
1125
|
-
const e = t, u =
|
|
1137
|
+
setup(t, { emit: b }) {
|
|
1138
|
+
const e = t, u = b, n = (i) => e.modelValue === i, d = (i) => {
|
|
1126
1139
|
n(i) || u("update:modelValue", i);
|
|
1127
|
-
}, r =
|
|
1140
|
+
}, r = p(() => e.modelValue), f = p(
|
|
1128
1141
|
() => e.tabs.find((i) => i.value === r.value)
|
|
1129
1142
|
);
|
|
1130
|
-
return (i,
|
|
1131
|
-
a("div",
|
|
1132
|
-
(s(!0), o(
|
|
1133
|
-
key:
|
|
1143
|
+
return (i, y) => (s(), o("div", Mt, [
|
|
1144
|
+
a("div", Vt, [
|
|
1145
|
+
(s(!0), o(F, null, A(t.tabs, (x) => (s(), o("button", {
|
|
1146
|
+
key: x.value,
|
|
1134
1147
|
type: "button",
|
|
1135
1148
|
class: v([
|
|
1136
|
-
|
|
1137
|
-
n(
|
|
1149
|
+
St,
|
|
1150
|
+
n(x.value) ? Dt : Ot
|
|
1138
1151
|
]),
|
|
1139
|
-
"aria-selected": n(
|
|
1152
|
+
"aria-selected": n(x.value),
|
|
1140
1153
|
role: "tab",
|
|
1141
|
-
onClick: (
|
|
1142
|
-
},
|
|
1154
|
+
onClick: (L) => d(x.value)
|
|
1155
|
+
}, w(x.label), 11, jt))), 128))
|
|
1143
1156
|
]),
|
|
1144
|
-
a("div",
|
|
1157
|
+
a("div", Lt, [
|
|
1145
1158
|
C(i.$slots, r.value, {
|
|
1146
1159
|
active: r.value,
|
|
1147
1160
|
tab: f.value
|
|
@@ -1149,7 +1162,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
1149
1162
|
])
|
|
1150
1163
|
]));
|
|
1151
1164
|
}
|
|
1152
|
-
}),
|
|
1165
|
+
}), It = "font-sans", Qt = /* @__PURE__ */ S({
|
|
1153
1166
|
__name: "Text",
|
|
1154
1167
|
props: {
|
|
1155
1168
|
variant: { default: "body1" },
|
|
@@ -1161,7 +1174,7 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
1161
1174
|
weight: {}
|
|
1162
1175
|
},
|
|
1163
1176
|
setup(t) {
|
|
1164
|
-
const
|
|
1177
|
+
const b = {
|
|
1165
1178
|
h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
|
|
1166
1179
|
h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
|
|
1167
1180
|
h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
|
|
@@ -1221,14 +1234,14 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
1221
1234
|
semibold: "font-semibold",
|
|
1222
1235
|
bold: "font-bold",
|
|
1223
1236
|
extrabold: "font-extrabold"
|
|
1224
|
-
}, r = t, f =
|
|
1225
|
-
return (D, _) => (s(), q(Z(
|
|
1237
|
+
}, r = t, f = p(() => r.variant), i = p(() => r.color), y = p(() => r.align), x = p(() => r.as || e[f.value] || "span"), L = p(() => r.weight ? d[r.weight] : "");
|
|
1238
|
+
return (D, _) => (s(), q(Z(x.value), {
|
|
1226
1239
|
class: v([
|
|
1227
|
-
|
|
1228
|
-
|
|
1240
|
+
It,
|
|
1241
|
+
b[f.value],
|
|
1229
1242
|
n[i.value],
|
|
1230
|
-
u[
|
|
1231
|
-
|
|
1243
|
+
u[y.value],
|
|
1244
|
+
L.value,
|
|
1232
1245
|
{
|
|
1233
1246
|
uppercase: t.uppercase || f.value === "overline",
|
|
1234
1247
|
truncate: t.truncate
|
|
@@ -1243,16 +1256,16 @@ const le = { class: "flex items-center gap-4" }, ae = {
|
|
|
1243
1256
|
}
|
|
1244
1257
|
});
|
|
1245
1258
|
export {
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1259
|
+
Ht as AppBar,
|
|
1260
|
+
Ft as Button,
|
|
1261
|
+
Pt as Card,
|
|
1262
|
+
Wt as Dialog,
|
|
1263
|
+
At as FileUpload,
|
|
1264
|
+
Kt as Loader,
|
|
1265
|
+
Rt as Menu,
|
|
1266
|
+
Nt as Select,
|
|
1267
|
+
qt as Sidebar,
|
|
1268
|
+
Ut as Table,
|
|
1269
|
+
Gt as Tabs,
|
|
1270
|
+
Qt as Text
|
|
1258
1271
|
};
|