@draftbit/core 44.2.3-c421ea.2 → 46.0.1-125de2.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 (219) hide show
  1. package/lib/commonjs/Provider.js.map +1 -1
  2. package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  3. package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
  4. package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
  5. package/lib/commonjs/components/AspectRatio.js.map +1 -1
  6. package/lib/commonjs/components/AvatarEdit.js.map +1 -1
  7. package/lib/commonjs/components/Banner.js.map +1 -1
  8. package/lib/commonjs/components/Card.js.map +1 -1
  9. package/lib/commonjs/components/CardBlock.js.map +1 -1
  10. package/lib/commonjs/components/CardContainer.js.map +1 -1
  11. package/lib/commonjs/components/CardContainerRating.js.map +1 -1
  12. package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
  13. package/lib/commonjs/components/CardInline.js.map +1 -1
  14. package/lib/commonjs/components/Carousel.js +1 -3
  15. package/lib/commonjs/components/Carousel.js.map +1 -1
  16. package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
  17. package/lib/commonjs/components/CircleImage.js.map +1 -1
  18. package/lib/commonjs/components/CircularProgress.js.map +1 -1
  19. package/lib/commonjs/components/Container.js.map +1 -1
  20. package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
  21. package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
  22. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js +3 -3
  23. package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  24. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  25. package/lib/commonjs/components/Divider.js.map +1 -1
  26. package/lib/commonjs/components/Elevation.js.map +1 -1
  27. package/lib/commonjs/components/FAB.js.map +1 -1
  28. package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
  29. package/lib/commonjs/components/Header.js.map +1 -1
  30. package/lib/commonjs/components/HeaderLarge.js.map +1 -1
  31. package/lib/commonjs/components/HeaderMedium.js.map +1 -1
  32. package/lib/commonjs/components/HeaderOverline.js.map +1 -1
  33. package/lib/commonjs/components/IconButton.js.map +1 -1
  34. package/lib/commonjs/components/Picker/Picker.js +3 -3
  35. package/lib/commonjs/components/Picker/Picker.js.map +1 -1
  36. package/lib/commonjs/components/Picker/PickerComponent.android.js +2 -2
  37. package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -1
  38. package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
  39. package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -1
  40. package/lib/commonjs/components/Picker/PickerComponent.web.js +2 -2
  41. package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -1
  42. package/lib/commonjs/components/Portal/Portal.js.map +1 -1
  43. package/lib/commonjs/components/ProgressCircle.js.map +1 -1
  44. package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
  45. package/lib/commonjs/components/RadioButton/RadioButton.js +1 -1
  46. package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
  47. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  48. package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
  49. package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
  50. package/lib/commonjs/components/Row.js.map +1 -1
  51. package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
  52. package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
  53. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
  54. package/lib/commonjs/components/StarRating.js.map +1 -1
  55. package/lib/commonjs/components/Stepper.js +1 -1
  56. package/lib/commonjs/components/Stepper.js.map +1 -1
  57. package/lib/commonjs/components/Surface.js.map +1 -1
  58. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  59. package/lib/commonjs/components/ToggleButton.js.map +1 -1
  60. package/lib/commonjs/interfaces/Icon.js.map +1 -1
  61. package/lib/commonjs/mappings/KeyboardAvoidingView.js +2 -2
  62. package/lib/commonjs/mappings/KeyboardAvoidingView.js.map +1 -1
  63. package/lib/module/Provider.js.map +1 -1
  64. package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  65. package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -1
  66. package/lib/module/components/AnimatedCircularProgress.js.map +1 -1
  67. package/lib/module/components/AspectRatio.js.map +1 -1
  68. package/lib/module/components/AvatarEdit.js.map +1 -1
  69. package/lib/module/components/Banner.js.map +1 -1
  70. package/lib/module/components/Card.js.map +1 -1
  71. package/lib/module/components/CardBlock.js.map +1 -1
  72. package/lib/module/components/CardContainer.js.map +1 -1
  73. package/lib/module/components/CardContainerRating.js.map +1 -1
  74. package/lib/module/components/CardContainerShortImage.js.map +1 -1
  75. package/lib/module/components/CardInline.js.map +1 -1
  76. package/lib/module/components/Carousel.js +1 -3
  77. package/lib/module/components/Carousel.js.map +1 -1
  78. package/lib/module/components/Checkbox/Checkbox.js.map +1 -1
  79. package/lib/module/components/CircleImage.js.map +1 -1
  80. package/lib/module/components/CircularProgress.js.map +1 -1
  81. package/lib/module/components/Container.js.map +1 -1
  82. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  83. package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
  84. package/lib/module/components/DatePicker/DatePickerComponent.web.js +3 -3
  85. package/lib/module/components/DatePicker/DatePickerComponent.web.js.map +1 -1
  86. package/lib/module/components/DeprecatedButton.js.map +1 -1
  87. package/lib/module/components/DeprecatedCardWrapper.js.map +1 -1
  88. package/lib/module/components/DeprecatedFAB.js.map +1 -1
  89. package/lib/module/components/Divider.js.map +1 -1
  90. package/lib/module/components/Elevation.js.map +1 -1
  91. package/lib/module/components/FAB.js.map +1 -1
  92. package/lib/module/components/FieldSearchBarFull.js.map +1 -1
  93. package/lib/module/components/Header.js.map +1 -1
  94. package/lib/module/components/HeaderLarge.js.map +1 -1
  95. package/lib/module/components/HeaderMedium.js.map +1 -1
  96. package/lib/module/components/HeaderOverline.js.map +1 -1
  97. package/lib/module/components/IconButton.js.map +1 -1
  98. package/lib/module/components/Picker/Picker.js +3 -3
  99. package/lib/module/components/Picker/Picker.js.map +1 -1
  100. package/lib/module/components/Picker/PickerComponent.android.js +2 -2
  101. package/lib/module/components/Picker/PickerComponent.android.js.map +1 -1
  102. package/lib/module/components/Picker/PickerComponent.ios.js +2 -2
  103. package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -1
  104. package/lib/module/components/Picker/PickerComponent.web.js +2 -2
  105. package/lib/module/components/Picker/PickerComponent.web.js.map +1 -1
  106. package/lib/module/components/Portal/Portal.js.map +1 -1
  107. package/lib/module/components/ProgressCircle.js.map +1 -1
  108. package/lib/module/components/ProgressIndicator.js.map +1 -1
  109. package/lib/module/components/RadioButton/RadioButton.js +1 -1
  110. package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
  111. package/lib/module/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  112. package/lib/module/components/RadioButton/RadioButtonRow.js +1 -1
  113. package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
  114. package/lib/module/components/Row.js.map +1 -1
  115. package/lib/module/components/RowBodyIcon.js.map +1 -1
  116. package/lib/module/components/RowHeadlineImageCaption.js.map +1 -1
  117. package/lib/module/components/RowHeadlineImageIcon.js.map +1 -1
  118. package/lib/module/components/StarRating.js.map +1 -1
  119. package/lib/module/components/Stepper.js +1 -1
  120. package/lib/module/components/Stepper.js.map +1 -1
  121. package/lib/module/components/Surface.js.map +1 -1
  122. package/lib/module/components/Swiper/Swiper.js.map +1 -1
  123. package/lib/module/components/ToggleButton.js.map +1 -1
  124. package/lib/module/interfaces/Icon.js.map +1 -1
  125. package/lib/module/mappings/KeyboardAvoidingView.js +2 -2
  126. package/lib/module/mappings/KeyboardAvoidingView.js.map +1 -1
  127. package/lib/typescript/src/components/Accordion/AccordionGroup.d.ts +2 -3022
  128. package/lib/typescript/src/components/Accordion/AccordionItem.d.ts +2 -3010
  129. package/lib/typescript/src/components/ActionSheet/ActionSheetCancel.d.ts +1 -1
  130. package/lib/typescript/src/components/ActionSheet/ActionSheetItem.d.ts +1 -1
  131. package/lib/typescript/src/components/AnimatedCircularProgress.d.ts +1 -1
  132. package/lib/typescript/src/components/AspectRatio.d.ts +1 -1
  133. package/lib/typescript/src/components/AvatarEdit.d.ts +2 -2
  134. package/lib/typescript/src/components/Banner.d.ts +2 -2
  135. package/lib/typescript/src/components/Card.d.ts +2 -2
  136. package/lib/typescript/src/components/CardBlock.d.ts +2 -2
  137. package/lib/typescript/src/components/CardContainer.d.ts +2 -2
  138. package/lib/typescript/src/components/CardContainerRating.d.ts +2 -2
  139. package/lib/typescript/src/components/CardContainerShortImage.d.ts +2 -2
  140. package/lib/typescript/src/components/CardInline.d.ts +2 -2
  141. package/lib/typescript/src/components/Carousel.d.ts +4 -7
  142. package/lib/typescript/src/components/CircleImage.d.ts +1 -1
  143. package/lib/typescript/src/components/Container.d.ts +2 -2
  144. package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +2 -2
  145. package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts +1 -1
  146. package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
  147. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +2 -2
  148. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  149. package/lib/typescript/src/components/Divider.d.ts +2 -2
  150. package/lib/typescript/src/components/Elevation.d.ts +2 -2
  151. package/lib/typescript/src/components/FAB.d.ts +2 -2
  152. package/lib/typescript/src/components/FieldSearchBarFull.d.ts +2 -2
  153. package/lib/typescript/src/components/Header.d.ts +2 -2
  154. package/lib/typescript/src/components/HeaderLarge.d.ts +2 -2
  155. package/lib/typescript/src/components/HeaderMedium.d.ts +2 -2
  156. package/lib/typescript/src/components/HeaderOverline.d.ts +2 -2
  157. package/lib/typescript/src/components/IconButton.d.ts +2 -2
  158. package/lib/typescript/src/components/ProgressCircle.d.ts +2 -2
  159. package/lib/typescript/src/components/ProgressIndicator.d.ts +2 -2
  160. package/lib/typescript/src/components/RadioButton/RadioButtonFieldGroup.d.ts +2 -2
  161. package/lib/typescript/src/components/Row.d.ts +2 -2
  162. package/lib/typescript/src/components/RowBodyIcon.d.ts +2 -2
  163. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +2 -2
  164. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +2 -2
  165. package/lib/typescript/src/components/Slider.d.ts +2 -3032
  166. package/lib/typescript/src/components/StarRating.d.ts +2 -2
  167. package/lib/typescript/src/components/Surface.d.ts +2 -2
  168. package/lib/typescript/src/components/Switch.d.ts +2 -3018
  169. package/lib/typescript/src/components/ToggleButton.d.ts +2 -2
  170. package/lib/typescript/src/interfaces/Icon.d.ts +1 -3
  171. package/package.json +4 -4
  172. package/src/Provider.tsx +1 -0
  173. package/src/components/ActionSheet/ActionSheetCancel.tsx +1 -1
  174. package/src/components/ActionSheet/ActionSheetItem.js +1 -1
  175. package/src/components/ActionSheet/ActionSheetItem.tsx +6 -1
  176. package/src/components/AnimatedCircularProgress.tsx +1 -1
  177. package/src/components/AspectRatio.tsx +1 -1
  178. package/src/components/AvatarEdit.tsx +1 -1
  179. package/src/components/Banner.tsx +1 -1
  180. package/src/components/Card.tsx +1 -1
  181. package/src/components/CardBlock.tsx +1 -1
  182. package/src/components/CardContainer.tsx +1 -1
  183. package/src/components/CardContainerRating.tsx +1 -1
  184. package/src/components/CardContainerShortImage.tsx +1 -1
  185. package/src/components/CardInline.tsx +1 -1
  186. package/src/components/Carousel.tsx +2 -1
  187. package/src/components/Checkbox/Checkbox.tsx +76 -77
  188. package/src/components/CircleImage.tsx +1 -1
  189. package/src/components/CircularProgress.tsx +1 -0
  190. package/src/components/Container.tsx +1 -1
  191. package/src/components/DatePicker/DatePicker.tsx +1 -1
  192. package/src/components/DatePicker/DatePickerComponent.tsx +1 -1
  193. package/src/components/DeprecatedButton.tsx +1 -1
  194. package/src/components/DeprecatedCardWrapper.tsx +1 -1
  195. package/src/components/DeprecatedFAB.tsx +1 -1
  196. package/src/components/Divider.tsx +1 -1
  197. package/src/components/Elevation.tsx +6 -1
  198. package/src/components/FAB.tsx +1 -1
  199. package/src/components/FieldSearchBarFull.tsx +1 -1
  200. package/src/components/Header.tsx +1 -1
  201. package/src/components/HeaderLarge.tsx +1 -1
  202. package/src/components/HeaderMedium.tsx +1 -1
  203. package/src/components/HeaderOverline.tsx +1 -1
  204. package/src/components/IconButton.tsx +1 -1
  205. package/src/components/Portal/Portal.tsx +1 -0
  206. package/src/components/ProgressCircle.tsx +2 -1
  207. package/src/components/ProgressIndicator.tsx +1 -1
  208. package/src/components/RadioButton/RadioButtonFieldGroup.tsx +1 -1
  209. package/src/components/Row.tsx +1 -1
  210. package/src/components/RowBodyIcon.tsx +1 -1
  211. package/src/components/RowHeadlineImageCaption.tsx +1 -1
  212. package/src/components/RowHeadlineImageIcon.tsx +1 -1
  213. package/src/components/StarRating.tsx +2 -2
  214. package/src/components/Surface.tsx +1 -1
  215. package/src/components/Swiper/Swiper.tsx +1 -0
  216. package/src/components/ToggleButton.tsx +1 -1
  217. package/src/interfaces/Icon.ts +1 -1
  218. package/src/mappings/KeyboardAvoidingView.js +2 -2
  219. package/src/mappings/KeyboardAvoidingView.ts +2 -2
