Skip to content

Commit 2d3894d

Browse files
committed
Merge branch 'master' into release
2 parents 741f3c6 + 745d4da commit 2d3894d

File tree

100 files changed

+1935
-516
lines changed

Some content is hidden

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

100 files changed

+1935
-516
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

+49-13
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,26 @@ assignees: ''
77

88
---
99

10-
### Describe the bug
1110
<!--
12-
A clear and concise description of what the bug is.
11+
NOTE: please submit only bug reports here, any new questions or feature requests should be submitted in Discussions:
12+
https://github.com/wix/react-native-ui-lib/discussions
13+
-->
14+
15+
## Description
16+
17+
<!--
18+
A clear and concise description of what is the bug.
1319
-->
1420

15-
### To Reproduce
21+
### Related to
22+
23+
- [ ] Components
24+
- [ ] Demo
25+
- [ ] Docs
26+
- [ ] Typings
27+
28+
### Steps to reproduce
29+
1630
<!--
1731
Steps to reproduce the behavior:
1832
1. Go to '...'
@@ -21,28 +35,50 @@ Steps to reproduce the behavior:
2135
4. See error
2236
-->
2337

24-
### Expected behavior
38+
#### Expected behavior
39+
2540
<!--
2641
A clear and concise description of what you expected to happen.
2742
-->
2843

29-
### Code snippet
44+
#### Actual behavior
45+
3046
<!--
31-
A code snippet that reproduce the issue.
47+
A clear and concise description of what actually happens.
3248
-->
3349

34-
### Screenshots
50+
## More Info
51+
52+
### Code snippet
53+
3554
<!--
36-
If applicable, add screenshots to help explain your problem.
55+
A code snippet that reproduce the issue.
3756
-->
3857

39-
### Device (please complete the following information)
58+
```
59+
60+
61+
```
62+
63+
### Screenshots/Video
64+
4065
<!--
41-
- Device: [e.g. iPhone6]
42-
- OS: [e.g. iOS8.1]
66+
If applicable, add screenshots or a video to help explain your problem.
4367
-->
4468

45-
### Additional context
69+
### Environment
70+
4671
<!--
47-
Add any other context about the problem here.
72+
Fill in your RNUILib and React Native versions below.
73+
74+
List other libraries if relevant.
4875
-->
76+
77+
- React Native:
78+
- React Native UI Lib:
79+
80+
### Affected platforms
81+
82+
- [ ] Android
83+
- [ ] iOS
84+
- [ ] Web

.github/ISSUE_TEMPLATE/config.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question
4+
url: https://github.com/wix/react-native-ui-lib/discussions/categories/q-a
5+
about: Please ask and answer questions here.
6+
- name: Feature Request
7+
url: https://github.com/wix/react-native-ui-lib/discussions/categories/ideas
8+
about: Please submit feature requests here.

.github/ISSUE_TEMPLATE/docs-issue.md

-22
This file was deleted.

.github/ISSUE_TEMPLATE/feature-request.md

-23
This file was deleted.

.github/ISSUE_TEMPLATE/question.md

-15
This file was deleted.

.github/ISSUE_TEMPLATE/typescript-issue.md

-18
This file was deleted.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Download our Expo demo app <br>
2424

2525
## Installing
2626

