react-native-ui-lib 7.36.0 → 7.37.0-snapshot.6100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
[](https://www.npmjs.com/package/react-native-ui-lib)
|
|
16
16
|
<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>
|
|
17
17
|
|
|
18
|
+
## Notes
|
|
19
|
+
|
|
20
|
+
#### React Native New Arc
|
|
21
|
+
|
|
22
|
+
We are working on upgrading our UI Library to support the new React Native Architecture.
|
|
23
|
+
Currently, we support React Native 0.73, and we plan to support React Native 0.77 next.
|
|
24
|
+
While we don’t have a timeline yet, this is part of our roadmap.
|
|
18
25
|
|
|
19
26
|
## Links
|
|
20
27
|
- [Docs](https://wix.github.io/react-native-ui-lib/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-ui-lib",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.37.0-snapshot.6100",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"types": "src/index.d.ts",
|
|
6
6
|
"author": "Ethan Sharabi <ethan.shar@gmail.com>",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@formatjs/intl-locale": "^3.0.3",
|
|
71
71
|
"@formatjs/intl-numberformat": "^8.0.4",
|
|
72
72
|
"@formatjs/intl-pluralrules": "^5.0.3",
|
|
73
|
-
"@react-native-community/blur": "4.
|
|
73
|
+
"@react-native-community/blur": "4.4.1",
|
|
74
74
|
"@react-native-community/datetimepicker": "^3.4.6",
|
|
75
75
|
"@react-native-community/netinfo": "^5.6.2",
|
|
76
76
|
"@react-native/babel-preset": "0.73.21",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _times from "lodash/times";
|
|
2
2
|
import _throttle from "lodash/throttle";
|
|
3
3
|
import _isFunction from "lodash/isFunction";
|
|
4
|
-
import React, { useCallback, useContext, useState } from 'react';
|
|
4
|
+
import React, { useCallback, useContext, useMemo, useState } from 'react';
|
|
5
5
|
import { StyleSheet, FlatList, TextInput, ActivityIndicator } from 'react-native';
|
|
6
6
|
import { Typography, Colors } from "../../style";
|
|
7
7
|
import Assets from "../../assets";
|
|
@@ -66,13 +66,19 @@ const PickerItemsList = props => {
|
|
|
66
66
|
}) => {
|
|
67
67
|
return <PickerItem {...item} />;
|
|
68
68
|
}, []);
|
|
69
|
+
const _listProps = useMemo(() => {
|
|
70
|
+
return {
|
|
71
|
+
...listProps,
|
|
72
|
+
style: [styles.list, listProps?.style]
|
|
73
|
+
};
|
|
74
|
+
}, [listProps]);
|
|
69
75
|
const renderList = () => {
|
|
70
76
|
if (items) {
|
|
71
|
-
return <FlatList testID={`${testID}.list`} data={items} renderItem={renderPropItems} keyExtractor={keyExtractor} {...
|
|
77
|
+
return <FlatList testID={`${testID}.list`} data={items} renderItem={renderPropItems} keyExtractor={keyExtractor} {..._listProps} />;
|
|
72
78
|
}
|
|
73
79
|
return <FlatList data={_times(React.Children.count(children))}
|
|
74
80
|
// @ts-expect-error
|
|
75
|
-
renderItem={renderItem} keyExtractor={keyExtractor} testID={`${testID}.list`} {...
|
|
81
|
+
renderItem={renderItem} keyExtractor={keyExtractor} testID={`${testID}.list`} {..._listProps} />;
|
|
76
82
|
};
|
|
77
83
|
const renderCancel = () => {
|
|
78
84
|
const {
|
|
@@ -158,6 +164,9 @@ const styles = StyleSheet.create({
|
|
|
158
164
|
paddingRight: 16,
|
|
159
165
|
flex: 1,
|
|
160
166
|
...Typography.text70
|
|
167
|
+
},
|
|
168
|
+
list: {
|
|
169
|
+
height: '100%'
|
|
161
170
|
}
|
|
162
171
|
});
|
|
163
172
|
export default PickerItemsList;
|
|
@@ -149,7 +149,8 @@ const TabBar = props => {
|
|
|
149
149
|
}, [labelColor, selectedLabelColor]);
|
|
150
150
|
return <View style={_containerStyle} key={key} bg-$backgroundElevated>
|
|
151
151
|
<FadedScrollView ref={tabBar} horizontal showsHorizontalScrollIndicator={false} showStartFader startFaderProps={faderProps} showEndFader endFaderProps={faderProps} contentContainerStyle={scrollViewContainerStyle} testID={testID} onContentSizeChange={onContentSizeChange} onLayout={onLayout}>
|
|
152
|
-
|
|
152
|
+
{/* TODO: Might need to change role to tablist, when upgrading rn77. It didn't work now (rn73) */}
|
|
153
|
+
<View style={tabBarContainerStyle} accessibilityRole="tabbar">{tabBarItems}</View>
|
|
153
154
|
{itemsCount > 1 && <Reanimated.View style={[styles.selectedIndicator, indicatorStyle, _indicatorTransitionStyle]} />}
|
|
154
155
|
</FadedScrollView>
|
|
155
156
|
</View>;
|
|
@@ -133,7 +133,7 @@ export default function TabBarItem({
|
|
|
133
133
|
return <GestureDetector gesture={gesture}>
|
|
134
134
|
<View reanimated
|
|
135
135
|
// @ts-expect-error
|
|
136
|
-
ref={itemRef} style={_style} onLayout={onLayout} testID={testID}>
|
|
136
|
+
ref={itemRef} style={_style} onLayout={onLayout} testID={testID} accessible accessibilityRole="tab">
|
|
137
137
|
{leadingAccessory}
|
|
138
138
|
{icon && <Reanimated.Image source={icon} style={[!_isUndefined(label) && styles.tabItemIconWithLabel, animatedIconStyle]} />}
|
|
139
139
|
{!_isEmpty(label) && <Reanimated.Text {...labelProps} fsTagName={'unmask'} style={[styles.tabItemLabel, labelStyle, animatedLabelStyle, animatedLabelColorStyle]}>
|