@douxcode/vue-spring-bottom-sheet 3.0.0-next.1 → 3.0.0-next.3

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.
@@ -11,7 +11,6 @@ declare function __VLS_template(): {
11
11
  sheet: HTMLDivElement;
12
12
  sheetHeader: HTMLDivElement;
13
13
  sheetScroll: HTMLDivElement;
14
- sheetContentWrapper: HTMLDivElement;
15
14
  sheetContent: HTMLDivElement;
16
15
  sheetFooter: HTMLDivElement;
17
16
  };
@@ -22,12 +21,28 @@ declare const __VLS_component: import('vue').DefineComponent<BottomSheetProps, {
22
21
  open: () => Promise<void>;
23
22
  close: () => void;
24
23
  snapToPoint: (index: number) => void;
25
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
- [x: string]: any;
27
- } & {
28
- [x: string]: any;
24
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
25
+ opened: () => any;
26
+ "opening-started": () => any;
27
+ closed: () => any;
28
+ "closing-started": () => any;
29
+ ready: () => any;
30
+ "dragging-up": () => any;
31
+ "dragging-down": () => any;
32
+ snapped: (snapPointIndex?: number | undefined) => any;
33
+ instinctHeight: (instinctHeight: number) => any;
34
+ "update:modelValue": () => any;
29
35
  }, string, import('vue').PublicProps, Readonly<BottomSheetProps> & Readonly<{
30
- [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
36
+ onOpened?: (() => any) | undefined;
37
+ "onOpening-started"?: (() => any) | undefined;
38
+ onClosed?: (() => any) | undefined;
39
+ "onClosing-started"?: (() => any) | undefined;
40
+ onReady?: (() => any) | undefined;
41
+ "onDragging-up"?: (() => any) | undefined;
42
+ "onDragging-down"?: (() => any) | undefined;
43
+ onSnapped?: ((snapPointIndex?: number | undefined) => any) | undefined;
44
+ onInstinctHeight?: ((instinctHeight: number) => any) | undefined;
45
+ "onUpdate:modelValue"?: (() => any) | undefined;
31
46
  }>, {
32
47
  duration: number;
33
48
  blocking: boolean;
@@ -41,7 +56,6 @@ declare const __VLS_component: import('vue').DefineComponent<BottomSheetProps, {
41
56
  sheet: HTMLDivElement;
42
57
  sheetHeader: HTMLDivElement;
43
58
  sheetScroll: HTMLDivElement;
44
- sheetContentWrapper: HTMLDivElement;
45
59
  sheetContent: HTMLDivElement;
46
60
  sheetFooter: HTMLDivElement;
47
61
  }, any>;
package/dist/index.mjs CHANGED
@@ -1,112 +1,114 @@
1
- import { ref as m, computed as I, defineComponent as Le, useCssVars as _e, watch as J, onMounted as Ae, toRefs as Ve, nextTick as we, onUnmounted as We, createElementBlock as le, openBlock as W, Fragment as ze, createBlock as Se, Teleport as Ce, createVNode as be, Transition as ye, withCtx as Pe, createCommentVNode as Te, unref as oe, normalizeStyle as Ne, createElementVNode as z, normalizeClass as ue, renderSlot as se } from "vue";
2
- import { useVModel as qe, useWindowSize as Qe, useElementBounding as X, useScrollLock as ke } from "@vueuse/core";
3
- import { useFocusTrap as je } from "@vueuse/integrations/useFocusTrap";
4
- function N(o, l) {
5
- const s = parseFloat(o);
6
- return l * s / 100;
1
+ import { ref as m, computed as $, defineComponent as qe, useCssVars as ze, watch as ee, onMounted as We, toRefs as Qe, nextTick as Se, onUnmounted as je, createElementBlock as ue, openBlock as Q, Fragment as Ge, createBlock as Ce, Teleport as xe, createVNode as ye, Transition as Pe, withCtx as Te, createCommentVNode as ke, unref as se, normalizeStyle as Ke, createElementVNode as j, normalizeClass as re, renderSlot as ie } from "vue";
2
+ import { useVModel as Ue, useWindowSize as Je, useElementBounding as te, useScrollLock as Ye } from "@vueuse/core";
3
+ import { useFocusTrap as Xe } from "@vueuse/integrations/useFocusTrap";
4
+ function G(a, o) {
5
+ const s = parseFloat(a);
6
+ return o * s / 100;
7
7
  }
8
- function Ge(o, l, s) {
9
- const t = m(0), v = I(() => o.value.map((b) => typeof b == "string" ? N(b, s.value) : b)), C = I(() => Math.min(...v.value)), i = I(() => Math.max(...v.value)), y = I(() => {
10
- const b = v.value.reduce(
11
- (P, w) => Math.abs(w - l.value) < Math.abs(P - l.value) ? w : P
8
+ function Ze(a, o, s) {
9
+ const t = m(0), v = $(() => a.value.map((C) => typeof C == "string" ? G(C, s.value) : C)), S = $(() => Math.min(...v.value)), i = $(() => Math.max(...v.value)), x = $(() => {
10
+ const C = v.value.reduce(
11
+ (y, h) => Math.abs(h - o.value) < Math.abs(y - o.value) ? h : y
12
12
  );
13
- return v.value.indexOf(b);
13
+ return v.value.indexOf(C);
14
14
  });
15
15
  return {
16
16
  currentSnapPointIndex: t,
17
17
  flattenedSnapPoints: v,
18
- minSnapPoint: C,
18
+ minSnapPoint: S,
19
19
  maxSnapPoint: i,
20
- closestSnapPointIndex: y
20
+ closestSnapPointIndex: x
21
21
  };
22
22
  }
23
- function Ke(o = {}) {
24
- const { velocityThreshold: l = 0.5 } = o, s = m(0), t = m(0), v = m(0), C = m(0), i = m([]);
23
+ function _e(a = {}) {
24
+ const { velocityThreshold: o = 0.5 } = a, s = m(0), t = m(0), v = m(0), S = m(0), i = m([]);
25
25
  return {
26
- start: (w) => {
27
- const S = performance.now();
28
- s.value = w, t.value = S, v.value = w, C.value = S, i.value = [{ y: w, time: S }];
26
+ start: (h) => {
27
+ const w = performance.now();
28
+ s.value = h, t.value = w, v.value = h, S.value = w, i.value = [{ y: h, time: w }];
29
29
  },
30
- update: (w) => {
31
- const S = performance.now();
32
- v.value = w, C.value = S, i.value.push({ y: w, time: S });
33
- const M = S - 100;
34
- i.value = i.value.filter((d) => d.time > M).slice(-5);
30
+ update: (h) => {
31
+ const w = performance.now();
32
+ v.value = h, S.value = w, i.value.push({ y: h, time: w });
33
+ const f = w - 100;
34
+ i.value = i.value.filter((d) => d.time > f).slice(-5);
35
35
  },
36
36
  end: () => {
37
- const w = i.value;
38
- let S = 0;
39
- if (w.length >= 2) {
40
- const h = w[0], D = w[w.length - 1], $ = D.y - h.y, L = D.time - h.time;
41
- L > 0 && (S = $ / L);
37
+ const h = i.value;
38
+ let w = 0;
39
+ if (h.length >= 2) {
40
+ const M = h[0], O = h[h.length - 1];
41
+ if (M && O) {
42
+ const F = O.y - M.y, L = O.time - M.time;
43
+ L > 0 && (w = F / L);
44
+ }
42
45
  }
43
- const M = Math.abs(S) >= l;
46
+ const f = Math.abs(w) >= o;
44
47
  let d = "none";
45
- return M && (d = S < 0 ? "up" : "down"), i.value = [], {
48
+ return f && (d = w < 0 ? "up" : "down"), i.value = [], {
46
49
  direction: d,
47
- velocity: Math.abs(S),
48
- isSwipe: M
50
+ velocity: Math.abs(w),
51
+ isSwipe: f
49
52
  };
50
53
  }
51
54
  };
52
55
  }
53
- function Ue(o, l, s) {
54
- let t = (v) => o(v, ...l);
55
- return s === void 0 ? t : Object.assign(t, { lazy: s, lazyArgs: l });
56
+ function et(a, o, s) {
57
+ let t = (v) => a(v, ...o);
58
+ return s === void 0 ? t : Object.assign(t, { lazy: s, lazyArgs: o });
59
+ }
60
+ function tt(a, o, s) {
61
+ let t = a.length - o.length;
62
+ if (t === 0) return a(...o);
63
+ if (t === 1) return et(a, o, s);
64
+ throw Error("Wrong number of arguments");
56
65
  }
57
- function Je(o, l, s) {
58
- let t = o.length - l.length;
59
- if (t === 0) return o(...l);
60
- if (t === 1) return Ue(o, l, s);
61
- throw new Error("Wrong number of arguments");
66
+ function P(...a) {
67
+ return tt(nt, a);
62
68
  }
63
- function Xe(o, { triggerAt: l = "end", minQuietPeriodMs: s, maxBurstDurationMs: t, minGapMs: v, reducer: C = Ze }) {
64
- let i, y, b, P, w = () => {
65
- let d = b;
66
- d !== void 0 && (b = void 0, o(d), v !== void 0 && (y = setTimeout(S, v)));
67
- }, S = () => {
68
- clearTimeout(y), y = void 0, i === void 0 && w();
69
- }, M = () => {
70
- clearTimeout(i), i = void 0, P = void 0, y === void 0 && w();
69
+ const nt = (a, { min: o, max: s }) => o !== void 0 && a < o ? o : s !== void 0 && a > s ? s : a, Ee = /* @__PURE__ */ Symbol("funnel/voidReducer"), at = () => Ee;
70
+ function lt(a, { triggerAt: o = "end", minQuietPeriodMs: s, maxBurstDurationMs: t, minGapMs: v, reducer: S = at }) {
71
+ let i, x, C, y, h = () => {
72
+ let d = C;
73
+ d !== void 0 && (C = void 0, d === Ee ? a() : a(d), v !== void 0 && (x = setTimeout(w, v)));
74
+ }, w = () => {
75
+ clearTimeout(x), x = void 0, i === void 0 && h();
76
+ }, f = () => {
77
+ clearTimeout(i), i = void 0, y = void 0, x === void 0 && h();
71
78
  };
72
79
  return { call: (...d) => {
73
- let h = i === void 0 && y === void 0;
74
- if ((l !== "start" || h) && (b = C(b, ...d)), !(i === void 0 && !h)) {
80
+ let M = i === void 0 && x === void 0;
81
+ if ((o !== "start" || M) && (C = S(C, ...d)), !(i === void 0 && !M)) {
75
82
  if (s !== void 0 || t !== void 0 || v === void 0) {
76
83
  clearTimeout(i);
77
- let D = Date.now();
78
- P ?? (P = D);
79
- let $ = t === void 0 ? s ?? 0 : Math.min(s ?? t, t - (D - P));
80
- i = setTimeout(M, $);
84
+ let O = Date.now();
85
+ y ??= O;
86
+ let F = t === void 0 ? s ?? 0 : Math.min(s ?? t, t - (O - y));
87
+ i = setTimeout(f, F);
81
88
  }
82
- l !== "end" && h && w();
89
+ o !== "end" && M && h();
83
90
  }
84
91
  }, cancel: () => {
85
- clearTimeout(i), i = void 0, P = void 0, clearTimeout(y), y = void 0, b = void 0;
92
+ clearTimeout(i), i = void 0, y = void 0, clearTimeout(x), x = void 0, C = void 0;
86
93
  }, flush: () => {
87
- M(), S();
94
+ f(), w();
88
95
  }, get isIdle() {
89
- return i === void 0 && y === void 0;
96
+ return i === void 0 && x === void 0;
90
97
  } };
91
98
  }
92
- var Ze = () => "";
93
- function T(...o) {
94
- return Je(et, o);
95
- }
96
- var et = (o, { min: l, max: s }) => l !== void 0 && o < l ? l : s !== void 0 && o > s ? s : o;
97
- function tt(o, l, s) {
98
- return Math.max(l, Math.min(o, s));
99
+ function ot(a, o, s) {
100
+ return Math.max(o, Math.min(a, s));
99
101
  }
100
- function nt(o, l) {
101
- return Math.pow(o, l * 5);
102
+ function ut(a, o) {
103
+ return Math.pow(a, o * 5);
102
104
  }
103
- function xe(o, l, s) {
104
- return l === 0 || Math.abs(l) === 1 / 0 ? nt(o, s) : o * l * s / (l + s * o);
105
+ function Me(a, o, s) {
106
+ return o === 0 || Math.abs(o) === 1 / 0 ? ut(a, s) : a * o * s / (o + s * a);
105
107
  }
106
- function re(o, l, s, t = 0.15) {
107
- return t === 0 ? tt(o, l, s) : o < l ? -xe(l - o, s - l, t) + l : o > s ? +xe(o - s, s - l, t) + s : o;
108
+ function ve(a, o, s, t = 0.15) {
109
+ return t === 0 ? ot(a, o, s) : a < o ? -Me(o - a, s - o, t) + o : a > s ? +Me(a - s, s - o, t) + s : a;
108
110
  }
109
- const at = ["data-vsbs-shadow", "data-vsbs-sheet-show"], lt = /* @__PURE__ */ Le({
111
+ const st = ["data-vsbs-shadow", "data-vsbs-sheet-show"], rt = /* @__PURE__ */ qe({
110
112
  __name: "BottomSheet",
111
113
  props: {
112
114
  duration: { default: 250 },
@@ -125,385 +127,404 @@ const at = ["data-vsbs-shadow", "data-vsbs-sheet-show"], lt = /* @__PURE__ */ Le
125
127
  footerClass: {}
126
128
  },
127
129
  emits: ["opened", "opening-started", "closed", "closing-started", "ready", "dragging-up", "dragging-down", "snapped", "instinctHeight", "update:modelValue"],
128
- setup(o, { expose: l, emit: s }) {
129
- _e((e) => ({
130
- "03a2828a": Ye.value
130
+ setup(a, { expose: o, emit: s }) {
131
+ ze((e) => ({
132
+ v6f938e48: Oe.value
131
133
  }));
132
- const t = o, v = s, C = qe(t, "modelValue", v, {
134
+ const t = a, v = s, S = Ue(t, "modelValue", v, {
133
135
  passive: !0
134
136
  });
135
- J(C, (e) => {
136
- e && ne();
137
- }), Ae(() => {
138
- C.value && ne();
137
+ ee(S, (e) => {
138
+ e && le();
139
+ }), We(() => {
140
+ S.value && le();
139
141
  });
140
- const i = m(null), y = m(null), b = m(null), P = m(null), w = m(null), S = m(null), M = m(null), d = m(t.expandOnContentDrag), { height: h } = Qe(), { height: D } = X(i), { height: $ } = X(y), { height: L } = X(S), { height: ie } = X(b), Z = I({
142
+ const i = m(null), x = m(null), C = m(null), y = m(null), h = m(null), w = m(null), f = m(t.expandOnContentDrag), { height: d } = Je(), { height: M } = te(i), { height: O } = te(x), { height: F } = te(h), { height: L } = te(C), ne = $({
141
143
  get() {
142
- return T(
143
- Math.ceil(L.value + $.value + ie.value),
144
+ return P(
145
+ Math.ceil(F.value + O.value + L.value),
144
146
  {
145
- max: h.value
147
+ max: d.value
146
148
  }
147
149
  );
148
150
  },
149
151
  set(e) {
150
- [$.value, L.value, ie.value] = e;
152
+ O.value = e[0], F.value = e[1], L.value = e[2];
151
153
  }
152
- }), a = m(0), u = m(0), Ye = I(() => t.duration + "ms"), { snapPoints: Me } = Ve(t), p = I(() => Me.value ?? [Z.value]), {
153
- flattenedSnapPoints: x,
154
+ }), l = m(0), u = m(0), Oe = $(() => t.duration + "ms"), { snapPoints: De } = Qe(t), Y = $(() => De.value ?? [ne.value]), {
155
+ flattenedSnapPoints: E,
154
156
  currentSnapPointIndex: B,
155
- closestSnapPointIndex: F,
156
- minSnapPoint: O,
157
- maxSnapPoint: _
158
- } = Ge(p, a, h), q = ke(document.body), Q = ke(document.documentElement), E = m(!1), A = m(0), j = m(0), G = m(0), H = m(0), K = m(!0), R = Ke({ velocityThreshold: 0.5 }), ee = je([i, M], {
157
+ closestSnapPointIndex: A,
158
+ minSnapPoint: D,
159
+ maxSnapPoint: V
160
+ } = Ze(Y, l, d), K = Ye(document.body), U = Ye(document.documentElement), H = m(!1), N = m(0), J = m(0), X = m(0), I = m(0), Z = m(!0), R = _e({ velocityThreshold: 0.5 }), q = Xe([i, w], {
159
161
  immediate: !1,
160
162
  fallbackFocus: () => i.value || document.body
161
163
  });
162
- function ve(e) {
163
- d.value = !0, ce(e);
164
+ let z = null;
165
+ const Be = () => {
166
+ i.value && (z = new MutationObserver((e) => {
167
+ for (const n of e)
168
+ n.type === "attributes" && n.attributeName === "aria-expanded" && (n.target.getAttribute("aria-expanded") === "true" ? q.pause() : i.value?.querySelector('[aria-expanded="true"]') || q.unpause());
169
+ }), z.observe(i.value, {
170
+ attributes: !0,
171
+ attributeFilter: ["aria-expanded"],
172
+ subtree: !0
173
+ }));
174
+ }, ce = () => {
175
+ z && (z.disconnect(), z = null);
176
+ };
177
+ function de(e) {
178
+ f.value = !0, fe(e);
164
179
  }
165
- function ce(e) {
166
- d.value && e.preventDefault();
180
+ function fe(e) {
181
+ f.value && e.preventDefault();
167
182
  }
168
- const de = (e) => {
169
- e.key === "Escape" && Y();
170
- }, De = () => {
171
- t.canBackdropClose && Y();
183
+ const pe = (e) => {
184
+ e.key === "Escape" && T();
185
+ }, He = () => {
186
+ t.canBackdropClose && T();
172
187
  };
173
- let te = !1;
174
- const ne = async () => {
175
- if (te) return;
176
- C.value = !0, te = !0, v("opening-started"), t.blocking && (q.value = !0, Q.value = !0), await we();
188
+ let ae = !1;
189
+ const le = async () => {
190
+ if (ae) return;
191
+ S.value = !0, ae = !0, v("opening-started"), t.blocking && (K.value = !0, U.value = !0), await Se();
177
192
  const e = i.value;
178
- D.value = e.getBoundingClientRect().height;
193
+ M.value = e.getBoundingClientRect().height;
179
194
  const n = e.querySelector("[data-vsbs-content]"), r = e.querySelector("[data-vsbs-header]"), c = e.querySelector("[data-vsbs-footer]");
180
- if (Z.value = [
195
+ if (ne.value = [
181
196
  r.getBoundingClientRect().height,
182
197
  n.getBoundingClientRect().height,
183
198
  c.getBoundingClientRect().height
184
- ], await we(), B.value = x.value.findIndex(
185
- (f) => f === O.value
199
+ ], await Se(), B.value = E.value.findIndex(
200
+ (p) => p === D.value
186
201
  ), t.initialSnapPoint) {
187
- const f = t.initialSnapPoint;
188
- if (f < 0 || f >= p.value.length) {
202
+ const p = t.initialSnapPoint;
203
+ if (p < 0 || p >= Y.value.length) {
189
204
  console.warn("Index out of bounds");
190
205
  return;
191
206
  }
192
- let g;
193
- typeof p.value[f] == "number" ? g = T(p.value[f], {
194
- max: h.value
195
- }) : g = N(p.value[f], h.value), a.value = g;
207
+ const g = Y.value[p];
208
+ if (!g) return;
209
+ let b;
210
+ typeof g == "number" ? b = P(g, {
211
+ max: d.value
212
+ }) : b = G(g, d.value), l.value = b;
196
213
  } else
197
- a.value = T(O.value, {
198
- max: h.value
214
+ l.value = P(D.value, {
215
+ max: d.value
199
216
  });
200
- u.value = a.value, requestAnimationFrame(() => {
217
+ u.value = l.value, requestAnimationFrame(() => {
201
218
  u.value = 0, t.blocking && setTimeout(() => {
202
- C.value && (v("opened"), ee.activate());
219
+ S.value && (v("opened"), q.activate(), Be());
203
220
  }, t.duration);
204
- }), window.addEventListener("keydown", de), te = !1;
221
+ }), window.addEventListener("keydown", pe), ae = !1;
205
222
  };
206
- let ae = !1;
207
- const Y = () => {
208
- ae || (C.value = !1, ae = !0, v("closing-started"), t.blocking && (q.value = !1, Q.value = !1), window.removeEventListener("keydown", de), t.blocking && ee.deactivate(), u.value = a.value, setTimeout(() => {
209
- v("closed"), ae = !1;
223
+ let oe = !1;
224
+ const T = () => {
225
+ oe || (S.value = !1, oe = !0, v("closing-started"), t.blocking && (K.value = !1, U.value = !1), window.removeEventListener("keydown", pe), ce(), t.blocking && q.deactivate(), u.value = l.value, setTimeout(() => {
226
+ v("closed"), oe = !1;
210
227
  }, t.duration));
211
- }, fe = (e) => {
212
- if (!p.value) return;
213
- if (e < 0 || e >= p.value.length) {
228
+ }, he = (e) => {
229
+ if (!Y.value) return;
230
+ if (e < 0 || e >= Y.value.length) {
214
231
  console.warn("Index out of bounds");
215
232
  return;
216
233
  }
217
234
  B.value = e;
218
- let n;
219
- typeof p.value[e] == "number" ? n = T(p.value[e], {
220
- max: h.value
221
- }) : n = N(p.value[e], h.value), a.value = n, v("snapped", p.value.indexOf(p.value[e]));
235
+ const n = Y.value[e];
236
+ if (!n) return;
237
+ let r;
238
+ typeof n == "number" ? r = P(n, {
239
+ max: d.value
240
+ }) : r = G(n, d.value), l.value = r, v("snapped", Y.value.indexOf(n));
222
241
  };
223
- function pe(e) {
242
+ function me(e) {
224
243
  e > 0 ? v("dragging-down") : e < 0 && v("dragging-up");
225
244
  }
226
- const he = (e) => {
245
+ const ge = (e) => {
227
246
  if (!i.value) return;
228
247
  const n = window.getComputedStyle(i.value), r = parseFloat(n.height);
229
248
  let c = 0;
230
- n.transform && n.transform !== "none" && (c = new DOMMatrix(n.transform).m42), a.value = r, u.value = c, E.value = !0, A.value = e.clientY, j.value = a.value, G.value = u.value, H.value = e.clientY, R.start(e.clientY), e.target.setPointerCapture(e.pointerId);
231
- }, me = (e) => {
232
- if (!E.value) return;
233
- const n = e.clientY - A.value, r = e.clientY;
234
- u.value <= 0 && (a.value = j.value - n), a.value <= O.value && (a.value = O.value, u.value = G.value + n, t.canSwipeClose ? u.value = T(u.value, { min: 0 }) : u.value = T(
235
- re(u.value, -D.value, 0, 0.5),
249
+ n.transform && n.transform !== "none" && (c = new DOMMatrix(n.transform).m42), l.value = r, u.value = c, H.value = !0, N.value = e.clientY, J.value = l.value, X.value = u.value, I.value = e.clientY, R.start(e.clientY), e.target.setPointerCapture(e.pointerId);
250
+ }, we = (e) => {
251
+ if (!H.value) return;
252
+ const n = e.clientY - N.value, r = e.clientY;
253
+ u.value <= 0 && (l.value = J.value - n), l.value <= D.value && (l.value = D.value, u.value = X.value + n, t.canSwipeClose ? u.value = P(u.value, { min: 0 }) : u.value = P(
254
+ ve(u.value, -M.value, 0, 0.5),
236
255
  { min: 0 }
237
- )), a.value = T(re(a.value, 0, _.value, 0.25), {
256
+ )), l.value = P(ve(l.value, 0, V.value, 0.25), {
238
257
  min: 0,
239
- max: h.value
240
- }), pe(e.clientY - H.value), R.update(e.clientY), H.value = r;
241
- }, U = (e) => {
242
- if (E.value = !1, e.target.releasePointerCapture(e.pointerId), t.canSwipeClose) {
243
- let f = a.value / 2;
244
- if (t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "number" && (f = t.swipeCloseThreshold), t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "string" && t.swipeCloseThreshold.includes("%") && (f = a.value * (Number(t.swipeCloseThreshold.replace("%", "")) / 100)), u.value > f) {
245
- u.value = a.value, Y();
258
+ max: d.value
259
+ }), me(e.clientY - I.value), R.update(e.clientY), I.value = r;
260
+ }, _ = (e) => {
261
+ if (H.value = !1, e.target.releasePointerCapture(e.pointerId), t.canSwipeClose) {
262
+ let g = l.value / 2;
263
+ if (t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "number" && (g = t.swipeCloseThreshold), t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "string" && t.swipeCloseThreshold.includes("%") && (g = l.value * (Number(t.swipeCloseThreshold.replace("%", "")) / 100)), u.value > g) {
264
+ u.value = l.value, T();
246
265
  return;
247
266
  }
248
267
  } else
249
268
  u.value = 0;
250
- if (u.value === a.value) {
251
- u.value = 0, Y();
269
+ if (u.value === l.value) {
270
+ u.value = 0, T();
252
271
  return;
253
272
  }
254
273
  const n = R.end();
255
- if (n.isSwipe && n.direction === "down" && t.canSwipeClose && a.value <= O.value + 10) {
256
- u.value = a.value, Y();
274
+ if (n.isSwipe && n.direction === "down" && t.canSwipeClose && l.value <= D.value + 10) {
275
+ u.value = l.value, T();
257
276
  return;
258
277
  }
259
278
  let r;
260
- if (n.isSwipe && x.value.length > 1) {
261
- const f = [...x.value].sort((g, k) => g - k);
279
+ if (n.isSwipe && E.value.length > 1) {
280
+ const g = [...E.value].sort((b, k) => b - k);
262
281
  if (n.direction === "up") {
263
- const g = f.find((k) => k > a.value + 1);
264
- r = g !== void 0 ? x.value.indexOf(g) : F.value;
282
+ const b = g.find((k) => k > l.value + 1);
283
+ r = b !== void 0 ? E.value.indexOf(b) : A.value;
265
284
  } else {
266
- const g = [...f].reverse().find((k) => k < a.value - 1);
267
- r = g !== void 0 ? x.value.indexOf(g) : F.value;
285
+ const b = [...g].reverse().find((k) => k < l.value - 1);
286
+ r = b !== void 0 ? E.value.indexOf(b) : A.value;
268
287
  }
269
288
  } else
270
- r = F.value;
289
+ r = A.value;
271
290
  B.value = r;
272
- let c;
273
- if (typeof p.value[r] == "number" ? c = T(p.value[r], {
274
- max: h.value
275
- }) : c = N(
276
- p.value[r],
277
- h.value
278
- ), c === 0) {
279
- Y();
291
+ const c = Y.value[r];
292
+ if (!c) {
293
+ T();
294
+ return;
295
+ }
296
+ let p;
297
+ if (typeof c == "number" ? p = P(c, {
298
+ max: d.value
299
+ }) : p = G(c, d.value), p === 0) {
300
+ T();
280
301
  return;
281
302
  }
282
- a.value = c, u.value = 0, v("snapped", p.value.indexOf(p.value[r]));
283
- }, Oe = (e) => {
284
- if (!P.value) return;
285
- const n = P.value.scrollTop === 0, r = e > 0, c = x.value.length === 1, f = 0.5 > Math.abs(a.value - _.value);
286
- if (console.log(e), c) {
303
+ l.value = p, u.value = 0, v("snapped", Y.value.indexOf(c));
304
+ }, Ie = (e) => {
305
+ if (!y.value) return;
306
+ const n = y.value.scrollTop === 0, r = e > 0, c = E.value.length === 1, p = 0.5 > Math.abs(l.value - V.value);
307
+ if (c) {
287
308
  if (!t.expandOnContentDrag) {
288
- d.value = !1;
309
+ f.value = !1;
289
310
  return;
290
311
  }
291
- u.value === 0 && n && r && (d.value = !0), u.value === 0 && n && !r && (d.value = !1);
312
+ u.value === 0 && n && r && (f.value = !0), u.value === 0 && n && !r && (f.value = !1);
292
313
  } else {
293
314
  if (!t.expandOnContentDrag) {
294
- d.value = !1;
315
+ f.value = !1;
295
316
  return;
296
317
  }
297
- d.value = !0, f && (r && n && (d.value = !0), !r && n && (d.value = !1), n || (d.value = !1));
318
+ f.value = !0, p && (r && n && (f.value = !0), !r && n && (f.value = !1), n || (f.value = !1));
298
319
  }
299
- }, Be = (e) => {
320
+ }, $e = (e) => {
300
321
  if (!i.value) return;
301
322
  const n = window.getComputedStyle(i.value), r = parseFloat(n.height);
302
323
  let c = 0;
303
- n.transform && n.transform !== "none" && (c = new DOMMatrix(n.transform).m42), a.value = r, u.value = c, E.value = !0, A.value = e.clientY, j.value = a.value, G.value = u.value, H.value = e.clientY, K.value = !0, R.start(e.clientY), e.target.setPointerCapture(e.pointerId);
304
- }, Ee = (e) => {
305
- if (!E.value) return;
324
+ n.transform && n.transform !== "none" && (c = new DOMMatrix(n.transform).m42), l.value = r, u.value = c, H.value = !0, N.value = e.clientY, J.value = l.value, X.value = u.value, I.value = e.clientY, Z.value = !0, R.start(e.clientY), e.target.setPointerCapture(e.pointerId);
325
+ }, Fe = (e) => {
326
+ if (!H.value) return;
306
327
  if (!t.expandOnContentDrag) {
307
- d.value = !1;
328
+ f.value = !1;
308
329
  return;
309
330
  }
310
- const n = e.clientY - A.value, r = e.clientY, c = e.clientY - H.value;
311
- if (K.value) {
312
- const g = e.clientY - A.value;
331
+ const n = e.clientY - N.value, r = e.clientY, c = e.clientY - I.value;
332
+ if (Z.value) {
333
+ const g = e.clientY - N.value;
313
334
  if (Math.abs(g) > 3)
314
- K.value = !1, Oe(g);
335
+ Z.value = !1, Ie(g);
315
336
  else {
316
- H.value = r;
337
+ I.value = r;
317
338
  return;
318
339
  }
319
340
  }
320
- u.value === 0 && d.value && t.expandOnContentDrag && (a.value = j.value - n), a.value <= O.value && (a.value = O.value, d.value && t.expandOnContentDrag && (u.value = G.value + n), u.value = T(u.value, { min: 0, max: O.value }), t.canSwipeClose ? u.value = T(u.value, { min: 0 }) : u.value = T(
321
- re(u.value, -D.value, 0, 0.5),
341
+ u.value === 0 && f.value && t.expandOnContentDrag && (l.value = J.value - n), l.value <= D.value && (l.value = D.value, f.value && t.expandOnContentDrag && (u.value = X.value + n), u.value = P(u.value, { min: 0, max: D.value }), t.canSwipeClose ? u.value = P(u.value, { min: 0 }) : u.value = P(
342
+ ve(u.value, -M.value, 0, 0.5),
322
343
  { min: 0 }
323
- )), a.value > _.value && (a.value = _.value), a.value = T(a.value, { max: h.value }), x.value.length === 1 || a.value === _.value && (d.value = !1), pe(c), R.update(e.clientY), H.value = r;
324
- }, ge = (e) => {
325
- if (E.value = !1, K.value = !0, e.target.releasePointerCapture(e.pointerId), t.canSwipeClose) {
326
- let g = a.value / 2;
327
- if (t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "number" && (g = t.swipeCloseThreshold), t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "string" && t.swipeCloseThreshold.includes("%") && (g = a.value * (Number(t.swipeCloseThreshold.replace("%", "")) / 100)), u.value > g) {
328
- u.value = a.value, Y();
344
+ )), l.value > V.value && (l.value = V.value), l.value = P(l.value, { max: d.value }), E.value.length === 1 || l.value === V.value && (f.value = !1), me(c), R.update(e.clientY), I.value = r;
345
+ }, be = (e) => {
346
+ if (H.value = !1, Z.value = !0, e.target.releasePointerCapture(e.pointerId), t.canSwipeClose) {
347
+ let b = l.value / 2;
348
+ if (t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "number" && (b = t.swipeCloseThreshold), t.swipeCloseThreshold && typeof t.swipeCloseThreshold == "string" && t.swipeCloseThreshold.includes("%") && (b = l.value * (Number(t.swipeCloseThreshold.replace("%", "")) / 100)), u.value > b) {
349
+ u.value = l.value, T();
329
350
  return;
330
351
  }
331
352
  } else
332
353
  u.value = 0;
333
- if (u.value === a.value) {
334
- u.value = 0, Y();
354
+ if (u.value === l.value) {
355
+ u.value = 0, T();
335
356
  return;
336
357
  }
337
- const n = R.end(), r = d.value;
338
- if (r && n.isSwipe && n.direction === "down" && t.canSwipeClose && a.value <= O.value + 10) {
339
- u.value = a.value, Y();
358
+ const n = R.end(), r = f.value;
359
+ if (r && n.isSwipe && n.direction === "down" && t.canSwipeClose && l.value <= D.value + 10) {
360
+ u.value = l.value, T();
340
361
  return;
341
362
  }
342
363
  let c;
343
- if (r && n.isSwipe && x.value.length > 1) {
344
- const g = [...x.value].sort((k, V) => k - V);
364
+ if (r && n.isSwipe && E.value.length > 1) {
365
+ const b = [...E.value].sort((k, W) => k - W);
345
366
  if (n.direction === "up") {
346
- const k = g.find((V) => V > a.value + 1);
347
- c = k !== void 0 ? x.value.indexOf(k) : F.value;
367
+ const k = b.find((W) => W > l.value + 1);
368
+ c = k !== void 0 ? E.value.indexOf(k) : A.value;
348
369
  } else {
349
- const k = [...g].reverse().find((V) => V < a.value - 1);
350
- c = k !== void 0 ? x.value.indexOf(k) : F.value;
370
+ const k = [...b].reverse().find((W) => W < l.value - 1);
371
+ c = k !== void 0 ? E.value.indexOf(k) : A.value;
351
372
  }
352
373
  } else
353
- c = F.value;
374
+ c = A.value;
354
375
  B.value = c;
355
- let f;
356
- if (typeof p.value[c] == "number" ? f = T(p.value[c], {
357
- max: h.value
358
- }) : f = N(
359
- p.value[c],
360
- h.value
361
- ), f === 0) {
362
- Y();
376
+ const p = Y.value[c];
377
+ if (!p) {
378
+ T();
363
379
  return;
364
380
  }
365
- a.value = f, u.value = 0, v("snapped", p.value.indexOf(p.value[c]));
366
- }, He = () => {
367
- t.blocking || (q.value = !0, Q.value = !0);
368
- }, Ie = () => {
369
- t.blocking || (q.value = !1, Q.value = !1);
370
- }, $e = () => {
371
- if (!P.value) return;
372
- const e = P.value.scrollTop === 0;
373
- d.value = e;
374
- }, Fe = Xe((e) => fe(e), {
381
+ let g;
382
+ if (typeof p == "number" ? g = P(p, {
383
+ max: d.value
384
+ }) : g = G(p, d.value), g === 0) {
385
+ T();
386
+ return;
387
+ }
388
+ l.value = g, u.value = 0, v("snapped", Y.value.indexOf(p));
389
+ }, Ae = () => {
390
+ t.blocking || (K.value = !0, U.value = !0);
391
+ }, Re = () => {
392
+ t.blocking || (K.value = !1, U.value = !1);
393
+ }, Le = () => {
394
+ if (!y.value) return;
395
+ const e = y.value.scrollTop === 0;
396
+ f.value = e;
397
+ }, Ve = lt((e) => he(e), {
375
398
  minQuietPeriodMs: t.duration,
376
399
  reducer: (e, n) => n
377
400
  });
378
- J(p, (e, n) => {
379
- if (C.value === !1 || !e || !n) return;
401
+ ee(Y, (e, n) => {
402
+ if (S.value === !1 || !e || !n) return;
380
403
  const r = e[B.value], c = n[B.value];
381
- typeof r != "string" && typeof c != "string" && (a.value = T(r, {
382
- max: h.value
404
+ !r || typeof r == "string" || !c || typeof c == "string" || (l.value = P(r, {
405
+ max: d.value
383
406
  }));
384
- }), J(h, () => {
385
- Fe.call(B.value);
386
- }), J(Z, (e) => {
407
+ }), ee(d, () => {
408
+ Ve.call(B.value);
409
+ }), ee(ne, (e) => {
387
410
  v("instinctHeight", e);
388
- }), We(() => {
389
- ee.deactivate();
411
+ }), je(() => {
412
+ ce(), q.deactivate();
390
413
  });
391
- const Re = (e) => {
414
+ const Ne = (e) => {
392
415
  const n = e;
393
- n.style.transition = `transform ${t.duration}ms ease, height ${t.duration}ms ease`, n.style.transform = `translateY(${a.value}px)`;
416
+ n.style.transition = `transform ${t.duration}ms ease, height ${t.duration}ms ease`, n.style.transform = `translateY(${l.value}px)`;
394
417
  };
395
- return l({ open: ne, close: Y, snapToPoint: fe }), (e, n) => (W(), le(ze, null, [
396
- (W(), Se(Ce, {
397
- to: e.teleportTo,
398
- defer: e.teleportDefer
418
+ return o({ open: le, close: T, snapToPoint: he }), (e, n) => (Q(), ue(Ge, null, [
419
+ (Q(), Ce(xe, {
420
+ to: a.teleportTo,
421
+ defer: a.teleportDefer
399
422
  }, [
400
- be(ye, { name: "vsbs-backdrop" }, {
401
- default: Pe(() => [
402
- oe(C) && e.blocking ? (W(), le("div", {
423
+ ye(Pe, { name: "vsbs-backdrop" }, {
424
+ default: Te(() => [
425
+ se(S) && a.blocking ? (Q(), ue("div", {
403
426
  key: 0,
404
427
  ref_key: "backdrop",
405
- ref: M,
428
+ ref: w,
406
429
  "data-vsbs-backdrop": "",
407
- onClick: n[0] || (n[0] = (r) => De())
408
- }, null, 512)) : Te("", !0)
430
+ onClick: n[0] || (n[0] = (r) => He())
431
+ }, null, 512)) : ke("", !0)
409
432
  ]),
410
433
  _: 1
411
434
  })
412
435
  ], 8, ["to", "defer"])),
413
- (W(), Se(Ce, {
414
- to: e.teleportTo,
415
- defer: e.teleportDefer
436
+ (Q(), Ce(xe, {
437
+ to: a.teleportTo,
438
+ defer: a.teleportDefer
416
439
  }, [
417
- be(ye, {
440
+ ye(Pe, {
418
441
  name: "vsbs-sheet",
419
- onLeave: Re
442
+ onLeave: Ne
420
443
  }, {
421
- default: Pe(() => [
422
- oe(C) ? (W(), le("div", {
444
+ default: Te(() => [
445
+ se(S) ? (Q(), ue("div", {
423
446
  key: 0,
424
447
  ref_key: "sheet",
425
448
  ref: i,
426
- style: Ne({
449
+ style: Ke({
427
450
  transform: `translateY(${u.value}px)`,
428
- height: `${a.value}px`,
429
- transition: E.value ? "none" : `transform ${e.duration}ms ease, height ${e.duration}ms ease`
451
+ height: `${l.value}px`,
452
+ transition: H.value ? "none" : `transform ${a.duration}ms ease, height ${a.duration}ms ease`
430
453
  }),
431
- "data-vsbs-shadow": !e.blocking,
432
- "data-vsbs-sheet-show": oe(C),
454
+ "data-vsbs-shadow": !a.blocking,
455
+ "data-vsbs-sheet-show": se(S),
433
456
  "aria-modal": "true",
434
457
  "data-vsbs-sheet": "",
435
458
  tabindex: "-1",
436
- onTouchstart: He,
437
- onTouchend: Ie
459
+ onTouchstart: Ae,
460
+ onTouchend: Re
438
461
  }, [
439
- z("div", {
462
+ j("div", {
440
463
  ref_key: "sheetHeader",
441
- ref: y,
464
+ ref: x,
442
465
  "data-vsbs-header": "",
443
- onPointerdown: he,
444
- onPointermove: me,
445
- onPointerup: U,
446
- onPointercancel: U,
447
- onTouchmove: ve,
448
- class: ue(e.headerClass),
466
+ onPointerdown: ge,
467
+ onPointermove: we,
468
+ onPointerup: _,
469
+ onPointercancel: _,
470
+ onTouchmove: de,
471
+ class: re(a.headerClass),
449
472
  style: { "touch-action": "none" }
450
473
  }, [
451
- se(e.$slots, "header", {}, void 0, !0)
474
+ ie(e.$slots, "header", {}, void 0, !0)
452
475
  ], 34),
453
- z("div", {
476
+ j("div", {
454
477
  ref_key: "sheetScroll",
455
- ref: P,
478
+ ref: y,
456
479
  "data-vsbs-scroll": "",
457
- onScrollend: $e
480
+ onScrollend: Le
458
481
  }, [
459
- z("div", {
460
- ref_key: "sheetContentWrapper",
461
- ref: w,
482
+ j("div", {
462
483
  "data-vsbs-content-wrapper": "",
463
- onPointerdown: Be,
464
- onPointermove: Ee,
465
- onPointerup: ge,
466
- onPointercancel: ge,
467
- onTouchmove: ce,
484
+ onPointerdown: $e,
485
+ onPointermove: Fe,
486
+ onPointerup: be,
487
+ onPointercancel: be,
488
+ onTouchmove: fe,
468
489
  style: { touchAction: "pan-y" }
469
490
  }, [
470
- z("div", {
491
+ j("div", {
471
492
  ref_key: "sheetContent",
472
- ref: S,
493
+ ref: h,
473
494
  "data-vsbs-content": "",
474
- class: ue(e.contentClass)
495
+ class: re(a.contentClass)
475
496
  }, [
476
- se(e.$slots, "default", {}, void 0, !0)
497
+ ie(e.$slots, "default", {}, void 0, !0)
477
498
  ], 2)
478
- ], 544)
499
+ ], 32)
479
500
  ], 544),
480
- z("div", {
501
+ j("div", {
481
502
  ref_key: "sheetFooter",
482
- ref: b,
503
+ ref: C,
483
504
  "data-vsbs-footer": "",
484
- onPointerdown: he,
485
- onPointermove: me,
486
- onPointerup: U,
487
- onPointercancel: U,
488
- onTouchmove: ve,
489
- class: ue(e.footerClass),
505
+ onPointerdown: ge,
506
+ onPointermove: we,
507
+ onPointerup: _,
508
+ onPointercancel: _,
509
+ onTouchmove: de,
510
+ class: re(a.footerClass),
490
511
  style: { "touch-action": "none" }
491
512
  }, [
492
- se(e.$slots, "footer", {}, void 0, !0)
513
+ ie(e.$slots, "footer", {}, void 0, !0)
493
514
  ], 34)
494
- ], 44, at)) : Te("", !0)
515
+ ], 44, st)) : ke("", !0)
495
516
  ]),
496
517
  _: 3
497
518
  })
498
519
  ], 8, ["to", "defer"]))
499
520
  ], 64));
500
521
  }
501
- }), ot = (o, l) => {
502
- const s = o.__vccOpts || o;
503
- for (const [t, v] of l)
522
+ }), it = (a, o) => {
523
+ const s = a.__vccOpts || a;
524
+ for (const [t, v] of o)
504
525
  s[t] = v;
505
526
  return s;
506
- }, it = /* @__PURE__ */ ot(lt, [["__scopeId", "data-v-606a4041"]]);
527
+ }, ft = /* @__PURE__ */ it(rt, [["__scopeId", "data-v-1827f711"]]);
507
528
  export {
508
- it as default
529
+ ft as default
509
530
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- [data-vsbs-backdrop][data-v-606a4041]{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;--vsbs-duration: var(--03a2828a)}[data-vsbs-shadow=true][data-v-606a4041]: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-606a4041]{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-width:var(--vsbs-max-width, 640px);pointer-events:all;position:fixed;right:0;width:100%;will-change:height,transform}[data-vsbs-sheet-show=true][data-v-606a4041]{visibility:visible}[data-vsbs-header][data-v-606a4041]{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-606a4041]: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-606a4041]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-606a4041]{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-606a4041]:empty{display:none}[data-vsbs-scroll][data-v-606a4041]{flex-grow:1;overflow-y:auto;overscroll-behavior:none}[data-vsbs-content-wrapper][data-v-606a4041]{height:100%}[data-vsbs-content][data-v-606a4041]{display:grid;padding:8px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}.vsbs-backdrop-enter-active[data-v-606a4041],.vsbs-backdrop-leave-active[data-v-606a4041]{transition:opacity var(--vsbs-duration) ease}.vsbs-backdrop-enter-from[data-v-606a4041],.vsbs-backdrop-leave-to[data-v-606a4041]{opacity:0}
1
+ [data-vsbs-backdrop][data-v-1827f711]{background-color:var(--vsbs-backdrop-bg, rgba(0, 0, 0, .5));inset:0;pointer-events:auto;position:fixed;-webkit-user-select:none;user-select:none;will-change:opacity;--vsbs-duration: var(--v6f938e48)}[data-vsbs-shadow=true][data-v-1827f711]: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-1827f711]{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-width:var(--vsbs-max-width, 640px);pointer-events:all;position:fixed;right:0;width:100%;will-change:height,transform}[data-vsbs-sheet-show=true][data-v-1827f711]{visibility:visible}[data-vsbs-header][data-v-1827f711]{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-1827f711]: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-1827f711]:empty{box-shadow:none;padding:14px var(--vsbs-padding-x, 16px) 10px}[data-vsbs-footer][data-v-1827f711]{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-1827f711]:empty{display:none}[data-vsbs-scroll][data-v-1827f711]{flex-grow:1;overflow-y:auto;overscroll-behavior:none}[data-vsbs-content-wrapper][data-v-1827f711]{height:100%}[data-vsbs-content][data-v-1827f711]{display:grid;padding:8px var(--vsbs-padding-x, 16px);-webkit-user-select:none;user-select:none}.vsbs-backdrop-enter-active[data-v-1827f711],.vsbs-backdrop-leave-active[data-v-1827f711]{transition:opacity var(--vsbs-duration) ease}.vsbs-backdrop-enter-from[data-v-1827f711],.vsbs-backdrop-leave-to[data-v-1827f711]{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": "3.0.0-next.1",
35
+ "version": "3.0.0-next.3",
36
36
  "type": "module",
37
37
  "exports": {
38
38
  ".": {
@@ -61,26 +61,26 @@
61
61
  "vue": ">=3.3"
62
62
  },
63
63
  "dependencies": {
64
- "@vueuse/core": "^13.2.0",
65
- "@vueuse/integrations": "^13.2.0",
66
- "focus-trap": "^7.6.4",
67
- "remeda": "^2.21.6",
68
- "vue": "^3.5.14"
64
+ "@vueuse/core": "^14.1.0",
65
+ "@vueuse/integrations": "^14.1.0",
66
+ "focus-trap": "^7.8.0",
67
+ "remeda": "^2.33.3",
68
+ "vue": "^3.5.26"
69
69
  },
70
70
  "devDependencies": {
71
- "@types/node": "^22.15.18",
72
- "@vitejs/plugin-vue": "^5.2.4",
71
+ "@types/node": "^25.0.8",
72
+ "@vitejs/plugin-vue": "^6.0.3",
73
73
  "@vue/eslint-config-prettier": "^10.2.0",
74
- "@vue/eslint-config-typescript": "^14.5.0",
75
- "@vue/tsconfig": "^0.7.0",
74
+ "@vue/eslint-config-typescript": "^14.6.0",
75
+ "@vue/tsconfig": "^0.8.1",
76
76
  "ajv": "^8.17.1",
77
- "eslint": "^9.27.0",
78
- "eslint-plugin-vue": "^10.1.0",
79
- "prettier": "^3.5.3",
80
- "typescript": "~5.6.3",
81
- "vite": "^6.3.5",
82
- "vite-plugin-dts": "4.5.3",
83
- "vue-tsc": "^2.2.10"
77
+ "eslint": "^9.39.2",
78
+ "eslint-plugin-vue": "^10.6.2",
79
+ "prettier": "^3.7.4",
80
+ "typescript": "~5.9.3",
81
+ "vite": "^7.3.1",
82
+ "vite-plugin-dts": "4.5.4",
83
+ "vue-tsc": "^3.2.2"
84
84
  },
85
85
  "files": [
86
86
  "dist",