@draftbit/core 46.7.2-9358f4.2 → 46.7.3

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 (51) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +23 -4
  2. package/lib/commonjs/components/AnimatedCircularProgress.js +12 -1
  3. package/lib/commonjs/components/AvatarEdit.js +15 -4
  4. package/lib/commonjs/components/Button.js +33 -10
  5. package/lib/commonjs/components/CardBlock.js +13 -4
  6. package/lib/commonjs/components/Checkbox/Checkbox.js +22 -4
  7. package/lib/commonjs/components/Container.js +15 -4
  8. package/lib/commonjs/components/DeprecatedButton.js +20 -3
  9. package/lib/commonjs/components/DeprecatedCardWrapper.js +15 -1
  10. package/lib/commonjs/components/Divider.js +14 -1
  11. package/lib/commonjs/components/Image.js +17 -2
  12. package/lib/commonjs/components/Picker/Picker.js +9 -4
  13. package/lib/commonjs/components/Portal/PortalHost.js +44 -15
  14. package/lib/commonjs/components/Portal/PortalManager.js +34 -8
  15. package/lib/commonjs/components/ProgressBar.js +37 -7
  16. package/lib/commonjs/components/Slider.js +21 -4
  17. package/lib/commonjs/components/Surface.js +14 -2
  18. package/lib/commonjs/components/TextField.js +76 -28
  19. package/lib/commonjs/components/Touchable.js +15 -2
  20. package/lib/commonjs/hooks.js +1 -2
  21. package/lib/commonjs/mappings/StarRating.js +6 -2
  22. package/lib/module/components/Button.js +33 -10
  23. package/lib/module/components/CardBlock.js +14 -4
  24. package/lib/module/components/CardContainerRating.js +14 -4
  25. package/lib/module/components/CardContainerShortImage.js +18 -4
  26. package/lib/module/components/Checkbox/CheckboxGroupRow.js +24 -5
  27. package/lib/module/components/Checkbox/context.js +1 -1
  28. package/lib/module/components/CircleImage.js +16 -1
  29. package/lib/module/components/DeprecatedCardWrapper.js +18 -1
  30. package/lib/module/components/Divider.js +18 -1
  31. package/lib/module/components/Elevation.js +14 -2
  32. package/lib/module/components/FieldSearchBarFull.js +1 -2
  33. package/lib/module/components/FormRow.js +17 -2
  34. package/lib/module/components/Image.js +18 -2
  35. package/lib/module/components/Layout.js +42 -21
  36. package/lib/module/components/NumberInput.js +12 -3
  37. package/lib/module/components/Picker/PickerComponent.ios.js +36 -11
  38. package/lib/module/components/Portal/PortalConsumer.js +22 -7
  39. package/lib/module/components/RadioButton/RadioButton.js +13 -1
  40. package/lib/module/components/RadioButton/RadioButtonGroup.js +16 -2
  41. package/lib/module/components/RadioButton/RadioButtonRow.js +24 -5
  42. package/lib/module/components/Slider.js +21 -4
  43. package/lib/module/components/StepIndicator.js +58 -18
  44. package/lib/module/components/TextField.js +78 -28
  45. package/lib/module/components/ToggleButton.js +16 -2
  46. package/lib/module/components/Touchable.js +15 -2
  47. package/lib/module/constants.js +1 -2
  48. package/lib/module/mappings/FieldSearchBarFull.js +4 -1
  49. package/lib/module/styles/overlay.js +1 -3
  50. package/lib/module/utilities.js +1 -2
  51. package/package.json +3 -3
@@ -1,4 +1,3 @@
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); }
2
1
  import React from "react";
3
2
  import { View, Text } from "react-native";
4
3
  import Image from "./Image";
@@ -23,10 +22,11 @@ const CardContainerShortImage = _ref => {
23
22
  onPress,
24
23
  ...rest
25
24
  } = _ref;
