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