@holper/react-native-holper-storybook 0.6.75 → 0.6.76

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.
@@ -8,12 +8,11 @@ import {
8
8
  ActivityIndicator,
9
9
  } from 'react-native';
10
10
  import Ionicons from 'react-native-vector-icons/Ionicons';
11
- import { Camera, FlashMode } from 'expo-camera';
11
+ import { CameraView, FlashMode } from 'expo-camera';
12
12
  import * as ImageManipulator from 'expo-image-manipulator';
13
13
  import { Svg, Defs, Rect, Mask, Circle } from 'react-native-svg';
14
14
  import Text from '../Text';
15
15
  import Container from '../Container';
16
- import ImageResponsive from '../ImageResponsive';
17
16
  import { Colors } from '../../configs/constants';
18
17
  import { ConfirmPictureModal } from './confirmPictureModal';
19
18
  import style from './style';
@@ -52,7 +51,7 @@ const TakePicture = ({
52
51
  usePictureText,
53
52
  }) => {
54
53
  const [hasCameraPermission, setHasCameraPermission] = useState(null);
55
- const [type, setType] = useState(Camera.Constants.Type.back);
54
+ const [type, setType] = useState(CameraView.Constants.Type.back);
56
55
  const [image, setImage] = useState(null);
57
56
  const [takingPicture, setTakingPicture] = useState(false);
58
57
  const [ratio, setRatio] = useState(DESIRED_RATIO);
@@ -60,14 +59,14 @@ const TakePicture = ({
60
59
 
61
60
  useEffect(() => {
62
61
  (async () => {
63
- const { status } = await Camera.requestCameraPermissionsAsync();
62
+ const { status } = await CameraView.requestCameraPermissionsAsync();
64
63
  setHasCameraPermission(status === 'granted');
65
64
  })();
66
65
  }, [visible]);
67
66
 
68
67
  const prepareRatio = async () => {
69
68
  if (isAndroid && camera) {
70
- const ratios = await Camera.getSupportedRatiosAsync();
69
+ const ratios = await CameraView.getSupportedRatiosAsync();
71
70
 
72
71
  // See if the current device has your desired ratio, otherwise get the maximum supported one
73
72
  // Usually the last element of 'ratios' is the maximum supported ratio
@@ -81,9 +80,9 @@ const TakePicture = ({
81
80
 
82
81
  const flipCamera = () => {
83
82
  setType(
84
- type === Camera.Constants.Type.back
85
- ? Camera.Constants.Type.front
86
- : Camera.Constants.Type.back
83
+ type === CameraView.Constants.Type.back
84
+ ? CameraView.Constants.Type.front
85
+ : CameraView.Constants.Type.back
87
86
  );
88
87
  };
89
88
 
@@ -147,7 +146,7 @@ const TakePicture = ({
147
146
  onRequestClose={() => {}}
148
147
  >
149
148
  <Container style={style.cameraContainer}>
150
- <Camera
149
+ <CameraView
151
150
  ref={camera}
152
151
  style={style.cameraContainer}
153
152
  type={type}
@@ -186,7 +185,7 @@ const TakePicture = ({
186
185
  </View>
187
186
 
188
187
  {avatar && isAndroid && <SvgCircle />}
189
- </Camera>
188
+ </CameraView>
190
189
 
191
190
  {takingPicture && (
192
191
  <View style={style.cameraTakingPictureOverlay}>
@@ -1,262 +1,263 @@
1
1
  export const Colors = {
2
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',
3
+ transparent: "transparent",
4
+ white: "#FFFFFF",
5
+ gray: "#D0D0D0",
6
+ dimgray: "#CFCFCF",
7
+ darkgray: "#2E3640",
8
+ whiteice: "#E7EAEE",
9
+ whitepearl: "#F7F8F9",
10
10
  // Greens
11
- lightgreen: '#64FFA5',
12
- green: '#3FE384',
11
+ lightgreen: "#64FFA5",
12
+ green: "#3FE384",
13
13
  // Blues
14
- lightblue: '#E4E9F2',
15
- midblue: '#727C8E',
16
- darkblue: '#515C6F',
17
- brightblue: '#00D8FF',
18
- mediumblue: '#F2F7FE',
19
- blue: '#2A539C',
14
+ lightblue: "#E4E9F2",
15
+ midblue: "#727C8E",
16
+ darkblue: "#515C6F",
17
+ brightblue: "#00D8FF",
18
+ mediumblue: "#F2F7FE",
19
+ blue: "#2A539C",
20
+ attentionBlue: "#dbf0fe",
20
21
  // Violet
21
- violet: '#300049',
22
- placeboPurple: '#F0ECFE',
22
+ violet: "#300049",
23
+ placeboPurple: "#F0ECFE",
23
24
  // Reds
24
- lightred: '#FFC1C1',
25
- red: '#FD4C4C',
25
+ lightred: "#FFC1C1",
26
+ red: "#FD4C4C",
26
27
  // Yellow
27
- lightyellow: '#F3F2D3',
28
- yellow: '#FDD100',
29
- gold: '#D4AF37',
28
+ lightyellow: "#F3F2D3",
29
+ yellow: "#FDD100",
30
+ gold: "#D4AF37",
30
31
  };
31
32
 
32
33
  export const borderRadius = 8;
33
34
 
34
35
  export const ConstantsWS = Object.freeze({
35
- HIRING: 'HIRING',
36
- CANCELED: 'CANCELED',
37
- CANCELED_BY_PROFESSIONAL: 'CANCELED_BY_PROFESSIONAL',
38
- NOT_CONFIRMED: 'NOT_CONFIRMED',
39
- NOT_STARTED: 'NOT_STARTED',
40
- POSTULATION: 'POSTULATION',
41
- NOTIFICATION: 'NOTIFICATION',
42
- CHAT: 'CHAT',
43
- MAP: 'MAP',
44
- RECOMMENDATION: 'RECOMMENDATION',
45
- ISSUE: 'ISSUE',
46
- CLOSED: 'CLOSED',
47
- USER: 'USER',
36
+ HIRING: "HIRING",
37
+ CANCELED: "CANCELED",
38
+ CANCELED_BY_PROFESSIONAL: "CANCELED_BY_PROFESSIONAL",
39
+ NOT_CONFIRMED: "NOT_CONFIRMED",
40
+ NOT_STARTED: "NOT_STARTED",
41
+ POSTULATION: "POSTULATION",
42
+ NOTIFICATION: "NOTIFICATION",
43
+ CHAT: "CHAT",
44
+ MAP: "MAP",
45
+ RECOMMENDATION: "RECOMMENDATION",
46
+ ISSUE: "ISSUE",
47
+ CLOSED: "CLOSED",
48
+ USER: "USER",
48
49
  });
49
50
 
50
51
  export const HiringStatus = Object.freeze({
51
- PENDING: 'pending',
52
- ON_THE_WAY: 'onTheWay',
53
- ARRIVAL_CONFIRMED: 'arrivalConfirmed',
54
- IN_PROGRESS: 'inProgress',
55
- PAYMENT: 'payment',
56
- PAYMENT_ERROR: 'paymentError',
57
- DONE: 'done',
58
- CANCELED: 'canceled',
59
- UNPAID: 'unpaid',
52
+ PENDING: "pending",
53
+ ON_THE_WAY: "onTheWay",
54
+ ARRIVAL_CONFIRMED: "arrivalConfirmed",
55
+ IN_PROGRESS: "inProgress",
56
+ PAYMENT: "payment",
57
+ PAYMENT_ERROR: "paymentError",
58
+ DONE: "done",
59
+ CANCELED: "canceled",
60
+ UNPAID: "unpaid",
60
61
  });
61
62
 
62
63
  export const CouponStatus = Object.freeze({
63
- PENDING: 'pending',
64
- IN_USE: 'inUse',
65
- EXPIRED: 'expired',
66
- DONE: 'DONE',
64
+ PENDING: "pending",
65
+ IN_USE: "inUse",
66
+ EXPIRED: "expired",
67
+ DONE: "DONE",
67
68
  });
68
69
 
69
70
  export const NotificationsTypes = Object.freeze({
70
71
  /** New hiring is created */
71
- NEW_HIRING: 'newHiring',
72
+ NEW_HIRING: "newHiring",
72
73
  /** Professional accept immediate hiring */
73
- HIRING_IMMEDIATE: 'hiringImmediate',
74
+ HIRING_IMMEDIATE: "hiringImmediate",
74
75
  /** Professional accept scheduled hiring */
75
- HIRING_SCHEDULED: 'hiringScheduled',
76
- HIRING_ACCEPTED: 'hiringAccepted',
77
- HIRING_CANCELED: 'hiringCanceled',
78
- HIRING_ON_THE_WAY: 'hiringOnTheWay',
79
- HIRING_ARRIVAL_CONFIRMED: 'hiringArrivalConfirmed',
80
- HIRING_IN_PROGRESS: 'hiringInProgress',
81
- HIRING_DONE: 'hiringDone',
82
- HIRING_DELAY: 'hiringDelay',
83
- HIRING_DELAY_TRAFFIC: 'hiringDelayTraffic',
84
- HIRING_DELAY_ACCIDENT: 'hiringDelayAccident',
85
- HIRING_DELAY_WORK: 'hiringDelayWork',
86
- HIRING_EXTRA_TASK: 'hiringExtraTask',
87
- HIRING_EXTRA_TASK_ACCEPTED: 'hiringExtraTaskAccepted',
88
- HIRING_EXTRA_TASK_REJECTED: 'hiringExtraTaskRejected',
89
- HIRING_PAYMENT_REJECTED: 'hiringPaymentRejected',
90
- HIRING_RATING: 'hiringRating',
91
- NEW_MESSAGE: 'newMessage',
76
+ HIRING_SCHEDULED: "hiringScheduled",
77
+ HIRING_ACCEPTED: "hiringAccepted",
78
+ HIRING_CANCELED: "hiringCanceled",
79
+ HIRING_ON_THE_WAY: "hiringOnTheWay",
80
+ HIRING_ARRIVAL_CONFIRMED: "hiringArrivalConfirmed",
81
+ HIRING_IN_PROGRESS: "hiringInProgress",
82
+ HIRING_DONE: "hiringDone",
83
+ HIRING_DELAY: "hiringDelay",
84
+ HIRING_DELAY_TRAFFIC: "hiringDelayTraffic",
85
+ HIRING_DELAY_ACCIDENT: "hiringDelayAccident",
86
+ HIRING_DELAY_WORK: "hiringDelayWork",
87
+ HIRING_EXTRA_TASK: "hiringExtraTask",
88
+ HIRING_EXTRA_TASK_ACCEPTED: "hiringExtraTaskAccepted",
89
+ HIRING_EXTRA_TASK_REJECTED: "hiringExtraTaskRejected",
90
+ HIRING_PAYMENT_REJECTED: "hiringPaymentRejected",
91
+ HIRING_RATING: "hiringRating",
92
+ NEW_MESSAGE: "newMessage",
92
93
  /** Reminder for the client to open the door */
93
- REMINDER_OPEN_DOOR: 'reminderOpenDoor',
94
+ REMINDER_OPEN_DOOR: "reminderOpenDoor",
94
95
  /** Reminder for the professional to start the path */
95
- REMINDER_START_PATH: 'reminderStartPath',
96
+ REMINDER_START_PATH: "reminderStartPath",
96
97
  /** Reminder for the professional when the start time is passed */
97
- REMINDER_DELAYED: 'reminderDelay',
98
+ REMINDER_DELAYED: "reminderDelay",
98
99
  /** Reminder for the professional when arrived to mark the arrival confirmed */
99
- REMINDER_ARRIVED: 'reminderArrived',
100
+ REMINDER_ARRIVED: "reminderArrived",
100
101
  /** Reminder for the professional to start the progress */
101
- REMINDER_START_PROGRESS: 'reminderStartProgress',
102
+ REMINDER_START_PROGRESS: "reminderStartProgress",
102
103
  });
103
104
 
104
105
  export const MapStyle = [
105
106
  {
106
- elementType: 'geometry',
107
+ elementType: "geometry",
107
108
  stylers: [
108
109
  {
109
- color: '#f5f5f5',
110
+ color: "#f5f5f5",
110
111
  },
111
112
  ],
112
113
  },
113
114
  {
114
- elementType: 'labels.icon',
115
+ elementType: "labels.icon",
115
116
  stylers: [
116
117
  {
117
- visibility: 'off',
118
+ visibility: "off",
118
119
  },
119
120
  ],
120
121
  },
121
122
  {
122
- elementType: 'labels.text.fill',
123
+ elementType: "labels.text.fill",
123
124
  stylers: [
124
125
  {
125
- color: '#616161',
126
+ color: "#616161",
126
127
  },
127
128
  ],
128
129
  },
129
130
  {
130
- elementType: 'labels.text.stroke',
131
+ elementType: "labels.text.stroke",
131
132
  stylers: [
132
133
  {
133
- color: '#f5f5f5',
134
+ color: "#f5f5f5",
134
135
  },
135
136
  ],
136
137
  },
137
138
  {
138
- featureType: 'administrative.land_parcel',
139
- elementType: 'labels.text.fill',
139
+ featureType: "administrative.land_parcel",
140
+ elementType: "labels.text.fill",
140
141
  stylers: [
141
142
  {
142
- color: '#bdbdbd',
143
+ color: "#bdbdbd",
143
144
  },
144
145
  ],
145
146
  },
146
147
  {
147
- featureType: 'poi',
148
- elementType: 'geometry',
148
+ featureType: "poi",
149
+ elementType: "geometry",
149
150
  stylers: [
150
151
  {
151
- color: '#eeeeee',
152
+ color: "#eeeeee",
152
153
  },
153
154
  ],
154
155
  },
155
156
  {
156
- featureType: 'poi',
157
- elementType: 'labels.text.fill',
157
+ featureType: "poi",
158
+ elementType: "labels.text.fill",
158
159
  stylers: [
159
160
  {
160
- color: '#757575',
161
+ color: "#757575",
161
162
  },
162
163
  ],
163
164
  },
164
165
  {
165
- featureType: 'poi.park',
166
- elementType: 'geometry',
166
+ featureType: "poi.park",
167
+ elementType: "geometry",
167
168
  stylers: [
168
169
  {
169
- color: '#e5e5e5',
170
+ color: "#e5e5e5",
170
171
  },
171
172
  ],
172
173
  },
173
174
  {
174
- featureType: 'poi.park',
175
- elementType: 'labels.text.fill',
175
+ featureType: "poi.park",
176
+ elementType: "labels.text.fill",
176
177
  stylers: [
177
178
  {
178
- color: '#9e9e9e',
179
+ color: "#9e9e9e",
179
180
  },
180
181
  ],
181
182
  },
182
183
  {
183
- featureType: 'road',
184
- elementType: 'geometry',
184
+ featureType: "road",
185
+ elementType: "geometry",
185
186
  stylers: [
186
187
  {
187
- color: '#ffffff',
188
+ color: "#ffffff",
188
189
  },
189
190
  ],
190
191
  },
191
192
  {
192
- featureType: 'road.arterial',
193
- elementType: 'labels.text.fill',
193
+ featureType: "road.arterial",
194
+ elementType: "labels.text.fill",
194
195
  stylers: [
195
196
  {
196
- color: '#757575',
197
+ color: "#757575",
197
198
  },
198
199
  ],
199
200
  },
200
201
  {
201
- featureType: 'road.highway',
202
- elementType: 'geometry',
202
+ featureType: "road.highway",
203
+ elementType: "geometry",
203
204
  stylers: [
204
205
  {
205
- color: '#dadada',
206
+ color: "#dadada",
206
207
  },
207
208
  ],
208
209
  },
209
210
  {
210
- featureType: 'road.highway',
211
- elementType: 'labels.text.fill',
211
+ featureType: "road.highway",
212
+ elementType: "labels.text.fill",
212
213
  stylers: [
213
214
  {
214
- color: '#616161',
215
+ color: "#616161",
215
216
  },
216
217
  ],
217
218
  },
218
219
  {
219
- featureType: 'road.local',
220
- elementType: 'labels.text.fill',
220
+ featureType: "road.local",
221
+ elementType: "labels.text.fill",
221
222
  stylers: [
222
223
  {
223
- color: '#9e9e9e',
224
+ color: "#9e9e9e",
224
225
  },
225
226
  ],
226
227
  },
227
228
  {
228
- featureType: 'transit.line',
229
- elementType: 'geometry',
229
+ featureType: "transit.line",
230
+ elementType: "geometry",
230
231
  stylers: [
231
232
  {
232
- color: '#e5e5e5',
233
+ color: "#e5e5e5",
233
234
  },
234
235
  ],
235
236
  },
236
237
  {
237
- featureType: 'transit.station',
238
- elementType: 'geometry',
238
+ featureType: "transit.station",
239
+ elementType: "geometry",
239
240
  stylers: [
240
241
  {
241
- color: '#eeeeee',
242
+ color: "#eeeeee",
242
243
  },
243
244
  ],
244
245
  },
245
246
  {
246
- featureType: 'water',
247
- elementType: 'geometry',
247
+ featureType: "water",
248
+ elementType: "geometry",
248
249
  stylers: [
249
250
  {
250
- color: '#c9c9c9',
251
+ color: "#c9c9c9",
251
252
  },
252
253
  ],
253
254
  },
254
255
  {
255
- featureType: 'water',
256
- elementType: 'labels.text.fill',
256
+ featureType: "water",
257
+ elementType: "labels.text.fill",
257
258
  stylers: [
258
259
  {
259
- color: '#9e9e9e',
260
+ color: "#9e9e9e",
260
261
  },
261
262
  ],
262
263
  },
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "main": "lib/index.js",
3
3
  "name": "@holper/react-native-holper-storybook",
4
4
  "description": "A component library for Holper projects",
5
- "version": "0.6.75",
5
+ "version": "0.6.76",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "lib",
@@ -27,35 +27,37 @@
27
27
  "storybook-publish": "./build.sh"
28
28
  },
29
29
  "dependencies": {
30
- "@react-native-async-storage/async-storage": "1.21.0",
30
+ "@react-native-async-storage/async-storage": "1.23.1",
31
31
  "@react-native-community/datetimepicker": "8.2.0",
32
- "@react-native-community/slider": "4.4.2",
32
+ "@react-native-community/slider": "4.5.5",
33
33
  "deprecated-react-native-prop-types": "^5.0.0",
34
- "expo": "~50.0.17",
35
- "expo-asset": "~9.0.2",
36
- "expo-camera": "~14.1.3",
37
- "expo-font": "~11.10.3",
38
- "expo-image-manipulator": "~11.8.0",
39
- "expo-image-picker": "~14.7.1",
40
- "expo-media-library": "~15.9.2",
41
- "expo-status-bar": "~1.11.1",
34
+ "expo": "^52.0.35",
35
+ "expo-asset": "~11.0.3",
36
+ "expo-camera": "~16.0.16",
37
+ "expo-font": "~13.0.3",
38
+ "expo-image": "~2.0.5",
39
+ "expo-image-manipulator": "~13.0.6",
40
+ "expo-image-picker": "~16.0.6",
41
+ "expo-media-library": "~17.0.6",
42
+ "expo-status-bar": "~2.0.1",
42
43
  "moment": "^2.30.1",
43
44
  "prop-types": "^15.8.1",
44
- "react": "18.2.0",
45
- "react-dom": "18.2.0",
46
- "react-native": "0.73.6",
45
+ "react": "18.3.1",
46
+ "react-dom": "18.3.1",
47
+ "react-native": "0.76.7",
47
48
  "react-native-countdown-circle-timer": "^3.2.1",
48
49
  "react-native-deck-swiper": "^2.0.16",
49
50
  "react-native-dropdown-picker": "^5.4.6",
50
51
  "react-native-flash-message": "^0.4.2",
51
- "react-native-safe-area-context": "4.8.2",
52
+ "react-native-safe-area-context": "4.12.0",
52
53
  "react-native-status-bar-height": "^2.6.0",
53
- "react-native-svg": "14.1.0",
54
+ "react-native-svg": "15.8.0",
54
55
  "react-native-vector-icons": "^10.0.3",
55
56
  "react-native-web": "~0.19.10"
56
57
  },
57
58
  "devDependencies": {
58
59
  "@babel/core": "^7.23.9",
60
+ "@babel/traverse": "^7.26.9",
59
61
  "@storybook/addon-actions": "^7.6.11",
60
62
  "@storybook/addon-knobs": "^7.0.2",
61
63
  "@storybook/addon-links": "^7.6.11",
@@ -65,12 +67,22 @@
65
67
  "@storybook/react-native": "^6.5.7",
66
68
  "@storybook/react-native-server": "^6.5.8",
67
69
  "babel-loader": "^9.1.3",
68
- "expo-dev-client": "~3.3.11"
70
+ "expo-dev-client": "~5.0.12"
69
71
  },
70
72
  "peerDependencies": {
71
73
  "expo-camera": ">=13.0.0",
72
74
  "react": ">=18.0.0",
73
75
  "react-dom": ">=18.0.0",
74
76
  "react-native": ">=0.71.0"
77
+ },
78
+ "expo": {
79
+ "doctor": {
80
+ "reactNativeDirectoryCheck": {
81
+ "exclude": [
82
+ "react-native-status-bar-height"
83
+ ],
84
+ "listUnknownPackages": false
85
+ }
86
+ }
75
87
  }
76
88
  }