manolis-ui 0.5.2 → 0.5.3
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 +34 -34
- package/dist/manolis-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/manolis-ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, computed as O, createElementBlock as l, openBlock as a, normalizeClass as _, createCommentVNode as T, renderSlot as k, createTextVNode as re, createElementVNode as n, Fragment as $, renderList as C, toDisplayString as S, ref as x, h as se, onMounted as Y, watch as
|
|
1
|
+
import { defineComponent as B, computed as O, createElementBlock as l, openBlock as a, normalizeClass as _, createCommentVNode as T, renderSlot as k, createTextVNode as re, createElementVNode as n, Fragment as $, renderList as C, toDisplayString as S, ref as x, h as se, onMounted as Y, watch as N, withDirectives as z, createVNode as X, isRef as Ie, vModelCheckbox as Oe, unref as U, provide as Be, normalizeStyle as ie, inject as Ve, defineAsyncComponent as Pe, onBeforeUnmount as Ae, createBlock as pe, resolveDynamicComponent as fe, mergeProps as me, nextTick as ve, onUnmounted as he, vModelSelect as E, vModelText as ne } from "vue";
|
|
2
2
|
const ze = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "loading loading-spinner"
|
|
@@ -75,7 +75,7 @@ const ze = {
|
|
|
75
75
|
}), Ue = {
|
|
76
76
|
tabindex: "0",
|
|
77
77
|
class: "z-1 bg-base-100 shadow-sm p-2 rounded-sm min-w-[inherit] md:min-w-full xl:min-w-52 dropdown-content menu"
|
|
78
|
-
},
|
|
78
|
+
}, je = ["href"], zn = /* @__PURE__ */ B({
|
|
79
79
|
__name: "dropdown",
|
|
80
80
|
props: {
|
|
81
81
|
items: {},
|
|
@@ -107,13 +107,13 @@ const ze = {
|
|
|
107
107
|
(a(!0), l($, null, C(o.items, (c) => (a(), l("li", null, [
|
|
108
108
|
n("a", {
|
|
109
109
|
href: c.link
|
|
110
|
-
}, S(c.text), 9,
|
|
110
|
+
}, S(c.text), 9, je)
|
|
111
111
|
]))), 256)),
|
|
112
112
|
k(o.$slots, "additional")
|
|
113
113
|
])
|
|
114
114
|
], 2));
|
|
115
115
|
}
|
|
116
|
-
}),
|
|
116
|
+
}), Ne = { class: "modal-box" }, Re = { class: "modal-action" }, Un = /* @__PURE__ */ B({
|
|
117
117
|
__name: "modal",
|
|
118
118
|
props: {
|
|
119
119
|
position: { default: "center" },
|
|
@@ -145,7 +145,7 @@ const ze = {
|
|
|
145
145
|
ref: t,
|
|
146
146
|
class: _(["modal", e[d.position]])
|
|
147
147
|
}, [
|
|
148
|
-
n("div",
|
|
148
|
+
n("div", Ne, [
|
|
149
149
|
k(c.$slots, "default"),
|
|
150
150
|
n("div", Re, [
|
|
151
151
|
k(c.$slots, "actions"),
|
|
@@ -163,7 +163,7 @@ const ze = {
|
|
|
163
163
|
], 2)
|
|
164
164
|
], 64));
|
|
165
165
|
}
|
|
166
|
-
}), Le = { class: "swap-on" }, Fe = { class: "swap-off" },
|
|
166
|
+
}), Le = { class: "flex justify-center items-center swap-on" }, Fe = { class: "flex justify-center items-center swap-off" }, jn = /* @__PURE__ */ B({
|
|
167
167
|
__name: "swap",
|
|
168
168
|
props: {
|
|
169
169
|
effect: {}
|
|
@@ -295,10 +295,10 @@ const Ye = ae("SunIcon", [
|
|
|
295
295
|
const t = window.localStorage.getItem(i);
|
|
296
296
|
e.value = t ? JSON.parse(t) : d;
|
|
297
297
|
}
|
|
298
|
-
}),
|
|
298
|
+
}), N(e, (t) => {
|
|
299
299
|
typeof window < "u" && window.localStorage.setItem(i, JSON.stringify(t));
|
|
300
300
|
}), e;
|
|
301
|
-
}, Ge = { class: "swap-rotate swap" }, Ke = ["true-value", "false-value"],
|
|
301
|
+
}, Ge = { class: "swap-rotate swap" }, Ke = ["true-value", "false-value"], Nn = /* @__PURE__ */ B({
|
|
302
302
|
__name: "theme-controller",
|
|
303
303
|
props: {
|
|
304
304
|
lightTheme: { default: "light" },
|
|
@@ -309,7 +309,7 @@ const Ye = ae("SunIcon", [
|
|
|
309
309
|
function t(o) {
|
|
310
310
|
typeof window < "u" && window.document && document.documentElement.setAttribute("data-theme", o);
|
|
311
311
|
}
|
|
312
|
-
return Y(() => t(e.value ? e.value : "")),
|
|
312
|
+
return Y(() => t(e.value ? e.value : "")), N(e, (o) => {
|
|
313
313
|
t(o);
|
|
314
314
|
}), (o, s) => (a(), l("label", Ge, [
|
|
315
315
|
z(n("input", {
|
|
@@ -362,7 +362,7 @@ const Ye = ae("SunIcon", [
|
|
|
362
362
|
},
|
|
363
363
|
setup(i) {
|
|
364
364
|
const d = i, e = x(d.onlineStatus);
|
|
365
|
-
return
|
|
365
|
+
return N(
|
|
366
366
|
() => d.onlineStatus,
|
|
367
367
|
(t) => {
|
|
368
368
|
t && (e.value = t);
|
|
@@ -446,7 +446,7 @@ const Ye = ae("SunIcon", [
|
|
|
446
446
|
},
|
|
447
447
|
setup(i) {
|
|
448
448
|
const d = i, e = x(d.outlined);
|
|
449
|
-
return
|
|
449
|
+
return N(
|
|
450
450
|
() => d.outlined,
|
|
451
451
|
(t) => {
|
|
452
452
|
e.value = t;
|
|
@@ -550,7 +550,7 @@ const Ye = ae("SunIcon", [
|
|
|
550
550
|
requestAnimationFrame(Z);
|
|
551
551
|
}, y = () => {
|
|
552
552
|
m(t.value + 1);
|
|
553
|
-
},
|
|
553
|
+
}, j = () => {
|
|
554
554
|
m(t.value - 1);
|
|
555
555
|
}, H = (f) => {
|
|
556
556
|
m(f);
|
|
@@ -565,9 +565,9 @@ const Ye = ae("SunIcon", [
|
|
|
565
565
|
requestAnimationFrame(() => {
|
|
566
566
|
requestAnimationFrame(M);
|
|
567
567
|
}), v();
|
|
568
|
-
}),
|
|
568
|
+
}), N(() => e.initialSlide, (f) => {
|
|
569
569
|
requestAnimationFrame(() => m(f));
|
|
570
|
-
}),
|
|
570
|
+
}), N(() => [e.slidesPerView, e.gap], () => {
|
|
571
571
|
requestAnimationFrame(() => {
|
|
572
572
|
requestAnimationFrame(() => {
|
|
573
573
|
if (v(), c.value === 0) return;
|
|
@@ -586,7 +586,7 @@ const Ye = ae("SunIcon", [
|
|
|
586
586
|
], 6),
|
|
587
587
|
i.showNavigationButtons ? (a(), l("div", ct, [
|
|
588
588
|
n("div", {
|
|
589
|
-
onClick:
|
|
589
|
+
onClick: j,
|
|
590
590
|
role: "button",
|
|
591
591
|
"aria-label": "Previous Slide"
|
|
592
592
|
}, [
|
|
@@ -670,7 +670,7 @@ const Ye = ae("SunIcon", [
|
|
|
670
670
|
function y() {
|
|
671
671
|
t("search");
|
|
672
672
|
}
|
|
673
|
-
async function
|
|
673
|
+
async function j(f) {
|
|
674
674
|
v.value && !v.value.contains(f.target) && (await ve(), o.value = null);
|
|
675
675
|
}
|
|
676
676
|
async function H() {
|
|
@@ -699,9 +699,9 @@ const Ye = ae("SunIcon", [
|
|
|
699
699
|
console.error("Tab element not found for:", f.name);
|
|
700
700
|
}
|
|
701
701
|
return Y(() => {
|
|
702
|
-
document.addEventListener("click",
|
|
702
|
+
document.addEventListener("click", j);
|
|
703
703
|
}), Ae(() => {
|
|
704
|
-
document.removeEventListener("click",
|
|
704
|
+
document.removeEventListener("click", j);
|
|
705
705
|
}), (f, b) => {
|
|
706
706
|
var g, D;
|
|
707
707
|
return a(), l($, null, [
|
|
@@ -808,10 +808,10 @@ const Ye = ae("SunIcon", [
|
|
|
808
808
|
}, zt = ["onClick"], Ut = {
|
|
809
809
|
key: 2,
|
|
810
810
|
class: "mt-4 lg:w-80"
|
|
811
|
-
},
|
|
811
|
+
}, jt = {
|
|
812
812
|
key: 0,
|
|
813
813
|
class: "mb-2 font-bold text-lg"
|
|
814
|
-
},
|
|
814
|
+
}, Nt = { key: 1 }, Rt = {
|
|
815
815
|
key: 1,
|
|
816
816
|
class: "flex gap-4"
|
|
817
817
|
}, Lt = ["value"], Ft = ["value"], Et = {
|
|
@@ -856,10 +856,10 @@ const Ye = ae("SunIcon", [
|
|
|
856
856
|
emits: ["updated"],
|
|
857
857
|
setup(i, { emit: d }) {
|
|
858
858
|
const e = i;
|
|
859
|
-
|
|
859
|
+
N(() => e.range, (u) => {
|
|
860
860
|
u ? (s.value = { start: null, end: null }, c.value = { start: null, end: null }) : (s.value = null, c.value = null);
|
|
861
861
|
});
|
|
862
|
-
const t = d, o = x(!1), s = x(e.range ? { start: null, end: null } : null), c = x(e.range ? { start: null, end: null } : null), h = x((/* @__PURE__ */ new Date()).toLocaleString("default", { month: "long" })), v = x((/* @__PURE__ */ new Date()).getFullYear()), m = x(e.range ? { start: 0, end: 0 } : 0), y = x(e.range ? { start: 0, end: 0 } : 0),
|
|
862
|
+
const t = d, o = x(!1), s = x(e.range ? { start: null, end: null } : null), c = x(e.range ? { start: null, end: null } : null), h = x((/* @__PURE__ */ new Date()).toLocaleString("default", { month: "long" })), v = x((/* @__PURE__ */ new Date()).getFullYear()), m = x(e.range ? { start: 0, end: 0 } : 0), y = x(e.range ? { start: 0, end: 0 } : 0), j = x(null), H = O(() => `${e.id}-input`), M = O(() => `${e.id}-popup`), f = O(() => e.mode === "date" || e.mode === "datetime"), b = O(() => e.mode === "time" || e.mode === "datetime");
|
|
863
863
|
O(() => new Date(v.value, g.value));
|
|
864
864
|
const g = O(() => J.indexOf(h.value)), D = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], w = O(() => new Date(v.value, g.value).getDay()), I = O(() => {
|
|
865
865
|
const u = new Date(v.value, g.value + 1, 0).getDate();
|
|
@@ -912,7 +912,7 @@ const Ye = ae("SunIcon", [
|
|
|
912
912
|
let u = g.value + 1;
|
|
913
913
|
u > 11 && (u = 0, v.value++), h.value = J[u], V();
|
|
914
914
|
}, de = (u) => {
|
|
915
|
-
|
|
915
|
+
j.value && !j.value.contains(u.target) && o.value == !0 && ue();
|
|
916
916
|
}, V = () => {
|
|
917
917
|
let u = {};
|
|
918
918
|
const p = (r, F, ee) => {
|
|
@@ -942,7 +942,7 @@ const Ye = ae("SunIcon", [
|
|
|
942
942
|
}), e.popup && Y(() => document.addEventListener("click", de)), he(() => document.removeEventListener("click", de)), (u, p) => (a(), l("div", {
|
|
943
943
|
class: "inline-block relative w-full lg:w-[360px]",
|
|
944
944
|
ref_key: "pickerContainer",
|
|
945
|
-
ref:
|
|
945
|
+
ref: j
|
|
946
946
|
}, [
|
|
947
947
|
n("div", {
|
|
948
948
|
class: "flex items-center gap-2 cursor-pointer",
|
|
@@ -1053,7 +1053,7 @@ const Ye = ae("SunIcon", [
|
|
|
1053
1053
|
}, S(r.getDate()), 11, zt))), 128))
|
|
1054
1054
|
])) : T("", !0),
|
|
1055
1055
|
b.value ? (a(), l("div", Ut, [
|
|
1056
|
-
e.range ? T("", !0) : (a(), l("h3",
|
|
1056
|
+
e.range ? T("", !0) : (a(), l("h3", jt, "Select Time")),
|
|
1057
1057
|
e.range ? (a(), l("div", Et, [
|
|
1058
1058
|
n("div", null, [
|
|
1059
1059
|
p[13] || (p[13] = n("p", { class: "font-bold" }, "Start Time", -1)),
|
|
@@ -1149,7 +1149,7 @@ const Ye = ae("SunIcon", [
|
|
|
1149
1149
|
])
|
|
1150
1150
|
]))
|
|
1151
1151
|
])
|
|
1152
|
-
])) : (a(), l("div",
|
|
1152
|
+
])) : (a(), l("div", Nt, [
|
|
1153
1153
|
q.value ? z((a(), l("input", {
|
|
1154
1154
|
key: 0,
|
|
1155
1155
|
type: "time",
|
|
@@ -1224,7 +1224,7 @@ const Ye = ae("SunIcon", [
|
|
|
1224
1224
|
},
|
|
1225
1225
|
setup(i) {
|
|
1226
1226
|
const d = i, e = x(d.initialRating);
|
|
1227
|
-
|
|
1227
|
+
N(
|
|
1228
1228
|
() => d.initialRating,
|
|
1229
1229
|
(o) => {
|
|
1230
1230
|
e.value = o;
|
|
@@ -1271,12 +1271,12 @@ const Ye = ae("SunIcon", [
|
|
|
1271
1271
|
M && !o.value.includes(M) && (o.value.push(M), t("update:modelValue", o.value), h.value = "");
|
|
1272
1272
|
}, y = (M) => {
|
|
1273
1273
|
o.value = o.value.filter((f) => f !== M), t("update:modelValue", o.value);
|
|
1274
|
-
},
|
|
1274
|
+
}, j = () => {
|
|
1275
1275
|
h.value === "" && (o.value.pop(), t("update:modelValue", o.value));
|
|
1276
1276
|
}, H = (M) => {
|
|
1277
|
-
M.key === "Enter" ? m() : M.key === "Backspace" && h.value === "" &&
|
|
1277
|
+
M.key === "Enter" ? m() : M.key === "Backspace" && h.value === "" && j();
|
|
1278
1278
|
};
|
|
1279
|
-
return
|
|
1279
|
+
return N(() => e.modelValue, (M) => {
|
|
1280
1280
|
o.value = [...M];
|
|
1281
1281
|
}), (M, f) => (a(), l("div", {
|
|
1282
1282
|
class: _(["flex flex-wrap gap-2 bg-base-100 shadow px-4 py-6 border border-base-content/20 rounded", M.$props.class])
|
|
@@ -1321,7 +1321,7 @@ const Ye = ae("SunIcon", [
|
|
|
1321
1321
|
},
|
|
1322
1322
|
setup(i) {
|
|
1323
1323
|
const d = i, e = x(d.loading);
|
|
1324
|
-
return
|
|
1324
|
+
return N(
|
|
1325
1325
|
() => d.loading,
|
|
1326
1326
|
(t) => {
|
|
1327
1327
|
e.value = t;
|
|
@@ -1527,7 +1527,7 @@ const Xn = /* @__PURE__ */ G(bn, [["render", $n]]), _n = { class: "flex flex-row
|
|
|
1527
1527
|
type: "button",
|
|
1528
1528
|
role: "tab",
|
|
1529
1529
|
class: _(["min-w-max tab", y === t.value ? "bg-primary text-base-100" : ""]),
|
|
1530
|
-
onClick: (
|
|
1530
|
+
onClick: (j) => s(y),
|
|
1531
1531
|
"aria-selected": t.value == y
|
|
1532
1532
|
}, S(y), 11, On),
|
|
1533
1533
|
v.buttonOnlyMode ? T("", !0) : (a(), l("div", Bn, [
|
|
@@ -1559,8 +1559,8 @@ export {
|
|
|
1559
1559
|
Un as Modal,
|
|
1560
1560
|
Qn as NavigationBar,
|
|
1561
1561
|
Yn as Rating,
|
|
1562
|
-
|
|
1562
|
+
jn as Swap,
|
|
1563
1563
|
ea as Tab,
|
|
1564
1564
|
Jn as TagInput,
|
|
1565
|
-
|
|
1565
|
+
Nn as ThemeController
|
|
1566
1566
|
};
|
package/dist/manolis-ui.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.ManolisUi={},y.Vue))})(this,function(y,e){"use strict";const K={key:0,class:"loading loading-spinner"},X=e.defineComponent({__name:"ButtonComponent",props:{outlined:{type:Boolean,default:!1},active:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{},size:{},shape:{}},setup(r){const i=r,t=e.computed(()=>{switch(i.size){case"large":return"btn-lg";case"small":return"btn-sm";case"tiny":return"btn-tiny";case"wide":return"btn-wide";case"full":return"w-full";default:return""}}),n=e.computed(()=>{switch(i.type){case"neutral":return"btn-neutral";case"primary":return"btn-primary";case"secondary":return"btn-secondary";case"accent":return"btn-accent";case"ghost":return"btn-ghost";case"link":return"btn-link px-0!";case"info":return"btn-info";case"success":return"btn-success";case"warning":return"btn-warning";case"error":return"btn-error";default:return"btn-neutral"}}),o=e.computed(()=>{switch(i.shape){case"square":return"btn-square";case"circle":return"btn-circle";default:return""}});return(l,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["btn",{"btn-outline":i.outlined},{"btn-active":i.active},n.value,t.value,o.value])},[l.loading?(e.openBlock(),e.createElementBlock("span",K)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default",{},()=>[c[0]||(c[0]=e.createTextVNode("Submit"))])],2))}}),Z={tabindex:"0",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"},Q=["href"],v=e.defineComponent({__name:"dropdown",props:{items:{},position:{default:"bottom"},floatPosition:{default:"start"},openOnHover:{type:Boolean,default:!1},forceOpen:{type:Boolean,default:!1}},setup(r){const i={left:"dropdown-left",right:"dropdown-right",bottom:"dropdown-bottom",top:"dropdown-top"},t={start:"",end:"dropdown-end"},n=r;return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dropdown",i[n.position],t[n.floatPosition],{"dropdown-open":n.forceOpen},{"dropdown-hover":n.openOnHover}])},[e.renderSlot(o.$slots,"default",{tabindex:"0",role:"button"},()=>[l[0]||(l[0]=e.createElementVNode("div",{class:"m-1 btn"},"Open dropdown",-1))]),e.createElementVNode("ul",Z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,c=>(e.openBlock(),e.createElementBlock("li",null,[e.createElementVNode("a",{href:c.link},e.toDisplayString(c.text),9,Q)]))),256)),e.renderSlot(o.$slots,"additional")])],2))}}),ee={class:"modal-box"},te={class:"modal-action"},ne=e.defineComponent({__name:"modal",props:{position:{default:"center"},withBackdrop:{type:Boolean,default:!1}},setup(r){const i=r,t={top:"modal-top",bottom:"modal-bottom",center:"modal-middle"},n=e.ref(null),o=()=>{var c;(c=n.value)==null||c.showModal()},l=()=>{var c;(c=n.value)==null||c.close()};return(c,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("span",{class:"w-fit cursor-pointer",onClick:o},[e.renderSlot(c.$slots,"trigger",{role:"button"},()=>[g[0]||(g[0]=e.createElementVNode("button",{class:"btn"},"Open",-1))])]),e.createElementVNode("dialog",{ref_key:"dialog",ref:n,class:e.normalizeClass(["modal",t[i.position]])},[e.createElementVNode("div",ee,[e.renderSlot(c.$slots,"default"),e.createElementVNode("div",te,[e.renderSlot(c.$slots,"actions"),e.createElementVNode("form",{method:"dialog",onSubmit:l,class:e.normalizeClass(c.withBackdrop?"modal-backdrop":"")},[e.renderSlot(c.$slots,"close-button",{},()=>[g[1]||(g[1]=e.createElementVNode("button",{class:"btn"},"Close",-1))])],34)])])],2)],64))}}),oe={class:"swap-on"},le={class:"swap-off"},ae=e.defineComponent({__name:"swap",props:{effect:{}},setup(r){const i=r;return(t,n)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["swap",i.effect?`swap-${t.effect}`:""])},[n[0]||(n[0]=e.createElementVNode("input",{type:"checkbox"},null,-1)),e.createElementVNode("div",oe,[e.renderSlot(t.$slots,"on")]),e.createElementVNode("div",le,[e.renderSlot(t.$slots,"off")])],2))}});/**
|
|
1
|
+
(function(y,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(y=typeof globalThis<"u"?globalThis:y||self,e(y.ManolisUi={},y.Vue))})(this,function(y,e){"use strict";const K={key:0,class:"loading loading-spinner"},X=e.defineComponent({__name:"ButtonComponent",props:{outlined:{type:Boolean,default:!1},active:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},type:{},size:{},shape:{}},setup(r){const i=r,t=e.computed(()=>{switch(i.size){case"large":return"btn-lg";case"small":return"btn-sm";case"tiny":return"btn-tiny";case"wide":return"btn-wide";case"full":return"w-full";default:return""}}),n=e.computed(()=>{switch(i.type){case"neutral":return"btn-neutral";case"primary":return"btn-primary";case"secondary":return"btn-secondary";case"accent":return"btn-accent";case"ghost":return"btn-ghost";case"link":return"btn-link px-0!";case"info":return"btn-info";case"success":return"btn-success";case"warning":return"btn-warning";case"error":return"btn-error";default:return"btn-neutral"}}),o=e.computed(()=>{switch(i.shape){case"square":return"btn-square";case"circle":return"btn-circle";default:return""}});return(l,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["btn",{"btn-outline":i.outlined},{"btn-active":i.active},n.value,t.value,o.value])},[l.loading?(e.openBlock(),e.createElementBlock("span",K)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default",{},()=>[c[0]||(c[0]=e.createTextVNode("Submit"))])],2))}}),Z={tabindex:"0",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"},Q=["href"],v=e.defineComponent({__name:"dropdown",props:{items:{},position:{default:"bottom"},floatPosition:{default:"start"},openOnHover:{type:Boolean,default:!1},forceOpen:{type:Boolean,default:!1}},setup(r){const i={left:"dropdown-left",right:"dropdown-right",bottom:"dropdown-bottom",top:"dropdown-top"},t={start:"",end:"dropdown-end"},n=r;return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dropdown",i[n.position],t[n.floatPosition],{"dropdown-open":n.forceOpen},{"dropdown-hover":n.openOnHover}])},[e.renderSlot(o.$slots,"default",{tabindex:"0",role:"button"},()=>[l[0]||(l[0]=e.createElementVNode("div",{class:"m-1 btn"},"Open dropdown",-1))]),e.createElementVNode("ul",Z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,c=>(e.openBlock(),e.createElementBlock("li",null,[e.createElementVNode("a",{href:c.link},e.toDisplayString(c.text),9,Q)]))),256)),e.renderSlot(o.$slots,"additional")])],2))}}),ee={class:"modal-box"},te={class:"modal-action"},ne=e.defineComponent({__name:"modal",props:{position:{default:"center"},withBackdrop:{type:Boolean,default:!1}},setup(r){const i=r,t={top:"modal-top",bottom:"modal-bottom",center:"modal-middle"},n=e.ref(null),o=()=>{var c;(c=n.value)==null||c.showModal()},l=()=>{var c;(c=n.value)==null||c.close()};return(c,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("span",{class:"w-fit cursor-pointer",onClick:o},[e.renderSlot(c.$slots,"trigger",{role:"button"},()=>[g[0]||(g[0]=e.createElementVNode("button",{class:"btn"},"Open",-1))])]),e.createElementVNode("dialog",{ref_key:"dialog",ref:n,class:e.normalizeClass(["modal",t[i.position]])},[e.createElementVNode("div",ee,[e.renderSlot(c.$slots,"default"),e.createElementVNode("div",te,[e.renderSlot(c.$slots,"actions"),e.createElementVNode("form",{method:"dialog",onSubmit:l,class:e.normalizeClass(c.withBackdrop?"modal-backdrop":"")},[e.renderSlot(c.$slots,"close-button",{},()=>[g[1]||(g[1]=e.createElementVNode("button",{class:"btn"},"Close",-1))])],34)])])],2)],64))}}),oe={class:"flex justify-center items-center swap-on"},le={class:"flex justify-center items-center swap-off"},ae=e.defineComponent({__name:"swap",props:{effect:{}},setup(r){const i=r;return(t,n)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["swap",i.effect?`swap-${t.effect}`:""])},[n[0]||(n[0]=e.createElementVNode("input",{type:"checkbox"},null,-1)),e.createElementVNode("div",oe,[e.renderSlot(t.$slots,"on")]),e.createElementVNode("div",le,[e.renderSlot(t.$slots,"off")])],2))}});/**
|
|
2
2
|
* @license lucide-vue-next v0.468.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|