@iaclinical/components 1.0.37 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iaclinical-components.cjs +1 -1
- package/dist/iaclinical-components.js +998 -920
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as E, computed as s, createElementBlock as a, openBlock as l, normalizeClass as d, createElementVNode as o, createCommentVNode as v, renderSlot as P, toDisplayString as M, createBlock as le, unref as Ee, normalizeStyle as q, ref as R, onMounted as ve, onUnmounted as ge, watch as de, createTextVNode as H, withModifiers as J, createVNode as _, withDirectives as me, Fragment as U, renderList as Q, vModelSelect as Se, withKeys as Te, Teleport as he, Transition as ie, withCtx as re, nextTick as be, resolveDynamicComponent as ye, vModelText as qe } from "vue";
|
|
2
2
|
import { Icon as Ne } from "@iconify/vue";
|
|
3
3
|
const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
4
4
|
key: 1,
|
|
@@ -9,7 +9,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
9
9
|
}, Ge = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Je = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
12
|
-
}, Qe = /* @__PURE__ */
|
|
12
|
+
}, Qe = /* @__PURE__ */ E({
|
|
13
13
|
__name: "AppBar",
|
|
14
14
|
props: {
|
|
15
15
|
title: { default: "" },
|
|
@@ -25,8 +25,8 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["toggle-menu"],
|
|
27
27
|
setup(t, { emit: g }) {
|
|
28
|
-
const e = t,
|
|
29
|
-
const
|
|
28
|
+
const e = t, m = g, r = s(() => {
|
|
29
|
+
const f = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", u = {
|
|
30
30
|
default: "bg-primary-500 text-primary-50",
|
|
31
31
|
dark: "bg-secondary-900 text-white",
|
|
32
32
|
light: "bg-white text-secondary-900 border-b border-secondary-200"
|
|
@@ -34,7 +34,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
34
34
|
sm: "h-12",
|
|
35
35
|
md: "h-14",
|
|
36
36
|
lg: "h-16"
|
|
37
|
-
},
|
|
37
|
+
}, b = {
|
|
38
38
|
0: "",
|
|
39
39
|
1: "shadow-sm",
|
|
40
40
|
2: "shadow",
|
|
@@ -45,59 +45,59 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
45
45
|
compact: "gap-1",
|
|
46
46
|
normal: "gap-2 sm:gap-4",
|
|
47
47
|
prominent: "gap-3 sm:gap-6 px-6 sm:px-8"
|
|
48
|
-
},
|
|
48
|
+
}, x = e.sticky ? e.mode === "fixed" ? "fixed top-0 inset-x-0" : "sticky top-0 inset-x-0" : "", h = e.shadow ? "shadow-md" : b[Math.min(e.elevation, 5)];
|
|
49
49
|
return [
|
|
50
|
-
|
|
50
|
+
f.replace("gap-2 sm:gap-4", z[e.density]),
|
|
51
51
|
u[e.variant],
|
|
52
52
|
n[e.height],
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
x,
|
|
54
|
+
h
|
|
55
55
|
].join(" ");
|
|
56
56
|
});
|
|
57
|
-
return (
|
|
57
|
+
return (f, u) => (l(), a("header", {
|
|
58
58
|
class: d(r.value)
|
|
59
59
|
}, [
|
|
60
|
-
|
|
60
|
+
o("div", Ye, [
|
|
61
61
|
t.showMenuButton ? (l(), a("button", {
|
|
62
62
|
key: 0,
|
|
63
|
-
onClick: u[0] || (u[0] = (n) =>
|
|
63
|
+
onClick: u[0] || (u[0] = (n) => m("toggle-menu")),
|
|
64
64
|
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",
|
|
65
65
|
"aria-label": "Toggle menu"
|
|
66
66
|
}, [...u[1] || (u[1] = [
|
|
67
|
-
|
|
67
|
+
o("svg", {
|
|
68
68
|
class: "w-5 h-5 sm:w-6 sm:h-6 text-primary-50",
|
|
69
69
|
fill: "none",
|
|
70
70
|
stroke: "currentColor",
|
|
71
71
|
viewBox: "0 0 24 24",
|
|
72
72
|
xmlns: "http://www.w3.org/2000/svg"
|
|
73
73
|
}, [
|
|
74
|
-
|
|
74
|
+
o("path", {
|
|
75
75
|
"stroke-linecap": "round",
|
|
76
76
|
"stroke-linejoin": "round",
|
|
77
77
|
"stroke-width": "2",
|
|
78
78
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
79
79
|
})
|
|
80
80
|
], -1)
|
|
81
|
-
])])) :
|
|
82
|
-
t.title && t.titlePosition === "left" ? (l(), a("div", He, M(t.title), 1)) :
|
|
83
|
-
P(
|
|
81
|
+
])])) : v("", !0),
|
|
82
|
+
t.title && t.titlePosition === "left" ? (l(), a("div", He, M(t.title), 1)) : v("", !0),
|
|
83
|
+
P(f.$slots, "left", {}, void 0, !0)
|
|
84
84
|
]),
|
|
85
|
-
|
|
86
|
-
t.title && t.titlePosition === "center" ? (l(), a("div", Ue, M(t.title), 1)) :
|
|
87
|
-
P(
|
|
85
|
+
o("div", Ke, [
|
|
86
|
+
t.title && t.titlePosition === "center" ? (l(), a("div", Ue, M(t.title), 1)) : v("", !0),
|
|
87
|
+
P(f.$slots, "center", {}, void 0, !0)
|
|
88
88
|
]),
|
|
89
|
-
|
|
90
|
-
t.title && t.titlePosition === "right" ? (l(), a("div", Je, M(t.title), 1)) :
|
|
91
|
-
P(
|
|
89
|
+
o("div", Ge, [
|
|
90
|
+
t.title && t.titlePosition === "right" ? (l(), a("div", Je, M(t.title), 1)) : v("", !0),
|
|
91
|
+
P(f.$slots, "right", {}, void 0, !0)
|
|
92
92
|
])
|
|
93
93
|
], 2));
|
|
94
94
|
}
|
|
95
95
|
}), Z = (t, g) => {
|
|
96
96
|
const e = t.__vccOpts || t;
|
|
97
|
-
for (const [
|
|
98
|
-
e[
|
|
97
|
+
for (const [m, r] of g)
|
|
98
|
+
e[m] = r;
|
|
99
99
|
return e;
|
|
100
|
-
},
|
|
100
|
+
}, Xa = /* @__PURE__ */ Z(Qe, [["__scopeId", "data-v-b7ffd034"]]), Ze = ["type", "disabled", "aria-label"], Xe = {
|
|
101
101
|
key: 0,
|
|
102
102
|
class: "w-4 h-4 animate-spin mr-2",
|
|
103
103
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -106,7 +106,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
106
106
|
}, _e = {
|
|
107
107
|
key: 1,
|
|
108
108
|
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]"
|
|
109
|
-
},
|
|
109
|
+
}, _a = /* @__PURE__ */ E({
|
|
110
110
|
__name: "Button",
|
|
111
111
|
props: {
|
|
112
112
|
variant: { default: "primary" },
|
|
@@ -123,8 +123,8 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
123
123
|
},
|
|
124
124
|
emits: ["click"],
|
|
125
125
|
setup(t, { emit: g }) {
|
|
126
|
-
const e = t,
|
|
127
|
-
const
|
|
126
|
+
const e = t, m = g, r = s(() => e.variant === "icon"), f = s(() => e.badge > 99 ? "99+" : e.badge.toString()), u = s(() => {
|
|
127
|
+
const b = "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", z = {
|
|
128
128
|
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-500 focus-visible:ring-primary-500",
|
|
129
129
|
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 hover:text-secondary-800 focus-visible:ring-secondary-500",
|
|
130
130
|
outline: "border border-secondary-300 bg-transparent hover:bg-primary-100 focus-visible:ring-secondary-500",
|
|
@@ -132,26 +132,26 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
132
132
|
danger: "bg-danger-600 text-white hover:bg-danger-700 focus-visible:ring-danger-600",
|
|
133
133
|
icon: "hover:bg-primary-100 hover:text-black focus-visible:ring-secondary-500 relative",
|
|
134
134
|
text: "bg-transparent border-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
|
135
|
-
},
|
|
135
|
+
}, x = {
|
|
136
136
|
sm: r.value ? e.compact ? "p-1" : "p-1.5" : e.compact ? "h-6 px-2 text-xs" : "h-8 px-3 text-sm",
|
|
137
137
|
md: r.value ? e.compact ? "p-1.5" : "p-2" : e.compact ? "h-8 px-3 text-sm" : "h-10 px-4 text-base",
|
|
138
138
|
lg: r.value ? e.compact ? "p-2" : "p-3" : e.compact ? "h-10 px-4 text-base" : "h-12 px-6 text-lg"
|
|
139
|
-
},
|
|
139
|
+
}, h = {
|
|
140
140
|
full: "rounded-full",
|
|
141
141
|
xl: "rounded-2xl",
|
|
142
142
|
lg: "rounded-xl",
|
|
143
143
|
md: "rounded-lg",
|
|
144
144
|
sm: "rounded-md",
|
|
145
145
|
none: "rounded-none"
|
|
146
|
-
},
|
|
146
|
+
}, k = e.textColor ? e.textColor : "", y = s(() => {
|
|
147
147
|
var T, V;
|
|
148
148
|
return e.textColorHover ? e.textColorHover : (T = e.textColor) != null && T.includes("white") || (V = e.textColor) != null && V.includes("50") ? "hover:text-black" : "";
|
|
149
149
|
});
|
|
150
|
-
return `${
|
|
151
|
-
}), n = (
|
|
152
|
-
e.disabled ||
|
|
150
|
+
return `${b} ${z[e.variant]} ${x[e.size]} ${h[e.radius]} ${k} ${y.value}`;
|
|
151
|
+
}), n = (b) => {
|
|
152
|
+
e.disabled || m("click", b);
|
|
153
153
|
};
|
|
154
|
-
return (
|
|
154
|
+
return (b, z) => (l(), a("button", {
|
|
155
155
|
class: d(u.value),
|
|
156
156
|
type: t.type,
|
|
157
157
|
disabled: t.disabled || t.loading,
|
|
@@ -159,7 +159,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
159
159
|
"aria-label": t.ariaLabel
|
|
160
160
|
}, [
|
|
161
161
|
t.loading ? (l(), a("svg", Xe, [...z[0] || (z[0] = [
|
|
162
|
-
|
|
162
|
+
o("circle", {
|
|
163
163
|
class: "opacity-25",
|
|
164
164
|
cx: "12",
|
|
165
165
|
cy: "12",
|
|
@@ -167,17 +167,17 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
167
167
|
stroke: "currentColor",
|
|
168
168
|
"stroke-width": "4"
|
|
169
169
|
}, null, -1),
|
|
170
|
-
|
|
170
|
+
o("path", {
|
|
171
171
|
class: "opacity-75",
|
|
172
172
|
fill: "currentColor",
|
|
173
173
|
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"
|
|
174
174
|
}, null, -1)
|
|
175
|
-
])])) :
|
|
176
|
-
P(
|
|
177
|
-
r.value && t.badge && t.badge > 0 ? (l(), a("span", _e, M(
|
|
175
|
+
])])) : v("", !0),
|
|
176
|
+
P(b.$slots, "default"),
|
|
177
|
+
r.value && t.badge && t.badge > 0 ? (l(), a("span", _e, M(f.value), 1)) : v("", !0)
|
|
178
178
|
], 10, Ze));
|
|
179
179
|
}
|
|
180
|
-
}), et = /* @__PURE__ */
|
|
180
|
+
}), et = /* @__PURE__ */ E({
|
|
181
181
|
__name: "Icon",
|
|
182
182
|
props: {
|
|
183
183
|
name: {},
|
|
@@ -196,9 +196,9 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
196
196
|
lg: "24px",
|
|
197
197
|
xl: "30px",
|
|
198
198
|
"2xl": "36px"
|
|
199
|
-
},
|
|
199
|
+
}, m = (n, b) => {
|
|
200
200
|
const z = n.replace(/_/g, "-");
|
|
201
|
-
switch (
|
|
201
|
+
switch (b) {
|
|
202
202
|
case "filled":
|
|
203
203
|
return `material-symbols:${z}`;
|
|
204
204
|
case "outlined":
|
|
@@ -212,24 +212,24 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
212
212
|
default:
|
|
213
213
|
return `material-symbols:${z}`;
|
|
214
214
|
}
|
|
215
|
-
}, r =
|
|
215
|
+
}, r = s(() => m(g.name, g.variant)), f = s(() => {
|
|
216
216
|
const n = [
|
|
217
217
|
"inline-flex items-center justify-center select-none",
|
|
218
218
|
"transition-transform duration-200"
|
|
219
219
|
];
|
|
220
220
|
return g.color && (g.color.startsWith("text-") || g.color.startsWith("fill-")) && n.push(g.color), g.spin && n.push("animate-spin"), n.join(" ");
|
|
221
|
-
}), u =
|
|
221
|
+
}), u = s(() => {
|
|
222
222
|
const n = {};
|
|
223
223
|
if (e[g.size] ? (n.fontSize = e[g.size], n.width = e[g.size], n.height = e[g.size]) : (n.fontSize = g.size, n.width = g.size, n.height = g.size), g.color && !g.color.startsWith("text-") && !g.color.startsWith("fill-") && (n.color = g.color), g.rotate !== 0) {
|
|
224
|
-
const
|
|
225
|
-
n.transform =
|
|
224
|
+
const b = `rotate(${g.rotate}deg)`;
|
|
225
|
+
n.transform = b;
|
|
226
226
|
}
|
|
227
227
|
return n;
|
|
228
228
|
});
|
|
229
|
-
return (n,
|
|
229
|
+
return (n, b) => (l(), le(Ee(Ne), {
|
|
230
230
|
icon: r.value,
|
|
231
|
-
class: d(
|
|
232
|
-
style:
|
|
231
|
+
class: d(f.value),
|
|
232
|
+
style: q(u.value),
|
|
233
233
|
"aria-label": t.ariaLabel,
|
|
234
234
|
role: t.ariaLabel ? "img" : void 0
|
|
235
235
|
}, null, 8, ["icon", "class", "style", "aria-label", "role"]));
|
|
@@ -240,7 +240,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
240
240
|
}, lt = ["for"], at = {
|
|
241
241
|
key: 0,
|
|
242
242
|
class: "text-danger-600"
|
|
243
|
-
},
|
|
243
|
+
}, ot = ["id", "disabled", "placeholder", "value", "required"], st = ["disabled"], rt = {
|
|
244
244
|
key: 1,
|
|
245
245
|
class: "relative"
|
|
246
246
|
}, nt = ["for"], it = {
|
|
@@ -252,13 +252,13 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
252
252
|
}, ft = {
|
|
253
253
|
key: 0,
|
|
254
254
|
class: "text-danger-600"
|
|
255
|
-
}, pt = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, mt = ["disabled", "placeholder", "value", "required"], bt = ["disabled"], vt = ["disabled", "placeholder", "value", "required"], gt = ["disabled"],
|
|
255
|
+
}, pt = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, mt = ["disabled", "placeholder", "value", "required"], bt = ["disabled"], vt = ["disabled", "placeholder", "value", "required"], gt = ["disabled"], ht = {
|
|
256
256
|
key: 3,
|
|
257
257
|
class: "mt-1 text-sm text-danger-600"
|
|
258
|
-
},
|
|
258
|
+
}, yt = {
|
|
259
259
|
key: 4,
|
|
260
260
|
class: "mt-1 text-sm text-secondary-600"
|
|
261
|
-
}, xt = { class: "flex items-center justify-between mb-4" }, wt = { class: "flex items-center space-x-2" }, kt = ["value"], Ct = ["value"], $t = { class: "grid grid-cols-7 gap-1 mb-2" }, Bt = { class: "grid grid-cols-7 gap-1" }, zt = ["disabled", "onClick"], Mt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, Vt = ["disabled"], Dt = /* @__PURE__ */
|
|
261
|
+
}, xt = { class: "flex items-center justify-between mb-4" }, wt = { class: "flex items-center space-x-2" }, kt = ["value"], Ct = ["value"], $t = { class: "grid grid-cols-7 gap-1 mb-2" }, Bt = { class: "grid grid-cols-7 gap-1" }, zt = ["disabled", "onClick"], Mt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, Vt = ["disabled"], Dt = /* @__PURE__ */ E({
|
|
262
262
|
__name: "Calendar",
|
|
263
263
|
props: {
|
|
264
264
|
modelValue: {},
|
|
@@ -291,7 +291,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
291
291
|
},
|
|
292
292
|
emits: ["update:modelValue", "date-select", "range-select", "multiple-select"],
|
|
293
293
|
setup(t, { emit: g }) {
|
|
294
|
-
const e = t,
|
|
294
|
+
const e = t, m = R([]), r = g, f = R(!1), u = R(null), n = R((/* @__PURE__ */ new Date()).getMonth()), b = R((/* @__PURE__ */ new Date()).getFullYear()), z = R(`calendar-${Math.random().toString(36).substr(2, 9)}`), x = R(null), h = R(null), k = [
|
|
295
295
|
"Enero",
|
|
296
296
|
"Febrero",
|
|
297
297
|
"Marzo",
|
|
@@ -304,13 +304,13 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
304
304
|
"Octubre",
|
|
305
305
|
"Noviembre",
|
|
306
306
|
"Diciembre"
|
|
307
|
-
],
|
|
308
|
-
const
|
|
309
|
-
for (let O =
|
|
307
|
+
], y = ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], T = s(() => e.compact ? { sm: "xs", md: "xs", lg: "sm" }[e.size] || "xs" : { sm: "xs", md: "sm", lg: "md" }[e.size] || "sm"), V = s(() => {
|
|
308
|
+
const C = (/* @__PURE__ */ new Date()).getFullYear(), S = [];
|
|
309
|
+
for (let O = C - 100; O <= C + 10; O++)
|
|
310
310
|
S.push(O);
|
|
311
311
|
return S;
|
|
312
|
-
}), j =
|
|
313
|
-
const
|
|
312
|
+
}), j = s(() => "ds-label"), W = s(() => e.bordered ? "border border-neutral-300" : ""), I = s(() => {
|
|
313
|
+
const C = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", S = {
|
|
314
314
|
sm: e.compact ? "px-2 py-1 pr-8 text-xs" : "px-3 py-1.5 pr-10 text-sm",
|
|
315
315
|
md: e.compact ? "px-3 py-1.5 pr-10 text-sm" : "px-4 py-2 pr-10 text-base",
|
|
316
316
|
lg: e.compact ? "px-4 py-2 pr-10 text-base" : "px-5 py-3 pr-12 text-lg"
|
|
@@ -322,44 +322,44 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
322
322
|
filled: "bg-secondary-100",
|
|
323
323
|
outlined: "bg-transparent"
|
|
324
324
|
}, te = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
325
|
-
return `${
|
|
326
|
-
}), L =
|
|
325
|
+
return `${C} ${S[e.size]} ${Y[e.variant]} ${O[e.color]} ${te}`;
|
|
326
|
+
}), L = s(() => `transition-colors text-[#565656] hover:text-[#565656] opacity-80 hover:opacity-100 ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), A = s(() => e.compact ? "min-w-72 max-w-sm" : "min-w-80 max-w-sm"), F = s(() => `p-2 rounded-md transition-colors ${{
|
|
327
327
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
328
328
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
329
|
-
}[e.color]}`),
|
|
329
|
+
}[e.color]}`), $ = s(() => `px-2 py-1 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-1 ${{
|
|
330
330
|
primary: "focus:border-primary-500 focus:ring-primary-500",
|
|
331
331
|
secondary: "focus:border-secondary-500 focus:ring-secondary-500"
|
|
332
|
-
}[e.color]}`),
|
|
333
|
-
const
|
|
332
|
+
}[e.color]}`), p = s(() => {
|
|
333
|
+
const C = {
|
|
334
334
|
primary: "bg-primary-500 hover:bg-primary-600 focus:ring-primary-500",
|
|
335
335
|
secondary: "bg-secondary-600 hover:bg-secondary-700 focus:ring-secondary-500"
|
|
336
336
|
};
|
|
337
|
-
return `${e.compact ? "px-2 py-1 text-xs" : "px-3 py-1.5 text-sm"} text-white rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-not-allowed ${
|
|
338
|
-
}), i =
|
|
339
|
-
const
|
|
337
|
+
return `${e.compact ? "px-2 py-1 text-xs" : "px-3 py-1.5 text-sm"} text-white rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-not-allowed ${C[e.color]}`;
|
|
338
|
+
}), i = s(() => {
|
|
339
|
+
const C = {
|
|
340
340
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
341
341
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
342
342
|
};
|
|
343
|
-
return `${e.compact ? "px-2 py-1 text-xs" : "px-3 py-1.5 text-sm"} border border-secondary-300 rounded-md transition-colors focus:outline-none ${
|
|
344
|
-
}),
|
|
345
|
-
|
|
346
|
-
const
|
|
347
|
-
const
|
|
343
|
+
return `${e.compact ? "px-2 py-1 text-xs" : "px-3 py-1.5 text-sm"} border border-secondary-300 rounded-md transition-colors focus:outline-none ${C[e.color]}`;
|
|
344
|
+
}), B = s(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? K(e.modelValue) : ""), c = s(() => e.mode === "multiple" && Array.isArray(e.modelValue) && e.modelValue.length > 0 ? e.modelValue.length === 1 ? K(e.modelValue[0]) : `${e.modelValue.length} fechas seleccionadas` : ""), D = s(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? K(e.modelValue.start) : ""), w = s(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? K(e.modelValue.end) : ""), X = s(() => e.mode === "single" ? x.value !== null : e.mode === "multiple" ? m.value.length > 0 : x.value !== null && h.value !== null && h.value >= x.value);
|
|
345
|
+
s(() => e.mode === "range" && x.value && h.value ? h.value < x.value : !1);
|
|
346
|
+
const N = s(() => {
|
|
347
|
+
const C = new Date(b.value, n.value, 1), S = new Date(b.value, n.value + 1, 0), O = C.getDay(), Y = S.getDate(), te = [], ae = new Date(b.value, n.value - 1, 0);
|
|
348
348
|
for (let G = O - 1; G >= 0; G--) {
|
|
349
|
-
const
|
|
349
|
+
const oe = new Date(b.value, n.value - 1, ae.getDate() - G);
|
|
350
350
|
te.push({
|
|
351
|
-
day:
|
|
352
|
-
date:
|
|
351
|
+
day: oe.getDate(),
|
|
352
|
+
date: oe,
|
|
353
353
|
isCurrentMonth: !1,
|
|
354
354
|
disabled: !1,
|
|
355
|
-
key: `prev-${
|
|
355
|
+
key: `prev-${oe.getDate()}`
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
358
|
for (let G = 1; G <= Y; G++) {
|
|
359
|
-
const
|
|
359
|
+
const oe = new Date(b.value, n.value, G);
|
|
360
360
|
te.push({
|
|
361
361
|
day: G,
|
|
362
|
-
date:
|
|
362
|
+
date: oe,
|
|
363
363
|
isCurrentMonth: !0,
|
|
364
364
|
disabled: !1,
|
|
365
365
|
key: `current-${G}`
|
|
@@ -367,18 +367,18 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
367
367
|
}
|
|
368
368
|
const Re = 42 - te.length;
|
|
369
369
|
for (let G = 1; G <= Re; G++) {
|
|
370
|
-
const
|
|
370
|
+
const oe = new Date(b.value, n.value + 1, G);
|
|
371
371
|
te.push({
|
|
372
372
|
day: G,
|
|
373
|
-
date:
|
|
373
|
+
date: oe,
|
|
374
374
|
isCurrentMonth: !1,
|
|
375
375
|
disabled: !1,
|
|
376
376
|
key: `next-${G}`
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
379
|
return te;
|
|
380
|
-
}), K = (
|
|
381
|
-
const S =
|
|
380
|
+
}), K = (C) => {
|
|
381
|
+
const S = C.getDate().toString().padStart(2, "0"), O = (C.getMonth() + 1).toString().padStart(2, "0"), Y = C.getFullYear();
|
|
382
382
|
switch (e.dateFormat) {
|
|
383
383
|
case "MM/DD/YYYY":
|
|
384
384
|
return `${O}/${S}/${Y}`;
|
|
@@ -388,9 +388,9 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
388
388
|
default:
|
|
389
389
|
return `${S}/${O}/${Y}`;
|
|
390
390
|
}
|
|
391
|
-
}, xe = (
|
|
391
|
+
}, xe = (C) => {
|
|
392
392
|
var O;
|
|
393
|
-
const S = new Date(
|
|
393
|
+
const S = new Date(C.getFullYear(), C.getMonth(), C.getDate());
|
|
394
394
|
if (e.minDate) {
|
|
395
395
|
const Y = new Date(e.minDate.getFullYear(), e.minDate.getMonth(), e.minDate.getDate());
|
|
396
396
|
if (S < Y) return !0;
|
|
@@ -400,13 +400,13 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
400
400
|
if (S > Y) return !0;
|
|
401
401
|
}
|
|
402
402
|
return !!((O = e.disabledDates) != null && O.some(
|
|
403
|
-
(Y) => Y.toDateString() ===
|
|
403
|
+
(Y) => Y.toDateString() === C.toDateString()
|
|
404
404
|
));
|
|
405
|
-
}, Ie = (
|
|
405
|
+
}, Ie = (C) => {
|
|
406
406
|
const S = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
|
|
407
|
-
if (
|
|
407
|
+
if (C.disabled || xe(C.date))
|
|
408
408
|
return `${S} text-secondary-400 cursor-not-allowed`;
|
|
409
|
-
const O = je(
|
|
409
|
+
const O = je(C.date), Y = Le(C.date), te = Oe(C.date), ae = {
|
|
410
410
|
primary: {
|
|
411
411
|
selected: "bg-primary-600 text-white",
|
|
412
412
|
inRange: "bg-primary-100 text-primary-900",
|
|
@@ -422,68 +422,68 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
422
422
|
otherMonth: "text-secondary-400 hover:bg-secondary-50 hover:text-secondary-600"
|
|
423
423
|
}
|
|
424
424
|
};
|
|
425
|
-
return O ? `${S} ${ae[e.color].selected}` : Y ? `${S} ${ae[e.color].inRange}` : te ? `${S} ${ae[e.color].today}` :
|
|
426
|
-
}, je = (
|
|
427
|
-
if (e.mode !== "range" || !
|
|
425
|
+
return O ? `${S} ${ae[e.color].selected}` : Y ? `${S} ${ae[e.color].inRange}` : te ? `${S} ${ae[e.color].today}` : C.isCurrentMonth ? `${S} ${ae[e.color].default}` : `${S} ${ae[e.color].otherMonth}`;
|
|
426
|
+
}, je = (C) => e.mode === "single" ? x.value ? se(C, x.value) : !1 : e.mode === "multiple" ? m.value.some((S) => se(C, S)) : !!(x.value && se(C, x.value)) || !!(h.value && se(C, h.value)), Le = (C) => {
|
|
427
|
+
if (e.mode !== "range" || !x.value || !h.value)
|
|
428
428
|
return !1;
|
|
429
|
-
const S =
|
|
430
|
-
return
|
|
431
|
-
}, Oe = (
|
|
432
|
-
e.disabled ||
|
|
429
|
+
const S = x.value, O = h.value;
|
|
430
|
+
return C > S && C < O;
|
|
431
|
+
}, Oe = (C) => se(C, /* @__PURE__ */ new Date()), se = (C, S) => C.toDateString() === S.toDateString(), we = () => {
|
|
432
|
+
e.disabled || f.value || ne();
|
|
433
433
|
}, ke = () => {
|
|
434
|
-
e.disabled ||
|
|
434
|
+
e.disabled || f.value || ne();
|
|
435
435
|
}, Ce = () => {
|
|
436
436
|
e.disabled || Me();
|
|
437
|
-
}, $e = (
|
|
438
|
-
e.disabled || (ce(
|
|
439
|
-
}, Be = (
|
|
440
|
-
e.disabled || (ce(
|
|
441
|
-
}, ze = (
|
|
442
|
-
e.disabled || (ce(
|
|
443
|
-
}, ce = (
|
|
444
|
-
u.value =
|
|
437
|
+
}, $e = (C) => {
|
|
438
|
+
e.disabled || (ce(C), f.value || ne());
|
|
439
|
+
}, Be = (C) => {
|
|
440
|
+
e.disabled || (ce(C), f.value || ne());
|
|
441
|
+
}, ze = (C) => {
|
|
442
|
+
e.disabled || (ce(C), Me());
|
|
443
|
+
}, ce = (C) => {
|
|
444
|
+
u.value = C;
|
|
445
445
|
}, Me = () => {
|
|
446
|
-
e.disabled || (
|
|
446
|
+
e.disabled || (f.value = !f.value, f.value && fe());
|
|
447
447
|
}, ne = () => {
|
|
448
|
-
e.disabled || (
|
|
448
|
+
e.disabled || (f.value = !0, fe());
|
|
449
449
|
}, ue = () => {
|
|
450
|
-
|
|
450
|
+
f.value = !1, u.value = null;
|
|
451
451
|
}, fe = () => {
|
|
452
|
-
e.mode === "single" ? (
|
|
453
|
-
}, Ae = (
|
|
452
|
+
e.mode === "single" ? (x.value = e.modelValue instanceof Date ? e.modelValue : null, h.value = null) : e.mode === "multiple" ? m.value = Array.isArray(e.modelValue) ? [...e.modelValue] : [] : e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue ? (x.value = e.modelValue.start, h.value = e.modelValue.end) : (x.value = null, h.value = null);
|
|
453
|
+
}, Ae = (C) => {
|
|
454
454
|
if (e.mode === "single")
|
|
455
|
-
|
|
455
|
+
x.value = C, h.value = null;
|
|
456
456
|
else if (e.mode === "multiple") {
|
|
457
|
-
const S =
|
|
458
|
-
S >= 0 ?
|
|
457
|
+
const S = m.value.findIndex((O) => se(O, C));
|
|
458
|
+
S >= 0 ? m.value.splice(S, 1) : m.value.push(C);
|
|
459
459
|
} else
|
|
460
|
-
u.value === "start" || !
|
|
460
|
+
u.value === "start" || !x.value ? (x.value = C, h.value = null, u.value = "end") : (u.value === "end" || !h.value) && (C < x.value ? (h.value = x.value, x.value = C) : h.value = C, u.value = null);
|
|
461
461
|
}, We = () => {
|
|
462
462
|
if (e.mode === "single")
|
|
463
|
-
r("update:modelValue",
|
|
463
|
+
r("update:modelValue", x.value), x.value && r("date-select", x.value);
|
|
464
464
|
else if (e.mode === "multiple") {
|
|
465
|
-
const
|
|
466
|
-
r("update:modelValue",
|
|
465
|
+
const C = [...m.value].sort((S, O) => S.getTime() - O.getTime());
|
|
466
|
+
r("update:modelValue", C), r("multiple-select", C);
|
|
467
467
|
} else {
|
|
468
|
-
const
|
|
469
|
-
r("update:modelValue",
|
|
468
|
+
const C = { start: x.value, end: h.value };
|
|
469
|
+
r("update:modelValue", C), r("range-select", C);
|
|
470
470
|
}
|
|
471
471
|
ue();
|
|
472
472
|
}, Fe = () => {
|
|
473
|
-
n.value === 0 ? (n.value = 11,
|
|
473
|
+
n.value === 0 ? (n.value = 11, b.value--) : n.value--;
|
|
474
474
|
}, Pe = () => {
|
|
475
|
-
n.value === 11 ? (n.value = 0,
|
|
475
|
+
n.value === 11 ? (n.value = 0, b.value++) : n.value++;
|
|
476
476
|
}, Ve = () => {
|
|
477
|
-
}, pe = R(), De = (
|
|
478
|
-
pe.value && !pe.value.contains(
|
|
477
|
+
}, pe = R(), De = (C) => {
|
|
478
|
+
pe.value && !pe.value.contains(C.target) && ue();
|
|
479
479
|
};
|
|
480
480
|
return ve(() => {
|
|
481
481
|
document.addEventListener("click", De);
|
|
482
482
|
}), ge(() => {
|
|
483
483
|
document.removeEventListener("click", De);
|
|
484
|
-
}), de(() => e.modelValue, (
|
|
485
|
-
|
|
486
|
-
}, { deep: !0 }), (
|
|
484
|
+
}), de(() => e.modelValue, (C) => {
|
|
485
|
+
f.value || fe();
|
|
486
|
+
}, { deep: !0 }), (C, S) => (l(), a("div", {
|
|
487
487
|
ref_key: "calendarWrapperRef",
|
|
488
488
|
ref: pe,
|
|
489
489
|
class: "calendar-wrapper"
|
|
@@ -495,24 +495,24 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
495
495
|
class: d(j.value)
|
|
496
496
|
}, [
|
|
497
497
|
H(M(t.label) + " ", 1),
|
|
498
|
-
t.required ? (l(), a("span", at, "*")) :
|
|
499
|
-
], 10, lt)) :
|
|
500
|
-
|
|
498
|
+
t.required ? (l(), a("span", at, "*")) : v("", !0)
|
|
499
|
+
], 10, lt)) : v("", !0),
|
|
500
|
+
o("div", {
|
|
501
501
|
class: d(["relative rounded-md", W.value])
|
|
502
502
|
}, [
|
|
503
|
-
|
|
503
|
+
o("input", {
|
|
504
504
|
id: z.value,
|
|
505
505
|
class: d(I.value),
|
|
506
506
|
type: "text",
|
|
507
507
|
disabled: t.disabled,
|
|
508
508
|
placeholder: t.placeholder || "Seleccionar fecha",
|
|
509
|
-
value:
|
|
509
|
+
value: B.value,
|
|
510
510
|
required: t.required,
|
|
511
511
|
readonly: !0,
|
|
512
512
|
onClick: we,
|
|
513
513
|
onFocus: ke
|
|
514
|
-
}, null, 42,
|
|
515
|
-
|
|
514
|
+
}, null, 42, ot),
|
|
515
|
+
o("button", {
|
|
516
516
|
type: "button",
|
|
517
517
|
class: d(["absolute right-3 top-1/2 -translate-y-1/2", L.value]),
|
|
518
518
|
onClick: J(Ce, ["stop"]),
|
|
@@ -522,7 +522,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
522
522
|
name: t.iconName,
|
|
523
523
|
size: T.value
|
|
524
524
|
}, null, 8, ["name", "size"])
|
|
525
|
-
], 10,
|
|
525
|
+
], 10, st)
|
|
526
526
|
], 2)
|
|
527
527
|
])) : t.mode === "multiple" ? (l(), a("div", rt, [
|
|
528
528
|
t.label && t.showLabel ? (l(), a("label", {
|
|
@@ -531,12 +531,12 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
531
531
|
class: d(j.value)
|
|
532
532
|
}, [
|
|
533
533
|
H(M(t.label) + " ", 1),
|
|
534
|
-
t.required ? (l(), a("span", it, "*")) :
|
|
535
|
-
], 10, nt)) :
|
|
536
|
-
|
|
534
|
+
t.required ? (l(), a("span", it, "*")) : v("", !0)
|
|
535
|
+
], 10, nt)) : v("", !0),
|
|
536
|
+
o("div", {
|
|
537
537
|
class: d(["relative rounded-md", W.value])
|
|
538
538
|
}, [
|
|
539
|
-
|
|
539
|
+
o("input", {
|
|
540
540
|
id: z.value,
|
|
541
541
|
class: d(I.value),
|
|
542
542
|
type: "text",
|
|
@@ -548,7 +548,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
548
548
|
onClick: we,
|
|
549
549
|
onFocus: ke
|
|
550
550
|
}, null, 42, dt),
|
|
551
|
-
|
|
551
|
+
o("button", {
|
|
552
552
|
type: "button",
|
|
553
553
|
class: d(["absolute right-3 top-1/2 -translate-y-1/2", L.value]),
|
|
554
554
|
onClick: J(Ce, ["stop"]),
|
|
@@ -566,13 +566,13 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
566
566
|
class: d(j.value)
|
|
567
567
|
}, [
|
|
568
568
|
H(M(t.label) + " ", 1),
|
|
569
|
-
t.required ? (l(), a("span", ft, "*")) :
|
|
570
|
-
], 2)) :
|
|
571
|
-
|
|
572
|
-
|
|
569
|
+
t.required ? (l(), a("span", ft, "*")) : v("", !0)
|
|
570
|
+
], 2)) : v("", !0),
|
|
571
|
+
o("div", pt, [
|
|
572
|
+
o("div", {
|
|
573
573
|
class: d(["relative rounded-md", W.value])
|
|
574
574
|
}, [
|
|
575
|
-
|
|
575
|
+
o("input", {
|
|
576
576
|
class: d(I.value),
|
|
577
577
|
type: "text",
|
|
578
578
|
disabled: t.disabled,
|
|
@@ -583,7 +583,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
583
583
|
onClick: S[0] || (S[0] = () => $e("start")),
|
|
584
584
|
onFocus: S[1] || (S[1] = () => Be("start"))
|
|
585
585
|
}, null, 42, mt),
|
|
586
|
-
|
|
586
|
+
o("button", {
|
|
587
587
|
type: "button",
|
|
588
588
|
class: d(["absolute right-3 top-1/2 -translate-y-1/2", L.value]),
|
|
589
589
|
onClick: S[2] || (S[2] = J(() => ze("start"), ["stop"])),
|
|
@@ -595,21 +595,21 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
595
595
|
}, null, 8, ["name", "size"])
|
|
596
596
|
], 10, bt)
|
|
597
597
|
], 2),
|
|
598
|
-
|
|
598
|
+
o("div", {
|
|
599
599
|
class: d(["relative rounded-md", W.value])
|
|
600
600
|
}, [
|
|
601
|
-
|
|
601
|
+
o("input", {
|
|
602
602
|
class: d(I.value),
|
|
603
603
|
type: "text",
|
|
604
604
|
disabled: t.disabled,
|
|
605
605
|
placeholder: t.endPlaceholder || "Fecha hasta",
|
|
606
|
-
value:
|
|
606
|
+
value: w.value,
|
|
607
607
|
required: t.required,
|
|
608
608
|
readonly: !0,
|
|
609
609
|
onClick: S[3] || (S[3] = () => $e("end")),
|
|
610
610
|
onFocus: S[4] || (S[4] = () => Be("end"))
|
|
611
611
|
}, null, 42, vt),
|
|
612
|
-
|
|
612
|
+
o("button", {
|
|
613
613
|
type: "button",
|
|
614
614
|
class: d(["absolute right-3 top-1/2 -translate-y-1/2", L.value]),
|
|
615
615
|
onClick: S[5] || (S[5] = J(() => ze("end"), ["stop"])),
|
|
@@ -623,15 +623,15 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
623
623
|
], 2)
|
|
624
624
|
])
|
|
625
625
|
])),
|
|
626
|
-
t.error ? (l(), a("p",
|
|
627
|
-
|
|
626
|
+
t.error ? (l(), a("p", ht, M(t.error), 1)) : t.helperText ? (l(), a("p", yt, M(t.helperText), 1)) : v("", !0),
|
|
627
|
+
f.value ? (l(), a("div", {
|
|
628
628
|
key: 5,
|
|
629
629
|
class: d(["absolute top-full mt-1 left-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden p-4", A.value]),
|
|
630
630
|
onClick: S[8] || (S[8] = J(() => {
|
|
631
631
|
}, ["stop"]))
|
|
632
632
|
}, [
|
|
633
|
-
|
|
634
|
-
|
|
633
|
+
o("div", xt, [
|
|
634
|
+
o("button", {
|
|
635
635
|
type: "button",
|
|
636
636
|
onClick: Fe,
|
|
637
637
|
class: d(F.value)
|
|
@@ -641,22 +641,22 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
641
641
|
size: "sm"
|
|
642
642
|
})
|
|
643
643
|
], 2),
|
|
644
|
-
|
|
645
|
-
me(
|
|
644
|
+
o("div", wt, [
|
|
645
|
+
me(o("select", {
|
|
646
646
|
"onUpdate:modelValue": S[6] || (S[6] = (O) => n.value = O),
|
|
647
|
-
class: d(
|
|
647
|
+
class: d($.value),
|
|
648
648
|
onChange: Ve
|
|
649
649
|
}, [
|
|
650
|
-
(l(), a(U, null, Q(
|
|
650
|
+
(l(), a(U, null, Q(k, (O, Y) => o("option", {
|
|
651
651
|
key: Y,
|
|
652
652
|
value: Y
|
|
653
653
|
}, M(O), 9, kt)), 64))
|
|
654
654
|
], 34), [
|
|
655
655
|
[Se, n.value]
|
|
656
656
|
]),
|
|
657
|
-
me(
|
|
658
|
-
"onUpdate:modelValue": S[7] || (S[7] = (O) =>
|
|
659
|
-
class: d(
|
|
657
|
+
me(o("select", {
|
|
658
|
+
"onUpdate:modelValue": S[7] || (S[7] = (O) => b.value = O),
|
|
659
|
+
class: d($.value),
|
|
660
660
|
onChange: Ve
|
|
661
661
|
}, [
|
|
662
662
|
(l(!0), a(U, null, Q(V.value, (O) => (l(), a("option", {
|
|
@@ -664,10 +664,10 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
664
664
|
value: O
|
|
665
665
|
}, M(O), 9, Ct))), 128))
|
|
666
666
|
], 34), [
|
|
667
|
-
[Se,
|
|
667
|
+
[Se, b.value]
|
|
668
668
|
])
|
|
669
669
|
]),
|
|
670
|
-
|
|
670
|
+
o("button", {
|
|
671
671
|
type: "button",
|
|
672
672
|
onClick: Pe,
|
|
673
673
|
class: d(F.value)
|
|
@@ -678,14 +678,14 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
678
678
|
})
|
|
679
679
|
], 2)
|
|
680
680
|
]),
|
|
681
|
-
|
|
682
|
-
(l(), a(U, null, Q(
|
|
681
|
+
o("div", $t, [
|
|
682
|
+
(l(), a(U, null, Q(y, (O) => o("div", {
|
|
683
683
|
key: O,
|
|
684
684
|
class: "text-center text-sm font-medium text-secondary-600 py-2"
|
|
685
685
|
}, M(O), 1)), 64))
|
|
686
686
|
]),
|
|
687
|
-
|
|
688
|
-
(l(!0), a(U, null, Q(
|
|
687
|
+
o("div", Bt, [
|
|
688
|
+
(l(!0), a(U, null, Q(N.value, (O) => (l(), a("button", {
|
|
689
689
|
key: O.key,
|
|
690
690
|
type: "button",
|
|
691
691
|
class: d(Ie(O)),
|
|
@@ -693,23 +693,23 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
693
693
|
onClick: (Y) => Ae(O.date)
|
|
694
694
|
}, M(O.day), 11, zt))), 128))
|
|
695
695
|
]),
|
|
696
|
-
|
|
697
|
-
|
|
696
|
+
o("div", Mt, [
|
|
697
|
+
o("button", {
|
|
698
698
|
type: "button",
|
|
699
699
|
class: d(i.value),
|
|
700
700
|
onClick: ue
|
|
701
701
|
}, " Cancelar ", 2),
|
|
702
|
-
|
|
702
|
+
o("button", {
|
|
703
703
|
type: "button",
|
|
704
|
-
class: d(
|
|
704
|
+
class: d(p.value),
|
|
705
705
|
onClick: We,
|
|
706
706
|
disabled: !X.value
|
|
707
707
|
}, " Confirmar ", 10, Vt)
|
|
708
708
|
])
|
|
709
|
-
], 2)) :
|
|
709
|
+
], 2)) : v("", !0)
|
|
710
710
|
], 512));
|
|
711
711
|
}
|
|
712
|
-
}),
|
|
712
|
+
}), eo = /* @__PURE__ */ Z(Dt, [["__scopeId", "data-v-18f461f5"]]), St = ["role", "tabindex"], to = /* @__PURE__ */ E({
|
|
713
713
|
__name: "Card",
|
|
714
714
|
props: {
|
|
715
715
|
shadow: { default: "md" },
|
|
@@ -722,32 +722,32 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
722
722
|
},
|
|
723
723
|
emits: ["click"],
|
|
724
724
|
setup(t, { emit: g }) {
|
|
725
|
-
const e = t,
|
|
725
|
+
const e = t, m = g, r = {
|
|
726
726
|
none: "",
|
|
727
727
|
sm: "shadow-sm",
|
|
728
728
|
md: "shadow",
|
|
729
729
|
lg: "shadow-lg",
|
|
730
730
|
xl: "shadow-xl"
|
|
731
|
-
},
|
|
731
|
+
}, f = {
|
|
732
732
|
none: "rounded-none",
|
|
733
733
|
sm: "rounded-sm",
|
|
734
734
|
md: "rounded-md",
|
|
735
735
|
lg: "rounded-lg",
|
|
736
736
|
xl: "rounded-xl",
|
|
737
737
|
full: "rounded-full"
|
|
738
|
-
}, u =
|
|
738
|
+
}, u = s(() => [
|
|
739
739
|
"w-full bg-white",
|
|
740
740
|
r[e.shadow],
|
|
741
|
-
|
|
741
|
+
f[e.rounded],
|
|
742
742
|
e.bordered ? "border border-gray-200" : "",
|
|
743
743
|
e.hoverable || e.clickable ? "transition-all duration-200" : "",
|
|
744
744
|
e.hoverable ? "hover:shadow-lg" : "",
|
|
745
745
|
e.clickable && !e.disabled ? "cursor-pointer hover:shadow-lg" : "",
|
|
746
746
|
e.clickable && e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
747
|
-
]), n = (
|
|
748
|
-
!e.disabled && e.clickable &&
|
|
747
|
+
]), n = (b) => {
|
|
748
|
+
!e.disabled && e.clickable && m("click", b);
|
|
749
749
|
};
|
|
750
|
-
return (
|
|
750
|
+
return (b, z) => (l(), a("div", {
|
|
751
751
|
class: d(u.value),
|
|
752
752
|
role: t.clickable ? "button" : void 0,
|
|
753
753
|
tabindex: t.clickable ? 0 : void 0,
|
|
@@ -757,29 +757,29 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
757
757
|
Te(n, ["space"])
|
|
758
758
|
]
|
|
759
759
|
}, [
|
|
760
|
-
|
|
760
|
+
b.$slots.header ? (l(), a("div", {
|
|
761
761
|
key: 0,
|
|
762
762
|
class: d([e.compact ? "px-4 py-2" : "px-6 py-4", "border-b border-gray-100"])
|
|
763
763
|
}, [
|
|
764
|
-
P(
|
|
765
|
-
], 2)) :
|
|
766
|
-
|
|
764
|
+
P(b.$slots, "header")
|
|
765
|
+
], 2)) : v("", !0),
|
|
766
|
+
o("div", {
|
|
767
767
|
class: d(e.compact ? "px-4 py-2" : "px-6 py-4")
|
|
768
768
|
}, [
|
|
769
|
-
P(
|
|
769
|
+
P(b.$slots, "default")
|
|
770
770
|
], 2),
|
|
771
|
-
|
|
771
|
+
b.$slots.footer ? (l(), a("div", {
|
|
772
772
|
key: 1,
|
|
773
773
|
class: d([e.compact ? "px-4 py-2" : "px-6 py-4", "border-t border-gray-100 bg-gray-50"])
|
|
774
774
|
}, [
|
|
775
|
-
P(
|
|
776
|
-
], 2)) :
|
|
775
|
+
P(b.$slots, "footer")
|
|
776
|
+
], 2)) : v("", !0)
|
|
777
777
|
], 42, St));
|
|
778
778
|
}
|
|
779
779
|
}), Tt = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, It = { class: "text-xl font-semibold text-gray-900" }, jt = ["disabled"], Lt = { class: "px-8 py-6" }, Ot = {
|
|
780
780
|
key: 0,
|
|
781
781
|
class: "absolute inset-0 flex items-center justify-center bg-white/50 rounded-lg"
|
|
782
|
-
}, At = /* @__PURE__ */
|
|
782
|
+
}, At = /* @__PURE__ */ E({
|
|
783
783
|
__name: "Dialog",
|
|
784
784
|
props: {
|
|
785
785
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -790,20 +790,20 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
790
790
|
},
|
|
791
791
|
emits: ["update:modelValue", "close"],
|
|
792
792
|
setup(t, { emit: g }) {
|
|
793
|
-
const e = t,
|
|
793
|
+
const e = t, m = g, r = s({
|
|
794
794
|
get: () => e.modelValue,
|
|
795
|
-
set: (
|
|
796
|
-
}),
|
|
795
|
+
set: (b) => m("update:modelValue", b)
|
|
796
|
+
}), f = s(() => ({
|
|
797
797
|
sm: "sm:max-w-sm",
|
|
798
798
|
md: "sm:max-w-lg md:max-w-2xl",
|
|
799
799
|
lg: "sm:max-w-2xl md:max-w-4xl",
|
|
800
800
|
xl: "sm:max-w-4xl md:max-w-6xl"
|
|
801
801
|
})[e.size]), u = () => {
|
|
802
|
-
e.loading || (r.value = !1,
|
|
802
|
+
e.loading || (r.value = !1, m("close"));
|
|
803
803
|
}, n = () => {
|
|
804
804
|
e.closeOnBackdrop && !e.loading && u();
|
|
805
805
|
};
|
|
806
|
-
return (
|
|
806
|
+
return (b, z) => (l(), le(he, { to: "body" }, [
|
|
807
807
|
_(ie, { name: "dialog" }, {
|
|
808
808
|
default: re(() => [
|
|
809
809
|
r.value ? (l(), a("div", {
|
|
@@ -811,31 +811,31 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
811
811
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4",
|
|
812
812
|
onClick: n
|
|
813
813
|
}, [
|
|
814
|
-
|
|
815
|
-
class: d(["relative w-full rounded-lg bg-white shadow-xl",
|
|
814
|
+
o("div", {
|
|
815
|
+
class: d(["relative w-full rounded-lg bg-white shadow-xl", f.value]),
|
|
816
816
|
onClick: z[0] || (z[0] = J(() => {
|
|
817
817
|
}, ["stop"]))
|
|
818
818
|
}, [
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
P(
|
|
819
|
+
o("div", Tt, [
|
|
820
|
+
o("h2", It, [
|
|
821
|
+
P(b.$slots, "title", {}, () => [
|
|
822
822
|
H(M(t.title), 1)
|
|
823
823
|
], !0)
|
|
824
824
|
]),
|
|
825
|
-
|
|
825
|
+
o("button", {
|
|
826
826
|
type: "button",
|
|
827
827
|
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",
|
|
828
828
|
"aria-label": "Cerrar diálogo",
|
|
829
829
|
disabled: t.loading,
|
|
830
830
|
onClick: u
|
|
831
831
|
}, [...z[1] || (z[1] = [
|
|
832
|
-
|
|
832
|
+
o("svg", {
|
|
833
833
|
class: "h-6 w-6",
|
|
834
834
|
fill: "none",
|
|
835
835
|
stroke: "currentColor",
|
|
836
836
|
viewBox: "0 0 24 24"
|
|
837
837
|
}, [
|
|
838
|
-
|
|
838
|
+
o("path", {
|
|
839
839
|
"stroke-linecap": "round",
|
|
840
840
|
"stroke-linejoin": "round",
|
|
841
841
|
"stroke-width": "2",
|
|
@@ -844,18 +844,18 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
844
844
|
], -1)
|
|
845
845
|
])], 8, jt)
|
|
846
846
|
]),
|
|
847
|
-
|
|
848
|
-
P(
|
|
847
|
+
o("div", Lt, [
|
|
848
|
+
P(b.$slots, "default", {}, void 0, !0)
|
|
849
849
|
]),
|
|
850
850
|
t.loading ? (l(), a("div", Ot, [...z[2] || (z[2] = [
|
|
851
|
-
|
|
852
|
-
|
|
851
|
+
o("div", { class: "flex items-center gap-2 text-primary-600" }, [
|
|
852
|
+
o("svg", {
|
|
853
853
|
class: "w-5 h-5 animate-spin",
|
|
854
854
|
xmlns: "http://www.w3.org/2000/svg",
|
|
855
855
|
fill: "none",
|
|
856
856
|
viewBox: "0 0 24 24"
|
|
857
857
|
}, [
|
|
858
|
-
|
|
858
|
+
o("circle", {
|
|
859
859
|
class: "opacity-25",
|
|
860
860
|
cx: "12",
|
|
861
861
|
cy: "12",
|
|
@@ -863,41 +863,41 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
863
863
|
stroke: "currentColor",
|
|
864
864
|
"stroke-width": "4"
|
|
865
865
|
}),
|
|
866
|
-
|
|
866
|
+
o("path", {
|
|
867
867
|
class: "opacity-75",
|
|
868
868
|
fill: "currentColor",
|
|
869
869
|
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"
|
|
870
870
|
})
|
|
871
871
|
]),
|
|
872
|
-
|
|
872
|
+
o("span", { class: "text-sm font-medium" }, "Cargando...")
|
|
873
873
|
], -1)
|
|
874
|
-
])])) :
|
|
875
|
-
|
|
874
|
+
])])) : v("", !0),
|
|
875
|
+
b.$slots.footer ? (l(), a("div", {
|
|
876
876
|
key: 1,
|
|
877
877
|
class: d(["border-t border-gray-100 px-8 py-6 bg-gray-50", { "opacity-50 pointer-events-none": t.loading }])
|
|
878
878
|
}, [
|
|
879
|
-
P(
|
|
880
|
-
], 2)) :
|
|
879
|
+
P(b.$slots, "footer", {}, void 0, !0)
|
|
880
|
+
], 2)) : v("", !0)
|
|
881
881
|
], 2)
|
|
882
|
-
])) :
|
|
882
|
+
])) : v("", !0)
|
|
883
883
|
]),
|
|
884
884
|
_: 3
|
|
885
885
|
})
|
|
886
886
|
]));
|
|
887
887
|
}
|
|
888
|
-
}),
|
|
888
|
+
}), lo = /* @__PURE__ */ Z(At, [["__scopeId", "data-v-ea6db288"]]), Wt = ["accept", "multiple", "disabled"], Ft = { class: "flex flex-col items-center justify-center gap-4 text-center" }, Pt = ["src", "alt"], Rt = {
|
|
889
889
|
key: 1,
|
|
890
890
|
class: "w-full h-full text-gray-400",
|
|
891
891
|
fill: "none",
|
|
892
892
|
stroke: "currentColor",
|
|
893
893
|
viewBox: "0 0 24 24"
|
|
894
|
-
},
|
|
894
|
+
}, Et = { class: "text-center" }, qt = { class: "text-base font-medium text-gray-700" }, Nt = { class: "text-primary-500" }, Yt = { class: "flex items-center gap-3 flex-1 min-w-0" }, Ht = { class: "flex-1 min-w-0" }, Kt = { class: "text-sm font-medium text-gray-900 truncate" }, Ut = { class: "text-xs text-gray-500" }, Gt = {
|
|
895
895
|
key: 1,
|
|
896
896
|
class: "text-xs text-gray-500 mt-2"
|
|
897
897
|
}, Jt = {
|
|
898
898
|
key: 2,
|
|
899
899
|
class: "text-sm text-danger-500 mt-2"
|
|
900
|
-
},
|
|
900
|
+
}, ao = /* @__PURE__ */ E({
|
|
901
901
|
__name: "FileUpload",
|
|
902
902
|
props: {
|
|
903
903
|
modelValue: { default: null },
|
|
@@ -920,7 +920,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
920
920
|
},
|
|
921
921
|
emits: ["update:modelValue", "change", "error"],
|
|
922
922
|
setup(t, { emit: g }) {
|
|
923
|
-
const e = t,
|
|
923
|
+
const e = t, m = g, r = R(null), f = R(!1), u = R(e.modelValue), n = R(""), b = s(() => ({
|
|
924
924
|
sm: "w-20 h-20",
|
|
925
925
|
md: "w-32 h-32",
|
|
926
926
|
lg: "w-48 h-48",
|
|
@@ -928,29 +928,29 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
928
928
|
})[e.illustrationSize]), z = () => {
|
|
929
929
|
var I;
|
|
930
930
|
(I = r.value) == null || I.click();
|
|
931
|
-
},
|
|
931
|
+
}, x = () => {
|
|
932
932
|
e.disabled || z();
|
|
933
|
-
}, y = (I) => {
|
|
934
|
-
e.disabled || (p.value = !0);
|
|
935
|
-
}, B = () => {
|
|
936
|
-
p.value = !1;
|
|
937
933
|
}, h = (I) => {
|
|
934
|
+
e.disabled || (f.value = !0);
|
|
935
|
+
}, k = () => {
|
|
936
|
+
f.value = !1;
|
|
937
|
+
}, y = (I) => {
|
|
938
938
|
if (n.value = "", e.maxSize && I.size > e.maxSize) {
|
|
939
939
|
const L = (e.maxSize / 1048576).toFixed(2);
|
|
940
|
-
return n.value = `El archivo excede el tamaño máximo de ${L}MB`,
|
|
940
|
+
return n.value = `El archivo excede el tamaño máximo de ${L}MB`, m("error", n.value), !1;
|
|
941
941
|
}
|
|
942
942
|
return !0;
|
|
943
943
|
}, T = (I) => {
|
|
944
944
|
var F;
|
|
945
945
|
const A = (F = I.target.files) == null ? void 0 : F[0];
|
|
946
|
-
A &&
|
|
946
|
+
A && y(A) && (u.value = A, m("update:modelValue", A), m("change", A));
|
|
947
947
|
}, V = (I) => {
|
|
948
948
|
var A;
|
|
949
|
-
|
|
949
|
+
f.value = !1;
|
|
950
950
|
const L = (A = I.dataTransfer) == null ? void 0 : A.files[0];
|
|
951
|
-
L &&
|
|
951
|
+
L && y(L) && (u.value = L, m("update:modelValue", L), m("change", L));
|
|
952
952
|
}, j = () => {
|
|
953
|
-
u.value = null, n.value = "", r.value && (r.value.value = ""),
|
|
953
|
+
u.value = null, n.value = "", r.value && (r.value.value = ""), m("update:modelValue", null), m("change", null);
|
|
954
954
|
}, W = (I) => {
|
|
955
955
|
if (I === 0) return "0 Bytes";
|
|
956
956
|
const L = 1024, A = ["Bytes", "KB", "MB", "GB"], F = Math.floor(Math.log(I) / Math.log(L));
|
|
@@ -958,15 +958,15 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
958
958
|
};
|
|
959
959
|
return (I, L) => (l(), a("div", {
|
|
960
960
|
class: d(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
961
|
-
|
|
961
|
+
f.value ? "border-primary-500 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
962
962
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
963
963
|
]]),
|
|
964
|
-
onClick:
|
|
965
|
-
onDragover: J(
|
|
966
|
-
onDragleave: J(
|
|
964
|
+
onClick: x,
|
|
965
|
+
onDragover: J(h, ["prevent"]),
|
|
966
|
+
onDragleave: J(k, ["prevent"]),
|
|
967
967
|
onDrop: J(V, ["prevent"])
|
|
968
968
|
}, [
|
|
969
|
-
|
|
969
|
+
o("input", {
|
|
970
970
|
ref_key: "fileInput",
|
|
971
971
|
ref: r,
|
|
972
972
|
type: "file",
|
|
@@ -976,9 +976,9 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
976
976
|
class: "hidden",
|
|
977
977
|
onChange: T
|
|
978
978
|
}, null, 40, Wt),
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
class: d([
|
|
979
|
+
o("div", Ft, [
|
|
980
|
+
o("div", {
|
|
981
|
+
class: d([b.value, "flex items-center justify-center"])
|
|
982
982
|
}, [
|
|
983
983
|
t.illustration ? (l(), a("img", {
|
|
984
984
|
key: 0,
|
|
@@ -986,7 +986,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
986
986
|
alt: t.illustrationAlt,
|
|
987
987
|
class: "max-w-full max-h-full object-contain"
|
|
988
988
|
}, null, 8, Pt)) : (l(), a("svg", Rt, [...L[1] || (L[1] = [
|
|
989
|
-
|
|
989
|
+
o("path", {
|
|
990
990
|
"stroke-linecap": "round",
|
|
991
991
|
"stroke-linejoin": "round",
|
|
992
992
|
"stroke-width": "1.5",
|
|
@@ -994,10 +994,10 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
994
994
|
}, null, -1)
|
|
995
995
|
])]))
|
|
996
996
|
], 2),
|
|
997
|
-
|
|
998
|
-
|
|
997
|
+
o("div", Et, [
|
|
998
|
+
o("p", qt, [
|
|
999
999
|
H(M(t.mainText) + " ", 1),
|
|
1000
|
-
|
|
1000
|
+
o("span", Nt, M(t.linkText), 1)
|
|
1001
1001
|
])
|
|
1002
1002
|
]),
|
|
1003
1003
|
u.value ? (l(), a("div", {
|
|
@@ -1006,65 +1006,142 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1006
1006
|
onClick: L[0] || (L[0] = J(() => {
|
|
1007
1007
|
}, ["stop"]))
|
|
1008
1008
|
}, [
|
|
1009
|
-
|
|
1010
|
-
L[2] || (L[2] =
|
|
1009
|
+
o("div", Yt, [
|
|
1010
|
+
L[2] || (L[2] = o("svg", {
|
|
1011
1011
|
class: "w-6 h-6 text-gray-600 flex-shrink-0",
|
|
1012
1012
|
fill: "none",
|
|
1013
1013
|
stroke: "currentColor",
|
|
1014
1014
|
viewBox: "0 0 24 24"
|
|
1015
1015
|
}, [
|
|
1016
|
-
|
|
1016
|
+
o("path", {
|
|
1017
1017
|
"stroke-linecap": "round",
|
|
1018
1018
|
"stroke-linejoin": "round",
|
|
1019
1019
|
"stroke-width": "2",
|
|
1020
1020
|
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"
|
|
1021
1021
|
})
|
|
1022
1022
|
], -1)),
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1023
|
+
o("div", Ht, [
|
|
1024
|
+
o("p", Kt, M(u.value.name), 1),
|
|
1025
|
+
o("p", Ut, M(W(u.value.size)), 1)
|
|
1026
1026
|
])
|
|
1027
1027
|
]),
|
|
1028
|
-
t.disabled ?
|
|
1028
|
+
t.disabled ? v("", !0) : (l(), a("button", {
|
|
1029
1029
|
key: 0,
|
|
1030
1030
|
onClick: J(j, ["stop"]),
|
|
1031
1031
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
1032
1032
|
}, [...L[3] || (L[3] = [
|
|
1033
|
-
|
|
1033
|
+
o("svg", {
|
|
1034
1034
|
class: "w-5 h-5",
|
|
1035
1035
|
fill: "currentColor",
|
|
1036
1036
|
viewBox: "0 0 20 20"
|
|
1037
1037
|
}, [
|
|
1038
|
-
|
|
1038
|
+
o("path", {
|
|
1039
1039
|
"fill-rule": "evenodd",
|
|
1040
1040
|
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",
|
|
1041
1041
|
"clip-rule": "evenodd"
|
|
1042
1042
|
})
|
|
1043
1043
|
], -1)
|
|
1044
1044
|
])]))
|
|
1045
|
-
])) :
|
|
1046
|
-
t.helperText ? (l(), a("p", Gt, M(t.helperText), 1)) :
|
|
1047
|
-
n.value ? (l(), a("p", Jt, M(n.value), 1)) :
|
|
1045
|
+
])) : v("", !0),
|
|
1046
|
+
t.helperText ? (l(), a("p", Gt, M(t.helperText), 1)) : v("", !0),
|
|
1047
|
+
n.value ? (l(), a("p", Jt, M(n.value), 1)) : v("", !0)
|
|
1048
1048
|
])
|
|
1049
1049
|
], 34));
|
|
1050
1050
|
}
|
|
1051
|
-
}), Qt =
|
|
1051
|
+
}), Qt = ["src", "alt", "title", "loading"], oo = /* @__PURE__ */ E({
|
|
1052
|
+
__name: "Image",
|
|
1053
|
+
props: {
|
|
1054
|
+
src: {},
|
|
1055
|
+
alt: { default: "" },
|
|
1056
|
+
title: { default: "" },
|
|
1057
|
+
width: {},
|
|
1058
|
+
height: {},
|
|
1059
|
+
objectFit: { default: "cover" },
|
|
1060
|
+
objectPosition: { default: "center" },
|
|
1061
|
+
rounded: { default: "md" },
|
|
1062
|
+
shadow: { default: "none" },
|
|
1063
|
+
bordered: { type: Boolean, default: !1 },
|
|
1064
|
+
borderColor: {},
|
|
1065
|
+
opacity: { default: 100 },
|
|
1066
|
+
loading: { default: "lazy" },
|
|
1067
|
+
class: { default: "" }
|
|
1068
|
+
},
|
|
1069
|
+
emits: ["load", "error"],
|
|
1070
|
+
setup(t, { emit: g }) {
|
|
1071
|
+
const e = t, m = g, r = {
|
|
1072
|
+
none: "rounded-none",
|
|
1073
|
+
sm: "rounded-sm",
|
|
1074
|
+
md: "rounded-md",
|
|
1075
|
+
lg: "rounded-lg",
|
|
1076
|
+
xl: "rounded-xl",
|
|
1077
|
+
full: "rounded-full"
|
|
1078
|
+
}, f = {
|
|
1079
|
+
none: "",
|
|
1080
|
+
sm: "shadow-sm",
|
|
1081
|
+
md: "shadow",
|
|
1082
|
+
lg: "shadow-lg",
|
|
1083
|
+
xl: "shadow-xl"
|
|
1084
|
+
}, u = {
|
|
1085
|
+
cover: "object-cover",
|
|
1086
|
+
contain: "object-contain",
|
|
1087
|
+
fill: "object-fill",
|
|
1088
|
+
"scale-down": "object-scale-down"
|
|
1089
|
+
}, n = {
|
|
1090
|
+
center: "object-center",
|
|
1091
|
+
top: "object-top",
|
|
1092
|
+
bottom: "object-bottom",
|
|
1093
|
+
left: "object-left",
|
|
1094
|
+
right: "object-right",
|
|
1095
|
+
"top-left": "object-top-left",
|
|
1096
|
+
"top-right": "object-top-right",
|
|
1097
|
+
"bottom-left": "object-bottom-left",
|
|
1098
|
+
"bottom-right": "object-bottom-right"
|
|
1099
|
+
}, b = s(() => [
|
|
1100
|
+
"w-full h-full",
|
|
1101
|
+
r[e.rounded],
|
|
1102
|
+
f[e.shadow],
|
|
1103
|
+
u[e.objectFit],
|
|
1104
|
+
n[e.objectPosition],
|
|
1105
|
+
e.bordered ? `border border-${e.borderColor || "gray-200"}` : "",
|
|
1106
|
+
e.class
|
|
1107
|
+
]), z = s(() => {
|
|
1108
|
+
const k = {
|
|
1109
|
+
opacity: e.opacity / 100
|
|
1110
|
+
};
|
|
1111
|
+
return e.width && (k.width = typeof e.width == "number" ? `${e.width}px` : e.width), e.height && (k.height = typeof e.height == "number" ? `${e.height}px` : e.height), k;
|
|
1112
|
+
}), x = () => {
|
|
1113
|
+
m("load");
|
|
1114
|
+
}, h = (k) => {
|
|
1115
|
+
m("error", k);
|
|
1116
|
+
};
|
|
1117
|
+
return (k, y) => (l(), a("img", {
|
|
1118
|
+
src: t.src,
|
|
1119
|
+
alt: t.alt,
|
|
1120
|
+
title: t.title,
|
|
1121
|
+
class: d(b.value),
|
|
1122
|
+
loading: t.loading,
|
|
1123
|
+
style: q(z.value),
|
|
1124
|
+
onLoad: x,
|
|
1125
|
+
onError: h
|
|
1126
|
+
}, null, 46, Qt));
|
|
1127
|
+
}
|
|
1128
|
+
}), Zt = { class: "input-wrapper" }, Xt = ["for"], _t = {
|
|
1052
1129
|
key: 0,
|
|
1053
1130
|
class: "text-danger-600"
|
|
1054
|
-
},
|
|
1131
|
+
}, el = { class: "relative flex items-center" }, tl = ["id", "type", "disabled", "placeholder", "value", "required", "readonly"], ll = {
|
|
1055
1132
|
key: 1,
|
|
1056
1133
|
class: "absolute right-3 flex items-center gap-2"
|
|
1057
|
-
},
|
|
1134
|
+
}, al = {
|
|
1058
1135
|
key: 2,
|
|
1059
1136
|
class: "absolute right-3 top-1/2 -translate-y-1/2 text-danger-600"
|
|
1060
|
-
},
|
|
1137
|
+
}, ol = {
|
|
1061
1138
|
key: 1,
|
|
1062
1139
|
class: "mt-1 text-sm text-danger-600"
|
|
1063
1140
|
}, sl = {
|
|
1064
1141
|
key: 2,
|
|
1065
1142
|
class: "text-sm",
|
|
1066
1143
|
style: { color: "#565656" }
|
|
1067
|
-
},
|
|
1144
|
+
}, rl = /* @__PURE__ */ E({
|
|
1068
1145
|
__name: "Input",
|
|
1069
1146
|
props: {
|
|
1070
1147
|
modelValue: { default: "" },
|
|
@@ -1085,109 +1162,109 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1085
1162
|
},
|
|
1086
1163
|
emits: ["update:modelValue", "blur", "focus", "clear"],
|
|
1087
1164
|
setup(t, { emit: g }) {
|
|
1088
|
-
const e = t,
|
|
1089
|
-
const
|
|
1165
|
+
const e = t, m = g, r = R(`input-${Math.random().toString(36).substr(2, 9)}`), f = s(() => "ds-label"), u = s(() => {
|
|
1166
|
+
const k = "w-full rounded-md transition-all focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", y = {
|
|
1090
1167
|
sm: e.compact ? "h-6 px-2 text-xs" : "h-8 px-3 text-sm",
|
|
1091
1168
|
md: e.compact ? "h-8 px-3 text-sm" : "h-10 px-4 text-base",
|
|
1092
1169
|
lg: e.compact ? "h-10 px-4 text-base" : "h-12 px-5 text-lg"
|
|
1093
1170
|
}, T = e.prefix ? "pl-9" : "", V = e.clearable || e.error && !e.suffix && !e.clearable ? "pr-10" : "";
|
|
1094
|
-
return `${
|
|
1095
|
-
}), n =
|
|
1096
|
-
const
|
|
1171
|
+
return `${k} ${y[e.size]} ${T} ${V} bg-white border rounded-md transition-all`;
|
|
1172
|
+
}), n = s(() => {
|
|
1173
|
+
const k = e.error ? "#dc2626" : "#565656", y = e.variant === "outlined" ? "2px" : "1px";
|
|
1097
1174
|
return e.error, e.error, {
|
|
1098
|
-
borderColor:
|
|
1099
|
-
borderWidth:
|
|
1175
|
+
borderColor: k,
|
|
1176
|
+
borderWidth: y,
|
|
1100
1177
|
borderStyle: "solid"
|
|
1101
1178
|
};
|
|
1102
|
-
}),
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1105
|
-
}, z = (
|
|
1106
|
-
|
|
1107
|
-
},
|
|
1108
|
-
|
|
1109
|
-
},
|
|
1110
|
-
|
|
1179
|
+
}), b = (k) => {
|
|
1180
|
+
const y = k.target;
|
|
1181
|
+
m("update:modelValue", y.value);
|
|
1182
|
+
}, z = (k) => {
|
|
1183
|
+
m("blur", k);
|
|
1184
|
+
}, x = (k) => {
|
|
1185
|
+
m("focus", k);
|
|
1186
|
+
}, h = () => {
|
|
1187
|
+
m("update:modelValue", ""), m("clear");
|
|
1111
1188
|
};
|
|
1112
|
-
return (
|
|
1189
|
+
return (k, y) => (l(), a("div", Zt, [
|
|
1113
1190
|
t.label ? (l(), a("label", {
|
|
1114
1191
|
key: 0,
|
|
1115
1192
|
for: r.value,
|
|
1116
|
-
class: d(
|
|
1193
|
+
class: d(f.value)
|
|
1117
1194
|
}, [
|
|
1118
1195
|
H(M(t.label) + " ", 1),
|
|
1119
|
-
t.required ? (l(), a("span",
|
|
1120
|
-
], 10,
|
|
1121
|
-
|
|
1196
|
+
t.required ? (l(), a("span", _t, "*")) : v("", !0)
|
|
1197
|
+
], 10, Xt)) : v("", !0),
|
|
1198
|
+
o("div", el, [
|
|
1122
1199
|
t.prefix ? (l(), a("span", {
|
|
1123
1200
|
key: 0,
|
|
1124
1201
|
class: "absolute left-3 text-sm",
|
|
1125
|
-
style:
|
|
1126
|
-
}, M(t.prefix), 5)) :
|
|
1127
|
-
|
|
1202
|
+
style: q({ color: t.error ? "#dc2626" : "#565656" })
|
|
1203
|
+
}, M(t.prefix), 5)) : v("", !0),
|
|
1204
|
+
o("input", {
|
|
1128
1205
|
id: r.value,
|
|
1129
1206
|
class: d(u.value),
|
|
1130
|
-
style:
|
|
1207
|
+
style: q(n.value),
|
|
1131
1208
|
type: t.type,
|
|
1132
1209
|
disabled: t.disabled,
|
|
1133
1210
|
placeholder: t.placeholder,
|
|
1134
1211
|
value: t.modelValue,
|
|
1135
1212
|
required: t.required,
|
|
1136
1213
|
readonly: t.readonly,
|
|
1137
|
-
onInput:
|
|
1214
|
+
onInput: b,
|
|
1138
1215
|
onBlur: z,
|
|
1139
|
-
onFocus:
|
|
1140
|
-
}, null, 46,
|
|
1141
|
-
t.clearable || t.suffix ? (l(), a("div",
|
|
1216
|
+
onFocus: x
|
|
1217
|
+
}, null, 46, tl),
|
|
1218
|
+
t.clearable || t.suffix ? (l(), a("div", ll, [
|
|
1142
1219
|
t.clearable && t.modelValue ? (l(), a("button", {
|
|
1143
1220
|
key: 0,
|
|
1144
1221
|
type: "button",
|
|
1145
1222
|
class: "transition-colors",
|
|
1146
|
-
style:
|
|
1223
|
+
style: q({ color: t.error ? "#dc2626" : "#565656", cursor: "pointer", opacity: "1" }),
|
|
1147
1224
|
"aria-label": "Limpiar",
|
|
1148
|
-
onClick:
|
|
1149
|
-
}, [...
|
|
1150
|
-
|
|
1225
|
+
onClick: h
|
|
1226
|
+
}, [...y[0] || (y[0] = [
|
|
1227
|
+
o("svg", {
|
|
1151
1228
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1152
1229
|
class: "h-4 w-4",
|
|
1153
1230
|
viewBox: "0 0 20 20",
|
|
1154
1231
|
fill: "currentColor"
|
|
1155
1232
|
}, [
|
|
1156
|
-
|
|
1233
|
+
o("path", {
|
|
1157
1234
|
"fill-rule": "evenodd",
|
|
1158
1235
|
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",
|
|
1159
1236
|
"clip-rule": "evenodd"
|
|
1160
1237
|
})
|
|
1161
1238
|
], -1)
|
|
1162
|
-
])], 4)) :
|
|
1239
|
+
])], 4)) : v("", !0),
|
|
1163
1240
|
t.suffix && !t.clearable ? (l(), a("span", {
|
|
1164
1241
|
key: 1,
|
|
1165
1242
|
class: "text-sm",
|
|
1166
|
-
style:
|
|
1167
|
-
}, M(t.suffix), 5)) :
|
|
1168
|
-
])) :
|
|
1169
|
-
t.error && !t.suffix && !t.clearable ? (l(), a("span",
|
|
1170
|
-
|
|
1243
|
+
style: q({ color: t.error ? "#dc2626" : "#565656" })
|
|
1244
|
+
}, M(t.suffix), 5)) : v("", !0)
|
|
1245
|
+
])) : v("", !0),
|
|
1246
|
+
t.error && !t.suffix && !t.clearable ? (l(), a("span", al, [...y[1] || (y[1] = [
|
|
1247
|
+
o("svg", {
|
|
1171
1248
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1172
1249
|
class: "h-5 w-5",
|
|
1173
1250
|
viewBox: "0 0 20 20",
|
|
1174
1251
|
fill: "currentColor"
|
|
1175
1252
|
}, [
|
|
1176
|
-
|
|
1253
|
+
o("path", {
|
|
1177
1254
|
"fill-rule": "evenodd",
|
|
1178
1255
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
|
|
1179
1256
|
"clip-rule": "evenodd"
|
|
1180
1257
|
})
|
|
1181
1258
|
], -1)
|
|
1182
|
-
])])) :
|
|
1259
|
+
])])) : v("", !0)
|
|
1183
1260
|
]),
|
|
1184
|
-
t.error ? (l(), a("p",
|
|
1261
|
+
t.error ? (l(), a("p", ol, M(t.error), 1)) : t.helperText ? (l(), a("p", sl, M(t.helperText), 1)) : v("", !0)
|
|
1185
1262
|
]));
|
|
1186
1263
|
}
|
|
1187
|
-
}),
|
|
1264
|
+
}), so = /* @__PURE__ */ Z(rl, [["__scopeId", "data-v-37a70082"]]), nl = ["stroke-width"], il = {
|
|
1188
1265
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
1189
1266
|
style: { "background-color": "#f7f7f7" }
|
|
1190
|
-
},
|
|
1267
|
+
}, dl = /* @__PURE__ */ E({
|
|
1191
1268
|
__name: "Loader",
|
|
1192
1269
|
props: {
|
|
1193
1270
|
type: { default: "circular" },
|
|
@@ -1205,24 +1282,24 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1205
1282
|
warning: "text-warning-500",
|
|
1206
1283
|
danger: "text-danger-500",
|
|
1207
1284
|
info: "text-info-500"
|
|
1208
|
-
},
|
|
1285
|
+
}, m = {
|
|
1209
1286
|
primary: "bg-primary-700",
|
|
1210
1287
|
secondary: "bg-secondary-500",
|
|
1211
1288
|
success: "bg-success-500",
|
|
1212
1289
|
warning: "bg-warning-500",
|
|
1213
1290
|
danger: "bg-danger-500",
|
|
1214
1291
|
info: "bg-info-500"
|
|
1215
|
-
}, r =
|
|
1292
|
+
}, r = s(() => [e[g.color]]), f = s(() => [m[g.color]]);
|
|
1216
1293
|
return (u, n) => t.type === "circular" ? (l(), a("div", {
|
|
1217
1294
|
key: 0,
|
|
1218
1295
|
class: d(r.value)
|
|
1219
1296
|
}, [
|
|
1220
1297
|
(l(), a("svg", {
|
|
1221
1298
|
class: "animate-spin",
|
|
1222
|
-
style:
|
|
1299
|
+
style: q({ width: t.size, height: t.size }),
|
|
1223
1300
|
viewBox: "0 0 24 24"
|
|
1224
1301
|
}, [
|
|
1225
|
-
|
|
1302
|
+
o("circle", {
|
|
1226
1303
|
class: "opacity-25",
|
|
1227
1304
|
cx: "12",
|
|
1228
1305
|
cy: "12",
|
|
@@ -1230,8 +1307,8 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1230
1307
|
stroke: "currentColor",
|
|
1231
1308
|
"stroke-width": t.strokeWidth,
|
|
1232
1309
|
fill: "none"
|
|
1233
|
-
}, null, 8,
|
|
1234
|
-
n[0] || (n[0] =
|
|
1310
|
+
}, null, 8, nl),
|
|
1311
|
+
n[0] || (n[0] = o("path", {
|
|
1235
1312
|
class: "opacity-75",
|
|
1236
1313
|
fill: "currentColor",
|
|
1237
1314
|
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"
|
|
@@ -1240,32 +1317,32 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1240
1317
|
], 2)) : t.type === "linear" ? (l(), a("div", {
|
|
1241
1318
|
key: 1,
|
|
1242
1319
|
class: "w-full",
|
|
1243
|
-
style:
|
|
1320
|
+
style: q({ height: t.height })
|
|
1244
1321
|
}, [
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
class: d([[
|
|
1248
|
-
style:
|
|
1322
|
+
o("div", il, [
|
|
1323
|
+
o("div", {
|
|
1324
|
+
class: d([[f.value, { "animate-linear-loader": t.progress === void 0 }], "h-full rounded-lg"]),
|
|
1325
|
+
style: q({ width: t.progress !== void 0 ? `${Math.min(Math.max(t.progress, 0), 100)}%` : "100%" })
|
|
1249
1326
|
}, null, 6)
|
|
1250
1327
|
])
|
|
1251
|
-
], 4)) :
|
|
1328
|
+
], 4)) : v("", !0);
|
|
1252
1329
|
}
|
|
1253
|
-
}),
|
|
1330
|
+
}), ro = /* @__PURE__ */ Z(dl, [["__scopeId", "data-v-f369fb46"]]), cl = ["disabled", "aria-expanded"], ul = ["disabled", "onClick"], fl = {
|
|
1254
1331
|
key: 0,
|
|
1255
1332
|
class: "flex-shrink-0"
|
|
1256
|
-
},
|
|
1333
|
+
}, pl = { class: "flex-1 min-w-0 mr-2" }, ml = { class: "flex flex-col items-start" }, bl = ["title"], vl = ["title"], gl = {
|
|
1257
1334
|
key: 1,
|
|
1258
1335
|
class: "flex-shrink-0"
|
|
1259
|
-
},
|
|
1336
|
+
}, hl = {
|
|
1260
1337
|
key: 0,
|
|
1261
1338
|
class: "text-xs text-secondary-400 font-mono whitespace-nowrap"
|
|
1262
|
-
}, yl = { key: 1 },
|
|
1339
|
+
}, yl = { key: 1 }, xl = {
|
|
1263
1340
|
key: 2,
|
|
1264
1341
|
class: "w-4 h-4 ml-2 flex-shrink-0",
|
|
1265
1342
|
fill: "none",
|
|
1266
1343
|
stroke: "currentColor",
|
|
1267
1344
|
viewBox: "0 0 24 24"
|
|
1268
|
-
},
|
|
1345
|
+
}, wl = /* @__PURE__ */ E({
|
|
1269
1346
|
__name: "Menu",
|
|
1270
1347
|
props: {
|
|
1271
1348
|
items: { default: () => [] },
|
|
@@ -1289,84 +1366,84 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1289
1366
|
},
|
|
1290
1367
|
emits: ["open", "close", "select"],
|
|
1291
1368
|
setup(t, { emit: g }) {
|
|
1292
|
-
let e = null,
|
|
1293
|
-
const r = t,
|
|
1369
|
+
let e = null, m = null;
|
|
1370
|
+
const r = t, f = g, u = R(!1), n = R(null), b = R(null), z = R({}), x = s(() => [
|
|
1294
1371
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
1295
1372
|
"bg-white border border-secondary-300 rounded-md text-secondary-700",
|
|
1296
1373
|
"hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
|
|
1297
1374
|
"focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
1298
1375
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1299
1376
|
"transition-all duration-200"
|
|
1300
|
-
].join(" ")),
|
|
1377
|
+
].join(" ")), h = s(() => [...[
|
|
1301
1378
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
1302
1379
|
"flex flex-col",
|
|
1303
1380
|
"focus:outline-none"
|
|
1304
|
-
], `z-${r.zIndex}`].join(" ")),
|
|
1381
|
+
], `z-${r.zIndex}`].join(" ")), k = s(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), y = s(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), T = s(() => "py-1 overflow-y-auto flex-1 min-h-0"), V = s(() => "my-1 border-t border-secondary-200"), j = s(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), W = (c) => {
|
|
1305
1382
|
const D = [
|
|
1306
1383
|
"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left",
|
|
1307
1384
|
"transition-all duration-150 focus:outline-none cursor-pointer",
|
|
1308
1385
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1309
|
-
],
|
|
1386
|
+
], w = c.variant || "default", X = {
|
|
1310
1387
|
default: "text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100",
|
|
1311
1388
|
danger: "text-danger-600 hover:bg-danger-100 hover:text-danger-700 focus:bg-danger-100",
|
|
1312
1389
|
success: "text-success-600 hover:bg-success-100 hover:text-success-700 focus:bg-success-100",
|
|
1313
1390
|
warning: "text-warning-600 hover:bg-warning-100 hover:text-warning-700 focus:bg-warning-100"
|
|
1314
1391
|
};
|
|
1315
|
-
let
|
|
1316
|
-
return c.color && (
|
|
1392
|
+
let N = "";
|
|
1393
|
+
return c.color && (N = c.color, (c.color.includes("white") || c.color.includes("50")) && (N += " hover:text-black")), [...D, N || X[w]].join(" ");
|
|
1317
1394
|
}, I = () => {
|
|
1318
|
-
r.disabled || (u.value ? A() : (
|
|
1395
|
+
r.disabled || (u.value ? A() : (m && clearTimeout(m), e = setTimeout(() => {
|
|
1319
1396
|
L();
|
|
1320
1397
|
}, r.openDelay)));
|
|
1321
1398
|
}, L = () => {
|
|
1322
|
-
u.value = !0,
|
|
1323
|
-
|
|
1399
|
+
u.value = !0, f("open"), be(() => {
|
|
1400
|
+
B(), document.addEventListener("click", $), document.addEventListener("keydown", p);
|
|
1324
1401
|
});
|
|
1325
1402
|
}, A = () => {
|
|
1326
|
-
e && clearTimeout(e),
|
|
1327
|
-
u.value = !1,
|
|
1403
|
+
e && clearTimeout(e), m = setTimeout(() => {
|
|
1404
|
+
u.value = !1, f("close"), document.removeEventListener("click", $), document.removeEventListener("keydown", p);
|
|
1328
1405
|
}, r.closeDelay);
|
|
1329
1406
|
}, F = (c) => {
|
|
1330
|
-
c.disabled || (c.action && c.action(),
|
|
1331
|
-
},
|
|
1407
|
+
c.disabled || (c.action && c.action(), f("select", c), (r.closeOnClick || r.closeOnSelect) && !c.children && A());
|
|
1408
|
+
}, $ = (c) => {
|
|
1332
1409
|
const D = c.target;
|
|
1333
|
-
n.value && !n.value.contains(D) &&
|
|
1334
|
-
},
|
|
1410
|
+
n.value && !n.value.contains(D) && b.value && !b.value.contains(D) && A();
|
|
1411
|
+
}, p = (c) => {
|
|
1335
1412
|
c.key === "Escape" && A();
|
|
1336
1413
|
}, i = (c) => {
|
|
1337
1414
|
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), I());
|
|
1338
|
-
},
|
|
1339
|
-
if (!n.value || !
|
|
1340
|
-
const c = n.value.getBoundingClientRect(), D =
|
|
1341
|
-
let
|
|
1415
|
+
}, B = () => {
|
|
1416
|
+
if (!n.value || !b.value) return;
|
|
1417
|
+
const c = n.value.getBoundingClientRect(), D = b.value.getBoundingClientRect(), w = window.innerWidth, X = window.innerHeight;
|
|
1418
|
+
let N = 0, K = 0;
|
|
1342
1419
|
switch (r.position) {
|
|
1343
1420
|
case "bottom-start":
|
|
1344
|
-
|
|
1421
|
+
N = c.bottom + r.offset.y, K = c.left + r.offset.x;
|
|
1345
1422
|
break;
|
|
1346
1423
|
case "bottom-end":
|
|
1347
|
-
|
|
1424
|
+
N = c.bottom + r.offset.y, K = c.right - D.width + r.offset.x;
|
|
1348
1425
|
break;
|
|
1349
1426
|
case "top-start":
|
|
1350
|
-
|
|
1427
|
+
N = c.top - D.height - r.offset.y, K = c.left + r.offset.x;
|
|
1351
1428
|
break;
|
|
1352
1429
|
case "top-end":
|
|
1353
|
-
|
|
1430
|
+
N = c.top - D.height - r.offset.y, K = c.right - D.width + r.offset.x;
|
|
1354
1431
|
break;
|
|
1355
1432
|
case "right-start":
|
|
1356
|
-
|
|
1433
|
+
N = c.top + r.offset.y, K = c.right + r.offset.x;
|
|
1357
1434
|
break;
|
|
1358
1435
|
case "right-end":
|
|
1359
|
-
|
|
1436
|
+
N = c.bottom - D.height + r.offset.y, K = c.right + r.offset.x;
|
|
1360
1437
|
break;
|
|
1361
1438
|
case "left-start":
|
|
1362
|
-
|
|
1439
|
+
N = c.top + r.offset.y, K = c.left - D.width - r.offset.x;
|
|
1363
1440
|
break;
|
|
1364
1441
|
case "left-end":
|
|
1365
|
-
|
|
1442
|
+
N = c.bottom - D.height + r.offset.y, K = c.left - D.width - r.offset.x;
|
|
1366
1443
|
break;
|
|
1367
1444
|
}
|
|
1368
|
-
K + D.width >
|
|
1369
|
-
top: `${
|
|
1445
|
+
K + D.width > w && (K = w - D.width - 8), K < 8 && (K = 8), N + D.height > X && (N = X - D.height - 8), N < 8 && (N = 8), z.value = {
|
|
1446
|
+
top: `${N}px`,
|
|
1370
1447
|
left: `${K}px`,
|
|
1371
1448
|
width: r.width === "auto" ? `${Math.max(c.width, 240)}px` : r.width,
|
|
1372
1449
|
maxHeight: r.maxHeight,
|
|
@@ -1374,15 +1451,15 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1374
1451
|
};
|
|
1375
1452
|
};
|
|
1376
1453
|
return ve(() => {
|
|
1377
|
-
window.addEventListener("scroll",
|
|
1454
|
+
window.addEventListener("scroll", B, !0), window.addEventListener("resize", B);
|
|
1378
1455
|
}), ge(() => {
|
|
1379
|
-
window.removeEventListener("scroll",
|
|
1456
|
+
window.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B), document.removeEventListener("click", $), document.removeEventListener("keydown", p);
|
|
1380
1457
|
}), de(() => r.items, () => {
|
|
1381
|
-
u.value && be(
|
|
1458
|
+
u.value && be(B);
|
|
1382
1459
|
}, { deep: !0 }), (c, D) => (l(), a("div", {
|
|
1383
1460
|
class: d(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
1384
1461
|
}, [
|
|
1385
|
-
|
|
1462
|
+
o("div", {
|
|
1386
1463
|
ref_key: "triggerRef",
|
|
1387
1464
|
ref: n
|
|
1388
1465
|
}, [
|
|
@@ -1390,9 +1467,9 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1390
1467
|
isOpen: u.value,
|
|
1391
1468
|
toggle: I
|
|
1392
1469
|
}, () => [
|
|
1393
|
-
|
|
1470
|
+
o("button", {
|
|
1394
1471
|
type: "button",
|
|
1395
|
-
class: d(
|
|
1472
|
+
class: d(x.value),
|
|
1396
1473
|
disabled: t.disabled,
|
|
1397
1474
|
onClick: I,
|
|
1398
1475
|
onKeydown: i,
|
|
@@ -1411,149 +1488,149 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1411
1488
|
stroke: "currentColor",
|
|
1412
1489
|
viewBox: "0 0 24 24"
|
|
1413
1490
|
}, [...D[1] || (D[1] = [
|
|
1414
|
-
|
|
1491
|
+
o("path", {
|
|
1415
1492
|
"stroke-linecap": "round",
|
|
1416
1493
|
"stroke-linejoin": "round",
|
|
1417
1494
|
"stroke-width": "2",
|
|
1418
1495
|
d: "M19 9l-7 7-7-7"
|
|
1419
1496
|
}, null, -1)
|
|
1420
|
-
])], 2)) :
|
|
1421
|
-
], 42,
|
|
1497
|
+
])], 2)) : v("", !0)
|
|
1498
|
+
], 42, cl)
|
|
1422
1499
|
], !0)
|
|
1423
1500
|
], 512),
|
|
1424
|
-
(l(), le(
|
|
1501
|
+
(l(), le(he, { to: "body" }, [
|
|
1425
1502
|
u.value ? (l(), a("div", {
|
|
1426
1503
|
key: 0,
|
|
1427
1504
|
ref_key: "menuRef",
|
|
1428
|
-
ref:
|
|
1429
|
-
class: d(
|
|
1430
|
-
style:
|
|
1505
|
+
ref: b,
|
|
1506
|
+
class: d(h.value),
|
|
1507
|
+
style: q(z.value),
|
|
1431
1508
|
onClick: D[0] || (D[0] = J(() => {
|
|
1432
1509
|
}, ["stop"]))
|
|
1433
1510
|
}, [
|
|
1434
1511
|
c.$slots.header ? (l(), a("div", {
|
|
1435
1512
|
key: 0,
|
|
1436
|
-
class: d(
|
|
1513
|
+
class: d(k.value)
|
|
1437
1514
|
}, [
|
|
1438
1515
|
P(c.$slots, "header", { close: A }, void 0, !0)
|
|
1439
|
-
], 2)) :
|
|
1440
|
-
|
|
1516
|
+
], 2)) : v("", !0),
|
|
1517
|
+
o("div", {
|
|
1441
1518
|
class: d(T.value)
|
|
1442
1519
|
}, [
|
|
1443
1520
|
P(c.$slots, "default", {
|
|
1444
1521
|
close: A,
|
|
1445
1522
|
isOpen: u.value
|
|
1446
1523
|
}, () => [
|
|
1447
|
-
(l(!0), a(U, null, Q(t.items, (
|
|
1448
|
-
key:
|
|
1524
|
+
(l(!0), a(U, null, Q(t.items, (w, X) => (l(), a(U, {
|
|
1525
|
+
key: w.id || X
|
|
1449
1526
|
}, [
|
|
1450
|
-
|
|
1527
|
+
w.type === "divider" ? (l(), a("div", {
|
|
1451
1528
|
key: 0,
|
|
1452
1529
|
class: d(V.value)
|
|
1453
|
-
}, null, 2)) :
|
|
1530
|
+
}, null, 2)) : w.type === "header" ? (l(), a("div", {
|
|
1454
1531
|
key: 1,
|
|
1455
1532
|
class: d(j.value)
|
|
1456
|
-
}, M(
|
|
1533
|
+
}, M(w.label), 3)) : (l(), a("button", {
|
|
1457
1534
|
key: 2,
|
|
1458
1535
|
type: "button",
|
|
1459
|
-
class: d(W(
|
|
1460
|
-
disabled:
|
|
1461
|
-
onClick: (
|
|
1536
|
+
class: d(W(w)),
|
|
1537
|
+
disabled: w.disabled,
|
|
1538
|
+
onClick: (N) => F(w)
|
|
1462
1539
|
}, [
|
|
1463
|
-
|
|
1464
|
-
P(c.$slots, `icon-${
|
|
1465
|
-
typeof
|
|
1540
|
+
w.icon || c.$slots[`icon-${w.id}`] ? (l(), a("span", fl, [
|
|
1541
|
+
P(c.$slots, `icon-${w.id}`, { item: w }, () => [
|
|
1542
|
+
typeof w.icon == "string" ? (l(), le(ee, {
|
|
1466
1543
|
key: 0,
|
|
1467
|
-
name:
|
|
1544
|
+
name: w.icon,
|
|
1468
1545
|
size: "sm"
|
|
1469
|
-
}, null, 8, ["name"])) : (l(), le(
|
|
1546
|
+
}, null, 8, ["name"])) : (l(), le(ye(w.icon), {
|
|
1470
1547
|
key: 1,
|
|
1471
1548
|
class: "w-5 h-5"
|
|
1472
1549
|
}))
|
|
1473
1550
|
], !0)
|
|
1474
|
-
])) :
|
|
1475
|
-
|
|
1476
|
-
P(c.$slots, `item-${
|
|
1477
|
-
item:
|
|
1551
|
+
])) : v("", !0),
|
|
1552
|
+
o("div", pl, [
|
|
1553
|
+
P(c.$slots, `item-${w.id}`, {
|
|
1554
|
+
item: w,
|
|
1478
1555
|
close: A
|
|
1479
1556
|
}, () => [
|
|
1480
|
-
|
|
1481
|
-
|
|
1557
|
+
o("div", ml, [
|
|
1558
|
+
o("span", {
|
|
1482
1559
|
class: "truncate w-full",
|
|
1483
|
-
title:
|
|
1484
|
-
}, M(
|
|
1485
|
-
|
|
1560
|
+
title: w.label
|
|
1561
|
+
}, M(w.label), 9, bl),
|
|
1562
|
+
w.description ? (l(), a("span", {
|
|
1486
1563
|
key: 0,
|
|
1487
1564
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
1488
|
-
title:
|
|
1489
|
-
}, M(
|
|
1565
|
+
title: w.description
|
|
1566
|
+
}, M(w.description), 9, vl)) : v("", !0)
|
|
1490
1567
|
])
|
|
1491
1568
|
], !0)
|
|
1492
1569
|
]),
|
|
1493
|
-
|
|
1494
|
-
P(c.$slots, `suffix-${
|
|
1495
|
-
|
|
1570
|
+
w.suffix || w.shortcut || c.$slots[`suffix-${w.id}`] ? (l(), a("span", gl, [
|
|
1571
|
+
P(c.$slots, `suffix-${w.id}`, { item: w }, () => [
|
|
1572
|
+
w.shortcut ? (l(), a("span", hl, M(w.shortcut), 1)) : w.suffix ? (l(), a("span", yl, M(w.suffix), 1)) : v("", !0)
|
|
1496
1573
|
], !0)
|
|
1497
|
-
])) :
|
|
1498
|
-
|
|
1499
|
-
|
|
1574
|
+
])) : v("", !0),
|
|
1575
|
+
w.children && w.children.length > 0 ? (l(), a("svg", xl, [...D[2] || (D[2] = [
|
|
1576
|
+
o("path", {
|
|
1500
1577
|
"stroke-linecap": "round",
|
|
1501
1578
|
"stroke-linejoin": "round",
|
|
1502
1579
|
"stroke-width": "2",
|
|
1503
1580
|
d: "M9 5l7 7-7 7"
|
|
1504
1581
|
}, null, -1)
|
|
1505
|
-
])])) :
|
|
1506
|
-
], 10,
|
|
1582
|
+
])])) : v("", !0)
|
|
1583
|
+
], 10, ul))
|
|
1507
1584
|
], 64))), 128))
|
|
1508
1585
|
], !0)
|
|
1509
1586
|
], 2),
|
|
1510
1587
|
c.$slots.footer ? (l(), a("div", {
|
|
1511
1588
|
key: 1,
|
|
1512
|
-
class: d(
|
|
1589
|
+
class: d(y.value)
|
|
1513
1590
|
}, [
|
|
1514
1591
|
P(c.$slots, "footer", { close: A }, void 0, !0)
|
|
1515
|
-
], 2)) :
|
|
1516
|
-
], 6)) :
|
|
1592
|
+
], 2)) : v("", !0)
|
|
1593
|
+
], 6)) : v("", !0),
|
|
1517
1594
|
u.value && t.overlay ? (l(), a("div", {
|
|
1518
1595
|
key: 1,
|
|
1519
1596
|
class: "fixed inset-0 bg-black/20 z-40",
|
|
1520
1597
|
onClick: A
|
|
1521
|
-
})) :
|
|
1598
|
+
})) : v("", !0)
|
|
1522
1599
|
]))
|
|
1523
1600
|
], 2));
|
|
1524
1601
|
}
|
|
1525
|
-
}),
|
|
1602
|
+
}), no = /* @__PURE__ */ Z(wl, [["__scopeId", "data-v-ad88f878"]]), kl = ["for"], Cl = {
|
|
1526
1603
|
key: 0,
|
|
1527
1604
|
class: "text-danger-600"
|
|
1528
|
-
},
|
|
1605
|
+
}, $l = ["id", "disabled", "aria-expanded"], Bl = { class: "flex-1 text-left truncate" }, zl = {
|
|
1529
1606
|
key: 0,
|
|
1530
1607
|
class: "flex items-center justify-center gap-2 p-6 text-secondary-600"
|
|
1531
|
-
},
|
|
1608
|
+
}, Ml = {
|
|
1532
1609
|
key: 1,
|
|
1533
1610
|
class: "p-2 border-b border-secondary-200"
|
|
1534
|
-
},
|
|
1611
|
+
}, Vl = ["placeholder"], Dl = {
|
|
1535
1612
|
key: 2,
|
|
1536
1613
|
class: "max-h-64 overflow-y-auto"
|
|
1537
|
-
},
|
|
1614
|
+
}, Sl = {
|
|
1538
1615
|
key: 0,
|
|
1539
1616
|
class: "px-4 py-3 text-sm text-secondary-500 text-center"
|
|
1540
|
-
},
|
|
1617
|
+
}, Tl = ["onClick"], Il = { class: "flex items-center justify-between w-full" }, jl = { class: "truncate" }, Ll = {
|
|
1541
1618
|
key: 0,
|
|
1542
1619
|
class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
|
|
1543
1620
|
fill: "none",
|
|
1544
1621
|
stroke: "currentColor",
|
|
1545
1622
|
viewBox: "0 0 24 24",
|
|
1546
1623
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1547
|
-
},
|
|
1624
|
+
}, Ol = {
|
|
1548
1625
|
key: 0,
|
|
1549
1626
|
class: "border-t border-secondary-200 my-1"
|
|
1550
|
-
},
|
|
1627
|
+
}, Al = ["onClick"], Wl = ["innerHTML"], Fl = {
|
|
1551
1628
|
key: 1,
|
|
1552
1629
|
class: "mt-1 text-sm text-danger-600"
|
|
1553
|
-
},
|
|
1630
|
+
}, Pl = {
|
|
1554
1631
|
key: 2,
|
|
1555
1632
|
class: "mt-1 text-sm text-secondary-600"
|
|
1556
|
-
},
|
|
1633
|
+
}, Rl = /* @__PURE__ */ E({
|
|
1557
1634
|
__name: "Select",
|
|
1558
1635
|
props: {
|
|
1559
1636
|
modelValue: { default: null },
|
|
@@ -1578,82 +1655,82 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1578
1655
|
},
|
|
1579
1656
|
emits: ["update:modelValue", "change", "action"],
|
|
1580
1657
|
setup(t, { emit: g }) {
|
|
1581
|
-
const e = t,
|
|
1658
|
+
const e = t, m = g, r = R(!1), f = R(""), u = R(null), n = s(
|
|
1582
1659
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
1583
|
-
),
|
|
1584
|
-
if (!e.searchable || !
|
|
1660
|
+
), b = s(() => e.options.find((p) => p.value === e.modelValue) || null), z = s(() => {
|
|
1661
|
+
if (!e.searchable || !f.value)
|
|
1585
1662
|
return e.options;
|
|
1586
|
-
const
|
|
1587
|
-
return e.options.filter((i) => i.label.toLowerCase().includes(
|
|
1588
|
-
}),
|
|
1589
|
-
const
|
|
1663
|
+
const p = f.value.toLowerCase();
|
|
1664
|
+
return e.options.filter((i) => i.label.toLowerCase().includes(p));
|
|
1665
|
+
}), x = s(() => "ds-label"), h = s(() => e.bordered ? "border border-neutral-300 rounded-md" : "rounded-md"), k = s(() => {
|
|
1666
|
+
const p = "w-full rounded-md flex items-center justify-between gap-2 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", i = {
|
|
1590
1667
|
sm: e.compact ? "px-2 py-1 text-xs" : "px-3 py-1.5 text-sm",
|
|
1591
1668
|
md: e.compact ? "px-3 py-1.5 text-sm" : "px-4 py-2 text-base",
|
|
1592
1669
|
lg: e.compact ? "px-4 py-2 text-base" : "px-5 py-3 text-lg"
|
|
1593
|
-
},
|
|
1670
|
+
}, B = {
|
|
1594
1671
|
default: "bg-white",
|
|
1595
1672
|
outline: "bg-transparent",
|
|
1596
1673
|
filled: "bg-secondary-100"
|
|
1597
1674
|
}, c = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
1598
1675
|
return [
|
|
1599
|
-
|
|
1676
|
+
p,
|
|
1600
1677
|
i[e.size],
|
|
1601
|
-
|
|
1678
|
+
B[e.variant],
|
|
1602
1679
|
c
|
|
1603
1680
|
].join(" ");
|
|
1604
|
-
}),
|
|
1605
|
-
const i = "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",
|
|
1606
|
-
return [i,
|
|
1607
|
-
}, V = (
|
|
1681
|
+
}), y = s(() => `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`), T = (p) => {
|
|
1682
|
+
const i = "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", B = j(p) ? "bg-primary-50" : "";
|
|
1683
|
+
return [i, B].join(" ");
|
|
1684
|
+
}, V = (p) => {
|
|
1608
1685
|
const i = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
|
|
1609
|
-
return
|
|
1610
|
-
}, j = (
|
|
1686
|
+
return p.variant === "danger" ? `${i} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${i} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
|
|
1687
|
+
}, j = (p) => p.value === e.modelValue, W = () => {
|
|
1611
1688
|
e.disabled || e.loading || (r.value = !r.value, r.value && e.searchable && be(() => {
|
|
1612
|
-
var
|
|
1613
|
-
(
|
|
1689
|
+
var p;
|
|
1690
|
+
(p = u.value) == null || p.focus();
|
|
1614
1691
|
}));
|
|
1615
1692
|
}, I = () => {
|
|
1616
|
-
r.value = !1,
|
|
1617
|
-
}, L = (
|
|
1618
|
-
|
|
1619
|
-
}, A = (
|
|
1620
|
-
|
|
1621
|
-
}, F = (
|
|
1622
|
-
const i =
|
|
1693
|
+
r.value = !1, f.value = "";
|
|
1694
|
+
}, L = (p) => {
|
|
1695
|
+
p.disabled || (m("update:modelValue", p.value), m("change", p), I());
|
|
1696
|
+
}, A = (p) => {
|
|
1697
|
+
p.action && p.action(), m("action", p), I();
|
|
1698
|
+
}, F = (p) => {
|
|
1699
|
+
const i = p.relatedTarget;
|
|
1623
1700
|
i && i.closest(".select-wrapper") || setTimeout(() => {
|
|
1624
1701
|
I();
|
|
1625
1702
|
}, 200);
|
|
1626
|
-
},
|
|
1627
|
-
|
|
1703
|
+
}, $ = (p) => {
|
|
1704
|
+
p.key === "Escape" ? I() : (p.key === "Enter" || p.key === " ") && (p.preventDefault(), W());
|
|
1628
1705
|
};
|
|
1629
|
-
return de(r, (
|
|
1630
|
-
|
|
1631
|
-
}), (
|
|
1706
|
+
return de(r, (p) => {
|
|
1707
|
+
p && (f.value = "");
|
|
1708
|
+
}), (p, i) => (l(), a("div", {
|
|
1632
1709
|
class: d(["select-wrapper", { "w-full": t.fullWidth }])
|
|
1633
1710
|
}, [
|
|
1634
1711
|
t.label ? (l(), a("label", {
|
|
1635
1712
|
key: 0,
|
|
1636
1713
|
for: n.value,
|
|
1637
|
-
class: d(
|
|
1714
|
+
class: d(x.value)
|
|
1638
1715
|
}, [
|
|
1639
1716
|
H(M(t.label) + " ", 1),
|
|
1640
|
-
t.required ? (l(), a("span",
|
|
1641
|
-
], 10,
|
|
1642
|
-
|
|
1643
|
-
class: d(["relative",
|
|
1717
|
+
t.required ? (l(), a("span", Cl, "*")) : v("", !0)
|
|
1718
|
+
], 10, kl)) : v("", !0),
|
|
1719
|
+
o("div", {
|
|
1720
|
+
class: d(["relative", h.value])
|
|
1644
1721
|
}, [
|
|
1645
|
-
|
|
1722
|
+
o("button", {
|
|
1646
1723
|
id: n.value,
|
|
1647
1724
|
type: "button",
|
|
1648
|
-
class: d(
|
|
1725
|
+
class: d(k.value),
|
|
1649
1726
|
disabled: t.disabled,
|
|
1650
1727
|
"aria-expanded": r.value,
|
|
1651
1728
|
"aria-haspopup": !0,
|
|
1652
1729
|
onClick: W,
|
|
1653
1730
|
onBlur: F,
|
|
1654
|
-
onKeydown:
|
|
1731
|
+
onKeydown: $
|
|
1655
1732
|
}, [
|
|
1656
|
-
|
|
1733
|
+
o("span", Bl, M(b.value ? b.value.label : t.placeholder), 1),
|
|
1657
1734
|
(l(), a("svg", {
|
|
1658
1735
|
class: d(["w-5 h-5 flex-shrink-0 transition-transform text-[#565656] opacity-80", r.value ? "rotate-180" : ""]),
|
|
1659
1736
|
fill: "none",
|
|
@@ -1661,28 +1738,28 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1661
1738
|
viewBox: "0 0 24 24",
|
|
1662
1739
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1663
1740
|
}, [...i[3] || (i[3] = [
|
|
1664
|
-
|
|
1741
|
+
o("path", {
|
|
1665
1742
|
"stroke-linecap": "round",
|
|
1666
1743
|
"stroke-linejoin": "round",
|
|
1667
1744
|
"stroke-width": "2",
|
|
1668
1745
|
d: "M19 9l-7 7-7-7"
|
|
1669
1746
|
}, null, -1)
|
|
1670
1747
|
])], 2))
|
|
1671
|
-
], 42,
|
|
1748
|
+
], 42, $l),
|
|
1672
1749
|
r.value ? (l(), a("div", {
|
|
1673
1750
|
key: 0,
|
|
1674
|
-
class: d(
|
|
1751
|
+
class: d(y.value),
|
|
1675
1752
|
onClick: i[2] || (i[2] = J(() => {
|
|
1676
1753
|
}, ["stop"]))
|
|
1677
1754
|
}, [
|
|
1678
|
-
t.loading ? (l(), a("div",
|
|
1679
|
-
|
|
1755
|
+
t.loading ? (l(), a("div", zl, [...i[4] || (i[4] = [
|
|
1756
|
+
o("svg", {
|
|
1680
1757
|
class: "w-5 h-5 animate-spin",
|
|
1681
1758
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1682
1759
|
fill: "none",
|
|
1683
1760
|
viewBox: "0 0 24 24"
|
|
1684
1761
|
}, [
|
|
1685
|
-
|
|
1762
|
+
o("circle", {
|
|
1686
1763
|
class: "opacity-25",
|
|
1687
1764
|
cx: "12",
|
|
1688
1765
|
cy: "12",
|
|
@@ -1690,81 +1767,81 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1690
1767
|
stroke: "currentColor",
|
|
1691
1768
|
"stroke-width": "4"
|
|
1692
1769
|
}),
|
|
1693
|
-
|
|
1770
|
+
o("path", {
|
|
1694
1771
|
class: "opacity-75",
|
|
1695
1772
|
fill: "currentColor",
|
|
1696
1773
|
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"
|
|
1697
1774
|
})
|
|
1698
1775
|
], -1),
|
|
1699
|
-
|
|
1700
|
-
])])) : t.searchable ? (l(), a("div",
|
|
1701
|
-
me(
|
|
1776
|
+
o("span", null, "Cargando...", -1)
|
|
1777
|
+
])])) : t.searchable ? (l(), a("div", Ml, [
|
|
1778
|
+
me(o("input", {
|
|
1702
1779
|
ref_key: "searchInput",
|
|
1703
1780
|
ref: u,
|
|
1704
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1781
|
+
"onUpdate:modelValue": i[0] || (i[0] = (B) => f.value = B),
|
|
1705
1782
|
type: "text",
|
|
1706
1783
|
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",
|
|
1707
1784
|
placeholder: t.searchPlaceholder,
|
|
1708
1785
|
onKeydown: i[1] || (i[1] = J(() => {
|
|
1709
1786
|
}, ["stop"]))
|
|
1710
|
-
}, null, 40,
|
|
1711
|
-
[
|
|
1787
|
+
}, null, 40, Vl), [
|
|
1788
|
+
[qe, f.value]
|
|
1712
1789
|
])
|
|
1713
|
-
])) :
|
|
1714
|
-
t.loading ?
|
|
1715
|
-
z.value.length === 0 ? (l(), a("div",
|
|
1716
|
-
(l(!0), a(U, null, Q(z.value, (
|
|
1717
|
-
key:
|
|
1790
|
+
])) : v("", !0),
|
|
1791
|
+
t.loading ? v("", !0) : (l(), a("div", Dl, [
|
|
1792
|
+
z.value.length === 0 ? (l(), a("div", Sl, M(t.emptyText), 1)) : (l(), a(U, { key: 1 }, [
|
|
1793
|
+
(l(!0), a(U, null, Q(z.value, (B) => (l(), a("button", {
|
|
1794
|
+
key: B.value,
|
|
1718
1795
|
type: "button",
|
|
1719
|
-
class: d(T(
|
|
1720
|
-
onClick: (c) => L(
|
|
1796
|
+
class: d(T(B)),
|
|
1797
|
+
onClick: (c) => L(B)
|
|
1721
1798
|
}, [
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
j(
|
|
1725
|
-
|
|
1799
|
+
o("div", Il, [
|
|
1800
|
+
o("span", jl, M(B.label), 1),
|
|
1801
|
+
j(B) ? (l(), a("svg", Ll, [...i[5] || (i[5] = [
|
|
1802
|
+
o("path", {
|
|
1726
1803
|
"stroke-linecap": "round",
|
|
1727
1804
|
"stroke-linejoin": "round",
|
|
1728
1805
|
"stroke-width": "2",
|
|
1729
1806
|
d: "M5 13l4 4L19 7"
|
|
1730
1807
|
}, null, -1)
|
|
1731
|
-
])])) :
|
|
1808
|
+
])])) : v("", !0)
|
|
1732
1809
|
])
|
|
1733
|
-
], 10,
|
|
1734
|
-
t.actionItems.length > 0 ? (l(), a("div",
|
|
1735
|
-
(l(!0), a(U, null, Q(t.actionItems, (
|
|
1736
|
-
key:
|
|
1810
|
+
], 10, Tl))), 128)),
|
|
1811
|
+
t.actionItems.length > 0 ? (l(), a("div", Ol)) : v("", !0),
|
|
1812
|
+
(l(!0), a(U, null, Q(t.actionItems, (B) => (l(), a("button", {
|
|
1813
|
+
key: B.id,
|
|
1737
1814
|
type: "button",
|
|
1738
|
-
class: d(V(
|
|
1739
|
-
onClick: (c) => A(
|
|
1815
|
+
class: d(V(B)),
|
|
1816
|
+
onClick: (c) => A(B)
|
|
1740
1817
|
}, [
|
|
1741
|
-
|
|
1818
|
+
B.icon ? (l(), a("svg", {
|
|
1742
1819
|
key: 0,
|
|
1743
1820
|
class: "w-4 h-4 flex-shrink-0",
|
|
1744
1821
|
fill: "none",
|
|
1745
1822
|
stroke: "currentColor",
|
|
1746
1823
|
viewBox: "0 0 24 24",
|
|
1747
1824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1748
|
-
innerHTML:
|
|
1749
|
-
}, null, 8,
|
|
1750
|
-
H(" " + M(
|
|
1751
|
-
], 10,
|
|
1825
|
+
innerHTML: B.icon
|
|
1826
|
+
}, null, 8, Wl)) : v("", !0),
|
|
1827
|
+
H(" " + M(B.label), 1)
|
|
1828
|
+
], 10, Al))), 128))
|
|
1752
1829
|
], 64))
|
|
1753
1830
|
]))
|
|
1754
|
-
], 2)) :
|
|
1831
|
+
], 2)) : v("", !0)
|
|
1755
1832
|
], 2),
|
|
1756
|
-
t.error ? (l(), a("p",
|
|
1833
|
+
t.error ? (l(), a("p", Fl, M(t.error), 1)) : t.helperText ? (l(), a("p", Pl, M(t.helperText), 1)) : v("", !0),
|
|
1757
1834
|
r.value ? (l(), a("div", {
|
|
1758
1835
|
key: 3,
|
|
1759
1836
|
onClick: I,
|
|
1760
1837
|
class: "fixed inset-0 z-40"
|
|
1761
|
-
})) :
|
|
1838
|
+
})) : v("", !0)
|
|
1762
1839
|
], 2));
|
|
1763
1840
|
}
|
|
1764
|
-
}),
|
|
1841
|
+
}), io = /* @__PURE__ */ Z(Rl, [["__scopeId", "data-v-7fce9a5d"]]), El = ["title"], ql = {
|
|
1765
1842
|
key: 0,
|
|
1766
1843
|
class: "space-y-1"
|
|
1767
|
-
},
|
|
1844
|
+
}, Nl = ["href", "onClick", "aria-current"], Yl = { key: 2 }, Hl = /* @__PURE__ */ E({
|
|
1768
1845
|
__name: "Sidebar",
|
|
1769
1846
|
props: {
|
|
1770
1847
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1789,36 +1866,36 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1789
1866
|
},
|
|
1790
1867
|
emits: ["update:modelValue", "update:activeItem", "update:collapsed", "close", "open", "itemClick", "toggleCollapse"],
|
|
1791
1868
|
setup(t, { emit: g }) {
|
|
1792
|
-
const e = t,
|
|
1869
|
+
const e = t, m = R(e.collapsed), r = s(() => e.mini || m.value), f = g, u = s({
|
|
1793
1870
|
get: () => e.modelValue,
|
|
1794
|
-
set: (
|
|
1795
|
-
}), n = (
|
|
1796
|
-
const
|
|
1797
|
-
!e.persistent && !
|
|
1798
|
-
},
|
|
1799
|
-
|
|
1871
|
+
set: ($) => f("update:modelValue", $)
|
|
1872
|
+
}), n = ($ = !1) => {
|
|
1873
|
+
const p = e.keepOpen && !$;
|
|
1874
|
+
!e.persistent && !p && (u.value = !1, f("close"));
|
|
1875
|
+
}, b = () => {
|
|
1876
|
+
m.value = !m.value, f("update:collapsed", m.value), f("toggleCollapse");
|
|
1800
1877
|
};
|
|
1801
1878
|
de(
|
|
1802
1879
|
() => e.collapsed,
|
|
1803
|
-
(
|
|
1804
|
-
|
|
1880
|
+
($) => {
|
|
1881
|
+
m.value = $;
|
|
1805
1882
|
},
|
|
1806
1883
|
{ immediate: !0 }
|
|
1807
1884
|
);
|
|
1808
|
-
const z = (
|
|
1809
|
-
|
|
1810
|
-
},
|
|
1811
|
-
const
|
|
1812
|
-
return `${
|
|
1813
|
-
},
|
|
1814
|
-
const
|
|
1815
|
-
return `${
|
|
1816
|
-
},
|
|
1817
|
-
const
|
|
1818
|
-
return [
|
|
1819
|
-
}), V =
|
|
1885
|
+
const z = ($, p) => {
|
|
1886
|
+
p.id && f("update:activeItem", p.id), p.onClick && ($.preventDefault(), p.onClick(p)), f("itemClick", p), !e.keepOpen && !e.persistent && n();
|
|
1887
|
+
}, x = ($) => $.active !== void 0 ? $.active : e.activeItem && $.id ? e.activeItem === $.id : !1, h = ($) => {
|
|
1888
|
+
const p = r.value ? "flex items-center justify-center p-3 rounded-lg transition-all duration-200" : "flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 text-sm font-medium", i = x($) ? r.value ? "bg-primary-100 text-primary-700" : "bg-primary-100 text-primary-700 border-l-4 border-primary-600" : "text-gray-700 hover:bg-gray-100 hover:text-gray-900";
|
|
1889
|
+
return `${p} ${i}`;
|
|
1890
|
+
}, k = ($) => {
|
|
1891
|
+
const p = "w-5 h-5 flex-shrink-0", i = x($) ? "text-primary-600" : "text-gray-500";
|
|
1892
|
+
return `${p} ${i}`;
|
|
1893
|
+
}, y = s(() => e.position === "left" ? "slide-right" : "slide-left"), T = s(() => {
|
|
1894
|
+
const $ = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none transition-all duration-300", p = e.position === "left" ? "left-0" : "right-0", i = 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)]" : "", B = e.bordered ? "border-r border-gray-200" : "";
|
|
1895
|
+
return [$, p, i, B].filter(Boolean).join(" ");
|
|
1896
|
+
}), V = s(() => ({
|
|
1820
1897
|
width: "100%",
|
|
1821
|
-
maxWidth: e.mini ||
|
|
1898
|
+
maxWidth: e.mini || m.value ? e.miniWidth : e.width,
|
|
1822
1899
|
backgroundColor: e.backgroundColor,
|
|
1823
1900
|
top: e.overlayTop,
|
|
1824
1901
|
height: e.overlayTop !== "0" ? `calc(100vh - ${e.overlayTop})` : "100vh"
|
|
@@ -1827,136 +1904,136 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1827
1904
|
sm: "p-2",
|
|
1828
1905
|
md: "p-4",
|
|
1829
1906
|
lg: "p-6"
|
|
1830
|
-
}, W =
|
|
1831
|
-
return (
|
|
1907
|
+
}, W = s(() => `flex items-center justify-between border-b border-gray-200 ${r.value ? "p-2" : j[e.padding]}`), I = s(() => r.value ? "flex gap-1 items-center" : "flex gap-2 items-center"), L = s(() => r.value ? "p-1.5 hover:bg-gray-100 rounded-md transition-colors" : "p-2 hover:bg-gray-100 rounded-md transition-colors"), A = s(() => `flex-1 overflow-y-auto ${j[e.padding]}`), F = s(() => `border-t border-gray-200 ${j[e.padding]}`);
|
|
1908
|
+
return ($, p) => (l(), le(he, { to: "body" }, [
|
|
1832
1909
|
_(ie, { name: "fade" }, {
|
|
1833
1910
|
default: re(() => [
|
|
1834
1911
|
u.value && t.overlay && !t.keepOpen ? (l(), a("div", {
|
|
1835
1912
|
key: 0,
|
|
1836
|
-
onClick:
|
|
1913
|
+
onClick: p[0] || (p[0] = (i) => n()),
|
|
1837
1914
|
class: "fixed inset-0 z-40",
|
|
1838
|
-
style:
|
|
1839
|
-
}, null, 4)) :
|
|
1915
|
+
style: q({ top: t.overlayTop, backgroundColor: `rgba(0, 0, 0, ${t.scrimOpacity || 0.5})` })
|
|
1916
|
+
}, null, 4)) : v("", !0)
|
|
1840
1917
|
]),
|
|
1841
1918
|
_: 1
|
|
1842
1919
|
}),
|
|
1843
|
-
_(ie, { name:
|
|
1920
|
+
_(ie, { name: y.value }, {
|
|
1844
1921
|
default: re(() => [
|
|
1845
1922
|
u.value ? (l(), a("aside", {
|
|
1846
1923
|
key: 0,
|
|
1847
1924
|
class: d(T.value),
|
|
1848
|
-
style:
|
|
1925
|
+
style: q(V.value)
|
|
1849
1926
|
}, [
|
|
1850
|
-
|
|
1927
|
+
$.$slots.header ? (l(), a("div", {
|
|
1851
1928
|
key: 0,
|
|
1852
1929
|
class: d(W.value)
|
|
1853
1930
|
}, [
|
|
1854
|
-
P(
|
|
1855
|
-
|
|
1931
|
+
P($.$slots, "header", {}, void 0, !0),
|
|
1932
|
+
o("div", {
|
|
1856
1933
|
class: d(I.value)
|
|
1857
1934
|
}, [
|
|
1858
1935
|
t.collapsible ? (l(), a("button", {
|
|
1859
1936
|
key: 0,
|
|
1860
|
-
onClick:
|
|
1937
|
+
onClick: b,
|
|
1861
1938
|
class: d(L.value),
|
|
1862
|
-
title:
|
|
1939
|
+
title: m.value ? "Expandir" : "Contraer",
|
|
1863
1940
|
"aria-label": "Toggle sidebar collapse"
|
|
1864
|
-
}, [...
|
|
1865
|
-
|
|
1941
|
+
}, [...p[2] || (p[2] = [
|
|
1942
|
+
o("svg", {
|
|
1866
1943
|
class: "w-5 h-5",
|
|
1867
1944
|
fill: "none",
|
|
1868
1945
|
stroke: "currentColor",
|
|
1869
1946
|
viewBox: "0 0 24 24"
|
|
1870
1947
|
}, [
|
|
1871
|
-
|
|
1948
|
+
o("path", {
|
|
1872
1949
|
"stroke-linecap": "round",
|
|
1873
1950
|
"stroke-linejoin": "round",
|
|
1874
1951
|
"stroke-width": "2",
|
|
1875
1952
|
d: "M15 19l-7-7 7-7"
|
|
1876
1953
|
})
|
|
1877
1954
|
], -1)
|
|
1878
|
-
])], 10,
|
|
1955
|
+
])], 10, El)) : v("", !0),
|
|
1879
1956
|
t.closable ? (l(), a("button", {
|
|
1880
1957
|
key: 1,
|
|
1881
|
-
onClick:
|
|
1958
|
+
onClick: p[1] || (p[1] = (i) => n(!0)),
|
|
1882
1959
|
class: d(L.value),
|
|
1883
1960
|
"aria-label": "Cerrar menú"
|
|
1884
|
-
}, [...
|
|
1885
|
-
|
|
1961
|
+
}, [...p[3] || (p[3] = [
|
|
1962
|
+
o("svg", {
|
|
1886
1963
|
class: "w-5 h-5",
|
|
1887
1964
|
fill: "none",
|
|
1888
1965
|
stroke: "currentColor",
|
|
1889
1966
|
viewBox: "0 0 24 24"
|
|
1890
1967
|
}, [
|
|
1891
|
-
|
|
1968
|
+
o("path", {
|
|
1892
1969
|
"stroke-linecap": "round",
|
|
1893
1970
|
"stroke-linejoin": "round",
|
|
1894
1971
|
"stroke-width": "2",
|
|
1895
1972
|
d: "M6 18L18 6M6 6l12 12"
|
|
1896
1973
|
})
|
|
1897
1974
|
], -1)
|
|
1898
|
-
])], 2)) :
|
|
1975
|
+
])], 2)) : v("", !0)
|
|
1899
1976
|
], 2)
|
|
1900
|
-
], 2)) :
|
|
1901
|
-
|
|
1977
|
+
], 2)) : v("", !0),
|
|
1978
|
+
o("div", {
|
|
1902
1979
|
class: d(A.value)
|
|
1903
1980
|
}, [
|
|
1904
1981
|
t.items && t.items.length ? (l(), a("nav", ql, [
|
|
1905
1982
|
(l(!0), a(U, null, Q(t.items, (i) => (l(), a("a", {
|
|
1906
1983
|
key: i.id || i.label,
|
|
1907
1984
|
href: i.href,
|
|
1908
|
-
onClick: (
|
|
1909
|
-
class: d(
|
|
1910
|
-
"aria-current":
|
|
1985
|
+
onClick: (B) => z(B, i),
|
|
1986
|
+
class: d(h(i)),
|
|
1987
|
+
"aria-current": x(i) ? "page" : void 0
|
|
1911
1988
|
}, [
|
|
1912
1989
|
i.icon && typeof i.icon == "string" ? (l(), le(ee, {
|
|
1913
1990
|
key: 0,
|
|
1914
1991
|
name: i.icon,
|
|
1915
1992
|
size: "md",
|
|
1916
|
-
class: d(
|
|
1917
|
-
}, null, 8, ["name", "class"])) : i.icon ? (l(), le(
|
|
1993
|
+
class: d(k(i))
|
|
1994
|
+
}, null, 8, ["name", "class"])) : i.icon ? (l(), le(ye(i.icon), {
|
|
1918
1995
|
key: 1,
|
|
1919
|
-
class: d(
|
|
1920
|
-
}, null, 8, ["class"])) :
|
|
1921
|
-
r.value ?
|
|
1922
|
-
], 10,
|
|
1923
|
-
])) :
|
|
1924
|
-
P(
|
|
1996
|
+
class: d(k(i))
|
|
1997
|
+
}, null, 8, ["class"])) : v("", !0),
|
|
1998
|
+
r.value ? v("", !0) : (l(), a("span", Yl, M(i.label), 1))
|
|
1999
|
+
], 10, Nl))), 128))
|
|
2000
|
+
])) : v("", !0),
|
|
2001
|
+
P($.$slots, "default", {}, void 0, !0)
|
|
1925
2002
|
], 2),
|
|
1926
|
-
|
|
2003
|
+
$.$slots.footer ? (l(), a("div", {
|
|
1927
2004
|
key: 1,
|
|
1928
2005
|
class: d(F.value)
|
|
1929
2006
|
}, [
|
|
1930
|
-
P(
|
|
1931
|
-
], 2)) :
|
|
1932
|
-
], 6)) :
|
|
2007
|
+
P($.$slots, "footer", {}, void 0, !0)
|
|
2008
|
+
], 2)) : v("", !0)
|
|
2009
|
+
], 6)) : v("", !0)
|
|
1933
2010
|
]),
|
|
1934
2011
|
_: 3
|
|
1935
2012
|
}, 8, ["name"])
|
|
1936
2013
|
]));
|
|
1937
2014
|
}
|
|
1938
|
-
}),
|
|
2015
|
+
}), co = /* @__PURE__ */ Z(Hl, [["__scopeId", "data-v-1431a87b"]]), Kl = { class: "w-full space-y-4" }, Ul = { class: "flex flex-col gap-3 md:hidden" }, Gl = {
|
|
1939
2016
|
key: 0,
|
|
1940
2017
|
class: "flex items-center gap-2 px-1 text-sm text-gray-600"
|
|
1941
|
-
},
|
|
2018
|
+
}, Jl = ["checked", "indeterminate"], Ql = {
|
|
1942
2019
|
key: 0,
|
|
1943
2020
|
class: "flex items-center gap-2 pb-2"
|
|
1944
|
-
},
|
|
2021
|
+
}, Zl = ["checked", "onChange", "aria-label"], Xl = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, _l = { class: "text-sm text-gray-700" }, ea = {
|
|
1945
2022
|
key: 1,
|
|
1946
2023
|
class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
|
|
1947
|
-
},
|
|
2024
|
+
}, ta = { class: "hidden md:block w-full overflow-x-auto" }, la = { class: "w-full border-collapse" }, aa = { class: "w-full" }, oa = {
|
|
1948
2025
|
key: 0,
|
|
1949
2026
|
class: "px-3 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0 w-10"
|
|
1950
|
-
}, sa = ["checked", "indeterminate"],
|
|
2027
|
+
}, sa = ["checked", "indeterminate"], ra = ["onClick"], na = { class: "flex items-center gap-2" }, ia = {
|
|
1951
2028
|
key: 0,
|
|
1952
2029
|
class: "text-xs text-gray-400"
|
|
1953
|
-
},
|
|
2030
|
+
}, da = { key: 0 }, ca = { key: 1 }, ua = { class: "w-full" }, fa = ["checked", "onChange", "aria-label"], pa = {
|
|
1954
2031
|
key: 0,
|
|
1955
2032
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
1956
|
-
},
|
|
2033
|
+
}, ma = {
|
|
1957
2034
|
key: 0,
|
|
1958
2035
|
class: "w-full px-6 py-4 bg-white"
|
|
1959
|
-
},
|
|
2036
|
+
}, ba = /* @__PURE__ */ E({
|
|
1960
2037
|
__name: "Table",
|
|
1961
2038
|
props: {
|
|
1962
2039
|
columns: {},
|
|
@@ -1974,113 +2051,113 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1974
2051
|
},
|
|
1975
2052
|
emits: ["update:selectedKeys"],
|
|
1976
2053
|
setup(t, { emit: g }) {
|
|
1977
|
-
const e = t,
|
|
2054
|
+
const e = t, m = s(() => ({
|
|
1978
2055
|
compact: "py-1.5",
|
|
1979
2056
|
normal: "py-3",
|
|
1980
2057
|
spacious: "py-5"
|
|
1981
|
-
})[e.density]), r =
|
|
1982
|
-
n.value === i ?
|
|
1983
|
-
},
|
|
2058
|
+
})[e.density]), r = s(() => e.striped), f = s(() => e.hover), u = g, n = R(null), b = R("asc"), z = (i) => {
|
|
2059
|
+
n.value === i ? b.value = b.value === "asc" ? "desc" : "asc" : (n.value = i, b.value = "asc");
|
|
2060
|
+
}, x = s(() => {
|
|
1984
2061
|
if (!n.value)
|
|
1985
2062
|
return e.data;
|
|
1986
2063
|
const i = [...e.data];
|
|
1987
|
-
return i.sort((
|
|
1988
|
-
const D =
|
|
1989
|
-
return typeof D == "string" && typeof
|
|
2064
|
+
return i.sort((B, c) => {
|
|
2065
|
+
const D = B[n.value], w = c[n.value];
|
|
2066
|
+
return typeof D == "string" && typeof w == "string" ? b.value === "asc" ? D.localeCompare(w) : w.localeCompare(D) : typeof D == "number" && typeof w == "number" ? b.value === "asc" ? D - w : w - D : 0;
|
|
1990
2067
|
}), i;
|
|
1991
|
-
}),
|
|
2068
|
+
}), h = s(() => e.columns.filter((i) => !i.hideOnMobile)), k = s(() => e.selectable), y = s({
|
|
1992
2069
|
get: () => e.selectedKeys || [],
|
|
1993
2070
|
set: (i) => u("update:selectedKeys", i)
|
|
1994
|
-
}), T = (i,
|
|
2071
|
+
}), T = (i, B) => {
|
|
1995
2072
|
const c = e.rowKey;
|
|
1996
|
-
return (c && i ? i[c] : void 0) ??
|
|
1997
|
-
}, V =
|
|
1998
|
-
|
|
1999
|
-
}, L = (i,
|
|
2000
|
-
const c = T(i,
|
|
2001
|
-
return
|
|
2002
|
-
}, A = (i,
|
|
2003
|
-
if (!
|
|
2004
|
-
const D = T(i,
|
|
2005
|
-
c ?
|
|
2073
|
+
return (c && i ? i[c] : void 0) ?? B;
|
|
2074
|
+
}, V = s(() => x.value.map((i, B) => T(i, B))), j = s(() => V.value.length > 0 && V.value.every((i) => y.value.includes(i))), W = s(() => !j.value && y.value.length > 0), I = (i) => {
|
|
2075
|
+
k.value && (y.value = i ? [...V.value] : []);
|
|
2076
|
+
}, L = (i, B) => {
|
|
2077
|
+
const c = T(i, B);
|
|
2078
|
+
return y.value.includes(c);
|
|
2079
|
+
}, A = (i, B, c) => {
|
|
2080
|
+
if (!k.value) return;
|
|
2081
|
+
const D = T(i, B), w = new Set(y.value);
|
|
2082
|
+
c ? w.add(D) : w.delete(D), y.value = Array.from(w);
|
|
2006
2083
|
}, F = (i) => {
|
|
2007
|
-
const
|
|
2008
|
-
return !!(
|
|
2009
|
-
},
|
|
2084
|
+
const B = i.target;
|
|
2085
|
+
return !!(B != null && B.checked);
|
|
2086
|
+
}, $ = (i) => {
|
|
2010
2087
|
I(F(i));
|
|
2011
|
-
},
|
|
2012
|
-
A(i,
|
|
2088
|
+
}, p = (i, B, c) => {
|
|
2089
|
+
A(i, B, F(c));
|
|
2013
2090
|
};
|
|
2014
|
-
return (i,
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2091
|
+
return (i, B) => (l(), a("div", Kl, [
|
|
2092
|
+
o("div", Ul, [
|
|
2093
|
+
k.value ? (l(), a("div", Gl, [
|
|
2094
|
+
o("input", {
|
|
2018
2095
|
type: "checkbox",
|
|
2019
2096
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2020
2097
|
checked: j.value,
|
|
2021
2098
|
indeterminate: W.value,
|
|
2022
|
-
onChange:
|
|
2099
|
+
onChange: $,
|
|
2023
2100
|
"aria-label": "Seleccionar todas las filas"
|
|
2024
|
-
}, null, 40,
|
|
2025
|
-
|
|
2026
|
-
])) :
|
|
2027
|
-
(l(!0), a(U, null, Q(
|
|
2101
|
+
}, null, 40, Jl),
|
|
2102
|
+
B[0] || (B[0] = o("span", null, "Seleccionar todas", -1))
|
|
2103
|
+
])) : v("", !0),
|
|
2104
|
+
(l(!0), a(U, null, Q(x.value, (c, D) => (l(), a("div", {
|
|
2028
2105
|
key: `card-${D}`,
|
|
2029
2106
|
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
2030
2107
|
}, [
|
|
2031
|
-
|
|
2032
|
-
|
|
2108
|
+
k.value ? (l(), a("div", Ql, [
|
|
2109
|
+
o("input", {
|
|
2033
2110
|
type: "checkbox",
|
|
2034
2111
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2035
2112
|
checked: L(c, D),
|
|
2036
|
-
onChange: (
|
|
2113
|
+
onChange: (w) => p(c, D, w),
|
|
2037
2114
|
"aria-label": `Seleccionar fila ${D + 1}`
|
|
2038
|
-
}, null, 40,
|
|
2039
|
-
|
|
2040
|
-
])) :
|
|
2041
|
-
(l(!0), a(U, null, Q(
|
|
2042
|
-
key: `card-${D}-${
|
|
2115
|
+
}, null, 40, Zl),
|
|
2116
|
+
B[1] || (B[1] = o("span", { class: "text-sm text-gray-700" }, "Seleccionar fila", -1))
|
|
2117
|
+
])) : v("", !0),
|
|
2118
|
+
(l(!0), a(U, null, Q(h.value, (w) => (l(), a("div", {
|
|
2119
|
+
key: `card-${D}-${w.key}`,
|
|
2043
2120
|
class: "flex flex-col gap-1 py-1"
|
|
2044
2121
|
}, [
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
P(i.$slots, `cell-${
|
|
2048
|
-
value: c[
|
|
2122
|
+
o("span", Xl, M(w.label), 1),
|
|
2123
|
+
o("span", _l, [
|
|
2124
|
+
P(i.$slots, `cell-${w.key}`, {
|
|
2125
|
+
value: c[w.key],
|
|
2049
2126
|
row: c
|
|
2050
2127
|
}, () => [
|
|
2051
|
-
H(M(c[
|
|
2128
|
+
H(M(c[w.key]), 1)
|
|
2052
2129
|
], !0)
|
|
2053
2130
|
])
|
|
2054
2131
|
]))), 128))
|
|
2055
2132
|
]))), 128)),
|
|
2056
|
-
|
|
2133
|
+
x.value.length === 0 ? (l(), a("div", ea, [
|
|
2057
2134
|
P(i.$slots, "empty", {}, () => [
|
|
2058
|
-
|
|
2135
|
+
B[2] || (B[2] = H("No hay datos disponibles", -1))
|
|
2059
2136
|
], !0)
|
|
2060
|
-
])) :
|
|
2137
|
+
])) : v("", !0)
|
|
2061
2138
|
]),
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2139
|
+
o("div", ta, [
|
|
2140
|
+
o("table", la, [
|
|
2141
|
+
o("thead", aa, [
|
|
2142
|
+
o("tr", {
|
|
2066
2143
|
class: d([
|
|
2067
2144
|
"w-full bg-neutral-50 border-b border-gray-100",
|
|
2068
2145
|
e.headerClass || ""
|
|
2069
2146
|
])
|
|
2070
2147
|
}, [
|
|
2071
|
-
|
|
2072
|
-
|
|
2148
|
+
k.value ? (l(), a("th", oa, [
|
|
2149
|
+
o("input", {
|
|
2073
2150
|
type: "checkbox",
|
|
2074
2151
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2075
2152
|
checked: j.value,
|
|
2076
2153
|
indeterminate: W.value,
|
|
2077
|
-
onChange:
|
|
2154
|
+
onChange: $,
|
|
2078
2155
|
"aria-label": "Seleccionar todas las filas"
|
|
2079
2156
|
}, null, 40, sa)
|
|
2080
|
-
])) :
|
|
2157
|
+
])) : v("", !0),
|
|
2081
2158
|
(l(!0), a(U, null, Q(t.columns, (c) => (l(), a("th", {
|
|
2082
2159
|
key: c.key,
|
|
2083
|
-
style:
|
|
2160
|
+
style: q(c.width ? { width: c.width } : {}),
|
|
2084
2161
|
class: d([
|
|
2085
2162
|
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
2086
2163
|
c.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
@@ -2089,69 +2166,69 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2089
2166
|
]),
|
|
2090
2167
|
onClick: (D) => c.sortable && z(c.key)
|
|
2091
2168
|
}, [
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
c.sortable ? (l(), a("span",
|
|
2095
|
-
n.value !== c.key ? (l(), a("span",
|
|
2096
|
-
])) :
|
|
2169
|
+
o("div", na, [
|
|
2170
|
+
o("span", null, M(c.label), 1),
|
|
2171
|
+
c.sortable ? (l(), a("span", ia, [
|
|
2172
|
+
n.value !== c.key ? (l(), a("span", da, "⇅")) : (l(), a("span", ca, M(b.value === "asc" ? "↑" : "↓"), 1))
|
|
2173
|
+
])) : v("", !0)
|
|
2097
2174
|
])
|
|
2098
|
-
], 14,
|
|
2175
|
+
], 14, ra))), 128))
|
|
2099
2176
|
], 2)
|
|
2100
2177
|
]),
|
|
2101
|
-
|
|
2102
|
-
(l(!0), a(U, null, Q(
|
|
2178
|
+
o("tbody", ua, [
|
|
2179
|
+
(l(!0), a(U, null, Q(x.value, (c, D) => (l(), a("tr", {
|
|
2103
2180
|
key: D,
|
|
2104
2181
|
class: d([
|
|
2105
2182
|
"w-full border-b border-gray-200 transition-colors bg-white",
|
|
2106
2183
|
r.value && D % 2 === 1 ? "bg-gray-50" : "",
|
|
2107
|
-
|
|
2184
|
+
f.value ? "hover:bg-blue-50" : "",
|
|
2108
2185
|
e.rowClass,
|
|
2109
|
-
|
|
2186
|
+
m.value
|
|
2110
2187
|
])
|
|
2111
2188
|
}, [
|
|
2112
|
-
|
|
2189
|
+
k.value ? (l(), a("td", {
|
|
2113
2190
|
key: 0,
|
|
2114
|
-
class: d(["px-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0 w-10",
|
|
2191
|
+
class: d(["px-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0 w-10", m.value])
|
|
2115
2192
|
}, [
|
|
2116
|
-
|
|
2193
|
+
o("input", {
|
|
2117
2194
|
type: "checkbox",
|
|
2118
2195
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2119
2196
|
checked: L(c, D),
|
|
2120
|
-
onChange: (
|
|
2197
|
+
onChange: (w) => p(c, D, w),
|
|
2121
2198
|
"aria-label": `Seleccionar fila ${D + 1}`
|
|
2122
|
-
}, null, 40,
|
|
2123
|
-
], 2)) :
|
|
2124
|
-
(l(!0), a(U, null, Q(t.columns, (
|
|
2125
|
-
key: `${D}-${
|
|
2199
|
+
}, null, 40, fa)
|
|
2200
|
+
], 2)) : v("", !0),
|
|
2201
|
+
(l(!0), a(U, null, Q(t.columns, (w) => (l(), a("td", {
|
|
2202
|
+
key: `${D}-${w.key}`,
|
|
2126
2203
|
class: d([
|
|
2127
2204
|
"px-4 text-xs text-gray-600 border-l border-gray-100 first:border-l-0 bg-white",
|
|
2128
2205
|
e.rowClass,
|
|
2129
2206
|
e.cellClass,
|
|
2130
|
-
|
|
2207
|
+
m.value
|
|
2131
2208
|
])
|
|
2132
2209
|
}, [
|
|
2133
|
-
P(i.$slots, `cell-${
|
|
2134
|
-
value: c[
|
|
2210
|
+
P(i.$slots, `cell-${w.key}`, {
|
|
2211
|
+
value: c[w.key],
|
|
2135
2212
|
row: c
|
|
2136
2213
|
}, () => [
|
|
2137
|
-
H(M(c[
|
|
2214
|
+
H(M(c[w.key]), 1)
|
|
2138
2215
|
], !0)
|
|
2139
2216
|
], 2))), 128))
|
|
2140
2217
|
], 2))), 128))
|
|
2141
2218
|
])
|
|
2142
2219
|
]),
|
|
2143
|
-
|
|
2220
|
+
x.value.length === 0 ? (l(), a("div", pa, [
|
|
2144
2221
|
P(i.$slots, "empty", {}, () => [
|
|
2145
|
-
|
|
2222
|
+
B[3] || (B[3] = H("No hay datos disponibles", -1))
|
|
2146
2223
|
], !0)
|
|
2147
|
-
])) :
|
|
2224
|
+
])) : v("", !0)
|
|
2148
2225
|
]),
|
|
2149
|
-
i.$slots.footer ? (l(), a("div",
|
|
2226
|
+
i.$slots.footer ? (l(), a("div", ma, [
|
|
2150
2227
|
P(i.$slots, "footer", {}, void 0, !0)
|
|
2151
|
-
])) :
|
|
2228
|
+
])) : v("", !0)
|
|
2152
2229
|
]));
|
|
2153
2230
|
}
|
|
2154
|
-
}),
|
|
2231
|
+
}), uo = /* @__PURE__ */ Z(ba, [["__scopeId", "data-v-9020135c"]]), va = { class: "tabs-wrapper" }, ga = ["aria-selected", "onClick"], ha = /* @__PURE__ */ E({
|
|
2155
2232
|
__name: "Tabs",
|
|
2156
2233
|
props: {
|
|
2157
2234
|
modelValue: {},
|
|
@@ -2163,34 +2240,34 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2163
2240
|
},
|
|
2164
2241
|
emits: ["update:modelValue"],
|
|
2165
2242
|
setup(t, { emit: g }) {
|
|
2166
|
-
const e = t,
|
|
2243
|
+
const e = t, m = g, r = s(
|
|
2167
2244
|
() => e.compact ? "relative w-full sm:w-auto text-left sm:text-center px-3 sm:px-4 py-2 text-sm tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500" : "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500"
|
|
2168
|
-
),
|
|
2245
|
+
), f = s(() => ({
|
|
2169
2246
|
default: "border-b-3",
|
|
2170
2247
|
bordered: "border border-secondary-200 rounded-t-lg",
|
|
2171
2248
|
pill: "rounded-full bg-secondary-100 mx-1"
|
|
2172
|
-
})[e.variant]), u =
|
|
2249
|
+
})[e.variant]), u = s(() => ({
|
|
2173
2250
|
default: "border-b border-gray-200",
|
|
2174
2251
|
bordered: "gap-0",
|
|
2175
2252
|
pill: "gap-2 bg-white p-1 rounded-full border border-secondary-200"
|
|
2176
|
-
})[e.variant]), n =
|
|
2253
|
+
})[e.variant]), n = s(() => ({
|
|
2177
2254
|
default: "text-primary-600 border-primary-600 font-semibold",
|
|
2178
2255
|
bordered: "text-primary-600 border-primary-600 bg-primary-50 font-semibold",
|
|
2179
2256
|
pill: "text-white bg-primary-600 font-semibold"
|
|
2180
|
-
})[e.variant]),
|
|
2257
|
+
})[e.variant]), b = s(() => ({
|
|
2181
2258
|
default: "hover:text-secondary-700 border-transparent font-normal",
|
|
2182
2259
|
bordered: "text-secondary-600 hover:text-primary-600 font-normal",
|
|
2183
2260
|
pill: "text-secondary-600 hover:text-secondary-900 font-normal"
|
|
2184
|
-
})[e.variant]), z = (
|
|
2185
|
-
z(
|
|
2186
|
-
},
|
|
2187
|
-
() => e.tabs.find((
|
|
2261
|
+
})[e.variant]), z = (y) => e.modelValue === y, x = (y) => {
|
|
2262
|
+
z(y) || m("update:modelValue", y);
|
|
2263
|
+
}, h = s(() => e.modelValue), k = s(
|
|
2264
|
+
() => e.tabs.find((y) => y.value === h.value)
|
|
2188
2265
|
);
|
|
2189
|
-
return (
|
|
2190
|
-
|
|
2266
|
+
return (y, T) => (l(), a("div", va, [
|
|
2267
|
+
o("div", {
|
|
2191
2268
|
class: d(["tabs-header", t.headerClass])
|
|
2192
2269
|
}, [
|
|
2193
|
-
|
|
2270
|
+
o("div", {
|
|
2194
2271
|
class: d(["tabs-container", u.value]),
|
|
2195
2272
|
role: "tablist"
|
|
2196
2273
|
}, [
|
|
@@ -2199,27 +2276,27 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2199
2276
|
type: "button",
|
|
2200
2277
|
class: d([
|
|
2201
2278
|
r.value,
|
|
2202
|
-
|
|
2203
|
-
z(V.value) ? n.value :
|
|
2279
|
+
f.value,
|
|
2280
|
+
z(V.value) ? n.value : b.value
|
|
2204
2281
|
]),
|
|
2205
2282
|
"aria-selected": z(V.value),
|
|
2206
2283
|
role: "tab",
|
|
2207
|
-
onClick: (j) =>
|
|
2208
|
-
}, M(V.label), 11,
|
|
2284
|
+
onClick: (j) => x(V.value)
|
|
2285
|
+
}, M(V.label), 11, ga))), 128))
|
|
2209
2286
|
], 2)
|
|
2210
2287
|
], 2),
|
|
2211
|
-
|
|
2288
|
+
o("div", {
|
|
2212
2289
|
class: d(["tabs-content", t.contentClass]),
|
|
2213
2290
|
role: "tabpanel"
|
|
2214
2291
|
}, [
|
|
2215
|
-
P(
|
|
2216
|
-
active:
|
|
2217
|
-
tab:
|
|
2292
|
+
P(y.$slots, h.value, {
|
|
2293
|
+
active: h.value,
|
|
2294
|
+
tab: k.value
|
|
2218
2295
|
}, void 0, !0)
|
|
2219
2296
|
], 2)
|
|
2220
2297
|
]));
|
|
2221
2298
|
}
|
|
2222
|
-
}),
|
|
2299
|
+
}), fo = /* @__PURE__ */ Z(ha, [["__scopeId", "data-v-17d67e55"]]), ya = "font-sans", po = /* @__PURE__ */ E({
|
|
2223
2300
|
__name: "Text",
|
|
2224
2301
|
props: {
|
|
2225
2302
|
variant: { default: "body1" },
|
|
@@ -2271,7 +2348,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2271
2348
|
button3: "span",
|
|
2272
2349
|
caption: "span",
|
|
2273
2350
|
overline: "span"
|
|
2274
|
-
},
|
|
2351
|
+
}, m = {
|
|
2275
2352
|
left: "text-left",
|
|
2276
2353
|
center: "text-center",
|
|
2277
2354
|
right: "text-right",
|
|
@@ -2284,34 +2361,34 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2284
2361
|
danger: "text-danger-600",
|
|
2285
2362
|
success: "text-success-600",
|
|
2286
2363
|
warning: "text-warning-600"
|
|
2287
|
-
},
|
|
2364
|
+
}, f = {
|
|
2288
2365
|
light: "font-light",
|
|
2289
2366
|
normal: "font-normal",
|
|
2290
2367
|
medium: "font-medium",
|
|
2291
2368
|
semibold: "font-semibold",
|
|
2292
2369
|
bold: "font-bold",
|
|
2293
2370
|
extrabold: "font-extrabold"
|
|
2294
|
-
}, u = t, n =
|
|
2371
|
+
}, u = t, n = s(() => u.variant), b = s(() => u.align), z = s(() => u.as || e[n.value] || "span"), x = s(() => u.color && u.color.startsWith("#")), h = s(() => x.value ? "" : r[u.color] || r.default), k = s(() => x.value ? { color: u.color } : {}), y = s(() => u.weight ? { fontWeight: {
|
|
2295
2372
|
light: 300,
|
|
2296
2373
|
normal: 400,
|
|
2297
2374
|
medium: 500,
|
|
2298
2375
|
semibold: 600,
|
|
2299
2376
|
bold: 700,
|
|
2300
2377
|
extrabold: 800
|
|
2301
|
-
}[u.weight] } : {}), T =
|
|
2302
|
-
return (V, j) => (l(), le(
|
|
2378
|
+
}[u.weight] } : {}), T = s(() => u.weight ? f[u.weight] : "");
|
|
2379
|
+
return (V, j) => (l(), le(ye(z.value), {
|
|
2303
2380
|
class: d([
|
|
2304
2381
|
ya,
|
|
2305
2382
|
g[n.value],
|
|
2306
|
-
|
|
2307
|
-
b
|
|
2383
|
+
h.value,
|
|
2384
|
+
m[b.value],
|
|
2308
2385
|
T.value,
|
|
2309
2386
|
{
|
|
2310
2387
|
uppercase: t.uppercase || n.value === "overline",
|
|
2311
2388
|
truncate: t.truncate
|
|
2312
2389
|
}
|
|
2313
2390
|
]),
|
|
2314
|
-
style:
|
|
2391
|
+
style: q([k.value, y.value])
|
|
2315
2392
|
}, {
|
|
2316
2393
|
default: re(() => [
|
|
2317
2394
|
P(V.$slots, "default")
|
|
@@ -2319,14 +2396,14 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2319
2396
|
_: 3
|
|
2320
2397
|
}, 8, ["class", "style"]));
|
|
2321
2398
|
}
|
|
2322
|
-
}),
|
|
2399
|
+
}), xa = { class: "w-full flex items-center justify-between gap-3 py-2" }, wa = {
|
|
2323
2400
|
key: 0,
|
|
2324
2401
|
class: "text-xs pagination-text"
|
|
2325
|
-
},
|
|
2402
|
+
}, ka = { key: 0 }, Ca = {
|
|
2326
2403
|
class: "ml-auto inline-flex items-center gap-1",
|
|
2327
2404
|
role: "navigation",
|
|
2328
2405
|
"aria-label": "Pagination"
|
|
2329
|
-
},
|
|
2406
|
+
}, $a = ["disabled"], Ba = ["aria-label", "onClick"], za = ["disabled"], Ma = /* @__PURE__ */ E({
|
|
2330
2407
|
__name: "Pagination",
|
|
2331
2408
|
props: {
|
|
2332
2409
|
modelValue: { default: 1 },
|
|
@@ -2341,55 +2418,55 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2341
2418
|
},
|
|
2342
2419
|
emits: ["update:modelValue", "change"],
|
|
2343
2420
|
setup(t, { emit: g }) {
|
|
2344
|
-
const e = t,
|
|
2345
|
-
const
|
|
2346
|
-
return
|
|
2347
|
-
}),
|
|
2348
|
-
const
|
|
2349
|
-
return
|
|
2350
|
-
}), u =
|
|
2351
|
-
const
|
|
2352
|
-
if (
|
|
2353
|
-
return Array.from({ length:
|
|
2354
|
-
const T = Math.floor(
|
|
2355
|
-
let V = Math.max(1,
|
|
2356
|
-
V = Math.max(1, Math.min(V, j -
|
|
2421
|
+
const e = t, m = g, r = s(() => {
|
|
2422
|
+
const h = Math.ceil(e.totalItems / e.pageSize);
|
|
2423
|
+
return h > 0 ? h : 1;
|
|
2424
|
+
}), f = s(() => {
|
|
2425
|
+
const h = Number(e.modelValue || 1);
|
|
2426
|
+
return h < 1 ? 1 : h > r.value ? r.value : h;
|
|
2427
|
+
}), u = s(() => e.totalItems === 0 ? 0 : (f.value - 1) * e.pageSize + 1), n = s(() => Math.min(f.value * e.pageSize, e.totalItems)), b = s(() => `Mostrando ${u.value} a ${n.value} de ${e.totalItems}`), z = s(() => {
|
|
2428
|
+
const h = r.value, k = Math.max(3, e.maxPages), y = f.value;
|
|
2429
|
+
if (h <= k)
|
|
2430
|
+
return Array.from({ length: h }, (I, L) => L + 1);
|
|
2431
|
+
const T = Math.floor(k / 2);
|
|
2432
|
+
let V = Math.max(1, y - T), j = Math.min(h, V + k - 1);
|
|
2433
|
+
V = Math.max(1, Math.min(V, j - k + 1));
|
|
2357
2434
|
const W = [];
|
|
2358
2435
|
V > 1 && (W.push(1), V > 2 && W.push("…"));
|
|
2359
2436
|
for (let I = V; I <= j; I++)
|
|
2360
2437
|
W.push(I);
|
|
2361
|
-
return j <
|
|
2438
|
+
return j < h && (j < h - 1 && W.push("…"), W.push(h)), W;
|
|
2362
2439
|
});
|
|
2363
|
-
function
|
|
2364
|
-
const
|
|
2365
|
-
|
|
2440
|
+
function x(h) {
|
|
2441
|
+
const k = Math.max(1, Math.min(h, r.value));
|
|
2442
|
+
k !== f.value && (m("update:modelValue", k), m("change", k));
|
|
2366
2443
|
}
|
|
2367
|
-
return (
|
|
2368
|
-
t.showSummary ? (l(), a("div",
|
|
2369
|
-
P(
|
|
2444
|
+
return (h, k) => (l(), a("div", xa, [
|
|
2445
|
+
t.showSummary ? (l(), a("div", wa, [
|
|
2446
|
+
P(h.$slots, "summary", {
|
|
2370
2447
|
start: u.value,
|
|
2371
2448
|
end: n.value,
|
|
2372
2449
|
total: t.totalItems
|
|
2373
2450
|
}, () => [
|
|
2374
|
-
H(M(
|
|
2375
|
-
t.itemLabel ? (l(), a("span",
|
|
2451
|
+
H(M(b.value) + " ", 1),
|
|
2452
|
+
t.itemLabel ? (l(), a("span", ka, M(t.itemLabel), 1)) : v("", !0)
|
|
2376
2453
|
], !0)
|
|
2377
|
-
])) :
|
|
2378
|
-
|
|
2379
|
-
|
|
2454
|
+
])) : v("", !0),
|
|
2455
|
+
o("nav", Ca, [
|
|
2456
|
+
o("button", {
|
|
2380
2457
|
type: "button",
|
|
2381
2458
|
class: d([
|
|
2382
2459
|
e.compact ? "h-6 px-2 text-xs" : "h-8 px-3",
|
|
2383
2460
|
"rounded-full pagination-text hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
2384
2461
|
]),
|
|
2385
|
-
disabled:
|
|
2386
|
-
onClick:
|
|
2462
|
+
disabled: f.value <= 1,
|
|
2463
|
+
onClick: k[0] || (k[0] = (y) => x(f.value - 1)),
|
|
2387
2464
|
"aria-label": "Anterior"
|
|
2388
|
-
}, M(t.previousText), 11,
|
|
2389
|
-
(l(!0), a(U, null, Q(z.value, (
|
|
2390
|
-
key: `page-${T}-${
|
|
2465
|
+
}, M(t.previousText), 11, $a),
|
|
2466
|
+
(l(!0), a(U, null, Q(z.value, (y, T) => (l(), a(U, {
|
|
2467
|
+
key: `page-${T}-${y}`
|
|
2391
2468
|
}, [
|
|
2392
|
-
|
|
2469
|
+
y === "…" ? (l(), a("span", {
|
|
2393
2470
|
key: 0,
|
|
2394
2471
|
class: d([
|
|
2395
2472
|
e.compact ? "h-6 min-w-6 px-1" : "h-8 min-w-8 px-2",
|
|
@@ -2398,29 +2475,29 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2398
2475
|
}, " … ", 2)) : (l(), a("button", {
|
|
2399
2476
|
key: 1,
|
|
2400
2477
|
type: "button",
|
|
2401
|
-
"aria-label": `Página ${
|
|
2478
|
+
"aria-label": `Página ${y}`,
|
|
2402
2479
|
class: d([
|
|
2403
2480
|
e.compact ? "h-6 min-w-6 px-2 text-xs" : "h-8 min-w-8 px-3",
|
|
2404
2481
|
"rounded-full transition-colors",
|
|
2405
|
-
|
|
2482
|
+
y === f.value ? "bg-primary-500 text-white font-semibold" : "pagination-text hover:bg-secondary-100"
|
|
2406
2483
|
]),
|
|
2407
|
-
onClick: (V) =>
|
|
2408
|
-
}, M(
|
|
2484
|
+
onClick: (V) => x(Number(y))
|
|
2485
|
+
}, M(y), 11, Ba))
|
|
2409
2486
|
], 64))), 128)),
|
|
2410
|
-
|
|
2487
|
+
o("button", {
|
|
2411
2488
|
type: "button",
|
|
2412
2489
|
class: d([
|
|
2413
2490
|
e.compact ? "h-6 px-2 text-xs" : "h-8 px-3",
|
|
2414
2491
|
"rounded-full pagination-text hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
2415
2492
|
]),
|
|
2416
|
-
disabled:
|
|
2417
|
-
onClick:
|
|
2493
|
+
disabled: f.value >= r.value,
|
|
2494
|
+
onClick: k[1] || (k[1] = (y) => x(f.value + 1)),
|
|
2418
2495
|
"aria-label": "Siguiente"
|
|
2419
|
-
}, M(t.nextText), 11,
|
|
2496
|
+
}, M(t.nextText), 11, za)
|
|
2420
2497
|
])
|
|
2421
2498
|
]));
|
|
2422
2499
|
}
|
|
2423
|
-
}),
|
|
2500
|
+
}), mo = /* @__PURE__ */ Z(Ma, [["__scopeId", "data-v-621d6bba"]]), bo = /* @__PURE__ */ E({
|
|
2424
2501
|
__name: "Tooltip",
|
|
2425
2502
|
props: {
|
|
2426
2503
|
content: { default: "" },
|
|
@@ -2434,59 +2511,59 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2434
2511
|
},
|
|
2435
2512
|
setup(t) {
|
|
2436
2513
|
const g = t, e = R(!1);
|
|
2437
|
-
let
|
|
2438
|
-
const
|
|
2439
|
-
g.trigger === "hover" && (clearTimeout(r),
|
|
2514
|
+
let m = null, r = null;
|
|
2515
|
+
const f = () => {
|
|
2516
|
+
g.trigger === "hover" && (clearTimeout(r), m = setTimeout(() => {
|
|
2440
2517
|
e.value = !0;
|
|
2441
2518
|
}, g.openDelay));
|
|
2442
2519
|
}, u = () => {
|
|
2443
|
-
g.trigger === "hover" && (clearTimeout(
|
|
2520
|
+
g.trigger === "hover" && (clearTimeout(m), r = setTimeout(() => {
|
|
2444
2521
|
e.value = !1;
|
|
2445
2522
|
}, g.closeDelay));
|
|
2446
2523
|
}, n = () => {
|
|
2447
2524
|
g.trigger === "click" && (e.value = !e.value);
|
|
2448
|
-
},
|
|
2525
|
+
}, b = () => {
|
|
2449
2526
|
g.trigger === "focus" && (e.value = !0);
|
|
2450
2527
|
}, z = () => {
|
|
2451
2528
|
g.trigger === "focus" && (e.value = !1);
|
|
2452
|
-
},
|
|
2529
|
+
}, x = {
|
|
2453
2530
|
sm: "px-2 py-1 text-xs",
|
|
2454
2531
|
md: "px-3 py-2 text-sm",
|
|
2455
2532
|
lg: "px-4 py-3 text-base"
|
|
2456
|
-
},
|
|
2533
|
+
}, h = {
|
|
2457
2534
|
// Deja un pequeño espacio entre el activador y el tooltip
|
|
2458
2535
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
2459
2536
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
2460
2537
|
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
2461
2538
|
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
2462
|
-
},
|
|
2539
|
+
}, k = s(() => `absolute w-0 h-0 border-solid border-4 border-transparent ${{
|
|
2463
2540
|
top: "bottom-[-8px] rotate-180 left-1/2 -translate-x-1/2",
|
|
2464
2541
|
bottom: "top-[-8px] rotate-180 left-1/2 -translate-x-1/2",
|
|
2465
2542
|
left: "right-[-8px] rotate-180 top-1/2 -translate-y-1/2",
|
|
2466
2543
|
right: "left-[-8px] rotate-180 top-1/2 -translate-y-1/2"
|
|
2467
|
-
}[g.position]}`),
|
|
2544
|
+
}[g.position]}`), y = s(() => ({
|
|
2468
2545
|
"bg-gray-900": "#111827",
|
|
2469
2546
|
"bg-primary-500": "#0ea5e9",
|
|
2470
2547
|
"bg-green-600": "#16a34a",
|
|
2471
2548
|
"bg-yellow-600": "#ca8a04",
|
|
2472
2549
|
"bg-danger-600": "#dc2626"
|
|
2473
|
-
})[g.backgroundColor] || "#111827"), T =
|
|
2550
|
+
})[g.backgroundColor] || "#111827"), T = s(() => ({
|
|
2474
2551
|
// Orden: top, right, bottom, left
|
|
2475
|
-
top: `transparent transparent ${
|
|
2552
|
+
top: `transparent transparent ${y.value} transparent`,
|
|
2476
2553
|
// tooltip arriba → flecha apunta hacia abajo (borde inferior coloreado)
|
|
2477
|
-
bottom: `${
|
|
2554
|
+
bottom: `${y.value} transparent transparent transparent`,
|
|
2478
2555
|
// tooltip abajo → flecha apunta hacia arriba (borde superior coloreado)
|
|
2479
|
-
left: `transparent ${
|
|
2556
|
+
left: `transparent ${y.value} transparent transparent`,
|
|
2480
2557
|
// tooltip a la izquierda → flecha apunta hacia la derecha (borde derecho coloreado)
|
|
2481
|
-
right: `transparent transparent transparent ${
|
|
2558
|
+
right: `transparent transparent transparent ${y.value}`
|
|
2482
2559
|
// tooltip a la derecha → flecha apunta hacia la izquierda (borde izquierdo coloreado)
|
|
2483
|
-
})[g.position]), V =
|
|
2560
|
+
})[g.position]), V = s(() => `absolute ${h[g.position]} ${g.textColor} ${x[g.size]} rounded-md shadow-lg whitespace-nowrap z-50`);
|
|
2484
2561
|
return (j, W) => (l(), a("div", {
|
|
2485
2562
|
class: "relative inline-flex",
|
|
2486
|
-
onMouseenter:
|
|
2563
|
+
onMouseenter: f,
|
|
2487
2564
|
onMouseleave: u,
|
|
2488
2565
|
onClick: n,
|
|
2489
|
-
onFocus:
|
|
2566
|
+
onFocus: b,
|
|
2490
2567
|
onBlur: z
|
|
2491
2568
|
}, [
|
|
2492
2569
|
P(j.$slots, "default"),
|
|
@@ -2502,23 +2579,23 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2502
2579
|
e.value ? (l(), a("div", {
|
|
2503
2580
|
key: 0,
|
|
2504
2581
|
class: d(V.value),
|
|
2505
|
-
style:
|
|
2582
|
+
style: q({ backgroundColor: y.value }),
|
|
2506
2583
|
role: "tooltip"
|
|
2507
2584
|
}, [
|
|
2508
2585
|
P(j.$slots, "content", {}, () => [
|
|
2509
2586
|
H(M(t.content), 1)
|
|
2510
2587
|
]),
|
|
2511
|
-
|
|
2512
|
-
class: d(
|
|
2513
|
-
style:
|
|
2588
|
+
o("div", {
|
|
2589
|
+
class: d(k.value),
|
|
2590
|
+
style: q({ borderColor: T.value })
|
|
2514
2591
|
}, null, 6)
|
|
2515
|
-
], 6)) :
|
|
2592
|
+
], 6)) : v("", !0)
|
|
2516
2593
|
]),
|
|
2517
2594
|
_: 3
|
|
2518
2595
|
})
|
|
2519
2596
|
], 32));
|
|
2520
2597
|
}
|
|
2521
|
-
}),
|
|
2598
|
+
}), Va = { class: "truncate" }, Da = ["aria-label", "disabled"], vo = /* @__PURE__ */ E({
|
|
2522
2599
|
__name: "Chip",
|
|
2523
2600
|
props: {
|
|
2524
2601
|
label: { default: "" },
|
|
@@ -2533,7 +2610,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2533
2610
|
},
|
|
2534
2611
|
emits: ["click", "close"],
|
|
2535
2612
|
setup(t, { emit: g }) {
|
|
2536
|
-
const e = t,
|
|
2613
|
+
const e = t, m = g, r = s(() => !!e.icon), f = s(() => e.icon || ""), u = s(() => ({
|
|
2537
2614
|
sm: e.compact ? "h-6 text-xs px-2 gap-1 font-semibold leading-none" : "h-7 text-xs px-3 gap-1.5 font-semibold leading-none",
|
|
2538
2615
|
md: e.compact ? "h-7 text-xs px-2.5 gap-1.5 font-semibold leading-none" : "h-8 text-sm px-3.5 gap-2 font-semibold leading-none"
|
|
2539
2616
|
})), n = {
|
|
@@ -2572,8 +2649,8 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2572
2649
|
outlined: "bg-white text-sky-700 border border-sky-300",
|
|
2573
2650
|
tonal: "bg-sky-50 text-sky-700 border border-sky-100"
|
|
2574
2651
|
}
|
|
2575
|
-
},
|
|
2576
|
-
const
|
|
2652
|
+
}, b = s(() => {
|
|
2653
|
+
const k = n[e.color] ?? n.default, y = k[e.variant] ?? k.filled;
|
|
2577
2654
|
return [
|
|
2578
2655
|
"inline-flex items-center select-none",
|
|
2579
2656
|
"transition-colors duration-150",
|
|
@@ -2581,29 +2658,29 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2581
2658
|
u.value[e.size],
|
|
2582
2659
|
"rounded-full",
|
|
2583
2660
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-default",
|
|
2584
|
-
|
|
2661
|
+
y
|
|
2585
2662
|
].join(" ");
|
|
2586
|
-
}), z =
|
|
2587
|
-
e.disabled ||
|
|
2588
|
-
},
|
|
2589
|
-
e.disabled ||
|
|
2663
|
+
}), z = s(() => "text-current flex items-center"), x = () => {
|
|
2664
|
+
e.disabled || m("close");
|
|
2665
|
+
}, h = () => {
|
|
2666
|
+
e.disabled || m("click");
|
|
2590
2667
|
};
|
|
2591
|
-
return (
|
|
2592
|
-
class: d(
|
|
2668
|
+
return (k, y) => (l(), a("div", {
|
|
2669
|
+
class: d(b.value),
|
|
2593
2670
|
role: "status",
|
|
2594
|
-
onClick:
|
|
2671
|
+
onClick: h
|
|
2595
2672
|
}, [
|
|
2596
2673
|
r.value ? (l(), a("span", {
|
|
2597
2674
|
key: 0,
|
|
2598
2675
|
class: d(z.value)
|
|
2599
2676
|
}, [
|
|
2600
2677
|
_(ee, {
|
|
2601
|
-
name:
|
|
2678
|
+
name: f.value,
|
|
2602
2679
|
size: "sm"
|
|
2603
2680
|
}, null, 8, ["name"])
|
|
2604
|
-
], 2)) :
|
|
2605
|
-
|
|
2606
|
-
P(
|
|
2681
|
+
], 2)) : v("", !0),
|
|
2682
|
+
o("span", Va, [
|
|
2683
|
+
P(k.$slots, "default", {}, () => [
|
|
2607
2684
|
H(M(t.label), 1)
|
|
2608
2685
|
])
|
|
2609
2686
|
]),
|
|
@@ -2612,23 +2689,23 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2612
2689
|
type: "button",
|
|
2613
2690
|
class: "shrink-0 rounded-full p-1 hover:bg-black/5 focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
2614
2691
|
"aria-label": t.closeAriaLabel,
|
|
2615
|
-
onClick: J(
|
|
2692
|
+
onClick: J(x, ["stop"]),
|
|
2616
2693
|
disabled: t.disabled
|
|
2617
2694
|
}, [
|
|
2618
2695
|
_(ee, {
|
|
2619
2696
|
name: "close",
|
|
2620
2697
|
size: "sm"
|
|
2621
2698
|
})
|
|
2622
|
-
], 8,
|
|
2699
|
+
], 8, Da)) : v("", !0)
|
|
2623
2700
|
], 2));
|
|
2624
2701
|
}
|
|
2625
|
-
}),
|
|
2702
|
+
}), Sa = { class: "checkbox-wrapper" }, Ta = ["for"], Ia = {
|
|
2626
2703
|
key: 0,
|
|
2627
2704
|
class: "relative inline-block"
|
|
2628
|
-
},
|
|
2705
|
+
}, ja = ["id", "checked", "disabled"], La = {
|
|
2629
2706
|
key: 1,
|
|
2630
2707
|
class: "relative inline-flex items-center"
|
|
2631
|
-
},
|
|
2708
|
+
}, Oa = ["id", "checked", "disabled"], Aa = /* @__PURE__ */ E({
|
|
2632
2709
|
__name: "Checkbox",
|
|
2633
2710
|
props: {
|
|
2634
2711
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2640,7 +2717,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2640
2717
|
},
|
|
2641
2718
|
emits: ["update:modelValue", "change"],
|
|
2642
2719
|
setup(t, { emit: g }) {
|
|
2643
|
-
const e = t,
|
|
2720
|
+
const e = t, m = g, r = s(() => `checkbox-${Math.random().toString(36).substr(2, 9)}`), f = {
|
|
2644
2721
|
primary: {
|
|
2645
2722
|
50: "#f1fbfc",
|
|
2646
2723
|
100: "#d3f4f6",
|
|
@@ -2677,15 +2754,15 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2677
2754
|
700: "#15803d",
|
|
2678
2755
|
800: "#166534"
|
|
2679
2756
|
}
|
|
2680
|
-
}, u = (
|
|
2757
|
+
}, u = (p) => {
|
|
2681
2758
|
if (e.color.startsWith("#"))
|
|
2682
2759
|
return e.color;
|
|
2683
|
-
const i =
|
|
2684
|
-
return i ? i[
|
|
2685
|
-
}, n = (
|
|
2686
|
-
const
|
|
2687
|
-
return "#" + (16777216 + (D < 255 ? D < 1 ? 0 : D : 255) * 65536 + (
|
|
2688
|
-
},
|
|
2760
|
+
const i = f[e.color];
|
|
2761
|
+
return i ? i[p] : f.primary[p];
|
|
2762
|
+
}, n = (p, i) => {
|
|
2763
|
+
const B = parseInt(p.replace("#", ""), 16), c = Math.round(2.55 * i), D = (B >> 16) + c, w = (B >> 8 & 255) + c, X = (B & 255) + c;
|
|
2764
|
+
return "#" + (16777216 + (D < 255 ? D < 1 ? 0 : D : 255) * 65536 + (w < 255 ? w < 1 ? 0 : w : 255) * 256 + (X < 255 ? X < 1 ? 0 : X : 255)).toString(16).slice(1);
|
|
2765
|
+
}, b = {
|
|
2689
2766
|
sm: { box: "w-4 h-4", icon: "w-3 h-3", label: "text-sm" },
|
|
2690
2767
|
md: { box: "w-5 h-5", icon: "w-4 h-4", label: "text-base" },
|
|
2691
2768
|
lg: { box: "w-6 h-6", icon: "w-5 h-5", label: "text-lg" }
|
|
@@ -2693,85 +2770,85 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2693
2770
|
sm: { track: "w-9 h-5", thumb: "w-6 h-6", label: "text-sm", offsetActive: "15px", offsetInactive: "-1px" },
|
|
2694
2771
|
md: { track: "w-11 h-6", thumb: "w-7 h-7", label: "text-base", offsetActive: "18px", offsetInactive: "-1px" },
|
|
2695
2772
|
lg: { track: "w-14 h-8", thumb: "w-9 h-9", label: "text-lg", offsetActive: "22px", offsetInactive: "-1px" }
|
|
2696
|
-
},
|
|
2773
|
+
}, x = s(() => b[e.size]), h = s(() => z[e.size]), k = s(() => e.variant === "switch" ? h.value.label : x.value.label), y = s(() => [
|
|
2697
2774
|
"appearance-none rounded cursor-pointer transition-all duration-200",
|
|
2698
|
-
|
|
2775
|
+
x.value.box,
|
|
2699
2776
|
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
2700
|
-
]), T =
|
|
2701
|
-
const
|
|
2777
|
+
]), T = s(() => {
|
|
2778
|
+
const p = e.color.startsWith("#") ? e.color : u(500);
|
|
2702
2779
|
return {
|
|
2703
2780
|
border: "2px solid",
|
|
2704
|
-
borderColor: e.modelValue ?
|
|
2705
|
-
backgroundColor: e.modelValue ?
|
|
2781
|
+
borderColor: e.modelValue ? p : "#9ca3af",
|
|
2782
|
+
backgroundColor: e.modelValue ? p : "white"
|
|
2706
2783
|
};
|
|
2707
|
-
}), V =
|
|
2784
|
+
}), V = s(() => [
|
|
2708
2785
|
"text-white",
|
|
2709
|
-
|
|
2786
|
+
x.value.icon,
|
|
2710
2787
|
"top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
|
|
2711
|
-
]), j =
|
|
2788
|
+
]), j = s(() => [
|
|
2712
2789
|
"rounded-full transition-all duration-300 flex items-center relative",
|
|
2713
|
-
|
|
2790
|
+
h.value.track,
|
|
2714
2791
|
e.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
2715
|
-
]), W =
|
|
2716
|
-
const
|
|
2792
|
+
]), W = s(() => {
|
|
2793
|
+
const p = e.color.startsWith("#") ? n(e.color, 60) : u(200);
|
|
2717
2794
|
return {
|
|
2718
|
-
backgroundColor: e.modelValue ?
|
|
2795
|
+
backgroundColor: e.modelValue ? p : "#cbd5e1"
|
|
2719
2796
|
};
|
|
2720
|
-
}), I =
|
|
2797
|
+
}), I = s(() => [
|
|
2721
2798
|
"rounded-full shadow-lg transition-all duration-300 absolute",
|
|
2722
|
-
|
|
2723
|
-
]), L =
|
|
2724
|
-
const
|
|
2799
|
+
h.value.thumb
|
|
2800
|
+
]), L = s(() => {
|
|
2801
|
+
const p = e.color.startsWith("#") ? n(e.color, -30) : u(700), i = e.color.startsWith("#") ? n(e.color, -40) : u(800);
|
|
2725
2802
|
return {
|
|
2726
2803
|
top: "50%",
|
|
2727
2804
|
transform: "translateY(-50%)",
|
|
2728
|
-
left: e.modelValue ?
|
|
2729
|
-
backgroundColor: e.modelValue ?
|
|
2805
|
+
left: e.modelValue ? h.value.offsetActive : h.value.offsetInactive,
|
|
2806
|
+
backgroundColor: e.modelValue ? p : "#ffffff",
|
|
2730
2807
|
border: e.modelValue ? `2px solid ${i}` : "2px solid #e5e7eb"
|
|
2731
2808
|
};
|
|
2732
|
-
}), A =
|
|
2809
|
+
}), A = s(() => [
|
|
2733
2810
|
"select-none",
|
|
2734
|
-
|
|
2811
|
+
k.value,
|
|
2735
2812
|
e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
2736
|
-
]), F =
|
|
2813
|
+
]), F = s(() => ({
|
|
2737
2814
|
color: "#565656"
|
|
2738
|
-
})),
|
|
2739
|
-
const
|
|
2740
|
-
|
|
2815
|
+
})), $ = (p) => {
|
|
2816
|
+
const B = p.target.checked;
|
|
2817
|
+
m("update:modelValue", B), m("change", B);
|
|
2741
2818
|
};
|
|
2742
|
-
return (
|
|
2743
|
-
|
|
2819
|
+
return (p, i) => (l(), a("div", Sa, [
|
|
2820
|
+
o("label", {
|
|
2744
2821
|
for: r.value,
|
|
2745
2822
|
class: "flex items-center cursor-pointer gap-2"
|
|
2746
2823
|
}, [
|
|
2747
|
-
t.variant === "switch" ? (l(), a("div",
|
|
2748
|
-
|
|
2824
|
+
t.variant === "switch" ? (l(), a("div", Ia, [
|
|
2825
|
+
o("input", {
|
|
2749
2826
|
id: r.value,
|
|
2750
2827
|
type: "checkbox",
|
|
2751
2828
|
checked: t.modelValue,
|
|
2752
2829
|
disabled: t.disabled,
|
|
2753
2830
|
class: "sr-only",
|
|
2754
|
-
onChange:
|
|
2755
|
-
}, null, 40,
|
|
2756
|
-
|
|
2831
|
+
onChange: $
|
|
2832
|
+
}, null, 40, ja),
|
|
2833
|
+
o("div", {
|
|
2757
2834
|
class: d(j.value),
|
|
2758
|
-
style:
|
|
2835
|
+
style: q(W.value)
|
|
2759
2836
|
}, [
|
|
2760
|
-
|
|
2837
|
+
o("div", {
|
|
2761
2838
|
class: d(I.value),
|
|
2762
|
-
style:
|
|
2839
|
+
style: q(L.value)
|
|
2763
2840
|
}, null, 6)
|
|
2764
2841
|
], 6)
|
|
2765
|
-
])) : (l(), a("div",
|
|
2766
|
-
|
|
2842
|
+
])) : (l(), a("div", La, [
|
|
2843
|
+
o("input", {
|
|
2767
2844
|
id: r.value,
|
|
2768
2845
|
type: "checkbox",
|
|
2769
2846
|
checked: t.modelValue,
|
|
2770
2847
|
disabled: t.disabled,
|
|
2771
|
-
class: d(
|
|
2772
|
-
style:
|
|
2773
|
-
onChange:
|
|
2774
|
-
}, null, 46,
|
|
2848
|
+
class: d(y.value),
|
|
2849
|
+
style: q(T.value),
|
|
2850
|
+
onChange: $
|
|
2851
|
+
}, null, 46, Oa),
|
|
2775
2852
|
t.modelValue ? (l(), a("svg", {
|
|
2776
2853
|
key: 0,
|
|
2777
2854
|
class: d(["absolute pointer-events-none", V.value]),
|
|
@@ -2779,22 +2856,22 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2779
2856
|
viewBox: "0 0 20 20",
|
|
2780
2857
|
fill: "currentColor"
|
|
2781
2858
|
}, [...i[0] || (i[0] = [
|
|
2782
|
-
|
|
2859
|
+
o("path", {
|
|
2783
2860
|
"fill-rule": "evenodd",
|
|
2784
2861
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
2785
2862
|
"clip-rule": "evenodd"
|
|
2786
2863
|
}, null, -1)
|
|
2787
|
-
])], 2)) :
|
|
2864
|
+
])], 2)) : v("", !0)
|
|
2788
2865
|
])),
|
|
2789
2866
|
t.label ? (l(), a("span", {
|
|
2790
2867
|
key: 2,
|
|
2791
2868
|
class: d(A.value),
|
|
2792
|
-
style:
|
|
2793
|
-
}, M(t.label), 7)) :
|
|
2794
|
-
], 8,
|
|
2869
|
+
style: q(F.value)
|
|
2870
|
+
}, M(t.label), 7)) : v("", !0)
|
|
2871
|
+
], 8, Ta)
|
|
2795
2872
|
]));
|
|
2796
2873
|
}
|
|
2797
|
-
}),
|
|
2874
|
+
}), go = /* @__PURE__ */ Z(Aa, [["__scopeId", "data-v-0d2c6db5"]]), Wa = { class: "slider-wrapper" }, Fa = ["for"], Pa = { class: "relative w-full" }, Ra = ["id", "min", "max", "step", "value", "disabled"], Ea = /* @__PURE__ */ E({
|
|
2798
2875
|
__name: "Slider",
|
|
2799
2876
|
props: {
|
|
2800
2877
|
modelValue: { default: 0 },
|
|
@@ -2808,7 +2885,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2808
2885
|
},
|
|
2809
2886
|
emits: ["update:modelValue", "change"],
|
|
2810
2887
|
setup(t, { emit: g }) {
|
|
2811
|
-
const e = t,
|
|
2888
|
+
const e = t, m = g, r = s(() => `slider-${Math.random().toString(36).slice(2, 9)}`), f = {
|
|
2812
2889
|
primary: {
|
|
2813
2890
|
50: "#f1fbfc",
|
|
2814
2891
|
100: "#d3f4f6",
|
|
@@ -2847,47 +2924,47 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2847
2924
|
}
|
|
2848
2925
|
}, u = (T) => {
|
|
2849
2926
|
if (typeof e.color == "string" && e.color.startsWith("#")) return e.color;
|
|
2850
|
-
const V =
|
|
2851
|
-
return V ? V[T] :
|
|
2927
|
+
const V = f[e.color];
|
|
2928
|
+
return V ? V[T] : f.primary[T];
|
|
2852
2929
|
}, n = (T, V) => {
|
|
2853
2930
|
const j = parseInt(T.replace("#", ""), 16), W = Math.round(2.55 * V), I = (j >> 16) + W, L = (j >> 8 & 255) + W, A = (j & 255) + W;
|
|
2854
2931
|
return "#" + (16777216 + (I < 255 ? I < 1 ? 0 : I : 255) * 65536 + (L < 255 ? L < 1 ? 0 : L : 255) * 256 + (A < 255 ? A < 1 ? 0 : A : 255)).toString(16).slice(1);
|
|
2855
|
-
},
|
|
2932
|
+
}, b = s(() => ({
|
|
2856
2933
|
sm: { trackHeight: "0.375rem", thumbSize: "1.1rem", shadow: "0 3px 8px rgba(0,0,0,0.2)" },
|
|
2857
2934
|
md: { trackHeight: "0.5rem", thumbSize: "1.3rem", shadow: "0 4px 10px rgba(0,0,0,0.22)" },
|
|
2858
2935
|
lg: { trackHeight: "0.625rem", thumbSize: "1.5rem", shadow: "0 5px 12px rgba(0,0,0,0.24)" }
|
|
2859
|
-
})[e.size]), z =
|
|
2936
|
+
})[e.size]), z = s(() => {
|
|
2860
2937
|
const T = e.max - e.min;
|
|
2861
2938
|
return T <= 0 ? 0 : (Math.min(e.max, Math.max(e.min, e.modelValue)) - e.min) / T * 100;
|
|
2862
|
-
}),
|
|
2939
|
+
}), x = s(() => [
|
|
2863
2940
|
e.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
2864
|
-
]),
|
|
2941
|
+
]), h = s(() => {
|
|
2865
2942
|
const T = u(500), V = typeof e.color == "string" && e.color.startsWith("#") ? n(e.color, -20) : u(700), j = typeof e.color == "string" && e.color.startsWith("#") ? n(e.color, -30) : u(800), W = typeof e.color == "string" && e.color.startsWith("#") ? n(e.color, 55) : u(200), I = Math.min(100, Math.max(0, z.value));
|
|
2866
2943
|
return {
|
|
2867
2944
|
background: `linear-gradient(90deg, ${T} 0%, ${T} ${I}%, #e5e7eb ${I}%, #e5e7eb 100%)`,
|
|
2868
|
-
"--slider-track-height":
|
|
2869
|
-
"--slider-thumb-size":
|
|
2945
|
+
"--slider-track-height": b.value.trackHeight,
|
|
2946
|
+
"--slider-thumb-size": b.value.thumbSize,
|
|
2870
2947
|
"--slider-thumb-color": V,
|
|
2871
2948
|
"--slider-thumb-border": `2px solid ${j}`,
|
|
2872
|
-
"--slider-thumb-shadow":
|
|
2949
|
+
"--slider-thumb-shadow": b.value.shadow,
|
|
2873
2950
|
"--slider-track-active": W
|
|
2874
2951
|
};
|
|
2875
|
-
}),
|
|
2952
|
+
}), k = (T) => {
|
|
2876
2953
|
const V = T.target, j = Number(V.value);
|
|
2877
|
-
|
|
2878
|
-
},
|
|
2954
|
+
m("update:modelValue", j);
|
|
2955
|
+
}, y = (T) => {
|
|
2879
2956
|
const V = T.target, j = Number(V.value);
|
|
2880
|
-
|
|
2957
|
+
m("change", j);
|
|
2881
2958
|
};
|
|
2882
|
-
return (T, V) => (l(), a("div",
|
|
2959
|
+
return (T, V) => (l(), a("div", Wa, [
|
|
2883
2960
|
t.label ? (l(), a("label", {
|
|
2884
2961
|
key: 0,
|
|
2885
2962
|
for: r.value,
|
|
2886
2963
|
class: "mb-2 block text-sm font-medium",
|
|
2887
2964
|
style: { color: "#565656" }
|
|
2888
|
-
}, M(t.label), 9,
|
|
2889
|
-
|
|
2890
|
-
|
|
2965
|
+
}, M(t.label), 9, Fa)) : v("", !0),
|
|
2966
|
+
o("div", Pa, [
|
|
2967
|
+
o("input", {
|
|
2891
2968
|
id: r.value,
|
|
2892
2969
|
type: "range",
|
|
2893
2970
|
min: t.min,
|
|
@@ -2895,18 +2972,18 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2895
2972
|
step: t.step,
|
|
2896
2973
|
value: t.modelValue,
|
|
2897
2974
|
disabled: t.disabled,
|
|
2898
|
-
class: d(["slider-input w-full",
|
|
2899
|
-
style:
|
|
2900
|
-
onInput:
|
|
2901
|
-
onChange:
|
|
2902
|
-
}, null, 46,
|
|
2975
|
+
class: d(["slider-input w-full", x.value]),
|
|
2976
|
+
style: q(h.value),
|
|
2977
|
+
onInput: k,
|
|
2978
|
+
onChange: y
|
|
2979
|
+
}, null, 46, Ra)
|
|
2903
2980
|
])
|
|
2904
2981
|
]));
|
|
2905
2982
|
}
|
|
2906
|
-
}),
|
|
2983
|
+
}), ho = /* @__PURE__ */ Z(Ea, [["__scopeId", "data-v-89541d1a"]]), qa = ["data-node-id"], Na = {
|
|
2907
2984
|
key: 0,
|
|
2908
2985
|
class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center"
|
|
2909
|
-
},
|
|
2986
|
+
}, Ya = {
|
|
2910
2987
|
key: 0,
|
|
2911
2988
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2912
2989
|
width: "24",
|
|
@@ -2917,7 +2994,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2917
2994
|
"stroke-width": "2",
|
|
2918
2995
|
"stroke-linecap": "round",
|
|
2919
2996
|
"stroke-linejoin": "round"
|
|
2920
|
-
},
|
|
2997
|
+
}, Ha = {
|
|
2921
2998
|
key: 1,
|
|
2922
2999
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2923
3000
|
width: "24",
|
|
@@ -2928,7 +3005,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2928
3005
|
"stroke-width": "2",
|
|
2929
3006
|
"stroke-linecap": "round",
|
|
2930
3007
|
"stroke-linejoin": "round"
|
|
2931
|
-
},
|
|
3008
|
+
}, Ka = {
|
|
2932
3009
|
key: 2,
|
|
2933
3010
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2934
3011
|
width: "24",
|
|
@@ -2939,7 +3016,7 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2939
3016
|
"stroke-width": "2",
|
|
2940
3017
|
"stroke-linecap": "round",
|
|
2941
3018
|
"stroke-linejoin": "round"
|
|
2942
|
-
},
|
|
3019
|
+
}, Ua = {
|
|
2943
3020
|
key: 3,
|
|
2944
3021
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2945
3022
|
width: "24",
|
|
@@ -2950,10 +3027,10 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2950
3027
|
"stroke-width": "2",
|
|
2951
3028
|
"stroke-linecap": "round",
|
|
2952
3029
|
"stroke-linejoin": "round"
|
|
2953
|
-
},
|
|
3030
|
+
}, Ga = {
|
|
2954
3031
|
key: 1,
|
|
2955
3032
|
class: "flex flex-wrap items-center justify-end gap-2 px-6 pb-6 pt-4"
|
|
2956
|
-
},
|
|
3033
|
+
}, yo = /* @__PURE__ */ E({
|
|
2957
3034
|
__name: "Alert",
|
|
2958
3035
|
props: {
|
|
2959
3036
|
variant: { default: "info" },
|
|
@@ -2970,21 +3047,21 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2970
3047
|
emits: ["close", "accept", "cancel"],
|
|
2971
3048
|
setup(t, { emit: g }) {
|
|
2972
3049
|
const e = g;
|
|
2973
|
-
let
|
|
2974
|
-
const r = t,
|
|
2975
|
-
|
|
2976
|
-
},
|
|
2977
|
-
|
|
3050
|
+
let m = null;
|
|
3051
|
+
const r = t, f = s(() => r.variant), u = s(() => r.multiline), n = s(() => r.actions), b = s(() => r.nodeId), z = s(() => r.showIcon), x = () => {
|
|
3052
|
+
h(), e("close");
|
|
3053
|
+
}, h = () => {
|
|
3054
|
+
m !== null && (clearTimeout(m), m = null);
|
|
2978
3055
|
};
|
|
2979
3056
|
ve(() => {
|
|
2980
|
-
r.autoClose && r.autoClose > 0 && (
|
|
3057
|
+
r.autoClose && r.autoClose > 0 && (m = setTimeout(() => {
|
|
2981
3058
|
e("close");
|
|
2982
3059
|
}, r.autoClose));
|
|
2983
3060
|
}), ge(() => {
|
|
2984
|
-
|
|
3061
|
+
h();
|
|
2985
3062
|
});
|
|
2986
|
-
const
|
|
2987
|
-
switch (
|
|
3063
|
+
const k = s(() => !!r.title), y = s(() => r.title ?? ""), T = s(() => r.description ?? ""), V = s(() => {
|
|
3064
|
+
switch (f.value) {
|
|
2988
3065
|
case "info":
|
|
2989
3066
|
return {
|
|
2990
3067
|
border: "border-[var(--semantica/info,#0064ff)]",
|
|
@@ -3006,36 +3083,36 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
3006
3083
|
bg: "bg-[#fdf7f9] outline outline-1 outline-[rgba(214,0,64,0.5)]"
|
|
3007
3084
|
};
|
|
3008
3085
|
}
|
|
3009
|
-
}), j =
|
|
3086
|
+
}), j = s(() => "bg-[var(--color-primario/500,#56ced4)]"), W = s(() => {
|
|
3010
3087
|
const F = "flex w-full items-start gap-4 flex-col";
|
|
3011
3088
|
if (!r.stackOn) return `${F} sm:flex-row sm:items-center`;
|
|
3012
|
-
const
|
|
3013
|
-
return `${F} ${
|
|
3014
|
-
}), I =
|
|
3089
|
+
const $ = r.stackOn, p = `${$}:flex-row ${$}:items-center`;
|
|
3090
|
+
return `${F} ${p}`;
|
|
3091
|
+
}), I = s(() => {
|
|
3015
3092
|
if (!r.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
|
|
3016
3093
|
const F = r.stackOn;
|
|
3017
3094
|
return `flex-col ${F}:flex-row items-start ${F}:items-center`;
|
|
3018
|
-
}), L =
|
|
3095
|
+
}), L = s(() => {
|
|
3019
3096
|
if (!r.stackOn) return "flex-col sm:flex-row sm:items-center w-full";
|
|
3020
3097
|
const F = r.stackOn;
|
|
3021
3098
|
return `flex-col ${F}:flex-row ${F}:items-center w-full`;
|
|
3022
|
-
}), A =
|
|
3023
|
-
return (F,
|
|
3099
|
+
}), A = s(() => r.stackOn ? `self-start ${r.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
3100
|
+
return (F, $) => (l(), a("div", {
|
|
3024
3101
|
class: d(["relative w-full rounded-xl border", [
|
|
3025
3102
|
V.value.border,
|
|
3026
3103
|
V.value.bg
|
|
3027
3104
|
]]),
|
|
3028
3105
|
role: "alert",
|
|
3029
|
-
"data-node-id":
|
|
3106
|
+
"data-node-id": b.value
|
|
3030
3107
|
}, [
|
|
3031
3108
|
t.closable ? (l(), a("button", {
|
|
3032
3109
|
key: 0,
|
|
3033
3110
|
type: "button",
|
|
3034
3111
|
class: "absolute top-3 right-3 text-[color:var(--neutrales/texto-principal,#565656)]/70 hover:opacity-100 opacity-70",
|
|
3035
3112
|
"aria-label": "Cerrar",
|
|
3036
|
-
onClick:
|
|
3037
|
-
}, [
|
|
3038
|
-
|
|
3113
|
+
onClick: x
|
|
3114
|
+
}, [...$[2] || ($[2] = [
|
|
3115
|
+
o("svg", {
|
|
3039
3116
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3040
3117
|
width: "18",
|
|
3041
3118
|
height: "18",
|
|
@@ -3046,89 +3123,89 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
3046
3123
|
"stroke-linecap": "round",
|
|
3047
3124
|
"stroke-linejoin": "round"
|
|
3048
3125
|
}, [
|
|
3049
|
-
|
|
3126
|
+
o("line", {
|
|
3050
3127
|
x1: "18",
|
|
3051
3128
|
y1: "6",
|
|
3052
3129
|
x2: "6",
|
|
3053
3130
|
y2: "18"
|
|
3054
3131
|
}),
|
|
3055
|
-
|
|
3132
|
+
o("line", {
|
|
3056
3133
|
x1: "6",
|
|
3057
3134
|
y1: "6",
|
|
3058
3135
|
x2: "18",
|
|
3059
3136
|
y2: "18"
|
|
3060
3137
|
})
|
|
3061
3138
|
], -1)
|
|
3062
|
-
])])) :
|
|
3063
|
-
|
|
3139
|
+
])])) : v("", !0),
|
|
3140
|
+
o("div", {
|
|
3064
3141
|
class: d(["p-6", { "pb-0": n.value }])
|
|
3065
3142
|
}, [
|
|
3066
|
-
|
|
3143
|
+
o("div", {
|
|
3067
3144
|
class: d(W.value)
|
|
3068
3145
|
}, [
|
|
3069
|
-
z.value ? (l(), a("div",
|
|
3070
|
-
|
|
3071
|
-
|
|
3146
|
+
z.value ? (l(), a("div", Na, [
|
|
3147
|
+
f.value === "info" ? (l(), a("svg", Ya, [...$[3] || ($[3] = [
|
|
3148
|
+
o("circle", {
|
|
3072
3149
|
cx: "12",
|
|
3073
3150
|
cy: "12",
|
|
3074
3151
|
r: "10"
|
|
3075
3152
|
}, null, -1),
|
|
3076
|
-
|
|
3153
|
+
o("line", {
|
|
3077
3154
|
x1: "12",
|
|
3078
3155
|
y1: "16",
|
|
3079
3156
|
x2: "12",
|
|
3080
3157
|
y2: "12"
|
|
3081
3158
|
}, null, -1),
|
|
3082
|
-
|
|
3159
|
+
o("line", {
|
|
3083
3160
|
x1: "12",
|
|
3084
3161
|
y1: "8",
|
|
3085
3162
|
x2: "12",
|
|
3086
3163
|
y2: "8"
|
|
3087
3164
|
}, null, -1)
|
|
3088
|
-
])])) :
|
|
3089
|
-
|
|
3090
|
-
|
|
3165
|
+
])])) : f.value === "warning" ? (l(), a("svg", Ha, [...$[4] || ($[4] = [
|
|
3166
|
+
o("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),
|
|
3167
|
+
o("line", {
|
|
3091
3168
|
x1: "12",
|
|
3092
3169
|
y1: "9",
|
|
3093
3170
|
x2: "12",
|
|
3094
3171
|
y2: "13"
|
|
3095
3172
|
}, null, -1),
|
|
3096
|
-
|
|
3173
|
+
o("line", {
|
|
3097
3174
|
x1: "12",
|
|
3098
3175
|
y1: "17",
|
|
3099
3176
|
x2: "12",
|
|
3100
3177
|
y2: "17"
|
|
3101
3178
|
}, null, -1)
|
|
3102
|
-
])])) :
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
])])) : (l(), a("svg",
|
|
3106
|
-
|
|
3107
|
-
|
|
3179
|
+
])])) : f.value === "success" ? (l(), a("svg", Ka, [...$[5] || ($[5] = [
|
|
3180
|
+
o("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
3181
|
+
o("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
3182
|
+
])])) : (l(), a("svg", Ua, [...$[6] || ($[6] = [
|
|
3183
|
+
o("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),
|
|
3184
|
+
o("line", {
|
|
3108
3185
|
x1: "12",
|
|
3109
3186
|
y1: "8",
|
|
3110
3187
|
x2: "12",
|
|
3111
3188
|
y2: "12"
|
|
3112
3189
|
}, null, -1),
|
|
3113
|
-
|
|
3190
|
+
o("line", {
|
|
3114
3191
|
x1: "12",
|
|
3115
3192
|
y1: "16",
|
|
3116
3193
|
x2: "12",
|
|
3117
3194
|
y2: "16"
|
|
3118
3195
|
}, null, -1)
|
|
3119
3196
|
])]))
|
|
3120
|
-
])) :
|
|
3121
|
-
|
|
3197
|
+
])) : v("", !0),
|
|
3198
|
+
o("div", {
|
|
3122
3199
|
class: d(["flex-1 flex gap-4 text-[14px]", [I.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !u.value, "whitespace-pre-wrap": u.value }]])
|
|
3123
3200
|
}, [
|
|
3124
|
-
|
|
3201
|
+
o("div", {
|
|
3125
3202
|
class: d(["flex flex-1 gap-3 items-start", L.value])
|
|
3126
3203
|
}, [
|
|
3127
|
-
|
|
3204
|
+
k.value ? (l(), a("div", {
|
|
3128
3205
|
key: 0,
|
|
3129
3206
|
class: d(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", A.value])
|
|
3130
|
-
}, M(
|
|
3131
|
-
|
|
3207
|
+
}, M(y.value), 3)) : v("", !0),
|
|
3208
|
+
o("div", {
|
|
3132
3209
|
class: d(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !u.value }])
|
|
3133
3210
|
}, [
|
|
3134
3211
|
P(F.$slots, "description", {}, () => [
|
|
@@ -3139,49 +3216,50 @@ const Ye = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
3139
3216
|
], 2)
|
|
3140
3217
|
], 2)
|
|
3141
3218
|
], 2),
|
|
3142
|
-
n.value ? (l(), a("div",
|
|
3143
|
-
|
|
3219
|
+
n.value ? (l(), a("div", Ga, [
|
|
3220
|
+
o("button", {
|
|
3144
3221
|
type: "button",
|
|
3145
3222
|
class: "px-3 py-1.5 rounded-lg text-sm tracking-[0.25px] font-semibold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
3146
|
-
onClick:
|
|
3223
|
+
onClick: $[0] || ($[0] = (p) => F.$emit("cancel"))
|
|
3147
3224
|
}, [
|
|
3148
3225
|
P(F.$slots, "cancel", {}, () => [
|
|
3149
|
-
|
|
3226
|
+
$[7] || ($[7] = H("Cancelar", -1))
|
|
3150
3227
|
])
|
|
3151
3228
|
]),
|
|
3152
|
-
|
|
3229
|
+
o("button", {
|
|
3153
3230
|
type: "button",
|
|
3154
3231
|
class: d(["px-3 py-1.5 rounded-lg text-sm tracking-[0.25px] font-semibold text-white", j.value]),
|
|
3155
|
-
onClick:
|
|
3232
|
+
onClick: $[1] || ($[1] = (p) => F.$emit("accept"))
|
|
3156
3233
|
}, [
|
|
3157
3234
|
P(F.$slots, "accept", {}, () => [
|
|
3158
|
-
|
|
3235
|
+
$[8] || ($[8] = H("Aceptar", -1))
|
|
3159
3236
|
])
|
|
3160
3237
|
], 2)
|
|
3161
|
-
])) :
|
|
3238
|
+
])) : v("", !0)
|
|
3162
3239
|
], 10, qa));
|
|
3163
3240
|
}
|
|
3164
3241
|
});
|
|
3165
3242
|
export {
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3243
|
+
yo as Alert,
|
|
3244
|
+
Xa as AppBar,
|
|
3245
|
+
_a as Button,
|
|
3246
|
+
eo as Calendar,
|
|
3247
|
+
to as Card,
|
|
3248
|
+
go as Checkbox,
|
|
3249
|
+
vo as Chip,
|
|
3250
|
+
lo as Dialog,
|
|
3251
|
+
ao as FileUpload,
|
|
3175
3252
|
ee as Icon,
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3253
|
+
oo as Image,
|
|
3254
|
+
so as Input,
|
|
3255
|
+
ro as Loader,
|
|
3256
|
+
no as Menu,
|
|
3257
|
+
mo as Pagination,
|
|
3258
|
+
io as Select,
|
|
3259
|
+
co as Sidebar,
|
|
3260
|
+
ho as Slider,
|
|
3261
|
+
uo as Table,
|
|
3262
|
+
fo as Tabs,
|
|
3263
|
+
po as Text,
|
|
3264
|
+
bo as Tooltip
|
|
3187
3265
|
};
|