manolis-ui 0.6.12 → 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 +1098 -926
- package/dist/manolis-ui.umd.cjs +10 -10
- package/dist/select-Cz4vf_YE.js +4 -0
- package/dist/style.css +6 -12
- 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,39 +1035,39 @@ 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
|
-
|
|
1040
|
+
H(
|
|
873
1041
|
() => e.range,
|
|
874
|
-
(
|
|
875
|
-
|
|
1042
|
+
(m) => {
|
|
1043
|
+
m ? (l.value = { start: null, end: null }, r.value = { start: null, end: null }) : (l.value = null, r.value = null);
|
|
876
1044
|
}
|
|
877
1045
|
);
|
|
878
|
-
const t =
|
|
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(
|
|
879
1047
|
(/* @__PURE__ */ new Date()).toLocaleString("default", { month: "long" })
|
|
880
|
-
),
|
|
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(
|
|
881
1049
|
() => e.mode === "date" || e.mode === "datetime"
|
|
882
|
-
),
|
|
1050
|
+
), _ = E(
|
|
883
1051
|
() => e.mode === "time" || e.mode === "datetime"
|
|
884
1052
|
);
|
|
885
|
-
|
|
886
|
-
() => new Date(
|
|
1053
|
+
E(
|
|
1054
|
+
() => new Date(p.value, M.value)
|
|
887
1055
|
);
|
|
888
|
-
const
|
|
889
|
-
() => new Date(
|
|
890
|
-
),
|
|
891
|
-
const
|
|
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();
|
|
892
1060
|
return Array.from(
|
|
893
|
-
{ length:
|
|
894
|
-
(
|
|
1061
|
+
{ length: m },
|
|
1062
|
+
(b, u) => new Date(p.value, M.value, u + 1)
|
|
895
1063
|
);
|
|
896
|
-
}),
|
|
897
|
-
() => Array.from({ length:
|
|
898
|
-
),
|
|
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(
|
|
899
1067
|
() => typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
900
1068
|
navigator.userAgent
|
|
901
1069
|
)
|
|
902
|
-
),
|
|
1070
|
+
), h = [
|
|
903
1071
|
"January",
|
|
904
1072
|
"February",
|
|
905
1073
|
"March",
|
|
@@ -912,118 +1080,118 @@ const Qe = le("SunIcon", [
|
|
|
912
1080
|
"October",
|
|
913
1081
|
"November",
|
|
914
1082
|
"December"
|
|
915
|
-
],
|
|
916
|
-
const
|
|
917
|
-
return Array.from({ length: 100 }, (
|
|
918
|
-
}),
|
|
919
|
-
if (!
|
|
920
|
-
if (e.range &&
|
|
921
|
-
const
|
|
922
|
-
return `${
|
|
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}`;
|
|
923
1091
|
}
|
|
924
|
-
return !e.range &&
|
|
925
|
-
}),
|
|
926
|
-
if (!
|
|
927
|
-
const
|
|
928
|
-
var
|
|
929
|
-
const u = ((
|
|
930
|
-
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")}`;
|
|
931
1099
|
};
|
|
932
|
-
return e.range ? `${
|
|
933
|
-
}),
|
|
934
|
-
const
|
|
935
|
-
return `${
|
|
936
|
-
}),
|
|
937
|
-
j(),
|
|
938
|
-
},
|
|
939
|
-
|
|
940
|
-
},
|
|
941
|
-
e.range ?
|
|
942
|
-
},
|
|
943
|
-
|
|
944
|
-
const
|
|
945
|
-
return
|
|
946
|
-
}, Ie = (
|
|
947
|
-
if (
|
|
948
|
-
const
|
|
949
|
-
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;
|
|
950
1118
|
}
|
|
951
1119
|
return !1;
|
|
952
|
-
},
|
|
953
|
-
let
|
|
954
|
-
|
|
1120
|
+
}, Be = () => {
|
|
1121
|
+
let m = M.value - 1;
|
|
1122
|
+
m < 0 && (m = 11, p.value--), y.value = h[m], j();
|
|
955
1123
|
}, Oe = () => {
|
|
956
|
-
let
|
|
957
|
-
|
|
958
|
-
},
|
|
959
|
-
|
|
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();
|
|
960
1128
|
}, j = () => {
|
|
961
|
-
let
|
|
962
|
-
const
|
|
1129
|
+
let m = {};
|
|
1130
|
+
const b = (u, X, re) => {
|
|
963
1131
|
u instanceof Date && !isNaN(u) || (u = /* @__PURE__ */ new Date());
|
|
964
|
-
const
|
|
965
|
-
return
|
|
1132
|
+
const le = new Date(u);
|
|
1133
|
+
return le.setUTCHours(X, re, 0, 0), le.toISOString();
|
|
966
1134
|
};
|
|
967
|
-
e.range ? (
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
),
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
)) :
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
), 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);
|
|
980
1148
|
};
|
|
981
|
-
return
|
|
982
|
-
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 = {
|
|
983
1151
|
start: new Date(e.initialDate.start),
|
|
984
1152
|
end: new Date(e.initialDate.end)
|
|
985
|
-
} : e.initialDate.start && (
|
|
986
|
-
}), 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", {
|
|
987
1155
|
class: "inline-block relative w-full lg:w-[360px]",
|
|
988
1156
|
ref_key: "pickerContainer",
|
|
989
|
-
ref:
|
|
1157
|
+
ref: U
|
|
990
1158
|
}, [
|
|
991
|
-
|
|
1159
|
+
o("div", {
|
|
992
1160
|
class: "flex items-center gap-2 cursor-pointer",
|
|
993
|
-
onClick:
|
|
1161
|
+
onClick: se
|
|
994
1162
|
}, [
|
|
995
|
-
i.popup ?
|
|
996
|
-
|
|
1163
|
+
i.popup ? T(m.$slots, "default", { key: 0 }, () => [
|
|
1164
|
+
o("input", {
|
|
997
1165
|
type: "text",
|
|
998
1166
|
class: "input-bordered w-full cursor-pointer input",
|
|
999
1167
|
placeholder: i.placeholder,
|
|
1000
|
-
value:
|
|
1168
|
+
value: J.value,
|
|
1001
1169
|
readonly: "",
|
|
1002
|
-
id:
|
|
1003
|
-
}, null, 8,
|
|
1004
|
-
|
|
1005
|
-
|
|
1170
|
+
id: R.value
|
|
1171
|
+
}, null, 8, Ut),
|
|
1172
|
+
o("button", Rt, [
|
|
1173
|
+
ae(F(Xe))
|
|
1006
1174
|
])
|
|
1007
|
-
], !0) :
|
|
1175
|
+
], !0) : O("", !0)
|
|
1008
1176
|
]),
|
|
1009
|
-
|
|
1177
|
+
s.value || !i.popup ? (n(), a("div", {
|
|
1010
1178
|
key: 0,
|
|
1011
|
-
class:
|
|
1012
|
-
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
|
|
1013
1181
|
}, [
|
|
1014
|
-
|
|
1015
|
-
|
|
1182
|
+
k.value ? (n(), a("div", jt, [
|
|
1183
|
+
o("button", {
|
|
1016
1184
|
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
1017
|
-
onClick:
|
|
1018
|
-
},
|
|
1019
|
-
|
|
1185
|
+
onClick: Be
|
|
1186
|
+
}, b[11] || (b[11] = [
|
|
1187
|
+
o("svg", {
|
|
1020
1188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1021
1189
|
class: "w-4 h-4",
|
|
1022
1190
|
fill: "none",
|
|
1023
1191
|
viewBox: "0 0 24 24",
|
|
1024
1192
|
stroke: "currentColor"
|
|
1025
1193
|
}, [
|
|
1026
|
-
|
|
1194
|
+
o("path", {
|
|
1027
1195
|
"stroke-linecap": "round",
|
|
1028
1196
|
"stroke-linejoin": "round",
|
|
1029
1197
|
"stroke-width": "2",
|
|
@@ -1031,42 +1199,42 @@ const Qe = le("SunIcon", [
|
|
|
1031
1199
|
})
|
|
1032
1200
|
], -1)
|
|
1033
1201
|
])),
|
|
1034
|
-
|
|
1202
|
+
q(o("select", {
|
|
1035
1203
|
class: "border-none w-fit select",
|
|
1036
|
-
"onUpdate:modelValue":
|
|
1204
|
+
"onUpdate:modelValue": b[0] || (b[0] = (u) => y.value = u),
|
|
1037
1205
|
onChange: j
|
|
1038
1206
|
}, [
|
|
1039
|
-
(
|
|
1040
|
-
key:
|
|
1207
|
+
(n(), a(B, null, A(h, (u, X) => o("option", {
|
|
1208
|
+
key: X,
|
|
1041
1209
|
value: u
|
|
1042
|
-
},
|
|
1210
|
+
}, C(u), 9, Ft)), 64))
|
|
1043
1211
|
], 544), [
|
|
1044
|
-
[
|
|
1212
|
+
[Z, y.value]
|
|
1045
1213
|
]),
|
|
1046
|
-
|
|
1214
|
+
q(o("select", {
|
|
1047
1215
|
class: "border-none w-24 select",
|
|
1048
|
-
"onUpdate:modelValue":
|
|
1216
|
+
"onUpdate:modelValue": b[1] || (b[1] = (u) => p.value = u),
|
|
1049
1217
|
onChange: j
|
|
1050
1218
|
}, [
|
|
1051
|
-
(
|
|
1219
|
+
(n(!0), a(B, null, A(g.value, (u) => (n(), a("option", {
|
|
1052
1220
|
key: u,
|
|
1053
1221
|
value: u
|
|
1054
|
-
},
|
|
1222
|
+
}, C(u), 9, qt))), 128))
|
|
1055
1223
|
], 544), [
|
|
1056
|
-
[
|
|
1224
|
+
[Z, p.value]
|
|
1057
1225
|
]),
|
|
1058
|
-
|
|
1226
|
+
o("button", {
|
|
1059
1227
|
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
1060
1228
|
onClick: Oe
|
|
1061
|
-
},
|
|
1062
|
-
|
|
1229
|
+
}, b[12] || (b[12] = [
|
|
1230
|
+
o("svg", {
|
|
1063
1231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1064
1232
|
class: "w-4 h-4",
|
|
1065
1233
|
fill: "none",
|
|
1066
1234
|
viewBox: "0 0 24 24",
|
|
1067
1235
|
stroke: "currentColor"
|
|
1068
1236
|
}, [
|
|
1069
|
-
|
|
1237
|
+
o("path", {
|
|
1070
1238
|
"stroke-linecap": "round",
|
|
1071
1239
|
"stroke-linejoin": "round",
|
|
1072
1240
|
"stroke-width": "2",
|
|
@@ -1074,190 +1242,190 @@ const Qe = le("SunIcon", [
|
|
|
1074
1242
|
})
|
|
1075
1243
|
], -1)
|
|
1076
1244
|
]))
|
|
1077
|
-
])) :
|
|
1078
|
-
|
|
1079
|
-
(
|
|
1245
|
+
])) : O("", !0),
|
|
1246
|
+
k.value ? (n(), a("div", Ht, [
|
|
1247
|
+
(n(), a(B, null, A(z, (u) => o("div", {
|
|
1080
1248
|
key: u,
|
|
1081
1249
|
class: "text-center"
|
|
1082
|
-
},
|
|
1083
|
-
(
|
|
1250
|
+
}, C(u), 1)), 64)),
|
|
1251
|
+
(n(!0), a(B, null, A(W.value, (u) => (n(), a("div", {
|
|
1084
1252
|
key: u,
|
|
1085
1253
|
class: "text-center"
|
|
1086
1254
|
}))), 128)),
|
|
1087
|
-
(
|
|
1255
|
+
(n(!0), a(B, null, A(K.value, (u) => (n(), a("div", {
|
|
1088
1256
|
key: u,
|
|
1089
|
-
class:
|
|
1090
|
-
"bg-primary text-primary-content":
|
|
1091
|
-
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),
|
|
1092
1260
|
"range-start bg-primary text-primary-content": Ie(u),
|
|
1093
|
-
"range-end bg-primary text-primary-content":
|
|
1094
|
-
"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)
|
|
1095
1263
|
}]),
|
|
1096
|
-
onClick: (
|
|
1097
|
-
},
|
|
1098
|
-
])) :
|
|
1099
|
-
|
|
1100
|
-
e.range ?
|
|
1101
|
-
e.range ? (
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
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", {
|
|
1105
1273
|
key: 0,
|
|
1106
1274
|
type: "time",
|
|
1107
1275
|
class: "input-bordered w-full input",
|
|
1108
|
-
"onUpdate:modelValue":
|
|
1276
|
+
"onUpdate:modelValue": b[5] || (b[5] = (u) => r.value.start = u),
|
|
1109
1277
|
onChange: j
|
|
1110
1278
|
}, null, 544)), [
|
|
1111
|
-
[
|
|
1112
|
-
]) : (
|
|
1113
|
-
|
|
1279
|
+
[ne, r.value.start]
|
|
1280
|
+
]) : (n(), a("div", el, [
|
|
1281
|
+
q(o("select", {
|
|
1114
1282
|
class: "w-full select-bordered select",
|
|
1115
|
-
"onUpdate:modelValue":
|
|
1283
|
+
"onUpdate:modelValue": b[6] || (b[6] = (u) => f.value.start = u),
|
|
1116
1284
|
onChange: j
|
|
1117
1285
|
}, [
|
|
1118
|
-
(
|
|
1286
|
+
(n(!0), a(B, null, A(F(d), (u) => (n(), a("option", {
|
|
1119
1287
|
key: u,
|
|
1120
1288
|
value: u
|
|
1121
|
-
},
|
|
1289
|
+
}, C(u.toString().padStart(2, "0")), 9, tl))), 128))
|
|
1122
1290
|
], 544), [
|
|
1123
1291
|
[
|
|
1124
|
-
|
|
1125
|
-
|
|
1292
|
+
Z,
|
|
1293
|
+
f.value.start,
|
|
1126
1294
|
void 0,
|
|
1127
1295
|
{ number: !0 }
|
|
1128
1296
|
]
|
|
1129
1297
|
]),
|
|
1130
|
-
|
|
1298
|
+
q(o("select", {
|
|
1131
1299
|
class: "w-full select-bordered select",
|
|
1132
|
-
"onUpdate:modelValue":
|
|
1300
|
+
"onUpdate:modelValue": b[7] || (b[7] = (u) => $.value.start = u),
|
|
1133
1301
|
onChange: j
|
|
1134
1302
|
}, [
|
|
1135
|
-
(
|
|
1303
|
+
(n(!0), a(B, null, A(F(w), (u) => (n(), a("option", {
|
|
1136
1304
|
key: u,
|
|
1137
1305
|
value: u
|
|
1138
|
-
},
|
|
1306
|
+
}, C(u.toString().padStart(2, "0")), 9, ll))), 128))
|
|
1139
1307
|
], 544), [
|
|
1140
1308
|
[
|
|
1141
|
-
|
|
1142
|
-
|
|
1309
|
+
Z,
|
|
1310
|
+
$.value.start,
|
|
1143
1311
|
void 0,
|
|
1144
1312
|
{ number: !0 }
|
|
1145
1313
|
]
|
|
1146
1314
|
])
|
|
1147
1315
|
]))
|
|
1148
1316
|
]),
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1317
|
+
o("div", null, [
|
|
1318
|
+
b[14] || (b[14] = o("p", { class: "font-bold" }, "End Time", -1)),
|
|
1319
|
+
S.value ? q((n(), a("input", {
|
|
1152
1320
|
key: 0,
|
|
1153
1321
|
type: "time",
|
|
1154
1322
|
class: "input-bordered w-full input",
|
|
1155
|
-
"onUpdate:modelValue":
|
|
1323
|
+
"onUpdate:modelValue": b[8] || (b[8] = (u) => r.value.end = u),
|
|
1156
1324
|
onChange: j
|
|
1157
1325
|
}, null, 544)), [
|
|
1158
|
-
[
|
|
1159
|
-
]) : (
|
|
1160
|
-
|
|
1326
|
+
[ne, r.value.end]
|
|
1327
|
+
]) : (n(), a("div", nl, [
|
|
1328
|
+
q(o("select", {
|
|
1161
1329
|
class: "w-full select-bordered select",
|
|
1162
|
-
"onUpdate:modelValue":
|
|
1330
|
+
"onUpdate:modelValue": b[9] || (b[9] = (u) => f.value.end = u),
|
|
1163
1331
|
onChange: j
|
|
1164
1332
|
}, [
|
|
1165
|
-
(
|
|
1333
|
+
(n(!0), a(B, null, A(F(d), (u) => (n(), a("option", {
|
|
1166
1334
|
key: u,
|
|
1167
1335
|
value: u
|
|
1168
|
-
},
|
|
1336
|
+
}, C(u.toString().padStart(2, "0")), 9, al))), 128))
|
|
1169
1337
|
], 544), [
|
|
1170
1338
|
[
|
|
1171
|
-
|
|
1172
|
-
|
|
1339
|
+
Z,
|
|
1340
|
+
f.value.end,
|
|
1173
1341
|
void 0,
|
|
1174
1342
|
{ number: !0 }
|
|
1175
1343
|
]
|
|
1176
1344
|
]),
|
|
1177
|
-
|
|
1345
|
+
q(o("select", {
|
|
1178
1346
|
class: "w-full select-bordered select",
|
|
1179
|
-
"onUpdate:modelValue":
|
|
1347
|
+
"onUpdate:modelValue": b[10] || (b[10] = (u) => $.value.end = u),
|
|
1180
1348
|
onChange: j
|
|
1181
1349
|
}, [
|
|
1182
|
-
(
|
|
1350
|
+
(n(!0), a(B, null, A(F(w), (u) => (n(), a("option", {
|
|
1183
1351
|
key: u,
|
|
1184
1352
|
value: u
|
|
1185
|
-
},
|
|
1353
|
+
}, C(u.toString().padStart(2, "0")), 9, ol))), 128))
|
|
1186
1354
|
], 544), [
|
|
1187
1355
|
[
|
|
1188
|
-
|
|
1189
|
-
|
|
1356
|
+
Z,
|
|
1357
|
+
$.value.end,
|
|
1190
1358
|
void 0,
|
|
1191
1359
|
{ number: !0 }
|
|
1192
1360
|
]
|
|
1193
1361
|
])
|
|
1194
1362
|
]))
|
|
1195
1363
|
])
|
|
1196
|
-
])) : (
|
|
1197
|
-
|
|
1364
|
+
])) : (n(), a("div", Jt, [
|
|
1365
|
+
S.value ? q((n(), a("input", {
|
|
1198
1366
|
key: 0,
|
|
1199
1367
|
type: "time",
|
|
1200
1368
|
class: "input-bordered w-full input",
|
|
1201
|
-
"onUpdate:modelValue":
|
|
1369
|
+
"onUpdate:modelValue": b[2] || (b[2] = (u) => r.value = u),
|
|
1202
1370
|
onChange: j
|
|
1203
1371
|
}, null, 544)), [
|
|
1204
|
-
[
|
|
1205
|
-
]) : (
|
|
1206
|
-
|
|
1372
|
+
[ne, r.value]
|
|
1373
|
+
]) : (n(), a("div", Gt, [
|
|
1374
|
+
q(o("select", {
|
|
1207
1375
|
class: "w-full select-bordered select",
|
|
1208
|
-
"onUpdate:modelValue":
|
|
1376
|
+
"onUpdate:modelValue": b[3] || (b[3] = (u) => f.value = u),
|
|
1209
1377
|
onChange: j
|
|
1210
1378
|
}, [
|
|
1211
|
-
(
|
|
1379
|
+
(n(!0), a(B, null, A(F(d), (u) => (n(), a("option", {
|
|
1212
1380
|
key: u,
|
|
1213
1381
|
value: u
|
|
1214
|
-
},
|
|
1382
|
+
}, C(u.toString().padStart(2, "0")), 9, Xt))), 128))
|
|
1215
1383
|
], 544), [
|
|
1216
1384
|
[
|
|
1217
|
-
|
|
1218
|
-
|
|
1385
|
+
Z,
|
|
1386
|
+
f.value,
|
|
1219
1387
|
void 0,
|
|
1220
1388
|
{ number: !0 }
|
|
1221
1389
|
]
|
|
1222
1390
|
]),
|
|
1223
|
-
|
|
1391
|
+
q(o("select", {
|
|
1224
1392
|
class: "w-full select-bordered select",
|
|
1225
|
-
"onUpdate:modelValue":
|
|
1393
|
+
"onUpdate:modelValue": b[4] || (b[4] = (u) => $.value = u),
|
|
1226
1394
|
onChange: j
|
|
1227
1395
|
}, [
|
|
1228
|
-
(
|
|
1396
|
+
(n(!0), a(B, null, A(F(w), (u) => (n(), a("option", {
|
|
1229
1397
|
key: u,
|
|
1230
1398
|
value: u
|
|
1231
|
-
},
|
|
1399
|
+
}, C(u.toString().padStart(2, "0")), 9, Zt))), 128))
|
|
1232
1400
|
], 544), [
|
|
1233
1401
|
[
|
|
1234
|
-
|
|
1235
|
-
|
|
1402
|
+
Z,
|
|
1403
|
+
$.value,
|
|
1236
1404
|
void 0,
|
|
1237
1405
|
{ number: !0 }
|
|
1238
1406
|
]
|
|
1239
1407
|
])
|
|
1240
1408
|
]))
|
|
1241
1409
|
]))
|
|
1242
|
-
])) :
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
class:
|
|
1246
|
-
onClick:
|
|
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
|
|
1247
1415
|
}, " Clear ", 2),
|
|
1248
|
-
i.popup ? (
|
|
1416
|
+
i.popup ? (n(), a("button", {
|
|
1249
1417
|
key: 0,
|
|
1250
1418
|
class: "btn btn-primary btn-wide",
|
|
1251
|
-
onClick:
|
|
1252
|
-
}, " Close ")) :
|
|
1419
|
+
onClick: G
|
|
1420
|
+
}, " Close ")) : O("", !0)
|
|
1253
1421
|
])
|
|
1254
|
-
], 10,
|
|
1422
|
+
], 10, Nt)) : O("", !0)
|
|
1255
1423
|
], 512));
|
|
1256
1424
|
}
|
|
1257
|
-
},
|
|
1425
|
+
}, il = /* @__PURE__ */ te(rl, [["__scopeId", "data-v-661f4719"]]), ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1258
1426
|
__proto__: null,
|
|
1259
|
-
default:
|
|
1260
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1427
|
+
default: il
|
|
1428
|
+
}, Symbol.toStringTag, { value: "Module" })), dl = ["value", "checked", "onChange", "disabled"], Sn = /* @__PURE__ */ L({
|
|
1261
1429
|
__name: "rating",
|
|
1262
1430
|
props: {
|
|
1263
1431
|
initialRating: { default: 0 },
|
|
@@ -1270,56 +1438,56 @@ const Qe = le("SunIcon", [
|
|
|
1270
1438
|
gap: { default: 0 }
|
|
1271
1439
|
},
|
|
1272
1440
|
setup(i) {
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1275
|
-
() =>
|
|
1276
|
-
(
|
|
1277
|
-
e.value =
|
|
1441
|
+
const c = i, e = x(c.initialRating);
|
|
1442
|
+
H(
|
|
1443
|
+
() => c.initialRating,
|
|
1444
|
+
(s) => {
|
|
1445
|
+
e.value = s;
|
|
1278
1446
|
}
|
|
1279
1447
|
);
|
|
1280
|
-
const t = (
|
|
1281
|
-
e.value =
|
|
1448
|
+
const t = (s) => {
|
|
1449
|
+
e.value = s;
|
|
1282
1450
|
};
|
|
1283
|
-
return (
|
|
1284
|
-
class:
|
|
1451
|
+
return (s, l) => (n(), a("div", {
|
|
1452
|
+
class: V(["rating", [`rating-${c.size}`, { "rating-half": s.halfStars }]])
|
|
1285
1453
|
}, [
|
|
1286
|
-
(
|
|
1454
|
+
(n(!0), a(B, null, A(s.numberOfStars * (s.halfStars ? 2 : 1), (r) => (n(), a("input", {
|
|
1287
1455
|
key: r,
|
|
1288
1456
|
type: "radio",
|
|
1289
|
-
value:
|
|
1290
|
-
checked: e.value === (
|
|
1291
|
-
onChange: (
|
|
1292
|
-
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", [
|
|
1293
1461
|
{
|
|
1294
1462
|
// 'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
|
|
1295
|
-
"mask-half-1":
|
|
1296
|
-
"mask-half-2":
|
|
1297
|
-
"cursor-pointer":
|
|
1298
|
-
"cursor-default": !
|
|
1299
|
-
"mask-star":
|
|
1300
|
-
"mask-star-2":
|
|
1301
|
-
"mask-heart":
|
|
1302
|
-
"mask-hexagon":
|
|
1303
|
-
"mask-hexagon-2":
|
|
1304
|
-
"mask-decagon":
|
|
1305
|
-
"mask-pentagon":
|
|
1306
|
-
"mask-diamond":
|
|
1307
|
-
"mask-square":
|
|
1308
|
-
"mask-triangle":
|
|
1309
|
-
"mask-triangle-2":
|
|
1310
|
-
"mask-triangle-3":
|
|
1311
|
-
"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"
|
|
1312
1480
|
},
|
|
1313
|
-
e.value >= (
|
|
1481
|
+
e.value >= (s.halfStars ? r * 0.5 : r) ? c.color : ""
|
|
1314
1482
|
]]),
|
|
1315
|
-
style:
|
|
1316
|
-
marginRight:
|
|
1483
|
+
style: de({
|
|
1484
|
+
marginRight: s.halfStars && r % 2 === 0 ? `${c.gap}px` : s.halfStars ? "0" : `${c.gap}px`
|
|
1317
1485
|
}),
|
|
1318
|
-
disabled: !
|
|
1319
|
-
}, null, 46,
|
|
1486
|
+
disabled: !s.isInteractive
|
|
1487
|
+
}, null, 46, dl))), 128))
|
|
1320
1488
|
], 2));
|
|
1321
1489
|
}
|
|
1322
|
-
}),
|
|
1490
|
+
}), cl = { class: "badge" }, pl = ["onClick"], vl = { class: "opacity-75" }, fl = ["placeholder"], xn = /* @__PURE__ */ L({
|
|
1323
1491
|
__name: "taginput",
|
|
1324
1492
|
props: {
|
|
1325
1493
|
modelValue: {},
|
|
@@ -1328,61 +1496,61 @@ const Qe = le("SunIcon", [
|
|
|
1328
1496
|
class: {}
|
|
1329
1497
|
},
|
|
1330
1498
|
emits: ["update:modelValue"],
|
|
1331
|
-
setup(i, { emit:
|
|
1332
|
-
const e = i, t =
|
|
1333
|
-
const
|
|
1334
|
-
|
|
1335
|
-
},
|
|
1336
|
-
|
|
1337
|
-
},
|
|
1338
|
-
|
|
1339
|
-
},
|
|
1340
|
-
|
|
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();
|
|
1341
1509
|
};
|
|
1342
|
-
return
|
|
1343
|
-
|
|
1344
|
-
}), (
|
|
1345
|
-
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])
|
|
1346
1514
|
}, [
|
|
1347
|
-
(
|
|
1348
|
-
key:
|
|
1349
|
-
tag:
|
|
1515
|
+
(n(!0), a(B, null, A(s.value, (_) => T(v.$slots, "tag", {
|
|
1516
|
+
key: _,
|
|
1517
|
+
tag: _
|
|
1350
1518
|
}, () => [
|
|
1351
|
-
|
|
1352
|
-
|
|
1519
|
+
o("div", cl, [
|
|
1520
|
+
o("button", {
|
|
1353
1521
|
class: "!px-1 !py-0 h-fit font-bold cursor-pointer",
|
|
1354
|
-
onClick: (
|
|
1522
|
+
onClick: (M) => $(_),
|
|
1355
1523
|
"aria-label": "Remove tag"
|
|
1356
|
-
}, "X", 8,
|
|
1357
|
-
|
|
1524
|
+
}, "X", 8, pl),
|
|
1525
|
+
o("span", vl, C(_), 1)
|
|
1358
1526
|
])
|
|
1359
1527
|
])), 128)),
|
|
1360
|
-
|
|
1361
|
-
|
|
1528
|
+
T(v.$slots, "input", { showInput: p.value }, () => [
|
|
1529
|
+
p.value ? q((n(), a("input", {
|
|
1362
1530
|
key: 0,
|
|
1363
1531
|
ref_key: "inputRef",
|
|
1364
1532
|
ref: r,
|
|
1365
|
-
"onUpdate:modelValue":
|
|
1533
|
+
"onUpdate:modelValue": k[0] || (k[0] = (_) => y.value = _),
|
|
1366
1534
|
type: "text",
|
|
1367
|
-
placeholder:
|
|
1535
|
+
placeholder: v.placeholder || "Type here",
|
|
1368
1536
|
class: "h-full input input-ghost",
|
|
1369
|
-
onKeydown:
|
|
1537
|
+
onKeydown: R,
|
|
1370
1538
|
"aria-label": "Add tags"
|
|
1371
|
-
}, null, 40,
|
|
1372
|
-
[
|
|
1373
|
-
]) :
|
|
1539
|
+
}, null, 40, fl)), [
|
|
1540
|
+
[ne, y.value]
|
|
1541
|
+
]) : O("", !0)
|
|
1374
1542
|
])
|
|
1375
1543
|
], 2));
|
|
1376
1544
|
}
|
|
1377
|
-
}),
|
|
1545
|
+
}), ml = { class: "w-full max-w-xs form-control" }, gl = {
|
|
1378
1546
|
key: 0,
|
|
1379
1547
|
class: "label"
|
|
1380
|
-
},
|
|
1548
|
+
}, hl = { class: "label-text" }, bl = ["value"], yl = {
|
|
1381
1549
|
key: 0,
|
|
1382
1550
|
value: "",
|
|
1383
1551
|
disabled: "",
|
|
1384
1552
|
selected: ""
|
|
1385
|
-
},
|
|
1553
|
+
}, wl = ["value"], Cn = /* @__PURE__ */ L({
|
|
1386
1554
|
__name: "select",
|
|
1387
1555
|
props: {
|
|
1388
1556
|
options: {},
|
|
@@ -1391,45 +1559,45 @@ const Qe = le("SunIcon", [
|
|
|
1391
1559
|
modelValue: {}
|
|
1392
1560
|
},
|
|
1393
1561
|
emits: ["update:modelValue"],
|
|
1394
|
-
setup(i, { expose:
|
|
1562
|
+
setup(i, { expose: c, emit: e }) {
|
|
1395
1563
|
console.log(i.placeholder);
|
|
1396
|
-
const
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1564
|
+
const s = e, l = x(null), r = (p) => {
|
|
1565
|
+
const f = p.target;
|
|
1566
|
+
s("update:modelValue", f.value);
|
|
1399
1567
|
};
|
|
1400
|
-
return
|
|
1568
|
+
return c({
|
|
1401
1569
|
focusInput: () => {
|
|
1402
|
-
var
|
|
1403
|
-
console.log("select.vue: focusInput method called."), (
|
|
1570
|
+
var p;
|
|
1571
|
+
console.log("select.vue: focusInput method called."), (p = l.value) == null || p.focus();
|
|
1404
1572
|
}
|
|
1405
1573
|
// You can expose other properties or methods here if needed by the parent
|
|
1406
1574
|
// e.g., the current value: modelValue
|
|
1407
|
-
}), (
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
])) :
|
|
1411
|
-
|
|
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", {
|
|
1412
1580
|
ref_key: "selectElement",
|
|
1413
|
-
ref:
|
|
1581
|
+
ref: l,
|
|
1414
1582
|
class: "rounded-md w-full select-bordered select",
|
|
1415
|
-
value:
|
|
1583
|
+
value: p.modelValue,
|
|
1416
1584
|
onChange: r
|
|
1417
1585
|
}, [
|
|
1418
|
-
|
|
1419
|
-
(
|
|
1420
|
-
key:
|
|
1421
|
-
value:
|
|
1422
|
-
},
|
|
1423
|
-
], 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)
|
|
1424
1592
|
]));
|
|
1425
1593
|
}
|
|
1426
|
-
}),
|
|
1594
|
+
}), kl = {
|
|
1427
1595
|
key: 0,
|
|
1428
1596
|
class: "label"
|
|
1429
|
-
},
|
|
1597
|
+
}, $l = { class: "label-text" }, _l = ["onKeydown", "aria-expanded", "aria-activedescendant"], Sl = ["placeholder"], xl = {
|
|
1430
1598
|
class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
|
|
1431
1599
|
role: "listbox"
|
|
1432
|
-
},
|
|
1600
|
+
}, Cl = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, Dl = ["onMousedown", "id", "aria-selected"], Dn = {
|
|
1433
1601
|
__name: "filterableSelect",
|
|
1434
1602
|
props: {
|
|
1435
1603
|
// Array of options: [{ value: any, text: string }, ...]
|
|
@@ -1455,181 +1623,181 @@ const Qe = le("SunIcon", [
|
|
|
1455
1623
|
}
|
|
1456
1624
|
},
|
|
1457
1625
|
emits: ["update:modelValue", "select"],
|
|
1458
|
-
setup(i, { expose:
|
|
1459
|
-
const t = i,
|
|
1460
|
-
const
|
|
1461
|
-
return console.log("hasDefaultSlotContent computed:",
|
|
1462
|
-
}),
|
|
1463
|
-
console.log("openDropdown called"),
|
|
1464
|
-
},
|
|
1465
|
-
console.log("closeDropdown called"),
|
|
1466
|
-
},
|
|
1467
|
-
|
|
1468
|
-
},
|
|
1469
|
-
const
|
|
1470
|
-
return
|
|
1471
|
-
(
|
|
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)
|
|
1472
1640
|
);
|
|
1473
1641
|
});
|
|
1474
|
-
|
|
1642
|
+
H(
|
|
1475
1643
|
() => t.modelValue,
|
|
1476
|
-
(
|
|
1477
|
-
if (
|
|
1478
|
-
|
|
1644
|
+
(h, g) => {
|
|
1645
|
+
if (h !== g && _(), h == null)
|
|
1646
|
+
p.value = null, !f.value && !r.value && (y.value = "");
|
|
1479
1647
|
else {
|
|
1480
|
-
const
|
|
1481
|
-
|
|
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 = ""));
|
|
1482
1650
|
}
|
|
1483
1651
|
},
|
|
1484
1652
|
{ immediate: !0 }
|
|
1485
1653
|
// Run immediately on component mount
|
|
1486
1654
|
);
|
|
1487
|
-
const
|
|
1488
|
-
|
|
1489
|
-
},
|
|
1655
|
+
const N = (h) => {
|
|
1656
|
+
U.value && !U.value.contains(h.target) && _();
|
|
1657
|
+
}, K = () => {
|
|
1490
1658
|
setTimeout(() => {
|
|
1491
|
-
|
|
1659
|
+
U.value && !U.value.contains(document.activeElement) && _();
|
|
1492
1660
|
}, 100);
|
|
1493
1661
|
};
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
document.addEventListener("click",
|
|
1497
|
-
}, 0) : document.removeEventListener("click",
|
|
1498
|
-
}),
|
|
1499
|
-
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);
|
|
1500
1668
|
});
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1503
|
-
},
|
|
1504
|
-
|
|
1505
|
-
},
|
|
1506
|
-
|
|
1507
|
-
},
|
|
1508
|
-
if (!
|
|
1509
|
-
const
|
|
1510
|
-
(
|
|
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
|
|
1511
1679
|
);
|
|
1512
|
-
let
|
|
1513
|
-
if (
|
|
1514
|
-
|
|
1515
|
-
else if (
|
|
1516
|
-
|
|
1517
|
-
else if (
|
|
1518
|
-
|
|
1519
|
-
const
|
|
1520
|
-
(
|
|
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
|
|
1521
1689
|
);
|
|
1522
|
-
|
|
1690
|
+
D && W(D);
|
|
1523
1691
|
return;
|
|
1524
|
-
} else if (
|
|
1525
|
-
|
|
1692
|
+
} else if (h.key === "Escape") {
|
|
1693
|
+
h.preventDefault(), _(), R.value && R.value.focus();
|
|
1526
1694
|
return;
|
|
1527
1695
|
} else if (r.value)
|
|
1528
1696
|
return;
|
|
1529
|
-
if (
|
|
1530
|
-
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1533
|
-
|
|
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" });
|
|
1534
1702
|
});
|
|
1535
1703
|
}
|
|
1536
1704
|
};
|
|
1537
|
-
return
|
|
1538
|
-
|
|
1539
|
-
}),
|
|
1540
|
-
document.removeEventListener("click",
|
|
1541
|
-
}),
|
|
1542
|
-
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,
|
|
1543
1711
|
// Expose state
|
|
1544
|
-
selectedItem:
|
|
1712
|
+
selectedItem: p,
|
|
1545
1713
|
// Expose selected item
|
|
1546
|
-
openDropdown:
|
|
1714
|
+
openDropdown: k,
|
|
1547
1715
|
// Expose method to open
|
|
1548
|
-
closeDropdown:
|
|
1716
|
+
closeDropdown: _,
|
|
1549
1717
|
// Expose method to close
|
|
1550
|
-
toggleDropdown:
|
|
1718
|
+
toggleDropdown: M,
|
|
1551
1719
|
// Expose method to toggle
|
|
1552
|
-
selectItem:
|
|
1720
|
+
selectItem: W,
|
|
1553
1721
|
// Expose method to select an item programmatically
|
|
1554
|
-
filterText:
|
|
1722
|
+
filterText: y,
|
|
1555
1723
|
// Expose filter text (useful if parent controls filtering)
|
|
1556
1724
|
hasDefaultSlotContent: r
|
|
1557
1725
|
// Expose to know if the default slot is used
|
|
1558
|
-
}), (
|
|
1726
|
+
}), (h, g) => (n(), a("div", {
|
|
1559
1727
|
class: "relative w-full max-w-xs form-control",
|
|
1560
1728
|
ref_key: "componentRoot",
|
|
1561
|
-
ref:
|
|
1729
|
+
ref: U
|
|
1562
1730
|
}, [
|
|
1563
|
-
i.label ? (
|
|
1564
|
-
|
|
1565
|
-
])) :
|
|
1566
|
-
|
|
1567
|
-
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 }]),
|
|
1568
1736
|
tabindex: "0",
|
|
1569
|
-
onClick:
|
|
1737
|
+
onClick: k,
|
|
1570
1738
|
onKeydown: [
|
|
1571
|
-
|
|
1572
|
-
|
|
1739
|
+
he(ee(d, ["prevent"]), ["enter"]),
|
|
1740
|
+
he(ee(d, ["prevent"]), ["space"])
|
|
1573
1741
|
],
|
|
1574
|
-
onBlur:
|
|
1742
|
+
onBlur: K,
|
|
1575
1743
|
role: "combobox",
|
|
1576
1744
|
"aria-haspopup": "listbox",
|
|
1577
|
-
"aria-expanded":
|
|
1578
|
-
"aria-activedescendant":
|
|
1745
|
+
"aria-expanded": f.value,
|
|
1746
|
+
"aria-activedescendant": v.value,
|
|
1579
1747
|
"aria-autocomplete": "list",
|
|
1580
1748
|
ref_key: "activatorWrapper",
|
|
1581
|
-
ref:
|
|
1749
|
+
ref: R
|
|
1582
1750
|
}, [
|
|
1583
|
-
|
|
1584
|
-
r.value ?
|
|
1751
|
+
T(h.$slots, "default", {}, () => [
|
|
1752
|
+
r.value ? O("", !0) : q((n(), a("input", {
|
|
1585
1753
|
key: 0,
|
|
1586
1754
|
type: "text",
|
|
1587
1755
|
placeholder: i.placeholder,
|
|
1588
1756
|
class: "bg-transparent border-none focus:outline-none w-full",
|
|
1589
|
-
"onUpdate:modelValue":
|
|
1757
|
+
"onUpdate:modelValue": g[0] || (g[0] = (I) => y.value = I),
|
|
1590
1758
|
ref_key: "filterInput",
|
|
1591
|
-
ref:
|
|
1592
|
-
onFocus:
|
|
1593
|
-
onInput:
|
|
1759
|
+
ref: $,
|
|
1760
|
+
onFocus: k,
|
|
1761
|
+
onInput: w,
|
|
1594
1762
|
tabindex: "-1"
|
|
1595
|
-
}, null, 40,
|
|
1596
|
-
[
|
|
1763
|
+
}, null, 40, Sl)), [
|
|
1764
|
+
[ne, y.value]
|
|
1597
1765
|
])
|
|
1598
1766
|
]),
|
|
1599
|
-
r.value ? (
|
|
1767
|
+
r.value ? (n(), ue(F(Ze), {
|
|
1600
1768
|
key: 0,
|
|
1601
|
-
class:
|
|
1769
|
+
class: V({ "rotate-180": f.value }),
|
|
1602
1770
|
size: 20
|
|
1603
|
-
}, null, 8, ["class"])) :
|
|
1604
|
-
], 42,
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
(
|
|
1608
|
-
key:
|
|
1609
|
-
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"]),
|
|
1610
1778
|
class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
|
|
1611
|
-
id: "option-" +
|
|
1779
|
+
id: "option-" + D,
|
|
1612
1780
|
role: "option",
|
|
1613
|
-
"aria-selected":
|
|
1781
|
+
"aria-selected": p.value && p.value.value === I.value
|
|
1614
1782
|
}, [
|
|
1615
|
-
|
|
1616
|
-
], 40,
|
|
1783
|
+
o("a", null, C(I.text), 1)
|
|
1784
|
+
], 40, Dl))), 128))
|
|
1617
1785
|
])
|
|
1618
1786
|
], 512), [
|
|
1619
|
-
[
|
|
1787
|
+
[Ne, f.value && z.value.length > 0]
|
|
1620
1788
|
])
|
|
1621
1789
|
], 512));
|
|
1622
1790
|
}
|
|
1623
|
-
},
|
|
1791
|
+
}, Ml = { class: "w-full max-w-xs form-control" }, Il = {
|
|
1624
1792
|
key: 0,
|
|
1625
1793
|
class: "label"
|
|
1626
|
-
},
|
|
1794
|
+
}, Tl = { class: "label-text" }, Vl = ["type", "placeholder", "value"], Bl = {
|
|
1627
1795
|
key: 1,
|
|
1628
1796
|
class: "label"
|
|
1629
|
-
},
|
|
1797
|
+
}, Ol = { class: "label-text-alt text-error validator-hint" }, zl = {
|
|
1630
1798
|
key: 2,
|
|
1631
1799
|
class: "label"
|
|
1632
|
-
},
|
|
1800
|
+
}, Al = { class: "label-text-alt text-success validator-hint" }, Mn = /* @__PURE__ */ L({
|
|
1633
1801
|
__name: "inputField",
|
|
1634
1802
|
props: {
|
|
1635
1803
|
modelValue: { default: "" },
|
|
@@ -1637,83 +1805,87 @@ const Qe = le("SunIcon", [
|
|
|
1637
1805
|
placeholder: { default: "" },
|
|
1638
1806
|
type: { default: "text" },
|
|
1639
1807
|
rules: { default: () => ({}) },
|
|
1808
|
+
needsValidation: {},
|
|
1640
1809
|
successMessage: { default: "" },
|
|
1641
1810
|
size: { default: "md" },
|
|
1642
1811
|
color: { default: "" },
|
|
1643
1812
|
style: { default: "" }
|
|
1644
1813
|
},
|
|
1645
1814
|
emits: ["update:modelValue", "validate"],
|
|
1646
|
-
setup(i, { expose:
|
|
1647
|
-
const t = i,
|
|
1648
|
-
var
|
|
1649
|
-
let
|
|
1650
|
-
const
|
|
1651
|
-
return (
|
|
1652
|
-
}),
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
},
|
|
1656
|
-
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;
|
|
1657
1826
|
};
|
|
1658
|
-
return
|
|
1827
|
+
return H(
|
|
1659
1828
|
() => t.modelValue,
|
|
1660
1829
|
() => {
|
|
1661
|
-
r.value &&
|
|
1830
|
+
r.value && p.value;
|
|
1662
1831
|
}
|
|
1663
|
-
),
|
|
1832
|
+
), c({
|
|
1664
1833
|
focusInput: () => {
|
|
1665
|
-
var
|
|
1666
|
-
console.log("inputField.vue: focusInput method called."), (
|
|
1834
|
+
var v;
|
|
1835
|
+
console.log("inputField.vue: focusInput method called."), (v = l.value) == null || v.focus();
|
|
1667
1836
|
},
|
|
1668
|
-
isValid:
|
|
1837
|
+
isValid: p,
|
|
1669
1838
|
isTouched: r,
|
|
1670
|
-
errorMessage:
|
|
1671
|
-
}), (
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
])) :
|
|
1675
|
-
|
|
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", {
|
|
1676
1846
|
ref_key: "inputElement",
|
|
1677
|
-
ref:
|
|
1678
|
-
type:
|
|
1679
|
-
placeholder:
|
|
1680
|
-
class:
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
])) :
|
|
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)
|
|
1714
1886
|
]));
|
|
1715
1887
|
}
|
|
1716
|
-
}),
|
|
1888
|
+
}), In = /* @__PURE__ */ L({
|
|
1717
1889
|
__name: "loader",
|
|
1718
1890
|
props: {
|
|
1719
1891
|
loading: { type: Boolean, default: !0 },
|
|
@@ -1722,15 +1894,15 @@ const Qe = le("SunIcon", [
|
|
|
1722
1894
|
color: { default: "primary" }
|
|
1723
1895
|
},
|
|
1724
1896
|
setup(i) {
|
|
1725
|
-
const
|
|
1726
|
-
return
|
|
1727
|
-
() =>
|
|
1897
|
+
const c = i, e = x(c.loading);
|
|
1898
|
+
return H(
|
|
1899
|
+
() => c.loading,
|
|
1728
1900
|
(t) => {
|
|
1729
1901
|
e.value = t;
|
|
1730
1902
|
}
|
|
1731
|
-
), (t,
|
|
1903
|
+
), (t, s) => e.value ? (n(), a("span", {
|
|
1732
1904
|
key: 0,
|
|
1733
|
-
class:
|
|
1905
|
+
class: V(["loading", [
|
|
1734
1906
|
{ "loading-xs": t.size === "xs" },
|
|
1735
1907
|
{ "loading-sm": t.size === "sm" },
|
|
1736
1908
|
{ "loading-md": t.size === "md" },
|
|
@@ -1753,15 +1925,15 @@ const Qe = le("SunIcon", [
|
|
|
1753
1925
|
{ "text-warning": t.color === "warning" },
|
|
1754
1926
|
{ "text-error": t.color === "error" }
|
|
1755
1927
|
]])
|
|
1756
|
-
}, null, 2)) :
|
|
1928
|
+
}, null, 2)) : O("", !0);
|
|
1757
1929
|
}
|
|
1758
|
-
}),
|
|
1930
|
+
}), Pl = { class: "footer sm:footer-horizontal container" }, El = { class: "footer-title" }, Ll = ["href"], Ul = {
|
|
1759
1931
|
key: 0,
|
|
1760
1932
|
class: "sm:hidden w-full"
|
|
1761
|
-
},
|
|
1933
|
+
}, Rl = { class: "border-b-2 border-base-100 last:border-b-0 w-full" }, Nl = {
|
|
1762
1934
|
tabindex: "0",
|
|
1763
1935
|
class: "collapse collapse-plus w-full"
|
|
1764
|
-
},
|
|
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({
|
|
1765
1937
|
__name: "footer",
|
|
1766
1938
|
props: {
|
|
1767
1939
|
items: {},
|
|
@@ -1770,118 +1942,118 @@ const Qe = le("SunIcon", [
|
|
|
1770
1942
|
collapseOnMobile: { type: Boolean, default: !1 }
|
|
1771
1943
|
},
|
|
1772
1944
|
setup(i) {
|
|
1773
|
-
const
|
|
1774
|
-
return (e, t) => (
|
|
1775
|
-
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"]])
|
|
1776
1948
|
}, [
|
|
1777
|
-
|
|
1778
|
-
(
|
|
1779
|
-
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 }])
|
|
1780
1952
|
}, [
|
|
1781
|
-
|
|
1782
|
-
(
|
|
1953
|
+
o("h6", El, C(s.title), 1),
|
|
1954
|
+
(n(!0), a(B, null, A(s.items, (l) => (n(), a("a", {
|
|
1783
1955
|
class: "link link-hover",
|
|
1784
|
-
href:
|
|
1785
|
-
},
|
|
1956
|
+
href: l.link
|
|
1957
|
+
}, C(l.text), 9, Ll))), 256))
|
|
1786
1958
|
], 2))), 256)),
|
|
1787
|
-
e.collapseOnMobile ? (
|
|
1788
|
-
(
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
(
|
|
1794
|
-
|
|
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", {
|
|
1795
1967
|
class: "w-full font-medium link link-hover",
|
|
1796
|
-
href:
|
|
1797
|
-
},
|
|
1968
|
+
href: l.link
|
|
1969
|
+
}, C(l.text), 9, Wl)
|
|
1798
1970
|
]))), 256))
|
|
1799
1971
|
])
|
|
1800
1972
|
])
|
|
1801
1973
|
])
|
|
1802
1974
|
]))), 256))
|
|
1803
|
-
])) :
|
|
1804
|
-
|
|
1805
|
-
|
|
1975
|
+
])) : O("", !0),
|
|
1976
|
+
o("aside", Kl, [
|
|
1977
|
+
T(e.$slots, "default")
|
|
1806
1978
|
])
|
|
1807
1979
|
])
|
|
1808
1980
|
], 2));
|
|
1809
1981
|
}
|
|
1810
|
-
}),
|
|
1811
|
-
function
|
|
1812
|
-
return
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
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"))
|
|
1818
1990
|
])
|
|
1819
1991
|
]),
|
|
1820
|
-
|
|
1821
|
-
|
|
1992
|
+
o("p", null, [
|
|
1993
|
+
T(i.$slots, "description", { class: "py-9" })
|
|
1822
1994
|
]),
|
|
1823
|
-
|
|
1824
|
-
|
|
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))
|
|
1825
1997
|
])
|
|
1826
1998
|
])
|
|
1827
1999
|
])
|
|
1828
2000
|
]);
|
|
1829
2001
|
}
|
|
1830
|
-
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({
|
|
1831
2003
|
__name: "categoryNavigation",
|
|
1832
2004
|
props: {
|
|
1833
2005
|
searchOptions: {},
|
|
1834
2006
|
currentCategory: {}
|
|
1835
2007
|
},
|
|
1836
2008
|
emits: ["update:currentCategory"],
|
|
1837
|
-
setup(i, { emit:
|
|
1838
|
-
const e = i, t =
|
|
1839
|
-
function l
|
|
1840
|
-
t("update:currentCategory",
|
|
2009
|
+
setup(i, { emit: c }) {
|
|
2010
|
+
const e = i, t = c;
|
|
2011
|
+
function s(l) {
|
|
2012
|
+
t("update:currentCategory", l);
|
|
1841
2013
|
}
|
|
1842
|
-
return (
|
|
1843
|
-
(
|
|
1844
|
-
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
|
|
1845
2017
|
}, [
|
|
1846
|
-
|
|
1847
|
-
onClick: (
|
|
1848
|
-
class:
|
|
1849
|
-
},
|
|
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)
|
|
1850
2022
|
]))), 128))
|
|
1851
2023
|
]));
|
|
1852
2024
|
}
|
|
1853
|
-
}),
|
|
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({
|
|
1854
2026
|
__name: "navigationBar",
|
|
1855
2027
|
props: {
|
|
1856
2028
|
isCollapsed: { type: Boolean, default: !0 }
|
|
1857
2029
|
},
|
|
1858
2030
|
setup(i) {
|
|
1859
|
-
const
|
|
1860
|
-
return (e, t) => (
|
|
1861
|
-
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" : ""])
|
|
1862
2034
|
}, [
|
|
1863
|
-
|
|
1864
|
-
|
|
2035
|
+
o("div", tn, [
|
|
2036
|
+
T(e.$slots, "start", {}, void 0, !0)
|
|
1865
2037
|
]),
|
|
1866
|
-
|
|
1867
|
-
|
|
2038
|
+
o("div", ln, [
|
|
2039
|
+
T(e.$slots, "center", {}, void 0, !0)
|
|
1868
2040
|
]),
|
|
1869
|
-
|
|
1870
|
-
|
|
2041
|
+
o("div", nn, [
|
|
2042
|
+
T(e.$slots, "end", {}, void 0, !0)
|
|
1871
2043
|
]),
|
|
1872
|
-
|
|
1873
|
-
|
|
2044
|
+
o("div", an, [
|
|
2045
|
+
T(e.$slots, "bottom", {}, void 0, !0)
|
|
1874
2046
|
])
|
|
1875
2047
|
], 2));
|
|
1876
2048
|
}
|
|
1877
|
-
}),
|
|
2049
|
+
}), On = /* @__PURE__ */ te(on, [["__scopeId", "data-v-8ddb2b45"]]), sn = {
|
|
1878
2050
|
key: 0,
|
|
1879
2051
|
class: "hidden top-4 right-0 absolute md:flex gap-4"
|
|
1880
|
-
},
|
|
2052
|
+
}, rn = ["onClick", "aria-selected"], un = {
|
|
1881
2053
|
key: 0,
|
|
1882
2054
|
role: "tabpanel",
|
|
1883
2055
|
class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full overflow-x-auto tab-content"
|
|
1884
|
-
},
|
|
2056
|
+
}, dn = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, zn = /* @__PURE__ */ L({
|
|
1885
2057
|
__name: "tab",
|
|
1886
2058
|
props: {
|
|
1887
2059
|
items: {},
|
|
@@ -1890,82 +2062,82 @@ const xa = /* @__PURE__ */ X(Nl, [["render", Kl]]), Yl = { class: "flex flex-row
|
|
|
1890
2062
|
buttonOnlyMode: { type: Boolean, default: !1 }
|
|
1891
2063
|
},
|
|
1892
2064
|
emits: ["tab-changed"],
|
|
1893
|
-
setup(i, { emit:
|
|
1894
|
-
const e = i, t =
|
|
1895
|
-
function
|
|
1896
|
-
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);
|
|
1897
2069
|
}
|
|
1898
2070
|
function r() {
|
|
1899
|
-
const
|
|
1900
|
-
|
|
2071
|
+
const f = (e.items.indexOf(t.value) + 1) % e.items.length;
|
|
2072
|
+
l(e.items[f]);
|
|
1901
2073
|
}
|
|
1902
|
-
function
|
|
1903
|
-
const
|
|
1904
|
-
|
|
2074
|
+
function y() {
|
|
2075
|
+
const f = (e.items.indexOf(t.value) - 1 + e.items.length) % e.items.length;
|
|
2076
|
+
l(e.items[f]);
|
|
1905
2077
|
}
|
|
1906
|
-
return
|
|
1907
|
-
e.items &&
|
|
1908
|
-
}),
|
|
2078
|
+
return Q(() => {
|
|
2079
|
+
e.items && l(e.items[0]);
|
|
2080
|
+
}), $e(() => {
|
|
1909
2081
|
e.rotateTabsAfter && e.rotateTabsAfter > 0 && setInterval(() => {
|
|
1910
2082
|
r();
|
|
1911
2083
|
}, e.rotateTabsAfter * 1e3);
|
|
1912
|
-
}), (
|
|
1913
|
-
|
|
2084
|
+
}), (p, f) => (n(), a(B, null, [
|
|
2085
|
+
o("div", {
|
|
1914
2086
|
role: "tablist",
|
|
1915
|
-
class:
|
|
2087
|
+
class: V(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto": p.buttonOnlyMode }])
|
|
1916
2088
|
}, [
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
onClick:
|
|
2089
|
+
p.withControlls ? (n(), a("div", sn, [
|
|
2090
|
+
o("button", {
|
|
2091
|
+
onClick: f[0] || (f[0] = ($) => y()),
|
|
1920
2092
|
class: "cursor-pointer"
|
|
1921
2093
|
}, "Previous"),
|
|
1922
|
-
|
|
1923
|
-
onClick:
|
|
2094
|
+
o("button", {
|
|
2095
|
+
onClick: f[1] || (f[1] = ($) => r()),
|
|
1924
2096
|
class: "text-primary cursor-pointer"
|
|
1925
2097
|
}, "Next")
|
|
1926
|
-
])) :
|
|
1927
|
-
(
|
|
1928
|
-
|
|
2098
|
+
])) : O("", !0),
|
|
2099
|
+
(n(!0), a(B, null, A(p.items, ($) => (n(), a(B, null, [
|
|
2100
|
+
o("a", {
|
|
1929
2101
|
type: "button",
|
|
1930
2102
|
role: "tab",
|
|
1931
|
-
class:
|
|
1932
|
-
onClick: (
|
|
1933
|
-
"aria-selected": t.value ==
|
|
1934
|
-
},
|
|
1935
|
-
|
|
1936
|
-
|
|
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`)
|
|
1937
2109
|
]))
|
|
1938
2110
|
], 64))), 256))
|
|
1939
2111
|
], 2),
|
|
1940
|
-
|
|
1941
|
-
|
|
2112
|
+
o("div", dn, [
|
|
2113
|
+
T(p.$slots, "default")
|
|
1942
2114
|
])
|
|
1943
2115
|
], 64));
|
|
1944
2116
|
}
|
|
1945
2117
|
});
|
|
1946
2118
|
export {
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
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
|
|
1971
2143
|
};
|