@draftbit/core 46.10.3-e89832.2 → 46.10.3-fb35c9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
  2. package/lib/commonjs/components/AvatarEdit.js +4 -15
  3. package/lib/commonjs/components/Banner.js +4 -23
  4. package/lib/commonjs/components/Button.js +10 -33
  5. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +5 -23
  6. package/lib/commonjs/components/DeprecatedButton.js +3 -20
  7. package/lib/commonjs/components/Divider.js +1 -14
  8. package/lib/commonjs/components/FieldSearchBarFull.js +2 -1
  9. package/lib/commonjs/components/Layout.js +19 -40
  10. package/lib/commonjs/components/NumberInput.js +3 -12
  11. package/lib/commonjs/components/Picker/PickerComponent.android.js +3 -20
  12. package/lib/commonjs/components/Portal/PortalConsumer.js +7 -22
  13. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  14. package/lib/commonjs/components/RadioButton/RadioButton.js +2 -13
  15. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +1 -9
  16. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +2 -15
  17. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +5 -23
  18. package/lib/commonjs/components/ScreenContainer.js +6 -24
  19. package/lib/commonjs/components/Shadow.js +2 -15
  20. package/lib/commonjs/components/Slider.js +4 -21
  21. package/lib/commonjs/components/StarRating.js +4 -23
  22. package/lib/commonjs/components/StepIndicator.js +18 -57
  23. package/lib/commonjs/components/Surface.js +2 -14
  24. package/lib/commonjs/components/TabView/TabView.js +7 -13
  25. package/lib/commonjs/components/Table/Table.js +123 -0
  26. package/lib/commonjs/components/Table/TableCell.js +49 -0
  27. package/lib/commonjs/components/Table/TableCommon.js +30 -0
  28. package/lib/commonjs/components/Table/TableRow.js +61 -0
  29. package/lib/commonjs/components/Table/index.js +27 -0
  30. package/lib/commonjs/components/Text.js +4 -50
  31. package/lib/commonjs/components/TextField.js +28 -76
  32. package/lib/commonjs/components/ToggleButton.js +2 -15
  33. package/lib/commonjs/components/Touchable.js +2 -15
  34. package/lib/commonjs/constants.js +1 -1
  35. package/lib/commonjs/index.js +19 -28
  36. package/lib/commonjs/mappings/NativeBase/Layout.js +108 -0
  37. package/lib/commonjs/mappings/Table.js +140 -0
  38. package/lib/commonjs/styles/overlay.js +3 -1
  39. package/lib/commonjs/utilities.js +2 -1
  40. package/lib/module/components/Portal/PortalManager.js +33 -7
  41. package/lib/module/components/Table/Table.js +114 -0
  42. package/lib/module/components/Table/TableCell.js +41 -0
  43. package/lib/module/components/Table/TableCommon.js +21 -0
  44. package/lib/module/components/Table/TableRow.js +53 -0
  45. package/lib/module/components/Table/index.js +3 -0
  46. package/lib/module/index.js +1 -4
  47. package/lib/module/mappings/NativeBase/Layout.js +101 -0
  48. package/lib/module/mappings/Table.js +133 -0
  49. package/lib/typescript/src/components/Table/Table.d.ts +19 -0
  50. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
  51. package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
  52. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
  53. package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
  54. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
  55. package/lib/typescript/src/components/{DeprecatedCardWrapper.d.ts → Table/TableRow.d.ts} +7 -8
  56. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
  57. package/lib/typescript/src/components/Table/index.d.ts +4 -0
  58. package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
  59. package/lib/typescript/src/index.d.ts +1 -4
  60. package/lib/typescript/src/index.d.ts.map +1 -1
  61. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +133 -0
  62. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  63. package/lib/typescript/src/mappings/{CardBlock.d.ts → Table.d.ts} +129 -81
  64. package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
  65. package/package.json +3 -3
  66. package/src/components/Table/Table.js +93 -0
  67. package/src/components/Table/Table.tsx +176 -0
  68. package/src/components/Table/TableCell.js +31 -0
  69. package/src/components/Table/TableCell.tsx +63 -0
  70. package/src/components/Table/TableCommon.js +12 -0
  71. package/src/components/Table/TableCommon.ts +40 -0
  72. package/src/components/Table/TableRow.js +37 -0
  73. package/src/components/Table/TableRow.tsx +77 -0
  74. package/src/components/Table/index.js +3 -0
  75. package/src/components/Table/index.tsx +3 -0
  76. package/src/index.js +1 -4
  77. package/src/index.tsx +2 -4
  78. package/src/mappings/NativeBase/Layout.js +124 -0
  79. package/src/mappings/NativeBase/Layout.ts +145 -0
  80. package/src/mappings/Table.js +150 -0
  81. package/src/mappings/Table.ts +170 -0
  82. package/lib/commonjs/components/Container.js +0 -104
  83. package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -40
  84. package/lib/commonjs/components/DeprecatedFAB.js +0 -157
  85. package/lib/commonjs/components/ProgressIndicator.js +0 -55
  86. package/lib/commonjs/components/ResizeMode.js +0 -5
  87. package/lib/commonjs/components/Row.js +0 -73
  88. package/lib/commonjs/components/RowBodyIcon.js +0 -45
  89. package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
  90. package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
  91. package/lib/commonjs/mappings/CardBlock.js +0 -126
  92. package/lib/commonjs/mappings/CardContainer.js +0 -108
  93. package/lib/commonjs/mappings/CardContainerRating.js +0 -130
  94. package/lib/commonjs/mappings/CardContainerShortImage.js +0 -124
  95. package/lib/commonjs/mappings/CardInline.js +0 -59
  96. package/lib/commonjs/mappings/Container.js +0 -37
  97. package/lib/commonjs/mappings/ProgressIndicator.js +0 -188
  98. package/lib/module/components/Container.js +0 -83
  99. package/lib/module/components/DeprecatedCardWrapper.js +0 -32
  100. package/lib/module/components/DeprecatedFAB.js +0 -147
  101. package/lib/module/components/ProgressIndicator.js +0 -45
  102. package/lib/module/components/ResizeMode.js +0 -1
  103. package/lib/module/components/Row.js +0 -63
  104. package/lib/module/components/RowBodyIcon.js +0 -35
  105. package/lib/module/components/RowHeadlineImageCaption.js +0 -35
  106. package/lib/module/components/RowHeadlineImageIcon.js +0 -41
  107. package/lib/module/mappings/CardBlock.js +0 -119
  108. package/lib/module/mappings/CardContainer.js +0 -101
  109. package/lib/module/mappings/CardContainerRating.js +0 -123
  110. package/lib/module/mappings/CardContainerShortImage.js +0 -117
  111. package/lib/module/mappings/CardInline.js +0 -52
  112. package/lib/module/mappings/Container.js +0 -30
  113. package/lib/module/mappings/ProgressIndicator.js +0 -181
  114. package/lib/typescript/src/components/Container.d.ts +0 -21
  115. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  116. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
  117. package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
  118. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
  119. package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
  120. package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
  121. package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
  122. package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
  123. package/lib/typescript/src/components/Row.d.ts +0 -21
  124. package/lib/typescript/src/components/Row.d.ts.map +0 -1
  125. package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
  126. package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
  127. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
  128. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
  129. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
  130. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
  131. package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
  132. package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
  133. package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
  134. package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
  135. package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
  136. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
  137. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
  138. package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
  139. package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
  140. package/lib/typescript/src/mappings/Container.d.ts +0 -55
  141. package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
  142. package/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
  143. package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
  144. package/src/components/Container.js +0 -43
  145. package/src/components/Container.tsx +0 -116
  146. package/src/components/DeprecatedCardWrapper.js +0 -18
  147. package/src/components/DeprecatedCardWrapper.tsx +0 -46
  148. package/src/components/DeprecatedFAB.js +0 -114
  149. package/src/components/DeprecatedFAB.tsx +0 -231
  150. package/src/components/ProgressIndicator.js +0 -27
  151. package/src/components/ProgressIndicator.tsx +0 -71
  152. package/src/components/ResizeMode.js +0 -1
  153. package/src/components/ResizeMode.ts +0 -7
  154. package/src/components/Row.js +0 -48
  155. package/src/components/Row.tsx +0 -108
  156. package/src/components/RowBodyIcon.js +0 -8
  157. package/src/components/RowBodyIcon.tsx +0 -47
  158. package/src/components/RowHeadlineImageCaption.js +0 -12
  159. package/src/components/RowHeadlineImageCaption.tsx +0 -49
  160. package/src/components/RowHeadlineImageIcon.js +0 -14
  161. package/src/components/RowHeadlineImageIcon.tsx +0 -61
  162. package/src/mappings/CardBlock.js +0 -123
  163. package/src/mappings/CardBlock.ts +0 -136
  164. package/src/mappings/CardContainer.js +0 -104
  165. package/src/mappings/CardContainer.ts +0 -116
  166. package/src/mappings/CardContainerRating.js +0 -126
  167. package/src/mappings/CardContainerRating.ts +0 -137
  168. package/src/mappings/CardContainerShortImage.js +0 -120
  169. package/src/mappings/CardContainerShortImage.ts +0 -130
  170. package/src/mappings/CardInline.js +0 -52
  171. package/src/mappings/CardInline.ts +0 -61
  172. package/src/mappings/Container.js +0 -30
  173. package/src/mappings/Container.ts +0 -41
  174. package/src/mappings/ProgressIndicator.js +0 -181
  175. package/src/mappings/ProgressIndicator.ts +0 -190
