@draftbit/core 46.10.3-6f5759.2 → 46.10.3-7476ab.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 (184) hide show
  1. package/lib/commonjs/components/AnimatedCircularProgress.js +12 -1
  2. package/lib/commonjs/components/AspectRatio.js +17 -1
  3. package/lib/commonjs/components/BottomSheet/BottomSheet.js +22 -4
  4. package/lib/commonjs/components/Button.js +33 -10
  5. package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -5
  6. package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
  7. package/lib/commonjs/components/Checkbox/context.js +1 -1
  8. package/lib/commonjs/components/CircleImage.js +15 -1
  9. package/lib/commonjs/components/CircularProgress.js +26 -8
  10. package/lib/commonjs/components/DatePicker/DatePicker.js +26 -13
  11. package/lib/commonjs/components/Divider.js +14 -1
  12. package/lib/commonjs/components/Elevation.js +14 -2
  13. package/lib/commonjs/components/Image.js +17 -2
  14. package/lib/commonjs/components/Picker/PickerComponent.android.js +20 -3
  15. package/lib/commonjs/components/Portal/PortalHost.js +44 -15
  16. package/lib/commonjs/components/RadioButton/RadioButton.js +13 -2
  17. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +23 -5
  18. package/lib/commonjs/components/RadioButton/context.js +1 -1
  19. package/lib/commonjs/components/Shadow.js +15 -2
  20. package/lib/commonjs/components/StarRating.js +23 -4
  21. package/lib/commonjs/components/Switch.js +19 -10
  22. package/lib/commonjs/components/Table/Table.js +123 -0
  23. package/lib/commonjs/components/Table/TableCell.js +49 -0
  24. package/lib/commonjs/components/Table/TableCommon.js +30 -0
  25. package/lib/commonjs/components/Table/TableRow.js +61 -0
  26. package/lib/commonjs/components/Table/index.js +27 -0
  27. package/lib/commonjs/constants.js +1 -1
  28. package/lib/commonjs/index.js +19 -7
  29. package/lib/commonjs/mappings/FieldSearchBarFull.js +3 -1
  30. package/lib/commonjs/mappings/NativeBase/Layout.js +13 -12
  31. package/lib/commonjs/mappings/StarRating.js +6 -2
  32. package/lib/commonjs/mappings/Table.js +140 -0
  33. package/lib/module/components/AspectRatio.js +18 -1
  34. package/lib/module/components/BottomSheet/BottomSheet.js +24 -4
  35. package/lib/module/components/Button.js +33 -10
  36. package/lib/module/components/Checkbox/Checkbox.js +3 -4
  37. package/lib/module/components/Checkbox/CheckboxRow.js +24 -6
  38. package/lib/module/components/Checkbox/context.js +1 -1
  39. package/lib/module/components/DatePicker/DatePicker.js +27 -13
  40. package/lib/module/components/DeckSwiper/DeckSwiper.js +1 -4
  41. package/lib/module/components/DeprecatedButton.js +21 -3
  42. package/lib/module/components/Divider.js +18 -1
  43. package/lib/module/components/FormRow.js +17 -2
  44. package/lib/module/components/NumberInput.js +11 -3
  45. package/lib/module/components/Picker/PickerComponent.android.js +21 -3
  46. package/lib/module/components/Portal/PortalHost.js +45 -15
  47. package/lib/module/components/RadioButton/RadioButtonFieldGroup.js +10 -1
  48. package/lib/module/components/Shadow.js +15 -2
  49. package/lib/module/components/StarRating.js +24 -4
  50. package/lib/module/components/StepIndicator.js +58 -18
  51. package/lib/module/components/TabView/TabView.js +17 -7
  52. package/lib/module/components/Table/Table.js +115 -0
  53. package/lib/module/components/Table/TableCell.js +41 -0
  54. package/lib/module/components/Table/TableCommon.js +21 -0
  55. package/lib/module/components/Table/TableRow.js +52 -0
  56. package/lib/module/components/Table/index.js +3 -0
  57. package/lib/module/constants.js +1 -0
  58. package/lib/module/index.js +1 -1
  59. package/lib/module/mappings/FieldSearchBarFull.js +4 -1
  60. package/lib/module/mappings/NativeBase/Layout.js +14 -13
  61. package/lib/module/mappings/StarRating.js +7 -2
  62. package/lib/module/mappings/Table.js +133 -0
  63. package/lib/module/utilities.js +1 -2
  64. package/lib/typescript/src/components/Table/Table.d.ts +19 -0
  65. package/lib/typescript/src/components/Table/Table.d.ts.map +1 -0
  66. package/lib/typescript/src/components/Table/TableCell.d.ts +9 -0
  67. package/lib/typescript/src/components/Table/TableCell.d.ts.map +1 -0
  68. package/lib/typescript/src/components/Table/TableCommon.d.ts +20 -0
  69. package/lib/typescript/src/components/Table/TableCommon.d.ts.map +1 -0
  70. package/lib/typescript/src/components/{DeprecatedCardWrapper.d.ts → Table/TableRow.d.ts} +7 -8
  71. package/lib/typescript/src/components/Table/TableRow.d.ts.map +1 -0
  72. package/lib/typescript/src/components/Table/index.d.ts +4 -0
  73. package/lib/typescript/src/components/Table/index.d.ts.map +1 -0
  74. package/lib/typescript/src/index.d.ts +1 -1
  75. package/lib/typescript/src/index.d.ts.map +1 -1
  76. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +36 -20
  77. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
  78. package/lib/typescript/src/mappings/{CardBlock.d.ts → Table.d.ts} +129 -81
  79. package/lib/typescript/src/mappings/Table.d.ts.map +1 -0
  80. package/package.json +3 -3
  81. package/src/components/Table/Table.js +93 -0
  82. package/src/components/Table/Table.tsx +176 -0
  83. package/src/components/Table/TableCell.js +31 -0
  84. package/src/components/Table/TableCell.tsx +63 -0
  85. package/src/components/Table/TableCommon.js +12 -0
  86. package/src/components/Table/TableCommon.ts +40 -0
  87. package/src/components/Table/TableRow.js +37 -0
  88. package/src/components/Table/TableRow.tsx +77 -0
  89. package/src/components/Table/index.js +3 -0
  90. package/src/components/Table/index.tsx +3 -0
  91. package/src/index.js +1 -1
  92. package/src/index.tsx +2 -1
  93. package/src/mappings/NativeBase/Layout.js +24 -12
  94. package/src/mappings/NativeBase/Layout.ts +24 -12
  95. package/src/mappings/Table.js +150 -0
  96. package/src/mappings/Table.ts +170 -0
  97. package/lib/commonjs/components/Container.js +0 -93
  98. package/lib/commonjs/components/DeprecatedCardWrapper.js +0 -40
  99. package/lib/commonjs/components/DeprecatedFAB.js +0 -157
  100. package/lib/commonjs/components/ProgressIndicator.js +0 -55
  101. package/lib/commonjs/components/ResizeMode.js +0 -5
  102. package/lib/commonjs/mappings/CardBlock.js +0 -126
  103. package/lib/commonjs/mappings/CardContainer.js +0 -108
  104. package/lib/commonjs/mappings/CardContainerRating.js +0 -130
  105. package/lib/commonjs/mappings/CardContainerShortImage.js +0 -124
  106. package/lib/commonjs/mappings/CardInline.js +0 -59
  107. package/lib/commonjs/mappings/Container.js +0 -37
  108. package/lib/commonjs/mappings/HeaderLarge.js +0 -34
  109. package/lib/commonjs/mappings/HeaderMedium.js +0 -60
  110. package/lib/commonjs/mappings/HeaderOverline.js +0 -60
  111. package/lib/commonjs/mappings/ProgressIndicator.js +0 -188
  112. package/lib/module/components/Container.js +0 -83
  113. package/lib/module/components/DeprecatedCardWrapper.js +0 -32
  114. package/lib/module/components/DeprecatedFAB.js +0 -147
  115. package/lib/module/components/ProgressIndicator.js +0 -45
  116. package/lib/module/components/ResizeMode.js +0 -1
  117. package/lib/module/mappings/CardBlock.js +0 -119
  118. package/lib/module/mappings/CardContainer.js +0 -101
  119. package/lib/module/mappings/CardContainerRating.js +0 -123
  120. package/lib/module/mappings/CardContainerShortImage.js +0 -117
  121. package/lib/module/mappings/CardInline.js +0 -52
  122. package/lib/module/mappings/Container.js +0 -30
  123. package/lib/module/mappings/HeaderLarge.js +0 -27
  124. package/lib/module/mappings/HeaderMedium.js +0 -53
  125. package/lib/module/mappings/HeaderOverline.js +0 -53
  126. package/lib/module/mappings/ProgressIndicator.js +0 -181
  127. package/lib/typescript/src/components/Container.d.ts +0 -21
  128. package/lib/typescript/src/components/Container.d.ts.map +0 -1
  129. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +0 -1
  130. package/lib/typescript/src/components/DeprecatedFAB.d.ts +0 -56
  131. package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +0 -1
  132. package/lib/typescript/src/components/ProgressIndicator.d.ts +0 -24
  133. package/lib/typescript/src/components/ProgressIndicator.d.ts.map +0 -1
  134. package/lib/typescript/src/components/ResizeMode.d.ts +0 -2
  135. package/lib/typescript/src/components/ResizeMode.d.ts.map +0 -1
  136. package/lib/typescript/src/mappings/CardBlock.d.ts.map +0 -1
  137. package/lib/typescript/src/mappings/CardContainer.d.ts +0 -102
  138. package/lib/typescript/src/mappings/CardContainer.d.ts.map +0 -1
  139. package/lib/typescript/src/mappings/CardContainerRating.d.ts +0 -108
  140. package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +0 -1
  141. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +0 -139
  142. package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +0 -1
  143. package/lib/typescript/src/mappings/CardInline.d.ts +0 -62
  144. package/lib/typescript/src/mappings/CardInline.d.ts.map +0 -1
  145. package/lib/typescript/src/mappings/Container.d.ts +0 -55
  146. package/lib/typescript/src/mappings/Container.d.ts.map +0 -1
  147. package/lib/typescript/src/mappings/HeaderLarge.d.ts +0 -34
  148. package/lib/typescript/src/mappings/HeaderLarge.d.ts.map +0 -1
  149. package/lib/typescript/src/mappings/HeaderMedium.d.ts +0 -53
  150. package/lib/typescript/src/mappings/HeaderMedium.d.ts.map +0 -1
  151. package/lib/typescript/src/mappings/HeaderOverline.d.ts +0 -53
  152. package/lib/typescript/src/mappings/HeaderOverline.d.ts.map +0 -1
  153. package/lib/typescript/src/mappings/ProgressIndicator.d.ts +0 -181
  154. package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +0 -1
  155. package/src/components/Container.js +0 -43
  156. package/src/components/Container.tsx +0 -116
  157. package/src/components/DeprecatedCardWrapper.js +0 -18
  158. package/src/components/DeprecatedCardWrapper.tsx +0 -46
  159. package/src/components/DeprecatedFAB.js +0 -114
  160. package/src/components/DeprecatedFAB.tsx +0 -231
  161. package/src/components/ProgressIndicator.js +0 -27
  162. package/src/components/ProgressIndicator.tsx +0 -71
  163. package/src/components/ResizeMode.js +0 -1
  164. package/src/components/ResizeMode.ts +0 -7
  165. package/src/mappings/CardBlock.js +0 -123
  166. package/src/mappings/CardBlock.ts +0 -136
  167. package/src/mappings/CardContainer.js +0 -104
  168. package/src/mappings/CardContainer.ts +0 -116
  169. package/src/mappings/CardContainerRating.js +0 -126
  170. package/src/mappings/CardContainerRating.ts +0 -137
  171. package/src/mappings/CardContainerShortImage.js +0 -120
  172. package/src/mappings/CardContainerShortImage.ts +0 -130
  173. package/src/mappings/CardInline.js +0 -52
  174. package/src/mappings/CardInline.ts +0 -61
  175. package/src/mappings/Container.js +0 -30
  176. package/src/mappings/Container.ts +0 -41
  177. package/src/mappings/HeaderLarge.js +0 -29
  178. package/src/mappings/HeaderLarge.ts +0 -38
  179. package/src/mappings/HeaderMedium.js +0 -55
  180. package/src/mappings/HeaderMedium.ts +0 -63
  181. package/src/mappings/HeaderOverline.js +0 -55
  182. package/src/mappings/HeaderOverline.ts +0 -63
  183. package/src/mappings/ProgressIndicator.js +0 -181
  184. package/src/mappings/ProgressIndicator.ts +0 -190
