@draftbit/core 46.10.3-399330.2 → 46.10.3-4470c4.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 (72) hide show
  1. package/lib/commonjs/components/Banner.js +23 -4
  2. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -5
  3. package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
  4. package/lib/commonjs/components/Checkbox/context.js +1 -1
  5. package/lib/commonjs/components/CircularProgress.js +26 -8
  6. package/lib/commonjs/components/Divider.js +1 -14
  7. package/lib/commonjs/components/Image.js +2 -17
  8. package/lib/commonjs/components/Layout.js +19 -40
  9. package/lib/commonjs/components/Picker/Picker.js +4 -6
  10. package/lib/commonjs/components/Portal/PortalConsumer.js +7 -22
  11. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js +9 -1
  12. package/lib/commonjs/components/RadioButton/context.js +1 -1
  13. package/lib/commonjs/components/Slider.js +4 -21
  14. package/lib/commonjs/components/StarRating.js +4 -23
  15. package/lib/commonjs/components/Table/Table.js +123 -0
  16. package/lib/commonjs/components/Table/TableCell.js +49 -0
  17. package/lib/commonjs/components/Table/TableCommon.js +30 -0
  18. package/lib/commonjs/components/Table/TableRow.js +61 -0
  19. package/lib/commonjs/components/Table/index.js +27 -0
  20. package/lib/commonjs/constants.js +1 -1
  21. package/lib/commonjs/index.js +19 -7
  22. package/lib/commonjs/mappings/NativeBase/Layout.js +9 -14
  23. package/lib/commonjs/mappings/Table.js +140 -0
  24. package/lib/module/components/DeprecatedFAB.js +3 -23
  25. package/lib/module/components/Table/Table.js +114 -0
  26. package/lib/module/components/Table/TableCell.js +41 -0
  27. package/lib/module/components/Table/TableCommon.js +21 -0
  28. package/lib/module/components/Table/TableRow.js +53 -0
  29. package/lib/module/components/Table/index.js +3 -0
  30. package/lib/module/hooks.js +1 -2
  31. package/lib/module/index.js +1 -1
  32. package/lib/module/mappings/NativeBase/Layout.js +10 -15
  33. package/lib/module/mappings/Table.js +133 -0
  34. package/lib/typescript/src/components/Table/Table.d.ts +19 -0
  35. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
  36. package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
  37. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
  38. package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
  39. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
  40. package/lib/typescript/src/components/Table/TableRow.d.ts +14 -0
  41. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
  42. package/lib/typescript/src/components/Table/index.d.ts +4 -0
  43. package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
  44. package/lib/typescript/src/index.d.ts +1 -1
  45. package/lib/typescript/src/index.d.ts.map +1 -1
  46. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +16 -27
  47. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
  48. package/lib/typescript/src/mappings/Table.d.ts +337 -0
  49. package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
  50. package/package.json +3 -3
  51. package/src/components/Table/Table.js +93 -0
  52. package/src/components/Table/Table.tsx +176 -0
  53. package/src/components/Table/TableCell.js +31 -0
  54. package/src/components/Table/TableCell.tsx +63 -0
  55. package/src/components/Table/TableCommon.js +12 -0
  56. package/src/components/Table/TableCommon.ts +40 -0
  57. package/src/components/Table/TableRow.js +37 -0
  58. package/src/components/Table/TableRow.tsx +77 -0
  59. package/src/components/Table/index.js +3 -0
  60. package/src/components/Table/index.tsx +3 -0
  61. package/src/index.js +1 -1
  62. package/src/index.tsx +2 -1
  63. package/src/mappings/NativeBase/Layout.js +19 -13
  64. package/src/mappings/NativeBase/Layout.ts +19 -13
  65. package/src/mappings/Table.js +150 -0
  66. package/src/mappings/Table.ts +170 -0
  67. package/lib/commonjs/components/Container.js +0 -93
  68. package/lib/module/components/Container.js +0 -83
  69. package/lib/typescript/src/components/Container.d.ts +0 -21
  70. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  71. package/src/components/Container.js +0 -43
  72. package/src/components/Container.tsx +0 -116
@@ -12,7 +12,6 @@ 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); }
16
15
  const ELEVATION = 1;
17
16
  const DEFAULT_MAX_WIDTH = 960;
18
17
  const Banner = _ref => {
@@ -70,7 +69,6 @@ const Banner = _ref => {
70
69
  measured: true
71
70
  });
