@holper/react-native-holper-storybook 0.7.1 → 0.8.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.
Files changed (92) hide show
  1. package/index.js +2 -3
  2. package/lib/components/Button/index.js +104 -0
  3. package/lib/components/Button/{style.ts → style.js} +7 -8
  4. package/lib/components/Card/index.js +49 -0
  5. package/lib/components/Card/{style.ts → style.js} +4 -5
  6. package/lib/components/ConfirmationModal/{index.tsx → index.js} +79 -25
  7. package/lib/components/ConfirmationModal/{style.tsx → style.js} +13 -14
  8. package/lib/components/Container/{index.tsx → index.js} +28 -7
  9. package/lib/components/Container/{style.ts → style.js} +5 -6
  10. package/lib/components/CustomChatView/{index.tsx → index.js} +30 -22
  11. package/lib/components/CustomChatView/{style.ts → style.js} +1 -1
  12. package/lib/components/DeckSwiper/index.js +118 -0
  13. package/lib/components/DeckSwiper/{style.ts → style.js} +12 -13
  14. package/lib/components/FlashMessage/index.js +83 -0
  15. package/lib/components/FloatingContainer/index.js +69 -0
  16. package/lib/components/FloatingContainer/{style.ts → style.js} +6 -7
  17. package/lib/components/Footer/index.js +61 -0
  18. package/lib/components/Footer/{style.ts → style.js} +3 -4
  19. package/lib/components/Header/index.js +45 -0
  20. package/lib/components/Header/{style.ts → style.js} +3 -4
  21. package/lib/components/ImagePicker/{index.tsx → index.js} +12 -3
  22. package/lib/components/ImageResponsive/index.js +39 -0
  23. package/lib/components/ImageResponsive/style.js +7 -0
  24. package/lib/components/ImageViewer/index.js +62 -0
  25. package/lib/components/ImageViewer/{style.ts → style.js} +3 -4
  26. package/lib/components/Input/{index.tsx → index.js} +33 -6
  27. package/lib/components/Input/{style.ts → style.js} +18 -7
  28. package/lib/components/InputPin/{index.tsx → index.js} +13 -6
  29. package/lib/components/InputPin/{style.ts → style.js} +6 -7
  30. package/lib/components/MenuItem/index.js +44 -0
  31. package/lib/components/MenuItem/{style.ts → style.js} +7 -9
  32. package/lib/components/NavigationTitle/{index.tsx → index.js} +30 -9
  33. package/lib/components/NavigationTitle/{style.ts → style.js} +11 -12
  34. package/lib/components/Notification/index.js +80 -0
  35. package/lib/components/Notification/{style.ts → style.js} +11 -13
  36. package/lib/components/PreventDoubleClick/index.js +21 -0
  37. package/lib/components/Select/index.js +89 -0
  38. package/lib/components/Select/style.js +81 -0
  39. package/lib/components/SwipeablePanel/{index.tsx → index.js} +85 -58
  40. package/lib/components/SwipeablePanel/{style.ts → style.js} +14 -15
  41. package/lib/components/Switch/index.js +57 -0
  42. package/lib/components/TakePicture/{confirmPictureModal.tsx → confirmPictureModal.js} +33 -9
  43. package/lib/components/TakePicture/index.js +198 -0
  44. package/lib/components/TakePicture/{style.ts → style.js} +4 -4
  45. package/lib/components/Text/index.js +75 -0
  46. package/lib/components/Text/{style.ts → style.js} +2 -4
  47. package/lib/components/Textarea/{index.tsx → index.js} +24 -5
  48. package/lib/components/Textarea/{style.ts → style.js} +4 -5
  49. package/lib/components/TimeOutButton/index.js +104 -0
  50. package/lib/components/TimeOutButton/{style.ts → style.js} +3 -4
  51. package/lib/components/UploadDocument/index.js +222 -0
  52. package/lib/components/UploadDocument/{style.ts → style.js} +15 -16
  53. package/lib/components/VirtualKeyboard/index.js +86 -0
  54. package/lib/components/VirtualKeyboard/{style.ts → style.js} +8 -9
  55. package/lib/components/index.js +28 -0
  56. package/lib/configs/constants.js +276 -0
  57. package/lib/configs/loadFonts.js +11 -0
  58. package/lib/hooks/index.js +1 -0
  59. package/lib/hooks/{useDebounce.tsx → useDebounce.js} +4 -6
  60. package/lib/index.js +2 -3
  61. package/package.json +58 -72
  62. package/{README.md → readme.md} +20 -19
  63. package/LICENSE +0 -21
  64. package/lib/components/Button/index.tsx +0 -66
  65. package/lib/components/Card/index.tsx +0 -33
  66. package/lib/components/DeckSwiper/index.tsx +0 -90
  67. package/lib/components/DonutCountdown/index.tsx +0 -86
  68. package/lib/components/DonutCountdown/style.ts +0 -8
  69. package/lib/components/FloatingContainer/index.tsx +0 -35
  70. package/lib/components/Footer/index.tsx +0 -35
  71. package/lib/components/Header/index.tsx +0 -21
  72. package/lib/components/ImageResponsive/index.tsx +0 -24
  73. package/lib/components/ImageResponsive/style.ts +0 -9
  74. package/lib/components/ImageViewer/index.tsx +0 -36
  75. package/lib/components/MenuItem/index.tsx +0 -25
  76. package/lib/components/Notification/index.tsx +0 -44
  77. package/lib/components/PreventDoubleClick/index.tsx +0 -28
  78. package/lib/components/Select/index.tsx +0 -51
  79. package/lib/components/Select/style.ts +0 -64
  80. package/lib/components/Switch/index.tsx +0 -30
  81. package/lib/components/TakePicture/index.tsx +0 -148
  82. package/lib/components/Text/index.tsx +0 -33
  83. package/lib/components/TimeOutButton/index.tsx +0 -67
  84. package/lib/components/Toast/index.tsx +0 -34
  85. package/lib/components/Toast/style.ts +0 -12
  86. package/lib/components/UploadDocument/index.tsx +0 -179
  87. package/lib/components/VirtualKeyboard/index.tsx +0 -75
  88. package/lib/components/index.ts +0 -29
  89. package/lib/configs/constants.ts +0 -273
  90. package/lib/configs/types.ts +0 -326
  91. package/lib/hooks/index.ts +0 -2
  92. package/lib/hooks/useLoadFonts.tsx +0 -13