@@ -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, Animated, Text, StyleSheet, I18nManager, TextInput as NativeTextInput, Keyboard } from "react-native";
4
3
  import { useSafeAreaInsets } from "react-native-safe-area-context";
@@ -83,24 +82,20 @@ const DatePicker = _ref => {
83
82
  focused ? _handleBlur() : _handleFocus();
84
83
  };
85
84
  const insets = useSafeAreaInsets();
86
-
87
85
  // const _restoreLabel = () =>
88
86
  // Animated.timing(labeled, {
89
87
  // toValue: 1,
90
88
  // duration: FOCUS_ANIMATION_DURATION,
91
89
  // useNativeDriver: true,
92
90
  // }).start();
93
-
94
91
  // const _minmizeLabel = () =>
95
92
  // Animated.timing(labeled, {
96
93
  // toValue: 0,
97
94
  // duration: BLUR_ANIMATION_DURATION,
98
95
  // useNativeDriver: true,
99
96
  // }).start();
100
-
101
97
  // const _showPlaceholder = () =>
102
98
  // setTimeout(() => setPlaceholder1(placeholder || ""), 50);
103
-
104
99
  const _hidePlaceholder = () => {
105
100
  setPlaceholder1("");
106
101
  };
@@ -255,9 +250,7 @@ const DatePicker = _ref => {
255
250
  const inputStyles = [styles.input, inputStyle, type === "solid" ? {
256
251
  marginHorizontal: 12
257
252
  } : {}];
258
-
259
253
  // const render = (props) => <NativeTextInput {...props} />;
260
-
261
254
  return /*#__PURE__*/React.createElement(View, {
262
255
  style: [styles.container, style]
263
256
  }, /*#__PURE__*/React.createElement(Touchable, {
@@ -267,9 +260,10 @@ const DatePicker = _ref => {
267
260
  pointerEvents: "none"
268
261
  }, /*#__PURE__*/React.createElement(View, {
269
262
  style: [styles.container, style]
270
- }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
263
+ }, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, {
264
+ ...leftIconProps,
271
265
  style: leftIconStyle
272
- })) : null, /*#__PURE__*/React.createElement(View, {
266
+ }) : null, /*#__PURE__*/React.createElement(View, {
273
267
  style: [containerStyle, style ? {
274
268
  height: style.height
275
269
  } : {}, viewStyles]
@@ -318,12 +312,13 @@ const DatePicker = _ref => {
318
312
  opacity: hasActiveOutline ? labeled : 1
319
313
  }],
320
314
  numberOfLines: 1
321
- }, label)) : null, leftIconName && leftIconMode === "inset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
315
+ }, label)) : null, leftIconName && leftIconMode === "inset" ? /*#__PURE__*/React.createElement(Icon, {
316
+ ...leftIconProps,
322
317
  style: {
323
318
  ...leftIconStyle,
324
319
  marginLeft: type === "solid" ? 16 : 0
325
320
  }
326
- })) : null, /*#__PURE__*/React.createElement(NativeTextInput, _extends({
321
+ }) : null, /*#__PURE__*/React.createElement(NativeTextInput, {
327
322
  value: formatDate(),
328
323
  placeholder: label ? placeholder1 : placeholder,
329
324
  editable: !disabled,
@@ -332,8 +327,9 @@ const DatePicker = _ref => {
332
327
  onFocus: _handleFocus,
333
328
  onBlur: _handleBlur,
334
329
  underlineColorAndroid: "transparent",
335
- style: [inputStyles, textStyles]
336
- }, props))), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
330
+ style: [inputStyles, textStyles],
331
+ ...props
332
+ })), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
337
333
  name: rightIconName,
