@butternutbox/pawprint-native 1.5.1 → 1.6.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +22 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/Drawer/Drawer.test.tsx +49 -2
- package/src/components/molecules/Drawer/Drawer.tsx +32 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
[34mCJS[39m Build start
|
|
8
8
|
[34mESM[39m Build start
|
|
9
9
|
[34mDTS[39m Build start
|
|
10
|
-
[32mESM[39m [1mdist/index.js [22m[32m541.
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m541.75 KB[39m
|
|
11
11
|
[32mESM[39m [1mdist/index.js.map [22m[32m1.12 MB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m573.
|
|
14
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.
|
|
15
|
-
[32mCJS[39m ⚡️ Build success in
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[32m114.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m114.
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 7672ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m573.67 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.13 MB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 7672ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 20962ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m114.88 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m114.88 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 1.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 061597a: Add `onExitComplete` to `Drawer.Root`, called once the drawer has fully closed (exit animation finished and native `Modal` removed), so consumers can chain another modal drawer or unmount the drawer's host without racing the exit.
|
|
8
|
+
|
|
3
9
|
## 1.5.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -6440,6 +6440,7 @@ var DrawerRoot = React66__default.default.forwardRef(
|
|
|
6440
6440
|
open: controlledOpen,
|
|
6441
6441
|
defaultOpen = false,
|
|
6442
6442
|
onOpenChange,
|
|
6443
|
+
onExitComplete,
|
|
6443
6444
|
backdrop = true,
|
|
6444
6445
|
children,
|
|
6445
6446
|
style,
|
|
@@ -6448,6 +6449,7 @@ var DrawerRoot = React66__default.default.forwardRef(
|
|
|
6448
6449
|
"open",
|
|
6449
6450
|
"defaultOpen",
|
|
6450
6451
|
"onOpenChange",
|
|
6452
|
+
"onExitComplete",
|
|
6451
6453
|
"backdrop",
|
|
6452
6454
|
"children",
|
|
6453
6455
|
"style",
|
|
@@ -6470,9 +6472,19 @@ var DrawerRoot = React66__default.default.forwardRef(
|
|
|
6470
6472
|
if (!isControlled.current) setInternalOpen(false);
|
|
6471
6473
|
onOpenChange == null ? void 0 : onOpenChange(false);
|
|
6472
6474
|
}, [onOpenChange]);
|
|
6473
|
-
const
|
|
6475
|
+
const handleExitComplete = React66.useCallback(() => {
|
|
6474
6476
|
setModalVisible(false);
|
|
6475
6477
|
}, []);
|
|
6478
|
+
const onExitCompleteRef = React66.useRef(onExitComplete);
|
|
6479
|
+
onExitCompleteRef.current = onExitComplete;
|
|
6480
|
+
const wasModalVisible = React66.useRef(modalVisible);
|
|
6481
|
+
React66.useEffect(() => {
|
|
6482
|
+
var _a2;
|
|
6483
|
+
if (wasModalVisible.current && !modalVisible) {
|
|
6484
|
+
(_a2 = onExitCompleteRef.current) == null ? void 0 : _a2.call(onExitCompleteRef);
|
|
6485
|
+
}
|
|
6486
|
+
wasModalVisible.current = modalVisible;
|
|
6487
|
+
}, [modalVisible]);
|
|
6476
6488
|
const ctx = React66.useMemo(
|
|
6477
6489
|
() => ({
|
|
6478
6490
|
isOpen,
|
|
@@ -6480,9 +6492,16 @@ var DrawerRoot = React66__default.default.forwardRef(
|
|
|
6480
6492
|
backdrop,
|
|
6481
6493
|
openDrawer,
|
|
6482
6494
|
closeDrawer,
|
|
6483
|
-
onExitComplete
|
|
6495
|
+
onExitComplete: handleExitComplete
|
|
6484
6496
|
}),
|
|
6485
|
-
[
|
|
6497
|
+
[
|
|
6498
|
+
isOpen,
|
|
6499
|
+
modalVisible,
|
|
6500
|
+
backdrop,
|
|
6501
|
+
openDrawer,
|
|
6502
|
+
closeDrawer,
|
|
6503
|
+
handleExitComplete
|
|
6504
|
+
]
|
|
6486
6505
|
);
|
|
6487
6506
|
return /* @__PURE__ */ jsxRuntime.jsx(DrawerContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6488
6507
|
reactNative.View,
|