@holper/react-native-holper-storybook 0.7.0 → 0.7.2

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.
Files changed (127) hide show
  1. package/README.md +1 -1
  2. package/lib/components/DonutCountdown/style.ts +2 -1
  3. package/lib/components/Input/style.ts +2 -1
  4. package/lib/components/Select/index.tsx +1 -0
  5. package/lib/components/Select/style.ts +6 -1
  6. package/lib/components/Toast/index.tsx +34 -20
  7. package/lib/configs/constants.ts +2 -0
  8. package/package.json +5 -1
  9. package/.expo/README.md +0 -8
  10. package/.nvmrc +0 -1
  11. package/.prettierignore +0 -5
  12. package/.storybook/index.jsx +0 -11
  13. package/.storybook/main.js +0 -8
  14. package/.storybook/preview.jsx +0 -51
  15. package/.storybook/storybook.requires.js +0 -43
  16. package/.yarn/releases/yarn-4.5.0.cjs +0 -925
  17. package/.yarnrc.yml +0 -3
  18. package/App.jsx +0 -29
  19. package/app.config.js +0 -77
  20. package/assets/adaptive-icon.png +0 -0
  21. package/assets/favicon.png +0 -0
  22. package/assets/fonts/Poppins-Bold.ttf +0 -0
  23. package/assets/fonts/Poppins-Regular.ttf +0 -0
  24. package/assets/fonts/Poppins-SemiBold.ttf +0 -0
  25. package/assets/icon.png +0 -0
  26. package/assets/splash.png +0 -0
  27. package/babel.config.js +0 -7
  28. package/build.sh +0 -11
  29. package/components/Button/index.tsx +0 -66
  30. package/components/Button/style.ts +0 -111
  31. package/components/Card/index.tsx +0 -33
  32. package/components/Card/style.ts +0 -34
  33. package/components/ConfirmationModal/index.tsx +0 -104
  34. package/components/ConfirmationModal/style.tsx +0 -53
  35. package/components/Container/index.tsx +0 -33
  36. package/components/Container/style.ts +0 -13
  37. package/components/CustomChatView/index.tsx +0 -65
  38. package/components/CustomChatView/style.ts +0 -10
  39. package/components/DeckSwiper/index.tsx +0 -90
  40. package/components/DeckSwiper/style.ts +0 -59
  41. package/components/DonutCountdown/index.tsx +0 -86
  42. package/components/DonutCountdown/style.ts +0 -8
  43. package/components/FloatingContainer/index.tsx +0 -35
  44. package/components/FloatingContainer/style.ts +0 -25
  45. package/components/Footer/index.tsx +0 -35
  46. package/components/Footer/style.ts +0 -40
  47. package/components/Header/index.tsx +0 -21
  48. package/components/Header/style.ts +0 -34
  49. package/components/ImagePicker/index.tsx +0 -18
  50. package/components/ImageResponsive/index.tsx +0 -24
  51. package/components/ImageResponsive/style.ts +0 -9
  52. package/components/ImageViewer/index.tsx +0 -36
  53. package/components/ImageViewer/style.ts +0 -38
  54. package/components/Input/index.tsx +0 -62
  55. package/components/Input/style.ts +0 -91
  56. package/components/InputPin/index.tsx +0 -21
  57. package/components/InputPin/style.ts +0 -22
  58. package/components/MenuItem/index.tsx +0 -25
  59. package/components/MenuItem/style.ts +0 -44
  60. package/components/NavigationTitle/index.tsx +0 -53
  61. package/components/NavigationTitle/style.ts +0 -49
  62. package/components/Notification/index.tsx +0 -44
  63. package/components/Notification/style.ts +0 -50
  64. package/components/PreventDoubleClick/index.tsx +0 -28
  65. package/components/Select/index.tsx +0 -51
  66. package/components/Select/style.ts +0 -64
  67. package/components/SwipeablePanel/index.tsx +0 -208
  68. package/components/SwipeablePanel/style.ts +0 -81
  69. package/components/Switch/index.tsx +0 -30
  70. package/components/TakePicture/confirmPictureModal.tsx +0 -37
  71. package/components/TakePicture/index.tsx +0 -148
  72. package/components/TakePicture/style.ts +0 -95
  73. package/components/Text/index.tsx +0 -33
  74. package/components/Text/style.ts +0 -101
  75. package/components/Textarea/index.tsx +0 -26
  76. package/components/Textarea/style.ts +0 -38
  77. package/components/TimeOutButton/index.tsx +0 -67
  78. package/components/TimeOutButton/style.ts +0 -42
  79. package/components/Toast/index.tsx +0 -34
  80. package/components/Toast/style.ts +0 -12
  81. package/components/UploadDocument/index.tsx +0 -179
  82. package/components/UploadDocument/style.ts +0 -57
  83. package/components/VirtualKeyboard/index.tsx +0 -75
  84. package/components/VirtualKeyboard/style.ts +0 -25
  85. package/components/index.ts +0 -29
  86. package/configs/constants.ts +0 -273
  87. package/configs/types.ts +0 -326
  88. package/eas.json +0 -27
  89. package/eslint.config.mjs +0 -205
  90. package/hooks/index.ts +0 -2
  91. package/hooks/useDebounce.tsx +0 -24
  92. package/hooks/useLoadFonts.tsx +0 -13
  93. package/metro.config.js +0 -11
  94. package/prettier.config.mjs +0 -23
  95. package/stories/Button.stories.tsx +0 -181
  96. package/stories/Card.stories.tsx +0 -22
  97. package/stories/Colors.stories.tsx +0 -57
  98. package/stories/ConfirmationModal.stories.tsx +0 -142
  99. package/stories/Container.stories.tsx +0 -105
  100. package/stories/DeckSwiper.stories.tsx +0 -43
  101. package/stories/DonutCountdown.stories.tsx +0 -134
  102. package/stories/FloatingContainer.stories.tsx +0 -139
  103. package/stories/Footer.stories.tsx +0 -65
  104. package/stories/Header.stories.tsx +0 -37
  105. package/stories/ImagePicker.stories.tsx +0 -14
  106. package/stories/ImageResponsive.stories.tsx +0 -18
  107. package/stories/ImageViewer.stories.tsx +0 -24
  108. package/stories/Input.stories.tsx +0 -119
  109. package/stories/InputPin.stories.tsx +0 -40
  110. package/stories/Menu.stories.tsx +0 -53
  111. package/stories/MenuItem.stories.tsx +0 -30
  112. package/stories/NavigationTitle.stories.tsx +0 -51
  113. package/stories/Notification.stories.tsx +0 -58
  114. package/stories/Select.stories.tsx +0 -270
  115. package/stories/SwipeablePanel.stories.tsx +0 -360
  116. package/stories/Switch.stories.tsx +0 -36
  117. package/stories/TakePicture.stories.tsx +0 -59
  118. package/stories/Text.stories.tsx +0 -61
  119. package/stories/Textarea.stories.tsx +0 -48
  120. package/stories/TimeOutButton.stories.tsx +0 -55
  121. package/stories/Toast.stories.tsx +0 -37
  122. package/stories/UploadDocument.stories.tsx +0 -179
  123. package/stories/VirtualKeyboard.stories.tsx +0 -14
  124. package/tsconfig.json +0 -21
  125. package/utilities/ScrollView.tsx +0 -19
  126. package/utilities/index.ts +0 -2
  127. package/utilities/utils.ts +0 -29
