@hero-design/rn 8.73.0 → 8.74.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 (46) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/CHANGELOG.md +14 -0
  3. package/es/index.js +16 -22
  4. package/lib/index.js +16 -22
  5. package/package.json +1 -1
  6. package/src/components/Chip/StyledChip.tsx +1 -7
  7. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +4 -17
  8. package/src/components/Icon/HeroIcon/index.tsx +3 -1
  9. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +405 -0
  10. package/src/components/Icon/__tests__/index.spec.tsx +14 -2
  11. package/src/components/Icon/index.tsx +2 -1
  12. package/src/components/MapPin/StyledMapPin.tsx +2 -5
  13. package/src/components/MapPin/__tests__/__snapshots__/index.spec.tsx.snap +9 -13
  14. package/src/components/MapPin/index.tsx +2 -2
  15. package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
  16. package/src/components/Typography/Body/__tests__/index.spec.tsx +1 -0
  17. package/src/components/Typography/Body/index.tsx +2 -1
  18. package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +50 -0
  19. package/src/components/Typography/Caption/__tests__/index.spec.tsx +1 -0
  20. package/src/components/Typography/Caption/index.tsx +2 -1
  21. package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +48 -0
  22. package/src/components/Typography/Label/__tests__/index.spec.tsx +1 -0
  23. package/src/components/Typography/Label/index.tsx +2 -1
  24. package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
  25. package/src/components/Typography/Title/__tests__/index.spec.tsx +1 -0
  26. package/src/components/Typography/Title/index.tsx +2 -1
  27. package/src/components/Typography/types.ts +2 -1
  28. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +3 -6
  29. package/src/theme/components/chip.ts +1 -7
  30. package/src/theme/components/icon.ts +1 -0
  31. package/src/theme/components/mapPin.ts +0 -1
  32. package/src/theme/components/typography.ts +1 -0
  33. package/stats/8.73.1/rn-stats.html +4842 -0
  34. package/stats/8.74.0/rn-stats.html +4842 -0
  35. package/types/components/Icon/HeroIcon/index.d.ts +1 -1
  36. package/types/components/Icon/index.d.ts +1 -1
  37. package/types/components/MapPin/StyledMapPin.d.ts +0 -1
  38. package/types/components/Typography/Body/index.d.ts +1 -1
  39. package/types/components/Typography/Caption/index.d.ts +1 -1
  40. package/types/components/Typography/Label/index.d.ts +1 -1
  41. package/types/components/Typography/Title/index.d.ts +1 -1
  42. package/types/components/Typography/types.d.ts +1 -1
  43. package/types/theme/components/chip.d.ts +1 -5
  44. package/types/theme/components/icon.d.ts +1 -0
  45. package/types/theme/components/mapPin.d.ts +0 -1
  46. package/types/theme/components/typography.d.ts +1 -0
@@ -300,6 +300,56 @@ exports[`Caption has inverted intent style 1`] = `
300
300
  </View>
301
301
  `;
302
302
 
