@draftbit/core 46.4.3-64fdb2.2 → 46.4.3-c292ad.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 (33) hide show
  1. package/lib/commonjs/components/Button.js +35 -12
  2. package/lib/commonjs/components/CardContainer.js +5 -15
  3. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +24 -6
  4. package/lib/commonjs/components/CircleImage.js +2 -16
  5. package/lib/commonjs/components/Container.js +5 -17
  6. package/lib/commonjs/components/DeprecatedFAB.js +4 -22
  7. package/lib/commonjs/components/Divider.js +2 -16
  8. package/lib/commonjs/components/Layout.js +40 -19
  9. package/lib/commonjs/components/NumberInput.js +2 -13
  10. package/lib/commonjs/components/Picker/PickerComponent.android.js +5 -24
  11. package/lib/commonjs/components/Picker/PickerComponent.ios.js +13 -42
  12. package/lib/commonjs/components/Portal/PortalManager.js +19 -11
  13. package/lib/commonjs/components/ProgressBar.js +23 -7
  14. package/lib/commonjs/components/RadioButton/RadioButton.js +14 -3
  15. package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -3
  16. package/lib/commonjs/components/ScreenContainer.js +5 -23
  17. package/lib/commonjs/components/StepIndicator.js +34 -16
  18. package/lib/commonjs/components/Text.js +37 -11
  19. package/lib/commonjs/components/TextField.js +30 -63
  20. package/lib/commonjs/constants.js +2 -2
  21. package/lib/commonjs/index.js +1 -3
  22. package/lib/commonjs/mappings/StarRating.js +2 -6
  23. package/lib/module/components/Button.js +2 -0
  24. package/lib/module/components/Portal/PortalHost.js +15 -26
  25. package/lib/module/components/RadioButton/RadioButton.js +2 -15
  26. package/lib/module/index.js +1 -2
  27. package/lib/typescript/src/components/Button.d.ts +2 -0
  28. package/lib/typescript/src/index.d.ts +1 -2
  29. package/package.json +3 -3
  30. package/src/components/Button.js +2 -0
  31. package/src/components/Button.tsx +3 -0
  32. package/src/index.js +1 -2
  33. package/src/index.tsx +1 -2
@@ -13,29 +13,26 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
13
13
 
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
15
 
16
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
-
18
16
  /**
19
17
  * Portal host is the component which actually renders all Portals.
20
18
  */
21
19
  class PortalManager extends React.PureComponent {
22
20
  constructor() {
23
21
  super(...arguments);
24
-
25
- _defineProperty(this, "state", {
22
+ this.state = {
26
23
  portals: []
27
- });
24
+ };
28
25
 
29
- _defineProperty(this, "mount", (key, children) => {
26
+ this.mount = (key, children) => {
30
27
  this.setState(state => ({
31
28
  portals: [...state.portals, {
32
29
  key,
33
30
  children
34
31
  }]
35
32
  }));
36
- });
33
+ };
37
34
 
38
- _defineProperty(this, "update", (key, children) => this.setState(state => ({
35
+ this.update = (key, children) => this.setState(state => ({
39
36
  portals: state.portals.map(item => {
40
37
  if (item.key === key) {
41
38
  return { ...item,
@@ -45,11 +42,11 @@ class PortalManager extends React.PureComponent {
45
42
 
46
43
  return item;
47
44
  })
48
- })));
45
+ }));
49
46
 
50
- _defineProperty(this, "unmount", key => this.setState(state => ({
47
+ this.unmount = key => this.setState(state => ({
51
48
  portals: state.portals.filter(item => item.key !== key)
52
- })));
49
+ }));
53
50
  }
54
51
 
55
52
  render() {
@@ -71,4 +68,15 @@ class PortalManager extends React.PureComponent {
71
68
 
72
69
  }
73
70
 
71
+ exports.default = PortalManager;le: false
72
+ /* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */
73
+ ,
74
+ pointerEvents: "box-none",
75
+ style: _reactNative.StyleSheet.absoluteFill
76
+ }, children);
77
+ });
78
+ }
79
+
80
+ }
81
+
74
82
  exports.default = PortalManager;
