@hero-design/rn 7.2.0 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/.expo/README.md +15 -0
  2. package/.expo/packager-info.json +10 -0
  3. package/.expo/prebuild/cached-packages.json +4 -0
  4. package/.expo/settings.json +10 -0
  5. package/.expo/xcodebuild-error.log +2 -0
  6. package/.expo/xcodebuild.log +11199 -0
  7. package/.turbo/turbo-build.log +8 -0
  8. package/.turbo/turbo-build:types.log +2 -0
  9. package/.turbo/turbo-publish:npm.log +0 -0
  10. package/.turbo/turbo-test.log +131 -0
  11. package/.turbo/turbo-type-check.log +7 -0
  12. package/es/index.js +2406 -469
  13. package/jest.config.js +1 -1
  14. package/lib/index.js +2423 -481
  15. package/package.json +4 -38
  16. package/playground/components/Avatar.tsx +102 -0
  17. package/playground/components/Badge.tsx +146 -9
  18. package/playground/components/Button.tsx +138 -35
  19. package/playground/components/Card.tsx +40 -14
  20. package/playground/components/Collapse.tsx +99 -0
  21. package/playground/components/Drawer.tsx +32 -0
  22. package/playground/components/FAB.tsx +15 -0
  23. package/playground/components/IconButton.tsx +67 -0
  24. package/playground/components/Progress.tsx +95 -0
  25. package/playground/components/Tabs.tsx +106 -14
  26. package/playground/components/Tag.tsx +45 -0
  27. package/playground/index.tsx +18 -0
  28. package/src/components/Avatar/StyledAvatar.tsx +61 -0
  29. package/src/components/Avatar/__tests__/StyledAvatar.spec.tsx +48 -0
  30. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +87 -0
  31. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +88 -0
  32. package/src/components/Avatar/__tests__/index.spec.tsx +26 -0
  33. package/src/components/Avatar/index.tsx +71 -0
  34. package/src/components/Badge/Status.tsx +77 -0
  35. package/src/components/Badge/StyledBadge.tsx +38 -26
  36. package/src/components/Badge/__tests__/Badge.spec.tsx +16 -0
  37. package/src/components/Badge/__tests__/Status.spec.tsx +27 -0
  38. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +133 -52
  39. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +89 -0
  40. package/src/components/Badge/index.tsx +77 -19
  41. package/src/components/Button/Button.tsx +163 -0
  42. package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +58 -0
  43. package/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.tsx +20 -0
  44. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +101 -0
  45. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +606 -0
  46. package/src/components/Button/LoadingIndicator/__tests__/index.spec.tsx +24 -0
  47. package/src/components/Button/LoadingIndicator/index.tsx +140 -0
  48. package/src/components/Button/StyledButton.tsx +254 -0
  49. package/src/components/Button/__tests__/Button.spec.tsx +86 -0
  50. package/src/components/Button/__tests__/{index.spec.tsx → IconButton.spec.tsx} +0 -0
  51. package/src/components/Button/__tests__/StyledButton.spec.tsx +154 -0
  52. package/src/components/Button/__tests__/__snapshots__/{index.spec.tsx.snap → IconButton.spec.tsx.snap} +0 -0
  53. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +895 -0
  54. package/src/components/Button/index.tsx +10 -2
  55. package/src/components/Card/StyledCard.tsx +27 -5
  56. package/src/components/Card/__tests__/StyledCard.spec.tsx +15 -3
  57. package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +34 -2
  58. package/src/components/Card/__tests__/index.spec.tsx +16 -21
  59. package/src/components/Card/index.tsx +15 -2
  60. package/src/components/Collapse/StyledCollapse.tsx +15 -0
  61. package/src/components/Collapse/__tests__/StyledCollapse.spec.tsx +26 -0
  62. package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +37 -0
  63. package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +84 -0
  64. package/src/components/Collapse/__tests__/index.spec.tsx +42 -0
  65. package/src/components/Collapse/index.tsx +109 -0
  66. package/src/components/Divider/index.tsx +1 -1
  67. package/src/components/Drawer/StyledDrawer.tsx +39 -0
  68. package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +244 -0
  69. package/src/components/Drawer/__tests__/index.spec.tsx +37 -0
  70. package/src/components/Drawer/index.tsx +93 -0
  71. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +78 -62
  72. package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +2 -0
  73. package/src/components/FAB/ActionGroup/index.tsx +13 -1
  74. package/src/components/FAB/FAB.tsx +63 -13
  75. package/src/components/FAB/StyledFAB.tsx +25 -6
  76. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +6 -2
  77. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +7 -3
  78. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +88 -6
  79. package/src/components/FAB/__tests__/index.spec.tsx +16 -0
  80. package/src/components/Progress/ProgressBar.tsx +73 -0
  81. package/src/components/Progress/ProgressCircle.tsx +165 -0
  82. package/src/components/Progress/StyledProgressBar.tsx +21 -0
  83. package/src/components/Progress/StyledProgressCircle.tsx +66 -0
  84. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +641 -0
  85. package/src/components/Progress/__tests__/index.spec.js +46 -0
  86. package/src/components/Progress/index.tsx +6 -0
  87. package/src/components/Progress/types.ts +1 -0
  88. package/src/components/Tabs/ActiveTabIndicator.tsx +37 -0
  89. package/src/components/Tabs/ScrollableTabs.tsx +216 -0
  90. package/src/components/Tabs/StyledScrollableTabs.tsx +60 -0
  91. package/src/components/Tabs/StyledTabs.tsx +30 -44
  92. package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +84 -0
  93. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +591 -0
  94. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +317 -224
  95. package/src/components/Tabs/__tests__/index.spec.tsx +22 -21
  96. package/src/components/Tabs/index.tsx +155 -114
  97. package/src/components/Tabs/utils.ts +13 -0
  98. package/src/components/Tag/StyledTag.tsx +35 -0
  99. package/src/components/Tag/__tests__/Tag.spec.tsx +41 -0
  100. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +153 -0
  101. package/src/components/Tag/index.tsx +41 -0
  102. package/src/components/Typography/Text/index.tsx +1 -1
  103. package/src/index.ts +10 -0
  104. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +181 -22
  105. package/src/theme/components/avatar.ts +40 -0
  106. package/src/theme/components/badge.ts +14 -16
  107. package/src/theme/components/button.ts +57 -0
  108. package/src/theme/components/card.ts +5 -5
  109. package/src/theme/components/drawer.ts +24 -0
  110. package/src/theme/components/fab.ts +9 -2
  111. package/src/theme/components/progress.ts +27 -0
  112. package/src/theme/components/tabs.ts +22 -7
  113. package/src/theme/components/tag.ts +39 -0
  114. package/src/theme/global/borders.ts +13 -1
  115. package/src/theme/global/colors.ts +7 -2
  116. package/src/theme/global/index.ts +3 -1
  117. package/src/theme/global/scale.ts +3 -0
  118. package/src/theme/index.ts +15 -0
  119. package/src/utils/hooks.ts +10 -0
  120. package/testUtils/setup.tsx +43 -0
  121. package/types/playground/components/Avatar.d.ts +2 -0
  122. package/types/playground/components/Badge.d.ts +0 -0
  123. package/types/playground/components/BottomNavigation.d.ts +0 -0
  124. package/types/playground/components/Button.d.ts +0 -0
  125. package/types/playground/components/Card.d.ts +0 -0
  126. package/types/playground/components/Collapse.d.ts +2 -0
  127. package/types/playground/components/Divider.d.ts +0 -0
  128. package/types/playground/components/Drawer.d.ts +2 -0
  129. package/types/playground/components/FAB.d.ts +0 -0
  130. package/types/playground/components/Icon.d.ts +0 -0
  131. package/types/playground/components/IconButton.d.ts +2 -0
  132. package/types/playground/components/Progress.d.ts +2 -0
  133. package/types/playground/components/Tabs.d.ts +0 -0
  134. package/types/playground/components/Tag.d.ts +2 -0
  135. package/types/playground/components/Typography.d.ts +0 -0
  136. package/types/playground/index.d.ts +0 -0
  137. package/types/src/components/Avatar/StyledAvatar.d.ts +46 -0
  138. package/types/src/components/Avatar/__tests__/StyledAvatar.spec.d.ts +1 -0
  139. package/types/src/components/Avatar/__tests__/index.spec.d.ts +1 -0
  140. package/types/src/components/Avatar/index.d.ts +25 -0
  141. package/types/src/components/Badge/Status.d.ts +24 -0
  142. package/types/src/components/Badge/StyledBadge.d.ts +17 -9
  143. package/types/src/components/Badge/__tests__/Badge.spec.d.ts +0 -0
  144. package/types/src/components/Badge/__tests__/Status.spec.d.ts +1 -0
  145. package/types/src/components/Badge/index.d.ts +17 -7
  146. package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
  147. package/types/src/components/BottomNavigation/__tests__/index.spec.d.ts +0 -0
  148. package/types/src/components/BottomNavigation/index.d.ts +0 -0
  149. package/types/src/components/Button/Button.d.ts +57 -0
  150. package/types/src/components/Button/IconButton.d.ts +0 -0
  151. package/types/src/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +20 -0
  152. package/types/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +1 -0
  153. package/types/src/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +1 -0
  154. package/types/src/components/Button/LoadingIndicator/index.d.ts +26 -0
  155. package/types/src/components/Button/StyledButton.d.ts +40 -0
  156. package/types/src/components/Button/__tests__/Button.spec.d.ts +1 -0
  157. package/types/src/components/Button/__tests__/IconButton.spec.d.ts +1 -0
  158. package/types/src/components/Button/__tests__/StyledButton.spec.d.ts +1 -0
  159. package/types/src/components/Button/__tests__/index.spec.d.ts +0 -0
  160. package/types/src/components/Button/index.d.ts +8 -4
  161. package/types/src/components/Card/StyledCard.d.ts +9 -1
  162. package/types/src/components/Card/__tests__/StyledCard.spec.d.ts +0 -0
  163. package/types/src/components/Card/__tests__/index.spec.d.ts +0 -0
  164. package/types/src/components/Card/index.d.ts +5 -1
  165. package/types/src/components/Collapse/StyledCollapse.d.ts +15 -0
  166. package/types/src/components/Collapse/__tests__/StyledCollapse.spec.d.ts +1 -0
  167. package/types/src/components/Collapse/__tests__/index.spec.d.ts +1 -0
  168. package/types/src/components/Collapse/index.d.ts +23 -0
  169. package/types/src/components/Divider/StyledDivider.d.ts +0 -0
  170. package/types/src/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -0
  171. package/types/src/components/Divider/index.d.ts +0 -0
  172. package/types/src/components/Drawer/StyledDrawer.d.ts +25 -0
  173. package/types/src/components/Drawer/__tests__/index.spec.d.ts +1 -0
  174. package/types/src/components/Drawer/index.d.ts +25 -0
  175. package/types/src/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
  176. package/types/src/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
  177. package/types/src/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
  178. package/types/src/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -0
  179. package/types/src/components/FAB/ActionGroup/index.d.ts +8 -1
  180. package/types/src/components/FAB/AnimatedFABIcon.d.ts +0 -0
  181. package/types/src/components/FAB/FAB.d.ts +5 -1
  182. package/types/src/components/FAB/StyledFAB.d.ts +8 -2
  183. package/types/src/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -0
  184. package/types/src/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -0
  185. package/types/src/components/FAB/__tests__/index.spec.d.ts +0 -0
  186. package/types/src/components/FAB/index.d.ts +2 -2
  187. package/types/src/components/Icon/HeroIcon/index.d.ts +0 -0
  188. package/types/src/components/Icon/IconList.d.ts +0 -0
  189. package/types/src/components/Icon/__tests__/index.spec.d.ts +0 -0
  190. package/types/src/components/Icon/index.d.ts +0 -0
  191. package/types/src/components/Icon/utils.d.ts +1 -1
  192. package/types/src/components/Progress/ProgressBar.d.ts +18 -0
  193. package/types/src/components/Progress/ProgressCircle.d.ts +18 -0
  194. package/types/src/components/Progress/StyledProgressBar.d.ts +18 -0
  195. package/types/src/components/Progress/StyledProgressCircle.d.ts +38 -0
  196. package/types/src/components/Progress/__tests__/index.spec.d.ts +1 -0
  197. package/types/src/components/Progress/index.d.ts +5 -0
  198. package/types/src/components/Progress/types.d.ts +1 -0
  199. package/types/src/components/Tabs/ActiveTabIndicator.d.ts +8 -0
  200. package/types/src/components/Tabs/ScrollableTabs.d.ts +3 -0
  201. package/types/src/components/Tabs/StyledScrollableTabs.d.ts +61 -0
  202. package/types/src/components/Tabs/StyledTabs.d.ts +22 -22
  203. package/types/src/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
  204. package/types/src/components/Tabs/__tests__/index.spec.d.ts +0 -0
  205. package/types/src/components/Tabs/index.d.ts +28 -19
  206. package/types/src/components/Tabs/utils.d.ts +2 -0
  207. package/types/src/components/Tag/StyledTag.d.ts +20 -0
  208. package/types/src/components/Tag/__tests__/Tag.spec.d.ts +1 -0
  209. package/types/src/components/Tag/index.d.ts +21 -0
  210. package/types/src/components/Typography/Text/StyledText.d.ts +0 -0
  211. package/types/src/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -0
  212. package/types/src/components/Typography/Text/__tests__/index.spec.d.ts +0 -0
  213. package/types/src/components/Typography/Text/index.d.ts +0 -0
  214. package/types/src/components/Typography/index.d.ts +0 -0
  215. package/types/src/index.d.ts +6 -1
  216. package/types/src/testHelpers/renderWithTheme.d.ts +0 -0
  217. package/types/src/theme/__tests__/index.spec.d.ts +0 -0
  218. package/types/src/theme/components/avatar.d.ts +32 -0
  219. package/types/src/theme/components/badge.d.ts +12 -13
  220. package/types/src/theme/components/bottomNavigation.d.ts +0 -0
  221. package/types/src/theme/components/button.d.ts +37 -0
  222. package/types/src/theme/components/card.d.ts +3 -3
  223. package/types/src/theme/components/divider.d.ts +0 -0
  224. package/types/src/theme/components/drawer.d.ts +21 -0
  225. package/types/src/theme/components/fab.d.ts +8 -1
  226. package/types/src/theme/components/icon.d.ts +0 -0
  227. package/types/src/theme/components/progress.d.ts +21 -0
  228. package/types/src/theme/components/tabs.d.ts +14 -2
  229. package/types/src/theme/components/tag.d.ts +30 -0
  230. package/types/src/theme/components/typography.d.ts +0 -0
  231. package/types/src/theme/global/borders.d.ts +7 -1
  232. package/types/src/theme/global/colors.d.ts +6 -1
  233. package/types/src/theme/global/index.d.ts +7 -1
  234. package/types/src/theme/global/scale.d.ts +1 -0
  235. package/types/src/theme/global/space.d.ts +0 -0
  236. package/types/src/theme/global/typography.d.ts +0 -0
  237. package/types/src/theme/index.d.ts +10 -0
  238. package/types/src/types.d.ts +0 -0
  239. package/types/src/utils/__tests__/scale.spec.d.ts +0 -0
  240. package/types/src/utils/helpers.d.ts +0 -0
  241. package/types/src/utils/hooks.d.ts +1 -0
  242. package/types/src/utils/scale.d.ts +0 -0
  243. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +0 -34
  244. package/testUtils/setup.ts +0 -18
package/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import * as reactNative from 'react-native';
2
- import reactNative__default, { Dimensions, StyleSheet as StyleSheet$1, View, Text as Text$1, Platform, TouchableWithoutFeedback, TouchableOpacity, TouchableHighlight, Animated, FlatList } from 'react-native';
3
- import React, { useContext, createElement, createContext, forwardRef, useRef, useEffect } from 'react';
1
+ import * as ReactNative from 'react-native';
2
+ import ReactNative__default, { Dimensions, StyleSheet as StyleSheet$1, TouchableOpacity, View, Text as Text$1, Image, Animated, Platform, TouchableWithoutFeedback, Easing, Pressable, TouchableHighlight, requireNativeComponent, UIManager, I18nManager, Keyboard, FlatList } from 'react-native';
3
+ import React, { useContext, createElement, createContext, forwardRef, useRef, useEffect, useState, useCallback, Children } from 'react';
4
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
5
 
6
6
  function ownKeys(object, enumerableOnly) {
@@ -20,7 +20,7 @@ function _objectSpread2(target) {
20
20
  for (var i = 1; i < arguments.length; i++) {
21
21
  var source = null != arguments[i] ? arguments[i] : {};
22
22
  i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
23
- _defineProperty$1(target, key, source[key]);
23
+ _defineProperty$2(target, key, source[key]);
24
24
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
25
25
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
26
26
  });
@@ -39,7 +39,32 @@ function _typeof$2(obj) {
39
39
  }, _typeof$2(obj);
40
40
  }
41
41
 
