@hero-design/rn 7.0.6 → 7.1.2

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 (92) hide show
  1. package/.eslintrc.json +4 -3
  2. package/babel.config.js +1 -1
  3. package/es/index.js +411 -134
  4. package/lib/index.js +411 -131
  5. package/package.json +5 -4
  6. package/playground/components/BottomNavigation.tsx +69 -0
  7. package/playground/components/Card.tsx +174 -112
  8. package/playground/components/FAB.tsx +49 -0
  9. package/playground/index.tsx +6 -1
  10. package/rollup.config.js +1 -1
  11. package/src/components/BottomNavigation/StyledBottomNavigation.tsx +58 -0
  12. package/src/components/BottomNavigation/__tests__/BottomNavigation.spec.tsx +95 -0
  13. package/src/components/BottomNavigation/__tests__/__snapshots__/BottomNavigation.spec.tsx.snap +315 -0
  14. package/src/components/BottomNavigation/index.tsx +169 -0
  15. package/src/components/Card/StyledCard.tsx +1 -0
  16. package/src/components/Card/__tests__/__snapshots__/Card.spec.tsx.snap +5 -4
  17. package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +5 -4
  18. package/src/components/FAB/AnimatedFABIcon.tsx +47 -0
  19. package/src/components/FAB/StyledFABContainer.tsx +14 -0
  20. package/src/components/FAB/StyledFABIcon.tsx +9 -0
  21. package/src/components/FAB/__tests__/AnimatedFABIcon.spec.tsx +20 -0
  22. package/src/components/FAB/__tests__/StyledFABContainer.spec.tsx +18 -0
  23. package/src/components/FAB/__tests__/StyledFABIcon.spec.tsx +16 -0
  24. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +71 -0
  25. package/src/components/FAB/__tests__/__snapshots__/StyledFABContainer.spec.tsx.snap +46 -0
  26. package/src/components/FAB/__tests__/__snapshots__/StyledFABIcon.spec.tsx.snap +21 -0
  27. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +120 -0
  28. package/src/components/FAB/__tests__/index.spec.tsx +58 -0
  29. package/src/components/FAB/index.tsx +56 -0
  30. package/src/components/Icon/index.tsx +1 -1
  31. package/src/components/Icon/utils.ts +6 -0
  32. package/src/components/Typography/Text/StyledText.tsx +5 -1
  33. package/src/components/Typography/Text/index.tsx +1 -1
  34. package/src/index.ts +6 -0
  35. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +30 -1
  36. package/src/theme/components/bottomNavigation.ts +23 -0
  37. package/src/theme/components/card.ts +1 -1
  38. package/src/theme/components/fab.ts +21 -0
  39. package/src/theme/components/typography.ts +1 -0
  40. package/src/theme/global/space.ts +11 -9
  41. package/src/theme/global/typography.ts +11 -9
  42. package/src/theme/index.ts +6 -0
  43. package/src/utils/__tests__/scale.spec.ts +26 -0
  44. package/src/utils/helpers.ts +4 -0
  45. package/src/utils/scale.ts +10 -0
  46. package/testUtils/setup.ts +4 -0
  47. package/types/playground/components/BottomNavigation.d.ts +2 -0
  48. package/types/playground/components/FAB.d.ts +2 -0
  49. package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +17 -0
  50. package/types/{components/Card/__tests__/Card.spec.d.ts → src/components/BottomNavigation/__tests__/BottomNavigation.spec.d.ts} +0 -0
  51. package/types/src/components/BottomNavigation/index.d.ts +40 -0
  52. package/types/src/components/FAB/AnimatedFABIcon.d.ts +6 -0
  53. package/types/src/components/FAB/StyledFABContainer.d.ts +3 -0
  54. package/types/src/components/FAB/StyledFABIcon.d.ts +3 -0
  55. package/types/{components/Card/__tests__/StyledCard.spec.d.ts → src/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts} +0 -0
  56. package/types/{components/Divider/__tests__/StyledDivider.spec.d.ts → src/components/FAB/__tests__/StyledFABContainer.spec.d.ts} +0 -0
  57. package/types/{components/ExampleComponent/__tests__/StyledView.spec.d.ts → src/components/FAB/__tests__/StyledFABIcon.spec.d.ts} +0 -0
  58. package/types/src/components/{Typography/Text/__test__ → FAB/__tests__}/index.spec.d.ts +0 -0
  59. package/types/src/components/FAB/index.d.ts +30 -0
  60. package/types/src/components/Icon/index.d.ts +1 -1
  61. package/types/src/components/Icon/utils.d.ts +2 -0
  62. package/types/src/components/Typography/Text/StyledText.d.ts +1 -1
  63. package/types/src/components/Typography/Text/index.d.ts +1 -1
  64. package/types/src/index.d.ts +4 -1
  65. package/types/src/theme/components/bottomNavigation.d.ts +17 -0
  66. package/types/src/theme/components/fab.d.ts +15 -0
  67. package/types/src/theme/components/typography.d.ts +1 -0
  68. package/types/src/theme/index.d.ts +4 -0
  69. package/types/src/{components/Typography/Text/__test__/StyledText.spec.d.ts → utils/__tests__/scale.spec.d.ts} +0 -0
  70. package/types/src/utils/helpers.d.ts +2 -0
  71. package/types/src/utils/scale.d.ts +2 -0
  72. package/.expo/README.md +0 -15
  73. package/.expo/packager-info.json +0 -10
  74. package/.expo/settings.json +0 -10
  75. package/types/components/Card/StyledCard.d.ts +0 -3
  76. package/types/components/Card/index.d.ts +0 -5
  77. package/types/components/Divider/StyledDivider.d.ts +0 -7
  78. package/types/components/Divider/index.d.ts +0 -12
  79. package/types/components/ExampleComponent/StyledView.d.ts +0 -7
  80. package/types/components/ExampleComponent/index.d.ts +0 -16
  81. package/types/index.d.ts +0 -5
  82. package/types/styled-components.d.ts +0 -6
  83. package/types/theme/__tests__/index.spec.d.ts +0 -1
  84. package/types/theme/components/card.d.ts +0 -10
  85. package/types/theme/components/divider.d.ts +0 -17
  86. package/types/theme/components/exampleComponent.d.ts +0 -14
  87. package/types/theme/global/borders.d.ts +0 -4
  88. package/types/theme/global/colors.d.ts +0 -26
  89. package/types/theme/global/index.d.ts +0 -63
  90. package/types/theme/global/space.d.ts +0 -12
  91. package/types/theme/global/typography.d.ts +0 -21
  92. package/types/theme/index.d.ts +0 -13