@@ -1,25 +1,24 @@
1
- import { Dimensions, StyleSheet } from 'react-native';
2
-
1
+ import { Dimensions } from 'react-native';
3
2
  import { Colors } from '../../configs/constants';
4
3
 
5
4
  const { width } = Dimensions.get('window');
6
5
 
7
- export default StyleSheet.create({
6
+ export default {
8
7
  container: {
9
8
  width,
10
9
  flexDirection: 'row',
11
10
  flexWrap: 'wrap',
12
- justifyContent: 'center',
11
+ justifyContent: 'center'
13
12
  },
14
13
  button: {
15
14
  width: width / 3.3,
16
15
  height: width / 5,
17
16
  justifyContent: 'center',
18
- alignItems: 'center',
17
+ alignItems: 'center'
19
18
  },
20
19
  icon: {
21
20
  color: Colors.darkblue,
22
- opacity: 0.6,
23
- fontSize: 34,
24
- },
25
- });
21
+ opacity: .6,
22
+ fontSize: 34
23
+ }
24
+ };
@@ -0,0 +1,28 @@
1
+ export { default as Button } from "./Button";
2
+ export { default as Card } from "./Card";
3
+ export { default as ConfirmationModal } from "./ConfirmationModal";
4
+ export { default as Container } from "./Container";
5
+ export { default as DeckSwiper } from "./DeckSwiper";
6
+ export { default as FlashMessage, sendMessage } from "./FlashMessage";
7
+ export { default as FloatingContainer } from "./FloatingContainer";
8
+ export { default as Footer } from "./Footer";
9
+ export { default as Header } from "./Header";
10
+ export { default as ImagePicker } from "./ImagePicker";
11
+ export { default as ImageResponsive } from "./ImageResponsive";
12
+ export { default as ImageViewer } from "./ImageViewer";
13
+ export { default as Input } from "./Input";
14
+ export { default as InputPin } from "./InputPin";
15
+ export { default as MenuItem } from "./MenuItem";
16
+ export { default as NavigationTitle } from "./NavigationTitle";
17
+ export { default as Notification } from "./Notification";
18
+ export { default as Select } from "./Select";
19
+ export { default as SwipeablePanel } from "./SwipeablePanel";
20
+ export { default as Switch } from "./Switch";
21
+ export { default as TakePicture } from "./TakePicture";
22
+ export { default as Text } from "./Text";
23
+ export { default as Textarea } from "./Textarea";
24
+ export { default as TimeOutButton } from "./TimeOutButton";
25
+ export { default as UploadDocument } from "./UploadDocument";
26
+ export { default as VirtualKeyboard } from "./VirtualKeyboard";
27
+ export { default as withPreventDoubleClick } from "./PreventDoubleClick";
28
+ export { default as CustomChatView } from "./CustomChatView";
@@ -0,0 +1,276 @@
1
+ export const Colors = {
2
+ // Blacks and Whites
3
+ transparent: "transparent",
4
+ white: "#FFFFFF",
5
+ gray: "#D0D0D0",
6
+ dimgray: "#CFCFCF",
7
+ darkgray: "#2E3640",
8
+ whiteice: "#E7EAEE",
9
+ whitepearl: "#F7F8F9",
10
+ // Greens
11
+ lightergreen: "#F5FEFA",
12
+ lightgreen: "#64FFA5",
13
+ midgreen: "#3FE39E",
14
+ green: "#3FE384",
15
+ darkgreen: "#007A55",
16
+ darkergreen: "#004F3B",
17
+ // Blues
18
+ lightblue: "#EFF9FF",
19
+ electricblue: "#3FA5F8",
20
+ midblue: "#727C8E",
21
+ darkblue: "#515C6F",
22
+ brightblue: "#00D8FF",
23
+ mediumblue: "#F2F7FE",
24
+ blue: "#2A539C",
25
+ attentionBlue: "#dbf0fe",
26
+ // Violet
27
+ lightviolet: "#FAF9FF",
28
+ brightviolet: "#9980FA",
29
+ violet: "#300049",
30
+ placeboPurple: "#F0ECFE",
31
+ // Reds
32
+ lightertred: "#FFCCD3",
33
+ lightred: "#FFC1C1",
34
+ red: "#FD4C4C",
35
+ darkred: "#C70036",
36
+ darkerred: "#8B0836",
37
+ // Yellow
38
+ lightyellow: "#FBFDE9",
39
+ yellow: "#FDD100",
40
+ darkyellow: "#FFBB87",
41
+ lightgold: "#ECDFAA",
42
+ gold: "#D4AF37",
43
+ };
44
+
45
+ export const borderRadius = 8;
46
+
47
+ export const ConstantsWS = Object.freeze({
48
+ HIRING: "HIRING",
49
+ CANCELED: "CANCELED",
50
+ CANCELED_BY_PROFESSIONAL: "CANCELED_BY_PROFESSIONAL",
51
+ NOT_CONFIRMED: "NOT_CONFIRMED",
52
+ NOT_STARTED: "NOT_STARTED",
53
+ POSTULATION: "POSTULATION",
54
+ NOTIFICATION: "NOTIFICATION",
55
+ CHAT: "CHAT",
56
+ MAP: "MAP",
57
+ RECOMMENDATION: "RECOMMENDATION",
58
+ ISSUE: "ISSUE",
59
+ CLOSED: "CLOSED",
60
+ USER: "USER",
61
+ });
62
+
63
+ export const HiringStatus = Object.freeze({
64
+ PENDING: "pending",
65
+ ON_THE_WAY: "onTheWay",
66
+ ARRIVAL_CONFIRMED: "arrivalConfirmed",
67
+ IN_PROGRESS: "inProgress",
68
+ PAYMENT: "payment",
69
+ PAYMENT_ERROR: "paymentError",
70
+ DONE: "done",
71
+ CANCELED: "canceled",
72
+ UNPAID: "unpaid",
73
+ });
74
+
75
+ export const CouponStatus = Object.freeze({
76
+ PENDING: "pending",
77
+ IN_USE: "inUse",
78
+ EXPIRED: "expired",
79
+ DONE: "DONE",
80
+ });
81
+
82
+ export const NotificationsTypes = Object.freeze({
83
+ /** New hiring is created */
84
+ NEW_HIRING: "newHiring",
85
+ /** Professional accept immediate hiring */
86
+ HIRING_IMMEDIATE: "hiringImmediate",
87
+ /** Professional accept scheduled hiring */
88
+ HIRING_SCHEDULED: "hiringScheduled",
89
+ HIRING_ACCEPTED: "hiringAccepted",
90
+ HIRING_CANCELED: "hiringCanceled",
91
+ HIRING_ON_THE_WAY: "hiringOnTheWay",
92
+ HIRING_ARRIVAL_CONFIRMED: "hiringArrivalConfirmed",
93
+ HIRING_IN_PROGRESS: "hiringInProgress",
94
+ HIRING_DONE: "hiringDone",
95
+ HIRING_DELAY: "hiringDelay",
96
+ HIRING_DELAY_TRAFFIC: "hiringDelayTraffic",
97
+ HIRING_DELAY_ACCIDENT: "hiringDelayAccident",
98
+ HIRING_DELAY_WORK: "hiringDelayWork",
99
+ HIRING_EXTRA_TASK: "hiringExtraTask",
100
+ HIRING_EXTRA_TASK_ACCEPTED: "hiringExtraTaskAccepted",
101
+ HIRING_EXTRA_TASK_REJECTED: "hiringExtraTaskRejected",
102
+ HIRING_PAYMENT_REJECTED: "hiringPaymentRejected",
103
+ HIRING_RATING: "hiringRating",
104
+ NEW_MESSAGE: "newMessage",
105
+ /** Reminder for the client to open the door */
106
+ REMINDER_OPEN_DOOR: "reminderOpenDoor",
107
+ /** Reminder for the professional to start the path */
108
+ REMINDER_START_PATH: "reminderStartPath",
109
+ /** Reminder for the professional when the start time is passed */
110
+ REMINDER_DELAYED: "reminderDelay",
111
+ /** Reminder for the professional when arrived to mark the arrival confirmed */
112
+ REMINDER_ARRIVED: "reminderArrived",
113
+ /** Reminder for the professional to start the progress */
114
+ REMINDER_START_PROGRESS: "reminderStartProgress",
115
+ });
116
+
117
+ export const MapStyle = [
118
+ {
119
+ elementType: "geometry",
120
+ stylers: [
121
+ {
122
+ color: "#f5f5f5",
123
+ },
124
+ ],
125
+ },
126
+ {
127
+ elementType: "labels.icon",
128
+ stylers: [
129
+ {
130
+ visibility: "off",
131
+ },
132
+ ],
133
+ },
134
+ {
135
+ elementType: "labels.text.fill",
136
+ stylers: [
137
+ {
138
+ color: "#616161",
139
+ },
140
+ ],
141
+ },
142
+ {
143
+ elementType: "labels.text.stroke",
144
+ stylers: [
145
+ {
146
+ color: "#f5f5f5",
147
+ },
148
+ ],
149
+ },
150
+ {
151
+ featureType: "administrative.land_parcel",
152
+ elementType: "labels.text.fill",
153
+ stylers: [
154
+ {
155
+ color: "#bdbdbd",
156
+ },
157
+ ],
158
+ },
159
+ {
160
+ featureType: "poi",
161
+ elementType: "geometry",
162
+ stylers: [
163
+ {
164
+ color: "#eeeeee",
165
+ },
166
+ ],
167
+ },
168
+ {
169
+ featureType: "poi",
170
+ elementType: "labels.text.fill",
171
+ stylers: [
172
+ {
173
+ color: "#757575",
174
+ },
175
+ ],
176
+ },
177
+ {
178
+ featureType: "poi.park",
179
+ elementType: "geometry",
180
+ stylers: [
181
+ {
182
+ color: "#e5e5e5",
183
+ },
184
+ ],
185
+ },
186
+ {
187
+ featureType: "poi.park",
188
+ elementType: "labels.text.fill",
189
+ stylers: [
190
+ {
191
+ color: "#9e9e9e",
192
+ },
193
+ ],
194
+ },
195
+ {
196
+ featureType: "road",
197
+ elementType: "geometry",
198
+ stylers: [
199
+ {
200
+ color: "#ffffff",
201
+ },
202
+ ],
203
+ },
204
+ {
205
+ featureType: "road.arterial",
206
+ elementType: "labels.text.fill",
207
+ stylers: [
208
+ {
209
+ color: "#757575",
210
+ },
211
+ ],
212
+ },
213
+ {
214
+ featureType: "road.highway",
215
+ elementType: "geometry",
216
+ stylers: [
217
+ {
218
+ color: "#dadada",
219
+ },
220
+ ],
221
+ },
222
+ {
223
+ featureType: "road.highway",
224
+ elementType: "labels.text.fill",
225
+ stylers: [
226
+ {
227
+ color: "#616161",
228
+ },
229
+ ],
230
+ },
231
+ {
232
+ featureType: "road.local",
233
+ elementType: "labels.text.fill",
234
+ stylers: [
235
+ {
236
+ color: "#9e9e9e",
237
+ },
238
+ ],
239
+ },
240
+ {
241
+ featureType: "transit.line",
242
+ elementType: "geometry",
243
+ stylers: [
244
+ {
245
+ color: "#e5e5e5",
246
+ },
247
+ ],
248
+ },
249
+ {
250
+ featureType: "transit.station",
251
+ elementType: "geometry",
252
+ stylers: [
253
+ {
254
+ color: "#eeeeee",
255
+ },
256
+ ],
257
+ },
258
+ {
259
+ featureType: "water",
260
+ elementType: "geometry",
261
+ stylers: [
262
+ {
263
+ color: "#c9c9c9",
264
+ },
265
+ ],
266
+ },
267
+ {
268
+ featureType: "water",
269
+ elementType: "labels.text.fill",
270
+ stylers: [
271
+ {
272
+ color: "#9e9e9e",
273
+ },
274
+ ],
275
+ },
276
+ ];
@@ -0,0 +1,11 @@
1
+ import * as Font from 'expo-font';
2
+
3
+ export const asyncLoadFont = Font.loadAsync({
4
+ poppins_bold: require('../assets/fonts/Poppins-Bold.ttf'),
5
+ poppins_regular: require('../assets/fonts/Poppins-Regular.ttf'),
6
+ poppins_semiBold: require('../assets/fonts/Poppins-SemiBold.ttf')
7
+ });
8
+
9
+ export const loadFonts = [
10
+ asyncLoadFont
11
+ ];
@@ -0,0 +1 @@
1
+ export { default as useDebounce } from './useDebounce';
@@ -1,8 +1,8 @@
1
1
  import { useEffect, useRef } from 'react';
