@draftbit/core 46.5.1-c6140a.2 → 46.5.2-0b00ad.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.
@@ -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;
@@ -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,
@@ -59,7 +60,7 @@ function Base(_ref) {
59
60
  if (textAlign === "right") {
60
61
  buttonStyles.justifyContent = "flex-end";
61
62
  }
62
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
63
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
63
64
  onPress: onPress,
64
65
  disabled: disabled || loading,
65
66
  style: _ref2 => {
@@ -69,9 +70,8 @@ function Base(_ref) {
69
70
  return [styles.base, {
70
71
  opacity: pressed || disabled ? 0.75 : 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
  });
@@ -15,7 +15,8 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  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); }
17
17
  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; }
18
- var Direction;
18
+ 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); }
19
+ let Direction;
19
20
  exports.Direction = Direction;
20
21
  (function (Direction) {
21
22
  Direction["Row"] = "row";
@@ -58,6 +59,7 @@ const CheckboxRow = _ref => {
58
59
  setInternalValue(status);
59
60
  }
60
61
  }, [status]);
62
+
61
63
  // This special logic is to handle weird APIs like Airtable that return
62
64
  // true or undefined for a boolean
63
65
  const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
@@ -81,14 +83,13 @@ const CheckboxRow = _ref => {
81
83
  textStyles,
82
84
  viewStyles
83
85
  } = (0, _utilities.extractStyles)(style);