338
334
  size: ICON_SIZE,
339
335
  color: colors.light,
@@ -404,4 +400,22 @@ const styles = StyleSheet.create({
404
400
  alignSelf: "flex-end"
405
401
  }
406
402
  });
403
+ export default withTheme(DatePicker);yContent: "center",
404
+ textAlignVertical: "center",
405
+ margin: 0,
406
+ textAlign: I18nManager.isRTL ? "right" : "left"
407
+ },
408
+ placeholder: {
409
+ position: "absolute",
410
+ left: 0
411
+ },
412
+ pickerContainer: {
413
+ flexDirection: "column",
414
+ width: "100%",
415
+ zIndex: 100
416
+ },
417
+ closeButton: {
418
+ alignSelf: "flex-end"
419
+ }
420
+ });
407
421
  export default withTheme(DatePicker);
@@ -24,7 +24,6 @@ const DeckSwiper = _ref => {
24
24
  console.warn("'children' of DeckSwiper ignored due to usage of 'data' and 'renderItem'");
25
25
  }
26
26
  const childrenArray = React.useMemo(() => React.Children.toArray(children), [children]);
27
-
28
27
  // an array of indices based on children count
29
28
  const cardsFillerData = React.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
30
29
  const cardsData = data || cardsFillerData;
@@ -51,7 +50,6 @@ const DeckSwiper = _ref => {
51
50
  return card === null || card === void 0 ? void 0 : card.toString();
52
51
  }
