manolis-ui 0.17.10 → 0.17.11
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/index.d.ts +1 -0
- package/dist/manolis-ui.js +242 -251
- package/dist/manolis-ui.umd.cjs +3 -3
- package/dist/style.css +17 -33
- package/package.json +1 -1
package/dist/manolis-ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, computed as
|
|
1
|
+
import { defineComponent as _, computed as ee, createElementBlock as r, openBlock as o, normalizeClass as T, createCommentVNode as O, renderSlot as E, createTextVNode as Re, createElementVNode as n, Fragment as W, renderList as Z, toDisplayString as L, ref as h, watch as q, h as De, onMounted as he, withDirectives as Se, createVNode as ue, isRef as Ue, vModelCheckbox as He, unref as se, provide as We, onUnmounted as Ve, normalizeStyle as we, Transition as Pe, withCtx as Ce, inject as Ke, useId as Xe, defineAsyncComponent as ze, nextTick as me, onBeforeUnmount as Ee, withModifiers as re, createBlock as ve, resolveDynamicComponent as Te, mergeProps as Be, withKeys as pe, resolveComponent as Oe, vModelText as Ne, useSlots as Ye, Comment as Ge, vShow as Je } from "vue";
|
|
2
2
|
const Ze = ["disabled"], Qe = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "loading loading-spinner"
|
|
@@ -14,7 +14,7 @@ const Ze = ["disabled"], Qe = {
|
|
|
14
14
|
disabled: { type: Boolean, default: !1 }
|
|
15
15
|
},
|
|
16
16
|
setup(e) {
|
|
17
|
-
const d = e, l =
|
|
17
|
+
const d = e, l = ee(() => {
|
|
18
18
|
switch (d.size) {
|
|
19
19
|
case "large":
|
|
20
20
|
return "btn-lg";
|
|
@@ -29,7 +29,7 @@ const Ze = ["disabled"], Qe = {
|
|
|
29
29
|
default:
|
|
30
30
|
return "";
|
|
31
31
|
}
|
|
32
|
-
}), t =
|
|
32
|
+
}), t = ee(() => {
|
|
33
33
|
switch (d.type) {
|
|
34
34
|
case "neutral":
|
|
35
35
|
return "btn-neutral";
|
|
@@ -54,7 +54,7 @@ const Ze = ["disabled"], Qe = {
|
|
|
54
54
|
default:
|
|
55
55
|
return "btn-neutral";
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), s = ee(() => {
|
|
58
58
|
switch (d.shape) {
|
|
59
59
|
case "square":
|
|
60
60
|
return "btn-square";
|
|
@@ -64,20 +64,20 @@ const Ze = ["disabled"], Qe = {
|
|
|
64
64
|
return "";
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
-
return (a,
|
|
67
|
+
return (a, u) => (o(), r("button", {
|
|
68
68
|
class: T([
|
|
69
69
|
"btn",
|
|
70
70
|
{ "btn-outline": d.outlined },
|
|
71
71
|
{ "btn-active": d.active },
|
|
72
72
|
t.value,
|
|
73
73
|
l.value,
|
|
74
|
-
|
|
74
|
+
s.value
|
|
75
75
|
]),
|
|
76
76
|
disabled: d.disabled
|
|
77
77
|
}, [
|
|
78
78
|
e.loading ? (o(), r("span", Qe)) : O("", !0),
|
|
79
79
|
E(a.$slots, "default", {}, () => [
|
|
80
|
-
|
|
80
|
+
u[0] || (u[0] = Re("Submit", -1))
|
|
81
81
|
])
|
|
82
82
|
], 10, Ze));
|
|
83
83
|
}
|
|
@@ -103,22 +103,22 @@ const Ze = ["disabled"], Qe = {
|
|
|
103
103
|
start: "",
|
|
104
104
|
end: "dropdown-end"
|
|
105
105
|
}, t = e;
|
|
106
|
-
return (
|
|
106
|
+
return (s, a) => (o(), r("div", {
|
|
107
107
|
class: T(["dropdown", d[t.position], l[t.floatPosition], { "dropdown-open": t.forceOpen }, { "dropdown-hover": t.openOnHover }])
|
|
108
108
|
}, [
|
|
109
|
-
E(
|
|
109
|
+
E(s.$slots, "default", {
|
|
110
110
|
tabindex: "0",
|
|
111
111
|
role: "button"
|
|
112
112
|
}, () => [
|
|
113
113
|
a[0] || (a[0] = n("div", { class: "m-1 btn" }, "Open dropdown", -1))
|
|
114
114
|
]),
|
|
115
115
|
n("ul", et, [
|
|
116
|
-
(o(!0), r(W, null,
|
|
116
|
+
(o(!0), r(W, null, Z(e.items, (u) => (o(), r("li", null, [
|
|
117
117
|
n("a", {
|
|
118
|
-
href:
|
|
119
|
-
}, L(
|
|
118
|
+
href: u.link
|
|
119
|
+
}, L(u.text), 9, tt)
|
|
120
120
|
]))), 256)),
|
|
121
|
-
E(
|
|
121
|
+
E(s.$slots, "additional")
|
|
122
122
|
])
|
|
123
123
|
], 2));
|
|
124
124
|
}
|
|
@@ -134,25 +134,25 @@ const Ze = ["disabled"], Qe = {
|
|
|
134
134
|
top: "modal-top",
|
|
135
135
|
bottom: "modal-bottom",
|
|
136
136
|
center: "modal-middle"
|
|
137
|
-
}, t = h(null),
|
|
138
|
-
var
|
|
139
|
-
(
|
|
137
|
+
}, t = h(null), s = () => {
|
|
138
|
+
var u;
|
|
139
|
+
(u = t.value) == null || u.showModal();
|
|
140
140
|
}, a = () => {
|
|
141
|
-
var
|
|
142
|
-
(
|
|
141
|
+
var u;
|
|
142
|
+
(u = t.value) == null || u.close();
|
|
143
143
|
};
|
|
144
144
|
return q(
|
|
145
145
|
() => d.forceOpen,
|
|
146
|
-
(
|
|
147
|
-
|
|
146
|
+
(u) => {
|
|
147
|
+
u == !0 && s(), u == !1 && a();
|
|
148
148
|
}
|
|
149
|
-
), (
|
|
149
|
+
), (u, m) => (o(), r(W, null, [
|
|
150
150
|
d.forceOpen == null ? (o(), r("span", {
|
|
151
151
|
key: 0,
|
|
152
152
|
class: "w-fit cursor-pointer",
|
|
153
|
-
onClick:
|
|
153
|
+
onClick: s
|
|
154
154
|
}, [
|
|
155
|
-
E(
|
|
155
|
+
E(u.$slots, "trigger", { role: "button" }, () => [
|
|
156
156
|
m[0] || (m[0] = n("button", { class: "btn" }, "Open", -1))
|
|
157
157
|
])
|
|
158
158
|
])) : O("", !0),
|
|
@@ -162,15 +162,15 @@ const Ze = ["disabled"], Qe = {
|
|
|
162
162
|
class: T(["modal", l[d.position]])
|
|
163
163
|
}, [
|
|
164
164
|
n("div", lt, [
|
|
165
|
-
E(
|
|
165
|
+
E(u.$slots, "default"),
|
|
166
166
|
n("div", nt, [
|
|
167
|
-
E(
|
|
167
|
+
E(u.$slots, "actions"),
|
|
168
168
|
n("form", {
|
|
169
169
|
method: "dialog",
|
|
170
170
|
onSubmit: a,
|
|
171
171
|
class: T(e.withBackdrop ? "modal-backdrop" : "")
|
|
172
172
|
}, [
|
|
173
|
-
E(
|
|
173
|
+
E(u.$slots, "close-button", {}, () => [
|
|
174
174
|
m[1] || (m[1] = n("button", { class: "btn" }, "Close", -1))
|
|
175
175
|
])
|
|
176
176
|
], 34)
|
|
@@ -229,7 +229,7 @@ var $e = {
|
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
231
|
*/
|
|
232
|
-
const it = ({ size: e, strokeWidth: d = 2, absoluteStrokeWidth: l, color: t, iconNode:
|
|
232
|
+
const it = ({ size: e, strokeWidth: d = 2, absoluteStrokeWidth: l, color: t, iconNode: s, name: a, class: u, ...m }, { slots: i }) => De(
|
|
233
233
|
"svg",
|
|
234
234
|
{
|
|
235
235
|
...$e,
|
|
@@ -240,7 +240,7 @@ const it = ({ size: e, strokeWidth: d = 2, absoluteStrokeWidth: l, color: t, ico
|
|
|
240
240
|
class: ["lucide", `lucide-${st(a ?? "icon")}`],
|
|
241
241
|
...m
|
|
242
242
|
},
|
|
243
|
-
[...
|
|
243
|
+
[...s.map((y) => De(...y)), ...i.default ? [i.default()] : []]
|
|
244
244
|
);
|
|
245
245
|
/**
|
|
246
246
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
@@ -331,16 +331,16 @@ const ct = xe("SunIcon", [
|
|
|
331
331
|
},
|
|
332
332
|
setup(e) {
|
|
333
333
|
const d = e, l = vt("theme", d.lightTheme);
|
|
334
|
-
function t(
|
|
335
|
-
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme",
|
|
334
|
+
function t(s) {
|
|
335
|
+
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", s);
|
|
336
336
|
}
|
|
337
|
-
return he(() => t(l.value ? l.value : "")), q(l, (
|
|
338
|
-
t(
|
|
339
|
-
}), (
|
|
340
|
-
|
|
337
|
+
return he(() => t(l.value ? l.value : "")), q(l, (s) => {
|
|
338
|
+
t(s);
|
|
339
|
+
}), (s, a) => (o(), r("label", ft, [
|
|
340
|
+
Se(n("input", {
|
|
341
341
|
type: "checkbox",
|
|
342
342
|
class: "theme-controller",
|
|
343
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
|
343
|
+
"onUpdate:modelValue": a[0] || (a[0] = (u) => Ue(l) ? l.value = u : null),
|
|
344
344
|
"true-value": d.lightTheme,
|
|
345
345
|
"false-value": d.darkTheme
|
|
346
346
|
}, null, 8, mt), [
|
|
@@ -360,7 +360,7 @@ const ct = xe("SunIcon", [
|
|
|
360
360
|
},
|
|
361
361
|
setup(e) {
|
|
362
362
|
const d = e;
|
|
363
|
-
return (l, t) => (o(!0), r(W, null,
|
|
363
|
+
return (l, t) => (o(!0), r(W, null, Z(d.items, (s, a) => (o(), r("div", {
|
|
364
364
|
class: T(["collapse border border-base-300", [e.icon ? `collapse-${e.icon}` : "", { "join-item": e.joinItems }]]),
|
|
365
365
|
key: a
|
|
366
366
|
}, [
|
|
@@ -369,10 +369,10 @@ const ct = xe("SunIcon", [
|
|
|
369
369
|
name: e.name,
|
|
370
370
|
value: "true"
|
|
371
371
|
}, null, 8, pt),
|
|
372
|
-
n("div", ht, L(
|
|
372
|
+
n("div", ht, L(s.title), 1),
|
|
373
373
|
n("div", gt, [
|
|
374
374
|
n("span", {
|
|
375
|
-
innerHTML:
|
|
375
|
+
innerHTML: s.content
|
|
376
376
|
}, null, 8, yt)
|
|
377
377
|
])
|
|
378
378
|
], 2))), 128));
|
|
@@ -392,7 +392,7 @@ const ct = xe("SunIcon", [
|
|
|
392
392
|
(t) => {
|
|
393
393
|
t && (l.value = t);
|
|
394
394
|
}
|
|
395
|
-
), (t,
|
|
395
|
+
), (t, s) => (o(), r("div", {
|
|
396
396
|
class: T(["avatar", [{ "avatar-online": l.value === "online" }, { "avatar-offline": l.value === "offline" }]])
|
|
397
397
|
}, [
|
|
398
398
|
e.image ? (o(), r("div", {
|
|
@@ -435,10 +435,10 @@ const ct = xe("SunIcon", [
|
|
|
435
435
|
warning: "badge-warning",
|
|
436
436
|
error: "badge-error"
|
|
437
437
|
};
|
|
438
|
-
return (
|
|
438
|
+
return (s, a) => (o(), r("span", {
|
|
439
439
|
class: T(["badge", l[d.size], t[d.color], { "badge-outline": d.outline }])
|
|
440
440
|
}, [
|
|
441
|
-
E(
|
|
441
|
+
E(s.$slots, "default")
|
|
442
442
|
], 2));
|
|
443
443
|
}
|
|
444
444
|
}), xt = ["src", "alt"], kt = {
|
|
@@ -447,10 +447,10 @@ const ct = xe("SunIcon", [
|
|
|
447
447
|
}, $t = {
|
|
448
448
|
key: 0,
|
|
449
449
|
class: "group-hover:text-primary text-lg text-left cursor-pointer card-title"
|
|
450
|
-
},
|
|
450
|
+
}, St = {
|
|
451
451
|
key: 1,
|
|
452
452
|
class: "text-left"
|
|
453
|
-
},
|
|
453
|
+
}, Ct = { class: "flex-col flex-nowrap mt-auto card-actions" }, It = {
|
|
454
454
|
key: 1,
|
|
455
455
|
class: "card-body"
|
|
456
456
|
}, kn = /* @__PURE__ */ _({
|
|
@@ -476,7 +476,7 @@ const ct = xe("SunIcon", [
|
|
|
476
476
|
(t) => {
|
|
477
477
|
l.value = t;
|
|
478
478
|
}
|
|
479
|
-
), (t,
|
|
479
|
+
), (t, s) => (o(), r("div", {
|
|
480
480
|
class: T(["group bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact", [
|
|
481
481
|
{ "border-4 border-primary": l.value },
|
|
482
482
|
e.color ?? "",
|
|
@@ -507,12 +507,12 @@ const ct = xe("SunIcon", [
|
|
|
507
507
|
e.loading ? O("", !0) : (o(), r("div", kt, [
|
|
508
508
|
e.title ? (o(), r("h2", $t, L(e.title), 1)) : O("", !0),
|
|
509
509
|
E(t.$slots, "details"),
|
|
510
|
-
e.description ? (o(), r("p",
|
|
511
|
-
n("div",
|
|
510
|
+
e.description ? (o(), r("p", St, L(e.description), 1)) : O("", !0),
|
|
511
|
+
n("div", Ct, [
|
|
512
512
|
E(t.$slots, "actions")
|
|
513
513
|
])
|
|
514
514
|
])),
|
|
515
|
-
e.loading ? (o(), r("div", It, [...
|
|
515
|
+
e.loading ? (o(), r("div", It, [...s[0] || (s[0] = [
|
|
516
516
|
n("div", { class: "flex flex-col gap-4 w-52" }, [
|
|
517
517
|
n("div", { class: "w-28 h-4 skeleton" }),
|
|
518
518
|
n("div", { class: "w-full h-4 skeleton" }),
|
|
@@ -587,14 +587,14 @@ const ct = xe("SunIcon", [
|
|
|
587
587
|
}
|
|
588
588
|
},
|
|
589
589
|
setup(e, { expose: d }) {
|
|
590
|
-
const l = e, t = h(l.initialSlide),
|
|
590
|
+
const l = e, t = h(l.initialSlide), s = h(null), a = h(null), u = h(0), m = h(!1), i = h(0), y = h(0), M = h(!1), R = h(0), k = h(0), c = h(0), V = h(0), C = h(0), H = h(0), F = h(0), K = h(null), Q = h(null), le = h(0), f = h(null), b = ee(() => {
|
|
591
591
|
const I = Object.keys(l.breakpoints).map(Number).sort((P, U) => P - U);
|
|
592
592
|
let $ = {};
|
|
593
593
|
for (const P of I)
|
|
594
594
|
y.value >= P && ($ = { ...$, ...l.breakpoints[P] });
|
|
595
595
|
return $;
|
|
596
|
-
}), g =
|
|
597
|
-
const I = l.sliderOrientation === "horizontal", P = `calc((100% - ${g.value > 1 ? (g.value - 1) *
|
|
596
|
+
}), g = ee(() => b.value.slidesPerView ?? l.slidesPerView), S = ee(() => b.value.gap ?? l.gap), v = ee(() => {
|
|
597
|
+
const I = l.sliderOrientation === "horizontal", P = `calc((100% - ${g.value > 1 ? (g.value - 1) * S.value : 0}px) / ${g.value})`;
|
|
598
598
|
return I ? {
|
|
599
599
|
width: P
|
|
600
600
|
} : { height: P };
|
|
@@ -603,30 +603,30 @@ const ct = xe("SunIcon", [
|
|
|
603
603
|
const D = () => {
|
|
604
604
|
a.value ? i.value = a.value.children.length : i.value = 0;
|
|
605
605
|
}, x = () => {
|
|
606
|
-
if (!
|
|
607
|
-
const $ = l.sliderOrientation === "horizontal" ?
|
|
606
|
+
if (!s.value || g.value <= 0) return 0;
|
|
607
|
+
const $ = l.sliderOrientation === "horizontal" ? s.value.offsetWidth : s.value.offsetHeight, P = (g.value - 1) * S.value;
|
|
608
608
|
return $ <= 0 ? 0 : ($ - P) / g.value;
|
|
609
|
-
}, j =
|
|
610
|
-
if (!
|
|
611
|
-
const $ = l.sliderOrientation === "horizontal" ?
|
|
609
|
+
}, j = ee(() => {
|
|
610
|
+
if (!s.value || i.value === 0 || g.value === 0) return 0;
|
|
611
|
+
const $ = l.sliderOrientation === "horizontal" ? s.value.offsetWidth : s.value.offsetHeight, P = x(), U = i.value * (P + S.value) - S.value;
|
|
612
612
|
return Math.max(0, U - $);
|
|
613
613
|
}), A = async (I, $ = !1) => {
|
|
614
|
-
if (!
|
|
614
|
+
if (!s.value || g.value <= 0 || m.value || (D(), i.value === 0)) return;
|
|
615
615
|
const P = x();
|
|
616
616
|
if (P <= 0) return;
|
|
617
|
-
const U = P +
|
|
617
|
+
const U = P + S.value, J = j.value;
|
|
618
618
|
let X = I;
|
|
619
619
|
l.infinite ? X = (I % i.value + i.value) % i.value : X = Math.max(0, Math.min(I, i.value - g.value));
|
|
620
620
|
const oe = X * U, Y = l.infinite ? oe : Math.max(0, Math.min(oe, J));
|
|
621
621
|
if ($ || l.slideDuration === 0) {
|
|
622
|
-
a.value && (a.value.style.transitionDuration = "0ms", a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-Y}px, 0, 0)` : `translate3d(0, ${-Y}px, 0)`),
|
|
622
|
+
a.value && (a.value.style.transitionDuration = "0ms", a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-Y}px, 0, 0)` : `translate3d(0, ${-Y}px, 0)`), u.value = Y, t.value = X, m.value = !1, l.autoplay && ce();
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
625
|
m.value = !0;
|
|
626
|
-
const ie =
|
|
626
|
+
const ie = u.value, ne = Y - ie, be = performance.now(), fe = (ke) => {
|
|
627
627
|
if (!a.value) return;
|
|
628
628
|
const Fe = ke - be, je = Math.min(1, Fe / l.slideDuration), qe = 1 - Math.pow(1 - je, 3), Me = ie + ne * qe;
|
|
629
|
-
a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-Me}px, 0, 0)` : `translate3d(0, ${-Me}px, 0)`,
|
|
629
|
+
a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-Me}px, 0, 0)` : `translate3d(0, ${-Me}px, 0)`, u.value = Me, je < 1 ? K.value = requestAnimationFrame(fe) : (a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-Y}px, 0, 0)` : `translate3d(0, ${-Y}px, 0)`, u.value = Y, t.value = X, m.value = !1, l.autoplay && ce(), K.value = null);
|
|
630
630
|
};
|
|
631
631
|
K.value = requestAnimationFrame(fe);
|
|
632
632
|
}, te = () => {
|
|
@@ -638,7 +638,7 @@ const ct = xe("SunIcon", [
|
|
|
638
638
|
}, w = (I) => {
|
|
639
639
|
m.value && K.value && (l.autoplay && ae(), cancelAnimationFrame(K.value), m.value = !1);
|
|
640
640
|
const $ = "touches" in I ? I.touches[0] : I;
|
|
641
|
-
R.value = $.clientX, k.value = $.clientY, f.value = null, c.value =
|
|
641
|
+
R.value = $.clientX, k.value = $.clientY, f.value = null, c.value = u.value, V.value = 0, C.value = 0, H.value = 0, F.value = performance.now(), s.value && (s.value.style.scrollSnapType = "none"), document.addEventListener("mousemove", z, { passive: !1 }), document.addEventListener("mouseup", N), document.addEventListener("touchmove", z, { passive: !1 }), document.addEventListener("touchend", N);
|
|
642
642
|
}, z = (I) => {
|
|
643
643
|
const $ = "touches" in I ? I.touches[0] : I;
|
|
644
644
|
if (!f.value) {
|
|
@@ -660,19 +660,19 @@ const ct = xe("SunIcon", [
|
|
|
660
660
|
else
|
|
661
661
|
return;
|
|
662
662
|
}
|
|
663
|
-
if (!M.value || !a.value || !
|
|
663
|
+
if (!M.value || !a.value || !s.value) return;
|
|
664
664
|
I.cancelable && I.preventDefault();
|
|
665
|
-
const P = performance.now(), U = P - F.value, J = l.sliderOrientation === "horizontal" ? $.clientX : $.clientY, X = l.sliderOrientation === "horizontal" ? R.value : k.value, oe = l.sliderOrientation === "horizontal" ?
|
|
665
|
+
const P = performance.now(), U = P - F.value, J = l.sliderOrientation === "horizontal" ? $.clientX : $.clientY, X = l.sliderOrientation === "horizontal" ? R.value : k.value, oe = l.sliderOrientation === "horizontal" ? C.value || X : H.value || X, Y = J - oe;
|
|
666
666
|
U > 0 && (V.value = Y / U * 1e3);
|
|
667
667
|
const ie = J - X;
|
|
668
668
|
let ne = c.value - ie;
|
|
669
|
-
ne < 0 ? ne = ne * 0.3 : ne > j.value && (ne = j.value + (ne - j.value) * 0.3), le.value = ne, a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-le.value}px, 0, 0)` : `translate3d(0, ${-le.value}px, 0)`, l.sliderOrientation === "horizontal" ?
|
|
669
|
+
ne < 0 ? ne = ne * 0.3 : ne > j.value && (ne = j.value + (ne - j.value) * 0.3), le.value = ne, a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-le.value}px, 0, 0)` : `translate3d(0, ${-le.value}px, 0)`, l.sliderOrientation === "horizontal" ? C.value = J : H.value = J, F.value = P;
|
|
670
670
|
}, B = () => {
|
|
671
671
|
document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", N), document.removeEventListener("touchmove", z), document.removeEventListener("touchend", N);
|
|
672
672
|
}, N = () => {
|
|
673
|
-
if (!M.value || !
|
|
674
|
-
const $ = l.sliderOrientation === "horizontal" ? c.value - (
|
|
675
|
-
if (M.value = !1, B(),
|
|
673
|
+
if (!M.value || !s.value || !a.value) return;
|
|
674
|
+
const $ = l.sliderOrientation === "horizontal" ? c.value - (C.value - R.value) : c.value - (H.value - k.value), P = Math.max(0, Math.min($, j.value)), U = x() + S.value;
|
|
675
|
+
if (M.value = !1, B(), u.value = P, l.infinite) {
|
|
676
676
|
if ($ < 0) {
|
|
677
677
|
A(i.value - 1);
|
|
678
678
|
return;
|
|
@@ -695,11 +695,11 @@ const ct = xe("SunIcon", [
|
|
|
695
695
|
} else
|
|
696
696
|
A(Math.max(0, Math.min(J, oe)));
|
|
697
697
|
}, G = () => {
|
|
698
|
-
!l.autoplay ||
|
|
698
|
+
!l.autoplay || Q.value !== null || (Q.value = setInterval(() => {
|
|
699
699
|
te();
|
|
700
700
|
}, l.autoplayInterval));
|
|
701
701
|
}, ae = () => {
|
|
702
|
-
|
|
702
|
+
Q.value !== null && (clearInterval(Q.value), Q.value = null);
|
|
703
703
|
}, ce = () => {
|
|
704
704
|
ae(), setTimeout(() => {
|
|
705
705
|
G();
|
|
@@ -707,11 +707,11 @@ const ct = xe("SunIcon", [
|
|
|
707
707
|
}, ye = () => {
|
|
708
708
|
y.value = window.innerWidth;
|
|
709
709
|
}, Ie = () => {
|
|
710
|
-
if (!
|
|
710
|
+
if (!s.value || g.value <= 0 || (D(), i.value === 0)) return;
|
|
711
711
|
const I = x();
|
|
712
712
|
if (I <= 0) return;
|
|
713
|
-
const $ = Math.max(0, i.value - g.value), P = Math.min(Math.max(0, l.initialSlide), $), U = P * (I +
|
|
714
|
-
a.value && (a.value.style.transitionDuration = "0ms", a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-X}px, 0, 0)` : `translate3d(0, ${-X}px, 0)`),
|
|
713
|
+
const $ = Math.max(0, i.value - g.value), P = Math.min(Math.max(0, l.initialSlide), $), U = P * (I + S.value), J = j.value, X = Math.max(0, Math.min(U, J));
|
|
714
|
+
a.value && (a.value.style.transitionDuration = "0ms", a.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-X}px, 0, 0)` : `translate3d(0, ${-X}px, 0)`), u.value = X, t.value = P;
|
|
715
715
|
};
|
|
716
716
|
Ve(() => {
|
|
717
717
|
window.removeEventListener("resize", ye);
|
|
@@ -723,14 +723,14 @@ const ct = xe("SunIcon", [
|
|
|
723
723
|
const I = q(i, (ne) => {
|
|
724
724
|
ne > 0 && !Le && (Ie(), Le = !0, I());
|
|
725
725
|
});
|
|
726
|
-
l.autoplay && G(), window.addEventListener("resize", ye), D(), ($ =
|
|
726
|
+
l.autoplay && G(), window.addEventListener("resize", ye), D(), ($ = s.value) == null || $.addEventListener("mousedown", w), (P = s.value) == null || P.addEventListener("touchstart", w, { passive: !0 }), l.showNavigationButtons && ((X = (J = (U = s.value) == null ? void 0 : U.parentElement) == null ? void 0 : J.querySelector(".absolute.flex.justify-between")) == null || X.addEventListener("click", ce)), l.showIndicators && ((ie = (Y = (oe = s.value) == null ? void 0 : oe.parentElement) == null ? void 0 : Y.querySelector(".bottom-5.flex.justify-center")) == null || ie.addEventListener("click", ce));
|
|
727
727
|
}), Ve(() => {
|
|
728
728
|
window.removeEventListener("resize", ye);
|
|
729
729
|
}), q(() => l.autoplay, (I) => {
|
|
730
730
|
I ? G() : ae();
|
|
731
731
|
}), q(() => l.autoplayInterval, ce), q(() => l.initialSlide, (I) => {
|
|
732
732
|
requestAnimationFrame(() => A(I, !0));
|
|
733
|
-
}), q([g,
|
|
733
|
+
}), q([g, S], () => {
|
|
734
734
|
requestAnimationFrame(() => {
|
|
735
735
|
requestAnimationFrame(() => {
|
|
736
736
|
if (D(), i.value === 0) return;
|
|
@@ -741,7 +741,7 @@ const ct = xe("SunIcon", [
|
|
|
741
741
|
}), d({ scrollToSlide: A }), (I, $) => (o(), r("div", Mt, [
|
|
742
742
|
n("div", {
|
|
743
743
|
ref_key: "carouselContainer",
|
|
744
|
-
ref:
|
|
744
|
+
ref: s,
|
|
745
745
|
class: T(["rounded w-full h-full carousel", [{ "carousel-horizontal": e.sliderOrientation == "horizontal" }, { "carousel-vertical": e.sliderOrientation == "vertical" }, { "cursor-grabbing !select-none": M.value }]]),
|
|
746
746
|
style: { scrollSnapType: "none" }
|
|
747
747
|
}, [
|
|
@@ -749,7 +749,7 @@ const ct = xe("SunIcon", [
|
|
|
749
749
|
ref_key: "slidesContainer",
|
|
750
750
|
ref: a,
|
|
751
751
|
class: T(["w-full h-full transition-transform duration-0 ease-out", e.sliderOrientation === "horizontal" ? "flex" : "block"]),
|
|
752
|
-
style: we({ gap: `${
|
|
752
|
+
style: we({ gap: `${S.value}px` })
|
|
753
753
|
}, [
|
|
754
754
|
E(I.$slots, "default", {}, void 0, !0)
|
|
755
755
|
], 6)
|
|
@@ -759,7 +759,7 @@ const ct = xe("SunIcon", [
|
|
|
759
759
|
class: T([{ "top-1/2 right-5 left-5 z-10 absolute flex justify-between items-center -translate-y-1/2 transform": e.sliderOrientation === "horizontal" }, { "right-0 absolute flex justify-between items-center -translate-y-1/2 transform rotate-90 top-1/2 gap-3": e.sliderOrientation === "vertical" }])
|
|
760
760
|
}, [
|
|
761
761
|
ue(Pe, { name: "fade" }, {
|
|
762
|
-
default:
|
|
762
|
+
default: Ce(() => [
|
|
763
763
|
l.infinite || t.value > 0 ? (o(), r("div", zt, [
|
|
764
764
|
n("div", {
|
|
765
765
|
onClick: de,
|
|
@@ -779,7 +779,7 @@ const ct = xe("SunIcon", [
|
|
|
779
779
|
}),
|
|
780
780
|
$[2] || ($[2] = n("div", { class: "flex-grow" }, null, -1)),
|
|
781
781
|
ue(Pe, { name: "fade" }, {
|
|
782
|
-
default:
|
|
782
|
+
default: Ce(() => [
|
|
783
783
|
l.infinite || t.value < i.value - g.value ? (o(), r("div", Tt, [
|
|
784
784
|
n("div", {
|
|
785
785
|
onClick: te,
|
|
@@ -799,7 +799,7 @@ const ct = xe("SunIcon", [
|
|
|
799
799
|
})
|
|
800
800
|
], 2)) : O("", !0),
|
|
801
801
|
e.showIndicators ? (o(), r("div", Bt, [
|
|
802
|
-
(o(!0), r(W, null,
|
|
802
|
+
(o(!0), r(W, null, Z(i.value, (P, U) => (o(), r("button", {
|
|
803
803
|
key: `dot-${U}`,
|
|
804
804
|
onClick: (J) => p(U),
|
|
805
805
|
class: T(["btn btn-circle btn-xs", { "btn-active": U === t.value }]),
|
|
@@ -810,8 +810,8 @@ const ct = xe("SunIcon", [
|
|
|
810
810
|
}
|
|
811
811
|
}), ge = (e, d) => {
|
|
812
812
|
const l = e.__vccOpts || e;
|
|
813
|
-
for (const [t,
|
|
814
|
-
l[t] =
|
|
813
|
+
for (const [t, s] of d)
|
|
814
|
+
l[t] = s;
|
|
815
815
|
return l;
|
|
816
816
|
}, $n = /* @__PURE__ */ ge(Dt, [["__scopeId", "data-v-dd58428c"]]), Vt = /* @__PURE__ */ _({
|
|
817
817
|
__name: "carouselItem",
|
|
@@ -824,7 +824,7 @@ const ct = xe("SunIcon", [
|
|
|
824
824
|
E(l.$slots, "default", {}, void 0, !0)
|
|
825
825
|
], 4));
|
|
826
826
|
}
|
|
827
|
-
}),
|
|
827
|
+
}), Sn = /* @__PURE__ */ ge(Vt, [["__scopeId", "data-v-507384bc"]]), Et = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, Lt = ["onClick"], jt = {
|
|
828
828
|
key: 0,
|
|
829
829
|
class: "inline-component-wrapper flex grow justify-center items-center w-full h-full"
|
|
830
830
|
}, Pt = {
|
|
@@ -852,7 +852,7 @@ const ct = xe("SunIcon", [
|
|
|
852
852
|
},
|
|
853
853
|
emits: ["search", "update:search-data"],
|
|
854
854
|
setup(e, { emit: d }) {
|
|
855
|
-
const l = e, t = d,
|
|
855
|
+
const l = e, t = d, s = l.id ?? `advancedSearch-${Xe()}`, a = h(null), u = h(null), m = {
|
|
856
856
|
datetime: ze(() => Promise.resolve().then(() => vl)),
|
|
857
857
|
"standard-select": ze(() => import("./select-Cz4vf_YE.js")),
|
|
858
858
|
// Add other components here when you create them:
|
|
@@ -879,9 +879,9 @@ const ct = xe("SunIcon", [
|
|
|
879
879
|
}
|
|
880
880
|
else if (f.range && typeof f.value == "object" && f.value !== null && "start" in f.value && "end" in f.value)
|
|
881
881
|
try {
|
|
882
|
-
const g = new Date(f.value.start),
|
|
883
|
-
if (!isNaN(g.getTime()) && !isNaN(
|
|
884
|
-
return `${g.toLocaleDateString()} - ${
|
|
882
|
+
const g = new Date(f.value.start), S = new Date(f.value.end);
|
|
883
|
+
if (!isNaN(g.getTime()) && !isNaN(S.getTime()))
|
|
884
|
+
return `${g.toLocaleDateString()} - ${S.toLocaleDateString()}`;
|
|
885
885
|
} catch {
|
|
886
886
|
}
|
|
887
887
|
break;
|
|
@@ -897,7 +897,7 @@ const ct = xe("SunIcon", [
|
|
|
897
897
|
case "custom-select":
|
|
898
898
|
if ((b = f.props) != null && b.options && Array.isArray(f.props.options)) {
|
|
899
899
|
const g = f.props.options.find(
|
|
900
|
-
(
|
|
900
|
+
(S) => S.value === f.value
|
|
901
901
|
);
|
|
902
902
|
if (g)
|
|
903
903
|
return g.text;
|
|
@@ -919,11 +919,11 @@ const ct = xe("SunIcon", [
|
|
|
919
919
|
}
|
|
920
920
|
const g = (D = l.searchOptions.find(
|
|
921
921
|
(x) => (x == null ? void 0 : x.category) === l.currentCategory
|
|
922
|
-
)) == null ? void 0 : D.tabs,
|
|
922
|
+
)) == null ? void 0 : D.tabs, S = g == null ? void 0 : g.find(
|
|
923
923
|
(x) => x.name === b
|
|
924
924
|
);
|
|
925
|
-
|
|
926
|
-
tab:
|
|
925
|
+
S ? (S.value = f, t("update:search-data", {
|
|
926
|
+
tab: S.name,
|
|
927
927
|
data: f
|
|
928
928
|
})) : console.error(
|
|
929
929
|
`Tab with name "${b}" not found in current category.`
|
|
@@ -935,29 +935,29 @@ const ct = xe("SunIcon", [
|
|
|
935
935
|
function V() {
|
|
936
936
|
t("search");
|
|
937
937
|
}
|
|
938
|
-
async function
|
|
939
|
-
var
|
|
940
|
-
const b = document.getElementById(`advancedSearchMobile-${
|
|
941
|
-
((
|
|
938
|
+
async function C(f) {
|
|
939
|
+
var S;
|
|
940
|
+
const b = document.getElementById(`advancedSearchMobile-${s}`), g = b && b.contains(f.target);
|
|
941
|
+
((S = a.value) == null ? void 0 : S.displayMode) === "popup" && M.value && !M.value.contains(f.target) && !g && (await me(), a.value = null);
|
|
942
942
|
}
|
|
943
943
|
async function H() {
|
|
944
944
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
945
945
|
const f = document.getElementById(
|
|
946
|
-
`advancedSearchMobile-${
|
|
946
|
+
`advancedSearchMobile-${s}`
|
|
947
947
|
);
|
|
948
948
|
f ? (a.value = null, f.showModal()) : console.warn(
|
|
949
|
-
`Mobile modal element not found. Ensure it exists with id="advancedSearchMobile-${
|
|
949
|
+
`Mobile modal element not found. Ensure it exists with id="advancedSearchMobile-${s}".`
|
|
950
950
|
);
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
async function F(f) {
|
|
954
|
-
var g,
|
|
954
|
+
var g, S, v;
|
|
955
955
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
956
956
|
H();
|
|
957
957
|
return;
|
|
958
958
|
}
|
|
959
959
|
const b = f.displayMode ?? "popup";
|
|
960
|
-
if (((g = a.value) == null ? void 0 : g.name) === f.name && ((
|
|
960
|
+
if (((g = a.value) == null ? void 0 : g.name) === f.name && ((S = a.value) == null ? void 0 : S.displayMode) === b)
|
|
961
961
|
a.value = null;
|
|
962
962
|
else if (a.value = { ...f, displayMode: b }, await me(), ((v = a.value) == null ? void 0 : v.displayMode) === "popup") {
|
|
963
963
|
const D = i.value[f.name];
|
|
@@ -985,10 +985,10 @@ const ct = xe("SunIcon", [
|
|
|
985
985
|
"Blur detected, but staying within container or not an inline tab."
|
|
986
986
|
);
|
|
987
987
|
}, 50);
|
|
988
|
-
},
|
|
988
|
+
}, Q = () => {
|
|
989
989
|
console.log("Enter key pressed on inline component, closing inline view."), a.value = null;
|
|
990
990
|
};
|
|
991
|
-
q(
|
|
991
|
+
q(u, (f) => {
|
|
992
992
|
var b;
|
|
993
993
|
console.log(
|
|
994
994
|
"advanced-search: inlineComponentRef changed. New Value:",
|
|
@@ -1011,25 +1011,25 @@ const ct = xe("SunIcon", [
|
|
|
1011
1011
|
f ? "advanced-search: inlineComponentRef available, but active tab is not inline." : "advanced-search: inlineComponentRef is now null (component likely unmounted)."
|
|
1012
1012
|
);
|
|
1013
1013
|
}), he(() => {
|
|
1014
|
-
document.addEventListener("click",
|
|
1014
|
+
document.addEventListener("click", C), window.addEventListener("resize", le);
|
|
1015
1015
|
}), Ee(() => {
|
|
1016
|
-
document.removeEventListener("click",
|
|
1016
|
+
document.removeEventListener("click", C), window.removeEventListener("resize", le);
|
|
1017
1017
|
});
|
|
1018
1018
|
const le = () => {
|
|
1019
1019
|
var f, b;
|
|
1020
1020
|
if (typeof window < "u") {
|
|
1021
|
-
const g = window.innerWidth <= 768,
|
|
1022
|
-
!g && (((f = a.value) == null ? void 0 : f.displayMode) === "popup" || ((b = a.value) == null ? void 0 : b.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), a.value = null), g && !
|
|
1021
|
+
const g = window.innerWidth <= 768, S = a.value !== null && (a.value.displayMode === "popup" || a.value.displayMode === "inline") && window.innerWidth > 768;
|
|
1022
|
+
!g && (((f = a.value) == null ? void 0 : f.displayMode) === "popup" || ((b = a.value) == null ? void 0 : b.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), a.value = null), g && !S && a.value !== null && (console.log(
|
|
1023
1023
|
"Resizing to desktop from potential mobile active state, closing active tab."
|
|
1024
1024
|
), a.value = null);
|
|
1025
1025
|
const v = document.getElementById(
|
|
1026
|
-
`advancedSearchMobile-${
|
|
1026
|
+
`advancedSearchMobile-${s}`
|
|
1027
1027
|
);
|
|
1028
1028
|
v != null && v.open && !g && (console.log("Modal is open on desktop, closing modal and active tab."), v.close(), a.value = null);
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
1031
|
return (f, b) => {
|
|
1032
|
-
var g,
|
|
1032
|
+
var g, S;
|
|
1033
1033
|
return o(), r(W, null, [
|
|
1034
1034
|
n("div", {
|
|
1035
1035
|
ref_key: "searchContainer",
|
|
@@ -1041,7 +1041,7 @@ const ct = xe("SunIcon", [
|
|
|
1041
1041
|
onClick: H
|
|
1042
1042
|
}, [
|
|
1043
1043
|
n("div", Et, [
|
|
1044
|
-
(o(!0), r(W, null,
|
|
1044
|
+
(o(!0), r(W, null, Z(((g = l.searchOptions.find(
|
|
1045
1045
|
(v) => v.category === l.currentCategory
|
|
1046
1046
|
)) == null ? void 0 : g.tabs) || [], (v, D) => {
|
|
1047
1047
|
var x, j, A, te, de;
|
|
@@ -1062,10 +1062,10 @@ const ct = xe("SunIcon", [
|
|
|
1062
1062
|
onUpdated: b[0] || (b[0] = (p) => c(p)),
|
|
1063
1063
|
"onUpdate:modelValue": b[1] || (b[1] = (p) => c(p)),
|
|
1064
1064
|
onBlur: K,
|
|
1065
|
-
onKeydown: pe(re(
|
|
1065
|
+
onKeydown: pe(re(Q, ["stop", "prevent"]), ["enter"]),
|
|
1066
1066
|
ref_for: !0,
|
|
1067
1067
|
ref_key: "inlineComponentRef",
|
|
1068
|
-
ref:
|
|
1068
|
+
ref: u
|
|
1069
1069
|
}), null, 16, ["modelValue", "onKeydown"]))
|
|
1070
1070
|
])) : (o(), r("div", Pt, [
|
|
1071
1071
|
n("p", At, L(v.name), 1),
|
|
@@ -1111,22 +1111,22 @@ const ct = xe("SunIcon", [
|
|
|
1111
1111
|
])
|
|
1112
1112
|
], 512),
|
|
1113
1113
|
n("dialog", {
|
|
1114
|
-
id: `advancedSearchMobile-${se(
|
|
1114
|
+
id: `advancedSearchMobile-${se(s)}`,
|
|
1115
1115
|
class: "modal"
|
|
1116
1116
|
}, [
|
|
1117
1117
|
n("div", qt, [
|
|
1118
1118
|
E(f.$slots, "additionalForMobile", {}, () => [
|
|
1119
1119
|
n("h3", Ut, L(e.currentCategory), 1)
|
|
1120
1120
|
], !0),
|
|
1121
|
-
(o(!0), r(W, null,
|
|
1121
|
+
(o(!0), r(W, null, Z(((S = l.searchOptions.find(
|
|
1122
1122
|
(v) => v.category === l.currentCategory
|
|
1123
|
-
)) == null ? void 0 :
|
|
1123
|
+
)) == null ? void 0 : S.tabs) || [], (v, D) => (o(), r("div", {
|
|
1124
1124
|
class: "collapse bg-base-200 my-4",
|
|
1125
1125
|
key: v.name
|
|
1126
1126
|
}, [
|
|
1127
1127
|
n("input", {
|
|
1128
1128
|
type: "radio",
|
|
1129
|
-
name: `accordion-${se(
|
|
1129
|
+
name: `accordion-${se(s)}`,
|
|
1130
1130
|
checked: D === 0
|
|
1131
1131
|
}, null, 8, Ht),
|
|
1132
1132
|
n("div", Wt, [
|
|
@@ -1155,7 +1155,7 @@ const ct = xe("SunIcon", [
|
|
|
1155
1155
|
], 64);
|
|
1156
1156
|
};
|
|
1157
1157
|
}
|
|
1158
|
-
}),
|
|
1158
|
+
}), Cn = /* @__PURE__ */ ge(Gt, [["__scopeId", "data-v-577c3624"]]), Jt = { class: "z-30 relative flex items-center bg-base-100 date-filter-input px-4 border-2 border-primary rounded-md w-full min-h-10 font-semibold text-primary text-sm" }, Zt = { key: 0 }, Qt = { key: 1 }, el = ["id", "onKeydown"], tl = {
|
|
1159
1159
|
key: 2,
|
|
1160
1160
|
class: "flex justify-center p-4"
|
|
1161
1161
|
}, ll = { class: "join items-center gap-2 max-w-2xs md:max-w-full justify-between max-md:input max-md:input-bordered !rounded overflow-hidden mx-auto" }, nl = { class: "join-item" }, al = ["id", "disabled", "value"], ol = { class: "join-item" }, sl = ["id", "disabled", "value"], il = {
|
|
@@ -1183,7 +1183,7 @@ const ct = xe("SunIcon", [
|
|
|
1183
1183
|
},
|
|
1184
1184
|
emits: ["update:modelValue", "change"],
|
|
1185
1185
|
setup(e, { emit: d }) {
|
|
1186
|
-
const l = typeof window < "u", t = e,
|
|
1186
|
+
const l = typeof window < "u", t = e, s = d, a = h(null), u = h(!1), m = h(null), i = h(null), y = h(null), M = h(null), R = h(null), k = h({
|
|
1187
1187
|
from: "",
|
|
1188
1188
|
to: "",
|
|
1189
1189
|
single: ""
|
|
@@ -1191,7 +1191,7 @@ const ct = xe("SunIcon", [
|
|
|
1191
1191
|
single: null,
|
|
1192
1192
|
start: null,
|
|
1193
1193
|
end: null
|
|
1194
|
-
}), V = (p) => p instanceof Date ? p.toISOString() : p,
|
|
1194
|
+
}), V = (p) => p instanceof Date ? p.toISOString() : p, C = (p) => p.split("T")[0] || "", H = (p) => {
|
|
1195
1195
|
const w = p instanceof Date ? p : new Date(p);
|
|
1196
1196
|
if (isNaN(w.getTime())) return "";
|
|
1197
1197
|
const z = String(w.getHours()).padStart(2, "0"), B = String(w.getMinutes()).padStart(2, "0");
|
|
@@ -1206,13 +1206,13 @@ const ct = xe("SunIcon", [
|
|
|
1206
1206
|
}
|
|
1207
1207
|
if (t.range && typeof z == "object" && "start" in z) {
|
|
1208
1208
|
const B = V(z.start), N = V(z.end);
|
|
1209
|
-
c.value.start =
|
|
1209
|
+
c.value.start = C(B), c.value.end = C(N), t.mode !== "date" && (k.value.from = H(B), k.value.to = H(N));
|
|
1210
1210
|
} else {
|
|
1211
1211
|
const B = V(z);
|
|
1212
|
-
c.value.single =
|
|
1212
|
+
c.value.single = C(B), t.mode !== "date" && (k.value.single = H(B));
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
|
-
}, K =
|
|
1215
|
+
}, K = ee(() => {
|
|
1216
1216
|
const p = (B) => {
|
|
1217
1217
|
if (!B) return "";
|
|
1218
1218
|
if (B.includes(":")) return B;
|
|
@@ -1244,7 +1244,7 @@ const ct = xe("SunIcon", [
|
|
|
1244
1244
|
return `${p(B)} ${N || ""}`.trim();
|
|
1245
1245
|
}
|
|
1246
1246
|
return "";
|
|
1247
|
-
}),
|
|
1247
|
+
}), Q = () => {
|
|
1248
1248
|
if (m.value)
|
|
1249
1249
|
c.value.single = m.value.value || null;
|
|
1250
1250
|
else if (i.value) {
|
|
@@ -1281,29 +1281,29 @@ const ct = xe("SunIcon", [
|
|
|
1281
1281
|
}
|
|
1282
1282
|
return null;
|
|
1283
1283
|
}, b = async () => {
|
|
1284
|
-
|
|
1284
|
+
Q();
|
|
1285
1285
|
const p = f();
|
|
1286
|
-
|
|
1286
|
+
s("update:modelValue", p), s("change", p);
|
|
1287
1287
|
}, g = () => {
|
|
1288
1288
|
me(() => {
|
|
1289
1289
|
b();
|
|
1290
1290
|
});
|
|
1291
|
-
},
|
|
1291
|
+
}, S = (p) => {
|
|
1292
1292
|
const w = p.target;
|
|
1293
1293
|
t.range ? w === M.value ? k.value.from = w.value : w === R.value && (k.value.to = w.value) : k.value.single = w.value, b();
|
|
1294
1294
|
}, v = () => {
|
|
1295
|
-
|
|
1295
|
+
u.value = !u.value;
|
|
1296
1296
|
}, D = () => {
|
|
1297
|
-
b(),
|
|
1297
|
+
b(), u.value = !1;
|
|
1298
1298
|
}, x = (p) => {
|
|
1299
|
-
!t.popup || !
|
|
1299
|
+
!t.popup || !u.value || setTimeout(() => {
|
|
1300
1300
|
const w = a.value, z = p.target, B = `date-picker-${t.id}-popup`;
|
|
1301
1301
|
w && !w.contains(z) && !p.target.closest(`#${B}`) && D();
|
|
1302
1302
|
}, 0);
|
|
1303
1303
|
}, j = () => {
|
|
1304
1304
|
D();
|
|
1305
1305
|
}, A = () => {
|
|
1306
|
-
b(), t.popup && (
|
|
1306
|
+
b(), t.popup && (u.value = !1);
|
|
1307
1307
|
}, te = () => {
|
|
1308
1308
|
if (!l) return;
|
|
1309
1309
|
const p = t.range ? i.value : m.value;
|
|
@@ -1348,7 +1348,7 @@ const ct = xe("SunIcon", [
|
|
|
1348
1348
|
K.value ? (o(), r("span", Qt, L(K.value), 1)) : (o(), r("span", Zt, L(t.placeholder), 1))
|
|
1349
1349
|
])
|
|
1350
1350
|
])) : O("", !0),
|
|
1351
|
-
|
|
1351
|
+
u.value || !t.popup ? (o(), r("div", {
|
|
1352
1352
|
key: 1,
|
|
1353
1353
|
class: T(["z-50 bg-base-100 rounded-md w-full min-w-xs overflow-hidden", { "absolute top-full left-0 mt-2 shadow-lg": t.popup, "mt-2": !t.popup }]),
|
|
1354
1354
|
id: `date-picker-${t.id}-popup`,
|
|
@@ -1371,7 +1371,7 @@ const ct = xe("SunIcon", [
|
|
|
1371
1371
|
"first-day-of-week": t.firstDayOfWeek,
|
|
1372
1372
|
onChange: g
|
|
1373
1373
|
}, {
|
|
1374
|
-
default:
|
|
1374
|
+
default: Ce(() => [
|
|
1375
1375
|
n("button", {
|
|
1376
1376
|
slot: "previous",
|
|
1377
1377
|
class: "btn-outline btn btn-primary md:btn-sm",
|
|
@@ -1430,7 +1430,7 @@ const ct = xe("SunIcon", [
|
|
|
1430
1430
|
"first-day-of-week": t.firstDayOfWeek,
|
|
1431
1431
|
onChange: g
|
|
1432
1432
|
}, {
|
|
1433
|
-
default:
|
|
1433
|
+
default: Ce(() => [
|
|
1434
1434
|
n("button", {
|
|
1435
1435
|
slot: "previous",
|
|
1436
1436
|
class: "btn-outline btn btn-primary md:btn-sm",
|
|
@@ -1487,7 +1487,7 @@ const ct = xe("SunIcon", [
|
|
|
1487
1487
|
ref: M,
|
|
1488
1488
|
id: `${t.id}-time-from`,
|
|
1489
1489
|
placeholder: "from",
|
|
1490
|
-
onChange:
|
|
1490
|
+
onChange: S,
|
|
1491
1491
|
disabled: t.disabled,
|
|
1492
1492
|
value: k.value.from || ""
|
|
1493
1493
|
}, null, 40, al)
|
|
@@ -1511,7 +1511,7 @@ const ct = xe("SunIcon", [
|
|
|
1511
1511
|
ref_key: "timeToInput",
|
|
1512
1512
|
ref: R,
|
|
1513
1513
|
id: `${t.id}-time-to`,
|
|
1514
|
-
onChange:
|
|
1514
|
+
onChange: S,
|
|
1515
1515
|
disabled: t.disabled,
|
|
1516
1516
|
value: k.value.to || ""
|
|
1517
1517
|
}, null, 40, sl)
|
|
@@ -1525,7 +1525,7 @@ const ct = xe("SunIcon", [
|
|
|
1525
1525
|
ref_key: "timeInput",
|
|
1526
1526
|
ref: y,
|
|
1527
1527
|
id: `${t.id}-time`,
|
|
1528
|
-
onChange:
|
|
1528
|
+
onChange: S,
|
|
1529
1529
|
disabled: t.disabled,
|
|
1530
1530
|
value: k.value.single || ""
|
|
1531
1531
|
}, null, 40, rl)
|
|
@@ -1559,31 +1559,31 @@ const ct = xe("SunIcon", [
|
|
|
1559
1559
|
const d = e, l = h(d.initialRating);
|
|
1560
1560
|
q(
|
|
1561
1561
|
() => d.initialRating,
|
|
1562
|
-
(
|
|
1563
|
-
l.value =
|
|
1562
|
+
(s) => {
|
|
1563
|
+
l.value = s;
|
|
1564
1564
|
}
|
|
1565
1565
|
);
|
|
1566
|
-
const t = (
|
|
1567
|
-
l.value =
|
|
1566
|
+
const t = (s) => {
|
|
1567
|
+
l.value = s;
|
|
1568
1568
|
};
|
|
1569
|
-
return (
|
|
1569
|
+
return (s, a) => (o(), r("div", {
|
|
1570
1570
|
class: T(["rating", [
|
|
1571
1571
|
`rating-${d.size}`,
|
|
1572
1572
|
{ "rating-half": e.halfStars },
|
|
1573
1573
|
{ "pointer-events-none": !e.isInteractive }
|
|
1574
1574
|
]])
|
|
1575
1575
|
}, [
|
|
1576
|
-
(o(!0), r(W, null,
|
|
1577
|
-
key:
|
|
1576
|
+
(o(!0), r(W, null, Z(e.numberOfStars * (e.halfStars ? 2 : 1), (u) => (o(), r("input", {
|
|
1577
|
+
key: u,
|
|
1578
1578
|
type: "radio",
|
|
1579
|
-
value: e.halfStars ?
|
|
1580
|
-
checked: l.value === (e.halfStars ?
|
|
1581
|
-
onChange: (m) => e.isInteractive ? t(e.halfStars ?
|
|
1579
|
+
value: e.halfStars ? u * 0.5 : u,
|
|
1580
|
+
checked: l.value === (e.halfStars ? u * 0.5 : u),
|
|
1581
|
+
onChange: (m) => e.isInteractive ? t(e.halfStars ? u * 0.5 : u) : null,
|
|
1582
1582
|
class: T(["mask", [
|
|
1583
1583
|
{
|
|
1584
1584
|
// 'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
|
|
1585
|
-
"mask-half-1": e.halfStars &&
|
|
1586
|
-
"mask-half-2": e.halfStars &&
|
|
1585
|
+
"mask-half-1": e.halfStars && u % 2 !== 0,
|
|
1586
|
+
"mask-half-2": e.halfStars && u % 2 === 0,
|
|
1587
1587
|
"cursor-pointer": e.isInteractive,
|
|
1588
1588
|
"cursor-default": !e.isInteractive,
|
|
1589
1589
|
"mask-star": e.shape === "star",
|
|
@@ -1600,10 +1600,10 @@ const ct = xe("SunIcon", [
|
|
|
1600
1600
|
"mask-triangle-3": e.shape === "triangle-left",
|
|
1601
1601
|
"mask-triangle-4": e.shape === "triangle-right"
|
|
1602
1602
|
},
|
|
1603
|
-
l.value >= (e.halfStars ?
|
|
1603
|
+
l.value >= (e.halfStars ? u * 0.5 : u) ? d.color : ""
|
|
1604
1604
|
]]),
|
|
1605
1605
|
style: we({
|
|
1606
|
-
marginRight: e.halfStars &&
|
|
1606
|
+
marginRight: e.halfStars && u % 2 === 0 ? `${d.gap}px` : e.halfStars ? "0" : `${d.gap}px`
|
|
1607
1607
|
}),
|
|
1608
1608
|
disabled: !e.isInteractive
|
|
1609
1609
|
}, null, 46, fl))), 128))
|
|
@@ -1619,40 +1619,40 @@ const ct = xe("SunIcon", [
|
|
|
1619
1619
|
},
|
|
1620
1620
|
emits: ["update:modelValue"],
|
|
1621
1621
|
setup(e, { emit: d }) {
|
|
1622
|
-
const l = e, t = d,
|
|
1622
|
+
const l = e, t = d, s = h([...l.modelValue]), a = l.maxTagAmount === void 0 ? -1 : l.maxTagAmount, u = h(null), m = h(""), i = ee(() => a < 0 || s.value.length < a), y = () => {
|
|
1623
1623
|
const c = m.value.trim();
|
|
1624
|
-
c && !
|
|
1624
|
+
c && !s.value.includes(c) && (s.value.push(c), t("update:modelValue", s.value), m.value = "");
|
|
1625
1625
|
}, M = (c) => {
|
|
1626
|
-
|
|
1626
|
+
s.value = s.value.filter((V) => V !== c), t("update:modelValue", s.value);
|
|
1627
1627
|
}, R = () => {
|
|
1628
|
-
m.value === "" && (
|
|
1628
|
+
m.value === "" && (s.value.pop(), t("update:modelValue", s.value));
|
|
1629
1629
|
}, k = (c) => {
|
|
1630
1630
|
c.key === "Enter" ? y() : c.key === "Backspace" && m.value === "" && R();
|
|
1631
1631
|
};
|
|
1632
1632
|
return q(() => l.modelValue, (c) => {
|
|
1633
|
-
|
|
1633
|
+
s.value = [...c];
|
|
1634
1634
|
}), (c, V) => (o(), r("div", {
|
|
1635
1635
|
class: T(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", c.$props.class])
|
|
1636
1636
|
}, [
|
|
1637
|
-
(o(!0), r(W, null,
|
|
1638
|
-
key:
|
|
1639
|
-
tag:
|
|
1637
|
+
(o(!0), r(W, null, Z(s.value, (C) => E(c.$slots, "tag", {
|
|
1638
|
+
key: C,
|
|
1639
|
+
tag: C
|
|
1640
1640
|
}, () => [
|
|
1641
1641
|
n("div", ml, [
|
|
1642
1642
|
n("button", {
|
|
1643
1643
|
class: "px-1! py-0! h-fit font-bold cursor-pointer",
|
|
1644
|
-
onClick: (H) => M(
|
|
1644
|
+
onClick: (H) => M(C),
|
|
1645
1645
|
"aria-label": "Remove tag"
|
|
1646
1646
|
}, "X", 8, pl),
|
|
1647
|
-
n("span", hl, L(
|
|
1647
|
+
n("span", hl, L(C), 1)
|
|
1648
1648
|
])
|
|
1649
1649
|
])), 128)),
|
|
1650
1650
|
E(c.$slots, "input", { showInput: i.value }, () => [
|
|
1651
|
-
i.value ?
|
|
1651
|
+
i.value ? Se((o(), r("input", {
|
|
1652
1652
|
key: 0,
|
|
1653
1653
|
ref_key: "inputRef",
|
|
1654
|
-
ref:
|
|
1655
|
-
"onUpdate:modelValue": V[0] || (V[0] = (
|
|
1654
|
+
ref: u,
|
|
1655
|
+
"onUpdate:modelValue": V[0] || (V[0] = (C) => m.value = C),
|
|
1656
1656
|
type: "text",
|
|
1657
1657
|
placeholder: e.placeholder || "Type here",
|
|
1658
1658
|
class: "h-full input input-ghost",
|
|
@@ -1683,9 +1683,9 @@ const ct = xe("SunIcon", [
|
|
|
1683
1683
|
emits: ["update:modelValue"],
|
|
1684
1684
|
setup(e, { expose: d, emit: l }) {
|
|
1685
1685
|
console.log(e.placeholder);
|
|
1686
|
-
const
|
|
1686
|
+
const s = l, a = h(null), u = (i) => {
|
|
1687
1687
|
const y = i.target;
|
|
1688
|
-
|
|
1688
|
+
s("update:modelValue", y.value);
|
|
1689
1689
|
};
|
|
1690
1690
|
return d({
|
|
1691
1691
|
focusInput: () => {
|
|
@@ -1703,20 +1703,20 @@ const ct = xe("SunIcon", [
|
|
|
1703
1703
|
ref: a,
|
|
1704
1704
|
class: "rounded-md w-full select-bordered select",
|
|
1705
1705
|
value: e.modelValue,
|
|
1706
|
-
onChange:
|
|
1706
|
+
onChange: u
|
|
1707
1707
|
}, [
|
|
1708
1708
|
e.placeholder ? (o(), r("option", kl, L(e.placeholder), 1)) : O("", !0),
|
|
1709
|
-
(o(!0), r(W, null,
|
|
1709
|
+
(o(!0), r(W, null, Z(e.options, (M) => (o(), r("option", {
|
|
1710
1710
|
key: M.value,
|
|
1711
1711
|
value: M.value
|
|
1712
1712
|
}, L(M.text), 9, $l))), 128))
|
|
1713
1713
|
], 40, xl)
|
|
1714
1714
|
]));
|
|
1715
1715
|
}
|
|
1716
|
-
}),
|
|
1716
|
+
}), Sl = {
|
|
1717
1717
|
key: 0,
|
|
1718
1718
|
class: "label"
|
|
1719
|
-
},
|
|
1719
|
+
}, Cl = { class: "label-text" }, Il = ["onKeydown", "aria-expanded", "aria-activedescendant"], Ml = ["placeholder", "disabled"], zl = {
|
|
1720
1720
|
class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
|
|
1721
1721
|
role: "listbox"
|
|
1722
1722
|
}, Tl = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, Bl = ["onMousedown", "id", "aria-selected"], Tn = {
|
|
@@ -1750,16 +1750,16 @@ const ct = xe("SunIcon", [
|
|
|
1750
1750
|
},
|
|
1751
1751
|
emits: ["update:modelValue", "select", "clear"],
|
|
1752
1752
|
setup(e, { expose: d, emit: l }) {
|
|
1753
|
-
const t = e,
|
|
1753
|
+
const t = e, s = l, a = Ye(), u = ee(() => {
|
|
1754
1754
|
const D = (a.default ? a.default() : []).filter((x) => x.type !== Ge);
|
|
1755
1755
|
return console.log("hasDefaultSlotContent computed:", D.length > 0), D.length > 0;
|
|
1756
1756
|
}), m = h(""), i = h(null), y = h(!1), M = h(null), R = h(null), k = h(null), c = h(null), V = () => {
|
|
1757
1757
|
y.value = !t.disabled;
|
|
1758
|
-
},
|
|
1759
|
-
y.value = !1, c.value = null,
|
|
1758
|
+
}, C = () => {
|
|
1759
|
+
y.value = !1, c.value = null, u.value || (i.value && m.value !== i.value.text ? m.value = i.value.text : i.value || (m.value = ""));
|
|
1760
1760
|
}, H = () => {
|
|
1761
|
-
y.value ?
|
|
1762
|
-
}, F =
|
|
1761
|
+
y.value ? C() : V();
|
|
1762
|
+
}, F = ee(() => {
|
|
1763
1763
|
const v = m.value ? m.value.toLowerCase() : "";
|
|
1764
1764
|
return v === "" && !y.value ? [] : t.options.filter(
|
|
1765
1765
|
(x) => x && x.text ? x.text.toLowerCase().includes(v) : ""
|
|
@@ -1768,21 +1768,21 @@ const ct = xe("SunIcon", [
|
|
|
1768
1768
|
q(
|
|
1769
1769
|
() => t.modelValue,
|
|
1770
1770
|
(v, D) => {
|
|
1771
|
-
if (v !== D &&
|
|
1772
|
-
i.value = null, !y.value && !
|
|
1771
|
+
if (v !== D && C(), v == null)
|
|
1772
|
+
i.value = null, !y.value && !u.value && (m.value = "");
|
|
1773
1773
|
else {
|
|
1774
1774
|
const x = t.options.find((j) => j.value === v);
|
|
1775
|
-
x ? (i.value = x, !y.value && !
|
|
1775
|
+
x ? (i.value = x, !y.value && !u.value && (m.value = x.text)) : (i.value = null, !y.value && !u.value && (m.value = ""));
|
|
1776
1776
|
}
|
|
1777
1777
|
},
|
|
1778
1778
|
{ immediate: !0 }
|
|
1779
1779
|
// Run immediately on component mount
|
|
1780
1780
|
);
|
|
1781
1781
|
const K = (v) => {
|
|
1782
|
-
R.value && !R.value.contains(v.target) &&
|
|
1783
|
-
},
|
|
1782
|
+
R.value && !R.value.contains(v.target) && C();
|
|
1783
|
+
}, Q = () => {
|
|
1784
1784
|
setTimeout(() => {
|
|
1785
|
-
R.value && !R.value.contains(document.activeElement) &&
|
|
1785
|
+
R.value && !R.value.contains(document.activeElement) && C();
|
|
1786
1786
|
}, 100);
|
|
1787
1787
|
};
|
|
1788
1788
|
q(y, (v) => {
|
|
@@ -1790,19 +1790,19 @@ const ct = xe("SunIcon", [
|
|
|
1790
1790
|
document.addEventListener("click", K);
|
|
1791
1791
|
}, 0) : document.removeEventListener("click", K);
|
|
1792
1792
|
}), Ee(() => {
|
|
1793
|
-
document.removeEventListener("click", K), window.removeEventListener("keydown",
|
|
1793
|
+
document.removeEventListener("click", K), window.removeEventListener("keydown", S);
|
|
1794
1794
|
});
|
|
1795
1795
|
const le = () => {
|
|
1796
1796
|
if (t.disabled) return;
|
|
1797
1797
|
const v = i.value;
|
|
1798
|
-
|
|
1798
|
+
s("update:modelValue", null), v && s("clear", v);
|
|
1799
1799
|
}, f = (v) => {
|
|
1800
|
-
i.value = v,
|
|
1800
|
+
i.value = v, u.value || (m.value = v.text), s("update:modelValue", v.value), s("select", v), C();
|
|
1801
1801
|
}, b = () => {
|
|
1802
1802
|
F.value.length > 0 && f(F.value[0]);
|
|
1803
1803
|
}, g = () => {
|
|
1804
1804
|
y.value || V();
|
|
1805
|
-
},
|
|
1805
|
+
}, S = (v) => {
|
|
1806
1806
|
if (!y.value || F.value.length === 0) return;
|
|
1807
1807
|
const D = F.value.findIndex(
|
|
1808
1808
|
(j, A) => "option-" + A === c.value
|
|
@@ -1820,9 +1820,9 @@ const ct = xe("SunIcon", [
|
|
|
1820
1820
|
j && f(j);
|
|
1821
1821
|
return;
|
|
1822
1822
|
} else if (v.key === "Escape") {
|
|
1823
|
-
v.preventDefault(),
|
|
1823
|
+
v.preventDefault(), C(), k.value && k.value.focus();
|
|
1824
1824
|
return;
|
|
1825
|
-
} else if (
|
|
1825
|
+
} else if (u.value)
|
|
1826
1826
|
return;
|
|
1827
1827
|
if (x !== -1) {
|
|
1828
1828
|
c.value = "option-" + x;
|
|
@@ -1833,9 +1833,9 @@ const ct = xe("SunIcon", [
|
|
|
1833
1833
|
}
|
|
1834
1834
|
};
|
|
1835
1835
|
return q(y, (v) => {
|
|
1836
|
-
v ? (window.addEventListener("keydown",
|
|
1836
|
+
v ? (window.addEventListener("keydown", S), !u.value && !m.value && i.value && (m.value = i.value.text)) : window.removeEventListener("keydown", S);
|
|
1837
1837
|
}), Ee(() => {
|
|
1838
|
-
document.removeEventListener("click", K), window.removeEventListener("keydown",
|
|
1838
|
+
document.removeEventListener("click", K), window.removeEventListener("keydown", S);
|
|
1839
1839
|
}), d({
|
|
1840
1840
|
isDropdownOpen: y,
|
|
1841
1841
|
// Expose state
|
|
@@ -1843,7 +1843,7 @@ const ct = xe("SunIcon", [
|
|
|
1843
1843
|
// Expose selected item
|
|
1844
1844
|
openDropdown: V,
|
|
1845
1845
|
// Expose method to open
|
|
1846
|
-
closeDropdown:
|
|
1846
|
+
closeDropdown: C,
|
|
1847
1847
|
// Expose method to close
|
|
1848
1848
|
toggleDropdown: H,
|
|
1849
1849
|
// Expose method to toggle
|
|
@@ -1851,28 +1851,28 @@ const ct = xe("SunIcon", [
|
|
|
1851
1851
|
// Expose method to select an item programmatically
|
|
1852
1852
|
filterText: m,
|
|
1853
1853
|
// Expose filter text (useful if parent controls filtering)
|
|
1854
|
-
hasDefaultSlotContent:
|
|
1854
|
+
hasDefaultSlotContent: u
|
|
1855
1855
|
// Expose to know if the default slot is used
|
|
1856
1856
|
}), (v, D) => (o(), r("div", {
|
|
1857
1857
|
class: "relative w-full max-w-xs form-control",
|
|
1858
1858
|
ref_key: "componentRoot",
|
|
1859
1859
|
ref: R
|
|
1860
1860
|
}, [
|
|
1861
|
-
e.label ? (o(), r("label",
|
|
1862
|
-
n("span",
|
|
1861
|
+
e.label ? (o(), r("label", Sl, [
|
|
1862
|
+
n("span", Cl, L(e.label), 1)
|
|
1863
1863
|
])) : O("", !0),
|
|
1864
1864
|
n("div", {
|
|
1865
|
-
class: T(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !
|
|
1865
|
+
class: T(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !u.value, select: !u.value }]),
|
|
1866
1866
|
style: we(
|
|
1867
1867
|
i.value ? "background-image: unset; padding-right: 0.5rem;" : ""
|
|
1868
1868
|
),
|
|
1869
1869
|
tabindex: "0",
|
|
1870
|
-
onClick: D[1] || (D[1] = (x) =>
|
|
1870
|
+
onClick: D[1] || (D[1] = (x) => u.value ? H() : V()),
|
|
1871
1871
|
onKeydown: [
|
|
1872
1872
|
pe(re(b, ["prevent"]), ["enter"]),
|
|
1873
1873
|
pe(re(b, ["prevent"]), ["space"])
|
|
1874
1874
|
],
|
|
1875
|
-
onBlur:
|
|
1875
|
+
onBlur: Q,
|
|
1876
1876
|
role: "combobox",
|
|
1877
1877
|
"aria-haspopup": "listbox",
|
|
1878
1878
|
"aria-expanded": y.value,
|
|
@@ -1882,7 +1882,7 @@ const ct = xe("SunIcon", [
|
|
|
1882
1882
|
ref: k
|
|
1883
1883
|
}, [
|
|
1884
1884
|
E(v.$slots, "default", {}, () => [
|
|
1885
|
-
|
|
1885
|
+
u.value ? O("", !0) : Se((o(), r("input", {
|
|
1886
1886
|
key: 0,
|
|
1887
1887
|
type: "text",
|
|
1888
1888
|
placeholder: e.placeholder,
|
|
@@ -1904,15 +1904,15 @@ const ct = xe("SunIcon", [
|
|
|
1904
1904
|
class: "mx-2 text-base-content/50 hover:text-base-content/80 cursor-pointer",
|
|
1905
1905
|
onClick: re(le, ["stop"])
|
|
1906
1906
|
})) : O("", !0),
|
|
1907
|
-
|
|
1907
|
+
u.value && !i.value ? (o(), ve(se(rt), {
|
|
1908
1908
|
key: 1,
|
|
1909
1909
|
class: T([{ "rotate-180": y.value }, "mx-2"]),
|
|
1910
1910
|
size: 20
|
|
1911
1911
|
}, null, 8, ["class"])) : O("", !0)
|
|
1912
1912
|
], 46, Il),
|
|
1913
|
-
|
|
1913
|
+
Se(n("div", zl, [
|
|
1914
1914
|
n("ul", Tl, [
|
|
1915
|
-
(o(!0), r(W, null,
|
|
1915
|
+
(o(!0), r(W, null, Z(F.value, (x, j) => (o(), r("li", {
|
|
1916
1916
|
key: x.value,
|
|
1917
1917
|
onMousedown: re((A) => f(x), ["prevent"]),
|
|
1918
1918
|
class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
|
|
@@ -1954,21 +1954,21 @@ const ct = xe("SunIcon", [
|
|
|
1954
1954
|
},
|
|
1955
1955
|
emits: ["update:modelValue", "validate"],
|
|
1956
1956
|
setup(e, { expose: d, emit: l }) {
|
|
1957
|
-
const t = e,
|
|
1958
|
-
var H, F, K,
|
|
1957
|
+
const t = e, s = l, a = h(null), u = h(!1), m = h(""), i = ee(() => {
|
|
1958
|
+
var H, F, K, Q;
|
|
1959
1959
|
let c = !0, V = "";
|
|
1960
|
-
const
|
|
1961
|
-
return (H = t.rules) != null && H.required && (
|
|
1962
|
-
}), y =
|
|
1960
|
+
const C = t.modelValue;
|
|
1961
|
+
return (H = t.rules) != null && H.required && (C == null || C === "") && (c = !1, V = "This field is required."), c && ((F = t.rules) == null ? void 0 : F.minLength) !== void 0 && typeof C == "string" && C.length < t.rules.minLength && (c = !1, V = `Must be at least ${t.rules.minLength} characters.`), c && ((K = t.rules) == null ? void 0 : K.maxLength) !== void 0 && typeof C == "string" && C.length > t.rules.maxLength && (c = !1, V = `Cannot exceed ${t.rules.maxLength} characters.`), c && ((Q = t.rules) != null && Q.email) && typeof C == "string" && C && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(C) || (c = !1, V = "Please enter a valid email address.")), m.value = V, s("validate", c), c;
|
|
1962
|
+
}), y = ee(() => u.value && !i.value), M = (c) => {
|
|
1963
1963
|
const V = c.target;
|
|
1964
|
-
|
|
1964
|
+
s("update:modelValue", V.value), u.value && i.value;
|
|
1965
1965
|
}, R = () => {
|
|
1966
|
-
|
|
1966
|
+
u.value = !0, i.value;
|
|
1967
1967
|
};
|
|
1968
1968
|
return q(
|
|
1969
1969
|
() => t.modelValue,
|
|
1970
1970
|
() => {
|
|
1971
|
-
|
|
1971
|
+
u.value && i.value;
|
|
1972
1972
|
}
|
|
1973
1973
|
), d({
|
|
1974
1974
|
focusInput: () => {
|
|
@@ -1976,7 +1976,7 @@ const ct = xe("SunIcon", [
|
|
|
1976
1976
|
console.log("inputField.vue: focusInput method called."), (c = a.value) == null || c.focus();
|
|
1977
1977
|
},
|
|
1978
1978
|
isValid: i,
|
|
1979
|
-
isTouched:
|
|
1979
|
+
isTouched: u,
|
|
1980
1980
|
errorMessage: m
|
|
1981
1981
|
}), (c, V) => (o(), r("div", Ol, [
|
|
1982
1982
|
e.label ? (o(), r("label", Dl, [
|
|
@@ -2001,18 +2001,18 @@ const ct = xe("SunIcon", [
|
|
|
2001
2001
|
"input-ghost": e.style === "ghost",
|
|
2002
2002
|
// Color classes - Apply only if NOT in an error state AND NOT in a validation success state.
|
|
2003
2003
|
// This ensures validation feedback overrides base colors.
|
|
2004
|
-
"input-neutral": e.color === "neutral" && !y.value && !(i.value &&
|
|
2005
|
-
"input-primary": e.color === "primary" && !y.value && !(i.value &&
|
|
2006
|
-
"input-secondary": e.color === "secondary" && !y.value && !(i.value &&
|
|
2007
|
-
"input-accent": e.color === "accent" && !y.value && !(i.value &&
|
|
2008
|
-
"input-info": e.color === "info" && !y.value && !(i.value &&
|
|
2009
|
-
"input-success": e.color === "success" && !y.value && !(i.value &&
|
|
2004
|
+
"input-neutral": e.color === "neutral" && !y.value && !(i.value && u.value && e.needsValidation),
|
|
2005
|
+
"input-primary": e.color === "primary" && !y.value && !(i.value && u.value && e.needsValidation),
|
|
2006
|
+
"input-secondary": e.color === "secondary" && !y.value && !(i.value && u.value && e.needsValidation),
|
|
2007
|
+
"input-accent": e.color === "accent" && !y.value && !(i.value && u.value && e.needsValidation),
|
|
2008
|
+
"input-info": e.color === "info" && !y.value && !(i.value && u.value && e.needsValidation),
|
|
2009
|
+
"input-success": e.color === "success" && !y.value && !(i.value && u.value && e.needsValidation),
|
|
2010
2010
|
// Color success applies only if not in error or validation success state
|
|
2011
|
-
"input-warning": e.color === "warning" && !y.value && !(i.value &&
|
|
2011
|
+
"input-warning": e.color === "warning" && !y.value && !(i.value && u.value && e.needsValidation),
|
|
2012
2012
|
// Validation state classes - These take precedence visually via conditions or CSS specificity.
|
|
2013
2013
|
"input-error": y.value,
|
|
2014
2014
|
// Apply error style if validation fails
|
|
2015
|
-
"input-success-validation": i.value &&
|
|
2015
|
+
"input-success-validation": i.value && u.value && !y.value && e.needsValidation
|
|
2016
2016
|
// Apply validation success style if valid, touched, not error, AND validation is needed. Using a distinct name 'input-success-validation' is recommended to avoid CSS conflicts with the 'input-success' color class.
|
|
2017
2017
|
}
|
|
2018
2018
|
]]),
|
|
@@ -2022,7 +2022,7 @@ const ct = xe("SunIcon", [
|
|
|
2022
2022
|
}, null, 42, El),
|
|
2023
2023
|
y.value ? (o(), r("div", Ll, [
|
|
2024
2024
|
n("span", jl, L(m.value), 1)
|
|
2025
|
-
])) : i.value &&
|
|
2025
|
+
])) : i.value && u.value && e.successMessage ? (o(), r("div", Pl, [
|
|
2026
2026
|
n("span", Al, L(e.successMessage), 1)
|
|
2027
2027
|
])) : O("", !0)
|
|
2028
2028
|
]));
|
|
@@ -2042,7 +2042,7 @@ const ct = xe("SunIcon", [
|
|
|
2042
2042
|
(t) => {
|
|
2043
2043
|
l.value = t;
|
|
2044
2044
|
}
|
|
2045
|
-
), (t,
|
|
2045
|
+
), (t, s) => l.value ? (o(), r("span", {
|
|
2046
2046
|
key: 0,
|
|
2047
2047
|
class: T(["loading", [
|
|
2048
2048
|
{ "loading-xs": e.size === "xs" },
|
|
@@ -2082,45 +2082,36 @@ const ct = xe("SunIcon", [
|
|
|
2082
2082
|
background: {},
|
|
2083
2083
|
color: {},
|
|
2084
2084
|
collapseOnMobile: { type: Boolean, default: !1 },
|
|
2085
|
-
rows: {}
|
|
2085
|
+
rows: { default: 1 }
|
|
2086
2086
|
},
|
|
2087
2087
|
setup(e) {
|
|
2088
|
-
const d = e
|
|
2089
|
-
|
|
2090
|
-
1: "md:grid-rows-1",
|
|
2091
|
-
2: "md:grid-rows-2",
|
|
2092
|
-
3: "md:grid-rows-3",
|
|
2093
|
-
4: "md:grid-rows-4",
|
|
2094
|
-
5: "md:grid-rows-5"
|
|
2095
|
-
};
|
|
2096
|
-
return t > 0 && u[t] ? u[t] : "";
|
|
2097
|
-
});
|
|
2098
|
-
return (t, u) => (o(), r("div", {
|
|
2088
|
+
const d = e;
|
|
2089
|
+
return (l, t) => (o(), r("div", {
|
|
2099
2090
|
class: T(["mx-auto md:px-10 py-10 text-base-content", [e.background ?? "bg-base-200", e.color ?? "text-base-content"]])
|
|
2100
2091
|
}, [
|
|
2101
2092
|
n("footer", {
|
|
2102
|
-
class: T(["footer
|
|
2093
|
+
class: T(["footer sm:footer-horizontal container", [{ "grid-rows-1": d.rows === 1 }, { "grid-rows-2": d.rows === 2 }, { "grid-rows-3": d.rows === 3 }]])
|
|
2103
2094
|
}, [
|
|
2104
|
-
(o(!0), r(W, null,
|
|
2095
|
+
(o(!0), r(W, null, Z(d.items, (s) => (o(), r("nav", {
|
|
2105
2096
|
class: T([{ "hidden sm:grid": e.collapseOnMobile }])
|
|
2106
2097
|
}, [
|
|
2107
|
-
n("h6", Rl, L(
|
|
2108
|
-
(o(!0), r(W, null,
|
|
2098
|
+
n("h6", Rl, L(s.title), 1),
|
|
2099
|
+
(o(!0), r(W, null, Z(s.items, (a) => (o(), r("a", {
|
|
2109
2100
|
class: "link link-hover",
|
|
2110
|
-
href:
|
|
2111
|
-
}, L(
|
|
2101
|
+
href: a.link
|
|
2102
|
+
}, L(a.text), 9, Nl))), 256))
|
|
2112
2103
|
], 2))), 256)),
|
|
2113
2104
|
e.collapseOnMobile ? (o(), r("nav", _l, [
|
|
2114
|
-
(o(!0), r(W, null,
|
|
2105
|
+
(o(!0), r(W, null, Z(d.items, (s) => (o(), r("ul", Fl, [
|
|
2115
2106
|
n("div", ql, [
|
|
2116
|
-
n("div", Ul, L(
|
|
2107
|
+
n("div", Ul, L(s.title), 1),
|
|
2117
2108
|
n("div", Hl, [
|
|
2118
2109
|
n("ul", Wl, [
|
|
2119
|
-
(o(!0), r(W, null,
|
|
2110
|
+
(o(!0), r(W, null, Z(s.items, (a) => (o(), r("li", Kl, [
|
|
2120
2111
|
n("a", {
|
|
2121
2112
|
class: "w-full font-medium link link-hover",
|
|
2122
|
-
href:
|
|
2123
|
-
}, L(
|
|
2113
|
+
href: a.link
|
|
2114
|
+
}, L(a.text), 9, Xl)
|
|
2124
2115
|
]))), 256))
|
|
2125
2116
|
])
|
|
2126
2117
|
])
|
|
@@ -2128,7 +2119,7 @@ const ct = xe("SunIcon", [
|
|
|
2128
2119
|
]))), 256))
|
|
2129
2120
|
])) : O("", !0),
|
|
2130
2121
|
n("aside", Yl, [
|
|
2131
|
-
E(
|
|
2122
|
+
E(l.$slots, "default")
|
|
2132
2123
|
])
|
|
2133
2124
|
], 2)
|
|
2134
2125
|
], 2));
|
|
@@ -2162,15 +2153,15 @@ const Vn = /* @__PURE__ */ ge(Gl, [["render", en]]), tn = { class: "flex flex-ro
|
|
|
2162
2153
|
emits: ["update:currentCategory"],
|
|
2163
2154
|
setup(e, { emit: d }) {
|
|
2164
2155
|
const l = e, t = d;
|
|
2165
|
-
function
|
|
2156
|
+
function s(a) {
|
|
2166
2157
|
t("update:currentCategory", a);
|
|
2167
2158
|
}
|
|
2168
|
-
return (a,
|
|
2169
|
-
(o(!0), r(W, null,
|
|
2159
|
+
return (a, u) => (o(), r("div", tn, [
|
|
2160
|
+
(o(!0), r(W, null, Z(l.searchOptions, (m) => (o(), r("div", {
|
|
2170
2161
|
key: m.category
|
|
2171
2162
|
}, [
|
|
2172
2163
|
n("button", {
|
|
2173
|
-
onClick: (i) =>
|
|
2164
|
+
onClick: (i) => s(m.category),
|
|
2174
2165
|
class: T(["truncate btn btn-ghost", { "font-semibold": l.currentCategory === m.category }])
|
|
2175
2166
|
}, L(m.category), 11, ln)
|
|
2176
2167
|
]))), 128))
|
|
@@ -2217,11 +2208,11 @@ const Vn = /* @__PURE__ */ ge(Gl, [["render", en]]), tn = { class: "flex flex-ro
|
|
|
2217
2208
|
},
|
|
2218
2209
|
emits: ["tab-changed"],
|
|
2219
2210
|
setup(e, { emit: d }) {
|
|
2220
|
-
const l = e, t = h(l.items[0]),
|
|
2211
|
+
const l = e, t = h(l.items[0]), s = d;
|
|
2221
2212
|
function a(i) {
|
|
2222
|
-
t.value = i,
|
|
2213
|
+
t.value = i, s("tab-changed", i);
|
|
2223
2214
|
}
|
|
2224
|
-
function
|
|
2215
|
+
function u() {
|
|
2225
2216
|
const y = (l.items.indexOf(t.value) + 1) % l.items.length;
|
|
2226
2217
|
a(l.items[y]);
|
|
2227
2218
|
}
|
|
@@ -2233,7 +2224,7 @@ const Vn = /* @__PURE__ */ ge(Gl, [["render", en]]), tn = { class: "flex flex-ro
|
|
|
2233
2224
|
l.items && a(l.items[0]);
|
|
2234
2225
|
}), Ve(() => {
|
|
2235
2226
|
l.rotateTabsAfter && l.rotateTabsAfter > 0 && setInterval(() => {
|
|
2236
|
-
|
|
2227
|
+
u();
|
|
2237
2228
|
}, l.rotateTabsAfter * 1e3);
|
|
2238
2229
|
}), (i, y) => (o(), r(W, null, [
|
|
2239
2230
|
n("div", {
|
|
@@ -2246,11 +2237,11 @@ const Vn = /* @__PURE__ */ ge(Gl, [["render", en]]), tn = { class: "flex flex-ro
|
|
|
2246
2237
|
class: "cursor-pointer"
|
|
2247
2238
|
}, "Previous"),
|
|
2248
2239
|
n("button", {
|
|
2249
|
-
onClick: y[1] || (y[1] = (M) =>
|
|
2240
|
+
onClick: y[1] || (y[1] = (M) => u()),
|
|
2250
2241
|
class: "text-primary cursor-pointer"
|
|
2251
2242
|
}, "Next")
|
|
2252
2243
|
])) : O("", !0),
|
|
2253
|
-
(o(!0), r(W, null,
|
|
2244
|
+
(o(!0), r(W, null, Z(e.items, (M) => (o(), r(W, null, [
|
|
2254
2245
|
n("a", {
|
|
2255
2246
|
type: "button",
|
|
2256
2247
|
role: "tab",
|
|
@@ -2273,13 +2264,13 @@ typeof document > "u" && (globalThis.document = {});
|
|
|
2273
2264
|
typeof window > "u" && (globalThis.window = globalThis);
|
|
2274
2265
|
export {
|
|
2275
2266
|
bn as Accordion,
|
|
2276
|
-
|
|
2267
|
+
Cn as AdvancedSearch,
|
|
2277
2268
|
wn as Avatar,
|
|
2278
2269
|
xn as Badge,
|
|
2279
2270
|
mn as ButtonComponent,
|
|
2280
2271
|
kn as Card,
|
|
2281
2272
|
$n as Carousel,
|
|
2282
|
-
|
|
2273
|
+
Sn as CarouselItem,
|
|
2283
2274
|
En as CategoryNavigation,
|
|
2284
2275
|
cl as DatetimePicker,
|
|
2285
2276
|
pn as Dropdown,
|