@hero-design/rn 8.72.0 → 8.73.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.72.0",
3
+ "version": "8.73.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { ViewProps, StyleProp, ViewStyle } from 'react-native';
3
+ import { StyledContainer, StyledFocusIcon } from './StyledMapPin';
4
+
5
+ export interface MapPinFocussedProps extends ViewProps {
6
+ /**
7
+ * Additional style.
8
+ */
9
+ style?: StyleProp<ViewStyle>;
10
+ /**
11
+ * Testing id of the component.
12
+ */
13
+ testID?: string;
14
+ }
15
+
16
+ const MapPinFocussed = ({
17
+ style,
18
+ testID,
19
+ ...nativeProps
20
+ }: MapPinFocussedProps): JSX.Element => {
21
+ return (
22
+ <StyledContainer {...nativeProps} style={style} testID={testID}>
23
+ <StyledFocusIcon icon="location-on" intent="secondary" />
24
+ </StyledContainer>
25
+ );
26
+ };
27
+
28
+ export default MapPinFocussed;
@@ -0,0 +1,72 @@
1
+ import styled from '@emotion/native';
2
+ import { View } from 'react-native';
3
+ import Badge from '../Badge';
4
+ import Icon from '../Icon';
5
+
6
+ type State = 'idle' | 'selected' | 'applied';
7
+
8
+ export const StyledContainer = styled(View)(({ theme }) => ({
9
+ width: theme.__hd__.mapPin.sizes.default,
10
+ height: theme.__hd__.mapPin.sizes.default,
11
+ display: 'flex',
12
+ justifyContent: 'center',
13
+ alignItems: 'center',
14
+ }));
15
+
16
+ export const StyledContent = styled(View)<{
17
+ themeState: State;
18
+ themeIsIcon: boolean;
19
+ }>(({ theme, themeState, themeIsIcon }) => ({
20
+ backgroundColor: themeIsIcon
21
+ ? theme.__hd__.mapPin.colors.iconBackground
22
+ : theme.__hd__.mapPin.colors.background,
23
+ borderRadius: theme.__hd__.mapPin.radii.default,
24
+ borderWidth: theme.__hd__.mapPin.borderWidths.default,
25
+ borderColor: theme.__hd__.mapPin.colors.border[themeState],
26
+ elevation: theme.__hd__.mapPin.shadows.elevation,
27
+ shadowOffset: theme.__hd__.mapPin.shadows.offset,
28
+ shadowOpacity: theme.__hd__.mapPin.shadows.opacity,
29
+ shadowRadius: theme.__hd__.mapPin.shadows.radius,
30
+ shadowColor: theme.__hd__.mapPin.shadows.color,
31
+ width: theme.__hd__.mapPin.sizes.default,
32
+ height: theme.__hd__.mapPin.sizes.default,
33
+ display: 'flex',
34
+ justifyContent: 'center',
35
+ alignItems: 'center',
36
+ }));
37
+
38
+ export const StyledBadge = styled(Badge)(({ theme }) => ({
39
+ right: theme.__hd__.mapPin.space.iconRight,
40
+ top: theme.__hd__.mapPin.space.iconTop,
41
+ position: 'absolute',
42
+ backgroundColor: theme.__hd__.mapPin.colors.badge,
43
+ borderColor: theme.__hd__.mapPin.colors.badge,
44
+ zIndex: 2,
45
+ }));
46
+
47
+ export const StyledImage = styled.Image(({ theme }) => ({
48
+ width: '100%',
49
+ height: '100%',
50
+ borderRadius:
51
+ theme.__hd__.mapPin.radii.default -
52
+ theme.__hd__.mapPin.borderWidths.default,
53
+ }));
54
+
55
+ function hexToRgba(hex: string, a: number) {
56
+ const arrBuff = new ArrayBuffer(4);
57
+ const vw = new DataView(arrBuff);
58
+ vw.setUint32(0, parseInt(hex, 16), false);
59
+ const arrByte = new Uint8Array(arrBuff);
60
+ const [r, g, b] = arrByte;
61
+ return `rgba(${r},${g},${b},${a})`;
62
+ }
63
+
64
+ export const StyledFocusIcon = styled(Icon)(({ theme }) => ({
65
+ fontSize: theme.__hd__.mapPin.fontSizes.icon,
66
+ textShadowColor: hexToRgba(
67
+ theme.__hd__.mapPin.shadows.color,
68
+ theme.__hd__.mapPin.shadows.opacity
69
+ ),
70
+ textShadowOffset: theme.__hd__.mapPin.shadows.offset,
71
+ textShadowRadius: theme.__hd__.mapPin.shadows.radius,
72
+ }));
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import renderWithTheme from '../../../testHelpers/renderWithTheme';
3
+ import MapPinFocussed from '../Focussed';
4
+
5
+ describe('MapPin.Focussed', () => {
6
+ it('renders icon correctly', () => {
7
+ const { toJSON } = renderWithTheme(<MapPinFocussed />);
8
+ expect(toJSON()).toMatchSnapshot();
9
+ });
10
+ });
@@ -0,0 +1,72 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`MapPin.Focussed renders icon correctly 1`] = `
4
+ <View
5
+ style={
6
+ {
7
+ "flex": 1,
8
+ }
9
+ }
10
+ >
11
+ <View
12
+ style={
13
+ [
14
+ {
15
+ "alignItems": "center",
16
+ "display": "flex",
17
+ "height": 42,
18
+ "justifyContent": "center",
19
+ "width": 42,
20
+ },
21
+ undefined,
22
+ ]
23
+ }
24
+ >
25
+ <HeroIcon
26
+ name="location-on"
27
+ style={
28
+ [
29
+ {
30
+ "color": "#795e90",
31
+ "fontSize": 24,
32
+ },
33
+ [
34
+ {
35
+ "fontSize": 42,
36
+ "textShadowColor": "rgba(0,0,0,0.12)",
37
+ "textShadowOffset": {
38
+ "height": 2,
39
+ "width": 0,
40
+ },
41
+ "textShadowRadius": 4,
42
+ },
43
+ undefined,
44
+ ],
45
+ ]
46
+ }
47
+ themeIntent="secondary"
48
+ themeSize="medium"
49
+ />
50
+ </View>
51
+ <View
52
+ pointerEvents="box-none"
53
+ position="bottom"
54
+ style={
55
+ [
56
+ {
57
+ "bottom": 0,
58
+ "elevation": 9999,
59
+ "flexDirection": "column-reverse",
60
+ "left": 0,
61
+ "paddingHorizontal": 24,
62
+ "paddingVertical": 16,
63
+ "position": "absolute",
64
+ "right": 0,
65
+ "top": 0,
66
+ },
67
+ undefined,
68
+ ]
69
+ }
70
+ />
71
+ </View>
72
+ `;
@@ -0,0 +1,470 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`MapPin renders applied state correctly 1`] = `
4
+ <View
5
+ style={
6
+ {
7
+ "flex": 1,
8
+ }
9
+ }
10
+ >
11
+ <View
12
+ style={
13
+ [
14
+ {
15
+ "alignItems": "center",
16
+ "display": "flex",
17
+ "height": 42,
18
+ "justifyContent": "center",
19
+ "width": 42,
20
+ },
21
+ undefined,
22
+ ]
23
+ }
24
+ testID="map-pin"
25
+ >
26
+ <View
27
+ style={
28
+ [
29
+ {
30
+ "alignItems": "center",
31
+ "backgroundColor": "#4d6265",
32
+ "borderColor": "#795e90",
33
+ "borderRadius": 12,
34
+ "borderWidth": 4,
35
+ "display": "flex",
36
+ "elevation": 3,
37
+ "height": 42,
38
+ "justifyContent": "center",
39
+ "shadowColor": "#001f23",
40
+ "shadowOffset": {
41
+ "height": 2,
42
+ "width": 0,
43
+ },
44
+ "shadowOpacity": 0.12,
45
+ "shadowRadius": 4,
46
+ "width": 42,
47
+ },
48
+ undefined,
49
+ ]
50
+ }
51
+ themeIsIcon={true}
52
+ themeState="applied"
53
+ >
54
+ <HeroIcon
55
+ name="activate"
56
+ style={
57
+ [
58
+ {
59
+ "color": "#ffffff",
60
+ "fontSize": 16,
61
+ },
62
+ undefined,
63
+ ]
64
+ }
65
+ testID="map-pin-icon"
66
+ themeIntent="text-inverted"
67
+ themeSize="xsmall"
68
+ />
69
+ </View>
70
+ <View
71
+ collapsable={false}
72
+ style={
73
+ {
74
+ "alignItems": "center",
75
+ "backgroundColor": "#795e90",
76
+ "borderColor": "#795e90",
77
+ "borderRadius": 999,
78
+ "borderWidth": 2,
79
+ "height": 24,
80
+ "justifyContent": "center",
81
+ "minWidth": 24,
82
+ "opacity": 1,
83
+ "paddingHorizontal": undefined,
84
+ "position": "absolute",
85
+ "right": -8,
86
+ "top": -8,
87
+ "transform": [
88
+ {
89
+ "scale": 1,
90
+ },
91
+ ],
92
+ "zIndex": 2,
93
+ }
94
+ }
95
+ testID="map-pin-badge"
96
+ themeIntent="primary"
97
+ themePadding="narrowContent"
98
+ themeSize="medium"
99
+ themeVariant="filled"
100
+ >
101
+ <HeroIcon
102
+ name="mail-outlined"
103
+ style={
104
+ [
105
+ {
106
+ "color": "#ffffff",
107
+ "fontSize": 24,
108
+ },
109
+ [
110
+ {
111
+ "fontSize": 12,
112
+ },
113
+ undefined,
114
+ ],
115
+ ]
116
+ }
117
+ themeIntent="text-inverted"
118
+ themeSize="medium"
119
+ />
120
+ </View>
121
+ </View>
122
+ <View
123
+ pointerEvents="box-none"
124
+ position="bottom"
125
+ style={
126
+ [
127
+ {
128
+ "bottom": 0,
129
+ "elevation": 9999,
130
+ "flexDirection": "column-reverse",
131
+ "left": 0,
132
+ "paddingHorizontal": 24,
133
+ "paddingVertical": 16,
134
+ "position": "absolute",
135
+ "right": 0,
136
+ "top": 0,
137
+ },
138
+ undefined,
139
+ ]
140
+ }
141
+ />
142
+ </View>
143
+ `;
144
+
145
+ exports[`MapPin renders icon correctly 1`] = `
146
+ <View
147
+ style={
148
+ {
149
+ "flex": 1,
150
+ }
151
+ }
152
+ >
153
+ <View
154
+ style={
155
+ [
156
+ {
157
+ "alignItems": "center",
158
+ "display": "flex",
159
+ "height": 42,
160
+ "justifyContent": "center",
161
+ "width": 42,
162
+ },
163
+ undefined,
164
+ ]
165
+ }
166
+ testID="map-pin"
167
+ >
168
+ <View
169
+ style={
170
+ [
171
+ {
172
+ "alignItems": "center",
173
+ "backgroundColor": "#4d6265",
174
+ "borderColor": "#ffffff",
175
+ "borderRadius": 12,
176
+ "borderWidth": 4,
177
+ "display": "flex",
178
+ "elevation": 3,
179
+ "height": 42,
180
+ "justifyContent": "center",
181
+ "shadowColor": "#001f23",
182
+ "shadowOffset": {
183
+ "height": 2,
184
+ "width": 0,
185
+ },
186
+ "shadowOpacity": 0.12,
187
+ "shadowRadius": 4,
188
+ "width": 42,
189
+ },
190
+ undefined,
191
+ ]
192
+ }
193
+ themeIsIcon={true}
194
+ themeState="idle"
195
+ >
196
+ <HeroIcon
197
+ name="activate"
198
+ style={
199
+ [
200
+ {
201
+ "color": "#ffffff",
202
+ "fontSize": 16,
203
+ },
204
+ undefined,
205
+ ]
206
+ }
207
+ testID="map-pin-icon"
208
+ themeIntent="text-inverted"
209
+ themeSize="xsmall"
210
+ />
211
+ </View>
212
+ </View>
213
+ <View
214
+ pointerEvents="box-none"
215
+ position="bottom"
216
+ style={
217
+ [
218
+ {
219
+ "bottom": 0,
220
+ "elevation": 9999,
221
+ "flexDirection": "column-reverse",
222
+ "left": 0,
223
+ "paddingHorizontal": 24,
224
+ "paddingVertical": 16,
225
+ "position": "absolute",
226
+ "right": 0,
227
+ "top": 0,
228
+ },
229
+ undefined,
230
+ ]
231
+ }
232
+ />
233
+ </View>
234
+ `;
235
+
236
+ exports[`MapPin renders image correctly 1`] = `
237
+ <View
238
+ style={
239
+ {
240
+ "flex": 1,
241
+ }
242
+ }
243
+ >
244
+ <View
245
+ style={
246
+ [
247
+ {
248
+ "alignItems": "center",
249
+ "display": "flex",
250
+ "height": 42,
251
+ "justifyContent": "center",
252
+ "width": 42,
253
+ },
254
+ undefined,
255
+ ]
256
+ }
257
+ testID="map-pin"
258
+ >
259
+ <View
260
+ style={
261
+ [
262
+ {
263
+ "alignItems": "center",
264
+ "backgroundColor": "#ffffff",
265
+ "borderColor": "#ffffff",
266
+ "borderRadius": 12,
267
+ "borderWidth": 4,
268
+ "display": "flex",
269
+ "elevation": 3,
270
+ "height": 42,
271
+ "justifyContent": "center",
272
+ "shadowColor": "#001f23",
273
+ "shadowOffset": {
274
+ "height": 2,
275
+ "width": 0,
276
+ },
277
+ "shadowOpacity": 0.12,
278
+ "shadowRadius": 4,
279
+ "width": 42,
280
+ },
281
+ undefined,
282
+ ]
283
+ }
284
+ themeIsIcon={false}
285
+ themeState="idle"
286
+ >
287
+ <Image
288
+ source={
289
+ {
290
+ "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAMTWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSIQ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AAAEAAAAIoAMABAAAAAEAAAAIAAAAAEFTQ0lJAAAAU2NyZWVuc2hvdBeSOpEAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAHSaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjg8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+ODwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlVzZXJDb21tZW50PlNjcmVlbnNob3Q8L2V4aWY6VXNlckNvbW1lbnQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgrJ2rAsAAAAHGlET1QAAAACAAAAAAAAAAQAAAAoAAAABAAAAAQAAABImG6utAAAABRJREFUKBVivHXr8n8GPICR9goAAAAA//9K32nDAAAAEUlEQVRjvHXr8n8GPICR9goAGFwcOfIUKXsAAAAASUVORK5CYII=",
291
+ }
292
+ }
293
+ style={
294
+ [
295
+ {
296
+ "borderRadius": 8,
297
+ "height": "100%",
298
+ "width": "100%",
299
+ },
300
+ undefined,
301
+ ]
302
+ }
303
+ testID="map-pin-image"
304
+ />
305
+ </View>
306
+ </View>
307
+ <View
308
+ pointerEvents="box-none"
309
+ position="bottom"
310
+ style={
311
+ [
312
+ {
313
+ "bottom": 0,
314
+ "elevation": 9999,
315
+ "flexDirection": "column-reverse",
316
+ "left": 0,
317
+ "paddingHorizontal": 24,
318
+ "paddingVertical": 16,
319
+ "position": "absolute",
320
+ "right": 0,
321
+ "top": 0,
322
+ },
323
+ undefined,
324
+ ]
325
+ }
326
+ />
327
+ </View>
328
+ `;
329
+
330
+ exports[`MapPin renders selected state correctly 1`] = `
331
+ <View
332
+ style={
333
+ {
334
+ "flex": 1,
335
+ }
336
+ }
337
+ >
338
+ <View
339
+ style={
340
+ [
341
+ {
342
+ "alignItems": "center",
343
+ "display": "flex",
344
+ "height": 42,
345
+ "justifyContent": "center",
346
+ "width": 42,
347
+ },
348
+ undefined,
349
+ ]
350
+ }
351
+ testID="map-pin"
352
+ >
353
+ <View
354
+ style={
355
+ [
356
+ {
357
+ "alignItems": "center",
358
+ "backgroundColor": "#4d6265",
359
+ "borderColor": "#795e90",
360
+ "borderRadius": 12,
361
+ "borderWidth": 4,
362
+ "display": "flex",
363
+ "elevation": 3,
364
+ "height": 42,
365
+ "justifyContent": "center",
366
+ "shadowColor": "#001f23",
367
+ "shadowOffset": {
368
+ "height": 2,
369
+ "width": 0,
370
+ },
371
+ "shadowOpacity": 0.12,
372
+ "shadowRadius": 4,
373
+ "width": 42,
374
+ },
375
+ undefined,
376
+ ]
377
+ }
378
+ themeIsIcon={true}
379
+ themeState="selected"
380
+ >
381
+ <HeroIcon
382
+ name="activate"
383
+ style={
384
+ [
385
+ {
386
+ "color": "#ffffff",
387
+ "fontSize": 16,
388
+ },
389
+ undefined,
390
+ ]
391
+ }
392
+ testID="map-pin-icon"
393
+ themeIntent="text-inverted"
394
+ themeSize="xsmall"
395
+ />
396
+ </View>
397
+ <View
398
+ collapsable={false}
399
+ style={
400
+ {
401
+ "alignItems": "center",
402
+ "backgroundColor": "#795e90",
403
+ "borderColor": "#795e90",
404
+ "borderRadius": 999,
405
+ "borderWidth": 2,
406
+ "height": 24,
407
+ "justifyContent": "center",
408
+ "minWidth": 24,
409
+ "opacity": 1,
410
+ "paddingHorizontal": undefined,
411
+ "position": "absolute",
412
+ "right": -8,
413
+ "top": -8,
414
+ "transform": [
415
+ {
416
+ "scale": 1,
417
+ },
418
+ ],
419
+ "zIndex": 2,
420
+ }
421
+ }
422
+ testID="map-pin-badge"
423
+ themeIntent="primary"
424
+ themePadding="narrowContent"
425
+ themeSize="medium"
426
+ themeVariant="filled"
427
+ >
428
+ <HeroIcon
429
+ name="checkmark"
430
+ style={
431
+ [
432
+ {
433
+ "color": "#ffffff",
434
+ "fontSize": 24,
435
+ },
436
+ [
437
+ {
438
+ "fontSize": 12,
439
+ },
440
+ undefined,
441
+ ],
442
+ ]
443
+ }
444
+ themeIntent="text-inverted"
445
+ themeSize="medium"
446
+ />
447
+ </View>
448
+ </View>
449
+ <View
450
+ pointerEvents="box-none"
451
+ position="bottom"
452
+ style={
453
+ [
454
+ {
455
+ "bottom": 0,
456
+ "elevation": 9999,
457
+ "flexDirection": "column-reverse",
458
+ "left": 0,
459
+ "paddingHorizontal": 24,
460
+ "paddingVertical": 16,
461
+ "position": "absolute",
462
+ "right": 0,
463
+ "top": 0,
464
+ },
465
+ undefined,
466
+ ]
467
+ }
468
+ />
469
+ </View>
470
+ `;