@draftbit/core 46.7.3 → 46.7.5

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 (174) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
  3. package/lib/commonjs/components/AvatarEdit.js +4 -15
  4. package/lib/commonjs/components/Button.js +12 -35
  5. package/lib/commonjs/components/Checkbox/Checkbox.js +4 -22
  6. package/lib/commonjs/components/Container.js +4 -15
  7. package/lib/commonjs/components/DeprecatedButton.js +3 -20
  8. package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -15
  9. package/lib/commonjs/components/Elevation.js +14 -2
  10. package/lib/commonjs/components/IconButton.js +4 -2
  11. package/lib/commonjs/components/Image.js +2 -17
  12. package/lib/commonjs/components/NumberInput.js +1 -1
  13. package/lib/commonjs/components/Picker/Picker.js +4 -9
  14. package/lib/commonjs/components/Portal/PortalHost.js +15 -44
  15. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  16. package/lib/commonjs/components/Pressable.js +2 -2
  17. package/lib/commonjs/components/ProgressBar.js +7 -37
  18. package/lib/commonjs/components/Slider.js +4 -21
  19. package/lib/commonjs/components/Surface.js +2 -14
  20. package/lib/commonjs/components/TextField.js +28 -76
  21. package/lib/commonjs/components/Touchable.js +4 -17
  22. package/lib/commonjs/constants.js +1 -1
  23. package/lib/commonjs/hooks.js +2 -1
  24. package/lib/commonjs/index.js +0 -56
  25. package/lib/commonjs/mappings/Button.js +2 -2
  26. package/lib/commonjs/mappings/FlashList.js +28 -0
  27. package/lib/commonjs/mappings/FlatList.js +14 -0
  28. package/lib/commonjs/mappings/IconButton.js +4 -6
  29. package/lib/commonjs/mappings/MapView.js +3 -1
  30. package/lib/commonjs/mappings/ScrollView.js +7 -1
  31. package/lib/commonjs/mappings/Touchable.js +9 -2
  32. package/lib/commonjs/styles/overlay.js +1 -3
  33. package/lib/commonjs/utilities.js +2 -1
  34. package/lib/module/components/Button.js +12 -35
  35. package/lib/module/components/Checkbox/CheckboxGroupRow.js +5 -24
  36. package/lib/module/components/Checkbox/context.js +1 -1
  37. package/lib/module/components/CircleImage.js +1 -16
  38. package/lib/module/components/DeprecatedCardWrapper.js +1 -18
  39. package/lib/module/components/Divider.js +1 -18
  40. package/lib/module/components/Elevation.js +2 -14
  41. package/lib/module/components/FieldSearchBarFull.js +2 -1
  42. package/lib/module/components/FormRow.js +2 -17
  43. package/lib/module/components/IconButton.js +4 -2
  44. package/lib/module/components/Image.js +2 -18
  45. package/lib/module/components/Layout.js +21 -42
  46. package/lib/module/components/NumberInput.js +4 -13
  47. package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
  48. package/lib/module/components/Portal/PortalConsumer.js +7 -22
  49. package/lib/module/components/Pressable.js +2 -2
  50. package/lib/module/components/RadioButton/RadioButton.js +1 -13
  51. package/lib/module/components/RadioButton/RadioButtonGroup.js +2 -16
  52. package/lib/module/components/RadioButton/RadioButtonRow.js +5 -24
  53. package/lib/module/components/Slider.js +4 -21
  54. package/lib/module/components/StepIndicator.js +18 -58
  55. package/lib/module/components/TextField.js +28 -78
  56. package/lib/module/components/ToggleButton.js +2 -16
  57. package/lib/module/components/Touchable.js +4 -17
  58. package/lib/module/constants.js +2 -1
  59. package/lib/module/index.js +0 -8
  60. package/lib/module/mappings/Button.js +2 -2
  61. package/lib/module/mappings/FieldSearchBarFull.js +1 -4
  62. package/lib/module/mappings/FlashList.js +29 -1
  63. package/lib/module/mappings/FlatList.js +15 -1
  64. package/lib/module/mappings/IconButton.js +5 -7
  65. package/lib/module/mappings/MapView.js +3 -1
  66. package/lib/module/mappings/ScrollView.js +8 -2
  67. package/lib/module/mappings/Touchable.js +10 -3
  68. package/lib/module/styles/overlay.js +3 -1
  69. package/lib/module/utilities.js +2 -1
  70. package/lib/typescript/src/components/IconButton.d.ts +2 -0
  71. package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
  72. package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
  73. package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
  74. package/lib/typescript/src/index.d.ts +0 -8
  75. package/lib/typescript/src/index.d.ts.map +1 -1
  76. package/lib/typescript/src/mappings/FlashList.d.ts +60 -0
  77. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  78. package/lib/typescript/src/mappings/FlatList.d.ts +30 -0
  79. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  80. package/lib/typescript/src/mappings/IconButton.d.ts +20 -10
  81. package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
  82. package/lib/typescript/src/mappings/MapView.d.ts +2 -0
  83. package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
  84. package/lib/typescript/src/mappings/ScrollView.d.ts +21 -0
  85. package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
  86. package/lib/typescript/src/mappings/Touchable.d.ts +20 -0
  87. package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
  88. package/package.json +3 -3
  89. package/src/components/Button.js +1 -1
  90. package/src/components/Button.tsx +2 -2
  91. package/src/components/IconButton.js +2 -2
  92. package/src/components/IconButton.tsx +6 -2
  93. package/src/components/NumberInput.js +1 -1
  94. package/src/components/NumberInput.tsx +1 -1
  95. package/src/components/Pressable.js +1 -1
  96. package/src/components/Pressable.tsx +2 -2
  97. package/src/components/Touchable.js +1 -1
  98. package/src/components/Touchable.tsx +2 -2
  99. package/src/index.js +0 -8
  100. package/src/index.tsx +0 -8
  101. package/src/mappings/Button.js +2 -2
  102. package/src/mappings/Button.ts +2 -2
  103. package/src/mappings/FlashList.js +29 -1
  104. package/src/mappings/FlashList.ts +33 -0
  105. package/src/mappings/FlatList.js +15 -1
  106. package/src/mappings/FlatList.ts +17 -0
  107. package/src/mappings/IconButton.js +5 -7
  108. package/src/mappings/IconButton.ts +5 -7
  109. package/src/mappings/MapView.js +2 -0
  110. package/src/mappings/MapView.ts +2 -0
  111. package/src/mappings/ScrollView.js +8 -2
  112. package/src/mappings/ScrollView.ts +10 -1
  113. package/src/mappings/Touchable.js +10 -3
  114. package/src/mappings/Touchable.ts +12 -2
  115. package/lib/commonjs/components/CardBlock.js +0 -115
  116. package/lib/commonjs/components/CardContainer.js +0 -138
  117. package/lib/commonjs/components/CardContainerRating.js +0 -133
  118. package/lib/commonjs/components/CardContainerShortImage.js +0 -84
  119. package/lib/commonjs/components/CardInline.js +0 -91
  120. package/lib/commonjs/components/Carousel.js +0 -130
  121. package/lib/commonjs/components/Header.js +0 -82
  122. package/lib/commonjs/components/HeaderLarge.js +0 -38
  123. package/lib/commonjs/components/HeaderMedium.js +0 -38
  124. package/lib/commonjs/components/HeaderOverline.js +0 -39
  125. package/lib/module/components/CardBlock.js +0 -108
  126. package/lib/module/components/CardContainer.js +0 -121
  127. package/lib/module/components/CardContainerRating.js +0 -135
  128. package/lib/module/components/CardContainerShortImage.js +0 -90
  129. package/lib/module/components/CardInline.js +0 -82
  130. package/lib/module/components/Carousel.js +0 -120
  131. package/lib/module/components/Header.js +0 -72
  132. package/lib/module/components/HeaderLarge.js +0 -28
  133. package/lib/module/components/HeaderMedium.js +0 -28
  134. package/lib/module/components/HeaderOverline.js +0 -29
  135. package/lib/typescript/src/components/CardBlock.d.ts +0 -21
  136. package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
  137. package/lib/typescript/src/components/CardContainer.d.ts +0 -23
  138. package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
  139. package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
  140. package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
  141. package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
  142. package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
  143. package/lib/typescript/src/components/CardInline.d.ts +0 -20
  144. package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
  145. package/lib/typescript/src/components/Carousel.d.ts +0 -15
  146. package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
  147. package/lib/typescript/src/components/Header.d.ts +0 -20
  148. package/lib/typescript/src/components/Header.d.ts.map +0 -1
  149. package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
  150. package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
  151. package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
  152. package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
  153. package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
  154. package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
  155. package/src/components/CardBlock.js +0 -54
  156. package/src/components/CardBlock.tsx +0 -127
  157. package/src/components/CardContainer.js +0 -69
  158. package/src/components/CardContainer.tsx +0 -165
  159. package/src/components/CardContainerRating.js +0 -79
  160. package/src/components/CardContainerRating.tsx +0 -175
  161. package/src/components/CardContainerShortImage.js +0 -33
  162. package/src/components/CardContainerShortImage.tsx +0 -101
  163. package/src/components/CardInline.js +0 -36
  164. package/src/components/CardInline.tsx +0 -93
  165. package/src/components/Carousel.js +0 -68
  166. package/src/components/Carousel.tsx +0 -134
  167. package/src/components/Header.js +0 -44
  168. package/src/components/Header.tsx +0 -105
  169. package/src/components/HeaderLarge.js +0 -7
  170. package/src/components/HeaderLarge.tsx +0 -40
  171. package/src/components/HeaderMedium.js +0 -7
  172. package/src/components/HeaderMedium.tsx +0 -41
  173. package/src/components/HeaderOverline.js +0 -7
  174. package/src/components/HeaderOverline.tsx +0 -42
