@originallyus/feedback-rn-sdk 4.0.0-beta.6 → 4.0.0-beta.8
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.
Potentially problematic release.
This version of @originallyus/feedback-rn-sdk might be problematic. Click here for more details.
- package/lib/module/AIAContentUsefulness.js +1 -1
- package/lib/module/AIAContentUsefulness.js.map +1 -1
- package/lib/module/AIAFeedback.js +8 -8
- package/lib/module/AIAFeedback.js.map +1 -1
- package/lib/module/AIAFeedbackForm.js.map +1 -1
- package/lib/module/AIAFeedbackSplash.js.map +1 -1
- package/lib/module/AIAFeedbackStyles.js.map +1 -1
- package/lib/module/AIAFeedbackSuccess.js.map +1 -1
- package/lib/module/component/ButtonSubmit.js +2 -2
- package/lib/module/component/ButtonSubmit.js.map +1 -1
- package/lib/module/component/Input.js +3 -3
- package/lib/module/component/Input.js.map +1 -1
- package/lib/module/component/MultiSelectButtons.js +5 -5
- package/lib/module/component/MultiSelectButtons.js.map +1 -1
- package/lib/module/component/Rating.js +4 -4
- package/lib/module/component/Rating.js.map +1 -1
- package/lib/module/component/RatingNumber.js +3 -3
- package/lib/module/component/RatingNumber.js.map +1 -1
- package/lib/module/component/Textarea.js +3 -3
- package/lib/module/component/Textarea.js.map +1 -1
- package/lib/module/component/YesNoButtons.js +2 -2
- package/lib/module/component/YesNoButtons.js.map +1 -1
- package/lib/module/index.js +8 -8
- package/lib/module/index.js.map +1 -1
- package/lib/module/service/feedbackService.js +1 -1
- package/lib/module/service/feedbackService.js.map +1 -1
- package/lib/module/utils/networking.js +3 -3
- package/lib/module/utils/networking.js.map +1 -1
- package/package.json +4 -4
- package/src/AIAContentUsefulness.tsx +0 -296
- package/src/AIAFeedback.tsx +0 -354
- package/src/AIAFeedbackForm.tsx +0 -267
- package/src/AIAFeedbackSplash.tsx +0 -49
- package/src/AIAFeedbackStyles.ts +0 -311
- package/src/AIAFeedbackSuccess.tsx +0 -67
- package/src/assets/CheckIcon.tsx +0 -18
- package/src/assets/CloseIcon.tsx +0 -18
- package/src/assets/ErrorIcon.tsx +0 -18
- package/src/assets/PlusIcon.tsx +0 -18
- package/src/assets/StarIcon.tsx +0 -18
- package/src/component/Button.tsx +0 -68
- package/src/component/ButtonSubmit.tsx +0 -335
- package/src/component/Input.tsx +0 -288
- package/src/component/MultiSelectButtons.tsx +0 -272
- package/src/component/README.md +0 -215
- package/src/component/READMEVI.md +0 -192
- package/src/component/Rating.tsx +0 -248
- package/src/component/RatingNumber.tsx +0 -421
- package/src/component/Textarea.tsx +0 -282
- package/src/component/YesNoButtons.tsx +0 -236
- package/src/index.tsx +0 -33
- package/src/service/feedbackService.ts +0 -108
- package/src/utils/common.ts +0 -241
- package/src/utils/constants.ts +0 -60
- package/src/utils/index.ts +0 -167
- package/src/utils/networking.ts +0 -134
package/src/AIAFeedbackStyles.ts
DELETED
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import {Platform, StyleSheet} from 'react-native'
|
|
2
|
-
import * as f from './utils/common'
|
|
3
|
-
|
|
4
|
-
export const feedbackStyles = StyleSheet.create({
|
|
5
|
-
overlay: {
|
|
6
|
-
flex: 1,
|
|
7
|
-
backgroundColor: 'rgba(20, 24, 28, 0.5)',
|
|
8
|
-
justifyContent: 'flex-end',
|
|
9
|
-
},
|
|
10
|
-
nonBlockingOverlay: {
|
|
11
|
-
backgroundColor: 'transparent',
|
|
12
|
-
},
|
|
13
|
-
splashOverlay: {
|
|
14
|
-
justifyContent: 'center',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
paddingHorizontal: 6,
|
|
17
|
-
},
|
|
18
|
-
intrusiveOverlay: {
|
|
19
|
-
backgroundColor: '#FFF',
|
|
20
|
-
justifyContent: 'flex-start',
|
|
21
|
-
},
|
|
22
|
-
dismissArea: {
|
|
23
|
-
flex: 1,
|
|
24
|
-
},
|
|
25
|
-
modalContent: {
|
|
26
|
-
backgroundColor: '#FFF',
|
|
27
|
-
borderTopLeftRadius: 16,
|
|
28
|
-
borderTopRightRadius: 16,
|
|
29
|
-
width: '100%',
|
|
30
|
-
maxHeight: '90%',
|
|
31
|
-
minHeight: 180,
|
|
32
|
-
overflow: 'hidden',
|
|
33
|
-
},
|
|
34
|
-
splashContent: {
|
|
35
|
-
...Platform.select({
|
|
36
|
-
ios: {
|
|
37
|
-
shadowColor: '#000',
|
|
38
|
-
shadowOffset: {width: 0, height: 10},
|
|
39
|
-
shadowOpacity: 0.2,
|
|
40
|
-
shadowRadius: 20,
|
|
41
|
-
},
|
|
42
|
-
android: {
|
|
43
|
-
elevation: 10,
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
borderTopLeftRadius: 16,
|
|
47
|
-
borderTopRightRadius: 16,
|
|
48
|
-
borderBottomLeftRadius: 16,
|
|
49
|
-
borderBottomRightRadius: 16,
|
|
50
|
-
},
|
|
51
|
-
splashTabletContent: {
|
|
52
|
-
width: '90%',
|
|
53
|
-
maxWidth: 350,
|
|
54
|
-
borderRadius: 16,
|
|
55
|
-
maxHeight: '80%',
|
|
56
|
-
minHeight: 0,
|
|
57
|
-
},
|
|
58
|
-
splashInner: {
|
|
59
|
-
paddingTop: 20,
|
|
60
|
-
},
|
|
61
|
-
intrusiveContent: {
|
|
62
|
-
flex: 1,
|
|
63
|
-
maxHeight: '100%',
|
|
64
|
-
minHeight: '100%',
|
|
65
|
-
borderTopLeftRadius: 0,
|
|
66
|
-
borderTopRightRadius: 0,
|
|
67
|
-
},
|
|
68
|
-
safeArea: {
|
|
69
|
-
flexShrink: 1,
|
|
70
|
-
flexGrow: 1,
|
|
71
|
-
flexDirection: 'column',
|
|
72
|
-
},
|
|
73
|
-
flex1: {
|
|
74
|
-
flex: 1,
|
|
75
|
-
},
|
|
76
|
-
header: {
|
|
77
|
-
alignItems: 'center',
|
|
78
|
-
justifyContent: 'flex-start',
|
|
79
|
-
position: 'relative',
|
|
80
|
-
},
|
|
81
|
-
headerRow: {
|
|
82
|
-
height: 30,
|
|
83
|
-
width: '100%',
|
|
84
|
-
alignItems: 'center',
|
|
85
|
-
justifyContent: 'center',
|
|
86
|
-
position: 'relative',
|
|
87
|
-
},
|
|
88
|
-
handle: {
|
|
89
|
-
width: 40,
|
|
90
|
-
height: 4,
|
|
91
|
-
backgroundColor: '#E0E0E0',
|
|
92
|
-
borderRadius: 2,
|
|
93
|
-
},
|
|
94
|
-
closeBtn: {
|
|
95
|
-
position: 'absolute',
|
|
96
|
-
right: 16,
|
|
97
|
-
padding: 8,
|
|
98
|
-
zIndex: 10,
|
|
99
|
-
},
|
|
100
|
-
intrusiveCloseBtn: {
|
|
101
|
-
top: 0,
|
|
102
|
-
},
|
|
103
|
-
closeText: {
|
|
104
|
-
fontSize: 18,
|
|
105
|
-
color: '#999',
|
|
106
|
-
},
|
|
107
|
-
scrollContent: {
|
|
108
|
-
flexGrow: 1,
|
|
109
|
-
paddingHorizontal: f.isTablet ? 20 : 12,
|
|
110
|
-
paddingBottom: 30,
|
|
111
|
-
},
|
|
112
|
-
scrollContentInner: {
|
|
113
|
-
flex: 1,
|
|
114
|
-
minHeight: 1,
|
|
115
|
-
},
|
|
116
|
-
center: {
|
|
117
|
-
height: 200,
|
|
118
|
-
justifyContent: 'center',
|
|
119
|
-
alignItems: 'center',
|
|
120
|
-
},
|
|
121
|
-
mtAuto: {
|
|
122
|
-
marginTop: 'auto',
|
|
123
|
-
},
|
|
124
|
-
w100: {
|
|
125
|
-
width: '100%',
|
|
126
|
-
},
|
|
127
|
-
section: {
|
|
128
|
-
marginBottom: 20,
|
|
129
|
-
gap: 24,
|
|
130
|
-
alignSelf: 'stretch',
|
|
131
|
-
width: '100%',
|
|
132
|
-
},
|
|
133
|
-
secondarySection: {
|
|
134
|
-
flexGrow: 1,
|
|
135
|
-
alignItems: 'center',
|
|
136
|
-
gap: 24,
|
|
137
|
-
},
|
|
138
|
-
satisfactionRating: {
|
|
139
|
-
alignItems: 'center',
|
|
140
|
-
marginBottom: 16,
|
|
141
|
-
},
|
|
142
|
-
title: {
|
|
143
|
-
fontSize: 24,
|
|
144
|
-
fontWeight: '500',
|
|
145
|
-
color: '#14181C',
|
|
146
|
-
marginBottom: 8,
|
|
147
|
-
},
|
|
148
|
-
externalIcon: {
|
|
149
|
-
width: 140,
|
|
150
|
-
height: 140,
|
|
151
|
-
marginBottom: 10,
|
|
152
|
-
},
|
|
153
|
-
question: {
|
|
154
|
-
fontSize: 16,
|
|
155
|
-
color: '#082065',
|
|
156
|
-
marginBottom: 16,
|
|
157
|
-
fontWeight: '600',
|
|
158
|
-
},
|
|
159
|
-
successContainer: {
|
|
160
|
-
padding: 24,
|
|
161
|
-
alignItems: 'center',
|
|
162
|
-
},
|
|
163
|
-
successTitle: {
|
|
164
|
-
fontSize: 20,
|
|
165
|
-
fontWeight: '700',
|
|
166
|
-
color: '#082065',
|
|
167
|
-
marginBottom: 12,
|
|
168
|
-
textAlign: 'center',
|
|
169
|
-
},
|
|
170
|
-
successDesc: {
|
|
171
|
-
fontSize: 16,
|
|
172
|
-
color: '#444',
|
|
173
|
-
marginBottom: 24,
|
|
174
|
-
textAlign: 'center',
|
|
175
|
-
lineHeight: 22,
|
|
176
|
-
},
|
|
177
|
-
mt16: {
|
|
178
|
-
marginTop: 16,
|
|
179
|
-
},
|
|
180
|
-
mt24: {
|
|
181
|
-
marginTop: 24,
|
|
182
|
-
},
|
|
183
|
-
splashContainer: {
|
|
184
|
-
padding: 16,
|
|
185
|
-
alignItems: 'center',
|
|
186
|
-
},
|
|
187
|
-
splashTitle: {
|
|
188
|
-
fontSize: 24,
|
|
189
|
-
fontWeight: '700',
|
|
190
|
-
textAlign: 'center',
|
|
191
|
-
marginBottom: 16,
|
|
192
|
-
},
|
|
193
|
-
splashQuestion: {
|
|
194
|
-
fontSize: 16,
|
|
195
|
-
textAlign: 'center',
|
|
196
|
-
marginBottom: 24,
|
|
197
|
-
lineHeight: 22,
|
|
198
|
-
},
|
|
199
|
-
skipBtn: {
|
|
200
|
-
marginTop: 16,
|
|
201
|
-
padding: 8,
|
|
202
|
-
},
|
|
203
|
-
skipBtnText: {
|
|
204
|
-
fontSize: 14,
|
|
205
|
-
textDecorationLine: 'underline',
|
|
206
|
-
fontWeight: '700',
|
|
207
|
-
},
|
|
208
|
-
successIcon: {
|
|
209
|
-
width: 80,
|
|
210
|
-
height: 80,
|
|
211
|
-
marginBottom: 20,
|
|
212
|
-
},
|
|
213
|
-
fineprint: {
|
|
214
|
-
fontSize: 12,
|
|
215
|
-
marginTop: 16,
|
|
216
|
-
textAlign: 'center',
|
|
217
|
-
opacity: 0.8,
|
|
218
|
-
},
|
|
219
|
-
centeredScrollContent: {
|
|
220
|
-
flexGrow: 1,
|
|
221
|
-
justifyContent: 'center',
|
|
222
|
-
},
|
|
223
|
-
formRoot: {
|
|
224
|
-
flex: 1,
|
|
225
|
-
justifyContent: 'space-between',
|
|
226
|
-
},
|
|
227
|
-
formContent: {
|
|
228
|
-
flexGrow: 1,
|
|
229
|
-
},
|
|
230
|
-
submitSection: {
|
|
231
|
-
width: '100%',
|
|
232
|
-
marginTop: 'auto',
|
|
233
|
-
},
|
|
234
|
-
successRoot: {
|
|
235
|
-
flex: 1,
|
|
236
|
-
justifyContent: 'space-between',
|
|
237
|
-
},
|
|
238
|
-
successContentCenter: {
|
|
239
|
-
flex: 1,
|
|
240
|
-
justifyContent: 'center',
|
|
241
|
-
},
|
|
242
|
-
tabletOverlay: {
|
|
243
|
-
justifyContent: 'center',
|
|
244
|
-
alignItems: 'center',
|
|
245
|
-
},
|
|
246
|
-
tabletIntrusive: {
|
|
247
|
-
width: '90%',
|
|
248
|
-
maxWidth: 850,
|
|
249
|
-
height: 'auto',
|
|
250
|
-
maxHeight: '90%',
|
|
251
|
-
borderRadius: 16,
|
|
252
|
-
overflow: 'hidden',
|
|
253
|
-
...Platform.select({
|
|
254
|
-
ios: {
|
|
255
|
-
shadowColor: '#000',
|
|
256
|
-
shadowOffset: {width: 0, height: 10},
|
|
257
|
-
shadowOpacity: 0.2,
|
|
258
|
-
shadowRadius: 20,
|
|
259
|
-
},
|
|
260
|
-
android: {
|
|
261
|
-
elevation: 10,
|
|
262
|
-
},
|
|
263
|
-
}),
|
|
264
|
-
},
|
|
265
|
-
tabletNonIntrusive: {
|
|
266
|
-
position: 'absolute',
|
|
267
|
-
bottom: 30,
|
|
268
|
-
right: 30,
|
|
269
|
-
width: 400,
|
|
270
|
-
maxHeight: '70%',
|
|
271
|
-
borderRadius: 16,
|
|
272
|
-
overflow: 'hidden',
|
|
273
|
-
...Platform.select({
|
|
274
|
-
ios: {
|
|
275
|
-
shadowColor: '#000',
|
|
276
|
-
shadowOffset: {width: 0, height: 10},
|
|
277
|
-
shadowOpacity: 0.2,
|
|
278
|
-
shadowRadius: 20,
|
|
279
|
-
},
|
|
280
|
-
android: {
|
|
281
|
-
elevation: 10,
|
|
282
|
-
},
|
|
283
|
-
}),
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
errorWrap: {
|
|
287
|
-
flexDirection: 'row',
|
|
288
|
-
alignItems: 'center',
|
|
289
|
-
gap: 6,
|
|
290
|
-
},
|
|
291
|
-
error: {
|
|
292
|
-
fontSize: 14,
|
|
293
|
-
lineHeight: 20,
|
|
294
|
-
flex: 1,
|
|
295
|
-
fontWeight: '400',
|
|
296
|
-
},
|
|
297
|
-
mb12: {
|
|
298
|
-
marginBottom: 12,
|
|
299
|
-
},
|
|
300
|
-
divider: {
|
|
301
|
-
width: '100%',
|
|
302
|
-
height: 1,
|
|
303
|
-
backgroundColor: '#E5E5E5',
|
|
304
|
-
marginTop: 12,
|
|
305
|
-
},
|
|
306
|
-
|
|
307
|
-
centeredContent: {justifyContent: 'center', alignItems: 'center'},
|
|
308
|
-
autoHeightReset: {flexGrow: 0},
|
|
309
|
-
autoHeightFlexReset: {flex: 0},
|
|
310
|
-
autoHeightMargin: {marginTop: 16},
|
|
311
|
-
})
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import {Image, Text, View} from 'react-native'
|
|
3
|
-
import ButtonSubmit from './component/ButtonSubmit'
|
|
4
|
-
import * as f from './utils/common'
|
|
5
|
-
import {feedbackStyles as styles} from './AIAFeedbackStyles'
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
submitRes: any
|
|
9
|
-
shouldCenter: boolean
|
|
10
|
-
getThemeColor: (key: string, fallback: string) => string
|
|
11
|
-
onClose: () => void
|
|
12
|
-
autoHeight?: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const AIAFeedbackSuccess: React.FC<Props> = ({submitRes, shouldCenter, getThemeColor, onClose, autoHeight}) => {
|
|
16
|
-
if (!submitRes) return null
|
|
17
|
-
|
|
18
|
-
const align: any = submitRes.alignment === 'left' ? 'flex-start' : 'center'
|
|
19
|
-
const textAlign: any = submitRes.alignment === 'left' ? 'left' : 'center'
|
|
20
|
-
const btnBg = getThemeColor('button_bg_color', '#D31145')
|
|
21
|
-
const btnText = getThemeColor('button_text_color', '#FFFFFF')
|
|
22
|
-
const titleColor = getThemeColor('title_color', '#333D47')
|
|
23
|
-
const instructionColor = getThemeColor('instruction_color', '#444')
|
|
24
|
-
const titleFont = getThemeColor('title_font', '')
|
|
25
|
-
const instructionFont = getThemeColor('instruction_font', '')
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<View style={[styles.successRoot, autoHeight && styles.autoHeightFlexReset]}>
|
|
29
|
-
<View
|
|
30
|
-
style={[
|
|
31
|
-
styles.successContentCenter,
|
|
32
|
-
autoHeight && styles.autoHeightFlexReset,
|
|
33
|
-
shouldCenter && styles.centeredScrollContent,
|
|
34
|
-
]}
|
|
35
|
-
>
|
|
36
|
-
<View style={[styles.w100, {alignItems: align}]}>
|
|
37
|
-
{submitRes.image_file_url && (
|
|
38
|
-
<Image
|
|
39
|
-
source={{uri: submitRes.image_file_url}}
|
|
40
|
-
style={styles.successIcon}
|
|
41
|
-
resizeMode="contain"
|
|
42
|
-
/>
|
|
43
|
-
)}
|
|
44
|
-
<Text style={[styles.successTitle, {color: titleColor, textAlign, fontFamily: titleFont}]}>
|
|
45
|
-
{submitRes.title || 'Thank You!'}
|
|
46
|
-
</Text>
|
|
47
|
-
<Text
|
|
48
|
-
style={[styles.successDesc, {color: instructionColor, textAlign, fontFamily: instructionFont}]}
|
|
49
|
-
>
|
|
50
|
-
{submitRes.instruction || 'Your feedback has been submitted successfully.'}
|
|
51
|
-
</Text>
|
|
52
|
-
</View>
|
|
53
|
-
</View>
|
|
54
|
-
<View style={[styles.submitSection, autoHeight && styles.autoHeightMargin]}>
|
|
55
|
-
<ButtonSubmit
|
|
56
|
-
title={submitRes.button_text || 'Close'}
|
|
57
|
-
onPress={onClose}
|
|
58
|
-
appWidth={f.getAppWidth(true)}
|
|
59
|
-
backgroundColor={btnBg}
|
|
60
|
-
textColor={btnText}
|
|
61
|
-
/>
|
|
62
|
-
</View>
|
|
63
|
-
</View>
|
|
64
|
-
)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export default AIAFeedbackSuccess
|
package/src/assets/CheckIcon.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {memo} from 'react'
|
|
2
|
-
import Svg, {Path} from 'react-native-svg'
|
|
3
|
-
|
|
4
|
-
const CHECK_PATH =
|
|
5
|
-
'M13.66 0.390759C14.181 -0.130253 15.0257 -0.130253 15.5467 0.390759C16.0678 0.911771 16.0678 1.7565 15.5467 2.27751L6.60443 11.2198C6.08342 11.7408 5.23869 11.7408 4.71768 11.2198L0.390759 6.89289C-0.130253 6.37188 -0.130253 5.52716 0.390759 5.00614C0.911771 4.48513 1.7565 4.48513 2.27751 5.00614L5.66106 8.38969L13.66 0.390759Z'
|
|
6
|
-
|
|
7
|
-
interface CheckIconProps {
|
|
8
|
-
size?: number
|
|
9
|
-
color?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const CheckIcon = memo(({size = 16, color = '#082065'}: CheckIconProps) => (
|
|
13
|
-
<Svg width={size} height={size * (12 / 16)} viewBox="0 0 16 12" fill="none">
|
|
14
|
-
<Path d={CHECK_PATH} fill={color} />
|
|
15
|
-
</Svg>
|
|
16
|
-
))
|
|
17
|
-
|
|
18
|
-
export default CheckIcon
|
package/src/assets/CloseIcon.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {memo} from 'react'
|
|
2
|
-
import Svg, {Path} from 'react-native-svg'
|
|
3
|
-
|
|
4
|
-
const CLOSE_PATH =
|
|
5
|
-
'M0.329505 1.9205C-0.109835 1.48116 -0.109835 0.768845 0.329505 0.329505C0.768845 -0.109835 1.48116 -0.109835 1.9205 0.329505L7.50001 5.90902L13.0795 0.329505C13.5189 -0.109835 14.2312 -0.109835 14.6705 0.329505C15.1099 0.768845 15.1099 1.48116 14.6705 1.9205L9.091 7.50001L14.6705 13.0795C15.1098 13.5188 15.1098 14.2312 14.6705 14.6705C14.2312 15.1098 13.5188 15.1098 13.0795 14.6705L7.50001 9.091L1.92052 14.6705C1.48118 15.1098 0.76887 15.1098 0.32953 14.6705C-0.109809 14.2312 -0.109809 13.5188 0.32953 13.0795L5.90902 7.50001L0.329505 1.9205Z'
|
|
6
|
-
|
|
7
|
-
interface CloseIconProps {
|
|
8
|
-
size?: number
|
|
9
|
-
color?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const CloseIcon = memo(({size = 15, color = '#14181C'}: CloseIconProps) => (
|
|
13
|
-
<Svg width={size} height={size} viewBox="0 0 15 15" fill="none">
|
|
14
|
-
<Path d={CLOSE_PATH} fill={color} />
|
|
15
|
-
</Svg>
|
|
16
|
-
))
|
|
17
|
-
|
|
18
|
-
export default CloseIcon
|
package/src/assets/ErrorIcon.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {memo} from 'react'
|
|
2
|
-
import Svg, {Path} from 'react-native-svg'
|
|
3
|
-
|
|
4
|
-
const ERROR_PATH =
|
|
5
|
-
'M0.156466 13.1473L7.03005 0.647682C7.50494 -0.215894 8.7458 -0.215894 9.22068 0.647682L16.0943 13.1473C16.5524 13.9804 15.9497 14.9996 14.999 14.9996H1.25178C0.301066 14.9996 -0.301639 13.9804 0.156466 13.1473ZM9.06281 11.5621C9.06281 11.0444 8.64307 10.6246 8.12531 10.6246C7.60754 10.6246 7.18781 11.0444 7.18781 11.5621C7.18781 12.0799 7.60754 12.4996 8.12531 12.4996C8.64307 12.4996 9.06281 12.0799 9.06281 11.5621ZM7.50031 8.74962C7.50031 9.0948 7.78013 9.37462 8.12531 9.37462C8.47048 9.37462 8.75031 9.0948 8.75031 8.74962L8.75031 5.62462C8.75031 5.27944 8.47048 4.99962 8.12531 4.99962C7.78013 4.99962 7.50031 5.27944 7.50031 5.62462L7.50031 8.74962Z'
|
|
6
|
-
|
|
7
|
-
interface ErrorIconProps {
|
|
8
|
-
size?: number
|
|
9
|
-
color?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const ErrorIcon = memo(({size = 17, color = '#D40C74'}: ErrorIconProps) => (
|
|
13
|
-
<Svg width={size} height={size * (15 / 17)} viewBox="0 0 17 15" fill="none">
|
|
14
|
-
<Path fillRule="evenodd" clipRule="evenodd" d={ERROR_PATH} fill={color} />
|
|
15
|
-
</Svg>
|
|
16
|
-
))
|
|
17
|
-
|
|
18
|
-
export default ErrorIcon
|
package/src/assets/PlusIcon.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {memo} from 'react'
|
|
2
|
-
import Svg, {Path} from 'react-native-svg'
|
|
3
|
-
|
|
4
|
-
const PLUS_PATH =
|
|
5
|
-
'M10.9375 2.8125C10.9375 2.29473 10.5178 1.875 10 1.875C9.48223 1.875 9.0625 2.29473 9.0625 2.8125V9.0625H2.8125C2.29473 9.0625 1.875 9.48223 1.875 10C1.875 10.5178 2.29473 10.9375 2.8125 10.9375H9.0625V17.1875C9.0625 17.7053 9.48223 18.125 10 18.125C10.5178 18.125 10.9375 17.7053 10.9375 17.1875V10.9375H17.1875C17.7053 10.9375 18.125 10.5178 18.125 10C18.125 9.48223 17.7053 9.0625 17.1875 9.0625H10.9375V2.8125Z'
|
|
6
|
-
|
|
7
|
-
interface PlusIconProps {
|
|
8
|
-
size?: number
|
|
9
|
-
color?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const PlusIcon = memo(({size = 20, color = '#14181C'}: PlusIconProps) => (
|
|
13
|
-
<Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
|
|
14
|
-
<Path d={PLUS_PATH} fill={color} />
|
|
15
|
-
</Svg>
|
|
16
|
-
))
|
|
17
|
-
|
|
18
|
-
export default PlusIcon
|
package/src/assets/StarIcon.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {memo} from 'react'
|
|
2
|
-
import Svg, {Path} from 'react-native-svg'
|
|
3
|
-
|
|
4
|
-
const STAR_PATH =
|
|
5
|
-
'M19.501 0C18.376 0 17.3907 0.665167 16.9393 1.66397L16.926 1.69418L12.8583 11.2479L2.56085 12.1664L2.5561 12.1668C1.41701 12.2642 0.498481 13.0334 0.14345 14.0747L0.135281 14.0994C-0.2017 15.1468 0.100079 16.318 0.937835 17.0669L8.72953 24.0082L6.44915 34.0612C6.2016 35.1515 6.63026 36.2947 7.53285 36.952C8.43089 37.6059 9.63575 37.6688 10.5975 37.1072L19.501 31.7697L28.3897 37.0983L28.4136 37.1124C28.799 37.3338 29.2845 37.5 29.8232 37.5C30.4271 37.5 30.9801 37.3051 31.4392 36.9877L31.4528 36.9782L31.4692 36.9664C32.3716 36.3093 32.8 35.1651 32.5528 34.075L30.2593 23.9427L38.0549 17.0897C38.0727 17.074 38.0902 17.0579 38.1073 17.0414C38.857 16.3165 39.2148 15.1812 38.8668 14.0994C38.527 13.0432 37.577 12.2635 36.446 12.1668L36.4412 12.1664L26.1432 11.2479L22.078 1.71323L22.0767 1.71031C21.6427 0.684685 20.6281 0 19.501 0Z'
|
|
6
|
-
|
|
7
|
-
interface StarIconProps {
|
|
8
|
-
size?: number
|
|
9
|
-
color?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const StarIcon = memo(({size = 39, color = '#D6D8DA'}: StarIconProps) => (
|
|
13
|
-
<Svg width={size} height={size * (38 / 39)} viewBox="0 0 39 38" fill="none">
|
|
14
|
-
<Path d={STAR_PATH} fill={color} />
|
|
15
|
-
</Svg>
|
|
16
|
-
))
|
|
17
|
-
|
|
18
|
-
export default StarIcon
|
package/src/component/Button.tsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {Pressable, Text, StyleSheet, type ViewStyle, type TextStyle} from 'react-native'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Basic pressable button (thin wrapper around React Native `Pressable` + `Text`).
|
|
5
|
-
*/
|
|
6
|
-
export interface ButtonProps {
|
|
7
|
-
/**
|
|
8
|
-
* Text shown on the button.
|
|
9
|
-
*/
|
|
10
|
-
title: string
|
|
11
|
-
/**
|
|
12
|
-
* Called when the button is pressed.
|
|
13
|
-
*/
|
|
14
|
-
onPress: () => void
|
|
15
|
-
/**
|
|
16
|
-
* When true, disables the button and lowers opacity.
|
|
17
|
-
*
|
|
18
|
-
* @default false
|
|
19
|
-
*/
|
|
20
|
-
disabled?: boolean
|
|
21
|
-
/**
|
|
22
|
-
* Optional style override for the button container.
|
|
23
|
-
*/
|
|
24
|
-
style?: ViewStyle
|
|
25
|
-
/**
|
|
26
|
-
* Optional style override for the label text.
|
|
27
|
-
*/
|
|
28
|
-
textStyle?: TextStyle
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function Button({title, onPress, disabled = false, style, textStyle}: ButtonProps) {
|
|
32
|
-
return (
|
|
33
|
-
<Pressable
|
|
34
|
-
onPress={onPress}
|
|
35
|
-
disabled={disabled}
|
|
36
|
-
style={({pressed}) => [
|
|
37
|
-
styles.button,
|
|
38
|
-
pressed && styles.buttonPressed,
|
|
39
|
-
disabled && styles.buttonDisabled,
|
|
40
|
-
style,
|
|
41
|
-
]}
|
|
42
|
-
>
|
|
43
|
-
<Text style={[styles.text, textStyle]}>{title}</Text>
|
|
44
|
-
</Pressable>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const styles = StyleSheet.create({
|
|
49
|
-
button: {
|
|
50
|
-
paddingHorizontal: 20,
|
|
51
|
-
paddingVertical: 12,
|
|
52
|
-
backgroundColor: '#007AFF',
|
|
53
|
-
borderRadius: 8,
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
justifyContent: 'center',
|
|
56
|
-
},
|
|
57
|
-
buttonPressed: {
|
|
58
|
-
opacity: 0.8,
|
|
59
|
-
},
|
|
60
|
-
buttonDisabled: {
|
|
61
|
-
opacity: 0.5,
|
|
62
|
-
},
|
|
63
|
-
text: {
|
|
64
|
-
color: '#FFFFFF',
|
|
65
|
-
fontSize: 16,
|
|
66
|
-
fontWeight: '600',
|
|
67
|
-
},
|
|
68
|
-
})
|