@@ -8,54 +8,28 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  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); }
10
10
  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; }
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ 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); }
11
14
  /**
12
15
  * Portal host is the component which actually renders all Portals.
13
16
  */
14
17
  class PortalManager extends React.PureComponent {
15
18
  constructor() {
16
19
  super(...arguments);
17
- this.state = {
20
+ _defineProperty(this, "state", {
18
21
  portals: []
19
- };
20
- this.mount = (key, children) => {
22
+ });
23
+ _defineProperty(this, "mount", (key, children) => {
21
24
  this.setState(state => ({
22
25
  portals: [...state.portals, {
23
26
  key,
24
27
  children
25
28
  }]
26
29
  }));
27
- };
28
- this.update = (key, children) => this.setState(state => ({
29
- portals: state.portals.map(item => {
30
- if (item.key === key) {
31
- return {
32
- ...item,
33
- children
34
- };
35
- }
36
- return item;
37
- })
38
- }));
39
- this.unmount = key => this.setState(state => ({
40
- portals: state.portals.filter(item => item.key !== key)
41
- }));
42
- }
43
- render() {
44
- return this.state.portals.map(_ref => {
45
- let {
46
- key,
47
- children
48
- } = _ref;
49
- return /*#__PURE__*/React.createElement(_reactNative.View, {
50
- key: key,
51
- collapsable: false /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */,
52
- pointerEvents: "box-none",
53
- style: _reactNative.StyleSheet.absoluteFill
54
- }, children);
55
30
  });
56
- }
57
- }
58
- exports.default = PortalManager;tate.portals.map(item => {
31
+ _defineProperty(this, "update", (key, children) => this.setState(state => ({
32
+ portals: state.portals.map(item => {
59
33
  if (item.key === key) {
60
34
  return {
61
35
  ...item,
@@ -12,6 +12,7 @@ var _context = require("./context");
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 RadioButton = _ref => {
16
17
  let {
17
18
  Icon,
@@ -38,19 +39,7 @@ const RadioButton = _ref => {
38
39
  onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
39
40
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
40
41
  };
41
- return /*#__PURE__*/React.createElement(_IconButton.default, {
42
- Icon: Icon,
43
- icon: isSelected ? selectedIcon : unselectedIcon,
44
- color: isSelected ? color : unselectedColor,
45
- disabled: disabled,
46
- onPress: handlePress,
47
- size: size,
48
- style: style,
49
- ...rest
50
- });
51
- };
52
- var _default = RadioButton;
53
- exports.default = _default;turn /*#__PURE__*/React.createElement(_IconButton.default, _extends({
42
+ return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
54
43
  Icon: Icon,
55
44
  icon: isSelected ? selectedIcon : unselectedIcon,
56
45
  color: isSelected ? color : unselectedColor,
@@ -10,6 +10,7 @@ var _Text = _interopRequireDefault(require("../Text"));
10
10
  var _theming = require("../../theming");
11
11
  var _RadioButtonGroup = _interopRequireDefault(require("./RadioButtonGroup"));
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 RadioButtonFieldGroup = _ref => {
14
15
  let {
15
16
  label,
@@ -26,15 +27,6 @@ const RadioButtonFieldGroup = _ref => {
26
27
  fontSize: theme.typography.headline4.fontSize,
27
28
  color: theme.typography.headline4.color
28
29
  }, labelStyle]
29
- }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, {
30
- theme: theme,
31
- ...rest
32
- }, children));
33
- };
34
- var _default = (0, _theming.withTheme)(RadioButtonFieldGroup);
35
- exports.default = _default; fontSize: theme.typography.headline4.fontSize,
36
- color: theme.typography.headline4.color
37
- }, labelStyle]
38
30
  }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, _extends({
39
31
  theme: theme
40
32
  }, rest), children));
@@ -10,6 +10,7 @@ var _utilities = require("../../utilities");
10
10
  var _context = require("./context");
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 {
14
15
  Provider
15
16
  } = _context.radioButtonGroupContext;
@@ -49,23 +50,9 @@ const RadioButtonGroup = _ref => {
49
50
  alignItems: "center"
50
51
  });
51
52
  }
52
- return /*#__PURE__*/React.createElement(_reactNative.View, {
53
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
53
54
  style: [{
54
55
  minHeight: 40
55
- }, style],
56
- ...rest
57
- }, /*#__PURE__*/React.createElement(Provider, {
58
- value: {
59
- value: internalValue,
60
- onValueChange: handleValueChange,
61
- direction
62
- }
63
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
64
- style: _containerStyle
65
- }, children)));
66
- };
67
- var _default = RadioButtonGroup;
68
- exports.default = _default;0
69
56
  }, style]
70
57
  }, rest), /*#__PURE__*/React.createElement(Provider, {
71
58
  value: {
@@ -14,7 +14,8 @@ var _utilities = require("../../utilities");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  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); }
16
16
  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; }