84
- return /*#__PURE__*/React.createElement(_Touchable.default, {
86
+ return /*#__PURE__*/React.createElement(_Touchable.default, _extends({
85
87
  onPress: handlePress,
86
88
  style: [viewStyles, styles.mainParent, {
87
89
  flexDirection: direction
88
90
  }],
89
- disabled: disabled,
90
- ...rest
91
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
91
+ disabled: disabled
92
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
92
93
  style: [styles.label, {
93
94
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
94
95
  }, labelContainerStyle]
@@ -125,22 +126,4 @@ const styles = _reactNative.StyleSheet.create({
125
126
  }
126
127
  });
127
128
  var _default = CheckboxRow;
128
- exports.default = _default;ems: "center",
129
- justifyContent: "space-around",
130
- paddingStart: 20,
131
- minHeight: 50,
132
- paddingEnd: 20,
133
- display: "flex",
134
- ..._reactNative.Platform.select({
135
- web: {
136
- cursor: "pointer",
137
- userSelect: "none"
138
- }
139
- })
140
- },
141
- label: {
142
- flex: 3
143
- }
144
- });
145
- var _default = CheckboxRow;
146
129
  exports.default = _default;
@@ -10,6 +10,7 @@ var _Config = _interopRequireDefault(require("./Config"));
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 CircleImage = _ref => {
14
15
  let {
15
16
  source = _Config.default.placeholderImageURL,
@@ -18,21 +19,6 @@ const CircleImage = _ref => {
18
19
  ...props
19
20
  } = _ref;
20
21
  const borderRadius = size / 2;
21
- return /*#__PURE__*/React.createElement(_reactNative.Image, {
22
- style: [{
23
- width: size,
24
- height: size,
25
- borderRadius
26
- }, style],
27
- source: typeof source === "string" ? {
28
- uri: source
29
- } : source,
30
- resizeMode: "cover",
31
- ...props
32
- });
33
- };
34
- var _default = CircleImage;
35
- exports.default = _default;size / 2;
36
22
  return /*#__PURE__*/React.createElement(_reactNative.Image, _extends({
37
23
  style: [{
38
24
  width: size,
@@ -8,24 +8,27 @@ 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); }
11
14
  class CircularProgress extends _react.default.Component {
12
15
  constructor() {
13
16
  super(...arguments);
14
- this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
17
+ _defineProperty(this, "polarToCartesian", (centerX, centerY, radius, angleInDegrees) => {
15
18
  var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
16
19
  return {
17
20
  x: centerX + radius * Math.cos(angleInRadians),
18
21
  y: centerY + radius * Math.sin(angleInRadians)
19
22
  };
20
- };
21
- this.circlePath = (x, y, radius, startAngle, endAngle) => {
23
+ });
24
+ _defineProperty(this, "circlePath", (x, y, radius, startAngle, endAngle) => {
22
25
  var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
23
26
  var end = this.polarToCartesian(x, y, radius, startAngle);
24
27
  var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
25
28
  var d = ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y];
26
29
  return d.join(" ");
27
- };
28
- this.clampFill = fill => Math.min(100, Math.max(0, fill));
30
+ });
31
+ _defineProperty(this, "clampFill", fill => Math.min(100, Math.max(0, fill)));
29
32
  }
30
33
  render() {
31
34
  const {
@@ -106,25 +109,4 @@ class CircularProgress extends _react.default.Component {
106
109
  }
107
110
  }
108
111
  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;
130
112
  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;
@@ -328,7 +328,7 @@ const DatePicker = _ref => {
328
328
  onFocus: _handleFocus,
329
329
  onBlur: _handleBlur,
330
330
  underlineColorAndroid: "transparent",
331
- style: [inputStyles, textStyles]
331
+ style: [inputStyles, textStyles, viewStyles]
332
332
  }, props))), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
333
333
  name: rightIconName,
334
334
  size: ICON_SIZE,
@@ -11,6 +11,7 @@ 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); }
14
15
  /* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
15
16
  const Elevation = _ref => {
16
17
  let {
@@ -27,24 +28,11 @@ const Elevation = _ref => {
27
28
  colors
28
29
  } = theme;
29
30
  const borderRadius = radius;
30
- return /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
31
- ...rest,
31
+ return /*#__PURE__*/React.createElement(_reactNative.Animated.View, _extends({}, 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]
48
36
  }), /*#__PURE__*/React.createElement(_reactNative.View, {
49
37
  style: {
50
38
  overflow: "hidden",
@@ -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,
@@ -15,7 +15,9 @@ var _Touchable = _interopRequireDefault(require("../Touchable"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  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); }
17
17
  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; }
18
+ 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
19
  const Picker = _ref => {
20
+ var _options$find$label, _options$find;
19
21
  let {
20
22
  style,
21
23
  options,
@@ -25,7 +27,6 @@ const Picker = _ref => {
25
27
  onValueChange: onValueChangeOverride = () => {},
26
28
  ...props
27
29
  } = _ref;
28
- var _a, _b;
29
30
  const {
30
31
  viewStyles: {
31
32
  borderRadius,
@@ -70,7 +71,7 @@ const Picker = _ref => {
70
71
  };
71
72
 
72
73
  const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
73
- const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
74
+ const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
74
75
  return /*#__PURE__*/React.createElement(_Touchable.default, {
75
76
  disabled: disabled,
76
77
  onPress: toggleFocus,
@@ -94,24 +95,6 @@ const Picker = _ref => {
94
95
  key: o.value
95
96
  }))), /*#__PURE__*/React.createElement(_reactNative.View, {
96
97
  pointerEvents: "none"
97
- }, /*#__PURE__*/React.createElement(_TextField.default, {
98
- ...props,
99
- value: selectedLabel,
100
- placeholder: placeholder,
101
- // @ts-ignore
102
- ref: textField,
103
- disabled: disabled,
104
- // @ts-expect-error
105
- style: stylesWithoutMargin
106
- }))));
107
- };
108
- const styles = _reactNative.StyleSheet.create({
109
- container: {
110
- alignSelf: "stretch"
111
- }
112
- });
113
- var _default = (0, _theming.withTheme)(Picker);
114
- exports.default = _default;pointerEvents: "none"
115
98
  }, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
116
99
  value: selectedLabel,
117
100
  placeholder: placeholder
@@ -15,7 +15,9 @@ var _Touchable = _interopRequireDefault(require("../Touchable"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  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); }
17
17
  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; }
18
+ 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
19
  const Picker = _ref => {
20
+ var _options$find$label, _options$find;
19
21
  let {
20
22
  style,
21
23
  options,
@@ -25,7 +27,6 @@ const Picker = _ref => {
25
27
  onValueChange: onValueChangeOverride = () => {},
26
28
  ...props
27
29
  } = _ref;
28
- var _a, _b;
29
30
  const {
30
31
  viewStyles: {
31
32
  borderRadius,
@@ -70,7 +71,7 @@ const Picker = _ref => {
70
71
  };
71
72
 
72
73
  const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
73
- const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
74
+ const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
74
75
  return /*#__PURE__*/React.createElement(_Touchable.default, {
75
76
  disabled: disabled,
76
77
  onPress: toggleFocus,
@@ -95,24 +96,6 @@ const Picker = _ref => {
95
96
  key: o.value
96
97
  }))), /*#__PURE__*/React.createElement(_reactNative.View, {
97
98
  pointerEvents: "none"
98
- }, /*#__PURE__*/React.createElement(_TextField.default, {
99
- ...props,
100
- value: selectedLabel,
101
- placeholder: placeholder,
102
- // @ts-ignore
103
- ref: textField,
104
- disabled: disabled,
105
- // @ts-expect-error
106
- style: stylesWithoutMargin
107
- }))));
108
- };
109
- const styles = _reactNative.StyleSheet.create({
110
- container: {
111
- alignSelf: "stretch"
112
- }
113
- });
114
- var _default = (0, _theming.withTheme)(Picker);
115
- exports.default = _default;pointerEvents: "none"
116
99
  }, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
