@douxcode/vue-spring-bottom-sheet 1.1.4 → 1.2.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/README.md +5 -5
- package/dist/BottomSheet.d.ts +2 -0
- package/dist/index.mjs +167 -148
- package/dist/style.css +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install @douxcode/vue-spring-bottom-sheet
|
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
bun
|
|
16
|
+
bun install @douxcode/vue-spring-bottom-sheet
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
# Getting started
|
|
@@ -22,8 +22,8 @@ bun i @douxcode/vue-spring-bottom-sheet
|
|
|
22
22
|
|
|
23
23
|
```vue
|
|
24
24
|
<script setup>
|
|
25
|
-
import BottomSheet from '@douxcode/vue-bottom-sheet'
|
|
26
|
-
import '@douxcode/vue-bottom-sheet/dist/style.css'
|
|
25
|
+
import BottomSheet from '@douxcode/vue-spring-bottom-sheet'
|
|
26
|
+
import '@douxcode/vue-spring-bottom-sheet/dist/style.css'
|
|
27
27
|
import { ref } from 'vue'
|
|
28
28
|
|
|
29
29
|
const bottomSheet = ref(null)
|
|
@@ -46,8 +46,8 @@ const close = () => {
|
|
|
46
46
|
|
|
47
47
|
```vue
|
|
48
48
|
<script setup lang="ts">
|
|
49
|
-
import BottomSheet from '@douxcode/vue-bottom-sheet'
|
|
50
|
-
import '@douxcode/vue-bottom-sheet/dist/style.css'
|
|
49
|
+
import BottomSheet from '@douxcode/vue-spring-bottom-sheet'
|
|
50
|
+
import '@douxcode/vue-spring-bottom-sheet/dist/style.css'
|
|
51
51
|
import { ref } from 'vue'
|
|
52
52
|
|
|
53
53
|
const bottomSheet = ref<InstanceType<typeof BottomSheet>>()
|
package/dist/BottomSheet.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
interface IProps {
|
|
2
|
+
duration?: number;
|
|
2
3
|
snapPoints?: number[];
|
|
3
4
|
defaultBreakpoint?: number;
|
|
4
5
|
blocking?: boolean;
|
|
@@ -45,6 +46,7 @@ declare const __VLS_component: import('vue').DefineComponent<IProps, {
|
|
|
45
46
|
onMinHeight?: ((minSheetHeight: number) => any) | undefined;
|
|
46
47
|
onMaxHeight?: ((maxSheetHeight: number) => any) | undefined;
|
|
47
48
|
}>, {
|
|
49
|
+
duration: number;
|
|
48
50
|
blocking: boolean;
|
|
49
51
|
canSwipeClose: boolean;
|
|
50
52
|
canBackdropClose: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -1,69 +1,70 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { useWindowSize as
|
|
3
|
-
import { useGesture as
|
|
4
|
-
import { useMotionProperties as
|
|
5
|
-
import { useFocusTrap as
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
return a === void 0 ?
|
|
1
|
+
import { computed as y, defineComponent as ve, useCssVars as de, ref as p, toRefs as ce, watch as J, nextTick as A, onMounted as fe, openBlock as ge, createBlock as pe, Teleport as he, createElementVNode as b, createVNode as me, Transition as be, withCtx as ye, withDirectives as we, vShow as Se, renderSlot as R } from "vue";
|
|
2
|
+
import { useWindowSize as ke, useElementBounding as I, useScrollLock as Z } from "@vueuse/core";
|
|
3
|
+
import { useGesture as z, rubberbandIfOutOfBounds as N } from "@vueuse/gesture";
|
|
4
|
+
import { useMotionProperties as Te, useMotionTransitions as Ce, useMotionControls as De } from "@vueuse/motion";
|
|
5
|
+
import { useFocusTrap as xe } from "@vueuse/integrations/useFocusTrap";
|
|
6
|
+
function Me(o, u, a) {
|
|
7
|
+
let e = (n) => o(n, ...u);
|
|
8
|
+
return a === void 0 ? e : Object.assign(e, { lazy: a, lazyArgs: u });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
13
|
-
if (
|
|
10
|
+
function _e(o, u, a) {
|
|
11
|
+
let e = o.length - u.length;
|
|
12
|
+
if (e === 0) return o(...u);
|
|
13
|
+
if (e === 1) return Me(o, u, a);
|
|
14
14
|
throw new Error("Wrong number of arguments");
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
let s, r, f,
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
clearTimeout(r), r = void 0, s === void 0 &&
|
|
22
|
-
},
|
|
23
|
-
clearTimeout(s), s = void 0,
|
|
16
|
+
function Be(o, { triggerAt: u = "end", minQuietPeriodMs: a, maxBurstDurationMs: e, minGapMs: n, reducer: v = He }) {
|
|
17
|
+
let s, r, f, w, C = () => {
|
|
18
|
+
let d = f;
|
|
19
|
+
d !== void 0 && (f = void 0, o(d), n !== void 0 && (r = setTimeout(O, n)));
|
|
20
|
+
}, O = () => {
|
|
21
|
+
clearTimeout(r), r = void 0, s === void 0 && C();
|
|
22
|
+
}, S = () => {
|
|
23
|
+
clearTimeout(s), s = void 0, w = void 0, r === void 0 && C();
|
|
24
24
|
};
|
|
25
|
-
return { call: (...
|
|
25
|
+
return { call: (...d) => {
|
|
26
26
|
let g = s === void 0 && r === void 0;
|
|
27
|
-
if ((u !== "start" || g) && (f =
|
|
28
|
-
if (a !== void 0 ||
|
|
27
|
+
if ((u !== "start" || g) && (f = v(f, ...d)), !(s === void 0 && !g)) {
|
|
28
|
+
if (a !== void 0 || e !== void 0 || n === void 0) {
|
|
29
29
|
clearTimeout(s);
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
let W =
|
|
33
|
-
s = setTimeout(
|
|
30
|
+
let h = Date.now();
|
|
31
|
+
w ?? (w = h);
|
|
32
|
+
let W = e === void 0 ? a ?? 0 : Math.min(a ?? e, e - (h - w));
|
|
33
|
+
s = setTimeout(S, W);
|
|
34
34
|
}
|
|
35
|
-
u !== "end" && g &&
|
|
35
|
+
u !== "end" && g && C();
|
|
36
36
|
}
|
|
37
37
|
}, cancel: () => {
|
|
38
|
-
clearTimeout(s), s = void 0,
|
|
38
|
+
clearTimeout(s), s = void 0, w = void 0, clearTimeout(r), r = void 0, f = void 0;
|
|
39
39
|
}, flush: () => {
|
|
40
|
-
|
|
40
|
+
S(), O();
|
|
41
41
|
}, get isIdle() {
|
|
42
42
|
return s === void 0 && r === void 0;
|
|
43
43
|
} };
|
|
44
44
|
}
|
|
45
|
-
var
|
|
46
|
-
function $(...
|
|
47
|
-
return
|
|
45
|
+
var He = () => "";
|
|
46
|
+
function $(...o) {
|
|
47
|
+
return _e(Oe, o);
|
|
48
48
|
}
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
const a =
|
|
49
|
+
var Oe = (o, { min: u, max: a }) => u !== void 0 && o < u ? u : a !== void 0 && o > a ? a : o;
|
|
50
|
+
function Pe(o, u) {
|
|
51
|
+
const a = y(() => o.value.sort()), e = y(() => a.value[0]), n = y(() => a.value[a.value.length - 1]), v = y(() => {
|
|
52
52
|
const s = a.value.reduce(
|
|
53
53
|
(r, f) => Math.abs(f - u.value) < Math.abs(r - u.value) ? f : r
|
|
54
54
|
);
|
|
55
55
|
return a.value.indexOf(s);
|
|
56
56
|
});
|
|
57
57
|
return {
|
|
58
|
-
minSnap:
|
|
59
|
-
maxSnap:
|
|
60
|
-
snapPoints:
|
|
61
|
-
closestSnapPointIndex:
|
|
58
|
+
minSnap: e,
|
|
59
|
+
maxSnap: n,
|
|
60
|
+
snapPoints: o,
|
|
61
|
+
closestSnapPointIndex: v
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const Ee = { "data-vsbs-container": "" }, Ie = ["data-vsbs-shadow", "data-vsbs-sheet-show"], $e = /* @__PURE__ */ ve({
|
|
65
65
|
__name: "BottomSheet",
|
|
66
66
|
props: {
|
|
67
|
+
duration: { default: 250 },
|
|
67
68
|
snapPoints: {},
|
|
68
69
|
defaultBreakpoint: {},
|
|
69
70
|
blocking: { type: Boolean, default: !0 },
|
|
@@ -72,164 +73,182 @@ const He = { "data-vsbs-container": "" }, Pe = ["data-vsbs-shadow", "data-vsbs-s
|
|
|
72
73
|
expandOnContentDrag: { type: Boolean, default: !0 }
|
|
73
74
|
},
|
|
74
75
|
emits: ["opened", "closed", "ready", "dragging-up", "dragging-down", "minHeight", "maxHeight"],
|
|
75
|
-
setup(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
setup(o, { expose: u, emit: a }) {
|
|
77
|
+
de((i) => ({
|
|
78
|
+
"547540e6": te.value,
|
|
79
|
+
"5567c570": ae.value
|
|
80
|
+
}));
|
|
81
|
+
const e = o, n = a, v = p(null), s = p(null), r = p(null), f = p(null), w = p(null), C = p(null), O = p(null), S = p(!1), d = p(e.expandOnContentDrag), { height: g } = ke(), { height: h } = I(v), { height: W } = I(s), { height: Y } = I(r), { height: ee } = I(C);
|
|
82
|
+
let G = xe([v, O], {
|
|
83
|
+
immediate: !1,
|
|
84
|
+
fallbackFocus: () => v.value || document.body
|
|
85
|
+
});
|
|
86
|
+
const k = y(
|
|
87
|
+
() => Math.ceil(ee.value + W.value + Y.value)
|
|
88
|
+
), te = y(() => `visibility ${e.duration}ms ease-in-out`), ae = y(() => `opacity ${e.duration}ms ease-in-out`), { motionProperties: D } = Te(v), { push: x, stop: oe, motionValues: M } = Ce(), { set: _, stop: F } = De(
|
|
89
|
+
D,
|
|
80
90
|
{},
|
|
81
|
-
{ push:
|
|
82
|
-
),
|
|
83
|
-
minSnap:
|
|
84
|
-
maxSnap:
|
|
85
|
-
snapPoints:
|
|
86
|
-
closestSnapPointIndex:
|
|
87
|
-
} =
|
|
91
|
+
{ push: x, motionValues: M, stop: oe }
|
|
92
|
+
), t = p(0), l = p(0), { snapPoints: ne } = ce(e), le = y(() => ne.value ?? [k.value]), {
|
|
93
|
+
minSnap: B,
|
|
94
|
+
maxSnap: H,
|
|
95
|
+
snapPoints: T,
|
|
96
|
+
closestSnapPointIndex: L
|
|
97
|
+
} = Pe(le, t), Q = Z(document.body), j = Z(document.documentElement), K = (i) => {
|
|
88
98
|
i.key === "Escape" && E();
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
height:
|
|
92
|
-
y:
|
|
93
|
-
}),
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
}, ue = () => {
|
|
100
|
+
v.value && (t.value = Math.min(e.defaultBreakpoint ?? B.value, g.value), _({
|
|
101
|
+
height: t.value,
|
|
102
|
+
y: t.value
|
|
103
|
+
}), x("y", 0, D, {
|
|
104
|
+
type: "tween",
|
|
105
|
+
easings: "easeInOut",
|
|
106
|
+
bounce: 0,
|
|
107
|
+
duration: e.duration
|
|
108
|
+
}), S.value = !0, Q.value = !0, j.value = !0, window.addEventListener("keydown", K), e.blocking && setTimeout(() => {
|
|
109
|
+
M.value.y.get() - 0 < 0.1 && (n("opened"), G.activate());
|
|
110
|
+
}, e.duration));
|
|
96
111
|
}, E = () => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
v.value && (x("y", h.value, D, {
|
|
113
|
+
type: "tween",
|
|
114
|
+
bounce: 0,
|
|
115
|
+
duration: e.duration
|
|
116
|
+
}), S.value = !1, Q.value = !1, j.value = !1, e.blocking && G.deactivate(), window.removeEventListener("keydown", K), setTimeout(() => {
|
|
117
|
+
M.value.y.get() - h.value < 0.1 && n("closed");
|
|
118
|
+
}, e.duration));
|
|
119
|
+
}, ie = () => {
|
|
120
|
+
e.canBackdropClose && E();
|
|
102
121
|
};
|
|
103
|
-
function
|
|
104
|
-
|
|
122
|
+
function se(i) {
|
|
123
|
+
d.value && i.preventDefault();
|
|
105
124
|
}
|
|
106
|
-
const
|
|
107
|
-
|
|
125
|
+
const V = (i) => {
|
|
126
|
+
t.value = i, x("height", t.value, D, {
|
|
108
127
|
type: "tween",
|
|
109
128
|
easings: "easeInOut",
|
|
110
129
|
bounce: 0,
|
|
111
|
-
duration:
|
|
130
|
+
duration: e.duration
|
|
112
131
|
});
|
|
113
|
-
},
|
|
114
|
-
delta: [i,
|
|
115
|
-
direction: [
|
|
132
|
+
}, U = ({
|
|
133
|
+
delta: [i, c],
|
|
134
|
+
direction: [P, m]
|
|
116
135
|
}) => {
|
|
117
|
-
|
|
118
|
-
y:
|
|
119
|
-
})),
|
|
120
|
-
height: $(
|
|
136
|
+
v.value && (l.value <= 0 && (t.value -= c), t.value <= B.value && (t.value = B.value, l.value += c, _({
|
|
137
|
+
y: e.canSwipeClose ? $(l.value, { min: 0 }) : $(N(l.value, -h.value, 0, 0.5), { min: 0 })
|
|
138
|
+
})), _({
|
|
139
|
+
height: $(N(t.value, 0, H.value, 0.25), {
|
|
121
140
|
min: 0,
|
|
122
141
|
max: g.value
|
|
123
142
|
})
|
|
124
|
-
}), m > 0 ?
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
(i,
|
|
128
|
-
) : 0,
|
|
143
|
+
}), m > 0 ? n("dragging-down") : m < 0 && n("dragging-up"));
|
|
144
|
+
}, X = () => {
|
|
145
|
+
v.value && (l.value = e.canSwipeClose ? [0, t.value].reduce(
|
|
146
|
+
(i, c) => Math.abs(c - l.value) < Math.abs(i - l.value) ? c : i
|
|
147
|
+
) : 0, x("y", l.value, D, {
|
|
129
148
|
type: "tween",
|
|
130
149
|
easings: "easeInOut",
|
|
131
150
|
bounce: 0,
|
|
132
|
-
duration:
|
|
133
|
-
}), l.value ===
|
|
151
|
+
duration: e.duration
|
|
152
|
+
}), l.value === t.value && (l.value = 0, E()), t.value = Math.min(T.value[L.value], g.value), x("height", t.value, D, {
|
|
134
153
|
type: "tween",
|
|
135
154
|
easings: "easeInOut",
|
|
136
155
|
bounce: 0,
|
|
137
|
-
duration:
|
|
156
|
+
duration: e.duration
|
|
138
157
|
}));
|
|
139
158
|
};
|
|
140
|
-
|
|
159
|
+
z(
|
|
141
160
|
{
|
|
142
161
|
onDragStart: () => {
|
|
143
|
-
|
|
162
|
+
t.value = h.value, l.value = M.value.y.get(), F();
|
|
144
163
|
},
|
|
145
|
-
onDrag:
|
|
146
|
-
onDragEnd:
|
|
164
|
+
onDrag: U,
|
|
165
|
+
onDragEnd: X
|
|
147
166
|
},
|
|
148
167
|
{
|
|
149
168
|
domTarget: s,
|
|
150
169
|
drag: { filterTaps: !0 }
|
|
151
170
|
}
|
|
152
|
-
),
|
|
171
|
+
), z(
|
|
153
172
|
{
|
|
154
173
|
onDragStart: () => {
|
|
155
|
-
|
|
174
|
+
t.value = h.value, l.value = M.value.y.get(), F();
|
|
156
175
|
},
|
|
157
|
-
onDrag:
|
|
158
|
-
onDragEnd:
|
|
176
|
+
onDrag: U,
|
|
177
|
+
onDragEnd: X
|
|
159
178
|
},
|
|
160
179
|
{
|
|
161
180
|
domTarget: r,
|
|
162
181
|
drag: { filterTaps: !0 }
|
|
163
182
|
}
|
|
164
|
-
),
|
|
183
|
+
), z(
|
|
165
184
|
{
|
|
166
|
-
onDragStart: ({ direction: [i,
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
|
|
185
|
+
onDragStart: ({ direction: [i, c] }) => {
|
|
186
|
+
t.value = h.value, l.value = M.value.y.get(), F();
|
|
187
|
+
const P = f.value.scrollTop === 0, m = c > 0;
|
|
188
|
+
T.value.length === 1 ? l.value === 0 && P && (d.value = m) : (e.expandOnContentDrag && t.value !== H.value && (d.value = !0), t.value === H.value && P && (d.value = m));
|
|
170
189
|
},
|
|
171
|
-
onDrag: ({ delta: [i,
|
|
172
|
-
if (!
|
|
173
|
-
|
|
190
|
+
onDrag: ({ delta: [i, c], direction: [P, m] }) => {
|
|
191
|
+
if (!e.expandOnContentDrag) {
|
|
192
|
+
d.value = !1;
|
|
174
193
|
return;
|
|
175
194
|
}
|
|
176
|
-
if (!
|
|
177
|
-
l.value === 0 &&
|
|
178
|
-
y:
|
|
179
|
-
})),
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
height:
|
|
183
|
-
}), m > 0 ?
|
|
195
|
+
if (!v.value) return;
|
|
196
|
+
l.value === 0 && d.value && e.expandOnContentDrag && (t.value -= c), t.value <= B.value && (t.value = B.value, d.value && e.expandOnContentDrag && (l.value += c), l.value = $(l.value, { min: 0, max: B.value }), _({
|
|
197
|
+
y: e.canSwipeClose ? l.value : N(l.value, -h.value, 0, 0.5)
|
|
198
|
+
})), t.value > H.value && (t.value = H.value), t.value = Math.min(t.value, g.value);
|
|
199
|
+
const q = f.value.scrollTop === 0;
|
|
200
|
+
T.value.length === 1 ? c < 0 && l.value === 0 && q && (d.value = !1) : t.value === H.value && (d.value = !1), _({
|
|
201
|
+
height: t.value
|
|
202
|
+
}), m > 0 ? n("dragging-down") : m < 0 && n("dragging-up");
|
|
184
203
|
},
|
|
185
|
-
onDragEnd:
|
|
204
|
+
onDragEnd: X
|
|
186
205
|
},
|
|
187
206
|
{
|
|
188
|
-
domTarget:
|
|
207
|
+
domTarget: w,
|
|
189
208
|
drag: { filterTaps: !0 }
|
|
190
209
|
}
|
|
191
210
|
);
|
|
192
|
-
const
|
|
211
|
+
const re = Be(
|
|
193
212
|
() => {
|
|
194
|
-
|
|
195
|
-
|
|
213
|
+
n("maxHeight", g.value), A(() => {
|
|
214
|
+
t.value = T.value[L.value], V(T.value[L.value]);
|
|
196
215
|
});
|
|
197
216
|
},
|
|
198
217
|
{ minQuietPeriodMs: 50 }
|
|
199
218
|
);
|
|
200
|
-
return
|
|
201
|
-
|
|
202
|
-
}),
|
|
203
|
-
|
|
204
|
-
|
|
219
|
+
return J(g, () => {
|
|
220
|
+
re.call();
|
|
221
|
+
}), J(k, () => {
|
|
222
|
+
n("minHeight", k.value), T.value.length === 1 && A(() => {
|
|
223
|
+
T.value[0] === k.value && V(Math.min(k.value, g.value));
|
|
205
224
|
});
|
|
206
|
-
}),
|
|
207
|
-
|
|
208
|
-
height:
|
|
209
|
-
y:
|
|
210
|
-
}),
|
|
211
|
-
|
|
225
|
+
}), fe(() => {
|
|
226
|
+
n("minHeight", k.value), n("maxHeight", g.value), t.value = e.defaultBreakpoint ?? Number(k.value), _({
|
|
227
|
+
height: t.value,
|
|
228
|
+
y: t.value
|
|
229
|
+
}), A(() => {
|
|
230
|
+
n("ready");
|
|
212
231
|
});
|
|
213
|
-
}), u({ open:
|
|
214
|
-
b("div",
|
|
215
|
-
|
|
216
|
-
default:
|
|
217
|
-
|
|
232
|
+
}), u({ open: ue, close: E, snapToPoint: V }), (i, c) => (ge(), pe(he, { to: "body" }, [
|
|
233
|
+
b("div", Ee, [
|
|
234
|
+
me(be, { name: "fade" }, {
|
|
235
|
+
default: ye(() => [
|
|
236
|
+
we(b("div", {
|
|
218
237
|
ref_key: "backdrop",
|
|
219
|
-
ref:
|
|
238
|
+
ref: O,
|
|
220
239
|
"data-vsbs-backdrop": "",
|
|
221
|
-
onClick:
|
|
240
|
+
onClick: c[0] || (c[0] = (P) => ie())
|
|
222
241
|
}, null, 512), [
|
|
223
|
-
[
|
|
242
|
+
[Se, S.value && i.blocking]
|
|
224
243
|
])
|
|
225
244
|
]),
|
|
226
245
|
_: 1
|
|
227
246
|
}),
|
|
228
247
|
b("div", {
|
|
229
248
|
ref_key: "sheet",
|
|
230
|
-
ref:
|
|
249
|
+
ref: v,
|
|
231
250
|
"data-vsbs-shadow": !i.blocking,
|
|
232
|
-
"data-vsbs-sheet-show":
|
|
251
|
+
"data-vsbs-sheet-show": S.value,
|
|
233
252
|
"aria-modal": "true",
|
|
234
253
|
"data-vsbs-sheet": "",
|
|
235
254
|
tabindex: "-1"
|
|
@@ -239,25 +258,25 @@ const He = { "data-vsbs-container": "" }, Pe = ["data-vsbs-shadow", "data-vsbs-s
|
|
|
239
258
|
ref: s,
|
|
240
259
|
"data-vsbs-header": ""
|
|
241
260
|
}, [
|
|
242
|
-
|
|
261
|
+
R(i.$slots, "header", {}, void 0, !0)
|
|
243
262
|
], 512),
|
|
244
263
|
b("div", {
|
|
245
264
|
ref_key: "sheetScroll",
|
|
246
265
|
ref: f,
|
|
247
266
|
"data-vsbs-scroll": "",
|
|
248
|
-
onTouchmove:
|
|
267
|
+
onTouchmove: se
|
|
249
268
|
}, [
|
|
250
269
|
b("div", {
|
|
251
270
|
ref_key: "sheetContentWrapper",
|
|
252
|
-
ref:
|
|
271
|
+
ref: w,
|
|
253
272
|
"data-vsbs-content-wrapper": ""
|
|
254
273
|
}, [
|
|
255
274
|
b("div", {
|
|
256
275
|
ref_key: "sheetContent",
|
|
257
|
-
ref:
|
|
276
|
+
ref: C,
|
|
258
277
|
"data-vsbs-content": ""
|
|
259
278
|
}, [
|
|
260
|
-
|
|
279
|
+
R(i.$slots, "default", {}, void 0, !0)
|
|
261
280
|
], 512)
|
|
262
281
|
], 512)
|
|
263
282
|
], 544),
|
|
@@ -266,18 +285,18 @@ const He = { "data-vsbs-container": "" }, Pe = ["data-vsbs-shadow", "data-vsbs-s
|
|
|
266
285
|
ref: r,
|
|
267
286
|
"data-vsbs-footer": ""
|
|
268
287
|
}, [
|
|
269
|
-
|
|
288
|
+
R(i.$slots, "footer", {}, void 0, !0)
|
|
270
289
|
], 512)
|
|
271
|
-
], 8,
|
|
290
|
+
], 8, Ie)
|
|
272
291
|
])
|
|
273
292
|
]));
|
|
274
293
|
}
|
|
275
|
-
}),
|
|
276
|
-
const a =
|
|
277
|
-
for (const [
|
|
278
|
-
a[
|
|
294
|
+
}), We = (o, u) => {
|
|
295
|
+
const a = o.__vccOpts || o;
|
|
296
|
+
for (const [e, n] of u)
|
|
297
|
+
a[e] = n;
|
|
279
298
|
return a;
|
|
280
|
-
},
|
|
299
|
+
}, Re = /* @__PURE__ */ We($e, [["__scopeId", "data-v-fbbc3cbe"]]);
|
|
281
300
|
export {
|
|
282
|
-
|
|
301
|
+
Re as default
|
|
283
302
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-vsbs-backdrop][data-v-
|
|
1
|
+
[data-vsbs-container][data-v-fbbc3cbe]{position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden;pointer-events:none;z-index:9999;visibility:visible}[data-vsbs-backdrop][data-v-fbbc3cbe]{background-color:var(--vsbs-backdrop-bg, rgba(0, 0, 0, .5));top:0;right:0;bottom:0;left:0;pointer-events:auto;position:fixed;-webkit-user-select:none;user-select:none;will-change:opacity;z-index:1}[data-vsbs-shadow=true][data-v-fbbc3cbe]{box-shadow:0 -5px 60px 0 var(--vsbs-shadow-color, rgba(89, 89, 89, .2))}[data-vsbs-sheet][data-v-fbbc3cbe]{background-color:var(--vsbs-background, #fff);border-top-left-radius:var(--vsbs-border-radius, 16px);border-top-right-radius:var(--vsbs-border-radius, 16px);bottom:0;display:flex;flex-direction:column;left:0;margin-left:auto;margin-right:auto;max-height:inherit;max-width:var(--vsbs-max-width, 640px);pointer-events:all;position:fixed;right:0;transition:var(--547540e6);visibility:hidden;width:100%;will-change:height;z-index:2}[data-vsbs-sheet-show=true][data-v-fbbc3cbe]{visibility:visible}[data-vsbs-header][data-v-fbbc3cbe]{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}[data-vsbs-header][data-v-fbbc3cbe]: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-fbbc3cbe]:empty{box-shadow:none;padding:12px var(--vsbs-padding-x, 16px) 8px}[data-vsbs-footer][data-v-fbbc3cbe]{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-fbbc3cbe]:empty{display:none}[data-vsbs-scroll][data-v-fbbc3cbe]{flex-grow:1;overflow-y:auto;overscroll-behavior:contain}[data-vsbs-content-wrapper][data-v-fbbc3cbe]{height:100%}[data-vsbs-content][data-v-fbbc3cbe]{display:grid;padding:1vh var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}.fade-enter-active[data-v-fbbc3cbe],.fade-leave-active[data-v-fbbc3cbe]{transition:var(--5567c570)}.fade-enter-from[data-v-fbbc3cbe],.fade-leave-to[data-v-fbbc3cbe]{opacity:0}
|
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"url": "https://github.com/megaarmos/vue-spring-bottom-sheet/issues"
|
|
33
33
|
},
|
|
34
34
|
"private": false,
|
|
35
|
-
"version": "1.1
|
|
35
|
+
"version": "1.2.1",
|
|
36
36
|
"type": "module",
|
|
37
37
|
"exports": {
|
|
38
38
|
".": {
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"vue": ">=3.3"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@douxcode/vue-spring-bottom-sheet": "^1.1.3",
|
|
64
63
|
"@vueuse/core": "^12.0.0",
|
|
65
64
|
"@vueuse/gesture": "^2.0.0",
|
|
66
65
|
"@vueuse/integrations": "^12.0.0",
|