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