@surdeddd/bottom-sheet 0.20.1 → 0.20.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/dist/core.cjs +13 -11
- package/dist/core.js +13 -11
- package/dist/element.cjs +13 -11
- package/dist/element.iife.global.js +1 -1
- package/dist/element.js +13 -11
- package/dist/index.cjs +13 -11
- package/dist/index.js +13 -11
- package/dist/qwik-lib/index.qwik.cjs +10 -8
- package/dist/qwik-lib/index.qwik.mjs +10 -8
- package/dist/qwik.cjs +13 -11
- package/dist/qwik.js +13 -11
- package/dist/react.cjs +13 -11
- package/dist/react.js +13 -11
- package/dist/solid.cjs +13 -11
- package/dist/solid.js +13 -11
- package/dist/solid.source.jsx +13 -11
- package/dist/styles.d.ts +1 -0
- package/dist/svelte-core.cjs +13 -11
- package/dist/svelte-core.js +13 -11
- package/dist/svelte.cjs +13 -11
- package/dist/svelte.js +13 -11
- package/dist/themes/ios.d.ts +1 -0
- package/dist/themes/material.d.ts +1 -0
- package/dist/themes/vercel.d.ts +1 -0
- package/dist/vue.cjs +14 -12
- package/dist/vue.d.cts +6 -1
- package/dist/vue.d.ts +6 -1
- package/dist/vue.js +14 -12
- package/package.json +36 -12
package/dist/index.js
CHANGED
|
@@ -836,23 +836,25 @@ var ScrimController = class {
|
|
|
836
836
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
837
837
|
return;
|
|
838
838
|
}
|
|
839
|
-
if (this.backdrop
|
|
839
|
+
if (this.backdrop) {
|
|
840
840
|
const [s, e] = this.backdropRange;
|
|
841
841
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
842
842
|
const backdropOpacity = Math.min(
|
|
843
843
|
Math.max((progress - s) / range, 0),
|
|
844
844
|
1
|
|
845
845
|
);
|
|
846
|
-
if (this.
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
this.
|
|
855
|
-
|
|
846
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
847
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
848
|
+
backdropOpacity,
|
|
849
|
+
OPACITY_WRITE_EPSILON
|
|
850
|
+
)) {
|
|
851
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
852
|
+
}
|
|
853
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
854
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
855
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
856
|
+
this.lastBackdropPointer = nextPointer;
|
|
857
|
+
}
|
|
856
858
|
}
|
|
857
859
|
}
|
|
858
860
|
if (this.screenComponent && this.scrimMode !== "off") {
|
|
@@ -853,17 +853,19 @@ class ScrimController {
|
|
|
853
853
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
854
854
|
return;
|
|
855
855
|
}
|
|
856
|
-
if (this.backdrop
|
|
856
|
+
if (this.backdrop) {
|
|
857
857
|
const [s, e] = this.backdropRange;
|
|
858
858
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
859
859
|
const backdropOpacity = Math.min(Math.max((progress - s) / range, 0), 1);
|
|
860
|
-
if (this.
|
|
861
|
-
this.
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
this.
|
|
866
|
-
|
|
860
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
861
|
+
if (this.backdropOpacitySentinel.shouldWrite(backdropOpacity, OPACITY_WRITE_EPSILON)) {
|
|
862
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
863
|
+
}
|
|
864
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
865
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
866
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
867
|
+
this.lastBackdropPointer = nextPointer;
|
|
868
|
+
}
|
|
867
869
|
}
|
|
868
870
|
}
|
|
869
871
|
if (this.screenComponent && this.scrimMode !== "off") {
|
|
@@ -851,17 +851,19 @@ class ScrimController {
|
|
|
851
851
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
852
852
|
return;
|
|
853
853
|
}
|
|
854
|
-
if (this.backdrop
|
|
854
|
+
if (this.backdrop) {
|
|
855
855
|
const [s, e] = this.backdropRange;
|
|
856
856
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
857
857
|
const backdropOpacity = Math.min(Math.max((progress - s) / range, 0), 1);
|
|
858
|
-
if (this.
|
|
859
|
-
this.
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
this.
|
|
864
|
-
|
|
858
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
859
|
+
if (this.backdropOpacitySentinel.shouldWrite(backdropOpacity, OPACITY_WRITE_EPSILON)) {
|
|
860
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
861
|
+
}
|
|
862
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
863
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
864
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
865
|
+
this.lastBackdropPointer = nextPointer;
|
|
866
|
+
}
|
|
865
867
|
}
|
|
866
868
|
}
|
|
867
869
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/qwik.cjs
CHANGED
|
@@ -841,23 +841,25 @@ var ScrimController = class {
|
|
|
841
841
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
842
842
|
return;
|
|
843
843
|
}
|
|
844
|
-
if (this.backdrop
|
|
844
|
+
if (this.backdrop) {
|
|
845
845
|
const [s, e] = this.backdropRange;
|
|
846
846
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
847
847
|
const backdropOpacity = Math.min(
|
|
848
848
|
Math.max((progress - s) / range, 0),
|
|
849
849
|
1
|
|
850
850
|
);
|
|
851
|
-
if (this.
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
this.
|
|
860
|
-
|
|
851
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
852
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
853
|
+
backdropOpacity,
|
|
854
|
+
OPACITY_WRITE_EPSILON
|
|
855
|
+
)) {
|
|
856
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
857
|
+
}
|
|
858
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
859
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
860
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
861
|
+
this.lastBackdropPointer = nextPointer;
|
|
862
|
+
}
|
|
861
863
|
}
|
|
862
864
|
}
|
|
863
865
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/qwik.js
CHANGED
|
@@ -839,23 +839,25 @@ var ScrimController = class {
|
|
|
839
839
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
|
-
if (this.backdrop
|
|
842
|
+
if (this.backdrop) {
|
|
843
843
|
const [s, e] = this.backdropRange;
|
|
844
844
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
845
845
|
const backdropOpacity = Math.min(
|
|
846
846
|
Math.max((progress - s) / range, 0),
|
|
847
847
|
1
|
|
848
848
|
);
|
|
849
|
-
if (this.
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
this.
|
|
858
|
-
|
|
849
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
850
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
851
|
+
backdropOpacity,
|
|
852
|
+
OPACITY_WRITE_EPSILON
|
|
853
|
+
)) {
|
|
854
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
855
|
+
}
|
|
856
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
857
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
858
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
859
|
+
this.lastBackdropPointer = nextPointer;
|
|
860
|
+
}
|
|
859
861
|
}
|
|
860
862
|
}
|
|
861
863
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/react.cjs
CHANGED
|
@@ -848,23 +848,25 @@ var ScrimController = class {
|
|
|
848
848
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
849
849
|
return;
|
|
850
850
|
}
|
|
851
|
-
if (this.backdrop
|
|
851
|
+
if (this.backdrop) {
|
|
852
852
|
const [s, e] = this.backdropRange;
|
|
853
853
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
854
854
|
const backdropOpacity = Math.min(
|
|
855
855
|
Math.max((progress - s) / range, 0),
|
|
856
856
|
1
|
|
857
857
|
);
|
|
858
|
-
if (this.
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
this.
|
|
867
|
-
|
|
858
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
859
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
860
|
+
backdropOpacity,
|
|
861
|
+
OPACITY_WRITE_EPSILON
|
|
862
|
+
)) {
|
|
863
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
864
|
+
}
|
|
865
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
866
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
867
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
868
|
+
this.lastBackdropPointer = nextPointer;
|
|
869
|
+
}
|
|
868
870
|
}
|
|
869
871
|
}
|
|
870
872
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/react.js
CHANGED
|
@@ -846,23 +846,25 @@ var ScrimController = class {
|
|
|
846
846
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
847
847
|
return;
|
|
848
848
|
}
|
|
849
|
-
if (this.backdrop
|
|
849
|
+
if (this.backdrop) {
|
|
850
850
|
const [s, e] = this.backdropRange;
|
|
851
851
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
852
852
|
const backdropOpacity = Math.min(
|
|
853
853
|
Math.max((progress - s) / range, 0),
|
|
854
854
|
1
|
|
855
855
|
);
|
|
856
|
-
if (this.
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
this.
|
|
865
|
-
|
|
856
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
857
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
858
|
+
backdropOpacity,
|
|
859
|
+
OPACITY_WRITE_EPSILON
|
|
860
|
+
)) {
|
|
861
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
862
|
+
}
|
|
863
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
864
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
865
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
866
|
+
this.lastBackdropPointer = nextPointer;
|
|
867
|
+
}
|
|
866
868
|
}
|
|
867
869
|
}
|
|
868
870
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/solid.cjs
CHANGED
|
@@ -841,23 +841,25 @@ var ScrimController = class {
|
|
|
841
841
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
842
842
|
return;
|
|
843
843
|
}
|
|
844
|
-
if (this.backdrop
|
|
844
|
+
if (this.backdrop) {
|
|
845
845
|
const [s, e] = this.backdropRange;
|
|
846
846
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
847
847
|
const backdropOpacity = Math.min(
|
|
848
848
|
Math.max((progress - s) / range, 0),
|
|
849
849
|
1
|
|
850
850
|
);
|
|
851
|
-
if (this.
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
this.
|
|
860
|
-
|
|
851
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
852
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
853
|
+
backdropOpacity,
|
|
854
|
+
OPACITY_WRITE_EPSILON
|
|
855
|
+
)) {
|
|
856
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
857
|
+
}
|
|
858
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
859
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
860
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
861
|
+
this.lastBackdropPointer = nextPointer;
|
|
862
|
+
}
|
|
861
863
|
}
|
|
862
864
|
}
|
|
863
865
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/solid.js
CHANGED
|
@@ -839,23 +839,25 @@ var ScrimController = class {
|
|
|
839
839
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
840
840
|
return;
|
|
841
841
|
}
|
|
842
|
-
if (this.backdrop
|
|
842
|
+
if (this.backdrop) {
|
|
843
843
|
const [s, e] = this.backdropRange;
|
|
844
844
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
845
845
|
const backdropOpacity = Math.min(
|
|
846
846
|
Math.max((progress - s) / range, 0),
|
|
847
847
|
1
|
|
848
848
|
);
|
|
849
|
-
if (this.
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
this.
|
|
858
|
-
|
|
849
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
850
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
851
|
+
backdropOpacity,
|
|
852
|
+
OPACITY_WRITE_EPSILON
|
|
853
|
+
)) {
|
|
854
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
855
|
+
}
|
|
856
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
857
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
858
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
859
|
+
this.lastBackdropPointer = nextPointer;
|
|
860
|
+
}
|
|
859
861
|
}
|
|
860
862
|
}
|
|
861
863
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/solid.source.jsx
CHANGED
|
@@ -842,23 +842,25 @@ var ScrimController = class {
|
|
|
842
842
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
843
843
|
return;
|
|
844
844
|
}
|
|
845
|
-
if (this.backdrop
|
|
845
|
+
if (this.backdrop) {
|
|
846
846
|
const [s, e] = this.backdropRange;
|
|
847
847
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
848
848
|
const backdropOpacity = Math.min(
|
|
849
849
|
Math.max((progress - s) / range, 0),
|
|
850
850
|
1
|
|
851
851
|
);
|
|
852
|
-
if (this.
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
this.
|
|
861
|
-
|
|
852
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
853
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
854
|
+
backdropOpacity,
|
|
855
|
+
OPACITY_WRITE_EPSILON
|
|
856
|
+
)) {
|
|
857
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
858
|
+
}
|
|
859
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
860
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
861
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
862
|
+
this.lastBackdropPointer = nextPointer;
|
|
863
|
+
}
|
|
862
864
|
}
|
|
863
865
|
}
|
|
864
866
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/styles.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/svelte-core.cjs
CHANGED
|
@@ -840,23 +840,25 @@ var ScrimController = class {
|
|
|
840
840
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
841
841
|
return;
|
|
842
842
|
}
|
|
843
|
-
if (this.backdrop
|
|
843
|
+
if (this.backdrop) {
|
|
844
844
|
const [s, e] = this.backdropRange;
|
|
845
845
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
846
846
|
const backdropOpacity = Math.min(
|
|
847
847
|
Math.max((progress - s) / range, 0),
|
|
848
848
|
1
|
|
849
849
|
);
|
|
850
|
-
if (this.
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
this.
|
|
859
|
-
|
|
850
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
851
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
852
|
+
backdropOpacity,
|
|
853
|
+
OPACITY_WRITE_EPSILON
|
|
854
|
+
)) {
|
|
855
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
856
|
+
}
|
|
857
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
858
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
859
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
860
|
+
this.lastBackdropPointer = nextPointer;
|
|
861
|
+
}
|
|
860
862
|
}
|
|
861
863
|
}
|
|
862
864
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/svelte-core.js
CHANGED
|
@@ -838,23 +838,25 @@ var ScrimController = class {
|
|
|
838
838
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
839
839
|
return;
|
|
840
840
|
}
|
|
841
|
-
if (this.backdrop
|
|
841
|
+
if (this.backdrop) {
|
|
842
842
|
const [s, e] = this.backdropRange;
|
|
843
843
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
844
844
|
const backdropOpacity = Math.min(
|
|
845
845
|
Math.max((progress - s) / range, 0),
|
|
846
846
|
1
|
|
847
847
|
);
|
|
848
|
-
if (this.
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
this.
|
|
857
|
-
|
|
848
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
849
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
850
|
+
backdropOpacity,
|
|
851
|
+
OPACITY_WRITE_EPSILON
|
|
852
|
+
)) {
|
|
853
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
854
|
+
}
|
|
855
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
856
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
857
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
858
|
+
this.lastBackdropPointer = nextPointer;
|
|
859
|
+
}
|
|
858
860
|
}
|
|
859
861
|
}
|
|
860
862
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/svelte.cjs
CHANGED
|
@@ -862,23 +862,25 @@ var ScrimController = class {
|
|
|
862
862
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
863
863
|
return;
|
|
864
864
|
}
|
|
865
|
-
if (this.backdrop
|
|
865
|
+
if (this.backdrop) {
|
|
866
866
|
const [s, e] = this.backdropRange;
|
|
867
867
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
868
868
|
const backdropOpacity = Math.min(
|
|
869
869
|
Math.max((progress - s) / range, 0),
|
|
870
870
|
1
|
|
871
871
|
);
|
|
872
|
-
if (this.
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
this.
|
|
881
|
-
|
|
872
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
873
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
874
|
+
backdropOpacity,
|
|
875
|
+
OPACITY_WRITE_EPSILON
|
|
876
|
+
)) {
|
|
877
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
878
|
+
}
|
|
879
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
880
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
881
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
882
|
+
this.lastBackdropPointer = nextPointer;
|
|
883
|
+
}
|
|
882
884
|
}
|
|
883
885
|
}
|
|
884
886
|
if (this.screenComponent && this.scrimMode !== "off") {
|
package/dist/svelte.js
CHANGED
|
@@ -840,23 +840,25 @@ var ScrimController = class {
|
|
|
840
840
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
841
841
|
return;
|
|
842
842
|
}
|
|
843
|
-
if (this.backdrop
|
|
843
|
+
if (this.backdrop) {
|
|
844
844
|
const [s, e] = this.backdropRange;
|
|
845
845
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
846
846
|
const backdropOpacity = Math.min(
|
|
847
847
|
Math.max((progress - s) / range, 0),
|
|
848
848
|
1
|
|
849
849
|
);
|
|
850
|
-
if (this.
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
this.
|
|
859
|
-
|
|
850
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
851
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
852
|
+
backdropOpacity,
|
|
853
|
+
OPACITY_WRITE_EPSILON
|
|
854
|
+
)) {
|
|
855
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
856
|
+
}
|
|
857
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
858
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
859
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
860
|
+
this.lastBackdropPointer = nextPointer;
|
|
861
|
+
}
|
|
860
862
|
}
|
|
861
863
|
}
|
|
862
864
|
if (this.screenComponent && this.scrimMode !== "off") {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/vue.cjs
CHANGED
|
@@ -840,23 +840,25 @@ var ScrimController = class {
|
|
|
840
840
|
if (!progressChanged && this.backdropOpacitySentinel.value !== -1 && this.screenOpacitySentinel.value !== -1) {
|
|
841
841
|
return;
|
|
842
842
|
}
|
|
843
|
-
if (this.backdrop
|
|
843
|
+
if (this.backdrop) {
|
|
844
844
|
const [s, e] = this.backdropRange;
|
|
845
845
|
const range = Math.max(e - s, RANGE_DIVISION_EPSILON);
|
|
846
846
|
const backdropOpacity = Math.min(
|
|
847
847
|
Math.max((progress - s) / range, 0),
|
|
848
848
|
1
|
|
849
849
|
);
|
|
850
|
-
if (this.
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
this.
|
|
859
|
-
|
|
850
|
+
if (this.isTopSheet() || backdropOpacity === 0) {
|
|
851
|
+
if (this.backdropOpacitySentinel.shouldWrite(
|
|
852
|
+
backdropOpacity,
|
|
853
|
+
OPACITY_WRITE_EPSILON
|
|
854
|
+
)) {
|
|
855
|
+
this.backdrop.style.opacity = String(backdropOpacity);
|
|
856
|
+
}
|
|
857
|
+
const nextPointer = backdropOpacity > POINTER_EVENTS_OPACITY_THRESHOLD ? "auto" : "none";
|
|
858
|
+
if (nextPointer !== this.lastBackdropPointer) {
|
|
859
|
+
this.backdrop.style.pointerEvents = nextPointer;
|
|
860
|
+
this.lastBackdropPointer = nextPointer;
|
|
861
|
+
}
|
|
860
862
|
}
|
|
861
863
|
}
|
|
862
864
|
if (this.screenComponent && this.scrimMode !== "off") {
|
|
@@ -4996,7 +4998,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4996
4998
|
/* KEYED_FRAGMENT */
|
|
4997
4999
|
))], 8, ["to", "disabled"]);
|
|
4998
5000
|
}
|
|
4999
|
-
var BottomSheet_default = /* @__PURE__ */ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/
|
|
5001
|
+
var BottomSheet_default = /* @__PURE__ */ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/BottomSheet/BottomSheet/src/vue/BottomSheet.vue"]]);
|
|
5000
5002
|
|
|
5001
5003
|
exports.BottomSheet = BottomSheet_default;
|
|
5002
5004
|
exports.useBottomSheet = useBottomSheet;
|
package/dist/vue.d.cts
CHANGED
|
@@ -74,6 +74,11 @@ export function useBottomSheet<TId extends string = string>(
|
|
|
74
74
|
opts: UseBottomSheetVueOptions<TId>,
|
|
75
75
|
): UseBottomSheetVueReturn<TId>;
|
|
76
76
|
|
|
77
|
+
export type BottomSheetInstance<TId extends string = string> = Omit<
|
|
78
|
+
UseBottomSheetVueReturn<TId>,
|
|
79
|
+
"sheetRef" | "handleRef" | "contentRef" | "backdropRef" | "screenRef"
|
|
80
|
+
>;
|
|
81
|
+
|
|
77
82
|
export type VueAnchor<TId extends string = string> = Omit<
|
|
78
83
|
AnchorOptions,
|
|
79
84
|
"element"
|
|
@@ -96,7 +101,7 @@ export type BottomSheetProps<TId extends string = string> =
|
|
|
96
101
|
|
|
97
102
|
export const BottomSheet: DefineComponent<
|
|
98
103
|
BottomSheetProps,
|
|
99
|
-
|
|
104
|
+
BottomSheetInstance,
|
|
100
105
|
Record<string, never>,
|
|
101
106
|
Record<string, never>,
|
|
102
107
|
Record<string, never>,
|
package/dist/vue.d.ts
CHANGED
|
@@ -74,6 +74,11 @@ export function useBottomSheet<TId extends string = string>(
|
|
|
74
74
|
opts: UseBottomSheetVueOptions<TId>,
|
|
75
75
|
): UseBottomSheetVueReturn<TId>;
|
|
76
76
|
|
|
77
|
+
export type BottomSheetInstance<TId extends string = string> = Omit<
|
|
78
|
+
UseBottomSheetVueReturn<TId>,
|
|
79
|
+
"sheetRef" | "handleRef" | "contentRef" | "backdropRef" | "screenRef"
|
|
80
|
+
>;
|
|
81
|
+
|
|
77
82
|
export type VueAnchor<TId extends string = string> = Omit<
|
|
78
83
|
AnchorOptions,
|
|
79
84
|
"element"
|
|
@@ -96,7 +101,7 @@ export type BottomSheetProps<TId extends string = string> =
|
|
|
96
101
|
|
|
97
102
|
export const BottomSheet: DefineComponent<
|
|
98
103
|
BottomSheetProps,
|
|
99
|
-
|
|
104
|
+
BottomSheetInstance,
|
|
100
105
|
Record<string, never>,
|
|
101
106
|
Record<string, never>,
|
|
102
107
|
Record<string, never>,
|