Skip to content

Commit 022f207

Browse files
committed
update release with master - v4.2.0
2 parents 73dd71c + 39ab763 commit 022f207

File tree

314 files changed

+2812
-14057
lines changed

Some content is hidden

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

314 files changed

+2812
-14057
lines changed

android/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ include ':react-native-navigation'
66
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/')
77

88
include ':react-native-ui-lib'
9-
project(':react-native-ui-lib').projectDir = new File(rootProject.projectDir, '../lib/android')
9+
project(':react-native-ui-lib').projectDir = new File(rootProject.projectDir, '../lib/android')

demo/src/screens/MainScreen.js

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
Button,
1515
Carousel,
1616
TextField,
17-
Image,
17+
Image
1818
} from 'react-native-ui-lib'; //eslint-disable-line
1919
import {navigationData} from './MenuStructure';
2020

@@ -23,7 +23,7 @@ export default class MainScreen extends Component {
2323
containerStyle: ViewPropTypes.style,
2424
renderItem: PropTypes.func,
2525
renderSectionTitle: PropTypes.func,
26-
pageStyle: ViewPropTypes.style,
26+
pageStyle: ViewPropTypes.style
2727
};
2828

2929
constructor(props) {
@@ -34,7 +34,7 @@ export default class MainScreen extends Component {
3434

3535
this.state = {
3636
currentPage: 0,
37-
filteredNavigationData: data,
37+
filteredNavigationData: data
3838
};
3939

4040
this.filterExplorerScreens = _.throttle(this.filterExplorerScreens, 300);
@@ -46,7 +46,7 @@ export default class MainScreen extends Component {
4646
id: 'uilib.settingsButton',
4747
testID: 'uilib.settingsButton',
4848
enabled: true,
49-
icon: Assets.icons.settings,
49+
icon: Assets.icons.settings
5050
});
5151
Navigation.mergeOptions(props.componentId, navigationStyle);
5252
}
@@ -76,10 +76,10 @@ export default class MainScreen extends Component {
7676
id: 'uilib.searchButton',
7777
testID: 'uilib.searchButton',
7878
enabled: true,
79-
icon: Assets.icons.search,
80-
},
81-
],
82-
},
79+
icon: Assets.icons.search
80+
}
81+
]
82+
}
8383
};
8484
}
8585

@@ -91,7 +91,7 @@ export default class MainScreen extends Component {
9191
case 'uilib.settingsButton':
9292
this.pushScreen({
9393
name: 'unicorn.Settings',
94-
passProps: {navigationData: data, playground: this.props.playground},
94+
passProps: {navigationData: data, playground: this.props.playground}
9595
});
9696
break;
9797
case 'uilib.searchButton':
@@ -111,11 +111,11 @@ export default class MainScreen extends Component {
111111
options: {
112112
topBar: {
113113
title: {
114-
text: options.title,
115-
},
116-
},
117-
},
118-
},
114+
text: options.title
115+
}
116+
}
117+
}
118+
}
119119
});
120120
}
121121

@@ -130,14 +130,14 @@ export default class MainScreen extends Component {
130130
options: {
131131
topBar: {
132132
title: {
133-
text: options.title,
134-
},
135-
},
136-
},
137-
},
138-
},
139-
],
140-
},
133+
text: options.title
134+
}
135+
}
136+
}
137+
}
138+
}
139+
]
140+
}
141141
});
142142
}
143143

@@ -146,8 +146,8 @@ export default class MainScreen extends Component {
146146
Navigation.mergeOptions(this.props.componentId, {
147147
topBar: {
148148
visible: shouldShow,
149-
animate: true,
150-
},
149+
animate: true
150+
}
151151
});
152152
};
153153

@@ -190,7 +190,7 @@ export default class MainScreen extends Component {
190190

191191
this.setState({
192192
filterText,
193-
filteredNavigationData,
193+
filteredNavigationData
194194
});
195195
}
196196

