@shoutem/ui 5.2.2 → 5.2.3

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.
@@ -5,12 +5,12 @@ import { connectStyle } from '@shoutem/theme';
5
5
 
6
6
  class Button extends PureComponent {
7
7
  render() {
8
- const { style, ...otherProps } = this.props;
8
+ const { style } = this.props;
9
9
  const { underlayColor, ...otherStyle } = style;
10
10
 
11
11
  return (
12
12
  <TouchableOpacity
13
- {...otherProps}
13
+ {...this.props}
14
14
  style={otherStyle}
15
15
  underlayColor={underlayColor}
16
16
  />
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.82322 3.82322C9.87011 3.77634 9.9337 3.75 10 3.75H14C14.0663 3.75 14.1299 3.77634 14.1768 3.82322C14.2237 3.87011 14.25 3.9337 14.25 4V6.25H9.75V4C9.75 3.9337 9.77634 3.87011 9.82322 3.82322ZM8.25 6.25V4C8.25 3.53587 8.43437 3.09075 8.76256 2.76256C9.09075 2.43437 9.53587 2.25 10 2.25H14C14.4641 2.25 14.9092 2.43437 15.2374 2.76256C15.5656 3.09075 15.75 3.53587 15.75 4V6.25H18.9912H19.0071H20C20.4142 6.25 20.75 6.58579 20.75 7C20.75 7.41421 20.4142 7.75 20 7.75H19.6901L18.7498 19.0337C18.741 19.7508 18.4523 20.4368 17.9445 20.9445C17.4288 21.4603 16.7293 21.75 16 21.75H8C7.27065 21.75 6.57118 21.4603 6.05546 20.9445C5.54767 20.4368 5.25898 19.7508 5.25021 19.0337L4.3099 7.75H4C3.58579 7.75 3.25 7.41421 3.25 7C3.25 6.58579 3.58579 6.25 4 6.25H4.9929H5.00877H8.25ZM15 7.75H9H5.8151L6.74741 18.9377C6.74914 18.9584 6.75 18.9792 6.75 19C6.75 19.3315 6.8817 19.6495 7.11612 19.8839C7.35054 20.1183 7.66848 20.25 8 20.25H16C16.3315 20.25 16.6495 20.1183 16.8839 19.8839C17.1183 19.6495 17.25 19.3315 17.25 19C17.25 18.9792 17.2509 18.9584 17.2526 18.9377L18.1849 7.75H15ZM10 10.25C10.4142 10.25 10.75 10.5858 10.75 11V17C10.75 17.4142 10.4142 17.75 10 17.75C9.58579 17.75 9.25 17.4142 9.25 17V11C9.25 10.5858 9.58579 10.25 10 10.25ZM14.75 11C14.75 10.5858 14.4142 10.25 14 10.25C13.5858 10.25 13.25 10.5858 13.25 11V17C13.25 17.4142 13.5858 17.75 14 17.75C14.4142 17.75 14.75 17.4142 14.75 17V11Z" fill="black"/>
3
+ </svg>
@@ -23,6 +23,7 @@ import close from './close.svg';
23
23
  import comment from './comment.svg';
24
24
  import comments from './comments.svg';
25
25
  import deals from './deals.svg';
26
+ import deleteIcon from './delete.svg';
26
27
  import directions from './directions.svg';
27
28
  import downArrow from './down-arrow.svg';
28
29
  import download from './download.svg';
@@ -38,10 +39,10 @@ import eyeCrossed from './eye-crossed.svg';
38
39
  import facebook from './facebook.svg';
39
40
  import facebookLogo from './facebook-logo.svg';
40
41
  import folder from './folder.svg';
42
+ import forward from './forward.svg';
41
43
  import forward5 from './forward-5.svg';
42
44
  import forward10 from './forward-10.svg';
43
45
  import forward30 from './forward-30.svg';
44
- import forward from './forward.svg';
45
46
  import friends from './friends.svg';
46
47
  import gallery from './gallery.svg';
47
48
  import garbageCan from './garbage-can.svg';
@@ -83,10 +84,10 @@ import radiobuttonOff from './radiobutton-off.svg';
83
84
  import radiobuttonOn from './radiobutton-on.svg';
84
85
  import receipt from './receipt.svg';
85
86
  import refresh from './refresh.svg';
87
+ import replay from './replay.svg';
86
88
  import replay5 from './replay-5.svg';
87
89
  import replay10 from './replay-10.svg';
88
90
  import replay30 from './replay-30.svg';
89
- import replay from './replay.svg';
90
91
  import restaurant from './restaurant.svg';
91
92
  import restaurantMenu from './restaurant-menu.svg';
92
93
  import restore from './restore.svg';
@@ -97,8 +98,8 @@ import search from './search.svg';
97
98
  import settings from './settings.svg';
98
99
  import share from './share.svg';
99
100
  import shareAndroid from './share-android.svg';
100
- import sleep from './sleep.svg';
101
101
  import sidebar from './sidebar.svg';
102
+ import sleep from './sleep.svg';
102
103
  import socialWall from './social-wall.svg';
103
104
  import stamp from './stamp.svg';
104
105
  import stop from './stop.svg';
@@ -142,6 +143,7 @@ export const defaultConfig = [
142
143
  { name: 'comment', icon: comment },
143
144
  { name: 'comments', icon: comments },
144
145
  { name: 'deals', icon: deals },
146
+ { name: 'delete', icon: deleteIcon },
145
147
  { name: 'directions', icon: directions },
146
148
  { name: 'down-arrow', icon: downArrow },
147
149
  { name: 'download', icon: download },
@@ -8,9 +8,6 @@ import Icon from './Icon/Icon';
8
8
 
9
9
  const ZoomableImage = makeZoomable(Image);
10
10
 
11
- const CLOSE_ICON_NAME = 'clear';
12
- const CLOSE_ICON_SIZE = 25;
13
-
14
11
  /**
15
12
  * Renders an ImagePreview which shows an inline image preview.
16
13
  * When clicked, the image is displayed in full screen.
@@ -1,4 +1,4 @@
1
- import { default as Lightbox } from 'react-native-lightbox';
1
+ import Lightbox from 'react-native-lightbox';
2
2
  import { connectAnimation } from '@shoutem/animation';
3
3
  import { connectStyle } from '@shoutem/theme';
4
4
 
@@ -64,16 +64,18 @@ class ScrollView extends PureComponent {
64
64
  }
65
65
 
66
66
  addIphoneXPadding(style) {
67
- if (typeof style.paddingBottom !== 'number') {
68
- style.paddingBottom = 0;
67
+ const resolvedStyle = { ...style };
68
+
69
+ if (typeof resolvedStyle.paddingBottom !== 'number') {
70
+ resolvedStyle.paddingBottom = 0;
69
71
  }
70
72
 
71
- style.paddingBottom = Device.select({
72
- iPhoneX: style.paddingBottom + IPHONE_X_HOME_INDICATOR_PADDING,
73
- default: style.paddingBottom,
73
+ resolvedStyle.paddingBottom = Device.select({
74
+ iPhoneX: resolvedStyle.paddingBottom + IPHONE_X_HOME_INDICATOR_PADDING,
75
+ default: resolvedStyle.paddingBottom,
74
76
  });
75
77
 
76
- return style;
78
+ return resolvedStyle;
77
79
  }
78
80
 
79
81
  render() {
@@ -81,7 +81,9 @@ class TextInput extends PureComponent {
81
81
  />
82
82
  </Wiggle>
83
83
  {!!errorMessage && (
84
- <Caption styleName="form-error sm-gutter-top" style={errorText}>{errorMessage}</Caption>
84
+ <Caption styleName="form-error sm-gutter-top" style={errorText}>
85
+ {errorMessage}
86
+ </Caption>
85
87
  )}
86
88
  </View>
87
89
  );
@@ -13,13 +13,13 @@ import { View } from './View';
13
13
  */
14
14
  class Touchable extends PureComponent {
15
15
  render() {
16
- const { children, style, styleName, ...otherProps } = this.props;
16
+ const { children, style, styleName } = this.props;
17
17
  const { touchableNativeFeedback, touchableOpacity, ...otherStyle } = style;
18
18
 
19
19
  if (Platform.OS === 'android') {
20
20
  return (
21
21
  <TouchableNativeFeedback
22
- {...otherProps}
22
+ {...this.props}
23
23
  style={touchableNativeFeedback}
24
24
  >
25
25
  <View virtual style={otherStyle} styleName={styleName}>
@@ -31,7 +31,7 @@ class Touchable extends PureComponent {
31
31
 
32
32
  return (
33
33
  <TouchableOpacity
34
- {...otherProps}
34
+ {...this.props}
35
35
  style={{
36
36
  ...otherStyle,
37
37
  ...touchableOpacity,
@@ -5,12 +5,12 @@ import { connectStyle } from '@shoutem/theme';
5
5
 
6
6
  class TouchableNativeFeedback extends PureComponent {
7
7
  render() {
8
- const { children, style, ...otherProps } = this.props;
8
+ const { children, style } = this.props;
9
9
  const { background, useForeground, ...otherStyle } = style;
10
10
 
11
11
  return (
12
12
  <RNTouchableNativeFeedback
13
- {...otherProps}
13
+ {...this.props}
14
14
  style={otherStyle}
15
15
  background={background}
16
16
  useForeground={useForeground}
@@ -4,12 +4,12 @@ import { connectStyle } from '@shoutem/theme';
4
4
 
5
5
  class TouchableOpacity extends PureComponent {
6
6
  render() {
7
- const { children, style, ...otherProps } = this.props;
7
+ const { children, style } = this.props;
8
8
  const { activeOpacity, ...otherStyle } = style;
9
9
 
10
10
  return (
11
11
  <RNTouchableOpacity
12
- {...otherProps}
12
+ {...this.props}
13
13
  style={otherStyle}
14
14
  activeOpacity={activeOpacity}
15
15
  >
@@ -7,21 +7,18 @@ import { LinearGradient } from './LinearGradient';
7
7
 
8
8
  class View extends PureComponent {
9
9
  render() {
10
- const { children, style, ...otherProps } = this.props;
10
+ const { children, style } = this.props;
11
11
  const { backgroundGradient, ...viewStyle } = style;
12
12
 
13
13
  let gradient = null;
14
14
  if (backgroundGradient) {
15
15
  gradient = (
16
- <LinearGradient
17
- styleName="fill-parent"
18
- style={style.backgroundGradient}
19
- />
16
+ <LinearGradient styleName="fill-parent" style={backgroundGradient} />
20
17
  );
21
18
  }
22
19
 
23
20
  return (
24
- <RNView {...otherProps} style={viewStyle}>
21
+ <RNView {...this.props} style={viewStyle}>
25
22
  {gradient}
26
23
  {children}
27
24
  </RNView>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoutem/ui",
3
- "version": "5.2.2",
3
+ "version": "5.2.3",
4
4
  "description": "Styleable set of components for React Native applications",
5
5
  "scripts": {
6
6
  "lint": "eslint .",