Skip to content

Commit 8dc646f

Browse files
committed
Revert "Merge branch 'master' into fix/picker_multiValue"
This reverts commit b9f020e, reversing changes made to 834d846.
1 parent b9f020e commit 8dc646f

Some content is hidden

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

55 files changed

+354
-1276
lines changed

demo/src/screens/MenuStructure.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ export const navigationData = {
154154
title: 'Incubator (Experimental)',
155155
screens: [
156156
{title: 'Native TouchableOpacity', tags: 'touchable native', screen: 'unicorn.incubator.TouchableOpacityScreen'},
157-
{title: '(New) Dialog', tags: 'dialog modal popup alert', screen: 'unicorn.incubator.IncubatorDialogScreen'},
158157
{title: '(New) TextField', tags: 'text field input', screen: 'unicorn.components.IncubatorTextFieldScreen'},
159158
{title: 'ExpandableOverlay', tags: 'text field expandable input picker', screen: 'unicorn.components.IncubatorExpandableOverlayScreen'},
160159
{title: 'WheelPicker (Incubator)', tags: 'wheel picker spinner experimental', screen: 'unicorn.incubator.WheelPickerScreen'},

demo/src/screens/componentScreens/PickerScreen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default class PickerScreen extends Component {
171171
onChange={filter => this.setState({filter})}
172172
renderPicker={({label}) => {
173173
return (
174-
<View row>
174+
<View row center>
175175
<Image style={{marginRight: 1, height: 16, resizeMode: 'contain'}} source={tagIcon}/>
176176
<Text grey10 text80>
177177
{label} Posts
@@ -194,7 +194,7 @@ export default class PickerScreen extends Component {
194194
getItemValue={contact => contact.name}
195195
renderPicker={contact => {
196196
return (
197-
<View row>
197+
<View row center>
198198
<Avatar size={30} source={{uri: contact.thumbnail}}/>
199199
<Text text70 marginL-10>
200200
{contact.name}

demo/src/screens/incubatorScreens/IncubatorDialogScreen.tsx

Lines changed: 0 additions & 102 deletions
This file was deleted.

demo/src/screens/incubatorScreens/IncubatorExpandableOverlayScreen.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ export default class TextFieldScreen extends Component {
8989
</Text>
9090
<Incubator.ExpandableOverlay
9191
ref={this.expandableInputRef}
92-
modalProps={{animationType: 'slide', onDismiss: () => console.warn('Modal is dismissed')}}
92+
modalProps={{animationType: 'slide'}}
9393
expandableContent={this.renderInputModal()}
9494
showTopBar
9595
topBarProps={{title: 'Edit Input', doneLabel: 'Done', onCancel: this.onCancel, onDone: this.onDone}}
96+
dialogProps={{bottom: true}}
9697
>
9798
<Incubator.TextField placeholder="Expandable input" value={textFieldValue}/>
9899
</Incubator.ExpandableOverlay>
@@ -111,7 +112,7 @@ export default class TextFieldScreen extends Component {
111112
ref={this.expandablePickerRef}
112113
useDialog
113114
expandableContent={this.renderPickerContent()}
114-
dialogProps={{bottom: true, onDismiss: () => console.warn('Dialog is dismissed')}}
115+
dialogProps={{bottom: true}}
115116
>
116117
{this.renderColorRow(selectedColor)}
117118
</Incubator.ExpandableOverlay>

demo/src/screens/incubatorScreens/TransitionViewScreen.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ const {TransitionView} = Incubator;
55
import {renderRadioGroup} from '../ExampleScreenPresenter';
66

77
interface State {
8-
enterDirection: Incubator.TransitionViewDirection;
9-
exitDirection: Incubator.TransitionViewDirection;
8+
enterDirection: Incubator.Direction;
9+
exitDirection: Incubator.Direction;
1010
key: number;
1111
}
1212

1313
export default class TransitionViewScreen extends Component<{}, State> {
1414
private ref = React.createRef<typeof TransitionView>();
1515
state = {
16-
enterDirection: Incubator.TransitionViewDirectionEnum.LEFT,
17-
exitDirection: Incubator.TransitionViewDirectionEnum.DOWN,
16+
enterDirection: 'left' as Incubator.Direction,
17+
exitDirection: 'bottom' as Incubator.Direction,
1818
key: 1
1919
};
2020

@@ -30,16 +30,21 @@ export default class TransitionViewScreen extends Component<{}, State> {
3030
const {key, enterDirection, exitDirection} = this.state;
3131
return (
3232
<View padding-20 bg-grey80 flex>
33-
{renderRadioGroup.call(this, 'Enter direction', 'enterDirection', Incubator.TransitionViewDirectionEnum, {
34-
isRow: true
35-
})}
36-
{renderRadioGroup.call(this, 'Exit direction', 'exitDirection', Incubator.TransitionViewDirectionEnum, {
37-
isRow: true
38-
})}
33+
{renderRadioGroup.call(this,
34+
'Enter direction',
35+
'enterDirection',
36+
{top: 'top', bottom: 'bottom', left: 'left', right: 'right'},
37+
{isRow: true})}
38+
{renderRadioGroup.call(this,
39+
'Exit direction',
40+
'exitDirection',
41+
{top: 'top', bottom: 'bottom', left: 'left', right: 'right'},
42+
{isRow: true})}
3943
<Button label="Refresh" onPress={() => this.setState({key: key + 1})}/>
4044
<View flex center>
4145
<TransitionView
4246
key={`${key}`}
47+
// @ts-expect-error
4348
ref={this.ref}
4449
enterFrom={enterDirection}
4550
exitTo={exitDirection}

demo/src/screens/incubatorScreens/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
33
export function registerScreens(registrar) {
44
registrar('unicorn.incubator.TouchableOpacityScreen', () =>
55
gestureHandlerRootHOC(require('./TouchableOpacityScreen').default));
6-
registrar('unicorn.incubator.IncubatorDialogScreen', () => require('./IncubatorDialogScreen').default);
76
registrar('unicorn.components.IncubatorExpandableOverlayScreen', () => require('./IncubatorExpandableOverlayScreen').default);
87
registrar('unicorn.components.IncubatorTextFieldScreen', () => require('./IncubatorTextFieldScreen').default);
98
registrar('unicorn.incubator.PanViewScreen', () => require('./PanViewScreen').default);

docs/foundation/assets.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
sidebar_position: 3
3-
sidebar_label: Assets
2+
index: 6
3+
path: "/foundation/assets"
44
title: "Assets"
55
---
6-
76
Assets are a big part of the whole UI system, whether it's an icon, placeholder or an illustration, we use them everywhere.
87
Load groups of assets and easily render them with the _Image_ component.
98

docs/foundation/colors.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
sidebar_position: 2
3-
sidebar_label: Colors
2+
sidebar_position: 7
3+
path: "/foundation/colors"
44
title: "Colors"
55
---
66

7-
### loadColors
7+
#### loadColors
88
Load a set of colors to be used in the app.
99
These colors will be accessible through the Colors class and as modifiers.
1010
usage:
@@ -27,7 +27,7 @@ import {View, Text, Colors} from 'react-native-ui-lib';
2727
<View>
2828
```
2929

30-
### loadSchemes
30+
#### loadSchemes
3131
Load a set of scheme colors to support dark/light mode.
3232
This feature works hand in hand with our modifiers
3333

@@ -58,7 +58,7 @@ Colors.loadSchemes({
5858
</View>
5959
```
6060

61-
### rgba
61+
#### rgba
6262
usage:
6363
```js
6464
import {Colors} from 'react-native-ui-lib';
@@ -67,7 +67,7 @@ Colors.rgba('#ff2442', 0.05); // 'rgb(255, 36, 66, 0.05)'
6767
Colors.rgba(44, 224, 112, 0.2); // 'rgb(44, 224, 112, 0.2)'
6868
```
6969

70-
### getColorTint
70+
#### getColorTint
7171
usage:
7272
```js
7373
import {Colors} from 'react-native-ui-lib';
@@ -76,7 +76,7 @@ Colors.getColorTint(Colors.green30, 70); // will return the value of Colors.gree
7676
Colors.getColorTint('#ff2442', 50); // will return the 5th tint in an autogenerate 8-tints palette based on '#ff2442'
7777
```
7878

79-
### isDark
79+
#### isDark
8080
returns `true` if a color is considered dark (bright colors will return `false`)
8181
```js
8282
import {Colors} from 'react-native-ui-lib';

docs/foundation/modifiers.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
sidebar_position: 4
3-
sidebar_label: Modifiers
2+
index: 5
3+
path: "/foundation/modifiers"
44
title: "Modifiers"
55
---
6-
76
As you have probably noticed already, we translate our style presets into modifiers.
87
**Modifiers** help you create a stunning UI easily and quickly.
98

docs/foundation/style.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
sidebar_position: 1
3-
sidebar_label: Style
2+
sidebar_position: 4
3+
path: "/foundation/style"
44
title: "Style"
55
---
6-
76
The base foundation of each UI component is its style.
87
We use basic style presets to define the rules and the style guide we follow.
98

docs/foundation/theme-manager.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
sidebar_position: 5
3-
sidebar_label: ThemeManager
4-
title: "ThemeManager"
2+
index: 7
3+
path: "/foundation/theme-manager"
4+
title: "Theme Manager"
55
---
6-
76
Use `ThemeManager` to set default global behavior for your app.
87

98
#### setComponentTheme

docs/getting-started/setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2+
index: 1
23
sidebar_position: 1
3-
sidebar_label: Setup
4+
path: "/getting-started/setup"
45
title: "Setup"
5-
# path: "/getting-started/setup"
66
---
77

88
## Before You Start: UILib Packages

docs/getting-started/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2+
index: 2
23
sidebar_position: 2
3-
sidebar_label: Usage
4+
path: "/getting-started/usage"
45
title: "Usage"
5-
# path: "/getting-started/usage"
66
---
77
This is a quick example of how to use our basic components, modifiers and presets to generate a good looking screen.
88
For detailed information please go over the other sections: [Style](../foundation/style.md), [Modifiers](../foundation/modifiers.md), Components...

docs/getting-started/v5.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2+
index: 3
23
sidebar_position: 3
3-
sidebar_label: Migrating v4 -> v5
4-
title: "Migrating v4 -> v5"
5-
# path: "/getting-started/v5"
4+
path: "/getting-started/v5"
5+
title: "v4 -> v5"
66
---
77
88

docs/getting-started/v6.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
2-
sidebar_position: 4
3-
sidebar_label: Migrating v5 -> v6
4-
title: "Migrating v5 -> v6"
5-
# path: "/getting-started/v6"
2+
index: 3.5
3+
path: "/getting-started/v6"
4+
title: "v5 -> v6"
65
---
76
87

docuilib/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
1616
projectName: 'react-native-ui-lib', // Usually your repo name.
1717
customFields: {
1818
expoSnackLink: 'https://snack.expo.io/@ethanshar/rnuilib_snack?platform=ios&supportedPlatforms=ios,android',
19-
stars: '3.8'
19+
stars: '3.8',
2020
},
2121
plugins: ['docusaurus-plugin-sass'],
2222
presets: [

docuilib/sidebars.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,22 @@ module.exports = {
2727
{
2828
type: 'category',
2929
label: 'Getting Started',
30-
collapsed: false,
31-
items: [
32-
{
33-
type: 'autogenerated',
34-
dirName: `getting-started`
35-
}
36-
]
30+
items: ['getting-started/setup', 'getting-started/usage', 'getting-started/v5', 'getting-started/v6']
3731
},
3832
{
3933
type: 'category',
4034
label: 'Foundation',
41-
collapsed: false,
4235
items: [
43-
{
44-
type: 'autogenerated',
45-
dirName: `foundation`
46-
}
36+
'foundation/style',
37+
'foundation/modifiers',
38+
'foundation/assets',
39+
'foundation/theme-manager',
40+
'foundation/colors'
4741
]
4842
},
4943
{
5044
type: 'category',
5145
label: 'Components',
52-
collapsible: false,
5346
items: ['Basic', 'Form', 'Overlays', 'Layout', 'Lists', 'Native', 'Incubator'].map(category => {
5447
return {
5548
type: 'category',

0 commit comments

Comments
 (0)