53
52
  };
54
-
55
53
  /**
56
54
  * By default react-native-deck-swiper positions everything with absolute position.
57
55
  * To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
@@ -61,7 +59,6 @@ const DeckSwiper = _ref => {
61
59
  * To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
62
60
  * This effectivley makes the default height of the container be the height of the first card.
63
61
  */
64
-
65
62
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
66
63
  style: styles.containerHeightFiller
67
64
  }, renderFirstCard()), /*#__PURE__*/React.createElement(DeckSwiperComponent, {
@@ -97,4 +94,4 @@ const styles = StyleSheet.create({
97
94
  opacity: 0.0
98
95
  }
99
96
  });
100
- export default DeckSwiper;
97
+ export default DeckSwiper;er;
@@ -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 { ActivityIndicator, View, Text, StyleSheet, Pressable } from "react-native";
4
3
  import color from "color";
@@ -75,7 +74,8 @@ const Button = _ref => {
75
74
  elevation,
76
75
  alignSelf: "stretch"
77
76
  }
78
- }, /*#__PURE__*/React.createElement(Pressable, _extends({}, rest, {
77
+ }, /*#__PURE__*/React.createElement(Pressable, {
78
+ ...rest,
79
79
  onPress: onPress,
80
80
  accessibilityState: {
81
81
  disabled
@@ -83,7 +83,7 @@ const Button = _ref => {
83
83
  accessibilityRole: "button",
84
84
  disabled: disabled || loading,
85
85
  style: [styles.button, buttonStyle]
86
- }), /*#__PURE__*/React.createElement(View, {
86
+ }, /*#__PURE__*/React.createElement(View, {
87
87
  style: styles.content
88
88
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(View, {
89
89
  style: iconStyle
@@ -114,4 +114,22 @@ const styles = StyleSheet.create({
114
114
  width: Config.buttonIconSize
115
115
  }
116
116
  });
117
+ export default withTheme(Button);: 1,
118
+ style: [textStyle, typography.button]
119
+ }, children))));
120
+ };
121
+ const styles = StyleSheet.create({
122
+ button: {
123
+ minWidth: 64,
124
+ borderStyle: "solid"
125
+ },
126
+ content: {
127
+ flexDirection: "row",
128
+ alignItems: "center",
129
+ justifyContent: "center"
130
+ },
131
+ icon: {
132
+ width: Config.buttonIconSize
133
+ }
134
+ });
117
135
  export default withTheme(Button);
@@ -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 { 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
  import React, { useEffect, useState } from "react";
3
2
  import { TextInput } from "react-native";
4
3
  import { isString, isNumber, isNaN } from "lodash";
@@ -32,7 +31,6 @@ const NumberInput = _ref => {
32
31
  setCurrentStringNumberValue(newStringNumberValue);
33
32
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(number);
34
33
  };
35
-
36
34
  // run handleChangeText with value prop only when value prop changes (and first render to reset currentStringNumberValue)
37
35
  useEffect(() => {
38
36
  const nextStringNumberValue = formatValueToStringNumber(value);
@@ -41,7 +39,6 @@ const NumberInput = _ref => {
41
39
  }
42
40
  // eslint-disable-next-line react-hooks/exhaustive-deps
43
41
  }, [value]);
44
-
45
42
  // set currentStringNumberValue as defaultValue prop if there is a differnce on first render only
46
43
  useEffect(() => {
47
44
  const defaultStringNumberValue = formatValueToStringNumber(defaultValue);
@@ -50,6 +47,17 @@ const NumberInput = _ref => {
50
47
  }
51
48
  // eslint-disable-next-line react-hooks/exhaustive-deps
52
49
  }, []);
50
+ return /*#__PURE__*/React.createElement(TextInput, {
51
+ keyboardType: "numeric",
52
+ value: currentStringNumberValue,
53
+ onChangeText: handleChangeText,
54
+ ...props
55
+ });
56
+ };
57
+ export default NumberInput; setCurrentStringNumberValue(defaultStringNumberValue);
58
+ }
59
+ // eslint-disable-next-line react-hooks/exhaustive-deps
60
+ }, []);
53
61
  return /*#__PURE__*/React.createElement(TextInput, _extends({
54
62
  keyboardType: "numeric",
55
63
  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 omit from "lodash.omit";
@@ -8,7 +7,6 @@ import { extractStyles } from "../../utilities";
8
7
  import TextField from "../TextField";
9
8
  import Touchable from "../Touchable";
10
9
  const Picker = _ref => {
11
- var _options$find$label, _options$find;
12
10
  let {
13
11
  style,
14
12
  options,
@@ -18,6 +16,7 @@ const Picker = _ref => {
18
16
  onValueChange: onValueChangeOverride = () => {},
19
17
  ...props
20
18
  } = _ref;
19
+ var _a, _b;
21
20
  const {
22
21
  viewStyles: {
23
22
  borderRadius,
@@ -62,7 +61,7 @@ const Picker = _ref => {
62
61
  };
63
62
 
64
63
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
65
- 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);
64
+ 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);
66
65
  return /*#__PURE__*/React.createElement(Touchable, {
67
66
  disabled: disabled,
68
67
  onPress: toggleFocus,
@@ -84,6 +83,25 @@ const Picker = _ref => {
84
83
  label: o.label,
85
84
  value: o.value,
86
85
  key: o.value
86
+ }))), /*#__PURE__*/React.createElement(View, {
87
+ pointerEvents: "none"
88
+ }, /*#__PURE__*/React.createElement(TextField, {
89
+ ...props,
90
+ value: selectedLabel,
91
+ placeholder: placeholder,
92
+ // @ts-ignore
93
+ ref: textField,
94
+ disabled: disabled,
95
+ // @ts-expect-error
96
+ style: stylesWithoutMargin
97
+ }))));
98
+ };
99
+ const styles = StyleSheet.create({
100
+ container: {
101
+ alignSelf: "stretch"
102
+ }
103
+ });
104
+ export default withTheme(Picker);y: o.value
87
105
  }))), /*#__PURE__*/React.createElement(View, {
88
106
  pointerEvents: "none"
89
107
  }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
@@ -1,11 +1,7 @@
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
  import { View, StyleSheet } from "react-native";
6
3
  import PortalManager from "./PortalManager";
7
4
  export const PortalContext = /*#__PURE__*/React.createContext(null);
8
-
9
5
  /**
10
6
  * Portal host renders all of its children `Portal` elements.
11
7
  * For example, you can wrap a screen in `Portal.Host` to render items above the screen.
@@ -33,10 +29,10 @@ export const PortalContext = /*#__PURE__*/React.createContext(null);
33
29
  export default class PortalHost extends React.Component {
34
30
  constructor() {
35
31
  super(...arguments);
36
- _defineProperty(this, "setManager", manager => {
32
+ this.setManager = manager => {
37
33
  this.manager = manager;
38
- });
39
- _defineProperty(this, "mount", children => {
34
+ };
35
+ this.mount = children => {
40
36
  const key = this.nextKey++;
41
37
  if (this.manager) {
42
38
  this.manager.mount(key, children);
@@ -48,8 +44,8 @@ export default class PortalHost extends React.Component {
48
44
  });
49
45
  }
50
46
  return key;
51
- });
52
- _defineProperty(this, "update", (key, children) => {
47
+ };
48
+ this.update = (key, children) => {
53
49
  if (this.manager) {
54
50
  this.manager.update(key, children);
55
51
  } else {
@@ -66,8 +62,8 @@ export default class PortalHost extends React.Component {
66
62
  this.queue.push(op);
67
63
  }
68
64
  }
69
- });
70
- _defineProperty(this, "unmount", key => {
65
+ };
66
+ this.unmount = key => {
71
67
  if (this.manager) {
72
68
  this.manager.unmount(key);
73
69
  } else {
@@ -76,10 +72,9 @@ export default class PortalHost extends React.Component {
76
72
  key
77
73
  });
78
74
  }
79
- });
80
- _defineProperty(this, "nextKey", 0);
81
- _defineProperty(this, "queue", []);
82
- _defineProperty(this, "manager", void 0);
75
+ };
76
+ this.nextKey = 0;
77
+ this.queue = [];
83
78
  }
