Commit Graph

1491 Commits

Author SHA1 Message Date
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 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 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 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 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
Maxime Thirouin
df1b62cd45 [add] useWindowDimensions hook
Add the 'useWindowDimensions' hook from React Native

Close #1487
2019-12-18 16:53:07 +00:00
Max Thirouin
4763cc71c6 Document reasoning behind hairlineWidth value
Close #1488
2019-12-18 16:33:36 +00:00
Nicolas Gallagher
aa8593ba97 [change] Switch prop 'trackColor' support
Remove support for legacy React Native props and add support for the
'trackColor' object. Retains support for the web-only equivalents as I think
this API is preferable to the one in React Native, both in terms of flexibility
and performance (no inline objects).

Fix #1382
2019-12-18 16:22:54 +00:00
Nicolas Gallagher
3c9cc66264 Update storybook dependencies 2019-12-18 14:52:03 +00:00
Nicolas Gallagher
1ad1693039 [change] Remove PropTypes exports and internal use
Removes the following deprecated exports: `ColorPropType`,
`EdgeInsetsPropType`, `PointPropType`, `TextPropTypes`, and `ViewPropTypes`.

Remove all use of `prop-types` in the implementations of components. Flow types
are used instead, so there will no longer be runtime warnings related to props.

NOTE: Removes support for `className` prop.

Fix #1383
Close #1477
Close #1474
Close #1489
2019-12-18 12:40:31 +00:00
Nicolas Gallagher
924e891f58 Update babel-plugin-tester 2019-11-15 14:21:16 -08:00
dependabot[bot]
fced06aeaa Bump js-yaml from 3.12.0 to 3.13.1
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.13.1.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.12.0...3.13.1)

Close #1479

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-13 16:29:19 -08:00
dependabot[bot]
21d60a3e9a Bump lodash from 4.17.11 to 4.17.15
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15)

Close #1478

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-13 16:28:38 -08:00
dependabot[bot]
f4ff2e8891 Bump mixin-deep from 1.3.1 to 1.3.2
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Close #1468

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-13 16:28:01 -08:00
Nicolas Gallagher
f43ce41f0d Update README 2019-11-13 11:30:31 -08:00