Skip to content

Commit 5f4a6a1

Browse files
committed
Merge branch 'master' into release
2 parents 2df0b14 + 897689a commit 5f4a6a1

File tree

143 files changed

+714
-3667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+714
-3667
lines changed

.flowconfig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ node_modules/react-native/Libraries/polyfills/.*
1111
; Flow doesn't support platforms
1212
.*/Libraries/Utilities/LoadingView.js
1313

14-
exact_by_default=true
15-
1614
[untyped]
1715
.*/node_modules/@react-native-community/cli/.*/.*
1816

@@ -25,8 +23,7 @@ node_modules/react-native/flow/
2523
[options]
2624
emoji=true
2725

28-
esproposal.optional_chaining=enable
29-
esproposal.nullish_coalescing=enable
26+
exact_by_default=true
3027

3128
module.file_ext=.js
3229
module.file_ext=.json
@@ -52,7 +49,6 @@ deprecated-type=warn
5249
unsafe-getters-setters=warn
5350
unnecessary-invariant=warn
5451
signature-verification-failure=warn
55-
deprecated-utility=error
5652

5753
[strict]
5854
deprecated-type
@@ -64,4 +60,4 @@ untyped-import
6460
untyped-type-import
6561

6662
[version]
67-
^0.137.0
63+
^0.149.0

