manolis-ui 0.19.3 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/manolis-ui.css +1 -1
- package/dist/manolis-ui.js +652 -694
- package/dist/manolis-ui.umd.cjs +10 -10
- package/package.json +1 -1
package/dist/manolis-ui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as P, computed as H, createElementBlock as i, openBlock as o, normalizeClass as C, createCommentVNode as z, renderSlot as T, createTextVNode as Re, createElementVNode as a, Fragment as q, renderList as X, toDisplayString as B, ref as h, watch as N, h as Oe, onMounted as de, withDirectives as Ie, createVNode as se, isRef as We, vModelCheckbox as Ke, unref as ee, provide as Xe, onUnmounted as _e, normalizeStyle as ye, Transition as je, withCtx as be, inject as Ye, useId as Ge, defineAsyncComponent as ze, nextTick as me, onBeforeUnmount as Ve, withModifiers as oe, createBlock as re, resolveDynamicComponent as Te, mergeProps as Be, withKeys as pe, resolveComponent as De, vModelText as Ae, useSlots as Je, Comment as Ze, vShow as Qe, readonly as et, TransitionGroup as tt } from "vue";
|
|
2
2
|
const lt = ["disabled"], at = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "loading loading-spinner"
|
|
5
|
-
}, Va = /* @__PURE__ */
|
|
5
|
+
}, Va = /* @__PURE__ */ P({
|
|
6
6
|
__name: "ButtonComponent",
|
|
7
7
|
props: {
|
|
8
8
|
outlined: { type: Boolean, default: !1 },
|
|
@@ -14,7 +14,7 @@ const lt = ["disabled"], at = {
|
|
|
14
14
|
disabled: { type: Boolean, default: !1 }
|
|
15
15
|
},
|
|
16
16
|
setup(e) {
|
|
17
|
-
const c = e, l =
|
|
17
|
+
const c = e, l = H(() => {
|
|
18
18
|
switch (c.size) {
|
|
19
19
|
case "large":
|
|
20
20
|
return "btn-lg";
|
|
@@ -29,7 +29,7 @@ const lt = ["disabled"], at = {
|
|
|
29
29
|
default:
|
|
30
30
|
return "";
|
|
31
31
|
}
|
|
32
|
-
}), t =
|
|
32
|
+
}), t = H(() => {
|
|
33
33
|
switch (c.type) {
|
|
34
34
|
case "neutral":
|
|
35
35
|
return "btn-neutral";
|
|
@@ -54,7 +54,7 @@ const lt = ["disabled"], at = {
|
|
|
54
54
|
default:
|
|
55
55
|
return "btn-neutral";
|
|
56
56
|
}
|
|
57
|
-
}), s =
|
|
57
|
+
}), s = H(() => {
|
|
58
58
|
switch (c.shape) {
|
|
59
59
|
case "square":
|
|
60
60
|
return "btn-square";
|
|
@@ -65,7 +65,7 @@ const lt = ["disabled"], at = {
|
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
return (n, r) => (o(), i("button", {
|
|
68
|
-
class:
|
|
68
|
+
class: C([
|
|
69
69
|
"btn",
|
|
70
70
|
{ "btn-outline": c.outlined },
|
|
71
71
|
{ "btn-active": c.active },
|
|
@@ -76,15 +76,15 @@ const lt = ["disabled"], at = {
|
|
|
76
76
|
disabled: c.disabled
|
|
77
77
|
}, [
|
|
78
78
|
e.loading ? (o(), i("span", at)) : z("", !0),
|
|
79
|
-
|
|
80
|
-
r[0] || (r[0] =
|
|
79
|
+
T(n.$slots, "default", {}, () => [
|
|
80
|
+
r[0] || (r[0] = Re("Submit", -1))
|
|
81
81
|
])
|
|
82
82
|
], 10, lt));
|
|
83
83
|
}
|
|
84
84
|
}), nt = {
|
|
85
85
|
tabindex: "0",
|
|
86
86
|
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"
|
|
87
|
-
}, ot = ["href"], _a = /* @__PURE__ */
|
|
87
|
+
}, ot = ["href"], _a = /* @__PURE__ */ P({
|
|
88
88
|
__name: "dropdown",
|
|
89
89
|
props: {
|
|
90
90
|
items: {},
|
|
@@ -104,25 +104,25 @@ const lt = ["disabled"], at = {
|
|
|
104
104
|
end: "dropdown-end"
|
|
105
105
|
}, t = e;
|
|
106
106
|
return (s, n) => (o(), i("div", {
|
|
107
|
-
class:
|
|
107
|
+
class: C(["dropdown", c[t.position], l[t.floatPosition], { "dropdown-open": t.forceOpen }, { "dropdown-hover": t.openOnHover }])
|
|
108
108
|
}, [
|
|
109
|
-
|
|
109
|
+
T(s.$slots, "default", {
|
|
110
110
|
tabindex: "0",
|
|
111
111
|
role: "button"
|
|
112
112
|
}, () => [
|
|
113
113
|
n[0] || (n[0] = a("div", { class: "m-1 btn" }, "Open dropdown", -1))
|
|
114
114
|
]),
|
|
115
115
|
a("ul", nt, [
|
|
116
|
-
(o(!0), i(
|
|
116
|
+
(o(!0), i(q, null, X(e.items, (r) => (o(), i("li", null, [
|
|
117
117
|
a("a", {
|
|
118
118
|
href: r.link
|
|
119
|
-
},
|
|
119
|
+
}, B(r.text), 9, ot)
|
|
120
120
|
]))), 256)),
|
|
121
|
-
|
|
121
|
+
T(s.$slots, "additional")
|
|
122
122
|
])
|
|
123
123
|
], 2));
|
|
124
124
|
}
|
|
125
|
-
}), st = { class: "modal-box" }, it = { class: "modal-action" }, Ea = /* @__PURE__ */
|
|
125
|
+
}), st = { class: "modal-box" }, it = { class: "modal-action" }, Ea = /* @__PURE__ */ P({
|
|
126
126
|
__name: "modal",
|
|
127
127
|
props: {
|
|
128
128
|
position: { default: "center" },
|
|
@@ -141,36 +141,36 @@ const lt = ["disabled"], at = {
|
|
|
141
141
|
var r;
|
|
142
142
|
(r = t.value) == null || r.close();
|
|
143
143
|
};
|
|
144
|
-
return
|
|
144
|
+
return N(
|
|
145
145
|
() => c.forceOpen,
|
|
146
146
|
(r) => {
|
|
147
147
|
r == !0 && s(), r == !1 && n();
|
|
148
148
|
}
|
|
149
|
-
), (r, m) => (o(), i(
|
|
149
|
+
), (r, m) => (o(), i(q, null, [
|
|
150
150
|
c.forceOpen == null ? (o(), i("span", {
|
|
151
151
|
key: 0,
|
|
152
152
|
class: "w-fit cursor-pointer",
|
|
153
153
|
onClick: s
|
|
154
154
|
}, [
|
|
155
|
-
|
|
155
|
+
T(r.$slots, "trigger", { role: "button" }, () => [
|
|
156
156
|
m[0] || (m[0] = a("button", { class: "btn" }, "Open", -1))
|
|
157
157
|
])
|
|
158
158
|
])) : z("", !0),
|
|
159
159
|
a("dialog", {
|
|
160
160
|
ref_key: "dialog",
|
|
161
161
|
ref: t,
|
|
162
|
-
class:
|
|
162
|
+
class: C(["modal", l[c.position]])
|
|
163
163
|
}, [
|
|
164
164
|
a("div", st, [
|
|
165
|
-
|
|
165
|
+
T(r.$slots, "default"),
|
|
166
166
|
a("div", it, [
|
|
167
|
-
|
|
167
|
+
T(r.$slots, "actions"),
|
|
168
168
|
a("form", {
|
|
169
169
|
method: "dialog",
|
|
170
170
|
onSubmit: n,
|
|
171
|
-
class:
|
|
171
|
+
class: C(e.withBackdrop ? "modal-backdrop" : "")
|
|
172
172
|
}, [
|
|
173
|
-
|
|
173
|
+
T(r.$slots, "close-button", {}, () => [
|
|
174
174
|
m[1] || (m[1] = a("button", { class: "btn" }, "Close", -1))
|
|
175
175
|
])
|
|
176
176
|
], 34)
|
|
@@ -179,7 +179,7 @@ const lt = ["disabled"], at = {
|
|
|
179
179
|
], 2)
|
|
180
180
|
], 64));
|
|
181
181
|
}
|
|
182
|
-
}), rt = { class: "flex justify-center items-center swap-on" }, ut = { class: "flex justify-center items-center swap-off" },
|
|
182
|
+
}), rt = { class: "flex justify-center items-center swap-on" }, ut = { class: "flex justify-center items-center swap-off" }, La = /* @__PURE__ */ P({
|
|
183
183
|
__name: "swap",
|
|
184
184
|
props: {
|
|
185
185
|
effect: {}
|
|
@@ -187,14 +187,14 @@ const lt = ["disabled"], at = {
|
|
|
187
187
|
setup(e) {
|
|
188
188
|
const c = e;
|
|
189
189
|
return (l, t) => (o(), i("label", {
|
|
190
|
-
class:
|
|
190
|
+
class: C(["swap", c.effect ? `swap-${e.effect}` : ""])
|
|
191
191
|
}, [
|
|
192
192
|
t[0] || (t[0] = a("input", { type: "checkbox" }, null, -1)),
|
|
193
193
|
a("div", rt, [
|
|
194
|
-
|
|
194
|
+
T(l.$slots, "on")
|
|
195
195
|
]),
|
|
196
196
|
a("div", ut, [
|
|
197
|
-
|
|
197
|
+
T(l.$slots, "off")
|
|
198
198
|
])
|
|
199
199
|
], 2));
|
|
200
200
|
}
|
|
@@ -229,7 +229,7 @@ var Ce = {
|
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
231
|
*/
|
|
232
|
-
const dt = ({ size: e, strokeWidth: c = 2, absoluteStrokeWidth: l, color: t, iconNode: s, name: n, class: r, ...m }, { slots: u }) =>
|
|
232
|
+
const dt = ({ size: e, strokeWidth: c = 2, absoluteStrokeWidth: l, color: t, iconNode: s, name: n, class: r, ...m }, { slots: u }) => Oe(
|
|
233
233
|
"svg",
|
|
234
234
|
{
|
|
235
235
|
...Ce,
|
|
@@ -240,7 +240,7 @@ const dt = ({ size: e, strokeWidth: c = 2, absoluteStrokeWidth: l, color: t, ico
|
|
|
240
240
|
class: ["lucide", `lucide-${ct(n ?? "icon")}`],
|
|
241
241
|
...m
|
|
242
242
|
},
|
|
243
|
-
[...s.map((g) =>
|
|
243
|
+
[...s.map((g) => Oe(...g)), ...u.default ? [u.default()] : []]
|
|
244
244
|
);
|
|
245
245
|
/**
|
|
246
246
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
@@ -248,7 +248,7 @@ const dt = ({ size: e, strokeWidth: c = 2, absoluteStrokeWidth: l, color: t, ico
|
|
|
248
248
|
* This source code is licensed under the ISC license.
|
|
249
249
|
* See the LICENSE file in the root directory of this source tree.
|
|
250
250
|
*/
|
|
251
|
-
const
|
|
251
|
+
const we = (e, c) => (l, { slots: t }) => Oe(
|
|
252
252
|
dt,
|
|
253
253
|
{
|
|
254
254
|
...l,
|
|
@@ -263,7 +263,7 @@ const ke = (e, c) => (l, { slots: t }) => Ve(
|
|
|
263
263
|
* This source code is licensed under the ISC license.
|
|
264
264
|
* See the LICENSE file in the root directory of this source tree.
|
|
265
265
|
*/
|
|
266
|
-
const vt =
|
|
266
|
+
const vt = we("CircleChevronDownIcon", [
|
|
267
267
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
268
268
|
["path", { d: "m16 10-4 4-4-4", key: "894hmk" }]
|
|
269
269
|
]);
|
|
@@ -273,7 +273,7 @@ const vt = ke("CircleChevronDownIcon", [
|
|
|
273
273
|
* This source code is licensed under the ISC license.
|
|
274
274
|
* See the LICENSE file in the root directory of this source tree.
|
|
275
275
|
*/
|
|
276
|
-
const ft =
|
|
276
|
+
const ft = we("CircleXIcon", [
|
|
277
277
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
278
278
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
279
279
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -284,7 +284,7 @@ const ft = ke("CircleXIcon", [
|
|
|
284
284
|
* This source code is licensed under the ISC license.
|
|
285
285
|
* See the LICENSE file in the root directory of this source tree.
|
|
286
286
|
*/
|
|
287
|
-
const mt =
|
|
287
|
+
const mt = we("MoonIcon", [
|
|
288
288
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
289
289
|
]);
|
|
290
290
|
/**
|
|
@@ -293,7 +293,7 @@ const mt = ke("MoonIcon", [
|
|
|
293
293
|
* This source code is licensed under the ISC license.
|
|
294
294
|
* See the LICENSE file in the root directory of this source tree.
|
|
295
295
|
*/
|
|
296
|
-
const
|
|
296
|
+
const Pe = we("SearchIcon", [
|
|
297
297
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
298
298
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
299
299
|
]);
|
|
@@ -303,7 +303,7 @@ const Re = ke("SearchIcon", [
|
|
|
303
303
|
* This source code is licensed under the ISC license.
|
|
304
304
|
* See the LICENSE file in the root directory of this source tree.
|
|
305
305
|
*/
|
|
306
|
-
const pt =
|
|
306
|
+
const pt = we("SunIcon", [
|
|
307
307
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
308
308
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
309
309
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -315,15 +315,15 @@ const pt = ke("SunIcon", [
|
|
|
315
315
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
316
316
|
]), ht = (e, c) => {
|
|
317
317
|
const l = h(null);
|
|
318
|
-
return
|
|
318
|
+
return de(() => {
|
|
319
319
|
if (typeof window < "u") {
|
|
320
320
|
const t = window.localStorage.getItem(e);
|
|
321
321
|
l.value = t ? JSON.parse(t) : c;
|
|
322
322
|
}
|
|
323
|
-
}),
|
|
323
|
+
}), N(l, (t) => {
|
|
324
324
|
typeof window < "u" && window.localStorage.setItem(e, JSON.stringify(t));
|
|
325
325
|
}), l;
|
|
326
|
-
}, gt = { class: "swap-rotate swap" }, bt = ["true-value", "false-value"],
|
|
326
|
+
}, gt = { class: "swap-rotate swap" }, bt = ["true-value", "false-value"], ja = /* @__PURE__ */ P({
|
|
327
327
|
__name: "theme-controller",
|
|
328
328
|
props: {
|
|
329
329
|
lightTheme: { default: "light" },
|
|
@@ -334,7 +334,7 @@ const pt = ke("SunIcon", [
|
|
|
334
334
|
function t(s) {
|
|
335
335
|
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", s);
|
|
336
336
|
}
|
|
337
|
-
return
|
|
337
|
+
return de(() => t(l.value ? l.value : "")), N(l, (s) => {
|
|
338
338
|
t(s);
|
|
339
339
|
}), (s, n) => (o(), i("label", gt, [
|
|
340
340
|
Ie(a("input", {
|
|
@@ -344,10 +344,10 @@ const pt = ke("SunIcon", [
|
|
|
344
344
|
"true-value": c.lightTheme,
|
|
345
345
|
"false-value": c.darkTheme
|
|
346
346
|
}, null, 8, bt), [
|
|
347
|
-
[Ke,
|
|
347
|
+
[Ke, ee(l)]
|
|
348
348
|
]),
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
se(ee(pt), { class: "swap-off fill-current" }),
|
|
350
|
+
se(ee(mt), { class: "swap-on fill-current" })
|
|
351
351
|
]));
|
|
352
352
|
}
|
|
353
353
|
}), yt = {
|
|
@@ -359,7 +359,7 @@ const pt = ke("SunIcon", [
|
|
|
359
359
|
}, kt = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, $t = { class: "collapse-content" }, Ct = ["innerHTML"], St = ["name"], It = {
|
|
360
360
|
key: 1,
|
|
361
361
|
type: "checkbox"
|
|
362
|
-
}, Mt = { class: "collapse-title font-bold text-2xl lg:text-4xl" },
|
|
362
|
+
}, Mt = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, zt = { class: "collapse-content" }, Tt = ["innerHTML"], Pa = /* @__PURE__ */ P({
|
|
363
363
|
__name: "accordion",
|
|
364
364
|
props: {
|
|
365
365
|
name: {},
|
|
@@ -371,8 +371,8 @@ const pt = ke("SunIcon", [
|
|
|
371
371
|
setup(e) {
|
|
372
372
|
const c = e;
|
|
373
373
|
return (l, t) => c.joinItems ? (o(), i("div", yt, [
|
|
374
|
-
(o(!0), i(
|
|
375
|
-
class:
|
|
374
|
+
(o(!0), i(q, null, X(c.items, (s, n) => (o(), i("div", {
|
|
375
|
+
class: C(["collapse border border-base-300 join-item", [e.icon ? `collapse-${e.icon}` : ""]]),
|
|
376
376
|
key: n
|
|
377
377
|
}, [
|
|
378
378
|
e.toggle ? (o(), i("input", xt)) : (o(), i("input", {
|
|
@@ -381,15 +381,15 @@ const pt = ke("SunIcon", [
|
|
|
381
381
|
name: e.name,
|
|
382
382
|
value: "true"
|
|
383
383
|
}, null, 8, wt)),
|
|
384
|
-
a("div", kt,
|
|
384
|
+
a("div", kt, B(s.title), 1),
|
|
385
385
|
a("div", $t, [
|
|
386
386
|
a("span", {
|
|
387
387
|
innerHTML: s.content
|
|
388
388
|
}, null, 8, Ct)
|
|
389
389
|
])
|
|
390
390
|
], 2))), 128))
|
|
391
|
-
])) : (o(!0), i(
|
|
392
|
-
class:
|
|
391
|
+
])) : (o(!0), i(q, { key: 1 }, X(c.items, (s, n) => (o(), i("div", {
|
|
392
|
+
class: C(["collapse border border-base-300", [e.icon ? `collapse-${e.icon}` : ""]]),
|
|
393
393
|
key: n
|
|
394
394
|
}, [
|
|
395
395
|
e.toggle ? (o(), i("input", It)) : (o(), i("input", {
|
|
@@ -398,15 +398,15 @@ const pt = ke("SunIcon", [
|
|
|
398
398
|
name: e.name,
|
|
399
399
|
value: "true"
|
|
400
400
|
}, null, 8, St)),
|
|
401
|
-
a("div", Mt,
|
|
402
|
-
a("div",
|
|
401
|
+
a("div", Mt, B(s.title), 1),
|
|
402
|
+
a("div", zt, [
|
|
403
403
|
a("span", {
|
|
404
404
|
innerHTML: s.content
|
|
405
|
-
}, null, 8,
|
|
405
|
+
}, null, 8, Tt)
|
|
406
406
|
])
|
|
407
407
|
], 2))), 128));
|
|
408
408
|
}
|
|
409
|
-
}), Bt = ["src"],
|
|
409
|
+
}), Bt = ["src"], Dt = { class: "text-xl" }, Ra = /* @__PURE__ */ P({
|
|
410
410
|
__name: "avatar",
|
|
411
411
|
props: {
|
|
412
412
|
image: {},
|
|
@@ -416,17 +416,17 @@ const pt = ke("SunIcon", [
|
|
|
416
416
|
},
|
|
417
417
|
setup(e) {
|
|
418
418
|
const c = e, l = h(c.onlineStatus);
|
|
419
|
-
return
|
|
419
|
+
return N(
|
|
420
420
|
() => c.onlineStatus,
|
|
421
421
|
(t) => {
|
|
422
422
|
t && (l.value = t);
|
|
423
423
|
}
|
|
424
424
|
), (t, s) => (o(), i("div", {
|
|
425
|
-
class:
|
|
425
|
+
class: C(["avatar", [{ "avatar-online": l.value === "online" }, { "avatar-offline": l.value === "offline" }]])
|
|
426
426
|
}, [
|
|
427
427
|
e.image ? (o(), i("div", {
|
|
428
428
|
key: 0,
|
|
429
|
-
class:
|
|
429
|
+
class: C(["rounded", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
|
|
430
430
|
}, [
|
|
431
431
|
a("img", {
|
|
432
432
|
src: e.image,
|
|
@@ -434,13 +434,13 @@ const pt = ke("SunIcon", [
|
|
|
434
434
|
}, null, 8, Bt)
|
|
435
435
|
], 2)) : (o(), i("div", {
|
|
436
436
|
key: 1,
|
|
437
|
-
class:
|
|
437
|
+
class: C(["flex justify-center bg-neutral p-[25%] rounded w-16 text-neutral-content text-center", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
|
|
438
438
|
}, [
|
|
439
|
-
a("p",
|
|
439
|
+
a("p", Dt, B(e.initials), 1)
|
|
440
440
|
], 2))
|
|
441
441
|
], 2));
|
|
442
442
|
}
|
|
443
|
-
}), Aa = /* @__PURE__ */
|
|
443
|
+
}), Aa = /* @__PURE__ */ P({
|
|
444
444
|
__name: "badge",
|
|
445
445
|
props: {
|
|
446
446
|
color: { default: "neutral" },
|
|
@@ -465,12 +465,12 @@ const pt = ke("SunIcon", [
|
|
|
465
465
|
error: "badge-error"
|
|
466
466
|
};
|
|
467
467
|
return (s, n) => (o(), i("span", {
|
|
468
|
-
class:
|
|
468
|
+
class: C(["badge", l[c.size], t[c.color], { "badge-outline": c.outline }])
|
|
469
469
|
}, [
|
|
470
|
-
|
|
470
|
+
T(s.$slots, "default")
|
|
471
471
|
], 2));
|
|
472
472
|
}
|
|
473
|
-
}),
|
|
473
|
+
}), Ot = ["src", "alt"], Vt = {
|
|
474
474
|
key: 0,
|
|
475
475
|
class: "card-body"
|
|
476
476
|
}, _t = {
|
|
@@ -479,10 +479,10 @@ const pt = ke("SunIcon", [
|
|
|
479
479
|
}, Et = {
|
|
480
480
|
key: 1,
|
|
481
481
|
class: "text-left"
|
|
482
|
-
},
|
|
482
|
+
}, Lt = { class: "flex-col flex-nowrap mt-auto card-actions" }, jt = {
|
|
483
483
|
key: 1,
|
|
484
484
|
class: "card-body"
|
|
485
|
-
}, Na = /* @__PURE__ */
|
|
485
|
+
}, Na = /* @__PURE__ */ P({
|
|
486
486
|
__name: "card",
|
|
487
487
|
props: {
|
|
488
488
|
imgUrl: { default: "" },
|
|
@@ -500,13 +500,13 @@ const pt = ke("SunIcon", [
|
|
|
500
500
|
},
|
|
501
501
|
setup(e) {
|
|
502
502
|
const c = e, l = h(c.outlined);
|
|
503
|
-
return
|
|
503
|
+
return N(
|
|
504
504
|
() => c.outlined,
|
|
505
505
|
(t) => {
|
|
506
506
|
l.value = t;
|
|
507
507
|
}
|
|
508
508
|
), (t, s) => (o(), i("div", {
|
|
509
|
-
class:
|
|
509
|
+
class: C(["group bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact", [
|
|
510
510
|
{ "border-4 border-primary": l.value },
|
|
511
511
|
e.color ?? "",
|
|
512
512
|
e.background,
|
|
@@ -514,34 +514,34 @@ const pt = ke("SunIcon", [
|
|
|
514
514
|
]])
|
|
515
515
|
}, [
|
|
516
516
|
a("figure", {
|
|
517
|
-
class:
|
|
517
|
+
class: C([{ "contents!": e.horizontal && e.imgWidth }])
|
|
518
518
|
}, [
|
|
519
519
|
e.imgUrl || e.imgUrl && !e.loading ? (o(), i("img", {
|
|
520
520
|
key: 0,
|
|
521
521
|
src: e.imgUrl,
|
|
522
522
|
alt: e.alt,
|
|
523
|
-
class:
|
|
523
|
+
class: C(["rounded-sm object-cover", [
|
|
524
524
|
{
|
|
525
525
|
hidden: e.loading
|
|
526
526
|
},
|
|
527
527
|
!e.horizontal && e.imgHeight ? e.imgHeight : "h-full",
|
|
528
528
|
e.horizontal && e.imgWidth ? e.imgWidth : "w-full"
|
|
529
529
|
]])
|
|
530
|
-
}, null, 10,
|
|
530
|
+
}, null, 10, Ot)) : z("", !0),
|
|
531
531
|
e.loading && e.imgUrl ? (o(), i("div", {
|
|
532
532
|
key: 1,
|
|
533
|
-
class:
|
|
533
|
+
class: C(["w-full skeleton", e.imgHeight])
|
|
534
534
|
}, null, 2)) : z("", !0)
|
|
535
535
|
], 2),
|
|
536
536
|
e.loading ? z("", !0) : (o(), i("div", Vt, [
|
|
537
|
-
e.title ? (o(), i("h2", _t,
|
|
538
|
-
|
|
539
|
-
e.description ? (o(), i("p", Et,
|
|
540
|
-
a("div",
|
|
541
|
-
|
|
537
|
+
e.title ? (o(), i("h2", _t, B(e.title), 1)) : z("", !0),
|
|
538
|
+
T(t.$slots, "details"),
|
|
539
|
+
e.description ? (o(), i("p", Et, B(e.description), 1)) : z("", !0),
|
|
540
|
+
a("div", Lt, [
|
|
541
|
+
T(t.$slots, "actions")
|
|
542
542
|
])
|
|
543
543
|
])),
|
|
544
|
-
e.loading ? (o(), i("div",
|
|
544
|
+
e.loading ? (o(), i("div", jt, [...s[0] || (s[0] = [
|
|
545
545
|
a("div", { class: "flex flex-col gap-4 w-52" }, [
|
|
546
546
|
a("div", { class: "w-28 h-4 skeleton" }),
|
|
547
547
|
a("div", { class: "w-full h-4 skeleton" }),
|
|
@@ -550,7 +550,7 @@ const pt = ke("SunIcon", [
|
|
|
550
550
|
])])) : z("", !0)
|
|
551
551
|
], 2));
|
|
552
552
|
}
|
|
553
|
-
}),
|
|
553
|
+
}), Ne = Symbol("CarouselItemStyle"), Pt = { class: "relative h-full" }, Rt = {
|
|
554
554
|
key: 0,
|
|
555
555
|
class: "flex-shrink-0"
|
|
556
556
|
}, At = {
|
|
@@ -560,7 +560,7 @@ const pt = ke("SunIcon", [
|
|
|
560
560
|
key: 1,
|
|
561
561
|
id: "carousel-indicators",
|
|
562
562
|
class: "bottom-5 z-10 absolute flex justify-center gap-2 py-2 w-full"
|
|
563
|
-
}, qt = ["onClick", "aria-label"], Ft = /* @__PURE__ */
|
|
563
|
+
}, qt = ["onClick", "aria-label"], Ft = /* @__PURE__ */ P({
|
|
564
564
|
__name: "carousel",
|
|
565
565
|
props: {
|
|
566
566
|
showIndicators: {
|
|
@@ -616,187 +616,187 @@ const pt = ke("SunIcon", [
|
|
|
616
616
|
}
|
|
617
617
|
},
|
|
618
618
|
setup(e, { expose: c }) {
|
|
619
|
-
const l = e, t = h(l.initialSlide), s = h(null), n = h(null), r = h(0), m = h(!1), u = h(0), g = h(0),
|
|
620
|
-
const
|
|
621
|
-
let
|
|
622
|
-
for (const
|
|
623
|
-
g.value >=
|
|
624
|
-
return
|
|
625
|
-
}), b =
|
|
626
|
-
const
|
|
627
|
-
return
|
|
628
|
-
width:
|
|
629
|
-
} : { height:
|
|
619
|
+
const l = e, t = h(l.initialSlide), s = h(null), n = h(null), r = h(0), m = h(!1), u = h(0), g = h(0), S = h(!1), R = h(0), V = h(0), v = h(0), O = h(0), M = h(0), U = h(0), A = h(0), W = h(null), Z = h(null), te = h(0), f = h(null), y = H(() => {
|
|
620
|
+
const $ = Object.keys(l.breakpoints).map(Number).sort((E, F) => E - F);
|
|
621
|
+
let k = {};
|
|
622
|
+
for (const E of $)
|
|
623
|
+
g.value >= E && (k = { ...k, ...l.breakpoints[E] });
|
|
624
|
+
return k;
|
|
625
|
+
}), b = H(() => y.value.slidesPerView ?? l.slidesPerView), I = H(() => y.value.gap ?? l.gap), d = H(() => {
|
|
626
|
+
const $ = l.sliderOrientation === "horizontal", E = `calc((100% - ${b.value > 1 ? (b.value - 1) * I.value : 0}px) / ${b.value})`;
|
|
627
|
+
return $ ? {
|
|
628
|
+
width: E
|
|
629
|
+
} : { height: E };
|
|
630
630
|
});
|
|
631
|
-
Xe(
|
|
632
|
-
const
|
|
631
|
+
Xe(Ne, d);
|
|
632
|
+
const D = () => {
|
|
633
633
|
n.value ? u.value = n.value.children.length : u.value = 0;
|
|
634
|
-
},
|
|
634
|
+
}, w = () => {
|
|
635
635
|
if (!s.value || b.value <= 0) return 0;
|
|
636
|
-
const
|
|
637
|
-
return
|
|
638
|
-
},
|
|
636
|
+
const k = l.sliderOrientation === "horizontal" ? s.value.offsetWidth : s.value.offsetHeight, E = (b.value - 1) * I.value;
|
|
637
|
+
return k <= 0 ? 0 : (k - E) / b.value;
|
|
638
|
+
}, _ = H(() => {
|
|
639
639
|
if (!s.value || u.value === 0 || b.value === 0) return 0;
|
|
640
|
-
const
|
|
641
|
-
return Math.max(0,
|
|
642
|
-
}),
|
|
643
|
-
if (!s.value || b.value <= 0 || m.value || (
|
|
644
|
-
const
|
|
645
|
-
if (
|
|
646
|
-
const
|
|
647
|
-
let
|
|
648
|
-
l.infinite ?
|
|
649
|
-
const
|
|
650
|
-
if (
|
|
651
|
-
n.value && (n.value.style.transitionDuration = "0ms", n.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-
|
|
640
|
+
const k = l.sliderOrientation === "horizontal" ? s.value.offsetWidth : s.value.offsetHeight, E = w(), F = u.value * (E + I.value) - I.value;
|
|
641
|
+
return Math.max(0, F - k);
|
|
642
|
+
}), j = async ($, k = !1) => {
|
|
643
|
+
if (!s.value || b.value <= 0 || m.value || (D(), u.value === 0)) return;
|
|
644
|
+
const E = w();
|
|
645
|
+
if (E <= 0) return;
|
|
646
|
+
const F = E + I.value, J = _.value;
|
|
647
|
+
let K = $;
|
|
648
|
+
l.infinite ? K = ($ % u.value + u.value) % u.value : K = Math.max(0, Math.min($, u.value - b.value));
|
|
649
|
+
const ae = K * F, G = l.infinite ? ae : Math.max(0, Math.min(ae, J));
|
|
650
|
+
if (k || l.slideDuration === 0) {
|
|
651
|
+
n.value && (n.value.style.transitionDuration = "0ms", n.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-G}px, 0, 0)` : `translate3d(0, ${-G}px, 0)`), r.value = G, t.value = K, m.value = !1, l.autoplay && he();
|
|
652
652
|
return;
|
|
653
653
|
}
|
|
654
654
|
m.value = !0;
|
|
655
|
-
const
|
|
655
|
+
const ne = r.value, le = G - ne, ge = performance.now(), fe = ($e) => {
|
|
656
656
|
if (!n.value) return;
|
|
657
|
-
const He = $e -
|
|
658
|
-
n.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-
|
|
657
|
+
const He = $e - ge, Le = Math.min(1, He / l.slideDuration), Ue = 1 - Math.pow(1 - Le, 3), Me = ne + le * Ue;
|
|
658
|
+
n.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-Me}px, 0, 0)` : `translate3d(0, ${-Me}px, 0)`, r.value = Me, Le < 1 ? W.value = requestAnimationFrame(fe) : (n.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-G}px, 0, 0)` : `translate3d(0, ${-G}px, 0)`, r.value = G, t.value = K, m.value = !1, l.autoplay && he(), W.value = null);
|
|
659
659
|
};
|
|
660
|
-
|
|
661
|
-
},
|
|
662
|
-
l.infinite && t.value >= u.value - b.value ?
|
|
663
|
-
},
|
|
664
|
-
l.infinite && t.value <= 0 ?
|
|
665
|
-
}, p = (
|
|
666
|
-
|
|
667
|
-
},
|
|
668
|
-
m.value &&
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
},
|
|
672
|
-
const
|
|
660
|
+
W.value = requestAnimationFrame(fe);
|
|
661
|
+
}, Q = () => {
|
|
662
|
+
l.infinite && t.value >= u.value - b.value ? j(0) : j(t.value + 1);
|
|
663
|
+
}, ce = () => {
|
|
664
|
+
l.infinite && t.value <= 0 ? j(u.value - b.value) : j(t.value - 1);
|
|
665
|
+
}, p = ($) => {
|
|
666
|
+
j($);
|
|
667
|
+
}, x = ($) => {
|
|
668
|
+
m.value && W.value && (l.autoplay && xe(), cancelAnimationFrame(W.value), m.value = !1);
|
|
669
|
+
const k = "touches" in $ ? $.touches[0] : $;
|
|
670
|
+
R.value = k.clientX, V.value = k.clientY, f.value = null, v.value = r.value, O.value = 0, M.value = 0, U.value = 0, A.value = performance.now(), s.value && (s.value.style.scrollSnapType = "none"), document.addEventListener("mousemove", L, { passive: !1 }), document.addEventListener("mouseup", ie), document.addEventListener("touchmove", L, { passive: !1 }), document.addEventListener("touchend", ie);
|
|
671
|
+
}, L = ($) => {
|
|
672
|
+
const k = "touches" in $ ? $.touches[0] : $;
|
|
673
673
|
if (!f.value) {
|
|
674
|
-
const
|
|
675
|
-
if (
|
|
674
|
+
const ge = Math.abs(k.clientX - R.value), fe = Math.abs(k.clientY - V.value), $e = 5;
|
|
675
|
+
if (ge > $e || fe > $e)
|
|
676
676
|
if (l.sliderOrientation === "horizontal")
|
|
677
|
-
if (
|
|
678
|
-
f.value = "horizontal",
|
|
677
|
+
if (ge > fe)
|
|
678
|
+
f.value = "horizontal", S.value = !0;
|
|
679
679
|
else {
|
|
680
|
-
|
|
680
|
+
Y();
|
|
681
681
|
return;
|
|
682
682
|
}
|
|
683
|
-
else if (
|
|
684
|
-
f.value = "vertical",
|
|
683
|
+
else if (fe > ge)
|
|
684
|
+
f.value = "vertical", S.value = !0;
|
|
685
685
|
else {
|
|
686
|
-
|
|
686
|
+
Y();
|
|
687
687
|
return;
|
|
688
688
|
}
|
|
689
689
|
else
|
|
690
690
|
return;
|
|
691
691
|
}
|
|
692
|
-
if (!
|
|
693
|
-
|
|
694
|
-
const
|
|
695
|
-
|
|
696
|
-
const
|
|
697
|
-
let
|
|
698
|
-
|
|
699
|
-
},
|
|
700
|
-
document.removeEventListener("mousemove",
|
|
701
|
-
},
|
|
702
|
-
if (!
|
|
703
|
-
const
|
|
704
|
-
if (
|
|
705
|
-
if (
|
|
706
|
-
|
|
692
|
+
if (!S.value || !n.value || !s.value) return;
|
|
693
|
+
$.cancelable && $.preventDefault();
|
|
694
|
+
const E = performance.now(), F = E - A.value, J = l.sliderOrientation === "horizontal" ? k.clientX : k.clientY, K = l.sliderOrientation === "horizontal" ? R.value : V.value, ae = l.sliderOrientation === "horizontal" ? M.value || K : U.value || K, G = J - ae;
|
|
695
|
+
F > 0 && (O.value = G / F * 1e3);
|
|
696
|
+
const ne = J - K;
|
|
697
|
+
let le = v.value - ne;
|
|
698
|
+
le < 0 ? le = le * 0.3 : le > _.value && (le = _.value + (le - _.value) * 0.3), te.value = le, n.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-te.value}px, 0, 0)` : `translate3d(0, ${-te.value}px, 0)`, l.sliderOrientation === "horizontal" ? M.value = J : U.value = J, A.value = E;
|
|
699
|
+
}, Y = () => {
|
|
700
|
+
document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", ie), document.removeEventListener("touchmove", L), document.removeEventListener("touchend", ie);
|
|
701
|
+
}, ie = () => {
|
|
702
|
+
if (!S.value || !s.value || !n.value) return;
|
|
703
|
+
const k = l.sliderOrientation === "horizontal" ? v.value - (M.value - R.value) : v.value - (U.value - V.value), E = Math.max(0, Math.min(k, _.value)), F = w() + I.value;
|
|
704
|
+
if (S.value = !1, Y(), r.value = E, l.infinite) {
|
|
705
|
+
if (k < 0) {
|
|
706
|
+
j(u.value - 1);
|
|
707
707
|
return;
|
|
708
|
-
} else if (
|
|
709
|
-
|
|
708
|
+
} else if (k > _.value) {
|
|
709
|
+
j(0);
|
|
710
710
|
return;
|
|
711
711
|
}
|
|
712
|
-
} else if (
|
|
713
|
-
|
|
712
|
+
} else if (k < 0) {
|
|
713
|
+
j(0);
|
|
714
714
|
return;
|
|
715
|
-
} else if (
|
|
716
|
-
const
|
|
717
|
-
|
|
715
|
+
} else if (k > _.value) {
|
|
716
|
+
const G = Math.max(0, u.value - Math.floor(b.value));
|
|
717
|
+
j(G);
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
const
|
|
721
|
-
if (Math.abs(
|
|
722
|
-
const
|
|
723
|
-
|
|
720
|
+
const J = Math.max(0, u.value - Math.floor(b.value)), K = 100, ae = Math.round(E / F);
|
|
721
|
+
if (Math.abs(O.value) > K) {
|
|
722
|
+
const G = -Math.sign(O.value), ne = ae + G;
|
|
723
|
+
j(Math.max(0, Math.min(J, ne)));
|
|
724
724
|
} else
|
|
725
|
-
|
|
726
|
-
},
|
|
727
|
-
!l.autoplay ||
|
|
728
|
-
|
|
725
|
+
j(Math.max(0, Math.min(J, ae)));
|
|
726
|
+
}, ve = () => {
|
|
727
|
+
!l.autoplay || Z.value !== null || (Z.value = setInterval(() => {
|
|
728
|
+
Q();
|
|
729
729
|
}, l.autoplayInterval));
|
|
730
|
-
},
|
|
731
|
-
|
|
732
|
-
},
|
|
733
|
-
|
|
734
|
-
|
|
730
|
+
}, xe = () => {
|
|
731
|
+
Z.value !== null && (clearInterval(Z.value), Z.value = null);
|
|
732
|
+
}, he = () => {
|
|
733
|
+
xe(), setTimeout(() => {
|
|
734
|
+
ve();
|
|
735
735
|
}, 500);
|
|
736
|
-
},
|
|
737
|
-
if (
|
|
736
|
+
}, ke = h(null), qe = ($) => {
|
|
737
|
+
if (!$ || $.length === 0)
|
|
738
738
|
return;
|
|
739
|
-
const { width:
|
|
740
|
-
Math.abs(
|
|
739
|
+
const { width: k } = $[0].contentRect;
|
|
740
|
+
Math.abs(k - g.value) > 1 && (g.value = k);
|
|
741
741
|
}, Fe = () => {
|
|
742
|
-
if (!s.value || b.value <= 0 || (
|
|
743
|
-
const
|
|
744
|
-
if (
|
|
745
|
-
const
|
|
746
|
-
n.value && (n.value.style.transitionDuration = "0ms", n.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-
|
|
742
|
+
if (!s.value || b.value <= 0 || (D(), u.value === 0)) return;
|
|
743
|
+
const $ = w();
|
|
744
|
+
if ($ <= 0) return;
|
|
745
|
+
const k = Math.max(0, u.value - b.value), E = Math.min(Math.max(0, l.initialSlide), k), F = E * ($ + I.value), J = _.value, K = Math.max(0, Math.min(F, J));
|
|
746
|
+
n.value && (n.value.style.transitionDuration = "0ms", n.value.style.transform = l.sliderOrientation === "horizontal" ? `translate3d(${-K}px, 0, 0)` : `translate3d(0, ${-K}px, 0)`), r.value = K, t.value = E;
|
|
747
747
|
};
|
|
748
|
-
let
|
|
749
|
-
return
|
|
750
|
-
var
|
|
748
|
+
let Ee = !1;
|
|
749
|
+
return de(() => {
|
|
750
|
+
var k, E, F, J, K, ae, G, ne;
|
|
751
751
|
g.value = window.innerWidth;
|
|
752
|
-
const
|
|
753
|
-
|
|
752
|
+
const $ = N(u, (le) => {
|
|
753
|
+
le > 0 && !Ee && (Fe(), Ee = !0, $());
|
|
754
754
|
});
|
|
755
|
-
l.autoplay &&
|
|
756
|
-
}),
|
|
757
|
-
|
|
758
|
-
}),
|
|
759
|
-
|
|
760
|
-
}),
|
|
761
|
-
requestAnimationFrame(() =>
|
|
762
|
-
}),
|
|
755
|
+
l.autoplay && ve(), D(), s.value && (ke.value = new ResizeObserver(qe), ke.value.observe(s.value)), (k = s.value) == null || k.addEventListener("mousedown", x), (E = s.value) == null || E.addEventListener("touchstart", x, { passive: !0 }), l.showNavigationButtons && ((K = (J = (F = s.value) == null ? void 0 : F.parentElement) == null ? void 0 : J.querySelector(".absolute.flex.justify-between")) == null || K.addEventListener("click", he)), l.showIndicators && ((ne = (G = (ae = s.value) == null ? void 0 : ae.parentElement) == null ? void 0 : G.querySelector(".bottom-5.flex.justify-center")) == null || ne.addEventListener("click", he));
|
|
756
|
+
}), _e(() => {
|
|
757
|
+
ke.value && ke.value.disconnect(), xe();
|
|
758
|
+
}), N(() => l.autoplay, ($) => {
|
|
759
|
+
$ ? ve() : xe();
|
|
760
|
+
}), N(() => l.autoplayInterval, he), N(() => l.initialSlide, ($) => {
|
|
761
|
+
requestAnimationFrame(() => j($, !0));
|
|
762
|
+
}), N([b, I], () => {
|
|
763
763
|
requestAnimationFrame(() => {
|
|
764
764
|
requestAnimationFrame(() => {
|
|
765
|
-
if (
|
|
766
|
-
const
|
|
767
|
-
|
|
765
|
+
if (D(), u.value === 0) return;
|
|
766
|
+
const $ = Math.max(0, u.value - b.value), k = Math.min(t.value, $);
|
|
767
|
+
j(k, !0);
|
|
768
768
|
});
|
|
769
769
|
});
|
|
770
|
-
}), c({ scrollToSlide:
|
|
770
|
+
}), c({ scrollToSlide: j }), ($, k) => (o(), i("div", Pt, [
|
|
771
771
|
a("div", {
|
|
772
772
|
ref_key: "carouselContainer",
|
|
773
773
|
ref: s,
|
|
774
|
-
class:
|
|
774
|
+
class: C(["rounded w-full h-full carousel", [{ "carousel-horizontal": e.sliderOrientation == "horizontal" }, { "carousel-vertical": e.sliderOrientation == "vertical" }, { "cursor-grabbing !select-none": S.value }]]),
|
|
775
775
|
style: { scrollSnapType: "none" }
|
|
776
776
|
}, [
|
|
777
777
|
a("div", {
|
|
778
778
|
ref_key: "slidesContainer",
|
|
779
779
|
ref: n,
|
|
780
|
-
class:
|
|
781
|
-
style:
|
|
780
|
+
class: C(["w-full h-full transition-transform duration-0 ease-out", e.sliderOrientation === "horizontal" ? "flex" : "block"]),
|
|
781
|
+
style: ye({ gap: `${I.value}px` })
|
|
782
782
|
}, [
|
|
783
|
-
|
|
783
|
+
T($.$slots, "default", {}, void 0, !0)
|
|
784
784
|
], 6)
|
|
785
785
|
], 2),
|
|
786
786
|
e.showNavigationButtons ? (o(), i("div", {
|
|
787
787
|
key: 0,
|
|
788
|
-
class:
|
|
788
|
+
class: C([{ "top-1/2 right-5 left-5 z-10 absolute flex justify-between items-center -translate-y-1/2 transform": e.sliderOrientation === "horizontal" }, { "right-0 absolute flex justify-between items-center -translate-y-1/2 transform rotate-90 top-1/2 gap-3": e.sliderOrientation === "vertical" }])
|
|
789
789
|
}, [
|
|
790
|
-
|
|
791
|
-
default:
|
|
790
|
+
se(je, { name: "fade" }, {
|
|
791
|
+
default: be(() => [
|
|
792
792
|
l.infinite || t.value > 0 ? (o(), i("div", Rt, [
|
|
793
793
|
a("div", {
|
|
794
|
-
onClick:
|
|
794
|
+
onClick: ce,
|
|
795
795
|
role: "button",
|
|
796
796
|
"aria-label": "Previous Slide"
|
|
797
797
|
}, [
|
|
798
|
-
|
|
799
|
-
|
|
798
|
+
T($.$slots, "prevButton", {}, () => [
|
|
799
|
+
k[0] || (k[0] = a("button", {
|
|
800
800
|
class: "btn btn-circle text-xs",
|
|
801
801
|
tabindex: "-1"
|
|
802
802
|
}, "❮", -1))
|
|
@@ -806,17 +806,17 @@ const pt = ke("SunIcon", [
|
|
|
806
806
|
]),
|
|
807
807
|
_: 3
|
|
808
808
|
}),
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
default:
|
|
809
|
+
k[2] || (k[2] = a("div", { class: "flex-grow" }, null, -1)),
|
|
810
|
+
se(je, { name: "fade" }, {
|
|
811
|
+
default: be(() => [
|
|
812
812
|
l.infinite || t.value < u.value - b.value ? (o(), i("div", At, [
|
|
813
813
|
a("div", {
|
|
814
|
-
onClick:
|
|
814
|
+
onClick: Q,
|
|
815
815
|
role: "button",
|
|
816
816
|
"aria-label": "Next Slide"
|
|
817
817
|
}, [
|
|
818
|
-
|
|
819
|
-
|
|
818
|
+
T($.$slots, "nextButton", {}, () => [
|
|
819
|
+
k[1] || (k[1] = a("button", {
|
|
820
820
|
class: "btn btn-circle text-xs",
|
|
821
821
|
tabindex: "-1"
|
|
822
822
|
}, "❯", -1))
|
|
@@ -828,32 +828,32 @@ const pt = ke("SunIcon", [
|
|
|
828
828
|
})
|
|
829
829
|
], 2)) : z("", !0),
|
|
830
830
|
e.showIndicators ? (o(), i("div", Nt, [
|
|
831
|
-
(o(!0), i(
|
|
832
|
-
key: `dot-${
|
|
833
|
-
onClick: (
|
|
834
|
-
class:
|
|
835
|
-
"aria-label": `Go to slide ${
|
|
831
|
+
(o(!0), i(q, null, X(u.value, (E, F) => (o(), i("button", {
|
|
832
|
+
key: `dot-${F}`,
|
|
833
|
+
onClick: (J) => p(F),
|
|
834
|
+
class: C(["btn btn-circle btn-xs", { "btn-active": F === t.value }]),
|
|
835
|
+
"aria-label": `Go to slide ${F + 1}`
|
|
836
836
|
}, null, 10, qt))), 128))
|
|
837
837
|
])) : z("", !0)
|
|
838
838
|
]));
|
|
839
839
|
}
|
|
840
|
-
}),
|
|
840
|
+
}), ue = (e, c) => {
|
|
841
841
|
const l = e.__vccOpts || e;
|
|
842
842
|
for (const [t, s] of c)
|
|
843
843
|
l[t] = s;
|
|
844
844
|
return l;
|
|
845
|
-
}, qa = /* @__PURE__ */
|
|
845
|
+
}, qa = /* @__PURE__ */ ue(Ft, [["__scopeId", "data-v-d9ad9601"]]), Ht = /* @__PURE__ */ P({
|
|
846
846
|
__name: "carouselItem",
|
|
847
847
|
setup(e) {
|
|
848
|
-
const c = Ye(
|
|
848
|
+
const c = Ye(Ne, h({}));
|
|
849
849
|
return (l, t) => (o(), i("div", {
|
|
850
850
|
class: "w-full h-full carousel-item",
|
|
851
|
-
style:
|
|
851
|
+
style: ye(ee(c))
|
|
852
852
|
}, [
|
|
853
|
-
|
|
853
|
+
T(l.$slots, "default", {}, void 0, !0)
|
|
854
854
|
], 4));
|
|
855
855
|
}
|
|
856
|
-
}), Fa = /* @__PURE__ */
|
|
856
|
+
}), Fa = /* @__PURE__ */ ue(Ht, [["__scopeId", "data-v-507384bc"]]), Ut = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, Wt = ["onClick"], Kt = {
|
|
857
857
|
key: 0,
|
|
858
858
|
class: "inline-component-wrapper flex grow justify-center items-center w-full h-full"
|
|
859
859
|
}, Xt = {
|
|
@@ -871,7 +871,7 @@ const pt = ke("SunIcon", [
|
|
|
871
871
|
}, ol = {
|
|
872
872
|
key: 1,
|
|
873
873
|
class: "opacity-35 text-sm"
|
|
874
|
-
}, sl = { class: "collapse-content flex place-content-center p-0" }, il = /* @__PURE__ */
|
|
874
|
+
}, sl = { class: "collapse-content flex place-content-center p-0" }, il = /* @__PURE__ */ P({
|
|
875
875
|
__name: "advancedSearch",
|
|
876
876
|
props: {
|
|
877
877
|
searchOptions: {},
|
|
@@ -893,7 +893,7 @@ const pt = ke("SunIcon", [
|
|
|
893
893
|
left: "0px",
|
|
894
894
|
top: "0px",
|
|
895
895
|
transform: "translateX(0%)"
|
|
896
|
-
}),
|
|
896
|
+
}), S = h(null), R = (f) => {
|
|
897
897
|
var y;
|
|
898
898
|
if (f.value === void 0 || f.value === null || f.value === "")
|
|
899
899
|
return "";
|
|
@@ -908,9 +908,9 @@ const pt = ke("SunIcon", [
|
|
|
908
908
|
}
|
|
909
909
|
else if (f.range && typeof f.value == "object" && f.value !== null && "start" in f.value && "end" in f.value)
|
|
910
910
|
try {
|
|
911
|
-
const b = new Date(f.value.start),
|
|
912
|
-
if (!isNaN(b.getTime()) && !isNaN(
|
|
913
|
-
return `${b.toLocaleDateString()} - ${
|
|
911
|
+
const b = new Date(f.value.start), I = new Date(f.value.end);
|
|
912
|
+
if (!isNaN(b.getTime()) && !isNaN(I.getTime()))
|
|
913
|
+
return `${b.toLocaleDateString()} - ${I.toLocaleDateString()}`;
|
|
914
914
|
} catch {
|
|
915
915
|
}
|
|
916
916
|
break;
|
|
@@ -926,7 +926,7 @@ const pt = ke("SunIcon", [
|
|
|
926
926
|
case "custom-select":
|
|
927
927
|
if ((y = f.props) != null && y.options && Array.isArray(f.props.options)) {
|
|
928
928
|
const b = f.props.options.find(
|
|
929
|
-
(
|
|
929
|
+
(I) => I.value === f.value
|
|
930
930
|
);
|
|
931
931
|
if (b)
|
|
932
932
|
return b.text;
|
|
@@ -939,37 +939,37 @@ const pt = ke("SunIcon", [
|
|
|
939
939
|
}
|
|
940
940
|
return String(f.value);
|
|
941
941
|
};
|
|
942
|
-
function
|
|
943
|
-
var
|
|
944
|
-
const y = (
|
|
942
|
+
function V(f) {
|
|
943
|
+
var d, D;
|
|
944
|
+
const y = (d = n.value) == null ? void 0 : d.name;
|
|
945
945
|
if (!y) {
|
|
946
946
|
console.warn("componentValueUpdated called but no active tab.");
|
|
947
947
|
return;
|
|
948
948
|
}
|
|
949
|
-
const b = (
|
|
950
|
-
(
|
|
951
|
-
)) == null ? void 0 :
|
|
952
|
-
(
|
|
949
|
+
const b = (D = l.searchOptions.find(
|
|
950
|
+
(w) => (w == null ? void 0 : w.category) === l.currentCategory
|
|
951
|
+
)) == null ? void 0 : D.tabs, I = b == null ? void 0 : b.find(
|
|
952
|
+
(w) => w.name === y
|
|
953
953
|
);
|
|
954
|
-
|
|
955
|
-
tab:
|
|
954
|
+
I ? (I.value = f, t("update:search-data", {
|
|
955
|
+
tab: I.name,
|
|
956
956
|
data: f
|
|
957
957
|
})) : console.error(
|
|
958
958
|
`Tab with name "${y}" not found in current category.`
|
|
959
959
|
);
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
|
|
961
|
+
function v(f) {
|
|
962
|
+
V(f);
|
|
963
963
|
}
|
|
964
|
-
function
|
|
964
|
+
function O() {
|
|
965
965
|
t("search");
|
|
966
966
|
}
|
|
967
|
-
async function
|
|
968
|
-
var
|
|
967
|
+
async function M(f) {
|
|
968
|
+
var I;
|
|
969
969
|
const y = document.getElementById(`advancedSearchMobile-${s}`), b = y && y.contains(f.target);
|
|
970
|
-
((
|
|
970
|
+
((I = n.value) == null ? void 0 : I.displayMode) === "popup" && S.value && !S.value.contains(f.target) && !b && (await me(), n.value = null);
|
|
971
971
|
}
|
|
972
|
-
async function
|
|
972
|
+
async function U() {
|
|
973
973
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
974
974
|
const f = document.getElementById(
|
|
975
975
|
`advancedSearchMobile-${s}`
|
|
@@ -979,22 +979,22 @@ const pt = ke("SunIcon", [
|
|
|
979
979
|
);
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
|
-
async function
|
|
983
|
-
var b,
|
|
982
|
+
async function A(f) {
|
|
983
|
+
var b, I, d;
|
|
984
984
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
985
|
-
|
|
985
|
+
U();
|
|
986
986
|
return;
|
|
987
987
|
}
|
|
988
988
|
const y = f.displayMode ?? "popup";
|
|
989
|
-
if (((b = n.value) == null ? void 0 : b.name) === f.name && ((
|
|
989
|
+
if (((b = n.value) == null ? void 0 : b.name) === f.name && ((I = n.value) == null ? void 0 : I.displayMode) === y)
|
|
990
990
|
n.value = null;
|
|
991
|
-
else if (n.value = { ...f, displayMode: y }, await
|
|
992
|
-
const
|
|
993
|
-
if (
|
|
994
|
-
const
|
|
991
|
+
else if (n.value = { ...f, displayMode: y }, await me(), ((d = n.value) == null ? void 0 : d.displayMode) === "popup") {
|
|
992
|
+
const D = u.value[f.name];
|
|
993
|
+
if (D && S.value) {
|
|
994
|
+
const w = D.getBoundingClientRect(), _ = S.value.getBoundingClientRect(), j = w.bottom - _.top, Q = w.left + w.width / 2 - _.left;
|
|
995
995
|
g.value = {
|
|
996
|
-
left: `${
|
|
997
|
-
top: `${
|
|
996
|
+
left: `${Q}px`,
|
|
997
|
+
top: `${j + 8}px`,
|
|
998
998
|
// Add a small gap
|
|
999
999
|
transform: "translateX(-50%)"
|
|
1000
1000
|
// Center horizontally
|
|
@@ -1006,25 +1006,25 @@ const pt = ke("SunIcon", [
|
|
|
1006
1006
|
);
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
const
|
|
1009
|
+
const W = (f) => {
|
|
1010
1010
|
const y = f.relatedTarget;
|
|
1011
1011
|
setTimeout(() => {
|
|
1012
1012
|
var b;
|
|
1013
|
-
((b = n.value) == null ? void 0 : b.displayMode) === "inline" &&
|
|
1013
|
+
((b = n.value) == null ? void 0 : b.displayMode) === "inline" && S.value && (!y || !S.value.contains(y)) ? (console.log("Blur detected outside container, closing inline view."), n.value = null) : console.log(
|
|
1014
1014
|
"Blur detected, but staying within container or not an inline tab."
|
|
1015
1015
|
);
|
|
1016
1016
|
}, 50);
|
|
1017
|
-
},
|
|
1017
|
+
}, Z = () => {
|
|
1018
1018
|
console.log("Enter key pressed on inline component, closing inline view."), n.value = null;
|
|
1019
1019
|
};
|
|
1020
|
-
|
|
1020
|
+
N(r, (f) => {
|
|
1021
1021
|
var y;
|
|
1022
1022
|
console.log(
|
|
1023
1023
|
"advanced-search: inlineComponentRef changed. New Value:",
|
|
1024
1024
|
f
|
|
1025
1025
|
), console.log("advanced-search: activeTab.value:", n.value), f && ((y = n.value) == null ? void 0 : y.displayMode) === "inline" ? (console.log(
|
|
1026
1026
|
"advanced-search: Inline component ref is available and active tab is inline. Attempting to focus child input..."
|
|
1027
|
-
),
|
|
1027
|
+
), me(() => {
|
|
1028
1028
|
console.log(
|
|
1029
1029
|
"advanced-search: Inside nextTick. Attempting to call child's focus method..."
|
|
1030
1030
|
), console.log("advanced-search: Type of newValue:", typeof f), console.log(
|
|
@@ -1039,66 +1039,66 @@ const pt = ke("SunIcon", [
|
|
|
1039
1039
|
})) : console.log(
|
|
1040
1040
|
f ? "advanced-search: inlineComponentRef available, but active tab is not inline." : "advanced-search: inlineComponentRef is now null (component likely unmounted)."
|
|
1041
1041
|
);
|
|
1042
|
-
}),
|
|
1043
|
-
document.addEventListener("click",
|
|
1044
|
-
}),
|
|
1045
|
-
document.removeEventListener("click",
|
|
1042
|
+
}), de(() => {
|
|
1043
|
+
document.addEventListener("click", M), window.addEventListener("resize", te);
|
|
1044
|
+
}), Ve(() => {
|
|
1045
|
+
document.removeEventListener("click", M), window.removeEventListener("resize", te);
|
|
1046
1046
|
});
|
|
1047
|
-
const
|
|
1047
|
+
const te = () => {
|
|
1048
1048
|
var f, y;
|
|
1049
1049
|
if (typeof window < "u") {
|
|
1050
|
-
const b = window.innerWidth <= 768,
|
|
1051
|
-
!b && (((f = n.value) == null ? void 0 : f.displayMode) === "popup" || ((y = n.value) == null ? void 0 : y.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), n.value = null), b && !
|
|
1050
|
+
const b = window.innerWidth <= 768, I = n.value !== null && (n.value.displayMode === "popup" || n.value.displayMode === "inline") && window.innerWidth > 768;
|
|
1051
|
+
!b && (((f = n.value) == null ? void 0 : f.displayMode) === "popup" || ((y = n.value) == null ? void 0 : y.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), n.value = null), b && !I && n.value !== null && (console.log(
|
|
1052
1052
|
"Resizing to desktop from potential mobile active state, closing active tab."
|
|
1053
1053
|
), n.value = null);
|
|
1054
|
-
const
|
|
1054
|
+
const d = document.getElementById(
|
|
1055
1055
|
`advancedSearchMobile-${s}`
|
|
1056
1056
|
);
|
|
1057
|
-
|
|
1057
|
+
d != null && d.open && !b && (console.log("Modal is open on desktop, closing modal and active tab."), d.close(), n.value = null);
|
|
1058
1058
|
}
|
|
1059
1059
|
};
|
|
1060
1060
|
return (f, y) => {
|
|
1061
|
-
var b,
|
|
1062
|
-
return o(), i(
|
|
1061
|
+
var b, I;
|
|
1062
|
+
return o(), i(q, null, [
|
|
1063
1063
|
a("div", {
|
|
1064
1064
|
ref_key: "searchContainer",
|
|
1065
|
-
ref:
|
|
1065
|
+
ref: S,
|
|
1066
1066
|
class: "w-full"
|
|
1067
1067
|
}, [
|
|
1068
1068
|
a("div", {
|
|
1069
1069
|
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",
|
|
1070
|
-
onClick:
|
|
1070
|
+
onClick: U
|
|
1071
1071
|
}, [
|
|
1072
1072
|
a("div", Ut, [
|
|
1073
|
-
(o(!0), i(
|
|
1074
|
-
(
|
|
1075
|
-
)) == null ? void 0 : b.tabs) || [], (
|
|
1076
|
-
var
|
|
1073
|
+
(o(!0), i(q, null, X(((b = l.searchOptions.find(
|
|
1074
|
+
(d) => d.category === l.currentCategory
|
|
1075
|
+
)) == null ? void 0 : b.tabs) || [], (d, D) => {
|
|
1076
|
+
var w, _, j, Q, ce;
|
|
1077
1077
|
return o(), i("button", {
|
|
1078
|
-
key: `${
|
|
1079
|
-
onClick:
|
|
1080
|
-
class:
|
|
1081
|
-
"tab-active": ((
|
|
1082
|
-
"tab-active-inline": ((
|
|
1078
|
+
key: `${d.name}-${D}`,
|
|
1079
|
+
onClick: oe((p) => A(d), ["stop"]),
|
|
1080
|
+
class: C([{
|
|
1081
|
+
"tab-active": ((w = n.value) == null ? void 0 : w.name) === d.name,
|
|
1082
|
+
"tab-active-inline": ((_ = n.value) == null ? void 0 : _.name) === d.name && ((j = n.value) == null ? void 0 : j.displayMode) === "inline"
|
|
1083
1083
|
// Add new class
|
|
1084
1084
|
}, "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-px after:h-10 overflow-x-hidden text-start md:after:content-[''] after:content-none last-of-type:after:content-none"]),
|
|
1085
1085
|
ref_for: !0,
|
|
1086
|
-
ref: (p) => u.value[
|
|
1086
|
+
ref: (p) => u.value[d.name] = p
|
|
1087
1087
|
}, [
|
|
1088
|
-
((
|
|
1089
|
-
(o(),
|
|
1088
|
+
((Q = n.value) == null ? void 0 : Q.name) === d.name && ((ce = n.value) == null ? void 0 : ce.displayMode) === "inline" ? (o(), i("div", Kt, [
|
|
1089
|
+
(o(), re(Te(m[n.value.type]), Be({ ref_for: !0 }, n.value.props || {}, {
|
|
1090
1090
|
modelValue: n.value.value,
|
|
1091
|
-
onUpdated: y[0] || (y[0] = (p) =>
|
|
1092
|
-
"onUpdate:modelValue": y[1] || (y[1] = (p) =>
|
|
1093
|
-
onBlur:
|
|
1094
|
-
onKeydown:
|
|
1091
|
+
onUpdated: y[0] || (y[0] = (p) => v(p)),
|
|
1092
|
+
"onUpdate:modelValue": y[1] || (y[1] = (p) => v(p)),
|
|
1093
|
+
onBlur: W,
|
|
1094
|
+
onKeydown: pe(oe(Z, ["stop", "prevent"]), ["enter"]),
|
|
1095
1095
|
ref_for: !0,
|
|
1096
1096
|
ref_key: "inlineComponentRef",
|
|
1097
1097
|
ref: r
|
|
1098
1098
|
}), null, 16, ["modelValue", "onKeydown"]))
|
|
1099
1099
|
])) : (o(), i("div", Xt, [
|
|
1100
|
-
a("p", Yt,
|
|
1101
|
-
|
|
1100
|
+
a("p", Yt, B(d.name), 1),
|
|
1101
|
+
d.value !== void 0 && d.value !== null && d.value !== "" ? (o(), i("p", Gt, B(R(d)), 1)) : (o(), i("p", Jt, B(d.description), 1))
|
|
1102
1102
|
]))
|
|
1103
1103
|
], 10, Wt);
|
|
1104
1104
|
}), 128))
|
|
@@ -1106,21 +1106,21 @@ const pt = ke("SunIcon", [
|
|
|
1106
1106
|
n.value && n.value.displayMode === "popup" ? (o(), i("div", {
|
|
1107
1107
|
key: 0,
|
|
1108
1108
|
class: "absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",
|
|
1109
|
-
style:
|
|
1109
|
+
style: ye(g.value)
|
|
1110
1110
|
}, [
|
|
1111
|
-
(o(),
|
|
1111
|
+
(o(), re(Te(m[n.value.type]), Be(n.value.props || {}, {
|
|
1112
1112
|
modelValue: n.value.value,
|
|
1113
|
-
onUpdated: y[2] || (y[2] = (
|
|
1114
|
-
"onUpdate:modelValue": y[3] || (y[3] = (
|
|
1113
|
+
onUpdated: y[2] || (y[2] = (d) => V(d)),
|
|
1114
|
+
"onUpdate:modelValue": y[3] || (y[3] = (d) => V(d))
|
|
1115
1115
|
}), null, 16, ["modelValue"]))
|
|
1116
1116
|
], 4)) : z("", !0),
|
|
1117
1117
|
a("button", {
|
|
1118
1118
|
title: "search",
|
|
1119
1119
|
type: "submit",
|
|
1120
1120
|
class: "ml-1 btn btn-primary btn-square",
|
|
1121
|
-
onClick:
|
|
1121
|
+
onClick: oe(O, ["stop"])
|
|
1122
1122
|
}, [
|
|
1123
|
-
|
|
1123
|
+
se(ee(Pe), {
|
|
1124
1124
|
size: 24,
|
|
1125
1125
|
color: "white"
|
|
1126
1126
|
})
|
|
@@ -1132,7 +1132,7 @@ const pt = ke("SunIcon", [
|
|
|
1132
1132
|
onClick: y[4] || (y[4] = () => {
|
|
1133
1133
|
})
|
|
1134
1134
|
}, [
|
|
1135
|
-
|
|
1135
|
+
se(ee(Pe), {
|
|
1136
1136
|
size: 24,
|
|
1137
1137
|
color: "white"
|
|
1138
1138
|
})
|
|
@@ -1140,34 +1140,34 @@ const pt = ke("SunIcon", [
|
|
|
1140
1140
|
])
|
|
1141
1141
|
], 512),
|
|
1142
1142
|
a("dialog", {
|
|
1143
|
-
id: `advancedSearchMobile-${
|
|
1143
|
+
id: `advancedSearchMobile-${ee(s)}`,
|
|
1144
1144
|
class: "modal"
|
|
1145
1145
|
}, [
|
|
1146
1146
|
a("div", el, [
|
|
1147
|
-
|
|
1148
|
-
a("h3", tl,
|
|
1147
|
+
T(f.$slots, "additionalForMobile", {}, () => [
|
|
1148
|
+
a("h3", tl, B(e.currentCategory), 1)
|
|
1149
1149
|
], !0),
|
|
1150
|
-
(o(!0), i(
|
|
1151
|
-
(
|
|
1152
|
-
)) == null ? void 0 :
|
|
1150
|
+
(o(!0), i(q, null, X(((I = l.searchOptions.find(
|
|
1151
|
+
(d) => d.category === l.currentCategory
|
|
1152
|
+
)) == null ? void 0 : I.tabs) || [], (d, D) => (o(), i("div", {
|
|
1153
1153
|
class: "collapse bg-base-200 my-4",
|
|
1154
|
-
key:
|
|
1154
|
+
key: d.name
|
|
1155
1155
|
}, [
|
|
1156
1156
|
a("input", {
|
|
1157
1157
|
type: "radio",
|
|
1158
|
-
name: `accordion-${
|
|
1159
|
-
checked:
|
|
1158
|
+
name: `accordion-${ee(s)}`,
|
|
1159
|
+
checked: D === 0
|
|
1160
1160
|
}, null, 8, ll),
|
|
1161
1161
|
a("div", al, [
|
|
1162
|
-
a("div", null,
|
|
1163
|
-
|
|
1162
|
+
a("div", null, B(d.name), 1),
|
|
1163
|
+
d.value !== void 0 && d.value !== null && d.value !== "" ? (o(), i("div", nl, B(R(d)), 1)) : (o(), i("div", ol, B(d.description), 1))
|
|
1164
1164
|
]),
|
|
1165
1165
|
a("div", sl, [
|
|
1166
1166
|
y[7] || (y[7] = a("br", null, null, -1)),
|
|
1167
|
-
(o(),
|
|
1168
|
-
modelValue:
|
|
1169
|
-
onUpdated: y[5] || (y[5] = (
|
|
1170
|
-
"onUpdate:modelValue": y[6] || (y[6] = (
|
|
1167
|
+
(o(), re(Te(m[d.type]), Be({ ref_for: !0 }, d.props || {}, {
|
|
1168
|
+
modelValue: d.value,
|
|
1169
|
+
onUpdated: y[5] || (y[5] = (w) => V(w)),
|
|
1170
|
+
"onUpdate:modelValue": y[6] || (y[6] = (w) => V(w))
|
|
1171
1171
|
}), null, 16, ["modelValue"]))
|
|
1172
1172
|
])
|
|
1173
1173
|
]))), 128)),
|
|
@@ -1175,7 +1175,7 @@ const pt = ke("SunIcon", [
|
|
|
1175
1175
|
a("form", { method: "dialog" }, [
|
|
1176
1176
|
a("button", {
|
|
1177
1177
|
class: "btn btn-primary",
|
|
1178
|
-
onClick:
|
|
1178
|
+
onClick: O
|
|
1179
1179
|
}, " Close and Search ")
|
|
1180
1180
|
])
|
|
1181
1181
|
])
|
|
@@ -1184,7 +1184,7 @@ const pt = ke("SunIcon", [
|
|
|
1184
1184
|
], 64);
|
|
1185
1185
|
};
|
|
1186
1186
|
}
|
|
1187
|
-
}), Ha = /* @__PURE__ */
|
|
1187
|
+
}), Ha = /* @__PURE__ */ ue(il, [["__scopeId", "data-v-577c3624"]]), rl = { class: "z-30 relative flex items-center bg-base-100 date-filter-input px-4 border-2 border-primary rounded-md w-full min-h-10 font-semibold text-primary text-sm" }, ul = { key: 0 }, cl = { key: 1 }, dl = ["id", "onKeydown"], vl = {
|
|
1188
1188
|
key: 2,
|
|
1189
1189
|
class: "flex justify-center p-4"
|
|
1190
1190
|
}, fl = { class: "join items-center gap-2 max-w-2xs md:max-w-full justify-between max-md:input max-md:input-bordered !rounded overflow-hidden mx-auto" }, ml = { class: "join-item" }, pl = ["id", "disabled", "value"], hl = { class: "join-item" }, gl = ["id", "disabled", "value"], bl = {
|
|
@@ -1193,7 +1193,7 @@ const pt = ke("SunIcon", [
|
|
|
1193
1193
|
}, yl = ["id", "disabled", "value"], wl = {
|
|
1194
1194
|
key: 4,
|
|
1195
1195
|
class: "flex px-4 my-4 w-full justify-end"
|
|
1196
|
-
}, xl = /* @__PURE__ */
|
|
1196
|
+
}, xl = /* @__PURE__ */ P({
|
|
1197
1197
|
__name: "datetimePicker",
|
|
1198
1198
|
props: {
|
|
1199
1199
|
mode: { default: "datetime" },
|
|
@@ -1208,187 +1208,150 @@ const pt = ke("SunIcon", [
|
|
|
1208
1208
|
firstDayOfWeek: { default: 1 },
|
|
1209
1209
|
min: {},
|
|
1210
1210
|
max: {},
|
|
1211
|
-
closeText: { default: "Close" }
|
|
1211
|
+
closeText: { default: "Close" },
|
|
1212
|
+
disableDefaultValue: { type: Boolean, default: !1 }
|
|
1212
1213
|
},
|
|
1213
1214
|
emits: ["update:modelValue", "change"],
|
|
1214
1215
|
setup(e, { emit: c }) {
|
|
1215
|
-
const l = typeof window < "u", t = e, s = c, n = h(null), r = h(!1), m = h(null), u = h(null), g = h(null),
|
|
1216
|
+
const l = typeof window < "u", t = e, s = c, n = h(null), r = h(!1), m = h(null), u = h(null), g = h(null), S = h(null), R = h(null), V = h({
|
|
1216
1217
|
from: "",
|
|
1217
1218
|
to: "",
|
|
1218
1219
|
single: ""
|
|
1219
|
-
}),
|
|
1220
|
+
}), v = h({
|
|
1220
1221
|
single: null,
|
|
1221
1222
|
start: null,
|
|
1222
1223
|
end: null
|
|
1223
|
-
}),
|
|
1224
|
-
const
|
|
1225
|
-
if (isNaN(
|
|
1226
|
-
const
|
|
1227
|
-
return `${
|
|
1228
|
-
},
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
}
|
|
1236
|
-
if (t.range && typeof B == "object" && "start" in B) {
|
|
1237
|
-
const D = E(B.start), N = E(B.end);
|
|
1238
|
-
d.value.start = T(D), d.value.end = T(N), t.mode !== "date" && (k.value.from = W(D), k.value.to = W(N));
|
|
1239
|
-
} else {
|
|
1240
|
-
const D = E(B);
|
|
1241
|
-
d.value.single = T(D), t.mode !== "date" && (k.value.single = W(D));
|
|
1242
|
-
}
|
|
1224
|
+
}), O = (p) => p instanceof Date ? p.toISOString() : p, M = (p) => p.split("T")[0] || "", U = (p) => {
|
|
1225
|
+
const x = p instanceof Date ? p : new Date(p);
|
|
1226
|
+
if (isNaN(x.getTime())) return "";
|
|
1227
|
+
const L = String(x.getHours()).padStart(2, "0"), Y = String(x.getMinutes()).padStart(2, "0");
|
|
1228
|
+
return `${L}:${Y}`;
|
|
1229
|
+
}, A = () => {
|
|
1230
|
+
if (t.disableDefaultValue && !t.initialDate)
|
|
1231
|
+
return;
|
|
1232
|
+
let p = t.initialDate;
|
|
1233
|
+
if (!p && !t.disableDefaultValue && t.mode !== "time") {
|
|
1234
|
+
const L = /* @__PURE__ */ new Date();
|
|
1235
|
+
p = t.range ? { start: L, end: L } : L;
|
|
1243
1236
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1237
|
+
if (!p) return;
|
|
1238
|
+
if (t.range && typeof p == "object" && "start" in p) {
|
|
1239
|
+
const L = O(p.start), Y = O(p.end);
|
|
1240
|
+
v.value.start = M(L), v.value.end = M(Y), t.mode !== "date" && (V.value.from = U(L), V.value.to = U(Y));
|
|
1241
|
+
return;
|
|
1242
|
+
}
|
|
1243
|
+
const x = O(p);
|
|
1244
|
+
v.value.single = M(x), t.mode !== "date" && (V.value.single = U(x));
|
|
1245
|
+
}, W = H(() => {
|
|
1246
|
+
const p = (x) => {
|
|
1247
|
+
if (!x) return "";
|
|
1248
1248
|
try {
|
|
1249
|
-
return (/* @__PURE__ */ new Date(
|
|
1250
|
-
year: "numeric",
|
|
1251
|
-
month: "numeric",
|
|
1252
|
-
day: "numeric"
|
|
1253
|
-
});
|
|
1249
|
+
return (/* @__PURE__ */ new Date(x + "T00:00:00")).toLocaleDateString(t.locale);
|
|
1254
1250
|
} catch {
|
|
1255
|
-
|
|
1256
|
-
return `${ne}/${Z}/${N}`;
|
|
1251
|
+
return x;
|
|
1257
1252
|
}
|
|
1258
1253
|
};
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
return t.range ? w.split(" - ").map(p).join(" - ") : p(w);
|
|
1262
|
-
if (t.mode === "time")
|
|
1263
|
-
return B;
|
|
1264
|
-
if (t.mode === "datetime")
|
|
1265
|
-
if (t.range) {
|
|
1266
|
-
const D = d.value.start, N = d.value.end, Z = k.value.from, ne = k.value.to;
|
|
1267
|
-
if (D && N && Z && ne)
|
|
1268
|
-
return `${p(D)} ${Z} - ${p(N)} ${ne}`;
|
|
1269
|
-
if (D)
|
|
1270
|
-
return `${p(D)} ${Z || ""}`.trim();
|
|
1271
|
-
} else {
|
|
1272
|
-
const D = d.value.single, N = k.value.single;
|
|
1273
|
-
return `${p(D)} ${N || ""}`.trim();
|
|
1274
|
-
}
|
|
1275
|
-
return "";
|
|
1276
|
-
}), ee = () => {
|
|
1254
|
+
return t.range ? v.value.start && v.value.end ? `${p(v.value.start)} - ${p(v.value.end)}` : "" : v.value.single ? p(v.value.single) : "";
|
|
1255
|
+
}), Z = () => {
|
|
1277
1256
|
if (m.value)
|
|
1278
|
-
|
|
1257
|
+
v.value.single = m.value.value || null;
|
|
1279
1258
|
else if (u.value) {
|
|
1280
1259
|
const p = u.value.value;
|
|
1281
1260
|
if (typeof p == "string" && p.includes("/")) {
|
|
1282
|
-
const [
|
|
1283
|
-
|
|
1284
|
-
}
|
|
1285
|
-
d.value.start = p || null, d.value.end = p || null;
|
|
1261
|
+
const [x, L] = p.split("/");
|
|
1262
|
+
v.value.start = x || null, v.value.end = L || null;
|
|
1263
|
+
}
|
|
1286
1264
|
}
|
|
1287
|
-
},
|
|
1265
|
+
}, te = () => v.value.start && v.value.end ? `${v.value.start}/${v.value.end}` : null, f = () => {
|
|
1288
1266
|
if (t.range) {
|
|
1289
|
-
const
|
|
1290
|
-
if (
|
|
1291
|
-
return N && Z ? { start: N, end: Z } : null;
|
|
1267
|
+
const L = v.value.start, Y = v.value.end;
|
|
1268
|
+
if (!L || !Y) return null;
|
|
1292
1269
|
if (t.mode === "date")
|
|
1293
|
-
return
|
|
1270
|
+
return { start: L, end: Y };
|
|
1294
1271
|
if (t.mode === "datetime") {
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1272
|
+
const ie = V.value.from || "00:00", ve = V.value.to || "23:59";
|
|
1273
|
+
return {
|
|
1274
|
+
start: `${L}T${ie}:00`,
|
|
1275
|
+
end: `${Y}T${ve}:00`
|
|
1276
|
+
};
|
|
1298
1277
|
}
|
|
1299
1278
|
return null;
|
|
1300
1279
|
}
|
|
1301
|
-
const p =
|
|
1302
|
-
if (
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
if (t.mode === "datetime") {
|
|
1307
|
-
if (!p) return null;
|
|
1308
|
-
const B = w ? `${w}:00` : "00:00:00";
|
|
1309
|
-
return `${p}T${B}`;
|
|
1310
|
-
}
|
|
1311
|
-
return null;
|
|
1280
|
+
const p = v.value.single;
|
|
1281
|
+
if (!p) return null;
|
|
1282
|
+
if (t.mode === "date") return p;
|
|
1283
|
+
const x = V.value.single || "00:00";
|
|
1284
|
+
return `${p}T${x}:00`;
|
|
1312
1285
|
}, y = async () => {
|
|
1313
|
-
|
|
1286
|
+
Z();
|
|
1314
1287
|
const p = f();
|
|
1315
1288
|
s("update:modelValue", p), s("change", p);
|
|
1316
|
-
}, b = () => {
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
}, M = (p) => {
|
|
1321
|
-
const w = p.target;
|
|
1322
|
-
t.range ? w === I.value ? k.value.from = w.value : w === P.value && (k.value.to = w.value) : k.value.single = w.value, y();
|
|
1323
|
-
}, v = () => {
|
|
1289
|
+
}, b = () => me(y), I = (p) => {
|
|
1290
|
+
const x = p.target;
|
|
1291
|
+
t.range ? x === S.value ? V.value.from = x.value : V.value.to = x.value : V.value.single = x.value, y();
|
|
1292
|
+
}, d = () => {
|
|
1324
1293
|
r.value = !r.value;
|
|
1325
|
-
},
|
|
1294
|
+
}, D = () => {
|
|
1326
1295
|
y(), r.value = !1;
|
|
1327
|
-
},
|
|
1296
|
+
}, w = (p) => {
|
|
1328
1297
|
!t.popup || !r.value || setTimeout(() => {
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1298
|
+
const x = n.value, L = p.target, Y = `date-picker-${t.id}-popup`;
|
|
1299
|
+
x && !x.contains(L) && !L.closest(`#${Y}`) && D();
|
|
1331
1300
|
}, 0);
|
|
1332
|
-
}, j = () => {
|
|
1333
|
-
_();
|
|
1334
|
-
}, R = () => {
|
|
1301
|
+
}, _ = () => D(), j = () => {
|
|
1335
1302
|
y(), t.popup && (r.value = !1);
|
|
1336
|
-
},
|
|
1337
|
-
|
|
1303
|
+
}, Q = () => {
|
|
1304
|
+
var x;
|
|
1338
1305
|
const p = t.range ? u.value : m.value;
|
|
1339
|
-
p
|
|
1340
|
-
},
|
|
1341
|
-
|
|
1306
|
+
(x = p == null ? void 0 : p.navigate) == null || x.call(p, -1);
|
|
1307
|
+
}, ce = () => {
|
|
1308
|
+
var x;
|
|
1342
1309
|
const p = t.range ? u.value : m.value;
|
|
1343
|
-
p
|
|
1310
|
+
(x = p == null ? void 0 : p.navigate) == null || x.call(p, 1);
|
|
1344
1311
|
};
|
|
1345
|
-
return
|
|
1346
|
-
l && import("./cally-ZU3K2Th7.js").catch((p) =>
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
const w = p.single;
|
|
1352
|
-
m.value.value !== w && (m.value.value = w);
|
|
1312
|
+
return de(() => {
|
|
1313
|
+
l && import("./cally-ZU3K2Th7.js").catch((p) => console.warn("Failed to load cally:", p)), A();
|
|
1314
|
+
}), N(v, async () => {
|
|
1315
|
+
if (await me(), m.value && v.value.single) {
|
|
1316
|
+
const p = v.value.single;
|
|
1317
|
+
m.value.value !== p && (m.value.value = p);
|
|
1353
1318
|
}
|
|
1354
1319
|
if (u.value) {
|
|
1355
|
-
const
|
|
1356
|
-
|
|
1320
|
+
const p = te();
|
|
1321
|
+
p && u.value.value !== p && (u.value.value = p);
|
|
1357
1322
|
}
|
|
1358
1323
|
y();
|
|
1359
|
-
}, {
|
|
1360
|
-
await
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
}, { immediate: !0 }), (p, w) => {
|
|
1364
|
-
const B = De("calendar-month"), D = De("calendar-date"), N = De("calendar-range");
|
|
1324
|
+
}, { deep: !0 }), N([v, m, u], async () => {
|
|
1325
|
+
await me(), m.value && v.value.single && !m.value.value && (m.value.value = v.value.single), u.value && v.value.start && v.value.end && !u.value.value && (u.value.value = `${v.value.start}/${v.value.end}`), y();
|
|
1326
|
+
}), N([g, S, R], y), (p, x) => {
|
|
1327
|
+
const L = De("calendar-month"), Y = De("calendar-date"), ie = De("calendar-range");
|
|
1365
1328
|
return o(), i("div", {
|
|
1366
1329
|
class: "inline-block relative w-fit lg:w-full",
|
|
1367
1330
|
ref_key: "pickerContainer",
|
|
1368
1331
|
ref: n,
|
|
1369
|
-
onMousedownCapture:
|
|
1332
|
+
onMousedownCapture: w
|
|
1370
1333
|
}, [
|
|
1371
1334
|
t.popup ? (o(), i("div", {
|
|
1372
1335
|
key: 0,
|
|
1373
1336
|
class: "flex items-center gap-2 cursor-pointer w-full",
|
|
1374
|
-
onClick:
|
|
1337
|
+
onClick: x[0] || (x[0] = (ve) => t.disabled ? null : d())
|
|
1375
1338
|
}, [
|
|
1376
1339
|
a("div", rl, [
|
|
1377
|
-
|
|
1340
|
+
W.value ? (o(), i("span", cl, B(W.value), 1)) : (o(), i("span", ul, B(t.placeholder), 1))
|
|
1378
1341
|
])
|
|
1379
1342
|
])) : z("", !0),
|
|
1380
1343
|
r.value || !t.popup ? (o(), i("div", {
|
|
1381
1344
|
key: 1,
|
|
1382
|
-
class:
|
|
1345
|
+
class: C(["z-50 bg-base-100 rounded-md w-full min-w-xs overflow-hidden", { "absolute top-full left-0 mt-2 shadow-lg": t.popup, "mt-2": !t.popup }]),
|
|
1383
1346
|
id: `date-picker-${t.id}-popup`,
|
|
1384
1347
|
onKeydown: [
|
|
1385
|
-
|
|
1348
|
+
x[1] || (x[1] = pe(oe(() => {
|
|
1386
1349
|
}, ["prevent", "stop"]), ["tab"])),
|
|
1387
|
-
|
|
1388
|
-
|
|
1350
|
+
pe(_, ["esc"]),
|
|
1351
|
+
pe(oe(j, ["prevent"]), ["enter"])
|
|
1389
1352
|
]
|
|
1390
1353
|
}, [
|
|
1391
|
-
!t.range && t.mode !== "time" && l ? (o(),
|
|
1354
|
+
!t.range && t.mode !== "time" && l ? (o(), re(Y, {
|
|
1392
1355
|
key: 0,
|
|
1393
1356
|
class: "cally w-full",
|
|
1394
1357
|
ref_key: "datePicker",
|
|
@@ -1400,12 +1363,12 @@ const pt = ke("SunIcon", [
|
|
|
1400
1363
|
"first-day-of-week": t.firstDayOfWeek,
|
|
1401
1364
|
onChange: b
|
|
1402
1365
|
}, {
|
|
1403
|
-
default:
|
|
1366
|
+
default: be(() => [
|
|
1404
1367
|
a("button", {
|
|
1405
1368
|
slot: "previous",
|
|
1406
1369
|
class: "btn-outline btn btn-primary md:btn-sm",
|
|
1407
|
-
onClick:
|
|
1408
|
-
}, [...
|
|
1370
|
+
onClick: Q
|
|
1371
|
+
}, [...x[2] || (x[2] = [
|
|
1409
1372
|
a("svg", {
|
|
1410
1373
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1411
1374
|
class: "w-4 h-4",
|
|
@@ -1424,8 +1387,8 @@ const pt = ke("SunIcon", [
|
|
|
1424
1387
|
a("button", {
|
|
1425
1388
|
slot: "next",
|
|
1426
1389
|
class: "btn-outline btn btn-primary md:btn-sm",
|
|
1427
|
-
onClick:
|
|
1428
|
-
}, [...
|
|
1390
|
+
onClick: ce
|
|
1391
|
+
}, [...x[3] || (x[3] = [
|
|
1429
1392
|
a("svg", {
|
|
1430
1393
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1431
1394
|
class: "w-4 h-4",
|
|
@@ -1441,13 +1404,13 @@ const pt = ke("SunIcon", [
|
|
|
1441
1404
|
})
|
|
1442
1405
|
], -1)
|
|
1443
1406
|
])]),
|
|
1444
|
-
|
|
1407
|
+
se(L, {
|
|
1445
1408
|
locale: t.locale
|
|
1446
1409
|
}, null, 8, ["locale"])
|
|
1447
1410
|
]),
|
|
1448
1411
|
_: 1
|
|
1449
1412
|
}, 8, ["id", "min", "max", "disabled", "first-day-of-week"])) : z("", !0),
|
|
1450
|
-
t.range && t.mode !== "time" && l ? (o(),
|
|
1413
|
+
t.range && t.mode !== "time" && l ? (o(), re(ie, {
|
|
1451
1414
|
key: 1,
|
|
1452
1415
|
class: "cally w-full",
|
|
1453
1416
|
ref_key: "rangeDatePicker",
|
|
@@ -1459,12 +1422,12 @@ const pt = ke("SunIcon", [
|
|
|
1459
1422
|
"first-day-of-week": t.firstDayOfWeek,
|
|
1460
1423
|
onChange: b
|
|
1461
1424
|
}, {
|
|
1462
|
-
default:
|
|
1425
|
+
default: be(() => [
|
|
1463
1426
|
a("button", {
|
|
1464
1427
|
slot: "previous",
|
|
1465
1428
|
class: "btn-outline btn btn-primary md:btn-sm",
|
|
1466
|
-
onClick:
|
|
1467
|
-
}, [...
|
|
1429
|
+
onClick: Q
|
|
1430
|
+
}, [...x[4] || (x[4] = [
|
|
1468
1431
|
a("svg", {
|
|
1469
1432
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1470
1433
|
class: "w-4 h-4",
|
|
@@ -1483,13 +1446,13 @@ const pt = ke("SunIcon", [
|
|
|
1483
1446
|
a("button", {
|
|
1484
1447
|
slot: "next",
|
|
1485
1448
|
class: "btn-outline btn btn-primary md:btn-sm",
|
|
1486
|
-
onClick:
|
|
1487
|
-
}, [...
|
|
1449
|
+
onClick: ce
|
|
1450
|
+
}, [...x[5] || (x[5] = [
|
|
1488
1451
|
a("svg", {
|
|
1489
1452
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1490
1453
|
class: "w-4 h-4",
|
|
1491
1454
|
fill: "none",
|
|
1492
|
-
viewBox: "0
|
|
1455
|
+
viewBox: "0 24 24",
|
|
1493
1456
|
stroke: "currentColor"
|
|
1494
1457
|
}, [
|
|
1495
1458
|
a("path", {
|
|
@@ -1500,7 +1463,7 @@ const pt = ke("SunIcon", [
|
|
|
1500
1463
|
})
|
|
1501
1464
|
], -1)
|
|
1502
1465
|
])]),
|
|
1503
|
-
|
|
1466
|
+
se(L, {
|
|
1504
1467
|
locale: t.locale
|
|
1505
1468
|
}, null, 8, ["locale"])
|
|
1506
1469
|
]),
|
|
@@ -1513,23 +1476,18 @@ const pt = ke("SunIcon", [
|
|
|
1513
1476
|
class: "text-center hover:border-b-2 hover:-mb-0.5 open:bg-primary open:p-1 open:-m-0.5 open:rounded w-full relative",
|
|
1514
1477
|
type: "time",
|
|
1515
1478
|
ref_key: "timeFromInput",
|
|
1516
|
-
ref:
|
|
1479
|
+
ref: S,
|
|
1517
1480
|
id: `${t.id}-time-from`,
|
|
1518
1481
|
placeholder: "from",
|
|
1519
|
-
onChange:
|
|
1482
|
+
onChange: I,
|
|
1520
1483
|
disabled: t.disabled,
|
|
1521
|
-
value:
|
|
1484
|
+
value: V.value.from || ""
|
|
1522
1485
|
}, null, 40, pl)
|
|
1523
1486
|
]),
|
|
1524
|
-
|
|
1487
|
+
x[6] || (x[6] = a("svg", {
|
|
1525
1488
|
class: "join-item",
|
|
1526
1489
|
viewBox: "0 0 1024 1024",
|
|
1527
|
-
|
|
1528
|
-
"data-icon": "swap-right",
|
|
1529
|
-
width: "1em",
|
|
1530
|
-
height: "1em",
|
|
1531
|
-
fill: "currentColor",
|
|
1532
|
-
"aria-hidden": "true"
|
|
1490
|
+
width: "1em"
|
|
1533
1491
|
}, [
|
|
1534
1492
|
a("path", { d: "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z" })
|
|
1535
1493
|
], -1)),
|
|
@@ -1538,11 +1496,11 @@ const pt = ke("SunIcon", [
|
|
|
1538
1496
|
class: "text-center hover:border-b-2 hover:-mb-0.5 open:bg-primary open:p-1 open:-m-0.5 open:rounded w-full relative",
|
|
1539
1497
|
type: "time",
|
|
1540
1498
|
ref_key: "timeToInput",
|
|
1541
|
-
ref:
|
|
1499
|
+
ref: R,
|
|
1542
1500
|
id: `${t.id}-time-to`,
|
|
1543
|
-
onChange:
|
|
1501
|
+
onChange: I,
|
|
1544
1502
|
disabled: t.disabled,
|
|
1545
|
-
value:
|
|
1503
|
+
value: V.value.to || ""
|
|
1546
1504
|
}, null, 40, gl)
|
|
1547
1505
|
])
|
|
1548
1506
|
])
|
|
@@ -1554,25 +1512,25 @@ const pt = ke("SunIcon", [
|
|
|
1554
1512
|
ref_key: "timeInput",
|
|
1555
1513
|
ref: g,
|
|
1556
1514
|
id: `${t.id}-time`,
|
|
1557
|
-
onChange:
|
|
1515
|
+
onChange: I,
|
|
1558
1516
|
disabled: t.disabled,
|
|
1559
|
-
value:
|
|
1517
|
+
value: V.value.single || ""
|
|
1560
1518
|
}, null, 40, yl)
|
|
1561
1519
|
])) : z("", !0),
|
|
1562
1520
|
t.popup && t.closeText ? (o(), i("div", wl, [
|
|
1563
1521
|
a("button", {
|
|
1564
1522
|
class: "btn btn-primary max-lg:w-full",
|
|
1565
|
-
onClick:
|
|
1566
|
-
},
|
|
1523
|
+
onClick: D
|
|
1524
|
+
}, B(t.closeText), 1)
|
|
1567
1525
|
])) : z("", !0)
|
|
1568
1526
|
], 42, dl)) : z("", !0)
|
|
1569
1527
|
], 544);
|
|
1570
1528
|
};
|
|
1571
1529
|
}
|
|
1572
|
-
}), kl = /* @__PURE__ */
|
|
1530
|
+
}), kl = /* @__PURE__ */ ue(xl, [["__scopeId", "data-v-ca3752e5"]]), $l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1573
1531
|
__proto__: null,
|
|
1574
1532
|
default: kl
|
|
1575
|
-
}, Symbol.toStringTag, { value: "Module" })), Cl = ["value", "checked", "onChange", "disabled"], Ua = /* @__PURE__ */
|
|
1533
|
+
}, Symbol.toStringTag, { value: "Module" })), Cl = ["value", "checked", "onChange", "disabled"], Ua = /* @__PURE__ */ P({
|
|
1576
1534
|
__name: "rating",
|
|
1577
1535
|
props: {
|
|
1578
1536
|
initialRating: { default: 0 },
|
|
@@ -1586,7 +1544,7 @@ const pt = ke("SunIcon", [
|
|
|
1586
1544
|
},
|
|
1587
1545
|
setup(e) {
|
|
1588
1546
|
const c = e, l = h(c.initialRating);
|
|
1589
|
-
|
|
1547
|
+
N(
|
|
1590
1548
|
() => c.initialRating,
|
|
1591
1549
|
(s) => {
|
|
1592
1550
|
l.value = s;
|
|
@@ -1596,19 +1554,19 @@ const pt = ke("SunIcon", [
|
|
|
1596
1554
|
l.value = s;
|
|
1597
1555
|
};
|
|
1598
1556
|
return (s, n) => (o(), i("div", {
|
|
1599
|
-
class:
|
|
1557
|
+
class: C(["rating", [
|
|
1600
1558
|
`rating-${c.size}`,
|
|
1601
1559
|
{ "rating-half": e.halfStars },
|
|
1602
1560
|
{ "pointer-events-none": !e.isInteractive }
|
|
1603
1561
|
]])
|
|
1604
1562
|
}, [
|
|
1605
|
-
(o(!0), i(
|
|
1563
|
+
(o(!0), i(q, null, X(e.numberOfStars * (e.halfStars ? 2 : 1), (r) => (o(), i("input", {
|
|
1606
1564
|
key: r,
|
|
1607
1565
|
type: "radio",
|
|
1608
1566
|
value: e.halfStars ? r * 0.5 : r,
|
|
1609
1567
|
checked: l.value === (e.halfStars ? r * 0.5 : r),
|
|
1610
1568
|
onChange: (m) => e.isInteractive ? t(e.halfStars ? r * 0.5 : r) : null,
|
|
1611
|
-
class:
|
|
1569
|
+
class: C(["mask", [
|
|
1612
1570
|
{
|
|
1613
1571
|
// 'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
|
|
1614
1572
|
"mask-half-1": e.halfStars && r % 2 !== 0,
|
|
@@ -1631,14 +1589,14 @@ const pt = ke("SunIcon", [
|
|
|
1631
1589
|
},
|
|
1632
1590
|
l.value >= (e.halfStars ? r * 0.5 : r) ? c.color : ""
|
|
1633
1591
|
]]),
|
|
1634
|
-
style:
|
|
1592
|
+
style: ye({
|
|
1635
1593
|
marginRight: e.halfStars && r % 2 === 0 ? `${c.gap}px` : e.halfStars ? "0" : `${c.gap}px`
|
|
1636
1594
|
}),
|
|
1637
1595
|
disabled: !e.isInteractive
|
|
1638
1596
|
}, null, 46, Cl))), 128))
|
|
1639
1597
|
], 2));
|
|
1640
1598
|
}
|
|
1641
|
-
}), Sl = { class: "badge" }, Il = ["onClick"], Ml = { class: "opacity-75" },
|
|
1599
|
+
}), Sl = { class: "badge" }, Il = ["onClick"], Ml = { class: "opacity-75" }, zl = ["placeholder"], Wa = /* @__PURE__ */ P({
|
|
1642
1600
|
__name: "taginput",
|
|
1643
1601
|
props: {
|
|
1644
1602
|
modelValue: {},
|
|
@@ -1648,60 +1606,60 @@ const pt = ke("SunIcon", [
|
|
|
1648
1606
|
},
|
|
1649
1607
|
emits: ["update:modelValue"],
|
|
1650
1608
|
setup(e, { emit: c }) {
|
|
1651
|
-
const l = e, t = c, s = h([...l.modelValue]), n = l.maxTagAmount === void 0 ? -1 : l.maxTagAmount, r = h(null), m = h(""), u =
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1654
|
-
},
|
|
1655
|
-
s.value = s.value.filter((
|
|
1656
|
-
},
|
|
1609
|
+
const l = e, t = c, s = h([...l.modelValue]), n = l.maxTagAmount === void 0 ? -1 : l.maxTagAmount, r = h(null), m = h(""), u = H(() => n < 0 || s.value.length < n), g = () => {
|
|
1610
|
+
const v = m.value.trim();
|
|
1611
|
+
v && !s.value.includes(v) && (s.value.push(v), t("update:modelValue", s.value), m.value = "");
|
|
1612
|
+
}, S = (v) => {
|
|
1613
|
+
s.value = s.value.filter((O) => O !== v), t("update:modelValue", s.value);
|
|
1614
|
+
}, R = () => {
|
|
1657
1615
|
m.value === "" && (s.value.pop(), t("update:modelValue", s.value));
|
|
1658
|
-
},
|
|
1659
|
-
|
|
1616
|
+
}, V = (v) => {
|
|
1617
|
+
v.key === "Enter" ? g() : v.key === "Backspace" && m.value === "" && R();
|
|
1660
1618
|
};
|
|
1661
|
-
return
|
|
1662
|
-
s.value = [...
|
|
1663
|
-
}), (
|
|
1664
|
-
class:
|
|
1619
|
+
return N(() => l.modelValue, (v) => {
|
|
1620
|
+
s.value = [...v];
|
|
1621
|
+
}), (v, O) => (o(), i("div", {
|
|
1622
|
+
class: C(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", v.$props.class])
|
|
1665
1623
|
}, [
|
|
1666
|
-
(o(!0), i(
|
|
1667
|
-
key:
|
|
1668
|
-
tag:
|
|
1624
|
+
(o(!0), i(q, null, X(s.value, (M) => T(v.$slots, "tag", {
|
|
1625
|
+
key: M,
|
|
1626
|
+
tag: M
|
|
1669
1627
|
}, () => [
|
|
1670
1628
|
a("div", Sl, [
|
|
1671
1629
|
a("button", {
|
|
1672
1630
|
class: "px-1! py-0! h-fit font-bold cursor-pointer",
|
|
1673
|
-
onClick: (
|
|
1631
|
+
onClick: (U) => S(M),
|
|
1674
1632
|
"aria-label": "Remove tag"
|
|
1675
1633
|
}, "X", 8, Il),
|
|
1676
|
-
a("span", Ml,
|
|
1634
|
+
a("span", Ml, B(M), 1)
|
|
1677
1635
|
])
|
|
1678
1636
|
])), 128)),
|
|
1679
|
-
|
|
1637
|
+
T(v.$slots, "input", { showInput: u.value }, () => [
|
|
1680
1638
|
u.value ? Ie((o(), i("input", {
|
|
1681
1639
|
key: 0,
|
|
1682
1640
|
ref_key: "inputRef",
|
|
1683
1641
|
ref: r,
|
|
1684
|
-
"onUpdate:modelValue":
|
|
1642
|
+
"onUpdate:modelValue": O[0] || (O[0] = (M) => m.value = M),
|
|
1685
1643
|
type: "text",
|
|
1686
1644
|
placeholder: e.placeholder || "Type here",
|
|
1687
1645
|
class: "h-full input input-ghost",
|
|
1688
|
-
onKeydown:
|
|
1646
|
+
onKeydown: V,
|
|
1689
1647
|
"aria-label": "Add tags"
|
|
1690
|
-
}, null, 40,
|
|
1691
|
-
[
|
|
1648
|
+
}, null, 40, zl)), [
|
|
1649
|
+
[Ae, m.value]
|
|
1692
1650
|
]) : z("", !0)
|
|
1693
1651
|
])
|
|
1694
1652
|
], 2));
|
|
1695
1653
|
}
|
|
1696
|
-
}),
|
|
1654
|
+
}), Tl = { class: "w-full max-w-xs form-control" }, Bl = {
|
|
1697
1655
|
key: 0,
|
|
1698
1656
|
class: "label"
|
|
1699
|
-
},
|
|
1657
|
+
}, Dl = { class: "label-text" }, Ol = ["value"], Vl = {
|
|
1700
1658
|
key: 0,
|
|
1701
1659
|
value: "",
|
|
1702
1660
|
disabled: "",
|
|
1703
1661
|
selected: ""
|
|
1704
|
-
}, _l = ["value"], Ka = /* @__PURE__ */
|
|
1662
|
+
}, _l = ["value"], Ka = /* @__PURE__ */ P({
|
|
1705
1663
|
__name: "select",
|
|
1706
1664
|
props: {
|
|
1707
1665
|
options: {},
|
|
@@ -1723,9 +1681,9 @@ const pt = ke("SunIcon", [
|
|
|
1723
1681
|
}
|
|
1724
1682
|
// You can expose other properties or methods here if needed by the parent
|
|
1725
1683
|
// e.g., the current value: modelValue
|
|
1726
|
-
}), (u, g) => (o(), i("div",
|
|
1684
|
+
}), (u, g) => (o(), i("div", Tl, [
|
|
1727
1685
|
e.label ? (o(), i("label", Bl, [
|
|
1728
|
-
a("span",
|
|
1686
|
+
a("span", Dl, B(e.label), 1)
|
|
1729
1687
|
])) : z("", !0),
|
|
1730
1688
|
a("select", {
|
|
1731
1689
|
ref_key: "selectElement",
|
|
@@ -1734,18 +1692,18 @@ const pt = ke("SunIcon", [
|
|
|
1734
1692
|
value: e.modelValue,
|
|
1735
1693
|
onChange: r
|
|
1736
1694
|
}, [
|
|
1737
|
-
e.placeholder ? (o(), i("option", Vl,
|
|
1738
|
-
(o(!0), i(
|
|
1739
|
-
key:
|
|
1740
|
-
value:
|
|
1741
|
-
},
|
|
1742
|
-
], 40,
|
|
1695
|
+
e.placeholder ? (o(), i("option", Vl, B(e.placeholder), 1)) : z("", !0),
|
|
1696
|
+
(o(!0), i(q, null, X(e.options, (S) => (o(), i("option", {
|
|
1697
|
+
key: S.value,
|
|
1698
|
+
value: S.value
|
|
1699
|
+
}, B(S.text), 9, _l))), 128))
|
|
1700
|
+
], 40, Ol)
|
|
1743
1701
|
]));
|
|
1744
1702
|
}
|
|
1745
1703
|
}), El = {
|
|
1746
1704
|
key: 0,
|
|
1747
1705
|
class: "label"
|
|
1748
|
-
},
|
|
1706
|
+
}, Ll = { class: "label-text" }, jl = ["onKeydown", "aria-expanded", "aria-activedescendant"], Pl = ["placeholder", "disabled"], Rl = {
|
|
1749
1707
|
class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
|
|
1750
1708
|
role: "listbox"
|
|
1751
1709
|
}, Al = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, Nl = ["onMousedown", "id", "aria-selected"], Xa = {
|
|
@@ -1779,102 +1737,102 @@ const pt = ke("SunIcon", [
|
|
|
1779
1737
|
},
|
|
1780
1738
|
emits: ["update:modelValue", "select", "clear"],
|
|
1781
1739
|
setup(e, { expose: c, emit: l }) {
|
|
1782
|
-
const t = e, s = l, n = Je(), r =
|
|
1783
|
-
const
|
|
1784
|
-
return console.log("hasDefaultSlotContent computed:",
|
|
1785
|
-
}), m = h(""), u = h(null), g = h(!1),
|
|
1740
|
+
const t = e, s = l, n = Je(), r = H(() => {
|
|
1741
|
+
const D = (n.default ? n.default() : []).filter((w) => w.type !== Ze);
|
|
1742
|
+
return console.log("hasDefaultSlotContent computed:", D.length > 0), D.length > 0;
|
|
1743
|
+
}), m = h(""), u = h(null), g = h(!1), S = h(null), R = h(null), V = h(null), v = h(null), O = () => {
|
|
1786
1744
|
g.value = !t.disabled;
|
|
1787
|
-
},
|
|
1788
|
-
g.value = !1,
|
|
1789
|
-
},
|
|
1790
|
-
g.value ?
|
|
1791
|
-
},
|
|
1792
|
-
const
|
|
1793
|
-
return
|
|
1794
|
-
(
|
|
1745
|
+
}, M = () => {
|
|
1746
|
+
g.value = !1, v.value = null, r.value || (u.value && m.value !== u.value.text ? m.value = u.value.text : u.value || (m.value = ""));
|
|
1747
|
+
}, U = () => {
|
|
1748
|
+
g.value ? M() : O();
|
|
1749
|
+
}, A = H(() => {
|
|
1750
|
+
const d = m.value ? m.value.toLowerCase() : "";
|
|
1751
|
+
return d === "" && !g.value ? [] : t.options.filter(
|
|
1752
|
+
(w) => w && w.text ? w.text.toLowerCase().includes(d) : ""
|
|
1795
1753
|
);
|
|
1796
1754
|
});
|
|
1797
|
-
|
|
1755
|
+
N(
|
|
1798
1756
|
() => t.modelValue,
|
|
1799
|
-
(
|
|
1800
|
-
if (
|
|
1757
|
+
(d, D) => {
|
|
1758
|
+
if (d !== D && M(), d == null)
|
|
1801
1759
|
u.value = null, !g.value && !r.value && (m.value = "");
|
|
1802
1760
|
else {
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1761
|
+
const w = t.options.find((_) => _.value === d);
|
|
1762
|
+
w ? (u.value = w, !g.value && !r.value && (m.value = w.text)) : (u.value = null, !g.value && !r.value && (m.value = ""));
|
|
1805
1763
|
}
|
|
1806
1764
|
},
|
|
1807
1765
|
{ immediate: !0 }
|
|
1808
1766
|
// Run immediately on component mount
|
|
1809
1767
|
);
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1812
|
-
},
|
|
1768
|
+
const W = (d) => {
|
|
1769
|
+
R.value && !R.value.contains(d.target) && M();
|
|
1770
|
+
}, Z = () => {
|
|
1813
1771
|
setTimeout(() => {
|
|
1814
|
-
|
|
1772
|
+
R.value && !R.value.contains(document.activeElement) && M();
|
|
1815
1773
|
}, 100);
|
|
1816
1774
|
};
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
document.addEventListener("click",
|
|
1820
|
-
}, 0) : document.removeEventListener("click",
|
|
1821
|
-
}),
|
|
1822
|
-
document.removeEventListener("click",
|
|
1775
|
+
N(g, (d) => {
|
|
1776
|
+
d ? setTimeout(() => {
|
|
1777
|
+
document.addEventListener("click", W);
|
|
1778
|
+
}, 0) : document.removeEventListener("click", W);
|
|
1779
|
+
}), Ve(() => {
|
|
1780
|
+
document.removeEventListener("click", W), window.removeEventListener("keydown", I);
|
|
1823
1781
|
});
|
|
1824
|
-
const
|
|
1782
|
+
const te = () => {
|
|
1825
1783
|
if (t.disabled) return;
|
|
1826
|
-
const
|
|
1827
|
-
s("update:modelValue", null),
|
|
1828
|
-
}, f = (
|
|
1829
|
-
u.value =
|
|
1784
|
+
const d = u.value;
|
|
1785
|
+
s("update:modelValue", null), d && s("clear", d);
|
|
1786
|
+
}, f = (d) => {
|
|
1787
|
+
u.value = d, r.value || (m.value = d.text), s("update:modelValue", d.value), s("select", d), M();
|
|
1830
1788
|
}, y = () => {
|
|
1831
|
-
|
|
1789
|
+
A.value.length > 0 && f(A.value[0]);
|
|
1832
1790
|
}, b = () => {
|
|
1833
|
-
g.value ||
|
|
1834
|
-
},
|
|
1835
|
-
if (!g.value ||
|
|
1836
|
-
const
|
|
1837
|
-
(
|
|
1791
|
+
g.value || O();
|
|
1792
|
+
}, I = (d) => {
|
|
1793
|
+
if (!g.value || A.value.length === 0) return;
|
|
1794
|
+
const D = A.value.findIndex(
|
|
1795
|
+
(_, j) => "option-" + j === v.value
|
|
1838
1796
|
);
|
|
1839
|
-
let
|
|
1840
|
-
if (
|
|
1841
|
-
|
|
1842
|
-
else if (
|
|
1843
|
-
|
|
1844
|
-
else if (
|
|
1845
|
-
|
|
1846
|
-
const
|
|
1847
|
-
(
|
|
1797
|
+
let w = -1;
|
|
1798
|
+
if (d.key === "ArrowDown")
|
|
1799
|
+
d.preventDefault(), w = (D + 1) % A.value.length;
|
|
1800
|
+
else if (d.key === "ArrowUp")
|
|
1801
|
+
d.preventDefault(), w = (D - 1 + A.value.length) % A.value.length;
|
|
1802
|
+
else if (d.key === "Enter" && v.value) {
|
|
1803
|
+
d.preventDefault();
|
|
1804
|
+
const _ = A.value.find(
|
|
1805
|
+
(j, Q) => "option-" + Q === v.value
|
|
1848
1806
|
);
|
|
1849
|
-
|
|
1807
|
+
_ && f(_);
|
|
1850
1808
|
return;
|
|
1851
|
-
} else if (
|
|
1852
|
-
|
|
1809
|
+
} else if (d.key === "Escape") {
|
|
1810
|
+
d.preventDefault(), M(), V.value && V.value.focus();
|
|
1853
1811
|
return;
|
|
1854
1812
|
} else if (r.value)
|
|
1855
1813
|
return;
|
|
1856
|
-
if (
|
|
1857
|
-
|
|
1858
|
-
const
|
|
1859
|
-
|
|
1860
|
-
|
|
1814
|
+
if (w !== -1) {
|
|
1815
|
+
v.value = "option-" + w;
|
|
1816
|
+
const _ = document.getElementById(v.value);
|
|
1817
|
+
_ && requestAnimationFrame(() => {
|
|
1818
|
+
_.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
1861
1819
|
});
|
|
1862
1820
|
}
|
|
1863
1821
|
};
|
|
1864
|
-
return
|
|
1865
|
-
|
|
1866
|
-
}),
|
|
1867
|
-
document.removeEventListener("click",
|
|
1822
|
+
return N(g, (d) => {
|
|
1823
|
+
d ? (window.addEventListener("keydown", I), !r.value && !m.value && u.value && (m.value = u.value.text)) : window.removeEventListener("keydown", I);
|
|
1824
|
+
}), Ve(() => {
|
|
1825
|
+
document.removeEventListener("click", W), window.removeEventListener("keydown", I);
|
|
1868
1826
|
}), c({
|
|
1869
1827
|
isDropdownOpen: g,
|
|
1870
1828
|
// Expose state
|
|
1871
1829
|
selectedItem: u,
|
|
1872
1830
|
// Expose selected item
|
|
1873
|
-
openDropdown:
|
|
1831
|
+
openDropdown: O,
|
|
1874
1832
|
// Expose method to open
|
|
1875
|
-
closeDropdown:
|
|
1833
|
+
closeDropdown: M,
|
|
1876
1834
|
// Expose method to close
|
|
1877
|
-
toggleDropdown:
|
|
1835
|
+
toggleDropdown: U,
|
|
1878
1836
|
// Expose method to toggle
|
|
1879
1837
|
selectItem: f,
|
|
1880
1838
|
// Expose method to select an item programmatically
|
|
@@ -1882,78 +1840,78 @@ const pt = ke("SunIcon", [
|
|
|
1882
1840
|
// Expose filter text (useful if parent controls filtering)
|
|
1883
1841
|
hasDefaultSlotContent: r
|
|
1884
1842
|
// Expose to know if the default slot is used
|
|
1885
|
-
}), (
|
|
1843
|
+
}), (d, D) => (o(), i("div", {
|
|
1886
1844
|
class: "relative w-full max-w-xs form-control",
|
|
1887
1845
|
ref_key: "componentRoot",
|
|
1888
|
-
ref:
|
|
1846
|
+
ref: R
|
|
1889
1847
|
}, [
|
|
1890
1848
|
e.label ? (o(), i("label", El, [
|
|
1891
|
-
a("span",
|
|
1849
|
+
a("span", Ll, B(e.label), 1)
|
|
1892
1850
|
])) : z("", !0),
|
|
1893
1851
|
a("div", {
|
|
1894
|
-
class:
|
|
1895
|
-
style:
|
|
1852
|
+
class: C(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !r.value, select: !r.value }]),
|
|
1853
|
+
style: ye(
|
|
1896
1854
|
u.value ? "background-image: unset; padding-right: 0.5rem;" : ""
|
|
1897
1855
|
),
|
|
1898
1856
|
tabindex: "0",
|
|
1899
|
-
onClick:
|
|
1857
|
+
onClick: D[1] || (D[1] = (w) => r.value ? U() : O()),
|
|
1900
1858
|
onKeydown: [
|
|
1901
|
-
|
|
1902
|
-
|
|
1859
|
+
pe(oe(y, ["prevent"]), ["enter"]),
|
|
1860
|
+
pe(oe(y, ["prevent"]), ["space"])
|
|
1903
1861
|
],
|
|
1904
|
-
onBlur:
|
|
1862
|
+
onBlur: Z,
|
|
1905
1863
|
role: "combobox",
|
|
1906
1864
|
"aria-haspopup": "listbox",
|
|
1907
1865
|
"aria-expanded": g.value,
|
|
1908
|
-
"aria-activedescendant":
|
|
1866
|
+
"aria-activedescendant": v.value,
|
|
1909
1867
|
"aria-autocomplete": "list",
|
|
1910
1868
|
ref_key: "activatorWrapper",
|
|
1911
|
-
ref:
|
|
1869
|
+
ref: V
|
|
1912
1870
|
}, [
|
|
1913
|
-
|
|
1871
|
+
T(d.$slots, "default", {}, () => [
|
|
1914
1872
|
r.value ? z("", !0) : Ie((o(), i("input", {
|
|
1915
1873
|
key: 0,
|
|
1916
1874
|
type: "text",
|
|
1917
1875
|
placeholder: e.placeholder,
|
|
1918
1876
|
class: "bg-transparent border-none focus:outline-none w-full",
|
|
1919
|
-
"onUpdate:modelValue":
|
|
1877
|
+
"onUpdate:modelValue": D[0] || (D[0] = (w) => m.value = w),
|
|
1920
1878
|
ref_key: "filterInput",
|
|
1921
|
-
ref:
|
|
1922
|
-
onFocus:
|
|
1879
|
+
ref: S,
|
|
1880
|
+
onFocus: O,
|
|
1923
1881
|
onInput: b,
|
|
1924
1882
|
tabindex: "-1",
|
|
1925
1883
|
disabled: t.disabled
|
|
1926
1884
|
}, null, 40, Pl)), [
|
|
1927
|
-
[
|
|
1885
|
+
[Ae, m.value]
|
|
1928
1886
|
])
|
|
1929
1887
|
]),
|
|
1930
|
-
u.value && !e.disabled ? (o(),
|
|
1888
|
+
u.value && !e.disabled ? (o(), re(ee(ft), {
|
|
1931
1889
|
key: 0,
|
|
1932
1890
|
size: 20,
|
|
1933
1891
|
class: "mx-2 text-base-content/50 hover:text-base-content/80 cursor-pointer",
|
|
1934
|
-
onClick:
|
|
1892
|
+
onClick: oe(te, ["stop"])
|
|
1935
1893
|
})) : z("", !0),
|
|
1936
|
-
r.value && !u.value ? (o(),
|
|
1894
|
+
r.value && !u.value ? (o(), re(ee(vt), {
|
|
1937
1895
|
key: 1,
|
|
1938
|
-
class:
|
|
1896
|
+
class: C([{ "rotate-180": g.value }, "mx-2"]),
|
|
1939
1897
|
size: 20
|
|
1940
1898
|
}, null, 8, ["class"])) : z("", !0)
|
|
1941
|
-
], 46,
|
|
1899
|
+
], 46, jl),
|
|
1942
1900
|
Ie(a("div", Rl, [
|
|
1943
1901
|
a("ul", Al, [
|
|
1944
|
-
(o(!0), i(
|
|
1945
|
-
key:
|
|
1946
|
-
onMousedown:
|
|
1902
|
+
(o(!0), i(q, null, X(A.value, (w, _) => (o(), i("li", {
|
|
1903
|
+
key: w.value,
|
|
1904
|
+
onMousedown: oe((j) => f(w), ["prevent"]),
|
|
1947
1905
|
class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
|
|
1948
|
-
id: "option-" +
|
|
1906
|
+
id: "option-" + _,
|
|
1949
1907
|
role: "option",
|
|
1950
|
-
"aria-selected": u.value && u.value.value ===
|
|
1908
|
+
"aria-selected": u.value && u.value.value === w.value
|
|
1951
1909
|
}, [
|
|
1952
|
-
a("a", null,
|
|
1910
|
+
a("a", null, B(w.text), 1)
|
|
1953
1911
|
], 40, Nl))), 128))
|
|
1954
1912
|
])
|
|
1955
1913
|
], 512), [
|
|
1956
|
-
[Qe, g.value &&
|
|
1914
|
+
[Qe, g.value && A.value.length > 0]
|
|
1957
1915
|
])
|
|
1958
1916
|
], 512));
|
|
1959
1917
|
}
|
|
@@ -1966,7 +1924,7 @@ const pt = ke("SunIcon", [
|
|
|
1966
1924
|
}, Kl = { class: "label-text-alt text-error validator-hint" }, Xl = {
|
|
1967
1925
|
key: 2,
|
|
1968
1926
|
class: "label"
|
|
1969
|
-
}, Yl = { class: "label-text-alt text-success validator-hint" }, Ya = /* @__PURE__ */
|
|
1927
|
+
}, Yl = { class: "label-text-alt text-success validator-hint" }, Ya = /* @__PURE__ */ P({
|
|
1970
1928
|
__name: "inputField",
|
|
1971
1929
|
props: {
|
|
1972
1930
|
modelValue: { default: "" },
|
|
@@ -1983,42 +1941,42 @@ const pt = ke("SunIcon", [
|
|
|
1983
1941
|
},
|
|
1984
1942
|
emits: ["update:modelValue", "validate"],
|
|
1985
1943
|
setup(e, { expose: c, emit: l }) {
|
|
1986
|
-
const t = e, s = l, n = h(null), r = h(!1), m = h(""), u =
|
|
1987
|
-
var
|
|
1988
|
-
let
|
|
1989
|
-
const
|
|
1990
|
-
return (
|
|
1991
|
-
}), g =
|
|
1992
|
-
const
|
|
1993
|
-
s("update:modelValue",
|
|
1994
|
-
},
|
|
1944
|
+
const t = e, s = l, n = h(null), r = h(!1), m = h(""), u = H(() => {
|
|
1945
|
+
var U, A, W, Z;
|
|
1946
|
+
let v = !0, O = "";
|
|
1947
|
+
const M = t.modelValue;
|
|
1948
|
+
return (U = t.rules) != null && U.required && (M == null || M === "") && (v = !1, O = "This field is required."), v && ((A = t.rules) == null ? void 0 : A.minLength) !== void 0 && typeof M == "string" && M.length < t.rules.minLength && (v = !1, O = `Must be at least ${t.rules.minLength} characters.`), v && ((W = t.rules) == null ? void 0 : W.maxLength) !== void 0 && typeof M == "string" && M.length > t.rules.maxLength && (v = !1, O = `Cannot exceed ${t.rules.maxLength} characters.`), v && ((Z = t.rules) != null && Z.email) && typeof M == "string" && M && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(M) || (v = !1, O = "Please enter a valid email address.")), m.value = O, s("validate", v), v;
|
|
1949
|
+
}), g = H(() => r.value && !u.value), S = (v) => {
|
|
1950
|
+
const O = v.target;
|
|
1951
|
+
s("update:modelValue", O.value), r.value && u.value;
|
|
1952
|
+
}, R = () => {
|
|
1995
1953
|
r.value = !0, u.value;
|
|
1996
1954
|
};
|
|
1997
|
-
return
|
|
1955
|
+
return N(
|
|
1998
1956
|
() => t.modelValue,
|
|
1999
1957
|
() => {
|
|
2000
1958
|
r.value && u.value;
|
|
2001
1959
|
}
|
|
2002
1960
|
), c({
|
|
2003
1961
|
focusInput: () => {
|
|
2004
|
-
var
|
|
2005
|
-
console.log("inputField.vue: focusInput method called."), (
|
|
1962
|
+
var v;
|
|
1963
|
+
console.log("inputField.vue: focusInput method called."), (v = n.value) == null || v.focus();
|
|
2006
1964
|
},
|
|
2007
1965
|
isValid: u,
|
|
2008
1966
|
isTouched: r,
|
|
2009
1967
|
errorMessage: m
|
|
2010
|
-
}), (
|
|
1968
|
+
}), (v, O) => (o(), i("div", ql, [
|
|
2011
1969
|
e.label ? (o(), i("label", Fl, [
|
|
2012
|
-
a("span", Hl,
|
|
1970
|
+
a("span", Hl, B(e.label), 1)
|
|
2013
1971
|
])) : z("", !0),
|
|
2014
|
-
|
|
1972
|
+
T(v.$slots, "default"),
|
|
2015
1973
|
a("input", {
|
|
2016
1974
|
ref_key: "inputElement",
|
|
2017
1975
|
ref: n,
|
|
2018
1976
|
type: e.type,
|
|
2019
1977
|
placeholder: e.placeholder,
|
|
2020
1978
|
disabled: t.disabled,
|
|
2021
|
-
class:
|
|
1979
|
+
class: C(["input-bordered rounded-md w-full input validator", [
|
|
2022
1980
|
{
|
|
2023
1981
|
// Size classes - Apply based on size prop
|
|
2024
1982
|
"input-xs": e.size === "xs",
|
|
@@ -2046,17 +2004,17 @@ const pt = ke("SunIcon", [
|
|
|
2046
2004
|
}
|
|
2047
2005
|
]]),
|
|
2048
2006
|
value: e.modelValue,
|
|
2049
|
-
onInput:
|
|
2050
|
-
onBlur:
|
|
2007
|
+
onInput: S,
|
|
2008
|
+
onBlur: R
|
|
2051
2009
|
}, null, 42, Ul),
|
|
2052
2010
|
g.value ? (o(), i("div", Wl, [
|
|
2053
|
-
a("span", Kl,
|
|
2011
|
+
a("span", Kl, B(m.value), 1)
|
|
2054
2012
|
])) : u.value && r.value && e.successMessage ? (o(), i("div", Xl, [
|
|
2055
|
-
a("span", Yl,
|
|
2013
|
+
a("span", Yl, B(e.successMessage), 1)
|
|
2056
2014
|
])) : z("", !0)
|
|
2057
2015
|
]));
|
|
2058
2016
|
}
|
|
2059
|
-
}), Ga = /* @__PURE__ */
|
|
2017
|
+
}), Ga = /* @__PURE__ */ P({
|
|
2060
2018
|
__name: "loader",
|
|
2061
2019
|
props: {
|
|
2062
2020
|
loading: { type: Boolean, default: !0 },
|
|
@@ -2066,14 +2024,14 @@ const pt = ke("SunIcon", [
|
|
|
2066
2024
|
},
|
|
2067
2025
|
setup(e) {
|
|
2068
2026
|
const c = e, l = h(c.loading);
|
|
2069
|
-
return
|
|
2027
|
+
return N(
|
|
2070
2028
|
() => c.loading,
|
|
2071
2029
|
(t) => {
|
|
2072
2030
|
l.value = t;
|
|
2073
2031
|
}
|
|
2074
2032
|
), (t, s) => l.value ? (o(), i("span", {
|
|
2075
2033
|
key: 0,
|
|
2076
|
-
class:
|
|
2034
|
+
class: C(["loading", [
|
|
2077
2035
|
{ "loading-xs": e.size === "xs" },
|
|
2078
2036
|
{ "loading-sm": e.size === "sm" },
|
|
2079
2037
|
{ "loading-md": e.size === "md" },
|
|
@@ -2118,7 +2076,7 @@ function Gl() {
|
|
|
2118
2076
|
removeToast: c
|
|
2119
2077
|
};
|
|
2120
2078
|
}
|
|
2121
|
-
const Jl = ["value"], Zl = /* @__PURE__ */
|
|
2079
|
+
const Jl = ["value"], Zl = /* @__PURE__ */ P({
|
|
2122
2080
|
__name: "ToastNotification",
|
|
2123
2081
|
props: {
|
|
2124
2082
|
toast: {
|
|
@@ -2130,18 +2088,18 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2130
2088
|
setup(e, { emit: c }) {
|
|
2131
2089
|
const l = e, t = c, s = h(100);
|
|
2132
2090
|
let n = null, r = null;
|
|
2133
|
-
|
|
2091
|
+
de(() => {
|
|
2134
2092
|
const u = l.toast.duration, g = Date.now();
|
|
2135
2093
|
n = setTimeout(() => {
|
|
2136
2094
|
t("remove", l.toast.id);
|
|
2137
2095
|
}, u), r = setInterval(() => {
|
|
2138
|
-
const
|
|
2139
|
-
s.value =
|
|
2096
|
+
const S = Date.now() - g, R = Math.max(0, u - S);
|
|
2097
|
+
s.value = R / u * 100, R === 0 && clearInterval(r);
|
|
2140
2098
|
}, 50);
|
|
2141
|
-
}),
|
|
2099
|
+
}), _e(() => {
|
|
2142
2100
|
n && clearTimeout(n), r && clearInterval(r);
|
|
2143
2101
|
});
|
|
2144
|
-
const m =
|
|
2102
|
+
const m = H(() => {
|
|
2145
2103
|
switch (l.toast.type) {
|
|
2146
2104
|
case "success":
|
|
2147
2105
|
return "alert-success";
|
|
@@ -2157,17 +2115,17 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2157
2115
|
});
|
|
2158
2116
|
return (u, g) => (o(), i("div", {
|
|
2159
2117
|
role: "alert",
|
|
2160
|
-
class:
|
|
2118
|
+
class: C(["alert z-60", m.value, "shadow-lg"])
|
|
2161
2119
|
}, [
|
|
2162
|
-
a("span", null,
|
|
2120
|
+
a("span", null, B(e.toast.message), 1),
|
|
2163
2121
|
a("progress", {
|
|
2164
|
-
class:
|
|
2122
|
+
class: C(["progress absolute bottom-0 left-0 w-full progress-neutral"]),
|
|
2165
2123
|
value: s.value,
|
|
2166
2124
|
max: "100"
|
|
2167
2125
|
}, null, 8, Jl)
|
|
2168
2126
|
], 2));
|
|
2169
2127
|
}
|
|
2170
|
-
}), Ql = /* @__PURE__ */
|
|
2128
|
+
}), Ql = /* @__PURE__ */ ue(Zl, [["__scopeId", "data-v-bc0c6917"]]), ea = /* @__PURE__ */ P({
|
|
2171
2129
|
__name: "ToastContainer",
|
|
2172
2130
|
props: {
|
|
2173
2131
|
position: {
|
|
@@ -2177,7 +2135,7 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2177
2135
|
}
|
|
2178
2136
|
},
|
|
2179
2137
|
setup(e) {
|
|
2180
|
-
const c = e, { toasts: l, removeToast: t } = Gl(), s =
|
|
2138
|
+
const c = e, { toasts: l, removeToast: t } = Gl(), s = H(() => {
|
|
2181
2139
|
const [n, r] = c.position.split("-");
|
|
2182
2140
|
return {
|
|
2183
2141
|
"toast-top": n === "top",
|
|
@@ -2189,26 +2147,26 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2189
2147
|
};
|
|
2190
2148
|
});
|
|
2191
2149
|
return (n, r) => (o(), i("div", {
|
|
2192
|
-
class:
|
|
2150
|
+
class: C(["toast z-50", s.value])
|
|
2193
2151
|
}, [
|
|
2194
|
-
|
|
2195
|
-
default:
|
|
2196
|
-
(o(!0), i(
|
|
2152
|
+
se(tt, { name: "toast-fade" }, {
|
|
2153
|
+
default: be(() => [
|
|
2154
|
+
(o(!0), i(q, null, X(ee(l), (m) => (o(), re(Ql, {
|
|
2197
2155
|
key: m.id,
|
|
2198
2156
|
toast: m,
|
|
2199
|
-
onRemove: (u) =>
|
|
2157
|
+
onRemove: (u) => ee(t)(m.id)
|
|
2200
2158
|
}, null, 8, ["toast", "onRemove"]))), 128))
|
|
2201
2159
|
]),
|
|
2202
2160
|
_: 1
|
|
2203
2161
|
})
|
|
2204
2162
|
], 2));
|
|
2205
2163
|
}
|
|
2206
|
-
}), Ja = /* @__PURE__ */
|
|
2164
|
+
}), Ja = /* @__PURE__ */ ue(ea, [["__scopeId", "data-v-e10fa884"]]), ta = {
|
|
2207
2165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2208
2166
|
fill: "none",
|
|
2209
2167
|
viewBox: "0 0 24 24",
|
|
2210
2168
|
class: "w-6 h-6 stroke-current shrink-0"
|
|
2211
|
-
}, la = ["d"], aa = { class: "empty:hidden" }, Za = /* @__PURE__ */
|
|
2169
|
+
}, la = ["d"], aa = { class: "empty:hidden" }, Za = /* @__PURE__ */ P({
|
|
2212
2170
|
__name: "alert",
|
|
2213
2171
|
props: {
|
|
2214
2172
|
type: { default: "default" },
|
|
@@ -2218,10 +2176,10 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2218
2176
|
},
|
|
2219
2177
|
emits: ["update:modelValue"],
|
|
2220
2178
|
setup(e, { emit: c }) {
|
|
2221
|
-
const l = e, t = c, s =
|
|
2179
|
+
const l = e, t = c, s = H({
|
|
2222
2180
|
get: () => l.modelValue,
|
|
2223
2181
|
set: (u) => t("update:modelValue", u)
|
|
2224
|
-
}), n =
|
|
2182
|
+
}), n = H(() => {
|
|
2225
2183
|
switch (l.type) {
|
|
2226
2184
|
case "info":
|
|
2227
2185
|
return "alert-info";
|
|
@@ -2234,7 +2192,7 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2234
2192
|
default:
|
|
2235
2193
|
return "";
|
|
2236
2194
|
}
|
|
2237
|
-
}), r =
|
|
2195
|
+
}), r = H(() => {
|
|
2238
2196
|
switch (l.type) {
|
|
2239
2197
|
case "info":
|
|
2240
2198
|
return "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z";
|
|
@@ -2253,9 +2211,9 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2253
2211
|
return (u, g) => s.value ? (o(), i("div", {
|
|
2254
2212
|
key: 0,
|
|
2255
2213
|
role: "alert",
|
|
2256
|
-
class:
|
|
2214
|
+
class: C(["alert", n.value])
|
|
2257
2215
|
}, [
|
|
2258
|
-
|
|
2216
|
+
T(u.$slots, "icon", { class: "w-6 h-6" }, () => [
|
|
2259
2217
|
(o(), i("svg", ta, [
|
|
2260
2218
|
a("path", {
|
|
2261
2219
|
"stroke-linecap": "round",
|
|
@@ -2265,14 +2223,14 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2265
2223
|
}, null, 8, la)
|
|
2266
2224
|
]))
|
|
2267
2225
|
]),
|
|
2268
|
-
a("span", null,
|
|
2226
|
+
a("span", null, B(e.message), 1),
|
|
2269
2227
|
a("div", aa, [
|
|
2270
2228
|
e.closable ? (o(), i("button", {
|
|
2271
2229
|
key: 0,
|
|
2272
2230
|
class: "btn btn-sm btn-ghost",
|
|
2273
2231
|
onClick: m
|
|
2274
2232
|
}, "Close")) : z("", !0),
|
|
2275
|
-
|
|
2233
|
+
T(u.$slots, "default")
|
|
2276
2234
|
])
|
|
2277
2235
|
], 2)) : z("", !0);
|
|
2278
2236
|
}
|
|
@@ -2282,7 +2240,7 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2282
2240
|
}, ra = { class: "border-b-2 border-base-100 last:border-b-0 w-full" }, ua = {
|
|
2283
2241
|
tabindex: "0",
|
|
2284
2242
|
class: "collapse collapse-plus w-full"
|
|
2285
|
-
}, ca = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, da = { class: "collapse-content flex w-full text-sm" }, va = { class: "flex flex-col gap-2.5" }, fa = { class: "w-full" }, ma = ["href"], pa = { class: "sm:w-1/4" }, Qa = /* @__PURE__ */
|
|
2243
|
+
}, ca = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, da = { class: "collapse-content flex w-full text-sm" }, va = { class: "flex flex-col gap-2.5" }, fa = { class: "w-full" }, ma = ["href"], pa = { class: "sm:w-1/4" }, Qa = /* @__PURE__ */ P({
|
|
2286
2244
|
__name: "footer",
|
|
2287
2245
|
props: {
|
|
2288
2246
|
items: {},
|
|
@@ -2294,37 +2252,37 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2294
2252
|
setup(e) {
|
|
2295
2253
|
const c = e;
|
|
2296
2254
|
return (l, t) => (o(), i("div", {
|
|
2297
|
-
class:
|
|
2255
|
+
class: C(["mx-auto md:px-10 py-10 text-base-content", [e.background ?? "bg-base-200", e.color ?? "text-base-content"]])
|
|
2298
2256
|
}, [
|
|
2299
2257
|
a("footer", na, [
|
|
2300
2258
|
a("div", {
|
|
2301
|
-
class:
|
|
2259
|
+
class: C(["footer sm:footer-horizontal sm:w-3/4", [{ "sm:grid-rows-1": c.rows === 1 }, { "sm:grid-rows-2": c.rows === 2 }, { "sm:grid-rows-3": c.rows === 3 }]])
|
|
2302
2260
|
}, [
|
|
2303
|
-
(o(!0), i(
|
|
2304
|
-
class:
|
|
2261
|
+
(o(!0), i(q, null, X(c.items, (s) => (o(), i("nav", {
|
|
2262
|
+
class: C([{ "hidden sm:grid w-max": e.collapseOnMobile }])
|
|
2305
2263
|
}, [
|
|
2306
|
-
a("h6", oa,
|
|
2307
|
-
(o(!0), i(
|
|
2264
|
+
a("h6", oa, B(s.title), 1),
|
|
2265
|
+
(o(!0), i(q, null, X(s.items, (n) => (o(), i("a", {
|
|
2308
2266
|
class: "link link-hover",
|
|
2309
2267
|
href: n.link
|
|
2310
|
-
},
|
|
2268
|
+
}, B(n.text), 9, sa))), 256))
|
|
2311
2269
|
], 2))), 256)),
|
|
2312
2270
|
a("nav", {
|
|
2313
|
-
class:
|
|
2271
|
+
class: C(["empty:hidden", [{ "hidden sm:grid": e.collapseOnMobile }]])
|
|
2314
2272
|
}, [
|
|
2315
|
-
|
|
2273
|
+
T(l.$slots, "extra-row")
|
|
2316
2274
|
], 2),
|
|
2317
2275
|
e.collapseOnMobile ? (o(), i("nav", ia, [
|
|
2318
|
-
(o(!0), i(
|
|
2276
|
+
(o(!0), i(q, null, X(c.items, (s) => (o(), i("ul", ra, [
|
|
2319
2277
|
a("div", ua, [
|
|
2320
|
-
a("div", ca,
|
|
2278
|
+
a("div", ca, B(s.title), 1),
|
|
2321
2279
|
a("div", da, [
|
|
2322
2280
|
a("ul", va, [
|
|
2323
|
-
(o(!0), i(
|
|
2281
|
+
(o(!0), i(q, null, X(s.items, (n) => (o(), i("li", fa, [
|
|
2324
2282
|
a("a", {
|
|
2325
2283
|
class: "w-full font-medium link link-hover",
|
|
2326
2284
|
href: n.link
|
|
2327
|
-
},
|
|
2285
|
+
}, B(n.text), 9, ma)
|
|
2328
2286
|
]))), 256))
|
|
2329
2287
|
])
|
|
2330
2288
|
])
|
|
@@ -2333,7 +2291,7 @@ const Jl = ["value"], Zl = /* @__PURE__ */ A({
|
|
|
2333
2291
|
])) : z("", !0)
|
|
2334
2292
|
], 2),
|
|
2335
2293
|
a("aside", pa, [
|
|
2336
|
-
|
|
2294
|
+
T(l.$slots, "default")
|
|
2337
2295
|
])
|
|
2338
2296
|
])
|
|
2339
2297
|
], 2));
|
|
@@ -2344,21 +2302,21 @@ function wa(e, c) {
|
|
|
2344
2302
|
a("div", ba, [
|
|
2345
2303
|
a("div", null, [
|
|
2346
2304
|
a("h1", ya, [
|
|
2347
|
-
|
|
2348
|
-
c[0] || (c[0] =
|
|
2305
|
+
T(e.$slots, "title", {}, () => [
|
|
2306
|
+
c[0] || (c[0] = Re("hero title", -1))
|
|
2349
2307
|
])
|
|
2350
2308
|
]),
|
|
2351
2309
|
a("p", null, [
|
|
2352
|
-
|
|
2310
|
+
T(e.$slots, "description", { class: "py-9" })
|
|
2353
2311
|
]),
|
|
2354
|
-
|
|
2312
|
+
T(e.$slots, "call-to-action-block", { class: "max-w-full" }, () => [
|
|
2355
2313
|
c[1] || (c[1] = a("button", { class: "btn btn-primary" }, "Call to action", -1))
|
|
2356
2314
|
])
|
|
2357
2315
|
])
|
|
2358
2316
|
])
|
|
2359
2317
|
]);
|
|
2360
2318
|
}
|
|
2361
|
-
const en = /* @__PURE__ */
|
|
2319
|
+
const en = /* @__PURE__ */ ue(ha, [["render", wa]]), xa = { class: "flex flex-row place-content-center gap-4 categories" }, ka = ["onClick"], tn = /* @__PURE__ */ P({
|
|
2362
2320
|
__name: "categoryNavigation",
|
|
2363
2321
|
props: {
|
|
2364
2322
|
searchOptions: {},
|
|
@@ -2371,17 +2329,17 @@ const en = /* @__PURE__ */ de(ha, [["render", wa]]), xa = { class: "flex flex-ro
|
|
|
2371
2329
|
t("update:currentCategory", n);
|
|
2372
2330
|
}
|
|
2373
2331
|
return (n, r) => (o(), i("div", xa, [
|
|
2374
|
-
(o(!0), i(
|
|
2332
|
+
(o(!0), i(q, null, X(l.searchOptions, (m) => (o(), i("div", {
|
|
2375
2333
|
key: m.category
|
|
2376
2334
|
}, [
|
|
2377
2335
|
a("button", {
|
|
2378
2336
|
onClick: (u) => s(m.category),
|
|
2379
|
-
class:
|
|
2380
|
-
},
|
|
2337
|
+
class: C(["truncate btn btn-ghost", { "font-semibold": l.currentCategory === m.category }])
|
|
2338
|
+
}, B(m.category), 11, ka)
|
|
2381
2339
|
]))), 128))
|
|
2382
2340
|
]));
|
|
2383
2341
|
}
|
|
2384
|
-
}), $a = { class: "md:flex hidden navbar-start" }, Ca = { class: "md:flex justify-center items-center hidden navbar-center" }, Sa = { class: "md:flex hidden navbar-end" }, Ia = { class: "navbar-bottom md:flex hidden" }, Ma = /* @__PURE__ */
|
|
2342
|
+
}), $a = { class: "md:flex hidden navbar-start" }, Ca = { class: "md:flex justify-center items-center hidden navbar-center" }, Sa = { class: "md:flex hidden navbar-end" }, Ia = { class: "navbar-bottom md:flex hidden" }, Ma = /* @__PURE__ */ P({
|
|
2385
2343
|
__name: "navigationBar",
|
|
2386
2344
|
props: {
|
|
2387
2345
|
isCollapsed: { type: Boolean, default: !0 }
|
|
@@ -2389,30 +2347,30 @@ const en = /* @__PURE__ */ de(ha, [["render", wa]]), xa = { class: "flex flex-ro
|
|
|
2389
2347
|
setup(e) {
|
|
2390
2348
|
const c = e;
|
|
2391
2349
|
return (l, t) => (o(), i("nav", {
|
|
2392
|
-
class:
|
|
2350
|
+
class: C(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar", c.isCollapsed ? "collapsed" : ""])
|
|
2393
2351
|
}, [
|
|
2394
2352
|
a("div", $a, [
|
|
2395
|
-
|
|
2353
|
+
T(l.$slots, "start", {}, void 0, !0)
|
|
2396
2354
|
]),
|
|
2397
2355
|
a("div", Ca, [
|
|
2398
|
-
|
|
2356
|
+
T(l.$slots, "center", {}, void 0, !0)
|
|
2399
2357
|
]),
|
|
2400
2358
|
a("div", Sa, [
|
|
2401
|
-
|
|
2359
|
+
T(l.$slots, "end", {}, void 0, !0)
|
|
2402
2360
|
]),
|
|
2403
2361
|
a("div", Ia, [
|
|
2404
|
-
|
|
2362
|
+
T(l.$slots, "bottom", {}, void 0, !0)
|
|
2405
2363
|
])
|
|
2406
2364
|
], 2));
|
|
2407
2365
|
}
|
|
2408
|
-
}), ln = /* @__PURE__ */
|
|
2366
|
+
}), ln = /* @__PURE__ */ ue(Ma, [["__scopeId", "data-v-8ddb2b45"]]), za = {
|
|
2409
2367
|
key: 0,
|
|
2410
2368
|
class: "hidden top-4 right-0 absolute md:flex gap-4"
|
|
2411
|
-
},
|
|
2369
|
+
}, Ta = ["onClick", "aria-selected"], Ba = {
|
|
2412
2370
|
key: 0,
|
|
2413
2371
|
role: "tabpanel",
|
|
2414
2372
|
class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full overflow-x-auto tab-content"
|
|
2415
|
-
},
|
|
2373
|
+
}, Da = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, an = /* @__PURE__ */ P({
|
|
2416
2374
|
__name: "tab",
|
|
2417
2375
|
props: {
|
|
2418
2376
|
items: {},
|
|
@@ -2434,42 +2392,42 @@ const en = /* @__PURE__ */ de(ha, [["render", wa]]), xa = { class: "flex flex-ro
|
|
|
2434
2392
|
const g = (l.items.indexOf(t.value) - 1 + l.items.length) % l.items.length;
|
|
2435
2393
|
n(l.items[g]);
|
|
2436
2394
|
}
|
|
2437
|
-
return
|
|
2395
|
+
return de(() => {
|
|
2438
2396
|
l.items && n(l.items[0]);
|
|
2439
|
-
}),
|
|
2397
|
+
}), _e(() => {
|
|
2440
2398
|
l.rotateTabsAfter && l.rotateTabsAfter > 0 && setInterval(() => {
|
|
2441
2399
|
r();
|
|
2442
2400
|
}, l.rotateTabsAfter * 1e3);
|
|
2443
|
-
}), (u, g) => (o(), i(
|
|
2401
|
+
}), (u, g) => (o(), i(q, null, [
|
|
2444
2402
|
a("div", {
|
|
2445
2403
|
role: "tablist",
|
|
2446
|
-
class:
|
|
2404
|
+
class: C(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto": e.buttonOnlyMode }])
|
|
2447
2405
|
}, [
|
|
2448
|
-
e.withControlls ? (o(), i("div",
|
|
2406
|
+
e.withControlls ? (o(), i("div", za, [
|
|
2449
2407
|
a("button", {
|
|
2450
|
-
onClick: g[0] || (g[0] = (
|
|
2408
|
+
onClick: g[0] || (g[0] = (S) => m()),
|
|
2451
2409
|
class: "cursor-pointer"
|
|
2452
2410
|
}, "Previous"),
|
|
2453
2411
|
a("button", {
|
|
2454
|
-
onClick: g[1] || (g[1] = (
|
|
2412
|
+
onClick: g[1] || (g[1] = (S) => r()),
|
|
2455
2413
|
class: "text-primary cursor-pointer"
|
|
2456
2414
|
}, "Next")
|
|
2457
2415
|
])) : z("", !0),
|
|
2458
|
-
(o(!0), i(
|
|
2416
|
+
(o(!0), i(q, null, X(e.items, (S) => (o(), i(q, null, [
|
|
2459
2417
|
a("a", {
|
|
2460
2418
|
type: "button",
|
|
2461
2419
|
role: "tab",
|
|
2462
|
-
class:
|
|
2463
|
-
onClick: (
|
|
2464
|
-
"aria-selected": t.value ==
|
|
2465
|
-
},
|
|
2420
|
+
class: C(["min-w-max tab", S === t.value ? "bg-primary text-base-100" : ""]),
|
|
2421
|
+
onClick: (R) => n(S),
|
|
2422
|
+
"aria-selected": t.value == S
|
|
2423
|
+
}, B(S), 11, Ta),
|
|
2466
2424
|
e.buttonOnlyMode ? z("", !0) : (o(), i("div", Ba, [
|
|
2467
|
-
|
|
2425
|
+
T(u.$slots, `${S}-tab`)
|
|
2468
2426
|
]))
|
|
2469
2427
|
], 64))), 256))
|
|
2470
2428
|
], 2),
|
|
2471
|
-
a("div",
|
|
2472
|
-
|
|
2429
|
+
a("div", Da, [
|
|
2430
|
+
T(u.$slots, "default")
|
|
2473
2431
|
])
|
|
2474
2432
|
], 64));
|
|
2475
2433
|
}
|
|
@@ -2498,10 +2456,10 @@ export {
|
|
|
2498
2456
|
ln as NavigationBar,
|
|
2499
2457
|
Ua as Rating,
|
|
2500
2458
|
Ka as Selector,
|
|
2501
|
-
|
|
2459
|
+
La as Swap,
|
|
2502
2460
|
an as Tab,
|
|
2503
2461
|
Wa as TagInput,
|
|
2504
|
-
|
|
2462
|
+
ja as ThemeController,
|
|
2505
2463
|
Ja as Toast,
|
|
2506
2464
|
Gl as ToastComposable,
|
|
2507
2465
|
Ql as ToastNotification
|