72
71
  };
73
-
74
72
  // The banner animation has 2 parts:
75
73
  // 1. Blank spacer element which animates its height to move the content
76
74
  // 2. Actual banner which animates its translateY
@@ -80,9 +78,10 @@ const Banner = _ref => {
80
78
  // However we can't animated banner's height directly as it'll also resize the content inside
81
79
  const height = _reactNative.Animated.multiply(position, layout.height);
82
80
  const translateY = _reactNative.Animated.multiply(_reactNative.Animated.add(position, -1), layout.height);
83
- return /*#__PURE__*/React.createElement(_Surface.default, _extends({}, rest, {
81
+ return /*#__PURE__*/React.createElement(_Surface.default, {
82
+ ...rest,
84
83
  style: [styles.container, (0, _shadow.default)(ELEVATION), style]
85
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
84
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
86
85
  style: [styles.wrapper, contentStyle]
87
86
  }, /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
88
87
  style: {
@@ -164,4 +163,24 @@ const styles = _reactNative.StyleSheet.create({
164
163
  }
165
164
  });
166
165
  var _default = (0, _theming.withTheme)(Banner);
166
+ exports.default = _default;",
167
+ justifyContent: "flex-start",
168
+ marginHorizontal: 8,
169
+ marginTop: 16,
170
+ marginBottom: 0
171
+ },
172
+ icon: {
173
+ margin: 8
174
+ },
175
+ message: {
176
+ flex: 1,
177
+ margin: 8
178
+ },
179
+ actions: {
180
+ flexDirection: "row",
181
+ justifyContent: "flex-end",
182
+ margin: 8
183
+ }
184
+ });
185
+ var _default = (0, _theming.withTheme)(Banner);
167
186
  exports.default = _default;
@@ -13,8 +13,7 @@ var _utilities = require("../../utilities");
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); }
17
- let Direction;
16
+ var Direction;
18
17
  exports.Direction = Direction;
19
18
  (function (Direction) {
20
19
  Direction["Row"] = "row";
@@ -72,13 +71,14 @@ const CheckboxGroupRow = _ref => {
72
71
  textStyles,
73
72
  viewStyles
74
73
  } = (0, _utilities.extractStyles)(style);
75
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
74
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
76
75
  onPress: handlePress,
77
76
  style: [styles.mainParent, {
78
77
  flexDirection: direction
79
78
  }, viewStyles],
80
- disabled: disabled
81
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
79
+ disabled: disabled,
80
+ ...rest
81
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
82
82
  style: [styles.label, {
83
83
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
84
84
  }, labelContainerStyle]
@@ -117,4 +117,22 @@ const styles = _reactNative.StyleSheet.create({
117
117
  }
118
118
  });
119
119
  var _default = CheckboxGroupRow;
120
+ exports.default = _default;center",
121
+ justifyContent: "space-around",
122
+ paddingStart: 20,
123
+ minHeight: 50,
124
+ paddingEnd: 20,
125
+ display: "flex",
126
+ ..._reactNative.Platform.select({
127
+ web: {
128
+ cursor: "pointer",
129
+ userSelect: "none"
130
+ }
131
+ })
132
+ },
133
+ label: {
134
+ flex: 3
135
+ }
136
+ });
137
+ var _default = CheckboxGroupRow;
120
138
  exports.default = _default;
@@ -14,8 +14,7 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
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
- 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;
17
+ var Direction;
19
18
  exports.Direction = Direction;
20
19
  (function (Direction) {
21
20
  Direction["Row"] = "row";
@@ -58,7 +57,6 @@ const CheckboxRow = _ref => {
58
57
  setInternalValue(status);
59
58
  }
60
59
  }, [status]);
61
-
62
60
  // This special logic is to handle weird APIs like Airtable that return
63
61
  // true or undefined for a boolean
64
62
  const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
@@ -82,13 +80,14 @@ const CheckboxRow = _ref => {
82
80
  textStyles,
83
81
  viewStyles
84
82
  } = (0, _utilities.extractStyles)(style);
85
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
83
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
86
84
  onPress: handlePress,
87
85
  style: [viewStyles, styles.mainParent, {
88
86
  flexDirection: direction
89
87
  }],
90
- disabled: disabled
91
- }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
88
+ disabled: disabled,
89
+ ...rest
90
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
92
91
  style: [styles.label, {
93
92
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
94
93
  }, labelContainerStyle]
