@shoutem/ui 6.5.0-rc.0 → 6.5.0-rc.1
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/components/Icon/assets/index.js +4 -0
- package/components/Icon/assets/playlist-play.svg +1 -0
- package/components/Icon/assets/skip-next.svg +1 -0
- package/components/TextInput.js +10 -2
- package/index.js +0 -1
- package/package.json +1 -1
- package/theme.js +0 -10
- package/components/SvgIcons/SkipTrackIcon.js +0 -49
|
@@ -79,6 +79,7 @@ import pause from './pause.svg';
|
|
|
79
79
|
import photo from './photo.svg';
|
|
80
80
|
import pin from './pin.svg';
|
|
81
81
|
import play from './play.svg';
|
|
82
|
+
import playlistPlay from './playlist-play.svg';
|
|
82
83
|
import plusButton from './plus-button.svg';
|
|
83
84
|
import podcasts from './podcasts.svg';
|
|
84
85
|
import products from './products.svg';
|
|
@@ -102,6 +103,7 @@ import settings from './settings.svg';
|
|
|
102
103
|
import share from './share.svg';
|
|
103
104
|
import shareAndroid from './share-android.svg';
|
|
104
105
|
import sidebar from './sidebar.svg';
|
|
106
|
+
import skipNext from './skip-next.svg';
|
|
105
107
|
import sleep from './sleep.svg';
|
|
106
108
|
import socialWall from './social-wall.svg';
|
|
107
109
|
import stamp from './stamp.svg';
|
|
@@ -202,6 +204,7 @@ export const defaultConfig = [
|
|
|
202
204
|
{ name: 'photo', icon: photo },
|
|
203
205
|
{ name: 'pin', icon: pin },
|
|
204
206
|
{ name: 'play', icon: play },
|
|
207
|
+
{ name: 'playlist-play', icon: playlistPlay },
|
|
205
208
|
{ name: 'plus-button', icon: plusButton },
|
|
206
209
|
{ name: 'podcasts', icon: podcasts },
|
|
207
210
|
{ name: 'products', icon: products },
|
|
@@ -225,6 +228,7 @@ export const defaultConfig = [
|
|
|
225
228
|
{ name: 'share', icon: share },
|
|
226
229
|
{ name: 'share-android', icon: shareAndroid },
|
|
227
230
|
{ name: 'sidebar', icon: sidebar },
|
|
231
|
+
{ name: 'skip-next', icon: skipNext },
|
|
228
232
|
{ name: 'sleep', icon: sleep },
|
|
229
233
|
{ name: 'social-wall', icon: socialWall },
|
|
230
234
|
{ name: 'stamp', icon: stamp },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" ?><svg enable-background="new 0 0 48 48" height="48px" id="Layer_1" version="1.1" viewBox="0 0 48 48" width="48px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M0,0h48v48H0V0z" fill="none" id="XMLID_31_"/><g><rect height="4" id="XMLID_30_" width="24" x="8" y="20"/><rect height="4" id="XMLID_29_" width="24" x="8" y="12"/><rect height="4" id="XMLID_28_" width="16" x="8" y="28"/><polygon id="XMLID_27_" points="28,28 28,40 38,34 "/></g></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" ?><svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"/><path d="M0 0h48v48H0z" fill="none"/></svg>
|
package/components/TextInput.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable react/no-multi-comp */
|
|
2
|
+
import React, { forwardRef, PureComponent } from 'react';
|
|
2
3
|
import { TextInput as RNTextInput } from 'react-native';
|
|
3
4
|
import autoBindReact from 'auto-bind/react';
|
|
4
5
|
import { TextInputPropTypes } from 'deprecated-react-native-prop-types';
|
|
@@ -45,6 +46,7 @@ class TextInput extends PureComponent {
|
|
|
45
46
|
errorMessage,
|
|
46
47
|
highlightOnFocus,
|
|
47
48
|
style,
|
|
49
|
+
forwardedRef,
|
|
48
50
|
...otherProps
|
|
49
51
|
} = this.props;
|
|
50
52
|
const { isFocused } = this.state;
|
|
@@ -79,6 +81,7 @@ class TextInput extends PureComponent {
|
|
|
79
81
|
...(errorMessage ? errorBorderColor : {}),
|
|
80
82
|
...otherStyle,
|
|
81
83
|
}}
|
|
84
|
+
ref={forwardedRef}
|
|
82
85
|
/>
|
|
83
86
|
</Wiggle>
|
|
84
87
|
{!!errorMessage && (
|
|
@@ -106,4 +109,9 @@ TextInput.defaultProps = {
|
|
|
106
109
|
const AnimatedTextInput = connectAnimation(TextInput);
|
|
107
110
|
const StyledTextInput = connectStyle('shoutem.ui.TextInput')(AnimatedTextInput);
|
|
108
111
|
|
|
109
|
-
|
|
112
|
+
const ForwardedTextInput = forwardRef((props, ref) => (
|
|
113
|
+
<StyledTextInput {...props} forwardedRef={ref} />
|
|
114
|
+
));
|
|
115
|
+
ForwardedTextInput.displayName = 'TextInput';
|
|
116
|
+
|
|
117
|
+
export { ForwardedTextInput as TextInput };
|
package/index.js
CHANGED
|
@@ -61,7 +61,6 @@ export { ScrollView } from './components/ScrollView';
|
|
|
61
61
|
export { SearchField } from './components/SearchField';
|
|
62
62
|
export { ShareButton } from './components/ShareButton';
|
|
63
63
|
export { Spinner } from './components/Spinner';
|
|
64
|
-
export { SkipTrackIcon } from './components/SvgIcons/SkipTrackIcon';
|
|
65
64
|
export { Switch } from './components/Switch';
|
|
66
65
|
export { TabMenu } from './components/TabMenu';
|
|
67
66
|
export { Caption, Heading, Subtitle, Text, Title } from './components/Text';
|
package/package.json
CHANGED
package/theme.js
CHANGED
|
@@ -3239,15 +3239,5 @@ export default () => {
|
|
|
3239
3239
|
maxHeight: responsiveHeight(20),
|
|
3240
3240
|
},
|
|
3241
3241
|
},
|
|
3242
|
-
'shoutem.ui.SkipTrackIcon': {
|
|
3243
|
-
rotated: { transform: [{ rotate: '180deg' }] },
|
|
3244
|
-
icon: {
|
|
3245
|
-
size: responsiveHeight(24),
|
|
3246
|
-
color: '#FFF',
|
|
3247
|
-
strokeWidth: 2,
|
|
3248
|
-
triangleHeight: responsiveHeight(16),
|
|
3249
|
-
triangleWidth: responsiveWidth(12),
|
|
3250
|
-
},
|
|
3251
|
-
},
|
|
3252
3242
|
};
|
|
3253
3243
|
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import Svg, { Path } from 'react-native-svg';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import { connectStyle } from '@shoutem/theme';
|
|
6
|
-
|
|
7
|
-
const SkipTrackIcon = ({ style }) => {
|
|
8
|
-
const { container, icon = {} } = style;
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
size = 0,
|
|
12
|
-
color,
|
|
13
|
-
strokeWidth = 0,
|
|
14
|
-
triangleHeight = 0,
|
|
15
|
-
triangleWidth = 0,
|
|
16
|
-
} = icon;
|
|
17
|
-
|
|
18
|
-
const halfTriangleHeight = triangleHeight / 2;
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<View style={container}>
|
|
22
|
-
<Svg width={size} height={size} viewBox="0 0 24 24">
|
|
23
|
-
<Path
|
|
24
|
-
d={`M0 ${12 -
|
|
25
|
-
halfTriangleHeight} l${triangleWidth} ${halfTriangleHeight} l-${triangleWidth} ${halfTriangleHeight} Z`}
|
|
26
|
-
fill={color}
|
|
27
|
-
/>
|
|
28
|
-
<Path
|
|
29
|
-
d={`M${triangleWidth} ${12 - halfTriangleHeight} v${triangleHeight}`}
|
|
30
|
-
stroke={color}
|
|
31
|
-
strokeWidth={strokeWidth}
|
|
32
|
-
/>
|
|
33
|
-
</Svg>
|
|
34
|
-
</View>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
SkipTrackIcon.propTypes = {
|
|
39
|
-
style: PropTypes.object,
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
SkipTrackIcon.defaultProps = {
|
|
43
|
-
style: {},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const StyledSkipTrackIcon = connectStyle('shoutem.ui.SkipTrackIcon')(
|
|
47
|
-
SkipTrackIcon,
|
|
48
|
-
);
|
|
49
|
-
export { StyledSkipTrackIcon as SkipTrackIcon };
|