@hero-design/rn 7.1.1 → 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 (36) hide show
  1. package/.eslintrc.json +4 -3
  2. package/es/index.js +283 -113
  3. package/lib/index.js +282 -111
  4. package/package.json +4 -3
  5. package/playground/components/BottomNavigation.tsx +69 -0
  6. package/playground/components/Card.tsx +149 -70
  7. package/playground/index.tsx +3 -0
  8. package/rollup.config.js +1 -1
  9. package/src/components/BottomNavigation/StyledBottomNavigation.tsx +58 -0
  10. package/src/components/BottomNavigation/__tests__/BottomNavigation.spec.tsx +95 -0
  11. package/src/components/BottomNavigation/__tests__/__snapshots__/BottomNavigation.spec.tsx.snap +315 -0
  12. package/src/components/BottomNavigation/index.tsx +169 -0
  13. package/src/components/Icon/utils.ts +6 -0
  14. package/src/components/Typography/Text/StyledText.tsx +5 -1
  15. package/src/components/Typography/Text/index.tsx +1 -1
  16. package/src/index.ts +2 -0
  17. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +16 -0
  18. package/src/theme/components/bottomNavigation.ts +23 -0
  19. package/src/theme/components/typography.ts +1 -0
  20. package/src/theme/index.ts +3 -0
  21. package/src/utils/helpers.ts +4 -0
  22. package/types/playground/components/BottomNavigation.d.ts +2 -0
  23. package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +17 -0
  24. package/types/src/components/BottomNavigation/__tests__/BottomNavigation.spec.d.ts +1 -0
  25. package/types/src/components/BottomNavigation/index.d.ts +40 -0
  26. package/types/src/components/Icon/utils.d.ts +2 -0
  27. package/types/src/components/Typography/Text/StyledText.d.ts +1 -1
  28. package/types/src/components/Typography/Text/index.d.ts +1 -1
  29. package/types/src/index.d.ts +2 -1
  30. package/types/src/theme/components/bottomNavigation.d.ts +17 -0
  31. package/types/src/theme/components/typography.d.ts +1 -0
  32. package/types/src/theme/index.d.ts +2 -0
  33. package/types/src/utils/helpers.d.ts +2 -0
  34. package/.expo/README.md +0 -15
  35. package/.expo/packager-info.json +0 -10
  36. package/.expo/settings.json +0 -10
package/.eslintrc.json CHANGED
@@ -28,8 +28,8 @@
28
28
  "alias": {
29
29
  "styled-components-native": "./src/styled-components.ts"
30
30
  },
31
- "extensions": [".ts",".tsx"]
32
- }
31
+ "extensions": [".ts", ".tsx"]
32
+ }
33
33
  }
34
34
  },
35
35
  "rules": {
@@ -43,7 +43,8 @@
43
43
  "import/prefer-default-export": 0,
44
44
  "import/extensions": 0,
45
45
  "no-use-before-define": 0,
46
- "@typescript-eslint/no-use-before-define": 2
46
+ "@typescript-eslint/no-use-before-define": 2,
47
+ "@typescript-eslint/no-unused-vars": [2, { "argsIgnorePattern": "^_" }]
47
48
  },
