@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,179 +0,0 @@
1
- import { Ionicons } from '@expo/vector-icons';
2
- import { useState } from 'react';
3
- import { Alert } from 'react-native';
4
-
5
- import { UploadDocument } from '../components';
6
- import { Colors } from '../configs/constants';
7
-
8
- export default {
9
- title: 'UploadDocument',
10
- component: UploadDocument,
11
- };
12
-
13
- export const Default = {
14
- render: () => (
15
- <UploadDocument
16
- title="Foto frontal"
17
- description="Foto frontal de su cedula de identidad"
18
- uploadButtonText="Subir"
19
- reUploadButtonText="Volver a subir documento"
20
- icon={<Ionicons name="image-outline" color={Colors.darkblue} size={50} />}
21
- mediaModal={{
22
- title: 'Seleccionar origen',
23
- description: 'Selecione desde donde desea cargar el archivo',
24
- confirmText: 'Cámara',
25
- cancelText: 'Galería',
26
- }}
27
- takePicture={{
28
- cameraErrorMessage: 'No access to the camera',
29
- requestPermissionsMessage: 'Grant access to the camera',
30
- processingPictureMessage: 'Processing',
31
- repeatPictureText: 'Repeat',
32
- usePictureText: 'Use',
33
- }}
34
- onSelectImage={() => {}}
35
- />
36
- ),
37
- };
38
-
39
- export const AvatarType = {
40
- render: () => (
41
- <UploadDocument
42
- title="Avatar"
43
- uploadButtonText="Subir"
44
- reUploadButtonText="Volver a subir avatar"
45
- icon={<Ionicons name="happy-outline" color={Colors.darkblue} size={50} />}
46
- mediaModal={{
47
- title: 'Seleccionar origen',
48
- description: 'Selecione desde donde desea cargar el archivo',
49
- confirmText: 'Cámara',
50
- cancelText: 'Galería',
51
- }}
52
- takePicture={{
53
- cameraErrorMessage: 'No access to the camera',
54
- requestPermissionsMessage: 'Grant access to the camera',
55
- processingPictureMessage: 'Processing',
56
- repeatPictureText: 'Repeat',
57
- usePictureText: 'Use',
58
- }}
59
- onSelectImage={() => {}}
60
- isAvatarPicker
61
- />
62
- ),
63
- };
64
-
65
- export const PreloadedFile = {
66
- render: () => (
67
- <UploadDocument
68
- title="Foto frontal"
69
- description="Foto frontal de su cedula de identidad"
70
- uploadButtonText="Subir"
71
- reUploadButtonText="Volver a subir documento"
72
- icon={<Ionicons name="image-outline" color={Colors.darkblue} size={50} />}
73
- mediaModal={{
74
- title: 'Seleccionar origen',
75
- description: 'Selecione desde donde desea cargar el archivo',
76
- confirmText: 'Cámara',
77
- cancelText: 'Galería',
78
- }}
79
- takePicture={{
80
- cameraErrorMessage: 'No access to the camera',
81
- requestPermissionsMessage: 'Grant access to the camera',
82
- processingPictureMessage: 'Processing',
83
- repeatPictureText: 'Repeat',
84
- usePictureText: 'Use',
85
- }}
86
- onSelectImage={() => {}}
87
- file="https://picsum.photos/200?random=1"
88
- />
89
- ),
90
- };
91
-
92
- const CompletedComponent = () => {
93
- const [value, setValue] = useState<string>();
94
-
95
- return (
96
- <UploadDocument
97
- title="Foto frontal"
98
- description="Foto frontal de su cedula de identidad"
99
- uploadButtonText="Subir"
100
- reUploadButtonText="Volver a subir documento"
101
- icon={<Ionicons name="image-outline" color={Colors.darkblue} size={50} />}
102
- mediaModal={{
103
- title: 'Seleccionar origen',
104
- description: 'Selecione desde donde desea cargar el archivo',
105
- confirmText: 'Cámara',
106
- cancelText: 'Galería',
107
- }}
108
- takePicture={{
109
- cameraErrorMessage: 'No access to the camera',
110
- requestPermissionsMessage: 'Grant access to the camera',
111
- processingPictureMessage: 'Processing',
112
- repeatPictureText: 'Repeat',
113
- usePictureText: 'Use',
114
- }}
115
- onSelectImage={setValue}
116
- completed={value !== null}
117
- />
118
- );
119
- };
120
-
121
- export const Completed = {
122
- render: CompletedComponent,
123
- };
124
-
125
- export const Inverted = {
126
- render: () => (
127
- <UploadDocument
128
- inverted
129
- title="Foto frontal"
130
- description="Foto frontal de su cedula de identidad"
131
- uploadButtonText="Subir"
132
- reUploadButtonText="Volver a subir documento"
133
- icon={<Ionicons name="image-outline" color={Colors.darkblue} size={50} />}
134
- mediaModal={{
135
- title: 'Seleccionar origen',
136
- description: 'Selecione desde donde desea cargar el archivo',
137
- confirmText: 'Cámara',
138
- cancelText: 'Galería',
139
- }}
140
- takePicture={{
141
- cameraErrorMessage: 'No access to the camera',
142
- requestPermissionsMessage: 'Grant access to the camera',
143
- processingPictureMessage: 'Processing',
144
- repeatPictureText: 'Repeat',
145
- usePictureText: 'Use',
146
- }}
147
- onSelectImage={() => {}}
148
- />
149
- ),
150
- };
151
-
152
- export const PermissionDenied = {
153
- render: () => (
154
- <UploadDocument
155
- title="Foto frontal"
156
- description="Foto frontal de su cedula de identidad"
157
- uploadButtonText="Subir"
158
- reUploadButtonText="Volver a subir documento"
159
- icon={<Ionicons name="image-outline" color={Colors.darkblue} size={50} />}
160
- onPermissionDenied={() => {
161
- Alert.alert('Permission denied', 'Permission denied');
162
- }}
163
- mediaModal={{
164
- title: 'Seleccionar origen',
165
- description: 'Selecione desde donde desea cargar el archivo',
166
- confirmText: 'Cámara',
167
- cancelText: 'Galería',
168
- }}
169
- takePicture={{
170
- cameraErrorMessage: 'No access to the camera',
171
- requestPermissionsMessage: 'Grant access to the camera',
172
- processingPictureMessage: 'Processing',
173
- repeatPictureText: 'Repeat',
174
- usePictureText: 'Use',
175
- }}
176
- onSelectImage={() => {}}
177
- />
178
- ),
179
- };
@@ -1,14 +0,0 @@
1
- import { VirtualKeyboard } from '../components';
2
-
3
- export default {
4
- title: 'Virtual Keyboard',
5
- component: VirtualKeyboard,
6
- };
7
-
8
- export const Default = {
9
- render: () => <VirtualKeyboard onPress={() => {}} />,
10
- };
11
-
12
- export const HideBiometrics = {
13
- render: () => <VirtualKeyboard onPress={() => {}} hideBiometrics />,
14
- };
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Bundler */
4
- "jsx": "preserve",
5
- "allowJs": true,
6
- "resolveJsonModule": true,
7
-
8
- /* Linting */
9
- "allowSyntheticDefaultImports": true,
10
- "experimentalDecorators": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "noEmit": true,
13
- "noFallthroughCasesInSwitch": true,
14
- "noImplicitAny": true,
15
- "noImplicitThis": true,
16
- "strict": true,
17
- "strictNullChecks": true,
18
- "useUnknownInCatchVariables": false
19
- },
20
- "extends": "expo/tsconfig.base"
21
- }
@@ -1,19 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { StyleProp, ViewStyle } from 'react-native';
3
-
4
- import { ScrollView } from 'react-native';
5
-
6
- interface ScrollViewProps {
7
- children: ReactNode;
8
- styles?: StyleProp<ViewStyle>;
9
- contentContainerStyle?: StyleProp<ViewStyle>;
10
- }
11
-
12
- export default ({ children, styles, contentContainerStyle }: ScrollViewProps) => (
13
- <ScrollView
14
- style={[{ paddingVertical: 42, paddingHorizontal: 20, flex: 1 }, styles]}
15
- contentContainerStyle={contentContainerStyle}
16
- >
17
- {children}
18
- </ScrollView>
19
- );
@@ -1,2 +0,0 @@
1
- export { default as ScrollView } from './ScrollView';
2
- export { lightOrDark } from './utils';
@@ -1,29 +0,0 @@
1
- export const lightOrDark = (color: any) => {
2
- let r: number, g: number, b: number;
3
- // Check the format of the color, HEX or RGB?
4
- if (color.match(/^rgb/)) {
5
- // If HEX --> store the red, green, blue values in separate variables
6
- color = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);
7
-
8
- r = color[1];
9
- g = color[2];
10
- b = color[3];
11
- } else {
12
- // If RGB --> Convert it to HEX: http://gist.github.com/983661
13
- color = +('0x' + color.slice(1).replace(color.length < 5 && /./g, '$&$&'));
14
-
15
- r = Math.floor(color / (256 * 256));
16
- g = Math.floor(color / 256) % 256;
17
- b = color % 256;
18
- }
19
-
20
- // HSP equation from http://alienryderflex.com/hsp.html
21
- const hsp = Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b));
22
-
23
- // Using the HSP value, determine whether the color is light or dark
24
- if (hsp > 127.5) {
25
- return 'light';
26
- } else {
27
- return 'dark';
28
- }
29
- };