17
- var Direction;
17
+ 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); }
18
+ let Direction;
18
19
  exports.Direction = Direction;
19
20
  (function (Direction) {
20
21
  Direction["Row"] = "row";
@@ -71,14 +72,13 @@ const RadioButtonRow = _ref => {
71
72
  textStyles,
72
73
  viewStyles
73
74
  } = (0, _utilities.extractStyles)(style);
74
- return /*#__PURE__*/React.createElement(_Touchable.default, {
75
+ return /*#__PURE__*/React.createElement(_Touchable.default, _extends({
75
76
  onPress: handlePress,
76
77
  style: [styles.mainParent, {
77
78
  flexDirection: direction
78
79
  }, viewStyles],
79
- disabled: disabled,
80
- ...rest
81
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
80
+ disabled: disabled
81
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
82
82
  style: [styles.label, {
83
83
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
84
84
  }, labelContainerStyle]
@@ -116,22 +116,4 @@ const styles = _reactNative.StyleSheet.create({
116
116
  }
117
117
  });
118
118
  var _default = RadioButtonRow;
119
- exports.default = _default; "center",
120
- justifyContent: "space-around",
121
- paddingStart: 20,
122
- minHeight: 50,
123
- paddingEnd: 20,
124
- display: "flex",
125
- ..._reactNative.Platform.select({
126
- web: {
127
- cursor: "pointer",
128
- userSelect: "none"
129
- }
130
- })
131
- },
132
- label: {
133
- flex: 3
134
- }
135
- });
136
- var _default = RadioButtonRow;
137
119
  exports.default = _default;
@@ -10,7 +10,9 @@ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
10
10
  var _theming = require("../theming");
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
  function ScreenContainer(_ref) {
15
+ var _StyleSheet$flatten;
14
16
  let {
15
17
  scrollable = false,
16
18
  hasSafeArea = false,
@@ -21,8 +23,7 @@ function ScreenContainer(_ref) {
21
23
  children,
22
24
  ...rest
23
25
  } = _ref;
24
- var _a;
25
- const backgroundColor = ((_a = _reactNative.StyleSheet.flatten(style)) === null || _a === void 0 ? void 0 : _a.backgroundColor) || theme.colors.background;
26
+ const backgroundColor = ((_StyleSheet$flatten = _reactNative.StyleSheet.flatten(style)) === null || _StyleSheet$flatten === void 0 ? void 0 : _StyleSheet$flatten.backgroundColor) || theme.colors.background;
26
27
  const edges = ["left", "right"];
27
28
  if (hasSafeArea || hasTopSafeArea) {
28
29
  edges.push("top");
@@ -30,13 +31,12 @@ function ScreenContainer(_ref) {
30
31
  if (hasSafeArea || hasBottomSafeArea) {
31
32
  edges.push("bottom");
32
33
  }
33
- return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
34
+ return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, _extends({
34
35
  edges: edges,
35
36
  style: [styles.container, {
36
37
  backgroundColor
37
- }],
38
- ...rest
39
- }, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
38
+ }]
39
+ }, rest), scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
40
40
  contentContainerStyle: [styles.scrollViewContainer, {
41
41
  backgroundColor
42
42
  }, style]
@@ -56,22 +56,4 @@ const styles = _reactNative.StyleSheet.create({
56
56
  }
57
57
  });
58
58
  var _default = (0, _theming.withTheme)(ScreenContainer);
59
- exports.default = _default;olor
60
- }, style]
61
- }, children) : /*#__PURE__*/React.createElement(_reactNative.View, {
62
- style: [styles.container, {
63
- backgroundColor
64
- }, style]
65
- }, children));
66
- }
67
- const styles = _reactNative.StyleSheet.create({
68
- container: {
69
- flex: 1
70
- },
71
- scrollViewContainer: {
72
- flexGrow: 1,
73
- flex: undefined
74
- }
75
- });
76
- var _default = (0, _theming.withTheme)(ScreenContainer);
77
59
  exports.default = _default;