@@ -12,6 +12,7 @@ var _theming = require("../../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
16
  const AccordionItem = _ref => {
16
17
  let {
17
18
  Icon,
@@ -26,10 +27,9 @@ const AccordionItem = _ref => {
26
27
  textStyles,
27
28
  viewStyles
28
29
  } = (0, _utilities.extractStyles)(style);
29
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
30
- style: [styles.container, viewStyles],
31
- ...rest
32
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
30
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
31
+ style: [styles.container, viewStyles]
32
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
33
33
  style: styles.row
34
34
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
35
35
  name: icon,
@@ -61,23 +61,4 @@ const styles = _reactNative.StyleSheet.create({
61
61
  }
62
62
  });
63
63
  var _default = (0, _theming.withTheme)(AccordionItem);
64
- exports.default = _default;.StyleSheet.create({
65
- container: {
66
- padding: 8
67
- },
68
- row: {
69
- flexDirection: "row",
70
- alignItems: "center",
71
- paddingLeft: 8
72
- },
73
- item: {
74
- marginVertical: 6,
75
- paddingLeft: 8
76
- },
77
- content: {
78
- flex: 1,
79
- justifyContent: "center"
80
- }
81
- });
82
- var _default = (0, _theming.withTheme)(AccordionItem);
83
64
  exports.default = _default;
@@ -10,6 +10,7 @@ var _CircularProgress = _interopRequireDefault(require("./CircularProgress"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
14
  const AnimatedProgress = _reactNative.Animated.createAnimatedComponent(_CircularProgress.default);
14
15
  const AnimatedCircularProgress = _ref => {
15
16
  let {
@@ -54,18 +55,6 @@ const AnimatedCircularProgress = _ref => {
54
55
  React.useEffect(() => {
55
56
  animate();
56
57
  }, [fill, animate]);
57
- return /*#__PURE__*/React.createElement(AnimatedProgress, {
58
- ...other,
59
- style: other.style,
60
- childrenContainerStyle: other.childrenContainerStyle,
61
- fill: fillAnimation,
62
- tintColor: animateColor()
63
- });
64
- };
65
- var _default = AnimatedCircularProgress;
66
- exports.default = _default;ect(() => {
67
- animate();
68
- }, [fill, animate]);
69
58
  return /*#__PURE__*/React.createElement(AnimatedProgress, _extends({}, other, {
70
59
  style: other.style,
71
60
  childrenContainerStyle: other.childrenContainerStyle,
@@ -12,6 +12,7 @@ var _theming = require("../theming");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
16
  const AvatarEdit = _ref => {
16
17
  let {
17
18
  Icon,
@@ -31,10 +32,9 @@ const AvatarEdit = _ref => {
31
32
  width: size,
32
33
  height: size
33
34
  };
34
- return /*#__PURE__*/React.createElement(_reactNative.View, {
35
- style: [style, dimensions],
36
- ...rest
37
- }, /*#__PURE__*/React.createElement(_Touchable.default, {
35
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
36
+ style: [style, dimensions]
37
+ }, rest), /*#__PURE__*/React.createElement(_Touchable.default, {
38
38
  onPress: onPress
39
39
  }, /*#__PURE__*/React.createElement(_CircleImage.default, {
40
40
  source: image,
@@ -56,15 +56,4 @@ const AvatarEdit = _ref => {
56
56
  }))));
57
57
  };
58
58
  var _default = (0, _theming.withTheme)(AvatarEdit);
59
- exports.default = _default;r: colorStyles.editBackgroundColor,
60
- borderRadius: size * (3 / 16),
61
- padding: size * (3 / 32)
62
- }
63
- }, /*#__PURE__*/React.createElement(Icon, {
64
- name: "MaterialIcons/edit",
65
- color: colorStyles.editIconColor,
66
- size: size * (3 / 16)
67
- }))));
68
- };
69
- var _default = (0, _theming.withTheme)(AvatarEdit);
70
59
  exports.default = _default;
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
9
9
  var _theming = require("../theming");
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
12
13
  const CONSTANTS = {
13
14
  baseHeight: 42,
14
15
  borderRadius: 4,
@@ -23,8 +24,8 @@ function Base(_ref) {
23
24
  loading,
24
25
  disabled,
25
26
  style,
26
- activeOpacity,
27
- disabledOpacity,
27
+ activeOpacity = 0.8,
28
+ disabledOpacity = 0.8,
28
29
  ...props
29
30
  } = _ref;
30
31
  const {
@@ -60,7 +61,7 @@ function Base(_ref) {
60
61
  if (textAlign === "right") {
61
62
  buttonStyles.justifyContent = "flex-end";
62
63
  }
63
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
64
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
64
65
  disabled: disabled || loading,
65
66
  style: _ref2 => {
66
67
  let {
@@ -69,9 +70,8 @@ function Base(_ref) {
69
70
  return [styles.base, {
70
71
  opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1
71
72
  }, buttonStyles];
72
- },
73
- ...props
74
- }, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
73
+ }
74
+ }, props), loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
75
75
  size: "small",
76
76
  color: color,
77
77
  style: styles.loading
@@ -90,14 +90,13 @@ const Solid = _ref3 => {
90
90
  theme,
91
91
  ...props
92
92
  } = _ref3;
93
- return /*#__PURE__*/React.createElement(Base, {
93
+ return /*#__PURE__*/React.createElement(Base, _extends({
94
94
  style: [{
95
95
  color: "#FFF",
96
96
  borderRadius: theme.roundness,
97
97
  backgroundColor: theme.colors.primary
98
- }, style],
99
- ...props
100
- });
98
+ }, style]
99
+ }, props));
101
100
  };
102
101
  const ButtonSolid = (0, _theming.withTheme)(Solid);
103
102
  exports.ButtonSolid = ButtonSolid;
@@ -109,14 +108,13 @@ const Outline = _ref4 => {
109
108
  theme,
110
109
  ...props
111
110
  } = _ref4;
112
- return /*#__PURE__*/React.createElement(Base, {
111
+ return /*#__PURE__*/React.createElement(Base, _extends({
113
112
  style: [styles.outline, {
114
113
  borderRadius: theme.roundness,
115
114
  borderColor: theme.colors.primary,
116
115
  color: theme.colors.primary
117
- }, style],
118
- ...props
119
- });
116
+ }, style]
117
+ }, props));
120
118
  };