42
- function _defineProperty$1(obj, key, value) {
42
+ function _classCallCheck$1(instance, Constructor) {
43
+ if (!(instance instanceof Constructor)) {
44
+ throw new TypeError("Cannot call a class as a function");
45
+ }
46
+ }
47
+
48
+ function _defineProperties$1(target, props) {
49
+ for (var i = 0; i < props.length; i++) {
50
+ var descriptor = props[i];
51
+ descriptor.enumerable = descriptor.enumerable || false;
52
+ descriptor.configurable = true;
53
+ if ("value" in descriptor) descriptor.writable = true;
54
+ Object.defineProperty(target, descriptor.key, descriptor);
55
+ }
56
+ }
57
+
58
+ function _createClass$1(Constructor, protoProps, staticProps) {
59
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
60
+ if (staticProps) _defineProperties$1(Constructor, staticProps);
61
+ Object.defineProperty(Constructor, "prototype", {
62
+ writable: false
63
+ });
64
+ return Constructor;
65
+ }
66
+
67
+ function _defineProperty$2(obj, key, value) {
43
68
  if (key in obj) {
44
69
  Object.defineProperty(obj, key, {
45
70
  value: value,
@@ -54,8 +79,8 @@ function _defineProperty$1(obj, key, value) {
54
79
  return obj;
55
80
  }
56
81
 
57
- function _extends$2() {
58
- _extends$2 = Object.assign || function (target) {
82
+ function _extends$3() {
83
+ _extends$3 = Object.assign || function (target) {
59
84
  for (var i = 1; i < arguments.length; i++) {
60
85
  var source = arguments[i];
61
86
 
@@ -69,7 +94,54 @@ function _extends$2() {
69
94
  return target;
70
95
  };
71
96
 
72
- return _extends$2.apply(this, arguments);
97
+ return _extends$3.apply(this, arguments);
98
+ }
99
+
100
+ function _inherits$1(subClass, superClass) {
101
+ if (typeof superClass !== "function" && superClass !== null) {
102
+ throw new TypeError("Super expression must either be null or a function");
103
+ }
104
+
105
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
106
+ constructor: {
107
+ value: subClass,
108
+ writable: true,
109
+ configurable: true
110
+ }
111
+ });
112
+ Object.defineProperty(subClass, "prototype", {
113
+ writable: false
114
+ });
115
+ if (superClass) _setPrototypeOf$1(subClass, superClass);
116
+ }
117
+
118
+ function _getPrototypeOf$1(o) {
119
+ _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
120
+ return o.__proto__ || Object.getPrototypeOf(o);
121
+ };
122
+ return _getPrototypeOf$1(o);
123
+ }
124
+
125
+ function _setPrototypeOf$1(o, p) {
126
+ _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
127
+ o.__proto__ = p;
128
+ return o;
129
+ };
130
+
131
+ return _setPrototypeOf$1(o, p);
132
+ }
133
+
134
+ function _isNativeReflectConstruct() {
135
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
136
+ if (Reflect.construct.sham) return false;
137
+ if (typeof Proxy === "function") return true;
138
+
139
+ try {
140
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
141
+ return true;
142
+ } catch (e) {
143
+ return false;
144
+ }
73
145
  }
74
146
 
75
147
  function _objectWithoutPropertiesLoose$1(source, excluded) {
@@ -108,6 +180,43 @@ function _objectWithoutProperties$1(source, excluded) {
108
180
  return target;
109
181
  }
110
182
 
183
+ function _assertThisInitialized$1(self) {
184
+ if (self === void 0) {
185
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
186
+ }
187
+
188
+ return self;
189
+ }
190
+
191
+ function _possibleConstructorReturn$1(self, call) {
192
+ if (call && (typeof call === "object" || typeof call === "function")) {
193
+ return call;
194
+ } else if (call !== void 0) {
195
+ throw new TypeError("Derived constructors may only return object or undefined");
196
+ }
197
+
198
+ return _assertThisInitialized$1(self);
199
+ }
200
+
201
+ function _createSuper(Derived) {
202
+ var hasNativeReflectConstruct = _isNativeReflectConstruct();
203
+
204
+ return function _createSuperInternal() {
205
+ var Super = _getPrototypeOf$1(Derived),
206
+ result;
207
+
208
+ if (hasNativeReflectConstruct) {
209
+ var NewTarget = _getPrototypeOf$1(this).constructor;
210
+
211
+ result = Reflect.construct(Super, arguments, NewTarget);
212
+ } else {
213
+ result = Super.apply(this, arguments);
214
+ }
215
+
216
+ return _possibleConstructorReturn$1(this, result);
217
+ };
218
+ }
219
+
111
220
  function _slicedToArray(arr, i) {
112
221
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
113
222
  }
@@ -1187,6 +1296,21 @@ function prefixer(element, index, children, callback) {
1187
1296
  }
1188
1297
  }
1189
1298
 
1299
+ var weakMemoize = function weakMemoize(func) {
1300
+ // $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
1301
+ var cache = new WeakMap();
1302
+ return function (arg) {
1303
+ if (cache.has(arg)) {
1304
+ // $FlowFixMe
1305
+ return cache.get(arg);
1306
+ }
1307
+
1308
+ var ret = func(arg);
1309
+ cache.set(arg, ret);
1310
+ return ret;
1311
+ };
1312
+ };
1313
+
1190
1314
  var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
1191
1315
  var previous = 0;
1192
1316
  var character = 0;
@@ -1407,8 +1531,8 @@ var createCache = function createCache(options) {
1407
1531
  return cache;
1408
1532
  };
1409
1533
 
1410
- function _extends$1() {
1411
- _extends$1 = Object.assign ? Object.assign.bind() : function (target) {
1534
+ function _extends$2() {
1535
+ _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
1412
1536
  for (var i = 1; i < arguments.length; i++) {
1413
1537
  var source = arguments[i];
1414
1538
 
@@ -1421,24 +1545,9 @@ function _extends$1() {
1421
1545
 
1422
1546
  return target;
1423
1547
  };
1424
- return _extends$1.apply(this, arguments);
1548
+ return _extends$2.apply(this, arguments);
1425
1549
  }
1426
1550
 
1427
- var weakMemoize = function weakMemoize(func) {
1428
- // $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
1429
- var cache = new WeakMap();
1430
- return function (arg) {
1431
- if (cache.has(arg)) {
1432
- // $FlowFixMe
1433
- return cache.get(arg);
1434
- }
1435
-
1436
- var ret = func(arg);
1437
- cache.set(arg, ret);
1438
- return ret;
1439
- };
1440
- };
1441
-
1442
1551
  var EmotionCacheContext = /* #__PURE__ */createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
1443
1552
  // because this module is primarily intended for the browser and node
1444
1553
  // but it's also required in react native and similar environments sometimes
@@ -1464,7 +1573,7 @@ var getTheme$1 = function getTheme(outerTheme, theme) {
1464
1573
  return mergedTheme;
1465
1574
  }
1466
1575
 
1467
- return _extends$1({}, outerTheme, theme);
1576
+ return _extends$2({}, outerTheme, theme);
1468
1577
  };
1469
1578
 
1470
1579
  var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
@@ -1489,11 +1598,13 @@ var BASE_BORDER_WIDTH = 1;
1489
1598
  var BASE_SPACE = 8;
1490
1599
  var BASE_FONT = 'BeVietnamPro';
1491
1600
  var BASE_FONT_SIZE = 10;
1601
+ var BASE_RADIUS = 4;
1492
1602
  var scale$1 = {
1493
1603
  borderWidth: BASE_BORDER_WIDTH,
1494
1604
  space: BASE_SPACE,
1495
1605
  font: BASE_FONT,
1496
- fontSize: BASE_FONT_SIZE
1606
+ fontSize: BASE_FONT_SIZE,
1607
+ radius: BASE_RADIUS
1497
1608
  };
1498
1609
 
1499
1610
  var palette = {
@@ -1550,6 +1661,7 @@ var palette = {
1550
1661
  pinkLight75: '#fcd5ea',
1551
1662
  pinkLight90: '#ffeef7',
1552
1663
  purple: '#be83cf',
1664
+ purpleDark15: '#a26fb0',
1553
1665
  red: '#de350b',
1554
1666
  redDark15: '#bd2d09',
1555
1667
  redDark30: '#9b2508',
@@ -1563,6 +1675,7 @@ var palette = {
1563
1675
  smaltDark75: '#000d20',
1564
1676
  smaltLight30: '#4d72a6',
1565
1677
  smaltLight45: '#7390b9',
1678
+ smaltLight75: '#bfcddf',
1566
1679
  smaltLight90: '#e6ebf2',
1567
1680
  violet: '#7622d7',
1568
1681
  violetDark15: '#641db7',
@@ -1584,12 +1697,15 @@ var palette = {
1584
1697
  var systemPalette = {
1585
1698
  primary: palette.violet,
1586
1699
  primaryLight: palette.violetLight60,
1700
+ primaryDark: palette.purpleDark15,
1701
+ primaryBackground: palette.violetLight90,
1702
+ secondary: palette.dodgerBlue,
1703
+ secondaryLight: palette.dodgerBlueLight75,
1587
1704
  info: palette.dodgerBlue,
1588
1705
  infoLight: palette.dodgerBlueLight75,
1589
1706
  infoBackground: palette.dodgerBlueLight90,
1590
1707
  success: palette.green,
1591
1708
  successDark: palette.greenDark30,
1592
- successLight: palette.greenDark75,
1593
1709
  successBackground: palette.grotesqueGreenLight90,
1594
1710
  danger: palette.red,
1595
1711
  dangerLight: palette.redLight60,
@@ -1602,8 +1718,10 @@ var systemPalette = {
1602
1718
  backgroundDark: palette.greyDark75,
1603
1719
  text: palette.greyDark75,
1604
1720
  disabledText: palette.greyDark15,
1721
+ disabledLightText: palette.greyLight45,
1605
1722
  invertedText: palette.white,
1606
- outline: palette.greyLight60
1723
+ outline: palette.greyLight60,
1724
+ archived: palette.greyLight45
1607
1725
  };
1608
1726
 
1609
1727
  var BASE_WIDTH = 390; // Based on iPhone 13's viewport size
@@ -1695,56 +1813,64 @@ var getBorderWidths = function getBorderWidths(baseBorderWidth) {
1695
1813
  };
1696
1814
  };
1697
1815
 
1816
+ var getRadii = function getRadii(baseRadius) {
1817
+ return {
1818
+ rounded: 999,
1819
+ base: baseRadius,
1820
+ medium: baseRadius * 2
1821
+ };
1822
+ };
1823
+
1698
1824
  var getGlobalTheme = function getGlobalTheme(scale, systemPalette) {
1699
1825
  var fonts = getFonts(scale.font);
1700
1826
  var fontSizes = getFontSizes(scale.fontSize);
1701
1827
  var lineHeights = getLineHeights(fontSizes);
1702
1828
  var borderWidths = getBorderWidths(scale.borderWidth);
1703
1829
  var space = getSpace(scale.space);
1830
+ var radii = getRadii(scale.radius);
1704
1831
  return {
1705
1832
  colors: _objectSpread2({}, systemPalette),
1706
1833
  fonts: fonts,
1707
1834
  fontSizes: fontSizes,
1708
1835
  lineHeights: lineHeights,
1709
1836
  borderWidths: borderWidths,
1710
- space: space
1837
+ space: space,
1838
+ radii: radii
1711
1839
  };
1712
1840
  };
1713
1841
 
1714
1842
  var getBadgeTheme = function getBadgeTheme(theme) {
1715
- var borderWidths = {
1716
- "default": theme.borderWidths.base
1717
- };
1718
1843
  var colors = {
1719
1844
  danger: theme.colors.danger,
1720
- dangerBackground: theme.colors.dangerBackground,
1721
1845
  info: theme.colors.info,
1722
- infoBackground: theme.colors.infoBackground,
1723
1846
  success: theme.colors.successDark,
1724
- successBackground: theme.colors.successBackground,
1725
1847
  warning: theme.colors.warningDark,
1726
- warningBackground: theme.colors.warningBackground
1848
+ archived: theme.colors.archived,
1849
+ text: theme.colors.invertedText
1727
1850
  };
1728
- var font = {
1851
+ var fonts = {
1729
1852
  "default": theme.fonts.semiBold
1730
1853
  };
1731
- var fontSize = {
1854
+ var fontSizes = {
1732
1855
  "default": theme.fontSizes.small
1733
1856
  };
1857
+ var sizes = {
1858
+ height: theme.fontSizes.small + theme.space.small,
1859
+ minWidth: theme.fontSizes.small + theme.space.small,
1860
+ statusHeight: theme.space.small,
1861
+ statusWidth: theme.space.small
1862
+ };
1734
1863
  var space = {
1735
1864
  horizontalPadding: theme.space.small,
1736
- verticalPadding: theme.space.xxsmall
1737
- };
1738
- var radii = {
1739
- "default": 4
1865
+ statusPositionTop: -theme.space.xxsmall,
1866
+ statusPositionRight: -theme.space.xxsmall
1740
1867
  };
1741
1868
  return {
1742
- borderWidths: borderWidths,
1743
1869
  colors: colors,
1744
- font: font,
1745
- fontSize: fontSize,
1746
- space: space,
1747
- radii: radii
1870
+ fonts: fonts,
1871
+ fontSizes: fontSizes,
1872
+ sizes: sizes,
1873
+ space: space
1748
1874
  };
1749
1875
  };
1750
1876
 
@@ -1776,16 +1902,62 @@ var getBottomNavigationTheme = function getBottomNavigationTheme(theme) {
1776
1902
  };
1777
1903
  };
1778
1904
 
1779
- var getCardTheme = function getCardTheme(theme) {
1905
+ var getButtonTheme = function getButtonTheme(theme) {
1906
+ var fonts = {
1907
+ "default": theme.fonts.semiBold
1908
+ };
1909
+ var fontSize = {
1910
+ "default": theme.fontSizes.xlarge
1911
+ };
1912
+ var lineHeight = {
1913
+ "default": theme.lineHeights.large
1914
+ };
1915
+ var borderWidth = {
1916
+ "default": theme.space.xxsmall
1917
+ };
1918
+ var space = {
1919
+ buttonPadding: theme.space.medium,
1920
+ iconPadding: theme.space.small
1921
+ };
1922
+ var sizes = {
1923
+ iconSize: theme.fontSizes.xxlarge
1924
+ };
1780
1925
  var radii = {
1781
- "default": 12
1926
+ "default": theme.space.xlarge
1782
1927
  };
1783
- var padding = {
1784
- "default": theme.space.small
1928
+ var colors = {
1929
+ primary: theme.colors.primary,
1930
+ pressedPrimary: theme.colors.primaryLight,
1931
+ secondary: theme.colors.secondary,
1932
+ pressedSecondary: theme.colors.secondaryLight,
1933
+ defaultText: theme.colors.text,
1934
+ disabledText: theme.colors.disabledLightText,
1935
+ disabledBorder: theme.colors.disabledLightText,
1936
+ disabledBackground: theme.colors.disabledLightText,
1937
+ invertedText: theme.colors.invertedText
1785
1938
  };
1786
1939
  return {
1940
+ borderWidth: borderWidth,
1941
+ fonts: fonts,
1942
+ fontSize: fontSize,
1943
+ sizes: sizes,
1787
1944
  radii: radii,
1788
- padding: padding
1945
+ colors: colors,
1946
+ lineHeight: lineHeight,
1947
+ space: space
1948
+ };
1949
+ };
1950
+
1951
+ var getCardTheme = function getCardTheme(theme) {
1952
+ var colors = {
1953
+ dataCardIndicator: theme.colors.primaryDark
1954
+ };
1955
+ var radii = {
1956
+ "default": 12
1957
+ };
1958
+ return {
1959
+ colors: colors,
1960
+ radii: radii
1789
1961
  };
1790
1962
  };
1791
1963
 
@@ -1810,21 +1982,98 @@ var getDividerTheme = function getDividerTheme(theme) {
1810
1982
  };
1811
1983
  };
1812
1984
 
1985
+ var getDrawerTheme = function getDrawerTheme(theme) {
1986
+ var colors = {
1987
+ shadow: theme.colors.backgroundDark,
1988
+ background: theme.colors.platformBackground,
1989
+ backdrop: theme.colors.backgroundDark
1990
+ };
1991
+ var radii = {
1992
+ "default": 16
1993
+ };
1994
+ var shadows = {
1995
+ offset: {
1996
+ width: 0,
1997
+ height: 3
1998
+ },
1999
+ opacity: 0.27,
2000
+ radius: 4.65,
2001
+ elevation: 10
2002
+ };
2003
+ return {
2004
+ colors: colors,
2005
+ radii: radii,
2006
+ shadows: shadows
2007
+ };
2008
+ };
2009
+
1813
2010
  var getTabsTheme = function getTabsTheme(theme) {
1814
2011
  var colors = {
1815
- background: theme.colors.primary,
1816
- active: theme.colors.invertedText,
1817
- inactive: "".concat(theme.colors.invertedText, "50")
2012
+ active: theme.colors.primary,
2013
+ inactive: theme.colors.text,
2014
+ activeBackground: theme.colors.primaryBackground,
2015
+ headerBottom: theme.colors.outline,
2016
+ text: theme.colors.text
1818
2017
  };
1819
2018
  var space = {
1820
2019
  flatListHorizontalPadding: theme.space.small,
1821
- titleMarginLeft: theme.space.small,
1822
- itemHorizontalPadding: theme.space.medium,
1823
- itemVerticalPadding: theme.space.large
2020
+ itemHorizontalPadding: theme.space.small,
2021
+ itemVerticalPadding: theme.space.small,
2022
+ outlineHorizontalPadding: theme.space.small,
2023
+ outlineVerticalPadding: theme.space.xsmall
2024
+ };
2025
+ var radii = {
2026
+ outline: theme.radii.medium
2027
+ };
2028
+ var borderWidths = {
2029
+ headerBottom: theme.borderWidths.base
2030
+ };
2031
+ var sizes = {
2032
+ indicator: theme.space.xxsmall
1824
2033
  };
1825
2034
  return {
2035
+ borderWidths: borderWidths,
1826
2036
  colors: colors,
1827
- space: space
2037
+ space: space,
2038
+ radii: radii,
2039
+ sizes: sizes
2040
+ };
2041
+ };
2042
+
2043
+ var getTagTheme = function getTagTheme(theme) {
2044
+ var borderWidths = {
2045
+ "default": theme.borderWidths.base
2046
+ };
2047
+ var colors = {
2048
+ danger: theme.colors.danger,
2049
+ dangerBackground: theme.colors.dangerBackground,
2050
+ info: theme.colors.info,
2051
+ infoBackground: theme.colors.infoBackground,
2052
+ success: theme.colors.successDark,
2053
+ successBackground: theme.colors.successBackground,
2054
+ warning: theme.colors.warningDark,
2055
+ warningBackground: theme.colors.warningBackground
2056
+ };
2057
+ var fonts = {
2058
+ "default": theme.fonts.semiBold
2059
+ };
2060
+ var fontSizes = {
2061
+ "default": theme.fontSizes.small
2062
+ };
2063
+ var space = {
2064
+ horizontalPadding: theme.space.small,
2065
+ verticalPadding: theme.space.xxsmall
2066
+ };
2067
+ var radii = {
2068
+ "default": theme.radii.base
2069
+ };
2070
+ return {
2071
+ borderWidths: borderWidths,
2072
+ colors: colors,
2073
+ fonts: fonts,
2074
+ fontSizes: fontSizes,
2075
+ space: space,
2076
+ radii: radii
1828
2077
  };
1829
2078
  };
1830
2079
 
@@ -1850,6 +2099,31 @@ var getIconTheme = function getIconTheme(theme) {
1850
2099
  };
1851
2100
  };
1852
2101
 
2102
+ var getProgressTheme = function getProgressTheme(theme) {
2103
+ var colors = {
2104
+ primary: theme.colors.primary,
2105
+ success: theme.colors.success,
2106
+ warning: theme.colors.warning,
2107
+ danger: theme.colors.danger,
2108
+ info: theme.colors.info,
2109
+ background: theme.colors.outline,
2110
+ innerBackground: theme.colors.platformBackground
2111
+ };
2112
+ var sizes = {
2113
+ radius: theme.space.xxxlarge,
2114
+ strokeWidth: theme.space.small,
2115
+ barHeight: theme.space.xsmall
2116
+ };
2117
+ var radii = {
2118
+ "default": theme.radii.rounded
2119
+ };
2120
+ return {
2121
+ colors: colors,
2122
+ sizes: sizes,
2123
+ radii: radii
2124
+ };
2125
+ };
2126
+
1853
2127
  var getTypographyTheme = function getTypographyTheme(theme) {
1854
2128
  var colors = {
1855
2129
  body: theme.colors.text,
@@ -1887,7 +2161,8 @@ var getFABTheme = function getFABTheme(theme) {
1887
2161
  icon: theme.colors.invertedText,
1888
2162
  headerText: theme.colors.text,
1889
2163
  actionItemBackground: theme.colors.infoLight,
1890
- backdropBackground: theme.colors.platformBackground
2164
+ backdropBackground: theme.colors.platformBackground,
2165
+ titleText: theme.colors.invertedText
1891
2166
  };
1892
2167
  var sizes = {
1893
2168
  width: 64,
@@ -1895,16 +2170,19 @@ var getFABTheme = function getFABTheme(theme) {
1895
2170
  };
1896
2171
  var fonts = {
1897
2172
  header: theme.fonts.semiBold,
1898
- actionItemText: theme.fonts.regular
2173
+ actionItemText: theme.fonts.regular,
2174
+ title: theme.fonts.semiBold
1899
2175
  };
1900
2176
  var fontSizes = {
1901
2177
  header: theme.fontSizes.xxxlarge,
1902
- buttonIcon: theme.fontSizes.xxxlarge,
1903
- actionItemText: theme.fontSizes.medium
2178
+ actionItemText: theme.fontSizes.medium,
2179
+ title: theme.fontSizes.large
1904
2180
  };
1905
2181
  var lineHeights = {
1906
2182
  header: theme.lineHeights.xxxlarge,
1907
- actionItemText: theme.lineHeights.medium
2183
+ actionItemText: theme.lineHeights.medium,
2184
+ title: theme.lineHeights.large,
2185
+ icon: theme.lineHeights.large
1908
2186
  };
1909
2187
  var space = {
1910
2188
  actionItemPaddingLeft: theme.space.medium,
@@ -1917,10 +2195,13 @@ var getFABTheme = function getFABTheme(theme) {
1917
2195
  buttonMarginTop: theme.space.large,
1918
2196
  buttonMarginRight: theme.space.large,
1919
2197
  headerTextMarginRight: theme.space.large,
1920
- headerTextMarginBottom: theme.space.large
2198
+ headerTextMarginBottom: theme.space.large,
2199
+ containerPaddingHorizontal: theme.space.medium,
2200
+ containerPaddingVertical: theme.space.medium,
2201
+ titleMarginHorizontal: theme.space.small
1921
2202
  };
1922
2203
  var radii = {
1923
- actionItem: 999
2204
+ actionItem: theme.radii.rounded
1924
2205
  };
1925
2206
  return {
1926
2207
  radii: radii,
@@ -1933,18 +2214,61 @@ var getFABTheme = function getFABTheme(theme) {
1933
2214
  };
1934
2215
  };
1935
2216
 
1936
- var getTheme = function getTheme() {
1937
- var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
2217
+ var getAvatarTheme = function getAvatarTheme(theme) {
2218
+ var colors = {
2219
+ primary: theme.colors.primary,
2220
+ info: theme.colors.info,
2221
+ danger: theme.colors.danger,
2222
+ success: theme.colors.success,
2223
+ warning: theme.colors.warning
2224
+ };
2225
+ var sizes = {
2226
+ small: theme.space.xlarge,
2227
+ medium: theme.space.xxlarge,
2228
+ large: theme.space.xxxlarge,
2229
+ xlarge: theme.space.xxxxlarge
2230
+ };
2231
+ var fontSizes = {
2232
+ small: theme.fontSizes.large,
2233
+ medium: theme.fontSizes.xlarge,
2234
+ large: theme.fontSizes.xxlarge,
2235
+ xlarge: theme.fontSizes.xxxlarge
2236
+ };
2237
+ var radii = {
2238
+ small: theme.space.xlarge / 2,
2239
+ medium: theme.space.xxlarge / 2,
2240
+ large: theme.space.xxxlarge / 2,
2241
+ xlarge: theme.space.xxxxlarge / 2
2242
+ };
2243
+ var borderWidths = {
2244
+ "default": theme.borderWidths.base
2245
+ };
2246
+ return {
2247
+ colors: colors,
2248
+ sizes: sizes,
2249
+ radii: radii,
2250
+ borderWidths: borderWidths,
2251
+ fontSizes: fontSizes
2252
+ };
2253
+ };
2254
+
2255
+ var getTheme = function getTheme() {
2256
+ var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : scale$1;
1938
2257
  var systemPallete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : systemPalette;
1939
2258
  var globalTheme = getGlobalTheme(scale, systemPallete);
1940
2259
  return _objectSpread2(_objectSpread2({}, globalTheme), {}, {
1941
2260
  __hd__: {
2261
+ avatar: getAvatarTheme(globalTheme),
1942
2262
  badge: getBadgeTheme(globalTheme),
1943
2263
  bottomNavigation: getBottomNavigationTheme(globalTheme),
2264
+ button: getButtonTheme(globalTheme),
1944
2265
  card: getCardTheme(globalTheme),
1945
2266
  divider: getDividerTheme(globalTheme),
2267
+ drawer: getDrawerTheme(globalTheme),
2268
+ progress: getProgressTheme(globalTheme),
1946
2269
  icon: getIconTheme(globalTheme),
1947
2270
  tabs: getTabsTheme(globalTheme),
2271
+ tag: getTagTheme(globalTheme),
1948
2272
  typography: getTypographyTheme(globalTheme),
1949
2273
  fab: getFABTheme(globalTheme)
1950
2274
  }
@@ -3873,63 +4197,239 @@ var getDisplayName = function getDisplayName(primitive) {
3873
4197
 
3874
4198
  var styled = createStyled(StyleSheet$1);
3875
4199
  var components = ['ActivityIndicator', 'Button', 'DatePickerIOS', 'DrawerLayoutAndroid', 'FlatList', 'Image', 'ImageBackground', 'KeyboardAvoidingView', 'ListView', 'Modal', 'NavigatorIOS', 'Picker', 'PickerIOS', 'Pressable', 'ProgressBarAndroid', 'ProgressViewIOS', 'RecyclerViewBackedScrollView', 'RefreshControl', 'SafeAreaView', 'ScrollView', 'SectionList', 'SegmentedControlIOS', 'Slider', 'SnapshotViewIOS', 'StatusBar', 'SwipeableListView', 'Switch', 'SwitchIOS', 'TabBarIOS', 'Text', 'TextInput', 'ToolbarAndroid', 'TouchableHighlight', 'TouchableNativeFeedback', 'TouchableOpacity', 'TouchableWithoutFeedback', 'View', 'ViewPagerAndroid'];
3876
- var index$1 = components.reduce(function (acc, comp) {
4200
+ var index$2 = components.reduce(function (acc, comp) {
3877
4201
  return Object.defineProperty(acc, comp, {
3878
4202
  enumerable: true,
3879
4203
  configurable: false,
3880
4204
  get: function get() {
3881
- return styled(reactNative[comp]);
4205
+ return styled(ReactNative[comp]);
3882
4206
  }
3883
4207
  });
3884
4208
  }, styled);
3885
4209
 
3886
- var BACKGROUND_INTENTS = {
3887
- success: 'successBackground',
3888
- warning: 'warningBackground',
3889
- danger: 'dangerBackground',
3890
- info: 'infoBackground'
4210
+ var StyledPressable = index$2(TouchableOpacity)(function (_ref) {
4211
+ var themeSize = _ref.themeSize,
4212
+ themeIntent = _ref.themeIntent,
4213
+ theme = _ref.theme;
4214
+ return {
4215
+ borderWidth: theme.__hd__.avatar.borderWidths["default"],
4216
+ borderRadius: theme.__hd__.avatar.radii[themeSize],
4217
+ borderColor: theme.__hd__.avatar.colors[themeIntent],
4218
+ width: theme.__hd__.avatar.sizes[themeSize],
4219
+ height: theme.__hd__.avatar.sizes[themeSize],
4220
+ overflow: 'hidden'
4221
+ };
4222
+ });
4223
+ var StyledView$2 = index$2(View)(function (_ref2) {
4224
+ var themeSize = _ref2.themeSize,
4225
+ themeIntent = _ref2.themeIntent,
4226
+ theme = _ref2.theme;
4227
+ return {
4228
+ borderWidth: theme.__hd__.avatar.borderWidths["default"],
4229
+ borderRadius: theme.__hd__.avatar.radii[themeSize],
4230
+ borderColor: theme.__hd__.avatar.colors[themeIntent],
4231
+ width: theme.__hd__.avatar.sizes[themeSize],
4232
+ height: theme.__hd__.avatar.sizes[themeSize],
4233
+ overflow: 'hidden'
4234
+ };
4235
+ });
4236
+ var StyledTextWrapper = index$2(View)(function () {
4237
+ return {
4238
+ alignItems: 'center',
4239
+ justifyContent: 'center',
4240
+ display: 'flex',
4241
+ width: '100%',
4242
+ height: '100%'
4243
+ };
4244
+ });
4245
+ var StyledText$3 = index$2(Text$1)(function (_ref3) {
4246
+ var themeSize = _ref3.themeSize,
4247
+ themeIntent = _ref3.themeIntent,
4248
+ theme = _ref3.theme;
4249
+ return {
4250
+ fontSize: theme.__hd__.avatar.fontSizes[themeSize],
4251
+ color: theme.__hd__.avatar.colors[themeIntent],
4252
+ overflow: 'hidden'
4253
+ };
4254
+ });
4255
+ var StyledImage = index$2(Image)(function (_ref4) {
4256
+ var themeSize = _ref4.themeSize,
4257
+ theme = _ref4.theme;
4258
+ return {
4259
+ width: theme.__hd__.avatar.sizes[themeSize],
4260
+ height: theme.__hd__.avatar.sizes[themeSize]
4261
+ };
4262
+ });
4263
+
4264
+ var Avatar = function Avatar(_ref) {
4265
+ var onPress = _ref.onPress,
4266
+ source = _ref.source,
4267
+ testID = _ref.testID,
4268
+ style = _ref.style,
4269
+ title = _ref.title,
4270
+ _ref$size = _ref.size,
4271
+ size = _ref$size === void 0 ? 'small' : _ref$size,
4272
+ _ref$intent = _ref.intent,
4273
+ intent = _ref$intent === void 0 ? 'primary' : _ref$intent;
4274
+ var Wrapper = onPress ? StyledPressable : StyledView$2;
4275
+ return title !== undefined || source !== undefined ? /*#__PURE__*/React.createElement(Wrapper, {
4276
+ testID: testID,
4277
+ onPress: onPress,
4278
+ themeIntent: intent,
4279
+ themeSize: size,
4280
+ style: style
4281
+ }, title !== undefined && source === undefined && /*#__PURE__*/React.createElement(StyledTextWrapper, null, /*#__PURE__*/React.createElement(StyledText$3, {
4282
+ themeIntent: intent,
4283
+ themeSize: size
4284
+ }, title)), source !== undefined && /*#__PURE__*/React.createElement(StyledImage, {
4285
+ resizeMode: "cover",
4286
+ source: source,
4287
+ themeSize: size
4288
+ })) : null;
3891
4289
  };
3892
- var StyledView = index$1(View)(function (_ref) {
4290
+
4291
+ var StyledView$1 = index$2(Animated.View)(function (_ref) {
3893
4292
  var themeIntent = _ref.themeIntent,
4293
+ themePadding = _ref.themePadding,
3894
4294
  theme = _ref.theme;
3895
4295
  return {
3896
- borderWidth: theme.__hd__.badge.borderWidths["default"],
3897
- borderRadius: theme.__hd__.badge.radii["default"],
3898
- paddingVertical: theme.__hd__.badge.space.verticalPadding,
3899
- paddingHorizontal: theme.__hd__.badge.space.horizontalPadding,
3900
- borderColor: theme.__hd__.badge.colors[themeIntent],
3901
- backgroundColor: theme.__hd__.badge.colors[BACKGROUND_INTENTS[themeIntent]]
4296
+ height: theme.__hd__.badge.sizes.height,
4297
+ minWidth: theme.__hd__.badge.sizes.minWidth,
4298
+ alignItems: 'center',
4299
+ justifyContent: 'center',
4300
+ backgroundColor: theme.__hd__.badge.colors[themeIntent],
4301
+ borderRadius: theme.radii.rounded,
4302
+ paddingHorizontal: themePadding === 'wideContent' ? theme.__hd__.badge.space.horizontalPadding : undefined
3902
4303
  };
3903
4304
  });
3904
- var StyledText$1 = index$1(Text$1)(function (_ref2) {
3905
- var themeIntent = _ref2.themeIntent,
3906
- theme = _ref2.theme;
4305
+ var StyledText$2 = index$2(Text$1)(function (_ref2) {
4306
+ var theme = _ref2.theme;
4307
+ return {
4308
+ fontFamily: theme.__hd__.badge.fonts["default"],
4309
+ fontSize: theme.__hd__.badge.fontSizes["default"],
4310
+ color: theme.__hd__.badge.colors.text,
4311
+ includeFontPadding: false,
4312
+ textAlignVertical: 'center',
4313
+ textAlign: 'center'
4314
+ };
4315
+ });
4316
+ var StyledStatus = index$2(Animated.View)(function (_ref3) {
4317
+ var themeIntent = _ref3.themeIntent,
4318
+ theme = _ref3.theme;
3907
4319
  return {
3908
- fontFamily: theme.__hd__.badge.font["default"],
3909
- fontSize: theme.__hd__.badge.fontSize["default"],
3910
- color: theme.__hd__.badge.colors[themeIntent]
4320
+ position: 'absolute',
4321
+ top: theme.__hd__.badge.space.statusPositionTop,
4322
+ right: theme.__hd__.badge.space.statusPositionRight,
4323
+ height: theme.__hd__.badge.sizes.statusHeight,
4324
+ width: theme.__hd__.badge.sizes.statusWidth,
4325
+ backgroundColor: theme.__hd__.badge.colors[themeIntent],
4326
+ borderRadius: theme.radii.rounded
3911
4327
  };
3912
4328
  });
3913
4329
 
3914
- var _excluded$5 = ["content", "intent", "style", "testID"];
4330
+ var _excluded$a = ["children", "visible", "intent", "style", "testID"];
3915
4331
 
3916
- var Badge = function Badge(_ref) {
3917
- var content = _ref.content,
4332
+ var Status = function Status(_ref) {
4333
+ var children = _ref.children,
4334
+ _ref$visible = _ref.visible,
4335
+ visible = _ref$visible === void 0 ? true : _ref$visible,
3918
4336
  _ref$intent = _ref.intent,
3919
- intent = _ref$intent === void 0 ? 'info' : _ref$intent,
4337
+ intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
3920
4338
  style = _ref.style,
3921
4339
  testID = _ref.testID,
3922
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$5);
4340
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$a);
3923
4341
 
3924
- return /*#__PURE__*/React.createElement(StyledView, _extends$2({
3925
- themeIntent: intent,
4342
+ var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
4343
+ opacity = _React$useRef.current;
4344
+
4345
+ var isFirstRendering = React.useRef(true);
4346
+ React.useEffect(function () {
4347
+ // Do not run animation on very first rendering
4348
+ if (isFirstRendering.current) {
4349
+ isFirstRendering.current = false;
4350
+ return;
4351
+ }
4352
+
4353
+ Animated.timing(opacity, {
4354
+ toValue: visible ? 1 : 0,
4355
+ duration: 150,
4356
+ useNativeDriver: true
4357
+ }).start();
4358
+ }, [visible, opacity]);
4359
+ return /*#__PURE__*/React.createElement(View, _extends$3({}, nativeProps, {
3926
4360
  style: style,
3927
4361
  testID: testID
3928
- }, nativeProps), /*#__PURE__*/React.createElement(StyledText$1, {
4362
+ }), children, /*#__PURE__*/React.createElement(StyledStatus, {
4363
+ style: {
4364
+ opacity: opacity,
4365
+ transform: [{
4366
+ scale: opacity.interpolate({
4367
+ inputRange: [0, 1],
4368
+ outputRange: [0.5, 1]
4369
+ })
4370
+ }]
4371
+ },
3929
4372
  themeIntent: intent
3930
- }, content));
4373
+ }));
4374
+ };
4375
+
4376
+ var _excluded$9 = ["content", "visible", "max", "intent", "style", "testID"];
4377
+ var DEFAULT_MAX_NUMBER = 99;
4378
+
4379
+ var getPaddingState = function getPaddingState(content) {
4380
+ return content.length > 1 ? 'wideContent' : 'narrowContent';
4381
+ };
4382
+
4383
+ var Badge = function Badge(_ref) {
4384
+ var originalContent = _ref.content,
4385
+ _ref$visible = _ref.visible,
4386
+ visible = _ref$visible === void 0 ? true : _ref$visible,
4387
+ _ref$max = _ref.max,
4388
+ max = _ref$max === void 0 ? DEFAULT_MAX_NUMBER : _ref$max,
4389
+ _ref$intent = _ref.intent,
4390
+ intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
4391
+ style = _ref.style,
4392
+ testID = _ref.testID,
4393
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$9);
4394
+
4395
+ var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
4396
+ opacity = _React$useRef.current;
4397
+
4398
+ var isFirstRendering = React.useRef(true);
4399
+ React.useEffect(function () {
4400
+ // Do not run animation on very first rendering
4401
+ if (isFirstRendering.current) {
4402
+ isFirstRendering.current = false;
4403
+ return;
4404
+ }
4405
+
4406
+ Animated.timing(opacity, {
4407
+ toValue: visible ? 1 : 0,
4408
+ duration: 150,
4409
+ useNativeDriver: true
4410
+ }).start();
4411
+ }, [visible, opacity]);
4412
+ var content = typeof originalContent === 'number' && originalContent > max ? "".concat(max, "+") : String(originalContent);
4413
+ return /*#__PURE__*/React.createElement(StyledView$1, _extends$3({}, nativeProps, {
4414
+ themeIntent: intent,
4415
+ themePadding: getPaddingState(content),
4416
+ style: [{
4417
+ opacity: opacity,
4418
+ transform: [{
4419
+ scale: opacity.interpolate({
4420
+ inputRange: [0, 1],
4421
+ outputRange: [0.5, 1]
4422
+ })
4423
+ }]
4424
+ }, style],
4425
+ testID: testID
4426
+ }), /*#__PURE__*/React.createElement(StyledText$2, null, content));
3931
4427
  };
3932
4428
 
4429
+ var Badge$1 = Object.assign(Badge, {
4430
+ Status: Status
4431
+ });
4432
+
3933
4433
  var dist = {};
3934
4434
 
3935
4435
  function _interopRequireDefault$5(obj) {
@@ -4681,8 +5181,8 @@ var runtime = {exports: {}};
4681
5181
 
4682
5182
  var regenerator = runtime.exports;
4683
5183
 
4684
- function _extends() {
4685
- _extends_1 = _extends = Object.assign || function (target) {
5184
+ function _extends$1() {
5185
+ _extends_1 = _extends$1 = Object.assign || function (target) {
4686
5186
  for (var i = 1; i < arguments.length; i++) {
4687
5187
  var source = arguments[i];
4688
5188
 
@@ -4696,10 +5196,10 @@ function _extends() {
4696
5196
  return target;
4697
5197
  };
4698
5198
 
4699
- return _extends.apply(this, arguments);
5199
+ return _extends$1.apply(this, arguments);
4700
5200
  }
4701
5201
 
4702
- var _extends_1 = _extends;
5202
+ var _extends_1 = _extends$1;
4703
5203
 
4704
5204
  function _objectWithoutPropertiesLoose(source, excluded) {
4705
5205
  if (source == null) return {};
@@ -4951,7 +5451,7 @@ Object.defineProperty(ensureNativeModuleAvailable$1, "__esModule", {
4951
5451
 
4952
5452
  ensureNativeModuleAvailable$1["default"] = ensureNativeModuleAvailable;
4953
5453
 
4954
- var _reactNative$2 = reactNative__default;
5454
+ var _reactNative$2 = ReactNative__default;
4955
5455
  var NativeIconAPI$1 = _reactNative$2.NativeModules.RNVectorIconsManager || _reactNative$2.NativeModules.RNVectorIconsModule;
4956
5456
 
4957
5457
  function ensureNativeModuleAvailable() {
@@ -5079,7 +5579,7 @@ var _react$2 = _interopRequireWildcard$2(React);
5079
5579
 
5080
5580
  var _propTypes$2 = _interopRequireDefault$4(propTypes.exports);
5081
5581
 
5082
- var _reactNative$1 = reactNative__default;
5582
+ var _reactNative$1 = ReactNative__default;
5083
5583
  var _objectUtils = objectUtils;
5084
5584
  var _jsxFileName$2 = "/home/runner/work/react-native-vector-icons/react-native-vector-icons/lib/icon-button.js";
5085
5585
 
@@ -5261,7 +5761,7 @@ var _react$1 = _interopRequireWildcard$1(React);
5261
5761
 
5262
5762
  var _propTypes$1 = _interopRequireDefault$3(propTypes.exports);
5263
5763
 
5264
- var _reactNative = reactNative__default;
5764
+ var _reactNative = ReactNative__default;
5265
5765
 
5266
5766
  var _ensureNativeModuleAvailable = _interopRequireDefault$3(ensureNativeModuleAvailable$1);
5267
5767
 
@@ -5576,7 +6076,7 @@ function createIconSet(glyphMap, fontFamily, fontFile, fontStyle) {
5576
6076
 
5577
6077
  var createMultiStyleIconSet$1 = {};
5578
6078
 
5579
- function _defineProperty(obj, key, value) {
6079
+ function _defineProperty$1(obj, key, value) {
5580
6080
  if (key in obj) {
5581
6081
  Object.defineProperty(obj, key, {
5582
6082
  value: value,
@@ -5591,7 +6091,7 @@ function _defineProperty(obj, key, value) {
5591
6091
  return obj;
5592
6092
  }
5593
6093
 
5594
- var defineProperty = _defineProperty;
6094
+ var defineProperty = _defineProperty$1;
5595
6095
 
5596
6096
  var _interopRequireDefault$2 = interopRequireDefault;
5597
6097
  Object.defineProperty(createMultiStyleIconSet$1, "__esModule", {
@@ -13559,7 +14059,7 @@ var heroIconConfig = {
13559
14059
  };
13560
14060
 
13561
14061
  var HeroIcon = dist.createIconSetFromIcoMoon(heroIconConfig, 'hero-icons', 'hero-icons.ttf');
13562
- var StyledHeroIcon = index$1(HeroIcon)(function (_ref) {
14062
+ var StyledHeroIcon = index$2(HeroIcon)(function (_ref) {
13563
14063
  var themeIntent = _ref.themeIntent,
13564
14064
  themeSize = _ref.themeSize,
13565
14065
  theme = _ref.theme;
@@ -13597,7 +14097,7 @@ var FONTWEIGHT_MAP = {
13597
14097
  regular: 'regular',
13598
14098
  'semi-bold': 'semiBold'
13599
14099
  };
13600
- var StyledText = index$1(Text$1)(function (_ref) {
14100
+ var StyledText$1 = index$2(Text$1)(function (_ref) {
13601
14101
  var themeFontSize = _ref.themeFontSize,
13602
14102
  themeFontWeight = _ref.themeFontWeight,
13603
14103
  themeIntent = _ref.themeIntent,
@@ -13613,7 +14113,7 @@ var StyledText = index$1(Text$1)(function (_ref) {
13613
14113
  });
13614
14114
  });
13615
14115
 
13616
- var _excluded$4 = ["children", "fontSize", "fontWeight", "intent"];
14116
+ var _excluded$8 = ["children", "fontSize", "fontWeight", "intent"];
13617
14117
 
13618
14118
  var Text = function Text(_ref) {
13619
14119
  var children = _ref.children,
@@ -13623,34 +14123,34 @@ var Text = function Text(_ref) {
13623
14123
  fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
13624
14124
  _ref$intent = _ref.intent,
13625
14125
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
13626
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$4);
14126
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$8);
13627
14127
 
13628
- return /*#__PURE__*/React.createElement(StyledText, _extends$2({
14128
+ return /*#__PURE__*/React.createElement(StyledText$1, _extends$3({}, nativeProps, {
13629
14129
  themeFontSize: fontSize,
13630
14130
  themeFontWeight: fontWeight,
13631
14131
  themeIntent: intent
13632
- }, nativeProps), children);
14132
+ }), children);
13633
14133
  };
13634
14134
 
13635
14135
  var Typography = {
13636
14136
  Text: Text
13637
14137
  };
13638
14138
 
13639
- var BottomNavigationTab = index$1(View)(function (_ref) {
14139
+ var BottomNavigationTab = index$2(View)(function (_ref) {
13640
14140
  var themeVisibility = _ref.themeVisibility;
13641
14141
  return {
13642
14142
  flex: 1,
13643
14143
  display: themeVisibility === false ? 'none' : 'flex'
13644
14144
  };
13645
14145
  });
13646
- var BottomNavigationContainer = index$1(View)({
14146
+ var BottomNavigationContainer = index$2(View)({
13647
14147
  flex: 1,
13648
14148
  overflow: 'hidden'
13649
14149
  });
13650
- var ContentWrapper$1 = index$1(View)({
14150
+ var ContentWrapper$2 = index$2(View)({
13651
14151
  flex: 1
13652
14152
  });
13653
- var BottomBarWrapper = index$1(View)(function (_ref2) {
14153
+ var BottomBarWrapper = index$2(View)(function (_ref2) {
13654
14154
  var themeInsets = _ref2.themeInsets,
13655
14155
  theme = _ref2.theme;
13656
14156
  return {
@@ -13666,17 +14166,17 @@ var BottomBarWrapper = index$1(View)(function (_ref2) {
13666
14166
  elevation: theme.__hd__.bottomNavigation.shadows.elevation
13667
14167
  };
13668
14168
  });
13669
- var BottomBar = index$1(View)({
14169
+ var BottomBar = index$2(View)({
13670
14170
  flex: 1,
13671
14171
  flexDirection: 'row',
13672
14172
  overflow: 'hidden',
13673
14173
  alignItems: 'center'
13674
14174
  });
13675
- var BottomBarItem = index$1(View)({
14175
+ var BottomBarItem = index$2(View)({
13676
14176
  flex: 1,
13677
14177
  alignItems: 'center'
13678
14178
  });
13679
- var StyledBottomBarText = index$1(Typography.Text)(function (_ref3) {
14179
+ var StyledBottomBarText = index$2(Typography.Text)(function (_ref3) {
13680
14180
  var theme = _ref3.theme;
13681
14181
  return {
13682
14182
  marginTop: theme.__hd__.bottomNavigation.space.titleMarginTop
@@ -13686,7 +14186,7 @@ var StyledBottomBarText = index$1(Typography.Text)(function (_ref3) {
13686
14186
  var isIOS = Platform.OS === 'ios';
13687
14187
  Platform.OS === 'android';
13688
14188
 
13689
- var _excluded$3 = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
14189
+ var _excluded$7 = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
13690
14190
 
13691
14191
  var getInactiveIcon = function getInactiveIcon(icon) {
13692
14192
  var inactiveIcon = "".concat(icon, "-outlined");
@@ -13699,7 +14199,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
13699
14199
  renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
13700
14200
  selectedTabKey = _ref.selectedTabKey,
13701
14201
  tabs = _ref.tabs,
13702
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$3);
14202
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$7);
13703
14203
 
13704
14204
  var insets = useSafeAreaInsets();
13705
14205
  /**
@@ -13718,7 +14218,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
13718
14218
  });
13719
14219
  }
13720
14220
 
13721
- return /*#__PURE__*/React.createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React.createElement(ContentWrapper$1, null, tabs.map(function (tab) {
14221
+ return /*#__PURE__*/React.createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React.createElement(ContentWrapper$2, null, tabs.map(function (tab) {
13722
14222
  var key = tab.key,
13723
14223
  component = tab.component,
13724
14224
  testID = tab.testID;
@@ -13773,389 +14273,1621 @@ var BottomNavigation = function BottomNavigation(_ref) {
13773
14273
  }))));
13774
14274
  };
13775
14275
 
13776
- var IconButton = function IconButton(_ref) {
13777
- var hitSlop = _ref.hitSlop,
13778
- onPress = _ref.onPress,
13779
- icon = _ref.icon,
13780
- testID = _ref.testID,
13781
- style = _ref.style,
13782
- size = _ref.size,
13783
- intent = _ref.intent;
13784
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
13785
- style: style,
13786
- onPress: onPress,
13787
- testID: testID,
13788
- hitSlop: hitSlop
13789
- }, /*#__PURE__*/React.createElement(Icon, {
13790
- icon: icon,
13791
- size: size,
13792
- intent: intent
13793
- }));
13794
- };
13795
-
13796
- var Button = {
13797
- Icon: IconButton
13798
- };
13799
-
13800
- var StyledCard = index$1(View)(function (_ref) {
13801
- var theme = _ref.theme;
14276
+ var genLoadingIndicatorStyles = function genLoadingIndicatorStyles(theme, intent) {
13802
14277
  return {
13803
- borderRadius: theme.__hd__.card.radii["default"],
13804
- padding: theme.__hd__.card.padding["default"],
13805
- overflow: 'hidden'
14278
+ backgroundColor: theme.__hd__.button.colors[intent]
13806
14279
  };
13807
- });
13808
-
13809
- var Card = function Card(props) {
13810
- return /*#__PURE__*/React.createElement(StyledCard, props);
13811
- };
13812
-
13813
- var StyledDivider = index$1(View)(function (_ref) {
13814
- var themeMarginHorizontal = _ref.themeMarginHorizontal,
13815
- themeMarginVertical = _ref.themeMarginVertical,
13816
- theme = _ref.theme;
13817
- var horizontalMargin = themeMarginHorizontal !== undefined ? {
13818
- marginHorizontal: theme.__hd__.divider.space[themeMarginHorizontal]
13819
- } : {};
13820
- var verticalMargin = themeMarginVertical !== undefined ? {
13821
- marginVertical: theme.__hd__.divider.space[themeMarginVertical]
13822
- } : {};
13823
- return _objectSpread2(_objectSpread2({
13824
- maxWidth: '100%',
13825
- borderBottomColor: theme.__hd__.divider.colors["default"],
13826
- borderBottomWidth: theme.__hd__.divider.borderWidths["default"]
13827
- }, horizontalMargin), verticalMargin);
13828
- });
13829
-
13830
- var _excluded$2 = ["marginHorizontal", "marginVertical", "style", "testID"];
13831
-
13832
- var Divider = function Divider(_ref) {
13833
- var marginHorizontal = _ref.marginHorizontal,
13834
- marginVertical = _ref.marginVertical,
13835
- style = _ref.style,
13836
- testID = _ref.testID,
13837
- nativeProps = _objectWithoutProperties$1(_ref, _excluded$2);
13838
-
13839
- return /*#__PURE__*/React.createElement(StyledDivider, _extends$2({
13840
- themeMarginHorizontal: marginHorizontal,
13841
- themeMarginVertical: marginVertical,
13842
- style: style,
13843
- testID: testID
13844
- }, nativeProps));
13845
14280
  };
13846
14281
 
13847
- var StyledFABContainer = index$1(TouchableHighlight)(function (_ref) {
14282
+ var StyledLoadingIndicatorWrapper = index$2(View)(function (_ref) {
13848
14283
  var theme = _ref.theme;
13849
14284
  return {
13850
- height: theme.__hd__.fab.sizes.height,
13851
- width: theme.__hd__.fab.sizes.width,
13852
- backgroundColor: theme.__hd__.fab.colors.buttonBackground,
13853
- borderRadius: 999,
13854
- alignItems: 'center',
14285
+ flexDirection: 'row',
13855
14286
  justifyContent: 'center',
13856
- overflow: 'hidden'
14287
+ alignItems: 'center',
14288
+ paddingVertical: theme.space.xxsmall
13857
14289
  };
13858
14290
  });
13859
- var StyledFABIcon = index$1(Icon)(function (_ref2) {
13860
- var theme = _ref2.theme;
13861
- return {
13862
- color: theme.__hd__.fab.colors.icon,
13863
- fontSize: theme.__hd__.fab.fontSizes.buttonIcon
14291
+ var StyledLoadingDot = index$2(View)(function (_ref2) {
14292
+ var _ref2$size = _ref2.size,
14293
+ size = _ref2$size === void 0 ? 12 : _ref2$size,
14294
+ themeVariant = _ref2.themeVariant,
14295
+ theme = _ref2.theme;
14296
+
14297
+ var themeStyling = function themeStyling() {
14298
+ switch (themeVariant) {
14299
+ case 'basic-transparent':
14300
+ case 'filled-primary':
14301
+ case 'filled-secondary':
14302
+ return {
14303
+ backgroundColor: theme.__hd__.button.colors.invertedText
14304
+ };
14305
+
14306
+ case 'outlined-primary':
14307
+ return genLoadingIndicatorStyles(theme, 'primary');
14308
+
14309
+ case 'outlined-secondary':
14310
+ return genLoadingIndicatorStyles(theme, 'secondary');
14311
+ }
13864
14312
  };
14313
+
14314
+ return _objectSpread2({
14315
+ width: size,
14316
+ height: size,
14317
+ marginTop: theme.space.xsmall,
14318
+ marginBottom: theme.space.xsmall,
14319
+ marginHorizontal: theme.space.small,
14320
+ borderRadius: theme.space.small
14321
+ }, themeStyling());
13865
14322
  });
13866
14323
 
13867
- var _excluded$1 = ["active"];
13868
- var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
14324
+ var _excluded$6 = ["count", "size", "testID", "themeVariant"];
14325
+ var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
14326
+ var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
13869
14327
 
13870
- var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
13871
- var active = _ref.active,
13872
- iconProps = _objectWithoutProperties$1(_ref, _excluded$1);
14328
+ var renderDotComponent = function renderDotComponent(_ref) {
14329
+ var index = _ref.index,
14330
+ size = _ref.size,
14331
+ count = _ref.count,
14332
+ animation = _ref.animation,
14333
+ themeVariant = _ref.themeVariant;
14334
+ var interpolatedProgressAnimation = animation.current.interpolate({
14335
+ inputRange: [0.0, (index + 0.5) / (count + 1), (index + 1.0) / (count + 1), (index + 1.5) / (count + 1), 1.0],
14336
+ outputRange: [1.0, 1.36, 1.56, 1.06, 1.0]
14337
+ });
14338
+ return /*#__PURE__*/React.createElement(Animated.View, {
14339
+ style: StyleSheet$1.flatten([{
14340
+ transform: [{
14341
+ scale: interpolatedProgressAnimation
14342
+ }]
14343
+ }]),
14344
+ key: index
14345
+ }, /*#__PURE__*/React.createElement(AnimatedLoadingDot, {
14346
+ size: size,
14347
+ themeVariant: themeVariant
14348
+ }));
14349
+ };
13873
14350
 
13874
- var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
14351
+ var LoadingIndicator = function LoadingIndicator(_ref2) {
14352
+ var _ref2$count = _ref2.count,
14353
+ count = _ref2$count === void 0 ? 3 : _ref2$count,
14354
+ _ref2$size = _ref2.size,
14355
+ size = _ref2$size === void 0 ? 12 : _ref2$size,
14356
+ testID = _ref2.testID,
14357
+ themeVariant = _ref2.themeVariant,
14358
+ nativeProps = _objectWithoutProperties$1(_ref2, _excluded$6);
14359
+
14360
+ var progressAnimation = useRef(new Animated.Value(0));
13875
14361
  useEffect(function () {
13876
- var animation = Animated.timing(rotateAnimation.current, {
13877
- toValue: active ? 1 : 0,
14362
+ var animation = Animated.loop(Animated.timing(progressAnimation.current, {
14363
+ toValue: 1,
14364
+ duration: 1200,
14365
+ easing: Easing.linear,
13878
14366
  useNativeDriver: true
13879
- });
14367
+ }));
13880
14368
  animation.start();
13881
14369
  return function () {
13882
14370
  animation.stop();
13883
14371
  };
13884
- }, [active]);
13885
- var interpolatedRotateAnimation = rotateAnimation.current.interpolate({
13886
- inputRange: [0, 1],
13887
- outputRange: ['0deg', '-45deg']
13888
- });
13889
- return /*#__PURE__*/React.createElement(Animated.View, {
13890
- style: StyleSheet$1.flatten([{
13891
- transform: [{
13892
- rotate: interpolatedRotateAnimation
13893
- }]
13894
- }])
13895
- }, /*#__PURE__*/React.createElement(AnimatedIcons, iconProps));
14372
+ }, []);
14373
+
14374
+ var renderLoadingDot = function renderLoadingDot(item, index) {
14375
+ if (typeof renderDotComponent === 'function') {
14376
+ return renderDotComponent({
14377
+ index: index,
14378
+ count: count,
14379
+ size: size,
14380
+ animation: progressAnimation,
14381
+ themeVariant: themeVariant
14382
+ });
14383
+ }
14384
+
14385
+ return null;
14386
+ };
14387
+
14388
+ return /*#__PURE__*/React.createElement(AnimatedLoadingIndicatorWrapper, _extends$3({
14389
+ testID: testID
14390
+ }, nativeProps), Array.from(new Array(count), renderLoadingDot, themeVariant));
13896
14391
  };
13897
14392
 
13898
- var FAB = function FAB(_ref) {
13899
- var onPress = _ref.onPress,
13900
- icon = _ref.icon,
13901
- animated = _ref.animated,
13902
- testID = _ref.testID,
13903
- active = _ref.active,
13904
- style = _ref.style;
13905
- return /*#__PURE__*/React.createElement(StyledFABContainer, {
13906
- testID: testID,
13907
- onPress: onPress,
13908
- activeOpacity: 0.6,
13909
- style: style
13910
- }, animated ? /*#__PURE__*/React.createElement(AnimatedFABIcon, {
13911
- active: active,
13912
- icon: icon,
13913
- testID: "animated-fab-icon"
13914
- }) : /*#__PURE__*/React.createElement(StyledFABIcon, {
13915
- icon: icon,
13916
- testID: "styled-fab-icon"
13917
- }));
14393
+ var PRESSED_COLORS = {
14394
+ primary: 'pressedPrimary',
14395
+ secondary: 'pressedSecondary'
13918
14396
  };
13919
14397
 
13920
- var StyledActionItem = index$1(TouchableOpacity)(function (_ref) {
13921
- var theme = _ref.theme;
13922
- return {
13923
- paddingLeft: theme.__hd__.fab.space.actionItemPaddingLeft,
13924
- paddingRight: theme.__hd__.fab.space.actionItemPaddingRight,
13925
- paddingTop: theme.__hd__.fab.space.actionItemPaddingTop,
13926
- paddingBottom: theme.__hd__.fab.space.actionItemPaddingBottom,
13927
- margin: theme.__hd__.fab.space.actionItemMargin,
13928
- marginRight: theme.__hd__.fab.space.actionItemMarginRight,
13929
- backgroundColor: theme.__hd__.fab.colors.actionItemBackground,
13930
- borderRadius: theme.__hd__.fab.radii.actionItem,
14398
+ var genBasicTransparentContainerStyles = function genBasicTransparentContainerStyles(theme, pressed, disabled) {
14399
+ var borderColorStyling = function borderColorStyling() {
14400
+ if (disabled) {
14401
+ return {
14402
+ borderColor: theme.__hd__.button.colors.disabledBorder
14403
+ };
14404
+ }
14405
+
14406
+ return {
14407
+ borderColor: theme.__hd__.button.colors.invertedText
14408
+ };
14409
+ };
14410
+
14411
+ return _objectSpread2({
14412
+ width: '100%',
13931
14413
  flexDirection: 'row',
14414
+ justifyContent: 'center',
13932
14415
  alignItems: 'center',
13933
- alignSelf: 'flex-end',
14416
+ padding: theme.__hd__.button.space.buttonPadding - theme.__hd__.button.borderWidth["default"],
14417
+ borderWidth: theme.__hd__.button.borderWidth["default"],
14418
+ borderRadius: theme.__hd__.button.radii["default"],
14419
+ backgroundColor: 'transparent',
14420
+ opacity: pressed ? 0.6 : 1
14421
+ }, borderColorStyling());
14422
+ };
14423
+
14424
+ var genFilledContainerStyles = function genFilledContainerStyles(theme, intent, pressed, disabled) {
14425
+ var backgroundColorStyling = function backgroundColorStyling() {
14426
+ if (disabled) {
14427
+ return {
14428
+ backgroundColor: theme.__hd__.button.colors.disabledBorder
14429
+ };
14430
+ }
14431
+
14432
+ if (pressed) {
14433
+ return {
14434
+ backgroundColor: theme.__hd__.button.colors[PRESSED_COLORS[intent]]
14435
+ };
14436
+ }
14437
+
14438
+ return {
14439
+ backgroundColor: theme.__hd__.button.colors[intent]
14440
+ };
14441
+ };
14442
+
14443
+ return _objectSpread2({
14444
+ width: '100%',
14445
+ flexDirection: 'row',
14446
+ justifyContent: 'center',
14447
+ alignItems: 'center',
14448
+ padding: theme.__hd__.button.space.buttonPadding,
14449
+ borderRadius: theme.__hd__.button.radii["default"]
14450
+ }, backgroundColorStyling());
14451
+ };
14452
+
14453
+ var genOutlineContainerStyles = function genOutlineContainerStyles(theme, intent, pressed, disabled) {
14454
+ var borderColorStyling = function borderColorStyling() {
14455
+ if (disabled) {
14456
+ return {
14457
+ borderColor: theme.__hd__.button.colors.disabledBorder
14458
+ };
14459
+ }
14460
+
14461
+ if (pressed) {
14462
+ return {
14463
+ borderColor: theme.__hd__.button.colors[PRESSED_COLORS[intent]]
14464
+ };
14465
+ }
14466
+
14467
+ return {
14468
+ borderColor: theme.__hd__.button.colors[intent]
14469
+ };
14470
+ };
14471
+
14472
+ return _objectSpread2({
14473
+ width: '100%',
14474
+ flexDirection: 'row',
14475
+ justifyContent: 'center',
14476
+ alignItems: 'center',
14477
+ padding: theme.__hd__.button.space.buttonPadding - theme.__hd__.button.borderWidth["default"],
14478
+ borderWidth: theme.__hd__.button.borderWidth["default"],
14479
+ borderRadius: theme.__hd__.button.radii["default"],
14480
+ backgroundColor: 'transparent'
14481
+ }, borderColorStyling());
14482
+ };
14483
+
14484
+ var genOutlineTextStyles = function genOutlineTextStyles(theme, intent, pressed, disabled) {
14485
+ var textColorStyling = function textColorStyling() {
14486
+ if (disabled) {
14487
+ return {
14488
+ color: theme.__hd__.button.colors.disabledText
14489
+ };
14490
+ }
14491
+
14492
+ if (pressed) {
14493
+ return {
14494
+ color: theme.__hd__.button.colors[PRESSED_COLORS[intent]]
14495
+ };
14496
+ }
14497
+
14498
+ return {
14499
+ color: theme.__hd__.button.colors[intent]
14500
+ };
14501
+ };
14502
+
14503
+ return _objectSpread2({
14504
+ fontSize: theme.__hd__.button.fontSize["default"],
14505
+ lineHeight: theme.__hd__.button.lineHeight["default"]
14506
+ }, textColorStyling());
14507
+ };
14508
+
14509
+ var StyledButtonContainer = index$2(View)(function (_ref) {
14510
+ var _ref$disabled = _ref.disabled,
14511
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
14512
+ _ref$pressed = _ref.pressed,
14513
+ pressed = _ref$pressed === void 0 ? false : _ref$pressed,
14514
+ themeVariant = _ref.themeVariant,
14515
+ theme = _ref.theme;
14516
+
14517
+ switch (themeVariant) {
14518
+ case 'basic-transparent':
14519
+ return genBasicTransparentContainerStyles(theme, pressed, disabled);
14520
+
14521
+ case 'filled-primary':
14522
+ return genFilledContainerStyles(theme, 'primary', pressed, disabled);
14523
+
14524
+ case 'filled-secondary':
14525
+ return genFilledContainerStyles(theme, 'secondary', pressed, disabled);
14526
+
14527
+ case 'outlined-primary':
14528
+ return genOutlineContainerStyles(theme, 'primary', pressed, disabled);
14529
+
14530
+ case 'outlined-secondary':
14531
+ return genOutlineContainerStyles(theme, 'secondary', pressed, disabled);
14532
+ }
14533
+ });
14534
+ var StyledButtonText = index$2(Typography.Text)(function (_ref2) {
14535
+ var disabled = _ref2.disabled,
14536
+ pressed = _ref2.pressed,
14537
+ themeVariant = _ref2.themeVariant,
14538
+ theme = _ref2.theme;
14539
+
14540
+ var themeStyling = function themeStyling() {
14541
+ switch (themeVariant) {
14542
+ case 'basic-transparent':
14543
+ return {
14544
+ fontSize: theme.__hd__.button.fontSize["default"],
14545
+ lineHeight: theme.__hd__.button.lineHeight["default"],
14546
+ color: disabled ? theme.__hd__.button.colors.disabledText : theme.__hd__.button.colors.invertedText
14547
+ };
14548
+
14549
+ case 'filled-primary':
14550
+ case 'filled-secondary':
14551
+ return {
14552
+ fontSize: theme.__hd__.button.fontSize["default"],
14553
+ lineHeight: theme.__hd__.button.lineHeight["default"],
14554
+ color: theme.__hd__.button.colors.invertedText
14555
+ };
14556
+
14557
+ case 'outlined-primary':
14558
+ return genOutlineTextStyles(theme, 'primary', pressed, disabled);
14559
+
14560
+ case 'outlined-secondary':
14561
+ return genOutlineTextStyles(theme, 'secondary', pressed, disabled);
14562
+ }
14563
+ };
14564
+
14565
+ return _objectSpread2({
14566
+ flexShrink: 1,
14567
+ textAlign: 'center',
14568
+ fontFamily: theme.__hd__.button.fonts["default"]
14569
+ }, themeStyling());
14570
+ });
14571
+ var StyledButtonIconWrapper = index$2(View)(function (_ref3) {
14572
+ var themePosition = _ref3.themePosition,
14573
+ theme = _ref3.theme;
14574
+
14575
+ switch (themePosition) {
14576
+ case 'left':
14577
+ return {
14578
+ paddingRight: theme.__hd__.button.space.iconPadding
14579
+ };
14580
+
14581
+ case 'right':
14582
+ return {
14583
+ paddingLeft: theme.__hd__.button.space.iconPadding
14584
+ };
14585
+ }
14586
+ });
14587
+ var StyledButtonIcon = index$2(Icon)(function (_ref4) {
14588
+ var disabled = _ref4.disabled,
14589
+ pressed = _ref4.pressed,
14590
+ themeVariant = _ref4.themeVariant,
14591
+ theme = _ref4.theme;
14592
+
14593
+ var themeStyling = function themeStyling() {
14594
+ switch (themeVariant) {
14595
+ case 'basic-transparent':
14596
+ return {
14597
+ color: disabled ? theme.__hd__.button.colors.disabledText : theme.__hd__.button.colors.invertedText
14598
+ };
14599
+
14600
+ case 'filled-primary':
14601
+ case 'filled-secondary':
14602
+ return {
14603
+ color: theme.__hd__.button.colors.invertedText
14604
+ };
14605
+
14606
+ case 'outlined-primary':
14607
+ return genOutlineTextStyles(theme, 'primary', pressed, disabled);
14608
+
14609
+ case 'outlined-secondary':
14610
+ return genOutlineTextStyles(theme, 'secondary', pressed, disabled);
14611
+ }
14612
+ };
14613
+
14614
+ return _objectSpread2({
14615
+ fontSize: theme.__hd__.button.sizes.iconSize
14616
+ }, themeStyling());
14617
+ });
14618
+
14619
+ var FILLED_VARIANTS = {
14620
+ primary: 'filled-primary',
14621
+ secondary: 'filled-secondary'
14622
+ };
14623
+ var OUTLINED_VARIANTS = {
14624
+ primary: 'outlined-primary',
14625
+ secondary: 'outlined-secondary'
14626
+ };
14627
+ var getThemeVariant = function getThemeVariant(variant, intent) {
14628
+ switch (variant) {
14629
+ case 'basic-transparent':
14630
+ return variant;
14631
+
14632
+ case 'filled':
14633
+ return FILLED_VARIANTS[intent];
14634
+
14635
+ case 'outlined':
14636
+ return OUTLINED_VARIANTS[intent];
14637
+ }
14638
+ };
14639
+
14640
+ var Button = function Button(_ref) {
14641
+ var accessibilityHint = _ref.accessibilityHint,
14642
+ accessibilityLabel = _ref.accessibilityLabel,
14643
+ _ref$disabled = _ref.disabled,
14644
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
14645
+ icon = _ref.icon,
14646
+ _ref$intent = _ref.intent,
14647
+ intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
14648
+ _ref$loading = _ref.loading,
14649
+ loading = _ref$loading === void 0 ? false : _ref$loading,
14650
+ onPress = _ref.onPress,
14651
+ rightIcon = _ref.rightIcon,
14652
+ style = _ref.style,
14653
+ testID = _ref.testID,
14654
+ text = _ref.text,
14655
+ _ref$variant = _ref.variant,
14656
+ variant = _ref$variant === void 0 ? 'filled' : _ref$variant;
14657
+ return /*#__PURE__*/React.createElement(Pressable, {
14658
+ accessibilityHint: accessibilityHint,
14659
+ accessibilityLabel: accessibilityLabel,
14660
+ disabled: disabled || loading,
14661
+ onPress: onPress,
14662
+ testID: testID
14663
+ }, function (_ref2) {
14664
+ var pressed = _ref2.pressed;
14665
+ return /*#__PURE__*/React.createElement(StyledButtonContainer, {
14666
+ disabled: disabled,
14667
+ pressed: pressed,
14668
+ style: style,
14669
+ themeVariant: getThemeVariant(variant, intent)
14670
+ }, loading === true ? /*#__PURE__*/React.createElement(LoadingIndicator, {
14671
+ testID: "".concat(testID, "-loading-indicator"),
14672
+ themeVariant: getThemeVariant(variant, intent)
14673
+ }) : /*#__PURE__*/React.createElement(React.Fragment, null, icon !== undefined && /*#__PURE__*/React.createElement(StyledButtonIconWrapper, {
14674
+ themePosition: "left"
14675
+ }, /*#__PURE__*/React.createElement(StyledButtonIcon, {
14676
+ disabled: disabled,
14677
+ icon: icon,
14678
+ pressed: pressed,
14679
+ testID: "".concat(testID, "-left-icon"),
14680
+ themeVariant: getThemeVariant(variant, intent)
14681
+ })), /*#__PURE__*/React.createElement(StyledButtonText, {
14682
+ disabled: disabled,
14683
+ ellipsizeMode: "tail",
14684
+ numberOfLines: 1,
14685
+ pressed: pressed,
14686
+ themeVariant: getThemeVariant(variant, intent)
14687
+ }, text), rightIcon !== undefined && /*#__PURE__*/React.createElement(StyledButtonIconWrapper, {
14688
+ themePosition: "right"
14689
+ }, /*#__PURE__*/React.createElement(StyledButtonIcon, {
14690
+ disabled: disabled,
14691
+ icon: rightIcon,
14692
+ pressed: pressed,
14693
+ testID: "".concat(testID, "-right-icon"),
14694
+ themeVariant: getThemeVariant(variant, intent)
14695
+ }))));
14696
+ });
14697
+ };
14698
+
14699
+ var IconButton = function IconButton(_ref) {
14700
+ var hitSlop = _ref.hitSlop,
14701
+ onPress = _ref.onPress,
14702
+ icon = _ref.icon,
14703
+ testID = _ref.testID,
14704
+ style = _ref.style,
14705
+ size = _ref.size,
14706
+ intent = _ref.intent;
14707
+ return /*#__PURE__*/React.createElement(TouchableOpacity, {
14708
+ style: style,
14709
+ onPress: onPress,
14710
+ testID: testID,
14711
+ hitSlop: hitSlop
14712
+ }, /*#__PURE__*/React.createElement(Icon, {
14713
+ icon: icon,
14714
+ size: size,
14715
+ intent: intent
14716
+ }));
14717
+ };
14718
+
14719
+ var CompoundButton = Button;
14720
+ CompoundButton.Icon = IconButton;
14721
+
14722
+ var StyledCard = index$2(View)(function (_ref) {
14723
+ var themeVariant = _ref.themeVariant,
14724
+ theme = _ref.theme;
14725
+ var sharedStyles = {
14726
+ borderRadius: theme.__hd__.card.radii["default"],
13934
14727
  overflow: 'hidden'
13935
14728
  };
14729
+ var dataStyles = {
14730
+ flex: 1,
14731
+ flexDirection: 'row'
14732
+ };
14733
+
14734
+ switch (themeVariant) {
14735
+ case 'basic':
14736
+ return sharedStyles;
14737
+
14738
+ case 'data':
14739
+ return _objectSpread2(_objectSpread2({}, sharedStyles), dataStyles);
14740
+ }
13936
14741
  });
13937
- var StyledActionItemText = index$1(Typography.Text)(function (_ref2) {
14742
+ var LeftDataCard = index$2(View)(function (_ref2) {
13938
14743
  var theme = _ref2.theme;
13939
14744
  return {
13940
- paddingLeft: theme.__hd__.fab.space.actionItemTextPaddingLeft,
13941
- fontSize: theme.__hd__.fab.fontSizes.actionItemText,
13942
- lineHeight: theme.__hd__.fab.lineHeights.actionItemText,
13943
- fontFamily: theme.__hd__.fab.fonts.actionItemText
14745
+ backgroundColor: theme.__hd__.card.colors.dataCardIndicator,
14746
+ width: scale(16),
14747
+ height: '100%'
13944
14748
  };
13945
14749
  });
13946
14750
 
13947
- var ActionItem = function ActionItem(_ref) {
13948
- var icon = _ref.icon,
13949
- title = _ref.title,
13950
- onPress = _ref.onPress,
14751
+ var _excluded$5 = ["variant", "children"];
14752
+
14753
+ var Card = function Card(_ref) {
14754
+ var _ref$variant = _ref.variant,
14755
+ variant = _ref$variant === void 0 ? 'basic' : _ref$variant,
14756
+ children = _ref.children,
14757
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$5);
14758
+
14759
+ return /*#__PURE__*/React.createElement(StyledCard, _extends$3({}, nativeProps, {
14760
+ testID: "card",
14761
+ themeVariant: variant
14762
+ }), variant === 'data' && /*#__PURE__*/React.createElement(LeftDataCard, {
14763
+ testID: "data-card-indicator"
14764
+ }), children);
14765
+ };
14766
+
14767
+ var StyledWrapper$1 = index$2(Animated.View)(function () {
14768
+ return {
14769
+ margin: 0,
14770
+ padding: 0,
14771
+ overflow: 'hidden'
14772
+ };
14773
+ });
14774
+ var StyledChildWrapper = index$2(View)(function () {
14775
+ return {
14776
+ margin: 0,
14777
+ padding: 0
14778
+ };
14779
+ });
14780
+
14781
+ var usePrevious = function usePrevious(value) {
14782
+ var ref = React.useRef();
14783
+ React.useEffect(function () {
14784
+ ref.current = value;
14785
+ }, [value]);
14786
+ return ref.current;
14787
+ };
14788
+
14789
+ var Collapse = function Collapse(_ref) {
14790
+ var _ref$open = _ref.open,
14791
+ open = _ref$open === void 0 ? false : _ref$open,
14792
+ _ref$keepChildrenMoun = _ref.keepChildrenMounted,
14793
+ keepChildrenMounted = _ref$keepChildrenMoun === void 0 ? false : _ref$keepChildrenMoun,
14794
+ children = _ref.children,
14795
+ testID = _ref.testID,
14796
+ style = _ref.style;
14797
+ var collapseAnim = React.useRef(new Animated.Value(0)).current;
14798
+ var innerRef = React.useRef(null);
14799
+
14800
+ var _React$useState = React.useState(0),
14801
+ _React$useState2 = _slicedToArray(_React$useState, 2),
14802
+ contentHeight = _React$useState2[0],
14803
+ setContentHeight = _React$useState2[1];
14804
+
14805
+ var _React$useState3 = React.useState(0),
14806
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
14807
+ maxHeight = _React$useState4[0],
14808
+ setMaxHeight = _React$useState4[1];
14809
+
14810
+ var _useState = useState(false),
14811
+ _useState2 = _slicedToArray(_useState, 2),
14812
+ isWaitingToClose = _useState2[0],
14813
+ setIsWaitingToClose = _useState2[1];
14814
+
14815
+ var _useState3 = useState('percent'),
14816
+ _useState4 = _slicedToArray(_useState3, 2),
14817
+ heightSource = _useState4[0],
14818
+ setHeightSource = _useState4[1];
14819
+
14820
+ var previousOpenState = usePrevious(open);
14821
+ var animatedCallback = useCallback(function () {
14822
+ if (open === true) {
14823
+ setIsWaitingToClose(true);
14824
+ setMaxHeight(contentHeight);
14825
+ } else {
14826
+ setIsWaitingToClose(false);
14827
+ }
14828
+ }, [open, contentHeight]);
14829
+ useEffect(function () {
14830
+ if (open !== previousOpenState && previousOpenState !== undefined) {
14831
+ var useHeightValue = maxHeight || 100;
14832
+ setHeightSource(useHeightValue > 100 ? 'container' : 'percent');
14833
+ Animated.timing(collapseAnim, {
14834
+ toValue: open ? useHeightValue : 0,
14835
+ easing: Easing.inOut(Easing.ease),
14836
+ useNativeDriver: false
14837
+ }).start(animatedCallback);
14838
+ }
14839
+ }, [open, previousOpenState, maxHeight]);
14840
+ var checkMaxHeight = useCallback(function (_ref2) {
14841
+ var height = _ref2.height;
14842
+
14843
+ if (height > contentHeight) {
14844
+ setContentHeight(height);
14845
+ }
14846
+ }, [contentHeight]);
14847
+ return /*#__PURE__*/React.createElement(StyledWrapper$1, {
14848
+ onLayout: function onLayout(event) {
14849
+ return checkMaxHeight(event.nativeEvent.layout);
14850
+ },
14851
+ style: [style, {
14852
+ maxHeight: heightSource === 'container' ? collapseAnim : collapseAnim.interpolate({
14853
+ inputRange: [0, 100],
14854
+ outputRange: ['0%', '100%']
14855
+ })
14856
+ }],
14857
+ testID: testID
14858
+ }, (keepChildrenMounted === true || open === true || open === false && isWaitingToClose === true) && /*#__PURE__*/React.createElement(StyledChildWrapper, {
14859
+ ref: innerRef
14860
+ }, children));
14861
+ };
14862
+
14863
+ var StyledDivider = index$2(View)(function (_ref) {
14864
+ var themeMarginHorizontal = _ref.themeMarginHorizontal,
14865
+ themeMarginVertical = _ref.themeMarginVertical,
14866
+ theme = _ref.theme;
14867
+ var horizontalMargin = themeMarginHorizontal !== undefined ? {
14868
+ marginHorizontal: theme.__hd__.divider.space[themeMarginHorizontal]
14869
+ } : {};
14870
+ var verticalMargin = themeMarginVertical !== undefined ? {
14871
+ marginVertical: theme.__hd__.divider.space[themeMarginVertical]
14872
+ } : {};
14873
+ return _objectSpread2(_objectSpread2({
14874
+ maxWidth: '100%',
14875
+ borderBottomColor: theme.__hd__.divider.colors["default"],
14876
+ borderBottomWidth: theme.__hd__.divider.borderWidths["default"]
14877
+ }, horizontalMargin), verticalMargin);
14878
+ });
14879
+
14880
+ var _excluded$4 = ["marginHorizontal", "marginVertical", "style", "testID"];
14881
+
14882
+ var Divider = function Divider(_ref) {
14883
+ var marginHorizontal = _ref.marginHorizontal,
14884
+ marginVertical = _ref.marginVertical,
13951
14885
  style = _ref.style,
13952
- testID = _ref.testID;
13953
- return /*#__PURE__*/React.createElement(StyledActionItem, {
14886
+ testID = _ref.testID,
14887
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$4);
14888
+
14889
+ return /*#__PURE__*/React.createElement(StyledDivider, _extends$3({}, nativeProps, {
14890
+ themeMarginHorizontal: marginHorizontal,
14891
+ themeMarginVertical: marginVertical,
13954
14892
  style: style,
13955
- onPress: onPress,
13956
14893
  testID: testID
13957
- }, /*#__PURE__*/React.createElement(Icon, {
13958
- icon: icon
13959
- }), /*#__PURE__*/React.createElement(StyledActionItemText, null, title));
14894
+ }));
14895
+ };
14896
+
14897
+ var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
14898
+ var StyledContainer$1 = index$2(View)(function (_ref) {
14899
+ var theme = _ref.theme,
14900
+ enableShadow = _ref.enableShadow;
14901
+ return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
14902
+ shadowColor: enableShadow ? theme.__hd__.drawer.colors.shadow : 'transparent',
14903
+ shadowOffset: theme.__hd__.drawer.shadows.offset,
14904
+ shadowOpacity: theme.__hd__.drawer.shadows.opacity,
14905
+ shadowRadius: theme.__hd__.drawer.shadows.radius,
14906
+ overflow: 'hidden',
14907
+ zIndex: 9999,
14908
+ elevation: 9999
14909
+ });
14910
+ });
14911
+ var StyledBackdrop$1 = index$2(AnimatedPressable)(function (_ref2) {
14912
+ var theme = _ref2.theme;
14913
+ return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
14914
+ backgroundColor: theme.__hd__.drawer.colors.backdrop
14915
+ });
14916
+ });
14917
+ var StyledDrawerContainer = index$2(Animated.View)(function (_ref3) {
14918
+ var theme = _ref3.theme,
14919
+ enableShadow = _ref3.enableShadow;
14920
+ return {
14921
+ borderBottomLeftRadius: theme.__hd__.drawer.radii["default"],
14922
+ borderBottomRightRadius: theme.__hd__.drawer.radii["default"],
14923
+ backgroundColor: theme.__hd__.drawer.colors.background,
14924
+ elevation: enableShadow ? theme.__hd__.drawer.shadows.elevation : undefined,
14925
+ overflow: 'hidden'
14926
+ };
14927
+ });
14928
+
14929
+ var Drawer = function Drawer(_ref) {
14930
+ var visible = _ref.visible,
14931
+ children = _ref.children,
14932
+ _ref$hasBackdrop = _ref.hasBackdrop,
14933
+ hasBackdrop = _ref$hasBackdrop === void 0 ? true : _ref$hasBackdrop,
14934
+ onDismiss = _ref.onDismiss,
14935
+ testID = _ref.testID;
14936
+ var animatedValue = useRef(new Animated.Value(visible ? 1 : 0)).current;
14937
+
14938
+ var _useState = useState(0),
14939
+ _useState2 = _slicedToArray(_useState, 2),
14940
+ height = _useState2[0],
14941
+ setHeight = _useState2[1];
14942
+
14943
+ var enableShadow = visible && !hasBackdrop;
14944
+ var interpolateTranslateY = animatedValue.interpolate({
14945
+ inputRange: [0, 1],
14946
+ outputRange: [-height, 0]
14947
+ });
14948
+ var interpolateBackdropOpacity = hasBackdrop ? animatedValue.interpolate({
14949
+ inputRange: [0, 1],
14950
+ outputRange: [0, 0.35]
14951
+ }) : 0;
14952
+ useEffect(function () {
14953
+ var animation = Animated.timing(animatedValue, {
14954
+ toValue: visible ? 1 : 0,
14955
+ easing: Easing.inOut(Easing.cubic),
14956
+ useNativeDriver: true
14957
+ });
14958
+ animation.start();
14959
+ return function () {
14960
+ return animation.stop();
14961
+ };
14962
+ }, [visible]);
14963
+ return /*#__PURE__*/React.createElement(StyledContainer$1, {
14964
+ testID: testID,
14965
+ enableShadow: enableShadow,
14966
+ pointerEvents: "box-none"
14967
+ }, /*#__PURE__*/React.createElement(StyledBackdrop$1, {
14968
+ pointerEvents: visible ? 'auto' : 'box-none',
14969
+ onPress: onDismiss,
14970
+ style: {
14971
+ opacity: interpolateBackdropOpacity
14972
+ }
14973
+ }), /*#__PURE__*/React.createElement(StyledDrawerContainer, {
14974
+ enableShadow: enableShadow,
14975
+ onLayout: function onLayout(_ref2) {
14976
+ var nativeEvent = _ref2.nativeEvent;
14977
+ return setHeight(nativeEvent.layout.height);
14978
+ },
14979
+ style: {
14980
+ transform: [{
14981
+ translateY: interpolateTranslateY
14982
+ }]
14983
+ }
14984
+ }, children));
13960
14985
  };
13961
14986
 
13962
- var StyledContainer = index$1(View)({
13963
- position: 'absolute',
13964
- left: 0,
13965
- right: 0,
13966
- top: 0,
13967
- bottom: 0,
13968
- alignItems: 'flex-end',
13969
- justifyContent: 'flex-end'
13970
- });
13971
- var StyledActionGroupContainer = index$1(Animated.View)({
13972
- alignItems: 'flex-end',
13973
- justifyContent: 'flex-end',
13974
- width: '70%'
14987
+ var StyledFABContainer = index$2(TouchableHighlight)(function (_ref) {
14988
+ var theme = _ref.theme;
14989
+ return {
14990
+ backgroundColor: theme.__hd__.fab.colors.buttonBackground,
14991
+ borderRadius: theme.radii.rounded,
14992
+ alignItems: 'center',
14993
+ justifyContent: 'center',
14994
+ overflow: 'hidden',
14995
+ alignSelf: 'flex-start',
14996
+ paddingHorizontal: theme.__hd__.fab.space.containerPaddingHorizontal,
14997
+ paddingVertical: theme.__hd__.fab.space.containerPaddingVertical,
14998
+ flexDirection: 'row'
14999
+ };
15000
+ });
15001
+ var StyledFABIcon = index$2(Icon)(function (_ref2) {
15002
+ var theme = _ref2.theme;
15003
+ return {
15004
+ color: theme.__hd__.fab.colors.icon,
15005
+ lineHeight: theme.__hd__.fab.lineHeights.icon,
15006
+ textAlignVertical: 'center',
15007
+ textAlign: 'center'
15008
+ };
15009
+ });
15010
+ var StyledFABText = index$2(Text$1)(function (_ref3) {
15011
+ var theme = _ref3.theme;
15012
+ return {
15013
+ fontFamily: theme.__hd__.fab.fonts.title,
15014
+ fontSize: theme.__hd__.fab.fontSizes.title,
15015
+ lineHeight: theme.__hd__.fab.lineHeights.title,
15016
+ color: theme.__hd__.fab.colors.titleText,
15017
+ textAlignVertical: 'center',
15018
+ textAlign: 'center',
15019
+ marginHorizontal: theme.__hd__.fab.space.titleMarginHorizontal
15020
+ };
15021
+ });
15022
+
15023
+ var _excluded$3 = ["active"];
15024
+ var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
15025
+
15026
+ var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
15027
+ var active = _ref.active,
15028
+ iconProps = _objectWithoutProperties$1(_ref, _excluded$3);
15029
+
15030
+ var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
15031
+ useEffect(function () {
15032
+ var animation = Animated.timing(rotateAnimation.current, {
15033
+ toValue: active ? 1 : 0,
15034
+ useNativeDriver: true
15035
+ });
15036
+ animation.start();
15037
+ return function () {
15038
+ animation.stop();
15039
+ };
15040
+ }, [active]);
15041
+ var interpolatedRotateAnimation = rotateAnimation.current.interpolate({
15042
+ inputRange: [0, 1],
15043
+ outputRange: ['0deg', '-45deg']
15044
+ });
15045
+ return /*#__PURE__*/React.createElement(Animated.View, {
15046
+ style: StyleSheet$1.flatten([{
15047
+ transform: [{
15048
+ rotate: interpolatedRotateAnimation
15049
+ }]
15050
+ }])
15051
+ }, /*#__PURE__*/React.createElement(AnimatedIcons, iconProps));
15052
+ };
15053
+
15054
+ var IconOnlyContent = function IconOnlyContent(_ref) {
15055
+ var icon = _ref.icon,
15056
+ animated = _ref.animated,
15057
+ active = _ref.active;
15058
+
15059
+ if (animated) {
15060
+ return /*#__PURE__*/React.createElement(AnimatedFABIcon, {
15061
+ active: active,
15062
+ icon: icon,
15063
+ testID: "animated-fab-icon"
15064
+ });
15065
+ }
15066
+
15067
+ return /*#__PURE__*/React.createElement(StyledFABIcon, {
15068
+ icon: icon,
15069
+ testID: "styled-fab-icon"
15070
+ });
15071
+ };
15072
+
15073
+ var IconWithTextContent = function IconWithTextContent(_ref2) {
15074
+ var icon = _ref2.icon,
15075
+ title = _ref2.title;
15076
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledFABIcon, {
15077
+ size: "xsmall",
15078
+ icon: icon,
15079
+ testID: "styled-fab-icon"
15080
+ }), /*#__PURE__*/React.createElement(StyledFABText, null, title));
15081
+ };
15082
+
15083
+ var FAB = function FAB(_ref3) {
15084
+ var onPress = _ref3.onPress,
15085
+ title = _ref3.title,
15086
+ icon = _ref3.icon,
15087
+ animated = _ref3.animated,
15088
+ testID = _ref3.testID,
15089
+ active = _ref3.active,
15090
+ style = _ref3.style;
15091
+ var isIconOnly = !title;
15092
+ return /*#__PURE__*/React.createElement(StyledFABContainer, {
15093
+ testID: testID,
15094
+ style: style,
15095
+ onPress: onPress,
15096
+ activeOpacity: 0.6
15097
+ }, isIconOnly ? /*#__PURE__*/React.createElement(IconOnlyContent, {
15098
+ animated: animated,
15099
+ active: active,
15100
+ icon: icon
15101
+ }) : /*#__PURE__*/React.createElement(IconWithTextContent, {
15102
+ icon: icon,
15103
+ title: title
15104
+ }));
15105
+ };
15106
+
15107
+ var StyledActionItem = index$2(TouchableOpacity)(function (_ref) {
15108
+ var theme = _ref.theme;
15109
+ return {
15110
+ paddingLeft: theme.__hd__.fab.space.actionItemPaddingLeft,
15111
+ paddingRight: theme.__hd__.fab.space.actionItemPaddingRight,
15112
+ paddingTop: theme.__hd__.fab.space.actionItemPaddingTop,
15113
+ paddingBottom: theme.__hd__.fab.space.actionItemPaddingBottom,
15114
+ margin: theme.__hd__.fab.space.actionItemMargin,
15115
+ marginRight: theme.__hd__.fab.space.actionItemMarginRight,
15116
+ backgroundColor: theme.__hd__.fab.colors.actionItemBackground,
15117
+ borderRadius: theme.__hd__.fab.radii.actionItem,
15118
+ flexDirection: 'row',
15119
+ alignItems: 'center',
15120
+ alignSelf: 'flex-end',
15121
+ overflow: 'hidden'
15122
+ };
15123
+ });
15124
+ var StyledActionItemText = index$2(Typography.Text)(function (_ref2) {
15125
+ var theme = _ref2.theme;
15126
+ return {
15127
+ paddingLeft: theme.__hd__.fab.space.actionItemTextPaddingLeft,
15128
+ fontSize: theme.__hd__.fab.fontSizes.actionItemText,
15129
+ lineHeight: theme.__hd__.fab.lineHeights.actionItemText,
15130
+ fontFamily: theme.__hd__.fab.fonts.actionItemText
15131
+ };
15132
+ });
15133
+
15134
+ var ActionItem = function ActionItem(_ref) {
15135
+ var icon = _ref.icon,
15136
+ title = _ref.title,
15137
+ onPress = _ref.onPress,
15138
+ style = _ref.style,
15139
+ testID = _ref.testID;
15140
+ return /*#__PURE__*/React.createElement(StyledActionItem, {
15141
+ style: style,
15142
+ onPress: onPress,
15143
+ testID: testID
15144
+ }, /*#__PURE__*/React.createElement(Icon, {
15145
+ icon: icon
15146
+ }), /*#__PURE__*/React.createElement(StyledActionItemText, null, title));
15147
+ };
15148
+
15149
+ var StyledContainer = index$2(View)({
15150
+ position: 'absolute',
15151
+ left: 0,
15152
+ right: 0,
15153
+ top: 0,
15154
+ bottom: 0,
15155
+ alignItems: 'flex-end',
15156
+ justifyContent: 'flex-end'
15157
+ });
15158
+ var StyledActionGroupContainer = index$2(Animated.View)({
15159
+ alignItems: 'flex-end',
15160
+ justifyContent: 'flex-end',
15161
+ width: '70%'
15162
+ });
15163
+ var StyledFAB = index$2(FAB)(function (_ref) {
15164
+ var theme = _ref.theme;
15165
+ return {
15166
+ marginRight: theme.__hd__.fab.space.buttonMarginRight,
15167
+ marginTop: theme.__hd__.fab.space.buttonMarginTop,
15168
+ alignSelf: 'flex-end'
15169
+ };
15170
+ });
15171
+ var StyledBackdrop = index$2(Animated.View)(function (_ref2) {
15172
+ var theme = _ref2.theme;
15173
+ return {
15174
+ position: 'absolute',
15175
+ left: 0,
15176
+ right: 0,
15177
+ top: 0,
15178
+ bottom: 0,
15179
+ backgroundColor: theme.__hd__.fab.colors.backdropBackground
15180
+ };
15181
+ });
15182
+ var StyledHeaderText = index$2(Typography.Text)(function (_ref3) {
15183
+ var theme = _ref3.theme;
15184
+ return {
15185
+ fontSize: theme.__hd__.fab.fontSizes.header,
15186
+ lineHeight: theme.__hd__.fab.lineHeights.header,
15187
+ fontFamily: theme.__hd__.fab.fonts.header,
15188
+ marginRight: theme.__hd__.fab.space.headerTextMarginRight,
15189
+ marginBottom: theme.__hd__.fab.space.headerTextMarginBottom,
15190
+ textAlign: 'right'
15191
+ };
15192
+ });
15193
+
15194
+ var ActionItemsListComponent = function ActionItemsListComponent(_ref) {
15195
+ var style = _ref.style,
15196
+ items = _ref.items;
15197
+ return /*#__PURE__*/React.createElement(View, {
15198
+ style: style
15199
+ }, items === null || items === void 0 ? void 0 : items.map(function (itemProp) {
15200
+ return /*#__PURE__*/React.createElement(ActionItem, _extends$3({
15201
+ key: itemProp.icon
15202
+ }, itemProp));
15203
+ }));
15204
+ };
15205
+
15206
+ var ActionGroup = function ActionGroup(_ref2) {
15207
+ var headerTitle = _ref2.headerTitle,
15208
+ onPress = _ref2.onPress,
15209
+ active = _ref2.active,
15210
+ style = _ref2.style,
15211
+ items = _ref2.items,
15212
+ testID = _ref2.testID,
15213
+ fabTitle = _ref2.fabTitle;
15214
+ var tranlateXAnimation = useRef(new Animated.Value(active ? 1 : 0));
15215
+ useEffect(function () {
15216
+ var animation = Animated.timing(tranlateXAnimation.current, {
15217
+ toValue: active ? 1 : 0,
15218
+ useNativeDriver: true
15219
+ });
15220
+ animation.start();
15221
+ }, [active]);
15222
+ var interpolatedTranlateXAnimation = tranlateXAnimation.current.interpolate({
15223
+ inputRange: [0, 1],
15224
+ outputRange: [400, 0]
15225
+ });
15226
+ var interpolatedOpacityAnimation = tranlateXAnimation.current.interpolate({
15227
+ inputRange: [0, 1],
15228
+ outputRange: [0, 0.9]
15229
+ });
15230
+ return /*#__PURE__*/React.createElement(StyledContainer, {
15231
+ testID: testID,
15232
+ pointerEvents: "box-none",
15233
+ style: style
15234
+ }, /*#__PURE__*/React.createElement(StyledBackdrop, {
15235
+ pointerEvents: active ? 'auto' : 'box-none',
15236
+ testID: "back-drop",
15237
+ style: {
15238
+ opacity: interpolatedOpacityAnimation
15239
+ }
15240
+ }), /*#__PURE__*/React.createElement(StyledActionGroupContainer, {
15241
+ testID: "action-group",
15242
+ style: {
15243
+ transform: [{
15244
+ translateX: interpolatedTranlateXAnimation
15245
+ }]
15246
+ }
15247
+ }, headerTitle && /*#__PURE__*/React.createElement(StyledHeaderText, {
15248
+ testID: "header-text"
15249
+ }, headerTitle), /*#__PURE__*/React.createElement(ActionItemsListComponent, {
15250
+ items: items
15251
+ })), /*#__PURE__*/React.createElement(StyledFAB, {
15252
+ testID: "fab",
15253
+ icon: "add",
15254
+ onPress: onPress,
15255
+ animated: true,
15256
+ active: active,
15257
+ title: fabTitle
15258
+ }));
15259
+ };
15260
+
15261
+ var index$1 = Object.assign(FAB, {
15262
+ ActionGroup: ActionGroup
15263
+ });
15264
+
15265
+ var HalfCircleWrapper = index$2(View)(function (_ref) {
15266
+ var theme = _ref.theme;
15267
+ return {
15268
+ width: theme.__hd__.progress.sizes.radius,
15269
+ height: theme.__hd__.progress.sizes.radius * 2,
15270
+ overflow: 'hidden'
15271
+ };
15272
+ });
15273
+ var HalfCircleInnerFG = index$2(View)(function (_ref2) {
15274
+ var theme = _ref2.theme,
15275
+ themeIntent = _ref2.themeIntent;
15276
+ return {
15277
+ width: theme.__hd__.progress.sizes.radius * 2,
15278
+ height: theme.__hd__.progress.sizes.radius * 2,
15279
+ backgroundColor: theme.__hd__.progress.colors[themeIntent],
15280
+ borderRadius: theme.__hd__.progress.radii["default"]
15281
+ };
15282
+ });
15283
+ var HalfCircleInnerBG = index$2(View)(function (_ref3) {
15284
+ var theme = _ref3.theme;
15285
+ return {
15286
+ width: theme.__hd__.progress.sizes.radius * 2,
15287
+ height: theme.__hd__.progress.sizes.radius * 2,
15288
+ backgroundColor: theme.__hd__.progress.colors.background,
15289
+ borderRadius: theme.__hd__.progress.radii["default"]
15290
+ };
15291
+ });
15292
+ var DonutCircle = index$2(View)(function (_ref4) {
15293
+ var theme = _ref4.theme;
15294
+ return {
15295
+ position: 'absolute',
15296
+ top: theme.__hd__.progress.sizes.strokeWidth,
15297
+ left: theme.__hd__.progress.sizes.strokeWidth,
15298
+ width: theme.__hd__.progress.sizes.radius * 2 - theme.__hd__.progress.sizes.strokeWidth * 2,
15299
+ height: theme.__hd__.progress.sizes.radius * 2 - theme.__hd__.progress.sizes.strokeWidth * 2,
15300
+ zIndex: 3,
15301
+ backgroundColor: theme.__hd__.progress.colors.innerBackground,
15302
+ borderRadius: theme.__hd__.progress.radii["default"],
15303
+ alignItems: 'center',
15304
+ justifyContent: 'center'
15305
+ };
15306
+ });
15307
+ var StrokeEnd = index$2(View)(function (_ref5) {
15308
+ var theme = _ref5.theme,
15309
+ themeIntent = _ref5.themeIntent;
15310
+ return {
15311
+ position: 'absolute',
15312
+ top: 0,
15313
+ left: theme.__hd__.progress.sizes.radius - theme.__hd__.progress.sizes.strokeWidth / 2,
15314
+ width: theme.__hd__.progress.sizes.strokeWidth,
15315
+ height: theme.__hd__.progress.sizes.strokeWidth,
15316
+ borderRadius: theme.__hd__.progress.radii["default"],
15317
+ backgroundColor: theme.__hd__.progress.colors[themeIntent],
15318
+ zIndex: 2
15319
+ };
15320
+ });
15321
+
15322
+ var _excluded$2 = ["value", "intent", "style", "testID"];
15323
+
15324
+ var HalfCircle = function HalfCircle(_ref) {
15325
+ var type = _ref.type,
15326
+ _ref$themeIntent = _ref.themeIntent,
15327
+ themeIntent = _ref$themeIntent === void 0 ? 'primary' : _ref$themeIntent;
15328
+ return /*#__PURE__*/React.createElement(HalfCircleWrapper, null, type === 'background' ? /*#__PURE__*/React.createElement(HalfCircleInnerBG, null) : /*#__PURE__*/React.createElement(HalfCircleInnerFG, {
15329
+ themeIntent: themeIntent
15330
+ }));
15331
+ };
15332
+
15333
+ var ProgressCircle = function ProgressCircle(_ref2) {
15334
+ var value = _ref2.value,
15335
+ _ref2$intent = _ref2.intent,
15336
+ intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
15337
+ style = _ref2.style,
15338
+ testID = _ref2.testID,
15339
+ nativeProps = _objectWithoutProperties$1(_ref2, _excluded$2);
15340
+
15341
+ var theme = useTheme();
15342
+ var radius = theme.__hd__.progress.sizes.radius;
15343
+ var progressAnimatedValue = useRef(new Animated.Value(0));
15344
+ useEffect(function () {
15345
+ var animation = Animated.timing(progressAnimatedValue.current, {
15346
+ toValue: value,
15347
+ useNativeDriver: true
15348
+ });
15349
+ animation.start();
15350
+ return function () {
15351
+ return animation.stop();
15352
+ };
15353
+ }, [value]); // Animate progress circle: 0% => 50%
15354
+
15355
+ var interpolateRotateRightHalf = progressAnimatedValue.current.interpolate({
15356
+ inputRange: [0, 50],
15357
+ outputRange: ['0deg', '180deg'],
15358
+ extrapolate: 'clamp'
15359
+ });
15360
+ var interpolateOpacityRightHalf = progressAnimatedValue.current.interpolate({
15361
+ inputRange: [50, 51],
15362
+ outputRange: [1, 0],
15363
+ extrapolate: 'clamp'
15364
+ }); // Animate progress circle: 50% => 100%
15365
+
15366
+ var interpolateRotateSecondHalf = progressAnimatedValue.current.interpolate({
15367
+ inputRange: [50, 100],
15368
+ outputRange: ['0deg', '180deg'],
15369
+ extrapolate: 'clamp'
15370
+ }); // Curve at the end of progress stroke
15371
+
15372
+ var interpolateDotRotate = progressAnimatedValue.current.interpolate({
15373
+ inputRange: [0, 100],
15374
+ outputRange: ['0deg', '360deg'],
15375
+ extrapolate: 'clamp'
15376
+ });
15377
+ return /*#__PURE__*/React.createElement(View, _extends$3({}, nativeProps, {
15378
+ testID: testID,
15379
+ style: style
15380
+ }), /*#__PURE__*/React.createElement(View, {
15381
+ style: {
15382
+ flexDirection: 'row'
15383
+ }
15384
+ }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(HalfCircle, {
15385
+ type: "foreground",
15386
+ themeIntent: intent
15387
+ }), /*#__PURE__*/React.createElement(Animated.View, {
15388
+ style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
15389
+ transform: [{
15390
+ translateX: radius / 2
15391
+ }, {
15392
+ rotate: interpolateRotateSecondHalf
15393
+ }, {
15394
+ translateX: -radius / 2
15395
+ }]
15396
+ })
15397
+ }, /*#__PURE__*/React.createElement(HalfCircle, {
15398
+ type: "background"
15399
+ }))), /*#__PURE__*/React.createElement(View, {
15400
+ style: {
15401
+ transform: [{
15402
+ rotate: '180deg'
15403
+ }],
15404
+ zIndex: 1
15405
+ }
15406
+ }, /*#__PURE__*/React.createElement(HalfCircle, {
15407
+ type: "foreground",
15408
+ themeIntent: intent
15409
+ }), /*#__PURE__*/React.createElement(Animated.View, {
15410
+ style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
15411
+ transform: [{
15412
+ translateX: radius / 2
15413
+ }, {
15414
+ rotate: interpolateRotateRightHalf
15415
+ }, {
15416
+ translateX: -radius / 2
15417
+ }],
15418
+ opacity: interpolateOpacityRightHalf
15419
+ })
15420
+ }, /*#__PURE__*/React.createElement(HalfCircle, {
15421
+ type: "background"
15422
+ }))), /*#__PURE__*/React.createElement(StrokeEnd, {
15423
+ themeIntent: intent
15424
+ }), /*#__PURE__*/React.createElement(Animated.View, {
15425
+ style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
15426
+ zIndex: 2,
15427
+ transform: [{
15428
+ rotate: interpolateDotRotate
15429
+ }]
15430
+ })
15431
+ }, /*#__PURE__*/React.createElement(StrokeEnd, {
15432
+ themeIntent: intent
15433
+ })), /*#__PURE__*/React.createElement(DonutCircle, null, /*#__PURE__*/React.createElement(Typography.Text, {
15434
+ fontSize: "xlarge"
15435
+ }, "".concat(value, "%")))));
15436
+ };
15437
+
15438
+ var StyledWrapper = index$2(View)(function (_ref) {
15439
+ var theme = _ref.theme;
15440
+ return {
15441
+ height: theme.__hd__.progress.sizes.barHeight,
15442
+ alignSelf: 'stretch',
15443
+ backgroundColor: theme.__hd__.progress.colors.background,
15444
+ overflow: 'hidden'
15445
+ };
15446
+ });
15447
+ var StyledInner = index$2(Animated.View)(function (_ref2) {
15448
+ var theme = _ref2.theme,
15449
+ themeIntent = _ref2.themeIntent;
15450
+ return {
15451
+ flex: 1,
15452
+ alignSelf: 'stretch',
15453
+ backgroundColor: theme.__hd__.progress.colors[themeIntent]
15454
+ };
15455
+ });
15456
+
15457
+ var _excluded$1 = ["value", "intent", "style", "testID"];
15458
+
15459
+ var ProgressBar = function ProgressBar(_ref) {
15460
+ var value = _ref.value,
15461
+ _ref$intent = _ref.intent,
15462
+ intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
15463
+ style = _ref.style,
15464
+ testID = _ref.testID,
15465
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded$1);
15466
+
15467
+ var _useState = useState(0),
15468
+ _useState2 = _slicedToArray(_useState, 2),
15469
+ width = _useState2[0],
15470
+ setWidth = _useState2[1];
15471
+
15472
+ var progressAnimatedValue = useRef(new Animated.Value(0));
15473
+ useEffect(function () {
15474
+ var animation = Animated.timing(progressAnimatedValue.current, {
15475
+ toValue: value,
15476
+ useNativeDriver: true
15477
+ });
15478
+ animation.start();
15479
+ return function () {
15480
+ return animation.stop();
15481
+ };
15482
+ }, [value]);
15483
+ var interpolateTranslateX = progressAnimatedValue.current.interpolate({
15484
+ inputRange: [0, 100],
15485
+ outputRange: [-width, 0],
15486
+ extrapolate: 'clamp'
15487
+ });
15488
+ var interpolateBorderRadius = progressAnimatedValue.current.interpolate({
15489
+ inputRange: [99, 100],
15490
+ outputRange: [999, 0],
15491
+ extrapolate: 'clamp'
15492
+ });
15493
+ return /*#__PURE__*/React.createElement(StyledWrapper, _extends$3({}, nativeProps, {
15494
+ testID: testID,
15495
+ style: style
15496
+ }), /*#__PURE__*/React.createElement(StyledInner, {
15497
+ themeIntent: intent,
15498
+ onLayout: function onLayout(_ref2) {
15499
+ var nativeEvent = _ref2.nativeEvent;
15500
+ return setWidth(nativeEvent.layout.width);
15501
+ },
15502
+ style: {
15503
+ transform: [{
15504
+ translateX: interpolateTranslateX
15505
+ }],
15506
+ borderTopRightRadius: interpolateBorderRadius,
15507
+ borderBottomRightRadius: interpolateBorderRadius
15508
+ }
15509
+ }));
15510
+ };
15511
+
15512
+ var Progress = {
15513
+ Circle: ProgressCircle,
15514
+ Bar: ProgressBar
15515
+ };
15516
+
15517
+ var childrenWithOverriddenStyle = function childrenWithOverriddenStyle(children) {
15518
+ return Children.map(children, function (child) {
15519
+ var element = child;
15520
+ return (
15521
+ /*#__PURE__*/
15522
+ // Add a wrapper to ensure layout is calculated correctly
15523
+ React.createElement(View, {
15524
+ style: StyleSheet$1.absoluteFill,
15525
+ collapsable: false
15526
+ }, /*#__PURE__*/React.cloneElement(element, _objectSpread2(_objectSpread2({}, element.props), {}, {
15527
+ // Override styles so that each page will fill the parent.
15528
+ style: [element.props.style, StyleSheet$1.absoluteFill]
15529
+ })))
15530
+ );
15531
+ });
15532
+ };
15533
+
15534
+ var VIEW_MANAGER_NAME = 'RNCViewPager';
15535
+ var PagerViewViewManager = requireNativeComponent(VIEW_MANAGER_NAME);
15536
+ function getViewManagerConfig() {
15537
+ var viewManagerName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : VIEW_MANAGER_NAME;
15538
+ return UIManager.getViewManagerConfig(viewManagerName);
15539
+ }
15540
+
15541
+ function _extends() {
15542
+ _extends = Object.assign || function (target) {
15543
+ for (var i = 1; i < arguments.length; i++) {
15544
+ var source = arguments[i];
15545
+
15546
+ for (var key in source) {
15547
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
15548
+ target[key] = source[key];
15549
+ }
15550
+ }
15551
+ }
15552
+
15553
+ return target;
15554
+ };
15555
+
15556
+ return _extends.apply(this, arguments);
15557
+ }
15558
+
15559
+ function _defineProperty(obj, key, value) {
15560
+ if (key in obj) {
15561
+ Object.defineProperty(obj, key, {
15562
+ value: value,
15563
+ enumerable: true,
15564
+ configurable: true,
15565
+ writable: true
15566
+ });
15567
+ } else {
15568
+ obj[key] = value;
15569
+ }
15570
+
15571
+ return obj;
15572
+ }
15573
+ /**
15574
+ * Container that allows to flip left and right between child views. Each
15575
+ * child view of the `PagerView` will be treated as a separate page
15576
+ * and will be stretched to fill the `PagerView`.
15577
+ *
15578
+ * It is important all children are `<View>`s and not composite components.
15579
+ * You can set style properties like `padding` or `backgroundColor` for each
15580
+ * child. It is also important that each child have a `key` prop.
15581
+ *
15582
+ * Example:
15583
+ *
15584
+ * ```
15585
+ * render: function() {
15586
+ * return (
15587
+ * <PagerView
15588
+ * style={styles.PagerView}
15589
+ * initialPage={0}>
15590
+ * <View style={styles.pageStyle} key="1">
15591
+ * <Text>First page</Text>
15592
+ * </View>
15593
+ * <View style={styles.pageStyle} key="2">
15594
+ * <Text>Second page</Text>
15595
+ * </View>
15596
+ * </PagerView>
15597
+ * );
15598
+ * }
15599
+ *
15600
+ * ...
15601
+ *
15602
+ * var styles = {
15603
+ * ...
15604
+ * PagerView: {
15605
+ * flex: 1
15606
+ * },
15607
+ * pageStyle: {
15608
+ * alignItems: 'center',
15609
+ * padding: 20,
15610
+ * }
15611
+ * }
15612
+ * ```
15613
+ */
15614
+
15615
+ var PagerView = /*#__PURE__*/function (_React$Component) {
15616
+ _inherits$1(PagerView, _React$Component);
15617
+
15618
+ var _super = _createSuper(PagerView);
15619
+
15620
+ function PagerView() {
15621
+ var _this;
15622
+
15623
+ _classCallCheck$1(this, PagerView);
15624
+
15625
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
15626
+ args[_key] = arguments[_key];
15627
+ }
15628
+
15629
+ _this = _super.call.apply(_super, [this].concat(args));
15630
+
15631
+ _defineProperty(_assertThisInitialized$1(_this), "isScrolling", false);
15632
+
15633
+ _defineProperty(_assertThisInitialized$1(_this), "PagerView", /*#__PURE__*/React.createRef());
15634
+
15635
+ _defineProperty(_assertThisInitialized$1(_this), "getInnerViewNode", function () {
15636
+ return _this.PagerView.current.getInnerViewNode();
15637
+ });
15638
+
15639
+ _defineProperty(_assertThisInitialized$1(_this), "_onPageScroll", function (e) {
15640
+ if (_this.props.onPageScroll) {
15641
+ _this.props.onPageScroll(e);
15642
+ } // Not implemented on iOS yet
15643
+
15644
+
15645
+ if (Platform.OS === 'android') {
15646
+ if (_this.props.keyboardDismissMode === 'on-drag') {
15647
+ Keyboard.dismiss();
15648
+ }
15649
+ }
15650
+ });
15651
+
15652
+ _defineProperty(_assertThisInitialized$1(_this), "_onPageScrollStateChanged", function (e) {
15653
+ if (_this.props.onPageScrollStateChanged) {
15654
+ _this.props.onPageScrollStateChanged(e);
15655
+ }
15656
+
15657
+ _this.isScrolling = e.nativeEvent.pageScrollState === 'dragging';
15658
+ });
15659
+
15660
+ _defineProperty(_assertThisInitialized$1(_this), "_onPageSelected", function (e) {
15661
+ if (_this.props.onPageSelected) {
15662
+ _this.props.onPageSelected(e);
15663
+ }
15664
+ });
15665
+
15666
+ _defineProperty(_assertThisInitialized$1(_this), "setPage", function (selectedPage) {
15667
+ UIManager.dispatchViewManagerCommand(ReactNative__default.findNodeHandle(_assertThisInitialized$1(_this)), getViewManagerConfig().Commands.setPage, [selectedPage]);
15668
+ });
15669
+
15670
+ _defineProperty(_assertThisInitialized$1(_this), "setPageWithoutAnimation", function (selectedPage) {
15671
+ UIManager.dispatchViewManagerCommand(ReactNative__default.findNodeHandle(_assertThisInitialized$1(_this)), getViewManagerConfig().Commands.setPageWithoutAnimation, [selectedPage]);
15672
+ });
15673
+
15674
+ _defineProperty(_assertThisInitialized$1(_this), "setScrollEnabled", function (scrollEnabled) {
15675
+ UIManager.dispatchViewManagerCommand(ReactNative__default.findNodeHandle(_assertThisInitialized$1(_this)), getViewManagerConfig().Commands.setScrollEnabled, [scrollEnabled]);
15676
+ });
15677
+
15678
+ _defineProperty(_assertThisInitialized$1(_this), "_onMoveShouldSetResponderCapture", function () {
15679
+ return _this.isScrolling;
15680
+ });
15681
+
15682
+ return _this;
15683
+ }
15684
+
15685
+ _createClass$1(PagerView, [{
15686
+ key: "deducedLayoutDirection",
15687
+ get: function get() {
15688
+ var shouldUseDeviceRtlSetup = !this.props.layoutDirection || this.props.layoutDirection === 'locale';
15689
+
15690
+ if (shouldUseDeviceRtlSetup) {
15691
+ return I18nManager.isRTL ? 'rtl' : 'ltr';
15692
+ } else {
15693
+ return this.props.layoutDirection;
15694
+ }
15695
+ }
15696
+ }, {
15697
+ key: "render",
15698
+ value: function render() {
15699
+ return /*#__PURE__*/React.createElement(PagerViewViewManager, _extends({}, this.props, {
15700
+ ref: this.PagerView
15701
+ /** TODO: Fix ref type */
15702
+ ,
15703
+ style: this.props.style,
15704
+ layoutDirection: this.deducedLayoutDirection,
15705
+ onPageScroll: this._onPageScroll,
15706
+ onPageScrollStateChanged: this._onPageScrollStateChanged,
15707
+ onPageSelected: this._onPageSelected,
15708
+ onMoveShouldSetResponderCapture: this._onMoveShouldSetResponderCapture,
15709
+ children: childrenWithOverriddenStyle(this.props.children)
15710
+ }));
15711
+ }
15712
+ }]);
15713
+
15714
+ return PagerView;
15715
+ }(React.Component);
15716
+
15717
+ var AnimatedPagerView = Animated.createAnimatedComponent(PagerView);
15718
+ var TabContainer$1 = index$2(View)({
15719
+ flex: 1,
15720
+ overflow: 'hidden'
13975
15721
  });
13976
- var StyledFAB = index$1(FAB)(function (_ref) {
13977
- var theme = _ref.theme;
15722
+ var HeaderTabWrapper$1 = index$2(View)(function (_ref) {
15723
+ var theme = _ref.theme,
15724
+ themeInsets = _ref.themeInsets;
13978
15725
  return {
13979
- marginRight: theme.__hd__.fab.space.buttonMarginRight,
13980
- marginTop: theme.__hd__.fab.space.buttonMarginTop,
13981
- alignSelf: 'flex-end'
15726
+ paddingHorizontal: Math.max(themeInsets.left, themeInsets.right),
15727
+ borderBottomColor: theme.__hd__.tabs.colors.headerBottom,
15728
+ borderBottomWidth: theme.__hd__.tabs.borderWidths.headerBottom
13982
15729
  };
13983
15730
  });
13984
- var StyledBackdrop = index$1(Animated.View)(function (_ref2) {
15731
+ var HeaderTab = index$2(View)({
15732
+ flexDirection: 'row'
15733
+ });
15734
+ var HeaderTabItem$1 = index$2(View)(function (_ref2) {
13985
15735
  var theme = _ref2.theme;
13986
15736
  return {
13987
- position: 'absolute',
13988
- left: 0,
13989
- right: 0,
13990
- top: 0,
13991
- bottom: 0,
13992
- backgroundColor: theme.__hd__.fab.colors.backdropBackground
15737
+ flex: 1,
15738
+ alignItems: 'center',
15739
+ paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding
13993
15740
  };
13994
15741
  });
13995
- var StyledHeaderText = index$1(Typography.Text)(function (_ref3) {
13996
- var theme = _ref3.theme;
15742
+ var ContentWrapper$1 = index$2(AnimatedPagerView)({
15743
+ flex: 1
15744
+ });
15745
+ var TabScreen$1 = index$2(View)({
15746
+ flex: 1
15747
+ });
15748
+ var StyledIndicator = index$2(Animated.View)(function (_ref3) {
15749
+ var theme = _ref3.theme,
15750
+ themeWidth = _ref3.themeWidth;
13997
15751
  return {
13998
- fontSize: theme.__hd__.fab.fontSizes.header,
13999
- lineHeight: theme.__hd__.fab.lineHeights.header,
14000
- fontFamily: theme.__hd__.fab.fonts.header,
14001
- marginRight: theme.__hd__.fab.space.headerTextMarginRight,
14002
- marginBottom: theme.__hd__.fab.space.headerTextMarginBottom,
14003
- textAlign: 'right'
15752
+ width: themeWidth,
15753
+ height: theme.__hd__.tabs.sizes.indicator,
15754
+ backgroundColor: theme.__hd__.tabs.colors.text,
15755
+ position: 'absolute',
15756
+ bottom: 0
14004
15757
  };
14005
15758
  });
14006
15759
 
14007
- var ActionItemsListComponent = function ActionItemsListComponent(_ref) {
14008
- var style = _ref.style,
14009
- items = _ref.items;
14010
- return /*#__PURE__*/React.createElement(View, {
14011
- style: style
14012
- }, items === null || items === void 0 ? void 0 : items.map(function (itemProp) {
14013
- return /*#__PURE__*/React.createElement(ActionItem, _extends$2({
14014
- key: itemProp.icon
14015
- }, itemProp));
14016
- }));
14017
- };
14018
-
14019
- var ActionGroup = function ActionGroup(_ref2) {
14020
- var headerTitle = _ref2.headerTitle,
14021
- onPress = _ref2.onPress,
14022
- active = _ref2.active,
14023
- style = _ref2.style,
14024
- items = _ref2.items,
14025
- testID = _ref2.testID;
14026
- var tranlateXAnimation = useRef(new Animated.Value(active ? 1 : 0));
14027
- useEffect(function () {
14028
- var animation = Animated.timing(tranlateXAnimation.current, {
14029
- toValue: active ? 1 : 0,
14030
- useNativeDriver: true
14031
- });
14032
- animation.start();
14033
- }, [active]);
14034
- var interpolatedTranlateXAnimation = tranlateXAnimation.current.interpolate({
14035
- inputRange: [0, 1],
14036
- outputRange: [400, 0]
14037
- });
14038
- var interpolatedOpacityAnimation = tranlateXAnimation.current.interpolate({
14039
- inputRange: [0, 1],
14040
- outputRange: [0, 0.9]
15760
+ var ActiveTabIndicator = function ActiveTabIndicator(_ref) {
15761
+ var scrollOffsetAnimatedValue = _ref.scrollOffsetAnimatedValue,
15762
+ positionAnimatedValue = _ref.positionAnimatedValue,
15763
+ tabsLength = _ref.tabsLength,
15764
+ tabsWidth = _ref.tabsWidth;
15765
+ var inputRange = [0, tabsLength];
15766
+ var indicatorWidth = tabsWidth / tabsLength;
15767
+ var translateX = Animated.add(scrollOffsetAnimatedValue, positionAnimatedValue).interpolate({
15768
+ inputRange: inputRange,
15769
+ outputRange: [0, tabsLength * indicatorWidth]
14041
15770
  });
14042
- return /*#__PURE__*/React.createElement(StyledContainer, {
14043
- testID: testID,
14044
- pointerEvents: "box-none",
14045
- style: style
14046
- }, /*#__PURE__*/React.createElement(StyledBackdrop, {
14047
- pointerEvents: active ? 'auto' : 'box-none',
14048
- testID: "back-drop",
14049
- style: {
14050
- opacity: interpolatedOpacityAnimation
14051
- }
14052
- }), /*#__PURE__*/React.createElement(StyledActionGroupContainer, {
14053
- testID: "action-group",
15771
+ return /*#__PURE__*/React.createElement(StyledIndicator, {
15772
+ themeWidth: indicatorWidth,
14054
15773
  style: {
14055
15774
  transform: [{
14056
- translateX: interpolatedTranlateXAnimation
15775
+ translateX: translateX
14057
15776
  }]
14058
15777
  }
14059
- }, headerTitle && /*#__PURE__*/React.createElement(StyledHeaderText, {
14060
- testID: "header-text"
14061
- }, headerTitle), /*#__PURE__*/React.createElement(ActionItemsListComponent, {
14062
- items: items
14063
- })), /*#__PURE__*/React.createElement(StyledFAB, {
14064
- testID: "fab",
14065
- icon: "add",
14066
- onPress: onPress,
14067
- animated: true,
14068
- active: active
14069
- }));
15778
+ });
14070
15779
  };
14071
15780
 
14072
- var index = Object.assign(FAB, {
14073
- ActionGroup: ActionGroup
14074
- });
14075
-
14076
- var TabScreen = index$1(View)(function (_ref) {
14077
- var themeVisibility = _ref.themeVisibility;
14078
- return {
14079
- flex: 1,
14080
- display: themeVisibility === false ? 'none' : 'flex'
14081
- };
15781
+ var TabScreen = index$2(View)({
15782
+ flex: 1
14082
15783
  });
14083
- var TabContainer = index$1(View)({
15784
+ var TabContainer = index$2(View)({
14084
15785
  flex: 1,
14085
15786
  overflow: 'hidden'
14086
15787
  });
14087
- var ContentWrapper = index$1(View)({
15788
+ var ContentWrapper = index$2(PagerView)({
14088
15789
  flex: 1
14089
15790
  });
14090
- var HeaderTabWrapper = index$1(View)(function (_ref2) {
14091
- var themeInsets = _ref2.themeInsets,
14092
- theme = _ref2.theme;
15791
+ var HeaderTabWrapper = index$2(View)(function (_ref) {
15792
+ var theme = _ref.theme,
15793
+ themeInsets = _ref.themeInsets;
14093
15794
  return {
14094
- paddingLeft: Math.max(themeInsets.left, themeInsets.right),
14095
- paddingRight: Math.max(themeInsets.left, themeInsets.right),
14096
- backgroundColor: theme.__hd__.tabs.colors.background
15795
+ paddingHorizontal: Math.max(themeInsets.left, themeInsets.right),
15796
+ borderBottomColor: theme.__hd__.tabs.colors.headerBottom,
15797
+ borderBottomWidth: theme.__hd__.tabs.borderWidths.headerBottom
14097
15798
  };
14098
15799
  });
14099
- var StyledFlatList = index$1(FlatList)(function (_ref3) {
14100
- var theme = _ref3.theme;
15800
+ var HeaderTabItem = index$2(Animated.View)(function (_ref2) {
15801
+ var theme = _ref2.theme;
14101
15802
  return {
14102
- paddingLeft: theme.__hd__.tabs.space.flatListHorizontalPadding,
14103
- paddingRight: theme.__hd__.tabs.space.flatListHorizontalPadding
15803
+ paddingHorizontal: theme.__hd__.tabs.space.itemHorizontalPadding,
15804
+ paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding
14104
15805
  };
14105
15806
  });
14106
- var HeaderTabItem = index$1(View)(function (_ref4) {
14107
- var theme = _ref4.theme;
14108
- return {
14109
- flexDirection: 'row',
14110
- alignItems: 'center',
14111
- paddingLeft: theme.__hd__.tabs.space.itemHorizontalPadding,
14112
- paddingRight: theme.__hd__.tabs.space.itemHorizontalPadding,
14113
- paddingTop: theme.__hd__.tabs.space.itemVerticalPadding,
14114
- paddingBottom: theme.__hd__.tabs.space.itemVerticalPadding
14115
- };
15807
+ var HeaderTabItemOutlineWrapper = index$2(View)(function (_ref3) {
15808
+ var theme = _ref3.theme;
15809
+ return _objectSpread2({
15810
+ paddingHorizontal: theme.__hd__.tabs.space.itemHorizontalPadding,
15811
+ paddingVertical: theme.__hd__.tabs.space.itemVerticalPadding
15812
+ }, StyleSheet$1.absoluteFillObject);
14116
15813
  });
14117
- var StyledHeaderTabIcon = index$1(Icon)(function (_ref5) {
14118
- var themeActive = _ref5.themeActive,
14119
- theme = _ref5.theme;
15814
+ var HeaderTabItemOutline = index$2(Animated.View)(function (_ref4) {
15815
+ var theme = _ref4.theme,
15816
+ themeActive = _ref4.themeActive;
14120
15817
  return {
14121
- color: themeActive ? theme.__hd__.tabs.colors.active : theme.__hd__.tabs.colors.inactive
15818
+ borderRadius: theme.__hd__.tabs.radii.outline,
15819
+ backgroundColor: themeActive ? theme.__hd__.tabs.colors.activeBackground : undefined
14122
15820
  };
14123
15821
  });
14124
- var StyledHeaderTabText = index$1(Typography.Text)(function (_ref6) {
14125
- var themeActive = _ref6.themeActive,
14126
- theme = _ref6.theme;
15822
+ var HeaderTabItemWrapper = index$2(View)(function (_ref5) {
15823
+ var theme = _ref5.theme;
14127
15824
  return {
14128
- marginLeft: theme.__hd__.tabs.space.titleMarginLeft,
14129
- color: themeActive ? theme.__hd__.tabs.colors.active : theme.__hd__.tabs.colors.inactive
15825
+ paddingHorizontal: theme.__hd__.tabs.space.outlineHorizontalPadding,
15826
+ paddingVertical: theme.__hd__.tabs.space.outlineVerticalPadding
14130
15827
  };
14131
15828
  });
14132
15829
 
14133
- var _excluded = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
15830
+ var useAnimatedValueArray = function useAnimatedValueArray(initialValues) {
15831
+ var refs = React.useRef([]);
15832
+ refs.current.length = initialValues.length;
15833
+ initialValues.forEach(function (initialValue, i) {
15834
+ var _refs$current$i;
14134
15835
 
14135
- var Tabs = function Tabs(_ref) {
14136
- var onTabPress = _ref.onTabPress,
14137
- _ref$renderActiveTabO = _ref.renderActiveTabOnly,
14138
- renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
14139
- selectedTabKey = _ref.selectedTabKey,
14140
- tabs = _ref.tabs,
14141
- nativeProps = _objectWithoutProperties$1(_ref, _excluded);
15836
+ refs.current[i] = (_refs$current$i = refs.current[i]) !== null && _refs$current$i !== void 0 ? _refs$current$i : new Animated.Value(initialValue);
15837
+ });
15838
+ return refs.current;
15839
+ };
14142
15840
 
14143
- var flatListRef = React.useRef(null);
14144
- var insets = useSafeAreaInsets();
14145
- /**
14146
- * List of loaded tabs, tabs will be loaded when navigated to.
14147
- */
15841
+ var getTabItem$1 = function getTabItem(_ref) {
15842
+ var item = _ref.item,
15843
+ color = _ref.color,
15844
+ active = _ref.active;
15845
+
15846
+ if (isHeroIcon(item)) {
15847
+ return /*#__PURE__*/React.createElement(Icon, {
15848
+ icon: item,
15849
+ testID: "hero-icon-".concat(item),
15850
+ size: "small",
15851
+ intent: active ? 'info' : 'text'
15852
+ });
15853
+ }
14148
15854
 
14149
- var _React$useState = React.useState([selectedTabKey]),
14150
- _React$useState2 = _slicedToArray(_React$useState, 2),
14151
- loaded = _React$useState2[0],
14152
- setLoaded = _React$useState2[1];
15855
+ if (typeof item === 'string') {
15856
+ return /*#__PURE__*/React.createElement(Typography.Text, {
15857
+ fontWeight: active ? 'semi-bold' : 'regular',
15858
+ numberOfLines: 1,
15859
+ style: {
15860
+ color: color
15861
+ }
15862
+ }, item);
15863
+ }
14153
15864
 
14154
- React.useEffect(function () {
14155
- var selectedTabIndex = tabs.findIndex(function (item) {
14156
- return item.key === selectedTabKey;
14157
- });
15865
+ return item({
15866
+ color: color
15867
+ });
15868
+ };
14158
15869
 
15870
+ var ScrollableTab = function ScrollableTab(_ref2) {
15871
+ var onTabPress = _ref2.onTabPress,
15872
+ selectedTabKey = _ref2.selectedTabKey,
15873
+ tabs = _ref2.tabs,
15874
+ containerStyle = _ref2.containerStyle,
15875
+ barStyle = _ref2.barStyle,
15876
+ _ref2$lazy = _ref2.lazy,
15877
+ lazy = _ref2$lazy === void 0 ? false : _ref2$lazy,
15878
+ _ref2$lazyPreloadDist = _ref2.lazyPreloadDistance,
15879
+ lazyPreloadDistance = _ref2$lazyPreloadDist === void 0 ? 1 : _ref2$lazyPreloadDist;
15880
+ var flatListRef = React.useRef(null);
15881
+ var pagerViewRef = React.useRef(null);
15882
+ var insets = useSafeAreaInsets();
15883
+ var theme = useTheme();
15884
+ var selectedTabIndex = tabs.findIndex(function (item) {
15885
+ return item.key === selectedTabKey;
15886
+ });
15887
+ var tabsAnims = useAnimatedValueArray(tabs.map(function (_, i) {
15888
+ return i === selectedTabIndex ? 1 : 0;
15889
+ }));
15890
+ React.useEffect(function () {
14159
15891
  if (selectedTabIndex !== -1) {
14160
15892
  var _flatListRef$current;
14161
15893
 
@@ -14164,18 +15896,25 @@ var Tabs = function Tabs(_ref) {
14164
15896
  viewPosition: 0.5
14165
15897
  });
14166
15898
  }
14167
- }, [selectedTabKey, tabs]);
14168
-
14169
- if (!loaded.includes(selectedTabKey)) {
14170
- // Set the current tab to be loaded if it was not loaded before
14171
- setLoaded(function (loadedState) {
14172
- return [].concat(_toConsumableArray$1(loadedState), [selectedTabKey]);
14173
- });
14174
- }
14175
15899
 
14176
- return /*#__PURE__*/React.createElement(TabContainer, nativeProps, /*#__PURE__*/React.createElement(HeaderTabWrapper, {
14177
- themeInsets: insets
14178
- }, /*#__PURE__*/React.createElement(StyledFlatList, {
15900
+ var animation = Animated.parallel(_toConsumableArray$1(tabs.map(function (_, i) {
15901
+ return Animated.timing(tabsAnims[i], {
15902
+ toValue: i === selectedTabIndex ? 1 : 0,
15903
+ duration: 150,
15904
+ useNativeDriver: true
15905
+ });
15906
+ })));
15907
+ animation.start();
15908
+ return function () {
15909
+ return animation.stop();
15910
+ };
15911
+ }, [selectedTabIndex]);
15912
+ return /*#__PURE__*/React.createElement(TabContainer, {
15913
+ style: containerStyle
15914
+ }, /*#__PURE__*/React.createElement(HeaderTabWrapper, {
15915
+ themeInsets: insets,
15916
+ style: barStyle
15917
+ }, /*#__PURE__*/React.createElement(FlatList, {
14179
15918
  ref: flatListRef,
14180
15919
  horizontal: true,
14181
15920
  data: tabs,
@@ -14183,8 +15922,8 @@ var Tabs = function Tabs(_ref) {
14183
15922
  return String(tab.key);
14184
15923
  },
14185
15924
  showsHorizontalScrollIndicator: false,
14186
- onScrollToIndexFailed: function onScrollToIndexFailed(_ref2) {
14187
- var index = _ref2.index;
15925
+ onScrollToIndexFailed: function onScrollToIndexFailed(_ref3) {
15926
+ var index = _ref3.index;
14188
15927
  setTimeout(function () {
14189
15928
  var _flatListRef$current2;
14190
15929
 
@@ -14194,57 +15933,255 @@ var Tabs = function Tabs(_ref) {
14194
15933
  });
14195
15934
  }, 100);
14196
15935
  },
14197
- renderItem: function renderItem(_ref3) {
14198
- var tab = _ref3.item;
15936
+ contentContainerStyle: {
15937
+ paddingHorizontal: theme.__hd__.tabs.space.flatListHorizontalPadding
15938
+ },
15939
+ renderItem: function renderItem(_ref4) {
15940
+ var tab = _ref4.item,
15941
+ index = _ref4.index;
14199
15942
  var key = tab.key,
14200
- icon = tab.icon,
14201
- title = tab.title,
14202
- testID = tab.testID;
15943
+ testID = tab.testID,
15944
+ activeItem = tab.activeItem,
15945
+ originalInactiveItem = tab.inactiveItem,
15946
+ _tab$showBadge = tab.showBadge,
15947
+ showBadge = _tab$showBadge === void 0 ? false : _tab$showBadge;
14203
15948
  var active = selectedTabKey === key;
14204
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
15949
+ var activeAnimated = tabsAnims[index];
15950
+ var outlineScale = active ? activeAnimated.interpolate({
15951
+ inputRange: [0, 1],
15952
+ outputRange: [0.5, 1]
15953
+ }) : 0;
15954
+ var inactiveItem = originalInactiveItem !== null && originalInactiveItem !== void 0 ? originalInactiveItem : activeItem;
15955
+ var tabItem = getTabItem$1({
15956
+ item: active ? activeItem : inactiveItem,
15957
+ color: active ? theme.__hd__.tabs.colors.active : theme.__hd__.tabs.colors.inactive,
15958
+ active: active
15959
+ });
15960
+ return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
14205
15961
  key: key,
14206
15962
  onPress: function onPress() {
14207
- return onTabPress(key);
15963
+ var _pagerViewRef$current;
15964
+
15965
+ onTabPress(key);
15966
+ (_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPage(index);
14208
15967
  },
14209
15968
  testID: testID
14210
- }, /*#__PURE__*/React.createElement(HeaderTabItem, null, /*#__PURE__*/React.createElement(StyledHeaderTabIcon, {
14211
- icon: icon,
14212
- testID: "hero-icon-".concat(icon),
14213
- themeActive: active
14214
- }), /*#__PURE__*/React.createElement(StyledHeaderTabText, {
14215
- fontWeight: "semi-bold",
14216
- numberOfLines: 1,
14217
- themeActive: active
14218
- }, title)));
14219
- }
14220
- })), /*#__PURE__*/React.createElement(ContentWrapper, null, tabs.map(function (tab) {
15969
+ }, /*#__PURE__*/React.createElement(HeaderTabItem, null, /*#__PURE__*/React.createElement(HeaderTabItemOutlineWrapper, null, /*#__PURE__*/React.createElement(HeaderTabItemOutline, {
15970
+ themeActive: active,
15971
+ style: {
15972
+ flex: 1,
15973
+ transform: [{
15974
+ scaleX: outlineScale
15975
+ }]
15976
+ }
15977
+ })), /*#__PURE__*/React.createElement(HeaderTabItemWrapper, null, /*#__PURE__*/React.createElement(Badge$1.Status, {
15978
+ visible: showBadge
15979
+ }, tabItem))));
15980
+ }
15981
+ })), /*#__PURE__*/React.createElement(ContentWrapper, {
15982
+ initialPage: selectedTabIndex,
15983
+ ref: pagerViewRef,
15984
+ onPageSelected: function onPageSelected(e) {
15985
+ var index = e.nativeEvent.position;
15986
+ var selectedItem = tabs[index];
15987
+
15988
+ if (selectedItem) {
15989
+ onTabPress(selectedItem.key);
15990
+ }
15991
+ }
15992
+ }, tabs.map(function (tab, index) {
14221
15993
  var key = tab.key,
14222
15994
  component = tab.component,
14223
15995
  testID = tab.testID;
14224
15996
  var active = selectedTabKey === key;
15997
+ var isLazyScreen = lazy && Math.abs(selectedTabIndex - index) > lazyPreloadDistance;
15998
+ return /*#__PURE__*/React.createElement(TabScreen, {
15999
+ key: key,
16000
+ testID: testID ? "tab-screen-".concat(testID) : undefined,
16001
+ pointerEvents: active ? 'auto' : 'none',
16002
+ accessibilityElementsHidden: !active,
16003
+ importantForAccessibility: active ? 'auto' : 'no-hide-descendants',
16004
+ collapsable: false
16005
+ }, isLazyScreen ? null : component);
16006
+ })));
16007
+ };
14225
16008
 
14226
- if (renderActiveTabOnly && !active) {
14227
- return null;
14228
- }
16009
+ var getTabItem = function getTabItem(_ref) {
16010
+ var item = _ref.item,
16011
+ color = _ref.color,
16012
+ active = _ref.active;
16013
+
16014
+ if (typeof item === 'string') {
16015
+ return /*#__PURE__*/React.createElement(Typography.Text, {
16016
+ fontWeight: active ? 'semi-bold' : 'regular',
16017
+ numberOfLines: 1,
16018
+ style: {
16019
+ color: color
16020
+ }
16021
+ }, item);
16022
+ }
14229
16023
 
14230
- if (!loaded.includes(key)) {
14231
- // Don't render a screen if we've never navigated to it
14232
- return null;
16024
+ return item({
16025
+ color: color
16026
+ });
16027
+ };
16028
+
16029
+ var Tabs = function Tabs(_ref2) {
16030
+ var onTabPress = _ref2.onTabPress,
16031
+ selectedTabKey = _ref2.selectedTabKey,
16032
+ tabs = _ref2.tabs,
16033
+ containerStyle = _ref2.containerStyle,
16034
+ barStyle = _ref2.barStyle,
16035
+ _ref2$lazy = _ref2.lazy,
16036
+ lazy = _ref2$lazy === void 0 ? false : _ref2$lazy,
16037
+ _ref2$lazyPreloadDist = _ref2.lazyPreloadDistance,
16038
+ lazyPreloadDistance = _ref2$lazyPreloadDist === void 0 ? 1 : _ref2$lazyPreloadDist;
16039
+ var theme = useTheme();
16040
+ var insets = useSafeAreaInsets();
16041
+ var pagerViewRef = React.useRef(null);
16042
+ var selectedTabIndex = tabs.findIndex(function (item) {
16043
+ return item.key === selectedTabKey;
16044
+ });
16045
+ var scrollOffsetAnimatedValue = React.useRef(new Animated.Value(0)).current;
16046
+ var positionAnimatedValue = React.useRef(new Animated.Value(0)).current;
16047
+
16048
+ var _React$useState = React.useState(0),
16049
+ _React$useState2 = _slicedToArray(_React$useState, 2),
16050
+ tabsWidth = _React$useState2[0],
16051
+ setTabsWidth = _React$useState2[1];
16052
+
16053
+ return /*#__PURE__*/React.createElement(TabContainer$1, {
16054
+ style: containerStyle
16055
+ }, /*#__PURE__*/React.createElement(HeaderTabWrapper$1, {
16056
+ themeInsets: insets,
16057
+ style: barStyle
16058
+ }, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(HeaderTab, {
16059
+ onLayout: function onLayout(e) {
16060
+ var width = e.nativeEvent.layout.width;
16061
+
16062
+ if (tabsWidth !== width) {
16063
+ setTabsWidth(width);
16064
+ }
14233
16065
  }
16066
+ }, tabs.map(function (tab, index) {
16067
+ var key = tab.key,
16068
+ testID = tab.testID,
16069
+ activeItem = tab.activeItem,
16070
+ originalInactiveItem = tab.inactiveItem,
16071
+ _tab$showBadge = tab.showBadge,
16072
+ showBadge = _tab$showBadge === void 0 ? false : _tab$showBadge;
16073
+ var active = selectedTabKey === key;
16074
+ var inactiveItem = originalInactiveItem !== null && originalInactiveItem !== void 0 ? originalInactiveItem : activeItem;
16075
+ var tabItem = getTabItem({
16076
+ item: active ? activeItem : inactiveItem,
16077
+ color: theme.__hd__.tabs.colors.text,
16078
+ active: active
16079
+ });
16080
+ return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
16081
+ key: key,
16082
+ onPress: function onPress() {
16083
+ var _pagerViewRef$current;
14234
16084
 
14235
- return /*#__PURE__*/React.createElement(TabScreen, {
16085
+ onTabPress(key);
16086
+ (_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPage(index);
16087
+ },
16088
+ testID: testID
16089
+ }, /*#__PURE__*/React.createElement(HeaderTabItem$1, null, /*#__PURE__*/React.createElement(Badge$1.Status, {
16090
+ visible: showBadge
16091
+ }, tabItem)));
16092
+ })), /*#__PURE__*/React.createElement(ActiveTabIndicator, {
16093
+ positionAnimatedValue: positionAnimatedValue,
16094
+ scrollOffsetAnimatedValue: scrollOffsetAnimatedValue,
16095
+ tabsLength: tabs.length,
16096
+ tabsWidth: tabsWidth
16097
+ }))), /*#__PURE__*/React.createElement(ContentWrapper$1, {
16098
+ initialPage: selectedTabIndex,
16099
+ ref: pagerViewRef,
16100
+ onPageSelected: function onPageSelected(e) {
16101
+ var index = e.nativeEvent.position;
16102
+ var selectedItem = tabs[index];
16103
+
16104
+ if (selectedItem) {
16105
+ onTabPress(selectedItem.key);
16106
+ }
16107
+ },
16108
+ onPageScroll: Animated.event([{
16109
+ nativeEvent: {
16110
+ offset: scrollOffsetAnimatedValue,
16111
+ position: positionAnimatedValue
16112
+ }
16113
+ }], {
16114
+ useNativeDriver: true
16115
+ })
16116
+ }, tabs.map(function (tab, index) {
16117
+ var key = tab.key,
16118
+ component = tab.component,
16119
+ testID = tab.testID;
16120
+ var active = selectedTabKey === key;
16121
+ var isLazyScreen = lazy && Math.abs(selectedTabIndex - index) > lazyPreloadDistance;
16122
+ return /*#__PURE__*/React.createElement(TabScreen$1, {
14236
16123
  key: key,
14237
16124
  testID: testID ? "tab-screen-".concat(testID) : undefined,
14238
16125
  pointerEvents: active ? 'auto' : 'none',
14239
16126
  accessibilityElementsHidden: !active,
14240
16127
  importantForAccessibility: active ? 'auto' : 'no-hide-descendants',
14241
- collapsable: false,
14242
- removeClippedSubviews: // On iOS, set removeClippedSubviews to true only when not focused
14243
- // This is an workaround for a bug where the clipped view never re-appears.
14244
- isIOS ? selectedTabKey !== key : true,
14245
- themeVisibility: active
14246
- }, component);
16128
+ collapsable: false
16129
+ }, isLazyScreen ? null : component);
14247
16130
  })));
14248
16131
  };
14249
16132
 
14250
- export { Badge, BottomNavigation, Button, Card, Divider, index as FAB, Icon, Tabs, ThemeProvider, Typography, getTheme, scale, theme, useTheme };
16133
+ var index = Object.assign(Tabs, {
16134
+ Scroll: ScrollableTab
16135
+ });
16136
+
16137
+ var BACKGROUND_INTENTS = {
16138
+ success: 'successBackground',
16139
+ warning: 'warningBackground',
16140
+ danger: 'dangerBackground',
16141
+ info: 'infoBackground'
16142
+ };
16143
+ var StyledView = index$2(View)(function (_ref) {
16144
+ var themeIntent = _ref.themeIntent,
16145
+ theme = _ref.theme;
16146
+ return {
16147
+ borderWidth: theme.__hd__.tag.borderWidths["default"],
16148
+ borderRadius: theme.__hd__.tag.radii["default"],
16149
+ paddingVertical: theme.__hd__.tag.space.verticalPadding,
16150
+ paddingHorizontal: theme.__hd__.tag.space.horizontalPadding,
16151
+ borderColor: theme.__hd__.tag.colors[themeIntent],
16152
+ backgroundColor: theme.__hd__.tag.colors[BACKGROUND_INTENTS[themeIntent]]
16153
+ };
16154
+ });
16155
+ var StyledText = index$2(Text$1)(function (_ref2) {
16156
+ var themeIntent = _ref2.themeIntent,
16157
+ theme = _ref2.theme;
16158
+ return {
16159
+ fontFamily: theme.__hd__.tag.fonts["default"],
16160
+ fontSize: theme.__hd__.tag.fontSizes["default"],
16161
+ color: theme.__hd__.tag.colors[themeIntent],
16162
+ includeFontPadding: false,
16163
+ textAlignVertical: 'center',
16164
+ textAlign: 'center'
16165
+ };
16166
+ });
16167
+
16168
+ var _excluded = ["content", "intent", "style", "testID"];
16169
+
16170
+ var Tag = function Tag(_ref) {
16171
+ var content = _ref.content,
16172
+ _ref$intent = _ref.intent,
16173
+ intent = _ref$intent === void 0 ? 'info' : _ref$intent,
16174
+ style = _ref.style,
16175
+ testID = _ref.testID,
16176
+ nativeProps = _objectWithoutProperties$1(_ref, _excluded);
16177
+
16178
+ return /*#__PURE__*/React.createElement(StyledView, _extends$3({}, nativeProps, {
16179
+ themeIntent: intent,
16180
+ style: style,
16181
+ testID: testID
16182
+ }), /*#__PURE__*/React.createElement(StyledText, {
16183
+ themeIntent: intent
16184
+ }, content));
16185
+ };
16186
+
16187
+ export { Avatar, Badge$1 as Badge, BottomNavigation, CompoundButton as Button, Card, Collapse, Divider, Drawer, index$1 as FAB, Icon, Progress, index as Tabs, Tag, ThemeProvider, Typography, getTheme, scale, theme, useTheme };