84
79
  componentDidMount() {
85
80
  const manager = this.manager;
@@ -117,6 +112,41 @@ export default class PortalHost extends React.Component {
117
112
  }));
118
113
  }
119
114
  }
115
+ PortalHost.displayName = "Portal.Host";
116
+ const styles = StyleSheet.create({
117
+ container: {
118
+ flex: 1
119
+ }
120
+ }); switch (action.type) {
121
+ case "mount":
122
+ manager.mount(action.key, action.children);
123
+ break;
124
+ case "update":
125
+ manager.update(action.key, action.children);
126
+ break;
127
+ case "unmount":
128
+ manager.unmount(action.key);
129
+ break;
130
+ }
131
+ }
132
+ }
133
+ }
134
+ render() {
135
+ return /*#__PURE__*/React.createElement(PortalContext.Provider, {
136
+ value: {
137
+ mount: this.mount,
138
+ update: this.update,
139
+ unmount: this.unmount
140
+ }
141
+ }, /*#__PURE__*/React.createElement(View, {
142
+ style: styles.container,
143
+ collapsable: false,
144
+ pointerEvents: "box-none"
145
+ }, this.props.children), /*#__PURE__*/React.createElement(PortalManager, {
146
+ ref: this.setManager
147
+ }));
148
+ }
149
+ }
120
150
  _defineProperty(PortalHost, "displayName", "Portal.Host");
