@holper/react-native-holper-storybook 0.6.101 → 0.7.0
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/.expo/README.md +8 -0
- package/.nvmrc +1 -0
- package/.prettierignore +5 -0
- package/.storybook/index.jsx +11 -0
- package/.storybook/main.js +8 -0
- package/.storybook/preview.jsx +51 -0
- package/.storybook/storybook.requires.js +43 -0
- package/.yarn/releases/yarn-4.5.0.cjs +925 -0
- package/.yarnrc.yml +3 -0
- package/App.jsx +29 -0
- package/LICENSE +21 -0
- package/{readme.md → README.md} +18 -19
- package/app.config.js +77 -0
- 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 +7 -0
- package/build.sh +11 -0
- package/components/Button/index.tsx +66 -0
- package/{lib/components/Button/style.js → components/Button/style.ts} +8 -7
- package/components/Card/index.tsx +33 -0
- package/{lib/components/Card/style.js → components/Card/style.ts} +5 -4
- package/{lib/components/ConfirmationModal/index.js → components/ConfirmationModal/index.tsx} +25 -79
- package/{lib/components/ConfirmationModal/style.js → components/ConfirmationModal/style.tsx} +14 -13
- package/{lib/components/Container/index.js → components/Container/index.tsx} +7 -28
- package/{lib/components/Container/style.js → components/Container/style.ts} +6 -5
- package/{lib/components/CustomChatView/index.js → components/CustomChatView/index.tsx} +22 -30
- package/{lib/components/CustomChatView/style.js → components/CustomChatView/style.ts} +1 -1
- package/components/DeckSwiper/index.tsx +90 -0
- package/{lib/components/DeckSwiper/style.js → components/DeckSwiper/style.ts} +13 -12
- package/components/DonutCountdown/index.tsx +86 -0
- package/components/DonutCountdown/style.ts +8 -0
- package/components/FloatingContainer/index.tsx +35 -0
- package/{lib/components/FloatingContainer/style.js → components/FloatingContainer/style.ts} +7 -6
- package/components/Footer/index.tsx +35 -0
- package/{lib/components/Footer/style.js → components/Footer/style.ts} +4 -3
- package/components/Header/index.tsx +21 -0
- package/{lib/components/Header/style.js → components/Header/style.ts} +4 -3
- package/{lib/components/ImagePicker/index.js → components/ImagePicker/index.tsx} +3 -12
- package/components/ImageResponsive/index.tsx +24 -0
- package/components/ImageResponsive/style.ts +9 -0
- package/components/ImageViewer/index.tsx +36 -0
- package/{lib/components/ImageViewer/style.js → components/ImageViewer/style.ts} +11 -10
- package/{lib/components/Input/index.js → components/Input/index.tsx} +6 -33
- package/{lib/components/Input/style.js → components/Input/style.ts} +7 -18
- package/{lib/components/InputPin/index.js → components/InputPin/index.tsx} +6 -13
- package/{lib/components/InputPin/style.js → components/InputPin/style.ts} +7 -6
- package/components/MenuItem/index.tsx +25 -0
- package/{lib/components/MenuItem/style.js → components/MenuItem/style.ts} +9 -7
- package/{lib/components/NavigationTitle/index.js → components/NavigationTitle/index.tsx} +9 -30
- package/{lib/components/NavigationTitle/style.js → components/NavigationTitle/style.ts} +12 -11
- package/components/Notification/index.tsx +44 -0
- package/{lib/components/Notification/style.js → components/Notification/style.ts} +13 -11
- package/components/PreventDoubleClick/index.tsx +28 -0
- package/components/Select/index.tsx +51 -0
- package/components/Select/style.ts +64 -0
- package/{lib/components/SwipeablePanel/index.js → components/SwipeablePanel/index.tsx} +58 -85
- package/{lib/components/SwipeablePanel/style.js → components/SwipeablePanel/style.ts} +15 -14
- package/components/Switch/index.tsx +30 -0
- package/components/TakePicture/confirmPictureModal.tsx +37 -0
- package/components/TakePicture/index.tsx +148 -0
- package/{lib/components/TakePicture/style.js → components/TakePicture/style.ts} +4 -4
- package/components/Text/index.tsx +33 -0
- package/{lib/components/Text/style.js → components/Text/style.ts} +4 -2
- package/{lib/components/Textarea/index.js → components/Textarea/index.tsx} +5 -24
- package/{lib/components/Textarea/style.js → components/Textarea/style.ts} +5 -4
- package/components/TimeOutButton/index.tsx +67 -0
- package/{lib/components/TimeOutButton/style.js → components/TimeOutButton/style.ts} +4 -3
- package/components/Toast/index.tsx +34 -0
- package/components/Toast/style.ts +12 -0
- package/{lib/components/UploadDocument/index.js → components/UploadDocument/index.tsx} +49 -105
- package/{lib/components/UploadDocument/style.js → components/UploadDocument/style.ts} +16 -15
- package/components/VirtualKeyboard/index.tsx +75 -0
- package/{lib/components/VirtualKeyboard/style.js → components/VirtualKeyboard/style.ts} +9 -8
- package/components/index.ts +29 -0
- package/{lib/configs/constants.js → configs/constants.ts} +50 -48
- package/configs/types.ts +326 -0
- package/eas.json +27 -0
- package/eslint.config.mjs +205 -0
- package/hooks/index.ts +2 -0
- package/{lib/hooks/useDebounce.js → hooks/useDebounce.tsx} +6 -4
- package/hooks/useLoadFonts.tsx +13 -0
- package/index.js +3 -2
- package/lib/components/Button/index.tsx +66 -0
- package/lib/components/Button/style.ts +111 -0
- package/lib/components/Card/index.tsx +33 -0
- package/lib/components/Card/style.ts +34 -0
- package/lib/components/ConfirmationModal/index.tsx +104 -0
- package/lib/components/ConfirmationModal/style.tsx +53 -0
- package/lib/components/Container/index.tsx +33 -0
- package/lib/components/Container/style.ts +13 -0
- package/lib/components/CustomChatView/index.tsx +65 -0
- package/lib/components/CustomChatView/style.ts +10 -0
- package/lib/components/DeckSwiper/index.tsx +90 -0
- package/lib/components/DeckSwiper/style.ts +59 -0
- package/lib/components/DonutCountdown/index.tsx +86 -0
- package/lib/components/DonutCountdown/style.ts +8 -0
- package/lib/components/FloatingContainer/index.tsx +35 -0
- package/lib/components/FloatingContainer/style.ts +25 -0
- package/lib/components/Footer/index.tsx +35 -0
- package/lib/components/Footer/style.ts +40 -0
- package/lib/components/Header/index.tsx +21 -0
- package/lib/components/Header/style.ts +34 -0
- package/lib/components/ImagePicker/index.tsx +18 -0
- package/lib/components/ImageResponsive/index.tsx +24 -0
- package/lib/components/ImageResponsive/style.ts +9 -0
- package/lib/components/ImageViewer/index.tsx +36 -0
- package/lib/components/ImageViewer/style.ts +38 -0
- package/lib/components/Input/index.tsx +62 -0
- package/lib/components/Input/style.ts +91 -0
- package/lib/components/InputPin/index.tsx +21 -0
- package/lib/components/InputPin/style.ts +22 -0
- package/lib/components/MenuItem/index.tsx +25 -0
- package/lib/components/MenuItem/style.ts +44 -0
- package/lib/components/NavigationTitle/index.tsx +53 -0
- package/lib/components/NavigationTitle/style.ts +49 -0
- package/lib/components/Notification/index.tsx +44 -0
- package/lib/components/Notification/style.ts +50 -0
- package/lib/components/PreventDoubleClick/index.tsx +28 -0
- package/lib/components/Select/index.tsx +51 -0
- package/lib/components/Select/style.ts +64 -0
- package/lib/components/SwipeablePanel/index.tsx +208 -0
- package/lib/components/SwipeablePanel/style.ts +81 -0
- package/lib/components/Switch/index.tsx +30 -0
- package/lib/components/TakePicture/confirmPictureModal.tsx +37 -0
- package/lib/components/TakePicture/index.tsx +148 -0
- package/lib/components/TakePicture/style.ts +95 -0
- package/lib/components/Text/index.tsx +33 -0
- package/lib/components/Text/style.ts +101 -0
- package/lib/components/Textarea/index.tsx +26 -0
- package/lib/components/Textarea/style.ts +38 -0
- package/lib/components/TimeOutButton/index.tsx +67 -0
- package/lib/components/TimeOutButton/style.ts +42 -0
- package/lib/components/Toast/index.tsx +34 -0
- package/lib/components/Toast/style.ts +12 -0
- package/lib/components/UploadDocument/index.tsx +179 -0
- package/lib/components/UploadDocument/style.ts +57 -0
- package/lib/components/VirtualKeyboard/index.tsx +75 -0
- package/lib/components/VirtualKeyboard/style.ts +25 -0
- package/lib/components/index.ts +29 -0
- package/lib/configs/constants.ts +273 -0
- package/lib/configs/types.ts +326 -0
- package/lib/hooks/index.ts +2 -0
- package/lib/hooks/useDebounce.tsx +24 -0
- package/lib/hooks/useLoadFonts.tsx +13 -0
- package/lib/index.js +3 -2
- package/metro.config.js +11 -0
- package/package.json +72 -63
- package/prettier.config.mjs +23 -0
- package/stories/Button.stories.tsx +181 -0
- package/stories/Card.stories.tsx +22 -0
- package/stories/Colors.stories.tsx +57 -0
- package/stories/ConfirmationModal.stories.tsx +142 -0
- package/stories/Container.stories.tsx +105 -0
- package/stories/DeckSwiper.stories.tsx +43 -0
- package/stories/DonutCountdown.stories.tsx +134 -0
- package/stories/FloatingContainer.stories.tsx +139 -0
- package/stories/Footer.stories.tsx +65 -0
- package/stories/Header.stories.tsx +37 -0
- package/stories/ImagePicker.stories.tsx +14 -0
- package/stories/ImageResponsive.stories.tsx +18 -0
- package/stories/ImageViewer.stories.tsx +24 -0
- package/stories/Input.stories.tsx +119 -0
- package/stories/InputPin.stories.tsx +40 -0
- package/stories/Menu.stories.tsx +53 -0
- package/stories/MenuItem.stories.tsx +30 -0
- package/stories/NavigationTitle.stories.tsx +51 -0
- package/stories/Notification.stories.tsx +58 -0
- package/stories/Select.stories.tsx +270 -0
- package/stories/SwipeablePanel.stories.tsx +360 -0
- package/stories/Switch.stories.tsx +36 -0
- package/stories/TakePicture.stories.tsx +59 -0
- package/stories/Text.stories.tsx +61 -0
- package/stories/Textarea.stories.tsx +48 -0
- package/stories/TimeOutButton.stories.tsx +55 -0
- package/stories/Toast.stories.tsx +37 -0
- package/stories/UploadDocument.stories.tsx +179 -0
- package/stories/VirtualKeyboard.stories.tsx +14 -0
- package/tsconfig.json +21 -0
- package/utilities/ScrollView.tsx +19 -0
- package/utilities/index.ts +2 -0
- package/utilities/utils.ts +29 -0
- package/lib/components/Button/index.js +0 -104
- package/lib/components/Card/index.js +0 -49
- package/lib/components/DeckSwiper/index.js +0 -118
- package/lib/components/FlashMessage/index.js +0 -81
- package/lib/components/FloatingContainer/index.js +0 -69
- package/lib/components/Footer/index.js +0 -61
- package/lib/components/Header/index.js +0 -45
- package/lib/components/ImageResponsive/index.js +0 -39
- package/lib/components/ImageResponsive/style.js +0 -7
- package/lib/components/ImageViewer/index.js +0 -62
- package/lib/components/MenuItem/index.js +0 -44
- package/lib/components/Notification/index.js +0 -80
- package/lib/components/PreventDoubleClick/index.js +0 -21
- package/lib/components/Select/index.js +0 -89
- package/lib/components/Select/style.js +0 -81
- package/lib/components/Switch/index.js +0 -57
- package/lib/components/TakePicture/confirmPictureModal.js +0 -64
- package/lib/components/TakePicture/index.js +0 -198
- package/lib/components/Text/index.js +0 -75
- package/lib/components/TimeOutButton/index.js +0 -104
- package/lib/components/VirtualKeyboard/index.js +0 -86
- package/lib/components/index.js +0 -28
- package/lib/configs/loadFonts.js +0 -11
- package/lib/hooks/index.js +0 -1
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
export const Colors = {
|
|
2
|
+
// Blacks and Whites
|
|
3
|
+
darkgray: '#2E3640',
|
|
4
|
+
dimgray: '#CFCFCF',
|
|
5
|
+
gray: '#D0D0D0',
|
|
6
|
+
transparent: 'transparent',
|
|
7
|
+
white: '#FFFFFF',
|
|
8
|
+
whiteice: '#E7EAEE',
|
|
9
|
+
whitepearl: '#F7F8F9',
|
|
10
|
+
// Greens
|
|
11
|
+
darkgreen: '#008A2E',
|
|
12
|
+
green: '#3FE384',
|
|
13
|
+
lightergreen: '#F5FEFA',
|
|
14
|
+
lightgreen: '#64FFA5',
|
|
15
|
+
midgreen: '#3FE39E',
|
|
16
|
+
// Blues
|
|
17
|
+
attentionBlue: '#dbf0fe',
|
|
18
|
+
blue: '#2A539C',
|
|
19
|
+
brightblue: '#00D8FF',
|
|
20
|
+
darkblue: '#515C6F',
|
|
21
|
+
electricblue: '#3FA5F8',
|
|
22
|
+
lightblue: '#EFF9FF',
|
|
23
|
+
mediumblue: '#F2F7FE',
|
|
24
|
+
midblue: '#727C8E',
|
|
25
|
+
// Violet
|
|
26
|
+
brightviolet: '#9980FA',
|
|
27
|
+
lightviolet: '#FAF9FF',
|
|
28
|
+
placeboPurple: '#F0ECFE',
|
|
29
|
+
violet: '#300049',
|
|
30
|
+
// Reds
|
|
31
|
+
darkred: '#E60606',
|
|
32
|
+
lightred: '#FFC1C1',
|
|
33
|
+
red: '#FD4C4C',
|
|
34
|
+
// Yellow
|
|
35
|
+
darkyellow: '#FFBB87',
|
|
36
|
+
gold: '#D4AF37',
|
|
37
|
+
lightgold: '#ECDFAA',
|
|
38
|
+
lightyellow: '#FBFDE9',
|
|
39
|
+
yellow: '#FDD100',
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const borderRadius = 8;
|
|
43
|
+
|
|
44
|
+
export const ConstantsWS = Object.freeze({
|
|
45
|
+
CANCELED: 'CANCELED',
|
|
46
|
+
CANCELED_BY_PROFESSIONAL: 'CANCELED_BY_PROFESSIONAL',
|
|
47
|
+
CHAT: 'CHAT',
|
|
48
|
+
CLOSED: 'CLOSED',
|
|
49
|
+
HIRING: 'HIRING',
|
|
50
|
+
ISSUE: 'ISSUE',
|
|
51
|
+
MAP: 'MAP',
|
|
52
|
+
NOT_CONFIRMED: 'NOT_CONFIRMED',
|
|
53
|
+
NOT_STARTED: 'NOT_STARTED',
|
|
54
|
+
NOTIFICATION: 'NOTIFICATION',
|
|
55
|
+
POSTULATION: 'POSTULATION',
|
|
56
|
+
RECOMMENDATION: 'RECOMMENDATION',
|
|
57
|
+
USER: 'USER',
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const HiringStatus = Object.freeze({
|
|
61
|
+
ARRIVAL_CONFIRMED: 'arrivalConfirmed',
|
|
62
|
+
CANCELED: 'canceled',
|
|
63
|
+
DONE: 'done',
|
|
64
|
+
IN_PROGRESS: 'inProgress',
|
|
65
|
+
ON_THE_WAY: 'onTheWay',
|
|
66
|
+
PAYMENT: 'payment',
|
|
67
|
+
PAYMENT_ERROR: 'paymentError',
|
|
68
|
+
PENDING: 'pending',
|
|
69
|
+
UNPAID: 'unpaid',
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export const CouponStatus = Object.freeze({
|
|
73
|
+
DONE: 'DONE',
|
|
74
|
+
EXPIRED: 'expired',
|
|
75
|
+
IN_USE: 'inUse',
|
|
76
|
+
PENDING: 'pending',
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export const NotificationsTypes = Object.freeze({
|
|
80
|
+
/** New hiring is created */
|
|
81
|
+
NEW_HIRING: 'newHiring',
|
|
82
|
+
/** Professional accept immediate hiring */
|
|
83
|
+
HIRING_IMMEDIATE: 'hiringImmediate',
|
|
84
|
+
/** Professional accept scheduled hiring */
|
|
85
|
+
HIRING_ACCEPTED: 'hiringAccepted',
|
|
86
|
+
HIRING_ARRIVAL_CONFIRMED: 'hiringArrivalConfirmed',
|
|
87
|
+
HIRING_CANCELED: 'hiringCanceled',
|
|
88
|
+
HIRING_DELAY: 'hiringDelay',
|
|
89
|
+
HIRING_DELAY_ACCIDENT: 'hiringDelayAccident',
|
|
90
|
+
HIRING_DELAY_TRAFFIC: 'hiringDelayTraffic',
|
|
91
|
+
HIRING_DELAY_WORK: 'hiringDelayWork',
|
|
92
|
+
HIRING_DONE: 'hiringDone',
|
|
93
|
+
HIRING_EXTRA_TASK: 'hiringExtraTask',
|
|
94
|
+
HIRING_EXTRA_TASK_ACCEPTED: 'hiringExtraTaskAccepted',
|
|
95
|
+
HIRING_EXTRA_TASK_REJECTED: 'hiringExtraTaskRejected',
|
|
96
|
+
HIRING_IN_PROGRESS: 'hiringInProgress',
|
|
97
|
+
HIRING_ON_THE_WAY: 'hiringOnTheWay',
|
|
98
|
+
HIRING_PAYMENT_REJECTED: 'hiringPaymentRejected',
|
|
99
|
+
HIRING_RATING: 'hiringRating',
|
|
100
|
+
HIRING_SCHEDULED: 'hiringScheduled',
|
|
101
|
+
NEW_MESSAGE: 'newMessage',
|
|
102
|
+
/** Reminder for the client to open the door */
|
|
103
|
+
REMINDER_OPEN_DOOR: 'reminderOpenDoor',
|
|
104
|
+
/** Reminder for the professional to start the path */
|
|
105
|
+
REMINDER_START_PATH: 'reminderStartPath',
|
|
106
|
+
/** Reminder for the professional when the start time is passed */
|
|
107
|
+
REMINDER_DELAYED: 'reminderDelay',
|
|
108
|
+
/** Reminder for the professional when arrived to mark the arrival confirmed */
|
|
109
|
+
REMINDER_ARRIVED: 'reminderArrived',
|
|
110
|
+
/** Reminder for the professional to start the progress */
|
|
111
|
+
REMINDER_START_PROGRESS: 'reminderStartProgress',
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
export const MapStyle = [
|
|
115
|
+
{
|
|
116
|
+
elementType: 'geometry',
|
|
117
|
+
stylers: [
|
|
118
|
+
{
|
|
119
|
+
color: '#f5f5f5',
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
elementType: 'labels.icon',
|
|
125
|
+
stylers: [
|
|
126
|
+
{
|
|
127
|
+
visibility: 'off',
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
elementType: 'labels.text.fill',
|
|
133
|
+
stylers: [
|
|
134
|
+
{
|
|
135
|
+
color: '#616161',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
elementType: 'labels.text.stroke',
|
|
141
|
+
stylers: [
|
|
142
|
+
{
|
|
143
|
+
color: '#f5f5f5',
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
elementType: 'labels.text.fill',
|
|
149
|
+
featureType: 'administrative.land_parcel',
|
|
150
|
+
stylers: [
|
|
151
|
+
{
|
|
152
|
+
color: '#bdbdbd',
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
elementType: 'geometry',
|
|
158
|
+
featureType: 'poi',
|
|
159
|
+
stylers: [
|
|
160
|
+
{
|
|
161
|
+
color: '#eeeeee',
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
elementType: 'labels.text.fill',
|
|
167
|
+
featureType: 'poi',
|
|
168
|
+
stylers: [
|
|
169
|
+
{
|
|
170
|
+
color: '#757575',
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
elementType: 'geometry',
|
|
176
|
+
featureType: 'poi.park',
|
|
177
|
+
stylers: [
|
|
178
|
+
{
|
|
179
|
+
color: '#e5e5e5',
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
elementType: 'labels.text.fill',
|
|
185
|
+
featureType: 'poi.park',
|
|
186
|
+
stylers: [
|
|
187
|
+
{
|
|
188
|
+
color: '#9e9e9e',
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
elementType: 'geometry',
|
|
194
|
+
featureType: 'road',
|
|
195
|
+
stylers: [
|
|
196
|
+
{
|
|
197
|
+
color: '#ffffff',
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
elementType: 'labels.text.fill',
|
|
203
|
+
featureType: 'road.arterial',
|
|
204
|
+
stylers: [
|
|
205
|
+
{
|
|
206
|
+
color: '#757575',
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
elementType: 'geometry',
|
|
212
|
+
featureType: 'road.highway',
|
|
213
|
+
stylers: [
|
|
214
|
+
{
|
|
215
|
+
color: '#dadada',
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
elementType: 'labels.text.fill',
|
|
221
|
+
featureType: 'road.highway',
|
|
222
|
+
stylers: [
|
|
223
|
+
{
|
|
224
|
+
color: '#616161',
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
elementType: 'labels.text.fill',
|
|
230
|
+
featureType: 'road.local',
|
|
231
|
+
stylers: [
|
|
232
|
+
{
|
|
233
|
+
color: '#9e9e9e',
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
elementType: 'geometry',
|
|
239
|
+
featureType: 'transit.line',
|
|
240
|
+
stylers: [
|
|
241
|
+
{
|
|
242
|
+
color: '#e5e5e5',
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
elementType: 'geometry',
|
|
248
|
+
featureType: 'transit.station',
|
|
249
|
+
stylers: [
|
|
250
|
+
{
|
|
251
|
+
color: '#eeeeee',
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
elementType: 'geometry',
|
|
257
|
+
featureType: 'water',
|
|
258
|
+
stylers: [
|
|
259
|
+
{
|
|
260
|
+
color: '#c9c9c9',
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
elementType: 'labels.text.fill',
|
|
266
|
+
featureType: 'water',
|
|
267
|
+
stylers: [
|
|
268
|
+
{
|
|
269
|
+
color: '#9e9e9e',
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
];
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type {
|
|
4
|
+
ImageProps,
|
|
5
|
+
ImageSourcePropType,
|
|
6
|
+
SwitchProps as RNSwitchProps,
|
|
7
|
+
TextProps as RNTextProps,
|
|
8
|
+
StyleProp,
|
|
9
|
+
TextInputProps,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
|
|
12
|
+
export interface withPreventDoubleClickProps {
|
|
13
|
+
onPress?: VoidFunction;
|
|
14
|
+
[key: string]: any; // Allow additional props to be passed
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ButtonProps {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
bordered?: boolean;
|
|
22
|
+
noShadow?: boolean;
|
|
23
|
+
variant?:
|
|
24
|
+
| 'brightblue'
|
|
25
|
+
| 'brightviolet'
|
|
26
|
+
| 'darkyellow'
|
|
27
|
+
| 'dim'
|
|
28
|
+
| 'electricblue'
|
|
29
|
+
| 'error'
|
|
30
|
+
| 'inverted'
|
|
31
|
+
| 'light'
|
|
32
|
+
| 'lightgreen'
|
|
33
|
+
| 'primary'
|
|
34
|
+
| 'secondary';
|
|
35
|
+
size?: 'tiny' | 'small' | 'medium' | 'fit' | 'icon';
|
|
36
|
+
style?: StyleProp<any>;
|
|
37
|
+
onPress?: VoidFunction;
|
|
38
|
+
debounceDelay?: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface CardProps extends ButtonProps {
|
|
42
|
+
style?: StyleProp<any>;
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
isButton?: boolean;
|
|
45
|
+
noShadow?: boolean;
|
|
46
|
+
onPress?: VoidFunction;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ConfirmationModalProps {
|
|
50
|
+
visible?: boolean;
|
|
51
|
+
title?: string;
|
|
52
|
+
confirmText?: string;
|
|
53
|
+
cancelText?: string;
|
|
54
|
+
onCancel?: VoidFunction;
|
|
55
|
+
onConfirm?: VoidFunction;
|
|
56
|
+
onClose?: VoidFunction | null;
|
|
57
|
+
alertMode?: boolean;
|
|
58
|
+
closeButton?: boolean;
|
|
59
|
+
infoMode?: boolean;
|
|
60
|
+
inverted?: boolean;
|
|
61
|
+
isPrime?: boolean;
|
|
62
|
+
children: ReactNode | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface TextProps extends RNTextProps {
|
|
66
|
+
children: ReactNode;
|
|
67
|
+
variant?: 'default' | 'lowercase' | 'uppercase';
|
|
68
|
+
size?: 'tiny' | 'small' | 'medium' | 'large' | 'extra-large' | 'huge';
|
|
69
|
+
color?:
|
|
70
|
+
| 'brightblue'
|
|
71
|
+
| 'brightviolet'
|
|
72
|
+
| 'dark'
|
|
73
|
+
| 'darkyellow'
|
|
74
|
+
| 'electricblue'
|
|
75
|
+
| 'gold'
|
|
76
|
+
| 'green'
|
|
77
|
+
| 'light'
|
|
78
|
+
| 'lighter'
|
|
79
|
+
| 'lightgold'
|
|
80
|
+
| 'midgreen'
|
|
81
|
+
| 'red'
|
|
82
|
+
| 'violet'
|
|
83
|
+
| 'white'
|
|
84
|
+
| 'yellow';
|
|
85
|
+
weight?: 'regular' | 'bold' | 'semiBold';
|
|
86
|
+
align?: 'left' | 'center' | 'right' | 'justify';
|
|
87
|
+
style?: StyleProp<any>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface ContainerProps {
|
|
91
|
+
fullScreen?: boolean;
|
|
92
|
+
enableScroll?: boolean;
|
|
93
|
+
style?: StyleProp<any>;
|
|
94
|
+
scrollStyle?: StyleProp<any>;
|
|
95
|
+
children: ReactNode;
|
|
96
|
+
[key: string]: any; // Allow additional props to be passed
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface CustomChatViewProps {
|
|
100
|
+
currentMessage?: {
|
|
101
|
+
location?: {
|
|
102
|
+
latitude: number;
|
|
103
|
+
longitude: number;
|
|
104
|
+
latitudeDelta?: number;
|
|
105
|
+
longitudeDelta?: number;
|
|
106
|
+
};
|
|
107
|
+
user?: {
|
|
108
|
+
name: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
containerStyle?: StyleProp<any>;
|
|
112
|
+
mapViewStyle?: StyleProp<any>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface FloatingContainerProps {
|
|
116
|
+
useRefreshControl?: boolean;
|
|
117
|
+
onRefresh?: VoidFunction;
|
|
118
|
+
isRefreshing?: boolean;
|
|
119
|
+
children?: ReactNode;
|
|
120
|
+
floatingComponent?: ReactNode;
|
|
121
|
+
centered?: boolean;
|
|
122
|
+
floatingContainerStyle?: StyleProp<any>;
|
|
123
|
+
disableScroll?: boolean;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface FooterProps {
|
|
127
|
+
inverted?: boolean;
|
|
128
|
+
tabs: Array<{
|
|
129
|
+
onPress: VoidFunction;
|
|
130
|
+
text: string;
|
|
131
|
+
icon: string;
|
|
132
|
+
badge?: number;
|
|
133
|
+
}>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface HeaderProps {
|
|
137
|
+
inverted?: boolean;
|
|
138
|
+
logo: ImageSourcePropType | undefined;
|
|
139
|
+
right?: ReactNode;
|
|
140
|
+
onMenuPress?: VoidFunction;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface ImageResponsiveProps extends ImageProps {
|
|
144
|
+
source: ImageSourcePropType | undefined;
|
|
145
|
+
style?: StyleProp<any>;
|
|
146
|
+
avatar?: boolean;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface ImageViewerProps extends ImageResponsiveProps {
|
|
150
|
+
source: ImageSourcePropType | undefined;
|
|
151
|
+
style?: StyleProp<any>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface InputProps extends TextInputProps {
|
|
155
|
+
variant?: 'default' | 'completed' | 'error';
|
|
156
|
+
size?: 'fixed' | 'fit';
|
|
157
|
+
disabled?: boolean;
|
|
158
|
+
leftIcon?: ReactNode;
|
|
159
|
+
leftIconWide?: boolean;
|
|
160
|
+
showLabel?: boolean;
|
|
161
|
+
label?: string;
|
|
162
|
+
count?: boolean;
|
|
163
|
+
rightIcon?: ReactNode;
|
|
164
|
+
value?: string;
|
|
165
|
+
maxLength?: number;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface InputPinProps {
|
|
169
|
+
values?: Array<number | string>;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface MenuItemProps {
|
|
173
|
+
icon?: ReactNode;
|
|
174
|
+
text?: string | ReactNode;
|
|
175
|
+
last?: boolean;
|
|
176
|
+
disabled?: boolean;
|
|
177
|
+
onPress?: VoidFunction;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface NavigationTitleProps {
|
|
181
|
+
type?: 'close' | 'back';
|
|
182
|
+
title?: string | ReactNode;
|
|
183
|
+
noShadow?: boolean;
|
|
184
|
+
xlarge?: boolean;
|
|
185
|
+
blockNavigation?: boolean;
|
|
186
|
+
onPress?: VoidFunction;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface NotificationProps {
|
|
190
|
+
first?: boolean;
|
|
191
|
+
active?: boolean;
|
|
192
|
+
hideAvatar?: boolean;
|
|
193
|
+
avatar?: ImageSourcePropType | undefined;
|
|
194
|
+
title?: string;
|
|
195
|
+
description?: string;
|
|
196
|
+
date?: Dayjs | string;
|
|
197
|
+
onPress?: VoidFunction;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface SwitchProps extends RNSwitchProps {
|
|
201
|
+
value?: boolean;
|
|
202
|
+
size?: 'medium' | 'small';
|
|
203
|
+
onValueChange?: (value: boolean) => void;
|
|
204
|
+
disabled?: boolean;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface ConfirmPictureModalProps {
|
|
208
|
+
visible: boolean;
|
|
209
|
+
avatar?: boolean;
|
|
210
|
+
repeatPictureText: string;
|
|
211
|
+
usePictureText: string;
|
|
212
|
+
image?: ImageSourcePropType | undefined | null;
|
|
213
|
+
onRepeatPhoto: VoidFunction;
|
|
214
|
+
onUsePhoto: VoidFunction;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface TakePictureProps {
|
|
218
|
+
visible: boolean;
|
|
219
|
+
onClose: (image?: string) => void;
|
|
220
|
+
avatar?: boolean;
|
|
221
|
+
cameraErrorMessage: string;
|
|
222
|
+
requestPermissionsMessage: string;
|
|
223
|
+
processingPictureMessage: string;
|
|
224
|
+
repeatPictureText: string;
|
|
225
|
+
usePictureText: string;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface TextareaProps extends TextInputProps {
|
|
229
|
+
variant?: 'default' | 'completed' | 'error';
|
|
230
|
+
disabled?: boolean;
|
|
231
|
+
numberOfLines?: number;
|
|
232
|
+
fitToContainer?: boolean;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface TimeOutButtonProps {
|
|
236
|
+
children: ReactNode;
|
|
237
|
+
time?: number; // Time in milliseconds
|
|
238
|
+
warning?: boolean; // If true, shows a warning overlay
|
|
239
|
+
onPress?: VoidFunction; // Function to call when the button is pressed
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface UploadDocumentProps {
|
|
243
|
+
title?: string;
|
|
244
|
+
description?: string;
|
|
245
|
+
uploadButtonText?: string;
|
|
246
|
+
reUploadButtonText?: string;
|
|
247
|
+
completed?: boolean;
|
|
248
|
+
inverted?: boolean;
|
|
249
|
+
isAvatarPicker?: boolean;
|
|
250
|
+
icon?: ReactNode;
|
|
251
|
+
onSelectImage?: (image: string) => void;
|
|
252
|
+
file?: string;
|
|
253
|
+
onPermissionDenied?: VoidFunction;
|
|
254
|
+
mediaModal: {
|
|
255
|
+
title: string;
|
|
256
|
+
confirmText: string;
|
|
257
|
+
cancelText: string;
|
|
258
|
+
description: string;
|
|
259
|
+
};
|
|
260
|
+
takePicture: {
|
|
261
|
+
cameraErrorMessage: string;
|
|
262
|
+
requestPermissionsMessage: string;
|
|
263
|
+
processingPictureMessage: string;
|
|
264
|
+
repeatPictureText: string;
|
|
265
|
+
usePictureText: string;
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface VirtualKeyboardProps {
|
|
270
|
+
onPress: (value: string | number | null) => void;
|
|
271
|
+
hideBiometrics?: boolean;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface SelectProps {
|
|
275
|
+
variant?: 'default' | 'error' | 'completed';
|
|
276
|
+
placeholder: string;
|
|
277
|
+
disabled?: boolean;
|
|
278
|
+
fitToContainer?: boolean;
|
|
279
|
+
onValueChange?: (value: string) => void;
|
|
280
|
+
value?: string | number;
|
|
281
|
+
items?: Array<{
|
|
282
|
+
label: string;
|
|
283
|
+
value: string | number;
|
|
284
|
+
}>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export interface SwipeablePanelProps {
|
|
288
|
+
offset?: number;
|
|
289
|
+
maximized?: boolean;
|
|
290
|
+
lockPanel?: boolean;
|
|
291
|
+
autoMaximize?: boolean;
|
|
292
|
+
closeAfterSeconds?: number;
|
|
293
|
+
closeButton?: boolean;
|
|
294
|
+
avoidScroll?: boolean;
|
|
295
|
+
onClose?: VoidFunction;
|
|
296
|
+
children?: ReactNode;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export interface DonutCountdownProps {
|
|
300
|
+
bgColor?: string;
|
|
301
|
+
color?: string;
|
|
302
|
+
duration?: number;
|
|
303
|
+
onComplete?: VoidFunction;
|
|
304
|
+
radius?: number;
|
|
305
|
+
strokeWidth?: number;
|
|
306
|
+
textColor?: string;
|
|
307
|
+
textSize?: 'small' | 'medium' | 'large';
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export interface DeckSwiperProps {
|
|
311
|
+
data?: Array<{
|
|
312
|
+
image: ImageSourcePropType;
|
|
313
|
+
title: string;
|
|
314
|
+
description: string;
|
|
315
|
+
}>;
|
|
316
|
+
inverted?: boolean;
|
|
317
|
+
nextText?: string;
|
|
318
|
+
onChange?: (index: number) => void;
|
|
319
|
+
onFinish?: () => void;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export interface ToastMessageProps {
|
|
323
|
+
variant: 'success' | 'error';
|
|
324
|
+
message: string;
|
|
325
|
+
description?: string;
|
|
326
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
const useDebounce = (callback: () => void, delay: number | undefined) => {
|
|
4
|
+
const latestCallback = useRef<() => void>(null);
|
|
5
|
+
const latestTimeout = useRef<ReturnType<typeof setTimeout>>(null);
|
|
6
|
+
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
latestCallback.current = callback;
|
|
9
|
+
}, [callback]);
|
|
10
|
+
|
|
11
|
+
return () => {
|
|
12
|
+
if (latestTimeout.current) {
|
|
13
|
+
clearTimeout(latestTimeout.current);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
latestTimeout.current = setTimeout(() => {
|
|
17
|
+
if (latestCallback.current) {
|
|
18
|
+
latestCallback.current();
|
|
19
|
+
}
|
|
20
|
+
}, delay);
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default useDebounce;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useFonts } from 'expo-font';
|
|
2
|
+
|
|
3
|
+
const useLoadFonts = () => {
|
|
4
|
+
const [loaded, error] = useFonts({
|
|
5
|
+
poppins_bold: require('../assets/fonts/Poppins-Bold.ttf'),
|
|
6
|
+
poppins_regular: require('../assets/fonts/Poppins-Regular.ttf'),
|
|
7
|
+
poppins_semiBold: require('../assets/fonts/Poppins-SemiBold.ttf'),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
return { error, loaded };
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default useLoadFonts;
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export {asyncLoadFont} from './configs/loadFonts';
|
|
2
|
-
export {Colors, MapStyle, ConstantsWS, HiringStatus, CouponStatus, NotificationsTypes} from './configs/constants';
|
|
3
1
|
export * from './components';
|
|
2
|
+
export { Colors, ConstantsWS, CouponStatus, HiringStatus, MapStyle, NotificationsTypes } from './configs/constants';
|
|
3
|
+
export * from './configs/types';
|
|
4
|
+
export { useDebounce, useLoadFonts } from './hooks';
|
package/metro.config.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const withStorybook = require('@storybook/react-native/metro/withStorybook');
|
|
2
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const defaultConfig = getDefaultConfig(__dirname);
|
|
6
|
+
|
|
7
|
+
module.exports = withStorybook(defaultConfig, {
|
|
8
|
+
configPath: path.resolve(__dirname, './.storybook'),
|
|
9
|
+
enabled: true,
|
|
10
|
+
useJs: true,
|
|
11
|
+
});
|