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