@@ -7,6 +7,7 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNativeShadow = require("react-native-shadow-2");
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ 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); }
10
11
  const Shadow = _ref => {
11
12
  let {
12
13
  offsetX = 0,
@@ -23,7 +24,7 @@ const Shadow = _ref => {
23
24
  style,
24
25
  ...rest
25
26
  } = _ref;
26
- return /*#__PURE__*/_react.default.createElement(_reactNativeShadow.Shadow, {
27
+ return /*#__PURE__*/_react.default.createElement(_reactNativeShadow.Shadow, _extends({
27
28
  offset: [offsetX, offsetY],
28
29
  sides: {
29
30
  start: showShadowSideStart,
@@ -38,20 +39,6 @@ const Shadow = _ref => {
38
39
  bottomEnd: showShadowCornerBottomEnd
39
40
  },
40
41
  containerStyle: style,
41
- paintInside: paintInside,
42
- ...rest
43
- });
44
- };
45
- var _default = Shadow;
46
- exports.default = _default;showShadowSideBottom
47
- },
48
- corners: {
49
- topStart: showShadowCornerTopStart,
50
- topEnd: showShadowCornerTopEnd,
51
- bottomStart: showShadowCornerBottomStart,
52
- bottomEnd: showShadowCornerBottomEnd
53
- },
54
- containerStyle: style,
55
42
  paintInside: paintInside
56
43
  }, rest));
57
44
  };
