@holper/react-native-holper-storybook 0.6.47 → 0.6.49

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.
@@ -88,6 +88,7 @@ Button.propTypes = {
88
88
  'secondary',
89
89
  'dim',
90
90
  'light',
91
+ 'brightblue',
91
92
  'inverted',
92
93
  'error',
93
94
  'highlight',
@@ -1,7 +1,7 @@
1
- import {Dimensions} from 'react-native';
2
- import {Colors} from '../../configs/constants';
1
+ import { Dimensions } from 'react-native';
2
+ import { Colors } from '../../configs/constants';
3
3
 
4
- const {width} = Dimensions.get('window');
4
+ const { width } = Dimensions.get('window');
5
5
 
6
6
  export default {
7
7
  // Default button shape
@@ -15,7 +15,7 @@ export default {
15
15
  justifyContent: 'center',
16
16
  alignItems: 'center',
17
17
  borderWidth: 1,
18
- shadowOffset: {width: 0, height: 4},
18
+ shadowOffset: { width: 0, height: 4 },
19
19
  shadowOpacity: 0.4,
20
20
  shadowRadius: 3,
21
21
  elevation: 5,
@@ -24,43 +24,48 @@ export default {
24
24
  primary: {
25
25
  borderColor: Colors.green,
26
26
  backgroundColor: Colors.green,
27
- shadowColor: Colors.green
27
+ shadowColor: Colors.green,
28
28
  },
29
29
  secondary: {
30
30
  borderColor: Colors.lightblue,
31
31
  backgroundColor: Colors.white,
32
- shadowColor: Colors.lightblue
32
+ shadowColor: Colors.lightblue,
33
33
  },
34
34
  dim: {
35
35
  borderColor: Colors.dimgray,
36
36
  backgroundColor: Colors.dimgray,
37
- shadowColor: Colors.dimgray
37
+ shadowColor: Colors.dimgray,
38
38
  },
39
39
  light: {
40
40
  borderColor: Colors.lightblue,
41
41
  backgroundColor: Colors.lightblue,
42
- shadowColor: Colors.lightblue
42
+ shadowColor: Colors.lightblue,
43
+ },
44
+ brightblue: {
45
+ borderColor: Colors.brightblue,
46
+ backgroundColor: Colors.brightblue,
47
+ shadowColor: Colors.brightblue,
43
48
  },
44
49
  inverted: {
45
50
  borderColor: Colors.darkgray,
46
51
  backgroundColor: Colors.darkgray,
47
- shadowColor: Colors.darkgray
52
+ shadowColor: Colors.darkgray,
48
53
  },
49
54
  error: {
50
55
  borderColor: Colors.red,
51
56
  backgroundColor: Colors.red,
52
- shadowColor: Colors.red
57
+ shadowColor: Colors.red,
53
58
  },
54
59
  highlight: {
55
60
  borderColor: Colors.violet,
56
61
  backgroundColor: Colors.violet,
57
- shadowColor: Colors.violet
62
+ shadowColor: Colors.violet,
58
63
  },
59
64
  // Bordered
60
65
  bordered: {
61
66
  shadowColor: Colors.transparent,
62
67
  backgroundColor: Colors.white,
63
- elevation: 0
68
+ elevation: 0,
64
69
  },
65
70
  // Sizes
66
71
  tiny: {
@@ -80,11 +85,11 @@ export default {
80
85
  },
81
86
  // Disabled
82
87
  disabled: {
83
- opacity: 0.5
88
+ opacity: 0.5,
84
89
  },
85
90
  // NoShadow
86
91
  noShadow: {
87
92
  shadowColor: Colors.transparent,
88
- elevation: 0
89
- }
90
- };
93
+ elevation: 0,
94
+ },
95
+ };
@@ -89,17 +89,19 @@ const ConfirmationModal = ({
89
89
  </Button>
90
90
  ) : (
91
91
  <View style={style.buttons}>
92
- <Button
93
- size='small'
94
- bordered
95
- variant='inverted'
96
- onPress={onCancel}
97
- >
98
- <Text size='large'>{cancelText}</Text>
99
- </Button>
92
+ {onCancel && (
93
+ <Button
94
+ size='small'
95
+ bordered
96
+ variant='inverted'
97
+ onPress={onCancel}
98
+ >
99
+ <Text size='large'>{cancelText}</Text>
100
+ </Button>
101
+ )}
100
102
  <Button
101
103
  variant={inverted ? 'inverted' : 'primary'}
102
- size='small'
104
+ size={onCancel ? 'small' : 'fit'}
103
105
  onPress={onConfirm}
104
106
  >
105
107
  <Text size='large' color='white'>
@@ -1,10 +1,19 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import {Text as RNText} from 'react-native';
4
- import {TextPropTypes} from 'deprecated-react-native-prop-types';
3
+ import { Text as RNText } from 'react-native';
4
+ import { TextPropTypes } from 'deprecated-react-native-prop-types';
5
5
  import style from './style';
6
6
 
7
- const Text = ({variant, size, color, weight, align, style: customStyle, children, ...props}) => (
7
+ const Text = ({
8
+ variant,
9
+ size,
10
+ color,
11
+ weight,
12
+ align,
13
+ style: customStyle,
14
+ children,
15
+ ...props
16
+ }) => (
8
17
  <RNText
9
18
  style={[
10
19
  style[variant],
@@ -12,7 +21,7 @@ const Text = ({variant, size, color, weight, align, style: customStyle, children
12
21
  style[color],
13
22
  style[weight],
14
23
  style[align],
15
- {...customStyle}
24
+ { ...customStyle },
16
25
  ]}
17
26
  allowFontScaling={false}
18
27
  {...props}
@@ -32,13 +41,30 @@ Text.defaultProps = {
32
41
  };
33
42
 
34
43
  Text.propTypes = {
35
- color: PropTypes.oneOf(['dark', 'light', 'lighter', 'white', 'green', 'red', 'yellow', 'violet']),
44
+ color: PropTypes.oneOf([
45
+ 'dark',
46
+ 'light',
47
+ 'lighter',
48
+ 'white',
49
+ 'green',
50
+ 'red',
51
+ 'yellow',
52
+ 'violet',
53
+ 'brightblue',
54
+ ]),
36
55
  variant: PropTypes.oneOf(['default', 'lowercase', 'uppercase']),
37
- size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'extra-large', 'huge']),
56
+ size: PropTypes.oneOf([
57
+ 'tiny',
58
+ 'small',
59
+ 'medium',
60
+ 'large',
61
+ 'extra-large',
62
+ 'huge',
63
+ ]),
38
64
  weight: PropTypes.oneOf(['regular', 'bold', 'semiBold']),
39
65
  align: PropTypes.oneOf(['left', 'right', 'center', 'justify']),
40
66
  style: TextPropTypes.style,
41
- children: PropTypes.node
67
+ children: PropTypes.node,
42
68
  };
43
69
 
44
70
  export default Text;
@@ -1,78 +1,81 @@
1
- import {Colors} from '../../configs/constants';
1
+ import { Colors } from '../../configs/constants';
2
2
 
3
3
  export default {
4
4
  // colors
5
5
  dark: {
6
- color: Colors.darkblue
6
+ color: Colors.darkblue,
7
7
  },
8
8
  light: {
9
- color: Colors.dimgray
9
+ color: Colors.dimgray,
10
10
  },
11
11
  lighter: {
12
- color: Colors.lightblue
12
+ color: Colors.lightblue,
13
13
  },
14
14
  white: {
15
- color: Colors.white
15
+ color: Colors.white,
16
16
  },
17
17
  green: {
18
- color: Colors.green
18
+ color: Colors.green,
19
19
  },
20
20
  red: {
21
- color: Colors.red
21
+ color: Colors.red,
22
22
  },
23
23
  yellow: {
24
- color: Colors.yellow
24
+ color: Colors.yellow,
25
25
  },
26
26
  violet: {
27
- color: Colors.violet
27
+ color: Colors.violet,
28
+ },
29
+ brightblue: {
30
+ color: Colors.brightblue,
28
31
  },
29
32
  // variants
30
33
  lowercase: {
31
- textTransform: 'lowercase'
34
+ textTransform: 'lowercase',
32
35
  },
33
36
  uppercase: {
34
- textTransform: 'uppercase'
37
+ textTransform: 'uppercase',
35
38
  },
36
39
  // sizes
37
40
  tiny: {
38
- fontSize: 10
41
+ fontSize: 10,
39
42
  },
40
43
  small: {
41
- fontSize: 12
44
+ fontSize: 12,
42
45
  },
43
46
  medium: {
44
- fontSize: 14
47
+ fontSize: 14,
45
48
  },
46
49
  large: {
47
- fontSize: 18
50
+ fontSize: 18,
48
51
  },
49
52
  'extra-large': {
50
- fontSize: 24
53
+ fontSize: 24,
51
54
  },
52
55
  huge: {
53
- fontSize: 40
56
+ fontSize: 40,
54
57
  },
55
58
  // Weights
56
59
  regular: {
57
- fontFamily: 'poppins_regular'
60
+ fontFamily: 'poppins_regular',
58
61
  },
59
62
  bold: {
60
- fontFamily: 'poppins_bold'
63
+ fontFamily: 'poppins_bold',
61
64
  },
62
65
  semiBold: {
63
- fontFamily: 'poppins_semiBold'
66
+ fontFamily: 'poppins_semiBold',
64
67
  },
65
68
  // Align
66
69
  left: {
67
- textAlign: 'left'
70
+ textAlign: 'left',
68
71
  },
69
72
  center: {
70
- textAlign: 'center'
73
+ textAlign: 'center',
71
74
  },
72
75
  right: {
73
- textAlign: 'right'
76
+ textAlign: 'right',
74
77
  },
75
78
  justify: {
76
- textAlign: 'justify'
77
- }
78
- };
79
+ textAlign: 'justify',
80
+ },
81
+ };
@@ -1,27 +1,27 @@
1
- export { default as Text } from './Text';
2
1
  export { default as Button } from './Button';
3
- export { default as TimeOutButton } from './TimeOutButton';
4
- export { default as Input } from './Input';
5
- export { default as Textarea } from './Textarea';
6
- export { default as InputPin } from './InputPin';
7
- export { default as Select } from './Select';
8
2
  export { default as Card } from './Card';
9
- export { default as MenuItem } from './MenuItem';
10
- export { default as FloatingContainer } from './FloatingContainer';
11
- export { default as FlashMessage, sendMessage } from './FlashMessage';
3
+ export { default as ConfirmationModal } from './ConfirmationModal';
4
+ export { default as Container } from './Container';
12
5
  export { default as DeckSwiper } from './DeckSwiper';
13
- export { default as NavigationTitle } from './NavigationTitle';
14
- export { default as VirtualKeyboard } from './VirtualKeyboard';
15
- export { default as Switch } from './Switch';
16
- export { default as Header } from './Header';
6
+ export { default as FlashMessage, sendMessage } from './FlashMessage';
7
+ export { default as FloatingContainer } from './FloatingContainer';
17
8
  export { default as Footer } from './Footer';
9
+ export { default as Header } from './Header';
18
10
  export { default as ImagePicker } from './ImagePicker';
19
11
  export { default as ImageResponsive } from './ImageResponsive';
20
12
  export { default as ImageViewer } from './ImageViewer';
13
+ export { default as Input } from './Input';
14
+ export { default as InputPin } from './InputPin';
15
+ export { default as MenuItem } from './MenuItem';
16
+ export { default as NavigationTitle } from './NavigationTitle';
17
+ export { default as Notification } from './Notification';
18
+ export { default as Select } from './Select';
19
+ export { default as SwipeablePanel } from './SwipeablePanel';
20
+ export { default as Switch } from './Switch';
21
21
  export { default as TakePicture } from './TakePicture';
22
- export { default as Container } from './Container';
23
- export { default as ConfirmationModal } from './ConfirmationModal';
22
+ export { default as Text } from './Text';
23
+ export { default as Textarea } from './Textarea';
24
+ export { default as TimeOutButton } from './TimeOutButton';
24
25
  export { default as UploadDocument } from './UploadDocument';
25
- export { default as SwipeablePanel } from './SwipeablePanel'
26
- export { default as Notification } from './Notification'
27
- export { default as withPreventDoubleClick } from './PreventDoubleClick'
26
+ export { default as VirtualKeyboard } from './VirtualKeyboard';
27
+ export { default as withPreventDoubleClick } from './PreventDoubleClick';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "main": "lib/index.js",
3
3
  "name": "@holper/react-native-holper-storybook",
4
4
  "description": "A component library for Holper projects",
5
- "version": "0.6.47",
5
+ "version": "0.6.49",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "lib",