dk-plus
Version:
31 lines (30 loc) • 842 B
JavaScript
import { toRaw as a } from "vue";
import { DK_PLACEMENT as d } from "../../_tokens/public/index.js";
import { getStyleList as m } from "../public/get-StyleList/index.js";
import { setSize as h } from "../public/set-size/index.js";
import "../../_icon/index.js";
const g = (s) => {
const e = a(s), { classes: o } = m(s, "popover"), i = o([...["dk-popover"]], "dk-popover"), p = ["dk-popover-wrapper"];
d.includes(e.placement) && p.push("placement");
const n = o([...p], "dk-popover-wrapper"), c = () => {
const { width: t } = e;
return {
"--popover-width": h(t || "240px")
};
}, l = (t) => {
const r = t.clientHeight;
return {
width: t.clientWidth,
height: r
};
};
return {
classList: i,
styleList: c(),
wrapperClassList: n,
setTop: l
};
};
export {
g as getPopover
};