@@ -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
  function maybeParseValue(value) {
17
18
  if (value === undefined) {
18
19
  return undefined;
@@ -72,10 +73,9 @@ function Slider(_ref) {
72
73
  setInternalValue(newValue);
73
74
  onValueChange(newValue);
74
75
  };
75
- return /*#__PURE__*/React.createElement(_reactNative.View, {
76
- style: [styles.container, style],
77
- ...rest
78
- }, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
76
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
77
+ style: [styles.container, style]
78
+ }, rest), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
79
79
  color: leftIconThemeColor,
80
80
  name: leftIcon,
81
81
  size: 24
@@ -108,21 +108,4 @@ const styles = _reactNative.StyleSheet.create({
108
108
  }
109
109
  });
110
110
  var _default = (0, _theming.withTheme)(Slider);
111
- exports.default = _default;or: rightIconThemeColor,
112
- name: rightIcon,
113
- size: 24
114
- }) : null);
115
- }
116
- const styles = _reactNative.StyleSheet.create({
117
- container: {
118
- height: 40,
119
- flexDirection: "row",
120
- alignItems: "center"
121
- },
122
- slider: {
123
- flex: 1,
124
- marginHorizontal: 12
125
- }
126
- });
127
- var _default = (0, _theming.withTheme)(Slider);
128
111
  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 StarRating = _ref => {
13
14
  let {
14
15
  Icon,
@@ -39,10 +40,9 @@ const StarRating = _ref => {
39
40
  !!onPress && onPress(r);
40
41
  }, [onPress]);
41
42
  const ratingRounded = Math.round(localRating * 2) / 2;
42
- return /*#__PURE__*/React.createElement(_reactNative.View, {
43
- style: [styles.container, style],
44
- ...rest
45
- }, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
43
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
44
+ style: [styles.container, style]
45
+ }, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(_reactNative.View, {
46
46
  key: i,
47
47
  style: {
48
48
  display: "flex"
@@ -83,23 +83,4 @@ const styles = _reactNative.StyleSheet.create({
83
83
  }
84
84
  });
85
85
  var _default = (0, _theming.withTheme)(StarRating);
86
- exports.default = _default;lignItems: "center"
87
- },
88
- touchContainer: {
89
- display: "flex",
90
- flexDirection: "row",
91
- position: "absolute",
92
- top: 0,
93
- right: 0,
94
- left: 0,
95
- bottom: 0,
96
- zIndex: 1
97
- },
98
- pressable: {
99
- flex: 1,
100
- height: "100%",
101
- width: "50%"
102
- }
103
- });
104
- var _default = (0, _theming.withTheme)(StarRating);
105
86
  exports.default = _default;
