mediacube-ui-v2 0.0.65 → 0.0.66
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/mediacube-ui-v2.js
CHANGED
|
@@ -1463,7 +1463,7 @@ class d7 {
|
|
|
1463
1463
|
let e = document.getElementById(String(this.id));
|
|
1464
1464
|
if (!e) {
|
|
1465
1465
|
const a = document.createElement("div");
|
|
1466
|
-
a.classList.add("mc-tooltip"), a.id = String(this.id), a.innerText = this.content || "", a.style.setProperty("--tooltip-color", this.color), a.style.setProperty("--tooltip-text-color", this.textColor), a.setAttribute("tooltip-placement", this.placement), a.setAttribute("tooltip-size", this.size), a.setAttribute("tooltip-arrow", String(this.arrow)), (o = document.getElementById("tooltip-container")) == null || o.appendChild(a);
|
|
1466
|
+
a.classList.add("mc-tooltip"), a.id = String(this.id), a.innerText = this.content || "", a.style.setProperty("--tooltip-color", this.color), a.style.setProperty("--tooltip-text-color", this.textColor), a.setAttribute("tooltip-placement", this.placement), a.setAttribute("tooltip-size", this.size), a.setAttribute("tooltip-arrow", String(this.arrow)), (o = document.getElementById("tooltip-container")) == null || o.appendChild(a), a.onmouseenter = this.showTooltip, a.onmouseleave = this.hideTooltip;
|
|
1467
1467
|
}
|
|
1468
1468
|
if (e = document.getElementById(String(this.id)), e) {
|
|
1469
1469
|
e.style.visibility = "visible";
|
|
@@ -1475,7 +1475,9 @@ class d7 {
|
|
|
1475
1475
|
f2(this, "hideTooltip", () => {
|
|
1476
1476
|
this.visible.value = !1;
|
|
1477
1477
|
const e = document.getElementById(String(this.id));
|
|
1478
|
-
e && (e.style.visibility = "hidden")
|
|
1478
|
+
e && (e.style.visibility = "hidden", setTimeout(() => {
|
|
1479
|
+
!this.visible.value && this.destroy();
|
|
1480
|
+
}, 3e3));
|
|
1479
1481
|
});
|
|
1480
1482
|
f2(this, "updateTooltipPosition", () => {
|
|
1481
1483
|
const { top: e, left: o, width: a, height: l } = this.target.getBoundingClientRect(), r = e + window.scrollY, n = o + window.scrollX, s = 4, i = this.arrow ? 4 : 0;
|
|
@@ -1515,7 +1517,7 @@ class d7 {
|
|
|
1515
1517
|
const e = document.getElementById(String(this.id));
|
|
1516
1518
|
e && e.remove();
|
|
1517
1519
|
});
|
|
1518
|
-
this.target = e, this.content = o.content, this.placement = o.placement || $0.Top, this.size = o.size || y1.M, this.id = te().timestamp(5), this.arrow = _5.hasProperty(o, "arrow") ? !!o.arrow : !0, this.color = o.color || G2.black, this.textColor = o.textColor || G2.white, this.target.
|
|
1520
|
+
this.target = e, this.content = o.content, this.placement = o.placement || $0.Top, this.size = o.size || y1.M, this.id = te().timestamp(5), this.arrow = _5.hasProperty(o, "arrow") ? !!o.arrow : !0, this.color = o.color || G2.black, this.textColor = o.textColor || G2.white, this.target.onmouseenter = this.showTooltip, this.target.onmouseleave = this.hideTooltip, Ce.value.push(this);
|
|
1519
1521
|
}
|
|
1520
1522
|
}
|
|
1521
1523
|
R2(() => {
|
|
@@ -2082,9 +2084,7 @@ const x7 = {
|
|
|
2082
2084
|
},
|
|
2083
2085
|
emits: ["blur", "click"],
|
|
2084
2086
|
setup(t, { emit: e }) {
|
|
2085
|
-
const o = P0("dsOptions", {})
|
|
2086
|
-
console.log(o);
|
|
2087
|
-
const a = Z6(), l = k(() => {
|
|
2087
|
+
const o = P0("dsOptions", {}), a = Z6(), l = k(() => {
|
|
2088
2088
|
let y = {};
|
|
2089
2089
|
return r.tooltip && (y = {
|
|
2090
2090
|
content: r.tooltip,
|
|
@@ -2173,7 +2173,7 @@ const x7 = {
|
|
|
2173
2173
|
}), v = (y) => {
|
|
2174
2174
|
s("blur", y);
|
|
2175
2175
|
}, f = (y) => {
|
|
2176
|
-
y.preventDefault(), r.to ?
|
|
2176
|
+
y.preventDefault(), r.to ? o.router && o.router.push({ path: r.to }) : window.open(r.href, r.target), s("click", y);
|
|
2177
2177
|
};
|
|
2178
2178
|
return (y, _) => O0((p(), K(Q0(C.value), S2({ ref: n.value }, { ...m.value }, {
|
|
2179
2179
|
class: ["mc-button", i.value],
|