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