manolis-ui 0.6.8 → 0.6.9
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/manolis-ui.js +318 -321
- package/dist/manolis-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/manolis-ui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as P, computed as B, createElementBlock as a, openBlock as l, normalizeClass as C, createCommentVNode as M, renderSlot as D, createTextVNode as de, createElementVNode as n, Fragment as I, renderList as V, toDisplayString as S, ref as $, h as re, onMounted as G, watch as N, withDirectives as R, createVNode as te, isRef as Be, vModelCheckbox as Pe, unref as F, provide as ze, normalizeStyle as ce, inject as Ae, defineAsyncComponent as Le, onBeforeUnmount as ie, createBlock as ue, resolveDynamicComponent as me, mergeProps as he, nextTick as ge, onUnmounted as we, vModelSelect as J, vModelText as ee, useSlots as Ee, Comment as Ue, withKeys as be, withModifiers as se, vShow as je } from "vue";
|
|
2
|
+
const Re = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "loading loading-spinner"
|
|
5
|
-
}, sn = /* @__PURE__ */
|
|
5
|
+
}, sn = /* @__PURE__ */ P({
|
|
6
6
|
__name: "ButtonComponent",
|
|
7
7
|
props: {
|
|
8
8
|
outlined: { type: Boolean, default: !1 },
|
|
@@ -66,16 +66,16 @@ const Fe = {
|
|
|
66
66
|
return (s, r) => (l(), a("button", {
|
|
67
67
|
class: C(["btn", { "btn-outline": d.outlined }, { "btn-active": d.active }, t.value, e.value, o.value])
|
|
68
68
|
}, [
|
|
69
|
-
s.loading ? (l(), a("span",
|
|
69
|
+
s.loading ? (l(), a("span", Re)) : M("", !0),
|
|
70
70
|
D(s.$slots, "default", {}, () => [
|
|
71
71
|
r[0] || (r[0] = de("Submit"))
|
|
72
72
|
])
|
|
73
73
|
], 2));
|
|
74
74
|
}
|
|
75
|
-
}),
|
|
75
|
+
}), Fe = {
|
|
76
76
|
tabindex: "0",
|
|
77
77
|
class: "z-1 bg-base-100 shadow-sm p-2 rounded-sm min-w-[inherit] md:min-w-full xl:min-w-52 dropdown-content menu"
|
|
78
|
-
}, Ne = ["href"], rn = /* @__PURE__ */
|
|
78
|
+
}, Ne = ["href"], rn = /* @__PURE__ */ P({
|
|
79
79
|
__name: "dropdown",
|
|
80
80
|
props: {
|
|
81
81
|
items: {},
|
|
@@ -103,7 +103,7 @@ const Fe = {
|
|
|
103
103
|
}, () => [
|
|
104
104
|
s[0] || (s[0] = n("div", { class: "m-1 btn" }, "Open dropdown", -1))
|
|
105
105
|
]),
|
|
106
|
-
n("ul",
|
|
106
|
+
n("ul", Fe, [
|
|
107
107
|
(l(!0), a(I, null, V(o.items, (r) => (l(), a("li", null, [
|
|
108
108
|
n("a", {
|
|
109
109
|
href: r.link
|
|
@@ -113,7 +113,7 @@ const Fe = {
|
|
|
113
113
|
])
|
|
114
114
|
], 2));
|
|
115
115
|
}
|
|
116
|
-
}), qe = { class: "modal-box" }, He = { class: "modal-action" }, un = /* @__PURE__ */
|
|
116
|
+
}), qe = { class: "modal-box" }, He = { class: "modal-action" }, un = /* @__PURE__ */ P({
|
|
117
117
|
__name: "modal",
|
|
118
118
|
props: {
|
|
119
119
|
position: { default: "center" },
|
|
@@ -124,20 +124,20 @@ const Fe = {
|
|
|
124
124
|
top: "modal-top",
|
|
125
125
|
bottom: "modal-bottom",
|
|
126
126
|
center: "modal-middle"
|
|
127
|
-
}, t =
|
|
127
|
+
}, t = $(null), o = () => {
|
|
128
128
|
var r;
|
|
129
129
|
(r = t.value) == null || r.showModal();
|
|
130
130
|
}, s = () => {
|
|
131
131
|
var r;
|
|
132
132
|
(r = t.value) == null || r.close();
|
|
133
133
|
};
|
|
134
|
-
return (r,
|
|
134
|
+
return (r, g) => (l(), a(I, null, [
|
|
135
135
|
n("span", {
|
|
136
136
|
class: "w-fit cursor-pointer",
|
|
137
137
|
onClick: o
|
|
138
138
|
}, [
|
|
139
139
|
D(r.$slots, "trigger", { role: "button" }, () => [
|
|
140
|
-
|
|
140
|
+
g[0] || (g[0] = n("button", { class: "btn" }, "Open", -1))
|
|
141
141
|
])
|
|
142
142
|
]),
|
|
143
143
|
n("dialog", {
|
|
@@ -155,7 +155,7 @@ const Fe = {
|
|
|
155
155
|
class: C(r.withBackdrop ? "modal-backdrop" : "")
|
|
156
156
|
}, [
|
|
157
157
|
D(r.$slots, "close-button", {}, () => [
|
|
158
|
-
|
|
158
|
+
g[1] || (g[1] = n("button", { class: "btn" }, "Close", -1))
|
|
159
159
|
])
|
|
160
160
|
], 34)
|
|
161
161
|
])
|
|
@@ -163,7 +163,7 @@ const Fe = {
|
|
|
163
163
|
], 2)
|
|
164
164
|
], 64));
|
|
165
165
|
}
|
|
166
|
-
}), We = { class: "flex justify-center items-center swap-on" }, Ke = { class: "flex justify-center items-center swap-off" }, dn = /* @__PURE__ */
|
|
166
|
+
}), We = { class: "flex justify-center items-center swap-on" }, Ke = { class: "flex justify-center items-center swap-off" }, dn = /* @__PURE__ */ P({
|
|
167
167
|
__name: "swap",
|
|
168
168
|
props: {
|
|
169
169
|
effect: {}
|
|
@@ -213,7 +213,7 @@ var oe = {
|
|
|
213
213
|
* This source code is licensed under the ISC license.
|
|
214
214
|
* See the LICENSE file in the root directory of this source tree.
|
|
215
215
|
*/
|
|
216
|
-
const Je = ({ size: i, strokeWidth: d = 2, absoluteStrokeWidth: e, color: t, iconNode: o, name: s, class: r, ...
|
|
216
|
+
const Je = ({ size: i, strokeWidth: d = 2, absoluteStrokeWidth: e, color: t, iconNode: o, name: s, class: r, ...g }, { slots: c }) => re(
|
|
217
217
|
"svg",
|
|
218
218
|
{
|
|
219
219
|
...oe,
|
|
@@ -222,7 +222,7 @@ const Je = ({ size: i, strokeWidth: d = 2, absoluteStrokeWidth: e, color: t, ico
|
|
|
222
222
|
stroke: t || oe.stroke,
|
|
223
223
|
"stroke-width": e ? Number(d) * 24 / Number(i) : d,
|
|
224
224
|
class: ["lucide", `lucide-${Ye(s ?? "icon")}`],
|
|
225
|
-
...
|
|
225
|
+
...g
|
|
226
226
|
},
|
|
227
227
|
[...o.map((p) => re(...p)), ...c.default ? [c.default()] : []]
|
|
228
228
|
);
|
|
@@ -298,7 +298,7 @@ const Qe = le("SunIcon", [
|
|
|
298
298
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
299
299
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
300
300
|
]), et = (i, d) => {
|
|
301
|
-
const e =
|
|
301
|
+
const e = $(null);
|
|
302
302
|
return G(() => {
|
|
303
303
|
if (typeof window < "u") {
|
|
304
304
|
const t = window.localStorage.getItem(i);
|
|
@@ -307,7 +307,7 @@ const Qe = le("SunIcon", [
|
|
|
307
307
|
}), N(e, (t) => {
|
|
308
308
|
typeof window < "u" && window.localStorage.setItem(i, JSON.stringify(t));
|
|
309
309
|
}), e;
|
|
310
|
-
}, tt = { class: "swap-rotate swap" }, lt = ["true-value", "false-value"], cn = /* @__PURE__ */
|
|
310
|
+
}, tt = { class: "swap-rotate swap" }, lt = ["true-value", "false-value"], cn = /* @__PURE__ */ P({
|
|
311
311
|
__name: "theme-controller",
|
|
312
312
|
props: {
|
|
313
313
|
lightTheme: { default: "light" },
|
|
@@ -321,20 +321,20 @@ const Qe = le("SunIcon", [
|
|
|
321
321
|
return G(() => t(e.value ? e.value : "")), N(e, (o) => {
|
|
322
322
|
t(o);
|
|
323
323
|
}), (o, s) => (l(), a("label", tt, [
|
|
324
|
-
|
|
324
|
+
R(n("input", {
|
|
325
325
|
type: "checkbox",
|
|
326
326
|
class: "theme-controller",
|
|
327
327
|
"onUpdate:modelValue": s[0] || (s[0] = (r) => Be(e) ? e.value = r : null),
|
|
328
328
|
"true-value": d.lightTheme,
|
|
329
329
|
"false-value": d.darkTheme
|
|
330
330
|
}, null, 8, lt), [
|
|
331
|
-
[
|
|
331
|
+
[Pe, F(e)]
|
|
332
332
|
]),
|
|
333
|
-
te(
|
|
334
|
-
te(
|
|
333
|
+
te(F(Qe), { class: "swap-off fill-current" }),
|
|
334
|
+
te(F(Ze), { class: "swap-on fill-current" })
|
|
335
335
|
]));
|
|
336
336
|
}
|
|
337
|
-
}), nt = ["name"], at = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, ot = { class: "collapse-content" }, st = ["innerHTML"], pn = /* @__PURE__ */
|
|
337
|
+
}), nt = ["name"], at = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, ot = { class: "collapse-content" }, st = ["innerHTML"], pn = /* @__PURE__ */ P({
|
|
338
338
|
__name: "accordion",
|
|
339
339
|
props: {
|
|
340
340
|
name: {},
|
|
@@ -361,7 +361,7 @@ const Qe = le("SunIcon", [
|
|
|
361
361
|
])
|
|
362
362
|
], 2))), 128));
|
|
363
363
|
}
|
|
364
|
-
}), rt = ["src"], it = { class: "text-xl" }, vn = /* @__PURE__ */
|
|
364
|
+
}), rt = ["src"], it = { class: "text-xl" }, vn = /* @__PURE__ */ P({
|
|
365
365
|
__name: "avatar",
|
|
366
366
|
props: {
|
|
367
367
|
image: {},
|
|
@@ -370,7 +370,7 @@ const Qe = le("SunIcon", [
|
|
|
370
370
|
fullyRounded: { type: Boolean, default: !1 }
|
|
371
371
|
},
|
|
372
372
|
setup(i) {
|
|
373
|
-
const d = i, e =
|
|
373
|
+
const d = i, e = $(d.onlineStatus);
|
|
374
374
|
return N(
|
|
375
375
|
() => d.onlineStatus,
|
|
376
376
|
(t) => {
|
|
@@ -395,7 +395,7 @@ const Qe = le("SunIcon", [
|
|
|
395
395
|
], 2))
|
|
396
396
|
], 2));
|
|
397
397
|
}
|
|
398
|
-
}), fn = /* @__PURE__ */
|
|
398
|
+
}), fn = /* @__PURE__ */ P({
|
|
399
399
|
__name: "badge",
|
|
400
400
|
props: {
|
|
401
401
|
color: { default: "neutral" },
|
|
@@ -437,7 +437,7 @@ const Qe = le("SunIcon", [
|
|
|
437
437
|
}, vt = { class: "flex-col flex-nowrap mt-auto card-actions" }, ft = {
|
|
438
438
|
key: 1,
|
|
439
439
|
class: "card-body"
|
|
440
|
-
}, mn = /* @__PURE__ */
|
|
440
|
+
}, mn = /* @__PURE__ */ P({
|
|
441
441
|
__name: "card",
|
|
442
442
|
props: {
|
|
443
443
|
imgUrl: { default: "" },
|
|
@@ -452,7 +452,7 @@ const Qe = le("SunIcon", [
|
|
|
452
452
|
imgHeight: { default: "h-44" }
|
|
453
453
|
},
|
|
454
454
|
setup(i) {
|
|
455
|
-
const d = i, e =
|
|
455
|
+
const d = i, e = $(d.outlined);
|
|
456
456
|
return N(
|
|
457
457
|
() => d.outlined,
|
|
458
458
|
(t) => {
|
|
@@ -495,13 +495,13 @@ const Qe = le("SunIcon", [
|
|
|
495
495
|
]))) : M("", !0)
|
|
496
496
|
], 2));
|
|
497
497
|
}
|
|
498
|
-
}), ke = Symbol("CarouselItemStyle"), mt = { class: "relative h-full" },
|
|
498
|
+
}), ke = Symbol("CarouselItemStyle"), mt = { class: "relative h-full" }, ht = {
|
|
499
499
|
key: 0,
|
|
500
500
|
class: "top-1/2 right-5 left-5 z-10 absolute flex justify-between -translate-y-1/2 transform"
|
|
501
|
-
},
|
|
501
|
+
}, gt = {
|
|
502
502
|
key: 1,
|
|
503
503
|
class: "bottom-5 z-10 absolute flex justify-center gap-2 py-2 w-full"
|
|
504
|
-
}, bt = ["onClick", "aria-label"], yt = /* @__PURE__ */
|
|
504
|
+
}, bt = ["onClick", "aria-label"], yt = /* @__PURE__ */ P({
|
|
505
505
|
__name: "carousel",
|
|
506
506
|
props: {
|
|
507
507
|
showIndicators: {
|
|
@@ -539,39 +539,39 @@ const Qe = le("SunIcon", [
|
|
|
539
539
|
}
|
|
540
540
|
},
|
|
541
541
|
setup(i, { expose: d }) {
|
|
542
|
-
const e = i, t =
|
|
542
|
+
const e = i, t = $(e.initialSlide), o = $(null), s = $(!1), r = $(0), g = B(() => ({
|
|
543
543
|
width: `calc((100% - ${e.slidesPerView > 1 ? (e.slidesPerView - 1) * e.gap : 0}px) / ${e.slidesPerView})`
|
|
544
544
|
}));
|
|
545
|
-
|
|
545
|
+
ze(ke, g);
|
|
546
546
|
const c = () => {
|
|
547
547
|
o.value ? r.value = o.value.children.length : r.value = 0;
|
|
548
548
|
}, p = async (m) => {
|
|
549
549
|
if (!o.value || e.slidesPerView <= 0 || s.value || (c(), r.value === 0)) return;
|
|
550
|
-
const b = (m % r.value + r.value) % r.value,
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
553
|
-
s.value = !0,
|
|
554
|
-
const K = e.sliderOrientation === "vertical" ?
|
|
550
|
+
const b = (m % r.value + r.value) % r.value, w = o.value, _ = e.sliderOrientation === "vertical" ? (w.offsetHeight - (e.slidesPerView - 1) * e.gap) / e.slidesPerView : (w.offsetWidth - (e.slidesPerView - 1) * e.gap) / e.slidesPerView;
|
|
551
|
+
if (_ <= 0) return;
|
|
552
|
+
const k = _ + e.gap, T = b * k, z = e.sliderOrientation === "vertical" ? w.scrollHeight - w.offsetHeight : w.scrollWidth - w.offsetWidth, H = Math.max(0, Math.min(T, z + 0.5));
|
|
553
|
+
s.value = !0, w.style.scrollBehavior = "auto";
|
|
554
|
+
const K = e.sliderOrientation === "vertical" ? w.scrollTop : w.scrollLeft, W = H - K;
|
|
555
555
|
if (Math.abs(W) < 1) {
|
|
556
556
|
s.value = !1, t.value = b;
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
|
-
const
|
|
560
|
-
const
|
|
561
|
-
e.sliderOrientation === "vertical" ?
|
|
559
|
+
const x = performance.now(), U = (O) => {
|
|
560
|
+
const L = O - x, E = Math.min(1, L / e.slideDuration), Z = E < 0.5 ? 4 * E * E * E : 1 - Math.pow(-2 * E + 2, 3) / 2, ne = K + W * Z;
|
|
561
|
+
e.sliderOrientation === "vertical" ? w.scrollTop = ne : w.scrollLeft = ne, E < 1 ? requestAnimationFrame(U) : (e.sliderOrientation === "vertical" ? w.scrollTop = H : w.scrollLeft = H, t.value = b, s.value = !1);
|
|
562
562
|
};
|
|
563
|
-
requestAnimationFrame(
|
|
564
|
-
},
|
|
563
|
+
requestAnimationFrame(U);
|
|
564
|
+
}, y = () => {
|
|
565
565
|
p(t.value + 1);
|
|
566
|
-
},
|
|
566
|
+
}, A = () => {
|
|
567
567
|
p(t.value - 1);
|
|
568
568
|
}, q = (m) => {
|
|
569
569
|
p(m);
|
|
570
570
|
}, f = () => {
|
|
571
571
|
if (!o.value || e.slidesPerView <= 0 || (c(), r.value === 0)) return;
|
|
572
|
-
const m = o.value, b = e.sliderOrientation === "vertical" ? m.offsetHeight : m.offsetWidth,
|
|
573
|
-
if (
|
|
574
|
-
const
|
|
572
|
+
const m = o.value, b = e.sliderOrientation === "vertical" ? m.offsetHeight : m.offsetWidth, w = e.slidesPerView > 1 ? (e.slidesPerView - 1) * e.gap : 0, _ = (b - w) / e.slidesPerView;
|
|
573
|
+
if (_ <= 0) return;
|
|
574
|
+
const k = Math.max(0, r.value - e.slidesPerView), T = Math.min(Math.max(0, e.initialSlide), k), z = T * (_ + e.gap), H = e.sliderOrientation === "vertical" ? m.scrollHeight - m.offsetHeight : m.scrollWidth - m.offsetWidth, K = Math.max(0, Math.min(z, H + 0.5));
|
|
575
575
|
e.sliderOrientation === "vertical" ? m.scrollTo({ top: K, behavior: "auto" }) : m.scrollTo({ left: K, behavior: "auto" }), t.value = T;
|
|
576
576
|
};
|
|
577
577
|
return G(() => {
|
|
@@ -584,8 +584,8 @@ const Qe = le("SunIcon", [
|
|
|
584
584
|
requestAnimationFrame(() => {
|
|
585
585
|
requestAnimationFrame(() => {
|
|
586
586
|
if (c(), r.value === 0) return;
|
|
587
|
-
const m = Math.max(0, r.value - e.slidesPerView), b = Math.min(t.value, m),
|
|
588
|
-
e.slideDuration = 0, p(b), e.slideDuration =
|
|
587
|
+
const m = Math.max(0, r.value - e.slidesPerView), b = Math.min(t.value, m), w = e.slideDuration;
|
|
588
|
+
e.slideDuration = 0, p(b), e.slideDuration = w;
|
|
589
589
|
});
|
|
590
590
|
});
|
|
591
591
|
}), d({ scrollToSlide: p }), (m, b) => (l(), a("div", mt, [
|
|
@@ -597,9 +597,9 @@ const Qe = le("SunIcon", [
|
|
|
597
597
|
}, [
|
|
598
598
|
D(m.$slots, "default", {}, void 0, !0)
|
|
599
599
|
], 6),
|
|
600
|
-
i.showNavigationButtons ? (l(), a("div",
|
|
600
|
+
i.showNavigationButtons ? (l(), a("div", ht, [
|
|
601
601
|
n("div", {
|
|
602
|
-
onClick:
|
|
602
|
+
onClick: A,
|
|
603
603
|
role: "button",
|
|
604
604
|
"aria-label": "Previous Slide"
|
|
605
605
|
}, [
|
|
@@ -611,7 +611,7 @@ const Qe = le("SunIcon", [
|
|
|
611
611
|
], !0)
|
|
612
612
|
]),
|
|
613
613
|
n("div", {
|
|
614
|
-
onClick:
|
|
614
|
+
onClick: y,
|
|
615
615
|
role: "button",
|
|
616
616
|
"aria-label": "Next Slide"
|
|
617
617
|
}, [
|
|
@@ -623,12 +623,12 @@ const Qe = le("SunIcon", [
|
|
|
623
623
|
], !0)
|
|
624
624
|
])
|
|
625
625
|
])) : M("", !0),
|
|
626
|
-
i.showIndicators ? (l(), a("div",
|
|
627
|
-
(l(!0), a(I, null, V(r.value, (
|
|
628
|
-
key: `dot-${
|
|
629
|
-
onClick: (
|
|
630
|
-
class: C(["btn btn-circle btn-xs", { "btn-active":
|
|
631
|
-
"aria-label": `Go to slide ${
|
|
626
|
+
i.showIndicators ? (l(), a("div", gt, [
|
|
627
|
+
(l(!0), a(I, null, V(r.value, (w, _) => (l(), a("button", {
|
|
628
|
+
key: `dot-${_}`,
|
|
629
|
+
onClick: (k) => q(_),
|
|
630
|
+
class: C(["btn btn-circle btn-xs", { "btn-active": _ === t.value }]),
|
|
631
|
+
"aria-label": `Go to slide ${_ + 1}`
|
|
632
632
|
}, null, 10, bt))), 128))
|
|
633
633
|
])) : M("", !0)
|
|
634
634
|
]));
|
|
@@ -638,21 +638,21 @@ const Qe = le("SunIcon", [
|
|
|
638
638
|
for (const [t, o] of d)
|
|
639
639
|
e[t] = o;
|
|
640
640
|
return e;
|
|
641
|
-
},
|
|
641
|
+
}, hn = /* @__PURE__ */ X(yt, [["__scopeId", "data-v-db55a6a5"]]), wt = /* @__PURE__ */ P({
|
|
642
642
|
__name: "carouselItem",
|
|
643
643
|
setup(i) {
|
|
644
|
-
const d =
|
|
644
|
+
const d = Ae(ke, $({}));
|
|
645
645
|
return (e, t) => (l(), a("div", {
|
|
646
646
|
class: "w-full h-full carousel-item",
|
|
647
|
-
style: ce(
|
|
647
|
+
style: ce(F(d))
|
|
648
648
|
}, [
|
|
649
649
|
D(e.$slots, "default", {}, void 0, !0)
|
|
650
650
|
], 4));
|
|
651
651
|
}
|
|
652
|
-
}),
|
|
652
|
+
}), gn = /* @__PURE__ */ X(wt, [["__scopeId", "data-v-507384bc"]]), kt = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, $t = ["onClick"], _t = { class: "text-sm" }, xt = { class: "md:block hidden opacity-35 text-xs truncate overflow-hidden ..." }, St = { class: "hidden" }, Ct = {
|
|
653
653
|
id: "advancedSearchMobile",
|
|
654
654
|
class: "modal"
|
|
655
|
-
}, Dt = { class: "modal-box" }, It = { class: "font-bold text-lg" }, Mt = ["checked"], Tt = { class: "flex justify-between items-center pr-4 w-full font-medium text-xl collapse-title" }, Vt = { class: "text-sm" }, Ot = { class: "flex place-content-center p-0 collapse-content" }, Bt = /* @__PURE__ */
|
|
655
|
+
}, Dt = { class: "modal-box" }, It = { class: "font-bold text-lg" }, Mt = ["checked"], Tt = { class: "flex justify-between items-center pr-4 w-full font-medium text-xl collapse-title" }, Vt = { class: "text-sm" }, Ot = { class: "flex place-content-center p-0 collapse-content" }, Bt = /* @__PURE__ */ P({
|
|
656
656
|
__name: "advancedSearch",
|
|
657
657
|
props: {
|
|
658
658
|
searchOptions: {},
|
|
@@ -660,12 +660,12 @@ const Qe = le("SunIcon", [
|
|
|
660
660
|
},
|
|
661
661
|
emits: ["search", "update:search-data"],
|
|
662
662
|
setup(i, { emit: d }) {
|
|
663
|
-
const e = i, t = d, o =
|
|
663
|
+
const e = i, t = d, o = $(null), s = {
|
|
664
664
|
datetime: Le(() => Promise.resolve().then(() => al))
|
|
665
|
-
}, r =
|
|
665
|
+
}, r = $({}), g = $({ left: "0px", top: "0px", transform: "translateX(0%)" }), c = $(null);
|
|
666
666
|
function p(m, b) {
|
|
667
|
-
var
|
|
668
|
-
if ((
|
|
667
|
+
var w, _, k;
|
|
668
|
+
if ((w = o.value) != null && w.name) {
|
|
669
669
|
t("update:search-data", {
|
|
670
670
|
tab: o.value.name,
|
|
671
671
|
data: m
|
|
@@ -673,18 +673,18 @@ const Qe = le("SunIcon", [
|
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
675
|
if (e.searchOptions) {
|
|
676
|
-
let T = (
|
|
676
|
+
let T = (k = (_ = e.searchOptions) == null ? void 0 : _.find((z) => (z == null ? void 0 : z.category) === e.currentCategory)) == null ? void 0 : k.tabs[b];
|
|
677
677
|
T !== void 0 && (T.value = m, t("update:search-data", {
|
|
678
678
|
tab: T == null ? void 0 : T.name,
|
|
679
679
|
data: T == null ? void 0 : T.value
|
|
680
680
|
}));
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function y() {
|
|
684
684
|
t("search");
|
|
685
685
|
}
|
|
686
|
-
async function
|
|
687
|
-
c.value && !c.value.contains(m.target) && (await
|
|
686
|
+
async function A(m) {
|
|
687
|
+
c.value && !c.value.contains(m.target) && (await ge(), o.value = null);
|
|
688
688
|
}
|
|
689
689
|
async function q() {
|
|
690
690
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
@@ -693,18 +693,18 @@ const Qe = le("SunIcon", [
|
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
695
|
async function f(m) {
|
|
696
|
-
var
|
|
697
|
-
o.value = m, await
|
|
696
|
+
var w;
|
|
697
|
+
o.value = m, await ge();
|
|
698
698
|
const b = r.value[m.name];
|
|
699
699
|
if (b) {
|
|
700
|
-
const
|
|
701
|
-
window.innerWidth > 768 ?
|
|
702
|
-
left: `${
|
|
703
|
-
top: `${
|
|
700
|
+
const _ = b.getBoundingClientRect(), k = ((w = c.value) == null ? void 0 : w.getBoundingClientRect()) || { left: 0, top: 0 };
|
|
701
|
+
window.innerWidth > 768 ? g.value = {
|
|
702
|
+
left: `${_.left + _.width / 2 - k.left}px`,
|
|
703
|
+
top: `${_.bottom - k.top}px`,
|
|
704
704
|
transform: "translateX(-50%)"
|
|
705
|
-
} :
|
|
705
|
+
} : g.value = {
|
|
706
706
|
left: "50%",
|
|
707
|
-
top: `${
|
|
707
|
+
top: `${_.bottom - k.top}px`,
|
|
708
708
|
transform: "translateX(-50%)"
|
|
709
709
|
// Center the popup horizontally on mobile
|
|
710
710
|
};
|
|
@@ -712,11 +712,11 @@ const Qe = le("SunIcon", [
|
|
|
712
712
|
console.error("Tab element not found for:", m.name);
|
|
713
713
|
}
|
|
714
714
|
return G(() => {
|
|
715
|
-
document.addEventListener("click",
|
|
715
|
+
document.addEventListener("click", A);
|
|
716
716
|
}), ie(() => {
|
|
717
|
-
document.removeEventListener("click",
|
|
717
|
+
document.removeEventListener("click", A);
|
|
718
718
|
}), (m, b) => {
|
|
719
|
-
var
|
|
719
|
+
var w, _;
|
|
720
720
|
return l(), a(I, null, [
|
|
721
721
|
n("div", {
|
|
722
722
|
ref_key: "searchContainer",
|
|
@@ -728,34 +728,34 @@ const Qe = le("SunIcon", [
|
|
|
728
728
|
onClick: q
|
|
729
729
|
}, [
|
|
730
730
|
n("div", kt, [
|
|
731
|
-
(l(!0), a(I, null, V(((
|
|
731
|
+
(l(!0), a(I, null, V(((w = e.searchOptions.find((k) => k.category === e.currentCategory)) == null ? void 0 : w.tabs) || [], (k) => {
|
|
732
732
|
var T;
|
|
733
733
|
return l(), a("button", {
|
|
734
|
-
key:
|
|
735
|
-
onClick: (
|
|
736
|
-
class: C([{ "tab-active": ((T = o.value) == null ? void 0 : T.name) ===
|
|
734
|
+
key: k.name,
|
|
735
|
+
onClick: (z) => f(k),
|
|
736
|
+
class: C([{ "tab-active": ((T = o.value) == null ? void 0 : T.name) === k.name }, "group/searchitem relative after:top-0 after:-right-2 after:absolute first-of-type:flex-auto last-of-type:flex-auto md:after:content-[''] last-of-type:after:content-none after:content-none after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-[1px] after:h-10 text-start overflow-x-hidden pointer-events-none md:pointer-events-auto"]),
|
|
737
737
|
ref_for: !0,
|
|
738
|
-
ref: (
|
|
738
|
+
ref: (z) => r.value[k.name] = z
|
|
739
739
|
}, [
|
|
740
|
-
n("p", _t, S(
|
|
741
|
-
n("p", xt, S(
|
|
740
|
+
n("p", _t, S(k.name), 1),
|
|
741
|
+
n("p", xt, S(k.description), 1)
|
|
742
742
|
], 10, $t);
|
|
743
743
|
}), 128))
|
|
744
744
|
]),
|
|
745
745
|
o.value ? (l(), a("div", {
|
|
746
746
|
key: 0,
|
|
747
747
|
class: "absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",
|
|
748
|
-
style: ce(
|
|
748
|
+
style: ce(g.value)
|
|
749
749
|
}, [
|
|
750
|
-
(l(), ue(me(s[o.value.type]),
|
|
750
|
+
(l(), ue(me(s[o.value.type]), he(o.value.props ? o.value.props : null, { onUpdated: p }), null, 16))
|
|
751
751
|
], 4)) : M("", !0),
|
|
752
752
|
n("button", {
|
|
753
753
|
title: "search",
|
|
754
754
|
type: "submit",
|
|
755
755
|
class: "ml-1 btn btn-primary btn-square",
|
|
756
|
-
onClick:
|
|
756
|
+
onClick: y
|
|
757
757
|
}, [
|
|
758
|
-
te(
|
|
758
|
+
te(F(ye), {
|
|
759
759
|
size: 24,
|
|
760
760
|
color: "white"
|
|
761
761
|
})
|
|
@@ -767,7 +767,7 @@ const Qe = le("SunIcon", [
|
|
|
767
767
|
onClick: b[0] || (b[0] = () => {
|
|
768
768
|
})
|
|
769
769
|
}, [
|
|
770
|
-
te(
|
|
770
|
+
te(F(ye), {
|
|
771
771
|
size: 24,
|
|
772
772
|
color: "white"
|
|
773
773
|
})
|
|
@@ -779,9 +779,9 @@ const Qe = le("SunIcon", [
|
|
|
779
779
|
D(m.$slots, "additionalForMobile", {}, () => [
|
|
780
780
|
n("h3", It, S(m.currentCategory), 1)
|
|
781
781
|
], !0),
|
|
782
|
-
(l(!0), a(I, null, V(((
|
|
782
|
+
(l(!0), a(I, null, V(((_ = e.searchOptions.find((k) => k.category === e.currentCategory)) == null ? void 0 : _.tabs) || [], (k, T) => (l(), a("div", {
|
|
783
783
|
class: "bg-base-200 my-4 collapse",
|
|
784
|
-
key:
|
|
784
|
+
key: k.name
|
|
785
785
|
}, [
|
|
786
786
|
n("input", {
|
|
787
787
|
type: "radio",
|
|
@@ -789,13 +789,13 @@ const Qe = le("SunIcon", [
|
|
|
789
789
|
checked: T === 0
|
|
790
790
|
}, null, 8, Mt),
|
|
791
791
|
n("div", Tt, [
|
|
792
|
-
de(S(
|
|
793
|
-
n("p", Vt, S(
|
|
792
|
+
de(S(k.name) + " ", 1),
|
|
793
|
+
n("p", Vt, S(k.description), 1)
|
|
794
794
|
]),
|
|
795
795
|
n("div", Ot, [
|
|
796
796
|
b[1] || (b[1] = n("br", null, null, -1)),
|
|
797
|
-
(l(), ue(me(s[
|
|
798
|
-
onUpdated: (
|
|
797
|
+
(l(), ue(me(s[k.type]), he({ ref_for: !0 }, k.props || {}, {
|
|
798
|
+
onUpdated: (z) => p(z, T)
|
|
799
799
|
}), null, 16, ["onUpdated"]))
|
|
800
800
|
])
|
|
801
801
|
]))), 128)),
|
|
@@ -803,7 +803,7 @@ const Qe = le("SunIcon", [
|
|
|
803
803
|
n("form", { method: "dialog" }, [
|
|
804
804
|
n("button", {
|
|
805
805
|
class: "btn btn-primary",
|
|
806
|
-
onClick:
|
|
806
|
+
onClick: y
|
|
807
807
|
}, "Close and Search")
|
|
808
808
|
])
|
|
809
809
|
])
|
|
@@ -812,13 +812,13 @@ const Qe = le("SunIcon", [
|
|
|
812
812
|
], 64);
|
|
813
813
|
};
|
|
814
814
|
}
|
|
815
|
-
}), bn = /* @__PURE__ */ X(Bt, [["__scopeId", "data-v-08fa37eb"]]),
|
|
815
|
+
}), bn = /* @__PURE__ */ X(Bt, [["__scopeId", "data-v-08fa37eb"]]), Pt = ["placeholder", "value", "id"], zt = { class: "btn btn-ghost" }, At = ["id"], Lt = {
|
|
816
816
|
key: 0,
|
|
817
817
|
class: "flex justify-between items-center place-content-center mb-4"
|
|
818
818
|
}, Et = ["value"], Ut = ["value"], jt = {
|
|
819
819
|
key: 1,
|
|
820
820
|
class: "gap-2 grid grid-cols-7"
|
|
821
|
-
},
|
|
821
|
+
}, Rt = ["onClick"], Ft = {
|
|
822
822
|
key: 2,
|
|
823
823
|
class: "mt-4 lg:w-80"
|
|
824
824
|
}, Nt = {
|
|
@@ -872,90 +872,90 @@ const Qe = le("SunIcon", [
|
|
|
872
872
|
N(() => e.range, (v) => {
|
|
873
873
|
v ? (s.value = { start: null, end: null }, r.value = { start: null, end: null }) : (s.value = null, r.value = null);
|
|
874
874
|
});
|
|
875
|
-
const t = d, o =
|
|
876
|
-
B(() => new Date(c.value,
|
|
877
|
-
const
|
|
878
|
-
const v = new Date(c.value,
|
|
879
|
-
return Array.from({ length: v }, (
|
|
880
|
-
}),
|
|
875
|
+
const t = d, o = $(!1), s = $(e.range ? { start: null, end: null } : null), r = $(e.range ? { start: null, end: null } : null), g = $((/* @__PURE__ */ new Date()).toLocaleString("default", { month: "long" })), c = $((/* @__PURE__ */ new Date()).getFullYear()), p = $(e.range ? { start: 0, end: 0 } : 0), y = $(e.range ? { start: 0, end: 0 } : 0), A = $(null), q = B(() => `${e.id}-input`), f = B(() => `${e.id}-popup`), m = B(() => e.mode === "date" || e.mode === "datetime"), b = B(() => e.mode === "time" || e.mode === "datetime");
|
|
876
|
+
B(() => new Date(c.value, w.value));
|
|
877
|
+
const w = B(() => x.indexOf(g.value)), _ = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], k = B(() => new Date(c.value, w.value).getDay()), T = B(() => {
|
|
878
|
+
const v = new Date(c.value, w.value + 1, 0).getDate();
|
|
879
|
+
return Array.from({ length: v }, (h, u) => new Date(c.value, w.value, u + 1));
|
|
880
|
+
}), z = B(() => Array.from({ length: k.value }, (v, h) => h)), H = Array.from({ length: 24 }, (v, h) => h), K = Array.from({ length: 60 }, (v, h) => h), W = B(
|
|
881
881
|
() => typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
882
882
|
navigator.userAgent
|
|
883
883
|
)
|
|
884
|
-
),
|
|
884
|
+
), x = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], U = B(() => {
|
|
885
885
|
const v = (/* @__PURE__ */ new Date()).getFullYear();
|
|
886
|
-
return Array.from({ length: 100 }, (
|
|
886
|
+
return Array.from({ length: 100 }, (h, u) => v - 50 + u);
|
|
887
887
|
}), O = B(() => {
|
|
888
888
|
if (!m.value || !s.value) return "";
|
|
889
889
|
if (e.range && s.value.start && s.value.end) {
|
|
890
|
-
const v = s.value.start.toLocaleDateString("en-US"),
|
|
891
|
-
return `${v} - ${
|
|
890
|
+
const v = s.value.start.toLocaleDateString("en-US"), h = s.value.end.toLocaleDateString("en-US");
|
|
891
|
+
return `${v} - ${h}`;
|
|
892
892
|
}
|
|
893
893
|
return !e.range && s.value ? s.value.toLocaleDateString("en-US") : "";
|
|
894
|
-
}),
|
|
894
|
+
}), L = (v) => v instanceof Date ? v : new Date(v), E = (v) => v instanceof Date && !isNaN(v), Z = B(() => {
|
|
895
895
|
if (!b.value) return "";
|
|
896
|
-
const v = (
|
|
896
|
+
const v = (h) => {
|
|
897
897
|
var ae, Q, fe;
|
|
898
|
-
const u = ((ae = p.value) == null ? void 0 : ae[
|
|
899
|
-
return W.value ? ((fe = r.value) == null ? void 0 : fe[
|
|
898
|
+
const u = ((ae = p.value) == null ? void 0 : ae[h]) ?? p.value, Y = ((Q = y.value) == null ? void 0 : Q[h]) ?? y.value;
|
|
899
|
+
return W.value ? ((fe = r.value) == null ? void 0 : fe[h]) ?? r.value : `${u.toString().padStart(2, "0")}:${Y.toString().padStart(2, "0")}`;
|
|
900
900
|
};
|
|
901
901
|
return e.range ? `${v("start")} - ${v("end")}` : v();
|
|
902
902
|
}), ne = B(() => {
|
|
903
|
-
const v = O.value,
|
|
904
|
-
return `${v} ${
|
|
903
|
+
const v = O.value, h = Z.value;
|
|
904
|
+
return `${v} ${h}`.trim();
|
|
905
905
|
}), $e = () => o.value = !o.value, pe = () => {
|
|
906
906
|
j(), _e();
|
|
907
907
|
}, _e = () => o.value = !1, xe = () => {
|
|
908
908
|
s.value = e.range ? { start: null, end: null } : null, r.value = e.range ? { start: null, end: null } : null, j();
|
|
909
909
|
}, Se = (v) => {
|
|
910
910
|
e.range ? s.value.start && s.value.end ? s.value = { start: v, end: null } : s.value.start ? s.value.end = v : s.value.start = v : s.value = v, j();
|
|
911
|
-
}, Ce = (v) => (v =
|
|
912
|
-
v =
|
|
913
|
-
const
|
|
914
|
-
return v.getDate() ===
|
|
915
|
-
}, Ie = (v) => (v =
|
|
916
|
-
if (v =
|
|
917
|
-
const
|
|
918
|
-
return Y >
|
|
911
|
+
}, Ce = (v) => (v = L(v), e.range ? s.value.start && E(s.value.start) && v.getTime() === s.value.start.getTime() || s.value.end && E(s.value.end) && v.getTime() === s.value.end.getTime() : E(s.value) && v.getTime() === s.value.getTime()), De = (v) => {
|
|
912
|
+
v = L(v);
|
|
913
|
+
const h = /* @__PURE__ */ new Date();
|
|
914
|
+
return v.getDate() === h.getDate() && v.getMonth() === h.getMonth() && v.getFullYear() === h.getFullYear();
|
|
915
|
+
}, Ie = (v) => (v = L(v), e.range && E(s.value.start) && v.getTime() === s.value.start.getTime()), Me = (v) => (v = L(v), e.range && E(s.value.end) && v.getTime() === s.value.end.getTime()), Te = (v) => {
|
|
916
|
+
if (v = L(v), e.range && E(s.value.start) && E(s.value.end)) {
|
|
917
|
+
const h = s.value.start.getTime(), u = s.value.end.getTime(), Y = v.getTime();
|
|
918
|
+
return Y > h && Y < u;
|
|
919
919
|
}
|
|
920
920
|
return !1;
|
|
921
921
|
}, Ve = () => {
|
|
922
|
-
let v =
|
|
923
|
-
v < 0 && (v = 11, c.value--),
|
|
922
|
+
let v = w.value - 1;
|
|
923
|
+
v < 0 && (v = 11, c.value--), g.value = x[v], j();
|
|
924
924
|
}, Oe = () => {
|
|
925
|
-
let v =
|
|
926
|
-
v > 11 && (v = 0, c.value++),
|
|
925
|
+
let v = w.value + 1;
|
|
926
|
+
v > 11 && (v = 0, c.value++), g.value = x[v], j();
|
|
927
927
|
}, ve = (v) => {
|
|
928
|
-
|
|
928
|
+
A.value && !A.value.contains(v.target) && o.value == !0 && pe();
|
|
929
929
|
}, j = () => {
|
|
930
930
|
let v = {};
|
|
931
|
-
const
|
|
931
|
+
const h = (u, Y, ae) => {
|
|
932
932
|
u instanceof Date && !isNaN(u) || (u = /* @__PURE__ */ new Date());
|
|
933
933
|
const Q = new Date(u);
|
|
934
934
|
return Q.setUTCHours(Y, ae, 0, 0), Q.toISOString();
|
|
935
935
|
};
|
|
936
|
-
e.range ? (v.from =
|
|
936
|
+
e.range ? (v.from = h(
|
|
937
937
|
s.value.start,
|
|
938
938
|
p.value.start,
|
|
939
|
-
|
|
940
|
-
), v.to =
|
|
939
|
+
y.value.start
|
|
940
|
+
), v.to = h(
|
|
941
941
|
s.value.end,
|
|
942
942
|
p.value.end,
|
|
943
|
-
|
|
944
|
-
)) : v =
|
|
943
|
+
y.value.end
|
|
944
|
+
)) : v = h(
|
|
945
945
|
s.value,
|
|
946
946
|
p.value,
|
|
947
|
-
|
|
947
|
+
y.value
|
|
948
948
|
), t("updated", v);
|
|
949
949
|
};
|
|
950
950
|
return G(() => {
|
|
951
951
|
e.initialDate && (e.range && e.initialDate.start && e.initialDate.end ? s.value = {
|
|
952
952
|
start: new Date(e.initialDate.start),
|
|
953
953
|
end: new Date(e.initialDate.end)
|
|
954
|
-
} : e.initialDate.start && (s.value = { start: new Date(e.initialDate.start) })), e.range ? (p.value.start = p.value.start ?? (/* @__PURE__ */ new Date()).getHours(), p.value.end = p.value.end ?? (/* @__PURE__ */ new Date()).getHours(),
|
|
955
|
-
}), e.popup && G(() => document.addEventListener("click", ve)), we(() => document.removeEventListener("click", ve)), (v,
|
|
954
|
+
} : e.initialDate.start && (s.value = { start: new Date(e.initialDate.start) })), e.range ? (p.value.start = p.value.start ?? (/* @__PURE__ */ new Date()).getHours(), p.value.end = p.value.end ?? (/* @__PURE__ */ new Date()).getHours(), y.value.start = y.value.start ?? (/* @__PURE__ */ new Date()).getMinutes(), y.value.end = y.value.end ?? (/* @__PURE__ */ new Date()).getMinutes()) : (p.value = p.value ?? (/* @__PURE__ */ new Date()).getHours(), y.value = y.value ?? (/* @__PURE__ */ new Date()).getMinutes());
|
|
955
|
+
}), e.popup && G(() => document.addEventListener("click", ve)), we(() => document.removeEventListener("click", ve)), (v, h) => (l(), a("div", {
|
|
956
956
|
class: "inline-block relative w-full lg:w-[360px]",
|
|
957
957
|
ref_key: "pickerContainer",
|
|
958
|
-
ref:
|
|
958
|
+
ref: A
|
|
959
959
|
}, [
|
|
960
960
|
n("div", {
|
|
961
961
|
class: "flex items-center gap-2 cursor-pointer",
|
|
@@ -969,9 +969,9 @@ const Qe = le("SunIcon", [
|
|
|
969
969
|
value: ne.value,
|
|
970
970
|
readonly: "",
|
|
971
971
|
id: q.value
|
|
972
|
-
}, null, 8,
|
|
973
|
-
n("button",
|
|
974
|
-
te(
|
|
972
|
+
}, null, 8, Pt),
|
|
973
|
+
n("button", zt, [
|
|
974
|
+
te(F(Ge))
|
|
975
975
|
])
|
|
976
976
|
], !0) : M("", !0)
|
|
977
977
|
]),
|
|
@@ -984,7 +984,7 @@ const Qe = le("SunIcon", [
|
|
|
984
984
|
n("button", {
|
|
985
985
|
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
986
986
|
onClick: Ve
|
|
987
|
-
},
|
|
987
|
+
}, h[11] || (h[11] = [
|
|
988
988
|
n("svg", {
|
|
989
989
|
xmlns: "http://www.w3.org/2000/svg",
|
|
990
990
|
class: "w-4 h-4",
|
|
@@ -1000,24 +1000,24 @@ const Qe = le("SunIcon", [
|
|
|
1000
1000
|
})
|
|
1001
1001
|
], -1)
|
|
1002
1002
|
])),
|
|
1003
|
-
|
|
1003
|
+
R(n("select", {
|
|
1004
1004
|
class: "border-none w-fit select",
|
|
1005
|
-
"onUpdate:modelValue":
|
|
1005
|
+
"onUpdate:modelValue": h[0] || (h[0] = (u) => g.value = u),
|
|
1006
1006
|
onChange: j
|
|
1007
1007
|
}, [
|
|
1008
|
-
(l(), a(I, null, V(
|
|
1008
|
+
(l(), a(I, null, V(x, (u, Y) => n("option", {
|
|
1009
1009
|
key: Y,
|
|
1010
1010
|
value: u
|
|
1011
1011
|
}, S(u), 9, Et)), 64))
|
|
1012
1012
|
], 544), [
|
|
1013
|
-
[J,
|
|
1013
|
+
[J, g.value]
|
|
1014
1014
|
]),
|
|
1015
|
-
|
|
1015
|
+
R(n("select", {
|
|
1016
1016
|
class: "border-none w-24 select",
|
|
1017
|
-
"onUpdate:modelValue":
|
|
1017
|
+
"onUpdate:modelValue": h[1] || (h[1] = (u) => c.value = u),
|
|
1018
1018
|
onChange: j
|
|
1019
1019
|
}, [
|
|
1020
|
-
(l(!0), a(I, null, V(
|
|
1020
|
+
(l(!0), a(I, null, V(U.value, (u) => (l(), a("option", {
|
|
1021
1021
|
key: u,
|
|
1022
1022
|
value: u
|
|
1023
1023
|
}, S(u), 9, Ut))), 128))
|
|
@@ -1027,7 +1027,7 @@ const Qe = le("SunIcon", [
|
|
|
1027
1027
|
n("button", {
|
|
1028
1028
|
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
1029
1029
|
onClick: Oe
|
|
1030
|
-
},
|
|
1030
|
+
}, h[12] || (h[12] = [
|
|
1031
1031
|
n("svg", {
|
|
1032
1032
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1033
1033
|
class: "w-4 h-4",
|
|
@@ -1045,11 +1045,11 @@ const Qe = le("SunIcon", [
|
|
|
1045
1045
|
]))
|
|
1046
1046
|
])) : M("", !0),
|
|
1047
1047
|
m.value ? (l(), a("div", jt, [
|
|
1048
|
-
(l(), a(I, null, V(
|
|
1048
|
+
(l(), a(I, null, V(_, (u) => n("div", {
|
|
1049
1049
|
key: u,
|
|
1050
1050
|
class: "text-center"
|
|
1051
1051
|
}, S(u), 1)), 64)),
|
|
1052
|
-
(l(!0), a(I, null, V(
|
|
1052
|
+
(l(!0), a(I, null, V(z.value, (u) => (l(), a("div", {
|
|
1053
1053
|
key: u,
|
|
1054
1054
|
class: "text-center"
|
|
1055
1055
|
}))), 128)),
|
|
@@ -1063,28 +1063,28 @@ const Qe = le("SunIcon", [
|
|
|
1063
1063
|
"in-range bg-primary/20 hover:bg-primary/10": Te(u)
|
|
1064
1064
|
}]),
|
|
1065
1065
|
onClick: (Y) => Se(u)
|
|
1066
|
-
}, S(u.getDate()), 11,
|
|
1066
|
+
}, S(u.getDate()), 11, Rt))), 128))
|
|
1067
1067
|
])) : M("", !0),
|
|
1068
|
-
b.value ? (l(), a("div",
|
|
1068
|
+
b.value ? (l(), a("div", Ft, [
|
|
1069
1069
|
e.range ? M("", !0) : (l(), a("h3", Nt, "Select Time")),
|
|
1070
1070
|
e.range ? (l(), a("div", Yt, [
|
|
1071
1071
|
n("div", null, [
|
|
1072
|
-
|
|
1073
|
-
W.value ?
|
|
1072
|
+
h[13] || (h[13] = n("p", { class: "font-bold" }, "Start Time", -1)),
|
|
1073
|
+
W.value ? R((l(), a("input", {
|
|
1074
1074
|
key: 0,
|
|
1075
1075
|
type: "time",
|
|
1076
1076
|
class: "input-bordered w-full input",
|
|
1077
|
-
"onUpdate:modelValue":
|
|
1077
|
+
"onUpdate:modelValue": h[5] || (h[5] = (u) => r.value.start = u),
|
|
1078
1078
|
onChange: j
|
|
1079
1079
|
}, null, 544)), [
|
|
1080
1080
|
[ee, r.value.start]
|
|
1081
1081
|
]) : (l(), a("div", Jt, [
|
|
1082
|
-
|
|
1082
|
+
R(n("select", {
|
|
1083
1083
|
class: "w-full select-bordered select",
|
|
1084
|
-
"onUpdate:modelValue":
|
|
1084
|
+
"onUpdate:modelValue": h[6] || (h[6] = (u) => p.value.start = u),
|
|
1085
1085
|
onChange: j
|
|
1086
1086
|
}, [
|
|
1087
|
-
(l(!0), a(I, null, V(
|
|
1087
|
+
(l(!0), a(I, null, V(F(H), (u) => (l(), a("option", {
|
|
1088
1088
|
key: u,
|
|
1089
1089
|
value: u
|
|
1090
1090
|
}, S(u.toString().padStart(2, "0")), 9, Gt))), 128))
|
|
@@ -1096,19 +1096,19 @@ const Qe = le("SunIcon", [
|
|
|
1096
1096
|
{ number: !0 }
|
|
1097
1097
|
]
|
|
1098
1098
|
]),
|
|
1099
|
-
|
|
1099
|
+
R(n("select", {
|
|
1100
1100
|
class: "w-full select-bordered select",
|
|
1101
|
-
"onUpdate:modelValue":
|
|
1101
|
+
"onUpdate:modelValue": h[7] || (h[7] = (u) => y.value.start = u),
|
|
1102
1102
|
onChange: j
|
|
1103
1103
|
}, [
|
|
1104
|
-
(l(!0), a(I, null, V(
|
|
1104
|
+
(l(!0), a(I, null, V(F(K), (u) => (l(), a("option", {
|
|
1105
1105
|
key: u,
|
|
1106
1106
|
value: u
|
|
1107
1107
|
}, S(u.toString().padStart(2, "0")), 9, Xt))), 128))
|
|
1108
1108
|
], 544), [
|
|
1109
1109
|
[
|
|
1110
1110
|
J,
|
|
1111
|
-
|
|
1111
|
+
y.value.start,
|
|
1112
1112
|
void 0,
|
|
1113
1113
|
{ number: !0 }
|
|
1114
1114
|
]
|
|
@@ -1116,22 +1116,22 @@ const Qe = le("SunIcon", [
|
|
|
1116
1116
|
]))
|
|
1117
1117
|
]),
|
|
1118
1118
|
n("div", null, [
|
|
1119
|
-
|
|
1120
|
-
W.value ?
|
|
1119
|
+
h[14] || (h[14] = n("p", { class: "font-bold" }, "End Time", -1)),
|
|
1120
|
+
W.value ? R((l(), a("input", {
|
|
1121
1121
|
key: 0,
|
|
1122
1122
|
type: "time",
|
|
1123
1123
|
class: "input-bordered w-full input",
|
|
1124
|
-
"onUpdate:modelValue":
|
|
1124
|
+
"onUpdate:modelValue": h[8] || (h[8] = (u) => r.value.end = u),
|
|
1125
1125
|
onChange: j
|
|
1126
1126
|
}, null, 544)), [
|
|
1127
1127
|
[ee, r.value.end]
|
|
1128
1128
|
]) : (l(), a("div", Zt, [
|
|
1129
|
-
|
|
1129
|
+
R(n("select", {
|
|
1130
1130
|
class: "w-full select-bordered select",
|
|
1131
|
-
"onUpdate:modelValue":
|
|
1131
|
+
"onUpdate:modelValue": h[9] || (h[9] = (u) => p.value.end = u),
|
|
1132
1132
|
onChange: j
|
|
1133
1133
|
}, [
|
|
1134
|
-
(l(!0), a(I, null, V(
|
|
1134
|
+
(l(!0), a(I, null, V(F(H), (u) => (l(), a("option", {
|
|
1135
1135
|
key: u,
|
|
1136
1136
|
value: u
|
|
1137
1137
|
}, S(u.toString().padStart(2, "0")), 9, Qt))), 128))
|
|
@@ -1143,19 +1143,19 @@ const Qe = le("SunIcon", [
|
|
|
1143
1143
|
{ number: !0 }
|
|
1144
1144
|
]
|
|
1145
1145
|
]),
|
|
1146
|
-
|
|
1146
|
+
R(n("select", {
|
|
1147
1147
|
class: "w-full select-bordered select",
|
|
1148
|
-
"onUpdate:modelValue":
|
|
1148
|
+
"onUpdate:modelValue": h[10] || (h[10] = (u) => y.value.end = u),
|
|
1149
1149
|
onChange: j
|
|
1150
1150
|
}, [
|
|
1151
|
-
(l(!0), a(I, null, V(
|
|
1151
|
+
(l(!0), a(I, null, V(F(K), (u) => (l(), a("option", {
|
|
1152
1152
|
key: u,
|
|
1153
1153
|
value: u
|
|
1154
1154
|
}, S(u.toString().padStart(2, "0")), 9, el))), 128))
|
|
1155
1155
|
], 544), [
|
|
1156
1156
|
[
|
|
1157
1157
|
J,
|
|
1158
|
-
|
|
1158
|
+
y.value.end,
|
|
1159
1159
|
void 0,
|
|
1160
1160
|
{ number: !0 }
|
|
1161
1161
|
]
|
|
@@ -1163,21 +1163,21 @@ const Qe = le("SunIcon", [
|
|
|
1163
1163
|
]))
|
|
1164
1164
|
])
|
|
1165
1165
|
])) : (l(), a("div", qt, [
|
|
1166
|
-
W.value ?
|
|
1166
|
+
W.value ? R((l(), a("input", {
|
|
1167
1167
|
key: 0,
|
|
1168
1168
|
type: "time",
|
|
1169
1169
|
class: "input-bordered w-full input",
|
|
1170
|
-
"onUpdate:modelValue":
|
|
1170
|
+
"onUpdate:modelValue": h[2] || (h[2] = (u) => r.value = u),
|
|
1171
1171
|
onChange: j
|
|
1172
1172
|
}, null, 544)), [
|
|
1173
1173
|
[ee, r.value]
|
|
1174
1174
|
]) : (l(), a("div", Ht, [
|
|
1175
|
-
|
|
1175
|
+
R(n("select", {
|
|
1176
1176
|
class: "w-full select-bordered select",
|
|
1177
|
-
"onUpdate:modelValue":
|
|
1177
|
+
"onUpdate:modelValue": h[3] || (h[3] = (u) => p.value = u),
|
|
1178
1178
|
onChange: j
|
|
1179
1179
|
}, [
|
|
1180
|
-
(l(!0), a(I, null, V(
|
|
1180
|
+
(l(!0), a(I, null, V(F(H), (u) => (l(), a("option", {
|
|
1181
1181
|
key: u,
|
|
1182
1182
|
value: u
|
|
1183
1183
|
}, S(u.toString().padStart(2, "0")), 9, Wt))), 128))
|
|
@@ -1189,19 +1189,19 @@ const Qe = le("SunIcon", [
|
|
|
1189
1189
|
{ number: !0 }
|
|
1190
1190
|
]
|
|
1191
1191
|
]),
|
|
1192
|
-
|
|
1192
|
+
R(n("select", {
|
|
1193
1193
|
class: "w-full select-bordered select",
|
|
1194
|
-
"onUpdate:modelValue":
|
|
1194
|
+
"onUpdate:modelValue": h[4] || (h[4] = (u) => y.value = u),
|
|
1195
1195
|
onChange: j
|
|
1196
1196
|
}, [
|
|
1197
|
-
(l(!0), a(I, null, V(
|
|
1197
|
+
(l(!0), a(I, null, V(F(K), (u) => (l(), a("option", {
|
|
1198
1198
|
key: u,
|
|
1199
1199
|
value: u
|
|
1200
1200
|
}, S(u.toString().padStart(2, "0")), 9, Kt))), 128))
|
|
1201
1201
|
], 544), [
|
|
1202
1202
|
[
|
|
1203
1203
|
J,
|
|
1204
|
-
|
|
1204
|
+
y.value,
|
|
1205
1205
|
void 0,
|
|
1206
1206
|
{ number: !0 }
|
|
1207
1207
|
]
|
|
@@ -1220,13 +1220,13 @@ const Qe = le("SunIcon", [
|
|
|
1220
1220
|
onClick: pe
|
|
1221
1221
|
}, "Close")) : M("", !0)
|
|
1222
1222
|
])
|
|
1223
|
-
], 10,
|
|
1223
|
+
], 10, At)) : M("", !0)
|
|
1224
1224
|
], 512));
|
|
1225
1225
|
}
|
|
1226
1226
|
}, nl = /* @__PURE__ */ X(ll, [["__scopeId", "data-v-488ecabe"]]), al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1227
1227
|
__proto__: null,
|
|
1228
1228
|
default: nl
|
|
1229
|
-
}, Symbol.toStringTag, { value: "Module" })), ol = ["value", "checked", "onChange", "disabled"], yn = /* @__PURE__ */
|
|
1229
|
+
}, Symbol.toStringTag, { value: "Module" })), ol = ["value", "checked", "onChange", "disabled"], yn = /* @__PURE__ */ P({
|
|
1230
1230
|
__name: "rating",
|
|
1231
1231
|
props: {
|
|
1232
1232
|
initialRating: { default: 0 },
|
|
@@ -1236,7 +1236,7 @@ const Qe = le("SunIcon", [
|
|
|
1236
1236
|
size: { default: "sm" }
|
|
1237
1237
|
},
|
|
1238
1238
|
setup(i) {
|
|
1239
|
-
const d = i, e =
|
|
1239
|
+
const d = i, e = $(d.initialRating);
|
|
1240
1240
|
N(
|
|
1241
1241
|
() => d.initialRating,
|
|
1242
1242
|
(o) => {
|
|
@@ -1257,7 +1257,7 @@ const Qe = le("SunIcon", [
|
|
|
1257
1257
|
type: "radio",
|
|
1258
1258
|
value: o.halfStars ? r * 0.5 : r,
|
|
1259
1259
|
checked: e.value === (o.halfStars ? r * 0.5 : r),
|
|
1260
|
-
onChange: (
|
|
1260
|
+
onChange: (g) => o.isInteractive ? t(o.halfStars ? r * 0.5 : r) : null,
|
|
1261
1261
|
class: C(["mask mask-star", {
|
|
1262
1262
|
"bg-yellow-400": e.value >= (o.halfStars ? r * 0.5 : r),
|
|
1263
1263
|
"mask-half-1": o.halfStars && r % 2 !== 0,
|
|
@@ -1269,7 +1269,7 @@ const Qe = le("SunIcon", [
|
|
|
1269
1269
|
}, null, 42, ol))), 128))
|
|
1270
1270
|
], 2));
|
|
1271
1271
|
}
|
|
1272
|
-
}), sl = { class: "badge" }, rl = ["onClick"], il = { class: "opacity-75" }, ul = ["placeholder"], wn = /* @__PURE__ */
|
|
1272
|
+
}), sl = { class: "badge" }, rl = ["onClick"], il = { class: "opacity-75" }, ul = ["placeholder"], wn = /* @__PURE__ */ P({
|
|
1273
1273
|
__name: "taginput",
|
|
1274
1274
|
props: {
|
|
1275
1275
|
modelValue: {},
|
|
@@ -1279,15 +1279,15 @@ const Qe = le("SunIcon", [
|
|
|
1279
1279
|
},
|
|
1280
1280
|
emits: ["update:modelValue"],
|
|
1281
1281
|
setup(i, { emit: d }) {
|
|
1282
|
-
const e = i, t = d, o =
|
|
1283
|
-
const f =
|
|
1284
|
-
f && !o.value.includes(f) && (o.value.push(f), t("update:modelValue", o.value),
|
|
1285
|
-
},
|
|
1282
|
+
const e = i, t = d, o = $([...e.modelValue]), s = e.maxTagAmount === void 0 ? -1 : e.maxTagAmount, r = $(null), g = $(""), c = B(() => s < 0 || o.value.length < s), p = () => {
|
|
1283
|
+
const f = g.value.trim();
|
|
1284
|
+
f && !o.value.includes(f) && (o.value.push(f), t("update:modelValue", o.value), g.value = "");
|
|
1285
|
+
}, y = (f) => {
|
|
1286
1286
|
o.value = o.value.filter((m) => m !== f), t("update:modelValue", o.value);
|
|
1287
|
-
},
|
|
1288
|
-
|
|
1287
|
+
}, A = () => {
|
|
1288
|
+
g.value === "" && (o.value.pop(), t("update:modelValue", o.value));
|
|
1289
1289
|
}, q = (f) => {
|
|
1290
|
-
f.key === "Enter" ? p() : f.key === "Backspace" &&
|
|
1290
|
+
f.key === "Enter" ? p() : f.key === "Backspace" && g.value === "" && A();
|
|
1291
1291
|
};
|
|
1292
1292
|
return N(() => e.modelValue, (f) => {
|
|
1293
1293
|
o.value = [...f];
|
|
@@ -1301,25 +1301,25 @@ const Qe = le("SunIcon", [
|
|
|
1301
1301
|
n("div", sl, [
|
|
1302
1302
|
n("button", {
|
|
1303
1303
|
class: "!px-1 !py-0 h-fit font-bold cursor-pointer",
|
|
1304
|
-
onClick: (
|
|
1304
|
+
onClick: (w) => y(b),
|
|
1305
1305
|
"aria-label": "Remove tag"
|
|
1306
1306
|
}, "X", 8, rl),
|
|
1307
1307
|
n("span", il, S(b), 1)
|
|
1308
1308
|
])
|
|
1309
1309
|
])), 128)),
|
|
1310
1310
|
D(f.$slots, "input", { showInput: c.value }, () => [
|
|
1311
|
-
c.value ?
|
|
1311
|
+
c.value ? R((l(), a("input", {
|
|
1312
1312
|
key: 0,
|
|
1313
1313
|
ref_key: "inputRef",
|
|
1314
1314
|
ref: r,
|
|
1315
|
-
"onUpdate:modelValue": m[0] || (m[0] = (b) =>
|
|
1315
|
+
"onUpdate:modelValue": m[0] || (m[0] = (b) => g.value = b),
|
|
1316
1316
|
type: "text",
|
|
1317
1317
|
placeholder: f.placeholder || "Type here",
|
|
1318
1318
|
class: "h-full input input-ghost",
|
|
1319
1319
|
onKeydown: q,
|
|
1320
1320
|
"aria-label": "Add tags"
|
|
1321
1321
|
}, null, 40, ul)), [
|
|
1322
|
-
[ee,
|
|
1322
|
+
[ee, g.value]
|
|
1323
1323
|
]) : M("", !0)
|
|
1324
1324
|
])
|
|
1325
1325
|
], 2));
|
|
@@ -1332,7 +1332,7 @@ const Qe = le("SunIcon", [
|
|
|
1332
1332
|
value: "",
|
|
1333
1333
|
disabled: "",
|
|
1334
1334
|
selected: ""
|
|
1335
|
-
}, ml = ["value"], kn = /* @__PURE__ */
|
|
1335
|
+
}, ml = ["value"], kn = /* @__PURE__ */ P({
|
|
1336
1336
|
__name: "select",
|
|
1337
1337
|
props: {
|
|
1338
1338
|
options: {},
|
|
@@ -1343,7 +1343,7 @@ const Qe = le("SunIcon", [
|
|
|
1343
1343
|
emits: ["update:modelValue"],
|
|
1344
1344
|
setup(i, { expose: d, emit: e }) {
|
|
1345
1345
|
console.log(i.placeholder);
|
|
1346
|
-
const o = e, s =
|
|
1346
|
+
const o = e, s = $(null), r = (c) => {
|
|
1347
1347
|
const p = c.target;
|
|
1348
1348
|
o("update:modelValue", p.value);
|
|
1349
1349
|
};
|
|
@@ -1366,17 +1366,17 @@ const Qe = le("SunIcon", [
|
|
|
1366
1366
|
onChange: r
|
|
1367
1367
|
}, [
|
|
1368
1368
|
c.placeholder ? (l(), a("option", fl, S(c.placeholder), 1)) : M("", !0),
|
|
1369
|
-
(l(!0), a(I, null, V(c.options, (
|
|
1370
|
-
key:
|
|
1371
|
-
value:
|
|
1372
|
-
}, S(
|
|
1369
|
+
(l(!0), a(I, null, V(c.options, (y) => (l(), a("option", {
|
|
1370
|
+
key: y.value,
|
|
1371
|
+
value: y.value
|
|
1372
|
+
}, S(y.text), 9, ml))), 128))
|
|
1373
1373
|
], 40, vl)
|
|
1374
1374
|
]));
|
|
1375
1375
|
}
|
|
1376
|
-
}),
|
|
1376
|
+
}), hl = {
|
|
1377
1377
|
key: 0,
|
|
1378
1378
|
class: "label"
|
|
1379
|
-
},
|
|
1379
|
+
}, gl = { class: "label-text" }, bl = ["onKeydown", "aria-expanded", "aria-activedescendant"], yl = ["placeholder"], wl = {
|
|
1380
1380
|
class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
|
|
1381
1381
|
role: "listbox"
|
|
1382
1382
|
}, kl = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, $l = ["onMousedown", "id", "aria-selected"], $n = {
|
|
@@ -1407,90 +1407,87 @@ const Qe = le("SunIcon", [
|
|
|
1407
1407
|
emits: ["update:modelValue", "select"],
|
|
1408
1408
|
setup(i, { expose: d, emit: e }) {
|
|
1409
1409
|
const t = i, o = e, s = Ee(), r = B(() => {
|
|
1410
|
-
const
|
|
1411
|
-
return console.log("hasDefaultSlotContent computed:",
|
|
1412
|
-
}),
|
|
1410
|
+
const U = (s.default ? s.default() : []).filter((O) => O.type !== Ue);
|
|
1411
|
+
return console.log("hasDefaultSlotContent computed:", U.length > 0), U.length > 0;
|
|
1412
|
+
}), g = $(""), c = $(null), p = $(!1), y = $(null), A = $(null), q = $(null), f = $(null), m = () => {
|
|
1413
1413
|
console.log("openDropdown called"), p.value = !0;
|
|
1414
1414
|
}, b = () => {
|
|
1415
|
-
console.log("closeDropdown called"), p.value = !1, f.value = null, r.value || (c.value &&
|
|
1416
|
-
},
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
const k = h.value.toLowerCase(), L = k === "" && !p.value ? [] : t.options.filter(
|
|
1423
|
-
(O) => O.text.toLowerCase().includes(k)
|
|
1415
|
+
console.log("closeDropdown called"), p.value = !1, f.value = null, r.value || (c.value && g.value !== c.value.text ? g.value = c.value.text : c.value || (g.value = ""));
|
|
1416
|
+
}, w = () => {
|
|
1417
|
+
p.value ? b() : m();
|
|
1418
|
+
}, _ = B(() => {
|
|
1419
|
+
const x = g.value.toLowerCase();
|
|
1420
|
+
return x === "" && !p.value ? [] : t.options.filter(
|
|
1421
|
+
(O) => O.text.toLowerCase().includes(x)
|
|
1424
1422
|
);
|
|
1425
|
-
return console.log("filteredOptions computed:", L.length, "options"), L;
|
|
1426
1423
|
});
|
|
1427
1424
|
N(
|
|
1428
1425
|
() => t.modelValue,
|
|
1429
|
-
(
|
|
1430
|
-
if (
|
|
1431
|
-
c.value = null, !p.value && !r.value && (
|
|
1426
|
+
(x, U) => {
|
|
1427
|
+
if (x !== U && b(), x == null)
|
|
1428
|
+
c.value = null, !p.value && !r.value && (g.value = "");
|
|
1432
1429
|
else {
|
|
1433
|
-
const O = t.options.find((
|
|
1434
|
-
O ? (c.value = O, !p.value && !r.value && (
|
|
1430
|
+
const O = t.options.find((L) => L.value === x);
|
|
1431
|
+
O ? (c.value = O, !p.value && !r.value && (g.value = O.text)) : (c.value = null, !p.value && !r.value && (g.value = ""));
|
|
1435
1432
|
}
|
|
1436
1433
|
},
|
|
1437
1434
|
{ immediate: !0 }
|
|
1438
1435
|
// Run immediately on component mount
|
|
1439
1436
|
);
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1437
|
+
const k = (x) => {
|
|
1438
|
+
A.value && !A.value.contains(x.target) && b();
|
|
1442
1439
|
}, T = () => {
|
|
1443
|
-
|
|
1444
|
-
|
|
1440
|
+
setTimeout(() => {
|
|
1441
|
+
A.value && !A.value.contains(document.activeElement) && b();
|
|
1445
1442
|
}, 100);
|
|
1446
1443
|
};
|
|
1447
|
-
N(p, (
|
|
1448
|
-
|
|
1449
|
-
document.addEventListener("click",
|
|
1450
|
-
}, 0) : document.removeEventListener("click",
|
|
1444
|
+
N(p, (x) => {
|
|
1445
|
+
x ? setTimeout(() => {
|
|
1446
|
+
document.addEventListener("click", k);
|
|
1447
|
+
}, 0) : document.removeEventListener("click", k);
|
|
1451
1448
|
}), ie(() => {
|
|
1452
|
-
document.removeEventListener("click",
|
|
1449
|
+
document.removeEventListener("click", k), window.removeEventListener("keydown", W);
|
|
1453
1450
|
});
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1451
|
+
const z = (x) => {
|
|
1452
|
+
c.value = x, r.value || (g.value = x.text), o("update:modelValue", x.value), o("select", x);
|
|
1456
1453
|
}, H = () => {
|
|
1457
|
-
|
|
1454
|
+
_.value.length > 0 && z(_.value[0]);
|
|
1458
1455
|
}, K = () => {
|
|
1459
1456
|
p.value || m();
|
|
1460
|
-
}, W = (
|
|
1461
|
-
if (!p.value ||
|
|
1462
|
-
const
|
|
1463
|
-
(
|
|
1457
|
+
}, W = (x) => {
|
|
1458
|
+
if (!p.value || _.value.length === 0) return;
|
|
1459
|
+
const U = _.value.findIndex(
|
|
1460
|
+
(L, E) => "option-" + E === f.value
|
|
1464
1461
|
);
|
|
1465
1462
|
let O = -1;
|
|
1466
|
-
if (
|
|
1467
|
-
|
|
1468
|
-
else if (
|
|
1469
|
-
|
|
1470
|
-
else if (
|
|
1471
|
-
|
|
1472
|
-
const
|
|
1473
|
-
(
|
|
1463
|
+
if (x.key === "ArrowDown")
|
|
1464
|
+
x.preventDefault(), O = (U + 1) % _.value.length;
|
|
1465
|
+
else if (x.key === "ArrowUp")
|
|
1466
|
+
x.preventDefault(), O = (U - 1 + _.value.length) % _.value.length;
|
|
1467
|
+
else if (x.key === "Enter" && f.value) {
|
|
1468
|
+
x.preventDefault();
|
|
1469
|
+
const L = _.value.find(
|
|
1470
|
+
(E, Z) => "option-" + Z === f.value
|
|
1474
1471
|
);
|
|
1475
|
-
|
|
1472
|
+
L && z(L);
|
|
1476
1473
|
return;
|
|
1477
|
-
} else if (
|
|
1478
|
-
|
|
1474
|
+
} else if (x.key === "Escape") {
|
|
1475
|
+
x.preventDefault(), b(), q.value && q.value.focus();
|
|
1479
1476
|
return;
|
|
1480
1477
|
} else if (r.value)
|
|
1481
1478
|
return;
|
|
1482
1479
|
if (O !== -1) {
|
|
1483
1480
|
f.value = "option-" + O;
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1486
|
-
|
|
1481
|
+
const L = document.getElementById(f.value);
|
|
1482
|
+
L && requestAnimationFrame(() => {
|
|
1483
|
+
L.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
1487
1484
|
});
|
|
1488
1485
|
}
|
|
1489
1486
|
};
|
|
1490
|
-
return N(p, (
|
|
1491
|
-
|
|
1487
|
+
return N(p, (x) => {
|
|
1488
|
+
x ? (window.addEventListener("keydown", W), !r.value && !g.value && c.value && (g.value = c.value.text)) : (console.log("Removing window keydown listener"), window.removeEventListener("keydown", W));
|
|
1492
1489
|
}), ie(() => {
|
|
1493
|
-
document.removeEventListener("click",
|
|
1490
|
+
document.removeEventListener("click", k), window.removeEventListener("keydown", W);
|
|
1494
1491
|
}), d({
|
|
1495
1492
|
isDropdownOpen: p,
|
|
1496
1493
|
// Expose state
|
|
@@ -1500,27 +1497,26 @@ const Qe = le("SunIcon", [
|
|
|
1500
1497
|
// Expose method to open
|
|
1501
1498
|
closeDropdown: b,
|
|
1502
1499
|
// Expose method to close
|
|
1503
|
-
toggleDropdown:
|
|
1500
|
+
toggleDropdown: w,
|
|
1504
1501
|
// Expose method to toggle
|
|
1505
|
-
selectItem:
|
|
1502
|
+
selectItem: z,
|
|
1506
1503
|
// Expose method to select an item programmatically
|
|
1507
|
-
filterText:
|
|
1504
|
+
filterText: g,
|
|
1508
1505
|
// Expose filter text (useful if parent controls filtering)
|
|
1509
1506
|
hasDefaultSlotContent: r
|
|
1510
1507
|
// Expose to know if the default slot is used
|
|
1511
|
-
}), (
|
|
1508
|
+
}), (x, U) => (l(), a("div", {
|
|
1512
1509
|
class: "relative w-full max-w-xs form-control",
|
|
1513
1510
|
ref_key: "componentRoot",
|
|
1514
|
-
ref:
|
|
1511
|
+
ref: A
|
|
1515
1512
|
}, [
|
|
1516
|
-
i.label ? (l(), a("label",
|
|
1517
|
-
n("span",
|
|
1513
|
+
i.label ? (l(), a("label", hl, [
|
|
1514
|
+
n("span", gl, S(i.label), 1)
|
|
1518
1515
|
])) : M("", !0),
|
|
1519
1516
|
n("div", {
|
|
1520
1517
|
class: C(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !r.value, select: !r.value }]),
|
|
1521
1518
|
tabindex: "0",
|
|
1522
|
-
|
|
1523
|
-
onClick: y,
|
|
1519
|
+
onClick: m,
|
|
1524
1520
|
onKeydown: [
|
|
1525
1521
|
be(se(H, ["prevent"]), ["enter"]),
|
|
1526
1522
|
be(se(H, ["prevent"]), ["space"])
|
|
@@ -1534,34 +1530,35 @@ const Qe = le("SunIcon", [
|
|
|
1534
1530
|
ref_key: "activatorWrapper",
|
|
1535
1531
|
ref: q
|
|
1536
1532
|
}, [
|
|
1537
|
-
D(
|
|
1538
|
-
r.value ? M("", !0) :
|
|
1533
|
+
D(x.$slots, "default", {}, () => [
|
|
1534
|
+
r.value ? M("", !0) : R((l(), a("input", {
|
|
1539
1535
|
key: 0,
|
|
1540
1536
|
type: "text",
|
|
1541
1537
|
placeholder: i.placeholder,
|
|
1542
1538
|
class: "bg-transparent border-none focus:outline-none w-full",
|
|
1543
|
-
"onUpdate:modelValue":
|
|
1539
|
+
"onUpdate:modelValue": U[0] || (U[0] = (O) => g.value = O),
|
|
1544
1540
|
ref_key: "filterInput",
|
|
1545
|
-
ref:
|
|
1541
|
+
ref: y,
|
|
1542
|
+
onFocus: m,
|
|
1546
1543
|
onInput: K,
|
|
1547
1544
|
tabindex: "-1"
|
|
1548
1545
|
}, null, 40, yl)), [
|
|
1549
|
-
[ee,
|
|
1546
|
+
[ee, g.value]
|
|
1550
1547
|
])
|
|
1551
1548
|
]),
|
|
1552
|
-
r.value ? (l(), ue(
|
|
1549
|
+
r.value ? (l(), ue(F(Xe), {
|
|
1553
1550
|
key: 0,
|
|
1554
1551
|
class: C({ "rotate-180": p.value }),
|
|
1555
1552
|
size: 20
|
|
1556
1553
|
}, null, 8, ["class"])) : M("", !0)
|
|
1557
1554
|
], 42, bl),
|
|
1558
|
-
|
|
1555
|
+
R(n("div", wl, [
|
|
1559
1556
|
n("ul", kl, [
|
|
1560
|
-
(l(!0), a(I, null, V(
|
|
1557
|
+
(l(!0), a(I, null, V(_.value, (O, L) => (l(), a("li", {
|
|
1561
1558
|
key: O.value,
|
|
1562
|
-
onMousedown: se((
|
|
1559
|
+
onMousedown: se((E) => z(O), ["prevent"]),
|
|
1563
1560
|
class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
|
|
1564
|
-
id: "option-" +
|
|
1561
|
+
id: "option-" + L,
|
|
1565
1562
|
role: "option",
|
|
1566
1563
|
"aria-selected": c.value && c.value.value === O.value
|
|
1567
1564
|
}, [
|
|
@@ -1569,7 +1566,7 @@ const Qe = le("SunIcon", [
|
|
|
1569
1566
|
], 40, $l))), 128))
|
|
1570
1567
|
])
|
|
1571
1568
|
], 512), [
|
|
1572
|
-
[je, p.value &&
|
|
1569
|
+
[je, p.value && _.value.length > 0]
|
|
1573
1570
|
])
|
|
1574
1571
|
], 512));
|
|
1575
1572
|
}
|
|
@@ -1582,7 +1579,7 @@ const Qe = le("SunIcon", [
|
|
|
1582
1579
|
}, Il = { class: "label-text-alt text-error validator-hint" }, Ml = {
|
|
1583
1580
|
key: 2,
|
|
1584
1581
|
class: "label"
|
|
1585
|
-
}, Tl = { class: "label-text-alt text-success validator-hint" }, _n = /* @__PURE__ */
|
|
1582
|
+
}, Tl = { class: "label-text-alt text-success validator-hint" }, _n = /* @__PURE__ */ P({
|
|
1586
1583
|
__name: "inputField",
|
|
1587
1584
|
props: {
|
|
1588
1585
|
modelValue: { default: "" },
|
|
@@ -1597,15 +1594,15 @@ const Qe = le("SunIcon", [
|
|
|
1597
1594
|
},
|
|
1598
1595
|
emits: ["update:modelValue", "validate"],
|
|
1599
1596
|
setup(i, { expose: d, emit: e }) {
|
|
1600
|
-
const t = i, o = e, s =
|
|
1601
|
-
var
|
|
1597
|
+
const t = i, o = e, s = $(null), r = $(!1), g = $(""), c = B(() => {
|
|
1598
|
+
var w, _, k, T;
|
|
1602
1599
|
let f = !0, m = "";
|
|
1603
1600
|
const b = t.modelValue;
|
|
1604
|
-
return (
|
|
1605
|
-
}), p = B(() => r.value && !c.value),
|
|
1601
|
+
return (w = t.rules) != null && w.required && (b == null || b === "") && (f = !1, m = "This field is required."), f && ((_ = t.rules) == null ? void 0 : _.minLength) !== void 0 && typeof b == "string" && b.length < t.rules.minLength && (f = !1, m = `Must be at least ${t.rules.minLength} characters.`), f && ((k = t.rules) == null ? void 0 : k.maxLength) !== void 0 && typeof b == "string" && b.length > t.rules.maxLength && (f = !1, m = `Cannot exceed ${t.rules.maxLength} characters.`), f && ((T = t.rules) != null && T.email) && typeof b == "string" && b && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b) || (f = !1, m = "Please enter a valid email address.")), g.value = m, o("validate", f), f;
|
|
1602
|
+
}), p = B(() => r.value && !c.value), y = (f) => {
|
|
1606
1603
|
const m = f.target;
|
|
1607
1604
|
o("update:modelValue", m.value), r.value && c.value;
|
|
1608
|
-
},
|
|
1605
|
+
}, A = () => {
|
|
1609
1606
|
r.value = !0, c.value;
|
|
1610
1607
|
};
|
|
1611
1608
|
return N(
|
|
@@ -1620,7 +1617,7 @@ const Qe = le("SunIcon", [
|
|
|
1620
1617
|
},
|
|
1621
1618
|
isValid: c,
|
|
1622
1619
|
isTouched: r,
|
|
1623
|
-
errorMessage:
|
|
1620
|
+
errorMessage: g
|
|
1624
1621
|
}), (f, m) => (l(), a("div", _l, [
|
|
1625
1622
|
f.label ? (l(), a("label", xl, [
|
|
1626
1623
|
n("span", Sl, S(f.label), 1)
|
|
@@ -1656,17 +1653,17 @@ const Qe = le("SunIcon", [
|
|
|
1656
1653
|
//'input-success': isValid && isTouched, // Apply success style if valid and touched
|
|
1657
1654
|
}]),
|
|
1658
1655
|
value: f.modelValue,
|
|
1659
|
-
onInput:
|
|
1660
|
-
onBlur:
|
|
1656
|
+
onInput: y,
|
|
1657
|
+
onBlur: A
|
|
1661
1658
|
}, null, 42, Cl),
|
|
1662
1659
|
p.value ? (l(), a("div", Dl, [
|
|
1663
|
-
n("span", Il, S(
|
|
1660
|
+
n("span", Il, S(g.value), 1)
|
|
1664
1661
|
])) : c.value && r.value && f.successMessage ? (l(), a("div", Ml, [
|
|
1665
1662
|
n("span", Tl, S(f.successMessage), 1)
|
|
1666
1663
|
])) : M("", !0)
|
|
1667
1664
|
]));
|
|
1668
1665
|
}
|
|
1669
|
-
}), xn = /* @__PURE__ */
|
|
1666
|
+
}), xn = /* @__PURE__ */ P({
|
|
1670
1667
|
__name: "loader",
|
|
1671
1668
|
props: {
|
|
1672
1669
|
loading: { type: Boolean, default: !0 },
|
|
@@ -1675,7 +1672,7 @@ const Qe = le("SunIcon", [
|
|
|
1675
1672
|
color: { default: "primary" }
|
|
1676
1673
|
},
|
|
1677
1674
|
setup(i) {
|
|
1678
|
-
const d = i, e =
|
|
1675
|
+
const d = i, e = $(d.loading);
|
|
1679
1676
|
return N(
|
|
1680
1677
|
() => d.loading,
|
|
1681
1678
|
(t) => {
|
|
@@ -1708,13 +1705,13 @@ const Qe = le("SunIcon", [
|
|
|
1708
1705
|
]])
|
|
1709
1706
|
}, null, 2)) : M("", !0);
|
|
1710
1707
|
}
|
|
1711
|
-
}), Vl = { class: "footer sm:footer-horizontal container" }, Ol = { class: "footer-title" }, Bl = ["href"],
|
|
1708
|
+
}), Vl = { class: "footer sm:footer-horizontal container" }, Ol = { class: "footer-title" }, Bl = ["href"], Pl = {
|
|
1712
1709
|
key: 0,
|
|
1713
1710
|
class: "sm:hidden w-full"
|
|
1714
|
-
},
|
|
1711
|
+
}, zl = { class: "border-b-2 border-base-100 last:border-b-0 w-full" }, Al = {
|
|
1715
1712
|
tabindex: "0",
|
|
1716
1713
|
class: "collapse collapse-plus w-full"
|
|
1717
|
-
}, Ll = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, El = { class: "collapse-content flex w-full text-sm" }, Ul = { class: "flex flex-col gap-2.5" }, jl = { class: "w-full" },
|
|
1714
|
+
}, Ll = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, El = { class: "collapse-content flex w-full text-sm" }, Ul = { class: "flex flex-col gap-2.5" }, jl = { class: "w-full" }, Rl = ["href"], Fl = { class: "w-full" }, Sn = /* @__PURE__ */ P({
|
|
1718
1715
|
__name: "footer",
|
|
1719
1716
|
props: {
|
|
1720
1717
|
items: {},
|
|
@@ -1737,9 +1734,9 @@ const Qe = le("SunIcon", [
|
|
|
1737
1734
|
href: s.link
|
|
1738
1735
|
}, S(s.text), 9, Bl))), 256))
|
|
1739
1736
|
], 2))), 256)),
|
|
1740
|
-
e.collapseOnMobile ? (l(), a("nav",
|
|
1741
|
-
(l(!0), a(I, null, V(d.items, (o) => (l(), a("ul",
|
|
1742
|
-
n("div",
|
|
1737
|
+
e.collapseOnMobile ? (l(), a("nav", Pl, [
|
|
1738
|
+
(l(!0), a(I, null, V(d.items, (o) => (l(), a("ul", zl, [
|
|
1739
|
+
n("div", Al, [
|
|
1743
1740
|
n("div", Ll, S(o.title), 1),
|
|
1744
1741
|
n("div", El, [
|
|
1745
1742
|
n("ul", Ul, [
|
|
@@ -1747,14 +1744,14 @@ const Qe = le("SunIcon", [
|
|
|
1747
1744
|
n("a", {
|
|
1748
1745
|
class: "w-full font-medium link link-hover",
|
|
1749
1746
|
href: s.link
|
|
1750
|
-
}, S(s.text), 9,
|
|
1747
|
+
}, S(s.text), 9, Rl)
|
|
1751
1748
|
]))), 256))
|
|
1752
1749
|
])
|
|
1753
1750
|
])
|
|
1754
1751
|
])
|
|
1755
1752
|
]))), 256))
|
|
1756
1753
|
])) : M("", !0),
|
|
1757
|
-
n("aside",
|
|
1754
|
+
n("aside", Fl, [
|
|
1758
1755
|
D(e.$slots, "default")
|
|
1759
1756
|
])
|
|
1760
1757
|
])
|
|
@@ -1780,7 +1777,7 @@ function Kl(i, d) {
|
|
|
1780
1777
|
])
|
|
1781
1778
|
]);
|
|
1782
1779
|
}
|
|
1783
|
-
const Cn = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row place-content-center gap-4 categories" }, Jl = ["onClick"], Dn = /* @__PURE__ */
|
|
1780
|
+
const Cn = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row place-content-center gap-4 categories" }, Jl = ["onClick"], Dn = /* @__PURE__ */ P({
|
|
1784
1781
|
__name: "categoryNavigation",
|
|
1785
1782
|
props: {
|
|
1786
1783
|
searchOptions: {},
|
|
@@ -1793,17 +1790,17 @@ const Cn = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row
|
|
|
1793
1790
|
t("update:currentCategory", s);
|
|
1794
1791
|
}
|
|
1795
1792
|
return (s, r) => (l(), a("div", Yl, [
|
|
1796
|
-
(l(!0), a(I, null, V(e.searchOptions, (
|
|
1797
|
-
key:
|
|
1793
|
+
(l(!0), a(I, null, V(e.searchOptions, (g) => (l(), a("div", {
|
|
1794
|
+
key: g.category
|
|
1798
1795
|
}, [
|
|
1799
1796
|
n("button", {
|
|
1800
|
-
onClick: (c) => o(
|
|
1801
|
-
class: C(["truncate btn btn-ghost", { "font-semibold": e.currentCategory ===
|
|
1802
|
-
}, S(
|
|
1797
|
+
onClick: (c) => o(g.category),
|
|
1798
|
+
class: C(["truncate btn btn-ghost", { "font-semibold": e.currentCategory === g.category }])
|
|
1799
|
+
}, S(g.category), 11, Jl)
|
|
1803
1800
|
]))), 128))
|
|
1804
1801
|
]));
|
|
1805
1802
|
}
|
|
1806
|
-
}), Gl = { class: "md:flex hidden navbar-start" }, Xl = { class: "md:flex justify-center items-center hidden navbar-center" }, Zl = { class: "md:flex hidden navbar-end" }, Ql = { class: "navbar-bottom md:flex hidden" }, en = /* @__PURE__ */
|
|
1803
|
+
}), Gl = { class: "md:flex hidden navbar-start" }, Xl = { class: "md:flex justify-center items-center hidden navbar-center" }, Zl = { class: "md:flex hidden navbar-end" }, Ql = { class: "navbar-bottom md:flex hidden" }, en = /* @__PURE__ */ P({
|
|
1807
1804
|
__name: "navigationBar",
|
|
1808
1805
|
props: {
|
|
1809
1806
|
isCollapsed: { type: Boolean, default: !0 }
|
|
@@ -1834,7 +1831,7 @@ const Cn = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row
|
|
|
1834
1831
|
key: 0,
|
|
1835
1832
|
role: "tabpanel",
|
|
1836
1833
|
class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full overflow-x-auto tab-content"
|
|
1837
|
-
}, an = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, Mn = /* @__PURE__ */
|
|
1834
|
+
}, an = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, Mn = /* @__PURE__ */ P({
|
|
1838
1835
|
__name: "tab",
|
|
1839
1836
|
props: {
|
|
1840
1837
|
items: {},
|
|
@@ -1844,7 +1841,7 @@ const Cn = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row
|
|
|
1844
1841
|
},
|
|
1845
1842
|
emits: ["tab-changed"],
|
|
1846
1843
|
setup(i, { emit: d }) {
|
|
1847
|
-
const e = i, t =
|
|
1844
|
+
const e = i, t = $(e.items[0]), o = d;
|
|
1848
1845
|
function s(c) {
|
|
1849
1846
|
t.value = c, o("tab-changed", c);
|
|
1850
1847
|
}
|
|
@@ -1852,7 +1849,7 @@ const Cn = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row
|
|
|
1852
1849
|
const p = (e.items.indexOf(t.value) + 1) % e.items.length;
|
|
1853
1850
|
s(e.items[p]);
|
|
1854
1851
|
}
|
|
1855
|
-
function
|
|
1852
|
+
function g() {
|
|
1856
1853
|
const p = (e.items.indexOf(t.value) - 1 + e.items.length) % e.items.length;
|
|
1857
1854
|
s(e.items[p]);
|
|
1858
1855
|
}
|
|
@@ -1869,24 +1866,24 @@ const Cn = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row
|
|
|
1869
1866
|
}, [
|
|
1870
1867
|
c.withControlls ? (l(), a("div", tn, [
|
|
1871
1868
|
n("button", {
|
|
1872
|
-
onClick: p[0] || (p[0] = (
|
|
1869
|
+
onClick: p[0] || (p[0] = (y) => g()),
|
|
1873
1870
|
class: "cursor-pointer"
|
|
1874
1871
|
}, "Previous"),
|
|
1875
1872
|
n("button", {
|
|
1876
|
-
onClick: p[1] || (p[1] = (
|
|
1873
|
+
onClick: p[1] || (p[1] = (y) => r()),
|
|
1877
1874
|
class: "text-primary cursor-pointer"
|
|
1878
1875
|
}, "Next")
|
|
1879
1876
|
])) : M("", !0),
|
|
1880
|
-
(l(!0), a(I, null, V(c.items, (
|
|
1877
|
+
(l(!0), a(I, null, V(c.items, (y) => (l(), a(I, null, [
|
|
1881
1878
|
n("a", {
|
|
1882
1879
|
type: "button",
|
|
1883
1880
|
role: "tab",
|
|
1884
|
-
class: C(["min-w-max tab",
|
|
1885
|
-
onClick: (
|
|
1886
|
-
"aria-selected": t.value ==
|
|
1887
|
-
}, S(
|
|
1881
|
+
class: C(["min-w-max tab", y === t.value ? "bg-primary text-base-100" : ""]),
|
|
1882
|
+
onClick: (A) => s(y),
|
|
1883
|
+
"aria-selected": t.value == y
|
|
1884
|
+
}, S(y), 11, ln),
|
|
1888
1885
|
c.buttonOnlyMode ? M("", !0) : (l(), a("div", nn, [
|
|
1889
|
-
D(c.$slots, `${
|
|
1886
|
+
D(c.$slots, `${y}-tab`)
|
|
1890
1887
|
]))
|
|
1891
1888
|
], 64))), 256))
|
|
1892
1889
|
], 2),
|
|
@@ -1903,8 +1900,8 @@ export {
|
|
|
1903
1900
|
fn as Badge,
|
|
1904
1901
|
sn as ButtonComponent,
|
|
1905
1902
|
mn as Card,
|
|
1906
|
-
|
|
1907
|
-
|
|
1903
|
+
hn as Carousel,
|
|
1904
|
+
gn as CarouselItem,
|
|
1908
1905
|
Dn as CategoryNavigation,
|
|
1909
1906
|
nl as DatetimePicker,
|
|
1910
1907
|
rn as Dropdown,
|