121
119
  const ButtonOutline = (0, _theming.withTheme)(Outline);
122
120
  exports.ButtonOutline = ButtonOutline;
@@ -163,25 +161,4 @@ const styles = _reactNative.StyleSheet.create({
163
161
  }
164
162
  })
165
163
  }
166
- });ent",
167
- padding: 0,
168
- minHeight: undefined
169
- },
170
- loading: {
171
- marginRight: 6
172
- },
173
- icon: {
174
- ..._reactNative.Platform.select({
175
- web: {
176
- marginTop: 1,
177
- marginRight: 4,
178
- alignSelf: "center"
179
- },
180
- default: {
181
- marginBottom: 2,
182
- marginRight: 4,
183
- alignSelf: "center"
184
- }
185
- })
186
- }
187
164
  });
@@ -10,6 +10,7 @@ var _theming = require("../../theming");
10
10
  var _hooks = require("../../hooks");
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
14
  const Checkbox = _ref => {
14
15
  let {
15
16
  Icon,
@@ -33,6 +34,7 @@ const Checkbox = _ref => {
33
34
  setInternalValue(status);
34
35
  }
35
36
  }, [status]);
37
+
36
38
  // This special logic is to handle weird APIs like Airtable that return
37
39
  // true or undefined for a boolean
38
40
  const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