@@ -208,9 +208,10 @@ export default class MainScreen extends Component {
208208
marginTop: Constants.isIOS ? Constants.statusBarHeight + 10 : 14,
209209
marginLeft: 16,
210210
color: ThemeManager.primaryColor,
211-
width: Constants.screenWidth - 80,
211+
width: Constants.screenWidth - 80
212212
}}
213213
hideUnderline
214+
floatingPlaceholder={false}
214215
/>
215216
<Button
216217
testID={'SearchButton'}
@@ -233,7 +234,7 @@ export default class MainScreen extends Component {
233234

234235
return (
235236
<View centerV row paddingL-20 marginB-10>
236-
<Image source={Assets.icons.chevronRight} style={{tintColor: Colors.dark10}} supportRTL />
237+
<Image source={Assets.icons.chevronRight} style={{tintColor: Colors.dark10}} supportRTL/>
237238
<Text
238239
style={[item.deprecate && styles.entryTextDeprecated]}
239240
dark10
@@ -298,7 +299,7 @@ export default class MainScreen extends Component {
298299
}
299300

300301
renderCarousel(data) {
301-
const {renderItem, pageStyle} = this.props;
302+
const {pageStyle} = this.props;
302303
const dividerTransforms = [-10, -55, -20];
303304
const dividerWidths = ['60%', '75%', '90%'];
304305
const keys = _.keys(data);
@@ -318,7 +319,7 @@ export default class MainScreen extends Component {
318319
style={[
319320
styles.pageTitleExtraDivider,
320321
{width: dividerWidths[_.indexOf(keys, key) % dividerWidths.length]},
321-
{transform: [{translateX: dividerTransforms[_.indexOf(keys, key) % dividerTransforms.length]}]},
322+
{transform: [{translateX: dividerTransforms[_.indexOf(keys, key) % dividerTransforms.length]}]}
322323
]}
323324
/>
324325
<View flex>
@@ -384,22 +385,22 @@ const styles = StyleSheet.create({
384385
padding: 12,
385386
flexWrap: 'wrap',
386387
flexDirection: 'row',
387-
justifyContent: 'center',
388+
justifyContent: 'center'
388389
},
389390
page: {
390391
flex: 1,
391-
paddingLeft: 24,
392+
paddingLeft: 24
392393
},
393394
pageTitleContainer: {
394395
borderBottomWidth: 1,
395396
paddingBottom: 4,
396-
borderColor: Colors.dark60,
397+
borderColor: Colors.dark60
397398
},
398399
pageTitleExtraDivider: {
399-
marginTop: 5,
400400
// marginBottom: 22,
401+
marginTop: 5
401402
},
402403
entryTextDeprecated: {
403-
textDecorationLine: 'line-through',
404-
},
404+
textDecorationLine: 'line-through'
405+
}
405406
});

demo/src/screens/MenuStructure.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const navigationData = {
4141
{title: 'TabBar', tags: 'tab bar', screen: 'unicorn.components.TabBarScreen'},
4242
{title: 'Toast', tags: 'toast top bottom snackbar', screen: 'unicorn.components.ToastsScreen'},
4343
{title: 'Wheel Picker Dialog', tags: 'wheel picker dialog', screen: 'unicorn.components.WheelPickerDialogScreen'},
44+
{title: 'Wizard', tags: 'wizard', screen: 'unicorn.components.WizardScreen'},
4445
],
4546
},
4647
Form: {
@@ -51,6 +52,7 @@ export const navigationData = {
5152
{title: 'Color Swatch', tags: 'color swatch and palette', screen: 'unicorn.components.ColorSwatchScreen'},
5253
{title: 'TextField', tags: 'text input field form', screen: 'unicorn.components.InputsScreen'},
5354
{title: 'Picker', tags: 'picker form', screen: 'unicorn.components.PickerScreen'},
55+
{title: 'DateTimePicker', tags: 'date time picker form', screen: 'unicorn.components.DateTimePickerScreen'},
5456
{title: 'RadioButton', tags: 'radio button group controls', screen: 'unicorn.components.RadioButtonScreen'},
5557
{title: 'Stepper', tags: 'stepper form', screen: 'unicorn.components.StepperScreen'},
5658
{title: 'Slider', tags: 'slider', screen: 'unicorn.components.SliderScreen'},

demo/src/screens/componentScreens/CarouselScreen.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {Component} from 'react';
2-
import {StyleSheet} from 'react-native';
2+
import {StyleSheet, ScrollView} from 'react-native';
33
import {Constants, View, Text, Carousel, Image, Card} from 'react-native-ui-lib'; // eslint-disable-line
44
import _ from 'lodash';
55

@@ -28,7 +28,7 @@ class CarouselScreen extends Component {
2828

2929
render() {
3030
return (
31-
<View flex>
31+
<ScrollView>
3232
<Text text30 margin-20>
3333
Carousel
3434
</Text>
@@ -89,7 +89,7 @@ class CarouselScreen extends Component {
8989
})}
9090
</Carousel>
9191
</View>
92-
</View>
92+
</ScrollView>
9393
);
9494
}
9595
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import React, {Component} from 'react';
2+
import {DateTimePicker, View, Text} from 'react-native-ui-lib'; // eslint-disable-line
3+
4+
5+
export default class DateTimePickerScreen extends Component {
6+
7+
render() {
8+
return (
9+
<View flex padding-20>
10+
<Text text40 marginB-40>Date Time Picker</Text>
11+
12+
<DateTimePicker
13+
title={'Date'}
14+
placeholder={'Select a date'}
15+
// value={new Date('October 13, 2014')}
16+
/>
17+
<DateTimePicker
18+
mode={'time'}
19+
title={'Time'}
20+
placeholder={'Select time'}
21+
// value={new Date('2015-03-25T12:00:00-06:30')}
22+
/>
23+
</View>
24+
);
25+
}
26+
}

demo/src/screens/componentScreens/FloatingButtonScreen.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,34 @@ export default class FloatingButtonScreen extends Component {
6666
and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
6767
Contrary to popular belief, Lorem Ipsum is not simply random text.
6868
It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.
69+
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
70+
Lorem Ipsum has been the industry standard dummy text ever since the 1500s,
71+
when an unknown printer took a galley of type and scrambled it to make a type specimen book.
72+
It has survived not only five centuries, but also the leap into electronic typesetting,
73+
remaining essentially unchanged.
74+
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
75+
and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
76+
Contrary to popular belief, Lorem Ipsum is not simply random text.
77+
It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.
6978
</Text>
7079
</View>
7180
</ScrollView>
7281

7382
<FloatingButton
7483
visible={this.state.showButton}
75-
button={{label: 'Approve', onPress: this.close}}
76-
secondaryButton={{label: 'Not now', onPress: this.notNow}}
84+
button={{
85+
label: 'Approve',
86+
onPress: this.close,
87+
labelStyle: {fontWeight: '400'}
88+
}}
89+
secondaryButton={{
90+
label: 'Not now',
91+
onPress: this.notNow,
92+
color: Colors.red30,
93+
labelStyle: {fontWeight: '400'}
94+
}}
7795
// bottomMargin={80}
96+
// hideBackgroundOverlay
7897
/>
7998
</View>
8099
);

demo/src/screens/componentScreens/InputsScreen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ export default class InputsScreen extends Component {
287287
borderWidth: 1,
288288
marginBottom: INPUT_SPACING,
289289
padding: 10,
290-
borderColor: Colors.dark60,
290+
borderColor: Colors.dark60
291291
}}
292292
>
293293
<TextArea placeholder="Write something.."/>
@@ -320,7 +320,7 @@ export default class InputsScreen extends Component {
320320
placeholder="Centered"
321321
centered
322322
containerStyle={{marginBottom: INPUT_SPACING}}
323-
hideUnderline
323+
// hideUnderline
324324
/>
325325
</ScrollView>
326326
<KeyboardAwareInsetsView/>

0 commit comments

Comments
 (0)