121
151
  const styles = StyleSheet.create({
122
152
  container: {
@@ -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 } from "react-native";
4
3
  import Text from "../Text";
@@ -20,6 +19,16 @@ const RadioButtonFieldGroup = _ref => {
20
19
  fontSize: theme.typography.headline4.fontSize,
21
20
  color: theme.typography.headline4.color
22
21
  }, labelStyle]
22
+ }, label), /*#__PURE__*/React.createElement(RadioButtonGroup, {
23
+ theme: theme,
24
+ ...rest
25
+ }, children));
26
+ };
27
+ export default withTheme(RadioButtonFieldGroup);}, /*#__PURE__*/React.createElement(Text, {
28
+ style: [{
29
+ fontSize: theme.typography.headline4.fontSize,
30
+ color: theme.typography.headline4.color
31
+ }, labelStyle]
23
32
  }, label), /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({
24
33
  theme: theme
25
34
  }, rest), children));
@@ -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 { Shadow as ShadowComponent } from "react-native-shadow-2";
4
3
  const Shadow = _ref => {
@@ -17,7 +16,7 @@ const Shadow = _ref => {
17
16
  style,
18
17
  ...rest
19
18
  } = _ref;
20
- return /*#__PURE__*/React.createElement(ShadowComponent, _extends({
19
+ return /*#__PURE__*/React.createElement(ShadowComponent, {
21
20
  offset: [offsetX, offsetY],
22
21
  sides: {
23
22
  start: showShadowSideStart,
@@ -32,6 +31,20 @@ const Shadow = _ref => {
32
31
  bottomEnd: showShadowCornerBottomEnd
33
32
  },
34
33
  containerStyle: style,
34
+ paintInside: paintInside,
35
+ ...rest
36
+ });
37
+ };
38
+ export default Shadow;hadowSideTop,
39
+ bottom: showShadowSideBottom
40
+ },
41
+ corners: {
42
+ topStart: showShadowCornerTopStart,
43
+ topEnd: showShadowCornerTopEnd,
44
+ bottomStart: showShadowCornerBottomStart,
45
+ bottomEnd: showShadowCornerBottomEnd
46
+ },
47
+ containerStyle: style,
35
48
  paintInside: paintInside
36
49
  }, rest));