@@ -56,8 +58,7 @@ const Checkbox = _ref => {
56
58
  onUncheck === null || onUncheck === void 0 ? void 0 : onUncheck();
57
59
  }
58
60
  };
59
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
60
- ...rest,
61
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
61
62
  onPress: handlePress,
62
63
  disabled: disabled,
63
64
  accessibilityState: {
@@ -69,7 +70,7 @@ const Checkbox = _ref => {
69
70
  width: size,
70
71
  height: size
71
72
  }]
72
- }, /*#__PURE__*/React.createElement(Icon, {
73
+ }), /*#__PURE__*/React.createElement(Icon, {
73
74
  style: styles.icon,
74
75
  name: internalValue ? checkedIcon : uncheckedIcon,
75
76
  size: size,
@@ -103,23 +104,4 @@ const styles = _reactNative.StyleSheet.create({
103
104
  }
104
105
  });
105
106
  var _default = Checkbox;
106
- exports.default = _default; styles = _reactNative.StyleSheet.create({
107
- container: {
108
- borderRadius: 18
109
- },
110
- fillContainer: {
111
- alignItems: "center",
112
- justifyContent: "center"
113
- },
114
- icon: {
115
- alignSelf: "center"
116
- },
117
- fill: {
118
- borderRadius: 5,
119
- width: 30,
120
- height: 30,
121
- alignSelf: "center"
122
- }
123
- });
124
- var _default = Checkbox;
125
107
  exports.default = _default;
@@ -11,6 +11,7 @@ var _Elevation = _interopRequireDefault(require("./Elevation"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
15
  const Container = _ref => {
15
16
  let {
16
17
  useThemeGutterPadding,
@@ -72,10 +73,9 @@ const Container = _ref => {
72
73
  };
73
74
  const Wrap = elevation ? _Elevation.default : _reactNative.View;
74
75
  if (elevation) containerStyle.elevation = elevation;
75
- return /*#__PURE__*/React.createElement(Wrap, {
76
- style: [containerStyle, style],
77
- ...rest
78
- }, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
76
+ return /*#__PURE__*/React.createElement(Wrap, _extends({
77
+ style: [containerStyle, style]
78
+ }, rest), backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
79
79
  source: typeof backgroundImage === "string" ? {
80
80
  uri: backgroundImage
81
81
  } : backgroundImage,
@@ -90,15 +90,4 @@ const Container = _ref => {
90
90
  }, children));
91
91
  };
92
92
  var _default = (0, _theming.withTheme)(Container);
93
- exports.default = _default;sizeMode: backgroundImageResizeMode,
94
- style: {
95
- flex: 1
96
- }
97
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
98
- style: innerStyle
99
- }, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
100
- style: innerStyle
101
- }, children));
102
- };
103
- var _default = (0, _theming.withTheme)(Container);
104
93
  exports.default = _default;