@@ -13,10 +13,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
13
13
 
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
15
 
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
-
18
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
-
20
16
  const INDETERMINATE_WIDTH_FACTOR = 0.3;
21
17
  const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACTOR);
22
18
 
@@ -24,7 +20,7 @@ class ProgressBar extends _react.Component {
24
20
  constructor(props) {
25
21
  super(props);
26
22
 
27
- _defineProperty(this, "handleLayout", event => {
23
+ this.handleLayout = event => {
28
24
  const {
29
25
  width = 150,
30
26
  onLayout
@@ -39,7 +35,7 @@ class ProgressBar extends _react.Component {
39
35
  if (onLayout) {
40
36
  onLayout(event);
41
37
  }
42
- });
38
+ };
43
39
 
44
40
  const {
45
41
  progress: progressP = 0,
@@ -93,7 +89,6 @@ class ProgressBar extends _react.Component {
93
89
  _reactNative.Animated[animationType](this.state.progress, { ...animationConfig,
94
90
  toValue: progress,
95
91
  velocity: 0,
96
- //adjust this value if animation fails - velocity is required
97
92
  useNativeDriver
98
93
  }).start();
99
94
  } else {
@@ -165,6 +160,27 @@ class ProgressBar extends _react.Component {
165
160
  })
166
161
  }]
167
162
  };
163
+ return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
164
+ style: [containerStyle, style],
165
+ onLayout: this.handleLayout,
166
+ ...restProps
167
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
168
+ style: progressStyle
169
+ }), children);
170
+ }
171
+
172
+ }
173
+
174
+ exports.default = ProgressBar;h / (_reactNative.I18nManager.isRTL ? 2 : -2), 0]
175
+ })
176
+ }, {
177
+ // Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
178
+ scaleX: this.state.progress.interpolate({
179
+ inputRange: [0, 1],
180
+ outputRange: [0.0001, 1]
181
+ })
182
+ }]
183
+ };
168
184
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
169
185
  style: [containerStyle, style],
170
186
  onLayout: this.handleLayout
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
21
 
22
22
  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; }
23
23
 
24
- 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); }
25
-
26
24
  const RadioButton = _ref => {
27
25
  let {
28
26
  Icon,
@@ -51,7 +49,20 @@ const RadioButton = _ref => {
51
49
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
52
50
  };
53
51
 
54
- return /*#__PURE__*/React.createElement(_IconButton.default, _extends({
52
+ return /*#__PURE__*/React.createElement(_IconButton.default, {
53
+ Icon: Icon,
54
+ icon: isSelected ? selectedIcon : unselectedIcon,
55
+ color: isSelected ? color : unselectedColor,
56
+ disabled: disabled,
57
+ onPress: handlePress,
58
+ size: size,
59
+ style: style,
60
+ ...rest
61
+ });
62
+ };
63
+
64
+ var _default = RadioButton;
65
+ exports.default = _default;turn /*#__PURE__*/React.createElement(_IconButton.default, _extends({
55
66
  Icon: Icon,
56
67
  icon: isSelected ? selectedIcon : unselectedIcon,
57
68
  color: isSelected ? color : unselectedColor,
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  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; }
19
19
 
20
- 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); }
21
-
22
20
  const {
23
21
  Provider
24
22
  } = _context.radioButtonGroupContext;
@@ -63,9 +61,24 @@ const RadioButtonGroup = _ref => {
63
61
  });
64
62
  }
65
63
 
66
- return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
64
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
67
65
  style: [{
68
66
  minHeight: 40
67
+ }, style],
68
+ ...rest
69
+ }, /*#__PURE__*/React.createElement(Provider, {
70
+ value: {
71
+ value: internalValue,
72
+ onValueChange: handleValueChange,
73
+ direction
74
+ }
75
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
76
+ style: _containerStyle
77
+ }, children)));
78
+ };
79
+
80
+ var _default = RadioButtonGroup;
81
+ exports.default = _default;0
69
82
  }, style]