@@ -8,8 +8,9 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  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); }
10
10
  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; }
11
- // @ts-nocheck
12
-
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
13
+ 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
14
  const STEP_STATUS = {
14
15
  CURRENT: "current",
15
16
  FINISHED: "finished",
@@ -18,7 +19,7 @@ const STEP_STATUS = {
18
19
  class StepIndicator extends _react.Component {
19
20
  constructor(props) {
20
21
  super(props);
21
- this.renderProgressBarBackground = () => {
22
+ _defineProperty(this, "renderProgressBarBackground", () => {
22
23
  const {
23
24
  stepCount,
24
25
  direction
@@ -61,8 +62,8 @@ class StepIndicator extends _react.Component {
61
62
  },
62
63
  style: progressBarBackgroundStyle
63
64
  });
64
- };
65
- this.renderProgressBar = () => {
65
+ });
66
+ _defineProperty(this, "renderProgressBar", () => {
66
67
  const {
67
68
  stepCount,
68
69
  direction
@@ -92,8 +93,8 @@ class StepIndicator extends _react.Component {
92
93
  return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
93
94
  style: progressBarStyle
94
95
  });
95
- };
96
- this.renderStepIndicator = () => {
96
+ });
97
+ _defineProperty(this, "renderStepIndicator", () => {
97
98
  let steps = [];
98
99
  const {
99
100
  stepCount,
@@ -124,8 +125,8 @@ class StepIndicator extends _react.Component {
124
125
  height: this.state.customStyles.currentStepIndicatorSize
125
126
  }]
126
127
  }, steps);
127
- };
128
- this.renderStepLabels = () => {
128
+ });
129
+ _defineProperty(this, "renderStepLabels", () => {
129
130
  const {
130
131
  labels,
131
132
  direction,
@@ -167,8 +168,8 @@ class StepIndicator extends _react.Component {
167
168
  alignItems: this.state.customStyles.labelAlign
168
169
  }]
169
170
  }, labelViews);
170
- };
171
- this.renderStep = position => {
171
+ });
172
+ _defineProperty(this, "renderStep", position => {
172
173
  const {
173
174
  renderStepIndicator
174
175
  } = this.props;
@@ -235,8 +236,8 @@ class StepIndicator extends _react.Component {
235
236
  }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
236
237
  style: indicatorLabelStyle
237
238
  }, "".concat(position + 1)));