37
50
  };
@@ -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, Pressable } from "react-native";
4
3
  import { withTheme } from "../theming";
@@ -32,9 +31,10 @@ const StarRating = _ref => {
32
31
  !!onPress && onPress(r);
33
32
  }, [onPress]);
34
33
  const ratingRounded = Math.round(localRating * 2) / 2;
35
- return /*#__PURE__*/React.createElement(View, _extends({
36
- style: [styles.container, style]
37
- }, rest), [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
34
+ return /*#__PURE__*/React.createElement(View, {
35
+ style: [styles.container, style],
36
+ ...rest
37
+ }, [...Array(maxStars)].map((_, i) => /*#__PURE__*/React.createElement(View, {
38
38
  key: i,
39
39
  style: {
40
40
  display: "flex"
@@ -74,4 +74,24 @@ const styles = StyleSheet.create({
74
74
  width: "50%"
75
75
  }
76
76
  });
77
+ export default withTheme(StarRating);ntainer: {
78
+ flexDirection: "row",
79
+ alignItems: "center"
80
+ },
81
+ touchContainer: {
82
+ display: "flex",
83
+ flexDirection: "row",
84
+ position: "absolute",
85
+ top: 0,
86
+ right: 0,
87
+ left: 0,
88
+ bottom: 0,
89
+ zIndex: 1
90
+ },
91
+ pressable: {
92
+ flex: 1,
93
+ height: "100%",
94
+ width: "50%"
95
+ }
96
+ });
77
97
  export default withTheme(StarRating);
@@ -1,6 +1,3 @@
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
  // @ts-nocheck
5
2
  import React, { Component } from "react";
6
3
  import { View, Text, StyleSheet, Animated, TouchableWithoutFeedback } from "react-native";
@@ -12,7 +9,7 @@ const STEP_STATUS = {
12
9
  export default class StepIndicator extends Component {
13
10
  constructor(props) {
14
11
  super(props);
15
- _defineProperty(this, "renderProgressBarBackground", () => {
12
+ this.renderProgressBarBackground = () => {
16
13
  const {
17
14
  stepCount,
18
15
  direction
@@ -55,8 +52,8 @@ export default class StepIndicator extends Component {
55
52
  },
56
53
  style: progressBarBackgroundStyle
57
54
  });
58
- });
59
- _defineProperty(this, "renderProgressBar", () => {
55
+ };
56
+ this.renderProgressBar = () => {
60
57
  const {
61
58
  stepCount,
62
59
  direction
@@ -86,8 +83,8 @@ export default class StepIndicator extends Component {
86
83
  return /*#__PURE__*/React.createElement(Animated.View, {
87
84
  style: progressBarStyle
88
85
  });
89
- });
90
- _defineProperty(this, "renderStepIndicator", () => {
86
+ };
87
+ this.renderStepIndicator = () => {
91
88
  let steps = [];
92
89
  const {
93
90
  stepCount,
@@ -118,8 +115,8 @@ export default class StepIndicator extends Component {
118
115
  height: this.state.customStyles.currentStepIndicatorSize
119
116
  }]
120
117
  }, steps);
121
- });
122
- _defineProperty(this, "renderStepLabels", () => {
118
+ };
119
+ this.renderStepLabels = () => {
123
120
  const {
124
121
  labels,
125
122
  direction,
@@ -161,8 +158,8 @@ export default class StepIndicator extends Component {
161
158
  alignItems: this.state.customStyles.labelAlign
162
159
  }]
163
160
  }, labelViews);
164
- });
165
- _defineProperty(this, "renderStep", position => {
161
+ };
162
+ this.renderStep = position => {
166
163
  const {
167
164
  renderStepIndicator
168
165
  } = this.props;
@@ -229,8 +226,8 @@ export default class StepIndicator extends Component {
229
226
  }) : /*#__PURE__*/React.createElement(Text, {
230
227
  style: indicatorLabelStyle
231
228
  }, "".concat(position + 1)));
232
- });
233
- _defineProperty(this, "getStepStatus", stepPosition => {
229
+ };
230
+ this.getStepStatus = stepPosition => {
234
231
  const {
235
232
  currentPosition
236
233
  } = this.props;
@@ -241,8 +238,8 @@ export default class StepIndicator extends Component {
241
238
  } else {
242
239
  return STEP_STATUS.UNFINISHED;
243
240
  }
244
- });
245
- _defineProperty(this, "onCurrentPositionChanged", position => {
241
+ };
242
+ this.onCurrentPositionChanged = position => {
246
243
  let {
247
244
  stepCount
248
245
  } = this.props;
@@ -262,7 +259,7 @@ export default class StepIndicator extends Component {
262
259
  toValue: this.state.customStyles.currentStepIndicatorSize / 2,
263
260
  duration: 100
264
261
  })])]).start();