@@ -13,6 +13,7 @@ var _theming = require("../theming");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
17
  const Button = _ref => {
17
18
  let {
18
19
  Icon,
@@ -83,8 +84,7 @@ const Button = _ref => {
83
84
  elevation,
84
85
  alignSelf: "stretch"
85
86
  }
86
- }, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
87
- ...rest,
87
+ }, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
88
88
  onPress: onPress,
89
89
  accessibilityState: {
90
90
  disabled
@@ -92,7 +92,7 @@ const Button = _ref => {
92
92
  accessibilityRole: "button",
93
93
  disabled: disabled || loading,
94
94
  style: [styles.button, buttonStyle]
95
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
95
+ }), /*#__PURE__*/React.createElement(_reactNative.View, {
96
96
  style: styles.content
97
97
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
98
98
  style: iconStyle
@@ -124,21 +124,4 @@ const styles = _reactNative.StyleSheet.create({
124
124
  }
125
125
  });
126
126
  var _default = (0, _theming.withTheme)(Button);
127
- exports.default = _default;;
128
- };
129
- const styles = _reactNative.StyleSheet.create({
130
- button: {
131
- minWidth: 64,
132
- borderStyle: "solid"
133
- },
134
- content: {
135
- flexDirection: "row",
136
- alignItems: "center",
137
- justifyContent: "center"
138
- },
139
- icon: {
140
- width: _Config.default.buttonIconSize
141
- }
142
- });
143
- var _default = (0, _theming.withTheme)(Button);
144
127
  exports.default = _default;
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _theming = require("../theming");
9
9
  var _Touchable = _interopRequireDefault(require("./Touchable"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
11
12
  const getWidth = numColumns => {
12
13
  switch (numColumns) {
13
14
  case 1:
@@ -27,21 +28,6 @@ const Card = _ref => {
27
28
  ...rest
28
29
  } = _ref;
29
30
  const width = getWidth(numColumns);
30
- return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
31
- disabled: !onPress,
32
- onPress: onPress,
33
- style: [style, {
34
- width
35
- }],
36
- ...rest
37
- }, children);
38
- };
39
- var _default = (0, _theming.withTheme)(Card);
40
- exports.default = _default;s,
41
- style,
42
- ...rest
43
- } = _ref;
44
- const width = getWidth(numColumns);
45
31
  return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
