@butternutbox/pawprint-native 1.6.1 → 1.6.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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +14 -0
- package/dist/index.cjs +19 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/SelectField/SelectField.test.tsx +42 -12
- package/src/components/molecules/SelectField/SelectField.tsx +33 -9
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
|
-
[32mCJS[39m [1mdist/index.cjs [22m[
|
|
10
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m575.22 KB[39m
|
|
11
11
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.13 MB[39m
|
|
12
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 7644ms
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m543.22 KB[39m
|
|
14
14
|
[32mESM[39m [1mdist/index.js.map [22m[32m1.13 MB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 7647ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 21210ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m114.88 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m114.88 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 1.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2bdd943: fix(INC-4913): keep the searchable dropdown anchored to its field wherever the field moves
|
|
8
|
+
|
|
9
|
+
The dropdown re-measured its field only when the keyboard showed or hid. A
|
|
10
|
+
`KeyboardAwareScrollView` also scrolls the focused input while the keyboard is
|
|
11
|
+
already up — on every keystroke, and when the app asks it to re-check the
|
|
12
|
+
focused input — so the field moved and the list stayed behind the keyboard.
|
|
13
|
+
|
|
14
|
+
While open, the dropdown now measures its field each frame and moves the list
|
|
15
|
+
once the field has come to rest, whatever moved it.
|
|
16
|
+
|
|
3
17
|
## 1.6.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -9072,22 +9072,32 @@ var StyledRoot14 = styled51__default.default(reactNative.View)(({ theme: theme2
|
|
|
9072
9072
|
gap: parseTokenValue48(spacing.gap)
|
|
9073
9073
|
};
|
|
9074
9074
|
});
|
|
9075
|
+
var isSamePosition = (a, b) => a !== null && b !== null && a.width === b.width && a.height === b.height && a.pageX === b.pageX && a.pageY === b.pageY;
|
|
9075
9076
|
function SelectFieldAnchor({ triggerRef, enabled }) {
|
|
9076
|
-
const { setTriggerPosition } = SelectPrimitive3__namespace.useRootContext();
|
|
9077
|
+
const { triggerPosition, setTriggerPosition } = SelectPrimitive3__namespace.useRootContext();
|
|
9078
|
+
const anchoredRef = React66__default.default.useRef(null);
|
|
9079
|
+
React66__default.default.useEffect(() => {
|
|
9080
|
+
anchoredRef.current = triggerPosition != null ? triggerPosition : null;
|
|
9081
|
+
}, [triggerPosition]);
|
|
9077
9082
|
React66__default.default.useEffect(() => {
|
|
9078
9083
|
if (!enabled) return;
|
|
9079
|
-
|
|
9084
|
+
let frame;
|
|
9085
|
+
let previous = null;
|
|
9086
|
+
const track = () => {
|
|
9080
9087
|
var _a;
|
|
9081
9088
|
(_a = triggerRef.current) == null ? void 0 : _a.measure((_x, _y, width, height, pageX, pageY) => {
|
|
9082
|
-
|
|
9089
|
+
const measured = { width, height, pageX, pageY };
|
|
9090
|
+
const settled = isSamePosition(measured, previous);
|
|
9091
|
+
if (settled && !isSamePosition(measured, anchoredRef.current)) {
|
|
9092
|
+
anchoredRef.current = measured;
|
|
9093
|
+
setTriggerPosition(measured);
|
|
9094
|
+
}
|
|
9095
|
+
previous = measured;
|
|
9083
9096
|
});
|
|
9097
|
+
frame = requestAnimationFrame(track);
|
|
9084
9098
|
};
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
return () => {
|
|
9088
|
-
shown.remove();
|
|
9089
|
-
hidden.remove();
|
|
9090
|
-
};
|
|
9099
|
+
frame = requestAnimationFrame(track);
|
|
9100
|
+
return () => cancelAnimationFrame(frame);
|
|
9091
9101
|
}, [enabled, setTriggerPosition, triggerRef]);
|
|
9092
9102
|
return null;
|
|
9093
9103
|
}
|