@hero-design/rn 8.12.2 → 8.12.4

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 (93) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/es/index.js +70 -36
  3. package/lib/index.js +70 -36
  4. package/package.json +5 -5
  5. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -0
  6. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
  7. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +13 -0
  8. package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  9. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +21 -4
  10. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +189 -36
  11. package/src/components/Avatar/StyledAvatar.tsx +11 -4
  12. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +21 -4
  13. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +42 -8
  14. package/src/components/Badge/StyledBadge.tsx +4 -2
  15. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +132 -42
  16. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +1 -0
  17. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  18. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  19. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  20. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +10 -0
  21. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +10 -0
  22. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -0
  23. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +6 -0
  24. package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +2 -0
  25. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +16 -0
  26. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  27. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -0
  28. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  29. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +2 -0
  30. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +4 -0
  31. package/src/components/Empty/StyledEmpty.tsx +14 -13
  32. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +76 -20
  33. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +56 -16
  34. package/src/components/FAB/StyledFAB.tsx +3 -2
  35. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -0
  36. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +22 -8
  37. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +4 -0
  38. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +53 -8
  39. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +4 -0
  40. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +4 -0
  41. package/src/components/PinInput/StyledPinInput.tsx +6 -3
  42. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +93 -18
  43. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +73 -13
  44. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +3 -0
  45. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +2 -0
  46. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +3 -0
  47. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -0
  48. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +23 -1
  49. package/src/components/SectionHeading/__tests__/index.spec.tsx +2 -2
  50. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  51. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
  52. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +38 -0
  53. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  54. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +20 -0
  55. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +35 -0
  56. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +3 -0
  57. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  58. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +1 -0
  59. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -0
  60. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +24 -7
  61. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +22 -7
  62. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +29 -9
  63. package/src/components/Tabs/__tests__/index.spec.tsx +5 -5
  64. package/src/components/Tag/StyledTag.tsx +3 -2
  65. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +167 -62
  66. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +22 -0
  67. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +51 -0
  68. package/src/components/TextInput/index.tsx +2 -0
  69. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +5 -0
  70. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +7 -0
  71. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +13 -0
  72. package/src/components/Typography/Text/StyledText.tsx +1 -0
  73. package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
  74. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +23 -0
  75. package/src/components/Typography/Text/index.tsx +3 -0
  76. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +19 -0
  77. package/src/theme/components/avatar.ts +11 -1
  78. package/src/theme/components/badge.ts +5 -1
  79. package/src/theme/components/pinInput.ts +14 -1
  80. package/src/theme/components/typography.ts +2 -0
  81. package/src/theme/global/colors/__tests__/__snapshots__/eBens.spec.ts.snap +4 -4
  82. package/types/components/Avatar/StyledAvatar.d.ts +4 -5
  83. package/types/components/Badge/StyledBadge.d.ts +3 -5
  84. package/types/components/Empty/StyledEmpty.d.ts +5 -9
  85. package/types/components/FAB/StyledFAB.d.ts +3 -5
  86. package/types/components/PinInput/StyledPinInput.d.ts +5 -9
  87. package/types/components/Tag/StyledTag.d.ts +3 -5
  88. package/types/components/Typography/Text/StyledText.d.ts +1 -1
  89. package/types/components/Typography/Text/index.d.ts +2 -2
  90. package/types/theme/components/avatar.d.ts +10 -0
  91. package/types/theme/components/badge.d.ts +3 -0
  92. package/types/theme/components/pinInput.d.ts +4 -0
  93. package/types/theme/components/typography.d.ts +2 -0