265
- });
262
+ };
266
263
  const defaultStyles = {
267
264
  stepIndicatorSize: 30,
268
265
  currentStepIndicatorSize: 40,
@@ -328,7 +325,6 @@ export default class StepIndicator extends Component {
328
325
  // ),
329
326
  // }));
330
327
  // }
331
-
332
328
  if (prevProps.currentPosition !== this.props.currentPosition) {
333
329
  this.onCurrentPositionChanged(this.props.currentPosition);
334
330
  }
@@ -369,6 +365,50 @@ const styles = StyleSheet.create({
369
365
  justifyContent: "center"
370
366
  }
371
367
  });
368
+ StepIndicator.defaultProps = {
369
+ currentPosition: 0,
370
+ stepCount: 5,
371
+ customStyles: {},
372
+ direction: "horizontal"
373
+ };rrentPositionChanged(this.props.currentPosition);
374
+ }
375
+ }
376
+ }
377
+ const styles = StyleSheet.create({
378
+ container: {
379
+ backgroundColor: "transparent"
380
+ },
381
+ stepIndicatorContainer: {
382
+ flexDirection: "row",
383
+ alignItems: "center",
384
+ justifyContent: "space-around",
385
+ backgroundColor: "transparent"
386
+ },
387
+ stepLabelsContainer: {
388
+ justifyContent: "space-around"
389
+ },
390
+ step: {
391
+ alignItems: "center",
392
+ justifyContent: "center",
393
+ zIndex: 2
394
+ },
395
+ stepContainer: {
396
+ flex: 1,
397
+ flexDirection: "row",
398
+ alignItems: "center",
399
+ justifyContent: "center"
400
+ },
401
+ stepLabel: {
402
+ fontSize: 12,
403
+ textAlign: "center",
404
+ fontWeight: "500"
405
+ },
406
+ stepLabelItem: {
407
+ flex: 1,
408
+ alignItems: "center",
409
+ justifyContent: "center"
410
+ }
411
+ });
372
412
  StepIndicator.defaultProps = {
373
413
  currentPosition: 0,
374
414
  stepCount: 5,