@@ -125,4 +124,22 @@ const styles = _reactNative.StyleSheet.create({
125
124
  }
126
125
  });
127
126
  var _default = CheckboxRow;
127
+ exports.default = _default;ems: "center",
128
+ justifyContent: "space-around",
129
+ paddingStart: 20,
130
+ minHeight: 50,
131
+ paddingEnd: 20,
132
+ display: "flex",
133
+ ..._reactNative.Platform.select({
134
+ web: {
135
+ cursor: "pointer",
136
+ userSelect: "none"
137
+ }
138
+ })
139
+ },
140
+ label: {
141
+ flex: 3
142
+ }
143
+ });
144
+ var _default = CheckboxRow;
128
145
  exports.default = _default;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.checkboxGroupContext = exports.Direction = void 0;
7
7
  exports.useCheckboxGroupContext = useCheckboxGroupContext;
8
8
  var _react = require("react");
9
- var Direction;
9
+ let Direction;
10
10
  exports.Direction = Direction;
11
11
  (function (Direction) {
12
12
  Direction["Horizontal"] = "horizontal";
@@ -8,27 +8,24 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _reactNativeSvg = require("react-native-svg");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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); }
14
11
  class CircularProgress extends _react.default.Component {
15
12
  constructor() {
16
13
  super(...arguments);
17
- _defineProperty(this, "polarToCartesian", (centerX, centerY, radius, angleInDegrees) => {
14
+ this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
18
15
  var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
19
16
  return {
20
17
  x: centerX + radius * Math.cos(angleInRadians),
21
18
  y: centerY + radius * Math.sin(angleInRadians)
22
19
  };
23
- });
24
- _defineProperty(this, "circlePath", (x, y, radius, startAngle, endAngle) => {
20
+ };
21
+ this.circlePath = (x, y, radius, startAngle, endAngle) => {
25
22
  var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
26
23
  var end = this.polarToCartesian(x, y, radius, startAngle);
27
24
  var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
28
25
  var d = ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y];
29
26
  return d.join(" ");
30
- });
31
- _defineProperty(this, "clampFill", fill => Math.min(100, Math.max(0, fill)));
27
+ };
28
+ this.clampFill = fill => Math.min(100, Math.max(0, fill));
32
29
  }
33
30
  render() {
34
31
  const {
@@ -109,4 +106,25 @@ class CircularProgress extends _react.default.Component {
109
106
  }
110
107
  }
111
108
  var _default = CircularProgress;
109
+ exports.default = _default;padding) / 2
110
+ }, backgroundColor && /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
111
+ d: backgroundPath,
112
+ stroke: backgroundColor,
113
+ strokeWidth: backgroundWidth || width,
114
+ strokeLinecap: lineCap,
115
+ strokeDasharray: strokeDasharrayBackground,
116
+ fill: "transparent"
117
+ }), fill > 0 && /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
118
+ d: circlePathItem,
119
+ stroke: tintColor,
120
+ strokeWidth: width,
121
+ strokeLinecap: lineCap,
122
+ strokeDasharray: strokeDasharrayTint,
123
+ fill: "transparent"
124
+ }), cap)), children && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
125
+ style: localChildrenContainerStyle
126
+ }, children(fill)));
127
+ }
128
+ }
129
+ var _default = CircularProgress;
112
130
  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 Divider = _ref => {
13
14
  let {
14
15
  style,
@@ -18,20 +19,6 @@ const Divider = _ref => {
18
19
  },
19
20
  ...rest
20
21
  } = _ref;
21
- return /*#__PURE__*/React.createElement(_reactNative.View, {
22
- style: [{
23
- backgroundColor: color || colors.divider,
24
- height: _reactNative.StyleSheet.hairlineWidth
25
- }, style],
26
- ...rest
27
- });
28
- };
29
- var _default = (0, _theming.withTheme)(Divider);
30
- exports.default = _default;eme: {
31
- colors
32
- },
33
- ...rest
34
- } = _ref;
35
22
  return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
