manolis-ui 0.0.1

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.
Files changed (47) hide show
  1. package/README.md +5 -0
  2. package/dist/App.vue.d.ts +2 -0
  3. package/dist/components/actions/ButtonComponent.vue.d.ts +29 -0
  4. package/dist/components/actions/dropdown.vue.d.ts +47 -0
  5. package/dist/components/actions/modal.vue.d.ts +36 -0
  6. package/dist/components/actions/swap.vue.d.ts +21 -0
  7. package/dist/components/actions/theme-controller.vue.d.ts +9 -0
  8. package/dist/components/data-display/accordion.vue.d.ts +14 -0
  9. package/dist/components/data-display/avatar.vue.d.ts +9 -0
  10. package/dist/components/data-display/badge.vue.d.ts +26 -0
  11. package/dist/components/data-display/card.vue.d.ts +35 -0
  12. package/dist/components/data-input/advancedSearch.vue.d.ts +46 -0
  13. package/dist/components/data-input/rating.vue.d.ts +15 -0
  14. package/dist/components/feedback/loader.vue.d.ts +7 -0
  15. package/dist/components/layout/footer.vue.d.ts +29 -0
  16. package/dist/components/layout/hero.vue.d.ts +23 -0
  17. package/dist/components/navigation/categoryNavigation.vue.d.ts +22 -0
  18. package/dist/components/navigation/navigationBar.vue.d.ts +25 -0
  19. package/dist/components/navigation/tab.vue.d.ts +24 -0
  20. package/dist/index.d.ts +18 -0
  21. package/dist/main.d.ts +0 -0
  22. package/dist/manolis-ui.css +1 -0
  23. package/dist/manolis-ui.js +1278 -0
  24. package/dist/manolis-ui.umd.cjs +36 -0
  25. package/dist/style.css +3170 -0
  26. package/dist/vite.svg +1 -0
  27. package/package.json +72 -0
  28. package/src/components/actions/ButtonComponent.vue +80 -0
  29. package/src/components/actions/dropdown.vue +46 -0
  30. package/src/components/actions/modal.vue +52 -0
  31. package/src/components/actions/swap.vue +15 -0
  32. package/src/components/actions/theme-controller.vue +52 -0
  33. package/src/components/data-display/accordion.vue +29 -0
  34. package/src/components/data-display/avatar.vue +36 -0
  35. package/src/components/data-display/badge.vue +35 -0
  36. package/src/components/data-display/card.vue +60 -0
  37. package/src/components/data-display/carousel.vue +34 -0
  38. package/src/components/data-input/advancedSearch.vue +227 -0
  39. package/src/components/data-input/datetimePicker.vue +409 -0
  40. package/src/components/data-input/input.vue +98 -0
  41. package/src/components/data-input/rating.vue +60 -0
  42. package/src/components/feedback/loader.vue +25 -0
  43. package/src/components/layout/footer.vue +42 -0
  44. package/src/components/layout/hero.vue +15 -0
  45. package/src/components/navigation/categoryNavigation.vue +40 -0
  46. package/src/components/navigation/navigationBar.vue +107 -0
  47. package/src/components/navigation/tab.vue +62 -0
