Commit Graph

1603 Commits

Author SHA1 Message Date
Nicolas Gallagher 933bd138ce 0.14.1 0.14.1 2020-10-12 13:41:20 -07:00
Nicolas Gallagher c2019a9881 [fix] Pressable cursor and touch-action styles
Also add unit tests for Pressable.

Fix #1764
2020-10-12 13:37:42 -07:00
Nicolas Gallagher 78174d7b48 0.14.0 0.14.0 2020-10-09 12:59:41 -07:00
Nicolas Gallagher 38fd574984 [add] Pressable support for hover state
This patch ports the 'useHover' hook to React Native for Web, providing hover
state that is scoped to a pressable and does not bubble to ancestor pressables.
This behavior aligns with the behavior of the focus and press states.

Fix #1708
2020-10-09 11:35:36 -07:00
Nicolas Gallagher 5b7a6bc30a Move hooks into 'modules' directory 2020-10-09 11:35:35 -07:00
James Ward d97a1ca567 [add] Modal component
This adds support for the React Native Modal on web.

The app content is hidden from screen readers by setting the aria-modal flag on
the modal. This focus is trapped within the modal, both when attempting to
focus elsewhere using the mouse as well as when attempting to focus elsewhere
using the keyboard. A built-in "Escape to close" mechanism is been implemented
that calls 'onRequestClose' for the active modal.

Close #1646
Fix #1020
2020-10-09 11:32:31 -07:00
Nicolas Gallagher 6bd41a622a Remove react-dom vendor directory 2020-10-09 11:32:30 -07:00
Nicolas Gallagher 108366a724 [change] Default flex-basis value of Views
React Native has an implementation of flexbox that does not quite follow the
W3C spec for flexbox. Previously, React Native for Web attempted to replicate
the React Native rendering by setting flexBasis to 0%. However, this created
its own problems where views could collapse down to 0px in height on the web.
This patch relies sets the default flexBasis back to 'auto'. This will cause
different rendering inconsistencies with React Native, which can be addressed
by making changes to existing React Native styles. And ultimately, it is up to
Yoga to correct its flexbox implementation.

Fix #1640
Fix #1604
Fix #1264
Close #1265
2020-10-09 11:32:30 -07:00
Nicolas Gallagher bf2e10d482 0.13.18 0.13.18 2020-10-09 11:17:09 -07:00
Mark Lawlor faf7fa3374 [fix] skip ResizeObserver warning during SSR
Close #1762
2020-10-09 11:14:00 -07:00
Nicolas Gallagher df14c7278a 0.13.17 0.13.17 2020-10-08 12:29:11 -07:00
Nicolas Gallagher b15e8784c4 Add unit tests for ref imperative methods 2020-10-08 12:27:15 -07:00
Nicolas Gallagher 583e16fa8d Memoize refs
Refs can be memoized following the fix in the previous commit.

Fix #1755
Fix #1665
2020-10-07 15:28:34 -07:00
Nicolas Gallagher b4322734a2 [fix] Order of ref merging
Ensure internal refs are called before the forwardedRef. This ensures that the
DOM element mutation performed by usePlatformMethods occurs before user-space
refs are called.

Ref #1749
2020-10-07 15:28:33 -07:00
Nicolas Gallagher bdcb4de7dc 0.13.16 0.13.16 2020-10-06 11:41:31 -07:00
Nicolas Gallagher d8ee51e326 [fix] CSS scrollbarWidth
The previous code wasn't inserting the W3C rule because it had the same selector as the rule for proprietary styles. However, the Firefox value isn't supported anymore, and the Edge value is unnecessary as Edge uses Blink now. This patch removes the non-WebKit fallback styles for this property.

Fix #1760
2020-10-06 11:38:17 -07:00
Nicolas Gallagher aad0c88cea 0.13.15 0.13.15 2020-10-05 15:38:06 -07:00
Nicolas Gallagher 6d04e7243e [fix] Don't propagate click or contextmenu events on disabled elements
This patch fixes the PressResponder to avoid propagating click and contextmenu
events in all circumstances. It also prevents click propagating for focusable
elements that are disabled, mirroring the behavior of native buttons when
disabled.

Fix #1757
2020-10-05 15:33:50 -07:00
Julian Hundeloh ba5e9e3079 [add] AccessibilityInfo isReduceMotionEnabled
Close #1754
2020-10-05 14:51:41 -07:00
Shobhit Chittora 06d3cadf05 Update docs suggested preset to metro-react-native-babel-preset
Updating the document as `babel-preset-react-native` is deprecated in favor for
`metro-react-native-babel-preset`. More info here -
https://www.npmjs.com/package/babel-preset-react-native.

Close #1751
2020-10-05 14:48:38 -07:00
Nicolas Gallagher 72bfe499c5 Add to View tests 2020-10-05 14:28:27 -07:00
Nicolas Gallagher 92ac1f94c5 Add to Text tests 2020-10-05 13:20:28 -07:00
Nicolas Gallagher 5edba02319 Add to Image tests 2020-10-05 13:16:13 -07:00
Nicolas Gallagher 2276e17310 Add to CheckBox tests 2020-10-05 13:16:12 -07:00
Nicolas Gallagher 222fa3490e Add to Button tests 2020-10-05 13:16:11 -07:00
Nicolas Gallagher 0fb3036f31 Add to ActivityIndicator tests 2020-10-05 13:16:11 -07:00
Nicolas Gallagher 7bc6fc8347 0.13.14 0.13.14 2020-09-24 13:39:37 -07:00
Nicolas Gallagher c60417ab34 [fix] Revert ref memoization
Memoizing refs caused unexpected regressions in some class component patterns.
The memoization is being reverted for now.

