@douxcode/vue-spring-bottom-sheet 2.3.0 → 2.4.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 CHANGED
@@ -143,6 +143,9 @@ For Nuxt 3, just wrap component in `<ClientOnly>`
143
143
  | expandOnContentDrag | Boolean | true | Enable expanding by dragging content |
144
144
  | teleprtTo | String \| RendererElement | body | Teleport to a specific element |
145
145
  | teleportDefer | Boolean | false | Defer teleporting until opened (Vue 3.5+ only) |
146
+ | headerClass | String | '' | Set header element class |
147
+ | contentClass | String | '' | Set content element class |
148
+ | footerClass | String | '' | Set footer element class |
146
149
 
147
150
  ## Exposed methods
148
151
 
@@ -156,14 +159,16 @@ Assuming there is `const bottomSheet = ref()`
156
159
 
157
160
  ## Events
158
161
 
159
- | Event | Description | Payload |
160
- | -------------- | -------------------------------------- | ----------------------- |
161
- | opened | Emitted when sheet finishes opening | - |
162
- | closed | Emitted when sheet finishes closing | - |
163
- | dragging-up | Emitted when user drags sheet upward | - |
164
- | dragging-down | Emitted when user drags sheet downward | - |
165
- | instinctHeight | Emitted when content height changes | height (number) |
166
- | snapped | Emitted when sheet finishes snapping | snapPointIndex (number) |
162
+ | Event | Description | Payload |
163
+ | -------------- | -------------------------------------- | ----------------------- |
164
+ | opened | Emitted when sheet finishes opening | - |
165
+ | opening-started | Emitted when sheet starts opening | - |
166
+ | closed | Emitted when sheet finishes closing | - |
167
+ | closing-started | Emitted when sheet starts closing | - |
168
+ | dragging-up | Emitted when user drags sheet upward | - |
169
+ | dragging-down | Emitted when user drags sheet downward | - |
170
+ | instinctHeight | Emitted when content height changes | height (number) |
171
+ | snapped | Emitted when sheet finishes snapping | snapPointIndex (number) |
167
172
 
168
173
  ## Acknowledgments
169
174
 