70
83
  }, rest), /*#__PURE__*/React.createElement(Provider, {
71
84
  value: {
@@ -17,6 +17,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  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; }
19
19
 
20
+ 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); }
21
+
20
22
  function ScreenContainer(_ref) {
21
23
  let {
22
24
  scrollable = false,
@@ -39,13 +41,12 @@ function ScreenContainer(_ref) {
39
41
  edges.push("bottom");
40
42
  }
41
43
 
42
- return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
44
+ return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, _extends({
43
45
  edges: edges,
44
46
  style: [styles.container, {
45
47
  backgroundColor
46
- }],
47
- ...rest
48
- }, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
48
+ }]
49
+ }, rest), scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
49
50
  contentContainerStyle: [styles.scrollViewContainer, {
50
51
  backgroundColor
51
52
  }, style]
@@ -68,23 +69,4 @@ const styles = _reactNative.StyleSheet.create({
68
69
 
69
70
  var _default = (0, _theming.withTheme)(ScreenContainer);
70
71
 
71
- exports.default = _default;reactNative.View, {
72
- style: [styles.container, {
73
- backgroundColor
74
- }, style]
75
- }, children));
76
- }
77
-
78
- const styles = _reactNative.StyleSheet.create({
79
- container: {
80
- flex: 1
81
- },
82
- scrollViewContainer: {
83
- flexGrow: 1,
84
- flex: undefined
85
- }
86
- });
87
-
88
- var _default = (0, _theming.withTheme)(ScreenContainer);
89
-
90
72
  exports.default = _default;
@@ -13,8 +13,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
13
13
 
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
15
 
16
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
-
16
+ // @ts-nocheck
18
17
  const STEP_STATUS = {
19
18
  CURRENT: "current",
20
19
  FINISHED: "finished",
@@ -25,7 +24,7 @@ class StepIndicator extends _react.Component {
25
24
  constructor(props) {
26
25
  super(props);
27
26
 
28
- _defineProperty(this, "renderProgressBarBackground", () => {
27
+ this.renderProgressBarBackground = () => {
29
28
  const {
30
29
  stepCount,
31
30
  direction
@@ -70,9 +69,9 @@ class StepIndicator extends _react.Component {
70
69
  },
71
70
  style: progressBarBackgroundStyle
72
71
  });
73
- });
72
+ };
74
73
 
75
- _defineProperty(this, "renderProgressBar", () => {
74
+ this.renderProgressBar = () => {
76
75
  const {
77
76
  stepCount,
78
77
  direction
@@ -104,9 +103,9 @@ class StepIndicator extends _react.Component {
104
103
  return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
105
104
  style: progressBarStyle
106
105
  });
107
- });
106
+ };
108
107
 
109
- _defineProperty(this, "renderStepIndicator", () => {
108
+ this.renderStepIndicator = () => {
110
109
  let steps = [];
111
110
  const {
112
111
  stepCount,
@@ -139,9 +138,9 @@ class StepIndicator extends _react.Component {
139
138
  height: this.state.customStyles.currentStepIndicatorSize
140
139
  }]
141
140
  }, steps);
142
- });
141
+ };
143
142
 
144
- _defineProperty(this, "renderStepLabels", () => {
143
+ this.renderStepLabels = () => {
145
144
  const {
146
145
  labels,
147
146
  direction,
@@ -183,9 +182,9 @@ class StepIndicator extends _react.Component {
183
182
  alignItems: this.state.customStyles.labelAlign
184
183
  }]
185
184
  }, labelViews);
186
- });
185
+ };
187
186
 