117
100
  value: selectedLabel,
118
101
  placeholder: placeholder
@@ -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,
@@ -10,11 +10,12 @@ function usePrevious(value) {
10
10
  // The ref object is a generic container whose current property is mutable
11
11
  // and can hold any value, similar to an instance property on a class
12
12
  const ref = _react.default.useRef();
13
+
13
14
  // Store current value in ref
14
15
  _react.default.useEffect(() => {
15
16
  ref.current = value;
16
17
  }, [value]);
18
+
17
19
  // Return previous value (happens before update in useEffect above)
18
20
  return ref.current;
19
- }
20
21
  }
@@ -1,3 +1,4 @@
1
+ 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); }
1
2
  import React from "react";
2
3
  import { View, Text } from "react-native";
3
4
  import Image from "./Image";
@@ -41,12 +42,11 @@ const CardBlock = _ref => {
41
42
  const rightDescriptionStyles = [typography.subtitle2, {
42
43
  color: colors.light
43
44
  }];
44
- return /*#__PURE__*/React.createElement(Card, {
45
+ return /*#__PURE__*/React.createElement(Card, _extends({
45
46
  style: style,
46
47
  onPress: onPress,
47
- numColumns: numColumns,
48
- ...rest
49
- }, /*#__PURE__*/React.createElement(View, {
48
+ numColumns: numColumns
49
+ }, rest), /*#__PURE__*/React.createElement(View, {
50
50
  style: {
51
51
  backgroundColor: colors.background
52
52
  }
@@ -95,14 +95,4 @@ const CardBlock = _ref => {
95
95
  style: rightDescriptionStyles
96
96
  }, rightDescription) : null) : null));
97
97
  };
98
- export default withTheme(CardBlock);PURE__*/React.createElement(Text, {
99
- numberOfLines: 1,
100
- style: [typography.body2, {
101
- color: colors.medium
102
- }]
103
- }, leftDescription), rightDescription ? /*#__PURE__*/React.createElement(Text, {
104
- numberOfLines: 1,
105
- style: rightDescriptionStyles
106
- }, rightDescription) : null) : null));
107
- };
108
98
  export default withTheme(CardBlock);
@@ -1,3 +1,4 @@
1
+ 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); }
1
2
  import React from "react";
2
3
  import { View, Text } from "react-native";
3
4
  import color from "color";
@@ -44,12 +45,11 @@ const CardContainer = _ref => {
44
45
  titleStyle = typography.headline5;
45
46
  break;
46
47
  }
47
- return /*#__PURE__*/React.createElement(Card, {
48
+ return /*#__PURE__*/React.createElement(Card, _extends({
48
49
  style: style,
49
50
  onPress: onPress,
50
- numColumns: numColumns,
51
- ...rest
52
- }, /*#__PURE__*/React.createElement(Elevation, {
51
+ numColumns: numColumns
52
+ }, rest), /*#__PURE__*/React.createElement(Elevation, {
53
53
  style: {
54
54
  elevation,
55
55
  borderRadius: roundness
@@ -118,14 +118,4 @@ const CardContainer = _ref => {
118
118
  color: colors.surface
119
119
  })) : null)));
120
120
  };
121
- export default withTheme(CardContainer);ONTAINER_PADDING,
122
- borderRadius: ICON_CONTAINER_SIZE,
123
- backgroundColor: color(colors.strong).alpha(Config.cardIconBackgroundOpacity).rgb().string()
124
- }
125
- }, /*#__PURE__*/React.createElement(Icon, {
126
- name: icon,
127
- size: Config.cardIconSize,
128
- color: colors.surface
129
- })) : null)));
130
- };
131
121
  export default withTheme(CardContainer);
@@ -1,3 +1,4 @@
1
+ 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); }
1
2
  import * as React from "react";
2
3
  import { withTheme } from "../theming";
3
4
  import { ScrollView, View, StyleSheet, Dimensions } from "react-native";
@@ -29,6 +30,7 @@ function Pager(_ref) {
29
30
  }));
30
31
  }
