@janiscommerce/ui-native 1.25.2 → 1.26.0

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.
@@ -32,23 +32,18 @@ const Toast = ({ type, text1, text2, style, props }) => {
32
32
  alignItems: horizontalAlign,
33
33
  width: '95%',
34
34
  borderRadius: scaledForDevice(4, moderateScale),
35
- paddingHorizontal: scaledForDevice(16, moderateScale),
36
- paddingVertical: scaledForDevice(16, moderateScale),
35
+ padding: 16,
37
36
  },
38
37
  textWrapper: {
39
38
  flex: 1,
40
39
  },
41
40
  title: {
42
41
  fontFamily: 'Roboto-Bold',
43
- fontSize: scaledForDevice(18, moderateScale),
44
- lineHeight: scaledForDevice(22, moderateScale),
45
- marginBottom: scaledForDevice(10, moderateScale),
42
+ marginBottom: 8,
46
43
  color: validColor,
47
44
  },
48
45
  message: {
49
46
  fontFamily: 'Roboto-Regular',
50
- fontSize: scaledForDevice(14, moderateScale),
51
- lineHeight: scaledForDevice(20, moderateScale),
52
47
  color: validColor,
53
48
  },
54
49
  icon: {
@@ -63,28 +58,27 @@ const Toast = ({ type, text1, text2, style, props }) => {
63
58
  padding: scaledForDevice(10, moderateScale),
64
59
  },
65
60
  actionTitle: {
66
- marginRight: scaledForDevice(5, moderateScale),
67
- marginLeft: scaledForDevice(10, moderateScale),
68
- fontFamily: 'Roboto-Medium',
69
- fontSize: scaledForDevice(14, moderateScale),
70
- lineHeight: scaledForDevice(16, moderateScale),
71
61
  color: validColor,
72
62
  },
73
- actionWrapper: {
74
- padding: scaledForDevice(10, moderateScale),
75
- },
63
+ actionWrapper: {},
76
64
  });
77
65
  return (<BaseToast type={type} style={[styles.container, style]}>
78
66
  {showIcon && (<Icon name={selectedIconName} color={validColor} size={24} style={{ ...styles.icon, ...iconStyle }}/>)}
79
67
 
80
68
  <View style={styles.textWrapper}>
81
- {validTitle && <Typography style={styles.title}>{text1}</Typography>}
82
- {validMessage && <Typography style={styles.message}>{text2}</Typography>}
69
+ {validTitle && (<Typography type="title" size="medium" style={styles.title}>
70
+ {text1}
71
+ </Typography>)}
72
+ {validMessage && (<Typography type="body" size="medium" style={styles.message}>
73
+ {text2}
74
+ </Typography>)}
83
75
  </View>
84
76
 
85
77
  <View style={styles.feedbackWrapper}>
86
78
  {actionTitle && (<TouchableOpacity style={styles.actionWrapper} onPress={handleActionCb} activeOpacity={0.6}>
87
- <Typography style={styles.actionTitle}>{actionTitle}</Typography>
79
+ <Typography type="label" size="medium" style={styles.actionTitle}>
80
+ {actionTitle}
81
+ </Typography>
88
82
  </TouchableOpacity>)}
89
83
  {showCloseIcon && (<TouchableOpacity style={styles.closeIconWrapper} onPress={handleCloseCb} activeOpacity={0.6}>
90
84
  <Icon name="cross_light" color={validColor} size={24}/>
package/dist/index.d.ts CHANGED
@@ -21,6 +21,7 @@ import LayoutWithBottomButtons from './components/molecules/LayoutWithBottomButt
21
21
  import ProgressBar from './components/molecules/ProgressBar';
22
22
  import Select from './components/molecules/Select';
23
23
  import Toast from 'react-native-toast-message';
24
+ import ToastComponent from './components/molecules/Toast';
24
25
  import { configToast } from './components/molecules/Toast';
25
26
  import SwipeList from './components/molecules/SwipeList';
26
27
  import ItemSelectionButton from './components/molecules/ItemSelectionButton';
@@ -34,4 +35,4 @@ import ErrorBoundary from './components/molecules/ErrorBoundary';
34
35
  import ProductDetail from './components/organisms/ProductDetail';
35
36
  import { palette } from './theme/palette';
36
37
  import * as getScale from './scale';
37
- export { Text, Avatar, CheckBox, Icon, Image, Input, Loading, Svg, StatusChip, palette, LoadingFullScreen, RadioButton, Select, SwipeUp, SwipeUpFlatList, SwipeUpScrollView, SwipeUpView, Carousel, ProgressBar, List, BaseButton, Button, getScale, LayoutWithBottomButtons, FullScreenMessage, Toast, configToast, SwipeList, ItemSelectionButton, SwipeItemSelectionList, MainCardList, BaseInput, Typography, Collapsible, ErrorBoundary, Modal, BaseDetail, ProductDetail, };
38
+ export { Text, Avatar, CheckBox, Icon, Image, Input, Loading, Svg, StatusChip, palette, LoadingFullScreen, RadioButton, Select, SwipeUp, SwipeUpFlatList, SwipeUpScrollView, SwipeUpView, Carousel, ProgressBar, List, BaseButton, Button, getScale, LayoutWithBottomButtons, FullScreenMessage, Toast, ToastComponent, configToast, SwipeList, ItemSelectionButton, SwipeItemSelectionList, MainCardList, BaseInput, Typography, Collapsible, ErrorBoundary, Modal, BaseDetail, ProductDetail, };
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import LayoutWithBottomButtons from './components/molecules/LayoutWithBottomButt
23
23
  import ProgressBar from './components/molecules/ProgressBar';
24
24
  import Select from './components/molecules/Select';
25
25
  import Toast from 'react-native-toast-message';
26
+ import ToastComponent from './components/molecules/Toast';
26
27
  import { configToast } from './components/molecules/Toast';
27
28
  import SwipeList from './components/molecules/SwipeList';
28
29
  import ItemSelectionButton from './components/molecules/ItemSelectionButton';
@@ -38,4 +39,4 @@ import ProductDetail from './components/organisms/ProductDetail';
38
39
  // Misc
39
40
  import { palette } from './theme/palette';
40
41
  import * as getScale from './scale';
41
- export { Text, Avatar, CheckBox, Icon, Image, Input, Loading, Svg, StatusChip, palette, LoadingFullScreen, RadioButton, Select, SwipeUp, SwipeUpFlatList, SwipeUpScrollView, SwipeUpView, Carousel, ProgressBar, List, BaseButton, Button, getScale, LayoutWithBottomButtons, FullScreenMessage, Toast, configToast, SwipeList, ItemSelectionButton, SwipeItemSelectionList, MainCardList, BaseInput, Typography, Collapsible, ErrorBoundary, Modal, BaseDetail, ProductDetail, };
42
+ export { Text, Avatar, CheckBox, Icon, Image, Input, Loading, Svg, StatusChip, palette, LoadingFullScreen, RadioButton, Select, SwipeUp, SwipeUpFlatList, SwipeUpScrollView, SwipeUpView, Carousel, ProgressBar, List, BaseButton, Button, getScale, LayoutWithBottomButtons, FullScreenMessage, Toast, ToastComponent, configToast, SwipeList, ItemSelectionButton, SwipeItemSelectionList, MainCardList, BaseInput, Typography, Collapsible, ErrorBoundary, Modal, BaseDetail, ProductDetail, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janiscommerce/ui-native",
3
- "version": "1.25.2",
3
+ "version": "1.26.0",
4
4
  "description": "components library for Janis app",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",