@@ -0,0 +1,1278 @@
1
+ import { defineComponent as M, computed as C, openBlock as n, createElementBlock as a, normalizeClass as $, createCommentVNode as S, renderSlot as w, createTextVNode as ne, createElementVNode as t, Fragment as y, renderList as _, toDisplayString as h, ref as k, h as te, onMounted as F, watch as E, withDirectives as U, isRef as Te, vModelCheckbox as Me, unref as V, createVNode as X, defineAsyncComponent as Be, onBeforeUnmount as Ie, normalizeStyle as Oe, createBlock as re, resolveDynamicComponent as ie, mergeProps as ue, nextTick as de, onUnmounted as pe, vModelSelect as j, vModelText as ee } from "vue";
2
+ const Ue = {
3
+ key: 0,
4
+ class: "loading loading-spinner"
5
+ }, bn = /* @__PURE__ */ M({
6
+ __name: "ButtonComponent",
7
+ props: {
8
+ outlined: { type: Boolean, default: !1 },
9
+ active: { type: Boolean, default: !1 },
10
+ loading: { type: Boolean, default: !1 },
11
+ type: {},
12
+ size: {},
13
+ shape: {}
14
+ },
15
+ setup(d) {
16
+ const u = d, e = C(() => {
17
+ switch (u.size) {
18
+ case "large":
19
+ return "btn-lg";
20
+ case "small":
21
+ return "btn-sm";
22
+ case "tiny":
23
+ return "btn-tiny";
24
+ case "wide":
25
+ return "btn-wide";
26
+ case "full":
27
+ return "w-full";
28
+ default:
29
+ return "";
30
+ }
31
+ }), s = C(() => {
32
+ switch (u.type) {
33
+ case "neutral":
34
+ return "btn-neutral";
35
+ case "primary":
36
+ return "btn-primary";
37
+ case "secondary":
38
+ return "btn-secondary";
39
+ case "accent":
40
+ return "btn-accent";
41
+ case "ghost":
42
+ return "btn-ghost";
43
+ case "link":
44
+ return "btn-link px-0!";
45
+ case "info":
46
+ return "btn-info";
47
+ case "success":
48
+ return "btn-success";
49
+ case "warning":
50
+ return "btn-warning";
51
+ case "error":
52
+ return "btn-error";
53
+ default:
54
+ return "btn-neutral";
55
+ }
56
+ }), i = C(() => {
57
+ switch (u.shape) {
58
+ case "square":
59
+ return "btn-square";
60
+ case "circle":
61
+ return "btn-circle";
62
+ default:
63
+ return "";
64
+ }
65
+ });
66
+ return (l, p) => (n(), a("button", {
67
+ class: $(["btn", { "btn-outline": u.outlined }, { "btn-active": u.active }, s.value, e.value, i.value])
68
+ }, [
69
+ l.loading ? (n(), a("span", Ue)) : S("", !0),
70
+ w(l.$slots, "default", {}, () => [
71
+ p[0] || (p[0] = ne("Submit"))
72
+ ])
73
+ ], 2));
74
+ }
75
+ }), Ve = {
76
+ tabindex: "0",
77
+ class: "z-1 bg-base-100 shadow-sm p-2 rounded-sm min-w-[inherit] md:min-w-full xl:min-w-52 dropdown-content menu"
78
+ }, Ae = ["href"], hn = /* @__PURE__ */ M({
79
+ __name: "dropdown",
80
+ props: {
81
+ items: {},
82
+ position: { default: "bottom" },
83
+ floatPosition: { default: "start" },
84
+ openOnHover: { type: Boolean, default: !1 },
85
+ forceOpen: { type: Boolean, default: !1 }
86
+ },
87
+ setup(d) {
88
+ const u = {
89
+ left: "dropdown-left",
90
+ right: "dropdown-right",
91
+ bottom: "dropdown-bottom",
92
+ top: "dropdown-top"
93
+ }, e = {
94
+ start: "",
95
+ end: "dropdown-end"
96
+ }, s = d;
97
+ return (i, l) => (n(), a("div", {
98
+ class: $(["dropdown", u[s.position], e[s.floatPosition], { "dropdown-open": s.forceOpen }, { "dropdown-hover": s.openOnHover }])
99
+ }, [
100
+ w(i.$slots, "default", {
101
+ tabindex: "0",
102
+ role: "button"
103
+ }, () => [
104
+ l[0] || (l[0] = t("div", { class: "m-1 btn" }, "Open dropdown", -1))
105
+ ]),
106
+ t("ul", Ve, [
107
+ (n(!0), a(y, null, _(i.items, (p) => (n(), a("li", null, [
108
+ t("a", {
109
+ href: p.link
110
+ }, h(p.text), 9, Ae)
111
+ ]))), 256)),
112
+ w(i.$slots, "additional")
113
+ ])
114
+ ], 2));
115
+ }
116
+ }), Pe = { class: "modal-box" }, je = { class: "modal-action" }, yn = /* @__PURE__ */ M({
117
+ __name: "modal",
118
+ props: {
119
+ position: { default: "center" },
120
+ withBackdrop: { type: Boolean, default: !1 }
121
+ },
122
+ setup(d) {
123
+ const u = d, e = {
124
+ top: "modal-top",
125
+ bottom: "modal-bottom",
126
+ center: "modal-middle"
127
+ }, s = k(null), i = () => {
128
+ var p;
129
+ (p = s.value) == null || p.showModal();
130
+ }, l = () => {
131
+ var p;
132
+ (p = s.value) == null || p.close();
133
+ };
134
+ return (p, b) => (n(), a(y, null, [
135
+ t("span", {
136
+ class: "w-fit cursor-pointer",
137
+ onClick: i
138
+ }, [
139
+ w(p.$slots, "trigger", { role: "button" }, () => [
140
+ b[0] || (b[0] = t("button", { class: "btn" }, "Open", -1))
141
+ ])
142
+ ]),
143
+ t("dialog", {
144
+ ref_key: "dialog",
145
+ ref: s,
146
+ class: $(["modal", e[u.position]])
147
+ }, [
148
+ t("div", Pe, [
149
+ w(p.$slots, "default"),
150
+ t("div", je, [
151
+ w(p.$slots, "actions"),
152
+ t("form", {
153
+ method: "dialog",
154
+ onSubmit: l,
155
+ class: $(p.withBackdrop ? "modal-backdrop" : "")
156
+ }, [
157
+ w(p.$slots, "close-button", {}, () => [
158
+ b[1] || (b[1] = t("button", { class: "btn" }, "Close", -1))
159
+ ])
160
+ ], 34)
161
+ ])
162
+ ])
163
+ ], 2)
164
+ ], 64));
165
+ }
166
+ }), Ne = { class: "swap-on" }, ze = { class: "swap-off" }, wn = /* @__PURE__ */ M({
167
+ __name: "swap",
168
+ props: {
169
+ effect: {}
170
+ },
171
+ setup(d) {
172
+ const u = d;
173
+ return (e, s) => (n(), a("label", {
174
+ class: $(["swap", u.effect ? `swap-${e.effect}` : ""])
175
+ }, [
176
+ s[0] || (s[0] = t("input", { type: "checkbox" }, null, -1)),
177
+ t("div", Ne, [
178
+ w(e.$slots, "on")
179
+ ]),
180
+ t("div", ze, [
181
+ w(e.$slots, "off")
182
+ ])
183
+ ], 2));
184
+ }
185
+ });
186
+ /**
187
+ * @license lucide-vue-next v0.468.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */
192
+ const Ee = (d) => d.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
193
+ /**
194
+ * @license lucide-vue-next v0.468.0 - ISC
195
+ *
196
+ * This source code is licensed under the ISC license.
197
+ * See the LICENSE file in the root directory of this source tree.
198
+ */
199
+ var W = {
200
+ xmlns: "http://www.w3.org/2000/svg",
201
+ width: 24,
202
+ height: 24,
203
+ viewBox: "0 0 24 24",
204
+ fill: "none",
205
+ stroke: "currentColor",
206
+ "stroke-width": 2,
207
+ "stroke-linecap": "round",
208
+ "stroke-linejoin": "round"
209
+ };
210
+ /**
211
+ * @license lucide-vue-next v0.468.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */
216
+ const Le = ({ size: d, strokeWidth: u = 2, absoluteStrokeWidth: e, color: s, iconNode: i, name: l, class: p, ...b }, { slots: v }) => te(
217
+ "svg",
218
+ {
219
+ ...W,
220
+ width: d || W.width,
221
+ height: d || W.height,
222
+ stroke: s || W.stroke,
223
+ "stroke-width": e ? Number(u) * 24 / Number(d) : u,
224
+ class: ["lucide", `lucide-${Ee(l ?? "icon")}`],
225
+ ...b
226
+ },
227
+ [...i.map((m) => te(...m)), ...v.default ? [v.default()] : []]
228
+ );
229
+ /**
230
+ * @license lucide-vue-next v0.468.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */
235
+ const ae = (d, u) => (e, { slots: s }) => te(
236
+ Le,
237
+ {
238
+ ...e,
239
+ iconNode: u,
240
+ name: d
241
+ },
242
+ s
243
+ );
244
+ /**
245
+ * @license lucide-vue-next v0.468.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */
250
+ const Re = ae("MoonIcon", [
251
+ ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
252
+ ]);
253
+ /**
254
+ * @license lucide-vue-next v0.468.0 - ISC
255
+ *
256
+ * This source code is licensed under the ISC license.
257
+ * See the LICENSE file in the root directory of this source tree.
258
+ */
259
+ const ce = ae("SearchIcon", [
260
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
261
+ ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
262
+ ]);
263
+ /**
264
+ * @license lucide-vue-next v0.468.0 - ISC
265
+ *
266
+ * This source code is licensed under the ISC license.
267
+ * See the LICENSE file in the root directory of this source tree.
268
+ */
269
+ const Fe = ae("SunIcon", [
270
+ ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
271
+ ["path", { d: "M12 2v2", key: "tus03m" }],
272
+ ["path", { d: "M12 20v2", key: "1lh1kg" }],
273
+ ["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
274
+ ["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
275
+ ["path", { d: "M2 12h2", key: "1t8f8n" }],
276
+ ["path", { d: "M20 12h2", key: "1q8mjw" }],
277
+ ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
278
+ ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
279
+ ]), He = (d, u) => {
280
+ const e = k(null);
281
+ return F(() => {
282
+ if (typeof window < "u") {
283
+ const s = window.localStorage.getItem(d);
284
+ e.value = s ? JSON.parse(s) : u;
285
+ }
286
+ }), E(e, (s) => {
287
+ typeof window < "u" && window.localStorage.setItem(d, JSON.stringify(s));
288
+ }), e;
289
+ }, qe = { class: "swap-rotate swap" }, Ye = ["true-value", "false-value"], _n = /* @__PURE__ */ M({
290
+ __name: "theme-controller",
291
+ props: {
292
+ lightTheme: { default: "light" },
293
+ darkTheme: { default: "dark" }
294
+ },
295
+ setup(d) {
296
+ const u = d, e = He("theme", u.lightTheme);
297
+ function s(i) {
298
+ typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", i);
299
+ }
300
+ return F(() => s(e.value ? e.value : "")), E(e, (i) => {
301
+ s(i);
302
+ }), (i, l) => (n(), a("label", qe, [
303
+ U(t("input", {
304
+ type: "checkbox",
305
+ class: "theme-controller",
306
+ "onUpdate:modelValue": l[0] || (l[0] = (p) => Te(e) ? e.value = p : null),
307
+ "true-value": u.lightTheme,
308
+ "false-value": u.darkTheme
309
+ }, null, 8, Ye), [
310
+ [Me, V(e)]
311
+ ]),
312
+ X(V(Fe), { class: "swap-off fill-current" }),
313
+ X(V(Re), { class: "swap-on fill-current" })
314
+ ]));
315
+ }
316
+ }), Je = ["name"], We = { class: "collapse-title text-xl font-medium" }, Xe = { class: "collapse-content" }, Ze = ["innerHTML"], kn = /* @__PURE__ */ M({
317
+ __name: "accordion",
318
+ props: {
319
+ name: {},
320
+ items: {},
321
+ joinItems: { type: Boolean, default: !1 },
322
+ icon: {}
323
+ },
324
+ setup(d) {
325
+ const u = d;
326
+ return (e, s) => (n(!0), a(y, null, _(u.items, (i, l) => (n(), a("div", {
327
+ class: $(["collapse", [u.icon ? `collapse-${u.icon}` : "", { "join-item": e.joinItems }]]),
328
+ key: l
329
+ }, [
330
+ t("input", {
331
+ type: "radio",
332
+ name: e.name,
333
+ value: "true"
334
+ }, null, 8, Je),
335
+ t("div", We, h(i.title), 1),
336
+ t("div", Xe, [
337
+ t("span", {
338
+ innerHTML: i.content
339
+ }, null, 8, Ze)
340
+ ])
341
+ ], 2))), 128));
342
+ }
343
+ }), Ke = {
344
+ key: 0,
345
+ class: "rounded-sm"
346
+ }, Ge = ["src"], Qe = {
347
+ key: 1,
348
+ class: "bg-neutral text-neutral-content w-16 rounded-full flex justify-center p-[25%] text-center"
349
+ }, et = { class: "text-xl" }, $n = /* @__PURE__ */ M({
350
+ __name: "avatar",
351
+ props: {
352
+ image: {},
353
+ onlineStatus: { default: "none" },
354
+ initials: {}
355
+ },
356
+ setup(d) {
357
+ const u = d, e = k(u.onlineStatus);
358
+ return E(
359
+ () => u.onlineStatus,
360
+ (s) => {
361
+ s && (e.value = s);
362
+ }
363
+ ), (s, i) => (n(), a("div", {
364
+ class: $(["avatar", s.onlineStatus])
365
+ }, [
366
+ s.image ? (n(), a("div", Ke, [
367
+ t("img", {
368
+ src: s.image,
369
+ class: "w-full h-full"
370
+ }, null, 8, Ge)
371
+ ])) : (n(), a("div", Qe, [
372
+ t("p", et, h(s.initials), 1)
373
+ ]))
374
+ ], 2));
375
+ }
376
+ }), xn = /* @__PURE__ */ M({
377
+ __name: "badge",
378
+ props: {
379
+ color: { default: "neutral" },
380
+ outline: { type: Boolean, default: !1 },
381
+ size: { default: "medium" }
382
+ },
383
+ setup(d) {
384
+ const u = d, e = {
385
+ "extra small": "badge-xs",
386
+ small: "badge-sm",
387
+ medium: "badge-md",
388
+ large: "badge-lg"
389
+ }, s = {
390
+ neutral: "badge-neutral",
391
+ primary: "badge-primary",
392
+ secondary: "badge-secondary",
393
+ accent: "badge-accent",
394
+ ghost: "badge-ghost",
395
+ info: "badge-info",
396
+ success: "badge-success",
397
+ warning: "badge-warning",
398
+ error: "badge-error"
399
+ };
400
+ return (i, l) => (n(), a("span", {
401
+ class: $(["badge", e[u.size], s[u.color], { "badge-outline": u.outline }])
402
+ }, [
403
+ w(i.$slots, "default")
404
+ ], 2));
405
+ }
406
+ }), tt = ["src", "alt"], nt = {
407
+ key: 1,
408
+ class: "w-full h-32 skeleton"
409
+ }, at = {
410
+ key: 0,
411
+ class: "card-body"
412
+ }, ot = {
413
+ key: 0,
414
+ class: "group-hover:text-primary text-left text-lg cursor-pointer card-title"
415
+ }, st = {
416
+ key: 1,
417
+ class: "text-left"
418
+ }, lt = { class: "flex-col flex-nowrap mt-auto card-actions" }, rt = {
419
+ key: 1,
420
+ class: "card-body"
421
+ }, Cn = /* @__PURE__ */ M({
422
+ __name: "card",
423
+ props: {
424
+ imgUrl: { default: "" },
425
+ alt: { default: "A beautiful picture that says something about this card" },
426
+ title: { default: "" },
427
+ description: { default: "" },
428
+ outlined: { type: Boolean, default: !1 },
429
+ loading: { type: Boolean, default: !1 },
430
+ class: { default: "" }
431
+ },
432
+ setup(d) {
433
+ const u = d, e = k(u.outlined);
434
+ return E(
435
+ () => u.outlined,
436
+ (s) => {
437
+ e.value = s;
438
+ }
439
+ ), (s, i) => (n(), a("div", {
440
+ class: $(["bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact group", e.value ? "border-4 border-primary" : ""])
441
+ }, [
442
+ t("figure", null, [
443
+ s.imgUrl || s.imgUrl && !s.loading ? (n(), a("img", {
444
+ key: 0,
445
+ src: s.imgUrl,
446
+ alt: s.alt,
447
+ class: $(["rounded-sm w-full h-44 object-cover", {
448
+ hidden: s.loading
449
+ }])
450
+ }, null, 10, tt)) : S("", !0),
451
+ s.loading && s.imgUrl ? (n(), a("div", nt)) : S("", !0)
452
+ ]),
453
+ s.loading ? S("", !0) : (n(), a("div", at, [
454
+ s.title ? (n(), a("h2", ot, h(s.title), 1)) : S("", !0),
455
+ w(s.$slots, "details"),
456
+ s.description ? (n(), a("p", st, h(s.description), 1)) : S("", !0),
457
+ t("div", lt, [
458
+ w(s.$slots, "actions")
459
+ ])
460
+ ])),
461
+ s.loading ? (n(), a("div", rt, i[0] || (i[0] = [
462
+ t("div", { class: "flex flex-col gap-4 w-52" }, [
463
+ t("div", { class: "w-28 h-4 skeleton" }),
464
+ t("div", { class: "w-full h-4 skeleton" }),
465
+ t("div", { class: "w-full h-4 skeleton" })
466
+ ], -1)
467
+ ]))) : S("", !0)
468
+ ], 2));
469
+ }
470
+ }), it = { class: "flex gap-4 bg-base-100 w-full tabs tabs-boxed" }, ut = ["onClick"], dt = { class: "text-sm" }, ct = { class: "md:block hidden opacity-35 text-xs truncate overflow-hidden ..." }, pt = { class: "hidden" }, mt = {
471
+ id: "advancedSearchMobile",
472
+ class: "modal"
473
+ }, ft = { class: "modal-box" }, vt = { class: "font-bold text-lg" }, gt = ["checked"], bt = { class: "flex justify-between items-center pr-4 w-full font-medium text-xl collapse-title" }, ht = { class: "text-sm" }, yt = { class: "flex place-content-center p-0 collapse-content" }, wt = /* @__PURE__ */ M({
474
+ __name: "advancedSearch",
475
+ props: {
476
+ searchOptions: {},
477
+ currentCategory: {}
478
+ },
479
+ emits: ["search", "update:search-data"],
480
+ setup(d, { emit: u }) {
481
+ const e = d, s = u, i = k(null), l = {
482
+ datetime: Be(() => Promise.resolve().then(() => Ht))
483
+ }, p = k({}), b = k({ left: "0px", top: "0px", transform: "translateX(0%)" }), v = k(null);
484
+ function m(x, I) {
485
+ var B, O, g;
486
+ if ((B = i.value) != null && B.name) {
487
+ s("update:search-data", {
488
+ tab: i.value.name,
489
+ data: x
490
+ });
491
+ return;
492
+ }
493
+ if (e.searchOptions) {
494
+ let D = (g = (O = e.searchOptions) == null ? void 0 : O.find((A) => (A == null ? void 0 : A.category) === e.currentCategory)) == null ? void 0 : g.tabs[I];
495
+ D !== void 0 && (D.value = x, s("update:search-data", {
496
+ tab: D == null ? void 0 : D.name,
497
+ data: D == null ? void 0 : D.value
498
+ }));
499
+ }
500
+ }
501
+ function f() {
502
+ s("search");
503
+ }
504
+ async function N(x) {
505
+ v.value && !v.value.contains(x.target) && (await de(), i.value = null);
506
+ }
507
+ async function Z() {
508
+ if (typeof window < "u" && window.innerWidth <= 768) {
509
+ const x = document.getElementById("advancedSearchMobile");
510
+ x ? x.showModal() : console.warn("Modal element not found.");
511
+ }
512
+ }
513
+ async function K(x) {
514
+ var B;
515
+ i.value = x, await de();
516
+ const I = p.value[x.name];
517
+ if (I) {
518
+ const O = I.getBoundingClientRect(), g = ((B = v.value) == null ? void 0 : B.getBoundingClientRect()) || { left: 0, top: 0 };
519
+ window.innerWidth > 768 ? b.value = {
520
+ left: `${O.left + O.width / 2 - g.left}px`,
521
+ top: `${O.bottom - g.top}px`,
522
+ transform: "translateX(-50%)"
523
+ } : b.value = {
524
+ left: "50%",
525
+ top: `${O.bottom - g.top}px`,
526
+ transform: "translateX(-50%)"
527
+ // Center the popup horizontally on mobile
528
+ };
529
+ } else
530
+ console.error("Tab element not found for:", x.name);
531
+ }
532
+ return F(() => {
533
+ document.addEventListener("click", N);
534
+ }), Ie(() => {
535
+ document.removeEventListener("click", N);
536
+ }), (x, I) => {
537
+ var B, O;
538
+ return n(), a(y, null, [
539
+ t("div", {
540
+ ref_key: "searchContainer",
541
+ ref: v,
542
+ class: "w-full"
543
+ }, [
544
+ t("div", {
545
+ class: "group/search relative flex place-items-center border-2 shadow-md p-2 border-base-300/25 rounded-sm w-full transition-all cursor-pointer md:cursor-auto",
546
+ onClick: Z
547
+ }, [
548
+ t("div", it, [
549
+ (n(!0), a(y, null, _(((B = e.searchOptions.find((g) => g.category === e.currentCategory)) == null ? void 0 : B.tabs) || [], (g) => {
550
+ var D;
551
+ return n(), a("button", {
552
+ key: g.name,
553
+ onClick: (A) => K(g),
554
+ class: $([{ "tab-active": ((D = i.value) == null ? void 0 : D.name) === g.name }, "group/searchitem relative after:top-0 after:-right-2 after:absolute first-of-type:flex-auto last-of-type:flex-auto md:after:content-[''] last-of-type:after:content-none after:content-none after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-[1px] after:h-10 text-start overflow-x-hidden pointer-events-none md:pointer-events-auto"]),
555
+ ref_for: !0,
556
+ ref: (A) => p.value[g.name] = A
557
+ }, [
558
+ t("p", dt, h(g.name), 1),
559
+ t("p", ct, h(g.description), 1)
560
+ ], 10, ut);
561
+ }), 128))
562
+ ]),
563
+ i.value ? (n(), a("div", {
564
+ key: 0,
565
+ class: "absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",
566
+ style: Oe(b.value)
567
+ }, [
568
+ (n(), re(ie(l[i.value.type]), ue(i.value.props ? i.value.props : null, { onUpdated: m }), null, 16))
569
+ ], 4)) : S("", !0),
570
+ t("button", {
571
+ title: "search",
572
+ type: "submit",
573
+ class: "ml-1 btn btn-primary btn-square",
574
+ onClick: f
575
+ }, [
576
+ X(V(ce), {
577
+ size: 24,
578
+ color: "white"
579
+ })
580
+ ])
581
+ ]),
582
+ t("div", pt, [
583
+ t("button", {
584
+ title: "search",
585
+ onClick: I[0] || (I[0] = () => {
586
+ })
587
+ }, [
588
+ X(V(ce), {
589
+ size: 24,
590
+ color: "white"
591
+ })
592
+ ])
593
+ ])
594
+ ], 512),
595
+ t("dialog", mt, [
596
+ t("div", ft, [
597
+ w(x.$slots, "additionalForMobile", {}, () => [
598
+ t("h3", vt, h(x.currentCategory), 1)
599
+ ], !0),
600
+ (n(!0), a(y, null, _(((O = e.searchOptions.find((g) => g.category === e.currentCategory)) == null ? void 0 : O.tabs) || [], (g, D) => (n(), a("div", {
601
+ class: "bg-base-200 my-4 collapse",
602
+ key: g.name
603
+ }, [
604
+ t("input", {
605
+ type: "radio",
606
+ name: "my-accordion-1",
607
+ checked: D === 0
608
+ }, null, 8, gt),
609
+ t("div", bt, [
610
+ ne(h(g.name) + " ", 1),
611
+ t("p", ht, h(g.description), 1)
612
+ ]),
613
+ t("div", yt, [
614
+ I[1] || (I[1] = t("br", null, null, -1)),
615
+ (n(), re(ie(l[g.type]), ue({ ref_for: !0 }, g.props || {}, {
616
+ onUpdated: (A) => m(A, D)
617
+ }), null, 16, ["onUpdated"]))
618
+ ])
619
+ ]))), 128)),
620
+ t("div", { class: "modal-action" }, [
621
+ t("form", { method: "dialog" }, [
622
+ t("button", {
623
+ class: "btn btn-primary",
624
+ onClick: f
625
+ }, "Close and Search")
626
+ ])
627
+ ])
628
+ ])
629
+ ])
630
+ ], 64);
631
+ };
632
+ }
633
+ }), H = (d, u) => {
634
+ const e = d.__vccOpts || d;
635
+ for (const [s, i] of u)
636
+ e[s] = i;
637
+ return e;
638
+ }, Sn = /* @__PURE__ */ H(wt, [["__scopeId", "data-v-08fa37eb"]]), _t = ["placeholder", "value", "id"], kt = ["id"], $t = {
639
+ key: 0,
640
+ class: "flex justify-between items-center place-content-center mb-4"
641
+ }, xt = ["value"], Ct = ["value"], St = {
642
+ key: 1,
643
+ class: "gap-2 grid grid-cols-7"
644
+ }, Dt = ["onClick"], Tt = {
645
+ key: 2,
646
+ class: "mt-4 lg:w-80"
647
+ }, Mt = {
648
+ key: 0,
649
+ class: "mb-2 font-bold text-lg"
650
+ }, Bt = { key: 1 }, It = {
651
+ key: 1,
652
+ class: "flex gap-4"
653
+ }, Ot = ["value"], Ut = ["value"], Vt = {
654
+ key: 2,
655
+ class: "flex flex-col gap-4"
656
+ }, At = {
657
+ key: 1,
658
+ class: "flex gap-2"
659
+ }, Pt = ["value"], jt = ["value"], Nt = {
660
+ key: 1,
661
+ class: "flex gap-2"
662
+ }, zt = ["value"], Et = ["value"], Lt = { class: "flex gap-2 mt-4" }, Rt = {
663
+ __name: "datetimePicker",
664
+ props: {
665
+ mode: {
666
+ type: String,
667
+ default: "datetime",
668
+ // 'datetime', 'date', 'time'
669
+ validator: (d) => ["datetime", "date", "time"].includes(d)
670
+ },
671
+ range: {
672
+ type: Boolean,
673
+ default: !1
674
+ },
675
+ placeholder: {
676
+ type: String,
677
+ default: "Select date and time"
678
+ },
679
+ popup: {
680
+ type: Boolean,
681
+ default: !1
682
+ },
683
+ id: {
684
+ type: String,
685
+ default: "datetimepicker"
686
+ },
687
+ initialDate: {
688
+ type: Object,
689
+ default: () => null
690
+ }
691
+ },
692
+ emits: ["updated"],
693
+ setup(d, { emit: u }) {
694
+ const e = d;
695
+ E(() => e.range, (r) => {
696
+ r ? (l.value = { start: null, end: null }, p.value = { start: null, end: null }) : (l.value = null, p.value = null);
697
+ });
698
+ const s = u, i = k(!1), l = k(e.range ? { start: null, end: null } : null), p = k(e.range ? { start: null, end: null } : null), b = k((/* @__PURE__ */ new Date()).toLocaleString("default", { month: "long" })), v = k((/* @__PURE__ */ new Date()).getFullYear()), m = k(e.range ? { start: 0, end: 0 } : 0), f = k(e.range ? { start: 0, end: 0 } : 0), N = k(null), Z = C(() => `${e.id}-input`), K = C(() => `${e.id}-popup`), x = C(() => e.mode === "date" || e.mode === "datetime"), I = C(() => e.mode === "time" || e.mode === "datetime");
699
+ C(() => new Date(v.value, B.value));
700
+ const B = C(() => Y.indexOf(b.value)), O = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], g = C(() => new Date(v.value, B.value).getDay()), D = C(() => {
701
+ const r = new Date(v.value, B.value + 1, 0).getDate();
702
+ return Array.from({ length: r }, (c, o) => new Date(v.value, B.value, o + 1));
703
+ }), A = C(() => Array.from({ length: g.value }, (r, c) => c)), G = Array.from({ length: 24 }, (r, c) => c), Q = Array.from({ length: 60 }, (r, c) => c), q = C(
704
+ () => typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
705
+ navigator.userAgent
706
+ )
707
+ ), Y = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], me = C(() => {
708
+ const r = (/* @__PURE__ */ new Date()).getFullYear();
709
+ return Array.from({ length: 100 }, (c, o) => r - 50 + o);
710
+ }), fe = C(() => {
711
+ if (!x.value || !l.value) return "";
712
+ if (e.range && l.value.start && l.value.end) {
713
+ const r = l.value.start.toLocaleDateString("en-US"), c = l.value.end.toLocaleDateString("en-US");
714
+ return `${r} - ${c}`;
715
+ }
716
+ return !e.range && l.value ? l.value.toLocaleDateString("en-US") : "";
717
+ }), L = (r) => r instanceof Date ? r : new Date(r), z = (r) => r instanceof Date && !isNaN(r), ve = C(() => {
718
+ if (!I.value) return "";
719
+ const r = (c) => {
720
+ var J, R, le;
721
+ const o = ((J = m.value) == null ? void 0 : J[c]) ?? m.value, P = ((R = f.value) == null ? void 0 : R[c]) ?? f.value;
722
+ return q.value ? ((le = p.value) == null ? void 0 : le[c]) ?? p.value : `${o.toString().padStart(2, "0")}:${P.toString().padStart(2, "0")}`;
723
+ };
724
+ return e.range ? `${r("start")} - ${r("end")}` : r();
725
+ }), ge = C(() => {
726
+ const r = fe.value, c = ve.value;
727
+ return `${r} ${c}`.trim();
728
+ }), be = () => i.value = !i.value, oe = () => {
729
+ T(), he();
730
+ }, he = () => i.value = !1, ye = () => {
731
+ l.value = e.range ? { start: null, end: null } : null, p.value = e.range ? { start: null, end: null } : null, T();
732
+ }, we = (r) => {
733
+ e.range ? l.value.start && l.value.end ? l.value = { start: r, end: null } : l.value.start ? l.value.end = r : l.value.start = r : l.value = r, T();
734
+ }, _e = (r) => (r = L(r), e.range ? l.value.start && z(l.value.start) && r.getTime() === l.value.start.getTime() || l.value.end && z(l.value.end) && r.getTime() === l.value.end.getTime() : z(l.value) && r.getTime() === l.value.getTime()), ke = (r) => {
735
+ r = L(r);
736
+ const c = /* @__PURE__ */ new Date();
737
+ return r.getDate() === c.getDate() && r.getMonth() === c.getMonth() && r.getFullYear() === c.getFullYear();
738
+ }, $e = (r) => (r = L(r), e.range && z(l.value.start) && r.getTime() === l.value.start.getTime()), xe = (r) => (r = L(r), e.range && z(l.value.end) && r.getTime() === l.value.end.getTime()), Ce = (r) => {
739
+ if (r = L(r), e.range && z(l.value.start) && z(l.value.end)) {
740
+ const c = l.value.start.getTime(), o = l.value.end.getTime(), P = r.getTime();
741
+ return P > c && P < o;
742
+ }
743
+ return !1;
744
+ }, Se = () => {
745
+ let r = B.value - 1;
746
+ r < 0 && (r = 11, v.value--), b.value = Y[r], T();
747
+ }, De = () => {
748
+ let r = B.value + 1;
749
+ r > 11 && (r = 0, v.value++), b.value = Y[r], T();
750
+ }, se = (r) => {
751
+ N.value && !N.value.contains(r.target) && i.value == !0 && oe();
752
+ }, T = () => {
753
+ let r = {};
754
+ const c = (o, P, J) => {
755
+ o instanceof Date && !isNaN(o) || (o = /* @__PURE__ */ new Date());
756
+ const R = new Date(o);
757
+ return R.setUTCHours(P, J, 0, 0), R.toISOString();
758
+ };
759
+ e.range ? (r.from = c(
760
+ l.value.start,
761
+ m.value.start,
762
+ f.value.start
763
+ ), r.to = c(
764
+ l.value.end,
765
+ m.value.end,
766
+ f.value.end
767
+ )) : r = c(
768
+ l.value,
769
+ m.value,
770
+ f.value
771
+ ), s("updated", r);
772
+ };
773
+ return F(() => {
774
+ e.initialDate && (e.range && e.initialDate.start && e.initialDate.end ? l.value = {
775
+ start: new Date(e.initialDate.start),
776
+ end: new Date(e.initialDate.end)
777
+ } : e.initialDate.start && (l.value = { start: new Date(e.initialDate.start) })), e.range ? (m.value.start = m.value.start ?? (/* @__PURE__ */ new Date()).getHours(), m.value.end = m.value.end ?? (/* @__PURE__ */ new Date()).getHours(), f.value.start = f.value.start ?? (/* @__PURE__ */ new Date()).getMinutes(), f.value.end = f.value.end ?? (/* @__PURE__ */ new Date()).getMinutes()) : (m.value = m.value ?? (/* @__PURE__ */ new Date()).getHours(), f.value = f.value ?? (/* @__PURE__ */ new Date()).getMinutes());
778
+ }), e.popup && F(() => document.addEventListener("click", se)), pe(() => document.removeEventListener("click", se)), (r, c) => (n(), a("div", {
779
+ class: "inline-block relative w-full lg:w-[360px]",
780
+ ref_key: "pickerContainer",
781
+ ref: N
782
+ }, [
783
+ t("div", {
784
+ class: "flex items-center gap-2 cursor-pointer",
785
+ onClick: be
786
+ }, [
787
+ d.popup ? w(r.$slots, "default", { key: 0 }, () => [
788
+ t("input", {
789
+ type: "text",
790
+ class: "input-bordered w-full cursor-pointer input",
791
+ placeholder: d.placeholder,
792
+ value: ge.value,
793
+ readonly: "",
794
+ id: Z.value
795
+ }, null, 8, _t),
796
+ c[11] || (c[11] = t("button", { class: "btn btn-ghost" }, " 📅 ", -1))
797
+ ], !0) : S("", !0)
798
+ ]),
799
+ i.value || !d.popup ? (n(), a("div", {
800
+ key: 0,
801
+ class: $(["z-50 lg:bg-base-100 md:mt-2 px-4 md:p-4 rounded-md w-full", [{ absolute: d.popup }]]),
802
+ id: K.value
803
+ }, [
804
+ x.value ? (n(), a("div", $t, [
805
+ t("button", {
806
+ class: "md:block hidden btn btn-outline btn-primary md:btn-sm",
807
+ onClick: Se
808
+ }, c[12] || (c[12] = [
809
+ t("svg", {
810
+ xmlns: "http://www.w3.org/2000/svg",
811
+ class: "w-4 h-4",
812
+ fill: "none",
813
+ viewBox: "0 0 24 24",
814
+ stroke: "currentColor"
815
+ }, [
816
+ t("path", {
817
+ "stroke-linecap": "round",
818
+ "stroke-linejoin": "round",
819
+ "stroke-width": "2",
820
+ d: "M15 19l-7-7 7-7"
821
+ })
822
+ ], -1)
823
+ ])),
824
+ U(t("select", {
825
+ class: "border-none w-fit select",
826
+ "onUpdate:modelValue": c[0] || (c[0] = (o) => b.value = o),
827
+ onChange: T
828
+ }, [
829
+ (n(), a(y, null, _(Y, (o, P) => t("option", {
830
+ key: P,
831
+ value: o
832
+ }, h(o), 9, xt)), 64))
833
+ ], 544), [
834
+ [j, b.value]
835
+ ]),
836
+ U(t("select", {
837
+ class: "border-none w-24 select",
838
+ "onUpdate:modelValue": c[1] || (c[1] = (o) => v.value = o),
839
+ onChange: T
840
+ }, [
841
+ (n(!0), a(y, null, _(me.value, (o) => (n(), a("option", {
842
+ key: o,
843
+ value: o
844
+ }, h(o), 9, Ct))), 128))
845
+ ], 544), [
846
+ [j, v.value]
847
+ ]),
848
+ t("button", {
849
+ class: "md:block hidden btn btn-outline btn-primary md:btn-sm",
850
+ onClick: De
851
+ }, c[13] || (c[13] = [
852
+ t("svg", {
853
+ xmlns: "http://www.w3.org/2000/svg",
854
+ class: "w-4 h-4",
855
+ fill: "none",
856
+ viewBox: "0 0 24 24",
857
+ stroke: "currentColor"
858
+ }, [
859
+ t("path", {
860
+ "stroke-linecap": "round",
861
+ "stroke-linejoin": "round",
862
+ "stroke-width": "2",
863
+ d: "M9 5l7 7-7 7"
864
+ })
865
+ ], -1)
866
+ ]))
867
+ ])) : S("", !0),
868
+ x.value ? (n(), a("div", St, [
869
+ (n(), a(y, null, _(O, (o) => t("div", {
870
+ key: o,
871
+ class: "text-center"
872
+ }, h(o), 1)), 64)),
873
+ (n(!0), a(y, null, _(A.value, (o) => (n(), a("div", {
874
+ key: o,
875
+ class: "text-center"
876
+ }))), 128)),
877
+ (n(!0), a(y, null, _(D.value, (o) => (n(), a("div", {
878
+ key: o,
879
+ class: $(["hover:bg-primary-10 py-1 rounded-full text-center cursor-pointer", {
880
+ "bg-primary text-primary-content": _e(o),
881
+ today: ke(o),
882
+ "range-start bg-primary text-primary-content": $e(o),
883
+ "range-end bg-primary text-primary-content": xe(o),
884
+ "in-range bg-primary/20 hover:bg-primary/10": Ce(o)
885
+ }]),
886
+ onClick: (P) => we(o)
887
+ }, h(o.getDate()), 11, Dt))), 128))
888
+ ])) : S("", !0),
889
+ I.value ? (n(), a("div", Tt, [
890
+ e.range ? S("", !0) : (n(), a("h3", Mt, "Select Time")),
891
+ e.range ? (n(), a("div", Vt, [
892
+ t("div", null, [
893
+ c[14] || (c[14] = t("p", { class: "font-bold" }, "Start Time", -1)),
894
+ q.value ? U((n(), a("input", {
895
+ key: 0,
896
+ type: "time",
897
+ class: "input-bordered w-full input",
898
+ "onUpdate:modelValue": c[5] || (c[5] = (o) => p.value.start = o),
899
+ onChange: T
900
+ }, null, 544)), [
901
+ [ee, p.value.start]
902
+ ]) : (n(), a("div", At, [
903
+ U(t("select", {
904
+ class: "w-full select-bordered select",
905
+ "onUpdate:modelValue": c[6] || (c[6] = (o) => m.value.start = o),
906
+ onChange: T
907
+ }, [
908
+ (n(!0), a(y, null, _(V(G), (o) => (n(), a("option", {
909
+ key: o,
910
+ value: o
911
+ }, h(o.toString().padStart(2, "0")), 9, Pt))), 128))
912
+ ], 544), [
913
+ [
914
+ j,
915
+ m.value.start,
916
+ void 0,
917
+ { number: !0 }
918
+ ]
919
+ ]),
920
+ U(t("select", {
921
+ class: "w-full select-bordered select",
922
+ "onUpdate:modelValue": c[7] || (c[7] = (o) => f.value.start = o),
923
+ onChange: T
924
+ }, [
925
+ (n(!0), a(y, null, _(V(Q), (o) => (n(), a("option", {
926
+ key: o,
927
+ value: o
928
+ }, h(o.toString().padStart(2, "0")), 9, jt))), 128))
929
+ ], 544), [
930
+ [
931
+ j,
932
+ f.value.start,
933
+ void 0,
934
+ { number: !0 }
935
+ ]
936
+ ])
937
+ ]))
938
+ ]),
939
+ t("div", null, [
940
+ c[15] || (c[15] = t("p", { class: "font-bold" }, "End Time", -1)),
941
+ q.value ? U((n(), a("input", {
942
+ key: 0,
943
+ type: "time",
944
+ class: "input-bordered w-full input",
945
+ "onUpdate:modelValue": c[8] || (c[8] = (o) => p.value.end = o),
946
+ onChange: T
947
+ }, null, 544)), [
948
+ [ee, p.value.end]
949
+ ]) : (n(), a("div", Nt, [
950
+ U(t("select", {
951
+ class: "w-full select-bordered select",
952
+ "onUpdate:modelValue": c[9] || (c[9] = (o) => m.value.end = o),
953
+ onChange: T
954
+ }, [
955
+ (n(!0), a(y, null, _(V(G), (o) => (n(), a("option", {
956
+ key: o,
957
+ value: o
958
+ }, h(o.toString().padStart(2, "0")), 9, zt))), 128))
959
+ ], 544), [
960
+ [
961
+ j,
962
+ m.value.end,
963
+ void 0,
964
+ { number: !0 }
965
+ ]
966
+ ]),
967
+ U(t("select", {
968
+ class: "w-full select-bordered select",
969
+ "onUpdate:modelValue": c[10] || (c[10] = (o) => f.value.end = o),
970
+ onChange: T
971
+ }, [
972
+ (n(!0), a(y, null, _(V(Q), (o) => (n(), a("option", {
973
+ key: o,
974
+ value: o
975
+ }, h(o.toString().padStart(2, "0")), 9, Et))), 128))
976
+ ], 544), [
977
+ [
978
+ j,
979
+ f.value.end,
980
+ void 0,
981
+ { number: !0 }
982
+ ]
983
+ ])
984
+ ]))
985
+ ])
986
+ ])) : (n(), a("div", Bt, [
987
+ q.value ? U((n(), a("input", {
988
+ key: 0,
989
+ type: "time",
990
+ class: "input-bordered w-full input",
991
+ "onUpdate:modelValue": c[2] || (c[2] = (o) => p.value = o),
992
+ onChange: T
993
+ }, null, 544)), [
994
+ [ee, p.value]
995
+ ]) : (n(), a("div", It, [
996
+ U(t("select", {
997
+ class: "w-full select-bordered select",
998
+ "onUpdate:modelValue": c[3] || (c[3] = (o) => m.value = o),
999
+ onChange: T
1000
+ }, [
1001
+ (n(!0), a(y, null, _(V(G), (o) => (n(), a("option", {
1002
+ key: o,
1003
+ value: o
1004
+ }, h(o.toString().padStart(2, "0")), 9, Ot))), 128))
1005
+ ], 544), [
1006
+ [
1007
+ j,
1008
+ m.value,
1009
+ void 0,
1010
+ { number: !0 }
1011
+ ]
1012
+ ]),
1013
+ U(t("select", {
1014
+ class: "w-full select-bordered select",
1015
+ "onUpdate:modelValue": c[4] || (c[4] = (o) => f.value = o),
1016
+ onChange: T
1017
+ }, [
1018
+ (n(!0), a(y, null, _(V(Q), (o) => (n(), a("option", {
1019
+ key: o,
1020
+ value: o
1021
+ }, h(o.toString().padStart(2, "0")), 9, Ut))), 128))
1022
+ ], 544), [
1023
+ [
1024
+ j,
1025
+ f.value,
1026
+ void 0,
1027
+ { number: !0 }
1028
+ ]
1029
+ ])
1030
+ ]))
1031
+ ]))
1032
+ ])) : S("", !0),
1033
+ t("div", Lt, [
1034
+ t("button", {
1035
+ class: $(["btn btn-secondary", d.popup ? "w-fit" : "w-full"]),
1036
+ onClick: ye
1037
+ }, "Clear", 2),
1038
+ d.popup ? (n(), a("button", {
1039
+ key: 0,
1040
+ class: "btn btn-primary btn-wide",
1041
+ onClick: oe
1042
+ }, "Close")) : S("", !0)
1043
+ ])
1044
+ ], 10, kt)) : S("", !0)
1045
+ ], 512));
1046
+ }
1047
+ }, Ft = /* @__PURE__ */ H(Rt, [["__scopeId", "data-v-e7e203aa"]]), Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1048
+ __proto__: null,
1049
+ default: Ft
1050
+ }, Symbol.toStringTag, { value: "Module" })), qt = ["value", "checked", "onChange", "disabled"], Dn = /* @__PURE__ */ M({
1051
+ __name: "rating",
1052
+ props: {
1053
+ initialRating: { default: 0 },
1054
+ numberOfStars: { default: 5 },
1055
+ halfStars: { type: Boolean, default: !0 },
1056
+ isInteractive: { type: Boolean, default: !1 },
1057
+ size: { default: "sm" }
1058
+ },
1059
+ setup(d) {
1060
+ const u = d, e = k(u.initialRating);
1061
+ E(
1062
+ () => u.initialRating,
1063
+ (i) => {
1064
+ e.value = i;
1065
+ }
1066
+ );
1067
+ const s = (i) => {
1068
+ e.value = i;
1069
+ };
1070
+ return (i, l) => (n(), a("div", {
1071
+ class: $(["rating", [
1072
+ `rating-${u.size}`,
1073
+ { "rating-half": i.halfStars }
1074
+ ]])
1075
+ }, [
1076
+ (n(!0), a(y, null, _(i.numberOfStars * (i.halfStars ? 2 : 1), (p) => (n(), a("input", {
1077
+ key: p,
1078
+ type: "radio",
1079
+ value: i.halfStars ? p * 0.5 : p,
1080
+ checked: e.value === (i.halfStars ? p * 0.5 : p),
1081
+ onChange: (b) => i.isInteractive ? s(i.halfStars ? p * 0.5 : p) : null,
1082
+ class: $(["mask mask-star", {
1083
+ "bg-yellow-400": e.value >= (i.halfStars ? p * 0.5 : p),
1084
+ "mask-half-1": i.halfStars && p % 2 !== 0,
1085
+ "mask-half-2": i.halfStars && p % 2 === 0,
1086
+ "cursor-pointer": i.isInteractive,
1087
+ "cursor-default": !i.isInteractive
1088
+ }]),
1089
+ disabled: !i.isInteractive
1090
+ }, null, 42, qt))), 128))
1091
+ ], 2));
1092
+ }
1093
+ }), Yt = {
1094
+ key: 0,
1095
+ class: "loading loading-spinner loading-md mx-auto"
1096
+ }, Tn = /* @__PURE__ */ M({
1097
+ __name: "loader",
1098
+ props: {
1099
+ loading: { type: Boolean, default: !0 }
1100
+ },
1101
+ setup(d) {
1102
+ const u = d, e = k(u.loading);
1103
+ return E(
1104
+ () => u.loading,
1105
+ (s) => {
1106
+ e.value = s;
1107
+ }
1108
+ ), (s, i) => e.value ? (n(), a("span", Yt)) : S("", !0);
1109
+ }
1110
+ }), Jt = { class: "bg-base-200 p-10 text-base-content" }, Wt = { class: "flex lg:flex-row flex-col flex-wrap container space-between" }, Xt = { class: "mb-16 w-full lg:w-2/3 footer" }, Zt = { class: "after:absolute after:flex opacity-100 border-b-4 border-base-300 after:border-b-2 after:border-base-300 after:w-full after:h-1 font-bold text-xl footer-title" }, Kt = ["href"], Gt = /* @__PURE__ */ M({
1111
+ __name: "footer",
1112
+ props: {
1113
+ items: {}
1114
+ },
1115
+ setup(d) {
1116
+ const u = d;
1117
+ return (e, s) => (n(), a("footer", Jt, [
1118
+ t("div", Wt, [
1119
+ t("div", Xt, [
1120
+ (n(!0), a(y, null, _(u.items, (i) => (n(), a("nav", null, [
1121
+ t("h6", Zt, h(i.title), 1),
1122
+ (n(!0), a(y, null, _(i.items, (l) => (n(), a("a", {
1123
+ class: "link link-hover",
1124
+ href: l.link
1125
+ }, h(l.text), 9, Kt))), 256))
1126
+ ]))), 256))
1127
+ ]),
1128
+ w(e.$slots, "default", {}, void 0, !0)
1129
+ ])
1130
+ ]));
1131
+ }
1132
+ }), Mn = /* @__PURE__ */ H(Gt, [["__scopeId", "data-v-537d40bd"]]), Qt = {}, en = { class: "min-h-40 container hero" }, tn = { class: "px-0! text-center hero-content" }, nn = { class: "mt-9 text-4xl" };
1133
+ function an(d, u) {
1134
+ return n(), a("div", en, [
1135
+ t("div", tn, [
1136
+ t("div", null, [
1137
+ t("h1", nn, [
1138
+ w(d.$slots, "title", {}, () => [
1139
+ u[0] || (u[0] = ne("hero title"))
1140
+ ])
1141
+ ]),
1142
+ t("p", null, [
1143
+ w(d.$slots, "description", { class: "py-9" })
1144
+ ]),
1145
+ w(d.$slots, "call-to-action-block", { class: "max-w-full" }, () => [
1146
+ u[1] || (u[1] = t("button", { class: "btn btn-primary" }, "Call to action", -1))
1147
+ ])
1148
+ ])
1149
+ ])
1150
+ ]);
1151
+ }
1152
+ const Bn = /* @__PURE__ */ H(Qt, [["render", an]]), on = { class: "categories flex flex-row gap-4 place-content-center" }, sn = ["onClick"], In = /* @__PURE__ */ M({
1153
+ __name: "categoryNavigation",
1154
+ props: {
1155
+ searchOptions: {},
1156
+ currentCategory: {}
1157
+ },
1158
+ emits: ["update:currentCategory"],
1159
+ setup(d, { emit: u }) {
1160
+ const e = d, s = u;
1161
+ function i(l) {
1162
+ s("update:currentCategory", l);
1163
+ }
1164
+ return (l, p) => (n(), a("div", on, [
1165
+ (n(!0), a(y, null, _(e.searchOptions, (b) => (n(), a("div", {
1166
+ key: b.category
1167
+ }, [
1168
+ t("button", {
1169
+ onClick: (v) => i(b.category),
1170
+ class: $(["truncate", { "font-semibold": e.currentCategory === b.category }])
1171
+ }, h(b.category), 11, sn)
1172
+ ]))), 128))
1173
+ ]));
1174
+ }
1175
+ }), ln = { class: "md:flex hidden navbar-start" }, rn = { class: "md:flex justify-center items-center hidden navbar-center" }, un = { class: "md:flex hidden navbar-end" }, dn = { class: "navbar-bottom md:flex hidden" }, cn = /* @__PURE__ */ M({
1176
+ __name: "navigationBar",
1177
+ props: {
1178
+ isCollapsed: { type: Boolean, default: !0 }
1179
+ },
1180
+ setup(d) {
1181
+ const u = d;
1182
+ return (e, s) => (n(), a("nav", {
1183
+ class: $(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar", u.isCollapsed ? "collapsed" : ""])
1184
+ }, [
1185
+ t("div", ln, [
1186
+ w(e.$slots, "start", {}, void 0, !0)
1187
+ ]),
1188
+ t("div", rn, [
1189
+ w(e.$slots, "center", {}, void 0, !0)
1190
+ ]),
1191
+ t("div", un, [
1192
+ w(e.$slots, "end", {}, void 0, !0)
1193
+ ]),
1194
+ t("div", dn, [
1195
+ w(e.$slots, "bottom", {}, void 0, !0)
1196
+ ])
1197
+ ], 2));
1198
+ }
1199
+ }), On = /* @__PURE__ */ H(cn, [["__scopeId", "data-v-8ddb2b45"]]), pn = {
1200
+ role: "tablist",
1201
+ class: "tabs tabs-bordered tabs-lg mt-28 relative w-full"
1202
+ }, mn = {
1203
+ key: 0,
1204
+ class: "hidden md:flex gap-4 right-0 top-4 absolute"
1205
+ }, fn = ["onClick", "aria-selected"], vn = {
1206
+ role: "tabpanel",
1207
+ class: "tab-content border-base-300 border-t-2 border-x-0 border-b-0 p-6 overflow-x-auto max-w-full"
1208
+ }, Un = /* @__PURE__ */ M({
1209
+ __name: "tab",
1210
+ props: {
1211
+ items: {},
1212
+ withControlls: { type: Boolean },
1213
+ rotateTabsAfter: {}
1214
+ },
1215
+ emits: ["tab-changed"],
1216
+ setup(d, { emit: u }) {
1217
+ const e = d, s = k(e.items[0]), i = u;
1218
+ function l(v) {
1219
+ s.value = v, i("tab-changed", v);
1220
+ }
1221
+ function p() {
1222
+ const m = (e.items.indexOf(s.value) + 1) % e.items.length;
1223
+ l(e.items[m]);
1224
+ }
1225
+ function b() {
1226
+ const m = (e.items.indexOf(s.value) - 1 + e.items.length) % e.items.length;
1227
+ l(e.items[m]);
1228
+ }
1229
+ return pe(() => {
1230
+ e.rotateTabsAfter && setInterval(() => {
1231
+ p();
1232
+ }, e.rotateTabsAfter * 1e3);
1233
+ }), (v, m) => (n(), a("div", pn, [
1234
+ v.withControlls ? (n(), a("div", mn, [
1235
+ t("button", {
1236
+ onClick: m[0] || (m[0] = (f) => b()),
1237
+ class: "cursor-pointer"
1238
+ }, "Previous"),
1239
+ t("button", {
1240
+ onClick: m[1] || (m[1] = (f) => p()),
1241
+ class: "cursor-pointer text-primary"
1242
+ }, "Next")
1243
+ ])) : S("", !0),
1244
+ (n(!0), a(y, null, _(v.items, (f) => (n(), a(y, null, [
1245
+ t("a", {
1246
+ type: "button",
1247
+ role: "tab",
1248
+ class: $(["tab min-w-max", f === s.value ? "bg-primary text-base-100" : ""]),
1249
+ onClick: (N) => l(f),
1250
+ "aria-selected": s.value == f
1251
+ }, h(f), 11, fn),
1252
+ t("div", vn, [
1253
+ w(v.$slots, `${f}-tab`)
1254
+ ])
1255
+ ], 64))), 256))
1256
+ ]));
1257
+ }
1258
+ });
1259
+ export {
1260
+ kn as Accordion,
1261
+ Sn as AdvancedSearch,
1262
+ $n as Avatar,
1263
+ xn as Badge,
1264
+ bn as ButtonComponent,
1265
+ Cn as Card,
1266
+ In as CategoryNavigation,
1267
+ Ft as DatetimePicker,
1268
+ hn as Dropdown,
1269
+ Mn as Footer,
1270
+ Bn as Hero,
1271
+ Tn as Loader,
1272
+ yn as Modal,
1273
+ On as NavigationBar,
1274
+ Dn as Rating,
1275
+ wn as Swap,
1276
+ Un as Tab,
1277
+ _n as ThemeController
1278
+ };