26
- return /*#__PURE__*/React.createElement(Card, _extends({
25
+ return /*#__PURE__*/React.createElement(Card, {
27
26
  style: style,
28
- onPress: onPress
29
- }, rest), /*#__PURE__*/React.createElement(Elevation, {
27
+ onPress: onPress,
28
+ ...rest
29
+ }, /*#__PURE__*/React.createElement(Elevation, {
30
30
  style: {
31
31
  elevation,
32
32
  borderRadius: roundness
@@ -73,4 +73,18 @@ const CardContainerShortImage = _ref => {
73
73
  resizeMode: "cover"
74
74
  }))));
75
75
  };
76
+ export default withTheme(CardContainerShortImage);2, {
77
+ color: colors.medium,
78
+ marginTop: 4
79
+ }]
80
+ }, subtitle) : null), mode === "right" && /*#__PURE__*/React.createElement(Image, {
81
+ style: {
82
+ aspectRatio
83
+ },
84
+ source: typeof image === "string" ? {
85
+ uri: image
86
+ } : image,
87
+ resizeMode: "cover"
88
+ }))));
89
+ };
76
90
  export default withTheme(CardContainerShortImage);
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { StyleSheet, View, Platform, Pressable } from "react-native";
4
3
  import Checkbox from "./Checkbox";
@@ -6,7 +5,7 @@ import Text from "../Text";
6
5
  import { useCheckboxGroupContext } from "./context";
7
6
  import { Direction as GroupDirection } from "./context";
8
7
  import { extractStyles } from "../../utilities";
