nuvra 0.4.0 → 0.4.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.
- package/dist/index.js +22 -14
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5008,36 +5008,44 @@ var R = /* @__PURE__ */ new Set([
|
|
|
5008
5008
|
i.value = !1;
|
|
5009
5009
|
}, c = () => {
|
|
5010
5010
|
n.disabled || (i.value = !i.value);
|
|
5011
|
-
}, l =
|
|
5011
|
+
}, l = {
|
|
5012
|
+
left: 0,
|
|
5013
|
+
top: 0
|
|
5014
|
+
}, u = (e, t) => {
|
|
5015
|
+
let n = e.getBoundingClientRect(), r = Ga && t.matches(":popover-open");
|
|
5016
|
+
t.style.position = r ? "absolute" : "", t.style.left = `${n.left + l.left + (r ? window.scrollX : 0)}px`, t.style.top = `${n.top + l.top + (r ? window.scrollY : 0)}px`;
|
|
5017
|
+
}, d = () => {
|
|
5012
5018
|
let e = a.value, t = o.value;
|
|
5013
5019
|
if (!e || !t) return;
|
|
5014
5020
|
let { clientWidth: r, clientHeight: i } = document.documentElement, s = i - 16;
|
|
5015
5021
|
t.style.maxHeight = `${Math.min(n.maxHeight ?? s, s)}px`;
|
|
5016
|
-
let c = e.getBoundingClientRect(), { offsetWidth:
|
|
5017
|
-
|
|
5018
|
-
let
|
|
5019
|
-
|
|
5020
|
-
},
|
|
5022
|
+
let c = e.getBoundingClientRect(), { offsetWidth: d, offsetHeight: f } = t, p = c.bottom + Ts;
|
|
5023
|
+
p + f > i - Es && c.top - Ts - f >= Es && (p = c.top - Ts - f), p = Math.max(Es, Math.min(p, i - Es - f));
|
|
5024
|
+
let m = n.placement === "bottom-end" ? c.right - d : c.left, h = Math.min(Math.max(m, Es), Math.max(Es, r - d - Es));
|
|
5025
|
+
l.left = h - c.left, l.top = p - c.top, u(e, t);
|
|
5026
|
+
}, f = () => {
|
|
5027
|
+
a.value && o.value && u(a.value, o.value);
|
|
5028
|
+
}, p = (e) => {
|
|
5021
5029
|
let { target: t } = e;
|
|
5022
5030
|
t instanceof Node && (o.value?.contains(t) || a.value?.contains(t)) || s();
|
|
5023
|
-
},
|
|
5031
|
+
}, m = (e) => {
|
|
5024
5032
|
if (e.key !== "Escape") return;
|
|
5025
5033
|
e.preventDefault(), e.stopPropagation();
|
|
5026
5034
|
let t = o.value?.contains(document.activeElement) ?? !1;
|
|
5027
5035
|
s(), t && a.value?.querySelector("button:not(:disabled), [tabindex]")?.focus();
|
|
5028
|
-
},
|
|
5036
|
+
}, h = () => {
|
|
5029
5037
|
let e = o.value;
|
|
5030
|
-
e && (Ga && !e.matches(":popover-open") && e.showPopover(),
|
|
5031
|
-
},
|
|
5032
|
-
Ja(s), document.removeEventListener("pointerdown",
|
|
5038
|
+
e && (Ga && !e.matches(":popover-open") && e.showPopover(), d(), qa(s), document.addEventListener("pointerdown", p, !0), document.addEventListener("keydown", m, !0), window.addEventListener("resize", d), window.addEventListener("scroll", f, !0), r("shown"));
|
|
5039
|
+
}, g = () => {
|
|
5040
|
+
Ja(s), document.removeEventListener("pointerdown", p, !0), document.removeEventListener("keydown", m, !0), window.removeEventListener("resize", d), window.removeEventListener("scroll", f, !0);
|
|
5033
5041
|
let e = o.value;
|
|
5034
5042
|
Ga && e?.matches(":popover-open") && e.hidePopover();
|
|
5035
5043
|
};
|
|
5036
5044
|
return F(i, (e) => {
|
|
5037
5045
|
e && r("show");
|
|
5038
|
-
}), F(i, (e) => e ?
|
|
5046
|
+
}), F(i, (e) => e ? h() : g(), { flush: "post" }), F(() => n.disabled, (e) => {
|
|
5039
5047
|
e && s();
|
|
5040
|
-
}), ne(
|
|
5048
|
+
}), ne(g), (t, n) => (E(), _("span", Cs, [v("span", {
|
|
5041
5049
|
ref_key: "referenceRef",
|
|
5042
5050
|
ref: a,
|
|
5043
5051
|
class: "doc-popover__reference",
|
|
@@ -5051,7 +5059,7 @@ var R = /* @__PURE__ */ new Set([
|
|
|
5051
5059
|
style: T({ width: e.width ? `${e.width}px` : void 0 })
|
|
5052
5060
|
}, [A(t.$slots, "default", {}, void 0, !0)], 14, ws)]));
|
|
5053
5061
|
}
|
|
5054
|
-
}), [["__scopeId", "data-v-
|
|
5062
|
+
}), [["__scopeId", "data-v-cae67a7a"]]), Os = { class: "color-picker" }, ks = [
|
|
5055
5063
|
"disabled",
|
|
5056
5064
|
"title",
|
|
5057
5065
|
"aria-label"
|