Fix #1749
2020-09-24 13:26:21 -07:00
Nicolas Gallagher af0d80a808 0.13.13 0.13.13 2020-09-21 15:56:18 -07:00
Richard Lindhout 12e91a35a4 [fix] nested Text selection
Allow text to be made selectable within a text node that is not selectable.

Close #1742
2020-09-21 15:49:27 -07:00
Nicolas Gallagher 376ccc31b1 [fix] Optimize ref merging
Close #1746
Fix #1665
2020-09-21 14:04:14 -07:00
Hossein Mohammadi 4a70300b08 Remove unnecessary code from setValueForStyles
Close #1734
2020-09-11 10:27:52 -07:00
Nicolas Gallagher 7ab04987f0 Fix compressed-size build script 2020-09-09 16:08:56 -07:00
Nicolas Gallagher f52a9bcfd2 Add compressed-size action
Reports minified + gzipped size of modules
2020-09-09 13:46:23 -07:00
Nicolas Gallagher 74acb21aa8 0.13.12 0.13.12 2020-09-09 11:57:58 -07:00
Nicolas Gallagher 1e1236597a [fix] Image SSR hydration warnings
React doesn't currently provide an API for defining SSR-safe IDs, so we have to
suppress the hydration warnings that occur.

The 'useOpaqueIdentifier' hook is intended to support this use case but is not
currently a public API and development has been paused.
https://github.com/facebook/react/pull/17322.

Close #1375
2020-09-09 11:56:50 -07:00
SaltyWater e9d81afbd4 [fix] Forward scroll end event to ScrollView onScroll handler
Close #1728
2020-09-09 11:43:53 -07:00
Nicolas Gallagher 9ed9231b04 0.13.11 0.13.11 2020-09-08 12:33:37 -07:00
Nicolas Gallagher d5ab3770c0 [fix] PressResponder keyboard edge-case
Fixes the state-machine logic for the press responder when focus is moved away
from the target element during a 'keydown' event.
2020-09-08 12:32:00 -07:00
Nicolas Gallagher 397de88137 0.13.10 0.13.10 2020-09-08 11:24:19 -07:00
Nicolas Gallagher bb8a1b1455 [fix] ScrollView scrollEventThrottle logic
Fix #1726
2020-09-08 11:22:35 -07:00
dependabot[bot] 214b296c11 Bump bin-links from 1.1.3 to 1.1.8
Bumps [bin-links](https://github.com/npm/bin-links) from 1.1.3 to 1.1.8.
- [Release notes](https://github.com/npm/bin-links/releases)
- [Changelog](https://github.com/npm/bin-links/blob/v1.1.8/CHANGELOG.md)
- [Commits](https://github.com/npm/bin-links/compare/v1.1.3...v1.1.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 11:02:38 -07:00
dependabot[bot] a7df78afbe Bump markdown-to-jsx from 6.10.3 to 6.11.4
Bumps [markdown-to-jsx](https://github.com/probablyup/markdown-to-jsx) from 6.10.3 to 6.11.4.
- [Release notes](https://github.com/probablyup/markdown-to-jsx/releases)
- [Commits](https://github.com/probablyup/markdown-to-jsx/compare/6.10.3...6.11.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 11:02:25 -07:00
Harrison Mendonça c6425a0048 [fix] Add event parameter to Image onLoad callback
Close #1723
2020-09-08 11:01:29 -07:00
Nicolas Gallagher 8add92f776 0.13.9 0.13.9 2020-08-25 12:05:29 -07:00
Nicolas Gallagher 9a0acc5464 [fix] Layout of nested Text elements
Remove the 'dir=auto' attribute from nested Text elements as this can cause
browsers to produce broken text layouts.

Fix #1714
2020-08-25 12:04:08 -07:00
Nicolas Gallagher a31c4c65d0 [fix] Remove Animated 'useNativeDriver' warning
Fix #1693
2020-08-25 11:12:29 -07:00
Colby Stauss 834bd5b98b [fix] Animated getScrollableNode check
Close #1695
Fix #1680
2020-08-25 11:10:10 -07:00
Nicolas Gallagher de2a66c694 [fix] ResponderEvent touch identifier normalization
Move the touch identifier normalization into the ResponderEvent creation. This ensures that the identifier is consistent throughout. If application code reads an identifier from a touch object it can be used to find that touch in the `touchBank` array.

Fix #1716
2020-08-25 10:58:39 -07:00
Richard Lindhout 9ed0c407a9 [fix] TextInput keyboardType for 'numeric' and 'decimal'
Don't rely on native restrictions and validations for these keyboardType
values, as developers often want custom presentation (e.g., comma separators)
and custom validation.

Fix #1705
Fix #1438
Fix #1280
Close #1709
2020-08-21 11:00:21 -07:00