@loafacto/ui 0.13.1 → 0.13.2
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 +11 -8
- package/dist/index.js.map +1 -1
- package/dist/loafacto-ui.css +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2954,13 +2954,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2954
2954
|
}
|
|
2955
2955
|
function onKeydown(e2) {
|
|
2956
2956
|
var _a, _b;
|
|
2957
|
-
if (e2.key === "Escape") {
|
|
2958
|
-
if (open.value) {
|
|
2959
|
-
e2.stopPropagation();
|
|
2960
|
-
hide();
|
|
2961
|
-
}
|
|
2962
|
-
return;
|
|
2963
|
-
}
|
|
2964
2957
|
if (e2.key === "ArrowDown" || e2.key === "ArrowUp") {
|
|
2965
2958
|
e2.preventDefault();
|
|
2966
2959
|
if (!open.value) {
|
|
@@ -2998,6 +2991,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2998
2991
|
const t = e2.target;
|
|
2999
2992
|
if (!((_a = root.value) == null ? void 0 : _a.contains(t)) && !((_b = list.value) == null ? void 0 : _b.contains(t))) hide();
|
|
3000
2993
|
}
|
|
2994
|
+
function onDocKeydown(e2) {
|
|
2995
|
+
var _a;
|
|
2996
|
+
if (e2.key !== "Escape") return;
|
|
2997
|
+
e2.stopPropagation();
|
|
2998
|
+
hide();
|
|
2999
|
+
(_a = control.value) == null ? void 0 : _a.focus();
|
|
3000
|
+
}
|
|
3001
3001
|
function onScroll(e2) {
|
|
3002
3002
|
if (list.value && list.value.contains(e2.target)) return;
|
|
3003
3003
|
hide();
|
|
@@ -3005,10 +3005,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3005
3005
|
watch(open, (isOpen) => {
|
|
3006
3006
|
if (isOpen) {
|
|
3007
3007
|
document.addEventListener("pointerdown", onPointerDown);
|
|
3008
|
+
document.addEventListener("keydown", onDocKeydown, true);
|
|
3008
3009
|
document.addEventListener("scroll", onScroll, true);
|
|
3009
3010
|
window.addEventListener("resize", hide);
|
|
3010
3011
|
} else {
|
|
3011
3012
|
document.removeEventListener("pointerdown", onPointerDown);
|
|
3013
|
+
document.removeEventListener("keydown", onDocKeydown, true);
|
|
3012
3014
|
document.removeEventListener("scroll", onScroll, true);
|
|
3013
3015
|
window.removeEventListener("resize", hide);
|
|
3014
3016
|
}
|
|
@@ -3021,6 +3023,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3021
3023
|
});
|
|
3022
3024
|
onBeforeUnmount(() => {
|
|
3023
3025
|
document.removeEventListener("pointerdown", onPointerDown);
|
|
3026
|
+
document.removeEventListener("keydown", onDocKeydown, true);
|
|
3024
3027
|
document.removeEventListener("scroll", onScroll, true);
|
|
3025
3028
|
window.removeEventListener("resize", hide);
|
|
3026
3029
|
});
|
|
@@ -3179,7 +3182,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3179
3182
|
};
|
|
3180
3183
|
}
|
|
3181
3184
|
});
|
|
3182
|
-
const LfListSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
3185
|
+
const LfListSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-bdf6d912"]]);
|
|
3183
3186
|
const _hoisted_1 = {
|
|
3184
3187
|
key: 0,
|
|
3185
3188
|
class: "lf-divider lf-divider--labeled",
|