@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 CHANGED
@@ -13,7 +13,7 @@ npm install @douxcode/vue-spring-bottom-sheet
13
13
  ```
14
14
 
15
15
  ```
16
- bun i @douxcode/vue-spring-bottom-sheet
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>>()
@@ -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 H, defineComponent as ie, ref as h, toRefs as se, watch as U, nextTick as z, onMounted as re, openBlock as ve, createBlock as de, Teleport as ce, createElementVNode as b, createVNode as fe, Transition as ge, withCtx as he, withDirectives as pe, vShow as me, renderSlot as N } from "vue";
2
- import { useWindowSize as be, useElementBounding as I, useScrollLock as ye } from "@vueuse/core";
3
- import { useGesture as R, rubberbandIfOutOfBounds as V } from "@vueuse/gesture";
4
- import { useMotionProperties as we, useMotionTransitions as Se, useMotionControls as ke } from "@vueuse/motion";
5
- import { useFocusTrap as Te } from "@vueuse/integrations/useFocusTrap";
6
- function Ce(n, u, a) {
7
- let t = (o) => n(o, ...u);
8
- return a === void 0 ? t : Object.assign(t, { lazy: a, lazyArgs: u });
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 De(n, u, a) {
11
- let t = n.length - u.length;
12
- if (t === 0) return n(...u);
13
- if (t === 1) return Ce(n, u, a);
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 xe(n, { triggerAt: u = "end", minQuietPeriodMs: a, maxBurstDurationMs: t, minGapMs: o, reducer: c = Me }) {
17
- let s, r, f, y, T = () => {
18
- let v = f;
19
- v !== void 0 && (f = void 0, n(v), o !== void 0 && (r = setTimeout(P, o)));
20
- }, P = () => {
21
- clearTimeout(r), r = void 0, s === void 0 && T();
22
- }, w = () => {
23
- clearTimeout(s), s = void 0, y = void 0, r === void 0 && T();
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: (...v) => {
25
+ return { call: (...d) => {
26
26
  let g = s === void 0 && r === void 0;
27
- if ((u !== "start" || g) && (f = c(f, ...v)), !(s === void 0 && !g)) {
28
- if (a !== void 0 || t !== void 0 || o === 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 p = Date.now();
31
- y ?? (y = p);
32
- let W = t === void 0 ? a ?? 0 : Math.min(a ?? t, t - (p - y));
33
- s = setTimeout(w, W);
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 && T();
35
+ u !== "end" && g && C();
36
36
  }
37
37
  }, cancel: () => {
38
- clearTimeout(s), s = void 0, y = void 0, clearTimeout(r), r = void 0, f = void 0;
38
+ clearTimeout(s), s = void 0, w = void 0, clearTimeout(r), r = void 0, f = void 0;
39
39
  }, flush: () => {
40
- w(), P();
40
+ S(), O();
41
41
  }, get isIdle() {
42
42
  return s === void 0 && r === void 0;
43
43
  } };
44
44
  }
45
- var Me = () => "";
46
- function $(...n) {
47
- return De(_e, n);
45
+ var He = () => "";
46
+ function $(...o) {
47
+ return _e(Oe, o);
48
48
  }
49
- var _e = (n, { min: u, max: a }) => u !== void 0 && n < u ? u : a !== void 0 && n > a ? a : n;
50
- function Be(n, u) {
51
- const a = H(() => n.value.sort()), t = H(() => a.value[0]), o = H(() => a.value[a.value.length - 1]), c = H(() => {
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: t,
59
- maxSnap: o,
60
- snapPoints: n,
61
- closestSnapPointIndex: c
58
+ minSnap: e,
59
+ maxSnap: n,
60
+ snapPoints: o,
61
+ closestSnapPointIndex: v
62
62
  };
63
63
  }
64
- const He = { "data-vsbs-container": "" }, Pe = ["data-vsbs-shadow", "data-vsbs-sheet-show"], Oe = /* @__PURE__ */ ie({
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(n, { expose: u, emit: a }) {
76
- const t = n, o = a, c = h(null), s = h(null), r = h(null), f = h(null), y = h(null), T = h(null), P = h(null), w = h(!1), v = h(t.expandOnContentDrag), { height: g } = be(), { height: p } = I(c), { height: W } = I(s), { height: q } = I(r), { height: J } = I(T), { activate: Z, deactivate: Y } = Te([c, P], { immediate: !1 }), S = H(
77
- () => Math.ceil(J.value + W.value + q.value)
78
- ), { motionProperties: C } = we(c), { push: D, stop: ee, motionValues: x } = Se(), { set: M, stop: X } = ke(
79
- C,
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: D, motionValues: x, stop: ee }
82
- ), e = h(0), l = h(0), { snapPoints: te } = se(t), ae = H(() => te.value ?? [S.value]), {
83
- minSnap: _,
84
- maxSnap: B,
85
- snapPoints: k,
86
- closestSnapPointIndex: A
87
- } = Be(ae, e), G = ye(document.body), Q = (i) => {
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
- }, ne = () => {
90
- c.value && (e.value = Math.min(t.defaultBreakpoint ?? _.value, g.value), M({
91
- height: e.value,
92
- y: e.value
93
- }), D("y", 0, C, { type: "tween", easings: "easeInOut", bounce: 0, duration: 300 }), w.value = !0, G.value = !0, window.addEventListener("keydown", Q), t.blocking && setTimeout(() => {
94
- x.value.y.get() - 0 < 0.1 && (o("opened"), Z());
95
- }, 300));
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
- c.value && (D("y", p.value, C, { type: "tween", bounce: 0, duration: 300 }), w.value = !1, G.value = !1, t.blocking && Y(), window.removeEventListener("keydown", Q), setTimeout(() => {
98
- x.value.y.get() - p.value < 0.1 && o("closed");
99
- }, 300));
100
- }, oe = () => {
101
- t.canBackdropClose && E();
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 le(i) {
104
- v.value && i.preventDefault();
122
+ function se(i) {
123
+ d.value && i.preventDefault();
105
124
  }
106
- const F = (i) => {
107
- e.value = i, D("height", e.value, C, {
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: 300
130
+ duration: e.duration
112
131
  });
113
- }, j = ({
114
- delta: [i, d],
115
- direction: [O, m]
132
+ }, U = ({
133
+ delta: [i, c],
134
+ direction: [P, m]
116
135
  }) => {
117
- c.value && (l.value <= 0 && (e.value -= d), e.value <= _.value && (e.value = _.value, l.value += d, M({
118
- y: t.canSwipeClose ? $(l.value, { min: 0 }) : $(V(l.value, -p.value, 0, 0.5), { min: 0 })
119
- })), M({
120
- height: $(V(e.value, 0, B.value, 0.25), {
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 ? o("dragging-down") : m < 0 && o("dragging-up"));
125
- }, L = () => {
126
- c.value && (l.value = t.canSwipeClose ? [0, e.value].reduce(
127
- (i, d) => Math.abs(d - l.value) < Math.abs(i - l.value) ? d : i
128
- ) : 0, D("y", l.value, C, {
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: 300
133
- }), l.value === e.value && (l.value = 0, E()), e.value = Math.min(k.value[A.value], g.value), D("height", e.value, C, {
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: 300
156
+ duration: e.duration
138
157
  }));
139
158
  };
140
- R(
159
+ z(
141
160
  {
142
161
  onDragStart: () => {
143
- e.value = p.value, l.value = x.value.y.get(), X();
162
+ t.value = h.value, l.value = M.value.y.get(), F();
144
163
  },
145
- onDrag: j,
146
- onDragEnd: L
164
+ onDrag: U,
165
+ onDragEnd: X
147
166
  },
148
167
  {
149
168
  domTarget: s,
150
169
  drag: { filterTaps: !0 }
151
170
  }
152
- ), R(
171
+ ), z(
153
172
  {
154
173
  onDragStart: () => {
155
- e.value = p.value, l.value = x.value.y.get(), X();
174
+ t.value = h.value, l.value = M.value.y.get(), F();
156
175
  },
157
- onDrag: j,
158
- onDragEnd: L
176
+ onDrag: U,
177
+ onDragEnd: X
159
178
  },
160
179
  {
161
180
  domTarget: r,
162
181
  drag: { filterTaps: !0 }
163
182
  }
164
- ), R(
183
+ ), z(
165
184
  {
166
- onDragStart: ({ direction: [i, d] }) => {
167
- e.value = p.value, l.value = x.value.y.get(), X();
168
- const O = f.value.scrollTop === 0, m = d > 0;
169
- k.value.length === 1 ? l.value === 0 && O && (v.value = m) : (t.expandOnContentDrag && e.value !== B.value && (v.value = !0), e.value === B.value && O && (v.value = m));
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, d], direction: [O, m] }) => {
172
- if (!t.expandOnContentDrag) {
173
- v.value = !1;
190
+ onDrag: ({ delta: [i, c], direction: [P, m] }) => {
191
+ if (!e.expandOnContentDrag) {
192
+ d.value = !1;
174
193
  return;
175
194
  }
176
- if (!c.value) return;
177
- l.value === 0 && v.value && t.expandOnContentDrag && (e.value -= d), e.value <= _.value && (e.value = _.value, v.value && t.expandOnContentDrag && (l.value += d), l.value = $(l.value, { min: 0, max: _.value }), M({
178
- y: t.canSwipeClose ? l.value : V(l.value, -p.value, 0, 0.5)
179
- })), e.value > B.value && (e.value = B.value), e.value = Math.min(e.value, g.value);
180
- const K = f.value.scrollTop === 0;
181
- k.value.length === 1 ? d < 0 && l.value === 0 && K && (v.value = !1) : e.value === B.value && (v.value = !1), M({
182
- height: e.value
183
- }), m > 0 ? o("dragging-down") : m < 0 && o("dragging-up");
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: L
204
+ onDragEnd: X
186
205
  },
187
206
  {
188
- domTarget: y,
207
+ domTarget: w,
189
208
  drag: { filterTaps: !0 }
190
209
  }
191
210
  );
192
- const ue = xe(
211
+ const re = Be(
193
212
  () => {
194
- o("maxHeight", g.value), z(() => {
195
- e.value = k.value[A.value], F(k.value[A.value]);
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 U(g, () => {
201
- ue.call();
202
- }), U(S, () => {
203
- o("minHeight", S.value), k.value.length === 1 && z(() => {
204
- k.value[0] === S.value && F(Math.min(S.value, g.value));
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
- }), re(() => {
207
- o("minHeight", S.value), o("maxHeight", g.value), e.value = t.defaultBreakpoint ?? Number(S.value), M({
208
- height: e.value,
209
- y: e.value
210
- }), z(() => {
211
- o("ready");
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: ne, close: E, snapToPoint: F }), (i, d) => (ve(), de(ce, { to: "body" }, [
214
- b("div", He, [
215
- fe(ge, { name: "fade" }, {
216
- default: he(() => [
217
- pe(b("div", {
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: P,
238
+ ref: O,
220
239
  "data-vsbs-backdrop": "",
221
- onClick: d[0] || (d[0] = (O) => oe())
240
+ onClick: c[0] || (c[0] = (P) => ie())
222
241
  }, null, 512), [
223
- [me, w.value && i.blocking]
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: c,
249
+ ref: v,
231
250
  "data-vsbs-shadow": !i.blocking,
232
- "data-vsbs-sheet-show": w.value,
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
- N(i.$slots, "header", {}, void 0, !0)
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: le
267
+ onTouchmove: se
249
268
  }, [
250
269
  b("div", {
251
270
  ref_key: "sheetContentWrapper",
252
- ref: y,
271
+ ref: w,
253
272
  "data-vsbs-content-wrapper": ""
254
273
  }, [
255
274
  b("div", {
256
275
  ref_key: "sheetContent",
257
- ref: T,
276
+ ref: C,
258
277
  "data-vsbs-content": ""
259
278
  }, [
260
- N(i.$slots, "default", {}, void 0, !0)
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
- N(i.$slots, "footer", {}, void 0, !0)
288
+ R(i.$slots, "footer", {}, void 0, !0)
270
289
  ], 512)
271
- ], 8, Pe)
290
+ ], 8, Ie)
272
291
  ])
273
292
  ]));
274
293
  }
275
- }), Ee = (n, u) => {
276
- const a = n.__vccOpts || n;
277
- for (const [t, o] of u)
278
- a[t] = o;
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
- }, Fe = /* @__PURE__ */ Ee(Oe, [["__scopeId", "data-v-84fc7f9f"]]);
299
+ }, Re = /* @__PURE__ */ We($e, [["__scopeId", "data-v-fbbc3cbe"]]);
281
300
  export {
282
- Fe as default
301
+ Re as default
283
302
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- [data-vsbs-backdrop][data-v-84fc7f9f]{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:100}[data-vsbs-shadow=true][data-v-84fc7f9f]{box-shadow:0 -5px 60px 0 var(--vsbs-shadow-color, rgba(89, 89, 89, .2))}[data-vsbs-sheet][data-v-84fc7f9f]{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:visibility .3s ease-in-out;visibility:hidden;width:100%;will-change:height;z-index:100}[data-vsbs-sheet-show=true][data-v-84fc7f9f]{visibility:visible}[data-vsbs-header][data-v-84fc7f9f]{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:1}[data-vsbs-header][data-v-84fc7f9f]: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-84fc7f9f]:empty{box-shadow:none;padding:12px var(--vsbs-padding-x, 16px) 8px}[data-vsbs-footer][data-v-84fc7f9f]{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-84fc7f9f]:empty{display:none}[data-vsbs-scroll][data-v-84fc7f9f]{flex-grow:1;overflow-y:auto;overscroll-behavior:contain}[data-vsbs-content-wrapper][data-v-84fc7f9f]{height:100%}[data-vsbs-content][data-v-84fc7f9f]{display:grid;padding:1vh var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}.fade-enter-active[data-v-84fc7f9f],.fade-leave-active[data-v-84fc7f9f]{transition:opacity .3s ease}.fade-enter-from[data-v-84fc7f9f],.fade-leave-to[data-v-84fc7f9f]{opacity:0}
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.4",
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",