@iaclinical/components 1.0.24 → 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 +349 -351
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Icon as
|
|
3
|
-
const
|
|
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
|
+
import { Icon as Ee } from "@iconify/vue";
|
|
3
|
+
const Pe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, qe = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
6
6
|
}, Re = { class: "flex flex-1 justify-center items-center min-w-0" }, Ne = {
|
|
@@ -9,7 +9,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
9
9
|
}, We = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "text-base sm:text-lg font-bold text-primary-50 font-poppins whitespace-nowrap"
|
|
12
|
-
}, Ke = /* @__PURE__ */
|
|
12
|
+
}, Ke = /* @__PURE__ */ P({
|
|
13
13
|
__name: "AppBar",
|
|
14
14
|
props: {
|
|
15
15
|
title: { default: "" },
|
|
@@ -21,8 +21,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
21
21
|
height: { default: "md" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["toggle-menu"],
|
|
24
|
-
setup(t, { emit:
|
|
25
|
-
const e = t, f =
|
|
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",
|
|
@@ -43,7 +43,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
43
43
|
return (u, v) => (s(), l("header", {
|
|
44
44
|
class: c(n.value)
|
|
45
45
|
}, [
|
|
46
|
-
o("div",
|
|
46
|
+
o("div", Pe, [
|
|
47
47
|
t.showMenuButton ? (s(), l("button", {
|
|
48
48
|
key: 0,
|
|
49
49
|
onClick: v[0] || (v[0] = (a) => f("toggle-menu")),
|
|
@@ -64,29 +64,29 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
64
64
|
d: "M4 6h16M4 12h16M4 18h16"
|
|
65
65
|
})
|
|
66
66
|
], -1)
|
|
67
|
-
])])) :
|
|
68
|
-
t.title && t.titlePosition === "left" ? (s(), l("div",
|
|
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 [f, n] of
|
|
83
|
+
for (const [f, n] of b)
|
|
84
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
|
-
}, hl = /* @__PURE__ */
|
|
89
|
+
}, hl = /* @__PURE__ */ P({
|
|
90
90
|
__name: "Button",
|
|
91
91
|
props: {
|
|
92
92
|
variant: { default: "primary" },
|
|
@@ -100,8 +100,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
100
100
|
textColorHover: { default: void 0 }
|
|
101
101
|
},
|
|
102
102
|
emits: ["click"],
|
|
103
|
-
setup(t, { emit:
|
|
104
|
-
const e = t, f =
|
|
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 qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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,7 +125,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
130
|
e.disabled || f("click", h);
|
|
131
131
|
};
|
|
@@ -137,10 +137,10 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
|
-
}), Ge = /* @__PURE__ */
|
|
143
|
+
}), Ge = /* @__PURE__ */ P({
|
|
144
144
|
__name: "Icon",
|
|
145
145
|
props: {
|
|
146
146
|
name: {},
|
|
@@ -152,7 +152,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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",
|
|
@@ -175,21 +175,21 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
175
175
|
default:
|
|
176
176
|
return `material-symbols:${i}`;
|
|
177
177
|
}
|
|
178
|
-
}, n = r(() => f(
|
|
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
194
|
class: c(u.value),
|
|
195
195
|
style: Q(v.value),
|
|
@@ -215,14 +215,13 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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 qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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 qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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, f =
|
|
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 qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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"), Y = 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,25 +287,25 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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 ?
|
|
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
292
|
const F = r(() => {
|
|
297
|
-
const
|
|
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}`
|
|
@@ -317,79 +313,81 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
317
313
|
}
|
|
318
314
|
const Ye = 42 - U.length;
|
|
319
315
|
for (let R = 1; R <= Ye; R++) {
|
|
320
|
-
const
|
|
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
|
-
}),
|
|
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,14 +396,14 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
|
-
f("update:modelValue",
|
|
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 = () => {
|
|
@@ -413,16 +411,16 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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"
|
|
@@ -433,9 +431,9 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
433
431
|
for: h.value,
|
|
434
432
|
class: c(j.value)
|
|
435
433
|
}, [
|
|
436
|
-
|
|
437
|
-
t.required ? (s(), l("span", Xe, "*")) :
|
|
438
|
-
], 10, Ze)) :
|
|
434
|
+
q(x(t.label) + " ", 1),
|
|
435
|
+
t.required ? (s(), l("span", Xe, "*")) : m("", !0)
|
|
436
|
+
], 10, Ze)) : m("", !0),
|
|
439
437
|
o("div", {
|
|
440
438
|
class: c(["relative rounded-md", S.value])
|
|
441
439
|
}, [
|
|
@@ -468,9 +466,9 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
468
466
|
key: 0,
|
|
469
467
|
class: c(j.value)
|
|
470
468
|
}, [
|
|
471
|
-
|
|
472
|
-
t.required ? (s(), l("span", lt, "*")) :
|
|
473
|
-
], 2)) :
|
|
469
|
+
q(x(t.label) + " ", 1),
|
|
470
|
+
t.required ? (s(), l("span", lt, "*")) : m("", !0)
|
|
471
|
+
], 2)) : m("", !0),
|
|
474
472
|
o("div", ot, [
|
|
475
473
|
o("div", {
|
|
476
474
|
class: c(["relative rounded-md", S.value])
|
|
@@ -483,13 +481,13 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
489
|
class: c(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
492
|
-
onClick:
|
|
490
|
+
onClick: $[2] || ($[2] = H(() => me("start"), ["stop"])),
|
|
493
491
|
disabled: t.disabled
|
|
494
492
|
}, [
|
|
495
493
|
G(se, {
|
|
@@ -506,16 +504,16 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
515
|
class: c(["absolute right-3 top-1/2 -translate-y-1/2", k.value]),
|
|
518
|
-
onClick:
|
|
516
|
+
onClick: $[5] || ($[5] = H(() => me("end"), ["stop"])),
|
|
519
517
|
disabled: t.disabled
|
|
520
518
|
}, [
|
|
521
519
|
G(se, {
|
|
@@ -526,11 +524,11 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
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]),
|
|
533
|
-
onClick:
|
|
531
|
+
onClick: $[8] || ($[8] = H(() => {
|
|
534
532
|
}, ["stop"]))
|
|
535
533
|
}, [
|
|
536
534
|
o("div", ct, [
|
|
@@ -546,23 +544,23 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
546
544
|
], 2),
|
|
547
545
|
o("div", ft, [
|
|
548
546
|
ue(o("select", {
|
|
549
|
-
"onUpdate:modelValue":
|
|
547
|
+
"onUpdate:modelValue": $[6] || ($[6] = (z) => v.value = z),
|
|
550
548
|
class: c(N.value),
|
|
551
549
|
onChange: xe
|
|
552
550
|
}, [
|
|
553
|
-
(s(), l(
|
|
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":
|
|
559
|
+
"onUpdate:modelValue": $[7] || ($[7] = (z) => a.value = z),
|
|
562
560
|
class: c(N.value),
|
|
563
561
|
onChange: xe
|
|
564
562
|
}, [
|
|
565
|
-
(s(!0), l(
|
|
563
|
+
(s(!0), l(E, null, W(O.value, (z) => (s(), l("option", {
|
|
566
564
|
key: z,
|
|
567
565
|
value: z
|
|
568
566
|
}, x(z), 9, pt))), 128))
|
|
@@ -581,22 +579,22 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
581
579
|
})
|
|
582
580
|
], 2)
|
|
583
581
|
]),
|
|
584
|
-
o("div",
|
|
585
|
-
(s(), l(
|
|
582
|
+
o("div", gt, [
|
|
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(
|
|
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
592
|
class: c(De(z)),
|
|
595
|
-
disabled: z.disabled ||
|
|
596
|
-
onClick: (
|
|
597
|
-
}, x(z.day), 11,
|
|
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
600
|
class: c(M.value),
|
|
@@ -609,16 +607,16 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
609
607
|
disabled: !J.value
|
|
610
608
|
}, " Confirmar ", 10, ht)
|
|
611
609
|
])
|
|
612
|
-
], 2)) :
|
|
610
|
+
], 2)) : m("", !0)
|
|
613
611
|
], 512));
|
|
614
612
|
}
|
|
615
|
-
}), xl = /* @__PURE__ */ K(xt, [["__scopeId", "data-v-
|
|
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
|
-
}, wl = /* @__PURE__ */
|
|
619
|
+
}, wl = /* @__PURE__ */ P({
|
|
622
620
|
__name: "Card",
|
|
623
621
|
props: {
|
|
624
622
|
shadow: { default: "md" },
|
|
@@ -626,7 +624,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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",
|
|
@@ -641,28 +639,28 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
641
639
|
full: "rounded-full"
|
|
642
640
|
}, n = r(() => [
|
|
643
641
|
"w-full bg-white",
|
|
644
|
-
e[
|
|
645
|
-
f[
|
|
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
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 = {
|
|
663
661
|
key: 0,
|
|
664
662
|
class: "border-t border-gray-100 px-8 py-6 bg-gray-50"
|
|
665
|
-
}, zt = /* @__PURE__ */
|
|
663
|
+
}, zt = /* @__PURE__ */ P({
|
|
666
664
|
__name: "Dialog",
|
|
667
665
|
props: {
|
|
668
666
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -670,8 +668,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
670
668
|
closeOnBackdrop: { type: Boolean, default: !0 }
|
|
671
669
|
},
|
|
672
670
|
emits: ["update:modelValue", "close"],
|
|
673
|
-
setup(t, { emit:
|
|
674
|
-
const e = t, f =
|
|
671
|
+
setup(t, { emit: b }) {
|
|
672
|
+
const e = t, f = b, n = r({
|
|
675
673
|
get: () => e.modelValue,
|
|
676
674
|
set: (a) => f("update:modelValue", a)
|
|
677
675
|
}), u = () => {
|
|
@@ -695,7 +693,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
695
693
|
o("div", Ct, [
|
|
696
694
|
o("h2", Mt, [
|
|
697
695
|
V(a.$slots, "title", {}, () => [
|
|
698
|
-
|
|
696
|
+
q(x(t.title), 1)
|
|
699
697
|
], !0)
|
|
700
698
|
]),
|
|
701
699
|
o("button", {
|
|
@@ -724,9 +722,9 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
|
})
|
|
@@ -738,13 +736,13 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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" }, Ft = { class: "flex items-center gap-3 flex-1 min-w-0" }, Yt = { class: "flex-1 min-w-0" },
|
|
739
|
+
}, jt = { class: "text-center" }, Lt = { class: "text-base font-medium text-gray-700" }, Ot = { class: "text-primary-700" }, Ft = { class: "flex items-center gap-3 flex-1 min-w-0" }, 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
|
-
}, $l = /* @__PURE__ */
|
|
745
|
+
}, $l = /* @__PURE__ */ P({
|
|
748
746
|
__name: "FileUpload",
|
|
749
747
|
props: {
|
|
750
748
|
modelValue: { default: null },
|
|
@@ -760,8 +758,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
760
758
|
maxSize: { default: void 0 }
|
|
761
759
|
},
|
|
762
760
|
emits: ["update:modelValue", "change", "error"],
|
|
763
|
-
setup(t, { emit:
|
|
764
|
-
const e = t, f =
|
|
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,7 +769,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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;
|
|
@@ -803,7 +801,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
|
}, [
|
|
@@ -837,7 +835,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
837
835
|
], 2),
|
|
838
836
|
o("div", jt, [
|
|
839
837
|
o("p", Lt, [
|
|
840
|
-
|
|
838
|
+
q(x(t.mainText) + " ", 1),
|
|
841
839
|
o("span", Ot, x(t.linkText), 1)
|
|
842
840
|
])
|
|
843
841
|
]),
|
|
@@ -862,11 +860,11 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
862
860
|
})
|
|
863
861
|
], -1)),
|
|
864
862
|
o("div", Yt, [
|
|
865
|
-
o("p",
|
|
866
|
-
o("p",
|
|
863
|
+
o("p", _t, x(v.value.name), 1),
|
|
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,13 +881,13 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
883
881
|
})
|
|
884
882
|
], -1)
|
|
885
883
|
])]))
|
|
886
|
-
])) :
|
|
887
|
-
t.helperText ? (s(), l("p",
|
|
888
|
-
a.value ? (s(), l("p",
|
|
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
|
}
|
|
892
|
-
}),
|
|
890
|
+
}), qt = { class: "input-wrapper" }, Rt = ["for"], Nt = {
|
|
893
891
|
key: 0,
|
|
894
892
|
class: "text-danger-600"
|
|
895
893
|
}, Wt = { class: "relative" }, Ht = ["id", "type", "disabled", "placeholder", "value", "required", "readonly"], Kt = {
|
|
@@ -901,7 +899,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
901
899
|
}, Jt = {
|
|
902
900
|
key: 2,
|
|
903
901
|
class: "mt-1 text-sm text-secondary-600"
|
|
904
|
-
}, Gt = /* @__PURE__ */
|
|
902
|
+
}, Gt = /* @__PURE__ */ P({
|
|
905
903
|
__name: "Input",
|
|
906
904
|
props: {
|
|
907
905
|
modelValue: { default: "" },
|
|
@@ -917,9 +915,9 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
917
915
|
helperText: {}
|
|
918
916
|
},
|
|
919
917
|
emits: ["update:modelValue", "blur", "focus"],
|
|
920
|
-
setup(t, { emit:
|
|
921
|
-
const e = t, f =
|
|
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,24 +926,24 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
|
-
f("update:modelValue",
|
|
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
942
|
class: c(u.value)
|
|
945
943
|
}, [
|
|
946
|
-
|
|
947
|
-
t.required ? (s(), l("span", Nt, "*")) :
|
|
948
|
-
], 10, Rt)) :
|
|
944
|
+
q(x(t.label) + " ", 1),
|
|
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,
|
|
@@ -960,7 +958,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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,15 +971,15 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
|
-
}), Cl = /* @__PURE__ */ K(Gt, [["__scopeId", "data-v-
|
|
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
|
-
}, Xt = /* @__PURE__ */
|
|
982
|
+
}, Xt = /* @__PURE__ */ P({
|
|
985
983
|
__name: "Loader",
|
|
986
984
|
props: {
|
|
987
985
|
type: { default: "circular" },
|
|
@@ -992,7 +990,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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",
|
|
@@ -1006,7 +1004,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
1010
|
class: c(n.value)
|
|
@@ -1042,7 +1040,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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,
|
|
@@ -1059,7 +1057,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1059
1057
|
fill: "none",
|
|
1060
1058
|
stroke: "currentColor",
|
|
1061
1059
|
viewBox: "0 0 24 24"
|
|
1062
|
-
}, fs = /* @__PURE__ */
|
|
1060
|
+
}, fs = /* @__PURE__ */ P({
|
|
1063
1061
|
__name: "Menu",
|
|
1064
1062
|
props: {
|
|
1065
1063
|
items: { default: () => [] },
|
|
@@ -1078,8 +1076,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1078
1076
|
zIndex: { default: 50 }
|
|
1079
1077
|
},
|
|
1080
1078
|
emits: ["open", "close", "select"],
|
|
1081
|
-
setup(t, { emit:
|
|
1082
|
-
const e = t, f =
|
|
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,19 +1088,19 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
1102
|
let F = "";
|
|
1105
|
-
return d.color && (F = d.color, (d.color.includes("white") || d.color.includes("50")) && (F += " hover:text-black")), [...w, F || J[
|
|
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 = () => {
|
|
@@ -1122,37 +1120,37 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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 F = 0,
|
|
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
|
-
F = d.bottom + e.offset.y,
|
|
1127
|
+
F = d.bottom + e.offset.y, A = d.left + e.offset.x;
|
|
1130
1128
|
break;
|
|
1131
1129
|
case "bottom-end":
|
|
1132
|
-
F = d.bottom + e.offset.y,
|
|
1130
|
+
F = d.bottom + e.offset.y, A = d.right - w.width + e.offset.x;
|
|
1133
1131
|
break;
|
|
1134
1132
|
case "top-start":
|
|
1135
|
-
F = d.top - w.height - e.offset.y,
|
|
1133
|
+
F = d.top - w.height - e.offset.y, A = d.left + e.offset.x;
|
|
1136
1134
|
break;
|
|
1137
1135
|
case "top-end":
|
|
1138
|
-
F = d.top - w.height - e.offset.y,
|
|
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
|
-
F = d.top + e.offset.y,
|
|
1139
|
+
F = d.top + e.offset.y, A = d.right + e.offset.x;
|
|
1142
1140
|
break;
|
|
1143
1141
|
case "right-end":
|
|
1144
|
-
F = d.bottom - w.height + e.offset.y,
|
|
1142
|
+
F = d.bottom - w.height + e.offset.y, A = d.right + e.offset.x;
|
|
1145
1143
|
break;
|
|
1146
1144
|
case "left-start":
|
|
1147
|
-
F = d.top + e.offset.y,
|
|
1145
|
+
F = d.top + e.offset.y, A = d.left - w.width - e.offset.x;
|
|
1148
1146
|
break;
|
|
1149
1147
|
case "left-end":
|
|
1150
|
-
F = d.bottom - w.height + e.offset.y,
|
|
1148
|
+
F = d.bottom - w.height + e.offset.y, A = d.left - w.width - e.offset.x;
|
|
1151
1149
|
break;
|
|
1152
1150
|
}
|
|
1153
|
-
|
|
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 = {
|
|
1154
1152
|
top: `${F}px`,
|
|
1155
|
-
left: `${
|
|
1153
|
+
left: `${A}px`,
|
|
1156
1154
|
width: e.width === "auto" ? `${Math.max(d.width, 240)}px` : e.width,
|
|
1157
1155
|
maxHeight: e.maxHeight,
|
|
1158
1156
|
minWidth: "240px"
|
|
@@ -1187,7 +1185,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1187
1185
|
"aria-haspopup": !0
|
|
1188
1186
|
}, [
|
|
1189
1187
|
V(d.$slots, "trigger-content", {}, () => [
|
|
1190
|
-
|
|
1188
|
+
q(x(t.triggerText), 1)
|
|
1191
1189
|
], !0),
|
|
1192
1190
|
t.showChevron ? (s(), l("svg", {
|
|
1193
1191
|
key: 0,
|
|
@@ -1202,7 +1200,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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),
|
|
@@ -1221,7 +1219,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1221
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
1224
|
class: c(T.value)
|
|
1227
1225
|
}, [
|
|
@@ -1229,91 +1227,91 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1229
1227
|
close: k,
|
|
1230
1228
|
isOpen: n.value
|
|
1231
1229
|
}, () => [
|
|
1232
|
-
(s(!0), l(
|
|
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
1235
|
class: c(B.value)
|
|
1238
|
-
}, null, 2)) :
|
|
1236
|
+
}, null, 2)) : C.type === "header" ? (s(), l("div", {
|
|
1239
1237
|
key: 1,
|
|
1240
1238
|
class: c(O.value)
|
|
1241
|
-
}, x(
|
|
1239
|
+
}, x(C.label), 3)) : (s(), l("button", {
|
|
1242
1240
|
key: 2,
|
|
1243
1241
|
type: "button",
|
|
1244
|
-
class: c(j(
|
|
1245
|
-
disabled:
|
|
1246
|
-
onClick: (F) => I(
|
|
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: c(
|
|
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 = {
|
|
@@ -1332,7 +1330,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1332
1330
|
}, Vs = {
|
|
1333
1331
|
key: 2,
|
|
1334
1332
|
class: "mt-1 text-sm text-secondary-600"
|
|
1335
|
-
}, Ts = /* @__PURE__ */
|
|
1333
|
+
}, Ts = /* @__PURE__ */ P({
|
|
1336
1334
|
__name: "Select",
|
|
1337
1335
|
props: {
|
|
1338
1336
|
modelValue: { default: null },
|
|
@@ -1354,15 +1352,15 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1354
1352
|
bordered: { type: Boolean, default: !0 }
|
|
1355
1353
|
},
|
|
1356
1354
|
emits: ["update:modelValue", "change", "action"],
|
|
1357
|
-
setup(t, { emit:
|
|
1358
|
-
const e = t, f =
|
|
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 qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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" : "";
|
|
@@ -1413,11 +1411,11 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1413
1411
|
for: a.value,
|
|
1414
1412
|
class: c(p.value)
|
|
1415
1413
|
}, [
|
|
1416
|
-
|
|
1417
|
-
t.required ? (s(), l("span", ps, "*")) :
|
|
1418
|
-
], 10, vs)) :
|
|
1414
|
+
q(x(t.label) + " ", 1),
|
|
1415
|
+
t.required ? (s(), l("span", ps, "*")) : m("", !0)
|
|
1416
|
+
], 10, vs)) : m("", !0),
|
|
1419
1417
|
o("div", {
|
|
1420
|
-
class: c(["relative",
|
|
1418
|
+
class: c(["relative", g.value])
|
|
1421
1419
|
}, [
|
|
1422
1420
|
o("button", {
|
|
1423
1421
|
id: a.value,
|
|
@@ -1430,7 +1428,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
1433
|
class: c(["w-5 h-5 flex-shrink-0 transition-transform text-secondary-600", n.value ? "rotate-180" : ""]),
|
|
1436
1434
|
fill: "none",
|
|
@@ -1445,14 +1443,14 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
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 qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1462
1460
|
placeholder: t.searchPlaceholder,
|
|
1463
1461
|
onKeydown: d[1] || (d[1] = H(() => {
|
|
1464
1462
|
}, ["stop"]))
|
|
1465
|
-
}, null, 40,
|
|
1466
|
-
[
|
|
1463
|
+
}, null, 40, ms), [
|
|
1464
|
+
[Ae, u.value]
|
|
1467
1465
|
])
|
|
1468
|
-
])) :
|
|
1466
|
+
])) : m("", !0),
|
|
1469
1467
|
o("div", hs, [
|
|
1470
|
-
i.value.length === 0 ? (s(), l("div", xs, x(t.emptyText), 1)) : (s(), l(
|
|
1471
|
-
(s(!0), l(
|
|
1468
|
+
i.value.length === 0 ? (s(), l("div", xs, x(t.emptyText), 1)) : (s(), l(E, { key: 1 }, [
|
|
1469
|
+
(s(!0), l(E, null, W(i.value, (w) => (s(), l("button", {
|
|
1472
1470
|
key: w.value,
|
|
1473
1471
|
type: "button",
|
|
1474
1472
|
class: c(O(w)),
|
|
1475
|
-
onClick: (
|
|
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 qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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)) :
|
|
1490
|
-
(s(!0), l(
|
|
1487
|
+
t.actionItems.length > 0 ? (s(), l("div", Ms)) : m("", !0),
|
|
1488
|
+
(s(!0), l(E, null, W(t.actionItems, (w) => (s(), l("button", {
|
|
1491
1489
|
key: w.id,
|
|
1492
1490
|
type: "button",
|
|
1493
1491
|
class: c(j(w)),
|
|
1494
|
-
onClick: (
|
|
1492
|
+
onClick: (C) => Y(w)
|
|
1495
1493
|
}, [
|
|
1496
1494
|
w.icon ? (s(), l("svg", {
|
|
1497
1495
|
key: 0,
|
|
@@ -1501,22 +1499,22 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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)) :
|
|
1505
|
-
|
|
1502
|
+
}, null, 8, Bs)) : m("", !0),
|
|
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
|
-
}), Bl = /* @__PURE__ */ K(Ts, [["__scopeId", "data-v-
|
|
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,8 +1529,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1531
1529
|
padding: { default: "md" }
|
|
1532
1530
|
},
|
|
1533
1531
|
emits: ["update:modelValue", "close", "open"],
|
|
1534
|
-
setup(t, { emit:
|
|
1535
|
-
const e = t, f =
|
|
1532
|
+
setup(t, { emit: b }) {
|
|
1533
|
+
const e = t, f = b, n = r({
|
|
1536
1534
|
get: () => e.modelValue,
|
|
1537
1535
|
set: (B) => f("update:modelValue", B)
|
|
1538
1536
|
}), u = () => {
|
|
@@ -1552,7 +1550,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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 qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
|
}),
|
|
@@ -1596,10 +1594,10 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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: c(
|
|
1600
|
+
class: c(g.value)
|
|
1603
1601
|
}, [
|
|
1604
1602
|
V(B.$slots, "default", {}, void 0, !0)
|
|
1605
1603
|
], 2),
|
|
@@ -1608,8 +1606,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1608
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"])
|
|
@@ -1618,7 +1616,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
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
|
-
}, Ys = { class: "hidden md:block w-full overflow-x-auto" },
|
|
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 = {
|
|
@@ -1627,7 +1625,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1627
1625
|
}, Ks = {
|
|
1628
1626
|
key: 0,
|
|
1629
1627
|
class: "w-full px-6 py-4 bg-white"
|
|
1630
|
-
}, Us = /* @__PURE__ */
|
|
1628
|
+
}, Us = /* @__PURE__ */ P({
|
|
1631
1629
|
__name: "Table",
|
|
1632
1630
|
props: {
|
|
1633
1631
|
columns: {},
|
|
@@ -1638,92 +1636,92 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1638
1636
|
rowClass: { default: void 0 }
|
|
1639
1637
|
},
|
|
1640
1638
|
setup(t) {
|
|
1641
|
-
const
|
|
1639
|
+
const b = t, e = L(null), f = L("asc"), n = (a) => {
|
|
1642
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
|
-
(s(!0), l(
|
|
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(
|
|
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
|
-
|
|
1666
|
+
q(x(i[g.key]), 1)
|
|
1669
1667
|
], !0)
|
|
1670
1668
|
])
|
|
1671
1669
|
]))), 128))
|
|
1672
1670
|
]))), 128)),
|
|
1673
1671
|
u.value.length === 0 ? (s(), l("div", Fs, [
|
|
1674
1672
|
V(a.$slots, "empty", {}, () => [
|
|
1675
|
-
h[0] || (h[0] =
|
|
1673
|
+
h[0] || (h[0] = q("No hay datos disponibles", -1))
|
|
1676
1674
|
], !0)
|
|
1677
|
-
])) :
|
|
1675
|
+
])) : m("", !0)
|
|
1678
1676
|
]),
|
|
1679
1677
|
o("div", Ys, [
|
|
1680
|
-
o("table",
|
|
1681
|
-
o("thead",
|
|
1678
|
+
o("table", _s, [
|
|
1679
|
+
o("thead", As, [
|
|
1682
1680
|
o("tr", {
|
|
1683
1681
|
class: c([
|
|
1684
1682
|
"w-full",
|
|
1685
|
-
|
|
1683
|
+
b.headerClass || "bg-neutral-50 border-b border-gray-100"
|
|
1686
1684
|
])
|
|
1687
1685
|
}, [
|
|
1688
|
-
(s(!0), l(
|
|
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
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
|
-
o("div",
|
|
1696
|
+
o("div", Ps, [
|
|
1699
1697
|
o("span", null, x(i.label), 1),
|
|
1700
|
-
i.sortable ? (s(), l("span",
|
|
1698
|
+
i.sortable ? (s(), l("span", qs, [
|
|
1701
1699
|
e.value !== i.key ? (s(), l("span", Rs, "⇅")) : (s(), l("span", Ns, x(f.value === "asc" ? "↑" : "↓"), 1))
|
|
1702
|
-
])) :
|
|
1700
|
+
])) : m("", !0)
|
|
1703
1701
|
])
|
|
1704
|
-
], 14,
|
|
1702
|
+
], 14, Es))), 128))
|
|
1705
1703
|
], 2)
|
|
1706
1704
|
]),
|
|
1707
1705
|
o("tbody", Ws, [
|
|
1708
|
-
(s(!0), l(
|
|
1706
|
+
(s(!0), l(E, null, W(u.value, (i, p) => (s(), l("tr", {
|
|
1709
1707
|
key: p,
|
|
1710
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(
|
|
1716
|
-
key: `${p}-${
|
|
1713
|
+
(s(!0), l(E, null, W(t.columns, (g) => (s(), l("td", {
|
|
1714
|
+
key: `${p}-${g.key}`,
|
|
1717
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
|
-
|
|
1724
|
+
q(x(i[g.key]), 1)
|
|
1727
1725
|
], !0)
|
|
1728
1726
|
], 2))), 128))
|
|
1729
1727
|
], 2))), 128))
|
|
@@ -1731,19 +1729,19 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1731
1729
|
]),
|
|
1732
1730
|
u.value.length === 0 ? (s(), l("div", Hs, [
|
|
1733
1731
|
V(a.$slots, "empty", {}, () => [
|
|
1734
|
-
h[1] || (h[1] =
|
|
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 = ["aria-selected", "onClick"], Zs = "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base
|
|
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({
|
|
1747
1745
|
__name: "Tabs",
|
|
1748
1746
|
props: {
|
|
1749
1747
|
modelValue: {},
|
|
@@ -1752,8 +1750,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1752
1750
|
contentClass: {}
|
|
1753
1751
|
},
|
|
1754
1752
|
emits: ["update:modelValue"],
|
|
1755
|
-
setup(t, { emit:
|
|
1756
|
-
const e = t, f =
|
|
1753
|
+
setup(t, { emit: b }) {
|
|
1754
|
+
const e = t, f = b, n = (h) => e.modelValue === h, u = (h) => {
|
|
1757
1755
|
n(h) || f("update:modelValue", h);
|
|
1758
1756
|
}, v = r(() => e.modelValue), a = r(
|
|
1759
1757
|
() => e.tabs.find((h) => h.value === v.value)
|
|
@@ -1763,7 +1761,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1763
1761
|
class: c(["tabs-header", t.headerClass])
|
|
1764
1762
|
}, [
|
|
1765
1763
|
o("div", Gs, [
|
|
1766
|
-
(s(!0), l(
|
|
1764
|
+
(s(!0), l(E, null, W(t.tabs, (p) => (s(), l("button", {
|
|
1767
1765
|
key: p.value,
|
|
1768
1766
|
type: "button",
|
|
1769
1767
|
class: c([
|
|
@@ -1772,7 +1770,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1772
1770
|
]),
|
|
1773
1771
|
"aria-selected": n(p.value),
|
|
1774
1772
|
role: "tab",
|
|
1775
|
-
onClick: (
|
|
1773
|
+
onClick: (g) => u(p.value)
|
|
1776
1774
|
}, x(p.label), 11, Qs))), 128))
|
|
1777
1775
|
])
|
|
1778
1776
|
], 2),
|
|
@@ -1787,7 +1785,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1787
1785
|
], 2)
|
|
1788
1786
|
]));
|
|
1789
1787
|
}
|
|
1790
|
-
}), Tl = /* @__PURE__ */ K(tl, [["__scopeId", "data-v-
|
|
1788
|
+
}), Tl = /* @__PURE__ */ K(tl, [["__scopeId", "data-v-c7c56f28"]]), sl = "font-sans", Sl = /* @__PURE__ */ P({
|
|
1791
1789
|
__name: "Text",
|
|
1792
1790
|
props: {
|
|
1793
1791
|
variant: { default: "body1" },
|
|
@@ -1799,7 +1797,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1799
1797
|
weight: {}
|
|
1800
1798
|
},
|
|
1801
1799
|
setup(t) {
|
|
1802
|
-
const
|
|
1800
|
+
const b = {
|
|
1803
1801
|
h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
|
|
1804
1802
|
h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
|
|
1805
1803
|
h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
|
|
@@ -1859,14 +1857,14 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1859
1857
|
semibold: "font-semibold",
|
|
1860
1858
|
bold: "font-bold",
|
|
1861
1859
|
extrabold: "font-extrabold"
|
|
1862
|
-
}, 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] : "");
|
|
1863
1861
|
return (T, B) => (s(), ee(Me(p.value), {
|
|
1864
1862
|
class: c([
|
|
1865
1863
|
sl,
|
|
1866
|
-
|
|
1864
|
+
b[a.value],
|
|
1867
1865
|
n[h.value],
|
|
1868
1866
|
f[i.value],
|
|
1869
|
-
|
|
1867
|
+
g.value,
|
|
1870
1868
|
{
|
|
1871
1869
|
uppercase: t.uppercase || a.value === "overline",
|
|
1872
1870
|
truncate: t.truncate
|
|
@@ -1889,7 +1887,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1889
1887
|
}, rl = ["disabled"], il = {
|
|
1890
1888
|
key: 0,
|
|
1891
1889
|
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text-secondary-500"
|
|
1892
|
-
}, dl = ["aria-label", "onClick"], ul = ["disabled"], cl = /* @__PURE__ */
|
|
1890
|
+
}, dl = ["aria-label", "onClick"], ul = ["disabled"], cl = /* @__PURE__ */ P({
|
|
1893
1891
|
__name: "Pagination",
|
|
1894
1892
|
props: {
|
|
1895
1893
|
modelValue: { default: 1 },
|
|
@@ -1902,41 +1900,41 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1902
1900
|
itemLabel: { default: "" }
|
|
1903
1901
|
},
|
|
1904
1902
|
emits: ["update:modelValue", "change"],
|
|
1905
|
-
setup(t, { emit:
|
|
1906
|
-
const e = t, f =
|
|
1907
|
-
const
|
|
1908
|
-
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;
|
|
1909
1907
|
}), u = r(() => {
|
|
1910
|
-
const
|
|
1911
|
-
return
|
|
1908
|
+
const g = Number(e.modelValue || 1);
|
|
1909
|
+
return g < 1 ? 1 : g > n.value ? n.value : g;
|
|
1912
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(() => {
|
|
1913
|
-
const
|
|
1914
|
-
if (
|
|
1915
|
-
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);
|
|
1916
1914
|
const O = Math.floor(T / 2);
|
|
1917
|
-
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);
|
|
1918
1916
|
j = Math.max(1, Math.min(j, S - T + 1));
|
|
1919
1917
|
const D = [];
|
|
1920
1918
|
j > 1 && (D.push(1), j > 2 && D.push("…"));
|
|
1921
1919
|
for (let k = j; k <= S; k++)
|
|
1922
1920
|
D.push(k);
|
|
1923
|
-
return S <
|
|
1921
|
+
return S < g && (S < g - 1 && D.push("…"), D.push(g)), D;
|
|
1924
1922
|
});
|
|
1925
|
-
function p(
|
|
1926
|
-
const T = Math.max(1, Math.min(
|
|
1923
|
+
function p(g) {
|
|
1924
|
+
const T = Math.max(1, Math.min(g, n.value));
|
|
1927
1925
|
T !== u.value && (f("update:modelValue", T), f("change", T));
|
|
1928
1926
|
}
|
|
1929
|
-
return (
|
|
1927
|
+
return (g, T) => (s(), l("div", ll, [
|
|
1930
1928
|
t.showSummary ? (s(), l("div", ol, [
|
|
1931
|
-
V(
|
|
1929
|
+
V(g.$slots, "summary", {
|
|
1932
1930
|
start: v.value,
|
|
1933
1931
|
end: a.value,
|
|
1934
1932
|
total: t.totalItems
|
|
1935
1933
|
}, () => [
|
|
1936
|
-
|
|
1937
|
-
t.itemLabel ? (s(), l("span", al, x(t.itemLabel), 1)) :
|
|
1934
|
+
q(x(h.value), 1),
|
|
1935
|
+
t.itemLabel ? (s(), l("span", al, x(t.itemLabel), 1)) : m("", !0)
|
|
1938
1936
|
], !0)
|
|
1939
|
-
])) :
|
|
1937
|
+
])) : m("", !0),
|
|
1940
1938
|
o("nav", nl, [
|
|
1941
1939
|
o("button", {
|
|
1942
1940
|
type: "button",
|
|
@@ -1945,7 +1943,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1945
1943
|
onClick: T[0] || (T[0] = (B) => p(u.value - 1)),
|
|
1946
1944
|
"aria-label": "Anterior"
|
|
1947
1945
|
}, x(t.previousText), 9, rl),
|
|
1948
|
-
(s(!0), l(
|
|
1946
|
+
(s(!0), l(E, null, W(i.value, (B, O) => (s(), l(E, {
|
|
1949
1947
|
key: `page-${O}-${B}`
|
|
1950
1948
|
}, [
|
|
1951
1949
|
B === "…" ? (s(), l("span", il, " … ")) : (s(), l("button", {
|
|
@@ -1972,7 +1970,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1972
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 = {
|
|
1973
1971
|
key: 1,
|
|
1974
1972
|
class: "flex justify-end gap-1 px-6 pb-6 pt-4"
|
|
1975
|
-
}, jl = /* @__PURE__ */
|
|
1973
|
+
}, jl = /* @__PURE__ */ P({
|
|
1976
1974
|
__name: "Alert",
|
|
1977
1975
|
props: {
|
|
1978
1976
|
variant: {},
|
|
@@ -1985,8 +1983,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1985
1983
|
stackOn: {}
|
|
1986
1984
|
},
|
|
1987
1985
|
emits: ["close", "accept", "cancel"],
|
|
1988
|
-
setup(t, { emit:
|
|
1989
|
-
const e =
|
|
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(() => {
|
|
1990
1988
|
if (f.title) return f.title;
|
|
1991
1989
|
switch (n.value) {
|
|
1992
1990
|
case "info":
|
|
@@ -1998,7 +1996,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
1998
1996
|
case "error":
|
|
1999
1997
|
return "Alerta de error";
|
|
2000
1998
|
}
|
|
2001
|
-
}), p = r(() => f.description ?? ""),
|
|
1999
|
+
}), p = r(() => f.description ?? ""), g = r(() => {
|
|
2002
2000
|
switch (n.value) {
|
|
2003
2001
|
case "info":
|
|
2004
2002
|
return {
|
|
@@ -2037,8 +2035,8 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2037
2035
|
}), j = r(() => f.stackOn ? `self-start ${f.stackOn}:self-auto` : "self-start sm:self-auto");
|
|
2038
2036
|
return (S, D) => (s(), l("div", {
|
|
2039
2037
|
class: c(["relative w-full rounded-xl border", [
|
|
2040
|
-
|
|
2041
|
-
|
|
2038
|
+
g.value.border,
|
|
2039
|
+
g.value.bg
|
|
2042
2040
|
]]),
|
|
2043
2041
|
role: "alert",
|
|
2044
2042
|
"data-node-id": a.value
|
|
@@ -2074,7 +2072,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2074
2072
|
y2: "18"
|
|
2075
2073
|
})
|
|
2076
2074
|
], -1)
|
|
2077
|
-
])])) :
|
|
2075
|
+
])])) : m("", !0),
|
|
2078
2076
|
o("div", {
|
|
2079
2077
|
class: c(["p-6", { "pb-0": v.value }])
|
|
2080
2078
|
}, [
|
|
@@ -2089,7 +2087,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2089
2087
|
height: "24",
|
|
2090
2088
|
viewBox: "0 0 24 24",
|
|
2091
2089
|
fill: "none",
|
|
2092
|
-
class: c(
|
|
2090
|
+
class: c(g.value.icon),
|
|
2093
2091
|
stroke: "currentColor",
|
|
2094
2092
|
"stroke-width": "2",
|
|
2095
2093
|
"stroke-linecap": "round",
|
|
@@ -2119,7 +2117,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2119
2117
|
height: "24",
|
|
2120
2118
|
viewBox: "0 0 24 24",
|
|
2121
2119
|
fill: "none",
|
|
2122
|
-
class: c(
|
|
2120
|
+
class: c(g.value.icon),
|
|
2123
2121
|
stroke: "currentColor",
|
|
2124
2122
|
"stroke-width": "2",
|
|
2125
2123
|
"stroke-linecap": "round",
|
|
@@ -2145,7 +2143,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2145
2143
|
height: "24",
|
|
2146
2144
|
viewBox: "0 0 24 24",
|
|
2147
2145
|
fill: "none",
|
|
2148
|
-
class: c(
|
|
2146
|
+
class: c(g.value.icon),
|
|
2149
2147
|
stroke: "currentColor",
|
|
2150
2148
|
"stroke-width": "2",
|
|
2151
2149
|
"stroke-linecap": "round",
|
|
@@ -2160,7 +2158,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2160
2158
|
height: "24",
|
|
2161
2159
|
viewBox: "0 0 24 24",
|
|
2162
2160
|
fill: "none",
|
|
2163
|
-
class: c(
|
|
2161
|
+
class: c(g.value.icon),
|
|
2164
2162
|
stroke: "currentColor",
|
|
2165
2163
|
"stroke-width": "2",
|
|
2166
2164
|
"stroke-linecap": "round",
|
|
@@ -2191,7 +2189,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2191
2189
|
class: c(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !u.value }])
|
|
2192
2190
|
}, [
|
|
2193
2191
|
V(S.$slots, "description", {}, () => [
|
|
2194
|
-
|
|
2192
|
+
q(x(p.value), 1)
|
|
2195
2193
|
])
|
|
2196
2194
|
], 2)
|
|
2197
2195
|
], 2)
|
|
@@ -2204,7 +2202,7 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2204
2202
|
onClick: D[0] || (D[0] = (k) => S.$emit("cancel"))
|
|
2205
2203
|
}, [
|
|
2206
2204
|
V(S.$slots, "cancel", {}, () => [
|
|
2207
|
-
D[7] || (D[7] =
|
|
2205
|
+
D[7] || (D[7] = q("Cancelar", -1))
|
|
2208
2206
|
])
|
|
2209
2207
|
]),
|
|
2210
2208
|
o("button", {
|
|
@@ -2213,16 +2211,16 @@ const qe = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, _e = {
|
|
|
2213
2211
|
onClick: D[1] || (D[1] = (k) => S.$emit("accept"))
|
|
2214
2212
|
}, [
|
|
2215
2213
|
V(S.$slots, "accept", {}, () => [
|
|
2216
|
-
D[8] || (D[8] =
|
|
2214
|
+
D[8] || (D[8] = q("Aceptar", -1))
|
|
2217
2215
|
])
|
|
2218
2216
|
], 2)
|
|
2219
|
-
])) :
|
|
2217
|
+
])) : m("", !0)
|
|
2220
2218
|
], 10, fl));
|
|
2221
2219
|
}
|
|
2222
2220
|
});
|
|
2223
2221
|
export {
|
|
2224
2222
|
jl as Alert,
|
|
2225
|
-
|
|
2223
|
+
ml as AppBar,
|
|
2226
2224
|
hl as Button,
|
|
2227
2225
|
xl as Calendar,
|
|
2228
2226
|
wl as Card,
|