@iaclinical/components 1.0.31 → 1.0.33
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 +371 -369
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as N, computed as o, createElementBlock as a, openBlock as l, normalizeClass as c, createElementVNode as s, createCommentVNode as f, renderSlot as O, toDisplayString as $, createBlock as
|
|
1
|
+
import { defineComponent as N, computed as o, createElementBlock as a, openBlock as l, normalizeClass as c, createElementVNode as s, createCommentVNode as f, renderSlot as O, toDisplayString as $, createBlock as te, unref as Re, normalizeStyle as X, ref as q, onMounted as Te, onUnmounted as Se, watch as de, createTextVNode as Y, withModifiers as J, createVNode as Q, withDirectives as ve, Fragment as K, renderList as G, vModelSelect as De, withKeys as Ve, Teleport as ge, Transition as ie, withCtx as re, nextTick as be, resolveDynamicComponent as me, vModelText as Ee } from "vue";
|
|
2
2
|
import { Icon as Ye } from "@iconify/vue";
|
|
3
3
|
const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
4
4
|
key: 1,
|
|
@@ -24,8 +24,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
24
24
|
density: { default: "normal" }
|
|
25
25
|
},
|
|
26
26
|
emits: ["toggle-menu"],
|
|
27
|
-
setup(t, { emit:
|
|
28
|
-
const e = t, u =
|
|
27
|
+
setup(t, { emit: g }) {
|
|
28
|
+
const e = t, u = g, r = o(() => {
|
|
29
29
|
const p = "flex flex-row items-center justify-between gap-2 sm:gap-4 px-3 sm:px-6 z-50 w-full", v = {
|
|
30
30
|
default: "bg-primary-700 text-primary-50",
|
|
31
31
|
dark: "bg-secondary-900 text-white",
|
|
@@ -41,17 +41,17 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
41
41
|
3: "shadow-md",
|
|
42
42
|
4: "shadow-lg",
|
|
43
43
|
5: "shadow-xl"
|
|
44
|
-
},
|
|
44
|
+
}, z = {
|
|
45
45
|
compact: "gap-1",
|
|
46
46
|
normal: "gap-2 sm:gap-4",
|
|
47
47
|
prominent: "gap-3 sm:gap-6 px-6 sm:px-8"
|
|
48
|
-
}, k = e.sticky ? e.mode === "fixed" ? "fixed top-0 inset-x-0" : "sticky top-0 inset-x-0" : "",
|
|
48
|
+
}, k = e.sticky ? e.mode === "fixed" ? "fixed top-0 inset-x-0" : "sticky top-0 inset-x-0" : "", m = e.shadow ? "shadow-md" : b[Math.min(e.elevation, 5)];
|
|
49
49
|
return [
|
|
50
|
-
p.replace("gap-2 sm:gap-4",
|
|
50
|
+
p.replace("gap-2 sm:gap-4", z[e.density]),
|
|
51
51
|
v[e.variant],
|
|
52
52
|
n[e.height],
|
|
53
53
|
k,
|
|
54
|
-
|
|
54
|
+
m
|
|
55
55
|
].join(" ");
|
|
56
56
|
});
|
|
57
57
|
return (p, v) => (l(), a("header", {
|
|
@@ -92,12 +92,12 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
92
92
|
])
|
|
93
93
|
], 2));
|
|
94
94
|
}
|
|
95
|
-
}), Z = (t,
|
|
95
|
+
}), Z = (t, g) => {
|
|
96
96
|
const e = t.__vccOpts || t;
|
|
97
|
-
for (const [u, r] of
|
|
97
|
+
for (const [u, r] of g)
|
|
98
98
|
e[u] = r;
|
|
99
99
|
return e;
|
|
100
|
-
},
|
|
100
|
+
}, Ka = /* @__PURE__ */ Z(Qe, [["__scopeId", "data-v-d279b85c"]]), Ze = ["type", "disabled", "aria-label"], Xe = {
|
|
101
101
|
key: 0,
|
|
102
102
|
class: "w-4 h-4 animate-spin mr-2",
|
|
103
103
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -106,7 +106,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
106
106
|
}, _e = {
|
|
107
107
|
key: 1,
|
|
108
108
|
class: "absolute top-0 right-0 inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-bold leading-none text-white transform translate-x-1/2 -translate-y-1/2 bg-danger-600 rounded-full min-w-[1.25rem]"
|
|
109
|
-
},
|
|
109
|
+
}, Ua = /* @__PURE__ */ N({
|
|
110
110
|
__name: "Button",
|
|
111
111
|
props: {
|
|
112
112
|
variant: { default: "primary" },
|
|
@@ -121,9 +121,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
121
121
|
textColorHover: { default: void 0 }
|
|
122
122
|
},
|
|
123
123
|
emits: ["click"],
|
|
124
|
-
setup(t, { emit:
|
|
125
|
-
const e = t, u =
|
|
126
|
-
const b = "inline-flex items-center justify-center font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
124
|
+
setup(t, { emit: g }) {
|
|
125
|
+
const e = t, u = g, r = o(() => e.variant === "icon"), p = o(() => e.badge > 99 ? "99+" : e.badge.toString()), v = o(() => {
|
|
126
|
+
const b = "inline-flex items-center justify-center font-semibold tracking-wide transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", z = {
|
|
127
127
|
primary: "bg-primary-500 text-white hover:bg-primary-600 active:bg-primary-700 focus-visible:ring-primary-700",
|
|
128
128
|
secondary: "bg-secondary-200 text-secondary-900 hover:bg-secondary-300 hover:text-secondary-800 focus-visible:ring-secondary-500",
|
|
129
129
|
outline: "border border-secondary-300 bg-transparent hover:bg-secondary-100 focus-visible:ring-secondary-500",
|
|
@@ -135,7 +135,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
135
135
|
sm: r.value ? "p-1.5" : "h-8 px-3 text-sm",
|
|
136
136
|
md: r.value ? "p-2" : "h-10 px-4 text-base",
|
|
137
137
|
lg: r.value ? "p-3" : "h-12 px-6 text-lg"
|
|
138
|
-
},
|
|
138
|
+
}, m = {
|
|
139
139
|
full: "rounded-full",
|
|
140
140
|
xl: "rounded-2xl",
|
|
141
141
|
lg: "rounded-xl",
|
|
@@ -146,18 +146,18 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
146
146
|
var L, A;
|
|
147
147
|
return e.textColorHover ? e.textColorHover : (L = e.textColor) != null && L.includes("white") || (A = e.textColor) != null && A.includes("50") ? "hover:text-black" : "";
|
|
148
148
|
});
|
|
149
|
-
return `${b} ${
|
|
149
|
+
return `${b} ${z[e.variant]} ${k[e.size]} ${m[e.radius]} ${y} ${T.value}`;
|
|
150
150
|
}), n = (b) => {
|
|
151
151
|
e.disabled || u("click", b);
|
|
152
152
|
};
|
|
153
|
-
return (b,
|
|
153
|
+
return (b, z) => (l(), a("button", {
|
|
154
154
|
class: c(v.value),
|
|
155
155
|
type: t.type,
|
|
156
156
|
disabled: t.disabled || t.loading,
|
|
157
157
|
onClick: n,
|
|
158
158
|
"aria-label": t.ariaLabel
|
|
159
159
|
}, [
|
|
160
|
-
t.loading ? (l(), a("svg", Xe, [...
|
|
160
|
+
t.loading ? (l(), a("svg", Xe, [...z[0] || (z[0] = [
|
|
161
161
|
s("circle", {
|
|
162
162
|
class: "opacity-25",
|
|
163
163
|
cx: "12",
|
|
@@ -188,7 +188,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
188
188
|
ariaLabel: {}
|
|
189
189
|
},
|
|
190
190
|
setup(t) {
|
|
191
|
-
const
|
|
191
|
+
const g = t, e = {
|
|
192
192
|
xs: "16px",
|
|
193
193
|
sm: "18px",
|
|
194
194
|
md: "20px",
|
|
@@ -196,36 +196,36 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
196
196
|
xl: "30px",
|
|
197
197
|
"2xl": "36px"
|
|
198
198
|
}, u = (n, b) => {
|
|
199
|
-
const
|
|
199
|
+
const z = n.replace(/_/g, "-");
|
|
200
200
|
switch (b) {
|
|
201
201
|
case "filled":
|
|
202
|
-
return `material-symbols:${
|
|
202
|
+
return `material-symbols:${z}`;
|
|
203
203
|
case "outlined":
|
|
204
|
-
return `ic:outline-${
|
|
204
|
+
return `ic:outline-${z}`;
|
|
205
205
|
case "rounded":
|
|
206
|
-
return `ic:round-${
|
|
206
|
+
return `ic:round-${z}`;
|
|
207
207
|
case "sharp":
|
|
208
|
-
return `ic:sharp-${
|
|
208
|
+
return `ic:sharp-${z}`;
|
|
209
209
|
case "two-tone":
|
|
210
|
-
return `ic:twotone-${
|
|
210
|
+
return `ic:twotone-${z}`;
|
|
211
211
|
default:
|
|
212
|
-
return `material-symbols:${
|
|
212
|
+
return `material-symbols:${z}`;
|
|
213
213
|
}
|
|
214
|
-
}, r = o(() => u(
|
|
214
|
+
}, r = o(() => u(g.name, g.variant)), p = o(() => {
|
|
215
215
|
const n = [
|
|
216
216
|
"inline-flex items-center justify-center select-none",
|
|
217
217
|
"transition-transform duration-200"
|
|
218
218
|
];
|
|
219
|
-
return
|
|
219
|
+
return g.color && (g.color.startsWith("text-") || g.color.startsWith("fill-")) && n.push(g.color), g.spin && n.push("animate-spin"), n.join(" ");
|
|
220
220
|
}), v = o(() => {
|
|
221
221
|
const n = {};
|
|
222
|
-
if (e[
|
|
223
|
-
const b = `rotate(${
|
|
222
|
+
if (e[g.size] ? (n.fontSize = e[g.size], n.width = e[g.size], n.height = e[g.size]) : (n.fontSize = g.size, n.width = g.size, n.height = g.size), g.color && !g.color.startsWith("text-") && !g.color.startsWith("fill-") && (n.color = g.color), g.rotate !== 0) {
|
|
223
|
+
const b = `rotate(${g.rotate}deg)`;
|
|
224
224
|
n.transform = b;
|
|
225
225
|
}
|
|
226
226
|
return n;
|
|
227
227
|
});
|
|
228
|
-
return (n, b) => (l(),
|
|
228
|
+
return (n, b) => (l(), te(Re(Ye), {
|
|
229
229
|
icon: r.value,
|
|
230
230
|
class: c(p.value),
|
|
231
231
|
style: X(v.value),
|
|
@@ -233,7 +233,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
233
233
|
role: t.ariaLabel ? "img" : void 0
|
|
234
234
|
}, null, 8, ["icon", "class", "style", "aria-label", "role"]));
|
|
235
235
|
}
|
|
236
|
-
}),
|
|
236
|
+
}), _ = /* @__PURE__ */ Z(et, [["__scopeId", "data-v-5f982e5c"]]), tt = {
|
|
237
237
|
key: 0,
|
|
238
238
|
class: "relative"
|
|
239
239
|
}, lt = ["for"], at = {
|
|
@@ -251,13 +251,13 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
251
251
|
}, ft = {
|
|
252
252
|
key: 0,
|
|
253
253
|
class: "text-danger-600"
|
|
254
|
-
}, pt = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, vt = ["disabled", "placeholder", "value", "required"], bt = ["disabled"],
|
|
254
|
+
}, pt = { class: "grid grid-cols-1 md:grid-cols-2 gap-2" }, vt = ["disabled", "placeholder", "value", "required"], bt = ["disabled"], gt = ["disabled", "placeholder", "value", "required"], mt = ["disabled"], yt = {
|
|
255
255
|
key: 3,
|
|
256
256
|
class: "mt-1 text-sm text-danger-600"
|
|
257
257
|
}, ht = {
|
|
258
258
|
key: 4,
|
|
259
259
|
class: "mt-1 text-sm text-secondary-600"
|
|
260
|
-
}, xt = { class: "flex items-center justify-between mb-4" }, wt = { class: "flex items-center space-x-2" }, kt = ["value"], Ct = ["value"], $t = { class: "grid grid-cols-7 gap-1 mb-2" }, Bt = { class: "grid grid-cols-7 gap-1" },
|
|
260
|
+
}, xt = { class: "flex items-center justify-between mb-4" }, wt = { class: "flex items-center space-x-2" }, kt = ["value"], Ct = ["value"], $t = { class: "grid grid-cols-7 gap-1 mb-2" }, Bt = { class: "grid grid-cols-7 gap-1" }, zt = ["disabled", "onClick"], Mt = { class: "flex justify-end space-x-2 mt-4 pt-4 border-t border-secondary-100" }, Dt = ["disabled"], Vt = /* @__PURE__ */ N({
|
|
261
261
|
__name: "Calendar",
|
|
262
262
|
props: {
|
|
263
263
|
modelValue: {},
|
|
@@ -288,8 +288,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
288
288
|
yearsPerRow: { default: 4 }
|
|
289
289
|
},
|
|
290
290
|
emits: ["update:modelValue", "date-select", "range-select", "multiple-select"],
|
|
291
|
-
setup(t, { emit:
|
|
292
|
-
const e = t, u = q([]), r =
|
|
291
|
+
setup(t, { emit: g }) {
|
|
292
|
+
const e = t, u = q([]), r = g, p = q(!1), v = q(null), n = q((/* @__PURE__ */ new Date()).getMonth()), b = q((/* @__PURE__ */ new Date()).getFullYear()), z = q(`calendar-${Math.random().toString(36).substr(2, 9)}`), k = q(null), m = q(null), y = [
|
|
293
293
|
"Enero",
|
|
294
294
|
"Febrero",
|
|
295
295
|
"Marzo",
|
|
@@ -319,8 +319,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
319
319
|
default: "bg-white",
|
|
320
320
|
filled: "bg-secondary-100",
|
|
321
321
|
outlined: "bg-transparent"
|
|
322
|
-
},
|
|
323
|
-
return `${w} ${D[e.size]} ${E[e.variant]} ${S[e.color]} ${
|
|
322
|
+
}, ee = e.error ? "border-danger-600 focus:ring-danger-500" : "";
|
|
323
|
+
return `${w} ${D[e.size]} ${E[e.variant]} ${S[e.color]} ${ee}`;
|
|
324
324
|
}), B = o(() => `transition-colors text-[#565656] hover:text-[#565656] opacity-80 hover:opacity-100 ${e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`), V = o(() => "min-w-80 max-w-sm"), P = o(() => `p-2 rounded-md transition-colors ${{
|
|
325
325
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
326
326
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
@@ -333,13 +333,13 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
333
333
|
}[e.color]}`), d = o(() => `px-3 py-1.5 text-sm border border-secondary-300 rounded-md transition-colors focus:outline-none ${{
|
|
334
334
|
primary: "text-primary-600 hover:text-primary-700 hover:bg-primary-50",
|
|
335
335
|
secondary: "text-secondary-600 hover:text-secondary-700 hover:bg-secondary-50"
|
|
336
|
-
}[e.color]}`), C = o(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? H(e.modelValue) : ""), i = o(() => e.mode === "multiple" && Array.isArray(e.modelValue) && e.modelValue.length > 0 ? e.modelValue.length === 1 ? H(e.modelValue[0]) : `${e.modelValue.length} fechas seleccionadas` : ""),
|
|
337
|
-
o(() => e.mode === "range" && k.value &&
|
|
336
|
+
}[e.color]}`), C = o(() => e.mode === "single" && e.modelValue && e.modelValue instanceof Date ? H(e.modelValue) : ""), i = o(() => e.mode === "multiple" && Array.isArray(e.modelValue) && e.modelValue.length > 0 ? e.modelValue.length === 1 ? H(e.modelValue[0]) : `${e.modelValue.length} fechas seleccionadas` : ""), M = o(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue && e.modelValue.start ? H(e.modelValue.start) : ""), x = o(() => e.mode === "range" && e.modelValue && typeof e.modelValue == "object" && "end" in e.modelValue && e.modelValue.end ? H(e.modelValue.end) : ""), le = o(() => e.mode === "single" ? k.value !== null : e.mode === "multiple" ? u.value.length > 0 : k.value !== null && m.value !== null && m.value >= k.value);
|
|
337
|
+
o(() => e.mode === "range" && k.value && m.value ? m.value < k.value : !1);
|
|
338
338
|
const R = o(() => {
|
|
339
|
-
const w = new Date(b.value, n.value, 1), D = new Date(b.value, n.value + 1, 0), S = w.getDay(), E = D.getDate(),
|
|
339
|
+
const w = new Date(b.value, n.value, 1), D = new Date(b.value, n.value + 1, 0), S = w.getDay(), E = D.getDate(), ee = [], ae = new Date(b.value, n.value - 1, 0);
|
|
340
340
|
for (let U = S - 1; U >= 0; U--) {
|
|
341
341
|
const se = new Date(b.value, n.value - 1, ae.getDate() - U);
|
|
342
|
-
|
|
342
|
+
ee.push({
|
|
343
343
|
day: se.getDate(),
|
|
344
344
|
date: se,
|
|
345
345
|
isCurrentMonth: !1,
|
|
@@ -349,7 +349,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
349
349
|
}
|
|
350
350
|
for (let U = 1; U <= E; U++) {
|
|
351
351
|
const se = new Date(b.value, n.value, U);
|
|
352
|
-
|
|
352
|
+
ee.push({
|
|
353
353
|
day: U,
|
|
354
354
|
date: se,
|
|
355
355
|
isCurrentMonth: !0,
|
|
@@ -357,10 +357,10 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
357
357
|
key: `current-${U}`
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
const Pe = 42 -
|
|
360
|
+
const Pe = 42 - ee.length;
|
|
361
361
|
for (let U = 1; U <= Pe; U++) {
|
|
362
362
|
const se = new Date(b.value, n.value + 1, U);
|
|
363
|
-
|
|
363
|
+
ee.push({
|
|
364
364
|
day: U,
|
|
365
365
|
date: se,
|
|
366
366
|
isCurrentMonth: !1,
|
|
@@ -368,7 +368,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
368
368
|
key: `next-${U}`
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
return
|
|
371
|
+
return ee;
|
|
372
372
|
}), H = (w) => {
|
|
373
373
|
const D = w.getDate().toString().padStart(2, "0"), S = (w.getMonth() + 1).toString().padStart(2, "0"), E = w.getFullYear();
|
|
374
374
|
switch (e.dateFormat) {
|
|
@@ -398,7 +398,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
398
398
|
const D = "w-8 h-8 text-sm rounded-md transition-colors focus:outline-none";
|
|
399
399
|
if (w.disabled || ye(w.date))
|
|
400
400
|
return `${D} text-secondary-400 cursor-not-allowed`;
|
|
401
|
-
const S = je(w.date), E = Le(w.date),
|
|
401
|
+
const S = je(w.date), E = Le(w.date), ee = Oe(w.date), ae = {
|
|
402
402
|
primary: {
|
|
403
403
|
selected: "bg-primary-600 text-white",
|
|
404
404
|
inRange: "bg-primary-100 text-primary-900",
|
|
@@ -414,11 +414,11 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
414
414
|
otherMonth: "text-secondary-400 hover:bg-secondary-50 hover:text-secondary-600"
|
|
415
415
|
}
|
|
416
416
|
};
|
|
417
|
-
return S ? `${D} ${ae[e.color].selected}` : E ? `${D} ${ae[e.color].inRange}` :
|
|
418
|
-
}, je = (w) => e.mode === "single" ? k.value ? oe(w, k.value) : !1 : e.mode === "multiple" ? u.value.some((D) => oe(w, D)) : !!(k.value && oe(w, k.value)) || !!(
|
|
419
|
-
if (e.mode !== "range" || !k.value || !
|
|
417
|
+
return S ? `${D} ${ae[e.color].selected}` : E ? `${D} ${ae[e.color].inRange}` : ee ? `${D} ${ae[e.color].today}` : w.isCurrentMonth ? `${D} ${ae[e.color].default}` : `${D} ${ae[e.color].otherMonth}`;
|
|
418
|
+
}, je = (w) => e.mode === "single" ? k.value ? oe(w, k.value) : !1 : e.mode === "multiple" ? u.value.some((D) => oe(w, D)) : !!(k.value && oe(w, k.value)) || !!(m.value && oe(w, m.value)), Le = (w) => {
|
|
419
|
+
if (e.mode !== "range" || !k.value || !m.value)
|
|
420
420
|
return !1;
|
|
421
|
-
const D = k.value, S =
|
|
421
|
+
const D = k.value, S = m.value;
|
|
422
422
|
return w > D && w < S;
|
|
423
423
|
}, Oe = (w) => oe(w, /* @__PURE__ */ new Date()), oe = (w, D) => w.toDateString() === D.toDateString(), he = () => {
|
|
424
424
|
e.disabled || p.value || ne();
|
|
@@ -441,15 +441,15 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
441
441
|
}, ce = () => {
|
|
442
442
|
p.value = !1, v.value = null;
|
|
443
443
|
}, fe = () => {
|
|
444
|
-
e.mode === "single" ? (k.value = e.modelValue instanceof Date ? e.modelValue : null,
|
|
444
|
+
e.mode === "single" ? (k.value = e.modelValue instanceof Date ? e.modelValue : null, m.value = null) : e.mode === "multiple" ? u.value = Array.isArray(e.modelValue) ? [...e.modelValue] : [] : e.modelValue && typeof e.modelValue == "object" && "start" in e.modelValue ? (k.value = e.modelValue.start, m.value = e.modelValue.end) : (k.value = null, m.value = null);
|
|
445
445
|
}, Ae = (w) => {
|
|
446
446
|
if (e.mode === "single")
|
|
447
|
-
k.value = w,
|
|
447
|
+
k.value = w, m.value = null;
|
|
448
448
|
else if (e.mode === "multiple") {
|
|
449
449
|
const D = u.value.findIndex((S) => oe(S, w));
|
|
450
450
|
D >= 0 ? u.value.splice(D, 1) : u.value.push(w);
|
|
451
451
|
} else
|
|
452
|
-
v.value === "start" || !k.value ? (k.value = w,
|
|
452
|
+
v.value === "start" || !k.value ? (k.value = w, m.value = null, v.value = "end") : (v.value === "end" || !m.value) && (w < k.value ? (m.value = k.value, k.value = w) : m.value = w, v.value = null);
|
|
453
453
|
}, Fe = () => {
|
|
454
454
|
if (e.mode === "single")
|
|
455
455
|
r("update:modelValue", k.value), k.value && r("date-select", k.value);
|
|
@@ -457,7 +457,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
457
457
|
const w = [...u.value].sort((D, S) => D.getTime() - S.getTime());
|
|
458
458
|
r("update:modelValue", w), r("multiple-select", w);
|
|
459
459
|
} else {
|
|
460
|
-
const w = { start: k.value, end:
|
|
460
|
+
const w = { start: k.value, end: m.value };
|
|
461
461
|
r("update:modelValue", w), r("range-select", w);
|
|
462
462
|
}
|
|
463
463
|
ce();
|
|
@@ -465,14 +465,14 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
465
465
|
n.value === 0 ? (n.value = 11, b.value--) : n.value--;
|
|
466
466
|
}, qe = () => {
|
|
467
467
|
n.value === 11 ? (n.value = 0, b.value++) : n.value++;
|
|
468
|
-
},
|
|
469
|
-
}, pe = q(),
|
|
468
|
+
}, ze = () => {
|
|
469
|
+
}, pe = q(), Me = (w) => {
|
|
470
470
|
pe.value && !pe.value.contains(w.target) && ce();
|
|
471
471
|
};
|
|
472
472
|
return Te(() => {
|
|
473
|
-
document.addEventListener("click",
|
|
473
|
+
document.addEventListener("click", Me);
|
|
474
474
|
}), Se(() => {
|
|
475
|
-
document.removeEventListener("click",
|
|
475
|
+
document.removeEventListener("click", Me);
|
|
476
476
|
}), de(() => e.modelValue, (w) => {
|
|
477
477
|
p.value || fe();
|
|
478
478
|
}, { deep: !0 }), (w, D) => (l(), a("div", {
|
|
@@ -483,7 +483,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
483
483
|
t.mode === "single" ? (l(), a("div", tt, [
|
|
484
484
|
t.label && t.showLabel ? (l(), a("label", {
|
|
485
485
|
key: 0,
|
|
486
|
-
for:
|
|
486
|
+
for: z.value,
|
|
487
487
|
class: c(F.value)
|
|
488
488
|
}, [
|
|
489
489
|
Y($(t.label) + " ", 1),
|
|
@@ -493,7 +493,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
493
493
|
class: c(["relative rounded-md", W.value])
|
|
494
494
|
}, [
|
|
495
495
|
s("input", {
|
|
496
|
-
id:
|
|
496
|
+
id: z.value,
|
|
497
497
|
class: c(I.value),
|
|
498
498
|
type: "text",
|
|
499
499
|
disabled: t.disabled,
|
|
@@ -510,7 +510,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
510
510
|
onClick: J(we, ["stop"]),
|
|
511
511
|
disabled: t.disabled
|
|
512
512
|
}, [
|
|
513
|
-
Q(
|
|
513
|
+
Q(_, {
|
|
514
514
|
name: t.iconName,
|
|
515
515
|
size: L.value
|
|
516
516
|
}, null, 8, ["name", "size"])
|
|
@@ -519,7 +519,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
519
519
|
])) : t.mode === "multiple" ? (l(), a("div", rt, [
|
|
520
520
|
t.label && t.showLabel ? (l(), a("label", {
|
|
521
521
|
key: 0,
|
|
522
|
-
for:
|
|
522
|
+
for: z.value,
|
|
523
523
|
class: c(F.value)
|
|
524
524
|
}, [
|
|
525
525
|
Y($(t.label) + " ", 1),
|
|
@@ -529,7 +529,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
529
529
|
class: c(["relative rounded-md", W.value])
|
|
530
530
|
}, [
|
|
531
531
|
s("input", {
|
|
532
|
-
id:
|
|
532
|
+
id: z.value,
|
|
533
533
|
class: c(I.value),
|
|
534
534
|
type: "text",
|
|
535
535
|
disabled: t.disabled,
|
|
@@ -546,7 +546,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
546
546
|
onClick: J(we, ["stop"]),
|
|
547
547
|
disabled: t.disabled
|
|
548
548
|
}, [
|
|
549
|
-
Q(
|
|
549
|
+
Q(_, {
|
|
550
550
|
name: t.iconName,
|
|
551
551
|
size: L.value
|
|
552
552
|
}, null, 8, ["name", "size"])
|
|
@@ -569,7 +569,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
569
569
|
type: "text",
|
|
570
570
|
disabled: t.disabled,
|
|
571
571
|
placeholder: t.startPlaceholder || "Fecha desde",
|
|
572
|
-
value:
|
|
572
|
+
value: M.value,
|
|
573
573
|
required: t.required,
|
|
574
574
|
readonly: !0,
|
|
575
575
|
onClick: D[0] || (D[0] = () => ke("start")),
|
|
@@ -581,7 +581,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
581
581
|
onClick: D[2] || (D[2] = J(() => $e("start"), ["stop"])),
|
|
582
582
|
disabled: t.disabled
|
|
583
583
|
}, [
|
|
584
|
-
Q(
|
|
584
|
+
Q(_, {
|
|
585
585
|
name: t.startIconName,
|
|
586
586
|
size: L.value
|
|
587
587
|
}, null, 8, ["name", "size"])
|
|
@@ -600,18 +600,18 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
600
600
|
readonly: !0,
|
|
601
601
|
onClick: D[3] || (D[3] = () => ke("end")),
|
|
602
602
|
onFocus: D[4] || (D[4] = () => Ce("end"))
|
|
603
|
-
}, null, 42,
|
|
603
|
+
}, null, 42, gt),
|
|
604
604
|
s("button", {
|
|
605
605
|
type: "button",
|
|
606
606
|
class: c(["absolute right-3 top-1/2 -translate-y-1/2", B.value]),
|
|
607
607
|
onClick: D[5] || (D[5] = J(() => $e("end"), ["stop"])),
|
|
608
608
|
disabled: t.disabled
|
|
609
609
|
}, [
|
|
610
|
-
Q(
|
|
610
|
+
Q(_, {
|
|
611
611
|
name: t.endIconName,
|
|
612
612
|
size: L.value
|
|
613
613
|
}, null, 8, ["name", "size"])
|
|
614
|
-
], 10,
|
|
614
|
+
], 10, mt)
|
|
615
615
|
], 2)
|
|
616
616
|
])
|
|
617
617
|
])),
|
|
@@ -628,7 +628,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
628
628
|
onClick: We,
|
|
629
629
|
class: c(P.value)
|
|
630
630
|
}, [
|
|
631
|
-
Q(
|
|
631
|
+
Q(_, {
|
|
632
632
|
name: "chevron-left",
|
|
633
633
|
size: "sm"
|
|
634
634
|
})
|
|
@@ -637,7 +637,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
637
637
|
ve(s("select", {
|
|
638
638
|
"onUpdate:modelValue": D[6] || (D[6] = (S) => n.value = S),
|
|
639
639
|
class: c(j.value),
|
|
640
|
-
onChange:
|
|
640
|
+
onChange: ze
|
|
641
641
|
}, [
|
|
642
642
|
(l(), a(K, null, G(y, (S, E) => s("option", {
|
|
643
643
|
key: E,
|
|
@@ -649,7 +649,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
649
649
|
ve(s("select", {
|
|
650
650
|
"onUpdate:modelValue": D[7] || (D[7] = (S) => b.value = S),
|
|
651
651
|
class: c(j.value),
|
|
652
|
-
onChange:
|
|
652
|
+
onChange: ze
|
|
653
653
|
}, [
|
|
654
654
|
(l(!0), a(K, null, G(A.value, (S) => (l(), a("option", {
|
|
655
655
|
key: S,
|
|
@@ -664,7 +664,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
664
664
|
onClick: qe,
|
|
665
665
|
class: c(P.value)
|
|
666
666
|
}, [
|
|
667
|
-
Q(
|
|
667
|
+
Q(_, {
|
|
668
668
|
name: "chevron-right",
|
|
669
669
|
size: "sm"
|
|
670
670
|
})
|
|
@@ -683,9 +683,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
683
683
|
class: c(Ie(S)),
|
|
684
684
|
disabled: S.disabled || ye(S.date),
|
|
685
685
|
onClick: (E) => Ae(S.date)
|
|
686
|
-
}, $(S.day), 11,
|
|
686
|
+
}, $(S.day), 11, zt))), 128))
|
|
687
687
|
]),
|
|
688
|
-
s("div",
|
|
688
|
+
s("div", Mt, [
|
|
689
689
|
s("button", {
|
|
690
690
|
type: "button",
|
|
691
691
|
class: c(d.value),
|
|
@@ -695,19 +695,19 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
695
695
|
type: "button",
|
|
696
696
|
class: c(h.value),
|
|
697
697
|
onClick: Fe,
|
|
698
|
-
disabled: !
|
|
698
|
+
disabled: !le.value
|
|
699
699
|
}, " Confirmar ", 10, Dt)
|
|
700
700
|
])
|
|
701
701
|
], 2)) : f("", !0)
|
|
702
702
|
], 512));
|
|
703
703
|
}
|
|
704
|
-
}),
|
|
704
|
+
}), Ja = /* @__PURE__ */ Z(Vt, [["__scopeId", "data-v-97dc04bb"]]), Tt = ["role", "tabindex"], St = {
|
|
705
705
|
key: 0,
|
|
706
706
|
class: "border-b border-gray-100 px-6 py-4"
|
|
707
707
|
}, It = { class: "px-6 py-4" }, jt = {
|
|
708
708
|
key: 1,
|
|
709
709
|
class: "border-t border-gray-100 px-6 py-4 bg-gray-50"
|
|
710
|
-
},
|
|
710
|
+
}, Ga = /* @__PURE__ */ N({
|
|
711
711
|
__name: "Card",
|
|
712
712
|
props: {
|
|
713
713
|
shadow: { default: "md" },
|
|
@@ -718,8 +718,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
718
718
|
disabled: { type: Boolean, default: !1 }
|
|
719
719
|
},
|
|
720
720
|
emits: ["click"],
|
|
721
|
-
setup(t, { emit:
|
|
722
|
-
const e = t, u =
|
|
721
|
+
setup(t, { emit: g }) {
|
|
722
|
+
const e = t, u = g, r = {
|
|
723
723
|
none: "",
|
|
724
724
|
sm: "shadow-sm",
|
|
725
725
|
md: "shadow",
|
|
@@ -744,7 +744,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
744
744
|
]), n = (b) => {
|
|
745
745
|
!e.disabled && e.clickable && u("click", b);
|
|
746
746
|
};
|
|
747
|
-
return (b,
|
|
747
|
+
return (b, z) => (l(), a("div", {
|
|
748
748
|
class: c(v.value),
|
|
749
749
|
role: t.clickable ? "button" : void 0,
|
|
750
750
|
tabindex: t.clickable ? 0 : void 0,
|
|
@@ -778,8 +778,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
778
778
|
loading: { type: Boolean, default: !1 }
|
|
779
779
|
},
|
|
780
780
|
emits: ["update:modelValue", "close"],
|
|
781
|
-
setup(t, { emit:
|
|
782
|
-
const e = t, u =
|
|
781
|
+
setup(t, { emit: g }) {
|
|
782
|
+
const e = t, u = g, r = o({
|
|
783
783
|
get: () => e.modelValue,
|
|
784
784
|
set: (b) => u("update:modelValue", b)
|
|
785
785
|
}), p = o(() => ({
|
|
@@ -792,7 +792,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
792
792
|
}, n = () => {
|
|
793
793
|
e.closeOnBackdrop && !e.loading && v();
|
|
794
794
|
};
|
|
795
|
-
return (b,
|
|
795
|
+
return (b, z) => (l(), te(ge, { to: "body" }, [
|
|
796
796
|
Q(ie, { name: "dialog" }, {
|
|
797
797
|
default: re(() => [
|
|
798
798
|
r.value ? (l(), a("div", {
|
|
@@ -802,7 +802,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
802
802
|
}, [
|
|
803
803
|
s("div", {
|
|
804
804
|
class: c(["relative w-full rounded-lg bg-white shadow-xl", p.value]),
|
|
805
|
-
onClick:
|
|
805
|
+
onClick: z[0] || (z[0] = J(() => {
|
|
806
806
|
}, ["stop"]))
|
|
807
807
|
}, [
|
|
808
808
|
s("div", Lt, [
|
|
@@ -817,7 +817,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
817
817
|
"aria-label": "Cerrar diálogo",
|
|
818
818
|
disabled: t.loading,
|
|
819
819
|
onClick: v
|
|
820
|
-
}, [...
|
|
820
|
+
}, [...z[1] || (z[1] = [
|
|
821
821
|
s("svg", {
|
|
822
822
|
class: "h-6 w-6",
|
|
823
823
|
fill: "none",
|
|
@@ -836,7 +836,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
836
836
|
s("div", Ft, [
|
|
837
837
|
O(b.$slots, "default", {}, void 0, !0)
|
|
838
838
|
]),
|
|
839
|
-
t.loading ? (l(), a("div", Wt, [...
|
|
839
|
+
t.loading ? (l(), a("div", Wt, [...z[2] || (z[2] = [
|
|
840
840
|
s("div", { class: "flex items-center gap-2 text-primary-600" }, [
|
|
841
841
|
s("svg", {
|
|
842
842
|
class: "w-5 h-5 animate-spin",
|
|
@@ -874,7 +874,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
874
874
|
})
|
|
875
875
|
]));
|
|
876
876
|
}
|
|
877
|
-
}),
|
|
877
|
+
}), Qa = /* @__PURE__ */ Z(qt, [["__scopeId", "data-v-a54fab7f"]]), Pt = ["accept", "multiple", "disabled"], Rt = { class: "flex flex-col items-center justify-center gap-4 text-center" }, Et = ["src", "alt"], Yt = {
|
|
878
878
|
key: 1,
|
|
879
879
|
class: "w-full h-full text-gray-400",
|
|
880
880
|
fill: "none",
|
|
@@ -886,7 +886,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
886
886
|
}, Xt = {
|
|
887
887
|
key: 2,
|
|
888
888
|
class: "text-sm text-danger-500 mt-2"
|
|
889
|
-
},
|
|
889
|
+
}, Za = /* @__PURE__ */ N({
|
|
890
890
|
__name: "FileUpload",
|
|
891
891
|
props: {
|
|
892
892
|
modelValue: { default: null },
|
|
@@ -908,18 +908,18 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
908
908
|
progress: { default: 0 }
|
|
909
909
|
},
|
|
910
910
|
emits: ["update:modelValue", "change", "error"],
|
|
911
|
-
setup(t, { emit:
|
|
912
|
-
const e = t, u =
|
|
911
|
+
setup(t, { emit: g }) {
|
|
912
|
+
const e = t, u = g, r = q(null), p = q(!1), v = q(e.modelValue), n = q(""), b = o(() => ({
|
|
913
913
|
sm: "w-20 h-20",
|
|
914
914
|
md: "w-32 h-32",
|
|
915
915
|
lg: "w-48 h-48",
|
|
916
916
|
xl: "w-64 h-64"
|
|
917
|
-
})[e.illustrationSize]),
|
|
917
|
+
})[e.illustrationSize]), z = () => {
|
|
918
918
|
var I;
|
|
919
919
|
(I = r.value) == null || I.click();
|
|
920
920
|
}, k = () => {
|
|
921
|
-
e.disabled ||
|
|
922
|
-
},
|
|
921
|
+
e.disabled || z();
|
|
922
|
+
}, m = (I) => {
|
|
923
923
|
e.disabled || (p.value = !0);
|
|
924
924
|
}, y = () => {
|
|
925
925
|
p.value = !1;
|
|
@@ -951,7 +951,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
951
951
|
t.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
952
952
|
]]),
|
|
953
953
|
onClick: k,
|
|
954
|
-
onDragover: J(
|
|
954
|
+
onDragover: J(m, ["prevent"]),
|
|
955
955
|
onDragleave: J(y, ["prevent"]),
|
|
956
956
|
onDrop: J(A, ["prevent"])
|
|
957
957
|
}, [
|
|
@@ -1077,9 +1077,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1077
1077
|
suffix: { default: void 0 }
|
|
1078
1078
|
},
|
|
1079
1079
|
emits: ["update:modelValue", "blur", "focus", "clear"],
|
|
1080
|
-
setup(t, { emit:
|
|
1081
|
-
const e = t, u =
|
|
1082
|
-
const
|
|
1080
|
+
setup(t, { emit: g }) {
|
|
1081
|
+
const e = t, u = g, r = q(`input-${Math.random().toString(36).substr(2, 9)}`), p = o(() => "ds-label"), v = o(() => {
|
|
1082
|
+
const m = "w-full rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50", y = {
|
|
1083
1083
|
sm: "h-8 px-3 text-sm",
|
|
1084
1084
|
md: "h-10 px-4 text-base",
|
|
1085
1085
|
lg: "h-12 px-5 text-lg"
|
|
@@ -1088,18 +1088,18 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1088
1088
|
filled: "border-0 bg-secondary-100 focus:bg-white focus:ring-primary-500",
|
|
1089
1089
|
outlined: "border-2 border-secondary-300 bg-transparent focus:border-primary-500 focus:ring-primary-500"
|
|
1090
1090
|
}, L = e.error ? "border-danger-500 focus:border-danger-500 focus:ring-danger-500 pr-10" : "";
|
|
1091
|
-
return `${
|
|
1092
|
-
}), n = (
|
|
1093
|
-
const y =
|
|
1091
|
+
return `${m} ${y[e.size]} ${T[e.variant]} ${L}`;
|
|
1092
|
+
}), n = (m) => {
|
|
1093
|
+
const y = m.target;
|
|
1094
1094
|
u("update:modelValue", y.value);
|
|
1095
|
-
}, b = (
|
|
1096
|
-
u("blur",
|
|
1097
|
-
},
|
|
1098
|
-
u("focus",
|
|
1095
|
+
}, b = (m) => {
|
|
1096
|
+
u("blur", m);
|
|
1097
|
+
}, z = (m) => {
|
|
1098
|
+
u("focus", m);
|
|
1099
1099
|
}, k = () => {
|
|
1100
1100
|
u("update:modelValue", ""), u("clear");
|
|
1101
1101
|
};
|
|
1102
|
-
return (
|
|
1102
|
+
return (m, y) => (l(), a("div", _t, [
|
|
1103
1103
|
t.label ? (l(), a("label", {
|
|
1104
1104
|
key: 0,
|
|
1105
1105
|
for: r.value,
|
|
@@ -1121,7 +1121,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1121
1121
|
readonly: t.readonly,
|
|
1122
1122
|
onInput: n,
|
|
1123
1123
|
onBlur: b,
|
|
1124
|
-
onFocus:
|
|
1124
|
+
onFocus: z
|
|
1125
1125
|
}, null, 42, sl),
|
|
1126
1126
|
t.clearable || t.suffix ? (l(), a("div", ol, [
|
|
1127
1127
|
t.clearable && t.modelValue ? (l(), a("button", {
|
|
@@ -1164,7 +1164,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1164
1164
|
t.error ? (l(), a("p", il, $(t.error), 1)) : t.helperText ? (l(), a("p", dl, $(t.helperText), 1)) : f("", !0)
|
|
1165
1165
|
]));
|
|
1166
1166
|
}
|
|
1167
|
-
}),
|
|
1167
|
+
}), Xa = /* @__PURE__ */ Z(ul, [["__scopeId", "data-v-b46f9fad"]]), cl = ["stroke-width"], fl = {
|
|
1168
1168
|
class: "w-full h-full rounded-lg overflow-hidden",
|
|
1169
1169
|
style: { "background-color": "#f7f7f7" }
|
|
1170
1170
|
}, pl = /* @__PURE__ */ N({
|
|
@@ -1178,7 +1178,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1178
1178
|
progress: { default: void 0 }
|
|
1179
1179
|
},
|
|
1180
1180
|
setup(t) {
|
|
1181
|
-
const
|
|
1181
|
+
const g = t, e = {
|
|
1182
1182
|
primary: "text-primary-700",
|
|
1183
1183
|
secondary: "text-secondary-500",
|
|
1184
1184
|
success: "text-success-500",
|
|
@@ -1192,7 +1192,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1192
1192
|
warning: "bg-warning-500",
|
|
1193
1193
|
danger: "bg-danger-500",
|
|
1194
1194
|
info: "bg-info-500"
|
|
1195
|
-
}, r = o(() => [e[
|
|
1195
|
+
}, r = o(() => [e[g.color]]), p = o(() => [u[g.color]]);
|
|
1196
1196
|
return (v, n) => t.type === "circular" ? (l(), a("div", {
|
|
1197
1197
|
key: 0,
|
|
1198
1198
|
class: c(r.value)
|
|
@@ -1230,22 +1230,22 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1230
1230
|
])
|
|
1231
1231
|
], 4)) : f("", !0);
|
|
1232
1232
|
}
|
|
1233
|
-
}),
|
|
1233
|
+
}), _a = /* @__PURE__ */ Z(pl, [["__scopeId", "data-v-f369fb46"]]), vl = ["disabled", "aria-expanded"], bl = ["disabled", "onClick"], gl = {
|
|
1234
1234
|
key: 0,
|
|
1235
1235
|
class: "flex-shrink-0"
|
|
1236
|
-
},
|
|
1236
|
+
}, ml = { class: "flex-1 min-w-0 mr-2" }, yl = { class: "flex flex-col items-start" }, hl = ["title"], xl = ["title"], wl = {
|
|
1237
1237
|
key: 1,
|
|
1238
1238
|
class: "flex-shrink-0"
|
|
1239
|
-
},
|
|
1239
|
+
}, kl = {
|
|
1240
1240
|
key: 0,
|
|
1241
1241
|
class: "text-xs text-secondary-400 font-mono whitespace-nowrap"
|
|
1242
|
-
},
|
|
1242
|
+
}, Cl = { key: 1 }, $l = {
|
|
1243
1243
|
key: 2,
|
|
1244
1244
|
class: "w-4 h-4 ml-2 flex-shrink-0",
|
|
1245
1245
|
fill: "none",
|
|
1246
1246
|
stroke: "currentColor",
|
|
1247
1247
|
viewBox: "0 0 24 24"
|
|
1248
|
-
},
|
|
1248
|
+
}, Bl = /* @__PURE__ */ N({
|
|
1249
1249
|
__name: "Menu",
|
|
1250
1250
|
props: {
|
|
1251
1251
|
items: { default: () => [] },
|
|
@@ -1268,32 +1268,32 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1268
1268
|
closeDelay: { default: 100 }
|
|
1269
1269
|
},
|
|
1270
1270
|
emits: ["open", "close", "select"],
|
|
1271
|
-
setup(t, { emit:
|
|
1271
|
+
setup(t, { emit: g }) {
|
|
1272
1272
|
let e = null, u = null;
|
|
1273
|
-
const r = t, p =
|
|
1273
|
+
const r = t, p = g, v = q(!1), n = q(null), b = q(null), z = q({}), k = o(() => [
|
|
1274
1274
|
"inline-flex items-center justify-center px-4 py-2 text-sm font-medium",
|
|
1275
1275
|
"bg-white border border-secondary-300 rounded-md text-secondary-700",
|
|
1276
1276
|
"hover:bg-secondary-100 hover:text-secondary-900 hover:border-secondary-400",
|
|
1277
1277
|
"focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
1278
1278
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1279
1279
|
"transition-all duration-200"
|
|
1280
|
-
].join(" ")),
|
|
1280
|
+
].join(" ")), m = o(() => [...[
|
|
1281
1281
|
"fixed bg-white rounded-lg shadow-lg border border-secondary-200",
|
|
1282
1282
|
"flex flex-col",
|
|
1283
1283
|
"focus:outline-none"
|
|
1284
1284
|
], `z-${r.zIndex}`].join(" ")), y = o(() => "px-4 py-3 border-b border-secondary-200 bg-secondary-50"), T = o(() => "px-4 py-3 border-t border-secondary-200 bg-secondary-50"), L = o(() => "py-1 overflow-y-auto flex-1 min-h-0"), A = o(() => "my-1 border-t border-secondary-200"), F = o(() => "px-4 py-2 text-xs font-semibold text-secondary-500 uppercase tracking-wider"), W = (i) => {
|
|
1285
|
-
const
|
|
1285
|
+
const M = [
|
|
1286
1286
|
"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-left",
|
|
1287
1287
|
"transition-all duration-150 focus:outline-none cursor-pointer",
|
|
1288
1288
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
1289
|
-
], x = i.variant || "default",
|
|
1289
|
+
], x = i.variant || "default", le = {
|
|
1290
1290
|
default: "text-secondary-700 hover:bg-secondary-100 hover:text-secondary-900 focus:bg-secondary-100",
|
|
1291
1291
|
danger: "text-danger-600 hover:bg-danger-100 hover:text-danger-700 focus:bg-danger-100",
|
|
1292
1292
|
success: "text-success-600 hover:bg-success-100 hover:text-success-700 focus:bg-success-100",
|
|
1293
1293
|
warning: "text-warning-600 hover:bg-warning-100 hover:text-warning-700 focus:bg-warning-100"
|
|
1294
1294
|
};
|
|
1295
1295
|
let R = "";
|
|
1296
|
-
return i.color && (R = i.color, (i.color.includes("white") || i.color.includes("50")) && (R += " hover:text-black")), [...
|
|
1296
|
+
return i.color && (R = i.color, (i.color.includes("white") || i.color.includes("50")) && (R += " hover:text-black")), [...M, R || le[x]].join(" ");
|
|
1297
1297
|
}, I = () => {
|
|
1298
1298
|
r.disabled || (v.value ? V() : (u && clearTimeout(u), e = setTimeout(() => {
|
|
1299
1299
|
B();
|
|
@@ -1309,43 +1309,43 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1309
1309
|
}, P = (i) => {
|
|
1310
1310
|
i.disabled || (i.action && i.action(), p("select", i), (r.closeOnClick || r.closeOnSelect) && !i.children && V());
|
|
1311
1311
|
}, j = (i) => {
|
|
1312
|
-
const
|
|
1313
|
-
n.value && !n.value.contains(
|
|
1312
|
+
const M = i.target;
|
|
1313
|
+
n.value && !n.value.contains(M) && b.value && !b.value.contains(M) && V();
|
|
1314
1314
|
}, h = (i) => {
|
|
1315
1315
|
i.key === "Escape" && V();
|
|
1316
1316
|
}, d = (i) => {
|
|
1317
1317
|
(i.key === "Enter" || i.key === " ") && (i.preventDefault(), I());
|
|
1318
1318
|
}, C = () => {
|
|
1319
1319
|
if (!n.value || !b.value) return;
|
|
1320
|
-
const i = n.value.getBoundingClientRect(),
|
|
1320
|
+
const i = n.value.getBoundingClientRect(), M = b.value.getBoundingClientRect(), x = window.innerWidth, le = window.innerHeight;
|
|
1321
1321
|
let R = 0, H = 0;
|
|
1322
1322
|
switch (r.position) {
|
|
1323
1323
|
case "bottom-start":
|
|
1324
1324
|
R = i.bottom + r.offset.y, H = i.left + r.offset.x;
|
|
1325
1325
|
break;
|
|
1326
1326
|
case "bottom-end":
|
|
1327
|
-
R = i.bottom + r.offset.y, H = i.right -
|
|
1327
|
+
R = i.bottom + r.offset.y, H = i.right - M.width + r.offset.x;
|
|
1328
1328
|
break;
|
|
1329
1329
|
case "top-start":
|
|
1330
|
-
R = i.top -
|
|
1330
|
+
R = i.top - M.height - r.offset.y, H = i.left + r.offset.x;
|
|
1331
1331
|
break;
|
|
1332
1332
|
case "top-end":
|
|
1333
|
-
R = i.top -
|
|
1333
|
+
R = i.top - M.height - r.offset.y, H = i.right - M.width + r.offset.x;
|
|
1334
1334
|
break;
|
|
1335
1335
|
case "right-start":
|
|
1336
1336
|
R = i.top + r.offset.y, H = i.right + r.offset.x;
|
|
1337
1337
|
break;
|
|
1338
1338
|
case "right-end":
|
|
1339
|
-
R = i.bottom -
|
|
1339
|
+
R = i.bottom - M.height + r.offset.y, H = i.right + r.offset.x;
|
|
1340
1340
|
break;
|
|
1341
1341
|
case "left-start":
|
|
1342
|
-
R = i.top + r.offset.y, H = i.left -
|
|
1342
|
+
R = i.top + r.offset.y, H = i.left - M.width - r.offset.x;
|
|
1343
1343
|
break;
|
|
1344
1344
|
case "left-end":
|
|
1345
|
-
R = i.bottom -
|
|
1345
|
+
R = i.bottom - M.height + r.offset.y, H = i.left - M.width - r.offset.x;
|
|
1346
1346
|
break;
|
|
1347
1347
|
}
|
|
1348
|
-
H +
|
|
1348
|
+
H + M.width > x && (H = x - M.width - 8), H < 8 && (H = 8), R + M.height > le && (R = le - M.height - 8), R < 8 && (R = 8), z.value = {
|
|
1349
1349
|
top: `${R}px`,
|
|
1350
1350
|
left: `${H}px`,
|
|
1351
1351
|
width: r.width === "auto" ? `${Math.max(i.width, 240)}px` : r.width,
|
|
@@ -1359,7 +1359,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1359
1359
|
window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("click", j), document.removeEventListener("keydown", h);
|
|
1360
1360
|
}), de(() => r.items, () => {
|
|
1361
1361
|
v.value && be(C);
|
|
1362
|
-
}, { deep: !0 }), (i,
|
|
1362
|
+
}, { deep: !0 }), (i, M) => (l(), a("div", {
|
|
1363
1363
|
class: c(["menu-wrapper", { "w-full": t.fullWidth }])
|
|
1364
1364
|
}, [
|
|
1365
1365
|
s("div", {
|
|
@@ -1390,7 +1390,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1390
1390
|
fill: "none",
|
|
1391
1391
|
stroke: "currentColor",
|
|
1392
1392
|
viewBox: "0 0 24 24"
|
|
1393
|
-
}, [...
|
|
1393
|
+
}, [...M[1] || (M[1] = [
|
|
1394
1394
|
s("path", {
|
|
1395
1395
|
"stroke-linecap": "round",
|
|
1396
1396
|
"stroke-linejoin": "round",
|
|
@@ -1401,14 +1401,14 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1401
1401
|
], 42, vl)
|
|
1402
1402
|
], !0)
|
|
1403
1403
|
], 512),
|
|
1404
|
-
(l(),
|
|
1404
|
+
(l(), te(ge, { to: "body" }, [
|
|
1405
1405
|
v.value ? (l(), a("div", {
|
|
1406
1406
|
key: 0,
|
|
1407
1407
|
ref_key: "menuRef",
|
|
1408
1408
|
ref: b,
|
|
1409
|
-
class: c(
|
|
1410
|
-
style: X(
|
|
1411
|
-
onClick:
|
|
1409
|
+
class: c(m.value),
|
|
1410
|
+
style: X(z.value),
|
|
1411
|
+
onClick: M[0] || (M[0] = J(() => {
|
|
1412
1412
|
}, ["stop"]))
|
|
1413
1413
|
}, [
|
|
1414
1414
|
i.$slots.header ? (l(), a("div", {
|
|
@@ -1424,8 +1424,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1424
1424
|
close: V,
|
|
1425
1425
|
isOpen: v.value
|
|
1426
1426
|
}, () => [
|
|
1427
|
-
(l(!0), a(K, null, G(t.items, (x,
|
|
1428
|
-
key: x.id ||
|
|
1427
|
+
(l(!0), a(K, null, G(t.items, (x, le) => (l(), a(K, {
|
|
1428
|
+
key: x.id || le
|
|
1429
1429
|
}, [
|
|
1430
1430
|
x.type === "divider" ? (l(), a("div", {
|
|
1431
1431
|
key: 0,
|
|
@@ -1440,42 +1440,42 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1440
1440
|
disabled: x.disabled,
|
|
1441
1441
|
onClick: (R) => P(x)
|
|
1442
1442
|
}, [
|
|
1443
|
-
x.icon || i.$slots[`icon-${x.id}`] ? (l(), a("span",
|
|
1443
|
+
x.icon || i.$slots[`icon-${x.id}`] ? (l(), a("span", gl, [
|
|
1444
1444
|
O(i.$slots, `icon-${x.id}`, { item: x }, () => [
|
|
1445
|
-
typeof x.icon
|
|
1445
|
+
typeof x.icon == "string" ? (l(), te(_, {
|
|
1446
1446
|
key: 0,
|
|
1447
|
-
|
|
1448
|
-
|
|
1447
|
+
name: x.icon,
|
|
1448
|
+
size: "sm"
|
|
1449
|
+
}, null, 8, ["name"])) : (l(), te(me(x.icon), {
|
|
1449
1450
|
key: 1,
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
}, null, 8, gl))
|
|
1451
|
+
class: "w-5 h-5"
|
|
1452
|
+
}))
|
|
1453
1453
|
], !0)
|
|
1454
1454
|
])) : f("", !0),
|
|
1455
|
-
s("div",
|
|
1455
|
+
s("div", ml, [
|
|
1456
1456
|
O(i.$slots, `item-${x.id}`, {
|
|
1457
1457
|
item: x,
|
|
1458
1458
|
close: V
|
|
1459
1459
|
}, () => [
|
|
1460
|
-
s("div",
|
|
1460
|
+
s("div", yl, [
|
|
1461
1461
|
s("span", {
|
|
1462
1462
|
class: "truncate w-full",
|
|
1463
1463
|
title: x.label
|
|
1464
|
-
}, $(x.label), 9,
|
|
1464
|
+
}, $(x.label), 9, hl),
|
|
1465
1465
|
x.description ? (l(), a("span", {
|
|
1466
1466
|
key: 0,
|
|
1467
1467
|
class: "text-xs text-secondary-500 truncate w-full",
|
|
1468
1468
|
title: x.description
|
|
1469
|
-
}, $(x.description), 9,
|
|
1469
|
+
}, $(x.description), 9, xl)) : f("", !0)
|
|
1470
1470
|
])
|
|
1471
1471
|
], !0)
|
|
1472
1472
|
]),
|
|
1473
|
-
x.suffix || x.shortcut || i.$slots[`suffix-${x.id}`] ? (l(), a("span",
|
|
1473
|
+
x.suffix || x.shortcut || i.$slots[`suffix-${x.id}`] ? (l(), a("span", wl, [
|
|
1474
1474
|
O(i.$slots, `suffix-${x.id}`, { item: x }, () => [
|
|
1475
|
-
x.shortcut ? (l(), a("span",
|
|
1475
|
+
x.shortcut ? (l(), a("span", kl, $(x.shortcut), 1)) : x.suffix ? (l(), a("span", Cl, $(x.suffix), 1)) : f("", !0)
|
|
1476
1476
|
], !0)
|
|
1477
1477
|
])) : f("", !0),
|
|
1478
|
-
x.children && x.children.length > 0 ? (l(), a("svg",
|
|
1478
|
+
x.children && x.children.length > 0 ? (l(), a("svg", $l, [...M[2] || (M[2] = [
|
|
1479
1479
|
s("path", {
|
|
1480
1480
|
"stroke-linecap": "round",
|
|
1481
1481
|
"stroke-linejoin": "round",
|
|
@@ -1502,38 +1502,38 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1502
1502
|
]))
|
|
1503
1503
|
], 2));
|
|
1504
1504
|
}
|
|
1505
|
-
}),
|
|
1505
|
+
}), es = /* @__PURE__ */ Z(Bl, [["__scopeId", "data-v-f80cb374"]]), zl = ["for"], Ml = {
|
|
1506
1506
|
key: 0,
|
|
1507
1507
|
class: "text-danger-600"
|
|
1508
|
-
},
|
|
1508
|
+
}, Dl = ["id", "disabled", "aria-expanded"], Vl = { class: "flex-1 text-left truncate" }, Tl = {
|
|
1509
1509
|
key: 0,
|
|
1510
1510
|
class: "flex items-center justify-center gap-2 p-6 text-secondary-600"
|
|
1511
|
-
},
|
|
1511
|
+
}, Sl = {
|
|
1512
1512
|
key: 1,
|
|
1513
1513
|
class: "p-2 border-b border-secondary-200"
|
|
1514
|
-
},
|
|
1514
|
+
}, Il = ["placeholder"], jl = {
|
|
1515
1515
|
key: 2,
|
|
1516
1516
|
class: "max-h-64 overflow-y-auto"
|
|
1517
|
-
},
|
|
1517
|
+
}, Ll = {
|
|
1518
1518
|
key: 0,
|
|
1519
1519
|
class: "px-4 py-3 text-sm text-secondary-500 text-center"
|
|
1520
|
-
},
|
|
1520
|
+
}, Ol = ["onClick"], Al = { class: "flex items-center justify-between w-full" }, Fl = { class: "truncate" }, Wl = {
|
|
1521
1521
|
key: 0,
|
|
1522
1522
|
class: "w-5 h-5 text-primary-600 flex-shrink-0 ml-2",
|
|
1523
1523
|
fill: "none",
|
|
1524
1524
|
stroke: "currentColor",
|
|
1525
1525
|
viewBox: "0 0 24 24",
|
|
1526
1526
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1527
|
-
},
|
|
1527
|
+
}, ql = {
|
|
1528
1528
|
key: 0,
|
|
1529
1529
|
class: "border-t border-secondary-200 my-1"
|
|
1530
|
-
},
|
|
1530
|
+
}, Pl = ["onClick"], Rl = ["innerHTML"], El = {
|
|
1531
1531
|
key: 1,
|
|
1532
1532
|
class: "mt-1 text-sm text-danger-600"
|
|
1533
|
-
},
|
|
1533
|
+
}, Yl = {
|
|
1534
1534
|
key: 2,
|
|
1535
1535
|
class: "mt-1 text-sm text-secondary-600"
|
|
1536
|
-
},
|
|
1536
|
+
}, Nl = /* @__PURE__ */ N({
|
|
1537
1537
|
__name: "Select",
|
|
1538
1538
|
props: {
|
|
1539
1539
|
modelValue: { default: null },
|
|
@@ -1556,15 +1556,15 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1556
1556
|
bordered: { type: Boolean, default: !0 }
|
|
1557
1557
|
},
|
|
1558
1558
|
emits: ["update:modelValue", "change", "action"],
|
|
1559
|
-
setup(t, { emit:
|
|
1560
|
-
const e = t, u =
|
|
1559
|
+
setup(t, { emit: g }) {
|
|
1560
|
+
const e = t, u = g, r = q(!1), p = q(""), v = q(null), n = o(
|
|
1561
1561
|
() => `select-${Math.random().toString(36).substr(2, 9)}`
|
|
1562
|
-
), b = o(() => e.options.find((h) => h.value === e.modelValue) || null),
|
|
1562
|
+
), b = o(() => e.options.find((h) => h.value === e.modelValue) || null), z = o(() => {
|
|
1563
1563
|
if (!e.searchable || !p.value)
|
|
1564
1564
|
return e.options;
|
|
1565
1565
|
const h = p.value.toLowerCase();
|
|
1566
1566
|
return e.options.filter((d) => d.label.toLowerCase().includes(h));
|
|
1567
|
-
}), k = o(() => "ds-label"),
|
|
1567
|
+
}), k = o(() => "ds-label"), m = o(() => e.bordered ? "border border-neutral-300 rounded-md" : "rounded-md"), y = o(() => {
|
|
1568
1568
|
const h = "w-full rounded-md flex items-center justify-between gap-2 transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed", d = {
|
|
1569
1569
|
sm: "px-3 py-1.5 text-sm",
|
|
1570
1570
|
md: "px-4 py-2 text-base",
|
|
@@ -1616,10 +1616,10 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1616
1616
|
class: c(k.value)
|
|
1617
1617
|
}, [
|
|
1618
1618
|
Y($(t.label) + " ", 1),
|
|
1619
|
-
t.required ? (l(), a("span",
|
|
1619
|
+
t.required ? (l(), a("span", Ml, "*")) : f("", !0)
|
|
1620
1620
|
], 10, zl)) : f("", !0),
|
|
1621
1621
|
s("div", {
|
|
1622
|
-
class: c(["relative",
|
|
1622
|
+
class: c(["relative", m.value])
|
|
1623
1623
|
}, [
|
|
1624
1624
|
s("button", {
|
|
1625
1625
|
id: n.value,
|
|
@@ -1632,7 +1632,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1632
1632
|
onBlur: P,
|
|
1633
1633
|
onKeydown: j
|
|
1634
1634
|
}, [
|
|
1635
|
-
s("span",
|
|
1635
|
+
s("span", Vl, $(b.value ? b.value.label : t.placeholder), 1),
|
|
1636
1636
|
(l(), a("svg", {
|
|
1637
1637
|
class: c(["w-5 h-5 flex-shrink-0 transition-transform text-[#565656] opacity-80", r.value ? "rotate-180" : ""]),
|
|
1638
1638
|
fill: "none",
|
|
@@ -1647,14 +1647,14 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1647
1647
|
d: "M19 9l-7 7-7-7"
|
|
1648
1648
|
}, null, -1)
|
|
1649
1649
|
])], 2))
|
|
1650
|
-
], 42,
|
|
1650
|
+
], 42, Dl),
|
|
1651
1651
|
r.value ? (l(), a("div", {
|
|
1652
1652
|
key: 0,
|
|
1653
1653
|
class: c(T.value),
|
|
1654
1654
|
onClick: d[2] || (d[2] = J(() => {
|
|
1655
1655
|
}, ["stop"]))
|
|
1656
1656
|
}, [
|
|
1657
|
-
t.loading ? (l(), a("div",
|
|
1657
|
+
t.loading ? (l(), a("div", Tl, [...d[4] || (d[4] = [
|
|
1658
1658
|
s("svg", {
|
|
1659
1659
|
class: "w-5 h-5 animate-spin",
|
|
1660
1660
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1676,7 +1676,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1676
1676
|
})
|
|
1677
1677
|
], -1),
|
|
1678
1678
|
s("span", null, "Cargando...", -1)
|
|
1679
|
-
])])) : t.searchable ? (l(), a("div",
|
|
1679
|
+
])])) : t.searchable ? (l(), a("div", Sl, [
|
|
1680
1680
|
ve(s("input", {
|
|
1681
1681
|
ref_key: "searchInput",
|
|
1682
1682
|
ref: v,
|
|
@@ -1686,21 +1686,21 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1686
1686
|
placeholder: t.searchPlaceholder,
|
|
1687
1687
|
onKeydown: d[1] || (d[1] = J(() => {
|
|
1688
1688
|
}, ["stop"]))
|
|
1689
|
-
}, null, 40,
|
|
1689
|
+
}, null, 40, Il), [
|
|
1690
1690
|
[Ee, p.value]
|
|
1691
1691
|
])
|
|
1692
1692
|
])) : f("", !0),
|
|
1693
|
-
t.loading ? f("", !0) : (l(), a("div",
|
|
1694
|
-
|
|
1695
|
-
(l(!0), a(K, null, G(
|
|
1693
|
+
t.loading ? f("", !0) : (l(), a("div", jl, [
|
|
1694
|
+
z.value.length === 0 ? (l(), a("div", Ll, $(t.emptyText), 1)) : (l(), a(K, { key: 1 }, [
|
|
1695
|
+
(l(!0), a(K, null, G(z.value, (C) => (l(), a("button", {
|
|
1696
1696
|
key: C.value,
|
|
1697
1697
|
type: "button",
|
|
1698
1698
|
class: c(L(C)),
|
|
1699
1699
|
onClick: (i) => B(C)
|
|
1700
1700
|
}, [
|
|
1701
|
-
s("div",
|
|
1702
|
-
s("span",
|
|
1703
|
-
F(C) ? (l(), a("svg",
|
|
1701
|
+
s("div", Al, [
|
|
1702
|
+
s("span", Fl, $(C.label), 1),
|
|
1703
|
+
F(C) ? (l(), a("svg", Wl, [...d[5] || (d[5] = [
|
|
1704
1704
|
s("path", {
|
|
1705
1705
|
"stroke-linecap": "round",
|
|
1706
1706
|
"stroke-linejoin": "round",
|
|
@@ -1709,8 +1709,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1709
1709
|
}, null, -1)
|
|
1710
1710
|
])])) : f("", !0)
|
|
1711
1711
|
])
|
|
1712
|
-
], 10,
|
|
1713
|
-
t.actionItems.length > 0 ? (l(), a("div",
|
|
1712
|
+
], 10, Ol))), 128)),
|
|
1713
|
+
t.actionItems.length > 0 ? (l(), a("div", ql)) : f("", !0),
|
|
1714
1714
|
(l(!0), a(K, null, G(t.actionItems, (C) => (l(), a("button", {
|
|
1715
1715
|
key: C.id,
|
|
1716
1716
|
type: "button",
|
|
@@ -1725,14 +1725,14 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1725
1725
|
viewBox: "0 0 24 24",
|
|
1726
1726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1727
1727
|
innerHTML: C.icon
|
|
1728
|
-
}, null, 8,
|
|
1728
|
+
}, null, 8, Rl)) : f("", !0),
|
|
1729
1729
|
Y(" " + $(C.label), 1)
|
|
1730
|
-
], 10,
|
|
1730
|
+
], 10, Pl))), 128))
|
|
1731
1731
|
], 64))
|
|
1732
1732
|
]))
|
|
1733
1733
|
], 2)) : f("", !0)
|
|
1734
1734
|
], 2),
|
|
1735
|
-
t.error ? (l(), a("p",
|
|
1735
|
+
t.error ? (l(), a("p", El, $(t.error), 1)) : t.helperText ? (l(), a("p", Yl, $(t.helperText), 1)) : f("", !0),
|
|
1736
1736
|
r.value ? (l(), a("div", {
|
|
1737
1737
|
key: 3,
|
|
1738
1738
|
onClick: I,
|
|
@@ -1740,10 +1740,10 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1740
1740
|
})) : f("", !0)
|
|
1741
1741
|
], 2));
|
|
1742
1742
|
}
|
|
1743
|
-
}),
|
|
1743
|
+
}), ts = /* @__PURE__ */ Z(Nl, [["__scopeId", "data-v-9886e097"]]), Hl = ["title"], Kl = {
|
|
1744
1744
|
key: 0,
|
|
1745
1745
|
class: "space-y-1"
|
|
1746
|
-
},
|
|
1746
|
+
}, Ul = ["href", "onClick", "aria-current"], Jl = { key: 2 }, Gl = /* @__PURE__ */ N({
|
|
1747
1747
|
__name: "Sidebar",
|
|
1748
1748
|
props: {
|
|
1749
1749
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1767,8 +1767,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1767
1767
|
scrimOpacity: { default: 0.5 }
|
|
1768
1768
|
},
|
|
1769
1769
|
emits: ["update:modelValue", "update:activeItem", "update:collapsed", "close", "open", "itemClick", "toggleCollapse"],
|
|
1770
|
-
setup(t, { emit:
|
|
1771
|
-
const e = t, u = q(e.collapsed), r = o(() => e.mini || u.value), p =
|
|
1770
|
+
setup(t, { emit: g }) {
|
|
1771
|
+
const e = t, u = q(e.collapsed), r = o(() => e.mini || u.value), p = g, v = o({
|
|
1772
1772
|
get: () => e.modelValue,
|
|
1773
1773
|
set: (j) => p("update:modelValue", j)
|
|
1774
1774
|
}), n = (j = !1) => {
|
|
@@ -1784,9 +1784,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1784
1784
|
},
|
|
1785
1785
|
{ immediate: !0 }
|
|
1786
1786
|
);
|
|
1787
|
-
const
|
|
1787
|
+
const z = (j, h) => {
|
|
1788
1788
|
h.id && p("update:activeItem", h.id), h.onClick && (j.preventDefault(), h.onClick(h)), p("itemClick", h), !e.keepOpen && !e.persistent && n();
|
|
1789
|
-
}, k = (j) => j.active !== void 0 ? j.active : e.activeItem && j.id ? e.activeItem === j.id : !1,
|
|
1789
|
+
}, k = (j) => j.active !== void 0 ? j.active : e.activeItem && j.id ? e.activeItem === j.id : !1, m = (j) => {
|
|
1790
1790
|
const h = r.value ? "flex items-center justify-center p-3 rounded-lg transition-all duration-200" : "flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 text-sm font-medium", d = k(j) ? r.value ? "bg-primary-100 text-primary-700" : "bg-primary-100 text-primary-700 border-l-4 border-primary-600" : "text-gray-700 hover:bg-gray-100 hover:text-gray-900";
|
|
1791
1791
|
return `${h} ${d}`;
|
|
1792
1792
|
}, y = (j) => {
|
|
@@ -1807,7 +1807,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1807
1807
|
md: "p-4",
|
|
1808
1808
|
lg: "p-6"
|
|
1809
1809
|
}, W = o(() => `flex items-center justify-between border-b border-gray-200 ${r.value ? "p-2" : F[e.padding]}`), I = o(() => r.value ? "flex gap-1 items-center" : "flex gap-2 items-center"), B = o(() => r.value ? "p-1.5 hover:bg-gray-100 rounded-md transition-colors" : "p-2 hover:bg-gray-100 rounded-md transition-colors"), V = o(() => `flex-1 overflow-y-auto ${F[e.padding]}`), P = o(() => `border-t border-gray-200 ${F[e.padding]}`);
|
|
1810
|
-
return (j, h) => (l(),
|
|
1810
|
+
return (j, h) => (l(), te(ge, { to: "body" }, [
|
|
1811
1811
|
Q(ie, { name: "fade" }, {
|
|
1812
1812
|
default: re(() => [
|
|
1813
1813
|
v.value && t.overlay && !t.keepOpen ? (l(), a("div", {
|
|
@@ -1854,7 +1854,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1854
1854
|
d: "M15 19l-7-7 7-7"
|
|
1855
1855
|
})
|
|
1856
1856
|
], -1)
|
|
1857
|
-
])], 10,
|
|
1857
|
+
])], 10, Hl)) : f("", !0),
|
|
1858
1858
|
t.closable ? (l(), a("button", {
|
|
1859
1859
|
key: 1,
|
|
1860
1860
|
onClick: h[1] || (h[1] = (d) => n(!0)),
|
|
@@ -1880,25 +1880,25 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1880
1880
|
s("div", {
|
|
1881
1881
|
class: c(V.value)
|
|
1882
1882
|
}, [
|
|
1883
|
-
t.items && t.items.length ? (l(), a("nav",
|
|
1883
|
+
t.items && t.items.length ? (l(), a("nav", Kl, [
|
|
1884
1884
|
(l(!0), a(K, null, G(t.items, (d) => (l(), a("a", {
|
|
1885
1885
|
key: d.id || d.label,
|
|
1886
1886
|
href: d.href,
|
|
1887
|
-
onClick: (C) =>
|
|
1888
|
-
class: c(
|
|
1887
|
+
onClick: (C) => z(C, d),
|
|
1888
|
+
class: c(m(d)),
|
|
1889
1889
|
"aria-current": k(d) ? "page" : void 0
|
|
1890
1890
|
}, [
|
|
1891
|
-
d.icon && typeof d.icon == "string" ? (l(),
|
|
1891
|
+
d.icon && typeof d.icon == "string" ? (l(), te(_, {
|
|
1892
1892
|
key: 0,
|
|
1893
1893
|
name: d.icon,
|
|
1894
1894
|
size: "md",
|
|
1895
1895
|
class: c(y(d))
|
|
1896
|
-
}, null, 8, ["name", "class"])) : d.icon ? (l(),
|
|
1896
|
+
}, null, 8, ["name", "class"])) : d.icon ? (l(), te(me(d.icon), {
|
|
1897
1897
|
key: 1,
|
|
1898
1898
|
class: c(y(d))
|
|
1899
1899
|
}, null, 8, ["class"])) : f("", !0),
|
|
1900
|
-
r.value ? f("", !0) : (l(), a("span",
|
|
1901
|
-
], 10,
|
|
1900
|
+
r.value ? f("", !0) : (l(), a("span", Jl, $(d.label), 1))
|
|
1901
|
+
], 10, Ul))), 128))
|
|
1902
1902
|
])) : f("", !0),
|
|
1903
1903
|
O(j.$slots, "default", {}, void 0, !0)
|
|
1904
1904
|
], 2),
|
|
@@ -1914,28 +1914,28 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1914
1914
|
}, 8, ["name"])
|
|
1915
1915
|
]));
|
|
1916
1916
|
}
|
|
1917
|
-
}),
|
|
1917
|
+
}), ls = /* @__PURE__ */ Z(Gl, [["__scopeId", "data-v-e9c1eec7"]]), Ql = { class: "w-full space-y-4" }, Zl = { class: "flex flex-col gap-3 md:hidden" }, Xl = {
|
|
1918
1918
|
key: 0,
|
|
1919
1919
|
class: "flex items-center gap-2 px-1 text-sm text-gray-600"
|
|
1920
|
-
},
|
|
1920
|
+
}, _l = ["checked", "indeterminate"], ea = {
|
|
1921
1921
|
key: 0,
|
|
1922
1922
|
class: "flex items-center gap-2 pb-2"
|
|
1923
|
-
},
|
|
1923
|
+
}, ta = ["checked", "onChange", "aria-label"], la = { class: "text-[11px] uppercase tracking-wide text-gray-400" }, aa = { class: "text-sm text-gray-700" }, sa = {
|
|
1924
1924
|
key: 1,
|
|
1925
1925
|
class: "rounded-lg border border-dashed border-gray-200 bg-white p-4 text-gray-400 text-center"
|
|
1926
|
-
},
|
|
1926
|
+
}, oa = { class: "hidden md:block w-full overflow-x-auto" }, ra = { class: "w-full border-collapse" }, na = { class: "w-full" }, ia = {
|
|
1927
1927
|
key: 0,
|
|
1928
1928
|
class: "px-3 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0 w-10"
|
|
1929
|
-
},
|
|
1929
|
+
}, da = ["checked", "indeterminate"], ua = ["onClick"], ca = { class: "flex items-center gap-2" }, fa = {
|
|
1930
1930
|
key: 0,
|
|
1931
1931
|
class: "text-xs text-gray-400"
|
|
1932
|
-
},
|
|
1932
|
+
}, pa = { key: 0 }, va = { key: 1 }, ba = { class: "w-full" }, ga = ["checked", "onChange", "aria-label"], ma = {
|
|
1933
1933
|
key: 0,
|
|
1934
1934
|
class: "flex items-center justify-center py-12 text-gray-400"
|
|
1935
|
-
},
|
|
1935
|
+
}, ya = {
|
|
1936
1936
|
key: 0,
|
|
1937
1937
|
class: "w-full px-6 py-4 bg-white"
|
|
1938
|
-
},
|
|
1938
|
+
}, ha = /* @__PURE__ */ N({
|
|
1939
1939
|
__name: "Table",
|
|
1940
1940
|
props: {
|
|
1941
1941
|
columns: {},
|
|
@@ -1952,22 +1952,22 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1952
1952
|
hover: { type: Boolean, default: !0 }
|
|
1953
1953
|
},
|
|
1954
1954
|
emits: ["update:selectedKeys"],
|
|
1955
|
-
setup(t, { emit:
|
|
1955
|
+
setup(t, { emit: g }) {
|
|
1956
1956
|
const e = t, u = o(() => ({
|
|
1957
1957
|
compact: "py-1.5",
|
|
1958
1958
|
normal: "py-3",
|
|
1959
1959
|
spacious: "py-5"
|
|
1960
|
-
})[e.density]), r = o(() => e.striped), p = o(() => e.hover), v =
|
|
1960
|
+
})[e.density]), r = o(() => e.striped), p = o(() => e.hover), v = g, n = q(null), b = q("asc"), z = (d) => {
|
|
1961
1961
|
n.value === d ? b.value = b.value === "asc" ? "desc" : "asc" : (n.value = d, b.value = "asc");
|
|
1962
1962
|
}, k = o(() => {
|
|
1963
1963
|
if (!n.value)
|
|
1964
1964
|
return e.data;
|
|
1965
1965
|
const d = [...e.data];
|
|
1966
1966
|
return d.sort((C, i) => {
|
|
1967
|
-
const
|
|
1968
|
-
return typeof
|
|
1967
|
+
const M = C[n.value], x = i[n.value];
|
|
1968
|
+
return typeof M == "string" && typeof x == "string" ? b.value === "asc" ? M.localeCompare(x) : x.localeCompare(M) : typeof M == "number" && typeof x == "number" ? b.value === "asc" ? M - x : x - M : 0;
|
|
1969
1969
|
}), d;
|
|
1970
|
-
}),
|
|
1970
|
+
}), m = o(() => e.columns.filter((d) => !d.hideOnMobile)), y = o(() => e.selectable), T = o({
|
|
1971
1971
|
get: () => e.selectedKeys || [],
|
|
1972
1972
|
set: (d) => v("update:selectedKeys", d)
|
|
1973
1973
|
}), L = (d, C) => {
|
|
@@ -1980,8 +1980,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1980
1980
|
return T.value.includes(i);
|
|
1981
1981
|
}, V = (d, C, i) => {
|
|
1982
1982
|
if (!y.value) return;
|
|
1983
|
-
const
|
|
1984
|
-
i ? x.add(
|
|
1983
|
+
const M = L(d, C), x = new Set(T.value);
|
|
1984
|
+
i ? x.add(M) : x.delete(M), T.value = Array.from(x);
|
|
1985
1985
|
}, P = (d) => {
|
|
1986
1986
|
const C = d.target;
|
|
1987
1987
|
return !!(C != null && C.checked);
|
|
@@ -1990,9 +1990,9 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
1990
1990
|
}, h = (d, C, i) => {
|
|
1991
1991
|
V(d, C, P(i));
|
|
1992
1992
|
};
|
|
1993
|
-
return (d, C) => (l(), a("div",
|
|
1994
|
-
s("div",
|
|
1995
|
-
y.value ? (l(), a("div",
|
|
1993
|
+
return (d, C) => (l(), a("div", Ql, [
|
|
1994
|
+
s("div", Zl, [
|
|
1995
|
+
y.value ? (l(), a("div", Xl, [
|
|
1996
1996
|
s("input", {
|
|
1997
1997
|
type: "checkbox",
|
|
1998
1998
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
@@ -2000,29 +2000,29 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2000
2000
|
indeterminate: W.value,
|
|
2001
2001
|
onChange: j,
|
|
2002
2002
|
"aria-label": "Seleccionar todas las filas"
|
|
2003
|
-
}, null, 40,
|
|
2003
|
+
}, null, 40, _l),
|
|
2004
2004
|
C[0] || (C[0] = s("span", null, "Seleccionar todas", -1))
|
|
2005
2005
|
])) : f("", !0),
|
|
2006
|
-
(l(!0), a(K, null, G(k.value, (i,
|
|
2007
|
-
key: `card-${
|
|
2006
|
+
(l(!0), a(K, null, G(k.value, (i, M) => (l(), a("div", {
|
|
2007
|
+
key: `card-${M}`,
|
|
2008
2008
|
class: "rounded-lg border border-gray-200 bg-white p-4 shadow-sm"
|
|
2009
2009
|
}, [
|
|
2010
|
-
y.value ? (l(), a("div",
|
|
2010
|
+
y.value ? (l(), a("div", ea, [
|
|
2011
2011
|
s("input", {
|
|
2012
2012
|
type: "checkbox",
|
|
2013
2013
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2014
|
-
checked: B(i,
|
|
2015
|
-
onChange: (x) => h(i,
|
|
2016
|
-
"aria-label": `Seleccionar fila ${
|
|
2017
|
-
}, null, 40,
|
|
2014
|
+
checked: B(i, M),
|
|
2015
|
+
onChange: (x) => h(i, M, x),
|
|
2016
|
+
"aria-label": `Seleccionar fila ${M + 1}`
|
|
2017
|
+
}, null, 40, ta),
|
|
2018
2018
|
C[1] || (C[1] = s("span", { class: "text-sm text-gray-700" }, "Seleccionar fila", -1))
|
|
2019
2019
|
])) : f("", !0),
|
|
2020
|
-
(l(!0), a(K, null, G(
|
|
2021
|
-
key: `card-${
|
|
2020
|
+
(l(!0), a(K, null, G(m.value, (x) => (l(), a("div", {
|
|
2021
|
+
key: `card-${M}-${x.key}`,
|
|
2022
2022
|
class: "flex flex-col gap-1 py-1"
|
|
2023
2023
|
}, [
|
|
2024
|
-
s("span",
|
|
2025
|
-
s("span",
|
|
2024
|
+
s("span", la, $(x.label), 1),
|
|
2025
|
+
s("span", aa, [
|
|
2026
2026
|
O(d.$slots, `cell-${x.key}`, {
|
|
2027
2027
|
value: i[x.key],
|
|
2028
2028
|
row: i
|
|
@@ -2032,22 +2032,22 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2032
2032
|
])
|
|
2033
2033
|
]))), 128))
|
|
2034
2034
|
]))), 128)),
|
|
2035
|
-
k.value.length === 0 ? (l(), a("div",
|
|
2035
|
+
k.value.length === 0 ? (l(), a("div", sa, [
|
|
2036
2036
|
O(d.$slots, "empty", {}, () => [
|
|
2037
2037
|
C[2] || (C[2] = Y("No hay datos disponibles", -1))
|
|
2038
2038
|
], !0)
|
|
2039
2039
|
])) : f("", !0)
|
|
2040
2040
|
]),
|
|
2041
|
-
s("div",
|
|
2042
|
-
s("table",
|
|
2043
|
-
s("thead",
|
|
2041
|
+
s("div", oa, [
|
|
2042
|
+
s("table", ra, [
|
|
2043
|
+
s("thead", na, [
|
|
2044
2044
|
s("tr", {
|
|
2045
2045
|
class: c([
|
|
2046
|
-
"w-full",
|
|
2047
|
-
e.headerClass || "
|
|
2046
|
+
"w-full bg-neutral-50 border-b border-gray-100",
|
|
2047
|
+
e.headerClass || ""
|
|
2048
2048
|
])
|
|
2049
2049
|
}, [
|
|
2050
|
-
y.value ? (l(), a("th",
|
|
2050
|
+
y.value ? (l(), a("th", ia, [
|
|
2051
2051
|
s("input", {
|
|
2052
2052
|
type: "checkbox",
|
|
2053
2053
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
@@ -2055,7 +2055,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2055
2055
|
indeterminate: W.value,
|
|
2056
2056
|
onChange: j,
|
|
2057
2057
|
"aria-label": "Seleccionar todas las filas"
|
|
2058
|
-
}, null, 40,
|
|
2058
|
+
}, null, 40, da)
|
|
2059
2059
|
])) : f("", !0),
|
|
2060
2060
|
(l(!0), a(K, null, G(t.columns, (i) => (l(), a("th", {
|
|
2061
2061
|
key: i.key,
|
|
@@ -2063,25 +2063,26 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2063
2063
|
class: c([
|
|
2064
2064
|
"px-4 py-3 text-left text-xs font-semibold text-gray-700 border-l border-gray-100 first:border-l-0",
|
|
2065
2065
|
i.sortable ? "cursor-pointer hover:text-primary-600 select-none transition-colors" : "",
|
|
2066
|
+
e.headerClass,
|
|
2066
2067
|
e.headerCellClass
|
|
2067
2068
|
]),
|
|
2068
|
-
onClick: (
|
|
2069
|
+
onClick: (M) => i.sortable && z(i.key)
|
|
2069
2070
|
}, [
|
|
2070
|
-
s("div",
|
|
2071
|
+
s("div", ca, [
|
|
2071
2072
|
s("span", null, $(i.label), 1),
|
|
2072
|
-
i.sortable ? (l(), a("span",
|
|
2073
|
-
n.value !== i.key ? (l(), a("span",
|
|
2073
|
+
i.sortable ? (l(), a("span", fa, [
|
|
2074
|
+
n.value !== i.key ? (l(), a("span", pa, "⇅")) : (l(), a("span", va, $(b.value === "asc" ? "↑" : "↓"), 1))
|
|
2074
2075
|
])) : f("", !0)
|
|
2075
2076
|
])
|
|
2076
|
-
], 14,
|
|
2077
|
+
], 14, ua))), 128))
|
|
2077
2078
|
], 2)
|
|
2078
2079
|
]),
|
|
2079
|
-
s("tbody",
|
|
2080
|
-
(l(!0), a(K, null, G(k.value, (i,
|
|
2081
|
-
key:
|
|
2080
|
+
s("tbody", ba, [
|
|
2081
|
+
(l(!0), a(K, null, G(k.value, (i, M) => (l(), a("tr", {
|
|
2082
|
+
key: M,
|
|
2082
2083
|
class: c([
|
|
2083
|
-
"w-full border-b border-gray-200 transition-colors",
|
|
2084
|
-
r.value &&
|
|
2084
|
+
"w-full border-b border-gray-200 transition-colors bg-white",
|
|
2085
|
+
r.value && M % 2 === 1 ? "bg-gray-50" : "",
|
|
2085
2086
|
p.value ? "hover:bg-blue-50" : "",
|
|
2086
2087
|
e.rowClass,
|
|
2087
2088
|
u.value
|
|
@@ -2094,15 +2095,16 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2094
2095
|
s("input", {
|
|
2095
2096
|
type: "checkbox",
|
|
2096
2097
|
class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500",
|
|
2097
|
-
checked: B(i,
|
|
2098
|
-
onChange: (x) => h(i,
|
|
2099
|
-
"aria-label": `Seleccionar fila ${
|
|
2098
|
+
checked: B(i, M),
|
|
2099
|
+
onChange: (x) => h(i, M, x),
|
|
2100
|
+
"aria-label": `Seleccionar fila ${M + 1}`
|
|
2100
2101
|
}, null, 40, ga)
|
|
2101
2102
|
], 2)) : f("", !0),
|
|
2102
2103
|
(l(!0), a(K, null, G(t.columns, (x) => (l(), a("td", {
|
|
2103
|
-
key: `${
|
|
2104
|
+
key: `${M}-${x.key}`,
|
|
2104
2105
|
class: c([
|
|
2105
|
-
"px-4 text-xs text-gray-600 border-l border-gray-100 first:border-l-0",
|
|
2106
|
+
"px-4 text-xs text-gray-600 border-l border-gray-100 first:border-l-0 bg-white",
|
|
2107
|
+
e.rowClass,
|
|
2106
2108
|
e.cellClass,
|
|
2107
2109
|
u.value
|
|
2108
2110
|
])
|
|
@@ -2117,18 +2119,18 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2117
2119
|
], 2))), 128))
|
|
2118
2120
|
])
|
|
2119
2121
|
]),
|
|
2120
|
-
k.value.length === 0 ? (l(), a("div",
|
|
2122
|
+
k.value.length === 0 ? (l(), a("div", ma, [
|
|
2121
2123
|
O(d.$slots, "empty", {}, () => [
|
|
2122
2124
|
C[3] || (C[3] = Y("No hay datos disponibles", -1))
|
|
2123
2125
|
], !0)
|
|
2124
2126
|
])) : f("", !0)
|
|
2125
2127
|
]),
|
|
2126
|
-
d.$slots.footer ? (l(), a("div",
|
|
2128
|
+
d.$slots.footer ? (l(), a("div", ya, [
|
|
2127
2129
|
O(d.$slots, "footer", {}, void 0, !0)
|
|
2128
2130
|
])) : f("", !0)
|
|
2129
2131
|
]));
|
|
2130
2132
|
}
|
|
2131
|
-
}),
|
|
2133
|
+
}), as = /* @__PURE__ */ Z(ha, [["__scopeId", "data-v-9f8c5346"]]), xa = { class: "tabs-wrapper" }, wa = ["aria-selected", "onClick"], ka = "relative w-full sm:w-auto text-left sm:text-center px-4 sm:px-6 py-3 text-base tracking-wide transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary-500", Ca = /* @__PURE__ */ N({
|
|
2132
2134
|
__name: "Tabs",
|
|
2133
2135
|
props: {
|
|
2134
2136
|
modelValue: {},
|
|
@@ -2138,8 +2140,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2138
2140
|
variant: { default: "default" }
|
|
2139
2141
|
},
|
|
2140
2142
|
emits: ["update:modelValue"],
|
|
2141
|
-
setup(t, { emit:
|
|
2142
|
-
const e = t, u =
|
|
2143
|
+
setup(t, { emit: g }) {
|
|
2144
|
+
const e = t, u = g, r = o(() => ({
|
|
2143
2145
|
default: "border-b-3",
|
|
2144
2146
|
bordered: "border border-secondary-200 rounded-t-lg",
|
|
2145
2147
|
pill: "rounded-full bg-secondary-100 mx-1"
|
|
@@ -2155,12 +2157,12 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2155
2157
|
default: "hover:text-secondary-700 border-transparent font-normal",
|
|
2156
2158
|
bordered: "text-secondary-600 hover:text-primary-600 font-normal",
|
|
2157
2159
|
pill: "text-secondary-600 hover:text-secondary-900 font-normal"
|
|
2158
|
-
})[e.variant]), b = (y) => e.modelValue === y,
|
|
2160
|
+
})[e.variant]), b = (y) => e.modelValue === y, z = (y) => {
|
|
2159
2161
|
b(y) || u("update:modelValue", y);
|
|
2160
|
-
}, k = o(() => e.modelValue),
|
|
2162
|
+
}, k = o(() => e.modelValue), m = o(
|
|
2161
2163
|
() => e.tabs.find((y) => y.value === k.value)
|
|
2162
2164
|
);
|
|
2163
|
-
return (y, T) => (l(), a("div",
|
|
2165
|
+
return (y, T) => (l(), a("div", xa, [
|
|
2164
2166
|
s("div", {
|
|
2165
2167
|
class: c(["tabs-header", t.headerClass])
|
|
2166
2168
|
}, [
|
|
@@ -2172,14 +2174,14 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2172
2174
|
key: L.value,
|
|
2173
2175
|
type: "button",
|
|
2174
2176
|
class: c([
|
|
2175
|
-
|
|
2177
|
+
ka,
|
|
2176
2178
|
r.value,
|
|
2177
2179
|
b(L.value) ? v.value : n.value
|
|
2178
2180
|
]),
|
|
2179
2181
|
"aria-selected": b(L.value),
|
|
2180
2182
|
role: "tab",
|
|
2181
|
-
onClick: (A) =>
|
|
2182
|
-
}, $(L.label), 11,
|
|
2183
|
+
onClick: (A) => z(L.value)
|
|
2184
|
+
}, $(L.label), 11, wa))), 128))
|
|
2183
2185
|
], 2)
|
|
2184
2186
|
], 2),
|
|
2185
2187
|
s("div", {
|
|
@@ -2188,12 +2190,12 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2188
2190
|
}, [
|
|
2189
2191
|
O(y.$slots, k.value, {
|
|
2190
2192
|
active: k.value,
|
|
2191
|
-
tab:
|
|
2193
|
+
tab: m.value
|
|
2192
2194
|
}, void 0, !0)
|
|
2193
2195
|
], 2)
|
|
2194
2196
|
]));
|
|
2195
2197
|
}
|
|
2196
|
-
}),
|
|
2198
|
+
}), ss = /* @__PURE__ */ Z(Ca, [["__scopeId", "data-v-fd5e2425"]]), $a = "font-sans", os = /* @__PURE__ */ N({
|
|
2197
2199
|
__name: "Text",
|
|
2198
2200
|
props: {
|
|
2199
2201
|
variant: { default: "body1" },
|
|
@@ -2205,7 +2207,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2205
2207
|
weight: {}
|
|
2206
2208
|
},
|
|
2207
2209
|
setup(t) {
|
|
2208
|
-
const
|
|
2210
|
+
const g = {
|
|
2209
2211
|
h1: "text-[40px] leading-[57px] tracking-[0px] font-extrabold",
|
|
2210
2212
|
h2: "text-[40px] leading-[57px] tracking-[0px] font-bold",
|
|
2211
2213
|
h3: "text-[28px] leading-[39px] tracking-[0px] font-extrabold",
|
|
@@ -2265,7 +2267,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2265
2267
|
semibold: "font-semibold",
|
|
2266
2268
|
bold: "font-bold",
|
|
2267
2269
|
extrabold: "font-extrabold"
|
|
2268
|
-
}, v = t, n = o(() => v.variant), b = o(() => v.align),
|
|
2270
|
+
}, v = t, n = o(() => v.variant), b = o(() => v.align), z = o(() => v.as || e[n.value] || "span"), k = o(() => v.color && v.color.startsWith("#")), m = o(() => k.value ? "" : r[v.color] || r.default), y = o(() => k.value ? { color: v.color } : {}), T = o(() => v.weight ? { fontWeight: {
|
|
2269
2271
|
light: 300,
|
|
2270
2272
|
normal: 400,
|
|
2271
2273
|
medium: 500,
|
|
@@ -2273,11 +2275,11 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2273
2275
|
bold: 700,
|
|
2274
2276
|
extrabold: 800
|
|
2275
2277
|
}[v.weight] } : {}), L = o(() => v.weight ? p[v.weight] : "");
|
|
2276
|
-
return (A, F) => (l(),
|
|
2278
|
+
return (A, F) => (l(), te(me(z.value), {
|
|
2277
2279
|
class: c([
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2280
|
+
$a,
|
|
2281
|
+
g[n.value],
|
|
2282
|
+
m.value,
|
|
2281
2283
|
u[b.value],
|
|
2282
2284
|
L.value,
|
|
2283
2285
|
{
|
|
@@ -2293,17 +2295,17 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2293
2295
|
_: 3
|
|
2294
2296
|
}, 8, ["class", "style"]));
|
|
2295
2297
|
}
|
|
2296
|
-
}),
|
|
2298
|
+
}), Ba = { class: "w-full flex items-center justify-between gap-3 py-2" }, za = {
|
|
2297
2299
|
key: 0,
|
|
2298
|
-
class: "text-xs text
|
|
2299
|
-
},
|
|
2300
|
+
class: "text-xs pagination-text"
|
|
2301
|
+
}, Ma = { key: 0 }, Da = {
|
|
2300
2302
|
class: "ml-auto inline-flex items-center gap-1",
|
|
2301
2303
|
role: "navigation",
|
|
2302
2304
|
"aria-label": "Pagination"
|
|
2303
|
-
},
|
|
2305
|
+
}, Va = ["disabled"], Ta = {
|
|
2304
2306
|
key: 0,
|
|
2305
|
-
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center text
|
|
2306
|
-
},
|
|
2307
|
+
class: "h-8 min-w-8 px-2 inline-flex items-center justify-center pagination-text"
|
|
2308
|
+
}, Sa = ["aria-label", "onClick"], Ia = ["disabled"], ja = /* @__PURE__ */ N({
|
|
2307
2309
|
__name: "Pagination",
|
|
2308
2310
|
props: {
|
|
2309
2311
|
modelValue: { default: 1 },
|
|
@@ -2316,74 +2318,74 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2316
2318
|
itemLabel: { default: "" }
|
|
2317
2319
|
},
|
|
2318
2320
|
emits: ["update:modelValue", "change"],
|
|
2319
|
-
setup(t, { emit:
|
|
2320
|
-
const e = t, u =
|
|
2321
|
-
const
|
|
2322
|
-
return
|
|
2321
|
+
setup(t, { emit: g }) {
|
|
2322
|
+
const e = t, u = g, r = o(() => {
|
|
2323
|
+
const m = Math.ceil(e.totalItems / e.pageSize);
|
|
2324
|
+
return m > 0 ? m : 1;
|
|
2323
2325
|
}), p = o(() => {
|
|
2324
|
-
const
|
|
2325
|
-
return
|
|
2326
|
-
}), v = o(() => e.totalItems === 0 ? 0 : (p.value - 1) * e.pageSize + 1), n = o(() => Math.min(p.value * e.pageSize, e.totalItems)), b = o(() => `Mostrando ${v.value} a ${n.value} de ${e.totalItems}`),
|
|
2327
|
-
const
|
|
2328
|
-
if (
|
|
2329
|
-
return Array.from({ length:
|
|
2326
|
+
const m = Number(e.modelValue || 1);
|
|
2327
|
+
return m < 1 ? 1 : m > r.value ? r.value : m;
|
|
2328
|
+
}), v = o(() => e.totalItems === 0 ? 0 : (p.value - 1) * e.pageSize + 1), n = o(() => Math.min(p.value * e.pageSize, e.totalItems)), b = o(() => `Mostrando ${v.value} a ${n.value} de ${e.totalItems}`), z = o(() => {
|
|
2329
|
+
const m = r.value, y = Math.max(3, e.maxPages), T = p.value;
|
|
2330
|
+
if (m <= y)
|
|
2331
|
+
return Array.from({ length: m }, (I, B) => B + 1);
|
|
2330
2332
|
const L = Math.floor(y / 2);
|
|
2331
|
-
let A = Math.max(1, T - L), F = Math.min(
|
|
2333
|
+
let A = Math.max(1, T - L), F = Math.min(m, A + y - 1);
|
|
2332
2334
|
A = Math.max(1, Math.min(A, F - y + 1));
|
|
2333
2335
|
const W = [];
|
|
2334
2336
|
A > 1 && (W.push(1), A > 2 && W.push("…"));
|
|
2335
2337
|
for (let I = A; I <= F; I++)
|
|
2336
2338
|
W.push(I);
|
|
2337
|
-
return F <
|
|
2339
|
+
return F < m && (F < m - 1 && W.push("…"), W.push(m)), W;
|
|
2338
2340
|
});
|
|
2339
|
-
function k(
|
|
2340
|
-
const y = Math.max(1, Math.min(
|
|
2341
|
+
function k(m) {
|
|
2342
|
+
const y = Math.max(1, Math.min(m, r.value));
|
|
2341
2343
|
y !== p.value && (u("update:modelValue", y), u("change", y));
|
|
2342
2344
|
}
|
|
2343
|
-
return (
|
|
2345
|
+
return (m, y) => (l(), a("div", Ba, [
|
|
2344
2346
|
t.showSummary ? (l(), a("div", za, [
|
|
2345
|
-
O(
|
|
2347
|
+
O(m.$slots, "summary", {
|
|
2346
2348
|
start: v.value,
|
|
2347
2349
|
end: n.value,
|
|
2348
2350
|
total: t.totalItems
|
|
2349
2351
|
}, () => [
|
|
2350
2352
|
Y($(b.value), 1),
|
|
2351
|
-
t.itemLabel ? (l(), a("span",
|
|
2353
|
+
t.itemLabel ? (l(), a("span", Ma, $(t.itemLabel), 1)) : f("", !0)
|
|
2352
2354
|
], !0)
|
|
2353
2355
|
])) : f("", !0),
|
|
2354
|
-
s("nav",
|
|
2356
|
+
s("nav", Da, [
|
|
2355
2357
|
s("button", {
|
|
2356
2358
|
type: "button",
|
|
2357
|
-
class: "h-8 px-3 rounded-full
|
|
2359
|
+
class: "h-8 px-3 rounded-full pagination-text hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2358
2360
|
disabled: p.value <= 1,
|
|
2359
2361
|
onClick: y[0] || (y[0] = (T) => k(p.value - 1)),
|
|
2360
2362
|
"aria-label": "Anterior"
|
|
2361
|
-
}, $(t.previousText), 9,
|
|
2362
|
-
(l(!0), a(K, null, G(
|
|
2363
|
+
}, $(t.previousText), 9, Va),
|
|
2364
|
+
(l(!0), a(K, null, G(z.value, (T, L) => (l(), a(K, {
|
|
2363
2365
|
key: `page-${L}-${T}`
|
|
2364
2366
|
}, [
|
|
2365
|
-
T === "…" ? (l(), a("span",
|
|
2367
|
+
T === "…" ? (l(), a("span", Ta, " … ")) : (l(), a("button", {
|
|
2366
2368
|
key: 1,
|
|
2367
2369
|
type: "button",
|
|
2368
2370
|
"aria-label": `Página ${T}`,
|
|
2369
2371
|
class: c([
|
|
2370
|
-
"h-8 min-w-8 px-3 rounded-full
|
|
2371
|
-
T === p.value ? "bg-primary-500 text-white" : "text
|
|
2372
|
+
"h-8 min-w-8 px-3 rounded-full transition-colors",
|
|
2373
|
+
T === p.value ? "bg-primary-500 text-white font-semibold" : "pagination-text hover:bg-secondary-100"
|
|
2372
2374
|
]),
|
|
2373
2375
|
onClick: (A) => k(T)
|
|
2374
|
-
}, $(T), 11,
|
|
2376
|
+
}, $(T), 11, Sa))
|
|
2375
2377
|
], 64))), 128)),
|
|
2376
2378
|
s("button", {
|
|
2377
2379
|
type: "button",
|
|
2378
|
-
class: "h-8 px-3 rounded-full
|
|
2380
|
+
class: "h-8 px-3 rounded-full pagination-text hover:bg-secondary-100 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
2379
2381
|
disabled: p.value >= r.value,
|
|
2380
2382
|
onClick: y[1] || (y[1] = (T) => k(p.value + 1)),
|
|
2381
2383
|
"aria-label": "Siguiente"
|
|
2382
|
-
}, $(t.nextText), 9,
|
|
2384
|
+
}, $(t.nextText), 9, Ia)
|
|
2383
2385
|
])
|
|
2384
2386
|
]));
|
|
2385
2387
|
}
|
|
2386
|
-
}),
|
|
2388
|
+
}), rs = /* @__PURE__ */ Z(ja, [["__scopeId", "data-v-0d98b48c"]]), ns = /* @__PURE__ */ N({
|
|
2387
2389
|
__name: "Tooltip",
|
|
2388
2390
|
props: {
|
|
2389
2391
|
content: { default: "" },
|
|
@@ -2396,27 +2398,27 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2396
2398
|
closeDelay: { default: 100 }
|
|
2397
2399
|
},
|
|
2398
2400
|
setup(t) {
|
|
2399
|
-
const
|
|
2401
|
+
const g = t, e = q(!1);
|
|
2400
2402
|
let u = null, r = null;
|
|
2401
2403
|
const p = () => {
|
|
2402
|
-
|
|
2404
|
+
g.trigger === "hover" && (clearTimeout(r), u = setTimeout(() => {
|
|
2403
2405
|
e.value = !0;
|
|
2404
|
-
},
|
|
2406
|
+
}, g.openDelay));
|
|
2405
2407
|
}, v = () => {
|
|
2406
|
-
|
|
2408
|
+
g.trigger === "hover" && (clearTimeout(u), r = setTimeout(() => {
|
|
2407
2409
|
e.value = !1;
|
|
2408
|
-
},
|
|
2410
|
+
}, g.closeDelay));
|
|
2409
2411
|
}, n = () => {
|
|
2410
|
-
|
|
2412
|
+
g.trigger === "click" && (e.value = !e.value);
|
|
2411
2413
|
}, b = () => {
|
|
2412
|
-
|
|
2413
|
-
},
|
|
2414
|
-
|
|
2414
|
+
g.trigger === "focus" && (e.value = !0);
|
|
2415
|
+
}, z = () => {
|
|
2416
|
+
g.trigger === "focus" && (e.value = !1);
|
|
2415
2417
|
}, k = {
|
|
2416
2418
|
sm: "px-2 py-1 text-xs",
|
|
2417
2419
|
md: "px-3 py-2 text-sm",
|
|
2418
2420
|
lg: "px-4 py-3 text-base"
|
|
2419
|
-
},
|
|
2421
|
+
}, m = {
|
|
2420
2422
|
// Deja un pequeño espacio entre el activador y el tooltip
|
|
2421
2423
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
2422
2424
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -2427,13 +2429,13 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2427
2429
|
bottom: "top-[-8px] rotate-180 left-1/2 -translate-x-1/2",
|
|
2428
2430
|
left: "right-[-8px] rotate-180 top-1/2 -translate-y-1/2",
|
|
2429
2431
|
right: "left-[-8px] rotate-180 top-1/2 -translate-y-1/2"
|
|
2430
|
-
}[
|
|
2432
|
+
}[g.position]}`), T = o(() => ({
|
|
2431
2433
|
"bg-gray-900": "#111827",
|
|
2432
2434
|
"bg-primary-500": "#0ea5e9",
|
|
2433
2435
|
"bg-green-600": "#16a34a",
|
|
2434
2436
|
"bg-yellow-600": "#ca8a04",
|
|
2435
2437
|
"bg-danger-600": "#dc2626"
|
|
2436
|
-
})[
|
|
2438
|
+
})[g.backgroundColor] || "#111827"), L = o(() => ({
|
|
2437
2439
|
// Orden: top, right, bottom, left
|
|
2438
2440
|
top: `transparent transparent ${T.value} transparent`,
|
|
2439
2441
|
// tooltip arriba → flecha apunta hacia abajo (borde inferior coloreado)
|
|
@@ -2443,14 +2445,14 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2443
2445
|
// tooltip a la izquierda → flecha apunta hacia la derecha (borde derecho coloreado)
|
|
2444
2446
|
right: `transparent transparent transparent ${T.value}`
|
|
2445
2447
|
// tooltip a la derecha → flecha apunta hacia la izquierda (borde izquierdo coloreado)
|
|
2446
|
-
})[
|
|
2448
|
+
})[g.position]), A = o(() => `absolute ${m[g.position]} ${g.textColor} ${k[g.size]} rounded-md shadow-lg whitespace-nowrap z-50`);
|
|
2447
2449
|
return (F, W) => (l(), a("div", {
|
|
2448
2450
|
class: "relative inline-flex",
|
|
2449
2451
|
onMouseenter: p,
|
|
2450
2452
|
onMouseleave: v,
|
|
2451
2453
|
onClick: n,
|
|
2452
2454
|
onFocus: b,
|
|
2453
|
-
onBlur:
|
|
2455
|
+
onBlur: z
|
|
2454
2456
|
}, [
|
|
2455
2457
|
O(F.$slots, "default"),
|
|
2456
2458
|
Q(ie, {
|
|
@@ -2481,7 +2483,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2481
2483
|
})
|
|
2482
2484
|
], 32));
|
|
2483
2485
|
}
|
|
2484
|
-
}),
|
|
2486
|
+
}), La = { class: "truncate" }, Oa = ["aria-label", "disabled"], is = /* @__PURE__ */ N({
|
|
2485
2487
|
__name: "Chip",
|
|
2486
2488
|
props: {
|
|
2487
2489
|
label: { default: "" },
|
|
@@ -2494,8 +2496,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2494
2496
|
closeAriaLabel: { default: "Cerrar" }
|
|
2495
2497
|
},
|
|
2496
2498
|
emits: ["click", "close"],
|
|
2497
|
-
setup(t, { emit:
|
|
2498
|
-
const e = t, u =
|
|
2499
|
+
setup(t, { emit: g }) {
|
|
2500
|
+
const e = t, u = g, r = o(() => !!e.icon), p = o(() => e.icon || ""), v = {
|
|
2499
2501
|
sm: "h-7 text-xs px-3 gap-1.5 font-semibold leading-none",
|
|
2500
2502
|
md: "h-8 text-sm px-3.5 gap-2 font-semibold leading-none"
|
|
2501
2503
|
}, n = {
|
|
@@ -2545,26 +2547,26 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2545
2547
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-default",
|
|
2546
2548
|
T
|
|
2547
2549
|
].join(" ");
|
|
2548
|
-
}),
|
|
2550
|
+
}), z = o(() => "text-current flex items-center"), k = () => {
|
|
2549
2551
|
e.disabled || u("close");
|
|
2550
|
-
},
|
|
2552
|
+
}, m = () => {
|
|
2551
2553
|
e.disabled || u("click");
|
|
2552
2554
|
};
|
|
2553
2555
|
return (y, T) => (l(), a("div", {
|
|
2554
2556
|
class: c(b.value),
|
|
2555
2557
|
role: "status",
|
|
2556
|
-
onClick:
|
|
2558
|
+
onClick: m
|
|
2557
2559
|
}, [
|
|
2558
2560
|
r.value ? (l(), a("span", {
|
|
2559
2561
|
key: 0,
|
|
2560
|
-
class: c(
|
|
2562
|
+
class: c(z.value)
|
|
2561
2563
|
}, [
|
|
2562
|
-
Q(
|
|
2564
|
+
Q(_, {
|
|
2563
2565
|
name: p.value,
|
|
2564
2566
|
size: "sm"
|
|
2565
2567
|
}, null, 8, ["name"])
|
|
2566
2568
|
], 2)) : f("", !0),
|
|
2567
|
-
s("span",
|
|
2569
|
+
s("span", La, [
|
|
2568
2570
|
O(y.$slots, "default", {}, () => [
|
|
2569
2571
|
Y($(t.label), 1)
|
|
2570
2572
|
])
|
|
@@ -2577,17 +2579,17 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2577
2579
|
onClick: J(k, ["stop"]),
|
|
2578
2580
|
disabled: t.disabled
|
|
2579
2581
|
}, [
|
|
2580
|
-
Q(
|
|
2582
|
+
Q(_, {
|
|
2581
2583
|
name: "close",
|
|
2582
2584
|
size: "sm"
|
|
2583
2585
|
})
|
|
2584
|
-
], 8,
|
|
2586
|
+
], 8, Oa)) : f("", !0)
|
|
2585
2587
|
], 2));
|
|
2586
2588
|
}
|
|
2587
|
-
}),
|
|
2589
|
+
}), Aa = ["data-node-id"], Fa = {
|
|
2588
2590
|
key: 0,
|
|
2589
2591
|
class: "shrink-0 size-12 rounded-full bg-[var(--neutrales/fondo-general-claro,#f7f7f7)] grid place-items-center"
|
|
2590
|
-
},
|
|
2592
|
+
}, Wa = {
|
|
2591
2593
|
key: 0,
|
|
2592
2594
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2593
2595
|
width: "24",
|
|
@@ -2598,7 +2600,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2598
2600
|
"stroke-width": "2",
|
|
2599
2601
|
"stroke-linecap": "round",
|
|
2600
2602
|
"stroke-linejoin": "round"
|
|
2601
|
-
},
|
|
2603
|
+
}, qa = {
|
|
2602
2604
|
key: 1,
|
|
2603
2605
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2604
2606
|
width: "24",
|
|
@@ -2609,7 +2611,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2609
2611
|
"stroke-width": "2",
|
|
2610
2612
|
"stroke-linecap": "round",
|
|
2611
2613
|
"stroke-linejoin": "round"
|
|
2612
|
-
},
|
|
2614
|
+
}, Pa = {
|
|
2613
2615
|
key: 2,
|
|
2614
2616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2615
2617
|
width: "24",
|
|
@@ -2620,7 +2622,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2620
2622
|
"stroke-width": "2",
|
|
2621
2623
|
"stroke-linecap": "round",
|
|
2622
2624
|
"stroke-linejoin": "round"
|
|
2623
|
-
},
|
|
2625
|
+
}, Ra = {
|
|
2624
2626
|
key: 3,
|
|
2625
2627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2626
2628
|
width: "24",
|
|
@@ -2631,10 +2633,10 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2631
2633
|
"stroke-width": "2",
|
|
2632
2634
|
"stroke-linecap": "round",
|
|
2633
2635
|
"stroke-linejoin": "round"
|
|
2634
|
-
},
|
|
2636
|
+
}, Ea = {
|
|
2635
2637
|
key: 1,
|
|
2636
2638
|
class: "flex flex-wrap items-center justify-end gap-2 px-6 pb-6 pt-4"
|
|
2637
|
-
},
|
|
2639
|
+
}, ds = /* @__PURE__ */ N({
|
|
2638
2640
|
__name: "Alert",
|
|
2639
2641
|
props: {
|
|
2640
2642
|
variant: { default: "info" },
|
|
@@ -2648,8 +2650,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2648
2650
|
stackOn: { default: void 0 }
|
|
2649
2651
|
},
|
|
2650
2652
|
emits: ["close", "accept", "cancel"],
|
|
2651
|
-
setup(t, { emit:
|
|
2652
|
-
const e =
|
|
2653
|
+
setup(t, { emit: g }) {
|
|
2654
|
+
const e = g, u = t, r = o(() => u.variant), p = o(() => u.multiline), v = o(() => u.actions), n = o(() => u.nodeId), b = o(() => u.showIcon), z = () => e("close"), k = o(() => !!u.title), m = o(() => u.title ?? ""), y = o(() => u.description ?? ""), T = o(() => {
|
|
2653
2655
|
switch (r.value) {
|
|
2654
2656
|
case "info":
|
|
2655
2657
|
return {
|
|
@@ -2699,7 +2701,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2699
2701
|
type: "button",
|
|
2700
2702
|
class: "absolute top-3 right-3 text-[color:var(--neutrales/texto-principal,#565656)]/70 hover:opacity-100 opacity-70",
|
|
2701
2703
|
"aria-label": "Cerrar",
|
|
2702
|
-
onClick:
|
|
2704
|
+
onClick: z
|
|
2703
2705
|
}, [...V[2] || (V[2] = [
|
|
2704
2706
|
s("svg", {
|
|
2705
2707
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2732,8 +2734,8 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2732
2734
|
s("div", {
|
|
2733
2735
|
class: c(A.value)
|
|
2734
2736
|
}, [
|
|
2735
|
-
b.value ? (l(), a("div",
|
|
2736
|
-
r.value === "info" ? (l(), a("svg",
|
|
2737
|
+
b.value ? (l(), a("div", Fa, [
|
|
2738
|
+
r.value === "info" ? (l(), a("svg", Wa, [...V[3] || (V[3] = [
|
|
2737
2739
|
s("circle", {
|
|
2738
2740
|
cx: "12",
|
|
2739
2741
|
cy: "12",
|
|
@@ -2751,7 +2753,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2751
2753
|
x2: "12",
|
|
2752
2754
|
y2: "8"
|
|
2753
2755
|
}, null, -1)
|
|
2754
|
-
])])) : r.value === "warning" ? (l(), a("svg",
|
|
2756
|
+
])])) : r.value === "warning" ? (l(), a("svg", qa, [...V[4] || (V[4] = [
|
|
2755
2757
|
s("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }, null, -1),
|
|
2756
2758
|
s("line", {
|
|
2757
2759
|
x1: "12",
|
|
@@ -2765,10 +2767,10 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2765
2767
|
x2: "12",
|
|
2766
2768
|
y2: "17"
|
|
2767
2769
|
}, null, -1)
|
|
2768
|
-
])])) : r.value === "success" ? (l(), a("svg",
|
|
2770
|
+
])])) : r.value === "success" ? (l(), a("svg", Pa, [...V[5] || (V[5] = [
|
|
2769
2771
|
s("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }, null, -1),
|
|
2770
2772
|
s("polyline", { points: "22 4 12 14.01 9 11.01" }, null, -1)
|
|
2771
|
-
])])) : (l(), a("svg",
|
|
2773
|
+
])])) : (l(), a("svg", Ra, [...V[6] || (V[6] = [
|
|
2772
2774
|
s("polygon", { points: "7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2" }, null, -1),
|
|
2773
2775
|
s("line", {
|
|
2774
2776
|
x1: "12",
|
|
@@ -2793,7 +2795,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2793
2795
|
k.value ? (l(), a("div", {
|
|
2794
2796
|
key: 0,
|
|
2795
2797
|
class: c(["tracking-[0.1px] text-[color:var(--neutrales/texto-principal,#565656)] font-medium", I.value])
|
|
2796
|
-
}, $(
|
|
2798
|
+
}, $(m.value), 3)) : f("", !0),
|
|
2797
2799
|
s("div", {
|
|
2798
2800
|
class: c(["flex-1 tracking-[0.25px] text-[color:var(--neutrales/texto-principal,#565656)]", { "overflow-hidden overflow-ellipsis": !p.value }])
|
|
2799
2801
|
}, [
|
|
@@ -2805,7 +2807,7 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2805
2807
|
], 2)
|
|
2806
2808
|
], 2)
|
|
2807
2809
|
], 2),
|
|
2808
|
-
v.value ? (l(), a("div",
|
|
2810
|
+
v.value ? (l(), a("div", Ea, [
|
|
2809
2811
|
s("button", {
|
|
2810
2812
|
type: "button",
|
|
2811
2813
|
class: "px-3 py-1.5 rounded-lg text-sm tracking-[0.25px] font-semibold text-[color:var(--neutrales/texto-principal,#565656)]",
|
|
@@ -2825,27 +2827,27 @@ const Ne = { class: "flex items-center gap-2 sm:gap-3 shrink-0" }, He = {
|
|
|
2825
2827
|
])
|
|
2826
2828
|
], 2)
|
|
2827
2829
|
])) : f("", !0)
|
|
2828
|
-
], 10,
|
|
2830
|
+
], 10, Aa));
|
|
2829
2831
|
}
|
|
2830
2832
|
});
|
|
2831
2833
|
export {
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2834
|
+
ds as Alert,
|
|
2835
|
+
Ka as AppBar,
|
|
2836
|
+
Ua as Button,
|
|
2837
|
+
Ja as Calendar,
|
|
2838
|
+
Ga as Card,
|
|
2839
|
+
is as Chip,
|
|
2840
|
+
Qa as Dialog,
|
|
2841
|
+
Za as FileUpload,
|
|
2842
|
+
_ as Icon,
|
|
2843
|
+
Xa as Input,
|
|
2844
|
+
_a as Loader,
|
|
2845
|
+
es as Menu,
|
|
2846
|
+
rs as Pagination,
|
|
2847
|
+
ts as Select,
|
|
2848
|
+
ls as Sidebar,
|
|
2849
|
+
as as Table,
|
|
2850
|
+
ss as Tabs,
|
|
2851
|
+
os as Text,
|
|
2852
|
+
ns as Tooltip
|
|
2851
2853
|
};
|