238
- };
239
- this.getStepStatus = stepPosition => {
239
+ });
240
+ _defineProperty(this, "getStepStatus", stepPosition => {
240
241
  const {
241
242
  currentPosition
242
243
  } = this.props;
@@ -247,8 +248,8 @@ class StepIndicator extends _react.Component {
247
248
  } else {
248
249
  return STEP_STATUS.UNFINISHED;
249
250
  }
250
- };
251
- this.onCurrentPositionChanged = position => {
251
+ });
252
+ _defineProperty(this, "onCurrentPositionChanged", position => {
252
253
  let {
253
254
  stepCount
254
255
  } = this.props;
@@ -268,7 +269,7 @@ class StepIndicator extends _react.Component {
268
269
  toValue: this.state.customStyles.currentStepIndicatorSize / 2,
269
270
  duration: 100
270
271
  })])]).start();
271
- };
272
+ });
272
273
  const defaultStyles = {
273
274
  stepIndicatorSize: 30,
274
275
  currentStepIndicatorSize: 40,
@@ -334,6 +335,7 @@ class StepIndicator extends _react.Component {
334
335
  // ),
335
336
  // }));
336
337
  // }
338
+
337
339
  if (prevProps.currentPosition !== this.props.currentPosition) {
338
340
  this.onCurrentPositionChanged(this.props.currentPosition);
339
341
  }
@@ -375,47 +377,6 @@ const styles = _reactNative.StyleSheet.create({
375
377
  justifyContent: "center"
376
378
  }
377
379
  });
378
- StepIndicator.defaultProps = {
379
- currentPosition: 0,
380
- stepCount: 5,
381
- customStyles: {},
382
- direction: "horizontal"
383
- };exports.default = StepIndicator;
384
- const styles = _reactNative.StyleSheet.create({
385
- container: {
386
- backgroundColor: "transparent"
387
- },
388
- stepIndicatorContainer: {
389
- flexDirection: "row",
390
- alignItems: "center",
391
- justifyContent: "space-around",
392
- backgroundColor: "transparent"
393
- },
394
- stepLabelsContainer: {
395
- justifyContent: "space-around"
396
- },
397
- step: {
398
- alignItems: "center",
399
- justifyContent: "center",
400
- zIndex: 2
401
- },
402
- stepContainer: {
403
- flex: 1,
404
- flexDirection: "row",
405
- alignItems: "center",
406
- justifyContent: "center"
407
- },
408
- stepLabel: {
409
- fontSize: 12,
410
- textAlign: "center",
411
- fontWeight: "500"
412
- },
413
- stepLabelItem: {
414
- flex: 1,
415
- alignItems: "center",
416
- justifyContent: "center"
417
- }
418
- });
419
380
  StepIndicator.defaultProps = {
420
381
  currentPosition: 0,
421
382
  stepCount: 5,
@@ -12,8 +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
- /* Copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx */
16
-
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); }
17
16
  const Surface = _ref => {
18
17
  let {
19
18
  elevation: propElevation,
@@ -43,18 +42,7 @@ const Surface = _ref => {
43
42
  return colors.surface;
44
43
  }
45
44
  };
46
- return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
47
- ...rest,
48
- style: [{
49
- backgroundColor: getBackgroundColor(),
50
- elevation,
51
- ...evalationStyles,
52
- ...restStyle
53
- }]
54
- }, children);
55
- };
56
- var _default = (0, _theming.withTheme)(Surface);
57
- exports.default = _default;xtends({}, rest, {
45
+ return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, rest, {
58
46
  style: [{
59
47
  backgroundColor: getBackgroundColor(),
60
48
  elevation,
@@ -10,6 +10,7 @@ var _theming = require("../../theming");
10
10
  var _utilities = require("../../utilities");
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 TabViewComponent = _ref => {
14
15
  let {
15
16
  Icon,
@@ -35,11 +36,13 @@ const TabViewComponent = _ref => {
35
36
  textStyles,
36
37
  viewStyles
37
38
  } = (0, _utilities.extractStyles)(style);
39
+
38
40
  //Check type of child using props
39
41
  //Regular '.type' cannot work because Draftbit strips the type in Draft view
40
42
  const instanceOfTabViewItemProps = object => {
41
43
  return "title" in object;
42
44
  };
45
+
43
46
  //Populate routes and scenes based on children
44
47
  React.useEffect(() => {
45
48
  const newRoutes = [];
@@ -65,8 +68,7 @@ const TabViewComponent = _ref => {
65
68
  }
66
69
  };
67
70
  const renderTabBar = props => {
68
- return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, {
69
- ...props,
71
+ return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
70
72
  activeColor: activeColor || theme.colors.primary,
71
73
  inactiveColor: inactiveColor || theme.colors.divider,
72
74
  pressColor: pressColor || theme.colors.primary,
@@ -80,7 +82,7 @@ const TabViewComponent = _ref => {
80
82
  route,
81
83
  color
82
84
  } = _ref2;
83
- return (route === null || route === void 0 ? void 0 : route.icon) ? /*#__PURE__*/React.createElement(Icon, {
85
+ return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
84
86
  name: route.icon,
85
87
  color: color,
86
88
  size: 16
@@ -89,8 +91,9 @@ const TabViewComponent = _ref => {
89
91
  style: {
90
92
  backgroundColor: tabsBackgroundColor || theme.colors.background
91
93
  }
92
- });
94
+ }));
93
95
  };
96
+
94
97
  //Cannot render TabView without at least one tab
95
98
  if (!routes.length) {
96
99
  return /*#__PURE__*/React.createElement(React.Fragment, null);
@@ -110,13 +113,4 @@ const TabViewComponent = _ref => {
110
113
  });
111
114
  };
112
115
  var _default = (0, _theming.withTheme)(TabViewComponent);
113
- exports.default = _default; renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
114
- renderTabBar: renderTabBar,
115
- onIndexChange: indexChangeHandler,
116
- tabBarPosition: tabBarPosition,
117
- keyboardDismissMode: keyboardDismissMode,
118
- swipeEnabled: swipeEnabled
119
- });
120
- };
121
- var _default = (0, _theming.withTheme)(TabViewComponent);
122
116
  exports.default = _default;