@iaclinical/components 1.0.1 → 1.0.3
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/README.md +389 -389
- package/dist/iaclinical-components.cjs +1 -1
- package/dist/iaclinical-components.js +451 -353
- package/dist/style.css +1 -1
- package/package.json +54 -54
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, computed as g, createElementBlock as l, openBlock as s, normalizeClass as k, createElementVNode as o, createCommentVNode as f, renderSlot as w, toDisplayString as x, createBlock as P, Teleport as W, createVNode as H, Transition as K, withCtx as q, withModifiers as S, createTextVNode as F, ref as j, normalizeStyle as I, watch as X, withDirectives as Y, vModelText as Z, Fragment as L, renderList as O, nextTick as ee, resolveDynamicComponent as te } from "vue";
|
|
2
2
|
const se = { class: "flex items-center gap-4" }, le = {
|
|
3
3
|
key: 1,
|
|
4
4
|
class: "text-lg font-bold text-primary-50 font-poppins"
|
|
5
|
-
},
|
|
5
|
+
}, oe = { class: "flex-1 flex justify-center" }, ae = { class: "flex items-center gap-3" }, ne = /* @__PURE__ */ T({
|
|
6
6
|
__name: "AppBar",
|
|
7
7
|
props: {
|
|
8
8
|
title: { default: "" },
|
|
@@ -14,69 +14,69 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
14
14
|
},
|
|
15
15
|
emits: ["toggle-menu"],
|
|
16
16
|
setup(e, { emit: h }) {
|
|
17
|
-
const
|
|
17
|
+
const t = e, d = h, r = g(() => {
|
|
18
18
|
const i = "flex items-center justify-between px-6 z-50", n = {
|
|
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
|
+
}, u = {
|
|
23
23
|
sm: "h-12",
|
|
24
24
|
md: "h-14",
|
|
25
25
|
lg: "h-16"
|
|
26
|
-
},
|
|
26
|
+
}, a = t.sticky ? "sticky top-0" : "", b = t.shadow ? "shadow-md" : "";
|
|
27
27
|
return [
|
|
28
28
|
i,
|
|
29
|
-
n[
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
n[t.variant],
|
|
30
|
+
u[t.height],
|
|
31
|
+
a,
|
|
32
|
+
b
|
|
33
33
|
].join(" ");
|
|
34
34
|
});
|
|
35
|
-
return (i, n) => (
|
|
35
|
+
return (i, n) => (s(), l("header", {
|
|
36
36
|
class: k(r.value)
|
|
37
37
|
}, [
|
|
38
|
-
|
|
39
|
-
e.showMenuButton ? (
|
|
38
|
+
o("div", se, [
|
|
39
|
+
e.showMenuButton ? (s(), l("button", {
|
|
40
40
|
key: 0,
|
|
41
|
-
onClick: n[0] || (n[0] = (
|
|
41
|
+
onClick: n[0] || (n[0] = (u) => d("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
44
|
}, [...n[1] || (n[1] = [
|
|
45
|
-
|
|
45
|
+
o("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
|
+
o("path", {
|
|
53
53
|
"stroke-linecap": "round",
|
|
54
54
|
"stroke-linejoin": "round",
|
|
55
55
|
"stroke-width": "2",
|
|
56
56
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
57
57
|
})
|
|
58
58
|
], -1)
|
|
59
|
-
])])) :
|
|
60
|
-
e.title ? (
|
|
61
|
-
|
|
59
|
+
])])) : f("", !0),
|
|
60
|
+
e.title ? (s(), l("div", le, x(e.title), 1)) : f("", !0),
|
|
61
|
+
w(i.$slots, "left", {}, void 0, !0)
|
|
62
62
|
]),
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
o("div", oe, [
|
|
64
|
+
w(i.$slots, "center", {}, void 0, !0)
|
|
65
65
|
]),
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
o("div", ae, [
|
|
67
|
+
w(i.$slots, "right", {}, void 0, !0)
|
|
68
68
|
])
|
|
69
69
|
], 2));
|
|
70
70
|
}
|
|
71
|
-
}),
|
|
72
|
-
const
|
|
73
|
-
for (const [
|
|
74
|
-
|
|
75
|
-
return
|
|
76
|
-
},
|
|
71
|
+
}), A = (e, h) => {
|
|
72
|
+
const t = e.__vccOpts || e;
|
|
73
|
+
for (const [d, r] of h)
|
|
74
|
+
t[d] = r;
|
|
75
|
+
return t;
|
|
76
|
+
}, Ot = /* @__PURE__ */ A(ne, [["__scopeId", "data-v-8c81fc6d"]]), re = ["type", "disabled", "aria-label"], ie = {
|
|
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
|
+
}, Ft = /* @__PURE__ */ T({
|
|
80
80
|
__name: "Button",
|
|
81
81
|
props: {
|
|
82
82
|
variant: { default: "primary" },
|
|
@@ -89,15 +89,15 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
89
89
|
},
|
|
90
90
|
emits: ["click"],
|
|
91
91
|
setup(e, { emit: h }) {
|
|
92
|
-
const
|
|
93
|
-
const
|
|
92
|
+
const t = e, d = h, r = g(() => t.variant === "icon"), i = g(() => t.badge > 99 ? "99+" : t.badge.toString()), n = g(() => {
|
|
93
|
+
const a = "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", b = {
|
|
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
|
-
},
|
|
100
|
+
}, v = {
|
|
101
101
|
sm: r.value ? "p-1.5" : "h-8 px-3 text-sm",
|
|
102
102
|
md: r.value ? "p-2" : "h-10 px-4 text-base",
|
|
103
103
|
lg: r.value ? "p-3" : "h-12 px-6 text-lg"
|
|
@@ -109,28 +109,28 @@ 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 `${a} ${b[t.variant]} ${v[t.size]} ${V[t.radius]}`;
|
|
113
|
+
}), u = (a) => {
|
|
114
|
+
t.disabled || d("click", a);
|
|
115
115
|
};
|
|
116
|
-
return (
|
|
116
|
+
return (a, b) => (s(), l("button", {
|
|
117
117
|
class: k(n.value),
|
|
118
118
|
type: e.type,
|
|
119
119
|
disabled: e.disabled,
|
|
120
|
-
onClick:
|
|
120
|
+
onClick: u,
|
|
121
121
|
"aria-label": e.ariaLabel
|
|
122
122
|
}, [
|
|
123
|
-
|
|
124
|
-
r.value && e.badge && e.badge > 0 ? (
|
|
123
|
+
w(a.$slots, "default"),
|
|
124
|
+
r.value && e.badge && e.badge > 0 ? (s(), l("span", ie, x(i.value), 1)) : f("", !0)
|
|
125
125
|
], 10, re));
|
|
126
126
|
}
|
|
127
127
|
}), de = {
|
|
128
128
|
key: 0,
|
|
129
129
|
class: "border-b border-gray-100 px-6 py-4"
|
|
130
|
-
},
|
|
130
|
+
}, ue = { class: "px-6 py-4" }, ce = {
|
|
131
131
|
key: 1,
|
|
132
132
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
133
|
-
},
|
|
133
|
+
}, At = /* @__PURE__ */ T({
|
|
134
134
|
__name: "Card",
|
|
135
135
|
props: {
|
|
136
136
|
shadow: { default: "md" },
|
|
@@ -138,43 +138,43 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
138
138
|
bordered: { type: Boolean, default: !1 }
|
|
139
139
|
},
|
|
140
140
|
setup(e) {
|
|
141
|
-
const h = e,
|
|
141
|
+
const h = e, t = {
|
|
142
142
|
none: "",
|
|
143
143
|
sm: "shadow-sm",
|
|
144
144
|
md: "shadow",
|
|
145
145
|
lg: "shadow-lg",
|
|
146
146
|
xl: "shadow-xl"
|
|
147
|
-
},
|
|
147
|
+
}, d = {
|
|
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
|
-
}, r =
|
|
154
|
+
}, r = g(() => [
|
|
155
155
|
"w-full bg-white",
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
t[h.shadow],
|
|
157
|
+
d[h.rounded],
|
|
158
158
|
h.bordered ? "border border-gray-200" : ""
|
|
159
159
|
]);
|
|
160
|
-
return (i, n) => (
|
|
160
|
+
return (i, n) => (s(), l("div", {
|
|
161
161
|
class: k(r.value)
|
|
162
162
|
}, [
|
|
163
|
-
i.$slots.header ? (
|
|
164
|
-
|
|
165
|
-
])) :
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
i.$slots.header ? (s(), l("div", de, [
|
|
164
|
+
w(i.$slots, "header")
|
|
165
|
+
])) : f("", !0),
|
|
166
|
+
o("div", ue, [
|
|
167
|
+
w(i.$slots, "default")
|
|
168
168
|
]),
|
|
169
|
-
i.$slots.footer ? (
|
|
170
|
-
|
|
171
|
-
])) :
|
|
169
|
+
i.$slots.footer ? (s(), l("div", ce, [
|
|
170
|
+
w(i.$slots, "footer")
|
|
171
|
+
])) : f("", !0)
|
|
172
172
|
], 2));
|
|
173
173
|
}
|
|
174
|
-
}), fe = { class: "flex items-center justify-between border-b border-gray-100 px-8 py-6" }, pe = { class: "text-xl font-semibold text-gray-900" },
|
|
174
|
+
}), fe = { class: "flex items-center justify-between border-b border-gray-100 px-8 py-6" }, pe = { class: "text-xl font-semibold text-gray-900" }, ge = { class: "px-8 py-6" }, he = {
|
|
175
175
|
key: 0,
|
|
176
176
|
class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
|
|
177
|
-
},
|
|
177
|
+
}, be = /* @__PURE__ */ T({
|
|
178
178
|
__name: "Dialog",
|
|
179
179
|
props: {
|
|
180
180
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -183,46 +183,46 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
183
183
|
},
|
|
184
184
|
emits: ["update:modelValue"],
|
|
185
185
|
setup(e, { emit: h }) {
|
|
186
|
-
const
|
|
187
|
-
get: () =>
|
|
188
|
-
set: (
|
|
186
|
+
const t = e, d = h, r = g({
|
|
187
|
+
get: () => t.modelValue,
|
|
188
|
+
set: (u) => d("update:modelValue", u)
|
|
189
189
|
}), i = () => {
|
|
190
190
|
r.value = !1;
|
|
191
191
|
}, n = () => {
|
|
192
|
-
|
|
192
|
+
t.closeOnBackdrop && i();
|
|
193
193
|
};
|
|
194
|
-
return (
|
|
195
|
-
|
|
196
|
-
default:
|
|
197
|
-
r.value ? (
|
|
194
|
+
return (u, a) => (s(), P(W, { to: "body" }, [
|
|
195
|
+
H(K, { name: "dialog" }, {
|
|
196
|
+
default: q(() => [
|
|
197
|
+
r.value ? (s(), l("div", {
|
|
198
198
|
key: 0,
|
|
199
199
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
|
|
200
200
|
onClick: n
|
|
201
201
|
}, [
|
|
202
|
-
|
|
202
|
+
o("div", {
|
|
203
203
|
class: "relative w-full max-w-2xl rounded-lg bg-white shadow-xl",
|
|
204
|
-
onClick:
|
|
204
|
+
onClick: a[0] || (a[0] = S(() => {
|
|
205
205
|
}, ["stop"]))
|
|
206
206
|
}, [
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
207
|
+
o("div", fe, [
|
|
208
|
+
o("h2", pe, [
|
|
209
|
+
w(u.$slots, "title", {}, () => [
|
|
210
|
+
F(x(e.title), 1)
|
|
211
211
|
], !0)
|
|
212
212
|
]),
|
|
213
|
-
|
|
213
|
+
o("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
217
|
onClick: i
|
|
218
|
-
}, [...
|
|
219
|
-
|
|
218
|
+
}, [...a[1] || (a[1] = [
|
|
219
|
+
o("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
|
+
o("path", {
|
|
226
226
|
"stroke-linecap": "round",
|
|
227
227
|
"stroke-linejoin": "round",
|
|
228
228
|
"stroke-width": "2",
|
|
@@ -231,32 +231,32 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
231
231
|
], -1)
|
|
232
232
|
])])
|
|
233
233
|
]),
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
o("div", ge, [
|
|
235
|
+
w(u.$slots, "default", {}, void 0, !0)
|
|
236
236
|
]),
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
])) :
|
|
237
|
+
u.$slots.footer ? (s(), l("div", he, [
|
|
238
|
+
w(u.$slots, "footer", {}, void 0, !0)
|
|
239
|
+
])) : f("", !0)
|
|
240
240
|
])
|
|
241
|
-
])) :
|
|
241
|
+
])) : f("", !0)
|
|
242
242
|
]),
|
|
243
243
|
_: 3
|
|
244
244
|
})
|
|
245
245
|
]));
|
|
246
246
|
}
|
|
247
|
-
}),
|
|
247
|
+
}), Nt = /* @__PURE__ */ A(be, [["__scopeId", "data-v-091e8739"]]), ve = ["accept", "multiple", "disabled"], xe = { class: "flex flex-col items-center justify-center gap-4 text-center" }, ye = { class: "w-32 h-32 flex items-center justify-center" }, me = ["src", "alt"], ke = {
|
|
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
|
-
}, we = { class: "text-center" },
|
|
253
|
+
}, we = { class: "text-center" }, Ce = { class: "text-base font-medium text-gray-700" }, $e = { class: "text-primary-700" }, _e = { class: "flex items-center gap-3 flex-1 min-w-0" }, Be = { class: "flex-1 min-w-0" }, Te = { 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
|
}, ze = {
|
|
257
257
|
key: 2,
|
|
258
258
|
class: "text-sm text-danger-500 mt-2"
|
|
259
|
-
},
|
|
259
|
+
}, qt = /* @__PURE__ */ T({
|
|
260
260
|
__name: "FileUpload",
|
|
261
261
|
props: {
|
|
262
262
|
modelValue: { default: null },
|
|
@@ -272,48 +272,48 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
272
272
|
},
|
|
273
273
|
emits: ["update:modelValue", "change", "error"],
|
|
274
274
|
setup(e, { emit: h }) {
|
|
275
|
-
const
|
|
276
|
-
var
|
|
277
|
-
(
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
},
|
|
281
|
-
|
|
275
|
+
const t = e, d = h, r = j(null), i = j(!1), n = j(t.modelValue), u = j(""), a = () => {
|
|
276
|
+
var C;
|
|
277
|
+
(C = r.value) == null || C.click();
|
|
278
|
+
}, b = () => {
|
|
279
|
+
t.disabled || a();
|
|
280
|
+
}, v = (C) => {
|
|
281
|
+
t.disabled || (i.value = !0);
|
|
282
282
|
}, V = () => {
|
|
283
283
|
i.value = !1;
|
|
284
|
-
},
|
|
285
|
-
if (
|
|
286
|
-
const
|
|
287
|
-
return
|
|
284
|
+
}, z = (C) => {
|
|
285
|
+
if (u.value = "", t.maxSize && C.size > t.maxSize) {
|
|
286
|
+
const m = (t.maxSize / 1048576).toFixed(2);
|
|
287
|
+
return u.value = `El archivo excede el tamaño máximo de ${m}MB`, d("error", u.value), !1;
|
|
288
288
|
}
|
|
289
289
|
return !0;
|
|
290
|
-
},
|
|
290
|
+
}, $ = (C) => {
|
|
291
|
+
var B;
|
|
292
|
+
const _ = (B = C.target.files) == null ? void 0 : B[0];
|
|
293
|
+
_ && z(_) && (n.value = _, d("update:modelValue", _), d("change", _));
|
|
294
|
+
}, M = (C) => {
|
|
291
295
|
var _;
|
|
292
|
-
const C = (_ = w.target.files) == null ? void 0 : _[0];
|
|
293
|
-
C && M(C) && (n.value = C, u("update:modelValue", C), u("change", C));
|
|
294
|
-
}, A = (w) => {
|
|
295
|
-
var C;
|
|
296
296
|
i.value = !1;
|
|
297
|
-
const
|
|
298
|
-
|
|
297
|
+
const m = (_ = C.dataTransfer) == null ? void 0 : _.files[0];
|
|
298
|
+
m && z(m) && (n.value = m, d("update:modelValue", m), d("change", m));
|
|
299
299
|
}, N = () => {
|
|
300
|
-
n.value = null,
|
|
301
|
-
},
|
|
302
|
-
if (
|
|
303
|
-
const
|
|
304
|
-
return Math.round(
|
|
300
|
+
n.value = null, u.value = "", r.value && (r.value.value = ""), d("update:modelValue", null), d("change", null);
|
|
301
|
+
}, E = (C) => {
|
|
302
|
+
if (C === 0) return "0 Bytes";
|
|
303
|
+
const m = 1024, _ = ["Bytes", "KB", "MB", "GB"], B = Math.floor(Math.log(C) / Math.log(m));
|
|
304
|
+
return Math.round(C / Math.pow(m, B) * 100) / 100 + " " + _[B];
|
|
305
305
|
};
|
|
306
|
-
return (
|
|
306
|
+
return (C, m) => (s(), l("div", {
|
|
307
307
|
class: k(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
308
308
|
i.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
309
309
|
e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
310
310
|
]]),
|
|
311
|
-
onClick:
|
|
312
|
-
onDragover:
|
|
313
|
-
onDragleave:
|
|
314
|
-
onDrop:
|
|
311
|
+
onClick: b,
|
|
312
|
+
onDragover: S(v, ["prevent"]),
|
|
313
|
+
onDragleave: S(V, ["prevent"]),
|
|
314
|
+
onDrop: S(M, ["prevent"])
|
|
315
315
|
}, [
|
|
316
|
-
|
|
316
|
+
o("input", {
|
|
317
317
|
ref_key: "fileInput",
|
|
318
318
|
ref: r,
|
|
319
319
|
type: "file",
|
|
@@ -321,17 +321,17 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
321
321
|
multiple: e.multiple,
|
|
322
322
|
disabled: e.disabled,
|
|
323
323
|
class: "hidden",
|
|
324
|
-
onChange:
|
|
325
|
-
}, null, 40,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
e.illustration ? (
|
|
324
|
+
onChange: $
|
|
325
|
+
}, null, 40, ve),
|
|
326
|
+
o("div", xe, [
|
|
327
|
+
o("div", ye, [
|
|
328
|
+
e.illustration ? (s(), l("img", {
|
|
329
329
|
key: 0,
|
|
330
330
|
src: e.illustration,
|
|
331
331
|
alt: e.illustrationAlt,
|
|
332
332
|
class: "max-w-full max-h-full object-contain"
|
|
333
|
-
}, null, 8, me)) : (
|
|
334
|
-
|
|
333
|
+
}, null, 8, me)) : (s(), l("svg", ke, [...m[1] || (m[1] = [
|
|
334
|
+
o("path", {
|
|
335
335
|
"stroke-linecap": "round",
|
|
336
336
|
"stroke-linejoin": "round",
|
|
337
337
|
"stroke-width": "1.5",
|
|
@@ -339,64 +339,64 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
339
339
|
}, null, -1)
|
|
340
340
|
])]))
|
|
341
341
|
]),
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
342
|
+
o("div", we, [
|
|
343
|
+
o("p", Ce, [
|
|
344
|
+
F(x(e.mainText) + " ", 1),
|
|
345
|
+
o("span", $e, x(e.linkText), 1)
|
|
346
346
|
])
|
|
347
347
|
]),
|
|
348
|
-
n.value ? (
|
|
348
|
+
n.value ? (s(), l("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: m[0] || (m[0] = S(() => {
|
|
352
352
|
}, ["stop"]))
|
|
353
353
|
}, [
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
o("div", _e, [
|
|
355
|
+
m[2] || (m[2] = o("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
|
+
o("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
|
+
o("div", Be, [
|
|
369
|
+
o("p", Te, x(n.value.name), 1),
|
|
370
|
+
o("p", Ve, x(E(n.value.size)), 1)
|
|
371
371
|
])
|
|
372
372
|
]),
|
|
373
|
-
e.disabled ?
|
|
373
|
+
e.disabled ? f("", !0) : (s(), l("button", {
|
|
374
374
|
key: 0,
|
|
375
|
-
onClick:
|
|
375
|
+
onClick: S(N, ["stop"]),
|
|
376
376
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
377
|
-
}, [...
|
|
378
|
-
|
|
377
|
+
}, [...m[3] || (m[3] = [
|
|
378
|
+
o("svg", {
|
|
379
379
|
class: "w-5 h-5",
|
|
380
380
|
fill: "currentColor",
|
|
381
381
|
viewBox: "0 0 20 20"
|
|
382
382
|
}, [
|
|
383
|
-
|
|
383
|
+
o("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"
|
|
387
387
|
})
|
|
388
388
|
], -1)
|
|
389
389
|
])]))
|
|
390
|
-
])) :
|
|
391
|
-
e.helperText ? (
|
|
392
|
-
|
|
390
|
+
])) : f("", !0),
|
|
391
|
+
e.helperText ? (s(), l("p", je, x(e.helperText), 1)) : f("", !0),
|
|
392
|
+
u.value ? (s(), l("p", ze, x(u.value), 1)) : f("", !0)
|
|
393
393
|
])
|
|
394
394
|
], 34));
|
|
395
395
|
}
|
|
396
|
-
}), Me = ["stroke-width"],
|
|
396
|
+
}), Me = ["stroke-width"], Se = {
|
|
397
397
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
398
398
|
style: { "background-color": "#f7f7f7" }
|
|
399
|
-
}, Le = /* @__PURE__ */
|
|
399
|
+
}, Le = /* @__PURE__ */ T({
|
|
400
400
|
__name: "Loader",
|
|
401
401
|
props: {
|
|
402
402
|
type: { default: "circular" },
|
|
@@ -407,31 +407,31 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
407
407
|
progress: { default: void 0 }
|
|
408
408
|
},
|
|
409
409
|
setup(e) {
|
|
410
|
-
const h = e,
|
|
410
|
+
const h = e, t = {
|
|
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
|
+
}, d = {
|
|
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
|
-
}, r =
|
|
425
|
-
return (n,
|
|
424
|
+
}, r = g(() => [t[h.color]]), i = g(() => [d[h.color]]);
|
|
425
|
+
return (n, u) => e.type === "circular" ? (s(), l("div", {
|
|
426
426
|
key: 0,
|
|
427
427
|
class: k(r.value)
|
|
428
428
|
}, [
|
|
429
|
-
(
|
|
429
|
+
(s(), l("svg", {
|
|
430
430
|
class: "animate-spin",
|
|
431
|
-
style:
|
|
431
|
+
style: I({ width: e.size, height: e.size }),
|
|
432
432
|
viewBox: "0 0 24 24"
|
|
433
433
|
}, [
|
|
434
|
-
|
|
434
|
+
o("circle", {
|
|
435
435
|
class: "opacity-25",
|
|
436
436
|
cx: "12",
|
|
437
437
|
cy: "12",
|
|
@@ -440,26 +440,26 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
440
440
|
"stroke-width": e.strokeWidth,
|
|
441
441
|
fill: "none"
|
|
442
442
|
}, null, 8, Me),
|
|
443
|
-
|
|
443
|
+
u[0] || (u[0] = o("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)) : e.type === "linear" ? (
|
|
449
|
+
], 2)) : e.type === "linear" ? (s(), l("div", {
|
|
450
450
|
key: 1,
|
|
451
451
|
class: "w-full",
|
|
452
|
-
style:
|
|
452
|
+
style: I({ height: e.height })
|
|
453
453
|
}, [
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
o("div", Se, [
|
|
455
|
+
o("div", {
|
|
456
456
|
class: k([i.value, "h-full rounded-lg animate-linear-loader"]),
|
|
457
|
-
style:
|
|
457
|
+
style: I({ width: e.progress ? `${e.progress}%` : void 0 })
|
|
458
458
|
}, null, 6)
|
|
459
459
|
])
|
|
460
|
-
], 4)) :
|
|
460
|
+
], 4)) : f("", !0);
|
|
461
461
|
}
|
|
462
|
-
}),
|
|
462
|
+
}), Et = /* @__PURE__ */ A(Le, [["__scopeId", "data-v-8df4ec38"]]), De = ["for"], Ie = {
|
|
463
463
|
key: 0,
|
|
464
464
|
class: "text-danger-600"
|
|
465
465
|
}, Oe = { class: "relative" }, Fe = ["id", "disabled", "aria-expanded"], Ae = {
|
|
@@ -502,10 +502,10 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
502
502
|
stroke: "currentColor",
|
|
503
503
|
viewBox: "0 0 24 24",
|
|
504
504
|
xmlns: "http://www.w3.org/2000/svg"
|
|
505
|
-
},
|
|
505
|
+
}, ot = {
|
|
506
506
|
key: 1,
|
|
507
507
|
class: "flex items-center justify-between w-full"
|
|
508
|
-
},
|
|
508
|
+
}, at = { class: "truncate" }, nt = {
|
|
509
509
|
key: 0,
|
|
510
510
|
class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
|
|
511
511
|
fill: "none",
|
|
@@ -515,13 +515,13 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
515
515
|
}, rt = {
|
|
516
516
|
key: 0,
|
|
517
517
|
class: "border-t border-secondary-200 my-1"
|
|
518
|
-
}, it = ["onClick"], dt = ["innerHTML"],
|
|
518
|
+
}, it = ["onClick"], dt = ["innerHTML"], ut = {
|
|
519
519
|
key: 1,
|
|
520
520
|
class: "mt-1 text-sm text-danger-600"
|
|
521
|
-
},
|
|
521
|
+
}, ct = {
|
|
522
522
|
key: 2,
|
|
523
523
|
class: "mt-1 text-sm text-secondary-600"
|
|
524
|
-
}, ft = /* @__PURE__ */
|
|
524
|
+
}, ft = /* @__PURE__ */ T({
|
|
525
525
|
__name: "Select",
|
|
526
526
|
props: {
|
|
527
527
|
modelValue: { default: null },
|
|
@@ -544,108 +544,108 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
544
544
|
},
|
|
545
545
|
emits: ["update:modelValue", "change", "action"],
|
|
546
546
|
setup(e, { emit: h }) {
|
|
547
|
-
const
|
|
547
|
+
const t = e, d = h, r = j(!1), i = j(""), n = j(null), u = g(
|
|
548
548
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
549
|
-
),
|
|
550
|
-
if (!
|
|
551
|
-
return
|
|
549
|
+
), a = g(() => t.options.find((c) => c.value === t.modelValue) || null), b = g(() => {
|
|
550
|
+
if (!t.searchable || !i.value)
|
|
551
|
+
return t.options;
|
|
552
552
|
const c = i.value.toLowerCase();
|
|
553
|
-
return
|
|
554
|
-
var
|
|
555
|
-
return
|
|
553
|
+
return t.options.filter((y) => {
|
|
554
|
+
var p, D;
|
|
555
|
+
return y.label.toLowerCase().includes(c) || ((p = y.subtitle) == null ? void 0 : p.toLowerCase().includes(c)) || ((D = y.description) == null ? void 0 : D.toLowerCase().includes(c));
|
|
556
556
|
});
|
|
557
|
-
}),
|
|
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",
|
|
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 = {
|
|
559
559
|
sm: "px-3 py-1.5 text-sm",
|
|
560
560
|
md: "px-4 py-2 text-base",
|
|
561
561
|
lg: "px-5 py-3 text-lg"
|
|
562
|
-
},
|
|
562
|
+
}, p = {
|
|
563
563
|
default: "bg-white border-secondary-300 hover:border-secondary-400",
|
|
564
564
|
outline: "bg-transparent border-secondary-300 hover:border-primary-500",
|
|
565
565
|
filled: "bg-secondary-100 border-transparent hover:bg-secondary-200"
|
|
566
|
-
}, D =
|
|
566
|
+
}, D = t.mode === "menu" ? "bg-primary-700 border-primary-700 hover:bg-primary-600" : "", R = t.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
567
567
|
return [
|
|
568
568
|
c,
|
|
569
|
-
|
|
570
|
-
D ||
|
|
571
|
-
|
|
569
|
+
y[t.size],
|
|
570
|
+
D || p[t.variant],
|
|
571
|
+
R
|
|
572
572
|
].join(" ");
|
|
573
|
-
}),
|
|
574
|
-
const
|
|
575
|
-
return [
|
|
576
|
-
},
|
|
577
|
-
const
|
|
578
|
-
return c.variant === "danger" ? `${
|
|
579
|
-
},
|
|
580
|
-
|
|
573
|
+
}), z = g(() => t.mode === "menu" ? "text-white" : "text-secondary-900"), $ = g(() => t.mode === "menu" ? "text-primary-100" : "text-secondary-600"), M = g(() => t.mode === "menu" ? "text-white" : "text-secondary-600"), N = g(() => `absolute ${t.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`), E = (c) => {
|
|
574
|
+
const y = "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", p = m(c) ? "bg-primary-50" : "";
|
|
575
|
+
return [y, p].join(" ");
|
|
576
|
+
}, C = (c) => {
|
|
577
|
+
const y = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
|
|
578
|
+
return c.variant === "danger" ? `${y} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${y} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
|
|
579
|
+
}, m = (c) => c.value === t.modelValue, _ = () => {
|
|
580
|
+
t.disabled || (r.value = !r.value, r.value && t.searchable && ee(() => {
|
|
581
581
|
var c;
|
|
582
582
|
(c = n.value) == null || c.focus();
|
|
583
583
|
}));
|
|
584
|
-
},
|
|
584
|
+
}, B = () => {
|
|
585
585
|
r.value = !1, i.value = "";
|
|
586
|
-
}, K = (c) => {
|
|
587
|
-
c.disabled || (u("update:modelValue", c.value), u("change", c), _());
|
|
588
|
-
}, P = (c) => {
|
|
589
|
-
c.action && c.action(), u("action", c), _();
|
|
590
|
-
}, W = (c) => {
|
|
591
|
-
const g = c.relatedTarget;
|
|
592
|
-
g && g.closest(".select-wrapper") || setTimeout(() => {
|
|
593
|
-
_();
|
|
594
|
-
}, 200);
|
|
595
586
|
}, U = (c) => {
|
|
596
|
-
c.
|
|
587
|
+
c.disabled || (d("update:modelValue", c.value), d("change", c), B());
|
|
588
|
+
}, G = (c) => {
|
|
589
|
+
c.action && c.action(), d("action", c), B();
|
|
590
|
+
}, Q = (c) => {
|
|
591
|
+
const y = c.relatedTarget;
|
|
592
|
+
y && y.closest(".select-wrapper") || setTimeout(() => {
|
|
593
|
+
B();
|
|
594
|
+
}, 200);
|
|
595
|
+
}, J = (c) => {
|
|
596
|
+
c.key === "Escape" ? B() : (c.key === "Enter" || c.key === " ") && (c.preventDefault(), _());
|
|
597
597
|
};
|
|
598
598
|
return X(r, (c) => {
|
|
599
599
|
c && (i.value = "");
|
|
600
|
-
}), (c,
|
|
600
|
+
}), (c, y) => (s(), l("div", {
|
|
601
601
|
class: k(["select-wrapper", { "w-full": e.fullWidth }])
|
|
602
602
|
}, [
|
|
603
|
-
e.label ? (
|
|
603
|
+
e.label ? (s(), l("label", {
|
|
604
604
|
key: 0,
|
|
605
|
-
for:
|
|
606
|
-
class: k(
|
|
605
|
+
for: u.value,
|
|
606
|
+
class: k(v.value)
|
|
607
607
|
}, [
|
|
608
|
-
|
|
609
|
-
e.required ? (
|
|
610
|
-
], 10,
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
id:
|
|
608
|
+
F(x(e.label) + " ", 1),
|
|
609
|
+
e.required ? (s(), l("span", Ie, "*")) : f("", !0)
|
|
610
|
+
], 10, De)) : f("", !0),
|
|
611
|
+
o("div", Oe, [
|
|
612
|
+
o("button", {
|
|
613
|
+
id: u.value,
|
|
614
614
|
type: "button",
|
|
615
615
|
class: k(V.value),
|
|
616
616
|
disabled: e.disabled,
|
|
617
617
|
"aria-expanded": r.value,
|
|
618
618
|
"aria-haspopup": !0,
|
|
619
|
-
onClick:
|
|
620
|
-
onBlur:
|
|
621
|
-
onKeydown:
|
|
619
|
+
onClick: _,
|
|
620
|
+
onBlur: Q,
|
|
621
|
+
onKeydown: J
|
|
622
622
|
}, [
|
|
623
|
-
e.mode === "menu" &&
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
src:
|
|
627
|
-
alt:
|
|
623
|
+
e.mode === "menu" && a.value ? (s(), l("div", Ae, [
|
|
624
|
+
a.value.avatar ? (s(), l("div", Ne, [
|
|
625
|
+
o("img", {
|
|
626
|
+
src: a.value.avatar,
|
|
627
|
+
alt: a.value.label,
|
|
628
628
|
class: "w-full h-full object-cover"
|
|
629
629
|
}, null, 8, qe)
|
|
630
|
-
])) :
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
class: k(["text-sm font-semibold truncate w-full",
|
|
634
|
-
}, x(
|
|
635
|
-
|
|
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
636
|
key: 0,
|
|
637
|
-
class: k(["text-xs truncate w-full",
|
|
638
|
-
}, x(
|
|
637
|
+
class: k(["text-xs truncate w-full", $.value])
|
|
638
|
+
}, x(a.value.subtitle), 3)) : f("", !0)
|
|
639
639
|
])
|
|
640
|
-
])) : (
|
|
641
|
-
(
|
|
642
|
-
class: k(["w-5 h-5 flex-shrink-0 transition-transform", [r.value ? "rotate-180" : "",
|
|
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]]),
|
|
643
643
|
fill: "none",
|
|
644
644
|
stroke: "currentColor",
|
|
645
645
|
viewBox: "0 0 24 24",
|
|
646
646
|
xmlns: "http://www.w3.org/2000/svg"
|
|
647
|
-
}, [...
|
|
648
|
-
|
|
647
|
+
}, [...y[3] || (y[3] = [
|
|
648
|
+
o("path", {
|
|
649
649
|
"stroke-linecap": "round",
|
|
650
650
|
"stroke-linejoin": "round",
|
|
651
651
|
"stroke-width": "2",
|
|
@@ -653,179 +653,276 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
653
653
|
}, null, -1)
|
|
654
654
|
])], 2))
|
|
655
655
|
], 42, Fe),
|
|
656
|
-
r.value ? (
|
|
656
|
+
r.value ? (s(), l("div", {
|
|
657
657
|
key: 0,
|
|
658
658
|
class: k(N.value),
|
|
659
|
-
onClick:
|
|
659
|
+
onClick: y[2] || (y[2] = S(() => {
|
|
660
660
|
}, ["stop"]))
|
|
661
661
|
}, [
|
|
662
|
-
e.searchable ? (
|
|
663
|
-
Y(
|
|
662
|
+
e.searchable ? (s(), l("div", Pe, [
|
|
663
|
+
Y(o("input", {
|
|
664
664
|
ref_key: "searchInput",
|
|
665
665
|
ref: n,
|
|
666
|
-
"onUpdate:modelValue":
|
|
666
|
+
"onUpdate:modelValue": y[0] || (y[0] = (p) => i.value = p),
|
|
667
667
|
type: "text",
|
|
668
668
|
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
669
|
placeholder: e.searchPlaceholder,
|
|
670
|
-
onKeydown:
|
|
670
|
+
onKeydown: y[1] || (y[1] = S(() => {
|
|
671
671
|
}, ["stop"]))
|
|
672
672
|
}, null, 40, We), [
|
|
673
673
|
[Z, i.value]
|
|
674
674
|
])
|
|
675
|
-
])) :
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
(
|
|
679
|
-
key:
|
|
675
|
+
])) : f("", !0),
|
|
676
|
+
o("div", Ue, [
|
|
677
|
+
b.value.length === 0 ? (s(), l("div", Ge, x(e.emptyText), 1)) : (s(), l(L, { key: 1 }, [
|
|
678
|
+
(s(!0), l(L, null, O(b.value, (p) => (s(), l("button", {
|
|
679
|
+
key: p.value,
|
|
680
680
|
type: "button",
|
|
681
|
-
class: k(
|
|
682
|
-
onClick: (D) =>
|
|
681
|
+
class: k(E(p)),
|
|
682
|
+
onClick: (D) => U(p)
|
|
683
683
|
}, [
|
|
684
|
-
e.mode === "menu" ? (
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
src:
|
|
688
|
-
alt:
|
|
684
|
+
e.mode === "menu" ? (s(), l("div", Je, [
|
|
685
|
+
p.avatar ? (s(), l("div", Re, [
|
|
686
|
+
o("img", {
|
|
687
|
+
src: p.avatar,
|
|
688
|
+
alt: p.label,
|
|
689
689
|
class: "w-full h-full object-cover"
|
|
690
690
|
}, null, 8, Xe)
|
|
691
|
-
])) :
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
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
696
|
]),
|
|
697
|
-
|
|
698
|
-
|
|
697
|
+
m(p) ? (s(), l("svg", lt, [...y[4] || (y[4] = [
|
|
698
|
+
o("path", {
|
|
699
699
|
"stroke-linecap": "round",
|
|
700
700
|
"stroke-linejoin": "round",
|
|
701
701
|
"stroke-width": "2",
|
|
702
702
|
d: "M5 13l4 4L19 7"
|
|
703
703
|
}, null, -1)
|
|
704
|
-
])])) :
|
|
705
|
-
])) : (
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
704
|
+
])])) : f("", !0)
|
|
705
|
+
])) : (s(), l("div", ot, [
|
|
706
|
+
o("span", at, x(p.label), 1),
|
|
707
|
+
m(p) ? (s(), l("svg", nt, [...y[5] || (y[5] = [
|
|
708
|
+
o("path", {
|
|
709
709
|
"stroke-linecap": "round",
|
|
710
710
|
"stroke-linejoin": "round",
|
|
711
711
|
"stroke-width": "2",
|
|
712
712
|
d: "M5 13l4 4L19 7"
|
|
713
713
|
}, null, -1)
|
|
714
|
-
])])) :
|
|
714
|
+
])])) : f("", !0)
|
|
715
715
|
]))
|
|
716
716
|
], 10, Qe))), 128)),
|
|
717
|
-
e.actionItems.length > 0 ? (
|
|
718
|
-
(
|
|
719
|
-
key:
|
|
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,
|
|
720
720
|
type: "button",
|
|
721
|
-
class: k(
|
|
722
|
-
onClick: (D) =>
|
|
721
|
+
class: k(C(p)),
|
|
722
|
+
onClick: (D) => G(p)
|
|
723
723
|
}, [
|
|
724
|
-
|
|
724
|
+
p.icon ? (s(), l("svg", {
|
|
725
725
|
key: 0,
|
|
726
726
|
class: "w-4 h-4 flex-shrink-0",
|
|
727
727
|
fill: "none",
|
|
728
728
|
stroke: "currentColor",
|
|
729
729
|
viewBox: "0 0 24 24",
|
|
730
730
|
xmlns: "http://www.w3.org/2000/svg",
|
|
731
|
-
innerHTML:
|
|
732
|
-
}, null, 8, dt)) :
|
|
733
|
-
|
|
731
|
+
innerHTML: p.icon
|
|
732
|
+
}, null, 8, dt)) : f("", !0),
|
|
733
|
+
F(" " + x(p.label), 1)
|
|
734
734
|
], 10, it))), 128))
|
|
735
735
|
], 64))
|
|
736
736
|
])
|
|
737
|
-
], 2)) :
|
|
737
|
+
], 2)) : f("", !0)
|
|
738
738
|
]),
|
|
739
|
-
e.error ? (
|
|
740
|
-
r.value ? (
|
|
739
|
+
e.error ? (s(), l("p", ut, x(e.error), 1)) : e.helperText ? (s(), l("p", ct, x(e.helperText), 1)) : f("", !0),
|
|
740
|
+
r.value ? (s(), l("div", {
|
|
741
741
|
key: 3,
|
|
742
|
-
onClick:
|
|
742
|
+
onClick: B,
|
|
743
743
|
class: "fixed inset-0 z-40"
|
|
744
|
-
})) :
|
|
744
|
+
})) : f("", !0)
|
|
745
745
|
], 2));
|
|
746
746
|
}
|
|
747
|
-
}),
|
|
747
|
+
}), Ht = /* @__PURE__ */ A(ft, [["__scopeId", "data-v-5644cc74"]]), pt = /* @__PURE__ */ T({
|
|
748
|
+
__name: "Sidebar",
|
|
749
|
+
props: {
|
|
750
|
+
modelValue: { type: Boolean, default: !1 },
|
|
751
|
+
position: { default: "left" },
|
|
752
|
+
width: { default: "16rem" },
|
|
753
|
+
overlay: { type: Boolean, default: !0 },
|
|
754
|
+
overlayTop: { default: "0" },
|
|
755
|
+
closable: { type: Boolean, default: !0 },
|
|
756
|
+
persistent: { type: Boolean, default: !1 },
|
|
757
|
+
backgroundColor: { default: "white" },
|
|
758
|
+
shadow: { type: Boolean, default: !0 },
|
|
759
|
+
padding: { default: "md" }
|
|
760
|
+
},
|
|
761
|
+
emits: ["update:modelValue", "close", "open"],
|
|
762
|
+
setup(e, { emit: h }) {
|
|
763
|
+
const t = e, d = h, r = g({
|
|
764
|
+
get: () => t.modelValue,
|
|
765
|
+
set: ($) => d("update:modelValue", $)
|
|
766
|
+
}), i = () => {
|
|
767
|
+
t.persistent || (r.value = !1, d("close"));
|
|
768
|
+
}, n = g(() => t.position === "left" ? "slide-right" : "slide-left"), u = g(() => {
|
|
769
|
+
const $ = "fixed top-0 h-full z-50 flex flex-col", M = t.position === "left" ? "left-0" : "right-0", N = t.shadow ? t.position === "left" ? "shadow-[2px_0_8px_rgba(0,0,0,0.1)]" : "shadow-[-2px_0_8px_rgba(0,0,0,0.1)]" : "";
|
|
770
|
+
return [$, M, N].filter(Boolean).join(" ");
|
|
771
|
+
}), a = g(() => ({
|
|
772
|
+
width: t.width,
|
|
773
|
+
backgroundColor: t.backgroundColor,
|
|
774
|
+
top: t.overlayTop,
|
|
775
|
+
height: t.overlayTop !== "0" ? `calc(100vh - ${t.overlayTop})` : "100vh"
|
|
776
|
+
})), b = {
|
|
777
|
+
none: "",
|
|
778
|
+
sm: "p-2",
|
|
779
|
+
md: "p-4",
|
|
780
|
+
lg: "p-6"
|
|
781
|
+
}, v = g(() => `flex items-center justify-between border-b border-gray-200 ${b[t.padding]}`), V = g(() => `flex-1 overflow-y-auto ${b[t.padding]}`), z = g(() => `border-t border-gray-200 ${b[t.padding]}`);
|
|
782
|
+
return ($, M) => (s(), P(W, { to: "body" }, [
|
|
783
|
+
H(K, { name: "fade" }, {
|
|
784
|
+
default: q(() => [
|
|
785
|
+
r.value && e.overlay ? (s(), l("div", {
|
|
786
|
+
key: 0,
|
|
787
|
+
onClick: i,
|
|
788
|
+
class: "fixed inset-0 bg-black/50 z-40",
|
|
789
|
+
style: I({ top: e.overlayTop })
|
|
790
|
+
}, null, 4)) : f("", !0)
|
|
791
|
+
]),
|
|
792
|
+
_: 1
|
|
793
|
+
}),
|
|
794
|
+
H(K, { name: n.value }, {
|
|
795
|
+
default: q(() => [
|
|
796
|
+
r.value ? (s(), l("aside", {
|
|
797
|
+
key: 0,
|
|
798
|
+
class: k(u.value),
|
|
799
|
+
style: I(a.value)
|
|
800
|
+
}, [
|
|
801
|
+
$.$slots.header ? (s(), l("div", {
|
|
802
|
+
key: 0,
|
|
803
|
+
class: k(v.value)
|
|
804
|
+
}, [
|
|
805
|
+
w($.$slots, "header", {}, void 0, !0),
|
|
806
|
+
e.closable ? (s(), l("button", {
|
|
807
|
+
key: 0,
|
|
808
|
+
onClick: i,
|
|
809
|
+
class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
|
|
810
|
+
"aria-label": "Cerrar menú"
|
|
811
|
+
}, [...M[0] || (M[0] = [
|
|
812
|
+
o("svg", {
|
|
813
|
+
class: "w-5 h-5",
|
|
814
|
+
fill: "none",
|
|
815
|
+
stroke: "currentColor",
|
|
816
|
+
viewBox: "0 0 24 24"
|
|
817
|
+
}, [
|
|
818
|
+
o("path", {
|
|
819
|
+
"stroke-linecap": "round",
|
|
820
|
+
"stroke-linejoin": "round",
|
|
821
|
+
"stroke-width": "2",
|
|
822
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
823
|
+
})
|
|
824
|
+
], -1)
|
|
825
|
+
])])) : f("", !0)
|
|
826
|
+
], 2)) : f("", !0),
|
|
827
|
+
o("div", {
|
|
828
|
+
class: k(V.value)
|
|
829
|
+
}, [
|
|
830
|
+
w($.$slots, "default", {}, void 0, !0)
|
|
831
|
+
], 2),
|
|
832
|
+
$.$slots.footer ? (s(), l("div", {
|
|
833
|
+
key: 1,
|
|
834
|
+
class: k(z.value)
|
|
835
|
+
}, [
|
|
836
|
+
w($.$slots, "footer", {}, void 0, !0)
|
|
837
|
+
], 2)) : f("", !0)
|
|
838
|
+
], 6)) : f("", !0)
|
|
839
|
+
]),
|
|
840
|
+
_: 3
|
|
841
|
+
}, 8, ["name"])
|
|
842
|
+
]));
|
|
843
|
+
}
|
|
844
|
+
}), Kt = /* @__PURE__ */ A(pt, [["__scopeId", "data-v-fffb0e44"]]), gt = { class: "w-full overflow-x-auto" }, ht = { class: "w-full border-collapse" }, bt = { class: "w-full" }, vt = { class: "bg-white border-b border-gray-100 w-full" }, xt = ["onClick"], yt = { class: "flex items-center gap-2" }, mt = {
|
|
748
845
|
key: 0,
|
|
749
846
|
class: "text-xs text-gray-400"
|
|
750
|
-
},
|
|
847
|
+
}, kt = { key: 0 }, wt = { key: 1 }, Ct = { class: "w-full" }, $t = {
|
|
751
848
|
key: 0,
|
|
752
849
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
753
|
-
},
|
|
850
|
+
}, _t = {
|
|
754
851
|
key: 1,
|
|
755
852
|
class: "w-full px-6 py-4 bg-white"
|
|
756
|
-
},
|
|
853
|
+
}, Bt = /* @__PURE__ */ T({
|
|
757
854
|
__name: "Table",
|
|
758
855
|
props: {
|
|
759
856
|
columns: {},
|
|
760
857
|
data: {}
|
|
761
858
|
},
|
|
762
859
|
setup(e) {
|
|
763
|
-
const h = e,
|
|
764
|
-
|
|
765
|
-
}, i =
|
|
766
|
-
if (!
|
|
860
|
+
const h = e, t = j(null), d = j("asc"), r = (n) => {
|
|
861
|
+
t.value === n ? d.value = d.value === "asc" ? "desc" : "asc" : (t.value = n, d.value = "asc");
|
|
862
|
+
}, i = g(() => {
|
|
863
|
+
if (!t.value)
|
|
767
864
|
return h.data;
|
|
768
865
|
const n = [...h.data];
|
|
769
|
-
return n.sort((
|
|
770
|
-
const
|
|
771
|
-
return typeof
|
|
866
|
+
return n.sort((u, a) => {
|
|
867
|
+
const b = u[t.value], v = a[t.value];
|
|
868
|
+
return typeof b == "string" && typeof v == "string" ? d.value === "asc" ? b.localeCompare(v) : v.localeCompare(b) : typeof b == "number" && typeof v == "number" ? d.value === "asc" ? b - v : v - b : 0;
|
|
772
869
|
}), n;
|
|
773
870
|
});
|
|
774
|
-
return (n,
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
(
|
|
779
|
-
key:
|
|
780
|
-
style:
|
|
871
|
+
return (n, u) => (s(), l("div", gt, [
|
|
872
|
+
o("table", ht, [
|
|
873
|
+
o("thead", bt, [
|
|
874
|
+
o("tr", vt, [
|
|
875
|
+
(s(!0), l(L, null, O(e.columns, (a) => (s(), l("th", {
|
|
876
|
+
key: a.key,
|
|
877
|
+
style: I(a.width ? { width: a.width } : {}),
|
|
781
878
|
class: k([
|
|
782
879
|
"px-8 py-4 text-left text-base font-semibold text-gray-900 border-0",
|
|
783
|
-
|
|
880
|
+
a.sortable ? "cursor-pointer hover:text-primary-700 select-none transition-colors" : ""
|
|
784
881
|
]),
|
|
785
|
-
onClick: (
|
|
882
|
+
onClick: (b) => a.sortable && r(a.key)
|
|
786
883
|
}, [
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
])) :
|
|
884
|
+
o("div", yt, [
|
|
885
|
+
o("span", null, x(a.label), 1),
|
|
886
|
+
a.sortable ? (s(), l("span", mt, [
|
|
887
|
+
t.value !== a.key ? (s(), l("span", kt, "⇅")) : (s(), l("span", wt, x(d.value === "asc" ? "↑" : "↓"), 1))
|
|
888
|
+
])) : f("", !0)
|
|
792
889
|
])
|
|
793
|
-
], 14,
|
|
890
|
+
], 14, xt))), 128))
|
|
794
891
|
])
|
|
795
892
|
]),
|
|
796
|
-
|
|
797
|
-
(
|
|
798
|
-
key:
|
|
893
|
+
o("tbody", Ct, [
|
|
894
|
+
(s(!0), l(L, null, O(i.value, (a, b) => (s(), l("tr", {
|
|
895
|
+
key: b,
|
|
799
896
|
class: "w-full hover:bg-gray-50 transition-colors"
|
|
800
897
|
}, [
|
|
801
|
-
(
|
|
802
|
-
key: `${
|
|
898
|
+
(s(!0), l(L, null, O(e.columns, (v) => (s(), l("td", {
|
|
899
|
+
key: `${b}-${v.key}`,
|
|
803
900
|
class: "px-8 py-4 text-base text-gray-700 border-0"
|
|
804
901
|
}, [
|
|
805
|
-
|
|
806
|
-
value:
|
|
807
|
-
row:
|
|
902
|
+
w(n.$slots, `cell-${v.key}`, {
|
|
903
|
+
value: a[v.key],
|
|
904
|
+
row: a
|
|
808
905
|
}, () => [
|
|
809
|
-
|
|
906
|
+
F(x(a[v.key]), 1)
|
|
810
907
|
], !0)
|
|
811
908
|
]))), 128))
|
|
812
909
|
]))), 128))
|
|
813
910
|
])
|
|
814
911
|
]),
|
|
815
|
-
i.value.length === 0 ? (
|
|
816
|
-
|
|
817
|
-
|
|
912
|
+
i.value.length === 0 ? (s(), l("div", $t, [
|
|
913
|
+
w(n.$slots, "empty", {}, () => [
|
|
914
|
+
u[0] || (u[0] = F("No hay datos disponibles", -1))
|
|
818
915
|
], !0)
|
|
819
|
-
])) :
|
|
820
|
-
n.$slots.footer ? (
|
|
821
|
-
|
|
822
|
-
])) :
|
|
916
|
+
])) : f("", !0),
|
|
917
|
+
n.$slots.footer ? (s(), l("div", _t, [
|
|
918
|
+
w(n.$slots, "footer", {}, void 0, !0)
|
|
919
|
+
])) : f("", !0)
|
|
823
920
|
]));
|
|
824
921
|
}
|
|
825
|
-
}),
|
|
922
|
+
}), Pt = /* @__PURE__ */ A(Bt, [["__scopeId", "data-v-6b3ff0a8"]]), Tt = { class: "w-full" }, Vt = {
|
|
826
923
|
class: "flex border-b border-gray-100",
|
|
827
924
|
role: "tablist"
|
|
828
|
-
},
|
|
925
|
+
}, jt = ["aria-selected", "onClick"], zt = { role: "tabpanel" }, Mt = "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", Lt = "text-gray-600 border-b-4 border-transparent hover:text-gray-800", Wt = /* @__PURE__ */ T({
|
|
829
926
|
__name: "Tabs",
|
|
830
927
|
props: {
|
|
831
928
|
modelValue: {},
|
|
@@ -833,34 +930,34 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
833
930
|
},
|
|
834
931
|
emits: ["update:modelValue"],
|
|
835
932
|
setup(e, { emit: h }) {
|
|
836
|
-
const
|
|
837
|
-
r(
|
|
838
|
-
}, n =
|
|
839
|
-
() =>
|
|
933
|
+
const t = e, d = h, r = (a) => t.modelValue === a, i = (a) => {
|
|
934
|
+
r(a) || d("update:modelValue", a);
|
|
935
|
+
}, n = g(() => t.modelValue), u = g(
|
|
936
|
+
() => t.tabs.find((a) => a.value === n.value)
|
|
840
937
|
);
|
|
841
|
-
return (
|
|
842
|
-
|
|
843
|
-
(
|
|
844
|
-
key:
|
|
938
|
+
return (a, b) => (s(), l("div", Tt, [
|
|
939
|
+
o("div", Vt, [
|
|
940
|
+
(s(!0), l(L, null, O(e.tabs, (v) => (s(), l("button", {
|
|
941
|
+
key: v.value,
|
|
845
942
|
type: "button",
|
|
846
943
|
class: k([
|
|
847
|
-
|
|
848
|
-
r(
|
|
944
|
+
Mt,
|
|
945
|
+
r(v.value) ? St : Lt
|
|
849
946
|
]),
|
|
850
|
-
"aria-selected": r(
|
|
947
|
+
"aria-selected": r(v.value),
|
|
851
948
|
role: "tab",
|
|
852
|
-
onClick: (V) => i(
|
|
853
|
-
}, x(
|
|
949
|
+
onClick: (V) => i(v.value)
|
|
950
|
+
}, x(v.label), 11, jt))), 128))
|
|
854
951
|
]),
|
|
855
|
-
|
|
856
|
-
|
|
952
|
+
o("div", zt, [
|
|
953
|
+
w(a.$slots, n.value, {
|
|
857
954
|
active: n.value,
|
|
858
|
-
tab:
|
|
955
|
+
tab: u.value
|
|
859
956
|
})
|
|
860
957
|
])
|
|
861
958
|
]));
|
|
862
959
|
}
|
|
863
|
-
}),
|
|
960
|
+
}), Dt = "font-sans", Ut = /* @__PURE__ */ T({
|
|
864
961
|
__name: "Text",
|
|
865
962
|
props: {
|
|
866
963
|
variant: { default: "body1" },
|
|
@@ -892,7 +989,7 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
892
989
|
button3: "text-[12px] leading-[18px] tracking-[1.25px] font-bold",
|
|
893
990
|
caption: "text-[12px] leading-[18px] tracking-[0.4px] font-normal",
|
|
894
991
|
overline: "text-[10px] leading-[15px] tracking-[1.5px] font-medium"
|
|
895
|
-
},
|
|
992
|
+
}, t = {
|
|
896
993
|
h1: "h1",
|
|
897
994
|
h2: "h2",
|
|
898
995
|
h3: "h3",
|
|
@@ -912,7 +1009,7 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
912
1009
|
button3: "span",
|
|
913
1010
|
caption: "span",
|
|
914
1011
|
overline: "span"
|
|
915
|
-
},
|
|
1012
|
+
}, d = {
|
|
916
1013
|
left: "text-left",
|
|
917
1014
|
center: "text-center",
|
|
918
1015
|
right: "text-right",
|
|
@@ -932,36 +1029,37 @@ const se = { class: "flex items-center gap-4" }, le = {
|
|
|
932
1029
|
semibold: "font-semibold",
|
|
933
1030
|
bold: "font-bold",
|
|
934
1031
|
extrabold: "font-extrabold"
|
|
935
|
-
}, n = e,
|
|
936
|
-
return (
|
|
1032
|
+
}, n = e, u = g(() => n.variant), a = g(() => n.color), b = g(() => n.align), v = g(() => n.as || t[u.value] || "span"), V = g(() => n.weight ? i[n.weight] : "");
|
|
1033
|
+
return (z, $) => (s(), P(te(v.value), {
|
|
937
1034
|
class: k([
|
|
938
|
-
|
|
939
|
-
h[
|
|
940
|
-
r[
|
|
941
|
-
|
|
1035
|
+
Dt,
|
|
1036
|
+
h[u.value],
|
|
1037
|
+
r[a.value],
|
|
1038
|
+
d[b.value],
|
|
942
1039
|
V.value,
|
|
943
1040
|
{
|
|
944
|
-
uppercase: e.uppercase ||
|
|
1041
|
+
uppercase: e.uppercase || u.value === "overline",
|
|
945
1042
|
truncate: e.truncate
|
|
946
1043
|
}
|
|
947
1044
|
])
|
|
948
1045
|
}, {
|
|
949
|
-
default:
|
|
950
|
-
|
|
1046
|
+
default: q(() => [
|
|
1047
|
+
w(z.$slots, "default")
|
|
951
1048
|
]),
|
|
952
1049
|
_: 3
|
|
953
1050
|
}, 8, ["class"]));
|
|
954
1051
|
}
|
|
955
1052
|
});
|
|
956
1053
|
export {
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1054
|
+
Ot as AppBar,
|
|
1055
|
+
Ft as Button,
|
|
1056
|
+
At as Card,
|
|
1057
|
+
Nt as Dialog,
|
|
1058
|
+
qt as FileUpload,
|
|
1059
|
+
Et as Loader,
|
|
1060
|
+
Ht as Select,
|
|
1061
|
+
Kt as Sidebar,
|
|
1062
|
+
Pt as Table,
|
|
1063
|
+
Wt as Tabs,
|
|
1064
|
+
Ut as Text
|
|
967
1065
|
};
|