@douxcode/vue-spring-bottom-sheet 2.1.0 → 2.1.2

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
@@ -76,22 +76,20 @@ const close = () => {
76
76
 
77
77
  ```vue
78
78
  <script setup lang="ts">
79
- import { ref } from "vue";
80
-
81
- import BottomSheet from "@douxcode/vue-spring-bottom-sheet";
82
- import "@douxcode/vue-spring-bottom-sheet/dist/style.css";
79
+ import { ref } from 'vue'
83
80
 
84
- const sheet = ref(false);
81
+ import BottomSheet from '@douxcode/vue-spring-bottom-sheet'
82
+ import '@douxcode/vue-spring-bottom-sheet/dist/style.css'
85
83
 
84
+ const sheet = ref(false)
86
85
  </script>
87
86
 
88
87
  <template>
89
- <button type="button" @click="sheet = true"> Open bottom sheet </button>
88
+ <button type="button" @click="sheet = true">Open bottom sheet</button>
90
89
  <BottomSheet v-model="sheet"> Your content </BottomSheet>
91
90
  </template>
92
91
  ```
93
92
 
94
-
95
93
  ## Usage in Nuxt 3
96
94
 
97
95
  For Nuxt 3, just wrap component in `<ClientOnly>`
@@ -123,6 +121,7 @@ For Nuxt 3, just wrap component in `<ClientOnly>`
123
121
  --vsbs-shadow-color: rgba(89, 89, 89, 0.2);
124
122
  --vsbs-background: #fff;
125
123
  --vsbs-border-radius: 16px;
124
+ --vsbs-outer-border-color: transparent;
126
125
  --vsbs-max-width: 640px;
127
126
  --vsbs-border-color: rgba(46, 59, 66, 0.125);
128
127
  --vsbs-padding-x: 16px;
@@ -155,13 +154,14 @@ Assuming there is `const bottomSheet = ref()`
155
154
 
156
155
  ## Events
157
156
 
158
- | Event | Description | Payload |
159
- | -------------- | -------------------------------------- | --------------- |
160
- | opened | Emitted when sheet finishes opening | - |
161
- | closed | Emitted when sheet finishes closing | - |
162
- | dragging-up | Emitted when user drags sheet upward | - |
163
- | dragging-down | Emitted when user drags sheet downward | - |
164
- | instinctHeight | Emitted when content height changes | height (number) |
157
+ | Event | Description | Payload |
158
+ | -------------- | -------------------------------------- | ----------------------- |
159
+ | opened | Emitted when sheet finishes opening | - |
160
+ | closed | Emitted when sheet finishes closing | - |
161
+ | dragging-up | Emitted when user drags sheet upward | - |
162
+ | dragging-down | Emitted when user drags sheet downward | - |
163
+ | instinctHeight | Emitted when content height changes | height (number) |
164
+ | snapped | Emitted when sheet finishes snapping | snapPointIndex (number) |
165
165
 
166
166
  ## Acknowledgments
167
167
 
@@ -28,6 +28,7 @@ declare const __VLS_component: import('vue').DefineComponent<BottomSheetProps, {
28
28
  ready: () => any;
29
29
  "dragging-up": () => any;
30
30
  "dragging-down": () => any;
31
+ snapped: (snapPointIndex?: number | undefined) => any;
31
32
  instinctHeight: (instinctHeight: number) => any;
32
33
  "update:modelValue": () => any;
33
34
  }, string, import('vue').PublicProps, Readonly<BottomSheetProps> & Readonly<{
@@ -36,6 +37,7 @@ declare const __VLS_component: import('vue').DefineComponent<BottomSheetProps, {
36
37
  onReady?: (() => any) | undefined;
37
38
  "onDragging-up"?: (() => any) | undefined;
38
39
  "onDragging-down"?: (() => any) | undefined;
40
+ onSnapped?: ((snapPointIndex?: number | undefined) => any) | undefined;
39
41
  onInstinctHeight?: ((instinctHeight: number) => any) | undefined;
40
42
  "onUpdate:modelValue"?: (() => any) | undefined;
41
43
  }>, {
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { ref as P, computed as E, defineComponent as xe, watch as q, onMounted as Me, toRefs as _e, nextTick as N, onUnmounted as Oe, createBlock as Z, openBlock as ee, Teleport as Ie, createElementVNode as te, createVNode as F, unref as m, withCtx as B, createCommentVNode as fe, normalizeStyle as Be, renderSlot as ae } from "vue";
2
- import { useMotionValue as he, animate as O, AnimatePresence as pe, Motion as $ } from "motion-v";
1
+ import { ref as P, computed as E, defineComponent as xe, watch as q, onMounted as Me, toRefs as _e, nextTick as N, onUnmounted as Oe, createBlock as Z, openBlock as ee, Teleport as Ie, createElementVNode as te, createVNode as $, unref as m, withCtx as B, createCommentVNode as fe, normalizeStyle as Be, renderSlot as ae } from "vue";
2
+ import { useMotionValue as he, animate as O, AnimatePresence as pe, Motion as A } from "motion-v";
3
3
  import { useVModel as Ee, useWindowSize as De, useElementBounding as Q, useScrollLock as ge } from "@vueuse/core";
4
4
  import { useFocusTrap as He } from "@vueuse/integrations/useFocusTrap";
5
5
  function G(n, a) {
@@ -7,11 +7,11 @@ function G(n, a) {
7
7
  return a * o / 100;
8
8
  }
9
9
  function Ve(n, a, o) {
10
- const e = P(0), i = E(() => n.value.map((f) => typeof f == "string" ? G(f, o.value) : f)), y = E(() => Math.min(...i.value)), r = E(() => Math.max(...i.value)), p = E(() => {
11
- const f = i.value.reduce(
10
+ const e = P(0), i = E(() => n.value.map((h) => typeof h == "string" ? G(h, o.value) : h)), y = E(() => Math.min(...i.value)), r = E(() => Math.max(...i.value)), p = E(() => {
11
+ const h = i.value.reduce(
12
12
  (g, x) => Math.abs(x - a.value) < Math.abs(g - a.value) ? x : g
13
13
  );
14
- return i.value.indexOf(f);
14
+ return i.value.indexOf(h);
15
15
  });
16
16
  return {
17
17
  currentSnapPointIndex: e,
@@ -32,28 +32,28 @@ function Fe(n, a, o) {
32
32
  throw new Error("Wrong number of arguments");
33
33
  }
34
34
  function $e(n, { triggerAt: a = "end", minQuietPeriodMs: o, maxBurstDurationMs: e, minGapMs: i, reducer: y = Ae }) {
35
- let r, p, f, g, x = () => {
36
- let s = f;
37
- s !== void 0 && (f = void 0, n(s), i !== void 0 && (p = setTimeout(D, i)));
35
+ let r, p, h, g, x = () => {
36
+ let s = h;
37
+ s !== void 0 && (h = void 0, n(s), i !== void 0 && (p = setTimeout(D, i)));
38
38
  }, D = () => {
39
39
  clearTimeout(p), p = void 0, r === void 0 && x();
40
40
  }, H = () => {
41
41
  clearTimeout(r), r = void 0, g = void 0, p === void 0 && x();
42
42
  };
43
43
  return { call: (...s) => {
44
- let d = r === void 0 && p === void 0;
45
- if ((a !== "start" || d) && (f = y(f, ...s)), !(r === void 0 && !d)) {
44
+ let c = r === void 0 && p === void 0;
45
+ if ((a !== "start" || c) && (h = y(h, ...s)), !(r === void 0 && !c)) {
46
46
  if (o !== void 0 || e !== void 0 || i === void 0) {
47
47
  clearTimeout(r);
48
48
  let w = Date.now();
49
49
  g ?? (g = w);
50
- let A = e === void 0 ? o ?? 0 : Math.min(o ?? e, e - (w - g));
51
- r = setTimeout(H, A);
50
+ let W = e === void 0 ? o ?? 0 : Math.min(o ?? e, e - (w - g));
51
+ r = setTimeout(H, W);
52
52
  }
53
- a !== "end" && d && x();
53
+ a !== "end" && c && x();
54
54
  }
55
55
  }, cancel: () => {
56
- clearTimeout(r), r = void 0, g = void 0, clearTimeout(p), p = void 0, f = void 0;
56
+ clearTimeout(r), r = void 0, g = void 0, clearTimeout(p), p = void 0, h = void 0;
57
57
  }, flush: () => {
58
58
  H(), D();
59
59
  }, get isIdle() {
@@ -89,7 +89,7 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
89
89
  expandOnContentDrag: { type: Boolean, default: !0 },
90
90
  modelValue: { type: Boolean }
91
91
  },
92
- emits: ["opened", "closed", "ready", "dragging-up", "dragging-down", "instinctHeight", "update:modelValue"],
92
+ emits: ["opened", "closed", "ready", "dragging-up", "dragging-down", "snapped", "instinctHeight", "update:modelValue"],
93
93
  setup(n, { expose: a, emit: o }) {
94
94
  const e = n, i = o, y = Ee(e, "modelValue", i, {
95
95
  passive: !0
@@ -99,25 +99,25 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
99
99
  }), Me(() => {
100
100
  y.value && J();
101
101
  });
102
- const r = P(), p = P(null), f = P(null), g = P(null), x = P(null), D = P(null), H = P(null), s = P(e.expandOnContentDrag), { height: d } = De(), { height: w } = Q(r), { height: A } = Q(p), { height: oe } = Q(D), { height: le } = Q(f), K = E({
102
+ const r = P(), p = P(null), h = P(null), g = P(null), x = P(null), D = P(null), H = P(null), s = P(e.expandOnContentDrag), { height: c } = De(), { height: w } = Q(r), { height: W } = Q(p), { height: oe } = Q(D), { height: le } = Q(h), K = E({
103
103
  get() {
104
104
  return b(
105
- Math.ceil(oe.value + A.value + le.value),
105
+ Math.ceil(oe.value + W.value + le.value),
106
106
  {
107
- max: d.value
107
+ max: c.value
108
108
  }
109
109
  );
110
110
  },
111
111
  set(t) {
112
- [A.value, oe.value, le.value] = t;
112
+ [W.value, oe.value, le.value] = t;
113
113
  }
114
- }), l = P(0), v = P(0), k = he(0), S = he(0), { snapPoints: be } = _e(e), h = E(() => be.value ?? [K.value]), {
114
+ }), l = P(0), v = P(0), k = he(0), S = he(0), { snapPoints: be } = _e(e), d = E(() => be.value ?? [K.value]), {
115
115
  flattenedSnapPoints: U,
116
116
  currentSnapPointIndex: I,
117
- closestSnapPointIndex: W,
117
+ closestSnapPointIndex: V,
118
118
  minSnapPoint: _,
119
- maxSnapPoint: V
120
- } = Ve(h, l, d);
119
+ maxSnapPoint: R
120
+ } = Ve(d, l, c);
121
121
  let M;
122
122
  const L = ge(document.body), z = ge(document.documentElement), Y = He([r, H], {
123
123
  immediate: !1,
@@ -137,26 +137,26 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
137
137
  y.value = !0, e.blocking && (L.value = !0, z.value = !0), await N();
138
138
  const t = r.value.$el;
139
139
  w.value = t.getBoundingClientRect().height;
140
- const u = t.querySelector("[data-vsbs-content]"), c = t.querySelector("[data-vsbs-header]"), C = t.querySelector("[data-vsbs-footer]");
140
+ const u = t.querySelector("[data-vsbs-content]"), f = t.querySelector("[data-vsbs-header]"), C = t.querySelector("[data-vsbs-footer]");
141
141
  if (K.value = [
142
- c.getBoundingClientRect().height,
142
+ f.getBoundingClientRect().height,
143
143
  u.getBoundingClientRect().height,
144
144
  C.getBoundingClientRect().height
145
145
  ], await N(), I.value = U.value.findIndex(
146
146
  (T) => T === _.value
147
147
  ), e.initialSnapPoint) {
148
148
  const T = e.initialSnapPoint;
149
- if (T < 0 || T >= h.value.length) {
149
+ if (T < 0 || T >= d.value.length) {
150
150
  console.warn("Index out of bounds");
151
151
  return;
152
152
  }
153
- let R;
154
- typeof h.value[T] == "number" ? R = b(h.value[T], {
155
- max: d.value
156
- }) : R = G(h.value[T], d.value), l.value = R;
153
+ let F;
154
+ typeof d.value[T] == "number" ? F = b(d.value[T], {
155
+ max: c.value
156
+ }) : F = G(d.value[T], c.value), l.value = F;
157
157
  } else
158
158
  l.value = b(_.value, {
159
- max: d.value
159
+ max: c.value
160
160
  });
161
161
  v.value = l.value, k.set(l.value), S.set(l.value), M = O(k, l.value, {
162
162
  duration: e.duration / 1e3,
@@ -172,18 +172,19 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
172
172
  i("closed");
173
173
  }, e.duration);
174
174
  }, se = (t) => {
175
- if (!h.value) return;
176
- if (t < 0 || t >= h.value.length) {
175
+ if (!d.value) return;
176
+ if (t < 0 || t >= d.value.length) {
177
177
  console.warn("Index out of bounds");
178
178
  return;
179
179
  }
180
180
  I.value = t;
181
181
  let u;
182
- typeof h.value[t] == "number" ? u = b(h.value[t], {
183
- max: d.value
184
- }) : u = G(h.value[t], d.value), l.value = u, M = O(k, l.value, {
182
+ typeof d.value[t] == "number" ? u = b(d.value[t], {
183
+ max: c.value
184
+ }) : u = G(d.value[t], c.value), l.value = u, M = O(k, l.value, {
185
185
  duration: e.duration / 1e3,
186
- ease: "easeInOut"
186
+ ease: "easeInOut",
187
+ onComplete: () => i("snapped", d.value.indexOf(d.value[t]))
187
188
  });
188
189
  };
189
190
  function ve(t) {
@@ -197,46 +198,50 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
197
198
  min: 0
198
199
  })
199
200
  )), k.set(
200
- b(ne(l.value, 0, V.value, 0.25), {
201
+ b(ne(l.value, 0, R.value, 0.25), {
201
202
  min: 0,
202
- max: d.value
203
+ max: c.value
203
204
  })
204
205
  ), ve(u.delta.y));
205
206
  }, X = () => {
206
207
  v.value = e.canSwipeClose ? [0, l.value].reduce(
207
- (u, c) => Math.abs(c - v.value) < Math.abs(u - v.value) ? c : u
208
+ (u, f) => Math.abs(f - v.value) < Math.abs(u - v.value) ? f : u
208
209
  ) : 0, M = O(S, v.value, {
209
210
  duration: e.duration / 1e3,
210
211
  ease: "easeInOut"
211
- }), v.value === l.value && (v.value = 0, j()), I.value = W.value;
212
+ }), v.value === l.value && (v.value = 0, j()), I.value = V.value;
212
213
  let t;
213
- typeof h.value[W.value] == "number" ? t = b(h.value[W.value], {
214
- max: d.value
214
+ typeof d.value[V.value] == "number" ? t = b(d.value[V.value], {
215
+ max: c.value
215
216
  }) : t = G(
216
- h.value[W.value],
217
- d.value
217
+ d.value[V.value],
218
+ c.value
218
219
  ), l.value = t, M = O(k, l.value, {
219
220
  duration: e.duration / 1e3,
220
- ease: "easeInOut"
221
+ ease: "easeInOut",
222
+ onComplete: () => i(
223
+ "snapped",
224
+ d.value.indexOf(d.value[V.value])
225
+ )
221
226
  }), M = O(S, 0, {
222
227
  duration: e.duration / 1e3,
223
228
  ease: "easeInOut"
224
229
  });
225
230
  }, Se = (t, u) => {
226
231
  if (l.value = w.value, v.value = S.get(), M.stop(), !g.value) return;
227
- const c = g.value.scrollTop === 0, C = u.delta.y > 0, T = U.value.length === 1, R = 0.5 > Math.abs(l.value - V.value);
232
+ const f = g.value.scrollTop === 0, C = u.delta.y > 0, T = U.value.length === 1, F = 0.5 > Math.abs(l.value - R.value);
228
233
  if (T) {
229
234
  if (!e.expandOnContentDrag) {
230
235
  s.value = !1;
231
236
  return;
232
237
  }
233
- S.get() === 0 && c && C && (s.value = !0), S.get() === 0 && c && !C && (s.value = !1);
238
+ S.get() === 0 && f && C && (s.value = !0), S.get() === 0 && f && !C && (s.value = !1);
234
239
  } else {
235
240
  if (!e.expandOnContentDrag) {
236
241
  s.value = !1;
237
242
  return;
238
243
  }
239
- s.value = !0, R && (C && c && (s.value = !0), !C && c && (s.value = !1), c || (s.value = !1));
244
+ s.value = !0, F && (C && f && (s.value = !0), !C && f && (s.value = !1), f || (s.value = !1));
240
245
  }
241
246
  }, Pe = async (t, u) => {
242
247
  if (await N(), !e.expandOnContentDrag) {
@@ -248,7 +253,7 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
248
253
  e.canSwipeClose ? b(v.value, { min: 0 }) : b(ne(v.value, -w.value, 0, 0.5), {
249
254
  min: 0
250
255
  })
251
- )), l.value > V.value && (l.value = V.value), l.value = b(l.value, { max: d.value }), U.value.length === 1 || l.value === V.value && (s.value = !1), k.set(l.value), ve(u.delta.y);
256
+ )), l.value > R.value && (l.value = R.value), l.value = b(l.value, { max: c.value }), U.value.length === 1 || l.value === R.value && (s.value = !1), k.set(l.value), ve(u.delta.y);
252
257
  }, ke = () => {
253
258
  e.blocking || (L.value = !0, z.value = !0);
254
259
  }, we = () => {
@@ -261,16 +266,16 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
261
266
  minQuietPeriodMs: e.duration,
262
267
  reducer: (t, u) => u
263
268
  });
264
- return q(h, (t, u) => {
269
+ return q(d, (t, u) => {
265
270
  if (y.value === !1 || !t || !u) return;
266
- const c = t[I.value], C = u[I.value];
267
- typeof c != "string" && typeof C != "string" && (l.value = b(c, {
268
- max: d.value
269
- }), c !== C && (M = O(k, l.value, {
271
+ const f = t[I.value], C = u[I.value];
272
+ typeof f != "string" && typeof C != "string" && (l.value = b(f, {
273
+ max: c.value
274
+ }), f !== C && (M = O(k, l.value, {
270
275
  duration: e.duration / 1e3,
271
276
  ease: "easeInOut"
272
277
  })));
273
- }), q(d, () => {
278
+ }), q(c, () => {
274
279
  Te.call(I.value);
275
280
  }), q(K, (t) => {
276
281
  i("instinctHeight", t);
@@ -278,14 +283,14 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
278
283
  Y.deactivate();
279
284
  }), a({ open: J, close: j, snapToPoint: se }), (t, u) => (ee(), Z(Ie, { to: "body" }, [
280
285
  te("div", je, [
281
- F(m(pe), null, {
286
+ $(m(pe), null, {
282
287
  default: B(() => [
283
- m(y) && t.blocking ? (ee(), Z(m($), {
288
+ m(y) && t.blocking ? (ee(), Z(m(A), {
284
289
  key: 0,
285
290
  ref_key: "backdrop",
286
291
  ref: H,
287
292
  "data-vsbs-backdrop": "",
288
- onClick: u[0] || (u[0] = (c) => ye()),
293
+ onClick: u[0] || (u[0] = (f) => ye()),
289
294
  transition: {
290
295
  ease: "easeInOut",
291
296
  duration: t.duration / 1e3
@@ -297,9 +302,9 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
297
302
  ]),
298
303
  _: 1
299
304
  }),
300
- F(m(pe), null, {
305
+ $(m(pe), null, {
301
306
  default: B(() => [
302
- m(y) ? (ee(), Z(m($), {
307
+ m(y) ? (ee(), Z(m(A), {
303
308
  key: 0,
304
309
  ref_key: "sheet",
305
310
  ref: r,
@@ -315,7 +320,7 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
315
320
  onTouchend: we
316
321
  }, {
317
322
  default: B(() => [
318
- F(m($), {
323
+ $(m(A), {
319
324
  ref_key: "sheetHeader",
320
325
  ref: p,
321
326
  "data-vsbs-header": "",
@@ -335,7 +340,7 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
335
340
  "data-vsbs-scroll": "",
336
341
  onScrollend: Ce
337
342
  }, [
338
- F(m($), {
343
+ $(m(A), {
339
344
  ref_key: "sheetContentWrapper",
340
345
  ref: x,
341
346
  "data-vsbs-content-wrapper": "",
@@ -356,9 +361,9 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
356
361
  _: 3
357
362
  }, 512)
358
363
  ], 544),
359
- F(m($), {
364
+ $(m(A), {
360
365
  ref_key: "sheetFooter",
361
- ref: f,
366
+ ref: h,
362
367
  "data-vsbs-footer": "",
363
368
  onPanStart: de,
364
369
  onPan: ce,
@@ -384,7 +389,7 @@ const je = { "data-vsbs-container": "" }, qe = /* @__PURE__ */ xe({
384
389
  for (const [e, i] of a)
385
390
  o[e] = i;
386
391
  return o;
387
- }, Ye = /* @__PURE__ */ Ne(qe, [["__scopeId", "data-v-6364f6e9"]]);
392
+ }, Ye = /* @__PURE__ */ Ne(qe, [["__scopeId", "data-v-4afa051f"]]);
388
393
  export {
389
394
  Ye as default
390
395
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- [data-vsbs-container][data-v-6364f6e9]{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-6364f6e9]{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-6364f6e9]: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-6364f6e9]{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;width:100%;will-change:height;z-index:2}[data-vsbs-sheet-show=true][data-v-6364f6e9]{visibility:visible}[data-vsbs-header][data-v-6364f6e9]{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-6364f6e9]: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-6364f6e9]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-6364f6e9]{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-6364f6e9]:empty{display:none}[data-vsbs-scroll][data-v-6364f6e9]{flex-grow:1;overflow-y:auto;overscroll-behavior:contain}[data-vsbs-content-wrapper][data-v-6364f6e9]{height:100%}[data-vsbs-content][data-v-6364f6e9]{display:grid;padding:8px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}
1
+ [data-vsbs-container][data-v-4afa051f]{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-4afa051f]{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-4afa051f]: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-4afa051f]{background-color:var(--vsbs-background, #fff);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-height:inherit;max-width:var(--vsbs-max-width, 640px);pointer-events:all;position:fixed;right:0;width:100%;will-change:height;z-index:2}[data-vsbs-sheet-show=true][data-v-4afa051f]{visibility:visible}[data-vsbs-header][data-v-4afa051f]{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-4afa051f]: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-4afa051f]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-4afa051f]{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-4afa051f]:empty{display:none}[data-vsbs-scroll][data-v-4afa051f]{flex-grow:1;overflow-y:auto;overscroll-behavior:contain}[data-vsbs-content-wrapper][data-v-4afa051f]{height:100%}[data-vsbs-content][data-v-4afa051f]{display:grid;padding:8px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}
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": "2.1.0",
35
+ "version": "2.1.2",
36
36
  "type": "module",
37
37
  "exports": {
38
38
  ".": {