@draftbit/core 44.2.3-c421ea.2 → 46.0.1-eb73d2.0

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 (192) 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.map +1 -1
  15. package/lib/commonjs/components/CircleImage.js.map +1 -1
  16. package/lib/commonjs/components/CircularProgress.js.map +1 -1
  17. package/lib/commonjs/components/Container.js.map +1 -1
  18. package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
  19. package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
  20. package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
  21. package/lib/commonjs/components/Divider.js.map +1 -1
  22. package/lib/commonjs/components/Elevation.js.map +1 -1
  23. package/lib/commonjs/components/FAB.js.map +1 -1
  24. package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
  25. package/lib/commonjs/components/Header.js.map +1 -1
  26. package/lib/commonjs/components/HeaderLarge.js.map +1 -1
  27. package/lib/commonjs/components/HeaderMedium.js.map +1 -1
  28. package/lib/commonjs/components/HeaderOverline.js.map +1 -1
  29. package/lib/commonjs/components/IconButton.js.map +1 -1
  30. package/lib/commonjs/components/Portal/Portal.js.map +1 -1
  31. package/lib/commonjs/components/ProgressCircle.js.map +1 -1
  32. package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
  33. package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  34. package/lib/commonjs/components/Row.js.map +1 -1
  35. package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
  36. package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
  37. package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
  38. package/lib/commonjs/components/StarRating.js.map +1 -1
  39. package/lib/commonjs/components/Surface.js.map +1 -1
  40. package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
  41. package/lib/commonjs/components/ToggleButton.js.map +1 -1
  42. package/lib/commonjs/interfaces/Icon.js.map +1 -1
  43. package/lib/module/Provider.js.map +1 -1
  44. package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
  45. package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -1
  46. package/lib/module/components/AnimatedCircularProgress.js.map +1 -1
  47. package/lib/module/components/AspectRatio.js.map +1 -1
  48. package/lib/module/components/AvatarEdit.js.map +1 -1
  49. package/lib/module/components/Banner.js.map +1 -1
  50. package/lib/module/components/Button.js +32 -11
  51. package/lib/module/components/Button.js.map +1 -1
  52. package/lib/module/components/Card.js.map +1 -1
  53. package/lib/module/components/CardBlock.js.map +1 -1
  54. package/lib/module/components/CardContainer.js.map +1 -1
  55. package/lib/module/components/CardContainerRating.js.map +1 -1
  56. package/lib/module/components/CardContainerShortImage.js.map +1 -1
  57. package/lib/module/components/CardInline.js.map +1 -1
  58. package/lib/module/components/Carousel.js.map +1 -1
  59. package/lib/module/components/Checkbox/index.js.map +1 -1
  60. package/lib/module/components/CircleImage.js +16 -2
  61. package/lib/module/components/CircleImage.js.map +1 -1
  62. package/lib/module/components/CircularProgress.js.map +1 -1
  63. package/lib/module/components/Container.js.map +1 -1
  64. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  65. package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
  66. package/lib/module/components/DatePicker/DatePickerComponentType.js.map +1 -1
  67. package/lib/module/components/DeprecatedButton.js.map +1 -1
  68. package/lib/module/components/DeprecatedCardWrapper.js.map +1 -1
  69. package/lib/module/components/DeprecatedFAB.js +20 -4
  70. package/lib/module/components/DeprecatedFAB.js.map +1 -1
  71. package/lib/module/components/Divider.js.map +1 -1
  72. package/lib/module/components/Elevation.js.map +1 -1
  73. package/lib/module/components/FAB.js.map +1 -1
  74. package/lib/module/components/FieldSearchBarFull.js.map +1 -1
  75. package/lib/module/components/Header.js.map +1 -1
  76. package/lib/module/components/HeaderLarge.js.map +1 -1
  77. package/lib/module/components/HeaderMedium.js.map +1 -1
  78. package/lib/module/components/HeaderOverline.js.map +1 -1
  79. package/lib/module/components/IconButton.js.map +1 -1
  80. package/lib/module/components/NumberInput.js +13 -2
  81. package/lib/module/components/NumberInput.js.map +1 -1
  82. package/lib/module/components/Portal/Portal.js.map +1 -1
  83. package/lib/module/components/Portal/PortalManager.js +1 -1
  84. package/lib/module/components/Portal/PortalManager.js.map +1 -1
  85. package/lib/module/components/ProgressCircle.js.map +1 -1
  86. package/lib/module/components/ProgressIndicator.js.map +1 -1
  87. package/lib/module/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
  88. package/lib/module/components/RadioButton/RadioButtonGroup.js +16 -4
  89. package/lib/module/components/RadioButton/RadioButtonGroup.js.map +1 -1
  90. package/lib/module/components/RadioButton/RadioButtonRow.js +23 -6
  91. package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
  92. package/lib/module/components/Row.js.map +1 -1
  93. package/lib/module/components/RowBodyIcon.js.map +1 -1
  94. package/lib/module/components/RowHeadlineImageCaption.js.map +1 -1
  95. package/lib/module/components/RowHeadlineImageIcon.js.map +1 -1
  96. package/lib/module/components/ScreenContainer.js +21 -5
  97. package/lib/module/components/ScreenContainer.js.map +1 -1
  98. package/lib/module/components/StarRating.js.map +1 -1
  99. package/lib/module/components/Surface.js.map +1 -1
  100. package/lib/module/components/Swiper/Swiper.js.map +1 -1
  101. package/lib/module/components/ToggleButton.js.map +1 -1
  102. package/lib/module/interfaces/Icon.js.map +1 -1
  103. package/lib/typescript/src/components/Accordion/AccordionGroup.d.ts +2 -3022
  104. package/lib/typescript/src/components/Accordion/AccordionItem.d.ts +2 -3010
  105. package/lib/typescript/src/components/ActionSheet/ActionSheetCancel.d.ts +1 -1
  106. package/lib/typescript/src/components/ActionSheet/ActionSheetItem.d.ts +1 -1
  107. package/lib/typescript/src/components/AnimatedCircularProgress.d.ts +1 -1
  108. package/lib/typescript/src/components/AspectRatio.d.ts +1 -1
  109. package/lib/typescript/src/components/AvatarEdit.d.ts +2 -2
  110. package/lib/typescript/src/components/Banner.d.ts +2 -2
  111. package/lib/typescript/src/components/Card.d.ts +2 -2
  112. package/lib/typescript/src/components/CardBlock.d.ts +2 -2
  113. package/lib/typescript/src/components/CardContainer.d.ts +2 -2
  114. package/lib/typescript/src/components/CardContainerRating.d.ts +2 -2
  115. package/lib/typescript/src/components/CardContainerShortImage.d.ts +2 -2
  116. package/lib/typescript/src/components/CardInline.d.ts +2 -2
  117. package/lib/typescript/src/components/Carousel.d.ts +4 -7
  118. package/lib/typescript/src/components/CircleImage.d.ts +1 -1
  119. package/lib/typescript/src/components/Container.d.ts +2 -2
  120. package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +2 -2
  121. package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts +1 -1
  122. package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
  123. package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +2 -2
  124. package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
  125. package/lib/typescript/src/components/Divider.d.ts +2 -2
  126. package/lib/typescript/src/components/Elevation.d.ts +2 -2
  127. package/lib/typescript/src/components/FAB.d.ts +2 -2
  128. package/lib/typescript/src/components/FieldSearchBarFull.d.ts +2 -2
  129. package/lib/typescript/src/components/Header.d.ts +2 -2
  130. package/lib/typescript/src/components/HeaderLarge.d.ts +2 -2
  131. package/lib/typescript/src/components/HeaderMedium.d.ts +2 -2
  132. package/lib/typescript/src/components/HeaderOverline.d.ts +2 -2
  133. package/lib/typescript/src/components/IconButton.d.ts +2 -2
  134. package/lib/typescript/src/components/ProgressCircle.d.ts +2 -2
  135. package/lib/typescript/src/components/ProgressIndicator.d.ts +2 -2
  136. package/lib/typescript/src/components/RadioButton/RadioButtonFieldGroup.d.ts +2 -2
  137. package/lib/typescript/src/components/Row.d.ts +2 -2
  138. package/lib/typescript/src/components/RowBodyIcon.d.ts +2 -2
  139. package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +2 -2
  140. package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +2 -2
  141. package/lib/typescript/src/components/Slider.d.ts +2 -3032
  142. package/lib/typescript/src/components/StarRating.d.ts +2 -2
  143. package/lib/typescript/src/components/Surface.d.ts +2 -2
  144. package/lib/typescript/src/components/Switch.d.ts +2 -3018
  145. package/lib/typescript/src/components/ToggleButton.d.ts +2 -2
  146. package/lib/typescript/src/interfaces/Icon.d.ts +1 -3
  147. package/package.json +5 -5
  148. package/src/Provider.tsx +1 -0
  149. package/src/components/ActionSheet/ActionSheetCancel.tsx +1 -1
  150. package/src/components/ActionSheet/ActionSheetItem.js +1 -1
  151. package/src/components/ActionSheet/ActionSheetItem.tsx +6 -1
  152. package/src/components/AnimatedCircularProgress.tsx +1 -1
  153. package/src/components/AspectRatio.tsx +1 -1
  154. package/src/components/AvatarEdit.tsx +1 -1
  155. package/src/components/Banner.tsx +1 -1
  156. package/src/components/Card.tsx +1 -1
  157. package/src/components/CardBlock.tsx +1 -1
  158. package/src/components/CardContainer.tsx +1 -1
  159. package/src/components/CardContainerRating.tsx +1 -1
  160. package/src/components/CardContainerShortImage.tsx +1 -1
  161. package/src/components/CardInline.tsx +1 -1
  162. package/src/components/Carousel.tsx +2 -1
  163. package/src/components/CircleImage.tsx +1 -1
  164. package/src/components/CircularProgress.tsx +1 -0
  165. package/src/components/Container.tsx +1 -1
  166. package/src/components/DatePicker/DatePicker.tsx +1 -1
  167. package/src/components/DatePicker/DatePickerComponent.tsx +1 -1
  168. package/src/components/DeprecatedButton.tsx +1 -1
  169. package/src/components/DeprecatedCardWrapper.tsx +1 -1
  170. package/src/components/DeprecatedFAB.tsx +1 -1
  171. package/src/components/Divider.tsx +1 -1
  172. package/src/components/Elevation.tsx +6 -1
  173. package/src/components/FAB.tsx +1 -1
  174. package/src/components/FieldSearchBarFull.tsx +1 -1
  175. package/src/components/Header.tsx +1 -1
  176. package/src/components/HeaderLarge.tsx +1 -1
  177. package/src/components/HeaderMedium.tsx +1 -1
  178. package/src/components/HeaderOverline.tsx +1 -1
  179. package/src/components/IconButton.tsx +1 -1
  180. package/src/components/Portal/Portal.tsx +1 -0
  181. package/src/components/ProgressCircle.tsx +2 -1
  182. package/src/components/ProgressIndicator.tsx +1 -1
  183. package/src/components/RadioButton/RadioButtonFieldGroup.tsx +1 -1
  184. package/src/components/Row.tsx +1 -1
  185. package/src/components/RowBodyIcon.tsx +1 -1
  186. package/src/components/RowHeadlineImageCaption.tsx +1 -1
  187. package/src/components/RowHeadlineImageIcon.tsx +1 -1
  188. package/src/components/StarRating.tsx +2 -2
  189. package/src/components/Surface.tsx +1 -1
  190. package/src/components/Swiper/Swiper.tsx +1 -0
  191. package/src/components/ToggleButton.tsx +1 -1
  192. package/src/interfaces/Icon.ts +1 -1
