manolis-ui 0.6.11 → 0.6.18
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/README.md +6 -0
- package/dist/index.d.ts +77 -45
- package/dist/inputField-BxT95oyM.js +4 -0
- package/dist/manolis-ui.css +1 -1
- package/dist/manolis-ui.js +1121 -918
- package/dist/manolis-ui.umd.cjs +10 -10
- package/dist/select-Cz4vf_YE.js +4 -0
- package/dist/style.css +6 -17
- package/package.json +1 -1
package/dist/manolis-ui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as L, computed as E, createElementBlock as a, openBlock as n, normalizeClass as V, createCommentVNode as O, renderSlot as T, createTextVNode as ke, createElementVNode as o, Fragment as B, renderList as A, toDisplayString as C, ref as x, h as me, onMounted as Q, watch as H, withDirectives as q, createVNode as ae, isRef as ze, vModelCheckbox as Ae, unref as F, provide as Pe, normalizeStyle as de, inject as Ee, useId as Le, defineAsyncComponent as ce, nextTick as pe, onBeforeUnmount as ge, withModifiers as ee, createBlock as ue, resolveDynamicComponent as ve, mergeProps as fe, withKeys as he, onUnmounted as $e, vModelSelect as Z, vModelText as ne, useSlots as Ue, Comment as Re, vShow as Ne } from "vue";
|
|
2
|
+
const je = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "loading loading-spinner"
|
|
5
|
-
},
|
|
5
|
+
}, pn = /* @__PURE__ */ L({
|
|
6
6
|
__name: "ButtonComponent",
|
|
7
7
|
props: {
|
|
8
8
|
outlined: { type: Boolean, default: !1 },
|
|
@@ -13,8 +13,8 @@ const Re = {
|
|
|
13
13
|
shape: {}
|
|
14
14
|
},
|
|
15
15
|
setup(i) {
|
|
16
|
-
const
|
|
17
|
-
switch (
|
|
16
|
+
const c = i, e = E(() => {
|
|
17
|
+
switch (c.size) {
|
|
18
18
|
case "large":
|
|
19
19
|
return "btn-lg";
|
|
20
20
|
case "small":
|
|
@@ -28,8 +28,8 @@ const Re = {
|
|
|
28
28
|
default:
|
|
29
29
|
return "";
|
|
30
30
|
}
|
|
31
|
-
}), t =
|
|
32
|
-
switch (
|
|
31
|
+
}), t = E(() => {
|
|
32
|
+
switch (c.type) {
|
|
33
33
|
case "neutral":
|
|
34
34
|
return "btn-neutral";
|
|
35
35
|
case "primary":
|
|
@@ -53,8 +53,8 @@ const Re = {
|
|
|
53
53
|
default:
|
|
54
54
|
return "btn-neutral";
|
|
55
55
|
}
|
|
56
|
-
}),
|
|
57
|
-
switch (
|
|
56
|
+
}), s = E(() => {
|
|
57
|
+
switch (c.shape) {
|
|
58
58
|
case "square":
|
|
59
59
|
return "btn-square";
|
|
60
60
|
case "circle":
|
|
@@ -63,19 +63,19 @@ const Re = {
|
|
|
63
63
|
return "";
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
-
return (
|
|
67
|
-
class:
|
|
66
|
+
return (l, r) => (n(), a("button", {
|
|
67
|
+
class: V(["btn", { "btn-outline": c.outlined }, { "btn-active": c.active }, t.value, e.value, s.value])
|
|
68
68
|
}, [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
r[0] || (r[0] =
|
|
69
|
+
l.loading ? (n(), a("span", je)) : O("", !0),
|
|
70
|
+
T(l.$slots, "default", {}, () => [
|
|
71
|
+
r[0] || (r[0] = ke("Submit"))
|
|
72
72
|
])
|
|
73
73
|
], 2));
|
|
74
74
|
}
|
|
75
75
|
}), Fe = {
|
|
76
76
|
tabindex: "0",
|
|
77
77
|
class: "z-1 bg-base-100 shadow-sm p-2 rounded-sm min-w-[inherit] md:min-w-full xl:min-w-52 dropdown-content menu"
|
|
78
|
-
},
|
|
78
|
+
}, qe = ["href"], vn = /* @__PURE__ */ L({
|
|
79
79
|
__name: "dropdown",
|
|
80
80
|
props: {
|
|
81
81
|
items: {},
|
|
@@ -85,7 +85,7 @@ const Re = {
|
|
|
85
85
|
forceOpen: { type: Boolean, default: !1 }
|
|
86
86
|
},
|
|
87
87
|
setup(i) {
|
|
88
|
-
const
|
|
88
|
+
const c = {
|
|
89
89
|
left: "dropdown-left",
|
|
90
90
|
right: "dropdown-right",
|
|
91
91
|
bottom: "dropdown-bottom",
|
|
@@ -94,68 +94,68 @@ const Re = {
|
|
|
94
94
|
start: "",
|
|
95
95
|
end: "dropdown-end"
|
|
96
96
|
}, t = i;
|
|
97
|
-
return (
|
|
98
|
-
class:
|
|
97
|
+
return (s, l) => (n(), a("div", {
|
|
98
|
+
class: V(["dropdown", c[t.position], e[t.floatPosition], { "dropdown-open": t.forceOpen }, { "dropdown-hover": t.openOnHover }])
|
|
99
99
|
}, [
|
|
100
|
-
|
|
100
|
+
T(s.$slots, "default", {
|
|
101
101
|
tabindex: "0",
|
|
102
102
|
role: "button"
|
|
103
103
|
}, () => [
|
|
104
|
-
|
|
104
|
+
l[0] || (l[0] = o("div", { class: "m-1 btn" }, "Open dropdown", -1))
|
|
105
105
|
]),
|
|
106
|
-
|
|
107
|
-
(
|
|
108
|
-
|
|
106
|
+
o("ul", Fe, [
|
|
107
|
+
(n(!0), a(B, null, A(s.items, (r) => (n(), a("li", null, [
|
|
108
|
+
o("a", {
|
|
109
109
|
href: r.link
|
|
110
|
-
},
|
|
110
|
+
}, C(r.text), 9, qe)
|
|
111
111
|
]))), 256)),
|
|
112
|
-
|
|
112
|
+
T(s.$slots, "additional")
|
|
113
113
|
])
|
|
114
114
|
], 2));
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), He = { class: "modal-box" }, We = { class: "modal-action" }, fn = /* @__PURE__ */ L({
|
|
117
117
|
__name: "modal",
|
|
118
118
|
props: {
|
|
119
119
|
position: { default: "center" },
|
|
120
120
|
withBackdrop: { type: Boolean, default: !1 }
|
|
121
121
|
},
|
|
122
122
|
setup(i) {
|
|
123
|
-
const
|
|
123
|
+
const c = i, e = {
|
|
124
124
|
top: "modal-top",
|
|
125
125
|
bottom: "modal-bottom",
|
|
126
126
|
center: "modal-middle"
|
|
127
|
-
}, t =
|
|
127
|
+
}, t = x(null), s = () => {
|
|
128
128
|
var r;
|
|
129
129
|
(r = t.value) == null || r.showModal();
|
|
130
|
-
},
|
|
130
|
+
}, l = () => {
|
|
131
131
|
var r;
|
|
132
132
|
(r = t.value) == null || r.close();
|
|
133
133
|
};
|
|
134
|
-
return (r,
|
|
135
|
-
|
|
134
|
+
return (r, y) => (n(), a(B, null, [
|
|
135
|
+
o("span", {
|
|
136
136
|
class: "w-fit cursor-pointer",
|
|
137
|
-
onClick:
|
|
137
|
+
onClick: s
|
|
138
138
|
}, [
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
T(r.$slots, "trigger", { role: "button" }, () => [
|
|
140
|
+
y[0] || (y[0] = o("button", { class: "btn" }, "Open", -1))
|
|
141
141
|
])
|
|
142
142
|
]),
|
|
143
|
-
|
|
143
|
+
o("dialog", {
|
|
144
144
|
ref_key: "dialog",
|
|
145
145
|
ref: t,
|
|
146
|
-
class:
|
|
146
|
+
class: V(["modal", e[c.position]])
|
|
147
147
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
o("div", He, [
|
|
149
|
+
T(r.$slots, "default"),
|
|
150
|
+
o("div", We, [
|
|
151
|
+
T(r.$slots, "actions"),
|
|
152
|
+
o("form", {
|
|
153
153
|
method: "dialog",
|
|
154
|
-
onSubmit:
|
|
155
|
-
class:
|
|
154
|
+
onSubmit: l,
|
|
155
|
+
class: V(r.withBackdrop ? "modal-backdrop" : "")
|
|
156
156
|
}, [
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
T(r.$slots, "close-button", {}, () => [
|
|
158
|
+
y[1] || (y[1] = o("button", { class: "btn" }, "Close", -1))
|
|
159
159
|
])
|
|
160
160
|
], 34)
|
|
161
161
|
])
|
|
@@ -163,22 +163,22 @@ const Re = {
|
|
|
163
163
|
], 2)
|
|
164
164
|
], 64));
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), Ke = { class: "flex justify-center items-center swap-on" }, Ye = { class: "flex justify-center items-center swap-off" }, mn = /* @__PURE__ */ L({
|
|
167
167
|
__name: "swap",
|
|
168
168
|
props: {
|
|
169
169
|
effect: {}
|
|
170
170
|
},
|
|
171
171
|
setup(i) {
|
|
172
|
-
const
|
|
173
|
-
return (e, t) => (
|
|
174
|
-
class:
|
|
172
|
+
const c = i;
|
|
173
|
+
return (e, t) => (n(), a("label", {
|
|
174
|
+
class: V(["swap", c.effect ? `swap-${e.effect}` : ""])
|
|
175
175
|
}, [
|
|
176
|
-
t[0] || (t[0] =
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
t[0] || (t[0] = o("input", { type: "checkbox" }, null, -1)),
|
|
177
|
+
o("div", Ke, [
|
|
178
|
+
T(e.$slots, "on")
|
|
179
179
|
]),
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
o("div", Ye, [
|
|
181
|
+
T(e.$slots, "off")
|
|
182
182
|
])
|
|
183
183
|
], 2));
|
|
184
184
|
}
|
|
@@ -189,14 +189,14 @@ const Re = {
|
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
191
|
*/
|
|
192
|
-
const
|
|
192
|
+
const Je = (i) => i.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
193
193
|
/**
|
|
194
194
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
195
195
|
*
|
|
196
196
|
* This source code is licensed under the ISC license.
|
|
197
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
198
198
|
*/
|
|
199
|
-
var
|
|
199
|
+
var ie = {
|
|
200
200
|
xmlns: "http://www.w3.org/2000/svg",
|
|
201
201
|
width: 24,
|
|
202
202
|
height: 24,
|
|
@@ -213,18 +213,18 @@ var oe = {
|
|
|
213
213
|
* This source code is licensed under the ISC license.
|
|
214
214
|
* See the LICENSE file in the root directory of this source tree.
|
|
215
215
|
*/
|
|
216
|
-
const
|
|
216
|
+
const Ge = ({ size: i, strokeWidth: c = 2, absoluteStrokeWidth: e, color: t, iconNode: s, name: l, class: r, ...y }, { slots: p }) => me(
|
|
217
217
|
"svg",
|
|
218
218
|
{
|
|
219
|
-
...
|
|
220
|
-
width: i ||
|
|
221
|
-
height: i ||
|
|
222
|
-
stroke: t ||
|
|
223
|
-
"stroke-width": e ? Number(
|
|
224
|
-
class: ["lucide", `lucide-${
|
|
225
|
-
...
|
|
219
|
+
...ie,
|
|
220
|
+
width: i || ie.width,
|
|
221
|
+
height: i || ie.height,
|
|
222
|
+
stroke: t || ie.stroke,
|
|
223
|
+
"stroke-width": e ? Number(c) * 24 / Number(i) : c,
|
|
224
|
+
class: ["lucide", `lucide-${Je(l ?? "icon")}`],
|
|
225
|
+
...y
|
|
226
226
|
},
|
|
227
|
-
[...
|
|
227
|
+
[...s.map((f) => me(...f)), ...p.default ? [p.default()] : []]
|
|
228
228
|
);
|
|
229
229
|
/**
|
|
230
230
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
@@ -232,11 +232,11 @@ const Je = ({ size: i, strokeWidth: d = 2, absoluteStrokeWidth: e, color: t, ico
|
|
|
232
232
|
* This source code is licensed under the ISC license.
|
|
233
233
|
* See the LICENSE file in the root directory of this source tree.
|
|
234
234
|
*/
|
|
235
|
-
const
|
|
236
|
-
|
|
235
|
+
const oe = (i, c) => (e, { slots: t }) => me(
|
|
236
|
+
Ge,
|
|
237
237
|
{
|
|
238
238
|
...e,
|
|
239
|
-
iconNode:
|
|
239
|
+
iconNode: c,
|
|
240
240
|
name: i
|
|
241
241
|
},
|
|
242
242
|
t
|
|
@@ -247,7 +247,7 @@ const le = (i, d) => (e, { slots: t }) => ie(
|
|
|
247
247
|
* This source code is licensed under the ISC license.
|
|
248
248
|
* See the LICENSE file in the root directory of this source tree.
|
|
249
249
|
*/
|
|
250
|
-
const
|
|
250
|
+
const Xe = oe("CalendarIcon", [
|
|
251
251
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
252
252
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
253
253
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
@@ -259,7 +259,7 @@ const Ge = le("CalendarIcon", [
|
|
|
259
259
|
* This source code is licensed under the ISC license.
|
|
260
260
|
* See the LICENSE file in the root directory of this source tree.
|
|
261
261
|
*/
|
|
262
|
-
const
|
|
262
|
+
const Ze = oe("ChevronDownIcon", [
|
|
263
263
|
["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
|
|
264
264
|
]);
|
|
265
265
|
/**
|
|
@@ -268,7 +268,7 @@ const Xe = le("ChevronDownIcon", [
|
|
|
268
268
|
* This source code is licensed under the ISC license.
|
|
269
269
|
* See the LICENSE file in the root directory of this source tree.
|
|
270
270
|
*/
|
|
271
|
-
const
|
|
271
|
+
const Qe = oe("MoonIcon", [
|
|
272
272
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
|
|
273
273
|
]);
|
|
274
274
|
/**
|
|
@@ -277,7 +277,7 @@ const Ze = le("MoonIcon", [
|
|
|
277
277
|
* This source code is licensed under the ISC license.
|
|
278
278
|
* See the LICENSE file in the root directory of this source tree.
|
|
279
279
|
*/
|
|
280
|
-
const
|
|
280
|
+
const we = oe("SearchIcon", [
|
|
281
281
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
282
282
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
|
283
283
|
]);
|
|
@@ -287,7 +287,7 @@ const ye = le("SearchIcon", [
|
|
|
287
287
|
* This source code is licensed under the ISC license.
|
|
288
288
|
* See the LICENSE file in the root directory of this source tree.
|
|
289
289
|
*/
|
|
290
|
-
const
|
|
290
|
+
const et = oe("SunIcon", [
|
|
291
291
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
292
292
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
293
293
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -297,44 +297,44 @@ const Qe = le("SunIcon", [
|
|
|
297
297
|
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
298
298
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
299
299
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
300
|
-
]),
|
|
301
|
-
const e =
|
|
302
|
-
return
|
|
300
|
+
]), tt = (i, c) => {
|
|
301
|
+
const e = x(null);
|
|
302
|
+
return Q(() => {
|
|
303
303
|
if (typeof window < "u") {
|
|
304
304
|
const t = window.localStorage.getItem(i);
|
|
305
|
-
e.value = t ? JSON.parse(t) :
|
|
305
|
+
e.value = t ? JSON.parse(t) : c;
|
|
306
306
|
}
|
|
307
|
-
}),
|
|
307
|
+
}), H(e, (t) => {
|
|
308
308
|
typeof window < "u" && window.localStorage.setItem(i, JSON.stringify(t));
|
|
309
309
|
}), e;
|
|
310
|
-
},
|
|
310
|
+
}, lt = { class: "swap-rotate swap" }, nt = ["true-value", "false-value"], gn = /* @__PURE__ */ L({
|
|
311
311
|
__name: "theme-controller",
|
|
312
312
|
props: {
|
|
313
313
|
lightTheme: { default: "light" },
|
|
314
314
|
darkTheme: { default: "dark" }
|
|
315
315
|
},
|
|
316
316
|
setup(i) {
|
|
317
|
-
const
|
|
318
|
-
function t(
|
|
319
|
-
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme",
|
|
317
|
+
const c = i, e = tt("theme", c.lightTheme);
|
|
318
|
+
function t(s) {
|
|
319
|
+
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", s);
|
|
320
320
|
}
|
|
321
|
-
return
|
|
322
|
-
t(
|
|
323
|
-
}), (
|
|
324
|
-
|
|
321
|
+
return Q(() => t(e.value ? e.value : "")), H(e, (s) => {
|
|
322
|
+
t(s);
|
|
323
|
+
}), (s, l) => (n(), a("label", lt, [
|
|
324
|
+
q(o("input", {
|
|
325
325
|
type: "checkbox",
|
|
326
326
|
class: "theme-controller",
|
|
327
|
-
"onUpdate:modelValue":
|
|
328
|
-
"true-value":
|
|
329
|
-
"false-value":
|
|
330
|
-
}, null, 8,
|
|
331
|
-
[
|
|
327
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => ze(e) ? e.value = r : null),
|
|
328
|
+
"true-value": c.lightTheme,
|
|
329
|
+
"false-value": c.darkTheme
|
|
330
|
+
}, null, 8, nt), [
|
|
331
|
+
[Ae, F(e)]
|
|
332
332
|
]),
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
ae(F(et), { class: "swap-off fill-current" }),
|
|
334
|
+
ae(F(Qe), { class: "swap-on fill-current" })
|
|
335
335
|
]));
|
|
336
336
|
}
|
|
337
|
-
}), at = ["name"],
|
|
337
|
+
}), at = ["name"], ot = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, st = { class: "collapse-content" }, rt = ["innerHTML"], hn = /* @__PURE__ */ L({
|
|
338
338
|
__name: "accordion",
|
|
339
339
|
props: {
|
|
340
340
|
name: {},
|
|
@@ -343,25 +343,25 @@ const Qe = le("SunIcon", [
|
|
|
343
343
|
icon: {}
|
|
344
344
|
},
|
|
345
345
|
setup(i) {
|
|
346
|
-
const
|
|
347
|
-
return (e, t) => (
|
|
348
|
-
class:
|
|
349
|
-
key:
|
|
346
|
+
const c = i;
|
|
347
|
+
return (e, t) => (n(!0), a(B, null, A(c.items, (s, l) => (n(), a("div", {
|
|
348
|
+
class: V(["collapse border border-base-300", [e.icon ? `collapse-${e.icon}` : "", { "join-item": e.joinItems }]]),
|
|
349
|
+
key: l
|
|
350
350
|
}, [
|
|
351
|
-
|
|
351
|
+
o("input", {
|
|
352
352
|
type: "radio",
|
|
353
353
|
name: e.name,
|
|
354
354
|
value: "true"
|
|
355
355
|
}, null, 8, at),
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
innerHTML:
|
|
360
|
-
}, null, 8,
|
|
356
|
+
o("div", ot, C(s.title), 1),
|
|
357
|
+
o("div", st, [
|
|
358
|
+
o("span", {
|
|
359
|
+
innerHTML: s.content
|
|
360
|
+
}, null, 8, rt)
|
|
361
361
|
])
|
|
362
362
|
], 2))), 128));
|
|
363
363
|
}
|
|
364
|
-
}),
|
|
364
|
+
}), it = ["src"], ut = { class: "text-xl" }, bn = /* @__PURE__ */ L({
|
|
365
365
|
__name: "avatar",
|
|
366
366
|
props: {
|
|
367
367
|
image: {},
|
|
@@ -370,32 +370,32 @@ const Qe = le("SunIcon", [
|
|
|
370
370
|
fullyRounded: { type: Boolean, default: !1 }
|
|
371
371
|
},
|
|
372
372
|
setup(i) {
|
|
373
|
-
const
|
|
374
|
-
return
|
|
375
|
-
() =>
|
|
373
|
+
const c = i, e = x(c.onlineStatus);
|
|
374
|
+
return H(
|
|
375
|
+
() => c.onlineStatus,
|
|
376
376
|
(t) => {
|
|
377
377
|
t && (e.value = t);
|
|
378
378
|
}
|
|
379
|
-
), (t,
|
|
380
|
-
class:
|
|
379
|
+
), (t, s) => (n(), a("div", {
|
|
380
|
+
class: V(["avatar", [{ "avatar-online": e.value === "online" }, { "avatar-offline": e.value === "offline" }]])
|
|
381
381
|
}, [
|
|
382
|
-
t.image ? (
|
|
382
|
+
t.image ? (n(), a("div", {
|
|
383
383
|
key: 0,
|
|
384
|
-
class:
|
|
384
|
+
class: V(["rounded", [{ "rounded-full": t.fullyRounded }, { rounded: !t.fullyRounded }]])
|
|
385
385
|
}, [
|
|
386
|
-
|
|
386
|
+
o("img", {
|
|
387
387
|
src: t.image,
|
|
388
388
|
class: "w-full h-full"
|
|
389
|
-
}, null, 8,
|
|
390
|
-
], 2)) : (
|
|
389
|
+
}, null, 8, it)
|
|
390
|
+
], 2)) : (n(), a("div", {
|
|
391
391
|
key: 1,
|
|
392
|
-
class:
|
|
392
|
+
class: V(["flex justify-center bg-neutral p-[25%] rounded w-16 text-neutral-content text-center", [{ "rounded-full": t.fullyRounded }, { rounded: !t.fullyRounded }]])
|
|
393
393
|
}, [
|
|
394
|
-
|
|
394
|
+
o("p", ut, C(t.initials), 1)
|
|
395
395
|
], 2))
|
|
396
396
|
], 2));
|
|
397
397
|
}
|
|
398
|
-
}),
|
|
398
|
+
}), yn = /* @__PURE__ */ L({
|
|
399
399
|
__name: "badge",
|
|
400
400
|
props: {
|
|
401
401
|
color: { default: "neutral" },
|
|
@@ -403,7 +403,7 @@ const Qe = le("SunIcon", [
|
|
|
403
403
|
size: { default: "medium" }
|
|
404
404
|
},
|
|
405
405
|
setup(i) {
|
|
406
|
-
const
|
|
406
|
+
const c = i, e = {
|
|
407
407
|
"extra small": "badge-xs",
|
|
408
408
|
small: "badge-sm",
|
|
409
409
|
medium: "badge-md",
|
|
@@ -419,25 +419,25 @@ const Qe = le("SunIcon", [
|
|
|
419
419
|
warning: "badge-warning",
|
|
420
420
|
error: "badge-error"
|
|
421
421
|
};
|
|
422
|
-
return (
|
|
423
|
-
class:
|
|
422
|
+
return (s, l) => (n(), a("span", {
|
|
423
|
+
class: V(["badge", e[c.size], t[c.color], { "badge-outline": c.outline }])
|
|
424
424
|
}, [
|
|
425
|
-
|
|
425
|
+
T(s.$slots, "default")
|
|
426
426
|
], 2));
|
|
427
427
|
}
|
|
428
|
-
}),
|
|
428
|
+
}), dt = ["src", "alt"], ct = {
|
|
429
429
|
key: 0,
|
|
430
430
|
class: "card-body"
|
|
431
|
-
},
|
|
431
|
+
}, pt = {
|
|
432
432
|
key: 0,
|
|
433
433
|
class: "group-hover:text-primary text-lg text-left cursor-pointer card-title"
|
|
434
|
-
},
|
|
434
|
+
}, vt = {
|
|
435
435
|
key: 1,
|
|
436
436
|
class: "text-left"
|
|
437
|
-
},
|
|
437
|
+
}, ft = { class: "flex-col flex-nowrap mt-auto card-actions" }, mt = {
|
|
438
438
|
key: 1,
|
|
439
439
|
class: "card-body"
|
|
440
|
-
},
|
|
440
|
+
}, wn = /* @__PURE__ */ L({
|
|
441
441
|
__name: "card",
|
|
442
442
|
props: {
|
|
443
443
|
imgUrl: { default: "" },
|
|
@@ -452,56 +452,56 @@ const Qe = le("SunIcon", [
|
|
|
452
452
|
imgHeight: { default: "h-44" }
|
|
453
453
|
},
|
|
454
454
|
setup(i) {
|
|
455
|
-
const
|
|
456
|
-
return
|
|
457
|
-
() =>
|
|
455
|
+
const c = i, e = x(c.outlined);
|
|
456
|
+
return H(
|
|
457
|
+
() => c.outlined,
|
|
458
458
|
(t) => {
|
|
459
459
|
e.value = t;
|
|
460
460
|
}
|
|
461
|
-
), (t,
|
|
462
|
-
class:
|
|
461
|
+
), (t, s) => (n(), a("div", {
|
|
462
|
+
class: V(["group bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact", [{ "border-4 border-primary": e.value }, t.color ?? "", t.background]])
|
|
463
463
|
}, [
|
|
464
|
-
|
|
465
|
-
t.imgUrl || t.imgUrl && !t.loading ? (
|
|
464
|
+
o("figure", null, [
|
|
465
|
+
t.imgUrl || t.imgUrl && !t.loading ? (n(), a("img", {
|
|
466
466
|
key: 0,
|
|
467
467
|
src: t.imgUrl,
|
|
468
468
|
alt: t.alt,
|
|
469
|
-
class:
|
|
469
|
+
class: V(["rounded-sm w-full object-cover", [
|
|
470
470
|
{
|
|
471
471
|
hidden: t.loading
|
|
472
472
|
},
|
|
473
473
|
t.imgHeight
|
|
474
474
|
]])
|
|
475
|
-
}, null, 10,
|
|
476
|
-
t.loading && t.imgUrl ? (
|
|
475
|
+
}, null, 10, dt)) : O("", !0),
|
|
476
|
+
t.loading && t.imgUrl ? (n(), a("div", {
|
|
477
477
|
key: 1,
|
|
478
|
-
class:
|
|
479
|
-
}, null, 2)) :
|
|
478
|
+
class: V(["w-full skeleton", t.imgHeight])
|
|
479
|
+
}, null, 2)) : O("", !0)
|
|
480
480
|
]),
|
|
481
|
-
t.loading ?
|
|
482
|
-
t.title ? (
|
|
483
|
-
|
|
484
|
-
t.description ? (
|
|
485
|
-
|
|
486
|
-
|
|
481
|
+
t.loading ? O("", !0) : (n(), a("div", ct, [
|
|
482
|
+
t.title ? (n(), a("h2", pt, C(t.title), 1)) : O("", !0),
|
|
483
|
+
T(t.$slots, "details"),
|
|
484
|
+
t.description ? (n(), a("p", vt, C(t.description), 1)) : O("", !0),
|
|
485
|
+
o("div", ft, [
|
|
486
|
+
T(t.$slots, "actions")
|
|
487
487
|
])
|
|
488
488
|
])),
|
|
489
|
-
t.loading ? (
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
489
|
+
t.loading ? (n(), a("div", mt, s[0] || (s[0] = [
|
|
490
|
+
o("div", { class: "flex flex-col gap-4 w-52" }, [
|
|
491
|
+
o("div", { class: "w-28 h-4 skeleton" }),
|
|
492
|
+
o("div", { class: "w-full h-4 skeleton" }),
|
|
493
|
+
o("div", { class: "w-full h-4 skeleton" })
|
|
494
494
|
], -1)
|
|
495
|
-
]))) :
|
|
495
|
+
]))) : O("", !0)
|
|
496
496
|
], 2));
|
|
497
497
|
}
|
|
498
|
-
}),
|
|
498
|
+
}), _e = Symbol("CarouselItemStyle"), gt = { class: "relative h-full" }, ht = {
|
|
499
499
|
key: 0,
|
|
500
500
|
class: "top-1/2 right-5 left-5 z-10 absolute flex justify-between -translate-y-1/2 transform"
|
|
501
|
-
},
|
|
501
|
+
}, bt = {
|
|
502
502
|
key: 1,
|
|
503
503
|
class: "bottom-5 z-10 absolute flex justify-center gap-2 py-2 w-full"
|
|
504
|
-
},
|
|
504
|
+
}, yt = ["onClick", "aria-label"], wt = /* @__PURE__ */ L({
|
|
505
505
|
__name: "carousel",
|
|
506
506
|
props: {
|
|
507
507
|
showIndicators: {
|
|
@@ -538,305 +538,473 @@ const Qe = le("SunIcon", [
|
|
|
538
538
|
validator: (i) => i >= 0
|
|
539
539
|
}
|
|
540
540
|
},
|
|
541
|
-
setup(i, { expose:
|
|
542
|
-
const e = i, t =
|
|
541
|
+
setup(i, { expose: c }) {
|
|
542
|
+
const e = i, t = x(e.initialSlide), s = x(null), l = x(!1), r = x(0), y = E(() => ({
|
|
543
543
|
width: `calc((100% - ${e.slidesPerView > 1 ? (e.slidesPerView - 1) * e.gap : 0}px) / ${e.slidesPerView})`
|
|
544
544
|
}));
|
|
545
|
-
Pe(
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
},
|
|
549
|
-
if (!
|
|
550
|
-
const
|
|
551
|
-
if (
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
const
|
|
555
|
-
if (Math.abs(
|
|
556
|
-
|
|
545
|
+
Pe(_e, y);
|
|
546
|
+
const p = () => {
|
|
547
|
+
s.value ? r.value = s.value.children.length : r.value = 0;
|
|
548
|
+
}, f = async (k) => {
|
|
549
|
+
if (!s.value || e.slidesPerView <= 0 || l.value || (p(), r.value === 0)) return;
|
|
550
|
+
const _ = (k % r.value + r.value) % r.value, M = s.value, z = e.sliderOrientation === "vertical" ? (M.offsetHeight - (e.slidesPerView - 1) * e.gap) / e.slidesPerView : (M.offsetWidth - (e.slidesPerView - 1) * e.gap) / e.slidesPerView;
|
|
551
|
+
if (z <= 0) return;
|
|
552
|
+
const N = z + e.gap, K = _ * N, W = e.sliderOrientation === "vertical" ? M.scrollHeight - M.offsetHeight : M.scrollWidth - M.offsetWidth, d = Math.max(0, Math.min(K, W + 0.5));
|
|
553
|
+
l.value = !0, M.style.scrollBehavior = "auto";
|
|
554
|
+
const w = e.sliderOrientation === "vertical" ? M.scrollTop : M.scrollLeft, S = d - w;
|
|
555
|
+
if (Math.abs(S) < 1) {
|
|
556
|
+
l.value = !1, t.value = _;
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
559
|
-
const
|
|
560
|
-
const
|
|
561
|
-
e.sliderOrientation === "vertical" ?
|
|
559
|
+
const h = performance.now(), g = (I) => {
|
|
560
|
+
const D = I - h, P = Math.min(1, D / e.slideDuration), Y = P < 0.5 ? 4 * P * P * P : 1 - Math.pow(-2 * P + 2, 3) / 2, J = w + S * Y;
|
|
561
|
+
e.sliderOrientation === "vertical" ? M.scrollTop = J : M.scrollLeft = J, P < 1 ? requestAnimationFrame(g) : (e.sliderOrientation === "vertical" ? M.scrollTop = d : M.scrollLeft = d, t.value = _, l.value = !1);
|
|
562
562
|
};
|
|
563
|
-
requestAnimationFrame(
|
|
564
|
-
},
|
|
565
|
-
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
},
|
|
569
|
-
|
|
570
|
-
},
|
|
571
|
-
if (!
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
const
|
|
575
|
-
e.sliderOrientation === "vertical" ?
|
|
563
|
+
requestAnimationFrame(g);
|
|
564
|
+
}, $ = () => {
|
|
565
|
+
f(t.value + 1);
|
|
566
|
+
}, U = () => {
|
|
567
|
+
f(t.value - 1);
|
|
568
|
+
}, R = (k) => {
|
|
569
|
+
f(k);
|
|
570
|
+
}, v = () => {
|
|
571
|
+
if (!s.value || e.slidesPerView <= 0 || (p(), r.value === 0)) return;
|
|
572
|
+
const k = s.value, _ = e.sliderOrientation === "vertical" ? k.offsetHeight : k.offsetWidth, M = e.slidesPerView > 1 ? (e.slidesPerView - 1) * e.gap : 0, z = (_ - M) / e.slidesPerView;
|
|
573
|
+
if (z <= 0) return;
|
|
574
|
+
const N = Math.max(0, r.value - e.slidesPerView), K = Math.min(Math.max(0, e.initialSlide), N), W = K * (z + e.gap), d = e.sliderOrientation === "vertical" ? k.scrollHeight - k.offsetHeight : k.scrollWidth - k.offsetWidth, w = Math.max(0, Math.min(W, d + 0.5));
|
|
575
|
+
e.sliderOrientation === "vertical" ? k.scrollTo({ top: w, behavior: "auto" }) : k.scrollTo({ left: w, behavior: "auto" }), t.value = K;
|
|
576
576
|
};
|
|
577
|
-
return
|
|
577
|
+
return Q(() => {
|
|
578
578
|
requestAnimationFrame(() => {
|
|
579
|
-
requestAnimationFrame(
|
|
580
|
-
}),
|
|
581
|
-
}),
|
|
582
|
-
requestAnimationFrame(() =>
|
|
583
|
-
}),
|
|
579
|
+
requestAnimationFrame(v);
|
|
580
|
+
}), p();
|
|
581
|
+
}), H(() => e.initialSlide, (k) => {
|
|
582
|
+
requestAnimationFrame(() => f(k));
|
|
583
|
+
}), H(() => [e.slidesPerView, e.gap], () => {
|
|
584
584
|
requestAnimationFrame(() => {
|
|
585
585
|
requestAnimationFrame(() => {
|
|
586
|
-
if (
|
|
587
|
-
const
|
|
588
|
-
e.slideDuration = 0,
|
|
586
|
+
if (p(), r.value === 0) return;
|
|
587
|
+
const k = Math.max(0, r.value - e.slidesPerView), _ = Math.min(t.value, k), M = e.slideDuration;
|
|
588
|
+
e.slideDuration = 0, f(_), e.slideDuration = M;
|
|
589
589
|
});
|
|
590
590
|
});
|
|
591
|
-
}),
|
|
592
|
-
|
|
591
|
+
}), c({ scrollToSlide: f }), (k, _) => (n(), a("div", gt, [
|
|
592
|
+
o("div", {
|
|
593
593
|
ref_key: "carouselContainer",
|
|
594
|
-
ref:
|
|
595
|
-
class:
|
|
596
|
-
style:
|
|
594
|
+
ref: s,
|
|
595
|
+
class: V(["rounded w-full h-full overflow-x-scroll scroll-smooth carousel", [{ "carousel-horizontal md:snap-none": i.sliderOrientation == "horizontal" }, { "carousel-vertical": i.sliderOrientation == "vertical" }]]),
|
|
596
|
+
style: de({ gap: `${i.gap}px` })
|
|
597
597
|
}, [
|
|
598
|
-
|
|
598
|
+
T(k.$slots, "default", {}, void 0, !0)
|
|
599
599
|
], 6),
|
|
600
|
-
i.showNavigationButtons ? (
|
|
601
|
-
|
|
602
|
-
onClick:
|
|
600
|
+
i.showNavigationButtons ? (n(), a("div", ht, [
|
|
601
|
+
o("div", {
|
|
602
|
+
onClick: U,
|
|
603
603
|
role: "button",
|
|
604
604
|
"aria-label": "Previous Slide"
|
|
605
605
|
}, [
|
|
606
|
-
|
|
607
|
-
|
|
606
|
+
T(k.$slots, "prevButton", {}, () => [
|
|
607
|
+
_[0] || (_[0] = o("button", {
|
|
608
608
|
class: "btn btn-circle",
|
|
609
609
|
tabindex: "-1"
|
|
610
610
|
}, "❮", -1))
|
|
611
611
|
], !0)
|
|
612
612
|
]),
|
|
613
|
-
|
|
614
|
-
onClick:
|
|
613
|
+
o("div", {
|
|
614
|
+
onClick: $,
|
|
615
615
|
role: "button",
|
|
616
616
|
"aria-label": "Next Slide"
|
|
617
617
|
}, [
|
|
618
|
-
|
|
619
|
-
|
|
618
|
+
T(k.$slots, "nextButton", {}, () => [
|
|
619
|
+
_[1] || (_[1] = o("button", {
|
|
620
620
|
class: "btn btn-circle",
|
|
621
621
|
tabindex: "-1"
|
|
622
622
|
}, "❯", -1))
|
|
623
623
|
], !0)
|
|
624
624
|
])
|
|
625
|
-
])) :
|
|
626
|
-
i.showIndicators ? (
|
|
627
|
-
(
|
|
628
|
-
key: `dot-${
|
|
629
|
-
onClick: (
|
|
630
|
-
class:
|
|
631
|
-
"aria-label": `Go to slide ${
|
|
632
|
-
}, null, 10,
|
|
633
|
-
])) :
|
|
625
|
+
])) : O("", !0),
|
|
626
|
+
i.showIndicators ? (n(), a("div", bt, [
|
|
627
|
+
(n(!0), a(B, null, A(r.value, (M, z) => (n(), a("button", {
|
|
628
|
+
key: `dot-${z}`,
|
|
629
|
+
onClick: (N) => R(z),
|
|
630
|
+
class: V(["btn btn-circle btn-xs", { "btn-active": z === t.value }]),
|
|
631
|
+
"aria-label": `Go to slide ${z + 1}`
|
|
632
|
+
}, null, 10, yt))), 128))
|
|
633
|
+
])) : O("", !0)
|
|
634
634
|
]));
|
|
635
635
|
}
|
|
636
|
-
}),
|
|
636
|
+
}), te = (i, c) => {
|
|
637
637
|
const e = i.__vccOpts || i;
|
|
638
|
-
for (const [t,
|
|
639
|
-
e[t] =
|
|
638
|
+
for (const [t, s] of c)
|
|
639
|
+
e[t] = s;
|
|
640
640
|
return e;
|
|
641
|
-
},
|
|
641
|
+
}, kn = /* @__PURE__ */ te(wt, [["__scopeId", "data-v-db55a6a5"]]), kt = /* @__PURE__ */ L({
|
|
642
642
|
__name: "carouselItem",
|
|
643
643
|
setup(i) {
|
|
644
|
-
const
|
|
645
|
-
return (e, t) => (
|
|
644
|
+
const c = Ee(_e, x({}));
|
|
645
|
+
return (e, t) => (n(), a("div", {
|
|
646
646
|
class: "w-full h-full carousel-item",
|
|
647
|
-
style:
|
|
647
|
+
style: de(F(c))
|
|
648
648
|
}, [
|
|
649
|
-
|
|
649
|
+
T(e.$slots, "default", {}, void 0, !0)
|
|
650
650
|
], 4));
|
|
651
651
|
}
|
|
652
|
-
}),
|
|
653
|
-
|
|
654
|
-
class: "
|
|
655
|
-
},
|
|
652
|
+
}), $n = /* @__PURE__ */ te(kt, [["__scopeId", "data-v-507384bc"]]), $t = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, _t = ["onClick"], St = {
|
|
653
|
+
key: 0,
|
|
654
|
+
class: "inline-component-wrapper flex flex-grow justify-center items-center w-full h-full"
|
|
655
|
+
}, xt = {
|
|
656
|
+
key: 1,
|
|
657
|
+
class: "flex flex-col"
|
|
658
|
+
}, Ct = { class: "text-sm" }, Dt = {
|
|
659
|
+
key: 0,
|
|
660
|
+
class: "opacity-75 overflow-hidden text-xs truncate ..."
|
|
661
|
+
}, Mt = {
|
|
662
|
+
key: 1,
|
|
663
|
+
class: "hidden md:block opacity-35 overflow-hidden text-xs truncate ..."
|
|
664
|
+
}, It = { class: "hidden" }, Tt = ["id"], Vt = { class: "modal-box" }, Bt = { class: "font-bold text-lg" }, Ot = ["name", "checked"], zt = { class: "collapse-title flex justify-between items-center pr-4 w-full font-medium text-xl" }, At = {
|
|
665
|
+
key: 0,
|
|
666
|
+
class: "opacity-75 overflow-hidden text-sm truncate ..."
|
|
667
|
+
}, Pt = {
|
|
668
|
+
key: 1,
|
|
669
|
+
class: "opacity-35 text-sm"
|
|
670
|
+
}, Et = { class: "collapse-content flex place-content-center p-0" }, Lt = /* @__PURE__ */ L({
|
|
656
671
|
__name: "advancedSearch",
|
|
657
672
|
props: {
|
|
658
673
|
searchOptions: {},
|
|
659
|
-
currentCategory: {}
|
|
674
|
+
currentCategory: {},
|
|
675
|
+
id: {},
|
|
676
|
+
value: {}
|
|
660
677
|
},
|
|
661
678
|
emits: ["search", "update:search-data"],
|
|
662
|
-
setup(i, { emit:
|
|
663
|
-
const e = i, t =
|
|
664
|
-
datetime:
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
679
|
+
setup(i, { emit: c }) {
|
|
680
|
+
const e = i, t = c, s = e.id ?? `advancedSearch-${Le()}`, l = x(null), r = x(null), y = {
|
|
681
|
+
datetime: ce(() => Promise.resolve().then(() => ul)),
|
|
682
|
+
"standard-select": ce(() => import("./select-Cz4vf_YE.js")),
|
|
683
|
+
// Add other components here when you create them:
|
|
684
|
+
// 'custom-range': defineAsyncComponent(() => import('./CustomRange.vue')),
|
|
685
|
+
// 'custom-number': defineAsyncComponent(() => import('./CustomNumber.vue')),
|
|
686
|
+
"custom-text": ce(() => import("./inputField-BxT95oyM.js"))
|
|
687
|
+
// 'custom-select': defineAsyncComponent(() => import('./CustomSelect.vue')),
|
|
688
|
+
}, p = x({}), f = x({
|
|
689
|
+
left: "0px",
|
|
690
|
+
top: "0px",
|
|
691
|
+
transform: "translateX(0%)"
|
|
692
|
+
}), $ = x(null), U = (d) => {
|
|
693
|
+
var w;
|
|
694
|
+
if (d.value === void 0 || d.value === null || d.value === "")
|
|
695
|
+
return "";
|
|
696
|
+
switch (d.type) {
|
|
697
|
+
case "datetime":
|
|
698
|
+
if (typeof d.value == "string")
|
|
699
|
+
try {
|
|
700
|
+
const S = new Date(d.value);
|
|
701
|
+
if (!isNaN(S.getTime()))
|
|
702
|
+
return S.toLocaleString();
|
|
703
|
+
} catch {
|
|
704
|
+
}
|
|
705
|
+
else if (d.range && typeof d.value == "object" && d.value !== null && "start" in d.value && "end" in d.value)
|
|
706
|
+
try {
|
|
707
|
+
const S = new Date(d.value.start), h = new Date(d.value.end);
|
|
708
|
+
if (!isNaN(S.getTime()) && !isNaN(h.getTime()))
|
|
709
|
+
return `${S.toLocaleDateString()} - ${h.toLocaleDateString()}`;
|
|
710
|
+
} catch {
|
|
711
|
+
}
|
|
712
|
+
break;
|
|
713
|
+
case "custom-range":
|
|
714
|
+
if (typeof d.value == "object" && d.value !== null && "start" in d.value && "end" in d.value)
|
|
715
|
+
return `${d.value.start} - ${d.value.end}`;
|
|
716
|
+
break;
|
|
717
|
+
case "custom-number":
|
|
718
|
+
if (typeof d.value == "number")
|
|
719
|
+
return d.value.toString();
|
|
720
|
+
break;
|
|
721
|
+
case "standard-select":
|
|
722
|
+
case "custom-select":
|
|
723
|
+
if ((w = d.props) != null && w.options && Array.isArray(d.props.options)) {
|
|
724
|
+
const S = d.props.options.find(
|
|
725
|
+
(h) => h.value === d.value
|
|
726
|
+
);
|
|
727
|
+
if (S)
|
|
728
|
+
return S.text;
|
|
729
|
+
}
|
|
730
|
+
return String(d.value);
|
|
731
|
+
case "custom-text":
|
|
732
|
+
if (typeof d.value == "string")
|
|
733
|
+
return d.value;
|
|
734
|
+
break;
|
|
674
735
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
736
|
+
return String(d.value);
|
|
737
|
+
};
|
|
738
|
+
function R(d) {
|
|
739
|
+
var g, I;
|
|
740
|
+
const w = (g = l.value) == null ? void 0 : g.name;
|
|
741
|
+
if (!w) {
|
|
742
|
+
console.warn("componentValueUpdated called but no active tab.");
|
|
743
|
+
return;
|
|
681
744
|
}
|
|
745
|
+
const S = (I = e.searchOptions.find(
|
|
746
|
+
(D) => (D == null ? void 0 : D.category) === e.currentCategory
|
|
747
|
+
)) == null ? void 0 : I.tabs, h = S == null ? void 0 : S.find(
|
|
748
|
+
(D) => D.name === w
|
|
749
|
+
);
|
|
750
|
+
h ? (h.value = d, t("update:search-data", {
|
|
751
|
+
tab: h.name,
|
|
752
|
+
data: d
|
|
753
|
+
})) : console.error(
|
|
754
|
+
`Tab with name "${w}" not found in current category.`
|
|
755
|
+
);
|
|
682
756
|
}
|
|
683
|
-
function
|
|
757
|
+
function v(d) {
|
|
758
|
+
R(d);
|
|
759
|
+
}
|
|
760
|
+
function k() {
|
|
684
761
|
t("search");
|
|
685
762
|
}
|
|
686
|
-
async function
|
|
687
|
-
|
|
763
|
+
async function _(d) {
|
|
764
|
+
var h;
|
|
765
|
+
const w = document.getElementById(`advancedSearchMobile-${s}`), S = w && w.contains(d.target);
|
|
766
|
+
((h = l.value) == null ? void 0 : h.displayMode) === "popup" && $.value && !$.value.contains(d.target) && !S && (await pe(), l.value = null);
|
|
688
767
|
}
|
|
689
|
-
async function
|
|
768
|
+
async function M() {
|
|
690
769
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
691
|
-
const
|
|
692
|
-
|
|
770
|
+
const d = document.getElementById(
|
|
771
|
+
`advancedSearchMobile-${s}`
|
|
772
|
+
);
|
|
773
|
+
d ? (l.value = null, d.showModal()) : console.warn(
|
|
774
|
+
`Mobile modal element not found. Ensure it exists with id="advancedSearchMobile-${s}".`
|
|
775
|
+
);
|
|
693
776
|
}
|
|
694
777
|
}
|
|
695
|
-
async function
|
|
696
|
-
var
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
778
|
+
async function z(d) {
|
|
779
|
+
var S, h, g;
|
|
780
|
+
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
781
|
+
M();
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
const w = d.displayMode ?? "popup";
|
|
785
|
+
if (((S = l.value) == null ? void 0 : S.name) === d.name && ((h = l.value) == null ? void 0 : h.displayMode) === w)
|
|
786
|
+
l.value = null;
|
|
787
|
+
else if (l.value = { ...d, displayMode: w }, await pe(), ((g = l.value) == null ? void 0 : g.displayMode) === "popup") {
|
|
788
|
+
const I = p.value[d.name];
|
|
789
|
+
if (I && $.value) {
|
|
790
|
+
const D = I.getBoundingClientRect(), P = $.value.getBoundingClientRect(), Y = D.bottom - P.top, J = D.left + D.width / 2 - P.left;
|
|
791
|
+
f.value = {
|
|
792
|
+
left: `${J}px`,
|
|
793
|
+
top: `${Y + 8}px`,
|
|
794
|
+
// Add a small gap
|
|
795
|
+
transform: "translateX(-50%)"
|
|
796
|
+
// Center horizontally
|
|
797
|
+
};
|
|
798
|
+
} else
|
|
799
|
+
console.error(
|
|
800
|
+
"Tab element or search container not found for positioning:",
|
|
801
|
+
d.name
|
|
802
|
+
);
|
|
803
|
+
}
|
|
713
804
|
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
805
|
+
const N = (d) => {
|
|
806
|
+
const w = d.relatedTarget;
|
|
807
|
+
setTimeout(() => {
|
|
808
|
+
var S;
|
|
809
|
+
((S = l.value) == null ? void 0 : S.displayMode) === "inline" && $.value && (!w || !$.value.contains(w)) ? (console.log("Blur detected outside container, closing inline view."), l.value = null) : console.log(
|
|
810
|
+
"Blur detected, but staying within container or not an inline tab."
|
|
811
|
+
);
|
|
812
|
+
}, 50);
|
|
813
|
+
}, K = () => {
|
|
814
|
+
console.log("Enter key pressed on inline component, closing inline view."), l.value = null;
|
|
815
|
+
};
|
|
816
|
+
H(r, (d) => {
|
|
817
|
+
var w;
|
|
818
|
+
console.log(
|
|
819
|
+
"advanced-search: inlineComponentRef changed. New Value:",
|
|
820
|
+
d
|
|
821
|
+
), console.log("advanced-search: activeTab.value:", l.value), d && ((w = l.value) == null ? void 0 : w.displayMode) === "inline" ? (console.log(
|
|
822
|
+
"advanced-search: Inline component ref is available and active tab is inline. Attempting to focus child input..."
|
|
823
|
+
), pe(() => {
|
|
824
|
+
console.log(
|
|
825
|
+
"advanced-search: Inside nextTick. Attempting to call child's focus method..."
|
|
826
|
+
), console.log("advanced-search: Type of newValue:", typeof d), console.log(
|
|
827
|
+
"advanced-search: Does newValue have focusInput?",
|
|
828
|
+
typeof d.focusInput == "function"
|
|
829
|
+
), d && typeof d.focusInput == "function" ? (console.log(
|
|
830
|
+
"advanced-search: Calling exposed focusInput() method on child instance."
|
|
831
|
+
), d.focusInput()) : console.warn(
|
|
832
|
+
'advanced-search: Child inline component instance does not expose a "focusInput" method or is not ready.',
|
|
833
|
+
d
|
|
834
|
+
);
|
|
835
|
+
})) : console.log(
|
|
836
|
+
d ? "advanced-search: inlineComponentRef available, but active tab is not inline." : "advanced-search: inlineComponentRef is now null (component likely unmounted)."
|
|
837
|
+
);
|
|
838
|
+
}), Q(() => {
|
|
839
|
+
document.addEventListener("click", _), window.addEventListener("resize", W);
|
|
840
|
+
}), ge(() => {
|
|
841
|
+
document.removeEventListener("click", _), window.removeEventListener("resize", W);
|
|
842
|
+
});
|
|
843
|
+
const W = () => {
|
|
844
|
+
var d, w;
|
|
845
|
+
if (typeof window < "u") {
|
|
846
|
+
const S = window.innerWidth <= 768, h = l.value !== null && (l.value.displayMode === "popup" || l.value.displayMode === "inline") && window.innerWidth > 768;
|
|
847
|
+
!S && (((d = l.value) == null ? void 0 : d.displayMode) === "popup" || ((w = l.value) == null ? void 0 : w.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), l.value = null), S && !h && l.value !== null && (console.log(
|
|
848
|
+
"Resizing to desktop from potential mobile active state, closing active tab."
|
|
849
|
+
), l.value = null);
|
|
850
|
+
const g = document.getElementById(
|
|
851
|
+
`advancedSearchMobile-${s}`
|
|
852
|
+
);
|
|
853
|
+
g != null && g.open && !S && (console.log("Modal is open on desktop, closing modal and active tab."), g.close(), l.value = null);
|
|
854
|
+
}
|
|
855
|
+
};
|
|
856
|
+
return (d, w) => {
|
|
857
|
+
var S, h;
|
|
858
|
+
return n(), a(B, null, [
|
|
859
|
+
o("div", {
|
|
722
860
|
ref_key: "searchContainer",
|
|
723
|
-
ref:
|
|
861
|
+
ref: $,
|
|
724
862
|
class: "w-full"
|
|
725
863
|
}, [
|
|
726
|
-
|
|
727
|
-
class: "group/search relative flex place-items-center
|
|
728
|
-
onClick:
|
|
864
|
+
o("div", {
|
|
865
|
+
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",
|
|
866
|
+
onClick: M
|
|
729
867
|
}, [
|
|
730
|
-
|
|
731
|
-
(
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
868
|
+
o("div", $t, [
|
|
869
|
+
(n(!0), a(B, null, A(((S = e.searchOptions.find(
|
|
870
|
+
(g) => g.category === e.currentCategory
|
|
871
|
+
)) == null ? void 0 : S.tabs) || [], (g, I) => {
|
|
872
|
+
var D, P, Y, J, se;
|
|
873
|
+
return n(), a("button", {
|
|
874
|
+
key: `${g.name}-${I}`,
|
|
875
|
+
onClick: ee((G) => z(g), ["stop"]),
|
|
876
|
+
class: V([{
|
|
877
|
+
"tab-active": ((D = l.value) == null ? void 0 : D.name) === g.name,
|
|
878
|
+
"tab-active-inline": ((P = l.value) == null ? void 0 : P.name) === g.name && ((Y = l.value) == null ? void 0 : Y.displayMode) === "inline"
|
|
879
|
+
// Add new class
|
|
880
|
+
}, "group/searchitem after:top-0 after:-right-2 after:absolute relative first-of-type:flex-auto last-of-type:flex-auto after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-[1px] after:h-10 overflow-x-hidden text-start md:after:content-[''] after:content-none last-of-type:after:content-none"]),
|
|
737
881
|
ref_for: !0,
|
|
738
|
-
ref: (
|
|
882
|
+
ref: (G) => p.value[g.name] = G
|
|
739
883
|
}, [
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
884
|
+
((J = l.value) == null ? void 0 : J.name) === g.name && ((se = l.value) == null ? void 0 : se.displayMode) === "inline" ? (n(), a("div", St, [
|
|
885
|
+
(n(), ue(ve(y[l.value.type]), fe({ ref_for: !0 }, l.value.props || {}, {
|
|
886
|
+
modelValue: l.value.value,
|
|
887
|
+
onUpdated: w[0] || (w[0] = (G) => v(G)),
|
|
888
|
+
"onUpdate:modelValue": w[1] || (w[1] = (G) => v(G)),
|
|
889
|
+
onBlur: N,
|
|
890
|
+
onKeydown: he(ee(K, ["stop", "prevent"]), ["enter"]),
|
|
891
|
+
ref_for: !0,
|
|
892
|
+
ref_key: "inlineComponentRef",
|
|
893
|
+
ref: r
|
|
894
|
+
}), null, 16, ["modelValue", "onKeydown"]))
|
|
895
|
+
])) : (n(), a("div", xt, [
|
|
896
|
+
o("p", Ct, C(g.name), 1),
|
|
897
|
+
g.value !== void 0 && g.value !== null && g.value !== "" ? (n(), a("p", Dt, C(U(g)), 1)) : (n(), a("p", Mt, C(g.description), 1))
|
|
898
|
+
]))
|
|
899
|
+
], 10, _t);
|
|
743
900
|
}), 128))
|
|
744
901
|
]),
|
|
745
|
-
l.value ? (
|
|
902
|
+
l.value && l.value.displayMode === "popup" ? (n(), a("div", {
|
|
746
903
|
key: 0,
|
|
747
904
|
class: "absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",
|
|
748
|
-
style:
|
|
905
|
+
style: de(f.value)
|
|
749
906
|
}, [
|
|
750
|
-
(
|
|
751
|
-
|
|
752
|
-
|
|
907
|
+
(n(), ue(ve(y[l.value.type]), fe(l.value.props || {}, {
|
|
908
|
+
modelValue: l.value.value,
|
|
909
|
+
onUpdated: w[2] || (w[2] = (g) => R(g)),
|
|
910
|
+
"onUpdate:modelValue": w[3] || (w[3] = (g) => R(g))
|
|
911
|
+
}), null, 16, ["modelValue"]))
|
|
912
|
+
], 4)) : O("", !0),
|
|
913
|
+
o("button", {
|
|
753
914
|
title: "search",
|
|
754
915
|
type: "submit",
|
|
755
916
|
class: "ml-1 btn btn-primary btn-square",
|
|
756
|
-
onClick:
|
|
917
|
+
onClick: ee(k, ["stop"])
|
|
757
918
|
}, [
|
|
758
|
-
|
|
919
|
+
ae(F(we), {
|
|
759
920
|
size: 24,
|
|
760
921
|
color: "white"
|
|
761
922
|
})
|
|
762
923
|
])
|
|
763
924
|
]),
|
|
764
|
-
|
|
765
|
-
|
|
925
|
+
o("div", It, [
|
|
926
|
+
o("button", {
|
|
766
927
|
title: "search",
|
|
767
|
-
onClick:
|
|
928
|
+
onClick: w[4] || (w[4] = () => {
|
|
768
929
|
})
|
|
769
930
|
}, [
|
|
770
|
-
|
|
931
|
+
ae(F(we), {
|
|
771
932
|
size: 24,
|
|
772
933
|
color: "white"
|
|
773
934
|
})
|
|
774
935
|
])
|
|
775
936
|
])
|
|
776
937
|
], 512),
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
938
|
+
o("dialog", {
|
|
939
|
+
id: `advancedSearchMobile-${F(s)}`,
|
|
940
|
+
class: "modal"
|
|
941
|
+
}, [
|
|
942
|
+
o("div", Vt, [
|
|
943
|
+
T(d.$slots, "additionalForMobile", {}, () => [
|
|
944
|
+
o("h3", Bt, C(d.currentCategory), 1)
|
|
781
945
|
], !0),
|
|
782
|
-
(
|
|
783
|
-
|
|
784
|
-
|
|
946
|
+
(n(!0), a(B, null, A(((h = e.searchOptions.find(
|
|
947
|
+
(g) => g.category === e.currentCategory
|
|
948
|
+
)) == null ? void 0 : h.tabs) || [], (g, I) => (n(), a("div", {
|
|
949
|
+
class: "collapse bg-base-200 my-4",
|
|
950
|
+
key: g.name
|
|
785
951
|
}, [
|
|
786
|
-
|
|
952
|
+
o("input", {
|
|
787
953
|
type: "radio",
|
|
788
|
-
name:
|
|
789
|
-
checked:
|
|
790
|
-
}, null, 8,
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
n("
|
|
954
|
+
name: `accordion-${F(s)}`,
|
|
955
|
+
checked: I === 0
|
|
956
|
+
}, null, 8, Ot),
|
|
957
|
+
o("div", zt, [
|
|
958
|
+
o("div", null, C(g.name), 1),
|
|
959
|
+
g.value !== void 0 && g.value !== null && g.value !== "" ? (n(), a("div", At, C(U(g)), 1)) : (n(), a("div", Pt, C(g.description), 1))
|
|
794
960
|
]),
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
(
|
|
798
|
-
|
|
799
|
-
|
|
961
|
+
o("div", Et, [
|
|
962
|
+
w[7] || (w[7] = o("br", null, null, -1)),
|
|
963
|
+
(n(), ue(ve(y[g.type]), fe({ ref_for: !0 }, g.props || {}, {
|
|
964
|
+
modelValue: g.value,
|
|
965
|
+
onUpdated: w[5] || (w[5] = (D) => R(D)),
|
|
966
|
+
"onUpdate:modelValue": w[6] || (w[6] = (D) => R(D))
|
|
967
|
+
}), null, 16, ["modelValue"]))
|
|
800
968
|
])
|
|
801
969
|
]))), 128)),
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
970
|
+
o("div", { class: "modal-action" }, [
|
|
971
|
+
o("form", { method: "dialog" }, [
|
|
972
|
+
o("button", {
|
|
805
973
|
class: "btn btn-primary",
|
|
806
|
-
onClick:
|
|
807
|
-
}, "Close and Search")
|
|
974
|
+
onClick: k
|
|
975
|
+
}, " Close and Search ")
|
|
808
976
|
])
|
|
809
977
|
])
|
|
810
978
|
])
|
|
811
|
-
])
|
|
979
|
+
], 8, Tt)
|
|
812
980
|
], 64);
|
|
813
981
|
};
|
|
814
982
|
}
|
|
815
|
-
}),
|
|
983
|
+
}), _n = /* @__PURE__ */ te(Lt, [["__scopeId", "data-v-2a095d4c"]]), Ut = ["placeholder", "value", "id"], Rt = { class: "btn btn-ghost" }, Nt = ["id"], jt = {
|
|
816
984
|
key: 0,
|
|
817
985
|
class: "flex justify-between items-center place-content-center mb-4"
|
|
818
|
-
},
|
|
986
|
+
}, Ft = ["value"], qt = ["value"], Ht = {
|
|
819
987
|
key: 1,
|
|
820
988
|
class: "gap-2 grid grid-cols-7"
|
|
821
|
-
},
|
|
989
|
+
}, Wt = ["onClick"], Kt = {
|
|
822
990
|
key: 2,
|
|
823
991
|
class: "mt-4 lg:w-80"
|
|
824
|
-
},
|
|
992
|
+
}, Yt = {
|
|
825
993
|
key: 0,
|
|
826
994
|
class: "mb-2 font-bold text-lg"
|
|
827
|
-
},
|
|
995
|
+
}, Jt = { key: 1 }, Gt = {
|
|
828
996
|
key: 1,
|
|
829
997
|
class: "flex gap-4"
|
|
830
|
-
},
|
|
998
|
+
}, Xt = ["value"], Zt = ["value"], Qt = {
|
|
831
999
|
key: 2,
|
|
832
1000
|
class: "flex flex-col gap-4"
|
|
833
|
-
},
|
|
1001
|
+
}, el = {
|
|
834
1002
|
key: 1,
|
|
835
1003
|
class: "flex gap-2"
|
|
836
|
-
},
|
|
1004
|
+
}, tl = ["value"], ll = ["value"], nl = {
|
|
837
1005
|
key: 1,
|
|
838
1006
|
class: "flex gap-2"
|
|
839
|
-
},
|
|
1007
|
+
}, al = ["value"], ol = ["value"], sl = { class: "flex gap-2 mt-4" }, rl = {
|
|
840
1008
|
__name: "datetimePicker",
|
|
841
1009
|
props: {
|
|
842
1010
|
mode: {
|
|
@@ -867,132 +1035,163 @@ const Qe = le("SunIcon", [
|
|
|
867
1035
|
}
|
|
868
1036
|
},
|
|
869
1037
|
emits: ["updated"],
|
|
870
|
-
setup(i, { emit:
|
|
1038
|
+
setup(i, { emit: c }) {
|
|
871
1039
|
const e = i;
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
1040
|
+
H(
|
|
1041
|
+
() => e.range,
|
|
1042
|
+
(m) => {
|
|
1043
|
+
m ? (l.value = { start: null, end: null }, r.value = { start: null, end: null }) : (l.value = null, r.value = null);
|
|
1044
|
+
}
|
|
1045
|
+
);
|
|
1046
|
+
const t = c, s = x(!1), l = x(e.range ? { start: null, end: null } : null), r = x(e.range ? { start: null, end: null } : null), y = x(
|
|
1047
|
+
(/* @__PURE__ */ new Date()).toLocaleString("default", { month: "long" })
|
|
1048
|
+
), p = x((/* @__PURE__ */ new Date()).getFullYear()), f = x(e.range ? { start: 0, end: 0 } : 0), $ = x(e.range ? { start: 0, end: 0 } : 0), U = x(null), R = E(() => `${e.id}-input`), v = E(() => `${e.id}-popup`), k = E(
|
|
1049
|
+
() => e.mode === "date" || e.mode === "datetime"
|
|
1050
|
+
), _ = E(
|
|
1051
|
+
() => e.mode === "time" || e.mode === "datetime"
|
|
1052
|
+
);
|
|
1053
|
+
E(
|
|
1054
|
+
() => new Date(p.value, M.value)
|
|
1055
|
+
);
|
|
1056
|
+
const M = E(() => h.indexOf(y.value)), z = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], N = E(
|
|
1057
|
+
() => new Date(p.value, M.value).getDay()
|
|
1058
|
+
), K = E(() => {
|
|
1059
|
+
const m = new Date(p.value, M.value + 1, 0).getDate();
|
|
1060
|
+
return Array.from(
|
|
1061
|
+
{ length: m },
|
|
1062
|
+
(b, u) => new Date(p.value, M.value, u + 1)
|
|
1063
|
+
);
|
|
1064
|
+
}), W = E(
|
|
1065
|
+
() => Array.from({ length: N.value }, (m, b) => b)
|
|
1066
|
+
), d = Array.from({ length: 24 }, (m, b) => b), w = Array.from({ length: 60 }, (m, b) => b), S = E(
|
|
881
1067
|
() => typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
882
1068
|
navigator.userAgent
|
|
883
1069
|
)
|
|
884
|
-
),
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
1070
|
+
), h = [
|
|
1071
|
+
"January",
|
|
1072
|
+
"February",
|
|
1073
|
+
"March",
|
|
1074
|
+
"April",
|
|
1075
|
+
"May",
|
|
1076
|
+
"June",
|
|
1077
|
+
"July",
|
|
1078
|
+
"August",
|
|
1079
|
+
"September",
|
|
1080
|
+
"October",
|
|
1081
|
+
"November",
|
|
1082
|
+
"December"
|
|
1083
|
+
], g = E(() => {
|
|
1084
|
+
const m = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1085
|
+
return Array.from({ length: 100 }, (b, u) => m - 50 + u);
|
|
1086
|
+
}), I = E(() => {
|
|
1087
|
+
if (!k.value || !l.value) return "";
|
|
1088
|
+
if (e.range && l.value.start && l.value.end) {
|
|
1089
|
+
const m = l.value.start.toLocaleDateString("en-US"), b = l.value.end.toLocaleDateString("en-US");
|
|
1090
|
+
return `${m} - ${b}`;
|
|
892
1091
|
}
|
|
893
|
-
return !e.range &&
|
|
894
|
-
}),
|
|
895
|
-
if (!
|
|
896
|
-
const
|
|
897
|
-
var
|
|
898
|
-
const u = ((
|
|
899
|
-
return
|
|
1092
|
+
return !e.range && l.value ? l.value.toLocaleDateString("en-US") : "";
|
|
1093
|
+
}), D = (m) => m instanceof Date ? m : new Date(m), P = (m) => m instanceof Date && !isNaN(m), Y = E(() => {
|
|
1094
|
+
if (!_.value) return "";
|
|
1095
|
+
const m = (b) => {
|
|
1096
|
+
var re, le, ye;
|
|
1097
|
+
const u = ((re = f.value) == null ? void 0 : re[b]) ?? f.value, X = ((le = $.value) == null ? void 0 : le[b]) ?? $.value;
|
|
1098
|
+
return S.value ? ((ye = r.value) == null ? void 0 : ye[b]) ?? r.value : `${u.toString().padStart(2, "0")}:${X.toString().padStart(2, "0")}`;
|
|
900
1099
|
};
|
|
901
|
-
return e.range ? `${
|
|
902
|
-
}),
|
|
903
|
-
const
|
|
904
|
-
return `${
|
|
905
|
-
}),
|
|
906
|
-
j(),
|
|
907
|
-
},
|
|
908
|
-
|
|
909
|
-
},
|
|
910
|
-
e.range ?
|
|
911
|
-
},
|
|
912
|
-
|
|
913
|
-
const
|
|
914
|
-
return
|
|
915
|
-
}, Ie = (
|
|
916
|
-
if (
|
|
917
|
-
const
|
|
918
|
-
return
|
|
1100
|
+
return e.range ? `${m("start")} - ${m("end")}` : m();
|
|
1101
|
+
}), J = E(() => {
|
|
1102
|
+
const m = I.value, b = Y.value;
|
|
1103
|
+
return `${m} ${b}`.trim();
|
|
1104
|
+
}), se = () => s.value = !s.value, G = () => {
|
|
1105
|
+
j(), Se();
|
|
1106
|
+
}, Se = () => s.value = !1, xe = () => {
|
|
1107
|
+
l.value = e.range ? { start: null, end: null } : null, r.value = e.range ? { start: null, end: null } : null, j();
|
|
1108
|
+
}, Ce = (m) => {
|
|
1109
|
+
e.range ? l.value.start && l.value.end ? l.value = { start: m, end: null } : l.value.start ? l.value.end = m : l.value.start = m : l.value = m, j();
|
|
1110
|
+
}, De = (m) => (m = D(m), e.range ? l.value.start && P(l.value.start) && m.getTime() === l.value.start.getTime() || l.value.end && P(l.value.end) && m.getTime() === l.value.end.getTime() : P(l.value) && m.getTime() === l.value.getTime()), Me = (m) => {
|
|
1111
|
+
m = D(m);
|
|
1112
|
+
const b = /* @__PURE__ */ new Date();
|
|
1113
|
+
return m.getDate() === b.getDate() && m.getMonth() === b.getMonth() && m.getFullYear() === b.getFullYear();
|
|
1114
|
+
}, Ie = (m) => (m = D(m), e.range && P(l.value.start) && m.getTime() === l.value.start.getTime()), Te = (m) => (m = D(m), e.range && P(l.value.end) && m.getTime() === l.value.end.getTime()), Ve = (m) => {
|
|
1115
|
+
if (m = D(m), e.range && P(l.value.start) && P(l.value.end)) {
|
|
1116
|
+
const b = l.value.start.getTime(), u = l.value.end.getTime(), X = m.getTime();
|
|
1117
|
+
return X > b && X < u;
|
|
919
1118
|
}
|
|
920
1119
|
return !1;
|
|
921
|
-
},
|
|
922
|
-
let
|
|
923
|
-
|
|
1120
|
+
}, Be = () => {
|
|
1121
|
+
let m = M.value - 1;
|
|
1122
|
+
m < 0 && (m = 11, p.value--), y.value = h[m], j();
|
|
924
1123
|
}, Oe = () => {
|
|
925
|
-
let
|
|
926
|
-
|
|
927
|
-
},
|
|
928
|
-
|
|
1124
|
+
let m = M.value + 1;
|
|
1125
|
+
m > 11 && (m = 0, p.value++), y.value = h[m], j();
|
|
1126
|
+
}, be = (m) => {
|
|
1127
|
+
U.value && !U.value.contains(m.target) && s.value == !0 && G();
|
|
929
1128
|
}, j = () => {
|
|
930
|
-
let
|
|
931
|
-
const
|
|
1129
|
+
let m = {};
|
|
1130
|
+
const b = (u, X, re) => {
|
|
932
1131
|
u instanceof Date && !isNaN(u) || (u = /* @__PURE__ */ new Date());
|
|
933
|
-
const
|
|
934
|
-
return
|
|
1132
|
+
const le = new Date(u);
|
|
1133
|
+
return le.setUTCHours(X, re, 0, 0), le.toISOString();
|
|
935
1134
|
};
|
|
936
|
-
e.range ? (
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
),
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
)) :
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
), t("updated",
|
|
1135
|
+
e.range ? (m.from = b(
|
|
1136
|
+
l.value.start,
|
|
1137
|
+
f.value.start,
|
|
1138
|
+
$.value.start
|
|
1139
|
+
), m.to = b(
|
|
1140
|
+
l.value.end,
|
|
1141
|
+
f.value.end,
|
|
1142
|
+
$.value.end
|
|
1143
|
+
)) : m = b(
|
|
1144
|
+
l.value,
|
|
1145
|
+
f.value,
|
|
1146
|
+
$.value
|
|
1147
|
+
), t("updated", m);
|
|
949
1148
|
};
|
|
950
|
-
return
|
|
951
|
-
e.initialDate && (e.range && e.initialDate.start && e.initialDate.end ?
|
|
1149
|
+
return Q(() => {
|
|
1150
|
+
e.initialDate && (e.range && e.initialDate.start && e.initialDate.end ? l.value = {
|
|
952
1151
|
start: new Date(e.initialDate.start),
|
|
953
1152
|
end: new Date(e.initialDate.end)
|
|
954
|
-
} : e.initialDate.start && (
|
|
955
|
-
}), e.popup &&
|
|
1153
|
+
} : e.initialDate.start && (l.value = { start: new Date(e.initialDate.start) })), e.range ? (f.value.start = f.value.start ?? (/* @__PURE__ */ new Date()).getHours(), f.value.end = f.value.end ?? (/* @__PURE__ */ new Date()).getHours(), $.value.start = $.value.start ?? (/* @__PURE__ */ new Date()).getMinutes(), $.value.end = $.value.end ?? (/* @__PURE__ */ new Date()).getMinutes()) : (f.value = f.value ?? (/* @__PURE__ */ new Date()).getHours(), $.value = $.value ?? (/* @__PURE__ */ new Date()).getMinutes());
|
|
1154
|
+
}), e.popup && Q(() => document.addEventListener("click", be)), $e(() => document.removeEventListener("click", be)), (m, b) => (n(), a("div", {
|
|
956
1155
|
class: "inline-block relative w-full lg:w-[360px]",
|
|
957
1156
|
ref_key: "pickerContainer",
|
|
958
|
-
ref:
|
|
1157
|
+
ref: U
|
|
959
1158
|
}, [
|
|
960
|
-
|
|
1159
|
+
o("div", {
|
|
961
1160
|
class: "flex items-center gap-2 cursor-pointer",
|
|
962
|
-
onClick:
|
|
1161
|
+
onClick: se
|
|
963
1162
|
}, [
|
|
964
|
-
i.popup ?
|
|
965
|
-
|
|
1163
|
+
i.popup ? T(m.$slots, "default", { key: 0 }, () => [
|
|
1164
|
+
o("input", {
|
|
966
1165
|
type: "text",
|
|
967
1166
|
class: "input-bordered w-full cursor-pointer input",
|
|
968
1167
|
placeholder: i.placeholder,
|
|
969
|
-
value:
|
|
1168
|
+
value: J.value,
|
|
970
1169
|
readonly: "",
|
|
971
|
-
id:
|
|
972
|
-
}, null, 8,
|
|
973
|
-
|
|
974
|
-
|
|
1170
|
+
id: R.value
|
|
1171
|
+
}, null, 8, Ut),
|
|
1172
|
+
o("button", Rt, [
|
|
1173
|
+
ae(F(Xe))
|
|
975
1174
|
])
|
|
976
|
-
], !0) :
|
|
1175
|
+
], !0) : O("", !0)
|
|
977
1176
|
]),
|
|
978
|
-
|
|
1177
|
+
s.value || !i.popup ? (n(), a("div", {
|
|
979
1178
|
key: 0,
|
|
980
|
-
class:
|
|
981
|
-
id:
|
|
1179
|
+
class: V(["z-50 bg-base-100 md:mt-2 md:p-4 px-4 rounded-md w-full", [{ absolute: i.popup }]]),
|
|
1180
|
+
id: v.value
|
|
982
1181
|
}, [
|
|
983
|
-
|
|
984
|
-
|
|
1182
|
+
k.value ? (n(), a("div", jt, [
|
|
1183
|
+
o("button", {
|
|
985
1184
|
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
986
|
-
onClick:
|
|
987
|
-
},
|
|
988
|
-
|
|
1185
|
+
onClick: Be
|
|
1186
|
+
}, b[11] || (b[11] = [
|
|
1187
|
+
o("svg", {
|
|
989
1188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
990
1189
|
class: "w-4 h-4",
|
|
991
1190
|
fill: "none",
|
|
992
1191
|
viewBox: "0 0 24 24",
|
|
993
1192
|
stroke: "currentColor"
|
|
994
1193
|
}, [
|
|
995
|
-
|
|
1194
|
+
o("path", {
|
|
996
1195
|
"stroke-linecap": "round",
|
|
997
1196
|
"stroke-linejoin": "round",
|
|
998
1197
|
"stroke-width": "2",
|
|
@@ -1000,42 +1199,42 @@ const Qe = le("SunIcon", [
|
|
|
1000
1199
|
})
|
|
1001
1200
|
], -1)
|
|
1002
1201
|
])),
|
|
1003
|
-
|
|
1202
|
+
q(o("select", {
|
|
1004
1203
|
class: "border-none w-fit select",
|
|
1005
|
-
"onUpdate:modelValue":
|
|
1204
|
+
"onUpdate:modelValue": b[0] || (b[0] = (u) => y.value = u),
|
|
1006
1205
|
onChange: j
|
|
1007
1206
|
}, [
|
|
1008
|
-
(
|
|
1009
|
-
key:
|
|
1207
|
+
(n(), a(B, null, A(h, (u, X) => o("option", {
|
|
1208
|
+
key: X,
|
|
1010
1209
|
value: u
|
|
1011
|
-
},
|
|
1210
|
+
}, C(u), 9, Ft)), 64))
|
|
1012
1211
|
], 544), [
|
|
1013
|
-
[
|
|
1212
|
+
[Z, y.value]
|
|
1014
1213
|
]),
|
|
1015
|
-
|
|
1214
|
+
q(o("select", {
|
|
1016
1215
|
class: "border-none w-24 select",
|
|
1017
|
-
"onUpdate:modelValue":
|
|
1216
|
+
"onUpdate:modelValue": b[1] || (b[1] = (u) => p.value = u),
|
|
1018
1217
|
onChange: j
|
|
1019
1218
|
}, [
|
|
1020
|
-
(
|
|
1219
|
+
(n(!0), a(B, null, A(g.value, (u) => (n(), a("option", {
|
|
1021
1220
|
key: u,
|
|
1022
1221
|
value: u
|
|
1023
|
-
},
|
|
1222
|
+
}, C(u), 9, qt))), 128))
|
|
1024
1223
|
], 544), [
|
|
1025
|
-
[
|
|
1224
|
+
[Z, p.value]
|
|
1026
1225
|
]),
|
|
1027
|
-
|
|
1226
|
+
o("button", {
|
|
1028
1227
|
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
1029
1228
|
onClick: Oe
|
|
1030
|
-
},
|
|
1031
|
-
|
|
1229
|
+
}, b[12] || (b[12] = [
|
|
1230
|
+
o("svg", {
|
|
1032
1231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1033
1232
|
class: "w-4 h-4",
|
|
1034
1233
|
fill: "none",
|
|
1035
1234
|
viewBox: "0 0 24 24",
|
|
1036
1235
|
stroke: "currentColor"
|
|
1037
1236
|
}, [
|
|
1038
|
-
|
|
1237
|
+
o("path", {
|
|
1039
1238
|
"stroke-linecap": "round",
|
|
1040
1239
|
"stroke-linejoin": "round",
|
|
1041
1240
|
"stroke-width": "2",
|
|
@@ -1043,190 +1242,190 @@ const Qe = le("SunIcon", [
|
|
|
1043
1242
|
})
|
|
1044
1243
|
], -1)
|
|
1045
1244
|
]))
|
|
1046
|
-
])) :
|
|
1047
|
-
|
|
1048
|
-
(
|
|
1245
|
+
])) : O("", !0),
|
|
1246
|
+
k.value ? (n(), a("div", Ht, [
|
|
1247
|
+
(n(), a(B, null, A(z, (u) => o("div", {
|
|
1049
1248
|
key: u,
|
|
1050
1249
|
class: "text-center"
|
|
1051
|
-
},
|
|
1052
|
-
(
|
|
1250
|
+
}, C(u), 1)), 64)),
|
|
1251
|
+
(n(!0), a(B, null, A(W.value, (u) => (n(), a("div", {
|
|
1053
1252
|
key: u,
|
|
1054
1253
|
class: "text-center"
|
|
1055
1254
|
}))), 128)),
|
|
1056
|
-
(
|
|
1255
|
+
(n(!0), a(B, null, A(K.value, (u) => (n(), a("div", {
|
|
1057
1256
|
key: u,
|
|
1058
|
-
class:
|
|
1059
|
-
"bg-primary text-primary-content":
|
|
1060
|
-
today:
|
|
1257
|
+
class: V(["hover:bg-primary-10 py-1 rounded-full text-center cursor-pointer", {
|
|
1258
|
+
"bg-primary text-primary-content": De(u),
|
|
1259
|
+
today: Me(u),
|
|
1061
1260
|
"range-start bg-primary text-primary-content": Ie(u),
|
|
1062
|
-
"range-end bg-primary text-primary-content":
|
|
1063
|
-
"in-range bg-primary/20 hover:bg-primary/10":
|
|
1261
|
+
"range-end bg-primary text-primary-content": Te(u),
|
|
1262
|
+
"in-range bg-primary/20 hover:bg-primary/10": Ve(u)
|
|
1064
1263
|
}]),
|
|
1065
|
-
onClick: (
|
|
1066
|
-
},
|
|
1067
|
-
])) :
|
|
1068
|
-
|
|
1069
|
-
e.range ?
|
|
1070
|
-
e.range ? (
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1264
|
+
onClick: (X) => Ce(u)
|
|
1265
|
+
}, C(u.getDate()), 11, Wt))), 128))
|
|
1266
|
+
])) : O("", !0),
|
|
1267
|
+
_.value ? (n(), a("div", Kt, [
|
|
1268
|
+
e.range ? O("", !0) : (n(), a("h3", Yt, "Select Time")),
|
|
1269
|
+
e.range ? (n(), a("div", Qt, [
|
|
1270
|
+
o("div", null, [
|
|
1271
|
+
b[13] || (b[13] = o("p", { class: "font-bold" }, "Start Time", -1)),
|
|
1272
|
+
S.value ? q((n(), a("input", {
|
|
1074
1273
|
key: 0,
|
|
1075
1274
|
type: "time",
|
|
1076
1275
|
class: "input-bordered w-full input",
|
|
1077
|
-
"onUpdate:modelValue":
|
|
1276
|
+
"onUpdate:modelValue": b[5] || (b[5] = (u) => r.value.start = u),
|
|
1078
1277
|
onChange: j
|
|
1079
1278
|
}, null, 544)), [
|
|
1080
|
-
[
|
|
1081
|
-
]) : (
|
|
1082
|
-
|
|
1279
|
+
[ne, r.value.start]
|
|
1280
|
+
]) : (n(), a("div", el, [
|
|
1281
|
+
q(o("select", {
|
|
1083
1282
|
class: "w-full select-bordered select",
|
|
1084
|
-
"onUpdate:modelValue":
|
|
1283
|
+
"onUpdate:modelValue": b[6] || (b[6] = (u) => f.value.start = u),
|
|
1085
1284
|
onChange: j
|
|
1086
1285
|
}, [
|
|
1087
|
-
(
|
|
1286
|
+
(n(!0), a(B, null, A(F(d), (u) => (n(), a("option", {
|
|
1088
1287
|
key: u,
|
|
1089
1288
|
value: u
|
|
1090
|
-
},
|
|
1289
|
+
}, C(u.toString().padStart(2, "0")), 9, tl))), 128))
|
|
1091
1290
|
], 544), [
|
|
1092
1291
|
[
|
|
1093
|
-
|
|
1094
|
-
|
|
1292
|
+
Z,
|
|
1293
|
+
f.value.start,
|
|
1095
1294
|
void 0,
|
|
1096
1295
|
{ number: !0 }
|
|
1097
1296
|
]
|
|
1098
1297
|
]),
|
|
1099
|
-
|
|
1298
|
+
q(o("select", {
|
|
1100
1299
|
class: "w-full select-bordered select",
|
|
1101
|
-
"onUpdate:modelValue":
|
|
1300
|
+
"onUpdate:modelValue": b[7] || (b[7] = (u) => $.value.start = u),
|
|
1102
1301
|
onChange: j
|
|
1103
1302
|
}, [
|
|
1104
|
-
(
|
|
1303
|
+
(n(!0), a(B, null, A(F(w), (u) => (n(), a("option", {
|
|
1105
1304
|
key: u,
|
|
1106
1305
|
value: u
|
|
1107
|
-
},
|
|
1306
|
+
}, C(u.toString().padStart(2, "0")), 9, ll))), 128))
|
|
1108
1307
|
], 544), [
|
|
1109
1308
|
[
|
|
1110
|
-
|
|
1111
|
-
|
|
1309
|
+
Z,
|
|
1310
|
+
$.value.start,
|
|
1112
1311
|
void 0,
|
|
1113
1312
|
{ number: !0 }
|
|
1114
1313
|
]
|
|
1115
1314
|
])
|
|
1116
1315
|
]))
|
|
1117
1316
|
]),
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1317
|
+
o("div", null, [
|
|
1318
|
+
b[14] || (b[14] = o("p", { class: "font-bold" }, "End Time", -1)),
|
|
1319
|
+
S.value ? q((n(), a("input", {
|
|
1121
1320
|
key: 0,
|
|
1122
1321
|
type: "time",
|
|
1123
1322
|
class: "input-bordered w-full input",
|
|
1124
|
-
"onUpdate:modelValue":
|
|
1323
|
+
"onUpdate:modelValue": b[8] || (b[8] = (u) => r.value.end = u),
|
|
1125
1324
|
onChange: j
|
|
1126
1325
|
}, null, 544)), [
|
|
1127
|
-
[
|
|
1128
|
-
]) : (
|
|
1129
|
-
|
|
1326
|
+
[ne, r.value.end]
|
|
1327
|
+
]) : (n(), a("div", nl, [
|
|
1328
|
+
q(o("select", {
|
|
1130
1329
|
class: "w-full select-bordered select",
|
|
1131
|
-
"onUpdate:modelValue":
|
|
1330
|
+
"onUpdate:modelValue": b[9] || (b[9] = (u) => f.value.end = u),
|
|
1132
1331
|
onChange: j
|
|
1133
1332
|
}, [
|
|
1134
|
-
(
|
|
1333
|
+
(n(!0), a(B, null, A(F(d), (u) => (n(), a("option", {
|
|
1135
1334
|
key: u,
|
|
1136
1335
|
value: u
|
|
1137
|
-
},
|
|
1336
|
+
}, C(u.toString().padStart(2, "0")), 9, al))), 128))
|
|
1138
1337
|
], 544), [
|
|
1139
1338
|
[
|
|
1140
|
-
|
|
1141
|
-
|
|
1339
|
+
Z,
|
|
1340
|
+
f.value.end,
|
|
1142
1341
|
void 0,
|
|
1143
1342
|
{ number: !0 }
|
|
1144
1343
|
]
|
|
1145
1344
|
]),
|
|
1146
|
-
|
|
1345
|
+
q(o("select", {
|
|
1147
1346
|
class: "w-full select-bordered select",
|
|
1148
|
-
"onUpdate:modelValue":
|
|
1347
|
+
"onUpdate:modelValue": b[10] || (b[10] = (u) => $.value.end = u),
|
|
1149
1348
|
onChange: j
|
|
1150
1349
|
}, [
|
|
1151
|
-
(
|
|
1350
|
+
(n(!0), a(B, null, A(F(w), (u) => (n(), a("option", {
|
|
1152
1351
|
key: u,
|
|
1153
1352
|
value: u
|
|
1154
|
-
},
|
|
1353
|
+
}, C(u.toString().padStart(2, "0")), 9, ol))), 128))
|
|
1155
1354
|
], 544), [
|
|
1156
1355
|
[
|
|
1157
|
-
|
|
1158
|
-
|
|
1356
|
+
Z,
|
|
1357
|
+
$.value.end,
|
|
1159
1358
|
void 0,
|
|
1160
1359
|
{ number: !0 }
|
|
1161
1360
|
]
|
|
1162
1361
|
])
|
|
1163
1362
|
]))
|
|
1164
1363
|
])
|
|
1165
|
-
])) : (
|
|
1166
|
-
|
|
1364
|
+
])) : (n(), a("div", Jt, [
|
|
1365
|
+
S.value ? q((n(), a("input", {
|
|
1167
1366
|
key: 0,
|
|
1168
1367
|
type: "time",
|
|
1169
1368
|
class: "input-bordered w-full input",
|
|
1170
|
-
"onUpdate:modelValue":
|
|
1369
|
+
"onUpdate:modelValue": b[2] || (b[2] = (u) => r.value = u),
|
|
1171
1370
|
onChange: j
|
|
1172
1371
|
}, null, 544)), [
|
|
1173
|
-
[
|
|
1174
|
-
]) : (
|
|
1175
|
-
|
|
1372
|
+
[ne, r.value]
|
|
1373
|
+
]) : (n(), a("div", Gt, [
|
|
1374
|
+
q(o("select", {
|
|
1176
1375
|
class: "w-full select-bordered select",
|
|
1177
|
-
"onUpdate:modelValue":
|
|
1376
|
+
"onUpdate:modelValue": b[3] || (b[3] = (u) => f.value = u),
|
|
1178
1377
|
onChange: j
|
|
1179
1378
|
}, [
|
|
1180
|
-
(
|
|
1379
|
+
(n(!0), a(B, null, A(F(d), (u) => (n(), a("option", {
|
|
1181
1380
|
key: u,
|
|
1182
1381
|
value: u
|
|
1183
|
-
},
|
|
1382
|
+
}, C(u.toString().padStart(2, "0")), 9, Xt))), 128))
|
|
1184
1383
|
], 544), [
|
|
1185
1384
|
[
|
|
1186
|
-
|
|
1187
|
-
|
|
1385
|
+
Z,
|
|
1386
|
+
f.value,
|
|
1188
1387
|
void 0,
|
|
1189
1388
|
{ number: !0 }
|
|
1190
1389
|
]
|
|
1191
1390
|
]),
|
|
1192
|
-
|
|
1391
|
+
q(o("select", {
|
|
1193
1392
|
class: "w-full select-bordered select",
|
|
1194
|
-
"onUpdate:modelValue":
|
|
1393
|
+
"onUpdate:modelValue": b[4] || (b[4] = (u) => $.value = u),
|
|
1195
1394
|
onChange: j
|
|
1196
1395
|
}, [
|
|
1197
|
-
(
|
|
1396
|
+
(n(!0), a(B, null, A(F(w), (u) => (n(), a("option", {
|
|
1198
1397
|
key: u,
|
|
1199
1398
|
value: u
|
|
1200
|
-
},
|
|
1399
|
+
}, C(u.toString().padStart(2, "0")), 9, Zt))), 128))
|
|
1201
1400
|
], 544), [
|
|
1202
1401
|
[
|
|
1203
|
-
|
|
1204
|
-
|
|
1402
|
+
Z,
|
|
1403
|
+
$.value,
|
|
1205
1404
|
void 0,
|
|
1206
1405
|
{ number: !0 }
|
|
1207
1406
|
]
|
|
1208
1407
|
])
|
|
1209
1408
|
]))
|
|
1210
1409
|
]))
|
|
1211
|
-
])) :
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
class:
|
|
1215
|
-
onClick:
|
|
1216
|
-
}, "Clear", 2),
|
|
1217
|
-
i.popup ? (
|
|
1410
|
+
])) : O("", !0),
|
|
1411
|
+
o("div", sl, [
|
|
1412
|
+
o("button", {
|
|
1413
|
+
class: V(["btn btn-secondary", i.popup ? "w-fit" : "w-full"]),
|
|
1414
|
+
onClick: xe
|
|
1415
|
+
}, " Clear ", 2),
|
|
1416
|
+
i.popup ? (n(), a("button", {
|
|
1218
1417
|
key: 0,
|
|
1219
1418
|
class: "btn btn-primary btn-wide",
|
|
1220
|
-
onClick:
|
|
1221
|
-
}, "Close")) :
|
|
1419
|
+
onClick: G
|
|
1420
|
+
}, " Close ")) : O("", !0)
|
|
1222
1421
|
])
|
|
1223
|
-
], 10,
|
|
1422
|
+
], 10, Nt)) : O("", !0)
|
|
1224
1423
|
], 512));
|
|
1225
1424
|
}
|
|
1226
|
-
},
|
|
1425
|
+
}, il = /* @__PURE__ */ te(rl, [["__scopeId", "data-v-661f4719"]]), ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1227
1426
|
__proto__: null,
|
|
1228
|
-
default:
|
|
1229
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1427
|
+
default: il
|
|
1428
|
+
}, Symbol.toStringTag, { value: "Module" })), dl = ["value", "checked", "onChange", "disabled"], Sn = /* @__PURE__ */ L({
|
|
1230
1429
|
__name: "rating",
|
|
1231
1430
|
props: {
|
|
1232
1431
|
initialRating: { default: 0 },
|
|
@@ -1239,56 +1438,56 @@ const Qe = le("SunIcon", [
|
|
|
1239
1438
|
gap: { default: 0 }
|
|
1240
1439
|
},
|
|
1241
1440
|
setup(i) {
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1244
|
-
() =>
|
|
1245
|
-
(
|
|
1246
|
-
e.value =
|
|
1441
|
+
const c = i, e = x(c.initialRating);
|
|
1442
|
+
H(
|
|
1443
|
+
() => c.initialRating,
|
|
1444
|
+
(s) => {
|
|
1445
|
+
e.value = s;
|
|
1247
1446
|
}
|
|
1248
1447
|
);
|
|
1249
|
-
const t = (
|
|
1250
|
-
e.value =
|
|
1448
|
+
const t = (s) => {
|
|
1449
|
+
e.value = s;
|
|
1251
1450
|
};
|
|
1252
|
-
return (
|
|
1253
|
-
class:
|
|
1451
|
+
return (s, l) => (n(), a("div", {
|
|
1452
|
+
class: V(["rating", [`rating-${c.size}`, { "rating-half": s.halfStars }]])
|
|
1254
1453
|
}, [
|
|
1255
|
-
(
|
|
1454
|
+
(n(!0), a(B, null, A(s.numberOfStars * (s.halfStars ? 2 : 1), (r) => (n(), a("input", {
|
|
1256
1455
|
key: r,
|
|
1257
1456
|
type: "radio",
|
|
1258
|
-
value:
|
|
1259
|
-
checked: e.value === (
|
|
1260
|
-
onChange: (
|
|
1261
|
-
class:
|
|
1457
|
+
value: s.halfStars ? r * 0.5 : r,
|
|
1458
|
+
checked: e.value === (s.halfStars ? r * 0.5 : r),
|
|
1459
|
+
onChange: (y) => s.isInteractive ? t(s.halfStars ? r * 0.5 : r) : null,
|
|
1460
|
+
class: V(["mask", [
|
|
1262
1461
|
{
|
|
1263
1462
|
// 'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
|
|
1264
|
-
"mask-half-1":
|
|
1265
|
-
"mask-half-2":
|
|
1266
|
-
"cursor-pointer":
|
|
1267
|
-
"cursor-default": !
|
|
1268
|
-
"mask-star":
|
|
1269
|
-
"mask-star-2":
|
|
1270
|
-
"mask-heart":
|
|
1271
|
-
"mask-hexagon":
|
|
1272
|
-
"mask-hexagon-2":
|
|
1273
|
-
"mask-decagon":
|
|
1274
|
-
"mask-pentagon":
|
|
1275
|
-
"mask-diamond":
|
|
1276
|
-
"mask-square":
|
|
1277
|
-
"mask-triangle":
|
|
1278
|
-
"mask-triangle-2":
|
|
1279
|
-
"mask-triangle-3":
|
|
1280
|
-
"mask-triangle-4":
|
|
1463
|
+
"mask-half-1": s.halfStars && r % 2 !== 0,
|
|
1464
|
+
"mask-half-2": s.halfStars && r % 2 === 0,
|
|
1465
|
+
"cursor-pointer": s.isInteractive,
|
|
1466
|
+
"cursor-default": !s.isInteractive,
|
|
1467
|
+
"mask-star": s.shape === "star",
|
|
1468
|
+
"mask-star-2": s.shape === "star-bold",
|
|
1469
|
+
"mask-heart": s.shape === "heart",
|
|
1470
|
+
"mask-hexagon": s.shape === "hexagon-vertical",
|
|
1471
|
+
"mask-hexagon-2": s.shape === "hexagon-horizontal",
|
|
1472
|
+
"mask-decagon": s.shape === "decagon",
|
|
1473
|
+
"mask-pentagon": s.shape === "pentagon",
|
|
1474
|
+
"mask-diamond": s.shape === "diamond",
|
|
1475
|
+
"mask-square": s.shape === "square",
|
|
1476
|
+
"mask-triangle": s.shape === "triangle-top",
|
|
1477
|
+
"mask-triangle-2": s.shape === "triangle-bottom",
|
|
1478
|
+
"mask-triangle-3": s.shape === "triangle-left",
|
|
1479
|
+
"mask-triangle-4": s.shape === "triangle-right"
|
|
1281
1480
|
},
|
|
1282
|
-
e.value >= (
|
|
1481
|
+
e.value >= (s.halfStars ? r * 0.5 : r) ? c.color : ""
|
|
1283
1482
|
]]),
|
|
1284
|
-
style:
|
|
1285
|
-
marginRight:
|
|
1483
|
+
style: de({
|
|
1484
|
+
marginRight: s.halfStars && r % 2 === 0 ? `${c.gap}px` : s.halfStars ? "0" : `${c.gap}px`
|
|
1286
1485
|
}),
|
|
1287
|
-
disabled: !
|
|
1288
|
-
}, null, 46,
|
|
1486
|
+
disabled: !s.isInteractive
|
|
1487
|
+
}, null, 46, dl))), 128))
|
|
1289
1488
|
], 2));
|
|
1290
1489
|
}
|
|
1291
|
-
}),
|
|
1490
|
+
}), cl = { class: "badge" }, pl = ["onClick"], vl = { class: "opacity-75" }, fl = ["placeholder"], xn = /* @__PURE__ */ L({
|
|
1292
1491
|
__name: "taginput",
|
|
1293
1492
|
props: {
|
|
1294
1493
|
modelValue: {},
|
|
@@ -1297,61 +1496,61 @@ const Qe = le("SunIcon", [
|
|
|
1297
1496
|
class: {}
|
|
1298
1497
|
},
|
|
1299
1498
|
emits: ["update:modelValue"],
|
|
1300
|
-
setup(i, { emit:
|
|
1301
|
-
const e = i, t =
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1304
|
-
},
|
|
1305
|
-
|
|
1306
|
-
},
|
|
1307
|
-
|
|
1308
|
-
},
|
|
1309
|
-
|
|
1499
|
+
setup(i, { emit: c }) {
|
|
1500
|
+
const e = i, t = c, s = x([...e.modelValue]), l = e.maxTagAmount === void 0 ? -1 : e.maxTagAmount, r = x(null), y = x(""), p = E(() => l < 0 || s.value.length < l), f = () => {
|
|
1501
|
+
const v = y.value.trim();
|
|
1502
|
+
v && !s.value.includes(v) && (s.value.push(v), t("update:modelValue", s.value), y.value = "");
|
|
1503
|
+
}, $ = (v) => {
|
|
1504
|
+
s.value = s.value.filter((k) => k !== v), t("update:modelValue", s.value);
|
|
1505
|
+
}, U = () => {
|
|
1506
|
+
y.value === "" && (s.value.pop(), t("update:modelValue", s.value));
|
|
1507
|
+
}, R = (v) => {
|
|
1508
|
+
v.key === "Enter" ? f() : v.key === "Backspace" && y.value === "" && U();
|
|
1310
1509
|
};
|
|
1311
|
-
return
|
|
1312
|
-
|
|
1313
|
-
}), (
|
|
1314
|
-
class:
|
|
1510
|
+
return H(() => e.modelValue, (v) => {
|
|
1511
|
+
s.value = [...v];
|
|
1512
|
+
}), (v, k) => (n(), a("div", {
|
|
1513
|
+
class: V(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", v.$props.class])
|
|
1315
1514
|
}, [
|
|
1316
|
-
(
|
|
1317
|
-
key:
|
|
1318
|
-
tag:
|
|
1515
|
+
(n(!0), a(B, null, A(s.value, (_) => T(v.$slots, "tag", {
|
|
1516
|
+
key: _,
|
|
1517
|
+
tag: _
|
|
1319
1518
|
}, () => [
|
|
1320
|
-
|
|
1321
|
-
|
|
1519
|
+
o("div", cl, [
|
|
1520
|
+
o("button", {
|
|
1322
1521
|
class: "!px-1 !py-0 h-fit font-bold cursor-pointer",
|
|
1323
|
-
onClick: (
|
|
1522
|
+
onClick: (M) => $(_),
|
|
1324
1523
|
"aria-label": "Remove tag"
|
|
1325
|
-
}, "X", 8,
|
|
1326
|
-
|
|
1524
|
+
}, "X", 8, pl),
|
|
1525
|
+
o("span", vl, C(_), 1)
|
|
1327
1526
|
])
|
|
1328
1527
|
])), 128)),
|
|
1329
|
-
|
|
1330
|
-
|
|
1528
|
+
T(v.$slots, "input", { showInput: p.value }, () => [
|
|
1529
|
+
p.value ? q((n(), a("input", {
|
|
1331
1530
|
key: 0,
|
|
1332
1531
|
ref_key: "inputRef",
|
|
1333
1532
|
ref: r,
|
|
1334
|
-
"onUpdate:modelValue":
|
|
1533
|
+
"onUpdate:modelValue": k[0] || (k[0] = (_) => y.value = _),
|
|
1335
1534
|
type: "text",
|
|
1336
|
-
placeholder:
|
|
1535
|
+
placeholder: v.placeholder || "Type here",
|
|
1337
1536
|
class: "h-full input input-ghost",
|
|
1338
|
-
onKeydown:
|
|
1537
|
+
onKeydown: R,
|
|
1339
1538
|
"aria-label": "Add tags"
|
|
1340
|
-
}, null, 40,
|
|
1341
|
-
[
|
|
1342
|
-
]) :
|
|
1539
|
+
}, null, 40, fl)), [
|
|
1540
|
+
[ne, y.value]
|
|
1541
|
+
]) : O("", !0)
|
|
1343
1542
|
])
|
|
1344
1543
|
], 2));
|
|
1345
1544
|
}
|
|
1346
|
-
}),
|
|
1545
|
+
}), ml = { class: "w-full max-w-xs form-control" }, gl = {
|
|
1347
1546
|
key: 0,
|
|
1348
1547
|
class: "label"
|
|
1349
|
-
},
|
|
1548
|
+
}, hl = { class: "label-text" }, bl = ["value"], yl = {
|
|
1350
1549
|
key: 0,
|
|
1351
1550
|
value: "",
|
|
1352
1551
|
disabled: "",
|
|
1353
1552
|
selected: ""
|
|
1354
|
-
},
|
|
1553
|
+
}, wl = ["value"], Cn = /* @__PURE__ */ L({
|
|
1355
1554
|
__name: "select",
|
|
1356
1555
|
props: {
|
|
1357
1556
|
options: {},
|
|
@@ -1360,45 +1559,45 @@ const Qe = le("SunIcon", [
|
|
|
1360
1559
|
modelValue: {}
|
|
1361
1560
|
},
|
|
1362
1561
|
emits: ["update:modelValue"],
|
|
1363
|
-
setup(i, { expose:
|
|
1562
|
+
setup(i, { expose: c, emit: e }) {
|
|
1364
1563
|
console.log(i.placeholder);
|
|
1365
|
-
const
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1564
|
+
const s = e, l = x(null), r = (p) => {
|
|
1565
|
+
const f = p.target;
|
|
1566
|
+
s("update:modelValue", f.value);
|
|
1368
1567
|
};
|
|
1369
|
-
return
|
|
1568
|
+
return c({
|
|
1370
1569
|
focusInput: () => {
|
|
1371
|
-
var
|
|
1372
|
-
console.log("select.vue: focusInput method called."), (
|
|
1570
|
+
var p;
|
|
1571
|
+
console.log("select.vue: focusInput method called."), (p = l.value) == null || p.focus();
|
|
1373
1572
|
}
|
|
1374
1573
|
// You can expose other properties or methods here if needed by the parent
|
|
1375
1574
|
// e.g., the current value: modelValue
|
|
1376
|
-
}), (
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
])) :
|
|
1380
|
-
|
|
1575
|
+
}), (p, f) => (n(), a("div", ml, [
|
|
1576
|
+
p.label ? (n(), a("label", gl, [
|
|
1577
|
+
o("span", hl, C(p.label), 1)
|
|
1578
|
+
])) : O("", !0),
|
|
1579
|
+
o("select", {
|
|
1381
1580
|
ref_key: "selectElement",
|
|
1382
|
-
ref:
|
|
1581
|
+
ref: l,
|
|
1383
1582
|
class: "rounded-md w-full select-bordered select",
|
|
1384
|
-
value:
|
|
1583
|
+
value: p.modelValue,
|
|
1385
1584
|
onChange: r
|
|
1386
1585
|
}, [
|
|
1387
|
-
|
|
1388
|
-
(
|
|
1389
|
-
key:
|
|
1390
|
-
value:
|
|
1391
|
-
},
|
|
1392
|
-
], 40,
|
|
1586
|
+
p.placeholder ? (n(), a("option", yl, C(p.placeholder), 1)) : O("", !0),
|
|
1587
|
+
(n(!0), a(B, null, A(p.options, ($) => (n(), a("option", {
|
|
1588
|
+
key: $.value,
|
|
1589
|
+
value: $.value
|
|
1590
|
+
}, C($.text), 9, wl))), 128))
|
|
1591
|
+
], 40, bl)
|
|
1393
1592
|
]));
|
|
1394
1593
|
}
|
|
1395
|
-
}),
|
|
1594
|
+
}), kl = {
|
|
1396
1595
|
key: 0,
|
|
1397
1596
|
class: "label"
|
|
1398
|
-
},
|
|
1597
|
+
}, $l = { class: "label-text" }, _l = ["onKeydown", "aria-expanded", "aria-activedescendant"], Sl = ["placeholder"], xl = {
|
|
1399
1598
|
class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
|
|
1400
1599
|
role: "listbox"
|
|
1401
|
-
},
|
|
1600
|
+
}, Cl = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, Dl = ["onMousedown", "id", "aria-selected"], Dn = {
|
|
1402
1601
|
__name: "filterableSelect",
|
|
1403
1602
|
props: {
|
|
1404
1603
|
// Array of options: [{ value: any, text: string }, ...]
|
|
@@ -1424,181 +1623,181 @@ const Qe = le("SunIcon", [
|
|
|
1424
1623
|
}
|
|
1425
1624
|
},
|
|
1426
1625
|
emits: ["update:modelValue", "select"],
|
|
1427
|
-
setup(i, { expose:
|
|
1428
|
-
const t = i,
|
|
1429
|
-
const
|
|
1430
|
-
return console.log("hasDefaultSlotContent computed:",
|
|
1431
|
-
}),
|
|
1432
|
-
console.log("openDropdown called"),
|
|
1433
|
-
},
|
|
1434
|
-
console.log("closeDropdown called"),
|
|
1435
|
-
},
|
|
1436
|
-
|
|
1437
|
-
},
|
|
1438
|
-
const
|
|
1439
|
-
return
|
|
1440
|
-
(
|
|
1626
|
+
setup(i, { expose: c, emit: e }) {
|
|
1627
|
+
const t = i, s = e, l = Ue(), r = E(() => {
|
|
1628
|
+
const g = (l.default ? l.default() : []).filter((I) => I.type !== Re);
|
|
1629
|
+
return console.log("hasDefaultSlotContent computed:", g.length > 0), g.length > 0;
|
|
1630
|
+
}), y = x(""), p = x(null), f = x(!1), $ = x(null), U = x(null), R = x(null), v = x(null), k = () => {
|
|
1631
|
+
console.log("openDropdown called"), f.value = !0;
|
|
1632
|
+
}, _ = () => {
|
|
1633
|
+
console.log("closeDropdown called"), f.value = !1, v.value = null, r.value || (p.value && y.value !== p.value.text ? y.value = p.value.text : p.value || (y.value = ""));
|
|
1634
|
+
}, M = () => {
|
|
1635
|
+
f.value ? _() : k();
|
|
1636
|
+
}, z = E(() => {
|
|
1637
|
+
const h = y.value.toLowerCase();
|
|
1638
|
+
return h === "" && !f.value ? [] : t.options.filter(
|
|
1639
|
+
(I) => I.text.toLowerCase().includes(h)
|
|
1441
1640
|
);
|
|
1442
1641
|
});
|
|
1443
|
-
|
|
1642
|
+
H(
|
|
1444
1643
|
() => t.modelValue,
|
|
1445
|
-
(
|
|
1446
|
-
if (
|
|
1447
|
-
|
|
1644
|
+
(h, g) => {
|
|
1645
|
+
if (h !== g && _(), h == null)
|
|
1646
|
+
p.value = null, !f.value && !r.value && (y.value = "");
|
|
1448
1647
|
else {
|
|
1449
|
-
const
|
|
1450
|
-
|
|
1648
|
+
const I = t.options.find((D) => D.value === h);
|
|
1649
|
+
I ? (p.value = I, !f.value && !r.value && (y.value = I.text)) : (p.value = null, !f.value && !r.value && (y.value = ""));
|
|
1451
1650
|
}
|
|
1452
1651
|
},
|
|
1453
1652
|
{ immediate: !0 }
|
|
1454
1653
|
// Run immediately on component mount
|
|
1455
1654
|
);
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1458
|
-
},
|
|
1655
|
+
const N = (h) => {
|
|
1656
|
+
U.value && !U.value.contains(h.target) && _();
|
|
1657
|
+
}, K = () => {
|
|
1459
1658
|
setTimeout(() => {
|
|
1460
|
-
|
|
1659
|
+
U.value && !U.value.contains(document.activeElement) && _();
|
|
1461
1660
|
}, 100);
|
|
1462
1661
|
};
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
document.addEventListener("click",
|
|
1466
|
-
}, 0) : document.removeEventListener("click",
|
|
1467
|
-
}),
|
|
1468
|
-
document.removeEventListener("click",
|
|
1662
|
+
H(f, (h) => {
|
|
1663
|
+
h ? setTimeout(() => {
|
|
1664
|
+
document.addEventListener("click", N);
|
|
1665
|
+
}, 0) : document.removeEventListener("click", N);
|
|
1666
|
+
}), ge(() => {
|
|
1667
|
+
document.removeEventListener("click", N), window.removeEventListener("keydown", S);
|
|
1469
1668
|
});
|
|
1470
|
-
const
|
|
1471
|
-
|
|
1472
|
-
},
|
|
1473
|
-
|
|
1474
|
-
},
|
|
1475
|
-
|
|
1476
|
-
},
|
|
1477
|
-
if (!
|
|
1478
|
-
const
|
|
1479
|
-
(
|
|
1669
|
+
const W = (h) => {
|
|
1670
|
+
p.value = h, r.value || (y.value = h.text), s("update:modelValue", h.value), s("select", h), _(), console.log("user selected an option");
|
|
1671
|
+
}, d = () => {
|
|
1672
|
+
z.value.length > 0 && W(z.value[0]);
|
|
1673
|
+
}, w = () => {
|
|
1674
|
+
f.value || k();
|
|
1675
|
+
}, S = (h) => {
|
|
1676
|
+
if (!f.value || z.value.length === 0) return;
|
|
1677
|
+
const g = z.value.findIndex(
|
|
1678
|
+
(D, P) => "option-" + P === v.value
|
|
1480
1679
|
);
|
|
1481
|
-
let
|
|
1482
|
-
if (
|
|
1483
|
-
|
|
1484
|
-
else if (
|
|
1485
|
-
|
|
1486
|
-
else if (
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
(
|
|
1680
|
+
let I = -1;
|
|
1681
|
+
if (h.key === "ArrowDown")
|
|
1682
|
+
h.preventDefault(), I = (g + 1) % z.value.length;
|
|
1683
|
+
else if (h.key === "ArrowUp")
|
|
1684
|
+
h.preventDefault(), I = (g - 1 + z.value.length) % z.value.length;
|
|
1685
|
+
else if (h.key === "Enter" && v.value) {
|
|
1686
|
+
h.preventDefault();
|
|
1687
|
+
const D = z.value.find(
|
|
1688
|
+
(P, Y) => "option-" + Y === v.value
|
|
1490
1689
|
);
|
|
1491
|
-
|
|
1690
|
+
D && W(D);
|
|
1492
1691
|
return;
|
|
1493
|
-
} else if (
|
|
1494
|
-
|
|
1692
|
+
} else if (h.key === "Escape") {
|
|
1693
|
+
h.preventDefault(), _(), R.value && R.value.focus();
|
|
1495
1694
|
return;
|
|
1496
1695
|
} else if (r.value)
|
|
1497
1696
|
return;
|
|
1498
|
-
if (
|
|
1499
|
-
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1502
|
-
|
|
1697
|
+
if (I !== -1) {
|
|
1698
|
+
v.value = "option-" + I;
|
|
1699
|
+
const D = document.getElementById(v.value);
|
|
1700
|
+
D && requestAnimationFrame(() => {
|
|
1701
|
+
D.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
1503
1702
|
});
|
|
1504
1703
|
}
|
|
1505
1704
|
};
|
|
1506
|
-
return
|
|
1507
|
-
|
|
1508
|
-
}),
|
|
1509
|
-
document.removeEventListener("click",
|
|
1510
|
-
}),
|
|
1511
|
-
isDropdownOpen:
|
|
1705
|
+
return H(f, (h) => {
|
|
1706
|
+
h ? (window.addEventListener("keydown", S), !r.value && !y.value && p.value && (y.value = p.value.text)) : (console.log("Removing window keydown listener"), window.removeEventListener("keydown", S));
|
|
1707
|
+
}), ge(() => {
|
|
1708
|
+
document.removeEventListener("click", N), window.removeEventListener("keydown", S);
|
|
1709
|
+
}), c({
|
|
1710
|
+
isDropdownOpen: f,
|
|
1512
1711
|
// Expose state
|
|
1513
|
-
selectedItem:
|
|
1712
|
+
selectedItem: p,
|
|
1514
1713
|
// Expose selected item
|
|
1515
|
-
openDropdown:
|
|
1714
|
+
openDropdown: k,
|
|
1516
1715
|
// Expose method to open
|
|
1517
|
-
closeDropdown:
|
|
1716
|
+
closeDropdown: _,
|
|
1518
1717
|
// Expose method to close
|
|
1519
|
-
toggleDropdown:
|
|
1718
|
+
toggleDropdown: M,
|
|
1520
1719
|
// Expose method to toggle
|
|
1521
|
-
selectItem:
|
|
1720
|
+
selectItem: W,
|
|
1522
1721
|
// Expose method to select an item programmatically
|
|
1523
|
-
filterText:
|
|
1722
|
+
filterText: y,
|
|
1524
1723
|
// Expose filter text (useful if parent controls filtering)
|
|
1525
1724
|
hasDefaultSlotContent: r
|
|
1526
1725
|
// Expose to know if the default slot is used
|
|
1527
|
-
}), (
|
|
1726
|
+
}), (h, g) => (n(), a("div", {
|
|
1528
1727
|
class: "relative w-full max-w-xs form-control",
|
|
1529
1728
|
ref_key: "componentRoot",
|
|
1530
|
-
ref:
|
|
1729
|
+
ref: U
|
|
1531
1730
|
}, [
|
|
1532
|
-
i.label ? (
|
|
1533
|
-
|
|
1534
|
-
])) :
|
|
1535
|
-
|
|
1536
|
-
class:
|
|
1731
|
+
i.label ? (n(), a("label", kl, [
|
|
1732
|
+
o("span", $l, C(i.label), 1)
|
|
1733
|
+
])) : O("", !0),
|
|
1734
|
+
o("div", {
|
|
1735
|
+
class: V(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !r.value, select: !r.value }]),
|
|
1537
1736
|
tabindex: "0",
|
|
1538
|
-
onClick:
|
|
1737
|
+
onClick: k,
|
|
1539
1738
|
onKeydown: [
|
|
1540
|
-
|
|
1541
|
-
|
|
1739
|
+
he(ee(d, ["prevent"]), ["enter"]),
|
|
1740
|
+
he(ee(d, ["prevent"]), ["space"])
|
|
1542
1741
|
],
|
|
1543
|
-
onBlur:
|
|
1742
|
+
onBlur: K,
|
|
1544
1743
|
role: "combobox",
|
|
1545
1744
|
"aria-haspopup": "listbox",
|
|
1546
|
-
"aria-expanded":
|
|
1547
|
-
"aria-activedescendant":
|
|
1745
|
+
"aria-expanded": f.value,
|
|
1746
|
+
"aria-activedescendant": v.value,
|
|
1548
1747
|
"aria-autocomplete": "list",
|
|
1549
1748
|
ref_key: "activatorWrapper",
|
|
1550
|
-
ref:
|
|
1749
|
+
ref: R
|
|
1551
1750
|
}, [
|
|
1552
|
-
|
|
1553
|
-
r.value ?
|
|
1751
|
+
T(h.$slots, "default", {}, () => [
|
|
1752
|
+
r.value ? O("", !0) : q((n(), a("input", {
|
|
1554
1753
|
key: 0,
|
|
1555
1754
|
type: "text",
|
|
1556
1755
|
placeholder: i.placeholder,
|
|
1557
1756
|
class: "bg-transparent border-none focus:outline-none w-full",
|
|
1558
|
-
"onUpdate:modelValue":
|
|
1757
|
+
"onUpdate:modelValue": g[0] || (g[0] = (I) => y.value = I),
|
|
1559
1758
|
ref_key: "filterInput",
|
|
1560
|
-
ref:
|
|
1561
|
-
onFocus:
|
|
1562
|
-
onInput:
|
|
1759
|
+
ref: $,
|
|
1760
|
+
onFocus: k,
|
|
1761
|
+
onInput: w,
|
|
1563
1762
|
tabindex: "-1"
|
|
1564
|
-
}, null, 40,
|
|
1565
|
-
[
|
|
1763
|
+
}, null, 40, Sl)), [
|
|
1764
|
+
[ne, y.value]
|
|
1566
1765
|
])
|
|
1567
1766
|
]),
|
|
1568
|
-
r.value ? (
|
|
1767
|
+
r.value ? (n(), ue(F(Ze), {
|
|
1569
1768
|
key: 0,
|
|
1570
|
-
class:
|
|
1769
|
+
class: V({ "rotate-180": f.value }),
|
|
1571
1770
|
size: 20
|
|
1572
|
-
}, null, 8, ["class"])) :
|
|
1573
|
-
], 42,
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
(
|
|
1577
|
-
key:
|
|
1578
|
-
onMousedown:
|
|
1771
|
+
}, null, 8, ["class"])) : O("", !0)
|
|
1772
|
+
], 42, _l),
|
|
1773
|
+
q(o("div", xl, [
|
|
1774
|
+
o("ul", Cl, [
|
|
1775
|
+
(n(!0), a(B, null, A(z.value, (I, D) => (n(), a("li", {
|
|
1776
|
+
key: I.value,
|
|
1777
|
+
onMousedown: ee((P) => W(I), ["prevent"]),
|
|
1579
1778
|
class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
|
|
1580
|
-
id: "option-" +
|
|
1779
|
+
id: "option-" + D,
|
|
1581
1780
|
role: "option",
|
|
1582
|
-
"aria-selected":
|
|
1781
|
+
"aria-selected": p.value && p.value.value === I.value
|
|
1583
1782
|
}, [
|
|
1584
|
-
|
|
1585
|
-
], 40,
|
|
1783
|
+
o("a", null, C(I.text), 1)
|
|
1784
|
+
], 40, Dl))), 128))
|
|
1586
1785
|
])
|
|
1587
1786
|
], 512), [
|
|
1588
|
-
[
|
|
1787
|
+
[Ne, f.value && z.value.length > 0]
|
|
1589
1788
|
])
|
|
1590
1789
|
], 512));
|
|
1591
1790
|
}
|
|
1592
|
-
},
|
|
1791
|
+
}, Ml = { class: "w-full max-w-xs form-control" }, Il = {
|
|
1593
1792
|
key: 0,
|
|
1594
1793
|
class: "label"
|
|
1595
|
-
},
|
|
1794
|
+
}, Tl = { class: "label-text" }, Vl = ["type", "placeholder", "value"], Bl = {
|
|
1596
1795
|
key: 1,
|
|
1597
1796
|
class: "label"
|
|
1598
|
-
},
|
|
1797
|
+
}, Ol = { class: "label-text-alt text-error validator-hint" }, zl = {
|
|
1599
1798
|
key: 2,
|
|
1600
1799
|
class: "label"
|
|
1601
|
-
},
|
|
1800
|
+
}, Al = { class: "label-text-alt text-success validator-hint" }, Mn = /* @__PURE__ */ L({
|
|
1602
1801
|
__name: "inputField",
|
|
1603
1802
|
props: {
|
|
1604
1803
|
modelValue: { default: "" },
|
|
@@ -1606,83 +1805,87 @@ const Qe = le("SunIcon", [
|
|
|
1606
1805
|
placeholder: { default: "" },
|
|
1607
1806
|
type: { default: "text" },
|
|
1608
1807
|
rules: { default: () => ({}) },
|
|
1808
|
+
needsValidation: {},
|
|
1609
1809
|
successMessage: { default: "" },
|
|
1610
1810
|
size: { default: "md" },
|
|
1611
1811
|
color: { default: "" },
|
|
1612
1812
|
style: { default: "" }
|
|
1613
1813
|
},
|
|
1614
1814
|
emits: ["update:modelValue", "validate"],
|
|
1615
|
-
setup(i, { expose:
|
|
1616
|
-
const t = i,
|
|
1617
|
-
var
|
|
1618
|
-
let
|
|
1619
|
-
const
|
|
1620
|
-
return (
|
|
1621
|
-
}),
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1624
|
-
},
|
|
1625
|
-
r.value = !0,
|
|
1815
|
+
setup(i, { expose: c, emit: e }) {
|
|
1816
|
+
const t = i, s = e, l = x(null), r = x(!1), y = x(""), p = E(() => {
|
|
1817
|
+
var M, z, N, K;
|
|
1818
|
+
let v = !0, k = "";
|
|
1819
|
+
const _ = t.modelValue;
|
|
1820
|
+
return (M = t.rules) != null && M.required && (_ == null || _ === "") && (v = !1, k = "This field is required."), v && ((z = t.rules) == null ? void 0 : z.minLength) !== void 0 && typeof _ == "string" && _.length < t.rules.minLength && (v = !1, k = `Must be at least ${t.rules.minLength} characters.`), v && ((N = t.rules) == null ? void 0 : N.maxLength) !== void 0 && typeof _ == "string" && _.length > t.rules.maxLength && (v = !1, k = `Cannot exceed ${t.rules.maxLength} characters.`), v && ((K = t.rules) != null && K.email) && typeof _ == "string" && _ && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_) || (v = !1, k = "Please enter a valid email address.")), y.value = k, s("validate", v), v;
|
|
1821
|
+
}), f = E(() => r.value && !p.value), $ = (v) => {
|
|
1822
|
+
const k = v.target;
|
|
1823
|
+
s("update:modelValue", k.value), r.value && p.value;
|
|
1824
|
+
}, U = () => {
|
|
1825
|
+
r.value = !0, p.value;
|
|
1626
1826
|
};
|
|
1627
|
-
return
|
|
1827
|
+
return H(
|
|
1628
1828
|
() => t.modelValue,
|
|
1629
1829
|
() => {
|
|
1630
|
-
r.value &&
|
|
1830
|
+
r.value && p.value;
|
|
1631
1831
|
}
|
|
1632
|
-
),
|
|
1832
|
+
), c({
|
|
1633
1833
|
focusInput: () => {
|
|
1634
|
-
var
|
|
1635
|
-
console.log("inputField.vue: focusInput method called."), (
|
|
1834
|
+
var v;
|
|
1835
|
+
console.log("inputField.vue: focusInput method called."), (v = l.value) == null || v.focus();
|
|
1636
1836
|
},
|
|
1637
|
-
isValid:
|
|
1837
|
+
isValid: p,
|
|
1638
1838
|
isTouched: r,
|
|
1639
|
-
errorMessage:
|
|
1640
|
-
}), (
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
])) :
|
|
1644
|
-
|
|
1839
|
+
errorMessage: y
|
|
1840
|
+
}), (v, k) => (n(), a("div", Ml, [
|
|
1841
|
+
v.label ? (n(), a("label", Il, [
|
|
1842
|
+
o("span", Tl, C(v.label), 1)
|
|
1843
|
+
])) : O("", !0),
|
|
1844
|
+
T(v.$slots, "default"),
|
|
1845
|
+
o("input", {
|
|
1645
1846
|
ref_key: "inputElement",
|
|
1646
|
-
ref:
|
|
1647
|
-
type:
|
|
1648
|
-
placeholder:
|
|
1649
|
-
class:
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
])) :
|
|
1847
|
+
ref: l,
|
|
1848
|
+
type: v.type,
|
|
1849
|
+
placeholder: v.placeholder,
|
|
1850
|
+
class: V(["input-bordered rounded-md w-full input validator", [
|
|
1851
|
+
{
|
|
1852
|
+
// Size classes - Apply based on size prop
|
|
1853
|
+
"input-xs": v.size === "xs",
|
|
1854
|
+
"input-sm": v.size === "sm",
|
|
1855
|
+
"input-md": v.size === "md",
|
|
1856
|
+
"input-lg": v.size === "lg",
|
|
1857
|
+
"input-xl": v.size === "xl",
|
|
1858
|
+
// Style classes - Apply based on style prop
|
|
1859
|
+
"input-ghost": v.style === "ghost",
|
|
1860
|
+
// Color classes - Apply only if NOT in an error state AND NOT in a validation success state.
|
|
1861
|
+
// This ensures validation feedback overrides base colors.
|
|
1862
|
+
"input-neutral": v.color === "neutral" && !f.value && !(p.value && r.value && v.needsValidation),
|
|
1863
|
+
"input-primary": v.color === "primary" && !f.value && !(p.value && r.value && v.needsValidation),
|
|
1864
|
+
"input-secondary": v.color === "secondary" && !f.value && !(p.value && r.value && v.needsValidation),
|
|
1865
|
+
"input-accent": v.color === "accent" && !f.value && !(p.value && r.value && v.needsValidation),
|
|
1866
|
+
"input-info": v.color === "info" && !f.value && !(p.value && r.value && v.needsValidation),
|
|
1867
|
+
"input-success": v.color === "success" && !f.value && !(p.value && r.value && v.needsValidation),
|
|
1868
|
+
// Color success applies only if not in error or validation success state
|
|
1869
|
+
"input-warning": v.color === "warning" && !f.value && !(p.value && r.value && v.needsValidation),
|
|
1870
|
+
// Validation state classes - These take precedence visually via conditions or CSS specificity.
|
|
1871
|
+
"input-error": f.value,
|
|
1872
|
+
// Apply error style if validation fails
|
|
1873
|
+
"input-success-validation": p.value && r.value && !f.value && v.needsValidation
|
|
1874
|
+
// Apply validation success style if valid, touched, not error, AND validation is needed. Using a distinct name 'input-success-validation' is recommended to avoid CSS conflicts with the 'input-success' color class.
|
|
1875
|
+
}
|
|
1876
|
+
]]),
|
|
1877
|
+
value: v.modelValue,
|
|
1878
|
+
onInput: $,
|
|
1879
|
+
onBlur: U
|
|
1880
|
+
}, null, 42, Vl),
|
|
1881
|
+
f.value ? (n(), a("div", Bl, [
|
|
1882
|
+
o("span", Ol, C(y.value), 1)
|
|
1883
|
+
])) : p.value && r.value && v.successMessage ? (n(), a("div", zl, [
|
|
1884
|
+
o("span", Al, C(v.successMessage), 1)
|
|
1885
|
+
])) : O("", !0)
|
|
1683
1886
|
]));
|
|
1684
1887
|
}
|
|
1685
|
-
}),
|
|
1888
|
+
}), In = /* @__PURE__ */ L({
|
|
1686
1889
|
__name: "loader",
|
|
1687
1890
|
props: {
|
|
1688
1891
|
loading: { type: Boolean, default: !0 },
|
|
@@ -1691,15 +1894,15 @@ const Qe = le("SunIcon", [
|
|
|
1691
1894
|
color: { default: "primary" }
|
|
1692
1895
|
},
|
|
1693
1896
|
setup(i) {
|
|
1694
|
-
const
|
|
1695
|
-
return
|
|
1696
|
-
() =>
|
|
1897
|
+
const c = i, e = x(c.loading);
|
|
1898
|
+
return H(
|
|
1899
|
+
() => c.loading,
|
|
1697
1900
|
(t) => {
|
|
1698
1901
|
e.value = t;
|
|
1699
1902
|
}
|
|
1700
|
-
), (t,
|
|
1903
|
+
), (t, s) => e.value ? (n(), a("span", {
|
|
1701
1904
|
key: 0,
|
|
1702
|
-
class:
|
|
1905
|
+
class: V(["loading", [
|
|
1703
1906
|
{ "loading-xs": t.size === "xs" },
|
|
1704
1907
|
{ "loading-sm": t.size === "sm" },
|
|
1705
1908
|
{ "loading-md": t.size === "md" },
|
|
@@ -1722,15 +1925,15 @@ const Qe = le("SunIcon", [
|
|
|
1722
1925
|
{ "text-warning": t.color === "warning" },
|
|
1723
1926
|
{ "text-error": t.color === "error" }
|
|
1724
1927
|
]])
|
|
1725
|
-
}, null, 2)) :
|
|
1928
|
+
}, null, 2)) : O("", !0);
|
|
1726
1929
|
}
|
|
1727
|
-
}),
|
|
1930
|
+
}), Pl = { class: "footer sm:footer-horizontal container" }, El = { class: "footer-title" }, Ll = ["href"], Ul = {
|
|
1728
1931
|
key: 0,
|
|
1729
1932
|
class: "sm:hidden w-full"
|
|
1730
|
-
},
|
|
1933
|
+
}, Rl = { class: "border-b-2 border-base-100 last:border-b-0 w-full" }, Nl = {
|
|
1731
1934
|
tabindex: "0",
|
|
1732
1935
|
class: "collapse collapse-plus w-full"
|
|
1733
|
-
},
|
|
1936
|
+
}, jl = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, Fl = { class: "collapse-content flex w-full text-sm" }, ql = { class: "flex flex-col gap-2.5" }, Hl = { class: "w-full" }, Wl = ["href"], Kl = { class: "w-full" }, Tn = /* @__PURE__ */ L({
|
|
1734
1937
|
__name: "footer",
|
|
1735
1938
|
props: {
|
|
1736
1939
|
items: {},
|
|
@@ -1739,118 +1942,118 @@ const Qe = le("SunIcon", [
|
|
|
1739
1942
|
collapseOnMobile: { type: Boolean, default: !1 }
|
|
1740
1943
|
},
|
|
1741
1944
|
setup(i) {
|
|
1742
|
-
const
|
|
1743
|
-
return (e, t) => (
|
|
1744
|
-
class:
|
|
1945
|
+
const c = i;
|
|
1946
|
+
return (e, t) => (n(), a("div", {
|
|
1947
|
+
class: V(["mx-auto md:px-10 py-10 text-base-content", [e.background ?? "bg-base-200", e.color ?? "text-base-content"]])
|
|
1745
1948
|
}, [
|
|
1746
|
-
|
|
1747
|
-
(
|
|
1748
|
-
class:
|
|
1949
|
+
o("footer", Pl, [
|
|
1950
|
+
(n(!0), a(B, null, A(c.items, (s) => (n(), a("nav", {
|
|
1951
|
+
class: V([{ "hidden sm:grid": e.collapseOnMobile }])
|
|
1749
1952
|
}, [
|
|
1750
|
-
|
|
1751
|
-
(
|
|
1953
|
+
o("h6", El, C(s.title), 1),
|
|
1954
|
+
(n(!0), a(B, null, A(s.items, (l) => (n(), a("a", {
|
|
1752
1955
|
class: "link link-hover",
|
|
1753
|
-
href:
|
|
1754
|
-
},
|
|
1956
|
+
href: l.link
|
|
1957
|
+
}, C(l.text), 9, Ll))), 256))
|
|
1755
1958
|
], 2))), 256)),
|
|
1756
|
-
e.collapseOnMobile ? (
|
|
1757
|
-
(
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
(
|
|
1763
|
-
|
|
1959
|
+
e.collapseOnMobile ? (n(), a("nav", Ul, [
|
|
1960
|
+
(n(!0), a(B, null, A(c.items, (s) => (n(), a("ul", Rl, [
|
|
1961
|
+
o("div", Nl, [
|
|
1962
|
+
o("div", jl, C(s.title), 1),
|
|
1963
|
+
o("div", Fl, [
|
|
1964
|
+
o("ul", ql, [
|
|
1965
|
+
(n(!0), a(B, null, A(s.items, (l) => (n(), a("li", Hl, [
|
|
1966
|
+
o("a", {
|
|
1764
1967
|
class: "w-full font-medium link link-hover",
|
|
1765
|
-
href:
|
|
1766
|
-
},
|
|
1968
|
+
href: l.link
|
|
1969
|
+
}, C(l.text), 9, Wl)
|
|
1767
1970
|
]))), 256))
|
|
1768
1971
|
])
|
|
1769
1972
|
])
|
|
1770
1973
|
])
|
|
1771
1974
|
]))), 256))
|
|
1772
|
-
])) :
|
|
1773
|
-
|
|
1774
|
-
|
|
1975
|
+
])) : O("", !0),
|
|
1976
|
+
o("aside", Kl, [
|
|
1977
|
+
T(e.$slots, "default")
|
|
1775
1978
|
])
|
|
1776
1979
|
])
|
|
1777
1980
|
], 2));
|
|
1778
1981
|
}
|
|
1779
|
-
}),
|
|
1780
|
-
function
|
|
1781
|
-
return
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1982
|
+
}), Yl = {}, Jl = { class: "min-h-40 container hero" }, Gl = { class: "px-0! text-center hero-content" }, Xl = { class: "mt-9 text-4xl" };
|
|
1983
|
+
function Zl(i, c) {
|
|
1984
|
+
return n(), a("div", Jl, [
|
|
1985
|
+
o("div", Gl, [
|
|
1986
|
+
o("div", null, [
|
|
1987
|
+
o("h1", Xl, [
|
|
1988
|
+
T(i.$slots, "title", {}, () => [
|
|
1989
|
+
c[0] || (c[0] = ke("hero title"))
|
|
1787
1990
|
])
|
|
1788
1991
|
]),
|
|
1789
|
-
|
|
1790
|
-
|
|
1992
|
+
o("p", null, [
|
|
1993
|
+
T(i.$slots, "description", { class: "py-9" })
|
|
1791
1994
|
]),
|
|
1792
|
-
|
|
1793
|
-
|
|
1995
|
+
T(i.$slots, "call-to-action-block", { class: "max-w-full" }, () => [
|
|
1996
|
+
c[1] || (c[1] = o("button", { class: "btn btn-primary" }, "Call to action", -1))
|
|
1794
1997
|
])
|
|
1795
1998
|
])
|
|
1796
1999
|
])
|
|
1797
2000
|
]);
|
|
1798
2001
|
}
|
|
1799
|
-
const
|
|
2002
|
+
const Vn = /* @__PURE__ */ te(Yl, [["render", Zl]]), Ql = { class: "flex flex-row place-content-center gap-4 categories" }, en = ["onClick"], Bn = /* @__PURE__ */ L({
|
|
1800
2003
|
__name: "categoryNavigation",
|
|
1801
2004
|
props: {
|
|
1802
2005
|
searchOptions: {},
|
|
1803
2006
|
currentCategory: {}
|
|
1804
2007
|
},
|
|
1805
2008
|
emits: ["update:currentCategory"],
|
|
1806
|
-
setup(i, { emit:
|
|
1807
|
-
const e = i, t =
|
|
1808
|
-
function l
|
|
1809
|
-
t("update:currentCategory",
|
|
2009
|
+
setup(i, { emit: c }) {
|
|
2010
|
+
const e = i, t = c;
|
|
2011
|
+
function s(l) {
|
|
2012
|
+
t("update:currentCategory", l);
|
|
1810
2013
|
}
|
|
1811
|
-
return (
|
|
1812
|
-
(
|
|
1813
|
-
key:
|
|
2014
|
+
return (l, r) => (n(), a("div", Ql, [
|
|
2015
|
+
(n(!0), a(B, null, A(e.searchOptions, (y) => (n(), a("div", {
|
|
2016
|
+
key: y.category
|
|
1814
2017
|
}, [
|
|
1815
|
-
|
|
1816
|
-
onClick: (
|
|
1817
|
-
class:
|
|
1818
|
-
},
|
|
2018
|
+
o("button", {
|
|
2019
|
+
onClick: (p) => s(y.category),
|
|
2020
|
+
class: V(["truncate btn btn-ghost", { "font-semibold": e.currentCategory === y.category }])
|
|
2021
|
+
}, C(y.category), 11, en)
|
|
1819
2022
|
]))), 128))
|
|
1820
2023
|
]));
|
|
1821
2024
|
}
|
|
1822
|
-
}),
|
|
2025
|
+
}), tn = { class: "md:flex hidden navbar-start" }, ln = { class: "md:flex justify-center items-center hidden navbar-center" }, nn = { class: "md:flex hidden navbar-end" }, an = { class: "navbar-bottom md:flex hidden" }, on = /* @__PURE__ */ L({
|
|
1823
2026
|
__name: "navigationBar",
|
|
1824
2027
|
props: {
|
|
1825
2028
|
isCollapsed: { type: Boolean, default: !0 }
|
|
1826
2029
|
},
|
|
1827
2030
|
setup(i) {
|
|
1828
|
-
const
|
|
1829
|
-
return (e, t) => (
|
|
1830
|
-
class:
|
|
2031
|
+
const c = i;
|
|
2032
|
+
return (e, t) => (n(), a("nav", {
|
|
2033
|
+
class: V(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar", c.isCollapsed ? "collapsed" : ""])
|
|
1831
2034
|
}, [
|
|
1832
|
-
|
|
1833
|
-
|
|
2035
|
+
o("div", tn, [
|
|
2036
|
+
T(e.$slots, "start", {}, void 0, !0)
|
|
1834
2037
|
]),
|
|
1835
|
-
|
|
1836
|
-
|
|
2038
|
+
o("div", ln, [
|
|
2039
|
+
T(e.$slots, "center", {}, void 0, !0)
|
|
1837
2040
|
]),
|
|
1838
|
-
|
|
1839
|
-
|
|
2041
|
+
o("div", nn, [
|
|
2042
|
+
T(e.$slots, "end", {}, void 0, !0)
|
|
1840
2043
|
]),
|
|
1841
|
-
|
|
1842
|
-
|
|
2044
|
+
o("div", an, [
|
|
2045
|
+
T(e.$slots, "bottom", {}, void 0, !0)
|
|
1843
2046
|
])
|
|
1844
2047
|
], 2));
|
|
1845
2048
|
}
|
|
1846
|
-
}),
|
|
2049
|
+
}), On = /* @__PURE__ */ te(on, [["__scopeId", "data-v-8ddb2b45"]]), sn = {
|
|
1847
2050
|
key: 0,
|
|
1848
2051
|
class: "hidden top-4 right-0 absolute md:flex gap-4"
|
|
1849
|
-
},
|
|
2052
|
+
}, rn = ["onClick", "aria-selected"], un = {
|
|
1850
2053
|
key: 0,
|
|
1851
2054
|
role: "tabpanel",
|
|
1852
2055
|
class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full overflow-x-auto tab-content"
|
|
1853
|
-
},
|
|
2056
|
+
}, dn = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, zn = /* @__PURE__ */ L({
|
|
1854
2057
|
__name: "tab",
|
|
1855
2058
|
props: {
|
|
1856
2059
|
items: {},
|
|
@@ -1859,82 +2062,82 @@ const xa = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row
|
|
|
1859
2062
|
buttonOnlyMode: { type: Boolean, default: !1 }
|
|
1860
2063
|
},
|
|
1861
2064
|
emits: ["tab-changed"],
|
|
1862
|
-
setup(i, { emit:
|
|
1863
|
-
const e = i, t =
|
|
1864
|
-
function
|
|
1865
|
-
t.value =
|
|
2065
|
+
setup(i, { emit: c }) {
|
|
2066
|
+
const e = i, t = x(e.items[0]), s = c;
|
|
2067
|
+
function l(p) {
|
|
2068
|
+
t.value = p, s("tab-changed", p);
|
|
1866
2069
|
}
|
|
1867
2070
|
function r() {
|
|
1868
|
-
const
|
|
1869
|
-
|
|
2071
|
+
const f = (e.items.indexOf(t.value) + 1) % e.items.length;
|
|
2072
|
+
l(e.items[f]);
|
|
1870
2073
|
}
|
|
1871
|
-
function
|
|
1872
|
-
const
|
|
1873
|
-
|
|
2074
|
+
function y() {
|
|
2075
|
+
const f = (e.items.indexOf(t.value) - 1 + e.items.length) % e.items.length;
|
|
2076
|
+
l(e.items[f]);
|
|
1874
2077
|
}
|
|
1875
|
-
return
|
|
1876
|
-
e.items &&
|
|
1877
|
-
}),
|
|
2078
|
+
return Q(() => {
|
|
2079
|
+
e.items && l(e.items[0]);
|
|
2080
|
+
}), $e(() => {
|
|
1878
2081
|
e.rotateTabsAfter && e.rotateTabsAfter > 0 && setInterval(() => {
|
|
1879
2082
|
r();
|
|
1880
2083
|
}, e.rotateTabsAfter * 1e3);
|
|
1881
|
-
}), (
|
|
1882
|
-
|
|
2084
|
+
}), (p, f) => (n(), a(B, null, [
|
|
2085
|
+
o("div", {
|
|
1883
2086
|
role: "tablist",
|
|
1884
|
-
class:
|
|
2087
|
+
class: V(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto": p.buttonOnlyMode }])
|
|
1885
2088
|
}, [
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
onClick:
|
|
2089
|
+
p.withControlls ? (n(), a("div", sn, [
|
|
2090
|
+
o("button", {
|
|
2091
|
+
onClick: f[0] || (f[0] = ($) => y()),
|
|
1889
2092
|
class: "cursor-pointer"
|
|
1890
2093
|
}, "Previous"),
|
|
1891
|
-
|
|
1892
|
-
onClick:
|
|
2094
|
+
o("button", {
|
|
2095
|
+
onClick: f[1] || (f[1] = ($) => r()),
|
|
1893
2096
|
class: "text-primary cursor-pointer"
|
|
1894
2097
|
}, "Next")
|
|
1895
|
-
])) :
|
|
1896
|
-
(
|
|
1897
|
-
|
|
2098
|
+
])) : O("", !0),
|
|
2099
|
+
(n(!0), a(B, null, A(p.items, ($) => (n(), a(B, null, [
|
|
2100
|
+
o("a", {
|
|
1898
2101
|
type: "button",
|
|
1899
2102
|
role: "tab",
|
|
1900
|
-
class:
|
|
1901
|
-
onClick: (
|
|
1902
|
-
"aria-selected": t.value ==
|
|
1903
|
-
},
|
|
1904
|
-
|
|
1905
|
-
|
|
2103
|
+
class: V(["min-w-max tab", $ === t.value ? "bg-primary text-base-100" : ""]),
|
|
2104
|
+
onClick: (U) => l($),
|
|
2105
|
+
"aria-selected": t.value == $
|
|
2106
|
+
}, C($), 11, rn),
|
|
2107
|
+
p.buttonOnlyMode ? O("", !0) : (n(), a("div", un, [
|
|
2108
|
+
T(p.$slots, `${$}-tab`)
|
|
1906
2109
|
]))
|
|
1907
2110
|
], 64))), 256))
|
|
1908
2111
|
], 2),
|
|
1909
|
-
|
|
1910
|
-
|
|
2112
|
+
o("div", dn, [
|
|
2113
|
+
T(p.$slots, "default")
|
|
1911
2114
|
])
|
|
1912
2115
|
], 64));
|
|
1913
2116
|
}
|
|
1914
2117
|
});
|
|
1915
2118
|
export {
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
2119
|
+
hn as Accordion,
|
|
2120
|
+
_n as AdvancedSearch,
|
|
2121
|
+
bn as Avatar,
|
|
2122
|
+
yn as Badge,
|
|
2123
|
+
pn as ButtonComponent,
|
|
2124
|
+
wn as Card,
|
|
2125
|
+
kn as Carousel,
|
|
2126
|
+
$n as CarouselItem,
|
|
2127
|
+
Bn as CategoryNavigation,
|
|
2128
|
+
il as DatetimePicker,
|
|
2129
|
+
vn as Dropdown,
|
|
2130
|
+
Dn as FilterableSelect,
|
|
2131
|
+
Tn as Footer,
|
|
2132
|
+
Vn as Hero,
|
|
2133
|
+
Mn as InputField,
|
|
2134
|
+
In as Loader,
|
|
2135
|
+
fn as Modal,
|
|
2136
|
+
On as NavigationBar,
|
|
2137
|
+
Sn as Rating,
|
|
2138
|
+
Cn as Selector,
|
|
2139
|
+
mn as Swap,
|
|
2140
|
+
zn as Tab,
|
|
2141
|
+
xn as TagInput,
|
|
2142
|
+
gn as ThemeController
|
|
1940
2143
|
};
|