@douxcode/vue-spring-bottom-sheet 3.1.0 → 3.2.0
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/README.md +3 -0
- package/dist/BottomSheet.d.ts +1 -0
- package/dist/index.mjs +283 -275
- package/dist/style.css +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -145,6 +145,9 @@ For Nuxt 3, just wrap component in `<ClientOnly>`
|
|
|
145
145
|
| headerClass | String | '' | Set header element class |
|
|
146
146
|
| contentClass | String | '' | Set content element class |
|
|
147
147
|
| footerClass | String | '' | Set footer element class |
|
|
148
|
+
| forceMount | Boolean | false | Force mount the bottom sheet in the DOM |
|
|
149
|
+
|
|
150
|
+
Interactive content inside the sheet body keeps its native touch behavior. Inputs and editable content do not start sheet dragging, and custom widgets can opt out with data-vsbs-no-drag.
|
|
148
151
|
|
|
149
152
|
## Exposed methods
|
|
150
153
|
|
package/dist/BottomSheet.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useScrollLock as
|
|
3
|
-
import { useFocusTrap as
|
|
4
|
-
function
|
|
5
|
-
let
|
|
6
|
-
return o === void 0 ?
|
|
1
|
+
import { ref as H, shallowRef as y, computed as D, defineComponent as Ae, useCssVars as Fe, watch as A, nextTick as _, onMounted as $e, toRef as F, onUnmounted as Ve, openBlock as $, createElementBlock as ee, Fragment as ze, createBlock as fe, Teleport as ve, createElementVNode as V, createVNode as he, Transition as ge, withCtx as me, unref as f, withDirectives as pe, vShow as Se, createCommentVNode as be, normalizeStyle as Ne, normalizeClass as te, renderSlot as ne } from "vue";
|
|
2
|
+
import { useScrollLock as qe, useVModel as Ke, useWindowSize as Ue, useElementBounding as U } from "@vueuse/core";
|
|
3
|
+
import { useFocusTrap as We } from "@vueuse/integrations/useFocusTrap";
|
|
4
|
+
function Ge(e, t, o) {
|
|
5
|
+
let a = (l) => e(l, ...t);
|
|
6
|
+
return o === void 0 ? a : Object.assign(a, { lazy: o, lazyArgs: t });
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
if (
|
|
11
|
-
if (
|
|
8
|
+
function Qe(e, t, o) {
|
|
9
|
+
let a = e.length - t.length;
|
|
10
|
+
if (a === 0) return e(...t);
|
|
11
|
+
if (a === 1) return Ge(e, t, o);
|
|
12
12
|
throw Error("Wrong number of arguments");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function T(...e) {
|
|
15
|
+
return Qe(Xe, e);
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
let
|
|
21
|
-
|
|
17
|
+
const Xe = (e, { min: t, max: o }) => t !== void 0 && e < t ? t : o !== void 0 && e > o ? o : e, ye = /* @__PURE__ */ Symbol("funnel/voidReducer"), je = () => ye;
|
|
18
|
+
function Je(e, { triggerAt: t = "end", minQuietPeriodMs: o, maxBurstDurationMs: a, minGapMs: l, reducer: u = je }) {
|
|
19
|
+
let i, v, d, h, p = () => {
|
|
20
|
+
let m = d;
|
|
21
|
+
m !== void 0 && (d = void 0, m === ye ? e() : e(m), l !== void 0 && (v = setTimeout(P, l)));
|
|
22
22
|
}, P = () => {
|
|
23
|
-
clearTimeout(
|
|
23
|
+
clearTimeout(v), v = void 0, i === void 0 && p();
|
|
24
24
|
}, C = () => {
|
|
25
|
-
clearTimeout(
|
|
25
|
+
clearTimeout(i), i = void 0, h = void 0, v === void 0 && p();
|
|
26
26
|
};
|
|
27
|
-
return { call: (...
|
|
28
|
-
let
|
|
29
|
-
if ((t !== "start" ||
|
|
30
|
-
if (o !== void 0 ||
|
|
31
|
-
clearTimeout(
|
|
32
|
-
let
|
|
33
|
-
h ??=
|
|
34
|
-
let
|
|
35
|
-
|
|
27
|
+
return { call: (...m) => {
|
|
28
|
+
let k = i === void 0 && v === void 0;
|
|
29
|
+
if ((t !== "start" || k) && (d = u(d, ...m)), !(i === void 0 && !k)) {
|
|
30
|
+
if (o !== void 0 || a !== void 0 || l === void 0) {
|
|
31
|
+
clearTimeout(i);
|
|
32
|
+
let E = Date.now();
|
|
33
|
+
h ??= E;
|
|
34
|
+
let M = a === void 0 ? o ?? 0 : Math.min(o ?? a, Math.max(0, a - (E - h)));
|
|
35
|
+
i = setTimeout(C, M);
|
|
36
36
|
}
|
|
37
|
-
t !== "end" &&
|
|
37
|
+
t !== "end" && k && p();
|
|
38
38
|
}
|
|
39
39
|
}, cancel: () => {
|
|
40
|
-
clearTimeout(
|
|
40
|
+
clearTimeout(i), i = void 0, h = void 0, clearTimeout(v), v = void 0, d = void 0;
|
|
41
41
|
}, flush: () => {
|
|
42
42
|
C(), P();
|
|
43
43
|
}, get isIdle() {
|
|
44
|
-
return
|
|
44
|
+
return i === void 0 && v === void 0;
|
|
45
45
|
} };
|
|
46
46
|
}
|
|
47
|
-
const
|
|
48
|
-
function
|
|
49
|
-
const e =
|
|
50
|
-
function t(
|
|
51
|
-
e.value = [{ y:
|
|
47
|
+
const Ze = 5, _e = 30, et = 400;
|
|
48
|
+
function tt() {
|
|
49
|
+
const e = H([]);
|
|
50
|
+
function t(l) {
|
|
51
|
+
e.value = [{ y: l, time: performance.now() }];
|
|
52
52
|
}
|
|
53
|
-
function o(
|
|
54
|
-
const
|
|
55
|
-
|
|
53
|
+
function o(l) {
|
|
54
|
+
const u = e.value;
|
|
55
|
+
u.push({ y: l, time: performance.now() }), u.length > Ze && u.shift();
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
57
|
+
function a() {
|
|
58
|
+
const l = e.value;
|
|
59
|
+
if (l.length < 2)
|
|
60
60
|
return { direction: "none", velocity: 0, isSwipe: !1 };
|
|
61
|
-
const
|
|
62
|
-
if (!
|
|
61
|
+
const u = l[0], i = l[l.length - 1];
|
|
62
|
+
if (!u || !i)
|
|
63
63
|
return { direction: "none", velocity: 0, isSwipe: !1 };
|
|
64
|
-
const
|
|
64
|
+
const v = u.y - i.y, d = (i.time - u.time) / 1e3, h = d > 0 ? Math.abs(v) / d : 0, p = Math.abs(v) >= _e && h >= et;
|
|
65
65
|
let P = "none";
|
|
66
|
-
return
|
|
66
|
+
return p && (P = v > 0 ? "up" : "down"), e.value = [], { direction: P, velocity: h, isSwipe: p };
|
|
67
67
|
}
|
|
68
|
-
return { start: t, update: o, end:
|
|
68
|
+
return { start: t, update: o, end: a };
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function nt(e, t) {
|
|
71
71
|
if (e === void 0)
|
|
72
72
|
return t / 2;
|
|
73
73
|
if (typeof e == "number")
|
|
@@ -78,109 +78,112 @@ function et(e, t) {
|
|
|
78
78
|
}
|
|
79
79
|
return t / 2;
|
|
80
80
|
}
|
|
81
|
-
const
|
|
82
|
-
function
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
const at = 10, we = 0.25;
|
|
82
|
+
function Pe(e) {
|
|
83
|
+
return !!e.closest(
|
|
84
|
+
'input, textarea, [contenteditable="true"], [contenteditable=""], [data-vsbs-no-drag]'
|
|
85
|
+
);
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
+
function ot(e, t, o) {
|
|
87
88
|
return Math.max(t, Math.min(e, o));
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function rt(e, t) {
|
|
90
91
|
return Math.pow(e, t * 5);
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
return t === 0 || Math.abs(t) === 1 / 0 ?
|
|
93
|
+
function Ce(e, t, o) {
|
|
94
|
+
return t === 0 || Math.abs(t) === 1 / 0 ? rt(e, o) : e * t * o / (t + o * e);
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
96
|
+
function ke(e, t, o, a = 0.15) {
|
|
97
|
+
return a === 0 ? ot(e, t, o) : e < t ? -Ce(t - e, o - t, a) + t : e > o ? +Ce(e - o, o - t, a) + o : e;
|
|
97
98
|
}
|
|
98
|
-
const
|
|
99
|
-
const t =
|
|
100
|
-
let
|
|
101
|
-
const
|
|
102
|
-
|
|
99
|
+
const lt = (e) => {
|
|
100
|
+
const t = tt(), o = y(!1);
|
|
101
|
+
let a = !0, l = 0, u = 0, i = !1, v = 0, d = !1, h = 0;
|
|
102
|
+
const p = (n) => {
|
|
103
|
+
n > 0 ? e.onDraggingDown?.() : n < 0 && e.onDraggingUp?.();
|
|
103
104
|
}, P = () => {
|
|
104
|
-
if (
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
}, C = (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
b
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
if (i) return;
|
|
106
|
+
const n = document.activeElement;
|
|
107
|
+
n instanceof HTMLElement && n !== document.body && (n.blur(), i = !0);
|
|
108
|
+
}, C = (n) => {
|
|
109
|
+
const g = n.target;
|
|
110
|
+
g && Pe(g) && n.preventDefault(), typeof n.cancelable != "boolean" || n.cancelable ? a && n.preventDefault() : console.warn("The following event couldn't be canceled:");
|
|
111
|
+
}, m = (n, g) => {
|
|
112
|
+
const b = g === "header" ? e.sheetHeaderRef.value : e.sheetFooterRef.value;
|
|
113
|
+
b && n.button === 0 && (l = e.height.value, u = e.translateY.value, i = !1, h = 0, d = !1, a = !0, o.value = !0, t.start(n.clientY), b.setPointerCapture(n.pointerId));
|
|
114
|
+
}, k = (n) => {
|
|
115
|
+
const g = n.target;
|
|
116
|
+
e.sheetContentRef.value && n.button === 0 && e.expandOnContentDrag.value !== !1 && (g && Pe(g) || (l = e.height.value, u = e.translateY.value, v = n.clientY, i = !1, h = 0, d = !1, a = !0, o.value = !0, t.start(n.clientY), e.sheetContentRef.value.setPointerCapture(n.pointerId)));
|
|
117
|
+
}, E = (n) => {
|
|
115
118
|
if (o.value) {
|
|
116
|
-
if (Math.abs(
|
|
117
|
-
e.canSwipeClose.value ? e.translateY.value = e.translateY.value +
|
|
118
|
-
|
|
119
|
+
if (Math.abs(n.movementY) > 0 && P(), t.update(n.clientY), p(n.movementY), e.translateY.value > 0) {
|
|
120
|
+
e.canSwipeClose.value ? e.translateY.value = e.translateY.value + n.movementY : (u = u + n.movementY, e.translateY.value = ke(
|
|
121
|
+
u,
|
|
119
122
|
-e.minSnapPoint.value,
|
|
120
123
|
0,
|
|
121
|
-
|
|
124
|
+
we
|
|
122
125
|
));
|
|
123
126
|
return;
|
|
124
127
|
}
|
|
125
|
-
|
|
128
|
+
l = T(l - n.movementY, {
|
|
126
129
|
min: e.minSnapPoint.value
|
|
127
|
-
}), e.height.value =
|
|
128
|
-
|
|
130
|
+
}), e.height.value = ke(
|
|
131
|
+
l,
|
|
129
132
|
0,
|
|
130
133
|
e.maxSnapPoint.value,
|
|
131
|
-
|
|
132
|
-
), e.height.value <= e.minSnapPoint.value && (e.translateY.value = e.translateY.value +
|
|
134
|
+
we
|
|
135
|
+
), e.height.value <= e.minSnapPoint.value && (e.translateY.value = e.translateY.value + n.movementY);
|
|
133
136
|
}
|
|
134
|
-
},
|
|
137
|
+
}, M = (n) => {
|
|
135
138
|
if (h >= 2)
|
|
136
139
|
return;
|
|
137
|
-
const
|
|
140
|
+
const g = e.sheetScrollRef.value, b = g?.scrollTop === 0, w = n.clientY - v > 0, S = e.flattenedSnapPoints.value.length === 1, N = 0.5 > Math.abs(e.height.value - e.maxSnapPoint.value), R = (g?.scrollHeight ?? 0) > (g?.clientHeight ?? 0);
|
|
138
141
|
if (S) {
|
|
139
142
|
if (!e.expandOnContentDrag.value) {
|
|
140
|
-
|
|
143
|
+
a = !1;
|
|
141
144
|
return;
|
|
142
145
|
}
|
|
143
|
-
e.translateY.value === 0 && b && w && (
|
|
146
|
+
e.translateY.value === 0 && b && w && (a = !0), e.translateY.value === 0 && b && !w && (a = !1);
|
|
144
147
|
} else
|
|
145
|
-
|
|
146
|
-
d = !
|
|
147
|
-
},
|
|
148
|
-
if (!o.value || !e.sheetScrollRef.value || (Math.abs(
|
|
149
|
-
if (t.update(
|
|
150
|
-
e.canSwipeClose.value && (e.translateY.value =
|
|
148
|
+
a = !0, N && (w && b && (a = !0), !w && b && (a = !1), b || (a = !1));
|
|
149
|
+
d = !R, h++;
|
|
150
|
+
}, B = (n) => {
|
|
151
|
+
if (!o.value || !e.sheetScrollRef.value || (Math.abs(n.movementY) > 0 && P(), M(n), h <= 1)) return;
|
|
152
|
+
if (t.update(n.clientY), p(n.movementY), e.translateY.value > 0) {
|
|
153
|
+
e.canSwipeClose.value && (e.translateY.value = T(e.translateY.value + n.movementY, { min: 0 }));
|
|
151
154
|
return;
|
|
152
155
|
}
|
|
153
|
-
e.height.value =
|
|
156
|
+
e.height.value = T(e.height.value - n.movementY, {
|
|
154
157
|
min: e.minSnapPoint.value,
|
|
155
158
|
max: e.maxSnapPoint.value
|
|
156
|
-
}), !(e.flattenedSnapPoints.value.length === 1) && e.height.value === e.maxSnapPoint.value && (
|
|
159
|
+
}), !(e.flattenedSnapPoints.value.length === 1) && e.height.value === e.maxSnapPoint.value && (a = !1), e.height.value <= e.minSnapPoint.value && (e.translateY.value = T(e.translateY.value + n.movementY, {
|
|
157
160
|
min: 0,
|
|
158
161
|
...e.canSwipeClose.value === !1 ? { max: 0 } : {}
|
|
159
162
|
}));
|
|
160
|
-
},
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
163
|
+
}, z = () => {
|
|
164
|
+
const n = t.end();
|
|
165
|
+
if (n.isSwipe && n.direction === "down" && e.canSwipeClose.value && e.height.value <= e.minSnapPoint.value + at) {
|
|
163
166
|
e.onClose();
|
|
164
167
|
return;
|
|
165
168
|
}
|
|
166
169
|
if (e.canSwipeClose.value) {
|
|
167
|
-
const
|
|
170
|
+
const g = nt(
|
|
168
171
|
e.swipeCloseThreshold.value,
|
|
169
172
|
e.height.value
|
|
170
173
|
);
|
|
171
|
-
if (e.translateY.value >
|
|
174
|
+
if (e.translateY.value > g) {
|
|
172
175
|
e.onClose();
|
|
173
176
|
return;
|
|
174
177
|
}
|
|
175
178
|
}
|
|
176
|
-
if (
|
|
177
|
-
const
|
|
179
|
+
if (n.isSwipe && e.flattenedSnapPoints.value.length > 1) {
|
|
180
|
+
const g = [...e.flattenedSnapPoints.value].sort((w, S) => w - S);
|
|
178
181
|
let b = e.closestSnapPointIndex.value;
|
|
179
|
-
if (
|
|
180
|
-
const w =
|
|
182
|
+
if (n.direction === "up") {
|
|
183
|
+
const w = g.find((S) => S > e.height.value + 1);
|
|
181
184
|
w !== void 0 && (b = e.flattenedSnapPoints.value.indexOf(w));
|
|
182
|
-
} else if (
|
|
183
|
-
const w = [...
|
|
185
|
+
} else if (n.direction === "down") {
|
|
186
|
+
const w = [...g].reverse().find((S) => S < e.height.value - 1);
|
|
184
187
|
w !== void 0 && (b = e.flattenedSnapPoints.value.indexOf(w));
|
|
185
188
|
}
|
|
186
189
|
e.onSnapToPoint(b), e.translateY.value = 0;
|
|
@@ -191,100 +194,101 @@ const ot = (e) => {
|
|
|
191
194
|
return {
|
|
192
195
|
isDragging: o,
|
|
193
196
|
handleSheetScroll: C,
|
|
194
|
-
handlePointerDown:
|
|
195
|
-
handleContentPointerDown:
|
|
196
|
-
handlePointerMove:
|
|
197
|
-
handleContentPointerMove:
|
|
198
|
-
handleLostPointerCapture: (
|
|
199
|
-
o.value = !1,
|
|
197
|
+
handlePointerDown: m,
|
|
198
|
+
handleContentPointerDown: k,
|
|
199
|
+
handlePointerMove: E,
|
|
200
|
+
handleContentPointerMove: B,
|
|
201
|
+
handleLostPointerCapture: (n, g) => {
|
|
202
|
+
o.value = !1, g === "header" ? e.sheetHeaderRef.value?.releasePointerCapture(n.pointerId) : g === "footer" ? e.sheetFooterRef.value?.releasePointerCapture(n.pointerId) : e.sheetContentRef.value?.releasePointerCapture(n.pointerId), h = 0, d = !1, i = !1, z();
|
|
200
203
|
},
|
|
201
|
-
handleTouchStart: (
|
|
202
|
-
|
|
204
|
+
handleTouchStart: (n) => {
|
|
205
|
+
d && n.preventDefault();
|
|
203
206
|
}
|
|
204
207
|
};
|
|
205
208
|
};
|
|
206
|
-
function
|
|
207
|
-
const { sheetRef: t, backdropRef: o, blocking:
|
|
209
|
+
function st(e) {
|
|
210
|
+
const { sheetRef: t, backdropRef: o, blocking: a, onEscape: l } = e, u = H(null), i = We([t, o], {
|
|
208
211
|
immediate: !1,
|
|
209
212
|
fallbackFocus: () => t.value || document.body
|
|
210
|
-
}),
|
|
211
|
-
|
|
213
|
+
}), v = (m) => {
|
|
214
|
+
m.key === "Escape" && l();
|
|
212
215
|
}, d = () => {
|
|
213
|
-
t.value && (
|
|
214
|
-
for (const
|
|
215
|
-
|
|
216
|
-
}),
|
|
216
|
+
t.value && (u.value = new MutationObserver((m) => {
|
|
217
|
+
for (const k of m)
|
|
218
|
+
k.type === "attributes" && k.attributeName === "aria-expanded" && (k.target.getAttribute("aria-expanded") === "true" ? i.pause() : t.value?.querySelector('[aria-expanded="true"]') || i.unpause());
|
|
219
|
+
}), u.value.observe(t.value, {
|
|
217
220
|
attributes: !0,
|
|
218
221
|
attributeFilter: ["aria-expanded"],
|
|
219
222
|
subtree: !0
|
|
220
223
|
}));
|
|
221
224
|
}, h = () => {
|
|
222
|
-
|
|
225
|
+
u.value && (u.value.disconnect(), u.value = null);
|
|
223
226
|
};
|
|
224
227
|
return {
|
|
225
228
|
activate: () => {
|
|
226
|
-
|
|
229
|
+
a.value && (i.activate(), d()), window.addEventListener("keydown", v);
|
|
227
230
|
},
|
|
228
231
|
deactivate: () => {
|
|
229
|
-
window.removeEventListener("keydown",
|
|
232
|
+
window.removeEventListener("keydown", v), h(), a.value && i.deactivate();
|
|
230
233
|
},
|
|
231
234
|
cleanup: () => {
|
|
232
|
-
h(),
|
|
235
|
+
h(), i.deactivate();
|
|
233
236
|
}
|
|
234
237
|
};
|
|
235
238
|
}
|
|
236
|
-
function
|
|
237
|
-
const { blocking: t } = e, o =
|
|
239
|
+
function ut(e) {
|
|
240
|
+
const { blocking: t } = e, o = qe(document.documentElement), a = () => {
|
|
238
241
|
o.value = !0;
|
|
239
|
-
},
|
|
242
|
+
}, l = () => {
|
|
240
243
|
o.value = !1;
|
|
241
244
|
};
|
|
242
245
|
return {
|
|
243
|
-
lock:
|
|
244
|
-
unlock:
|
|
246
|
+
lock: a,
|
|
247
|
+
unlock: l,
|
|
245
248
|
lockIfBlocking: () => {
|
|
246
|
-
t.value &&
|
|
249
|
+
t.value && a();
|
|
247
250
|
},
|
|
248
251
|
unlockIfBlocking: () => {
|
|
249
|
-
t.value &&
|
|
252
|
+
t.value && l();
|
|
250
253
|
},
|
|
251
254
|
touchStartHandler: () => {
|
|
252
|
-
t.value ||
|
|
255
|
+
t.value || a();
|
|
253
256
|
},
|
|
254
257
|
touchEndHandler: () => {
|
|
255
|
-
t.value ||
|
|
258
|
+
t.value || l();
|
|
256
259
|
}
|
|
257
260
|
};
|
|
258
261
|
}
|
|
259
|
-
function
|
|
262
|
+
function Te(e, t) {
|
|
260
263
|
const o = parseFloat(e);
|
|
261
264
|
return t * o / 100;
|
|
262
265
|
}
|
|
263
|
-
function
|
|
264
|
-
const
|
|
265
|
-
const d =
|
|
266
|
-
(h,
|
|
266
|
+
function it(e, t, o) {
|
|
267
|
+
const a = H(0), l = D(() => e.value.map((d) => typeof d == "string" ? Te(d, o.value) : d)), u = D(() => Math.min(...l.value)), i = D(() => Math.max(...l.value)), v = D(() => {
|
|
268
|
+
const d = l.value.reduce(
|
|
269
|
+
(h, p) => Math.abs(p - t.value) < Math.abs(h - t.value) ? p : h
|
|
267
270
|
);
|
|
268
|
-
return
|
|
271
|
+
return l.value.indexOf(d);
|
|
269
272
|
});
|
|
270
273
|
return {
|
|
271
|
-
currentSnapPointIndex:
|
|
272
|
-
flattenedSnapPoints:
|
|
273
|
-
minSnapPoint:
|
|
274
|
-
maxSnapPoint:
|
|
275
|
-
closestSnapPointIndex:
|
|
274
|
+
currentSnapPointIndex: a,
|
|
275
|
+
flattenedSnapPoints: l,
|
|
276
|
+
minSnapPoint: u,
|
|
277
|
+
maxSnapPoint: i,
|
|
278
|
+
closestSnapPointIndex: v
|
|
276
279
|
};
|
|
277
280
|
}
|
|
278
|
-
function
|
|
279
|
-
return typeof e == "number" ?
|
|
281
|
+
function xe(e, t) {
|
|
282
|
+
return typeof e == "number" ? T(e, { max: t }) : Te(e, t);
|
|
280
283
|
}
|
|
281
|
-
const
|
|
284
|
+
const ct = ["data-vsbs-shadow", "data-vsbs-sheet-show"], dt = /* @__PURE__ */ Ae({
|
|
282
285
|
__name: "BottomSheet",
|
|
283
286
|
props: {
|
|
284
287
|
duration: { default: 250 },
|
|
285
288
|
snapPoints: {},
|
|
286
289
|
initialSnapPoint: {},
|
|
287
290
|
blocking: { type: Boolean, default: !0 },
|
|
291
|
+
forceMount: { type: Boolean, default: !1 },
|
|
288
292
|
canSwipeClose: { type: Boolean, default: !0 },
|
|
289
293
|
swipeCloseThreshold: {},
|
|
290
294
|
canBackdropClose: { type: Boolean, default: !0 },
|
|
@@ -298,146 +302,146 @@ const it = ["data-vsbs-shadow", "data-vsbs-sheet-show"], ut = /* @__PURE__ */ Be
|
|
|
298
302
|
},
|
|
299
303
|
emits: ["opened", "opening-started", "closed", "closing-started", "dragging-up", "dragging-down", "snapped", "instinctHeight", "update:modelValue"],
|
|
300
304
|
setup(e, { expose: t, emit: o }) {
|
|
301
|
-
|
|
302
|
-
|
|
305
|
+
Fe((s) => ({
|
|
306
|
+
v5acd7ef8: b.value
|
|
303
307
|
}));
|
|
304
|
-
const
|
|
308
|
+
const a = e, l = o, u = Ke(a, "modelValue", l, {
|
|
305
309
|
passive: !0
|
|
306
310
|
});
|
|
307
|
-
A(
|
|
308
|
-
s ? j() :
|
|
309
|
-
}), A(
|
|
311
|
+
A(u, (s) => {
|
|
312
|
+
s ? j() : L();
|
|
313
|
+
}), A(u, async (s) => {
|
|
310
314
|
if (!s) {
|
|
311
315
|
C.value = 0;
|
|
312
316
|
return;
|
|
313
317
|
}
|
|
314
|
-
await _(),
|
|
315
|
-
}),
|
|
316
|
-
|
|
318
|
+
await _(), Y();
|
|
319
|
+
}), $e(() => {
|
|
320
|
+
He(), u.value && j();
|
|
317
321
|
});
|
|
318
|
-
const
|
|
319
|
-
Math.ceil(
|
|
320
|
-
{ max:
|
|
321
|
-
)), ae = (s,
|
|
322
|
-
|
|
323
|
-
},
|
|
324
|
-
max:
|
|
325
|
-
})), b =
|
|
326
|
-
flattenedSnapPoints:
|
|
327
|
-
currentSnapPointIndex:
|
|
328
|
-
closestSnapPointIndex:
|
|
322
|
+
const i = y(null), v = y(null), d = y(null), h = y(null), p = y(null), P = y(null), C = H(0), { height: m } = Ue(), { height: k } = U(i), { height: E } = U(v), { height: M } = U(p), { height: B } = U(d), z = D(() => T(
|
|
323
|
+
Math.ceil(M.value + E.value + B.value),
|
|
324
|
+
{ max: m.value }
|
|
325
|
+
)), ae = (s, r, c) => {
|
|
326
|
+
E.value = s, M.value = r, B.value = c;
|
|
327
|
+
}, x = H(0), n = H(0), g = D(() => T(x.value + C.value, {
|
|
328
|
+
max: m.value
|
|
329
|
+
})), b = D(() => a.duration + "ms"), w = F(() => a.snapPoints), S = D(() => w.value ?? [z.value]), {
|
|
330
|
+
flattenedSnapPoints: N,
|
|
331
|
+
currentSnapPointIndex: R,
|
|
332
|
+
closestSnapPointIndex: Ee,
|
|
329
333
|
minSnapPoint: W,
|
|
330
|
-
maxSnapPoint:
|
|
331
|
-
} =
|
|
332
|
-
sheetRef:
|
|
334
|
+
maxSnapPoint: Ye
|
|
335
|
+
} = it(S, x, m), oe = F(() => a.blocking), De = F(() => a.canSwipeClose), Me = F(() => a.swipeCloseThreshold), Re = F(() => a.expandOnContentDrag), I = ut({ blocking: oe }), G = st({
|
|
336
|
+
sheetRef: i,
|
|
333
337
|
backdropRef: P,
|
|
334
338
|
blocking: oe,
|
|
335
|
-
onEscape: () =>
|
|
336
|
-
}), Q =
|
|
337
|
-
|
|
338
|
-
},
|
|
339
|
+
onEscape: () => L()
|
|
340
|
+
}), Q = y(!1), X = y(!1), Ie = () => {
|
|
341
|
+
a.canBackdropClose && L();
|
|
342
|
+
}, Y = () => {
|
|
339
343
|
const s = window.visualViewport;
|
|
340
|
-
if (!s || !
|
|
344
|
+
if (!s || !u.value) {
|
|
341
345
|
C.value = 0;
|
|
342
346
|
return;
|
|
343
347
|
}
|
|
344
|
-
const
|
|
345
|
-
C.value = Math.round(
|
|
348
|
+
const r = Math.max(0, window.innerHeight - s.height - s.offsetTop);
|
|
349
|
+
C.value = Math.round(r);
|
|
346
350
|
};
|
|
347
351
|
let re = null;
|
|
348
|
-
const
|
|
352
|
+
const He = () => {
|
|
349
353
|
const s = window.visualViewport;
|
|
350
|
-
s && (s.addEventListener("resize",
|
|
351
|
-
s.removeEventListener("resize",
|
|
354
|
+
s && (s.addEventListener("resize", Y), s.addEventListener("scroll", Y), window.addEventListener("resize", Y), re = () => {
|
|
355
|
+
s.removeEventListener("resize", Y), s.removeEventListener("scroll", Y), window.removeEventListener("resize", Y);
|
|
352
356
|
});
|
|
353
357
|
}, j = async () => {
|
|
354
358
|
if (Q.value) return;
|
|
355
|
-
|
|
356
|
-
const s =
|
|
357
|
-
|
|
358
|
-
const
|
|
359
|
+
u.value = !0, Q.value = !0, l("opening-started"), I.lockIfBlocking(), await _(), Y();
|
|
360
|
+
const s = i.value;
|
|
361
|
+
k.value = s.getBoundingClientRect().height;
|
|
362
|
+
const r = s.querySelector("[data-vsbs-content]"), c = s.querySelector("[data-vsbs-header]"), K = s.querySelector("[data-vsbs-footer]");
|
|
359
363
|
if (ae(
|
|
360
364
|
c.getBoundingClientRect().height,
|
|
361
|
-
|
|
365
|
+
r.getBoundingClientRect().height,
|
|
362
366
|
K.getBoundingClientRect().height
|
|
363
|
-
), await _(),
|
|
367
|
+
), await _(), R.value = N.value.findIndex(
|
|
364
368
|
(O) => O === W.value
|
|
365
|
-
),
|
|
366
|
-
const O =
|
|
369
|
+
), a.initialSnapPoint !== void 0) {
|
|
370
|
+
const O = a.initialSnapPoint;
|
|
367
371
|
if (O < 0 || O >= S.value.length) {
|
|
368
372
|
console.warn("Index out of bounds");
|
|
369
373
|
return;
|
|
370
374
|
}
|
|
371
375
|
const de = S.value[O];
|
|
372
376
|
if (!de) return;
|
|
373
|
-
|
|
377
|
+
x.value = xe(de, m.value);
|
|
374
378
|
} else
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
},
|
|
379
|
+
x.value = T(W.value, { max: m.value });
|
|
380
|
+
n.value = x.value, requestAnimationFrame(() => {
|
|
381
|
+
n.value = 0, a.blocking && setTimeout(() => {
|
|
382
|
+
u.value && (l("opened"), G.activate());
|
|
383
|
+
}, a.duration);
|
|
380
384
|
}), Q.value = !1;
|
|
381
|
-
},
|
|
382
|
-
X.value || (
|
|
383
|
-
|
|
384
|
-
},
|
|
385
|
+
}, L = () => {
|
|
386
|
+
X.value || (u.value = !1, X.value = !0, l("closing-started"), I.unlockIfBlocking(), G.deactivate(), n.value = x.value, setTimeout(() => {
|
|
387
|
+
l("closed"), X.value = !1;
|
|
388
|
+
}, a.duration));
|
|
385
389
|
}, J = (s) => {
|
|
386
390
|
if (!S.value) return;
|
|
387
391
|
if (s < 0 || s >= S.value.length) {
|
|
388
392
|
console.warn("Index out of bounds");
|
|
389
393
|
return;
|
|
390
394
|
}
|
|
391
|
-
|
|
392
|
-
const
|
|
393
|
-
|
|
395
|
+
R.value = s;
|
|
396
|
+
const r = S.value[s];
|
|
397
|
+
r && (x.value = xe(r, m.value), l("snapped", S.value.indexOf(r)));
|
|
394
398
|
}, {
|
|
395
|
-
isDragging:
|
|
399
|
+
isDragging: Be,
|
|
396
400
|
handleSheetScroll: le,
|
|
397
401
|
handlePointerDown: se,
|
|
398
|
-
handleContentPointerDown:
|
|
402
|
+
handleContentPointerDown: ue,
|
|
399
403
|
handlePointerMove: q,
|
|
400
|
-
handleContentPointerMove:
|
|
404
|
+
handleContentPointerMove: ie,
|
|
401
405
|
handleLostPointerCapture: Z,
|
|
402
406
|
handleTouchStart: ce
|
|
403
|
-
} =
|
|
404
|
-
sheetHeaderRef:
|
|
407
|
+
} = lt({
|
|
408
|
+
sheetHeaderRef: v,
|
|
405
409
|
sheetFooterRef: d,
|
|
406
|
-
sheetContentRef:
|
|
410
|
+
sheetContentRef: p,
|
|
407
411
|
sheetScrollRef: h,
|
|
408
|
-
height:
|
|
409
|
-
translateY:
|
|
412
|
+
height: x,
|
|
413
|
+
translateY: n,
|
|
410
414
|
minSnapPoint: W,
|
|
411
|
-
maxSnapPoint:
|
|
412
|
-
closestSnapPointIndex:
|
|
413
|
-
flattenedSnapPoints:
|
|
414
|
-
canSwipeClose:
|
|
415
|
-
expandOnContentDrag:
|
|
415
|
+
maxSnapPoint: Ye,
|
|
416
|
+
closestSnapPointIndex: Ee,
|
|
417
|
+
flattenedSnapPoints: N,
|
|
418
|
+
canSwipeClose: De,
|
|
419
|
+
expandOnContentDrag: Re,
|
|
416
420
|
swipeCloseThreshold: Me,
|
|
417
|
-
onClose:
|
|
421
|
+
onClose: L,
|
|
418
422
|
onSnapToPoint: J,
|
|
419
|
-
onDraggingUp: () =>
|
|
420
|
-
onDraggingDown: () =>
|
|
421
|
-
}),
|
|
422
|
-
minQuietPeriodMs:
|
|
423
|
-
reducer: (s,
|
|
423
|
+
onDraggingUp: () => l("dragging-up"),
|
|
424
|
+
onDraggingDown: () => l("dragging-down")
|
|
425
|
+
}), Le = Je((s) => J(s), {
|
|
426
|
+
minQuietPeriodMs: a.duration,
|
|
427
|
+
reducer: (s, r) => r
|
|
424
428
|
});
|
|
425
|
-
A(S, (s,
|
|
426
|
-
if (
|
|
427
|
-
const c = s[
|
|
428
|
-
!c || typeof c == "string" || !K || typeof K == "string" || (
|
|
429
|
-
}), A(
|
|
430
|
-
|
|
431
|
-
}), A(
|
|
432
|
-
|
|
433
|
-
}),
|
|
429
|
+
A(S, (s, r) => {
|
|
430
|
+
if (u.value === !1 || !s || !r) return;
|
|
431
|
+
const c = s[R.value], K = r[R.value];
|
|
432
|
+
!c || typeof c == "string" || !K || typeof K == "string" || (x.value = T(c, { max: m.value }));
|
|
433
|
+
}), A(m, () => {
|
|
434
|
+
Le.call(R.value);
|
|
435
|
+
}), A(z, (s) => {
|
|
436
|
+
l("instinctHeight", s);
|
|
437
|
+
}), Ve(() => {
|
|
434
438
|
re?.(), G.cleanup();
|
|
435
439
|
});
|
|
436
|
-
const
|
|
437
|
-
const
|
|
438
|
-
|
|
440
|
+
const Oe = (s) => {
|
|
441
|
+
const r = s;
|
|
442
|
+
r.style.transition = `transform ${a.duration}ms ease, height ${a.duration}ms ease`, r.style.transform = `translateY(${g.value}px)`;
|
|
439
443
|
};
|
|
440
|
-
return t({ open: j, close:
|
|
444
|
+
return t({ open: j, close: L, snapToPoint: J }), (s, r) => ($(), ee(ze, null, [
|
|
441
445
|
($(), fe(ve, {
|
|
442
446
|
to: e.teleportTo,
|
|
443
447
|
defer: e.teleportDefer
|
|
@@ -445,13 +449,15 @@ const it = ["data-vsbs-shadow", "data-vsbs-sheet-show"], ut = /* @__PURE__ */ Be
|
|
|
445
449
|
V("div", null, [
|
|
446
450
|
he(ge, { name: "vsbs-backdrop" }, {
|
|
447
451
|
default: me(() => [
|
|
448
|
-
|
|
452
|
+
e.forceMount || f(u) && e.blocking ? pe(($(), ee("div", {
|
|
449
453
|
key: 0,
|
|
450
454
|
ref_key: "backdrop",
|
|
451
455
|
ref: P,
|
|
452
456
|
"data-vsbs-backdrop": "",
|
|
453
|
-
onClick:
|
|
454
|
-
}, null, 512))
|
|
457
|
+
onClick: r[0] || (r[0] = (c) => Ie())
|
|
458
|
+
}, null, 512)), [
|
|
459
|
+
[Se, f(u) && e.blocking]
|
|
460
|
+
]) : be("", !0)
|
|
455
461
|
]),
|
|
456
462
|
_: 1
|
|
457
463
|
})
|
|
@@ -463,38 +469,38 @@ const it = ["data-vsbs-shadow", "data-vsbs-sheet-show"], ut = /* @__PURE__ */ Be
|
|
|
463
469
|
}, [
|
|
464
470
|
he(ge, {
|
|
465
471
|
name: "vsbs-sheet",
|
|
466
|
-
onLeave:
|
|
472
|
+
onLeave: Oe
|
|
467
473
|
}, {
|
|
468
474
|
default: me(() => [
|
|
469
|
-
|
|
475
|
+
e.forceMount || f(u) ? pe(($(), ee("div", {
|
|
470
476
|
key: 0,
|
|
471
477
|
ref_key: "sheet",
|
|
472
|
-
ref:
|
|
473
|
-
style:
|
|
474
|
-
transform: `translateY(${
|
|
475
|
-
height: `${
|
|
478
|
+
ref: i,
|
|
479
|
+
style: Ne({
|
|
480
|
+
transform: `translateY(${n.value}px)`,
|
|
481
|
+
height: `${g.value}px`,
|
|
476
482
|
paddingBottom: `${C.value}px`,
|
|
477
|
-
transition:
|
|
483
|
+
transition: f(Be) ? "none" : `transform ${e.duration}ms ease, height ${e.duration}ms ease`
|
|
478
484
|
}),
|
|
479
485
|
"data-vsbs-shadow": !e.blocking,
|
|
480
|
-
"data-vsbs-sheet-show":
|
|
486
|
+
"data-vsbs-sheet-show": f(u),
|
|
481
487
|
"aria-modal": "true",
|
|
482
488
|
"data-vsbs-sheet": "",
|
|
483
489
|
tabindex: "-1",
|
|
484
|
-
onTouchstart:
|
|
485
|
-
(...c) =>
|
|
486
|
-
onTouchend:
|
|
487
|
-
(...c) =>
|
|
490
|
+
onTouchstart: r[12] || (r[12] = //@ts-ignore
|
|
491
|
+
(...c) => f(I).touchStartHandler && f(I).touchStartHandler(...c)),
|
|
492
|
+
onTouchend: r[13] || (r[13] = //@ts-ignore
|
|
493
|
+
(...c) => f(I).touchEndHandler && f(I).touchEndHandler(...c))
|
|
488
494
|
}, [
|
|
489
495
|
V("div", {
|
|
490
496
|
ref_key: "sheetHeader",
|
|
491
|
-
ref:
|
|
497
|
+
ref: v,
|
|
492
498
|
"data-vsbs-header": "",
|
|
493
499
|
class: te(e.headerClass),
|
|
494
|
-
onPointerdown:
|
|
495
|
-
onPointermove:
|
|
496
|
-
(...c) =>
|
|
497
|
-
onLostpointercapture:
|
|
500
|
+
onPointerdown: r[1] || (r[1] = (c) => f(se)(c, "header")),
|
|
501
|
+
onPointermove: r[2] || (r[2] = //@ts-ignore
|
|
502
|
+
(...c) => f(q) && f(q)(...c)),
|
|
503
|
+
onLostpointercapture: r[3] || (r[3] = (c) => f(Z)(c, "header"))
|
|
498
504
|
}, [
|
|
499
505
|
ne(s.$slots, "header", {}, void 0, !0)
|
|
500
506
|
], 34),
|
|
@@ -502,19 +508,19 @@ const it = ["data-vsbs-shadow", "data-vsbs-sheet-show"], ut = /* @__PURE__ */ Be
|
|
|
502
508
|
ref_key: "sheetScroll",
|
|
503
509
|
ref: h,
|
|
504
510
|
"data-vsbs-scroll": "",
|
|
505
|
-
onTouchstart:
|
|
506
|
-
(...c) =>
|
|
507
|
-
onTouchmove:
|
|
508
|
-
(...c) =>
|
|
509
|
-
onPointerdown:
|
|
510
|
-
(...c) =>
|
|
511
|
-
onPointermove:
|
|
512
|
-
(...c) =>
|
|
513
|
-
onLostpointercapture:
|
|
511
|
+
onTouchstart: r[4] || (r[4] = //@ts-ignore
|
|
512
|
+
(...c) => f(ce) && f(ce)(...c)),
|
|
513
|
+
onTouchmove: r[5] || (r[5] = //@ts-ignore
|
|
514
|
+
(...c) => f(le) && f(le)(...c)),
|
|
515
|
+
onPointerdown: r[6] || (r[6] = //@ts-ignore
|
|
516
|
+
(...c) => f(ue) && f(ue)(...c)),
|
|
517
|
+
onPointermove: r[7] || (r[7] = //@ts-ignore
|
|
518
|
+
(...c) => f(ie) && f(ie)(...c)),
|
|
519
|
+
onLostpointercapture: r[8] || (r[8] = (c) => f(Z)(c, "content"))
|
|
514
520
|
}, [
|
|
515
521
|
V("div", {
|
|
516
522
|
ref_key: "sheetContent",
|
|
517
|
-
ref:
|
|
523
|
+
ref: p,
|
|
518
524
|
"data-vsbs-content": "",
|
|
519
525
|
class: te(e.contentClass)
|
|
520
526
|
}, [
|
|
@@ -526,26 +532,28 @@ const it = ["data-vsbs-shadow", "data-vsbs-sheet-show"], ut = /* @__PURE__ */ Be
|
|
|
526
532
|
ref: d,
|
|
527
533
|
"data-vsbs-footer": "",
|
|
528
534
|
class: te(e.footerClass),
|
|
529
|
-
onPointerdown:
|
|
530
|
-
onPointermove:
|
|
531
|
-
(...c) =>
|
|
532
|
-
onLostpointercapture:
|
|
535
|
+
onPointerdown: r[9] || (r[9] = (c) => f(se)(c, "footer")),
|
|
536
|
+
onPointermove: r[10] || (r[10] = //@ts-ignore
|
|
537
|
+
(...c) => f(q) && f(q)(...c)),
|
|
538
|
+
onLostpointercapture: r[11] || (r[11] = (c) => f(Z)(c, "footer"))
|
|
533
539
|
}, [
|
|
534
540
|
ne(s.$slots, "footer", {}, void 0, !0)
|
|
535
541
|
], 34)
|
|
536
|
-
], 44,
|
|
542
|
+
], 44, ct)), [
|
|
543
|
+
[Se, f(u)]
|
|
544
|
+
]) : be("", !0)
|
|
537
545
|
]),
|
|
538
546
|
_: 3
|
|
539
547
|
})
|
|
540
548
|
], 8, ["to", "defer"]))
|
|
541
549
|
], 64));
|
|
542
550
|
}
|
|
543
|
-
}),
|
|
551
|
+
}), ft = (e, t) => {
|
|
544
552
|
const o = e.__vccOpts || e;
|
|
545
|
-
for (const [
|
|
546
|
-
o[
|
|
553
|
+
for (const [a, l] of t)
|
|
554
|
+
o[a] = l;
|
|
547
555
|
return o;
|
|
548
|
-
},
|
|
556
|
+
}, mt = /* @__PURE__ */ ft(dt, [["__scopeId", "data-v-1fe5991a"]]);
|
|
549
557
|
export {
|
|
550
|
-
|
|
558
|
+
mt as default
|
|
551
559
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-vsbs-backdrop][data-v-
|
|
1
|
+
[data-vsbs-backdrop][data-v-1fe5991a]{background-color:var(--vsbs-backdrop-bg, rgba(0, 0, 0, .5));inset:0;pointer-events:auto;position:fixed;-webkit-user-select:none;user-select:none;will-change:opacity;--vsbs-duration: var(--v5acd7ef8)}[data-vsbs-shadow=true][data-v-1fe5991a]:before{content:"";z-index:-1;position:absolute;top:0;height:100lvh;width:100%;border-radius:var(--vsbs-border-radius, 16px);box-shadow:0 -5px 60px 0 var(--vsbs-shadow-color, rgba(89, 89, 89, .2))}[data-vsbs-sheet][data-v-1fe5991a]{background-color:var(--vsbs-background, #fff);box-sizing:border-box;border-top-left-radius:var(--vsbs-border-radius, 16px);border-top-right-radius:var(--vsbs-border-radius, 16px);border-right:1px solid var(--vsbs-outer-border-color, transparent);border-left:1px solid var(--vsbs-outer-border-color, transparent);bottom:0;display:flex;flex-direction:column;left:0;margin-left:auto;margin-right:auto;max-width:var(--vsbs-max-width, 640px);pointer-events:all;position:fixed;right:0;width:100%;will-change:height,transform}[data-vsbs-sheet-show=true][data-v-1fe5991a]{visibility:visible}[data-vsbs-header][data-v-1fe5991a]{touch-action:none;box-shadow:0 1px 0 var(--vsbs-border-color, rgba(46, 59, 66, .125));flex-shrink:0;padding:20px var(--vsbs-padding-x, 16px) 8px;-webkit-user-select:none;user-select:none;z-index:3;border-top-left-radius:var(--vsbs-border-radius, 16px);border-top-right-radius:var(--vsbs-border-radius, 16px);border-top:1px solid var(--vsbs-outer-border-color, transparent)}[data-vsbs-header][data-v-1fe5991a]:before{background-color:var(--vsbs-handle-background, rgba(0, 0, 0, .28));border-radius:2px;content:"";display:block;height:4px;left:50%;position:absolute;top:8px;transform:translate(-50%);width:36px}[data-vsbs-header][data-v-1fe5991a]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-1fe5991a]{touch-action:none;box-shadow:0 -1px 0 var(--vsbs-border-color, rgba(46, 59, 66, .125));flex-grow:0;flex-shrink:0;padding:16px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}[data-vsbs-footer][data-v-1fe5991a]:empty{display:none}[data-vsbs-scroll][data-v-1fe5991a]{flex-grow:1;overflow-y:auto;overscroll-behavior:none}[data-vsbs-content][data-v-1fe5991a]{display:grid;padding:8px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}.vsbs-backdrop-enter-active[data-v-1fe5991a],.vsbs-backdrop-leave-active[data-v-1fe5991a]{transition:opacity var(--vsbs-duration) ease}.vsbs-backdrop-enter-from[data-v-1fe5991a],.vsbs-backdrop-leave-to[data-v-1fe5991a]{opacity:0}
|
package/dist/types.d.ts
CHANGED