@profitliga/ui 2.0.10 → 2.0.12
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.sheet-trigger[data-v-
|
|
1
|
+
.sheet-trigger[data-v-89da4791]{display:contents}.sheet-layer[data-v-89da4791]{position:relative}.sheet-overlay[data-v-89da4791]{pointer-events:auto;cursor:pointer}.sheet-content[data-v-89da4791]{background-color:var(--theme-neutral-0);z-index:1002;border-radius:12px 12px 0 0;flex-direction:column;width:100%;max-height:calc(100vh - 40px);display:flex;position:fixed;bottom:0;left:0;right:0;overflow:visible;box-shadow:0 2px 5px #3a3a3a40}.sheet-content[data-state=open][data-v-89da4791]{animation:slideBottomIn var(--animation-duration) ease-in-out}.sheet-content[data-state=closed][data-v-89da4791]{animation:slideBottomOut var(--animation-duration) ease-in-out}.sheet-content__handle[data-v-89da4791]{cursor:grab;touch-action:none;flex-shrink:0;justify-content:center;align-items:flex-end;width:100%;height:24px;padding-bottom:12px;display:flex}.sheet-content__handle[data-v-89da4791]:active{cursor:grabbing}.sheet-content__handle-dot[data-v-89da4791]{background-color:var(--theme-neutral-icon-primary);border-radius:2px;width:48px;height:4px}.sheet-content__body[data-v-89da4791]{box-sizing:content-box;scrollbar-width:thin;scrollbar-color:var(--theme-neutral-icon-primary) var(--theme-neutral-surface-icon);flex:auto;width:100%;min-height:0;overflow-y:auto}.sheet-content__body[data-v-89da4791]::-webkit-scrollbar{width:8px;height:0}.sheet-content__body[data-v-89da4791]::-webkit-scrollbar-thumb{background-color:var(--theme-neutral-icon-primary);background-clip:padding-box;border:1px solid #0000;border-radius:999px}.sheet-content__body[data-v-89da4791]::-webkit-scrollbar-track{background:var(--theme-neutral-surface-icon);border-radius:4px}.sheet-content__body[data-v-89da4791]::-webkit-scrollbar-corner{background:0 0}.sheet-overlay--drag-closing[data-v-89da4791]{visibility:hidden}
|
|
@@ -2,7 +2,7 @@ import './BottomSheet.css';
|
|
|
2
2
|
import o from "./BottomSheet.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
5
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-89da4791"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|
|
@@ -71,9 +71,7 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
|
|
|
71
71
|
E(O, (e) => d.registerElement(e));
|
|
72
72
|
let b;
|
|
73
73
|
E(v, (e) => {
|
|
74
|
-
b?.(), b = e ? W(e, N, {
|
|
75
|
-
ignore: () => d.elementsAbove()
|
|
76
|
-
}) : void 0;
|
|
74
|
+
b?.(), b = e ? W(e, N, { ignore: () => d.elementsAbove() }) : void 0;
|
|
77
75
|
}), q(() => {
|
|
78
76
|
b?.(), document.removeEventListener("keydown", h), g.deactivate();
|
|
79
77
|
});
|
|
@@ -102,7 +100,7 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
|
|
|
102
100
|
style: G({ zIndex: A.value })
|
|
103
101
|
}, [
|
|
104
102
|
f("div", u({
|
|
105
|
-
class: ["overlay dialog-overlay", { "sheet-overlay--drag-closing": i.value }],
|
|
103
|
+
class: ["overlay sheet-overlay dialog-overlay", { "sheet-overlay--drag-closing": i.value }],
|
|
106
104
|
"data-state": t(T)
|
|
107
105
|
}, t(r)("overlay")), null, 16, se),
|
|
108
106
|
f("div", u({
|
|
@@ -1,41 +1,36 @@
|
|
|
1
|
-
import { toValue as
|
|
1
|
+
import { toValue as p, unref as g } from "vue";
|
|
2
2
|
const s = /* @__PURE__ */ new WeakMap();
|
|
3
|
-
let
|
|
3
|
+
let i = 0;
|
|
4
4
|
const E = 500;
|
|
5
|
-
function
|
|
6
|
-
const o = g(
|
|
5
|
+
function m(r) {
|
|
6
|
+
const o = g(r);
|
|
7
7
|
return o?.$el ?? o;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return typeof
|
|
9
|
+
function h(r) {
|
|
10
|
+
return typeof r == "string" ? document.querySelector(r) : m(r);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
12
|
+
function L(r, o, f = {}) {
|
|
13
|
+
const n = h(r);
|
|
14
|
+
if (!n) return () => {
|
|
15
15
|
};
|
|
16
|
-
const a = s.get(
|
|
17
|
-
a && (a(), s.delete(
|
|
18
|
-
const u = (
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
else if (
|
|
16
|
+
const a = s.get(n);
|
|
17
|
+
a && (a(), s.delete(n));
|
|
18
|
+
const u = (e) => {
|
|
19
|
+
if (e.type === "touchstart")
|
|
20
|
+
i = e.timeStamp;
|
|
21
|
+
else if (i > 0 && e.timeStamp - i < E)
|
|
22
22
|
return;
|
|
23
|
-
const
|
|
24
|
-
if (!
|
|
25
|
-
const
|
|
26
|
-
|
|
23
|
+
const c = e.target instanceof Node ? e.target : null;
|
|
24
|
+
if (!c) return;
|
|
25
|
+
const d = (p(f.ignore) ?? []).map((t) => typeof t == "string" ? document.querySelector(t) : m(t)).filter((t) => t != null);
|
|
26
|
+
n.contains(c) || d.some((t) => t.contains(c)) || (o(e), e.type === "touchstart" && e.cancelable && console.log("would prevent default here", e.target));
|
|
27
27
|
};
|
|
28
|
-
document.addEventListener("mousedown", u, { capture: !0 }), document.addEventListener("touchstart", u, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
const m = () => {
|
|
33
|
-
document.removeEventListener("mousedown", u, { capture: !0 }), document.removeEventListener("touchstart", u, {
|
|
34
|
-
capture: !0
|
|
35
|
-
}), s.delete(r);
|
|
28
|
+
document.addEventListener("mousedown", u, { capture: !0 }), document.addEventListener("touchstart", u, { capture: !0, passive: !1 });
|
|
29
|
+
const l = () => {
|
|
30
|
+
document.removeEventListener("mousedown", u, { capture: !0 }), document.removeEventListener("touchstart", u, { capture: !0 }), s.delete(n);
|
|
36
31
|
};
|
|
37
|
-
return s.set(
|
|
32
|
+
return s.set(n, l), l;
|
|
38
33
|
}
|
|
39
34
|
export {
|
|
40
|
-
|
|
35
|
+
L as onClickOutside
|
|
41
36
|
};
|