188
- _defineProperty(this, "renderStep", position => {
187
+ this.renderStep = position => {
189
188
  const {
190
189
  renderStepIndicator
191
190
  } = this.props;
@@ -257,9 +256,9 @@ class StepIndicator extends _react.Component {
257
256
  }) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
258
257
  style: indicatorLabelStyle
259
258
  }, "".concat(position + 1)));
260
- });
259
+ };
261
260
 
262
- _defineProperty(this, "getStepStatus", stepPosition => {
261
+ this.getStepStatus = stepPosition => {
263
262
  const {
264
263
  currentPosition
265
264
  } = this.props;
@@ -271,9 +270,9 @@ class StepIndicator extends _react.Component {
271
270
  } else {
272
271
  return STEP_STATUS.UNFINISHED;
273
272
  }
274
- });
273
+ };
275
274
 
276
- _defineProperty(this, "onCurrentPositionChanged", position => {
275
+ this.onCurrentPositionChanged = position => {
277
276
  let {
278
277
  stepCount
279
278
  } = this.props;
@@ -296,7 +295,7 @@ class StepIndicator extends _react.Component {
296
295
  toValue: this.state.customStyles.currentStepIndicatorSize / 2,
297
296
  duration: 100
298
297
  })])]).start();
299
- });
298
+ };
300
299
 
301
300
  const defaultStyles = {
302
301
  stepIndicatorSize: 30,
@@ -411,6 +410,25 @@ const styles = _reactNative.StyleSheet.create({
411
410
  }
412
411
  });
413
412
 
