@iaclinical/components 1.0.26 → 1.0.27
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 +1036 -918
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as E, computed as n, createElementBlock as a, openBlock as s, normalizeClass as f, createElementVNode as l, createCommentVNode as x, renderSlot as V, toDisplayString as k, createBlock as Z, unref as Pe, normalizeStyle as U, ref as L, onMounted as Ce, onUnmounted as Me, watch as pe, createTextVNode as R, withModifiers as H, createVNode as G, withDirectives as ce, Fragment as Y, renderList as N, vModelSelect as $e, Teleport as ve, Transition as ne, withCtx as ae, nextTick as fe, resolveDynamicComponent as ge, vModelText as Ye } from "vue";
|
|
2
2
|
import { Icon as Ee } from "@iconify/vue";
|
|
3
|
-
const
|
|
3
|
+
const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, Re = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
6
|
-
},
|
|
6
|
+
}, We = { class: "flex flex-1 justify-center items-center min-w-0" }, Ne = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins truncate"
|
|
9
|
-
},
|
|
9
|
+
}, _e = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
12
|
-
}, Ke = /* @__PURE__ */
|
|
12
|
+
}, Ke = /* @__PURE__ */ E({
|
|
13
13
|
__name: "AppBar",
|
|
14
14
|
props: {
|
|
15
15
|
title: { default: "" },
|
|
@@ -21,72 +21,72 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
21
21
|
height: { default: "md" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["toggle-menu"],
|
|
24
|
-
setup(t, { emit:
|
|
25
|
-
const e = t,
|
|
26
|
-
const u = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full",
|
|
24
|
+
setup(t, { emit: g }) {
|
|
25
|
+
const e = t, p = g, r = n(() => {
|
|
26
|
+
const u = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", d = {
|
|
27
27
|
default: "bg-primary-700 text-primary-50",
|
|
28
28
|
dark: "bg-secondary-900 text-white",
|
|
29
29
|
light: "bg-white text-secondary-900 border-b border-secondary-200"
|
|
30
|
-
},
|
|
30
|
+
}, o = {
|
|
31
31
|
sm: "h-12",
|
|
32
32
|
md: "h-14",
|
|
33
33
|
lg: "h-16"
|
|
34
|
-
},
|
|
34
|
+
}, w = e.sticky ? "sticky top-0" : "", i = e.shadow ? "shadow-md" : "";
|
|
35
35
|
return [
|
|
36
36
|
u,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
d[e.variant],
|
|
38
|
+
o[e.height],
|
|
39
|
+
w,
|
|
40
40
|
i
|
|
41
41
|
].join(" ");
|
|
42
42
|
});
|
|
43
|
-
return (u,
|
|
44
|
-
class: f(
|
|
43
|
+
return (u, d) => (s(), a("header", {
|
|
44
|
+
class: f(r.value)
|
|
45
45
|
}, [
|
|
46
|
-
|
|
47
|
-
t.showMenuButton ? (s(),
|
|
46
|
+
l("div", qe, [
|
|
47
|
+
t.showMenuButton ? (s(), a("button", {
|
|
48
48
|
key: 0,
|
|
49
|
-
onClick:
|
|
49
|
+
onClick: d[0] || (d[0] = (o) => p("toggle-menu")),
|
|
50
50
|
class: "p-1.5 sm:p-2 hover:bg-primary-600 rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
|
|
51
51
|
"aria-label": "Toggle menu"
|
|
52
|
-
}, [...
|
|
53
|
-
|
|
52
|
+
}, [...d[1] || (d[1] = [
|
|
53
|
+
l("svg", {
|
|
54
54
|
class: "w-5 h-5 sm:w-6 sm:h-6 text-primary-50",
|
|
55
55
|
fill: "none",
|
|
56
56
|
stroke: "currentColor",
|
|
57
57
|
viewBox: "0 0 24 24",
|
|
58
58
|
xmlns: "http://www.w3.org/2000/svg"
|
|
59
59
|
}, [
|
|
60
|
-
|
|
60
|
+
l("path", {
|
|
61
61
|
"stroke-linecap": "round",
|
|
62
62
|
"stroke-linejoin": "round",
|
|
63
63
|
"stroke-width": "2",
|
|
64
64
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
65
65
|
})
|
|
66
66
|
], -1)
|
|
67
|
-
])])) :
|
|
68
|
-
t.title && t.titlePosition === "left" ? (s(),
|
|
67
|
+
])])) : x("", !0),
|
|
68
|
+
t.title && t.titlePosition === "left" ? (s(), a("div", Re, k(t.title), 1)) : x("", !0),
|
|
69
69
|
V(u.$slots, "left", {}, void 0, !0)
|
|
70
70
|
]),
|
|
71
|
-
|
|
72
|
-
t.title && t.titlePosition === "center" ? (s(),
|
|
71
|
+
l("div", We, [
|
|
72
|
+
t.title && t.titlePosition === "center" ? (s(), a("div", Ne, k(t.title), 1)) : x("", !0),
|
|
73
73
|
V(u.$slots, "center", {}, void 0, !0)
|
|
74
74
|
]),
|
|
75
|
-
|
|
76
|
-
t.title && t.titlePosition === "right" ? (s(),
|
|
75
|
+
l("div", _e, [
|
|
76
|
+
t.title && t.titlePosition === "right" ? (s(), a("div", He, k(t.title), 1)) : x("", !0),
|
|
77
77
|
V(u.$slots, "right", {}, void 0, !0)
|
|
78
78
|
])
|
|
79
79
|
], 2));
|
|
80
80
|
}
|
|
81
|
-
}), K = (t,
|
|
81
|
+
}), K = (t, g) => {
|
|
82
82
|
const e = t.__vccOpts || t;
|
|
83
|
-
for (const [
|
|
84
|
-
e[
|
|
83
|
+
for (const [p, r] of g)
|
|
84
|
+
e[p] = r;
|
|
85
85
|
return e;
|
|
86
|
-
},
|
|
86
|
+
}, xa = /* @__PURE__ */ K(Ke, [["__scopeId", "data-v-c5861315"]]), Ue = ["type", "disabled", "aria-label"], Je = {
|
|
87
87
|
key: 0,
|
|
88
88
|
class: "absolute top-0 right-0 inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-bold leading-none text-white transform translate-x-1/2 -translate-y-1/2 bg-danger-600 rounded-full min-w-[1.25rem]"
|
|
89
|
-
},
|
|
89
|
+
}, wa = /* @__PURE__ */ E({
|
|
90
90
|
__name: "Button",
|
|
91
91
|
props: {
|
|
92
92
|
variant: { default: "primary" },
|
|
@@ -100,9 +100,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
100
100
|
textColorHover: { default: void 0 }
|
|
101
101
|
},
|
|
102
102
|
emits: ["click"],
|
|
103
|
-
setup(t, { emit:
|
|
104
|
-
const e = t,
|
|
105
|
-
const
|
|
103
|
+
setup(t, { emit: g }) {
|
|
104
|
+
const e = t, p = g, r = n(() => e.variant === "icon"), u = n(() => e.badge > 99 ? "99+" : e.badge.toString()), d = n(() => {
|
|
105
|
+
const w = "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", i = {
|
|
106
106
|
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
|
|
107
107
|
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 hover:text-secondary-800 focus-visible:ring-secondary-500",
|
|
108
108
|
outline: "border border-secondary-300 bg-transparent hover:bg-secondary-100 focus-visible:ring-secondary-500",
|
|
@@ -110,37 +110,37 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
110
110
|
danger: "bg-danger-600 text-white hover:bg-danger-700 focus-visible:ring-danger-600",
|
|
111
111
|
icon: "hover:bg-secondary-100 focus-visible:ring-secondary-500 relative",
|
|
112
112
|
text: "bg-transparent border-0 focus-visible:ring-0 focus-visible:ring-offset-0"
|
|
113
|
-
},
|
|
114
|
-
sm:
|
|
115
|
-
md:
|
|
116
|
-
lg:
|
|
117
|
-
},
|
|
113
|
+
}, v = {
|
|
114
|
+
sm: r.value ? "p-1.5" : "h-8 px-3 text-sm",
|
|
115
|
+
md: r.value ? "p-2" : "h-10 px-4 text-base",
|
|
116
|
+
lg: r.value ? "p-3" : "h-12 px-6 text-lg"
|
|
117
|
+
}, b = {
|
|
118
118
|
full: "rounded-full",
|
|
119
119
|
xl: "rounded-2xl",
|
|
120
120
|
lg: "rounded-xl",
|
|
121
121
|
md: "rounded-lg",
|
|
122
122
|
sm: "rounded-md",
|
|
123
123
|
none: "rounded-none"
|
|
124
|
-
},
|
|
125
|
-
var
|
|
126
|
-
return e.textColorHover ? e.textColorHover : (
|
|
124
|
+
}, S = e.textColor ? e.textColor : "", I = n(() => {
|
|
125
|
+
var F, j;
|
|
126
|
+
return e.textColorHover ? e.textColorHover : (F = e.textColor) != null && F.includes("white") || (j = e.textColor) != null && j.includes("50") ? "hover:text-black" : "";
|
|
127
127
|
});
|
|
128
|
-
return `${
|
|
129
|
-
}),
|
|
130
|
-
e.disabled ||
|
|
128
|
+
return `${w} ${i[e.variant]} ${v[e.size]} ${b[e.radius]} ${S} ${I.value}`;
|
|
129
|
+
}), o = (w) => {
|
|
130
|
+
e.disabled || p("click", w);
|
|
131
131
|
};
|
|
132
|
-
return (
|
|
133
|
-
class: f(
|
|
132
|
+
return (w, i) => (s(), a("button", {
|
|
133
|
+
class: f(d.value),
|
|
134
134
|
type: t.type,
|
|
135
135
|
disabled: t.disabled,
|
|
136
|
-
onClick:
|
|
136
|
+
onClick: o,
|
|
137
137
|
"aria-label": t.ariaLabel
|
|
138
138
|
}, [
|
|
139
|
-
V(
|
|
140
|
-
|
|
139
|
+
V(w.$slots, "default"),
|
|
140
|
+
r.value && t.badge && t.badge > 0 ? (s(), a("span", Je, k(u.value), 1)) : x("", !0)
|
|
141
141
|
], 10, Ue));
|
|
142
142
|
}
|
|
143
|
-
}), Ge = /* @__PURE__ */
|
|
143
|
+
}), Ge = /* @__PURE__ */ E({
|
|
144
144
|
__name: "Icon",
|
|
145
145
|
props: {
|
|
146
146
|
name: {},
|
|
@@ -152,16 +152,16 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
152
152
|
ariaLabel: {}
|
|
153
153
|
},
|
|
154
154
|
setup(t) {
|
|
155
|
-
const
|
|
155
|
+
const g = t, e = {
|
|
156
156
|
xs: "16px",
|
|
157
157
|
sm: "18px",
|
|
158
158
|
md: "20px",
|
|
159
159
|
lg: "24px",
|
|
160
160
|
xl: "30px",
|
|
161
161
|
"2xl": "36px"
|
|
162
|
-
},
|
|
163
|
-
const i =
|
|
164
|
-
switch (
|
|
162
|
+
}, p = (o, w) => {
|
|
163
|
+
const i = o.replace(/_/g, "-");
|
|
164
|
+
switch (w) {
|
|
165
165
|
case "filled":
|
|
166
166
|
return `material-symbols:${i}`;
|
|
167
167
|
case "outlined":
|
|
@@ -175,29 +175,29 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
175
175
|
default:
|
|
176
176
|
return `material-symbols:${i}`;
|
|
177
177
|
}
|
|
178
|
-
},
|
|
179
|
-
const
|
|
178
|
+
}, r = n(() => p(g.name, g.variant)), u = n(() => {
|
|
179
|
+
const o = [
|
|
180
180
|
"inline-flex items-center justify-center select-none",
|
|
181
181
|
"transition-transform duration-200"
|
|
182
182
|
];
|
|
183
|
-
return
|
|
184
|
-
}),
|
|
185
|
-
const
|
|
186
|
-
if (e[
|
|
187
|
-
const
|
|
188
|
-
|
|
183
|
+
return g.color && (g.color.startsWith("text-") || g.color.startsWith("fill-")) && o.push(g.color), g.spin && o.push("animate-spin"), o.join(" ");
|
|
184
|
+
}), d = n(() => {
|
|
185
|
+
const o = {};
|
|
186
|
+
if (e[g.size] ? (o.fontSize = e[g.size], o.width = e[g.size], o.height = e[g.size]) : (o.fontSize = g.size, o.width = g.size, o.height = g.size), g.color && !g.color.startsWith("text-") && !g.color.startsWith("fill-") && (o.color = g.color), g.rotate !== 0) {
|
|
187
|
+
const w = `rotate(${g.rotate}deg)`;
|
|
188
|
+
o.transform = w;
|
|
189
189
|
}
|
|
190
|
-
return
|
|
190
|
+
return o;
|
|
191
191
|
});
|
|
192
|
-
return (
|
|
193
|
-
icon:
|
|
192
|
+
return (o, w) => (s(), Z(Pe(Ee), {
|
|
193
|
+
icon: r.value,
|
|
194
194
|
class: f(u.value),
|
|
195
|
-
style:
|
|
195
|
+
style: U(d.value),
|
|
196
196
|
"aria-label": t.ariaLabel,
|
|
197
197
|
role: t.ariaLabel ? "img" : void 0
|
|
198
198
|
}, null, 8, ["icon", "class", "style", "aria-label", "role"]));
|
|
199
199
|
}
|
|
200
|
-
}),
|
|
200
|
+
}), te = /* @__PURE__ */ K(Ge, [["__scopeId", "data-v-5f982e5c"]]), Qe = {
|
|
201
201
|
key: 0,
|
|
202
202
|
class: "relative"
|
|
203
203
|
}, Ze = ["for"], Xe = {
|
|
@@ -206,16 +206,16 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
206
206
|
}, et = ["id", "disabled", "placeholder", "value", "required"], tt = ["disabled"], st = {
|
|
207
207
|
key: 1,
|
|
208
208
|
class: "space-y-2"
|
|
209
|
-
},
|
|
209
|
+
}, at = {
|
|
210
210
|
key: 0,
|
|
211
211
|
class: "text-danger-600"
|
|
212
|
-
},
|
|
212
|
+
}, lt = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, ot = ["disabled", "placeholder", "value", "required"], nt = ["disabled"], rt = ["disabled", "placeholder", "value", "required"], it = ["disabled"], dt = {
|
|
213
213
|
key: 2,
|
|
214
214
|
class: "mt-1 text-sm text-danger-600"
|
|
215
215
|
}, ut = {
|
|
216
216
|
key: 3,
|
|
217
217
|
class: "mt-1 text-sm text-secondary-600"
|
|
218
|
-
}, ct = { class: "flex items-center justify-between mb-4" }, ft = { class: "flex items-center space-x-2" },
|
|
218
|
+
}, ct = { class: "flex items-center justify-between mb-4" }, ft = { class: "flex items-center space-x-2" }, pt = ["value"], vt = ["value"], gt = { class: "grid grid-cols-7 gap-1 mb-2" }, bt = { class: "grid grid-cols-7 gap-1" }, yt = ["disabled", "onClick"], mt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, ht = ["disabled"], xt = /* @__PURE__ */ E({
|
|
219
219
|
__name: "Calendar",
|
|
220
220
|
props: {
|
|
221
221
|
modelValue: {},
|
|
@@ -242,8 +242,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
242
242
|
bordered: { type: Boolean, default: !0 }
|
|
243
243
|
},
|
|
244
244
|
emits: ["update:modelValue", "date-select", "range-select"],
|
|
245
|
-
setup(t, { emit:
|
|
246
|
-
const e = t,
|
|
245
|
+
setup(t, { emit: g }) {
|
|
246
|
+
const e = t, p = g, r = L(!1), u = L(null), d = L((/* @__PURE__ */ new Date()).getMonth()), o = L((/* @__PURE__ */ new Date()).getFullYear()), w = L(`calendar-${Math.random().toString(36).substr(2, 9)}`), i = L(null), v = L(null), b = [
|
|
247
247
|
"Enero",
|
|
248
248
|
"Febrero",
|
|
249
249
|
"Marzo",
|
|
@@ -256,103 +256,103 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
256
256
|
"Octubre",
|
|
257
257
|
"Noviembre",
|
|
258
258
|
"Diciembre"
|
|
259
|
-
],
|
|
260
|
-
const
|
|
261
|
-
for (let z =
|
|
262
|
-
|
|
263
|
-
return
|
|
264
|
-
}), j =
|
|
265
|
-
const
|
|
259
|
+
], S = ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], I = n(() => ({ sm: "xs", md: "sm", lg: "md" })[e.size] || "sm"), F = n(() => {
|
|
260
|
+
const h = (/* @__PURE__ */ new Date()).getFullYear(), M = [];
|
|
261
|
+
for (let z = h - 100; z <= h + 10; z++)
|
|
262
|
+
M.push(z);
|
|
263
|
+
return M;
|
|
264
|
+
}), j = n(() => "ds-label"), T = n(() => e.bordered ? "border border-neutral-300" : ""), y = n(() => {
|
|
265
|
+
const h = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", M = {
|
|
266
266
|
sm: "px-3 py-1.5 pr-10 text-sm",
|
|
267
267
|
md: "px-4 py-2 pr-10 text-base",
|
|
268
268
|
lg: "px-5 py-3 pr-12 text-lg"
|
|
269
269
|
}, z = {
|
|
270
270
|
primary: "focus:ring-primary-500",
|
|
271
271
|
secondary: "focus:ring-secondary-500"
|
|
272
|
-
},
|
|
272
|
+
}, P = {
|
|
273
273
|
default: "bg-white",
|
|
274
274
|
filled: "bg-secondary-100",
|
|
275
275
|
outlined: "bg-transparent"
|
|
276
|
-
},
|
|
277
|
-
return `${
|
|
278
|
-
}),
|
|
276
|
+
}, J = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
277
|
+
return `${h} ${M[e.size]} ${P[e.variant]} ${z[e.color]} ${J}`;
|
|
278
|
+
}), m = n(() => `transition-colors text-[#565656] hover:text-[#565656] opacity-80 hover:opacity-100 ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), $ = n(() => "min-w-80 max-w-sm"), O = n(() => `p-2 rounded-md transition-colors ${{
|
|
279
279
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
280
280
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
281
|
-
}[e.color]}`),
|
|
281
|
+
}[e.color]}`), _ = n(() => `px-2 py-1 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-1 ${{
|
|
282
282
|
primary: "focus:border-primary-500 focus:ring-primary-500",
|
|
283
283
|
secondary: "focus:border-secondary-500 focus:ring-secondary-500"
|
|
284
|
-
}[e.color]}`),
|
|
284
|
+
}[e.color]}`), se = n(() => `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
285
|
primary: "bg-primary-600 hover:bg-primary-700 focus:ring-primary-500",
|
|
286
286
|
secondary: "bg-secondary-600 hover:bg-secondary-700 focus:ring-secondary-500"
|
|
287
|
-
}[e.color]}`),
|
|
287
|
+
}[e.color]}`), D = n(() => `px-3 py-1.5 text-sm border border-secondary-300 rounded-md transition-colors focus:outline-none ${{
|
|
288
288
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
289
289
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
290
|
-
}[e.color]}`),
|
|
291
|
-
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
for (let
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
day:
|
|
298
|
-
date:
|
|
290
|
+
}[e.color]}`), c = n(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? q(e.modelValue) : ""), C = n(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? q(e.modelValue.start) : ""), B = n(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? q(e.modelValue.end) : ""), Q = n(() => e.mode === "single" ? i.value !== null : i.value !== null && v.value !== null && v.value >= i.value);
|
|
291
|
+
n(() => e.mode === "range" && i.value && v.value ? v.value < i.value : !1);
|
|
292
|
+
const A = n(() => {
|
|
293
|
+
const h = new Date(o.value, d.value, 1), M = new Date(o.value, d.value + 1, 0), z = h.getDay(), P = M.getDate(), J = [], X = new Date(o.value, d.value - 1, 0);
|
|
294
|
+
for (let W = z - 1; W >= 0; W--) {
|
|
295
|
+
const ee = new Date(o.value, d.value - 1, X.getDate() - W);
|
|
296
|
+
J.push({
|
|
297
|
+
day: ee.getDate(),
|
|
298
|
+
date: ee,
|
|
299
299
|
isCurrentMonth: !1,
|
|
300
300
|
disabled: !1,
|
|
301
|
-
key: `prev-${
|
|
301
|
+
key: `prev-${ee.getDate()}`
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
|
-
for (let
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
day:
|
|
308
|
-
date:
|
|
304
|
+
for (let W = 1; W <= P; W++) {
|
|
305
|
+
const ee = new Date(o.value, d.value, W);
|
|
306
|
+
J.push({
|
|
307
|
+
day: W,
|
|
308
|
+
date: ee,
|
|
309
309
|
isCurrentMonth: !0,
|
|
310
310
|
disabled: !1,
|
|
311
|
-
key: `current-${
|
|
311
|
+
key: `current-${W}`
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
-
const
|
|
315
|
-
for (let
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
day:
|
|
319
|
-
date:
|
|
314
|
+
const Ae = 42 - J.length;
|
|
315
|
+
for (let W = 1; W <= Ae; W++) {
|
|
316
|
+
const ee = new Date(o.value, d.value + 1, W);
|
|
317
|
+
J.push({
|
|
318
|
+
day: W,
|
|
319
|
+
date: ee,
|
|
320
320
|
isCurrentMonth: !1,
|
|
321
321
|
disabled: !1,
|
|
322
|
-
key: `next-${
|
|
322
|
+
key: `next-${W}`
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
|
-
return
|
|
326
|
-
}),
|
|
327
|
-
const
|
|
325
|
+
return J;
|
|
326
|
+
}), q = (h) => {
|
|
327
|
+
const M = h.getDate().toString().padStart(2, "0"), z = (h.getMonth() + 1).toString().padStart(2, "0"), P = h.getFullYear();
|
|
328
328
|
switch (e.dateFormat) {
|
|
329
329
|
case "MM/DD/YYYY":
|
|
330
|
-
return `${z}/${
|
|
330
|
+
return `${z}/${M}/${P}`;
|
|
331
331
|
case "YYYY-MM-DD":
|
|
332
|
-
return `${
|
|
332
|
+
return `${P}-${z}-${M}`;
|
|
333
333
|
case "DD/MM/YYYY":
|
|
334
334
|
default:
|
|
335
|
-
return `${
|
|
335
|
+
return `${M}/${z}/${P}`;
|
|
336
336
|
}
|
|
337
|
-
},
|
|
337
|
+
}, be = (h) => {
|
|
338
338
|
var z;
|
|
339
|
-
const
|
|
339
|
+
const M = new Date(h.getFullYear(), h.getMonth(), h.getDate());
|
|
340
340
|
if (e.minDate) {
|
|
341
|
-
const
|
|
342
|
-
if (
|
|
341
|
+
const P = new Date(e.minDate.getFullYear(), e.minDate.getMonth(), e.minDate.getDate());
|
|
342
|
+
if (M < P) return !0;
|
|
343
343
|
}
|
|
344
344
|
if (e.maxDate) {
|
|
345
|
-
const
|
|
346
|
-
if (
|
|
345
|
+
const P = new Date(e.maxDate.getFullYear(), e.maxDate.getMonth(), e.maxDate.getDate());
|
|
346
|
+
if (M > P) return !0;
|
|
347
347
|
}
|
|
348
348
|
return !!((z = e.disabledDates) != null && z.some(
|
|
349
|
-
(
|
|
349
|
+
(P) => P.toDateString() === h.toDateString()
|
|
350
350
|
));
|
|
351
|
-
},
|
|
352
|
-
const
|
|
353
|
-
if (
|
|
354
|
-
return `${
|
|
355
|
-
const z =
|
|
351
|
+
}, Be = (h) => {
|
|
352
|
+
const M = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
|
|
353
|
+
if (h.disabled || be(h.date))
|
|
354
|
+
return `${M} text-secondary-400 cursor-not-allowed`;
|
|
355
|
+
const z = De(h.date), P = ze(h.date), J = Ve(h.date), X = {
|
|
356
356
|
primary: {
|
|
357
357
|
selected: "bg-primary-600 text-white",
|
|
358
358
|
inRange: "bg-primary-100 text-primary-900",
|
|
@@ -368,255 +368,255 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
368
368
|
otherMonth: "text-secondary-400 hover:bg-secondary-50 hover:text-secondary-600"
|
|
369
369
|
}
|
|
370
370
|
};
|
|
371
|
-
return z ? `${
|
|
372
|
-
},
|
|
373
|
-
if (e.mode !== "range" || !i.value || !
|
|
371
|
+
return z ? `${M} ${X[e.color].selected}` : P ? `${M} ${X[e.color].inRange}` : J ? `${M} ${X[e.color].today}` : h.isCurrentMonth ? `${M} ${X[e.color].default}` : `${M} ${X[e.color].otherMonth}`;
|
|
372
|
+
}, De = (h) => e.mode === "single" ? i.value ? le(h, i.value) : !1 : !!(i.value && le(h, i.value)) || !!(v.value && le(h, v.value)), ze = (h) => {
|
|
373
|
+
if (e.mode !== "range" || !i.value || !v.value)
|
|
374
374
|
return !1;
|
|
375
|
-
const
|
|
376
|
-
return
|
|
377
|
-
}, Ve = (
|
|
378
|
-
e.disabled ||
|
|
375
|
+
const M = i.value, z = v.value;
|
|
376
|
+
return h > M && h < z;
|
|
377
|
+
}, Ve = (h) => le(h, /* @__PURE__ */ new Date()), le = (h, M) => h.toDateString() === M.toDateString(), Ie = () => {
|
|
378
|
+
e.disabled || r.value || oe();
|
|
379
|
+
}, Te = () => {
|
|
380
|
+
e.disabled || r.value || oe();
|
|
379
381
|
}, Se = () => {
|
|
380
|
-
e.disabled ||
|
|
381
|
-
},
|
|
382
|
-
e.disabled ||
|
|
383
|
-
},
|
|
384
|
-
e.disabled || (
|
|
385
|
-
},
|
|
386
|
-
e.disabled || (
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
}, he = () => {
|
|
392
|
-
e.disabled || (n.value = !n.value, n.value && ie());
|
|
382
|
+
e.disabled || xe();
|
|
383
|
+
}, ye = (h) => {
|
|
384
|
+
e.disabled || (re(h), r.value || oe());
|
|
385
|
+
}, me = (h) => {
|
|
386
|
+
e.disabled || (re(h), r.value || oe());
|
|
387
|
+
}, he = (h) => {
|
|
388
|
+
e.disabled || (re(h), xe());
|
|
389
|
+
}, re = (h) => {
|
|
390
|
+
u.value = h;
|
|
391
|
+
}, xe = () => {
|
|
392
|
+
e.disabled || (r.value = !r.value, r.value && de());
|
|
393
393
|
}, oe = () => {
|
|
394
|
-
e.disabled || (
|
|
395
|
-
}, re = () => {
|
|
396
|
-
n.value = !1, u.value = null;
|
|
394
|
+
e.disabled || (r.value = !0, de());
|
|
397
395
|
}, ie = () => {
|
|
398
|
-
|
|
399
|
-
},
|
|
400
|
-
e.mode === "single" ? (i.value =
|
|
396
|
+
r.value = !1, u.value = null;
|
|
397
|
+
}, de = () => {
|
|
398
|
+
e.mode === "single" ? (i.value = e.modelValue instanceof Date ? e.modelValue : null, v.value = null) : e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue ? (i.value = e.modelValue.start, v.value = e.modelValue.end) : (i.value = null, v.value = null);
|
|
399
|
+
}, je = (h) => {
|
|
400
|
+
e.mode === "single" ? (i.value = h, v.value = null) : u.value === "start" || !i.value ? (i.value = h, v.value = null, u.value = "end") : (u.value === "end" || !v.value) && (h < i.value ? (v.value = i.value, i.value = h) : v.value = h, u.value = null);
|
|
401
401
|
}, Le = () => {
|
|
402
402
|
if (e.mode === "single")
|
|
403
|
-
|
|
403
|
+
p("update:modelValue", i.value), i.value && p("date-select", i.value);
|
|
404
404
|
else {
|
|
405
|
-
const
|
|
406
|
-
|
|
405
|
+
const h = { start: i.value, end: v.value };
|
|
406
|
+
p("update:modelValue", h), p("range-select", h);
|
|
407
407
|
}
|
|
408
|
-
|
|
408
|
+
ie();
|
|
409
409
|
}, Oe = () => {
|
|
410
|
-
|
|
410
|
+
d.value === 0 ? (d.value = 11, o.value--) : d.value--;
|
|
411
411
|
}, Fe = () => {
|
|
412
|
-
|
|
413
|
-
},
|
|
414
|
-
},
|
|
415
|
-
|
|
412
|
+
d.value === 11 ? (d.value = 0, o.value++) : d.value++;
|
|
413
|
+
}, we = () => {
|
|
414
|
+
}, ue = L(), ke = (h) => {
|
|
415
|
+
ue.value && !ue.value.contains(h.target) && ie();
|
|
416
416
|
};
|
|
417
|
-
return
|
|
418
|
-
document.addEventListener("click",
|
|
419
|
-
}),
|
|
420
|
-
document.removeEventListener("click",
|
|
421
|
-
}),
|
|
422
|
-
|
|
423
|
-
}, { deep: !0 }), (
|
|
417
|
+
return Ce(() => {
|
|
418
|
+
document.addEventListener("click", ke);
|
|
419
|
+
}), Me(() => {
|
|
420
|
+
document.removeEventListener("click", ke);
|
|
421
|
+
}), pe(() => e.modelValue, (h) => {
|
|
422
|
+
r.value || de();
|
|
423
|
+
}, { deep: !0 }), (h, M) => (s(), a("div", {
|
|
424
424
|
ref_key: "calendarWrapperRef",
|
|
425
|
-
ref:
|
|
425
|
+
ref: ue,
|
|
426
426
|
class: "calendar-wrapper"
|
|
427
427
|
}, [
|
|
428
|
-
t.mode === "single" ? (s(),
|
|
429
|
-
t.label && t.showLabel ? (s(),
|
|
428
|
+
t.mode === "single" ? (s(), a("div", Qe, [
|
|
429
|
+
t.label && t.showLabel ? (s(), a("label", {
|
|
430
430
|
key: 0,
|
|
431
|
-
for:
|
|
431
|
+
for: w.value,
|
|
432
432
|
class: f(j.value)
|
|
433
433
|
}, [
|
|
434
|
-
|
|
435
|
-
t.required ? (s(),
|
|
436
|
-
], 10, Ze)) :
|
|
437
|
-
|
|
438
|
-
class: f(["relative rounded-md",
|
|
434
|
+
R(k(t.label) + " ", 1),
|
|
435
|
+
t.required ? (s(), a("span", Xe, "*")) : x("", !0)
|
|
436
|
+
], 10, Ze)) : x("", !0),
|
|
437
|
+
l("div", {
|
|
438
|
+
class: f(["relative rounded-md", T.value])
|
|
439
439
|
}, [
|
|
440
|
-
|
|
441
|
-
id:
|
|
442
|
-
class: f(
|
|
440
|
+
l("input", {
|
|
441
|
+
id: w.value,
|
|
442
|
+
class: f(y.value),
|
|
443
443
|
type: "text",
|
|
444
444
|
disabled: t.disabled,
|
|
445
445
|
placeholder: t.placeholder || "Seleccionar fecha",
|
|
446
|
-
value:
|
|
446
|
+
value: c.value,
|
|
447
447
|
required: t.required,
|
|
448
448
|
readonly: !0,
|
|
449
|
-
onClick:
|
|
450
|
-
onFocus:
|
|
449
|
+
onClick: Ie,
|
|
450
|
+
onFocus: Te
|
|
451
451
|
}, null, 42, et),
|
|
452
|
-
|
|
452
|
+
l("button", {
|
|
453
453
|
type: "button",
|
|
454
|
-
class: f(["absolute right-3 top-1/2 -translate-y-1/2",
|
|
455
|
-
onClick: H(
|
|
454
|
+
class: f(["absolute right-3 top-1/2 -translate-y-1/2", m.value]),
|
|
455
|
+
onClick: H(Se, ["stop"]),
|
|
456
456
|
disabled: t.disabled
|
|
457
457
|
}, [
|
|
458
|
-
|
|
458
|
+
G(te, {
|
|
459
459
|
name: t.iconName,
|
|
460
|
-
size:
|
|
460
|
+
size: I.value
|
|
461
461
|
}, null, 8, ["name", "size"])
|
|
462
462
|
], 10, tt)
|
|
463
463
|
], 2)
|
|
464
|
-
])) : (s(),
|
|
465
|
-
t.label && t.showLabel ? (s(),
|
|
464
|
+
])) : (s(), a("div", st, [
|
|
465
|
+
t.label && t.showLabel ? (s(), a("label", {
|
|
466
466
|
key: 0,
|
|
467
467
|
class: f(j.value)
|
|
468
468
|
}, [
|
|
469
|
-
|
|
470
|
-
t.required ? (s(),
|
|
471
|
-
], 2)) :
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
class: f(["relative rounded-md",
|
|
469
|
+
R(k(t.label) + " ", 1),
|
|
470
|
+
t.required ? (s(), a("span", at, "*")) : x("", !0)
|
|
471
|
+
], 2)) : x("", !0),
|
|
472
|
+
l("div", lt, [
|
|
473
|
+
l("div", {
|
|
474
|
+
class: f(["relative rounded-md", T.value])
|
|
475
475
|
}, [
|
|
476
|
-
|
|
477
|
-
class: f(
|
|
476
|
+
l("input", {
|
|
477
|
+
class: f(y.value),
|
|
478
478
|
type: "text",
|
|
479
479
|
disabled: t.disabled,
|
|
480
480
|
placeholder: t.startPlaceholder || "Fecha desde",
|
|
481
|
-
value:
|
|
481
|
+
value: C.value,
|
|
482
482
|
required: t.required,
|
|
483
483
|
readonly: !0,
|
|
484
|
-
onClick:
|
|
485
|
-
onFocus:
|
|
486
|
-
}, null, 42,
|
|
487
|
-
|
|
484
|
+
onClick: M[0] || (M[0] = () => ye("start")),
|
|
485
|
+
onFocus: M[1] || (M[1] = () => me("start"))
|
|
486
|
+
}, null, 42, ot),
|
|
487
|
+
l("button", {
|
|
488
488
|
type: "button",
|
|
489
|
-
class: f(["absolute right-3 top-1/2 -translate-y-1/2",
|
|
490
|
-
onClick:
|
|
489
|
+
class: f(["absolute right-3 top-1/2 -translate-y-1/2", m.value]),
|
|
490
|
+
onClick: M[2] || (M[2] = H(() => he("start"), ["stop"])),
|
|
491
491
|
disabled: t.disabled
|
|
492
492
|
}, [
|
|
493
|
-
|
|
493
|
+
G(te, {
|
|
494
494
|
name: t.startIconName,
|
|
495
|
-
size:
|
|
495
|
+
size: I.value
|
|
496
496
|
}, null, 8, ["name", "size"])
|
|
497
497
|
], 10, nt)
|
|
498
498
|
], 2),
|
|
499
|
-
|
|
500
|
-
class: f(["relative rounded-md",
|
|
499
|
+
l("div", {
|
|
500
|
+
class: f(["relative rounded-md", T.value])
|
|
501
501
|
}, [
|
|
502
|
-
|
|
503
|
-
class: f(
|
|
502
|
+
l("input", {
|
|
503
|
+
class: f(y.value),
|
|
504
504
|
type: "text",
|
|
505
505
|
disabled: t.disabled,
|
|
506
506
|
placeholder: t.endPlaceholder || "Fecha hasta",
|
|
507
|
-
value:
|
|
507
|
+
value: B.value,
|
|
508
508
|
required: t.required,
|
|
509
509
|
readonly: !0,
|
|
510
|
-
onClick:
|
|
511
|
-
onFocus:
|
|
510
|
+
onClick: M[3] || (M[3] = () => ye("end")),
|
|
511
|
+
onFocus: M[4] || (M[4] = () => me("end"))
|
|
512
512
|
}, null, 42, rt),
|
|
513
|
-
|
|
513
|
+
l("button", {
|
|
514
514
|
type: "button",
|
|
515
|
-
class: f(["absolute right-3 top-1/2 -translate-y-1/2",
|
|
516
|
-
onClick:
|
|
515
|
+
class: f(["absolute right-3 top-1/2 -translate-y-1/2", m.value]),
|
|
516
|
+
onClick: M[5] || (M[5] = H(() => he("end"), ["stop"])),
|
|
517
517
|
disabled: t.disabled
|
|
518
518
|
}, [
|
|
519
|
-
|
|
519
|
+
G(te, {
|
|
520
520
|
name: t.endIconName,
|
|
521
|
-
size:
|
|
521
|
+
size: I.value
|
|
522
522
|
}, null, 8, ["name", "size"])
|
|
523
523
|
], 10, it)
|
|
524
524
|
], 2)
|
|
525
525
|
])
|
|
526
526
|
])),
|
|
527
|
-
t.error ? (s(),
|
|
528
|
-
|
|
527
|
+
t.error ? (s(), a("p", dt, k(t.error), 1)) : t.helperText ? (s(), a("p", ut, k(t.helperText), 1)) : x("", !0),
|
|
528
|
+
r.value ? (s(), a("div", {
|
|
529
529
|
key: 4,
|
|
530
|
-
class: f(["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:
|
|
530
|
+
class: f(["absolute top-full mt-1 left-0 bg-white rounded-lg shadow-lg border border-secondary-200 z-50 overflow-hidden p-4", $.value]),
|
|
531
|
+
onClick: M[8] || (M[8] = H(() => {
|
|
532
532
|
}, ["stop"]))
|
|
533
533
|
}, [
|
|
534
|
-
|
|
535
|
-
|
|
534
|
+
l("div", ct, [
|
|
535
|
+
l("button", {
|
|
536
536
|
type: "button",
|
|
537
537
|
onClick: Oe,
|
|
538
|
-
class: f(
|
|
538
|
+
class: f(O.value)
|
|
539
539
|
}, [
|
|
540
|
-
|
|
540
|
+
G(te, {
|
|
541
541
|
name: "chevron-left",
|
|
542
542
|
size: "sm"
|
|
543
543
|
})
|
|
544
544
|
], 2),
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
"onUpdate:modelValue":
|
|
548
|
-
class: f(
|
|
549
|
-
onChange:
|
|
545
|
+
l("div", ft, [
|
|
546
|
+
ce(l("select", {
|
|
547
|
+
"onUpdate:modelValue": M[6] || (M[6] = (z) => d.value = z),
|
|
548
|
+
class: f(_.value),
|
|
549
|
+
onChange: we
|
|
550
550
|
}, [
|
|
551
|
-
(s(),
|
|
552
|
-
key:
|
|
553
|
-
value:
|
|
554
|
-
},
|
|
551
|
+
(s(), a(Y, null, N(b, (z, P) => l("option", {
|
|
552
|
+
key: P,
|
|
553
|
+
value: P
|
|
554
|
+
}, k(z), 9, pt)), 64))
|
|
555
555
|
], 34), [
|
|
556
|
-
[
|
|
556
|
+
[$e, d.value]
|
|
557
557
|
]),
|
|
558
|
-
|
|
559
|
-
"onUpdate:modelValue":
|
|
560
|
-
class: f(
|
|
561
|
-
onChange:
|
|
558
|
+
ce(l("select", {
|
|
559
|
+
"onUpdate:modelValue": M[7] || (M[7] = (z) => o.value = z),
|
|
560
|
+
class: f(_.value),
|
|
561
|
+
onChange: we
|
|
562
562
|
}, [
|
|
563
|
-
(s(!0),
|
|
563
|
+
(s(!0), a(Y, null, N(F.value, (z) => (s(), a("option", {
|
|
564
564
|
key: z,
|
|
565
565
|
value: z
|
|
566
|
-
},
|
|
566
|
+
}, k(z), 9, vt))), 128))
|
|
567
567
|
], 34), [
|
|
568
|
-
[
|
|
568
|
+
[$e, o.value]
|
|
569
569
|
])
|
|
570
570
|
]),
|
|
571
|
-
|
|
571
|
+
l("button", {
|
|
572
572
|
type: "button",
|
|
573
573
|
onClick: Fe,
|
|
574
|
-
class: f(
|
|
574
|
+
class: f(O.value)
|
|
575
575
|
}, [
|
|
576
|
-
|
|
576
|
+
G(te, {
|
|
577
577
|
name: "chevron-right",
|
|
578
578
|
size: "sm"
|
|
579
579
|
})
|
|
580
580
|
], 2)
|
|
581
581
|
]),
|
|
582
|
-
|
|
583
|
-
(s(),
|
|
582
|
+
l("div", gt, [
|
|
583
|
+
(s(), a(Y, null, N(S, (z) => l("div", {
|
|
584
584
|
key: z,
|
|
585
585
|
class: "text-center text-sm font-medium text-secondary-600 py-2"
|
|
586
|
-
},
|
|
586
|
+
}, k(z), 1)), 64))
|
|
587
587
|
]),
|
|
588
|
-
|
|
589
|
-
(s(!0),
|
|
588
|
+
l("div", bt, [
|
|
589
|
+
(s(!0), a(Y, null, N(A.value, (z) => (s(), a("button", {
|
|
590
590
|
key: z.key,
|
|
591
591
|
type: "button",
|
|
592
|
-
class: f(
|
|
593
|
-
disabled: z.disabled ||
|
|
594
|
-
onClick: (
|
|
595
|
-
},
|
|
592
|
+
class: f(Be(z)),
|
|
593
|
+
disabled: z.disabled || be(z.date),
|
|
594
|
+
onClick: (P) => je(z.date)
|
|
595
|
+
}, k(z.day), 11, yt))), 128))
|
|
596
596
|
]),
|
|
597
|
-
|
|
598
|
-
|
|
597
|
+
l("div", mt, [
|
|
598
|
+
l("button", {
|
|
599
599
|
type: "button",
|
|
600
|
-
class: f(
|
|
601
|
-
onClick:
|
|
600
|
+
class: f(D.value),
|
|
601
|
+
onClick: ie
|
|
602
602
|
}, " Cancelar ", 2),
|
|
603
|
-
|
|
603
|
+
l("button", {
|
|
604
604
|
type: "button",
|
|
605
|
-
class: f(
|
|
605
|
+
class: f(se.value),
|
|
606
606
|
onClick: Le,
|
|
607
|
-
disabled: !
|
|
607
|
+
disabled: !Q.value
|
|
608
608
|
}, " Confirmar ", 10, ht)
|
|
609
609
|
])
|
|
610
|
-
], 2)) :
|
|
610
|
+
], 2)) : x("", !0)
|
|
611
611
|
], 512));
|
|
612
612
|
}
|
|
613
|
-
}),
|
|
613
|
+
}), ka = /* @__PURE__ */ K(xt, [["__scopeId", "data-v-aac22628"]]), wt = {
|
|
614
614
|
key: 0,
|
|
615
615
|
class: "border-b border-gray-100 px-6 py-4"
|
|
616
616
|
}, kt = { class: "px-6 py-4" }, $t = {
|
|
617
617
|
key: 1,
|
|
618
618
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
619
|
-
},
|
|
619
|
+
}, $a = /* @__PURE__ */ E({
|
|
620
620
|
__name: "Card",
|
|
621
621
|
props: {
|
|
622
622
|
shadow: { default: "md" },
|
|
@@ -624,43 +624,43 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
624
624
|
bordered: { type: Boolean, default: !1 }
|
|
625
625
|
},
|
|
626
626
|
setup(t) {
|
|
627
|
-
const
|
|
627
|
+
const g = t, e = {
|
|
628
628
|
none: "",
|
|
629
629
|
sm: "shadow-sm",
|
|
630
630
|
md: "shadow",
|
|
631
631
|
lg: "shadow-lg",
|
|
632
632
|
xl: "shadow-xl"
|
|
633
|
-
},
|
|
633
|
+
}, p = {
|
|
634
634
|
none: "rounded-none",
|
|
635
635
|
sm: "rounded-sm",
|
|
636
636
|
md: "rounded-md",
|
|
637
637
|
lg: "rounded-lg",
|
|
638
638
|
xl: "rounded-xl",
|
|
639
639
|
full: "rounded-full"
|
|
640
|
-
},
|
|
640
|
+
}, r = n(() => [
|
|
641
641
|
"w-full bg-white",
|
|
642
|
-
e[
|
|
643
|
-
|
|
644
|
-
|
|
642
|
+
e[g.shadow],
|
|
643
|
+
p[g.rounded],
|
|
644
|
+
g.bordered ? "border border-gray-200" : ""
|
|
645
645
|
]);
|
|
646
|
-
return (u,
|
|
647
|
-
class: f(
|
|
646
|
+
return (u, d) => (s(), a("div", {
|
|
647
|
+
class: f(r.value)
|
|
648
648
|
}, [
|
|
649
|
-
u.$slots.header ? (s(),
|
|
649
|
+
u.$slots.header ? (s(), a("div", wt, [
|
|
650
650
|
V(u.$slots, "header")
|
|
651
|
-
])) :
|
|
652
|
-
|
|
651
|
+
])) : x("", !0),
|
|
652
|
+
l("div", kt, [
|
|
653
653
|
V(u.$slots, "default")
|
|
654
654
|
]),
|
|
655
|
-
u.$slots.footer ? (s(),
|
|
655
|
+
u.$slots.footer ? (s(), a("div", $t, [
|
|
656
656
|
V(u.$slots, "footer")
|
|
657
|
-
])) :
|
|
657
|
+
])) : x("", !0)
|
|
658
658
|
], 2));
|
|
659
659
|
}
|
|
660
|
-
}), Ct = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, Mt = { class: "text-xl font-semibold text-gray-900" },
|
|
660
|
+
}), Ct = { class: "flex items-center justify-between border-b border-gray-100/60 px-8 py-6" }, Mt = { class: "text-xl font-semibold text-gray-900" }, Bt = { class: "px-8 py-6" }, Dt = {
|
|
661
661
|
key: 0,
|
|
662
662
|
class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
|
|
663
|
-
}, zt = /* @__PURE__ */
|
|
663
|
+
}, zt = /* @__PURE__ */ E({
|
|
664
664
|
__name: "Dialog",
|
|
665
665
|
props: {
|
|
666
666
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -668,47 +668,47 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
668
668
|
closeOnBackdrop: { type: Boolean, default: !0 }
|
|
669
669
|
},
|
|
670
670
|
emits: ["update:modelValue", "close"],
|
|
671
|
-
setup(t, { emit:
|
|
672
|
-
const e = t,
|
|
671
|
+
setup(t, { emit: g }) {
|
|
672
|
+
const e = t, p = g, r = n({
|
|
673
673
|
get: () => e.modelValue,
|
|
674
|
-
set: (
|
|
674
|
+
set: (o) => p("update:modelValue", o)
|
|
675
675
|
}), u = () => {
|
|
676
|
-
|
|
677
|
-
},
|
|
676
|
+
r.value = !1, p("close");
|
|
677
|
+
}, d = () => {
|
|
678
678
|
e.closeOnBackdrop && u();
|
|
679
679
|
};
|
|
680
|
-
return (
|
|
681
|
-
|
|
680
|
+
return (o, w) => (s(), Z(ve, { to: "body" }, [
|
|
681
|
+
G(ne, { name: "dialog" }, {
|
|
682
682
|
default: ae(() => [
|
|
683
|
-
|
|
683
|
+
r.value ? (s(), a("div", {
|
|
684
684
|
key: 0,
|
|
685
685
|
class: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4",
|
|
686
|
-
onClick:
|
|
686
|
+
onClick: d
|
|
687
687
|
}, [
|
|
688
|
-
|
|
688
|
+
l("div", {
|
|
689
689
|
class: "relative w-full rounded-lg bg-white shadow-xl sm:max-w-lg md:max-w-2xl",
|
|
690
|
-
onClick:
|
|
690
|
+
onClick: w[0] || (w[0] = H(() => {
|
|
691
691
|
}, ["stop"]))
|
|
692
692
|
}, [
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
V(
|
|
696
|
-
|
|
693
|
+
l("div", Ct, [
|
|
694
|
+
l("h2", Mt, [
|
|
695
|
+
V(o.$slots, "title", {}, () => [
|
|
696
|
+
R(k(t.title), 1)
|
|
697
697
|
], !0)
|
|
698
698
|
]),
|
|
699
|
-
|
|
699
|
+
l("button", {
|
|
700
700
|
type: "button",
|
|
701
701
|
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
702
|
"aria-label": "Cerrar diálogo",
|
|
703
703
|
onClick: u
|
|
704
|
-
}, [...
|
|
705
|
-
|
|
704
|
+
}, [...w[1] || (w[1] = [
|
|
705
|
+
l("svg", {
|
|
706
706
|
class: "h-6 w-6",
|
|
707
707
|
fill: "none",
|
|
708
708
|
stroke: "currentColor",
|
|
709
709
|
viewBox: "0 0 24 24"
|
|
710
710
|
}, [
|
|
711
|
-
|
|
711
|
+
l("path", {
|
|
712
712
|
"stroke-linecap": "round",
|
|
713
713
|
"stroke-linejoin": "round",
|
|
714
714
|
"stroke-width": "2",
|
|
@@ -717,32 +717,32 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
717
717
|
], -1)
|
|
718
718
|
])])
|
|
719
719
|
]),
|
|
720
|
-
|
|
721
|
-
V(
|
|
720
|
+
l("div", Bt, [
|
|
721
|
+
V(o.$slots, "default", {}, void 0, !0)
|
|
722
722
|
]),
|
|
723
|
-
|
|
724
|
-
V(
|
|
725
|
-
])) :
|
|
723
|
+
o.$slots.footer ? (s(), a("div", Dt, [
|
|
724
|
+
V(o.$slots, "footer", {}, void 0, !0)
|
|
725
|
+
])) : x("", !0)
|
|
726
726
|
])
|
|
727
|
-
])) :
|
|
727
|
+
])) : x("", !0)
|
|
728
728
|
]),
|
|
729
729
|
_: 3
|
|
730
730
|
})
|
|
731
731
|
]));
|
|
732
732
|
}
|
|
733
|
-
}),
|
|
733
|
+
}), Ca = /* @__PURE__ */ K(zt, [["__scopeId", "data-v-37e19754"]]), Vt = ["accept", "multiple", "disabled"], It = { class: "flex flex-col items-center justify-center gap-4 text-center" }, Tt = ["src", "alt"], St = {
|
|
734
734
|
key: 1,
|
|
735
735
|
class: "w-full h-full text-gray-400",
|
|
736
736
|
fill: "none",
|
|
737
737
|
stroke: "currentColor",
|
|
738
738
|
viewBox: "0 0 24 24"
|
|
739
|
-
}, jt = { class: "text-center" }, Lt = { class: "text-base font-medium text-gray-700" }, Ot = { class: "text-primary-700" }, Ft = { class: "flex items-center gap-3 flex-1 min-w-0" },
|
|
739
|
+
}, jt = { class: "text-center" }, Lt = { class: "text-base font-medium text-gray-700" }, Ot = { class: "text-primary-700" }, Ft = { class: "flex items-center gap-3 flex-1 min-w-0" }, At = { class: "flex-1 min-w-0" }, Pt = { class: "text-sm font-medium text-gray-900 truncate" }, Yt = { class: "text-xs text-gray-500" }, Et = {
|
|
740
740
|
key: 1,
|
|
741
741
|
class: "text-xs text-gray-500 mt-2"
|
|
742
|
-
},
|
|
742
|
+
}, qt = {
|
|
743
743
|
key: 2,
|
|
744
744
|
class: "text-sm text-danger-500 mt-2"
|
|
745
|
-
},
|
|
745
|
+
}, Ma = /* @__PURE__ */ E({
|
|
746
746
|
__name: "FileUpload",
|
|
747
747
|
props: {
|
|
748
748
|
modelValue: { default: null },
|
|
@@ -758,74 +758,74 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
758
758
|
maxSize: { default: void 0 }
|
|
759
759
|
},
|
|
760
760
|
emits: ["update:modelValue", "change", "error"],
|
|
761
|
-
setup(t, { emit:
|
|
762
|
-
const e = t,
|
|
761
|
+
setup(t, { emit: g }) {
|
|
762
|
+
const e = t, p = g, r = L(null), u = L(!1), d = L(e.modelValue), o = L(""), w = n(() => ({
|
|
763
763
|
sm: "w-20 h-20",
|
|
764
764
|
md: "w-32 h-32",
|
|
765
765
|
lg: "w-48 h-48",
|
|
766
766
|
xl: "w-64 h-64"
|
|
767
767
|
})[e.illustrationSize]), i = () => {
|
|
768
|
-
var
|
|
769
|
-
(
|
|
770
|
-
},
|
|
768
|
+
var m;
|
|
769
|
+
(m = r.value) == null || m.click();
|
|
770
|
+
}, v = () => {
|
|
771
771
|
e.disabled || i();
|
|
772
|
-
},
|
|
772
|
+
}, b = (m) => {
|
|
773
773
|
e.disabled || (u.value = !0);
|
|
774
|
-
},
|
|
774
|
+
}, S = () => {
|
|
775
775
|
u.value = !1;
|
|
776
|
-
},
|
|
777
|
-
if (
|
|
778
|
-
const
|
|
779
|
-
return
|
|
776
|
+
}, I = (m) => {
|
|
777
|
+
if (o.value = "", e.maxSize && m.size > e.maxSize) {
|
|
778
|
+
const $ = (e.maxSize / 1048576).toFixed(2);
|
|
779
|
+
return o.value = `El archivo excede el tamaño máximo de ${$}MB`, p("error", o.value), !1;
|
|
780
780
|
}
|
|
781
781
|
return !0;
|
|
782
|
-
},
|
|
783
|
-
var
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
}, j = (
|
|
787
|
-
var
|
|
782
|
+
}, F = (m) => {
|
|
783
|
+
var _;
|
|
784
|
+
const O = (_ = m.target.files) == null ? void 0 : _[0];
|
|
785
|
+
O && I(O) && (d.value = O, p("update:modelValue", O), p("change", O));
|
|
786
|
+
}, j = (m) => {
|
|
787
|
+
var O;
|
|
788
788
|
u.value = !1;
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
},
|
|
792
|
-
|
|
793
|
-
},
|
|
794
|
-
if (
|
|
795
|
-
const
|
|
796
|
-
return Math.round(
|
|
789
|
+
const $ = (O = m.dataTransfer) == null ? void 0 : O.files[0];
|
|
790
|
+
$ && I($) && (d.value = $, p("update:modelValue", $), p("change", $));
|
|
791
|
+
}, T = () => {
|
|
792
|
+
d.value = null, o.value = "", r.value && (r.value.value = ""), p("update:modelValue", null), p("change", null);
|
|
793
|
+
}, y = (m) => {
|
|
794
|
+
if (m === 0) return "0 Bytes";
|
|
795
|
+
const $ = 1024, O = ["Bytes", "KB", "MB", "GB"], _ = Math.floor(Math.log(m) / Math.log($));
|
|
796
|
+
return Math.round(m / Math.pow($, _) * 100) / 100 + " " + O[_];
|
|
797
797
|
};
|
|
798
|
-
return (
|
|
798
|
+
return (m, $) => (s(), a("div", {
|
|
799
799
|
class: f(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
800
800
|
u.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
801
801
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
802
802
|
]]),
|
|
803
|
-
onClick:
|
|
804
|
-
onDragover: H(
|
|
805
|
-
onDragleave: H(
|
|
803
|
+
onClick: v,
|
|
804
|
+
onDragover: H(b, ["prevent"]),
|
|
805
|
+
onDragleave: H(S, ["prevent"]),
|
|
806
806
|
onDrop: H(j, ["prevent"])
|
|
807
807
|
}, [
|
|
808
|
-
|
|
808
|
+
l("input", {
|
|
809
809
|
ref_key: "fileInput",
|
|
810
|
-
ref:
|
|
810
|
+
ref: r,
|
|
811
811
|
type: "file",
|
|
812
812
|
accept: t.accept,
|
|
813
813
|
multiple: t.multiple,
|
|
814
814
|
disabled: t.disabled,
|
|
815
815
|
class: "hidden",
|
|
816
|
-
onChange:
|
|
816
|
+
onChange: F
|
|
817
817
|
}, null, 40, Vt),
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
class: f([
|
|
818
|
+
l("div", It, [
|
|
819
|
+
l("div", {
|
|
820
|
+
class: f([w.value, "flex items-center justify-center"])
|
|
821
821
|
}, [
|
|
822
|
-
t.illustration ? (s(),
|
|
822
|
+
t.illustration ? (s(), a("img", {
|
|
823
823
|
key: 0,
|
|
824
824
|
src: t.illustration,
|
|
825
825
|
alt: t.illustrationAlt,
|
|
826
826
|
class: "max-w-full max-h-full object-contain"
|
|
827
|
-
}, null, 8,
|
|
828
|
-
|
|
827
|
+
}, null, 8, Tt)) : (s(), a("svg", St, [...$[1] || ($[1] = [
|
|
828
|
+
l("path", {
|
|
829
829
|
"stroke-linecap": "round",
|
|
830
830
|
"stroke-linejoin": "round",
|
|
831
831
|
"stroke-width": "1.5",
|
|
@@ -833,64 +833,64 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
833
833
|
}, null, -1)
|
|
834
834
|
])]))
|
|
835
835
|
], 2),
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
836
|
+
l("div", jt, [
|
|
837
|
+
l("p", Lt, [
|
|
838
|
+
R(k(t.mainText) + " ", 1),
|
|
839
|
+
l("span", Ot, k(t.linkText), 1)
|
|
840
840
|
])
|
|
841
841
|
]),
|
|
842
|
-
|
|
842
|
+
d.value ? (s(), a("div", {
|
|
843
843
|
key: 0,
|
|
844
844
|
class: "w-full max-w-md bg-gray-50 rounded-lg p-4 flex items-center justify-between",
|
|
845
|
-
onClick:
|
|
845
|
+
onClick: $[0] || ($[0] = H(() => {
|
|
846
846
|
}, ["stop"]))
|
|
847
847
|
}, [
|
|
848
|
-
|
|
849
|
-
|
|
848
|
+
l("div", Ft, [
|
|
849
|
+
$[2] || ($[2] = l("svg", {
|
|
850
850
|
class: "w-6 h-6 text-gray-600 flex-shrink-0",
|
|
851
851
|
fill: "none",
|
|
852
852
|
stroke: "currentColor",
|
|
853
853
|
viewBox: "0 0 24 24"
|
|
854
854
|
}, [
|
|
855
|
-
|
|
855
|
+
l("path", {
|
|
856
856
|
"stroke-linecap": "round",
|
|
857
857
|
"stroke-linejoin": "round",
|
|
858
858
|
"stroke-width": "2",
|
|
859
859
|
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
860
|
})
|
|
861
861
|
], -1)),
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
862
|
+
l("div", At, [
|
|
863
|
+
l("p", Pt, k(d.value.name), 1),
|
|
864
|
+
l("p", Yt, k(y(d.value.size)), 1)
|
|
865
865
|
])
|
|
866
866
|
]),
|
|
867
|
-
t.disabled ?
|
|
867
|
+
t.disabled ? x("", !0) : (s(), a("button", {
|
|
868
868
|
key: 0,
|
|
869
|
-
onClick: H(
|
|
869
|
+
onClick: H(T, ["stop"]),
|
|
870
870
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
871
|
-
}, [
|
|
872
|
-
|
|
871
|
+
}, [...$[3] || ($[3] = [
|
|
872
|
+
l("svg", {
|
|
873
873
|
class: "w-5 h-5",
|
|
874
874
|
fill: "currentColor",
|
|
875
875
|
viewBox: "0 0 20 20"
|
|
876
876
|
}, [
|
|
877
|
-
|
|
877
|
+
l("path", {
|
|
878
878
|
"fill-rule": "evenodd",
|
|
879
879
|
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
880
|
"clip-rule": "evenodd"
|
|
881
881
|
})
|
|
882
882
|
], -1)
|
|
883
883
|
])]))
|
|
884
|
-
])) :
|
|
885
|
-
t.helperText ? (s(),
|
|
886
|
-
|
|
884
|
+
])) : x("", !0),
|
|
885
|
+
t.helperText ? (s(), a("p", Et, k(t.helperText), 1)) : x("", !0),
|
|
886
|
+
o.value ? (s(), a("p", qt, k(o.value), 1)) : x("", !0)
|
|
887
887
|
])
|
|
888
888
|
], 34));
|
|
889
889
|
}
|
|
890
|
-
}),
|
|
890
|
+
}), Rt = { class: "input-wrapper" }, Wt = ["for"], Nt = {
|
|
891
891
|
key: 0,
|
|
892
892
|
class: "text-danger-600"
|
|
893
|
-
},
|
|
893
|
+
}, _t = { class: "relative" }, Ht = ["id", "type", "disabled", "placeholder", "value", "required", "readonly"], Kt = {
|
|
894
894
|
key: 0,
|
|
895
895
|
class: "absolute right-3 top-1/2 -translate-y-1/2 text-danger-600"
|
|
896
896
|
}, Ut = {
|
|
@@ -899,7 +899,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
899
899
|
}, Jt = {
|
|
900
900
|
key: 2,
|
|
901
901
|
class: "mt-1 text-sm text-secondary-600"
|
|
902
|
-
}, Gt = /* @__PURE__ */
|
|
902
|
+
}, Gt = /* @__PURE__ */ E({
|
|
903
903
|
__name: "Input",
|
|
904
904
|
props: {
|
|
905
905
|
modelValue: { default: "" },
|
|
@@ -915,71 +915,71 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
915
915
|
helperText: {}
|
|
916
916
|
},
|
|
917
917
|
emits: ["update:modelValue", "blur", "focus"],
|
|
918
|
-
setup(t, { emit:
|
|
919
|
-
const e = t,
|
|
920
|
-
const
|
|
918
|
+
setup(t, { emit: g }) {
|
|
919
|
+
const e = t, p = g, r = L(`input-${Math.random().toString(36).substr(2, 9)}`), u = n(() => "ds-label"), d = n(() => {
|
|
920
|
+
const v = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", b = {
|
|
921
921
|
sm: "h-8 px-3 text-sm",
|
|
922
922
|
md: "h-10 px-4 text-base",
|
|
923
923
|
lg: "h-12 px-5 text-lg"
|
|
924
|
-
},
|
|
924
|
+
}, S = {
|
|
925
925
|
default: "border border-secondary-300 bg-white focus:border-primary-500 focus:ring-primary-500",
|
|
926
926
|
filled: "border-0 bg-secondary-100 focus:bg-white focus:ring-primary-500",
|
|
927
927
|
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
|
-
}, i = (
|
|
936
|
-
|
|
928
|
+
}, I = e.error ? "border-danger-500 focus:border-danger-500 focus:ring-danger-500 pr-10" : "";
|
|
929
|
+
return `${v} ${b[e.size]} ${S[e.variant]} ${I}`;
|
|
930
|
+
}), o = (v) => {
|
|
931
|
+
const b = v.target;
|
|
932
|
+
p("update:modelValue", b.value);
|
|
933
|
+
}, w = (v) => {
|
|
934
|
+
p("blur", v);
|
|
935
|
+
}, i = (v) => {
|
|
936
|
+
p("focus", v);
|
|
937
937
|
};
|
|
938
|
-
return (
|
|
939
|
-
t.label ? (s(),
|
|
938
|
+
return (v, b) => (s(), a("div", Rt, [
|
|
939
|
+
t.label ? (s(), a("label", {
|
|
940
940
|
key: 0,
|
|
941
|
-
for:
|
|
941
|
+
for: r.value,
|
|
942
942
|
class: f(u.value)
|
|
943
943
|
}, [
|
|
944
|
-
|
|
945
|
-
t.required ? (s(),
|
|
946
|
-
], 10,
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
id:
|
|
950
|
-
class: f(
|
|
944
|
+
R(k(t.label) + " ", 1),
|
|
945
|
+
t.required ? (s(), a("span", Nt, "*")) : x("", !0)
|
|
946
|
+
], 10, Wt)) : x("", !0),
|
|
947
|
+
l("div", _t, [
|
|
948
|
+
l("input", {
|
|
949
|
+
id: r.value,
|
|
950
|
+
class: f(d.value),
|
|
951
951
|
type: t.type,
|
|
952
952
|
disabled: t.disabled,
|
|
953
953
|
placeholder: t.placeholder,
|
|
954
954
|
value: t.modelValue,
|
|
955
955
|
required: t.required,
|
|
956
956
|
readonly: t.readonly,
|
|
957
|
-
onInput:
|
|
958
|
-
onBlur:
|
|
957
|
+
onInput: o,
|
|
958
|
+
onBlur: w,
|
|
959
959
|
onFocus: i
|
|
960
960
|
}, null, 42, Ht),
|
|
961
|
-
t.error ? (s(),
|
|
962
|
-
|
|
961
|
+
t.error ? (s(), a("span", Kt, [...b[0] || (b[0] = [
|
|
962
|
+
l("svg", {
|
|
963
963
|
xmlns: "http://www.w3.org/2000/svg",
|
|
964
964
|
class: "h-5 w-5",
|
|
965
965
|
viewBox: "0 0 20 20",
|
|
966
966
|
fill: "currentColor"
|
|
967
967
|
}, [
|
|
968
|
-
|
|
968
|
+
l("path", {
|
|
969
969
|
"fill-rule": "evenodd",
|
|
970
970
|
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
971
|
"clip-rule": "evenodd"
|
|
972
972
|
})
|
|
973
973
|
], -1)
|
|
974
|
-
])])) :
|
|
974
|
+
])])) : x("", !0)
|
|
975
975
|
]),
|
|
976
|
-
t.error ? (s(),
|
|
976
|
+
t.error ? (s(), a("p", Ut, k(t.error), 1)) : t.helperText ? (s(), a("p", Jt, k(t.helperText), 1)) : x("", !0)
|
|
977
977
|
]));
|
|
978
978
|
}
|
|
979
|
-
}),
|
|
979
|
+
}), Ba = /* @__PURE__ */ K(Gt, [["__scopeId", "data-v-fac43d65"]]), Qt = ["stroke-width"], Zt = {
|
|
980
980
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
981
981
|
style: { "background-color": "#f7f7f7" }
|
|
982
|
-
}, Xt = /* @__PURE__ */
|
|
982
|
+
}, Xt = /* @__PURE__ */ E({
|
|
983
983
|
__name: "Loader",
|
|
984
984
|
props: {
|
|
985
985
|
type: { default: "circular" },
|
|
@@ -990,31 +990,31 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
990
990
|
progress: { default: void 0 }
|
|
991
991
|
},
|
|
992
992
|
setup(t) {
|
|
993
|
-
const
|
|
993
|
+
const g = t, e = {
|
|
994
994
|
primary: "text-primary-700",
|
|
995
995
|
secondary: "text-secondary-500",
|
|
996
996
|
success: "text-success-500",
|
|
997
997
|
warning: "text-warning-500",
|
|
998
998
|
danger: "text-danger-500",
|
|
999
999
|
info: "text-info-500"
|
|
1000
|
-
},
|
|
1000
|
+
}, p = {
|
|
1001
1001
|
primary: "bg-primary-700",
|
|
1002
1002
|
secondary: "bg-secondary-500",
|
|
1003
1003
|
success: "bg-success-500",
|
|
1004
1004
|
warning: "bg-warning-500",
|
|
1005
1005
|
danger: "bg-danger-500",
|
|
1006
1006
|
info: "bg-info-500"
|
|
1007
|
-
},
|
|
1008
|
-
return (
|
|
1007
|
+
}, r = n(() => [e[g.color]]), u = n(() => [p[g.color]]);
|
|
1008
|
+
return (d, o) => t.type === "circular" ? (s(), a("div", {
|
|
1009
1009
|
key: 0,
|
|
1010
|
-
class: f(
|
|
1010
|
+
class: f(r.value)
|
|
1011
1011
|
}, [
|
|
1012
|
-
(s(),
|
|
1012
|
+
(s(), a("svg", {
|
|
1013
1013
|
class: "animate-spin",
|
|
1014
|
-
style:
|
|
1014
|
+
style: U({ width: t.size, height: t.size }),
|
|
1015
1015
|
viewBox: "0 0 24 24"
|
|
1016
1016
|
}, [
|
|
1017
|
-
|
|
1017
|
+
l("circle", {
|
|
1018
1018
|
class: "opacity-25",
|
|
1019
1019
|
cx: "12",
|
|
1020
1020
|
cy: "12",
|
|
@@ -1023,29 +1023,29 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1023
1023
|
"stroke-width": t.strokeWidth,
|
|
1024
1024
|
fill: "none"
|
|
1025
1025
|
}, null, 8, Qt),
|
|
1026
|
-
|
|
1026
|
+
o[0] || (o[0] = l("path", {
|
|
1027
1027
|
class: "opacity-75",
|
|
1028
1028
|
fill: "currentColor",
|
|
1029
1029
|
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
1030
|
}, null, -1))
|
|
1031
1031
|
], 4))
|
|
1032
|
-
], 2)) : t.type === "linear" ? (s(),
|
|
1032
|
+
], 2)) : t.type === "linear" ? (s(), a("div", {
|
|
1033
1033
|
key: 1,
|
|
1034
1034
|
class: "w-full",
|
|
1035
|
-
style:
|
|
1035
|
+
style: U({ height: t.height })
|
|
1036
1036
|
}, [
|
|
1037
|
-
|
|
1038
|
-
|
|
1037
|
+
l("div", Zt, [
|
|
1038
|
+
l("div", {
|
|
1039
1039
|
class: f([[u.value, { "animate-linear-loader": t.progress === void 0 }], "h-full rounded-lg"]),
|
|
1040
|
-
style:
|
|
1040
|
+
style: U({ width: t.progress !== void 0 ? `${Math.min(Math.max(t.progress, 0), 100)}%` : "100%" })
|
|
1041
1041
|
}, null, 6)
|
|
1042
1042
|
])
|
|
1043
|
-
], 4)) :
|
|
1043
|
+
], 4)) : x("", !0);
|
|
1044
1044
|
}
|
|
1045
|
-
}),
|
|
1045
|
+
}), Da = /* @__PURE__ */ K(Xt, [["__scopeId", "data-v-f369fb46"]]), es = ["disabled", "aria-expanded"], ts = ["disabled", "onClick"], ss = {
|
|
1046
1046
|
key: 0,
|
|
1047
1047
|
class: "flex-shrink-0"
|
|
1048
|
-
},
|
|
1048
|
+
}, as = ["innerHTML"], ls = { class: "flex-1 min-w-0 mr-2" }, os = { class: "flex flex-col items-start" }, ns = ["title"], rs = ["title"], is = {
|
|
1049
1049
|
key: 1,
|
|
1050
1050
|
class: "flex-shrink-0"
|
|
1051
1051
|
}, ds = {
|
|
@@ -1057,7 +1057,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1057
1057
|
fill: "none",
|
|
1058
1058
|
stroke: "currentColor",
|
|
1059
1059
|
viewBox: "0 0 24 24"
|
|
1060
|
-
}, fs = /* @__PURE__ */
|
|
1060
|
+
}, fs = /* @__PURE__ */ E({
|
|
1061
1061
|
__name: "Menu",
|
|
1062
1062
|
props: {
|
|
1063
1063
|
items: { default: () => [] },
|
|
@@ -1076,236 +1076,236 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1076
1076
|
zIndex: { default: 50 }
|
|
1077
1077
|
},
|
|
1078
1078
|
emits: ["open", "close", "select"],
|
|
1079
|
-
setup(t, { emit:
|
|
1080
|
-
const e = t,
|
|
1079
|
+
setup(t, { emit: g }) {
|
|
1080
|
+
const e = t, p = g, r = L(!1), u = L(null), d = L(null), o = L({}), w = n(() => [
|
|
1081
1081
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
1082
1082
|
"bg-white border border-secondary-300 rounded-md text-secondary-700",
|
|
1083
1083
|
"hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
|
|
1084
1084
|
"focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
1085
1085
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1086
1086
|
"transition-all duration-200"
|
|
1087
|
-
].join(" ")), i =
|
|
1087
|
+
].join(" ")), i = n(() => [...[
|
|
1088
1088
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
1089
1089
|
"flex flex-col",
|
|
1090
1090
|
"focus:outline-none"
|
|
1091
|
-
], `z-${e.zIndex}`].join(" ")),
|
|
1092
|
-
const
|
|
1091
|
+
], `z-${e.zIndex}`].join(" ")), v = n(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), b = n(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), S = n(() => "py-1 overflow-y-auto flex-1 min-h-0"), I = n(() => "my-1 border-t border-secondary-200"), F = n(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), j = (c) => {
|
|
1092
|
+
const C = [
|
|
1093
1093
|
"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left",
|
|
1094
1094
|
"transition-all duration-150 focus:outline-none cursor-pointer",
|
|
1095
1095
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1096
|
-
],
|
|
1096
|
+
], B = c.variant || "default", Q = {
|
|
1097
1097
|
default: "text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100",
|
|
1098
1098
|
danger: "text-danger-600 hover:bg-danger-100 hover:text-danger-700 focus:bg-danger-100",
|
|
1099
1099
|
success: "text-success-600 hover:bg-success-100 hover:text-success-700 focus:bg-success-100",
|
|
1100
1100
|
warning: "text-warning-600 hover:bg-warning-100 hover:text-warning-700 focus:bg-warning-100"
|
|
1101
1101
|
};
|
|
1102
|
-
let
|
|
1103
|
-
return
|
|
1104
|
-
},
|
|
1105
|
-
e.disabled || (
|
|
1106
|
-
},
|
|
1107
|
-
|
|
1108
|
-
|
|
1102
|
+
let A = "";
|
|
1103
|
+
return c.color && (A = c.color, (c.color.includes("white") || c.color.includes("50")) && (A += " hover:text-black")), [...C, A || Q[B]].join(" ");
|
|
1104
|
+
}, T = () => {
|
|
1105
|
+
e.disabled || (r.value ? m() : y());
|
|
1106
|
+
}, y = () => {
|
|
1107
|
+
r.value = !0, p("open"), fe(() => {
|
|
1108
|
+
D(), document.addEventListener("click", O), document.addEventListener("keydown", _);
|
|
1109
1109
|
});
|
|
1110
|
-
},
|
|
1111
|
-
|
|
1112
|
-
},
|
|
1113
|
-
|
|
1114
|
-
},
|
|
1115
|
-
const
|
|
1116
|
-
u.value && !u.value.contains(
|
|
1117
|
-
},
|
|
1118
|
-
|
|
1119
|
-
},
|
|
1120
|
-
(
|
|
1121
|
-
},
|
|
1122
|
-
if (!u.value || !
|
|
1123
|
-
const
|
|
1124
|
-
let
|
|
1110
|
+
}, m = () => {
|
|
1111
|
+
r.value = !1, p("close"), document.removeEventListener("click", O), document.removeEventListener("keydown", _);
|
|
1112
|
+
}, $ = (c) => {
|
|
1113
|
+
c.disabled || (c.action && c.action(), p("select", c), e.closeOnClick && !c.children && m());
|
|
1114
|
+
}, O = (c) => {
|
|
1115
|
+
const C = c.target;
|
|
1116
|
+
u.value && !u.value.contains(C) && d.value && !d.value.contains(C) && m();
|
|
1117
|
+
}, _ = (c) => {
|
|
1118
|
+
c.key === "Escape" && m();
|
|
1119
|
+
}, se = (c) => {
|
|
1120
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), T());
|
|
1121
|
+
}, D = () => {
|
|
1122
|
+
if (!u.value || !d.value) return;
|
|
1123
|
+
const c = u.value.getBoundingClientRect(), C = d.value.getBoundingClientRect(), B = window.innerWidth, Q = window.innerHeight;
|
|
1124
|
+
let A = 0, q = 0;
|
|
1125
1125
|
switch (e.position) {
|
|
1126
1126
|
case "bottom-start":
|
|
1127
|
-
|
|
1127
|
+
A = c.bottom + e.offset.y, q = c.left + e.offset.x;
|
|
1128
1128
|
break;
|
|
1129
1129
|
case "bottom-end":
|
|
1130
|
-
|
|
1130
|
+
A = c.bottom + e.offset.y, q = c.right - C.width + e.offset.x;
|
|
1131
1131
|
break;
|
|
1132
1132
|
case "top-start":
|
|
1133
|
-
|
|
1133
|
+
A = c.top - C.height - e.offset.y, q = c.left + e.offset.x;
|
|
1134
1134
|
break;
|
|
1135
1135
|
case "top-end":
|
|
1136
|
-
|
|
1136
|
+
A = c.top - C.height - e.offset.y, q = c.right - C.width + e.offset.x;
|
|
1137
1137
|
break;
|
|
1138
1138
|
case "right-start":
|
|
1139
|
-
|
|
1139
|
+
A = c.top + e.offset.y, q = c.right + e.offset.x;
|
|
1140
1140
|
break;
|
|
1141
1141
|
case "right-end":
|
|
1142
|
-
|
|
1142
|
+
A = c.bottom - C.height + e.offset.y, q = c.right + e.offset.x;
|
|
1143
1143
|
break;
|
|
1144
1144
|
case "left-start":
|
|
1145
|
-
|
|
1145
|
+
A = c.top + e.offset.y, q = c.left - C.width - e.offset.x;
|
|
1146
1146
|
break;
|
|
1147
1147
|
case "left-end":
|
|
1148
|
-
|
|
1148
|
+
A = c.bottom - C.height + e.offset.y, q = c.left - C.width - e.offset.x;
|
|
1149
1149
|
break;
|
|
1150
1150
|
}
|
|
1151
|
-
|
|
1152
|
-
top: `${
|
|
1153
|
-
left: `${
|
|
1154
|
-
width: e.width === "auto" ? `${Math.max(
|
|
1151
|
+
q + C.width > B && (q = B - C.width - 8), q < 8 && (q = 8), A + C.height > Q && (A = Q - C.height - 8), A < 8 && (A = 8), o.value = {
|
|
1152
|
+
top: `${A}px`,
|
|
1153
|
+
left: `${q}px`,
|
|
1154
|
+
width: e.width === "auto" ? `${Math.max(c.width, 240)}px` : e.width,
|
|
1155
1155
|
maxHeight: e.maxHeight,
|
|
1156
1156
|
minWidth: "240px"
|
|
1157
1157
|
};
|
|
1158
1158
|
};
|
|
1159
|
-
return
|
|
1160
|
-
window.addEventListener("scroll",
|
|
1161
|
-
}),
|
|
1162
|
-
window.removeEventListener("scroll",
|
|
1163
|
-
}),
|
|
1164
|
-
|
|
1165
|
-
}, { deep: !0 }), (
|
|
1159
|
+
return Ce(() => {
|
|
1160
|
+
window.addEventListener("scroll", D, !0), window.addEventListener("resize", D);
|
|
1161
|
+
}), Me(() => {
|
|
1162
|
+
window.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D), document.removeEventListener("click", O), document.removeEventListener("keydown", _);
|
|
1163
|
+
}), pe(() => e.items, () => {
|
|
1164
|
+
r.value && fe(D);
|
|
1165
|
+
}, { deep: !0 }), (c, C) => (s(), a("div", {
|
|
1166
1166
|
class: f(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
1167
1167
|
}, [
|
|
1168
|
-
|
|
1168
|
+
l("div", {
|
|
1169
1169
|
ref_key: "triggerRef",
|
|
1170
1170
|
ref: u
|
|
1171
1171
|
}, [
|
|
1172
|
-
V(
|
|
1173
|
-
isOpen:
|
|
1174
|
-
toggle:
|
|
1172
|
+
V(c.$slots, "trigger", {
|
|
1173
|
+
isOpen: r.value,
|
|
1174
|
+
toggle: T
|
|
1175
1175
|
}, () => [
|
|
1176
|
-
|
|
1176
|
+
l("button", {
|
|
1177
1177
|
type: "button",
|
|
1178
|
-
class: f(
|
|
1178
|
+
class: f(w.value),
|
|
1179
1179
|
disabled: t.disabled,
|
|
1180
|
-
onClick:
|
|
1181
|
-
onKeydown:
|
|
1180
|
+
onClick: T,
|
|
1181
|
+
onKeydown: se,
|
|
1182
1182
|
tabindex: 0,
|
|
1183
1183
|
role: "button",
|
|
1184
|
-
"aria-expanded":
|
|
1184
|
+
"aria-expanded": r.value,
|
|
1185
1185
|
"aria-haspopup": !0
|
|
1186
1186
|
}, [
|
|
1187
|
-
V(
|
|
1188
|
-
|
|
1187
|
+
V(c.$slots, "trigger-content", {}, () => [
|
|
1188
|
+
R(k(t.triggerText), 1)
|
|
1189
1189
|
], !0),
|
|
1190
|
-
t.showChevron ? (s(),
|
|
1190
|
+
t.showChevron ? (s(), a("svg", {
|
|
1191
1191
|
key: 0,
|
|
1192
|
-
class: f(["w-4 h-4 ml-2 transition-transform",
|
|
1192
|
+
class: f(["w-4 h-4 ml-2 transition-transform", r.value ? "rotate-180" : ""]),
|
|
1193
1193
|
fill: "none",
|
|
1194
1194
|
stroke: "currentColor",
|
|
1195
1195
|
viewBox: "0 0 24 24"
|
|
1196
|
-
}, [...
|
|
1197
|
-
|
|
1196
|
+
}, [...C[1] || (C[1] = [
|
|
1197
|
+
l("path", {
|
|
1198
1198
|
"stroke-linecap": "round",
|
|
1199
1199
|
"stroke-linejoin": "round",
|
|
1200
1200
|
"stroke-width": "2",
|
|
1201
1201
|
d: "M19 9l-7 7-7-7"
|
|
1202
1202
|
}, null, -1)
|
|
1203
|
-
])], 2)) :
|
|
1203
|
+
])], 2)) : x("", !0)
|
|
1204
1204
|
], 42, es)
|
|
1205
1205
|
], !0)
|
|
1206
1206
|
], 512),
|
|
1207
|
-
(s(),
|
|
1208
|
-
|
|
1207
|
+
(s(), Z(ve, { to: "body" }, [
|
|
1208
|
+
r.value ? (s(), a("div", {
|
|
1209
1209
|
key: 0,
|
|
1210
1210
|
ref_key: "menuRef",
|
|
1211
|
-
ref:
|
|
1211
|
+
ref: d,
|
|
1212
1212
|
class: f(i.value),
|
|
1213
|
-
style:
|
|
1214
|
-
onClick:
|
|
1213
|
+
style: U(o.value),
|
|
1214
|
+
onClick: C[0] || (C[0] = H(() => {
|
|
1215
1215
|
}, ["stop"]))
|
|
1216
1216
|
}, [
|
|
1217
|
-
|
|
1217
|
+
c.$slots.header ? (s(), a("div", {
|
|
1218
1218
|
key: 0,
|
|
1219
|
-
class: f(
|
|
1219
|
+
class: f(v.value)
|
|
1220
1220
|
}, [
|
|
1221
|
-
V(
|
|
1222
|
-
], 2)) :
|
|
1223
|
-
|
|
1224
|
-
class: f(
|
|
1221
|
+
V(c.$slots, "header", { close: m }, void 0, !0)
|
|
1222
|
+
], 2)) : x("", !0),
|
|
1223
|
+
l("div", {
|
|
1224
|
+
class: f(S.value)
|
|
1225
1225
|
}, [
|
|
1226
|
-
V(
|
|
1227
|
-
close:
|
|
1228
|
-
isOpen:
|
|
1226
|
+
V(c.$slots, "default", {
|
|
1227
|
+
close: m,
|
|
1228
|
+
isOpen: r.value
|
|
1229
1229
|
}, () => [
|
|
1230
|
-
(s(!0),
|
|
1231
|
-
key:
|
|
1230
|
+
(s(!0), a(Y, null, N(t.items, (B, Q) => (s(), a(Y, {
|
|
1231
|
+
key: B.id || Q
|
|
1232
1232
|
}, [
|
|
1233
|
-
|
|
1233
|
+
B.type === "divider" ? (s(), a("div", {
|
|
1234
1234
|
key: 0,
|
|
1235
|
-
class: f(
|
|
1236
|
-
}, null, 2)) :
|
|
1235
|
+
class: f(I.value)
|
|
1236
|
+
}, null, 2)) : B.type === "header" ? (s(), a("div", {
|
|
1237
1237
|
key: 1,
|
|
1238
|
-
class: f(
|
|
1239
|
-
},
|
|
1238
|
+
class: f(F.value)
|
|
1239
|
+
}, k(B.label), 3)) : (s(), a("button", {
|
|
1240
1240
|
key: 2,
|
|
1241
1241
|
type: "button",
|
|
1242
|
-
class: f(j(
|
|
1243
|
-
disabled:
|
|
1244
|
-
onClick: (
|
|
1242
|
+
class: f(j(B)),
|
|
1243
|
+
disabled: B.disabled,
|
|
1244
|
+
onClick: (A) => $(B)
|
|
1245
1245
|
}, [
|
|
1246
|
-
|
|
1247
|
-
V(
|
|
1248
|
-
typeof
|
|
1246
|
+
B.icon || c.$slots[`icon-${B.id}`] ? (s(), a("span", ss, [
|
|
1247
|
+
V(c.$slots, `icon-${B.id}`, { item: B }, () => [
|
|
1248
|
+
typeof B.icon != "string" ? (s(), Z(ge(B.icon), {
|
|
1249
1249
|
key: 0,
|
|
1250
1250
|
class: "w-5 h-5"
|
|
1251
|
-
})) : (s(),
|
|
1251
|
+
})) : (s(), a("span", {
|
|
1252
1252
|
key: 1,
|
|
1253
|
-
innerHTML:
|
|
1253
|
+
innerHTML: B.icon,
|
|
1254
1254
|
class: "w-5 h-5 inline-block"
|
|
1255
|
-
}, null, 8,
|
|
1255
|
+
}, null, 8, as))
|
|
1256
1256
|
], !0)
|
|
1257
|
-
])) :
|
|
1258
|
-
|
|
1259
|
-
V(
|
|
1260
|
-
item:
|
|
1261
|
-
close:
|
|
1257
|
+
])) : x("", !0),
|
|
1258
|
+
l("div", ls, [
|
|
1259
|
+
V(c.$slots, `item-${B.id}`, {
|
|
1260
|
+
item: B,
|
|
1261
|
+
close: m
|
|
1262
1262
|
}, () => [
|
|
1263
|
-
|
|
1264
|
-
|
|
1263
|
+
l("div", os, [
|
|
1264
|
+
l("span", {
|
|
1265
1265
|
class: "truncate w-full",
|
|
1266
|
-
title:
|
|
1267
|
-
},
|
|
1268
|
-
|
|
1266
|
+
title: B.label
|
|
1267
|
+
}, k(B.label), 9, ns),
|
|
1268
|
+
B.description ? (s(), a("span", {
|
|
1269
1269
|
key: 0,
|
|
1270
1270
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
1271
|
-
title:
|
|
1272
|
-
},
|
|
1271
|
+
title: B.description
|
|
1272
|
+
}, k(B.description), 9, rs)) : x("", !0)
|
|
1273
1273
|
])
|
|
1274
1274
|
], !0)
|
|
1275
1275
|
]),
|
|
1276
|
-
|
|
1277
|
-
V(
|
|
1278
|
-
|
|
1276
|
+
B.suffix || B.shortcut || c.$slots[`suffix-${B.id}`] ? (s(), a("span", is, [
|
|
1277
|
+
V(c.$slots, `suffix-${B.id}`, { item: B }, () => [
|
|
1278
|
+
B.shortcut ? (s(), a("span", ds, k(B.shortcut), 1)) : B.suffix ? (s(), a("span", us, k(B.suffix), 1)) : x("", !0)
|
|
1279
1279
|
], !0)
|
|
1280
|
-
])) :
|
|
1281
|
-
|
|
1282
|
-
|
|
1280
|
+
])) : x("", !0),
|
|
1281
|
+
B.children && B.children.length > 0 ? (s(), a("svg", cs, [...C[2] || (C[2] = [
|
|
1282
|
+
l("path", {
|
|
1283
1283
|
"stroke-linecap": "round",
|
|
1284
1284
|
"stroke-linejoin": "round",
|
|
1285
1285
|
"stroke-width": "2",
|
|
1286
1286
|
d: "M9 5l7 7-7 7"
|
|
1287
1287
|
}, null, -1)
|
|
1288
|
-
])])) :
|
|
1288
|
+
])])) : x("", !0)
|
|
1289
1289
|
], 10, ts))
|
|
1290
1290
|
], 64))), 128))
|
|
1291
1291
|
], !0)
|
|
1292
1292
|
], 2),
|
|
1293
|
-
|
|
1293
|
+
c.$slots.footer ? (s(), a("div", {
|
|
1294
1294
|
key: 1,
|
|
1295
|
-
class: f(
|
|
1295
|
+
class: f(b.value)
|
|
1296
1296
|
}, [
|
|
1297
|
-
V(
|
|
1298
|
-
], 2)) :
|
|
1299
|
-
], 6)) :
|
|
1300
|
-
|
|
1297
|
+
V(c.$slots, "footer", { close: m }, void 0, !0)
|
|
1298
|
+
], 2)) : x("", !0)
|
|
1299
|
+
], 6)) : x("", !0),
|
|
1300
|
+
r.value && t.overlay ? (s(), a("div", {
|
|
1301
1301
|
key: 1,
|
|
1302
1302
|
class: "fixed inset-0 bg-black/20 z-40",
|
|
1303
|
-
onClick:
|
|
1304
|
-
})) :
|
|
1303
|
+
onClick: m
|
|
1304
|
+
})) : x("", !0)
|
|
1305
1305
|
]))
|
|
1306
1306
|
], 2));
|
|
1307
1307
|
}
|
|
1308
|
-
}),
|
|
1308
|
+
}), za = /* @__PURE__ */ K(fs, [["__scopeId", "data-v-61176297"]]), ps = ["for"], vs = {
|
|
1309
1309
|
key: 0,
|
|
1310
1310
|
class: "text-danger-600"
|
|
1311
1311
|
}, gs = ["id", "disabled", "aria-expanded"], bs = { class: "flex-1 text-left truncate" }, ys = {
|
|
@@ -1324,13 +1324,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1324
1324
|
}, Ms = {
|
|
1325
1325
|
key: 0,
|
|
1326
1326
|
class: "border-t border-secondary-200 my-1"
|
|
1327
|
-
},
|
|
1327
|
+
}, Bs = ["onClick"], Ds = ["innerHTML"], zs = {
|
|
1328
1328
|
key: 1,
|
|
1329
1329
|
class: "mt-1 text-sm text-danger-600"
|
|
1330
1330
|
}, Vs = {
|
|
1331
1331
|
key: 2,
|
|
1332
1332
|
class: "mt-1 text-sm text-secondary-600"
|
|
1333
|
-
},
|
|
1333
|
+
}, Is = /* @__PURE__ */ E({
|
|
1334
1334
|
__name: "Select",
|
|
1335
1335
|
props: {
|
|
1336
1336
|
modelValue: { default: null },
|
|
@@ -1352,91 +1352,91 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1352
1352
|
bordered: { type: Boolean, default: !0 }
|
|
1353
1353
|
},
|
|
1354
1354
|
emits: ["update:modelValue", "change", "action"],
|
|
1355
|
-
setup(t, { emit:
|
|
1356
|
-
const e = t,
|
|
1355
|
+
setup(t, { emit: g }) {
|
|
1356
|
+
const e = t, p = g, r = L(!1), u = L(""), d = L(null), o = n(
|
|
1357
1357
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
1358
|
-
),
|
|
1358
|
+
), w = n(() => e.options.find((D) => D.value === e.modelValue) || null), i = n(() => {
|
|
1359
1359
|
if (!e.searchable || !u.value)
|
|
1360
1360
|
return e.options;
|
|
1361
|
-
const
|
|
1362
|
-
return e.options.filter((
|
|
1363
|
-
}),
|
|
1364
|
-
const
|
|
1361
|
+
const D = u.value.toLowerCase();
|
|
1362
|
+
return e.options.filter((c) => c.label.toLowerCase().includes(D));
|
|
1363
|
+
}), v = n(() => "ds-label"), b = n(() => e.bordered ? "border border-neutral-300 rounded-md" : "rounded-md"), S = n(() => {
|
|
1364
|
+
const D = "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", c = {
|
|
1365
1365
|
sm: "px-3 py-1.5 text-sm",
|
|
1366
1366
|
md: "px-4 py-2 text-base",
|
|
1367
1367
|
lg: "px-5 py-3 text-lg"
|
|
1368
|
-
},
|
|
1368
|
+
}, C = {
|
|
1369
1369
|
default: "bg-white",
|
|
1370
1370
|
outline: "bg-transparent",
|
|
1371
1371
|
filled: "bg-secondary-100"
|
|
1372
|
-
},
|
|
1372
|
+
}, B = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
1373
1373
|
return [
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1374
|
+
D,
|
|
1375
|
+
c[e.size],
|
|
1376
|
+
C[e.variant],
|
|
1377
|
+
B
|
|
1378
1378
|
].join(" ");
|
|
1379
|
-
}),
|
|
1380
|
-
const
|
|
1381
|
-
return [
|
|
1382
|
-
}, j = (
|
|
1383
|
-
const
|
|
1384
|
-
return
|
|
1385
|
-
},
|
|
1386
|
-
e.disabled || (
|
|
1387
|
-
var
|
|
1388
|
-
(
|
|
1379
|
+
}), I = n(() => `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`), F = (D) => {
|
|
1380
|
+
const c = "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 = T(D) ? "bg-primary-50" : "";
|
|
1381
|
+
return [c, C].join(" ");
|
|
1382
|
+
}, j = (D) => {
|
|
1383
|
+
const c = "w-full px-4 py-2 text-left text-sm font-semibold transition-colors focus:outline-none flex items-center gap-3";
|
|
1384
|
+
return D.variant === "danger" ? `${c} text-danger-600 hover:bg-danger-50 focus:bg-danger-50` : `${c} text-secondary-700 hover:bg-secondary-50 focus:bg-secondary-50`;
|
|
1385
|
+
}, T = (D) => D.value === e.modelValue, y = () => {
|
|
1386
|
+
e.disabled || (r.value = !r.value, r.value && e.searchable && fe(() => {
|
|
1387
|
+
var D;
|
|
1388
|
+
(D = d.value) == null || D.focus();
|
|
1389
1389
|
}));
|
|
1390
|
-
},
|
|
1391
|
-
|
|
1392
|
-
},
|
|
1393
|
-
|
|
1394
|
-
},
|
|
1395
|
-
|
|
1396
|
-
},
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1399
|
-
|
|
1390
|
+
}, m = () => {
|
|
1391
|
+
r.value = !1, u.value = "";
|
|
1392
|
+
}, $ = (D) => {
|
|
1393
|
+
D.disabled || (p("update:modelValue", D.value), p("change", D), m());
|
|
1394
|
+
}, O = (D) => {
|
|
1395
|
+
D.action && D.action(), p("action", D), m();
|
|
1396
|
+
}, _ = (D) => {
|
|
1397
|
+
const c = D.relatedTarget;
|
|
1398
|
+
c && c.closest(".select-wrapper") || setTimeout(() => {
|
|
1399
|
+
m();
|
|
1400
1400
|
}, 200);
|
|
1401
|
-
},
|
|
1402
|
-
|
|
1401
|
+
}, se = (D) => {
|
|
1402
|
+
D.key === "Escape" ? m() : (D.key === "Enter" || D.key === " ") && (D.preventDefault(), y());
|
|
1403
1403
|
};
|
|
1404
|
-
return
|
|
1405
|
-
|
|
1406
|
-
}), (
|
|
1404
|
+
return pe(r, (D) => {
|
|
1405
|
+
D && (u.value = "");
|
|
1406
|
+
}), (D, c) => (s(), a("div", {
|
|
1407
1407
|
class: f(["select-wrapper", { "w-full": t.fullWidth }])
|
|
1408
1408
|
}, [
|
|
1409
|
-
t.label ? (s(),
|
|
1409
|
+
t.label ? (s(), a("label", {
|
|
1410
1410
|
key: 0,
|
|
1411
|
-
for:
|
|
1412
|
-
class: f(
|
|
1411
|
+
for: o.value,
|
|
1412
|
+
class: f(v.value)
|
|
1413
1413
|
}, [
|
|
1414
|
-
|
|
1415
|
-
t.required ? (s(),
|
|
1416
|
-
], 10,
|
|
1417
|
-
|
|
1418
|
-
class: f(["relative",
|
|
1414
|
+
R(k(t.label) + " ", 1),
|
|
1415
|
+
t.required ? (s(), a("span", vs, "*")) : x("", !0)
|
|
1416
|
+
], 10, ps)) : x("", !0),
|
|
1417
|
+
l("div", {
|
|
1418
|
+
class: f(["relative", b.value])
|
|
1419
1419
|
}, [
|
|
1420
|
-
|
|
1421
|
-
id:
|
|
1420
|
+
l("button", {
|
|
1421
|
+
id: o.value,
|
|
1422
1422
|
type: "button",
|
|
1423
|
-
class: f(
|
|
1423
|
+
class: f(S.value),
|
|
1424
1424
|
disabled: t.disabled,
|
|
1425
|
-
"aria-expanded":
|
|
1425
|
+
"aria-expanded": r.value,
|
|
1426
1426
|
"aria-haspopup": !0,
|
|
1427
|
-
onClick:
|
|
1428
|
-
onBlur:
|
|
1429
|
-
onKeydown:
|
|
1427
|
+
onClick: y,
|
|
1428
|
+
onBlur: _,
|
|
1429
|
+
onKeydown: se
|
|
1430
1430
|
}, [
|
|
1431
|
-
|
|
1432
|
-
(s(),
|
|
1433
|
-
class: f(["w-5 h-5 flex-shrink-0 transition-transform text-[#565656] opacity-80",
|
|
1431
|
+
l("span", bs, k(w.value ? w.value.label : t.placeholder), 1),
|
|
1432
|
+
(s(), a("svg", {
|
|
1433
|
+
class: f(["w-5 h-5 flex-shrink-0 transition-transform text-[#565656] opacity-80", r.value ? "rotate-180" : ""]),
|
|
1434
1434
|
fill: "none",
|
|
1435
1435
|
stroke: "currentColor",
|
|
1436
1436
|
viewBox: "0 0 24 24",
|
|
1437
1437
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1438
|
-
}, [...
|
|
1439
|
-
|
|
1438
|
+
}, [...c[3] || (c[3] = [
|
|
1439
|
+
l("path", {
|
|
1440
1440
|
"stroke-linecap": "round",
|
|
1441
1441
|
"stroke-linejoin": "round",
|
|
1442
1442
|
"stroke-width": "2",
|
|
@@ -1444,77 +1444,80 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1444
1444
|
}, null, -1)
|
|
1445
1445
|
])], 2))
|
|
1446
1446
|
], 42, gs),
|
|
1447
|
-
|
|
1447
|
+
r.value ? (s(), a("div", {
|
|
1448
1448
|
key: 0,
|
|
1449
|
-
class: f(
|
|
1450
|
-
onClick:
|
|
1449
|
+
class: f(I.value),
|
|
1450
|
+
onClick: c[2] || (c[2] = H(() => {
|
|
1451
1451
|
}, ["stop"]))
|
|
1452
1452
|
}, [
|
|
1453
|
-
t.searchable ? (s(),
|
|
1454
|
-
|
|
1453
|
+
t.searchable ? (s(), a("div", ys, [
|
|
1454
|
+
ce(l("input", {
|
|
1455
1455
|
ref_key: "searchInput",
|
|
1456
|
-
ref:
|
|
1457
|
-
"onUpdate:modelValue":
|
|
1456
|
+
ref: d,
|
|
1457
|
+
"onUpdate:modelValue": c[0] || (c[0] = (C) => u.value = C),
|
|
1458
1458
|
type: "text",
|
|
1459
1459
|
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
1460
|
placeholder: t.searchPlaceholder,
|
|
1461
|
-
onKeydown:
|
|
1461
|
+
onKeydown: c[1] || (c[1] = H(() => {
|
|
1462
1462
|
}, ["stop"]))
|
|
1463
1463
|
}, null, 40, ms), [
|
|
1464
|
-
[
|
|
1464
|
+
[Ye, u.value]
|
|
1465
1465
|
])
|
|
1466
|
-
])) :
|
|
1467
|
-
|
|
1468
|
-
i.value.length === 0 ? (s(),
|
|
1469
|
-
(s(!0),
|
|
1470
|
-
key:
|
|
1466
|
+
])) : x("", !0),
|
|
1467
|
+
l("div", hs, [
|
|
1468
|
+
i.value.length === 0 ? (s(), a("div", xs, k(t.emptyText), 1)) : (s(), a(Y, { key: 1 }, [
|
|
1469
|
+
(s(!0), a(Y, null, N(i.value, (C) => (s(), a("button", {
|
|
1470
|
+
key: C.value,
|
|
1471
1471
|
type: "button",
|
|
1472
|
-
class: f(
|
|
1473
|
-
onClick: (
|
|
1472
|
+
class: f(F(C)),
|
|
1473
|
+
onClick: (B) => $(C)
|
|
1474
1474
|
}, [
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1475
|
+
l("div", ks, [
|
|
1476
|
+
l("span", $s, k(C.label), 1),
|
|
1477
|
+
T(C) ? (s(), a("svg", Cs, [...c[4] || (c[4] = [
|
|
1478
|
+
l("path", {
|
|
1479
1479
|
"stroke-linecap": "round",
|
|
1480
1480
|
"stroke-linejoin": "round",
|
|
1481
1481
|
"stroke-width": "2",
|
|
1482
1482
|
d: "M5 13l4 4L19 7"
|
|
1483
1483
|
}, null, -1)
|
|
1484
|
-
])])) :
|
|
1484
|
+
])])) : x("", !0)
|
|
1485
1485
|
])
|
|
1486
1486
|
], 10, ws))), 128)),
|
|
1487
|
-
t.actionItems.length > 0 ? (s(),
|
|
1488
|
-
(s(!0),
|
|
1489
|
-
key:
|
|
1487
|
+
t.actionItems.length > 0 ? (s(), a("div", Ms)) : x("", !0),
|
|
1488
|
+
(s(!0), a(Y, null, N(t.actionItems, (C) => (s(), a("button", {
|
|
1489
|
+
key: C.id,
|
|
1490
1490
|
type: "button",
|
|
1491
|
-
class: f(j(
|
|
1492
|
-
onClick: (
|
|
1491
|
+
class: f(j(C)),
|
|
1492
|
+
onClick: (B) => O(C)
|
|
1493
1493
|
}, [
|
|
1494
|
-
|
|
1494
|
+
C.icon ? (s(), a("svg", {
|
|
1495
1495
|
key: 0,
|
|
1496
1496
|
class: "w-4 h-4 flex-shrink-0",
|
|
1497
1497
|
fill: "none",
|
|
1498
1498
|
stroke: "currentColor",
|
|
1499
1499
|
viewBox: "0 0 24 24",
|
|
1500
1500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1501
|
-
innerHTML:
|
|
1502
|
-
}, null, 8,
|
|
1503
|
-
|
|
1504
|
-
], 10,
|
|
1501
|
+
innerHTML: C.icon
|
|
1502
|
+
}, null, 8, Ds)) : x("", !0),
|
|
1503
|
+
R(" " + k(C.label), 1)
|
|
1504
|
+
], 10, Bs))), 128))
|
|
1505
1505
|
], 64))
|
|
1506
1506
|
])
|
|
1507
|
-
], 2)) :
|
|
1507
|
+
], 2)) : x("", !0)
|
|
1508
1508
|
], 2),
|
|
1509
|
-
t.error ? (s(),
|
|
1510
|
-
|
|
1509
|
+
t.error ? (s(), a("p", zs, k(t.error), 1)) : t.helperText ? (s(), a("p", Vs, k(t.helperText), 1)) : x("", !0),
|
|
1510
|
+
r.value ? (s(), a("div", {
|
|
1511
1511
|
key: 3,
|
|
1512
|
-
onClick:
|
|
1512
|
+
onClick: m,
|
|
1513
1513
|
class: "fixed inset-0 z-40"
|
|
1514
|
-
})) :
|
|
1514
|
+
})) : x("", !0)
|
|
1515
1515
|
], 2));
|
|
1516
1516
|
}
|
|
1517
|
-
}),
|
|
1517
|
+
}), Va = /* @__PURE__ */ K(Is, [["__scopeId", "data-v-4b6dade4"]]), Ts = {
|
|
1518
|
+
key: 0,
|
|
1519
|
+
class: "space-y-1"
|
|
1520
|
+
}, Ss = ["href", "onClick", "aria-current"], js = /* @__PURE__ */ E({
|
|
1518
1521
|
__name: "Sidebar",
|
|
1519
1522
|
props: {
|
|
1520
1523
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1526,106 +1529,137 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1526
1529
|
persistent: { type: Boolean, default: !1 },
|
|
1527
1530
|
backgroundColor: { default: "white" },
|
|
1528
1531
|
shadow: { type: Boolean, default: !0 },
|
|
1529
|
-
padding: { default: "md" }
|
|
1532
|
+
padding: { default: "md" },
|
|
1533
|
+
items: { default: () => [] },
|
|
1534
|
+
activeItem: { default: null },
|
|
1535
|
+
keepOpen: { type: Boolean, default: !1 }
|
|
1530
1536
|
},
|
|
1531
|
-
emits: ["update:modelValue", "close", "open"],
|
|
1532
|
-
setup(t, { emit:
|
|
1533
|
-
const e = t,
|
|
1537
|
+
emits: ["update:modelValue", "update:activeItem", "close", "open", "itemClick"],
|
|
1538
|
+
setup(t, { emit: g }) {
|
|
1539
|
+
const e = t, p = g, r = n({
|
|
1534
1540
|
get: () => e.modelValue,
|
|
1535
|
-
set: (
|
|
1541
|
+
set: (y) => p("update:modelValue", y)
|
|
1536
1542
|
}), u = () => {
|
|
1537
|
-
e.persistent
|
|
1538
|
-
},
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1543
|
+
!e.persistent && !e.keepOpen && (r.value = !1, p("close"));
|
|
1544
|
+
}, d = (y, m) => {
|
|
1545
|
+
m.id && p("update:activeItem", m.id), m.onClick && (y.preventDefault(), m.onClick(m)), p("itemClick", m), !e.keepOpen && !e.persistent && u();
|
|
1546
|
+
}, o = (y) => y.active !== void 0 ? y.active : e.activeItem && y.id ? e.activeItem === y.id : !1, w = (y) => {
|
|
1547
|
+
const m = "flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 text-sm font-medium", $ = o(y) ? "bg-primary-100 text-primary-700 border-l-4 border-primary-600" : "text-gray-700 hover:bg-gray-100 hover:text-gray-900";
|
|
1548
|
+
return `${m} ${$}`;
|
|
1549
|
+
}, i = (y) => {
|
|
1550
|
+
const m = "w-5 h-5 flex-shrink-0", $ = o(y) ? "text-primary-600" : "text-gray-500";
|
|
1551
|
+
return `${m} ${$}`;
|
|
1552
|
+
}, v = n(() => e.position === "left" ? "slide-right" : "slide-left"), b = n(() => {
|
|
1553
|
+
const y = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none", m = e.position === "left" ? "left-0" : "right-0", $ = 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)]" : "";
|
|
1554
|
+
return [y, m, $].filter(Boolean).join(" ");
|
|
1555
|
+
}), S = n(() => ({
|
|
1542
1556
|
// Base fluid width; respect custom width as max constraint
|
|
1543
1557
|
width: "100%",
|
|
1544
1558
|
maxWidth: e.width,
|
|
1545
1559
|
backgroundColor: e.backgroundColor,
|
|
1546
1560
|
top: e.overlayTop,
|
|
1547
1561
|
height: e.overlayTop !== "0" ? `calc(100vh - ${e.overlayTop})` : "100vh"
|
|
1548
|
-
})),
|
|
1562
|
+
})), I = {
|
|
1549
1563
|
none: "",
|
|
1550
1564
|
sm: "p-2",
|
|
1551
1565
|
md: "p-4",
|
|
1552
1566
|
lg: "p-6"
|
|
1553
|
-
},
|
|
1554
|
-
return (
|
|
1555
|
-
|
|
1567
|
+
}, F = n(() => `flex items-center justify-between border-b border-gray-200 ${I[e.padding]}`), j = n(() => `flex-1 overflow-y-auto ${I[e.padding]}`), T = n(() => `border-t border-gray-200 ${I[e.padding]}`);
|
|
1568
|
+
return (y, m) => (s(), Z(ve, { to: "body" }, [
|
|
1569
|
+
G(ne, { name: "fade" }, {
|
|
1556
1570
|
default: ae(() => [
|
|
1557
|
-
|
|
1571
|
+
r.value && t.overlay && !t.keepOpen ? (s(), a("div", {
|
|
1558
1572
|
key: 0,
|
|
1559
1573
|
onClick: u,
|
|
1560
1574
|
class: "fixed inset-0 bg-black/50 z-40",
|
|
1561
|
-
style:
|
|
1562
|
-
}, null, 4)) :
|
|
1575
|
+
style: U({ top: t.overlayTop })
|
|
1576
|
+
}, null, 4)) : x("", !0)
|
|
1563
1577
|
]),
|
|
1564
1578
|
_: 1
|
|
1565
1579
|
}),
|
|
1566
|
-
|
|
1580
|
+
G(ne, { name: v.value }, {
|
|
1567
1581
|
default: ae(() => [
|
|
1568
|
-
|
|
1582
|
+
r.value ? (s(), a("aside", {
|
|
1569
1583
|
key: 0,
|
|
1570
|
-
class: f(
|
|
1571
|
-
style:
|
|
1584
|
+
class: f(b.value),
|
|
1585
|
+
style: U(S.value)
|
|
1572
1586
|
}, [
|
|
1573
|
-
|
|
1587
|
+
y.$slots.header ? (s(), a("div", {
|
|
1574
1588
|
key: 0,
|
|
1575
|
-
class: f(
|
|
1589
|
+
class: f(F.value)
|
|
1576
1590
|
}, [
|
|
1577
|
-
V(
|
|
1578
|
-
t.closable ? (s(),
|
|
1591
|
+
V(y.$slots, "header", {}, void 0, !0),
|
|
1592
|
+
t.closable ? (s(), a("button", {
|
|
1579
1593
|
key: 0,
|
|
1580
1594
|
onClick: u,
|
|
1581
1595
|
class: "p-2 hover:bg-gray-100 rounded-md transition-colors",
|
|
1582
1596
|
"aria-label": "Cerrar menú"
|
|
1583
|
-
}, [...
|
|
1584
|
-
|
|
1597
|
+
}, [...m[0] || (m[0] = [
|
|
1598
|
+
l("svg", {
|
|
1585
1599
|
class: "w-5 h-5",
|
|
1586
1600
|
fill: "none",
|
|
1587
1601
|
stroke: "currentColor",
|
|
1588
1602
|
viewBox: "0 0 24 24"
|
|
1589
1603
|
}, [
|
|
1590
|
-
|
|
1604
|
+
l("path", {
|
|
1591
1605
|
"stroke-linecap": "round",
|
|
1592
1606
|
"stroke-linejoin": "round",
|
|
1593
1607
|
"stroke-width": "2",
|
|
1594
1608
|
d: "M6 18L18 6M6 6l12 12"
|
|
1595
1609
|
})
|
|
1596
1610
|
], -1)
|
|
1597
|
-
])])) :
|
|
1598
|
-
], 2)) :
|
|
1599
|
-
|
|
1600
|
-
class: f(
|
|
1611
|
+
])])) : x("", !0)
|
|
1612
|
+
], 2)) : x("", !0),
|
|
1613
|
+
l("div", {
|
|
1614
|
+
class: f(j.value)
|
|
1601
1615
|
}, [
|
|
1602
|
-
|
|
1616
|
+
t.items && t.items.length ? (s(), a("nav", Ts, [
|
|
1617
|
+
(s(!0), a(Y, null, N(t.items, ($) => (s(), a("a", {
|
|
1618
|
+
key: $.id || $.label,
|
|
1619
|
+
href: $.href,
|
|
1620
|
+
onClick: (O) => d(O, $),
|
|
1621
|
+
class: f(w($)),
|
|
1622
|
+
"aria-current": o($) ? "page" : void 0
|
|
1623
|
+
}, [
|
|
1624
|
+
$.icon && typeof $.icon == "string" ? (s(), Z(te, {
|
|
1625
|
+
key: 0,
|
|
1626
|
+
name: $.icon,
|
|
1627
|
+
size: "md",
|
|
1628
|
+
class: f(i($))
|
|
1629
|
+
}, null, 8, ["name", "class"])) : $.icon ? (s(), Z(ge($.icon), {
|
|
1630
|
+
key: 1,
|
|
1631
|
+
class: f(i($))
|
|
1632
|
+
}, null, 8, ["class"])) : x("", !0),
|
|
1633
|
+
l("span", null, k($.label), 1)
|
|
1634
|
+
], 10, Ss))), 128))
|
|
1635
|
+
])) : x("", !0),
|
|
1636
|
+
V(y.$slots, "default", {}, void 0, !0)
|
|
1603
1637
|
], 2),
|
|
1604
|
-
|
|
1638
|
+
y.$slots.footer ? (s(), a("div", {
|
|
1605
1639
|
key: 1,
|
|
1606
1640
|
class: f(T.value)
|
|
1607
1641
|
}, [
|
|
1608
|
-
V(
|
|
1609
|
-
], 2)) :
|
|
1610
|
-
], 6)) :
|
|
1642
|
+
V(y.$slots, "footer", {}, void 0, !0)
|
|
1643
|
+
], 2)) : x("", !0)
|
|
1644
|
+
], 6)) : x("", !0)
|
|
1611
1645
|
]),
|
|
1612
1646
|
_: 3
|
|
1613
1647
|
}, 8, ["name"])
|
|
1614
1648
|
]));
|
|
1615
1649
|
}
|
|
1616
|
-
}),
|
|
1650
|
+
}), Ia = /* @__PURE__ */ K(js, [["__scopeId", "data-v-1ca72eea"]]), Ls = { class: "w-full space-y-4" }, Os = { class: "flex flex-col gap-3 md:hidden" }, Fs = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, As = { class: "text-sm text-gray-700" }, Ps = {
|
|
1617
1651
|
key: 0,
|
|
1618
1652
|
class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
|
|
1619
|
-
}, Ys = { class: "hidden md:block w-full overflow-x-auto" },
|
|
1653
|
+
}, Ys = { class: "hidden md:block w-full overflow-x-auto" }, Es = { class: "w-full border-collapse" }, qs = { class: "w-full" }, Rs = ["onClick"], Ws = { class: "flex items-center gap-2" }, Ns = {
|
|
1620
1654
|
key: 0,
|
|
1621
1655
|
class: "text-xs text-gray-400"
|
|
1622
|
-
},
|
|
1656
|
+
}, _s = { key: 0 }, Hs = { key: 1 }, Ks = { class: "w-full" }, Us = {
|
|
1623
1657
|
key: 0,
|
|
1624
1658
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
1625
|
-
},
|
|
1659
|
+
}, Js = {
|
|
1626
1660
|
key: 0,
|
|
1627
1661
|
class: "w-full px-6 py-4 bg-white"
|
|
1628
|
-
},
|
|
1662
|
+
}, Gs = /* @__PURE__ */ E({
|
|
1629
1663
|
__name: "Table",
|
|
1630
1664
|
props: {
|
|
1631
1665
|
columns: {},
|
|
@@ -1636,112 +1670,112 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1636
1670
|
rowClass: { default: void 0 }
|
|
1637
1671
|
},
|
|
1638
1672
|
setup(t) {
|
|
1639
|
-
const
|
|
1640
|
-
e.value ===
|
|
1641
|
-
}, u =
|
|
1673
|
+
const g = t, e = L(null), p = L("asc"), r = (o) => {
|
|
1674
|
+
e.value === o ? p.value = p.value === "asc" ? "desc" : "asc" : (e.value = o, p.value = "asc");
|
|
1675
|
+
}, u = n(() => {
|
|
1642
1676
|
if (!e.value)
|
|
1643
|
-
return
|
|
1644
|
-
const
|
|
1645
|
-
return
|
|
1646
|
-
const
|
|
1647
|
-
return typeof
|
|
1648
|
-
}),
|
|
1649
|
-
}),
|
|
1650
|
-
return (
|
|
1651
|
-
|
|
1652
|
-
(s(!0),
|
|
1653
|
-
key: `card-${
|
|
1677
|
+
return g.data;
|
|
1678
|
+
const o = [...g.data];
|
|
1679
|
+
return o.sort((w, i) => {
|
|
1680
|
+
const v = w[e.value], b = i[e.value];
|
|
1681
|
+
return typeof v == "string" && typeof b == "string" ? p.value === "asc" ? v.localeCompare(b) : b.localeCompare(v) : typeof v == "number" && typeof b == "number" ? p.value === "asc" ? v - b : b - v : 0;
|
|
1682
|
+
}), o;
|
|
1683
|
+
}), d = n(() => g.columns.filter((o) => !o.hideOnMobile));
|
|
1684
|
+
return (o, w) => (s(), a("div", Ls, [
|
|
1685
|
+
l("div", Os, [
|
|
1686
|
+
(s(!0), a(Y, null, N(u.value, (i, v) => (s(), a("div", {
|
|
1687
|
+
key: `card-${v}`,
|
|
1654
1688
|
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
1655
1689
|
}, [
|
|
1656
|
-
(s(!0),
|
|
1657
|
-
key: `card-${
|
|
1690
|
+
(s(!0), a(Y, null, N(d.value, (b) => (s(), a("div", {
|
|
1691
|
+
key: `card-${v}-${b.key}`,
|
|
1658
1692
|
class: "flex flex-col gap-1 py-1"
|
|
1659
1693
|
}, [
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
V(
|
|
1663
|
-
value: i[
|
|
1694
|
+
l("span", Fs, k(b.label), 1),
|
|
1695
|
+
l("span", As, [
|
|
1696
|
+
V(o.$slots, `cell-${b.key}`, {
|
|
1697
|
+
value: i[b.key],
|
|
1664
1698
|
row: i
|
|
1665
1699
|
}, () => [
|
|
1666
|
-
|
|
1700
|
+
R(k(i[b.key]), 1)
|
|
1667
1701
|
], !0)
|
|
1668
1702
|
])
|
|
1669
1703
|
]))), 128))
|
|
1670
1704
|
]))), 128)),
|
|
1671
|
-
u.value.length === 0 ? (s(),
|
|
1672
|
-
V(
|
|
1673
|
-
|
|
1705
|
+
u.value.length === 0 ? (s(), a("div", Ps, [
|
|
1706
|
+
V(o.$slots, "empty", {}, () => [
|
|
1707
|
+
w[0] || (w[0] = R("No hay datos disponibles", -1))
|
|
1674
1708
|
], !0)
|
|
1675
|
-
])) :
|
|
1709
|
+
])) : x("", !0)
|
|
1676
1710
|
]),
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1711
|
+
l("div", Ys, [
|
|
1712
|
+
l("table", Es, [
|
|
1713
|
+
l("thead", qs, [
|
|
1714
|
+
l("tr", {
|
|
1681
1715
|
class: f([
|
|
1682
1716
|
"w-full",
|
|
1683
|
-
|
|
1717
|
+
g.headerClass || "bg-neutral-50 border-b border-gray-100"
|
|
1684
1718
|
])
|
|
1685
1719
|
}, [
|
|
1686
|
-
(s(!0),
|
|
1720
|
+
(s(!0), a(Y, null, N(t.columns, (i) => (s(), a("th", {
|
|
1687
1721
|
key: i.key,
|
|
1688
|
-
style:
|
|
1722
|
+
style: U(i.width ? { width: i.width } : {}),
|
|
1689
1723
|
class: f([
|
|
1690
1724
|
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
1691
1725
|
i.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
1692
|
-
|
|
1726
|
+
g.headerCellClass
|
|
1693
1727
|
]),
|
|
1694
|
-
onClick: (
|
|
1728
|
+
onClick: (v) => i.sortable && r(i.key)
|
|
1695
1729
|
}, [
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
i.sortable ? (s(),
|
|
1699
|
-
e.value !== i.key ? (s(),
|
|
1700
|
-
])) :
|
|
1730
|
+
l("div", Ws, [
|
|
1731
|
+
l("span", null, k(i.label), 1),
|
|
1732
|
+
i.sortable ? (s(), a("span", Ns, [
|
|
1733
|
+
e.value !== i.key ? (s(), a("span", _s, "⇅")) : (s(), a("span", Hs, k(p.value === "asc" ? "↑" : "↓"), 1))
|
|
1734
|
+
])) : x("", !0)
|
|
1701
1735
|
])
|
|
1702
|
-
], 14,
|
|
1736
|
+
], 14, Rs))), 128))
|
|
1703
1737
|
], 2)
|
|
1704
1738
|
]),
|
|
1705
|
-
|
|
1706
|
-
(s(!0),
|
|
1707
|
-
key:
|
|
1739
|
+
l("tbody", Ks, [
|
|
1740
|
+
(s(!0), a(Y, null, N(u.value, (i, v) => (s(), a("tr", {
|
|
1741
|
+
key: v,
|
|
1708
1742
|
class: f([
|
|
1709
1743
|
"w-full border-b border-gray-200 hover:bg-gray-50 transition-colors",
|
|
1710
|
-
|
|
1744
|
+
g.rowClass
|
|
1711
1745
|
])
|
|
1712
1746
|
}, [
|
|
1713
|
-
(s(!0),
|
|
1714
|
-
key: `${
|
|
1747
|
+
(s(!0), a(Y, null, N(t.columns, (b) => (s(), a("td", {
|
|
1748
|
+
key: `${v}-${b.key}`,
|
|
1715
1749
|
class: f([
|
|
1716
1750
|
"px-4 py-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
|
|
1717
|
-
|
|
1751
|
+
g.cellClass
|
|
1718
1752
|
])
|
|
1719
1753
|
}, [
|
|
1720
|
-
V(
|
|
1721
|
-
value: i[
|
|
1754
|
+
V(o.$slots, `cell-${b.key}`, {
|
|
1755
|
+
value: i[b.key],
|
|
1722
1756
|
row: i
|
|
1723
1757
|
}, () => [
|
|
1724
|
-
|
|
1758
|
+
R(k(i[b.key]), 1)
|
|
1725
1759
|
], !0)
|
|
1726
1760
|
], 2))), 128))
|
|
1727
1761
|
], 2))), 128))
|
|
1728
1762
|
])
|
|
1729
1763
|
]),
|
|
1730
|
-
u.value.length === 0 ? (s(),
|
|
1731
|
-
V(
|
|
1732
|
-
|
|
1764
|
+
u.value.length === 0 ? (s(), a("div", Us, [
|
|
1765
|
+
V(o.$slots, "empty", {}, () => [
|
|
1766
|
+
w[1] || (w[1] = R("No hay datos disponibles", -1))
|
|
1733
1767
|
], !0)
|
|
1734
|
-
])) :
|
|
1768
|
+
])) : x("", !0)
|
|
1735
1769
|
]),
|
|
1736
|
-
|
|
1737
|
-
V(
|
|
1738
|
-
])) :
|
|
1770
|
+
o.$slots.footer ? (s(), a("div", Js, [
|
|
1771
|
+
V(o.$slots, "footer", {}, void 0, !0)
|
|
1772
|
+
])) : x("", !0)
|
|
1739
1773
|
]));
|
|
1740
1774
|
}
|
|
1741
|
-
}),
|
|
1775
|
+
}), Ta = /* @__PURE__ */ K(Gs, [["__scopeId", "data-v-8e7ce66d"]]), Qs = { class: "tabs-wrapper" }, Zs = {
|
|
1742
1776
|
class: "tabs-container",
|
|
1743
1777
|
role: "tablist"
|
|
1744
|
-
},
|
|
1778
|
+
}, Xs = ["aria-selected", "onClick"], ea = "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", ta = "text-primary-600 border-primary-600 font-semibold", sa = "hover:text-secondary-700 border-transparent font-normal", aa = /* @__PURE__ */ E({
|
|
1745
1779
|
__name: "Tabs",
|
|
1746
1780
|
props: {
|
|
1747
1781
|
modelValue: {},
|
|
@@ -1750,42 +1784,42 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1750
1784
|
contentClass: {}
|
|
1751
1785
|
},
|
|
1752
1786
|
emits: ["update:modelValue"],
|
|
1753
|
-
setup(t, { emit:
|
|
1754
|
-
const e = t,
|
|
1755
|
-
|
|
1756
|
-
},
|
|
1757
|
-
() => e.tabs.find((
|
|
1787
|
+
setup(t, { emit: g }) {
|
|
1788
|
+
const e = t, p = g, r = (w) => e.modelValue === w, u = (w) => {
|
|
1789
|
+
r(w) || p("update:modelValue", w);
|
|
1790
|
+
}, d = n(() => e.modelValue), o = n(
|
|
1791
|
+
() => e.tabs.find((w) => w.value === d.value)
|
|
1758
1792
|
);
|
|
1759
|
-
return (
|
|
1760
|
-
|
|
1793
|
+
return (w, i) => (s(), a("div", Qs, [
|
|
1794
|
+
l("div", {
|
|
1761
1795
|
class: f(["tabs-header", t.headerClass])
|
|
1762
1796
|
}, [
|
|
1763
|
-
|
|
1764
|
-
(s(!0),
|
|
1765
|
-
key:
|
|
1797
|
+
l("div", Zs, [
|
|
1798
|
+
(s(!0), a(Y, null, N(t.tabs, (v) => (s(), a("button", {
|
|
1799
|
+
key: v.value,
|
|
1766
1800
|
type: "button",
|
|
1767
1801
|
class: f([
|
|
1768
|
-
|
|
1769
|
-
|
|
1802
|
+
ea,
|
|
1803
|
+
r(v.value) ? ta : sa
|
|
1770
1804
|
]),
|
|
1771
|
-
"aria-selected":
|
|
1805
|
+
"aria-selected": r(v.value),
|
|
1772
1806
|
role: "tab",
|
|
1773
|
-
onClick: (
|
|
1774
|
-
},
|
|
1807
|
+
onClick: (b) => u(v.value)
|
|
1808
|
+
}, k(v.label), 11, Xs))), 128))
|
|
1775
1809
|
])
|
|
1776
1810
|
], 2),
|
|
1777
|
-
|
|
1811
|
+
l("div", {
|
|
1778
1812
|
class: f(["tabs-content", t.contentClass]),
|
|
1779
1813
|
role: "tabpanel"
|
|
1780
1814
|
}, [
|
|
1781
|
-
V(
|
|
1782
|
-
active:
|
|
1783
|
-
tab:
|
|
1815
|
+
V(w.$slots, d.value, {
|
|
1816
|
+
active: d.value,
|
|
1817
|
+
tab: o.value
|
|
1784
1818
|
}, void 0, !0)
|
|
1785
1819
|
], 2)
|
|
1786
1820
|
]));
|
|
1787
1821
|
}
|
|
1788
|
-
}),
|
|
1822
|
+
}), Sa = /* @__PURE__ */ K(aa, [["__scopeId", "data-v-c7c56f28"]]), la = "font-sans", ja = /* @__PURE__ */ E({
|
|
1789
1823
|
__name: "Text",
|
|
1790
1824
|
props: {
|
|
1791
1825
|
variant: { default: "body1" },
|
|
@@ -1797,7 +1831,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1797
1831
|
weight: {}
|
|
1798
1832
|
},
|
|
1799
1833
|
setup(t) {
|
|
1800
|
-
const
|
|
1834
|
+
const g = {
|
|
1801
1835
|
h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
|
|
1802
1836
|
h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
|
|
1803
1837
|
h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
|
|
@@ -1837,12 +1871,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1837
1871
|
button3: "span",
|
|
1838
1872
|
caption: "span",
|
|
1839
1873
|
overline: "span"
|
|
1840
|
-
},
|
|
1874
|
+
}, p = {
|
|
1841
1875
|
left: "text-left",
|
|
1842
1876
|
center: "text-center",
|
|
1843
1877
|
right: "text-right",
|
|
1844
1878
|
justify: "text-justify"
|
|
1845
|
-
},
|
|
1879
|
+
}, r = {
|
|
1846
1880
|
default: "text-secondary-900",
|
|
1847
1881
|
muted: "text-secondary-600",
|
|
1848
1882
|
primary: "text-primary-600",
|
|
@@ -1857,38 +1891,45 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1857
1891
|
semibold: "font-semibold",
|
|
1858
1892
|
bold: "font-bold",
|
|
1859
1893
|
extrabold: "font-extrabold"
|
|
1860
|
-
},
|
|
1861
|
-
|
|
1894
|
+
}, d = t, o = n(() => d.variant), w = n(() => d.align), i = n(() => d.as || e[o.value] || "span"), v = n(() => d.color && d.color.startsWith("#")), b = n(() => v.value ? "" : r[d.color] || r.default), S = n(() => v.value ? { color: d.color } : {}), I = n(() => d.weight ? { fontWeight: {
|
|
1895
|
+
light: 300,
|
|
1896
|
+
normal: 400,
|
|
1897
|
+
medium: 500,
|
|
1898
|
+
semibold: 600,
|
|
1899
|
+
bold: 700,
|
|
1900
|
+
extrabold: 800
|
|
1901
|
+
}[d.weight] } : {}), F = n(() => d.weight ? u[d.weight] : "");
|
|
1902
|
+
return (j, T) => (s(), Z(ge(i.value), {
|
|
1862
1903
|
class: f([
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1904
|
+
la,
|
|
1905
|
+
g[o.value],
|
|
1906
|
+
b.value,
|
|
1907
|
+
p[w.value],
|
|
1908
|
+
F.value,
|
|
1868
1909
|
{
|
|
1869
|
-
uppercase: t.uppercase ||
|
|
1910
|
+
uppercase: t.uppercase || o.value === "overline",
|
|
1870
1911
|
truncate: t.truncate
|
|
1871
1912
|
}
|
|
1872
1913
|
]),
|
|
1873
|
-
style:
|
|
1914
|
+
style: U([S.value, I.value])
|
|
1874
1915
|
}, {
|
|
1875
1916
|
default: ae(() => [
|
|
1876
|
-
V(
|
|
1917
|
+
V(j.$slots, "default")
|
|
1877
1918
|
]),
|
|
1878
1919
|
_: 3
|
|
1879
1920
|
}, 8, ["class", "style"]));
|
|
1880
1921
|
}
|
|
1881
|
-
}),
|
|
1922
|
+
}), oa = { class: "w-full flex items-center justify-between gap-3 py-2" }, na = {
|
|
1882
1923
|
key: 0,
|
|
1883
1924
|
class: "text-xs text-secondary-600"
|
|
1884
|
-
},
|
|
1925
|
+
}, ra = { key: 0 }, ia = {
|
|
1885
1926
|
class: "ml-auto inline-flex items-center gap-1",
|
|
1886
1927
|
role: "navigation",
|
|
1887
1928
|
"aria-label": "Pagination"
|
|
1888
|
-
},
|
|
1929
|
+
}, da = ["disabled"], ua = {
|
|
1889
1930
|
key: 0,
|
|
1890
1931
|
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text-secondary-500"
|
|
1891
|
-
},
|
|
1932
|
+
}, ca = ["aria-label", "onClick"], fa = ["disabled"], pa = /* @__PURE__ */ E({
|
|
1892
1933
|
__name: "Pagination",
|
|
1893
1934
|
props: {
|
|
1894
1935
|
modelValue: { default: 1 },
|
|
@@ -1901,77 +1942,153 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1901
1942
|
itemLabel: { default: "" }
|
|
1902
1943
|
},
|
|
1903
1944
|
emits: ["update:modelValue", "change"],
|
|
1904
|
-
setup(t, { emit:
|
|
1905
|
-
const e = t,
|
|
1906
|
-
const
|
|
1907
|
-
return
|
|
1908
|
-
}), u =
|
|
1909
|
-
const
|
|
1910
|
-
return
|
|
1911
|
-
}),
|
|
1912
|
-
const
|
|
1913
|
-
if (
|
|
1914
|
-
return Array.from({ length:
|
|
1915
|
-
const
|
|
1916
|
-
let j = Math.max(1,
|
|
1917
|
-
j = Math.max(1, Math.min(j,
|
|
1918
|
-
const
|
|
1919
|
-
j > 1 && (
|
|
1920
|
-
for (let
|
|
1921
|
-
|
|
1922
|
-
return
|
|
1945
|
+
setup(t, { emit: g }) {
|
|
1946
|
+
const e = t, p = g, r = n(() => {
|
|
1947
|
+
const b = Math.ceil(e.totalItems / e.pageSize);
|
|
1948
|
+
return b > 0 ? b : 1;
|
|
1949
|
+
}), u = n(() => {
|
|
1950
|
+
const b = Number(e.modelValue || 1);
|
|
1951
|
+
return b < 1 ? 1 : b > r.value ? r.value : b;
|
|
1952
|
+
}), d = n(() => e.totalItems === 0 ? 0 : (u.value - 1) * e.pageSize + 1), o = n(() => Math.min(u.value * e.pageSize, e.totalItems)), w = n(() => `Mostrando ${d.value} a ${o.value} de ${e.totalItems}`), i = n(() => {
|
|
1953
|
+
const b = r.value, S = Math.max(3, e.maxPages), I = u.value;
|
|
1954
|
+
if (b <= S)
|
|
1955
|
+
return Array.from({ length: b }, (m, $) => $ + 1);
|
|
1956
|
+
const F = Math.floor(S / 2);
|
|
1957
|
+
let j = Math.max(1, I - F), T = Math.min(b, j + S - 1);
|
|
1958
|
+
j = Math.max(1, Math.min(j, T - S + 1));
|
|
1959
|
+
const y = [];
|
|
1960
|
+
j > 1 && (y.push(1), j > 2 && y.push("…"));
|
|
1961
|
+
for (let m = j; m <= T; m++)
|
|
1962
|
+
y.push(m);
|
|
1963
|
+
return T < b && (T < b - 1 && y.push("…"), y.push(b)), y;
|
|
1923
1964
|
});
|
|
1924
|
-
function
|
|
1925
|
-
const
|
|
1926
|
-
|
|
1965
|
+
function v(b) {
|
|
1966
|
+
const S = Math.max(1, Math.min(b, r.value));
|
|
1967
|
+
S !== u.value && (p("update:modelValue", S), p("change", S));
|
|
1927
1968
|
}
|
|
1928
|
-
return (
|
|
1929
|
-
t.showSummary ? (s(),
|
|
1930
|
-
V(
|
|
1931
|
-
start:
|
|
1932
|
-
end:
|
|
1969
|
+
return (b, S) => (s(), a("div", oa, [
|
|
1970
|
+
t.showSummary ? (s(), a("div", na, [
|
|
1971
|
+
V(b.$slots, "summary", {
|
|
1972
|
+
start: d.value,
|
|
1973
|
+
end: o.value,
|
|
1933
1974
|
total: t.totalItems
|
|
1934
1975
|
}, () => [
|
|
1935
|
-
|
|
1936
|
-
t.itemLabel ? (s(),
|
|
1976
|
+
R(k(w.value), 1),
|
|
1977
|
+
t.itemLabel ? (s(), a("span", ra, k(t.itemLabel), 1)) : x("", !0)
|
|
1937
1978
|
], !0)
|
|
1938
|
-
])) :
|
|
1939
|
-
|
|
1940
|
-
|
|
1979
|
+
])) : x("", !0),
|
|
1980
|
+
l("nav", ia, [
|
|
1981
|
+
l("button", {
|
|
1941
1982
|
type: "button",
|
|
1942
1983
|
class: "h-8 px-3 rounded-full text-sm font-semibold text-secondary-700 hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1943
1984
|
disabled: u.value <= 1,
|
|
1944
|
-
onClick:
|
|
1985
|
+
onClick: S[0] || (S[0] = (I) => v(u.value - 1)),
|
|
1945
1986
|
"aria-label": "Anterior"
|
|
1946
|
-
},
|
|
1947
|
-
(s(!0),
|
|
1948
|
-
key: `page-${
|
|
1987
|
+
}, k(t.previousText), 9, da),
|
|
1988
|
+
(s(!0), a(Y, null, N(i.value, (I, F) => (s(), a(Y, {
|
|
1989
|
+
key: `page-${F}-${I}`
|
|
1949
1990
|
}, [
|
|
1950
|
-
|
|
1991
|
+
I === "…" ? (s(), a("span", ua, " … ")) : (s(), a("button", {
|
|
1951
1992
|
key: 1,
|
|
1952
1993
|
type: "button",
|
|
1953
|
-
"aria-label": `Página ${
|
|
1994
|
+
"aria-label": `Página ${I}`,
|
|
1954
1995
|
class: f([
|
|
1955
1996
|
"h-8 min-w-8 px-3 rounded-full text-sm font-semibold transition-colors",
|
|
1956
|
-
|
|
1997
|
+
I === u.value ? "bg-primary-500 text-white" : "text-secondary-700 hover:bg-secondary-100"
|
|
1957
1998
|
]),
|
|
1958
|
-
onClick: (j) =>
|
|
1959
|
-
},
|
|
1999
|
+
onClick: (j) => v(I)
|
|
2000
|
+
}, k(I), 11, ca))
|
|
1960
2001
|
], 64))), 128)),
|
|
1961
|
-
|
|
2002
|
+
l("button", {
|
|
1962
2003
|
type: "button",
|
|
1963
2004
|
class: "h-8 px-3 rounded-full text-sm font-semibold text-secondary-700 hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1964
|
-
disabled: u.value >=
|
|
1965
|
-
onClick:
|
|
2005
|
+
disabled: u.value >= r.value,
|
|
2006
|
+
onClick: S[1] || (S[1] = (I) => v(u.value + 1)),
|
|
1966
2007
|
"aria-label": "Siguiente"
|
|
1967
|
-
},
|
|
2008
|
+
}, k(t.nextText), 9, fa)
|
|
1968
2009
|
])
|
|
1969
2010
|
]));
|
|
1970
2011
|
}
|
|
1971
|
-
}),
|
|
2012
|
+
}), La = /* @__PURE__ */ K(pa, [["__scopeId", "data-v-87417cc4"]]), Oa = /* @__PURE__ */ E({
|
|
2013
|
+
__name: "Tooltip",
|
|
2014
|
+
props: {
|
|
2015
|
+
content: { default: "" },
|
|
2016
|
+
position: { default: "top" },
|
|
2017
|
+
backgroundColor: { default: "bg-gray-900" },
|
|
2018
|
+
textColor: { default: "text-white" },
|
|
2019
|
+
size: { default: "md" }
|
|
2020
|
+
},
|
|
2021
|
+
setup(t) {
|
|
2022
|
+
const g = t, e = L(!1), p = {
|
|
2023
|
+
sm: "px-2 py-1 text-xs",
|
|
2024
|
+
md: "px-3 py-2 text-sm",
|
|
2025
|
+
lg: "px-4 py-3 text-base"
|
|
2026
|
+
}, r = {
|
|
2027
|
+
// Deja un pequeño espacio entre el activador y el tooltip
|
|
2028
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
2029
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
2030
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
2031
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-2"
|
|
2032
|
+
}, u = n(() => `absolute w-0 h-0 border-solid border-4 border-transparent ${{
|
|
2033
|
+
top: "bottom-[-8px] rotate-180 left-1/2 -translate-x-1/2",
|
|
2034
|
+
bottom: "top-[-8px] rotate-180 left-1/2 -translate-x-1/2",
|
|
2035
|
+
left: "right-[-8px] rotate-180 top-1/2 -translate-y-1/2",
|
|
2036
|
+
right: "left-[-8px] rotate-180 top-1/2 -translate-y-1/2"
|
|
2037
|
+
}[g.position]}`), d = n(() => ({
|
|
2038
|
+
"bg-gray-900": "#111827",
|
|
2039
|
+
"bg-primary-500": "#0ea5e9",
|
|
2040
|
+
"bg-green-600": "#16a34a",
|
|
2041
|
+
"bg-yellow-600": "#ca8a04",
|
|
2042
|
+
"bg-danger-600": "#dc2626"
|
|
2043
|
+
})[g.backgroundColor] || "#111827"), o = n(() => ({
|
|
2044
|
+
// Orden: top, right, bottom, left
|
|
2045
|
+
top: `transparent transparent ${d.value} transparent`,
|
|
2046
|
+
// tooltip arriba → flecha apunta hacia abajo (borde inferior coloreado)
|
|
2047
|
+
bottom: `${d.value} transparent transparent transparent`,
|
|
2048
|
+
// tooltip abajo → flecha apunta hacia arriba (borde superior coloreado)
|
|
2049
|
+
left: `transparent ${d.value} transparent transparent`,
|
|
2050
|
+
// tooltip a la izquierda → flecha apunta hacia la derecha (borde derecho coloreado)
|
|
2051
|
+
right: `transparent transparent transparent ${d.value}`
|
|
2052
|
+
// tooltip a la derecha → flecha apunta hacia la izquierda (borde izquierdo coloreado)
|
|
2053
|
+
})[g.position]), w = n(() => `absolute ${r[g.position]} ${g.textColor} ${p[g.size]} rounded-md shadow-lg whitespace-nowrap z-50`);
|
|
2054
|
+
return (i, v) => (s(), a("div", {
|
|
2055
|
+
class: "relative inline-flex",
|
|
2056
|
+
onMouseenter: v[0] || (v[0] = (b) => e.value = !0),
|
|
2057
|
+
onMouseleave: v[1] || (v[1] = (b) => e.value = !1)
|
|
2058
|
+
}, [
|
|
2059
|
+
V(i.$slots, "default"),
|
|
2060
|
+
G(ne, {
|
|
2061
|
+
"enter-active-class": "transition-opacity duration-200",
|
|
2062
|
+
"enter-from-class": "opacity-0",
|
|
2063
|
+
"enter-to-class": "opacity-100",
|
|
2064
|
+
"leave-active-class": "transition-opacity duration-200",
|
|
2065
|
+
"leave-from-class": "opacity-100",
|
|
2066
|
+
"leave-to-class": "opacity-0"
|
|
2067
|
+
}, {
|
|
2068
|
+
default: ae(() => [
|
|
2069
|
+
e.value ? (s(), a("div", {
|
|
2070
|
+
key: 0,
|
|
2071
|
+
class: f(w.value),
|
|
2072
|
+
style: U({ backgroundColor: d.value }),
|
|
2073
|
+
role: "tooltip"
|
|
2074
|
+
}, [
|
|
2075
|
+
V(i.$slots, "content", {}, () => [
|
|
2076
|
+
R(k(t.content), 1)
|
|
2077
|
+
]),
|
|
2078
|
+
l("div", {
|
|
2079
|
+
class: f(u.value),
|
|
2080
|
+
style: U({ borderColor: o.value })
|
|
2081
|
+
}, null, 6)
|
|
2082
|
+
], 6)) : x("", !0)
|
|
2083
|
+
]),
|
|
2084
|
+
_: 3
|
|
2085
|
+
})
|
|
2086
|
+
], 32));
|
|
2087
|
+
}
|
|
2088
|
+
}), va = ["data-node-id"], ga = { class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center" }, ba = {
|
|
1972
2089
|
key: 1,
|
|
1973
2090
|
class: "flex justify-end gap-1 px-6 pb-6 pt-4"
|
|
1974
|
-
},
|
|
2091
|
+
}, Fa = /* @__PURE__ */ E({
|
|
1975
2092
|
__name: "Alert",
|
|
1976
2093
|
props: {
|
|
1977
2094
|
variant: {},
|
|
@@ -1984,10 +2101,10 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1984
2101
|
stackOn: {}
|
|
1985
2102
|
},
|
|
1986
2103
|
emits: ["close", "accept", "cancel"],
|
|
1987
|
-
setup(t, { emit:
|
|
1988
|
-
const e =
|
|
1989
|
-
if (
|
|
1990
|
-
switch (
|
|
2104
|
+
setup(t, { emit: g }) {
|
|
2105
|
+
const e = g, p = t, r = n(() => p.variant ?? "info"), u = n(() => p.multiline ?? !1), d = n(() => p.actions ?? !1), o = n(() => p.nodeId ?? void 0), w = () => e("close"), i = n(() => {
|
|
2106
|
+
if (p.title) return p.title;
|
|
2107
|
+
switch (r.value) {
|
|
1991
2108
|
case "info":
|
|
1992
2109
|
return "Alerta de información";
|
|
1993
2110
|
case "warning":
|
|
@@ -1997,8 +2114,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1997
2114
|
case "error":
|
|
1998
2115
|
return "Alerta de error";
|
|
1999
2116
|
}
|
|
2000
|
-
}),
|
|
2001
|
-
switch (
|
|
2117
|
+
}), v = n(() => p.description ?? ""), b = n(() => {
|
|
2118
|
+
switch (r.value) {
|
|
2002
2119
|
case "info":
|
|
2003
2120
|
return {
|
|
2004
2121
|
border: "border-[var(--semantica/info,#0064ff)]",
|
|
@@ -2024,32 +2141,32 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2024
2141
|
icon: "text-[#ff4235]"
|
|
2025
2142
|
};
|
|
2026
2143
|
}
|
|
2027
|
-
}),
|
|
2028
|
-
const
|
|
2029
|
-
if (!
|
|
2030
|
-
const
|
|
2031
|
-
return `${
|
|
2032
|
-
}),
|
|
2033
|
-
if (!
|
|
2034
|
-
const
|
|
2035
|
-
return `flex-col ${
|
|
2036
|
-
}), j =
|
|
2037
|
-
return (
|
|
2144
|
+
}), S = n(() => "bg-[var(--color-primario/700,#269ea4)]"), I = n(() => {
|
|
2145
|
+
const T = "flex w-full items-start gap-4 flex-col";
|
|
2146
|
+
if (!p.stackOn) return `${T} sm:flex-row sm:items-center`;
|
|
2147
|
+
const y = p.stackOn, m = `${y}:flex-row ${y}:items-center`;
|
|
2148
|
+
return `${T} ${m}`;
|
|
2149
|
+
}), F = n(() => {
|
|
2150
|
+
if (!p.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
|
|
2151
|
+
const T = p.stackOn;
|
|
2152
|
+
return `flex-col ${T}:flex-row items-start ${T}:items-center`;
|
|
2153
|
+
}), j = n(() => p.stackOn ? `self-start ${p.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
2154
|
+
return (T, y) => (s(), a("div", {
|
|
2038
2155
|
class: f(["relative w-full rounded-xl border", [
|
|
2039
|
-
|
|
2040
|
-
|
|
2156
|
+
b.value.border,
|
|
2157
|
+
b.value.bg
|
|
2041
2158
|
]]),
|
|
2042
2159
|
role: "alert",
|
|
2043
|
-
"data-node-id":
|
|
2160
|
+
"data-node-id": o.value
|
|
2044
2161
|
}, [
|
|
2045
|
-
t.closable ? (s(),
|
|
2162
|
+
t.closable ? (s(), a("button", {
|
|
2046
2163
|
key: 0,
|
|
2047
2164
|
type: "button",
|
|
2048
2165
|
class: "absolute top-3 right-3 text-[color:var(--neutrales/texto-principal,#565656)]/70 hover:opacity-100 opacity-70",
|
|
2049
2166
|
"aria-label": "Cerrar",
|
|
2050
|
-
onClick:
|
|
2051
|
-
}, [...
|
|
2052
|
-
|
|
2167
|
+
onClick: w
|
|
2168
|
+
}, [...y[2] || (y[2] = [
|
|
2169
|
+
l("svg", {
|
|
2053
2170
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2054
2171
|
width: "18",
|
|
2055
2172
|
height: "18",
|
|
@@ -2060,119 +2177,119 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2060
2177
|
"stroke-linecap": "round",
|
|
2061
2178
|
"stroke-linejoin": "round"
|
|
2062
2179
|
}, [
|
|
2063
|
-
|
|
2180
|
+
l("line", {
|
|
2064
2181
|
x1: "18",
|
|
2065
2182
|
y1: "6",
|
|
2066
2183
|
x2: "6",
|
|
2067
2184
|
y2: "18"
|
|
2068
2185
|
}),
|
|
2069
|
-
|
|
2186
|
+
l("line", {
|
|
2070
2187
|
x1: "6",
|
|
2071
2188
|
y1: "6",
|
|
2072
2189
|
x2: "18",
|
|
2073
2190
|
y2: "18"
|
|
2074
2191
|
})
|
|
2075
2192
|
], -1)
|
|
2076
|
-
])])) :
|
|
2077
|
-
|
|
2078
|
-
class: f(["p-6", { "pb-0":
|
|
2193
|
+
])])) : x("", !0),
|
|
2194
|
+
l("div", {
|
|
2195
|
+
class: f(["p-6", { "pb-0": d.value }])
|
|
2079
2196
|
}, [
|
|
2080
|
-
|
|
2081
|
-
class: f(
|
|
2197
|
+
l("div", {
|
|
2198
|
+
class: f(I.value)
|
|
2082
2199
|
}, [
|
|
2083
|
-
|
|
2084
|
-
|
|
2200
|
+
l("div", ga, [
|
|
2201
|
+
r.value === "info" ? (s(), a("svg", {
|
|
2085
2202
|
key: 0,
|
|
2086
2203
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2087
2204
|
width: "24",
|
|
2088
2205
|
height: "24",
|
|
2089
2206
|
viewBox: "0 0 24 24",
|
|
2090
2207
|
fill: "none",
|
|
2091
|
-
class: f(
|
|
2208
|
+
class: f(b.value.icon),
|
|
2092
2209
|
stroke: "currentColor",
|
|
2093
2210
|
"stroke-width": "2",
|
|
2094
2211
|
"stroke-linecap": "round",
|
|
2095
2212
|
"stroke-linejoin": "round"
|
|
2096
|
-
}, [...
|
|
2097
|
-
|
|
2213
|
+
}, [...y[3] || (y[3] = [
|
|
2214
|
+
l("circle", {
|
|
2098
2215
|
cx: "12",
|
|
2099
2216
|
cy: "12",
|
|
2100
2217
|
r: "10"
|
|
2101
2218
|
}, null, -1),
|
|
2102
|
-
|
|
2219
|
+
l("line", {
|
|
2103
2220
|
x1: "12",
|
|
2104
2221
|
y1: "16",
|
|
2105
2222
|
x2: "12",
|
|
2106
2223
|
y2: "12"
|
|
2107
2224
|
}, null, -1),
|
|
2108
|
-
|
|
2225
|
+
l("line", {
|
|
2109
2226
|
x1: "12",
|
|
2110
2227
|
y1: "8",
|
|
2111
2228
|
x2: "12",
|
|
2112
2229
|
y2: "8"
|
|
2113
2230
|
}, null, -1)
|
|
2114
|
-
])], 2)) :
|
|
2231
|
+
])], 2)) : r.value === "warning" ? (s(), a("svg", {
|
|
2115
2232
|
key: 1,
|
|
2116
2233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2117
2234
|
width: "24",
|
|
2118
2235
|
height: "24",
|
|
2119
2236
|
viewBox: "0 0 24 24",
|
|
2120
2237
|
fill: "none",
|
|
2121
|
-
class: f(
|
|
2238
|
+
class: f(b.value.icon),
|
|
2122
2239
|
stroke: "currentColor",
|
|
2123
2240
|
"stroke-width": "2",
|
|
2124
2241
|
"stroke-linecap": "round",
|
|
2125
2242
|
"stroke-linejoin": "round"
|
|
2126
|
-
}, [...
|
|
2127
|
-
|
|
2128
|
-
|
|
2243
|
+
}, [...y[4] || (y[4] = [
|
|
2244
|
+
l("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }, null, -1),
|
|
2245
|
+
l("line", {
|
|
2129
2246
|
x1: "12",
|
|
2130
2247
|
y1: "9",
|
|
2131
2248
|
x2: "12",
|
|
2132
2249
|
y2: "13"
|
|
2133
2250
|
}, null, -1),
|
|
2134
|
-
|
|
2251
|
+
l("line", {
|
|
2135
2252
|
x1: "12",
|
|
2136
2253
|
y1: "17",
|
|
2137
2254
|
x2: "12",
|
|
2138
2255
|
y2: "17"
|
|
2139
2256
|
}, null, -1)
|
|
2140
|
-
])], 2)) :
|
|
2257
|
+
])], 2)) : r.value === "success" ? (s(), a("svg", {
|
|
2141
2258
|
key: 2,
|
|
2142
2259
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2143
2260
|
width: "24",
|
|
2144
2261
|
height: "24",
|
|
2145
2262
|
viewBox: "0 0 24 24",
|
|
2146
2263
|
fill: "none",
|
|
2147
|
-
class: f(
|
|
2264
|
+
class: f(b.value.icon),
|
|
2148
2265
|
stroke: "currentColor",
|
|
2149
2266
|
"stroke-width": "2",
|
|
2150
2267
|
"stroke-linecap": "round",
|
|
2151
2268
|
"stroke-linejoin": "round"
|
|
2152
|
-
}, [...
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
])], 2)) : (s(),
|
|
2269
|
+
}, [...y[5] || (y[5] = [
|
|
2270
|
+
l("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
2271
|
+
l("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
2272
|
+
])], 2)) : (s(), a("svg", {
|
|
2156
2273
|
key: 3,
|
|
2157
2274
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2158
2275
|
width: "24",
|
|
2159
2276
|
height: "24",
|
|
2160
2277
|
viewBox: "0 0 24 24",
|
|
2161
2278
|
fill: "none",
|
|
2162
|
-
class: f(
|
|
2279
|
+
class: f(b.value.icon),
|
|
2163
2280
|
stroke: "currentColor",
|
|
2164
2281
|
"stroke-width": "2",
|
|
2165
2282
|
"stroke-linecap": "round",
|
|
2166
2283
|
"stroke-linejoin": "round"
|
|
2167
|
-
}, [...
|
|
2168
|
-
|
|
2169
|
-
|
|
2284
|
+
}, [...y[6] || (y[6] = [
|
|
2285
|
+
l("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }, null, -1),
|
|
2286
|
+
l("line", {
|
|
2170
2287
|
x1: "12",
|
|
2171
2288
|
y1: "8",
|
|
2172
2289
|
x2: "12",
|
|
2173
2290
|
y2: "12"
|
|
2174
2291
|
}, null, -1),
|
|
2175
|
-
|
|
2292
|
+
l("line", {
|
|
2176
2293
|
x1: "12",
|
|
2177
2294
|
y1: "16",
|
|
2178
2295
|
x2: "12",
|
|
@@ -2180,61 +2297,62 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2180
2297
|
}, null, -1)
|
|
2181
2298
|
])], 2))
|
|
2182
2299
|
]),
|
|
2183
|
-
|
|
2184
|
-
class: f(["flex-1 flex gap-4 text-[14px]", [
|
|
2300
|
+
l("div", {
|
|
2301
|
+
class: f(["flex-1 flex gap-4 text-[14px]", [F.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !u.value, "whitespace-pre-wrap": u.value }]])
|
|
2185
2302
|
}, [
|
|
2186
|
-
|
|
2303
|
+
l("div", {
|
|
2187
2304
|
class: f(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", j.value])
|
|
2188
|
-
},
|
|
2189
|
-
|
|
2305
|
+
}, k(i.value), 3),
|
|
2306
|
+
l("div", {
|
|
2190
2307
|
class: f(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !u.value }])
|
|
2191
2308
|
}, [
|
|
2192
|
-
V(
|
|
2193
|
-
|
|
2309
|
+
V(T.$slots, "description", {}, () => [
|
|
2310
|
+
R(k(v.value), 1)
|
|
2194
2311
|
])
|
|
2195
2312
|
], 2)
|
|
2196
2313
|
], 2)
|
|
2197
2314
|
], 2)
|
|
2198
2315
|
], 2),
|
|
2199
|
-
|
|
2200
|
-
|
|
2316
|
+
d.value ? (s(), a("div", ba, [
|
|
2317
|
+
l("button", {
|
|
2201
2318
|
type: "button",
|
|
2202
2319
|
class: "px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
2203
|
-
onClick:
|
|
2320
|
+
onClick: y[0] || (y[0] = (m) => T.$emit("cancel"))
|
|
2204
2321
|
}, [
|
|
2205
|
-
V(
|
|
2206
|
-
|
|
2322
|
+
V(T.$slots, "cancel", {}, () => [
|
|
2323
|
+
y[7] || (y[7] = R("Cancelar", -1))
|
|
2207
2324
|
])
|
|
2208
2325
|
]),
|
|
2209
|
-
|
|
2326
|
+
l("button", {
|
|
2210
2327
|
type: "button",
|
|
2211
|
-
class: f(["px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-white",
|
|
2212
|
-
onClick:
|
|
2328
|
+
class: f(["px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-white", S.value]),
|
|
2329
|
+
onClick: y[1] || (y[1] = (m) => T.$emit("accept"))
|
|
2213
2330
|
}, [
|
|
2214
|
-
V(
|
|
2215
|
-
|
|
2331
|
+
V(T.$slots, "accept", {}, () => [
|
|
2332
|
+
y[8] || (y[8] = R("Aceptar", -1))
|
|
2216
2333
|
])
|
|
2217
2334
|
], 2)
|
|
2218
|
-
])) :
|
|
2219
|
-
], 10,
|
|
2335
|
+
])) : x("", !0)
|
|
2336
|
+
], 10, va));
|
|
2220
2337
|
}
|
|
2221
2338
|
});
|
|
2222
2339
|
export {
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2340
|
+
Fa as Alert,
|
|
2341
|
+
xa as AppBar,
|
|
2342
|
+
wa as Button,
|
|
2343
|
+
ka as Calendar,
|
|
2344
|
+
$a as Card,
|
|
2345
|
+
Ca as Dialog,
|
|
2346
|
+
Ma as FileUpload,
|
|
2347
|
+
te as Icon,
|
|
2348
|
+
Ba as Input,
|
|
2349
|
+
Da as Loader,
|
|
2350
|
+
za as Menu,
|
|
2351
|
+
La as Pagination,
|
|
2352
|
+
Va as Select,
|
|
2353
|
+
Ia as Sidebar,
|
|
2354
|
+
Ta as Table,
|
|
2355
|
+
Sa as Tabs,
|
|
2356
|
+
ja as Text,
|
|
2357
|
+
Oa as Tooltip
|
|
2240
2358
|
};
|