31
32
  function Carousel(_ref2) {
33
+ var _data$length;
32
34
  let {
33
35
  data,
34
36
  children,
@@ -36,10 +38,9 @@ function Carousel(_ref2) {
36
38
  style,
37
39
  ...rest
38
40
  } = _ref2;
39
- var _a;
40
41
  const [index, setIndex] = React.useState(0);
41
42
  const length = React.Children.count(children);
42
- const itemsLength = ((_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0) + length;
43
+ const itemsLength = ((_data$length = data === null || data === void 0 ? void 0 : data.length) !== null && _data$length !== void 0 ? _data$length : 0) + length;
43
44
  const slides = Array.isArray(data) ? data : [];
44
45
  const {
45
46
  width,
@@ -47,10 +48,9 @@ function Carousel(_ref2) {
47
48
  } = StyleSheet.flatten(style || {});
48
49
  const slideWidth = width || screenWidth;
49
50
  const slideHeight = height || 250;
50
- return /*#__PURE__*/React.createElement(View, {
51
- style: [styles.container, style],
52
- ...rest
53
- }, /*#__PURE__*/React.createElement(ScrollView, {
51
+ return /*#__PURE__*/React.createElement(View, _extends({
52
+ style: [styles.container, style]
53
+ }, rest), /*#__PURE__*/React.createElement(ScrollView, {
54
54
  pagingEnabled: true,
55
55
  horizontal: true,
56
56
  decelerationRate: "fast",
@@ -78,8 +78,8 @@ function Carousel(_ref2) {
78
78
  }]
79
79
  });
80
80
  }) : null, React.Children.map(children, child => {
81
- var _a;
82
- const s = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.style) || {};
81
+ var _child$props;
82
+ const s = (child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.style) || {};
83
83
  return /*#__PURE__*/React.createElement(View, {
84
84
  style: {
85
85
  width: slideWidth
@@ -117,28 +117,4 @@ const styles = StyleSheet.create({
117
117
  backgroundColor: "#000"
118
118
  }
119
119
  });
120
- export default withTheme(Carousel);gth
121
- }));
122
- }
123
- const styles = StyleSheet.create({
124
- container: {
125
- backgroundColor: "#eee"
126
- },
127
- pager: {
128
- position: "absolute",
129
- bottom: 12,
130
- left: 0,
131
- right: 0,
132
- flexDirection: "row",
133
- justifyContent: "center",
134
- alignItems: "center"
135
- },
136
- bullet: {
137
- marginHorizontal: 2,
138
- width: 10,
139
- height: 10,
140
- borderRadius: 20,
141
- backgroundColor: "#000"
142
- }
143
- });
144
120
  export default withTheme(Carousel);
@@ -319,7 +319,7 @@ const DatePicker = _ref => {
319
319
  onFocus: _handleFocus,
320
320
  onBlur: _handleBlur,
321
321
  underlineColorAndroid: "transparent",
322
- style: [inputStyles, textStyles]
322
+ style: [inputStyles, textStyles, viewStyles]
323
323
  }, props))), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
324
324
  name: rightIconName,
325
325
  size: ICON_SIZE,
@@ -46,6 +46,7 @@ const FieldSearchBarFull = _ref => {
46
46
  lineHeight,
47
47
  ...typeStyles
48
48
  } = typography.body2; // eslint-disable-line @typescript-eslint/no-unused-vars
49
+
49
50
  const handleChangeText = newValue => {
50
51
  setInternalValue(newValue);
51
52
  if (onChange) {
@@ -83,4 +84,4 @@ const styles = StyleSheet.create({
83
84
  alignItems: "center"
84
85
  }
85
86
  });
86
- export default withTheme(FieldSearchBarFull);;
87
+ export default withTheme(FieldSearchBarFull);
@@ -1,3 +1,4 @@
1
+ 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); }
1
2
  import * as React from "react";
2
3
  import { Text, StyleSheet } from "react-native";
3
4
  import { extractStyles } from "../utilities";
@@ -16,27 +17,11 @@ export default function FormRow(_ref) {
16
17
  textStyles,
17
18
  viewStyles
18
19
  } = extractStyles(style);