413
+ StepIndicator.defaultProps = {
414
+ currentPosition: 0,
415
+ stepCount: 5,
416
+ customStyles: {},
417
+ direction: "horizontal"
418
+ }; justifyContent: "center"
419
+ },
420
+ stepLabel: {
421
+ fontSize: 12,
422
+ textAlign: "center",
423
+ fontWeight: "500"
424
+ },
425
+ stepLabelItem: {
426
+ flex: 1,
427
+ alignItems: "center",
428
+ justifyContent: "center"
429
+ }
430
+ });
431
+
414
432
  StepIndicator.defaultProps = {
415
433
  currentPosition: 0,
416
434
  stepCount: 5,
@@ -15,17 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
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
17
 
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
-
20
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
-
22
18
  class Text extends React.Component {
23
- constructor() {
24
- super(...arguments);
25
-
26
- _defineProperty(this, "_root", void 0);
27
- }
28
-
29
19
  setNativeProps(args) {
30
20
  return this._root && this._root.setNativeProps(args);
31
21
  }
@@ -36,7 +26,43 @@ class Text extends React.Component {
36
26
  ...rest
37
27
  } = this.props;
38
28
  const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
39
- return /*#__PURE__*/React.createElement(_reactNative.Text, _extends({}, rest, {
29
+ return /*#__PURE__*/React.createElement(_reactNative.Text, { ...rest,
30
+ ref: c => {
31
+ this._root = c;
32
+ },
33
+ style: [{
34
+ textAlign: "left",
35
+ writingDirection
36
+ }, style]
37
+ });
38
+ }
39
+
40
+ }
41
+
42
+ const BaseLink = _ref => {
43
+ let {
44
+ style,
45
+ theme,
46
+ title,
47
+ ...props
48
+ } = _ref;
49
+ return /*#__PURE__*/React.createElement(Text, {
50
+ hitSlop: 8,
51
+ style: [{
52
+ color: theme.colors.primary
53
+ }, style],
54
+ theme: theme,
55
+ ...props
56
+ }, title);
57
+ };
58
+
59
+ exports.BaseLink = BaseLink;
60
+ const Link = (0, _theming.withTheme)(BaseLink);
61
+ exports.Link = Link;
62
+
63
+ var _default = (0, _theming.withTheme)(Text);
64
+
65
+ exports.default = _default;/React.createElement(_reactNative.Text, _extends({}, rest, {
40
66
  ref: c => {
41
67
  this._root = c;
42
68
  },
@@ -17,6 +17,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  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; }
19
19
 
20
+ 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); }
21
+
22
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
+
20
24
  const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
21
25
 
22
26
  const FOCUS_ANIMATION_DURATION = 150;
@@ -26,7 +30,8 @@ const ICON_SIZE = 24;
26
30
  class TextField extends React.Component {
27
31
  constructor() {
28
32
  super(...arguments);
29
- this.state = {
33
+
34
+ _defineProperty(this, "state", {
30
35
  labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
31
36
  focused: false,
32
37
  placeholder: this.props.error ? this.props.placeholder : "",
@@ -34,35 +39,36 @@ class TextField extends React.Component {
34
39
  measured: false,
35
40
  width: 0
36
41
  }
37
- };
38
- this._timer = setTimeout(() => {}, 0);
42
+ });
43
+
44
+ _defineProperty(this, "_timer", setTimeout(() => {}, 0));
39
45
 
40
- this._showPlaceholder = () => {
46
+ _defineProperty(this, "_showPlaceholder", () => {
41
47
  clearTimeout(this._timer); // Set the placeholder in a delay to offset the label animation
42
48
  // If we show it immediately, they'll overlap and look ugly
43
49
 
44
50
  this._timer = setTimeout(() => this.setState({
45
51
  placeholder: this.props.placeholder
46
52
  }), 50);
47
- };
53
+ });
48
54
 
49
- this._hidePlaceholder = () => this.setState({
55
+ _defineProperty(this, "_hidePlaceholder", () => this.setState({
50
56
  placeholder: ""
51
- });
57
+ }));
52
58
 
53
- this._restoreLabel = () => _reactNative.Animated.timing(this.state.labeled, {
59
+ _defineProperty(this, "_restoreLabel", () => _reactNative.Animated.timing(this.state.labeled, {
54
60
  toValue: 1,
55
61
  duration: FOCUS_ANIMATION_DURATION,
56
62
  useNativeDriver: true
57
- }).start();
63
+ }).start());
58
64
 
59
- this._minmizeLabel = () => _reactNative.Animated.timing(this.state.labeled, {
65
+ _defineProperty(this, "_minmizeLabel", () => _reactNative.Animated.timing(this.state.labeled, {
60
66
  toValue: 0,
61
67
  duration: BLUR_ANIMATION_DURATION,
62
68
  useNativeDriver: true
63
- }).start();
69
+ }).start());
64
70
 
65
- this._handleFocus = () => {
71
+ _defineProperty(this, "_handleFocus", () => {
66
72
  if (this.props.disabled) {
67
73
  return;
68
74
  }
@@ -70,9 +76,9 @@ class TextField extends React.Component {
70
76
  this.setState({
71
77
  focused: true
72
78
  });
73
- };
79
+ });
74
80
 
75
- this._handleBlur = () => {
81
+ _defineProperty(this, "_handleBlur", () => {
76
82
  if (this.props.disabled) {
77
83
  return;
78
84
  }
@@ -80,9 +86,9 @@ class TextField extends React.Component {
80
86
  this.setState({
81
87
  focused: false
82
88
  });
83
- };
89
+ });
84
90
 
85
- this._handleChangeText = value => {
91
+ _defineProperty(this, "_handleChangeText", value => {
86
92
  if (this.props.disabled) {
87
93
  return;
88
94
  }
@@ -98,9 +104,9 @@ class TextField extends React.Component {
98
104
  });
99
105
  this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
100
106
  }
101
- };
107
+ });
102
108
 
103
- this._root = undefined;
109
+ _defineProperty(this, "_root", undefined);
104
110
  }
105
111
 
106
112
  static getDerivedStateFromProps(nextProps, prevState) {
@@ -151,11 +157,10 @@ class TextField extends React.Component {
151
157
  focused: !prevState.focused
152
158
  }));
153
159
  }
160
+
154
161
  /**
155
162
  * @internal
156
163
  */
157
-
158
-
159
164
  setNativeProps(args) {
160
165
  return this._root && this._root.setNativeProps(args);
161
166
  }
@@ -198,8 +203,7 @@ class TextField extends React.Component {
198
203
  roundness,
199
204
  disabledOpacity
200
205
  },
201
- render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, { ...props
202
- }),
206
+ render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props),
203
207
  ...rest