@@ -18,7 +18,7 @@ declare type Props = {
18
18
  style?: StyleProp<ViewStyle>;
19
19
  theme: Theme;
20
20
  } & IconSlot;
21
- declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<Props, "theme"> & {
21
+ declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
22
22
  theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
23
- }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<Props> & React.FC<Props>, {}>;
23
+ }> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
24
24
  export default _default;
@@ -8,9 +8,7 @@ import React from "react";
8
8
  import { ViewProps, StyleProp, ImageStyle } from "react-native";
9
9
  import { Subtract } from "utility-types";
10
10
  declare type Props = {
11
- name: string | number | {
12
- uri: string;
13
- };
11
+ name: string;
14
12
  color?: string;
15
13
  size: number;
16
14
  style?: StyleProp<ImageStyle>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "44.2.3-c421ea.2+c421ea59",
3
+ "version": "46.0.1-125de2.1+125de214",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^44.1.12",
44
+ "@draftbit/types": "^46.0.0",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -52,7 +52,7 @@
52
52
  "lodash.isnumber": "^3.0.3",
53
53
  "lodash.omit": "^4.5.0",
54
54
  "lodash.tonumber": "^4.0.3",
55
- "react-native-modal-datetime-picker": "^13.0.0",
55
+ "react-native-modal-datetime-picker": "^13.1.2",
56
56
  "react-native-typography": "^1.4.1",
57
57
  "react-native-web-swiper": "^2.2.3"
58
58
  },
