@profitliga/ui 2.0.9 → 2.0.11
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-252549aa]{display:contents}.sheet-layer[data-v-252549aa]{position:relative}.sheet-overlay[data-v-252549aa]{pointer-events:auto;cursor:pointer}.sheet-content[data-v-252549aa]{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-252549aa]{animation:slideBottomIn var(--animation-duration) ease-in-out}.sheet-content[data-state=closed][data-v-252549aa]{animation:slideBottomOut var(--animation-duration) ease-in-out}.sheet-content__handle[data-v-252549aa]{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-252549aa]:active{cursor:grabbing}.sheet-content__handle-dot[data-v-252549aa]{background-color:var(--theme-neutral-icon-primary);border-radius:2px;width:48px;height:4px}.sheet-content__body[data-v-252549aa]{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-252549aa]::-webkit-scrollbar{width:8px;height:0}.sheet-content__body[data-v-252549aa]::-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-252549aa]::-webkit-scrollbar-track{background:var(--theme-neutral-surface-icon);border-radius:4px}.sheet-content__body[data-v-252549aa]::-webkit-scrollbar-corner{background:0 0}.sheet-overlay--drag-closing[data-v-252549aa]{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-252549aa"]]);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|
|
@@ -102,7 +102,7 @@ const se = ["data-state"], re = ["aria-label", "aria-labelledby", "data-state"],
|
|
|
102
102
|
style: G({ zIndex: A.value })
|
|
103
103
|
}, [
|
|
104
104
|
f("div", u({
|
|
105
|
-
class: ["overlay dialog-overlay", { "sheet-overlay--drag-closing": i.value }],
|
|
105
|
+
class: ["overlay sheet-overlay dialog-overlay", { "sheet-overlay--drag-closing": i.value }],
|
|
106
106
|
"data-state": t(T)
|
|
107
107
|
}, t(r)("overlay")), null, 16, se),
|
|
108
108
|
f("div", u({
|
|
@@ -1,49 +1,36 @@
|
|
|
1
|
-
import { toValue as
|
|
2
|
-
const
|
|
1
|
+
import { toValue as d, unref as g } from "vue";
|
|
2
|
+
const s = /* @__PURE__ */ new WeakMap();
|
|
3
3
|
let i = 0;
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
function S() {
|
|
9
|
-
document.addEventListener("click", p, {
|
|
10
|
-
capture: !0,
|
|
11
|
-
once: !0
|
|
12
|
-
}), setTimeout(() => {
|
|
13
|
-
document.removeEventListener("click", p, {
|
|
14
|
-
capture: !0
|
|
15
|
-
});
|
|
16
|
-
}, l);
|
|
17
|
-
}
|
|
18
|
-
function d(t) {
|
|
19
|
-
const o = L(t);
|
|
4
|
+
const E = 500;
|
|
5
|
+
function m(n) {
|
|
6
|
+
const o = g(n);
|
|
20
7
|
return o?.$el ?? o;
|
|
21
8
|
}
|
|
22
|
-
function
|
|
23
|
-
return typeof
|
|
9
|
+
function y(n) {
|
|
10
|
+
return typeof n == "string" ? document.querySelector(n) : m(n);
|
|
24
11
|
}
|
|
25
|
-
function
|
|
26
|
-
const r =
|
|
12
|
+
function h(n, o, f = {}) {
|
|
13
|
+
const r = y(n);
|
|
27
14
|
if (!r) return () => {
|
|
28
15
|
};
|
|
29
|
-
const a =
|
|
30
|
-
a && (a(),
|
|
31
|
-
const u = (
|
|
32
|
-
if (
|
|
33
|
-
i =
|
|
34
|
-
else if (i > 0 &&
|
|
16
|
+
const a = s.get(r);
|
|
17
|
+
a && (a(), s.delete(r));
|
|
18
|
+
const u = (e) => {
|
|
19
|
+
if (e.type === "touchstart")
|
|
20
|
+
i = e.timeStamp;
|
|
21
|
+
else if (i > 0 && e.timeStamp - i < E)
|
|
35
22
|
return;
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
38
|
-
const
|
|
39
|
-
r.contains(
|
|
23
|
+
const c = e.target instanceof Node ? e.target : null;
|
|
24
|
+
if (!c) return;
|
|
25
|
+
const p = (d(f.ignore) ?? []).map((t) => typeof t == "string" ? document.querySelector(t) : m(t)).filter((t) => t != null);
|
|
26
|
+
r.contains(c) || p.some((t) => t.contains(c)) || (o(e), e.type === "touchstart" && e.cancelable && e.preventDefault());
|
|
40
27
|
};
|
|
41
|
-
document.addEventListener("mousedown", u, { capture: !0 }), document.addEventListener("touchstart", u, { capture: !0 });
|
|
42
|
-
const
|
|
43
|
-
document.removeEventListener("mousedown", u, { capture: !0 }), document.removeEventListener("touchstart", u, { capture: !0 }),
|
|
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(r);
|
|
44
31
|
};
|
|
45
|
-
return
|
|
32
|
+
return s.set(r, l), l;
|
|
46
33
|
}
|
|
47
34
|
export {
|
|
48
|
-
|
|
35
|
+
h as onClickOutside
|
|
49
36
|
};
|