48
49
  "overrides": [
49
50
  {
package/es/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import React, { useContext, useMemo, createElement, useRef, useEffect } from 'react';
2
- import require$$0$1, { Dimensions, View, Text as Text$1, Animated, StyleSheet as StyleSheet$1, TouchableHighlight } from 'react-native';
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$4 = ["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$4);
8151
+ defaults = _objectWithoutProperties$1(json, _excluded$5);
8151
8152
 
8152
8153
  if (ownInputs) {
8153
8154
  inputs = [];
@@ -9972,6 +9973,27 @@ var getBadgeTheme = function getBadgeTheme(theme) {
9972
9973
  };
9973
9974
  };
9974
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
+
9975
9997
  var getCardTheme = function getCardTheme(theme) {
9976
9998
  var radii = {
9977
9999
  "default": "12px"
@@ -10031,7 +10053,8 @@ var getIconTheme = function getIconTheme(theme) {
10031
10053
  var getTypographyTheme = function getTypographyTheme(theme) {
10032
10054
  var colors = {
10033
10055
  body: theme.colors.text,
10034
- subdued: theme.colors.disabledText
10056
+ subdued: theme.colors.disabledText,
10057
+ primary: theme.colors.primary
10035
10058
  };
10036
10059
  var fontSizes = {
10037
10060
  small: theme.fontSizes.small,
@@ -10082,6 +10105,7 @@ var getTheme = function getTheme() {
10082
10105
  return _objectSpread2(_objectSpread2({}, theme), {}, {
10083
10106
  __hd__: {
10084
10107
  badge: getBadgeTheme(theme),
10108
+ bottomNavigation: getBottomNavigationTheme(theme),
10085
10109
  card: getCardTheme(theme),
10086
10110
  divider: getDividerTheme(theme),
10087
10111
  icon: getIconTheme(theme),
@@ -10093,14 +10117,14 @@ var getTheme = function getTheme() {
10093
10117
 
10094
10118
  var theme = getTheme();
10095
10119
 
10096
- var _templateObject$6, _templateObject2$3, _templateObject3$2, _templateObject4$2;
10120
+ var _templateObject$7, _templateObject2$4, _templateObject3$3, _templateObject4$3;
10097
10121
  var BACKGROUND_INTENTS = {
10098
10122
  success: 'successBackground',
10099
10123
  warning: 'warningBackground',
10100
10124
  danger: 'dangerBackground',
10101
10125
  info: 'infoBackground'
10102
10126
  };
10103
- var StyledView = styled(View)(_templateObject$6 || (_templateObject$6 = _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) {
10104
10128
  var theme = _ref.theme;
10105
10129
  return theme.__hd__.badge.borderWidths["default"];
10106
10130
  }, function (_ref2) {
@@ -10111,7 +10135,7 @@ var StyledView = styled(View)(_templateObject$6 || (_templateObject$6 = _taggedT
10111
10135
  return theme.__hd__.badge.padding["default"];
10112
10136
  }, function (_ref4) {
10113
10137
  var themeIntent = _ref4.themeIntent;
10114
- 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) {
10115
10139
  var theme = _ref5.theme;
10116
10140
  return theme.__hd__.badge.colors[themeIntent];
10117
10141
  }, function (_ref6) {
@@ -10119,7 +10143,7 @@ var StyledView = styled(View)(_templateObject$6 || (_templateObject$6 = _taggedT
10119
10143
  return theme.__hd__.badge.colors[BACKGROUND_INTENTS[themeIntent]];
10120
10144
  });
10121
10145
  });
10122
- 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) {
10123
10147
  var theme = _ref7.theme;
10124
10148
  return theme.__hd__.badge.fontWeights["default"];
10125
10149
  }, function (_ref8) {
@@ -10127,13 +10151,13 @@ var StyledText$1 = styled(Text$1)(_templateObject3$2 || (_templateObject3$2 = _t
10127
10151
  return theme.__hd__.badge.fontSizes["default"];
10128
10152
  }, function (_ref9) {
10129
10153
  var themeIntent = _ref9.themeIntent;
10130
- 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) {
10131
10155
  var theme = _ref10.theme;
10132
10156
  return theme.__hd__.badge.colors[themeIntent];
10133
10157
  });
10134
10158
  });
10135
10159
 
10136
- var _excluded$3 = ["content", "intent", "style", "testID"];
10160
+ var _excluded$4 = ["content", "intent", "style", "testID"];
10137
10161
 
10138
10162
  var Badge = function Badge(_ref) {
10139
10163
  var content = _ref.content,
@@ -10141,7 +10165,7 @@ var Badge = function Badge(_ref) {
10141
10165
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
10142
10166
  style = _ref.style,
10143
10167
  testID = _ref.testID,
10144
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$3);
10168
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$4);
10145
10169
 
10146
10170
  return /*#__PURE__*/React.createElement(StyledView, _extends$1({
10147
10171
  themeIntent: intent,
@@ -10152,91 +10176,6 @@ var Badge = function Badge(_ref) {
10152
10176
  }, content));
10153
10177
  };
10154
10178
 
10155
- var _templateObject$5;
10156
- var StyledCard = styled(View)(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: ", ";\n overflow: hidden;\n"])), function (_ref) {
10157
- var theme = _ref.theme;
10158
- return theme.__hd__.card.radii["default"];
10159
- }, function (_ref2) {
10160
- var theme = _ref2.theme;
10161
- return theme.__hd__.card.padding["default"];
10162
- });
10163
-
10164
- var Card = function Card(props) {
10165
- return /*#__PURE__*/React.createElement(StyledCard, props);
10166
- };
10167
-
10168
- var _templateObject$4, _templateObject2$2, _templateObject3$1, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11, _templateObject12, _templateObject13;
10169
- var StyledDivider = styled(View)(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n max-width: 100%;\n\n ", "\n\n ", "\n"])), function (_ref) {
10170
- var theme = _ref.theme;
10171
- return theme.__hd__.divider.borderWidths["default"];
10172
- }, function (_ref2) {
10173
- var theme = _ref2.theme;
10174
- return theme.__hd__.divider.colors["default"];
10175
- }, function (_ref3) {
10176
- var themeMarginHorizontal = _ref3.themeMarginHorizontal,
10177
- theme = _ref3.theme;
10178
-
10179
- switch (themeMarginHorizontal) {
10180
- case undefined:
10181
- return css(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral([""])));
10182
-
10183
- case 'xsmall':
10184
- return css(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.xsmall);
10185
-
10186
- case 'small':
10187
- return css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.small);
10188
-
10189
- case 'medium':
10190
- return css(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.medium);
10191
-
10192
- case 'large':
10193
- return css(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.large);
10194
-
10195
- case 'xlarge':
10196
- return css(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteral(["\n margin-horizontal: ", ";\n "])), theme.__hd__.divider.space.xlarge);
10197
- }
10198
- }, function (_ref4) {
10199
- var themeMarginVertical = _ref4.themeMarginVertical,
10200
- theme = _ref4.theme;
10201
-
10202
- switch (themeMarginVertical) {
10203
- case undefined:
10204
- return css(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteral([""])));
10205
-
10206
- case 'xsmall':
10207
- return css(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.xsmall);
10208
-
10209
- case 'small':
10210
- return css(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.small);
10211
-
10212
- case 'medium':
10213
- return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.medium);
10214
-
10215
- case 'large':
10216
- return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.large);
10217
-
10218
- case 'xlarge':
10219
- return css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-vertical: ", ";\n "])), theme.__hd__.divider.space.xlarge);
10220
- }
10221
- });
10222
-
10223
- var _excluded$2 = ["marginHorizontal", "marginVertical", "style", "testID"];
10224
-
10225
- var Divider = function Divider(_ref) {
10226
- var marginHorizontal = _ref.marginHorizontal,
10227
- marginVertical = _ref.marginVertical,
10228
- style = _ref.style,
10229
- testID = _ref.testID,
10230
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$2);
10231
-
10232
- return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({
10233
- themeMarginHorizontal: marginHorizontal,
10234
- themeMarginVertical: marginVertical,
10235
- style: style,
10236
- testID: testID
10237
- }, nativeProps));
10238
- };
10239
-
10240
10179
  var dist = {};
10241
10180
 
10242
10181
  function _interopRequireDefault$5(obj) {
@@ -19865,12 +19804,12 @@ var heroIconConfig = {
19865
19804
  preferences: preferences
19866
19805
  };
19867
19806
 
19868
- var _templateObject$3, _templateObject2$1;
19807
+ var _templateObject$6, _templateObject2$3;
19869
19808
  var HeroIcon = dist.createIconSetFromIcoMoon(heroIconConfig, 'hero-icons', 'hero-icons.ttf');
19870
- var StyledHeroIcon = styled(HeroIcon)(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n ", ";\n"])), function (_ref) {
19809
+ var StyledHeroIcon = styled(HeroIcon)(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n ", ";\n"])), function (_ref) {
19871
19810
  var themeIntent = _ref.themeIntent,
19872
19811
  themeSize = _ref.themeSize;
19873
- 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) {
19874
19813
  var theme = _ref2.theme;
19875
19814
  return theme.__hd__.icon.colors[themeIntent];
19876
19815
  }, function (_ref3) {
@@ -19896,23 +19835,29 @@ var Icon = function Icon(_ref) {
19896
19835
  });
19897
19836
  };
19898
19837
 
19899
- var _templateObject$2, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
19900
- var StyledText = styled(Text$1)(_templateObject$2 || (_templateObject$2 = _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) {
19901
19846
  var themeFontSize = _ref.themeFontSize,
19902
19847
  theme = _ref.theme;
19903
19848
 
19904
19849
  switch (themeFontSize) {
19905
19850
  case 'small':
19906
- 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);
19907
19852
 
19908
19853
  case 'medium':
19909
- 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);
19910
19855
 
19911
19856
  case 'large':
19912
- 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);
19913
19858
 
19914
19859
  case 'xlarge':
19915
- 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);
19916
19861
  }
19917
19862
  }, function (_ref2) {
19918
19863
  var themeFontWeight = _ref2.themeFontWeight,
@@ -19920,13 +19865,13 @@ var StyledText = styled(Text$1)(_templateObject$2 || (_templateObject$2 = _tagge
19920
19865
 
19921
19866
  switch (themeFontWeight) {
19922
19867
  case 'light':
19923
- 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);
19924
19869
 
19925
19870
  case 'regular':
19926
- 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);
19927
19872
 
19928
19873
  case 'semi-bold':
19929
- 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);
19930
19875
  }
19931
19876
  }, function (_ref3) {
19932
19877
  var themeIntent = _ref3.themeIntent,
@@ -19934,14 +19879,17 @@ var StyledText = styled(Text$1)(_templateObject$2 || (_templateObject$2 = _tagge
19934
19879
 
19935
19880
  switch (themeIntent) {
19936
19881
  case 'body':
19937
- 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);
19938
19883
 
19939
19884
  case 'subdued':
19940
- 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);
19941
19889
  }
19942
19890
  });
