@draftbit/core 46.7.3 → 46.7.4

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 (287) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +4 -23
  2. package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
  3. package/lib/commonjs/components/AvatarEdit.js +4 -15
  4. package/lib/commonjs/components/Button.js +10 -33
  5. package/lib/commonjs/components/Checkbox/Checkbox.js +4 -22
  6. package/lib/commonjs/components/Container.js +4 -15
  7. package/lib/commonjs/components/DeprecatedButton.js +3 -20
  8. package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -15
  9. package/lib/commonjs/components/Divider.js +1 -14
  10. package/lib/commonjs/components/Image.js +2 -17
  11. package/lib/commonjs/components/Justification.js +1 -5
  12. package/lib/commonjs/components/Picker/Picker.js +4 -9
  13. package/lib/commonjs/components/Portal/PortalHost.js +15 -44
  14. package/lib/commonjs/components/Portal/PortalManager.js +8 -34
  15. package/lib/commonjs/components/ProgressBar.js +7 -37
  16. package/lib/commonjs/components/ResizeMode.js +1 -5
  17. package/lib/commonjs/components/Slider.js +4 -21
  18. package/lib/commonjs/components/Surface.js +2 -14
  19. package/lib/commonjs/components/TextField.js +28 -76
  20. package/lib/commonjs/components/Touchable.js +2 -15
  21. package/lib/commonjs/hooks.js +2 -1
  22. package/lib/commonjs/index.js +0 -56
  23. package/lib/commonjs/mappings/StarRating.js +2 -6
  24. package/lib/commonjs/utilities.js +2 -1
  25. package/lib/module/components/Button.js +10 -33
  26. package/lib/module/components/Checkbox/CheckboxGroupRow.js +5 -24
  27. package/lib/module/components/Checkbox/context.js +1 -1
  28. package/lib/module/components/CircleImage.js +1 -16
  29. package/lib/module/components/DeprecatedCardWrapper.js +1 -18
  30. package/lib/module/components/Divider.js +1 -18
  31. package/lib/module/components/Elevation.js +2 -14
  32. package/lib/module/components/FieldSearchBarFull.js +2 -1
  33. package/lib/module/components/FormRow.js +2 -17
  34. package/lib/module/components/Image.js +2 -18
  35. package/lib/module/components/Justification.js +0 -1
  36. package/lib/module/components/Layout.js +21 -42
  37. package/lib/module/components/NumberInput.js +3 -12
  38. package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
  39. package/lib/module/components/Portal/PortalConsumer.js +7 -22
  40. package/lib/module/components/RadioButton/RadioButton.js +1 -13
  41. package/lib/module/components/RadioButton/RadioButtonGroup.js +2 -16
  42. package/lib/module/components/RadioButton/RadioButtonRow.js +5 -24
  43. package/lib/module/components/ResizeMode.js +0 -1
  44. package/lib/module/components/Slider.js +4 -21
  45. package/lib/module/components/StepIndicator.js +18 -58
  46. package/lib/module/components/TextField.js +28 -78
  47. package/lib/module/components/ToggleButton.js +2 -16
  48. package/lib/module/components/Touchable.js +2 -15
  49. package/lib/module/constants.js +2 -1
  50. package/lib/module/index.js +0 -8
  51. package/lib/module/mappings/FieldSearchBarFull.js +1 -4
  52. package/lib/module/styles/overlay.js +3 -1
  53. package/lib/module/utilities.js +2 -1
  54. package/lib/typescript/src/index.d.ts +0 -8
  55. package/lib/typescript/src/index.d.ts.map +1 -1
  56. package/package.json +3 -3
  57. package/src/index.tsx +0 -8
  58. package/lib/commonjs/components/CardBlock.js +0 -115
  59. package/lib/commonjs/components/CardContainer.js +0 -138
  60. package/lib/commonjs/components/CardContainerRating.js +0 -133
  61. package/lib/commonjs/components/CardContainerShortImage.js +0 -84
  62. package/lib/commonjs/components/CardInline.js +0 -91
  63. package/lib/commonjs/components/Carousel.js +0 -130
  64. package/lib/commonjs/components/Header.js +0 -82
  65. package/lib/commonjs/components/HeaderLarge.js +0 -38
  66. package/lib/commonjs/components/HeaderMedium.js +0 -38
  67. package/lib/commonjs/components/HeaderOverline.js +0 -39
  68. package/lib/module/components/CardBlock.js +0 -108
  69. package/lib/module/components/CardContainer.js +0 -121
  70. package/lib/module/components/CardContainerRating.js +0 -135
  71. package/lib/module/components/CardContainerShortImage.js +0 -90
  72. package/lib/module/components/CardInline.js +0 -82
  73. package/lib/module/components/Carousel.js +0 -120
  74. package/lib/module/components/Header.js +0 -72
  75. package/lib/module/components/HeaderLarge.js +0 -28
  76. package/lib/module/components/HeaderMedium.js +0 -28
  77. package/lib/module/components/HeaderOverline.js +0 -29
  78. package/lib/typescript/src/components/CardBlock.d.ts +0 -21
  79. package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
  80. package/lib/typescript/src/components/CardContainer.d.ts +0 -23
  81. package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
  82. package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
  83. package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
  84. package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
  85. package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
  86. package/lib/typescript/src/components/CardInline.d.ts +0 -20
  87. package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
  88. package/lib/typescript/src/components/Carousel.d.ts +0 -15
  89. package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
  90. package/lib/typescript/src/components/Header.d.ts +0 -20
  91. package/lib/typescript/src/components/Header.d.ts.map +0 -1
  92. package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
  93. package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
  94. package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
  95. package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
  96. package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
  97. package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
  98. package/src/Provider.js +0 -9
  99. package/src/components/Accordion/AccordionGroup.js +0 -44
  100. package/src/components/Accordion/AccordionItem.js +0 -32
  101. package/src/components/Accordion/index.js +0 -2
  102. package/src/components/ActionSheet/ActionSheet.js +0 -45
  103. package/src/components/ActionSheet/ActionSheetCancel.js +0 -6
  104. package/src/components/ActionSheet/ActionSheetItem.js +0 -30
  105. package/src/components/ActionSheet/index.js +0 -3
  106. package/src/components/AnimatedCircularProgress.js +0 -43
  107. package/src/components/AspectRatio.js +0 -18
  108. package/src/components/AvatarEdit.js +0 -30
  109. package/src/components/Banner.js +0 -109
  110. package/src/components/Button.js +0 -114
  111. package/src/components/Card.js +0 -57
  112. package/src/components/CardBlock.js +0 -54
  113. package/src/components/CardBlock.tsx +0 -127
  114. package/src/components/CardContainer.js +0 -69
  115. package/src/components/CardContainer.tsx +0 -165
  116. package/src/components/CardContainerRating.js +0 -79
  117. package/src/components/CardContainerRating.tsx +0 -175
  118. package/src/components/CardContainerShortImage.js +0 -33
  119. package/src/components/CardContainerShortImage.tsx +0 -101
  120. package/src/components/CardInline.js +0 -36
  121. package/src/components/CardInline.tsx +0 -93
  122. package/src/components/Carousel.js +0 -68
  123. package/src/components/Carousel.tsx +0 -134
  124. package/src/components/Checkbox/Checkbox.js +0 -62
  125. package/src/components/Checkbox/CheckboxGroup.js +0 -21
  126. package/src/components/Checkbox/CheckboxGroupRow.js +0 -76
  127. package/src/components/Checkbox/CheckboxRow.js +0 -77
  128. package/src/components/Checkbox/context.js +0 -14
  129. package/src/components/Checkbox/index.js +0 -3
  130. package/src/components/CircleImage.js +0 -8
  131. package/src/components/CircularProgress.js +0 -81
  132. package/src/components/Config.js +0 -64
  133. package/src/components/Container.js +0 -43
  134. package/src/components/DatePicker/DatePicker.js +0 -377
  135. package/src/components/DatePicker/DatePickerComponent.js +0 -13
  136. package/src/components/DatePicker/DatePickerComponent.web.js +0 -30
  137. package/src/components/DatePicker/DatePickerComponentType.js +0 -1
  138. package/src/components/DeprecatedButton.js +0 -83
  139. package/src/components/DeprecatedCardWrapper.js +0 -18
  140. package/src/components/DeprecatedFAB.js +0 -114
  141. package/src/components/Divider.js +0 -13
  142. package/src/components/Elevation.js +0 -20
  143. package/src/components/FAB.js +0 -46
  144. package/src/components/FieldSearchBarFull.js +0 -53
  145. package/src/components/FormRow.js +0 -19
  146. package/src/components/Header.js +0 -44
  147. package/src/components/Header.tsx +0 -105
  148. package/src/components/HeaderLarge.js +0 -7
  149. package/src/components/HeaderLarge.tsx +0 -40
  150. package/src/components/HeaderMedium.js +0 -7
  151. package/src/components/HeaderMedium.tsx +0 -41
  152. package/src/components/HeaderOverline.js +0 -7
  153. package/src/components/HeaderOverline.tsx +0 -42
  154. package/src/components/IconButton.js +0 -35
  155. package/src/components/Image.js +0 -47
  156. package/src/components/Justification.js +0 -1
  157. package/src/components/Layout.js +0 -50
  158. package/src/components/NumberInput.js +0 -49
  159. package/src/components/Picker/Picker.js +0 -267
  160. package/src/components/Picker/PickerComponent.android.js +0 -69
  161. package/src/components/Picker/PickerComponent.ios.js +0 -79
  162. package/src/components/Picker/PickerComponent.web.js +0 -70
  163. package/src/components/Picker/PickerTypes.js +0 -1
  164. package/src/components/Portal/Portal.js +0 -35
  165. package/src/components/Portal/PortalConsumer.js +0 -27
  166. package/src/components/Portal/PortalHost.js +0 -107
  167. package/src/components/Portal/PortalManager.js +0 -32
  168. package/src/components/Pressable.js +0 -12
  169. package/src/components/ProgressBar.js +0 -118
  170. package/src/components/ProgressCircle.js +0 -13
  171. package/src/components/ProgressIndicator.js +0 -27
  172. package/src/components/RadioButton/RadioButton.js +0 -17
  173. package/src/components/RadioButton/RadioButtonFieldGroup.js +0 -17
  174. package/src/components/RadioButton/RadioButtonGroup.js +0 -43
  175. package/src/components/RadioButton/RadioButtonRow.js +0 -76
  176. package/src/components/RadioButton/context.js +0 -14
  177. package/src/components/RadioButton/index.js +0 -4
  178. package/src/components/ResizeMode.js +0 -1
  179. package/src/components/Row.js +0 -48
  180. package/src/components/RowBodyIcon.js +0 -8
  181. package/src/components/RowHeadlineImageCaption.js +0 -12
  182. package/src/components/RowHeadlineImageIcon.js +0 -14
  183. package/src/components/SVG.js +0 -13
  184. package/src/components/ScreenContainer.js +0 -34
  185. package/src/components/Slider.js +0 -63
  186. package/src/components/StarRating.js +0 -50
  187. package/src/components/StepIndicator.js +0 -346
  188. package/src/components/Stepper.js +0 -41
  189. package/src/components/Surface.js +0 -32
  190. package/src/components/Swiper/Swiper.js +0 -29
  191. package/src/components/Swiper/SwiperItem.js +0 -9
  192. package/src/components/Swiper/index.js +0 -2
  193. package/src/components/Switch.js +0 -56
  194. package/src/components/Text.js +0 -33
  195. package/src/components/TextField.js +0 -428
  196. package/src/components/ToggleButton.js +0 -39
  197. package/src/components/Touchable.js +0 -12
  198. package/src/components/Touchable.web.js +0 -2
  199. package/src/components/Typography.js +0 -36
  200. package/src/components/useAuthState.js +0 -31
  201. package/src/constants.js +0 -10
  202. package/src/hooks.js +0 -12
  203. package/src/index.js +0 -53
  204. package/src/interfaces/Icon.js +0 -8
  205. package/src/mappings/Accordion.js +0 -41
  206. package/src/mappings/AccordionItem.js +0 -16
  207. package/src/mappings/ActionSheet.js +0 -13
  208. package/src/mappings/ActionSheetCancel.js +0 -19
  209. package/src/mappings/ActionSheetItem.js +0 -23
  210. package/src/mappings/ActivityIndicator.js +0 -58
  211. package/src/mappings/AudioPlayer.js +0 -57
  212. package/src/mappings/AvatarEdit.js +0 -38
  213. package/src/mappings/Banner.js +0 -32
  214. package/src/mappings/BlurView.js +0 -42
  215. package/src/mappings/Button.js +0 -116
  216. package/src/mappings/Card.js +0 -52
  217. package/src/mappings/CardBlock.js +0 -123
  218. package/src/mappings/CardContainer.js +0 -104
  219. package/src/mappings/CardContainerRating.js +0 -126
  220. package/src/mappings/CardContainerShortImage.js +0 -120
  221. package/src/mappings/CardInline.js +0 -52
  222. package/src/mappings/Carousel.js +0 -19
  223. package/src/mappings/Checkbox.js +0 -46
  224. package/src/mappings/CheckboxGroup.js +0 -26
  225. package/src/mappings/CheckboxRow.js +0 -61
  226. package/src/mappings/CircleImage.js +0 -25
  227. package/src/mappings/Container.js +0 -30
  228. package/src/mappings/CustomCode.js +0 -8
  229. package/src/mappings/DatePicker.js +0 -176
  230. package/src/mappings/Divider.js +0 -27
  231. package/src/mappings/FAB.js +0 -37
  232. package/src/mappings/Fetch.js +0 -13
  233. package/src/mappings/FieldSearchBarFull.js +0 -50
  234. package/src/mappings/FlashList.js +0 -85
  235. package/src/mappings/FlatList.js +0 -37
  236. package/src/mappings/HeaderLarge.js +0 -29
  237. package/src/mappings/HeaderMedium.js +0 -55
  238. package/src/mappings/HeaderOverline.js +0 -55
  239. package/src/mappings/Icon.js +0 -32
  240. package/src/mappings/IconButton.js +0 -35
  241. package/src/mappings/Image.js +0 -35
  242. package/src/mappings/ImageBackground.js +0 -29
  243. package/src/mappings/KeyboardAvoidingView.js +0 -41
  244. package/src/mappings/KeyboardAwareScrollView.js +0 -50
  245. package/src/mappings/Layout.js +0 -200
  246. package/src/mappings/LinearGradient.js +0 -77
  247. package/src/mappings/MapCallout.js +0 -21
  248. package/src/mappings/MapMarker.js +0 -47
  249. package/src/mappings/MapView.js +0 -139
  250. package/src/mappings/Modal.js +0 -42
  251. package/src/mappings/NumberInput.js +0 -254
  252. package/src/mappings/Picker.js +0 -148
  253. package/src/mappings/ProgressBar.js +0 -101
  254. package/src/mappings/ProgressCircle.js +0 -109
  255. package/src/mappings/ProgressIndicator.js +0 -181
  256. package/src/mappings/RadioButton.js +0 -51
  257. package/src/mappings/RadioButtonGroup.js +0 -17
  258. package/src/mappings/RadioButtonRow.js +0 -42
  259. package/src/mappings/RowBodyIcon.js +0 -75
  260. package/src/mappings/RowHeadlineImageCaption.js +0 -167
  261. package/src/mappings/RowHeadlineImageIcon.js +0 -99
  262. package/src/mappings/SVG.js +0 -20
  263. package/src/mappings/SafeAreaView.js +0 -33
  264. package/src/mappings/ScrollView.js +0 -31
  265. package/src/mappings/Slider.js +0 -60
  266. package/src/mappings/StarRating.js +0 -43
  267. package/src/mappings/Stepper.js +0 -32
  268. package/src/mappings/Surface.js +0 -14
  269. package/src/mappings/Swiper.js +0 -62
  270. package/src/mappings/SwiperItem.js +0 -8
  271. package/src/mappings/Switch.js +0 -81
  272. package/src/mappings/Text.js +0 -251
  273. package/src/mappings/TextArea.js +0 -274
  274. package/src/mappings/TextField.js +0 -391
  275. package/src/mappings/TextInput.js +0 -402
  276. package/src/mappings/ToggleButton.js +0 -50
  277. package/src/mappings/Touchable.js +0 -60
  278. package/src/mappings/Video.js +0 -81
  279. package/src/mappings/View.js +0 -207
  280. package/src/mappings/WebView.js +0 -88
  281. package/src/styles/DarkTheme.js +0 -26
  282. package/src/styles/DefaultTheme.js +0 -111
  283. package/src/styles/fonts.js +0 -62
  284. package/src/styles/overlay.js +0 -60
  285. package/src/styles/shadow.js +0 -51
  286. package/src/theming.js +0 -3
  287. package/src/utilities.js +0 -102
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { StyleSheet, View, Platform, Pressable } from "react-native";
3
4
  import Checkbox from "./Checkbox";