46
32
  disabled: !onPress,
47
33
  onPress: onPress,
@@ -11,7 +11,6 @@ var _theming = require("../theming");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
13
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
14
  /* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
16
15
  const Elevation = _ref => {
17
16
  let {
@@ -28,11 +27,24 @@ const Elevation = _ref => {
28
27
  colors
29
28
  } = theme;
30
29
  const borderRadius = radius;
31
- return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
30
+ return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
31
+ ...rest,
32
32
  style: [{
33
33
  borderRadius,
34
34
  backgroundColor: colors.surface
35
35
  }, elevation ? (0, _shadow.default)(elevation) : null, style]
36
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
37
+ style: {
38
+ overflow: "hidden",
39
+ borderRadius
40
+ }
41
+ }, children));
42
+ };
43
+ var _default = (0, _theming.withTheme)(Elevation);
44
+ exports.default = _default;
45
+ borderRadius,
46
+ backgroundColor: colors.surface
47
+ }, elevation ? (0, _shadow.default)(elevation) : null, style]
36
48
  }), /*#__PURE__*/React.createElement(_reactNative.View, {
37
49
  style: {
38
50
  overflow: "hidden",
@@ -16,11 +16,13 @@ const IconButton = _ref => {
16
16
  icon,
17
17
  color: customColor,
18
18
  size = 32,
19
- disabled = false,
19
+ disabled,
20
20
  loading = false,
21
21
  onPress,
22
22
  theme,
23
23
  style,
24
+ activeOpacity = 0.8,
25
+ disabledOpacity = 0.8,
24
26
  ...props
25
27
  } = _ref;
26
28
  const iconColor = customColor || theme.colors.primary;
@@ -32,7 +34,7 @@ const IconButton = _ref => {
32
34
  pressed
33
35
  } = _ref2;
34
36
  return [styles.container, {
35
- opacity: pressed || disabled ? 0.75 : 1,
37
+ opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
36
38
  width: size,
37
39
  height: size,
38
40
  alignItems: "center",
@@ -9,8 +9,7 @@ var _reactNative = require("react-native");
9
9
  var _Config = _interopRequireDefault(require("./Config"));
10
10
  var _AspectRatio = _interopRequireDefault(require("./AspectRatio"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- /* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
13
-
12
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
13
  const generateDimensions = _ref => {
15
14
  let {
16
15
  aspectRatio,
@@ -63,27 +62,13 @@ const Image = _ref2 => {
63
62
  height,
64
63
  aspectRatio
65
64
  }]
66
- }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
67
- ...props,
65
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, _extends({}, props, {
68
66
  source: imageSource,
69
67
  resizeMode: resizeMode,
70
68
  style: [style, {
71
69
  height: "100%",
72
70
  width: "100%"
73
71
  }]
74
- }));
75
- }
76
- return /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
77
- ...props,
78
- source: source,
79
- resizeMode: resizeMode,
80
- style: style
81
- });
82
- };
83
- var _default = Image;
84
- exports.default = _default; "100%",
85
- width: "100%"
86
- }]
87
72
  })));
88
73
  }
89
74
  return /*#__PURE__*/_react.default.createElement(_reactNative.Image, _extends({}, props, {
@@ -17,7 +17,7 @@ const NumberInput = _ref => {
17
17
  defaultValue,
18
18
  ...props
19
19
  } = _ref;
20
- const [currentStringNumberValue, setCurrentStringNumberValue] = (0, _react.useState)("0");
20
+ const [currentStringNumberValue, setCurrentStringNumberValue] = (0, _react.useState)("");
21
21
  const formatValueToStringNumber = valueToFormat => {
22
22
  if (valueToFormat != null) {
23
23
  if ((0, _lodash.isString)(valueToFormat) && valueToFormat !== "") {
@@ -46,6 +46,7 @@ const unstyledColor = "rgba(165, 173, 183, 1)";
46
46
  const disabledColor = "rgb(240, 240, 240)";
47
47
  const errorColor = "rgba(255, 69, 100, 1)";
48
48
  const Picker = _ref => {
49
+ var _find$label, _find;
49
50
  let {
50
51
  error,
51
52
  options = [],
@@ -67,7 +68,6 @@ const Picker = _ref => {
67
68
  rightIconName,
68
69
  type = "solid"
69
70
  } = _ref;
70
- var _a, _b;
71
71
  const androidPickerRef = React.useRef(undefined);
72
72
  const [internalValue, setInternalValue] = React.useState(value || defaultValue);
73
73
  const [pickerVisible, setPickerVisible] = React.useState(false);
@@ -85,9 +85,9 @@ const Picker = _ref => {
85
85
  }
86
86
  }, [defaultValue]);
87
87
  React.useEffect(() => {
88
- var _a;
89
88
  if (pickerVisible && androidPickerRef.current) {
90
- (_a = androidPickerRef === null || androidPickerRef === void 0 ? void 0 : androidPickerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
89
+ var _androidPickerRef$cur;
90
+ androidPickerRef === null || androidPickerRef === void 0 ? void 0 : (_androidPickerRef$cur = androidPickerRef.current) === null || _androidPickerRef$cur === void 0 ? void 0 : _androidPickerRef$cur.focus();
91
91
  }
92
92
  }, [pickerVisible, androidPickerRef]);
93
93
  const normalizedOptions = normalizeOptions(options);
@@ -137,7 +137,7 @@ const Picker = _ref => {
137
137
  ...extractedMarginStyles
138
138
  };
139
139
  const stylesWithoutBordersAndMargins = (0, _lodash.omit)(viewStyles, [..._utilities.borderStyleNames, ..._utilities.marginStyleNames, ...additionalBorderStyles, ...additionalMarginStyles]);
140
- const selectedLabel = internalValue && ((_b = (_a = pickerOptions.find(option => option.value === internalValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : internalValue);
140
+ const selectedLabel = internalValue && ((_find$label = (_find = pickerOptions.find(option => option.value === internalValue)) === null || _find === void 0 ? void 0 : _find.label) !== null && _find$label !== void 0 ? _find$label : internalValue);
141
141
  const labelText = label ? /*#__PURE__*/React.createElement(_reactNative.Text, {
142
142
  style: {
143
143
  textAlign: textStyles.textAlign,
@@ -324,9 +324,4 @@ const styles = _reactNative.StyleSheet.create({
324
324
  }
325
325
  });
326
326
  var _default = (0, _theming.withTheme)(Picker);
327
- exports.default = _default;: deviceWidth,
328
- maxHeight: deviceHeight
329
- }
330
- });
331
- var _default = (0, _theming.withTheme)(Picker);
332
327
  exports.default = _default;
@@ -10,7 +10,11 @@ var _PortalManager = _interopRequireDefault(require("./PortalManager"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
15
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
16
  const PortalContext = /*#__PURE__*/React.createContext(null);
17
+
14
18
  /**
15
19
  * Portal host renders all of its children `Portal` elements.
16
20
  * For example, you can wrap a screen in `Portal.Host` to render items above the screen.
@@ -39,10 +43,10 @@ exports.PortalContext = PortalContext;
39
43
  class PortalHost extends React.Component {
40
44
  constructor() {
41
45
  super(...arguments);
42
- this.setManager = manager => {
46
+ _defineProperty(this, "setManager", manager => {
43
47
  this.manager = manager;
44
- };
45
- this.mount = children => {
48
+ });
49
+ _defineProperty(this, "mount", children => {
46
50
  const key = this.nextKey++;
47
51
  if (this.manager) {
48
52
  this.manager.mount(key, children);
@@ -54,8 +58,8 @@ class PortalHost extends React.Component {
54
58
  });
55
59
  }
56
60
  return key;
57
- };
58
- this.update = (key, children) => {
61
+ });
62
+ _defineProperty(this, "update", (key, children) => {
59
63
  if (this.manager) {
60
64
  this.manager.update(key, children);
61
65
  } else {
@@ -72,8 +76,8 @@ class PortalHost extends React.Component {
72
76
  this.queue.push(op);
73
77
  }
74
78
  }
75
- };
76
- this.unmount = key => {
79
+ });
80
+ _defineProperty(this, "unmount", key => {
77
81
  if (this.manager) {
78
82
  this.manager.unmount(key);
79
83
  } else {
@@ -82,9 +86,10 @@ class PortalHost extends React.Component {
82
86
  key
83
87
  });
84
88
  }
85
- };
86
- this.nextKey = 0;
87
- this.queue = [];
89
+ });
90
+ _defineProperty(this, "nextKey", 0);
91
+ _defineProperty(this, "queue", []);
92
+ _defineProperty(this, "manager", void 0);
88
93
  }
89
94
  componentDidMount() {
90
95
  const manager = this.manager;
@@ -123,40 +128,6 @@ class PortalHost extends React.Component {
123
128
  }
124
129
  }
125
130
  exports.default = PortalHost;
126
- PortalHost.displayName = "Portal.Host";
127
- const styles = _reactNative.StyleSheet.create({
128
- container: {
129
- flex: 1
130
- }
131
- });nager.mount(action.key, action.children);
132
- break;
133
- case "update":
134
- manager.update(action.key, action.children);
135
- break;
136
- case "unmount":
137
- manager.unmount(action.key);
138
- break;
139
- }
140
- }
141
- }
142
- }
143
- render() {
144
- return /*#__PURE__*/React.createElement(PortalContext.Provider, {
145
- value: {
146
- mount: this.mount,
147
- update: this.update,
148
- unmount: this.unmount
149
- }
150
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
151
- style: styles.container,
152
- collapsable: false,
153
- pointerEvents: "box-none"
154
- }, this.props.children), /*#__PURE__*/React.createElement(_PortalManager.default, {
155
- ref: this.setManager
156
- }));
157
- }
158
- }
159
- exports.default = PortalHost;
160
131
  _defineProperty(PortalHost, "displayName", "Portal.Host");
161
132
  const styles = _reactNative.StyleSheet.create({
162
133
  container: {