204
208
  } = this.props;
205
209
  const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
@@ -353,9 +357,9 @@ class TextField extends React.Component {
353
357
 
354
358
  return /*#__PURE__*/React.createElement(_reactNative.View, {
355
359
  style: [styles.container, styleProp]
356
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
360
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
357
361
  style: leftIconStyle
358
- }) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
362
+ })) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
359
363
  style: (0, _utilities.applyStyles)([containerStyle], {
360
364
  height: style === null || style === void 0 ? void 0 : style.height,
361
365
  backgroundColor: bgColor,
@@ -422,9 +426,9 @@ class TextField extends React.Component {
422
426
  style: {
423
427
  justifyContent: type === "solid" ? "center" : undefined
424
428
  }
425
- }, /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
429
+ }, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
426
430
  style: leftIconStyle
427
- })) : null, render({
431
+ }))) : null, render({
428
432
  ref: c => {
429
433
  this._root = c;
430
434
  },
@@ -465,43 +469,6 @@ var _default = (0, _theming.withTheme)(TextField);
465
469
 
466
470
  exports.default = _default;
467
471
 
468
- const styles = _reactNative.StyleSheet.create({
469
- container: {
470
- alignSelf: "stretch"
471
- },
472
- placeholder: {
473
- position: "absolute",
474
- left: 0
475
- },
476
- underline: {
477
- position: "absolute",
478
- left: 0,
479
- right: 0,
480
- bottom: 0,
481
- height: 2
482
- },
483
- input: {
484
- flexGrow: 1,
485
- justifyContent: "center",
486
- textAlignVertical: "center",
487
- margin: 0,
488
- textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
489
- }
490
- });? /*#__PURE__*/React.createElement(_reactNative.Text, {
491
- style: [{
492
- color: error ? colors.error : colors.light,
493
- marginTop: 8,
494
- marginLeft: assistiveTextLeftMargin
495
- }]
496
- }, assistiveText) : null);
497
- }
498
-
499
- }
500
-
501
- var _default = (0, _theming.withTheme)(TextField);
502
-
503
- exports.default = _default;
504
-
505
472
  const styles = _reactNative.StyleSheet.create({
506
473
  container: {
507
474
  alignSelf: "stretch"
@@ -9,11 +9,11 @@ var _reactNative = require("react-native");
9
9
 
10
10
  // @ts-ignore
11
11
  const expo = global.__expo;
12
- const DEFAULT_STATUSBAR_HEIGHT_EXPO = (expo === null || expo === void 0 ? void 0 : expo.Constants) ? expo.Constants.statusBarHeight : 0;
12
+ const DEFAULT_STATUSBAR_HEIGHT_EXPO = expo !== null && expo !== void 0 && expo.Constants ? expo.Constants.statusBarHeight : 0;
13
13
 
14
14
  const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
15
15
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
16
16
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
17
17
  });
18
18
 
19
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
19
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
@@ -54,7 +54,7 @@ Object.defineProperty(exports, "Banner", {
54
54
  Object.defineProperty(exports, "Button", {
55
55
  enumerable: true,
56
56
  get: function () {
57
- return _DeprecatedButton.default;
57
+ return _Button.Button;
58
58
  }
59
59
  });
60
60
  Object.defineProperty(exports, "ButtonOutline", {
@@ -476,8 +476,6 @@ var _Layout = require("./components/Layout");
476
476
 
477
477
  var _index = require("./components/RadioButton/index");
478
478
 
479
- var _DeprecatedButton = _interopRequireDefault(require("./components/DeprecatedButton"));
480
-
481
479
  var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
482
480
 
483
481
  var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));