@@ -22,24 +22,12 @@ declare const __VLS_component: import('vue').DefineComponent<BottomSheetProps, {
22
22
  open: () => Promise<void>;
23
23
  close: () => void;
24
24
  snapToPoint: (index: number) => void;
25
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
26
- opened: () => any;
27
- closed: () => any;
28
- ready: () => any;
29
- "dragging-up": () => any;
30
- "dragging-down": () => any;
31
- snapped: (snapPointIndex?: number | undefined) => any;
32
- instinctHeight: (instinctHeight: number) => any;
33
- "update:modelValue": () => any;
25
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
+ [x: string]: any;
27
+ } & {
28
+ [x: string]: any;
34
29
  }, string, import('vue').PublicProps, Readonly<BottomSheetProps> & Readonly<{
35
- onOpened?: (() => any) | undefined;
36
- onClosed?: (() => any) | undefined;
37
- onReady?: (() => any) | undefined;
38
- "onDragging-up"?: (() => any) | undefined;
39
- "onDragging-down"?: (() => any) | undefined;
40
- onSnapped?: ((snapPointIndex?: number | undefined) => any) | undefined;
41
- onInstinctHeight?: ((instinctHeight: number) => any) | undefined;
42
- "onUpdate:modelValue"?: (() => any) | undefined;
30
+ [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
43
31
  }>, {
44
32
  duration: number;
45
33
  blocking: boolean;
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
- import { ref as P, computed as _, defineComponent as Me, watch as q, onMounted as Oe, toRefs as Be, nextTick as N, onUnmounted as Ie, createBlock as Z, openBlock as ee, Teleport as Ee, createElementVNode as te, createVNode as $, unref as m, withCtx as E, createCommentVNode as pe, normalizeStyle as _e, normalizeClass as ae, renderSlot as ne } from "vue";
2
- import { useMotionValue as he, animate as B, AnimatePresence as ge, Motion as A } from "motion-v";
3
- import { useVModel as De, useWindowSize as He, useElementBounding as Q, useScrollLock as me } from "@vueuse/core";
4
- import { useFocusTrap as Ve } from "@vueuse/integrations/useFocusTrap";
1
+ import { ref as P, computed as _, defineComponent as Be, watch as q, onMounted as Ie, toRefs as Ee, nextTick as N, onUnmounted as _e, createBlock as te, openBlock as ae, Teleport as De, createElementVNode as ne, createVNode as $, unref as m, withCtx as E, createCommentVNode as ge, normalizeStyle as He, normalizeClass as oe, renderSlot as le } from "vue";
2
+ import { useMotionValue as me, animate as B, AnimatePresence as be, Motion as A } from "motion-v";
3
+ import { useVModel as Ve, useWindowSize as Re, useElementBounding as Q, useScrollLock as ye } from "@vueuse/core";
4
+ import { useFocusTrap as Fe } from "@vueuse/integrations/useFocusTrap";
5
5
  function G(n, a) {
6
6
  const o = parseFloat(n);
7
7
  return a * o / 100;
8
8
  }
9
- function Re(n, a, o) {
9
+ function $e(n, a, o) {
10
10
  const t = P(0), s = _(() => n.value.map((p) => typeof p == "string" ? G(p, o.value) : p)), y = _(() => Math.min(...s.value)), r = _(() => Math.max(...s.value)), h = _(() => {
11
11
  const p = s.value.reduce(
12
12
  (g, x) => Math.abs(x - a.value) < Math.abs(g - a.value) ? x : g
@@ -21,17 +21,17 @@ function Re(n, a, o) {
21
21
  closestSnapPointIndex: h
22
22
  };
23
23
  }
24
- function Fe(n, a, o) {
24
+ function Ae(n, a, o) {
25
25
  let t = (s) => n(s, ...a);
26
26
  return o === void 0 ? t : Object.assign(t, { lazy: o, lazyArgs: a });
27
27
  }
28
- function $e(n, a, o) {
28
+ function We(n, a, o) {
29
29
  let t = n.length - a.length;
30
30
  if (t === 0) return n(...a);
31
- if (t === 1) return Fe(n, a, o);
31
+ if (t === 1) return Ae(n, a, o);
32
32
  throw new Error("Wrong number of arguments");
33
33
  }
34
- function Ae(n, { triggerAt: a = "end", minQuietPeriodMs: o, maxBurstDurationMs: t, minGapMs: s, reducer: y = We }) {
34
+ function ze(n, { triggerAt: a = "end", minQuietPeriodMs: o, maxBurstDurationMs: t, minGapMs: s, reducer: y = Le }) {
35
35
  let r, h, p, g, x = () => {
36
36
  let i = p;
37
37
  i !== void 0 && (p = void 0, n(i), s !== void 0 && (h = setTimeout(D, s)));
@@ -60,24 +60,24 @@ function Ae(n, { triggerAt: a = "end", minQuietPeriodMs: o, maxBurstDurationMs:
60
60
  return r === void 0 && h === void 0;
61
61
  } };
62
62
  }
63
- var We = () => "";
63
+ var Le = () => "";
64
64
  function b(...n) {
65
- return $e(ze, n);
65
+ return We(je, n);
66
66
  }
67
- var ze = (n, { min: a, max: o }) => a !== void 0 && n < a ? a : o !== void 0 && n > o ? o : n;
68
- function Le(n, a, o) {
67
+ var je = (n, { min: a, max: o }) => a !== void 0 && n < a ? a : o !== void 0 && n > o ? o : n;
68
+ function qe(n, a, o) {
69
69
  return Math.max(a, Math.min(n, o));
70
70
  }
71
- function je(n, a) {
71
+ function Ne(n, a) {
72
72
  return Math.pow(n, a * 5);
73
73
  }
74
- function be(n, a, o) {
75
- return a === 0 || Math.abs(a) === 1 / 0 ? je(n, o) : n * a * o / (a + o * n);
74
+ function Se(n, a, o) {
75
+ return a === 0 || Math.abs(a) === 1 / 0 ? Ne(n, o) : n * a * o / (a + o * n);
76
76
  }
77
- function oe(n, a, o, t = 0.15) {
78
- return t === 0 ? Le(n, a, o) : n < a ? -be(a - n, o - a, t) + a : n > o ? +be(n - o, o - a, t) + o : n;
77
+ function ue(n, a, o, t = 0.15) {
78
+ return t === 0 ? qe(n, a, o) : n < a ? -Se(a - n, o - a, t) + a : n > o ? +Se(n - o, o - a, t) + o : n;
79
79
  }
80
- const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
80
+ const Qe = { "data-vsbs-container": "" }, Ge = /* @__PURE__ */ Be({
81
81
  __name: "BottomSheet",
82
82
  props: {
83
83
  duration: { default: 250 },
@@ -94,52 +94,55 @@ const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
94
94
  contentClass: {},
95
95
  footerClass: {}
96
96
  },
97
- emits: ["opened", "closed", "ready", "dragging-up", "dragging-down", "snapped", "instinctHeight", "update:modelValue"],
97
+ emits: ["opened", "opening-started", "closed", "closing-started", "ready", "dragging-up", "dragging-down", "snapped", "instinctHeight", "update:modelValue"],
98
98
  setup(n, { expose: a, emit: o }) {
99
- const t = n, s = o, y = De(t, "modelValue", s, {
99
+ const t = n, s = o, y = Ve(t, "modelValue", s, {
100
100
  passive: !0
101
101
  });
102
102
  q(y, (e) => {
103
- e && J();
104
- }), Oe(() => {
105
- y.value && J();
103
+ e && X();
104
+ }), Ie(() => {
105
+ y.value && X();
106
106
  });
107
- const r = P(), h = P(null), p = P(null), g = P(null), x = P(null), D = P(null), H = P(null), i = P(t.expandOnContentDrag), { height: c } = He(), { height: k } = Q(r), { height: W } = Q(h), { height: le } = Q(D), { height: ue } = Q(p), K = _({
107
+ const r = P(), h = P(null), p = P(null), g = P(null), x = P(null), D = P(null), H = P(null), i = P(t.expandOnContentDrag), { height: c } = Re(), { height: k } = Q(r), { height: W } = Q(h), { height: se } = Q(D), { height: re } = Q(p), K = _({
108
108
  get() {
109
109
  return b(
110
- Math.ceil(le.value + W.value + ue.value),
110
+ Math.ceil(se.value + W.value + re.value),
111
111
  {
112
112
  max: c.value
113
113
  }
114
114
  );
115
115
  },
116
116
  set(e) {
117
- [W.value, le.value, ue.value] = e;
117
+ [W.value, se.value, re.value] = e;
118
118
  }
119
- }), l = P(0), v = P(0), C = he(0), S = he(0), { snapPoints: ye } = Be(t), d = _(() => ye.value ?? [K.value]), {
119
+ }), l = P(0), v = P(0), C = me(0), S = me(0), { snapPoints: Pe } = Ee(t), d = _(() => Pe.value ?? [K.value]), {
120
120
  flattenedSnapPoints: U,
121
121
  currentSnapPointIndex: I,
122
122
  closestSnapPointIndex: V,
123
123
  minSnapPoint: O,
124
124
  maxSnapPoint: R
125
- } = Re(d, l, c);
125
+ } = $e(d, l, c);
126
126
  let M;
127
- const z = me(document.body), L = me(document.documentElement), Y = Ve([r, H], {
127
+ const z = ye(document.body), L = ye(document.documentElement), Y = Fe([r, H], {
128
128
  immediate: !1,
129
129
  fallbackFocus: () => r.value || document.body
130
130
  });
131
- function se(e) {
132
- i.value = !0, re(e);
131
+ function ie(e) {
132
+ i.value = !0, ve(e);
133
133
  }
134
- function re(e) {
134
+ function ve(e) {
135
135
  i.value && e.preventDefault();
136
136
  }
137
- const ie = (e) => {
137
+ const de = (e) => {
138
138
  e.key === "Escape" && j();
139
- }, Se = () => {
139
+ }, Ce = () => {
140
140
  t.canBackdropClose && j();
141
- }, J = async () => {
142
- y.value = !0, t.blocking && (z.value = !0, L.value = !0), await N();
141
+ };
142
+ let J = !1;
143
+ const X = async () => {
144
+ if (J) return;
145
+ y.value = !0, J = !0, s("opening-started"), t.blocking && (z.value = !0, L.value = !0), await N();
143
146
  const e = r.value.$el;
144
147
  k.value = e.getBoundingClientRect().height;
145
148
  const u = e.querySelector("[data-vsbs-content]"), f = e.querySelector("[data-vsbs-header]"), w = e.querySelector("[data-vsbs-footer]");
@@ -169,14 +172,16 @@ const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
169
172
  }), M = B(S, 0, {
170
173
  duration: t.duration / 1e3,
171
174
  ease: "easeInOut"
172
- }), window.addEventListener("keydown", ie), t.blocking && setTimeout(() => {
175
+ }), window.addEventListener("keydown", de), J = !1, t.blocking && setTimeout(() => {
173
176
  C.get() < 1 && (s("opened"), Y.activate());
174
177
  }, t.duration);
175
- }, j = () => {
176
- y.value = !1, t.blocking && (z.value = !1, L.value = !1), window.removeEventListener("keydown", ie), t.blocking && Y.deactivate(), setTimeout(() => {
177
- s("closed");
178
- }, t.duration);
179
- }, ve = (e) => {
178
+ };
179
+ let Z = !1;
180
+ const j = () => {
181
+ Z || (y.value = !1, Z = !0, s("closing-started"), t.blocking && (z.value = !1, L.value = !1), window.removeEventListener("keydown", de), t.blocking && Y.deactivate(), setTimeout(() => {
182
+ s("closed"), Z = !1;
183
+ }, t.duration));
184
+ }, ce = (e) => {
180
185
  if (!d.value) return;
181
186
  if (e < 0 || e >= d.value.length) {
182
187
  console.warn("Index out of bounds");
@@ -192,23 +197,23 @@ const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
192
197
  onComplete: () => s("snapped", d.value.indexOf(d.value[e]))
193
198
  });
194
199
  };
195
- function de(e) {
200
+ function fe(e) {
196
201
  e > 0 ? s("dragging-down") : e < 0 && s("dragging-up");
197
202
  }
198
- const ce = () => {
203
+ const pe = () => {
199
204
  l.value = k.value, v.value = S.get(), C.jump(l.value), S.jump(v.value);
200
- }, fe = async (e, u) => {
205
+ }, he = async (e, u) => {
201
206
  await N(), r.value && (v.value <= 0 && (l.value -= u.delta.y), l.value <= O.value && (l.value = O.value, v.value += u.delta.y, S.set(
202
- t.canSwipeClose ? b(v.value, { min: 0 }) : b(oe(v.value, -k.value, 0, 0.5), {
207
+ t.canSwipeClose ? b(v.value, { min: 0 }) : b(ue(v.value, -k.value, 0, 0.5), {
203
208
  min: 0
204
209
  })
205
210
  )), C.set(
206
- b(oe(l.value, 0, R.value, 0.25), {
211
+ b(ue(l.value, 0, R.value, 0.25), {
207
212
  min: 0,
208
213
  max: c.value
209
214
  })
210
- ), de(u.delta.y));
211
- }, X = () => {
215
+ ), fe(u.delta.y));
216
+ }, ee = () => {
212
217
  v.value = t.canSwipeClose ? [0, l.value].reduce(
213
218
  (u, f) => Math.abs(f - v.value) < Math.abs(u - v.value) ? f : u
214
219
  ) : 0, M = B(S, v.value, {
@@ -232,7 +237,7 @@ const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
232
237
  duration: t.duration / 1e3,
233
238
  ease: "easeInOut"
234
239
  });
235
- }, Pe = (e, u) => {
240
+ }, ke = (e, u) => {
236
241
  if (l.value = k.value, v.value = S.get(), M.stop(), !g.value) return;
237
242
  const f = g.value.scrollTop === 0, w = u.delta.y > 0, T = U.value.length === 1, F = 0.5 > Math.abs(l.value - R.value);
238
243
  if (T) {
@@ -248,26 +253,26 @@ const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
248
253
  }
249
254
  i.value = !0, F && (w && f && (i.value = !0), !w && f && (i.value = !1), f || (i.value = !1));
250
255
  }
251
- }, Ce = async (e, u) => {
256
+ }, we = async (e, u) => {
252
257
  if (await N(), !t.expandOnContentDrag) {
253
258
  i.value = !1;
254
259
  return;
255
260
  }
256
261
  if (!r.value) return;
257
262
  v.value === 0 && i.value && t.expandOnContentDrag && (l.value -= u.delta.y), l.value <= O.value && (l.value = O.value, i.value && t.expandOnContentDrag && (v.value += u.delta.y), v.value = b(v.value, { min: 0, max: O.value }), S.set(
258
- t.canSwipeClose ? b(v.value, { min: 0 }) : b(oe(v.value, -k.value, 0, 0.5), {
263
+ t.canSwipeClose ? b(v.value, { min: 0 }) : b(ue(v.value, -k.value, 0, 0.5), {
259
264
  min: 0
260
265
  })
261
- )), l.value > R.value && (l.value = R.value), l.value = b(l.value, { max: c.value }), U.value.length === 1 || l.value === R.value && (i.value = !1), C.set(l.value), de(u.delta.y);
262
- }, ke = () => {
266
+ )), l.value > R.value && (l.value = R.value), l.value = b(l.value, { max: c.value }), U.value.length === 1 || l.value === R.value && (i.value = !1), C.set(l.value), fe(u.delta.y);
267
+ }, Te = () => {
263
268
  t.blocking || (z.value = !0, L.value = !0);
264
- }, we = () => {
269
+ }, xe = () => {
265
270
  t.blocking || (z.value = !1, L.value = !1);
266
- }, Te = () => {
271
+ }, Me = () => {
267
272
  if (!g.value) return;
268
273
  const e = g.value.scrollTop === 0;
269
274
  i.value = e;
270
- }, xe = Ae((e) => ve(e), {
275
+ }, Oe = ze((e) => ce(e), {
271
276
  minQuietPeriodMs: t.duration,
272
277
  reducer: (e, u) => u
273
278
  });
@@ -281,24 +286,24 @@ const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
281
286
  ease: "easeInOut"
282
287
  })));
283
288
  }), q(c, () => {
284
- xe.call(I.value);
289
+ Oe.call(I.value);
285
290
  }), q(K, (e) => {
286
291
  s("instinctHeight", e);
287
- }), Ie(() => {
292
+ }), _e(() => {
288
293
  Y.deactivate();
289
- }), a({ open: J, close: j, snapToPoint: ve }), (e, u) => (ee(), Z(Ee, {
294
+ }), a({ open: X, close: j, snapToPoint: ce }), (e, u) => (ae(), te(De, {
290
295
  to: e.teleportTo,
291
296
  defer: e.teleportDefer
292
297
  }, [
293
- te("div", qe, [
294
- $(m(ge), null, {
298
+ ne("div", Qe, [
299
+ $(m(be), null, {
295
300
  default: E(() => [
296
- m(y) && e.blocking ? (ee(), Z(m(A), {
301
+ m(y) && e.blocking ? (ae(), te(m(A), {
297
302
  key: 0,
298
303
  ref_key: "backdrop",
299
304
  ref: H,
300
305
  "data-vsbs-backdrop": "",
301
- onClick: u[0] || (u[0] = (f) => Se()),
306
+ onClick: u[0] || (u[0] = (f) => Ce()),
302
307
  transition: {
303
308
  ease: "easeInOut",
304
309
  duration: e.duration / 1e3
@@ -306,66 +311,66 @@ const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
306
311
  initial: { opacity: 0 },
307
312
  animate: { opacity: 1 },
308
313
  exit: { opacity: 0 }
309
- }, null, 8, ["transition"])) : pe("", !0)
314
+ }, null, 8, ["transition"])) : ge("", !0)
310
315
  ]),
311
316
  _: 1
312
317
  }),
313
- $(m(ge), null, {
318
+ $(m(be), null, {
314
319
  default: E(() => [
315
- m(y) ? (ee(), Z(m(A), {
320
+ m(y) ? (ae(), te(m(A), {
316
321
  key: 0,
317
322
  ref_key: "sheet",
318
323
  ref: r,
319
324
  exit: { y: "100%", height: m(k) },
320
325
  initial: { y: "100%" },
321
- style: _e({ y: m(S), height: m(C) }),
326
+ style: He({ y: m(S), height: m(C) }),
322
327
  "data-vsbs-shadow": !e.blocking,
323
328
  "data-vsbs-sheet-show": m(y),
324
329
  "aria-modal": "true",
325
330
  "data-vsbs-sheet": "",
326
331
  tabindex: "-1",
327
- onTouchstart: ke,
328
- onTouchend: we
332
+ onTouchstart: Te,
333
+ onTouchend: xe
329
334
  }, {
330
335
  default: E(() => [
331
336
  $(m(A), {
332
337
  ref_key: "sheetHeader",
333
338
  ref: h,
334
339
  "data-vsbs-header": "",
335
- onPanStart: ce,
336
- onPan: fe,
337
- onPanEnd: X,
338
- onTouchmove: se,
339
- class: ae(e.headerClass)
340
+ onPanStart: pe,
341
+ onPan: he,
342
+ onPanEnd: ee,
343
+ onTouchmove: ie,
344
+ class: oe(e.headerClass)
340
345
  }, {
341
346
  default: E(() => [
342
- ne(e.$slots, "header", {}, void 0, !0)
347
+ le(e.$slots, "header", {}, void 0, !0)
343
348
  ]),
344
349
  _: 3
345
350
  }, 8, ["class"]),
346
- te("div", {
351
+ ne("div", {
347
352
  ref_key: "sheetScroll",
348
353
  ref: g,
349
354
  "data-vsbs-scroll": "",
350
- onScrollend: Te
355
+ onScrollend: Me
351
356
  }, [
352
357
  $(m(A), {
353
358
  ref_key: "sheetContentWrapper",
354
359
  ref: x,
355
360
  "data-vsbs-content-wrapper": "",
356
- onPanStart: Pe,
357
- onPan: Ce,
358
- onPanEnd: X,
359
- onTouchmove: re
361
+ onPanStart: ke,
362
+ onPan: we,
363
+ onPanEnd: ee,
364
+ onTouchmove: ve
360
365
  }, {
361
366
  default: E(() => [
362
- te("div", {
367
+ ne("div", {
363
368
  ref_key: "sheetContent",
364
369
  ref: D,
365
370
  "data-vsbs-content": "",
366
- class: ae(e.contentClass)
371
+ class: oe(e.contentClass)
367
372
  }, [
368
- ne(e.$slots, "default", {}, void 0, !0)
373
+ le(e.$slots, "default", {}, void 0, !0)
369
374
  ], 2)
370
375
  ]),
371
376
  _: 3
@@ -375,32 +380,32 @@ const qe = { "data-vsbs-container": "" }, Ne = /* @__PURE__ */ Me({
375
380
  ref_key: "sheetFooter",
376
381
  ref: p,
377
382
  "data-vsbs-footer": "",
378
- onPanStart: ce,
379
- onPan: fe,
380
- onPanEnd: X,
381
- onTouchmove: se,
382
- class: ae(e.footerClass)
383
+ onPanStart: pe,
384
+ onPan: he,
385
+ onPanEnd: ee,
386
+ onTouchmove: ie,
387
+ class: oe(e.footerClass)
383
388
  }, {
384
389
  default: E(() => [
385
- ne(e.$slots, "footer", {}, void 0, !0)
390
+ le(e.$slots, "footer", {}, void 0, !0)
386
391
  ]),
387
392
  _: 3
388
393
  }, 8, ["class"])
389
394
  ]),
390
395
  _: 3
391
- }, 8, ["exit", "style", "data-vsbs-shadow", "data-vsbs-sheet-show"])) : pe("", !0)
396
+ }, 8, ["exit", "style", "data-vsbs-shadow", "data-vsbs-sheet-show"])) : ge("", !0)
392
397
  ]),
393
398
  _: 3
394
399
  })
395
400
  ])
396
401
  ], 8, ["to", "defer"]));
397
402
  }
398
- }), Qe = (n, a) => {
403
+ }), Ke = (n, a) => {
399
404
  const o = n.__vccOpts || n;
400
405
  for (const [t, s] of a)
401
406
  o[t] = s;
402
407
  return o;
403
- }, Je = /* @__PURE__ */ Qe(Ne, [["__scopeId", "data-v-e9faa2c0"]]);
408
+ }, Ze = /* @__PURE__ */ Ke(Ge, [["__scopeId", "data-v-ff3b8e9e"]]);
404
409
  export {
405
- Je as default
410
+ Ze as default
406
411
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- [data-vsbs-container][data-v-e9faa2c0]{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-e9faa2c0]{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-e9faa2c0]: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-e9faa2c0]{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-e9faa2c0]{visibility:visible}[data-vsbs-header][data-v-e9faa2c0]{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-e9faa2c0]: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-e9faa2c0]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-e9faa2c0]{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-e9faa2c0]:empty{display:none}[data-vsbs-scroll][data-v-e9faa2c0]{flex-grow:1;overflow-y:auto;overscroll-behavior:none}[data-vsbs-content-wrapper][data-v-e9faa2c0]{height:100%}[data-vsbs-content][data-v-e9faa2c0]{display:grid;padding:8px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}
1
+ [data-vsbs-container][data-v-ff3b8e9e]{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-ff3b8e9e]{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-ff3b8e9e]: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-ff3b8e9e]{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-ff3b8e9e]{visibility:visible}[data-vsbs-header][data-v-ff3b8e9e]{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-ff3b8e9e]: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-ff3b8e9e]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-ff3b8e9e]{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-ff3b8e9e]:empty{display:none}[data-vsbs-scroll][data-v-ff3b8e9e]{flex-grow:1;overflow-y:auto;overscroll-behavior:none}[data-vsbs-content-wrapper][data-v-ff3b8e9e]{height:100%}[data-vsbs-content][data-v-ff3b8e9e]{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.3.0",
35
+ "version": "2.4.0",
36
36
  "type": "module",
37
37
  "exports": {
38
38
  ".": {