@@ -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-eb73d2.0+eb73d2cb",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,11 +41,11 @@
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
- "@react-native-community/slider": "4.2.3",
48
- "@react-native-picker/picker": "2.4.2",
47
+ "@react-native-community/slider": "4.1.12",
48
+ "@react-native-picker/picker": "2.4.1",
49
49
  "color": "^3.1.2",
50
50
  "date-fns": "^2.16.1",
51
51
  "dateformat": "^3.0.3",
@@ -78,5 +78,5 @@
78
78
  ]
79
79
  ]
80
80
  },
81
- "gitHead": "c421ea59335fbf8024b7a8f199f2a9c61af5ef55"
81
+ "gitHead": "eb73d2cb55b92c502321cec730818f7b45884645"
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);
@@ -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,
@@ -17,7 +17,7 @@ type Props = {
17
17
  theme: Theme;
18
18
  } & IconSlot;
19
19
 
20
- const RowHeadlineImageIcon: React.FC<Props> = ({
20
+ const RowHeadlineImageIcon: React.FC<React.PropsWithChildren<Props>> = ({
21
21
  Icon,
22
22
  icon,
23
23
  title,
@@ -23,7 +23,7 @@ type Props = {
23
23
  onPress?: (newValue: number) => void;
24
24
  } & IconSlot;
25
25
 
26
- const StarRating: React.FC<Props> = ({
26
+ const StarRating: React.FC<React.PropsWithChildren<Props>> = ({
27
27
  Icon,
28
28
  starSize = 16,
29
29
  maxStars = 5,
@@ -53,7 +53,7 @@ const StarRating: React.FC<Props> = ({
53
53
  }, [defaultValue]);
54
54
 
55
55
  const ratingHandler = React.useCallback(
56
- (r) => {
56
+ (r: number) => {
57
57
  setLocalRating(r);
58
58
  !!onPress && onPress(r);
59
59
  },
@@ -19,7 +19,7 @@ type Props = {
19
19
  theme: Theme;
20
20
  } & ViewProps;
21
21
 
22
- const Surface: React.FC<Props> = ({
22
+ const Surface: React.FC<React.PropsWithChildren<Props>> = ({
23
23
  elevation: propElevation,
24
24
  style,
25
25
  theme,
@@ -40,6 +40,7 @@ const Swiper = ({
40
40
  style,
41
41
  }: SwiperProps<any>) => (
42
42
  <View style={style}>
43
+ {/* @ts-ignore */}
43
44
  <SwiperComponent
44
45
  from={from}
45
46
  loop={loop}
@@ -22,7 +22,7 @@ type Props = {
22
22
  theme: Theme;
23
23
  } & IconSlot;
24
24
 
25
- const ToggleButton: React.FC<Props> = ({
25
+ const ToggleButton: React.FC<React.PropsWithChildren<Props>> = ({
26
26
  Icon,
27
27
  icon,
28
28
  toggled = false,
@@ -10,7 +10,7 @@ import { ViewProps, StyleProp, ImageStyle } from "react-native";
10
10
  import { Subtract } from "utility-types";
11
11
 
12
12
  type Props = {
13
- name: string | number | { uri: string };
13
+ name: string;
14
14
  color?: string;
15
15
  size: number;
16
16
  style?: StyleProp<ImageStyle>;