@draftbit/core 46.5.1-c6140a.2 → 46.5.1

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 (203) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/Button.js +10 -33
  3. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  4. package/lib/commonjs/components/CircleImage.js +1 -15
  5. package/lib/commonjs/components/CircularProgress.js +8 -26
  6. package/lib/commonjs/components/Container.js +4 -15
  7. package/lib/commonjs/components/Elevation.js +2 -14
  8. package/lib/commonjs/components/Justification.js +1 -5
  9. package/lib/commonjs/components/Picker/Picker.js +4 -4
  10. package/lib/commonjs/components/Picker/PickerComponent.android.js +3 -20
  11. package/lib/commonjs/components/Picker/PickerComponent.web.js +3 -20
  12. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  13. package/lib/commonjs/components/ResizeMode.js +1 -5
  14. package/lib/commonjs/hooks.js +2 -1
  15. package/lib/module/components/CardBlock.js +4 -14
  16. package/lib/module/components/CardContainer.js +4 -14
  17. package/lib/module/components/Carousel.js +8 -32
  18. package/lib/module/components/FieldSearchBarFull.js +2 -1
  19. package/lib/module/components/FormRow.js +2 -17
  20. package/lib/module/components/IconButton.js +4 -21
  21. package/lib/module/components/Image.js +2 -18
  22. package/lib/module/components/Justification.js +0 -1
  23. package/lib/module/components/ResizeMode.js +0 -1
  24. package/package.json +3 -3
  25. package/src/Provider.js +0 -9
  26. package/src/components/Accordion/AccordionGroup.js +0 -44
  27. package/src/components/Accordion/AccordionItem.js +0 -32
  28. package/src/components/Accordion/index.js +0 -2
  29. package/src/components/ActionSheet/ActionSheet.js +0 -45
  30. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  31. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  32. package/src/components/ActionSheet/index.js +0 -3
  33. package/src/components/AnimatedCircularProgress.js +0 -43
  34. package/src/components/AspectRatio.js +0 -18
  35. package/src/components/AvatarEdit.js +0 -30
  36. package/src/components/Banner.js +0 -109
  37. package/src/components/Button.js +0 -114
  38. package/src/components/Card.js +0 -57
  39. package/src/components/CardBlock.js +0 -54
  40. package/src/components/CardContainer.js +0 -69
  41. package/src/components/CardContainerRating.js +0 -79
  42. package/src/components/CardContainerShortImage.js +0 -33
  43. package/src/components/CardInline.js +0 -36
  44. package/src/components/Carousel.js +0 -68
  45. package/src/components/Checkbox/Checkbox.js +0 -63
  46. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  47. package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
  48. package/src/components/Checkbox/CheckboxRow.js +0 -78
  49. package/src/components/Checkbox/context.js +0 -14
  50. package/src/components/Checkbox/index.js +0 -3
  51. package/src/components/CircleImage.js +0 -8
  52. package/src/components/CircularProgress.js +0 -81
  53. package/src/components/Config.js +0 -64
  54. package/src/components/Container.js +0 -43
  55. package/src/components/DatePicker/DatePicker.js +0 -377
  56. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  57. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  58. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  59. package/src/components/DeprecatedButton.js +0 -95
  60. package/src/components/DeprecatedCardWrapper.js +0 -18
  61. package/src/components/DeprecatedFAB.js +0 -115
  62. package/src/components/Divider.js +0 -13
  63. package/src/components/Elevation.js +0 -20
  64. package/src/components/FAB.js +0 -46
  65. package/src/components/FieldSearchBarFull.js +0 -53
  66. package/src/components/FormRow.js +0 -19
  67. package/src/components/Header.js +0 -44
  68. package/src/components/HeaderLarge.js +0 -7
  69. package/src/components/HeaderMedium.js +0 -7
  70. package/src/components/HeaderOverline.js +0 -7
  71. package/src/components/IconButton.js +0 -35
  72. package/src/components/Image.js +0 -47
  73. package/src/components/Justification.js +0 -1
  74. package/src/components/Layout.js +0 -50
  75. package/src/components/NumberInput.js +0 -49
  76. package/src/components/Picker/Picker.js +0 -267
  77. package/src/components/Picker/PickerComponent.android.js +0 -69
  78. package/src/components/Picker/PickerComponent.ios.js +0 -79
  79. package/src/components/Picker/PickerComponent.web.js +0 -70
  80. package/src/components/Picker/PickerTypes.js +0 -1
  81. package/src/components/Portal/Portal.js +0 -35
  82. package/src/components/Portal/PortalConsumer.js +0 -27
  83. package/src/components/Portal/PortalHost.js +0 -107
  84. package/src/components/Portal/PortalManager.js +0 -32
  85. package/src/components/ProgressBar.js +0 -118
  86. package/src/components/ProgressCircle.js +0 -13
  87. package/src/components/ProgressIndicator.js +0 -27
  88. package/src/components/RadioButton/RadioButton.js +0 -17
  89. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  90. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  91. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  92. package/src/components/RadioButton/context.js +0 -14
  93. package/src/components/RadioButton/index.js +0 -4
  94. package/src/components/ResizeMode.js +0 -1
  95. package/src/components/Row.js +0 -48
  96. package/src/components/RowBodyIcon.js +0 -8
  97. package/src/components/RowHeadlineImageCaption.js +0 -12
  98. package/src/components/RowHeadlineImageIcon.js +0 -14
  99. package/src/components/SVG.js +0 -13
  100. package/src/components/ScreenContainer.js +0 -34
  101. package/src/components/Slider.js +0 -63
  102. package/src/components/StarRating.js +0 -50
  103. package/src/components/StepIndicator.js +0 -346
  104. package/src/components/Stepper.js +0 -41
  105. package/src/components/Surface.js +0 -32
  106. package/src/components/Swiper/Swiper.js +0 -29
  107. package/src/components/Swiper/SwiperItem.js +0 -9
  108. package/src/components/Swiper/index.js +0 -2
  109. package/src/components/Switch.js +0 -56
  110. package/src/components/Text.js +0 -33
  111. package/src/components/TextField.js +0 -428
  112. package/src/components/ToggleButton.js +0 -39
  113. package/src/components/Touchable.js +0 -12
  114. package/src/components/Touchable.web.js +0 -2
  115. package/src/components/Typography.js +0 -36
  116. package/src/components/useAuthState.js +0 -31
  117. package/src/constants.js +0 -10
  118. package/src/hooks.js +0 -12
  119. package/src/index.js +0 -52
  120. package/src/interfaces/Icon.js +0 -8
  121. package/src/mappings/Accordion.js +0 -41
  122. package/src/mappings/AccordionItem.js +0 -16
  123. package/src/mappings/ActionSheet.js +0 -13
  124. package/src/mappings/ActionSheetCancel.js +0 -19
  125. package/src/mappings/ActionSheetItem.js +0 -23
  126. package/src/mappings/ActivityIndicator.js +0 -58
  127. package/src/mappings/AudioPlayer.js +0 -57
  128. package/src/mappings/AvatarEdit.js +0 -38
  129. package/src/mappings/Banner.js +0 -32
  130. package/src/mappings/BlurView.js +0 -42
  131. package/src/mappings/Button.js +0 -87
  132. package/src/mappings/Card.js +0 -52
  133. package/src/mappings/CardBlock.js +0 -123
  134. package/src/mappings/CardContainer.js +0 -104
  135. package/src/mappings/CardContainerRating.js +0 -126
  136. package/src/mappings/CardContainerShortImage.js +0 -120
  137. package/src/mappings/CardInline.js +0 -52
  138. package/src/mappings/Carousel.js +0 -19
  139. package/src/mappings/Checkbox.js +0 -46
  140. package/src/mappings/CheckboxGroup.js +0 -26
  141. package/src/mappings/CheckboxRow.js +0 -61
  142. package/src/mappings/CircleImage.js +0 -25
  143. package/src/mappings/Container.js +0 -30
  144. package/src/mappings/CustomCode.js +0 -8
  145. package/src/mappings/DatePicker.js +0 -176
  146. package/src/mappings/Divider.js +0 -27
  147. package/src/mappings/FAB.js +0 -37
  148. package/src/mappings/Fetch.js +0 -13
  149. package/src/mappings/FieldSearchBarFull.js +0 -50
  150. package/src/mappings/FlashList.js +0 -33
  151. package/src/mappings/FlatList.js +0 -24
  152. package/src/mappings/HeaderLarge.js +0 -29
  153. package/src/mappings/HeaderMedium.js +0 -55
  154. package/src/mappings/HeaderOverline.js +0 -55
  155. package/src/mappings/Icon.js +0 -32
  156. package/src/mappings/IconButton.js +0 -35
  157. package/src/mappings/Image.js +0 -35
  158. package/src/mappings/ImageBackground.js +0 -29
  159. package/src/mappings/KeyboardAvoidingView.js +0 -41
  160. package/src/mappings/KeyboardAwareScrollView.js +0 -50
  161. package/src/mappings/Layout.js +0 -200
  162. package/src/mappings/LinearGradient.js +0 -77
  163. package/src/mappings/MapCallout.js +0 -21
  164. package/src/mappings/MapMarker.js +0 -47
  165. package/src/mappings/MapView.js +0 -139
  166. package/src/mappings/Modal.js +0 -42
  167. package/src/mappings/NumberInput.js +0 -254
  168. package/src/mappings/Picker.js +0 -148
  169. package/src/mappings/ProgressBar.js +0 -101
  170. package/src/mappings/ProgressCircle.js +0 -109
  171. package/src/mappings/ProgressIndicator.js +0 -181
  172. package/src/mappings/RadioButton.js +0 -51
  173. package/src/mappings/RadioButtonGroup.js +0 -17
  174. package/src/mappings/RadioButtonRow.js +0 -42
  175. package/src/mappings/RowBodyIcon.js +0 -75
  176. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  177. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  178. package/src/mappings/SVG.js +0 -20
  179. package/src/mappings/SafeAreaView.js +0 -33
  180. package/src/mappings/ScrollView.js +0 -31
  181. package/src/mappings/Slider.js +0 -60
  182. package/src/mappings/StarRating.js +0 -43
  183. package/src/mappings/Stepper.js +0 -32
  184. package/src/mappings/Surface.js +0 -14
  185. package/src/mappings/Swiper.js +0 -60
  186. package/src/mappings/SwiperItem.js +0 -8
  187. package/src/mappings/Switch.js +0 -81
  188. package/src/mappings/Text.js +0 -251
  189. package/src/mappings/TextArea.js +0 -274
  190. package/src/mappings/TextField.js +0 -391
  191. package/src/mappings/TextInput.js +0 -402
  192. package/src/mappings/ToggleButton.js +0 -50
  193. package/src/mappings/Touchable.js +0 -17
  194. package/src/mappings/Video.js +0 -81
  195. package/src/mappings/View.js +0 -207
  196. package/src/mappings/WebView.js +0 -88
  197. package/src/styles/DarkTheme.js +0 -26
  198. package/src/styles/DefaultTheme.js +0 -111
  199. package/src/styles/fonts.js +0 -62
  200. package/src/styles/overlay.js +0 -60
  201. package/src/styles/shadow.js +0 -51
  202. package/src/theming.js +0 -3
  203. package/src/utilities.js +0 -102
@@ -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;
@@ -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",
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -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,
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -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);