27-
See setup instructions [here](https://wix.github.io/react-native-ui-lib/getting-started/setup).
27+
See setup instructions [here](https://wix.github.io/react-native-ui-lib/docs/getting-started/setup).
2828

2929
#### New Major Version 6.0
30-
See [breaking changes](https://wix.github.io/react-native-ui-lib/getting-started/v6)
30+
See [breaking changes](https://wix.github.io/react-native-ui-lib/docs/getting-started/v6)
3131

3232
#### For React Native >= 0.60.0
3333
please use `react-native-ui-lib`
@@ -95,7 +95,7 @@ ThemeManager.setComponentTheme('Button', (props, context) => {
9595

9696
### Step 3
9797
Use it all together.
98-
Your configurations will be applied on uilib components so you can use them easily with [modifiers](https://wix.github.io/react-native-ui-lib/foundation/modifiers).
98+
Your configurations will be applied on uilib components so you can use them easily with [modifiers](https://wix.github.io/react-native-ui-lib/docs/foundation/modifiers).
9999

100100
```jsx
101101
// MyScreen.js

demo/src/screens/MenuStructure.js

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export const navigationData = {
157157
{title: 'Native TouchableOpacity', tags: 'touchable native', screen: 'unicorn.incubator.TouchableOpacityScreen'},
158158
{title: '(New) Dialog', tags: 'dialog modal popup alert', screen: 'unicorn.incubator.IncubatorDialogScreen'},
159159
{title: '(New) TextField', tags: 'text field input', screen: 'unicorn.components.IncubatorTextFieldScreen'},
160+
{title: '(New) Toast', tags: 'toast', screen: 'unicorn.components.IncubatorToastScreen'},
160161
{title: 'ExpandableOverlay', tags: 'text field expandable input picker', screen: 'unicorn.components.IncubatorExpandableOverlayScreen'},
161162
{title: 'WheelPicker (Incubator)', tags: 'wheel picker spinner experimental', screen: 'unicorn.incubator.WheelPickerScreen'},
162163
{title: 'Pan View', tags: 'pan swipe drag', screen: 'unicorn.incubator.PanViewScreen'},

demo/src/screens/componentScreens/RadioButtonScreen.js

+21-25
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {Component} from 'react';
2-
import {TouchableOpacity, ScrollView, Platform, StyleSheet} from 'react-native';
2+
import {TouchableOpacity, ScrollView} from 'react-native';
33
import {Assets, RadioButton, Colors, Shadows, RadioGroup, View, Text} from 'react-native-ui-lib'; //eslint-disable-line
44
const starIcon = require('../../assets/icons/star.png');
55

@@ -39,7 +39,14 @@ export default class RadioButtonScreen extends Component {
3939
renderRadioButtonWithImage(value, icon, style) {
4040
return (
4141
<View row centerV marginR-15>
42-
<RadioButton value={value} size={15} color={Colors.green30} borderRadius={0} iconSource={icon} iconStyle={style}/>
42+
<RadioButton
43+
value={value}
44+
size={15}
45+
color={Colors.green30}
46+
borderRadius={0}
47+
iconSource={icon}
48+
iconStyle={style}
49+
/>
4350
</View>
4451
);
4552
}
@@ -55,8 +62,12 @@ export default class RadioButtonScreen extends Component {
5562
render() {
5663
return (
5764
<View flex useSafeArea bg-grey80>
58-
<View flex>
59-
<ScrollView style={{padding: 20}}>
65+
<ScrollView>
66+
<View padding-page>
67+
<Text h1 marginB-s5>
68+
Radio Buttons
69+
</Text>
70+
6071
<RadioGroup initialValue={this.state.color || null} onValueChange={value => this.setState({color: value})}>
6172
<Text marginB-20 text60 grey10>
6273
Select a color{'\n'}
@@ -69,7 +80,11 @@ export default class RadioButtonScreen extends Component {
6980
<Text marginT-10>You chose: {this.state.color ? this.state.color : 'Default'}</Text>
7081
</RadioGroup>
7182

72-
<RadioGroup marginT-30 initialValue={this.state.textSide} onValueChange={value => this.setState({textSide: value})}>
83+
<RadioGroup
84+
marginT-30
85+
initialValue={this.state.textSide}
86+
onValueChange={value => this.setState({textSide: value})}
87+
>
7388
<Text marginB-20 text60 grey10>
7489
Alignments
7590
</Text>
@@ -129,28 +144,9 @@ export default class RadioButtonScreen extends Component {
129144
</View>
130145

131146
<View style={{height: 30}}/>
132-
</ScrollView>
133-
134-
<View paddingH-20 paddingV-10 style={[styles.shadow, {backgroundColor: Colors.grey80}]}>
135-
<Text text40 grey10>
136-
Radio Buttons
137-
</Text>
138147
</View>
139-
</View>
148+
</ScrollView>
140149
</View>
141150
);
142151
}
143152
}
144-
145-
const styles = StyleSheet.create({
146-
shadow: {
147-
...Platform.select({
148-
ios: {
149-
...Shadows.grey20.bottom
150-
},
151-
android: {
152-
elevation: 3
153-
}
154-
})
155-
}
156-
});

demo/src/screens/incubatorScreens/IncubatorDialogScreen.tsx

+14-25
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {Component} from 'react';
22
import {StyleSheet, ModalProps} from 'react-native';
33
import {FlatList} from 'react-native-gesture-handler';
4-
import {View, Text, Card, Button, Incubator, Colors, BorderRadiuses, Constants} from 'react-native-ui-lib'; //eslint-disable-line
4+
import {View, Text, Card, Button, Incubator, Colors, Spacings} from 'react-native-ui-lib';
55

66
interface Item {
77
value: string;
@@ -34,10 +34,11 @@ const colors: Item[] = [
3434
export default class IncubatorDialogScreen extends Component {
3535
state = {visible: false};
3636
modalProps: ModalProps = {supportedOrientations: ['portrait', 'landscape']};
37+
headerProps: Incubator.DialogHeaderProps = {text: {title: 'Title (swipe here)'}};
3738

3839
renderVerticalItem = ({item}: {item: Item}) => {
3940
return (
40-
<Text text50 margin-20 color={item.value} onPress={this.closeDialog}>
41+
<Text text50 marginH-s5 marginV-s2 color={item.value} onPress={this.closeDialog}>
4142
{item.label}
4243
</Text>
4344
);
@@ -63,12 +64,12 @@ export default class IncubatorDialogScreen extends Component {
6364
const {visible} = this.state;
6465

6566
return (
66-
<View bg-dark80 flex padding-20>
67+
<View bg-grey80 flex padding-20>
6768
<Card height={100} center padding-20>
6869
<Text text50>IncubatorDialogScreen</Text>
6970
</Card>
7071
<View flex center>
71-
<Button marginV-20 label="Open Dialog" onPress={this.openDialog}/>
72+
<Button marginV-s5 label="Open Dialog" onPress={this.openDialog}/>
7273
</View>
7374
<Incubator.Dialog
7475
useSafeArea
@@ -77,35 +78,23 @@ export default class IncubatorDialogScreen extends Component {
7778
bottom
7879
centerH
7980
modalProps={this.modalProps}
81+
headerProps={this.headerProps}
8082
>
81-
<View style={styles.dialog}>
82-
<Text text60 margin-s2>
83-
Title (swipe here)
84-
</Text>
85-
<View height={1} bg-grey40/>
86-
<FlatList
87-
showsVerticalScrollIndicator={false}
88-
style={styles.verticalScroll}
89-
data={colors}
90-
renderItem={this.renderVerticalItem}
91-
keyExtractor={this.keyExtractor}
92-
/>
93-
</View>
83+
<FlatList
84+
showsVerticalScrollIndicator={false}
85+
contentContainerStyle={styles.verticalScroll}
86+
data={colors}
87+
renderItem={this.renderVerticalItem}
88+
keyExtractor={this.keyExtractor}
89+
/>
9490
</Incubator.Dialog>
9591
</View>
9692
);
9793
}
9894
}
9995

10096
const styles = StyleSheet.create({
101-
dialog: {
102-
marginBottom: 20,
103-
backgroundColor: Colors.white,
104-
maxHeight: Constants.screenHeight * 0.8,
105-
width: 300,
106-
borderRadius: BorderRadiuses.br20
107-
},
10897
verticalScroll: {
109-
marginTop: 20
98+
paddingVertical: Spacings.s2
11099
}
111100
});

demo/src/screens/incubatorScreens/IncubatorTextFieldScreen.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@ export default class TextFieldScreen extends Component {
228228
placeholder="Enter text..."
229229
multiline
230230
showCharCounter
231+
bottomAccessory={
232+
<Text text100>
233+
{Assets.emojis.grapes} {Assets.emojis.melon} {Assets.emojis.banana}
234+
</Text>
235+
}
231236
charCounterStyle={{color: Colors.blue30}}
232237
maxLength={20}
233238
fieldStyle={styles.withFrame}

0 commit comments

Comments
 (0)