@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.
- package/README.md +1 -1
- package/package.json +5 -1
- package/.expo/README.md +0 -8
- package/.nvmrc +0 -1
- package/.prettierignore +0 -5
- package/.storybook/index.jsx +0 -11
- package/.storybook/main.js +0 -8
- package/.storybook/preview.jsx +0 -51
- package/.storybook/storybook.requires.js +0 -43
- package/.yarn/releases/yarn-4.5.0.cjs +0 -925
- package/.yarnrc.yml +0 -3
- package/App.jsx +0 -29
- package/app.config.js +0 -77
- package/assets/adaptive-icon.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/fonts/Poppins-Bold.ttf +0 -0
- package/assets/fonts/Poppins-Regular.ttf +0 -0
- package/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/assets/icon.png +0 -0
- package/assets/splash.png +0 -0
- package/babel.config.js +0 -7
- package/build.sh +0 -11
- package/components/Button/index.tsx +0 -66
- package/components/Button/style.ts +0 -111
- package/components/Card/index.tsx +0 -33
- package/components/Card/style.ts +0 -34
- package/components/ConfirmationModal/index.tsx +0 -104
- package/components/ConfirmationModal/style.tsx +0 -53
- package/components/Container/index.tsx +0 -33
- package/components/Container/style.ts +0 -13
- package/components/CustomChatView/index.tsx +0 -65
- package/components/CustomChatView/style.ts +0 -10
- package/components/DeckSwiper/index.tsx +0 -90
- package/components/DeckSwiper/style.ts +0 -59
- package/components/DonutCountdown/index.tsx +0 -86
- package/components/DonutCountdown/style.ts +0 -8
- package/components/FloatingContainer/index.tsx +0 -35
- package/components/FloatingContainer/style.ts +0 -25
- package/components/Footer/index.tsx +0 -35
- package/components/Footer/style.ts +0 -40
- package/components/Header/index.tsx +0 -21
- package/components/Header/style.ts +0 -34
- package/components/ImagePicker/index.tsx +0 -18
- package/components/ImageResponsive/index.tsx +0 -24
- package/components/ImageResponsive/style.ts +0 -9
- package/components/ImageViewer/index.tsx +0 -36
- package/components/ImageViewer/style.ts +0 -38
- package/components/Input/index.tsx +0 -62
- package/components/Input/style.ts +0 -91
- package/components/InputPin/index.tsx +0 -21
- package/components/InputPin/style.ts +0 -22
- package/components/MenuItem/index.tsx +0 -25
- package/components/MenuItem/style.ts +0 -44
- package/components/NavigationTitle/index.tsx +0 -53
- package/components/NavigationTitle/style.ts +0 -49
- package/components/Notification/index.tsx +0 -44
- package/components/Notification/style.ts +0 -50
- package/components/PreventDoubleClick/index.tsx +0 -28
- package/components/Select/index.tsx +0 -51
- package/components/Select/style.ts +0 -64
- package/components/SwipeablePanel/index.tsx +0 -208
- package/components/SwipeablePanel/style.ts +0 -81
- package/components/Switch/index.tsx +0 -30
- package/components/TakePicture/confirmPictureModal.tsx +0 -37
- package/components/TakePicture/index.tsx +0 -148
- package/components/TakePicture/style.ts +0 -95
- package/components/Text/index.tsx +0 -33
- package/components/Text/style.ts +0 -101
- package/components/Textarea/index.tsx +0 -26
- package/components/Textarea/style.ts +0 -38
- package/components/TimeOutButton/index.tsx +0 -67
- package/components/TimeOutButton/style.ts +0 -42
- package/components/Toast/index.tsx +0 -34
- package/components/Toast/style.ts +0 -12
- package/components/UploadDocument/index.tsx +0 -179
- package/components/UploadDocument/style.ts +0 -57
- package/components/VirtualKeyboard/index.tsx +0 -75
- package/components/VirtualKeyboard/style.ts +0 -25
- package/components/index.ts +0 -29
- package/configs/constants.ts +0 -273
- package/configs/types.ts +0 -326
- package/eas.json +0 -27
- package/eslint.config.mjs +0 -205
- package/hooks/index.ts +0 -2
- package/hooks/useDebounce.tsx +0 -24
- package/hooks/useLoadFonts.tsx +0 -13
- package/metro.config.js +0 -11
- package/prettier.config.mjs +0 -23
- package/stories/Button.stories.tsx +0 -181
- package/stories/Card.stories.tsx +0 -22
- package/stories/Colors.stories.tsx +0 -57
- package/stories/ConfirmationModal.stories.tsx +0 -142
- package/stories/Container.stories.tsx +0 -105
- package/stories/DeckSwiper.stories.tsx +0 -43
- package/stories/DonutCountdown.stories.tsx +0 -134
- package/stories/FloatingContainer.stories.tsx +0 -139
- package/stories/Footer.stories.tsx +0 -65
- package/stories/Header.stories.tsx +0 -37
- package/stories/ImagePicker.stories.tsx +0 -14
- package/stories/ImageResponsive.stories.tsx +0 -18
- package/stories/ImageViewer.stories.tsx +0 -24
- package/stories/Input.stories.tsx +0 -119
- package/stories/InputPin.stories.tsx +0 -40
- package/stories/Menu.stories.tsx +0 -53
- package/stories/MenuItem.stories.tsx +0 -30
- package/stories/NavigationTitle.stories.tsx +0 -51
- package/stories/Notification.stories.tsx +0 -58
- package/stories/Select.stories.tsx +0 -270
- package/stories/SwipeablePanel.stories.tsx +0 -360
- package/stories/Switch.stories.tsx +0 -36
- package/stories/TakePicture.stories.tsx +0 -59
- package/stories/Text.stories.tsx +0 -61
- package/stories/Textarea.stories.tsx +0 -48
- package/stories/TimeOutButton.stories.tsx +0 -55
- package/stories/Toast.stories.tsx +0 -37
- package/stories/UploadDocument.stories.tsx +0 -179
- package/stories/VirtualKeyboard.stories.tsx +0 -14
- package/tsconfig.json +0 -21
- package/utilities/ScrollView.tsx +0 -19
- package/utilities/index.ts +0 -2
- 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
|
-
}
|
package/utilities/ScrollView.tsx
DELETED
|
@@ -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
|
-
);
|
package/utilities/index.ts
DELETED
package/utilities/utils.ts
DELETED
|
@@ -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
|
-
};
|