manolis-ui 0.8.0 → 0.9.1
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 +316 -311
- package/dist/manolis-ui.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/manolis-ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as L, computed as E, createElementBlock as a, openBlock as n, normalizeClass as D, createCommentVNode as O, renderSlot as
|
|
1
|
+
import { defineComponent as L, computed as E, createElementBlock as a, openBlock as n, normalizeClass as D, createCommentVNode as O, renderSlot as M, createTextVNode as ke, createElementVNode as s, Fragment as B, renderList as P, toDisplayString as C, ref as x, h as me, onMounted as ee, watch as H, withDirectives as q, createVNode as se, isRef as ze, vModelCheckbox as Ae, unref as R, provide as Pe, normalizeStyle as re, inject as Ee, useId as Le, defineAsyncComponent as ce, nextTick as pe, onBeforeUnmount as ge, withModifiers as Q, createBlock as ae, resolveDynamicComponent as ve, mergeProps as fe, withKeys as he, onUnmounted as $e, vModelSelect as Z, vModelText as oe, useSlots as Ue, Comment as Re, vShow as Ne } from "vue";
|
|
2
2
|
const je = ["disabled"], Fe = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "loading loading-spinner"
|
|
@@ -76,7 +76,7 @@ const je = ["disabled"], Fe = {
|
|
|
76
76
|
disabled: v.disabled
|
|
77
77
|
}, [
|
|
78
78
|
l.loading ? (n(), a("span", Fe)) : O("", !0),
|
|
79
|
-
|
|
79
|
+
M(l.$slots, "default", {}, () => [
|
|
80
80
|
r[0] || (r[0] = ke("Submit"))
|
|
81
81
|
])
|
|
82
82
|
], 10, je));
|
|
@@ -106,7 +106,7 @@ const je = ["disabled"], Fe = {
|
|
|
106
106
|
return (o, l) => (n(), a("div", {
|
|
107
107
|
class: D(["dropdown", v[t.position], e[t.floatPosition], { "dropdown-open": t.forceOpen }, { "dropdown-hover": t.openOnHover }])
|
|
108
108
|
}, [
|
|
109
|
-
|
|
109
|
+
M(o.$slots, "default", {
|
|
110
110
|
tabindex: "0",
|
|
111
111
|
role: "button"
|
|
112
112
|
}, () => [
|
|
@@ -118,7 +118,7 @@ const je = ["disabled"], Fe = {
|
|
|
118
118
|
href: r.link
|
|
119
119
|
}, C(r.text), 9, He)
|
|
120
120
|
]))), 256)),
|
|
121
|
-
|
|
121
|
+
M(o.$slots, "additional")
|
|
122
122
|
])
|
|
123
123
|
], 2));
|
|
124
124
|
}
|
|
@@ -145,7 +145,7 @@ const je = ["disabled"], Fe = {
|
|
|
145
145
|
class: "w-fit cursor-pointer",
|
|
146
146
|
onClick: o
|
|
147
147
|
}, [
|
|
148
|
-
|
|
148
|
+
M(r.$slots, "trigger", { role: "button" }, () => [
|
|
149
149
|
b[0] || (b[0] = s("button", { class: "btn" }, "Open", -1))
|
|
150
150
|
])
|
|
151
151
|
]),
|
|
@@ -155,15 +155,15 @@ const je = ["disabled"], Fe = {
|
|
|
155
155
|
class: D(["modal", e[v.position]])
|
|
156
156
|
}, [
|
|
157
157
|
s("div", We, [
|
|
158
|
-
|
|
158
|
+
M(r.$slots, "default"),
|
|
159
159
|
s("div", Ke, [
|
|
160
|
-
|
|
160
|
+
M(r.$slots, "actions"),
|
|
161
161
|
s("form", {
|
|
162
162
|
method: "dialog",
|
|
163
163
|
onSubmit: l,
|
|
164
164
|
class: D(r.withBackdrop ? "modal-backdrop" : "")
|
|
165
165
|
}, [
|
|
166
|
-
|
|
166
|
+
M(r.$slots, "close-button", {}, () => [
|
|
167
167
|
b[1] || (b[1] = s("button", { class: "btn" }, "Close", -1))
|
|
168
168
|
])
|
|
169
169
|
], 34)
|
|
@@ -184,10 +184,10 @@ const je = ["disabled"], Fe = {
|
|
|
184
184
|
}, [
|
|
185
185
|
t[0] || (t[0] = s("input", { type: "checkbox" }, null, -1)),
|
|
186
186
|
s("div", Ye, [
|
|
187
|
-
|
|
187
|
+
M(e.$slots, "on")
|
|
188
188
|
]),
|
|
189
189
|
s("div", Je, [
|
|
190
|
-
|
|
190
|
+
M(e.$slots, "off")
|
|
191
191
|
])
|
|
192
192
|
], 2));
|
|
193
193
|
}
|
|
@@ -205,7 +205,7 @@ const Xe = (i) => i.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
|
205
205
|
* This source code is licensed under the ISC license.
|
|
206
206
|
* See the LICENSE file in the root directory of this source tree.
|
|
207
207
|
*/
|
|
208
|
-
var
|
|
208
|
+
var de = {
|
|
209
209
|
xmlns: "http://www.w3.org/2000/svg",
|
|
210
210
|
width: 24,
|
|
211
211
|
height: 24,
|
|
@@ -222,18 +222,18 @@ var ue = {
|
|
|
222
222
|
* This source code is licensed under the ISC license.
|
|
223
223
|
* See the LICENSE file in the root directory of this source tree.
|
|
224
224
|
*/
|
|
225
|
-
const Ge = ({ size: i, strokeWidth: v = 2, absoluteStrokeWidth: e, color: t, iconNode: o, name: l, class: r, ...b }, { slots:
|
|
225
|
+
const Ge = ({ size: i, strokeWidth: v = 2, absoluteStrokeWidth: e, color: t, iconNode: o, name: l, class: r, ...b }, { slots: d }) => me(
|
|
226
226
|
"svg",
|
|
227
227
|
{
|
|
228
|
-
...
|
|
229
|
-
width: i ||
|
|
230
|
-
height: i ||
|
|
231
|
-
stroke: t ||
|
|
228
|
+
...de,
|
|
229
|
+
width: i || de.width,
|
|
230
|
+
height: i || de.height,
|
|
231
|
+
stroke: t || de.stroke,
|
|
232
232
|
"stroke-width": e ? Number(v) * 24 / Number(i) : v,
|
|
233
233
|
class: ["lucide", `lucide-${Xe(l ?? "icon")}`],
|
|
234
234
|
...b
|
|
235
235
|
},
|
|
236
|
-
[...o.map((m) => me(...m)), ...
|
|
236
|
+
[...o.map((m) => me(...m)), ...d.default ? [d.default()] : []]
|
|
237
237
|
);
|
|
238
238
|
/**
|
|
239
239
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
@@ -443,7 +443,7 @@ const lt = te("SunIcon", [
|
|
|
443
443
|
return (o, l) => (n(), a("span", {
|
|
444
444
|
class: D(["badge", e[v.size], t[v.color], { "badge-outline": v.outline }])
|
|
445
445
|
}, [
|
|
446
|
-
|
|
446
|
+
M(o.$slots, "default")
|
|
447
447
|
], 2));
|
|
448
448
|
}
|
|
449
449
|
}), pt = ["src", "alt"], vt = {
|
|
@@ -501,10 +501,10 @@ const lt = te("SunIcon", [
|
|
|
501
501
|
]),
|
|
502
502
|
t.loading ? O("", !0) : (n(), a("div", vt, [
|
|
503
503
|
t.title ? (n(), a("h2", ft, C(t.title), 1)) : O("", !0),
|
|
504
|
-
|
|
504
|
+
M(t.$slots, "details"),
|
|
505
505
|
t.description ? (n(), a("p", mt, C(t.description), 1)) : O("", !0),
|
|
506
506
|
s("div", gt, [
|
|
507
|
-
|
|
507
|
+
M(t.$slots, "actions")
|
|
508
508
|
])
|
|
509
509
|
])),
|
|
510
510
|
t.loading ? (n(), a("div", ht, o[0] || (o[0] = [
|
|
@@ -564,24 +564,24 @@ const lt = te("SunIcon", [
|
|
|
564
564
|
width: `calc((100% - ${e.slidesPerView > 1 ? (e.slidesPerView - 1) * e.gap : 0}px) / ${e.slidesPerView})`
|
|
565
565
|
}));
|
|
566
566
|
Pe(_e, b);
|
|
567
|
-
const
|
|
567
|
+
const d = () => {
|
|
568
568
|
o.value ? r.value = o.value.children.length : r.value = 0;
|
|
569
569
|
}, m = async (w) => {
|
|
570
|
-
if (!o.value || e.slidesPerView <= 0 || l.value || (
|
|
571
|
-
const $ = (w % r.value + r.value) % r.value,
|
|
570
|
+
if (!o.value || e.slidesPerView <= 0 || l.value || (d(), r.value === 0)) return;
|
|
571
|
+
const $ = (w % r.value + r.value) % r.value, I = o.value, z = e.sliderOrientation === "vertical" ? (I.offsetHeight - (e.slidesPerView - 1) * e.gap) / e.slidesPerView : (I.offsetWidth - (e.slidesPerView - 1) * e.gap) / e.slidesPerView;
|
|
572
572
|
if (z <= 0) return;
|
|
573
|
-
const j = z + e.gap, W = $ * j, Y = e.sliderOrientation === "vertical" ?
|
|
574
|
-
l.value = !0,
|
|
575
|
-
const y = e.sliderOrientation === "vertical" ?
|
|
573
|
+
const j = z + e.gap, W = $ * j, Y = e.sliderOrientation === "vertical" ? I.scrollHeight - I.offsetHeight : I.scrollWidth - I.offsetWidth, p = Math.max(0, Math.min(W, Y + 0.5));
|
|
574
|
+
l.value = !0, I.style.scrollBehavior = "auto";
|
|
575
|
+
const y = e.sliderOrientation === "vertical" ? I.scrollTop : I.scrollLeft, S = p - y;
|
|
576
576
|
if (Math.abs(S) < 1) {
|
|
577
577
|
l.value = !1, t.value = $;
|
|
578
578
|
return;
|
|
579
579
|
}
|
|
580
|
-
const T = performance.now(),
|
|
580
|
+
const T = performance.now(), u = (A) => {
|
|
581
581
|
const _ = A - T, V = Math.min(1, _ / e.slideDuration), K = V < 0.5 ? 4 * V * V * V : 1 - Math.pow(-2 * V + 2, 3) / 2, J = y + S * K;
|
|
582
|
-
e.sliderOrientation === "vertical" ?
|
|
582
|
+
e.sliderOrientation === "vertical" ? I.scrollTop = J : I.scrollLeft = J, V < 1 ? requestAnimationFrame(u) : (e.sliderOrientation === "vertical" ? I.scrollTop = p : I.scrollLeft = p, t.value = $, l.value = !1);
|
|
583
583
|
};
|
|
584
|
-
requestAnimationFrame(
|
|
584
|
+
requestAnimationFrame(u);
|
|
585
585
|
}, k = () => {
|
|
586
586
|
m(t.value + 1);
|
|
587
587
|
}, U = () => {
|
|
@@ -589,24 +589,24 @@ const lt = te("SunIcon", [
|
|
|
589
589
|
}, N = (w) => {
|
|
590
590
|
m(w);
|
|
591
591
|
}, f = () => {
|
|
592
|
-
if (!o.value || e.slidesPerView <= 0 || (
|
|
593
|
-
const w = o.value, $ = e.sliderOrientation === "vertical" ? w.offsetHeight : w.offsetWidth,
|
|
592
|
+
if (!o.value || e.slidesPerView <= 0 || (d(), r.value === 0)) return;
|
|
593
|
+
const w = o.value, $ = e.sliderOrientation === "vertical" ? w.offsetHeight : w.offsetWidth, I = e.slidesPerView > 1 ? (e.slidesPerView - 1) * e.gap : 0, z = ($ - I) / e.slidesPerView;
|
|
594
594
|
if (z <= 0) return;
|
|
595
|
-
const j = Math.max(0, r.value - e.slidesPerView), W = Math.min(Math.max(0, e.initialSlide), j), Y = W * (z + e.gap),
|
|
595
|
+
const j = Math.max(0, r.value - e.slidesPerView), W = Math.min(Math.max(0, e.initialSlide), j), Y = W * (z + e.gap), p = e.sliderOrientation === "vertical" ? w.scrollHeight - w.offsetHeight : w.scrollWidth - w.offsetWidth, y = Math.max(0, Math.min(Y, p + 0.5));
|
|
596
596
|
e.sliderOrientation === "vertical" ? w.scrollTo({ top: y, behavior: "auto" }) : w.scrollTo({ left: y, behavior: "auto" }), t.value = W;
|
|
597
597
|
};
|
|
598
598
|
return ee(() => {
|
|
599
599
|
requestAnimationFrame(() => {
|
|
600
600
|
requestAnimationFrame(f);
|
|
601
|
-
}),
|
|
601
|
+
}), d();
|
|
602
602
|
}), H(() => e.initialSlide, (w) => {
|
|
603
603
|
requestAnimationFrame(() => m(w));
|
|
604
604
|
}), H(() => [e.slidesPerView, e.gap], () => {
|
|
605
605
|
requestAnimationFrame(() => {
|
|
606
606
|
requestAnimationFrame(() => {
|
|
607
|
-
if (
|
|
608
|
-
const w = Math.max(0, r.value - e.slidesPerView), $ = Math.min(t.value, w),
|
|
609
|
-
e.slideDuration = 0, m($), e.slideDuration =
|
|
607
|
+
if (d(), r.value === 0) return;
|
|
608
|
+
const w = Math.max(0, r.value - e.slidesPerView), $ = Math.min(t.value, w), I = e.slideDuration;
|
|
609
|
+
e.slideDuration = 0, m($), e.slideDuration = I;
|
|
610
610
|
});
|
|
611
611
|
});
|
|
612
612
|
}), v({ scrollToSlide: m }), (w, $) => (n(), a("div", bt, [
|
|
@@ -614,9 +614,9 @@ const lt = te("SunIcon", [
|
|
|
614
614
|
ref_key: "carouselContainer",
|
|
615
615
|
ref: o,
|
|
616
616
|
class: D(["rounded w-full h-full overflow-x-scroll scroll-smooth carousel", [{ "carousel-horizontal md:snap-none": i.sliderOrientation == "horizontal" }, { "carousel-vertical": i.sliderOrientation == "vertical" }]]),
|
|
617
|
-
style:
|
|
617
|
+
style: re({ gap: `${i.gap}px` })
|
|
618
618
|
}, [
|
|
619
|
-
|
|
619
|
+
M(w.$slots, "default", {}, void 0, !0)
|
|
620
620
|
], 6),
|
|
621
621
|
i.showNavigationButtons ? (n(), a("div", yt, [
|
|
622
622
|
s("div", {
|
|
@@ -624,7 +624,7 @@ const lt = te("SunIcon", [
|
|
|
624
624
|
role: "button",
|
|
625
625
|
"aria-label": "Previous Slide"
|
|
626
626
|
}, [
|
|
627
|
-
|
|
627
|
+
M(w.$slots, "prevButton", {}, () => [
|
|
628
628
|
$[0] || ($[0] = s("button", {
|
|
629
629
|
class: "btn btn-circle",
|
|
630
630
|
tabindex: "-1"
|
|
@@ -636,7 +636,7 @@ const lt = te("SunIcon", [
|
|
|
636
636
|
role: "button",
|
|
637
637
|
"aria-label": "Next Slide"
|
|
638
638
|
}, [
|
|
639
|
-
|
|
639
|
+
M(w.$slots, "nextButton", {}, () => [
|
|
640
640
|
$[1] || ($[1] = s("button", {
|
|
641
641
|
class: "btn btn-circle",
|
|
642
642
|
tabindex: "-1"
|
|
@@ -645,7 +645,7 @@ const lt = te("SunIcon", [
|
|
|
645
645
|
])
|
|
646
646
|
])) : O("", !0),
|
|
647
647
|
i.showIndicators ? (n(), a("div", wt, [
|
|
648
|
-
(n(!0), a(B, null, P(r.value, (
|
|
648
|
+
(n(!0), a(B, null, P(r.value, (I, z) => (n(), a("button", {
|
|
649
649
|
key: `dot-${z}`,
|
|
650
650
|
onClick: (j) => N(z),
|
|
651
651
|
class: D(["btn btn-circle btn-xs", { "btn-active": z === t.value }]),
|
|
@@ -665,18 +665,18 @@ const lt = te("SunIcon", [
|
|
|
665
665
|
const v = Ee(_e, x({}));
|
|
666
666
|
return (e, t) => (n(), a("div", {
|
|
667
667
|
class: "w-full h-full carousel-item",
|
|
668
|
-
style:
|
|
668
|
+
style: re(R(v))
|
|
669
669
|
}, [
|
|
670
|
-
|
|
670
|
+
M(e.$slots, "default", {}, void 0, !0)
|
|
671
671
|
], 4));
|
|
672
672
|
}
|
|
673
673
|
}), xn = /* @__PURE__ */ le(_t, [["__scopeId", "data-v-507384bc"]]), St = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, xt = ["onClick"], Ct = {
|
|
674
674
|
key: 0,
|
|
675
675
|
class: "inline-component-wrapper flex flex-grow justify-center items-center w-full h-full"
|
|
676
|
-
},
|
|
676
|
+
}, It = {
|
|
677
677
|
key: 1,
|
|
678
678
|
class: "flex flex-col"
|
|
679
|
-
},
|
|
679
|
+
}, Mt = { class: "text-sm" }, Dt = {
|
|
680
680
|
key: 0,
|
|
681
681
|
class: "opacity-75 overflow-hidden text-xs truncate ..."
|
|
682
682
|
}, Tt = {
|
|
@@ -706,59 +706,59 @@ const lt = te("SunIcon", [
|
|
|
706
706
|
// 'custom-number': defineAsyncComponent(() => import('./CustomNumber.vue')),
|
|
707
707
|
"custom-text": ce(() => import("./inputField-BxT95oyM.js"))
|
|
708
708
|
// 'custom-select': defineAsyncComponent(() => import('./CustomSelect.vue')),
|
|
709
|
-
},
|
|
709
|
+
}, d = x({}), m = x({
|
|
710
710
|
left: "0px",
|
|
711
711
|
top: "0px",
|
|
712
712
|
transform: "translateX(0%)"
|
|
713
|
-
}), k = x(null), U = (
|
|
713
|
+
}), k = x(null), U = (p) => {
|
|
714
714
|
var y;
|
|
715
|
-
if (
|
|
715
|
+
if (p.value === void 0 || p.value === null || p.value === "")
|
|
716
716
|
return "";
|
|
717
|
-
switch (
|
|
717
|
+
switch (p.type) {
|
|
718
718
|
case "datetime":
|
|
719
|
-
if (typeof
|
|
719
|
+
if (typeof p.value == "string")
|
|
720
720
|
try {
|
|
721
|
-
const S = new Date(
|
|
721
|
+
const S = new Date(p.value);
|
|
722
722
|
if (!isNaN(S.getTime()))
|
|
723
723
|
return S.toLocaleString();
|
|
724
724
|
} catch {
|
|
725
725
|
}
|
|
726
|
-
else if (
|
|
726
|
+
else if (p.range && typeof p.value == "object" && p.value !== null && "start" in p.value && "end" in p.value)
|
|
727
727
|
try {
|
|
728
|
-
const S = new Date(
|
|
728
|
+
const S = new Date(p.value.start), T = new Date(p.value.end);
|
|
729
729
|
if (!isNaN(S.getTime()) && !isNaN(T.getTime()))
|
|
730
730
|
return `${S.toLocaleDateString()} - ${T.toLocaleDateString()}`;
|
|
731
731
|
} catch {
|
|
732
732
|
}
|
|
733
733
|
break;
|
|
734
734
|
case "custom-range":
|
|
735
|
-
if (typeof
|
|
736
|
-
return `${
|
|
735
|
+
if (typeof p.value == "object" && p.value !== null && "start" in p.value && "end" in p.value)
|
|
736
|
+
return `${p.value.start} - ${p.value.end}`;
|
|
737
737
|
break;
|
|
738
738
|
case "custom-number":
|
|
739
|
-
if (typeof
|
|
740
|
-
return
|
|
739
|
+
if (typeof p.value == "number")
|
|
740
|
+
return p.value.toString();
|
|
741
741
|
break;
|
|
742
742
|
case "standard-select":
|
|
743
743
|
case "custom-select":
|
|
744
|
-
if ((y =
|
|
745
|
-
const S =
|
|
746
|
-
(T) => T.value ===
|
|
744
|
+
if ((y = p.props) != null && y.options && Array.isArray(p.props.options)) {
|
|
745
|
+
const S = p.props.options.find(
|
|
746
|
+
(T) => T.value === p.value
|
|
747
747
|
);
|
|
748
748
|
if (S)
|
|
749
749
|
return S.text;
|
|
750
750
|
}
|
|
751
|
-
return String(
|
|
751
|
+
return String(p.value);
|
|
752
752
|
case "custom-text":
|
|
753
|
-
if (typeof
|
|
754
|
-
return
|
|
753
|
+
if (typeof p.value == "string")
|
|
754
|
+
return p.value;
|
|
755
755
|
break;
|
|
756
756
|
}
|
|
757
|
-
return String(
|
|
757
|
+
return String(p.value);
|
|
758
758
|
};
|
|
759
|
-
function N(
|
|
760
|
-
var
|
|
761
|
-
const y = (
|
|
759
|
+
function N(p) {
|
|
760
|
+
var u, A;
|
|
761
|
+
const y = (u = l.value) == null ? void 0 : u.name;
|
|
762
762
|
if (!y) {
|
|
763
763
|
console.warn("componentValueUpdated called but no active tab.");
|
|
764
764
|
return;
|
|
@@ -768,45 +768,45 @@ const lt = te("SunIcon", [
|
|
|
768
768
|
)) == null ? void 0 : A.tabs, T = S == null ? void 0 : S.find(
|
|
769
769
|
(_) => _.name === y
|
|
770
770
|
);
|
|
771
|
-
T ? (T.value =
|
|
771
|
+
T ? (T.value = p, t("update:search-data", {
|
|
772
772
|
tab: T.name,
|
|
773
|
-
data:
|
|
773
|
+
data: p
|
|
774
774
|
})) : console.error(
|
|
775
775
|
`Tab with name "${y}" not found in current category.`
|
|
776
776
|
);
|
|
777
777
|
}
|
|
778
|
-
function f(
|
|
779
|
-
N(
|
|
778
|
+
function f(p) {
|
|
779
|
+
N(p);
|
|
780
780
|
}
|
|
781
781
|
function w() {
|
|
782
782
|
t("search");
|
|
783
783
|
}
|
|
784
|
-
async function $(
|
|
784
|
+
async function $(p) {
|
|
785
785
|
var T;
|
|
786
|
-
const y = document.getElementById(`advancedSearchMobile-${o}`), S = y && y.contains(
|
|
787
|
-
((T = l.value) == null ? void 0 : T.displayMode) === "popup" && k.value && !k.value.contains(
|
|
786
|
+
const y = document.getElementById(`advancedSearchMobile-${o}`), S = y && y.contains(p.target);
|
|
787
|
+
((T = l.value) == null ? void 0 : T.displayMode) === "popup" && k.value && !k.value.contains(p.target) && !S && (await pe(), l.value = null);
|
|
788
788
|
}
|
|
789
|
-
async function
|
|
789
|
+
async function I() {
|
|
790
790
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
791
|
-
const
|
|
791
|
+
const p = document.getElementById(
|
|
792
792
|
`advancedSearchMobile-${o}`
|
|
793
793
|
);
|
|
794
|
-
|
|
794
|
+
p ? (l.value = null, p.showModal()) : console.warn(
|
|
795
795
|
`Mobile modal element not found. Ensure it exists with id="advancedSearchMobile-${o}".`
|
|
796
796
|
);
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
async function z(
|
|
800
|
-
var S, T,
|
|
799
|
+
async function z(p) {
|
|
800
|
+
var S, T, u;
|
|
801
801
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
802
|
-
|
|
802
|
+
I();
|
|
803
803
|
return;
|
|
804
804
|
}
|
|
805
|
-
const y =
|
|
806
|
-
if (((S = l.value) == null ? void 0 : S.name) ===
|
|
805
|
+
const y = p.displayMode ?? "popup";
|
|
806
|
+
if (((S = l.value) == null ? void 0 : S.name) === p.name && ((T = l.value) == null ? void 0 : T.displayMode) === y)
|
|
807
807
|
l.value = null;
|
|
808
|
-
else if (l.value = { ...
|
|
809
|
-
const A =
|
|
808
|
+
else if (l.value = { ...p, displayMode: y }, await pe(), ((u = l.value) == null ? void 0 : u.displayMode) === "popup") {
|
|
809
|
+
const A = d.value[p.name];
|
|
810
810
|
if (A && k.value) {
|
|
811
811
|
const _ = A.getBoundingClientRect(), V = k.value.getBoundingClientRect(), K = _.bottom - V.top, J = _.left + _.width / 2 - V.left;
|
|
812
812
|
m.value = {
|
|
@@ -819,12 +819,12 @@ const lt = te("SunIcon", [
|
|
|
819
819
|
} else
|
|
820
820
|
console.error(
|
|
821
821
|
"Tab element or search container not found for positioning:",
|
|
822
|
-
|
|
822
|
+
p.name
|
|
823
823
|
);
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
|
-
const j = (
|
|
827
|
-
const y =
|
|
826
|
+
const j = (p) => {
|
|
827
|
+
const y = p.relatedTarget;
|
|
828
828
|
setTimeout(() => {
|
|
829
829
|
var S;
|
|
830
830
|
((S = l.value) == null ? void 0 : S.displayMode) === "inline" && k.value && (!y || !k.value.contains(y)) ? (console.log("Blur detected outside container, closing inline view."), l.value = null) : console.log(
|
|
@@ -834,27 +834,27 @@ const lt = te("SunIcon", [
|
|
|
834
834
|
}, W = () => {
|
|
835
835
|
console.log("Enter key pressed on inline component, closing inline view."), l.value = null;
|
|
836
836
|
};
|
|
837
|
-
H(r, (
|
|
837
|
+
H(r, (p) => {
|
|
838
838
|
var y;
|
|
839
839
|
console.log(
|
|
840
840
|
"advanced-search: inlineComponentRef changed. New Value:",
|
|
841
|
-
|
|
842
|
-
), console.log("advanced-search: activeTab.value:", l.value),
|
|
841
|
+
p
|
|
842
|
+
), console.log("advanced-search: activeTab.value:", l.value), p && ((y = l.value) == null ? void 0 : y.displayMode) === "inline" ? (console.log(
|
|
843
843
|
"advanced-search: Inline component ref is available and active tab is inline. Attempting to focus child input..."
|
|
844
844
|
), pe(() => {
|
|
845
845
|
console.log(
|
|
846
846
|
"advanced-search: Inside nextTick. Attempting to call child's focus method..."
|
|
847
|
-
), console.log("advanced-search: Type of newValue:", typeof
|
|
847
|
+
), console.log("advanced-search: Type of newValue:", typeof p), console.log(
|
|
848
848
|
"advanced-search: Does newValue have focusInput?",
|
|
849
|
-
typeof
|
|
850
|
-
),
|
|
849
|
+
typeof p.focusInput == "function"
|
|
850
|
+
), p && typeof p.focusInput == "function" ? (console.log(
|
|
851
851
|
"advanced-search: Calling exposed focusInput() method on child instance."
|
|
852
|
-
),
|
|
852
|
+
), p.focusInput()) : console.warn(
|
|
853
853
|
'advanced-search: Child inline component instance does not expose a "focusInput" method or is not ready.',
|
|
854
|
-
|
|
854
|
+
p
|
|
855
855
|
);
|
|
856
856
|
})) : console.log(
|
|
857
|
-
|
|
857
|
+
p ? "advanced-search: inlineComponentRef available, but active tab is not inline." : "advanced-search: inlineComponentRef is now null (component likely unmounted)."
|
|
858
858
|
);
|
|
859
859
|
}), ee(() => {
|
|
860
860
|
document.addEventListener("click", $), window.addEventListener("resize", Y);
|
|
@@ -862,19 +862,19 @@ const lt = te("SunIcon", [
|
|
|
862
862
|
document.removeEventListener("click", $), window.removeEventListener("resize", Y);
|
|
863
863
|
});
|
|
864
864
|
const Y = () => {
|
|
865
|
-
var
|
|
865
|
+
var p, y;
|
|
866
866
|
if (typeof window < "u") {
|
|
867
867
|
const S = window.innerWidth <= 768, T = l.value !== null && (l.value.displayMode === "popup" || l.value.displayMode === "inline") && window.innerWidth > 768;
|
|
868
|
-
!S && (((
|
|
868
|
+
!S && (((p = l.value) == null ? void 0 : p.displayMode) === "popup" || ((y = l.value) == null ? void 0 : y.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), l.value = null), S && !T && l.value !== null && (console.log(
|
|
869
869
|
"Resizing to desktop from potential mobile active state, closing active tab."
|
|
870
870
|
), l.value = null);
|
|
871
|
-
const
|
|
871
|
+
const u = document.getElementById(
|
|
872
872
|
`advancedSearchMobile-${o}`
|
|
873
873
|
);
|
|
874
|
-
|
|
874
|
+
u != null && u.open && !S && (console.log("Modal is open on desktop, closing modal and active tab."), u.close(), l.value = null);
|
|
875
875
|
}
|
|
876
876
|
};
|
|
877
|
-
return (
|
|
877
|
+
return (p, y) => {
|
|
878
878
|
var S, T;
|
|
879
879
|
return n(), a(B, null, [
|
|
880
880
|
s("div", {
|
|
@@ -884,25 +884,25 @@ const lt = te("SunIcon", [
|
|
|
884
884
|
}, [
|
|
885
885
|
s("div", {
|
|
886
886
|
class: "group/search relative flex place-items-center shadow-md p-2 border-2 border-base-300/25 rounded-sm w-full transition-all cursor-pointer md:cursor-auto",
|
|
887
|
-
onClick:
|
|
887
|
+
onClick: I
|
|
888
888
|
}, [
|
|
889
889
|
s("div", St, [
|
|
890
890
|
(n(!0), a(B, null, P(((S = e.searchOptions.find(
|
|
891
|
-
(
|
|
892
|
-
)) == null ? void 0 : S.tabs) || [], (
|
|
893
|
-
var _, V, K, J,
|
|
891
|
+
(u) => u.category === e.currentCategory
|
|
892
|
+
)) == null ? void 0 : S.tabs) || [], (u, A) => {
|
|
893
|
+
var _, V, K, J, ie;
|
|
894
894
|
return n(), a("button", {
|
|
895
|
-
key: `${
|
|
896
|
-
onClick: Q((X) => z(
|
|
895
|
+
key: `${u.name}-${A}`,
|
|
896
|
+
onClick: Q((X) => z(u), ["stop"]),
|
|
897
897
|
class: D([{
|
|
898
|
-
"tab-active": ((_ = l.value) == null ? void 0 : _.name) ===
|
|
899
|
-
"tab-active-inline": ((V = l.value) == null ? void 0 : V.name) ===
|
|
898
|
+
"tab-active": ((_ = l.value) == null ? void 0 : _.name) === u.name,
|
|
899
|
+
"tab-active-inline": ((V = l.value) == null ? void 0 : V.name) === u.name && ((K = l.value) == null ? void 0 : K.displayMode) === "inline"
|
|
900
900
|
// Add new class
|
|
901
901
|
}, "group/searchitem after:top-0 after:-right-2 after:absolute relative first-of-type:flex-auto last-of-type:flex-auto after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-[1px] after:h-10 overflow-x-hidden text-start md:after:content-[''] after:content-none last-of-type:after:content-none"]),
|
|
902
902
|
ref_for: !0,
|
|
903
|
-
ref: (X) =>
|
|
903
|
+
ref: (X) => d.value[u.name] = X
|
|
904
904
|
}, [
|
|
905
|
-
((J = l.value) == null ? void 0 : J.name) ===
|
|
905
|
+
((J = l.value) == null ? void 0 : J.name) === u.name && ((ie = l.value) == null ? void 0 : ie.displayMode) === "inline" ? (n(), a("div", Ct, [
|
|
906
906
|
(n(), ae(ve(b[l.value.type]), fe({ ref_for: !0 }, l.value.props || {}, {
|
|
907
907
|
modelValue: l.value.value,
|
|
908
908
|
onUpdated: y[0] || (y[0] = (X) => f(X)),
|
|
@@ -913,9 +913,9 @@ const lt = te("SunIcon", [
|
|
|
913
913
|
ref_key: "inlineComponentRef",
|
|
914
914
|
ref: r
|
|
915
915
|
}), null, 16, ["modelValue", "onKeydown"]))
|
|
916
|
-
])) : (n(), a("div",
|
|
917
|
-
s("p",
|
|
918
|
-
|
|
916
|
+
])) : (n(), a("div", It, [
|
|
917
|
+
s("p", Mt, C(u.name), 1),
|
|
918
|
+
u.value !== void 0 && u.value !== null && u.value !== "" ? (n(), a("p", Dt, C(U(u)), 1)) : (n(), a("p", Tt, C(u.description), 1))
|
|
919
919
|
]))
|
|
920
920
|
], 10, xt);
|
|
921
921
|
}), 128))
|
|
@@ -923,12 +923,12 @@ const lt = te("SunIcon", [
|
|
|
923
923
|
l.value && l.value.displayMode === "popup" ? (n(), a("div", {
|
|
924
924
|
key: 0,
|
|
925
925
|
class: "absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",
|
|
926
|
-
style:
|
|
926
|
+
style: re(m.value)
|
|
927
927
|
}, [
|
|
928
928
|
(n(), ae(ve(b[l.value.type]), fe(l.value.props || {}, {
|
|
929
929
|
modelValue: l.value.value,
|
|
930
|
-
onUpdated: y[2] || (y[2] = (
|
|
931
|
-
"onUpdate:modelValue": y[3] || (y[3] = (
|
|
930
|
+
onUpdated: y[2] || (y[2] = (u) => N(u)),
|
|
931
|
+
"onUpdate:modelValue": y[3] || (y[3] = (u) => N(u))
|
|
932
932
|
}), null, 16, ["modelValue"]))
|
|
933
933
|
], 4)) : O("", !0),
|
|
934
934
|
s("button", {
|
|
@@ -961,14 +961,14 @@ const lt = te("SunIcon", [
|
|
|
961
961
|
class: "modal"
|
|
962
962
|
}, [
|
|
963
963
|
s("div", Ot, [
|
|
964
|
-
|
|
965
|
-
s("h3", zt, C(
|
|
964
|
+
M(p.$slots, "additionalForMobile", {}, () => [
|
|
965
|
+
s("h3", zt, C(p.currentCategory), 1)
|
|
966
966
|
], !0),
|
|
967
967
|
(n(!0), a(B, null, P(((T = e.searchOptions.find(
|
|
968
|
-
(
|
|
969
|
-
)) == null ? void 0 : T.tabs) || [], (
|
|
968
|
+
(u) => u.category === e.currentCategory
|
|
969
|
+
)) == null ? void 0 : T.tabs) || [], (u, A) => (n(), a("div", {
|
|
970
970
|
class: "collapse bg-base-200 my-4",
|
|
971
|
-
key:
|
|
971
|
+
key: u.name
|
|
972
972
|
}, [
|
|
973
973
|
s("input", {
|
|
974
974
|
type: "radio",
|
|
@@ -976,13 +976,13 @@ const lt = te("SunIcon", [
|
|
|
976
976
|
checked: A === 0
|
|
977
977
|
}, null, 8, At),
|
|
978
978
|
s("div", Pt, [
|
|
979
|
-
s("div", null, C(
|
|
980
|
-
|
|
979
|
+
s("div", null, C(u.name), 1),
|
|
980
|
+
u.value !== void 0 && u.value !== null && u.value !== "" ? (n(), a("div", Et, C(U(u)), 1)) : (n(), a("div", Lt, C(u.description), 1))
|
|
981
981
|
]),
|
|
982
982
|
s("div", Ut, [
|
|
983
983
|
y[7] || (y[7] = s("br", null, null, -1)),
|
|
984
|
-
(n(), ae(ve(b[
|
|
985
|
-
modelValue:
|
|
984
|
+
(n(), ae(ve(b[u.type]), fe({ ref_for: !0 }, u.props || {}, {
|
|
985
|
+
modelValue: u.value,
|
|
986
986
|
onUpdated: y[5] || (y[5] = (_) => N(_)),
|
|
987
987
|
"onUpdate:modelValue": y[6] || (y[6] = (_) => N(_))
|
|
988
988
|
}), null, 16, ["modelValue"]))
|
|
@@ -1070,25 +1070,25 @@ const lt = te("SunIcon", [
|
|
|
1070
1070
|
);
|
|
1071
1071
|
const t = v, o = x(!1), l = x(e.range ? { start: null, end: null } : null), r = x(e.range ? { start: null, end: null } : null), b = x(
|
|
1072
1072
|
(/* @__PURE__ */ new Date()).toLocaleString("default", { month: "long" })
|
|
1073
|
-
),
|
|
1073
|
+
), d = x((/* @__PURE__ */ new Date()).getFullYear()), m = x(e.range ? { start: 0, end: 0 } : 0), k = x(e.range ? { start: 0, end: 0 } : 0), U = x(null), N = E(() => `${e.id}-input`), f = E(() => `${e.id}-popup`), w = E(
|
|
1074
1074
|
() => e.mode === "date" || e.mode === "datetime"
|
|
1075
1075
|
), $ = E(
|
|
1076
1076
|
() => e.mode === "time" || e.mode === "datetime"
|
|
1077
1077
|
);
|
|
1078
1078
|
E(
|
|
1079
|
-
() => new Date(
|
|
1079
|
+
() => new Date(d.value, I.value)
|
|
1080
1080
|
);
|
|
1081
|
-
const
|
|
1082
|
-
() => new Date(
|
|
1081
|
+
const I = E(() => T.indexOf(b.value)), z = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], j = E(
|
|
1082
|
+
() => new Date(d.value, I.value).getDay()
|
|
1083
1083
|
), W = E(() => {
|
|
1084
|
-
const g = new Date(
|
|
1084
|
+
const g = new Date(d.value, I.value + 1, 0).getDate();
|
|
1085
1085
|
return Array.from(
|
|
1086
1086
|
{ length: g },
|
|
1087
|
-
(h,
|
|
1087
|
+
(h, c) => new Date(d.value, I.value, c + 1)
|
|
1088
1088
|
);
|
|
1089
1089
|
}), Y = E(
|
|
1090
1090
|
() => Array.from({ length: j.value }, (g, h) => h)
|
|
1091
|
-
),
|
|
1091
|
+
), p = Array.from({ length: 24 }, (g, h) => h), y = Array.from({ length: 60 }, (g, h) => h), S = E(
|
|
1092
1092
|
() => typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
1093
1093
|
navigator.userAgent
|
|
1094
1094
|
)
|
|
@@ -1105,9 +1105,9 @@ const lt = te("SunIcon", [
|
|
|
1105
1105
|
"October",
|
|
1106
1106
|
"November",
|
|
1107
1107
|
"December"
|
|
1108
|
-
],
|
|
1108
|
+
], u = E(() => {
|
|
1109
1109
|
const g = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1110
|
-
return Array.from({ length: 100 }, (h,
|
|
1110
|
+
return Array.from({ length: 100 }, (h, c) => g - 50 + c);
|
|
1111
1111
|
}), A = E(() => {
|
|
1112
1112
|
if (!w.value || !l.value) return "";
|
|
1113
1113
|
if (e.range && l.value.start && l.value.end) {
|
|
@@ -1118,44 +1118,44 @@ const lt = te("SunIcon", [
|
|
|
1118
1118
|
}), _ = (g) => g instanceof Date ? g : new Date(g), V = (g) => g instanceof Date && !isNaN(g), K = E(() => {
|
|
1119
1119
|
if (!$.value) return "";
|
|
1120
1120
|
const g = (h) => {
|
|
1121
|
-
var
|
|
1122
|
-
const
|
|
1123
|
-
return S.value ? ((ye = r.value) == null ? void 0 : ye[h]) ?? r.value : `${
|
|
1121
|
+
var ue, ne, ye;
|
|
1122
|
+
const c = ((ue = m.value) == null ? void 0 : ue[h]) ?? m.value, G = ((ne = k.value) == null ? void 0 : ne[h]) ?? k.value;
|
|
1123
|
+
return S.value ? ((ye = r.value) == null ? void 0 : ye[h]) ?? r.value : `${c.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
|
|
1124
1124
|
};
|
|
1125
1125
|
return e.range ? `${g("start")} - ${g("end")}` : g();
|
|
1126
1126
|
}), J = E(() => {
|
|
1127
1127
|
const g = A.value, h = K.value;
|
|
1128
1128
|
return `${g} ${h}`.trim();
|
|
1129
|
-
}),
|
|
1129
|
+
}), ie = () => o.value = !o.value, X = () => {
|
|
1130
1130
|
F(), Se();
|
|
1131
1131
|
}, Se = () => o.value = !1, xe = () => {
|
|
1132
1132
|
l.value = e.range ? { start: null, end: null } : null, r.value = e.range ? { start: null, end: null } : null, F();
|
|
1133
1133
|
}, Ce = (g) => {
|
|
1134
1134
|
e.range ? l.value.start && l.value.end ? l.value = { start: g, end: null } : l.value.start ? l.value.end = g : l.value.start = g : l.value = g, F();
|
|
1135
|
-
},
|
|
1135
|
+
}, Ie = (g) => (g = _(g), e.range ? l.value.start && V(l.value.start) && g.getTime() === l.value.start.getTime() || l.value.end && V(l.value.end) && g.getTime() === l.value.end.getTime() : V(l.value) && g.getTime() === l.value.getTime()), Me = (g) => {
|
|
1136
1136
|
g = _(g);
|
|
1137
1137
|
const h = /* @__PURE__ */ new Date();
|
|
1138
1138
|
return g.getDate() === h.getDate() && g.getMonth() === h.getMonth() && g.getFullYear() === h.getFullYear();
|
|
1139
1139
|
}, De = (g) => (g = _(g), e.range && V(l.value.start) && g.getTime() === l.value.start.getTime()), Te = (g) => (g = _(g), e.range && V(l.value.end) && g.getTime() === l.value.end.getTime()), Ve = (g) => {
|
|
1140
1140
|
if (g = _(g), e.range && V(l.value.start) && V(l.value.end)) {
|
|
1141
|
-
const h = l.value.start.getTime(),
|
|
1142
|
-
return G > h && G <
|
|
1141
|
+
const h = l.value.start.getTime(), c = l.value.end.getTime(), G = g.getTime();
|
|
1142
|
+
return G > h && G < c;
|
|
1143
1143
|
}
|
|
1144
1144
|
return !1;
|
|
1145
1145
|
}, Be = () => {
|
|
1146
|
-
let g =
|
|
1147
|
-
g < 0 && (g = 11,
|
|
1146
|
+
let g = I.value - 1;
|
|
1147
|
+
g < 0 && (g = 11, d.value--), b.value = T[g], F();
|
|
1148
1148
|
}, Oe = () => {
|
|
1149
|
-
let g =
|
|
1150
|
-
g > 11 && (g = 0,
|
|
1149
|
+
let g = I.value + 1;
|
|
1150
|
+
g > 11 && (g = 0, d.value++), b.value = T[g], F();
|
|
1151
1151
|
}, be = (g) => {
|
|
1152
1152
|
U.value && !U.value.contains(g.target) && o.value == !0 && X();
|
|
1153
1153
|
}, F = () => {
|
|
1154
1154
|
let g = {};
|
|
1155
|
-
const h = (
|
|
1156
|
-
|
|
1157
|
-
const ne = new Date(
|
|
1158
|
-
return ne.setUTCHours(G,
|
|
1155
|
+
const h = (c, G, ue) => {
|
|
1156
|
+
c instanceof Date && !isNaN(c) || (c = /* @__PURE__ */ new Date());
|
|
1157
|
+
const ne = new Date(c);
|
|
1158
|
+
return ne.setUTCHours(G, ue, 0, 0), ne.toISOString();
|
|
1159
1159
|
};
|
|
1160
1160
|
e.range ? (g.from = h(
|
|
1161
1161
|
l.value.start,
|
|
@@ -1183,9 +1183,9 @@ const lt = te("SunIcon", [
|
|
|
1183
1183
|
}, [
|
|
1184
1184
|
s("div", {
|
|
1185
1185
|
class: "flex items-center gap-2 cursor-pointer",
|
|
1186
|
-
onClick: h[0] || (h[0] = (
|
|
1186
|
+
onClick: h[0] || (h[0] = (c) => e.disabled ? null : ie())
|
|
1187
1187
|
}, [
|
|
1188
|
-
i.popup ?
|
|
1188
|
+
i.popup ? M(g.$slots, "default", { key: 0 }, () => [
|
|
1189
1189
|
s("input", {
|
|
1190
1190
|
type: "text",
|
|
1191
1191
|
class: "input-bordered w-full cursor-pointer input",
|
|
@@ -1231,27 +1231,27 @@ const lt = te("SunIcon", [
|
|
|
1231
1231
|
]), 8, Ht),
|
|
1232
1232
|
q(s("select", {
|
|
1233
1233
|
class: "border-none w-fit select",
|
|
1234
|
-
"onUpdate:modelValue": h[1] || (h[1] = (
|
|
1234
|
+
"onUpdate:modelValue": h[1] || (h[1] = (c) => b.value = c),
|
|
1235
1235
|
onChange: F
|
|
1236
1236
|
}, [
|
|
1237
|
-
(n(), a(B, null, P(T, (
|
|
1237
|
+
(n(), a(B, null, P(T, (c, G) => s("option", {
|
|
1238
1238
|
key: G,
|
|
1239
|
-
value:
|
|
1240
|
-
}, C(
|
|
1239
|
+
value: c
|
|
1240
|
+
}, C(c), 9, Wt)), 64))
|
|
1241
1241
|
], 544), [
|
|
1242
1242
|
[Z, b.value]
|
|
1243
1243
|
]),
|
|
1244
1244
|
q(s("select", {
|
|
1245
1245
|
class: "border-none w-24 select",
|
|
1246
|
-
"onUpdate:modelValue": h[2] || (h[2] = (
|
|
1246
|
+
"onUpdate:modelValue": h[2] || (h[2] = (c) => d.value = c),
|
|
1247
1247
|
onChange: F
|
|
1248
1248
|
}, [
|
|
1249
|
-
(n(!0), a(B, null, P(
|
|
1250
|
-
key:
|
|
1251
|
-
value:
|
|
1252
|
-
}, C(
|
|
1249
|
+
(n(!0), a(B, null, P(u.value, (c) => (n(), a("option", {
|
|
1250
|
+
key: c,
|
|
1251
|
+
value: c
|
|
1252
|
+
}, C(c), 9, Kt))), 128))
|
|
1253
1253
|
], 544), [
|
|
1254
|
-
[Z,
|
|
1254
|
+
[Z, d.value]
|
|
1255
1255
|
]),
|
|
1256
1256
|
s("button", {
|
|
1257
1257
|
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
@@ -1274,25 +1274,25 @@ const lt = te("SunIcon", [
|
|
|
1274
1274
|
]))
|
|
1275
1275
|
])) : O("", !0),
|
|
1276
1276
|
w.value ? (n(), a("div", Yt, [
|
|
1277
|
-
(n(), a(B, null, P(z, (
|
|
1278
|
-
key:
|
|
1277
|
+
(n(), a(B, null, P(z, (c) => s("div", {
|
|
1278
|
+
key: c,
|
|
1279
1279
|
class: "text-center"
|
|
1280
|
-
}, C(
|
|
1281
|
-
(n(!0), a(B, null, P(Y.value, (
|
|
1282
|
-
key:
|
|
1280
|
+
}, C(c), 1)), 64)),
|
|
1281
|
+
(n(!0), a(B, null, P(Y.value, (c) => (n(), a("div", {
|
|
1282
|
+
key: c,
|
|
1283
1283
|
class: "text-center"
|
|
1284
1284
|
}))), 128)),
|
|
1285
|
-
(n(!0), a(B, null, P(W.value, (
|
|
1286
|
-
key:
|
|
1285
|
+
(n(!0), a(B, null, P(W.value, (c) => (n(), a("div", {
|
|
1286
|
+
key: c,
|
|
1287
1287
|
class: D(["hover:bg-primary-10 py-1 rounded-full text-center cursor-pointer", {
|
|
1288
|
-
"bg-primary text-primary-content":
|
|
1289
|
-
today:
|
|
1290
|
-
"range-start bg-primary text-primary-content": De(
|
|
1291
|
-
"range-end bg-primary text-primary-content": Te(
|
|
1292
|
-
"in-range bg-primary/20 hover:bg-primary/10": Ve(
|
|
1288
|
+
"bg-primary text-primary-content": Ie(c),
|
|
1289
|
+
today: Me(c),
|
|
1290
|
+
"range-start bg-primary text-primary-content": De(c),
|
|
1291
|
+
"range-end bg-primary text-primary-content": Te(c),
|
|
1292
|
+
"in-range bg-primary/20 hover:bg-primary/10": Ve(c)
|
|
1293
1293
|
}]),
|
|
1294
|
-
onClick: (G) => Ce(
|
|
1295
|
-
}, C(
|
|
1294
|
+
onClick: (G) => Ce(c)
|
|
1295
|
+
}, C(c.getDate()), 11, Jt))), 128))
|
|
1296
1296
|
])) : O("", !0),
|
|
1297
1297
|
$.value ? (n(), a("div", Xt, [
|
|
1298
1298
|
e.range ? O("", !0) : (n(), a("h3", Gt, "Select Time")),
|
|
@@ -1303,20 +1303,20 @@ const lt = te("SunIcon", [
|
|
|
1303
1303
|
key: 0,
|
|
1304
1304
|
type: "time",
|
|
1305
1305
|
class: "input-bordered w-full input",
|
|
1306
|
-
"onUpdate:modelValue": h[6] || (h[6] = (
|
|
1306
|
+
"onUpdate:modelValue": h[6] || (h[6] = (c) => r.value.start = c),
|
|
1307
1307
|
onChange: F
|
|
1308
1308
|
}, null, 544)), [
|
|
1309
1309
|
[oe, r.value.start]
|
|
1310
1310
|
]) : (n(), a("div", nl, [
|
|
1311
1311
|
q(s("select", {
|
|
1312
1312
|
class: "w-full select-bordered select",
|
|
1313
|
-
"onUpdate:modelValue": h[7] || (h[7] = (
|
|
1313
|
+
"onUpdate:modelValue": h[7] || (h[7] = (c) => m.value.start = c),
|
|
1314
1314
|
onChange: F
|
|
1315
1315
|
}, [
|
|
1316
|
-
(n(!0), a(B, null, P(R(
|
|
1317
|
-
key:
|
|
1318
|
-
value:
|
|
1319
|
-
}, C(
|
|
1316
|
+
(n(!0), a(B, null, P(R(p), (c) => (n(), a("option", {
|
|
1317
|
+
key: c,
|
|
1318
|
+
value: c
|
|
1319
|
+
}, C(c.toString().padStart(2, "0")), 9, al))), 128))
|
|
1320
1320
|
], 544), [
|
|
1321
1321
|
[
|
|
1322
1322
|
Z,
|
|
@@ -1327,13 +1327,13 @@ const lt = te("SunIcon", [
|
|
|
1327
1327
|
]),
|
|
1328
1328
|
q(s("select", {
|
|
1329
1329
|
class: "w-full select-bordered select",
|
|
1330
|
-
"onUpdate:modelValue": h[8] || (h[8] = (
|
|
1330
|
+
"onUpdate:modelValue": h[8] || (h[8] = (c) => k.value.start = c),
|
|
1331
1331
|
onChange: F
|
|
1332
1332
|
}, [
|
|
1333
|
-
(n(!0), a(B, null, P(R(y), (
|
|
1334
|
-
key:
|
|
1335
|
-
value:
|
|
1336
|
-
}, C(
|
|
1333
|
+
(n(!0), a(B, null, P(R(y), (c) => (n(), a("option", {
|
|
1334
|
+
key: c,
|
|
1335
|
+
value: c
|
|
1336
|
+
}, C(c.toString().padStart(2, "0")), 9, ol))), 128))
|
|
1337
1337
|
], 544), [
|
|
1338
1338
|
[
|
|
1339
1339
|
Z,
|
|
@@ -1350,20 +1350,20 @@ const lt = te("SunIcon", [
|
|
|
1350
1350
|
key: 0,
|
|
1351
1351
|
type: "time",
|
|
1352
1352
|
class: "input-bordered w-full input",
|
|
1353
|
-
"onUpdate:modelValue": h[9] || (h[9] = (
|
|
1353
|
+
"onUpdate:modelValue": h[9] || (h[9] = (c) => r.value.end = c),
|
|
1354
1354
|
onChange: F
|
|
1355
1355
|
}, null, 544)), [
|
|
1356
1356
|
[oe, r.value.end]
|
|
1357
1357
|
]) : (n(), a("div", sl, [
|
|
1358
1358
|
q(s("select", {
|
|
1359
1359
|
class: "w-full select-bordered select",
|
|
1360
|
-
"onUpdate:modelValue": h[10] || (h[10] = (
|
|
1360
|
+
"onUpdate:modelValue": h[10] || (h[10] = (c) => m.value.end = c),
|
|
1361
1361
|
onChange: F
|
|
1362
1362
|
}, [
|
|
1363
|
-
(n(!0), a(B, null, P(R(
|
|
1364
|
-
key:
|
|
1365
|
-
value:
|
|
1366
|
-
}, C(
|
|
1363
|
+
(n(!0), a(B, null, P(R(p), (c) => (n(), a("option", {
|
|
1364
|
+
key: c,
|
|
1365
|
+
value: c
|
|
1366
|
+
}, C(c.toString().padStart(2, "0")), 9, rl))), 128))
|
|
1367
1367
|
], 544), [
|
|
1368
1368
|
[
|
|
1369
1369
|
Z,
|
|
@@ -1374,13 +1374,13 @@ const lt = te("SunIcon", [
|
|
|
1374
1374
|
]),
|
|
1375
1375
|
q(s("select", {
|
|
1376
1376
|
class: "w-full select-bordered select",
|
|
1377
|
-
"onUpdate:modelValue": h[11] || (h[11] = (
|
|
1377
|
+
"onUpdate:modelValue": h[11] || (h[11] = (c) => k.value.end = c),
|
|
1378
1378
|
onChange: F
|
|
1379
1379
|
}, [
|
|
1380
|
-
(n(!0), a(B, null, P(R(y), (
|
|
1381
|
-
key:
|
|
1382
|
-
value:
|
|
1383
|
-
}, C(
|
|
1380
|
+
(n(!0), a(B, null, P(R(y), (c) => (n(), a("option", {
|
|
1381
|
+
key: c,
|
|
1382
|
+
value: c
|
|
1383
|
+
}, C(c.toString().padStart(2, "0")), 9, il))), 128))
|
|
1384
1384
|
], 544), [
|
|
1385
1385
|
[
|
|
1386
1386
|
Z,
|
|
@@ -1396,20 +1396,20 @@ const lt = te("SunIcon", [
|
|
|
1396
1396
|
key: 0,
|
|
1397
1397
|
type: "time",
|
|
1398
1398
|
class: "input-bordered w-full input",
|
|
1399
|
-
"onUpdate:modelValue": h[3] || (h[3] = (
|
|
1399
|
+
"onUpdate:modelValue": h[3] || (h[3] = (c) => r.value = c),
|
|
1400
1400
|
onChange: F
|
|
1401
1401
|
}, null, 544)), [
|
|
1402
1402
|
[oe, r.value]
|
|
1403
1403
|
]) : (n(), a("div", Qt, [
|
|
1404
1404
|
q(s("select", {
|
|
1405
1405
|
class: "w-full select-bordered select",
|
|
1406
|
-
"onUpdate:modelValue": h[4] || (h[4] = (
|
|
1406
|
+
"onUpdate:modelValue": h[4] || (h[4] = (c) => m.value = c),
|
|
1407
1407
|
onChange: F
|
|
1408
1408
|
}, [
|
|
1409
|
-
(n(!0), a(B, null, P(R(
|
|
1410
|
-
key:
|
|
1411
|
-
value:
|
|
1412
|
-
}, C(
|
|
1409
|
+
(n(!0), a(B, null, P(R(p), (c) => (n(), a("option", {
|
|
1410
|
+
key: c,
|
|
1411
|
+
value: c
|
|
1412
|
+
}, C(c.toString().padStart(2, "0")), 9, el))), 128))
|
|
1413
1413
|
], 544), [
|
|
1414
1414
|
[
|
|
1415
1415
|
Z,
|
|
@@ -1420,13 +1420,13 @@ const lt = te("SunIcon", [
|
|
|
1420
1420
|
]),
|
|
1421
1421
|
q(s("select", {
|
|
1422
1422
|
class: "w-full select-bordered select",
|
|
1423
|
-
"onUpdate:modelValue": h[5] || (h[5] = (
|
|
1423
|
+
"onUpdate:modelValue": h[5] || (h[5] = (c) => k.value = c),
|
|
1424
1424
|
onChange: F
|
|
1425
1425
|
}, [
|
|
1426
|
-
(n(!0), a(B, null, P(R(y), (
|
|
1427
|
-
key:
|
|
1428
|
-
value:
|
|
1429
|
-
}, C(
|
|
1426
|
+
(n(!0), a(B, null, P(R(y), (c) => (n(), a("option", {
|
|
1427
|
+
key: c,
|
|
1428
|
+
value: c
|
|
1429
|
+
}, C(c.toString().padStart(2, "0")), 9, tl))), 128))
|
|
1430
1430
|
], 544), [
|
|
1431
1431
|
[
|
|
1432
1432
|
Z,
|
|
@@ -1455,7 +1455,7 @@ const lt = te("SunIcon", [
|
|
|
1455
1455
|
}, cl = /* @__PURE__ */ le(dl, [["__scopeId", "data-v-bab9b3c1"]]), pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1456
1456
|
__proto__: null,
|
|
1457
1457
|
default: cl
|
|
1458
|
-
}, Symbol.toStringTag, { value: "Module" })), vl = ["value", "checked", "onChange", "disabled"],
|
|
1458
|
+
}, Symbol.toStringTag, { value: "Module" })), vl = ["value", "checked", "onChange", "disabled"], In = /* @__PURE__ */ L({
|
|
1459
1459
|
__name: "rating",
|
|
1460
1460
|
props: {
|
|
1461
1461
|
initialRating: { default: 0 },
|
|
@@ -1514,14 +1514,14 @@ const lt = te("SunIcon", [
|
|
|
1514
1514
|
},
|
|
1515
1515
|
e.value >= (o.halfStars ? r * 0.5 : r) ? v.color : ""
|
|
1516
1516
|
]]),
|
|
1517
|
-
style:
|
|
1517
|
+
style: re({
|
|
1518
1518
|
marginRight: o.halfStars && r % 2 === 0 ? `${v.gap}px` : o.halfStars ? "0" : `${v.gap}px`
|
|
1519
1519
|
}),
|
|
1520
1520
|
disabled: !o.isInteractive
|
|
1521
1521
|
}, null, 46, vl))), 128))
|
|
1522
1522
|
], 2));
|
|
1523
1523
|
}
|
|
1524
|
-
}), fl = { class: "badge" }, ml = ["onClick"], gl = { class: "opacity-75" }, hl = ["placeholder"],
|
|
1524
|
+
}), fl = { class: "badge" }, ml = ["onClick"], gl = { class: "opacity-75" }, hl = ["placeholder"], Mn = /* @__PURE__ */ L({
|
|
1525
1525
|
__name: "taginput",
|
|
1526
1526
|
props: {
|
|
1527
1527
|
modelValue: {},
|
|
@@ -1531,7 +1531,7 @@ const lt = te("SunIcon", [
|
|
|
1531
1531
|
},
|
|
1532
1532
|
emits: ["update:modelValue"],
|
|
1533
1533
|
setup(i, { emit: v }) {
|
|
1534
|
-
const e = i, t = v, o = x([...e.modelValue]), l = e.maxTagAmount === void 0 ? -1 : e.maxTagAmount, r = x(null), b = x(""),
|
|
1534
|
+
const e = i, t = v, o = x([...e.modelValue]), l = e.maxTagAmount === void 0 ? -1 : e.maxTagAmount, r = x(null), b = x(""), d = E(() => l < 0 || o.value.length < l), m = () => {
|
|
1535
1535
|
const f = b.value.trim();
|
|
1536
1536
|
f && !o.value.includes(f) && (o.value.push(f), t("update:modelValue", o.value), b.value = "");
|
|
1537
1537
|
}, k = (f) => {
|
|
@@ -1546,21 +1546,21 @@ const lt = te("SunIcon", [
|
|
|
1546
1546
|
}), (f, w) => (n(), a("div", {
|
|
1547
1547
|
class: D(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", f.$props.class])
|
|
1548
1548
|
}, [
|
|
1549
|
-
(n(!0), a(B, null, P(o.value, ($) =>
|
|
1549
|
+
(n(!0), a(B, null, P(o.value, ($) => M(f.$slots, "tag", {
|
|
1550
1550
|
key: $,
|
|
1551
1551
|
tag: $
|
|
1552
1552
|
}, () => [
|
|
1553
1553
|
s("div", fl, [
|
|
1554
1554
|
s("button", {
|
|
1555
1555
|
class: "!px-1 !py-0 h-fit font-bold cursor-pointer",
|
|
1556
|
-
onClick: (
|
|
1556
|
+
onClick: (I) => k($),
|
|
1557
1557
|
"aria-label": "Remove tag"
|
|
1558
1558
|
}, "X", 8, ml),
|
|
1559
1559
|
s("span", gl, C($), 1)
|
|
1560
1560
|
])
|
|
1561
1561
|
])), 128)),
|
|
1562
|
-
|
|
1563
|
-
|
|
1562
|
+
M(f.$slots, "input", { showInput: d.value }, () => [
|
|
1563
|
+
d.value ? q((n(), a("input", {
|
|
1564
1564
|
key: 0,
|
|
1565
1565
|
ref_key: "inputRef",
|
|
1566
1566
|
ref: r,
|
|
@@ -1595,30 +1595,30 @@ const lt = te("SunIcon", [
|
|
|
1595
1595
|
emits: ["update:modelValue"],
|
|
1596
1596
|
setup(i, { expose: v, emit: e }) {
|
|
1597
1597
|
console.log(i.placeholder);
|
|
1598
|
-
const o = e, l = x(null), r = (
|
|
1599
|
-
const m =
|
|
1598
|
+
const o = e, l = x(null), r = (d) => {
|
|
1599
|
+
const m = d.target;
|
|
1600
1600
|
o("update:modelValue", m.value);
|
|
1601
1601
|
};
|
|
1602
1602
|
return v({
|
|
1603
1603
|
focusInput: () => {
|
|
1604
|
-
var
|
|
1605
|
-
console.log("select.vue: focusInput method called."), (
|
|
1604
|
+
var d;
|
|
1605
|
+
console.log("select.vue: focusInput method called."), (d = l.value) == null || d.focus();
|
|
1606
1606
|
}
|
|
1607
1607
|
// You can expose other properties or methods here if needed by the parent
|
|
1608
1608
|
// e.g., the current value: modelValue
|
|
1609
|
-
}), (
|
|
1610
|
-
|
|
1611
|
-
s("span", wl, C(
|
|
1609
|
+
}), (d, m) => (n(), a("div", bl, [
|
|
1610
|
+
d.label ? (n(), a("label", yl, [
|
|
1611
|
+
s("span", wl, C(d.label), 1)
|
|
1612
1612
|
])) : O("", !0),
|
|
1613
1613
|
s("select", {
|
|
1614
1614
|
ref_key: "selectElement",
|
|
1615
1615
|
ref: l,
|
|
1616
1616
|
class: "rounded-md w-full select-bordered select",
|
|
1617
|
-
value:
|
|
1617
|
+
value: d.modelValue,
|
|
1618
1618
|
onChange: r
|
|
1619
1619
|
}, [
|
|
1620
|
-
|
|
1621
|
-
(n(!0), a(B, null, P(
|
|
1620
|
+
d.placeholder ? (n(), a("option", $l, C(d.placeholder), 1)) : O("", !0),
|
|
1621
|
+
(n(!0), a(B, null, P(d.options, (k) => (n(), a("option", {
|
|
1622
1622
|
key: k.value,
|
|
1623
1623
|
value: k.value
|
|
1624
1624
|
}, C(k.text), 9, _l))), 128))
|
|
@@ -1628,7 +1628,7 @@ const lt = te("SunIcon", [
|
|
|
1628
1628
|
}), Sl = {
|
|
1629
1629
|
key: 0,
|
|
1630
1630
|
class: "label"
|
|
1631
|
-
}, xl = { class: "label-text" }, Cl = ["onKeydown", "aria-expanded", "aria-activedescendant"],
|
|
1631
|
+
}, xl = { class: "label-text" }, Cl = ["onKeydown", "aria-expanded", "aria-activedescendant"], Il = ["placeholder", "disabled"], Ml = {
|
|
1632
1632
|
class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
|
|
1633
1633
|
role: "listbox"
|
|
1634
1634
|
}, Dl = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, Tl = ["onMousedown", "id", "aria-selected"], Tn = {
|
|
@@ -1660,77 +1660,79 @@ const lt = te("SunIcon", [
|
|
|
1660
1660
|
default: !1
|
|
1661
1661
|
}
|
|
1662
1662
|
},
|
|
1663
|
-
emits: ["update:modelValue", "select"],
|
|
1663
|
+
emits: ["update:modelValue", "select", "clear"],
|
|
1664
1664
|
setup(i, { expose: v, emit: e }) {
|
|
1665
1665
|
const t = i, o = e, l = Ue(), r = E(() => {
|
|
1666
1666
|
const A = (l.default ? l.default() : []).filter((_) => _.type !== Re);
|
|
1667
1667
|
return console.log("hasDefaultSlotContent computed:", A.length > 0), A.length > 0;
|
|
1668
|
-
}), b = x(""),
|
|
1668
|
+
}), b = x(""), d = x(null), m = x(!1), k = x(null), U = x(null), N = x(null), f = x(null), w = () => {
|
|
1669
1669
|
m.value = !t.disabled;
|
|
1670
1670
|
}, $ = () => {
|
|
1671
|
-
m.value = !1, f.value = null, r.value || (
|
|
1672
|
-
},
|
|
1671
|
+
m.value = !1, f.value = null, r.value || (d.value && b.value !== d.value.text ? b.value = d.value.text : d.value || (b.value = ""));
|
|
1672
|
+
}, I = () => {
|
|
1673
1673
|
m.value ? $() : w();
|
|
1674
1674
|
}, z = E(() => {
|
|
1675
|
-
const
|
|
1676
|
-
return
|
|
1677
|
-
(_) => _.text.toLowerCase().includes(
|
|
1675
|
+
const u = b.value.toLowerCase();
|
|
1676
|
+
return u === "" && !m.value ? [] : t.options.filter(
|
|
1677
|
+
(_) => _.text.toLowerCase().includes(u)
|
|
1678
1678
|
);
|
|
1679
1679
|
});
|
|
1680
1680
|
H(
|
|
1681
1681
|
() => t.modelValue,
|
|
1682
|
-
(
|
|
1683
|
-
if (
|
|
1684
|
-
|
|
1682
|
+
(u, A) => {
|
|
1683
|
+
if (u !== A && $(), u == null)
|
|
1684
|
+
d.value = null, !m.value && !r.value && (b.value = "");
|
|
1685
1685
|
else {
|
|
1686
|
-
const _ = t.options.find((V) => V.value ===
|
|
1687
|
-
_ ? (
|
|
1686
|
+
const _ = t.options.find((V) => V.value === u);
|
|
1687
|
+
_ ? (d.value = _, !m.value && !r.value && (b.value = _.text)) : (d.value = null, !m.value && !r.value && (b.value = ""));
|
|
1688
1688
|
}
|
|
1689
1689
|
},
|
|
1690
1690
|
{ immediate: !0 }
|
|
1691
1691
|
// Run immediately on component mount
|
|
1692
1692
|
);
|
|
1693
|
-
const j = (
|
|
1694
|
-
U.value && !U.value.contains(
|
|
1693
|
+
const j = (u) => {
|
|
1694
|
+
U.value && !U.value.contains(u.target) && $();
|
|
1695
1695
|
}, W = () => {
|
|
1696
1696
|
setTimeout(() => {
|
|
1697
1697
|
U.value && !U.value.contains(document.activeElement) && $();
|
|
1698
1698
|
}, 100);
|
|
1699
1699
|
};
|
|
1700
|
-
H(m, (
|
|
1701
|
-
|
|
1700
|
+
H(m, (u) => {
|
|
1701
|
+
u ? setTimeout(() => {
|
|
1702
1702
|
document.addEventListener("click", j);
|
|
1703
1703
|
}, 0) : document.removeEventListener("click", j);
|
|
1704
1704
|
}), ge(() => {
|
|
1705
1705
|
document.removeEventListener("click", j), window.removeEventListener("keydown", T);
|
|
1706
1706
|
});
|
|
1707
1707
|
const Y = () => {
|
|
1708
|
-
t.disabled
|
|
1709
|
-
|
|
1710
|
-
|
|
1708
|
+
if (t.disabled) return;
|
|
1709
|
+
const u = d.value;
|
|
1710
|
+
o("update:modelValue", null), u && o("clear", u);
|
|
1711
|
+
}, p = (u) => {
|
|
1712
|
+
d.value = u, r.value || (b.value = u.text), o("update:modelValue", u.value), o("select", u), $();
|
|
1711
1713
|
}, y = () => {
|
|
1712
|
-
z.value.length > 0 &&
|
|
1714
|
+
z.value.length > 0 && p(z.value[0]);
|
|
1713
1715
|
}, S = () => {
|
|
1714
1716
|
m.value || w();
|
|
1715
|
-
}, T = (
|
|
1717
|
+
}, T = (u) => {
|
|
1716
1718
|
if (!m.value || z.value.length === 0) return;
|
|
1717
1719
|
const A = z.value.findIndex(
|
|
1718
1720
|
(V, K) => "option-" + K === f.value
|
|
1719
1721
|
);
|
|
1720
1722
|
let _ = -1;
|
|
1721
|
-
if (
|
|
1722
|
-
|
|
1723
|
-
else if (
|
|
1724
|
-
|
|
1725
|
-
else if (
|
|
1726
|
-
|
|
1723
|
+
if (u.key === "ArrowDown")
|
|
1724
|
+
u.preventDefault(), _ = (A + 1) % z.value.length;
|
|
1725
|
+
else if (u.key === "ArrowUp")
|
|
1726
|
+
u.preventDefault(), _ = (A - 1 + z.value.length) % z.value.length;
|
|
1727
|
+
else if (u.key === "Enter" && f.value) {
|
|
1728
|
+
u.preventDefault();
|
|
1727
1729
|
const V = z.value.find(
|
|
1728
1730
|
(K, J) => "option-" + J === f.value
|
|
1729
1731
|
);
|
|
1730
|
-
V &&
|
|
1732
|
+
V && p(V);
|
|
1731
1733
|
return;
|
|
1732
|
-
} else if (
|
|
1733
|
-
|
|
1734
|
+
} else if (u.key === "Escape") {
|
|
1735
|
+
u.preventDefault(), $(), N.value && N.value.focus();
|
|
1734
1736
|
return;
|
|
1735
1737
|
} else if (r.value)
|
|
1736
1738
|
return;
|
|
@@ -1742,28 +1744,28 @@ const lt = te("SunIcon", [
|
|
|
1742
1744
|
});
|
|
1743
1745
|
}
|
|
1744
1746
|
};
|
|
1745
|
-
return H(m, (
|
|
1746
|
-
|
|
1747
|
+
return H(m, (u) => {
|
|
1748
|
+
u ? (window.addEventListener("keydown", T), !r.value && !b.value && d.value && (b.value = d.value.text)) : window.removeEventListener("keydown", T);
|
|
1747
1749
|
}), ge(() => {
|
|
1748
1750
|
document.removeEventListener("click", j), window.removeEventListener("keydown", T);
|
|
1749
1751
|
}), v({
|
|
1750
1752
|
isDropdownOpen: m,
|
|
1751
1753
|
// Expose state
|
|
1752
|
-
selectedItem:
|
|
1754
|
+
selectedItem: d,
|
|
1753
1755
|
// Expose selected item
|
|
1754
1756
|
openDropdown: w,
|
|
1755
1757
|
// Expose method to open
|
|
1756
1758
|
closeDropdown: $,
|
|
1757
1759
|
// Expose method to close
|
|
1758
|
-
toggleDropdown:
|
|
1760
|
+
toggleDropdown: I,
|
|
1759
1761
|
// Expose method to toggle
|
|
1760
|
-
selectItem:
|
|
1762
|
+
selectItem: p,
|
|
1761
1763
|
// Expose method to select an item programmatically
|
|
1762
1764
|
filterText: b,
|
|
1763
1765
|
// Expose filter text (useful if parent controls filtering)
|
|
1764
1766
|
hasDefaultSlotContent: r
|
|
1765
1767
|
// Expose to know if the default slot is used
|
|
1766
|
-
}), (
|
|
1768
|
+
}), (u, A) => (n(), a("div", {
|
|
1767
1769
|
class: "relative w-full max-w-xs form-control",
|
|
1768
1770
|
ref_key: "componentRoot",
|
|
1769
1771
|
ref: U
|
|
@@ -1773,8 +1775,11 @@ const lt = te("SunIcon", [
|
|
|
1773
1775
|
])) : O("", !0),
|
|
1774
1776
|
s("div", {
|
|
1775
1777
|
class: D(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !r.value, select: !r.value }]),
|
|
1778
|
+
style: re(
|
|
1779
|
+
d.value ? "background-image: unset; padding-right: 0.5rem;" : ""
|
|
1780
|
+
),
|
|
1776
1781
|
tabindex: "0",
|
|
1777
|
-
onClick: A[1] || (A[1] = (_) => r.value ?
|
|
1782
|
+
onClick: A[1] || (A[1] = (_) => r.value ? I() : w()),
|
|
1778
1783
|
onKeydown: [
|
|
1779
1784
|
he(Q(y, ["prevent"]), ["enter"]),
|
|
1780
1785
|
he(Q(y, ["prevent"]), ["space"])
|
|
@@ -1788,7 +1793,7 @@ const lt = te("SunIcon", [
|
|
|
1788
1793
|
ref_key: "activatorWrapper",
|
|
1789
1794
|
ref: N
|
|
1790
1795
|
}, [
|
|
1791
|
-
|
|
1796
|
+
M(u.$slots, "default", {}, () => [
|
|
1792
1797
|
r.value ? O("", !0) : q((n(), a("input", {
|
|
1793
1798
|
key: 0,
|
|
1794
1799
|
type: "text",
|
|
@@ -1801,31 +1806,31 @@ const lt = te("SunIcon", [
|
|
|
1801
1806
|
onInput: S,
|
|
1802
1807
|
tabindex: "-1",
|
|
1803
1808
|
disabled: t.disabled
|
|
1804
|
-
}, null, 40,
|
|
1809
|
+
}, null, 40, Il)), [
|
|
1805
1810
|
[oe, b.value]
|
|
1806
1811
|
])
|
|
1807
1812
|
]),
|
|
1808
|
-
|
|
1813
|
+
d.value && !i.disabled ? (n(), ae(R(et), {
|
|
1809
1814
|
key: 0,
|
|
1810
1815
|
size: 20,
|
|
1811
1816
|
class: "mx-2 text-base-content/50 hover:text-base-content/80 cursor-pointer",
|
|
1812
1817
|
onClick: Q(Y, ["stop"])
|
|
1813
1818
|
})) : O("", !0),
|
|
1814
|
-
r.value && !
|
|
1819
|
+
r.value && !d.value ? (n(), ae(R(Qe), {
|
|
1815
1820
|
key: 1,
|
|
1816
1821
|
class: D([{ "rotate-180": m.value }, "mx-2"]),
|
|
1817
1822
|
size: 20
|
|
1818
1823
|
}, null, 8, ["class"])) : O("", !0)
|
|
1819
|
-
],
|
|
1820
|
-
q(s("div",
|
|
1824
|
+
], 46, Cl),
|
|
1825
|
+
q(s("div", Ml, [
|
|
1821
1826
|
s("ul", Dl, [
|
|
1822
1827
|
(n(!0), a(B, null, P(z.value, (_, V) => (n(), a("li", {
|
|
1823
1828
|
key: _.value,
|
|
1824
|
-
onMousedown: Q((K) =>
|
|
1829
|
+
onMousedown: Q((K) => p(_), ["prevent"]),
|
|
1825
1830
|
class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
|
|
1826
1831
|
id: "option-" + V,
|
|
1827
1832
|
role: "option",
|
|
1828
|
-
"aria-selected":
|
|
1833
|
+
"aria-selected": d.value && d.value.value === _.value
|
|
1829
1834
|
}, [
|
|
1830
1835
|
s("a", null, C(_.text), 1)
|
|
1831
1836
|
], 40, Tl))), 128))
|
|
@@ -1861,35 +1866,35 @@ const lt = te("SunIcon", [
|
|
|
1861
1866
|
},
|
|
1862
1867
|
emits: ["update:modelValue", "validate"],
|
|
1863
1868
|
setup(i, { expose: v, emit: e }) {
|
|
1864
|
-
const t = i, o = e, l = x(null), r = x(!1), b = x(""),
|
|
1865
|
-
var
|
|
1869
|
+
const t = i, o = e, l = x(null), r = x(!1), b = x(""), d = E(() => {
|
|
1870
|
+
var I, z, j, W;
|
|
1866
1871
|
let f = !0, w = "";
|
|
1867
1872
|
const $ = t.modelValue;
|
|
1868
|
-
return (
|
|
1869
|
-
}), m = E(() => r.value && !
|
|
1873
|
+
return (I = t.rules) != null && I.required && ($ == null || $ === "") && (f = !1, w = "This field is required."), f && ((z = t.rules) == null ? void 0 : z.minLength) !== void 0 && typeof $ == "string" && $.length < t.rules.minLength && (f = !1, w = `Must be at least ${t.rules.minLength} characters.`), f && ((j = t.rules) == null ? void 0 : j.maxLength) !== void 0 && typeof $ == "string" && $.length > t.rules.maxLength && (f = !1, w = `Cannot exceed ${t.rules.maxLength} characters.`), f && ((W = t.rules) != null && W.email) && typeof $ == "string" && $ && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($) || (f = !1, w = "Please enter a valid email address.")), b.value = w, o("validate", f), f;
|
|
1874
|
+
}), m = E(() => r.value && !d.value), k = (f) => {
|
|
1870
1875
|
const w = f.target;
|
|
1871
|
-
o("update:modelValue", w.value), r.value &&
|
|
1876
|
+
o("update:modelValue", w.value), r.value && d.value;
|
|
1872
1877
|
}, U = () => {
|
|
1873
|
-
r.value = !0,
|
|
1878
|
+
r.value = !0, d.value;
|
|
1874
1879
|
};
|
|
1875
1880
|
return H(
|
|
1876
1881
|
() => t.modelValue,
|
|
1877
1882
|
() => {
|
|
1878
|
-
r.value &&
|
|
1883
|
+
r.value && d.value;
|
|
1879
1884
|
}
|
|
1880
1885
|
), v({
|
|
1881
1886
|
focusInput: () => {
|
|
1882
1887
|
var f;
|
|
1883
1888
|
console.log("inputField.vue: focusInput method called."), (f = l.value) == null || f.focus();
|
|
1884
1889
|
},
|
|
1885
|
-
isValid:
|
|
1890
|
+
isValid: d,
|
|
1886
1891
|
isTouched: r,
|
|
1887
1892
|
errorMessage: b
|
|
1888
1893
|
}), (f, w) => (n(), a("div", Vl, [
|
|
1889
1894
|
f.label ? (n(), a("label", Bl, [
|
|
1890
1895
|
s("span", Ol, C(f.label), 1)
|
|
1891
1896
|
])) : O("", !0),
|
|
1892
|
-
|
|
1897
|
+
M(f.$slots, "default"),
|
|
1893
1898
|
s("input", {
|
|
1894
1899
|
ref_key: "inputElement",
|
|
1895
1900
|
ref: l,
|
|
@@ -1908,18 +1913,18 @@ const lt = te("SunIcon", [
|
|
|
1908
1913
|
"input-ghost": f.style === "ghost",
|
|
1909
1914
|
// Color classes - Apply only if NOT in an error state AND NOT in a validation success state.
|
|
1910
1915
|
// This ensures validation feedback overrides base colors.
|
|
1911
|
-
"input-neutral": f.color === "neutral" && !m.value && !(
|
|
1912
|
-
"input-primary": f.color === "primary" && !m.value && !(
|
|
1913
|
-
"input-secondary": f.color === "secondary" && !m.value && !(
|
|
1914
|
-
"input-accent": f.color === "accent" && !m.value && !(
|
|
1915
|
-
"input-info": f.color === "info" && !m.value && !(
|
|
1916
|
-
"input-success": f.color === "success" && !m.value && !(
|
|
1916
|
+
"input-neutral": f.color === "neutral" && !m.value && !(d.value && r.value && f.needsValidation),
|
|
1917
|
+
"input-primary": f.color === "primary" && !m.value && !(d.value && r.value && f.needsValidation),
|
|
1918
|
+
"input-secondary": f.color === "secondary" && !m.value && !(d.value && r.value && f.needsValidation),
|
|
1919
|
+
"input-accent": f.color === "accent" && !m.value && !(d.value && r.value && f.needsValidation),
|
|
1920
|
+
"input-info": f.color === "info" && !m.value && !(d.value && r.value && f.needsValidation),
|
|
1921
|
+
"input-success": f.color === "success" && !m.value && !(d.value && r.value && f.needsValidation),
|
|
1917
1922
|
// Color success applies only if not in error or validation success state
|
|
1918
|
-
"input-warning": f.color === "warning" && !m.value && !(
|
|
1923
|
+
"input-warning": f.color === "warning" && !m.value && !(d.value && r.value && f.needsValidation),
|
|
1919
1924
|
// Validation state classes - These take precedence visually via conditions or CSS specificity.
|
|
1920
1925
|
"input-error": m.value,
|
|
1921
1926
|
// Apply error style if validation fails
|
|
1922
|
-
"input-success-validation":
|
|
1927
|
+
"input-success-validation": d.value && r.value && !m.value && f.needsValidation
|
|
1923
1928
|
// 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.
|
|
1924
1929
|
}
|
|
1925
1930
|
]]),
|
|
@@ -1929,7 +1934,7 @@ const lt = te("SunIcon", [
|
|
|
1929
1934
|
}, null, 42, zl),
|
|
1930
1935
|
m.value ? (n(), a("div", Al, [
|
|
1931
1936
|
s("span", Pl, C(b.value), 1)
|
|
1932
|
-
])) :
|
|
1937
|
+
])) : d.value && r.value && f.successMessage ? (n(), a("div", El, [
|
|
1933
1938
|
s("span", Ll, C(f.successMessage), 1)
|
|
1934
1939
|
])) : O("", !0)
|
|
1935
1940
|
]));
|
|
@@ -2023,7 +2028,7 @@ const lt = te("SunIcon", [
|
|
|
2023
2028
|
]))), 256))
|
|
2024
2029
|
])) : O("", !0),
|
|
2025
2030
|
s("aside", Xl, [
|
|
2026
|
-
|
|
2031
|
+
M(e.$slots, "default")
|
|
2027
2032
|
])
|
|
2028
2033
|
])
|
|
2029
2034
|
], 2));
|
|
@@ -2034,14 +2039,14 @@ function tn(i, v) {
|
|
|
2034
2039
|
s("div", Ql, [
|
|
2035
2040
|
s("div", null, [
|
|
2036
2041
|
s("h1", en, [
|
|
2037
|
-
|
|
2042
|
+
M(i.$slots, "title", {}, () => [
|
|
2038
2043
|
v[0] || (v[0] = ke("hero title"))
|
|
2039
2044
|
])
|
|
2040
2045
|
]),
|
|
2041
2046
|
s("p", null, [
|
|
2042
|
-
|
|
2047
|
+
M(i.$slots, "description", { class: "py-9" })
|
|
2043
2048
|
]),
|
|
2044
|
-
|
|
2049
|
+
M(i.$slots, "call-to-action-block", { class: "max-w-full" }, () => [
|
|
2045
2050
|
v[1] || (v[1] = s("button", { class: "btn btn-primary" }, "Call to action", -1))
|
|
2046
2051
|
])
|
|
2047
2052
|
])
|
|
@@ -2065,7 +2070,7 @@ const zn = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-ro
|
|
|
2065
2070
|
key: b.category
|
|
2066
2071
|
}, [
|
|
2067
2072
|
s("button", {
|
|
2068
|
-
onClick: (
|
|
2073
|
+
onClick: (d) => o(b.category),
|
|
2069
2074
|
class: D(["truncate btn btn-ghost", { "font-semibold": e.currentCategory === b.category }])
|
|
2070
2075
|
}, C(b.category), 11, nn)
|
|
2071
2076
|
]))), 128))
|
|
@@ -2082,16 +2087,16 @@ const zn = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-ro
|
|
|
2082
2087
|
class: D(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar", v.isCollapsed ? "collapsed" : ""])
|
|
2083
2088
|
}, [
|
|
2084
2089
|
s("div", an, [
|
|
2085
|
-
|
|
2090
|
+
M(e.$slots, "start", {}, void 0, !0)
|
|
2086
2091
|
]),
|
|
2087
2092
|
s("div", on, [
|
|
2088
|
-
|
|
2093
|
+
M(e.$slots, "center", {}, void 0, !0)
|
|
2089
2094
|
]),
|
|
2090
2095
|
s("div", sn, [
|
|
2091
|
-
|
|
2096
|
+
M(e.$slots, "end", {}, void 0, !0)
|
|
2092
2097
|
]),
|
|
2093
2098
|
s("div", rn, [
|
|
2094
|
-
|
|
2099
|
+
M(e.$slots, "bottom", {}, void 0, !0)
|
|
2095
2100
|
])
|
|
2096
2101
|
], 2));
|
|
2097
2102
|
}
|
|
@@ -2113,8 +2118,8 @@ const zn = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-ro
|
|
|
2113
2118
|
emits: ["tab-changed"],
|
|
2114
2119
|
setup(i, { emit: v }) {
|
|
2115
2120
|
const e = i, t = x(e.items[0]), o = v;
|
|
2116
|
-
function l(
|
|
2117
|
-
t.value =
|
|
2121
|
+
function l(d) {
|
|
2122
|
+
t.value = d, o("tab-changed", d);
|
|
2118
2123
|
}
|
|
2119
2124
|
function r() {
|
|
2120
2125
|
const m = (e.items.indexOf(t.value) + 1) % e.items.length;
|
|
@@ -2130,12 +2135,12 @@ const zn = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-ro
|
|
|
2130
2135
|
e.rotateTabsAfter && e.rotateTabsAfter > 0 && setInterval(() => {
|
|
2131
2136
|
r();
|
|
2132
2137
|
}, e.rotateTabsAfter * 1e3);
|
|
2133
|
-
}), (
|
|
2138
|
+
}), (d, m) => (n(), a(B, null, [
|
|
2134
2139
|
s("div", {
|
|
2135
2140
|
role: "tablist",
|
|
2136
|
-
class: D(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto":
|
|
2141
|
+
class: D(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto": d.buttonOnlyMode }])
|
|
2137
2142
|
}, [
|
|
2138
|
-
|
|
2143
|
+
d.withControlls ? (n(), a("div", dn, [
|
|
2139
2144
|
s("button", {
|
|
2140
2145
|
onClick: m[0] || (m[0] = (k) => b()),
|
|
2141
2146
|
class: "cursor-pointer"
|
|
@@ -2145,7 +2150,7 @@ const zn = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-ro
|
|
|
2145
2150
|
class: "text-primary cursor-pointer"
|
|
2146
2151
|
}, "Next")
|
|
2147
2152
|
])) : O("", !0),
|
|
2148
|
-
(n(!0), a(B, null, P(
|
|
2153
|
+
(n(!0), a(B, null, P(d.items, (k) => (n(), a(B, null, [
|
|
2149
2154
|
s("a", {
|
|
2150
2155
|
type: "button",
|
|
2151
2156
|
role: "tab",
|
|
@@ -2153,13 +2158,13 @@ const zn = /* @__PURE__ */ le(Gl, [["render", tn]]), ln = { class: "flex flex-ro
|
|
|
2153
2158
|
onClick: (U) => l(k),
|
|
2154
2159
|
"aria-selected": t.value == k
|
|
2155
2160
|
}, C(k), 11, cn),
|
|
2156
|
-
|
|
2157
|
-
|
|
2161
|
+
d.buttonOnlyMode ? O("", !0) : (n(), a("div", pn, [
|
|
2162
|
+
M(d.$slots, `${k}-tab`)
|
|
2158
2163
|
]))
|
|
2159
2164
|
], 64))), 256))
|
|
2160
2165
|
], 2),
|
|
2161
2166
|
s("div", vn, [
|
|
2162
|
-
|
|
2167
|
+
M(d.$slots, "default")
|
|
2163
2168
|
])
|
|
2164
2169
|
], 64));
|
|
2165
2170
|
}
|
|
@@ -2183,10 +2188,10 @@ export {
|
|
|
2183
2188
|
Bn as Loader,
|
|
2184
2189
|
hn as Modal,
|
|
2185
2190
|
Pn as NavigationBar,
|
|
2186
|
-
|
|
2191
|
+
In as Rating,
|
|
2187
2192
|
Dn as Selector,
|
|
2188
2193
|
bn as Swap,
|
|
2189
2194
|
En as Tab,
|
|
2190
|
-
|
|
2195
|
+
Mn as TagInput,
|
|
2191
2196
|
yn as ThemeController
|
|
2192
2197
|
};
|