@@ -1,119 +0,0 @@
1
- import { Ionicons } from '@expo/vector-icons';
2
-
3
- import { Input } from '../components';
4
- import { Colors } from '../configs/constants';
5
-
6
- export default {
7
- title: 'Input',
8
- component: Input,
9
- };
10
-
11
- export const Variant = {
12
- render: () => (
13
- <>
14
- <Input placeholder="Placeholder" />
15
- <Input variant="completed" placeholder="Placeholder" />
16
- <Input variant="error" placeholder="Placeholder" value="Input with error" />
17
- </>
18
- ),
19
- };
20
-
21
- export const LeftIcon = {
22
- render: () => (
23
- <>
24
- <Input placeholder="Placeholder" leftIcon={<Ionicons name="person-outline" size={26} color={Colors.midblue} />} />
25
- <Input
26
- variant="completed"
27
- placeholder="Placeholder"
28
- leftIcon={<Ionicons name="shield-checkmark-outline" size={26} color={Colors.midblue} />}
29
- />
30
- <Input
31
- variant="error"
32
- placeholder="Placeholder"
33
- value="Input with error"
34
- leftIcon={<Ionicons name="power-outline" size={26} color={Colors.red} />}
35
- />
36
- </>
37
- ),
38
- };
39
-
40
- export const Sizes = {
41
- render: () => (
42
- <>
43
- <Input size="fixed" placeholder="Fixed" />
44
-
45
- <Input size="fit" placeholder="Fit" />
46
- </>
47
- ),
48
- };
49
-
50
- export const Disabled = {
51
- render: () => (
52
- <>
53
- <Input disabled placeholder="Placeholder" />
54
- <Input disabled variant="completed" placeholder="Placeholder" />
55
- <Input disabled variant="error" placeholder="Placeholder" value="Input with error" />
56
- </>
57
- ),
58
- };
59
-
60
- export const ShowLabel = {
61
- render: () => (
62
- <>
63
- <Input showLabel label="User Name" placeholder="Enter your name" />
64
- <Input showLabel label="Password" variant="completed" placeholder="Enter your password" />
65
- <Input showLabel label="Error" variant="error" placeholder="Enter your input" value="Invalid input" />
66
- </>
67
- ),
68
- };
69
-
70
- export const CharacterCount = {
71
- render: () => (
72
- <>
73
- <Input count maxLength={50} placeholder="Type here..." />
74
- <Input count maxLength={30} variant="completed" placeholder="Type here..." />
75
- <Input count maxLength={20} variant="error" placeholder="Type here..." value="Too many characters" />
76
- </>
77
- ),
78
- };
79
-
80
- export const RightIcon = {
81
- render: () => (
82
- <>
83
- <Input
84
- placeholder="Enter text"
85
- rightIcon={<Ionicons name="checkmark-outline" size={26} color={Colors.green} />}
86
- />
87
- <Input
88
- variant="completed"
89
- placeholder="Enter text"
90
- rightIcon={<Ionicons name="happy-outline" size={26} color={Colors.midblue} />}
91
- />
92
- <Input
93
- variant="error"
94
- placeholder="Enter text"
95
- value="Error state"
96
- rightIcon={<Ionicons name="alert-circle-outline" size={26} color={Colors.red} />}
97
- />
98
- </>
99
- ),
100
- };
101
-
102
- export const CombinedFeatures = {
103
- render: () => (
104
- <>
105
- <Input
106
- showLabel
107
- label="Search"
108
- placeholder="Enter search term"
109
- rightIcon={<Ionicons name="search-outline" size={26} color={Colors.gray} />}
110
- />
111
- <Input
112
- count
113
- maxLength={30}
114
- placeholder="Type here"
115
- rightIcon={<Ionicons name="send-outline" size={26} color={Colors.midblue} />}
116
- />
117
- </>
118
- ),
119
- };
@@ -1,40 +0,0 @@
1
- import { useState } from 'react';
2
-
3
- import { InputPin, VirtualKeyboard } from '../components';
4
-
5
- export default {
6
- title: 'Input Pin',
7
- component: InputPin,
8
- };
9
-
10
- const DefaultComponent = () => {
11
- const [values, setValues] = useState<(string | number)[]>([]);
12
-
13
- return (
14
- <>
15
- <InputPin values={values} />
16
- <VirtualKeyboard
17
- onPress={(key) => {
18
- switch (key) {
19
- case 'back':
20
- if (values.length) {
21
- setValues(values.slice(0, -1));
22
- }
23
- break;
24
- case 'biometrics':
25
- break;
26
- default:
27
- if (values.length < 4 && key !== null) {
28
- setValues([...values, key]);
29
- }
30
- break;
31
- }
32
- }}
33
- />
34
- </>
35
- );
36
- };
37
-
38
- export const Default = {
39
- render: DefaultComponent,
40
- };
@@ -1,53 +0,0 @@
1
- import { Ionicons } from '@expo/vector-icons';
2
-
3
- import { Card, MenuItem } from '../components';
4
- import { Colors } from '../configs/constants';
5
-
6
- export default {
7
- title: 'Menu',
8
- component: MenuItem,
9
- };
10
-
11
- export const Default = {
12
- render: () => (
13
- <>
14
- <Card>
15
- <MenuItem
16
- icon={<Ionicons name="list-outline" size={22} color={Colors.darkblue} />}
17
- text="Menu item text"
18
- onPress={() => {}}
19
- />
20
- <MenuItem
21
- icon={<Ionicons name="card-outline" size={22} color={Colors.darkblue} />}
22
- text="Menu item text"
23
- onPress={() => {}}
24
- />
25
- <MenuItem
26
- icon={<Ionicons name="location-outline" size={22} color={Colors.darkblue} />}
27
- text="Menu item text"
28
- onPress={() => {}}
29
- />
30
- <MenuItem
31
- icon={<Ionicons name="lock-closed-outline" size={22} color={Colors.darkblue} />}
32
- text="Menu item text"
33
- last
34
- onPress={() => {}}
35
- />
36
- </Card>
37
-
38
- <Card>
39
- <MenuItem
40
- icon={<Ionicons name="headset-outline" size={22} color={Colors.darkblue} />}
41
- text="Menu item text"
42
- onPress={() => {}}
43
- />
44
- <MenuItem
45
- icon={<Ionicons name="help-circle-outline" size={22} color={Colors.darkblue} />}
46
- text="Menu item text"
47
- onPress={() => {}}
48
- last
49
- />
50
- </Card>
51
- </>
52
- ),
53
- };
@@ -1,30 +0,0 @@
1
- import { Ionicons } from '@expo/vector-icons';
2
-
3
- import { MenuItem } from '../components';
4
- import { Colors } from '../configs/constants';
5
-
6
- export default {
7
- title: 'Menu Item',
8
- component: MenuItem,
9
- };
10
-
11
- export const Default = {
12
- render: () => (
13
- <MenuItem
14
- icon={<Ionicons name="list-outline" size={24} color={Colors.darkblue} />}
15
- text="Menu item text"
16
- onPress={() => {}}
17
- />
18
- ),
19
- };
20
-
21
- export const Last = {
22
- render: () => (
23
- <MenuItem
24
- icon={<Ionicons name="list-outline" size={24} color={Colors.darkblue} />}
25
- text="Menu item text"
26
- last
27
- onPress={() => {}}
28
- />
29
- ),
30
- };
@@ -1,51 +0,0 @@
1
- import { View } from 'react-native';
2
-
3
- import { ImageResponsive, NavigationTitle, Text } from '../components';
4
- import { Colors } from '../configs/constants';
5
-
6
- export default {
7
- title: 'Navigation Title',
8
- component: NavigationTitle,
9
- };
10
-
11
- export const Close = {
12
- render: () => <NavigationTitle title="This is the title" onPress={() => {}} />,
13
- };
14
- export const Back = {
15
- render: () => <NavigationTitle type="back" title="This is the title" onPress={() => {}} />,
16
- };
17
- export const UseComponentInTitle = {
18
- render: () => (
19
- <NavigationTitle
20
- type="back"
21
- title={
22
- <View style={{ flexDirection: 'row', alignSelf: 'center' }}>
23
- <ImageResponsive
24
- avatar
25
- source={require('../assets/icon.png')}
26
- style={{ height: 50, width: 50, borderColor: Colors.lightblue, borderWidth: 1, marginHorizontal: 10 }}
27
- />
28
- <View>
29
- <Text size="large" weight="semiBold">
30
- This is the title
31
- </Text>
32
- <Text size="tiny" color="light">
33
- This is the title
34
- </Text>
35
- </View>
36
- </View>
37
- }
38
- onPress={() => {}}
39
- />
40
- ),
41
- };
42
- export const NoShadow = {
43
- render: () => <NavigationTitle type="back" noShadow title="This is the title" onPress={() => {}} />,
44
- };
45
- export const ExtraLarge = {
46
- render: () => <NavigationTitle type="back" xlarge title="This is the title" onPress={() => {}} />,
47
- };
48
-
49
- export const BlockNavigation = {
50
- render: () => <NavigationTitle type="back" blockNavigation title="This is the title" onPress={() => {}} />,
51
- };
@@ -1,58 +0,0 @@
1
- import dayjs from 'dayjs';
2
-
3
- import { Notification } from '../components';
4
-
5
- export default {
6
- title: 'Notification',
7
- component: Notification,
8
- };
9
-
10
- export const Default = {
11
- render: () => (
12
- <Notification
13
- title="Mike Lyne"
14
- description="I must tell you my interview this. I must tell you my interview this"
15
- avatar={{ uri: 'https://picsum.photos/id/237/300' }}
16
- date={dayjs().subtract(3, 'm')}
17
- onPress={() => {}}
18
- />
19
- ),
20
- };
21
-
22
- export const First = {
23
- render: () => (
24
- <Notification
25
- first
26
- title="Mike Lyne"
27
- description="I must tell you my interview this"
28
- avatar={{ uri: 'https://picsum.photos/id/237/300' }}
29
- date={dayjs().subtract(1, 'd')}
30
- onPress={() => {}}
31
- />
32
- ),
33
- };
34
-
35
- export const Active = {
36
- render: () => (
37
- <Notification
38
- active
39
- title="Mike Lyne"
40
- description="I must tell you my interview this"
41
- avatar={{ uri: 'https://picsum.photos/id/237/300' }}
42
- date={dayjs().subtract(1, 'month')}
43
- onPress={() => {}}
44
- />
45
- ),
46
- };
47
-
48
- export const NoAvatar = {
49
- render: () => (
50
- <Notification
51
- hideAvatar
52
- title="Mike Lyne"
53
- description="I must tell you my interview this"
54
- date={dayjs().subtract(1, 'h')}
55
- onPress={() => {}}
56
- />
57
- ),
58
- };
@@ -1,270 +0,0 @@
1
- import { useState } from 'react';
2
- import { Dimensions, View } from 'react-native';
3
-
4
- import { Select } from '../components';
5
-
6
- const { width } = Dimensions.get('window');
7
-
8
- export default {
9
- title: 'Select',
10
- component: Select,
11
- };
12
-
13
- const VariantComponent = () => {
14
- const [value, setValue] = useState<string>('');
15
- return (
16
- <>
17
- <Select
18
- items={[
19
- {
20
- label: 'Spanish',
21
- value: 'es',
22
- },
23
- {
24
- label: 'English',
25
- value: 'en',
26
- },
27
- {
28
- label: 'French',
29
- value: 'fr',
30
- },
31
- {
32
- label: 'Italian',
33
- value: 'it',
34
- },
35
- ]}
36
- value={value}
37
- placeholder="Select a language"
38
- onValueChange={setValue}
39
- />
40
- <Select
41
- variant="completed"
42
- items={[
43
- {
44
- label: 'Spanish',
45
- value: 'es',
46
- },
47
- {
48
- label: 'English',
49
- value: 'en',
50
- },
51
- {
52
- label: 'French',
53
- value: 'fr',
54
- },
55
- {
56
- label: 'Italian',
57
- value: 'it',
58
- },
59
- ]}
60
- value={value}
61
- placeholder="Select a language"
62
- onValueChange={setValue}
63
- />
64
- <Select
65
- variant="error"
66
- items={[
67
- {
68
- label: 'Spanish',
69
- value: 'es',
70
- },
71
- {
72
- label: 'English',
73
- value: 'en',
74
- },
75
- {
76
- label: 'French',
77
- value: 'fr',
78
- },
79
- {
80
- label: 'Italian',
81
- value: 'it',
82
- },
83
- ]}
84
- value={value}
85
- placeholder="Select a language"
86
- onValueChange={setValue}
87
- />
88
- </>
89
- );
90
- };
91
-
92
- const FitToContainerComponent = () => {
93
- const [value, setValue] = useState<string>('');
94
- return (
95
- <>
96
- <View style={{ width }}>
97
- <Select
98
- fitToContainer
99
- items={[
100
- {
101
- label: 'Spanish',
102
- value: 'es',
103
- },
104
- {
105
- label: 'English',
106
- value: 'en',
107
- },
108
- {
109
- label: 'French',
110
- value: 'fr',
111
- },
112
- {
113
- label: 'Italian',
114
- value: 'it',
115
- },
116
- ]}
117
- value={value}
118
- placeholder="Select a language"
119
- onValueChange={setValue}
120
- />
121
- </View>
122
- <View style={{ width: width - 100 }}>
123
- <Select
124
- fitToContainer
125
- items={[
126
- {
127
- label: 'Spanish',
128
- value: 'es',
129
- },
130
- {
131
- label: 'English',
132
- value: 'en',
133
- },
134
- {
135
- label: 'French',
136
- value: 'fr',
137
- },
138
- {
139
- label: 'Italian',
140
- value: 'it',
141
- },
142
- ]}
143
- value={value}
144
- placeholder="Select a language"
145
- onValueChange={setValue}
146
- />
147
- </View>
148
- <View style={{ width: width - 180 }}>
149
- <Select
150
- fitToContainer
151
- items={[
152
- {
153
- label: 'Spanish',
154
- value: 'es',
155
- },
156
- {
157
- label: 'English',
158
- value: 'en',
159
- },
160
- {
161
- label: 'French',
162
- value: 'fr',
163
- },
164
- {
165
- label: 'Italian',
166
- value: 'it',
167
- },
168
- ]}
169
- value={value}
170
- placeholder="Select a language"
171
- onValueChange={setValue}
172
- />
173
- </View>
174
- </>
175
- );
176
- };
177
-
178
- const DisabledComponent = () => {
179
- const [value, setValue] = useState<string>('');
180
- return (
181
- <>
182
- <Select
183
- disabled
184
- items={[
185
- {
186
- label: 'Spanish',
187
- value: 'es',
188
- },
189
- {
190
- label: 'English',
191
- value: 'en',
192
- },
193
- {
194
- label: 'French',
195
- value: 'fr',
196
- },
197
- {
198
- label: 'Italian',
199
- value: 'it',
200
- },
201
- ]}
202
- value={value}
203
- placeholder="Select a language"
204
- onValueChange={setValue}
205
- />
206
- <Select
207
- variant="completed"
208
- disabled
209
- items={[
210
- {
211
- label: 'Spanish',
212
- value: 'es',
213
- },
214
- {
215
- label: 'English',
216
- value: 'en',
217
- },
218
- {
219
- label: 'French',
220
- value: 'fr',
221
- },
222
- {
223
- label: 'Italian',
224
- value: 'it',
225
- },
226
- ]}
227
- value={value}
228
- placeholder="Select a language"
229
- onValueChange={setValue}
230
- />
231
- <Select
232
- variant="error"
233
- disabled
234
- items={[
235
- {
236
- label: 'Spanish',
237
- value: 'es',
238
- },
239
- {
240
- label: 'English',
241
- value: 'en',
242
- },
243
- {
244
- label: 'French',
245
- value: 'fr',
246
- },
247
- {
248
- label: 'Italian',
249
- value: 'it',
250
- },
251
- ]}
252
- value={value}
253
- placeholder="Select a language"
254
- onValueChange={setValue}
255
- />
256
- </>
257
- );
258
- };
259
-
260
- export const Variant = {
261
- render: VariantComponent,
262
- };
263
-
264
- export const FitToContainer = {
265
- render: FitToContainerComponent,
266
- };
267
-
268
- export const Disabled = {
269
- render: DisabledComponent,
270
- };