@iaclinical/components 1.0.16 → 1.0.18
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 +5 -3
- package/dist/iaclinical-components.cjs +1 -1
- package/dist/iaclinical-components.js +653 -594
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as O, computed as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as O, computed as c, createElementBlock as o, openBlock as s, normalizeClass as x, createElementVNode as l, createCommentVNode as h, renderSlot as B, toDisplayString as w, createBlock as q, Teleport as J, createVNode as G, Transition as Q, withCtx as U, withModifiers as F, createTextVNode as P, ref as E, unref as ee, normalizeStyle as R, onMounted as te, onUnmounted as se, watch as X, nextTick as Z, Fragment as A, renderList as W, resolveDynamicComponent as Y, withDirectives as oe, vModelText as le } from "vue";
|
|
2
|
+
import { Icon as ae } from "@iconify/vue";
|
|
3
|
+
const ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, re = {
|
|
3
4
|
key: 1,
|
|
4
5
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
5
|
-
},
|
|
6
|
+
}, ie = { class: "flex flex-1 justify-center items-center min-w-0" }, de = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins truncate"
|
|
8
|
-
},
|
|
9
|
+
}, ue = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ce = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
11
|
-
},
|
|
12
|
+
}, fe = /* @__PURE__ */ O({
|
|
12
13
|
__name: "AppBar",
|
|
13
14
|
props: {
|
|
14
15
|
title: { default: "" },
|
|
@@ -20,35 +21,35 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
20
21
|
height: { default: "md" }
|
|
21
22
|
},
|
|
22
23
|
emits: ["toggle-menu"],
|
|
23
|
-
setup(t, { emit:
|
|
24
|
-
const e = t,
|
|
25
|
-
const
|
|
24
|
+
setup(t, { emit: u }) {
|
|
25
|
+
const e = t, d = u, r = c(() => {
|
|
26
|
+
const i = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", p = {
|
|
26
27
|
default: "bg-primary-700 text-primary-50",
|
|
27
28
|
dark: "bg-secondary-900 text-white",
|
|
28
29
|
light: "bg-white text-secondary-900 border-b border-secondary-200"
|
|
29
|
-
},
|
|
30
|
+
}, a = {
|
|
30
31
|
sm: "h-12",
|
|
31
32
|
md: "h-14",
|
|
32
33
|
lg: "h-16"
|
|
33
|
-
}, g = e.sticky ? "sticky top-0" : "",
|
|
34
|
+
}, g = e.sticky ? "sticky top-0" : "", v = e.shadow ? "shadow-md" : "";
|
|
34
35
|
return [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
i,
|
|
37
|
+
p[e.variant],
|
|
38
|
+
a[e.height],
|
|
38
39
|
g,
|
|
39
|
-
|
|
40
|
+
v
|
|
40
41
|
].join(" ");
|
|
41
42
|
});
|
|
42
|
-
return (
|
|
43
|
-
class:
|
|
43
|
+
return (i, p) => (s(), o("header", {
|
|
44
|
+
class: x(r.value)
|
|
44
45
|
}, [
|
|
45
|
-
l("div",
|
|
46
|
+
l("div", ne, [
|
|
46
47
|
t.showMenuButton ? (s(), o("button", {
|
|
47
48
|
key: 0,
|
|
48
|
-
onClick:
|
|
49
|
+
onClick: p[0] || (p[0] = (a) => d("toggle-menu")),
|
|
49
50
|
class: "p-1.5 sm:p-2 hover:bg-primary-600 rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
50
51
|
"aria-label": "Toggle menu"
|
|
51
|
-
}, [...
|
|
52
|
+
}, [...p[1] || (p[1] = [
|
|
52
53
|
l("svg", {
|
|
53
54
|
class: "w-5 h-5 sm:w-6 sm:h-6 text-primary-50",
|
|
54
55
|
fill: "none",
|
|
@@ -63,29 +64,29 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
63
64
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
64
65
|
})
|
|
65
66
|
], -1)
|
|
66
|
-
])])) :
|
|
67
|
-
t.title && t.titlePosition === "left" ? (s(), o("div",
|
|
68
|
-
B(
|
|
69
|
-
]),
|
|
70
|
-
l("div", ne, [
|
|
71
|
-
t.title && t.titlePosition === "center" ? (s(), o("div", re, w(t.title), 1)) : v("", !0),
|
|
72
|
-
B(r.$slots, "center", {}, void 0, !0)
|
|
67
|
+
])])) : h("", !0),
|
|
68
|
+
t.title && t.titlePosition === "left" ? (s(), o("div", re, w(t.title), 1)) : h("", !0),
|
|
69
|
+
B(i.$slots, "left", {}, void 0, !0)
|
|
73
70
|
]),
|
|
74
71
|
l("div", ie, [
|
|
75
|
-
t.title && t.titlePosition === "
|
|
76
|
-
B(
|
|
72
|
+
t.title && t.titlePosition === "center" ? (s(), o("div", de, w(t.title), 1)) : h("", !0),
|
|
73
|
+
B(i.$slots, "center", {}, void 0, !0)
|
|
74
|
+
]),
|
|
75
|
+
l("div", ue, [
|
|
76
|
+
t.title && t.titlePosition === "right" ? (s(), o("div", ce, w(t.title), 1)) : h("", !0),
|
|
77
|
+
B(i.$slots, "right", {}, void 0, !0)
|
|
77
78
|
])
|
|
78
79
|
], 2));
|
|
79
80
|
}
|
|
80
|
-
}), N = (t,
|
|
81
|
+
}), N = (t, u) => {
|
|
81
82
|
const e = t.__vccOpts || t;
|
|
82
|
-
for (const [
|
|
83
|
-
e[
|
|
83
|
+
for (const [d, r] of u)
|
|
84
|
+
e[d] = r;
|
|
84
85
|
return e;
|
|
85
|
-
},
|
|
86
|
+
}, as = /* @__PURE__ */ N(fe, [["__scopeId", "data-v-c5861315"]]), pe = ["type", "disabled", "aria-label"], ve = {
|
|
86
87
|
key: 0,
|
|
87
88
|
class: "absolute top-0 right-0 inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-bold leading-none text-white transform translate-x-1/2 -translate-y-1/2 bg-danger-600 rounded-full min-w-[1.25rem]"
|
|
88
|
-
},
|
|
89
|
+
}, ns = /* @__PURE__ */ O({
|
|
89
90
|
__name: "Button",
|
|
90
91
|
props: {
|
|
91
92
|
variant: { default: "primary" },
|
|
@@ -99,53 +100,53 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
99
100
|
textColorHover: { default: void 0 }
|
|
100
101
|
},
|
|
101
102
|
emits: ["click"],
|
|
102
|
-
setup(t, { emit:
|
|
103
|
-
const e = t,
|
|
104
|
-
const g = "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",
|
|
103
|
+
setup(t, { emit: u }) {
|
|
104
|
+
const e = t, d = u, r = c(() => e.variant === "icon"), i = c(() => e.badge > 99 ? "99+" : e.badge.toString()), p = c(() => {
|
|
105
|
+
const g = "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", v = {
|
|
105
106
|
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
|
|
106
|
-
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 focus-visible:ring-secondary-500",
|
|
107
|
+
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 hover:text-secondary-800 focus-visible:ring-secondary-500",
|
|
107
108
|
outline: "border border-secondary-300 bg-transparent hover:bg-secondary-100 focus-visible:ring-secondary-500",
|
|
108
109
|
ghost: "hover:bg-secondary-100 focus-visible:ring-secondary-500",
|
|
109
110
|
danger: "bg-danger-600 text-white hover:bg-danger-700 focus-visible:ring-danger-600",
|
|
110
111
|
icon: "hover:bg-secondary-100 focus-visible:ring-secondary-500 relative",
|
|
111
112
|
text: "bg-transparent border-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
|
112
113
|
}, y = {
|
|
113
|
-
sm:
|
|
114
|
-
md:
|
|
115
|
-
lg:
|
|
116
|
-
},
|
|
114
|
+
sm: r.value ? "p-1.5" : "h-8 px-3 text-sm",
|
|
115
|
+
md: r.value ? "p-2" : "h-10 px-4 text-base",
|
|
116
|
+
lg: r.value ? "p-3" : "h-12 px-6 text-lg"
|
|
117
|
+
}, f = {
|
|
117
118
|
full: "rounded-full",
|
|
118
119
|
xl: "rounded-2xl",
|
|
119
120
|
lg: "rounded-xl",
|
|
120
121
|
md: "rounded-lg",
|
|
121
122
|
sm: "rounded-md",
|
|
122
123
|
none: "rounded-none"
|
|
123
|
-
}, _ = e.textColor ? e.textColor : "", C =
|
|
124
|
-
var
|
|
125
|
-
return e.textColorHover ? e.textColorHover : (
|
|
124
|
+
}, _ = e.textColor ? e.textColor : "", C = c(() => {
|
|
125
|
+
var I, V;
|
|
126
|
+
return e.textColorHover ? e.textColorHover : (I = e.textColor) != null && I.includes("white") || (V = e.textColor) != null && V.includes("50") ? "hover:text-black" : "";
|
|
126
127
|
});
|
|
127
|
-
return `${g} ${
|
|
128
|
-
}),
|
|
129
|
-
e.disabled ||
|
|
128
|
+
return `${g} ${v[e.variant]} ${y[e.size]} ${f[e.radius]} ${_} ${C.value}`;
|
|
129
|
+
}), a = (g) => {
|
|
130
|
+
e.disabled || d("click", g);
|
|
130
131
|
};
|
|
131
|
-
return (g,
|
|
132
|
-
class: p
|
|
132
|
+
return (g, v) => (s(), o("button", {
|
|
133
|
+
class: x(p.value),
|
|
133
134
|
type: t.type,
|
|
134
135
|
disabled: t.disabled,
|
|
135
|
-
onClick:
|
|
136
|
+
onClick: a,
|
|
136
137
|
"aria-label": t.ariaLabel
|
|
137
138
|
}, [
|
|
138
139
|
B(g.$slots, "default"),
|
|
139
|
-
|
|
140
|
-
], 10,
|
|
140
|
+
r.value && t.badge && t.badge > 0 ? (s(), o("span", ve, w(i.value), 1)) : h("", !0)
|
|
141
|
+
], 10, pe));
|
|
141
142
|
}
|
|
142
|
-
}),
|
|
143
|
+
}), ge = {
|
|
143
144
|
key: 0,
|
|
144
145
|
class: "border-b border-gray-100 px-6 py-4"
|
|
145
|
-
},
|
|
146
|
+
}, xe = { class: "px-6 py-4" }, he = {
|
|
146
147
|
key: 1,
|
|
147
148
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
148
|
-
},
|
|
149
|
+
}, rs = /* @__PURE__ */ O({
|
|
149
150
|
__name: "Card",
|
|
150
151
|
props: {
|
|
151
152
|
shadow: { default: "md" },
|
|
@@ -153,43 +154,43 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
153
154
|
bordered: { type: Boolean, default: !1 }
|
|
154
155
|
},
|
|
155
156
|
setup(t) {
|
|
156
|
-
const
|
|
157
|
+
const u = t, e = {
|
|
157
158
|
none: "",
|
|
158
159
|
sm: "shadow-sm",
|
|
159
160
|
md: "shadow",
|
|
160
161
|
lg: "shadow-lg",
|
|
161
162
|
xl: "shadow-xl"
|
|
162
|
-
},
|
|
163
|
+
}, d = {
|
|
163
164
|
none: "rounded-none",
|
|
164
165
|
sm: "rounded-sm",
|
|
165
166
|
md: "rounded-md",
|
|
166
167
|
lg: "rounded-lg",
|
|
167
168
|
xl: "rounded-xl",
|
|
168
169
|
full: "rounded-full"
|
|
169
|
-
},
|
|
170
|
+
}, r = c(() => [
|
|
170
171
|
"w-full bg-white",
|
|
171
|
-
e[
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
e[u.shadow],
|
|
173
|
+
d[u.rounded],
|
|
174
|
+
u.bordered ? "border border-gray-200" : ""
|
|
174
175
|
]);
|
|
175
|
-
return (
|
|
176
|
-
class:
|
|
176
|
+
return (i, p) => (s(), o("div", {
|
|
177
|
+
class: x(r.value)
|
|
177
178
|
}, [
|
|
178
|
-
|
|
179
|
-
B(
|
|
180
|
-
])) :
|
|
181
|
-
l("div",
|
|
182
|
-
B(
|
|
179
|
+
i.$slots.header ? (s(), o("div", ge, [
|
|
180
|
+
B(i.$slots, "header")
|
|
181
|
+
])) : h("", !0),
|
|
182
|
+
l("div", xe, [
|
|
183
|
+
B(i.$slots, "default")
|
|
183
184
|
]),
|
|
184
|
-
|
|
185
|
-
B(
|
|
186
|
-
])) :
|
|
185
|
+
i.$slots.footer ? (s(), o("div", he, [
|
|
186
|
+
B(i.$slots, "footer")
|
|
187
|
+
])) : h("", !0)
|
|
187
188
|
], 2));
|
|
188
189
|
}
|
|
189
|
-
}),
|
|
190
|
+
}), be = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, ye = { class: "text-xl font-semibold text-gray-900" }, me = { class: "px-8 py-6" }, we = {
|
|
190
191
|
key: 0,
|
|
191
192
|
class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
|
|
192
|
-
},
|
|
193
|
+
}, ke = /* @__PURE__ */ O({
|
|
193
194
|
__name: "Dialog",
|
|
194
195
|
props: {
|
|
195
196
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -197,39 +198,39 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
197
198
|
closeOnBackdrop: { type: Boolean, default: !0 }
|
|
198
199
|
},
|
|
199
200
|
emits: ["update:modelValue", "close"],
|
|
200
|
-
setup(t, { emit:
|
|
201
|
-
const e = t,
|
|
201
|
+
setup(t, { emit: u }) {
|
|
202
|
+
const e = t, d = u, r = c({
|
|
202
203
|
get: () => e.modelValue,
|
|
203
|
-
set: (
|
|
204
|
-
}),
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
e.closeOnBackdrop &&
|
|
204
|
+
set: (a) => d("update:modelValue", a)
|
|
205
|
+
}), i = () => {
|
|
206
|
+
r.value = !1, d("close");
|
|
207
|
+
}, p = () => {
|
|
208
|
+
e.closeOnBackdrop && i();
|
|
208
209
|
};
|
|
209
|
-
return (
|
|
210
|
+
return (a, g) => (s(), q(J, { to: "body" }, [
|
|
210
211
|
G(Q, { name: "dialog" }, {
|
|
211
212
|
default: U(() => [
|
|
212
|
-
|
|
213
|
+
r.value ? (s(), o("div", {
|
|
213
214
|
key: 0,
|
|
214
215
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4",
|
|
215
|
-
onClick:
|
|
216
|
+
onClick: p
|
|
216
217
|
}, [
|
|
217
218
|
l("div", {
|
|
218
219
|
class: "relative w-full rounded-lg bg-white shadow-xl sm:max-w-lg md:max-w-2xl",
|
|
219
220
|
onClick: g[0] || (g[0] = F(() => {
|
|
220
221
|
}, ["stop"]))
|
|
221
222
|
}, [
|
|
222
|
-
l("div",
|
|
223
|
-
l("h2",
|
|
224
|
-
B(
|
|
225
|
-
|
|
223
|
+
l("div", be, [
|
|
224
|
+
l("h2", ye, [
|
|
225
|
+
B(a.$slots, "title", {}, () => [
|
|
226
|
+
P(w(t.title), 1)
|
|
226
227
|
], !0)
|
|
227
228
|
]),
|
|
228
229
|
l("button", {
|
|
229
230
|
type: "button",
|
|
230
231
|
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",
|
|
231
232
|
"aria-label": "Cerrar diálogo",
|
|
232
|
-
onClick:
|
|
233
|
+
onClick: i
|
|
233
234
|
}, [...g[1] || (g[1] = [
|
|
234
235
|
l("svg", {
|
|
235
236
|
class: "h-6 w-6",
|
|
@@ -246,32 +247,32 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
246
247
|
], -1)
|
|
247
248
|
])])
|
|
248
249
|
]),
|
|
249
|
-
l("div",
|
|
250
|
-
B(
|
|
250
|
+
l("div", me, [
|
|
251
|
+
B(a.$slots, "default", {}, void 0, !0)
|
|
251
252
|
]),
|
|
252
|
-
|
|
253
|
-
B(
|
|
254
|
-
])) :
|
|
253
|
+
a.$slots.footer ? (s(), o("div", we, [
|
|
254
|
+
B(a.$slots, "footer", {}, void 0, !0)
|
|
255
|
+
])) : h("", !0)
|
|
255
256
|
])
|
|
256
|
-
])) :
|
|
257
|
+
])) : h("", !0)
|
|
257
258
|
]),
|
|
258
259
|
_: 3
|
|
259
260
|
})
|
|
260
261
|
]));
|
|
261
262
|
}
|
|
262
|
-
}),
|
|
263
|
+
}), is = /* @__PURE__ */ N(ke, [["__scopeId", "data-v-37e19754"]]), $e = ["accept", "multiple", "disabled"], Ce = { class: "flex flex-col items-center justify-center gap-4 text-center" }, Be = ["src", "alt"], ze = {
|
|
263
264
|
key: 1,
|
|
264
265
|
class: "w-full h-full text-gray-400",
|
|
265
266
|
fill: "none",
|
|
266
267
|
stroke: "currentColor",
|
|
267
268
|
viewBox: "0 0 24 24"
|
|
268
|
-
},
|
|
269
|
+
}, Me = { class: "text-center" }, _e = { class: "text-base font-medium text-gray-700" }, Te = { class: "text-primary-700" }, je = { class: "flex items-center gap-3 flex-1 min-w-0" }, Ve = { class: "flex-1 min-w-0" }, Ie = { class: "text-sm font-medium text-gray-900 truncate" }, Se = { class: "text-xs text-gray-500" }, Le = {
|
|
269
270
|
key: 1,
|
|
270
271
|
class: "text-xs text-gray-500 mt-2"
|
|
271
|
-
},
|
|
272
|
+
}, Oe = {
|
|
272
273
|
key: 2,
|
|
273
274
|
class: "text-sm text-danger-500 mt-2"
|
|
274
|
-
},
|
|
275
|
+
}, ds = /* @__PURE__ */ O({
|
|
275
276
|
__name: "FileUpload",
|
|
276
277
|
props: {
|
|
277
278
|
modelValue: { default: null },
|
|
@@ -287,73 +288,73 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
287
288
|
maxSize: { default: void 0 }
|
|
288
289
|
},
|
|
289
290
|
emits: ["update:modelValue", "change", "error"],
|
|
290
|
-
setup(t, { emit:
|
|
291
|
-
const e = t,
|
|
291
|
+
setup(t, { emit: u }) {
|
|
292
|
+
const e = t, d = u, r = E(null), i = E(!1), p = E(e.modelValue), a = E(""), g = c(() => ({
|
|
292
293
|
sm: "w-20 h-20",
|
|
293
294
|
md: "w-32 h-32",
|
|
294
295
|
lg: "w-48 h-48",
|
|
295
296
|
xl: "w-64 h-64"
|
|
296
|
-
})[e.illustrationSize]),
|
|
297
|
+
})[e.illustrationSize]), v = () => {
|
|
297
298
|
var k;
|
|
298
|
-
(k =
|
|
299
|
+
(k = r.value) == null || k.click();
|
|
299
300
|
}, y = () => {
|
|
300
|
-
e.disabled ||
|
|
301
|
-
},
|
|
302
|
-
e.disabled || (
|
|
301
|
+
e.disabled || v();
|
|
302
|
+
}, f = (k) => {
|
|
303
|
+
e.disabled || (i.value = !0);
|
|
303
304
|
}, _ = () => {
|
|
304
|
-
|
|
305
|
+
i.value = !1;
|
|
305
306
|
}, C = (k) => {
|
|
306
|
-
if (
|
|
307
|
+
if (a.value = "", e.maxSize && k.size > e.maxSize) {
|
|
307
308
|
const j = (e.maxSize / 1048576).toFixed(2);
|
|
308
|
-
return
|
|
309
|
+
return a.value = `El archivo excede el tamaño máximo de ${j}MB`, d("error", a.value), !1;
|
|
309
310
|
}
|
|
310
311
|
return !0;
|
|
311
|
-
},
|
|
312
|
+
}, I = (k) => {
|
|
312
313
|
var H;
|
|
313
|
-
const
|
|
314
|
-
|
|
314
|
+
const L = (H = k.target.files) == null ? void 0 : H[0];
|
|
315
|
+
L && C(L) && (p.value = L, d("update:modelValue", L), d("change", L));
|
|
315
316
|
}, V = (k) => {
|
|
316
|
-
var
|
|
317
|
-
|
|
318
|
-
const j = (
|
|
319
|
-
j && C(j) && (
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
},
|
|
317
|
+
var L;
|
|
318
|
+
i.value = !1;
|
|
319
|
+
const j = (L = k.dataTransfer) == null ? void 0 : L.files[0];
|
|
320
|
+
j && C(j) && (p.value = j, d("update:modelValue", j), d("change", j));
|
|
321
|
+
}, T = () => {
|
|
322
|
+
p.value = null, a.value = "", r.value && (r.value.value = ""), d("update:modelValue", null), d("change", null);
|
|
323
|
+
}, b = (k) => {
|
|
323
324
|
if (k === 0) return "0 Bytes";
|
|
324
|
-
const j = 1024,
|
|
325
|
-
return Math.round(k / Math.pow(j, H) * 100) / 100 + " " +
|
|
325
|
+
const j = 1024, L = ["Bytes", "KB", "MB", "GB"], H = Math.floor(Math.log(k) / Math.log(j));
|
|
326
|
+
return Math.round(k / Math.pow(j, H) * 100) / 100 + " " + L[H];
|
|
326
327
|
};
|
|
327
328
|
return (k, j) => (s(), o("div", {
|
|
328
|
-
class:
|
|
329
|
-
|
|
329
|
+
class: x(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
330
|
+
i.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
330
331
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
331
332
|
]]),
|
|
332
333
|
onClick: y,
|
|
333
|
-
onDragover: F(
|
|
334
|
+
onDragover: F(f, ["prevent"]),
|
|
334
335
|
onDragleave: F(_, ["prevent"]),
|
|
335
336
|
onDrop: F(V, ["prevent"])
|
|
336
337
|
}, [
|
|
337
338
|
l("input", {
|
|
338
339
|
ref_key: "fileInput",
|
|
339
|
-
ref:
|
|
340
|
+
ref: r,
|
|
340
341
|
type: "file",
|
|
341
342
|
accept: t.accept,
|
|
342
343
|
multiple: t.multiple,
|
|
343
344
|
disabled: t.disabled,
|
|
344
345
|
class: "hidden",
|
|
345
|
-
onChange:
|
|
346
|
-
}, null, 40,
|
|
347
|
-
l("div",
|
|
346
|
+
onChange: I
|
|
347
|
+
}, null, 40, $e),
|
|
348
|
+
l("div", Ce, [
|
|
348
349
|
l("div", {
|
|
349
|
-
class:
|
|
350
|
+
class: x([g.value, "flex items-center justify-center"])
|
|
350
351
|
}, [
|
|
351
352
|
t.illustration ? (s(), o("img", {
|
|
352
353
|
key: 0,
|
|
353
354
|
src: t.illustration,
|
|
354
355
|
alt: t.illustrationAlt,
|
|
355
356
|
class: "max-w-full max-h-full object-contain"
|
|
356
|
-
}, null, 8,
|
|
357
|
+
}, null, 8, Be)) : (s(), o("svg", ze, [...j[1] || (j[1] = [
|
|
357
358
|
l("path", {
|
|
358
359
|
"stroke-linecap": "round",
|
|
359
360
|
"stroke-linejoin": "round",
|
|
@@ -362,19 +363,19 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
362
363
|
}, null, -1)
|
|
363
364
|
])]))
|
|
364
365
|
], 2),
|
|
365
|
-
l("div",
|
|
366
|
-
l("p",
|
|
367
|
-
|
|
366
|
+
l("div", Me, [
|
|
367
|
+
l("p", _e, [
|
|
368
|
+
P(w(t.mainText) + " ", 1),
|
|
368
369
|
l("span", Te, w(t.linkText), 1)
|
|
369
370
|
])
|
|
370
371
|
]),
|
|
371
|
-
|
|
372
|
+
p.value ? (s(), o("div", {
|
|
372
373
|
key: 0,
|
|
373
374
|
class: "w-full max-w-md bg-gray-50 rounded-lg p-4 flex items-center justify-between",
|
|
374
375
|
onClick: j[0] || (j[0] = F(() => {
|
|
375
376
|
}, ["stop"]))
|
|
376
377
|
}, [
|
|
377
|
-
l("div",
|
|
378
|
+
l("div", je, [
|
|
378
379
|
j[2] || (j[2] = l("svg", {
|
|
379
380
|
class: "w-6 h-6 text-gray-600 flex-shrink-0",
|
|
380
381
|
fill: "none",
|
|
@@ -388,14 +389,14 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
388
389
|
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"
|
|
389
390
|
})
|
|
390
391
|
], -1)),
|
|
391
|
-
l("div",
|
|
392
|
-
l("p",
|
|
393
|
-
l("p",
|
|
392
|
+
l("div", Ve, [
|
|
393
|
+
l("p", Ie, w(p.value.name), 1),
|
|
394
|
+
l("p", Se, w(b(p.value.size)), 1)
|
|
394
395
|
])
|
|
395
396
|
]),
|
|
396
|
-
t.disabled ?
|
|
397
|
+
t.disabled ? h("", !0) : (s(), o("button", {
|
|
397
398
|
key: 0,
|
|
398
|
-
onClick: F(
|
|
399
|
+
onClick: F(T, ["stop"]),
|
|
399
400
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
400
401
|
}, [...j[3] || (j[3] = [
|
|
401
402
|
l("svg", {
|
|
@@ -410,16 +411,73 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
410
411
|
})
|
|
411
412
|
], -1)
|
|
412
413
|
])]))
|
|
413
|
-
])) :
|
|
414
|
-
t.helperText ? (s(), o("p",
|
|
415
|
-
|
|
414
|
+
])) : h("", !0),
|
|
415
|
+
t.helperText ? (s(), o("p", Le, w(t.helperText), 1)) : h("", !0),
|
|
416
|
+
a.value ? (s(), o("p", Oe, w(a.value), 1)) : h("", !0)
|
|
416
417
|
])
|
|
417
418
|
], 34));
|
|
418
419
|
}
|
|
419
|
-
}),
|
|
420
|
+
}), De = /* @__PURE__ */ O({
|
|
421
|
+
__name: "Icon",
|
|
422
|
+
props: {
|
|
423
|
+
name: {},
|
|
424
|
+
size: { default: "md" },
|
|
425
|
+
color: { default: "currentColor" },
|
|
426
|
+
variant: { default: "filled" },
|
|
427
|
+
rotate: { default: 0 },
|
|
428
|
+
spin: { type: Boolean, default: !1 },
|
|
429
|
+
ariaLabel: {}
|
|
430
|
+
},
|
|
431
|
+
setup(t) {
|
|
432
|
+
const u = t, e = {
|
|
433
|
+
xs: "16px",
|
|
434
|
+
sm: "18px",
|
|
435
|
+
md: "20px",
|
|
436
|
+
lg: "24px",
|
|
437
|
+
xl: "30px",
|
|
438
|
+
"2xl": "36px"
|
|
439
|
+
}, d = (a, g) => {
|
|
440
|
+
const v = a.replace(/_/g, "-");
|
|
441
|
+
switch (g) {
|
|
442
|
+
case "filled":
|
|
443
|
+
return `material-symbols:${v}`;
|
|
444
|
+
case "outlined":
|
|
445
|
+
return `ic:outline-${v}`;
|
|
446
|
+
case "rounded":
|
|
447
|
+
return `ic:round-${v}`;
|
|
448
|
+
case "sharp":
|
|
449
|
+
return `ic:sharp-${v}`;
|
|
450
|
+
case "two-tone":
|
|
451
|
+
return `ic:twotone-${v}`;
|
|
452
|
+
default:
|
|
453
|
+
return `material-symbols:${v}`;
|
|
454
|
+
}
|
|
455
|
+
}, r = c(() => d(u.name, u.variant)), i = c(() => {
|
|
456
|
+
const a = [
|
|
457
|
+
"inline-flex items-center justify-center select-none",
|
|
458
|
+
"transition-transform duration-200"
|
|
459
|
+
];
|
|
460
|
+
return u.color && (u.color.startsWith("text-") || u.color.startsWith("fill-")) && a.push(u.color), u.spin && a.push("animate-spin"), a.join(" ");
|
|
461
|
+
}), p = c(() => {
|
|
462
|
+
const a = {};
|
|
463
|
+
if (e[u.size] ? (a.fontSize = e[u.size], a.width = e[u.size], a.height = e[u.size]) : (a.fontSize = u.size, a.width = u.size, a.height = u.size), u.color && !u.color.startsWith("text-") && !u.color.startsWith("fill-") && (a.color = u.color), u.rotate !== 0) {
|
|
464
|
+
const g = `rotate(${u.rotate}deg)`;
|
|
465
|
+
a.transform = g;
|
|
466
|
+
}
|
|
467
|
+
return a;
|
|
468
|
+
});
|
|
469
|
+
return (a, g) => (s(), q(ee(ae), {
|
|
470
|
+
icon: r.value,
|
|
471
|
+
class: x(i.value),
|
|
472
|
+
style: R(p.value),
|
|
473
|
+
"aria-label": t.ariaLabel,
|
|
474
|
+
role: t.ariaLabel ? "img" : void 0
|
|
475
|
+
}, null, 8, ["icon", "class", "style", "aria-label", "role"]));
|
|
476
|
+
}
|
|
477
|
+
}), us = /* @__PURE__ */ N(De, [["__scopeId", "data-v-5f982e5c"]]), Ae = ["stroke-width"], Pe = {
|
|
420
478
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
421
479
|
style: { "background-color": "#f7f7f7" }
|
|
422
|
-
},
|
|
480
|
+
}, Ee = /* @__PURE__ */ O({
|
|
423
481
|
__name: "Loader",
|
|
424
482
|
props: {
|
|
425
483
|
type: { default: "circular" },
|
|
@@ -430,24 +488,24 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
430
488
|
progress: { default: void 0 }
|
|
431
489
|
},
|
|
432
490
|
setup(t) {
|
|
433
|
-
const
|
|
491
|
+
const u = t, e = {
|
|
434
492
|
primary: "text-primary-700",
|
|
435
493
|
secondary: "text-secondary-500",
|
|
436
494
|
success: "text-success-500",
|
|
437
495
|
warning: "text-warning-500",
|
|
438
496
|
danger: "text-danger-500",
|
|
439
497
|
info: "text-info-500"
|
|
440
|
-
},
|
|
498
|
+
}, d = {
|
|
441
499
|
primary: "bg-primary-700",
|
|
442
500
|
secondary: "bg-secondary-500",
|
|
443
501
|
success: "bg-success-500",
|
|
444
502
|
warning: "bg-warning-500",
|
|
445
503
|
danger: "bg-danger-500",
|
|
446
504
|
info: "bg-info-500"
|
|
447
|
-
},
|
|
448
|
-
return (
|
|
505
|
+
}, r = c(() => [e[u.color]]), i = c(() => [d[u.color]]);
|
|
506
|
+
return (p, a) => t.type === "circular" ? (s(), o("div", {
|
|
449
507
|
key: 0,
|
|
450
|
-
class:
|
|
508
|
+
class: x(r.value)
|
|
451
509
|
}, [
|
|
452
510
|
(s(), o("svg", {
|
|
453
511
|
class: "animate-spin",
|
|
@@ -462,8 +520,8 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
462
520
|
stroke: "currentColor",
|
|
463
521
|
"stroke-width": t.strokeWidth,
|
|
464
522
|
fill: "none"
|
|
465
|
-
}, null, 8,
|
|
466
|
-
|
|
523
|
+
}, null, 8, Ae),
|
|
524
|
+
a[0] || (a[0] = l("path", {
|
|
467
525
|
class: "opacity-75",
|
|
468
526
|
fill: "currentColor",
|
|
469
527
|
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"
|
|
@@ -474,30 +532,30 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
474
532
|
class: "w-full",
|
|
475
533
|
style: R({ height: t.height })
|
|
476
534
|
}, [
|
|
477
|
-
l("div",
|
|
535
|
+
l("div", Pe, [
|
|
478
536
|
l("div", {
|
|
479
|
-
class:
|
|
537
|
+
class: x([i.value, "h-full rounded-lg animate-linear-loader"]),
|
|
480
538
|
style: R({ width: t.progress ? `${t.progress}%` : void 0 })
|
|
481
539
|
}, null, 6)
|
|
482
540
|
])
|
|
483
|
-
], 4)) :
|
|
541
|
+
], 4)) : h("", !0);
|
|
484
542
|
}
|
|
485
|
-
}),
|
|
543
|
+
}), cs = /* @__PURE__ */ N(Ee, [["__scopeId", "data-v-8df4ec38"]]), He = ["disabled", "aria-expanded"], We = ["disabled", "onClick"], Ne = {
|
|
486
544
|
key: 0,
|
|
487
545
|
class: "flex-shrink-0"
|
|
488
|
-
},
|
|
546
|
+
}, Fe = ["innerHTML"], Re = { class: "flex-1 min-w-0 mr-2" }, Ke = { class: "flex flex-col items-start" }, qe = ["title"], Ue = ["title"], Ge = {
|
|
489
547
|
key: 1,
|
|
490
548
|
class: "flex-shrink-0"
|
|
491
|
-
},
|
|
549
|
+
}, Qe = {
|
|
492
550
|
key: 0,
|
|
493
551
|
class: "text-xs text-secondary-400 font-mono whitespace-nowrap"
|
|
494
|
-
},
|
|
552
|
+
}, Ze = { key: 1 }, Je = {
|
|
495
553
|
key: 2,
|
|
496
554
|
class: "w-4 h-4 ml-2 flex-shrink-0",
|
|
497
555
|
fill: "none",
|
|
498
556
|
stroke: "currentColor",
|
|
499
557
|
viewBox: "0 0 24 24"
|
|
500
|
-
},
|
|
558
|
+
}, Xe = /* @__PURE__ */ O({
|
|
501
559
|
__name: "Menu",
|
|
502
560
|
props: {
|
|
503
561
|
items: { default: () => [] },
|
|
@@ -516,175 +574,175 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
516
574
|
zIndex: { default: 50 }
|
|
517
575
|
},
|
|
518
576
|
emits: ["open", "close", "select"],
|
|
519
|
-
setup(t, { emit:
|
|
520
|
-
const e = t,
|
|
577
|
+
setup(t, { emit: u }) {
|
|
578
|
+
const e = t, d = u, r = E(!1), i = E(null), p = E(null), a = E({}), g = c(() => [
|
|
521
579
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
522
580
|
"bg-white border border-secondary-300 rounded-md text-secondary-700",
|
|
523
581
|
"hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
|
|
524
582
|
"focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
525
583
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
526
584
|
"transition-all duration-200"
|
|
527
|
-
].join(" ")),
|
|
585
|
+
].join(" ")), v = c(() => [...[
|
|
528
586
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
529
587
|
"flex flex-col",
|
|
530
588
|
"focus:outline-none"
|
|
531
|
-
], `z-${e.zIndex}`].join(" ")), y =
|
|
532
|
-
const
|
|
589
|
+
], `z-${e.zIndex}`].join(" ")), y = c(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), f = c(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), _ = c(() => "py-1 overflow-y-auto flex-1 min-h-0"), C = c(() => "my-1 border-t border-secondary-200"), I = c(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), V = (n) => {
|
|
590
|
+
const M = [
|
|
533
591
|
"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left",
|
|
534
592
|
"transition-all duration-150 focus:outline-none cursor-pointer",
|
|
535
593
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
536
|
-
], m =
|
|
594
|
+
], m = n.variant || "default", K = {
|
|
537
595
|
default: "text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100",
|
|
538
596
|
danger: "text-danger-600 hover:bg-danger-100 hover:text-danger-700 focus:bg-danger-100",
|
|
539
597
|
success: "text-success-600 hover:bg-success-100 hover:text-success-700 focus:bg-success-100",
|
|
540
598
|
warning: "text-warning-600 hover:bg-warning-100 hover:text-warning-700 focus:bg-warning-100"
|
|
541
599
|
};
|
|
542
|
-
let
|
|
543
|
-
return
|
|
544
|
-
},
|
|
545
|
-
e.disabled || (
|
|
546
|
-
},
|
|
547
|
-
|
|
548
|
-
|
|
600
|
+
let S = "";
|
|
601
|
+
return n.color && (S = n.color, (n.color.includes("white") || n.color.includes("50")) && (S += " hover:text-black")), [...M, S || K[m]].join(" ");
|
|
602
|
+
}, T = () => {
|
|
603
|
+
e.disabled || (r.value ? k() : b());
|
|
604
|
+
}, b = () => {
|
|
605
|
+
r.value = !0, d("open"), Z(() => {
|
|
606
|
+
z(), document.addEventListener("click", L), document.addEventListener("keydown", H);
|
|
549
607
|
});
|
|
550
608
|
}, k = () => {
|
|
551
|
-
|
|
552
|
-
}, j = (
|
|
553
|
-
|
|
554
|
-
},
|
|
555
|
-
const
|
|
556
|
-
|
|
557
|
-
}, H = (
|
|
558
|
-
|
|
559
|
-
}, $ = (
|
|
560
|
-
(
|
|
561
|
-
},
|
|
562
|
-
if (!
|
|
563
|
-
const
|
|
564
|
-
let
|
|
609
|
+
r.value = !1, d("close"), document.removeEventListener("click", L), document.removeEventListener("keydown", H);
|
|
610
|
+
}, j = (n) => {
|
|
611
|
+
n.disabled || (n.action && n.action(), d("select", n), e.closeOnClick && !n.children && k());
|
|
612
|
+
}, L = (n) => {
|
|
613
|
+
const M = n.target;
|
|
614
|
+
i.value && !i.value.contains(M) && p.value && !p.value.contains(M) && k();
|
|
615
|
+
}, H = (n) => {
|
|
616
|
+
n.key === "Escape" && k();
|
|
617
|
+
}, $ = (n) => {
|
|
618
|
+
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), T());
|
|
619
|
+
}, z = () => {
|
|
620
|
+
if (!i.value || !p.value) return;
|
|
621
|
+
const n = i.value.getBoundingClientRect(), M = p.value.getBoundingClientRect(), m = window.innerWidth, K = window.innerHeight;
|
|
622
|
+
let S = 0, D = 0;
|
|
565
623
|
switch (e.position) {
|
|
566
624
|
case "bottom-start":
|
|
567
|
-
|
|
625
|
+
S = n.bottom + e.offset.y, D = n.left + e.offset.x;
|
|
568
626
|
break;
|
|
569
627
|
case "bottom-end":
|
|
570
|
-
|
|
628
|
+
S = n.bottom + e.offset.y, D = n.right - M.width + e.offset.x;
|
|
571
629
|
break;
|
|
572
630
|
case "top-start":
|
|
573
|
-
|
|
631
|
+
S = n.top - M.height - e.offset.y, D = n.left + e.offset.x;
|
|
574
632
|
break;
|
|
575
633
|
case "top-end":
|
|
576
|
-
|
|
634
|
+
S = n.top - M.height - e.offset.y, D = n.right - M.width + e.offset.x;
|
|
577
635
|
break;
|
|
578
636
|
case "right-start":
|
|
579
|
-
|
|
637
|
+
S = n.top + e.offset.y, D = n.right + e.offset.x;
|
|
580
638
|
break;
|
|
581
639
|
case "right-end":
|
|
582
|
-
|
|
640
|
+
S = n.bottom - M.height + e.offset.y, D = n.right + e.offset.x;
|
|
583
641
|
break;
|
|
584
642
|
case "left-start":
|
|
585
|
-
|
|
643
|
+
S = n.top + e.offset.y, D = n.left - M.width - e.offset.x;
|
|
586
644
|
break;
|
|
587
645
|
case "left-end":
|
|
588
|
-
|
|
646
|
+
S = n.bottom - M.height + e.offset.y, D = n.left - M.width - e.offset.x;
|
|
589
647
|
break;
|
|
590
648
|
}
|
|
591
|
-
D +
|
|
592
|
-
top: `${
|
|
649
|
+
D + M.width > m && (D = m - M.width - 8), D < 8 && (D = 8), S + M.height > K && (S = K - M.height - 8), S < 8 && (S = 8), a.value = {
|
|
650
|
+
top: `${S}px`,
|
|
593
651
|
left: `${D}px`,
|
|
594
|
-
width: e.width === "auto" ? `${Math.max(
|
|
652
|
+
width: e.width === "auto" ? `${Math.max(n.width, 240)}px` : e.width,
|
|
595
653
|
maxHeight: e.maxHeight,
|
|
596
654
|
minWidth: "240px"
|
|
597
655
|
};
|
|
598
656
|
};
|
|
599
|
-
return
|
|
600
|
-
window.addEventListener("scroll",
|
|
601
|
-
}),
|
|
602
|
-
window.removeEventListener("scroll",
|
|
657
|
+
return te(() => {
|
|
658
|
+
window.addEventListener("scroll", z, !0), window.addEventListener("resize", z);
|
|
659
|
+
}), se(() => {
|
|
660
|
+
window.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z), document.removeEventListener("click", L), document.removeEventListener("keydown", H);
|
|
603
661
|
}), X(() => e.items, () => {
|
|
604
|
-
|
|
605
|
-
}, { deep: !0 }), (
|
|
606
|
-
class:
|
|
662
|
+
r.value && Z(z);
|
|
663
|
+
}, { deep: !0 }), (n, M) => (s(), o("div", {
|
|
664
|
+
class: x(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
607
665
|
}, [
|
|
608
666
|
l("div", {
|
|
609
667
|
ref_key: "triggerRef",
|
|
610
|
-
ref:
|
|
668
|
+
ref: i
|
|
611
669
|
}, [
|
|
612
|
-
B(
|
|
613
|
-
isOpen:
|
|
614
|
-
toggle:
|
|
670
|
+
B(n.$slots, "trigger", {
|
|
671
|
+
isOpen: r.value,
|
|
672
|
+
toggle: T
|
|
615
673
|
}, () => [
|
|
616
674
|
l("button", {
|
|
617
675
|
type: "button",
|
|
618
|
-
class:
|
|
676
|
+
class: x(g.value),
|
|
619
677
|
disabled: t.disabled,
|
|
620
|
-
onClick:
|
|
678
|
+
onClick: T,
|
|
621
679
|
onKeydown: $,
|
|
622
680
|
tabindex: 0,
|
|
623
681
|
role: "button",
|
|
624
|
-
"aria-expanded":
|
|
682
|
+
"aria-expanded": r.value,
|
|
625
683
|
"aria-haspopup": !0
|
|
626
684
|
}, [
|
|
627
|
-
B(
|
|
628
|
-
|
|
685
|
+
B(n.$slots, "trigger-content", {}, () => [
|
|
686
|
+
P(w(t.triggerText), 1)
|
|
629
687
|
], !0),
|
|
630
688
|
t.showChevron ? (s(), o("svg", {
|
|
631
689
|
key: 0,
|
|
632
|
-
class:
|
|
690
|
+
class: x(["w-4 h-4 ml-2 transition-transform", r.value ? "rotate-180" : ""]),
|
|
633
691
|
fill: "none",
|
|
634
692
|
stroke: "currentColor",
|
|
635
693
|
viewBox: "0 0 24 24"
|
|
636
|
-
}, [...
|
|
694
|
+
}, [...M[1] || (M[1] = [
|
|
637
695
|
l("path", {
|
|
638
696
|
"stroke-linecap": "round",
|
|
639
697
|
"stroke-linejoin": "round",
|
|
640
698
|
"stroke-width": "2",
|
|
641
699
|
d: "M19 9l-7 7-7-7"
|
|
642
700
|
}, null, -1)
|
|
643
|
-
])], 2)) :
|
|
644
|
-
], 42,
|
|
701
|
+
])], 2)) : h("", !0)
|
|
702
|
+
], 42, He)
|
|
645
703
|
], !0)
|
|
646
704
|
], 512),
|
|
647
705
|
(s(), q(J, { to: "body" }, [
|
|
648
|
-
|
|
706
|
+
r.value ? (s(), o("div", {
|
|
649
707
|
key: 0,
|
|
650
708
|
ref_key: "menuRef",
|
|
651
|
-
ref:
|
|
652
|
-
class:
|
|
653
|
-
style: R(
|
|
654
|
-
onClick:
|
|
709
|
+
ref: p,
|
|
710
|
+
class: x(v.value),
|
|
711
|
+
style: R(a.value),
|
|
712
|
+
onClick: M[0] || (M[0] = F(() => {
|
|
655
713
|
}, ["stop"]))
|
|
656
714
|
}, [
|
|
657
|
-
|
|
715
|
+
n.$slots.header ? (s(), o("div", {
|
|
658
716
|
key: 0,
|
|
659
|
-
class:
|
|
717
|
+
class: x(y.value)
|
|
660
718
|
}, [
|
|
661
|
-
B(
|
|
662
|
-
], 2)) :
|
|
719
|
+
B(n.$slots, "header", { close: k }, void 0, !0)
|
|
720
|
+
], 2)) : h("", !0),
|
|
663
721
|
l("div", {
|
|
664
|
-
class:
|
|
722
|
+
class: x(_.value)
|
|
665
723
|
}, [
|
|
666
|
-
B(
|
|
724
|
+
B(n.$slots, "default", {
|
|
667
725
|
close: k,
|
|
668
|
-
isOpen:
|
|
726
|
+
isOpen: r.value
|
|
669
727
|
}, () => [
|
|
670
728
|
(s(!0), o(A, null, W(t.items, (m, K) => (s(), o(A, {
|
|
671
729
|
key: m.id || K
|
|
672
730
|
}, [
|
|
673
731
|
m.type === "divider" ? (s(), o("div", {
|
|
674
732
|
key: 0,
|
|
675
|
-
class:
|
|
733
|
+
class: x(C.value)
|
|
676
734
|
}, null, 2)) : m.type === "header" ? (s(), o("div", {
|
|
677
735
|
key: 1,
|
|
678
|
-
class:
|
|
736
|
+
class: x(I.value)
|
|
679
737
|
}, w(m.label), 3)) : (s(), o("button", {
|
|
680
738
|
key: 2,
|
|
681
739
|
type: "button",
|
|
682
|
-
class:
|
|
740
|
+
class: x(V(m)),
|
|
683
741
|
disabled: m.disabled,
|
|
684
|
-
onClick: (
|
|
742
|
+
onClick: (S) => j(m)
|
|
685
743
|
}, [
|
|
686
|
-
m.icon ||
|
|
687
|
-
B(
|
|
744
|
+
m.icon || n.$slots[`icon-${m.id}`] ? (s(), o("span", Ne, [
|
|
745
|
+
B(n.$slots, `icon-${m.id}`, { item: m }, () => [
|
|
688
746
|
typeof m.icon != "string" ? (s(), q(Y(m.icon), {
|
|
689
747
|
key: 0,
|
|
690
748
|
class: "w-5 h-5"
|
|
@@ -692,85 +750,85 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
692
750
|
key: 1,
|
|
693
751
|
innerHTML: m.icon,
|
|
694
752
|
class: "w-5 h-5 inline-block"
|
|
695
|
-
}, null, 8,
|
|
753
|
+
}, null, 8, Fe))
|
|
696
754
|
], !0)
|
|
697
|
-
])) :
|
|
698
|
-
l("div",
|
|
699
|
-
B(
|
|
755
|
+
])) : h("", !0),
|
|
756
|
+
l("div", Re, [
|
|
757
|
+
B(n.$slots, `item-${m.id}`, {
|
|
700
758
|
item: m,
|
|
701
759
|
close: k
|
|
702
760
|
}, () => [
|
|
703
|
-
l("div",
|
|
761
|
+
l("div", Ke, [
|
|
704
762
|
l("span", {
|
|
705
763
|
class: "truncate w-full",
|
|
706
764
|
title: m.label
|
|
707
|
-
}, w(m.label), 9,
|
|
765
|
+
}, w(m.label), 9, qe),
|
|
708
766
|
m.description ? (s(), o("span", {
|
|
709
767
|
key: 0,
|
|
710
768
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
711
769
|
title: m.description
|
|
712
|
-
}, w(m.description), 9,
|
|
770
|
+
}, w(m.description), 9, Ue)) : h("", !0)
|
|
713
771
|
])
|
|
714
772
|
], !0)
|
|
715
773
|
]),
|
|
716
|
-
m.suffix || m.shortcut ||
|
|
717
|
-
B(
|
|
718
|
-
m.shortcut ? (s(), o("span",
|
|
774
|
+
m.suffix || m.shortcut || n.$slots[`suffix-${m.id}`] ? (s(), o("span", Ge, [
|
|
775
|
+
B(n.$slots, `suffix-${m.id}`, { item: m }, () => [
|
|
776
|
+
m.shortcut ? (s(), o("span", Qe, w(m.shortcut), 1)) : m.suffix ? (s(), o("span", Ze, w(m.suffix), 1)) : h("", !0)
|
|
719
777
|
], !0)
|
|
720
|
-
])) :
|
|
721
|
-
m.children && m.children.length > 0 ? (s(), o("svg",
|
|
778
|
+
])) : h("", !0),
|
|
779
|
+
m.children && m.children.length > 0 ? (s(), o("svg", Je, [...M[2] || (M[2] = [
|
|
722
780
|
l("path", {
|
|
723
781
|
"stroke-linecap": "round",
|
|
724
782
|
"stroke-linejoin": "round",
|
|
725
783
|
"stroke-width": "2",
|
|
726
784
|
d: "M9 5l7 7-7 7"
|
|
727
785
|
}, null, -1)
|
|
728
|
-
])])) :
|
|
729
|
-
], 10,
|
|
786
|
+
])])) : h("", !0)
|
|
787
|
+
], 10, We))
|
|
730
788
|
], 64))), 128))
|
|
731
789
|
], !0)
|
|
732
790
|
], 2),
|
|
733
|
-
|
|
791
|
+
n.$slots.footer ? (s(), o("div", {
|
|
734
792
|
key: 1,
|
|
735
|
-
class:
|
|
793
|
+
class: x(f.value)
|
|
736
794
|
}, [
|
|
737
|
-
B(
|
|
738
|
-
], 2)) :
|
|
739
|
-
], 6)) :
|
|
740
|
-
|
|
795
|
+
B(n.$slots, "footer", { close: k }, void 0, !0)
|
|
796
|
+
], 2)) : h("", !0)
|
|
797
|
+
], 6)) : h("", !0),
|
|
798
|
+
r.value && t.overlay ? (s(), o("div", {
|
|
741
799
|
key: 1,
|
|
742
800
|
class: "fixed inset-0 bg-black/20 z-40",
|
|
743
801
|
onClick: k
|
|
744
|
-
})) :
|
|
802
|
+
})) : h("", !0)
|
|
745
803
|
]))
|
|
746
804
|
], 2));
|
|
747
805
|
}
|
|
748
|
-
}),
|
|
806
|
+
}), fs = /* @__PURE__ */ N(Xe, [["__scopeId", "data-v-61176297"]]), Ye = ["for"], et = {
|
|
749
807
|
key: 0,
|
|
750
808
|
class: "text-danger-600"
|
|
751
|
-
},
|
|
809
|
+
}, tt = { class: "relative" }, st = ["id", "disabled", "aria-expanded"], ot = { class: "flex-1 text-left truncate" }, lt = {
|
|
752
810
|
key: 0,
|
|
753
811
|
class: "p-2 border-b border-secondary-200"
|
|
754
|
-
},
|
|
812
|
+
}, at = ["placeholder"], nt = { class: "max-h-64 overflow-y-auto" }, rt = {
|
|
755
813
|
key: 0,
|
|
756
814
|
class: "px-4 py-3 text-sm text-secondary-500 text-center"
|
|
757
|
-
},
|
|
815
|
+
}, it = ["onClick"], dt = { class: "flex items-center justify-between w-full" }, ut = { class: "truncate" }, ct = {
|
|
758
816
|
key: 0,
|
|
759
817
|
class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
|
|
760
818
|
fill: "none",
|
|
761
819
|
stroke: "currentColor",
|
|
762
820
|
viewBox: "0 0 24 24",
|
|
763
821
|
xmlns: "http://www.w3.org/2000/svg"
|
|
764
|
-
},
|
|
822
|
+
}, ft = {
|
|
765
823
|
key: 0,
|
|
766
824
|
class: "border-t border-secondary-200 my-1"
|
|
767
|
-
},
|
|
825
|
+
}, pt = ["onClick"], vt = ["innerHTML"], gt = {
|
|
768
826
|
key: 1,
|
|
769
827
|
class: "mt-1 text-sm text-danger-600"
|
|
770
|
-
},
|
|
828
|
+
}, xt = {
|
|
771
829
|
key: 2,
|
|
772
830
|
class: "mt-1 text-sm text-secondary-600"
|
|
773
|
-
},
|
|
831
|
+
}, ht = /* @__PURE__ */ O({
|
|
774
832
|
__name: "Select",
|
|
775
833
|
props: {
|
|
776
834
|
modelValue: { default: null },
|
|
@@ -791,88 +849,88 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
791
849
|
menuPosition: { default: "bottom" }
|
|
792
850
|
},
|
|
793
851
|
emits: ["update:modelValue", "change", "action"],
|
|
794
|
-
setup(t, { emit:
|
|
795
|
-
const e = t,
|
|
852
|
+
setup(t, { emit: u }) {
|
|
853
|
+
const e = t, d = u, r = E(!1), i = E(""), p = E(null), a = c(
|
|
796
854
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
797
|
-
), g =
|
|
798
|
-
if (!e.searchable || !
|
|
855
|
+
), g = c(() => e.options.find(($) => $.value === e.modelValue) || null), v = c(() => {
|
|
856
|
+
if (!e.searchable || !i.value)
|
|
799
857
|
return e.options;
|
|
800
|
-
const $ =
|
|
801
|
-
return e.options.filter((
|
|
802
|
-
}), y =
|
|
803
|
-
const $ = "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",
|
|
858
|
+
const $ = i.value.toLowerCase();
|
|
859
|
+
return e.options.filter((z) => z.label.toLowerCase().includes($));
|
|
860
|
+
}), y = c(() => "block text-sm font-semibold text-secondary-700 mb-1"), f = c(() => {
|
|
861
|
+
const $ = "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", z = {
|
|
804
862
|
sm: "px-3 py-1.5 text-sm",
|
|
805
863
|
md: "px-4 py-2 text-base",
|
|
806
864
|
lg: "px-5 py-3 text-lg"
|
|
807
|
-
},
|
|
865
|
+
}, n = {
|
|
808
866
|
default: "bg-white border-secondary-300 hover:border-secondary-400",
|
|
809
867
|
outline: "bg-transparent border-secondary-300 hover:border-primary-500",
|
|
810
868
|
filled: "bg-secondary-100 border-transparent hover:bg-secondary-200"
|
|
811
|
-
},
|
|
869
|
+
}, M = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
812
870
|
return [
|
|
813
871
|
$,
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
872
|
+
z[e.size],
|
|
873
|
+
n[e.variant],
|
|
874
|
+
M
|
|
817
875
|
].join(" ");
|
|
818
|
-
}), _ =
|
|
819
|
-
const
|
|
820
|
-
return [
|
|
821
|
-
},
|
|
822
|
-
const
|
|
823
|
-
return $.variant === "danger" ? `${
|
|
824
|
-
}, V = ($) => $.value === e.modelValue,
|
|
825
|
-
e.disabled || (
|
|
876
|
+
}), _ = c(() => `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`), C = ($) => {
|
|
877
|
+
const z = "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", n = V($) ? "bg-primary-50" : "";
|
|
878
|
+
return [z, n].join(" ");
|
|
879
|
+
}, I = ($) => {
|
|
880
|
+
const z = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
|
|
881
|
+
return $.variant === "danger" ? `${z} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${z} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
|
|
882
|
+
}, V = ($) => $.value === e.modelValue, T = () => {
|
|
883
|
+
e.disabled || (r.value = !r.value, r.value && e.searchable && Z(() => {
|
|
826
884
|
var $;
|
|
827
|
-
($ =
|
|
885
|
+
($ = p.value) == null || $.focus();
|
|
828
886
|
}));
|
|
829
|
-
},
|
|
830
|
-
|
|
887
|
+
}, b = () => {
|
|
888
|
+
r.value = !1, i.value = "";
|
|
831
889
|
}, k = ($) => {
|
|
832
|
-
$.disabled || (
|
|
890
|
+
$.disabled || (d("update:modelValue", $.value), d("change", $), b());
|
|
833
891
|
}, j = ($) => {
|
|
834
|
-
$.action && $.action(),
|
|
835
|
-
},
|
|
836
|
-
const
|
|
837
|
-
|
|
838
|
-
|
|
892
|
+
$.action && $.action(), d("action", $), b();
|
|
893
|
+
}, L = ($) => {
|
|
894
|
+
const z = $.relatedTarget;
|
|
895
|
+
z && z.closest(".select-wrapper") || setTimeout(() => {
|
|
896
|
+
b();
|
|
839
897
|
}, 200);
|
|
840
898
|
}, H = ($) => {
|
|
841
|
-
$.key === "Escape" ?
|
|
899
|
+
$.key === "Escape" ? b() : ($.key === "Enter" || $.key === " ") && ($.preventDefault(), T());
|
|
842
900
|
};
|
|
843
|
-
return X(
|
|
844
|
-
$ && (
|
|
845
|
-
}), ($,
|
|
846
|
-
class:
|
|
901
|
+
return X(r, ($) => {
|
|
902
|
+
$ && (i.value = "");
|
|
903
|
+
}), ($, z) => (s(), o("div", {
|
|
904
|
+
class: x(["select-wrapper", { "w-full": t.fullWidth }])
|
|
847
905
|
}, [
|
|
848
906
|
t.label ? (s(), o("label", {
|
|
849
907
|
key: 0,
|
|
850
|
-
for:
|
|
851
|
-
class:
|
|
908
|
+
for: a.value,
|
|
909
|
+
class: x(y.value)
|
|
852
910
|
}, [
|
|
853
|
-
|
|
854
|
-
t.required ? (s(), o("span",
|
|
855
|
-
], 10,
|
|
856
|
-
l("div",
|
|
911
|
+
P(w(t.label) + " ", 1),
|
|
912
|
+
t.required ? (s(), o("span", et, "*")) : h("", !0)
|
|
913
|
+
], 10, Ye)) : h("", !0),
|
|
914
|
+
l("div", tt, [
|
|
857
915
|
l("button", {
|
|
858
|
-
id:
|
|
916
|
+
id: a.value,
|
|
859
917
|
type: "button",
|
|
860
|
-
class:
|
|
918
|
+
class: x(f.value),
|
|
861
919
|
disabled: t.disabled,
|
|
862
|
-
"aria-expanded":
|
|
920
|
+
"aria-expanded": r.value,
|
|
863
921
|
"aria-haspopup": !0,
|
|
864
|
-
onClick:
|
|
865
|
-
onBlur:
|
|
922
|
+
onClick: T,
|
|
923
|
+
onBlur: L,
|
|
866
924
|
onKeydown: H
|
|
867
925
|
}, [
|
|
868
|
-
l("span",
|
|
926
|
+
l("span", ot, w(g.value ? g.value.label : t.placeholder), 1),
|
|
869
927
|
(s(), o("svg", {
|
|
870
|
-
class:
|
|
928
|
+
class: x(["w-5 h-5 flex-shrink-0 transition-transform text-secondary-600", r.value ? "rotate-180" : ""]),
|
|
871
929
|
fill: "none",
|
|
872
930
|
stroke: "currentColor",
|
|
873
931
|
viewBox: "0 0 24 24",
|
|
874
932
|
xmlns: "http://www.w3.org/2000/svg"
|
|
875
|
-
}, [...
|
|
933
|
+
}, [...z[3] || (z[3] = [
|
|
876
934
|
l("path", {
|
|
877
935
|
"stroke-linecap": "round",
|
|
878
936
|
"stroke-linejoin": "round",
|
|
@@ -880,78 +938,78 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
880
938
|
d: "M19 9l-7 7-7-7"
|
|
881
939
|
}, null, -1)
|
|
882
940
|
])], 2))
|
|
883
|
-
], 42,
|
|
884
|
-
|
|
941
|
+
], 42, st),
|
|
942
|
+
r.value ? (s(), o("div", {
|
|
885
943
|
key: 0,
|
|
886
|
-
class:
|
|
887
|
-
onClick:
|
|
944
|
+
class: x(_.value),
|
|
945
|
+
onClick: z[2] || (z[2] = F(() => {
|
|
888
946
|
}, ["stop"]))
|
|
889
947
|
}, [
|
|
890
|
-
t.searchable ? (s(), o("div",
|
|
891
|
-
|
|
948
|
+
t.searchable ? (s(), o("div", lt, [
|
|
949
|
+
oe(l("input", {
|
|
892
950
|
ref_key: "searchInput",
|
|
893
|
-
ref:
|
|
894
|
-
"onUpdate:modelValue":
|
|
951
|
+
ref: p,
|
|
952
|
+
"onUpdate:modelValue": z[0] || (z[0] = (n) => i.value = n),
|
|
895
953
|
type: "text",
|
|
896
954
|
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",
|
|
897
955
|
placeholder: t.searchPlaceholder,
|
|
898
|
-
onKeydown:
|
|
956
|
+
onKeydown: z[1] || (z[1] = F(() => {
|
|
899
957
|
}, ["stop"]))
|
|
900
|
-
}, null, 40,
|
|
901
|
-
[
|
|
958
|
+
}, null, 40, at), [
|
|
959
|
+
[le, i.value]
|
|
902
960
|
])
|
|
903
|
-
])) :
|
|
904
|
-
l("div",
|
|
905
|
-
|
|
906
|
-
(s(!0), o(A, null, W(
|
|
907
|
-
key:
|
|
961
|
+
])) : h("", !0),
|
|
962
|
+
l("div", nt, [
|
|
963
|
+
v.value.length === 0 ? (s(), o("div", rt, w(t.emptyText), 1)) : (s(), o(A, { key: 1 }, [
|
|
964
|
+
(s(!0), o(A, null, W(v.value, (n) => (s(), o("button", {
|
|
965
|
+
key: n.value,
|
|
908
966
|
type: "button",
|
|
909
|
-
class:
|
|
910
|
-
onClick: (
|
|
967
|
+
class: x(C(n)),
|
|
968
|
+
onClick: (M) => k(n)
|
|
911
969
|
}, [
|
|
912
|
-
l("div",
|
|
913
|
-
l("span",
|
|
914
|
-
V(
|
|
970
|
+
l("div", dt, [
|
|
971
|
+
l("span", ut, w(n.label), 1),
|
|
972
|
+
V(n) ? (s(), o("svg", ct, [...z[4] || (z[4] = [
|
|
915
973
|
l("path", {
|
|
916
974
|
"stroke-linecap": "round",
|
|
917
975
|
"stroke-linejoin": "round",
|
|
918
976
|
"stroke-width": "2",
|
|
919
977
|
d: "M5 13l4 4L19 7"
|
|
920
978
|
}, null, -1)
|
|
921
|
-
])])) :
|
|
979
|
+
])])) : h("", !0)
|
|
922
980
|
])
|
|
923
|
-
], 10,
|
|
924
|
-
t.actionItems.length > 0 ? (s(), o("div",
|
|
925
|
-
(s(!0), o(A, null, W(t.actionItems, (
|
|
926
|
-
key:
|
|
981
|
+
], 10, it))), 128)),
|
|
982
|
+
t.actionItems.length > 0 ? (s(), o("div", ft)) : h("", !0),
|
|
983
|
+
(s(!0), o(A, null, W(t.actionItems, (n) => (s(), o("button", {
|
|
984
|
+
key: n.id,
|
|
927
985
|
type: "button",
|
|
928
|
-
class:
|
|
929
|
-
onClick: (
|
|
986
|
+
class: x(I(n)),
|
|
987
|
+
onClick: (M) => j(n)
|
|
930
988
|
}, [
|
|
931
|
-
|
|
989
|
+
n.icon ? (s(), o("svg", {
|
|
932
990
|
key: 0,
|
|
933
991
|
class: "w-4 h-4 flex-shrink-0",
|
|
934
992
|
fill: "none",
|
|
935
993
|
stroke: "currentColor",
|
|
936
994
|
viewBox: "0 0 24 24",
|
|
937
995
|
xmlns: "http://www.w3.org/2000/svg",
|
|
938
|
-
innerHTML:
|
|
939
|
-
}, null, 8,
|
|
940
|
-
|
|
941
|
-
], 10,
|
|
996
|
+
innerHTML: n.icon
|
|
997
|
+
}, null, 8, vt)) : h("", !0),
|
|
998
|
+
P(" " + w(n.label), 1)
|
|
999
|
+
], 10, pt))), 128))
|
|
942
1000
|
], 64))
|
|
943
1001
|
])
|
|
944
|
-
], 2)) :
|
|
1002
|
+
], 2)) : h("", !0)
|
|
945
1003
|
]),
|
|
946
|
-
t.error ? (s(), o("p",
|
|
947
|
-
|
|
1004
|
+
t.error ? (s(), o("p", gt, w(t.error), 1)) : t.helperText ? (s(), o("p", xt, w(t.helperText), 1)) : h("", !0),
|
|
1005
|
+
r.value ? (s(), o("div", {
|
|
948
1006
|
key: 3,
|
|
949
|
-
onClick:
|
|
1007
|
+
onClick: b,
|
|
950
1008
|
class: "fixed inset-0 z-40"
|
|
951
|
-
})) :
|
|
1009
|
+
})) : h("", !0)
|
|
952
1010
|
], 2));
|
|
953
1011
|
}
|
|
954
|
-
}),
|
|
1012
|
+
}), ps = /* @__PURE__ */ N(ht, [["__scopeId", "data-v-f016a03c"]]), bt = /* @__PURE__ */ O({
|
|
955
1013
|
__name: "Sidebar",
|
|
956
1014
|
props: {
|
|
957
1015
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -966,58 +1024,58 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
966
1024
|
padding: { default: "md" }
|
|
967
1025
|
},
|
|
968
1026
|
emits: ["update:modelValue", "close", "open"],
|
|
969
|
-
setup(t, { emit:
|
|
970
|
-
const e = t,
|
|
1027
|
+
setup(t, { emit: u }) {
|
|
1028
|
+
const e = t, d = u, r = c({
|
|
971
1029
|
get: () => e.modelValue,
|
|
972
|
-
set: (C) =>
|
|
973
|
-
}),
|
|
974
|
-
e.persistent || (
|
|
975
|
-
},
|
|
976
|
-
const C = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none",
|
|
977
|
-
return [C,
|
|
978
|
-
}), g =
|
|
1030
|
+
set: (C) => d("update:modelValue", C)
|
|
1031
|
+
}), i = () => {
|
|
1032
|
+
e.persistent || (r.value = !1, d("close"));
|
|
1033
|
+
}, p = c(() => e.position === "left" ? "slide-right" : "slide-left"), a = c(() => {
|
|
1034
|
+
const C = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none", I = e.position === "left" ? "left-0" : "right-0", V = 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)]" : "";
|
|
1035
|
+
return [C, I, V].filter(Boolean).join(" ");
|
|
1036
|
+
}), g = c(() => ({
|
|
979
1037
|
// Base fluid width; respect custom width as max constraint
|
|
980
1038
|
width: "100%",
|
|
981
1039
|
maxWidth: e.width,
|
|
982
1040
|
backgroundColor: e.backgroundColor,
|
|
983
1041
|
top: e.overlayTop,
|
|
984
1042
|
height: e.overlayTop !== "0" ? `calc(100vh - ${e.overlayTop})` : "100vh"
|
|
985
|
-
})),
|
|
1043
|
+
})), v = {
|
|
986
1044
|
none: "",
|
|
987
1045
|
sm: "p-2",
|
|
988
1046
|
md: "p-4",
|
|
989
1047
|
lg: "p-6"
|
|
990
|
-
}, y =
|
|
991
|
-
return (C,
|
|
1048
|
+
}, y = c(() => `flex items-center justify-between border-b border-gray-200 ${v[e.padding]}`), f = c(() => `flex-1 overflow-y-auto ${v[e.padding]}`), _ = c(() => `border-t border-gray-200 ${v[e.padding]}`);
|
|
1049
|
+
return (C, I) => (s(), q(J, { to: "body" }, [
|
|
992
1050
|
G(Q, { name: "fade" }, {
|
|
993
1051
|
default: U(() => [
|
|
994
|
-
|
|
1052
|
+
r.value && t.overlay ? (s(), o("div", {
|
|
995
1053
|
key: 0,
|
|
996
|
-
onClick:
|
|
1054
|
+
onClick: i,
|
|
997
1055
|
class: "fixed inset-0 bg-black/50 z-40",
|
|
998
1056
|
style: R({ top: t.overlayTop })
|
|
999
|
-
}, null, 4)) :
|
|
1057
|
+
}, null, 4)) : h("", !0)
|
|
1000
1058
|
]),
|
|
1001
1059
|
_: 1
|
|
1002
1060
|
}),
|
|
1003
|
-
G(Q, { name:
|
|
1061
|
+
G(Q, { name: p.value }, {
|
|
1004
1062
|
default: U(() => [
|
|
1005
|
-
|
|
1063
|
+
r.value ? (s(), o("aside", {
|
|
1006
1064
|
key: 0,
|
|
1007
|
-
class:
|
|
1065
|
+
class: x(a.value),
|
|
1008
1066
|
style: R(g.value)
|
|
1009
1067
|
}, [
|
|
1010
1068
|
C.$slots.header ? (s(), o("div", {
|
|
1011
1069
|
key: 0,
|
|
1012
|
-
class:
|
|
1070
|
+
class: x(y.value)
|
|
1013
1071
|
}, [
|
|
1014
1072
|
B(C.$slots, "header", {}, void 0, !0),
|
|
1015
1073
|
t.closable ? (s(), o("button", {
|
|
1016
1074
|
key: 0,
|
|
1017
|
-
onClick:
|
|
1075
|
+
onClick: i,
|
|
1018
1076
|
class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
|
|
1019
1077
|
"aria-label": "Cerrar menú"
|
|
1020
|
-
}, [...
|
|
1078
|
+
}, [...I[0] || (I[0] = [
|
|
1021
1079
|
l("svg", {
|
|
1022
1080
|
class: "w-5 h-5",
|
|
1023
1081
|
fill: "none",
|
|
@@ -1031,38 +1089,38 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1031
1089
|
d: "M6 18L18 6M6 6l12 12"
|
|
1032
1090
|
})
|
|
1033
1091
|
], -1)
|
|
1034
|
-
])])) :
|
|
1035
|
-
], 2)) :
|
|
1092
|
+
])])) : h("", !0)
|
|
1093
|
+
], 2)) : h("", !0),
|
|
1036
1094
|
l("div", {
|
|
1037
|
-
class:
|
|
1095
|
+
class: x(f.value)
|
|
1038
1096
|
}, [
|
|
1039
1097
|
B(C.$slots, "default", {}, void 0, !0)
|
|
1040
1098
|
], 2),
|
|
1041
1099
|
C.$slots.footer ? (s(), o("div", {
|
|
1042
1100
|
key: 1,
|
|
1043
|
-
class:
|
|
1101
|
+
class: x(_.value)
|
|
1044
1102
|
}, [
|
|
1045
1103
|
B(C.$slots, "footer", {}, void 0, !0)
|
|
1046
|
-
], 2)) :
|
|
1047
|
-
], 6)) :
|
|
1104
|
+
], 2)) : h("", !0)
|
|
1105
|
+
], 6)) : h("", !0)
|
|
1048
1106
|
]),
|
|
1049
1107
|
_: 3
|
|
1050
1108
|
}, 8, ["name"])
|
|
1051
1109
|
]));
|
|
1052
1110
|
}
|
|
1053
|
-
}),
|
|
1111
|
+
}), vs = /* @__PURE__ */ N(bt, [["__scopeId", "data-v-b208234c"]]), yt = { class: "w-full space-y-4" }, mt = { class: "flex flex-col gap-3 md:hidden" }, wt = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, kt = { class: "text-sm text-gray-700" }, $t = {
|
|
1054
1112
|
key: 0,
|
|
1055
1113
|
class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
|
|
1056
|
-
},
|
|
1114
|
+
}, Ct = { class: "hidden md:block w-full overflow-x-auto" }, Bt = { class: "w-full border-collapse" }, zt = { class: "w-full" }, Mt = ["onClick"], _t = { class: "flex items-center gap-2" }, Tt = {
|
|
1057
1115
|
key: 0,
|
|
1058
1116
|
class: "text-xs text-gray-400"
|
|
1059
|
-
},
|
|
1117
|
+
}, jt = { key: 0 }, Vt = { key: 1 }, It = { class: "w-full" }, St = {
|
|
1060
1118
|
key: 0,
|
|
1061
1119
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
1062
|
-
},
|
|
1120
|
+
}, Lt = {
|
|
1063
1121
|
key: 0,
|
|
1064
1122
|
class: "w-full px-6 py-4 bg-white"
|
|
1065
|
-
},
|
|
1123
|
+
}, Ot = /* @__PURE__ */ O({
|
|
1066
1124
|
__name: "Table",
|
|
1067
1125
|
props: {
|
|
1068
1126
|
columns: {},
|
|
@@ -1073,147 +1131,147 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1073
1131
|
rowClass: { default: void 0 }
|
|
1074
1132
|
},
|
|
1075
1133
|
setup(t) {
|
|
1076
|
-
const
|
|
1077
|
-
e.value ===
|
|
1078
|
-
},
|
|
1134
|
+
const u = t, e = E(null), d = E("asc"), r = (a) => {
|
|
1135
|
+
e.value === a ? d.value = d.value === "asc" ? "desc" : "asc" : (e.value = a, d.value = "asc");
|
|
1136
|
+
}, i = c(() => {
|
|
1079
1137
|
if (!e.value)
|
|
1080
|
-
return
|
|
1081
|
-
const
|
|
1082
|
-
return
|
|
1083
|
-
const y = g[e.value],
|
|
1084
|
-
return typeof y == "string" && typeof
|
|
1085
|
-
}),
|
|
1086
|
-
}),
|
|
1087
|
-
return (
|
|
1088
|
-
l("div",
|
|
1089
|
-
(s(!0), o(A, null, W(
|
|
1138
|
+
return u.data;
|
|
1139
|
+
const a = [...u.data];
|
|
1140
|
+
return a.sort((g, v) => {
|
|
1141
|
+
const y = g[e.value], f = v[e.value];
|
|
1142
|
+
return typeof y == "string" && typeof f == "string" ? d.value === "asc" ? y.localeCompare(f) : f.localeCompare(y) : typeof y == "number" && typeof f == "number" ? d.value === "asc" ? y - f : f - y : 0;
|
|
1143
|
+
}), a;
|
|
1144
|
+
}), p = c(() => u.columns.filter((a) => !a.hideOnMobile));
|
|
1145
|
+
return (a, g) => (s(), o("div", yt, [
|
|
1146
|
+
l("div", mt, [
|
|
1147
|
+
(s(!0), o(A, null, W(i.value, (v, y) => (s(), o("div", {
|
|
1090
1148
|
key: `card-${y}`,
|
|
1091
1149
|
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
1092
1150
|
}, [
|
|
1093
|
-
(s(!0), o(A, null, W(
|
|
1094
|
-
key: `card-${y}-${
|
|
1151
|
+
(s(!0), o(A, null, W(p.value, (f) => (s(), o("div", {
|
|
1152
|
+
key: `card-${y}-${f.key}`,
|
|
1095
1153
|
class: "flex flex-col gap-1 py-1"
|
|
1096
1154
|
}, [
|
|
1097
|
-
l("span",
|
|
1098
|
-
l("span",
|
|
1099
|
-
B(
|
|
1100
|
-
value:
|
|
1101
|
-
row:
|
|
1155
|
+
l("span", wt, w(f.label), 1),
|
|
1156
|
+
l("span", kt, [
|
|
1157
|
+
B(a.$slots, `cell-${f.key}`, {
|
|
1158
|
+
value: v[f.key],
|
|
1159
|
+
row: v
|
|
1102
1160
|
}, () => [
|
|
1103
|
-
|
|
1161
|
+
P(w(v[f.key]), 1)
|
|
1104
1162
|
], !0)
|
|
1105
1163
|
])
|
|
1106
1164
|
]))), 128))
|
|
1107
1165
|
]))), 128)),
|
|
1108
|
-
|
|
1109
|
-
B(
|
|
1110
|
-
g[0] || (g[0] =
|
|
1166
|
+
i.value.length === 0 ? (s(), o("div", $t, [
|
|
1167
|
+
B(a.$slots, "empty", {}, () => [
|
|
1168
|
+
g[0] || (g[0] = P("No hay datos disponibles", -1))
|
|
1111
1169
|
], !0)
|
|
1112
|
-
])) :
|
|
1170
|
+
])) : h("", !0)
|
|
1113
1171
|
]),
|
|
1114
|
-
l("div",
|
|
1115
|
-
l("table",
|
|
1116
|
-
l("thead",
|
|
1172
|
+
l("div", Ct, [
|
|
1173
|
+
l("table", Bt, [
|
|
1174
|
+
l("thead", zt, [
|
|
1117
1175
|
l("tr", {
|
|
1118
|
-
class:
|
|
1176
|
+
class: x([
|
|
1119
1177
|
"w-full",
|
|
1120
|
-
|
|
1178
|
+
u.headerClass || "bg-neutral-50 border-b border-gray-100"
|
|
1121
1179
|
])
|
|
1122
1180
|
}, [
|
|
1123
|
-
(s(!0), o(A, null, W(t.columns, (
|
|
1124
|
-
key:
|
|
1125
|
-
style: R(
|
|
1126
|
-
class:
|
|
1181
|
+
(s(!0), o(A, null, W(t.columns, (v) => (s(), o("th", {
|
|
1182
|
+
key: v.key,
|
|
1183
|
+
style: R(v.width ? { width: v.width } : {}),
|
|
1184
|
+
class: x([
|
|
1127
1185
|
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
1128
|
-
|
|
1129
|
-
|
|
1186
|
+
v.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
1187
|
+
u.headerCellClass
|
|
1130
1188
|
]),
|
|
1131
|
-
onClick: (y) =>
|
|
1189
|
+
onClick: (y) => v.sortable && r(v.key)
|
|
1132
1190
|
}, [
|
|
1133
|
-
l("div",
|
|
1134
|
-
l("span", null, w(
|
|
1135
|
-
|
|
1136
|
-
e.value !==
|
|
1137
|
-
])) :
|
|
1191
|
+
l("div", _t, [
|
|
1192
|
+
l("span", null, w(v.label), 1),
|
|
1193
|
+
v.sortable ? (s(), o("span", Tt, [
|
|
1194
|
+
e.value !== v.key ? (s(), o("span", jt, "⇅")) : (s(), o("span", Vt, w(d.value === "asc" ? "↑" : "↓"), 1))
|
|
1195
|
+
])) : h("", !0)
|
|
1138
1196
|
])
|
|
1139
|
-
], 14,
|
|
1197
|
+
], 14, Mt))), 128))
|
|
1140
1198
|
], 2)
|
|
1141
1199
|
]),
|
|
1142
|
-
l("tbody",
|
|
1143
|
-
(s(!0), o(A, null, W(
|
|
1200
|
+
l("tbody", It, [
|
|
1201
|
+
(s(!0), o(A, null, W(i.value, (v, y) => (s(), o("tr", {
|
|
1144
1202
|
key: y,
|
|
1145
|
-
class:
|
|
1203
|
+
class: x([
|
|
1146
1204
|
"w-full border-b border-gray-200 hover:bg-gray-50 transition-colors",
|
|
1147
|
-
|
|
1205
|
+
u.rowClass
|
|
1148
1206
|
])
|
|
1149
1207
|
}, [
|
|
1150
|
-
(s(!0), o(A, null, W(t.columns, (
|
|
1151
|
-
key: `${y}-${
|
|
1152
|
-
class:
|
|
1208
|
+
(s(!0), o(A, null, W(t.columns, (f) => (s(), o("td", {
|
|
1209
|
+
key: `${y}-${f.key}`,
|
|
1210
|
+
class: x([
|
|
1153
1211
|
"px-4 py-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
|
|
1154
|
-
|
|
1212
|
+
u.cellClass
|
|
1155
1213
|
])
|
|
1156
1214
|
}, [
|
|
1157
|
-
B(
|
|
1158
|
-
value:
|
|
1159
|
-
row:
|
|
1215
|
+
B(a.$slots, `cell-${f.key}`, {
|
|
1216
|
+
value: v[f.key],
|
|
1217
|
+
row: v
|
|
1160
1218
|
}, () => [
|
|
1161
|
-
|
|
1219
|
+
P(w(v[f.key]), 1)
|
|
1162
1220
|
], !0)
|
|
1163
1221
|
], 2))), 128))
|
|
1164
1222
|
], 2))), 128))
|
|
1165
1223
|
])
|
|
1166
1224
|
]),
|
|
1167
|
-
|
|
1168
|
-
B(
|
|
1169
|
-
g[1] || (g[1] =
|
|
1225
|
+
i.value.length === 0 ? (s(), o("div", St, [
|
|
1226
|
+
B(a.$slots, "empty", {}, () => [
|
|
1227
|
+
g[1] || (g[1] = P("No hay datos disponibles", -1))
|
|
1170
1228
|
], !0)
|
|
1171
|
-
])) :
|
|
1229
|
+
])) : h("", !0)
|
|
1172
1230
|
]),
|
|
1173
|
-
|
|
1174
|
-
B(
|
|
1175
|
-
])) :
|
|
1231
|
+
a.$slots.footer ? (s(), o("div", Lt, [
|
|
1232
|
+
B(a.$slots, "footer", {}, void 0, !0)
|
|
1233
|
+
])) : h("", !0)
|
|
1176
1234
|
]));
|
|
1177
1235
|
}
|
|
1178
|
-
}),
|
|
1236
|
+
}), gs = /* @__PURE__ */ N(Ot, [["__scopeId", "data-v-8e7ce66d"]]), Dt = { class: "w-full" }, At = {
|
|
1179
1237
|
class: "tabs-container flex flex-col sm:flex-row",
|
|
1180
1238
|
role: "tablist"
|
|
1181
|
-
},
|
|
1239
|
+
}, Pt = ["aria-selected", "onClick"], Et = { role: "tabpanel" }, Ht = "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base font-semibold tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500 border-b-2", Wt = "text-primary-600 border-primary-600", Nt = "hover:text-secondary-700 border-gray-100", Ft = /* @__PURE__ */ O({
|
|
1182
1240
|
__name: "Tabs",
|
|
1183
1241
|
props: {
|
|
1184
1242
|
modelValue: {},
|
|
1185
1243
|
tabs: {}
|
|
1186
1244
|
},
|
|
1187
1245
|
emits: ["update:modelValue"],
|
|
1188
|
-
setup(t, { emit:
|
|
1189
|
-
const e = t,
|
|
1190
|
-
|
|
1191
|
-
},
|
|
1192
|
-
() => e.tabs.find((g) => g.value ===
|
|
1246
|
+
setup(t, { emit: u }) {
|
|
1247
|
+
const e = t, d = u, r = (g) => e.modelValue === g, i = (g) => {
|
|
1248
|
+
r(g) || d("update:modelValue", g);
|
|
1249
|
+
}, p = c(() => e.modelValue), a = c(
|
|
1250
|
+
() => e.tabs.find((g) => g.value === p.value)
|
|
1193
1251
|
);
|
|
1194
|
-
return (g,
|
|
1195
|
-
l("div",
|
|
1252
|
+
return (g, v) => (s(), o("div", Dt, [
|
|
1253
|
+
l("div", At, [
|
|
1196
1254
|
(s(!0), o(A, null, W(t.tabs, (y) => (s(), o("button", {
|
|
1197
1255
|
key: y.value,
|
|
1198
1256
|
type: "button",
|
|
1199
|
-
class:
|
|
1200
|
-
|
|
1201
|
-
|
|
1257
|
+
class: x([
|
|
1258
|
+
Ht,
|
|
1259
|
+
r(y.value) ? Wt : Nt
|
|
1202
1260
|
]),
|
|
1203
|
-
"aria-selected":
|
|
1261
|
+
"aria-selected": r(y.value),
|
|
1204
1262
|
role: "tab",
|
|
1205
|
-
onClick: (
|
|
1206
|
-
}, w(y.label), 11,
|
|
1263
|
+
onClick: (f) => i(y.value)
|
|
1264
|
+
}, w(y.label), 11, Pt))), 128))
|
|
1207
1265
|
]),
|
|
1208
|
-
l("div",
|
|
1209
|
-
B(g.$slots,
|
|
1210
|
-
active:
|
|
1211
|
-
tab:
|
|
1266
|
+
l("div", Et, [
|
|
1267
|
+
B(g.$slots, p.value, {
|
|
1268
|
+
active: p.value,
|
|
1269
|
+
tab: a.value
|
|
1212
1270
|
}, void 0, !0)
|
|
1213
1271
|
])
|
|
1214
1272
|
]));
|
|
1215
1273
|
}
|
|
1216
|
-
}),
|
|
1274
|
+
}), xs = /* @__PURE__ */ N(Ft, [["__scopeId", "data-v-b5a754bd"]]), Rt = "font-sans", hs = /* @__PURE__ */ O({
|
|
1217
1275
|
__name: "Text",
|
|
1218
1276
|
props: {
|
|
1219
1277
|
variant: { default: "body1" },
|
|
@@ -1225,7 +1283,7 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1225
1283
|
weight: {}
|
|
1226
1284
|
},
|
|
1227
1285
|
setup(t) {
|
|
1228
|
-
const
|
|
1286
|
+
const u = {
|
|
1229
1287
|
h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
|
|
1230
1288
|
h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
|
|
1231
1289
|
h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
|
|
@@ -1265,12 +1323,12 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1265
1323
|
button3: "span",
|
|
1266
1324
|
caption: "span",
|
|
1267
1325
|
overline: "span"
|
|
1268
|
-
},
|
|
1326
|
+
}, d = {
|
|
1269
1327
|
left: "text-left",
|
|
1270
1328
|
center: "text-center",
|
|
1271
1329
|
right: "text-right",
|
|
1272
1330
|
justify: "text-justify"
|
|
1273
|
-
},
|
|
1331
|
+
}, r = {
|
|
1274
1332
|
default: "text-secondary-900",
|
|
1275
1333
|
muted: "text-secondary-600",
|
|
1276
1334
|
primary: "text-primary-600",
|
|
@@ -1278,23 +1336,23 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1278
1336
|
danger: "text-danger-600",
|
|
1279
1337
|
success: "text-success-600",
|
|
1280
1338
|
warning: "text-warning-600"
|
|
1281
|
-
},
|
|
1339
|
+
}, i = {
|
|
1282
1340
|
light: "font-light",
|
|
1283
1341
|
normal: "font-normal",
|
|
1284
1342
|
medium: "font-medium",
|
|
1285
1343
|
semibold: "font-semibold",
|
|
1286
1344
|
bold: "font-bold",
|
|
1287
1345
|
extrabold: "font-extrabold"
|
|
1288
|
-
},
|
|
1346
|
+
}, p = t, a = c(() => p.variant), g = c(() => p.color), v = c(() => p.align), y = c(() => p.as || e[a.value] || "span"), f = c(() => p.weight ? i[p.weight] : "");
|
|
1289
1347
|
return (_, C) => (s(), q(Y(y.value), {
|
|
1290
|
-
class:
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1348
|
+
class: x([
|
|
1349
|
+
Rt,
|
|
1350
|
+
u[a.value],
|
|
1351
|
+
r[g.value],
|
|
1352
|
+
d[v.value],
|
|
1353
|
+
f.value,
|
|
1296
1354
|
{
|
|
1297
|
-
uppercase: t.uppercase ||
|
|
1355
|
+
uppercase: t.uppercase || a.value === "overline",
|
|
1298
1356
|
truncate: t.truncate
|
|
1299
1357
|
}
|
|
1300
1358
|
])
|
|
@@ -1305,17 +1363,17 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1305
1363
|
_: 3
|
|
1306
1364
|
}, 8, ["class"]));
|
|
1307
1365
|
}
|
|
1308
|
-
}),
|
|
1366
|
+
}), Kt = { class: "w-full flex items-center justify-between gap-3 py-2" }, qt = {
|
|
1309
1367
|
key: 0,
|
|
1310
1368
|
class: "text-xs text-secondary-600"
|
|
1311
|
-
},
|
|
1369
|
+
}, Ut = { key: 0 }, Gt = {
|
|
1312
1370
|
class: "ml-auto inline-flex items-center gap-1",
|
|
1313
1371
|
role: "navigation",
|
|
1314
1372
|
"aria-label": "Pagination"
|
|
1315
|
-
},
|
|
1373
|
+
}, Qt = ["disabled"], Zt = {
|
|
1316
1374
|
key: 0,
|
|
1317
1375
|
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text-secondary-500"
|
|
1318
|
-
},
|
|
1376
|
+
}, Jt = ["aria-label", "onClick"], Xt = ["disabled"], Yt = /* @__PURE__ */ O({
|
|
1319
1377
|
__name: "Pagination",
|
|
1320
1378
|
props: {
|
|
1321
1379
|
modelValue: { default: 1 },
|
|
@@ -1328,77 +1386,77 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1328
1386
|
itemLabel: { default: "" }
|
|
1329
1387
|
},
|
|
1330
1388
|
emits: ["update:modelValue", "change"],
|
|
1331
|
-
setup(t, { emit:
|
|
1332
|
-
const e = t,
|
|
1333
|
-
const
|
|
1334
|
-
return
|
|
1335
|
-
}),
|
|
1336
|
-
const
|
|
1337
|
-
return
|
|
1338
|
-
}),
|
|
1339
|
-
const
|
|
1340
|
-
if (
|
|
1341
|
-
return Array.from({ length:
|
|
1342
|
-
const
|
|
1343
|
-
let V = Math.max(1, C -
|
|
1344
|
-
V = Math.max(1, Math.min(V,
|
|
1345
|
-
const
|
|
1346
|
-
V > 1 && (
|
|
1347
|
-
for (let k = V; k <=
|
|
1348
|
-
|
|
1349
|
-
return
|
|
1389
|
+
setup(t, { emit: u }) {
|
|
1390
|
+
const e = t, d = u, r = c(() => {
|
|
1391
|
+
const f = Math.ceil(e.totalItems / e.pageSize);
|
|
1392
|
+
return f > 0 ? f : 1;
|
|
1393
|
+
}), i = c(() => {
|
|
1394
|
+
const f = Number(e.modelValue || 1);
|
|
1395
|
+
return f < 1 ? 1 : f > r.value ? r.value : f;
|
|
1396
|
+
}), p = c(() => e.totalItems === 0 ? 0 : (i.value - 1) * e.pageSize + 1), a = c(() => Math.min(i.value * e.pageSize, e.totalItems)), g = c(() => `Mostrando ${p.value} a ${a.value} de ${e.totalItems}`), v = c(() => {
|
|
1397
|
+
const f = r.value, _ = Math.max(3, e.maxPages), C = i.value;
|
|
1398
|
+
if (f <= _)
|
|
1399
|
+
return Array.from({ length: f }, (k, j) => j + 1);
|
|
1400
|
+
const I = Math.floor(_ / 2);
|
|
1401
|
+
let V = Math.max(1, C - I), T = Math.min(f, V + _ - 1);
|
|
1402
|
+
V = Math.max(1, Math.min(V, T - _ + 1));
|
|
1403
|
+
const b = [];
|
|
1404
|
+
V > 1 && (b.push(1), V > 2 && b.push("…"));
|
|
1405
|
+
for (let k = V; k <= T; k++)
|
|
1406
|
+
b.push(k);
|
|
1407
|
+
return T < f && (T < f - 1 && b.push("…"), b.push(f)), b;
|
|
1350
1408
|
});
|
|
1351
|
-
function y(
|
|
1352
|
-
const _ = Math.max(1, Math.min(
|
|
1353
|
-
_ !==
|
|
1409
|
+
function y(f) {
|
|
1410
|
+
const _ = Math.max(1, Math.min(f, r.value));
|
|
1411
|
+
_ !== i.value && (d("update:modelValue", _), d("change", _));
|
|
1354
1412
|
}
|
|
1355
|
-
return (
|
|
1356
|
-
t.showSummary ? (s(), o("div",
|
|
1357
|
-
B(
|
|
1358
|
-
start:
|
|
1359
|
-
end:
|
|
1413
|
+
return (f, _) => (s(), o("div", Kt, [
|
|
1414
|
+
t.showSummary ? (s(), o("div", qt, [
|
|
1415
|
+
B(f.$slots, "summary", {
|
|
1416
|
+
start: p.value,
|
|
1417
|
+
end: a.value,
|
|
1360
1418
|
total: t.totalItems
|
|
1361
1419
|
}, () => [
|
|
1362
|
-
|
|
1363
|
-
t.itemLabel ? (s(), o("span",
|
|
1420
|
+
P(w(g.value), 1),
|
|
1421
|
+
t.itemLabel ? (s(), o("span", Ut, w(t.itemLabel), 1)) : h("", !0)
|
|
1364
1422
|
], !0)
|
|
1365
|
-
])) :
|
|
1366
|
-
l("nav",
|
|
1423
|
+
])) : h("", !0),
|
|
1424
|
+
l("nav", Gt, [
|
|
1367
1425
|
l("button", {
|
|
1368
1426
|
type: "button",
|
|
1369
1427
|
class: "h-8 px-3 rounded-full text-sm font-semibold text-secondary-700 hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1370
|
-
disabled:
|
|
1371
|
-
onClick: _[0] || (_[0] = (C) => y(
|
|
1428
|
+
disabled: i.value <= 1,
|
|
1429
|
+
onClick: _[0] || (_[0] = (C) => y(i.value - 1)),
|
|
1372
1430
|
"aria-label": "Anterior"
|
|
1373
|
-
}, w(t.previousText), 9,
|
|
1374
|
-
(s(!0), o(A, null, W(
|
|
1375
|
-
key: `page-${
|
|
1431
|
+
}, w(t.previousText), 9, Qt),
|
|
1432
|
+
(s(!0), o(A, null, W(v.value, (C, I) => (s(), o(A, {
|
|
1433
|
+
key: `page-${I}-${C}`
|
|
1376
1434
|
}, [
|
|
1377
|
-
C === "…" ? (s(), o("span",
|
|
1435
|
+
C === "…" ? (s(), o("span", Zt, " … ")) : (s(), o("button", {
|
|
1378
1436
|
key: 1,
|
|
1379
1437
|
type: "button",
|
|
1380
1438
|
"aria-label": `Página ${C}`,
|
|
1381
|
-
class:
|
|
1439
|
+
class: x([
|
|
1382
1440
|
"h-8 min-w-8 px-3 rounded-full text-sm font-semibold transition-colors",
|
|
1383
|
-
C ===
|
|
1441
|
+
C === i.value ? "bg-primary-500 text-white" : "text-secondary-700 hover:bg-secondary-100"
|
|
1384
1442
|
]),
|
|
1385
1443
|
onClick: (V) => y(C)
|
|
1386
|
-
}, w(C), 11,
|
|
1444
|
+
}, w(C), 11, Jt))
|
|
1387
1445
|
], 64))), 128)),
|
|
1388
1446
|
l("button", {
|
|
1389
1447
|
type: "button",
|
|
1390
1448
|
class: "h-8 px-3 rounded-full text-sm font-semibold text-secondary-700 hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1391
|
-
disabled:
|
|
1392
|
-
onClick: _[1] || (_[1] = (C) => y(
|
|
1449
|
+
disabled: i.value >= r.value,
|
|
1450
|
+
onClick: _[1] || (_[1] = (C) => y(i.value + 1)),
|
|
1393
1451
|
"aria-label": "Siguiente"
|
|
1394
|
-
}, w(t.nextText), 9,
|
|
1452
|
+
}, w(t.nextText), 9, Xt)
|
|
1395
1453
|
])
|
|
1396
1454
|
]));
|
|
1397
1455
|
}
|
|
1398
|
-
}),
|
|
1456
|
+
}), bs = /* @__PURE__ */ N(Yt, [["__scopeId", "data-v-87417cc4"]]), es = ["data-node-id"], ts = { class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center" }, ss = {
|
|
1399
1457
|
key: 1,
|
|
1400
1458
|
class: "flex justify-end gap-1 px-6 pb-6 pt-4"
|
|
1401
|
-
},
|
|
1459
|
+
}, ys = /* @__PURE__ */ O({
|
|
1402
1460
|
__name: "Alert",
|
|
1403
1461
|
props: {
|
|
1404
1462
|
variant: {},
|
|
@@ -1411,10 +1469,10 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1411
1469
|
stackOn: {}
|
|
1412
1470
|
},
|
|
1413
1471
|
emits: ["close", "accept", "cancel"],
|
|
1414
|
-
setup(t, { emit:
|
|
1415
|
-
const e =
|
|
1416
|
-
if (
|
|
1417
|
-
switch (
|
|
1472
|
+
setup(t, { emit: u }) {
|
|
1473
|
+
const e = u, d = t, r = c(() => d.variant ?? "info"), i = c(() => d.multiline ?? !1), p = c(() => d.actions ?? !1), a = c(() => d.nodeId ?? void 0), g = () => e("close"), v = c(() => {
|
|
1474
|
+
if (d.title) return d.title;
|
|
1475
|
+
switch (r.value) {
|
|
1418
1476
|
case "info":
|
|
1419
1477
|
return "Alerta de información";
|
|
1420
1478
|
case "warning":
|
|
@@ -1424,8 +1482,8 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1424
1482
|
case "error":
|
|
1425
1483
|
return "Alerta de error";
|
|
1426
1484
|
}
|
|
1427
|
-
}), y =
|
|
1428
|
-
switch (
|
|
1485
|
+
}), y = c(() => d.description ?? ""), f = c(() => {
|
|
1486
|
+
switch (r.value) {
|
|
1429
1487
|
case "info":
|
|
1430
1488
|
return {
|
|
1431
1489
|
border: "border-[var(--semantica/info,#0064ff)]",
|
|
@@ -1451,23 +1509,23 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1451
1509
|
icon: "text-[#ff4235]"
|
|
1452
1510
|
};
|
|
1453
1511
|
}
|
|
1454
|
-
}), _ =
|
|
1455
|
-
const
|
|
1456
|
-
if (!
|
|
1457
|
-
const
|
|
1458
|
-
return `${
|
|
1459
|
-
}),
|
|
1460
|
-
if (!
|
|
1461
|
-
const
|
|
1462
|
-
return `flex-col ${
|
|
1463
|
-
}), V =
|
|
1464
|
-
return (
|
|
1465
|
-
class:
|
|
1466
|
-
|
|
1467
|
-
|
|
1512
|
+
}), _ = c(() => "bg-[var(--color-primario/700,#269ea4)]"), C = c(() => {
|
|
1513
|
+
const T = "flex w-full items-start gap-4 flex-col";
|
|
1514
|
+
if (!d.stackOn) return `${T} sm:flex-row sm:items-center`;
|
|
1515
|
+
const b = d.stackOn, k = `${b}:flex-row ${b}:items-center`;
|
|
1516
|
+
return `${T} ${k}`;
|
|
1517
|
+
}), I = c(() => {
|
|
1518
|
+
if (!d.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
|
|
1519
|
+
const T = d.stackOn;
|
|
1520
|
+
return `flex-col ${T}:flex-row items-start ${T}:items-center`;
|
|
1521
|
+
}), V = c(() => d.stackOn ? `self-start ${d.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
1522
|
+
return (T, b) => (s(), o("div", {
|
|
1523
|
+
class: x(["relative w-full rounded-xl border", [
|
|
1524
|
+
f.value.border,
|
|
1525
|
+
f.value.bg
|
|
1468
1526
|
]]),
|
|
1469
1527
|
role: "alert",
|
|
1470
|
-
"data-node-id":
|
|
1528
|
+
"data-node-id": a.value
|
|
1471
1529
|
}, [
|
|
1472
1530
|
t.closable ? (s(), o("button", {
|
|
1473
1531
|
key: 0,
|
|
@@ -1475,7 +1533,7 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1475
1533
|
class: "absolute top-3 right-3 text-[color:var(--neutrales/texto-principal,#565656)]/70 hover:opacity-100 opacity-70",
|
|
1476
1534
|
"aria-label": "Cerrar",
|
|
1477
1535
|
onClick: g
|
|
1478
|
-
}, [...
|
|
1536
|
+
}, [...b[2] || (b[2] = [
|
|
1479
1537
|
l("svg", {
|
|
1480
1538
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1481
1539
|
width: "18",
|
|
@@ -1500,27 +1558,27 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1500
1558
|
y2: "18"
|
|
1501
1559
|
})
|
|
1502
1560
|
], -1)
|
|
1503
|
-
])])) :
|
|
1561
|
+
])])) : h("", !0),
|
|
1504
1562
|
l("div", {
|
|
1505
|
-
class:
|
|
1563
|
+
class: x(["p-6", { "pb-0": p.value }])
|
|
1506
1564
|
}, [
|
|
1507
1565
|
l("div", {
|
|
1508
|
-
class:
|
|
1566
|
+
class: x(C.value)
|
|
1509
1567
|
}, [
|
|
1510
|
-
l("div",
|
|
1511
|
-
|
|
1568
|
+
l("div", ts, [
|
|
1569
|
+
r.value === "info" ? (s(), o("svg", {
|
|
1512
1570
|
key: 0,
|
|
1513
1571
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1514
1572
|
width: "24",
|
|
1515
1573
|
height: "24",
|
|
1516
1574
|
viewBox: "0 0 24 24",
|
|
1517
1575
|
fill: "none",
|
|
1518
|
-
class:
|
|
1576
|
+
class: x(f.value.icon),
|
|
1519
1577
|
stroke: "currentColor",
|
|
1520
1578
|
"stroke-width": "2",
|
|
1521
1579
|
"stroke-linecap": "round",
|
|
1522
1580
|
"stroke-linejoin": "round"
|
|
1523
|
-
}, [...
|
|
1581
|
+
}, [...b[3] || (b[3] = [
|
|
1524
1582
|
l("circle", {
|
|
1525
1583
|
cx: "12",
|
|
1526
1584
|
cy: "12",
|
|
@@ -1538,19 +1596,19 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1538
1596
|
x2: "12",
|
|
1539
1597
|
y2: "8"
|
|
1540
1598
|
}, null, -1)
|
|
1541
|
-
])], 2)) :
|
|
1599
|
+
])], 2)) : r.value === "warning" ? (s(), o("svg", {
|
|
1542
1600
|
key: 1,
|
|
1543
1601
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1544
1602
|
width: "24",
|
|
1545
1603
|
height: "24",
|
|
1546
1604
|
viewBox: "0 0 24 24",
|
|
1547
1605
|
fill: "none",
|
|
1548
|
-
class:
|
|
1606
|
+
class: x(f.value.icon),
|
|
1549
1607
|
stroke: "currentColor",
|
|
1550
1608
|
"stroke-width": "2",
|
|
1551
1609
|
"stroke-linecap": "round",
|
|
1552
1610
|
"stroke-linejoin": "round"
|
|
1553
|
-
}, [...
|
|
1611
|
+
}, [...b[4] || (b[4] = [
|
|
1554
1612
|
l("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }, null, -1),
|
|
1555
1613
|
l("line", {
|
|
1556
1614
|
x1: "12",
|
|
@@ -1564,19 +1622,19 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1564
1622
|
x2: "12",
|
|
1565
1623
|
y2: "17"
|
|
1566
1624
|
}, null, -1)
|
|
1567
|
-
])], 2)) :
|
|
1625
|
+
])], 2)) : r.value === "success" ? (s(), o("svg", {
|
|
1568
1626
|
key: 2,
|
|
1569
1627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1570
1628
|
width: "24",
|
|
1571
1629
|
height: "24",
|
|
1572
1630
|
viewBox: "0 0 24 24",
|
|
1573
1631
|
fill: "none",
|
|
1574
|
-
class:
|
|
1632
|
+
class: x(f.value.icon),
|
|
1575
1633
|
stroke: "currentColor",
|
|
1576
1634
|
"stroke-width": "2",
|
|
1577
1635
|
"stroke-linecap": "round",
|
|
1578
1636
|
"stroke-linejoin": "round"
|
|
1579
|
-
}, [...
|
|
1637
|
+
}, [...b[5] || (b[5] = [
|
|
1580
1638
|
l("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
1581
1639
|
l("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
1582
1640
|
])], 2)) : (s(), o("svg", {
|
|
@@ -1586,12 +1644,12 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1586
1644
|
height: "24",
|
|
1587
1645
|
viewBox: "0 0 24 24",
|
|
1588
1646
|
fill: "none",
|
|
1589
|
-
class:
|
|
1647
|
+
class: x(f.value.icon),
|
|
1590
1648
|
stroke: "currentColor",
|
|
1591
1649
|
"stroke-width": "2",
|
|
1592
1650
|
"stroke-linecap": "round",
|
|
1593
1651
|
"stroke-linejoin": "round"
|
|
1594
|
-
}, [...
|
|
1652
|
+
}, [...b[6] || (b[6] = [
|
|
1595
1653
|
l("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }, null, -1),
|
|
1596
1654
|
l("line", {
|
|
1597
1655
|
x1: "12",
|
|
@@ -1608,57 +1666,58 @@ const le = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, ae = {
|
|
|
1608
1666
|
])], 2))
|
|
1609
1667
|
]),
|
|
1610
1668
|
l("div", {
|
|
1611
|
-
class:
|
|
1669
|
+
class: x(["flex-1 flex gap-4 text-[14px]", [I.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !i.value, "whitespace-pre-wrap": i.value }]])
|
|
1612
1670
|
}, [
|
|
1613
1671
|
l("div", {
|
|
1614
|
-
class:
|
|
1615
|
-
}, w(
|
|
1672
|
+
class: x(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", V.value])
|
|
1673
|
+
}, w(v.value), 3),
|
|
1616
1674
|
l("div", {
|
|
1617
|
-
class:
|
|
1675
|
+
class: x(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !i.value }])
|
|
1618
1676
|
}, [
|
|
1619
|
-
B(
|
|
1620
|
-
|
|
1677
|
+
B(T.$slots, "description", {}, () => [
|
|
1678
|
+
P(w(y.value), 1)
|
|
1621
1679
|
])
|
|
1622
1680
|
], 2)
|
|
1623
1681
|
], 2)
|
|
1624
1682
|
], 2)
|
|
1625
1683
|
], 2),
|
|
1626
|
-
|
|
1684
|
+
p.value ? (s(), o("div", ss, [
|
|
1627
1685
|
l("button", {
|
|
1628
1686
|
type: "button",
|
|
1629
1687
|
class: "px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
1630
|
-
onClick:
|
|
1688
|
+
onClick: b[0] || (b[0] = (k) => T.$emit("cancel"))
|
|
1631
1689
|
}, [
|
|
1632
|
-
B(
|
|
1633
|
-
|
|
1690
|
+
B(T.$slots, "cancel", {}, () => [
|
|
1691
|
+
b[7] || (b[7] = P("Cancelar", -1))
|
|
1634
1692
|
])
|
|
1635
1693
|
]),
|
|
1636
1694
|
l("button", {
|
|
1637
1695
|
type: "button",
|
|
1638
|
-
class:
|
|
1639
|
-
onClick:
|
|
1696
|
+
class: x(["px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-white", _.value]),
|
|
1697
|
+
onClick: b[1] || (b[1] = (k) => T.$emit("accept"))
|
|
1640
1698
|
}, [
|
|
1641
|
-
B(
|
|
1642
|
-
|
|
1699
|
+
B(T.$slots, "accept", {}, () => [
|
|
1700
|
+
b[8] || (b[8] = P("Aceptar", -1))
|
|
1643
1701
|
])
|
|
1644
1702
|
], 2)
|
|
1645
|
-
])) :
|
|
1646
|
-
], 10,
|
|
1703
|
+
])) : h("", !0)
|
|
1704
|
+
], 10, es));
|
|
1647
1705
|
}
|
|
1648
1706
|
});
|
|
1649
1707
|
export {
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1708
|
+
ys as Alert,
|
|
1709
|
+
as as AppBar,
|
|
1710
|
+
ns as Button,
|
|
1711
|
+
rs as Card,
|
|
1712
|
+
is as Dialog,
|
|
1713
|
+
ds as FileUpload,
|
|
1714
|
+
us as Icon,
|
|
1715
|
+
cs as Loader,
|
|
1716
|
+
fs as Menu,
|
|
1717
|
+
bs as Pagination,
|
|
1718
|
+
ps as Select,
|
|
1719
|
+
vs as Sidebar,
|
|
1720
|
+
gs as Table,
|
|
1721
|
+
xs as Tabs,
|
|
1722
|
+
hs as Text
|
|
1664
1723
|
};
|