@iaclinical/components 1.0.23 → 1.0.25
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 +470 -468
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, computed as r, createElementBlock as l, openBlock as s, normalizeClass as
|
|
1
|
+
import { defineComponent as P, computed as r, createElementBlock as l, openBlock as s, normalizeClass as c, createElementVNode as o, createCommentVNode as m, renderSlot as V, toDisplayString as x, createBlock as ee, unref as _e, normalizeStyle as Q, ref as L, onMounted as $e, onUnmounted as Ce, watch as ve, createTextVNode as q, withModifiers as H, createVNode as G, withDirectives as ue, Fragment as E, renderList as W, vModelSelect as ke, Teleport as pe, Transition as ce, withCtx as ae, nextTick as fe, resolveDynamicComponent as Me, vModelText as Ae } from "vue";
|
|
2
2
|
import { Icon as Ee } from "@iconify/vue";
|
|
3
3
|
const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
4
4
|
key: 1,
|
|
@@ -21,8 +21,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
21
21
|
height: { default: "md" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["toggle-menu"],
|
|
24
|
-
setup(t, { emit:
|
|
25
|
-
const e = t,
|
|
24
|
+
setup(t, { emit: b }) {
|
|
25
|
+
const e = t, f = b, 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", v = {
|
|
27
27
|
default: "bg-primary-700 text-primary-50",
|
|
28
28
|
dark: "bg-secondary-900 text-white",
|
|
@@ -41,12 +41,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
41
41
|
].join(" ");
|
|
42
42
|
});
|
|
43
43
|
return (u, v) => (s(), l("header", {
|
|
44
|
-
class:
|
|
44
|
+
class: c(n.value)
|
|
45
45
|
}, [
|
|
46
46
|
o("div", Pe, [
|
|
47
47
|
t.showMenuButton ? (s(), l("button", {
|
|
48
48
|
key: 0,
|
|
49
|
-
onClick: v[0] || (v[0] = (a) =>
|
|
49
|
+
onClick: v[0] || (v[0] = (a) => f("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
|
}, [...v[1] || (v[1] = [
|
|
@@ -64,29 +64,29 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
64
64
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
65
65
|
})
|
|
66
66
|
], -1)
|
|
67
|
-
])])) :
|
|
68
|
-
t.title && t.titlePosition === "left" ? (s(), l("div", qe, x(t.title), 1)) :
|
|
67
|
+
])])) : m("", !0),
|
|
68
|
+
t.title && t.titlePosition === "left" ? (s(), l("div", qe, x(t.title), 1)) : m("", !0),
|
|
69
69
|
V(u.$slots, "left", {}, void 0, !0)
|
|
70
70
|
]),
|
|
71
71
|
o("div", Re, [
|
|
72
|
-
t.title && t.titlePosition === "center" ? (s(), l("div", Ne, x(t.title), 1)) :
|
|
72
|
+
t.title && t.titlePosition === "center" ? (s(), l("div", Ne, x(t.title), 1)) : m("", !0),
|
|
73
73
|
V(u.$slots, "center", {}, void 0, !0)
|
|
74
74
|
]),
|
|
75
75
|
o("div", We, [
|
|
76
|
-
t.title && t.titlePosition === "right" ? (s(), l("div", He, x(t.title), 1)) :
|
|
76
|
+
t.title && t.titlePosition === "right" ? (s(), l("div", He, x(t.title), 1)) : m("", !0),
|
|
77
77
|
V(u.$slots, "right", {}, void 0, !0)
|
|
78
78
|
])
|
|
79
79
|
], 2));
|
|
80
80
|
}
|
|
81
|
-
}), K = (t,
|
|
81
|
+
}), K = (t, b) => {
|
|
82
82
|
const e = t.__vccOpts || t;
|
|
83
|
-
for (const [
|
|
84
|
-
e[
|
|
83
|
+
for (const [f, n] of b)
|
|
84
|
+
e[f] = n;
|
|
85
85
|
return e;
|
|
86
|
-
},
|
|
86
|
+
}, ml = /* @__PURE__ */ K(Ke, [["__scopeId", "data-v-c5861315"]]), Ue = ["type", "disabled", "aria-label"], Je = {
|
|
87
87
|
key: 0,
|
|
88
88
|
class: "absolute top-0 right-0 inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-bold leading-none text-white transform translate-x-1/2 -translate-y-1/2 bg-danger-600 rounded-full min-w-[1.25rem]"
|
|
89
|
-
},
|
|
89
|
+
}, hl = /* @__PURE__ */ P({
|
|
90
90
|
__name: "Button",
|
|
91
91
|
props: {
|
|
92
92
|
variant: { default: "primary" },
|
|
@@ -100,8 +100,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
100
100
|
textColorHover: { default: void 0 }
|
|
101
101
|
},
|
|
102
102
|
emits: ["click"],
|
|
103
|
-
setup(t, { emit:
|
|
104
|
-
const e = t,
|
|
103
|
+
setup(t, { emit: b }) {
|
|
104
|
+
const e = t, f = b, n = r(() => e.variant === "icon"), u = r(() => e.badge > 99 ? "99+" : e.badge.toString()), v = r(() => {
|
|
105
105
|
const h = "inline-flex items-center justify-center font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", i = {
|
|
106
106
|
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
|
|
107
107
|
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 hover:text-secondary-800 focus-visible:ring-secondary-500",
|
|
@@ -114,7 +114,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
114
114
|
sm: n.value ? "p-1.5" : "h-8 px-3 text-sm",
|
|
115
115
|
md: n.value ? "p-2" : "h-10 px-4 text-base",
|
|
116
116
|
lg: n.value ? "p-3" : "h-12 px-6 text-lg"
|
|
117
|
-
},
|
|
117
|
+
}, g = {
|
|
118
118
|
full: "rounded-full",
|
|
119
119
|
xl: "rounded-2xl",
|
|
120
120
|
lg: "rounded-xl",
|
|
@@ -125,19 +125,19 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
125
125
|
var O, j;
|
|
126
126
|
return e.textColorHover ? e.textColorHover : (O = e.textColor) != null && O.includes("white") || (j = e.textColor) != null && j.includes("50") ? "hover:text-black" : "";
|
|
127
127
|
});
|
|
128
|
-
return `${h} ${i[e.variant]} ${p[e.size]} ${
|
|
128
|
+
return `${h} ${i[e.variant]} ${p[e.size]} ${g[e.radius]} ${T} ${B.value}`;
|
|
129
129
|
}), a = (h) => {
|
|
130
|
-
e.disabled ||
|
|
130
|
+
e.disabled || f("click", h);
|
|
131
131
|
};
|
|
132
132
|
return (h, i) => (s(), l("button", {
|
|
133
|
-
class:
|
|
133
|
+
class: c(v.value),
|
|
134
134
|
type: t.type,
|
|
135
135
|
disabled: t.disabled,
|
|
136
136
|
onClick: a,
|
|
137
137
|
"aria-label": t.ariaLabel
|
|
138
138
|
}, [
|
|
139
139
|
V(h.$slots, "default"),
|
|
140
|
-
n.value && t.badge && t.badge > 0 ? (s(), l("span", Je, x(u.value), 1)) :
|
|
140
|
+
n.value && t.badge && t.badge > 0 ? (s(), l("span", Je, x(u.value), 1)) : m("", !0)
|
|
141
141
|
], 10, Ue));
|
|
142
142
|
}
|
|
143
143
|
}), Ge = /* @__PURE__ */ P({
|
|
@@ -152,14 +152,14 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
152
152
|
ariaLabel: {}
|
|
153
153
|
},
|
|
154
154
|
setup(t) {
|
|
155
|
-
const
|
|
155
|
+
const b = 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
|
-
},
|
|
162
|
+
}, f = (a, h) => {
|
|
163
163
|
const i = a.replace(/_/g, "-");
|
|
164
164
|
switch (h) {
|
|
165
165
|
case "filled":
|
|
@@ -175,23 +175,23 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
175
175
|
default:
|
|
176
176
|
return `material-symbols:${i}`;
|
|
177
177
|
}
|
|
178
|
-
}, n = r(() =>
|
|
178
|
+
}, n = r(() => f(b.name, b.variant)), u = r(() => {
|
|
179
179
|
const a = [
|
|
180
180
|
"inline-flex items-center justify-center select-none",
|
|
181
181
|
"transition-transform duration-200"
|
|
182
182
|
];
|
|
183
|
-
return
|
|
183
|
+
return b.color && (b.color.startsWith("text-") || b.color.startsWith("fill-")) && a.push(b.color), b.spin && a.push("animate-spin"), a.join(" ");
|
|
184
184
|
}), v = r(() => {
|
|
185
185
|
const a = {};
|
|
186
|
-
if (e[
|
|
187
|
-
const h = `rotate(${
|
|
186
|
+
if (e[b.size] ? (a.fontSize = e[b.size], a.width = e[b.size], a.height = e[b.size]) : (a.fontSize = b.size, a.width = b.size, a.height = b.size), b.color && !b.color.startsWith("text-") && !b.color.startsWith("fill-") && (a.color = b.color), b.rotate !== 0) {
|
|
187
|
+
const h = `rotate(${b.rotate}deg)`;
|
|
188
188
|
a.transform = h;
|
|
189
189
|
}
|
|
190
190
|
return a;
|
|
191
191
|
});
|
|
192
|
-
return (a, h) => (s(), ee(
|
|
192
|
+
return (a, h) => (s(), ee(_e(Ee), {
|
|
193
193
|
icon: n.value,
|
|
194
|
-
class:
|
|
194
|
+
class: c(u.value),
|
|
195
195
|
style: Q(v.value),
|
|
196
196
|
"aria-label": t.ariaLabel,
|
|
197
197
|
role: t.ariaLabel ? "img" : void 0
|
|
@@ -215,14 +215,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
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" }, vt = ["value"], pt = ["value"],
|
|
218
|
+
}, ct = { class: "flex items-center justify-between mb-4" }, ft = { class: "flex items-center space-x-2" }, vt = ["value"], pt = ["value"], gt = { class: "grid grid-cols-7 gap-1 mb-2" }, bt = { class: "grid grid-cols-7 gap-1" }, yt = ["disabled", "onClick"], mt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, ht = ["disabled"], xt = /* @__PURE__ */ P({
|
|
219
219
|
__name: "Calendar",
|
|
220
220
|
props: {
|
|
221
221
|
modelValue: {},
|
|
222
222
|
mode: { default: "single" },
|
|
223
223
|
label: {},
|
|
224
224
|
showLabel: { type: Boolean, default: !0 },
|
|
225
|
-
labelColor: { default: "text-secondary-700" },
|
|
226
225
|
placeholder: {},
|
|
227
226
|
startPlaceholder: {},
|
|
228
227
|
endPlaceholder: {},
|
|
@@ -233,9 +232,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
233
232
|
required: { type: Boolean, default: !1 },
|
|
234
233
|
error: {},
|
|
235
234
|
helperText: {},
|
|
236
|
-
iconName: { default: "
|
|
237
|
-
startIconName: { default: "
|
|
238
|
-
endIconName: { default: "
|
|
235
|
+
iconName: { default: "calendar_month" },
|
|
236
|
+
startIconName: { default: "calendar_month" },
|
|
237
|
+
endIconName: { default: "calendar_month" },
|
|
239
238
|
minDate: {},
|
|
240
239
|
maxDate: {},
|
|
241
240
|
disabledDates: {},
|
|
@@ -243,8 +242,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
243
242
|
bordered: { type: Boolean, default: !0 }
|
|
244
243
|
},
|
|
245
244
|
emits: ["update:modelValue", "date-select", "range-select"],
|
|
246
|
-
setup(t, { emit:
|
|
247
|
-
const e = t,
|
|
245
|
+
setup(t, { emit: b }) {
|
|
246
|
+
const e = t, f = b, n = L(!1), u = L(null), v = L((/* @__PURE__ */ new Date()).getMonth()), a = L((/* @__PURE__ */ new Date()).getFullYear()), h = L(`calendar-${Math.random().toString(36).substr(2, 9)}`), i = L(null), p = L(null), g = [
|
|
248
247
|
"Enero",
|
|
249
248
|
"Febrero",
|
|
250
249
|
"Marzo",
|
|
@@ -258,28 +257,25 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
258
257
|
"Noviembre",
|
|
259
258
|
"Diciembre"
|
|
260
259
|
], T = ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"], B = r(() => ({ sm: "xs", md: "sm", lg: "md" })[e.size] || "sm"), O = r(() => {
|
|
261
|
-
const
|
|
262
|
-
for (let z =
|
|
263
|
-
|
|
264
|
-
return
|
|
265
|
-
}), j = r(() =>
|
|
266
|
-
const
|
|
260
|
+
const y = (/* @__PURE__ */ new Date()).getFullYear(), $ = [];
|
|
261
|
+
for (let z = y - 100; z <= y + 10; z++)
|
|
262
|
+
$.push(z);
|
|
263
|
+
return $;
|
|
264
|
+
}), j = r(() => "ds-label"), S = r(() => e.bordered ? "border border-neutral-300" : ""), D = r(() => {
|
|
265
|
+
const y = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 disabled:cursor-not-allowed disabled:opacity-50 cursor-pointer", $ = {
|
|
267
266
|
sm: "px-3 py-1.5 pr-10 text-sm",
|
|
268
267
|
md: "px-4 py-2 pr-10 text-base",
|
|
269
268
|
lg: "px-5 py-3 pr-12 text-lg"
|
|
270
269
|
}, z = {
|
|
271
270
|
primary: "focus:ring-primary-500",
|
|
272
271
|
secondary: "focus:ring-secondary-500"
|
|
273
|
-
},
|
|
272
|
+
}, _ = {
|
|
274
273
|
default: "bg-white",
|
|
275
274
|
filled: "bg-secondary-100",
|
|
276
275
|
outlined: "bg-transparent"
|
|
277
276
|
}, U = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
278
|
-
return `${
|
|
279
|
-
}), k = r(() => `transition-colors ${{
|
|
280
|
-
primary: "text-primary-600 hover:text-primary-700",
|
|
281
|
-
secondary: "text-secondary-600 hover:text-secondary-700"
|
|
282
|
-
}[e.color]} ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), I = r(() => "min-w-80 max-w-sm"), F = r(() => `p-2 rounded-md transition-colors ${{
|
|
277
|
+
return `${y} ${$[e.size]} ${_[e.variant]} ${z[e.color]} ${U}`;
|
|
278
|
+
}), k = r(() => `transition-colors text-[#565656] hover:text-[#565656] opacity-80 hover:opacity-100 ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), I = r(() => "min-w-80 max-w-sm"), Y = r(() => `p-2 rounded-md transition-colors ${{
|
|
283
279
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
284
280
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
285
281
|
}[e.color]}`), N = r(() => `px-2 py-1 text-sm border border-secondary-300 rounded-md focus:outline-none focus:ring-1 ${{
|
|
@@ -291,105 +287,107 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
291
287
|
}[e.color]}`), M = r(() => `px-3 py-1.5 text-sm border border-secondary-300 rounded-md transition-colors focus:outline-none ${{
|
|
292
288
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
293
289
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
294
|
-
}[e.color]}`), d = r(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? A(e.modelValue) : ""), w = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? A(e.modelValue.start) : ""),
|
|
290
|
+
}[e.color]}`), d = r(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? A(e.modelValue) : ""), w = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? A(e.modelValue.start) : ""), C = r(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? A(e.modelValue.end) : ""), J = r(() => e.mode === "single" ? i.value !== null : i.value !== null && p.value !== null && p.value >= i.value);
|
|
295
291
|
r(() => e.mode === "range" && i.value && p.value ? p.value < i.value : !1);
|
|
296
|
-
const
|
|
297
|
-
const
|
|
292
|
+
const F = r(() => {
|
|
293
|
+
const y = new Date(a.value, v.value, 1), $ = new Date(a.value, v.value + 1, 0), z = y.getDay(), _ = $.getDate(), U = [], Z = new Date(a.value, v.value - 1, 0);
|
|
298
294
|
for (let R = z - 1; R >= 0; R--) {
|
|
299
|
-
const
|
|
295
|
+
const X = new Date(a.value, v.value - 1, Z.getDate() - R);
|
|
300
296
|
U.push({
|
|
301
|
-
day:
|
|
302
|
-
date:
|
|
297
|
+
day: X.getDate(),
|
|
298
|
+
date: X,
|
|
303
299
|
isCurrentMonth: !1,
|
|
304
|
-
disabled: !
|
|
305
|
-
key: `prev-${
|
|
300
|
+
disabled: !1,
|
|
301
|
+
key: `prev-${X.getDate()}`
|
|
306
302
|
});
|
|
307
303
|
}
|
|
308
|
-
for (let R = 1; R <=
|
|
309
|
-
const
|
|
304
|
+
for (let R = 1; R <= _; R++) {
|
|
305
|
+
const X = new Date(a.value, v.value, R);
|
|
310
306
|
U.push({
|
|
311
307
|
day: R,
|
|
312
|
-
date:
|
|
308
|
+
date: X,
|
|
313
309
|
isCurrentMonth: !0,
|
|
314
310
|
disabled: !1,
|
|
315
311
|
key: `current-${R}`
|
|
316
312
|
});
|
|
317
313
|
}
|
|
318
|
-
const
|
|
319
|
-
for (let R = 1; R <=
|
|
320
|
-
const
|
|
314
|
+
const Ye = 42 - U.length;
|
|
315
|
+
for (let R = 1; R <= Ye; R++) {
|
|
316
|
+
const X = new Date(a.value, v.value + 1, R);
|
|
321
317
|
U.push({
|
|
322
318
|
day: R,
|
|
323
|
-
date:
|
|
319
|
+
date: X,
|
|
324
320
|
isCurrentMonth: !1,
|
|
325
|
-
disabled: !
|
|
321
|
+
disabled: !1,
|
|
326
322
|
key: `next-${R}`
|
|
327
323
|
});
|
|
328
324
|
}
|
|
329
325
|
return U;
|
|
330
|
-
}), A = (
|
|
331
|
-
const
|
|
326
|
+
}), A = (y) => {
|
|
327
|
+
const $ = y.getDate().toString().padStart(2, "0"), z = (y.getMonth() + 1).toString().padStart(2, "0"), _ = y.getFullYear();
|
|
332
328
|
switch (e.dateFormat) {
|
|
333
329
|
case "MM/DD/YYYY":
|
|
334
|
-
return `${z}/${
|
|
330
|
+
return `${z}/${$}/${_}`;
|
|
335
331
|
case "YYYY-MM-DD":
|
|
336
|
-
return `${
|
|
332
|
+
return `${_}-${z}-${$}`;
|
|
337
333
|
case "DD/MM/YYYY":
|
|
338
334
|
default:
|
|
339
|
-
return `${
|
|
335
|
+
return `${$}/${z}/${_}`;
|
|
340
336
|
}
|
|
341
|
-
},
|
|
337
|
+
}, ge = (y) => {
|
|
342
338
|
var z;
|
|
343
|
-
const
|
|
339
|
+
const $ = new Date(y.getFullYear(), y.getMonth(), y.getDate());
|
|
344
340
|
if (e.minDate) {
|
|
345
|
-
const
|
|
346
|
-
if (
|
|
341
|
+
const _ = new Date(e.minDate.getFullYear(), e.minDate.getMonth(), e.minDate.getDate());
|
|
342
|
+
if ($ < _) return !0;
|
|
347
343
|
}
|
|
348
344
|
if (e.maxDate) {
|
|
349
|
-
const
|
|
350
|
-
if (
|
|
345
|
+
const _ = new Date(e.maxDate.getFullYear(), e.maxDate.getMonth(), e.maxDate.getDate());
|
|
346
|
+
if ($ > _) return !0;
|
|
351
347
|
}
|
|
352
348
|
return !!((z = e.disabledDates) != null && z.some(
|
|
353
|
-
(
|
|
349
|
+
(_) => _.toDateString() === y.toDateString()
|
|
354
350
|
));
|
|
355
|
-
}, De = (
|
|
356
|
-
const
|
|
357
|
-
if (
|
|
358
|
-
return `${
|
|
359
|
-
const z = Be(
|
|
351
|
+
}, De = (y) => {
|
|
352
|
+
const $ = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
|
|
353
|
+
if (y.disabled || ge(y.date))
|
|
354
|
+
return `${$} text-secondary-400 cursor-not-allowed`;
|
|
355
|
+
const z = Be(y.date), _ = ze(y.date), U = Ve(y.date), Z = {
|
|
360
356
|
primary: {
|
|
361
357
|
selected: "bg-primary-600 text-white",
|
|
362
358
|
inRange: "bg-primary-100 text-primary-900",
|
|
363
359
|
today: "bg-primary-50 text-primary-700 border border-primary-300",
|
|
364
|
-
default: "text-secondary-700 hover:bg-primary-50 hover:text-primary-700"
|
|
360
|
+
default: "text-secondary-700 hover:bg-primary-50 hover:text-primary-700",
|
|
361
|
+
otherMonth: "text-secondary-400 hover:bg-primary-50 hover:text-primary-600"
|
|
365
362
|
},
|
|
366
363
|
secondary: {
|
|
367
364
|
selected: "bg-secondary-600 text-white",
|
|
368
365
|
inRange: "bg-secondary-100 text-secondary-900",
|
|
369
366
|
today: "bg-secondary-50 text-secondary-700 border border-secondary-300",
|
|
370
|
-
default: "text-secondary-700 hover:bg-secondary-50 hover:text-secondary-700"
|
|
367
|
+
default: "text-secondary-700 hover:bg-secondary-50 hover:text-secondary-700",
|
|
368
|
+
otherMonth: "text-secondary-400 hover:bg-secondary-50 hover:text-secondary-600"
|
|
371
369
|
}
|
|
372
370
|
};
|
|
373
|
-
return z ? `${
|
|
374
|
-
}, Be = (
|
|
371
|
+
return z ? `${$} ${Z[e.color].selected}` : _ ? `${$} ${Z[e.color].inRange}` : U ? `${$} ${Z[e.color].today}` : y.isCurrentMonth ? `${$} ${Z[e.color].default}` : `${$} ${Z[e.color].otherMonth}`;
|
|
372
|
+
}, Be = (y) => e.mode === "single" ? i.value ? le(y, i.value) : !1 : !!(i.value && le(y, i.value)) || !!(p.value && le(y, p.value)), ze = (y) => {
|
|
375
373
|
if (e.mode !== "range" || !i.value || !p.value)
|
|
376
374
|
return !1;
|
|
377
|
-
const
|
|
378
|
-
return
|
|
379
|
-
}, Ve = (
|
|
375
|
+
const $ = i.value, z = p.value;
|
|
376
|
+
return y > $ && y < z;
|
|
377
|
+
}, Ve = (y) => le(y, /* @__PURE__ */ new Date()), le = (y, $) => y.toDateString() === $.toDateString(), Te = () => {
|
|
380
378
|
e.disabled || n.value || oe();
|
|
381
379
|
}, Se = () => {
|
|
382
380
|
e.disabled || n.value || oe();
|
|
383
381
|
}, Ie = () => {
|
|
384
382
|
e.disabled || he();
|
|
385
|
-
},
|
|
386
|
-
e.disabled || (ne(
|
|
387
|
-
},
|
|
388
|
-
e.disabled || (ne(
|
|
389
|
-
},
|
|
390
|
-
e.disabled || (ne(
|
|
391
|
-
}, ne = (
|
|
392
|
-
u.value =
|
|
383
|
+
}, be = (y) => {
|
|
384
|
+
e.disabled || (ne(y), n.value || oe());
|
|
385
|
+
}, ye = (y) => {
|
|
386
|
+
e.disabled || (ne(y), n.value || oe());
|
|
387
|
+
}, me = (y) => {
|
|
388
|
+
e.disabled || (ne(y), he());
|
|
389
|
+
}, ne = (y) => {
|
|
390
|
+
u.value = y;
|
|
393
391
|
}, he = () => {
|
|
394
392
|
e.disabled || (n.value = !n.value, n.value && ie());
|
|
395
393
|
}, oe = () => {
|
|
@@ -398,31 +396,31 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
398
396
|
n.value = !1, u.value = null;
|
|
399
397
|
}, ie = () => {
|
|
400
398
|
e.mode === "single" ? (i.value = e.modelValue instanceof Date ? e.modelValue : null, p.value = null) : e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue ? (i.value = e.modelValue.start, p.value = e.modelValue.end) : (i.value = null, p.value = null);
|
|
401
|
-
}, je = (
|
|
402
|
-
e.mode === "single" ? (i.value =
|
|
399
|
+
}, je = (y) => {
|
|
400
|
+
e.mode === "single" ? (i.value = y, p.value = null) : u.value === "start" || !i.value ? (i.value = y, p.value = null, u.value = "end") : (u.value === "end" || !p.value) && (y < i.value ? (p.value = i.value, i.value = y) : p.value = y, u.value = null);
|
|
403
401
|
}, Le = () => {
|
|
404
402
|
if (e.mode === "single")
|
|
405
|
-
|
|
403
|
+
f("update:modelValue", i.value), i.value && f("date-select", i.value);
|
|
406
404
|
else {
|
|
407
|
-
const
|
|
408
|
-
|
|
405
|
+
const y = { start: i.value, end: p.value };
|
|
406
|
+
f("update:modelValue", y), f("range-select", y);
|
|
409
407
|
}
|
|
410
408
|
re();
|
|
411
409
|
}, Oe = () => {
|
|
412
410
|
v.value === 0 ? (v.value = 11, a.value--) : v.value--;
|
|
413
|
-
},
|
|
411
|
+
}, Fe = () => {
|
|
414
412
|
v.value === 11 ? (v.value = 0, a.value++) : v.value++;
|
|
415
413
|
}, xe = () => {
|
|
416
|
-
}, de = L(), we = (
|
|
417
|
-
de.value && !de.value.contains(
|
|
414
|
+
}, de = L(), we = (y) => {
|
|
415
|
+
de.value && !de.value.contains(y.target) && re();
|
|
418
416
|
};
|
|
419
417
|
return $e(() => {
|
|
420
418
|
document.addEventListener("click", we);
|
|
421
419
|
}), Ce(() => {
|
|
422
420
|
document.removeEventListener("click", we);
|
|
423
|
-
}), ve(() => e.modelValue, (
|
|
421
|
+
}), ve(() => e.modelValue, (y) => {
|
|
424
422
|
n.value || ie();
|
|
425
|
-
}, { deep: !0 }), (
|
|
423
|
+
}, { deep: !0 }), (y, $) => (s(), l("div", {
|
|
426
424
|
ref_key: "calendarWrapperRef",
|
|
427
425
|
ref: de,
|
|
428
426
|
class: "calendar-wrapper"
|
|
@@ -431,17 +429,17 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
431
429
|
t.label && t.showLabel ? (s(), l("label", {
|
|
432
430
|
key: 0,
|
|
433
431
|
for: h.value,
|
|
434
|
-
class:
|
|
432
|
+
class: c(j.value)
|
|
435
433
|
}, [
|
|
436
434
|
q(x(t.label) + " ", 1),
|
|
437
|
-
t.required ? (s(), l("span", Xe, "*")) :
|
|
438
|
-
], 10, Ze)) :
|
|
435
|
+
t.required ? (s(), l("span", Xe, "*")) : m("", !0)
|
|
436
|
+
], 10, Ze)) : m("", !0),
|
|
439
437
|
o("div", {
|
|
440
|
-
class:
|
|
438
|
+
class: c(["relative rounded-md", S.value])
|
|
441
439
|
}, [
|
|
442
440
|
o("input", {
|
|
443
441
|
id: h.value,
|
|
444
|
-
class:
|
|
442
|
+
class: c(D.value),
|
|
445
443
|
type: "text",
|
|
446
444
|
disabled: t.disabled,
|
|
447
445
|
placeholder: t.placeholder || "Seleccionar fecha",
|
|
@@ -453,7 +451,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
453
451
|
}, null, 42, et),
|
|
454
452
|
o("button", {
|
|
455
453
|
type: "button",
|
|
456
|
-
class:
|
|
454
|
+
class: c(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
457
455
|
onClick: H(Ie, ["stop"]),
|
|
458
456
|
disabled: t.disabled
|
|
459
457
|
}, [
|
|
@@ -466,30 +464,30 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
466
464
|
])) : (s(), l("div", st, [
|
|
467
465
|
t.label && t.showLabel ? (s(), l("label", {
|
|
468
466
|
key: 0,
|
|
469
|
-
class:
|
|
467
|
+
class: c(j.value)
|
|
470
468
|
}, [
|
|
471
469
|
q(x(t.label) + " ", 1),
|
|
472
|
-
t.required ? (s(), l("span", lt, "*")) :
|
|
473
|
-
], 2)) :
|
|
470
|
+
t.required ? (s(), l("span", lt, "*")) : m("", !0)
|
|
471
|
+
], 2)) : m("", !0),
|
|
474
472
|
o("div", ot, [
|
|
475
473
|
o("div", {
|
|
476
|
-
class:
|
|
474
|
+
class: c(["relative rounded-md", S.value])
|
|
477
475
|
}, [
|
|
478
476
|
o("input", {
|
|
479
|
-
class:
|
|
477
|
+
class: c(D.value),
|
|
480
478
|
type: "text",
|
|
481
479
|
disabled: t.disabled,
|
|
482
480
|
placeholder: t.startPlaceholder || "Fecha desde",
|
|
483
481
|
value: w.value,
|
|
484
482
|
required: t.required,
|
|
485
483
|
readonly: !0,
|
|
486
|
-
onClick:
|
|
487
|
-
onFocus:
|
|
484
|
+
onClick: $[0] || ($[0] = () => be("start")),
|
|
485
|
+
onFocus: $[1] || ($[1] = () => ye("start"))
|
|
488
486
|
}, null, 42, at),
|
|
489
487
|
o("button", {
|
|
490
488
|
type: "button",
|
|
491
|
-
class:
|
|
492
|
-
onClick:
|
|
489
|
+
class: c(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
490
|
+
onClick: $[2] || ($[2] = H(() => me("start"), ["stop"])),
|
|
493
491
|
disabled: t.disabled
|
|
494
492
|
}, [
|
|
495
493
|
G(se, {
|
|
@@ -499,23 +497,23 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
499
497
|
], 10, nt)
|
|
500
498
|
], 2),
|
|
501
499
|
o("div", {
|
|
502
|
-
class:
|
|
500
|
+
class: c(["relative rounded-md", S.value])
|
|
503
501
|
}, [
|
|
504
502
|
o("input", {
|
|
505
|
-
class:
|
|
503
|
+
class: c(D.value),
|
|
506
504
|
type: "text",
|
|
507
505
|
disabled: t.disabled,
|
|
508
506
|
placeholder: t.endPlaceholder || "Fecha hasta",
|
|
509
|
-
value:
|
|
507
|
+
value: C.value,
|
|
510
508
|
required: t.required,
|
|
511
509
|
readonly: !0,
|
|
512
|
-
onClick:
|
|
513
|
-
onFocus:
|
|
510
|
+
onClick: $[3] || ($[3] = () => be("end")),
|
|
511
|
+
onFocus: $[4] || ($[4] = () => ye("end"))
|
|
514
512
|
}, null, 42, rt),
|
|
515
513
|
o("button", {
|
|
516
514
|
type: "button",
|
|
517
|
-
class:
|
|
518
|
-
onClick:
|
|
515
|
+
class: c(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
516
|
+
onClick: $[5] || ($[5] = H(() => me("end"), ["stop"])),
|
|
519
517
|
disabled: t.disabled
|
|
520
518
|
}, [
|
|
521
519
|
G(se, {
|
|
@@ -526,18 +524,18 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
526
524
|
], 2)
|
|
527
525
|
])
|
|
528
526
|
])),
|
|
529
|
-
t.error ? (s(), l("p", dt, x(t.error), 1)) : t.helperText ? (s(), l("p", ut, x(t.helperText), 1)) :
|
|
527
|
+
t.error ? (s(), l("p", dt, x(t.error), 1)) : t.helperText ? (s(), l("p", ut, x(t.helperText), 1)) : m("", !0),
|
|
530
528
|
n.value ? (s(), l("div", {
|
|
531
529
|
key: 4,
|
|
532
|
-
class:
|
|
533
|
-
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", I.value]),
|
|
531
|
+
onClick: $[8] || ($[8] = H(() => {
|
|
534
532
|
}, ["stop"]))
|
|
535
533
|
}, [
|
|
536
534
|
o("div", ct, [
|
|
537
535
|
o("button", {
|
|
538
536
|
type: "button",
|
|
539
537
|
onClick: Oe,
|
|
540
|
-
class:
|
|
538
|
+
class: c(Y.value)
|
|
541
539
|
}, [
|
|
542
540
|
G(se, {
|
|
543
541
|
name: "chevron-left",
|
|
@@ -546,20 +544,20 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
546
544
|
], 2),
|
|
547
545
|
o("div", ft, [
|
|
548
546
|
ue(o("select", {
|
|
549
|
-
"onUpdate:modelValue":
|
|
550
|
-
class:
|
|
547
|
+
"onUpdate:modelValue": $[6] || ($[6] = (z) => v.value = z),
|
|
548
|
+
class: c(N.value),
|
|
551
549
|
onChange: xe
|
|
552
550
|
}, [
|
|
553
|
-
(s(), l(E, null, W(
|
|
554
|
-
key:
|
|
555
|
-
value:
|
|
551
|
+
(s(), l(E, null, W(g, (z, _) => o("option", {
|
|
552
|
+
key: _,
|
|
553
|
+
value: _
|
|
556
554
|
}, x(z), 9, vt)), 64))
|
|
557
555
|
], 34), [
|
|
558
556
|
[ke, v.value]
|
|
559
557
|
]),
|
|
560
558
|
ue(o("select", {
|
|
561
|
-
"onUpdate:modelValue":
|
|
562
|
-
class:
|
|
559
|
+
"onUpdate:modelValue": $[7] || ($[7] = (z) => a.value = z),
|
|
560
|
+
class: c(N.value),
|
|
563
561
|
onChange: xe
|
|
564
562
|
}, [
|
|
565
563
|
(s(!0), l(E, null, W(O.value, (z) => (s(), l("option", {
|
|
@@ -572,8 +570,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
572
570
|
]),
|
|
573
571
|
o("button", {
|
|
574
572
|
type: "button",
|
|
575
|
-
onClick:
|
|
576
|
-
class:
|
|
573
|
+
onClick: Fe,
|
|
574
|
+
class: c(Y.value)
|
|
577
575
|
}, [
|
|
578
576
|
G(se, {
|
|
579
577
|
name: "chevron-right",
|
|
@@ -581,44 +579,44 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
581
579
|
})
|
|
582
580
|
], 2)
|
|
583
581
|
]),
|
|
584
|
-
o("div",
|
|
582
|
+
o("div", gt, [
|
|
585
583
|
(s(), l(E, null, W(T, (z) => o("div", {
|
|
586
584
|
key: z,
|
|
587
585
|
class: "text-center text-sm font-medium text-secondary-600 py-2"
|
|
588
586
|
}, x(z), 1)), 64))
|
|
589
587
|
]),
|
|
590
|
-
o("div",
|
|
591
|
-
(s(!0), l(E, null, W(
|
|
588
|
+
o("div", bt, [
|
|
589
|
+
(s(!0), l(E, null, W(F.value, (z) => (s(), l("button", {
|
|
592
590
|
key: z.key,
|
|
593
591
|
type: "button",
|
|
594
|
-
class:
|
|
595
|
-
disabled: z.disabled ||
|
|
596
|
-
onClick: (
|
|
597
|
-
}, x(z.day), 11,
|
|
592
|
+
class: c(De(z)),
|
|
593
|
+
disabled: z.disabled || ge(z.date),
|
|
594
|
+
onClick: (_) => je(z.date)
|
|
595
|
+
}, x(z.day), 11, yt))), 128))
|
|
598
596
|
]),
|
|
599
|
-
o("div",
|
|
597
|
+
o("div", mt, [
|
|
600
598
|
o("button", {
|
|
601
599
|
type: "button",
|
|
602
|
-
class:
|
|
600
|
+
class: c(M.value),
|
|
603
601
|
onClick: re
|
|
604
602
|
}, " Cancelar ", 2),
|
|
605
603
|
o("button", {
|
|
606
604
|
type: "button",
|
|
607
|
-
class:
|
|
605
|
+
class: c(te.value),
|
|
608
606
|
onClick: Le,
|
|
609
607
|
disabled: !J.value
|
|
610
608
|
}, " Confirmar ", 10, ht)
|
|
611
609
|
])
|
|
612
|
-
], 2)) :
|
|
610
|
+
], 2)) : m("", !0)
|
|
613
611
|
], 512));
|
|
614
612
|
}
|
|
615
|
-
}),
|
|
613
|
+
}), xl = /* @__PURE__ */ K(xt, [["__scopeId", "data-v-aac22628"]]), wt = {
|
|
616
614
|
key: 0,
|
|
617
615
|
class: "border-b border-gray-100 px-6 py-4"
|
|
618
616
|
}, kt = { class: "px-6 py-4" }, $t = {
|
|
619
617
|
key: 1,
|
|
620
618
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
621
|
-
},
|
|
619
|
+
}, wl = /* @__PURE__ */ P({
|
|
622
620
|
__name: "Card",
|
|
623
621
|
props: {
|
|
624
622
|
shadow: { default: "md" },
|
|
@@ -626,13 +624,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
626
624
|
bordered: { type: Boolean, default: !1 }
|
|
627
625
|
},
|
|
628
626
|
setup(t) {
|
|
629
|
-
const
|
|
627
|
+
const b = t, e = {
|
|
630
628
|
none: "",
|
|
631
629
|
sm: "shadow-sm",
|
|
632
630
|
md: "shadow",
|
|
633
631
|
lg: "shadow-lg",
|
|
634
632
|
xl: "shadow-xl"
|
|
635
|
-
},
|
|
633
|
+
}, f = {
|
|
636
634
|
none: "rounded-none",
|
|
637
635
|
sm: "rounded-sm",
|
|
638
636
|
md: "rounded-md",
|
|
@@ -641,22 +639,22 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
641
639
|
full: "rounded-full"
|
|
642
640
|
}, n = r(() => [
|
|
643
641
|
"w-full bg-white",
|
|
644
|
-
e[
|
|
645
|
-
|
|
646
|
-
|
|
642
|
+
e[b.shadow],
|
|
643
|
+
f[b.rounded],
|
|
644
|
+
b.bordered ? "border border-gray-200" : ""
|
|
647
645
|
]);
|
|
648
646
|
return (u, v) => (s(), l("div", {
|
|
649
|
-
class:
|
|
647
|
+
class: c(n.value)
|
|
650
648
|
}, [
|
|
651
649
|
u.$slots.header ? (s(), l("div", wt, [
|
|
652
650
|
V(u.$slots, "header")
|
|
653
|
-
])) :
|
|
651
|
+
])) : m("", !0),
|
|
654
652
|
o("div", kt, [
|
|
655
653
|
V(u.$slots, "default")
|
|
656
654
|
]),
|
|
657
655
|
u.$slots.footer ? (s(), l("div", $t, [
|
|
658
656
|
V(u.$slots, "footer")
|
|
659
|
-
])) :
|
|
657
|
+
])) : m("", !0)
|
|
660
658
|
], 2));
|
|
661
659
|
}
|
|
662
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" }, Dt = { class: "px-8 py-6" }, Bt = {
|
|
@@ -670,12 +668,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
670
668
|
closeOnBackdrop: { type: Boolean, default: !0 }
|
|
671
669
|
},
|
|
672
670
|
emits: ["update:modelValue", "close"],
|
|
673
|
-
setup(t, { emit:
|
|
674
|
-
const e = t,
|
|
671
|
+
setup(t, { emit: b }) {
|
|
672
|
+
const e = t, f = b, n = r({
|
|
675
673
|
get: () => e.modelValue,
|
|
676
|
-
set: (a) =>
|
|
674
|
+
set: (a) => f("update:modelValue", a)
|
|
677
675
|
}), u = () => {
|
|
678
|
-
n.value = !1,
|
|
676
|
+
n.value = !1, f("close");
|
|
679
677
|
}, v = () => {
|
|
680
678
|
e.closeOnBackdrop && u();
|
|
681
679
|
};
|
|
@@ -724,27 +722,27 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
724
722
|
]),
|
|
725
723
|
a.$slots.footer ? (s(), l("div", Bt, [
|
|
726
724
|
V(a.$slots, "footer", {}, void 0, !0)
|
|
727
|
-
])) :
|
|
725
|
+
])) : m("", !0)
|
|
728
726
|
])
|
|
729
|
-
])) :
|
|
727
|
+
])) : m("", !0)
|
|
730
728
|
]),
|
|
731
729
|
_: 3
|
|
732
730
|
})
|
|
733
731
|
]));
|
|
734
732
|
}
|
|
735
|
-
}),
|
|
733
|
+
}), kl = /* @__PURE__ */ K(zt, [["__scopeId", "data-v-37e19754"]]), Vt = ["accept", "multiple", "disabled"], Tt = { class: "flex flex-col items-center justify-center gap-4 text-center" }, St = ["src", "alt"], It = {
|
|
736
734
|
key: 1,
|
|
737
735
|
class: "w-full h-full text-gray-400",
|
|
738
736
|
fill: "none",
|
|
739
737
|
stroke: "currentColor",
|
|
740
738
|
viewBox: "0 0 24 24"
|
|
741
|
-
}, 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" }, Ft = { class: "flex items-center gap-3 flex-1 min-w-0" }, Yt = { class: "flex-1 min-w-0" }, _t = { class: "text-sm font-medium text-gray-900 truncate" }, At = { class: "text-xs text-gray-500" }, Et = {
|
|
742
740
|
key: 1,
|
|
743
741
|
class: "text-xs text-gray-500 mt-2"
|
|
744
742
|
}, Pt = {
|
|
745
743
|
key: 2,
|
|
746
744
|
class: "text-sm text-danger-500 mt-2"
|
|
747
|
-
},
|
|
745
|
+
}, $l = /* @__PURE__ */ P({
|
|
748
746
|
__name: "FileUpload",
|
|
749
747
|
props: {
|
|
750
748
|
modelValue: { default: null },
|
|
@@ -760,8 +758,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
760
758
|
maxSize: { default: void 0 }
|
|
761
759
|
},
|
|
762
760
|
emits: ["update:modelValue", "change", "error"],
|
|
763
|
-
setup(t, { emit:
|
|
764
|
-
const e = t,
|
|
761
|
+
setup(t, { emit: b }) {
|
|
762
|
+
const e = t, f = b, n = L(null), u = L(!1), v = L(e.modelValue), a = L(""), h = r(() => ({
|
|
765
763
|
sm: "w-20 h-20",
|
|
766
764
|
md: "w-32 h-32",
|
|
767
765
|
lg: "w-48 h-48",
|
|
@@ -771,39 +769,39 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
771
769
|
(k = n.value) == null || k.click();
|
|
772
770
|
}, p = () => {
|
|
773
771
|
e.disabled || i();
|
|
774
|
-
},
|
|
772
|
+
}, g = (k) => {
|
|
775
773
|
e.disabled || (u.value = !0);
|
|
776
774
|
}, T = () => {
|
|
777
775
|
u.value = !1;
|
|
778
776
|
}, B = (k) => {
|
|
779
777
|
if (a.value = "", e.maxSize && k.size > e.maxSize) {
|
|
780
778
|
const I = (e.maxSize / 1048576).toFixed(2);
|
|
781
|
-
return a.value = `El archivo excede el tamaño máximo de ${I}MB`,
|
|
779
|
+
return a.value = `El archivo excede el tamaño máximo de ${I}MB`, f("error", a.value), !1;
|
|
782
780
|
}
|
|
783
781
|
return !0;
|
|
784
782
|
}, O = (k) => {
|
|
785
783
|
var N;
|
|
786
|
-
const
|
|
787
|
-
|
|
784
|
+
const Y = (N = k.target.files) == null ? void 0 : N[0];
|
|
785
|
+
Y && B(Y) && (v.value = Y, f("update:modelValue", Y), f("change", Y));
|
|
788
786
|
}, j = (k) => {
|
|
789
|
-
var
|
|
787
|
+
var Y;
|
|
790
788
|
u.value = !1;
|
|
791
|
-
const I = (
|
|
792
|
-
I && B(I) && (v.value = I,
|
|
789
|
+
const I = (Y = k.dataTransfer) == null ? void 0 : Y.files[0];
|
|
790
|
+
I && B(I) && (v.value = I, f("update:modelValue", I), f("change", I));
|
|
793
791
|
}, S = () => {
|
|
794
|
-
v.value = null, a.value = "", n.value && (n.value.value = ""),
|
|
792
|
+
v.value = null, a.value = "", n.value && (n.value.value = ""), f("update:modelValue", null), f("change", null);
|
|
795
793
|
}, D = (k) => {
|
|
796
794
|
if (k === 0) return "0 Bytes";
|
|
797
|
-
const I = 1024,
|
|
798
|
-
return Math.round(k / Math.pow(I, N) * 100) / 100 + " " +
|
|
795
|
+
const I = 1024, Y = ["Bytes", "KB", "MB", "GB"], N = Math.floor(Math.log(k) / Math.log(I));
|
|
796
|
+
return Math.round(k / Math.pow(I, N) * 100) / 100 + " " + Y[N];
|
|
799
797
|
};
|
|
800
798
|
return (k, I) => (s(), l("div", {
|
|
801
|
-
class:
|
|
799
|
+
class: c(["relative border-2 border-dashed rounded-lg p-8 transition-colors", [
|
|
802
800
|
u.value ? "border-primary-700 bg-primary-50" : "border-gray-300 bg-white hover:border-primary-500",
|
|
803
801
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
804
802
|
]]),
|
|
805
803
|
onClick: p,
|
|
806
|
-
onDragover: H(
|
|
804
|
+
onDragover: H(g, ["prevent"]),
|
|
807
805
|
onDragleave: H(T, ["prevent"]),
|
|
808
806
|
onDrop: H(j, ["prevent"])
|
|
809
807
|
}, [
|
|
@@ -819,7 +817,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
819
817
|
}, null, 40, Vt),
|
|
820
818
|
o("div", Tt, [
|
|
821
819
|
o("div", {
|
|
822
|
-
class:
|
|
820
|
+
class: c([h.value, "flex items-center justify-center"])
|
|
823
821
|
}, [
|
|
824
822
|
t.illustration ? (s(), l("img", {
|
|
825
823
|
key: 0,
|
|
@@ -847,7 +845,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
847
845
|
onClick: I[0] || (I[0] = H(() => {
|
|
848
846
|
}, ["stop"]))
|
|
849
847
|
}, [
|
|
850
|
-
o("div",
|
|
848
|
+
o("div", Ft, [
|
|
851
849
|
I[2] || (I[2] = o("svg", {
|
|
852
850
|
class: "w-6 h-6 text-gray-600 flex-shrink-0",
|
|
853
851
|
fill: "none",
|
|
@@ -861,12 +859,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
861
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"
|
|
862
860
|
})
|
|
863
861
|
], -1)),
|
|
864
|
-
o("div",
|
|
865
|
-
o("p",
|
|
862
|
+
o("div", Yt, [
|
|
863
|
+
o("p", _t, x(v.value.name), 1),
|
|
866
864
|
o("p", At, x(D(v.value.size)), 1)
|
|
867
865
|
])
|
|
868
866
|
]),
|
|
869
|
-
t.disabled ?
|
|
867
|
+
t.disabled ? m("", !0) : (s(), l("button", {
|
|
870
868
|
key: 0,
|
|
871
869
|
onClick: H(S, ["stop"]),
|
|
872
870
|
class: "ml-3 text-gray-400 hover:text-danger-500 transition-colors"
|
|
@@ -883,9 +881,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
883
881
|
})
|
|
884
882
|
], -1)
|
|
885
883
|
])]))
|
|
886
|
-
])) :
|
|
887
|
-
t.helperText ? (s(), l("p", Et, x(t.helperText), 1)) :
|
|
888
|
-
a.value ? (s(), l("p", Pt, x(a.value), 1)) :
|
|
884
|
+
])) : m("", !0),
|
|
885
|
+
t.helperText ? (s(), l("p", Et, x(t.helperText), 1)) : m("", !0),
|
|
886
|
+
a.value ? (s(), l("p", Pt, x(a.value), 1)) : m("", !0)
|
|
889
887
|
])
|
|
890
888
|
], 34));
|
|
891
889
|
}
|
|
@@ -917,9 +915,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
917
915
|
helperText: {}
|
|
918
916
|
},
|
|
919
917
|
emits: ["update:modelValue", "blur", "focus"],
|
|
920
|
-
setup(t, { emit:
|
|
921
|
-
const e = t,
|
|
922
|
-
const p = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",
|
|
918
|
+
setup(t, { emit: b }) {
|
|
919
|
+
const e = t, f = b, n = L(`input-${Math.random().toString(36).substr(2, 9)}`), u = r(() => "ds-label"), v = r(() => {
|
|
920
|
+
const p = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", g = {
|
|
923
921
|
sm: "h-8 px-3 text-sm",
|
|
924
922
|
md: "h-10 px-4 text-base",
|
|
925
923
|
lg: "h-12 px-5 text-lg"
|
|
@@ -928,28 +926,28 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
928
926
|
filled: "border-0 bg-secondary-100 focus:bg-white focus:ring-primary-500",
|
|
929
927
|
outlined: "border-2 border-secondary-300 bg-transparent focus:border-primary-500 focus:ring-primary-500"
|
|
930
928
|
}, B = e.error ? "border-danger-500 focus:border-danger-500 focus:ring-danger-500 pr-10" : "";
|
|
931
|
-
return `${p} ${
|
|
929
|
+
return `${p} ${g[e.size]} ${T[e.variant]} ${B}`;
|
|
932
930
|
}), a = (p) => {
|
|
933
|
-
const
|
|
934
|
-
|
|
931
|
+
const g = p.target;
|
|
932
|
+
f("update:modelValue", g.value);
|
|
935
933
|
}, h = (p) => {
|
|
936
|
-
|
|
934
|
+
f("blur", p);
|
|
937
935
|
}, i = (p) => {
|
|
938
|
-
|
|
936
|
+
f("focus", p);
|
|
939
937
|
};
|
|
940
|
-
return (p,
|
|
938
|
+
return (p, g) => (s(), l("div", qt, [
|
|
941
939
|
t.label ? (s(), l("label", {
|
|
942
940
|
key: 0,
|
|
943
941
|
for: n.value,
|
|
944
|
-
class:
|
|
942
|
+
class: c(u.value)
|
|
945
943
|
}, [
|
|
946
944
|
q(x(t.label) + " ", 1),
|
|
947
|
-
t.required ? (s(), l("span", Nt, "*")) :
|
|
948
|
-
], 10, Rt)) :
|
|
945
|
+
t.required ? (s(), l("span", Nt, "*")) : m("", !0)
|
|
946
|
+
], 10, Rt)) : m("", !0),
|
|
949
947
|
o("div", Wt, [
|
|
950
948
|
o("input", {
|
|
951
949
|
id: n.value,
|
|
952
|
-
class:
|
|
950
|
+
class: c(v.value),
|
|
953
951
|
type: t.type,
|
|
954
952
|
disabled: t.disabled,
|
|
955
953
|
placeholder: t.placeholder,
|
|
@@ -960,7 +958,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
960
958
|
onBlur: h,
|
|
961
959
|
onFocus: i
|
|
962
960
|
}, null, 42, Ht),
|
|
963
|
-
t.error ? (s(), l("span", Kt, [...
|
|
961
|
+
t.error ? (s(), l("span", Kt, [...g[0] || (g[0] = [
|
|
964
962
|
o("svg", {
|
|
965
963
|
xmlns: "http://www.w3.org/2000/svg",
|
|
966
964
|
class: "h-5 w-5",
|
|
@@ -973,12 +971,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
973
971
|
"clip-rule": "evenodd"
|
|
974
972
|
})
|
|
975
973
|
], -1)
|
|
976
|
-
])])) :
|
|
974
|
+
])])) : m("", !0)
|
|
977
975
|
]),
|
|
978
|
-
t.error ? (s(), l("p", Ut, x(t.error), 1)) : t.helperText ? (s(), l("p", Jt, x(t.helperText), 1)) :
|
|
976
|
+
t.error ? (s(), l("p", Ut, x(t.error), 1)) : t.helperText ? (s(), l("p", Jt, x(t.helperText), 1)) : m("", !0)
|
|
979
977
|
]));
|
|
980
978
|
}
|
|
981
|
-
}),
|
|
979
|
+
}), Cl = /* @__PURE__ */ K(Gt, [["__scopeId", "data-v-fac43d65"]]), Qt = ["stroke-width"], Zt = {
|
|
982
980
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
983
981
|
style: { "background-color": "#f7f7f7" }
|
|
984
982
|
}, Xt = /* @__PURE__ */ P({
|
|
@@ -992,24 +990,24 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
992
990
|
progress: { default: void 0 }
|
|
993
991
|
},
|
|
994
992
|
setup(t) {
|
|
995
|
-
const
|
|
993
|
+
const b = t, e = {
|
|
996
994
|
primary: "text-primary-700",
|
|
997
995
|
secondary: "text-secondary-500",
|
|
998
996
|
success: "text-success-500",
|
|
999
997
|
warning: "text-warning-500",
|
|
1000
998
|
danger: "text-danger-500",
|
|
1001
999
|
info: "text-info-500"
|
|
1002
|
-
},
|
|
1000
|
+
}, f = {
|
|
1003
1001
|
primary: "bg-primary-700",
|
|
1004
1002
|
secondary: "bg-secondary-500",
|
|
1005
1003
|
success: "bg-success-500",
|
|
1006
1004
|
warning: "bg-warning-500",
|
|
1007
1005
|
danger: "bg-danger-500",
|
|
1008
1006
|
info: "bg-info-500"
|
|
1009
|
-
}, n = r(() => [e[
|
|
1007
|
+
}, n = r(() => [e[b.color]]), u = r(() => [f[b.color]]);
|
|
1010
1008
|
return (v, a) => t.type === "circular" ? (s(), l("div", {
|
|
1011
1009
|
key: 0,
|
|
1012
|
-
class:
|
|
1010
|
+
class: c(n.value)
|
|
1013
1011
|
}, [
|
|
1014
1012
|
(s(), l("svg", {
|
|
1015
1013
|
class: "animate-spin",
|
|
@@ -1038,13 +1036,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1038
1036
|
}, [
|
|
1039
1037
|
o("div", Zt, [
|
|
1040
1038
|
o("div", {
|
|
1041
|
-
class:
|
|
1039
|
+
class: c([[u.value, { "animate-linear-loader": t.progress === void 0 }], "h-full rounded-lg"]),
|
|
1042
1040
|
style: Q({ width: t.progress !== void 0 ? `${Math.min(Math.max(t.progress, 0), 100)}%` : "100%" })
|
|
1043
1041
|
}, null, 6)
|
|
1044
1042
|
])
|
|
1045
|
-
], 4)) :
|
|
1043
|
+
], 4)) : m("", !0);
|
|
1046
1044
|
}
|
|
1047
|
-
}),
|
|
1045
|
+
}), Ml = /* @__PURE__ */ K(Xt, [["__scopeId", "data-v-f369fb46"]]), es = ["disabled", "aria-expanded"], ts = ["disabled", "onClick"], ss = {
|
|
1048
1046
|
key: 0,
|
|
1049
1047
|
class: "flex-shrink-0"
|
|
1050
1048
|
}, ls = ["innerHTML"], os = { class: "flex-1 min-w-0 mr-2" }, as = { class: "flex flex-col items-start" }, ns = ["title"], rs = ["title"], is = {
|
|
@@ -1078,8 +1076,8 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1078
1076
|
zIndex: { default: 50 }
|
|
1079
1077
|
},
|
|
1080
1078
|
emits: ["open", "close", "select"],
|
|
1081
|
-
setup(t, { emit:
|
|
1082
|
-
const e = t,
|
|
1079
|
+
setup(t, { emit: b }) {
|
|
1080
|
+
const e = t, f = b, n = L(!1), u = L(null), v = L(null), a = L({}), h = r(() => [
|
|
1083
1081
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
1084
1082
|
"bg-white border border-secondary-300 rounded-md text-secondary-700",
|
|
1085
1083
|
"hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
|
|
@@ -1090,30 +1088,30 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1090
1088
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
1091
1089
|
"flex flex-col",
|
|
1092
1090
|
"focus:outline-none"
|
|
1093
|
-
], `z-${e.zIndex}`].join(" ")), p = r(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"),
|
|
1091
|
+
], `z-${e.zIndex}`].join(" ")), p = r(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), g = r(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), T = r(() => "py-1 overflow-y-auto flex-1 min-h-0"), B = r(() => "my-1 border-t border-secondary-200"), O = r(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), j = (d) => {
|
|
1094
1092
|
const w = [
|
|
1095
1093
|
"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left",
|
|
1096
1094
|
"transition-all duration-150 focus:outline-none cursor-pointer",
|
|
1097
1095
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1098
|
-
],
|
|
1096
|
+
], C = d.variant || "default", J = {
|
|
1099
1097
|
default: "text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100",
|
|
1100
1098
|
danger: "text-danger-600 hover:bg-danger-100 hover:text-danger-700 focus:bg-danger-100",
|
|
1101
1099
|
success: "text-success-600 hover:bg-success-100 hover:text-success-700 focus:bg-success-100",
|
|
1102
1100
|
warning: "text-warning-600 hover:bg-warning-100 hover:text-warning-700 focus:bg-warning-100"
|
|
1103
1101
|
};
|
|
1104
|
-
let
|
|
1105
|
-
return d.color && (
|
|
1102
|
+
let F = "";
|
|
1103
|
+
return d.color && (F = d.color, (d.color.includes("white") || d.color.includes("50")) && (F += " hover:text-black")), [...w, F || J[C]].join(" ");
|
|
1106
1104
|
}, S = () => {
|
|
1107
1105
|
e.disabled || (n.value ? k() : D());
|
|
1108
1106
|
}, D = () => {
|
|
1109
|
-
n.value = !0,
|
|
1110
|
-
M(), document.addEventListener("click",
|
|
1107
|
+
n.value = !0, f("open"), fe(() => {
|
|
1108
|
+
M(), document.addEventListener("click", Y), document.addEventListener("keydown", N);
|
|
1111
1109
|
});
|
|
1112
1110
|
}, k = () => {
|
|
1113
|
-
n.value = !1,
|
|
1111
|
+
n.value = !1, f("close"), document.removeEventListener("click", Y), document.removeEventListener("keydown", N);
|
|
1114
1112
|
}, I = (d) => {
|
|
1115
|
-
d.disabled || (d.action && d.action(),
|
|
1116
|
-
},
|
|
1113
|
+
d.disabled || (d.action && d.action(), f("select", d), e.closeOnClick && !d.children && k());
|
|
1114
|
+
}, Y = (d) => {
|
|
1117
1115
|
const w = d.target;
|
|
1118
1116
|
u.value && !u.value.contains(w) && v.value && !v.value.contains(w) && k();
|
|
1119
1117
|
}, N = (d) => {
|
|
@@ -1122,36 +1120,36 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1122
1120
|
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), S());
|
|
1123
1121
|
}, M = () => {
|
|
1124
1122
|
if (!u.value || !v.value) return;
|
|
1125
|
-
const d = u.value.getBoundingClientRect(), w = v.value.getBoundingClientRect(),
|
|
1126
|
-
let
|
|
1123
|
+
const d = u.value.getBoundingClientRect(), w = v.value.getBoundingClientRect(), C = window.innerWidth, J = window.innerHeight;
|
|
1124
|
+
let F = 0, A = 0;
|
|
1127
1125
|
switch (e.position) {
|
|
1128
1126
|
case "bottom-start":
|
|
1129
|
-
|
|
1127
|
+
F = d.bottom + e.offset.y, A = d.left + e.offset.x;
|
|
1130
1128
|
break;
|
|
1131
1129
|
case "bottom-end":
|
|
1132
|
-
|
|
1130
|
+
F = d.bottom + e.offset.y, A = d.right - w.width + e.offset.x;
|
|
1133
1131
|
break;
|
|
1134
1132
|
case "top-start":
|
|
1135
|
-
|
|
1133
|
+
F = d.top - w.height - e.offset.y, A = d.left + e.offset.x;
|
|
1136
1134
|
break;
|
|
1137
1135
|
case "top-end":
|
|
1138
|
-
|
|
1136
|
+
F = d.top - w.height - e.offset.y, A = d.right - w.width + e.offset.x;
|
|
1139
1137
|
break;
|
|
1140
1138
|
case "right-start":
|
|
1141
|
-
|
|
1139
|
+
F = d.top + e.offset.y, A = d.right + e.offset.x;
|
|
1142
1140
|
break;
|
|
1143
1141
|
case "right-end":
|
|
1144
|
-
|
|
1142
|
+
F = d.bottom - w.height + e.offset.y, A = d.right + e.offset.x;
|
|
1145
1143
|
break;
|
|
1146
1144
|
case "left-start":
|
|
1147
|
-
|
|
1145
|
+
F = d.top + e.offset.y, A = d.left - w.width - e.offset.x;
|
|
1148
1146
|
break;
|
|
1149
1147
|
case "left-end":
|
|
1150
|
-
|
|
1148
|
+
F = d.bottom - w.height + e.offset.y, A = d.left - w.width - e.offset.x;
|
|
1151
1149
|
break;
|
|
1152
1150
|
}
|
|
1153
|
-
A + w.width >
|
|
1154
|
-
top: `${
|
|
1151
|
+
A + w.width > C && (A = C - w.width - 8), A < 8 && (A = 8), F + w.height > J && (F = J - w.height - 8), F < 8 && (F = 8), a.value = {
|
|
1152
|
+
top: `${F}px`,
|
|
1155
1153
|
left: `${A}px`,
|
|
1156
1154
|
width: e.width === "auto" ? `${Math.max(d.width, 240)}px` : e.width,
|
|
1157
1155
|
maxHeight: e.maxHeight,
|
|
@@ -1161,11 +1159,11 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1161
1159
|
return $e(() => {
|
|
1162
1160
|
window.addEventListener("scroll", M, !0), window.addEventListener("resize", M);
|
|
1163
1161
|
}), Ce(() => {
|
|
1164
|
-
window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M), document.removeEventListener("click",
|
|
1162
|
+
window.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M), document.removeEventListener("click", Y), document.removeEventListener("keydown", N);
|
|
1165
1163
|
}), ve(() => e.items, () => {
|
|
1166
1164
|
n.value && fe(M);
|
|
1167
1165
|
}, { deep: !0 }), (d, w) => (s(), l("div", {
|
|
1168
|
-
class:
|
|
1166
|
+
class: c(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
1169
1167
|
}, [
|
|
1170
1168
|
o("div", {
|
|
1171
1169
|
ref_key: "triggerRef",
|
|
@@ -1177,7 +1175,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1177
1175
|
}, () => [
|
|
1178
1176
|
o("button", {
|
|
1179
1177
|
type: "button",
|
|
1180
|
-
class:
|
|
1178
|
+
class: c(h.value),
|
|
1181
1179
|
disabled: t.disabled,
|
|
1182
1180
|
onClick: S,
|
|
1183
1181
|
onKeydown: te,
|
|
@@ -1191,7 +1189,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1191
1189
|
], !0),
|
|
1192
1190
|
t.showChevron ? (s(), l("svg", {
|
|
1193
1191
|
key: 0,
|
|
1194
|
-
class:
|
|
1192
|
+
class: c(["w-4 h-4 ml-2 transition-transform", n.value ? "rotate-180" : ""]),
|
|
1195
1193
|
fill: "none",
|
|
1196
1194
|
stroke: "currentColor",
|
|
1197
1195
|
viewBox: "0 0 24 24"
|
|
@@ -1202,7 +1200,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1202
1200
|
"stroke-width": "2",
|
|
1203
1201
|
d: "M19 9l-7 7-7-7"
|
|
1204
1202
|
}, null, -1)
|
|
1205
|
-
])], 2)) :
|
|
1203
|
+
])], 2)) : m("", !0)
|
|
1206
1204
|
], 42, es)
|
|
1207
1205
|
], !0)
|
|
1208
1206
|
], 512),
|
|
@@ -1211,109 +1209,109 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1211
1209
|
key: 0,
|
|
1212
1210
|
ref_key: "menuRef",
|
|
1213
1211
|
ref: v,
|
|
1214
|
-
class:
|
|
1212
|
+
class: c(i.value),
|
|
1215
1213
|
style: Q(a.value),
|
|
1216
1214
|
onClick: w[0] || (w[0] = H(() => {
|
|
1217
1215
|
}, ["stop"]))
|
|
1218
1216
|
}, [
|
|
1219
1217
|
d.$slots.header ? (s(), l("div", {
|
|
1220
1218
|
key: 0,
|
|
1221
|
-
class:
|
|
1219
|
+
class: c(p.value)
|
|
1222
1220
|
}, [
|
|
1223
1221
|
V(d.$slots, "header", { close: k }, void 0, !0)
|
|
1224
|
-
], 2)) :
|
|
1222
|
+
], 2)) : m("", !0),
|
|
1225
1223
|
o("div", {
|
|
1226
|
-
class:
|
|
1224
|
+
class: c(T.value)
|
|
1227
1225
|
}, [
|
|
1228
1226
|
V(d.$slots, "default", {
|
|
1229
1227
|
close: k,
|
|
1230
1228
|
isOpen: n.value
|
|
1231
1229
|
}, () => [
|
|
1232
|
-
(s(!0), l(E, null, W(t.items, (
|
|
1233
|
-
key:
|
|
1230
|
+
(s(!0), l(E, null, W(t.items, (C, J) => (s(), l(E, {
|
|
1231
|
+
key: C.id || J
|
|
1234
1232
|
}, [
|
|
1235
|
-
|
|
1233
|
+
C.type === "divider" ? (s(), l("div", {
|
|
1236
1234
|
key: 0,
|
|
1237
|
-
class:
|
|
1238
|
-
}, null, 2)) :
|
|
1235
|
+
class: c(B.value)
|
|
1236
|
+
}, null, 2)) : C.type === "header" ? (s(), l("div", {
|
|
1239
1237
|
key: 1,
|
|
1240
|
-
class:
|
|
1241
|
-
}, x(
|
|
1238
|
+
class: c(O.value)
|
|
1239
|
+
}, x(C.label), 3)) : (s(), l("button", {
|
|
1242
1240
|
key: 2,
|
|
1243
1241
|
type: "button",
|
|
1244
|
-
class:
|
|
1245
|
-
disabled:
|
|
1246
|
-
onClick: (
|
|
1242
|
+
class: c(j(C)),
|
|
1243
|
+
disabled: C.disabled,
|
|
1244
|
+
onClick: (F) => I(C)
|
|
1247
1245
|
}, [
|
|
1248
|
-
|
|
1249
|
-
V(d.$slots, `icon-${
|
|
1250
|
-
typeof
|
|
1246
|
+
C.icon || d.$slots[`icon-${C.id}`] ? (s(), l("span", ss, [
|
|
1247
|
+
V(d.$slots, `icon-${C.id}`, { item: C }, () => [
|
|
1248
|
+
typeof C.icon != "string" ? (s(), ee(Me(C.icon), {
|
|
1251
1249
|
key: 0,
|
|
1252
1250
|
class: "w-5 h-5"
|
|
1253
1251
|
})) : (s(), l("span", {
|
|
1254
1252
|
key: 1,
|
|
1255
|
-
innerHTML:
|
|
1253
|
+
innerHTML: C.icon,
|
|
1256
1254
|
class: "w-5 h-5 inline-block"
|
|
1257
1255
|
}, null, 8, ls))
|
|
1258
1256
|
], !0)
|
|
1259
|
-
])) :
|
|
1257
|
+
])) : m("", !0),
|
|
1260
1258
|
o("div", os, [
|
|
1261
|
-
V(d.$slots, `item-${
|
|
1262
|
-
item:
|
|
1259
|
+
V(d.$slots, `item-${C.id}`, {
|
|
1260
|
+
item: C,
|
|
1263
1261
|
close: k
|
|
1264
1262
|
}, () => [
|
|
1265
1263
|
o("div", as, [
|
|
1266
1264
|
o("span", {
|
|
1267
1265
|
class: "truncate w-full",
|
|
1268
|
-
title:
|
|
1269
|
-
}, x(
|
|
1270
|
-
|
|
1266
|
+
title: C.label
|
|
1267
|
+
}, x(C.label), 9, ns),
|
|
1268
|
+
C.description ? (s(), l("span", {
|
|
1271
1269
|
key: 0,
|
|
1272
1270
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
1273
|
-
title:
|
|
1274
|
-
}, x(
|
|
1271
|
+
title: C.description
|
|
1272
|
+
}, x(C.description), 9, rs)) : m("", !0)
|
|
1275
1273
|
])
|
|
1276
1274
|
], !0)
|
|
1277
1275
|
]),
|
|
1278
|
-
|
|
1279
|
-
V(d.$slots, `suffix-${
|
|
1280
|
-
|
|
1276
|
+
C.suffix || C.shortcut || d.$slots[`suffix-${C.id}`] ? (s(), l("span", is, [
|
|
1277
|
+
V(d.$slots, `suffix-${C.id}`, { item: C }, () => [
|
|
1278
|
+
C.shortcut ? (s(), l("span", ds, x(C.shortcut), 1)) : C.suffix ? (s(), l("span", us, x(C.suffix), 1)) : m("", !0)
|
|
1281
1279
|
], !0)
|
|
1282
|
-
])) :
|
|
1283
|
-
|
|
1280
|
+
])) : m("", !0),
|
|
1281
|
+
C.children && C.children.length > 0 ? (s(), l("svg", cs, [...w[2] || (w[2] = [
|
|
1284
1282
|
o("path", {
|
|
1285
1283
|
"stroke-linecap": "round",
|
|
1286
1284
|
"stroke-linejoin": "round",
|
|
1287
1285
|
"stroke-width": "2",
|
|
1288
1286
|
d: "M9 5l7 7-7 7"
|
|
1289
1287
|
}, null, -1)
|
|
1290
|
-
])])) :
|
|
1288
|
+
])])) : m("", !0)
|
|
1291
1289
|
], 10, ts))
|
|
1292
1290
|
], 64))), 128))
|
|
1293
1291
|
], !0)
|
|
1294
1292
|
], 2),
|
|
1295
1293
|
d.$slots.footer ? (s(), l("div", {
|
|
1296
1294
|
key: 1,
|
|
1297
|
-
class:
|
|
1295
|
+
class: c(g.value)
|
|
1298
1296
|
}, [
|
|
1299
1297
|
V(d.$slots, "footer", { close: k }, void 0, !0)
|
|
1300
|
-
], 2)) :
|
|
1301
|
-
], 6)) :
|
|
1298
|
+
], 2)) : m("", !0)
|
|
1299
|
+
], 6)) : m("", !0),
|
|
1302
1300
|
n.value && t.overlay ? (s(), l("div", {
|
|
1303
1301
|
key: 1,
|
|
1304
1302
|
class: "fixed inset-0 bg-black/20 z-40",
|
|
1305
1303
|
onClick: k
|
|
1306
|
-
})) :
|
|
1304
|
+
})) : m("", !0)
|
|
1307
1305
|
]))
|
|
1308
1306
|
], 2));
|
|
1309
1307
|
}
|
|
1310
|
-
}),
|
|
1308
|
+
}), Dl = /* @__PURE__ */ K(fs, [["__scopeId", "data-v-61176297"]]), vs = ["for"], ps = {
|
|
1311
1309
|
key: 0,
|
|
1312
1310
|
class: "text-danger-600"
|
|
1313
|
-
},
|
|
1311
|
+
}, gs = ["id", "disabled", "aria-expanded"], bs = { class: "flex-1 text-left truncate" }, ys = {
|
|
1314
1312
|
key: 0,
|
|
1315
1313
|
class: "p-2 border-b border-secondary-200"
|
|
1316
|
-
},
|
|
1314
|
+
}, ms = ["placeholder"], hs = { class: "max-h-64 overflow-y-auto" }, xs = {
|
|
1317
1315
|
key: 0,
|
|
1318
1316
|
class: "px-4 py-3 text-sm text-secondary-500 text-center"
|
|
1319
1317
|
}, ws = ["onClick"], ks = { class: "flex items-center justify-between w-full" }, $s = { class: "truncate" }, Cs = {
|
|
@@ -1354,15 +1352,15 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1354
1352
|
bordered: { type: Boolean, default: !0 }
|
|
1355
1353
|
},
|
|
1356
1354
|
emits: ["update:modelValue", "change", "action"],
|
|
1357
|
-
setup(t, { emit:
|
|
1358
|
-
const e = t,
|
|
1355
|
+
setup(t, { emit: b }) {
|
|
1356
|
+
const e = t, f = b, n = L(!1), u = L(""), v = L(null), a = r(
|
|
1359
1357
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
1360
1358
|
), h = r(() => e.options.find((M) => M.value === e.modelValue) || null), i = r(() => {
|
|
1361
1359
|
if (!e.searchable || !u.value)
|
|
1362
1360
|
return e.options;
|
|
1363
1361
|
const M = u.value.toLowerCase();
|
|
1364
1362
|
return e.options.filter((d) => d.label.toLowerCase().includes(M));
|
|
1365
|
-
}), p = r(() => "
|
|
1363
|
+
}), p = r(() => "ds-label"), g = r(() => e.bordered ? "border border-neutral-300 rounded-md" : "rounded-md"), T = r(() => {
|
|
1366
1364
|
const M = "w-full rounded-md flex items-center justify-between gap-2 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", d = {
|
|
1367
1365
|
sm: "px-3 py-1.5 text-sm",
|
|
1368
1366
|
md: "px-4 py-2 text-base",
|
|
@@ -1371,12 +1369,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1371
1369
|
default: "bg-white",
|
|
1372
1370
|
outline: "bg-transparent",
|
|
1373
1371
|
filled: "bg-secondary-100"
|
|
1374
|
-
},
|
|
1372
|
+
}, C = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
1375
1373
|
return [
|
|
1376
1374
|
M,
|
|
1377
1375
|
d[e.size],
|
|
1378
1376
|
w[e.variant],
|
|
1379
|
-
|
|
1377
|
+
C
|
|
1380
1378
|
].join(" ");
|
|
1381
1379
|
}), B = 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`), O = (M) => {
|
|
1382
1380
|
const d = "w-full px-4 py-2 text-left hover:bg-primary-50 transition-colors focus:outline-none focus:bg-primary-50 disabled:opacity-50 disabled:cursor-not-allowed", w = S(M) ? "bg-primary-50" : "";
|
|
@@ -1392,9 +1390,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1392
1390
|
}, k = () => {
|
|
1393
1391
|
n.value = !1, u.value = "";
|
|
1394
1392
|
}, I = (M) => {
|
|
1395
|
-
M.disabled || (
|
|
1396
|
-
},
|
|
1397
|
-
M.action && M.action(),
|
|
1393
|
+
M.disabled || (f("update:modelValue", M.value), f("change", M), k());
|
|
1394
|
+
}, Y = (M) => {
|
|
1395
|
+
M.action && M.action(), f("action", M), k();
|
|
1398
1396
|
}, N = (M) => {
|
|
1399
1397
|
const d = M.relatedTarget;
|
|
1400
1398
|
d && d.closest(".select-wrapper") || setTimeout(() => {
|
|
@@ -1406,23 +1404,23 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1406
1404
|
return ve(n, (M) => {
|
|
1407
1405
|
M && (u.value = "");
|
|
1408
1406
|
}), (M, d) => (s(), l("div", {
|
|
1409
|
-
class:
|
|
1407
|
+
class: c(["select-wrapper", { "w-full": t.fullWidth }])
|
|
1410
1408
|
}, [
|
|
1411
1409
|
t.label ? (s(), l("label", {
|
|
1412
1410
|
key: 0,
|
|
1413
1411
|
for: a.value,
|
|
1414
|
-
class:
|
|
1412
|
+
class: c(p.value)
|
|
1415
1413
|
}, [
|
|
1416
1414
|
q(x(t.label) + " ", 1),
|
|
1417
|
-
t.required ? (s(), l("span", ps, "*")) :
|
|
1418
|
-
], 10, vs)) :
|
|
1415
|
+
t.required ? (s(), l("span", ps, "*")) : m("", !0)
|
|
1416
|
+
], 10, vs)) : m("", !0),
|
|
1419
1417
|
o("div", {
|
|
1420
|
-
class:
|
|
1418
|
+
class: c(["relative", g.value])
|
|
1421
1419
|
}, [
|
|
1422
1420
|
o("button", {
|
|
1423
1421
|
id: a.value,
|
|
1424
1422
|
type: "button",
|
|
1425
|
-
class:
|
|
1423
|
+
class: c(T.value),
|
|
1426
1424
|
disabled: t.disabled,
|
|
1427
1425
|
"aria-expanded": n.value,
|
|
1428
1426
|
"aria-haspopup": !0,
|
|
@@ -1430,9 +1428,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1430
1428
|
onBlur: N,
|
|
1431
1429
|
onKeydown: te
|
|
1432
1430
|
}, [
|
|
1433
|
-
o("span",
|
|
1431
|
+
o("span", bs, x(h.value ? h.value.label : t.placeholder), 1),
|
|
1434
1432
|
(s(), l("svg", {
|
|
1435
|
-
class:
|
|
1433
|
+
class: c(["w-5 h-5 flex-shrink-0 transition-transform text-secondary-600", n.value ? "rotate-180" : ""]),
|
|
1436
1434
|
fill: "none",
|
|
1437
1435
|
stroke: "currentColor",
|
|
1438
1436
|
viewBox: "0 0 24 24",
|
|
@@ -1445,14 +1443,14 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1445
1443
|
d: "M19 9l-7 7-7-7"
|
|
1446
1444
|
}, null, -1)
|
|
1447
1445
|
])], 2))
|
|
1448
|
-
], 42,
|
|
1446
|
+
], 42, gs),
|
|
1449
1447
|
n.value ? (s(), l("div", {
|
|
1450
1448
|
key: 0,
|
|
1451
|
-
class:
|
|
1449
|
+
class: c(B.value),
|
|
1452
1450
|
onClick: d[2] || (d[2] = H(() => {
|
|
1453
1451
|
}, ["stop"]))
|
|
1454
1452
|
}, [
|
|
1455
|
-
t.searchable ? (s(), l("div",
|
|
1453
|
+
t.searchable ? (s(), l("div", ys, [
|
|
1456
1454
|
ue(o("input", {
|
|
1457
1455
|
ref_key: "searchInput",
|
|
1458
1456
|
ref: v,
|
|
@@ -1462,17 +1460,17 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1462
1460
|
placeholder: t.searchPlaceholder,
|
|
1463
1461
|
onKeydown: d[1] || (d[1] = H(() => {
|
|
1464
1462
|
}, ["stop"]))
|
|
1465
|
-
}, null, 40,
|
|
1463
|
+
}, null, 40, ms), [
|
|
1466
1464
|
[Ae, u.value]
|
|
1467
1465
|
])
|
|
1468
|
-
])) :
|
|
1466
|
+
])) : m("", !0),
|
|
1469
1467
|
o("div", hs, [
|
|
1470
1468
|
i.value.length === 0 ? (s(), l("div", xs, x(t.emptyText), 1)) : (s(), l(E, { key: 1 }, [
|
|
1471
1469
|
(s(!0), l(E, null, W(i.value, (w) => (s(), l("button", {
|
|
1472
1470
|
key: w.value,
|
|
1473
1471
|
type: "button",
|
|
1474
|
-
class:
|
|
1475
|
-
onClick: (
|
|
1472
|
+
class: c(O(w)),
|
|
1473
|
+
onClick: (C) => I(w)
|
|
1476
1474
|
}, [
|
|
1477
1475
|
o("div", ks, [
|
|
1478
1476
|
o("span", $s, x(w.label), 1),
|
|
@@ -1483,15 +1481,15 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1483
1481
|
"stroke-width": "2",
|
|
1484
1482
|
d: "M5 13l4 4L19 7"
|
|
1485
1483
|
}, null, -1)
|
|
1486
|
-
])])) :
|
|
1484
|
+
])])) : m("", !0)
|
|
1487
1485
|
])
|
|
1488
1486
|
], 10, ws))), 128)),
|
|
1489
|
-
t.actionItems.length > 0 ? (s(), l("div", Ms)) :
|
|
1487
|
+
t.actionItems.length > 0 ? (s(), l("div", Ms)) : m("", !0),
|
|
1490
1488
|
(s(!0), l(E, null, W(t.actionItems, (w) => (s(), l("button", {
|
|
1491
1489
|
key: w.id,
|
|
1492
1490
|
type: "button",
|
|
1493
|
-
class:
|
|
1494
|
-
onClick: (
|
|
1491
|
+
class: c(j(w)),
|
|
1492
|
+
onClick: (C) => Y(w)
|
|
1495
1493
|
}, [
|
|
1496
1494
|
w.icon ? (s(), l("svg", {
|
|
1497
1495
|
key: 0,
|
|
@@ -1501,22 +1499,22 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1501
1499
|
viewBox: "0 0 24 24",
|
|
1502
1500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1503
1501
|
innerHTML: w.icon
|
|
1504
|
-
}, null, 8, Bs)) :
|
|
1502
|
+
}, null, 8, Bs)) : m("", !0),
|
|
1505
1503
|
q(" " + x(w.label), 1)
|
|
1506
1504
|
], 10, Ds))), 128))
|
|
1507
1505
|
], 64))
|
|
1508
1506
|
])
|
|
1509
|
-
], 2)) :
|
|
1507
|
+
], 2)) : m("", !0)
|
|
1510
1508
|
], 2),
|
|
1511
|
-
t.error ? (s(), l("p", zs, x(t.error), 1)) : t.helperText ? (s(), l("p", Vs, x(t.helperText), 1)) :
|
|
1509
|
+
t.error ? (s(), l("p", zs, x(t.error), 1)) : t.helperText ? (s(), l("p", Vs, x(t.helperText), 1)) : m("", !0),
|
|
1512
1510
|
n.value ? (s(), l("div", {
|
|
1513
1511
|
key: 3,
|
|
1514
1512
|
onClick: k,
|
|
1515
1513
|
class: "fixed inset-0 z-40"
|
|
1516
|
-
})) :
|
|
1514
|
+
})) : m("", !0)
|
|
1517
1515
|
], 2));
|
|
1518
1516
|
}
|
|
1519
|
-
}),
|
|
1517
|
+
}), Bl = /* @__PURE__ */ K(Ts, [["__scopeId", "data-v-c22d5b94"]]), Ss = /* @__PURE__ */ P({
|
|
1520
1518
|
__name: "Sidebar",
|
|
1521
1519
|
props: {
|
|
1522
1520
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1531,12 +1529,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1531
1529
|
padding: { default: "md" }
|
|
1532
1530
|
},
|
|
1533
1531
|
emits: ["update:modelValue", "close", "open"],
|
|
1534
|
-
setup(t, { emit:
|
|
1535
|
-
const e = t,
|
|
1532
|
+
setup(t, { emit: b }) {
|
|
1533
|
+
const e = t, f = b, n = r({
|
|
1536
1534
|
get: () => e.modelValue,
|
|
1537
|
-
set: (B) =>
|
|
1535
|
+
set: (B) => f("update:modelValue", B)
|
|
1538
1536
|
}), u = () => {
|
|
1539
|
-
e.persistent || (n.value = !1,
|
|
1537
|
+
e.persistent || (n.value = !1, f("close"));
|
|
1540
1538
|
}, v = r(() => e.position === "left" ? "slide-right" : "slide-left"), a = r(() => {
|
|
1541
1539
|
const B = "fixed top-0 h-full z-50 flex flex-col w-full max-w-full sm:max-w-none", O = e.position === "left" ? "left-0" : "right-0", j = 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)]" : "";
|
|
1542
1540
|
return [B, O, j].filter(Boolean).join(" ");
|
|
@@ -1552,7 +1550,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1552
1550
|
sm: "p-2",
|
|
1553
1551
|
md: "p-4",
|
|
1554
1552
|
lg: "p-6"
|
|
1555
|
-
}, p = r(() => `flex items-center justify-between border-b border-gray-200 ${i[e.padding]}`),
|
|
1553
|
+
}, p = r(() => `flex items-center justify-between border-b border-gray-200 ${i[e.padding]}`), g = r(() => `flex-1 overflow-y-auto ${i[e.padding]}`), T = r(() => `border-t border-gray-200 ${i[e.padding]}`);
|
|
1556
1554
|
return (B, O) => (s(), ee(pe, { to: "body" }, [
|
|
1557
1555
|
G(ce, { name: "fade" }, {
|
|
1558
1556
|
default: ae(() => [
|
|
@@ -1561,7 +1559,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1561
1559
|
onClick: u,
|
|
1562
1560
|
class: "fixed inset-0 bg-black/50 z-40",
|
|
1563
1561
|
style: Q({ top: t.overlayTop })
|
|
1564
|
-
}, null, 4)) :
|
|
1562
|
+
}, null, 4)) : m("", !0)
|
|
1565
1563
|
]),
|
|
1566
1564
|
_: 1
|
|
1567
1565
|
}),
|
|
@@ -1569,12 +1567,12 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1569
1567
|
default: ae(() => [
|
|
1570
1568
|
n.value ? (s(), l("aside", {
|
|
1571
1569
|
key: 0,
|
|
1572
|
-
class:
|
|
1570
|
+
class: c(a.value),
|
|
1573
1571
|
style: Q(h.value)
|
|
1574
1572
|
}, [
|
|
1575
1573
|
B.$slots.header ? (s(), l("div", {
|
|
1576
1574
|
key: 0,
|
|
1577
|
-
class:
|
|
1575
|
+
class: c(p.value)
|
|
1578
1576
|
}, [
|
|
1579
1577
|
V(B.$slots, "header", {}, void 0, !0),
|
|
1580
1578
|
t.closable ? (s(), l("button", {
|
|
@@ -1596,29 +1594,29 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1596
1594
|
d: "M6 18L18 6M6 6l12 12"
|
|
1597
1595
|
})
|
|
1598
1596
|
], -1)
|
|
1599
|
-
])])) :
|
|
1600
|
-
], 2)) :
|
|
1597
|
+
])])) : m("", !0)
|
|
1598
|
+
], 2)) : m("", !0),
|
|
1601
1599
|
o("div", {
|
|
1602
|
-
class:
|
|
1600
|
+
class: c(g.value)
|
|
1603
1601
|
}, [
|
|
1604
1602
|
V(B.$slots, "default", {}, void 0, !0)
|
|
1605
1603
|
], 2),
|
|
1606
1604
|
B.$slots.footer ? (s(), l("div", {
|
|
1607
1605
|
key: 1,
|
|
1608
|
-
class:
|
|
1606
|
+
class: c(T.value)
|
|
1609
1607
|
}, [
|
|
1610
1608
|
V(B.$slots, "footer", {}, void 0, !0)
|
|
1611
|
-
], 2)) :
|
|
1612
|
-
], 6)) :
|
|
1609
|
+
], 2)) : m("", !0)
|
|
1610
|
+
], 6)) : m("", !0)
|
|
1613
1611
|
]),
|
|
1614
1612
|
_: 3
|
|
1615
1613
|
}, 8, ["name"])
|
|
1616
1614
|
]));
|
|
1617
1615
|
}
|
|
1618
|
-
}),
|
|
1616
|
+
}), zl = /* @__PURE__ */ K(Ss, [["__scopeId", "data-v-b208234c"]]), Is = { class: "w-full space-y-4" }, js = { class: "flex flex-col gap-3 md:hidden" }, Ls = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, Os = { class: "text-sm text-gray-700" }, Fs = {
|
|
1619
1617
|
key: 0,
|
|
1620
1618
|
class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
|
|
1621
|
-
},
|
|
1619
|
+
}, Ys = { class: "hidden md:block w-full overflow-x-auto" }, _s = { class: "w-full border-collapse" }, As = { class: "w-full" }, Es = ["onClick"], Ps = { class: "flex items-center gap-2" }, qs = {
|
|
1622
1620
|
key: 0,
|
|
1623
1621
|
class: "text-xs text-gray-400"
|
|
1624
1622
|
}, Rs = { key: 0 }, Ns = { key: 1 }, Ws = { class: "w-full" }, Hs = {
|
|
@@ -1638,68 +1636,68 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1638
1636
|
rowClass: { default: void 0 }
|
|
1639
1637
|
},
|
|
1640
1638
|
setup(t) {
|
|
1641
|
-
const
|
|
1642
|
-
e.value === a ?
|
|
1639
|
+
const b = t, e = L(null), f = L("asc"), n = (a) => {
|
|
1640
|
+
e.value === a ? f.value = f.value === "asc" ? "desc" : "asc" : (e.value = a, f.value = "asc");
|
|
1643
1641
|
}, u = r(() => {
|
|
1644
1642
|
if (!e.value)
|
|
1645
|
-
return
|
|
1646
|
-
const a = [...
|
|
1643
|
+
return b.data;
|
|
1644
|
+
const a = [...b.data];
|
|
1647
1645
|
return a.sort((h, i) => {
|
|
1648
|
-
const p = h[e.value],
|
|
1649
|
-
return typeof p == "string" && typeof
|
|
1646
|
+
const p = h[e.value], g = i[e.value];
|
|
1647
|
+
return typeof p == "string" && typeof g == "string" ? f.value === "asc" ? p.localeCompare(g) : g.localeCompare(p) : typeof p == "number" && typeof g == "number" ? f.value === "asc" ? p - g : g - p : 0;
|
|
1650
1648
|
}), a;
|
|
1651
|
-
}), v = r(() =>
|
|
1649
|
+
}), v = r(() => b.columns.filter((a) => !a.hideOnMobile));
|
|
1652
1650
|
return (a, h) => (s(), l("div", Is, [
|
|
1653
1651
|
o("div", js, [
|
|
1654
1652
|
(s(!0), l(E, null, W(u.value, (i, p) => (s(), l("div", {
|
|
1655
1653
|
key: `card-${p}`,
|
|
1656
1654
|
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
1657
1655
|
}, [
|
|
1658
|
-
(s(!0), l(E, null, W(v.value, (
|
|
1659
|
-
key: `card-${p}-${
|
|
1656
|
+
(s(!0), l(E, null, W(v.value, (g) => (s(), l("div", {
|
|
1657
|
+
key: `card-${p}-${g.key}`,
|
|
1660
1658
|
class: "flex flex-col gap-1 py-1"
|
|
1661
1659
|
}, [
|
|
1662
|
-
o("span", Ls, x(
|
|
1660
|
+
o("span", Ls, x(g.label), 1),
|
|
1663
1661
|
o("span", Os, [
|
|
1664
|
-
V(a.$slots, `cell-${
|
|
1665
|
-
value: i[
|
|
1662
|
+
V(a.$slots, `cell-${g.key}`, {
|
|
1663
|
+
value: i[g.key],
|
|
1666
1664
|
row: i
|
|
1667
1665
|
}, () => [
|
|
1668
|
-
q(x(i[
|
|
1666
|
+
q(x(i[g.key]), 1)
|
|
1669
1667
|
], !0)
|
|
1670
1668
|
])
|
|
1671
1669
|
]))), 128))
|
|
1672
1670
|
]))), 128)),
|
|
1673
|
-
u.value.length === 0 ? (s(), l("div",
|
|
1671
|
+
u.value.length === 0 ? (s(), l("div", Fs, [
|
|
1674
1672
|
V(a.$slots, "empty", {}, () => [
|
|
1675
1673
|
h[0] || (h[0] = q("No hay datos disponibles", -1))
|
|
1676
1674
|
], !0)
|
|
1677
|
-
])) :
|
|
1675
|
+
])) : m("", !0)
|
|
1678
1676
|
]),
|
|
1679
|
-
o("div",
|
|
1680
|
-
o("table",
|
|
1677
|
+
o("div", Ys, [
|
|
1678
|
+
o("table", _s, [
|
|
1681
1679
|
o("thead", As, [
|
|
1682
1680
|
o("tr", {
|
|
1683
|
-
class:
|
|
1681
|
+
class: c([
|
|
1684
1682
|
"w-full",
|
|
1685
|
-
|
|
1683
|
+
b.headerClass || "bg-neutral-50 border-b border-gray-100"
|
|
1686
1684
|
])
|
|
1687
1685
|
}, [
|
|
1688
1686
|
(s(!0), l(E, null, W(t.columns, (i) => (s(), l("th", {
|
|
1689
1687
|
key: i.key,
|
|
1690
1688
|
style: Q(i.width ? { width: i.width } : {}),
|
|
1691
|
-
class:
|
|
1689
|
+
class: c([
|
|
1692
1690
|
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
1693
1691
|
i.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
1694
|
-
|
|
1692
|
+
b.headerCellClass
|
|
1695
1693
|
]),
|
|
1696
1694
|
onClick: (p) => i.sortable && n(i.key)
|
|
1697
1695
|
}, [
|
|
1698
1696
|
o("div", Ps, [
|
|
1699
1697
|
o("span", null, x(i.label), 1),
|
|
1700
1698
|
i.sortable ? (s(), l("span", qs, [
|
|
1701
|
-
e.value !== i.key ? (s(), l("span", Rs, "⇅")) : (s(), l("span", Ns, x(
|
|
1702
|
-
])) :
|
|
1699
|
+
e.value !== i.key ? (s(), l("span", Rs, "⇅")) : (s(), l("span", Ns, x(f.value === "asc" ? "↑" : "↓"), 1))
|
|
1700
|
+
])) : m("", !0)
|
|
1703
1701
|
])
|
|
1704
1702
|
], 14, Es))), 128))
|
|
1705
1703
|
], 2)
|
|
@@ -1707,23 +1705,23 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1707
1705
|
o("tbody", Ws, [
|
|
1708
1706
|
(s(!0), l(E, null, W(u.value, (i, p) => (s(), l("tr", {
|
|
1709
1707
|
key: p,
|
|
1710
|
-
class:
|
|
1708
|
+
class: c([
|
|
1711
1709
|
"w-full border-b border-gray-200 hover:bg-gray-50 transition-colors",
|
|
1712
|
-
|
|
1710
|
+
b.rowClass
|
|
1713
1711
|
])
|
|
1714
1712
|
}, [
|
|
1715
|
-
(s(!0), l(E, null, W(t.columns, (
|
|
1716
|
-
key: `${p}-${
|
|
1717
|
-
class:
|
|
1713
|
+
(s(!0), l(E, null, W(t.columns, (g) => (s(), l("td", {
|
|
1714
|
+
key: `${p}-${g.key}`,
|
|
1715
|
+
class: c([
|
|
1718
1716
|
"px-4 py-3 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
|
|
1719
|
-
|
|
1717
|
+
b.cellClass
|
|
1720
1718
|
])
|
|
1721
1719
|
}, [
|
|
1722
|
-
V(a.$slots, `cell-${
|
|
1723
|
-
value: i[
|
|
1720
|
+
V(a.$slots, `cell-${g.key}`, {
|
|
1721
|
+
value: i[g.key],
|
|
1724
1722
|
row: i
|
|
1725
1723
|
}, () => [
|
|
1726
|
-
q(x(i[
|
|
1724
|
+
q(x(i[g.key]), 1)
|
|
1727
1725
|
], !0)
|
|
1728
1726
|
], 2))), 128))
|
|
1729
1727
|
], 2))), 128))
|
|
@@ -1733,57 +1731,61 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1733
1731
|
V(a.$slots, "empty", {}, () => [
|
|
1734
1732
|
h[1] || (h[1] = q("No hay datos disponibles", -1))
|
|
1735
1733
|
], !0)
|
|
1736
|
-
])) :
|
|
1734
|
+
])) : m("", !0)
|
|
1737
1735
|
]),
|
|
1738
1736
|
a.$slots.footer ? (s(), l("div", Ks, [
|
|
1739
1737
|
V(a.$slots, "footer", {}, void 0, !0)
|
|
1740
|
-
])) :
|
|
1738
|
+
])) : m("", !0)
|
|
1741
1739
|
]));
|
|
1742
1740
|
}
|
|
1743
|
-
}),
|
|
1741
|
+
}), Vl = /* @__PURE__ */ K(Us, [["__scopeId", "data-v-8e7ce66d"]]), Js = { class: "tabs-wrapper" }, Gs = {
|
|
1744
1742
|
class: "tabs-container",
|
|
1745
1743
|
role: "tablist"
|
|
1746
|
-
}, Qs =
|
|
1747
|
-
class: "w-full",
|
|
1748
|
-
role: "tabpanel"
|
|
1749
|
-
}, el = "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base font-semibold tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500 border-b-2", tl = "text-primary-600 border-primary-600", sl = "hover:text-secondary-700 border-gray-100", ll = /* @__PURE__ */ P({
|
|
1744
|
+
}, Qs = ["aria-selected", "onClick"], Zs = "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", Xs = "text-primary-600 border-primary-600 font-semibold", el = "hover:text-secondary-700 border-transparent font-normal", tl = /* @__PURE__ */ P({
|
|
1750
1745
|
__name: "Tabs",
|
|
1751
1746
|
props: {
|
|
1752
1747
|
modelValue: {},
|
|
1753
|
-
tabs: {}
|
|
1748
|
+
tabs: {},
|
|
1749
|
+
headerClass: {},
|
|
1750
|
+
contentClass: {}
|
|
1754
1751
|
},
|
|
1755
1752
|
emits: ["update:modelValue"],
|
|
1756
|
-
setup(t, { emit:
|
|
1757
|
-
const e = t,
|
|
1758
|
-
n(h) ||
|
|
1753
|
+
setup(t, { emit: b }) {
|
|
1754
|
+
const e = t, f = b, n = (h) => e.modelValue === h, u = (h) => {
|
|
1755
|
+
n(h) || f("update:modelValue", h);
|
|
1759
1756
|
}, v = r(() => e.modelValue), a = r(
|
|
1760
1757
|
() => e.tabs.find((h) => h.value === v.value)
|
|
1761
1758
|
);
|
|
1762
1759
|
return (h, i) => (s(), l("div", Js, [
|
|
1763
|
-
o("div",
|
|
1764
|
-
|
|
1760
|
+
o("div", {
|
|
1761
|
+
class: c(["tabs-header", t.headerClass])
|
|
1762
|
+
}, [
|
|
1763
|
+
o("div", Gs, [
|
|
1765
1764
|
(s(!0), l(E, null, W(t.tabs, (p) => (s(), l("button", {
|
|
1766
1765
|
key: p.value,
|
|
1767
1766
|
type: "button",
|
|
1768
|
-
class:
|
|
1769
|
-
|
|
1770
|
-
n(p.value) ?
|
|
1767
|
+
class: c([
|
|
1768
|
+
Zs,
|
|
1769
|
+
n(p.value) ? Xs : el
|
|
1771
1770
|
]),
|
|
1772
1771
|
"aria-selected": n(p.value),
|
|
1773
1772
|
role: "tab",
|
|
1774
|
-
onClick: (
|
|
1775
|
-
}, x(p.label), 11,
|
|
1773
|
+
onClick: (g) => u(p.value)
|
|
1774
|
+
}, x(p.label), 11, Qs))), 128))
|
|
1776
1775
|
])
|
|
1777
|
-
]),
|
|
1778
|
-
o("div",
|
|
1776
|
+
], 2),
|
|
1777
|
+
o("div", {
|
|
1778
|
+
class: c(["tabs-content", t.contentClass]),
|
|
1779
|
+
role: "tabpanel"
|
|
1780
|
+
}, [
|
|
1779
1781
|
V(h.$slots, v.value, {
|
|
1780
1782
|
active: v.value,
|
|
1781
1783
|
tab: a.value
|
|
1782
1784
|
}, void 0, !0)
|
|
1783
|
-
])
|
|
1785
|
+
], 2)
|
|
1784
1786
|
]));
|
|
1785
1787
|
}
|
|
1786
|
-
}),
|
|
1788
|
+
}), Tl = /* @__PURE__ */ K(tl, [["__scopeId", "data-v-c7c56f28"]]), sl = "font-sans", Sl = /* @__PURE__ */ P({
|
|
1787
1789
|
__name: "Text",
|
|
1788
1790
|
props: {
|
|
1789
1791
|
variant: { default: "body1" },
|
|
@@ -1795,7 +1797,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1795
1797
|
weight: {}
|
|
1796
1798
|
},
|
|
1797
1799
|
setup(t) {
|
|
1798
|
-
const
|
|
1800
|
+
const b = {
|
|
1799
1801
|
h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
|
|
1800
1802
|
h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
|
|
1801
1803
|
h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
|
|
@@ -1835,7 +1837,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1835
1837
|
button3: "span",
|
|
1836
1838
|
caption: "span",
|
|
1837
1839
|
overline: "span"
|
|
1838
|
-
},
|
|
1840
|
+
}, f = {
|
|
1839
1841
|
left: "text-left",
|
|
1840
1842
|
center: "text-center",
|
|
1841
1843
|
right: "text-right",
|
|
@@ -1855,14 +1857,14 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1855
1857
|
semibold: "font-semibold",
|
|
1856
1858
|
bold: "font-bold",
|
|
1857
1859
|
extrabold: "font-extrabold"
|
|
1858
|
-
}, v = t, a = r(() => v.variant), h = r(() => v.color), i = r(() => v.align), p = r(() => v.as || e[a.value] || "span"),
|
|
1860
|
+
}, v = t, a = r(() => v.variant), h = r(() => v.color), i = r(() => v.align), p = r(() => v.as || e[a.value] || "span"), g = r(() => v.weight ? u[v.weight] : "");
|
|
1859
1861
|
return (T, B) => (s(), ee(Me(p.value), {
|
|
1860
|
-
class:
|
|
1861
|
-
|
|
1862
|
-
|
|
1862
|
+
class: c([
|
|
1863
|
+
sl,
|
|
1864
|
+
b[a.value],
|
|
1863
1865
|
n[h.value],
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
+
f[i.value],
|
|
1867
|
+
g.value,
|
|
1866
1868
|
{
|
|
1867
1869
|
uppercase: t.uppercase || a.value === "overline",
|
|
1868
1870
|
truncate: t.truncate
|
|
@@ -1875,17 +1877,17 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1875
1877
|
_: 3
|
|
1876
1878
|
}, 8, ["class"]));
|
|
1877
1879
|
}
|
|
1878
|
-
}),
|
|
1880
|
+
}), ll = { class: "w-full flex items-center justify-between gap-3 py-2" }, ol = {
|
|
1879
1881
|
key: 0,
|
|
1880
1882
|
class: "text-xs text-secondary-600"
|
|
1881
|
-
},
|
|
1883
|
+
}, al = { key: 0 }, nl = {
|
|
1882
1884
|
class: "ml-auto inline-flex items-center gap-1",
|
|
1883
1885
|
role: "navigation",
|
|
1884
1886
|
"aria-label": "Pagination"
|
|
1885
|
-
},
|
|
1887
|
+
}, rl = ["disabled"], il = {
|
|
1886
1888
|
key: 0,
|
|
1887
1889
|
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text-secondary-500"
|
|
1888
|
-
},
|
|
1890
|
+
}, dl = ["aria-label", "onClick"], ul = ["disabled"], cl = /* @__PURE__ */ P({
|
|
1889
1891
|
__name: "Pagination",
|
|
1890
1892
|
props: {
|
|
1891
1893
|
modelValue: { default: 1 },
|
|
@@ -1898,62 +1900,62 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1898
1900
|
itemLabel: { default: "" }
|
|
1899
1901
|
},
|
|
1900
1902
|
emits: ["update:modelValue", "change"],
|
|
1901
|
-
setup(t, { emit:
|
|
1902
|
-
const e = t,
|
|
1903
|
-
const
|
|
1904
|
-
return
|
|
1903
|
+
setup(t, { emit: b }) {
|
|
1904
|
+
const e = t, f = b, n = r(() => {
|
|
1905
|
+
const g = Math.ceil(e.totalItems / e.pageSize);
|
|
1906
|
+
return g > 0 ? g : 1;
|
|
1905
1907
|
}), u = r(() => {
|
|
1906
|
-
const
|
|
1907
|
-
return
|
|
1908
|
+
const g = Number(e.modelValue || 1);
|
|
1909
|
+
return g < 1 ? 1 : g > n.value ? n.value : g;
|
|
1908
1910
|
}), v = r(() => e.totalItems === 0 ? 0 : (u.value - 1) * e.pageSize + 1), a = r(() => Math.min(u.value * e.pageSize, e.totalItems)), h = r(() => `Mostrando ${v.value} a ${a.value} de ${e.totalItems}`), i = r(() => {
|
|
1909
|
-
const
|
|
1910
|
-
if (
|
|
1911
|
-
return Array.from({ length:
|
|
1911
|
+
const g = n.value, T = Math.max(3, e.maxPages), B = u.value;
|
|
1912
|
+
if (g <= T)
|
|
1913
|
+
return Array.from({ length: g }, (k, I) => I + 1);
|
|
1912
1914
|
const O = Math.floor(T / 2);
|
|
1913
|
-
let j = Math.max(1, B - O), S = Math.min(
|
|
1915
|
+
let j = Math.max(1, B - O), S = Math.min(g, j + T - 1);
|
|
1914
1916
|
j = Math.max(1, Math.min(j, S - T + 1));
|
|
1915
1917
|
const D = [];
|
|
1916
1918
|
j > 1 && (D.push(1), j > 2 && D.push("…"));
|
|
1917
1919
|
for (let k = j; k <= S; k++)
|
|
1918
1920
|
D.push(k);
|
|
1919
|
-
return S <
|
|
1921
|
+
return S < g && (S < g - 1 && D.push("…"), D.push(g)), D;
|
|
1920
1922
|
});
|
|
1921
|
-
function p(
|
|
1922
|
-
const T = Math.max(1, Math.min(
|
|
1923
|
-
T !== u.value && (
|
|
1923
|
+
function p(g) {
|
|
1924
|
+
const T = Math.max(1, Math.min(g, n.value));
|
|
1925
|
+
T !== u.value && (f("update:modelValue", T), f("change", T));
|
|
1924
1926
|
}
|
|
1925
|
-
return (
|
|
1926
|
-
t.showSummary ? (s(), l("div",
|
|
1927
|
-
V(
|
|
1927
|
+
return (g, T) => (s(), l("div", ll, [
|
|
1928
|
+
t.showSummary ? (s(), l("div", ol, [
|
|
1929
|
+
V(g.$slots, "summary", {
|
|
1928
1930
|
start: v.value,
|
|
1929
1931
|
end: a.value,
|
|
1930
1932
|
total: t.totalItems
|
|
1931
1933
|
}, () => [
|
|
1932
1934
|
q(x(h.value), 1),
|
|
1933
|
-
t.itemLabel ? (s(), l("span",
|
|
1935
|
+
t.itemLabel ? (s(), l("span", al, x(t.itemLabel), 1)) : m("", !0)
|
|
1934
1936
|
], !0)
|
|
1935
|
-
])) :
|
|
1936
|
-
o("nav",
|
|
1937
|
+
])) : m("", !0),
|
|
1938
|
+
o("nav", nl, [
|
|
1937
1939
|
o("button", {
|
|
1938
1940
|
type: "button",
|
|
1939
1941
|
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",
|
|
1940
1942
|
disabled: u.value <= 1,
|
|
1941
1943
|
onClick: T[0] || (T[0] = (B) => p(u.value - 1)),
|
|
1942
1944
|
"aria-label": "Anterior"
|
|
1943
|
-
}, x(t.previousText), 9,
|
|
1945
|
+
}, x(t.previousText), 9, rl),
|
|
1944
1946
|
(s(!0), l(E, null, W(i.value, (B, O) => (s(), l(E, {
|
|
1945
1947
|
key: `page-${O}-${B}`
|
|
1946
1948
|
}, [
|
|
1947
|
-
B === "…" ? (s(), l("span",
|
|
1949
|
+
B === "…" ? (s(), l("span", il, " … ")) : (s(), l("button", {
|
|
1948
1950
|
key: 1,
|
|
1949
1951
|
type: "button",
|
|
1950
1952
|
"aria-label": `Página ${B}`,
|
|
1951
|
-
class:
|
|
1953
|
+
class: c([
|
|
1952
1954
|
"h-8 min-w-8 px-3 rounded-full text-sm font-semibold transition-colors",
|
|
1953
1955
|
B === u.value ? "bg-primary-500 text-white" : "text-secondary-700 hover:bg-secondary-100"
|
|
1954
1956
|
]),
|
|
1955
1957
|
onClick: (j) => p(B)
|
|
1956
|
-
}, x(B), 11,
|
|
1958
|
+
}, x(B), 11, dl))
|
|
1957
1959
|
], 64))), 128)),
|
|
1958
1960
|
o("button", {
|
|
1959
1961
|
type: "button",
|
|
@@ -1961,14 +1963,14 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1961
1963
|
disabled: u.value >= n.value,
|
|
1962
1964
|
onClick: T[1] || (T[1] = (B) => p(u.value + 1)),
|
|
1963
1965
|
"aria-label": "Siguiente"
|
|
1964
|
-
}, x(t.nextText), 9,
|
|
1966
|
+
}, x(t.nextText), 9, ul)
|
|
1965
1967
|
])
|
|
1966
1968
|
]));
|
|
1967
1969
|
}
|
|
1968
|
-
}),
|
|
1970
|
+
}), Il = /* @__PURE__ */ K(cl, [["__scopeId", "data-v-87417cc4"]]), fl = ["data-node-id"], vl = { class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center" }, pl = {
|
|
1969
1971
|
key: 1,
|
|
1970
1972
|
class: "flex justify-end gap-1 px-6 pb-6 pt-4"
|
|
1971
|
-
},
|
|
1973
|
+
}, jl = /* @__PURE__ */ P({
|
|
1972
1974
|
__name: "Alert",
|
|
1973
1975
|
props: {
|
|
1974
1976
|
variant: {},
|
|
@@ -1981,9 +1983,9 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1981
1983
|
stackOn: {}
|
|
1982
1984
|
},
|
|
1983
1985
|
emits: ["close", "accept", "cancel"],
|
|
1984
|
-
setup(t, { emit:
|
|
1985
|
-
const e =
|
|
1986
|
-
if (
|
|
1986
|
+
setup(t, { emit: b }) {
|
|
1987
|
+
const e = b, f = t, n = r(() => f.variant ?? "info"), u = r(() => f.multiline ?? !1), v = r(() => f.actions ?? !1), a = r(() => f.nodeId ?? void 0), h = () => e("close"), i = r(() => {
|
|
1988
|
+
if (f.title) return f.title;
|
|
1987
1989
|
switch (n.value) {
|
|
1988
1990
|
case "info":
|
|
1989
1991
|
return "Alerta de información";
|
|
@@ -1994,7 +1996,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
1994
1996
|
case "error":
|
|
1995
1997
|
return "Alerta de error";
|
|
1996
1998
|
}
|
|
1997
|
-
}), p = r(() =>
|
|
1999
|
+
}), p = r(() => f.description ?? ""), g = r(() => {
|
|
1998
2000
|
switch (n.value) {
|
|
1999
2001
|
case "info":
|
|
2000
2002
|
return {
|
|
@@ -2023,18 +2025,18 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2023
2025
|
}
|
|
2024
2026
|
}), T = r(() => "bg-[var(--color-primario/700,#269ea4)]"), B = r(() => {
|
|
2025
2027
|
const S = "flex w-full items-start gap-4 flex-col";
|
|
2026
|
-
if (!
|
|
2027
|
-
const D =
|
|
2028
|
+
if (!f.stackOn) return `${S} sm:flex-row sm:items-center`;
|
|
2029
|
+
const D = f.stackOn, k = `${D}:flex-row ${D}:items-center`;
|
|
2028
2030
|
return `${S} ${k}`;
|
|
2029
2031
|
}), O = r(() => {
|
|
2030
|
-
if (!
|
|
2031
|
-
const S =
|
|
2032
|
+
if (!f.stackOn) return "flex-col sm:flex-row items-start sm:items-center";
|
|
2033
|
+
const S = f.stackOn;
|
|
2032
2034
|
return `flex-col ${S}:flex-row items-start ${S}:items-center`;
|
|
2033
|
-
}), j = r(() =>
|
|
2035
|
+
}), j = r(() => f.stackOn ? `self-start ${f.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
2034
2036
|
return (S, D) => (s(), l("div", {
|
|
2035
|
-
class:
|
|
2036
|
-
|
|
2037
|
-
|
|
2037
|
+
class: c(["relative w-full rounded-xl border", [
|
|
2038
|
+
g.value.border,
|
|
2039
|
+
g.value.bg
|
|
2038
2040
|
]]),
|
|
2039
2041
|
role: "alert",
|
|
2040
2042
|
"data-node-id": a.value
|
|
@@ -2070,14 +2072,14 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2070
2072
|
y2: "18"
|
|
2071
2073
|
})
|
|
2072
2074
|
], -1)
|
|
2073
|
-
])])) :
|
|
2075
|
+
])])) : m("", !0),
|
|
2074
2076
|
o("div", {
|
|
2075
|
-
class:
|
|
2077
|
+
class: c(["p-6", { "pb-0": v.value }])
|
|
2076
2078
|
}, [
|
|
2077
2079
|
o("div", {
|
|
2078
|
-
class:
|
|
2080
|
+
class: c(B.value)
|
|
2079
2081
|
}, [
|
|
2080
|
-
o("div",
|
|
2082
|
+
o("div", vl, [
|
|
2081
2083
|
n.value === "info" ? (s(), l("svg", {
|
|
2082
2084
|
key: 0,
|
|
2083
2085
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2085,7 +2087,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2085
2087
|
height: "24",
|
|
2086
2088
|
viewBox: "0 0 24 24",
|
|
2087
2089
|
fill: "none",
|
|
2088
|
-
class:
|
|
2090
|
+
class: c(g.value.icon),
|
|
2089
2091
|
stroke: "currentColor",
|
|
2090
2092
|
"stroke-width": "2",
|
|
2091
2093
|
"stroke-linecap": "round",
|
|
@@ -2115,7 +2117,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2115
2117
|
height: "24",
|
|
2116
2118
|
viewBox: "0 0 24 24",
|
|
2117
2119
|
fill: "none",
|
|
2118
|
-
class:
|
|
2120
|
+
class: c(g.value.icon),
|
|
2119
2121
|
stroke: "currentColor",
|
|
2120
2122
|
"stroke-width": "2",
|
|
2121
2123
|
"stroke-linecap": "round",
|
|
@@ -2141,7 +2143,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2141
2143
|
height: "24",
|
|
2142
2144
|
viewBox: "0 0 24 24",
|
|
2143
2145
|
fill: "none",
|
|
2144
|
-
class:
|
|
2146
|
+
class: c(g.value.icon),
|
|
2145
2147
|
stroke: "currentColor",
|
|
2146
2148
|
"stroke-width": "2",
|
|
2147
2149
|
"stroke-linecap": "round",
|
|
@@ -2156,7 +2158,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2156
2158
|
height: "24",
|
|
2157
2159
|
viewBox: "0 0 24 24",
|
|
2158
2160
|
fill: "none",
|
|
2159
|
-
class:
|
|
2161
|
+
class: c(g.value.icon),
|
|
2160
2162
|
stroke: "currentColor",
|
|
2161
2163
|
"stroke-width": "2",
|
|
2162
2164
|
"stroke-linecap": "round",
|
|
@@ -2178,13 +2180,13 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2178
2180
|
])], 2))
|
|
2179
2181
|
]),
|
|
2180
2182
|
o("div", {
|
|
2181
|
-
class:
|
|
2183
|
+
class: c(["flex-1 flex gap-4 text-[14px]", [O.value, t.closable ? "pr-6" : "", { "whitespace-nowrap": !u.value, "whitespace-pre-wrap": u.value }]])
|
|
2182
2184
|
}, [
|
|
2183
2185
|
o("div", {
|
|
2184
|
-
class:
|
|
2186
|
+
class: c(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", j.value])
|
|
2185
2187
|
}, x(i.value), 3),
|
|
2186
2188
|
o("div", {
|
|
2187
|
-
class:
|
|
2189
|
+
class: c(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !u.value }])
|
|
2188
2190
|
}, [
|
|
2189
2191
|
V(S.$slots, "description", {}, () => [
|
|
2190
2192
|
q(x(p.value), 1)
|
|
@@ -2193,7 +2195,7 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2193
2195
|
], 2)
|
|
2194
2196
|
], 2)
|
|
2195
2197
|
], 2),
|
|
2196
|
-
v.value ? (s(), l("div",
|
|
2198
|
+
v.value ? (s(), l("div", pl, [
|
|
2197
2199
|
o("button", {
|
|
2198
2200
|
type: "button",
|
|
2199
2201
|
class: "px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
@@ -2205,33 +2207,33 @@ const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
|
2205
2207
|
]),
|
|
2206
2208
|
o("button", {
|
|
2207
2209
|
type: "button",
|
|
2208
|
-
class:
|
|
2210
|
+
class: c(["px-4 py-1.5 rounded-[18px] text-[14px] tracking-[1.25px] font-bold text-white", T.value]),
|
|
2209
2211
|
onClick: D[1] || (D[1] = (k) => S.$emit("accept"))
|
|
2210
2212
|
}, [
|
|
2211
2213
|
V(S.$slots, "accept", {}, () => [
|
|
2212
2214
|
D[8] || (D[8] = q("Aceptar", -1))
|
|
2213
2215
|
])
|
|
2214
2216
|
], 2)
|
|
2215
|
-
])) :
|
|
2216
|
-
], 10,
|
|
2217
|
+
])) : m("", !0)
|
|
2218
|
+
], 10, fl));
|
|
2217
2219
|
}
|
|
2218
2220
|
});
|
|
2219
2221
|
export {
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2222
|
+
jl as Alert,
|
|
2223
|
+
ml as AppBar,
|
|
2224
|
+
hl as Button,
|
|
2225
|
+
xl as Calendar,
|
|
2226
|
+
wl as Card,
|
|
2227
|
+
kl as Dialog,
|
|
2228
|
+
$l as FileUpload,
|
|
2227
2229
|
se as Icon,
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2230
|
+
Cl as Input,
|
|
2231
|
+
Ml as Loader,
|
|
2232
|
+
Dl as Menu,
|
|
2233
|
+
Il as Pagination,
|
|
2234
|
+
Bl as Select,
|
|
2235
|
+
zl as Sidebar,
|
|
2236
|
+
Vl as Table,
|
|
2237
|
+
Tl as Tabs,
|
|
2238
|
+
Sl as Text
|
|
2237
2239
|
};
|