@butternutbox/pawprint-native 2.2.0 → 2.3.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 +9 -9
- package/CHANGELOG.md +21 -0
- package/COMPONENT_GUIDELINES.md +12 -8
- package/dist/index.cjs +232 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +161 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__mocks__/react-native.tsx +10 -1
- package/src/components/atoms/IconButton/IconButton.tsx +1 -0
- package/src/components/molecules/DatePicker/DatePicker.tsx +32 -2
- package/src/components/molecules/Drawer/Drawer.test.tsx +63 -0
- package/src/components/molecules/Drawer/DrawerBody.tsx +131 -25
- package/src/components/molecules/Drawer/DrawerContent.tsx +9 -6
- package/src/components/molecules/Drawer/DrawerKeyboardInsetContext.ts +9 -0
- package/src/components/molecules/SelectField/SelectField.tsx +13 -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[
|
|
11
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m1.
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
-
[32mCJS[39m [1mdist/index.cjs [22m[
|
|
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.
|
|
10
|
+
[32mESM[39m [1mdist/index.js [22m[32m549.18 KB[39m
|
|
11
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m1.13 MB[39m
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 4938ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m581.12 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs.map [22m[32m1.14 MB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 4947ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 13475ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m114.40 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m114.40 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @butternutbox/pawprint-native
|
|
2
2
|
|
|
3
|
+
## 2.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d9b0195: Announce `IconButton` as a button to screen readers. It set a label but no
|
|
8
|
+
role, so VoiceOver read a drawer's close button as just "Close" with no hint
|
|
9
|
+
that it can be pressed.
|
|
10
|
+
|
|
11
|
+
Add `focusDate` to `DatePicker`. Setting it moves screen-reader focus to that
|
|
12
|
+
date's cell, after a short delay so VoiceOver doesn't ignore it. Consumers use
|
|
13
|
+
it to return focus to a picked date when a confirmation sheet closes, instead
|
|
14
|
+
of leaving VoiceOver on whatever iOS picks next.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 2ecf870: Fix the drawer jumping when the keyboard opens, and stop scrolling from closing the keyboard.
|
|
19
|
+
- `Drawer.Body` now shrinks in step with the keyboard spacer instead of jumping to its final height a frame before the spacer arrives, so tall drawers no longer drop and snap back up as the keyboard opens.
|
|
20
|
+
- `Drawer.Body` scrolls the focused input into view once the keyboard has settled, so it no longer sits behind the footer.
|
|
21
|
+
- `Drawer.Body` defaults `keyboardShouldPersistTaps` to `"handled"`, so a drag that starts outside the focused input no longer dismisses the keyboard.
|
|
22
|
+
- `SelectField`'s dropdown now follows its field while the page scrolls. Consumers no longer need `keyboardDismissMode="on-drag"` and can drop it.
|
|
23
|
+
|
|
3
24
|
## 2.2.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/COMPONENT_GUIDELINES.md
CHANGED
|
@@ -702,21 +702,25 @@ on every render of the host component.
|
|
|
702
702
|
|
|
703
703
|
#### Consumer requirements to document
|
|
704
704
|
|
|
705
|
-
|
|
706
|
-
|
|
705
|
+
This lives on the _consumer's_ scroll container, not the component, so it must
|
|
706
|
+
be stated in the component's documentation or it will be missed:
|
|
707
707
|
|
|
708
|
-
| Prop | Why
|
|
709
|
-
| ------------------------------------- |
|
|
710
|
-
| `keyboardShouldPersistTaps="handled"` | Without it the first tap near a focused input is swallowed to dismiss the keyboard, and never reaches the row
|
|
711
|
-
| `keyboardDismissMode="on-drag"` | Dismisses the keyboard on scroll, which blurs the field and closes the overlay rather than leaving it stranded at a stale position |
|
|
708
|
+
| Prop | Why |
|
|
709
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
710
|
+
| `keyboardShouldPersistTaps="handled"` | Without it the first tap near a focused input is swallowed to dismiss the keyboard, and never reaches the row |
|
|
712
711
|
|
|
713
712
|
`keyboardShouldPersistTaps` must be set on the **outermost** scroll container.
|
|
714
713
|
React Native's responder capture follows the React tree root-downwards, so an
|
|
715
714
|
outer `ScrollView` left at the default `"never"` captures the touch before any
|
|
716
715
|
inner one is consulted — and a `Modal` does not isolate its contents, because the
|
|
717
|
-
React tree is unchanged by it.
|
|
716
|
+
React tree is unchanged by it. `Drawer.Body` defaults to `"handled"`.
|
|
718
717
|
|
|
719
|
-
|
|
718
|
+
Do **not** require `keyboardDismissMode="on-drag"` to keep an overlay attached.
|
|
719
|
+
Closing the keyboard on every scroll is jarring in a form. An overlay positioned
|
|
720
|
+
from its anchor re-measures while it is open and follows the anchor instead, as
|
|
721
|
+
`SelectField` does.
|
|
722
|
+
|
|
723
|
+
In DirectSalesApp, `WizardScrollView` and `app/(auth)/log-in.tsx` set this.
|
|
720
724
|
|
|
721
725
|
---
|
|
722
726
|
|