package/es/index.js CHANGED
@@ -1,5 +1,6 @@
1
- import React, { useContext, useMemo, createElement } from 'react';
2
- import require$$0$1, { View, Text as Text$1 } from 'react-native';
1
+ import React, { useContext, useMemo, createElement, useRef, useEffect } from 'react';
2
+ import require$$0$1, { Dimensions, View, Text as Text$1, Platform, TouchableWithoutFeedback, Animated, StyleSheet as StyleSheet$1, TouchableHighlight } from 'react-native';
3
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
3
4
 
4
5
  function ownKeys(object, enumerableOnly) {
5
6
  var keys = Object.keys(object);
@@ -8130,7 +8131,7 @@ Processor$1["default"] = Processor$1;
8130
8131
  Root$2.registerProcessor(Processor$1);
8131
8132
  Document$1.registerProcessor(Processor$1);
8132
8133
 
8133
- var _excluded$3 = ["inputs"],
8134
+ var _excluded$5 = ["inputs"],
8134
8135
  _excluded2 = ["inputId"];
8135
8136
 
8136
8137
  var Declaration$1 = declaration;
@@ -8147,7 +8148,7 @@ function fromJSON$1(json, inputs) {
8147
8148
  });
8148
8149
 
8149
8150
  var ownInputs = json.inputs,
8150
- defaults = _objectWithoutProperties$1(json, _excluded$3);
8151
+ defaults = _objectWithoutProperties$1(json, _excluded$5);
8151
8152
 