android/app/build.gradle

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ android {
1717
compileSdkVersion rootProject.ext.compileSdkVersion
1818
ndkVersion rootProject.ext.ndkVersion
1919

20-
compileOptions {
21-
sourceCompatibility JavaVersion.VERSION_1_8
22-
targetCompatibility JavaVersion.VERSION_1_8
23-
}
24-
2520
defaultConfig {
2621
applicationId "com.rnuilib"
2722
minSdkVersion rootProject.ext.minSdkVersion
@@ -111,7 +106,7 @@ dependencies {
111106
// Run this once to be able to run the application with BUCK
112107
// puts all compile dependencies into folder libs for BUCK to use
113108
task copyDownloadableDepsToLibs(type: Copy) {
114-
from configurations.compile
109+
from configurations.implementation
115110
into 'libs'
116111
}
117112

android/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "29.0.3"
5+
buildToolsVersion = "30.0.2"
66
minSdkVersion = 21
7-
compileSdkVersion = 29
8-
targetSdkVersion = 29
7+
compileSdkVersion = 30
8+
targetSdkVersion = 30
99
ndkVersion = "20.1.5948944"
1010
RNNKotlinVersion = "1.3.61" // Or any version above 1.3.x
1111
}
1212
repositories {
1313
mavenLocal()
1414
mavenCentral()
1515
google()
16-
jcenter()
1716
}
1817
dependencies {
1918
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$RNNKotlinVersion"
20-
classpath("com.android.tools.build:gradle:4.1.0")
19+
classpath("com.android.tools.build:gradle:4.2.1")
2120

2221
// NOTE: Do not place your application dependencies here; they belong
2322
// in the individual module build.gradle files
@@ -26,6 +25,7 @@ buildscript {
2625

2726
allprojects {
2827
repositories {
28+
mavenCentral()
2929
mavenLocal()
3030
maven {
3131
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm

android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ android.useAndroidX=true
2121
android.enableJetifier=true
2222

2323
# Version of flipper SDK to use with React Native
24-
FLIPPER_VERSION=0.75.1
24+
FLIPPER_VERSION=0.93.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

demo/src/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ module.exports = {
6666
get HintsScreen() {
6767
return require('./screens/componentScreens/HintsScreen').default;
6868
},
69+
get IconScreen() {
70+
return require('./screens/componentScreens/IconScreen').default;
71+
},
6972
get ImageScreen() {
7073
return require('./screens/componentScreens/ImageScreen').default;
7174
},
@@ -235,10 +238,10 @@ module.exports = {
235238
return require('./screens/realExamples/ListActions/ListActionsScreen').default;
236239
},
237240
get ProductPage() {
238-
return require('./screens/realExamples/ProductPage');
241+
return require('./screens/realExamples/ProductPage').default;
239242
},
240243
get Twitter() {
241-
return require('./screens/realExamples/Twitter');
244+
return require('./screens/realExamples/Twitter').default;
242245
},
243246
// wrapperScreens
244247
get TouchableOpacityScreen() {

demo/src/screens/MenuStructure.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const navigationData = {
3333
{title: 'Connection Status Bar', tags: 'connection status bar', screen: 'unicorn.components.ConnectionStatusBar'},
3434
{title: 'Chip', tags: 'chip', screen: 'unicorn.components.ChipScreen'},
3535
{title: 'ExpandableSection', tags: 'expandable section', screen: 'unicorn.components.ExpandableSectionScreen'},
36+
{title: 'Icon', tags: 'image icon assets', screen: 'unicorn.components.IconScreen'},
3637
// {title: 'Overlays', tags: 'overlay image', screen: 'unicorn.components.OverlaysScreen'},
3738
{title: 'Page Control', tags: 'page', screen: 'unicorn.components.PageControlScreen'},
3839
{title: 'ProgressBar', tags: 'progress bar animated', screen: 'unicorn.animations.ProgressBarScreen'},

demo/src/screens/componentScreens/CarouselScreen.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ interface State {
3636

3737
class CarouselScreen extends Component<Props, State> {
3838
carousel = React.createRef<typeof Carousel>();
39+
private dimensionsChangeListener: any;
3940

4041
constructor(props: Props) {
4142
super(props);
@@ -51,11 +52,11 @@ class CarouselScreen extends Component<Props, State> {
5152
}
5253

5354
componentDidMount() {
54-
Constants.addDimensionsEventListener(this.onOrientationChange);
55+
this.dimensionsChangeListener = Constants.addDimensionsEventListener(this.onOrientationChange);
5556
}
5657

5758
componentWillUnmount() {
58-
Constants.removeDimensionsEventListener(this.onOrientationChange);
59+
Constants.removeDimensionsEventListener(this.dimensionsChangeListener || this.onOrientationChange);
5960
}
6061

6162
onOrientationChange = () => {
@@ -116,7 +117,6 @@ class CarouselScreen extends Component<Props, State> {
116117
pageControlProps={{onPagePress: this.onPagePress, limitShownPages}}
117118
// showCounter
118119
allowAccessibleLayout
119-
loop
120120
>
121121
{_.map([...Array(numberOfPagesShown)], (item, index) => (
122122
<Page style={{backgroundColor: BACKGROUND_COLORS[index]}} key={index}>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import React, {useState} from 'react';
2+
import {Assets, View, Icon, Text, Slider, Switch, GradientSlider} from 'react-native-ui-lib';
3+
4+
const IconScreen = () => {
5+
const [size, setSize] = useState(24);
6+
const [customSize, setCustomSize] = useState(false);
7+
const [color, setColor] = useState<string | number>();
8+
const [customColor, setCustomColor] = useState(false);
9+
10+
return (
11+
<View padding-page>
12+
<Text h1 marginB-s4>
13+
Icon Screen
14+
</Text>
15+
<View center>
16+
<Icon
17+
margin-30
18+
size={customSize ? size : undefined}
19+
tintColor={customColor ? color as string : undefined}
20+
source={Assets.icons.search}
21+
/>
22+
</View>
23+
24+
<View marginB-s3 row>
25+
<Text marginR-s2>Custom Size</Text>
26+
<Switch value={customSize} onValueChange={setCustomSize}/>
27+
</View>
28+
<Slider maximumValue={100} value={24} step={1} onValueChange={setSize}/>
29+
<Text marginB-50 marginT-s2>
30+
Custom size: {size}
31+
</Text>
32+
33+
<View marginB-s3 row>
34+
<Text marginR-s2>Custom Color</Text>
35+
<Switch value={customColor} onValueChange={setCustomColor}/>
36+
</View>
37+
<GradientSlider type={GradientSlider.types.HUE} color={color as string} onValueChange={setColor}/>
38+
<Text marginT-s2>Custom color: {color || '#000000'}</Text>
39+
</View>
40+
);
41+
};
42+
43+
export default IconScreen;

demo/src/screens/componentScreens/SectionsWheelPickerScreen.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ const SectionsWheelPickerScreen = () => {
102102
<SegmentedControl
103103
segments={[{label: '1 section'}, {label: '2 sections'}, {label: '3 sections'}]}
104104
onChangeIndex={onChangeIndex}
105+
throttleTime={400}
105106
/>
106107
<Text text50 marginV-20>
107108
Pick a duration

0 commit comments

Comments
 (0)