36
23
  style: [{
37
24
  backgroundColor: color || colors.divider,
@@ -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, {
@@ -13,6 +13,7 @@ var React = _interopRequireWildcard(require("react"));
13
13
  var _reactNative = require("react-native");
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 Center(_ref) {
17
18
  let {
18
19
  width = 240,
@@ -22,16 +23,15 @@ function Center(_ref) {
22
23
  style,
23
24
  ...rest
24
25
  } = _ref;
25
- return /*#__PURE__*/React.createElement(_reactNative.View, {
26
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
26
27
  style: [{
27
28
  justifyContent: "center",
28
29
  alignItems: "center",
29
30
  width,
30
31
  height,
31
32
  backgroundColor: bgColor
32
- }, style],
33
- ...rest
34
- }, children);
33
+ }, style]
34
+ }, rest), children);
35
35
  }
36
36
  function Circle(_ref2) {
37
37
  let {
@@ -42,7 +42,7 @@ function Circle(_ref2) {
42
42
  ...rest
43
43
  } = _ref2;
44
44
  const borderRadius = 1000;
45
- return /*#__PURE__*/React.createElement(Center, {
45
+ return /*#__PURE__*/React.createElement(Center, _extends({
46
46
  width: size,
47
47
  height: size,
48
48
  bgColor: bgColor,
@@ -50,9 +50,8 @@ function Circle(_ref2) {
50
50
  backgroundColor: bgColor,
51
51
  borderRadius,
52
52
  overflow: "hidden"
53
- }],
54
- ...rest
55
- }, children);
53
+ }]
54
+ }, rest), children);
56
55
  }
57
56
  function Square(_ref3) {
58
57
  let {
@@ -62,13 +61,12 @@ function Square(_ref3) {
62
61
  style,
63
62
  ...rest
64
63
  } = _ref3;
65
- return /*#__PURE__*/React.createElement(Center, {
64
+ return /*#__PURE__*/React.createElement(Center, _extends({
66
65
  style: style,
67
66
  width: size,
68
67
  height: size,
69
- bgColor: bgColor,
70
- ...rest
71
- }, children);
68
+ bgColor: bgColor
69
+ }, rest), children);
72
70
  }
73
71
  function Row(_ref4) {
74
72
  let {
@@ -78,14 +76,15 @@ function Row(_ref4) {
78
76
  style,
79
77
  ...rest
80
78
  } = _ref4;
81
- return /*#__PURE__*/React.createElement(_reactNative.View, {
82
- style: [style, {
79
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
80
+ style: [style,
81
+ // style goes first b/c we can't override these
82
+ {
83
83
  alignItems,
84
84
  flexDirection: "row",
85
85
  justifyContent: justifyContent
86
- }],
87
- ...rest
88
- }, children);
86
+ }]
87
+ }, rest), children);
89
88
  }
90
89
  function Spacer(_ref5) {
91
90
  let {
@@ -97,36 +96,16 @@ function Spacer(_ref5) {
97
96
  style,
98
97
  ...rest
99
98
  } = _ref5;
100
- return /*#__PURE__*/React.createElement(_reactNative.View, {
99
+ return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
101
100
  style: [style, {
102
101
  paddingRight: right,
103
102
  paddingTop: top,
104
103
  paddingLeft: left,
105
104
  paddingBottom: bottom
106
- }],
107
- ...rest
108
- }, children);
105
+ }]
106
+ }, rest), children);
109
107
  }
