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