303
+ exports[`Caption has muted intent style 1`] = `
304
+ <View
305
+ style={
306
+ {
307
+ "flex": 1,
308
+ }
309
+ }
310
+ >
311
+ <Text
312
+ allowFontScaling={false}
313
+ style={
314
+ [
315
+ {
316
+ "color": "#4d6265",
317
+ "fontFamily": "BeVietnamPro-Regular",
318
+ "fontSize": 12,
319
+ "letterSpacing": 0.36,
320
+ "lineHeight": 16,
321
+ },
322
+ undefined,
323
+ ]
324
+ }
325
+ themeFontWeight="regular"
326
+ themeIntent="muted"
327
+ >
328
+ This is a test
329
+ </Text>
330
+ <View
331
+ pointerEvents="box-none"
332
+ position="bottom"
333
+ style={
334
+ [
335
+ {
336
+ "bottom": 0,
337
+ "elevation": 9999,
338
+ "flexDirection": "column-reverse",
339
+ "left": 0,
340
+ "paddingHorizontal": 24,
341
+ "paddingVertical": 16,
342
+ "position": "absolute",
343
+ "right": 0,
344
+ "top": 0,
345
+ },
346
+ undefined,
347
+ ]
348
+ }
349
+ />
350
+ </View>
351
+ `;
352
+
303
353
  exports[`Caption has primary intent style 1`] = `
304
354
  <View
305
355
  style={
@@ -36,6 +36,7 @@ describe('Caption', () => {
36
36
  ${'inverted'}
37
37
  ${'archived'}
38
38
  ${'disabled'}
39
+ ${'muted'}
39
40
  `('has $intent intent style', ({ intent }) => {
40
41
  const { toJSON } = renderWithTheme(
41
42
  <Caption intent={intent}>This is a test</Caption>
@@ -30,7 +30,8 @@ export interface CaptionProps extends NativeTextProps {
30
30
  | 'danger'
31
31
  | 'inverted'
32
32
  | 'archived'
33
- | 'disabled';
33
+ | 'disabled'
34
+ | 'muted';
34
35
  /**
35
36
  * Additional style.
36
37
  */
@@ -288,6 +288,54 @@ exports[`Label has inverted intent style 1`] = `
288
288
  </View>
289
289
  `;
290
290
 
291
+ exports[`Label has muted intent style 1`] = `
292
+ <View
293
+ style={
294
+ {
295
+ "flex": 1,
296
+ }
297
+ }
298
+ >
299
+ <Text
300
+ allowFontScaling={false}
301
+ style={
302
+ [
303
+ {
304
+ "color": "#4d6265",
305
+ "fontSize": 10,
306
+ "letterSpacing": 0,
307
+ "lineHeight": 14,
308
+ },
309
+ undefined,
310
+ ]
311
+ }
312
+ themeIntent="muted"
313
+ >
314
+ This is a test
315
+ </Text>
316
+ <View
317
+ pointerEvents="box-none"
318
+ position="bottom"
319
+ style={
320
+ [
321
+ {
322
+ "bottom": 0,
323
+ "elevation": 9999,
324
+ "flexDirection": "column-reverse",
325
+ "left": 0,
326
+ "paddingHorizontal": 24,
327
+ "paddingVertical": 16,
328
+ "position": "absolute",
329
+ "right": 0,
330
+ "top": 0,
331
+ },
332
+ undefined,
333
+ ]
334
+ }
335
+ />
336
+ </View>
337
+ `;
338
+
291
339
  exports[`Label has primary intent style 1`] = `
292
340
  <View
293
341
  style={
@@ -22,6 +22,7 @@ describe('Label', () => {
22
22
  ${'inverted'}
23
23
  ${'archived'}
24
24
  ${'disabled'}
25
+ ${'muted'}
25
26
  `('has $intent intent style', ({ intent }) => {
26
27
  const { toJSON } = renderWithTheme(
27
28
  <Label intent={intent}>This is a test</Label>
@@ -26,7 +26,8 @@ export interface LabelProps extends NativeTextProps {
26
26
  | 'danger'
27
27
  | 'inverted'
28
28
  | 'archived'
29
- | 'disabled';
29
+ | 'disabled'
30
+ | 'muted';
30
31
  /**
31
32
  * Additional style.
32
33
  */
@@ -918,6 +918,57 @@ exports[`Title has inverted intent style 1`] = `
918
918
  </View>
919
919
  `;
920
920
 
921
+ exports[`Title has muted intent style 1`] = `
922
+ <View
923
+ style={
924
+ {
925
+ "flex": 1,
926
+ }
927
+ }
928
+ >
929
+ <Text
930
+ allowFontScaling={false}
931
+ style={
932
+ [
933
+ {
934
+ "color": "#4d6265",
935
+ "fontFamily": "BeVietnamPro-Regular",
936
+ "fontSize": 42,
937
+ "letterSpacing": 0,
938
+ "lineHeight": 50,
939
+ },
940
+ undefined,
941
+ ]
942
+ }
943
+ themeIntent="muted"
944
+ themeLevel="h1"
945
+ themeTypeface="neutral"
946
+ >
947
+ This is a test
948
+ </Text>
949
+ <View
950
+ pointerEvents="box-none"
951
+ position="bottom"
952
+ style={
953
+ [
954
+ {
955
+ "bottom": 0,
956
+ "elevation": 9999,
957
+ "flexDirection": "column-reverse",
958
+ "left": 0,
959
+ "paddingHorizontal": 24,
960
+ "paddingVertical": 16,
961
+ "position": "absolute",
962
+ "right": 0,
963
+ "top": 0,
964
+ },
965
+ undefined,
966
+ ]
967
+ }
968
+ />
969
+ </View>
970
+ `;
971
+
921
972
  exports[`Title has primary intent style 1`] = `
922
973
  <View
923
974
  style={
@@ -22,6 +22,7 @@ describe('Title', () => {
22
22
  ${'inverted'}
23
23
  ${'archived'}
24
24
  ${'disabled'}
25
+ ${'muted'}
25
26
  `('has $intent intent style', ({ intent }) => {
26
27
  const { toJSON } = renderWithTheme(
27
28
  <Title intent={intent}>This is a test</Title>
@@ -26,7 +26,8 @@ export interface TitleProps extends NativeTextProps {
26
26
  | 'danger'
27
27
  | 'inverted'
28
28
  | 'archived'
29
- | 'disabled';
29
+ | 'disabled'
30
+ | 'muted';
30
31
  /**
31
32
  * Additional style.
32
33
  */
@@ -15,4 +15,5 @@ export type ThemeIntent =
15
15
  | 'danger'
16
16
  | 'inverted'
17
17
  | 'archived'
18
- | 'disabled';
18
+ | 'disabled'
19
+ | 'muted';
@@ -384,6 +384,7 @@ exports[`theme returns correct theme object 1`] = `
384
384
  "chip": {
385
385
  "borderWidths": {
386
386
  "icon": 2,
387
+ "outlinedDefaultBorder": 1,
387
388
  "wrapper": 1,
388
389
  },
389
390
  "colors": {
@@ -412,15 +413,10 @@ exports[`theme returns correct theme object 1`] = `
412
413
  "shadowRadius": 4,
413
414
  },
414
415
  },
415
- "sizes": {
416
- "outlinedDefaultBorder": 1,
417
- "outlinedSelectedBorder": 2,
418
- },
419
416
  "space": {
420
417
  "compactWrapperHorizontalPadding": 8,
421
418
  "compactWrapperVerticalPadding": 4,
422
419
  "iconWrapperHorizontalMargin": 8,
423
- "outlinedSelectedMarginTop": -2,
424
420
  "wrapperHorizontalPadding": 12,
425
421
  "wrapperVerticalPadding": 8,
426
422
  },
@@ -600,6 +596,7 @@ exports[`theme returns correct theme object 1`] = `
600
596
  "disabledText": "#bfc1c5",
601
597
  "info": "#b5c3fd",
602
598
  "invertedText": "#ffffff",
599
+ "muted": "#4d6265",
603
600
  "primary": "#401960",
604
601
  "secondary": "#795e90",
605
602
  "success": "#5ace7d",
@@ -676,7 +673,6 @@ exports[`theme returns correct theme object 1`] = `
676
673
  "idle": "#ffffff",
677
674
  "selected": "#795e90",
678
675
  },
679
- "iconBackground": "#4d6265",
680
676
  },
681
677
  "fontSizes": {
682
678
  "icon": 42,
@@ -1315,6 +1311,7 @@ exports[`theme returns correct theme object 1`] = `
1315
1311
  "disabled": "#bfc1c5",
1316
1312
  "info": "#355bfb",
1317
1313
  "inverted": "#ffffff",
1314
+ "muted": "#4d6265",
1318
1315
  "primary": "#401960",
1319
1316
  "secondary": "#795e90",
1320
1317
  "subdued": "#4d6265",
@@ -19,12 +19,6 @@ const getChipTheme = (theme: GlobalTheme) => {
19
19
  compactWrapperHorizontalPadding: theme.space.small,
20
20
  compactWrapperVerticalPadding: theme.space.xsmall,
21
21
  iconWrapperHorizontalMargin: theme.space.small,
22
- outlinedSelectedMarginTop: -theme.space.xxsmall,
23
- };
24
-
25
- const sizes = {
26
- outlinedDefaultBorder: theme.borderWidths.base,
27
- outlinedSelectedBorder: theme.borderWidths.medium,
28
22
  };
29
23
 
30
24
  const radii = {
@@ -34,6 +28,7 @@ const getChipTheme = (theme: GlobalTheme) => {
34
28
  const borderWidths = {
35
29
  wrapper: theme.borderWidths.base,
36
30
  icon: theme.borderWidths.medium,
31
+ outlinedDefaultBorder: theme.borderWidths.base,
37
32
  };
38
33
 
39
34
  const shadows = {
@@ -43,7 +38,6 @@ const getChipTheme = (theme: GlobalTheme) => {
43
38
  return {
44
39
  colors,
45
40
  space,
46
- sizes,
47
41
  radii,
48
42
  borderWidths,
49
43
  shadows,
@@ -11,6 +11,7 @@ const getIconTheme = (theme: GlobalTheme) => {
11
11
  warning: theme.colors.warning,
12
12
  disabledText: theme.colors.disabledOnDefaultGlobalSurface,
13
13
  invertedText: theme.colors.onDarkGlobalSurface,
14
+ muted: theme.colors.mutedOnDefaultGlobalSurface,
14
15
  };
15
16
 
16
17
  const sizes = {
@@ -21,7 +21,6 @@ const getMapPinTheme = (theme: GlobalTheme) => {
21
21
  },
22
22
  badge: theme.colors.secondary,
23
23
  background: theme.colors.defaultGlobalSurface,
24
- iconBackground: theme.colors.mutedOnDefaultGlobalSurface,
25
24
  };
26
25
 
27
26
  const radii = {
@@ -13,6 +13,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
13
13
  inverted: theme.colors.onDarkGlobalSurface,
14
14
  archived: theme.colors.onArchivedSurface,
15
15
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
16
+ muted: theme.colors.mutedOnDefaultGlobalSurface,
16
17
  };
17
18
 
18
19
  const fontSizes = {