@@ -78,5 +78,5 @@
78
78
  ]
79
79
  ]
80
80
  },
81
- "gitHead": "c421ea59335fbf8024b7a8f199f2a9c61af5ef55"
81
+ "gitHead": "125de214a9b4bfa36ceb9f4903fcb2b6403bccfe"
82
82
  }
package/src/Provider.tsx CHANGED
@@ -12,6 +12,7 @@ export default class Provider extends React.Component<Props> {
12
12
  render() {
13
13
  return (
14
14
  <PortalHost>
15
+ {/* @ts-ignore */}
15
16
  <ThemeProvider theme={this.props.theme}>
16
17
  {this.props.children}
17
18
  </ThemeProvider>
@@ -9,7 +9,7 @@ type Props = {
9
9
  onPress?: () => void;
10
10
  };
11
11
 
12
- const ActionSheetCancel: React.FC<Props> = ({
12
+ const ActionSheetCancel: React.FC<React.PropsWithChildren<Props>> = ({
13
13
  label = "Cancel",
14
14
  color,
15
15
  style,
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Text, StyleSheet, TouchableOpacity, } from "react-native";
3
3
  import { extractStyles } from "../../utilities";
4
- const ActionSheetItem = ({ label, style, color, onPress }) => {
4
+ const ActionSheetItem = ({ label, style, color, onPress, }) => {
5
5
  const { textStyles, viewStyles } = extractStyles(style);
6
6
  return (React.createElement(TouchableOpacity, { activeOpacity: 0.7, style: [styles.wrapper, viewStyles], onPress: onPress },
7
7
  React.createElement(Text, { style: [styles.label, textStyles, { color }] }, label)));
@@ -16,7 +16,12 @@ type Props = {
16
16
  onPress?: () => void;
17
17
  };
18
18
 
19
- const ActionSheetItem: React.FC<Props> = ({ label, style, color, onPress }) => {
19
+ const ActionSheetItem: React.FC<React.PropsWithChildren<Props>> = ({
20
+ label,
21
+ style,
22
+ color,
23
+ onPress,
24
+ }) => {
20
25
  const { textStyles, viewStyles } = extractStyles(style);
21
26
  return (
22
27
  <TouchableOpacity
@@ -20,7 +20,7 @@ type Props = {
20
20
  onAnimationComplete?: Animated.EndCallback | undefined;
21
21
  } & CircularProgressProps;
22
22
 
23
- const AnimatedCircularProgress: React.FC<Props> = ({
23
+ const AnimatedCircularProgress: React.FC<React.PropsWithChildren<Props>> = ({
24
24
  duration = 500,
25
25
  easing = Easing.out(Easing.ease),
26
26
  fill,
@@ -12,7 +12,7 @@ type Props = {
12
12
  style?: StyleProp<ViewStyle>;
13
13
  };
14
14
 
15
- const AspectRatio: React.FC<Props> = (props) => {
15
+ const AspectRatio: React.FC<React.PropsWithChildren<Props>> = (props) => {
16
16
  const [layout, setLayout] = React.useState<LayoutRectangle | null>(null);
17
17
  const { aspectRatio = 1, ...inputStyle } =
18
18
  StyleSheet.flatten(props.style) || {};
@@ -15,7 +15,7 @@ type Props = {
15
15
  theme: Theme;
16
16
  } & IconSlot;
17
17
 
18
- const AvatarEdit: React.FC<Props> = ({
18
+ const AvatarEdit: React.FC<React.PropsWithChildren<Props>> = ({
19
19
  Icon,
20
20
  image,
21
21
  size = 80,
@@ -43,7 +43,7 @@ type NativeEvent = {
43
43
  };
44
44
  };
45
45
 
46
- const Banner: React.FC<Props> = ({
46
+ const Banner: React.FC<React.PropsWithChildren<Props>> = ({
47
47
  initiallyVisible = true,
48
48
  dismissable = true,
49
49
  icon,
@@ -88,7 +88,7 @@ type Props = {
88
88
  children?: React.ReactNode;
89
89
  } & IconSlot;
90
90
 
91
- const Card: React.FC<Props> = ({
91
+ const Card: React.FC<React.PropsWithChildren<Props>> = ({
92
92
  Icon,
93
93
  image = Config.cardImageUrl,
94
94
  title,
@@ -28,7 +28,7 @@ type Props = {
28
28
  onPress: () => void;
29
29
  };
30
30
 
31
- const CardBlock: React.FC<Props> = ({
31
+ const CardBlock: React.FC<React.PropsWithChildren<Props>> = ({
32
32
  image = Config.cardImageUrl,
33
33
  title,
34
34
  leftDescription,
@@ -35,7 +35,7 @@ type Props = {
35
35
  onPress: () => void;
36
36
  } & IconSlot;
37
37
 
38
- const CardContainer: React.FC<Props> = ({
38
+ const CardContainer: React.FC<React.PropsWithChildren<Props>> = ({
39
39
  Icon,
40
40
  icon,
41
41
  image = Config.cardImageUrl,
@@ -36,7 +36,7 @@ type Props = {
36
36
  onPress: () => void;
37
37
  } & IconSlot;
38
38
 
39
- const CardContainerRating: React.FC<Props> = ({
39
+ const CardContainerRating: React.FC<React.PropsWithChildren<Props>> = ({
40
40
  Icon,
41
41
  icon,
42
42
  image = Config.cardImageUrl,
@@ -25,7 +25,7 @@ type Props = {
25
25
  onPress: () => void;
26
26
  };
27
27
 
28
- const CardContainerShortImage: React.FC<Props> = ({
28
+ const CardContainerShortImage: React.FC<React.PropsWithChildren<Props>> = ({
29
29
  image = Config.squareImageUrl,
30
30
  title,
31
31
  subtitle,
@@ -29,7 +29,7 @@ type Props = {
29
29
  onPress: () => void;
30
30
  };
31
31
 
32
- const CardInline: React.FC<Props> = ({
32
+ const CardInline: React.FC<React.PropsWithChildren<Props>> = ({
33
33
  image = Config.cardImageUrl,
34
34
  title,
35
35
  subtitle,
@@ -17,6 +17,7 @@ type Props = {
17
17
  children?: React.ReactNode;
18
18
  style?: StyleProp<ViewStyle>;
19
19
  dotColor?: string;
20
+ theme: any;
20
21
  };
21
22
 
22
23
  function Pager({
@@ -54,7 +55,7 @@ function Carousel({
54
55
  dotColor = "strong",
55
56
  style,
56
57
  ...rest
57
- }: Props) {
58
+ }: React.PropsWithChildren<Props>) {
58
59
  const [index, setIndex] = React.useState(0);
59
60
 
60
61
  const length = React.Children.count(children);
@@ -27,94 +27,93 @@ export interface CheckboxProps {
27
27
  style?: StyleProp<ViewStyle>;
28
28
  }
29
29
 
30
- const Checkbox: React.FC<CheckboxProps & TouchableHighlightProps & IconSlot> =
31
- ({
32
- Icon,
33
- status,
34
- disabled = false,
35
- onPress,
36
- onCheck,
37
- onUncheck,
38
- color,
39
- uncheckedColor,
40
- defaultValue,
41
- checkedIcon = "MaterialCommunityIcons/checkbox-marked",
42
- uncheckedIcon = "MaterialCommunityIcons/checkbox-blank-outline",
43
- size = 24,
44
- style,
45
- ...rest
46
- }) => {
47
- const [internalValue, setInternalValue] = React.useState<boolean>(
48
- status || defaultValue || false
49
- );
30
+ const Checkbox: React.FC<
31
+ CheckboxProps & TouchableHighlightProps & IconSlot
32
+ > = ({
33
+ Icon,
34
+ status,
35
+ disabled = false,
36
+ onPress,
37
+ onCheck,
38
+ onUncheck,
39
+ color,
40
+ uncheckedColor,
41
+ defaultValue,
42
+ checkedIcon = "MaterialCommunityIcons/checkbox-marked",
43
+ uncheckedIcon = "MaterialCommunityIcons/checkbox-blank-outline",
44
+ size = 24,
45
+ style,
46
+ ...rest
47
+ }) => {
48
+ const [internalValue, setInternalValue] = React.useState<boolean>(
49
+ status || defaultValue || false
50
+ );
50
51
 
51
- React.useEffect(() => {
52
- if (status != null) {
53
- setInternalValue(status);
54
- }
55
- }, [status]);
52
+ React.useEffect(() => {
53
+ if (status != null) {
54
+ setInternalValue(status);
55
+ }
56
+ }, [status]);
56
57
 
57
- // This special logic is to handle weird APIs like Airtable that return
58
- // true or undefined for a boolean
59
- const previousDefaultValue = usePrevious(defaultValue) as
60
- | boolean
61
- | undefined;
58
+ // This special logic is to handle weird APIs like Airtable that return
59
+ // true or undefined for a boolean
60
+ const previousDefaultValue = usePrevious(defaultValue) as boolean | undefined;
62
61
 
63
- React.useEffect(() => {
64
- if (defaultValue !== previousDefaultValue) {
65
- setInternalValue(Boolean(defaultValue));
66
- }
67
- }, [defaultValue, previousDefaultValue]);
62
+ React.useEffect(() => {
63
+ if (defaultValue !== previousDefaultValue) {
64
+ setInternalValue(Boolean(defaultValue));
65
+ }
66
+ }, [defaultValue, previousDefaultValue]);
68
67
 
69
- const { colors } = useTheme();
68
+ const { colors } = useTheme();
70
69
 
71
- const checkboxColor = internalValue
72
- ? color || colors.primary
73
- : uncheckedColor || colors.primary;
70
+ const checkboxColor = internalValue
71
+ ? color || colors.primary
72
+ : uncheckedColor || colors.primary;
74
73
 
75
- const handlePress = () => {
76
- const newValue = !internalValue;
74
+ const handlePress = () => {
75
+ const newValue = !internalValue;
77
76
 
78
- setInternalValue(newValue);
79
- onPress?.(newValue);
77
+ setInternalValue(newValue);
78
+ onPress?.(newValue);
80
79
 
81
- if (newValue) {
82
- onCheck?.();
83
- }
80
+ if (newValue) {
81
+ onCheck?.();
82
+ }
84
83
 
85
- if (!newValue) {
86
- onUncheck?.();
87
- }
88
- };
84
+ if (!newValue) {
85
+ onUncheck?.();
86
+ }
87
+ };
89
88
 
90
- return (
91
- <Touchable
92
- {...rest}
93
- onPress={handlePress}
94
- disabled={disabled}
95
- accessibilityState={{ disabled }}
96
- accessibilityRole="button"
97
- accessibilityLiveRegion="polite"
98
- style={[styles.container, style, { width: size, height: size }]}
99
- >
100
- <Icon
101
- style={styles.icon}
102
- name={internalValue ? checkedIcon : uncheckedIcon}
103
- size={size}
104
- color={checkboxColor}
89
+ return (
90
+ <Touchable
91
+ {...rest}
92
+ onPress={handlePress}
93
+ disabled={disabled}
94
+ accessibilityState={{ disabled }}
95
+ accessibilityRole="button"
96
+ accessibilityLiveRegion="polite"
97
+ style={[styles.container, style, { width: size, height: size }]}
98
+ >
99
+ <Icon
100
+ style={styles.icon}
101
+ name={internalValue ? checkedIcon : uncheckedIcon}
102
+ size={size}
103
+ color={checkboxColor}
104
+ />
105
+ <View style={[StyleSheet.absoluteFill, styles.fillContainer]}>
106
+ <View
107
+ style={[
108
+ styles.fill,
109
+ { opacity: disabled ? 0.5 : 1 },
110
+ { borderColor: checkboxColor },
111
+ ]}
105
112
  />
106
- <View style={[StyleSheet.absoluteFill, styles.fillContainer]}>
107
- <View
108
- style={[
109
- styles.fill,
110
- { opacity: disabled ? 0.5 : 1 },
111
- { borderColor: checkboxColor },
112
- ]}
113
- />
114
- </View>
115
- </Touchable>
116
- );
117
- };
113
+ </View>
114
+ </Touchable>
115
+ );
116
+ };
118
117
 
119
118
  const styles = StyleSheet.create({
120
119
  container: {
@@ -12,7 +12,7 @@ interface Props {
12
12
  style?: StyleProp<ImageStyle>;
13
13
  }
14
14
 
15
- const CircleImage: React.FC<Props> = ({
15
+ const CircleImage: React.FC<React.PropsWithChildren<Props>> = ({
16
16
  source = Config.placeholderImageURL,
17
17
  size = 60,
18
18
  style,
@@ -148,6 +148,7 @@ class CircularProgress extends React.Component<Props> {
148
148
  return (
149
149
  <View style={style}>
150
150
  <Svg width={size + padding} height={size + padding}>
151
+ {/* @ts-ignore */}
151
152
  <G
152
153
  rotation={rotation}
153
154
  originX={(size + padding) / 2}
@@ -26,7 +26,7 @@ type Props = {
26
26
  children?: React.ReactNode;
27
27
  };
28
28
 
29
- const Container: React.FC<Props> = ({
29
+ const Container: React.FC<React.PropsWithChildren<Props>> = ({
30
30
  useThemeGutterPadding,
31
31
  borderColor,
32
32
  borderWidth,
@@ -69,7 +69,7 @@ const MONTHS = [
69
69
  "December",
70
70
  ];
71
71
 
72
- const DatePicker: React.FC<Props> = ({
72
+ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
73
73
  Icon,
74
74
  style,
75
75
  theme: { colors, typography, roundness, disabledOpacity },
@@ -4,7 +4,7 @@ import DateTimePicker from "@react-native-community/datetimepicker";
4
4
  import DateTimePickerModal from "react-native-modal-datetime-picker";
5
5
  import { DatePickerComponentProps as Props } from "./DatePickerComponentType";
6
6
 
7
- const DatePickerComponent: React.FC<Props> = ({
7
+ const DatePickerComponent: React.FC<React.PropsWithChildren<Props>> = ({
8
8
  value,
9
9
  onChange,
10
10
  mode,
@@ -66,7 +66,7 @@ type Props = {
66
66
  } & TouchableHighlightProps &
67
67
  IconSlot;
68
68
 
69
- const Button: React.FC<Props> = ({
69
+ const Button: React.FC<React.PropsWithChildren<Props>> = ({
70
70
  Icon,
71
71
  icon,
72
72
  disabled = false,
@@ -23,7 +23,7 @@ const getWidth = (numColumns: number) => {
23
23
  }
24
24
  };
25
25
 
26
- const Card: React.FC<Props> = ({
26
+ const Card: React.FC<React.PropsWithChildren<Props>> = ({
27
27
  numColumns = 3,
28
28
  children,
29
29
  onPress,
@@ -68,7 +68,7 @@ type Props = {
68
68
  } & TouchableHighlightProps &
69
69
  IconSlot;
70
70
 
71
- const FAB: React.FC<Props> = ({
71
+ const FAB: React.FC<React.PropsWithChildren<Props>> = ({
72
72
  Icon,
73
73
  icon,
74
74
  disabled = false,
@@ -9,7 +9,7 @@ type Props = {
9
9
  theme: typeof theme;
10
10
  };
11
11
 
12
- const Divider: React.FC<Props> = ({
12
+ const Divider: React.FC<React.PropsWithChildren<Props>> = ({
13
13
  style,
14
14
  color,
15
15
  theme: { colors },
@@ -17,7 +17,12 @@ type Props = {
17
17
  } & ViewProps;
18
18
 
19
19
  /* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
20
- const Elevation: React.FC<Props> = ({ style, theme, children, ...rest }) => {
20
+ const Elevation: React.FC<React.PropsWithChildren<Props>> = ({
21
+ style,
22
+ theme,
23
+ children,
24
+ ...rest
25
+ }) => {
21
26
  const { elevation = 4, borderRadius: radius } =
22
27
  StyleSheet.flatten(style) || {};
23
28
  const { colors } = theme;
@@ -26,7 +26,7 @@ type Props = {
26
26
  } & PressableProps &
27
27
  IconSlot;
28
28
 
29
- const FAB: React.FC<Props> = ({
29
+ const FAB: React.FC<React.PropsWithChildren<Props>> = ({
30
30
  onPress,
31
31
  disabled,
32
32
  loading,
@@ -25,7 +25,7 @@ type Props = {
25
25
  defaultValue?: string;
26
26
  } & IconSlot;
27
27
 
28
- const FieldSearchBarFull: React.FC<Props> = ({
28
+ const FieldSearchBarFull: React.FC<React.PropsWithChildren<Props>> = ({
29
29
  showIcon,
30
30
  Icon,
31
31
  icon = "search",
@@ -27,7 +27,7 @@ type Props = {
27
27
  theme: Theme;
28
28
  } & IconSlot;
29
29
 
30
- const Header: React.FC<Props> = ({
30
+ const Header: React.FC<React.PropsWithChildren<Props>> = ({
31
31
  Icon,
32
32
  titleTypeStyle,
33
33
  titleColor,
@@ -14,7 +14,7 @@ type Props = {
14
14
  theme: Theme;
15
15
  } & IconSlot;
16
16
 
17
- const HeaderLarge: React.FC<Props> = ({
17
+ const HeaderLarge: React.FC<React.PropsWithChildren<Props>> = ({
18
18
  Icon,
19
19
  title,
20
20
  buttonText,
@@ -15,7 +15,7 @@ type Props = {
15
15
  theme: Theme;
16
16
  } & IconSlot;
17
17
 
18
- const HeaderMedium: React.FC<Props> = ({
18
+ const HeaderMedium: React.FC<React.PropsWithChildren<Props>> = ({
19
19
  Icon,
20
20
  title,
21
21
  buttonText,
@@ -15,7 +15,7 @@ type Props = {
15
15
  theme: Theme;
16
16
  } & IconSlot;
17
17
 
18
- const HeaderOverline: React.FC<Props> = ({
18
+ const HeaderOverline: React.FC<React.PropsWithChildren<Props>> = ({
19
19
  Icon,
20
20
  title,
21
21
  buttonText,
@@ -25,7 +25,7 @@ type Props = {
25
25
  } & PressableProps &
26
26
  IconSlot;
27
27
 
28
- const IconButton: React.FC<Props> = ({
28
+ const IconButton: React.FC<React.PropsWithChildren<Props>> = ({
29
29
  Icon,
30
30
  icon,
31
31
  color: customColor,
@@ -47,6 +47,7 @@ class Portal extends React.Component<Props> {
47
47
  <PortalContext.Consumer>
48
48
  {(manager) => (
49
49
  <PortalConsumer manager={manager as PortalMethods}>
50
+ {/* @ts-ignore */}
50
51
  <ThemeProvider theme={theme}>{children}</ThemeProvider>
51
52
  </PortalConsumer>
52
53
  )}
@@ -18,7 +18,7 @@ type Props = {
18
18
  theme: typeof themeT;
19
19
  };
20
20
 
21
- const ProgressCircle: React.FC<Props> = ({
21
+ const ProgressCircle: React.FC<React.PropsWithChildren<Props>> = ({
22
22
  progress = 0.5,
23
23
  style,
24
24
  color = "primary",
@@ -47,6 +47,7 @@ const ProgressCircle: React.FC<Props> = ({
47
47
  lineCap={strokeCap}
48
48
  style={style}
49
49
  >
50
+ {/* @ts-ignore */}
50
51
  {(fill) =>
51
52
  showsText ? (
52
53
  <Text
@@ -21,7 +21,7 @@ type Props = {
21
21
  theme: typeof themeT;
22
22
  };
23
23
 
24
- const ProgressIndicator: React.FC<Props> = ({
24
+ const ProgressIndicator: React.FC<React.PropsWithChildren<Props>> = ({
25
25
  numberOfSteps,
26
26
  currentStep,
27
27
  currentStepStrokeWidth = 3,
@@ -10,7 +10,7 @@ interface Props extends RadioButtonGroupProps {
10
10
  style?: StyleProp<ViewStyle>;
11
11
  }
12
12
 
13
- const RadioButtonFieldGroup: React.FC<Props> = ({
13
+ const RadioButtonFieldGroup: React.FC<React.PropsWithChildren<Props>> = ({
14
14
  label,
15
15
  children,
16
16
  theme,
@@ -27,7 +27,7 @@ type Props = {
27
27
  theme: typeof theme;
28
28
  };
29
29
 
30
- const Row: React.FC<Props> = ({
30
+ const Row: React.FC<React.PropsWithChildren<Props>> = ({
31
31
  titleTypeStyle,
32
32
  titleColor,
33
33
  subtitleTypeStyle,
@@ -15,7 +15,7 @@ type Props = {
15
15
  theme: Theme;
16
16
  } & IconSlot;
17
17
 
18
- const RowBodyIcon: React.FC<Props> = ({
18
+ const RowBodyIcon: React.FC<React.PropsWithChildren<Props>> = ({
19
19
  Icon,
20
20
  title,
21
21
  subtitle,
@@ -13,7 +13,7 @@ type Props = {
13
13
  theme: typeof theme;
14
14
  };
15
15
 
16
- const RowHeadlineImageCaption: React.FC<Props> = ({
16
+ const RowHeadlineImageCaption: React.FC<React.PropsWithChildren<Props>> = ({
17
17
  title,
18
18
  subtitle,
19
19
  caption,