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