@@ -1,9 +1,9 @@
1
- @hero-design/rn:build: cache hit, replaying output 11fbf9e3773167e6
2
- @hero-design/rn:build: $ yarn build:js && yarn build:types
3
- @hero-design/rn:build: $ rollup -c
4
- @hero-design/rn:build: 
5
- @hero-design/rn:build: src/index.ts → lib/index.js, es/index.js...
6
- @hero-design/rn:build: (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
7
- @hero-design/rn:build: (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
8
- @hero-design/rn:build: created lib/index.js, es/index.js in 24.8s
9
- @hero-design/rn:build: $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
1
+ @hero-design/rn:build: cache hit, replaying output c1ce0a6dbcd003d9
2
+ @hero-design/rn:build: $ yarn build:js && yarn build:types
3
+ @hero-design/rn:build: $ rollup -c
4
+ @hero-design/rn:build: 
5
+ @hero-design/rn:build: src/index.ts → lib/index.js, es/index.js...
6
+ @hero-design/rn:build: (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
7
+ @hero-design/rn:build: (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
8
+ @hero-design/rn:build: created lib/index.js, es/index.js in 26.9s
9
+ @hero-design/rn:build: $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
package/es/index.js CHANGED
@@ -969,7 +969,7 @@ var blue$1 = colorScales.blue,
969
969
  purple$1 = colorScales.purple,
970
970
  vermilion$3 = colorScales.vermilion,
971
971
  smalt = colorScales.smalt,
972
- violet$2 = colorScales.violet,
972
+ violet$1 = colorScales.violet,
973
973
  yellow$1 = colorScales.yellow;
974
974
  ({
975
975
  black: '#000000',
@@ -1042,16 +1042,16 @@ var blue$1 = colorScales.blue,
1042
1042
  smaltLight45: smalt.lighten45,
1043
1043
  smaltLight75: smalt.lighten75,
1044
1044
  smaltLight90: smalt.lighten90,
1045
- violet: violet$2.base,
1046
- violetDark15: violet$2.darken15,
1047
- violetDark30: violet$2.darken30,
1048
- violetDark45: violet$2.darken45,
1049
- violetDark60: violet$2.darken60,
1050
- violetDark75: violet$2.darken75,
1051
- violetLight30: violet$2.lighten30,
1052
- violetLight60: violet$2.lighten60,
1053
- violetLight75: violet$2.lighten75,
1054
- violetLight90: violet$2.lighten90,
1045
+ violet: violet$1.base,
1046
+ violetDark15: violet$1.darken15,
1047
+ violetDark30: violet$1.darken30,
1048
+ violetDark45: violet$1.darken45,
1049
+ violetDark60: violet$1.darken60,
1050
+ violetDark75: violet$1.darken75,
1051
+ violetLight30: violet$1.lighten30,
1052
+ violetLight60: violet$1.lighten60,
1053
+ violetLight75: violet$1.lighten75,
1054
+ violetLight90: violet$1.lighten90,
1055
1055
  yellow: yellow$1.base,
1056
1056
  yellowDark15: yellow$1.darken15,
1057
1057
  yellowDark75: yellow$1.darken75,
@@ -1191,8 +1191,8 @@ var currant$1 = colorScales.currant,
1191
1191
  pastelRed = colorScales.pastelRed,
1192
1192
  vermilion = colorScales.vermilion,
1193
1193
  mauve$3 = colorScales.mauve,
1194
- violet1$2 = colorScales.violet1,
1195
- violet$1 = colorScales.violet,
1194
+ violet1$3 = colorScales.violet1,
1195
+ violet$2 = colorScales.violet,
1196
1196
  scarletGum$2 = colorScales.scarletGum;
1197
1197
  var palette$6 = {
1198
1198
  currant: currant$1.base,
@@ -1211,18 +1211,18 @@ var palette$6 = {
1211
1211
  pastelRed: pastelRed.base,
1212
1212
  vermilion: vermilion.base,
1213
1213
  mauve: mauve$3.base,
1214
- violetLight30: violet$1.lighten30,
1215
- violet1: violet1$2.base,
1216
- violet: violet$1.base,
1214
+ violetLight30: violet$2.lighten30,
1215
+ violet1: violet1$3.base,
1216
+ violet: violet$2.base,
1217
1217
  scarletGum: scarletGum$2.base
1218
1218
  };
1219
- var violet$3 = colorScales.violet,
1219
+ var violet1$2 = colorScales.violet1,
1220
1220
  mauve$2 = colorScales.mauve;
1221
1221
  var palette$5 = Object.assign(Object.assign({}, palette$8), {
1222
- violet: violet$3.base,
1223
- violetLight20: violet$3.lighten20,
1224
- violetLight30: violet$3.lighten30,
1225
- violetLight90: violet$3.lighten90,
1222
+ violet: violet1$2.base,
1223
+ violetLight20: violet1$2.lighten20,
1224
+ violetLight30: violet1$2.lighten30,
1225
+ violetLight90: violet1$2.lighten90,
1226
1226
  mauve: mauve$2.base,
1227
1227
  mauveLight80: mauve$2.lighten80
1228
1228
  });
@@ -1723,6 +1723,16 @@ var getAvatarTheme = function getAvatarTheme(theme) {
1723
1723
  xxxxlarge: theme.space.xlarge * 1.5,
1724
1724
  xxxxxlarge: theme.space.xxlarge * 1.5
1725
1725
  };
1726
+ var lineHeights = {
1727
+ small: theme.lineHeights.large,
1728
+ medium: theme.lineHeights.xlarge,
1729
+ large: theme.lineHeights.xxlarge,
1730
+ xlarge: theme.lineHeights.xxxlarge,
1731
+ xxlarge: theme.lineHeights.medium * 2,
1732
+ xxxlarge: theme.lineHeights.large * 1.5,
1733
+ xxxxlarge: theme.lineHeights.xlarge * 1.5,
1734
+ xxxxxlarge: theme.lineHeights.xxlarge * 1.5
1735
+ };
1726
1736
  var radii = {
1727
1737
  rounded: theme.radii.rounded
1728
1738
  };
@@ -1731,7 +1741,8 @@ var getAvatarTheme = function getAvatarTheme(theme) {
1731
1741
  sizes: sizes,
1732
1742
  radii: radii,
1733
1743
  fonts: fonts,
1734
- fontSizes: fontSizes
1744
+ fontSizes: fontSizes,
1745
+ lineHeights: lineHeights
1735
1746
  };
1736
1747
  };
1737
1748
 
@@ -1751,6 +1762,9 @@ var getBadgeTheme = function getBadgeTheme(theme) {
1751
1762
  var fontSizes = {
1752
1763
  "default": theme.fontSizes.small
1753
1764
  };
1765
+ var lineHeights = {
1766
+ "default": theme.lineHeights.small
1767
+ };
1754
1768
  var sizes = {
1755
1769
  height: theme.fontSizes.small + theme.sizes.small,
1756
1770
  minWidth: theme.fontSizes.small + theme.sizes.small,
@@ -1767,7 +1781,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
1767
1781
  fonts: fonts,
1768
1782
  fontSizes: fontSizes,
1769
1783
  sizes: sizes,
1770
- space: space
1784
+ space: space,
1785
+ lineHeights: lineHeights
1771
1786
  };
1772
1787
  };
1773
1788
 
@@ -2337,6 +2352,10 @@ var getPinInputTheme = function getPinInputTheme(theme) {
2337
2352
  cellText: theme.fontSizes.xxxxlarge,
2338
2353
  errorMessage: theme.fontSizes.small
2339
2354
  };
2355
+ var lineHeights = {
2356
+ cellText: theme.lineHeights.xxxxlarge,
2357
+ errorMessage: theme.fontSizes.small
2358
+ };
2340
2359
  var sizes = {
2341
2360
  cellWidth: theme.sizes.xxlarge,
2342
2361
  cellHeight: theme.sizes.xxxlarge,
@@ -2352,6 +2371,7 @@ var getPinInputTheme = function getPinInputTheme(theme) {
2352
2371
  };
2353
2372
  return {
2354
2373
  borderWidths: borderWidths,
2374
+ lineHeights: lineHeights,
2355
2375
  colors: colors,
2356
2376
  fonts: fonts,
2357
2377
  fontSizes: fontSizes,
@@ -2869,6 +2889,7 @@ var getTypographyTheme = function getTypographyTheme(theme) {
2869
2889
  archived: theme.colors.onArchivedSurface
2870
2890
  };
2871
2891
  var fontSizes = {
2892
+ xsmall: theme.fontSizes.xsmall,
2872
2893
  small: theme.fontSizes.small,
2873
2894
  medium: theme.fontSizes.medium,
2874
2895
  large: theme.fontSizes.large,
@@ -2880,6 +2901,7 @@ var getTypographyTheme = function getTypographyTheme(theme) {
2880
2901
  '7xlarge': theme.fontSizes['7xlarge']
2881
2902
  };
2882
2903
  var lineHeights = {
2904
+ xsmall: theme.lineHeights.xsmall,
2883
2905
  small: theme.lineHeights.small,
2884
2906
  medium: theme.lineHeights.medium,
2885
2907
  large: theme.lineHeights.large,
@@ -5956,7 +5978,7 @@ var StyledText$3 = index$a(Text$1)(function (_ref) {
5956
5978
  });
5957
5979
  });
5958
5980
 
5959
- var _excluded$p = ["children", "fontSize", "fontWeight", "intent", "typeface"];
5981
+ var _excluded$p = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
5960
5982
  var Text = function Text(_ref) {
5961
5983
  var children = _ref.children,
5962
5984
  _ref$fontSize = _ref.fontSize,
@@ -5967,12 +5989,15 @@ var Text = function Text(_ref) {
5967
5989
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
5968
5990
  _ref$typeface = _ref.typeface,
5969
5991
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
5992
+ _ref$allowFontScaling = _ref.allowFontScaling,
5993
+ allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
5970
5994
  nativeProps = _objectWithoutProperties(_ref, _excluded$p);
5971
5995
  return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
5972
5996
  themeFontSize: fontSize,
5973
5997
  themeFontWeight: fontWeight,
5974
5998
  themeIntent: intent,
5975
- themeTypeface: typeface
5999
+ themeTypeface: typeface,
6000
+ allowFontScaling: allowFontScaling
5976
6001
  }), children);
5977
6002
  };
5978
6003
 
@@ -6806,12 +6831,15 @@ var StyledTextWrapper$1 = index$a(View)(function () {
6806
6831
  height: '100%'
6807
6832
  };
6808
6833
  });
6809
- var StyledText$2 = index$a(Text$1)(function (_ref2) {
6834
+ var StyledText$2 = index$a(Typography.Text)(function (_ref2) {
6810
6835
  var themeSize = _ref2.themeSize,
6811
6836
  theme = _ref2.theme;
6812
6837
  return {
6813
6838
  fontFamily: theme.__hd__.avatar.fonts["default"],
6814
6839
  fontSize: theme.__hd__.avatar.fontSizes[themeSize],
6840
+ lineHeight: 0,
6841
+ textAlignVertical: 'center',
6842
+ textAlign: 'center',
6815
6843
  color: theme.__hd__.avatar.colors.text,
6816
6844
  overflow: 'hidden'
6817
6845
  };
@@ -6960,11 +6988,12 @@ var StyledView$2 = index$a(Animated.View)(function (_ref) {
6960
6988
  paddingHorizontal: themePadding === 'wideContent' ? theme.__hd__.badge.space.horizontalPadding : undefined
6961
6989
  };
6962
6990
  });
6963
- var StyledText$1 = index$a(Text$1)(function (_ref2) {
6991
+ var StyledText$1 = index$a(Typography.Text)(function (_ref2) {
6964
6992
  var theme = _ref2.theme;
6965
6993
  return {
6966
6994
  fontFamily: theme.__hd__.badge.fonts["default"],
6967
6995
  fontSize: theme.__hd__.badge.fontSizes["default"],
6996
+ lineHeight: theme.__hd__.badge.lineHeights["default"],
6968
6997
  color: theme.__hd__.badge.colors.text,
6969
6998
  includeFontPadding: false,
6970
6999
  textAlignVertical: 'center',
@@ -11514,7 +11543,7 @@ var StyledErrorAndMaxLengthContainer = index$a(View)(function () {
11514
11543
  };
11515
11544
  });
11516
11545
 
11517
- var _excluded$a = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue"];
11546
+ var _excluded$a = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
11518
11547
  var getVariant$1 = function getVariant(_ref) {
11519
11548
  var disabled = _ref.disabled,
11520
11549
  error = _ref.error,
@@ -11560,6 +11589,8 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
11560
11589
  value = _ref2.value,
11561
11590
  defaultValue = _ref2.defaultValue,
11562
11591
  renderInputValue = _ref2.renderInputValue,
11592
+ _ref2$allowFontScalin = _ref2.allowFontScaling,
11593
+ allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
11563
11594
  nativeProps = _objectWithoutProperties(_ref2, _excluded$a);
11564
11595
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
11565
11596
  var isEmptyValue = displayText.length === 0;
@@ -11648,7 +11679,8 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
11648
11679
  },
11649
11680
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
11650
11681
  // @ts-ignore
11651
- accessibilityLabelledBy: accessibilityLabelledBy
11682
+ accessibilityLabelledBy: accessibilityLabelledBy,
11683
+ allowFontScaling: allowFontScaling
11652
11684
  }, nativeProps), {}, {
11653
11685
  onFocus: function onFocus(event) {
11654
11686
  var _nativeProps$onFocus;
@@ -12185,7 +12217,7 @@ var StyledWrapper$5 = index$a(View)(function (_ref) {
12185
12217
  padding: theme.__hd__.empty.space.wrapperPadding
12186
12218
  };
12187
12219
  });
12188
- var StyledTitle = index$a(Text$1)(function (_ref2) {
12220
+ var StyledTitle = index$a(Typography.Text)(function (_ref2) {
12189
12221
  var theme = _ref2.theme,
12190
12222
  themeVariant = _ref2.themeVariant;
12191
12223
  return {
@@ -12196,7 +12228,7 @@ var StyledTitle = index$a(Text$1)(function (_ref2) {
12196
12228
  color: themeVariant === 'dark' ? theme.__hd__.empty.colors.invertedText : theme.__hd__.empty.colors.text
12197
12229
  };
12198
12230
  });
12199
- var StyledDescription = index$a(Text$1)(function (_ref3) {
12231
+ var StyledDescription = index$a(Typography.Text)(function (_ref3) {
12200
12232
  var theme = _ref3.theme,
12201
12233
  themeVariant = _ref3.themeVariant;
12202
12234
  return {
@@ -12253,7 +12285,7 @@ var StyledFABIcon = index$a(Icon)(function (_ref2) {
12253
12285
  textAlign: 'center'
12254
12286
  };
12255
12287
  });
12256
- var StyledFABText = index$a(Text$1)(function (_ref3) {
12288
+ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
12257
12289
  var theme = _ref3.theme;
12258
12290
  return {
12259
12291
  fontFamily: theme.__hd__.fab.fonts.title,
@@ -12736,12 +12768,13 @@ var StyledCell = index$a(View)(function (_ref) {
12736
12768
  borderColor: theme.__hd__.pinInput.colors[themeState]
12737
12769
  };
12738
12770
  });
12739
- var StyledCellText = index$a(Text$1)(function (_ref2) {
12771
+ var StyledCellText = index$a(Typography.Text)(function (_ref2) {
12740
12772
  var theme = _ref2.theme,
12741
12773
  themeState = _ref2.themeState;
12742
12774
  return {
12743
12775
  fontFamily: theme.__hd__.pinInput.fonts.cellText,
12744
12776
  fontSize: theme.__hd__.pinInput.fontSizes.cellText,
12777
+ lineHeight: theme.__hd__.pinInput.lineHeights.cellText,
12745
12778
  color: theme.__hd__.pinInput.colors[themeState]
12746
12779
  };
12747
12780
  });
@@ -12792,10 +12825,11 @@ var StyledErrorContainer = index$a(View)(function (_ref7) {
12792
12825
  var theme = _ref7.theme;
12793
12826
  return {
12794
12827
  flexDirection: 'row',
12795
- paddingTop: theme.__hd__.pinInput.space.errorMessagePadding
12828
+ paddingTop: theme.__hd__.pinInput.space.errorMessagePadding,
12829
+ alignItems: 'center'
12796
12830
  };
12797
12831
  });
12798
- var StyledErrorMessage = index$a(Text$1)(function (_ref8) {
12832
+ var StyledErrorMessage = index$a(Typography.Text)(function (_ref8) {
12799
12833
  var theme = _ref8.theme;
12800
12834
  return {
12801
12835
  fontFamily: theme.__hd__.pinInput.fonts.errorMessage,
@@ -14804,7 +14838,7 @@ var StyledView = index$a(View)(function (_ref) {
14804
14838
  backgroundColor: backgroundColor
14805
14839
  };
14806
14840
  });
14807
- var StyledText = index$a(Text$1)(function (_ref3) {
14841
+ var StyledText = index$a(Typography.Text)(function (_ref3) {
14808
14842
  var themeIntent = _ref3.themeIntent,
14809
14843
  themeVariant = _ref3.themeVariant,
14810
14844
  theme = _ref3.theme;
package/lib/index.js CHANGED
@@ -998,7 +998,7 @@ var blue$1 = colorScales.blue,
998
998
  purple$1 = colorScales.purple,
999
999
  vermilion$3 = colorScales.vermilion,
1000
1000
  smalt = colorScales.smalt,
1001
- violet$2 = colorScales.violet,
1001
+ violet$1 = colorScales.violet,
1002
1002
  yellow$1 = colorScales.yellow;
1003
1003
  ({
1004
1004
  black: '#000000',
@@ -1071,16 +1071,16 @@ var blue$1 = colorScales.blue,
1071
1071
  smaltLight45: smalt.lighten45,
1072
1072
  smaltLight75: smalt.lighten75,
1073
1073
  smaltLight90: smalt.lighten90,
1074
- violet: violet$2.base,
1075
- violetDark15: violet$2.darken15,
1076
- violetDark30: violet$2.darken30,
1077
- violetDark45: violet$2.darken45,
1078
- violetDark60: violet$2.darken60,
1079
- violetDark75: violet$2.darken75,
1080
- violetLight30: violet$2.lighten30,
1081
- violetLight60: violet$2.lighten60,
1082
- violetLight75: violet$2.lighten75,
1083
- violetLight90: violet$2.lighten90,
1074
+ violet: violet$1.base,
1075
+ violetDark15: violet$1.darken15,
1076
+ violetDark30: violet$1.darken30,
1077
+ violetDark45: violet$1.darken45,
1078
+ violetDark60: violet$1.darken60,
1079
+ violetDark75: violet$1.darken75,
1080
+ violetLight30: violet$1.lighten30,
1081
+ violetLight60: violet$1.lighten60,
1082
+ violetLight75: violet$1.lighten75,
1083
+ violetLight90: violet$1.lighten90,
1084
1084
  yellow: yellow$1.base,
1085
1085
  yellowDark15: yellow$1.darken15,
1086
1086
  yellowDark75: yellow$1.darken75,
@@ -1220,8 +1220,8 @@ var currant$1 = colorScales.currant,
1220
1220
  pastelRed = colorScales.pastelRed,
1221
1221
  vermilion = colorScales.vermilion,
1222
1222
  mauve$3 = colorScales.mauve,
1223
- violet1$2 = colorScales.violet1,
1224
- violet$1 = colorScales.violet,
1223
+ violet1$3 = colorScales.violet1,
1224
+ violet$2 = colorScales.violet,
1225
1225
  scarletGum$2 = colorScales.scarletGum;
1226
1226
  var palette$6 = {
1227
1227
  currant: currant$1.base,
@@ -1240,18 +1240,18 @@ var palette$6 = {
1240
1240
  pastelRed: pastelRed.base,
1241
1241
  vermilion: vermilion.base,
1242
1242
  mauve: mauve$3.base,
1243
- violetLight30: violet$1.lighten30,
1244
- violet1: violet1$2.base,
1245
- violet: violet$1.base,
1243
+ violetLight30: violet$2.lighten30,
1244
+ violet1: violet1$3.base,
1245
+ violet: violet$2.base,
1246
1246
  scarletGum: scarletGum$2.base
1247
1247
  };
1248
- var violet$3 = colorScales.violet,
1248
+ var violet1$2 = colorScales.violet1,
1249
1249
  mauve$2 = colorScales.mauve;
1250
1250
  var palette$5 = Object.assign(Object.assign({}, palette$8), {
1251
- violet: violet$3.base,
1252
- violetLight20: violet$3.lighten20,
1253
- violetLight30: violet$3.lighten30,
1254
- violetLight90: violet$3.lighten90,
1251
+ violet: violet1$2.base,
1252
+ violetLight20: violet1$2.lighten20,
1253
+ violetLight30: violet1$2.lighten30,
1254
+ violetLight90: violet1$2.lighten90,
1255
1255
  mauve: mauve$2.base,
1256
1256
  mauveLight80: mauve$2.lighten80
1257
1257
  });
@@ -1752,6 +1752,16 @@ var getAvatarTheme = function getAvatarTheme(theme) {
1752
1752
  xxxxlarge: theme.space.xlarge * 1.5,
1753
1753
  xxxxxlarge: theme.space.xxlarge * 1.5
1754
1754
  };
1755
+ var lineHeights = {
1756
+ small: theme.lineHeights.large,
1757
+ medium: theme.lineHeights.xlarge,
1758
+ large: theme.lineHeights.xxlarge,
1759
+ xlarge: theme.lineHeights.xxxlarge,
1760
+ xxlarge: theme.lineHeights.medium * 2,
1761
+ xxxlarge: theme.lineHeights.large * 1.5,
1762
+ xxxxlarge: theme.lineHeights.xlarge * 1.5,
1763
+ xxxxxlarge: theme.lineHeights.xxlarge * 1.5
1764
+ };
1755
1765
  var radii = {
1756
1766
  rounded: theme.radii.rounded
1757
1767
  };
@@ -1760,7 +1770,8 @@ var getAvatarTheme = function getAvatarTheme(theme) {
1760
1770
  sizes: sizes,
1761
1771
  radii: radii,
1762
1772
  fonts: fonts,
1763
- fontSizes: fontSizes
1773
+ fontSizes: fontSizes,
1774
+ lineHeights: lineHeights
1764
1775
  };
1765
1776
  };
1766
1777
 
@@ -1780,6 +1791,9 @@ var getBadgeTheme = function getBadgeTheme(theme) {
1780
1791
  var fontSizes = {
1781
1792
  "default": theme.fontSizes.small
1782
1793
  };
1794
+ var lineHeights = {
1795
+ "default": theme.lineHeights.small
1796
+ };
1783
1797
  var sizes = {
1784
1798
  height: theme.fontSizes.small + theme.sizes.small,
1785
1799
  minWidth: theme.fontSizes.small + theme.sizes.small,
@@ -1796,7 +1810,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
1796
1810
  fonts: fonts,
1797
1811
  fontSizes: fontSizes,
1798
1812
  sizes: sizes,
1799
- space: space
1813
+ space: space,
1814
+ lineHeights: lineHeights
1800
1815
  };
1801
1816
  };
1802
1817
 
@@ -2366,6 +2381,10 @@ var getPinInputTheme = function getPinInputTheme(theme) {
2366
2381
  cellText: theme.fontSizes.xxxxlarge,
2367
2382
  errorMessage: theme.fontSizes.small
2368
2383
  };
2384
+ var lineHeights = {
2385
+ cellText: theme.lineHeights.xxxxlarge,
2386
+ errorMessage: theme.fontSizes.small
2387
+ };
2369
2388
  var sizes = {
2370
2389
  cellWidth: theme.sizes.xxlarge,
2371
2390
  cellHeight: theme.sizes.xxxlarge,
@@ -2381,6 +2400,7 @@ var getPinInputTheme = function getPinInputTheme(theme) {
2381
2400
  };
2382
2401
  return {
2383
2402
  borderWidths: borderWidths,
2403
+ lineHeights: lineHeights,
2384
2404
  colors: colors,
2385
2405
  fonts: fonts,
2386
2406
  fontSizes: fontSizes,
@@ -2898,6 +2918,7 @@ var getTypographyTheme = function getTypographyTheme(theme) {
2898
2918
  archived: theme.colors.onArchivedSurface
2899
2919
  };
2900
2920
  var fontSizes = {
2921
+ xsmall: theme.fontSizes.xsmall,
2901
2922
  small: theme.fontSizes.small,
2902
2923
  medium: theme.fontSizes.medium,
2903
2924
  large: theme.fontSizes.large,
@@ -2909,6 +2930,7 @@ var getTypographyTheme = function getTypographyTheme(theme) {
2909
2930
  '7xlarge': theme.fontSizes['7xlarge']
2910
2931
  };
2911
2932
  var lineHeights = {
2933
+ xsmall: theme.lineHeights.xsmall,
2912
2934
  small: theme.lineHeights.small,
2913
2935
  medium: theme.lineHeights.medium,
2914
2936
  large: theme.lineHeights.large,
@@ -5985,7 +6007,7 @@ var StyledText$3 = index$a(reactNative.Text)(function (_ref) {
5985
6007
  });
5986
6008
  });
5987
6009
 
5988
- var _excluded$p = ["children", "fontSize", "fontWeight", "intent", "typeface"];
6010
+ var _excluded$p = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
5989
6011
  var Text = function Text(_ref) {
5990
6012
  var children = _ref.children,
5991
6013
  _ref$fontSize = _ref.fontSize,
@@ -5996,12 +6018,15 @@ var Text = function Text(_ref) {
5996
6018
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
5997
6019
  _ref$typeface = _ref.typeface,
5998
6020
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6021
+ _ref$allowFontScaling = _ref.allowFontScaling,
6022
+ allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
5999
6023
  nativeProps = _objectWithoutProperties(_ref, _excluded$p);
6000
6024
  return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
6001
6025
  themeFontSize: fontSize,
6002
6026
  themeFontWeight: fontWeight,
6003
6027
  themeIntent: intent,
6004
- themeTypeface: typeface
6028
+ themeTypeface: typeface,
6029
+ allowFontScaling: allowFontScaling
6005
6030
  }), children);
6006
6031
  };
6007
6032
 
@@ -6835,12 +6860,15 @@ var StyledTextWrapper$1 = index$a(reactNative.View)(function () {
6835
6860
  height: '100%'
6836
6861
  };
6837
6862
  });
6838
- var StyledText$2 = index$a(reactNative.Text)(function (_ref2) {
6863
+ var StyledText$2 = index$a(Typography.Text)(function (_ref2) {
6839
6864
  var themeSize = _ref2.themeSize,
6840
6865
  theme = _ref2.theme;
6841
6866
  return {
6842
6867
  fontFamily: theme.__hd__.avatar.fonts["default"],
6843
6868
  fontSize: theme.__hd__.avatar.fontSizes[themeSize],
6869
+ lineHeight: 0,
6870
+ textAlignVertical: 'center',
6871
+ textAlign: 'center',
6844
6872
  color: theme.__hd__.avatar.colors.text,
6845
6873
  overflow: 'hidden'
6846
6874
  };
@@ -6989,11 +7017,12 @@ var StyledView$2 = index$a(reactNative.Animated.View)(function (_ref) {
6989
7017
  paddingHorizontal: themePadding === 'wideContent' ? theme.__hd__.badge.space.horizontalPadding : undefined
6990
7018
  };
6991
7019
  });
6992
- var StyledText$1 = index$a(reactNative.Text)(function (_ref2) {
7020
+ var StyledText$1 = index$a(Typography.Text)(function (_ref2) {
6993
7021
  var theme = _ref2.theme;
6994
7022
  return {
6995
7023
  fontFamily: theme.__hd__.badge.fonts["default"],
6996
7024
  fontSize: theme.__hd__.badge.fontSizes["default"],
7025
+ lineHeight: theme.__hd__.badge.lineHeights["default"],
6997
7026
  color: theme.__hd__.badge.colors.text,
6998
7027
  includeFontPadding: false,
6999
7028
  textAlignVertical: 'center',
@@ -11543,7 +11572,7 @@ var StyledErrorAndMaxLengthContainer = index$a(reactNative.View)(function () {
11543
11572
  };
11544
11573
  });
11545
11574
 
11546
- var _excluded$a = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue"];
11575
+ var _excluded$a = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
11547
11576
  var getVariant$1 = function getVariant(_ref) {
11548
11577
  var disabled = _ref.disabled,
11549
11578
  error = _ref.error,
@@ -11589,6 +11618,8 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11589
11618
  value = _ref2.value,
11590
11619
  defaultValue = _ref2.defaultValue,
11591
11620
  renderInputValue = _ref2.renderInputValue,
11621
+ _ref2$allowFontScalin = _ref2.allowFontScaling,
11622
+ allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
11592
11623
  nativeProps = _objectWithoutProperties(_ref2, _excluded$a);
11593
11624
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
11594
11625
  var isEmptyValue = displayText.length === 0;
@@ -11677,7 +11708,8 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11677
11708
  },
11678
11709
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
11679
11710
  // @ts-ignore
11680
- accessibilityLabelledBy: accessibilityLabelledBy
11711
+ accessibilityLabelledBy: accessibilityLabelledBy,
11712
+ allowFontScaling: allowFontScaling
11681
11713
  }, nativeProps), {}, {
11682
11714
  onFocus: function onFocus(event) {
11683
11715
  var _nativeProps$onFocus;
@@ -12214,7 +12246,7 @@ var StyledWrapper$5 = index$a(reactNative.View)(function (_ref) {
12214
12246
  padding: theme.__hd__.empty.space.wrapperPadding
12215
12247
  };
12216
12248
  });
12217
- var StyledTitle = index$a(reactNative.Text)(function (_ref2) {
12249
+ var StyledTitle = index$a(Typography.Text)(function (_ref2) {
12218
12250
  var theme = _ref2.theme,
12219
12251
  themeVariant = _ref2.themeVariant;
12220
12252
  return {
@@ -12225,7 +12257,7 @@ var StyledTitle = index$a(reactNative.Text)(function (_ref2) {
12225
12257
  color: themeVariant === 'dark' ? theme.__hd__.empty.colors.invertedText : theme.__hd__.empty.colors.text
12226
12258
  };
12227
12259
  });
12228
- var StyledDescription = index$a(reactNative.Text)(function (_ref3) {
12260
+ var StyledDescription = index$a(Typography.Text)(function (_ref3) {
12229
12261
  var theme = _ref3.theme,
12230
12262
  themeVariant = _ref3.themeVariant;
12231
12263
  return {
@@ -12282,7 +12314,7 @@ var StyledFABIcon = index$a(Icon)(function (_ref2) {
12282
12314
  textAlign: 'center'
12283
12315
  };
12284
12316
  });
12285
- var StyledFABText = index$a(reactNative.Text)(function (_ref3) {
12317
+ var StyledFABText = index$a(Typography.Text)(function (_ref3) {
12286
12318
  var theme = _ref3.theme;
12287
12319
  return {
12288
12320
  fontFamily: theme.__hd__.fab.fonts.title,
@@ -12765,12 +12797,13 @@ var StyledCell = index$a(reactNative.View)(function (_ref) {
12765
12797
  borderColor: theme.__hd__.pinInput.colors[themeState]
12766
12798
  };
12767
12799
  });
12768
- var StyledCellText = index$a(reactNative.Text)(function (_ref2) {
12800
+ var StyledCellText = index$a(Typography.Text)(function (_ref2) {
12769
12801
  var theme = _ref2.theme,
12770
12802
  themeState = _ref2.themeState;
12771
12803
  return {
12772
12804
  fontFamily: theme.__hd__.pinInput.fonts.cellText,
12773
12805
  fontSize: theme.__hd__.pinInput.fontSizes.cellText,
12806
+ lineHeight: theme.__hd__.pinInput.lineHeights.cellText,
12774
12807
  color: theme.__hd__.pinInput.colors[themeState]
12775
12808
  };
12776
12809
  });
@@ -12821,10 +12854,11 @@ var StyledErrorContainer = index$a(reactNative.View)(function (_ref7) {
12821
12854
  var theme = _ref7.theme;
12822
12855
  return {
12823
12856
  flexDirection: 'row',
12824
- paddingTop: theme.__hd__.pinInput.space.errorMessagePadding
12857
+ paddingTop: theme.__hd__.pinInput.space.errorMessagePadding,
12858
+ alignItems: 'center'
12825
12859
  };
12826
12860
  });
12827
- var StyledErrorMessage = index$a(reactNative.Text)(function (_ref8) {
12861
+ var StyledErrorMessage = index$a(Typography.Text)(function (_ref8) {
12828
12862
  var theme = _ref8.theme;
12829
12863
  return {
12830
12864
  fontFamily: theme.__hd__.pinInput.fonts.errorMessage,
@@ -14833,7 +14867,7 @@ var StyledView = index$a(reactNative.View)(function (_ref) {
14833
14867
  backgroundColor: backgroundColor
14834
14868
  };
14835
14869
  });
14836
- var StyledText = index$a(reactNative.Text)(function (_ref3) {
14870
+ var StyledText = index$a(Typography.Text)(function (_ref3) {
14837
14871
  var themeIntent = _ref3.themeIntent,
14838
14872
  themeVariant = _ref3.themeVariant,
14839
14873
  theme = _ref3.theme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.12.2",
3
+ "version": "8.12.4",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@emotion/native": "^11.9.3",
23
23
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "8.12.2",
24
+ "@hero-design/colors": "8.12.4",
25
25
  "date-fns": "^2.16.1",
26
26
  "events": "^3.2.0",
27
27
  "hero-editor": "^1.9.21"
@@ -44,7 +44,7 @@
44
44
  "@babel/preset-typescript": "^7.17.12",
45
45
  "@babel/runtime": "^7.18.9",
46
46
  "@emotion/jest": "^11.9.3",
47
- "@hero-design/eslint-plugin": "8.12.2",
47
+ "@hero-design/eslint-plugin": "8.12.4",
48
48
  "@react-native-community/datetimepicker": "^3.5.2",
49
49
  "@react-native-community/slider": "4.1.12",
50
50
  "@rollup/plugin-babel": "^5.3.1",
@@ -60,9 +60,9 @@
60
60
  "@types/react-native": "^0.67.7",
61
61
  "@types/react-native-vector-icons": "^6.4.10",
62
62
  "babel-plugin-inline-import": "^3.0.0",
63
- "eslint-config-hd": "8.12.2",
63
+ "eslint-config-hd": "8.12.4",
64
64
  "jest": "^27.3.1",
65
- "prettier-config-hd": "8.12.2",
65
+ "prettier-config-hd": "8.12.4",
66
66
  "react": "18.0.0",
67
67
  "react-native": "0.69.7",
68
68
  "react-native-gesture-handler": "~2.1.0",