19943
19891
 
19944
- var _excluded$1 = ["children", "fontSize", "fontWeight", "intent"];
19892
+ var _excluded$3 = ["children", "fontSize", "fontWeight", "intent"];
19945
19893
 
19946
19894
  var Text = function Text(_ref) {
19947
19895
  var children = _ref.children,
@@ -19951,7 +19899,7 @@ var Text = function Text(_ref) {
19951
19899
  fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
19952
19900
  _ref$intent = _ref.intent,
19953
19901
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
19954
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$1);
19902
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$3);
19955
19903
 
19956
19904
  return /*#__PURE__*/React.createElement(StyledText, _extends$1({
19957
19905
  themeFontSize: fontSize,
@@ -19964,6 +19912,228 @@ var Typography = {
19964
19912
  Text: Text
19965
19913
  };
19966
19914
 
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
+
19967
20137
  var _templateObject$1;
19968
20138
  var StyledFABIcon = styled(Icon)(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", ";\n"])), function (_ref) {
19969
20139
  var theme = _ref.theme;
@@ -20040,4 +20210,4 @@ var FAB = function FAB(_ref) {
20040
20210
  }));
20041
20211
  };
20042
20212
 
20043
- export { Badge, Card, Divider, FAB, Icon, ThemeProvider, Typography, getTheme, scale, theme, useTheme };
20213
+ export { Badge, BottomNavigation, Card, Divider, FAB, Icon, ThemeProvider, Typography, getTheme, scale, theme, useTheme };