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