110
108
  function Stack(_ref6) {
111
- let {
112
- children,
113
- justifyContent = "flex-start",
114
- alignItems = "flex-start",
115
- style,
116
- ...rest
117
- } = _ref6;
118
- return (
119
- /*#__PURE__*/
120
- // style must go first since we don't want justifyContent, alignItems overridden
121
- React.createElement(_reactNative.View, {
122
- style: [style, {
123
- justifyContent,
124
- alignItems
125
- }],
126
- ...rest
127
- }, children)
128
- );
129
- }Stack(_ref6) {
130
109
  let {
131
110
  children,
132
111
  justifyContent = "flex-start",
@@ -46,11 +46,9 @@ const isWeb = _reactNative.Platform.OS === "web";
46
46
  const unstyledColor = "rgba(165, 173, 183, 1)";
47
47
  const disabledColor = "rgb(240, 240, 240)";
48
48
  const errorColor = "rgba(255, 69, 100, 1)";
49
-
50
49
  //Empty string for 'value' is treated as a non-value
51
50
  //reason: Draftbit uses empty string as initial value for string state*/
52
51
  const Picker = _ref => {
53
- var _find$label, _find;
54
52
  let {
55
53
  error,
56
54
  options = [],
@@ -72,6 +70,7 @@ const Picker = _ref => {
72
70
  type = "solid",
73
71
  autoDismissKeyboard = true
74
72
  } = _ref;
73
+ var _a, _b;
75
74
  const androidPickerRef = React.useRef(undefined);
76
75
  const [internalValue, setInternalValue] = React.useState(value || defaultValue);
77
76
  const [pickerVisible, setPickerVisible] = React.useState(false);
@@ -89,9 +88,9 @@ const Picker = _ref => {
89
88
  }
90
89
  }, [defaultValue]);
91
90
  React.useEffect(() => {
91
+ var _a;
92
92
  if (pickerVisible && androidPickerRef.current) {
93
- var _androidPickerRef$cur;
94
- androidPickerRef === null || androidPickerRef === void 0 ? void 0 : (_androidPickerRef$cur = androidPickerRef.current) === null || _androidPickerRef$cur === void 0 ? void 0 : _androidPickerRef$cur.focus();
93
+ (_a = androidPickerRef === null || androidPickerRef === void 0 ? void 0 : androidPickerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
95
94
  }
96
95
  }, [pickerVisible, androidPickerRef]);
97
96
  React.useEffect(() => {
@@ -100,7 +99,6 @@ const Picker = _ref => {
100
99
  }
101
100
  }, [pickerVisible, autoDismissKeyboard]);
102
101
  const normalizedOptions = normalizeOptions(options);
103
-
104
102
  //Underlying Picker component defaults selection to first element when value is not provided (or undefined)
105
103
  //Placholder must be the 1st option in order to allow selection of the 'actual' 1st option
106
104
  const pickerOptions = placeholder ? [{
@@ -146,7 +144,7 @@ const Picker = _ref => {
146
144
  ...extractedMarginStyles
147
145
  };
148
146
  const stylesWithoutBordersAndMargins = (0, _lodash.omit)(viewStyles, [..._utilities.borderStyleNames, ..._utilities.marginStyleNames, ...additionalBorderStyles, ...additionalMarginStyles]);
149
- 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);
147
+ 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);
150
148
  const labelText = label ? /*#__PURE__*/React.createElement(_reactNative.Text, {
151
149
  style: {
152
150
  textAlign: textStyles.textAlign,
@@ -7,31 +7,16 @@ exports.default = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  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); }
9
9
  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; }
10
+ 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; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
12
+ 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); }
10
13
  class PortalConsumer extends React.Component {
11
- async componentDidMount() {
12
- this.checkManager();
13
- // Delay updating to prevent React from going to infinite loop
14
- await Promise.resolve();
15
- this.key = this.props.manager.mount(this.props.children);
14
+ constructor() {
15
+ super(...arguments);
16
+ _defineProperty(this, "key", void 0);
16
17
  }
17
- componentDidUpdate() {
18
- this.checkManager();
19
- this.props.manager.update(this.key, this.props.children);
20
- }
21
- componentWillUnmount() {
18
+ async componentDidMount() {
22
19
  this.checkManager();
23
- this.props.manager.unmount(this.key);
24
- }
25
- checkManager() {
26
- if (!this.props.manager) {
27
- throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\n" + "Please read our getting-started guide and make sure you've followed all the required steps.\n\n" + "https://callstack.github.io/react-native-paper/getting-started.html");
28
- }
29
- }
30
- render() {
31
- return null;
32
- }
33
- }
34
- exports.default = PortalConsumer;s.checkManager();
35
20
 
36
21
  // Delay updating to prevent React from going to infinite loop
37
22
  await Promise.resolve();
@@ -10,7 +10,6 @@ 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); }
14
13
  const RadioButtonFieldGroup = _ref => {
15
14
  let {
16
15
  label,
@@ -27,6 +26,15 @@ const RadioButtonFieldGroup = _ref => {
27
26
  fontSize: theme.typography.headline4.fontSize,
28
27
  color: theme.typography.headline4.color
29
28
  }, 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]
30
38
  }, label), /*#__PURE__*/_react.default.createElement(_RadioButtonGroup.default, _extends({
31
39
  theme: theme
32
40
  }, rest), children));
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.radioButtonGroupContext = exports.Direction = void 0;
7
7
  exports.useRadioButtonGroupContext = useRadioButtonGroupContext;
8
8
  var _react = require("react");
9
- var Direction;
9
+ let Direction;
10
10
  exports.Direction = Direction;
11
11
  (function (Direction) {
12
12
  Direction["Horizontal"] = "horizontal";
@@ -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;