2
2
 
3
- const useDebounce = (callback: () => void, delay: number | undefined) => {
4
- const latestCallback = useRef<() => void>(null);
5
- const latestTimeout = useRef<ReturnType<typeof setTimeout>>(null);
3
+ const useDebounce = (callback, delay) => {
4
+ const latestCallback = useRef();
5
+ const latestTimeout = useRef();
6
6
 
7
7
  useEffect(() => {
8
8
  latestCallback.current = callback;
@@ -14,9 +14,7 @@ const useDebounce = (callback: () => void, delay: number | undefined) => {
14
14
  }
15
15
 
16
16
  latestTimeout.current = setTimeout(() => {
17
- if (latestCallback.current) {
18
- latestCallback.current();
19
- }
17
+ latestCallback.current();
20
18
  }, delay);
21
19
  };
22
20
  };
package/lib/index.js CHANGED
@@ -1,4 +1,3 @@
1
+ export {asyncLoadFont} from './configs/loadFonts';
2
+ export {Colors, MapStyle, ConstantsWS, HiringStatus, CouponStatus, NotificationsTypes} from './configs/constants';
1
3
  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/package.json CHANGED
@@ -1,104 +1,90 @@
1
1
  {
2
- "version": "0.7.1",
3
2
  "main": "lib/index.js",
4
3
  "name": "@holper/react-native-holper-storybook",
5
4
  "description": "A component library for Holper projects",
5
+ "version": "0.8.0",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "lib",
9
9
  "index.js"
10
10
  ],
11
- "packageManager": "yarn@4.5.0",
12
- "homepage": "https://github.com/holperapp/holper-storybook",
11
+ "homepage": "https://bitbucket.org/d4fitwearapps/holper-storybook",
13
12
  "repository": {
14
13
  "type": "git",
15
- "url": "https://github.com/holperapp/holper-storybook.git"
14
+ "url": "https://bitbucket.org/d4fitwearapps/holper-storybook.git"
16
15
  },
17
16
  "bugs": {
18
- "url": "https://github.com/holperapp/holper-storybook/issues",
17
+ "url": "https://bitbucket.org/d4fitwearapps/holper-storybook/issues",
19
18
  "email": "d4fitwear@gmail.com"
20
19
  },
21
20
  "scripts": {
22
- "start": "expo start",
21
+ "start": "npx expo start",
23
22
  "build-dev": "eas build --profile development",
23
+ "build-preview": "eas build --profile preview",
24
+ "eject": "expo eject",
24
25
  "clear": "watchman watch-del-all",
25
- "android": "expo start --android",
26
- "ios": "expo start --ios",
27
- "web": "expo start --web",
28
- "lint:debug": "TIMING=all eslint -c ./eslint.config.mjs --debug",
29
- "lint:fix": "eslint -c ./eslint.config.mjs --fix",
30
- "lint": "eslint -c ./eslint.config.mjs",
31
- "format:check": "prettier . --check --config prettier.config.mjs",
32
- "format": "prettier . --write --config prettier.config.mjs",
33
- "storybook:android": "cross-env STORYBOOK_ENABLED='true' expo start --android",
34
- "storybook:generate": "sb-rn-get-stories -js",
35
- "storybook:ios": "cross-env STORYBOOK_ENABLED='true' expo start --ios",
36
- "storybook:publish": "./build.sh",
37
- "storybook:start": "cross-env STORYBOOK_ENABLED='true' expo start",
38
- "type:check": "tsc --extendedDiagnostics",
39
- "verify:fix": "yarn lint:fix && yarn format && yarn type:check",
40
- "verify": "yarn lint && yarn format:check && yarn type:check"
26
+ "storybook": "start-storybook -p 7007",
27
+ "storybook-publish": "./build.sh"
41
28
  },
42
29
  "dependencies": {
43
- "@expo/metro-runtime": "~5.0.4",
44
- "@expo/vector-icons": "^14.1.0",
45
- "@react-native-picker/picker": "2.11.1",
46
- "@types/react": "~19.0.10",
47
- "dayjs": "^1.11.13",
48
- "expo": "^53.0.19",
49
- "expo-camera": "~16.1.10",
50
- "expo-constants": "~17.1.7",
51
- "expo-dev-client": "~5.2.4",
30
+ "@react-native-async-storage/async-storage": "2.1.2",
31
+ "@react-native-community/datetimepicker": "8.4.1",
32
+ "@react-native-community/slider": "4.5.6",
33
+ "expo": "~53.0.24",
34
+ "expo-asset": "~11.1.7",
35
+ "expo-camera": "~16.1.11",
52
36
  "expo-font": "~13.3.2",
37
+ "expo-image": "~2.4.1",
53
38
  "expo-image-manipulator": "~13.1.7",
54
39
  "expo-image-picker": "~16.1.4",
55
- "expo-media-library": "~17.1.7",
56
- "expo-splash-screen": "~0.30.10",
57
- "lodash": "^4.17.21",
40
+ "expo-status-bar": "~2.2.3",
41
+ "moment": "^2.30.1",
42
+ "prop-types": "^15.8.1",
58
43
  "react": "19.0.0",
59
44
  "react-dom": "19.0.0",
60
- "react-native": "0.79.5",
61
- "react-native-deck-swiper": "^2.0.18",
45
+ "react-native": "0.79.6",
46
+ "react-native-countdown-circle-timer": "^3.2.1",
47
+ "react-native-deck-swiper": "^2.0.16",
48
+ "react-native-dropdown-picker": "^5.4.6",
49
+ "react-native-flash-message": "^0.4.2",
62
50
  "react-native-maps": "1.20.1",
63
- "react-native-picker-select": "^9.3.1",
64
- "react-native-screens": "~4.11.1",
65
- "react-native-web": "^0.20.0",
66
- "sonner-native": "^0.21.0"
51
+ "react-native-maps-directions": "1.9.0",
52
+ "react-native-safe-area-context": "5.4.0",
53
+ "react-native-status-bar-height": "^2.6.0",
54
+ "react-native-svg": "15.11.2",
55
+ "react-native-vector-icons": "^10.0.3",
56
+ "react-native-web": "^0.20.0"
67
57
  },
68
58
  "devDependencies": {
69
- "@babel/core": "^7.26.0",
70
- "@babel/plugin-transform-class-static-block": "^7.27.1",
71
- "@eslint/js": "^9.31.0",
72
- "@gorhom/bottom-sheet": "^4.6.4",
73
- "@react-native-async-storage/async-storage": "2.1.2",
74
- "@react-native-community/datetimepicker": "8.4.1",
75
- "@react-native-community/slider": "4.5.6",
76
- "@storybook/addon-ondevice-actions": "^8.3.5",
77
- "@storybook/addon-ondevice-controls": "^8.3.5",
78
- "@storybook/react-native": "^8.3.5",
79
- "@types/lodash": "^4.17.20",
59
+ "@babel/core": "^7.23.9",
60
+ "@babel/traverse": "^7.26.9",
61
+ "@storybook/addon-actions": "^7.6.11",
62
+ "@storybook/addon-knobs": "^7.0.2",
63
+ "@storybook/addon-links": "^7.6.11",
64
+ "@storybook/addon-ondevice-actions": "^7.6.11",
65
+ "@storybook/addon-ondevice-knobs": "^7.6.11",
66
+ "@storybook/preview-api": "^7.6.11",
67
+ "@storybook/react-native": "^6.5.7",
68
+ "@storybook/react-native-server": "^6.5.8",
80
69
  "babel-loader": "^9.1.3",
81
- "cross-env": "^7.0.3",
82
- "eslint": "^9.30.1",
83
- "eslint-plugin-import": "^2.32.0",
84
- "eslint-plugin-perfectionist": "^4.15.0",
85
- "eslint-plugin-react": "^7.37.5",
86
- "eslint-plugin-react-hooks": "^5.2.0",
87
- "eslint-plugin-unused-imports": "^4.1.4",
88
- "globals": "^16.3.0",
89
- "lint-staged": "^16.1.2",
90
- "prettier": "^3.6.2",
91
- "react-native-gesture-handler": "~2.24.0",
92
- "react-native-reanimated": "~3.17.4",
93
- "react-native-safe-area-context": "5.4.0",
94
- "react-native-svg": "15.11.2",
95
- "typescript": "~5.8.3",
96
- "typescript-eslint": "^8.37.0"
70
+ "expo-dev-client": "~5.2.4"
71
+ },
72
+ "peerDependencies": {
73
+ "expo-camera": ">=13.0.0",
74
+ "react": ">=18.0.0",
75
+ "react-dom": ">=18.0.0",
76
+ "react-native": ">=0.71.0"
97
77
  },
98
- "lint-staged": {
99
- "*.{js,jsx,ts,tsx,json,css,md}": [
100
- "eslint --fix",
101
- "prettier --write"
102
- ]
78
+ "expo": {
79
+ "doctor": {
80
+ "reactNativeDirectoryCheck": {
81
+ "exclude": [
82
+ "react-native-maps",
83
+ "react-native-maps-directions",
84
+ "react-native-status-bar-height"
85
+ ],
86
+ "listUnknownPackages": false
87
+ }
88
+ }
103
89
  }
104
90
  }
@@ -8,29 +8,31 @@ To: `"main": "lib/index.js",`
8
8
 
9
9
  And revert the change after publish.
10
10
 
11
+
12
+
11
13
  #### Publish the library for npm
12
14
 
13
15
  Run the command: `npm publish` this will build the lib before publishing.
14
16
 
15
17
  #### How to set up
16
-
17
- `import { useLoadFonts } from from 'react-native-holper-storybook';` and call the `useLoadFonts` function in your app entry point.
18
+ `import { asyncLoadFont } from from 'react-native-holper-storybook';` and call the `asyncLoadFont` function in your app entry point.
18
19
 
19
20
  ```
20
- import { useEffect, useState } from 'react';
21
- import { useLoadFonts } from 'react-native-holper-storybook';
21
+ import React, { useEffect, useState } from 'react';
22
+ import { asyncLoadFont } from 'react-native-holper-storybook';
22
23
 
23
24
  export default function App() {
24
- const { loaded, error } = useLoadFonts();
25
+ const [fontsLoaded, setFontsLoaded] = useState(false);
25
26
 
26
27
  useEffect(() => {
27
- if (loaded || error) {
28
- SplashScreen.hideAsync();
29
- }
30
- }, [loaded, error]);
31
-
32
- if (!loaded && !error) {
33
- return null;
28
+ (async function() {
29
+ await asyncLoadFont;
30
+ setFontsLoaded(true);
31
+ })();
32
+ }, []);
33
+
34
+ if (!fontsLoaded) {
35
+ return <View/>;
34
36
  }
35
37
 
36
38
  return (
@@ -39,26 +41,25 @@ export default function App() {
39
41
  }
40
42
  ```
41
43
 
42
- #### Using Toast
43
-
44
- This library uses https://github.com/gunnartorfis/sonner-native, in order to use it, include `<Toaster />` in you root component.
44
+ #### Using FlashMessage
45
+ This library uses https://www.npmjs.com/package/react-native-flash-message, in order to use it, include `<FlashMessage/>` in you root component.
45
46
 
46
47
  ```
47
48
  import React from 'react';
48
49
  import { View } from 'react-native';
49
- import { Toaster } from 'react-native-holper-storybook';
50
+ import { FlashMessage } from 'react-native-holper-storybook';
50
51
 
51
52
  export default function App() {
52
53
  return (
53
54
  <View>
54
55
  ...
55
- <Toaster />
56
+ <FlashMessage />
56
57
  </View>
57
58
  );
58
59
  }
59
60
  ```
60
61
 
61
- #### Sending a messages
62
+ ###### Sending a messages
62
63
 
63
64
  ```
64
65
  import React from 'react';
@@ -78,4 +79,4 @@ export default MyComponent = () => {
78
79
  </View>
79
80
  );
80
81
  }
81
- ```
82
+ ```
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Chromatic
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.