@@ -5,7 +6,7 @@ import Text from "../Text";
5
6
  import { useCheckboxGroupContext } from "./context";
6
7
  import { Direction as GroupDirection } from "./context";
7
8
  import { extractStyles } from "../../utilities";
8
- export var Direction;
9
+ export let Direction;
9
10
  (function (Direction) {
10
11
  Direction["Row"] = "row";
11
12
  Direction["RowReverse"] = "row-reverse";
@@ -62,14 +63,13 @@ const CheckboxGroupRow = _ref => {
62
63
  textStyles,
63
64
  viewStyles
64
65
  } = extractStyles(style);
65
- return /*#__PURE__*/React.createElement(Pressable, {
66
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
66
67
  onPress: handlePress,
67
68
  style: [styles.mainParent, {
68
69
  flexDirection: direction
69
70
  }, viewStyles],
70
- disabled: disabled,
71
- ...rest
72
- }, /*#__PURE__*/React.createElement(View, {
71
+ disabled: disabled
72
+ }, rest), /*#__PURE__*/React.createElement(View, {
73
73
  style: [styles.label, {
74
74
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
75
75
  }, labelContainerStyle]
@@ -107,23 +107,4 @@ 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
- });
129
110
  export default CheckboxGroupRow;
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- export var Direction;
2
+ export let Direction;
3
3
  (function (Direction) {
4
4
  Direction["Horizontal"] = "horizontal";
5
5
  Direction["Vertical"] = "vertical";
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { Image } from "react-native";
3
4
  import Config from "./Config";
@@ -9,22 +10,6 @@ const CircleImage = _ref => {
9
10
  ...props
10
11
  } = _ref;
11
12
  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;
28
13
  return /*#__PURE__*/React.createElement(Image, _extends({
29
14
  style: [{
30
15
  width: size,
@@ -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 { withTheme } from "../theming";
3
4
  import Touchable from "./Touchable";
@@ -12,24 +13,6 @@ const getWidth = numColumns => {
12
13
  }
13
14
  };
14
15
  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 => {
33
16
  let {
34
17
  numColumns = 3,
35
18
  children,
@@ -1,24 +1,7 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { StyleSheet, View } from "react-native";
3
4
  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";
22
5
  const Divider = _ref => {
23
6
  let {
24
7
  style,
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { Animated, StyleSheet, View } from "react-native";
3
4
  import shadow from "../styles/shadow";
@@ -18,20 +19,7 @@ const Elevation = _ref => {
18
19
  colors
19
20
  } = theme;
20
21
  const borderRadius = radius;
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, {
22
+ return /*#__PURE__*/React.createElement(Animated.View, _extends({}, rest, {
35
23
  style: [{
36
24
  borderRadius,
37
25
  backgroundColor: colors.surface
@@ -46,6 +46,7 @@ const FieldSearchBarFull = _ref => {
46
46
  lineHeight,
47
47
  ...typeStyles
48
48
  } = typography.body2; // eslint-disable-line @typescript-eslint/no-unused-vars
49
+
49
50
  const handleChangeText = newValue => {
50
51
  setInternalValue(newValue);
51
52
  if (onChange) {
@@ -83,4 +84,4 @@ const styles = StyleSheet.create({
83
84
  alignItems: "center"
84
85
  }
85
86
  });
86
- export default withTheme(FieldSearchBarFull);;
87
+ export default withTheme(FieldSearchBarFull);
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { Text, StyleSheet } from "react-native";
3
4
  import { extractStyles } from "../utilities";
@@ -16,27 +17,11 @@ export default function FormRow(_ref) {
16
17
  textStyles,
17
18
  viewStyles
18
19
  } = extractStyles(style);
19
- return /*#__PURE__*/React.createElement(Touchable, {
20
+ return /*#__PURE__*/React.createElement(Touchable, _extends({
20
21
  disabled: disabled,
21
22
  onPress: onPress,
22
23
  style: [styles.row, {
23
24
  flexDirection: direction
24
- }, viewStyles],
25
- ...rest
26
- }, /*#__PURE__*/React.createElement(Text, {
27
- style: textStyles
28
- }, label), children);
29
- }
30
- const styles = StyleSheet.create({
31
- row: {
32
- marginLeft: 8,
33
- marginRight: 8,
34
- flexDirection: "row",
35
- justifyContent: "space-between",
36
- alignItems: "center"
37
- }
38
- });styles.row, {
39
- flexDirection: direction
40
25
  }, viewStyles]
41
26
  }, rest), /*#__PURE__*/React.createElement(Text, {
42
27
  style: textStyles
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  /* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
2
3
  import React from "react";
3
4
  import { Image as NativeImage, StyleSheet } from "react-native";
@@ -55,24 +56,7 @@ const Image = _ref2 => {
55
56
  height,
56
57
  aspectRatio
57
58
  }]
58
- }, /*#__PURE__*/React.createElement(NativeImage, {
59
- ...props,
60
- source: imageSource,
61
- resizeMode: resizeMode,
62
- style: [style, {
63
- height: "100%",
64
- width: "100%"
65
- }]
66
- }));
67
- }
68
- return /*#__PURE__*/React.createElement(NativeImage, {
69
- ...props,
70
- source: source,
71
- resizeMode: resizeMode,
72
- style: style
73
- });
74
- };
75
- export default Image;eImage, _extends({}, props, {
59
+ }, /*#__PURE__*/React.createElement(NativeImage, _extends({}, props, {
76
60
  source: imageSource,
77
61
  resizeMode: resizeMode,
78
62
  style: [style, {
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +1,8 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { View } from "react-native";
4
+ // @ts-ignore
5
+
3
6
  export function Center(_ref) {
4
7
  let {
5
8
  width = 240,
@@ -9,16 +12,15 @@ export function Center(_ref) {
9
12
  style,
10
13
  ...rest
11
14
  } = _ref;
12
- return /*#__PURE__*/React.createElement(View, {
15
+ return /*#__PURE__*/React.createElement(View, _extends({
13
16
  style: [{
14
17
  justifyContent: "center",
15
18
  alignItems: "center",
16
19
  width,
17
20
  height,
18
21
  backgroundColor: bgColor
19
- }, style],
20
- ...rest
21
- }, children);
22
+ }, style]
23
+ }, rest), children);
22
24
  }
23
25
  export function Circle(_ref2) {
24
26
  let {
@@ -29,7 +31,7 @@ export function Circle(_ref2) {
29
31
  ...rest
30
32
  } = _ref2;
31
33
  const borderRadius = 1000;
32
- return /*#__PURE__*/React.createElement(Center, {
34
+ return /*#__PURE__*/React.createElement(Center, _extends({
33
35
  width: size,
34
36
  height: size,
35
37
  bgColor: bgColor,
@@ -37,9 +39,8 @@ export function Circle(_ref2) {
37
39
  backgroundColor: bgColor,
38
40
  borderRadius,
39
41
  overflow: "hidden"
40
- }],
41
- ...rest
42
- }, children);
42
+ }]
43
+ }, rest), children);
43
44
  }
44
45
  export function Square(_ref3) {
45
46
  let {
@@ -49,13 +50,12 @@ export function Square(_ref3) {
49
50
  style,
50
51
  ...rest
51
52
  } = _ref3;
52
- return /*#__PURE__*/React.createElement(Center, {
53
+ return /*#__PURE__*/React.createElement(Center, _extends({
53
54
  style: style,
54
55
  width: size,
55
56
  height: size,
56
- bgColor: bgColor,
57
- ...rest
58
- }, children);
57
+ bgColor: bgColor
58
+ }, rest), children);
59
59
  }
60
60
  export function Row(_ref4) {
61
61
  let {
@@ -65,14 +65,15 @@ export function Row(_ref4) {
65
65
  style,
66
66
  ...rest
67
67
  } = _ref4;
68
- return /*#__PURE__*/React.createElement(View, {
69
- style: [style, {
68
+ return /*#__PURE__*/React.createElement(View, _extends({
69
+ style: [style,
70
+ // style goes first b/c we can't override these
71
+ {
70
72
  alignItems,
71
73
  flexDirection: "row",
72
74
  justifyContent: justifyContent
73
- }],
74
- ...rest
75
- }, children);
75
+ }]
76
+ }, rest), children);
76
77
  }
77
78
  export function Spacer(_ref5) {
78
79
  let {
@@ -84,36 +85,14 @@ export function Spacer(_ref5) {
84
85
  style,
85
86
  ...rest
86
87
  } = _ref5;
87
- return /*#__PURE__*/React.createElement(View, {
88
+ return /*#__PURE__*/React.createElement(View, _extends({
88
89
  style: [style, {
89
90
  paddingRight: right,
90
91
  paddingTop: top,
91
92
  paddingLeft: left,
92
93
  paddingBottom: bottom
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);
94
+ }]
95
+ }, rest), children);
117
96
  }
118
97
  export function Stack(_ref6) {
119
98
  let {
@@ -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, { useEffect, useState } from "react";
2
3
  import { TextInput } from "react-native";
3
4
  import { isString, isNumber, isNaN } from "lodash";
@@ -25,6 +26,7 @@ const NumberInput = _ref => {
25
26
  }
26
27
  return "0";
27
28
  };
29
+
28
30
  // set currentStringNumberValue as defaultValue prop if there is a differnce on first render only
29
31
  useEffect(() => {
30
32
  const defaultStringNumberValue = formatValueToStringNumber(defaultValue);
@@ -39,6 +41,7 @@ const NumberInput = _ref => {
39
41
  setCurrentStringNumberValue(newStringNumberValue);
40
42
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(number);
41
43
  };
44
+
42
45
  // run handleChangeText with value prop only when value prop changes (and first render to reset currentStringNumberValue)
43
46
  useEffect(() => {
44
47
  const nextStringNumberValue = formatValueToStringNumber(value);
@@ -47,18 +50,6 @@ const NumberInput = _ref => {
47
50
  }
48
51
  // eslint-disable-next-line react-hooks/exhaustive-deps
49
52
  }, [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]);
62
53
  return /*#__PURE__*/React.createElement(TextInput, _extends({
63
54
  keyboardType: "numeric",
64
55
  value: currentStringNumberValue,
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { View, StyleSheet } from "react-native";
3
4
  import { SafeAreaView } from "react-native-safe-area-context";
@@ -10,6 +11,7 @@ import TextField from "../TextField";
10
11
  import Touchable from "../Touchable";
11
12
  import { extractStyles } from "../../utilities";
12
13
  const Picker = _ref => {
14
+ var _options$find$label, _options$find;
13
15
  let {
14
16
  Icon,
15
17
  style,
@@ -23,7 +25,6 @@ const Picker = _ref => {
23
25
  },
24
26
  ...props
25
27
  } = _ref;
26
- var _a, _b;
27
28
  const {
28
29
  viewStyles: {
29
30
  borderRadius,
@@ -64,24 +65,26 @@ const Picker = _ref => {
64
65
  };
65
66
 
66
67
  const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
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);
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);
68
69
  return /*#__PURE__*/React.createElement(View, {
69
70
  style: [styles.container, viewStyles]
70
71
  }, /*#__PURE__*/React.createElement(Touchable, {
71
72
  disabled: disabled,
72
73
  onPress: toggleVisibility
73
- }, /*#__PURE__*/React.createElement(TextField, {
74
- ...props,
74
+ }, /*#__PURE__*/React.createElement(TextField, _extends({}, props, {
75
75
  value: String(selectedLabel),
76
- placeholder: placeholder,
76
+ placeholder: placeholder
77
77
  // @ts-ignore
78
- ref: textField,
78
+ ,
79
+ ref: textField // cannot determine if ref is of correct type due to component being wrapped in a withTheme()
80
+ ,
79
81
  disabled: disabled,
80
- pointerEvents: "none",
82
+ pointerEvents: "none"
81
83
  // @ts-expect-error
84
+ ,
82
85
  style: stylesWithoutMargin,
83
86
  Icon: Icon
84
- })), pickerVisible && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
87
+ }))), pickerVisible && /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
85
88
  style: [styles.picker, {
86
89
  backgroundColor: colors.divider
87
90
  }]
@@ -125,32 +128,4 @@ const styles = StyleSheet.create({
125
128
  alignSelf: "flex-end"
126
129
  }
127
130
  });
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
- });
156
131
  export default withTheme(Picker);
@@ -1,28 +1,13 @@
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); }
1
4
  import * as React from "react";
2
5
  export default class PortalConsumer extends React.Component {
3
- async componentDidMount() {
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);
6
+ constructor() {
7
+ super(...arguments);
8
+ _defineProperty(this, "key", void 0);
16
9
  }
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() {
10
+ async componentDidMount() {
26
11
  this.checkManager();
27
12
 
28
13
  // Delay updating to prevent React from going to infinite loop
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import Config from "../Config";
3
4
  import IconButton from "../IconButton";
@@ -29,19 +30,6 @@ const RadioButton = _ref => {
29
30
  onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
30
31
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
31
32
  };
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
- };
45
33
  return /*#__PURE__*/React.createElement(IconButton, _extends({
46
34
  Icon: Icon,
47
35
  icon: isSelected ? selectedIcon : unselectedIcon,
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { View } from "react-native";
3
4
  import { getValueForRadioButton } from "../../utilities";
@@ -41,22 +42,7 @@ const RadioButtonGroup = _ref => {
41
42
  alignItems: "center"
42
43
  });
43
44
  }
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({
45
+ return /*#__PURE__*/React.createElement(View, _extends({
60
46
  style: [{
61
47
  minHeight: 40
62
48
  }, style]
@@ -1,3 +1,4 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import * as React from "react";
2
3
  import { StyleSheet, View, Platform } from "react-native";
3
4
  import RadioButton from "./RadioButton";
@@ -6,7 +7,7 @@ import { useRadioButtonGroupContext } from "./context";
6
7
  import { Direction as GroupDirection } from "./context";
7
8
  import Touchable from "../Touchable";
8
9
  import { extractStyles, getValueForRadioButton } from "../../utilities";
9
- export var Direction;
10
+ export let Direction;
10
11
  (function (Direction) {
11
12
  Direction["Row"] = "row";
12
13
  Direction["RowReverse"] = "row-reverse";
@@ -62,14 +63,13 @@ const RadioButtonRow = _ref => {
62
63
  textStyles,
63
64
  viewStyles
64
65
  } = extractStyles(style);
65
- return /*#__PURE__*/React.createElement(Touchable, {
66
+ return /*#__PURE__*/React.createElement(Touchable, _extends({
66
67
  onPress: handlePress,
67
68
  style: [styles.mainParent, {
68
69
  flexDirection: direction
69
70
  }, viewStyles],
70
- disabled: disabled,
71
- ...rest
72
- }, /*#__PURE__*/React.createElement(View, {
71
+ disabled: disabled
72
+ }, rest), /*#__PURE__*/React.createElement(View, {
73
73
  style: [styles.label, {
74
74
  alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
75
75
  }, labelContainerStyle]
@@ -106,23 +106,4 @@ const styles = StyleSheet.create({
106
106
  flex: 3
107
107
  }
108
108
  });
109
- export default RadioButtonRow;.create({
110
- mainParent: {
111
- alignItems: "center",
112
- justifyContent: "space-around",
113
- paddingStart: 20,
114
- minHeight: 50,
115
- paddingEnd: 20,
116
- display: "flex",
117
- ...Platform.select({
118
- web: {
119
- cursor: "pointer",
120
- userSelect: "none"
121
- }
122
- })
123
- },
124
- label: {
125
- flex: 3
126
- }
127
- });
128
109
  export default RadioButtonRow;
@@ -1 +0,0 @@
1
- export {};