8152
8153
  if (ownInputs) {
8153
8154
  inputs = [];
@@ -9872,30 +9873,41 @@ var systemPalette = {
9872
9873
  outline: palette.greyLight60
9873
9874
  };
9874
9875
 
9876
+ var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
9877
+
9878
+ var scale = function scale(size) {
9879
+ var _Dimensions$get = Dimensions.get('window'),
9880
+ width = _Dimensions$get.width,
9881
+ height = _Dimensions$get.height;
9882
+
9883
+ var shortDimension = width < height ? width : height;
9884
+ return shortDimension / BASE_WIDTH * size;
9885
+ };
9886
+
9875
9887
  var BASE$1 = 8;
9876
9888
  var space = {
9877
- xxsmall: BASE$1 * 0.25,
9878
- xsmall: BASE$1 * 0.5,
9879
- small: BASE$1,
9880
- medium: BASE$1 * 2,
9881
- large: BASE$1 * 3,
9882
- xlarge: BASE$1 * 4,
9883
- xxlarge: BASE$1 * 5,
9884
- xxxlarge: BASE$1 * 6,
9885
- xxxxlarge: BASE$1 * 7
9889
+ xxsmall: scale(BASE$1 * 0.25),
9890
+ xsmall: scale(BASE$1 * 0.5),
9891
+ small: scale(BASE$1),
9892
+ medium: scale(BASE$1 * 2),
9893
+ large: scale(BASE$1 * 3),
9894
+ xlarge: scale(BASE$1 * 4),
9895
+ xxlarge: scale(BASE$1 * 5),
9896
+ xxxlarge: scale(BASE$1 * 6),
9897
+ xxxxlarge: scale(BASE$1 * 7)
9886
9898
  };
9887
9899
 
9888
9900
  var BASE = 16;
9889
9901
  var fontSizes = {
9890
- xxxxxlarge: BASE * 2,
9891
- xxxxlarge: BASE * 1.75,
9892
- xxxlarge: BASE * 1.5,
9893
- xxlarge: BASE * 1.25,
9894
- xlarge: BASE * 1.125,
9895
- large: BASE,
9896
- medium: BASE * 0.875,
9897
- small: BASE * 0.75,
9898
- xsmall: BASE * 0.625 // 10
9902
+ xxxxxlarge: scale(BASE * 2),
9903
+ xxxxlarge: scale(BASE * 1.75),
9904
+ xxxlarge: scale(BASE * 1.5),
9905
+ xxlarge: scale(BASE * 1.25),
9906
+ xlarge: scale(BASE * 1.125),
9907
+ large: scale(BASE),
9908
+ medium: scale(BASE * 0.875),
9909
+ small: scale(BASE * 0.75),
9910
+ xsmall: scale(BASE * 0.625) // 10
9899
9911
 
9900
9912
  };
9901
9913
  var fontWeights = {
@@ -9961,12 +9973,33 @@ var getBadgeTheme = function getBadgeTheme(theme) {
9961
9973
  };
9962
9974
  };
9963
9975
 
9976
+ var getBottomNavigationTheme = function getBottomNavigationTheme(theme) {
9977
+ var colors = {
9978
+ shadow: theme.colors.backgroundDark,
9979
+ background: theme.colors.platformBackground
9980
+ };
9981
+ var sizes = {
9982
+ height: 72
9983
+ };
9984
+ var shadows = {
9985
+ offset: "0px 3px",
9986
+ opacity: 0.27,
9987
+ radius: "4.65px",
9988
+ elevation: 10
9989
+ };
9990
+ return {
9991
+ colors: colors,
9992
+ shadows: shadows,
9993
+ sizes: sizes
9994
+ };
9995
+ };
9996
+
9964
9997
  var getCardTheme = function getCardTheme(theme) {
9965
9998
  var radii = {
9966
9999
  "default": "12px"
9967
10000
  };
9968
10001
  var padding = {
9969
- "default": "".concat(theme.space.medium, "px")
10002
+ "default": "".concat(theme.space.small, "px")
9970
10003
  };
9971
10004
  return {
9972
10005
  radii: radii,
@@ -10020,7 +10053,8 @@ var getIconTheme = function getIconTheme(theme) {
10020
10053
  var getTypographyTheme = function getTypographyTheme(theme) {
10021
10054
  var colors = {
10022
10055
  body: theme.colors.text,
10023
- subdued: theme.colors.disabledText
10056
+ subdued: theme.colors.disabledText,
10057
+ primary: theme.colors.primary
10024
10058
  };
10025
10059
  var fontSizes = {
10026
10060
  small: theme.fontSizes.small,
@@ -10047,29 +10081,50 @@ var getTypographyTheme = function getTypographyTheme(theme) {
10047
10081
  };
10048
10082
  };
10049
10083
 
10084
+ var getFABTheme = function getFABTheme(theme) {
10085
+ var colors = {
10086
+ buttonBackground: theme.colors.backgroundDark,
10087
+ icon: theme.colors.invertedText
10088
+ };
10089
+ var sizes = {
10090
+ width: '64px',
10091
+ height: '64px'
10092
+ };
10093
+ var fontSizes = {
10094
+ "default": "".concat(theme.fontSizes.xxxxlarge, "px")
10095
+ };
10096
+ return {
10097
+ fontSizes: fontSizes,
10098
+ colors: colors,
10099
+ sizes: sizes
10100
+ };
10101
+ };
10102
+
10050
10103
  var getTheme = function getTheme() {
10051
10104
  var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : globalTheme;
10052
10105
  return _objectSpread2(_objectSpread2({}, theme), {}, {
10053
10106
  __hd__: {
10054
10107
  badge: getBadgeTheme(theme),
10108
+ bottomNavigation: getBottomNavigationTheme(theme),
10055
10109
  card: getCardTheme(theme),
10056
10110
  divider: getDividerTheme(theme),
10057
10111
  icon: getIconTheme(theme),
10058
- typography: getTypographyTheme(theme)
10112
+ typography: getTypographyTheme(theme),
10113
+ fab: getFABTheme(theme)
10059
10114
  }
10060
10115
  });
10061
10116
  };
10062
10117
 
10063
10118
  var theme = getTheme();
10064
10119
 
10065
- var _templateObject$4, _templateObject2$3, _templateObject3$2, _templateObject4$2;
10120
+ var _templateObject$7, _templateObject2$4, _templateObject3$3, _templateObject4$3;
10066
10121
  var BACKGROUND_INTENTS = {
10067
10122
  success: 'successBackground',
10068
10123
  warning: 'warningBackground',
10069
10124
  danger: 'dangerBackground',
10070
10125
  info: 'infoBackground'
10071
10126
  };
10072
- var StyledView = styled(View)(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n border-width: ", ";\n border-radius: ", ";\n padding: ", ";\n\n ", ";\n"])), function (_ref) {
10127
+ var StyledView = styled(View)(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteral(["\n border-width: ", ";\n border-radius: ", ";\n padding: ", ";\n\n ", ";\n"])), function (_ref) {
10073
10128
  var theme = _ref.theme;
10074
10129
  return theme.__hd__.badge.borderWidths["default"];
10075
10130
  }, function (_ref2) {
@@ -10080,7 +10135,7 @@ var StyledView = styled(View)(_templateObject$4 || (_templateObject$4 = _taggedT
10080
10135
  return theme.__hd__.badge.padding["default"];
10081
10136
  }, function (_ref4) {
10082
10137
  var themeIntent = _ref4.themeIntent;
10083
- return css(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n border-color: ", ";\n background-color: ", ";\n "])), function (_ref5) {
10138
+ return css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral(["\n border-color: ", ";\n background-color: ", ";\n "])), function (_ref5) {
10084
10139
  var theme = _ref5.theme;
10085
10140
  return theme.__hd__.badge.colors[themeIntent];
10086
10141
  }, function (_ref6) {
@@ -10088,7 +10143,7 @@ var StyledView = styled(View)(_templateObject$4 || (_templateObject$4 = _taggedT
10088
10143
  return theme.__hd__.badge.colors[BACKGROUND_INTENTS[themeIntent]];
10089
10144
  });
10090
10145
  });
10091
- var StyledText$1 = styled(Text$1)(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n font-weight: ", ";\n font-size: ", ";\n\n ", ";\n"])), function (_ref7) {
10146
+ var StyledText$1 = styled(Text$1)(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n font-weight: ", ";\n font-size: ", ";\n\n ", ";\n"])), function (_ref7) {
10092
10147
  var theme = _ref7.theme;
10093
10148
  return theme.__hd__.badge.fontWeights["default"];
10094
10149
  }, function (_ref8) {
@@ -10096,13 +10151,13 @@ var StyledText$1 = styled(Text$1)(_templateObject3$2 || (_templateObject3$2 = _t
10096
10151
  return theme.__hd__.badge.fontSizes["default"];
10097
10152
  }, function (_ref9) {
10098
10153
  var themeIntent = _ref9.themeIntent;
10099
- return css(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (_ref10) {
10154
+ return css(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (_ref10) {
10100
10155
  var theme = _ref10.theme;
10101
10156
  return theme.__hd__.badge.colors[themeIntent];
10102
10157
  });
10103
10158
  });
10104
10159
 
10105
- var _excluded$2 = ["content", "intent", "style", "testID"];
10160
+ var _excluded$4 = ["content", "intent", "style", "testID"];
10106
10161
 
10107
10162
  var Badge = function Badge(_ref) {
10108
10163
  var content = _ref.content,
@@ -10110,7 +10165,7 @@ var Badge = function Badge(_ref) {
10110
10165
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
10111
10166
  style = _ref.style,
10112
10167
  testID = _ref.testID,
10113
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$2);
10168
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$4);
10114
10169
 
10115
10170
  return /*#__PURE__*/React.createElement(StyledView, _extends$1({
10116
10171
  themeIntent: intent,
@@ -10121,91 +10176,6 @@ var Badge = function Badge(_ref) {
10121
10176
  }, content));
10122
10177
  };
10123
10178
 
10124
- var _templateObject$3;
10125
- var StyledCard = styled(View)(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: ", ";\n"])), function (_ref) {
10126
- var theme = _ref.theme;
10127
- return theme.__hd__.card.radii["default"];
10128
- }, function (_ref2) {
10129
- var theme = _ref2.theme;
10130
- return theme.__hd__.card.padding["default"];
10131
- });
10132
-
10133
- var Card = function Card(props) {
10134
- return /*#__PURE__*/React.createElement(StyledCard, props);
10135
- };
10136
-
10137
- var _templateObject$2, _templateObject2$2, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11, _templateObject12, _templateObject13;
10138
- var StyledDivider = styled(View)(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n max-width: 100%;\n\n ", "\n\n ", "\n"])), function (_ref) {
10139
- var theme = _ref.theme;
10140
- return theme.__hd__.divider.borderWidths["default"];
10141
- }, function (_ref2) {
10142
- var theme = _ref2.theme;
10143
- return theme.__hd__.divider.colors["default"];
10144
- }, function (_ref3) {
10145
- var themeMarginHorizontal = _ref3.themeMarginHorizontal,
10146
- theme = _ref3.theme;
10147
-
10148
- switch (themeMarginHorizontal) {
10149
- case undefined:
10150
- return css(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral([""])));
10151
-
10152
- case 'xsmall':
10153
- return css(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.xsmall);
10154
-
10155
- case 'small':
10156
- return css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.small);
10157
-
10158
- case 'medium':
10159
- return css(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.medium);
10160
-
10161
- case 'large':
10162
- return css(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.large);
10163
-
10164
- case 'xlarge':
10165
- return css(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.xlarge);
10166
- }
10167
- }, function (_ref4) {
10168
- var themeMarginVertical = _ref4.themeMarginVertical,
10169
- theme = _ref4.theme;
10170
-
10171
- switch (themeMarginVertical) {
10172
- case undefined:
10173
- return css(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral([""])));
10174
-
10175
- case 'xsmall':
10176
- return css(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.xsmall);
10177
-
10178
- case 'small':
10179
- return css(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.small);
10180
-
10181
- case 'medium':
10182
- return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.medium);
10183
-
10184
- case 'large':
10185
- return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.large);
10186
-
10187
- case 'xlarge':
10188
- return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.xlarge);
10189
- }
10190
- });
10191
-
10192
- var _excluded$1 = ["marginHorizontal", "marginVertical", "style", "testID"];
10193
-
10194
- var Divider = function Divider(_ref) {
10195
- var marginHorizontal = _ref.marginHorizontal,
10196
- marginVertical = _ref.marginVertical,
10197
- style = _ref.style,
10198
- testID = _ref.testID,
10199
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$1);
10200
-
10201
- return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({
10202
- themeMarginHorizontal: marginHorizontal,
10203
- themeMarginVertical: marginVertical,
10204
- style: style,
10205
- testID: testID
10206
- }, nativeProps));
10207
- };
10208
-
10209
10179
  var dist = {};
10210
10180
 
10211
10181
  function _interopRequireDefault$5(obj) {
@@ -19834,12 +19804,12 @@ var heroIconConfig = {
19834
19804
  preferences: preferences
19835
19805
  };
19836
19806
 
19837
- var _templateObject$1, _templateObject2$1;
19807
+ var _templateObject$6, _templateObject2$3;
19838
19808
  var HeroIcon = dist.createIconSetFromIcoMoon(heroIconConfig, 'hero-icons', 'hero-icons.ttf');
19839
- var StyledHeroIcon = styled(HeroIcon)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n ", ";\n"])), function (_ref) {
19809
+ var StyledHeroIcon = styled(HeroIcon)(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n ", ";\n"])), function (_ref) {
19840
19810
  var themeIntent = _ref.themeIntent,
19841
19811
  themeSize = _ref.themeSize;
19842
- return css(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", "px;\n "])), function (_ref2) {
19812
+ return css(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", "px;\n "])), function (_ref2) {
19843
19813
  var theme = _ref2.theme;
19844
19814
  return theme.__hd__.icon.colors[themeIntent];
19845
19815
  }, function (_ref3) {
@@ -19865,23 +19835,29 @@ var Icon = function Icon(_ref) {
19865
19835
  });
19866
19836
  };
19867
19837
 
19868
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
19869
- var StyledText = styled(Text$1)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n ", "\n\n ", "\n"])), function (_ref) {
19838
+ var IconList = ['activate', 'add-person', 'adjustment', 'alignment', 'bank', 'bell', 'billing', 'bookmark', 'box-check', 'box', 'buildings', 'cake', 'calendar-clock', 'calendar', 'carat-down-small', 'carat-down', 'carat-left', 'carat-right', 'carat-up', 'circle-add', 'circle-cancel', 'circle-check', 'circle-down', 'circle-info', 'circle-left', 'circle-ok', 'circle-pencil', 'circle-question', 'circle-remove', 'circle-right', 'circle-up', 'circle-warning', 'clock', 'cloud-download', 'cloud-upload', 'cog', 'coin', 'contacts', 'credit-card', 'diamond', 'direction-arrows', 'directory', 'document', 'dollar-coin-shine', 'double-buildings', 'edit-template', 'envelope', 'expense', 'eye-circle', 'eye-invisible', 'eye', 'face-meh', 'face-sad', 'face-smiley', 'feed', 'feedbacks', 'file-certified', 'file-clone', 'file-copy', 'file-csv', 'file-dispose', 'file-doc', 'file-excel', 'file-export', 'file-lock', 'file-pdf', 'file-powerpoint', 'file-search', 'file-secured', 'file-sheets', 'file-slide', 'file-verified', 'file-word', 'file', 'folder-user', 'folder', 'funnel-filter', 'global-dollar', 'globe', 'graduation-cap', 'graph', 'happy-sun', 'health-bag', 'heart', 'home', 'image', 'import', 'incident-siren', 'instapay', 'list', 'loading', 'loading-2', 'location', 'lock', 'media-content', 'menu', 'moneybag', 'moon', 'multiple-stars', 'multiple-users', 'node', 'open-folder', 'paperclip', 'payment-summary', 'pencil', 'phone', 'piggy-bank', 'plane', 'play-circle', 'print', 'raising-hands', 'reply', 'reschedule', 'rostering', 'save', 'schedule', 'search-person', 'send', 'speaker', 'star-medal', 'star', 'steps-circle', 'stopwatch', 'suitcase', 'survey', 'switch', 'tag', 'target', 'teams', 'timesheet', 'touch-id', 'trash-bin', 'unlock', 'user', 'video-1', 'video-2', 'activate-outlined', 'add-person-outlined', 'add-section-outlined', 'add-time-outlined', 'add', 'adjustment-outlined', 'alignment-2-outlined', 'alignment-outlined', 'all-caps', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up', 'at-sign', 'bell-outlined', 'billing-outlined', 'body-outlined', 'bold', 'bookmark-outlined', 'box-check-outlined', 'box-outlined', 'bullet-points', 'cake-outlined', 'calendar-dates-outlined', 'calendar-star-outlined', 'camera-outlined', 'cancel', 'checkmark', 'circle-add-outlined', 'circle-cancel-outlined', 'circle-down-outlined', 'circle-info-outlined', 'circle-left-outlined', 'circle-ok-outlined', 'circle-question-outlined', 'circle-remove-outlined', 'circle-right-outlined', 'circle-up-outlined', 'circle-warning-outlined', 'clock-2-outlined', 'clock-outlined', 'cog-outlined', 'coin-outlined', 'comment-outlined', 'contacts-outlined', 'credit-card-outlined', 'direction-arrows-outlined', 'directory-outlined', 'document-outlined', 'dollar-coin-shine-outlined', 'dollar-sign', 'double-buildings-outlined', 'double-left-arrows', 'double-right-arrows', 'download-outlined', 'edit-template-outlined', 'email-outlined', 'enter-arrow', 'envelope-outlined', 'expense-outlined', 'external-link', 'eye-invisible-outlined', 'eye-outlined', 'face-id', 'face-meh-outlined', 'face-open-smiley-outlined', 'face-sad-outlined', 'face-smiley-outlined', 'feed-outlined', 'file-certified-outlined', 'file-clone-outlined', 'file-copy-outlined', 'file-dispose-outlined', 'file-download-outlined', 'file-export-outlined', 'file-lock-outlined', 'file-outlined', 'file-search-outlined', 'file-secured-outlined', 'file-verified-outlined', 'folder-outlined', 'folder-user-outlined', 'funnel-filter-outline', 'graph-outlined', 'happy-sun-outlined', 'health-bag-outlined', 'heart-outlined', 'home-outlined', 'image-outlined', 'import-outlined', 'instapay-outlined', 'italic', 'link-1', 'link-2', 'list-outlined', 'location-outlined', 'lock-outlined', 'locked-file-outlined', 'log-out', 'media-content-outlined', 'menu-close', 'menu-expand', 'menu-fold-outlined', 'menu-unfold-outlined', 'moneybag-outlined', 'moon-outlined', 'more-horizontal', 'more-vertical', 'multiple-folders-outlined', 'multiple-users-outlined', 'node-outlined', 'number-points', 'number', 'payment-summary-outlined', 'payslip-outlined', 'pencil-outlined', 'percentage', 'phone-outlined', 'piggy-bank-outlined', 'plane-outlined', 'play-circle-outlined', 'print-outlined', 'qr-code-outlined', 're-assign', 'refresh', 'remove', 'reply-outlined', 'restart', 'return-arrow', 'rostering-outlined', 'save-outlined', 'schedule-outlined', 'search-outlined', 'send-outlined', 'share-1', 'share-2', 'single-down-arrow', 'single-left-arrow', 'single-right-arrow', 'single-up-arrow', 'speaker-outlined', 'star-outlined', 'stopwatch-outlined', 'strikethrough', 'survey-outlined', 'switch-outlined', 'sync', 'target-outlined', 'timesheet-outlined', 'transfer', 'trash-bin-outlined', 'unavailable', 'underline', 'unlock-outlined', 'upload-outlined', 'user-outlined', 'video-1-outlined', 'video-2-outlined'];
19839
+
19840
+ var isHeroIcon = function isHeroIcon(x) {
19841
+ return IconList.includes(x);
19842
+ };
19843
+
19844
+ var _templateObject$5, _templateObject2$2, _templateObject3$2, _templateObject4$2, _templateObject5$2, _templateObject6$2, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1;
19845
+ var StyledText = styled(Text$1)(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n ", "\n\n ", "\n\n ", "\n"])), function (_ref) {
19870
19846
  var themeFontSize = _ref.themeFontSize,
19871
19847
  theme = _ref.theme;
19872
19848
 
19873
19849
  switch (themeFontSize) {
19874
19850
  case 'small':
19875
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n letter-spacing: ", "px;\n "])), theme.__hd__.typography.fontSizes.small, theme.__hd__.typography.lineHeights.small, theme.__hd__.typography.fontSizes.small * 0.03);
19851
+ return css(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n letter-spacing: ", "px;\n "])), theme.__hd__.typography.fontSizes.small, theme.__hd__.typography.lineHeights.small, theme.__hd__.typography.fontSizes.small * 0.03);
19876
19852
 
19877
19853
  case 'medium':
19878
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n letter-spacing: ", "px;\n "])), theme.__hd__.typography.fontSizes.medium, theme.__hd__.typography.lineHeights.medium, theme.__hd__.typography.fontSizes.medium * 0.03);
19854
+ return css(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n letter-spacing: ", "px;\n "])), theme.__hd__.typography.fontSizes.medium, theme.__hd__.typography.lineHeights.medium, theme.__hd__.typography.fontSizes.medium * 0.03);
19879
19855
 
19880
19856
  case 'large':
19881
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n letter-spacing: ", "px;\n "])), theme.__hd__.typography.fontSizes.large, theme.__hd__.typography.lineHeights.large, theme.__hd__.typography.fontSizes.large * 0.03);
19857
+ return css(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n letter-spacing: ", "px;\n "])), theme.__hd__.typography.fontSizes.large, theme.__hd__.typography.lineHeights.large, theme.__hd__.typography.fontSizes.large * 0.03);
19882
19858
 
19883
19859
  case 'xlarge':
19884
- return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n letter-spacing: ", "px;\n "])), theme.__hd__.typography.fontSizes.xlarge, theme.__hd__.typography.lineHeights.xlarge, theme.__hd__.typography.fontSizes.xlarge * 0.03);
19860
+ return css(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: ", ";\n letter-spacing: ", "px;\n "])), theme.__hd__.typography.fontSizes.xlarge, theme.__hd__.typography.lineHeights.xlarge, theme.__hd__.typography.fontSizes.xlarge * 0.03);
19885
19861
  }
19886
19862
  }, function (_ref2) {
19887
19863
  var themeFontWeight = _ref2.themeFontWeight,
@@ -19889,13 +19865,13 @@ var StyledText = styled(Text$1)(_templateObject || (_templateObject = _taggedTem
19889
19865
 
19890
19866
  switch (themeFontWeight) {
19891
19867
  case 'light':
19892
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-weight: ", ";\n "])), theme.__hd__.typography.fontWeights.light);
19868
+ return css(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteral(["\n font-weight: ", ";\n "])), theme.__hd__.typography.fontWeights.light);
19893
19869
 
19894
19870
  case 'regular':
19895
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-weight: ", ";\n "])), theme.__hd__.typography.fontWeights.regular);
19871
+ return css(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n font-weight: ", ";\n "])), theme.__hd__.typography.fontWeights.regular);
19896
19872
 
19897
19873
  case 'semi-bold':
19898
- return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-weight: ", ";\n "])), theme.__hd__.typography.fontWeights.semiBold);
19874
+ return css(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral(["\n font-weight: ", ";\n "])), theme.__hd__.typography.fontWeights.semiBold);
19899
19875
  }
19900
19876
  }, function (_ref3) {
19901
19877
  var themeIntent = _ref3.themeIntent,
@@ -19903,14 +19879,17 @@ var StyledText = styled(Text$1)(_templateObject || (_templateObject = _taggedTem
19903
19879
 
19904
19880
  switch (themeIntent) {
19905
19881
  case 'body':
19906
- return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme.__hd__.typography.colors.body);
19882
+ return css(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme.__hd__.typography.colors.body);
19907
19883
 
19908
19884
  case 'subdued':
19909
- return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme.__hd__.typography.colors.subdued);
19885
+ return css(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme.__hd__.typography.colors.subdued);
19886
+
19887
+ case 'primary':
19888
+ return css(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme.__hd__.typography.colors.primary);
19910
19889
  }
19911
19890
  });
19912
19891
 
19913
- var _excluded = ["children", "fontSize", "fontWeight", "intent"];
19892
+ var _excluded$3 = ["children", "fontSize", "fontWeight", "intent"];
19914
19893
 
19915
19894
  var Text = function Text(_ref) {
19916
19895
  var children = _ref.children,
@@ -19920,7 +19899,7 @@ var Text = function Text(_ref) {
19920
19899
  fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
19921
19900
  _ref$intent = _ref.intent,
19922
19901
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
19923
- nativeProps = _objectWithoutProperties$1(_ref, _excluded);
19902
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$3);
19924
19903
 
19925
19904
  return /*#__PURE__*/React.createElement(StyledText, _extends$1({
19926
19905
  themeFontSize: fontSize,
@@ -19933,4 +19912,302 @@ var Typography = {
19933
19912
  Text: Text
19934
19913
  };
19935
19914
 
19936
- export { Badge, Card, Divider, Icon, ThemeProvider, Typography, getTheme, theme, useTheme };
19915
+ var _templateObject$4, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1;
19916
+ var BottomNavigationTab = styled(View)(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n flex: 1;\n display: ", ";\n"])), function (_ref) {
19917
+ var themeVisibility = _ref.themeVisibility;
19918
+ return themeVisibility === false ? 'none' : 'flex';
19919
+ });
19920
+ var BottomNavigationContainer = styled(View)(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n flex: 1;\n overflow: hidden;\n"])));
19921
+ var ContentWrapper = styled(View)(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n flex: 1;\n"])));
19922
+ var BottomBarWrapper = styled(View)(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n height: ", "px;\n padding-bottom: ", "px;\n padding-left: ", "px;\n padding-right: ", "px;\n background-color: ", ";\n shadow-color: ", ";\n shadow-offset: ", ";\n shadow-opacity: ", ";\n shadow-radius: ", ";\n elevation: ", ";\n"])), function (_ref2) {
19923
+ var theme = _ref2.theme,
19924
+ themeInsets = _ref2.themeInsets;
19925
+ return theme.__hd__.bottomNavigation.sizes.height + themeInsets.bottom;
19926
+ }, function (_ref3) {
19927
+ var themeInsets = _ref3.themeInsets;
19928
+ return themeInsets.bottom;
19929
+ }, function (_ref4) {
19930
+ var themeInsets = _ref4.themeInsets;
19931
+ return Math.max(themeInsets.left, themeInsets.right);
19932
+ }, function (_ref5) {
19933
+ var themeInsets = _ref5.themeInsets;
19934
+ return Math.max(themeInsets.left, themeInsets.right);
19935
+ }, function (_ref6) {
19936
+ var theme = _ref6.theme;
19937
+ return theme.__hd__.bottomNavigation.colors.background;
19938
+ }, function (_ref7) {
19939
+ var theme = _ref7.theme;
19940
+ return theme.__hd__.bottomNavigation.colors.shadow;
19941
+ }, function (_ref8) {
19942
+ var theme = _ref8.theme;
19943
+ return theme.__hd__.bottomNavigation.shadows.offset;
19944
+ }, function (_ref9) {
19945
+ var theme = _ref9.theme;
19946
+ return theme.__hd__.bottomNavigation.shadows.opacity;
19947
+ }, function (_ref10) {
19948
+ var theme = _ref10.theme;
19949
+ return theme.__hd__.bottomNavigation.shadows.radius;
19950
+ }, function (_ref11) {
19951
+ var theme = _ref11.theme;
19952
+ return theme.__hd__.bottomNavigation.shadows.elevation;
19953
+ });
19954
+ var BottomBar = styled(View)(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n flex: 1;\n flex-direction: row;\n overflow: hidden;\n align-items: center;\n"])));
19955
+ var BottomBarItem = styled(View)(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteral(["\n flex: 1;\n align-items: center;\n"])));
19956
+
19957
+ var isIOS = Platform.OS === 'ios';
19958
+ Platform.OS === 'android';
19959
+
19960
+ var _excluded$2 = ["onChange", "renderActiveTabOnly", "selectedTabKey", "tabs"];
19961
+
19962
+ var getInactiveIcon = function getInactiveIcon(icon) {
19963
+ var inactiveIcon = "".concat(icon, "-outlined");
19964
+ return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
19965
+ };
19966
+
19967
+ var BottomNavigation = function BottomNavigation(_ref) {
19968
+ var onChange = _ref.onChange,
19969
+ _ref$renderActiveTabO = _ref.renderActiveTabOnly,
19970
+ renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
19971
+ selectedTabKey = _ref.selectedTabKey,
19972
+ tabs = _ref.tabs,
19973
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$2);
19974
+
19975
+ var theme = useTheme();
19976
+ var insets = useSafeAreaInsets();
19977
+ /**
19978
+ * List of loaded tabs, tabs will be loaded when navigated to.
19979
+ */
19980
+
19981
+ var _React$useState = React.useState([selectedTabKey]),
19982
+ _React$useState2 = _slicedToArray(_React$useState, 2),
19983
+ loaded = _React$useState2[0],
19984
+ setLoaded = _React$useState2[1];
19985
+
19986
+ if (!loaded.includes(selectedTabKey)) {
19987
+ // Set the current tab to be loaded if it was not loaded before
19988
+ setLoaded(function (loadedState) {
19989
+ return [].concat(_toConsumableArray$1(loadedState), [selectedTabKey]);
19990
+ });
19991
+ }
19992
+
19993
+ return /*#__PURE__*/React.createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React.createElement(ContentWrapper, null, tabs.map(function (tab) {
19994
+ var key = tab.key,
19995
+ component = tab.component;
19996
+ var active = selectedTabKey === key;
19997
+
19998
+ if (renderActiveTabOnly && !active) {
19999
+ return null;
20000
+ }
20001
+
20002
+ if (!loaded.includes(key)) {
20003
+ // Don't render a screen if we've never navigated to it
20004
+ return null;
20005
+ }
20006
+
20007
+ return /*#__PURE__*/React.createElement(BottomNavigationTab, {
20008
+ key: key,
20009
+ testID: "route-screen-".concat(selectedTabKey),
20010
+ pointerEvents: active ? 'auto' : 'none',
20011
+ accessibilityElementsHidden: !active,
20012
+ importantForAccessibility: active ? 'auto' : 'no-hide-descendants',
20013
+ collapsable: false,
20014
+ removeClippedSubviews: // On iOS, set removeClippedSubviews to true only when not focused
20015
+ // This is an workaround for a bug where the clipped view never re-appears.
20016
+ isIOS ? selectedTabKey !== key : true,
20017
+ themeVisibility: active
20018
+ }, component);
20019
+ })), /*#__PURE__*/React.createElement(BottomBarWrapper, {
20020
+ themeInsets: insets
20021
+ }, /*#__PURE__*/React.createElement(BottomBar, null, tabs.map(function (tab) {
20022
+ var key = tab.key,
20023
+ icon = tab.icon,
20024
+ title = tab.title,
20025
+ testID = tab.testID;
20026
+ var active = selectedTabKey === key;
20027
+ var inactiveIcon = getInactiveIcon(icon);
20028
+ return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
20029
+ key: key,
20030
+ onPress: function onPress() {
20031
+ if (key !== selectedTabKey) {
20032
+ onChange(key);
20033
+ }
20034
+ },
20035
+ testID: testID
20036
+ }, /*#__PURE__*/React.createElement(BottomBarItem, null, /*#__PURE__*/React.createElement(Icon, {
20037
+ icon: active ? icon : inactiveIcon,
20038
+ intent: active ? 'primary' : 'text',
20039
+ testID: "hero-icon-".concat(icon)
20040
+ }), title && /*#__PURE__*/React.createElement(Typography.Text, {
20041
+ fontSize: "small",
20042
+ fontWeight: "semi-bold",
20043
+ intent: active ? 'primary' : 'body',
20044
+ style: {
20045
+ marginTop: theme.space.xsmall
20046
+ },
20047
+ numberOfLines: 1
20048
+ }, title)));
20049
+ }))));
20050
+ };
20051
+
20052
+ var _templateObject$3;
20053
+ var StyledCard = styled(View)(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: ", ";\n overflow: hidden;\n"])), function (_ref) {
20054
+ var theme = _ref.theme;
20055
+ return theme.__hd__.card.radii["default"];
20056
+ }, function (_ref2) {
20057
+ var theme = _ref2.theme;
20058
+ return theme.__hd__.card.padding["default"];
20059
+ });
20060
+
20061
+ var Card = function Card(props) {
20062
+ return /*#__PURE__*/React.createElement(StyledCard, props);
20063
+ };
20064
+
20065
+ var _templateObject$2, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
20066
+ var StyledDivider = styled(View)(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n max-width: 100%;\n\n ", "\n\n ", "\n"])), function (_ref) {
20067
+ var theme = _ref.theme;
20068
+ return theme.__hd__.divider.borderWidths["default"];
20069
+ }, function (_ref2) {
20070
+ var theme = _ref2.theme;
20071
+ return theme.__hd__.divider.colors["default"];
20072
+ }, function (_ref3) {
20073
+ var themeMarginHorizontal = _ref3.themeMarginHorizontal,
20074
+ theme = _ref3.theme;
20075
+
20076
+ switch (themeMarginHorizontal) {
20077
+ case undefined:
20078
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
20079
+
20080
+ case 'xsmall':
20081
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.xsmall);
20082
+
20083
+ case 'small':
20084
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.small);
20085
+
20086
+ case 'medium':
20087
+ return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.medium);
20088
+
20089
+ case 'large':
20090
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.large);
20091
+
20092
+ case 'xlarge':
20093
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.xlarge);
20094
+ }
20095
+ }, function (_ref4) {
20096
+ var themeMarginVertical = _ref4.themeMarginVertical,
20097
+ theme = _ref4.theme;
20098
+
20099
+ switch (themeMarginVertical) {
20100
+ case undefined:
20101
+ return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral([""])));
20102
+
20103
+ case 'xsmall':
20104
+ return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.xsmall);
20105
+
20106
+ case 'small':
20107
+ return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.small);
20108
+
20109
+ case 'medium':
20110
+ return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.medium);
20111
+
20112
+ case 'large':
20113
+ return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.large);
20114
+
20115
+ case 'xlarge':
20116
+ return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.xlarge);
20117
+ }
20118
+ });
20119
+
20120
+ var _excluded$1 = ["marginHorizontal", "marginVertical", "style", "testID"];
20121
+
20122
+ var Divider = function Divider(_ref) {
20123
+ var marginHorizontal = _ref.marginHorizontal,
20124
+ marginVertical = _ref.marginVertical,
20125
+ style = _ref.style,
20126
+ testID = _ref.testID,
20127
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$1);
20128
+
20129
+ return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({
20130
+ themeMarginHorizontal: marginHorizontal,
20131
+ themeMarginVertical: marginVertical,
20132
+ style: style,
20133
+ testID: testID
20134
+ }, nativeProps));
20135
+ };
20136
+
20137
+ var _templateObject$1;
20138
+ var StyledFABIcon = styled(Icon)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", ";\n"])), function (_ref) {
20139
+ var theme = _ref.theme;
20140
+ return theme.__hd__.fab.colors.icon;
20141
+ }, function (_ref2) {
20142
+ var theme = _ref2.theme;
20143
+ return theme.__hd__.fab.fontSizes["default"];
20144
+ });
20145
+
20146
+ var _excluded = ["active"];
20147
+ var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
20148
+
20149
+ var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
20150
+ var active = _ref.active,
20151
+ iconProps = _objectWithoutProperties$1(_ref, _excluded);
20152
+
20153
+ var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
20154
+ useEffect(function () {
20155
+ var animation = Animated.timing(rotateAnimation.current, {
20156
+ toValue: active ? 1 : 0,
20157
+ useNativeDriver: true
20158
+ });
20159
+ animation.start();
20160
+ return function () {
20161
+ animation.stop();
20162
+ };
20163
+ }, [active]);
20164
+ var interpolatedRotateAnimation = rotateAnimation.current.interpolate({
20165
+ inputRange: [0, 1],
20166
+ outputRange: ['0deg', '-45deg']
20167
+ });
20168
+ return /*#__PURE__*/React.createElement(Animated.View, {
20169
+ style: StyleSheet$1.flatten([{
20170
+ transform: [{
20171
+ rotate: interpolatedRotateAnimation
20172
+ }]
20173
+ }])
20174
+ }, /*#__PURE__*/React.createElement(AnimatedIcons, iconProps));
20175
+ };
20176
+
20177
+ var _templateObject;
20178
+ var StyledFABContainer = styled(TouchableHighlight)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: ", ";\n width: ", ";\n background-color: ", ";\n border-radius: 999px;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n"])), function (_ref) {
20179
+ var theme = _ref.theme;
20180
+ return theme.__hd__.fab.sizes.height;
20181
+ }, function (_ref2) {
20182
+ var theme = _ref2.theme;
20183
+ return theme.__hd__.fab.sizes.width;
20184
+ }, function (_ref3) {
20185
+ var theme = _ref3.theme;
20186
+ return theme.__hd__.fab.colors.buttonBackground;
20187
+ });
20188
+
20189
+ var FAB = function FAB(_ref) {
20190
+ var _onPress = _ref.onPress,
20191
+ icon = _ref.icon,
20192
+ animated = _ref.animated,
20193
+ testID = _ref.testID,
20194
+ active = _ref.active,
20195
+ style = _ref.style;
20196
+ return /*#__PURE__*/React.createElement(StyledFABContainer, {
20197
+ testID: testID,
20198
+ onPress: function onPress() {
20199
+ _onPress === null || _onPress === void 0 ? void 0 : _onPress();
20200
+ },
20201
+ activeOpacity: 0.6,
20202
+ style: style
20203
+ }, animated ? /*#__PURE__*/React.createElement(AnimatedFABIcon, {
20204
+ active: active,
20205
+ icon: icon,
20206
+ testID: "animatedFABIcon"
20207
+ }) : /*#__PURE__*/React.createElement(StyledFABIcon, {
20208
+ icon: icon,
20209
+ testID: "styledFABIcon"
20210
+ }));
20211
+ };
20212
+
20213
+ export { Badge, BottomNavigation, Card, Divider, FAB, Icon, ThemeProvider, Typography, getTheme, scale, theme, useTheme };