9
- export let Direction;
8
+ export var Direction;
10
9
  (function (Direction) {
11
10
  Direction["Row"] = "row";
12
11
  Direction["RowReverse"] = "row-reverse";
@@ -63,13 +62,14 @@ const CheckboxGroupRow = _ref => {
63
62
  textStyles,
64
63
  viewStyles
65
64
  } = extractStyles(style);
66
- return /*#__PURE__*/React.createElement(Pressable, _extends({
65
+ return /*#__PURE__*/React.createElement(Pressable, {
67
66
  onPress: handlePress,
68
67
  style: [styles.mainParent, {
69
68
  flexDirection: direction
70
69
  }, viewStyles],
71
- disabled: disabled
72
- }, rest), /*#__PURE__*/React.createElement(View, {
70
+ disabled: disabled,
71
+ ...rest
72
+ }, /*#__PURE__*/React.createElement(View, {
73
73
  style: [styles.label, {
74
74
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
75
75
  }, labelContainerStyle]
@@ -107,4 +107,23 @@ const styles = StyleSheet.create({
107
107
  flex: 3
108
108
  }
109
109
  });
110
+ export default CheckboxGroupRow;reate({
111
+ mainParent: {
112
+ alignItems: "center",
113
+ justifyContent: "space-around",
114
+ paddingStart: 20,
115
+ minHeight: 50,
116
+ paddingEnd: 20,
117
+ display: "flex",
118
+ ...Platform.select({
119
+ web: {
120
+ cursor: "pointer",
121
+ userSelect: "none"
122
+ }
123
+ })
124
+ },
125
+ label: {
126
+ flex: 3
127
+ }
128
+ });
110
129
  export default CheckboxGroupRow;
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- export let Direction;
2
+ export var Direction;
3
3
  (function (Direction) {
4
4
  Direction["Horizontal"] = "horizontal";
5
5
  Direction["Vertical"] = "vertical";
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { Image } from "react-native";
4
3
  import Config from "./Config";
@@ -10,6 +9,22 @@ const CircleImage = _ref => {
10
9
  ...props
11
10
  } = _ref;
12
11
  const borderRadius = size / 2;
12
+ return /*#__PURE__*/React.createElement(Image, {
13
+ style: [{
14
+ width: size,
15
+ height: size,
16
+ borderRadius
17
+ }, style],
18
+ source: typeof source === "string" ? {
19
+ uri: source
20
+ } : source,
21
+ resizeMode: "cover",
22
+ ...props
23
+ });
24
+ };
25
+ export default CircleImage;props
26
+ } = _ref;
27
+ const borderRadius = size / 2;
13
28
  return /*#__PURE__*/React.createElement(Image, _extends({
14
29
  style: [{
15
30
  width: size,
@@ -1,4 +1,3 @@
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); }
2
1
  import React from "react";
3
2
  import { withTheme } from "../theming";
4
3
  import Touchable from "./Touchable";
@@ -13,6 +12,24 @@ const getWidth = numColumns => {
13
12
  }
14
13
  };
15
14
  const Card = _ref => {
15
+ let {
16
+ numColumns = 3,
17
+ children,
18
+ onPress,
19
+ style,
20
+ ...rest
21
+ } = _ref;
22
+ const width = getWidth(numColumns);
23
+ return /*#__PURE__*/React.createElement(Touchable, {
24
+ disabled: !onPress,
25
+ onPress: onPress,
26
+ style: [style, {
27
+ width
28
+ }],
29
+ ...rest
30
+ }, children);
31
+ };
32
+ export default withTheme(Card);ef => {
16
33
  let {
17
34
  numColumns = 3,
18
35
  children,
@@ -1,7 +1,24 @@
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); }
2
1
  import * as React from "react";
3
2
  import { StyleSheet, View } from "react-native";
4
3
  import { withTheme } from "../theming";
4
+ const Divider = _ref => {
5
+ let {
6
+ style,
7
+ color,
8
+ theme: {
9
+ colors
10
+ },
11
+ ...rest
12
+ } = _ref;
13
+ return /*#__PURE__*/React.createElement(View, {
14
+ style: [{
15
+ backgroundColor: color || colors.divider,
16
+ height: StyleSheet.hairlineWidth
17
+ }, style],
18
+ ...rest
19
+ });
20
+ };
21
+ export default withTheme(Divider);ing";
5
22
  const Divider = _ref => {
6
23
  let {
7
24
  style,
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { Animated, StyleSheet, View } from "react-native";
4
3
  import shadow from "../styles/shadow";
@@ -19,7 +18,20 @@ const Elevation = _ref => {
19
18
  colors
20
19
  } = theme;
21
20
  const borderRadius = radius;
22
- return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
21
+ return /*#__PURE__*/React.createElement(Animated.View, {
22
+ ...rest,
23
+ style: [{
24
+ borderRadius,
25
+ backgroundColor: colors.surface
26
+ }, elevation ? shadow(elevation) : null, style]
27
+ }, /*#__PURE__*/React.createElement(View, {
28
+ style: {
29
+ overflow: "hidden",
30
+ borderRadius
31
+ }
32
+ }, children));
33
+ };
34
+ export default withTheme(Elevation);React.createElement(Animated.View, _extends({}, rest, {
23
35
  style: [{
24
36
  borderRadius,
25
37
  backgroundColor: colors.surface
@@ -46,7 +46,6 @@ const FieldSearchBarFull = _ref => {
46
46
  lineHeight,
47
47
  ...typeStyles
48
48
  } = typography.body2; // eslint-disable-line @typescript-eslint/no-unused-vars
49
-
50
49
  const handleChangeText = newValue => {
51
50
  setInternalValue(newValue);
52
51
  if (onChange) {
@@ -84,4 +83,4 @@ const styles = StyleSheet.create({
84
83
  alignItems: "center"
85
84
  }
86
85
  });
87
- export default withTheme(FieldSearchBarFull);
86
+ export default withTheme(FieldSearchBarFull);;
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { Text, StyleSheet } from "react-native";
4
3
  import { extractStyles } from "../utilities";
@@ -17,11 +16,27 @@ export default function FormRow(_ref) {
17
16
  textStyles,
18
17
  viewStyles
19
18
  } = extractStyles(style);
20
- return /*#__PURE__*/React.createElement(Touchable, _extends({
19
+ return /*#__PURE__*/React.createElement(Touchable, {
21
20
  disabled: disabled,
22
21
  onPress: onPress,
23
22
  style: [styles.row, {
24
23
  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
25
40
  }, viewStyles]
26
41
  }, rest), /*#__PURE__*/React.createElement(Text, {
27
42
  style: textStyles
@@ -1,4 +1,3 @@
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); }
2
1
  /* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
3
2
  import React from "react";
4
3
  import { Image as NativeImage, StyleSheet } from "react-native";
@@ -56,7 +55,24 @@ const Image = _ref2 => {
56
55
  height,
57
56
  aspectRatio
58
57
  }]
59
- }, /*#__PURE__*/React.createElement(NativeImage, _extends({}, props, {
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, {
60
76
  source: imageSource,
61
77
  resizeMode: resizeMode,
62
78
  style: [style, {
@@ -1,8 +1,5 @@
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); }
2
1
  import * as React from "react";
3
2
  import { View } from "react-native";
4
- // @ts-ignore
5
-
6
3
  export function Center(_ref) {
7
4
  let {
8
5
  width = 240,
@@ -12,15 +9,16 @@ export function Center(_ref) {
12
9
  style,
13
10
  ...rest
14
11
  } = _ref;
15
- return /*#__PURE__*/React.createElement(View, _extends({
12
+ return /*#__PURE__*/React.createElement(View, {
16
13
  style: [{
17
14
  justifyContent: "center",
18
15
  alignItems: "center",
19
16
  width,
20
17
  height,
21
18
  backgroundColor: bgColor
22
- }, style]
23
- }, rest), children);
19
+ }, style],
20
+ ...rest
21
+ }, children);
24
22
  }
25
23
  export function Circle(_ref2) {
26
24
  let {
@@ -31,7 +29,7 @@ export function Circle(_ref2) {
31
29
  ...rest
32
30
  } = _ref2;
33
31
  const borderRadius = 1000;
34
- return /*#__PURE__*/React.createElement(Center, _extends({
32
+ return /*#__PURE__*/React.createElement(Center, {
35
33
  width: size,
36
34
  height: size,
37
35
  bgColor: bgColor,
@@ -39,8 +37,9 @@ export function Circle(_ref2) {
39
37
  backgroundColor: bgColor,
40
38
  borderRadius,
41
39
  overflow: "hidden"
42
- }]
43
- }, rest), children);
40
+ }],
41
+ ...rest
42
+ }, children);
44
43
  }
45
44
  export function Square(_ref3) {
46
45
  let {
@@ -50,12 +49,13 @@ export function Square(_ref3) {
50
49
  style,
51
50
  ...rest
52
51
  } = _ref3;
53
- return /*#__PURE__*/React.createElement(Center, _extends({
52
+ return /*#__PURE__*/React.createElement(Center, {
54
53
  style: style,
55
54
  width: size,
56
55
  height: size,
57
- bgColor: bgColor
58
- }, rest), children);
56
+ bgColor: bgColor,
57
+ ...rest
58
+ }, children);
59
59
  }
60
60
  export function Row(_ref4) {
61
61
  let {
@@ -65,15 +65,14 @@ export function Row(_ref4) {
65
65
  style,
66
66
  ...rest
67
67
  } = _ref4;
68
- return /*#__PURE__*/React.createElement(View, _extends({
69
- style: [style,
70
- // style goes first b/c we can't override these
71
- {
68
+ return /*#__PURE__*/React.createElement(View, {
69
+ style: [style, {
72
70
  alignItems,
73
71
  flexDirection: "row",
74
72
  justifyContent: justifyContent
75
- }]
76
- }, rest), children);
73
+ }],
74
+ ...rest
75
+ }, children);
77
76
  }
78
77
  export function Spacer(_ref5) {
79
78
  let {
@@ -85,14 +84,36 @@ export function Spacer(_ref5) {
85
84
  style,
86
85
  ...rest
87
86
  } = _ref5;
88
- return /*#__PURE__*/React.createElement(View, _extends({
87
+ return /*#__PURE__*/React.createElement(View, {
89
88
  style: [style, {
90
89
  paddingRight: right,
91
90
  paddingTop: top,
92
91
  paddingLeft: left,
93
92
  paddingBottom: bottom
94
- }]
95
- }, rest), children);
93
+ }],
94
+ ...rest
95
+ }, children);
96
+ }
97
+ export function Stack(_ref6) {
98
+ let {
99
+ children,
100
+ justifyContent = "flex-start",
101
+ alignItems = "flex-start",
102
+ style,
103
+ ...rest
104
+ } = _ref6;
105
+ return (
106
+ /*#__PURE__*/
107
+ // style must go first since we don't want justifyContent, alignItems overridden
108
+ React.createElement(View, {
109
+ style: [style, {
110
+ justifyContent,
111
+ alignItems
112
+ }],
113
+ ...rest
114
+ }, children)
115
+ );
116
+ }hildren);
96
117
  }
97
118
  export function Stack(_ref6) {
98
119
  let {
@@ -1,4 +1,3 @@
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); }
2
1
  import React, { useEffect, useState } from "react";
3
2
  import { TextInput } from "react-native";
4
3
  import { isString, isNumber, isNaN } from "lodash";
@@ -26,7 +25,6 @@ const NumberInput = _ref => {
26
25
  }
27
26
  return "0";
28
27
  };
29
-
30
28
  // set currentStringNumberValue as defaultValue prop if there is a differnce on first render only
31
29
  useEffect(() => {
32
30
  const defaultStringNumberValue = formatValueToStringNumber(defaultValue);
@@ -41,7 +39,6 @@ const NumberInput = _ref => {
41
39
  setCurrentStringNumberValue(newStringNumberValue);
42
40
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(number);
43
41
  };
44
-
45
42
  // run handleChangeText with value prop only when value prop changes (and first render to reset currentStringNumberValue)
46
43
  useEffect(() => {
47
44
  const nextStringNumberValue = formatValueToStringNumber(value);
@@ -50,6 +47,18 @@ const NumberInput = _ref => {
50
47
  }
51
48
  // eslint-disable-next-line react-hooks/exhaustive-deps
52
49
  }, [value]);
50
+ return /*#__PURE__*/React.createElement(TextInput, {
51
+ keyboardType: "numeric",
52
+ value: currentStringNumberValue,
53
+ onChangeText: handleChangeText,
54
+ ...props
55
+ });
56
+ };
57
+ export default NumberInput;alue) {
58
+ handleChangeText(nextStringNumberValue);
59
+ }
60
+ // eslint-disable-next-line react-hooks/exhaustive-deps
61
+ }, [value]);
53
62
  return /*#__PURE__*/React.createElement(TextInput, _extends({
54
63
  keyboardType: "numeric",
55
64
  value: currentStringNumberValue,
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { View, StyleSheet } from "react-native";
4
3
  import { SafeAreaView } from "react-native-safe-area-context";
@@ -11,7 +10,6 @@ import TextField from "../TextField";
11
10
  import Touchable from "../Touchable";
12
11
  import { extractStyles } from "../../utilities";
13
12
  const Picker = _ref => {
14
- var _options$find$label, _options$find;
15
13
  let {
16
14
  Icon,
17
15
  style,
@@ -25,6 +23,7 @@ const Picker = _ref => {
25
23
  },
26
24
  ...props
27
25
  } = _ref;
26
+ var _a, _b;
28
27
  const {
29
28
  viewStyles: {
30
29
  borderRadius,
@@ -65,26 +64,24 @@ const Picker = _ref => {
65
64
  };
66
65
 
67
66
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
68
- 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);
67
+ 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);
69
68
  return /*#__PURE__*/React.createElement(View, {
70
69
  style: [styles.container, viewStyles]
71
70
  }, /*#__PURE__*/React.createElement(Touchable, {
72
71
  disabled: disabled,
73
72
  onPress: toggleVisibility
74
- }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
73
+ }, /*#__PURE__*/React.createElement(TextField, {
74
+ ...props,
75
75
  value: String(selectedLabel),
76
- placeholder: placeholder
76
+ placeholder: placeholder,
77
77
  // @ts-ignore
78
- ,
79
- ref: textField // cannot determine if ref is of correct type due to component being wrapped in a withTheme()
80
- ,
78
+ ref: textField,
81
79
  disabled: disabled,
82
- pointerEvents: "none"
80
+ pointerEvents: "none",
83
81
  // @ts-expect-error
84
- ,
85
82
  style: stylesWithoutMargin,
86
83
  Icon: Icon
87
- }))), pickerVisible && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
84
+ })), pickerVisible && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
88
85
  style: [styles.picker, {
89
86
  backgroundColor: colors.divider
90
87
  }]
@@ -128,4 +125,32 @@ const styles = StyleSheet.create({
128
125
  alignSelf: "flex-end"
129
126
  }
130
127
  });
128
+ export default withTheme(Picker);nValueChange
129
+ }, options.map(o => /*#__PURE__*/React.createElement(NativePicker.Item, {
130
+ label: o.label,
131
+ value: o.value,
132
+ key: o.value
133
+ })))))));
134
+ };
135
+ const styles = StyleSheet.create({
136
+ container: {
137
+ alignSelf: "stretch"
138
+ },
139
+ picker: {
140
+ position: "absolute",
141
+ bottom: 0,
142
+ left: 0,
143
+ right: 0,
144
+ flexDirection: "row",
145
+ justifyContent: "center"
146
+ },
147
+ pickerContainer: {
148
+ backgroundColor: "white",
149
+ flexDirection: "column",
150
+ width: "100%"
151
+ },
152
+ closeButton: {
153
+ alignSelf: "flex-end"
154
+ }
155
+ });
131
156
  export default withTheme(Picker);
@@ -1,14 +1,29 @@
1
- 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; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- 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); }
4
1
  import * as React from "react";
5
2
  export default class PortalConsumer extends React.Component {
6
- constructor() {
7
- super(...arguments);
8
- _defineProperty(this, "key", void 0);
9
- }
10
3
  async componentDidMount() {
11
4
  this.checkManager();
5
+ // Delay updating to prevent React from going to infinite loop
6
+ await Promise.resolve();
7
+ this.key = this.props.manager.mount(this.props.children);
8
+ }
9
+ componentDidUpdate() {
10
+ this.checkManager();
11
+ this.props.manager.update(this.key, this.props.children);
12
+ }
13
+ componentWillUnmount() {
14
+ this.checkManager();
15
+ this.props.manager.unmount(this.key);
16
+ }
17
+ checkManager() {
18
+ if (!this.props.manager) {
19
+ 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");
20
+ }
21
+ }
22
+ render() {
23
+ return null;
24
+ }
25
+ }sync componentDidMount() {
26
+ this.checkManager();
12
27
 
13
28
  // Delay updating to prevent React from going to infinite loop
14
29
  await Promise.resolve();
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import Config from "../Config";
4
3
  import IconButton from "../IconButton";
@@ -30,6 +29,19 @@ const RadioButton = _ref => {
30
29
  onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
31
30
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
32
31
  };
32
+ return /*#__PURE__*/React.createElement(IconButton, {
33
+ Icon: Icon,
34
+ icon: isSelected ? selectedIcon : unselectedIcon,
35
+ color: isSelected ? color : unselectedColor,
36
+ disabled: disabled,
37
+ onPress: handlePress,
38
+ size: size,
39
+ style: style,
40
+ ...rest
41
+ });
42
+ };
43
+ export default RadioButton;: onValueChange(realValue);
44
+ };
33
45
  return /*#__PURE__*/React.createElement(IconButton, _extends({
34
46
  Icon: Icon,
35
47
  icon: isSelected ? selectedIcon : unselectedIcon,
@@ -1,4 +1,3 @@
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); }
2
1
  import * as React from "react";
3
2
  import { View } from "react-native";
4
3
  import { getValueForRadioButton } from "../../utilities";
@@ -42,7 +41,22 @@ const RadioButtonGroup = _ref => {
42
41
  alignItems: "center"
43
42
  });
44
43
  }
45
- return /*#__PURE__*/React.createElement(View, _extends({
44
+ return /*#__PURE__*/React.createElement(View, {
45
+ style: [{
46
+ minHeight: 40
47
+ }, style],
48
+ ...rest
49
+ }, /*#__PURE__*/React.createElement(Provider, {
50
+ value: {
51
+ value: internalValue,
52
+ onValueChange: handleValueChange,
53
+ direction
54
+ }
55
+ }, /*#__PURE__*/React.createElement(View, {
56
+ style: _containerStyle
57
+ }, children)));
58
+ };
59
+ export default RadioButtonGroup;xtends({
46
60
  style: [{
47
61
  minHeight: 40
48
62
  }, style]