1601 Commits

Author SHA1 Message Date
Nicolas Gallagher 4146b16a68 Add PanResponder examples to docs 2020-06-05 11:53:48 -07:00
Nicolas Gallagher fe013b30dc Add dom-event-testing-libary as a private package
This is copied from facebook/react with various fixes applied (which I'll push
upstream at a later date). Necessary for testing the Responder Event System
rewrite.
2020-06-05 11:53:47 -07:00
Nicolas Gallagher fa6e269832 Add missing imports to docs mdx files 2020-06-02 10:57:38 -07:00
Nicolas Gallagher ee1cb490d6 Fix optional value flow types 2020-06-02 10:57:37 -07:00
Nicolas Gallagher f4e8b6b194 [change] modernize Image
Rewrite Image to use function components and hooks.

Fix #1322
2020-06-02 10:57:36 -07:00
Nicolas Gallagher 7e616f6d46 Fix props table for docs
Stop using the built-in Props table from Storybook (which wasn't working.)
2020-06-02 10:57:36 -07:00
Nicolas Gallagher 8952eccf86 [change] Explicitly forward props and introduce unstable_{ariaSet,dataSet}
Rather than filtering props, they are explicitly forwarded in each component.
This makes it easier to see exactly which props are being forwarded to host
components by each React Native component. Two new props - `unstable_ariaSet`
and `unstable_dataSet` - are introduced to avoid iterating over props to find
`aria` and `data` props.

The `accessibilityValue` prop is also implemented.
2020-06-02 10:57:35 -07:00
Nicolas Gallagher 654f65e3e0 [change] modernize TextInput
Rewrite TextInput to use function components and hooks.
Rewrite the unit tests to replace enzyme with testing-library.

Fix #1339
2020-06-02 10:55:51 -07:00
Nicolas Gallagher d94a14dc8c [change] RefreshControl, StatusBar, YellowBox as function components 2020-06-02 10:55:50 -07:00
Nicolas Gallagher 8d37fde5ee [change] modernize Picker
Rewrite Picker to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:50 -07:00
Nicolas Gallagher fdf53df301 [change] modernize CheckBox
Rewrite CheckBox to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:49 -07:00
Nicolas Gallagher 999c2ad122 [change] modernize ActivityIndicator
Rewrite ActivityIndicator to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:49 -07:00
Nicolas Gallagher 35236a3cc2 [change] modernize Text
Rewrite Text to use function components and hooks.
2020-06-02 10:55:48 -07:00
Nicolas Gallagher 2724ca0293 Add eslint-plugin-react-hooks 2020-06-02 10:55:48 -07:00
Nicolas Gallagher fc443c5abd [change] modernize View
Rewrite View to use function components and hooks.

The 'usePlatformMethods' hook also fixes a bug in the class-based
implementation of 'setNativeProps' which was unable to correctly merge its
styles with those provided via the component API. In the future,
'setNativeProps' will be removed from React Native anyway.

See (3) in #1136 for more context.
2020-06-02 10:55:47 -07:00
Nicolas Gallagher 7d440c74f4 [change] modernize Switch
Rewrite Switch to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:47 -07:00
Nicolas Gallagher ebc3882661 [change] modernize ScrollViewBase
Rewrite ScrollViewBase to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:46 -07:00
Nicolas Gallagher b28d2a8214 [fix] SafeAreaView types 2020-06-02 10:55:46 -07:00
Nicolas Gallagher 94ecc46ece [change] modernize ProgressBar
Rewrite ProgressBar to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:45 -07:00
Nicolas Gallagher 5b40b9d6aa [change] modernize ImageBackground
Rewrite ImageBackground to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:45 -07:00
Nicolas Gallagher 840a2e91d4 [change] modernize Button
Rewrite Button to use function components.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:44 -07:00
Nicolas Gallagher 96d8649197 [change] modernize AppRegistry
Rewrite AppRegistry to use function components and hooks.
Rewrite the tests to replace enzyme with testing-library.
2020-06-02 10:55:44 -07:00
Nicolas Gallagher a2cccaf528 [change] Add usePlatformMethods to implement instance methods
A hook equivalent for implementing "native methods" on refs to elements backed
by function components.
2020-06-02 10:55:43 -07:00
Nicolas Gallagher 51ac083d56 [change] Add useElementLayout hook to implement onLayout callback
A hook equivalent for implementing onLayout in function components.  Removes
the fallback to using window resize events. A ResizeObserver polyfill is now
requires to use the `onLayout` prop.
2020-06-02 10:55:43 -07:00
Nicolas Gallagher 9dbe17fa6a 0.12.3 0.12.3 2020-06-02 10:51:45 -07:00
Nicolas Gallagher f4a481bb4f [fix] Allow 'lang' attribute to be forwarded to DOM nodes 2020-06-02 10:38:35 -07:00
Nicolas Gallagher 5287044f40 0.12.2 0.12.2 2020-02-24 14:08:31 -08:00
Vladimir Guguiev 92737d33f4 [fix] Prevent injectEventPluginsByName throwing when re-evaluating code
Close #1539
2020-02-24 13:53:23 -08:00
editkid 18427aae50 [fix] Avoid use of Object.values
Improve compatibility with older browsers (without polyfilling)

Close #1541
2020-02-24 13:30:05 -08:00
Evan Bacon a7ab961d95 [fix] Image support for variable resolution images
Renders the asset scale which is closest to the window scale. Requires bundler integration.

Close #1456

Co-authored-by: David Calhoun <dpcalhoun@gmail.com>
2020-02-10 11:17:14 -08:00
Nicolas Gallagher c8b73fa4e4 0.12.1 0.12.1 2020-02-06 13:39:50 -08:00
Nicolas Gallagher 3d53273fe7 Update internal paths to docs 2020-02-06 13:38:38 -08:00
Nicolas Gallagher 5b7f584f19 [fix] View filtering of accessibility props 2020-02-06 11:27:31 -08:00
Nicolas Gallagher 88c664fa0f Update dependencies for 'benchmarks' package 2020-01-30 17:11:13 -08:00
Nicolas Gallagher dff62b3af6 Update jest dependencies 2020-01-30 17:01:07 -08:00
Nicolas Gallagher 032279e5f7 Update dependencies for 'docs' package 2020-01-30 16:54:01 -08:00
Nicolas Gallagher d30d65b29d Update babel dependencies 2020-01-30 16:45:07 -08:00
Nicolas Gallagher dee418bb93 0.12.0 0.12.0 2020-01-24 14:24:35 -08:00
Brandon Ros 1cc7e6cbf4 Fix bad invariant import path 2020-01-10 15:55:40 -08:00
Nicolas Gallagher 16c0109df6 Replace invariant with console.error in View
Jest dumps the invariant error to the console when unit tests run, which is
both annoying and more likely to cause unwanted error to go unnoticed. We're
also moving away from using 'invariant' in React. This patch replaces the
invariant with a call to 'console.error', which won't crash an app that is
using raw text nodes as View children, but it's better than nothing.
2019-12-21 16:58:14 +00:00
Nicolas Gallagher 287251a06a [change] Remove 'placeholderTextColor' from 'createElement' props
TextInput converts the 'placeholderTextColor' prop to a style.
2019-12-21 16:57:11 +00:00
Nicolas Gallagher e670e8135b [fix] TextInput forwards placeholderTextColor
Fix a bug introduced by 924e891f58

Ref #1512
2019-12-20 23:30:37 +00:00
Nicolas Gallagher e22f0bebb3 [fix] ScrollView disabling of scroll
Make sure 'scrollEnabled={false}' works on desktop browsers and no longer
relies on using 'e.preventDefault()'.

Fix #1491
2019-12-20 19:30:09 +00:00
luis filipe f16c2c45ea [fix] ScrollView scrollEventThrottle development warning check
Close #1498
2019-12-20 19:24:41 +00:00
Nicolas Gallagher fc033a3161 [add] TextInput disabled prop
Add support for disabling TextInput elements

Fix #1036
2019-12-20 19:18:01 +00:00
Greg Westneat 8fa9fc5cc5 Update README link for Docz
Close #1504
2019-12-19 22:35:30 +00:00
Nicolas Gallagher e0412acb94 [add] Allow style scrollbarWidth 'thin' value
Close #1499
2019-12-19 16:59:06 +00:00
ecreeth 0b31a8b096 Refactor import and export in react-native-web entry file
Close #1509
2019-12-19 11:04:41 +00:00
Nicolas Gallagher b10711bddd [fix] TextInput autoComplete behavior
Fix 'autoComplete' behavior now that Chrome has fixed broken behavior for 'off'.
Add fallback support for React Native's 'autoCompleteType' prop.

Close #1404
2019-12-18 22:31:45 +00:00
Chris Drackett 5334a4f0d8 [fix] TextInput remove default browser margin
Close #1458
2019-12-18 22:24:37 +00:00