19
- return /*#__PURE__*/React.createElement(Touchable, {
20
+ return /*#__PURE__*/React.createElement(Touchable, _extends({
20
21
  disabled: disabled,
21
22
  onPress: onPress,
22
23
  style: [styles.row, {
23
24
  flexDirection: direction
24
- }, viewStyles],
25
- ...rest
26
- }, /*#__PURE__*/React.createElement(Text, {
27
- style: textStyles
28
- }, label), children);
29
- }
30
- const styles = StyleSheet.create({
31
- row: {
32
- marginLeft: 8,
33
- marginRight: 8,
34
- flexDirection: "row",
35
- justifyContent: "space-between",
36
- alignItems: "center"
37
- }
38
- });styles.row, {
39
- flexDirection: direction
40
25
  }, viewStyles]
41
26
  }, rest), /*#__PURE__*/React.createElement(Text, {
42
27
  style: textStyles
@@ -1,3 +1,4 @@
1
+ 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); }
1
2
  import * as React from "react";
2
3
  import { View, StyleSheet, ActivityIndicator, Pressable, Platform } from "react-native";
3
4
  import { withTheme } from "../theming";
@@ -15,7 +16,7 @@ const IconButton = _ref => {
15
16
  ...props
16
17
  } = _ref;
17
18
  const iconColor = customColor || theme.colors.primary;
18
- return /*#__PURE__*/React.createElement(Pressable, {
19
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
19
20
  onPress: onPress,
20
21
  disabled: disabled || loading,
21
22
  style: _ref2 => {
@@ -29,9 +30,8 @@ const IconButton = _ref => {
29
30
  alignItems: "center",
30
31
  justifyContent: "center"
31
32
  }, style];
32
- },
33
- ...props
34
- }, /*#__PURE__*/React.createElement(View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
33
+ }
34
+ }, props), /*#__PURE__*/React.createElement(View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
35
35
  name: icon,
36
36
  size: size - 2,
37
37
  color: iconColor
@@ -52,21 +52,4 @@ const styles = StyleSheet.create({
52
52
  })
53
53
  }
54
54
  });
55
- export default withTheme(IconButton);ement(ActivityIndicator, {
56
- size: "small",
57
- color: iconColor
58
- }) : null));
59
- };
60
- const styles = StyleSheet.create({
61
- container: {
62
- alignItems: "center",
63
- justifyContent: "center",
64
- ...Platform.select({
65
- web: {
66
- cursor: "pointer",
67
- userSelect: "none"
68
- }
69
- })
70
- }
71
- });
72
55
  export default withTheme(IconButton);
@@ -1,3 +1,4 @@
1
+ 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); }
1
2
  /* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
2
3
  import React from "react";
3
4
  import { Image as NativeImage, StyleSheet } from "react-native";
@@ -55,24 +56,7 @@ const Image = _ref2 => {
55
56
  height,
56
57
  aspectRatio
57
58
  }]
58
- }, /*#__PURE__*/React.createElement(NativeImage, {
59
- ...props,
60
- source: imageSource,
61
- resizeMode: resizeMode,
62
- style: [style, {
63
- height: "100%",
64
- width: "100%"
65
- }]
66
- }));
67
- }
68
- return /*#__PURE__*/React.createElement(NativeImage, {
69
- ...props,
70
- source: source,
71
- resizeMode: resizeMode,
72
- style: style
73
- });
74
- };
75
- export default Image;eImage, _extends({}, props, {
59
+ }, /*#__PURE__*/React.createElement(NativeImage, _extends({}, props, {
76
60
  source: imageSource,
77
61
  resizeMode: resizeMode,
78
62
  style: [style, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.5.1-c6140a.2+c6140a4",
3
+ "version": "46.5.2-0b00ad.2+0b00ad0",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.5.1-c6140a.2+c6140a4",
44
+ "@draftbit/types": "^46.5.2-0b00ad.2+0b00ad0",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -91,5 +91,5 @@
91
91
  ]
92
92
  ]
93
93
  },
94
- "gitHead": "c6140a4a4efdea7038713bfe7a11f1caf6d18615"
94
+ "gitHead": "0b00ad0c4c84d8f4a7cb1b99bf8dec9d557d6cc0"
95
95
  }
@@ -311,7 +311,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
311
311
  ...leftIconStyle,
312
312
  marginLeft: type === "solid" ? 16 : 0,
313
313
  } })) : null,
314
- React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: [inputStyles, textStyles], ...props })),
314
+ React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: [inputStyles, textStyles, viewStyles], ...props })),
315
315
  rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.light, style: {
316
316
  position: "absolute",
317
317
  right: 16,
@@ -471,7 +471,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
471
471
  onFocus={_handleFocus}
472
472
  onBlur={_handleBlur}
473
473
  underlineColorAndroid={"transparent"}
474
- style={[inputStyles, textStyles]}
474
+ style={[inputStyles, textStyles, viewStyles]}
475
475
  {...props}
476
476
  />
477
477
  </View>