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

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 (121) hide show
  1. package/README.md +1 -1
  2. package/package.json +5 -1
  3. package/.expo/README.md +0 -8
  4. package/.nvmrc +0 -1
  5. package/.prettierignore +0 -5
  6. package/.storybook/index.jsx +0 -11
  7. package/.storybook/main.js +0 -8
  8. package/.storybook/preview.jsx +0 -51
  9. package/.storybook/storybook.requires.js +0 -43
  10. package/.yarn/releases/yarn-4.5.0.cjs +0 -925
  11. package/.yarnrc.yml +0 -3
  12. package/App.jsx +0 -29
  13. package/app.config.js +0 -77
  14. package/assets/adaptive-icon.png +0 -0
  15. package/assets/favicon.png +0 -0
  16. package/assets/fonts/Poppins-Bold.ttf +0 -0
  17. package/assets/fonts/Poppins-Regular.ttf +0 -0
  18. package/assets/fonts/Poppins-SemiBold.ttf +0 -0
  19. package/assets/icon.png +0 -0
  20. package/assets/splash.png +0 -0
  21. package/babel.config.js +0 -7
  22. package/build.sh +0 -11
  23. package/components/Button/index.tsx +0 -66
  24. package/components/Button/style.ts +0 -111
  25. package/components/Card/index.tsx +0 -33
  26. package/components/Card/style.ts +0 -34
  27. package/components/ConfirmationModal/index.tsx +0 -104
  28. package/components/ConfirmationModal/style.tsx +0 -53
  29. package/components/Container/index.tsx +0 -33
  30. package/components/Container/style.ts +0 -13
  31. package/components/CustomChatView/index.tsx +0 -65
  32. package/components/CustomChatView/style.ts +0 -10
  33. package/components/DeckSwiper/index.tsx +0 -90
  34. package/components/DeckSwiper/style.ts +0 -59
  35. package/components/DonutCountdown/index.tsx +0 -86
  36. package/components/DonutCountdown/style.ts +0 -8
  37. package/components/FloatingContainer/index.tsx +0 -35
  38. package/components/FloatingContainer/style.ts +0 -25
  39. package/components/Footer/index.tsx +0 -35
  40. package/components/Footer/style.ts +0 -40
  41. package/components/Header/index.tsx +0 -21
  42. package/components/Header/style.ts +0 -34
  43. package/components/ImagePicker/index.tsx +0 -18
  44. package/components/ImageResponsive/index.tsx +0 -24
  45. package/components/ImageResponsive/style.ts +0 -9
  46. package/components/ImageViewer/index.tsx +0 -36
  47. package/components/ImageViewer/style.ts +0 -38
  48. package/components/Input/index.tsx +0 -62
  49. package/components/Input/style.ts +0 -91
  50. package/components/InputPin/index.tsx +0 -21
  51. package/components/InputPin/style.ts +0 -22
  52. package/components/MenuItem/index.tsx +0 -25
  53. package/components/MenuItem/style.ts +0 -44
  54. package/components/NavigationTitle/index.tsx +0 -53
  55. package/components/NavigationTitle/style.ts +0 -49
  56. package/components/Notification/index.tsx +0 -44
  57. package/components/Notification/style.ts +0 -50
  58. package/components/PreventDoubleClick/index.tsx +0 -28
  59. package/components/Select/index.tsx +0 -51
  60. package/components/Select/style.ts +0 -64
  61. package/components/SwipeablePanel/index.tsx +0 -208
  62. package/components/SwipeablePanel/style.ts +0 -81
  63. package/components/Switch/index.tsx +0 -30
  64. package/components/TakePicture/confirmPictureModal.tsx +0 -37
  65. package/components/TakePicture/index.tsx +0 -148
  66. package/components/TakePicture/style.ts +0 -95
  67. package/components/Text/index.tsx +0 -33
  68. package/components/Text/style.ts +0 -101
  69. package/components/Textarea/index.tsx +0 -26
  70. package/components/Textarea/style.ts +0 -38
  71. package/components/TimeOutButton/index.tsx +0 -67
  72. package/components/TimeOutButton/style.ts +0 -42
  73. package/components/Toast/index.tsx +0 -34
  74. package/components/Toast/style.ts +0 -12
  75. package/components/UploadDocument/index.tsx +0 -179
  76. package/components/UploadDocument/style.ts +0 -57
  77. package/components/VirtualKeyboard/index.tsx +0 -75
  78. package/components/VirtualKeyboard/style.ts +0 -25
  79. package/components/index.ts +0 -29
  80. package/configs/constants.ts +0 -273
  81. package/configs/types.ts +0 -326
  82. package/eas.json +0 -27
  83. package/eslint.config.mjs +0 -205
  84. package/hooks/index.ts +0 -2
  85. package/hooks/useDebounce.tsx +0 -24
  86. package/hooks/useLoadFonts.tsx +0 -13
  87. package/metro.config.js +0 -11
  88. package/prettier.config.mjs +0 -23
  89. package/stories/Button.stories.tsx +0 -181
  90. package/stories/Card.stories.tsx +0 -22
  91. package/stories/Colors.stories.tsx +0 -57
  92. package/stories/ConfirmationModal.stories.tsx +0 -142
  93. package/stories/Container.stories.tsx +0 -105
  94. package/stories/DeckSwiper.stories.tsx +0 -43
  95. package/stories/DonutCountdown.stories.tsx +0 -134
  96. package/stories/FloatingContainer.stories.tsx +0 -139
  97. package/stories/Footer.stories.tsx +0 -65
  98. package/stories/Header.stories.tsx +0 -37
  99. package/stories/ImagePicker.stories.tsx +0 -14
  100. package/stories/ImageResponsive.stories.tsx +0 -18
  101. package/stories/ImageViewer.stories.tsx +0 -24
  102. package/stories/Input.stories.tsx +0 -119
  103. package/stories/InputPin.stories.tsx +0 -40
  104. package/stories/Menu.stories.tsx +0 -53
  105. package/stories/MenuItem.stories.tsx +0 -30
  106. package/stories/NavigationTitle.stories.tsx +0 -51
  107. package/stories/Notification.stories.tsx +0 -58
  108. package/stories/Select.stories.tsx +0 -270
  109. package/stories/SwipeablePanel.stories.tsx +0 -360
  110. package/stories/Switch.stories.tsx +0 -36
  111. package/stories/TakePicture.stories.tsx +0 -59
  112. package/stories/Text.stories.tsx +0 -61
  113. package/stories/Textarea.stories.tsx +0 -48
  114. package/stories/TimeOutButton.stories.tsx +0 -55
  115. package/stories/Toast.stories.tsx +0 -37
  116. package/stories/UploadDocument.stories.tsx +0 -179
  117. package/stories/VirtualKeyboard.stories.tsx +0 -14
  118. package/tsconfig.json +0 -21
  119. package/utilities/ScrollView.tsx +0 -19
  120. package/utilities/index.ts +0 -2
  121. 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
- };