manolis-ui 0.13.1 → 0.13.4
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/manolis-ui.js +1068 -1092
- package/dist/manolis-ui.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/manolis-ui.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var ft = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var mt = (e, t,
|
|
5
|
-
var
|
|
6
|
-
import { defineComponent as
|
|
7
|
-
const an = ["disabled"],
|
|
4
|
+
var mt = (e, t, a) => t.has(e) || ft("Cannot " + a);
|
|
5
|
+
var le = (e, t, a) => (mt(e, t, "read from private field"), a ? a.call(e) : t.get(e)), Be = (e, t, a) => t.has(e) ? ft("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), Ve = (e, t, a, n) => (mt(e, t, "write to private field"), n ? n.call(e, a) : t.set(e, a), a);
|
|
6
|
+
import { defineComponent as N, computed as K, createElementBlock as h, openBlock as f, normalizeClass as B, createCommentVNode as E, renderSlot as V, createTextVNode as Ct, createElementVNode as d, Fragment as U, renderList as F, toDisplayString as P, ref as M, watch as R, h as He, onMounted as ue, withDirectives as Ce, createVNode as ie, isRef as Yt, vModelCheckbox as Jt, unref as Z, provide as Xt, normalizeStyle as ye, inject as Gt, useId as Qt, defineAsyncComponent as ze, nextTick as Pe, onBeforeUnmount as _e, withModifiers as te, createBlock as ae, resolveDynamicComponent as Oe, mergeProps as Ne, withKeys as We, onUnmounted as Dt, resolveComponent as Ae, withCtx as pt, vModelText as Tt, useSlots as en, Comment as tn, vShow as nn } from "vue";
|
|
7
|
+
const an = ["disabled"], on = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "loading loading-spinner"
|
|
10
|
-
},
|
|
10
|
+
}, fl = /* @__PURE__ */ N({
|
|
11
11
|
__name: "ButtonComponent",
|
|
12
12
|
props: {
|
|
13
13
|
outlined: { type: Boolean, default: !1 },
|
|
@@ -19,7 +19,7 @@ const an = ["disabled"], ln = {
|
|
|
19
19
|
disabled: { type: Boolean, default: !1 }
|
|
20
20
|
},
|
|
21
21
|
setup(e) {
|
|
22
|
-
const t = e,
|
|
22
|
+
const t = e, a = K(() => {
|
|
23
23
|
switch (t.size) {
|
|
24
24
|
case "large":
|
|
25
25
|
return "btn-lg";
|
|
@@ -34,7 +34,7 @@ const an = ["disabled"], ln = {
|
|
|
34
34
|
default:
|
|
35
35
|
return "";
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), n = K(() => {
|
|
38
38
|
switch (t.type) {
|
|
39
39
|
case "neutral":
|
|
40
40
|
return "btn-neutral";
|
|
@@ -59,7 +59,7 @@ const an = ["disabled"], ln = {
|
|
|
59
59
|
default:
|
|
60
60
|
return "btn-neutral";
|
|
61
61
|
}
|
|
62
|
-
}),
|
|
62
|
+
}), l = K(() => {
|
|
63
63
|
switch (t.shape) {
|
|
64
64
|
case "square":
|
|
65
65
|
return "btn-square";
|
|
@@ -69,27 +69,27 @@ const an = ["disabled"], ln = {
|
|
|
69
69
|
return "";
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
return (
|
|
72
|
+
return (o, s) => (f(), h("button", {
|
|
73
73
|
class: B([
|
|
74
74
|
"btn",
|
|
75
75
|
{ "btn-outline": t.outlined },
|
|
76
76
|
{ "btn-active": t.active },
|
|
77
|
-
a.value,
|
|
78
77
|
n.value,
|
|
79
|
-
|
|
78
|
+
a.value,
|
|
79
|
+
l.value
|
|
80
80
|
]),
|
|
81
81
|
disabled: t.disabled
|
|
82
82
|
}, [
|
|
83
|
-
e.loading ? (f(),
|
|
84
|
-
V(
|
|
83
|
+
e.loading ? (f(), h("span", on)) : E("", !0),
|
|
84
|
+
V(o.$slots, "default", {}, () => [
|
|
85
85
|
s[0] || (s[0] = Ct("Submit", -1))
|
|
86
86
|
])
|
|
87
87
|
], 10, an));
|
|
88
88
|
}
|
|
89
|
-
}),
|
|
89
|
+
}), ln = {
|
|
90
90
|
tabindex: "0",
|
|
91
91
|
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"
|
|
92
|
-
}, sn = ["href"],
|
|
92
|
+
}, sn = ["href"], ml = /* @__PURE__ */ N({
|
|
93
93
|
__name: "dropdown",
|
|
94
94
|
props: {
|
|
95
95
|
items: {},
|
|
@@ -104,30 +104,30 @@ const an = ["disabled"], ln = {
|
|
|
104
104
|
right: "dropdown-right",
|
|
105
105
|
bottom: "dropdown-bottom",
|
|
106
106
|
top: "dropdown-top"
|
|
107
|
-
},
|
|
107
|
+
}, a = {
|
|
108
108
|
start: "",
|
|
109
109
|
end: "dropdown-end"
|
|
110
|
-
},
|
|
111
|
-
return (
|
|
112
|
-
class: B(["dropdown", t[
|
|
110
|
+
}, n = e;
|
|
111
|
+
return (l, o) => (f(), h("div", {
|
|
112
|
+
class: B(["dropdown", t[n.position], a[n.floatPosition], { "dropdown-open": n.forceOpen }, { "dropdown-hover": n.openOnHover }])
|
|
113
113
|
}, [
|
|
114
|
-
V(
|
|
114
|
+
V(l.$slots, "default", {
|
|
115
115
|
tabindex: "0",
|
|
116
116
|
role: "button"
|
|
117
117
|
}, () => [
|
|
118
|
-
|
|
118
|
+
o[0] || (o[0] = d("div", { class: "m-1 btn" }, "Open dropdown", -1))
|
|
119
119
|
]),
|
|
120
|
-
d("ul",
|
|
121
|
-
(f(!0),
|
|
120
|
+
d("ul", ln, [
|
|
121
|
+
(f(!0), h(U, null, F(e.items, (s) => (f(), h("li", null, [
|
|
122
122
|
d("a", {
|
|
123
123
|
href: s.link
|
|
124
|
-
},
|
|
124
|
+
}, P(s.text), 9, sn)
|
|
125
125
|
]))), 256)),
|
|
126
|
-
V(
|
|
126
|
+
V(l.$slots, "additional")
|
|
127
127
|
])
|
|
128
128
|
], 2));
|
|
129
129
|
}
|
|
130
|
-
}), rn = { class: "modal-box" }, un = { class: "modal-action" },
|
|
130
|
+
}), rn = { class: "modal-box" }, un = { class: "modal-action" }, pl = /* @__PURE__ */ N({
|
|
131
131
|
__name: "modal",
|
|
132
132
|
props: {
|
|
133
133
|
position: { default: "center" },
|
|
@@ -135,27 +135,27 @@ const an = ["disabled"], ln = {
|
|
|
135
135
|
forceOpen: { type: [Boolean, null], default: null }
|
|
136
136
|
},
|
|
137
137
|
setup(e) {
|
|
138
|
-
const t = e,
|
|
138
|
+
const t = e, a = {
|
|
139
139
|
top: "modal-top",
|
|
140
140
|
bottom: "modal-bottom",
|
|
141
141
|
center: "modal-middle"
|
|
142
|
-
},
|
|
142
|
+
}, n = M(null), l = () => {
|
|
143
143
|
var s;
|
|
144
|
-
(s =
|
|
145
|
-
},
|
|
144
|
+
(s = n.value) == null || s.showModal();
|
|
145
|
+
}, o = () => {
|
|
146
146
|
var s;
|
|
147
|
-
(s =
|
|
147
|
+
(s = n.value) == null || s.close();
|
|
148
148
|
};
|
|
149
149
|
return R(
|
|
150
150
|
() => t.forceOpen,
|
|
151
151
|
(s) => {
|
|
152
|
-
s == !0 &&
|
|
152
|
+
s == !0 && l(), s == !1 && o();
|
|
153
153
|
}
|
|
154
|
-
), (s, u) => (f(),
|
|
155
|
-
t.forceOpen == null ? (f(),
|
|
154
|
+
), (s, u) => (f(), h(U, null, [
|
|
155
|
+
t.forceOpen == null ? (f(), h("span", {
|
|
156
156
|
key: 0,
|
|
157
157
|
class: "w-fit cursor-pointer",
|
|
158
|
-
onClick:
|
|
158
|
+
onClick: l
|
|
159
159
|
}, [
|
|
160
160
|
V(s.$slots, "trigger", { role: "button" }, () => [
|
|
161
161
|
u[0] || (u[0] = d("button", { class: "btn" }, "Open", -1))
|
|
@@ -163,8 +163,8 @@ const an = ["disabled"], ln = {
|
|
|
163
163
|
])) : E("", !0),
|
|
164
164
|
d("dialog", {
|
|
165
165
|
ref_key: "dialog",
|
|
166
|
-
ref:
|
|
167
|
-
class: B(["modal",
|
|
166
|
+
ref: n,
|
|
167
|
+
class: B(["modal", a[t.position]])
|
|
168
168
|
}, [
|
|
169
169
|
d("div", rn, [
|
|
170
170
|
V(s.$slots, "default"),
|
|
@@ -172,7 +172,7 @@ const an = ["disabled"], ln = {
|
|
|
172
172
|
V(s.$slots, "actions"),
|
|
173
173
|
d("form", {
|
|
174
174
|
method: "dialog",
|
|
175
|
-
onSubmit:
|
|
175
|
+
onSubmit: o,
|
|
176
176
|
class: B(e.withBackdrop ? "modal-backdrop" : "")
|
|
177
177
|
}, [
|
|
178
178
|
V(s.$slots, "close-button", {}, () => [
|
|
@@ -184,22 +184,22 @@ const an = ["disabled"], ln = {
|
|
|
184
184
|
], 2)
|
|
185
185
|
], 64));
|
|
186
186
|
}
|
|
187
|
-
}), cn = { class: "flex justify-center items-center swap-on" }, dn = { class: "flex justify-center items-center swap-off" },
|
|
187
|
+
}), cn = { class: "flex justify-center items-center swap-on" }, dn = { class: "flex justify-center items-center swap-off" }, hl = /* @__PURE__ */ N({
|
|
188
188
|
__name: "swap",
|
|
189
189
|
props: {
|
|
190
190
|
effect: {}
|
|
191
191
|
},
|
|
192
192
|
setup(e) {
|
|
193
193
|
const t = e;
|
|
194
|
-
return (
|
|
194
|
+
return (a, n) => (f(), h("label", {
|
|
195
195
|
class: B(["swap", t.effect ? `swap-${e.effect}` : ""])
|
|
196
196
|
}, [
|
|
197
|
-
|
|
197
|
+
n[0] || (n[0] = d("input", { type: "checkbox" }, null, -1)),
|
|
198
198
|
d("div", cn, [
|
|
199
|
-
V(
|
|
199
|
+
V(a.$slots, "on")
|
|
200
200
|
]),
|
|
201
201
|
d("div", dn, [
|
|
202
|
-
V(
|
|
202
|
+
V(a.$slots, "off")
|
|
203
203
|
])
|
|
204
204
|
], 2));
|
|
205
205
|
}
|
|
@@ -234,18 +234,18 @@ var $e = {
|
|
|
234
234
|
* This source code is licensed under the ISC license.
|
|
235
235
|
* See the LICENSE file in the root directory of this source tree.
|
|
236
236
|
*/
|
|
237
|
-
const mn = ({ size: e, strokeWidth: t = 2, absoluteStrokeWidth:
|
|
237
|
+
const mn = ({ size: e, strokeWidth: t = 2, absoluteStrokeWidth: a, color: n, iconNode: l, name: o, class: s, ...u }, { slots: i }) => He(
|
|
238
238
|
"svg",
|
|
239
239
|
{
|
|
240
240
|
...$e,
|
|
241
241
|
width: e || $e.width,
|
|
242
242
|
height: e || $e.height,
|
|
243
|
-
stroke:
|
|
244
|
-
"stroke-width":
|
|
245
|
-
class: ["lucide", `lucide-${fn(
|
|
243
|
+
stroke: n || $e.stroke,
|
|
244
|
+
"stroke-width": a ? Number(t) * 24 / Number(e) : t,
|
|
245
|
+
class: ["lucide", `lucide-${fn(o ?? "icon")}`],
|
|
246
246
|
...u
|
|
247
247
|
},
|
|
248
|
-
[...
|
|
248
|
+
[...l.map((r) => He(...r)), ...i.default ? [i.default()] : []]
|
|
249
249
|
);
|
|
250
250
|
/**
|
|
251
251
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
@@ -253,14 +253,14 @@ const mn = ({ size: e, strokeWidth: t = 2, absoluteStrokeWidth: n, color: a, ico
|
|
|
253
253
|
* This source code is licensed under the ISC license.
|
|
254
254
|
* See the LICENSE file in the root directory of this source tree.
|
|
255
255
|
*/
|
|
256
|
-
const be = (e, t) => (
|
|
256
|
+
const be = (e, t) => (a, { slots: n }) => He(
|
|
257
257
|
mn,
|
|
258
258
|
{
|
|
259
|
-
...
|
|
259
|
+
...a,
|
|
260
260
|
iconNode: t,
|
|
261
261
|
name: e
|
|
262
262
|
},
|
|
263
|
-
|
|
263
|
+
n
|
|
264
264
|
);
|
|
265
265
|
/**
|
|
266
266
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
@@ -319,43 +319,43 @@ const gn = be("SunIcon", [
|
|
|
319
319
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
320
320
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
321
321
|
]), yn = (e, t) => {
|
|
322
|
-
const
|
|
322
|
+
const a = M(null);
|
|
323
323
|
return ue(() => {
|
|
324
324
|
if (typeof window < "u") {
|
|
325
|
-
const
|
|
326
|
-
|
|
325
|
+
const n = window.localStorage.getItem(e);
|
|
326
|
+
a.value = n ? JSON.parse(n) : t;
|
|
327
327
|
}
|
|
328
|
-
}), R(
|
|
329
|
-
typeof window < "u" && window.localStorage.setItem(e, JSON.stringify(
|
|
330
|
-
}),
|
|
331
|
-
}, bn = { class: "swap-rotate swap" }, wn = ["true-value", "false-value"],
|
|
328
|
+
}), R(a, (n) => {
|
|
329
|
+
typeof window < "u" && window.localStorage.setItem(e, JSON.stringify(n));
|
|
330
|
+
}), a;
|
|
331
|
+
}, bn = { class: "swap-rotate swap" }, wn = ["true-value", "false-value"], vl = /* @__PURE__ */ N({
|
|
332
332
|
__name: "theme-controller",
|
|
333
333
|
props: {
|
|
334
334
|
lightTheme: { default: "light" },
|
|
335
335
|
darkTheme: { default: "dark" }
|
|
336
336
|
},
|
|
337
337
|
setup(e) {
|
|
338
|
-
const t = e,
|
|
339
|
-
function
|
|
340
|
-
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme",
|
|
338
|
+
const t = e, a = yn("theme", t.lightTheme);
|
|
339
|
+
function n(l) {
|
|
340
|
+
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", l);
|
|
341
341
|
}
|
|
342
|
-
return ue(() => a
|
|
343
|
-
|
|
344
|
-
}), (
|
|
342
|
+
return ue(() => n(a.value ? a.value : "")), R(a, (l) => {
|
|
343
|
+
n(l);
|
|
344
|
+
}), (l, o) => (f(), h("label", bn, [
|
|
345
345
|
Ce(d("input", {
|
|
346
346
|
type: "checkbox",
|
|
347
347
|
class: "theme-controller",
|
|
348
|
-
"onUpdate:modelValue":
|
|
348
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => Yt(a) ? a.value = s : null),
|
|
349
349
|
"true-value": t.lightTheme,
|
|
350
350
|
"false-value": t.darkTheme
|
|
351
351
|
}, null, 8, wn), [
|
|
352
|
-
[Jt, Z(
|
|
352
|
+
[Jt, Z(a)]
|
|
353
353
|
]),
|
|
354
354
|
ie(Z(gn), { class: "swap-off fill-current" }),
|
|
355
355
|
ie(Z(vn), { class: "swap-on fill-current" })
|
|
356
356
|
]));
|
|
357
357
|
}
|
|
358
|
-
}), xn = ["name"], kn = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, $n = { class: "collapse-content" }, Sn = ["innerHTML"],
|
|
358
|
+
}), xn = ["name"], kn = { class: "collapse-title font-bold text-2xl lg:text-4xl" }, $n = { class: "collapse-content" }, Sn = ["innerHTML"], gl = /* @__PURE__ */ N({
|
|
359
359
|
__name: "accordion",
|
|
360
360
|
props: {
|
|
361
361
|
name: {},
|
|
@@ -365,24 +365,24 @@ const gn = be("SunIcon", [
|
|
|
365
365
|
},
|
|
366
366
|
setup(e) {
|
|
367
367
|
const t = e;
|
|
368
|
-
return (
|
|
368
|
+
return (a, n) => (f(!0), h(U, null, F(t.items, (l, o) => (f(), h("div", {
|
|
369
369
|
class: B(["collapse border border-base-300", [e.icon ? `collapse-${e.icon}` : "", { "join-item": e.joinItems }]]),
|
|
370
|
-
key:
|
|
370
|
+
key: o
|
|
371
371
|
}, [
|
|
372
372
|
d("input", {
|
|
373
373
|
type: "radio",
|
|
374
374
|
name: e.name,
|
|
375
375
|
value: "true"
|
|
376
376
|
}, null, 8, xn),
|
|
377
|
-
d("div", kn,
|
|
377
|
+
d("div", kn, P(l.title), 1),
|
|
378
378
|
d("div", $n, [
|
|
379
379
|
d("span", {
|
|
380
|
-
innerHTML:
|
|
380
|
+
innerHTML: l.content
|
|
381
381
|
}, null, 8, Sn)
|
|
382
382
|
])
|
|
383
383
|
], 2))), 128));
|
|
384
384
|
}
|
|
385
|
-
}), Cn = ["src"], Dn = { class: "text-xl" },
|
|
385
|
+
}), Cn = ["src"], Dn = { class: "text-xl" }, yl = /* @__PURE__ */ N({
|
|
386
386
|
__name: "avatar",
|
|
387
387
|
props: {
|
|
388
388
|
image: {},
|
|
@@ -391,16 +391,16 @@ const gn = be("SunIcon", [
|
|
|
391
391
|
fullyRounded: { type: Boolean, default: !1 }
|
|
392
392
|
},
|
|
393
393
|
setup(e) {
|
|
394
|
-
const t = e,
|
|
394
|
+
const t = e, a = M(t.onlineStatus);
|
|
395
395
|
return R(
|
|
396
396
|
() => t.onlineStatus,
|
|
397
|
-
(
|
|
398
|
-
|
|
397
|
+
(n) => {
|
|
398
|
+
n && (a.value = n);
|
|
399
399
|
}
|
|
400
|
-
), (
|
|
401
|
-
class: B(["avatar", [{ "avatar-online":
|
|
400
|
+
), (n, l) => (f(), h("div", {
|
|
401
|
+
class: B(["avatar", [{ "avatar-online": a.value === "online" }, { "avatar-offline": a.value === "offline" }]])
|
|
402
402
|
}, [
|
|
403
|
-
e.image ? (f(),
|
|
403
|
+
e.image ? (f(), h("div", {
|
|
404
404
|
key: 0,
|
|
405
405
|
class: B(["rounded", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
|
|
406
406
|
}, [
|
|
@@ -408,15 +408,15 @@ const gn = be("SunIcon", [
|
|
|
408
408
|
src: e.image,
|
|
409
409
|
class: "w-full h-full"
|
|
410
410
|
}, null, 8, Cn)
|
|
411
|
-
], 2)) : (f(),
|
|
411
|
+
], 2)) : (f(), h("div", {
|
|
412
412
|
key: 1,
|
|
413
413
|
class: B(["flex justify-center bg-neutral p-[25%] rounded w-16 text-neutral-content text-center", [{ "rounded-full": e.fullyRounded }, { rounded: !e.fullyRounded }]])
|
|
414
414
|
}, [
|
|
415
|
-
d("p", Dn,
|
|
415
|
+
d("p", Dn, P(e.initials), 1)
|
|
416
416
|
], 2))
|
|
417
417
|
], 2));
|
|
418
418
|
}
|
|
419
|
-
}),
|
|
419
|
+
}), bl = /* @__PURE__ */ N({
|
|
420
420
|
__name: "badge",
|
|
421
421
|
props: {
|
|
422
422
|
color: { default: "neutral" },
|
|
@@ -424,12 +424,12 @@ const gn = be("SunIcon", [
|
|
|
424
424
|
size: { default: "medium" }
|
|
425
425
|
},
|
|
426
426
|
setup(e) {
|
|
427
|
-
const t = e,
|
|
427
|
+
const t = e, a = {
|
|
428
428
|
"extra small": "badge-xs",
|
|
429
429
|
small: "badge-sm",
|
|
430
430
|
medium: "badge-md",
|
|
431
431
|
large: "badge-lg"
|
|
432
|
-
},
|
|
432
|
+
}, n = {
|
|
433
433
|
neutral: "badge-neutral",
|
|
434
434
|
primary: "badge-primary",
|
|
435
435
|
secondary: "badge-secondary",
|
|
@@ -440,10 +440,10 @@ const gn = be("SunIcon", [
|
|
|
440
440
|
warning: "badge-warning",
|
|
441
441
|
error: "badge-error"
|
|
442
442
|
};
|
|
443
|
-
return (
|
|
444
|
-
class: B(["badge",
|
|
443
|
+
return (l, o) => (f(), h("span", {
|
|
444
|
+
class: B(["badge", a[t.size], n[t.color], { "badge-outline": t.outline }])
|
|
445
445
|
}, [
|
|
446
|
-
V(
|
|
446
|
+
V(l.$slots, "default")
|
|
447
447
|
], 2));
|
|
448
448
|
}
|
|
449
449
|
}), Tn = ["src", "alt"], Mn = {
|
|
@@ -458,7 +458,7 @@ const gn = be("SunIcon", [
|
|
|
458
458
|
}, Bn = { class: "flex-col flex-nowrap mt-auto card-actions" }, Vn = {
|
|
459
459
|
key: 1,
|
|
460
460
|
class: "card-body"
|
|
461
|
-
},
|
|
461
|
+
}, wl = /* @__PURE__ */ N({
|
|
462
462
|
__name: "card",
|
|
463
463
|
props: {
|
|
464
464
|
imgUrl: { default: "" },
|
|
@@ -475,15 +475,15 @@ const gn = be("SunIcon", [
|
|
|
475
475
|
horizontal: { type: Boolean, default: !1 }
|
|
476
476
|
},
|
|
477
477
|
setup(e) {
|
|
478
|
-
const t = e,
|
|
478
|
+
const t = e, a = M(t.outlined);
|
|
479
479
|
return R(
|
|
480
480
|
() => t.outlined,
|
|
481
|
-
(
|
|
482
|
-
|
|
481
|
+
(n) => {
|
|
482
|
+
a.value = n;
|
|
483
483
|
}
|
|
484
|
-
), (
|
|
484
|
+
), (n, l) => (f(), h("div", {
|
|
485
485
|
class: B(["group bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact", [
|
|
486
|
-
{ "border-4 border-primary":
|
|
486
|
+
{ "border-4 border-primary": a.value },
|
|
487
487
|
e.color ?? "",
|
|
488
488
|
e.background,
|
|
489
489
|
{ "card-side": e.horizontal }
|
|
@@ -492,7 +492,7 @@ const gn = be("SunIcon", [
|
|
|
492
492
|
d("figure", {
|
|
493
493
|
class: B([{ "contents!": e.horizontal && e.imgWidth }])
|
|
494
494
|
}, [
|
|
495
|
-
e.imgUrl || e.imgUrl && !e.loading ? (f(),
|
|
495
|
+
e.imgUrl || e.imgUrl && !e.loading ? (f(), h("img", {
|
|
496
496
|
key: 0,
|
|
497
497
|
src: e.imgUrl,
|
|
498
498
|
alt: e.alt,
|
|
@@ -504,20 +504,20 @@ const gn = be("SunIcon", [
|
|
|
504
504
|
e.horizontal && e.imgWidth ? e.imgWidth : "w-full"
|
|
505
505
|
]])
|
|
506
506
|
}, null, 10, Tn)) : E("", !0),
|
|
507
|
-
e.loading && e.imgUrl ? (f(),
|
|
507
|
+
e.loading && e.imgUrl ? (f(), h("div", {
|
|
508
508
|
key: 1,
|
|
509
509
|
class: B(["w-full skeleton", e.imgHeight])
|
|
510
510
|
}, null, 2)) : E("", !0)
|
|
511
511
|
], 2),
|
|
512
|
-
e.loading ? E("", !0) : (f(),
|
|
513
|
-
e.title ? (f(),
|
|
514
|
-
V(
|
|
515
|
-
e.description ? (f(),
|
|
512
|
+
e.loading ? E("", !0) : (f(), h("div", Mn, [
|
|
513
|
+
e.title ? (f(), h("h2", In, P(e.title), 1)) : E("", !0),
|
|
514
|
+
V(n.$slots, "details"),
|
|
515
|
+
e.description ? (f(), h("p", En, P(e.description), 1)) : E("", !0),
|
|
516
516
|
d("div", Bn, [
|
|
517
|
-
V(
|
|
517
|
+
V(n.$slots, "actions")
|
|
518
518
|
])
|
|
519
519
|
])),
|
|
520
|
-
e.loading ? (f(),
|
|
520
|
+
e.loading ? (f(), h("div", Vn, [...l[0] || (l[0] = [
|
|
521
521
|
d("div", { class: "flex flex-col gap-4 w-52" }, [
|
|
522
522
|
d("div", { class: "w-28 h-4 skeleton" }),
|
|
523
523
|
d("div", { class: "w-full h-4 skeleton" }),
|
|
@@ -532,7 +532,7 @@ const gn = be("SunIcon", [
|
|
|
532
532
|
}, On = {
|
|
533
533
|
key: 1,
|
|
534
534
|
class: "bottom-5 z-10 absolute flex justify-center gap-2 py-2 w-full"
|
|
535
|
-
}, Nn = ["onClick", "aria-label"], An = /* @__PURE__ */
|
|
535
|
+
}, Nn = ["onClick", "aria-label"], An = /* @__PURE__ */ N({
|
|
536
536
|
__name: "carousel",
|
|
537
537
|
props: {
|
|
538
538
|
showIndicators: {
|
|
@@ -570,72 +570,72 @@ const gn = be("SunIcon", [
|
|
|
570
570
|
}
|
|
571
571
|
},
|
|
572
572
|
setup(e, { expose: t }) {
|
|
573
|
-
const
|
|
574
|
-
width: `calc((100% - ${
|
|
573
|
+
const a = e, n = M(a.initialSlide), l = M(null), o = M(!1), s = M(0), u = K(() => ({
|
|
574
|
+
width: `calc((100% - ${a.slidesPerView > 1 ? (a.slidesPerView - 1) * a.gap : 0}px) / ${a.slidesPerView})`
|
|
575
575
|
}));
|
|
576
576
|
Xt(Mt, u);
|
|
577
577
|
const i = () => {
|
|
578
|
-
|
|
579
|
-
},
|
|
580
|
-
if (!
|
|
581
|
-
const
|
|
582
|
-
if (
|
|
583
|
-
const z =
|
|
584
|
-
|
|
585
|
-
const
|
|
586
|
-
if (Math.abs(
|
|
587
|
-
|
|
578
|
+
l.value ? s.value = l.value.children.length : s.value = 0;
|
|
579
|
+
}, r = async ($) => {
|
|
580
|
+
if (!l.value || a.slidesPerView <= 0 || o.value || (i(), s.value === 0)) return;
|
|
581
|
+
const S = ($ % s.value + s.value) % s.value, D = l.value, k = a.sliderOrientation === "vertical" ? (D.offsetHeight - (a.slidesPerView - 1) * a.gap) / a.slidesPerView : (D.offsetWidth - (a.slidesPerView - 1) * a.gap) / a.slidesPerView;
|
|
582
|
+
if (k <= 0) return;
|
|
583
|
+
const z = k + a.gap, j = S * z, q = a.sliderOrientation === "vertical" ? D.scrollHeight - D.offsetHeight : D.scrollWidth - D.offsetWidth, v = Math.max(0, Math.min(j, q + 0.5));
|
|
584
|
+
o.value = !0, D.style.scrollBehavior = "auto";
|
|
585
|
+
const T = a.sliderOrientation === "vertical" ? D.scrollTop : D.scrollLeft, b = v - T;
|
|
586
|
+
if (Math.abs(b) < 1) {
|
|
587
|
+
o.value = !1, n.value = S;
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
590
|
-
const
|
|
591
|
-
const
|
|
592
|
-
|
|
590
|
+
const y = performance.now(), c = (w) => {
|
|
591
|
+
const x = w - y, I = Math.min(1, x / a.slideDuration), A = I < 0.5 ? 4 * I * I * I : 1 - Math.pow(-2 * I + 2, 3) / 2, H = T + b * A;
|
|
592
|
+
a.sliderOrientation === "vertical" ? D.scrollTop = H : D.scrollLeft = H, I < 1 ? requestAnimationFrame(c) : (a.sliderOrientation === "vertical" ? D.scrollTop = v : D.scrollLeft = v, n.value = S, o.value = !1);
|
|
593
593
|
};
|
|
594
|
-
requestAnimationFrame(
|
|
594
|
+
requestAnimationFrame(c);
|
|
595
595
|
}, m = () => {
|
|
596
|
-
|
|
597
|
-
},
|
|
598
|
-
|
|
599
|
-
}, g = (
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
if (!
|
|
603
|
-
const
|
|
604
|
-
if (
|
|
605
|
-
const z = Math.max(0, s.value -
|
|
606
|
-
|
|
596
|
+
r(n.value + 1);
|
|
597
|
+
}, C = () => {
|
|
598
|
+
r(n.value - 1);
|
|
599
|
+
}, g = ($) => {
|
|
600
|
+
r($);
|
|
601
|
+
}, p = () => {
|
|
602
|
+
if (!l.value || a.slidesPerView <= 0 || (i(), s.value === 0)) return;
|
|
603
|
+
const $ = l.value, S = a.sliderOrientation === "vertical" ? $.offsetHeight : $.offsetWidth, D = a.slidesPerView > 1 ? (a.slidesPerView - 1) * a.gap : 0, k = (S - D) / a.slidesPerView;
|
|
604
|
+
if (k <= 0) return;
|
|
605
|
+
const z = Math.max(0, s.value - a.slidesPerView), j = Math.min(Math.max(0, a.initialSlide), z), q = j * (k + a.gap), v = a.sliderOrientation === "vertical" ? $.scrollHeight - $.offsetHeight : $.scrollWidth - $.offsetWidth, T = Math.max(0, Math.min(q, v + 0.5));
|
|
606
|
+
a.sliderOrientation === "vertical" ? $.scrollTo({ top: T, behavior: "auto" }) : $.scrollTo({ left: T, behavior: "auto" }), n.value = j;
|
|
607
607
|
};
|
|
608
608
|
return ue(() => {
|
|
609
609
|
requestAnimationFrame(() => {
|
|
610
|
-
requestAnimationFrame(
|
|
610
|
+
requestAnimationFrame(p);
|
|
611
611
|
}), i();
|
|
612
|
-
}), R(() =>
|
|
613
|
-
requestAnimationFrame(() =>
|
|
614
|
-
}), R(() => [
|
|
612
|
+
}), R(() => a.initialSlide, ($) => {
|
|
613
|
+
requestAnimationFrame(() => r($));
|
|
614
|
+
}), R(() => [a.slidesPerView, a.gap], () => {
|
|
615
615
|
requestAnimationFrame(() => {
|
|
616
616
|
requestAnimationFrame(() => {
|
|
617
617
|
if (i(), s.value === 0) return;
|
|
618
|
-
const
|
|
619
|
-
|
|
618
|
+
const $ = Math.max(0, s.value - a.slidesPerView), S = Math.min(n.value, $), D = a.slideDuration;
|
|
619
|
+
a.slideDuration = 0, r(S), a.slideDuration = D;
|
|
620
620
|
});
|
|
621
621
|
});
|
|
622
|
-
}), t({ scrollToSlide:
|
|
622
|
+
}), t({ scrollToSlide: r }), ($, S) => (f(), h("div", zn, [
|
|
623
623
|
d("div", {
|
|
624
624
|
ref_key: "carouselContainer",
|
|
625
|
-
ref:
|
|
625
|
+
ref: l,
|
|
626
626
|
class: B(["rounded w-full h-full overflow-x-scroll scroll-smooth carousel", [{ "carousel-horizontal md:snap-none": e.sliderOrientation == "horizontal" }, { "carousel-vertical": e.sliderOrientation == "vertical" }]]),
|
|
627
627
|
style: ye({ gap: `${e.gap}px` })
|
|
628
628
|
}, [
|
|
629
|
-
V(
|
|
629
|
+
V($.$slots, "default", {}, void 0, !0)
|
|
630
630
|
], 6),
|
|
631
|
-
e.showNavigationButtons ? (f(),
|
|
631
|
+
e.showNavigationButtons ? (f(), h("div", Pn, [
|
|
632
632
|
d("div", {
|
|
633
|
-
onClick:
|
|
633
|
+
onClick: C,
|
|
634
634
|
role: "button",
|
|
635
635
|
"aria-label": "Previous Slide"
|
|
636
636
|
}, [
|
|
637
|
-
V(
|
|
638
|
-
|
|
637
|
+
V($.$slots, "prevButton", {}, () => [
|
|
638
|
+
S[0] || (S[0] = d("button", {
|
|
639
639
|
class: "btn btn-circle",
|
|
640
640
|
tabindex: "-1"
|
|
641
641
|
}, "❮", -1))
|
|
@@ -646,41 +646,41 @@ const gn = be("SunIcon", [
|
|
|
646
646
|
role: "button",
|
|
647
647
|
"aria-label": "Next Slide"
|
|
648
648
|
}, [
|
|
649
|
-
V(
|
|
650
|
-
|
|
649
|
+
V($.$slots, "nextButton", {}, () => [
|
|
650
|
+
S[1] || (S[1] = d("button", {
|
|
651
651
|
class: "btn btn-circle",
|
|
652
652
|
tabindex: "-1"
|
|
653
653
|
}, "❯", -1))
|
|
654
654
|
], !0)
|
|
655
655
|
])
|
|
656
656
|
])) : E("", !0),
|
|
657
|
-
e.showIndicators ? (f(),
|
|
658
|
-
(f(!0),
|
|
659
|
-
key: `dot-${
|
|
660
|
-
onClick: (z) => g(
|
|
661
|
-
class: B(["btn btn-circle btn-xs", { "btn-active":
|
|
662
|
-
"aria-label": `Go to slide ${
|
|
657
|
+
e.showIndicators ? (f(), h("div", On, [
|
|
658
|
+
(f(!0), h(U, null, F(s.value, (D, k) => (f(), h("button", {
|
|
659
|
+
key: `dot-${k}`,
|
|
660
|
+
onClick: (z) => g(k),
|
|
661
|
+
class: B(["btn btn-circle btn-xs", { "btn-active": k === n.value }]),
|
|
662
|
+
"aria-label": `Go to slide ${k + 1}`
|
|
663
663
|
}, null, 10, Nn))), 128))
|
|
664
664
|
])) : E("", !0)
|
|
665
665
|
]));
|
|
666
666
|
}
|
|
667
667
|
}), we = (e, t) => {
|
|
668
|
-
const
|
|
669
|
-
for (const [
|
|
670
|
-
n
|
|
671
|
-
return
|
|
672
|
-
},
|
|
668
|
+
const a = e.__vccOpts || e;
|
|
669
|
+
for (const [n, l] of t)
|
|
670
|
+
a[n] = l;
|
|
671
|
+
return a;
|
|
672
|
+
}, xl = /* @__PURE__ */ we(An, [["__scopeId", "data-v-db55a6a5"]]), Ln = /* @__PURE__ */ N({
|
|
673
673
|
__name: "carouselItem",
|
|
674
674
|
setup(e) {
|
|
675
675
|
const t = Gt(Mt, M({}));
|
|
676
|
-
return (
|
|
676
|
+
return (a, n) => (f(), h("div", {
|
|
677
677
|
class: "w-full h-full carousel-item",
|
|
678
678
|
style: ye(Z(t))
|
|
679
679
|
}, [
|
|
680
|
-
V(
|
|
680
|
+
V(a.$slots, "default", {}, void 0, !0)
|
|
681
681
|
], 4));
|
|
682
682
|
}
|
|
683
|
-
}),
|
|
683
|
+
}), kl = /* @__PURE__ */ we(Ln, [["__scopeId", "data-v-507384bc"]]), Un = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, jn = ["onClick"], Fn = {
|
|
684
684
|
key: 0,
|
|
685
685
|
class: "inline-component-wrapper flex grow justify-center items-center w-full h-full"
|
|
686
686
|
}, Rn = {
|
|
@@ -698,7 +698,7 @@ const gn = be("SunIcon", [
|
|
|
698
698
|
}, Qn = {
|
|
699
699
|
key: 1,
|
|
700
700
|
class: "opacity-35 text-sm"
|
|
701
|
-
}, ea = { class: "collapse-content flex place-content-center p-0" }, ta = /* @__PURE__ */
|
|
701
|
+
}, ea = { class: "collapse-content flex place-content-center p-0" }, ta = /* @__PURE__ */ N({
|
|
702
702
|
__name: "advancedSearch",
|
|
703
703
|
props: {
|
|
704
704
|
searchOptions: {},
|
|
@@ -708,7 +708,7 @@ const gn = be("SunIcon", [
|
|
|
708
708
|
},
|
|
709
709
|
emits: ["search", "update:search-data"],
|
|
710
710
|
setup(e, { emit: t }) {
|
|
711
|
-
const
|
|
711
|
+
const a = e, n = t, l = a.id ?? `advancedSearch-${Qt()}`, o = M(null), s = M(null), u = {
|
|
712
712
|
datetime: ze(() => import("./datetimePicker-B5De2MZQ.js")),
|
|
713
713
|
"standard-select": ze(() => import("./select-Cz4vf_YE.js")),
|
|
714
714
|
// Add other components here when you create them:
|
|
@@ -716,28 +716,28 @@ const gn = be("SunIcon", [
|
|
|
716
716
|
// 'custom-number': defineAsyncComponent(() => import('./CustomNumber.vue')),
|
|
717
717
|
"custom-text": ze(() => import("./inputField-BxT95oyM.js"))
|
|
718
718
|
// 'custom-select': defineAsyncComponent(() => import('./CustomSelect.vue')),
|
|
719
|
-
}, i = M({}),
|
|
719
|
+
}, i = M({}), r = M({
|
|
720
720
|
left: "0px",
|
|
721
721
|
top: "0px",
|
|
722
722
|
transform: "translateX(0%)"
|
|
723
|
-
}), m = M(null),
|
|
724
|
-
var
|
|
723
|
+
}), m = M(null), C = (v) => {
|
|
724
|
+
var T;
|
|
725
725
|
if (v.value === void 0 || v.value === null || v.value === "")
|
|
726
726
|
return "";
|
|
727
727
|
switch (v.type) {
|
|
728
728
|
case "datetime":
|
|
729
729
|
if (typeof v.value == "string")
|
|
730
730
|
try {
|
|
731
|
-
const
|
|
732
|
-
if (!isNaN(
|
|
733
|
-
return
|
|
731
|
+
const b = new Date(v.value);
|
|
732
|
+
if (!isNaN(b.getTime()))
|
|
733
|
+
return b.toLocaleString();
|
|
734
734
|
} catch {
|
|
735
735
|
}
|
|
736
736
|
else if (v.range && typeof v.value == "object" && v.value !== null && "start" in v.value && "end" in v.value)
|
|
737
737
|
try {
|
|
738
|
-
const
|
|
739
|
-
if (!isNaN(
|
|
740
|
-
return `${
|
|
738
|
+
const b = new Date(v.value.start), y = new Date(v.value.end);
|
|
739
|
+
if (!isNaN(b.getTime()) && !isNaN(y.getTime()))
|
|
740
|
+
return `${b.toLocaleDateString()} - ${y.toLocaleDateString()}`;
|
|
741
741
|
} catch {
|
|
742
742
|
}
|
|
743
743
|
break;
|
|
@@ -751,12 +751,12 @@ const gn = be("SunIcon", [
|
|
|
751
751
|
break;
|
|
752
752
|
case "standard-select":
|
|
753
753
|
case "custom-select":
|
|
754
|
-
if ((
|
|
755
|
-
const
|
|
756
|
-
(
|
|
754
|
+
if ((T = v.props) != null && T.options && Array.isArray(v.props.options)) {
|
|
755
|
+
const b = v.props.options.find(
|
|
756
|
+
(y) => y.value === v.value
|
|
757
757
|
);
|
|
758
|
-
if (
|
|
759
|
-
return
|
|
758
|
+
if (b)
|
|
759
|
+
return b.text;
|
|
760
760
|
}
|
|
761
761
|
return String(v.value);
|
|
762
762
|
case "custom-text":
|
|
@@ -767,61 +767,61 @@ const gn = be("SunIcon", [
|
|
|
767
767
|
return String(v.value);
|
|
768
768
|
};
|
|
769
769
|
function g(v) {
|
|
770
|
-
var
|
|
771
|
-
const
|
|
772
|
-
if (!
|
|
770
|
+
var c, w;
|
|
771
|
+
const T = (c = o.value) == null ? void 0 : c.name;
|
|
772
|
+
if (!T) {
|
|
773
773
|
console.warn("componentValueUpdated called but no active tab.");
|
|
774
774
|
return;
|
|
775
775
|
}
|
|
776
|
-
const
|
|
777
|
-
(
|
|
778
|
-
)) == null ? void 0 :
|
|
779
|
-
(
|
|
776
|
+
const b = (w = a.searchOptions.find(
|
|
777
|
+
(x) => (x == null ? void 0 : x.category) === a.currentCategory
|
|
778
|
+
)) == null ? void 0 : w.tabs, y = b == null ? void 0 : b.find(
|
|
779
|
+
(x) => x.name === T
|
|
780
780
|
);
|
|
781
|
-
|
|
782
|
-
tab:
|
|
781
|
+
y ? (y.value = v, n("update:search-data", {
|
|
782
|
+
tab: y.name,
|
|
783
783
|
data: v
|
|
784
784
|
})) : console.error(
|
|
785
|
-
`Tab with name "${
|
|
785
|
+
`Tab with name "${T}" not found in current category.`
|
|
786
786
|
);
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function p(v) {
|
|
789
789
|
g(v);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
|
|
791
|
+
function $() {
|
|
792
|
+
n("search");
|
|
793
793
|
}
|
|
794
|
-
async function
|
|
795
|
-
var
|
|
796
|
-
const
|
|
797
|
-
((
|
|
794
|
+
async function S(v) {
|
|
795
|
+
var y;
|
|
796
|
+
const T = document.getElementById(`advancedSearchMobile-${l}`), b = T && T.contains(v.target);
|
|
797
|
+
((y = o.value) == null ? void 0 : y.displayMode) === "popup" && m.value && !m.value.contains(v.target) && !b && (await Pe(), o.value = null);
|
|
798
798
|
}
|
|
799
|
-
async function
|
|
799
|
+
async function D() {
|
|
800
800
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
801
801
|
const v = document.getElementById(
|
|
802
|
-
`advancedSearchMobile-${
|
|
802
|
+
`advancedSearchMobile-${l}`
|
|
803
803
|
);
|
|
804
|
-
v ? (
|
|
805
|
-
`Mobile modal element not found. Ensure it exists with id="advancedSearchMobile-${
|
|
804
|
+
v ? (o.value = null, v.showModal()) : console.warn(
|
|
805
|
+
`Mobile modal element not found. Ensure it exists with id="advancedSearchMobile-${l}".`
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
async function
|
|
810
|
-
var
|
|
809
|
+
async function k(v) {
|
|
810
|
+
var b, y, c;
|
|
811
811
|
if (typeof window < "u" && window.innerWidth <= 768) {
|
|
812
|
-
|
|
812
|
+
D();
|
|
813
813
|
return;
|
|
814
814
|
}
|
|
815
|
-
const
|
|
816
|
-
if (((
|
|
817
|
-
|
|
818
|
-
else if (
|
|
819
|
-
const
|
|
820
|
-
if (
|
|
821
|
-
const
|
|
822
|
-
|
|
823
|
-
left: `${
|
|
824
|
-
top: `${
|
|
815
|
+
const T = v.displayMode ?? "popup";
|
|
816
|
+
if (((b = o.value) == null ? void 0 : b.name) === v.name && ((y = o.value) == null ? void 0 : y.displayMode) === T)
|
|
817
|
+
o.value = null;
|
|
818
|
+
else if (o.value = { ...v, displayMode: T }, await Pe(), ((c = o.value) == null ? void 0 : c.displayMode) === "popup") {
|
|
819
|
+
const w = i.value[v.name];
|
|
820
|
+
if (w && m.value) {
|
|
821
|
+
const x = w.getBoundingClientRect(), I = m.value.getBoundingClientRect(), A = x.bottom - I.top, H = x.left + x.width / 2 - I.left;
|
|
822
|
+
r.value = {
|
|
823
|
+
left: `${H}px`,
|
|
824
|
+
top: `${A + 8}px`,
|
|
825
825
|
// Add a small gap
|
|
826
826
|
transform: "translateX(-50%)"
|
|
827
827
|
// Center horizontally
|
|
@@ -834,22 +834,22 @@ const gn = be("SunIcon", [
|
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
836
|
const z = (v) => {
|
|
837
|
-
const
|
|
837
|
+
const T = v.relatedTarget;
|
|
838
838
|
setTimeout(() => {
|
|
839
|
-
var
|
|
840
|
-
((
|
|
839
|
+
var b;
|
|
840
|
+
((b = o.value) == null ? void 0 : b.displayMode) === "inline" && m.value && (!T || !m.value.contains(T)) ? (console.log("Blur detected outside container, closing inline view."), o.value = null) : console.log(
|
|
841
841
|
"Blur detected, but staying within container or not an inline tab."
|
|
842
842
|
);
|
|
843
843
|
}, 50);
|
|
844
844
|
}, j = () => {
|
|
845
|
-
console.log("Enter key pressed on inline component, closing inline view."),
|
|
845
|
+
console.log("Enter key pressed on inline component, closing inline view."), o.value = null;
|
|
846
846
|
};
|
|
847
847
|
R(s, (v) => {
|
|
848
|
-
var
|
|
848
|
+
var T;
|
|
849
849
|
console.log(
|
|
850
850
|
"advanced-search: inlineComponentRef changed. New Value:",
|
|
851
851
|
v
|
|
852
|
-
), console.log("advanced-search: activeTab.value:",
|
|
852
|
+
), console.log("advanced-search: activeTab.value:", o.value), v && ((T = o.value) == null ? void 0 : T.displayMode) === "inline" ? (console.log(
|
|
853
853
|
"advanced-search: Inline component ref is available and active tab is inline. Attempting to focus child input..."
|
|
854
854
|
), Pe(() => {
|
|
855
855
|
console.log(
|
|
@@ -867,26 +867,26 @@ const gn = be("SunIcon", [
|
|
|
867
867
|
v ? "advanced-search: inlineComponentRef available, but active tab is not inline." : "advanced-search: inlineComponentRef is now null (component likely unmounted)."
|
|
868
868
|
);
|
|
869
869
|
}), ue(() => {
|
|
870
|
-
document.addEventListener("click",
|
|
870
|
+
document.addEventListener("click", S), window.addEventListener("resize", q);
|
|
871
871
|
}), _e(() => {
|
|
872
|
-
document.removeEventListener("click",
|
|
872
|
+
document.removeEventListener("click", S), window.removeEventListener("resize", q);
|
|
873
873
|
});
|
|
874
|
-
const
|
|
875
|
-
var v,
|
|
874
|
+
const q = () => {
|
|
875
|
+
var v, T;
|
|
876
876
|
if (typeof window < "u") {
|
|
877
|
-
const
|
|
878
|
-
!
|
|
877
|
+
const b = window.innerWidth <= 768, y = o.value !== null && (o.value.displayMode === "popup" || o.value.displayMode === "inline") && window.innerWidth > 768;
|
|
878
|
+
!b && (((v = o.value) == null ? void 0 : v.displayMode) === "popup" || ((T = o.value) == null ? void 0 : T.displayMode) === "inline") && window.innerWidth <= 768 && (console.log("Resizing to mobile, closing active tab."), o.value = null), b && !y && o.value !== null && (console.log(
|
|
879
879
|
"Resizing to desktop from potential mobile active state, closing active tab."
|
|
880
|
-
),
|
|
881
|
-
const
|
|
882
|
-
`advancedSearchMobile-${
|
|
880
|
+
), o.value = null);
|
|
881
|
+
const c = document.getElementById(
|
|
882
|
+
`advancedSearchMobile-${l}`
|
|
883
883
|
);
|
|
884
|
-
|
|
884
|
+
c != null && c.open && !b && (console.log("Modal is open on desktop, closing modal and active tab."), c.close(), o.value = null);
|
|
885
885
|
}
|
|
886
886
|
};
|
|
887
|
-
return (v,
|
|
888
|
-
var
|
|
889
|
-
return f(),
|
|
887
|
+
return (v, T) => {
|
|
888
|
+
var b, y;
|
|
889
|
+
return f(), h(U, null, [
|
|
890
890
|
d("div", {
|
|
891
891
|
ref_key: "searchContainer",
|
|
892
892
|
ref: m,
|
|
@@ -894,58 +894,58 @@ const gn = be("SunIcon", [
|
|
|
894
894
|
}, [
|
|
895
895
|
d("div", {
|
|
896
896
|
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",
|
|
897
|
-
onClick:
|
|
897
|
+
onClick: D
|
|
898
898
|
}, [
|
|
899
899
|
d("div", Un, [
|
|
900
|
-
(f(!0),
|
|
901
|
-
(
|
|
902
|
-
)) == null ? void 0 :
|
|
903
|
-
var
|
|
904
|
-
return f(),
|
|
905
|
-
key: `${
|
|
906
|
-
onClick: te((Y) =>
|
|
900
|
+
(f(!0), h(U, null, F(((b = a.searchOptions.find(
|
|
901
|
+
(c) => c.category === a.currentCategory
|
|
902
|
+
)) == null ? void 0 : b.tabs) || [], (c, w) => {
|
|
903
|
+
var x, I, A, H, Q;
|
|
904
|
+
return f(), h("button", {
|
|
905
|
+
key: `${c.name}-${w}`,
|
|
906
|
+
onClick: te((Y) => k(c), ["stop"]),
|
|
907
907
|
class: B([{
|
|
908
|
-
"tab-active": ((
|
|
909
|
-
"tab-active-inline": ((I =
|
|
908
|
+
"tab-active": ((x = o.value) == null ? void 0 : x.name) === c.name,
|
|
909
|
+
"tab-active-inline": ((I = o.value) == null ? void 0 : I.name) === c.name && ((A = o.value) == null ? void 0 : A.displayMode) === "inline"
|
|
910
910
|
// Add new class
|
|
911
911
|
}, "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"]),
|
|
912
912
|
ref_for: !0,
|
|
913
|
-
ref: (Y) => i.value[
|
|
913
|
+
ref: (Y) => i.value[c.name] = Y
|
|
914
914
|
}, [
|
|
915
|
-
((
|
|
916
|
-
(f(), ae(Oe(u[
|
|
917
|
-
modelValue:
|
|
918
|
-
onUpdated:
|
|
919
|
-
"onUpdate:modelValue":
|
|
915
|
+
((H = o.value) == null ? void 0 : H.name) === c.name && ((Q = o.value) == null ? void 0 : Q.displayMode) === "inline" ? (f(), h("div", Fn, [
|
|
916
|
+
(f(), ae(Oe(u[o.value.type]), Ne({ ref_for: !0 }, o.value.props || {}, {
|
|
917
|
+
modelValue: o.value.value,
|
|
918
|
+
onUpdated: T[0] || (T[0] = (Y) => p(Y)),
|
|
919
|
+
"onUpdate:modelValue": T[1] || (T[1] = (Y) => p(Y)),
|
|
920
920
|
onBlur: z,
|
|
921
921
|
onKeydown: We(te(j, ["stop", "prevent"]), ["enter"]),
|
|
922
922
|
ref_for: !0,
|
|
923
923
|
ref_key: "inlineComponentRef",
|
|
924
924
|
ref: s
|
|
925
925
|
}), null, 16, ["modelValue", "onKeydown"]))
|
|
926
|
-
])) : (f(),
|
|
927
|
-
d("p", qn,
|
|
928
|
-
|
|
926
|
+
])) : (f(), h("div", Rn, [
|
|
927
|
+
d("p", qn, P(c.name), 1),
|
|
928
|
+
c.value !== void 0 && c.value !== null && c.value !== "" ? (f(), h("p", Hn, P(C(c)), 1)) : (f(), h("p", _n, P(c.description), 1))
|
|
929
929
|
]))
|
|
930
930
|
], 10, jn);
|
|
931
931
|
}), 128))
|
|
932
932
|
]),
|
|
933
|
-
|
|
933
|
+
o.value && o.value.displayMode === "popup" ? (f(), h("div", {
|
|
934
934
|
key: 0,
|
|
935
935
|
class: "absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",
|
|
936
|
-
style: ye(
|
|
936
|
+
style: ye(r.value)
|
|
937
937
|
}, [
|
|
938
|
-
(f(), ae(Oe(u[
|
|
939
|
-
modelValue:
|
|
940
|
-
onUpdated:
|
|
941
|
-
"onUpdate:modelValue":
|
|
938
|
+
(f(), ae(Oe(u[o.value.type]), Ne(o.value.props || {}, {
|
|
939
|
+
modelValue: o.value.value,
|
|
940
|
+
onUpdated: T[2] || (T[2] = (c) => g(c)),
|
|
941
|
+
"onUpdate:modelValue": T[3] || (T[3] = (c) => g(c))
|
|
942
942
|
}), null, 16, ["modelValue"]))
|
|
943
943
|
], 4)) : E("", !0),
|
|
944
944
|
d("button", {
|
|
945
945
|
title: "search",
|
|
946
946
|
type: "submit",
|
|
947
947
|
class: "ml-1 btn btn-primary btn-square",
|
|
948
|
-
onClick: te(
|
|
948
|
+
onClick: te($, ["stop"])
|
|
949
949
|
}, [
|
|
950
950
|
ie(Z(ht), {
|
|
951
951
|
size: 24,
|
|
@@ -956,7 +956,7 @@ const gn = be("SunIcon", [
|
|
|
956
956
|
d("div", Wn, [
|
|
957
957
|
d("button", {
|
|
958
958
|
title: "search",
|
|
959
|
-
onClick:
|
|
959
|
+
onClick: T[4] || (T[4] = () => {
|
|
960
960
|
})
|
|
961
961
|
}, [
|
|
962
962
|
ie(Z(ht), {
|
|
@@ -967,34 +967,34 @@ const gn = be("SunIcon", [
|
|
|
967
967
|
])
|
|
968
968
|
], 512),
|
|
969
969
|
d("dialog", {
|
|
970
|
-
id: `advancedSearchMobile-${Z(
|
|
970
|
+
id: `advancedSearchMobile-${Z(l)}`,
|
|
971
971
|
class: "modal"
|
|
972
972
|
}, [
|
|
973
973
|
d("div", Kn, [
|
|
974
974
|
V(v.$slots, "additionalForMobile", {}, () => [
|
|
975
|
-
d("h3", Yn,
|
|
975
|
+
d("h3", Yn, P(e.currentCategory), 1)
|
|
976
976
|
], !0),
|
|
977
|
-
(f(!0),
|
|
978
|
-
(
|
|
979
|
-
)) == null ? void 0 :
|
|
977
|
+
(f(!0), h(U, null, F(((y = a.searchOptions.find(
|
|
978
|
+
(c) => c.category === a.currentCategory
|
|
979
|
+
)) == null ? void 0 : y.tabs) || [], (c, w) => (f(), h("div", {
|
|
980
980
|
class: "collapse bg-base-200 my-4",
|
|
981
|
-
key:
|
|
981
|
+
key: c.name
|
|
982
982
|
}, [
|
|
983
983
|
d("input", {
|
|
984
984
|
type: "radio",
|
|
985
|
-
name: `accordion-${Z(
|
|
986
|
-
checked:
|
|
985
|
+
name: `accordion-${Z(l)}`,
|
|
986
|
+
checked: w === 0
|
|
987
987
|
}, null, 8, Jn),
|
|
988
988
|
d("div", Xn, [
|
|
989
|
-
d("div", null,
|
|
990
|
-
|
|
989
|
+
d("div", null, P(c.name), 1),
|
|
990
|
+
c.value !== void 0 && c.value !== null && c.value !== "" ? (f(), h("div", Gn, P(C(c)), 1)) : (f(), h("div", Qn, P(c.description), 1))
|
|
991
991
|
]),
|
|
992
992
|
d("div", ea, [
|
|
993
|
-
|
|
994
|
-
(f(), ae(Oe(u[
|
|
995
|
-
modelValue:
|
|
996
|
-
onUpdated:
|
|
997
|
-
"onUpdate:modelValue":
|
|
993
|
+
T[7] || (T[7] = d("br", null, null, -1)),
|
|
994
|
+
(f(), ae(Oe(u[c.type]), Ne({ ref_for: !0 }, c.props || {}, {
|
|
995
|
+
modelValue: c.value,
|
|
996
|
+
onUpdated: T[5] || (T[5] = (x) => g(x)),
|
|
997
|
+
"onUpdate:modelValue": T[6] || (T[6] = (x) => g(x))
|
|
998
998
|
}), null, 16, ["modelValue"]))
|
|
999
999
|
])
|
|
1000
1000
|
]))), 128)),
|
|
@@ -1002,7 +1002,7 @@ const gn = be("SunIcon", [
|
|
|
1002
1002
|
d("form", { method: "dialog" }, [
|
|
1003
1003
|
d("button", {
|
|
1004
1004
|
class: "btn btn-primary",
|
|
1005
|
-
onClick:
|
|
1005
|
+
onClick: $
|
|
1006
1006
|
}, " Close and Search ")
|
|
1007
1007
|
])
|
|
1008
1008
|
])
|
|
@@ -1011,7 +1011,7 @@ const gn = be("SunIcon", [
|
|
|
1011
1011
|
], 64);
|
|
1012
1012
|
};
|
|
1013
1013
|
}
|
|
1014
|
-
}), $
|
|
1014
|
+
}), $l = /* @__PURE__ */ we(ta, [["__scopeId", "data-v-577c3624"]]);
|
|
1015
1015
|
var ne, se;
|
|
1016
1016
|
class na {
|
|
1017
1017
|
/**
|
|
@@ -1029,84 +1029,84 @@ class na {
|
|
|
1029
1029
|
* @return {T}
|
|
1030
1030
|
*/
|
|
1031
1031
|
get current() {
|
|
1032
|
-
return
|
|
1032
|
+
return le(this, ne);
|
|
1033
1033
|
}
|
|
1034
1034
|
/**
|
|
1035
1035
|
* @param {T} value
|
|
1036
1036
|
*/
|
|
1037
1037
|
set current(t) {
|
|
1038
|
-
|
|
1038
|
+
le(this, ne) != t && (Ve(this, ne, t), le(this, se).forEach((a) => a(t)));
|
|
1039
1039
|
}
|
|
1040
1040
|
/**
|
|
1041
1041
|
* @type {import("hooks").Ref["on"]}
|
|
1042
1042
|
*/
|
|
1043
1043
|
on(t) {
|
|
1044
|
-
return
|
|
1044
|
+
return le(this, se).add(t), () => le(this, se).delete(t);
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
1047
|
ne = new WeakMap(), se = new WeakMap();
|
|
1048
1048
|
const It = (e) => new na(e), Ze = Symbol.for("atomico.hooks");
|
|
1049
1049
|
globalThis[Ze] = globalThis[Ze] || {};
|
|
1050
1050
|
let re = globalThis[Ze];
|
|
1051
|
-
const aa = Symbol.for("Atomico.suspense"), Et = Symbol.for("Atomico.effect"),
|
|
1052
|
-
const { i:
|
|
1053
|
-
return
|
|
1054
|
-
},
|
|
1055
|
-
let
|
|
1056
|
-
const
|
|
1057
|
-
for (const
|
|
1058
|
-
const m =
|
|
1051
|
+
const aa = Symbol.for("Atomico.suspense"), Et = Symbol.for("Atomico.effect"), oa = Symbol.for("Atomico.layoutEffect"), Bt = Symbol.for("Atomico.insertionEffect"), ce = (e, t, a) => {
|
|
1052
|
+
const { i: n, hooks: l } = re.c, o = l[n] = l[n] || {};
|
|
1053
|
+
return o.value = e(o.value), o.effect = t, o.tag = a, re.c.i++, l[n].value;
|
|
1054
|
+
}, la = (e) => ce((t = It(e)) => t), xe = () => ce((e = It(re.c.host)) => e), Vt = () => re.c.update, sa = (e, t, a = 0) => {
|
|
1055
|
+
let n = {}, l = !1;
|
|
1056
|
+
const o = () => l, s = (u, i) => {
|
|
1057
|
+
for (const r in n) {
|
|
1058
|
+
const m = n[r];
|
|
1059
1059
|
m.effect && m.tag === u && (m.value = m.effect(m.value, i));
|
|
1060
1060
|
}
|
|
1061
1061
|
};
|
|
1062
1062
|
return { load: (u) => {
|
|
1063
|
-
re.c = { host: t, hooks:
|
|
1063
|
+
re.c = { host: t, hooks: n, update: e, i: 0, id: a };
|
|
1064
1064
|
let i;
|
|
1065
1065
|
try {
|
|
1066
|
-
|
|
1067
|
-
} catch (
|
|
1068
|
-
if (
|
|
1069
|
-
throw
|
|
1070
|
-
|
|
1066
|
+
l = !1, i = u();
|
|
1067
|
+
} catch (r) {
|
|
1068
|
+
if (r !== aa)
|
|
1069
|
+
throw r;
|
|
1070
|
+
l = !0;
|
|
1071
1071
|
} finally {
|
|
1072
1072
|
re.c = null;
|
|
1073
1073
|
}
|
|
1074
1074
|
return i;
|
|
1075
|
-
}, cleanEffects: (u) => (s(Bt, u), () => (s(
|
|
1075
|
+
}, cleanEffects: (u) => (s(Bt, u), () => (s(oa, u), () => {
|
|
1076
1076
|
s(Et, u);
|
|
1077
|
-
})), isSuspense:
|
|
1077
|
+
})), isSuspense: o };
|
|
1078
1078
|
}, de = Symbol.for;
|
|
1079
1079
|
function zt(e, t) {
|
|
1080
|
-
const
|
|
1081
|
-
if (
|
|
1080
|
+
const a = e.length;
|
|
1081
|
+
if (a !== t.length)
|
|
1082
1082
|
return !1;
|
|
1083
|
-
for (let
|
|
1084
|
-
let
|
|
1085
|
-
if (
|
|
1083
|
+
for (let n = 0; n < a; n++) {
|
|
1084
|
+
let l = e[n], o = t[n];
|
|
1085
|
+
if (l !== o)
|
|
1086
1086
|
return !1;
|
|
1087
1087
|
}
|
|
1088
1088
|
return !0;
|
|
1089
1089
|
}
|
|
1090
1090
|
const W = (e) => typeof e == "function", me = (e) => typeof e == "object", { isArray: ia } = Array, Ke = (e, t) => (t ? e instanceof HTMLStyleElement : !0) && "hydrate" in ((e == null ? void 0 : e.dataset) || {});
|
|
1091
1091
|
function Pt(e, t) {
|
|
1092
|
-
let
|
|
1093
|
-
const
|
|
1094
|
-
let { length:
|
|
1095
|
-
for (let s = 0; s <
|
|
1096
|
-
const u =
|
|
1092
|
+
let a;
|
|
1093
|
+
const n = (l) => {
|
|
1094
|
+
let { length: o } = l;
|
|
1095
|
+
for (let s = 0; s < o; s++) {
|
|
1096
|
+
const u = l[s];
|
|
1097
1097
|
if (u && Array.isArray(u))
|
|
1098
|
-
|
|
1098
|
+
n(u);
|
|
1099
1099
|
else {
|
|
1100
1100
|
const i = typeof u;
|
|
1101
1101
|
if (u == null || i === "function" || i === "boolean")
|
|
1102
1102
|
continue;
|
|
1103
|
-
i === "string" || i === "number" ? (
|
|
1103
|
+
i === "string" || i === "number" ? (a == null && (a = ""), a += u) : (a != null && (t(a), a = null), t(u));
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
};
|
|
1107
|
-
|
|
1107
|
+
n(e), a != null && t(a);
|
|
1108
1108
|
}
|
|
1109
|
-
const Ot = (e, t,
|
|
1109
|
+
const Ot = (e, t, a) => (e.addEventListener(t, a), () => e.removeEventListener(t, a));
|
|
1110
1110
|
class Nt {
|
|
1111
1111
|
/**
|
|
1112
1112
|
*
|
|
@@ -1114,8 +1114,8 @@ class Nt {
|
|
|
1114
1114
|
* @param {string} message
|
|
1115
1115
|
* @param {string} value
|
|
1116
1116
|
*/
|
|
1117
|
-
constructor(t,
|
|
1118
|
-
this.message =
|
|
1117
|
+
constructor(t, a, n) {
|
|
1118
|
+
this.message = a, this.target = t, this.value = n;
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
1121
|
class At extends Nt {
|
|
@@ -1123,14 +1123,14 @@ class At extends Nt {
|
|
|
1123
1123
|
class ra extends Nt {
|
|
1124
1124
|
}
|
|
1125
1125
|
const De = "Custom", ua = null, ca = { true: 1, "": 1, 1: 1 };
|
|
1126
|
-
function da(e, t,
|
|
1126
|
+
function da(e, t, a, n, l) {
|
|
1127
1127
|
const {
|
|
1128
|
-
type:
|
|
1128
|
+
type: o,
|
|
1129
1129
|
reflect: s,
|
|
1130
1130
|
event: u,
|
|
1131
1131
|
value: i,
|
|
1132
|
-
attr:
|
|
1133
|
-
} = (
|
|
1132
|
+
attr: r = fa(t)
|
|
1133
|
+
} = (a == null ? void 0 : a.name) != De && me(a) && a != ua ? a : { type: a }, m = (o == null ? void 0 : o.name) === De && o.map, C = i != null ? o == Function || !W(i) ? () => i : i : null;
|
|
1134
1134
|
Object.defineProperty(e, t, {
|
|
1135
1135
|
configurable: !0,
|
|
1136
1136
|
/**
|
|
@@ -1138,20 +1138,20 @@ function da(e, t, n, a, o) {
|
|
|
1138
1138
|
* @param {any} newValue
|
|
1139
1139
|
*/
|
|
1140
1140
|
set(g) {
|
|
1141
|
-
const
|
|
1142
|
-
|
|
1143
|
-
const { error:
|
|
1144
|
-
|
|
1141
|
+
const p = this[t];
|
|
1142
|
+
C && o != Boolean && g == null && (g = C());
|
|
1143
|
+
const { error: $, value: S } = (m ? ha : va)(
|
|
1144
|
+
o,
|
|
1145
1145
|
g
|
|
1146
1146
|
);
|
|
1147
|
-
if (
|
|
1147
|
+
if ($ && S != null)
|
|
1148
1148
|
throw new At(
|
|
1149
1149
|
this,
|
|
1150
|
-
`The value defined for prop '${t}' must be of type '${
|
|
1151
|
-
|
|
1150
|
+
`The value defined for prop '${t}' must be of type '${o.name}'`,
|
|
1151
|
+
S
|
|
1152
1152
|
);
|
|
1153
|
-
|
|
1154
|
-
s && (this._ignoreAttr =
|
|
1153
|
+
p != S && (this._props[t] = S ?? void 0, this.update(), u && Lt(this, u), this.updated.then(() => {
|
|
1154
|
+
s && (this._ignoreAttr = r, ma(this, o, r, this[t]), this._ignoreAttr = null);
|
|
1155
1155
|
}));
|
|
1156
1156
|
},
|
|
1157
1157
|
/**
|
|
@@ -1160,11 +1160,11 @@ function da(e, t, n, a, o) {
|
|
|
1160
1160
|
get() {
|
|
1161
1161
|
return this._props[t];
|
|
1162
1162
|
}
|
|
1163
|
-
}),
|
|
1163
|
+
}), C && (l[t] = C()), n[r] = { prop: t, type: o };
|
|
1164
1164
|
}
|
|
1165
|
-
const Lt = (e, { type: t, base:
|
|
1166
|
-
|
|
1167
|
-
(t == null ? void 0 : t.name) === De && (t != null && t.serialize) ? t == null ? void 0 : t.serialize(
|
|
1165
|
+
const Lt = (e, { type: t, base: a = CustomEvent, ...n }) => e.dispatchEvent(new a(t, n)), fa = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase(), ma = (e, t, a, n) => n == null || t == Boolean && !n ? e.removeAttribute(a) : e.setAttribute(
|
|
1166
|
+
a,
|
|
1167
|
+
(t == null ? void 0 : t.name) === De && (t != null && t.serialize) ? t == null ? void 0 : t.serialize(n) : me(n) ? JSON.stringify(n) : t == Boolean ? "" : n
|
|
1168
1168
|
), pa = (e, t) => e == Boolean ? !!ca[t] : e == Number ? Number(t) : e == String ? t : e == Array || e == Object ? JSON.parse(t) : e.name == De ? t : (
|
|
1169
1169
|
// TODO: If when defining reflect the prop can also be of type string?
|
|
1170
1170
|
new e(t)
|
|
@@ -1186,15 +1186,15 @@ const Lt = (e, { type: t, base: n = CustomEvent, ...a }) => e.dispatchEvent(new
|
|
|
1186
1186
|
} : { value: t, error: !0 };
|
|
1187
1187
|
let ga = 0;
|
|
1188
1188
|
const ya = (e) => {
|
|
1189
|
-
var
|
|
1190
|
-
return ((
|
|
1189
|
+
var a;
|
|
1190
|
+
return ((a = (e == null ? void 0 : e.dataset) || {}) == null ? void 0 : a.hydrate) || "" || "c" + ga++;
|
|
1191
1191
|
}, ke = (e, t = HTMLElement) => {
|
|
1192
|
-
const
|
|
1193
|
-
class i extends
|
|
1192
|
+
const a = {}, n = {}, l = "prototype" in t && t.prototype instanceof Element, o = l ? t : "base" in t ? t.base : HTMLElement, { props: s, styles: u } = l ? e : t;
|
|
1193
|
+
class i extends o {
|
|
1194
1194
|
constructor() {
|
|
1195
1195
|
super(), this._setup(), this._render = () => e({ ...this._props });
|
|
1196
|
-
for (const m in
|
|
1197
|
-
this[m] =
|
|
1196
|
+
for (const m in n)
|
|
1197
|
+
this[m] = n[m];
|
|
1198
1198
|
}
|
|
1199
1199
|
/**
|
|
1200
1200
|
* @returns {import("core").Sheets[]}
|
|
@@ -1206,14 +1206,14 @@ const ya = (e) => {
|
|
|
1206
1206
|
if (this._props)
|
|
1207
1207
|
return;
|
|
1208
1208
|
this._props = {};
|
|
1209
|
-
let m,
|
|
1209
|
+
let m, C;
|
|
1210
1210
|
this.mounted = new Promise(
|
|
1211
|
-
(
|
|
1212
|
-
|
|
1211
|
+
(D) => this.mount = () => {
|
|
1212
|
+
D(), m != this.parentNode && (C != m ? this.unmounted.then(this.update) : this.update()), m = this.parentNode;
|
|
1213
1213
|
}
|
|
1214
1214
|
), this.unmounted = new Promise(
|
|
1215
|
-
(
|
|
1216
|
-
|
|
1215
|
+
(D) => this.unmount = () => {
|
|
1216
|
+
D(), (m != this.parentNode || !this.isConnected) && (g.cleanEffects(!0)()(), C = this.parentNode, m = null);
|
|
1217
1217
|
}
|
|
1218
1218
|
), this.symbolId = this.symbolId || Symbol(), this.symbolIdParent = Symbol();
|
|
1219
1219
|
const g = sa(
|
|
@@ -1221,22 +1221,22 @@ const ya = (e) => {
|
|
|
1221
1221
|
this,
|
|
1222
1222
|
ya(this)
|
|
1223
1223
|
);
|
|
1224
|
-
let
|
|
1225
|
-
const
|
|
1226
|
-
this.update = () => (
|
|
1224
|
+
let p, $ = !0;
|
|
1225
|
+
const S = Ke(this);
|
|
1226
|
+
this.update = () => (p || (p = !0, this.updated = (this.updated || this.mounted).then(() => {
|
|
1227
1227
|
try {
|
|
1228
|
-
const
|
|
1229
|
-
return
|
|
1230
|
-
|
|
1228
|
+
const D = g.load(this._render), k = g.cleanEffects();
|
|
1229
|
+
return D && //@ts-ignore
|
|
1230
|
+
D.render(this, this.symbolId, S), p = !1, $ && !g.isSuspense() && ($ = !1, !S && ba(this)), k();
|
|
1231
1231
|
} finally {
|
|
1232
|
-
|
|
1232
|
+
p = !1;
|
|
1233
1233
|
}
|
|
1234
1234
|
}).then(
|
|
1235
1235
|
/**
|
|
1236
1236
|
* @param {import("internal/hooks.js").CleanUseEffects} [cleanUseEffect]
|
|
1237
1237
|
*/
|
|
1238
|
-
(
|
|
1239
|
-
|
|
1238
|
+
(D) => {
|
|
1239
|
+
D && D();
|
|
1240
1240
|
}
|
|
1241
1241
|
)), this.updated), this.update();
|
|
1242
1242
|
}
|
|
@@ -1252,55 +1252,55 @@ const ya = (e) => {
|
|
|
1252
1252
|
* @param {(string|null)} oldValue
|
|
1253
1253
|
* @param {(string|null)} value
|
|
1254
1254
|
*/
|
|
1255
|
-
attributeChangedCallback(m,
|
|
1256
|
-
if (
|
|
1257
|
-
if (m === this._ignoreAttr ||
|
|
1255
|
+
attributeChangedCallback(m, C, g) {
|
|
1256
|
+
if (a[m]) {
|
|
1257
|
+
if (m === this._ignoreAttr || C === g)
|
|
1258
1258
|
return;
|
|
1259
|
-
const { prop:
|
|
1259
|
+
const { prop: p, type: $ } = a[m];
|
|
1260
1260
|
try {
|
|
1261
|
-
this[
|
|
1261
|
+
this[p] = pa($, g);
|
|
1262
1262
|
} catch {
|
|
1263
1263
|
throw new ra(
|
|
1264
1264
|
this,
|
|
1265
|
-
`The value defined as attr '${m}' cannot be parsed by type '${
|
|
1265
|
+
`The value defined as attr '${m}' cannot be parsed by type '${$.name}'`,
|
|
1266
1266
|
g
|
|
1267
1267
|
);
|
|
1268
1268
|
}
|
|
1269
1269
|
} else
|
|
1270
|
-
super.attributeChangedCallback(m,
|
|
1270
|
+
super.attributeChangedCallback(m, C, g);
|
|
1271
1271
|
}
|
|
1272
1272
|
static get props() {
|
|
1273
1273
|
return { ...super.props, ...s };
|
|
1274
1274
|
}
|
|
1275
1275
|
static get observedAttributes() {
|
|
1276
1276
|
const m = super.observedAttributes || [];
|
|
1277
|
-
for (const
|
|
1278
|
-
da(this.prototype,
|
|
1279
|
-
return Object.keys(
|
|
1277
|
+
for (const C in s)
|
|
1278
|
+
da(this.prototype, C, s[C], a, n);
|
|
1279
|
+
return Object.keys(a).concat(m);
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
return i;
|
|
1283
1283
|
};
|
|
1284
1284
|
function ba(e) {
|
|
1285
|
-
const { styles: t } = e.constructor, { shadowRoot:
|
|
1286
|
-
if (
|
|
1287
|
-
const
|
|
1288
|
-
Pt(t, (
|
|
1289
|
-
|
|
1290
|
-
}),
|
|
1285
|
+
const { styles: t } = e.constructor, { shadowRoot: a } = e;
|
|
1286
|
+
if (a && t.length) {
|
|
1287
|
+
const n = [];
|
|
1288
|
+
Pt(t, (l) => {
|
|
1289
|
+
l && (l instanceof Element ? a.appendChild(l.cloneNode(!0)) : n.push(l));
|
|
1290
|
+
}), n.length && (a.adoptedStyleSheets = n);
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
|
-
const Ut = (e) => (t,
|
|
1293
|
+
const Ut = (e) => (t, a) => {
|
|
1294
1294
|
ce(
|
|
1295
1295
|
/**
|
|
1296
1296
|
* Clean the effect hook
|
|
1297
1297
|
* @type {import("internal/hooks.js").CollectorEffect}
|
|
1298
1298
|
*/
|
|
1299
|
-
([
|
|
1299
|
+
([n, l] = []) => ((l || !l) && (l && zt(l, a) ? n = n || !0 : (W(n) && n(), n = null)), [n, a]),
|
|
1300
1300
|
/**
|
|
1301
1301
|
* @returns {any}
|
|
1302
1302
|
*/
|
|
1303
|
-
([
|
|
1303
|
+
([n, l], o) => o ? (W(n) && n(), []) : [n || t(), l],
|
|
1304
1304
|
e
|
|
1305
1305
|
);
|
|
1306
1306
|
}, ve = Ut(Et), wa = Ut(Bt);
|
|
@@ -1310,16 +1310,16 @@ class jt extends Array {
|
|
|
1310
1310
|
* @param {any} initialState
|
|
1311
1311
|
* @param {(nextState: any, state:any[], mount: boolean )=>void} mapState
|
|
1312
1312
|
*/
|
|
1313
|
-
constructor(t,
|
|
1314
|
-
let
|
|
1315
|
-
const
|
|
1313
|
+
constructor(t, a) {
|
|
1314
|
+
let n = !0;
|
|
1315
|
+
const l = (o) => {
|
|
1316
1316
|
try {
|
|
1317
|
-
|
|
1317
|
+
a(o, this, n);
|
|
1318
1318
|
} finally {
|
|
1319
|
-
|
|
1319
|
+
n = !1;
|
|
1320
1320
|
}
|
|
1321
1321
|
};
|
|
1322
|
-
super(void 0,
|
|
1322
|
+
super(void 0, l, a), l(t);
|
|
1323
1323
|
}
|
|
1324
1324
|
/**
|
|
1325
1325
|
* The following code allows a mutable approach to useState
|
|
@@ -1337,13 +1337,13 @@ class jt extends Array {
|
|
|
1337
1337
|
const Ge = (e) => {
|
|
1338
1338
|
const t = Vt();
|
|
1339
1339
|
return ce(
|
|
1340
|
-
(
|
|
1341
|
-
|
|
1342
|
-
})) =>
|
|
1340
|
+
(a = new jt(e, (n, l, o) => {
|
|
1341
|
+
n = W(n) ? n(l[0]) : n, n !== l[0] && (l[0] = n, o || t());
|
|
1342
|
+
})) => a
|
|
1343
1343
|
);
|
|
1344
1344
|
}, J = (e, t) => {
|
|
1345
|
-
const [
|
|
1346
|
-
return
|
|
1345
|
+
const [a] = ce(([n, l, o = 0] = []) => ((!l || l && !zt(l, t)) && (n = e()), [n, t, o]));
|
|
1346
|
+
return a;
|
|
1347
1347
|
}, Qe = (e) => {
|
|
1348
1348
|
const { current: t } = xe();
|
|
1349
1349
|
if (!(e in t))
|
|
@@ -1353,17 +1353,17 @@ const Ge = (e) => {
|
|
|
1353
1353
|
e
|
|
1354
1354
|
);
|
|
1355
1355
|
return ce(
|
|
1356
|
-
(
|
|
1357
|
-
|
|
1358
|
-
})) => (
|
|
1356
|
+
(a = new jt(t[e], (n, l) => {
|
|
1357
|
+
n = W(n) ? n(t[e]) : n, t[e] = n;
|
|
1358
|
+
})) => (a[0] = t[e], a)
|
|
1359
1359
|
);
|
|
1360
1360
|
}, X = (e, t = {}) => {
|
|
1361
|
-
const
|
|
1362
|
-
return
|
|
1361
|
+
const a = xe();
|
|
1362
|
+
return a[e] || (a[e] = (n = t.detail) => Lt(a.current, {
|
|
1363
1363
|
type: e,
|
|
1364
1364
|
...t,
|
|
1365
|
-
detail:
|
|
1366
|
-
})),
|
|
1365
|
+
detail: n
|
|
1366
|
+
})), a[e];
|
|
1367
1367
|
}, Ye = de("atomico/options");
|
|
1368
1368
|
globalThis[Ye] = globalThis[Ye] || {
|
|
1369
1369
|
sheet: !!document.adoptedStyleSheets
|
|
@@ -1393,181 +1393,181 @@ class Xe extends Text {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
const Sa = de("atomico/id"), pe = de("atomico/type"), Le = de("atomico/ref"), Rt = de("atomico/vnode"), Ca = () => {
|
|
1395
1395
|
};
|
|
1396
|
-
function Da(e, t,
|
|
1397
|
-
return Ht(this, e, t,
|
|
1396
|
+
function Da(e, t, a) {
|
|
1397
|
+
return Ht(this, e, t, a);
|
|
1398
1398
|
}
|
|
1399
|
-
const qt = (e, t, ...
|
|
1400
|
-
const
|
|
1401
|
-
let { children:
|
|
1402
|
-
if (
|
|
1403
|
-
return
|
|
1404
|
-
const
|
|
1399
|
+
const qt = (e, t, ...a) => {
|
|
1400
|
+
const n = t || Se;
|
|
1401
|
+
let { children: l } = n;
|
|
1402
|
+
if (l = l ?? (a.length ? a : Je), e === Ca)
|
|
1403
|
+
return l;
|
|
1404
|
+
const o = e ? e instanceof Node ? 1 : (
|
|
1405
1405
|
//@ts-ignore
|
|
1406
1406
|
e.prototype instanceof HTMLElement && 2
|
|
1407
1407
|
) : 0;
|
|
1408
|
-
if (
|
|
1408
|
+
if (o === !1 && e instanceof Function)
|
|
1409
1409
|
return e(
|
|
1410
|
-
|
|
1410
|
+
l != Je ? { children: l, ...n } : n
|
|
1411
1411
|
);
|
|
1412
1412
|
const s = Ft.render || Da;
|
|
1413
1413
|
return {
|
|
1414
1414
|
[pe]: Rt,
|
|
1415
1415
|
type: e,
|
|
1416
|
-
props:
|
|
1417
|
-
children:
|
|
1418
|
-
key:
|
|
1416
|
+
props: n,
|
|
1417
|
+
children: l,
|
|
1418
|
+
key: n.key,
|
|
1419
1419
|
// key for lists by keys
|
|
1420
1420
|
// define if the node declares its shadowDom
|
|
1421
|
-
shadow:
|
|
1421
|
+
shadow: n.shadowDom,
|
|
1422
1422
|
// allows renderings to run only once
|
|
1423
|
-
static:
|
|
1423
|
+
static: n.staticNode,
|
|
1424
1424
|
// defines whether the type is a childNode `1` or a constructor `2`
|
|
1425
|
-
raw:
|
|
1425
|
+
raw: o,
|
|
1426
1426
|
// defines whether to use the second parameter for document.createElement
|
|
1427
|
-
is:
|
|
1427
|
+
is: n.is,
|
|
1428
1428
|
// clone the node if it comes from a reference
|
|
1429
|
-
clone:
|
|
1429
|
+
clone: n.cloneNode,
|
|
1430
1430
|
render: s
|
|
1431
1431
|
};
|
|
1432
1432
|
};
|
|
1433
|
-
function Ht(e, t,
|
|
1434
|
-
let
|
|
1435
|
-
if (t && t[
|
|
1433
|
+
function Ht(e, t, a = Sa, n, l) {
|
|
1434
|
+
let o;
|
|
1435
|
+
if (t && t[a] && t[a].vnode == e || e[pe] != Rt)
|
|
1436
1436
|
return t;
|
|
1437
|
-
(e || !t) && (
|
|
1437
|
+
(e || !t) && (l = l || e.type == "svg", o = e.type != "host" && (e.raw == 1 ? (t && e.clone ? t[Le] : t) != e.type : e.raw == 2 ? !(t instanceof e.type) : t ? t[Le] || t.localName != e.type : !t), o && e.type != null && (e.raw == 1 && e.clone ? (n = !0, t = e.type.cloneNode(!0), t[Le] = e.type) : t = e.raw == 1 ? e.type : e.raw == 2 ? new e.type() : l ? document.createElementNS(
|
|
1438
1438
|
"http://www.w3.org/2000/svg",
|
|
1439
1439
|
e.type
|
|
1440
1440
|
) : document.createElement(
|
|
1441
1441
|
e.type,
|
|
1442
1442
|
e.is ? { is: e.is } : void 0
|
|
1443
1443
|
)));
|
|
1444
|
-
const s = t[
|
|
1445
|
-
let { fragment:
|
|
1446
|
-
const { children:
|
|
1447
|
-
if (m =
|
|
1444
|
+
const s = t[a] ? t[a] : Se, { vnode: u = Se, cycle: i = 0 } = s;
|
|
1445
|
+
let { fragment: r, handlers: m } = s;
|
|
1446
|
+
const { children: C = Je, props: g = Se } = u;
|
|
1447
|
+
if (m = o ? {} : m || {}, e.static && !o)
|
|
1448
1448
|
return t;
|
|
1449
1449
|
if (e.shadow && !t.shadowRoot && // @ts-ignore
|
|
1450
|
-
t.attachShadow({ mode: "open", ...e.shadow }), e.props != g && Ia(t, g, e.props, m,
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1450
|
+
t.attachShadow({ mode: "open", ...e.shadow }), e.props != g && Ia(t, g, e.props, m, l), e.children !== C) {
|
|
1451
|
+
const p = e.shadow ? t.shadowRoot : t;
|
|
1452
|
+
r = Ma(
|
|
1453
1453
|
e.children,
|
|
1454
1454
|
/**
|
|
1455
1455
|
* @todo for hydration use attribute and send childNodes
|
|
1456
1456
|
*/
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1457
|
+
r,
|
|
1458
|
+
p,
|
|
1459
|
+
a,
|
|
1460
1460
|
// add support to foreignObject, children will escape from svg
|
|
1461
|
-
!i &&
|
|
1462
|
-
|
|
1461
|
+
!i && n,
|
|
1462
|
+
l && e.type == "foreignObject" ? !1 : l
|
|
1463
1463
|
);
|
|
1464
1464
|
}
|
|
1465
|
-
return t[
|
|
1465
|
+
return t[a] = { vnode: e, handlers: m, fragment: r, cycle: i + 1 }, t;
|
|
1466
1466
|
}
|
|
1467
1467
|
function Ta(e, t) {
|
|
1468
|
-
const
|
|
1469
|
-
let
|
|
1470
|
-
if (e[t ? "prepend" : "append"](
|
|
1471
|
-
let { lastElementChild:
|
|
1472
|
-
for (;
|
|
1473
|
-
const { previousElementSibling: s } =
|
|
1474
|
-
if (Ke(
|
|
1475
|
-
|
|
1468
|
+
const a = new Xe(""), n = new Xe("");
|
|
1469
|
+
let l;
|
|
1470
|
+
if (e[t ? "prepend" : "append"](a), t) {
|
|
1471
|
+
let { lastElementChild: o } = e;
|
|
1472
|
+
for (; o; ) {
|
|
1473
|
+
const { previousElementSibling: s } = o;
|
|
1474
|
+
if (Ke(o, !0) && !Ke(s, !0)) {
|
|
1475
|
+
l = o;
|
|
1476
1476
|
break;
|
|
1477
1477
|
}
|
|
1478
|
-
|
|
1478
|
+
o = s;
|
|
1479
1479
|
}
|
|
1480
1480
|
}
|
|
1481
|
-
return
|
|
1482
|
-
markStart:
|
|
1483
|
-
markEnd:
|
|
1481
|
+
return l ? l.before(n) : e.append(n), {
|
|
1482
|
+
markStart: a,
|
|
1483
|
+
markEnd: n
|
|
1484
1484
|
};
|
|
1485
1485
|
}
|
|
1486
|
-
function Ma(e, t, n,
|
|
1486
|
+
function Ma(e, t, a, n, l, o) {
|
|
1487
1487
|
e = e == null ? null : ia(e) ? e : [e];
|
|
1488
|
-
const s = t || Ta(
|
|
1488
|
+
const s = t || Ta(a, l), { markStart: u, markEnd: i, keyes: r } = s;
|
|
1489
1489
|
let m;
|
|
1490
|
-
const
|
|
1490
|
+
const C = r && /* @__PURE__ */ new Set();
|
|
1491
1491
|
let g = u;
|
|
1492
|
-
if (e && Pt(e, (
|
|
1493
|
-
if (typeof
|
|
1492
|
+
if (e && Pt(e, (p) => {
|
|
1493
|
+
if (typeof p == "object" && !p[pe])
|
|
1494
1494
|
return;
|
|
1495
|
-
const
|
|
1496
|
-
g != i && g ===
|
|
1497
|
-
const
|
|
1498
|
-
let
|
|
1499
|
-
if (
|
|
1500
|
-
|
|
1495
|
+
const $ = p[pe] && p.key, S = r && $ != null && r.get($);
|
|
1496
|
+
g != i && g === S ? C.delete(g) : g = g == i ? i : g.nextSibling;
|
|
1497
|
+
const D = r ? S : g;
|
|
1498
|
+
let k = D;
|
|
1499
|
+
if (p[pe])
|
|
1500
|
+
k = Ht(p, D, n, l, o);
|
|
1501
1501
|
else {
|
|
1502
|
-
const z =
|
|
1503
|
-
!(
|
|
1502
|
+
const z = p + "";
|
|
1503
|
+
!(k instanceof Text) || k instanceof Xe ? k = new Text(z) : k.data != z && (k.data = z);
|
|
1504
1504
|
}
|
|
1505
|
-
|
|
1505
|
+
k != g && (r && C.delete(k), !D || r ? (a.insertBefore(k, g), r && g != i && C.add(g)) : D == i ? a.insertBefore(k, i) : (a.replaceChild(k, D), g = k)), $ != null && (m = m || /* @__PURE__ */ new Map(), m.set($, k));
|
|
1506
1506
|
}), g = g == i ? i : g.nextSibling, t && g != i)
|
|
1507
1507
|
for (; g != i; ) {
|
|
1508
|
-
const
|
|
1509
|
-
g = g.nextSibling,
|
|
1508
|
+
const p = g;
|
|
1509
|
+
g = g.nextSibling, p.remove();
|
|
1510
1510
|
}
|
|
1511
|
-
return
|
|
1511
|
+
return C && C.forEach((p) => p.remove()), s.keyes = m, s;
|
|
1512
1512
|
}
|
|
1513
|
-
function Ia(e, t,
|
|
1514
|
-
for (const
|
|
1515
|
-
!(
|
|
1516
|
-
for (const
|
|
1517
|
-
vt(e,
|
|
1513
|
+
function Ia(e, t, a, n, l) {
|
|
1514
|
+
for (const o in t)
|
|
1515
|
+
!(o in a) && vt(e, o, t[o], null, l, n);
|
|
1516
|
+
for (const o in a)
|
|
1517
|
+
vt(e, o, t[o], a[o], l, n);
|
|
1518
1518
|
}
|
|
1519
|
-
function vt(e, t, n,
|
|
1520
|
-
if (t = t == "class" && !
|
|
1521
|
-
if (t[0] == "o" && t[1] == "n" && (W(
|
|
1522
|
-
Ea(e, t.slice(2),
|
|
1519
|
+
function vt(e, t, a, n, l, o) {
|
|
1520
|
+
if (t = t == "class" && !l ? "className" : t, a = a ?? null, n = n ?? null, t in e && xa[t] && (a = e[t]), !(n === a || $a[t] || t[0] == "_"))
|
|
1521
|
+
if (t[0] == "o" && t[1] == "n" && (W(n) || W(a)))
|
|
1522
|
+
Ea(e, t.slice(2), n, o);
|
|
1523
1523
|
else if (t == "ref")
|
|
1524
|
-
|
|
1524
|
+
n && (W(n) ? n(e) : n.current = e);
|
|
1525
1525
|
else if (t == "style") {
|
|
1526
1526
|
const { style: s } = e;
|
|
1527
|
-
|
|
1528
|
-
const u = me(
|
|
1527
|
+
a = a || "", n = n || "";
|
|
1528
|
+
const u = me(a), i = me(n);
|
|
1529
1529
|
if (u)
|
|
1530
|
-
for (const
|
|
1530
|
+
for (const r in a)
|
|
1531
1531
|
if (i)
|
|
1532
|
-
!(
|
|
1532
|
+
!(r in n) && gt(s, r, null);
|
|
1533
1533
|
else
|
|
1534
1534
|
break;
|
|
1535
1535
|
if (i)
|
|
1536
|
-
for (const
|
|
1537
|
-
const m =
|
|
1538
|
-
u &&
|
|
1536
|
+
for (const r in n) {
|
|
1537
|
+
const m = n[r];
|
|
1538
|
+
u && a[r] === m || gt(s, r, m);
|
|
1539
1539
|
}
|
|
1540
1540
|
else
|
|
1541
|
-
s.cssText =
|
|
1541
|
+
s.cssText = n;
|
|
1542
1542
|
} else {
|
|
1543
1543
|
const s = t[0] == "$" ? t.slice(1) : t;
|
|
1544
|
-
s === t && (!
|
|
1544
|
+
s === t && (!l && !ka[t] && t in e || W(n) || W(a)) ? e[t] = n ?? "" : n == null ? e.removeAttribute(s) : e.setAttribute(
|
|
1545
1545
|
s,
|
|
1546
|
-
me(
|
|
1546
|
+
me(n) ? JSON.stringify(n) : n
|
|
1547
1547
|
);
|
|
1548
1548
|
}
|
|
1549
1549
|
}
|
|
1550
|
-
function Ea(e, t,
|
|
1551
|
-
if (
|
|
1552
|
-
if (!
|
|
1553
|
-
const
|
|
1554
|
-
e.addEventListener(t,
|
|
1550
|
+
function Ea(e, t, a, n) {
|
|
1551
|
+
if (n.handleEvent || (n.handleEvent = (l) => n[l.type].call(e, l)), a) {
|
|
1552
|
+
if (!n[t]) {
|
|
1553
|
+
const l = a.capture || a.once || a.passive ? Object.assign({}, a) : null;
|
|
1554
|
+
e.addEventListener(t, n, l);
|
|
1555
1555
|
}
|
|
1556
|
-
|
|
1556
|
+
n[t] = a;
|
|
1557
1557
|
} else
|
|
1558
|
-
|
|
1558
|
+
n[t] && (e.removeEventListener(t, n), delete n[t]);
|
|
1559
1559
|
}
|
|
1560
|
-
function gt(e, t,
|
|
1561
|
-
let
|
|
1562
|
-
|
|
1560
|
+
function gt(e, t, a) {
|
|
1561
|
+
let n = "setProperty";
|
|
1562
|
+
a == null && (n = "removeProperty", a = null), ~t.indexOf("-") ? e[n](t, a) : e[t] = a;
|
|
1563
1563
|
}
|
|
1564
1564
|
const yt = {};
|
|
1565
1565
|
function Me(e, ...t) {
|
|
1566
|
-
const
|
|
1567
|
-
(
|
|
1566
|
+
const a = (e.raw || e).reduce(
|
|
1567
|
+
(n, l, o) => n + l + (t[o] || ""),
|
|
1568
1568
|
""
|
|
1569
1569
|
);
|
|
1570
|
-
return yt[
|
|
1570
|
+
return yt[a] = yt[a] || Ba(a);
|
|
1571
1571
|
}
|
|
1572
1572
|
function Ba(e) {
|
|
1573
1573
|
if (Ft.sheet) {
|
|
@@ -1579,16 +1579,16 @@ function Ba(e) {
|
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
1581
|
const Va = qt("host", { style: "display: contents" }), Ue = de("atomico/context"), za = (e, t) => {
|
|
1582
|
-
const
|
|
1582
|
+
const a = xe();
|
|
1583
1583
|
wa(
|
|
1584
1584
|
() => Ot(
|
|
1585
|
-
|
|
1585
|
+
a.current,
|
|
1586
1586
|
"ConnectContext",
|
|
1587
1587
|
/**
|
|
1588
1588
|
* @param {CustomEvent<import("context").DetailConnectContext>} event
|
|
1589
1589
|
*/
|
|
1590
|
-
(
|
|
1591
|
-
e ===
|
|
1590
|
+
(n) => {
|
|
1591
|
+
e === n.detail.id && (n.stopPropagation(), n.detail.connect(t));
|
|
1592
1592
|
}
|
|
1593
1593
|
),
|
|
1594
1594
|
[e]
|
|
@@ -1597,29 +1597,29 @@ const Va = qt("host", { style: "display: contents" }), Ue = de("atomico/context"
|
|
|
1597
1597
|
const t = X("ConnectContext", {
|
|
1598
1598
|
bubbles: !0,
|
|
1599
1599
|
composed: !0
|
|
1600
|
-
}),
|
|
1601
|
-
let
|
|
1600
|
+
}), a = () => {
|
|
1601
|
+
let o;
|
|
1602
1602
|
return t({
|
|
1603
1603
|
id: e,
|
|
1604
1604
|
connect(s) {
|
|
1605
|
-
|
|
1605
|
+
o = s;
|
|
1606
1606
|
}
|
|
1607
|
-
}),
|
|
1608
|
-
}, [
|
|
1609
|
-
|
|
1607
|
+
}), o;
|
|
1608
|
+
}, [n, l] = Ge(
|
|
1609
|
+
a
|
|
1610
1610
|
);
|
|
1611
1611
|
return ve(() => {
|
|
1612
|
-
|
|
1612
|
+
n || (e[Ue] || (e[Ue] = customElements.whenDefined(
|
|
1613
1613
|
new e().localName
|
|
1614
1614
|
)), e[Ue].then(
|
|
1615
|
-
() =>
|
|
1615
|
+
() => l(a)
|
|
1616
1616
|
));
|
|
1617
|
-
}, [e]),
|
|
1617
|
+
}, [e]), n;
|
|
1618
1618
|
}, Oa = (e) => {
|
|
1619
|
-
const t = Pa(e),
|
|
1619
|
+
const t = Pa(e), a = Vt();
|
|
1620
1620
|
return ve(() => {
|
|
1621
1621
|
if (t)
|
|
1622
|
-
return Ot(t, "UpdatedValue",
|
|
1622
|
+
return Ot(t, "UpdatedValue", a);
|
|
1623
1623
|
}, [t]), (t || e).value;
|
|
1624
1624
|
}, Na = (e) => {
|
|
1625
1625
|
const t = ke(
|
|
@@ -1635,14 +1635,14 @@ const Va = qt("host", { style: "display: contents" }), Ue = de("atomico/context"
|
|
|
1635
1635
|
}
|
|
1636
1636
|
);
|
|
1637
1637
|
return t.value = e, t;
|
|
1638
|
-
},
|
|
1638
|
+
}, O = (e, t, a) => (t == null ? t = { key: a } : t.key = a, qt(e, t)), he = O, _t = Me`*,*:before,*:after{box-sizing:border-box}button{padding:0;touch-action:manipulation;cursor:pointer;user-select:none}`, Wt = Me`.vh{position:absolute;transform:scale(0)}`;
|
|
1639
1639
|
function et() {
|
|
1640
1640
|
const e = /* @__PURE__ */ new Date();
|
|
1641
1641
|
return new L(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
1642
1642
|
}
|
|
1643
1643
|
function tt(e, t = 0) {
|
|
1644
|
-
const
|
|
1645
|
-
return
|
|
1644
|
+
const a = _(e), n = a.getUTCDay(), l = (n < t ? 7 : 0) + n - t;
|
|
1645
|
+
return a.setUTCDate(a.getUTCDate() - l), L.from(a);
|
|
1646
1646
|
}
|
|
1647
1647
|
function Zt(e, t = 0) {
|
|
1648
1648
|
return tt(e, t).add({ days: 6 });
|
|
@@ -1650,40 +1650,40 @@ function Zt(e, t = 0) {
|
|
|
1650
1650
|
function Kt(e) {
|
|
1651
1651
|
return L.from(new Date(Date.UTC(e.year, e.month, 0)));
|
|
1652
1652
|
}
|
|
1653
|
-
function Ie(e, t,
|
|
1654
|
-
return t && L.compare(e, t) < 0 ? t :
|
|
1653
|
+
function Ie(e, t, a) {
|
|
1654
|
+
return t && L.compare(e, t) < 0 ? t : a && L.compare(e, a) > 0 ? a : e;
|
|
1655
1655
|
}
|
|
1656
1656
|
const Aa = { days: 1 };
|
|
1657
1657
|
function La(e, t = 0) {
|
|
1658
|
-
let
|
|
1659
|
-
const
|
|
1660
|
-
for (; L.compare(
|
|
1661
|
-
const
|
|
1658
|
+
let a = tt(e.toPlainDate(), t);
|
|
1659
|
+
const n = Zt(Kt(e), t), l = [];
|
|
1660
|
+
for (; L.compare(a, n) < 0; ) {
|
|
1661
|
+
const o = [];
|
|
1662
1662
|
for (let s = 0; s < 7; s++)
|
|
1663
|
-
|
|
1664
|
-
|
|
1663
|
+
o.push(a), a = a.add(Aa);
|
|
1664
|
+
l.push(o);
|
|
1665
1665
|
}
|
|
1666
|
-
return
|
|
1666
|
+
return l;
|
|
1667
1667
|
}
|
|
1668
1668
|
function _(e) {
|
|
1669
1669
|
return new Date(Date.UTC(e.year, e.month - 1, e.day ?? 1));
|
|
1670
1670
|
}
|
|
1671
1671
|
const Ua = /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[0-1])$/, je = (e, t) => e.toString().padStart(t, "0");
|
|
1672
1672
|
class L {
|
|
1673
|
-
constructor(t,
|
|
1674
|
-
this.year = t, this.month =
|
|
1673
|
+
constructor(t, a, n) {
|
|
1674
|
+
this.year = t, this.month = a, this.day = n;
|
|
1675
1675
|
}
|
|
1676
1676
|
// this is an incomplete implementation that only handles arithmetic on a single unit at a time.
|
|
1677
1677
|
// i didn't want to get into more complex arithmetic since it get tricky fast
|
|
1678
1678
|
// this is enough to serve my needs and will still be a drop-in replacement when actual Temporal API lands
|
|
1679
1679
|
add(t) {
|
|
1680
|
-
const
|
|
1680
|
+
const a = _(this);
|
|
1681
1681
|
if ("days" in t)
|
|
1682
|
-
return
|
|
1683
|
-
let { year:
|
|
1684
|
-
"months" in t ? (
|
|
1685
|
-
const
|
|
1686
|
-
return Ie(L.from(
|
|
1682
|
+
return a.setUTCDate(this.day + t.days), L.from(a);
|
|
1683
|
+
let { year: n, month: l } = this;
|
|
1684
|
+
"months" in t ? (l = this.month + t.months, a.setUTCMonth(l - 1)) : (n = this.year + t.years, a.setUTCFullYear(n));
|
|
1685
|
+
const o = L.from(_({ year: n, month: l, day: 1 }));
|
|
1686
|
+
return Ie(L.from(a), o, Kt(o));
|
|
1687
1687
|
}
|
|
1688
1688
|
toString() {
|
|
1689
1689
|
return `${je(this.year, 4)}-${je(this.month, 2)}-${je(this.day, 2)}`;
|
|
@@ -1694,19 +1694,19 @@ class L {
|
|
|
1694
1694
|
equals(t) {
|
|
1695
1695
|
return L.compare(this, t) === 0;
|
|
1696
1696
|
}
|
|
1697
|
-
static compare(t,
|
|
1698
|
-
return t.year <
|
|
1697
|
+
static compare(t, a) {
|
|
1698
|
+
return t.year < a.year ? -1 : t.year > a.year ? 1 : t.month < a.month ? -1 : t.month > a.month ? 1 : t.day < a.day ? -1 : t.day > a.day ? 1 : 0;
|
|
1699
1699
|
}
|
|
1700
1700
|
static from(t) {
|
|
1701
1701
|
if (typeof t == "string") {
|
|
1702
|
-
const
|
|
1703
|
-
if (!
|
|
1702
|
+
const a = t.match(Ua);
|
|
1703
|
+
if (!a)
|
|
1704
1704
|
throw new TypeError(t);
|
|
1705
|
-
const [,
|
|
1705
|
+
const [, n, l, o] = a;
|
|
1706
1706
|
return new L(
|
|
1707
|
-
parseInt(
|
|
1708
|
-
parseInt(
|
|
1709
|
-
parseInt(
|
|
1707
|
+
parseInt(n, 10),
|
|
1708
|
+
parseInt(l, 10),
|
|
1709
|
+
parseInt(o, 10)
|
|
1710
1710
|
);
|
|
1711
1711
|
}
|
|
1712
1712
|
return new L(
|
|
@@ -1717,12 +1717,12 @@ class L {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
}
|
|
1719
1719
|
class Ee {
|
|
1720
|
-
constructor(t,
|
|
1721
|
-
this.year = t, this.month =
|
|
1720
|
+
constructor(t, a) {
|
|
1721
|
+
this.year = t, this.month = a;
|
|
1722
1722
|
}
|
|
1723
1723
|
add(t) {
|
|
1724
|
-
const
|
|
1725
|
-
return
|
|
1724
|
+
const a = _(this), n = (t.months ?? 0) + (t.years ?? 0) * 12;
|
|
1725
|
+
return a.setUTCMonth(a.getUTCMonth() + n), new Ee(a.getUTCFullYear(), a.getUTCMonth() + 1);
|
|
1726
1726
|
}
|
|
1727
1727
|
equals(t) {
|
|
1728
1728
|
return this.year === t.year && this.month === t.month;
|
|
@@ -1739,26 +1739,26 @@ function Te(e, t) {
|
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
1741
|
function G(e) {
|
|
1742
|
-
const [t,
|
|
1743
|
-
return [J(() => Te(L, t), [t]), (
|
|
1742
|
+
const [t, a] = Qe(e);
|
|
1743
|
+
return [J(() => Te(L, t), [t]), (n) => a(n == null ? void 0 : n.toString())];
|
|
1744
1744
|
}
|
|
1745
1745
|
function ja(e) {
|
|
1746
|
-
const [t = "",
|
|
1746
|
+
const [t = "", a] = Qe(e);
|
|
1747
1747
|
return [J(() => {
|
|
1748
|
-
const [
|
|
1749
|
-
return
|
|
1750
|
-
}, [t]), (
|
|
1748
|
+
const [n, l] = t.split("/"), o = Te(L, n), s = Te(L, l);
|
|
1749
|
+
return o && s ? [o, s] : [];
|
|
1750
|
+
}, [t]), (n) => a(`${n[0]}/${n[1]}`)];
|
|
1751
1751
|
}
|
|
1752
1752
|
function Fa(e) {
|
|
1753
|
-
const [t = "",
|
|
1753
|
+
const [t = "", a] = Qe(e);
|
|
1754
1754
|
return [J(() => {
|
|
1755
|
-
const
|
|
1756
|
-
for (const
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1755
|
+
const n = [];
|
|
1756
|
+
for (const l of t.trim().split(/\s+/)) {
|
|
1757
|
+
const o = Te(L, l);
|
|
1758
|
+
o && n.push(o);
|
|
1759
1759
|
}
|
|
1760
|
-
return
|
|
1761
|
-
}, [t]), (
|
|
1760
|
+
return n;
|
|
1761
|
+
}, [t]), (n) => a(n.join(" "))];
|
|
1762
1762
|
}
|
|
1763
1763
|
function ge(e, t) {
|
|
1764
1764
|
return J(
|
|
@@ -1766,111 +1766,111 @@ function ge(e, t) {
|
|
|
1766
1766
|
[t, e]
|
|
1767
1767
|
);
|
|
1768
1768
|
}
|
|
1769
|
-
function bt(e, t,
|
|
1770
|
-
const
|
|
1769
|
+
function bt(e, t, a) {
|
|
1770
|
+
const n = ge(e, a);
|
|
1771
1771
|
return J(() => {
|
|
1772
|
-
const
|
|
1772
|
+
const l = [], o = /* @__PURE__ */ new Date();
|
|
1773
1773
|
for (var s = 0; s < 7; s++) {
|
|
1774
|
-
const u = (
|
|
1775
|
-
|
|
1774
|
+
const u = (o.getUTCDay() - t + 7) % 7;
|
|
1775
|
+
l[u] = n.format(o), o.setUTCDate(o.getUTCDate() + 1);
|
|
1776
1776
|
}
|
|
1777
|
-
return
|
|
1778
|
-
}, [t,
|
|
1777
|
+
return l;
|
|
1778
|
+
}, [t, n]);
|
|
1779
1779
|
}
|
|
1780
|
-
const wt = (e, t,
|
|
1780
|
+
const wt = (e, t, a) => Ie(e, t, a) === e, xt = (e) => e.target.matches(":dir(ltr)"), Ra = { month: "long", day: "numeric" }, qa = { month: "long" }, Ha = { weekday: "long" }, Fe = { bubbles: !0 };
|
|
1781
1781
|
function _a({ props: e, context: t }) {
|
|
1782
|
-
const { offset:
|
|
1783
|
-
firstDayOfWeek:
|
|
1784
|
-
isDateDisallowed:
|
|
1785
|
-
min:
|
|
1782
|
+
const { offset: a } = e, {
|
|
1783
|
+
firstDayOfWeek: n,
|
|
1784
|
+
isDateDisallowed: l,
|
|
1785
|
+
min: o,
|
|
1786
1786
|
max: s,
|
|
1787
1787
|
today: u,
|
|
1788
1788
|
page: i,
|
|
1789
|
-
locale:
|
|
1789
|
+
locale: r,
|
|
1790
1790
|
focusedDate: m,
|
|
1791
|
-
formatWeekday:
|
|
1792
|
-
} = t, g = u ?? et(),
|
|
1793
|
-
() => ({ weekday:
|
|
1794
|
-
[
|
|
1795
|
-
),
|
|
1796
|
-
() => i.start.add({ months:
|
|
1797
|
-
[i,
|
|
1791
|
+
formatWeekday: C
|
|
1792
|
+
} = t, g = u ?? et(), p = bt(Ha, n, r), $ = J(
|
|
1793
|
+
() => ({ weekday: C }),
|
|
1794
|
+
[C]
|
|
1795
|
+
), S = bt($, n, r), D = ge(Ra, r), k = ge(qa, r), z = J(
|
|
1796
|
+
() => i.start.add({ months: a }),
|
|
1797
|
+
[i, a]
|
|
1798
1798
|
), j = J(
|
|
1799
|
-
() => La(z,
|
|
1800
|
-
[z,
|
|
1801
|
-
),
|
|
1802
|
-
function
|
|
1803
|
-
|
|
1799
|
+
() => La(z, n),
|
|
1800
|
+
[z, n]
|
|
1801
|
+
), q = X("focusday", Fe), v = X("selectday", Fe), T = X("hoverday", Fe);
|
|
1802
|
+
function b(w) {
|
|
1803
|
+
q(Ie(w, o, s));
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1806
|
-
let
|
|
1807
|
-
switch (
|
|
1805
|
+
function y(w) {
|
|
1806
|
+
let x;
|
|
1807
|
+
switch (w.key) {
|
|
1808
1808
|
case "ArrowRight":
|
|
1809
|
-
|
|
1809
|
+
x = m.add({ days: xt(w) ? 1 : -1 });
|
|
1810
1810
|
break;
|
|
1811
1811
|
case "ArrowLeft":
|
|
1812
|
-
|
|
1812
|
+
x = m.add({ days: xt(w) ? -1 : 1 });
|
|
1813
1813
|
break;
|
|
1814
1814
|
case "ArrowDown":
|
|
1815
|
-
|
|
1815
|
+
x = m.add({ days: 7 });
|
|
1816
1816
|
break;
|
|
1817
1817
|
case "ArrowUp":
|
|
1818
|
-
|
|
1818
|
+
x = m.add({ days: -7 });
|
|
1819
1819
|
break;
|
|
1820
1820
|
case "PageUp":
|
|
1821
|
-
|
|
1821
|
+
x = m.add(w.shiftKey ? { years: -1 } : { months: -1 });
|
|
1822
1822
|
break;
|
|
1823
1823
|
case "PageDown":
|
|
1824
|
-
|
|
1824
|
+
x = m.add(w.shiftKey ? { years: 1 } : { months: 1 });
|
|
1825
1825
|
break;
|
|
1826
1826
|
case "Home":
|
|
1827
|
-
|
|
1827
|
+
x = tt(m, n);
|
|
1828
1828
|
break;
|
|
1829
1829
|
case "End":
|
|
1830
|
-
|
|
1830
|
+
x = Zt(m, n);
|
|
1831
1831
|
break;
|
|
1832
1832
|
default:
|
|
1833
1833
|
return;
|
|
1834
1834
|
}
|
|
1835
|
-
x
|
|
1835
|
+
b(x), w.preventDefault();
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1837
|
+
function c(w) {
|
|
1838
1838
|
var rt, ut;
|
|
1839
|
-
const
|
|
1840
|
-
if (!t.showOutsideDays &&
|
|
1839
|
+
const x = z.equals(w);
|
|
1840
|
+
if (!t.showOutsideDays && !x)
|
|
1841
1841
|
return;
|
|
1842
|
-
const I =
|
|
1843
|
-
let it = "",
|
|
1842
|
+
const I = w.equals(m), A = w.equals(g), H = _(w), Q = l == null ? void 0 : l(H), Y = !wt(w, o, s);
|
|
1843
|
+
let it = "", oe;
|
|
1844
1844
|
if (t.type === "range") {
|
|
1845
|
-
const [ee, fe] = t.value, ct = ee == null ? void 0 : ee.equals(
|
|
1846
|
-
|
|
1845
|
+
const [ee, fe] = t.value, ct = ee == null ? void 0 : ee.equals(w), dt = fe == null ? void 0 : fe.equals(w);
|
|
1846
|
+
oe = ee && fe && wt(w, ee, fe), it = `${ct ? "range-start" : ""} ${dt ? "range-end" : ""} ${oe && !ct && !dt ? "range-inner" : ""}`;
|
|
1847
1847
|
} else
|
|
1848
|
-
t.type === "multi" ?
|
|
1848
|
+
t.type === "multi" ? oe = t.value.some((ee) => ee.equals(w)) : oe = (rt = t.value) == null ? void 0 : rt.equals(w);
|
|
1849
1849
|
return {
|
|
1850
|
-
part: `${`button day day-${
|
|
1851
|
-
|
|
1852
|
-
tabindex:
|
|
1850
|
+
part: `${`button day day-${H.getDay()} ${// we don't want outside days to ever be shown as selected
|
|
1851
|
+
x ? oe ? "selected" : "" : "outside"} ${Q ? "disallowed" : ""} ${A ? "today" : ""} ${((ut = t.getDayParts) == null ? void 0 : ut.call(t, H)) ?? ""}`} ${it}`,
|
|
1852
|
+
tabindex: x && I ? 0 : -1,
|
|
1853
1853
|
disabled: Y,
|
|
1854
1854
|
"aria-disabled": Q ? "true" : void 0,
|
|
1855
|
-
"aria-pressed":
|
|
1856
|
-
"aria-current":
|
|
1857
|
-
"aria-label":
|
|
1858
|
-
onkeydown:
|
|
1855
|
+
"aria-pressed": x && oe,
|
|
1856
|
+
"aria-current": A ? "date" : void 0,
|
|
1857
|
+
"aria-label": D.format(H),
|
|
1858
|
+
onkeydown: y,
|
|
1859
1859
|
onclick() {
|
|
1860
|
-
Q || v(
|
|
1860
|
+
Q || v(w), b(w);
|
|
1861
1861
|
},
|
|
1862
1862
|
onmouseover() {
|
|
1863
|
-
!Q && !Y &&
|
|
1863
|
+
!Q && !Y && T(w);
|
|
1864
1864
|
}
|
|
1865
1865
|
};
|
|
1866
1866
|
}
|
|
1867
1867
|
return {
|
|
1868
1868
|
weeks: j,
|
|
1869
1869
|
yearMonth: z,
|
|
1870
|
-
daysLong:
|
|
1871
|
-
daysVisible:
|
|
1872
|
-
formatter:
|
|
1873
|
-
getDayProps:
|
|
1870
|
+
daysLong: p,
|
|
1871
|
+
daysVisible: S,
|
|
1872
|
+
formatter: k,
|
|
1873
|
+
getDayProps: c
|
|
1874
1874
|
};
|
|
1875
1875
|
}
|
|
1876
1876
|
const Re = et(), nt = Na({
|
|
@@ -1882,28 +1882,28 @@ const Re = et(), nt = Na({
|
|
|
1882
1882
|
customElements.define("calendar-ctx", nt);
|
|
1883
1883
|
const Wa = (e, t) => (t + e) % 7, Za = ke(
|
|
1884
1884
|
(e) => {
|
|
1885
|
-
const t = Oa(nt),
|
|
1886
|
-
function
|
|
1887
|
-
var
|
|
1888
|
-
(
|
|
1885
|
+
const t = Oa(nt), a = la(), n = _a({ props: e, context: t });
|
|
1886
|
+
function l() {
|
|
1887
|
+
var o;
|
|
1888
|
+
(o = a.current.querySelector("button[tabindex='0']")) == null || o.focus();
|
|
1889
1889
|
}
|
|
1890
|
-
return /* @__PURE__ */ he("host", { shadowDom: !0, focus:
|
|
1891
|
-
/* @__PURE__ */
|
|
1892
|
-
/* @__PURE__ */ he("table", { ref:
|
|
1893
|
-
/* @__PURE__ */
|
|
1890
|
+
return /* @__PURE__ */ he("host", { shadowDom: !0, focus: l, children: [
|
|
1891
|
+
/* @__PURE__ */ O("div", { id: "h", part: "heading", children: n.formatter.format(_(n.yearMonth)) }),
|
|
1892
|
+
/* @__PURE__ */ he("table", { ref: a, "aria-labelledby": "h", part: "table", children: [
|
|
1893
|
+
/* @__PURE__ */ O("thead", { children: /* @__PURE__ */ O("tr", { part: "tr head", children: n.daysLong.map((o, s) => /* @__PURE__ */ he(
|
|
1894
1894
|
"th",
|
|
1895
1895
|
{
|
|
1896
1896
|
part: `th day day-${Wa(t.firstDayOfWeek, s)}`,
|
|
1897
1897
|
scope: "col",
|
|
1898
1898
|
children: [
|
|
1899
|
-
/* @__PURE__ */
|
|
1900
|
-
/* @__PURE__ */
|
|
1899
|
+
/* @__PURE__ */ O("span", { class: "vh", children: o }),
|
|
1900
|
+
/* @__PURE__ */ O("span", { "aria-hidden": "true", children: n.daysVisible[s] })
|
|
1901
1901
|
]
|
|
1902
1902
|
}
|
|
1903
1903
|
)) }) }),
|
|
1904
|
-
/* @__PURE__ */
|
|
1905
|
-
const
|
|
1906
|
-
return /* @__PURE__ */
|
|
1904
|
+
/* @__PURE__ */ O("tbody", { children: n.weeks.map((o, s) => /* @__PURE__ */ O("tr", { part: "tr week", children: o.map((u, i) => {
|
|
1905
|
+
const r = n.getDayProps(u);
|
|
1906
|
+
return /* @__PURE__ */ O("td", { part: "td", children: r && /* @__PURE__ */ O("button", { ...r, children: u.day }) }, i);
|
|
1907
1907
|
}) }, s)) })
|
|
1908
1908
|
] })
|
|
1909
1909
|
] });
|
|
@@ -1924,38 +1924,38 @@ const Wa = (e, t) => (t + e) % 7, Za = ke(
|
|
|
1924
1924
|
);
|
|
1925
1925
|
customElements.define("calendar-month", Za);
|
|
1926
1926
|
function kt(e) {
|
|
1927
|
-
return /* @__PURE__ */
|
|
1927
|
+
return /* @__PURE__ */ O(
|
|
1928
1928
|
"button",
|
|
1929
1929
|
{
|
|
1930
1930
|
part: `button ${e.name} ${e.onclick ? "" : "disabled"}`,
|
|
1931
1931
|
onclick: e.onclick,
|
|
1932
1932
|
"aria-disabled": e.onclick ? null : "true",
|
|
1933
|
-
children: /* @__PURE__ */
|
|
1933
|
+
children: /* @__PURE__ */ O("slot", { name: e.name, children: e.children })
|
|
1934
1934
|
}
|
|
1935
1935
|
);
|
|
1936
1936
|
}
|
|
1937
1937
|
function at(e) {
|
|
1938
|
-
const t = _(e.page.start),
|
|
1938
|
+
const t = _(e.page.start), a = _(e.page.end);
|
|
1939
1939
|
return /* @__PURE__ */ he("div", { role: "group", "aria-labelledby": "h", part: "container", children: [
|
|
1940
|
-
/* @__PURE__ */
|
|
1940
|
+
/* @__PURE__ */ O("div", { id: "h", class: "vh", "aria-live": "polite", "aria-atomic": "true", children: e.formatVerbose.formatRange(t, a) }),
|
|
1941
1941
|
/* @__PURE__ */ he("div", { part: "header", children: [
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
/* @__PURE__ */
|
|
1944
|
-
/* @__PURE__ */
|
|
1942
|
+
/* @__PURE__ */ O(kt, { name: "previous", onclick: e.previous, children: "Previous" }),
|
|
1943
|
+
/* @__PURE__ */ O("slot", { part: "heading", name: "heading", children: /* @__PURE__ */ O("div", { "aria-hidden": "true", children: e.format.formatRange(t, a) }) }),
|
|
1944
|
+
/* @__PURE__ */ O(kt, { name: "next", onclick: e.next, children: "Next" })
|
|
1945
1945
|
] }),
|
|
1946
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ O(
|
|
1947
1947
|
nt,
|
|
1948
1948
|
{
|
|
1949
1949
|
value: e,
|
|
1950
1950
|
onselectday: e.onSelect,
|
|
1951
1951
|
onfocusday: e.onFocus,
|
|
1952
1952
|
onhoverday: e.onHover,
|
|
1953
|
-
children: /* @__PURE__ */
|
|
1953
|
+
children: /* @__PURE__ */ O("slot", {})
|
|
1954
1954
|
}
|
|
1955
1955
|
)
|
|
1956
1956
|
] });
|
|
1957
1957
|
}
|
|
1958
|
-
const
|
|
1958
|
+
const ot = {
|
|
1959
1959
|
value: {
|
|
1960
1960
|
type: String,
|
|
1961
1961
|
value: ""
|
|
@@ -2010,7 +2010,7 @@ const lt = {
|
|
|
2010
2010
|
type: String,
|
|
2011
2011
|
value: () => "months"
|
|
2012
2012
|
}
|
|
2013
|
-
},
|
|
2013
|
+
}, lt = [
|
|
2014
2014
|
_t,
|
|
2015
2015
|
Wt,
|
|
2016
2016
|
Me`:host{display:block;inline-size:fit-content}[role=group]{display:flex;flex-direction:column;gap:1em}:host::part(header){display:flex;align-items:center;justify-content:space-between}:host::part(heading){font-weight:700;font-size:1.25em}button{display:flex;align-items:center;justify-content:center}button[aria-disabled]{cursor:default;opacity:.5}`
|
|
@@ -2025,178 +2025,178 @@ const $t = (e, t) => (e = t === 12 ? new Ee(e.year, 1) : e, {
|
|
|
2025
2025
|
function Ja({
|
|
2026
2026
|
pageBy: e,
|
|
2027
2027
|
focusedDate: t,
|
|
2028
|
-
months:
|
|
2029
|
-
max:
|
|
2030
|
-
min:
|
|
2031
|
-
goto:
|
|
2028
|
+
months: a,
|
|
2029
|
+
max: n,
|
|
2030
|
+
min: l,
|
|
2031
|
+
goto: o
|
|
2032
2032
|
}) {
|
|
2033
|
-
const s = e === "single" ? 1 :
|
|
2034
|
-
() => $t(t.toPlainYearMonth(),
|
|
2035
|
-
),
|
|
2036
|
-
const g = qe(u.start,
|
|
2037
|
-
return g >= 0 && g <
|
|
2033
|
+
const s = e === "single" ? 1 : a, [u, i] = Ge(
|
|
2034
|
+
() => $t(t.toPlainYearMonth(), a)
|
|
2035
|
+
), r = (C) => i($t(u.start.add({ months: C }), a)), m = (C) => {
|
|
2036
|
+
const g = qe(u.start, C.toPlainYearMonth());
|
|
2037
|
+
return g >= 0 && g < a;
|
|
2038
2038
|
};
|
|
2039
2039
|
return ve(() => {
|
|
2040
2040
|
if (m(t))
|
|
2041
2041
|
return;
|
|
2042
|
-
const
|
|
2043
|
-
|
|
2042
|
+
const C = qe(t.toPlainYearMonth(), u.start);
|
|
2043
|
+
o(t.add({ months: C }));
|
|
2044
2044
|
}, [u.start]), ve(() => {
|
|
2045
2045
|
if (m(t))
|
|
2046
2046
|
return;
|
|
2047
|
-
const
|
|
2048
|
-
|
|
2049
|
-
}, [t, s,
|
|
2047
|
+
const C = qe(u.start, t.toPlainYearMonth());
|
|
2048
|
+
r(C === -1 ? -s : C === a ? s : Math.floor(C / a) * a);
|
|
2049
|
+
}, [t, s, a]), {
|
|
2050
2050
|
page: u,
|
|
2051
|
-
previous: !
|
|
2052
|
-
next: !
|
|
2051
|
+
previous: !l || !m(l) ? () => r(-s) : void 0,
|
|
2052
|
+
next: !n || !m(n) ? () => r(s) : void 0
|
|
2053
2053
|
};
|
|
2054
2054
|
}
|
|
2055
2055
|
function st({
|
|
2056
2056
|
months: e,
|
|
2057
2057
|
pageBy: t,
|
|
2058
|
-
locale:
|
|
2059
|
-
focusedDate:
|
|
2060
|
-
setFocusedDate:
|
|
2058
|
+
locale: a,
|
|
2059
|
+
focusedDate: n,
|
|
2060
|
+
setFocusedDate: l
|
|
2061
2061
|
}) {
|
|
2062
|
-
const [
|
|
2063
|
-
() => Ie(
|
|
2064
|
-
[
|
|
2062
|
+
const [o] = G("min"), [s] = G("max"), [u] = G("today"), i = X("focusday"), r = X("change"), m = J(
|
|
2063
|
+
() => Ie(n ?? u ?? et(), o, s),
|
|
2064
|
+
[n, u, o, s]
|
|
2065
2065
|
);
|
|
2066
|
-
function
|
|
2067
|
-
|
|
2066
|
+
function C(k) {
|
|
2067
|
+
l(k), i(_(k));
|
|
2068
2068
|
}
|
|
2069
|
-
const { next: g, previous:
|
|
2069
|
+
const { next: g, previous: p, page: $ } = Ja({
|
|
2070
2070
|
pageBy: t,
|
|
2071
2071
|
focusedDate: m,
|
|
2072
2072
|
months: e,
|
|
2073
|
-
min:
|
|
2073
|
+
min: o,
|
|
2074
2074
|
max: s,
|
|
2075
|
-
goto:
|
|
2076
|
-
}),
|
|
2077
|
-
function k
|
|
2078
|
-
const z = (
|
|
2079
|
-
z === "day" ?
|
|
2075
|
+
goto: C
|
|
2076
|
+
}), S = xe();
|
|
2077
|
+
function D(k) {
|
|
2078
|
+
const z = (k == null ? void 0 : k.target) ?? "day";
|
|
2079
|
+
z === "day" ? S.current.querySelectorAll("calendar-month").forEach((j) => j.focus(k)) : S.current.shadowRoot.querySelector(`[part~='${z}']`).focus(k);
|
|
2080
2080
|
}
|
|
2081
2081
|
return {
|
|
2082
|
-
format: ge(Ka,
|
|
2083
|
-
formatVerbose: ge(Ya,
|
|
2084
|
-
page:
|
|
2082
|
+
format: ge(Ka, a),
|
|
2083
|
+
formatVerbose: ge(Ya, a),
|
|
2084
|
+
page: $,
|
|
2085
2085
|
focusedDate: m,
|
|
2086
|
-
dispatch:
|
|
2087
|
-
onFocus(
|
|
2088
|
-
|
|
2086
|
+
dispatch: r,
|
|
2087
|
+
onFocus(k) {
|
|
2088
|
+
k.stopPropagation(), C(k.detail), setTimeout(D);
|
|
2089
2089
|
},
|
|
2090
|
-
min:
|
|
2090
|
+
min: o,
|
|
2091
2091
|
max: s,
|
|
2092
2092
|
today: u,
|
|
2093
2093
|
next: g,
|
|
2094
|
-
previous:
|
|
2095
|
-
focus:
|
|
2094
|
+
previous: p,
|
|
2095
|
+
focus: D
|
|
2096
2096
|
};
|
|
2097
2097
|
}
|
|
2098
2098
|
const Xa = ke(
|
|
2099
2099
|
(e) => {
|
|
2100
|
-
const [t,
|
|
2100
|
+
const [t, a] = G("value"), [n = t, l] = G("focusedDate"), o = st({
|
|
2101
2101
|
...e,
|
|
2102
|
-
focusedDate:
|
|
2103
|
-
setFocusedDate:
|
|
2102
|
+
focusedDate: n,
|
|
2103
|
+
setFocusedDate: l
|
|
2104
2104
|
});
|
|
2105
2105
|
function s(u) {
|
|
2106
|
-
|
|
2106
|
+
a(u.detail), o.dispatch();
|
|
2107
2107
|
}
|
|
2108
|
-
return /* @__PURE__ */
|
|
2108
|
+
return /* @__PURE__ */ O("host", { shadowDom: !0, focus: o.focus, children: /* @__PURE__ */ O(
|
|
2109
2109
|
at,
|
|
2110
2110
|
{
|
|
2111
2111
|
...e,
|
|
2112
|
-
...
|
|
2112
|
+
...o,
|
|
2113
2113
|
type: "date",
|
|
2114
2114
|
value: t,
|
|
2115
2115
|
onSelect: s
|
|
2116
2116
|
}
|
|
2117
2117
|
) });
|
|
2118
2118
|
},
|
|
2119
|
-
{ props:
|
|
2119
|
+
{ props: ot, styles: lt }
|
|
2120
2120
|
);
|
|
2121
2121
|
customElements.define("calendar-date", Xa);
|
|
2122
2122
|
const St = (e, t) => L.compare(e, t) < 0 ? [e, t] : [t, e], Ga = ke(
|
|
2123
2123
|
(e) => {
|
|
2124
|
-
const [t,
|
|
2124
|
+
const [t, a] = ja("value"), [n = t[0], l] = G("focusedDate"), o = st({
|
|
2125
2125
|
...e,
|
|
2126
|
-
focusedDate:
|
|
2127
|
-
setFocusedDate:
|
|
2128
|
-
}), s = X("rangestart"), u = X("rangeend"), [i,
|
|
2126
|
+
focusedDate: n,
|
|
2127
|
+
setFocusedDate: l
|
|
2128
|
+
}), s = X("rangestart"), u = X("rangeend"), [i, r] = G(
|
|
2129
2129
|
"tentative"
|
|
2130
|
-
), [m,
|
|
2131
|
-
ve(() =>
|
|
2132
|
-
function g(
|
|
2133
|
-
|
|
2130
|
+
), [m, C] = Ge();
|
|
2131
|
+
ve(() => C(void 0), [i]);
|
|
2132
|
+
function g(D) {
|
|
2133
|
+
o.onFocus(D), p(D);
|
|
2134
2134
|
}
|
|
2135
|
-
function
|
|
2136
|
-
|
|
2135
|
+
function p(D) {
|
|
2136
|
+
D.stopPropagation(), i && C(D.detail);
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2138
|
+
function $(D) {
|
|
2139
|
+
const k = D.detail;
|
|
2140
|
+
D.stopPropagation(), i ? (a(St(i, k)), r(void 0), u(_(k)), o.dispatch()) : (r(k), s(_(k)));
|
|
2141
2141
|
}
|
|
2142
|
-
const
|
|
2143
|
-
return /* @__PURE__ */
|
|
2142
|
+
const S = i ? St(i, m ?? i) : t;
|
|
2143
|
+
return /* @__PURE__ */ O("host", { shadowDom: !0, focus: o.focus, children: /* @__PURE__ */ O(
|
|
2144
2144
|
at,
|
|
2145
2145
|
{
|
|
2146
2146
|
...e,
|
|
2147
|
-
...
|
|
2147
|
+
...o,
|
|
2148
2148
|
type: "range",
|
|
2149
|
-
value:
|
|
2149
|
+
value: S,
|
|
2150
2150
|
onFocus: g,
|
|
2151
|
-
onHover:
|
|
2152
|
-
onSelect:
|
|
2151
|
+
onHover: p,
|
|
2152
|
+
onSelect: $
|
|
2153
2153
|
}
|
|
2154
2154
|
) });
|
|
2155
2155
|
},
|
|
2156
2156
|
{
|
|
2157
2157
|
props: {
|
|
2158
|
-
...
|
|
2158
|
+
...ot,
|
|
2159
2159
|
tentative: {
|
|
2160
2160
|
type: String,
|
|
2161
2161
|
value: ""
|
|
2162
2162
|
}
|
|
2163
2163
|
},
|
|
2164
|
-
styles:
|
|
2164
|
+
styles: lt
|
|
2165
2165
|
}
|
|
2166
2166
|
);
|
|
2167
2167
|
customElements.define("calendar-range", Ga);
|
|
2168
2168
|
const Qa = ke(
|
|
2169
2169
|
(e) => {
|
|
2170
|
-
const [t,
|
|
2170
|
+
const [t, a] = Fa("value"), [n = t[0], l] = G("focusedDate"), o = st({
|
|
2171
2171
|
...e,
|
|
2172
|
-
focusedDate:
|
|
2173
|
-
setFocusedDate:
|
|
2172
|
+
focusedDate: n,
|
|
2173
|
+
setFocusedDate: l
|
|
2174
2174
|
});
|
|
2175
2175
|
function s(u) {
|
|
2176
|
-
const i = [...t],
|
|
2177
|
-
|
|
2176
|
+
const i = [...t], r = t.findIndex((m) => m.equals(u.detail));
|
|
2177
|
+
r < 0 ? i.push(u.detail) : i.splice(r, 1), a(i), o.dispatch();
|
|
2178
2178
|
}
|
|
2179
|
-
return /* @__PURE__ */
|
|
2179
|
+
return /* @__PURE__ */ O("host", { shadowDom: !0, focus: o.focus, children: /* @__PURE__ */ O(
|
|
2180
2180
|
at,
|
|
2181
2181
|
{
|
|
2182
2182
|
...e,
|
|
2183
|
-
...
|
|
2183
|
+
...o,
|
|
2184
2184
|
type: "multi",
|
|
2185
2185
|
value: t,
|
|
2186
2186
|
onSelect: s
|
|
2187
2187
|
}
|
|
2188
2188
|
) });
|
|
2189
2189
|
},
|
|
2190
|
-
{ props:
|
|
2190
|
+
{ props: ot, styles: lt }
|
|
2191
2191
|
);
|
|
2192
2192
|
customElements.define("calendar-multi", Qa);
|
|
2193
|
-
const
|
|
2193
|
+
const eo = ["placeholder", "value", "id", "disabled"], to = ["disabled"], no = {
|
|
2194
2194
|
key: 2,
|
|
2195
2195
|
class: "join items-center gap-2 w-full justify-between py-2 px-4 max-md:input max-md:input-bordered rounded"
|
|
2196
|
-
},
|
|
2196
|
+
}, ao = { class: "join-item" }, oo = ["id", "disabled"], lo = { class: "join-item" }, so = ["id", "disabled"], io = ["id", "disabled"], ro = {
|
|
2197
2197
|
key: 4,
|
|
2198
2198
|
class: "flex mt-4"
|
|
2199
|
-
},
|
|
2199
|
+
}, Sl = /* @__PURE__ */ N({
|
|
2200
2200
|
__name: "datetimePicker",
|
|
2201
2201
|
props: {
|
|
2202
2202
|
mode: { default: "datetime" },
|
|
@@ -2212,134 +2212,112 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2212
2212
|
},
|
|
2213
2213
|
emits: ["update:modelValue", "change"],
|
|
2214
2214
|
setup(e, { emit: t }) {
|
|
2215
|
-
const n = e,
|
|
2216
|
-
from: "",
|
|
2217
|
-
to: "",
|
|
2218
|
-
single: ""
|
|
2219
|
-
}), g = M({
|
|
2215
|
+
const a = typeof window < "u", n = e, l = t, o = M(!1), s = M(null), u = M(null), i = M(null), r = M(null), m = M(null), C = M(null), g = M({ from: "", to: "", single: "" }), p = M({
|
|
2220
2216
|
single: null,
|
|
2221
2217
|
start: null,
|
|
2222
2218
|
end: null
|
|
2223
|
-
}),
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
if (!r || r.includes(":")) return r;
|
|
2228
|
-
if (r.match(/^\d{4}-\d{2}-\d{2}$/)) {
|
|
2229
|
-
const b = r.split("-");
|
|
2219
|
+
}), $ = K(() => {
|
|
2220
|
+
const b = (w) => {
|
|
2221
|
+
if (!w || w.includes(":")) return w;
|
|
2222
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(w))
|
|
2230
2223
|
try {
|
|
2231
|
-
return new Date(
|
|
2224
|
+
return new Date(w).toLocaleDateString(n.locale);
|
|
2232
2225
|
} catch {
|
|
2233
|
-
|
|
2226
|
+
const [x, I, A] = w.split("-");
|
|
2227
|
+
return `${A}/${I}/${x}`;
|
|
2234
2228
|
}
|
|
2235
|
-
|
|
2236
|
-
return r;
|
|
2229
|
+
return w;
|
|
2237
2230
|
};
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
}
|
|
2243
|
-
return T(h);
|
|
2244
|
-
}
|
|
2245
|
-
if (n.mode === "time") return x;
|
|
2231
|
+
let y = "", c = "";
|
|
2232
|
+
if (n.mode !== "time" && (n.range && p.value.start && p.value.end ? y = `${p.value.start} - ${p.value.end}` : !n.range && p.value.single && (y = p.value.single)), n.mode !== "date" && (n.range && g.value.from && g.value.to ? c = `${g.value.from} - ${g.value.to}` : !n.range && g.value.single && (c = g.value.single)), n.mode === "date")
|
|
2233
|
+
return n.range ? y.split(" - ").map(b).join(" - ") : b(y);
|
|
2234
|
+
if (n.mode === "time") return c;
|
|
2246
2235
|
if (n.range) {
|
|
2247
|
-
const [
|
|
2248
|
-
|
|
2249
|
-
return r && $ && (P += `${r} ${$}`), b && I && (P += P ? ` - ${b} ${I}` : `${b} ${I}`), P.trim();
|
|
2236
|
+
const [w, x] = y.split(" - ").map(b), [I, A] = c.split(" - ");
|
|
2237
|
+
return `${w} ${I} - ${x} ${A}`.trim();
|
|
2250
2238
|
}
|
|
2251
|
-
return `${
|
|
2252
|
-
}), S = (
|
|
2239
|
+
return `${b(y)} ${c}`.trim();
|
|
2240
|
+
}), S = () => {
|
|
2253
2241
|
if (n.range) {
|
|
2254
|
-
const
|
|
2255
|
-
let
|
|
2256
|
-
if (n.mode === "time" &&
|
|
2257
|
-
return { start:
|
|
2242
|
+
const { start: b, end: y } = p.value, { from: c, to: w } = g.value;
|
|
2243
|
+
let x = null, I = null;
|
|
2244
|
+
if (n.mode === "time" && c && w ? (x = c, I = w) : n.mode === "date" && b && y ? (x = b, I = y) : n.mode === "datetime" && b && y && c && w && (x = `${b}T${c}`, I = `${y}T${w}`), x && I)
|
|
2245
|
+
return { start: x, end: I };
|
|
2258
2246
|
} else {
|
|
2259
|
-
const
|
|
2260
|
-
if (n.mode === "date") return
|
|
2261
|
-
if (n.mode === "time") return
|
|
2262
|
-
if (n.mode === "datetime" &&
|
|
2263
|
-
return `${
|
|
2247
|
+
const b = p.value.single, y = g.value.single;
|
|
2248
|
+
if (n.mode === "date") return b;
|
|
2249
|
+
if (n.mode === "time") return y || null;
|
|
2250
|
+
if (n.mode === "datetime" && b && y)
|
|
2251
|
+
return `${b}T${y}`;
|
|
2264
2252
|
}
|
|
2265
2253
|
return null;
|
|
2266
2254
|
}, D = () => {
|
|
2267
|
-
if (
|
|
2268
|
-
|
|
2269
|
-
else if (
|
|
2270
|
-
const
|
|
2271
|
-
|
|
2255
|
+
if (u.value)
|
|
2256
|
+
p.value.single = u.value.value || null;
|
|
2257
|
+
else if (i.value) {
|
|
2258
|
+
const b = i.value.value;
|
|
2259
|
+
p.value.start = (b == null ? void 0 : b.start) || null, p.value.end = (b == null ? void 0 : b.end) || null;
|
|
2272
2260
|
}
|
|
2273
2261
|
}, k = () => {
|
|
2274
2262
|
D();
|
|
2275
|
-
const
|
|
2276
|
-
|
|
2277
|
-
}, C = () => {
|
|
2278
|
-
var h, x, T;
|
|
2279
|
-
n.range ? (w.value.from = ((h = c.value) == null ? void 0 : h.value) || "", w.value.to = ((x = m.value) == null ? void 0 : x.value) || "") : w.value.single = ((T = i.value) == null ? void 0 : T.value) || "", k();
|
|
2263
|
+
const b = S();
|
|
2264
|
+
l("update:modelValue", b), l("change", b);
|
|
2280
2265
|
}, z = () => {
|
|
2281
|
-
|
|
2266
|
+
var b, y, c;
|
|
2267
|
+
n.range ? (g.value.from = ((b = m.value) == null ? void 0 : b.value) || "", g.value.to = ((y = C.value) == null ? void 0 : y.value) || "") : g.value.single = ((c = r.value) == null ? void 0 : c.value) || "", k();
|
|
2282
2268
|
}, j = () => {
|
|
2269
|
+
o.value = !o.value, o.value && k();
|
|
2270
|
+
}, q = () => {
|
|
2283
2271
|
o.value = !1, k();
|
|
2284
|
-
},
|
|
2272
|
+
}, v = (b) => {
|
|
2273
|
+
a && n.popup && o.value && s.value && !s.value.contains(b.target) && q();
|
|
2274
|
+
}, T = () => {
|
|
2275
|
+
const b = (y) => y instanceof Date ? y.toISOString() : y;
|
|
2285
2276
|
if (n.initialDate) {
|
|
2286
|
-
if (n.range) {
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
// Now calling .includes() on a guaranteed string
|
|
2292
|
-
start: T.includes("T") ? T.split("T")[0] : T,
|
|
2293
|
-
end: r.includes("T") ? r.split("T")[0] : r
|
|
2294
|
-
}, n.mode === "datetime" || n.mode === "time")) {
|
|
2295
|
-
const b = new Date(T), $ = new Date(r), I = (P) => `${String(P.getUTCHours()).padStart(2, "0")}:${String(P.getUTCMinutes()).padStart(2, "0")}`;
|
|
2296
|
-
w.value = {
|
|
2297
|
-
single: "",
|
|
2298
|
-
from: I(b),
|
|
2299
|
-
to: I($)
|
|
2300
|
-
}, c.value && (c.value.value = w.value.from), m.value && (m.value.value = w.value.to);
|
|
2301
|
-
}
|
|
2277
|
+
if (n.range && typeof n.initialDate == "object" && "start" in n.initialDate) {
|
|
2278
|
+
const y = b(n.initialDate.start), c = b(n.initialDate.end);
|
|
2279
|
+
if (p.value.start = y.split("T")[0], p.value.end = c.split("T")[0], n.mode !== "date") {
|
|
2280
|
+
const w = new Date(y), x = new Date(c), I = (A) => `${String(A.getUTCHours()).padStart(2, "0")}:${String(A.getUTCMinutes()).padStart(2, "0")}`;
|
|
2281
|
+
g.value.from = I(w), g.value.to = I(x), m.value && (m.value.value = g.value.from), C.value && (C.value.value = g.value.to);
|
|
2302
2282
|
}
|
|
2303
2283
|
} else if (typeof n.initialDate == "string" || n.initialDate instanceof Date) {
|
|
2304
|
-
const
|
|
2305
|
-
if (
|
|
2306
|
-
const
|
|
2307
|
-
|
|
2284
|
+
const y = b(n.initialDate);
|
|
2285
|
+
if (p.value.single = y.split("T")[0], n.mode !== "date") {
|
|
2286
|
+
const c = new Date(y), w = `${String(c.getUTCHours()).padStart(2, "0")}:${String(c.getUTCMinutes()).padStart(2, "0")}`;
|
|
2287
|
+
g.value.single = w, r.value && (r.value.value = w);
|
|
2308
2288
|
}
|
|
2309
2289
|
}
|
|
2310
2290
|
}
|
|
2311
|
-
}, v = (h) => {
|
|
2312
|
-
n.popup && o.value && l.value && !l.value.contains(h.target) && j();
|
|
2313
2291
|
};
|
|
2314
2292
|
return ue(() => {
|
|
2315
|
-
|
|
2293
|
+
a && n.popup && document.addEventListener("click", v), T(), k();
|
|
2316
2294
|
}), Dt(() => {
|
|
2317
|
-
|
|
2318
|
-
}), (
|
|
2319
|
-
const
|
|
2320
|
-
return f(),
|
|
2295
|
+
a && n.popup && document.removeEventListener("click", v);
|
|
2296
|
+
}), (b, y) => {
|
|
2297
|
+
const c = Ae("calendar-month"), w = Ae("calendar-date"), x = Ae("calendar-range");
|
|
2298
|
+
return f(), h("div", {
|
|
2321
2299
|
class: "inline-block relative w-fit lg:w-full",
|
|
2322
2300
|
ref_key: "pickerContainer",
|
|
2323
|
-
ref:
|
|
2301
|
+
ref: s
|
|
2324
2302
|
}, [
|
|
2325
|
-
n.popup ? (f(),
|
|
2303
|
+
n.popup ? (f(), h("div", {
|
|
2326
2304
|
key: 0,
|
|
2327
2305
|
class: "flex items-center gap-2 cursor-pointer w-full",
|
|
2328
|
-
onClick:
|
|
2306
|
+
onClick: y[0] || (y[0] = (I) => n.disabled ? null : j())
|
|
2329
2307
|
}, [
|
|
2330
2308
|
d("input", {
|
|
2331
2309
|
type: "text",
|
|
2332
2310
|
class: "input-bordered w-full cursor-pointer input",
|
|
2333
2311
|
placeholder: n.placeholder,
|
|
2334
|
-
value:
|
|
2312
|
+
value: $.value,
|
|
2335
2313
|
readonly: "",
|
|
2336
2314
|
id: `${n.id}-input`,
|
|
2337
2315
|
disabled: n.disabled
|
|
2338
|
-
}, null, 8,
|
|
2316
|
+
}, null, 8, eo),
|
|
2339
2317
|
d("button", {
|
|
2340
2318
|
class: "btn btn-ghost",
|
|
2341
2319
|
disabled: n.disabled
|
|
2342
|
-
}, [...
|
|
2320
|
+
}, [...y[1] || (y[1] = [
|
|
2343
2321
|
d("svg", {
|
|
2344
2322
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2345
2323
|
viewBox: "0 0 24 24",
|
|
@@ -2348,26 +2326,25 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2348
2326
|
}, [
|
|
2349
2327
|
d("path", { d: "M12.75 12.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM7.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM7.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM10.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM13.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 7.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 10.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 13.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM16.5 16.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM18 3.75c0-.621-.504-1.125-1.125-1.125h-15c-.621 0-1.125.504-1.125 1.125v15c0 .621.504 1.125 1.125 1.125h15c.621 0 1.125-.504 1.125-1.125v-15ZM4.5 5.25v12h15v-12h-15Z" })
|
|
2350
2328
|
], -1)
|
|
2351
|
-
])], 8,
|
|
2329
|
+
])], 8, to)
|
|
2352
2330
|
])) : E("", !0),
|
|
2353
|
-
o.value || !n.popup ? (f(),
|
|
2331
|
+
o.value || !n.popup ? (f(), h("div", {
|
|
2354
2332
|
key: 1,
|
|
2355
2333
|
class: B(["z-50 bg-base-100 md:p-4 px-4 rounded-md w-full", { "absolute top-full left-0 mt-2 shadow-lg": n.popup, "mt-2": !n.popup }])
|
|
2356
2334
|
}, [
|
|
2357
|
-
!n.range && n.mode !== "time" ? (f(), ae(
|
|
2335
|
+
!n.range && n.mode !== "time" ? (f(), ae(w, {
|
|
2358
2336
|
key: 0,
|
|
2359
2337
|
class: "cally w-full",
|
|
2360
2338
|
ref_key: "datePicker",
|
|
2361
|
-
ref:
|
|
2339
|
+
ref: u,
|
|
2362
2340
|
id: `${n.id}-date`,
|
|
2363
2341
|
min: n.min,
|
|
2364
2342
|
max: n.max,
|
|
2365
2343
|
disabled: n.disabled,
|
|
2366
|
-
"initial-date": n.initialDate,
|
|
2367
2344
|
onChange: k
|
|
2368
2345
|
}, {
|
|
2369
2346
|
default: pt(() => [
|
|
2370
|
-
|
|
2347
|
+
y[2] || (y[2] = d("svg", {
|
|
2371
2348
|
"aria-label": "Previous",
|
|
2372
2349
|
class: "fill-current size-4",
|
|
2373
2350
|
slot: "previous",
|
|
@@ -2379,7 +2356,7 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2379
2356
|
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
2380
2357
|
})
|
|
2381
2358
|
], -1)),
|
|
2382
|
-
|
|
2359
|
+
y[3] || (y[3] = d("svg", {
|
|
2383
2360
|
"aria-label": "Next",
|
|
2384
2361
|
class: "fill-current size-4",
|
|
2385
2362
|
slot: "next",
|
|
@@ -2391,26 +2368,25 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2391
2368
|
d: "m8.25 4.5 7.5 7.5-7.5 7.5"
|
|
2392
2369
|
})
|
|
2393
2370
|
], -1)),
|
|
2394
|
-
ie(
|
|
2371
|
+
ie(c, {
|
|
2395
2372
|
locale: n.locale
|
|
2396
2373
|
}, null, 8, ["locale"])
|
|
2397
2374
|
]),
|
|
2398
2375
|
_: 1
|
|
2399
|
-
}, 8, ["id", "min", "max", "disabled"
|
|
2400
|
-
n.range && n.mode !== "time" ? (f(), ae(
|
|
2376
|
+
}, 8, ["id", "min", "max", "disabled"])) : E("", !0),
|
|
2377
|
+
n.range && n.mode !== "time" ? (f(), ae(x, {
|
|
2401
2378
|
key: 1,
|
|
2402
2379
|
class: "cally w-full",
|
|
2403
2380
|
ref_key: "rangeDatePicker",
|
|
2404
|
-
ref:
|
|
2381
|
+
ref: i,
|
|
2405
2382
|
id: `${n.id}-date-range`,
|
|
2406
2383
|
min: n.min,
|
|
2407
2384
|
max: n.max,
|
|
2408
2385
|
disabled: n.disabled,
|
|
2409
|
-
"initial-date": n.initialDate,
|
|
2410
2386
|
onChange: k
|
|
2411
2387
|
}, {
|
|
2412
2388
|
default: pt(() => [
|
|
2413
|
-
|
|
2389
|
+
y[4] || (y[4] = d("svg", {
|
|
2414
2390
|
"aria-label": "Previous",
|
|
2415
2391
|
class: "fill-current size-4",
|
|
2416
2392
|
slot: "previous",
|
|
@@ -2422,7 +2398,7 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2422
2398
|
d: "M15.75 19.5 8.25 12l7.5-7.5"
|
|
2423
2399
|
})
|
|
2424
2400
|
], -1)),
|
|
2425
|
-
|
|
2401
|
+
y[5] || (y[5] = d("svg", {
|
|
2426
2402
|
"aria-label": "Next",
|
|
2427
2403
|
class: "fill-current size-4",
|
|
2428
2404
|
slot: "next",
|
|
@@ -2434,26 +2410,26 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2434
2410
|
d: "m8.25 4.5 7.5 7.5-7.5 7.5"
|
|
2435
2411
|
})
|
|
2436
2412
|
], -1)),
|
|
2437
|
-
ie(
|
|
2413
|
+
ie(c, {
|
|
2438
2414
|
locale: n.locale
|
|
2439
2415
|
}, null, 8, ["locale"])
|
|
2440
2416
|
]),
|
|
2441
2417
|
_: 1
|
|
2442
|
-
}, 8, ["id", "min", "max", "disabled"
|
|
2443
|
-
n.range && n.mode !== "date" ? (f(),
|
|
2444
|
-
d("div",
|
|
2418
|
+
}, 8, ["id", "min", "max", "disabled"])) : E("", !0),
|
|
2419
|
+
n.range && n.mode !== "date" ? (f(), h("div", no, [
|
|
2420
|
+
d("div", ao, [
|
|
2445
2421
|
d("input", {
|
|
2446
2422
|
class: "max-md:max-w-xs text-center hover:border-b-2 hover:-mb-0.5 open:bg-primary open:p-1 open:-m-0.5 open:rounded w-full",
|
|
2447
2423
|
type: "time",
|
|
2448
2424
|
ref_key: "timeFromInput",
|
|
2449
|
-
ref:
|
|
2425
|
+
ref: m,
|
|
2450
2426
|
id: `${n.id}-time-from`,
|
|
2451
2427
|
placeholder: "van",
|
|
2452
|
-
onChange:
|
|
2428
|
+
onChange: z,
|
|
2453
2429
|
disabled: n.disabled
|
|
2454
|
-
}, null, 40,
|
|
2430
|
+
}, null, 40, oo)
|
|
2455
2431
|
]),
|
|
2456
|
-
|
|
2432
|
+
y[6] || (y[6] = d("svg", {
|
|
2457
2433
|
class: "join-item",
|
|
2458
2434
|
viewBox: "0 0 1024 1024",
|
|
2459
2435
|
focusable: "false",
|
|
@@ -2465,39 +2441,39 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2465
2441
|
}, [
|
|
2466
2442
|
d("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" })
|
|
2467
2443
|
], -1)),
|
|
2468
|
-
d("div",
|
|
2444
|
+
d("div", lo, [
|
|
2469
2445
|
d("input", {
|
|
2470
2446
|
class: "hover:border-b-2 hover:-mb-0.5 open:bg-primary open:p-1 open:-m-0.5 open:rounded w-full",
|
|
2471
2447
|
type: "time",
|
|
2472
2448
|
ref_key: "timeToInput",
|
|
2473
|
-
ref:
|
|
2449
|
+
ref: C,
|
|
2474
2450
|
id: `${n.id}-time-to`,
|
|
2475
|
-
onChange:
|
|
2451
|
+
onChange: z,
|
|
2476
2452
|
disabled: n.disabled
|
|
2477
|
-
}, null, 40,
|
|
2453
|
+
}, null, 40, so)
|
|
2478
2454
|
])
|
|
2479
2455
|
])) : E("", !0),
|
|
2480
|
-
!n.range && n.mode !== "date" ? (f(),
|
|
2456
|
+
!n.range && n.mode !== "date" ? (f(), h("input", {
|
|
2481
2457
|
key: 3,
|
|
2482
2458
|
class: "open:bg-primary open:rounded w-full input input-bordered my-2 justify-center",
|
|
2483
2459
|
type: "time",
|
|
2484
2460
|
ref_key: "timeInput",
|
|
2485
|
-
ref:
|
|
2461
|
+
ref: r,
|
|
2486
2462
|
id: `${n.id}-time`,
|
|
2487
|
-
onChange:
|
|
2463
|
+
onChange: z,
|
|
2488
2464
|
disabled: n.disabled
|
|
2489
|
-
}, null, 40,
|
|
2490
|
-
n.popup ? (f(),
|
|
2465
|
+
}, null, 40, io)) : E("", !0),
|
|
2466
|
+
n.popup ? (f(), h("div", ro, [
|
|
2491
2467
|
d("button", {
|
|
2492
2468
|
class: "btn btn-primary",
|
|
2493
|
-
onClick:
|
|
2469
|
+
onClick: q
|
|
2494
2470
|
}, " Close ")
|
|
2495
2471
|
])) : E("", !0)
|
|
2496
2472
|
], 2)) : E("", !0)
|
|
2497
2473
|
], 512);
|
|
2498
2474
|
};
|
|
2499
2475
|
}
|
|
2500
|
-
}),
|
|
2476
|
+
}), uo = ["value", "checked", "onChange", "disabled"], Cl = /* @__PURE__ */ N({
|
|
2501
2477
|
__name: "rating",
|
|
2502
2478
|
props: {
|
|
2503
2479
|
initialRating: { default: 0 },
|
|
@@ -2510,29 +2486,29 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2510
2486
|
gap: { default: 0 }
|
|
2511
2487
|
},
|
|
2512
2488
|
setup(e) {
|
|
2513
|
-
const t = e,
|
|
2489
|
+
const t = e, a = M(t.initialRating);
|
|
2514
2490
|
R(
|
|
2515
2491
|
() => t.initialRating,
|
|
2516
|
-
(
|
|
2517
|
-
|
|
2492
|
+
(l) => {
|
|
2493
|
+
a.value = l;
|
|
2518
2494
|
}
|
|
2519
2495
|
);
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2496
|
+
const n = (l) => {
|
|
2497
|
+
a.value = l;
|
|
2522
2498
|
};
|
|
2523
|
-
return (
|
|
2499
|
+
return (l, o) => (f(), h("div", {
|
|
2524
2500
|
class: B(["rating", [
|
|
2525
2501
|
`rating-${t.size}`,
|
|
2526
2502
|
{ "rating-half": e.halfStars },
|
|
2527
2503
|
{ "pointer-events-none": !e.isInteractive }
|
|
2528
2504
|
]])
|
|
2529
2505
|
}, [
|
|
2530
|
-
(f(!0),
|
|
2506
|
+
(f(!0), h(U, null, F(e.numberOfStars * (e.halfStars ? 2 : 1), (s) => (f(), h("input", {
|
|
2531
2507
|
key: s,
|
|
2532
2508
|
type: "radio",
|
|
2533
2509
|
value: e.halfStars ? s * 0.5 : s,
|
|
2534
|
-
checked:
|
|
2535
|
-
onChange: (u) => e.isInteractive ?
|
|
2510
|
+
checked: a.value === (e.halfStars ? s * 0.5 : s),
|
|
2511
|
+
onChange: (u) => e.isInteractive ? n(e.halfStars ? s * 0.5 : s) : null,
|
|
2536
2512
|
class: B(["mask", [
|
|
2537
2513
|
{
|
|
2538
2514
|
// 'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
|
|
@@ -2554,16 +2530,16 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2554
2530
|
"mask-triangle-3": e.shape === "triangle-left",
|
|
2555
2531
|
"mask-triangle-4": e.shape === "triangle-right"
|
|
2556
2532
|
},
|
|
2557
|
-
|
|
2533
|
+
a.value >= (e.halfStars ? s * 0.5 : s) ? t.color : ""
|
|
2558
2534
|
]]),
|
|
2559
2535
|
style: ye({
|
|
2560
2536
|
marginRight: e.halfStars && s % 2 === 0 ? `${t.gap}px` : e.halfStars ? "0" : `${t.gap}px`
|
|
2561
2537
|
}),
|
|
2562
2538
|
disabled: !e.isInteractive
|
|
2563
|
-
}, null, 46,
|
|
2539
|
+
}, null, 46, uo))), 128))
|
|
2564
2540
|
], 2));
|
|
2565
2541
|
}
|
|
2566
|
-
}),
|
|
2542
|
+
}), co = { class: "badge" }, fo = ["onClick"], mo = { class: "opacity-75" }, po = ["placeholder"], Dl = /* @__PURE__ */ N({
|
|
2567
2543
|
__name: "taginput",
|
|
2568
2544
|
props: {
|
|
2569
2545
|
modelValue: {},
|
|
@@ -2573,60 +2549,60 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2573
2549
|
},
|
|
2574
2550
|
emits: ["update:modelValue"],
|
|
2575
2551
|
setup(e, { emit: t }) {
|
|
2576
|
-
const
|
|
2577
|
-
const
|
|
2578
|
-
|
|
2579
|
-
}, m = (
|
|
2580
|
-
|
|
2581
|
-
},
|
|
2582
|
-
u.value === "" && (
|
|
2583
|
-
}, g = (
|
|
2584
|
-
|
|
2552
|
+
const a = e, n = t, l = M([...a.modelValue]), o = a.maxTagAmount === void 0 ? -1 : a.maxTagAmount, s = M(null), u = M(""), i = K(() => o < 0 || l.value.length < o), r = () => {
|
|
2553
|
+
const p = u.value.trim();
|
|
2554
|
+
p && !l.value.includes(p) && (l.value.push(p), n("update:modelValue", l.value), u.value = "");
|
|
2555
|
+
}, m = (p) => {
|
|
2556
|
+
l.value = l.value.filter(($) => $ !== p), n("update:modelValue", l.value);
|
|
2557
|
+
}, C = () => {
|
|
2558
|
+
u.value === "" && (l.value.pop(), n("update:modelValue", l.value));
|
|
2559
|
+
}, g = (p) => {
|
|
2560
|
+
p.key === "Enter" ? r() : p.key === "Backspace" && u.value === "" && C();
|
|
2585
2561
|
};
|
|
2586
|
-
return R(() =>
|
|
2587
|
-
|
|
2588
|
-
}), (
|
|
2589
|
-
class: B(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded",
|
|
2562
|
+
return R(() => a.modelValue, (p) => {
|
|
2563
|
+
l.value = [...p];
|
|
2564
|
+
}), (p, $) => (f(), h("div", {
|
|
2565
|
+
class: B(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", p.$props.class])
|
|
2590
2566
|
}, [
|
|
2591
|
-
(f(!0),
|
|
2592
|
-
key:
|
|
2593
|
-
tag:
|
|
2567
|
+
(f(!0), h(U, null, F(l.value, (S) => V(p.$slots, "tag", {
|
|
2568
|
+
key: S,
|
|
2569
|
+
tag: S
|
|
2594
2570
|
}, () => [
|
|
2595
|
-
d("div",
|
|
2571
|
+
d("div", co, [
|
|
2596
2572
|
d("button", {
|
|
2597
2573
|
class: "px-1! py-0! h-fit font-bold cursor-pointer",
|
|
2598
|
-
onClick: (
|
|
2574
|
+
onClick: (D) => m(S),
|
|
2599
2575
|
"aria-label": "Remove tag"
|
|
2600
|
-
}, "X", 8,
|
|
2601
|
-
d("span",
|
|
2576
|
+
}, "X", 8, fo),
|
|
2577
|
+
d("span", mo, P(S), 1)
|
|
2602
2578
|
])
|
|
2603
2579
|
])), 128)),
|
|
2604
|
-
V(
|
|
2605
|
-
i.value ? Ce((f(),
|
|
2580
|
+
V(p.$slots, "input", { showInput: i.value }, () => [
|
|
2581
|
+
i.value ? Ce((f(), h("input", {
|
|
2606
2582
|
key: 0,
|
|
2607
2583
|
ref_key: "inputRef",
|
|
2608
2584
|
ref: s,
|
|
2609
|
-
"onUpdate:modelValue":
|
|
2585
|
+
"onUpdate:modelValue": $[0] || ($[0] = (S) => u.value = S),
|
|
2610
2586
|
type: "text",
|
|
2611
2587
|
placeholder: e.placeholder || "Type here",
|
|
2612
2588
|
class: "h-full input input-ghost",
|
|
2613
2589
|
onKeydown: g,
|
|
2614
2590
|
"aria-label": "Add tags"
|
|
2615
|
-
}, null, 40,
|
|
2591
|
+
}, null, 40, po)), [
|
|
2616
2592
|
[Tt, u.value]
|
|
2617
2593
|
]) : E("", !0)
|
|
2618
2594
|
])
|
|
2619
2595
|
], 2));
|
|
2620
2596
|
}
|
|
2621
|
-
}),
|
|
2597
|
+
}), ho = { class: "w-full max-w-xs form-control" }, vo = {
|
|
2622
2598
|
key: 0,
|
|
2623
2599
|
class: "label"
|
|
2624
|
-
},
|
|
2600
|
+
}, go = { class: "label-text" }, yo = ["value"], bo = {
|
|
2625
2601
|
key: 0,
|
|
2626
2602
|
value: "",
|
|
2627
2603
|
disabled: "",
|
|
2628
2604
|
selected: ""
|
|
2629
|
-
},
|
|
2605
|
+
}, wo = ["value"], Tl = /* @__PURE__ */ N({
|
|
2630
2606
|
__name: "select",
|
|
2631
2607
|
props: {
|
|
2632
2608
|
options: {},
|
|
@@ -2635,45 +2611,45 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2635
2611
|
modelValue: {}
|
|
2636
2612
|
},
|
|
2637
2613
|
emits: ["update:modelValue"],
|
|
2638
|
-
setup(e, { expose: t, emit:
|
|
2614
|
+
setup(e, { expose: t, emit: a }) {
|
|
2639
2615
|
console.log(e.placeholder);
|
|
2640
|
-
const
|
|
2641
|
-
const
|
|
2642
|
-
|
|
2616
|
+
const l = a, o = M(null), s = (i) => {
|
|
2617
|
+
const r = i.target;
|
|
2618
|
+
l("update:modelValue", r.value);
|
|
2643
2619
|
};
|
|
2644
2620
|
return t({
|
|
2645
2621
|
focusInput: () => {
|
|
2646
2622
|
var i;
|
|
2647
|
-
console.log("select.vue: focusInput method called."), (i =
|
|
2623
|
+
console.log("select.vue: focusInput method called."), (i = o.value) == null || i.focus();
|
|
2648
2624
|
}
|
|
2649
2625
|
// You can expose other properties or methods here if needed by the parent
|
|
2650
2626
|
// e.g., the current value: modelValue
|
|
2651
|
-
}), (i,
|
|
2652
|
-
e.label ? (f(),
|
|
2653
|
-
d("span",
|
|
2627
|
+
}), (i, r) => (f(), h("div", ho, [
|
|
2628
|
+
e.label ? (f(), h("label", vo, [
|
|
2629
|
+
d("span", go, P(e.label), 1)
|
|
2654
2630
|
])) : E("", !0),
|
|
2655
2631
|
d("select", {
|
|
2656
2632
|
ref_key: "selectElement",
|
|
2657
|
-
ref:
|
|
2633
|
+
ref: o,
|
|
2658
2634
|
class: "rounded-md w-full select-bordered select",
|
|
2659
2635
|
value: e.modelValue,
|
|
2660
2636
|
onChange: s
|
|
2661
2637
|
}, [
|
|
2662
|
-
e.placeholder ? (f(),
|
|
2663
|
-
(f(!0),
|
|
2638
|
+
e.placeholder ? (f(), h("option", bo, P(e.placeholder), 1)) : E("", !0),
|
|
2639
|
+
(f(!0), h(U, null, F(e.options, (m) => (f(), h("option", {
|
|
2664
2640
|
key: m.value,
|
|
2665
2641
|
value: m.value
|
|
2666
|
-
},
|
|
2667
|
-
], 40,
|
|
2642
|
+
}, P(m.text), 9, wo))), 128))
|
|
2643
|
+
], 40, yo)
|
|
2668
2644
|
]));
|
|
2669
2645
|
}
|
|
2670
|
-
}),
|
|
2646
|
+
}), xo = {
|
|
2671
2647
|
key: 0,
|
|
2672
2648
|
class: "label"
|
|
2673
|
-
},
|
|
2649
|
+
}, ko = { class: "label-text" }, $o = ["onKeydown", "aria-expanded", "aria-activedescendant"], So = ["placeholder", "disabled"], Co = {
|
|
2674
2650
|
class: "top-full z-10 absolute bg-base-100 shadow-lg mt-1 rounded-md w-full dropdown-content",
|
|
2675
2651
|
role: "listbox"
|
|
2676
|
-
},
|
|
2652
|
+
}, Do = { class: "flex-nowrap p-0 w-[inherit] max-h-60 overflow-y-auto menu" }, To = ["onMousedown", "id", "aria-selected"], Ml = {
|
|
2677
2653
|
__name: "filterableSelect",
|
|
2678
2654
|
props: {
|
|
2679
2655
|
// Array of options: [{ value: any, text: string }, ...]
|
|
@@ -2703,103 +2679,103 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2703
2679
|
}
|
|
2704
2680
|
},
|
|
2705
2681
|
emits: ["update:modelValue", "select", "clear"],
|
|
2706
|
-
setup(e, { expose: t, emit:
|
|
2707
|
-
const
|
|
2708
|
-
const
|
|
2709
|
-
return console.log("hasDefaultSlotContent computed:",
|
|
2710
|
-
}), u = M(""), i = M(null),
|
|
2711
|
-
|
|
2682
|
+
setup(e, { expose: t, emit: a }) {
|
|
2683
|
+
const n = e, l = a, o = en(), s = K(() => {
|
|
2684
|
+
const w = (o.default ? o.default() : []).filter((x) => x.type !== tn);
|
|
2685
|
+
return console.log("hasDefaultSlotContent computed:", w.length > 0), w.length > 0;
|
|
2686
|
+
}), u = M(""), i = M(null), r = M(!1), m = M(null), C = M(null), g = M(null), p = M(null), $ = () => {
|
|
2687
|
+
r.value = !n.disabled;
|
|
2688
|
+
}, S = () => {
|
|
2689
|
+
r.value = !1, p.value = null, s.value || (i.value && u.value !== i.value.text ? u.value = i.value.text : i.value || (u.value = ""));
|
|
2712
2690
|
}, D = () => {
|
|
2713
|
-
|
|
2714
|
-
}, k = () => {
|
|
2715
|
-
c.value ?
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
return r === "" && !c.value ? [] : a.options.filter(
|
|
2719
|
-
($) => $ && $.text ? $.text.toLowerCase().includes(r) : ""
|
|
2691
|
+
r.value ? S() : $();
|
|
2692
|
+
}, k = K(() => {
|
|
2693
|
+
const c = u.value ? u.value.toLowerCase() : "";
|
|
2694
|
+
return c === "" && !r.value ? [] : n.options.filter(
|
|
2695
|
+
(x) => x && x.text ? x.text.toLowerCase().includes(c) : ""
|
|
2720
2696
|
);
|
|
2721
2697
|
});
|
|
2722
2698
|
R(
|
|
2723
|
-
() =>
|
|
2724
|
-
(
|
|
2725
|
-
if (
|
|
2726
|
-
i.value = null, !
|
|
2699
|
+
() => n.modelValue,
|
|
2700
|
+
(c, w) => {
|
|
2701
|
+
if (c !== w && S(), c == null)
|
|
2702
|
+
i.value = null, !r.value && !s.value && (u.value = "");
|
|
2727
2703
|
else {
|
|
2728
|
-
const
|
|
2729
|
-
|
|
2704
|
+
const x = n.options.find((I) => I.value === c);
|
|
2705
|
+
x ? (i.value = x, !r.value && !s.value && (u.value = x.text)) : (i.value = null, !r.value && !s.value && (u.value = ""));
|
|
2730
2706
|
}
|
|
2731
2707
|
},
|
|
2732
2708
|
{ immediate: !0 }
|
|
2733
2709
|
// Run immediately on component mount
|
|
2734
2710
|
);
|
|
2735
|
-
const z = (
|
|
2736
|
-
|
|
2711
|
+
const z = (c) => {
|
|
2712
|
+
C.value && !C.value.contains(c.target) && S();
|
|
2737
2713
|
}, j = () => {
|
|
2738
2714
|
setTimeout(() => {
|
|
2739
|
-
|
|
2715
|
+
C.value && !C.value.contains(document.activeElement) && S();
|
|
2740
2716
|
}, 100);
|
|
2741
2717
|
};
|
|
2742
|
-
R(
|
|
2743
|
-
|
|
2718
|
+
R(r, (c) => {
|
|
2719
|
+
c ? setTimeout(() => {
|
|
2744
2720
|
document.addEventListener("click", z);
|
|
2745
2721
|
}, 0) : document.removeEventListener("click", z);
|
|
2746
2722
|
}), _e(() => {
|
|
2747
|
-
document.removeEventListener("click", z), window.removeEventListener("keydown",
|
|
2723
|
+
document.removeEventListener("click", z), window.removeEventListener("keydown", y);
|
|
2748
2724
|
});
|
|
2749
|
-
const
|
|
2750
|
-
if (
|
|
2751
|
-
const
|
|
2752
|
-
|
|
2753
|
-
}, v = (
|
|
2754
|
-
i.value =
|
|
2755
|
-
},
|
|
2756
|
-
|
|
2757
|
-
},
|
|
2758
|
-
|
|
2759
|
-
},
|
|
2760
|
-
if (!
|
|
2761
|
-
const
|
|
2762
|
-
(I,
|
|
2725
|
+
const q = () => {
|
|
2726
|
+
if (n.disabled) return;
|
|
2727
|
+
const c = i.value;
|
|
2728
|
+
l("update:modelValue", null), c && l("clear", c);
|
|
2729
|
+
}, v = (c) => {
|
|
2730
|
+
i.value = c, s.value || (u.value = c.text), l("update:modelValue", c.value), l("select", c), S();
|
|
2731
|
+
}, T = () => {
|
|
2732
|
+
k.value.length > 0 && v(k.value[0]);
|
|
2733
|
+
}, b = () => {
|
|
2734
|
+
r.value || $();
|
|
2735
|
+
}, y = (c) => {
|
|
2736
|
+
if (!r.value || k.value.length === 0) return;
|
|
2737
|
+
const w = k.value.findIndex(
|
|
2738
|
+
(I, A) => "option-" + A === p.value
|
|
2763
2739
|
);
|
|
2764
|
-
let
|
|
2765
|
-
if (
|
|
2766
|
-
|
|
2767
|
-
else if (
|
|
2768
|
-
|
|
2769
|
-
else if (
|
|
2770
|
-
|
|
2771
|
-
const I =
|
|
2772
|
-
(
|
|
2740
|
+
let x = -1;
|
|
2741
|
+
if (c.key === "ArrowDown")
|
|
2742
|
+
c.preventDefault(), x = (w + 1) % k.value.length;
|
|
2743
|
+
else if (c.key === "ArrowUp")
|
|
2744
|
+
c.preventDefault(), x = (w - 1 + k.value.length) % k.value.length;
|
|
2745
|
+
else if (c.key === "Enter" && p.value) {
|
|
2746
|
+
c.preventDefault();
|
|
2747
|
+
const I = k.value.find(
|
|
2748
|
+
(A, H) => "option-" + H === p.value
|
|
2773
2749
|
);
|
|
2774
2750
|
I && v(I);
|
|
2775
2751
|
return;
|
|
2776
|
-
} else if (
|
|
2777
|
-
|
|
2752
|
+
} else if (c.key === "Escape") {
|
|
2753
|
+
c.preventDefault(), S(), g.value && g.value.focus();
|
|
2778
2754
|
return;
|
|
2779
2755
|
} else if (s.value)
|
|
2780
2756
|
return;
|
|
2781
|
-
if (
|
|
2782
|
-
|
|
2783
|
-
const I = document.getElementById(
|
|
2757
|
+
if (x !== -1) {
|
|
2758
|
+
p.value = "option-" + x;
|
|
2759
|
+
const I = document.getElementById(p.value);
|
|
2784
2760
|
I && requestAnimationFrame(() => {
|
|
2785
2761
|
I.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
2786
2762
|
});
|
|
2787
2763
|
}
|
|
2788
2764
|
};
|
|
2789
|
-
return R(
|
|
2790
|
-
|
|
2765
|
+
return R(r, (c) => {
|
|
2766
|
+
c ? (window.addEventListener("keydown", y), !s.value && !u.value && i.value && (u.value = i.value.text)) : window.removeEventListener("keydown", y);
|
|
2791
2767
|
}), _e(() => {
|
|
2792
|
-
document.removeEventListener("click", z), window.removeEventListener("keydown",
|
|
2768
|
+
document.removeEventListener("click", z), window.removeEventListener("keydown", y);
|
|
2793
2769
|
}), t({
|
|
2794
|
-
isDropdownOpen:
|
|
2770
|
+
isDropdownOpen: r,
|
|
2795
2771
|
// Expose state
|
|
2796
2772
|
selectedItem: i,
|
|
2797
2773
|
// Expose selected item
|
|
2798
|
-
openDropdown:
|
|
2774
|
+
openDropdown: $,
|
|
2799
2775
|
// Expose method to open
|
|
2800
|
-
closeDropdown:
|
|
2776
|
+
closeDropdown: S,
|
|
2801
2777
|
// Expose method to close
|
|
2802
|
-
toggleDropdown:
|
|
2778
|
+
toggleDropdown: D,
|
|
2803
2779
|
// Expose method to toggle
|
|
2804
2780
|
selectItem: v,
|
|
2805
2781
|
// Expose method to select an item programmatically
|
|
@@ -2807,13 +2783,13 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2807
2783
|
// Expose filter text (useful if parent controls filtering)
|
|
2808
2784
|
hasDefaultSlotContent: s
|
|
2809
2785
|
// Expose to know if the default slot is used
|
|
2810
|
-
}), (
|
|
2786
|
+
}), (c, w) => (f(), h("div", {
|
|
2811
2787
|
class: "relative w-full max-w-xs form-control",
|
|
2812
2788
|
ref_key: "componentRoot",
|
|
2813
|
-
ref:
|
|
2789
|
+
ref: C
|
|
2814
2790
|
}, [
|
|
2815
|
-
e.label ? (f(),
|
|
2816
|
-
d("span",
|
|
2791
|
+
e.label ? (f(), h("label", xo, [
|
|
2792
|
+
d("span", ko, P(e.label), 1)
|
|
2817
2793
|
])) : E("", !0),
|
|
2818
2794
|
d("div", {
|
|
2819
2795
|
class: B(["flex items-center input-bordered rounded-md w-fit cursor-pointer", { input: !s.value, select: !s.value }]),
|
|
@@ -2821,34 +2797,34 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2821
2797
|
i.value ? "background-image: unset; padding-right: 0.5rem;" : ""
|
|
2822
2798
|
),
|
|
2823
2799
|
tabindex: "0",
|
|
2824
|
-
onClick:
|
|
2800
|
+
onClick: w[1] || (w[1] = (x) => s.value ? D() : $()),
|
|
2825
2801
|
onKeydown: [
|
|
2826
|
-
We(te(
|
|
2827
|
-
We(te(
|
|
2802
|
+
We(te(T, ["prevent"]), ["enter"]),
|
|
2803
|
+
We(te(T, ["prevent"]), ["space"])
|
|
2828
2804
|
],
|
|
2829
2805
|
onBlur: j,
|
|
2830
2806
|
role: "combobox",
|
|
2831
2807
|
"aria-haspopup": "listbox",
|
|
2832
|
-
"aria-expanded":
|
|
2833
|
-
"aria-activedescendant":
|
|
2808
|
+
"aria-expanded": r.value,
|
|
2809
|
+
"aria-activedescendant": p.value,
|
|
2834
2810
|
"aria-autocomplete": "list",
|
|
2835
2811
|
ref_key: "activatorWrapper",
|
|
2836
2812
|
ref: g
|
|
2837
2813
|
}, [
|
|
2838
|
-
V(
|
|
2839
|
-
s.value ? E("", !0) : Ce((f(),
|
|
2814
|
+
V(c.$slots, "default", {}, () => [
|
|
2815
|
+
s.value ? E("", !0) : Ce((f(), h("input", {
|
|
2840
2816
|
key: 0,
|
|
2841
2817
|
type: "text",
|
|
2842
2818
|
placeholder: e.placeholder,
|
|
2843
2819
|
class: "bg-transparent border-none focus:outline-none w-full",
|
|
2844
|
-
"onUpdate:modelValue":
|
|
2820
|
+
"onUpdate:modelValue": w[0] || (w[0] = (x) => u.value = x),
|
|
2845
2821
|
ref_key: "filterInput",
|
|
2846
2822
|
ref: m,
|
|
2847
|
-
onFocus:
|
|
2848
|
-
onInput:
|
|
2823
|
+
onFocus: $,
|
|
2824
|
+
onInput: b,
|
|
2849
2825
|
tabindex: "-1",
|
|
2850
|
-
disabled:
|
|
2851
|
-
}, null, 40,
|
|
2826
|
+
disabled: n.disabled
|
|
2827
|
+
}, null, 40, So)), [
|
|
2852
2828
|
[Tt, u.value]
|
|
2853
2829
|
])
|
|
2854
2830
|
]),
|
|
@@ -2856,42 +2832,42 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2856
2832
|
key: 0,
|
|
2857
2833
|
size: 20,
|
|
2858
2834
|
class: "mx-2 text-base-content/50 hover:text-base-content/80 cursor-pointer",
|
|
2859
|
-
onClick: te(
|
|
2835
|
+
onClick: te(q, ["stop"])
|
|
2860
2836
|
})) : E("", !0),
|
|
2861
2837
|
s.value && !i.value ? (f(), ae(Z(pn), {
|
|
2862
2838
|
key: 1,
|
|
2863
|
-
class: B([{ "rotate-180":
|
|
2839
|
+
class: B([{ "rotate-180": r.value }, "mx-2"]),
|
|
2864
2840
|
size: 20
|
|
2865
2841
|
}, null, 8, ["class"])) : E("", !0)
|
|
2866
|
-
], 46,
|
|
2867
|
-
Ce(d("div",
|
|
2868
|
-
d("ul",
|
|
2869
|
-
(f(!0),
|
|
2870
|
-
key:
|
|
2871
|
-
onMousedown: te((
|
|
2842
|
+
], 46, $o),
|
|
2843
|
+
Ce(d("div", Co, [
|
|
2844
|
+
d("ul", Do, [
|
|
2845
|
+
(f(!0), h(U, null, F(k.value, (x, I) => (f(), h("li", {
|
|
2846
|
+
key: x.value,
|
|
2847
|
+
onMousedown: te((A) => v(x), ["prevent"]),
|
|
2872
2848
|
class: "hover:bg-base-200 rounded-md w-full cursor-pointer",
|
|
2873
2849
|
id: "option-" + I,
|
|
2874
2850
|
role: "option",
|
|
2875
|
-
"aria-selected": i.value && i.value.value ===
|
|
2851
|
+
"aria-selected": i.value && i.value.value === x.value
|
|
2876
2852
|
}, [
|
|
2877
|
-
d("a", null,
|
|
2878
|
-
], 40,
|
|
2853
|
+
d("a", null, P(x.text), 1)
|
|
2854
|
+
], 40, To))), 128))
|
|
2879
2855
|
])
|
|
2880
2856
|
], 512), [
|
|
2881
|
-
[nn,
|
|
2857
|
+
[nn, r.value && k.value.length > 0]
|
|
2882
2858
|
])
|
|
2883
2859
|
], 512));
|
|
2884
2860
|
}
|
|
2885
|
-
},
|
|
2861
|
+
}, Mo = { class: "w-full max-w-xs form-control" }, Io = {
|
|
2886
2862
|
key: 0,
|
|
2887
2863
|
class: "label"
|
|
2888
|
-
},
|
|
2864
|
+
}, Eo = { class: "label-text" }, Bo = ["type", "placeholder", "disabled", "value"], Vo = {
|
|
2889
2865
|
key: 1,
|
|
2890
2866
|
class: "label"
|
|
2891
|
-
},
|
|
2867
|
+
}, zo = { class: "label-text-alt text-error validator-hint" }, Po = {
|
|
2892
2868
|
key: 2,
|
|
2893
2869
|
class: "label"
|
|
2894
|
-
},
|
|
2870
|
+
}, Oo = { class: "label-text-alt text-success validator-hint" }, Il = /* @__PURE__ */ N({
|
|
2895
2871
|
__name: "inputField",
|
|
2896
2872
|
props: {
|
|
2897
2873
|
modelValue: { default: "" },
|
|
@@ -2907,42 +2883,42 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2907
2883
|
disabled: { type: Boolean, default: !1 }
|
|
2908
2884
|
},
|
|
2909
2885
|
emits: ["update:modelValue", "validate"],
|
|
2910
|
-
setup(e, { expose: t, emit:
|
|
2911
|
-
const
|
|
2912
|
-
var
|
|
2913
|
-
let
|
|
2914
|
-
const
|
|
2915
|
-
return (
|
|
2916
|
-
}),
|
|
2917
|
-
const
|
|
2918
|
-
|
|
2919
|
-
},
|
|
2886
|
+
setup(e, { expose: t, emit: a }) {
|
|
2887
|
+
const n = e, l = a, o = M(null), s = M(!1), u = M(""), i = K(() => {
|
|
2888
|
+
var D, k, z, j;
|
|
2889
|
+
let p = !0, $ = "";
|
|
2890
|
+
const S = n.modelValue;
|
|
2891
|
+
return (D = n.rules) != null && D.required && (S == null || S === "") && (p = !1, $ = "This field is required."), p && ((k = n.rules) == null ? void 0 : k.minLength) !== void 0 && typeof S == "string" && S.length < n.rules.minLength && (p = !1, $ = `Must be at least ${n.rules.minLength} characters.`), p && ((z = n.rules) == null ? void 0 : z.maxLength) !== void 0 && typeof S == "string" && S.length > n.rules.maxLength && (p = !1, $ = `Cannot exceed ${n.rules.maxLength} characters.`), p && ((j = n.rules) != null && j.email) && typeof S == "string" && S && (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(S) || (p = !1, $ = "Please enter a valid email address.")), u.value = $, l("validate", p), p;
|
|
2892
|
+
}), r = K(() => s.value && !i.value), m = (p) => {
|
|
2893
|
+
const $ = p.target;
|
|
2894
|
+
l("update:modelValue", $.value), s.value && i.value;
|
|
2895
|
+
}, C = () => {
|
|
2920
2896
|
s.value = !0, i.value;
|
|
2921
2897
|
};
|
|
2922
2898
|
return R(
|
|
2923
|
-
() =>
|
|
2899
|
+
() => n.modelValue,
|
|
2924
2900
|
() => {
|
|
2925
2901
|
s.value && i.value;
|
|
2926
2902
|
}
|
|
2927
2903
|
), t({
|
|
2928
2904
|
focusInput: () => {
|
|
2929
|
-
var
|
|
2930
|
-
console.log("inputField.vue: focusInput method called."), (
|
|
2905
|
+
var p;
|
|
2906
|
+
console.log("inputField.vue: focusInput method called."), (p = o.value) == null || p.focus();
|
|
2931
2907
|
},
|
|
2932
2908
|
isValid: i,
|
|
2933
2909
|
isTouched: s,
|
|
2934
2910
|
errorMessage: u
|
|
2935
|
-
}), (
|
|
2936
|
-
e.label ? (f(),
|
|
2937
|
-
d("span",
|
|
2911
|
+
}), (p, $) => (f(), h("div", Mo, [
|
|
2912
|
+
e.label ? (f(), h("label", Io, [
|
|
2913
|
+
d("span", Eo, P(e.label), 1)
|
|
2938
2914
|
])) : E("", !0),
|
|
2939
|
-
V(
|
|
2915
|
+
V(p.$slots, "default"),
|
|
2940
2916
|
d("input", {
|
|
2941
2917
|
ref_key: "inputElement",
|
|
2942
|
-
ref:
|
|
2918
|
+
ref: o,
|
|
2943
2919
|
type: e.type,
|
|
2944
2920
|
placeholder: e.placeholder,
|
|
2945
|
-
disabled:
|
|
2921
|
+
disabled: n.disabled,
|
|
2946
2922
|
class: B(["input-bordered rounded-md w-full input validator", [
|
|
2947
2923
|
{
|
|
2948
2924
|
// Size classes - Apply based on size prop
|
|
@@ -2955,33 +2931,33 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2955
2931
|
"input-ghost": e.style === "ghost",
|
|
2956
2932
|
// Color classes - Apply only if NOT in an error state AND NOT in a validation success state.
|
|
2957
2933
|
// This ensures validation feedback overrides base colors.
|
|
2958
|
-
"input-neutral": e.color === "neutral" && !
|
|
2959
|
-
"input-primary": e.color === "primary" && !
|
|
2960
|
-
"input-secondary": e.color === "secondary" && !
|
|
2961
|
-
"input-accent": e.color === "accent" && !
|
|
2962
|
-
"input-info": e.color === "info" && !
|
|
2963
|
-
"input-success": e.color === "success" && !
|
|
2934
|
+
"input-neutral": e.color === "neutral" && !r.value && !(i.value && s.value && e.needsValidation),
|
|
2935
|
+
"input-primary": e.color === "primary" && !r.value && !(i.value && s.value && e.needsValidation),
|
|
2936
|
+
"input-secondary": e.color === "secondary" && !r.value && !(i.value && s.value && e.needsValidation),
|
|
2937
|
+
"input-accent": e.color === "accent" && !r.value && !(i.value && s.value && e.needsValidation),
|
|
2938
|
+
"input-info": e.color === "info" && !r.value && !(i.value && s.value && e.needsValidation),
|
|
2939
|
+
"input-success": e.color === "success" && !r.value && !(i.value && s.value && e.needsValidation),
|
|
2964
2940
|
// Color success applies only if not in error or validation success state
|
|
2965
|
-
"input-warning": e.color === "warning" && !
|
|
2941
|
+
"input-warning": e.color === "warning" && !r.value && !(i.value && s.value && e.needsValidation),
|
|
2966
2942
|
// Validation state classes - These take precedence visually via conditions or CSS specificity.
|
|
2967
|
-
"input-error":
|
|
2943
|
+
"input-error": r.value,
|
|
2968
2944
|
// Apply error style if validation fails
|
|
2969
|
-
"input-success-validation": i.value && s.value && !
|
|
2945
|
+
"input-success-validation": i.value && s.value && !r.value && e.needsValidation
|
|
2970
2946
|
// 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.
|
|
2971
2947
|
}
|
|
2972
2948
|
]]),
|
|
2973
2949
|
value: e.modelValue,
|
|
2974
2950
|
onInput: m,
|
|
2975
|
-
onBlur:
|
|
2976
|
-
}, null, 42,
|
|
2977
|
-
|
|
2978
|
-
d("span",
|
|
2979
|
-
])) : i.value && s.value && e.successMessage ? (f(),
|
|
2980
|
-
d("span",
|
|
2951
|
+
onBlur: C
|
|
2952
|
+
}, null, 42, Bo),
|
|
2953
|
+
r.value ? (f(), h("div", Vo, [
|
|
2954
|
+
d("span", zo, P(u.value), 1)
|
|
2955
|
+
])) : i.value && s.value && e.successMessage ? (f(), h("div", Po, [
|
|
2956
|
+
d("span", Oo, P(e.successMessage), 1)
|
|
2981
2957
|
])) : E("", !0)
|
|
2982
2958
|
]));
|
|
2983
2959
|
}
|
|
2984
|
-
}),
|
|
2960
|
+
}), El = /* @__PURE__ */ N({
|
|
2985
2961
|
__name: "loader",
|
|
2986
2962
|
props: {
|
|
2987
2963
|
loading: { type: Boolean, default: !0 },
|
|
@@ -2990,13 +2966,13 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
2990
2966
|
color: { default: "primary" }
|
|
2991
2967
|
},
|
|
2992
2968
|
setup(e) {
|
|
2993
|
-
const t = e,
|
|
2969
|
+
const t = e, a = M(t.loading);
|
|
2994
2970
|
return R(
|
|
2995
2971
|
() => t.loading,
|
|
2996
|
-
(
|
|
2997
|
-
|
|
2972
|
+
(n) => {
|
|
2973
|
+
a.value = n;
|
|
2998
2974
|
}
|
|
2999
|
-
), (
|
|
2975
|
+
), (n, l) => a.value ? (f(), h("span", {
|
|
3000
2976
|
key: 0,
|
|
3001
2977
|
class: B(["loading", [
|
|
3002
2978
|
{ "loading-xs": e.size === "xs" },
|
|
@@ -3023,13 +2999,13 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
3023
2999
|
]])
|
|
3024
3000
|
}, null, 2)) : E("", !0);
|
|
3025
3001
|
}
|
|
3026
|
-
}),
|
|
3002
|
+
}), No = { class: "footer sm:footer-horizontal container" }, Ao = { class: "footer-title" }, Lo = ["href"], Uo = {
|
|
3027
3003
|
key: 0,
|
|
3028
3004
|
class: "sm:hidden w-full"
|
|
3029
|
-
},
|
|
3005
|
+
}, jo = { class: "border-b-2 border-base-100 last:border-b-0 w-full" }, Fo = {
|
|
3030
3006
|
tabindex: "0",
|
|
3031
3007
|
class: "collapse collapse-plus w-full"
|
|
3032
|
-
},
|
|
3008
|
+
}, Ro = { class: "collapse-title font-bold text-lg collapsible-footer-title" }, qo = { class: "collapse-content flex w-full text-sm" }, Ho = { class: "flex flex-col gap-2.5" }, _o = { class: "w-full" }, Wo = ["href"], Zo = { class: "w-full" }, Bl = /* @__PURE__ */ N({
|
|
3033
3009
|
__name: "footer",
|
|
3034
3010
|
props: {
|
|
3035
3011
|
items: {},
|
|
@@ -3039,48 +3015,48 @@ const el = ["placeholder", "value", "id", "disabled"], tl = ["disabled"], nl = {
|
|
|
3039
3015
|
},
|
|
3040
3016
|
setup(e) {
|
|
3041
3017
|
const t = e;
|
|
3042
|
-
return (
|
|
3018
|
+
return (a, n) => (f(), h("div", {
|
|
3043
3019
|
class: B(["mx-auto md:px-10 py-10 text-base-content", [e.background ?? "bg-base-200", e.color ?? "text-base-content"]])
|
|
3044
3020
|
}, [
|
|
3045
|
-
d("footer",
|
|
3046
|
-
(f(!0),
|
|
3021
|
+
d("footer", No, [
|
|
3022
|
+
(f(!0), h(U, null, F(t.items, (l) => (f(), h("nav", {
|
|
3047
3023
|
class: B([{ "hidden sm:grid": e.collapseOnMobile }])
|
|
3048
3024
|
}, [
|
|
3049
|
-
d("h6",
|
|
3050
|
-
(f(!0),
|
|
3025
|
+
d("h6", Ao, P(l.title), 1),
|
|
3026
|
+
(f(!0), h(U, null, F(l.items, (o) => (f(), h("a", {
|
|
3051
3027
|
class: "link link-hover",
|
|
3052
|
-
href:
|
|
3053
|
-
},
|
|
3028
|
+
href: o.link
|
|
3029
|
+
}, P(o.text), 9, Lo))), 256))
|
|
3054
3030
|
], 2))), 256)),
|
|
3055
|
-
e.collapseOnMobile ? (f(),
|
|
3056
|
-
(f(!0),
|
|
3057
|
-
d("div",
|
|
3058
|
-
d("div",
|
|
3059
|
-
d("div",
|
|
3060
|
-
d("ul",
|
|
3061
|
-
(f(!0),
|
|
3031
|
+
e.collapseOnMobile ? (f(), h("nav", Uo, [
|
|
3032
|
+
(f(!0), h(U, null, F(t.items, (l) => (f(), h("ul", jo, [
|
|
3033
|
+
d("div", Fo, [
|
|
3034
|
+
d("div", Ro, P(l.title), 1),
|
|
3035
|
+
d("div", qo, [
|
|
3036
|
+
d("ul", Ho, [
|
|
3037
|
+
(f(!0), h(U, null, F(l.items, (o) => (f(), h("li", _o, [
|
|
3062
3038
|
d("a", {
|
|
3063
3039
|
class: "w-full font-medium link link-hover",
|
|
3064
|
-
href:
|
|
3065
|
-
},
|
|
3040
|
+
href: o.link
|
|
3041
|
+
}, P(o.text), 9, Wo)
|
|
3066
3042
|
]))), 256))
|
|
3067
3043
|
])
|
|
3068
3044
|
])
|
|
3069
3045
|
])
|
|
3070
3046
|
]))), 256))
|
|
3071
3047
|
])) : E("", !0),
|
|
3072
|
-
d("aside",
|
|
3073
|
-
V(
|
|
3048
|
+
d("aside", Zo, [
|
|
3049
|
+
V(a.$slots, "default")
|
|
3074
3050
|
])
|
|
3075
3051
|
])
|
|
3076
3052
|
], 2));
|
|
3077
3053
|
}
|
|
3078
|
-
}),
|
|
3079
|
-
function
|
|
3080
|
-
return f(),
|
|
3081
|
-
d("div",
|
|
3054
|
+
}), Ko = {}, Yo = { class: "min-h-40 container hero" }, Jo = { class: "px-0! text-center hero-content" }, Xo = { class: "mt-9 text-4xl" };
|
|
3055
|
+
function Go(e, t) {
|
|
3056
|
+
return f(), h("div", Yo, [
|
|
3057
|
+
d("div", Jo, [
|
|
3082
3058
|
d("div", null, [
|
|
3083
|
-
d("h1",
|
|
3059
|
+
d("h1", Xo, [
|
|
3084
3060
|
V(e.$slots, "title", {}, () => [
|
|
3085
3061
|
t[0] || (t[0] = Ct("hero title", -1))
|
|
3086
3062
|
])
|
|
@@ -3095,7 +3071,7 @@ function Xl(e, t) {
|
|
|
3095
3071
|
])
|
|
3096
3072
|
]);
|
|
3097
3073
|
}
|
|
3098
|
-
const
|
|
3074
|
+
const Vl = /* @__PURE__ */ we(Ko, [["render", Go]]), Qo = { class: "flex flex-row place-content-center gap-4 categories" }, el = ["onClick"], zl = /* @__PURE__ */ N({
|
|
3099
3075
|
__name: "categoryNavigation",
|
|
3100
3076
|
props: {
|
|
3101
3077
|
searchOptions: {},
|
|
@@ -3103,53 +3079,53 @@ const Vo = /* @__PURE__ */ we(Zl, [["render", Xl]]), Gl = { class: "flex flex-ro
|
|
|
3103
3079
|
},
|
|
3104
3080
|
emits: ["update:currentCategory"],
|
|
3105
3081
|
setup(e, { emit: t }) {
|
|
3106
|
-
const
|
|
3107
|
-
function o
|
|
3108
|
-
|
|
3082
|
+
const a = e, n = t;
|
|
3083
|
+
function l(o) {
|
|
3084
|
+
n("update:currentCategory", o);
|
|
3109
3085
|
}
|
|
3110
|
-
return (
|
|
3111
|
-
(f(!0),
|
|
3086
|
+
return (o, s) => (f(), h("div", Qo, [
|
|
3087
|
+
(f(!0), h(U, null, F(a.searchOptions, (u) => (f(), h("div", {
|
|
3112
3088
|
key: u.category
|
|
3113
3089
|
}, [
|
|
3114
3090
|
d("button", {
|
|
3115
|
-
onClick: (i) =>
|
|
3116
|
-
class: B(["truncate btn btn-ghost", { "font-semibold":
|
|
3117
|
-
},
|
|
3091
|
+
onClick: (i) => l(u.category),
|
|
3092
|
+
class: B(["truncate btn btn-ghost", { "font-semibold": a.currentCategory === u.category }])
|
|
3093
|
+
}, P(u.category), 11, el)
|
|
3118
3094
|
]))), 128))
|
|
3119
3095
|
]));
|
|
3120
3096
|
}
|
|
3121
|
-
}),
|
|
3097
|
+
}), tl = { class: "md:flex hidden navbar-start" }, nl = { class: "md:flex justify-center items-center hidden navbar-center" }, al = { class: "md:flex hidden navbar-end" }, ol = { class: "navbar-bottom md:flex hidden" }, ll = /* @__PURE__ */ N({
|
|
3122
3098
|
__name: "navigationBar",
|
|
3123
3099
|
props: {
|
|
3124
3100
|
isCollapsed: { type: Boolean, default: !0 }
|
|
3125
3101
|
},
|
|
3126
3102
|
setup(e) {
|
|
3127
3103
|
const t = e;
|
|
3128
|
-
return (
|
|
3104
|
+
return (a, n) => (f(), h("nav", {
|
|
3129
3105
|
class: B(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar", t.isCollapsed ? "collapsed" : ""])
|
|
3130
3106
|
}, [
|
|
3131
|
-
d("div",
|
|
3132
|
-
V(
|
|
3107
|
+
d("div", tl, [
|
|
3108
|
+
V(a.$slots, "start", {}, void 0, !0)
|
|
3133
3109
|
]),
|
|
3134
|
-
d("div",
|
|
3135
|
-
V(
|
|
3110
|
+
d("div", nl, [
|
|
3111
|
+
V(a.$slots, "center", {}, void 0, !0)
|
|
3136
3112
|
]),
|
|
3137
|
-
d("div",
|
|
3138
|
-
V(
|
|
3113
|
+
d("div", al, [
|
|
3114
|
+
V(a.$slots, "end", {}, void 0, !0)
|
|
3139
3115
|
]),
|
|
3140
|
-
d("div",
|
|
3141
|
-
V(
|
|
3116
|
+
d("div", ol, [
|
|
3117
|
+
V(a.$slots, "bottom", {}, void 0, !0)
|
|
3142
3118
|
])
|
|
3143
3119
|
], 2));
|
|
3144
3120
|
}
|
|
3145
|
-
}),
|
|
3121
|
+
}), Pl = /* @__PURE__ */ we(ll, [["__scopeId", "data-v-8ddb2b45"]]), sl = {
|
|
3146
3122
|
key: 0,
|
|
3147
3123
|
class: "hidden top-4 right-0 absolute md:flex gap-4"
|
|
3148
|
-
},
|
|
3124
|
+
}, il = ["onClick", "aria-selected"], rl = {
|
|
3149
3125
|
key: 0,
|
|
3150
3126
|
role: "tabpanel",
|
|
3151
3127
|
class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full overflow-x-auto tab-content"
|
|
3152
|
-
},
|
|
3128
|
+
}, ul = { class: "p-6 border-x-0 border-t-2 border-b-0 border-base-300 max-w-full" }, Ol = /* @__PURE__ */ N({
|
|
3153
3129
|
__name: "tab",
|
|
3154
3130
|
props: {
|
|
3155
3131
|
items: {},
|
|
@@ -3159,81 +3135,81 @@ const Vo = /* @__PURE__ */ we(Zl, [["render", Xl]]), Gl = { class: "flex flex-ro
|
|
|
3159
3135
|
},
|
|
3160
3136
|
emits: ["tab-changed"],
|
|
3161
3137
|
setup(e, { emit: t }) {
|
|
3162
|
-
const
|
|
3163
|
-
function
|
|
3164
|
-
|
|
3138
|
+
const a = e, n = M(a.items[0]), l = t;
|
|
3139
|
+
function o(i) {
|
|
3140
|
+
n.value = i, l("tab-changed", i);
|
|
3165
3141
|
}
|
|
3166
3142
|
function s() {
|
|
3167
|
-
const
|
|
3168
|
-
|
|
3143
|
+
const r = (a.items.indexOf(n.value) + 1) % a.items.length;
|
|
3144
|
+
o(a.items[r]);
|
|
3169
3145
|
}
|
|
3170
3146
|
function u() {
|
|
3171
|
-
const
|
|
3172
|
-
|
|
3147
|
+
const r = (a.items.indexOf(n.value) - 1 + a.items.length) % a.items.length;
|
|
3148
|
+
o(a.items[r]);
|
|
3173
3149
|
}
|
|
3174
3150
|
return ue(() => {
|
|
3175
|
-
|
|
3151
|
+
a.items && o(a.items[0]);
|
|
3176
3152
|
}), Dt(() => {
|
|
3177
|
-
|
|
3153
|
+
a.rotateTabsAfter && a.rotateTabsAfter > 0 && setInterval(() => {
|
|
3178
3154
|
s();
|
|
3179
|
-
},
|
|
3180
|
-
}), (i,
|
|
3155
|
+
}, a.rotateTabsAfter * 1e3);
|
|
3156
|
+
}), (i, r) => (f(), h(U, null, [
|
|
3181
3157
|
d("div", {
|
|
3182
3158
|
role: "tablist",
|
|
3183
3159
|
class: B(["relative tabs-bordered w-full tabs tabs-lg", { "flex-nowrap overflow-x-auto": e.buttonOnlyMode }])
|
|
3184
3160
|
}, [
|
|
3185
|
-
e.withControlls ? (f(),
|
|
3161
|
+
e.withControlls ? (f(), h("div", sl, [
|
|
3186
3162
|
d("button", {
|
|
3187
|
-
onClick:
|
|
3163
|
+
onClick: r[0] || (r[0] = (m) => u()),
|
|
3188
3164
|
class: "cursor-pointer"
|
|
3189
3165
|
}, "Previous"),
|
|
3190
3166
|
d("button", {
|
|
3191
|
-
onClick:
|
|
3167
|
+
onClick: r[1] || (r[1] = (m) => s()),
|
|
3192
3168
|
class: "text-primary cursor-pointer"
|
|
3193
3169
|
}, "Next")
|
|
3194
3170
|
])) : E("", !0),
|
|
3195
|
-
(f(!0),
|
|
3171
|
+
(f(!0), h(U, null, F(e.items, (m) => (f(), h(U, null, [
|
|
3196
3172
|
d("a", {
|
|
3197
3173
|
type: "button",
|
|
3198
3174
|
role: "tab",
|
|
3199
|
-
class: B(["min-w-max tab", m ===
|
|
3200
|
-
onClick: (
|
|
3201
|
-
"aria-selected":
|
|
3202
|
-
},
|
|
3203
|
-
e.buttonOnlyMode ? E("", !0) : (f(),
|
|
3175
|
+
class: B(["min-w-max tab", m === n.value ? "bg-primary text-base-100" : ""]),
|
|
3176
|
+
onClick: (C) => o(m),
|
|
3177
|
+
"aria-selected": n.value == m
|
|
3178
|
+
}, P(m), 11, il),
|
|
3179
|
+
e.buttonOnlyMode ? E("", !0) : (f(), h("div", rl, [
|
|
3204
3180
|
V(i.$slots, `${m}-tab`)
|
|
3205
3181
|
]))
|
|
3206
3182
|
], 64))), 256))
|
|
3207
3183
|
], 2),
|
|
3208
|
-
d("div",
|
|
3184
|
+
d("div", ul, [
|
|
3209
3185
|
V(i.$slots, "default")
|
|
3210
3186
|
])
|
|
3211
3187
|
], 64));
|
|
3212
3188
|
}
|
|
3213
3189
|
});
|
|
3214
3190
|
export {
|
|
3215
|
-
|
|
3216
|
-
$
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3191
|
+
gl as Accordion,
|
|
3192
|
+
$l as AdvancedSearch,
|
|
3193
|
+
yl as Avatar,
|
|
3194
|
+
bl as Badge,
|
|
3195
|
+
fl as ButtonComponent,
|
|
3196
|
+
wl as Card,
|
|
3197
|
+
xl as Carousel,
|
|
3198
|
+
kl as CarouselItem,
|
|
3199
|
+
zl as CategoryNavigation,
|
|
3200
|
+
Sl as DatetimePicker,
|
|
3201
|
+
ml as Dropdown,
|
|
3202
|
+
Ml as FilterableSelect,
|
|
3203
|
+
Bl as Footer,
|
|
3204
|
+
Vl as Hero,
|
|
3205
|
+
Il as InputField,
|
|
3206
|
+
El as Loader,
|
|
3207
|
+
pl as Modal,
|
|
3208
|
+
Pl as NavigationBar,
|
|
3209
|
+
Cl as Rating,
|
|
3210
|
+
Tl as Selector,
|
|
3211
|
+
hl as Swap,
|
|
3212
|
+
Ol as Tab,
|
|
3213
|
+
Dl as TagInput,
|
|
3214
|
+
vl as ThemeController
|
|
3239
3215
|
};
|