Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/wix/react-native-ui-lib i…
Browse files Browse the repository at this point in the history
…nto release
  • Loading branch information
Inbal-Tish committed Jul 10, 2024
2 parents fd3d314 + 9e1185b commit 5e76fac
Show file tree
Hide file tree
Showing 46 changed files with 1,352 additions and 923 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
[![NPM Downloads](https://img.shields.io/npm/dm/react-native-ui-lib.svg?style=flat)](https://www.npmjs.com/package/react-native-ui-lib)
<a href="https://twitter.com/rnuilib"><img src="https://img.shields.io/twitter/follow/rnuilib.svg?style=flat&colorA=1DA1F2&colorB=20303C&label=Follow%20us%20on%20Twitter" alt="Follow on Twitter"></a>

Check out our [Docs](https://wix.github.io/react-native-ui-lib/). <br>
Our [Discord Channel](https://discord.gg/2eW4g6Z)

## Links
- [Docs](https://wix.github.io/react-native-ui-lib/)
- [Figma library](https://www.figma.com/community/file/1379775092983284111/rnui-library)
- [Discord Channel](https://discord.gg/2eW4g6Z)


Download our Expo demo app <br>
<img height="120" src="https://qr.expo.dev/expo-go?owner=vn.chemgio&slug=rnuilib&releaseChannel=default&host=exp.host"> <br>
Expand Down Expand Up @@ -130,4 +134,4 @@ class MyScreen extends Component {

## Contributing
See [Contribution Guide](https://github.com/wix/react-native-ui-lib/blob/master/CONTRIBUTING.md)


Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,8 @@ exports[`TextField Screen renders screen 1`] = `
}
>
<Image
accessibilityRole="image"
accessible={false}
source={
{
"testUri": "../../../demo/src/assets/icons/info.png",
Expand Down Expand Up @@ -2695,6 +2697,7 @@ exports[`TextField Screen renders screen 1`] = `
],
]
}
testID="undefined.clearButton.container"
>
<View
accessibilityLabel="clear"
Expand Down Expand Up @@ -2753,25 +2756,13 @@ exports[`TextField Screen renders screen 1`] = `
<Image
accessibilityRole="image"
accessible={false}
assetGroup="icons"
onError={[Function]}
source={
{
"testUri": "../../../src/assets/icons/xFlat.png",
}
}
style={
[
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
false,
[
{
"tintColor": "#5A48F5",
Expand All @@ -2780,14 +2771,21 @@ exports[`TextField Screen renders screen 1`] = `
"tintColor": "#A6ACB1",
},
],
false,
undefined,
undefined,
undefined,
{
"tintColor": "#5A48F5",
},
]
}
testID="undefined.clearButton.icon"
/>
</View>
</View>
<Image
accessibilityRole="image"
accessible={false}
source={
{
"testUri": "../../../demo/src/assets/icons/search.png",
Expand Down Expand Up @@ -3427,32 +3425,25 @@ exports[`TextField Screen renders screen 1`] = `
<Image
accessibilityRole="image"
accessible={false}
assetGroup="icons"
onError={[Function]}
source={
{
"testUri": "../../../demo/src/assets/icons/search.png",
}
}
style={
[
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
false,
[
{
"tintColor": "#20303C",
},
undefined,
],
false,
undefined,
undefined,
undefined,
{
"tintColor": "#20303C",
},
]
}
testID="undefined.icon"
Expand Down Expand Up @@ -5398,6 +5389,8 @@ exports[`TextField Screen renders screen 1`] = `
}
>
<Image
accessibilityRole="image"
accessible={false}
marginL-s1={true}
source={
{
Expand Down
15 changes: 10 additions & 5 deletions demo/src/screens/componentScreens/PickerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const dialogOptions = [
{label: 'Option 7', value: 6},
{label: 'Option 8', value: 6}
];

export default class PickerScreen extends Component {
picker = React.createRef<PickerMethods>();
state = {
Expand All @@ -99,7 +100,7 @@ export default class PickerScreen extends Component {
contact: 0
};

renderDialog: PickerProps['renderCustomModal'] = (modalProps: RenderCustomModalProps) => {
renderDialog: PickerProps['renderOverlay'] = (modalProps: RenderCustomModalProps) => {
const {visible, children, toggleModal, onDone} = modalProps;
return (
<Incubator.Dialog
Expand Down Expand Up @@ -128,6 +129,7 @@ export default class PickerScreen extends Component {
<Text text40 $textDefault>
Picker
</Text>

<Picker
placeholder="Favorite Language"
floatingPlaceholder
Expand Down Expand Up @@ -170,7 +172,7 @@ export default class PickerScreen extends Component {
onChange={items => this.setState({customModalValues: items})}
mode={Picker.modes.MULTI}
trailingAccessory={dropdownIcon}
renderCustomModal={this.renderDialog}
renderOverlay={this.renderDialog}
items={options}
/>

Expand All @@ -183,7 +185,7 @@ export default class PickerScreen extends Component {
onChange={item => this.setState({option: item})}
topBarProps={{title: 'Languages'}}
useDialog
renderCustomDialogHeader={({onDone, onCancel}) => (
renderHeader={({onDone, onCancel}) => (
<View padding-s5 row spread>
<Button link label="Cancel" onPress={onCancel}/>
<Button link label="Done" onPress={onDone}/>
Expand All @@ -194,13 +196,14 @@ export default class PickerScreen extends Component {
searchPlaceholder={'Search a language'}
items={dialogOptions}
/>

<Text marginB-10 text70 $textDefault>
Custom Picker:
</Text>
<Picker
value={this.state.filter}
onChange={filter => this.setState({filter})}
renderPicker={(_value?: any, label?: string) => {
renderInput={(_value?: any, label?: string) => {
return (
<View row>
<Icon
Expand All @@ -216,6 +219,7 @@ export default class PickerScreen extends Component {
}}
items={filters}
/>

<Text marginT-20 marginB-10 text70 $textDefault>
Custom Picker Items:
</Text>
Expand All @@ -225,7 +229,7 @@ export default class PickerScreen extends Component {
onChange={contact => {
this.setState({contact});
}}
renderPicker={(contactValue?: number) => {
renderInput={(contactValue?: number) => {
const contact = contacts[contactValue!] ?? undefined;
return (
<View row>
Expand All @@ -252,6 +256,7 @@ export default class PickerScreen extends Component {
style={{alignSelf: 'flex-start'}}
onPress={() => this.picker.current?.openExpandable?.()}
/>

<Text text60 marginT-s5>
Different Field Types
</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/assets/emojis/index.js → src/assets/emojis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1342,5 +1342,5 @@ export const emojis = {
"woman-woman-girl-girl": "👩‍👩‍👧‍👧",
"woman-heart-woman": "👩‍❤️‍👩",
"woman-kiss-woman": "👩‍❤️‍💋‍👩"
}
} as const;

2 changes: 1 addition & 1 deletion src/components/button/Button.driver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ButtonProps} from './ButtonTypes';
import {ButtonProps} from './types';
import {ImageDriver} from '../image/Image.driver';
import {ComponentDriver, ComponentDriverArgs} from '../../testkit/Component.driver';
import {TextDriver} from '../text/Text.driver';
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/ButtonConstants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ButtonSize} from './ButtonTypes';
import {ButtonSize} from './types';


export const PADDINGS = {
Expand Down
Loading

0 comments on commit 5e76fac

Please sign in to comment.